From 286e9f13f3eb3d21e12cc352ff74aafb2e6a3c22 Mon Sep 17 00:00:00 2001 From: kgv Date: Sun, 1 Aug 2021 12:34:41 +0300 Subject: [PATCH 001/639] 0032508: Visualization - OpenGl_FrameBuffer::InitWrapper() should not fail on wrapping textured FBO OpenGl_FrameBuffer::InitWrapper() now reads viewport from GL_VIEWPORT and doesn't return error on GL_TEXTURE attachments. OpenGl_FrameBuffer::Release() assertion is now skipped for wrapped FBOs. --- src/OpenGl/OpenGl_FrameBuffer.cxx | 42 +++++++++++++++++-------------- 1 file changed, 23 insertions(+), 19 deletions(-) diff --git a/src/OpenGl/OpenGl_FrameBuffer.cxx b/src/OpenGl/OpenGl_FrameBuffer.cxx index 628016deda..1864da9a4f 100644 --- a/src/OpenGl/OpenGl_FrameBuffer.cxx +++ b/src/OpenGl/OpenGl_FrameBuffer.cxx @@ -644,7 +644,7 @@ Standard_Boolean OpenGl_FrameBuffer::InitWrapper (const Handle(OpenGl_Context)& Release (theGlCtx.operator->()); GLint anFbo = GLint(NO_FRAMEBUFFER); - ::glGetIntegerv (GL_FRAMEBUFFER_BINDING, &anFbo); + theGlCtx->core11fwd->glGetIntegerv (GL_FRAMEBUFFER_BINDING, &anFbo); if (anFbo == GLint(NO_FRAMEBUFFER)) { return Standard_False; @@ -666,14 +666,14 @@ Standard_Boolean OpenGl_FrameBuffer::InitWrapper (const Handle(OpenGl_Context)& theGlCtx->arbFBO->glGetFramebufferAttachmentParameteriv (GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME, &aColorId); myGlColorRBufferId = aColorId; } + else if (aColorType == GL_TEXTURE) + { + // myColorTextures[0]->InitWrapper() - not implemented, just skip it + } else if (aColorType != GL_NONE) { - TCollection_ExtendedString aMsg = "OpenGl_FrameBuffer::InitWrapper(), color attachment of unsupported type has been skipped!"; - theGlCtx->PushMessage (GL_DEBUG_SOURCE_APPLICATION, - GL_DEBUG_TYPE_ERROR, - 0, - GL_DEBUG_SEVERITY_HIGH, - aMsg); + theGlCtx->PushMessage (GL_DEBUG_SOURCE_APPLICATION, GL_DEBUG_TYPE_ERROR, 0, GL_DEBUG_SEVERITY_HIGH, + "OpenGl_FrameBuffer::InitWrapper(), color attachment of unsupported type has been skipped!"); } if (aDepthType == GL_RENDERBUFFER) @@ -681,14 +681,14 @@ Standard_Boolean OpenGl_FrameBuffer::InitWrapper (const Handle(OpenGl_Context)& theGlCtx->arbFBO->glGetFramebufferAttachmentParameteriv (GL_FRAMEBUFFER, GL_DEPTH_ATTACHMENT, GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME, &aDepthId); myGlDepthRBufferId = aDepthId; } + else if (aDepthType == GL_TEXTURE) + { + // myDepthStencilTexture->InitWrapper() - not implemented, just skip it + } else if (aDepthType != GL_NONE) { - TCollection_ExtendedString aMsg = "OpenGl_FrameBuffer::InitWrapper(), depth attachment of unsupported type has been skipped!"; - theGlCtx->PushMessage (GL_DEBUG_SOURCE_APPLICATION, - GL_DEBUG_TYPE_ERROR, - 0, - GL_DEBUG_SEVERITY_HIGH, - aMsg); + theGlCtx->PushMessage (GL_DEBUG_SOURCE_APPLICATION, GL_DEBUG_TYPE_ERROR, 0, GL_DEBUG_SEVERITY_HIGH, + "OpenGl_FrameBuffer::InitWrapper(), depth attachment of unsupported type has been skipped!"); } // retrieve dimensions @@ -696,12 +696,16 @@ Standard_Boolean OpenGl_FrameBuffer::InitWrapper (const Handle(OpenGl_Context)& if (aRBuffer != NO_RENDERBUFFER) { theGlCtx->arbFBO->glBindRenderbuffer (GL_RENDERBUFFER, aRBuffer); - theGlCtx->arbFBO->glGetRenderbufferParameteriv (GL_RENDERBUFFER, GL_RENDERBUFFER_WIDTH, &myVPSizeX); - theGlCtx->arbFBO->glGetRenderbufferParameteriv (GL_RENDERBUFFER, GL_RENDERBUFFER_HEIGHT, &myVPSizeY); + theGlCtx->arbFBO->glGetRenderbufferParameteriv (GL_RENDERBUFFER, GL_RENDERBUFFER_WIDTH, &myInitVPSizeX); + theGlCtx->arbFBO->glGetRenderbufferParameteriv (GL_RENDERBUFFER, GL_RENDERBUFFER_HEIGHT, &myInitVPSizeY); theGlCtx->arbFBO->glBindRenderbuffer (GL_RENDERBUFFER, NO_RENDERBUFFER); } - return aRBuffer != NO_RENDERBUFFER; + GLint aViewport[4] = {}; + theGlCtx->core11fwd->glGetIntegerv (GL_VIEWPORT, aViewport); + myVPSizeX = aViewport[2]; + myVPSizeY = aViewport[3]; + return Standard_True; } // ======================================================================= @@ -713,10 +717,10 @@ void OpenGl_FrameBuffer::Release (OpenGl_Context* theGlCtx) if (isValidFrameBuffer()) { // application can not handle this case by exception - this is bug in code - Standard_ASSERT_RETURN (theGlCtx != NULL, + Standard_ASSERT_RETURN (!myIsOwnBuffer || theGlCtx != NULL, "OpenGl_FrameBuffer destroyed without GL context! Possible GPU memory leakage...",); - if (theGlCtx->IsValid() - && myIsOwnBuffer) + if (myIsOwnBuffer + && theGlCtx->IsValid()) { theGlCtx->arbFBO->glDeleteFramebuffers (1, &myGlFBufferId); if (myGlColorRBufferId != NO_RENDERBUFFER) From 1a75fcddae35ccebd7ccac797dc9dfeb68935fe8 Mon Sep 17 00:00:00 2001 From: jgv Date: Fri, 30 Jul 2021 03:09:09 +0300 Subject: [PATCH 002/639] 0032470: Modeling Algorithms - BOP wrong result on sphere and box Correct adjusting pcurves on periodic surfaces: take the middle point as a reference point. --- src/ProjLib/ProjLib_ComputeApprox.cxx | 6 +++-- tests/bugs/modalg_7/bug32470 | 22 ++++++++++++++++++ tests/bugs/moddata_3/bug5145 | 32 +++++++++++++++++++++++++++ tests/draft/angle/K8 | 2 +- 4 files changed, 59 insertions(+), 3 deletions(-) create mode 100644 tests/bugs/modalg_7/bug32470 diff --git a/src/ProjLib/ProjLib_ComputeApprox.cxx b/src/ProjLib/ProjLib_ComputeApprox.cxx index 4d8269911f..e4745113d7 100644 --- a/src/ProjLib/ProjLib_ComputeApprox.cxx +++ b/src/ProjLib/ProjLib_ComputeApprox.cxx @@ -1246,7 +1246,9 @@ void ProjLib_ComputeApprox::Perform //Return curve home Standard_Real UFirst = F.FirstParameter(); - gp_Pnt P3d = C->Value( UFirst ); + Standard_Real ULast = F.LastParameter(); + Standard_Real Umid = (UFirst + ULast)/2; + gp_Pnt P3d = C->Value (Umid); Standard_Real u = 0., v = 0.; switch (SType) { @@ -1301,7 +1303,7 @@ void ProjLib_ComputeApprox::Perform if (F.UCouture || (F.VCouture && SType == GeomAbs_Sphere)) { Standard_Real aNbPer; - gp_Pnt2d P2d = F.Value(UFirst); + gp_Pnt2d P2d = F.Value (Umid); du = u - P2d.X(); du = (du < 0) ? (du - Precision::PConfusion()) : (du + Precision::PConfusion()); diff --git a/tests/bugs/modalg_7/bug32470 b/tests/bugs/modalg_7/bug32470 new file mode 100644 index 0000000000..99c842bb87 --- /dev/null +++ b/tests/bugs/modalg_7/bug32470 @@ -0,0 +1,22 @@ +puts "============================================" +puts "OCC32470: BOP wrong result on sphere and box" +puts "============================================" +puts "" + +psphere sph 10 +box b 20 100 100 +ttranslate b 0 -50 -50 +trotate b 0 0 10 0 -1 0 45 +bcut result sph b + +checkshape result + +checknbshapes result -t -vertex 3 -edge 5 -wire 2 -face 2 -shell 1 -solid 1 + +set tolres [checkmaxtol result] + +if { ${tolres} > 1.e-5} { + puts "Error: bad tolerance of result" +} + +checkprops result -s 1229.69 -v 3945.6 diff --git a/tests/bugs/moddata_3/bug5145 b/tests/bugs/moddata_3/bug5145 index a186a3d29b..b66dbe3dbc 100644 --- a/tests/bugs/moddata_3/bug5145 +++ b/tests/bugs/moddata_3/bug5145 @@ -17,6 +17,38 @@ trim c2 c pi 2.*pi project c2d1 c1 s project c2d2 c2 s +2dcvalue c2d1 0 x1 y1 +2dcvalue c2d1 pi x2 y2 +2dcvalue c2d2 pi x3 y3 +2dcvalue c2d2 2*pi x4 y4 + +set tol 1.e-9 + +if {[expr abs([dval x1]) - 4.7123885383825099] > $tol} { + puts "Error: Wrong projection in 2D" +} +if {[expr abs([dval y1]) - 1.5707963267948966] > $tol} { + puts "Error: Wrong projection in 2D" +} +if {[expr abs([dval x2]) - 6.2831853071795862] > $tol} { + puts "Error: Wrong projection in 2D" +} +if {[expr abs(-1.2217304763960311 - [dval y2])] > $tol} { + puts "Error: Wrong projection in 2D" +} +if {[expr abs([dval x3])] > $tol} { + puts "Error: Wrong projection in 2D" +} +if {[expr abs(-1.2217304763960311 - [dval y3])] > $tol} { + puts "Error: Wrong projection in 2D" +} +if {[expr abs([dval x4]) - 1.5707967687970734] > $tol} { + puts "Error: Wrong projection in 2D" +} +if {[expr abs([dval y4]) - 1.5707963267948948] > $tol} { + puts "Error: Wrong projection in 2D" +} + checklength c2d1 -l 3.68009 checklength c2d2 -l 3.68009 diff --git a/tests/draft/angle/K8 b/tests/draft/angle/K8 index 050389a6fd..f0211dbf18 100644 --- a/tests/draft/angle/K8 +++ b/tests/draft/angle/K8 @@ -10,4 +10,4 @@ bfuse f pt pr nexplode f f depouille result f 0 0 1 f_4 5 0 0 40 0 0 1 -checkprops result -s 10112.2 +checkprops result -s 9447.73 From e93008abdd7070d47df10d98e43ed8301da34fa5 Mon Sep 17 00:00:00 2001 From: kgv Date: Wed, 4 Aug 2021 09:42:04 +0300 Subject: [PATCH 003/639] 0032518: Visualization - add AIS_InteractiveContext::SetDefaultDrawer() --- src/AIS/AIS_InteractiveContext.cxx | 117 ----------------------------- src/AIS/AIS_InteractiveContext.hxx | 43 +++++++---- 2 files changed, 29 insertions(+), 131 deletions(-) diff --git a/src/AIS/AIS_InteractiveContext.cxx b/src/AIS/AIS_InteractiveContext.cxx index fee11abb9f..c45cdad69f 100644 --- a/src/AIS/AIS_InteractiveContext.cxx +++ b/src/AIS/AIS_InteractiveContext.cxx @@ -1128,42 +1128,6 @@ TopLoc_Location AIS_InteractiveContext::Location (const Handle(AIS_InteractiveOb return theIObj->Transformation(); } -//======================================================================= -//function : SetDeviationCoefficient -//purpose : -//======================================================================= -void AIS_InteractiveContext::SetDeviationCoefficient (const Standard_Real theCoefficient) -{ - myDefaultDrawer->SetDeviationCoefficient (theCoefficient); -} - -//======================================================================= -//function : SetDeviationAngle -//purpose : -//======================================================================= -void AIS_InteractiveContext::SetDeviationAngle (const Standard_Real theAngle) -{ - myDefaultDrawer->SetDeviationAngle (theAngle); -} - -//======================================================================= -//function : DeviationAngle -//purpose : Gets deviationAngle -//======================================================================= -Standard_Real AIS_InteractiveContext::DeviationAngle() const -{ - return myDefaultDrawer->DeviationAngle(); -} - -//======================================================================= -//function : DeviationCoefficient -//purpose : -//======================================================================= -Standard_Real AIS_InteractiveContext::DeviationCoefficient() const -{ - return myDefaultDrawer->DeviationCoefficient(); -} - //======================================================================= //function : SetDisplayMode //purpose : @@ -2014,51 +1978,6 @@ Standard_Boolean AIS_InteractiveContext::ClearDetected (Standard_Boolean theToRe return toUpdate; } -//======================================================================= -//function : DrawHiddenLine -//purpose : -//======================================================================= -Standard_Boolean AIS_InteractiveContext::DrawHiddenLine() const -{ - return myDefaultDrawer->DrawHiddenLine(); -} - -//======================================================================= -//function : EnableDrawHiddenLine -//purpose : -//======================================================================= -void AIS_InteractiveContext::EnableDrawHiddenLine() const -{ - myDefaultDrawer->EnableDrawHiddenLine(); -} - -//======================================================================= -//function : DisableDrawHiddenLine -//purpose : -//======================================================================= -void AIS_InteractiveContext::DisableDrawHiddenLine() const -{ - myDefaultDrawer->DisableDrawHiddenLine(); -} - -//======================================================================= -//function : HiddenLineAspect -//purpose : -//======================================================================= -Handle (Prs3d_LineAspect) AIS_InteractiveContext::HiddenLineAspect() const -{ - return myDefaultDrawer->HiddenLineAspect(); -} - -//======================================================================= -//function : SetHiddenLineAspect -//purpose : -//======================================================================= -void AIS_InteractiveContext::SetHiddenLineAspect (const Handle(Prs3d_LineAspect)& theAspect) const -{ - myDefaultDrawer->SetHiddenLineAspect (theAspect); -} - //======================================================================= //function : SetIsoNumber //purpose : @@ -2098,42 +2017,6 @@ Standard_Integer AIS_InteractiveContext::IsoNumber (const AIS_TypeOfIso theType) return 0; } -//======================================================================= -//function : IsoOnPlane -//purpose : -//======================================================================= -void AIS_InteractiveContext::IsoOnPlane (const Standard_Boolean theToSwitchOn) -{ - myDefaultDrawer->SetIsoOnPlane (theToSwitchOn); -} - -//======================================================================= -//function : IsoOnPlane -//purpose : -//======================================================================= -Standard_Boolean AIS_InteractiveContext::IsoOnPlane() const -{ - return myDefaultDrawer->IsoOnPlane(); -} - -//======================================================================= -//function : IsoOnTriangulation -//purpose : -//======================================================================= -void AIS_InteractiveContext::IsoOnTriangulation (const Standard_Boolean theToSwitchOn) -{ - myDefaultDrawer->SetIsoOnTriangulation (theToSwitchOn); -} - -//======================================================================= -//function : IsoOnTriangulation -//purpose : -//======================================================================= -Standard_Boolean AIS_InteractiveContext::IsoOnTriangulation() const -{ - return myDefaultDrawer->IsoOnTriangulation(); -} - //======================================================================= //function : SetPixelTolerance //purpose : diff --git a/src/AIS/AIS_InteractiveContext.hxx b/src/AIS/AIS_InteractiveContext.hxx index 222d5d390c..9d2663bbc0 100644 --- a/src/AIS/AIS_InteractiveContext.hxx +++ b/src/AIS/AIS_InteractiveContext.hxx @@ -217,7 +217,14 @@ public: //! @name highlighting management //! If a new highlight style is created, its presentation Zlayer should be checked, //! otherwise highlighting might not work as expected. void SetHighlightStyle (const Prs3d_TypeOfHighlight theStyleType, - const Handle(Prs3d_Drawer)& theStyle) { myStyles[theStyleType] = theStyle; } + const Handle(Prs3d_Drawer)& theStyle) + { + myStyles[theStyleType] = theStyle; + if (theStyleType == Prs3d_TypeOfHighlight_None) + { + myDefaultDrawer = theStyle; + } + } //! Returns current dynamic highlight style settings corresponding to Prs3d_TypeOfHighlight_Dynamic. //! This is just a short-cut to HighlightStyle(Prs3d_TypeOfHighlight_Dynamic). @@ -778,6 +785,14 @@ public: //! @name common properties //! This contains all the color and line attributes which can be used by interactive objects which do not have their own attributes. const Handle(Prs3d_Drawer)& DefaultDrawer() const { return myDefaultDrawer; } + //! Sets the default attribute manager; should be set at context creation time. + //! Warning - this setter doesn't update links to the default drawer of already displayed objects! + void SetDefaultDrawer (const Handle(Prs3d_Drawer)& theDrawer) + { + myDefaultDrawer = theDrawer; + myStyles[Prs3d_TypeOfHighlight_None] = myDefaultDrawer; + } + //! Returns the current viewer. const Handle(V3d_Viewer)& CurrentViewer() const { return myMainVwr; } @@ -996,7 +1011,7 @@ public: //! @name tessellation deviation properties for automatic triangulation //! The default value is 0.001. //! In drawing shapes, however, you are allowed to ask for a relative deviation. //! This deviation will be: SizeOfObject * DeviationCoefficient. - Standard_EXPORT void SetDeviationCoefficient (const Standard_Real theCoefficient); + void SetDeviationCoefficient (const Standard_Real theCoefficient) { myDefaultDrawer->SetDeviationCoefficient (theCoefficient); } //! Returns the deviation coefficient. //! Drawings of curves or patches are made with respect to a maximal chordal deviation. @@ -1010,12 +1025,12 @@ public: //! @name tessellation deviation properties for automatic triangulation //! The default value is 0.001. //! In drawing shapes, however, you are allowed to ask for a relative deviation. //! This deviation will be: SizeOfObject * DeviationCoefficient. - Standard_EXPORT Standard_Real DeviationCoefficient() const; + Standard_Real DeviationCoefficient() const { return myDefaultDrawer->DeviationCoefficient(); } //! default 20 degrees - Standard_EXPORT void SetDeviationAngle (const Standard_Real anAngle); + void SetDeviationAngle (const Standard_Real theAngle) { myDefaultDrawer->SetDeviationAngle (theAngle); } - Standard_EXPORT Standard_Real DeviationAngle() const; + Standard_Real DeviationAngle() const { return myDefaultDrawer->DeviationAngle(); } public: //! @name HLR (Hidden Line Removal) display attributes @@ -1024,19 +1039,19 @@ public: //! @name HLR (Hidden Line Removal) display attributes //! Color: Quantity_NOC_YELLOW //! Type of line: Aspect_TOL_DASH //! Width: 1. - Standard_EXPORT Handle(Prs3d_LineAspect) HiddenLineAspect() const; + const Handle(Prs3d_LineAspect)& HiddenLineAspect() const { return myDefaultDrawer->HiddenLineAspect(); } //! Sets the hidden line aspect anAspect. //! Aspect defines display attributes for hidden lines in HLR projections. - Standard_EXPORT void SetHiddenLineAspect (const Handle(Prs3d_LineAspect)& anAspect) const; + void SetHiddenLineAspect (const Handle(Prs3d_LineAspect)& theAspect) const { myDefaultDrawer->SetHiddenLineAspect (theAspect); } //! returns Standard_True if the hidden lines are to be drawn. //! By default the hidden lines are not drawn. - Standard_EXPORT Standard_Boolean DrawHiddenLine() const; + Standard_Boolean DrawHiddenLine() const { return myDefaultDrawer->DrawHiddenLine(); } - Standard_EXPORT void EnableDrawHiddenLine() const; + void EnableDrawHiddenLine() const { myDefaultDrawer->EnableDrawHiddenLine(); } - Standard_EXPORT void DisableDrawHiddenLine() const; + void DisableDrawHiddenLine() const { myDefaultDrawer->DisableDrawHiddenLine(); } public: //! @name iso-line display attributes @@ -1047,11 +1062,11 @@ public: //! @name iso-line display attributes Standard_EXPORT Standard_Integer IsoNumber (const AIS_TypeOfIso WhichIsos = AIS_TOI_Both); //! Returns True if drawing isoparameters on planes is enabled. - Standard_EXPORT void IsoOnPlane (const Standard_Boolean SwitchOn); + void IsoOnPlane (const Standard_Boolean theToSwitchOn) { myDefaultDrawer->SetIsoOnPlane (theToSwitchOn); } //! Returns True if drawing isoparameters on planes is enabled. //! if = False, - Standard_EXPORT Standard_Boolean IsoOnPlane() const; + Standard_Boolean IsoOnPlane() const { return myDefaultDrawer->IsoOnPlane(); } //! Enables or disables on-triangulation build for isolines for a particular object. //! In case if on-triangulation builder is disabled, default on-plane builder will compute isolines for the object given. @@ -1060,10 +1075,10 @@ public: //! @name iso-line display attributes //! Enables or disables on-triangulation build for isolines for default drawer. //! In case if on-triangulation builder is disabled, default on-plane builder will compute isolines for the object given. - Standard_EXPORT void IsoOnTriangulation (const Standard_Boolean theToSwitchOn); + void IsoOnTriangulation (const Standard_Boolean theToSwitchOn) { myDefaultDrawer->SetIsoOnTriangulation (theToSwitchOn); } //! Returns true if drawing isolines on triangulation algorithm is enabled. - Standard_EXPORT Standard_Boolean IsoOnTriangulation() const; + Standard_Boolean IsoOnTriangulation() const { return myDefaultDrawer->IsoOnTriangulation(); } //! @name obsolete methods public: From 27e64adb38a9a8e6370b5dbd38a9018313884a9c Mon Sep 17 00:00:00 2001 From: mkrylova Date: Mon, 26 Jul 2021 11:09:57 +0300 Subject: [PATCH 004/639] 0032490: Data Exchange - provide OSD_FileSystem::OpenOStream() for output streams - provided OSD_FileSystem::OpenOStream() for output streams - replaced OSD_OpenStream() usage with OSD_FileSystem::DefaultFileSystem() --- src/BRepTools/BRepTools.cxx | 27 +-- .../BinLDrivers_DocumentStorageDriver.cxx | 10 +- src/BinTools/BinTools.cxx | 15 +- src/DDocStd/DDocStd_ApplicationCommands.cxx | 7 +- src/Draw/Draw_VariableCommands.cxx | 18 +- src/IGESControl/IGESControl_Writer.cxx | 18 +- src/IGESSelect/IGESSelect_WorkLibrary.cxx | 16 +- src/Image/Image_Texture.cxx | 14 +- src/OSD/OSD_CachedFileSystem.cxx | 23 +++ src/OSD/OSD_CachedFileSystem.hxx | 7 + src/OSD/OSD_FileSystem.cxx | 18 ++ src/OSD/OSD_FileSystem.hxx | 11 ++ src/OSD/OSD_FileSystemSelector.cxx | 46 +++++ src/OSD/OSD_FileSystemSelector.hxx | 7 + src/OSD/OSD_LocalFileSystem.cxx | 15 ++ src/OSD/OSD_LocalFileSystem.hxx | 3 + src/RWGltf/RWGltf_CafWriter.cxx | 98 +++++----- src/StepSelect/StepSelect_WorkLibrary.cxx | 15 +- src/TObjDRAW/TObjDRAW.cxx | 7 +- src/ViewerTest/ViewerTest_OpenGlCommands.cxx | 178 +++++++++--------- src/VrmlAPI/VrmlAPI_Writer.cxx | 76 ++++---- .../XmlLDrivers_DocumentStorageDriver.cxx | 10 +- 22 files changed, 387 insertions(+), 252 deletions(-) diff --git a/src/BRepTools/BRepTools.cxx b/src/BRepTools/BRepTools.cxx index 156ca3fb21..8f0c3b3094 100644 --- a/src/BRepTools/BRepTools.cxx +++ b/src/BRepTools/BRepTools.cxx @@ -38,7 +38,6 @@ #include #include #include -#include #include #include #include @@ -707,12 +706,14 @@ Standard_Boolean BRepTools::Write (const TopoDS_Shape& theShape, const TopTools_FormatVersion theVersion, const Message_ProgressRange& theProgress) { - std::ofstream os; - OSD_OpenStream(os, theFile, std::ios::out); - if (!os.is_open() || !os.good()) + const Handle(OSD_FileSystem)& aFileSystem = OSD_FileSystem::DefaultFileSystem(); + opencascade::std::shared_ptr aStream = aFileSystem->OpenOStream (theFile, std::ios::out); + if (aStream.get() == NULL || !aStream->good()) + { return Standard_False; + } - Standard_Boolean isGood = (os.good() && !os.eof()); + Standard_Boolean isGood = (aStream->good() && !aStream->eof()); if(!isGood) return isGood; @@ -720,19 +721,19 @@ Standard_Boolean BRepTools::Write (const TopoDS_Shape& theShape, SS.SetFormatNb (theVersion); SS.Add (theShape); - os << "DBRep_DrawableShape\n"; // for easy Draw read - SS.Write(os, theProgress); - isGood = os.good(); + *aStream << "DBRep_DrawableShape\n"; // for easy Draw read + SS.Write (*aStream, theProgress); + isGood = aStream->good(); if (isGood) { - SS.Write (theShape, os); + SS.Write (theShape, *aStream); } - os.flush(); - isGood = os.good(); + aStream->flush(); + isGood = aStream->good(); errno = 0; - os.close(); - isGood = os.good() && isGood && !errno; + isGood = aStream->good() && isGood && !errno; + aStream.reset(); return isGood; } diff --git a/src/BinLDrivers/BinLDrivers_DocumentStorageDriver.cxx b/src/BinLDrivers/BinLDrivers_DocumentStorageDriver.cxx index 39ad9b002e..2dd4bacd8b 100644 --- a/src/BinLDrivers/BinLDrivers_DocumentStorageDriver.cxx +++ b/src/BinLDrivers/BinLDrivers_DocumentStorageDriver.cxx @@ -27,7 +27,7 @@ #include #include #include -#include +#include #include #include #include @@ -74,12 +74,12 @@ void BinLDrivers_DocumentStorageDriver::Write myFileName = theFileName; - std::ofstream aFileStream; - OSD_OpenStream (aFileStream, theFileName, std::ios::out | std::ios::binary); + const Handle(OSD_FileSystem)& aFileSystem = OSD_FileSystem::DefaultFileSystem(); + opencascade::std::shared_ptr aFileStream = aFileSystem->OpenOStream (theFileName, std::ios::out | std::ios::binary); - if (aFileStream.is_open() && aFileStream.good()) + if (aFileStream.get() != NULL && aFileStream->good()) { - Write(theDocument, aFileStream, theRange); + Write (theDocument, *aFileStream, theRange); } else { diff --git a/src/BinTools/BinTools.cxx b/src/BinTools/BinTools.cxx index 9bffcea881..686a0c600d 100644 --- a/src/BinTools/BinTools.cxx +++ b/src/BinTools/BinTools.cxx @@ -18,7 +18,6 @@ #include #include #include -#include #include //======================================================================= @@ -215,15 +214,15 @@ Standard_Boolean BinTools::Write (const TopoDS_Shape& theShape, const BinTools_FormatVersion theVersion, const Message_ProgressRange& theRange) { - std::ofstream aStream; - aStream.precision (15); - OSD_OpenStream (aStream, theFile, std::ios::out | std::ios::binary); - if (!aStream.good()) + const Handle(OSD_FileSystem)& aFileSystem = OSD_FileSystem::DefaultFileSystem(); + opencascade::std::shared_ptr aStream = aFileSystem->OpenOStream (theFile, std::ios::out | std::ios::binary); + aStream->precision (15); + if (aStream.get() == NULL || !aStream->good()) return Standard_False; - Write (theShape, aStream, theWithTriangles, theWithNormals, theVersion, theRange); - aStream.close(); - return aStream.good(); + Write (theShape, *aStream, theWithTriangles, theWithNormals, theVersion, theRange); + aStream->flush(); + return aStream->good(); } //======================================================================= diff --git a/src/DDocStd/DDocStd_ApplicationCommands.cxx b/src/DDocStd/DDocStd_ApplicationCommands.cxx index a035d99562..f0c16d38b3 100644 --- a/src/DDocStd/DDocStd_ApplicationCommands.cxx +++ b/src/DDocStd/DDocStd_ApplicationCommands.cxx @@ -35,7 +35,6 @@ #include #include -#include #include #include @@ -298,9 +297,9 @@ static Standard_Integer DDocStd_SaveAs (Draw_Interpretor& di, Handle(Draw_ProgressIndicator) aProgress = new Draw_ProgressIndicator(di, 1); if (anUseStream) { - std::ofstream aFileStream; - OSD_OpenStream (aFileStream, path, std::ios::out | std::ios::binary); - theStatus = A->SaveAs (D, aFileStream, aProgress->Start()); + const Handle(OSD_FileSystem)& aFileSystem = OSD_FileSystem::DefaultFileSystem(); + opencascade::std::shared_ptr aFileStream = aFileSystem->OpenOStream (path, std::ios::out | std::ios::binary); + theStatus = A->SaveAs (D, *aFileStream, aProgress->Start()); } else { diff --git a/src/Draw/Draw_VariableCommands.cxx b/src/Draw/Draw_VariableCommands.cxx index bb502d777e..7368c92ad5 100644 --- a/src/Draw/Draw_VariableCommands.cxx +++ b/src/Draw/Draw_VariableCommands.cxx @@ -91,10 +91,10 @@ static Standard_Integer save (Draw_Interpretor& theDI, } const char* aName = theArgVec[2]; - std::ofstream aStream; - aStream.precision (15); - OSD_OpenStream (aStream, aName, std::ios::out); - if (!aStream.is_open() || !aStream.good()) + const Handle(OSD_FileSystem)& aFileSystem = OSD_FileSystem::DefaultFileSystem(); + opencascade::std::shared_ptr aStream = aFileSystem->OpenOStream (aName, std::ios::out); + aStream->precision (15); + if (aStream.get() == NULL || !aStream->good()) { theDI << "Error: cannot open file for writing " << aName; return 1; @@ -104,21 +104,21 @@ static Standard_Integer save (Draw_Interpretor& theDI, { Handle(Draw_ProgressIndicator) aProgress = new Draw_ProgressIndicator (theDI, 1); Standard_CString aToolTypeName = aDrawable->DynamicType()->Name(); - aStream << aToolTypeName << "\n"; + *aStream << aToolTypeName << "\n"; Draw::SetProgressBar (aProgress); - aDrawable->Save (aStream); + aDrawable->Save (*aStream); } catch (const Standard_NotImplemented& ) { theDI << "Error: no method for saving " << theArgVec[1]; return 1; } - aStream << "\n"; - aStream << "0\n\n"; + *aStream << "\n"; + *aStream << "0\n\n"; Draw::SetProgressBar (Handle(Draw_ProgressIndicator)()); errno = 0; - const Standard_Boolean aRes = aStream.good() && !errno; + const Standard_Boolean aRes = aStream->good() && !errno; if (!aRes) { theDI << "Error: file has not been written"; diff --git a/src/IGESControl/IGESControl_Writer.cxx b/src/IGESControl/IGESControl_Writer.cxx index 3d4913a607..565c1c216b 100644 --- a/src/IGESControl/IGESControl_Writer.cxx +++ b/src/IGESControl/IGESControl_Writer.cxx @@ -38,7 +38,7 @@ #include #include #include -#include +#include #include #include #include @@ -253,17 +253,21 @@ Standard_Boolean IGESControl_Writer::Write Standard_Boolean IGESControl_Writer::Write (const Standard_CString file, const Standard_Boolean fnes) { - std::ofstream fout; - OSD_OpenStream(fout,file,std::ios::out); - if (!fout) return Standard_False; + const Handle(OSD_FileSystem)& aFileSystem = OSD_FileSystem::DefaultFileSystem(); + opencascade::std::shared_ptr aStream = aFileSystem->OpenOStream (file, std::ios::out); + if (aStream.get() == NULL) + { + return Standard_False; + } #ifdef OCCT_DEBUG std::cout<<" Ecriture fichier ("<< (fnes ? "fnes" : "IGES") <<"): "<flush(); + res = aStream->good() && res && !errno; + aStream.reset(); return res; } diff --git a/src/IGESSelect/IGESSelect_WorkLibrary.cxx b/src/IGESSelect/IGESSelect_WorkLibrary.cxx index a2952aa481..ddb43057b0 100644 --- a/src/IGESSelect/IGESSelect_WorkLibrary.cxx +++ b/src/IGESSelect/IGESSelect_WorkLibrary.cxx @@ -36,7 +36,7 @@ #include #include #include -#include +#include #include #include #include @@ -101,9 +101,10 @@ static Handle(IGESData_FileProtocol) IGESProto; DeclareAndCast(IGESData_Protocol,prot,ctx.Protocol()); if (igesmod.IsNull() || prot.IsNull()) return Standard_False; - std::ofstream fout; - OSD_OpenStream(fout,ctx.FileName(),std::ios::out ); - if (!fout) { + const Handle(OSD_FileSystem)& aFileSystem = OSD_FileSystem::DefaultFileSystem(); + opencascade::std::shared_ptr aStream = aFileSystem->OpenOStream (ctx.FileName(), std::ios::out); + if (aStream.get() == NULL) + { ctx.CCheck(0)->AddFail("IGES File could not be created"); sout<<" - IGES File could not be created : " << ctx.FileName() << std::endl; return 0; } @@ -128,11 +129,12 @@ static Handle(IGESData_FileProtocol) IGESProto; VW.SendModel(prot); sout<<" Write "; if (themodefnes) VW.WriteMode() = 10; - Standard_Boolean status = VW.Print(fout); sout<<" Done"<flush(); + status = aStream->good() && status && !errno; + aStream.reset(); if(errno) sout << strerror(errno) << std::endl; diff --git a/src/Image/Image_Texture.cxx b/src/Image/Image_Texture.cxx index df635ce381..9892b63e76 100644 --- a/src/Image/Image_Texture.cxx +++ b/src/Image/Image_Texture.cxx @@ -20,7 +20,6 @@ #include #include #include -#include IMPLEMENT_STANDARD_RTTIEXT(Image_Texture, Standard_Transient) @@ -316,25 +315,26 @@ TCollection_AsciiString Image_Texture::ProbeImageFileFormat() const // ================================================================ Standard_Boolean Image_Texture::WriteImage (const TCollection_AsciiString& theFile) { - std::ofstream aFileOut; - OSD_OpenStream (aFileOut, theFile.ToCString(), std::ios::out | std::ios::binary | std::ios::trunc); - if (!aFileOut) + const Handle(OSD_FileSystem)& aFileSystem = OSD_FileSystem::DefaultFileSystem(); + opencascade::std::shared_ptr aFileOut = aFileSystem->OpenOStream (theFile, std::ios::out | std::ios::binary | std::ios::trunc); + if (aFileOut.get() == NULL) { Message::SendFail (TCollection_AsciiString ("Error: Unable to create file '") + theFile + "'"); return false; } - if (!WriteImage (aFileOut, theFile)) + if (!WriteImage (*aFileOut, theFile)) { return false; } - aFileOut.close(); - if (!aFileOut.good()) + aFileOut->flush(); + if (!aFileOut->good()) { Message::SendFail (TCollection_AsciiString ("Error: Unable to write file '") + theFile + "'"); return false; } + aFileOut.reset(); return true; } diff --git a/src/OSD/OSD_CachedFileSystem.cxx b/src/OSD/OSD_CachedFileSystem.cxx index 2002bc35ab..e7c119a784 100644 --- a/src/OSD/OSD_CachedFileSystem.cxx +++ b/src/OSD/OSD_CachedFileSystem.cxx @@ -34,6 +34,15 @@ Standard_Boolean OSD_CachedFileSystem::IsOpenIStream (const opencascade::std::sh return OSD_FileSystem::DefaultFileSystem()->IsOpenIStream (theStream); } +//======================================================================= +// function : IsOpenOStream +// purpose : +//======================================================================= +Standard_Boolean OSD_CachedFileSystem::IsOpenOStream (const opencascade::std::shared_ptr& theStream) const +{ + return OSD_FileSystem::DefaultFileSystem()->IsOpenOStream (theStream); +} + //======================================================================= // function : OpenIStream // purpose : @@ -52,6 +61,16 @@ opencascade::std::shared_ptr OSD_CachedFileSystem::OpenIStream (co return myStream.Stream; } +//======================================================================= +// function : OpenOStream +// purpose : +//======================================================================= +opencascade::std::shared_ptr OSD_CachedFileSystem::OpenOStream (const TCollection_AsciiString& theUrl, + const std::ios_base::openmode theMode) +{ + return OSD_FileSystem::DefaultFileSystem()->OpenOStream (theUrl, theMode); +} + //======================================================================= // function : OpenStreamBuffer // purpose : @@ -61,6 +80,10 @@ opencascade::std::shared_ptr OSD_CachedFileSystem::OpenStreamBuf const int64_t theOffset, int64_t* theOutBufSize) { + if ((theMode & std::ios::out) == std::ios::out) + { + return OSD_FileSystem::DefaultFileSystem()->OpenStreamBuffer (theUrl, theMode, theOffset, theOutBufSize); + } if (myStream.Url != theUrl) { myStream.Url = theUrl; diff --git a/src/OSD/OSD_CachedFileSystem.hxx b/src/OSD/OSD_CachedFileSystem.hxx index 37f4153e4e..b7389ec890 100644 --- a/src/OSD/OSD_CachedFileSystem.hxx +++ b/src/OSD/OSD_CachedFileSystem.hxx @@ -34,6 +34,9 @@ public: //! Returns TRUE if current input stream is opened for reading operations. Standard_EXPORT virtual Standard_Boolean IsOpenIStream (const opencascade::std::shared_ptr& theStream) const Standard_OVERRIDE; + //! Returns TRUE if current output stream is opened for writing operations. + Standard_EXPORT virtual Standard_Boolean IsOpenOStream (const opencascade::std::shared_ptr& theStream) const Standard_OVERRIDE; + //! Opens stream for specified file URL for reading operations or returns previously created stream pointing to the same URL. Standard_EXPORT virtual opencascade::std::shared_ptr OpenIStream (const TCollection_AsciiString& theUrl, @@ -41,6 +44,10 @@ public: const int64_t theOffset, const opencascade::std::shared_ptr& theOldStream) Standard_OVERRIDE; + //! Opens stream for specified file URL for writing operations (std::ostream) by calling parent's method. + Standard_EXPORT virtual opencascade::std::shared_ptr OpenOStream (const TCollection_AsciiString& theUrl, + const std::ios_base::openmode theMode) Standard_OVERRIDE; + //! Opens stream buffer for specified file URL. Standard_EXPORT virtual opencascade::std::shared_ptr OpenStreamBuffer (const TCollection_AsciiString& theUrl, diff --git a/src/OSD/OSD_FileSystem.cxx b/src/OSD/OSD_FileSystem.cxx index a0e4f62921..81fc4c2de1 100644 --- a/src/OSD/OSD_FileSystem.cxx +++ b/src/OSD/OSD_FileSystem.cxx @@ -98,3 +98,21 @@ opencascade::std::shared_ptr OSD_FileSystem::OpenIStream (const TC } return aNewStream; } + +//======================================================================= +// function : OpenOStream +// purpose : +//======================================================================= +opencascade::std::shared_ptr OSD_FileSystem::OpenOStream (const TCollection_AsciiString& theUrl, + const std::ios_base::openmode theMode) +{ + opencascade::std::shared_ptr aNewStream; + opencascade::std::shared_ptr aFileBuf = OpenStreamBuffer (theUrl, theMode | std::ios_base::out); + if (aFileBuf.get() == NULL) + { + return opencascade::std::shared_ptr(); + } + + aNewStream.reset(new OSD_OStreamBuffer (theUrl.ToCString(), aFileBuf)); + return aNewStream; +} diff --git a/src/OSD/OSD_FileSystem.hxx b/src/OSD/OSD_FileSystem.hxx index 744fe8f916..19334f9068 100644 --- a/src/OSD/OSD_FileSystem.hxx +++ b/src/OSD/OSD_FileSystem.hxx @@ -35,6 +35,9 @@ public: //! Returns TRUE if current input stream is opened for reading operations. virtual Standard_Boolean IsOpenIStream (const opencascade::std::shared_ptr& theStream) const = 0; + //! Returns TRUE if current output stream is opened for writing operations. + virtual Standard_Boolean IsOpenOStream(const opencascade::std::shared_ptr& theStream) const = 0; + //! Opens stream for specified file URL for reading operations (std::istream). //! Default implementation create a stream from file buffer returned by OSD_FileSystem::OpenFileBuffer(). //! @param theUrl [in] path to open @@ -49,6 +52,14 @@ public: const int64_t theOffset = 0, const opencascade::std::shared_ptr& theOldStream = opencascade::std::shared_ptr()); + //! Opens stream for specified file URL for writing operations (std::ostream). + //! Default implementation create a stream from file buffer returned by OSD_FileSystem::OpenFileBuffer(). + //! @param theUrl [in] path to open + //! @param theMode [in] flags describing the requested output mode for the stream (std::ios_base::out will be implicitly added) + //! @return pointer to newly created opened stream or NULL in case of failure. + Standard_EXPORT virtual opencascade::std::shared_ptr OpenOStream (const TCollection_AsciiString& theUrl, + const std::ios_base::openmode theMode); + //! Opens stream buffer for specified file URL. //! @param theUrl [in] path to open //! @param theMode [in] flags describing the requested input mode for the stream diff --git a/src/OSD/OSD_FileSystemSelector.cxx b/src/OSD/OSD_FileSystemSelector.cxx index 18cff9c0ec..0733ecb276 100644 --- a/src/OSD/OSD_FileSystemSelector.cxx +++ b/src/OSD/OSD_FileSystemSelector.cxx @@ -82,6 +82,31 @@ Standard_Boolean OSD_FileSystemSelector::IsOpenIStream (const opencascade::std:: return false; } +//======================================================================= +// function : IsOpenOStream +// purpose : +//======================================================================= +Standard_Boolean OSD_FileSystemSelector::IsOpenOStream (const opencascade::std::shared_ptr& theStream) const +{ + opencascade::std::shared_ptr aFileStream = opencascade::std::dynamic_pointer_cast (theStream); + if (aFileStream.get() == NULL) + { + return false; + } + for (NCollection_List::Iterator aProtIter (myProtocols); aProtIter.More(); aProtIter.Next()) + { + const Handle(OSD_FileSystem)& aFileSystem = aProtIter.Value(); + if (aFileSystem->IsSupportedPath (TCollection_AsciiString (aFileStream->Url().c_str()))) + { + if (aFileSystem->IsOpenOStream (theStream)) + { + return true; + } + } + } + return false; +} + //======================================================================= // function : OpenIStream // purpose : @@ -106,6 +131,27 @@ opencascade::std::shared_ptr OSD_FileSystemSelector::OpenIStream ( return opencascade::std::shared_ptr(); } +//======================================================================= +// function : OpenOStream +// purpose : +//======================================================================= +opencascade::std::shared_ptr OSD_FileSystemSelector::OpenOStream (const TCollection_AsciiString& theUrl, + const std::ios_base::openmode theMode) +{ + for (NCollection_List::Iterator aProtIter (myProtocols); aProtIter.More(); aProtIter.Next()) + { + const Handle(OSD_FileSystem)& aFileSystem = aProtIter.Value(); + if (aFileSystem->IsSupportedPath (theUrl)) + { + opencascade::std::shared_ptr aStream = aFileSystem->OpenOStream (theUrl, theMode); + if (aStream.get() != NULL) + { + return aStream; + } + } + } + return opencascade::std::shared_ptr(); +} //======================================================================= // function : OpenStreamBuffer diff --git a/src/OSD/OSD_FileSystemSelector.hxx b/src/OSD/OSD_FileSystemSelector.hxx index 79d3adc03d..60aa5e1fd6 100644 --- a/src/OSD/OSD_FileSystemSelector.hxx +++ b/src/OSD/OSD_FileSystemSelector.hxx @@ -43,6 +43,9 @@ public: //! Returns TRUE if current input stream is opened for reading operations. Standard_EXPORT virtual Standard_Boolean IsOpenIStream (const opencascade::std::shared_ptr& theStream) const Standard_OVERRIDE; + //! Returns TRUE if current output stream is opened for writing operations. + Standard_EXPORT virtual Standard_Boolean IsOpenOStream (const opencascade::std::shared_ptr& theStream) const Standard_OVERRIDE; + //! Opens input stream using one of registered protocols. Standard_EXPORT virtual opencascade::std::shared_ptr OpenIStream (const TCollection_AsciiString& theUrl, @@ -50,6 +53,10 @@ public: const int64_t theOffset = 0, const opencascade::std::shared_ptr& theOldStream = opencascade::std::shared_ptr()) Standard_OVERRIDE; + //! Opens output stream using one of registered protocols. + Standard_EXPORT virtual opencascade::std::shared_ptr OpenOStream (const TCollection_AsciiString& theUrl, + const std::ios_base::openmode theMode) Standard_OVERRIDE; + //! Opens stream buffer using one of registered protocols. Standard_EXPORT virtual opencascade::std::shared_ptr OpenStreamBuffer (const TCollection_AsciiString& theUrl, diff --git a/src/OSD/OSD_LocalFileSystem.cxx b/src/OSD/OSD_LocalFileSystem.cxx index b13a466e68..2666bc1d13 100644 --- a/src/OSD/OSD_LocalFileSystem.cxx +++ b/src/OSD/OSD_LocalFileSystem.cxx @@ -42,6 +42,21 @@ Standard_Boolean OSD_LocalFileSystem::IsOpenIStream (const opencascade::std::sha return (aFileBuf != NULL) ? aFileBuf->is_open() : false; } +//======================================================================= +// function : IsOpenOStream +// purpose : +//======================================================================= +Standard_Boolean OSD_LocalFileSystem::IsOpenOStream (const opencascade::std::shared_ptr& theStream) const +{ + opencascade::std::shared_ptr aFileStream = opencascade::std::dynamic_pointer_cast (theStream); + if (aFileStream.get() == NULL) + { + return false; + } + const std::filebuf* aFileBuf = dynamic_cast (aFileStream->rdbuf()); + return (aFileBuf != NULL) ? aFileBuf->is_open() : false; +} + //======================================================================= // function : OpenStreamBuffer // purpose : diff --git a/src/OSD/OSD_LocalFileSystem.hxx b/src/OSD/OSD_LocalFileSystem.hxx index 789461c968..fbe2db9545 100644 --- a/src/OSD/OSD_LocalFileSystem.hxx +++ b/src/OSD/OSD_LocalFileSystem.hxx @@ -31,6 +31,9 @@ public: //! Returns TRUE if current input stream is opened for reading operations. Standard_EXPORT virtual Standard_Boolean IsOpenIStream (const opencascade::std::shared_ptr& theStream) const Standard_OVERRIDE; + //! Returns TRUE if current output stream is opened for writing operations. + Standard_EXPORT virtual Standard_Boolean IsOpenOStream (const opencascade::std::shared_ptr& theStream) const Standard_OVERRIDE; + //! Opens stream buffer for specified file URL. Standard_EXPORT virtual opencascade::std::shared_ptr OpenStreamBuffer (const TCollection_AsciiString& theUrl, diff --git a/src/RWGltf/RWGltf_CafWriter.cxx b/src/RWGltf/RWGltf_CafWriter.cxx index bf4e8d7d62..3888e725f3 100644 --- a/src/RWGltf/RWGltf_CafWriter.cxx +++ b/src/RWGltf/RWGltf_CafWriter.cxx @@ -19,7 +19,6 @@ #include #include #include -#include #include #include #include @@ -359,10 +358,10 @@ bool RWGltf_CafWriter::writeBinData (const Handle(TDocStd_Document)& theDocument myBinDataMap.Clear(); myBinDataLen64 = 0; - std::ofstream aBinFile; - OSD_OpenStream (aBinFile, myBinFileNameFull.ToCString(), std::ios::out | std::ios::binary); - if (!aBinFile.is_open() - || !aBinFile.good()) + const Handle(OSD_FileSystem)& aFileSystem = OSD_FileSystem::DefaultFileSystem(); + opencascade::std::shared_ptr aBinFile = aFileSystem->OpenOStream (myBinFileNameFull, std::ios::out | std::ios::binary); + if (aBinFile.get() == NULL + || !aBinFile->good()) { Message::SendFail (TCollection_AsciiString ("File '") + myBinFileNameFull + "' can not be created"); return false; @@ -373,7 +372,7 @@ bool RWGltf_CafWriter::writeBinData (const Handle(TDocStd_Document)& theDocument Standard_Integer aNbAccessors = 0; // write positions - myBuffViewPos.ByteOffset = aBinFile.tellp(); + myBuffViewPos.ByteOffset = aBinFile->tellp(); for (XCAFPrs_DocumentExplorer aDocExplorer (theDocument, theRootLabels, XCAFPrs_DocumentExplorerFlags_OnlyLeafNodes); aDocExplorer.More() && aPSentryBin.More(); aDocExplorer.Next()) { @@ -394,9 +393,9 @@ bool RWGltf_CafWriter::writeBinData (const Handle(TDocStd_Document)& theDocument } RWGltf_GltfFace aGltfFace; - saveNodes (aGltfFace, aBinFile, aFaceIter, aNbAccessors); + saveNodes (aGltfFace, *aBinFile, aFaceIter, aNbAccessors); - if (!aBinFile.good()) + if (!aBinFile->good()) { Message::SendFail (TCollection_AsciiString ("File '") + myBinFileNameFull + "' can not be written"); return false; @@ -405,7 +404,7 @@ bool RWGltf_CafWriter::writeBinData (const Handle(TDocStd_Document)& theDocument myBinDataMap.Bind (aFaceIter.Face(), aGltfFace); } } - myBuffViewPos.ByteLength = (int64_t )aBinFile.tellp() - myBuffViewPos.ByteOffset; + myBuffViewPos.ByteLength = (int64_t )aBinFile->tellp() - myBuffViewPos.ByteOffset; if (!aPSentryBin.More()) { return false; @@ -413,7 +412,7 @@ bool RWGltf_CafWriter::writeBinData (const Handle(TDocStd_Document)& theDocument aPSentryBin.Next(); // write normals - myBuffViewNorm.ByteOffset = aBinFile.tellp(); + myBuffViewNorm.ByteOffset = aBinFile->tellp(); for (XCAFPrs_DocumentExplorer aDocExplorer (theDocument, theRootLabels, XCAFPrs_DocumentExplorerFlags_OnlyLeafNodes); aDocExplorer.More() && aPSentryBin.More(); aDocExplorer.Next()) { @@ -436,16 +435,16 @@ bool RWGltf_CafWriter::writeBinData (const Handle(TDocStd_Document)& theDocument continue; } - saveNormals (aGltfFace, aBinFile, aFaceIter, aNbAccessors); + saveNormals (aGltfFace, *aBinFile, aFaceIter, aNbAccessors); - if (!aBinFile.good()) + if (!aBinFile->good()) { Message::SendFail (TCollection_AsciiString ("File '") + myBinFileNameFull + "' can not be written"); return false; } } } - myBuffViewNorm.ByteLength = (int64_t )aBinFile.tellp() - myBuffViewNorm.ByteOffset; + myBuffViewNorm.ByteLength = (int64_t )aBinFile->tellp() - myBuffViewNorm.ByteOffset; if (!aPSentryBin.More()) { return false; @@ -453,7 +452,7 @@ bool RWGltf_CafWriter::writeBinData (const Handle(TDocStd_Document)& theDocument aPSentryBin.Next(); // write texture coordinates - myBuffViewTextCoord.ByteOffset = aBinFile.tellp(); + myBuffViewTextCoord.ByteOffset = aBinFile->tellp(); for (XCAFPrs_DocumentExplorer aDocExplorer (theDocument, theRootLabels, XCAFPrs_DocumentExplorerFlags_OnlyLeafNodes); aDocExplorer.More() && aPSentryBin.More(); aDocExplorer.Next()) { @@ -477,16 +476,16 @@ bool RWGltf_CafWriter::writeBinData (const Handle(TDocStd_Document)& theDocument continue; } - saveTextCoords (aGltfFace, aBinFile, aFaceIter, aNbAccessors); + saveTextCoords (aGltfFace, *aBinFile, aFaceIter, aNbAccessors); - if (!aBinFile.good()) + if (!aBinFile->good()) { Message::SendFail (TCollection_AsciiString ("File '") + myBinFileNameFull + "' can not be written"); return false; } } } - myBuffViewTextCoord.ByteLength = (int64_t )aBinFile.tellp() - myBuffViewTextCoord.ByteOffset; + myBuffViewTextCoord.ByteLength = (int64_t )aBinFile->tellp() - myBuffViewTextCoord.ByteOffset; if (!aPSentryBin.More()) { return false; @@ -494,7 +493,7 @@ bool RWGltf_CafWriter::writeBinData (const Handle(TDocStd_Document)& theDocument aPSentryBin.Next(); // write indices - myBuffViewInd.ByteOffset = aBinFile.tellp(); + myBuffViewInd.ByteOffset = aBinFile->tellp(); for (XCAFPrs_DocumentExplorer aDocExplorer (theDocument, theRootLabels, XCAFPrs_DocumentExplorerFlags_OnlyLeafNodes); aDocExplorer.More() && aPSentryBin.More(); aDocExplorer.Next()) { @@ -518,16 +517,16 @@ bool RWGltf_CafWriter::writeBinData (const Handle(TDocStd_Document)& theDocument continue; } - saveIndices (aGltfFace, aBinFile, aFaceIter, aNbAccessors); + saveIndices (aGltfFace, *aBinFile, aFaceIter, aNbAccessors); - if (!aBinFile.good()) + if (!aBinFile->good()) { Message::SendFail (TCollection_AsciiString ("File '") + myBinFileNameFull + "' can not be written"); return false; } } } - myBuffViewInd.ByteLength = (int64_t )aBinFile.tellp() - myBuffViewInd.ByteOffset; + myBuffViewInd.ByteLength = (int64_t )aBinFile->tellp() - myBuffViewInd.ByteOffset; if (myIsBinary && myToEmbedTexturesInGlb) @@ -551,7 +550,7 @@ bool RWGltf_CafWriter::writeBinData (const Handle(TDocStd_Document)& theDocument continue; } - myMaterialMap->AddGlbImages (aBinFile, aFaceIter.FaceStyle()); + myMaterialMap->AddGlbImages (*aBinFile, aFaceIter.FaceStyle()); } } } @@ -575,13 +574,14 @@ bool RWGltf_CafWriter::writeBinData (const Handle(TDocStd_Document)& theDocument } // myMaterialMap->FlushGlbBufferViews() will put image bufferView's IDs at the end of list - myBinDataLen64 = aBinFile.tellp(); - aBinFile.close(); - if (!aBinFile.good()) + myBinDataLen64 = aBinFile->tellp(); + aBinFile->flush(); + if (!aBinFile->good()) { Message::SendFail (TCollection_AsciiString ("File '") + myBinFileNameFull + "' can not be written"); return false; } + aBinFile.reset(); return true; } @@ -605,10 +605,10 @@ bool RWGltf_CafWriter::writeJson (const Handle(TDocStd_Document)& theDocument, const Standard_Integer aDefSceneId = 0; const TCollection_AsciiString aFileNameGltf = myFile; - std::ofstream aGltfContentFile; - OSD_OpenStream (aGltfContentFile, aFileNameGltf.ToCString(), std::ios::out | std::ios::binary); - if (!aGltfContentFile.is_open() - || !aGltfContentFile.good()) + const Handle(OSD_FileSystem)& aFileSystem = OSD_FileSystem::DefaultFileSystem(); + opencascade::std::shared_ptr aGltfContentFile = aFileSystem->OpenOStream (aFileNameGltf, std::ios::out | std::ios::binary); + if (aGltfContentFile.get() == NULL + || !aGltfContentFile->good()) { Message::SendFail (TCollection_AsciiString ("File '") + aFileNameGltf + "' can not be created"); return false; @@ -621,11 +621,11 @@ bool RWGltf_CafWriter::writeJson (const Handle(TDocStd_Document)& theDocument, uint32_t aContentLength = 0; uint32_t aContentType = 0x4E4F534A; - aGltfContentFile.write (aMagic, 4); - aGltfContentFile.write ((const char* )&aVersion, sizeof(aVersion)); - aGltfContentFile.write ((const char* )&aLength, sizeof(aLength)); - aGltfContentFile.write ((const char* )&aContentLength, sizeof(aContentLength)); - aGltfContentFile.write ((const char* )&aContentType, sizeof(aContentType)); + aGltfContentFile->write (aMagic, 4); + aGltfContentFile->write ((const char* )&aVersion, sizeof(aVersion)); + aGltfContentFile->write ((const char* )&aLength, sizeof(aLength)); + aGltfContentFile->write ((const char* )&aContentLength, sizeof(aContentLength)); + aGltfContentFile->write ((const char* )&aContentType, sizeof(aContentType)); } // Prepare an indexed map of scene nodes (without assemblies) in correct order. @@ -665,7 +665,7 @@ bool RWGltf_CafWriter::writeJson (const Handle(TDocStd_Document)& theDocument, } } - rapidjson::OStreamWrapper aFileStream (aGltfContentFile); + rapidjson::OStreamWrapper aFileStream (*aGltfContentFile); myWriter.reset (new RWGltf_GltfOStreamWriter (aFileStream)); myWriter->StartObject(); @@ -700,32 +700,32 @@ bool RWGltf_CafWriter::writeJson (const Handle(TDocStd_Document)& theDocument, if (!myIsBinary) { - aGltfContentFile.close(); - if (!aGltfContentFile.good()) + aGltfContentFile->flush(); + if (!aGltfContentFile->good()) { Message::SendFail (TCollection_AsciiString ("File '") + aFileNameGltf + "' can not be written"); return false; } + aGltfContentFile.reset(); return true; } - int64_t aContentLen64 = (int64_t )aGltfContentFile.tellp() - 20; + int64_t aContentLen64 = (int64_t )aGltfContentFile->tellp() - 20; while (aContentLen64 % 4 != 0) { - aGltfContentFile.write (" ", 1); + aGltfContentFile->write (" ", 1); ++aContentLen64; } const uint32_t aBinLength = (uint32_t )myBinDataLen64; const uint32_t aBinType = 0x004E4942; - aGltfContentFile.write ((const char*)&aBinLength, 4); - aGltfContentFile.write ((const char*)&aBinType, 4); + aGltfContentFile->write ((const char*)&aBinLength, 4); + aGltfContentFile->write ((const char*)&aBinType, 4); const int64_t aFullLen64 = aContentLen64 + 20 + myBinDataLen64 + 8; if (aFullLen64 < std::numeric_limits::max()) { { - const Handle(OSD_FileSystem)& aFileSystem = OSD_FileSystem::DefaultFileSystem(); opencascade::std::shared_ptr aBinFile = aFileSystem->OpenIStream (myBinFileNameFull, std::ios::in | std::ios::binary); if (aBinFile.get() == NULL || !aBinFile->good()) { @@ -741,7 +741,7 @@ bool RWGltf_CafWriter::writeJson (const Handle(TDocStd_Document)& theDocument, { break; } - aGltfContentFile.write (aBuffer, aReadLen); + aGltfContentFile->write (aBuffer, aReadLen); } } OSD_Path aBinFilePath (myBinFileNameFull); @@ -759,17 +759,17 @@ bool RWGltf_CafWriter::writeJson (const Handle(TDocStd_Document)& theDocument, const uint32_t aLength = (uint32_t )aFullLen64; const uint32_t aContentLength = (uint32_t )aContentLen64; - aGltfContentFile.seekp (8); - aGltfContentFile.write ((const char* )&aLength, 4); - aGltfContentFile.write ((const char* )&aContentLength, 4); + aGltfContentFile->seekp (8); + aGltfContentFile->write ((const char* )&aLength, 4); + aGltfContentFile->write ((const char* )&aContentLength, 4); - aGltfContentFile.close(); - if (!aGltfContentFile.good()) + aGltfContentFile->flush(); + if (!aGltfContentFile->good()) { Message::SendFail (TCollection_AsciiString ("File '") + aFileNameGltf + "' can not be written"); return false; } - + aGltfContentFile.reset(); myWriter.reset(); return true; #else diff --git a/src/StepSelect/StepSelect_WorkLibrary.cxx b/src/StepSelect/StepSelect_WorkLibrary.cxx index b1e136a103..4d9f58934a 100644 --- a/src/StepSelect/StepSelect_WorkLibrary.cxx +++ b/src/StepSelect/StepSelect_WorkLibrary.cxx @@ -26,7 +26,7 @@ #include #include #include -#include +#include #include #include #include @@ -100,10 +100,10 @@ Standard_Boolean StepSelect_WorkLibrary::WriteFile DeclareAndCast(StepData_Protocol,stepro,ctx.Protocol()); if (stepmodel.IsNull() || stepro.IsNull()) return Standard_False; - std::ofstream fout; - OSD_OpenStream(fout,ctx.FileName(),std::ios::out|std::ios::trunc); + const Handle(OSD_FileSystem)& aFileSystem = OSD_FileSystem::DefaultFileSystem(); + opencascade::std::shared_ptr aStream = aFileSystem->OpenOStream (ctx.FileName(), std::ios::out | std::ios::trunc); - if (!fout || !fout.is_open()) { + if (aStream.get() == NULL) { ctx.CCheck(0)->AddFail("Step File could not be created"); sout<<" Step File could not be created : " << ctx.FileName() << std::endl; return 0; } @@ -130,12 +130,13 @@ Standard_Boolean StepSelect_WorkLibrary::WriteFile for (chl.Start(); chl.More(); chl.Next()) ctx.CCheck(chl.Number())->GetMessages(chl.Value()); sout<<" Write "; - Standard_Boolean isGood = SW.Print(fout); + Standard_Boolean isGood = SW.Print (*aStream); sout<<" Done"<flush(); + isGood = aStream->good() && isGood && !errno; + aStream.reset(); if(errno) sout << strerror(errno) << std::endl; return isGood; diff --git a/src/TObjDRAW/TObjDRAW.cxx b/src/TObjDRAW/TObjDRAW.cxx index a42e88f16f..af3e257146 100644 --- a/src/TObjDRAW/TObjDRAW.cxx +++ b/src/TObjDRAW/TObjDRAW.cxx @@ -38,7 +38,6 @@ #include #include #include -#include #include @@ -208,9 +207,9 @@ static Standard_Integer saveModel (Draw_Interpretor& di, Standard_Integer argc, } if (anUseStream) { - std::ofstream aFileStream; - OSD_OpenStream (aFileStream, argv[2], std::ios::out | std::ios::binary); - isSaved = aModel->SaveAs (aFileStream); + const Handle(OSD_FileSystem)& aFileSystem = OSD_FileSystem::DefaultFileSystem(); + opencascade::std::shared_ptr aFileStream = aFileSystem->OpenOStream (argv[2], std::ios::out | std::ios::binary); + isSaved = aModel->SaveAs (*aFileStream); } else isSaved = aModel->SaveAs ( TCollection_ExtendedString (argv[2], Standard_True) ); diff --git a/src/ViewerTest/ViewerTest_OpenGlCommands.cxx b/src/ViewerTest/ViewerTest_OpenGlCommands.cxx index 327320449f..dd42d4a8f5 100644 --- a/src/ViewerTest/ViewerTest_OpenGlCommands.cxx +++ b/src/ViewerTest/ViewerTest_OpenGlCommands.cxx @@ -21,7 +21,7 @@ #include #include #include -#include +#include #include #include @@ -637,23 +637,24 @@ static Standard_Integer VListMaterials (Draw_Interpretor& theDI, Graphic3d_Vec4i (5, 1, 4, 8) }; - std::ofstream aMatFile, anObjFile, anHtmlFile; + const Handle(OSD_FileSystem)& aFileSystem = OSD_FileSystem::DefaultFileSystem(); + opencascade::std::shared_ptr aMatFile, anObjFile, aHtmlFile; if (aDumpFile.EndsWith (".obj") || aDumpFile.EndsWith (".mtl")) { const TCollection_AsciiString aMatFilePath = aDumpFile.SubString (1, aDumpFile.Length() - 3) + "mtl"; const TCollection_AsciiString anObjFilePath = aDumpFile.SubString (1, aDumpFile.Length() - 3) + "obj"; - OSD_OpenStream (aMatFile, aMatFilePath.ToCString(), std::ios::out | std::ios::binary); - if (!aMatFile.is_open()) + aMatFile = aFileSystem->OpenOStream (aMatFilePath, std::ios::out | std::ios::binary); + if (aMatFile.get() == NULL) { Message::SendFail ("Error: unable creating material file"); return 0; } if (!aDumpFile.EndsWith (".mtl")) { - OSD_OpenStream (anObjFile, anObjFilePath.ToCString(), std::ios::out | std::ios::binary); - if (!anObjFile.is_open()) + anObjFile = aFileSystem->OpenOStream (anObjFilePath, std::ios::out | std::ios::binary); + if (anObjFile.get() == NULL) { Message::SendFail ("Error: unable creating OBJ file"); return 0; @@ -661,19 +662,19 @@ static Standard_Integer VListMaterials (Draw_Interpretor& theDI, TCollection_AsciiString anMtlName, aFolder; OSD_Path::FolderAndFileFromPath (aMatFilePath, aFolder, anMtlName); - anObjFile << "mtllib " << anMtlName << "\n"; + *anObjFile << "mtllib " << anMtlName << "\n"; } } else if (aDumpFile.EndsWith (".htm") || aDumpFile.EndsWith (".html")) { - OSD_OpenStream (anHtmlFile, aDumpFile.ToCString(), std::ios::out | std::ios::binary); - if (!anHtmlFile.is_open()) + aHtmlFile = aFileSystem->OpenOStream (aDumpFile, std::ios::out | std::ios::binary); + if (aHtmlFile.get() == NULL) { Message::SendFail ("Error: unable creating HTML file"); return 0; } - anHtmlFile << "\n" + *aHtmlFile << "\n" "OCCT Material table\n" "\n" "\n" @@ -743,45 +744,45 @@ static Standard_Integer VListMaterials (Draw_Interpretor& theDI, const Graphic3d_Vec3 aSpecular = (Graphic3d_Vec3 )aMat.SpecularColor(); const Graphic3d_Vec3 anEmission = (Graphic3d_Vec3 )aMat.EmissiveColor(); const Standard_Real aShiness = aMat.Shininess() * 1000.0; - if (aMatFile.is_open()) + if (aMatFile.get() != NULL) { - aMatFile << "newmtl " << aMatName << "\n"; - aMatFile << "Ka " << Quantity_Color::Convert_LinearRGB_To_sRGB (anAmbient) << "\n"; - aMatFile << "Kd " << Quantity_Color::Convert_LinearRGB_To_sRGB (aDiffuse) << "\n"; - aMatFile << "Ks " << Quantity_Color::Convert_LinearRGB_To_sRGB (aSpecular) << "\n"; - aMatFile << "Ns " << aShiness << "\n"; + *aMatFile << "newmtl " << aMatName << "\n"; + *aMatFile << "Ka " << Quantity_Color::Convert_LinearRGB_To_sRGB (anAmbient) << "\n"; + *aMatFile << "Kd " << Quantity_Color::Convert_LinearRGB_To_sRGB (aDiffuse) << "\n"; + *aMatFile << "Ks " << Quantity_Color::Convert_LinearRGB_To_sRGB (aSpecular) << "\n"; + *aMatFile << "Ns " << aShiness << "\n"; if (aMat.Transparency() >= 0.0001) { - aMatFile << "Tr " << aMat.Transparency() << "\n"; + *aMatFile << "Tr " << aMat.Transparency() << "\n"; } - aMatFile << "\n"; + *aMatFile << "\n"; } - else if (anHtmlFile.is_open()) + else if (aHtmlFile.get() != NULL) { - anHtmlFile << "\n"; - anHtmlFile << "\n"; - anHtmlFile << "\n"; - anHtmlFile << "\n"; - anHtmlFile << "\n"; - anHtmlFile << "\n"; - anHtmlFile << "\n"; - anHtmlFile << "\n"; - anHtmlFile << "\n"; - anHtmlFile << "\n"; - anHtmlFile << "\n"; - anHtmlFile << "\n"; - anHtmlFile << "\n"; - anHtmlFile << "\n"; - anHtmlFile << "\n"; - anHtmlFile << "\n"; - anHtmlFile << "\n"; - anHtmlFile << "\n"; - anHtmlFile << "\n"; - anHtmlFile << "\n"; - anHtmlFile << "\n"; - anHtmlFile << "\n"; - anHtmlFile << "\n"; - anHtmlFile << "\n"; + *aHtmlFile << "\n"; + *aHtmlFile << "\n"; + *aHtmlFile << "\n"; + *aHtmlFile << "\n"; + *aHtmlFile << "\n"; + *aHtmlFile << "\n"; + *aHtmlFile << "\n"; + *aHtmlFile << "\n"; + *aHtmlFile << "\n"; + *aHtmlFile << "\n"; + *aHtmlFile << "\n"; + *aHtmlFile << "\n"; + *aHtmlFile << "\n"; + *aHtmlFile << "\n"; + *aHtmlFile << "\n"; + *aHtmlFile << "\n"; + *aHtmlFile << "\n"; + *aHtmlFile << "\n"; + *aHtmlFile << "\n"; + *aHtmlFile << "\n"; + *aHtmlFile << "\n"; + *aHtmlFile << "\n"; + *aHtmlFile << "\n"; + *aHtmlFile << "\n"; } else { @@ -808,20 +809,20 @@ static Standard_Integer VListMaterials (Draw_Interpretor& theDI, theDI << " RefractionIndex: " << aMat.RefractionIndex() << "\n"; } - if (anObjFile.is_open()) + if (anObjFile.get() != NULL) { - anObjFile << "g " << aMatName << "\n"; - anObjFile << "usemtl " << aMatName << "\n"; + *anObjFile << "g " << aMatName << "\n"; + *anObjFile << "usemtl " << aMatName << "\n"; for (Standard_Integer aVertIter = 0; aVertIter < 8; ++aVertIter) { - anObjFile << "v " << (aBoxVerts[aVertIter] + Graphic3d_Vec3 (3.0f * anX, -3.0f * anY, 0.0f)) << "\n"; + *anObjFile << "v " << (aBoxVerts[aVertIter] + Graphic3d_Vec3 (3.0f * anX, -3.0f * anY, 0.0f)) << "\n"; } - anObjFile << "s off\n"; + *anObjFile << "s off\n"; for (Standard_Integer aFaceIter = 0; aFaceIter < 6; ++aFaceIter) { - anObjFile << "f " << (aBoxQuads[aFaceIter] + Graphic3d_Vec4i (8 * aMatIndex)) << "\n"; + *anObjFile << "f " << (aBoxQuads[aFaceIter] + Graphic3d_Vec4i (8 * aMatIndex)) << "\n"; } - anObjFile << "\n"; + *anObjFile << "\n"; if (++anX > 5) { anX = 0; @@ -830,9 +831,9 @@ static Standard_Integer VListMaterials (Draw_Interpretor& theDI, } } - if (anHtmlFile.is_open()) + if (aHtmlFile.get() != NULL) { - anHtmlFile << "
" << aMat.StringName() << "" << (aMat.MaterialType() == Graphic3d_MATERIAL_PHYSIC ? "PHYSIC" : "ASPECT") << "" << aMat.Transparency() << "" << formatSvgColoredRect (aMat.PBRMaterial().Color().GetRGB()) << (Graphic3d_Vec3 )aMat.PBRMaterial().Color().GetRGB() << "" << aMat.PBRMaterial().Metallic() << "" << aMat.PBRMaterial().NormalizedRoughness() << "" << formatSvgColoredRect (Quantity_Color (aMat.PBRMaterial().Emission())) << aMat.PBRMaterial().Emission() << "" << aMat.PBRMaterial().IOR() << "" << formatSvgColoredRect (Quantity_Color (anAmbient)) << anAmbient << "" << formatSvgColoredRect (Quantity_Color (aDiffuse)) << aDiffuse << "" << formatSvgColoredRect (Quantity_Color (aSpecular)) << aSpecular << "" << formatSvgColoredRect (Quantity_Color (anEmission)) << anEmission << "" << aMat.Shininess() << "" << aMat.BSDF().Kc << "" << aMat.BSDF().Kd << "" << aMat.BSDF().Ks << "" << aMat.BSDF().Kt << "" << aMat.BSDF().Le << "" << aMat.BSDF().Absorption << "" << fresnelModelString (aMat.BSDF().FresnelCoat.FresnelType()) << "" << fresnelModelString (aMat.BSDF().FresnelBase.FresnelType()) << "" << aMat.RefractionIndex() << "
" << aMat.StringName() << "" << (aMat.MaterialType() == Graphic3d_MATERIAL_PHYSIC ? "PHYSIC" : "ASPECT") << "" << aMat.Transparency() << "" << formatSvgColoredRect (aMat.PBRMaterial().Color().GetRGB()) << (Graphic3d_Vec3 )aMat.PBRMaterial().Color().GetRGB() << "" << aMat.PBRMaterial().Metallic() << "" << aMat.PBRMaterial().NormalizedRoughness() << "" << formatSvgColoredRect (Quantity_Color (aMat.PBRMaterial().Emission())) << aMat.PBRMaterial().Emission() << "" << aMat.PBRMaterial().IOR() << "" << formatSvgColoredRect (Quantity_Color (anAmbient)) << anAmbient << "" << formatSvgColoredRect (Quantity_Color (aDiffuse)) << aDiffuse << "" << formatSvgColoredRect (Quantity_Color (aSpecular)) << aSpecular << "" << formatSvgColoredRect (Quantity_Color (anEmission)) << anEmission << "" << aMat.Shininess() << "" << aMat.BSDF().Kc << "" << aMat.BSDF().Kd << "" << aMat.BSDF().Ks << "" << aMat.BSDF().Kt << "" << aMat.BSDF().Le << "" << aMat.BSDF().Absorption << "" << fresnelModelString (aMat.BSDF().FresnelCoat.FresnelType()) << "" << fresnelModelString (aMat.BSDF().FresnelBase.FresnelType()) << "" << aMat.RefractionIndex() << "
\n\n\n"; + *aHtmlFile << "\n\n\n"; } return 0; } @@ -892,7 +893,8 @@ static Standard_Integer VListColors (Draw_Interpretor& theDI, } } - std::ofstream anHtmlFile; + const Handle(OSD_FileSystem)& aFileSystem = OSD_FileSystem::DefaultFileSystem(); + opencascade::std::shared_ptr aHtmlFile; TCollection_AsciiString aFileNameBase, aFolder; if (aDumpFile.EndsWith (".htm") || aDumpFile.EndsWith (".html")) @@ -929,13 +931,13 @@ static Standard_Integer VListColors (Draw_Interpretor& theDI, if (!aDumpFile.IsEmpty()) { - OSD_OpenStream (anHtmlFile, aDumpFile.ToCString(), std::ios::out | std::ios::binary); - if (!anHtmlFile.is_open()) + aHtmlFile = aFileSystem->OpenOStream (aDumpFile, std::ios::out | std::ios::binary); + if (aHtmlFile.get() == NULL) { Message::SendFail ("Error: unable creating HTML file"); return 0; } - anHtmlFile << "\n" + *aHtmlFile << "\n" << "OCCT Color table\n" << "\n" << "\n" @@ -957,7 +959,7 @@ static Standard_Integer VListColors (Draw_Interpretor& theDI, const TCollection_AsciiString aColName = Quantity_Color::StringName (aColIter.Value()); const TCollection_AsciiString anSRgbHex = Quantity_Color::ColorToHex (aCol); const Graphic3d_Vec3i anSRgbInt ((Graphic3d_Vec3 )aCol * 255.0f); - if (anHtmlFile.is_open()) + if (aHtmlFile.get() != NULL) { const TCollection_AsciiString anImgPath = aFileNameBase + "_" + aColName + ".png"; if (!aView.IsNull()) @@ -972,14 +974,14 @@ static Standard_Integer VListColors (Draw_Interpretor& theDI, } } - anHtmlFile << "\n"; - anHtmlFile << "\n"; - anHtmlFile << "\n"; - anHtmlFile << "\n"; - anHtmlFile << "\n"; - anHtmlFile << "\n"; - anHtmlFile << "\n"; - anHtmlFile << "\n"; + *aHtmlFile << "\n"; + *aHtmlFile << "\n"; + *aHtmlFile << "\n"; + *aHtmlFile << "\n"; + *aHtmlFile << "\n"; + *aHtmlFile << "\n"; + *aHtmlFile << "\n"; + *aHtmlFile << "\n"; } else { @@ -994,9 +996,9 @@ static Standard_Integer VListColors (Draw_Interpretor& theDI, ViewerTest::RemoveView (aView); } - if (anHtmlFile.is_open()) + if (aHtmlFile.get() != NULL) { - anHtmlFile << "
       
" << aColName << "
" << anSRgbHex << "
(" << anSRgbInt.r() << " " << anSRgbInt.g() << " " << anSRgbInt.b() << ")(" << aCol.Red() << " " << aCol.Green() << " " << aCol.Blue() << ")
       
" << aColName << "
" << anSRgbHex << "
(" << anSRgbInt.r() << " " << anSRgbInt.g() << " " << anSRgbInt.b() << ")(" << aCol.Red() << " " << aCol.Green() << " " << aCol.Blue() << ")
\n\n\n"; + *aHtmlFile << "\n\n\n"; } return 0; } @@ -1085,20 +1087,19 @@ static Standard_Integer VGenEnvLUT (Draw_Interpretor&, aNbSamples = 1024; } - std::ofstream aFile; + const Handle(OSD_FileSystem)& aFileSystem = OSD_FileSystem::DefaultFileSystem(); + opencascade::std::shared_ptr aFile = aFileSystem->OpenOStream (aFilePath, std::ios::out | std::ios::trunc); - OSD_OpenStream (aFile, aFilePath, std::ios::out | std::ios::binary); - - if (!aFile.good()) + if (aFile.get() == NULL || !aFile->good()) { Message::SendFail() << "Error: unable to write to " << aFilePath; return 1; } - aFile << "//this file has been generated by vgenenvlut draw command\n"; - aFile << "static unsigned int Textures_EnvLUTSize = " << aTableSize << ";\n\n"; - aFile << "static float Textures_EnvLUT[] =\n"; - aFile << "{\n"; + *aFile << "//this file has been generated by vgenenvlut draw command\n"; + *aFile << "static unsigned int Textures_EnvLUTSize = " << aTableSize << ";\n\n"; + *aFile << "static float Textures_EnvLUT[] =\n"; + *aFile << "{\n"; Handle(Image_PixMap) aPixMap = new Image_PixMap(); aPixMap->InitZero (Image_Format_RGF, aTableSize, aTableSize); @@ -1112,44 +1113,43 @@ static Standard_Integer VGenEnvLUT (Draw_Interpretor&, aCounter = 0; for (int x = 0; x < aTableSize; ++x) { - aFile << envLutWriteToFile (aPixMap->Value(aTableSize - 1 - y, x).x()) << ","; - aFile << envLutWriteToFile (aPixMap->Value(aTableSize - 1 - y, x).y()) << ","; + *aFile << envLutWriteToFile (aPixMap->Value(aTableSize - 1 - y, x).x()) << ","; + *aFile << envLutWriteToFile (aPixMap->Value(aTableSize - 1 - y, x).y()) << ","; if (++aCounter % aNumbersInRow == 0) { - aFile << "\n"; + *aFile << "\n"; } else if (x != aTableSize - 1) { - aFile << " "; + *aFile << " "; } } - aFile << "\n"; + *aFile << "\n"; if (aTableSize % aNumbersInRow != 0) { - aFile << "\n"; + *aFile << "\n"; } } aCounter = 0; for (int x = 0; x < aTableSize - 1; ++x) { - aFile << envLutWriteToFile (aPixMap->Value(0, x).x()) << ","; - aFile << envLutWriteToFile (aPixMap->Value(0, x).y()) << ","; + *aFile << envLutWriteToFile (aPixMap->Value(0, x).x()) << ","; + *aFile << envLutWriteToFile (aPixMap->Value(0, x).y()) << ","; if (++aCounter % aNumbersInRow == 0) { - aFile << "\n"; + *aFile << "\n"; } else { - aFile << " "; + *aFile << " "; } } - aFile << envLutWriteToFile (aPixMap->Value(0, aTableSize - 1).x()) << ","; - aFile << envLutWriteToFile (aPixMap->Value(0, aTableSize - 1).y()) << "\n"; + *aFile << envLutWriteToFile (aPixMap->Value(0, aTableSize - 1).x()) << ","; + *aFile << envLutWriteToFile (aPixMap->Value(0, aTableSize - 1).y()) << "\n"; - aFile << "};"; - aFile.close(); + *aFile << "};"; return 0; } diff --git a/src/VrmlAPI/VrmlAPI_Writer.cxx b/src/VrmlAPI/VrmlAPI_Writer.cxx index c4964b5970..9b884a0d38 100644 --- a/src/VrmlAPI/VrmlAPI_Writer.cxx +++ b/src/VrmlAPI/VrmlAPI_Writer.cxx @@ -13,7 +13,7 @@ #include -#include +#include #include #include #include @@ -225,9 +225,9 @@ Standard_Boolean VrmlAPI_Writer::write_v1(const TopoDS_Shape& aShape,const Stand { OSD_Path thePath(aFile); TCollection_AsciiString theFile;thePath.SystemName(theFile); - std::ofstream outfile; - OSD_OpenStream(outfile, theFile.ToCString(), std::ios::out); - if (!outfile) + const Handle(OSD_FileSystem)& aFileSystem = OSD_FileSystem::DefaultFileSystem(); + opencascade::std::shared_ptr anOutFile = aFileSystem->OpenOStream (theFile, std::ios::out); + if (anOutFile.get() == NULL) { return Standard_False; } @@ -308,16 +308,16 @@ Standard_Boolean VrmlAPI_Writer::write_v1(const TopoDS_Shape& aShape,const Stand XUp, YUp, ZUp, Camera, Light); - Vrml::VrmlHeaderWriter(outfile); + Vrml::VrmlHeaderWriter (*anOutFile); if (myRepresentation == VrmlAPI_BothRepresentation) - Vrml::CommentWriter(" This file contents both Shaded and Wire Frame representation of selected Shape ",outfile); + Vrml::CommentWriter(" This file contents both Shaded and Wire Frame representation of selected Shape ", *anOutFile); if (myRepresentation == VrmlAPI_ShadedRepresentation) - Vrml::CommentWriter(" This file contents only Shaded representation of selected Shape ",outfile); + Vrml::CommentWriter(" This file contents only Shaded representation of selected Shape ", *anOutFile); if (myRepresentation == VrmlAPI_WireFrameRepresentation) - Vrml::CommentWriter(" This file contents only Wire Frame representation of selected Shape ",outfile); + Vrml::CommentWriter(" This file contents only Wire Frame representation of selected Shape ", *anOutFile); Vrml_Separator S1; - S1.Print(outfile); - projector->Add(outfile); + S1.Print (*anOutFile); + projector->Add (*anOutFile); Light = VrmlConverter_DirectionLight; Camera = VrmlConverter_OrthographicCamera; Handle(VrmlConverter_Projector) projector1 = new VrmlConverter_Projector (Shapes, @@ -326,32 +326,32 @@ Standard_Boolean VrmlAPI_Writer::write_v1(const TopoDS_Shape& aShape,const Stand XUp, YUp, ZUp, Camera, Light); - projector1->Add(outfile); + projector1->Add (*anOutFile); Vrml_Separator S2; - S2.Print(outfile); + S2.Print (*anOutFile); if ( (myRepresentation == VrmlAPI_ShadedRepresentation || myRepresentation == VrmlAPI_BothRepresentation) && hasTriangles) { Vrml_Group Group1; - Group1.Print(outfile); + Group1.Print (*anOutFile); Vrml_Instancing I2 ("Shaded representation of shape"); - I2.DEF(outfile); - VrmlConverter_ShadedShape::Add(outfile,aShape,myDrawer); - Group1.Print(outfile); + I2.DEF (*anOutFile); + VrmlConverter_ShadedShape::Add (*anOutFile,aShape,myDrawer); + Group1.Print (*anOutFile); } if (myRepresentation == VrmlAPI_WireFrameRepresentation || myRepresentation == VrmlAPI_BothRepresentation) { Vrml_Group Group2; - Group2.Print(outfile); + Group2.Print (*anOutFile); Vrml_Instancing I3 ("Wire Frame representation of shape"); - I3.DEF(outfile); - VrmlConverter_WFDeflectionShape::Add(outfile,aShape,myDrawer); - Group2.Print(outfile); + I3.DEF (*anOutFile); + VrmlConverter_WFDeflectionShape::Add (*anOutFile,aShape,myDrawer); + Group2.Print (*anOutFile); } - S2.Print(outfile); - S1.Print(outfile); + S2.Print (*anOutFile); + S1.Print (*anOutFile); - outfile.close(); - return outfile.good(); + anOutFile->flush(); + return anOutFile->good(); } Standard_Boolean VrmlAPI_Writer::write_v2(const TopoDS_Shape& aShape,const Standard_CString aFile) const @@ -369,15 +369,15 @@ Standard_Boolean VrmlAPI_Writer::write_v2(const TopoDS_Shape& aShape,const Stand aConv.AddShape(aShape); aConv.Convert(anExtFace, anExtEdge); - std::ofstream anOutStream; - OSD_OpenStream(anOutStream, aFile, std::ios::out); - if (anOutStream) + const Handle(OSD_FileSystem)& aFileSystem = OSD_FileSystem::DefaultFileSystem(); + opencascade::std::shared_ptr anOutStream = aFileSystem->OpenOStream (aFile, std::ios::out); + if (anOutStream.get() != NULL) { - anOutStream << aScene; - anOutStream.close(); - return anOutStream.good(); + *anOutStream << aScene; + anOutStream->flush(); + return anOutStream->good(); } - + anOutStream.reset(); return Standard_False; } @@ -394,15 +394,15 @@ Standard_Boolean VrmlAPI_Writer::WriteDoc( VrmlData_ShapeConvert aConv(aScene, theScale); aConv.ConvertDocument(theDoc); - std::ofstream anOutStream; - OSD_OpenStream(anOutStream, theFile, std::ios::out); - if (anOutStream) + const Handle(OSD_FileSystem)& aFileSystem = OSD_FileSystem::DefaultFileSystem(); + opencascade::std::shared_ptr anOutStream = aFileSystem->OpenOStream (theFile, std::ios::out); + if (anOutStream.get() != NULL) { - anOutStream << aScene; - anOutStream.close(); - return anOutStream.good(); + *anOutStream << aScene; + anOutStream->flush(); + return anOutStream->good(); } - + anOutStream.reset(); return Standard_False; } diff --git a/src/XmlLDrivers/XmlLDrivers_DocumentStorageDriver.cxx b/src/XmlLDrivers/XmlLDrivers_DocumentStorageDriver.cxx index 2c7215b806..f1176e6929 100644 --- a/src/XmlLDrivers/XmlLDrivers_DocumentStorageDriver.cxx +++ b/src/XmlLDrivers/XmlLDrivers_DocumentStorageDriver.cxx @@ -24,7 +24,7 @@ #include #include #include -#include +#include #include #include #include @@ -98,12 +98,12 @@ void XmlLDrivers_DocumentStorageDriver::Write (const Handle(CDM_Document)& { myFileName = theFileName; - std::ofstream aFileStream; - OSD_OpenStream (aFileStream, theFileName, std::ios::out); + const Handle(OSD_FileSystem)& aFileSystem = OSD_FileSystem::DefaultFileSystem(); + opencascade::std::shared_ptr aFileStream = aFileSystem->OpenOStream (theFileName, std::ios::out); - if (aFileStream.is_open() && aFileStream.good()) + if (aFileStream.get() != NULL && aFileStream->good()) { - Write (theDocument, aFileStream, theRange); + Write (theDocument, *aFileStream, theRange); } else { From 1b5eb2be231815cf76d379f441ada467ac6e44f7 Mon Sep 17 00:00:00 2001 From: achesnok Date: Wed, 4 Aug 2021 14:37:46 +0300 Subject: [PATCH 005/639] 0026083: Coding Rules - Poor design of Graphic3d_GraduatedTrihedron - Made class Graphic3d_AxisAspect publicly nested in Graphic3d_GraduatedTrihedron. - Removed public PtrView field from trihedron and obtained it from OpenGL_Workspace while rendering. - Made CubicAxesCallback protected and provided corresponding getter/setter. - Renamed AxisAspect() to AxisAspectAt(). --- .../Graphic3d_GraduatedTrihedron.hxx | 127 ++++++++++-------- src/OpenGl/OpenGl_GraduatedTrihedron.cxx | 9 +- src/OpenGl/OpenGl_GraduatedTrihedron.hxx | 3 +- src/OpenGl/OpenGl_View.cxx | 4 +- 4 files changed, 76 insertions(+), 67 deletions(-) diff --git a/src/Graphic3d/Graphic3d_GraduatedTrihedron.hxx b/src/Graphic3d/Graphic3d_GraduatedTrihedron.hxx index 6aee4b3a46..9cbe30c285 100644 --- a/src/Graphic3d/Graphic3d_GraduatedTrihedron.hxx +++ b/src/Graphic3d/Graphic3d_GraduatedTrihedron.hxx @@ -26,19 +26,27 @@ class Graphic3d_CView; -//! Class that stores style for one graduated trihedron axis such as colors, lengths and customization flags. -//! It is used in Graphic3d_GraduatedTrihedron. -class Graphic3d_AxisAspect +//! Defines the class of a graduated trihedron. +//! It contains main style parameters for implementation of graduated trihedron +//! @sa OpenGl_GraduatedTrihedron +class Graphic3d_GraduatedTrihedron { + +public: + + //! Class that stores style for one graduated trihedron axis such as colors, lengths and customization flags. + //! It is used in Graphic3d_GraduatedTrihedron. + class AxisAspect + { public: - Graphic3d_AxisAspect (const TCollection_ExtendedString theName = "", const Quantity_Color theNameColor = Quantity_NOC_BLACK, - const Quantity_Color theColor = Quantity_NOC_BLACK, - const Standard_Integer theValuesOffset = 10, const Standard_Integer theNameOffset = 30, - const Standard_Integer theTickmarksNumber = 5, const Standard_Integer theTickmarksLength = 10, - const Standard_Boolean theToDrawName = Standard_True, - const Standard_Boolean theToDrawValues = Standard_True, - const Standard_Boolean theToDrawTickmarks = Standard_True) + AxisAspect (const TCollection_ExtendedString theName = "", const Quantity_Color theNameColor = Quantity_NOC_BLACK, + const Quantity_Color theColor = Quantity_NOC_BLACK, + const Standard_Integer theValuesOffset = 10, const Standard_Integer theNameOffset = 30, + const Standard_Integer theTickmarksNumber = 5, const Standard_Integer theTickmarksLength = 10, + const Standard_Boolean theToDrawName = Standard_True, + const Standard_Boolean theToDrawValues = Standard_True, + const Standard_Boolean theToDrawTickmarks = Standard_True) : myName (theName), myToDrawName (theToDrawName), myToDrawTickmarks (theToDrawTickmarks), @@ -51,42 +59,42 @@ class Graphic3d_AxisAspect myNameOffset (theNameOffset) { } -public: + public: - void SetName (const TCollection_ExtendedString& theName) { myName = theName; } - const TCollection_ExtendedString& Name() const { return myName; } + void SetName (const TCollection_ExtendedString& theName) { myName = theName; } + const TCollection_ExtendedString& Name() const { return myName; } - Standard_Boolean ToDrawName() const { return myToDrawName; } - void SetDrawName (const Standard_Boolean theToDraw) { myToDrawName = theToDraw; } + Standard_Boolean ToDrawName() const { return myToDrawName; } + void SetDrawName (const Standard_Boolean theToDraw) { myToDrawName = theToDraw; } - Standard_Boolean ToDrawTickmarks() const { return myToDrawTickmarks; } - void SetDrawTickmarks (const Standard_Boolean theToDraw) { myToDrawTickmarks = theToDraw; } + Standard_Boolean ToDrawTickmarks() const { return myToDrawTickmarks; } + void SetDrawTickmarks (const Standard_Boolean theToDraw) { myToDrawTickmarks = theToDraw; } - Standard_Boolean ToDrawValues() const { return myToDrawValues; } - void SetDrawValues (const Standard_Boolean theToDraw) { myToDrawValues = theToDraw; } + Standard_Boolean ToDrawValues() const { return myToDrawValues; } + void SetDrawValues (const Standard_Boolean theToDraw) { myToDrawValues = theToDraw; } - const Quantity_Color& NameColor() const { return myNameColor; } - void SetNameColor (const Quantity_Color& theColor) { myNameColor = theColor; } + const Quantity_Color& NameColor() const { return myNameColor; } + void SetNameColor (const Quantity_Color& theColor) { myNameColor = theColor; } - //! Color of axis and values - const Quantity_Color& Color() const { return myColor; } + //! Color of axis and values + const Quantity_Color& Color() const { return myColor; } - //! Sets color of axis and values - void SetColor (const Quantity_Color& theColor) { myColor = theColor; } + //! Sets color of axis and values + void SetColor (const Quantity_Color& theColor) { myColor = theColor; } - Standard_Integer TickmarksNumber() const { return myTickmarksNumber; } - void SetTickmarksNumber (const Standard_Integer theValue) { myTickmarksNumber = theValue; } + Standard_Integer TickmarksNumber() const { return myTickmarksNumber; } + void SetTickmarksNumber (const Standard_Integer theValue) { myTickmarksNumber = theValue; } - Standard_Integer TickmarksLength() const { return myTickmarksLength; } - void SetTickmarksLength (const Standard_Integer theValue) { myTickmarksLength = theValue; } + Standard_Integer TickmarksLength() const { return myTickmarksLength; } + void SetTickmarksLength (const Standard_Integer theValue) { myTickmarksLength = theValue; } - Standard_Integer ValuesOffset() const { return myValuesOffset; } - void SetValuesOffset (const Standard_Integer theValue) { myValuesOffset = theValue; } + Standard_Integer ValuesOffset() const { return myValuesOffset; } + void SetValuesOffset (const Standard_Integer theValue) { myValuesOffset = theValue; } - Standard_Integer NameOffset() const { return myNameOffset; } - void SetNameOffset (const Standard_Integer theValue) { myNameOffset = theValue; } + Standard_Integer NameOffset() const { return myNameOffset; } + void SetNameOffset (const Standard_Integer theValue) { myNameOffset = theValue; } -protected: + protected: TCollection_ExtendedString myName; @@ -102,13 +110,8 @@ protected: Standard_Integer myValuesOffset; //!< Offset for drawing values Standard_Integer myNameOffset; //!< Offset for drawing name of axis -}; + }; -//! Defines the class of a graduated trihedron. -//! It contains main style parameters for implementation of graduated trihedron -//! @sa OpenGl_GraduatedTrihedron -class Graphic3d_GraduatedTrihedron -{ public: typedef void (*MinMaxValuesCallback) (Graphic3d_CView*); @@ -123,7 +126,8 @@ public: const Font_FontAspect& theValuesStyle = Font_FA_Regular, const Standard_Integer theValuesSize = 12, const Standard_ShortReal theArrowsLength = 30.0f, const Quantity_Color theGridColor = Quantity_NOC_WHITE, const Standard_Boolean theToDrawGrid = Standard_True, const Standard_Boolean theToDrawAxes = Standard_True) - : myNamesFont (theNamesFont), + : myCubicAxesCallback (NULL), + myNamesFont (theNamesFont), myNamesStyle (theNamesStyle), myNamesSize (theNamesSize), myValuesFont (theValuesFont), @@ -135,29 +139,28 @@ public: myToDrawAxes (theToDrawAxes), myAxes(0, 2) { - myAxes (0) = Graphic3d_AxisAspect ("X", Quantity_NOC_RED, Quantity_NOC_RED); - myAxes (1) = Graphic3d_AxisAspect ("Y", Quantity_NOC_GREEN, Quantity_NOC_GREEN); - myAxes (2) = Graphic3d_AxisAspect ("Z", Quantity_NOC_BLUE1, Quantity_NOC_BLUE1); - PtrView = NULL; + myAxes (0) = AxisAspect ("X", Quantity_NOC_RED, Quantity_NOC_RED); + myAxes (1) = AxisAspect ("Y", Quantity_NOC_GREEN, Quantity_NOC_GREEN); + myAxes (2) = AxisAspect ("Z", Quantity_NOC_BLUE1, Quantity_NOC_BLUE1); } public: - Graphic3d_AxisAspect& ChangeXAxisAspect() { return myAxes(0); } - Graphic3d_AxisAspect& ChangeYAxisAspect() { return myAxes(1); } - Graphic3d_AxisAspect& ChangeZAxisAspect() { return myAxes(2); } + AxisAspect& ChangeXAxisAspect() { return myAxes(0); } + AxisAspect& ChangeYAxisAspect() { return myAxes(1); } + AxisAspect& ChangeZAxisAspect() { return myAxes(2); } - Graphic3d_AxisAspect& ChangeAxisAspect (const Standard_Integer theIndex) + AxisAspect& ChangeAxisAspect (const Standard_Integer theIndex) { Standard_OutOfRange_Raise_if (theIndex < 0 || theIndex > 2, "Graphic3d_GraduatedTrihedron::ChangeAxisAspect: theIndex is out of bounds [0,2]."); return myAxes (theIndex); } - const Graphic3d_AxisAspect& XAxisAspect() const { return myAxes(0); } - const Graphic3d_AxisAspect& YAxisAspect() const { return myAxes(1); } - const Graphic3d_AxisAspect& ZAxisAspect() const { return myAxes(2); } + const AxisAspect& XAxisAspect() const { return myAxes(0); } + const AxisAspect& YAxisAspect() const { return myAxes(1); } + const AxisAspect& ZAxisAspect() const { return myAxes(2); } - const Graphic3d_AxisAspect& AxisAspect (const Standard_Integer theIndex) const + const AxisAspect& AxisAspectAt (const Standard_Integer theIndex) const { Standard_OutOfRange_Raise_if (theIndex < 0 || theIndex > 2, "Graphic3d_GraduatedTrihedron::AxisAspect: theIndex is out of bounds [0,2]."); return myAxes (theIndex); @@ -193,13 +196,21 @@ public: Standard_Integer ValuesSize() const { return myValuesSize; } void SetValuesSize (const Standard_Integer theValue) { myValuesSize = theValue; } -public: - - MinMaxValuesCallback CubicAxesCallback; //!< Callback function to define boundary box of displayed objects - Graphic3d_CView* PtrView; + Standard_Boolean CubicAxesCallback(Graphic3d_CView* theView) const + { + if (myCubicAxesCallback != NULL) + { + myCubicAxesCallback (theView); + return Standard_True; + } + return Standard_False; + } + void SetCubicAxesCallback (const MinMaxValuesCallback theCallback) { myCubicAxesCallback = theCallback; } protected: + MinMaxValuesCallback myCubicAxesCallback; //!< Callback function to define boundary box of displayed objects + TCollection_AsciiString myNamesFont; //!< Font name of names of axes: Courier, Arial, ... Font_FontAspect myNamesStyle; //!< Style of names of axes: OSD_FA_Regular, OSD_FA_Bold,.. Standard_Integer myNamesSize; //!< Size of names of axes: 8, 10,.. @@ -218,7 +229,7 @@ protected: Standard_Boolean myToDrawGrid; Standard_Boolean myToDrawAxes; - NCollection_Array1 myAxes; //!< X, Y and Z axes parameters + NCollection_Array1 myAxes; //!< X, Y and Z axes parameters }; #endif // Graphic3d_GraduatedTrihedron_HeaderFile diff --git a/src/OpenGl/OpenGl_GraduatedTrihedron.cxx b/src/OpenGl/OpenGl_GraduatedTrihedron.cxx index d599a153e2..813f840185 100755 --- a/src/OpenGl/OpenGl_GraduatedTrihedron.cxx +++ b/src/OpenGl/OpenGl_GraduatedTrihedron.cxx @@ -355,7 +355,7 @@ void OpenGl_GraduatedTrihedron::renderGridPlane (const Handle(OpenGl_Workspace)& const GridAxes& theGridAxes, OpenGl_Mat4& theMat) const { - const Graphic3d_AxisAspect& aCurAspect = myData.AxisAspect (theIndex); + const Graphic3d_GraduatedTrihedron::AxisAspect& aCurAspect = myData.AxisAspectAt (theIndex); if (aCurAspect.TickmarksNumber() <= 0) { return; @@ -475,7 +475,7 @@ void OpenGl_GraduatedTrihedron::renderTickmarkLabels (const Handle(OpenGl_Worksp const GridAxes& theGridAxes, const Standard_ShortReal theDpix) const { - const Graphic3d_AxisAspect& aCurAspect = myData.AxisAspect (theIndex); + const Graphic3d_GraduatedTrihedron::AxisAspect& aCurAspect = myData.AxisAspectAt (theIndex); if (!aCurAspect.ToDrawName() && !aCurAspect.ToDrawValues()) { return; @@ -566,9 +566,8 @@ void OpenGl_GraduatedTrihedron::Render (const Handle(OpenGl_Workspace)& theWorks OpenGl_Vec3 anOldMin = myMin; OpenGl_Vec3 anOldMax = myMax; - if (myData.CubicAxesCallback) + if (myData.CubicAxesCallback(theWorkspace->View())) { - myData.CubicAxesCallback (myData.PtrView); if (!myAxes[0].Line.IsInitialized() || !myAxes[1].Line.IsInitialized() || !myAxes[2].Line.IsInitialized() @@ -719,7 +718,7 @@ void OpenGl_GraduatedTrihedron::SetMinMax (const OpenGl_Vec3& theMin, const Open // method : OpenGl_GraduatedTrihedron::Axis constructor // purpose : // ======================================================================= -OpenGl_GraduatedTrihedron::Axis::Axis (const Graphic3d_AxisAspect& theAspect, +OpenGl_GraduatedTrihedron::Axis::Axis (const Graphic3d_GraduatedTrihedron::AxisAspect& theAspect, const OpenGl_Vec3& theDirection) : Direction (theDirection), Tickmark (NULL), diff --git a/src/OpenGl/OpenGl_GraduatedTrihedron.hxx b/src/OpenGl/OpenGl_GraduatedTrihedron.hxx index c18c94efc6..68dad06789 100755 --- a/src/OpenGl/OpenGl_GraduatedTrihedron.hxx +++ b/src/OpenGl/OpenGl_GraduatedTrihedron.hxx @@ -81,7 +81,8 @@ private: public: - Axis (const Graphic3d_AxisAspect& theAspect = Graphic3d_AxisAspect(), + Axis (const Graphic3d_GraduatedTrihedron::AxisAspect& theAspect = + Graphic3d_GraduatedTrihedron::AxisAspect(), const OpenGl_Vec3& theDirection = OpenGl_Vec3 (1.0f, 0.0f, 0.0f)); ~Axis(); diff --git a/src/OpenGl/OpenGl_View.cxx b/src/OpenGl/OpenGl_View.cxx index 4e3293828f..bc45b81c19 100644 --- a/src/OpenGl/OpenGl_View.cxx +++ b/src/OpenGl/OpenGl_View.cxx @@ -433,8 +433,7 @@ static void SetMinMaxValuesCallback (Graphic3d_CView* theView) void OpenGl_View::GraduatedTrihedronDisplay (const Graphic3d_GraduatedTrihedron& theTrihedronData) { myGTrihedronData = theTrihedronData; - myGTrihedronData.PtrView = this; - myGTrihedronData.CubicAxesCallback = SetMinMaxValuesCallback; + myGTrihedronData.SetCubicAxesCallback (SetMinMaxValuesCallback); myGraduatedTrihedron.SetValues (myGTrihedronData); myToShowGradTrihedron = true; } @@ -445,7 +444,6 @@ void OpenGl_View::GraduatedTrihedronDisplay (const Graphic3d_GraduatedTrihedron& // ======================================================================= void OpenGl_View::GraduatedTrihedronErase() { - myGTrihedronData.PtrView = NULL; myGraduatedTrihedron.Release (myWorkspace->GetGlContext().operator->()); myToShowGradTrihedron = false; } From f227f3dc9686d07cadf6f8d55c0b9392a49d581e Mon Sep 17 00:00:00 2001 From: kgv Date: Fri, 6 Aug 2021 16:13:58 +0300 Subject: [PATCH 006/639] 0032523: Draw Harness, ViewerTest - vrepaint -continuous has no effect ViewerTest_ContinuousRedrawer now explicitly invalidates V3d_View content in addition to emitting window content redrawing request. "vrepaint -continuous" now tries to avoid creation of dedicated thread on Windows platform and relies on AIS_ViewController::SetContinuousRedraw(). --- src/AIS/AIS_ViewController.cxx | 5 ++++ src/AIS/AIS_ViewController.hxx | 8 ++++++ .../ViewerTest_ContinuousRedrawer.cxx | 25 +++++++++++-------- .../ViewerTest_ContinuousRedrawer.hxx | 7 +++--- src/ViewerTest/ViewerTest_EventManager.cxx | 2 +- src/ViewerTest/ViewerTest_ViewerCommands.cxx | 20 ++++++++++++--- 6 files changed, 48 insertions(+), 19 deletions(-) diff --git a/src/AIS/AIS_ViewController.cxx b/src/AIS/AIS_ViewController.cxx index 009d7ce651..76b04e285b 100644 --- a/src/AIS/AIS_ViewController.cxx +++ b/src/AIS/AIS_ViewController.cxx @@ -37,6 +37,7 @@ AIS_ViewController::AIS_ViewController() : myLastEventsTime (0.0), myToAskNextFrame (false), + myIsContinuousRedraw(false), myMinCamDistance (1.0), myRotationMode (AIS_RotationMode_BndBoxActive), myNavigationMode (AIS_NavigationMode_Orbit), @@ -2943,6 +2944,10 @@ void AIS_ViewController::handleViewRedraw (const Handle(AIS_InteractiveContext)& setAskNextFrame(); } + if (myIsContinuousRedraw) + { + myToAskNextFrame = true; + } if (theView->View()->IsActiveXR()) { // VR requires continuous rendering diff --git a/src/AIS/AIS_ViewController.hxx b/src/AIS/AIS_ViewController.hxx index 8187275546..7d8e0fc50d 100644 --- a/src/AIS/AIS_ViewController.hxx +++ b/src/AIS/AIS_ViewController.hxx @@ -77,6 +77,13 @@ public: //! Interrupt active view animation. Standard_EXPORT void AbortViewAnimation(); + //! Return TRUE if continuous redrawing is enabled; FALSE by default. + //! This option would request a next viewer frame to be completely redrawn right after current frame is finished. + bool IsContinuousRedraw() const { return myIsContinuousRedraw; } + + //! Enable or disable continuous updates. + void SetContinuousRedraw (bool theToEnable) { myIsContinuousRedraw = theToEnable; } + public: //! @name global parameters //! Return camera rotation mode, AIS_RotationMode_BndBoxActive by default. @@ -679,6 +686,7 @@ protected: Standard_Real myLastEventsTime; //!< last fetched events timer value for computing delta/progress Standard_Boolean myToAskNextFrame; //!< flag indicating that another frame should be drawn right after this one + Standard_Boolean myIsContinuousRedraw; //!< continuous redrawing (without immediate rendering optimization) Standard_Real myMinCamDistance; //!< minimal camera distance for zoom operation AIS_RotationMode myRotationMode; //!< rotation mode diff --git a/src/ViewerTest/ViewerTest_ContinuousRedrawer.cxx b/src/ViewerTest/ViewerTest_ContinuousRedrawer.cxx index 40fe4feeb5..b134db5996 100644 --- a/src/ViewerTest/ViewerTest_ContinuousRedrawer.cxx +++ b/src/ViewerTest/ViewerTest_ContinuousRedrawer.cxx @@ -17,6 +17,7 @@ #include #include #include +#include // ======================================================================= // function : Instance @@ -55,14 +56,14 @@ ViewerTest_ContinuousRedrawer::~ViewerTest_ContinuousRedrawer() // function : Start // purpose : // ======================================================================= -void ViewerTest_ContinuousRedrawer::Start (const Handle(Aspect_Window)& theWindow, +void ViewerTest_ContinuousRedrawer::Start (const Handle(V3d_View)& theView, Standard_Real theTargetFps) { - if (myWindow != theWindow + if (myView != theView || myTargetFps != theTargetFps) { Stop(); - myWindow = theWindow; + myView = theView; myTargetFps = theTargetFps; } @@ -84,13 +85,13 @@ void ViewerTest_ContinuousRedrawer::Start (const Handle(Aspect_Window)& theWindo } // ======================================================================= -// function : Start +// function : Stop // purpose : // ======================================================================= -void ViewerTest_ContinuousRedrawer::Stop (const Handle(Aspect_Window)& theWindow) +void ViewerTest_ContinuousRedrawer::Stop (const Handle(V3d_View)& theView) { - if (!theWindow.IsNull() - && myWindow != theWindow) + if (!theView.IsNull() + && myView != theView) { return; } @@ -103,11 +104,11 @@ void ViewerTest_ContinuousRedrawer::Stop (const Handle(Aspect_Window)& theWindow myWakeEvent.Set(); myThread.Wait(); myToStop = false; - myWindow.Nullify(); + myView.Nullify(); } // ======================================================================= -// function : doThreadLoop +// function : Pause // purpose : // ======================================================================= void ViewerTest_ContinuousRedrawer::Pause() @@ -153,13 +154,15 @@ void ViewerTest_ContinuousRedrawer::doThreadLoop() const Standard_Real aDuration = aTimeNew - aTimeOld; if (aDuration >= aTargetDur) { - myWindow->InvalidateContent (aDisp); + myView->Invalidate(); + myView->Window()->InvalidateContent (aDisp); aTimeOld = aTimeNew; } } else { - myWindow->InvalidateContent (aDisp); + myView->Invalidate(); + myView->Window()->InvalidateContent (aDisp); } OSD::MilliSecSleep (1); diff --git a/src/ViewerTest/ViewerTest_ContinuousRedrawer.hxx b/src/ViewerTest/ViewerTest_ContinuousRedrawer.hxx index 5b15ed1ff2..4b2d2b7479 100644 --- a/src/ViewerTest/ViewerTest_ContinuousRedrawer.hxx +++ b/src/ViewerTest/ViewerTest_ContinuousRedrawer.hxx @@ -20,6 +20,7 @@ #include class Aspect_Window; +class V3d_View; //! Auxiliary tool performing continuous redraws of specified window. //! Tool creates an extra working thread pushing content invalidation messages to specific window using Aspect_Window::InvalidateContent() method. @@ -39,11 +40,11 @@ public: bool IsStarted() const { return myThread.GetId() != 0; } //! Start thread. - Standard_EXPORT void Start (const Handle(Aspect_Window)& theWindow, + Standard_EXPORT void Start (const Handle(V3d_View)& theView, Standard_Real theTargetFps); //! Stop thread. - Standard_EXPORT void Stop (const Handle(Aspect_Window)& theWindow = NULL); + Standard_EXPORT void Stop (const Handle(V3d_View)& theView = NULL); //! Return TRUE if redrawer thread is in paused state. bool IsPaused() const { return myToPause; } @@ -68,7 +69,7 @@ private: ViewerTest_ContinuousRedrawer(); private: - Handle(Aspect_Window) myWindow; //!< window to invalidate + Handle(V3d_View) myView; //!< view to invalidate OSD_Thread myThread; //!< working thread Standard_Mutex myMutex; //!< mutex for accessing common variables Standard_Condition myWakeEvent; //!< event to wake up working thread diff --git a/src/ViewerTest/ViewerTest_EventManager.cxx b/src/ViewerTest/ViewerTest_EventManager.cxx index 4e8673be5a..e22e72981b 100644 --- a/src/ViewerTest/ViewerTest_EventManager.cxx +++ b/src/ViewerTest/ViewerTest_EventManager.cxx @@ -197,7 +197,7 @@ void ViewerTest_EventManager::handleViewRedraw (const Handle(AIS_InteractiveCont { myIsTmpContRedraw = true; #if !defined(_WIN32) && !defined(__EMSCRIPTEN__) - aRedrawer.Start (theView->Window(), 60.0); + aRedrawer.Start (theView, 60.0); #endif } diff --git a/src/ViewerTest/ViewerTest_ViewerCommands.cxx b/src/ViewerTest/ViewerTest_ViewerCommands.cxx index 534f07e332..67870df603 100644 --- a/src/ViewerTest/ViewerTest_ViewerCommands.cxx +++ b/src/ViewerTest/ViewerTest_ViewerCommands.cxx @@ -2668,7 +2668,7 @@ void ViewerTest::RemoveView (const TCollection_AsciiString& theViewName, const S Handle(V3d_View) aView = ViewerTest_myViews.Find1(theViewName); Handle(AIS_InteractiveContext) aCurrentContext = FindContextByView(aView); ViewerTest_ContinuousRedrawer& aRedrawer = ViewerTest_ContinuousRedrawer::Instance(); - aRedrawer.Stop (aView->Window()); + aRedrawer.Stop (aView); // Remove view resources ViewerTest_myViews.UnBind1(theViewName); @@ -2683,7 +2683,7 @@ void ViewerTest::RemoveView (const TCollection_AsciiString& theViewName, const S // unused empty contexts if (!aCurrentContext.IsNull()) { - // Check if there are more difined views in the viewer + // Check if there are more defined views in the viewer if ((isContextRemoved || ViewerTest_myContexts.Size() != 1) && aCurrentContext->CurrentViewer()->DefinedViews().IsEmpty()) { @@ -3703,9 +3703,21 @@ static int VRepaint (Draw_Interpretor& , Standard_Integer theArgNb, const char** } ViewerTest_ContinuousRedrawer& aRedrawer = ViewerTest_ContinuousRedrawer::Instance(); - if (Abs (aFps) >= 1.0) + ViewerTest::CurrentEventManager()->SetContinuousRedraw (false); + if (aFps >= 1.0) { - aRedrawer.Start (aView->Window(), aFps); + aRedrawer.Start (aView, aFps); + } + else if (aFps < 0.0) + { + if (ViewerTest::GetViewerFromContext()->ActiveViews().Extent() == 1) + { + aRedrawer.Stop(); + ViewerTest::CurrentEventManager()->SetContinuousRedraw (true); + ViewerTest::CurrentEventManager()->FlushViewEvents (ViewerTest::GetAISContext(), ViewerTest::CurrentView(), true); + continue; + } + aRedrawer.Start (aView, aFps); } else { From 45fc824bac0003fa61a58c24af169e9a3deb7197 Mon Sep 17 00:00:00 2001 From: achesnok Date: Thu, 29 Jul 2021 13:28:19 +0300 Subject: [PATCH 007/639] 0031220: Visualization - remove internal field of viewer selector in context - Removed myMainSel field from AIS_InteractiveContext and obtained this value from mgrSelector. - Moved SelectMgr_ViewerSelector3d implementation into SelectMgr_ViewerSelector to get rid of redundant separation and extra DownCast's. - Declared SelectMgr_ViewerSelector3d as deprecated. --- src/AIS/AIS_InteractiveContext.cxx | 73 +++-- src/AIS/AIS_InteractiveContext.hxx | 5 +- src/SelectMgr/FILES | 1 - .../SelectMgr_SelectionImageFiller.hxx | 2 +- src/SelectMgr/SelectMgr_ViewerSelector.cxx | 238 ++++++++++++++- src/SelectMgr/SelectMgr_ViewerSelector.hxx | 75 ++++- src/SelectMgr/SelectMgr_ViewerSelector3d.cxx | 283 ------------------ src/SelectMgr/SelectMgr_ViewerSelector3d.hxx | 81 +---- src/StdSelect/StdSelect_ViewerSelector3d.hxx | 4 +- 9 files changed, 348 insertions(+), 414 deletions(-) delete mode 100644 src/SelectMgr/SelectMgr_ViewerSelector3d.cxx diff --git a/src/AIS/AIS_InteractiveContext.cxx b/src/AIS/AIS_InteractiveContext.cxx index c45cdad69f..0f712b50e2 100644 --- a/src/AIS/AIS_InteractiveContext.cxx +++ b/src/AIS/AIS_InteractiveContext.cxx @@ -31,7 +31,6 @@ #include #include #include -#include #include #include #include @@ -110,7 +109,6 @@ namespace AIS_InteractiveContext::AIS_InteractiveContext(const Handle(V3d_Viewer)& MainViewer): myMainPM (new PrsMgr_PresentationManager (MainViewer->StructureManager())), myMainVwr(MainViewer), -myMainSel(new StdSelect_ViewerSelector3d()), myToHilightSelected(Standard_True), mySelection(new AIS_Selection()), myFilters (new SelectMgr_AndOrFilter(SelectMgr_FilterType_OR)), @@ -121,7 +119,7 @@ myPickingStrategy (SelectMgr_PickingStrategy_FirstAcceptable), myAutoHilight(Standard_True), myIsAutoActivateSelMode(Standard_True) { - mgrSelector = new SelectMgr_SelectionManager (myMainSel); + mgrSelector = new SelectMgr_SelectionManager (new StdSelect_ViewerSelector3d()); myStyles[Prs3d_TypeOfHighlight_None] = myDefaultDrawer; myStyles[Prs3d_TypeOfHighlight_Selected] = new Prs3d_Drawer(); @@ -1867,7 +1865,7 @@ void AIS_InteractiveContext::ClearGlobal (const Handle(AIS_InteractiveObject)& t // Object removes from Detected sequence for (Standard_Integer aDetIter = myDetectedSeq.Lower(); aDetIter <= myDetectedSeq.Upper();) { - Handle(SelectMgr_EntityOwner) aPicked = myMainSel->Picked (myDetectedSeq (aDetIter)); + Handle(SelectMgr_EntityOwner) aPicked = MainSelector()->Picked (myDetectedSeq (aDetIter)); Handle(AIS_InteractiveObject) anObj; if (!aPicked.IsNull()) { @@ -1970,7 +1968,7 @@ Standard_Boolean AIS_InteractiveContext::ClearDetected (Standard_Boolean theToRe clearDynamicHighlight(); } myLastPicked.Nullify(); - myMainSel->ClearPicked(); + MainSelector()->ClearPicked(); if (toUpdate && theToRedrawImmediate) { myMainVwr->RedrawImmediate(); @@ -2023,7 +2021,7 @@ Standard_Integer AIS_InteractiveContext::IsoNumber (const AIS_TypeOfIso theType) //======================================================================= void AIS_InteractiveContext::SetPixelTolerance (const Standard_Integer thePrecision) { - myMainSel->SetPixelTolerance (thePrecision); + MainSelector()->SetPixelTolerance (thePrecision); } //======================================================================= @@ -2032,7 +2030,7 @@ void AIS_InteractiveContext::SetPixelTolerance (const Standard_Integer thePrecis //======================================================================= Standard_Integer AIS_InteractiveContext::PixelTolerance() const { - return myMainSel->PixelTolerance(); + return MainSelector()->PixelTolerance(); } //======================================================================= @@ -2164,7 +2162,7 @@ Graphic3d_ZLayerId AIS_InteractiveContext::GetZLayer (const Handle(AIS_Interacti //======================================================================= void AIS_InteractiveContext::RebuildSelectionStructs() { - myMainSel->RebuildObjectsTree (Standard_True); + MainSelector()->RebuildObjectsTree (Standard_True); } //======================================================================= @@ -2613,7 +2611,7 @@ AIS_StatusOfDetection AIS_InteractiveContext::MoveTo (const Standard_Integer th { throw Standard_ProgramError ("AIS_InteractiveContext::MoveTo() - invalid argument"); } - myMainSel->Pick (theXPix, theYPix, theView); + MainSelector()->Pick (theXPix, theYPix, theView); return moveTo (theView, theToRedrawOnUpdate); } @@ -2629,7 +2627,7 @@ AIS_StatusOfDetection AIS_InteractiveContext::MoveTo (const gp_Ax1& theAxis, { throw Standard_ProgramError ("AIS_InteractiveContext::MoveTo() - invalid argument"); } - myMainSel->Pick (theAxis, theView); + MainSelector()->Pick (theAxis, theView); return moveTo (theView, theToRedrawOnUpdate); } @@ -2653,12 +2651,12 @@ AIS_StatusOfDetection AIS_InteractiveContext::moveTo (const Handle(V3d_View)& th // filling of myAISDetectedSeq sequence storing information about detected AIS objects // (the objects must be AIS_Shapes) - const Standard_Integer aDetectedNb = myMainSel->NbPicked(); + const Standard_Integer aDetectedNb = MainSelector()->NbPicked(); Standard_Integer aNewDetected = 0; Standard_Boolean toIgnoreDetTop = Standard_False; for (Standard_Integer aDetIter = 1; aDetIter <= aDetectedNb; ++aDetIter) { - Handle(SelectMgr_EntityOwner) anOwner = myMainSel->Picked (aDetIter); + Handle(SelectMgr_EntityOwner) anOwner = MainSelector()->Picked (aDetIter); if (anOwner.IsNull() || !myFilters->IsOk (anOwner)) { @@ -2688,7 +2686,7 @@ AIS_StatusOfDetection AIS_InteractiveContext::moveTo (const Handle(V3d_View)& th // selection in current selection mode. It is necessary to check the current detected // entity and hilight it only if the detected entity is not the same as // previous detected (IsForcedHilight call) - Handle(SelectMgr_EntityOwner) aNewPickedOwner = myMainSel->Picked (aNewDetected); + Handle(SelectMgr_EntityOwner) aNewPickedOwner = MainSelector()->Picked (aNewDetected); if (aNewPickedOwner == myLastPicked && !aNewPickedOwner->IsForcedHilight()) { return myLastPicked->IsSelected() @@ -2809,15 +2807,15 @@ AIS_StatusOfPick AIS_InteractiveContext::SelectRectangle (const Graphic3d_Vec2i& } myLastActiveView = theView.get(); - myMainSel->Pick (thePntMin.x(), thePntMin.y(), thePntMax.x(), thePntMax.y(), theView); + MainSelector()->Pick (thePntMin.x(), thePntMin.y(), thePntMax.x(), thePntMax.y(), theView); AIS_NArray1OfEntityOwner aPickedOwners; - if (myMainSel->NbPicked() > 0) + if (MainSelector()->NbPicked() > 0) { - aPickedOwners.Resize (1, myMainSel->NbPicked(), false); - for (Standard_Integer aPickIter = 1; aPickIter <= myMainSel->NbPicked(); ++aPickIter) + aPickedOwners.Resize (1, MainSelector()->NbPicked(), false); + for (Standard_Integer aPickIter = 1; aPickIter <= MainSelector()->NbPicked(); ++aPickIter) { - aPickedOwners.SetValue (aPickIter, myMainSel->Picked (aPickIter)); + aPickedOwners.SetValue (aPickIter, MainSelector()->Picked (aPickIter)); } } @@ -2838,15 +2836,15 @@ AIS_StatusOfPick AIS_InteractiveContext::SelectPolygon (const TColgp_Array1OfPnt } myLastActiveView = theView.get(); - myMainSel->Pick (thePolyline, theView); + MainSelector()->Pick (thePolyline, theView); AIS_NArray1OfEntityOwner aPickedOwners; - if (myMainSel->NbPicked() > 0) + if (MainSelector()->NbPicked() > 0) { - aPickedOwners.Resize (1, myMainSel->NbPicked(), false); - for (Standard_Integer aPickIter = 1; aPickIter <= myMainSel->NbPicked(); ++aPickIter) + aPickedOwners.Resize (1, MainSelector()->NbPicked(), false); + for (Standard_Integer aPickIter = 1; aPickIter <= MainSelector()->NbPicked(); ++aPickIter) { - aPickedOwners.SetValue (aPickIter, myMainSel->Picked (aPickIter)); + aPickedOwners.SetValue (aPickIter, MainSelector()->Picked (aPickIter)); } } @@ -2867,15 +2865,15 @@ AIS_StatusOfPick AIS_InteractiveContext::SelectPoint (const Graphic3d_Vec2i& } myLastActiveView = theView.get(); - myMainSel->Pick (thePnt.x(), thePnt.y(), theView); + MainSelector()->Pick (thePnt.x(), thePnt.y(), theView); AIS_NArray1OfEntityOwner aPickedOwners; - if (myMainSel->NbPicked() > 0) + if (MainSelector()->NbPicked() > 0) { - aPickedOwners.Resize (1, myMainSel->NbPicked(), false); - for (Standard_Integer aPickIter = 1; aPickIter <= myMainSel->NbPicked(); ++aPickIter) + aPickedOwners.Resize (1, MainSelector()->NbPicked(), false); + for (Standard_Integer aPickIter = 1; aPickIter <= MainSelector()->NbPicked(); ++aPickIter) { - aPickedOwners.SetValue (aPickIter, myMainSel->Picked (aPickIter)); + aPickedOwners.SetValue (aPickIter, MainSelector()->Picked (aPickIter)); } } @@ -2891,7 +2889,7 @@ AIS_StatusOfPick AIS_InteractiveContext::SelectDetected (const AIS_SelectionSche if (theSelScheme == AIS_SelectionScheme_Replace && !myLastPicked.IsNull()) { Graphic3d_Vec2i aMousePos (-1, -1); - gp_Pnt2d aMouseRealPos = myMainSel->GetManager().GetMousePosition(); + gp_Pnt2d aMouseRealPos = MainSelector()->GetManager().GetMousePosition(); if (!Precision::IsInfinite (aMouseRealPos.X()) && !Precision::IsInfinite (aMouseRealPos.Y())) { @@ -3030,7 +3028,7 @@ AIS_StatusOfPick AIS_InteractiveContext::Select (const AIS_NArray1OfEntityOwner& } } - mySelection->SelectOwners (theOwners, theSelScheme, myMainSel->GetManager().IsOverlapAllowed(), myFilters); + mySelection->SelectOwners (theOwners, theSelScheme, MainSelector()->GetManager().IsOverlapAllowed(), myFilters); if (myAutoHilight) { @@ -3612,7 +3610,7 @@ Standard_Integer AIS_InteractiveContext::HilightNextDetected (const Handle(V3d_V { myCurHighlighted = myDetectedSeq.Lower(); } - const Handle(SelectMgr_EntityOwner)& anOwner = myMainSel->Picked (myDetectedSeq (myCurHighlighted)); + const Handle(SelectMgr_EntityOwner)& anOwner = MainSelector()->Picked (myDetectedSeq (myCurHighlighted)); if (anOwner.IsNull()) { return 0; @@ -3647,7 +3645,7 @@ Standard_Integer AIS_InteractiveContext::HilightPreviousDetected (const Handle(V { myCurHighlighted = myDetectedSeq.Upper(); } - const Handle(SelectMgr_EntityOwner)& anOwner = myMainSel->Picked (myDetectedSeq (myCurHighlighted)); + const Handle(SelectMgr_EntityOwner)& anOwner = MainSelector()->Picked (myDetectedSeq (myCurHighlighted)); if (anOwner.IsNull()) { return 0; @@ -3672,7 +3670,7 @@ Standard_Integer AIS_InteractiveContext::HilightPreviousDetected (const Handle(V Handle(SelectMgr_EntityOwner) AIS_InteractiveContext::DetectedCurrentOwner() const { return MoreDetected() - ? myMainSel->Picked (myDetectedSeq (myCurDetected)) + ? MainSelector()->Picked (myDetectedSeq (myCurDetected)) : Handle(SelectMgr_EntityOwner)(); } @@ -3699,7 +3697,7 @@ const TopoDS_Shape& AIS_InteractiveContext::DetectedCurrentShape() const Handle(AIS_InteractiveObject) AIS_InteractiveContext::DetectedCurrentObject() const { return MoreDetected() - ? Handle(AIS_InteractiveObject)::DownCast (myMainSel->Picked (myDetectedSeq (myCurDetected))->Selectable()) + ? Handle(AIS_InteractiveObject)::DownCast (MainSelector()->Picked (myDetectedSeq (myCurDetected))->Selectable()) : Handle(AIS_InteractiveObject)(); } @@ -3930,7 +3928,7 @@ void AIS_InteractiveContext::SubIntensityOff (const Handle(AIS_InteractiveObject //======================================================================= void AIS_InteractiveContext::DisplayActiveSensitive(const Handle(V3d_View)& theView) { - myMainSel->DisplaySensitive (theView); + MainSelector()->DisplaySensitive (theView); } //======================================================================= @@ -3949,7 +3947,7 @@ void AIS_InteractiveContext::DisplayActiveSensitive (const Handle(AIS_Interactiv for (TColStd_ListIteratorOfListOfInteger aModeIter ((*aStatus)->SelectionModes()); aModeIter.More(); aModeIter.Next()) { const Handle(SelectMgr_Selection)& aSel = theObj->Selection (aModeIter.Value()); - myMainSel->DisplaySensitive (aSel, theObj->Transformation(), theView, Standard_False); + MainSelector()->DisplaySensitive (aSel, theObj->Transformation(), theView, Standard_False); } } @@ -3959,7 +3957,7 @@ void AIS_InteractiveContext::DisplayActiveSensitive (const Handle(AIS_Interactiv //======================================================================= void AIS_InteractiveContext::ClearActiveSensitive (const Handle(V3d_View)& theView) { - myMainSel->ClearSensitive (theView); + MainSelector()->ClearSensitive (theView); } //======================================================================= @@ -4091,7 +4089,6 @@ void AIS_InteractiveContext::DumpJson (Standard_OStream& theOStream, Standard_In OCCT_DUMP_FIELD_VALUE_POINTER (theOStream, mgrSelector.get()) OCCT_DUMP_FIELD_VALUE_POINTER (theOStream, myMainPM.get()) OCCT_DUMP_FIELD_VALUE_POINTER (theOStream, myMainVwr.get()) - OCCT_DUMP_FIELD_VALUE_POINTER (theOStream, myMainSel.get()) OCCT_DUMP_FIELD_VALUE_POINTER (theOStream, myLastActiveView) OCCT_DUMP_FIELD_VALUE_POINTER (theOStream, myLastPicked.get()) diff --git a/src/AIS/AIS_InteractiveContext.hxx b/src/AIS/AIS_InteractiveContext.hxx index 9d2663bbc0..34612ced44 100644 --- a/src/AIS/AIS_InteractiveContext.hxx +++ b/src/AIS/AIS_InteractiveContext.hxx @@ -38,6 +38,7 @@ #include #include #include +#include #include #include #include @@ -45,7 +46,6 @@ #include #include -class SelectMgr_SelectionManager; class V3d_Viewer; class V3d_View; class TopLoc_Location; @@ -800,7 +800,7 @@ public: //! @name common properties const Handle(PrsMgr_PresentationManager)& MainPrsMgr() const { return myMainPM; } - const Handle(StdSelect_ViewerSelector3d)& MainSelector() const { return myMainSel; } + const Handle(StdSelect_ViewerSelector3d)& MainSelector() const { return mgrSelector->Selector(); } //! Updates the current viewer. Standard_EXPORT void UpdateCurrentViewer(); @@ -1457,7 +1457,6 @@ protected: //! @name internal fields Handle(SelectMgr_SelectionManager) mgrSelector; Handle(PrsMgr_PresentationManager) myMainPM; Handle(V3d_Viewer) myMainVwr; - Handle(StdSelect_ViewerSelector3d) myMainSel; V3d_View* myLastActiveView; Handle(SelectMgr_EntityOwner) myLastPicked; Standard_Boolean myToHilightSelected; diff --git a/src/SelectMgr/FILES b/src/SelectMgr/FILES index 82bc6096f0..887b67f019 100755 --- a/src/SelectMgr/FILES +++ b/src/SelectMgr/FILES @@ -67,5 +67,4 @@ SelectMgr_ViewClipRange.cxx SelectMgr_ViewClipRange.hxx SelectMgr_ViewerSelector.cxx SelectMgr_ViewerSelector.hxx -SelectMgr_ViewerSelector3d.cxx SelectMgr_ViewerSelector3d.hxx diff --git a/src/SelectMgr/SelectMgr_SelectionImageFiller.hxx b/src/SelectMgr/SelectMgr_SelectionImageFiller.hxx index 5d3f090932..90a7277ec1 100644 --- a/src/SelectMgr/SelectMgr_SelectionImageFiller.hxx +++ b/src/SelectMgr/SelectMgr_SelectionImageFiller.hxx @@ -23,7 +23,7 @@ class SelectMgr_ViewerSelector; //! Abstract class for filling pixel with color. -//! This is internal tool for SelectMgr_ViewerSelector3d::ToPixMap(). +//! This is internal tool for SelectMgr_ViewerSelector::ToPixMap(). class SelectMgr_SelectionImageFiller : public Standard_Transient { public: diff --git a/src/SelectMgr/SelectMgr_ViewerSelector.cxx b/src/SelectMgr/SelectMgr_ViewerSelector.cxx index d1e646928e..42c8028fba 100644 --- a/src/SelectMgr/SelectMgr_ViewerSelector.cxx +++ b/src/SelectMgr/SelectMgr_ViewerSelector.cxx @@ -23,14 +23,17 @@ #include #include #include +#include #include #include -#include +#include #include +#include #include #include #include #include +#include #include @@ -297,6 +300,30 @@ void SelectMgr_ViewerSelector::checkOverlap (const Handle(Select3D_SensitiveEnti } } +//======================================================================= +// Function: updateZLayers +// Purpose : +//======================================================================= +void SelectMgr_ViewerSelector::updateZLayers (const Handle(V3d_View)& theView) +{ + myZLayerOrderMap.Clear(); + TColStd_SequenceOfInteger aZLayers; + theView->Viewer()->GetAllZLayers (aZLayers); + Standard_Integer aPos = 0; + Standard_Boolean isPrevDepthWrite = true; + for (TColStd_SequenceOfInteger::Iterator aLayerIter (aZLayers); aLayerIter.More(); aLayerIter.Next()) + { + Graphic3d_ZLayerSettings aSettings = theView->Viewer()->ZLayerSettings (aLayerIter.Value()); + if (aSettings.ToClearDepth() + || isPrevDepthWrite != aSettings.ToEnableDepthWrite()) + { + ++aPos; + } + isPrevDepthWrite = aSettings.ToEnableDepthWrite(); + myZLayerOrderMap.Bind (aLayerIter.Value(), aPos); + } +} + //======================================================================= // function: computeFrustum // purpose : @@ -1125,6 +1152,208 @@ void SelectMgr_ViewerSelector::AllowOverlapDetection (const Standard_Boolean the mySelectingVolumeMgr.AllowOverlapDetection (theIsToAllow); } +//======================================================================= +// Function: Pick +// Purpose : +//======================================================================= +void SelectMgr_ViewerSelector::Pick (const Standard_Integer theXPix, + const Standard_Integer theYPix, + const Handle(V3d_View)& theView) +{ + updateZLayers (theView); + + gp_Pnt2d aMousePos (static_cast (theXPix), + static_cast (theYPix)); + mySelectingVolumeMgr.InitPointSelectingVolume (aMousePos); + + mySelectingVolumeMgr.SetPixelTolerance (myTolerances.Tolerance()); + mySelectingVolumeMgr.SetCamera (theView->Camera()); + Standard_Integer aWidth = 0, aHeight = 0; + theView->Window()->Size (aWidth, aHeight); + mySelectingVolumeMgr.SetWindowSize (aWidth, aHeight); + + mySelectingVolumeMgr.BuildSelectingVolume(); + mySelectingVolumeMgr.SetViewClipping (theView->ClipPlanes(), Handle(Graphic3d_SequenceOfHClipPlane)(), NULL); + + TraverseSensitives(); +} + +//======================================================================= +// Function: Pick +// Purpose : +//======================================================================= +void SelectMgr_ViewerSelector::Pick (const Standard_Integer theXPMin, + const Standard_Integer theYPMin, + const Standard_Integer theXPMax, + const Standard_Integer theYPMax, + const Handle(V3d_View)& theView) +{ + updateZLayers (theView); + + gp_Pnt2d aMinMousePos (static_cast (theXPMin), + static_cast (theYPMin)); + gp_Pnt2d aMaxMousePos (static_cast (theXPMax), + static_cast (theYPMax)); + mySelectingVolumeMgr.InitBoxSelectingVolume (aMinMousePos, + aMaxMousePos); + + mySelectingVolumeMgr.SetCamera (theView->Camera()); + Standard_Integer aWidth = 0, aHeight = 0; + theView->Window()->Size (aWidth, aHeight); + mySelectingVolumeMgr.SetWindowSize (aWidth, aHeight); + + mySelectingVolumeMgr.BuildSelectingVolume(); + mySelectingVolumeMgr.SetViewClipping (theView->ClipPlanes(), Handle(Graphic3d_SequenceOfHClipPlane)(), NULL); + TraverseSensitives(); +} + +//======================================================================= +// Function: Pick +// Purpose : Selection using a polyline +//======================================================================= +void SelectMgr_ViewerSelector::Pick (const TColgp_Array1OfPnt2d& thePolyline, + const Handle(V3d_View)& theView) +{ + updateZLayers (theView); + + mySelectingVolumeMgr.InitPolylineSelectingVolume (thePolyline); + mySelectingVolumeMgr.SetCamera (theView->Camera()); + Standard_Integer aWidth = 0, aHeight = 0; + theView->Window()->Size (aWidth, aHeight); + mySelectingVolumeMgr.SetWindowSize (aWidth, aHeight); + mySelectingVolumeMgr.BuildSelectingVolume(); + mySelectingVolumeMgr.SetViewClipping (theView->ClipPlanes(), Handle(Graphic3d_SequenceOfHClipPlane)(), NULL); + + TraverseSensitives(); +} + +//======================================================================= +// Function: Pick +// Purpose : +//======================================================================= +void SelectMgr_ViewerSelector::Pick (const gp_Ax1& theAxis, + const Handle(V3d_View)& theView) +{ + updateZLayers (theView); + + mySelectingVolumeMgr.InitAxisSelectingVolume (theAxis); + mySelectingVolumeMgr.BuildSelectingVolume(); + mySelectingVolumeMgr.SetViewClipping (theView->ClipPlanes(), Handle(Graphic3d_SequenceOfHClipPlane)(), NULL); + + TraverseSensitives(); +} + +//======================================================================= +//function : ToPixMap +//purpose : +//======================================================================= +Standard_Boolean SelectMgr_ViewerSelector::ToPixMap (Image_PixMap& theImage, + const Handle(V3d_View)& theView, + const StdSelect_TypeOfSelectionImage theType, + const Standard_Integer thePickedIndex) +{ + if (theImage.IsEmpty()) + { + throw Standard_ProgramError ("SelectMgr_ViewerSelector::ToPixMap() has been called with empty image"); + } + + Handle(SelectMgr_SelectionImageFiller) aFiller = SelectMgr_SelectionImageFiller::CreateFiller (theImage, this, theType); + if (aFiller.IsNull()) + { + return Standard_False; + } + + const Standard_Integer aSizeX = static_cast (theImage.SizeX()); + const Standard_Integer aSizeY = static_cast (theImage.SizeY()); + for (Standard_Integer aRowIter = 0; aRowIter < aSizeY; ++aRowIter) + { + for (Standard_Integer aColIter = 0; aColIter < aSizeX; ++aColIter) + { + Pick (aColIter, aRowIter, theView); + aFiller->Fill (aColIter, aRowIter, thePickedIndex); + } + } + aFiller->Flush(); + return Standard_True; +} + +//======================================================================= +// Function: DisplaySensitive. +// Purpose : Display active primitives. +//======================================================================= +void SelectMgr_ViewerSelector::DisplaySensitive (const Handle(V3d_View)& theView) +{ + for (SelectMgr_SelectableObjectSet::Iterator aSelectableIt (mySelectableObjects); aSelectableIt.More(); aSelectableIt.Next()) + { + Handle(Graphic3d_Structure) aStruct = new Graphic3d_Structure (theView->Viewer()->StructureManager()); + const Handle (SelectMgr_SelectableObject)& anObj = aSelectableIt.Value(); + for (SelectMgr_SequenceOfSelection::Iterator aSelIter (anObj->Selections()); aSelIter.More(); aSelIter.Next()) + { + if (aSelIter.Value()->GetSelectionState() == SelectMgr_SOS_Activated) + { + SelectMgr::ComputeSensitivePrs (aStruct, aSelIter.Value(), anObj->Transformation(), anObj->TransformPersistence()); + } + } + + myStructs.Append (aStruct); + } + + for (Graphic3d_SequenceOfStructure::Iterator aStructIter (myStructs); aStructIter.More(); aStructIter.Next()) + { + Handle(Graphic3d_Structure)& aStruct = aStructIter.ChangeValue(); + aStruct->SetDisplayPriority (10); + aStruct->Display(); + } + + theView->Update(); +} + +//======================================================================= +// Function: ClearSensitive +// Purpose : +//======================================================================= +void SelectMgr_ViewerSelector::ClearSensitive (const Handle(V3d_View)& theView) +{ + for (Graphic3d_SequenceOfStructure::Iterator aStructIter (myStructs); aStructIter.More(); aStructIter.Next()) + { + const Handle(Graphic3d_Structure)& aPrs = aStructIter.ChangeValue(); + aPrs->Erase(); + aPrs->Clear(); + aPrs->Remove(); + } + myStructs.Clear(); + + if (!theView.IsNull()) + { + theView->Update(); + } +} + +//======================================================================= +//function : DisplaySenstive +//purpose : +//======================================================================= +void SelectMgr_ViewerSelector::DisplaySensitive (const Handle(SelectMgr_Selection)& theSel, + const gp_Trsf& theTrsf, + const Handle(V3d_View)& theView, + const Standard_Boolean theToClearOthers) +{ + if (theToClearOthers) + { + ClearSensitive (theView); + } + + Handle(Graphic3d_Structure) aStruct = new Graphic3d_Structure (theView->Viewer()->StructureManager()); + + SelectMgr::ComputeSensitivePrs (aStruct, theSel, theTrsf, Handle(Graphic3d_TransformPers)()); + + myStructs.Append (aStruct); + myStructs.Last()->SetDisplayPriority (10); + myStructs.Last()->Display(); + + theView->Update(); +} + //======================================================================= //function : DumpJson //purpose : @@ -1159,6 +1388,13 @@ void SelectMgr_ViewerSelector::DumpJson (Standard_OStream& theOStream, Standard_ OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myIsLeftChildQueuedFirst) OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myMapOfObjectSensitives.Extent()) + + OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myStructs.Length()) + for (Graphic3d_SequenceOfStructure::Iterator aStructsIt (myStructs); aStructsIt.More(); aStructsIt.Next()) + { + const Handle(Graphic3d_Structure)& aStructure = aStructsIt.Value(); + OCCT_DUMP_FIELD_VALUE_POINTER (theOStream, aStructure) + } } //======================================================================= diff --git a/src/SelectMgr/SelectMgr_ViewerSelector.hxx b/src/SelectMgr/SelectMgr_ViewerSelector.hxx index ef5b6276c8..23271d948e 100644 --- a/src/SelectMgr/SelectMgr_ViewerSelector.hxx +++ b/src/SelectMgr/SelectMgr_ViewerSelector.hxx @@ -17,12 +17,11 @@ #ifndef _SelectMgr_ViewerSelector_HeaderFile #define _SelectMgr_ViewerSelector_HeaderFile -#include +#include #include #include -#include -#include #include +#include #include #include #include @@ -31,13 +30,20 @@ #include #include #include +#include #include -#include +#include +#include +#include +#include +class Graphic3d_Structure; +class Graphic3d_TransformPers; class SelectMgr_SelectionManager; class SelectMgr_SensitiveEntitySet; class SelectMgr_EntityOwner; class Select3D_SensitiveEntity; +class V3d_View; // resolve name collisions with X11 headers #ifdef Status @@ -84,6 +90,9 @@ class SelectMgr_ViewerSelector : public Standard_Transient friend class SelectMgr_SelectionManager; public: + //! Constructs an empty selector object. + Standard_EXPORT SelectMgr_ViewerSelector(); + //! Returns custom pixel tolerance value. Standard_Integer CustomPixelTolerance() const { return myTolerances.CustomTolerance(); } @@ -244,6 +253,57 @@ public: //! mark both included and overlapped entities as matched Standard_EXPORT void AllowOverlapDetection (const Standard_Boolean theIsToAllow); +public: + + //! Picks the sensitive entity at the pixel coordinates of + //! the mouse and . The selector looks for touched areas and owners. + Standard_EXPORT void Pick (const Standard_Integer theXPix, + const Standard_Integer theYPix, + const Handle(V3d_View)& theView); + + //! Picks the sensitive entity according to the minimum + //! and maximum pixel values , , + //! and defining a 2D area for selection in the 3D view aView. + Standard_EXPORT void Pick (const Standard_Integer theXPMin, + const Standard_Integer theYPMin, + const Standard_Integer theXPMax, + const Standard_Integer theYPMax, + const Handle(V3d_View)& theView); + + //! pick action - input pixel values for polyline selection for selection. + Standard_EXPORT void Pick (const TColgp_Array1OfPnt2d& thePolyline, + const Handle(V3d_View)& theView); + + //! Picks the sensitive entity according to the input axis. + //! This is geometric intersection 3D objects by axis + //! (camera parameters are ignored and objects with transform persistance are skipped). + Standard_EXPORT void Pick (const gp_Ax1& theAxis, + const Handle(V3d_View)& theView); + + //! Dump of detection results into image. + //! This method performs axis picking for each pixel in the image + //! and generates a color depending on picking results and selection image type. + //! @param theImage result image, should be initialized + //! @param theView 3D view defining camera position + //! @param theType type of image to define + //! @param thePickedIndex index of picked entity (1 means topmost) + Standard_EXPORT Standard_Boolean ToPixMap (Image_PixMap& theImage, + const Handle(V3d_View)& theView, + const StdSelect_TypeOfSelectionImage theType, + const Standard_Integer thePickedIndex = 1); + +public: + + //! Displays sensitives in view . + Standard_EXPORT void DisplaySensitive (const Handle(V3d_View)& theView); + + Standard_EXPORT void ClearSensitive (const Handle(V3d_View)& theView); + + Standard_EXPORT void DisplaySensitive (const Handle(SelectMgr_Selection)& theSel, + const gp_Trsf& theTrsf, + const Handle(V3d_View)& theView, + const Standard_Boolean theToClearOthers = Standard_True); + //! Dumps the content of me into the stream Standard_EXPORT void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const; @@ -266,8 +326,6 @@ public: protected: - Standard_EXPORT SelectMgr_ViewerSelector(); - //! Traverses BVH containing all added selectable objects and //! finds candidates for further search of overlap Standard_EXPORT void TraverseSensitives(); @@ -292,6 +350,9 @@ protected: const gp_GTrsf& theInversedTrsf, SelectMgr_SelectingVolumeManager& theMgr); + //! Update z-layers order map. + Standard_EXPORT void updateZLayers (const Handle(V3d_View)& theView); + private: //! Checks if the entity given requires to scale current selecting frustum @@ -349,6 +410,8 @@ protected: Standard_Boolean myIsLeftChildQueuedFirst; SelectMgr_MapOfObjectSensitives myMapOfObjectSensitives; + Graphic3d_SequenceOfStructure myStructs; //!< list of debug presentations + }; DEFINE_STANDARD_HANDLE(SelectMgr_ViewerSelector, Standard_Transient) diff --git a/src/SelectMgr/SelectMgr_ViewerSelector3d.cxx b/src/SelectMgr/SelectMgr_ViewerSelector3d.cxx deleted file mode 100644 index 426fb28ee5..0000000000 --- a/src/SelectMgr/SelectMgr_ViewerSelector3d.cxx +++ /dev/null @@ -1,283 +0,0 @@ -// Created on: 1995-03-15 -// Created by: Robert COUBLANC -// Copyright (c) 1995-1999 Matra Datavision -// Copyright (c) 1999-2014 OPEN CASCADE SAS -// -// This file is part of Open CASCADE Technology software library. -// -// This library is free software; you can redistribute it and/or modify it under -// the terms of the GNU Lesser General Public License version 2.1 as published -// by the Free Software Foundation, with special exception defined in the file -// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT -// distribution for complete text of the license and disclaimer of any warranty. -// -// Alternatively, this file may be used under the terms of Open CASCADE -// commercial license or contractual agreement. - -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -IMPLEMENT_STANDARD_RTTIEXT(SelectMgr_ViewerSelector3d, SelectMgr_ViewerSelector) - -//======================================================================= -// Function : Constructor -// Purpose : -//======================================================================= -SelectMgr_ViewerSelector3d::SelectMgr_ViewerSelector3d() -{ - // -} - -//======================================================================= -// Function: Pick -// Purpose : -//======================================================================= -void SelectMgr_ViewerSelector3d::Pick (const Standard_Integer theXPix, - const Standard_Integer theYPix, - const Handle(V3d_View)& theView) -{ - updateZLayers (theView); - - gp_Pnt2d aMousePos (static_cast (theXPix), - static_cast (theYPix)); - mySelectingVolumeMgr.InitPointSelectingVolume (aMousePos); - - mySelectingVolumeMgr.SetPixelTolerance (myTolerances.Tolerance()); - mySelectingVolumeMgr.SetCamera (theView->Camera()); - Standard_Integer aWidth = 0, aHeight = 0; - theView->Window()->Size (aWidth, aHeight); - mySelectingVolumeMgr.SetWindowSize (aWidth, aHeight); - - mySelectingVolumeMgr.BuildSelectingVolume(); - mySelectingVolumeMgr.SetViewClipping (theView->ClipPlanes(), Handle(Graphic3d_SequenceOfHClipPlane)(), NULL); - - TraverseSensitives(); -} - -//======================================================================= -// Function: Pick -// Purpose : -//======================================================================= -void SelectMgr_ViewerSelector3d::Pick (const Standard_Integer theXPMin, - const Standard_Integer theYPMin, - const Standard_Integer theXPMax, - const Standard_Integer theYPMax, - const Handle(V3d_View)& theView) -{ - updateZLayers (theView); - - gp_Pnt2d aMinMousePos (static_cast (theXPMin), - static_cast (theYPMin)); - gp_Pnt2d aMaxMousePos (static_cast (theXPMax), - static_cast (theYPMax)); - mySelectingVolumeMgr.InitBoxSelectingVolume (aMinMousePos, - aMaxMousePos); - - mySelectingVolumeMgr.SetCamera (theView->Camera()); - Standard_Integer aWidth = 0, aHeight = 0; - theView->Window()->Size (aWidth, aHeight); - mySelectingVolumeMgr.SetWindowSize (aWidth, aHeight); - - mySelectingVolumeMgr.BuildSelectingVolume(); - mySelectingVolumeMgr.SetViewClipping (theView->ClipPlanes(), Handle(Graphic3d_SequenceOfHClipPlane)(), NULL); - TraverseSensitives(); -} - -//======================================================================= -// Function: Pick -// Purpose : Selection using a polyline -//======================================================================= -void SelectMgr_ViewerSelector3d::Pick (const TColgp_Array1OfPnt2d& thePolyline, - const Handle(V3d_View)& theView) -{ - updateZLayers (theView); - - mySelectingVolumeMgr.InitPolylineSelectingVolume (thePolyline); - mySelectingVolumeMgr.SetCamera (theView->Camera()); - Standard_Integer aWidth = 0, aHeight = 0; - theView->Window()->Size (aWidth, aHeight); - mySelectingVolumeMgr.SetWindowSize (aWidth, aHeight); - mySelectingVolumeMgr.BuildSelectingVolume(); - mySelectingVolumeMgr.SetViewClipping (theView->ClipPlanes(), Handle(Graphic3d_SequenceOfHClipPlane)(), NULL); - - TraverseSensitives(); -} - -//======================================================================= -// Function: Pick -// Purpose : -//======================================================================= -void SelectMgr_ViewerSelector3d::Pick (const gp_Ax1& theAxis, - const Handle(V3d_View)& theView) -{ - updateZLayers (theView); - - mySelectingVolumeMgr.InitAxisSelectingVolume (theAxis); - mySelectingVolumeMgr.BuildSelectingVolume(); - mySelectingVolumeMgr.SetViewClipping (theView->ClipPlanes(), Handle(Graphic3d_SequenceOfHClipPlane)(), NULL); - - TraverseSensitives(); -} - -//======================================================================= -// Function: DisplaySensitive. -// Purpose : Display active primitives. -//======================================================================= -void SelectMgr_ViewerSelector3d::DisplaySensitive (const Handle(V3d_View)& theView) -{ - for (SelectMgr_SelectableObjectSet::Iterator aSelectableIt (mySelectableObjects); aSelectableIt.More(); aSelectableIt.Next()) - { - Handle(Graphic3d_Structure) aStruct = new Graphic3d_Structure (theView->Viewer()->StructureManager()); - const Handle (SelectMgr_SelectableObject)& anObj = aSelectableIt.Value(); - for (SelectMgr_SequenceOfSelection::Iterator aSelIter (anObj->Selections()); aSelIter.More(); aSelIter.Next()) - { - if (aSelIter.Value()->GetSelectionState() == SelectMgr_SOS_Activated) - { - SelectMgr::ComputeSensitivePrs (aStruct, aSelIter.Value(), anObj->Transformation(), anObj->TransformPersistence()); - } - } - - myStructs.Append (aStruct); - } - - for (Graphic3d_SequenceOfStructure::Iterator aStructIter (myStructs); aStructIter.More(); aStructIter.Next()) - { - Handle(Graphic3d_Structure)& aStruct = aStructIter.ChangeValue(); - aStruct->SetDisplayPriority (10); - aStruct->Display(); - } - - theView->Update(); -} - -//======================================================================= -// Function: ClearSensitive -// Purpose : -//======================================================================= -void SelectMgr_ViewerSelector3d::ClearSensitive (const Handle(V3d_View)& theView) -{ - for (Graphic3d_SequenceOfStructure::Iterator aStructIter (myStructs); aStructIter.More(); aStructIter.Next()) - { - const Handle(Graphic3d_Structure)& aPrs = aStructIter.ChangeValue(); - aPrs->Erase(); - aPrs->Clear(); - aPrs->Remove(); - } - myStructs.Clear(); - - if (!theView.IsNull()) - { - theView->Update(); - } -} - -//======================================================================= -//function : DisplaySenstive -//purpose : -//======================================================================= -void SelectMgr_ViewerSelector3d::DisplaySensitive (const Handle(SelectMgr_Selection)& theSel, - const gp_Trsf& theTrsf, - const Handle(V3d_View)& theView, - const Standard_Boolean theToClearOthers) -{ - if (theToClearOthers) - { - ClearSensitive (theView); - } - - Handle(Graphic3d_Structure) aStruct = new Graphic3d_Structure (theView->Viewer()->StructureManager()); - - SelectMgr::ComputeSensitivePrs (aStruct, theSel, theTrsf, Handle(Graphic3d_TransformPers)()); - - myStructs.Append (aStruct); - myStructs.Last()->SetDisplayPriority (10); - myStructs.Last()->Display(); - - theView->Update(); -} - -//======================================================================= -// Function: updateZLayers -// Purpose : -//======================================================================= -void SelectMgr_ViewerSelector3d::updateZLayers (const Handle(V3d_View)& theView) -{ - myZLayerOrderMap.Clear(); - TColStd_SequenceOfInteger aZLayers; - theView->Viewer()->GetAllZLayers (aZLayers); - Standard_Integer aPos = 0; - Standard_Boolean isPrevDepthWrite = true; - for (TColStd_SequenceOfInteger::Iterator aLayerIter (aZLayers); aLayerIter.More(); aLayerIter.Next()) - { - Graphic3d_ZLayerSettings aSettings = theView->Viewer()->ZLayerSettings (aLayerIter.Value()); - if (aSettings.ToClearDepth() - || isPrevDepthWrite != aSettings.ToEnableDepthWrite()) - { - ++aPos; - } - isPrevDepthWrite = aSettings.ToEnableDepthWrite(); - myZLayerOrderMap.Bind (aLayerIter.Value(), aPos); - } -} - -//======================================================================= -//function : ToPixMap -//purpose : -//======================================================================= -Standard_Boolean SelectMgr_ViewerSelector3d::ToPixMap (Image_PixMap& theImage, - const Handle(V3d_View)& theView, - const StdSelect_TypeOfSelectionImage theType, - const Standard_Integer thePickedIndex) -{ - if (theImage.IsEmpty()) - { - throw Standard_ProgramError("SelectMgr_ViewerSelector3d::ToPixMap() has been called with empty image"); - } - - Handle(SelectMgr_SelectionImageFiller) aFiller = SelectMgr_SelectionImageFiller::CreateFiller (theImage, this, theType); - if (aFiller.IsNull()) - { - return Standard_False; - } - - const Standard_Integer aSizeX = static_cast (theImage.SizeX()); - const Standard_Integer aSizeY = static_cast (theImage.SizeY()); - for (Standard_Integer aRowIter = 0; aRowIter < aSizeY; ++aRowIter) - { - for (Standard_Integer aColIter = 0; aColIter < aSizeX; ++aColIter) - { - Pick (aColIter, aRowIter, theView); - aFiller->Fill (aColIter, aRowIter, thePickedIndex); - } - } - aFiller->Flush(); - return Standard_True; -} - -//======================================================================= -//function : DumpJson -//purpose : -//======================================================================= -void SelectMgr_ViewerSelector3d::DumpJson (Standard_OStream& theOStream, Standard_Integer) const -{ - OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream) - - OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myStructs.Length()) - for (Graphic3d_SequenceOfStructure::Iterator aStructsIt (myStructs); aStructsIt.More(); aStructsIt.Next()) - { - const Handle(Graphic3d_Structure)& aStructure = aStructsIt.Value(); - OCCT_DUMP_FIELD_VALUE_POINTER (theOStream, aStructure) - } -} diff --git a/src/SelectMgr/SelectMgr_ViewerSelector3d.hxx b/src/SelectMgr/SelectMgr_ViewerSelector3d.hxx index 4bd237286f..66a886301e 100644 --- a/src/SelectMgr/SelectMgr_ViewerSelector3d.hxx +++ b/src/SelectMgr/SelectMgr_ViewerSelector3d.hxx @@ -17,86 +17,9 @@ #ifndef _SelectMgr_ViewerSelector3d_HeaderFile #define _SelectMgr_ViewerSelector3d_HeaderFile -#include #include -#include -#include -class Graphic3d_Structure; -class Graphic3d_TransformPers; -class V3d_View; - -//! Selector Usable by Viewers from V3d -class SelectMgr_ViewerSelector3d : public SelectMgr_ViewerSelector -{ - DEFINE_STANDARD_RTTIEXT(SelectMgr_ViewerSelector3d, SelectMgr_ViewerSelector) -public: - - //! Constructs an empty 3D selector object. - Standard_EXPORT SelectMgr_ViewerSelector3d(); - - //! Picks the sensitive entity at the pixel coordinates of - //! the mouse and . The selector looks for touched areas and owners. - Standard_EXPORT void Pick (const Standard_Integer theXPix, - const Standard_Integer theYPix, - const Handle(V3d_View)& theView); - - //! Picks the sensitive entity according to the minimum - //! and maximum pixel values , , - //! and defining a 2D area for selection in the 3D view aView. - Standard_EXPORT void Pick (const Standard_Integer theXPMin, - const Standard_Integer theYPMin, - const Standard_Integer theXPMax, - const Standard_Integer theYPMax, - const Handle(V3d_View)& theView); - - //! pick action - input pixel values for polyline selection for selection. - Standard_EXPORT void Pick (const TColgp_Array1OfPnt2d& thePolyline, - const Handle(V3d_View)& theView); - - //! Picks the sensitive entity according to the input axis. - //! This is geometric intersection 3D objects by axis - //! (camera parameters are ignored and objects with transform persistance are skipped). - Standard_EXPORT void Pick (const gp_Ax1& theAxis, - const Handle(V3d_View)& theView); - - //! Dump of detection results into image. - //! This method performs axis picking for each pixel in the image - //! and generates a color depending on picking results and selection image type. - //! @param theImage result image, should be initialized - //! @param theView 3D view defining camera position - //! @param theType type of image to define - //! @param thePickedIndex index of picked entity (1 means topmost) - Standard_EXPORT Standard_Boolean ToPixMap (Image_PixMap& theImage, - const Handle(V3d_View)& theView, - const StdSelect_TypeOfSelectionImage theType, - const Standard_Integer thePickedIndex = 1); - -public: - - //! Displays sensitives in view . - Standard_EXPORT void DisplaySensitive (const Handle(V3d_View)& theView); - - Standard_EXPORT void ClearSensitive (const Handle(V3d_View)& theView); - - Standard_EXPORT void DisplaySensitive (const Handle(SelectMgr_Selection)& theSel, - const gp_Trsf& theTrsf, - const Handle(V3d_View)& theView, - const Standard_Boolean theToClearOthers = Standard_True); - - //! Dumps the content of me into the stream - Standard_EXPORT void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const; - -protected: - - //! Update z-layers order map. - Standard_EXPORT void updateZLayers (const Handle(V3d_View)& theView); - -protected: - - Graphic3d_SequenceOfStructure myStructs; //!< list of debug presentations -}; - -DEFINE_STANDARD_HANDLE(SelectMgr_ViewerSelector3d, SelectMgr_ViewerSelector) +Standard_DEPRECATED("Deprecated alias to moved class") +typedef SelectMgr_ViewerSelector SelectMgr_ViewerSelector3d; #endif diff --git a/src/StdSelect/StdSelect_ViewerSelector3d.hxx b/src/StdSelect/StdSelect_ViewerSelector3d.hxx index b109ad0a03..0497ea5207 100644 --- a/src/StdSelect/StdSelect_ViewerSelector3d.hxx +++ b/src/StdSelect/StdSelect_ViewerSelector3d.hxx @@ -14,8 +14,8 @@ #ifndef _StdSelect_ViewerSelector3d_HeaderFile #define _StdSelect_ViewerSelector3d_HeaderFile -#include +#include -typedef SelectMgr_ViewerSelector3d StdSelect_ViewerSelector3d; +typedef SelectMgr_ViewerSelector StdSelect_ViewerSelector3d; #endif // _StdSelect_ViewerSelector3d_HeaderFile From aeef9e2c1301fad6a1824ba8487b0b84a6a978d0 Mon Sep 17 00:00:00 2001 From: kgv Date: Tue, 10 Aug 2021 17:23:44 +0300 Subject: [PATCH 008/639] 0032524: Data Exchange, RWGltf_CafWriter - avoid writing translucent metallic materials RWGltf_GltfMaterialMap::DefineMaterial() and XCAFDoc_VisMaterial::ConvertToPbrMaterial() now reset matallic factor to 0.0f in case of transparent color. --- src/RWGltf/RWGltf_GltfMaterialMap.cxx | 1 + src/XCAFDoc/XCAFDoc_VisMaterial.cxx | 8 ++++++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/RWGltf/RWGltf_GltfMaterialMap.cxx b/src/RWGltf/RWGltf_GltfMaterialMap.cxx index e81d1ae4fb..a5f4ee3e11 100644 --- a/src/RWGltf/RWGltf_GltfMaterialMap.cxx +++ b/src/RWGltf/RWGltf_GltfMaterialMap.cxx @@ -420,6 +420,7 @@ void RWGltf_GltfMaterialMap::DefineMaterial (const XCAFPrs_Style& theStyle, aPbrMat.BaseColor.SetRGB (theStyle.GetColorSurf()); if (theStyle.GetColorSurfRGBA().Alpha() < 1.0f) { + aPbrMat.Metallic = 0.0f; aPbrMat.BaseColor.SetAlpha (theStyle.GetColorSurfRGBA().Alpha()); } } diff --git a/src/XCAFDoc/XCAFDoc_VisMaterial.cxx b/src/XCAFDoc/XCAFDoc_VisMaterial.cxx index 34c1f9de17..da6bd33cae 100644 --- a/src/XCAFDoc/XCAFDoc_VisMaterial.cxx +++ b/src/XCAFDoc/XCAFDoc_VisMaterial.cxx @@ -191,7 +191,9 @@ XCAFDoc_VisMaterialPBR XCAFDoc_VisMaterial::ConvertToPbrMaterial() aPbrMat.BaseColorTexture = myCommonMat.DiffuseTexture; aPbrMat.BaseColor.SetRGB (myCommonMat.DiffuseColor); aPbrMat.BaseColor.SetAlpha (1.0f - myCommonMat.Transparency); - aPbrMat.Metallic = Graphic3d_PBRMaterial::MetallicFromSpecular (myCommonMat.SpecularColor); + aPbrMat.Metallic = myCommonMat.Transparency <= ShortRealEpsilon() + ? Graphic3d_PBRMaterial::MetallicFromSpecular (myCommonMat.SpecularColor) + : 0.0f; aPbrMat.Roughness = Graphic3d_PBRMaterial::RoughnessFromSpecular (myCommonMat.SpecularColor, myCommonMat.Shininess); aPbrMat.EmissiveFactor = myCommonMat.EmissiveColor; return aPbrMat; @@ -218,7 +220,9 @@ void XCAFDoc_VisMaterial::FillMaterialAspect (Graphic3d_MaterialAspect& theAspec { Graphic3d_PBRMaterial aPbr; aPbr.SetColor (myCommonMat.DiffuseColor); - aPbr.SetMetallic (Graphic3d_PBRMaterial::MetallicFromSpecular (myCommonMat.SpecularColor)); + aPbr.SetMetallic (myCommonMat.Transparency <= ShortRealEpsilon() + ? Graphic3d_PBRMaterial::MetallicFromSpecular (myCommonMat.SpecularColor) + : 0.0f); aPbr.SetRoughness (Graphic3d_PBRMaterial::RoughnessFromSpecular (myCommonMat.SpecularColor, myCommonMat.Shininess)); aPbr.SetEmission (myCommonMat.EmissiveColor); theAspect.SetPBRMaterial (aPbr); From d9d75a845f4e3ee4f265ad16e7cf84b234d53475 Mon Sep 17 00:00:00 2001 From: kgv Date: Tue, 10 Aug 2021 20:35:14 +0300 Subject: [PATCH 009/639] 0032525: Data Exchange, RWGltf_CafReader - support KHR_draco_mesh_compression Added new optional dependency - Draco library. RWGltf_GltfJsonParser now detects KHR_draco_mesh_compression extension, marks accessor being compressed and redirects to compressed buffer view. RWGltf_TriangulationReader now handles decoding of buffer view compressed using Draco. env.bat template for genproj has been modified to allow specifying dedicated folders with debug versions of libraries (CSF_OPT_LIB64D / CSF_OPT_BIN64D) within custom.bat. Removed unused CSF_FREETYPE from TKOpenGl. --- CMakeLists.txt | 19 ++ adm/cmake/draco.cmake | 4 + adm/cmake/occt_csf.cmake | 7 + adm/cmake/vardescr.cmake | 3 + adm/genconf.tcl | 16 +- adm/genconfdeps.tcl | 5 +- adm/genproj.tcl | 3 + adm/templates/env.bat | 26 +- adm/templates/env.sh | 2 + dox/introduction/introduction.md | 5 + src/Draw/Draw_BasicCommands.cxx | 5 + src/RWGltf/RWGltf_GltfAccessor.hxx | 4 +- src/RWGltf/RWGltf_GltfJsonParser.cxx | 32 +- src/RWGltf/RWGltf_GltfJsonParser.hxx | 3 +- src/RWGltf/RWGltf_GltfLatePrimitiveArray.hxx | 2 +- src/RWGltf/RWGltf_GltfPrimArrayData.hxx | 5 +- src/RWGltf/RWGltf_TriangulationReader.cxx | 290 ++++++++++++++++++- src/RWGltf/RWGltf_TriangulationReader.hxx | 10 + src/TKOpenGl/EXTERNLIB | 1 - src/TKRWMesh/EXTERNLIB | 1 + 20 files changed, 415 insertions(+), 28 deletions(-) create mode 100644 adm/cmake/draco.cmake diff --git a/CMakeLists.txt b/CMakeLists.txt index 7eee96bc4c..43440b6388 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -370,6 +370,7 @@ set (USE_FREEIMAGE OFF CACHE BOOL "${USE_FREEIMAGE_DESCR}") set (USE_FFMPEG OFF CACHE BOOL "${USE_FFMPEG_DESCR}") set (USE_OPENVR OFF CACHE BOOL "${USE_OPENVR_DESCR}") set (USE_RAPIDJSON OFF CACHE BOOL "${USE_RAPIDJSON_DESCR}") +set (USE_DRACO OFF CACHE BOOL "${USE_DRACO_DESCR}") set (USE_TBB OFF CACHE BOOL "${USE_TBB_DESCR}") set (USE_EIGEN OFF CACHE BOOL "${USE_EIGEN_DESCR}") @@ -716,6 +717,24 @@ else() OCCT_CHECK_AND_UNSET ("INSTALL_RAPIDJSON") endif() +# Draco library +# search for CSF_Draco variable in EXTERNLIB of each being used toolkit +OCCT_IS_PRODUCT_REQUIRED (CSF_Draco CAN_USE_DRACO) +if (CAN_USE_DRACO) + if (USE_DRACO) + add_definitions (-DHAVE_DRACO) + OCCT_INCLUDE_CMAKE_FILE ("adm/cmake/draco") + else() + OCCT_CHECK_AND_UNSET_GROUP ("3RDPARTY_DRACO") + OCCT_CHECK_AND_UNSET ("INSTALL_DRACO") + endif() +else() + OCCT_CHECK_AND_UNSET ("USE_DRACO") + + OCCT_CHECK_AND_UNSET_GROUP ("3RDPARTY_DRACO") + OCCT_CHECK_AND_UNSET ("INSTALL_DRACO") +endif() + # EIGEN if (CAN_USE_EIGEN) if (USE_EIGEN) diff --git a/adm/cmake/draco.cmake b/adm/cmake/draco.cmake new file mode 100644 index 0000000000..53cf90a954 --- /dev/null +++ b/adm/cmake/draco.cmake @@ -0,0 +1,4 @@ +# Draco - a library for a lossy vertex data compression, used as extension to glTF format. +# https://github.com/google/draco + +THIRDPARTY_PRODUCT("DRACO" "draco/compression/decode.h" "CSF_Draco" "") diff --git a/adm/cmake/occt_csf.cmake b/adm/cmake/occt_csf.cmake index 6cf72317b4..bee8ba78d9 100644 --- a/adm/cmake/occt_csf.cmake +++ b/adm/cmake/occt_csf.cmake @@ -75,6 +75,13 @@ if (USE_TK) endif() endif() +# Draco +if (USE_DRACO) + set (CSF_Draco "draco") +else() + set (CSF_Draco) +endif() + if (WIN32) set (CSF_advapi32 "advapi32.lib") set (CSF_gdi32 "gdi32.lib") diff --git a/adm/cmake/vardescr.cmake b/adm/cmake/vardescr.cmake index 9dffc9f4b0..06dab5b4ca 100644 --- a/adm/cmake/vardescr.cmake +++ b/adm/cmake/vardescr.cmake @@ -176,6 +176,9 @@ set (USE_RAPIDJSON_DESCR "Indicates whether RapidJSON product should be used in OCCT DataExchange module for support of JSON-based formats like glTF") +set (USE_DRACO_DESCR +"Indicates whether Draco mesh decoding library should be used by glTF reader") + set (USE_EGL_DESCR "Indicates whether EGL should be used in OCCT visualization module instead of conventional OpenGL context creation APIs") diff --git a/adm/genconf.tcl b/adm/genconf.tcl index d7ab6c8b76..d866a74cd2 100644 --- a/adm/genconf.tcl +++ b/adm/genconf.tcl @@ -227,6 +227,10 @@ proc wokdep:gui:UpdateList {} { if { "$::HAVE_RAPIDJSON" == "true" } { wokdep:SearchRapidJson anIncErrs anLib32Errs anLib64Errs anBin32Errs anBin64Errs } + if { "$::HAVE_DRACO" == "true" } { + set aDummy {} + wokdep:SearchStandardLibrary anIncErrs anLib32Errs anLib64Errs aDummy aDummy "draco" "draco/compression/decode.h" "draco" {"draco"} + } if {"$::BUILD_Inspector" == "true" } { set ::CHECK_QT "true" @@ -495,6 +499,8 @@ ttk::label .myFrame.myChecks.myFFmpegLbl -text "Use FFmpeg" #ttk::label .myFrame.myChecks.myOpenClLbl -text "Use OpenCL" checkbutton .myFrame.myChecks.myRapidJsonCheck -offvalue "false" -onvalue "true" -variable HAVE_RAPIDJSON -command wokdep:gui:UpdateList ttk::label .myFrame.myChecks.myRapidJsonLbl -text "Use RapidJSON" +checkbutton .myFrame.myChecks.myDracoCheck -offvalue "false" -onvalue "true" -variable HAVE_DRACO -command wokdep:gui:UpdateList +ttk::label .myFrame.myChecks.myDracoLbl -text "Use Draco" checkbutton .myFrame.myChecks.myXLibCheck -offvalue "false" -onvalue "true" -variable HAVE_XLIB ttk::label .myFrame.myChecks.myXLibLbl -text "Use X11 for windows drawing" @@ -627,8 +633,9 @@ grid .myFrame.myChecks.myQtLbl -row $aCheckRowIter -column 13 -sticky w incr aCheckRowIter grid .myFrame.myChecks.myFImageCheck -row $aCheckRowIter -column 0 -sticky e grid .myFrame.myChecks.myFImageLbl -row $aCheckRowIter -column 1 -sticky w -grid .myFrame.myChecks.myTbbCheck -row $aCheckRowIter -column 2 -sticky e -grid .myFrame.myChecks.myTbbLbl -row $aCheckRowIter -column 3 -sticky w +grid .myFrame.myChecks.myDracoCheck -row $aCheckRowIter -column 2 -sticky e +grid .myFrame.myChecks.myDracoLbl -row $aCheckRowIter -column 3 -sticky w + if { "$::tcl_platform(platform)" == "windows" } { grid .myFrame.myChecks.myD3dCheck -row $aCheckRowIter -column 4 -sticky e grid .myFrame.myChecks.myD3dLbl -row $aCheckRowIter -column 5 -sticky w @@ -658,6 +665,11 @@ if { "$::tcl_platform(platform)" == "windows" } { incr aCheckRowIter +grid .myFrame.myChecks.myTbbCheck -row $aCheckRowIter -column 12 -sticky e +grid .myFrame.myChecks.myTbbLbl -row $aCheckRowIter -column 13 -sticky w + +incr aCheckRowIter + # Additional headers search paths grid .myFrame.myIncLbl -row $aRowIter -column 0 -columnspan 10 -sticky w incr aRowIter diff --git a/adm/genconfdeps.tcl b/adm/genconfdeps.tcl index 644a18948b..10ef1978cb 100644 --- a/adm/genconfdeps.tcl +++ b/adm/genconfdeps.tcl @@ -68,7 +68,10 @@ if { [info exists ::env(SHORTCUT_HEADERS)] } { } # fetch environment variables (e.g. set by custom.sh or custom.bat) and set them as tcl variables with the same name -set THE_ENV_VARIABLES {HAVE_TK HAVE_FREETYPE HAVE_FREEIMAGE HAVE_FFMPEG HAVE_TBB HAVE_GLES2 HAVE_D3D HAVE_VTK HAVE_ZLIB HAVE_LIBLZMA HAVE_E57 HAVE_RAPIDJSON HAVE_OPENVR HAVE_OPENCL CHECK_QT4 CHECK_JDK HAVE_XLIB HAVE_RelWithDebInfo BUILD_Inspector} +set THE_ENV_VARIABLES { HAVE_TK HAVE_FREETYPE HAVE_FREEIMAGE HAVE_FFMPEG HAVE_TBB HAVE_GLES2 HAVE_D3D HAVE_VTK \ + HAVE_ZLIB HAVE_LIBLZMA HAVE_E57 HAVE_RAPIDJSON HAVE_DRACO HAVE_OPENVR HAVE_OPENCL \ + CHECK_QT4 CHECK_JDK HAVE_XLIB \ + HAVE_RelWithDebInfo BUILD_Inspector } foreach anEnvIter $THE_ENV_VARIABLES { set ${anEnvIter} "false" } set HAVE_TK "true" set HAVE_FREETYPE "true" diff --git a/adm/genproj.tcl b/adm/genproj.tcl index 04f9c20f91..ce70ef7b4f 100644 --- a/adm/genproj.tcl +++ b/adm/genproj.tcl @@ -1447,6 +1447,9 @@ proc osutils:csfList { theOS theCsfLibsMap theCsfFrmsMap theRelease} { if { "$::HAVE_LIBLZMA" == "true" } { set aLibsMap(CSF_LIBLZMA) "liblzma" } + if { "$::HAVE_DRACO" == "true" } { + set aLibsMap(CSF_Draco) "draco" + } if { "$::HAVE_OPENVR" == "true" } { set aLibsMap(CSF_OpenVR) "openvr_api" } diff --git a/adm/templates/env.bat b/adm/templates/env.bat index 78dfa0eec4..a02bea526a 100644 --- a/adm/templates/env.bat +++ b/adm/templates/env.bat @@ -27,6 +27,7 @@ set "HAVE_D3D=false" set "HAVE_ZLIB=false" set "HAVE_LIBLZMA=false" set "HAVE_RAPIDJSON=false" +set "HAVE_DRACO=false" set "HAVE_OPENVR=false" set "HAVE_E57=false" set "CSF_OPT_INC=" @@ -34,6 +35,14 @@ set "CSF_OPT_LIB32=" set "CSF_OPT_LIB64=" set "CSF_OPT_BIN32=" set "CSF_OPT_BIN64=" +set "CSF_OPT_LIB32D=" +set "CSF_OPT_LIB64D=" +set "CSF_OPT_BIN32D=" +set "CSF_OPT_BIN64D=" +set "CSF_OPT_LIB32I=" +set "CSF_OPT_LIB64I=" +set "CSF_OPT_BIN32I=" +set "CSF_OPT_BIN64I=" set "CSF_DEFINES=%CSF_DEFINES_EXTRA%" if not ["%CASROOT%"] == [""] if exist "%SCRIPTROOT%\%CASROOT%" set "CASROOT=%SCRIPTROOT%\%CASROOT%" @@ -170,14 +179,14 @@ if /I "%VCFMT%" == "vc9" ( exit /B ) -set "CSF_OPT_LIB32D=%CSF_OPT_LIB32%" -set "CSF_OPT_LIB64D=%CSF_OPT_LIB64%" -set "CSF_OPT_BIN32D=%CSF_OPT_BIN32%" -set "CSF_OPT_BIN64D=%CSF_OPT_BIN64%" -set "CSF_OPT_LIB32I=%CSF_OPT_LIB32%" -set "CSF_OPT_LIB64I=%CSF_OPT_LIB64%" -set "CSF_OPT_BIN32I=%CSF_OPT_BIN32%" -set "CSF_OPT_BIN64I=%CSF_OPT_BIN64%" +if ["%CSF_OPT_LIB32D%"] == [""] set "CSF_OPT_LIB32D=%CSF_OPT_LIB32%" +if ["%CSF_OPT_LIB64D%"] == [""] set "CSF_OPT_LIB64D=%CSF_OPT_LIB64%" +if ["%CSF_OPT_BIN32D%"] == [""] set "CSF_OPT_BIN32D=%CSF_OPT_BIN32%" +if ["%CSF_OPT_BIN64D%"] == [""] set "CSF_OPT_BIN64D=%CSF_OPT_BIN64%" +if ["%CSF_OPT_LIB32I%"] == [""] set "CSF_OPT_LIB32I=%CSF_OPT_LIB32%" +if ["%CSF_OPT_LIB64I%"] == [""] set "CSF_OPT_LIB64I=%CSF_OPT_LIB64%" +if ["%CSF_OPT_BIN32I%"] == [""] set "CSF_OPT_BIN32I=%CSF_OPT_BIN32%" +if ["%CSF_OPT_BIN64I%"] == [""] set "CSF_OPT_BIN64I=%CSF_OPT_BIN64%" rem ----- Optional 3rd-parties should be enabled by HAVE macros ----- set "CSF_OPT_CMPL=" @@ -194,6 +203,7 @@ if ["%HAVE_D3D%"] == ["true"] set "PRODUCTS_DEFINES=%PRODUCTS_DEFINES% -DH if ["%HAVE_ZLIB%"] == ["true"] set "PRODUCTS_DEFINES=%PRODUCTS_DEFINES% -DHAVE_ZLIB" & set "CSF_DEFINES=HAVE_ZLIB;%CSF_DEFINES%" if ["%HAVE_LIBLZMA%"] == ["true"] set "PRODUCTS_DEFINES=%PRODUCTS_DEFINES% -DHAVE_LIBLZMA" & set "CSF_DEFINES=HAVE_LIBLZMA;%CSF_DEFINES%" if ["%HAVE_RAPIDJSON%"] == ["true"] set "PRODUCTS_DEFINES=%PRODUCTS_DEFINES% -DHAVE_RAPIDJSON" & set "CSF_DEFINES=HAVE_RAPIDJSON;%CSF_DEFINES%" +if ["%HAVE_DRACO%"] == ["true"] set "PRODUCTS_DEFINES=%PRODUCTS_DEFINES% -DHAVE_DRACO" & set "CSF_DEFINES=HAVE_DRACO;%CSF_DEFINES%" if ["%HAVE_OPENVR%"] == ["true"] set "PRODUCTS_DEFINES=%PRODUCTS_DEFINES% -DHAVE_OPENVR" & set "CSF_DEFINES=HAVE_OPENVR;%CSF_DEFINES%" if ["%HAVE_E57%"] == ["true"] set "PRODUCTS_DEFINES=%PRODUCTS_DEFINES% -DHAVE_E57" & set "CSF_DEFINES=HAVE_E57;%CSF_DEFINES%" diff --git a/adm/templates/env.sh b/adm/templates/env.sh index b0f29c0d08..4ab363e153 100644 --- a/adm/templates/env.sh +++ b/adm/templates/env.sh @@ -20,6 +20,7 @@ export HAVE_GLES2="false"; export HAVE_ZLIB="false"; export HAVE_LIBLZMA="false"; export HAVE_RAPIDJSON="false"; +export HAVE_DRACO="false"; export HAVE_OPENVR="false"; export HAVE_E57="false"; export HAVE_XLIB="true"; @@ -115,6 +116,7 @@ if [ "$HAVE_VTK" == "true" ]; then export CSF_OPT_CMPL="${CSF_OPT_CMPL} -D if [ "$HAVE_ZLIB" == "true" ]; then export CSF_OPT_CMPL="${CSF_OPT_CMPL} -DHAVE_ZLIB"; fi if [ "$HAVE_LIBLZMA" == "true" ]; then export CSF_OPT_CMPL="${CSF_OPT_CMPL} -DHAVE_LIBLZMA"; fi if [ "$HAVE_RAPIDJSON" == "true" ]; then export CSF_OPT_CMPL="${CSF_OPT_CMPL} -DHAVE_RAPIDJSON"; fi +if [ "$HAVE_DRACO" == "true" ]; then export CSF_OPT_CMPL="${CSF_OPT_CMPL} -DHAVE_DRACO"; fi if [ "$HAVE_OPENVR" == "true" ]; then export CSF_OPT_CMPL="${CSF_OPT_CMPL} -DHAVE_OPENVR"; fi if [ "$HAVE_E57" == "true" ]; then export CSF_OPT_CMPL="${CSF_OPT_CMPL} -DHAVE_E57"; fi if [ "$HAVE_XLIB" == "true" ]; then export CSF_OPT_CMPL="${CSF_OPT_CMPL} -DHAVE_XLIB"; fi diff --git a/dox/introduction/introduction.md b/dox/introduction/introduction.md index c32ef176ca..ae4ce84234 100644 --- a/dox/introduction/introduction.md +++ b/dox/introduction/introduction.md @@ -370,6 +370,7 @@ https://www.opencascade.com/content/3rd-party-components | VTK 6.1+ | https://www.vtk.org/download/ | Visualization | Optional (VTK integration) | | Flex 2.6.4+ and Bison 3.7.1+ | https://sourceforge.net/projects/winflexbison/ | Data Exchange | Optional (update of STEP and ExprIntrp parsers) | | RapidJSON 1.1+ | https://rapidjson.org/ | Data Exchange | Optional (reading glTF files) | +| Draco 1.4.1+ | https://github.com/google/draco | Data Exchange | Optional (reading compressed glTF files) | | Tcl/Tk 8.6.3+
or ActiveTcl 8.6 | https://www.tcl.tk/software/tcltk/download.html
https://www.activestate.com/activetcl/downloads | DRAW Test Harness | Required | | Qt Desktop: Qt 4.8.6+
Android: Qt 5.3.2+ | https://www.qt.io/download/ | Samples and demos | Optional (Qt samples) | | Doxygen 1.8.5+ | https://www.doxygen.nl/download.html | Documentation | Required | @@ -642,6 +643,10 @@ on this tool. **RapidJSON** is an Open Source JSON parser and generator for C++. RapidJSON is optionally used by OCCT for reading glTF files (https://rapidjson.org/). +**Draco** is an Open Source JSON parser and generator for C++. +Draco is optionally used by OCCT for reading glTF files using KHR_draco_mesh_compression extension (https://github.com/google/draco). +Draco is available under Apache 2.0 license. + **DejaVu** fonts are a font family based on the Vera Fonts under a permissive license (MIT-like, https://dejavu-fonts.github.io/License.html). DejaVu Sans (basic Latin sub-set) is used by OCCT as fallback font when no system font is available. diff --git a/src/Draw/Draw_BasicCommands.cxx b/src/Draw/Draw_BasicCommands.cxx index 9c2b6c1403..0f8dd40da0 100644 --- a/src/Draw/Draw_BasicCommands.cxx +++ b/src/Draw/Draw_BasicCommands.cxx @@ -389,6 +389,11 @@ static Standard_Integer dversion(Draw_Interpretor& di, Standard_Integer, const c #else di << "RapidJSON disabled\n"; #endif +#ifdef HAVE_DRACO + di << "Draco enabled (HAVE_DRACO)\n"; +#else + di << "Draco disabled\n"; +#endif #ifdef HAVE_VTK di << "VTK enabled (HAVE_VTK)\n"; #else diff --git a/src/RWGltf/RWGltf_GltfAccessor.hxx b/src/RWGltf/RWGltf_GltfAccessor.hxx index ced6790db0..43087a04be 100644 --- a/src/RWGltf/RWGltf_GltfAccessor.hxx +++ b/src/RWGltf/RWGltf_GltfAccessor.hxx @@ -33,6 +33,7 @@ public: RWGltf_GltfAccessorLayout Type; //!< layout type RWGltf_GltfAccessorCompType ComponentType; //!< component type Graphic3d_BndBox3d BndBox; //!< bounding box + bool IsCompressed; //!< flag indicating KHR_draco_mesh_compression //! Empty constructor. RWGltf_GltfAccessor() @@ -41,7 +42,8 @@ public: Count (0), ByteStride (0), Type (RWGltf_GltfAccessorLayout_UNKNOWN), - ComponentType (RWGltf_GltfAccessorCompType_UNKNOWN) {} + ComponentType (RWGltf_GltfAccessorCompType_UNKNOWN), + IsCompressed (false) {} }; diff --git a/src/RWGltf/RWGltf_GltfJsonParser.cxx b/src/RWGltf/RWGltf_GltfJsonParser.cxx index 895718d020..c082c5c7b5 100644 --- a/src/RWGltf/RWGltf_GltfJsonParser.cxx +++ b/src/RWGltf/RWGltf_GltfJsonParser.cxx @@ -35,8 +35,9 @@ namespace { //! Material extension. - const char THE_KHR_materials_common[] = "KHR_materials_common"; - const char THE_KHR_binary_glTF[] = "KHR_binary_glTF"; + static const char THE_KHR_materials_common[] = "KHR_materials_common"; + static const char THE_KHR_binary_glTF[] = "KHR_binary_glTF"; + static const char THE_KHR_draco_mesh_compression[] = "KHR_draco_mesh_compression"; //! Data buffer referring to a portion of another buffer. class RWGltf_SubBuffer : public NCollection_Buffer @@ -1404,6 +1405,14 @@ bool RWGltf_GltfJsonParser::gltfParsePrimArray (const Handle(RWGltf_GltfLatePrim const RWGltf_JsonValue* anIndices = findObjectMember (thePrimArray, "indices"); const RWGltf_JsonValue* aMaterial = findObjectMember (thePrimArray, "material"); const RWGltf_JsonValue* aModeVal = findObjectMember (thePrimArray, "mode"); + const RWGltf_JsonValue* anExtVal = findObjectMember (thePrimArray, "extensions"); + const RWGltf_JsonValue* aDracoVal = anExtVal != NULL + ? findObjectMember (*anExtVal, THE_KHR_draco_mesh_compression) + : NULL; + const RWGltf_JsonValue* aDracoBuf = aDracoVal != NULL + ? findObjectMember (*aDracoVal, "bufferView") + : NULL; + RWGltf_GltfPrimitiveMode aMode = RWGltf_GltfPrimitiveMode_Triangles; if (anAttribs == NULL || !anAttribs->IsObject()) @@ -1473,7 +1482,7 @@ bool RWGltf_GltfJsonParser::gltfParsePrimArray (const Handle(RWGltf_GltfLatePrim reportGltfError ("Primitive array attribute accessor key '" + anAttribId + "' points to non-existing object."); return false; } - else if (!gltfParseAccessor (theMeshData, anAttribId, *anAccessor, aType)) + else if (!gltfParseAccessor (theMeshData, anAttribId, *anAccessor, aType, aDracoBuf)) { return false; } @@ -1498,7 +1507,7 @@ bool RWGltf_GltfJsonParser::gltfParsePrimArray (const Handle(RWGltf_GltfLatePrim reportGltfError ("Primitive array indices accessor key '" + anIndicesId + "' points to non-existing object."); return false; } - else if (!gltfParseAccessor (theMeshData, anIndicesId, *anAccessor, RWGltf_GltfArrayType_Indices)) + else if (!gltfParseAccessor (theMeshData, anIndicesId, *anAccessor, RWGltf_GltfArrayType_Indices, aDracoBuf)) { return false; } @@ -1518,12 +1527,17 @@ bool RWGltf_GltfJsonParser::gltfParsePrimArray (const Handle(RWGltf_GltfLatePrim bool RWGltf_GltfJsonParser::gltfParseAccessor (const Handle(RWGltf_GltfLatePrimitiveArray)& theMeshData, const TCollection_AsciiString& theName, const RWGltf_JsonValue& theAccessor, - const RWGltf_GltfArrayType theType) + const RWGltf_GltfArrayType theType, + const RWGltf_JsonValue* theCompBuffView) { RWGltf_GltfAccessor aStruct; const RWGltf_JsonValue* aTypeStr = findObjectMember (theAccessor, "type"); - const RWGltf_JsonValue* aBufferViewName = findObjectMember (theAccessor, "bufferView"); - const RWGltf_JsonValue* aByteOffset = findObjectMember (theAccessor, "byteOffset"); + const RWGltf_JsonValue* aBufferViewName = theCompBuffView == NULL + ? findObjectMember (theAccessor, "bufferView") + : theCompBuffView; + const RWGltf_JsonValue* aByteOffset = theCompBuffView == NULL + ? findObjectMember (theAccessor, "byteOffset") + : 0; const RWGltf_JsonValue* aByteStride = findObjectMember (theAccessor, "byteStride"); // byteStride was part of bufferView in glTF 1.0 const RWGltf_JsonValue* aCompType = findObjectMember (theAccessor, "componentType"); const RWGltf_JsonValue* aCount = findObjectMember (theAccessor, "count"); @@ -1534,6 +1548,7 @@ bool RWGltf_GltfJsonParser::gltfParseAccessor (const Handle(RWGltf_GltfLatePrimi return false; } aStruct.Type = RWGltf_GltfParseAccessorType (aTypeStr->GetString()); + aStruct.IsCompressed = theCompBuffView != NULL; if (aStruct.Type == RWGltf_GltfAccessorLayout_UNKNOWN) { reportGltfError ("Accessor '" + theName + "' has invalid type."); @@ -1767,6 +1782,7 @@ bool RWGltf_GltfJsonParser::gltfParseBuffer (const Handle(RWGltf_GltfLatePrimiti aData.Accessor = theAccessor; aData.Accessor.ByteStride = aByteStride; aData.StreamOffset = anOffset; + aData.StreamLength = theView.ByteLength; aData.StreamUri = myFilePath; return true; } @@ -1785,6 +1801,7 @@ bool RWGltf_GltfJsonParser::gltfParseBuffer (const Handle(RWGltf_GltfLatePrimiti aData.Accessor = theAccessor; aData.Accessor.ByteStride = aByteStride; aData.StreamOffset = anOffset; + aData.StreamLength = 0; if (!myDecodedBuffers.Find (theName, aData.StreamData)) { // it is better decoding in multiple threads @@ -1819,6 +1836,7 @@ bool RWGltf_GltfJsonParser::gltfParseBuffer (const Handle(RWGltf_GltfLatePrimiti aData.Accessor = theAccessor; aData.Accessor.ByteStride = aByteStride; aData.StreamOffset = anOffset; + aData.StreamLength = theView.ByteLength; aData.StreamUri = myFolder + anUri; if (myExternalFiles != NULL) { diff --git a/src/RWGltf/RWGltf_GltfJsonParser.hxx b/src/RWGltf/RWGltf_GltfJsonParser.hxx index 8ba7ab5201..b285932e02 100644 --- a/src/RWGltf/RWGltf_GltfJsonParser.hxx +++ b/src/RWGltf/RWGltf_GltfJsonParser.hxx @@ -196,7 +196,8 @@ protected: Standard_EXPORT bool gltfParseAccessor (const Handle(RWGltf_GltfLatePrimitiveArray)& theMeshData, const TCollection_AsciiString& theName, const RWGltf_JsonValue& theAccessor, - const RWGltf_GltfArrayType theType); + const RWGltf_GltfArrayType theType, + const RWGltf_JsonValue* theCompBuffView); //! Parse buffer view. Standard_EXPORT bool gltfParseBufferView (const Handle(RWGltf_GltfLatePrimitiveArray)& theMeshData, diff --git a/src/RWGltf/RWGltf_GltfLatePrimitiveArray.hxx b/src/RWGltf/RWGltf_GltfLatePrimitiveArray.hxx index 1c39f4106a..10e2d299b7 100644 --- a/src/RWGltf/RWGltf_GltfLatePrimitiveArray.hxx +++ b/src/RWGltf/RWGltf_GltfLatePrimitiveArray.hxx @@ -78,7 +78,7 @@ public: //! Add primitive array data element. Standard_EXPORT RWGltf_GltfPrimArrayData& AddPrimArrayData (RWGltf_GltfArrayType theType); - //! Return TRUE if there is deferred storege and some triangulation data + //! Return TRUE if there is deferred storage and some triangulation data //! that can be loaded using LoadDeferredData(). virtual Standard_Boolean HasDeferredData() const Standard_OVERRIDE { diff --git a/src/RWGltf/RWGltf_GltfPrimArrayData.hxx b/src/RWGltf/RWGltf_GltfPrimArrayData.hxx index 752f3202e2..18cbac7981 100644 --- a/src/RWGltf/RWGltf_GltfPrimArrayData.hxx +++ b/src/RWGltf/RWGltf_GltfPrimArrayData.hxx @@ -27,15 +27,16 @@ public: Handle(NCollection_Buffer) StreamData; TCollection_AsciiString StreamUri; int64_t StreamOffset; + int64_t StreamLength; RWGltf_GltfAccessor Accessor; RWGltf_GltfArrayType Type; RWGltf_GltfPrimArrayData() - : StreamOffset (0), Type (RWGltf_GltfArrayType_UNKNOWN) {} + : StreamOffset (0), StreamLength (0), Type (RWGltf_GltfArrayType_UNKNOWN) {} RWGltf_GltfPrimArrayData (RWGltf_GltfArrayType theType) - : StreamOffset (0), Type (theType) {} + : StreamOffset (0), StreamLength (0), Type (theType) {} }; #endif // _RWGltf_GltfPrimArrayData_HeaderFile diff --git a/src/RWGltf/RWGltf_TriangulationReader.cxx b/src/RWGltf/RWGltf_TriangulationReader.cxx index 09fbf6d3e0..d4dff574bc 100644 --- a/src/RWGltf/RWGltf_TriangulationReader.cxx +++ b/src/RWGltf/RWGltf_TriangulationReader.cxx @@ -21,11 +21,63 @@ #include #include +#ifdef HAVE_DRACO + #include +#endif + namespace { static const Standard_Integer THE_LOWER_TRI_INDEX = 1; static const Standard_Integer THE_LOWER_NODE_INDEX = 1; static const Standard_ShortReal THE_NORMAL_PREC2 = 0.001f; + +#ifdef HAVE_DRACO + //! Return array type from Draco attribute type. + static RWGltf_GltfArrayType arrayTypeFromDraco (draco::GeometryAttribute::Type theType) + { + switch (theType) + { + case draco::GeometryAttribute::POSITION: return RWGltf_GltfArrayType_Position; + case draco::GeometryAttribute::NORMAL: return RWGltf_GltfArrayType_Normal; + case draco::GeometryAttribute::COLOR: return RWGltf_GltfArrayType_Color; + case draco::GeometryAttribute::TEX_COORD: return RWGltf_GltfArrayType_TCoord0; + default: return RWGltf_GltfArrayType_UNKNOWN; + } + } + + //! Return layout from Draco number of components. + static RWGltf_GltfAccessorLayout layoutFromDraco (int8_t theNbComps) + { + switch (theNbComps) + { + case 1: return RWGltf_GltfAccessorLayout_Scalar; + case 2: return RWGltf_GltfAccessorLayout_Vec2; + case 3: return RWGltf_GltfAccessorLayout_Vec3; + case 4: return RWGltf_GltfAccessorLayout_Vec4; + } + return RWGltf_GltfAccessorLayout_UNKNOWN; + } + + //! Return component type from Draco data type. + static RWGltf_GltfAccessorCompType compTypeFromDraco (draco::DataType theType) + { + switch (theType) + { + case draco::DT_INT8: return RWGltf_GltfAccessorCompType_Int8; + case draco::DT_UINT8: return RWGltf_GltfAccessorCompType_UInt8; + case draco::DT_INT16: return RWGltf_GltfAccessorCompType_Int16; + case draco::DT_UINT16: return RWGltf_GltfAccessorCompType_UInt16; + case draco::DT_INT32: + case draco::DT_UINT32: return RWGltf_GltfAccessorCompType_UInt32; + //case draco::DT_INT64: + //case draco::DT_UINT64: + case draco::DT_FLOAT32: return RWGltf_GltfAccessorCompType_Float32; + //case draco::DT_FLOAT64: + //case draco::DT_BOOL: + default: return RWGltf_GltfAccessorCompType_UNKNOWN; + } + } +#endif } IMPLEMENT_STANDARD_RTTIEXT(RWGltf_TriangulationReader, RWMesh_TriangulationReader) @@ -104,9 +156,10 @@ bool RWGltf_TriangulationReader::readFileData (const Handle(RWGltf_GltfLatePrimi (theGltfData.StreamUri, std::ios::in | std::ios::binary, theGltfData.StreamOffset); if (aSharedStream.get() == NULL) { - reportError (TCollection_AsciiString("Buffer '") + theSourceGltfMesh->Id() + "refers to invalid file '" + theGltfData.StreamUri + "'."); + reportError (TCollection_AsciiString("Buffer '") + theSourceGltfMesh->Id() + "' refers to invalid file '" + theGltfData.StreamUri + "'."); return false; } + if (!readBuffer (theSourceGltfMesh, theDestMesh, *aSharedStream.get(), theGltfData.Accessor, theGltfData.Type)) { return false; @@ -149,6 +202,218 @@ bool RWGltf_TriangulationReader::loadStreamData (const Handle(RWMesh_Triangulati return wasLoaded; } +// ======================================================================= +// function : readDracoBuffer +// purpose : +// ======================================================================= +bool RWGltf_TriangulationReader::readDracoBuffer (const Handle(RWGltf_GltfLatePrimitiveArray)& theSourceGltfMesh, + const RWGltf_GltfPrimArrayData& theGltfData, + const Handle(Poly_Triangulation)& theDestMesh, + const Handle(OSD_FileSystem)& theFileSystem) const +{ + const TCollection_AsciiString& aName = theSourceGltfMesh->Id(); + const Handle(OSD_FileSystem)& aFileSystem = !theFileSystem.IsNull() ? theFileSystem : OSD_FileSystem::DefaultFileSystem(); + opencascade::std::shared_ptr aSharedStream = aFileSystem->OpenIStream (theGltfData.StreamUri, std::ios::in | std::ios::binary, theGltfData.StreamOffset); + if (aSharedStream.get() == NULL) + { + reportError (TCollection_AsciiString("Buffer '") + aName + "' refers to invalid file '" + theGltfData.StreamUri + "'."); + return false; + } + +#ifdef HAVE_DRACO + std::vector aReadData; + aReadData.resize (theGltfData.StreamLength); + aSharedStream->read (aReadData.data(), (std::streamsize )theGltfData.StreamLength); + if (!aSharedStream->good()) + { + reportError (TCollection_AsciiString("Buffer '") + aName + "' refers to file that cannot be read '" + theGltfData.StreamUri + "'."); + return false; + } + + draco::DecoderBuffer aDracoBuf; + aDracoBuf.Init (aReadData.data(), aReadData.size()); + + draco::Decoder aDracoDecoder; + draco::StatusOr> aDracoStat = aDracoDecoder.DecodeMeshFromBuffer (&aDracoBuf); + if (!aDracoStat.ok() || aDracoStat.value().get() == NULL) + { + reportError (TCollection_AsciiString("Buffer '") + aName + "' refers to Draco data that cannot be decoded '" + theGltfData.StreamUri + "'."); + return false; + } + + const Standard_Integer aNbNodes = (Standard_Integer )aDracoStat.value()->num_points(); + const Standard_Integer aNbTris = (Standard_Integer )aDracoStat.value()->num_faces(); + if (aNbNodes < 0) + { + reportError (TCollection_AsciiString ("Buffer '") + aName + "' defines an empty array."); + return false; + } + if ((int64_t )aDracoStat.value()->num_points() > std::numeric_limits::max()) + { + reportError (TCollection_AsciiString ("Buffer '") + aName + "' defines too big array."); + return false; + } + if (!setNbPositionNodes (theDestMesh, aNbNodes)) + { + return false; + } + + if (aNbTris > 0 + && !setNbTriangles (theDestMesh, aNbTris)) + { + return false; + } + + // copy vertex attributes + for (int32_t anAttrIter = 0; anAttrIter < aDracoStat.value()->num_attributes(); ++anAttrIter) + { + const draco::PointAttribute* anAttrib = aDracoStat.value()->attribute (anAttrIter); + const RWGltf_GltfArrayType aWrapType = arrayTypeFromDraco(anAttrib->attribute_type()); + const RWGltf_GltfAccessorLayout aWrapLayout = layoutFromDraco (anAttrib->num_components()); + const RWGltf_GltfAccessorCompType aWrapCompType = compTypeFromDraco (anAttrib->data_type()); + switch (aWrapType) + { + case RWGltf_GltfArrayType_Position: + { + if (aWrapCompType != RWGltf_GltfAccessorCompType_Float32 + || aWrapLayout != RWGltf_GltfAccessorLayout_Vec3) + { + reportError (TCollection_AsciiString ("Buffer '") + aName + "' has unsupported position data type."); + return false; + } + + for (Standard_Integer aVertIter = 0; aVertIter < aNbNodes; ++aVertIter) + { + const Graphic3d_Vec3* aVec3 = reinterpret_cast(anAttrib->GetAddressOfMappedIndex (draco::PointIndex (aVertIter))); + if (aVec3 == NULL) + { + reportError (TCollection_AsciiString ("Buffer '") + aName + "' reading error."); + return false; + } + + gp_Pnt anXYZ (aVec3->x(), aVec3->y(), aVec3->z()); + myCoordSysConverter.TransformPosition (anXYZ.ChangeCoord()); + setNodePosition (theDestMesh, THE_LOWER_NODE_INDEX + aVertIter, anXYZ); + } + } + case RWGltf_GltfArrayType_Normal: + { + if (aWrapCompType != RWGltf_GltfAccessorCompType_Float32 + || aWrapLayout != RWGltf_GltfAccessorLayout_Vec3) + { + Message::SendTrace (TCollection_AsciiString() + "Vertex normals in unsupported format have been skipped while reading glTF triangulation '" + aName + "'"); + break; + } + + if (!setNbNormalNodes (theDestMesh, aNbNodes)) + { + return false; + } + + for (Standard_Integer aVertIter = 0; aVertIter < aNbNodes; ++aVertIter) + { + const Graphic3d_Vec3* aVec3 = reinterpret_cast(anAttrib->GetAddressOfMappedIndex (draco::PointIndex (aVertIter))); + if (aVec3 == NULL) + { + reportError (TCollection_AsciiString ("Buffer '") + aName + "' reading error."); + return false; + } + if (aVec3->SquareModulus() >= THE_NORMAL_PREC2) + { + Graphic3d_Vec3 aVec3Copy = *aVec3; + myCoordSysConverter.TransformNormal (aVec3Copy); + setNodeNormal (theDestMesh, THE_LOWER_NODE_INDEX + aVertIter, aVec3Copy); + } + else + { + setNodeNormal (theDestMesh, THE_LOWER_NODE_INDEX + aVertIter, gp_Vec3f(0.0, 0.0, 1.0)); + } + } + break; + } + case RWGltf_GltfArrayType_TCoord0: + { + if (aWrapCompType != RWGltf_GltfAccessorCompType_Float32 + || aWrapLayout != RWGltf_GltfAccessorLayout_Vec2) + { + Message::SendTrace (TCollection_AsciiString() + "Vertex UV coordinates in unsupported format have been skipped while reading glTF triangulation '" + aName + "'"); + break; + } + + if (!setNbUVNodes (theDestMesh, aNbNodes)) + { + return false; + } + + for (int aVertIter = 0; aVertIter < aNbNodes; ++aVertIter) + { + const Graphic3d_Vec2* aVec2 = reinterpret_cast(anAttrib->GetAddressOfMappedIndex (draco::PointIndex (aVertIter))); + if (aVec2 == NULL) + { + reportError (TCollection_AsciiString ("Buffer '") + aName + "' reading error."); + return false; + } + + // Y should be flipped (relative to image layout used by OCCT) + float aTexY = 1.0f - aVec2->y(); + setNodeUV (theDestMesh, THE_LOWER_NODE_INDEX + aVertIter, gp_Pnt2d (aVec2->x(), aTexY)); + } + break; + } + default: + { + break; + } + } + } + + // copy triangles + Standard_Integer aLastTriIndex = 0; + for (Standard_Integer aFaceIter = 0; aFaceIter < aNbTris; ++aFaceIter) + { + const draco::Mesh::Face& aFace = aDracoStat.value()->face (draco::FaceIndex (aFaceIter)); + Poly_Triangle aVec3; + aVec3.ChangeValue (1) = THE_LOWER_NODE_INDEX + aFace[0].value(); + aVec3.ChangeValue (2) = THE_LOWER_NODE_INDEX + aFace[1].value(); + aVec3.ChangeValue (3) = THE_LOWER_NODE_INDEX + aFace[2].value(); + const Standard_Integer wasSet = setTriangle (theDestMesh, THE_LOWER_TRI_INDEX + aLastTriIndex, aVec3); + if (!wasSet) + { + reportError (TCollection_AsciiString ("Buffer '") + aName + "' refers to invalid indices."); + } + if (wasSet > 0) + { + ++aLastTriIndex; + } + } + + const Standard_Integer aNbDegenerate = aNbTris - aLastTriIndex; + if (aNbDegenerate > 0) + { + if (aNbDegenerate == aNbTris) + { + Message::SendWarning (TCollection_AsciiString("Buffer '") + aName + "' has been skipped (all elements are degenerative in)"); + return false; + } + theSourceGltfMesh->ChangeDegeneratedTriNb() += aNbDegenerate; + if (myLoadingStatistic == NULL && myToPrintDebugMessages) + { + Message::SendTrace (TCollection_AsciiString() + aNbDegenerate + + " degenerate triangles have been skipped while reading glTF triangulation '" + aName + "'"); + } + if (!setNbTriangles (theDestMesh, aLastTriIndex, true)) + { + return false; + } + } + return true; +#else + (void )theDestMesh; + reportError (TCollection_AsciiString ("Buffer '") + aName + "' refers to unsupported compressed data."); + return false; +#endif +} + // ======================================================================= // function : load // purpose : @@ -164,22 +429,39 @@ bool RWGltf_TriangulationReader::load (const Handle(RWMesh_TriangulationSource)& return false; } + bool hasCompressed = false; for (NCollection_Sequence::Iterator aDataIter (aSourceGltfMesh->Data()); aDataIter.More(); aDataIter.Next()) { const RWGltf_GltfPrimArrayData& aData = aDataIter.Value(); + const TCollection_AsciiString& aName = aSourceGltfMesh->Id(); if (!aData.StreamData.IsNull()) { - Message::SendWarning (TCollection_AsciiString("Buffer '") + aSourceGltfMesh->Id() + + Message::SendWarning (TCollection_AsciiString("Buffer '") + aName + "' contains stream data that cannot be loaded during deferred data loading."); continue; } else if (aData.StreamUri.IsEmpty()) { - reportError (TCollection_AsciiString ("Buffer '") + aSourceGltfMesh->Id() + "' does not define uri."); + reportError (TCollection_AsciiString ("Buffer '") + aName + "' does not define uri."); return false; } - if (!readFileData (aSourceGltfMesh, aData, theDestMesh, theFileSystem)) + if (aData.Accessor.IsCompressed) + { + if (hasCompressed) + { + // already decoded (compressed stream defines all attributes at once) + continue; + } + if (!readDracoBuffer (aSourceGltfMesh, aData, theDestMesh, theFileSystem)) + { + return false; + } + + // keep decoding - there are might be uncompressed attributes in addition to compressed + hasCompressed = true; + } + else if (!readFileData (aSourceGltfMesh, aData, theDestMesh, theFileSystem)) { return false; } diff --git a/src/RWGltf/RWGltf_TriangulationReader.hxx b/src/RWGltf/RWGltf_TriangulationReader.hxx index 821c08d350..30ef3fb3be 100644 --- a/src/RWGltf/RWGltf_TriangulationReader.hxx +++ b/src/RWGltf/RWGltf_TriangulationReader.hxx @@ -97,6 +97,16 @@ protected: const RWGltf_GltfAccessor& theAccessor, RWGltf_GltfArrayType theType) const; + //! Reads primitive array from file data compressed in Draco format. + //! @param theSourceGltfMesh source glTF triangulation + //! @param theGltfData primitive array element (Uri of file stream should not be empty) + //! @param theDestMesh triangulation to be modified + //! @param theFileSystem shared file system to read from + Standard_EXPORT virtual bool readDracoBuffer (const Handle(RWGltf_GltfLatePrimitiveArray)& theSourceGltfMesh, + const RWGltf_GltfPrimArrayData& theGltfData, + const Handle(Poly_Triangulation)& theDestMesh, + const Handle(OSD_FileSystem)& theFileSystem) const; + protected: Handle(Poly_Triangulation) myTriangulation; diff --git a/src/TKOpenGl/EXTERNLIB b/src/TKOpenGl/EXTERNLIB index 8760fee2cd..5e298d1ea5 100755 --- a/src/TKOpenGl/EXTERNLIB +++ b/src/TKOpenGl/EXTERNLIB @@ -2,7 +2,6 @@ TKernel TKService TKMath CSF_TBB -CSF_FREETYPE CSF_OpenGlLibs CSF_user32 CSF_gdi32 diff --git a/src/TKRWMesh/EXTERNLIB b/src/TKRWMesh/EXTERNLIB index 6d9bc46945..b1331b6af3 100644 --- a/src/TKRWMesh/EXTERNLIB +++ b/src/TKRWMesh/EXTERNLIB @@ -8,3 +8,4 @@ TKBRep TKG3d TKService CSF_RapidJSON +CSF_Draco From fd42e7645d24214c081c9839d4a5f0816b1c76d4 Mon Sep 17 00:00:00 2001 From: kgv Date: Wed, 11 Aug 2021 16:11:45 +0300 Subject: [PATCH 010/639] 0032527: Data Exchange, RWGltf_CafWriter - make name format configurable Added properties RWGltf_CafWriter::NodeNameFormat() and ::MeshNameFormat(). --- src/RWGltf/RWGltf_CafWriter.cxx | 47 ++++++------ src/RWGltf/RWGltf_CafWriter.hxx | 23 ++++++ src/RWMesh/FILES | 3 + src/RWMesh/RWMesh.cxx | 112 ++++++++++++++++++++++++++++ src/RWMesh/RWMesh.hxx | 38 ++++++++++ src/RWMesh/RWMesh_NameFormat.hxx | 30 ++++++++ src/XSDRAWSTLVRML/XSDRAWSTLVRML.cxx | 90 +++++++++++++++++++++- 7 files changed, 320 insertions(+), 23 deletions(-) create mode 100644 src/RWMesh/RWMesh.cxx create mode 100644 src/RWMesh/RWMesh.hxx create mode 100644 src/RWMesh/RWMesh_NameFormat.hxx diff --git a/src/RWGltf/RWGltf_CafWriter.cxx b/src/RWGltf/RWGltf_CafWriter.cxx index 3888e725f3..f06f8034af 100644 --- a/src/RWGltf/RWGltf_CafWriter.cxx +++ b/src/RWGltf/RWGltf_CafWriter.cxx @@ -27,6 +27,7 @@ #include #include #include +#include #include #include #include @@ -79,19 +80,6 @@ namespace { theStream.write ((const char* )theTri.GetData(), sizeof(theTri)); } - -#ifdef HAVE_RAPIDJSON - //! Read name attribute. - static TCollection_AsciiString readNameAttribute (const TDF_Label& theRefLabel) - { - Handle(TDataStd_Name) aNodeName; - if (!theRefLabel.FindAttribute (TDataStd_Name::GetID(), aNodeName)) - { - return TCollection_AsciiString(); - } - return TCollection_AsciiString (aNodeName->Get()); - } -#endif } //================================================================ @@ -102,6 +90,8 @@ RWGltf_CafWriter::RWGltf_CafWriter (const TCollection_AsciiString& theFile, Standard_Boolean theIsBinary) : myFile (theFile), myTrsfFormat (RWGltf_WriterTrsfFormat_Compact), + myNodeNameFormat(RWMesh_NameFormat_InstanceOrProduct), + myMeshNameFormat(RWMesh_NameFormat_Product), myIsBinary (theIsBinary), myIsForcedUVExport (false), myToEmbedTexturesInGlb (true), @@ -127,6 +117,17 @@ RWGltf_CafWriter::~RWGltf_CafWriter() myWriter.reset(); } +//================================================================ +// Function : formatName +// Purpose : +//================================================================ +TCollection_AsciiString RWGltf_CafWriter::formatName (RWMesh_NameFormat theFormat, + const TDF_Label& theLabel, + const TDF_Label& theRefLabel) const +{ + return RWMesh::FormatName (theFormat, theLabel, theRefLabel); +} + //================================================================ // Function : toSkipFaceMesh // Purpose : @@ -660,7 +661,7 @@ bool RWGltf_CafWriter::writeJson (const Handle(TDocStd_Document)& theDocument, else { // glTF disallows empty meshes / primitive arrays - const TCollection_AsciiString aNodeName = readNameAttribute (aDocNode.RefLabel); + const TCollection_AsciiString aNodeName = formatName (RWMesh_NameFormat_ProductOrInstance, aDocNode.Label, aDocNode.RefLabel); Message::SendWarning (TCollection_AsciiString("RWGltf_CafWriter skipped node '") + aNodeName + "' without triangulation data"); } } @@ -1294,7 +1295,7 @@ void RWGltf_CafWriter::writeMeshes (const RWGltf_GltfSceneNodeMap& theSceneNodeM for (RWGltf_GltfSceneNodeMap::Iterator aSceneNodeIter (theSceneNodeMap); aSceneNodeIter.More(); aSceneNodeIter.Next()) { const XCAFPrs_DocumentNode& aDocNode = aSceneNodeIter.Value(); - const TCollection_AsciiString aNodeName = readNameAttribute (aDocNode.RefLabel); + const TCollection_AsciiString aNodeName = formatName (myMeshNameFormat, aDocNode.Label, aDocNode.RefLabel); bool toStartPrims = true; Standard_Integer aNbFacesInNode = 0; @@ -1309,8 +1310,11 @@ void RWGltf_CafWriter::writeMeshes (const RWGltf_GltfSceneNodeMap& theSceneNodeM { toStartPrims = false; myWriter->StartObject(); - myWriter->Key ("name"); - myWriter->String (aNodeName.ToCString()); + if (!aNodeName.IsEmpty()) + { + myWriter->Key ("name"); + myWriter->String (aNodeName.ToCString()); + } myWriter->Key ("primitives"); myWriter->StartArray(); } @@ -1520,13 +1524,12 @@ void RWGltf_CafWriter::writeNodes (const Handle(TDocStd_Document)& theDocument, } } { - TCollection_AsciiString aNodeName = readNameAttribute (aDocNode.Label); - if (aNodeName.IsEmpty()) + const TCollection_AsciiString aNodeName = formatName (myNodeNameFormat, aDocNode.Label, aDocNode.RefLabel); + if (!aNodeName.IsEmpty()) { - aNodeName = readNameAttribute (aDocNode.RefLabel); + myWriter->Key ("name"); + myWriter->String (aNodeName.ToCString()); } - myWriter->Key ("name"); - myWriter->String (aNodeName.ToCString()); } myWriter->EndObject(); } diff --git a/src/RWGltf/RWGltf_CafWriter.hxx b/src/RWGltf/RWGltf_CafWriter.hxx index 0d84cb1998..5aad88a326 100644 --- a/src/RWGltf/RWGltf_CafWriter.hxx +++ b/src/RWGltf/RWGltf_CafWriter.hxx @@ -22,6 +22,7 @@ #include #include #include +#include #include #include @@ -66,6 +67,18 @@ public: //! Set preferred transformation format for writing into glTF file. void SetTransformationFormat (RWGltf_WriterTrsfFormat theFormat) { myTrsfFormat = theFormat; } + //! Return name format for exporting Nodes; RWMesh_NameFormat_InstanceOrProduct by default. + RWMesh_NameFormat NodeNameFormat() const { return myNodeNameFormat; } + + //! Set name format for exporting Nodes. + void SetNodeNameFormat (RWMesh_NameFormat theFormat) { myNodeNameFormat = theFormat; } + + //! Return name format for exporting Meshes; RWMesh_NameFormat_Product by default. + RWMesh_NameFormat MeshNameFormat() const { return myMeshNameFormat; } + + //! Set name format for exporting Meshes. + void SetMeshNameFormat (RWMesh_NameFormat theFormat) { myMeshNameFormat = theFormat; } + //! Return TRUE to export UV coordinates even if there are no mapped texture; FALSE by default. bool IsForcedUVExport() const { return myIsForcedUVExport; } @@ -145,6 +158,14 @@ protected: //! Return TRUE if face mesh should be skipped (e.g. because it is invalid or empty). Standard_EXPORT virtual Standard_Boolean toSkipFaceMesh (const RWMesh_FaceIterator& theFaceIter); + //! Generate name for specified labels. + //! @param[in] theFormat name format to apply + //! @param[in] theLabel instance label + //! @param[in] theRefLabel product label + Standard_EXPORT virtual TCollection_AsciiString formatName (RWMesh_NameFormat theFormat, + const TDF_Label& theLabel, + const TDF_Label& theRefLabel) const; + //! Write mesh nodes into binary file. //! @param theGltfFace [out] glTF face definition //! @param theBinFile [out] output file to write into @@ -278,6 +299,8 @@ protected: TCollection_AsciiString myBinFileNameFull; //!< output file with binary data (full path) TCollection_AsciiString myBinFileNameShort; //!< output file with binary data (short path) RWGltf_WriterTrsfFormat myTrsfFormat; //!< transformation format to write into glTF file + RWMesh_NameFormat myNodeNameFormat; //!< name format for exporting Nodes + RWMesh_NameFormat myMeshNameFormat; //!< name format for exporting Meshes Standard_Boolean myIsBinary; //!< flag to write into binary glTF format (.glb) Standard_Boolean myIsForcedUVExport; //!< export UV coordinates even if there are no mapped texture Standard_Boolean myToEmbedTexturesInGlb; //!< flag to write image textures into GLB file diff --git a/src/RWMesh/FILES b/src/RWMesh/FILES index 6cf988993f..b2b4299722 100644 --- a/src/RWMesh/FILES +++ b/src/RWMesh/FILES @@ -1,3 +1,5 @@ +RWMesh.cxx +RWMesh.hxx RWMesh_CoordinateSystem.hxx RWMesh_CoordinateSystemConverter.cxx RWMesh_CoordinateSystemConverter.hxx @@ -7,6 +9,7 @@ RWMesh_FaceIterator.cxx RWMesh_FaceIterator.hxx RWMesh_MaterialMap.cxx RWMesh_MaterialMap.hxx +RWMesh_NameFormat.hxx RWMesh_NodeAttributes.hxx RWMesh_TriangulationReader.cxx RWMesh_TriangulationReader.hxx diff --git a/src/RWMesh/RWMesh.cxx b/src/RWMesh/RWMesh.cxx new file mode 100644 index 0000000000..19a94ab3a4 --- /dev/null +++ b/src/RWMesh/RWMesh.cxx @@ -0,0 +1,112 @@ +// Copyright (c) 2021 OPEN CASCADE SAS +// +// This file is part of Open CASCADE Technology software library. +// +// This library is free software; you can redistribute it and/or modify it under +// the terms of the GNU Lesser General Public License version 2.1 as published +// by the Free Software Foundation, with special exception defined in the file +// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT +// distribution for complete text of the license and disclaimer of any warranty. +// +// Alternatively, this file may be used under the terms of Open CASCADE +// commercial license or contractual agreement. + +#include + +#include +#include + +// ================================================================ +// Function : ReadNameAttribute +// Purpose : +// ================================================================ +TCollection_AsciiString RWMesh::ReadNameAttribute (const TDF_Label& theLabel) +{ + Handle(TDataStd_Name) aNodeName; + return theLabel.FindAttribute (TDataStd_Name::GetID(), aNodeName) + ? TCollection_AsciiString (aNodeName->Get()) + : TCollection_AsciiString(); +} + +// ================================================================ +// Function : FormatName +// Purpose : +// ================================================================ +TCollection_AsciiString RWMesh::FormatName (RWMesh_NameFormat theFormat, + const TDF_Label& theLabel, + const TDF_Label& theRefLabel) +{ + switch (theFormat) + { + case RWMesh_NameFormat_Empty: + { + return TCollection_AsciiString(); + } + case RWMesh_NameFormat_Product: + { + Handle(TDataStd_Name) aRefNodeName; + return theRefLabel.FindAttribute (TDataStd_Name::GetID(), aRefNodeName) + ? TCollection_AsciiString (aRefNodeName->Get()) + : TCollection_AsciiString(); + } + case RWMesh_NameFormat_Instance: + { + Handle(TDataStd_Name) aNodeName; + return theLabel.FindAttribute (TDataStd_Name::GetID(), aNodeName) + ? TCollection_AsciiString (aNodeName->Get()) + : TCollection_AsciiString(); + } + case RWMesh_NameFormat_InstanceOrProduct: + { + Handle(TDataStd_Name) aNodeName; + if (theLabel.FindAttribute (TDataStd_Name::GetID(), aNodeName) + && !aNodeName->Get().IsEmpty()) + { + return TCollection_AsciiString (aNodeName->Get()); + } + + Handle(TDataStd_Name) aRefNodeName; + return theRefLabel.FindAttribute (TDataStd_Name::GetID(), aRefNodeName) + ? TCollection_AsciiString (aRefNodeName->Get()) + : TCollection_AsciiString(); + } + case RWMesh_NameFormat_ProductOrInstance: + { + Handle(TDataStd_Name) aRefNodeName; + if (theRefLabel.FindAttribute (TDataStd_Name::GetID(), aRefNodeName) + && !aRefNodeName->Get().IsEmpty()) + { + return TCollection_AsciiString (aRefNodeName->Get()); + } + + Handle(TDataStd_Name) aNodeName; + return theLabel.FindAttribute (TDataStd_Name::GetID(), aNodeName) + ? TCollection_AsciiString (aNodeName->Get()) + : TCollection_AsciiString(); + } + case RWMesh_NameFormat_ProductAndInstance: + { + const TCollection_AsciiString anInstName = ReadNameAttribute (theLabel); + const TCollection_AsciiString aProdName = ReadNameAttribute (theRefLabel); + return !anInstName.IsEmpty() + && aProdName != anInstName + ? aProdName + " [" + anInstName + "]" + : (!aProdName.IsEmpty() + ? aProdName + : TCollection_AsciiString("")); + } + case RWMesh_NameFormat_ProductAndInstanceAndOcaf: + { + const TCollection_AsciiString anInstName = ReadNameAttribute (theLabel); + const TCollection_AsciiString aProdName = ReadNameAttribute (theRefLabel); + TCollection_AsciiString anEntryId; + TDF_Tool::Entry (theLabel, anEntryId); + return !anInstName.IsEmpty() + && aProdName != anInstName + ? aProdName + " [" + anInstName + "]" + " [" + anEntryId + "]" + : aProdName + " [" + anEntryId + "]"; + } + } + + return TCollection_AsciiString(); +} diff --git a/src/RWMesh/RWMesh.hxx b/src/RWMesh/RWMesh.hxx new file mode 100644 index 0000000000..d5f5157f18 --- /dev/null +++ b/src/RWMesh/RWMesh.hxx @@ -0,0 +1,38 @@ +// Author: Kirill Gavrilov +// Copyright (c) 2016-2019 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 _RWMesh_HeaderFile +#define _RWMesh_HeaderFile + +#include +#include + +//! Auxiliary tools for RWMesh package. +class RWMesh +{ +public: + + //! Read name attribute from label. + Standard_EXPORT static TCollection_AsciiString ReadNameAttribute (const TDF_Label& theLabel); + + //! Generate name for specified labels. + //! @param[in] theFormat name format to apply + //! @param[in] theLabel instance label + //! @param[in] theRefLabel product label + Standard_EXPORT static TCollection_AsciiString FormatName (RWMesh_NameFormat theFormat, + const TDF_Label& theLabel, + const TDF_Label& theRefLabel); +}; + +#endif // _RWMesh_HeaderFile diff --git a/src/RWMesh/RWMesh_NameFormat.hxx b/src/RWMesh/RWMesh_NameFormat.hxx new file mode 100644 index 0000000000..9a9aca80d4 --- /dev/null +++ b/src/RWMesh/RWMesh_NameFormat.hxx @@ -0,0 +1,30 @@ +// Copyright: Open CASCADE 2021 +// +// 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 _RWMesh_NameFormat_HeaderFile +#define _RWMesh_NameFormat_HeaderFile + +//! Name format preference for XCAF shape labels. +enum RWMesh_NameFormat +{ + RWMesh_NameFormat_Empty, //!< omit the name + RWMesh_NameFormat_Product, //!< return Product name + //! (e.g. from XCAFDoc_ShapeTool::GetReferredShape(), which could be shared by multiple Instances) + RWMesh_NameFormat_Instance, //!< return Instance name + RWMesh_NameFormat_InstanceOrProduct, //!< return Instance name when available and Product name otherwise + RWMesh_NameFormat_ProductOrInstance, //!< return Product name when available and Instance name otherwise + RWMesh_NameFormat_ProductAndInstance, //!< generate "Product [Instance]" name + RWMesh_NameFormat_ProductAndInstanceAndOcaf, //!< generate name combining Product+Instance+Ocaf (useful for debugging purposes) +}; + +#endif // _RWMesh_NameFormat_HeaderFile diff --git a/src/XSDRAWSTLVRML/XSDRAWSTLVRML.cxx b/src/XSDRAWSTLVRML/XSDRAWSTLVRML.cxx index 4569f8785f..6a847af543 100644 --- a/src/XSDRAWSTLVRML/XSDRAWSTLVRML.cxx +++ b/src/XSDRAWSTLVRML/XSDRAWSTLVRML.cxx @@ -90,6 +90,64 @@ extern Standard_Boolean VDisplayAISObject (const TCollection_AsciiString& theNam const Handle(AIS_InteractiveObject)& theAISObj, Standard_Boolean theReplaceIfExists = Standard_True); +//! Parse RWMesh_NameFormat enumeration. +static bool parseNameFormat (const char* theArg, + RWMesh_NameFormat& theFormat) +{ + TCollection_AsciiString aName (theArg); + aName.LowerCase(); + if (aName == "empty") + { + theFormat = RWMesh_NameFormat_Empty; + } + else if (aName == "product" + || aName == "prod") + { + theFormat = RWMesh_NameFormat_Product; + } + else if (aName == "instance" + || aName == "inst") + { + theFormat = RWMesh_NameFormat_Instance; + } + else if (aName == "instanceorproduct" + || aName == "instance||product" + || aName == "instance|product" + || aName == "instorprod" + || aName == "inst||prod" + || aName == "inst|prod") + { + theFormat = RWMesh_NameFormat_InstanceOrProduct; + } + else if (aName == "productorinstance" + || aName == "product||instance" + || aName == "product|instance" + || aName == "prodorinst" + || aName == "prod||inst" + || aName == "prod|inst") + { + theFormat = RWMesh_NameFormat_ProductOrInstance; + } + else if (aName == "productandinstance" + || aName == "prodandinst" + || aName == "product&instance" + || aName == "prod&inst") + { + theFormat = RWMesh_NameFormat_ProductAndInstance; + } + else if (aName == "productandinstanceandocaf" + || aName == "verbose" + || aName == "debug") + { + theFormat = RWMesh_NameFormat_ProductAndInstanceAndOcaf; + } + else + { + return false; + } + return true; +} + //============================================================================= //function : ReadGltf //purpose : Reads glTF file @@ -276,6 +334,8 @@ static Standard_Integer WriteGltf (Draw_Interpretor& theDI, TColStd_IndexedDataMapOfStringString aFileInfo; RWGltf_WriterTrsfFormat aTrsfFormat = RWGltf_WriterTrsfFormat_Compact; bool toForceUVExport = false, toEmbedTexturesInGlb = true; + RWMesh_NameFormat aNodeNameFormat = RWMesh_NameFormat_InstanceOrProduct; + RWMesh_NameFormat aMeshNameFormat = RWMesh_NameFormat_Product; for (Standard_Integer anArgIter = 1; anArgIter < theNbArgs; ++anArgIter) { TCollection_AsciiString anArgCase (theArgVec[anArgIter]); @@ -323,6 +383,28 @@ static Standard_Integer WriteGltf (Draw_Interpretor& theDI, return 1; } } + else if (anArgCase == "-nodenameformat" + || anArgCase == "-nodename") + { + ++anArgIter; + if (anArgIter >= theNbArgs + || !parseNameFormat (theArgVec[anArgIter], aNodeNameFormat)) + { + Message::SendFail() << "Syntax error at '" << anArgCase << "'"; + return 1; + } + } + else if (anArgCase == "-meshnameformat" + || anArgCase == "-meshname") + { + ++anArgIter; + if (anArgIter >= theNbArgs + || !parseNameFormat (theArgVec[anArgIter], aMeshNameFormat)) + { + Message::SendFail() << "Syntax error at '" << anArgCase << "'"; + return 1; + } + } else if (aDoc.IsNull()) { Standard_CString aNameVar = theArgVec[anArgIter]; @@ -370,6 +452,8 @@ static Standard_Integer WriteGltf (Draw_Interpretor& theDI, RWGltf_CafWriter aWriter (aGltfFilePath, anExt.EndsWith (".glb")); aWriter.SetTransformationFormat (aTrsfFormat); + aWriter.SetNodeNameFormat (aNodeNameFormat); + aWriter.SetMeshNameFormat (aMeshNameFormat); aWriter.SetForcedUVExport (toForceUVExport); aWriter.SetToEmbedTexturesInGlb (toEmbedTexturesInGlb); aWriter.ChangeCoordinateSystemConverter().SetInputLengthUnit (aSystemUnitFactor); @@ -1904,10 +1988,14 @@ void XSDRAWSTLVRML::InitCommands (Draw_Interpretor& theCommands) "WriteGltf Doc file [-trsfFormat {compact|TRS|mat4}=compact]" "\n\t\t: [-comments Text] [-author Name]" "\n\t\t: [-forceUVExport] [-texturesSeparate]" + "\n\t\t: [-nodeNameFormat {empty|product|instance|instOrProd|prodOrInst|prodAndInst|verbose}=instOrProd]" + "\n\t\t: [-meshNameFormat {empty|product|instance|instOrProd|prodOrInst|prodAndInst|verbose}=product]" "\n\t\t: Write XDE document into glTF file." "\n\t\t: -trsfFormat preferred transformation format" "\n\t\t: -forceUVExport always export UV coordinates" - "\n\t\t: -texturesSeparate write textures to separate files", + "\n\t\t: -texturesSeparate write textures to separate files" + "\n\t\t: -nodeNameFormat name format for Nodes" + "\n\t\t: -meshNameFormat name format for Meshes", __FILE__, WriteGltf, g); theCommands.Add ("writegltf", "writegltf shape file", From 11c23250dc3f19c7962251ef4ec01a080049591b Mon Sep 17 00:00:00 2001 From: kgv Date: Wed, 11 Aug 2021 18:48:23 +0300 Subject: [PATCH 011/639] 0032530: Data Exchange, RWGltf_CafWriter - add option merging Faces within the Part Added RWGltf_CafWriter::ToMergeFaces() property disabled by default. RWMesh_MaterialMap - fixed creation of texture folder within working dir ".". XCAFDoc_VisMaterial::FillMaterialAspect() - added clamping of too small shininess values. Added options -mergefaces and -splitindices16 to WriteGltf for new feature. Added -systemCoordSys option to WriteGltf for consistency with WriteObj. --- src/RWGltf/RWGltf_CafWriter.cxx | 581 ++++++++++++++++------------ src/RWGltf/RWGltf_CafWriter.hxx | 32 +- src/RWGltf/RWGltf_GltfFace.hxx | 14 +- src/RWMesh/RWMesh_FaceIterator.cxx | 22 ++ src/RWMesh/RWMesh_FaceIterator.hxx | 7 + src/RWMesh/RWMesh_MaterialMap.cxx | 6 + src/TopExp/FILES | 1 - src/TopExp/TopExp_Explorer.cxx | 5 +- src/TopExp/TopExp_Explorer.hxx | 62 ++- src/TopExp/TopExp_Explorer.lxx | 54 --- src/TopoDS/FILES | 1 - src/TopoDS/TopoDS_Iterator.cxx | 3 +- src/TopoDS/TopoDS_Iterator.hxx | 53 +-- src/TopoDS/TopoDS_Iterator.lxx | 58 --- src/XCAFDoc/XCAFDoc_VisMaterial.cxx | 5 + src/XSDRAWSTLVRML/XSDRAWSTLVRML.cxx | 96 +++-- tests/de_mesh/gltf_write/as1 | 24 ++ 17 files changed, 556 insertions(+), 468 deletions(-) delete mode 100644 src/TopExp/TopExp_Explorer.lxx delete mode 100644 src/TopoDS/TopoDS_Iterator.lxx create mode 100644 tests/de_mesh/gltf_write/as1 diff --git a/src/RWGltf/RWGltf_CafWriter.cxx b/src/RWGltf/RWGltf_CafWriter.cxx index f06f8034af..b8a50cd59d 100644 --- a/src/RWGltf/RWGltf_CafWriter.cxx +++ b/src/RWGltf/RWGltf_CafWriter.cxx @@ -13,6 +13,7 @@ #include +#include #include #include #include @@ -23,6 +24,7 @@ #include #include #include +#include #include #include #include @@ -32,6 +34,7 @@ #include #include #include +#include #include #include #include @@ -95,6 +98,8 @@ RWGltf_CafWriter::RWGltf_CafWriter (const TCollection_AsciiString& theFile, myIsBinary (theIsBinary), myIsForcedUVExport (false), myToEmbedTexturesInGlb (true), + myToMergeFaces (false), + myToSplitIndices16 (false), myBinDataLen64 (0) { myCSTrsf.SetOutputLengthUnit (1.0); // meters @@ -146,11 +151,19 @@ void RWGltf_CafWriter::saveNodes (RWGltf_GltfFace& theGltfFace, const RWMesh_FaceIterator& theFaceIter, Standard_Integer& theAccessorNb) const { - theGltfFace.NodePos.Id = theAccessorNb++; - theGltfFace.NodePos.Count = theFaceIter.NbNodes(); - theGltfFace.NodePos.ByteOffset = (int64_t )theBinFile.tellp() - myBuffViewPos.ByteOffset; - theGltfFace.NodePos.Type = RWGltf_GltfAccessorLayout_Vec3; - theGltfFace.NodePos.ComponentType = RWGltf_GltfAccessorCompType_Float32; + if (theGltfFace.NodePos.Id == RWGltf_GltfAccessor::INVALID_ID) + { + theGltfFace.NodePos.Id = theAccessorNb++; + theGltfFace.NodePos.ByteOffset = (int64_t )theBinFile.tellp() - myBuffViewPos.ByteOffset; + theGltfFace.NodePos.Type = RWGltf_GltfAccessorLayout_Vec3; + theGltfFace.NodePos.ComponentType = RWGltf_GltfAccessorCompType_Float32; + } + else + { + const int64_t aPos = theGltfFace.NodePos.ByteOffset + myBuffViewPos.ByteOffset + theGltfFace.NodePos.Count * sizeof(Graphic3d_Vec3); + Standard_ASSERT_RAISE (aPos == (int64_t )theBinFile.tellp(), "wrong offset"); + } + theGltfFace.NodePos.Count += theFaceIter.NbNodes(); const Standard_Integer aNodeUpper = theFaceIter.NodeUpper(); for (Standard_Integer aNodeIter = theFaceIter.NodeLower(); aNodeIter <= aNodeUpper; ++aNodeIter) @@ -176,11 +189,19 @@ void RWGltf_CafWriter::saveNormals (RWGltf_GltfFace& theGltfFace, return; } - theGltfFace.NodeNorm.Id = theAccessorNb++; - theGltfFace.NodeNorm.Count = theFaceIter.NbNodes(); - theGltfFace.NodeNorm.ByteOffset = (int64_t )theBinFile.tellp() - myBuffViewNorm.ByteOffset; - theGltfFace.NodeNorm.Type = RWGltf_GltfAccessorLayout_Vec3; - theGltfFace.NodeNorm.ComponentType = RWGltf_GltfAccessorCompType_Float32; + if (theGltfFace.NodeNorm.Id == RWGltf_GltfAccessor::INVALID_ID) + { + theGltfFace.NodeNorm.Id = theAccessorNb++; + theGltfFace.NodeNorm.ByteOffset = (int64_t )theBinFile.tellp() - myBuffViewNorm.ByteOffset; + theGltfFace.NodeNorm.Type = RWGltf_GltfAccessorLayout_Vec3; + theGltfFace.NodeNorm.ComponentType = RWGltf_GltfAccessorCompType_Float32; + } + else + { + const int64_t aPos = theGltfFace.NodeNorm.ByteOffset + myBuffViewNorm.ByteOffset + theGltfFace.NodeNorm.Count * sizeof(Graphic3d_Vec3); + Standard_ASSERT_RAISE (aPos == (int64_t )theBinFile.tellp(), "wrong offset"); + } + theGltfFace.NodeNorm.Count += theFaceIter.NbNodes(); const Standard_Integer aNodeUpper = theFaceIter.NodeUpper(); for (Standard_Integer aNodeIter = theFaceIter.NodeLower(); aNodeIter <= aNodeUpper; ++aNodeIter) @@ -222,11 +243,20 @@ void RWGltf_CafWriter::saveTextCoords (RWGltf_GltfFace& theGltfFace, } } - theGltfFace.NodeUV.Id = theAccessorNb++; - theGltfFace.NodeUV.Count = theFaceIter.NbNodes(); - theGltfFace.NodeUV.ByteOffset = (int64_t )theBinFile.tellp() - myBuffViewTextCoord.ByteOffset; - theGltfFace.NodeUV.Type = RWGltf_GltfAccessorLayout_Vec2; - theGltfFace.NodeUV.ComponentType = RWGltf_GltfAccessorCompType_Float32; + if (theGltfFace.NodeUV.Id == RWGltf_GltfAccessor::INVALID_ID) + { + theGltfFace.NodeUV.Id = theAccessorNb++; + theGltfFace.NodeUV.ByteOffset = (int64_t )theBinFile.tellp() - myBuffViewTextCoord.ByteOffset; + theGltfFace.NodeUV.Type = RWGltf_GltfAccessorLayout_Vec2; + theGltfFace.NodeUV.ComponentType = RWGltf_GltfAccessorCompType_Float32; + } + else + { + const int64_t aPos = theGltfFace.NodeUV.ByteOffset + myBuffViewTextCoord.ByteOffset + theGltfFace.NodeUV.Count * sizeof(Graphic3d_Vec2); + Standard_ASSERT_RAISE (aPos == (int64_t )theBinFile.tellp(), "wrong offset"); + } + theGltfFace.NodeUV.Count += theFaceIter.NbNodes(); + const Standard_Integer aNodeUpper = theFaceIter.NodeUpper(); for (Standard_Integer aNodeIter = theFaceIter.NodeLower(); aNodeIter <= aNodeUpper; ++aNodeIter) { @@ -245,22 +275,36 @@ void RWGltf_CafWriter::saveIndices (RWGltf_GltfFace& theGltfFace, const RWMesh_FaceIterator& theFaceIter, Standard_Integer& theAccessorNb) { - theGltfFace.Indices.Id = theAccessorNb++; - theGltfFace.Indices.Count = theFaceIter.NbTriangles() * 3; - theGltfFace.Indices.ByteOffset = (int64_t )theBinFile.tellp() - myBuffViewInd.ByteOffset; - theGltfFace.Indices.Type = RWGltf_GltfAccessorLayout_Scalar; - theGltfFace.Indices.ComponentType = theGltfFace.NodePos.Count > std::numeric_limits::max() - ? RWGltf_GltfAccessorCompType_UInt32 - : RWGltf_GltfAccessorCompType_UInt16; + if (theGltfFace.Indices.Id == RWGltf_GltfAccessor::INVALID_ID) + { + theGltfFace.Indices.Id = theAccessorNb++; + theGltfFace.Indices.ByteOffset = (int64_t )theBinFile.tellp() - myBuffViewInd.ByteOffset; + theGltfFace.Indices.Type = RWGltf_GltfAccessorLayout_Scalar; + theGltfFace.Indices.ComponentType = theGltfFace.NodePos.Count > std::numeric_limits::max() + ? RWGltf_GltfAccessorCompType_UInt32 + : RWGltf_GltfAccessorCompType_UInt16; + } + else + { + const int64_t aRefPos = (int64_t )theBinFile.tellp(); + const int64_t aPos = theGltfFace.Indices.ByteOffset + + myBuffViewInd.ByteOffset + + theGltfFace.Indices.Count * (theGltfFace.Indices.ComponentType == RWGltf_GltfAccessorCompType_UInt32 ? sizeof(uint32_t) : sizeof(uint16_t)); + Standard_ASSERT_RAISE (aPos == aRefPos, "wrong offset"); + } + + const Standard_Integer aNodeFirst = theGltfFace.NbIndexedNodes - theFaceIter.ElemLower(); + theGltfFace.NbIndexedNodes += theFaceIter.NbNodes(); + theGltfFace.Indices.Count += theFaceIter.NbTriangles() * 3; const Standard_Integer anElemLower = theFaceIter.ElemLower(); const Standard_Integer anElemUpper = theFaceIter.ElemUpper(); for (Standard_Integer anElemIter = anElemLower; anElemIter <= anElemUpper; ++anElemIter) { Poly_Triangle aTri = theFaceIter.TriangleOriented (anElemIter); - aTri(1) -= anElemLower; - aTri(2) -= anElemLower; - aTri(3) -= anElemLower; + aTri(1) += aNodeFirst; + aTri(2) += aNodeFirst; + aTri(3) += aNodeFirst; if (theGltfFace.Indices.ComponentType == RWGltf_GltfAccessorCompType_UInt16) { writeTriangle16 (theBinFile, NCollection_Vec3((uint16_t)aTri(1), (uint16_t)aTri(2), (uint16_t)aTri(3))); @@ -270,16 +314,6 @@ void RWGltf_CafWriter::saveIndices (RWGltf_GltfFace& theGltfFace, writeTriangle32 (theBinFile, Graphic3d_Vec3i (aTri(1), aTri(2), aTri(3))); } } - if (theGltfFace.Indices.ComponentType == RWGltf_GltfAccessorCompType_UInt16) - { - // alignment by 4 bytes - int64_t aContentLen64 = (int64_t)theBinFile.tellp(); - while (aContentLen64 % 4 != 0) - { - theBinFile.write (" ", 1); - ++aContentLen64; - } - } } // ======================================================================= @@ -369,11 +403,16 @@ bool RWGltf_CafWriter::writeBinData (const Handle(TDocStd_Document)& theDocument } Message_ProgressScope aPSentryBin (theProgress, "Binary data", 4); + const RWGltf_GltfArrayType anArrTypes[4] = + { + RWGltf_GltfArrayType_Position, + RWGltf_GltfArrayType_Normal, + RWGltf_GltfArrayType_TCoord0, + RWGltf_GltfArrayType_Indices + }; - Standard_Integer aNbAccessors = 0; - - // write positions - myBuffViewPos.ByteOffset = aBinFile->tellp(); + // dispatch faces + NCollection_DataMap aMergedFaces; for (XCAFPrs_DocumentExplorer aDocExplorer (theDocument, theRootLabels, XCAFPrs_DocumentExplorerFlags_OnlyLeafNodes); aDocExplorer.More() && aPSentryBin.More(); aDocExplorer.Next()) { @@ -385,149 +424,165 @@ bool RWGltf_CafWriter::writeBinData (const Handle(TDocStd_Document)& theDocument } // transformation will be stored at scene nodes - for (RWMesh_FaceIterator aFaceIter (aDocNode.RefLabel, TopLoc_Location(), true, aDocNode.Style); aFaceIter.More() && aPSentryBin.More(); aFaceIter.Next()) + aMergedFaces.Clear (false); + + RWMesh_FaceIterator aFaceIter (aDocNode.RefLabel, TopLoc_Location(), true, aDocNode.Style); + if (myToMergeFaces) { - if (myBinDataMap.IsBound (aFaceIter.Face()) - || toSkipFaceMesh (aFaceIter)) + if (myBinDataMap.Contains (aFaceIter.ExploredShape())) { continue; } - RWGltf_GltfFace aGltfFace; - saveNodes (aGltfFace, *aBinFile, aFaceIter, aNbAccessors); - - if (!aBinFile->good()) + Handle(RWGltf_GltfFaceList) aGltfFaceList = new RWGltf_GltfFaceList(); + myBinDataMap.Add (aFaceIter.ExploredShape(), aGltfFaceList); + for (; aFaceIter.More() && aPSentryBin.More(); aFaceIter.Next()) { - Message::SendFail (TCollection_AsciiString ("File '") + myBinFileNameFull + "' can not be written"); - return false; - } - - myBinDataMap.Bind (aFaceIter.Face(), aGltfFace); - } - } - myBuffViewPos.ByteLength = (int64_t )aBinFile->tellp() - myBuffViewPos.ByteOffset; - if (!aPSentryBin.More()) - { - return false; - } - aPSentryBin.Next(); + if (toSkipFaceMesh (aFaceIter)) + { + continue; + } - // write normals - myBuffViewNorm.ByteOffset = aBinFile->tellp(); - for (XCAFPrs_DocumentExplorer aDocExplorer (theDocument, theRootLabels, XCAFPrs_DocumentExplorerFlags_OnlyLeafNodes); - aDocExplorer.More() && aPSentryBin.More(); aDocExplorer.Next()) - { - const XCAFPrs_DocumentNode& aDocNode = aDocExplorer.Current(); - if (theLabelFilter != NULL - && !theLabelFilter->Contains (aDocNode.Id)) - { - continue; + Handle(RWGltf_GltfFace) aGltfFace; + if (!aMergedFaces.Find (aFaceIter.FaceStyle(), aGltfFace)) + { + aGltfFace = new RWGltf_GltfFace(); + aGltfFaceList->Append (aGltfFace); + aGltfFace->Shape = aFaceIter.Face(); + aGltfFace->Style = aFaceIter.FaceStyle(); + aGltfFace->NbIndexedNodes = aFaceIter.NbNodes(); + aMergedFaces.Bind (aFaceIter.FaceStyle(), aGltfFace); + } + else if (myToSplitIndices16 + && aGltfFace->NbIndexedNodes < std::numeric_limits::max() + && (aGltfFace->NbIndexedNodes + aFaceIter.NbNodes()) >= std::numeric_limits::max()) + { + aMergedFaces.UnBind (aFaceIter.FaceStyle()); + aGltfFace = new RWGltf_GltfFace(); + aGltfFaceList->Append (aGltfFace); + aGltfFace->Shape = aFaceIter.Face(); + aGltfFace->Style = aFaceIter.FaceStyle(); + aGltfFace->NbIndexedNodes = aFaceIter.NbNodes(); + aMergedFaces.Bind (aFaceIter.FaceStyle(), aGltfFace); + } + else + { + if (aGltfFace->Shape.ShapeType() != TopAbs_COMPOUND) + { + TopoDS_Shape anOldShape = aGltfFace->Shape; + TopoDS_Compound aComp; + BRep_Builder().MakeCompound (aComp); + BRep_Builder().Add (aComp, anOldShape); + aGltfFace->Shape = aComp; + } + BRep_Builder().Add (aGltfFace->Shape, aFaceIter.Face()); + aGltfFace->NbIndexedNodes += aFaceIter.NbNodes(); + } + } } - for (RWMesh_FaceIterator aFaceIter (aDocNode.RefLabel, TopLoc_Location(), true, aDocNode.Style); aFaceIter.More() && aPSentryBin.More(); aFaceIter.Next()) + else { - if (toSkipFaceMesh (aFaceIter)) + for (; aFaceIter.More() && aPSentryBin.More(); aFaceIter.Next()) { - continue; - } - - RWGltf_GltfFace& aGltfFace = myBinDataMap.ChangeFind (aFaceIter.Face()); - if (aGltfFace.NodeNorm.Id != RWGltf_GltfAccessor::INVALID_ID) - { - continue; - } - - saveNormals (aGltfFace, *aBinFile, aFaceIter, aNbAccessors); + if (toSkipFaceMesh (aFaceIter) + || myBinDataMap.Contains (aFaceIter.Face())) + { + continue; + } - if (!aBinFile->good()) - { - Message::SendFail (TCollection_AsciiString ("File '") + myBinFileNameFull + "' can not be written"); - return false; + Handle(RWGltf_GltfFaceList) aGltfFaceList = new RWGltf_GltfFaceList(); + Handle(RWGltf_GltfFace) aGltfFace = new RWGltf_GltfFace(); + aGltfFace->Shape = aFaceIter.Face(); + aGltfFace->Style = aFaceIter.FaceStyle(); + aGltfFaceList->Append (aGltfFace); + myBinDataMap.Add (aFaceIter.Face(), aGltfFaceList); } } } - myBuffViewNorm.ByteLength = (int64_t )aBinFile->tellp() - myBuffViewNorm.ByteOffset; - if (!aPSentryBin.More()) - { - return false; - } - aPSentryBin.Next(); - // write texture coordinates - myBuffViewTextCoord.ByteOffset = aBinFile->tellp(); - for (XCAFPrs_DocumentExplorer aDocExplorer (theDocument, theRootLabels, XCAFPrs_DocumentExplorerFlags_OnlyLeafNodes); - aDocExplorer.More() && aPSentryBin.More(); aDocExplorer.Next()) + Standard_Integer aNbAccessors = 0; + NCollection_Map aWrittenFaces; + for (Standard_Integer aTypeIter = 0; aTypeIter < 4; ++aTypeIter) { - const XCAFPrs_DocumentNode& aDocNode = aDocExplorer.Current(); - if (theLabelFilter != NULL - && !theLabelFilter->Contains (aDocNode.Id)) + const RWGltf_GltfArrayType anArrType = (RWGltf_GltfArrayType )anArrTypes[aTypeIter]; + RWGltf_GltfBufferView* aBuffView = NULL; + switch (anArrType) { - continue; + case RWGltf_GltfArrayType_Position: aBuffView = &myBuffViewPos; break; + case RWGltf_GltfArrayType_Normal: aBuffView = &myBuffViewNorm; break; + case RWGltf_GltfArrayType_TCoord0: aBuffView = &myBuffViewTextCoord; break; + case RWGltf_GltfArrayType_Indices: aBuffView = &myBuffViewInd; break; + default: break; } - - for (RWMesh_FaceIterator aFaceIter (aDocNode.RefLabel, TopLoc_Location(), true, aDocNode.Style); aFaceIter.More() && aPSentryBin.More(); aFaceIter.Next()) + aBuffView->ByteOffset = aBinFile->tellp(); + aWrittenFaces.Clear (false); + for (ShapeToGltfFaceMap::Iterator aBinDataIter (myBinDataMap); aBinDataIter.More() && aPSentryBin.More(); aBinDataIter.Next()) { - if (toSkipFaceMesh (aFaceIter)) + const Handle(RWGltf_GltfFaceList)& aGltfFaceList = aBinDataIter.Value(); + if (!aWrittenFaces.Add (aGltfFaceList)) // skip repeating faces { continue; } - RWGltf_GltfFace& aGltfFace = myBinDataMap.ChangeFind (aFaceIter.Face()); - if (aGltfFace.NodeUV.Id != RWGltf_GltfAccessor::INVALID_ID) + for (RWGltf_GltfFaceList::Iterator aGltfFaceIter (*aGltfFaceList); aGltfFaceIter.More() && aPSentryBin.More(); aGltfFaceIter.Next()) { - continue; - } + const Handle(RWGltf_GltfFace)& aGltfFace = aGltfFaceIter.Value(); + for (RWMesh_FaceIterator aFaceIter (aGltfFace->Shape, aGltfFace->Style); aFaceIter.More() && aPSentryBin.More(); aFaceIter.Next()) + { + switch (anArrType) + { + case RWGltf_GltfArrayType_Position: + { + aGltfFace->NbIndexedNodes = 0; // reset to zero before RWGltf_GltfArrayType_Indices step + saveNodes (*aGltfFace, *aBinFile, aFaceIter, aNbAccessors); + break; + } + case RWGltf_GltfArrayType_Normal: + { + saveNormals (*aGltfFace, *aBinFile, aFaceIter, aNbAccessors); + break; + } + case RWGltf_GltfArrayType_TCoord0: + { + saveTextCoords (*aGltfFace, *aBinFile, aFaceIter, aNbAccessors); + break; + } + case RWGltf_GltfArrayType_Indices: + { + saveIndices (*aGltfFace, *aBinFile, aFaceIter, aNbAccessors); + break; + } + default: + { + break; + } + } - saveTextCoords (aGltfFace, *aBinFile, aFaceIter, aNbAccessors); + if (!aBinFile->good()) + { + Message::SendFail (TCollection_AsciiString ("File '") + myBinFileNameFull + "' cannot be written"); + return false; + } + } - if (!aBinFile->good()) - { - Message::SendFail (TCollection_AsciiString ("File '") + myBinFileNameFull + "' can not be written"); - return false; + // add alignment by 4 bytes (might happen on RWGltf_GltfAccessorCompType_UInt16 indices) + int64_t aContentLen64 = (int64_t)aBinFile->tellp(); + while (aContentLen64 % 4 != 0) + { + aBinFile->write (" ", 1); + ++aContentLen64; + } } } - } - myBuffViewTextCoord.ByteLength = (int64_t )aBinFile->tellp() - myBuffViewTextCoord.ByteOffset; - if (!aPSentryBin.More()) - { - return false; - } - aPSentryBin.Next(); - // write indices - myBuffViewInd.ByteOffset = aBinFile->tellp(); - for (XCAFPrs_DocumentExplorer aDocExplorer (theDocument, theRootLabels, XCAFPrs_DocumentExplorerFlags_OnlyLeafNodes); - aDocExplorer.More() && aPSentryBin.More(); aDocExplorer.Next()) - { - const XCAFPrs_DocumentNode& aDocNode = aDocExplorer.Current(); - if (theLabelFilter != NULL - && !theLabelFilter->Contains (aDocNode.Id)) + aBuffView->ByteLength = (int64_t )aBinFile->tellp() - aBuffView->ByteOffset; + if (!aPSentryBin.More()) { - continue; + return false; } - for (RWMesh_FaceIterator aFaceIter (aDocNode.RefLabel, TopLoc_Location(), true, aDocNode.Style); aFaceIter.More() && aPSentryBin.More(); aFaceIter.Next()) - { - if (toSkipFaceMesh (aFaceIter)) - { - continue; - } - - RWGltf_GltfFace& aGltfFace = myBinDataMap.ChangeFind (aFaceIter.Face()); - if (aGltfFace.Indices.Id != RWGltf_GltfAccessor::INVALID_ID) - { - continue; - } - - saveIndices (aGltfFace, *aBinFile, aFaceIter, aNbAccessors); - - if (!aBinFile->good()) - { - Message::SendFail (TCollection_AsciiString ("File '") + myBinFileNameFull + "' can not be written"); - return false; - } - } + aPSentryBin.Next(); } - myBuffViewInd.ByteLength = (int64_t )aBinFile->tellp() - myBuffViewInd.ByteOffset; if (myIsBinary && myToEmbedTexturesInGlb) @@ -579,7 +634,7 @@ bool RWGltf_CafWriter::writeBinData (const Handle(TDocStd_Document)& theDocument aBinFile->flush(); if (!aBinFile->good()) { - Message::SendFail (TCollection_AsciiString ("File '") + myBinFileNameFull + "' can not be written"); + Message::SendFail (TCollection_AsciiString ("File '") + myBinFileNameFull + "' cannot be written"); return false; } aBinFile.reset(); @@ -788,7 +843,7 @@ bool RWGltf_CafWriter::writeJson (const Handle(TDocStd_Document)& theDocument, // function : writeAccessors // purpose : // ======================================================================= -void RWGltf_CafWriter::writeAccessors (const RWGltf_GltfSceneNodeMap& theSceneNodeMap) +void RWGltf_CafWriter::writeAccessors (const RWGltf_GltfSceneNodeMap& ) { #ifdef HAVE_RAPIDJSON Standard_ProgramError_Raise_if (myWriter.get() == NULL, "Internal error: RWGltf_CafWriter::writeAccessors()"); @@ -796,74 +851,61 @@ void RWGltf_CafWriter::writeAccessors (const RWGltf_GltfSceneNodeMap& theSceneNo myWriter->Key (RWGltf_GltfRootElementName (RWGltf_GltfRootElement_Accessors)); myWriter->StartArray(); - NCollection_Map aWrittenFaces; - for (RWGltf_GltfSceneNodeMap::Iterator aSceneNodeIter (theSceneNodeMap); aSceneNodeIter.More(); aSceneNodeIter.Next()) - { - const XCAFPrs_DocumentNode& aDocNode = aSceneNodeIter.Value(); - for (RWMesh_FaceIterator aFaceIter (aDocNode.RefLabel, TopLoc_Location(), true, aDocNode.Style); aFaceIter.More(); aFaceIter.Next()) - { - if (!aWrittenFaces.Add (aFaceIter.Face()) // skip repeating faces - || toSkipFaceMesh (aFaceIter)) - { - continue; - } - - const RWGltf_GltfFace& aGltfFace = myBinDataMap.Find (aFaceIter.Face()); - writePositions (aGltfFace); - } - } - aWrittenFaces.Clear(); - for (RWGltf_GltfSceneNodeMap::Iterator aSceneNodeIter (theSceneNodeMap); aSceneNodeIter.More(); aSceneNodeIter.Next()) + const RWGltf_GltfArrayType anArrTypes[4] = { - const XCAFPrs_DocumentNode& aDocNode = aSceneNodeIter.Value(); - for (RWMesh_FaceIterator aFaceIter (aDocNode.RefLabel, TopLoc_Location(), true, aDocNode.Style); aFaceIter.More(); aFaceIter.Next()) - { - if (!aWrittenFaces.Add (aFaceIter.Face()) // skip repeating faces - || toSkipFaceMesh (aFaceIter)) - { - continue; - } - - const RWGltf_GltfFace& aGltfFace = myBinDataMap.Find (aFaceIter.Face()); - writeNormals (aGltfFace); - } - } - aWrittenFaces.Clear(); - for (RWGltf_GltfSceneNodeMap::Iterator aSceneNodeIter (theSceneNodeMap); aSceneNodeIter.More(); aSceneNodeIter.Next()) + RWGltf_GltfArrayType_Position, + RWGltf_GltfArrayType_Normal, + RWGltf_GltfArrayType_TCoord0, + RWGltf_GltfArrayType_Indices + }; + NCollection_Map aWrittenFaces; + for (Standard_Integer aTypeIter = 0; aTypeIter < 4; ++aTypeIter) { - const XCAFPrs_DocumentNode& aDocNode = aSceneNodeIter.Value(); - for (RWMesh_FaceIterator aFaceIter (aDocNode.RefLabel, TopLoc_Location(), true, aDocNode.Style); aFaceIter.More(); aFaceIter.Next()) + const RWGltf_GltfArrayType anArrType = (RWGltf_GltfArrayType )anArrTypes[aTypeIter]; + aWrittenFaces.Clear (false); + for (ShapeToGltfFaceMap::Iterator aBinDataIter (myBinDataMap); aBinDataIter.More(); aBinDataIter.Next()) { - if (!aWrittenFaces.Add (aFaceIter.Face()) // skip repeating faces - || toSkipFaceMesh (aFaceIter)) + const Handle(RWGltf_GltfFaceList)& aGltfFaceList = aBinDataIter.Value(); + if (!aWrittenFaces.Add (aGltfFaceList)) // skip repeating faces { continue; } - const RWGltf_GltfFace& aGltfFace = myBinDataMap.Find (aFaceIter.Face()); - writeTextCoords (aGltfFace); - } - } - aWrittenFaces.Clear(); - for (RWGltf_GltfSceneNodeMap::Iterator aSceneNodeIter (theSceneNodeMap); aSceneNodeIter.More(); aSceneNodeIter.Next()) - { - const XCAFPrs_DocumentNode& aDocNode = aSceneNodeIter.Value(); - for (RWMesh_FaceIterator aFaceIter (aDocNode.RefLabel, TopLoc_Location(), true, aDocNode.Style); aFaceIter.More(); aFaceIter.Next()) - { - if (!aWrittenFaces.Add (aFaceIter.Face()) // skip repeating faces - || toSkipFaceMesh (aFaceIter)) + for (RWGltf_GltfFaceList::Iterator aFaceIter (*aGltfFaceList); aFaceIter.More(); aFaceIter.Next()) { - continue; + const Handle(RWGltf_GltfFace)& aGltfFace = aFaceIter.Value(); + switch (anArrType) + { + case RWGltf_GltfArrayType_Position: + { + writePositions (*aGltfFace); + break; + } + case RWGltf_GltfArrayType_Normal: + { + writeNormals (*aGltfFace); + break; + } + case RWGltf_GltfArrayType_TCoord0: + { + writeTextCoords (*aGltfFace); + break; + } + case RWGltf_GltfArrayType_Indices: + { + writeIndices (*aGltfFace); + break; + } + default: + { + break; + } + } } - - const RWGltf_GltfFace& aGltfFace = myBinDataMap.Find (aFaceIter.Face()); - writeIndices (aGltfFace); } } myWriter->EndArray(); -#else - (void )theSceneNodeMap; #endif } @@ -1280,6 +1322,67 @@ void RWGltf_CafWriter::writeMaterials (const RWGltf_GltfSceneNodeMap& theSceneNo #endif } +// ======================================================================= +// function : writePrimArray +// purpose : +// ======================================================================= +void RWGltf_CafWriter::writePrimArray (const RWGltf_GltfFace& theGltfFace, + const TCollection_AsciiString& theName, + bool& theToStartPrims) +{ +#ifdef HAVE_RAPIDJSON + if (theToStartPrims) + { + theToStartPrims = false; + myWriter->StartObject(); + if (!theName.IsEmpty()) + { + myWriter->Key ("name"); + myWriter->String (theName.ToCString()); + } + myWriter->Key ("primitives"); + myWriter->StartArray(); + } + + const TCollection_AsciiString aMatId = myMaterialMap->FindMaterial (theGltfFace.Style); + myWriter->StartObject(); + { + myWriter->Key ("attributes"); + myWriter->StartObject(); + { + if (theGltfFace.NodeNorm.Id != RWGltf_GltfAccessor::INVALID_ID) + { + myWriter->Key ("NORMAL"); + myWriter->Int (theGltfFace.NodeNorm.Id); + } + myWriter->Key ("POSITION"); + myWriter->Int (theGltfFace.NodePos.Id); + if (theGltfFace.NodeUV.Id != RWGltf_GltfAccessor::INVALID_ID) + { + myWriter->Key ("TEXCOORD_0"); + myWriter->Int (theGltfFace.NodeUV.Id); + } + } + myWriter->EndObject(); + + myWriter->Key ("indices"); + myWriter->Int (theGltfFace.Indices.Id); + if (!aMatId.IsEmpty()) + { + myWriter->Key ("material"); + myWriter->Int (aMatId.IntegerValue()); + } + myWriter->Key ("mode"); + myWriter->Int (RWGltf_GltfPrimitiveMode_Triangles); + } + myWriter->EndObject(); +#else + (void )theGltfFace; + (void )theName; + (void )theToStartPrims; +#endif +} + // ======================================================================= // function : writeMeshes // purpose : @@ -1292,6 +1395,7 @@ void RWGltf_CafWriter::writeMeshes (const RWGltf_GltfSceneNodeMap& theSceneNodeM myWriter->Key (RWGltf_GltfRootElementName (RWGltf_GltfRootElement_Meshes)); myWriter->StartArray(); + NCollection_Map aWrittenFaces; for (RWGltf_GltfSceneNodeMap::Iterator aSceneNodeIter (theSceneNodeMap); aSceneNodeIter.More(); aSceneNodeIter.Next()) { const XCAFPrs_DocumentNode& aDocNode = aSceneNodeIter.Value(); @@ -1299,59 +1403,48 @@ void RWGltf_CafWriter::writeMeshes (const RWGltf_GltfSceneNodeMap& theSceneNodeM bool toStartPrims = true; Standard_Integer aNbFacesInNode = 0; - for (RWMesh_FaceIterator aFaceIter (aDocNode.RefLabel, TopLoc_Location(), true, aDocNode.Style); aFaceIter.More(); aFaceIter.Next(), ++aNbFacesInNode) + aWrittenFaces.Clear (false); + if (myToMergeFaces) { - if (toSkipFaceMesh (aFaceIter)) + TopoDS_Shape aShape; + if (!XCAFDoc_ShapeTool::GetShape (aDocNode.RefLabel, aShape) + || aShape.IsNull()) { continue; } - if (toStartPrims) + Handle(RWGltf_GltfFaceList) aGltfFaceList; + aShape.Location (TopLoc_Location()); + myBinDataMap.FindFromKey (aShape, aGltfFaceList); + if (!aWrittenFaces.Add (aGltfFaceList)) { - toStartPrims = false; - myWriter->StartObject(); - if (!aNodeName.IsEmpty()) - { - myWriter->Key ("name"); - myWriter->String (aNodeName.ToCString()); - } - myWriter->Key ("primitives"); - myWriter->StartArray(); + continue; } - const RWGltf_GltfFace& aGltfFace = myBinDataMap.Find (aFaceIter.Face()); - const TCollection_AsciiString aMatId = myMaterialMap->FindMaterial (aFaceIter.FaceStyle()); - myWriter->StartObject(); + for (RWGltf_GltfFaceList::Iterator aFaceGroupIter (*aGltfFaceList); aFaceGroupIter.More(); aFaceGroupIter.Next()) + { + const Handle(RWGltf_GltfFace)& aGltfFace = aFaceGroupIter.Value(); + writePrimArray (*aGltfFace, aNodeName, toStartPrims); + } + } + else + { + for (RWMesh_FaceIterator aFaceIter (aDocNode.RefLabel, TopLoc_Location(), true, aDocNode.Style); aFaceIter.More(); aFaceIter.Next(), ++aNbFacesInNode) { - myWriter->Key ("attributes"); - myWriter->StartObject(); + if (toSkipFaceMesh (aFaceIter)) { - if (aGltfFace.NodeNorm.Id != RWGltf_GltfAccessor::INVALID_ID) - { - myWriter->Key ("NORMAL"); - myWriter->Int (aGltfFace.NodeNorm.Id); - } - myWriter->Key ("POSITION"); - myWriter->Int (aGltfFace.NodePos.Id); - if (aGltfFace.NodeUV.Id != RWGltf_GltfAccessor::INVALID_ID) - { - myWriter->Key ("TEXCOORD_0"); - myWriter->Int (aGltfFace.NodeUV.Id); - } + continue; } - myWriter->EndObject(); - myWriter->Key ("indices"); - myWriter->Int (aGltfFace.Indices.Id); - if (!aMatId.IsEmpty()) + const Handle(RWGltf_GltfFaceList)& aGltfFaceList = myBinDataMap.FindFromKey (aFaceIter.Face()); + if (!aWrittenFaces.Add (aGltfFaceList)) { - myWriter->Key ("material"); - myWriter->Int (aMatId.IntegerValue()); + continue; } - myWriter->Key ("mode"); - myWriter->Int (RWGltf_GltfPrimitiveMode_Triangles); + + const Handle(RWGltf_GltfFace)& aGltfFace = aGltfFaceList->First(); + writePrimArray (*aGltfFace, aNodeName, toStartPrims); } - myWriter->EndObject(); } if (!toStartPrims) diff --git a/src/RWGltf/RWGltf_CafWriter.hxx b/src/RWGltf/RWGltf_CafWriter.hxx index 5aad88a326..bfc5119177 100644 --- a/src/RWGltf/RWGltf_CafWriter.hxx +++ b/src/RWGltf/RWGltf_CafWriter.hxx @@ -99,6 +99,21 @@ public: //! Set flag to write image textures into GLB file (binary gltf export). void SetToEmbedTexturesInGlb (Standard_Boolean theToEmbedTexturesInGlb) { myToEmbedTexturesInGlb = theToEmbedTexturesInGlb; } + //! Return flag to merge faces within a single part; FALSE by default. + bool ToMergeFaces() const { return myToMergeFaces; } + + //! Set flag to merge faces within a single part. + //! May reduce JSON size thanks to smaller number of primitive arrays. + void SetMergeFaces (bool theToMerge) { myToMergeFaces = theToMerge; } + + //! Return flag to prefer keeping 16-bit indexes while merging face; FALSE by default. + bool ToSplitIndices16() const { return myToSplitIndices16; } + + //! Set flag to prefer keeping 16-bit indexes while merging face. + //! Has effect only with ToMergeFaces() option turned ON. + //! May reduce binary data size thanks to smaller triangle indexes. + void SetSplitIndices16 (bool theToSplit) { myToSplitIndices16 = theToSplit; } + //! Write glTF file and associated binary file. //! Triangulation data should be precomputed within shapes! //! @param theDocument [in] input document @@ -262,6 +277,14 @@ protected: //! @param theMaterialMap [in] map of materials Standard_EXPORT virtual void writeMeshes (const RWGltf_GltfSceneNodeMap& theSceneNodeMap); + //! Write a primitive array to RWGltf_GltfRootElement_Meshes section. + //! @param[in] theGltfFace face to write + //! @param[in] theName primitive array name + //! @param[in,out] theToStartPrims flag indicating that primitive array has been started + Standard_EXPORT virtual void writePrimArray (const RWGltf_GltfFace& theGltfFace, + const TCollection_AsciiString& theName, + bool& theToStartPrims); + //! Write RWGltf_GltfRootElement_Nodes section. //! @param theDocument [in] input document //! @param theRootLabels [in] list of root shapes to export @@ -293,6 +316,10 @@ protected: //! @param theMaterialMap [out] map of materials, filled with textures Standard_EXPORT virtual void writeTextures (const RWGltf_GltfSceneNodeMap& theSceneNodeMap); +protected: + + typedef NCollection_IndexedDataMap ShapeToGltfFaceMap; + protected: TCollection_AsciiString myFile; //!< output glTF file @@ -304,6 +331,8 @@ protected: Standard_Boolean myIsBinary; //!< flag to write into binary glTF format (.glb) Standard_Boolean myIsForcedUVExport; //!< export UV coordinates even if there are no mapped texture Standard_Boolean myToEmbedTexturesInGlb; //!< flag to write image textures into GLB file + Standard_Boolean myToMergeFaces; //!< flag to merge faces within a single part + Standard_Boolean myToSplitIndices16; //!< flag to prefer keeping 16-bit indexes while merging face RWMesh_CoordinateSystemConverter myCSTrsf; //!< transformation from OCCT to glTF coordinate system XCAFPrs_Style myDefaultStyle; //!< default material definition to be used for nodes with only color defined @@ -314,8 +343,7 @@ protected: RWGltf_GltfBufferView myBuffViewNorm; //!< current buffer view with nodes normals RWGltf_GltfBufferView myBuffViewTextCoord; //!< current buffer view with nodes UV coordinates RWGltf_GltfBufferView myBuffViewInd; //!< current buffer view with triangulation indexes - NCollection_DataMap myBinDataMap; //!< map for TopoDS_Face to glTF face (merging duplicates) + ShapeToGltfFaceMap myBinDataMap; //!< map for TopoDS_Face to glTF face (merging duplicates) int64_t myBinDataLen64; //!< length of binary file }; diff --git a/src/RWGltf/RWGltf_GltfFace.hxx b/src/RWGltf/RWGltf_GltfFace.hxx index c90a9c1478..0c4298c2ff 100644 --- a/src/RWGltf/RWGltf_GltfFace.hxx +++ b/src/RWGltf/RWGltf_GltfFace.hxx @@ -15,15 +15,27 @@ #ifndef _RWGltf_GltfFace_HeaderFile #define _RWGltf_GltfFace_HeaderFile +#include +#include #include +#include +#include //! Low-level glTF data structure holding single Face (one primitive array) definition. -struct RWGltf_GltfFace +class RWGltf_GltfFace : public Standard_Transient { +public: RWGltf_GltfAccessor NodePos; //!< accessor for nodal positions RWGltf_GltfAccessor NodeNorm; //!< accessor for nodal normals RWGltf_GltfAccessor NodeUV; //!< accessor for nodal UV texture coordinates RWGltf_GltfAccessor Indices; //!< accessor for indexes + TopoDS_Shape Shape; //!< original Face or face list + XCAFPrs_Style Style; //!< face style + Standard_Integer NbIndexedNodes; //!< transient variable for merging several faces into one while writing Indices + + RWGltf_GltfFace() : NbIndexedNodes (0) {} }; +typedef NCollection_Shared> RWGltf_GltfFaceList; + #endif // _RWGltf_GltfFace_HeaderFile diff --git a/src/RWMesh/RWMesh_FaceIterator.cxx b/src/RWMesh/RWMesh_FaceIterator.cxx index cdcd5241d7..a19ee16920 100644 --- a/src/RWMesh/RWMesh_FaceIterator.cxx +++ b/src/RWMesh/RWMesh_FaceIterator.cxx @@ -53,6 +53,28 @@ RWMesh_FaceIterator::RWMesh_FaceIterator (const TDF_Label& theLabel, Next(); } +// ======================================================================= +// function : RWMesh_FaceIterator +// purpose : +// ======================================================================= +RWMesh_FaceIterator::RWMesh_FaceIterator (const TopoDS_Shape& theShape, + const XCAFPrs_Style& theStyle) +: myDefStyle (theStyle), + myToMapColors (true), + mySLTool (1, 1e-12), + myHasNormals (false), + myIsMirrored (false), + myHasFaceColor (false) +{ + if (theShape.IsNull()) + { + return; + } + + myFaceIter.Init (theShape, TopAbs_FACE); + Next(); +} + // ======================================================================= // function : dispatchStyles // purpose : diff --git a/src/RWMesh/RWMesh_FaceIterator.hxx b/src/RWMesh/RWMesh_FaceIterator.hxx index f70b378610..3a74040af6 100644 --- a/src/RWMesh/RWMesh_FaceIterator.hxx +++ b/src/RWMesh/RWMesh_FaceIterator.hxx @@ -39,6 +39,13 @@ public: const Standard_Boolean theToMapColors = false, const XCAFPrs_Style& theStyle = XCAFPrs_Style()); + //! Auxiliary constructor. + Standard_EXPORT RWMesh_FaceIterator (const TopoDS_Shape& theShape, + const XCAFPrs_Style& theStyle = XCAFPrs_Style()); + + //! Return explored shape. + const TopoDS_Shape& ExploredShape() const { return myFaceIter.ExploredShape(); } + //! Return true if iterator points to the valid triangulation. bool More() const { return !myPolyTriang.IsNull(); } diff --git a/src/RWMesh/RWMesh_MaterialMap.cxx b/src/RWMesh/RWMesh_MaterialMap.cxx index 1a8f2e93f5..457d9622c7 100644 --- a/src/RWMesh/RWMesh_MaterialMap.cxx +++ b/src/RWMesh/RWMesh_MaterialMap.cxx @@ -38,6 +38,10 @@ RWMesh_MaterialMap::RWMesh_MaterialMap (const TCollection_AsciiString& theFile) TCollection_AsciiString aFileName, aFileExt; OSD_Path::FolderAndFileFromPath (theFile, myFolder, aFileName); OSD_Path::FileNameAndExtension (aFileName, myShortFileNameBase, aFileExt); + if (myFolder.IsEmpty()) + { + myFolder = "."; + } } // ======================================================================= @@ -216,6 +220,7 @@ bool RWMesh_MaterialMap::CreateTextureFolder() OSD_Directory aResDir (aResFolderPath); if (!aResDir.Exists()) { + Message::SendFail() << "Failed to create textures folder '" << myFolder << "'"; return false; } const OSD_Protection aParentProt = aResDir.Protection(); @@ -233,6 +238,7 @@ bool RWMesh_MaterialMap::CreateTextureFolder() if (aTexDir.Failed()) { // fallback to the same folder as output model file + Message::SendFail() << "Failed to create textures folder '" << myTexFolder << "'"; myTexFolder = myFolder; myTexFolderShort.Clear(); return true; diff --git a/src/TopExp/FILES b/src/TopExp/FILES index 7d56a6d55f..cace9690df 100644 --- a/src/TopExp/FILES +++ b/src/TopExp/FILES @@ -2,5 +2,4 @@ TopExp.cxx TopExp.hxx TopExp_Explorer.cxx TopExp_Explorer.hxx -TopExp_Explorer.lxx TopExp_Stack.hxx diff --git a/src/TopExp/TopExp_Explorer.cxx b/src/TopExp/TopExp_Explorer.cxx index f698f928cc..569f5f21b1 100644 --- a/src/TopExp/TopExp_Explorer.cxx +++ b/src/TopExp/TopExp_Explorer.cxx @@ -17,14 +17,11 @@ #define No_Standard_NoMoreObject #define No_Standard_NoSuchObject +#include -#include #include #include #include -#include -#include -#include // macro to compare two types of shapes // always True if the first one is SHAPE diff --git a/src/TopExp/TopExp_Explorer.hxx b/src/TopExp/TopExp_Explorer.hxx index 33daa37ff6..a49d3f15e7 100644 --- a/src/TopExp/TopExp_Explorer.hxx +++ b/src/TopExp/TopExp_Explorer.hxx @@ -17,19 +17,8 @@ #ifndef _TopExp_Explorer_HeaderFile #define _TopExp_Explorer_HeaderFile -#include -#include -#include - #include -#include #include -#include -#include -class Standard_NoMoreObject; -class Standard_NoSuchObject; -class TopoDS_Shape; - //! An Explorer is a Tool to visit a Topological Data //! Structure form the TopoDS package. @@ -117,10 +106,9 @@ public: //! ToFind it has no effect on the search. Standard_EXPORT void Init (const TopoDS_Shape& S, const TopAbs_ShapeEnum ToFind, const TopAbs_ShapeEnum ToAvoid = TopAbs_SHAPE); - //! Returns True if there are more shapes in the - //! exploration. - Standard_Boolean More() const; - + //! Returns True if there are more shapes in the exploration. + Standard_Boolean More() const { return hasMore; } + //! Moves to the next Shape in the exploration. //! Exceptions //! Standard_NoMoreObject if there are no more shapes to explore. @@ -135,15 +123,17 @@ public: //! Exceptions //! Standard_NoSuchObject if this explorer has no more shapes to explore. Standard_EXPORT const TopoDS_Shape& Current() const; - - //! Reinitialize the exploration with the original - //! arguments. + + //! Reinitialize the exploration with the original arguments. Standard_EXPORT void ReInit(); - + + //! Return explored shape. + const TopoDS_Shape& ExploredShape() const { return myShape; } + //! Returns the current depth of the exploration. 0 is //! the shape to explore itself. - Standard_Integer Depth() const; - + Standard_Integer Depth() const { return myTop; } + //! Clears the content of the explorer. It will return //! False on More(). void Clear(); @@ -154,19 +144,8 @@ public: Destroy(); } - - - -protected: - - - - - private: - - TopExp_Stack myStack; Standard_Integer myTop; Standard_Integer mySizeOfStack; @@ -175,14 +154,21 @@ private: TopAbs_ShapeEnum toFind; TopAbs_ShapeEnum toAvoid; - }; +#include -#include - - - - +inline void TopExp_Explorer::Clear() +{ + hasMore = Standard_False; + if (myTop > 0) + { + for (int i = 1; i <= myTop; i++) + { + myStack[i].~TopoDS_Iterator(); + } + } + myTop = 0; +} #endif // _TopExp_Explorer_HeaderFile diff --git a/src/TopExp/TopExp_Explorer.lxx b/src/TopExp/TopExp_Explorer.lxx deleted file mode 100644 index 3f263778a3..0000000000 --- a/src/TopExp/TopExp_Explorer.lxx +++ /dev/null @@ -1,54 +0,0 @@ -// Created on: 1993-01-18 -// Created by: Remi LEQUETTE -// Copyright (c) 1993-1999 Matra Datavision -// Copyright (c) 1999-2014 OPEN CASCADE SAS -// -// This file is part of Open CASCADE Technology software library. -// -// This library is free software; you can redistribute it and/or modify it under -// the terms of the GNU Lesser General Public License version 2.1 as published -// by the Free Software Foundation, with special exception defined in the file -// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT -// distribution for complete text of the license and disclaimer of any warranty. -// -// Alternatively, this file may be used under the terms of Open CASCADE -// commercial license or contractual agreement. - -#include - -//======================================================================= -//function : More -//purpose : -//======================================================================= - -inline Standard_Boolean TopExp_Explorer::More()const -{ - return hasMore; -} - - -//======================================================================= -//function : Depth -//purpose : -//======================================================================= - -inline Standard_Integer TopExp_Explorer::Depth()const -{ - return myTop; -} - - -//======================================================================= -//function : Clear -//purpose : -//======================================================================= - -inline void TopExp_Explorer::Clear() -{ - hasMore = Standard_False; - if(myTop >0) { - for(int i=1;i<= myTop; i++) - myStack[i].~TopoDS_Iterator(); - } - myTop = 0; -} diff --git a/src/TopoDS/FILES b/src/TopoDS/FILES index 27345a189f..1fd91a9eea 100644 --- a/src/TopoDS/FILES +++ b/src/TopoDS/FILES @@ -19,7 +19,6 @@ TopoDS_HShape.hxx TopoDS_HShape.lxx TopoDS_Iterator.cxx TopoDS_Iterator.hxx -TopoDS_Iterator.lxx TopoDS_ListIteratorOfListOfShape.hxx TopoDS_ListOfShape.hxx TopoDS_LockedShape.hxx diff --git a/src/TopoDS/TopoDS_Iterator.cxx b/src/TopoDS/TopoDS_Iterator.cxx index eb5aab9010..ca51b61d00 100644 --- a/src/TopoDS/TopoDS_Iterator.cxx +++ b/src/TopoDS/TopoDS_Iterator.cxx @@ -16,11 +16,10 @@ #define No_Standard_NoSuchObject +#include #include #include -#include -#include //======================================================================= //function : Initialize diff --git a/src/TopoDS/TopoDS_Iterator.hxx b/src/TopoDS/TopoDS_Iterator.hxx index 473c1e193d..b1ab7c4929 100644 --- a/src/TopoDS/TopoDS_Iterator.hxx +++ b/src/TopoDS/TopoDS_Iterator.hxx @@ -17,19 +17,11 @@ #ifndef _TopoDS_Iterator_HeaderFile #define _TopoDS_Iterator_HeaderFile -#include -#include -#include - +#include #include #include #include #include -#include -class Standard_NoMoreObject; -class Standard_NoSuchObject; -class TopoDS_Shape; - //! Iterates on the underlying shape underlying a given //! TopoDS_Shape object, providing access to its @@ -42,10 +34,9 @@ public: DEFINE_STANDARD_ALLOC - //! Creates an empty Iterator. - TopoDS_Iterator(); - + TopoDS_Iterator() {} + //! Creates an Iterator on sub-shapes. //! Note: //! - If cumOri is true, the function composes all @@ -53,8 +44,13 @@ public: //! - If cumLoc is true, the function multiplies all //! sub-shapes by the location of S, i.e. it applies to //! each sub-shape the transformation that is associated with S. - TopoDS_Iterator(const TopoDS_Shape& S, const Standard_Boolean cumOri = Standard_True, const Standard_Boolean cumLoc = Standard_True); - + TopoDS_Iterator (const TopoDS_Shape& S, + const Standard_Boolean cumOri = Standard_True, + const Standard_Boolean cumLoc = Standard_True) + { + Initialize (S, cumOri,cumLoc); + } + //! Initializes this iterator with shape S. //! Note: //! - If cumOri is true, the function composes all @@ -66,8 +62,8 @@ public: //! Returns true if there is another sub-shape in the //! shape which this iterator is scanning. - Standard_Boolean More() const; - + Standard_Boolean More() const { return myShapes.More(); } + //! Moves on to the next sub-shape in the shape which //! this iterator is scanning. //! Exceptions @@ -78,34 +74,19 @@ public: //! this iterator is scanning. //! Exceptions //! Standard_NoSuchObject if there is no current sub-shape. - const TopoDS_Shape& Value() const; - - - - -protected: - - - - + const TopoDS_Shape& Value() const + { + Standard_NoSuchObject_Raise_if(!More(),"TopoDS_Iterator::Value"); + return myShape; + } private: - - TopoDS_Shape myShape; TopoDS_ListIteratorOfListOfShape myShapes; TopAbs_Orientation myOrientation; TopLoc_Location myLocation; - }; - -#include - - - - - #endif // _TopoDS_Iterator_HeaderFile diff --git a/src/TopoDS/TopoDS_Iterator.lxx b/src/TopoDS/TopoDS_Iterator.lxx deleted file mode 100644 index b005ad00f9..0000000000 --- a/src/TopoDS/TopoDS_Iterator.lxx +++ /dev/null @@ -1,58 +0,0 @@ -// Created on: 1993-01-21 -// Created by: Remi LEQUETTE -// Copyright (c) 1993-1999 Matra Datavision -// Copyright (c) 1999-2014 OPEN CASCADE SAS -// -// This file is part of Open CASCADE Technology software library. -// -// This library is free software; you can redistribute it and/or modify it under -// the terms of the GNU Lesser General Public License version 2.1 as published -// by the Free Software Foundation, with special exception defined in the file -// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT -// distribution for complete text of the license and disclaimer of any warranty. -// -// Alternatively, this file may be used under the terms of Open CASCADE -// commercial license or contractual agreement. - -#include - -//======================================================================= -//function : TopoDS_Iterator -//purpose : -//======================================================================= - -inline TopoDS_Iterator::TopoDS_Iterator() -{} - -//======================================================================= -//function : TopoDS_Iterator -//purpose : -//======================================================================= - -inline TopoDS_Iterator::TopoDS_Iterator(const TopoDS_Shape& S, - const Standard_Boolean cumOri, - const Standard_Boolean cumLoc) -{ - Initialize(S,cumOri,cumLoc); -} - -//======================================================================= -//function : More -//purpose : -//======================================================================= - -inline Standard_Boolean TopoDS_Iterator::More() const -{ - return myShapes.More(); -} - -//======================================================================= -//function : Value -//purpose : -//======================================================================= - -inline const TopoDS_Shape& TopoDS_Iterator::Value() const -{ - Standard_NoSuchObject_Raise_if(!More(),"TopoDS_Iterator::Value"); - return myShape; -} diff --git a/src/XCAFDoc/XCAFDoc_VisMaterial.cxx b/src/XCAFDoc/XCAFDoc_VisMaterial.cxx index da6bd33cae..847289eb09 100644 --- a/src/XCAFDoc/XCAFDoc_VisMaterial.cxx +++ b/src/XCAFDoc/XCAFDoc_VisMaterial.cxx @@ -240,6 +240,11 @@ void XCAFDoc_VisMaterial::FillMaterialAspect (Graphic3d_MaterialAspect& theAspec theAspect.SetAlpha (myPbrMat.BaseColor.Alpha()); theAspect.SetSpecularColor(Quantity_Color (Graphic3d_Vec3 (myPbrMat.Metallic))); theAspect.SetShininess (1.0f - myPbrMat.Roughness); + if (theAspect.Shininess() < 0.01f) + { + // clamp too small shininess values causing visual artifacts on corner view angles + theAspect.SetShininess (0.01f); + } theAspect.SetEmissiveColor (Quantity_Color (myPbrMat.EmissiveFactor.cwiseMin (Graphic3d_Vec3 (1.0f)))); } diff --git a/src/XSDRAWSTLVRML/XSDRAWSTLVRML.cxx b/src/XSDRAWSTLVRML/XSDRAWSTLVRML.cxx index 6a847af543..20c6ee9389 100644 --- a/src/XSDRAWSTLVRML/XSDRAWSTLVRML.cxx +++ b/src/XSDRAWSTLVRML/XSDRAWSTLVRML.cxx @@ -148,6 +148,27 @@ static bool parseNameFormat (const char* theArg, return true; } +//! Parse RWMesh_CoordinateSystem enumeration. +static bool parseCoordinateSystem (const char* theArg, + RWMesh_CoordinateSystem& theSystem) +{ + TCollection_AsciiString aCSStr (theArg); + aCSStr.LowerCase(); + if (aCSStr == "zup") + { + theSystem = RWMesh_CoordinateSystem_Zup; + } + else if (aCSStr == "yup") + { + theSystem = RWMesh_CoordinateSystem_Yup; + } + else + { + return Standard_False; + } + return Standard_True; +} + //============================================================================= //function : ReadGltf //purpose : Reads glTF file @@ -333,7 +354,9 @@ static Standard_Integer WriteGltf (Draw_Interpretor& theDI, Handle(TDocStd_Application) anApp = DDocStd::GetApplication(); TColStd_IndexedDataMapOfStringString aFileInfo; RWGltf_WriterTrsfFormat aTrsfFormat = RWGltf_WriterTrsfFormat_Compact; + RWMesh_CoordinateSystem aSystemCoordSys = RWMesh_CoordinateSystem_Zup; bool toForceUVExport = false, toEmbedTexturesInGlb = true; + bool toMergeFaces = false, toSplitIndices16 = false; RWMesh_NameFormat aNodeNameFormat = RWMesh_NameFormat_InstanceOrProduct; RWMesh_NameFormat aMeshNameFormat = RWMesh_NameFormat_Product; for (Standard_Integer anArgIter = 1; anArgIter < theNbArgs; ++anArgIter) @@ -360,6 +383,40 @@ static Standard_Integer WriteGltf (Draw_Interpretor& theDI, ++anArgIter; } } + else if (anArgCase == "-mergefaces") + { + toMergeFaces = true; + if (anArgIter + 1 < theNbArgs + && Draw::ParseOnOff (theArgVec[anArgIter + 1], toMergeFaces)) + { + ++anArgIter; + } + } + else if (anArgCase == "-splitindices16" + || anArgCase == "-splitindexes16" + || anArgCase == "-splitindices" + || anArgCase == "-splitindexes" + || anArgCase == "-splitind") + { + toSplitIndices16 = true; + if (anArgIter + 1 < theNbArgs + && Draw::ParseOnOff (theArgVec[anArgIter + 1], toSplitIndices16)) + { + ++anArgIter; + } + } + else if (anArgIter + 1 < theNbArgs + && (anArgCase == "-systemcoordinatesystem" + || anArgCase == "-systemcoordsystem" + || anArgCase == "-systemcoordsys" + || anArgCase == "-syscoordsys")) + { + if (!parseCoordinateSystem (theArgVec[++anArgIter], aSystemCoordSys)) + { + Message::SendFail() << "Syntax error: unknown coordinate system '" << theArgVec[anArgIter] << "'"; + return 1; + } + } else if (anArgCase == "-trsfformat" && anArgIter + 1 < theNbArgs) { @@ -456,8 +513,10 @@ static Standard_Integer WriteGltf (Draw_Interpretor& theDI, aWriter.SetMeshNameFormat (aMeshNameFormat); aWriter.SetForcedUVExport (toForceUVExport); aWriter.SetToEmbedTexturesInGlb (toEmbedTexturesInGlb); + aWriter.SetMergeFaces (toMergeFaces); + aWriter.SetSplitIndices16 (toSplitIndices16); aWriter.ChangeCoordinateSystemConverter().SetInputLengthUnit (aSystemUnitFactor); - aWriter.ChangeCoordinateSystemConverter().SetInputCoordinateSystem (RWMesh_CoordinateSystem_Zup); + aWriter.ChangeCoordinateSystemConverter().SetInputCoordinateSystem (aSystemCoordSys); aWriter.Perform (aDoc, aFileInfo, aProgress->Start()); return 0; } @@ -550,27 +609,6 @@ static Standard_Integer readstl(Draw_Interpretor& theDI, return 0; } -//! Parse RWMesh_CoordinateSystem enumeration. -static Standard_Boolean parseCoordinateSystem (const char* theArg, - RWMesh_CoordinateSystem& theSystem) -{ - TCollection_AsciiString aCSStr (theArg); - aCSStr.LowerCase(); - if (aCSStr == "zup") - { - theSystem = RWMesh_CoordinateSystem_Zup; - } - else if (aCSStr == "yup") - { - theSystem = RWMesh_CoordinateSystem_Yup; - } - else - { - return Standard_False; - } - return Standard_True; -} - //============================================================================= //function : ReadObj //purpose : Reads OBJ file @@ -1985,14 +2023,18 @@ void XSDRAWSTLVRML::InitCommands (Draw_Interpretor& theCommands) "\n\t\t: Same as ReadGltf but reads glTF file into a shape instead of a document.", __FILE__, ReadGltf, g); theCommands.Add ("WriteGltf", - "WriteGltf Doc file [-trsfFormat {compact|TRS|mat4}=compact]" + "WriteGltf Doc file [-trsfFormat {compact|TRS|mat4}]=compact" + "\n\t\t: [-systemCoordSys {Zup|Yup}]=Zup" "\n\t\t: [-comments Text] [-author Name]" - "\n\t\t: [-forceUVExport] [-texturesSeparate]" - "\n\t\t: [-nodeNameFormat {empty|product|instance|instOrProd|prodOrInst|prodAndInst|verbose}=instOrProd]" - "\n\t\t: [-meshNameFormat {empty|product|instance|instOrProd|prodOrInst|prodAndInst|verbose}=product]" + "\n\t\t: [-forceUVExport]=0 [-texturesSeparate]=0 [-mergeFaces]=0 [-splitIndices16]=0" + "\n\t\t: [-nodeNameFormat {empty|product|instance|instOrProd|prodOrInst|prodAndInst|verbose}]=instOrProd" + "\n\t\t: [-meshNameFormat {empty|product|instance|instOrProd|prodOrInst|prodAndInst|verbose}]=product" "\n\t\t: Write XDE document into glTF file." "\n\t\t: -trsfFormat preferred transformation format" - "\n\t\t: -forceUVExport always export UV coordinates" + "\n\t\t: -systemCoordSys system coordinate system; Zup when not specified" + "\n\t\t: -mergeFaces merge Faces within the same Mesh" + "\n\t\t: -splitIndices16 split Faces to keep 16-bit indices when -mergeFaces is enabled" + "\n\t\t: -forceUVExport always export UV coordinates" "\n\t\t: -texturesSeparate write textures to separate files" "\n\t\t: -nodeNameFormat name format for Nodes" "\n\t\t: -meshNameFormat name format for Meshes", diff --git a/tests/de_mesh/gltf_write/as1 b/tests/de_mesh/gltf_write/as1 new file mode 100644 index 0000000000..3efb8b1ea4 --- /dev/null +++ b/tests/de_mesh/gltf_write/as1 @@ -0,0 +1,24 @@ +puts "========" +puts "0032530: Data Exchange, RWGltf_CafWriter - add option merging Faces within the Part" +puts "========" + +Close D0 -silent +ReadStep D0 [locate_data_file as1-oc-214-mat.stp] +XGetOneShape ss D0 +incmesh ss 1.0 + +set aTmpGltf1 "${imagedir}/${casename}_tmp1.glb" +set aTmpGltf2 "${imagedir}/${casename}_tmp2.glb" +lappend occ_tmp_files $aTmpGltf1 +lappend occ_tmp_files $aTmpGltf2 + +WriteGltf D0 "$aTmpGltf1" +WriteGltf D0 "$aTmpGltf2" -mergeFaces + +ReadGltf D1 "$aTmpGltf1" +XGetOneShape s1 D1 +checknbshapes s1 -face 160 -compound 28 + +ReadGltf D "$aTmpGltf2" +XGetOneShape s2 D +checknbshapes s2 -face 18 -compound 10 From fceeb829177bda0bba9148164a4d2a8de4a18b28 Mon Sep 17 00:00:00 2001 From: kgv Date: Thu, 12 Aug 2021 15:50:16 +0300 Subject: [PATCH 012/639] 0032533: Visualization, TKOpenGl - suppress error reported on Intel drivers due to OpenGL 4.5 specs violation OpenGl_GlCore45 - removed a couple of FFP-related functions introduced by OpenGL 4.5 Compatible Profile, but not Core Profile. OpenGl_GlFunctions::load() now tries to load a set of functions from GL_ARB_robustness extension (having ARB suffix) to fill OpenGL 4.5 function table, and from GL_ARB_indirect_parameters extension to fill missing items in OpenGL 4.6 function table on Intel drivers. Warning message (trace level) is now reported instead of error in case of fallback usage. --- src/OpenGl/OpenGl_GlCore45.hxx | 12 ------- src/OpenGl/OpenGl_GlFunctions.cxx | 55 +++++++++++++++++++++---------- src/OpenGl/OpenGl_GlFunctions.hxx | 12 ------- 3 files changed, 38 insertions(+), 41 deletions(-) diff --git a/src/OpenGl/OpenGl_GlCore45.hxx b/src/OpenGl/OpenGl_GlCore45.hxx index f9e3c55071..804dde35f1 100644 --- a/src/OpenGl/OpenGl_GlCore45.hxx +++ b/src/OpenGl/OpenGl_GlCore45.hxx @@ -134,18 +134,6 @@ public: //! @name OpenGL 4.5 additives to 4.4 using theBaseClass_t::glGetnUniformiv; using theBaseClass_t::glGetnUniformuiv; using theBaseClass_t::glReadnPixels; - using theBaseClass_t::glGetnMapdv; - using theBaseClass_t::glGetnMapfv; - using theBaseClass_t::glGetnMapiv; - using theBaseClass_t::glGetnPixelMapfv; - using theBaseClass_t::glGetnPixelMapuiv; - using theBaseClass_t::glGetnPixelMapusv; - using theBaseClass_t::glGetnPolygonStipple; - using theBaseClass_t::glGetnColorTable; - using theBaseClass_t::glGetnConvolutionFilter; - using theBaseClass_t::glGetnSeparableFilter; - using theBaseClass_t::glGetnHistogram; - using theBaseClass_t::glGetnMinmax; using theBaseClass_t::glTextureBarrier; #endif diff --git a/src/OpenGl/OpenGl_GlFunctions.cxx b/src/OpenGl/OpenGl_GlFunctions.cxx index a66a35d652..0ee1aef309 100644 --- a/src/OpenGl/OpenGl_GlFunctions.cxx +++ b/src/OpenGl/OpenGl_GlFunctions.cxx @@ -1505,26 +1505,30 @@ void OpenGl_GlFunctions::load (OpenGl_Context& theCtx, && FindProcShort (glGetTextureSubImage) && FindProcShort (glGetCompressedTextureSubImage) && FindProcShort (glGetGraphicsResetStatus) - && FindProcShort (glGetnCompressedTexImage) - && FindProcShort (glGetnTexImage) - && FindProcShort (glGetnUniformdv) && FindProcShort (glGetnUniformfv) && FindProcShort (glGetnUniformiv) && FindProcShort (glGetnUniformuiv) && FindProcShort (glReadnPixels) - && FindProcShort (glGetnMapdv) - && FindProcShort (glGetnMapfv) - && FindProcShort (glGetnMapiv) - && FindProcShort (glGetnPixelMapfv) - && FindProcShort (glGetnPixelMapuiv) - && FindProcShort (glGetnPixelMapusv) - && FindProcShort (glGetnPolygonStipple) - && FindProcShort (glGetnColorTable) - && FindProcShort (glGetnConvolutionFilter) - && FindProcShort (glGetnSeparableFilter) - && FindProcShort (glGetnHistogram) - && FindProcShort (glGetnMinmax) && FindProcShort (glTextureBarrier); + bool hasGetnTexImage = has45 + && FindProcShort (glGetnCompressedTexImage) + && FindProcShort (glGetnTexImage) + && FindProcShort (glGetnUniformdv); + if (has45 && !hasGetnTexImage) + { + // Intel driver exports only ARB-suffixed functions in a violation to OpenGL 4.5 specs + hasGetnTexImage = checkExtensionShort ("GL_ARB_robustness") + && theCtx.FindProc ("glGetnCompressedTexImageARB", this->glGetnCompressedTexImage) + && theCtx.FindProc ("glGetnTexImageARB", this->glGetnTexImage) + && theCtx.FindProc ("glGetnUniformdvARB", this->glGetnUniformdv); + has45 = hasGetnTexImage; + if (hasGetnTexImage) + { + Message::SendTrace() << "Warning! glGetnCompressedTexImage function required by OpenGL 4.5 specs is not found.\n" + "A non-standard glGetnCompressedTexImageARB fallback will be used instead.\n" + "Please report this issue to OpenGL driver vendor '" << theCtx.myVendor << "'."; + } + } if (has45) { theCtx.core45 = (OpenGl_GlCore45* )this; @@ -1537,9 +1541,26 @@ void OpenGl_GlFunctions::load (OpenGl_Context& theCtx, has46 = isGlGreaterEqualShort (4, 6) && FindProcShort (glSpecializeShader) - && FindProcShort (glMultiDrawArraysIndirectCount) - && FindProcShort (glMultiDrawElementsIndirectCount) && FindProcShort (glPolygonOffsetClamp); + + bool hasIndParams = has46 + && FindProcShort (glMultiDrawArraysIndirectCount) + && FindProcShort (glMultiDrawElementsIndirectCount); + if (has46 && !hasIndParams) + { + // Intel driver exports only ARB-suffixed functions in a violation to OpenGL 4.6 specs + hasIndParams = checkExtensionShort ("GL_ARB_indirect_parameters") + && theCtx.FindProc ("glMultiDrawArraysIndirectCountARB", this->glMultiDrawArraysIndirectCount) + && theCtx.FindProc ("glMultiDrawElementsIndirectCountARB", this->glMultiDrawElementsIndirectCount); + has46 = hasIndParams; + if (hasIndParams) + { + Message::SendTrace() << "Warning! glMultiDrawArraysIndirectCount function required by OpenGL 4.6 specs is not found.\n" + "A non-standard glMultiDrawArraysIndirectCountARB fallback will be used instead.\n" + "Please report this issue to OpenGL driver vendor '" << theCtx.myVendor << "'."; + } + } + if (has46) { theCtx.core46 = (OpenGl_GlCore46* )this; diff --git a/src/OpenGl/OpenGl_GlFunctions.hxx b/src/OpenGl/OpenGl_GlFunctions.hxx index a8be687e88..adbe897e14 100644 --- a/src/OpenGl/OpenGl_GlFunctions.hxx +++ b/src/OpenGl/OpenGl_GlFunctions.hxx @@ -1693,18 +1693,6 @@ public: //! @name OpenGL 4.5 PFNGLGETNUNIFORMIVPROC glGetnUniformiv; PFNGLGETNUNIFORMUIVPROC glGetnUniformuiv; PFNGLREADNPIXELSPROC glReadnPixels; - PFNGLGETNMAPDVPROC glGetnMapdv; - PFNGLGETNMAPFVPROC glGetnMapfv; - PFNGLGETNMAPIVPROC glGetnMapiv; - PFNGLGETNPIXELMAPFVPROC glGetnPixelMapfv; - PFNGLGETNPIXELMAPUIVPROC glGetnPixelMapuiv; - PFNGLGETNPIXELMAPUSVPROC glGetnPixelMapusv; - PFNGLGETNPOLYGONSTIPPLEPROC glGetnPolygonStipple; - PFNGLGETNCOLORTABLEPROC glGetnColorTable; - PFNGLGETNCONVOLUTIONFILTERPROC glGetnConvolutionFilter; - PFNGLGETNSEPARABLEFILTERPROC glGetnSeparableFilter; - PFNGLGETNHISTOGRAMPROC glGetnHistogram; - PFNGLGETNMINMAXPROC glGetnMinmax; PFNGLTEXTUREBARRIERPROC glTextureBarrier; public: //! @name OpenGL 4.6 From 715fcb5a92f792e95258a6222be1a95bec45e3fe Mon Sep 17 00:00:00 2001 From: abulyche Date: Wed, 14 Jul 2021 23:40:32 +0300 Subject: [PATCH 013/639] 0027884: Modeling Algorithms - Possible improvement for 2d classifier Added the implementation of bndbox<->line and bndbox<->segment intersections for 2D to Bnd_Box2d Added the speedup for 2d classification to BRepClass_Intersector.cxx Added the test for our improvement --- src/BOPTest/BOPTest_LowCommands.cxx | 8 +- src/BRepClass/BRepClass_Edge.cxx | 9 +- src/BRepClass/BRepClass_Edge.hxx | 29 +++ src/BRepClass/BRepClass_FaceClassifier.cxx | 52 +++-- src/BRepClass/BRepClass_FaceClassifier.hxx | 22 +- src/BRepClass/BRepClass_FaceExplorer.cxx | 7 +- src/BRepClass/BRepClass_FaceExplorer.hxx | 29 +++ src/BRepClass/BRepClass_Intersector.cxx | 198 +++++++++++++----- src/BRepClass/BRepClass_Intersector.hxx | 14 -- src/BRepClass3d/BRepClass3d_SolidExplorer.cxx | 2 +- src/Bnd/Bnd_Box2d.cxx | 75 ++++++- src/Bnd/Bnd_Box2d.hxx | 7 + src/QABugs/QABugs_20.cxx | 118 +++++++++++ tests/bugs/modalg_6/bug27884 | 42 ++++ 14 files changed, 512 insertions(+), 100 deletions(-) create mode 100644 tests/bugs/modalg_6/bug27884 diff --git a/src/BOPTest/BOPTest_LowCommands.cxx b/src/BOPTest/BOPTest_LowCommands.cxx index b863f411d1..4f032f001f 100644 --- a/src/BOPTest/BOPTest_LowCommands.cxx +++ b/src/BOPTest/BOPTest_LowCommands.cxx @@ -124,7 +124,7 @@ Standard_Integer b2dclassify (Draw_Interpretor& theDI, const char** theArgVec) { if (theArgNb < 3) { - theDI << " use b2dclassify Face Point2d [Tol]\n"; + theDI << " use b2dclassify Face Point2d [Tol] [UseBox] [GapCheckTol]\n"; return 1; } @@ -144,9 +144,11 @@ Standard_Integer b2dclassify (Draw_Interpretor& theDI, const TopoDS_Face& aF = TopoDS::Face(aS); const Standard_Real aTol = (theArgNb == 4) ? Draw::Atof (theArgVec[3]) : BRep_Tool::Tolerance (aF); - + const Standard_Boolean anUseBox = (theArgNb == 5 && Draw::Atof(theArgVec[4]) == 0) ? + Standard_False : Standard_True; + const Standard_Real aGapCheckTol = (theArgNb == 6) ? Draw::Atof(theArgVec[5]) : 0.1; BRepClass_FaceClassifier aClassifier; - aClassifier.Perform(aF, aP, aTol); + aClassifier.Perform(aF, aP, aTol, anUseBox, aGapCheckTol); PrintState (theDI, aClassifier.State()); // return 0; diff --git a/src/BRepClass/BRepClass_Edge.cxx b/src/BRepClass/BRepClass_Edge.cxx index 0774105f1e..102fb6dcc5 100644 --- a/src/BRepClass/BRepClass_Edge.cxx +++ b/src/BRepClass/BRepClass_Edge.cxx @@ -17,6 +17,7 @@ #include #include +#include #include #include #include @@ -25,7 +26,7 @@ //function : BRepClass_Edge //purpose : //======================================================================= -BRepClass_Edge::BRepClass_Edge() +BRepClass_Edge::BRepClass_Edge() : myMaxTolerance(Precision::Infinite()), myUseBndBox(Standard_False) { } @@ -47,7 +48,7 @@ void BRepClass_Edge::SetNextEdge(const TopTools_IndexedDataMapOfShapeListOfShape return; } const TopTools_ListOfShape* aListE = theMapVE.Seek(aVL); - if ((*aListE).Extent() == 2) + if (aListE->Extent() == 2) { for (TopTools_ListIteratorOfListOfShape anIt(*aListE); anIt.More(); anIt.Next()) { @@ -68,7 +69,9 @@ void BRepClass_Edge::SetNextEdge(const TopTools_IndexedDataMapOfShapeListOfShape BRepClass_Edge::BRepClass_Edge(const TopoDS_Edge& E, const TopoDS_Face& F) : myEdge(E), - myFace(F) + myFace(F), + myMaxTolerance(Precision::Infinite()), + myUseBndBox(Standard_False) { } diff --git a/src/BRepClass/BRepClass_Edge.hxx b/src/BRepClass/BRepClass_Edge.hxx index fe742f363c..a9e5b25643 100644 --- a/src/BRepClass/BRepClass_Edge.hxx +++ b/src/BRepClass/BRepClass_Edge.hxx @@ -57,6 +57,33 @@ const TopoDS_Face& Face() const; //! Finds and sets the next Edge for the current Standard_EXPORT void SetNextEdge(const TopTools_IndexedDataMapOfShapeListOfShape& theMapVE); + //! Returns the maximum tolerance + Standard_Real MaxTolerance() const + { + return myMaxTolerance; + } + + //! Sets the maximum tolerance at + //! which to start checking in the intersector + void SetMaxTolerance(const Standard_Real theValue) + { + myMaxTolerance = theValue; + } + + //! Returns true if we are using boxes + //! in the intersector + Standard_Boolean UseBndBox() const + { + return myUseBndBox; + } + + //! Sets the status of whether we are + //! using boxes or not + void SetUseBndBox(const Standard_Boolean theValue) + { + myUseBndBox = theValue; + } + protected: @@ -71,6 +98,8 @@ private: TopoDS_Edge myEdge; TopoDS_Face myFace; TopoDS_Edge myNextEdge; + Standard_Real myMaxTolerance; + Standard_Boolean myUseBndBox; }; diff --git a/src/BRepClass/BRepClass_FaceClassifier.cxx b/src/BRepClass/BRepClass_FaceClassifier.cxx index e5ab5006f4..65cc41fc0c 100644 --- a/src/BRepClass/BRepClass_FaceClassifier.cxx +++ b/src/BRepClass/BRepClass_FaceClassifier.cxx @@ -46,33 +46,41 @@ BRepClass_FaceClassifier::BRepClass_FaceClassifier(BRepClass_FaceExplorer& F, //function : BRepClass_FaceClassifier //purpose : //======================================================================= -BRepClass_FaceClassifier::BRepClass_FaceClassifier(const TopoDS_Face& F, - const gp_Pnt& P, - const Standard_Real Tol) +BRepClass_FaceClassifier::BRepClass_FaceClassifier(const TopoDS_Face& theF, + const gp_Pnt& theP, + const Standard_Real theTol, + const Standard_Boolean theUseBndBox, + const Standard_Real theGapCheckTol) { - Perform(F,P,Tol); + Perform(theF, theP, theTol, theUseBndBox, theGapCheckTol); } //======================================================================= //function : BRepClass_FaceClassifier //purpose : //======================================================================= -BRepClass_FaceClassifier::BRepClass_FaceClassifier(const TopoDS_Face& F, - const gp_Pnt2d& P, - const Standard_Real Tol) +BRepClass_FaceClassifier::BRepClass_FaceClassifier(const TopoDS_Face& theF, + const gp_Pnt2d& theP, + const Standard_Real theTol, + const Standard_Boolean theUseBndBox, + const Standard_Real theGapCheckTol) { - Perform(F,P,Tol); + Perform(theF, theP, theTol, theUseBndBox, theGapCheckTol); } //======================================================================= //function : Perform //purpose : //======================================================================= -void BRepClass_FaceClassifier::Perform(const TopoDS_Face& F, - const gp_Pnt2d& P, - const Standard_Real Tol) +void BRepClass_FaceClassifier::Perform(const TopoDS_Face& theF, + const gp_Pnt2d& theP, + const Standard_Real theTol, + const Standard_Boolean theUseBndBox, + const Standard_Real theGapCheckTol) { - BRepClass_FaceExplorer Fex(F); - BRepClass_FClassifier::Perform(Fex,P,Tol); + BRepClass_FaceExplorer aFex(theF); + aFex.SetMaxTolerance(theGapCheckTol); + aFex.SetUseBndBox(theUseBndBox); + BRepClass_FClassifier::Perform(aFex, theP, theTol); } @@ -84,9 +92,11 @@ void BRepClass_FaceClassifier::Perform(const TopoDS_Face& F, //function : Perform //purpose : //======================================================================= -void BRepClass_FaceClassifier::Perform(const TopoDS_Face& aF, - const gp_Pnt& aP, - const Standard_Real aTol) +void BRepClass_FaceClassifier::Perform(const TopoDS_Face& theF, + const gp_Pnt& theP, + const Standard_Real theTol, + const Standard_Boolean theUseBndBox, + const Standard_Real theGapCheckTol) { Standard_Integer aNbExt, aIndice, i; Standard_Real aU1, aU2, aV1, aV2, aMaxDist, aD; @@ -96,14 +106,14 @@ void BRepClass_FaceClassifier::Perform(const TopoDS_Face& aF, aMaxDist=RealLast(); aIndice=0; // - BRepAdaptor_Surface aSurf(aF, Standard_False); - BRepTools::UVBounds(aF, aU1, aU2, aV1, aV2); - aExtrema.Initialize(aSurf, aU1, aU2, aV1, aV2, aTol, aTol); + BRepAdaptor_Surface aSurf(theF, Standard_False); + BRepTools::UVBounds(theF, aU1, aU2, aV1, aV2); + aExtrema.Initialize(aSurf, aU1, aU2, aV1, aV2, theTol, theTol); // //modified by NIZNHY-PKV Wed Aug 13 11:28:47 2008f rejected=Standard_True; //modified by NIZNHY-PKV Wed Aug 13 11:28:49 2008t - aExtrema.Perform(aP); + aExtrema.Perform(theP); if(!aExtrema.IsDone()) { return; } @@ -124,6 +134,6 @@ void BRepClass_FaceClassifier::Perform(const TopoDS_Face& aF, if(aIndice) { aExtrema.Point(aIndice).Parameter(aU1, aU2); aPuv.SetCoord(aU1, aU2); - Perform(aF, aPuv, aTol); + Perform(theF, aPuv, theTol, theUseBndBox, theGapCheckTol); } } diff --git a/src/BRepClass/BRepClass_FaceClassifier.hxx b/src/BRepClass/BRepClass_FaceClassifier.hxx index 7bce0288a3..e4382fb6e2 100644 --- a/src/BRepClass/BRepClass_FaceClassifier.hxx +++ b/src/BRepClass/BRepClass_FaceClassifier.hxx @@ -46,19 +46,31 @@ public: //! Creates an algorithm to classify the Point P with //! Tolerance on the face . - Standard_EXPORT BRepClass_FaceClassifier(const TopoDS_Face& F, const gp_Pnt2d& P, const Standard_Real Tol); - + //! Recommended to use Bnd_Box if the number of edges > 10 + //! and the geometry is mostly spline + Standard_EXPORT BRepClass_FaceClassifier(const TopoDS_Face& theF, const gp_Pnt2d& theP, const Standard_Real theTol, + const Standard_Boolean theUseBndBox = Standard_False, const Standard_Real theGapCheckTol = 0.1); + //! Classify the Point P with Tolerance on the //! face described by . - Standard_EXPORT void Perform (const TopoDS_Face& F, const gp_Pnt2d& P, const Standard_Real Tol); + //! Recommended to use Bnd_Box if the number of edges > 10 + //! and the geometry is mostly spline + Standard_EXPORT void Perform (const TopoDS_Face& theF, const gp_Pnt2d& theP, const Standard_Real theTol, + const Standard_Boolean theUseBndBox = Standard_False, const Standard_Real theGapCheckTol = 0.1); //! Creates an algorithm to classify the Point P with //! Tolerance on the face . - Standard_EXPORT BRepClass_FaceClassifier(const TopoDS_Face& F, const gp_Pnt& P, const Standard_Real Tol); + //! Recommended to use Bnd_Box if the number of edges > 10 + //! and the geometry is mostly spline + Standard_EXPORT BRepClass_FaceClassifier(const TopoDS_Face& theF, const gp_Pnt& theP, const Standard_Real theTol, + const Standard_Boolean theUseBndBox = Standard_False, const Standard_Real theGapCheckTol = 0.1); //! Classify the Point P with Tolerance on the //! face described by . - Standard_EXPORT void Perform (const TopoDS_Face& F, const gp_Pnt& P, const Standard_Real Tol); + //! Recommended to use Bnd_Box if the number of edges > 10 + //! and the geometry is mostly spline + Standard_EXPORT void Perform (const TopoDS_Face& theF, const gp_Pnt& theP, const Standard_Real theTol, + const Standard_Boolean theUseBndBox = Standard_False, const Standard_Real theGapCheckTol = 0.1); diff --git a/src/BRepClass/BRepClass_FaceExplorer.cxx b/src/BRepClass/BRepClass_FaceExplorer.cxx index 93ccbd95ad..88ad99afb8 100644 --- a/src/BRepClass/BRepClass_FaceExplorer.cxx +++ b/src/BRepClass/BRepClass_FaceExplorer.cxx @@ -36,14 +36,17 @@ static const Standard_Real Probing_Step = 0.2111; //purpose : //======================================================================= -BRepClass_FaceExplorer::BRepClass_FaceExplorer(const TopoDS_Face& F) : +BRepClass_FaceExplorer::BRepClass_FaceExplorer(const TopoDS_Face& F) : myFace(F), myCurEdgeInd(1), myCurEdgePar(Probing_Start), + myMaxTolerance(0.1), + myUseBndBox(Standard_False), myUMin (Precision::Infinite()), myUMax (-Precision::Infinite()), myVMin (Precision::Infinite()), myVMax (-Precision::Infinite()) + { myFace.Orientation(TopAbs_FORWARD); } @@ -338,5 +341,7 @@ void BRepClass_FaceExplorer::CurrentEdge(BRepClass_Edge& E, E.Face() = myFace; Or = E.Edge().Orientation(); E.SetNextEdge(myMapVE); + E.SetMaxTolerance(myMaxTolerance); + E.SetUseBndBox(myUseBndBox); } diff --git a/src/BRepClass/BRepClass_FaceExplorer.hxx b/src/BRepClass/BRepClass_FaceExplorer.hxx index d075136069..8866993bc2 100644 --- a/src/BRepClass/BRepClass_FaceExplorer.hxx +++ b/src/BRepClass/BRepClass_FaceExplorer.hxx @@ -94,6 +94,33 @@ public: //! Current edge in current wire and its orientation. Standard_EXPORT void CurrentEdge (BRepClass_Edge& E, TopAbs_Orientation& Or) const; + //! Returns the maximum tolerance + Standard_Real MaxTolerance() const + { + return myMaxTolerance; + } + + //! Sets the maximum tolerance at + //! which to start checking in the intersector + void SetMaxTolerance(const Standard_Real theValue) + { + myMaxTolerance = theValue; + } + + //! Returns true if we are using boxes + //! in the intersector + Standard_Boolean UseBndBox() const + { + return myUseBndBox; + } + + //! Sets the status of whether we are + //! using boxes or not + void SetUseBndBox(const Standard_Boolean theValue) + { + myUseBndBox = theValue; + } + @@ -112,6 +139,8 @@ private: TopExp_Explorer myEExplorer; Standard_Integer myCurEdgeInd; Standard_Real myCurEdgePar; + Standard_Real myMaxTolerance; + Standard_Boolean myUseBndBox; TopTools_IndexedDataMapOfShapeListOfShape myMapVE; Standard_Real myUMin; diff --git a/src/BRepClass/BRepClass_Intersector.cxx b/src/BRepClass/BRepClass_Intersector.cxx index 8e0cf6d81c..dae1ef8b12 100644 --- a/src/BRepClass/BRepClass_Intersector.cxx +++ b/src/BRepClass/BRepClass_Intersector.cxx @@ -15,6 +15,8 @@ // commercial license or contractual agreement. +#include +#include #include #include #include @@ -53,10 +55,10 @@ static Standard_Boolean CheckOn(IntRes2d_IntersectionPoint& thePntInter, const TopoDS_Face& theF, const gp_Lin2d& theL, - Geom2dAdaptor_Curve& theCur, - Standard_Real theTolZ, - Standard_Real theFin, - Standard_Real theDeb); + const Geom2dAdaptor_Curve& theCur, + Standard_Real& theTolZ, + const Standard_Real theFin, + const Standard_Real theDeb); static void CheckSkip(Geom2dInt_GInter& theInter, @@ -66,22 +68,93 @@ void CheckSkip(Geom2dInt_GInter& theInter, const IntRes2d_Domain& theDL, Geom2dAdaptor_Curve& theCur, const Geom2dAdaptor_Curve& theCGA, - Standard_Real theFin, - Standard_Real theDeb, - Standard_Real theMaxTol, - gp_Pnt2d thePdeb, - gp_Pnt2d thePfin); + Standard_Real& theFin, + Standard_Real& theDeb, + const Standard_Real theMaxTol, + gp_Pnt2d& thePdeb, + gp_Pnt2d& thePfin); +static +Standard_Real MaxTol2DCurEdge(const TopoDS_Vertex& theV1, + const TopoDS_Vertex& theV2, + const TopoDS_Face& theF, + const Standard_Real theTol); + +static +Standard_Boolean IsInter(Bnd_Box2d& theBox, + const gp_Lin2d& theL, + const Standard_Real theP); //======================================================================= //function : BRepClass_Intersector //purpose : //======================================================================= -BRepClass_Intersector::BRepClass_Intersector() : myMaxTolerance(0.1) +BRepClass_Intersector::BRepClass_Intersector() { } +//======================================================================= +//function : MaxTol2DCurEdge +//purpose : +//======================================================================= +Standard_Real MaxTol2DCurEdge(const TopoDS_Vertex& theV1, + const TopoDS_Vertex& theV2, + const TopoDS_Face& theF, + const Standard_Real theTol) +{ + Standard_Real aTolV3D1, aTolV3D2; + if (theV1.IsNull()) + { + aTolV3D1 = 0.0; + } + else + { + aTolV3D1 = BRep_Tool::Tolerance(theV1); + } + if (theV2.IsNull()) + { + aTolV3D2 = 0.0; + } + else + { + aTolV3D2 = BRep_Tool::Tolerance(theV2); + } + Standard_Real aTol2D, anUr, aVr; + + Standard_Real aTolV3D = Max(aTolV3D1, aTolV3D2); + BRepAdaptor_Surface aS(theF, Standard_False); + + anUr = aS.UResolution(aTolV3D); + aVr = aS.VResolution(aTolV3D); + aTol2D = Max(anUr, aVr); + // + aTol2D = Max(aTol2D, theTol); + return aTol2D; +} + +//======================================================================= +//function : IsInter +//purpose : +//======================================================================= +Standard_Boolean IsInter(Bnd_Box2d& theBox, + const gp_Lin2d& theL, + const Standard_Real theP) +{ + Standard_Boolean aStatusInter = Standard_True; + if (Precision::IsInfinite(theP)) + { + aStatusInter = theBox.IsOut(theL); + } + else + { + gp_Pnt2d aPntF = theL.Location(); + gp_Pnt2d aPntL = ElCLib::Value(theP, theL); + aStatusInter = theBox.IsOut(aPntF, aPntL); + } + return !aStatusInter; +} + //======================================================================= //function : CheckOn //purpose : @@ -89,10 +162,10 @@ BRepClass_Intersector::BRepClass_Intersector() : myMaxTolerance(0.1) Standard_Boolean CheckOn(IntRes2d_IntersectionPoint& thePntInter, const TopoDS_Face& theF, const gp_Lin2d& theL, - Geom2dAdaptor_Curve& theCur, - Standard_Real theTolZ, - Standard_Real theFin, - Standard_Real theDeb) + const Geom2dAdaptor_Curve& theCur, + Standard_Real& theTolZ, + const Standard_Real theFin, + const Standard_Real theDeb) { Extrema_ExtPC2d anExtPC2d(theL.Location(), theCur); Standard_Real aMinDist = RealLast(); @@ -153,11 +226,11 @@ void CheckSkip(Geom2dInt_GInter& theInter, const IntRes2d_Domain& theDL, Geom2dAdaptor_Curve& theCur, const Geom2dAdaptor_Curve& theCGA, - Standard_Real theFin, - Standard_Real theDeb, - Standard_Real theMaxTol, - gp_Pnt2d thePdeb, - gp_Pnt2d thePfin) + Standard_Real& theFin, + Standard_Real& theDeb, + const Standard_Real theMaxTol, + gp_Pnt2d& thePdeb, + gp_Pnt2d& thePfin) { if (theE.Edge().IsNull() || theE.Face().IsNull()) { @@ -272,10 +345,10 @@ void CheckSkip(Geom2dInt_GInter& theInter, //function : Perform //purpose : //======================================================================= -void BRepClass_Intersector::Perform(const gp_Lin2d& L, - const Standard_Real P, - const Standard_Real Tol, - const BRepClass_Edge& E) +void BRepClass_Intersector::Perform(const gp_Lin2d& L, + const Standard_Real P, + const Standard_Real Tol, + const BRepClass_Edge& E) { Standard_Real deb = 0.0, fin = 0.0, aTolZ = Tol; Handle(Geom2d_Curve) aC2D; @@ -284,69 +357,92 @@ void BRepClass_Intersector::Perform(const gp_Lin2d& L, const TopoDS_Face& F = E.Face(); // - aC2D=BRep_Tool::CurveOnSurface(EE, F, deb, fin); + aC2D = BRep_Tool::CurveOnSurface(EE, F, deb, fin); if (aC2D.IsNull()) { done = Standard_False; // !IsDone() return; } // - Geom2dAdaptor_Curve C(aC2D, deb, fin); + Bnd_Box2d aBond; + gp_Pnt2d aPntF; + Standard_Boolean anUseBndBox = E.UseBndBox(); + if (anUseBndBox) + { + BndLib_Add2dCurve::Add(aC2D, deb, fin, 0., aBond); + aBond.SetGap(aTolZ); + aPntF = L.Location(); + } // - deb = C.FirstParameter(); - fin = C.LastParameter(); + Geom2dAdaptor_Curve C(aC2D, deb, fin); // // Case of "ON": direct check of belonging to edge // taking into account the tolerance - Standard_Boolean aStatusOn = Standard_False; - IntRes2d_IntersectionPoint aPntInter; + if (!anUseBndBox || (anUseBndBox && !aBond.IsOut(aPntF))) + { + Standard_Boolean aStatusOn = Standard_False; + IntRes2d_IntersectionPoint aPntInter; - aStatusOn = CheckOn(aPntInter, F, L, C, aTolZ, fin, deb); - if (aStatusOn) + aStatusOn = CheckOn(aPntInter, F, L, C, aTolZ, fin, deb); + if (aStatusOn) + { + Append(aPntInter); + done = Standard_True; + return; + } + } + // + if (anUseBndBox) { - Append(aPntInter); - done = Standard_True; - return; + TopoDS_Vertex aVF, aVL; + TopExp::Vertices(EE, aVF, aVL); + + aTolZ = MaxTol2DCurEdge(aVF, aVL, F, Tol); + aBond.SetGap(aTolZ); + + if (!IsInter(aBond, L, P)) + { + done = Standard_False; + return; + } } - - // - gp_Pnt2d pdeb,pfin; - C.D0(deb,pdeb); - C.D0(fin,pfin); + gp_Pnt2d pdeb, pfin; + C.D0(deb, pdeb); + C.D0(fin, pfin); Standard_Real toldeb = 1.e-5, tolfin = 1.e-5; IntRes2d_Domain DL; // - if(P!=RealLast()) { - DL.SetValues(L.Location(),0.,Precision::PConfusion(),ElCLib::Value(P,L),P,Precision::PConfusion()); + if (P != RealLast()) { + DL.SetValues(L.Location(), 0., Precision::PConfusion(), ElCLib::Value(P, L), P, Precision::PConfusion()); } - else { - DL.SetValues(L.Location(),0.,Precision::PConfusion(),Standard_True); + else { + DL.SetValues(L.Location(), 0., Precision::PConfusion(), Standard_True); } - IntRes2d_Domain DE(pdeb,deb,toldeb,pfin,fin,tolfin); + IntRes2d_Domain DE(pdeb, deb, toldeb, pfin, fin, tolfin); // temporary periodic domain if (C.Curve()->IsPeriodic()) { DE.SetEquivalentParameters(C.FirstParameter(), - C.FirstParameter() + + C.FirstParameter() + C.Curve()->LastParameter() - C.Curve()->FirstParameter()); } - Handle(Geom2d_Line) GL= new Geom2d_Line(L); + Handle(Geom2d_Line) GL = new Geom2d_Line(L); Geom2dAdaptor_Curve CGA(GL); - Geom2dInt_GInter Inter(CGA,DL,C,DE, + Geom2dInt_GInter Inter(CGA, DL, C, DE, Precision::PConfusion(), Precision::PIntersection()); // // The check is for hitting the intersector to // a vertex with high tolerance - if (Inter.IsEmpty()) + if (Inter.IsEmpty()) { - CheckSkip(Inter, L, E, aC2D, DL, - C, CGA, fin, deb, MaxTolerance(), pdeb, pfin); + CheckSkip(Inter, L, E, aC2D, DL, + C, CGA, fin, deb, E.MaxTolerance(), pdeb, pfin); } - // + // SetValues(Inter); } diff --git a/src/BRepClass/BRepClass_Intersector.hxx b/src/BRepClass/BRepClass_Intersector.hxx index 279b34c97a..05acbc2e63 100644 --- a/src/BRepClass/BRepClass_Intersector.hxx +++ b/src/BRepClass/BRepClass_Intersector.hxx @@ -47,19 +47,6 @@ public: //! . Standard_EXPORT void LocalGeometry (const BRepClass_Edge& E, const Standard_Real U, gp_Dir2d& T, gp_Dir2d& N, Standard_Real& C) const; - //! Returns the maximum tolerance - Standard_Real MaxTolerance() - { - return myMaxTolerance; - } - - //! Sets the maximum tolerance at - //! which to start checking in the intersector - void SetMaxTolerance(const Standard_Real theValue) - { - myMaxTolerance = theValue; - } - protected: @@ -71,7 +58,6 @@ protected: private: - Standard_Real myMaxTolerance; }; diff --git a/src/BRepClass3d/BRepClass3d_SolidExplorer.cxx b/src/BRepClass3d/BRepClass3d_SolidExplorer.cxx index 3b0aa638f5..07a45b616d 100644 --- a/src/BRepClass3d/BRepClass3d_SolidExplorer.cxx +++ b/src/BRepClass3d/BRepClass3d_SolidExplorer.cxx @@ -129,7 +129,7 @@ Standard_Boolean BRepClass3d_SolidExplorer::FindAPointInTheFace { T.SetCoord ( y, -x); } - Standard_Real ParamInit = RealLast(); + Standard_Real ParamInit = Precision::Infinite(); Standard_Real TolInit = 0.00001; Standard_Boolean APointExist = Standard_False; diff --git a/src/Bnd/Bnd_Box2d.cxx b/src/Bnd/Bnd_Box2d.cxx index f082dbc494..de882d94bb 100644 --- a/src/Bnd/Bnd_Box2d.cxx +++ b/src/Bnd/Bnd_Box2d.cxx @@ -18,7 +18,6 @@ #include #include #include -#include #include #include #include @@ -251,6 +250,80 @@ Standard_Boolean Bnd_Box2d::IsOut (const gp_Pnt2d& P) const } } +//======================================================================= +//function : IsOut +//purpose : +//======================================================================= + +Standard_Boolean Bnd_Box2d::IsOut(const gp_Lin2d& theL) const +{ + if (IsWhole()) + { + return Standard_False; + } + if (IsVoid()) + { + return Standard_True; + } + Standard_Real aXMin, aXMax, aYMin, aYMax; + Get(aXMin, aYMin, aXMax, aYMax); + + gp_XY aCenter((aXMin + aXMax) / 2, (aYMin + aYMax) / 2); + gp_XY aHeigh(Abs(aXMax - aCenter.X()), Abs(aYMax - aCenter.Y())); + + const Standard_Real aProd[3] = { + theL.Direction().XY() ^ (aCenter - theL.Location().XY()), + theL.Direction().X() * aHeigh.Y(), + theL.Direction().Y() * aHeigh.X() + }; + Standard_Boolean aStatus = (Abs(aProd[0]) > (Abs(aProd[1]) + Abs(aProd[2]))); + return aStatus; +} + +//======================================================================= +//function : IsOut +//purpose : +//======================================================================= + +Standard_Boolean Bnd_Box2d::IsOut(const gp_Pnt2d& theP0, const gp_Pnt2d& theP1) const +{ + if (IsWhole()) + { + return Standard_False; + } + if (IsVoid()) + { + return Standard_True; + } + + Standard_Boolean aStatus = Standard_True; + Standard_Real aLocXMin, aLocXMax, aLocYMin, aLocYMax; + Get(aLocXMin, aLocYMin, aLocXMax, aLocYMax); + + //// Intersect the line containing the segment. + const gp_XY aSegDelta(theP1.XY() - theP0.XY()); + + gp_XY aCenter((aLocXMin + aLocXMax) / 2, (aLocYMin + aLocYMax) / 2); + gp_XY aHeigh(Abs(aLocXMax - aCenter.X()), Abs(aLocYMax - aCenter.Y())); + + const Standard_Real aProd[3] = { + aSegDelta ^ (aCenter - theP0.XY()), + aSegDelta.X() * aHeigh.Y(), + aSegDelta.Y() * aHeigh.X() + }; + + if((Abs(aProd[0]) <= (Abs(aProd[1]) + Abs(aProd[2])))) + { + // Intersection with line detected; check the segment as bounding box + const gp_XY aHSeg(0.5 * aSegDelta.X(), 0.5 * aSegDelta.Y()); + const gp_XY aHSegAbs(Abs(aHSeg.X()), Abs(aHSeg.Y())); + aStatus = ((Abs((theP0.XY() + aHSeg - aCenter).X()) > + (aHeigh + aHSegAbs).X()) || (Abs((theP0.XY() + aHSeg - aCenter).Y()) > + (aHeigh + aHSegAbs).Y())); + } + return aStatus; +} + //======================================================================= //function : IsOut //purpose : diff --git a/src/Bnd/Bnd_Box2d.hxx b/src/Bnd/Bnd_Box2d.hxx index 3e1ae44a5e..02dd79dc09 100644 --- a/src/Bnd/Bnd_Box2d.hxx +++ b/src/Bnd/Bnd_Box2d.hxx @@ -17,6 +17,7 @@ #ifndef _Bnd_Box2d_HeaderFile #define _Bnd_Box2d_HeaderFile +#include #include #include #include @@ -182,7 +183,13 @@ public: //! Returns True if the 2d pnt

is out . Standard_EXPORT Standard_Boolean IsOut (const gp_Pnt2d& P) const; + + //! Returns True if the line doesn't intersect the box. + Standard_EXPORT Standard_Boolean IsOut(const gp_Lin2d& theL) const; + //! Returns True if the segment doesn't intersect the box. + Standard_EXPORT Standard_Boolean IsOut(const gp_Pnt2d& theP0, const gp_Pnt2d& theP1) const; + //! Returns True if is out . Standard_EXPORT Standard_Boolean IsOut (const Bnd_Box2d& Other) const; diff --git a/src/QABugs/QABugs_20.cxx b/src/QABugs/QABugs_20.cxx index 67da0fa80f..d7098ec4bf 100644 --- a/src/QABugs/QABugs_20.cxx +++ b/src/QABugs/QABugs_20.cxx @@ -2069,6 +2069,123 @@ static Standard_Integer OCC27875(Draw_Interpretor& theDI, return 0; } +#include +static Standard_Integer OCC27884(Draw_Interpretor& theDI, + Standard_Integer theArgNb, + const char** theArgVec) +{ + if (theArgNb != 4) { + return 0; + } + Standard_Real aCheck = Draw::Atof(theArgVec[3]); + Handle(Geom_Curve) aCur = DrawTrSurf::GetCurve(theArgVec[1]); + + const Handle(Standard_Type)& aType = aCur->DynamicType(); + + Standard_Real aF = aCur->FirstParameter(); + Standard_Real aL = aCur->LastParameter(); + + Standard_Real number_points = Draw::Atof(theArgVec[2]); + Standard_Real aSig = (aL - aF) / (number_points - 1); + + TopTools_ListOfShape aLE; + + gp_Pnt aP, aPF, aPL; + aPF = aCur->Value(aF); + aP = aPF; + + for (Standard_Integer i = 1; i < number_points; i++) + { + TopoDS_Edge anE; + aL = aF + (i * aSig); + aPL = aCur->Value(aL); + if (aCheck == 2) + { + if (i % 2 == 1) + { + anE = BRepBuilderAPI_MakeEdge(aPF, aPL); + } + else + { + if (aType == STANDARD_TYPE(Geom_BSplineCurve)) + { + Handle(Geom_BSplineCurve) aCurCopy = Handle(Geom_BSplineCurve)::DownCast(aCur->Copy()); + aCurCopy->Segment(aL - aSig, aL); + anE = BRepBuilderAPI_MakeEdge(aCurCopy); + } + else + { + Handle(Geom_TrimmedCurve) aTCur = new Geom_TrimmedCurve(aCur, aL - aSig, aL); + anE = BRepBuilderAPI_MakeEdge(aTCur); + } + } + aPF = aPL; + } + else + { + if (aCheck == 0) + { + anE = BRepBuilderAPI_MakeEdge(aPF, aPL); + aPF = aPL; + } + if (aCheck == 1) + { + if (aType == STANDARD_TYPE(Geom_BSplineCurve)) + { + Handle(Geom_BSplineCurve) aCurCopy = Handle(Geom_BSplineCurve)::DownCast(aCur->Copy()); + aCurCopy->Segment(aL - aSig, aL); + anE = BRepBuilderAPI_MakeEdge(aCurCopy); + } + else + { + Handle(Geom_TrimmedCurve) aTCur = new Geom_TrimmedCurve(aCur, aL - aSig, aL); + anE = BRepBuilderAPI_MakeEdge(aTCur); + } + } + } + aLE.Append(anE); + } + if (!aCur->IsClosed()) + { + TopoDS_Edge anE = BRepBuilderAPI_MakeEdge(aPL, aP); + aLE.Append(anE); + } + + BRepBuilderAPI_MakeWire aWire; + aWire.Add(aLE); + TopoDS_Face aFace = BRepBuilderAPI_MakeFace(aWire.Wire()); + + // + + Standard_Real anUMin, anUMax, aVMin, aVMax; + BRepTools::UVBounds(aFace, anUMin, anUMax, aVMin, aVMax); + gp_Pnt2d aP2d(anUMin - ((anUMax + anUMin) / 2), aVMin - ((aVMax + aVMin) / 2)); + + const Standard_Real aTol = BRep_Tool::Tolerance(aFace); + + BRepClass_FaceClassifier aClassifier; + + OSD_Timer timer; + timer.Start(); + for (Standard_Integer i = 1; i <= 100; i++) + { + aClassifier.Perform(aFace, aP2d, aTol, Standard_True); + } + timer.Stop(); + Standard_Real aTimer1 = timer.UserTimeCPU(); + timer.Reset(); + timer.Start(); + for (Standard_Integer i = 1; i <= 100; i++) + { + aClassifier.Perform(aFace, aP2d, aTol, Standard_False); + } + timer.Stop(); + Standard_Real aTimer2 = timer.UserTimeCPU(); + theDI << "Improving time: " << (aTimer2 - aTimer1) / aTimer2 * 100 << " %\n"; + + return 0; +} + #include #include @@ -3901,6 +4018,7 @@ void QABugs::Commands_20(Draw_Interpretor& theCommands) { theCommands.Add("OCC26270", "OCC26270 shape result", __FILE__, OCC26270, group); theCommands.Add ("OCC27552", "OCC27552", __FILE__, OCC27552, group); theCommands.Add("OCC27875", "OCC27875 curve", __FILE__, OCC27875, group); + theCommands.Add("OCC27884", "OCC27884: Possible improvement for 2d classifier", __FILE__, OCC27884, group); theCommands.Add("OCC28389", "OCC28389", __FILE__, OCC28389, group); theCommands.Add("OCC28594", "OCC28594", __FILE__, OCC28594, group); theCommands.Add("OCC28784", "OCC28784 result shape", __FILE__, OCC28784, group); diff --git a/tests/bugs/modalg_6/bug27884 b/tests/bugs/modalg_6/bug27884 new file mode 100644 index 0000000000..0127894c05 --- /dev/null +++ b/tests/bugs/modalg_6/bug27884 @@ -0,0 +1,42 @@ +puts "=================================================================" +puts "OCC27884: Modeling Algorithms - Possible improvement for 2d classifier" +puts "=================================================================" +puts "" + +pload ALL +pload QAcommands + +circle c 1 0 0 150 + +set res1 [OCC27884 c 400 0] +regexp {Improving time: +([-0-9.+eE]+) %} $res1 full time1 + +if { $time1 <= 5 } { + puts "Error: algorithm slowed down" +} + + +set res2 [OCC27884 c 250 1] +regexp {Improving time: +([-0-9.+eE]+) %} $res2 full time2 + +if { $time2 <= 5 } { + puts "Error: algorithm slowed down" +} + + +convert c1 c + +set res3 [OCC27884 c1 350 2] +regexp {Improving time: +([-0-9.+eE]+) %} $res3 full time3 + +if { $time3 <= 15 } { + puts "Error: algorithm slowed down" +} + + +set res4 [OCC27884 c1 250 1] +regexp {Improving time: +([-0-9.+eE]+) %} $res4 full time4 + +if { $time4 <= 15 } { + puts "Error: algorithm slowed down" +} From 7b5f784419eb9fd9a1d3dc69eff89d3e720d6e97 Mon Sep 17 00:00:00 2001 From: knosulko Date: Thu, 29 Jul 2021 11:00:09 +0300 Subject: [PATCH 014/639] 0026979: Parabola curve intersection with variety of surfaces produces incorrect results. Method Intf_Tool::ParabBox now properly estimates the number of segments for a 3D parabola. Fix input arguments of called Bnd_Box::Get method in Intf_Tool::HyprBox method. --- src/Intf/Intf_Tool.cxx | 257 ++++++++++++++++++++++++++++++++-- tests/lowalgos/intcs/bug26979 | 39 ++++++ 2 files changed, 288 insertions(+), 8 deletions(-) create mode 100644 tests/lowalgos/intcs/bug26979 diff --git a/src/Intf/Intf_Tool.cxx b/src/Intf/Intf_Tool.cxx index 126454008e..bc78341dbc 100644 --- a/src/Intf/Intf_Tool.cxx +++ b/src/Intf/Intf_Tool.cxx @@ -730,7 +730,7 @@ void Intf_Tool::HyprBox(const gp_Hypr& theHypr, Standard_Integer npi; Standard_Real Xmin, Ymin, Zmin, Xmax, Ymax, Zmax; // - domain.Get(Xmax, Ymax, Zmax, Xmin, Ymin, Zmin); + domain.Get(Xmin, Ymin, Zmin, Xmax, Ymax, Zmax); // for (npi=0; npi 0 ; i--) { + for (Standard_Integer j = 0; j < i; j++) { + if (parint[i] <= parint[j]) { + std::swap(parint[i], parint[j]); + std::swap(zint[i], zint[j]); + std::swap(yint[i], yint[j]); + std::swap(xint[i], xint[j]); + std::swap(bord[i], bord[j]); + } + + if ((i < nbpi - 1) && IsEqual(parint[i], parint[i+1])) { + aNbDiffPoints--; + for (Standard_Integer k = i; k < aNbDiffPoints; k++) { + parint[k] = parint[k+1]; + zint[k] = zint[k+1]; + yint[k] = yint[k+1]; + xint[k] = xint[k+1]; + bord[k] = bord[k+1]; + } + } + } + } + + return aNbDiffPoints; +} //======================================================================= //function : ParabBox //purpose : //======================================================================= -void Intf_Tool::ParabBox(const gp_Parab&, - const Bnd_Box& domain, - Bnd_Box& boxParab) +void Intf_Tool::ParabBox(const gp_Parab& theParab, + const Bnd_Box& domain, + Bnd_Box& boxParab) { nbSeg=0; boxParab.SetVoid(); - if (domain.IsWhole()) { + if (domain.IsWhole()) { boxParab.SetWhole(); nbSeg=1; beginOnCurve[0]=-Precision::Infinite(); endOnCurve[0]=Precision::Infinite(); return; } - else if (domain.IsVoid()) return; + else if (domain.IsVoid()) return; - -} + Standard_Integer nbPi = Inters3d(theParab, domain); + + if (nbPi > 0) { + Standard_Integer npi; + Standard_Real Xmin, Ymin, Zmin, Xmax, Ymax, Zmax; + domain.Get(Xmin, Ymin, Zmin, Xmax, Ymax, Zmax); + + for (npi = 0; npi < nbPi; npi++) { + Xmin = Min(Xmin, xint[npi]); + Xmax = Max(Xmax, xint[npi]); + Ymin = Min(Ymin, yint[npi]); + Ymax = Max(Ymax, yint[npi]); + Zmin = Min(Zmin, zint[npi]); + Zmax = Max(Zmax, yint[npi]); + } + + boxParab.Update(Xmin, Ymin, Zmin, Xmax, Ymax, Zmax); + + gp_Pnt Pn; + gp_Vec Tan; + Standard_Real sinan = 0; + Standard_Boolean out = Standard_True; + + for (npi = 0; npi < nbPi; npi++) { + ElCLib::D1(parint[npi], theParab, Pn, Tan); + switch (bord[npi]) { + case 1: sinan = gp_XYZ(1., 0., 0.) * Tan.XYZ(); break; + case 2: sinan = gp_XYZ(0., 1., 0.) * Tan.XYZ(); break; + case 3: sinan = gp_XYZ(0., 0., 1.) * Tan.XYZ(); break; + case 4: sinan = gp_XYZ(-1., 0., 0.) * Tan.XYZ(); break; + case 5: sinan = gp_XYZ(0., -1., 0.) * Tan.XYZ(); break; + case 6: sinan = gp_XYZ(0., 0., -1.) * Tan.XYZ(); break; + } + if (Abs(sinan) > Precision::Angular()) { + if (sinan > 0.) { + out = Standard_False; + beginOnCurve[nbSeg] = parint[npi]; + nbSeg++; + } + else { + if (out) { + beginOnCurve[nbSeg] = -Precision::Infinite(); + nbSeg++; + } + endOnCurve[nbSeg - 1] = parint[npi]; + out = Standard_True; + + Standard_Integer ipmin; + if (beginOnCurve[nbSeg - 1] < -10.) ipmin = -10; + else ipmin = (Standard_Integer)(beginOnCurve[nbSeg - 1]); + + Standard_Integer ipmax; + if (endOnCurve[nbSeg - 1] > 10.) ipmax = 10; + else ipmax = (Standard_Integer)(endOnCurve[nbSeg - 1]); + + ipmin = ipmin * 10 + 1; + ipmax = ipmax * 10 - 1; + Standard_Integer ip, pas = 1; + for (ip = ipmin; ip <= ipmax; ip += pas) { + boxParab.Add(ElCLib::Value(Standard_Real(ip) / 10., theParab)); + if (Abs(ip) <= 10) pas = 1; + else pas = 10; + } + } + } + } + } + else if (!domain.IsOut(ElCLib::Value(0., theParab))) { + boxParab = domain; + beginOnCurve[0] = -Precision::Infinite(); + endOnCurve[0] = Precision::Infinite(); + nbSeg = 1; + } +} //======================================================================= //function : NbSegments diff --git a/tests/lowalgos/intcs/bug26979 b/tests/lowalgos/intcs/bug26979 new file mode 100644 index 0000000000..43d21fcc6e --- /dev/null +++ b/tests/lowalgos/intcs/bug26979 @@ -0,0 +1,39 @@ +puts "================" +puts "0026979: Modeling Algorithms - Parabola curve intersection with variety of surfaces produces incorrect results" +puts "================" +puts "" + +set BugNumber OCC26979 + +parabola c -5.0 -1.0 0.25 0 0 1 0.25 +trim c c 0 1000 + +beziersurf bz 3 3 -4 0 -1 -4 1 0 -4 0 1 -3 1 -1 -3 2 0 -3 1 1 -2 0 -1 -2 1 0 -2 0 1 + +bsplinesurf bs \ +1 5 0 1 1 1 2 1 3 1 4 1 \ +1 5 0 1 1 1 2 1 3 1 4 1 \ +-3 0.5 -1 1 -2 0.5 0 1 -3 0.5 1 1 \ +-2 1.5 -1 1 -1 1.5 0 1 -2 1.5 1 1 \ +-3 2.5 -1 1 -2 2.5 0 1 -3 2.5 1 1 + +torus tor 3 1 + +circle c1 0 0 0 4 +trim c1 c1 -3.5 1 +extsurf ext c1 0 0 1 + +circle c2 0 0 0 0 -1 0 1 0 0 3 +trim c2 c2 -pi/2 pi/2 +revsurf rev c2 0 0 0 0 0 1 + +# intersect all surfaces +set surfaces [list bz bs tor ext rev] +foreach s $surfaces { + set num [llength [intersect result $c $s 1e-7]]; + if {$num == 0} { + puts "Faulty ${BugNumber}: no intersection point is got" + } else { + puts "OK ${BugNumber}"; + } +} \ No newline at end of file From 91428b468b6d313e805bddc88956499e26f80a5c Mon Sep 17 00:00:00 2001 From: kgv Date: Sat, 14 Aug 2021 18:00:19 +0300 Subject: [PATCH 015/639] 0032536: Configuration - extend adm/scripts with USE_DRACO option --- adm/scripts/android_build.bat | 9 +++++++++ adm/scripts/android_custom.bat.template | 4 +++- adm/scripts/cmake_custom.bat.template | 1 + adm/scripts/cmake_custom.sh.template | 1 + adm/scripts/cmake_gen.bat | 2 ++ adm/scripts/cmake_gen.sh | 2 ++ adm/scripts/ios_build.sh | 10 +++++++++- adm/scripts/ios_custom.sh.template | 2 ++ adm/scripts/macos_build.sh | 6 ++++++ adm/scripts/macos_custom.sh.template | 2 ++ adm/scripts/mingw_build.bat | 9 ++++++++- adm/scripts/mingw_custom.bat.template | 2 ++ adm/scripts/wasm_build.bat | 17 +++++++++++++---- adm/scripts/wasm_custom.bat.template | 4 +++- src/DRAWEXE/EXTERNLIB_STATIC | 1 + src/RWGltf/RWGltf_TriangulationReader.cxx | 2 ++ 16 files changed, 66 insertions(+), 8 deletions(-) diff --git a/adm/scripts/android_build.bat b/adm/scripts/android_build.bat index e5eda22268..65466d437e 100644 --- a/adm/scripts/android_build.bat +++ b/adm/scripts/android_build.bat @@ -13,6 +13,7 @@ rem Paths to 3rd-party tools and libraries set "anNdkPath=" set "aFreeType=" set "aRapidJson=" +set "aDraco=" rem Build stages to perform set "toCMake=1" @@ -34,7 +35,9 @@ set "BUILD_ApplicationFramework=ON" set "BUILD_DataExchange=ON" rem Optional 3rd-party libraries to enable +set "USE_FREETYPE=ON" set "USE_RAPIDJSON=OFF" +set "USE_DRACO=OFF" rem Archive tool set "THE_7Z_PARAMS=-t7z -m0=lzma -mx=9 -mfb=64 -md=32m -ms=on" @@ -162,6 +165,7 @@ if ["%toCMake%"] == ["1"] ( -D BUILD_MODULE_DataExchange:BOOL="%BUILD_DataExchange%" ^ -D BUILD_MODULE_Draw:BOOL="OFF" ^ -D BUILD_DOC_Overview:BOOL="OFF" ^ + -D USE_FREETYPE:BOOL="%USE_FREETYPE%" ^ -D 3RDPARTY_FREETYPE_DIR:PATH="%aFreeType%" ^ -D 3RDPARTY_FREETYPE_INCLUDE_DIR_freetype2:FILEPATH="%aFreeType%/include" ^ -D 3RDPARTY_FREETYPE_INCLUDE_DIR_ft2build:FILEPATH="%aFreeType%/include" ^ @@ -170,6 +174,11 @@ if ["%toCMake%"] == ["1"] ( -D USE_RAPIDJSON:BOOL="%USE_RAPIDJSON%" ^ -D 3RDPARTY_RAPIDJSON_DIR:PATH="%aRapidJson%" ^ -D 3RDPARTY_RAPIDJSON_INCLUDE_DIR:PATH="%aRapidJson%/include" ^ + -D USE_DRACO:BOOL="%USE_DRACO%" ^ + -D 3RDPARTY_DRACO_DIR:PATH="%aDraco%" ^ + -D 3RDPARTY_DRACO_INCLUDE_DIR:FILEPATH="%aDraco%/include" ^ + -D 3RDPARTY_DRACO_LIBRARY_DIR:PATH="%aDraco%/libs/%anAbi%" ^ + -D 3RDPARTY_DRACO_LIBRARY:FILEPATH="%aDraco%/libs/%anAbi%/libfreetype.so" ^ "%aCasSrc%" if errorlevel 1 ( diff --git a/adm/scripts/android_custom.bat.template b/adm/scripts/android_custom.bat.template index 87fb401ca9..45881c6d40 100644 --- a/adm/scripts/android_custom.bat.template +++ b/adm/scripts/android_custom.bat.template @@ -6,6 +6,7 @@ rem set "PATH=c:\CMake\bin;%PATH%" rem set "anNdkPath=c:/android-ndk-r12" rem set "aFreeType=c:/freetype-2.7.1-android" rem set "aRapidJson=c:/rapidjson-1.1.0" +rem set "aDraco=c:/draco-1.4.1-android" rem Uncomment to customize building steps rem set "aBuildRoot=%~dp0..\..\work" @@ -28,4 +29,5 @@ rem set "BUILD_ApplicationFramework=ON" rem set "BUILD_DataExchange=ON" rem Optional 3rd-party libraries to enable -rem set USE_RAPIDJSON=ON +rem set "USE_RAPIDJSON=ON" +rem set "USE_DRACO=ON" diff --git a/adm/scripts/cmake_custom.bat.template b/adm/scripts/cmake_custom.bat.template index 38bf6e044f..51813eaa09 100644 --- a/adm/scripts/cmake_custom.bat.template +++ b/adm/scripts/cmake_custom.bat.template @@ -42,5 +42,6 @@ rem set USE_FFMPEG=OFF rem set USE_FREEIMAGE=OFF rem set USE_GLES2=OFF rem set USE_RAPIDJSON=OFF +rem set USE_DRACO=OFF rem set USE_TBB=OFF rem set USE_VTK=OFF diff --git a/adm/scripts/cmake_custom.sh.template b/adm/scripts/cmake_custom.sh.template index e7a37f19dc..6ed63c7f13 100644 --- a/adm/scripts/cmake_custom.sh.template +++ b/adm/scripts/cmake_custom.sh.template @@ -35,6 +35,7 @@ FREETYPE_DIR="$OCCT3RDPARTY/freetype-2.7.1" #USE_FREEIMAGE=OFF #USE_GLES2=OFF #USE_RAPIDJSON=OFF +#USE_DRACO=OFF #USE_TBB=OFF #USE_VTK=OFF diff --git a/adm/scripts/cmake_gen.bat b/adm/scripts/cmake_gen.bat index 428107902b..38c6918305 100644 --- a/adm/scripts/cmake_gen.bat +++ b/adm/scripts/cmake_gen.bat @@ -37,6 +37,7 @@ set USE_FFMPEG=OFF set USE_FREEIMAGE=OFF set USE_GLES2=OFF set USE_RAPIDJSON=OFF +set USE_DRACO=OFF set USE_TBB=OFF set USE_VTK=OFF @@ -76,6 +77,7 @@ cmake -G "%arch_compile%" ^ -D USE_FREEIMAGE:BOOL=%USE_FREEIMAGE% ^ -D USE_GLES2:BOOL=%USE_GLES2% ^ -D USE_RAPIDJSON:BOOL=%USE_RAPIDJSON% ^ + -D USE_DRACO:BOOL=%USE_DRACO% ^ -D USE_TBB:BOOL=%USE_TBB% ^ -D USE_VTK:BOOL=%USE_VTK% ^ "%SrcRoot%" diff --git a/adm/scripts/cmake_gen.sh b/adm/scripts/cmake_gen.sh index 4150f21ab0..9c088715d2 100755 --- a/adm/scripts/cmake_gen.sh +++ b/adm/scripts/cmake_gen.sh @@ -40,6 +40,7 @@ USE_FFMPEG=OFF USE_FREEIMAGE=OFF USE_GLES2=OFF USE_RAPIDJSON=OFF +USE_DRACO=OFF USE_TBB=OFF USE_VTK=OFF AUX_ARGS= @@ -79,6 +80,7 @@ cmake -G "Unix Makefiles" \ -D USE_FREEIMAGE:BOOL=$USE_FREEIMAGE \ -D USE_GLES2:BOOL=$USE_GLES2 \ -D USE_RAPIDJSON:BOOL=$USE_RAPIDJSON \ + -D USE_DRACO:BOOL=$USE_DRACO \ -D USE_TBB:BOOL=$USE_TBB \ -D USE_VTK:BOOL=$USE_VTK \ $AUX_ARGS "$SrcRoot" diff --git a/adm/scripts/ios_build.sh b/adm/scripts/ios_build.sh index 7de7c13d79..959e6d7b49 100755 --- a/adm/scripts/ios_build.sh +++ b/adm/scripts/ios_build.sh @@ -17,6 +17,7 @@ export aBuildRoot=work export aFreeType= export aFreeImage= export aRapidJson= +export aDraco= # build stages to perform export toSimulator=0 @@ -34,8 +35,10 @@ export BUILD_Visualization=ON export BUILD_ApplicationFramework=ON export BUILD_DataExchange=ON +export USE_FREETYPE=ON export USE_FREEIMAGE=OFF export USE_RAPIDJSON=OFF +export USE_DRACO=OFF export IPHONEOS_DEPLOYMENT_TARGET=8.0 export anAbi=arm64 @@ -117,13 +120,18 @@ if [[ $toCMake == 1 ]]; then -D INSTALL_DIR_LIB:STRING="lib" \ -D INSTALL_DIR_RESOURCE:STRING="src" \ -D INSTALL_NAME_DIR:STRING="@executable_path/../Frameworks" \ + -D USE_FREETYPE:BOOL="$USE_FREETYPE" \ -D 3RDPARTY_FREETYPE_DIR:PATH="$aFreeType" \ -D 3RDPARTY_FREETYPE_INCLUDE_DIR_freetype2:FILEPATH="$aFreeType/include" \ -D 3RDPARTY_FREETYPE_INCLUDE_DIR_ft2build:FILEPATH="$aFreeType/include" \ -D 3RDPARTY_FREETYPE_LIBRARY_DIR:PATH="$aFreeType/lib" \ - -D USE_RAPIDJSON:BOOL="ON" \ + -D USE_RAPIDJSON:BOOL="$USE_RAPIDJSON" \ -D 3RDPARTY_RAPIDJSON_DIR:PATH="$aRapidJson" \ -D 3RDPARTY_RAPIDJSON_INCLUDE_DIR:PATH="$aRapidJson/include" \ + -D USE_DRACO:BOOL="$USE_DRACO" \ + -D 3RDPARTY_DRACO_DIR:PATH="$aDraco" \ + -D 3RDPARTY_DRACO_INCLUDE_DIR:FILEPATH="$aDraco/include" \ + -D 3RDPARTY_DRACO_LIBRARY_DIR:PATH="$aDraco/lib" \ -D USE_FREEIMAGE:BOOL="$USE_FREEIMAGE" \ -D 3RDPARTY_FREEIMAGE_DIR:PATH="$aFreeImage" \ -D 3RDPARTY_FREEIMAGE_INCLUDE_DIR:FILEPATH="$aFreeImage/include" \ diff --git a/adm/scripts/ios_custom.sh.template b/adm/scripts/ios_custom.sh.template index f5f93b9a41..52f15eb8b0 100644 --- a/adm/scripts/ios_custom.sh.template +++ b/adm/scripts/ios_custom.sh.template @@ -3,6 +3,7 @@ export PATH=/Applications/CMake.app/Contents/bin:$PATH export aFreeType="$aSrcRoot/../3rdparty/freetype-2.10.4-ios" export aFreeImage="$aSrcRoot/../3rdparty/freeimage-3.18-ios" export aRapidJson="$aSrcRoot/../3rdparty/rapidjson-1.1.0" +export aDraco="$aSrcRoot/../3rdparty/draco-1.4.1-ios" # Uncomment to customize building steps #export toSimulator=0 @@ -21,6 +22,7 @@ export aRapidJson="$aSrcRoot/../3rdparty/rapidjson-1.1.0" #export BUILD_DataExchange=ON #export USE_RAPIDJSON=ON +#export USE_DRACO=ON #export USE_FREEIMAGE=ON #export IPHONEOS_DEPLOYMENT_TARGET=8.0 diff --git a/adm/scripts/macos_build.sh b/adm/scripts/macos_build.sh index 57b7b3a7ef..e5fbe96c7f 100755 --- a/adm/scripts/macos_build.sh +++ b/adm/scripts/macos_build.sh @@ -17,6 +17,7 @@ export aBuildRoot=work export aFreeType= export aFreeImage= export aRapidJson= +export aDraco= # build stages to perform export toCMake=1 @@ -35,6 +36,7 @@ export BUILD_Draw=ON export USE_FREEIMAGE=ON export USE_RAPIDJSON=OFF +export USE_DRACO=OFF export MACOSX_DEPLOYMENT_TARGET=10.10 #export anAbi=arm64 @@ -106,6 +108,10 @@ if [[ $toCMake == 1 ]]; then -D USE_RAPIDJSON:BOOL="$USE_RAPIDJSON" \ -D 3RDPARTY_RAPIDJSON_DIR:PATH="$aRapidJson" \ -D 3RDPARTY_RAPIDJSON_INCLUDE_DIR:PATH="$aRapidJson/include" \ + -D USE_DRACO:BOOL="$USE_DRACO" \ + -D 3RDPARTY_DRACO_DIR:PATH="$aDraco" \ + -D 3RDPARTY_DRACO_INCLUDE_DIR:FILEPATH="$aDraco/include" \ + -D 3RDPARTY_DRACO_LIBRARY_DIR:PATH="$aDraco/lib" \ -D USE_FREEIMAGE:BOOL="$USE_FREEIMAGE" \ -D 3RDPARTY_FREEIMAGE_DIR:PATH="$aFreeImage" \ -D 3RDPARTY_FREEIMAGE_INCLUDE_DIR:FILEPATH="$aFreeImage/include" \ diff --git a/adm/scripts/macos_custom.sh.template b/adm/scripts/macos_custom.sh.template index 54bc482925..c56a72fa06 100644 --- a/adm/scripts/macos_custom.sh.template +++ b/adm/scripts/macos_custom.sh.template @@ -3,6 +3,7 @@ export PATH=/Applications/CMake.app/Contents/bin:$PATH export aFreeType="$aSrcRoot/../3rdparty/freetype-2.10.4-macos" export aFreeImage="$aSrcRoot/../3rdparty/freeimage-3.18-macos" export aRapidJson="$aSrcRoot/../3rdparty/rapidjson-1.1.0" +export aDraco="$aSrcRoot/../3rdparty/draco-1.4.1-macos" # Uncomment to customize building steps #export aBuildRoot=work @@ -20,6 +21,7 @@ export aRapidJson="$aSrcRoot/../3rdparty/rapidjson-1.1.0" #export BUILD_Draw=ON #export USE_RAPIDJSON=ON +#export USE_DRACO=ON #export USE_FREEIMAGE=ON #export MACOSX_DEPLOYMENT_TARGET=10.10 diff --git a/adm/scripts/mingw_build.bat b/adm/scripts/mingw_build.bat index 69a289285c..d66d339e5e 100644 --- a/adm/scripts/mingw_build.bat +++ b/adm/scripts/mingw_build.bat @@ -14,6 +14,7 @@ set "aMingwVars=" set "aFreeType=" set "aFreeImage=" set "aRapidJson=" +set "aDraco=" set "aTclTk=" rem Build stages to perform @@ -34,7 +35,9 @@ set "BUILD_DataExchange=ON" set "BUILD_Draw=ON" rem Optional 3rd-party libraries to enable +set "USE_FREETYPE=ON" set "USE_RAPIDJSON=OFF" +set "USE_DRACO=OFF" set "USE_FREEIMAGE=ON" rem Archive tool @@ -162,7 +165,7 @@ if ["%toCMake%"] == ["1"] ( -D 3RDPARTY_TK_LIBRARY_DIR:PATH="%aTclTk%/lib" ^ -D 3RDPARTY_TK_DLL_DIR:PATH="%aTclTk%/bin" ^ -D USE_D3D:BOOL="ON" ^ - -D USE_FREETYPE:BOOL="ON" ^ + -D USE_FREETYPE:BOOL="%USE_FREETYPE%" ^ -D 3RDPARTY_FREETYPE_DIR:PATH="%aFreeType%" ^ -D 3RDPARTY_FREETYPE_INCLUDE_DIR_freetype2:FILEPATH="%aFreeType%/include" ^ -D 3RDPARTY_FREETYPE_INCLUDE_DIR_ft2build:FILEPATH="%aFreeType%/include" ^ @@ -174,6 +177,10 @@ if ["%toCMake%"] == ["1"] ( -D USE_RAPIDJSON:BOOL="%USE_RAPIDJSON%" ^ -D 3RDPARTY_RAPIDJSON_DIR:PATH="%aRapidJson%" ^ -D 3RDPARTY_RAPIDJSON_INCLUDE_DIR:PATH="%aRapidJson%/include" ^ + -D USE_DRACO:BOOL="%USE_DRACO%" ^ + -D 3RDPARTY_DRACO_DIR:PATH="%aDraco%" ^ + -D 3RDPARTY_DRACO_INCLUDE_DIR:FILEPATH="%aDraco%/include" ^ + -D 3RDPARTY_DRACO_LIBRARY_DIR:PATH="%aDraco%/lib" ^ "%aCasSrc%" if errorlevel 1 ( diff --git a/adm/scripts/mingw_custom.bat.template b/adm/scripts/mingw_custom.bat.template index 8870a53ec9..0a7f6c6750 100644 --- a/adm/scripts/mingw_custom.bat.template +++ b/adm/scripts/mingw_custom.bat.template @@ -4,6 +4,7 @@ set "aFreeType=%aCasSrc%/../3rdparty/freetype-2.6.3-mingw-64" set "aTclTk=%aCasSrc%/../3rdparty/tcltk-8.6.4-mingw-64" set "aFreeImage=%aCasSrc%/../3rdparty/freeimage-3.17-0-mingw-64" set "aRapidJson=%aCasSrc%/../3rdparty/rapidjson-1.1.0" +set "aDraco=%aCasSrc%/../3rdparty/draco-1.4-1-mingw-64" set "aMingwVars=c:\mingw-8.3.0-msys2\mingwvars.bat" @@ -24,4 +25,5 @@ rem set "BUILD_DataExchange=ON" rem set "BUILD_Draw=ON" rem set "USE_RAPIDJSON=ON" +rem set "USE_DRACO=ON" rem set "USE_FREEIMAGE=ON" diff --git a/adm/scripts/wasm_build.bat b/adm/scripts/wasm_build.bat index 4e892b5305..ba664da14f 100644 --- a/adm/scripts/wasm_build.bat +++ b/adm/scripts/wasm_build.bat @@ -13,6 +13,7 @@ rem Paths to 3rd-party tools and libraries set "aCmakeBin=" set "aFreeType=" set "aRapidJson=" +set "aDraco=" set "aTcl=" rem Build stages to perform @@ -34,7 +35,9 @@ set "BUILD_DataExchange=ON" set "BUILD_Draw=OFF" rem Optional 3rd-party libraries to enable +set "USE_FREETYPE=ON" set "USE_RAPIDJSON=OFF" +set "USE_DRACO=OFF" rem Archive tool set "THE_7Z_PARAMS=-t7z -m0=lzma -mx=9 -mfb=64 -md=32m -ms=on" @@ -159,9 +162,6 @@ if ["%toCMake%"] == ["1"] ( -D INSTALL_DIR:PATH="%aDestDir%" ^ -D INSTALL_DIR_INCLUDE:STRING="inc" ^ -D INSTALL_DIR_RESOURCE:STRING="src" ^ - -D 3RDPARTY_FREETYPE_DIR:PATH="%aFreeType%" ^ - -D 3RDPARTY_FREETYPE_INCLUDE_DIR_freetype2:FILEPATH="%aFreeType%/include" ^ - -D 3RDPARTY_FREETYPE_INCLUDE_DIR_ft2build:FILEPATH="%aFreeType%/include" ^ -D BUILD_MODULE_FoundationClasses:BOOL="ON" ^ -D BUILD_MODULE_ModelingData:BOOL="%BUILD_ModelingData%" ^ -D BUILD_MODULE_ModelingAlgorithms:BOOL="%BUILD_ModelingAlgorithms%" ^ @@ -170,14 +170,23 @@ if ["%toCMake%"] == ["1"] ( -D BUILD_MODULE_DataExchange:BOOL="%BUILD_DataExchange%" ^ -D BUILD_MODULE_Draw:BOOL="%BUILD_Draw%" ^ -D BUILD_DOC_Overview:BOOL="OFF" ^ + -D USE_FREETYPE:BOOL="%USE_FREETYPE%" ^ + -D 3RDPARTY_FREETYPE_DIR:PATH="%aFreeType%" ^ + -D 3RDPARTY_FREETYPE_INCLUDE_DIR_freetype2:FILEPATH="%aFreeType%/include" ^ + -D 3RDPARTY_FREETYPE_INCLUDE_DIR_ft2build:FILEPATH="%aFreeType%/include" ^ -D USE_RAPIDJSON:BOOL="%USE_RAPIDJSON%" ^ -D 3RDPARTY_RAPIDJSON_DIR:PATH="%aRapidJson%" ^ -D 3RDPARTY_RAPIDJSON_INCLUDE_DIR:PATH="%aRapidJson%/include" ^ + -D USE_DRACO:BOOL="%USE_DRACO%" ^ + -D 3RDPARTY_DRACO_DIR:PATH="%aDraco%" ^ + -D 3RDPARTY_DRACO_INCLUDE_DIR:FILEPATH="%aDraco%/include" ^ + -D 3RDPARTY_DRACO_LIBRARY_DIR:PATH="%aDraco%/lib" ^ + -D 3RDPARTY_DRACO_LIBRARY:FILEPATH="%aDraco%/lib/libdraco.a" ^ + -D USE_TK:BOOL="OFF" ^ -D 3RDPARTY_TCL_DIR:PATH="%aTcl%" ^ -D 3RDPARTY_TCL_INCLUDE_DIR:PATH="%aTcl%/include" ^ -D 3RDPARTY_TCL_LIBRARY_DIR:PATH="%aTcl%/lib" ^ -D 3RDPARTY_TCL_LIBRARY:FILEPATH="%aTcl%/lib/libtcl.a" ^ - -D USE_TK:BOOL="OFF" ^ "%aCasSrc%" if errorlevel 1 ( diff --git a/adm/scripts/wasm_custom.bat.template b/adm/scripts/wasm_custom.bat.template index 1b07aa7144..caeaf09938 100644 --- a/adm/scripts/wasm_custom.bat.template +++ b/adm/scripts/wasm_custom.bat.template @@ -1,7 +1,8 @@ rem Environment configuration template for wasm_build.bat (to be renamed as wasm_custom.bat) set "EMSDK_ROOT=%aCasSrc%\..\emsdk" -set "aFreeType=%aCasSrc%\..\3rdparty\freetype-2.7.1-wasm" +set "aFreeType=%aCasSrc%\..\3rdparty\freetype-2.7.1-wasm32" rem set "aRapidJson=%aCasSrc%\..\3rdparty\rapidjson-1.1.0" +rem set "aDraco=%aCasSrc%\..\3rdparty\draco-1.4.1-wasm32" rem set "aCmakeBin=%ProgramW6432%\CMake\bin" rem Uncomment to customize building steps @@ -24,3 +25,4 @@ rem set "BUILD_ApplicationFramework=ON" rem set "BUILD_DataExchange=ON" rem set "USE_RAPIDJSON=OFF" +rem set "USE_DRACO=ON" diff --git a/src/DRAWEXE/EXTERNLIB_STATIC b/src/DRAWEXE/EXTERNLIB_STATIC index 59b8d83f41..f99e4d4449 100644 --- a/src/DRAWEXE/EXTERNLIB_STATIC +++ b/src/DRAWEXE/EXTERNLIB_STATIC @@ -60,6 +60,7 @@ CSF_OpenGlesLibs CSF_FFmpeg CSF_FreeImagePlus CSF_FREETYPE +CSF_Draco CSF_user32 CSF_advapi32 CSF_XwLibs diff --git a/src/RWGltf/RWGltf_TriangulationReader.cxx b/src/RWGltf/RWGltf_TriangulationReader.cxx index d4dff574bc..7d57656680 100644 --- a/src/RWGltf/RWGltf_TriangulationReader.cxx +++ b/src/RWGltf/RWGltf_TriangulationReader.cxx @@ -22,7 +22,9 @@ #include #ifdef HAVE_DRACO + #include #include + #include #endif namespace From 9592ae247b4473b3084f9e3386a971028a6c0940 Mon Sep 17 00:00:00 2001 From: ifv Date: Mon, 5 Apr 2021 11:15:45 +0300 Subject: [PATCH 016/639] 0027457: Modeling - Raise exception if scaled transformation is used for shape location Implementation of raising exception while using scale and mirror transformation in shape location TopLoc/TopLoc_Location.hxx TopoDS/TopoDS_Shape.hxx Implementation of new tools for removing forbidden locations from shapes: BRepTools/BRepTools_PurgeLocations.cxx BRepTools/BRepTools_PurgeLocations.hxx BRepTools/BRepTools.cxx BRepTools/BRepTools.hxx Draw commands for transforming shapes are corrected, new draw commands: purgeloc, checkloc added BRepTest/BRepTest_BasicCommands.cxx Fixing unstable test bug xde bug24759 StepToGeom/StepToGeom.cxx All other C++ commits are modification of algorithms used mainly in import/export operations in order to allows these operations if shape locations contains scale and mirror transformations. New test for command purgeloc added tests/bugs/moddata_3/bug27457 tests/bugs/moddata_3/bug27457_1 tests/bugs/moddata_3/bug27457_2 Some test corrected according to modifications. --- src/BRep/BRep_Tool.cxx | 4 +- .../BRepBuilderAPI_Transform.cxx | 5 +- src/BRepLib/BRepLib.cxx | 6 + src/BRepTest/BRepTest_BasicCommands.cxx | 118 +++++++++- src/BRepTools/BRepTools.cxx | 33 +++ src/BRepTools/BRepTools.hxx | 12 +- src/BRepTools/BRepTools_Modifier.cxx | 8 +- src/BRepTools/BRepTools_PurgeLocations.cxx | 220 ++++++++++++++++++ src/BRepTools/BRepTools_PurgeLocations.hxx | 62 +++++ src/BRepTools/BRepTools_ReShape.cxx | 8 +- src/BRepTools/FILES | 2 + src/BinTools/BinTools_ShapeReader.cxx | 4 +- src/BinTools/BinTools_ShapeSet.cxx | 2 +- src/IGESCAFControl/IGESCAFControl_Writer.cxx | 2 +- src/IGESToBRep/IGESToBRep_CurveAndSurface.cxx | 2 +- src/IGESToBRep/IGESToBRep_TopoSurface.cxx | 18 +- src/RWGltf/RWGltf_GltfJsonParser.cxx | 4 +- src/RWMesh/RWMesh_CafReader.cxx | 2 +- src/ShapeCustom/ShapeCustom.cxx | 2 +- src/ShapeFix/ShapeFix_Shape.cxx | 4 +- src/ShapeProcess/ShapeProcess_OperLibrary.cxx | 2 +- .../ShapeProcess_ShapeContext.cxx | 6 +- src/StepToGeom/StepToGeom.cxx | 7 +- src/TopExp/TopExp.cxx | 13 +- src/TopExp/TopExp.hxx | 16 +- src/TopLoc/TopLoc_Location.hxx | 6 +- src/TopTools/TopTools_ShapeSet.cxx | 2 +- src/TopoDS/TopoDS_Builder.cxx | 4 +- src/TopoDS/TopoDS_Iterator.cxx | 4 +- src/TopoDS/TopoDS_Shape.hxx | 36 ++- src/VrmlData/VrmlData_Group.cxx | 2 +- src/XCAFDoc/XCAFDoc_ShapeTool.cxx | 12 +- src/XCAFPrs/XCAFPrs.cxx | 4 +- tests/bugs/modalg_6/bug28394_2 | 2 +- tests/bugs/moddata_3/bug27457 | 33 +++ tests/bugs/moddata_3/bug27457_1 | 32 +++ tests/bugs/moddata_3/bug27457_2 | 32 +++ tests/v3d/bugs/bug22240 | 2 +- tests/v3d/bugs/bug30630_1 | 4 +- tests/v3d/bugs/bug30630_2 | 2 +- tests/v3d/bugs/bug30630_3 | 4 +- 41 files changed, 661 insertions(+), 82 deletions(-) create mode 100644 src/BRepTools/BRepTools_PurgeLocations.cxx create mode 100644 src/BRepTools/BRepTools_PurgeLocations.hxx create mode 100644 tests/bugs/moddata_3/bug27457 create mode 100644 tests/bugs/moddata_3/bug27457_1 create mode 100644 tests/bugs/moddata_3/bug27457_2 diff --git a/src/BRep/BRep_Tool.cxx b/src/BRep/BRep_Tool.cxx index 7e2f0f4208..5d308fc2e9 100644 --- a/src/BRep/BRep_Tool.cxx +++ b/src/BRep/BRep_Tool.cxx @@ -992,8 +992,8 @@ void BRep_Tool::UVPoints(const TopoDS_Edge& E, TopExp::Vertices(E,Vf,Vl); TopLoc_Location Linverted = L.Inverted(); - Vf.Move(Linverted); - Vl.Move(Linverted); + Vf.Move(Linverted, Standard_False); + Vl.Move(Linverted, Standard_False); Standard_Real u,v; gp_Pln pln = GP->Pln(); diff --git a/src/BRepBuilderAPI/BRepBuilderAPI_Transform.cxx b/src/BRepBuilderAPI/BRepBuilderAPI_Transform.cxx index 8c722fe550..8052e97e27 100644 --- a/src/BRepBuilderAPI/BRepBuilderAPI_Transform.cxx +++ b/src/BRepBuilderAPI/BRepBuilderAPI_Transform.cxx @@ -57,10 +57,7 @@ BRepBuilderAPI_Transform::BRepBuilderAPI_Transform (const TopoDS_Shape& S, void BRepBuilderAPI_Transform::Perform(const TopoDS_Shape& S, const Standard_Boolean Copy) { -// myUseModif = Copy || myTrsf.IsNegative(); bug gp_Trsf. - myUseModif = Copy || - myTrsf.ScaleFactor()*myTrsf.HVectorialPart().Determinant() < 0. || - Abs(Abs(myTrsf.ScaleFactor()) - 1) > gp::Resolution(); + myUseModif = Copy || myTrsf.IsNegative() || (Abs(Abs(myTrsf.ScaleFactor()) - 1.) > TopLoc_Location::ScalePrec()); if (myUseModif) { Handle(BRepTools_TrsfModification) theModif = Handle(BRepTools_TrsfModification)::DownCast(myModification); diff --git a/src/BRepLib/BRepLib.cxx b/src/BRepLib/BRepLib.cxx index 9079366ffc..18733f8563 100644 --- a/src/BRepLib/BRepLib.cxx +++ b/src/BRepLib/BRepLib.cxx @@ -1991,6 +1991,12 @@ class SurfaceProperties theCurvature1 = -theCurvature1; theCurvature2 = -theCurvature2; } + if (mySurfaceTrsf.IsNegative()) + { + theCurvature1 = -theCurvature1; + theCurvature2 = -theCurvature2; + } + thePrincipalDir1.Transform(mySurfaceTrsf); thePrincipalDir2.Transform(mySurfaceTrsf); } diff --git a/src/BRepTest/BRepTest_BasicCommands.cxx b/src/BRepTest/BRepTest_BasicCommands.cxx index 0658307d05..aecc356a0c 100644 --- a/src/BRepTest/BRepTest_BasicCommands.cxx +++ b/src/BRepTest/BRepTest_BasicCommands.cxx @@ -56,7 +56,8 @@ #include #include #include - +#include +#include #include #include @@ -116,7 +117,7 @@ static Standard_Integer addpcurve(Draw_Interpretor& , Standard_Integer n, const // transform //======================================================================= -static Standard_Integer transform(Draw_Interpretor& ,Standard_Integer n,const char** a) +static Standard_Integer transform(Draw_Interpretor&,Standard_Integer n,const char** a) { if (n <= 1) return 1; @@ -125,6 +126,7 @@ static Standard_Integer transform(Draw_Interpretor& ,Standard_Integer n,const ch const char* aName = a[0]; Standard_Boolean isBasic = Standard_False; + Standard_Boolean isForced = Standard_False; Standard_Boolean isCopy = Standard_False; // Check "copy" flag. @@ -137,6 +139,8 @@ static Standard_Integer transform(Draw_Interpretor& ,Standard_Integer n,const ch } else { isBasic = (aName[0] == 'b'); + isForced = (aName[0] == 'f'); + aName++; if (!strcmp(aName,"move")) { @@ -145,6 +149,7 @@ static Standard_Integer transform(Draw_Interpretor& ,Standard_Integer n,const ch if (SL.IsNull()) return 0; T = SL.Location().Transformation(); last = n-1; + isBasic = Standard_True; } else if (!strcmp(aName,"translate")) { if (n < 5) return 1; @@ -162,6 +167,7 @@ static Standard_Integer transform(Draw_Interpretor& ,Standard_Integer n,const ch if (n < 8) return 1; T.SetMirror(gp_Ax2(gp_Pnt(Draw::Atof(a[n-6]),Draw::Atof(a[n-5]),Draw::Atof(a[n-4])), gp_Vec(Draw::Atof(a[n-3]),Draw::Atof(a[n-2]),Draw::Atof(a[n-1])))); + last = n-6; } else if (!strcmp(aName,"scale")) { @@ -171,7 +177,12 @@ static Standard_Integer transform(Draw_Interpretor& ,Standard_Integer n,const ch } } - if (T.Form() == gp_Identity || isBasic) { + if (T.Form() == gp_Identity || isBasic || isForced) { + Standard_Boolean isExeption = Standard_True; + if (isForced) + { + isExeption = Standard_False; + } TopLoc_Location L(T); for (Standard_Integer i = 1; i < last; i++) { TopoDS_Shape S = DBRep::Get(a[i]); @@ -181,7 +192,25 @@ static Standard_Integer transform(Draw_Interpretor& ,Standard_Integer n,const ch return 1; } else - DBRep::Set(a[i],S.Located(L)); + { + try + { + if (!strcmp(aName, "move") || !strcmp(aName, "reset")) + { + DBRep::Set(a[i], S.Located(L, isExeption)); + } + else + { + DBRep::Set(a[i], S.Moved(L, isExeption)); + } + } + catch (const Standard_DomainError&) + { + TCollection_AsciiString aScale(T.ScaleFactor()); + Message::SendWarning() << "Operation is not done: " << aName << " is not a valid transformation - scale = " << aScale; + return 0; + } + } } } else { @@ -1385,6 +1414,63 @@ static Standard_Integer issubshape(Draw_Interpretor& di, // return 0; } +//======================================================================= +//function : purgeloc +//purpose : +//======================================================================= +static Standard_Integer purgeloc(Draw_Interpretor& di, Standard_Integer /*n*/, const char** a) +{ + + TopoDS_Shape aShapeBase = DBRep::Get(a[2]); + if (aShapeBase.IsNull()) return 1; + + + BRepTools_PurgeLocations aRemLoc; + Standard_Boolean isDone = aRemLoc.Perform(aShapeBase); + TopoDS_Shape Result = aRemLoc.GetResult(); + + DBRep::Set(a[1], Result); + if (isDone) + { + di << "All problematic locations are purged \n"; + } + else + { + di << "Not all problematic locations are purged \n"; + } + return 0; +} +//======================================================================= +//function : checkloc +//purpose : +//======================================================================= + +static Standard_Integer checkloc(Draw_Interpretor& di, Standard_Integer /*n*/, const char** a) +{ + + TopoDS_Shape aShapeBase = DBRep::Get(a[1]); + if (aShapeBase.IsNull()) return 1; + + TopTools_ListOfShape aLS; + BRepTools::CheckLocations(aShapeBase, aLS); + if (aLS.IsEmpty()) + { + di << "There are no problematic shapes" << "\n"; + return 0; + } + TopTools_ListIteratorOfListOfShape anIt(aLS); + Standard_Integer i; + for (i = 1; anIt.More(); anIt.Next(), ++i) + { + TCollection_AsciiString aName(a[1]); + aName += "_"; + aName.AssignCat(i); + DBRep::Set(aName.ToCString(), anIt.Value()); + di << aName << " "; + } + di << "\n"; + return 0; +} void BRepTest::BasicCommands(Draw_Interpretor& theCommands) { @@ -1441,6 +1527,11 @@ void BRepTest::BasicCommands(Draw_Interpretor& theCommands) __FILE__, transform,g); + theCommands.Add("fmove", + "fmove name1 name2 ... name, set location from name", + __FILE__, + transform, g); + theCommands.Add("btranslate", "btranslate name1 name2 ... dx dy dz", __FILE__, @@ -1456,11 +1547,21 @@ void BRepTest::BasicCommands(Draw_Interpretor& theCommands) __FILE__, transform,g); + theCommands.Add("fmirror", + "fmirror name x y z dx dy dz", + __FILE__, + transform, g); + theCommands.Add("bscale", "bscale name x y z scale", __FILE__, transform,g); + theCommands.Add("fscale", + "fscale name x y z scale", + __FILE__, + transform, g); + theCommands.Add("precision", "precision [preci]", __FILE__, @@ -1593,4 +1694,13 @@ void BRepTest::BasicCommands(Draw_Interpretor& theCommands) "\t\tCheck if the shape is sub-shape of other shape and get its index in the shape.", __FILE__, issubshape, g); + theCommands.Add("purgeloc", + "purgeloc res shape ", + __FILE__, + purgeloc, g); + + theCommands.Add("checkloc", + "checkloc shape ", + __FILE__, + checkloc, g); } diff --git a/src/BRepTools/BRepTools.cxx b/src/BRepTools/BRepTools.cxx index 8f0c3b3094..99b3828d6f 100644 --- a/src/BRepTools/BRepTools.cxx +++ b/src/BRepTools/BRepTools.cxx @@ -65,6 +65,9 @@ #include #include #include +#include +#include +#include //======================================================================= @@ -1518,3 +1521,33 @@ void BRepTools::RemoveInternals (TopoDS_Shape& theS, removeInternals (theS, pMKeep); } + +//======================================================================= +//function : CheckLocations +//purpose : +//======================================================================= + +void BRepTools::CheckLocations(const TopoDS_Shape& theS, + TopTools_ListOfShape& theProblemShapes) +{ + if (theS.IsNull()) return; + + TopTools_IndexedMapOfShape aMapS; + TopExp::MapShapes(theS, aMapS, Standard_False, Standard_False); + + Standard_Integer i; + for (i = 1; i <= aMapS.Extent(); ++i) + { + const TopoDS_Shape& anS = aMapS(i); + const TopLoc_Location& aLoc = anS.Location(); + const gp_Trsf& aTrsf = aLoc.Transformation(); + Standard_Boolean isBadTrsf = aTrsf.IsNegative() || + (Abs(Abs(aTrsf.ScaleFactor()) - 1.) > TopLoc_Location::ScalePrec()); + + if (isBadTrsf) + { + theProblemShapes.Append(anS); + } + } + +} \ No newline at end of file diff --git a/src/BRepTools/BRepTools.hxx b/src/BRepTools/BRepTools.hxx index babe873967..968fd90dae 100644 --- a/src/BRepTools/BRepTools.hxx +++ b/src/BRepTools/BRepTools.hxx @@ -29,6 +29,7 @@ #include #include #include +#include class TopoDS_Face; class TopoDS_Wire; @@ -358,9 +359,14 @@ public: //! removal is not going to break topological connectivity between sub-shapes. //! The flag if set to true disables the connectivity check and clears //! the given shape from all sub-shapes with internal orientation. - Standard_EXPORT static void RemoveInternals (TopoDS_Shape& theS, - const Standard_Boolean theForce = Standard_False); - + Standard_EXPORT static void RemoveInternals(TopoDS_Shape& theS, + const Standard_Boolean theForce = Standard_False); + + //! Check all locations of shape according criterium: + //! aTrsf.IsNegative() || (Abs(Abs(aTrsf.ScaleFactor()) - 1.) > TopLoc_Location::ScalePrec()) + //! All sub-shapes having such locations are put in list theProblemShapes + Standard_EXPORT static void CheckLocations(const TopoDS_Shape& theS, + TopTools_ListOfShape& theProblemShapes); protected: diff --git a/src/BRepTools/BRepTools_Modifier.cxx b/src/BRepTools/BRepTools_Modifier.cxx index deeb1ee537..f4cf6f39c2 100644 --- a/src/BRepTools/BRepTools_Modifier.cxx +++ b/src/BRepTools/BRepTools_Modifier.cxx @@ -272,7 +272,7 @@ Standard_Boolean BRepTools_Modifier::Rebuild RevWires = aNSinfo.myRevWires; B.MakeFace(TopoDS::Face(result),aNSinfo.mySurface, aNSinfo.myLoc.Predivided(S.Location()),aNSinfo.myToler); - result.Location(S.Location()); + result.Location(S.Location(), Standard_False); if (aNSinfo.myRevFace) ResOr = TopAbs_REVERSED; // set specifics flags of a Face @@ -288,7 +288,7 @@ Standard_Boolean BRepTools_Modifier::Rebuild else { // create new face with bare triangulation B.MakeFace(TopoDS::Face(result), aTriangulation); - result.Location(S.Location()); + result.Location(S.Location(), Standard_False); } rebuild = Standard_True; } @@ -313,7 +313,7 @@ Standard_Boolean BRepTools_Modifier::Rebuild aNCinfo.myLoc.Predivided(S.Location()),aNCinfo.myToler); No3DCurve = Standard_False; } - result.Location(S.Location()); + result.Location(S.Location(), Standard_False); // result.Orientation(S.Orientation()); // set specifics flags of an Edge @@ -332,7 +332,7 @@ Standard_Boolean BRepTools_Modifier::Rebuild else { // create new edge with bare polygon B.MakeEdge(TopoDS::Edge(result), aPolygon); - result.Location(S.Location()); + result.Location(S.Location(), Standard_False); } rebuild = Standard_True; } diff --git a/src/BRepTools/BRepTools_PurgeLocations.cxx b/src/BRepTools/BRepTools_PurgeLocations.cxx new file mode 100644 index 0000000000..1bc807ac29 --- /dev/null +++ b/src/BRepTools/BRepTools_PurgeLocations.cxx @@ -0,0 +1,220 @@ +// Copyright (c) 2021 OPEN CASCADE SAS +// +// This file is part of Open CASCADE Technology software library. +// +// This library is free software; you can redistribute it and/or modify it under +// the terms of the GNU Lesser General Public License version 2.1 as published +// by the Free Software Foundation, with special exception defined in the file +// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT +// distribution for complete text of the license and disclaimer of any warranty. +// +// Alternatively, this file may be used under the terms of Open CASCADE +// commercial license or contractual agreement. + +#include +#include +#include +#include +#include +#include +#include +#include + +//======================================================================= +//function : BRepTools_PurgeLocations +//purpose : +//======================================================================= +BRepTools_PurgeLocations::BRepTools_PurgeLocations() : + myDone(Standard_False) +{ +} + +//======================================================================= +//function : Perform +//purpose : +//======================================================================= + +Standard_Boolean BRepTools_PurgeLocations::Perform(const TopoDS_Shape& theShape) +{ + myShape = theShape; + myMapShapes.Clear(); + myLocations.Clear(); + myDone = Standard_True; + AddShape(myShape); + + //Check locations; + Standard_Integer ind; + NCollection_Vector aBadTrsfInds; + for (ind = 1; ; ++ind) + { + const TopLoc_Location& aLoc = myLocations.Location(ind); + + if (aLoc.IsIdentity()) + break; + + const gp_Trsf& aTrsf = aLoc.Transformation(); + Standard_Boolean isBadTrsf = aTrsf.IsNegative() || + (Abs(Abs(aTrsf.ScaleFactor()) - 1.) > TopLoc_Location::ScalePrec()); + if (isBadTrsf) + { + aBadTrsfInds.Append(ind); + } + } + + if (aBadTrsfInds.IsEmpty()) + { + return myDone; + } + + Standard_Integer aNbShapes = myMapShapes.Extent(); + myMapNewShapes.Clear(); + Standard_Integer inds; + for (inds = 1; inds <= aNbShapes; ++inds) + { + const TopoDS_Shape& anS = myMapShapes(inds); + Standard_Integer aLocInd = myLocations.Index(anS.Location()); + if(aLocInd == 0) + { + continue; + } + Standard_Integer il; + for (il = 0; il < aBadTrsfInds.Size(); ++il) + { + if (aBadTrsfInds(il) == aLocInd) + { + TopoDS_Shape aTrS; + Standard_Boolean isDone = PurgeLocation(anS, aTrS); + myDone = myDone && isDone; + myMapNewShapes.Bind(anS, aTrS); + break; + } + + } + } + + if (myReShape.IsNull()) + { + myReShape = new BRepTools_ReShape; + } + else + { + myReShape->Clear(); + } + TopTools_DataMapIteratorOfDataMapOfShapeShape anIter(myMapNewShapes); + for (; anIter.More(); anIter.Next()) + { + const TopoDS_Shape& anOldS = anIter.Key(); + const TopoDS_Shape& aNewS = anIter.Value(); + myReShape->Replace(anOldS, aNewS); + } + + myShape = myReShape->Apply(myShape); + + return myDone; + +} + +//======================================================================= +//function : PurgeLocation +//purpose : +//======================================================================= + +Standard_Boolean BRepTools_PurgeLocations::PurgeLocation(const TopoDS_Shape& theS, TopoDS_Shape& theRes) +{ + Standard_Boolean isDone = Standard_True; + TopLoc_Location aRefLoc = theS.Location(); + Standard_Boolean isEmpty = aRefLoc.IsIdentity(); + if (isEmpty) + { + theRes = theS; + return isDone; + } + + TopLoc_Location aNullLoc; + theRes = theS.Located(aNullLoc); + + while (!isEmpty) + { + const Handle(TopLoc_Datum3D)& aFD = aRefLoc.FirstDatum(); + gp_Trsf aTrsf = aFD->Trsf(); + Standard_Integer aFP = aRefLoc.FirstPower(); + Standard_Boolean isBad = aTrsf.IsNegative() || (Abs(Abs(aTrsf.ScaleFactor()) - 1.) > TopLoc_Location::ScalePrec()); + TopLoc_Location aLoc(aFD); + aLoc = aLoc.Powered(aFP); + aTrsf = aLoc.Transformation(); + if (isBad) + { + Handle(BRepTools_TrsfModification) aModification = new BRepTools_TrsfModification(aTrsf); + BRepTools_Modifier aModifier(theRes, aModification); + if (aModifier.IsDone()) + { + theRes = aModifier.ModifiedShape(theRes); + } + else + { + isDone = Standard_False; + theRes = theRes.Moved(aLoc); + } + } + else + { + theRes = theRes.Moved(aLoc); + } + + aRefLoc = aRefLoc.NextLocation(); + isEmpty = aRefLoc.IsIdentity(); + } + + return isDone; +} + +//======================================================================= +//function : AddShape +//purpose : +//======================================================================= + +void BRepTools_PurgeLocations::AddShape(const TopoDS_Shape& theS) +{ + myMapShapes.Add(theS); + myLocations.Add(theS.Location()); + + TopoDS_Iterator It(theS, Standard_False, Standard_False); + while (It.More()) { + AddShape(It.Value()); + It.Next(); + } +} + +//======================================================================= +//function : GetResult +//purpose : +//======================================================================= + +const TopoDS_Shape& BRepTools_PurgeLocations::GetResult() const +{ + return myShape; +} + +//======================================================================= +//function : IsDone +//purpose : +//======================================================================= + +Standard_Boolean BRepTools_PurgeLocations::IsDone() const +{ + return myDone; +} + +//======================================================================= +//function : ModifiedShape +//purpose : +//======================================================================= + +TopoDS_Shape BRepTools_PurgeLocations::ModifiedShape(const TopoDS_Shape& theInitShape) const +{ + TopoDS_Shape aShape = theInitShape; + if (myMapNewShapes.IsBound(theInitShape)) + aShape = myMapNewShapes.Find(theInitShape); + return aShape; +} + diff --git a/src/BRepTools/BRepTools_PurgeLocations.hxx b/src/BRepTools/BRepTools_PurgeLocations.hxx new file mode 100644 index 0000000000..4f63283be9 --- /dev/null +++ b/src/BRepTools/BRepTools_PurgeLocations.hxx @@ -0,0 +1,62 @@ +// Copyright (c) 2021 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 _BRepTools_PurgeLocations_HeaderFile +#define _BRepTools_PurgeLocations_HeaderFile + +#include +#include +#include +#include +#include + +class TopoDS_Shape; + +class BRepTools_PurgeLocations; + +//! Removes location datums, which satisfy conditions: +//! aTrsf.IsNegative() || (Abs(Abs(aTrsf.ScaleFactor()) - 1.) > TopLoc_Location::ScalePrec()) +//! from all locations of shape and its subshapes +class BRepTools_PurgeLocations +{ + +public: + + Standard_EXPORT BRepTools_PurgeLocations(); + + //! Removes all locations correspodingly to criterium from theShape. + Standard_EXPORT Standard_Boolean Perform(const TopoDS_Shape& theShape); + + //! Returns shape with removed locations. + Standard_EXPORT const TopoDS_Shape& GetResult() const; + + Standard_EXPORT Standard_Boolean IsDone() const; + + //! Returns modified shape obtained from initial shape. + TopoDS_Shape ModifiedShape(const TopoDS_Shape& theInitShape) const; + +private: + + void AddShape(const TopoDS_Shape& theS); + Standard_Boolean PurgeLocation(const TopoDS_Shape& theS, TopoDS_Shape& theRes); + + Standard_Boolean myDone; + TopoDS_Shape myShape; + TopTools_IndexedMapOfShape myMapShapes; + TopTools_LocationSet myLocations; + TopTools_DataMapOfShapeShape myMapNewShapes; + Handle(BRepTools_ReShape) myReShape; + +}; + +#endif // _BRepTools_PurgeLocations_HeaderFile diff --git a/src/BRepTools/BRepTools_ReShape.cxx b/src/BRepTools/BRepTools_ReShape.cxx index 4eb968edac..63c00a0331 100644 --- a/src/BRepTools/BRepTools_ReShape.cxx +++ b/src/BRepTools/BRepTools_ReShape.cxx @@ -174,7 +174,7 @@ void BRepTools_ReShape::replace (const TopoDS_Shape& ashape, if (myConsiderLocation) { //sln 29.11.01 Bug22: Change location of 'newshape' in accordance with location of 'shape' - newshape.Location(newshape.Location().Multiplied(shape.Location().Inverted())); + newshape.Location(newshape.Location().Multiplied(shape.Location().Inverted()), Standard_False); TopLoc_Location nullLoc; shape.Location ( nullLoc ); } @@ -243,8 +243,8 @@ TopoDS_Shape BRepTools_ReShape::Value (const TopoDS_Shape& ashape) const if (myConsiderLocation) { //sln 29.11.01 Bug22: Recalculate location of resulting shape in accordance with //whether result is from map or not - if(fromMap) res.Location(ashape.Location()*res.Location()); - else res.Location(ashape.Location()); + if(fromMap) res.Location(ashape.Location()*res.Location(), Standard_False); + else res.Location(ashape.Location(), Standard_False); } return res; @@ -300,7 +300,7 @@ Standard_Integer BRepTools_ReShape::Status(const TopoDS_Shape& ashape, { TopLoc_Location aResLoc = (res >0 && !newsh.Location().IsIdentity() ? aLocSh * newsh.Location() : aLocSh); - newsh.Location(aResLoc); + newsh.Location(aResLoc, Standard_False); } return res; } diff --git a/src/BRepTools/FILES b/src/BRepTools/FILES index bebdc4807e..60a0c86804 100644 --- a/src/BRepTools/FILES +++ b/src/BRepTools/FILES @@ -26,3 +26,5 @@ BRepTools_TrsfModification.cxx BRepTools_TrsfModification.hxx BRepTools_WireExplorer.cxx BRepTools_WireExplorer.hxx +BRepTools_PurgeLocations.cxx +BRepTools_PurgeLocations.hxx \ No newline at end of file diff --git a/src/BinTools/BinTools_ShapeReader.cxx b/src/BinTools/BinTools_ShapeReader.cxx index bf23f99169..c797b4f0b7 100644 --- a/src/BinTools/BinTools_ShapeReader.cxx +++ b/src/BinTools/BinTools_ShapeReader.cxx @@ -90,7 +90,7 @@ TopoDS_Shape BinTools_ShapeReader::ReadShape (BinTools_IStream& theStream) aResult = ReadShape (theStream); theStream.GoTo (aCurrent); // returns to the current position } - aResult.Location (*ReadLocation (theStream)); + aResult.Location (*ReadLocation (theStream), Standard_False); aResult.Orientation (TopAbs_Orientation (theStream.ReadByte())); return aResult; } @@ -323,7 +323,7 @@ TopoDS_Shape BinTools_ShapeReader::ReadShape (BinTools_IStream& theStream) aResult.Convex (aConv); myShapePos.Bind (aPosition, aResult); aResult.Orientation (aShapeOrientation); - aResult.Location (*aShapeLocation); + aResult.Location (*aShapeLocation, Standard_False); return aResult; } diff --git a/src/BinTools/BinTools_ShapeSet.cxx b/src/BinTools/BinTools_ShapeSet.cxx index 19f4a7b03a..5df9100a2d 100644 --- a/src/BinTools/BinTools_ShapeSet.cxx +++ b/src/BinTools/BinTools_ShapeSet.cxx @@ -526,7 +526,7 @@ void BinTools_ShapeSet::ReadSubs(TopoDS_Shape& S, Standard_IStream& IS, Standard_Integer l; BinTools::GetInteger(IS, l); - S.Location(myLocations.Location(l)); + S.Location(myLocations.Location(l), Standard_False); } } diff --git a/src/IGESCAFControl/IGESCAFControl_Writer.cxx b/src/IGESCAFControl/IGESCAFControl_Writer.cxx index a67ad2b836..81802e8a22 100644 --- a/src/IGESCAFControl/IGESCAFControl_Writer.cxx +++ b/src/IGESCAFControl/IGESCAFControl_Writer.cxx @@ -102,7 +102,7 @@ namespace { TopoDS_Shape aShape; if (!XCAFDoc_ShapeTool::GetShape (theLabel, aShape)) return; - aShape.Move (theLocation); + aShape.Move (theLocation, Standard_False); theMapOfShapeNames.Bind (aShape, thePrevName->Get()); } } diff --git a/src/IGESToBRep/IGESToBRep_CurveAndSurface.cxx b/src/IGESToBRep/IGESToBRep_CurveAndSurface.cxx index f04f750f72..70a41e7f51 100644 --- a/src/IGESToBRep/IGESToBRep_CurveAndSurface.cxx +++ b/src/IGESToBRep/IGESToBRep_CurveAndSurface.cxx @@ -514,7 +514,7 @@ TopoDS_Shape IGESToBRep_CurveAndSurface::TransferGeometry T.SetScaleFactor(sc); } TopLoc_Location L(T); - res.Move(L); + res.Move(L, Standard_False); } else { Message_Msg msg1035("IGES_1035"); diff --git a/src/IGESToBRep/IGESToBRep_TopoSurface.cxx b/src/IGESToBRep/IGESToBRep_TopoSurface.cxx index 41db4bd86b..de7552ea70 100644 --- a/src/IGESToBRep/IGESToBRep_TopoSurface.cxx +++ b/src/IGESToBRep/IGESToBRep_TopoSurface.cxx @@ -325,7 +325,7 @@ TopoDS_Shape IGESToBRep_TopoSurface::TransferTopoBasicSurface if (IGESData_ToolLocation::ConvertLocation (GetEpsilon(),st->CompoundLocation(),trsf,GetUnitFactor())) { TopLoc_Location locFace(trsf); - res.Move(locFace); + res.Move(locFace, Standard_False); } else { Message_Msg msg1035("IGES_1035"); @@ -651,7 +651,7 @@ TopoDS_Shape IGESToBRep_TopoSurface::TransferRuledSurface if (IGESData_ToolLocation::ConvertLocation (GetEpsilon(),st->CompoundLocation(), trsf,GetUnitFactor())) { TopLoc_Location shapeLoc(trsf); - res.Move(shapeLoc); + res.Move(shapeLoc, Standard_False); } else { Message_Msg msg1035("IGES_1035"); @@ -819,7 +819,7 @@ TopoDS_Shape IGESToBRep_TopoSurface::TransferSurfaceOfRevolution if (IGESData_ToolLocation::ConvertLocation (GetEpsilon(), st->CompoundLocation(), trsf, GetUnitFactor())) { TopLoc_Location shapeLoc(trsf); - res.Move(shapeLoc); + res.Move(shapeLoc, Standard_False); } else { Message_Msg msg1035("IGES_1035"); @@ -959,7 +959,7 @@ TopoDS_Shape IGESToBRep_TopoSurface::TransferTabulatedCylinder if (IGESData_ToolLocation::ConvertLocation (GetEpsilon(),st->CompoundLocation(), trsf, GetUnitFactor())) { TopLoc_Location shapeLoc(trsf); - res.Move(shapeLoc); + res.Move(shapeLoc, Standard_False); } else { Message_Msg msg1035("IGES_1035"); @@ -1115,7 +1115,7 @@ TopoDS_Shape IGESToBRep_TopoSurface::TransferOffsetSurface if (IGESData_ToolLocation::ConvertLocation (GetEpsilon(),st->CompoundLocation(),trsf, GetUnitFactor())) { TopLoc_Location loc2(trsf); - res.Move(loc2); + res.Move(loc2, Standard_False); } else { Message_Msg msg1035("IGES_1035"); @@ -1256,7 +1256,7 @@ TopoDS_Shape IGESToBRep_TopoSurface::TransferTrimmedSurface aMat.Value(2, 1), aMat.Value(2, 2), aMat.Value(2, 3), aTrans.Y(), aMat.Value(3, 1), aMat.Value(3, 2), aMat.Value(3, 3), aTrans.Z()); TopLoc_Location aLoc(aT); - face.Move(aLoc); + face.Move(aLoc, Standard_False); } } } @@ -1399,7 +1399,7 @@ TopoDS_Shape IGESToBRep_TopoSurface::TransferPlane // il reste a la mettre en position if (trsf.Form() != gp_Identity) { TopLoc_Location loc(trsf); - res.Location(loc); + res.Location(loc, Standard_False); } return res; } @@ -1476,14 +1476,14 @@ TopoDS_Shape IGESToBRep_TopoSurface::TransferPerforate // Ne pas oublier de composer la transformation locale a ce Wire if (trsi.Form() != gp_Identity) { TopLoc_Location locw(trsi); - wire.Location(locw); + wire.Location(locw, Standard_False); } B.Add (res,wire); } // Enfin, appliquer la trsf globale if (trsf.Form() != gp_Identity) { TopLoc_Location loc(trsf); - res.Location(loc); + res.Location(loc, Standard_False); } return res; } diff --git a/src/RWGltf/RWGltf_GltfJsonParser.cxx b/src/RWGltf/RWGltf_GltfJsonParser.cxx index c082c5c7b5..c1bb4911c8 100644 --- a/src/RWGltf/RWGltf_GltfJsonParser.cxx +++ b/src/RWGltf/RWGltf_GltfJsonParser.cxx @@ -1865,11 +1865,11 @@ void RWGltf_GltfJsonParser::bindNamedShape (TopoDS_Shape& theShape, { if (!theShape.Location().IsIdentity()) { - theShape.Location (theLoc * theShape.Location()); + theShape.Location (theLoc * theShape.Location(), Standard_False); } else { - theShape.Location (theLoc); + theShape.Location (theLoc, Standard_False); } } diff --git a/src/RWMesh/RWMesh_CafReader.cxx b/src/RWMesh/RWMesh_CafReader.cxx index a5df98a8c8..eb10ed2230 100644 --- a/src/RWMesh/RWMesh_CafReader.cxx +++ b/src/RWMesh/RWMesh_CafReader.cxx @@ -305,7 +305,7 @@ Standard_Boolean RWMesh_CafReader::addShapeIntoDoc (CafDocumentTools& theTools, TopoDS_Compound aCompound; BRep_Builder aBuilder; aBuilder.MakeCompound (aCompound); - aCompound.Location (theShape.Location()); + aCompound.Location (theShape.Location(), Standard_False); aShapeToAdd = aCompound; } } diff --git a/src/ShapeCustom/ShapeCustom.cxx b/src/ShapeCustom/ShapeCustom.cxx index 83188af68e..757784971b 100644 --- a/src/ShapeCustom/ShapeCustom.cxx +++ b/src/ShapeCustom/ShapeCustom.cxx @@ -76,7 +76,7 @@ TopoDS_Shape ShapeCustom::ApplyModifier (const TopoDS_Shape &S, context.Bind ( shape, res ); locModified = Standard_True; } - res.Location ( L ); + res.Location ( L, Standard_False ); B.Add ( C, res ); } diff --git a/src/ShapeFix/ShapeFix_Shape.cxx b/src/ShapeFix/ShapeFix_Shape.cxx index 60da7f063e..55df4bba7e 100644 --- a/src/ShapeFix/ShapeFix_Shape.cxx +++ b/src/ShapeFix/ShapeFix_Shape.cxx @@ -120,14 +120,14 @@ Standard_Boolean ShapeFix_Shape::Perform(const Message_ProgressRange& theProgres TopoDS_Shape aShapeNullLoc = myShape; aShapeNullLoc.Location(nullLoc); if(myMapFixingShape.Contains(aShapeNullLoc)) { - myShape.Location(L); + myShape.Location(L, Standard_False); myResult = Context()->Apply(myShape); status = Standard_True; return status; } else myMapFixingShape.Add(aShapeNullLoc); //--------------------------------------- - myShape.Location(L); + myShape.Location(L, Standard_False); TopoDS_Shape S = Context()->Apply(myShape); if ( NeedFix ( myFixVertexPositionMode ) ) ShapeFix::FixVertexPosition(S,Precision(),Context()); diff --git a/src/ShapeProcess/ShapeProcess_OperLibrary.cxx b/src/ShapeProcess/ShapeProcess_OperLibrary.cxx index e6c9564cbe..ede8305a68 100644 --- a/src/ShapeProcess/ShapeProcess_OperLibrary.cxx +++ b/src/ShapeProcess/ShapeProcess_OperLibrary.cxx @@ -86,7 +86,7 @@ TopoDS_Shape ShapeProcess_OperLibrary::ApplyModifier (const TopoDS_Shape &S, map.Bind ( shape, res ); } if ( ! res.IsSame ( shape ) ) locModified = Standard_True; - res.Location ( L ); + res.Location ( L, Standard_False ); B.Add ( C, res ); } if ( ! locModified ) return S; diff --git a/src/ShapeProcess/ShapeProcess_ShapeContext.cxx b/src/ShapeProcess/ShapeProcess_ShapeContext.cxx index 53381db5b4..135f14b36c 100644 --- a/src/ShapeProcess/ShapeProcess_ShapeContext.cxx +++ b/src/ShapeProcess/ShapeProcess_ShapeContext.cxx @@ -190,8 +190,8 @@ static void RecModif (const TopoDS_Shape &S, if ( ! r.IsNull() ) { TopoDS_Shape res = r; - if ( repl.IsBound ( r.Located(aShLoc) ) ) { - res = repl.Find ( r.Located(aShLoc) ); + if ( repl.IsBound ( r.Located(aShLoc, Standard_False) ) ) { + res = repl.Find ( r.Located(aShLoc, Standard_False) ); // it is supposed that map is created for r having FORWARD orientation // hence, if it is reversed, result should be reversed too // INTERNAL or EXTERNAL orientations are not allowed @@ -330,7 +330,7 @@ void ShapeProcess_ShapeContext::RecordModification (const Handle(ShapeBuild_ReSh if ( myMap.IsBound(myShape) ) { myResult = myMap.Find ( myShape ); - myResult.Location(myShape.Location()); + myResult.Location(myShape.Location(), Standard_False); } #ifdef OCCT_DEBUG // std::cout << "ReShape: " << std::endl; DumpMap (myMap); diff --git a/src/StepToGeom/StepToGeom.cxx b/src/StepToGeom/StepToGeom.cxx index ec9e51b084..9c4a0f7f92 100644 --- a/src/StepToGeom/StepToGeom.cxx +++ b/src/StepToGeom/StepToGeom.cxx @@ -1231,11 +1231,16 @@ Handle(Geom_Direction) StepToGeom::MakeDirection (const Handle(StepGeom_Directio const Standard_Real X = SD->DirectionRatiosValue(1); const Standard_Real Y = SD->DirectionRatiosValue(2); const Standard_Real Z = SD->DirectionRatiosValue(3); + //5.08.2021. Unstable test bugs xde bug24759: Y is very large value - FPE in SquareModulus + if (Precision::IsInfinite(X) || Precision::IsInfinite(Y) || Precision::IsInfinite(Z)) + { + return 0; + } // sln 22.10.2001. CTS23496: Direction is not created if it has null magnitude if (gp_XYZ(X, Y, Z).SquareModulus() > gp::Resolution()*gp::Resolution()) { return new Geom_Direction(X, Y, Z); - } + } } return 0; } diff --git a/src/TopExp/TopExp.cxx b/src/TopExp/TopExp.cxx index 58dc97ce32..c5f2eb44ff 100644 --- a/src/TopExp/TopExp.cxx +++ b/src/TopExp/TopExp.cxx @@ -52,10 +52,11 @@ void TopExp::MapShapes(const TopoDS_Shape& S, //======================================================================= void TopExp::MapShapes(const TopoDS_Shape& S, - TopTools_IndexedMapOfShape& M) + TopTools_IndexedMapOfShape& M, + const Standard_Boolean cumOri, const Standard_Boolean cumLoc) { M.Add(S); - TopoDS_Iterator It(S); + TopoDS_Iterator It(S, cumOri, cumLoc); while (It.More()) { MapShapes(It.Value(),M); It.Next(); @@ -67,11 +68,13 @@ void TopExp::MapShapes(const TopoDS_Shape& S, //purpose : //======================================================================= void TopExp::MapShapes(const TopoDS_Shape& S, - TopTools_MapOfShape& M) + TopTools_MapOfShape& M, + const Standard_Boolean cumOri, const Standard_Boolean cumLoc) { M.Add(S); - for (TopoDS_Iterator it(S); it.More(); it.Next()) - MapShapes(it.Value(), M); + TopoDS_Iterator It(S, cumOri, cumLoc); + for (; It.More(); It.Next()) + MapShapes(It.Value(), M); } //======================================================================= diff --git a/src/TopExp/TopExp.hxx b/src/TopExp/TopExp.hxx index e6e515e387..c2961ed738 100644 --- a/src/TopExp/TopExp.hxx +++ b/src/TopExp/TopExp.hxx @@ -58,10 +58,22 @@ public: Standard_EXPORT static void MapShapes (const TopoDS_Shape& S, const TopAbs_ShapeEnum T, TopTools_IndexedMapOfShape& M); //! Stores in the map all the sub-shapes of . - Standard_EXPORT static void MapShapes (const TopoDS_Shape& S, TopTools_IndexedMapOfShape& M); + //! - If cumOri is true, the function composes all + //! sub-shapes with the orientation of S. + //! - If cumLoc is true, the function multiplies all + //! sub-shapes by the location of S, i.e. it applies to + //! each sub-shape the transformation that is associated with S. + Standard_EXPORT static void MapShapes (const TopoDS_Shape& S, TopTools_IndexedMapOfShape& M, + const Standard_Boolean cumOri = Standard_True, const Standard_Boolean cumLoc = Standard_True); //! Stores in the map all the sub-shapes of . - Standard_EXPORT static void MapShapes (const TopoDS_Shape& S, TopTools_MapOfShape& M); + //! - If cumOri is true, the function composes all + //! sub-shapes with the orientation of S. + //! - If cumLoc is true, the function multiplies all + //! sub-shapes by the location of S, i.e. it applies to + //! each sub-shape the transformation that is associated with S. + Standard_EXPORT static void MapShapes (const TopoDS_Shape& S, TopTools_MapOfShape& M, + const Standard_Boolean cumOri = Standard_True, const Standard_Boolean cumLoc = Standard_True); //! Stores in the map all the subshape of of //! type for each one append to the list all diff --git a/src/TopLoc/TopLoc_Location.hxx b/src/TopLoc/TopLoc_Location.hxx index 002a0346a5..cc953d7f46 100644 --- a/src/TopLoc/TopLoc_Location.hxx +++ b/src/TopLoc/TopLoc_Location.hxx @@ -31,7 +31,6 @@ class Standard_ConstructionError; class gp_Trsf; class TopLoc_Datum3D; - //! A Location is a composite transition. It comprises a //! series of elementary reference coordinates, i.e. //! objects of type TopLoc_Datum3D, and the powers to @@ -156,7 +155,10 @@ Standard_Boolean operator != (const TopLoc_Location& Other) const } - + static Standard_Real ScalePrec() + { + return 1.e-14; + } protected: diff --git a/src/TopTools/TopTools_ShapeSet.cxx b/src/TopTools/TopTools_ShapeSet.cxx index be91dcf712..62d6553ca1 100644 --- a/src/TopTools/TopTools_ShapeSet.cxx +++ b/src/TopTools/TopTools_ShapeSet.cxx @@ -814,7 +814,7 @@ void TopTools_ShapeSet::Read(TopoDS_Shape& S, Standard_Integer l; IS >> l; - S.Location(myLocations.Location(l)); + S.Location(myLocations.Location(l), Standard_False); } } diff --git a/src/TopoDS/TopoDS_Builder.cxx b/src/TopoDS/TopoDS_Builder.cxx index b27b941ed0..a0c946a00b 100644 --- a/src/TopoDS/TopoDS_Builder.cxx +++ b/src/TopoDS/TopoDS_Builder.cxx @@ -105,7 +105,7 @@ void TopoDS_Builder::Add (TopoDS_Shape& aShape, // and the Relative Location const TopLoc_Location& aLoc=aShape.Location(); if (!aLoc.IsIdentity()) - S.Move(aLoc.Inverted()); + S.Move(aLoc.Inverted(), Standard_False); // // Set the TShape as modified. aShape.TShape()->Modified(Standard_True); @@ -135,7 +135,7 @@ void TopoDS_Builder::Remove (TopoDS_Shape& aShape, TopoDS_Shape S = aComponent; if (aShape.Orientation() == TopAbs_REVERSED) S.Reverse(); - S.Location(S.Location().Predivided(aShape.Location())); + S.Location(S.Location().Predivided(aShape.Location()), Standard_False); TopoDS_ListOfShape& L = aShape.TShape()->myShapes; TopoDS_ListIteratorOfListOfShape It(L); diff --git a/src/TopoDS/TopoDS_Iterator.cxx b/src/TopoDS/TopoDS_Iterator.cxx index ca51b61d00..141711a020 100644 --- a/src/TopoDS/TopoDS_Iterator.cxx +++ b/src/TopoDS/TopoDS_Iterator.cxx @@ -47,7 +47,7 @@ void TopoDS_Iterator::Initialize(const TopoDS_Shape& S, myShape = myShapes.Value(); myShape.Orientation(TopAbs::Compose(myOrientation,myShape.Orientation())); if (!myLocation.IsIdentity()) - myShape.Move(myLocation); + myShape.Move(myLocation, Standard_False); } } @@ -63,6 +63,6 @@ void TopoDS_Iterator::Next() myShape = myShapes.Value(); myShape.Orientation(TopAbs::Compose(myOrientation,myShape.Orientation())); if (!myLocation.IsIdentity()) - myShape.Move(myLocation); + myShape.Move(myLocation, Standard_False); } } diff --git a/src/TopoDS/TopoDS_Shape.hxx b/src/TopoDS/TopoDS_Shape.hxx index d44175f4f2..be92f62837 100644 --- a/src/TopoDS/TopoDS_Shape.hxx +++ b/src/TopoDS/TopoDS_Shape.hxx @@ -91,14 +91,26 @@ public: const TopLoc_Location& Location() const { return myLocation; } //! Sets the shape local coordinate system. - void Location (const TopLoc_Location& theLoc) { myLocation = theLoc; } + void Location (const TopLoc_Location& theLoc, const Standard_Boolean theRaiseExc = Standard_True) + { + const gp_Trsf& aTrsf = theLoc.Transformation(); + if ((Abs(Abs(aTrsf.ScaleFactor()) - 1.) > TopLoc_Location::ScalePrec() || aTrsf.IsNegative()) && theRaiseExc) + { + //Exception + throw Standard_DomainError("Location with scaling transformation is forbidden"); + } + else + { + myLocation = theLoc; + } + } //! Returns a shape similar to with the local //! coordinate system set to . - TopoDS_Shape Located (const TopLoc_Location& theLoc) const + TopoDS_Shape Located (const TopLoc_Location& theLoc, const Standard_Boolean theRaiseExc = Standard_True) const { TopoDS_Shape aShape (*this); - aShape.Location (theLoc); + aShape.Location (theLoc, theRaiseExc); return aShape; } @@ -176,13 +188,25 @@ public: void Convex (Standard_Boolean theIsConvex) { myTShape->Convex (theIsConvex); } //! Multiplies the Shape location by thePosition. - void Move (const TopLoc_Location& thePosition) { myLocation = thePosition * myLocation; } + void Move(const TopLoc_Location& thePosition, const Standard_Boolean theRaiseExc = Standard_True) + { + const gp_Trsf& aTrsf = thePosition.Transformation(); + if ((Abs(Abs(aTrsf.ScaleFactor()) - 1.) > TopLoc_Location::ScalePrec() || aTrsf.IsNegative()) && theRaiseExc) + { + //Exception + throw Standard_DomainError("Moving with scaling transformation is forbidden"); + } + else + { + myLocation = thePosition * myLocation; + } + } //! Returns a shape similar to with a location multiplied by thePosition. - TopoDS_Shape Moved (const TopLoc_Location& thePosition) const + TopoDS_Shape Moved (const TopLoc_Location& thePosition, const Standard_Boolean theRaiseExc = Standard_True) const { TopoDS_Shape aShape (*this); - aShape.Move (thePosition); + aShape.Move (thePosition, theRaiseExc); return aShape; } diff --git a/src/VrmlData/VrmlData_Group.cxx b/src/VrmlData/VrmlData_Group.cxx index af43b054a8..7229dfd5cf 100644 --- a/src/VrmlData/VrmlData_Group.cxx +++ b/src/VrmlData/VrmlData_Group.cxx @@ -411,7 +411,7 @@ void VrmlData_Group::Shape (TopoDS_Shape& theShape, VrmlData_DataMapOfShapeAppearance * pMapApp) { VrmlData_Scene::createShape (theShape, myNodes, pMapApp); - theShape.Location(myTrsf); + theShape.Location(myTrsf, Standard_False); } //======================================================================= diff --git a/src/XCAFDoc/XCAFDoc_ShapeTool.cxx b/src/XCAFDoc/XCAFDoc_ShapeTool.cxx index 0598161e0b..294c97461a 100644 --- a/src/XCAFDoc/XCAFDoc_ShapeTool.cxx +++ b/src/XCAFDoc/XCAFDoc_ShapeTool.cxx @@ -333,7 +333,7 @@ Standard_Boolean XCAFDoc_ShapeTool::GetShape (const TDF_Label& L, TopoDS_Shape& if ( L.FindAttribute(XCAFDoc::ShapeRefGUID(), Node) && Node->HasFather() && L.FindAttribute(XCAFDoc_Location::GetID(), LocationAttribute)) { if ( ! GetShape(Node->Father()->Label(), S) ) return Standard_False; - S.Move ( LocationAttribute->Get() ); + S.Move ( LocationAttribute->Get(), Standard_False ); return Standard_True; } @@ -537,7 +537,7 @@ static Standard_Boolean prepareAssembly (const TopoDS_Shape& theShape, gp_Trsf aTrsf; aTrsf.SetScale(gp_Pnt(0,0,0), 1); aLoc = TopLoc_Location( aTrsf ); - aNewScomp.Location( aLoc ); + aNewScomp.Location( aLoc, Standard_False ); } B.Add(theOUTShape, aNewScomp); } @@ -1585,7 +1585,7 @@ static Standard_Boolean checkForShape (const TopoDS_Shape& theShape, TopoDS_Shape aCopySh = theCurSh; aCompLoc = aCompLoc.Multiplied( theCurSh.Location() ); aSupLoc = aSupLoc.Multiplied( aCompLoc ); - aCopySh.Location( aSupLoc ); + aCopySh.Location( aSupLoc, Standard_False ); if ( aCopySh.IsSame( theShape ) ) { theLabels.Prepend( theUserL ); return Standard_True; @@ -1676,7 +1676,7 @@ static Standard_Boolean getShapesOfSHUO (TopLoc_IndexedMapOfLocation& theaPrevLo l--; } } - aSHUO_NUSh.Location( SupcompLoc ); + aSHUO_NUSh.Location( SupcompLoc, Standard_False ); theShape = aSHUO_NUSh; } return (!theShape.IsNull()); @@ -1958,7 +1958,7 @@ void XCAFDoc_ShapeTool::makeSubShape (const TDF_Label& theMainShapeL, // Identical location and empty location are not the same for ShapeTool, so try to process both // in case of aSubLoc is not identical, the second Add try will not affect algorithm. Standard_Boolean isNewSubL; - isNewSubL = AddSubShape(thePart, aChildShape.Located(aSubLoc), aSubLabel); + isNewSubL = AddSubShape(thePart, aChildShape.Located(aSubLoc, Standard_False), aSubLabel); if (aSubLabel.IsNull()) { isNewSubL = AddSubShape(thePart, aChildShape.Located(TopLoc_Location()), aSubLabel); @@ -2051,7 +2051,7 @@ Standard_Boolean XCAFDoc_ShapeTool::updateComponent(const TDF_Label& theItemLabe if ( updateComponent(aComponentRefLab, aComponentShape, theUpdated) ) { isModified = Standard_True; - aComponentShape.Location(aComponentLoc); // Apply placement + aComponentShape.Location(aComponentLoc, Standard_False); // Apply placement } } else diff --git a/src/XCAFPrs/XCAFPrs.cxx b/src/XCAFPrs/XCAFPrs.cxx index 54d449c1a4..e7ff3a3cc3 100644 --- a/src/XCAFPrs/XCAFPrs.cxx +++ b/src/XCAFPrs/XCAFPrs.cxx @@ -95,7 +95,7 @@ static Standard_Boolean getShapesOfSHUO (TopLoc_IndexedMapOfLocation& theaPrevLo l--; } } - aSHUO_NUSh.Location( SupcompLoc ); + aSHUO_NUSh.Location( SupcompLoc, Standard_False ); theSHUOShapeSeq.Append( aSHUO_NUSh ); } return (theSHUOShapeSeq.Length() > 0); @@ -295,7 +295,7 @@ void XCAFPrs::CollectStyleSettings (const TDF_Label& theLabel, continue; } } - aSubshape.Move (theLoc); + aSubshape.Move (theLoc, Standard_False); XCAFPrs_Style* aMapStyle = theSettings.ChangeSeek (aSubshape); if (aMapStyle == NULL) theSettings.Add (aSubshape, aStyle); diff --git a/tests/bugs/modalg_6/bug28394_2 b/tests/bugs/modalg_6/bug28394_2 index 14fd44d5ad..9e806fdb70 100644 --- a/tests/bugs/modalg_6/bug28394_2 +++ b/tests/bugs/modalg_6/bug28394_2 @@ -10,7 +10,7 @@ set GoodNbExtremas 4 circle c1 5 5 10 0 1 1 20 mkedge e1 c1 -bmirror e1 e1 5 5 10 1 0 0 +tmirror e1 e1 5 5 10 1 0 0 mkcurve c1 e1 cvalue c1 0.63 x1 y1 z1 diff --git a/tests/bugs/moddata_3/bug27457 b/tests/bugs/moddata_3/bug27457 new file mode 100644 index 0000000000..e2c750d692 --- /dev/null +++ b/tests/bugs/moddata_3/bug27457 @@ -0,0 +1,33 @@ +puts "=========" +puts "0027457: Modeling Data - Raise if scaled transformation is used for shape location" +puts "=========" +puts "" + +box b 1 1 1 +fscale b 0 0 0 2 +set chsh [checkshape b f] +regexp {Shapes with problems : ([0-9]+)} $chsh full NbSh +if { $NbSh > 1 } { + puts "Number of faulty shapes : $NbSh" +} else { + puts "Error: fscale does not produce wrong shape" +} + +set Nbloc 0 +set chloc [checkloc b] +set Nbloc [llength $chloc] +if { $Nbloc > 0 } { + puts "Number of problematic locations : $Nbloc" +} else { + puts "Error: fscale does not produce wrong location" +} +checkprops b -v 8. + +box b1 1 1 1 +bscale b1 0 0 0 2 +checkprops b1 -v 1. + +smallview +donly b b1 +fit +checkview -screenshot -2d -path ${imagedir}/${test_image}.png diff --git a/tests/bugs/moddata_3/bug27457_1 b/tests/bugs/moddata_3/bug27457_1 new file mode 100644 index 0000000000..91bcd048b1 --- /dev/null +++ b/tests/bugs/moddata_3/bug27457_1 @@ -0,0 +1,32 @@ +puts "=========" +puts "0027457: Modeling Data - Raise if scaled transformation is used for shape location" +puts " Testing tool for purging locations" +puts "=========" +puts "" + +restore [locate_data_file bug27457_1.brep] s +set chsh [checkshape s b] +regexp {Shapes with problems : ([0-9]+)} $chsh full NbSh +puts "Number of faulty shapes : $NbSh" + +set Nbloc 0 +set chloc [checkloc s] +set Nbloc [llength $chloc] +puts "Number of problematic locations : $Nbloc" + +set Purge_status [purgeloc s1 s] +checkshape s1 + +set Nbloc1 0 + +set chloc1 [checkloc s1] +if { ! [regexp {There are no problematic shapes} $chloc1 full str]} { + puts "Error - not all problematic locations are purged" + set Nbloc1 [llength $chloc1] + puts "Number of problematic locations : $Nbloc1" +} + +smallview +donly s1 +fit +checkview -screenshot -2d -path ${imagedir}/${test_image}.png diff --git a/tests/bugs/moddata_3/bug27457_2 b/tests/bugs/moddata_3/bug27457_2 new file mode 100644 index 0000000000..672d05d670 --- /dev/null +++ b/tests/bugs/moddata_3/bug27457_2 @@ -0,0 +1,32 @@ +puts "=========" +puts "0027457: Modeling Data - Raise if scaled transformation is used for shape location" +puts " Testing tool for purging locations" +puts "=========" +puts "" + +restore [locate_data_file bug27457_2.brep] s +set chsh [checkshape s b] +regexp {Shapes with problems : ([0-9]+)} $chsh full NbSh +puts "Number of faulty shapes : $NbSh" + +set Nbloc 0 +set chloc [checkloc s] +set Nbloc [llength $chloc] +puts "Number of problematic locations : $Nbloc" + +set Purge_status [purgeloc s1 s] +checkshape s1 + +set Nbloc1 0 + +set chloc1 [checkloc s1] +if { ! [regexp {There are no problematic shapes} $chloc1 full str]} { + puts "Error - not all problematic locations are purged" + set Nbloc1 [llength $chloc1] + puts "Number of problematic locations : $Nbloc1" +} + +smallview +donly s1 +fit +checkview -screenshot -2d -path ${imagedir}/${test_image}.png diff --git a/tests/v3d/bugs/bug22240 b/tests/v3d/bugs/bug22240 index 8476555012..a831cbd611 100644 --- a/tests/v3d/bugs/bug22240 +++ b/tests/v3d/bugs/bug22240 @@ -6,7 +6,7 @@ puts "" pload MODELING VISUALIZATION restore [locate_data_file bug22240_Pump_Nut.brep] a restore [locate_data_file bug22240_Pump_Nut.brep] b -bscale b 0 0 0 2. +tscale b 0 0 0 2. vinit View1 vdisplay a b vsetdispmode a 1 diff --git a/tests/v3d/bugs/bug30630_1 b/tests/v3d/bugs/bug30630_1 index 9fa8bfbe95..9b675357a4 100644 --- a/tests/v3d/bugs/bug30630_1 +++ b/tests/v3d/bugs/bug30630_1 @@ -22,7 +22,7 @@ verase b # Box with mirror transformation box a 1 1 1 -bmirror a 0 0 0 1 0 0 +fmirror a 0 0 0 1 0 0 explode a sh renamevar a_1 a vdisplay -dispMode 1 a @@ -37,7 +37,7 @@ verase a # Box with mirror transformation and reversed face box c 1 1 1 -bmirror c 0 0 0 1 0 0 +fmirror c 0 0 0 1 0 0 orientation c R explode c sh renamevar c_1 c diff --git a/tests/v3d/bugs/bug30630_2 b/tests/v3d/bugs/bug30630_2 index 6018a32c94..634223fc1f 100644 --- a/tests/v3d/bugs/bug30630_2 +++ b/tests/v3d/bugs/bug30630_2 @@ -13,7 +13,7 @@ vcamera -persp # Simple box box b 1 1 1 -bmirror b 0 0 0 0 0 1 +fmirror b 0 0 0 0 0 1 vdisplay -dispMode 1 b vaspects b -setBackFaceColor RED box bb 0.5 0.5 -0.5 0.1 0.1 0.1 diff --git a/tests/v3d/bugs/bug30630_3 b/tests/v3d/bugs/bug30630_3 index 6bf0e08a35..596698e84c 100644 --- a/tests/v3d/bugs/bug30630_3 +++ b/tests/v3d/bugs/bug30630_3 @@ -20,7 +20,7 @@ verase b # Box with mirror transformation box a 1 1 1 -bmirror a 0 0 0 1 0 0 +fmirror a 0 0 0 1 0 0 vdisplay -dispMode 1 a vaspects a -setBackFaceColor RED vfit @@ -33,7 +33,7 @@ verase a # Box with mirror transformation and reversed face box c 1 1 1 -bmirror c 0 0 0 1 0 0 +fmirror c 0 0 0 1 0 0 orientation c R vdisplay -dispMode 1 c vaspects c -setBackFaceColor RED From da80ff68f1e9853c1015a5dbb6199541e92789ce Mon Sep 17 00:00:00 2001 From: dpasukhi Date: Tue, 10 Nov 2020 07:52:30 +0300 Subject: [PATCH 017/639] 0031382: Data Exchange - BinXCAF should preserve length unit information Possibility for adding LengthUnit info to XCAF document using special class XCAFDoc_LenghtUnit and XCAFDoc_LenghtUnitTool is implemented. Package UnitsMethods is split: geom methods were placed to new file GeomConvert_Units which is in the toolkit TKXSBase, internal step scale factors was placed to StepData. Updated UnitMethods to convert scale factor to different unit types. Now, XSAlgo::XSAlgo_AlgoContainer is used to update unit info from static interface values. New Draw command "XSetLengthUnit" and "XGetLengthUnit" for set or get XDE attribute. Upgraded tests for STEP, IGES, OBJ, glTF, VRML formats to check area regressing with used unit. Upgraded tests\de test cases to use any units in the "loop back" algorithms. --- src/AIS/AIS_Plane.cxx | 1 - src/BinMXCAFDoc/BinMXCAFDoc.cxx | 2 + src/BinMXCAFDoc/BinMXCAFDoc.hxx | 2 + .../BinMXCAFDoc_LengthUnitDriver.cxx | 69 +++ .../BinMXCAFDoc_LengthUnitDriver.hxx | 54 ++ src/BinMXCAFDoc/FILES | 2 + src/GeomConvert/FILES | 2 + src/GeomConvert/GeomConvert_Units.cxx | 317 +++++++++++ src/GeomConvert/GeomConvert_Units.hxx | 48 ++ .../GeomToStep_MakeCartesianPoint.cxx | 6 +- src/GeomToStep/GeomToStep_MakeCircle.cxx | 2 +- src/GeomToStep/GeomToStep_MakeCircle_gen.pxx | 2 +- .../GeomToStep_MakeConicalSurface.cxx | 4 +- .../GeomToStep_MakeCylindricalSurface.cxx | 4 +- src/GeomToStep/GeomToStep_MakeEllipse.cxx | 2 +- src/GeomToStep/GeomToStep_MakeEllipse_gen.pxx | 2 +- src/GeomToStep/GeomToStep_MakeHyperbola.cxx | 4 +- src/GeomToStep/GeomToStep_MakeParabola.cxx | 4 +- ...omToStep_MakeRectangularTrimmedSurface.cxx | 4 +- .../GeomToStep_MakeSphericalSurface.cxx | 4 +- src/GeomToStep/GeomToStep_MakeSurface.cxx | 4 +- .../GeomToStep_MakeToroidalSurface.cxx | 4 +- src/GeomToStep/GeomToStep_MakeVector.cxx | 6 +- src/IGESCAFControl/IGESCAFControl_Reader.cxx | 24 +- src/IGESCAFControl/IGESCAFControl_Writer.cxx | 24 + src/IGESCAFControl/IGESCAFControl_Writer.hxx | 5 +- src/IGESData/IGESData_BasicEditor.cxx | 28 +- src/IGESData/IGESData_GlobalSection.cxx | 21 +- src/IGESData/IGESData_GlobalSection.hxx | 6 + src/IGESData/IGESData_IGESModel.cxx | 11 - src/IGESData/IGESData_IGESModel.hxx | 5 +- src/PrsDim/PrsDim_AngleDimension.cxx | 1 - src/PrsDim/PrsDim_Dimension.cxx | 1 - src/RWGltf/RWGltf_CafWriter.cxx | 5 + src/RWMesh/RWMesh_CafReader.cxx | 21 + src/RWMesh/RWMesh_CafReader.hxx | 3 +- src/RWObj/RWObj_CafWriter.cxx | 6 + src/STEPCAFControl/STEPCAFControl_Reader.cxx | 36 +- src/STEPCAFControl/STEPCAFControl_Reader.hxx | 5 + src/STEPCAFControl/STEPCAFControl_Writer.cxx | 28 +- src/STEPCAFControl/STEPCAFControl_Writer.hxx | 22 +- .../STEPConstruct_UnitContext.cxx | 39 +- src/STEPControl/STEPControl_ActorRead.cxx | 5 +- src/STEPControl/STEPControl_ActorWrite.cxx | 18 +- src/STEPControl/STEPControl_Reader.cxx | 18 + src/STEPControl/STEPControl_Reader.hxx | 4 + src/STEPControl/STEPControl_Writer.cxx | 9 +- src/ShapeAnalysis/ShapeAnalysis_Edge.cxx | 4 +- src/StepData/FILES | 2 + src/StepData/StepData_GlobalFactors.cxx | 113 ++++ src/StepData/StepData_GlobalFactors.hxx | 81 +++ src/StepData/StepData_StepModel.cxx | 59 +- src/StepData/StepData_StepModel.hxx | 18 + src/StepFile/StepFile_ReadData.cxx | 8 +- src/StepToGeom/StepToGeom.cxx | 36 +- .../StepToTopoDS_TranslateEdge.cxx | 6 +- src/TKXSBase/PACKAGES | 1 - src/TKernel/PACKAGES | 1 + .../TopoDSToStep_MakeStepFace.cxx | 9 +- src/UnitsMethods/FILES | 1 + src/UnitsMethods/UnitsMethods.cxx | 534 ++++++------------ src/UnitsMethods/UnitsMethods.hxx | 93 ++- src/UnitsMethods/UnitsMethods_LengthUnit.hxx | 33 ++ src/XCAFDoc/FILES | 2 + src/XCAFDoc/GUID.txt | 1 + src/XCAFDoc/XCAFDoc.cxx | 6 + src/XCAFDoc/XCAFDoc_DocumentTool.cxx | 72 +++ src/XCAFDoc/XCAFDoc_DocumentTool.hxx | 22 + src/XCAFDoc/XCAFDoc_LengthUnit.cxx | 158 ++++++ src/XCAFDoc/XCAFDoc_LengthUnit.hxx | 104 ++++ src/XDEDRAW/XDEDRAW.cxx | 102 +++- src/XDEDRAW/XDEDRAW_Common.cxx | 14 +- src/XDEDRAW/XDEDRAW_Shapes.cxx | 11 + src/XSAlgo/XSAlgo_AlgoContainer.cxx | 2 +- src/XSDRAWSTEP/XSDRAWSTEP.cxx | 12 +- src/XSDRAWSTLVRML/XSDRAWSTLVRML.cxx | 34 +- src/XmlMXCAFDoc/FILES | 2 + src/XmlMXCAFDoc/XmlMXCAFDoc.cxx | 2 + src/XmlMXCAFDoc/XmlMXCAFDoc.hxx | 2 + .../XmlMXCAFDoc_LengthUnitDriver.cxx | 98 ++++ .../XmlMXCAFDoc_LengthUnitDriver.hxx | 54 ++ tests/bugs/xde/bug22962 | 2 +- tests/bugs/xde/bug31382 | 81 +++ tests/de/begin | 3 + tests/de/end | 31 +- tests/de/iges_1/A2 | 5 +- tests/de/iges_1/B4 | 9 +- tests/de/iges_1/M9 | 5 +- tests/de/iges_2/H1 | 9 +- tests/de/step_1/E4 | 5 +- tests/de/step_1/J5 | 5 +- tests/de/step_1/O7 | 3 + tests/de/step_2/A3 | 7 +- tests/de/step_2/M3 | 5 +- tests/de/step_2/Q2 | 7 +- tests/de/step_2/X1 | 5 +- tests/de/step_3/A5 | 7 +- tests/de/step_3/F2 | 9 +- tests/de/step_4/A5 | 5 +- tests/de/step_4/C9 | 7 +- tests/de/step_4/E3 | 7 +- tests/de/step_4/G6 | 12 +- tests/de/step_5/B2 | 7 +- tests/de_mesh/gltf_write/helmet | 18 +- tests/de_mesh/obj_read/ship_boat | 9 +- tests/de_mesh/obj_write/mustang | 18 +- 106 files changed, 2234 insertions(+), 638 deletions(-) create mode 100644 src/BinMXCAFDoc/BinMXCAFDoc_LengthUnitDriver.cxx create mode 100644 src/BinMXCAFDoc/BinMXCAFDoc_LengthUnitDriver.hxx create mode 100644 src/GeomConvert/GeomConvert_Units.cxx create mode 100644 src/GeomConvert/GeomConvert_Units.hxx create mode 100644 src/StepData/StepData_GlobalFactors.cxx create mode 100644 src/StepData/StepData_GlobalFactors.hxx create mode 100644 src/UnitsMethods/UnitsMethods_LengthUnit.hxx create mode 100644 src/XCAFDoc/XCAFDoc_LengthUnit.cxx create mode 100644 src/XCAFDoc/XCAFDoc_LengthUnit.hxx create mode 100644 src/XmlMXCAFDoc/XmlMXCAFDoc_LengthUnitDriver.cxx create mode 100644 src/XmlMXCAFDoc/XmlMXCAFDoc_LengthUnitDriver.hxx create mode 100644 tests/bugs/xde/bug31382 diff --git a/src/AIS/AIS_Plane.cxx b/src/AIS/AIS_Plane.cxx index fc1ac42b30..0a754b371c 100644 --- a/src/AIS/AIS_Plane.cxx +++ b/src/AIS/AIS_Plane.cxx @@ -50,7 +50,6 @@ #include #include #include -#include IMPLEMENT_STANDARD_RTTIEXT(AIS_Plane,AIS_InteractiveObject) diff --git a/src/BinMXCAFDoc/BinMXCAFDoc.cxx b/src/BinMXCAFDoc/BinMXCAFDoc.cxx index 3a2bac5218..df49106583 100644 --- a/src/BinMXCAFDoc/BinMXCAFDoc.cxx +++ b/src/BinMXCAFDoc/BinMXCAFDoc.cxx @@ -23,6 +23,7 @@ #include #include #include +#include #include #include #include @@ -57,6 +58,7 @@ void BinMXCAFDoc::AddDrivers(const Handle(BinMDF_ADriverTable)& theDriverTable, } theDriverTable->AddDriver( aLocationDriver); + theDriverTable->AddDriver(new BinMXCAFDoc_LengthUnitDriver (theMsgDrv)); theDriverTable->AddDriver( new BinMXCAFDoc_AssemblyItemRefDriver(theMsgDrv)); theDriverTable->AddDriver( new BinMXCAFDoc_DatumDriver (theMsgDrv)); theDriverTable->AddDriver( new BinMXCAFDoc_DimTolDriver (theMsgDrv)); diff --git a/src/BinMXCAFDoc/BinMXCAFDoc.hxx b/src/BinMXCAFDoc/BinMXCAFDoc.hxx index 503c243da9..c72f85330f 100644 --- a/src/BinMXCAFDoc/BinMXCAFDoc.hxx +++ b/src/BinMXCAFDoc/BinMXCAFDoc.hxx @@ -25,6 +25,7 @@ class Message_Messenger; class BinMXCAFDoc_CentroidDriver; class BinMXCAFDoc_ColorDriver; class BinMXCAFDoc_GraphNodeDriver; +class BinMXCAFDoc_LengthUnitDriver; class BinMXCAFDoc_LocationDriver; class BinMXCAFDoc_DatumDriver; class BinMXCAFDoc_DimTolDriver; @@ -59,6 +60,7 @@ private: friend class BinMXCAFDoc_CentroidDriver; friend class BinMXCAFDoc_ColorDriver; friend class BinMXCAFDoc_GraphNodeDriver; +friend class BinMXCAFDoc_LengthUnitDriver; friend class BinMXCAFDoc_LocationDriver; friend class BinMXCAFDoc_DatumDriver; friend class BinMXCAFDoc_DimTolDriver; diff --git a/src/BinMXCAFDoc/BinMXCAFDoc_LengthUnitDriver.cxx b/src/BinMXCAFDoc/BinMXCAFDoc_LengthUnitDriver.cxx new file mode 100644 index 0000000000..cff14817ad --- /dev/null +++ b/src/BinMXCAFDoc/BinMXCAFDoc_LengthUnitDriver.cxx @@ -0,0 +1,69 @@ +// Copyright (c) 2021 OPEN CASCADE SAS +// +// This file is part of Open CASCADE Technology software library. +// +// This library is free software; you can redistribute it and/or modify it under +// the terms of the GNU Lesser General Public License version 2.1 as published +// by the Free Software Foundation, with special exception defined in the file +// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT +// distribution for complete text of the license and disclaimer of any warranty. +// +// Alternatively, this file may be used under the terms of Open CASCADE +// commercial license or contractual agreement. + +#include +#include +#include +#include +#include +#include + +IMPLEMENT_STANDARD_RTTIEXT(BinMXCAFDoc_LengthUnitDriver, BinMDF_ADriver) + +//======================================================================= +//function : BinMXCAFDoc_LengthUnitDriver +//purpose : Constructor +//======================================================================= +BinMXCAFDoc_LengthUnitDriver::BinMXCAFDoc_LengthUnitDriver(const Handle(Message_Messenger)& theMsgDriver) + : BinMDF_ADriver(theMsgDriver, STANDARD_TYPE(XCAFDoc_LengthUnit)->Name()) { +} + +//======================================================================= +//function : NewEmpty +//purpose : +//======================================================================= +Handle(TDF_Attribute) BinMXCAFDoc_LengthUnitDriver::NewEmpty() const { + return new XCAFDoc_LengthUnit(); +} + +//======================================================================= +//function : Paste +//purpose : +//======================================================================= +Standard_Boolean BinMXCAFDoc_LengthUnitDriver::Paste(const BinObjMgt_Persistent& theSource, + const Handle(TDF_Attribute)& theTarget, + BinObjMgt_RRelocationTable& theRelocTable) const +{ + (void)theRelocTable; + Handle(XCAFDoc_LengthUnit) anAtt = Handle(XCAFDoc_LengthUnit)::DownCast(theTarget); + TCollection_AsciiString aName; + Standard_Real aScaleFactor = 1.; + Standard_Boolean isOk = theSource >> aName >> aScaleFactor; + if(isOk) { + anAtt->Set(aName, aScaleFactor); + } + return isOk; +} + +//======================================================================= +//function : Paste +//purpose : +//======================================================================= +void BinMXCAFDoc_LengthUnitDriver::Paste(const Handle(TDF_Attribute)& theSource, + BinObjMgt_Persistent& theTarget, + BinObjMgt_SRelocationTable& theRelocTable) const +{ + (void)theRelocTable; + Handle(XCAFDoc_LengthUnit) anAtt = Handle(XCAFDoc_LengthUnit)::DownCast(theSource); + theTarget << anAtt->GetUnitName() << anAtt->GetUnitValue(); +} diff --git a/src/BinMXCAFDoc/BinMXCAFDoc_LengthUnitDriver.hxx b/src/BinMXCAFDoc/BinMXCAFDoc_LengthUnitDriver.hxx new file mode 100644 index 0000000000..9f1bd4d6b7 --- /dev/null +++ b/src/BinMXCAFDoc/BinMXCAFDoc_LengthUnitDriver.hxx @@ -0,0 +1,54 @@ +// Copyright (c) 2021 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 _BinMXCAFDoc_LengthUnitDriver_HeaderFile +#define _BinMXCAFDoc_LengthUnitDriver_HeaderFile + +#include +#include + +#include +#include +#include +#include +class Message_Messenger; +class TDF_Attribute; +class BinObjMgt_Persistent; + + +class BinMXCAFDoc_LengthUnitDriver; +DEFINE_STANDARD_HANDLE(BinMXCAFDoc_LengthUnitDriver, BinMDF_ADriver) + +//! Attribute Driver. +class BinMXCAFDoc_LengthUnitDriver : public BinMDF_ADriver +{ + +public: + + Standard_EXPORT BinMXCAFDoc_LengthUnitDriver(const Handle(Message_Messenger)& theMsgDriver); + + Standard_EXPORT virtual Handle(TDF_Attribute) NewEmpty() const Standard_OVERRIDE; + + Standard_EXPORT virtual Standard_Boolean Paste(const BinObjMgt_Persistent& theSource, + const Handle(TDF_Attribute)& theTarget, + BinObjMgt_RRelocationTable& theRelocTable) const Standard_OVERRIDE; + + Standard_EXPORT virtual void Paste(const Handle(TDF_Attribute)& theSource, + BinObjMgt_Persistent& theTarget, + BinObjMgt_SRelocationTable& theRelocTable) const Standard_OVERRIDE; + + DEFINE_STANDARD_RTTIEXT(BinMXCAFDoc_LengthUnitDriver, BinMDF_ADriver) + +}; + +#endif // _BinMXCAFDoc_LengthUnitDriver_HeaderFile diff --git a/src/BinMXCAFDoc/FILES b/src/BinMXCAFDoc/FILES index 93026d7d16..19026ccd2c 100644 --- a/src/BinMXCAFDoc/FILES +++ b/src/BinMXCAFDoc/FILES @@ -12,6 +12,8 @@ BinMXCAFDoc_DimTolDriver.cxx BinMXCAFDoc_DimTolDriver.hxx BinMXCAFDoc_GraphNodeDriver.cxx BinMXCAFDoc_GraphNodeDriver.hxx +BinMXCAFDoc_LengthUnitDriver.cxx +BinMXCAFDoc_LengthUnitDriver.hxx BinMXCAFDoc_LocationDriver.cxx BinMXCAFDoc_LocationDriver.hxx BinMXCAFDoc_MaterialDriver.cxx diff --git a/src/GeomConvert/FILES b/src/GeomConvert/FILES index 0c583e2fa7..029d1cb1a2 100755 --- a/src/GeomConvert/FILES +++ b/src/GeomConvert/FILES @@ -18,3 +18,5 @@ GeomConvert_CompBezierSurfacesToBSplineSurface.hxx GeomConvert_CompBezierSurfacesToBSplineSurface.lxx GeomConvert_CompCurveToBSplineCurve.cxx GeomConvert_CompCurveToBSplineCurve.hxx +GeomConvert_Units.cxx +GeomConvert_Units.hxx diff --git a/src/GeomConvert/GeomConvert_Units.cxx b/src/GeomConvert/GeomConvert_Units.cxx new file mode 100644 index 0000000000..a36ddcbb3f --- /dev/null +++ b/src/GeomConvert/GeomConvert_Units.cxx @@ -0,0 +1,317 @@ +// Copyright (c) 2021 OPEN CASCADE SAS +// +// This file is part of Open CASCADE Technology software library. +// +// This library is free software; you can redistribute it and/or modify it under +// the terms of the GNU Lesser General Public License version 2.1 as published +// by the Free Software Foundation, with special exception defined in the file +// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT +// distribution for complete text of the license and disclaimer of any warranty. +// +// Alternatively, this file may be used under the terms of Open CASCADE +// commercial license or contractual agreement. + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +// ============================================================================ +// Method : RadianToDegree +// Purpose: +// ============================================================================ +Handle(Geom2d_Curve) GeomConvert_Units::RadianToDegree( + const Handle(Geom2d_Curve) & theCurve2d, + const Handle(Geom_Surface) & theSurf, + const Standard_Real theLengthFactor, + const Standard_Real theFactorRadianDegree) +{ + Handle(Geom2d_Curve) aCurve2d = Handle(Geom2d_Curve)::DownCast(theCurve2d->Copy()); + Standard_Real uFact = 1.; + Standard_Real vFact = 1.; + Standard_Real LengthFact = 1. / theLengthFactor; + Standard_Real AngleFact = theFactorRadianDegree; // 180./PI; pilotable + + gp_Pnt2d Pt1; + gp_XY pXY; + gp_GTrsf2d tMatu, tMatv; + + // theSurf is a CylindricalSurface or a ConicalSurface or + // a ToroidalSurface or a SphericalSurface or + // a SurfaceOfRevolution + if (theSurf->IsKind(STANDARD_TYPE(Geom_SphericalSurface)) || theSurf->IsKind(STANDARD_TYPE(Geom_ToroidalSurface))) + { + uFact = vFact = AngleFact; + } + else if (theSurf->IsKind(STANDARD_TYPE(Geom_CylindricalSurface))) + { + uFact = AngleFact; + vFact = LengthFact; + } + else if (theSurf->IsKind(STANDARD_TYPE(Geom_SurfaceOfRevolution))) + { + uFact = AngleFact; + } + else if (theSurf->IsKind(STANDARD_TYPE(Geom_ConicalSurface))) + { + Handle(Geom_ConicalSurface) conicS = Handle(Geom_ConicalSurface)::DownCast(theSurf); + Standard_Real semAng = conicS->SemiAngle(); + uFact = AngleFact; + vFact = LengthFact * Cos(semAng); + } + else if (theSurf->IsKind(STANDARD_TYPE(Geom_Plane))) + { + uFact = vFact = LengthFact; + if (aCurve2d->IsKind(STANDARD_TYPE(Geom2d_Circle)) || aCurve2d->IsKind(STANDARD_TYPE(Geom2d_Ellipse))) + { + gp_Trsf2d aT; + aT.SetScale(gp::Origin2d(), LengthFact); + aCurve2d->Transform(aT); + return aCurve2d; + } + } + else { + return aCurve2d; + } + + if (aCurve2d->IsKind(STANDARD_TYPE(Geom2d_Line))) + { + Handle(Geom2d_Line) aLine2d = Handle(Geom2d_Line)::DownCast(aCurve2d); + gp_Pnt2d myLoc = aLine2d->Location(); + gp_Dir2d myDir = aLine2d->Direction(); + gp_Pnt2d myNewLoc; + myNewLoc.SetCoord(myLoc.X()*uFact, myLoc.Y()*vFact); + gp_Dir2d myNewDir; + myNewDir.SetCoord(myDir.X()*uFact, myDir.Y()*vFact); + Handle(Geom2d_Line) myNewLine2d = Handle(Geom2d_Line)::DownCast(aLine2d->Copy()); + myNewLine2d->SetLocation(myNewLoc); + myNewLine2d->SetDirection(myNewDir); + return myNewLine2d; + } + else if (aCurve2d->IsKind(STANDARD_TYPE(Geom2d_Conic))) + { + if (aCurve2d->IsKind(STANDARD_TYPE(Geom2d_Circle)) || aCurve2d->IsKind(STANDARD_TYPE(Geom2d_Ellipse))) + { + Handle(Geom2d_BSplineCurve) aBSpline2d = Geom2dConvert::CurveToBSplineCurve(aCurve2d); + aCurve2d = aBSpline2d; + } + else if (aCurve2d->IsKind(STANDARD_TYPE(Geom2d_Parabola))) + { +#ifdef OCCT_DEBUG + std::cout << "PCURVE of Parabola type in U or V Periodic Surface" << std::endl; + std::cout << "Parameters Not transformed to Degree" << std::endl; +#endif + } + else if (aCurve2d->IsKind(STANDARD_TYPE(Geom2d_Hyperbola))) + { +#ifdef OCCT_DEBUG + std::cout << "PCURVE of Hyperbola type in U or V Periodic Surface" << std::endl; + std::cout << "Parameters Not transformed to Degree" << std::endl; +#endif + } + } + + // Compute affinity + tMatu.SetAffinity(gp::OY2d(), uFact); + tMatv.SetAffinity(gp::OX2d(), vFact); + if (aCurve2d->IsKind(STANDARD_TYPE(Geom2d_BoundedCurve))) + { + if (aCurve2d->IsKind(STANDARD_TYPE(Geom2d_BSplineCurve))) + { + Handle(Geom2d_BSplineCurve) aBSpline2d = + Handle(Geom2d_BSplineCurve)::DownCast(aCurve2d); + Handle(Geom2d_BSplineCurve) myNewBSpline2d = + Handle(Geom2d_BSplineCurve)::DownCast(aBSpline2d->Copy()); + Standard_Integer nbPol = aBSpline2d->NbPoles(); + for (Standard_Integer i = 1; i <= nbPol; i++) + { + pXY = aBSpline2d->Pole(i).XY(); + tMatu.Transforms(pXY); + tMatv.Transforms(pXY); + Pt1.SetXY(pXY); + myNewBSpline2d->SetPole(i, Pt1); + } + return myNewBSpline2d; + } + else { +#ifdef OCCT_DEBUG + std::cout << "PCURVE of Other Types of Bounded Curve in U or V Periodic Surface" << std::endl; + std::cout << "Parameters Not transformed to Degree" << std::endl; +#endif + } + } + return aCurve2d; +} + +// ============================================================================ +// Method : DegreeToRadian +// Purpose: 1. Change definition of the pcurves according to LengthFactor +// 2. STEP cylinder, torus, cone and sphere are parametrized +// from 0 to 360 degree +// Then pcurves parameter have to be transformed +// from DEGREE to RADIAN +// ============================================================================ +Handle(Geom2d_Curve) GeomConvert_Units::DegreeToRadian( + const Handle(Geom2d_Curve) & thePcurve, + const Handle(Geom_Surface) & theSurface, + const Standard_Real theLengthFactor, + const Standard_Real theFactorRadianDegree) +{ + Handle(Geom2d_Curve) aPcurve = Handle(Geom2d_Curve)::DownCast(thePcurve->Copy()); + Standard_Real uFact = 1.; + Standard_Real vFact = 1.; + Standard_Real LengthFact = theLengthFactor; + Standard_Real AngleFact = theFactorRadianDegree; // PI/180.; pilotable + + gp_Pnt2d Pt1; + gp_XY pXY; + gp_GTrsf2d tMatu, tMatv; + + // What to change ?? + + if (theSurface->IsKind(STANDARD_TYPE(Geom_SphericalSurface)) || + theSurface->IsKind(STANDARD_TYPE(Geom_ToroidalSurface))) + { + uFact = vFact = AngleFact; + } + else if (theSurface->IsKind(STANDARD_TYPE(Geom_CylindricalSurface))) + { + uFact = AngleFact; + vFact = LengthFact; + } + else if (theSurface->IsKind(STANDARD_TYPE(Geom_SurfaceOfRevolution))) + { + uFact = AngleFact; + } + else if (theSurface->IsKind(STANDARD_TYPE(Geom_ConicalSurface))) + { + Handle(Geom_ConicalSurface) conicS = Handle(Geom_ConicalSurface)::DownCast(theSurface); + Standard_Real semAng = conicS->SemiAngle(); + uFact = AngleFact; + vFact = LengthFact / Cos(semAng); + } + else if (theSurface->IsKind(STANDARD_TYPE(Geom_Plane))) + { + uFact = vFact = LengthFact; + if (aPcurve->IsKind(STANDARD_TYPE(Geom2d_Circle)) || aPcurve->IsKind(STANDARD_TYPE(Geom2d_Ellipse))) + { + gp_Trsf2d aT; + aT.SetScale(gp::Origin2d(), LengthFact); + aPcurve->Transform(aT); + return aPcurve; + } + } + else + { + return aPcurve; + } + + if (aPcurve->IsKind(STANDARD_TYPE(Geom2d_Conic))) + { + if (aPcurve->IsKind(STANDARD_TYPE(Geom2d_Circle)) || aPcurve->IsKind(STANDARD_TYPE(Geom2d_Ellipse))) + { + Handle(Geom2d_BSplineCurve) aBSpline2d = Geom2dConvert::CurveToBSplineCurve(aPcurve); + aPcurve = aBSpline2d; + } + else if (aPcurve->IsKind(STANDARD_TYPE(Geom2d_Parabola))) + { +#ifdef OCCT_DEBUG + std::cout << "PCURVE of Parabola type" << std::endl; + std::cout << "Parameters Not Yet transformed according to LengthUnit" << std::endl; +#endif + return aPcurve; + } + else if (aPcurve->IsKind(STANDARD_TYPE(Geom2d_Hyperbola))) + { +#ifdef OCCT_DEBUG + std::cout << "PCURVE of Hyperbola type" << std::endl; + std::cout << "Parameters Not Yet transformed according to LengthUnit" << std::endl; +#endif + return aPcurve; + } + } + + // Compute affinity + + tMatu.SetAffinity(gp::OY2d(), uFact); + tMatv.SetAffinity(gp::OX2d(), vFact); + + if (aPcurve->IsKind(STANDARD_TYPE(Geom2d_Line))) + { + Handle(Geom2d_Line) aLine2d = Handle(Geom2d_Line)::DownCast(aPcurve); + + gp_Pnt2d myLoc = aLine2d->Location(); + gp_Dir2d myDir = aLine2d->Direction(); + + gp_Pnt2d myNewLoc; + myNewLoc.SetCoord(myLoc.X()*uFact, myLoc.Y()*vFact); + + gp_Dir2d myNewDir; + myNewDir.SetCoord(myDir.X()*uFact, myDir.Y()*vFact); + + aLine2d->SetLocation(myNewLoc); + aLine2d->SetDirection(myNewDir); + + aPcurve = aLine2d; + } + else if (aPcurve->IsKind(STANDARD_TYPE(Geom2d_BSplineCurve))) + { + Handle(Geom2d_BSplineCurve) aBSpline2d = Handle(Geom2d_BSplineCurve)::DownCast(aPcurve); + + // transform the Poles of the BSplineCurve according to AngleFact and LengthFact + + Standard_Integer nbPol = aBSpline2d->NbPoles(); + for (Standard_Integer i = 1; i <= nbPol; i++) + { + pXY = aBSpline2d->Pole(i).XY(); + tMatu.Transforms(pXY); + tMatv.Transforms(pXY); + Pt1.SetXY(pXY); + aBSpline2d->SetPole(i, Pt1); + } + aPcurve = aBSpline2d; + } + else + { +#ifdef OCCT_DEBUG + std::cout << "DegreeToRadian : Type " << aPcurve->DynamicType(); + std::cout << " not yet implemented" << std::endl; +#endif + } + return aPcurve; +} + +// ============================================================================ +// Method : MirrorPCurve +// Purpose: +// ============================================================================ +Handle(Geom2d_Curve) GeomConvert_Units::MirrorPCurve(const Handle(Geom2d_Curve) & theCurve) +{ + Handle(Geom2d_Curve) theMirrored = Handle(Geom2d_Curve)::DownCast(theCurve->Copy()); + gp_Trsf2d T; + gp_Pnt2d Loc(0., 0.); + gp_Dir2d Dir(1., 0.); + gp_Ax2d ax2(Loc, Dir); + T.SetMirror(ax2); + theMirrored->Transform(T); + return theMirrored; +} diff --git a/src/GeomConvert/GeomConvert_Units.hxx b/src/GeomConvert/GeomConvert_Units.hxx new file mode 100644 index 0000000000..49e72967e4 --- /dev/null +++ b/src/GeomConvert/GeomConvert_Units.hxx @@ -0,0 +1,48 @@ +// Copyright (c) 2021 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 _GeomConvert_Units_HeaderFile +#define _GeomConvert_Units_HeaderFile + +#include +#include +class Geom2d_Curve; +class Geom_Surface; + +//! Class contains conversion methods for 2d geom objects +class GeomConvert_Units +{ +public: + + DEFINE_STANDARD_ALLOC + + //! Convert 2d curve for change angle unit from radian to degree + Standard_EXPORT static Handle(Geom2d_Curve) RadianToDegree( + const Handle(Geom2d_Curve)& theCurve, + const Handle(Geom_Surface)& theSurface, + const Standard_Real theLengthFactor, + const Standard_Real theFactorRadianDegree); + + //! Convert 2d curve for change angle unit from degree to radian + Standard_EXPORT static Handle(Geom2d_Curve) DegreeToRadian( + const Handle(Geom2d_Curve)& theCurve, + const Handle(Geom_Surface)& theSurface, + const Standard_Real theLengthFactor, + const Standard_Real theFactorRadianDegree); + + //! return 2d curve as 'mirror' for given + Standard_EXPORT static Handle(Geom2d_Curve) MirrorPCurve(const Handle(Geom2d_Curve)& theCurve); + +}; + +#endif // _GeomConvert_Units_HeaderFile diff --git a/src/GeomToStep/GeomToStep_MakeCartesianPoint.cxx b/src/GeomToStep/GeomToStep_MakeCartesianPoint.cxx index b6a34ee0a9..10f3f949c6 100644 --- a/src/GeomToStep/GeomToStep_MakeCartesianPoint.cxx +++ b/src/GeomToStep/GeomToStep_MakeCartesianPoint.cxx @@ -21,10 +21,10 @@ #include #include #include +#include #include #include #include -#include //============================================================================= // Creation d' un cartesian_point de prostep a partir d' un point3d de gp @@ -42,7 +42,7 @@ GeomToStep_MakeCartesianPoint::GeomToStep_MakeCartesianPoint( const gp_Pnt& P) // Pstep->SetCoordinates(Acoord); Handle(TCollection_HAsciiString) name = new TCollection_HAsciiString(""); // Pstep->SetName(name); - Standard_Real fact = UnitsMethods::LengthFactor(); + Standard_Real fact = StepData_GlobalFactors::Intance().LengthFactor(); Pstep->Init3D (name,X/fact,Y/fact,Z/fact); theCartesianPoint = Pstep; done = Standard_True; @@ -87,7 +87,7 @@ GeomToStep_MakeCartesianPoint:: // Pstep->SetCoordinates(Acoord); Handle(TCollection_HAsciiString) name = new TCollection_HAsciiString(""); // Pstep->SetName(name); - Standard_Real fact = UnitsMethods::LengthFactor(); + Standard_Real fact = StepData_GlobalFactors::Intance().LengthFactor(); Pstep->Init3D (name,X/fact,Y/fact,Z/fact); theCartesianPoint = Pstep; done = Standard_True; diff --git a/src/GeomToStep/GeomToStep_MakeCircle.cxx b/src/GeomToStep/GeomToStep_MakeCircle.cxx index fbd842f39b..d76adaf3a2 100644 --- a/src/GeomToStep/GeomToStep_MakeCircle.cxx +++ b/src/GeomToStep/GeomToStep_MakeCircle.cxx @@ -23,11 +23,11 @@ #include #include #include +#include #include #include #include #include -#include //============================================================================= // Creation d' un cercle de prostep a partir d' un cercle 3d de gp diff --git a/src/GeomToStep/GeomToStep_MakeCircle_gen.pxx b/src/GeomToStep/GeomToStep_MakeCircle_gen.pxx index a067669c6d..5c22197f28 100644 --- a/src/GeomToStep/GeomToStep_MakeCircle_gen.pxx +++ b/src/GeomToStep/GeomToStep_MakeCircle_gen.pxx @@ -24,7 +24,7 @@ Handle(StepGeom_Circle) CStep = new StepGeom_Circle; Rayon = C.Radius(); Ax2.SetValue(Ax2Step); Handle(TCollection_HAsciiString) name = new TCollection_HAsciiString(""); - CStep->Init(name, Ax2, Rayon / UnitsMethods::LengthFactor()); + CStep->Init(name, Ax2, Rayon / StepData_GlobalFactors::Intance().LengthFactor()); theCircle = CStep; done = Standard_True; diff --git a/src/GeomToStep/GeomToStep_MakeConicalSurface.cxx b/src/GeomToStep/GeomToStep_MakeConicalSurface.cxx index 5f006cf7ce..a8c42bffaf 100644 --- a/src/GeomToStep/GeomToStep_MakeConicalSurface.cxx +++ b/src/GeomToStep/GeomToStep_MakeConicalSurface.cxx @@ -20,10 +20,10 @@ #include #include #include +#include #include #include #include -#include //============================================================================= // Creation d' une conical_surface de prostep a partir d' une ConicalSurface @@ -46,7 +46,7 @@ GeomToStep_MakeConicalSurface::GeomToStep_MakeConicalSurface } Handle(TCollection_HAsciiString) name = new TCollection_HAsciiString(""); - CSstep->Init(name, aPosition, aRadius / UnitsMethods::LengthFactor(), aSemiAngle); + CSstep->Init(name, aPosition, aRadius / StepData_GlobalFactors::Intance().LengthFactor(), aSemiAngle); theConicalSurface = CSstep; done = Standard_True; } diff --git a/src/GeomToStep/GeomToStep_MakeCylindricalSurface.cxx b/src/GeomToStep/GeomToStep_MakeCylindricalSurface.cxx index df3c1a27a6..08c4fb0b88 100644 --- a/src/GeomToStep/GeomToStep_MakeCylindricalSurface.cxx +++ b/src/GeomToStep/GeomToStep_MakeCylindricalSurface.cxx @@ -19,10 +19,10 @@ #include #include #include +#include #include #include #include -#include //============================================================================= // Creation d' une conical_surface de prostep a partir d' une @@ -41,7 +41,7 @@ GeomToStep_MakeCylindricalSurface::GeomToStep_MakeCylindricalSurface aRadius = CS->Radius(); CSstep = new StepGeom_CylindricalSurface; Handle(TCollection_HAsciiString) name = new TCollection_HAsciiString(""); - CSstep->Init(name, aPosition, aRadius / UnitsMethods::LengthFactor()); + CSstep->Init(name, aPosition, aRadius / StepData_GlobalFactors::Intance().LengthFactor()); theCylindricalSurface = CSstep; done = Standard_True; } diff --git a/src/GeomToStep/GeomToStep_MakeEllipse.cxx b/src/GeomToStep/GeomToStep_MakeEllipse.cxx index 93441211a3..34794facf8 100644 --- a/src/GeomToStep/GeomToStep_MakeEllipse.cxx +++ b/src/GeomToStep/GeomToStep_MakeEllipse.cxx @@ -23,11 +23,11 @@ #include #include #include +#include #include #include #include #include -#include //============================================================================= // Creation d'une ellipse de prostep a partir d'une ellipse 3d de gp diff --git a/src/GeomToStep/GeomToStep_MakeEllipse_gen.pxx b/src/GeomToStep/GeomToStep_MakeEllipse_gen.pxx index 883e58ebc2..38adf96e8a 100644 --- a/src/GeomToStep/GeomToStep_MakeEllipse_gen.pxx +++ b/src/GeomToStep/GeomToStep_MakeEllipse_gen.pxx @@ -25,7 +25,7 @@ Handle(StepGeom_Ellipse) EStep = new StepGeom_Ellipse; minorR = E.MinorRadius(); Ax2.SetValue(Ax2Step); Handle(TCollection_HAsciiString) name = new TCollection_HAsciiString(""); - Standard_Real fact = UnitsMethods::LengthFactor(); + Standard_Real fact = StepData_GlobalFactors::Intance().LengthFactor(); EStep->Init(name, Ax2,majorR/fact,minorR/fact); theEllipse = EStep; done = Standard_True; diff --git a/src/GeomToStep/GeomToStep_MakeHyperbola.cxx b/src/GeomToStep/GeomToStep_MakeHyperbola.cxx index e5a431ab8c..b0247d8a13 100644 --- a/src/GeomToStep/GeomToStep_MakeHyperbola.cxx +++ b/src/GeomToStep/GeomToStep_MakeHyperbola.cxx @@ -20,11 +20,11 @@ #include #include #include +#include #include #include #include #include -#include //============================================================================= // Creation d'une hyperbola de prostep a partir d'une hyperbola de @@ -72,7 +72,7 @@ GeomToStep_MakeHyperbola::GeomToStep_MakeHyperbola(const Handle(Geom2d_Hyperbola minorR = gpHyp.MinorRadius(); Ax2.SetValue(Ax2Step); Handle(TCollection_HAsciiString) name = new TCollection_HAsciiString(""); - Standard_Real fact = UnitsMethods::LengthFactor(); + Standard_Real fact = StepData_GlobalFactors::Intance().LengthFactor(); HStep->Init(name, Ax2,majorR/fact,minorR/fact); theHyperbola = HStep; done = Standard_True; diff --git a/src/GeomToStep/GeomToStep_MakeParabola.cxx b/src/GeomToStep/GeomToStep_MakeParabola.cxx index a1053d035d..3650201603 100644 --- a/src/GeomToStep/GeomToStep_MakeParabola.cxx +++ b/src/GeomToStep/GeomToStep_MakeParabola.cxx @@ -20,11 +20,11 @@ #include #include #include +#include #include #include #include #include -#include //============================================================================= // Creation d'une Parabola de prostep a partir d'une Parabola de @@ -70,7 +70,7 @@ GeomToStep_MakeParabola::GeomToStep_MakeParabola(const Handle(Geom2d_Parabola)& focal = gpPar.Focal(); Ax2.SetValue(Ax2Step); Handle(TCollection_HAsciiString) name = new TCollection_HAsciiString(""); - PStep->Init(name, Ax2, focal / UnitsMethods::LengthFactor()); + PStep->Init(name, Ax2, focal / StepData_GlobalFactors::Intance().LengthFactor()); theParabola = PStep; done = Standard_True; } diff --git a/src/GeomToStep/GeomToStep_MakeRectangularTrimmedSurface.cxx b/src/GeomToStep/GeomToStep_MakeRectangularTrimmedSurface.cxx index 2f708a2b13..9d7bca0230 100644 --- a/src/GeomToStep/GeomToStep_MakeRectangularTrimmedSurface.cxx +++ b/src/GeomToStep/GeomToStep_MakeRectangularTrimmedSurface.cxx @@ -25,10 +25,10 @@ #include #include #include +#include #include #include #include -#include //============================================================================= // Creation d' une rectangular_trimmed_surface de STEP @@ -61,7 +61,7 @@ GeomToStep_MakeRectangularTrimmedSurface:: Standard_Real AngleFact = 180./M_PI; Standard_Real uFact = 1.; Standard_Real vFact = 1.; - Standard_Real LengthFact = UnitsMethods::LengthFactor(); + Standard_Real LengthFact = StepData_GlobalFactors::Intance().LengthFactor(); Handle(Geom_Surface) theSurf = RTSurf->BasisSurface(); if (theSurf->IsKind(STANDARD_TYPE(Geom_CylindricalSurface))) { uFact = AngleFact; diff --git a/src/GeomToStep/GeomToStep_MakeSphericalSurface.cxx b/src/GeomToStep/GeomToStep_MakeSphericalSurface.cxx index d1bcc2643d..404b5e4b39 100644 --- a/src/GeomToStep/GeomToStep_MakeSphericalSurface.cxx +++ b/src/GeomToStep/GeomToStep_MakeSphericalSurface.cxx @@ -22,7 +22,7 @@ #include #include #include -#include +#include //============================================================================= // Creation d' une conical_surface de prostep a partir d' une SphericalSurface @@ -41,7 +41,7 @@ GeomToStep_MakeSphericalSurface::GeomToStep_MakeSphericalSurface aRadius = S->Radius(); Surf = new StepGeom_SphericalSurface; Handle(TCollection_HAsciiString) name = new TCollection_HAsciiString(""); - Surf->Init(name, aPosition, aRadius/UnitsMethods::LengthFactor()); + Surf->Init(name, aPosition, aRadius/ StepData_GlobalFactors::Intance().LengthFactor()); theSphericalSurface = Surf; done = Standard_True; } diff --git a/src/GeomToStep/GeomToStep_MakeSurface.cxx b/src/GeomToStep/GeomToStep_MakeSurface.cxx index 5400de3e7d..30477d77f6 100644 --- a/src/GeomToStep/GeomToStep_MakeSurface.cxx +++ b/src/GeomToStep/GeomToStep_MakeSurface.cxx @@ -32,7 +32,7 @@ #include #include #include -#include +#include //============================================================================= // Creation d' une Surface de prostep a partir d' une Surface de Geom @@ -66,7 +66,7 @@ GeomToStep_MakeSurface::GeomToStep_MakeSurface ( const Handle(Geom_Surface)& S) if (!done) return; Handle(StepGeom_OffsetSurface) Surf = new StepGeom_OffsetSurface; Surf->Init (new TCollection_HAsciiString(""), - MkBasis.Value(),S1->Offset()/UnitsMethods::LengthFactor(),StepData_LFalse); + MkBasis.Value(),S1->Offset()/ StepData_GlobalFactors::Intance().LengthFactor(),StepData_LFalse); theSurface = Surf; } else { diff --git a/src/GeomToStep/GeomToStep_MakeToroidalSurface.cxx b/src/GeomToStep/GeomToStep_MakeToroidalSurface.cxx index 8809d9ed7a..08d6466e98 100644 --- a/src/GeomToStep/GeomToStep_MakeToroidalSurface.cxx +++ b/src/GeomToStep/GeomToStep_MakeToroidalSurface.cxx @@ -21,7 +21,7 @@ #include #include #include -#include +#include //============================================================================= // Creation d' une toroidal_surface de prostep a partir d' une ToroidalSurface @@ -41,7 +41,7 @@ GeomToStep_MakeToroidalSurface::GeomToStep_MakeToroidalSurface aMinorRadius = S->MinorRadius(); Surf = new StepGeom_ToroidalSurface; Handle(TCollection_HAsciiString) name = new TCollection_HAsciiString(""); - Standard_Real fact = UnitsMethods::LengthFactor(); + Standard_Real fact = StepData_GlobalFactors::Intance().LengthFactor(); Surf->Init(name, aPosition, aMajorRadius/fact, aMinorRadius/fact); theToroidalSurface = Surf; done = Standard_True; diff --git a/src/GeomToStep/GeomToStep_MakeVector.cxx b/src/GeomToStep/GeomToStep_MakeVector.cxx index 6ee9376e8e..85729b167e 100644 --- a/src/GeomToStep/GeomToStep_MakeVector.cxx +++ b/src/GeomToStep/GeomToStep_MakeVector.cxx @@ -24,9 +24,9 @@ #include #include #include +#include #include #include -#include //============================================================================= // Creation d' un vector de prostep a partir d' un Vec de gp @@ -34,7 +34,7 @@ GeomToStep_MakeVector::GeomToStep_MakeVector( const gp_Vec& V) { gp_Dir D = gp_Dir(V); - Standard_Real lFactor = UnitsMethods::LengthFactor(); + Standard_Real lFactor = StepData_GlobalFactors::Intance().LengthFactor(); #include "GeomToStep_MakeVector_gen.pxx" } //============================================================================= @@ -58,7 +58,7 @@ GeomToStep_MakeVector::GeomToStep_MakeVector ( const Handle(Geom_Vector)& gp_Vec V; V = GVector->Vec(); gp_Dir D = gp_Dir(V); - Standard_Real lFactor = UnitsMethods::LengthFactor(); + Standard_Real lFactor = StepData_GlobalFactors::Intance().LengthFactor(); #include "GeomToStep_MakeVector_gen.pxx" } diff --git a/src/IGESCAFControl/IGESCAFControl_Reader.cxx b/src/IGESCAFControl/IGESCAFControl_Reader.cxx index 86e71e6854..649fdfaa80 100644 --- a/src/IGESCAFControl/IGESCAFControl_Reader.cxx +++ b/src/IGESCAFControl/IGESCAFControl_Reader.cxx @@ -19,6 +19,7 @@ #include #include #include +#include #include #include #include @@ -41,8 +42,11 @@ #include #include #include +#include +#include #include #include +#include //======================================================================= //function : checkColorRange @@ -157,6 +161,19 @@ Standard_Boolean IGESCAFControl_Reader::Transfer (Handle(TDocStd_Document) &doc, // TransferOneRoot ( i ); //} + // set units + Handle(IGESData_IGESModel) aModel = Handle(IGESData_IGESModel)::DownCast(WS()->Model()); + + Standard_Real aScaleFactorMM = 1.; + if (!XCAFDoc_DocumentTool::GetLengthUnit(doc, aScaleFactorMM, UnitsMethods_LengthUnit_Millimeter)) + { + XSAlgo::AlgoContainer()->PrepareForTransfer(); // update unit info + aScaleFactorMM = UnitsMethods::GetCasCadeLengthUnit(); + // set length unit to the document + XCAFDoc_DocumentTool::SetLengthUnit(doc, aScaleFactorMM, UnitsMethods_LengthUnit_Millimeter); + } + aModel->ChangeGlobalSection().SetCascadeUnit(aScaleFactorMM); + TransferRoots(theProgress); // replaces the above num = NbShapes(); if ( num <=0 ) return Standard_False; @@ -178,7 +195,6 @@ Standard_Boolean IGESCAFControl_Reader::Transfer (Handle(TDocStd_Document) &doc, } // added by skl 13.10.2003 - const Handle(Interface_InterfaceModel) &Model = WS()->Model(); const Handle(XSControl_TransferReader) &TR = WS()->TransferReader(); const Handle(Transfer_TransientProcess) &TP = TR->TransientProcess(); Standard_Boolean IsCTool = Standard_True; @@ -188,9 +204,9 @@ Standard_Boolean IGESCAFControl_Reader::Transfer (Handle(TDocStd_Document) &doc, Handle(XCAFDoc_LayerTool) LTool = XCAFDoc_DocumentTool::LayerTool(doc->Main()); if(LTool.IsNull()) IsLTool = Standard_False; - Standard_Integer nb = Model->NbEntities(); + Standard_Integer nb = aModel->NbEntities(); for(i=1; i<=nb; i++) { - Handle(IGESData_IGESEntity) ent = Handle(IGESData_IGESEntity)::DownCast ( Model->Value(i) ); + Handle(IGESData_IGESEntity) ent = Handle(IGESData_IGESEntity)::DownCast (aModel->Value(i) ); if ( ent.IsNull() ) continue; Handle(Transfer_Binder) binder = TP->Find ( ent ); if ( binder.IsNull() ) continue; @@ -324,8 +340,6 @@ Standard_Boolean IGESCAFControl_Reader::Transfer (Handle(TDocStd_Document) &doc, CTool->ReverseChainsOfTreeNodes(); - // end added by skl 13.10.2003 - // Update assembly compounds STool->UpdateAssemblies(); diff --git a/src/IGESCAFControl/IGESCAFControl_Writer.cxx b/src/IGESCAFControl/IGESCAFControl_Writer.cxx index 81802e8a22..819420a7a0 100644 --- a/src/IGESCAFControl/IGESCAFControl_Writer.cxx +++ b/src/IGESCAFControl/IGESCAFControl_Writer.cxx @@ -48,10 +48,14 @@ #include #include #include +#include #include #include #include +#include +#include #include +#include namespace { @@ -177,6 +181,7 @@ Standard_Boolean IGESCAFControl_Writer::Transfer (const TDF_LabelSequence& label const Message_ProgressRange& theProgress) { if ( labels.Length() <=0 ) return Standard_False; + prepareUnit(labels.First()); // set local length unit to the model Message_ProgressScope aPS(theProgress, "Labels", labels.Length()); for ( Standard_Integer i=1; i <= labels.Length() && aPS.More(); i++ ) { @@ -561,6 +566,25 @@ Standard_Boolean IGESCAFControl_Writer::WriteNames (const TDF_LabelSequence& the return Standard_True; } +//======================================================================= +//function : prepareUnit +//purpose : +//======================================================================= +void IGESCAFControl_Writer::prepareUnit(const TDF_Label& theLabel) +{ + Handle(XCAFDoc_LengthUnit) aLengthAttr; + if (!theLabel.IsNull() && + theLabel.Root().FindAttribute(XCAFDoc_LengthUnit::GetID(), aLengthAttr)) + { + Model()->ChangeGlobalSection().SetCascadeUnit(aLengthAttr->GetUnitValue() * 1000); + } + else + { + XSAlgo::AlgoContainer()->PrepareForTransfer(); // update unit info + Model()->ChangeGlobalSection().SetCascadeUnit(UnitsMethods::GetCasCadeLengthUnit()); + } +} + //======================================================================= //function : SetColorMode //purpose : diff --git a/src/IGESCAFControl/IGESCAFControl_Writer.hxx b/src/IGESCAFControl/IGESCAFControl_Writer.hxx index 24a953d81d..b5d31f66c0 100644 --- a/src/IGESCAFControl/IGESCAFControl_Writer.hxx +++ b/src/IGESCAFControl/IGESCAFControl_Writer.hxx @@ -124,7 +124,10 @@ protected: //! to IGES entity Standard_EXPORT Standard_Boolean WriteNames (const TDF_LabelSequence& labels); - + //! Finds length units located in root of label + //! If it exists, initializes local length unit from it + //! Else initializes according to Cascade length unit + Standard_EXPORT void prepareUnit(const TDF_Label& theLabel); private: diff --git a/src/IGESData/IGESData_BasicEditor.cxx b/src/IGESData/IGESData_BasicEditor.cxx index 5226ac980a..28b1b561d9 100644 --- a/src/IGESData/IGESData_BasicEditor.cxx +++ b/src/IGESData/IGESData_BasicEditor.cxx @@ -34,7 +34,6 @@ #include #include #include -#include IGESData_BasicEditor::IGESData_BasicEditor(const Handle(IGESData_Protocol)& protocol) { @@ -92,7 +91,7 @@ void IGESData_BasicEditor::Init (const Handle(IGESData_IGESModel)& model, const (const Standard_Real val) { if (val <= 0.) return Standard_False; - Standard_Real vmm = val * UnitsMethods::GetCasCadeLengthUnit(); //abv 20 Feb 00: adding cascade unit factor + Standard_Real vmm = val * themodel->GlobalSection().CascadeUnit(); //#73 rln 10.03.99 S4135: "read.scale.unit" does not affect GlobalSection //if (Interface_Static::IVal("read.scale.unit") == 1) vmm = vmm * 1000.; // vmm est exprime en MILLIMETRES @@ -358,20 +357,19 @@ Standard_Integer IGESData_BasicEditor::UnitNameFlag (const Standard_CString nam Standard_Real IGESData_BasicEditor::UnitFlagValue (const Standard_Integer flag) { switch (flag) { - case 1 : return 0.0254; - case 2 : return 0.001; - case 3 : return 1.; - case 4 : return 0.3048; - case 5 : return 1609.27; - case 6 : return 1.; - case 7 : return 1000.; - case 8 : return 0.0000254; - case 9 : return 0.000001; - case 10 : return 0.01; - case 11 : return 0.0000000254; - default : break; + case 1: return 25.4; // inch + case 2: return 1.; // millimeter + case 3: return 1.; + case 4: return 304.8; // foot + case 5: return 1609344.; // mile + case 6: return 1000.; // meter + case 7: return 1000000.; // kilometer + case 8: return 0.0254; // mil (0.001 inch) + case 9: return 0.001; // micron + case 10: return 10.; // centimeter + case 11: return 0.0000254; // microinch + default: return 0.; } - return 0.; } Standard_CString IGESData_BasicEditor::UnitFlagName (const Standard_Integer flag) diff --git a/src/IGESData/IGESData_GlobalSection.cxx b/src/IGESData/IGESData_GlobalSection.cxx index 3b8f6989ac..dfcb3aa0fe 100644 --- a/src/IGESData/IGESData_GlobalSection.cxx +++ b/src/IGESData/IGESData_GlobalSection.cxx @@ -26,6 +26,8 @@ #include #include #include +#include +#include #include #include @@ -66,6 +68,7 @@ IGESData_GlobalSection::IGESData_GlobalSection() theMaxPower10Double (308), theMaxDigitsDouble (15), theScale (1.0), + theCascadeUnit (1.0), theUnitFlag (0), theLineWeightGrad (1), theMaxLineWeight (0.0), @@ -115,7 +118,7 @@ void IGESData_GlobalSection::Init(const Handle(Interface_ParamSet)& params, //Message_Msg Msg48 ("XSTEP_48"); //Message_Msg Msg49 ("XSTEP_49"); //====================================== - + XSAlgo::AlgoContainer()->PrepareForTransfer(); // update unit info theSeparator = ','; theEndMark = ';'; theSendName.Nullify(); theFileName.Nullify(); theSystemId.Nullify(); theInterfaceVersion.Nullify(); @@ -131,6 +134,7 @@ void IGESData_GlobalSection::Init(const Handle(Interface_ParamSet)& params, theAuthorName.Nullify(); theCompanyName.Nullify(); theIGESVersion = 11;//3 //#66 rln Setting IGES 5.3 by default(To avoid misleading fails below) theDraftingStandard = 0; + theCascadeUnit = UnitsMethods::GetCasCadeLengthUnit(); theLastChangeDate.Nullify(); // nouveaute 5.1 (peut etre absente) theAppliProtocol.Nullify(); // nouveaute 5.3 (peut etre absente) @@ -528,6 +532,15 @@ Standard_Real IGESData_GlobalSection::Scale () const } +//======================================================================= +//function : CascadeUnit +//purpose : +//======================================================================= +Standard_Real IGESData_GlobalSection::CascadeUnit() const +{ + return theCascadeUnit; +} + //======================================================================= //function : UnitFlag //purpose : @@ -802,8 +815,7 @@ Handle(TCollection_HAsciiString) IGESData_GlobalSection::NewDateString Standard_Real IGESData_GlobalSection::UnitValue () const { - return UnitsMethods::GetLengthFactorValue ( theUnitFlag ) / - UnitsMethods::GetCasCadeLengthUnit(); //abv 22 Feb 00: adding cascade unit factor + return IGESData_BasicEditor::UnitFlagValue(theUnitFlag) / theCascadeUnit; } @@ -848,6 +860,9 @@ Standard_Real IGESData_GlobalSection::UnitValue () const void IGESData_GlobalSection::SetScale (const Standard_Real val) { theScale = val; } + void IGESData_GlobalSection::SetCascadeUnit (const Standard_Real theUnit) + { theCascadeUnit = theUnit; } + void IGESData_GlobalSection::SetUnitFlag (const Standard_Integer val) { theUnitFlag = val; } diff --git a/src/IGESData/IGESData_GlobalSection.hxx b/src/IGESData/IGESData_GlobalSection.hxx index 29bb832b99..8d47f3003e 100644 --- a/src/IGESData/IGESData_GlobalSection.hxx +++ b/src/IGESData/IGESData_GlobalSection.hxx @@ -105,6 +105,9 @@ public: //! Returns the scale used in the IGES file. Standard_EXPORT Standard_Real Scale() const; + + //! Returns the system length unit + Standard_EXPORT Standard_Real CascadeUnit() const; //! Returns the unit flag that was used to write the IGES file. Standard_EXPORT Standard_Integer UnitFlag() const; @@ -203,6 +206,8 @@ public: Standard_EXPORT void SetReceiveName (const Handle(TCollection_HAsciiString)& val); + Standard_EXPORT void SetCascadeUnit(const Standard_Real theUnit); + Standard_EXPORT void SetScale (const Standard_Real val); Standard_EXPORT void SetUnitFlag (const Standard_Integer val); @@ -250,6 +255,7 @@ private: Standard_Integer theMaxDigitsDouble; Handle(TCollection_HAsciiString) theReceiveName; Standard_Real theScale; + Standard_Real theCascadeUnit; Standard_Integer theUnitFlag; Handle(TCollection_HAsciiString) theUnitName; Standard_Integer theLineWeightGrad; diff --git a/src/IGESData/IGESData_IGESModel.cxx b/src/IGESData/IGESData_IGESModel.cxx index 3091718ead..1856b5ba72 100644 --- a/src/IGESData/IGESData_IGESModel.cxx +++ b/src/IGESData/IGESData_IGESModel.cxx @@ -230,17 +230,6 @@ void IGESData_IGESModel::AddStartLine else thestart->InsertBefore (atnum,new TCollection_HAsciiString(line)); } - - -//======================================================================= -//function : GlobalSection -//purpose : -//======================================================================= - -const IGESData_GlobalSection& IGESData_IGESModel::GlobalSection () const - { return theheader; } - - //======================================================================= //function : SetGlobalSection //purpose : diff --git a/src/IGESData/IGESData_IGESModel.hxx b/src/IGESData/IGESData_IGESModel.hxx index 55044e42d3..bd893b9d8d 100644 --- a/src/IGESData/IGESData_IGESModel.hxx +++ b/src/IGESData/IGESData_IGESModel.hxx @@ -92,7 +92,10 @@ public: Standard_EXPORT void AddStartLine (const Standard_CString line, const Standard_Integer atnum = 0); //! Returns the Global section of the IGES file. - Standard_EXPORT const IGESData_GlobalSection& GlobalSection() const; + const IGESData_GlobalSection& GlobalSection() const { return theheader; } + + //! Returns the Global section of the IGES file. + IGESData_GlobalSection& ChangeGlobalSection() { return theheader; } //! Sets the Global section of the IGES file. Standard_EXPORT void SetGlobalSection (const IGESData_GlobalSection& header); diff --git a/src/PrsDim/PrsDim_AngleDimension.cxx b/src/PrsDim/PrsDim_AngleDimension.cxx index 2c80cfe95c..8d480a9686 100644 --- a/src/PrsDim/PrsDim_AngleDimension.cxx +++ b/src/PrsDim/PrsDim_AngleDimension.cxx @@ -47,7 +47,6 @@ #include #include #include -#include #include #include diff --git a/src/PrsDim/PrsDim_Dimension.cxx b/src/PrsDim/PrsDim_Dimension.cxx index 514cbede47..7526eecbf4 100644 --- a/src/PrsDim/PrsDim_Dimension.cxx +++ b/src/PrsDim/PrsDim_Dimension.cxx @@ -72,7 +72,6 @@ #include #include #include -#include IMPLEMENT_STANDARD_RTTIEXT(PrsDim_Dimension, AIS_InteractiveObject) diff --git a/src/RWGltf/RWGltf_CafWriter.cxx b/src/RWGltf/RWGltf_CafWriter.cxx index b8a50cd59d..71f88bb499 100644 --- a/src/RWGltf/RWGltf_CafWriter.cxx +++ b/src/RWGltf/RWGltf_CafWriter.cxx @@ -340,6 +340,11 @@ bool RWGltf_CafWriter::Perform (const Handle(TDocStd_Document)& theDocument, const TColStd_IndexedDataMapOfStringString& theFileInfo, const Message_ProgressRange& theProgress) { + Standard_Real aLengthUnit = 1.; + if (XCAFDoc_DocumentTool::GetLengthUnit(theDocument, aLengthUnit)) + { + myCSTrsf.SetInputLengthUnit(aLengthUnit); + } const Standard_Integer aDefSamplerId = 0; myMaterialMap = new RWGltf_GltfMaterialMap (myFile, aDefSamplerId); myMaterialMap->SetDefaultStyle (myDefaultStyle); diff --git a/src/RWMesh/RWMesh_CafReader.cxx b/src/RWMesh/RWMesh_CafReader.cxx index eb10ed2230..f998d3b8b9 100644 --- a/src/RWMesh/RWMesh_CafReader.cxx +++ b/src/RWMesh/RWMesh_CafReader.cxx @@ -58,6 +58,16 @@ RWMesh_CafReader::~RWMesh_CafReader() // } +void RWMesh_CafReader::SetDocument(const Handle(TDocStd_Document)& theDoc) +{ + myXdeDoc = theDoc; + Standard_Real aScaleFactorM = 1.; + if (XCAFDoc_DocumentTool::GetLengthUnit(theDoc, aScaleFactorM)) + { + SetSystemLengthUnit(aScaleFactorM); + } +} + // ======================================================================= // function : SingleShape // purpose : @@ -159,6 +169,17 @@ void RWMesh_CafReader::fillDocument() return; } + // set units + Standard_Real aLengthUnit = 1.; + if (!XCAFDoc_DocumentTool::GetLengthUnit(myXdeDoc, aLengthUnit)) + { + XCAFDoc_DocumentTool::SetLengthUnit(myXdeDoc, SystemLengthUnit()); + } + else if (aLengthUnit != SystemLengthUnit()) + { + Message::SendWarning("Warning: Length unit of document not equal to the system length unit"); + } + const Standard_Boolean wasAutoNaming = XCAFDoc_ShapeTool::AutoNaming(); XCAFDoc_ShapeTool::SetAutoNaming (Standard_False); const TCollection_AsciiString aRootName; // = generateRootName (theFile); diff --git a/src/RWMesh/RWMesh_CafReader.hxx b/src/RWMesh/RWMesh_CafReader.hxx index 0776adb561..c4df3d5a16 100644 --- a/src/RWMesh/RWMesh_CafReader.hxx +++ b/src/RWMesh/RWMesh_CafReader.hxx @@ -71,7 +71,8 @@ public: const Handle(TDocStd_Document)& Document() const { return myXdeDoc; } //! Set target document. - void SetDocument (const Handle(TDocStd_Document)& theDoc) { myXdeDoc = theDoc; } + //! Set system length unit according to the units of the document + Standard_EXPORT void SetDocument(const Handle(TDocStd_Document)& theDoc); //! Return prefix for generating root labels names. const TCollection_AsciiString& RootPrefix() const { return myRootPrefix; } diff --git a/src/RWObj/RWObj_CafWriter.cxx b/src/RWObj/RWObj_CafWriter.cxx index 979af884d5..e092e29f75 100644 --- a/src/RWObj/RWObj_CafWriter.cxx +++ b/src/RWObj/RWObj_CafWriter.cxx @@ -114,6 +114,12 @@ bool RWObj_CafWriter::Perform (const Handle(TDocStd_Document)& theDocument, OSD_Path::FolderAndFileFromPath (myFile, aFolder, aFileName); OSD_Path::FileNameAndExtension (aFileName, aShortFileNameBase, aFileExt); + Standard_Real aLengthUnit = 1.; + if (XCAFDoc_DocumentTool::GetLengthUnit(theDocument, aLengthUnit)) + { + myCSTrsf.SetInputLengthUnit(aLengthUnit); + } + if (theRootLabels.IsEmpty() || (theLabelFilter != NULL && theLabelFilter->IsEmpty())) { diff --git a/src/STEPCAFControl/STEPCAFControl_Reader.cxx b/src/STEPCAFControl/STEPCAFControl_Reader.cxx index ed31a819e4..a0b4fbb0bb 100644 --- a/src/STEPCAFControl/STEPCAFControl_Reader.cxx +++ b/src/STEPCAFControl/STEPCAFControl_Reader.cxx @@ -47,6 +47,7 @@ #include #include #include +#include #include #include #include @@ -535,6 +536,23 @@ static void FillShapesMap(const TopoDS_Shape &S, TopTools_MapOfShape &map) FillShapesMap(it.Value(), map); } +//======================================================================= +//function : prepareUnits +//purpose : +//======================================================================= +void STEPCAFControl_Reader::prepareUnits(const Handle(StepData_StepModel)& theModel, + const Handle(TDocStd_Document)& theDoc) const +{ + Standard_Real aScaleFactorMM = 1.; + if (!XCAFDoc_DocumentTool::GetLengthUnit(theDoc, aScaleFactorMM, UnitsMethods_LengthUnit_Millimeter)) + { + XSAlgo::AlgoContainer()->PrepareForTransfer(); // update unit info + aScaleFactorMM = UnitsMethods::GetCasCadeLengthUnit(); + // Sets length unit to the document + XCAFDoc_DocumentTool::SetLengthUnit(theDoc, aScaleFactorMM, UnitsMethods_LengthUnit_Millimeter); + } + theModel->SetLocalLengthUnit(aScaleFactorMM); +} //======================================================================= //function : Transfer @@ -549,6 +567,8 @@ Standard_Boolean STEPCAFControl_Reader::Transfer (STEPControl_Reader &reader, const Message_ProgressRange& theProgress) { reader.ClearShapes(); + Handle(StepData_StepModel) aModel = Handle(StepData_StepModel)::DownCast(reader.Model()); + prepareUnits(aModel, doc); Standard_Integer i; // Read all shapes @@ -582,14 +602,13 @@ Standard_Boolean STEPCAFControl_Reader::Transfer (STEPControl_Reader &reader, // from the ones representing hybrid models and shape sets STEPCAFControl_DataMapOfShapePD ShapePDMap; STEPCAFControl_DataMapOfPDExternFile PDFileMap; - Handle(Interface_InterfaceModel) Model = reader.Model(); const Handle(Transfer_TransientProcess) &TP = reader.WS()->TransferReader()->TransientProcess(); - Standard_Integer nb = Model->NbEntities(); + Standard_Integer nb = aModel->NbEntities(); Handle(TColStd_HSequenceOfTransient) SeqPDS = new TColStd_HSequenceOfTransient; for (i = 1; i <= nb; i++) { - Handle(Standard_Transient) enti = Model->Value(i); + Handle(Standard_Transient) enti = aModel->Value(i); if (enti->IsKind(STANDARD_TYPE(StepRepr_ProductDefinitionShape))) { // sequence for acceleration ReadMaterials SeqPDS->Append(enti); @@ -752,7 +771,6 @@ Standard_Boolean STEPCAFControl_Reader::Transfer (STEPControl_Reader &reader, // Update assembly compounds STool->UpdateAssemblies(); - return Standard_True; } @@ -1983,7 +2001,7 @@ void readAnnotation(const Handle(XSControl_TransferReader)& theTR, XSAlgo::AlgoContainer()->PrepareForTransfer(); STEPControl_ActorRead anActor; anActor.PrepareUnits(aDModel, aTP); - Standard_Real aFact = UnitsMethods::LengthFactor(); + Standard_Real aFact = StepData_GlobalFactors::Intance().LengthFactor(); // retrieve AnnotationPlane Handle(StepRepr_RepresentationItem) aDMIAE = aDMIA->IdentifiedItemValue(1); @@ -2090,7 +2108,7 @@ void readConnectionPoints(const Handle(XSControl_TransferReader)& theTR, XSAlgo::AlgoContainer()->PrepareForTransfer(); STEPControl_ActorRead anActor; anActor.PrepareUnits(aSDR, aTP); - aFact = UnitsMethods::LengthFactor(); + aFact = StepData_GlobalFactors::Intance().LengthFactor(); } if (theGDT->IsKind(STANDARD_TYPE(StepShape_DimensionalSize))) { @@ -4032,7 +4050,7 @@ Standard_Boolean STEPCAFControl_Reader::ReadGDTs(const Handle(XSControl_WorkSess STEPControl_ActorRead anActor; Handle(Transfer_TransientProcess) aTP = aTR->TransientProcess(); anActor.PrepareUnits(aDMIA->UsedRepresentation(), aTP); - aFact = UnitsMethods::LengthFactor(); + aFact = StepData_GlobalFactors::Intance().LengthFactor(); } // Presentation @@ -4196,8 +4214,8 @@ Standard_Boolean STEPCAFControl_Reader::ReadMaterials(const Handle(XSControl_Wor aDensity = aDensity / (anUnitCtx.LengthFactor()*anUnitCtx.LengthFactor()*anUnitCtx.LengthFactor()); // transfer length value for Density from millimeter to santimeter // in order to result density has dimension gram/(sm*sm*sm) - aDensity = aDensity*1000. / (UnitsMethods::GetCasCadeLengthUnit() - * UnitsMethods::GetCasCadeLengthUnit() * UnitsMethods::GetCasCadeLengthUnit()); + const Standard_Real aCascadeUnit = StepData_GlobalFactors::Intance().CascadeUnit(); + aDensity = aDensity*1000. / (aCascadeUnit * aCascadeUnit * aCascadeUnit); } if (NU->IsKind(STANDARD_TYPE(StepBasic_ConversionBasedUnitAndMassUnit))) { Standard_Real afact = 1.; diff --git a/src/STEPCAFControl/STEPCAFControl_Reader.hxx b/src/STEPCAFControl/STEPCAFControl_Reader.hxx index 2aa4d23f38..def983cbdb 100644 --- a/src/STEPCAFControl/STEPCAFControl_Reader.hxx +++ b/src/STEPCAFControl/STEPCAFControl_Reader.hxx @@ -291,6 +291,11 @@ private: const Handle(TDocStd_Document)& theDoc, const Handle(XSControl_WorkSession)& theWS); + //! Prepares units for transfer + void prepareUnits(const Handle(StepData_StepModel)& theModel, + const Handle(TDocStd_Document)& theDoc) const; + +private: STEPControl_Reader myReader; NCollection_DataMap myFiles; diff --git a/src/STEPCAFControl/STEPCAFControl_Writer.cxx b/src/STEPCAFControl/STEPCAFControl_Writer.cxx index b9ca23fb60..22d46ca905 100644 --- a/src/STEPCAFControl/STEPCAFControl_Writer.cxx +++ b/src/STEPCAFControl/STEPCAFControl_Writer.cxx @@ -228,6 +228,7 @@ #include #include #include +#include #include #include #include @@ -240,8 +241,11 @@ #include #include #include +#include +#include #include #include +#include // added by skl 15.01.2004 for D> writing //#include @@ -359,6 +363,25 @@ IFSelect_ReturnStatus STEPCAFControl_Writer::Write (const Standard_CString filen return status; } +//======================================================================= +//function : prepareUnit +//purpose : +//======================================================================= +void STEPCAFControl_Writer::prepareUnit(const TDF_Label& theLabel, + const Handle(StepData_StepModel)& theModel) +{ + Handle(XCAFDoc_LengthUnit) aLengthAttr; + if (!theLabel.IsNull() && + theLabel.Root().FindAttribute(XCAFDoc_LengthUnit::GetID(), aLengthAttr)) + { + theModel->SetLocalLengthUnit(aLengthAttr->GetUnitValue() * 1000); // convert to mm + } + else + { + XSAlgo::AlgoContainer()->PrepareForTransfer(); // update unit info + theModel->SetLocalLengthUnit(UnitsMethods::GetCasCadeLengthUnit()); + } +} //======================================================================= //function : Transfer @@ -516,6 +539,8 @@ Standard_Boolean STEPCAFControl_Writer::Transfer (STEPControl_Writer &writer, Handle(STEPCAFControl_ActorWrite) Actor = Handle(STEPCAFControl_ActorWrite)::DownCast ( writer.WS()->NormAdaptor()->ActorWrite() ); + const Handle(StepData_StepModel) aModel = Handle(StepData_StepModel)::DownCast(writer.WS()->Model()); + prepareUnit(labels.First(), aModel); // set local length unit to the model // translate free top-level shapes of the DECAF document Standard_Integer ap = Interface_Static::IVal ("write.step.schema"); TDF_LabelSequence sublabels; @@ -659,10 +684,9 @@ Standard_Boolean STEPCAFControl_Writer::Transfer (STEPControl_Writer &writer, WriteMaterials(writer.WS(),sublabels); // register all MDGPRs in model - const Handle(Interface_InterfaceModel) &Model = writer.WS()->Model(); MoniTool_DataMapIteratorOfDataMapOfShapeTransient anItr(myMapCompMDGPR); for (; anItr.More(); anItr.Next()) - Model->AddWithRefs( anItr.Value() ); + aModel->AddWithRefs( anItr.Value() ); } if ( multi ) { // external refs diff --git a/src/STEPCAFControl/STEPCAFControl_Writer.hxx b/src/STEPCAFControl/STEPCAFControl_Writer.hxx index f74f07877e..f571852976 100644 --- a/src/STEPCAFControl/STEPCAFControl_Writer.hxx +++ b/src/STEPCAFControl/STEPCAFControl_Writer.hxx @@ -92,6 +92,12 @@ public: const Standard_CString multi = 0, const Message_ProgressRange& theProgress = Message_ProgressRange()); + //! Mehod to writing sequence of root assemblies or part of the file specified by use by one label + Standard_EXPORT Standard_Boolean Transfer (const TDF_LabelSequence& L, + const STEPControl_StepModelType mode = STEPControl_AsIs, + const Standard_CString multi = 0, + const Message_ProgressRange& theProgress = Message_ProgressRange()); + Standard_EXPORT Standard_Boolean Perform (const Handle(TDocStd_Document)& doc, const TCollection_AsciiString& filename, const Message_ProgressRange& theProgress = Message_ProgressRange()); @@ -155,15 +161,7 @@ public: Standard_EXPORT Standard_Boolean GetMaterialMode() const; - - - protected: - //! Mehod to writing sequence of root assemblies or part of the file specified by use by one label - Standard_EXPORT Standard_Boolean Transfer (const TDF_LabelSequence& L, - const STEPControl_StepModelType mode = STEPControl_AsIs, - const Standard_CString multi = 0, - const Message_ProgressRange& theProgress = Message_ProgressRange()); //! Transfers labels to a STEP model //! Returns True if translation is OK @@ -215,9 +213,14 @@ protected: //! Write SHUO assigned to specified component, to STEP model Standard_EXPORT Standard_Boolean WriteSHUOs (const Handle(XSControl_WorkSession)& WS, const TDF_LabelSequence& labels); - + //! Finds length units located in root of label + //! If it exists, initializes local length unit from it + //! Else initializes according to Cascade length unit + Standard_EXPORT void prepareUnit(const TDF_Label& theLabel, + const Handle(StepData_StepModel)& theModel); private: + Standard_EXPORT Handle(StepRepr_ShapeAspect) WriteShapeAspect(const Handle(XSControl_WorkSession) &WS, const TDF_Label theLabel, const TopoDS_Shape theShape, Handle(StepRepr_RepresentationContext)& theRC, Handle(StepAP242_GeometricItemSpecificUsage)& theGISU); @@ -236,6 +239,7 @@ private: const TDF_Label theGeomTolL, const Handle(StepDimTol_HArray1OfDatumSystemOrReference)& theDatumSystem, const Handle(StepRepr_RepresentationContext)& theRC); +private: STEPControl_Writer myWriter; diff --git a/src/STEPConstruct/STEPConstruct_UnitContext.cxx b/src/STEPConstruct/STEPConstruct_UnitContext.cxx index f2ffd2d9a2..cefb2f6f5b 100644 --- a/src/STEPConstruct/STEPConstruct_UnitContext.cxx +++ b/src/STEPConstruct/STEPConstruct_UnitContext.cxx @@ -44,12 +44,12 @@ #include #include #include +#include #include #include #include #include #include -#include //======================================================================= //function : STEPConstruct_UnitContext @@ -91,18 +91,20 @@ void STEPConstruct_UnitContext::Init(const Standard_Real Tol3d) Standard_CString uName = 0; Standard_Boolean hasPref = Standard_True; StepBasic_SiPrefix siPref = StepBasic_spMilli; - switch ( Interface_Static::IVal ( "write.step.unit" ) ) { - case 1 : uName = "INCH"; break; - default : - case 2 : break; - case 4 : uName = "FOOT"; break; - case 5 : uName = "MILE"; break; - case 6 : hasPref = Standard_False; break; - case 7 : siPref = StepBasic_spKilo; break; - case 8 : uName = "MIL"; break; - case 9 : siPref = StepBasic_spMicro; break; - case 10 : siPref = StepBasic_spCenti; break; - case 11 : uName = "MICROINCH"; break; + Standard_Real aScale = 1.; + switch (Interface_Static::IVal("write.step.unit")) + { + case 1: uName = "INCH"; aScale = 25.4; break; + default: + case 2: break; + case 4: uName = "FOOT"; aScale = 304.8; break; + case 5: uName = "MILE"; aScale = 1609344.0; break; + case 6: hasPref = Standard_False; aScale = 1000.0; break; + case 7: siPref = StepBasic_spKilo; aScale = 1000000.0; break; + case 8: uName = "MIL"; aScale = 0.0254; break; + case 9: siPref = StepBasic_spMicro; aScale = 0.001; break; + case 10: siPref = StepBasic_spCenti; aScale = 10.0; break; + case 11: uName = "MICROINCH"; aScale = 0.0000254; break; } Handle(StepBasic_SiUnitAndLengthUnit) siUnit = @@ -112,7 +114,7 @@ void STEPConstruct_UnitContext::Init(const Standard_Real Tol3d) if ( uName ) { // for non-metric units, create conversion_based_unit Handle(StepBasic_MeasureValueMember) val = new StepBasic_MeasureValueMember; val->SetName("LENGTH_UNIT"); - val->SetReal ( UnitsMethods::GetLengthFactorValue ( Interface_Static::IVal ( "write.step.unit" ) ) ); + val->SetReal (aScale); Handle(StepBasic_LengthMeasureWithUnit) measure = new StepBasic_LengthMeasureWithUnit; StepBasic_Unit Unit; @@ -164,7 +166,7 @@ void STEPConstruct_UnitContext::Init(const Standard_Real Tol3d) Handle(StepBasic_MeasureValueMember) mvs = new StepBasic_MeasureValueMember; mvs->SetName("LENGTH_MEASURE"); - mvs->SetReal ( Tol3d / UnitsMethods::LengthFactor() ); + mvs->SetReal ( Tol3d / StepData_GlobalFactors::Intance().LengthFactor() ); StepBasic_Unit Unit; Unit.SetValue ( lengthUnit ); theTol3d->Init(mvs, Unit, TolName, TolDesc); @@ -388,12 +390,13 @@ Standard_Integer STEPConstruct_UnitContext::ComputeFactors(const Handle(StepBasi return 0; } + const Standard_Real aCascadeUnit = StepData_GlobalFactors::Intance().CascadeUnit(); if (aUnit->IsKind(STANDARD_TYPE(StepBasic_ConversionBasedUnitAndLengthUnit))|| aUnit->IsKind(STANDARD_TYPE(StepBasic_SiUnitAndLengthUnit))) { #ifdef METER lengthFactor = parameter; #else - lengthFactor = parameter * 1000. / UnitsMethods::GetCasCadeLengthUnit(); + lengthFactor = parameter * 1000. / aCascadeUnit; #endif if(!lengthDone) lengthDone = Standard_True; @@ -420,7 +423,7 @@ Standard_Integer STEPConstruct_UnitContext::ComputeFactors(const Handle(StepBasi #ifdef METER af = parameter; #else - af = parameter * 1000. / UnitsMethods::GetCasCadeLengthUnit(); + af = parameter * 1000. / aCascadeUnit; #endif areaDone = Standard_True; areaFactor = pow(af,2); @@ -431,7 +434,7 @@ Standard_Integer STEPConstruct_UnitContext::ComputeFactors(const Handle(StepBasi #ifdef METER af = parameter; #else - af = parameter * 1000. / UnitsMethods::GetCasCadeLengthUnit(); + af = parameter * 1000. / aCascadeUnit; #endif volumeDone = Standard_True; volumeFactor = pow(af,3); diff --git a/src/STEPControl/STEPControl_ActorRead.cxx b/src/STEPControl/STEPControl_ActorRead.cxx index 3e0c3b7def..b1443ce6a5 100644 --- a/src/STEPControl/STEPControl_ActorRead.cxx +++ b/src/STEPControl/STEPControl_ActorRead.cxx @@ -42,6 +42,7 @@ #include #include #include +#include #include #include #include @@ -1752,7 +1753,7 @@ void STEPControl_ActorRead::PrepareUnits(const Handle(StepRepr_Representation)& Standard_Integer anglemode = Interface_Static::IVal("step.angleunit.mode"); Standard_Real angleFactor = ( anglemode == 0 ? myUnit.PlaneAngleFactor() : anglemode == 1 ? 1. : M_PI/180. ); - UnitsMethods::InitializeFactors(myUnit.LengthFactor(), + StepData_GlobalFactors::Intance().InitializeFactors(myUnit.LengthFactor(), angleFactor, myUnit.SolidAngleFactor()); if (stat1 != 0) TP->AddWarning (theRepCont,myUnit.StatusMessage(stat1)); @@ -1787,7 +1788,7 @@ void STEPControl_ActorRead::PrepareUnits(const Handle(StepRepr_Representation)& void STEPControl_ActorRead::ResetUnits () { - UnitsMethods::InitializeFactors ( 1, 1, 1 ); + StepData_GlobalFactors::Intance().InitializeFactors ( 1, 1, 1 ); myPrecision = Interface_Static::RVal("read.precision.val"); myMaxTol = Max ( myPrecision, Interface_Static::RVal("read.maxprecision.val") ); } diff --git a/src/STEPControl/STEPControl_ActorWrite.cxx b/src/STEPControl/STEPControl_ActorWrite.cxx index cf3b6dd0d7..43092ac3a7 100644 --- a/src/STEPControl/STEPControl_ActorWrite.cxx +++ b/src/STEPControl/STEPControl_ActorWrite.cxx @@ -45,6 +45,7 @@ #include #include #include +#include #include #include #include @@ -231,7 +232,7 @@ static Standard_Boolean IsManifoldShape(const TopoDS_Shape& theShape) { STEPControl_ActorWrite::STEPControl_ActorWrite () : mygroup (0) , mytoler (-1.) { - SetMode(STEPControl_ShellBasedSurfaceModel); + SetMode(STEPControl_ShellBasedSurfaceModel); } //======================================================================= @@ -450,8 +451,6 @@ Handle(Transfer_Binder) STEPControl_ActorWrite::Transfer (const Handle(Transfer_ const Handle(Transfer_FinderProcess)& FP, const Message_ProgressRange& theProgress) { - XSAlgo::AlgoContainer()->PrepareForTransfer(); - Handle(TransferBRep_ShapeMapper) mapper = Handle(TransferBRep_ShapeMapper)::DownCast(start); if (mapper.IsNull()) return NullResult(); @@ -462,12 +461,15 @@ Handle(Transfer_Binder) STEPControl_ActorWrite::Transfer (const Handle(Transfer_ if ( ! model.IsNull() ) myContext.SetModel ( model ); //: abv 04.11.00: take APD from model myContext.AddAPD ( Standard_False ); // update APD myContext.SetLevel ( 1 ); // set assembly level to 1 (to ensure) - - //:S4136: init UnitsMethods to reset angle unit factors (see TopoDSToStep) - Standard_Real lFactor = UnitsMethods::GetLengthFactorValue ( Interface_Static::IVal ( "write.step.unit" ) ); - lFactor /= UnitsMethods::GetCasCadeLengthUnit(); + if (!model->IsInitializedUnit()) + { + XSAlgo::AlgoContainer()->PrepareForTransfer(); // update unit info + model->SetLocalLengthUnit(UnitsMethods::GetCasCadeLengthUnit()); + } + Standard_Real aLFactor = model->WriteLengthUnit(); + aLFactor /= model->LocalLengthUnit(); Standard_Integer anglemode = Interface_Static::IVal("step.angleunit.mode"); - UnitsMethods::InitializeFactors ( lFactor, ( anglemode <= 1 ? 1. : M_PI/180. ), 1. ); + StepData_GlobalFactors::Intance().InitializeFactors (aLFactor, ( anglemode <= 1 ? 1. : M_PI/180. ), 1. ); // create SDR STEPConstruct_Part SDRTool; diff --git a/src/STEPControl/STEPControl_Reader.cxx b/src/STEPControl/STEPControl_Reader.cxx index 15ea180ba0..b7c003bc14 100644 --- a/src/STEPControl/STEPControl_Reader.cxx +++ b/src/STEPControl/STEPControl_Reader.cxx @@ -442,6 +442,24 @@ void STEPControl_Reader::FileUnits( TColStd_SequenceOfAsciiString& theUnitLength } } +//======================================================================= +//function : SetSystemLengthUnit +//purpose : +//======================================================================= +void STEPControl_Reader::SetSystemLengthUnit(const Standard_Real theLengthUnit) +{ + StepModel()->SetLocalLengthUnit(theLengthUnit); +} + +//======================================================================= +//function : SystemLengthUnit +//purpose : +//======================================================================= +Standard_Real STEPControl_Reader::SystemLengthUnit() const +{ + return StepModel()->LocalLengthUnit(); +} + //======================================================================= //function : getSiName //purpose : diff --git a/src/STEPControl/STEPControl_Reader.hxx b/src/STEPControl/STEPControl_Reader.hxx index e96e442c52..1619174474 100644 --- a/src/STEPControl/STEPControl_Reader.hxx +++ b/src/STEPControl/STEPControl_Reader.hxx @@ -100,7 +100,11 @@ public: //! found in file Standard_EXPORT void FileUnits (TColStd_SequenceOfAsciiString& theUnitLengthNames, TColStd_SequenceOfAsciiString& theUnitAngleNames, TColStd_SequenceOfAsciiString& theUnitSolidAngleNames); + //! Sets system length unit used by transfer process + Standard_EXPORT void SetSystemLengthUnit(const Standard_Real theLengthUnit); + //! Returns system length unit used by transfer process + Standard_EXPORT Standard_Real SystemLengthUnit() const; protected: diff --git a/src/STEPControl/STEPControl_Writer.cxx b/src/STEPControl/STEPControl_Writer.cxx index 77153b5112..1d74eac7d0 100644 --- a/src/STEPControl/STEPControl_Writer.cxx +++ b/src/STEPControl/STEPControl_Writer.cxx @@ -21,8 +21,11 @@ #include #include #include +#include +#include #include #include +#include //======================================================================= //function : STEPControl_Writer @@ -136,7 +139,11 @@ IFSelect_ReturnStatus STEPControl_Writer::Transfer } if (mws < 0) return IFSelect_RetError; // cas non reconnu thesession->TransferWriter()->SetTransferMode (mws); - + if (!Model()->IsInitializedUnit()) + { + XSAlgo::AlgoContainer()->PrepareForTransfer(); // update unit info + Model()->SetLocalLengthUnit(UnitsMethods::GetCasCadeLengthUnit()); + } return thesession->TransferWriteShape(sh, compgraph, theProgress); } diff --git a/src/ShapeAnalysis/ShapeAnalysis_Edge.cxx b/src/ShapeAnalysis/ShapeAnalysis_Edge.cxx index 77c4b1d178..ebd665a5ac 100644 --- a/src/ShapeAnalysis/ShapeAnalysis_Edge.cxx +++ b/src/ShapeAnalysis/ShapeAnalysis_Edge.cxx @@ -859,7 +859,7 @@ static Standard_Boolean IsOverlapPartEdges(const TopoDS_Edge& theFirstEdge, const Standard_Real& theTolerance, const Standard_Real& theStep, const Standard_Real& theStartLength, - const Standard_Real& theEndLenght) + const Standard_Real& theEndLength) { TColStd_SequenceOfInteger aSeqIntervals; BRepAdaptor_Curve aAdCurve1(theFirstEdge); @@ -867,7 +867,7 @@ static Standard_Boolean IsOverlapPartEdges(const TopoDS_Edge& theFirstEdge, BRepExtrema_DistShapeShape aMinDist; aMinDist.LoadS1(theSecEdge); - for(Standard_Real aS = theStartLength; aS <= theEndLenght; aS+=theStep/2) { + for(Standard_Real aS = theStartLength; aS <= theEndLength; aS+=theStep/2) { gp_Pnt aPoint; if(aS <= Precision::Confusion()) { diff --git a/src/StepData/FILES b/src/StepData/FILES index d37a261de2..a80a6ee10f 100644 --- a/src/StepData/FILES +++ b/src/StepData/FILES @@ -31,6 +31,8 @@ StepData_FreeFormEntity.cxx StepData_FreeFormEntity.hxx StepData_GeneralModule.cxx StepData_GeneralModule.hxx +StepData_GlobalFactors.cxx +StepData_GlobalFactors.hxx StepData_GlobalNodeOfWriterLib.hxx StepData_GlobalNodeOfWriterLib_0.cxx StepData_HArray1OfField.hxx diff --git a/src/StepData/StepData_GlobalFactors.cxx b/src/StepData/StepData_GlobalFactors.cxx new file mode 100644 index 0000000000..37cff58775 --- /dev/null +++ b/src/StepData/StepData_GlobalFactors.cxx @@ -0,0 +1,113 @@ +// Copyright (c) 2021 OPEN CASCADE SAS +// +// This file is part of Open CASCADE Technology software library. +// +// This library is free software; you can redistribute it and/or modify it under +// the terms of the GNU Lesser General Public License version 2.1 as published +// by the Free Software Foundation, with special exception defined in the file +// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT +// distribution for complete text of the license and disclaimer of any warranty. +// +// Alternatively, this file may be used under the terms of Open CASCADE +// commercial license or contractual agreement. + +#include + +// ============================================================================ +// Method : Consturctor +// Purpose: +// ============================================================================ +StepData_GlobalFactors::StepData_GlobalFactors() + :myLengthFactor(1.), myPlaneAngleFactor(1.), + mySolidAngleFactor(1.), myFactRD(1.), + myFactDR(1.), myCascadeUnit(1.) +{} + +// ============================================================================ +// Method : Intance +// Purpose: +// ============================================================================ +StepData_GlobalFactors& StepData_GlobalFactors::Intance() +{ + static StepData_GlobalFactors THE_FACTORS; + return THE_FACTORS; +} + +// ============================================================================ +// Method : InitializeFactors +// Purpose: +// ============================================================================ +void StepData_GlobalFactors::InitializeFactors( + const Standard_Real theLengthFactor, + const Standard_Real thePlaneAngleFactor, + const Standard_Real theSolidAngleFactor) +{ + myLengthFactor = theLengthFactor; + myPlaneAngleFactor = thePlaneAngleFactor; + mySolidAngleFactor = theSolidAngleFactor; + myFactRD = 1. / thePlaneAngleFactor; + myFactDR = thePlaneAngleFactor; +} + +// ============================================================================ +// Method : LengthFactor +// Purpose: +// ============================================================================ +Standard_Real StepData_GlobalFactors::LengthFactor() +{ + return myLengthFactor; +} + +// ============================================================================ +// Method : PlaneAngleFactor +// Purpose: +// ============================================================================ +Standard_Real StepData_GlobalFactors::PlaneAngleFactor() +{ + return myPlaneAngleFactor; +} + +// ============================================================================ +// Method : SolidAngleFactor +// Purpose: +// ============================================================================ +Standard_Real StepData_GlobalFactors::SolidAngleFactor() +{ + return mySolidAngleFactor; +} + +// ============================================================================ +// Method : FactorRadianDegree +// Purpose: +// ============================================================================ +Standard_Real StepData_GlobalFactors::FactorRadianDegree() +{ + return myFactRD; +} + +// ============================================================================ +// Method : FactorDegreeRadian +// Purpose: +// ============================================================================ +Standard_Real StepData_GlobalFactors::FactorDegreeRadian() +{ + return myFactDR; +} + +// ============================================================================ +// Method : SetCascadeUnit +// Purpose: +// ============================================================================ +void StepData_GlobalFactors::SetCascadeUnit(const Standard_Real theUnit) +{ + myCascadeUnit = theUnit; +} + +// ============================================================================ +// Method : CascadeUnit +// Purpose: +// ============================================================================ +Standard_Real StepData_GlobalFactors::CascadeUnit() +{ + return myCascadeUnit; +} diff --git a/src/StepData/StepData_GlobalFactors.hxx b/src/StepData/StepData_GlobalFactors.hxx new file mode 100644 index 0000000000..90c30e3bba --- /dev/null +++ b/src/StepData/StepData_GlobalFactors.hxx @@ -0,0 +1,81 @@ +// Copyright (c) 2021 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 _StepData_GlobalFactors_HeaderFile +#define _StepData_GlobalFactors_HeaderFile + +#include +#include +#include +#include +#include +#include + +//! Class for using global units variables +class StepData_GlobalFactors +{ + +private: + + Standard_EXPORT StepData_GlobalFactors(); + +public: + + DEFINE_STANDARD_ALLOC + + //! Returns a global static object + Standard_EXPORT static StepData_GlobalFactors& Intance(); + + //! Initializes the 3 factors for the conversion of units + Standard_EXPORT void InitializeFactors( + const Standard_Real theLengthFactor, + const Standard_Real thePlaneAngleFactor, + const Standard_Real theSolidAngleFactor); + + //! Sets length unit for current transfer process + Standard_EXPORT void SetCascadeUnit(const Standard_Real theUnit); + + //! Returns length unit for current transfer process (mm by default) + Standard_EXPORT Standard_Real CascadeUnit(); + + //! Returns transient length factor for scaling of shapes + //! at one stage of transfer process + Standard_EXPORT Standard_Real LengthFactor(); + + //! Returns transient plane angle factor for conversion of angles + //! at one stage of transfer process + Standard_EXPORT Standard_Real PlaneAngleFactor(); + + //! Returns transient solid angle factor for conversion of angles + //! at one stage of transfer process + Standard_EXPORT Standard_Real SolidAngleFactor(); + + //! Returns transient factor radian degree for conversion of angles + //! at one stage of transfer process + Standard_EXPORT Standard_Real FactorRadianDegree(); + + //! Returns transient factor degree radian for conversion of angles + //! at one stage of transfer process + Standard_EXPORT Standard_Real FactorDegreeRadian(); + +private: + + Standard_Real myLengthFactor; + Standard_Real myPlaneAngleFactor; + Standard_Real mySolidAngleFactor; + Standard_Real myFactRD; + Standard_Real myFactDR; + Standard_Real myCascadeUnit; +}; + +#endif // _StepData_GlobalFactors_HeaderFile diff --git a/src/StepData/StepData_StepModel.cxx b/src/StepData/StepData_StepModel.cxx index 187e99c0e6..2768a85d19 100644 --- a/src/StepData/StepData_StepModel.cxx +++ b/src/StepData/StepData_StepModel.cxx @@ -25,6 +25,7 @@ #include #include #include +#include #include #include #include @@ -34,8 +35,25 @@ IMPLEMENT_STANDARD_RTTIEXT(StepData_StepModel,Interface_InterfaceModel) // Entete de fichier : liste d entites -StepData_StepModel::StepData_StepModel () :mySourceCodePage((Resource_FormatType)Interface_Static::IVal("read.step.codepage")) -{} +StepData_StepModel::StepData_StepModel () :mySourceCodePage((Resource_FormatType)Interface_Static::IVal("read.step.codepage")), + myReadUnitIsInitialized(Standard_False), myWriteUnit (1.) +{ + switch (Interface_Static::IVal("write.step.unit")) + { + case 1: myWriteUnit = 25.4; break; + case 2: myWriteUnit = 1.; break; + case 4: myWriteUnit = 304.8; break; + case 5: myWriteUnit = 1609344.0; break; + case 6: myWriteUnit = 1000.0; break; + case 7: myWriteUnit = 1000000.0; break; + case 8: myWriteUnit = 0.0254; break; + case 9: myWriteUnit = 0.001; break; + case 10: myWriteUnit = 10.0; break; + case 11: myWriteUnit = 0.0000254; break; + default: + GlobalCheck()->AddWarning("Incorrect write.step.unit parameter, use default value"); + } +} Handle(Standard_Transient) StepData_StepModel::Entity @@ -193,3 +211,40 @@ Handle(TCollection_HAsciiString) StepData_StepModel::StringLabel label = new TCollection_HAsciiString(text); return label; } + +//======================================================================= +//function : SetLocalLengthUnit +//purpose : +//======================================================================= +void StepData_StepModel::SetLocalLengthUnit(const Standard_Real theUnit) +{ + StepData_GlobalFactors::Intance().SetCascadeUnit(theUnit); + myReadUnitIsInitialized = Standard_True; +} + +//======================================================================= +//function : LocalLengthUnit +//purpose : +//======================================================================= +Standard_Real StepData_StepModel::LocalLengthUnit() const +{ + return StepData_GlobalFactors::Intance().CascadeUnit(); +} + +//======================================================================= +//function : SetLocalLengthUnit +//purpose : +//======================================================================= +void StepData_StepModel::SetWriteLengthUnit(const Standard_Real theUnit) +{ + myWriteUnit = theUnit; +} + +//======================================================================= +//function : LocalLengthUnit +//purpose : +//======================================================================= +Standard_Real StepData_StepModel::WriteLengthUnit() const +{ + return myWriteUnit; +} \ No newline at end of file diff --git a/src/StepData/StepData_StepModel.hxx b/src/StepData/StepData_StepModel.hxx index 953f166171..b7a9ec9344 100644 --- a/src/StepData/StepData_StepModel.hxx +++ b/src/StepData/StepData_StepModel.hxx @@ -105,6 +105,22 @@ public: //! Return the encoding of STEP file for converting names into UNICODE. void SetSourceCodePage (Resource_FormatType theCode) { mySourceCodePage = theCode; } + //! Sets local length unit using for transfer process + Standard_EXPORT void SetLocalLengthUnit(const Standard_Real theUnit); + + //! Returns local length unit using for transfer process (1 by default) + Standard_EXPORT Standard_Real LocalLengthUnit() const; + + //! Sets length unit using for writing process + Standard_EXPORT void SetWriteLengthUnit(const Standard_Real theUnit); + + //! Returns length unit using for writing process (1 by default) + Standard_EXPORT Standard_Real WriteLengthUnit() const; + + //! Returns the unit initialization flag + //! True - the unit was initialized + //! False - the unit value was not initialized, the default value is used + Standard_Boolean IsInitializedUnit() const { return myReadUnitIsInitialized; } DEFINE_STANDARD_RTTIEXT(StepData_StepModel,Interface_InterfaceModel) @@ -119,6 +135,8 @@ private: Interface_EntityList theheader; Handle(TColStd_HArray1OfInteger) theidnums; Resource_FormatType mySourceCodePage; + Standard_Boolean myReadUnitIsInitialized; + Standard_Real myWriteUnit; }; diff --git a/src/StepFile/StepFile_ReadData.cxx b/src/StepFile/StepFile_ReadData.cxx index 8ee4177e8c..98054dc128 100644 --- a/src/StepFile/StepFile_ReadData.cxx +++ b/src/StepFile/StepFile_ReadData.cxx @@ -226,12 +226,12 @@ void StepFile_ReadData::CreateNewText(const char* theNewText, int theLenText) return; } // If error argument exists - prepare size to new text value and old result text - int aLenght = (myErrorArg) ? theLenText + (int)strlen(myResText) : theLenText; + int aLength = (myErrorArg) ? theLenText + (int)strlen(myResText) : theLenText; - if (myOneCharPage->myUsed > myMaxChar - aLenght - 1) + if (myOneCharPage->myUsed > myMaxChar - aLength - 1) { int aSizeOfPage = myMaxChar + 1; - if (aLenght >= myMaxChar) aSizeOfPage += (aLenght + 1 - myMaxChar); + if (aLength >= myMaxChar) aSizeOfPage += (aLength + 1 - myMaxChar); CharactersPage* aNewPage = new CharactersPage(aSizeOfPage); aNewPage->myNext = myOneCharPage; myOneCharPage = aNewPage; @@ -241,7 +241,7 @@ void StepFile_ReadData::CreateNewText(const char* theNewText, int theLenText) char* anOldResText = myResText; myResText = myOneCharPage->myCharacters + myOneCharPage->myUsed; - myOneCharPage->myUsed += (aLenght + 1); + myOneCharPage->myUsed += (aLength + 1); // If error argument exists - append new text to old result text // Else create new result text diff --git a/src/StepToGeom/StepToGeom.cxx b/src/StepToGeom/StepToGeom.cxx index 9c4a0f7f92..dcbd145a99 100644 --- a/src/StepToGeom/StepToGeom.cxx +++ b/src/StepToGeom/StepToGeom.cxx @@ -135,7 +135,7 @@ #include #include -#include +#include //============================================================================= // Creation d' un Ax1Placement de Geom a partir d' un axis1_placement de Step @@ -980,7 +980,7 @@ Handle(Geom_CartesianPoint) StepToGeom::MakeCartesianPoint (const Handle(StepGeo { if (SP->NbCoordinates() == 3) { - const Standard_Real LF = UnitsMethods::LengthFactor(); + const Standard_Real LF = StepData_GlobalFactors::Intance().LengthFactor(); const Standard_Real X = SP->CoordinatesValue(1) * LF; const Standard_Real Y = SP->CoordinatesValue(2) * LF; const Standard_Real Z = SP->CoordinatesValue(3) * LF; @@ -1018,7 +1018,7 @@ Handle(Geom_Circle) StepToGeom::MakeCircle (const Handle(StepGeom_Circle)& SC) MakeAxis2Placement (Handle(StepGeom_Axis2Placement3d)::DownCast(AxisSelect.Value())); if (! A.IsNull()) { - return new Geom_Circle(A->Ax2(),SC->Radius() * UnitsMethods::LengthFactor()); + return new Geom_Circle(A->Ax2(),SC->Radius() * StepData_GlobalFactors::Intance().LengthFactor()); } } return 0; @@ -1096,8 +1096,8 @@ Handle(Geom_ConicalSurface) StepToGeom::MakeConicalSurface (const Handle(StepGeo Handle(Geom_Axis2Placement) A = MakeAxis2Placement (SS->Position()); if (! A.IsNull()) { - const Standard_Real R = SS->Radius() * UnitsMethods::LengthFactor(); - const Standard_Real Ang = SS->SemiAngle() * UnitsMethods::PlaneAngleFactor(); + const Standard_Real R = SS->Radius() * StepData_GlobalFactors::Intance().LengthFactor(); + const Standard_Real Ang = SS->SemiAngle() * StepData_GlobalFactors::Intance().PlaneAngleFactor(); //#2(K3-3) rln 12/02/98 ProSTEP ct_turbine-A.stp entity #518, #3571 (gp::Resolution() is too little) return new Geom_ConicalSurface(A->Ax2(), Max(Ang, Precision::Angular()), R); } @@ -1215,7 +1215,7 @@ Handle(Geom_CylindricalSurface) StepToGeom::MakeCylindricalSurface (const Handle Handle(Geom_Axis2Placement) A = MakeAxis2Placement(SS->Position()); if (! A.IsNull()) { - return new Geom_CylindricalSurface(A->Ax2(), SS->Radius() * UnitsMethods::LengthFactor()); + return new Geom_CylindricalSurface(A->Ax2(), SS->Radius() * StepData_GlobalFactors::Intance().LengthFactor()); } return 0; } @@ -1301,7 +1301,7 @@ Handle(Geom_Ellipse) StepToGeom::MakeEllipse (const Handle(StepGeom_Ellipse)& SC if (! A1.IsNull()) { gp_Ax2 A( A1->Ax2() ); - const Standard_Real LF = UnitsMethods::LengthFactor(); + const Standard_Real LF = StepData_GlobalFactors::Intance().LengthFactor(); const Standard_Real majorR = SC->SemiAxis1() * LF; const Standard_Real minorR = SC->SemiAxis2() * LF; if ( majorR - minorR >= 0. ) { //:o9 abv 19 Feb 99 @@ -1357,7 +1357,7 @@ Handle(Geom_Hyperbola) StepToGeom::MakeHyperbola (const Handle(StepGeom_Hyperbol if (! A1.IsNull()) { const gp_Ax2 A( A1->Ax2() ); - const Standard_Real LF = UnitsMethods::LengthFactor(); + const Standard_Real LF = StepData_GlobalFactors::Intance().LengthFactor(); return new Geom_Hyperbola(A, SC->SemiAxis() * LF, SC->SemiImagAxis() * LF); } } @@ -1437,7 +1437,7 @@ Handle(Geom_Parabola) StepToGeom::MakeParabola (const Handle(StepGeom_Parabola)& Handle(Geom_Axis2Placement) A = MakeAxis2Placement (Handle(StepGeom_Axis2Placement3d)::DownCast(AxisSelect.Value())); if (! A.IsNull()) { - return new Geom_Parabola(A->Ax2(), SC->FocalDist() * UnitsMethods::LengthFactor()); + return new Geom_Parabola(A->Ax2(), SC->FocalDist() * StepData_GlobalFactors::Intance().LengthFactor()); } } return 0; @@ -1561,8 +1561,8 @@ Handle(Geom_RectangularTrimmedSurface) StepToGeom::MakeRectangularTrimmedSurface Standard_Real uFact = 1.; Standard_Real vFact = 1.; - const Standard_Real LengthFact = UnitsMethods::LengthFactor(); - const Standard_Real AngleFact = UnitsMethods::PlaneAngleFactor(); // abv 30.06.00 trj4_k1_geo-tc-214.stp #1477: PI/180.; + const Standard_Real LengthFact = StepData_GlobalFactors::Intance().LengthFactor(); + const Standard_Real AngleFact = StepData_GlobalFactors::Intance().PlaneAngleFactor(); // abv 30.06.00 trj4_k1_geo-tc-214.stp #1477: PI/180.; if (theBasis->IsKind(STANDARD_TYPE(Geom_SphericalSurface)) || theBasis->IsKind(STANDARD_TYPE(Geom_ToroidalSurface))) { @@ -1604,7 +1604,7 @@ Handle(Geom_SphericalSurface) StepToGeom::MakeSphericalSurface (const Handle(Ste Handle(Geom_Axis2Placement) A = MakeAxis2Placement (SS->Position()); if (! A.IsNull()) { - return new Geom_SphericalSurface(A->Ax2(), SS->Radius() * UnitsMethods::LengthFactor()); + return new Geom_SphericalSurface(A->Ax2(), SS->Radius() * StepData_GlobalFactors::Intance().LengthFactor()); } return 0; } @@ -1642,7 +1642,7 @@ Handle(Geom_Surface) StepToGeom::MakeSurface (const Handle(StepGeom_Surface)& SS if (! aBasisSurface.IsNull()) { // sln 03.10.01. BUC61003. creation of offset surface is corrected - const Standard_Real anOffset = OS->Distance() * UnitsMethods::LengthFactor(); + const Standard_Real anOffset = OS->Distance() * StepData_GlobalFactors::Intance().LengthFactor(); if (aBasisSurface->Continuity() == GeomAbs_C0) { const BRepBuilderAPI_MakeFace aBFace(aBasisSurface, Precision::Confusion()); @@ -1781,7 +1781,7 @@ Handle(Geom_ToroidalSurface) StepToGeom::MakeToroidalSurface (const Handle(StepG Handle(Geom_Axis2Placement) A = MakeAxis2Placement (SS->Position()); if (! A.IsNull()) { - const Standard_Real LF = UnitsMethods::LengthFactor(); + const Standard_Real LF = StepData_GlobalFactors::Intance().LengthFactor(); return new Geom_ToroidalSurface(A->Ax2(), Abs(SS->MajorRadius() * LF), Abs(SS->MinorRadius() * LF)); } return 0; @@ -2011,12 +2011,12 @@ Handle(Geom_TrimmedCurve) StepToGeom::MakeTrimmedCurve (const Handle(StepGeom_Tr if (theSTEPCurve->IsKind(STANDARD_TYPE(StepGeom_Line))) { const Handle(StepGeom_Line) theLine = Handle(StepGeom_Line)::DownCast(theSTEPCurve); - fact = theLine->Dir()->Magnitude() * UnitsMethods::LengthFactor(); + fact = theLine->Dir()->Magnitude() * StepData_GlobalFactors::Intance().LengthFactor(); } else if (theSTEPCurve->IsKind(STANDARD_TYPE(StepGeom_Circle)) || theSTEPCurve->IsKind(STANDARD_TYPE(StepGeom_Ellipse))) { // if (trim1 > 2.1*M_PI || trim2 > 2.1*M_PI) fact = M_PI / 180.; - fact = UnitsMethods::PlaneAngleFactor(); + fact = StepData_GlobalFactors::Intance().PlaneAngleFactor(); //:p3 abv 23 Feb 99: shift on pi/2 on ellipse with R1 < R2 const Handle(StepGeom_Ellipse) ellipse = Handle(StepGeom_Ellipse)::DownCast(theSTEPCurve); if ( !ellipse.IsNull() && ellipse->SemiAxis1() - ellipse->SemiAxis2() < 0. ) @@ -2125,7 +2125,7 @@ Handle(Geom2d_BSplineCurve) StepToGeom::MakeTrimmedCurve2d (const Handle(StepGeo else if (BasisCurve->IsKind(STANDARD_TYPE(StepGeom_Circle)) || BasisCurve->IsKind(STANDARD_TYPE(StepGeom_Ellipse))) { // if (u1 > 2.1*M_PI || u2 > 2.1*M_PI) fact = M_PI / 180.; - fact = UnitsMethods::PlaneAngleFactor(); + fact = StepData_GlobalFactors::Intance().PlaneAngleFactor(); //:p3 abv 23 Feb 99: shift on pi/2 on ellipse with R1 < R2 const Handle(StepGeom_Ellipse) ellipse = Handle(StepGeom_Ellipse)::DownCast(BasisCurve); if ( !ellipse.IsNull() && ellipse->SemiAxis1() - ellipse->SemiAxis2() < 0. ) @@ -2158,7 +2158,7 @@ Handle(Geom_VectorWithMagnitude) StepToGeom::MakeVectorWithMagnitude (const Hand Handle(Geom_Direction) D = MakeDirection (SV->Orientation()); if (! D.IsNull()) { - const gp_Vec V(D->Dir().XYZ() * SV->Magnitude() * UnitsMethods::LengthFactor()); + const gp_Vec V(D->Dir().XYZ() * SV->Magnitude() * StepData_GlobalFactors::Intance().LengthFactor()); return new Geom_VectorWithMagnitude(V); } return 0; diff --git a/src/StepToTopoDS/StepToTopoDS_TranslateEdge.cxx b/src/StepToTopoDS/StepToTopoDS_TranslateEdge.cxx index eb61588108..cd34da906c 100644 --- a/src/StepToTopoDS/StepToTopoDS_TranslateEdge.cxx +++ b/src/StepToTopoDS/StepToTopoDS_TranslateEdge.cxx @@ -36,6 +36,7 @@ #include #include #include +#include #include #include #include @@ -60,7 +61,7 @@ #include #include #include -#include +#include #include //#include @@ -491,7 +492,8 @@ Handle(Geom2d_Curve) StepToTopoDS_TranslateEdge::MakePCurve if (! C2d.IsNull()) { // -- if the surface is a RectangularTrimmedSurface, // -- send the BasisSurface. - C2d = UnitsMethods::DegreeToRadian(C2d, ConvSurf); + C2d = GeomConvert_Units::DegreeToRadian(C2d, ConvSurf, + StepData_GlobalFactors::Intance().LengthFactor(), StepData_GlobalFactors::Intance().FactorDegreeRadian()); } } diff --git a/src/TKXSBase/PACKAGES b/src/TKXSBase/PACKAGES index b05fbfdb49..f384afd8f1 100755 --- a/src/TKXSBase/PACKAGES +++ b/src/TKXSBase/PACKAGES @@ -10,7 +10,6 @@ HeaderSection RWHeaderSection APIHeaderSection StepSelect -UnitsMethods XSAlgo LibCtl MoniTool diff --git a/src/TKernel/PACKAGES b/src/TKernel/PACKAGES index 6b13120d74..a10bf8d75d 100755 --- a/src/TKernel/PACKAGES +++ b/src/TKernel/PACKAGES @@ -11,5 +11,6 @@ TCollection TShort Units UnitsAPI +UnitsMethods NCollection Message diff --git a/src/TopoDSToStep/TopoDSToStep_MakeStepFace.cxx b/src/TopoDSToStep/TopoDSToStep_MakeStepFace.cxx index 7cea157b53..a562a599e5 100644 --- a/src/TopoDSToStep/TopoDSToStep_MakeStepFace.cxx +++ b/src/TopoDSToStep/TopoDSToStep_MakeStepFace.cxx @@ -52,6 +52,7 @@ #include #include #include +#include #include #include #include @@ -83,7 +84,7 @@ #include #include #include -#include +#include // Processing of non-manifold topology (ssv; 10.11.2010) // ---------------------------------------------------------------------------- @@ -377,10 +378,12 @@ void TopoDSToStep_MakeStepFace::Init(const TopoDS_Face& aFace, if (Su->IsKind(STANDARD_TYPE(Geom_RectangularTrimmedSurface))) { Handle(Geom_RectangularTrimmedSurface) alocalRTS = Handle(Geom_RectangularTrimmedSurface)::DownCast(Su); - C2dMapped = UnitsMethods::RadianToDegree(C2d, alocalRTS->BasisSurface()); + C2dMapped = GeomConvert_Units::RadianToDegree(C2d, alocalRTS->BasisSurface(), + StepData_GlobalFactors::Intance().LengthFactor(), StepData_GlobalFactors::Intance().FactorRadianDegree()); } else { - C2dMapped = UnitsMethods::RadianToDegree(C2d, Su); + C2dMapped = GeomConvert_Units::RadianToDegree(C2d, Su, + StepData_GlobalFactors::Intance().LengthFactor(), StepData_GlobalFactors::Intance().FactorRadianDegree()); } // // C2dMapped = C2d; // cky : en remplacement de ce qui precede diff --git a/src/UnitsMethods/FILES b/src/UnitsMethods/FILES index a76018e740..73d353de6a 100644 --- a/src/UnitsMethods/FILES +++ b/src/UnitsMethods/FILES @@ -1,2 +1,3 @@ UnitsMethods.cxx UnitsMethods.hxx +UnitsMethods_LengthUnit.hxx diff --git a/src/UnitsMethods/UnitsMethods.cxx b/src/UnitsMethods/UnitsMethods.cxx index 6de4275da1..eba779629d 100644 --- a/src/UnitsMethods/UnitsMethods.cxx +++ b/src/UnitsMethods/UnitsMethods.cxx @@ -11,421 +11,213 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include #include -static Standard_Real theLengthFactor = 1.; -static Standard_Real thePlaneAngleFactor = 1.; -static Standard_Real theSolidAngleFactor = 1.; -static Standard_Boolean set3d = Standard_True; - -static Standard_Real FactRD = 1.; -static Standard_Real FactDR = 1.; - -static Standard_Real theCasCadeLengthUnit = 1.; // abv 28 Feb 00 - -// ============================================================================ -// Method : -// Purpose: -// ============================================================================ - -void UnitsMethods::InitializeFactors(const Standard_Real LengthFactor, const Standard_Real PlaneAngleFactor, const Standard_Real SolidAngleFactor) -{ - theLengthFactor = LengthFactor; - thePlaneAngleFactor = PlaneAngleFactor; - theSolidAngleFactor = SolidAngleFactor; - FactRD = 1./PlaneAngleFactor; - FactDR = PlaneAngleFactor; -} - -// ============================================================================ -// Method : -// Purpose: -// ============================================================================ - -Standard_Real UnitsMethods ::LengthFactor() -{ - return theLengthFactor; -} +#include -// ============================================================================ -// Method : -// Purpose: -// ============================================================================ +static Standard_Real UnitsMethods_CascadeLengthUnit = 1.; -Standard_Real UnitsMethods::PlaneAngleFactor() +//======================================================================= +//function : GetCasCadeLengthUnit +//purpose : +//======================================================================= +Standard_Real UnitsMethods::GetCasCadeLengthUnit(const UnitsMethods_LengthUnit theBaseUnit) { - return thePlaneAngleFactor; + return UnitsMethods_CascadeLengthUnit * GetLengthUnitScale(UnitsMethods_LengthUnit_Millimeter, theBaseUnit); } -// ============================================================================ -// Method : -// Purpose: -// ============================================================================ - -Standard_Real UnitsMethods::SolidAngleFactor() +//======================================================================= +//function : SetCasCadeLengthUnit +//purpose : +//======================================================================= +void UnitsMethods::SetCasCadeLengthUnit(const Standard_Real theUnitValue, + const UnitsMethods_LengthUnit theBaseUnit) { - return theSolidAngleFactor; + UnitsMethods_CascadeLengthUnit = theUnitValue * GetLengthUnitScale(theBaseUnit, UnitsMethods_LengthUnit_Millimeter); } -// ============================================================================ -// Method : -// Purpose: -// ============================================================================ - -void UnitsMethods::Set3dConversion(const Standard_Boolean B) +//======================================================================= +//function : SetCasCadeLengthUnit +//purpose : +//======================================================================= +void UnitsMethods::SetCasCadeLengthUnit(const Standard_Integer theUnit) { - set3d = B; + UnitsMethods_CascadeLengthUnit = GetLengthFactorValue(theUnit); } -// ============================================================================ -// Method : -// Purpose: -// ============================================================================ - -Standard_Boolean UnitsMethods::Convert3d() +//======================================================================= +//function : GetLengthFactorValue +//purpose : +//======================================================================= +Standard_Real UnitsMethods::GetLengthFactorValue(const Standard_Integer theUnit) { - return set3d; + switch (theUnit) + { + case 1: return 25.4; // inch + case 2: return 1.; // millimeter + case 4: return 304.8; // foot + case 5: return 1609344.; // mile + case 6: return 1000.; // meter + case 7: return 1000000.; // kilometer + case 8: return 0.0254; // mil (0.001 inch) + case 9: return 0.001; // micron + case 10: return 10.; // centimeter + case 11: return 0.0000254; // microinch + default: return 1.; + } } - -// ============================================================================ -// Method : -// Purpose: -// ============================================================================ - -Handle(Geom2d_Curve) UnitsMethods::RadianToDegree - (const Handle(Geom2d_Curve) & theCurve2d, - const Handle(Geom_Surface) & theSurf) +//======================================================================= +//function : GetLengthUnitScale +//purpose : +//======================================================================= +Standard_Real UnitsMethods::GetLengthUnitScale(const UnitsMethods_LengthUnit theFromUnit, + const UnitsMethods_LengthUnit theToUnit) { - Handle(Geom2d_Curve) aCurve2d = Handle(Geom2d_Curve)::DownCast(theCurve2d->Copy()); - Standard_Real uFact = 1.; - Standard_Real vFact = 1.; - Standard_Real LengthFact = 1. / UnitsMethods::LengthFactor(); - Standard_Real AngleFact = FactRD; // 180./PI; pilotable - - gp_Pnt2d Pt1; - gp_XY pXY; - gp_GTrsf2d tMatu , tMatv; - - // theSurf is a CylindricalSurface or a ConicalSurface or - // a ToroidalSurface or a SphericalSurface or - // a SurfaceOfRevolution - if (theSurf->IsKind(STANDARD_TYPE(Geom_SphericalSurface)) || - theSurf->IsKind(STANDARD_TYPE(Geom_ToroidalSurface))) { - uFact = vFact = AngleFact; - } - else if (theSurf->IsKind(STANDARD_TYPE(Geom_CylindricalSurface))) { - uFact = AngleFact; - vFact = LengthFact; - } - else if ( theSurf->IsKind(STANDARD_TYPE(Geom_SurfaceOfRevolution))) { - uFact = AngleFact; - } - else if (theSurf->IsKind(STANDARD_TYPE(Geom_ConicalSurface))) { - Handle(Geom_ConicalSurface) conicS = - Handle(Geom_ConicalSurface)::DownCast(theSurf); - Standard_Real semAng = conicS->SemiAngle(); - uFact = AngleFact; - vFact = LengthFact * Cos(semAng); - } - else if (theSurf->IsKind(STANDARD_TYPE(Geom_Plane))) { - uFact = vFact = LengthFact; - if (aCurve2d->IsKind(STANDARD_TYPE(Geom2d_Circle)) || - aCurve2d->IsKind(STANDARD_TYPE(Geom2d_Ellipse))) { - gp_Trsf2d aT; - aT.SetScale (gp::Origin2d(), LengthFact); - aCurve2d->Transform (aT); - return aCurve2d; - } - } - else { -// debug -// std::cout <<"UnitsMethods: SurfType = "<< aSurface->DynamicType(); - return aCurve2d; - } - - if (aCurve2d->IsKind(STANDARD_TYPE(Geom2d_Line))) { - Handle(Geom2d_Line) aLine2d = Handle(Geom2d_Line)::DownCast(aCurve2d); - - gp_Pnt2d myLoc = aLine2d->Location(); - gp_Dir2d myDir = aLine2d->Direction(); - - gp_Pnt2d myNewLoc; - myNewLoc.SetCoord(myLoc.X()*uFact, myLoc.Y()*vFact); - - gp_Dir2d myNewDir; - myNewDir.SetCoord(myDir.X()*uFact, myDir.Y()*vFact); - - Handle(Geom2d_Line) myNewLine2d = Handle(Geom2d_Line)::DownCast(aLine2d->Copy()); - myNewLine2d->SetLocation(myNewLoc); - myNewLine2d->SetDirection(myNewDir); - - return myNewLine2d; - } - else if (aCurve2d->IsKind(STANDARD_TYPE(Geom2d_Conic))) { - if (aCurve2d->IsKind(STANDARD_TYPE(Geom2d_Circle)) || - aCurve2d->IsKind(STANDARD_TYPE(Geom2d_Ellipse))) { - Handle(Geom2d_BSplineCurve) aBSpline2d = - Geom2dConvert::CurveToBSplineCurve(aCurve2d); - aCurve2d = aBSpline2d; - } - else if (aCurve2d->IsKind(STANDARD_TYPE(Geom2d_Parabola))) { -#ifdef OCCT_DEBUG - std::cout << "PCURVE of Parabola type in U or V Periodic Surface" << std::endl; - std::cout << "Parameters Not transformed to Degree" << std::endl; -#endif - } - else if (aCurve2d->IsKind(STANDARD_TYPE(Geom2d_Hyperbola))) { -#ifdef OCCT_DEBUG - std::cout << "PCURVE of Hyperbola type in U or V Periodic Surface" << std::endl; - std::cout << "Parameters Not transformed to Degree" << std::endl; -#endif - } - - } - - // Compute affinity - tMatu.SetAffinity(gp::OY2d(), uFact); - tMatv.SetAffinity(gp::OX2d(), vFact); - - if (aCurve2d->IsKind(STANDARD_TYPE(Geom2d_BoundedCurve))) { - if (aCurve2d->IsKind(STANDARD_TYPE(Geom2d_BSplineCurve))) { - Handle(Geom2d_BSplineCurve) aBSpline2d = - Handle(Geom2d_BSplineCurve)::DownCast(aCurve2d); - Handle(Geom2d_BSplineCurve) myNewBSpline2d = - Handle(Geom2d_BSplineCurve)::DownCast(aBSpline2d->Copy()); - Standard_Integer nbPol = aBSpline2d->NbPoles(); - for (Standard_Integer i = 1; i<=nbPol ; i++) { - pXY = aBSpline2d->Pole(i).XY(); - tMatu.Transforms(pXY); - tMatv.Transforms(pXY); - Pt1.SetXY(pXY); - myNewBSpline2d->SetPole(i, Pt1); - } - return myNewBSpline2d; - } - else { -#ifdef OCCT_DEBUG - std::cout << "PCURVE of Other Types of Bounded Curve in U or V Periodic Surface" << std::endl; - std::cout << "Parameters Not transformed to Degree" << std::endl; -#endif - } - } - return aCurve2d; + Standard_Real aVal1 = GetLengthFactorValue(theFromUnit); + Standard_Real aVal2 = GetLengthFactorValue(theToUnit); + return aVal1 / aVal2; } -//============================================================================= -// DegreeToRadian: 1. Change definition of the pcurves according to Length -// Factor -// 2. STEP cylinder, torus, cone and sphere are parametrized -// from 0 to 360 degree -// Then pcurves parameter have to be transformed -// from DEGREE to RADIAN -//============================================================================= - -Handle(Geom2d_Curve) UnitsMethods::DegreeToRadian - (const Handle(Geom2d_Curve) & thePcurve, - const Handle(Geom_Surface) & aSurface) +//======================================================================= +//function : GetLengthUnitByScale +//purpose : +//======================================================================= +UnitsMethods_LengthUnit UnitsMethods::GetLengthUnitByFactorValue(const Standard_Real theFactorValue, + const UnitsMethods_LengthUnit theBaseUnit) { - Handle(Geom2d_Curve) aPcurve = Handle(Geom2d_Curve)::DownCast(thePcurve->Copy()); - Standard_Real uFact = 1.; - Standard_Real vFact = 1.; - Standard_Real LengthFact = UnitsMethods::LengthFactor(); - Standard_Real AngleFact = FactDR; // PI/180.; pilotable - - gp_Pnt2d Pt1; - gp_XY pXY; - gp_GTrsf2d tMatu , tMatv; - - // What to change ?? - - if (aSurface->IsKind(STANDARD_TYPE(Geom_SphericalSurface)) || - aSurface->IsKind(STANDARD_TYPE(Geom_ToroidalSurface))) { - uFact = vFact = AngleFact; + const Standard_Real aPreci = 1.e-6; + const Standard_Real aValue = theFactorValue * GetLengthUnitScale(theBaseUnit, UnitsMethods_LengthUnit_Millimeter); + if (Abs(1. - aValue) < aPreci) + { + return UnitsMethods_LengthUnit_Millimeter; } - else if (aSurface->IsKind(STANDARD_TYPE(Geom_CylindricalSurface))) { - uFact = AngleFact; - vFact = LengthFact; + else if (Abs(25.4 - aValue) < aPreci) + { + return UnitsMethods_LengthUnit_Inch; } - else if ( aSurface->IsKind(STANDARD_TYPE(Geom_SurfaceOfRevolution))) { - uFact = AngleFact; + else if (Abs(304.8 - aValue) < aPreci) + { + return UnitsMethods_LengthUnit_Foot; } - else if (aSurface->IsKind(STANDARD_TYPE(Geom_ConicalSurface))) { - Handle(Geom_ConicalSurface) conicS = - Handle(Geom_ConicalSurface)::DownCast(aSurface); - Standard_Real semAng = conicS->SemiAngle(); - uFact = AngleFact; - vFact = LengthFact / Cos(semAng); + else if (Abs(1609344. - aValue) < aPreci) + { + return UnitsMethods_LengthUnit_Mile; } - else if (aSurface->IsKind(STANDARD_TYPE(Geom_Plane))) { - uFact = vFact = LengthFact; - if (aPcurve->IsKind(STANDARD_TYPE(Geom2d_Circle)) || - aPcurve->IsKind(STANDARD_TYPE(Geom2d_Ellipse))) { - gp_Trsf2d aT; - aT.SetScale (gp::Origin2d(), LengthFact); - aPcurve->Transform (aT); - return aPcurve; - } + else if (Abs(1000. - aValue) < aPreci) + { + return UnitsMethods_LengthUnit_Meter; } - else { -// debug -// std::cout <<"UnitsMethods: SurfType = "<< aSurface->DynamicType(); - return aPcurve; + else if (Abs(1000000. - aValue) < aPreci) + { + return UnitsMethods_LengthUnit_Kilometer; } - - if (aPcurve->IsKind(STANDARD_TYPE(Geom2d_Conic))) { - if (aPcurve->IsKind(STANDARD_TYPE(Geom2d_Circle)) || - aPcurve->IsKind(STANDARD_TYPE(Geom2d_Ellipse))) { - Handle(Geom2d_BSplineCurve) aBSpline2d = - Geom2dConvert::CurveToBSplineCurve(aPcurve); - aPcurve = aBSpline2d; - } - else if (aPcurve->IsKind(STANDARD_TYPE(Geom2d_Parabola))) { -#ifdef OCCT_DEBUG - std::cout << "PCURVE of Parabola type" << std::endl; - std::cout << "Parameters Not Yet transformed according to LengthUnit" << std::endl; -#endif - return aPcurve; - } - else if (aPcurve->IsKind(STANDARD_TYPE(Geom2d_Hyperbola))) { -#ifdef OCCT_DEBUG - std::cout << "PCURVE of Hyperbola type" << std::endl; - std::cout << "Parameters Not Yet transformed according to LengthUnit" << std::endl; -#endif - return aPcurve; - } + else if (Abs(0.0254 - aValue) < aPreci) + { + return UnitsMethods_LengthUnit_Mil; } - - // Compute affinity - - tMatu.SetAffinity(gp::OY2d(), uFact); - tMatv.SetAffinity(gp::OX2d(), vFact); - - if (aPcurve->IsKind(STANDARD_TYPE(Geom2d_Line))) { - Handle(Geom2d_Line) aLine2d = Handle(Geom2d_Line)::DownCast(aPcurve); - - gp_Pnt2d myLoc = aLine2d->Location(); - gp_Dir2d myDir = aLine2d->Direction(); - - gp_Pnt2d myNewLoc; - myNewLoc.SetCoord(myLoc.X()*uFact, myLoc.Y()*vFact); - - gp_Dir2d myNewDir; - myNewDir.SetCoord(myDir.X()*uFact, myDir.Y()*vFact); - - aLine2d->SetLocation(myNewLoc); - aLine2d->SetDirection(myNewDir); - - aPcurve = aLine2d; + else if (Abs(0.001 - aValue) < aPreci) + { + return UnitsMethods_LengthUnit_Micron; } - else if (aPcurve->IsKind(STANDARD_TYPE(Geom2d_BSplineCurve))) { - Handle(Geom2d_BSplineCurve) aBSpline2d = - Handle(Geom2d_BSplineCurve)::DownCast(aPcurve); - -// transform the Poles of the BSplineCurve according to AngleFact and LengthFact - - Standard_Integer nbPol = aBSpline2d->NbPoles(); - for (Standard_Integer i = 1; i<=nbPol ; i++) { - pXY = aBSpline2d->Pole(i).XY(); - tMatu.Transforms(pXY); - tMatv.Transforms(pXY); - Pt1.SetXY(pXY); - aBSpline2d->SetPole(i, Pt1); - } - aPcurve = aBSpline2d; + else if (Abs(10. - aValue) < aPreci) + { + return UnitsMethods_LengthUnit_Centimeter; } - else { -#ifdef OCCT_DEBUG - std::cout << "DegreeToRadian : Type " << aPcurve->DynamicType(); - std::cout << " not yet implemented" << std::endl; -#endif + else if (Abs(0.0000254 - aValue) < aPreci) + { + return UnitsMethods_LengthUnit_Microinch; } - return aPcurve; -} - -// ============================================================================ -// Method : -// Purpose: -// ============================================================================ - -Handle(Geom2d_Curve) UnitsMethods::MirrorPCurve -(const Handle(Geom2d_Curve) & C2d) -{ - Handle(Geom2d_Curve) theMirrored = - Handle(Geom2d_Curve)::DownCast(C2d->Copy()); - - gp_Trsf2d T; - gp_Pnt2d Loc(0.,0.); - gp_Dir2d Dir(1.,0.); - gp_Ax2d ax2(Loc, Dir); - T.SetMirror(ax2); - theMirrored->Transform(T); - return theMirrored; + return UnitsMethods_LengthUnit_Undefined; } //======================================================================= -//function : GetCasCadeLengthUnit -//purpose : +//function : DumpLengthUnit +//purpose : //======================================================================= - -Standard_Real UnitsMethods::GetCasCadeLengthUnit () +Standard_CString UnitsMethods::DumpLengthUnit(const UnitsMethods_LengthUnit theUnit) { - return theCasCadeLengthUnit; + switch (theUnit) + { + case UnitsMethods_LengthUnit_Millimeter: return "mm"; + case UnitsMethods_LengthUnit_Meter: return "m"; + case UnitsMethods_LengthUnit_Centimeter: return "cm"; + case UnitsMethods_LengthUnit_Kilometer: return "km"; + case UnitsMethods_LengthUnit_Micron: return "micron"; + case UnitsMethods_LengthUnit_Inch: return "in"; + case UnitsMethods_LengthUnit_Mil: return "min"; + case UnitsMethods_LengthUnit_Microinch: return "nin"; + case UnitsMethods_LengthUnit_Foot: return "ft"; + case UnitsMethods_LengthUnit_Mile: return "stat.mile"; + default: return "UNDEFINED"; + } } //======================================================================= -//function : SetCasCadeLengthUnit -//purpose : +//function : DumpLengthUnit +//purpose : //======================================================================= - -void UnitsMethods::SetCasCadeLengthUnit (const Standard_Integer unit) +Standard_CString UnitsMethods::DumpLengthUnit(const Standard_Real theScaleFactor, + const UnitsMethods_LengthUnit theBaseUnit) { - theCasCadeLengthUnit = UnitsMethods::GetLengthFactorValue ( unit ); + const UnitsMethods_LengthUnit aUnit = GetLengthUnitByFactorValue(theScaleFactor, theBaseUnit); + return DumpLengthUnit(aUnit); } //======================================================================= -//function : GetLengthFactorValue -//purpose : +//function : LengthUnitFromString +//purpose : //======================================================================= - -Standard_Real UnitsMethods::GetLengthFactorValue (const Standard_Integer par) +UnitsMethods_LengthUnit UnitsMethods::LengthUnitFromString(Standard_CString theStr, + const Standard_Boolean theCaseSensitive) { - switch ( par ) { - case 1 : return 25.4; // inch - case 2 : return 1.; // millimeter - - case 4 : return 304.8; // foot - case 5 : return 1609344.; // mile - case 6 : return 1000.; // meter - case 7 : return 1000000.; // kilometer - case 8 : return 0.0254; // mil (0.001 inch) - case 9 : return 0.001; // micron - case 10 : return 10.; // centimeter - case 11 : return 0.0000254; // microinch - default : return 1.; + TCollection_AsciiString aStr(theStr); + if (!theCaseSensitive) + { + aStr.LowerCase(); + } + if (aStr.IsEqual("mm")) + { + return UnitsMethods_LengthUnit_Millimeter; + } + else if (aStr.IsEqual("m")) + { + return UnitsMethods_LengthUnit_Meter; + } + else if (aStr.IsEqual("cm")) + { + return UnitsMethods_LengthUnit_Centimeter; + } + else if (aStr.IsEqual("km")) + { + return UnitsMethods_LengthUnit_Kilometer; + } + else if (aStr.IsEqual("micron")) + { + return UnitsMethods_LengthUnit_Micron; + } + else if (aStr.IsEqual("in")) + { + return UnitsMethods_LengthUnit_Inch; + } + else if (aStr.IsEqual("min")) + { + return UnitsMethods_LengthUnit_Mil; + } + else if (aStr.IsEqual("nin")) + { + return UnitsMethods_LengthUnit_Microinch; + } + else if (aStr.IsEqual("ft")) + { + return UnitsMethods_LengthUnit_Foot; + } + else if (aStr.IsEqual("stat.mile")) + { + return UnitsMethods_LengthUnit_Mile; + } + else + { + return UnitsMethods_LengthUnit_Undefined; } } - diff --git a/src/UnitsMethods/UnitsMethods.hxx b/src/UnitsMethods/UnitsMethods.hxx index 621c239d60..88ae98228b 100644 --- a/src/UnitsMethods/UnitsMethods.hxx +++ b/src/UnitsMethods/UnitsMethods.hxx @@ -1,7 +1,4 @@ -// Created on: 1994-09-29 -// Created by: Dieter THIEMANN -// Copyright (c) 1994-1999 Matra Datavision -// Copyright (c) 1999-2014 OPEN CASCADE SAS +// Copyright (c) 2021 OPEN CASCADE SAS // // This file is part of Open CASCADE Technology software library. // @@ -20,79 +17,53 @@ #include #include #include +#include -#include -#include -#include -class Geom2d_Curve; -class Geom_Surface; - - - -class UnitsMethods +//! Class for using global units variables +class UnitsMethods { public: DEFINE_STANDARD_ALLOC - - //! Initializes the 3 factors for the conversion of - //! units - Standard_EXPORT static void InitializeFactors (const Standard_Real LengthFactor, const Standard_Real PlaneAngleFactor, const Standard_Real SolidAngleFactor); - - Standard_EXPORT static Standard_Real LengthFactor(); - - Standard_EXPORT static Standard_Real PlaneAngleFactor(); - - Standard_EXPORT static Standard_Real SolidAngleFactor(); - - Standard_EXPORT static void Set3dConversion (const Standard_Boolean B); - - Standard_EXPORT static Standard_Boolean Convert3d(); - - Standard_EXPORT static Handle(Geom2d_Curve) RadianToDegree (const Handle(Geom2d_Curve)& C, const Handle(Geom_Surface)& S); - - Standard_EXPORT static Handle(Geom2d_Curve) DegreeToRadian (const Handle(Geom2d_Curve)& C, const Handle(Geom_Surface)& S); - - Standard_EXPORT static Handle(Geom2d_Curve) MirrorPCurve (const Handle(Geom2d_Curve)& C); - - //! Returns value of unit encoded by parameter param - //! (integer value denoting unit, as described in IGES - //! standard) in millimeters - Standard_EXPORT static Standard_Real GetLengthFactorValue (const Standard_Integer param); - - //! Returns value of current internal unit for CASCADE - //! in millemeters - Standard_EXPORT static Standard_Real GetCasCadeLengthUnit(); - - //! Sets value of current internal unit for CASCADE - //! by parameter param (integer value denoting unit, - //! as described in IGES standard) - //! GetCasCadeLengthUnit() will then return value - //! equal to GetLengthFactorValue(param) - Standard_EXPORT static void SetCasCadeLengthUnit (const Standard_Integer param); - - - - -protected: + //! Returns value of unit encoded by parameter theUnit + //! (integer value denoting unit, as described in IGES + //! standard) in millimeters by default + Standard_EXPORT static Standard_Real GetLengthFactorValue(const Standard_Integer theUnit); + //! Returns value of current internal unit for CASCADE + //! in millemeters by default + Standard_EXPORT static Standard_Real GetCasCadeLengthUnit(const UnitsMethods_LengthUnit theBaseUnit = UnitsMethods_LengthUnit_Millimeter); + //! Sets value of current internal unit for CASCADE + Standard_EXPORT static void SetCasCadeLengthUnit(const Standard_Real theUnitValue, + const UnitsMethods_LengthUnit theBaseUnit = UnitsMethods_LengthUnit_Millimeter); + //! Sets value of current internal unit for CASCADE + //! by parameter theUnit (integer value denoting unit, + //! as described in IGES standard) + Standard_EXPORT static void SetCasCadeLengthUnit(const Standard_Integer theUnit); -private: + //! Returns the scale factor for switch from first given unit to second given unit + Standard_EXPORT static Standard_Real GetLengthUnitScale(const UnitsMethods_LengthUnit theFromUnit, + const UnitsMethods_LengthUnit theToUnit); + //! Returns the enumeration corresponding to the given scale factor + Standard_EXPORT static UnitsMethods_LengthUnit GetLengthUnitByFactorValue(const Standard_Real theFactorValue, + const UnitsMethods_LengthUnit theBaseUnit = UnitsMethods_LengthUnit_Millimeter); + //! Returns string name for the given scale factor + Standard_EXPORT static Standard_CString DumpLengthUnit(const Standard_Real theScaleFactor, + const UnitsMethods_LengthUnit theBaseUnit = UnitsMethods_LengthUnit_Millimeter); + //! Returns string for the given value of LengthUnit + Standard_EXPORT static Standard_CString DumpLengthUnit(const UnitsMethods_LengthUnit theUnit); + //! Make conversion of given string to value of LengthUnit + Standard_EXPORT static UnitsMethods_LengthUnit LengthUnitFromString(Standard_CString theStr, + const Standard_Boolean theCaseSensitive); }; - - - - - - #endif // _UnitsMethods_HeaderFile diff --git a/src/UnitsMethods/UnitsMethods_LengthUnit.hxx b/src/UnitsMethods/UnitsMethods_LengthUnit.hxx new file mode 100644 index 0000000000..28e6de3e25 --- /dev/null +++ b/src/UnitsMethods/UnitsMethods_LengthUnit.hxx @@ -0,0 +1,33 @@ +// Copyright (c) 2021 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 _UnitsMethods_LengthUnit_HeaderFile +#define _UnitsMethods_LengthUnit_HeaderFile + +//! The Enumeration describes possible values for length units +enum UnitsMethods_LengthUnit +{ + UnitsMethods_LengthUnit_Undefined = 0, // 1. + UnitsMethods_LengthUnit_Inch = 1, // 25.4 + UnitsMethods_LengthUnit_Millimeter = 2, // 1. + UnitsMethods_LengthUnit_Foot = 4, // 304.8 + UnitsMethods_LengthUnit_Mile = 5, // 1609344. + UnitsMethods_LengthUnit_Meter = 6, // 1000. + UnitsMethods_LengthUnit_Kilometer = 7, // 1000000. + UnitsMethods_LengthUnit_Mil = 8, // (0.001 inch) // 0.0254 + UnitsMethods_LengthUnit_Micron = 9, // 0.001 + UnitsMethods_LengthUnit_Centimeter = 10, // 10. + UnitsMethods_LengthUnit_Microinch = 11 // 0.0000254 +}; + +#endif // _UnitsMethods_LengthUnit diff --git a/src/XCAFDoc/FILES b/src/XCAFDoc/FILES index 5b3030fdd8..f2af5883ac 100755 --- a/src/XCAFDoc/FILES +++ b/src/XCAFDoc/FILES @@ -39,6 +39,8 @@ XCAFDoc_GraphNode.hxx XCAFDoc_GraphNodeSequence.hxx XCAFDoc_LayerTool.cxx XCAFDoc_LayerTool.hxx +XCAFDoc_LengthUnit.cxx +XCAFDoc_LengthUnit.hxx XCAFDoc_Location.cxx XCAFDoc_Location.hxx XCAFDoc_Material.cxx diff --git a/src/XCAFDoc/GUID.txt b/src/XCAFDoc/GUID.txt index 737000ee84..36b63884be 100755 --- a/src/XCAFDoc/GUID.txt +++ b/src/XCAFDoc/GUID.txt @@ -47,3 +47,4 @@ efd212f4-6dfd-11d4-b9c8-0060b0ee281b: LayerTool attribute efd212f5-6dfd-11d4-b9c8-0060b0ee281b: GraphNode attribute efd212f6-6dfd-11d4-b9c8-0060b0ee281b efd212f7-6dfd-11d4-b9c8-0060b0ee281b +efd212f8-6dfd-11d4-b9c8-0060b0ee281b: LengthUnit attribute diff --git a/src/XCAFDoc/XCAFDoc.cxx b/src/XCAFDoc/XCAFDoc.cxx index b97a20f5d8..88ec31a3c2 100644 --- a/src/XCAFDoc/XCAFDoc.cxx +++ b/src/XCAFDoc/XCAFDoc.cxx @@ -28,6 +28,7 @@ #include #include #include +#include #include #include #include @@ -395,6 +396,11 @@ TCollection_AsciiString XCAFDoc::AttributeInfo (const Handle(TDF_Attribute)& the Handle(TDataStd_AsciiString) val = Handle(TDataStd_AsciiString)::DownCast ( theAtt ); anInfo = TCollection_AsciiString ( val->Get(), '?' ); } + else if (theAtt->IsKind(STANDARD_TYPE(XCAFDoc_LengthUnit))) { + Handle(XCAFDoc_LengthUnit) aVal = Handle(XCAFDoc_LengthUnit)::DownCast(theAtt); + anInfo = TCollection_AsciiString(aVal->GetUnitValue()); + anInfo += " "; anInfo += aVal->GetUnitName(); + } else if ( theAtt->IsKind(STANDARD_TYPE(TDataStd_IntegerArray)) ) { Handle(TDataStd_IntegerArray) val = Handle(TDataStd_IntegerArray)::DownCast ( theAtt ); for ( Standard_Integer j=val->Lower(); j <= val->Upper(); j++ ) { diff --git a/src/XCAFDoc/XCAFDoc_DocumentTool.cxx b/src/XCAFDoc/XCAFDoc_DocumentTool.cxx index 5a662cae2e..02c6fb0f31 100644 --- a/src/XCAFDoc/XCAFDoc_DocumentTool.cxx +++ b/src/XCAFDoc/XCAFDoc_DocumentTool.cxx @@ -29,11 +29,13 @@ #include #include #include +#include #include #include #include #include #include +#include IMPLEMENT_DERIVED_ATTRIBUTE_WITH_TYPE(XCAFDoc_DocumentTool,TDataStd_GenericEmpty,"xcaf","DocumentTool") @@ -329,6 +331,76 @@ Handle(XCAFDoc_NotesTool) XCAFDoc_DocumentTool::NotesTool(const TDF_Label& acces return XCAFDoc_NotesTool::Set(NotesLabel(acces)); } +//======================================================================= +//function : GetLengthUnit +//purpose : +//======================================================================= +Standard_Boolean XCAFDoc_DocumentTool::GetLengthUnit(const Handle(TDocStd_Document)& theDoc, + Standard_Real& theResult, + const UnitsMethods_LengthUnit theBaseUnit) +{ + if (theDoc.IsNull()) + { + return Standard_False; + } + Handle(XCAFDoc_LengthUnit) aLengthAttr; + if (theDoc->Main().Root().FindAttribute(XCAFDoc_LengthUnit::GetID(), aLengthAttr)) + { + theResult = aLengthAttr->GetUnitValue() * + UnitsMethods::GetLengthUnitScale(UnitsMethods_LengthUnit_Meter, theBaseUnit); + return Standard_True; + } + return Standard_False; +} + +//======================================================================= +//function : GetLengthUnit +//purpose : +//======================================================================= +Standard_Boolean XCAFDoc_DocumentTool::GetLengthUnit(const Handle(TDocStd_Document)& theDoc, + Standard_Real& theResult) +{ + if (theDoc.IsNull()) + { + return Standard_False; + } + Handle(XCAFDoc_LengthUnit) aLengthAttr; + if (theDoc->Main().Root().FindAttribute(XCAFDoc_LengthUnit::GetID(), aLengthAttr)) + { + theResult = aLengthAttr->GetUnitValue(); + return Standard_True; + } + return Standard_False; +} + +//======================================================================= +//function : SetLengthUnit +//purpose : +//======================================================================= +void XCAFDoc_DocumentTool::SetLengthUnit(const Handle(TDocStd_Document)& theDoc, + const Standard_Real theUnitValue, + const UnitsMethods_LengthUnit theBaseUnit) +{ + // Sets length unit info + TCollection_AsciiString aUnitName = UnitsMethods::DumpLengthUnit(theUnitValue, theBaseUnit); + const Standard_Real aScaleFactor = theUnitValue * + UnitsMethods::GetLengthUnitScale(theBaseUnit, UnitsMethods_LengthUnit_Meter); + XCAFDoc_LengthUnit::Set(theDoc->Main().Root(), aUnitName, aScaleFactor); +} + +//======================================================================= +//function : SetLengthUnit +//purpose : +//======================================================================= +void XCAFDoc_DocumentTool::SetLengthUnit(const Handle(TDocStd_Document)& theDoc, + const Standard_Real theUnitValue) +{ + // Sets length unit info + TCollection_AsciiString aUnitName = + UnitsMethods::DumpLengthUnit(theUnitValue, UnitsMethods_LengthUnit_Meter); + XCAFDoc_LengthUnit::Set(theDoc->Main().Root(), aUnitName, theUnitValue); +} + //======================================================================= //function : ID //purpose : diff --git a/src/XCAFDoc/XCAFDoc_DocumentTool.hxx b/src/XCAFDoc/XCAFDoc_DocumentTool.hxx index 65a6c7ac9c..ac9fe2b110 100644 --- a/src/XCAFDoc/XCAFDoc_DocumentTool.hxx +++ b/src/XCAFDoc/XCAFDoc_DocumentTool.hxx @@ -21,6 +21,8 @@ #include #include +#include + class Standard_GUID; class TDF_Label; class TDocStd_Document; @@ -120,6 +122,26 @@ public: //! Creates (if it does not exist) NotesTool attribute on NotesLabel(). Standard_EXPORT static Handle(XCAFDoc_NotesTool) NotesTool(const TDF_Label& acces); + //! Returns value of current internal unit for the document + //! converted to base unit type. + Standard_EXPORT static Standard_Boolean GetLengthUnit(const Handle(TDocStd_Document)& theDoc, + Standard_Real& theResut, + const UnitsMethods_LengthUnit theBaseUnit); + + //! Returns value of current internal unit for the document in meter + Standard_EXPORT static Standard_Boolean GetLengthUnit(const Handle(TDocStd_Document)& theDoc, + Standard_Real& theResut); + + //! Sets value of current internal unit to the document in meter + Standard_EXPORT static void SetLengthUnit(const Handle(TDocStd_Document)& theDoc, + const Standard_Real theUnitValue); + + //! Sets value of current internal unit to the document + //! @param theUnitValue must be represented in the base unit type + Standard_EXPORT static void SetLengthUnit(const Handle(TDocStd_Document)& theDoc, + const Standard_Real theUnitValue, + const UnitsMethods_LengthUnit theBaseUnit); + public: Standard_EXPORT XCAFDoc_DocumentTool(); diff --git a/src/XCAFDoc/XCAFDoc_LengthUnit.cxx b/src/XCAFDoc/XCAFDoc_LengthUnit.cxx new file mode 100644 index 0000000000..536dbff14c --- /dev/null +++ b/src/XCAFDoc/XCAFDoc_LengthUnit.cxx @@ -0,0 +1,158 @@ +// Copyright (c) 2021 OPEN CASCADE SAS +// +// This file is part of Open CASCADE Technology software library. +// +// This library is free software; you can redistribute it and/or modify it under +// the terms of the GNU Lesser General Public License version 2.1 as published +// by the Free Software Foundation, with special exception defined in the file +// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT +// distribution for complete text of the license and disclaimer of any warranty. +// +// Alternatively, this file may be used under the terms of Open CASCADE +// commercial license or contractual agreement. + +#include + +#include +#include +#include +#include +#include +#include +#include + +IMPLEMENT_DERIVED_ATTRIBUTE_WITH_TYPE(XCAFDoc_LengthUnit, TDF_Attribute, "xcaf", "LengthUnit") + +//======================================================================= +//function : XCAFDoc_LengthUnit +//purpose : +//======================================================================= +XCAFDoc_LengthUnit::XCAFDoc_LengthUnit() : TDF_Attribute(), myUnitScaleValue(1.) +{} + +//======================================================================= +//function : Set +//purpose : +//======================================================================= +Handle(XCAFDoc_LengthUnit) XCAFDoc_LengthUnit::Set(const TDF_Label& theLabel, + const TCollection_AsciiString& theUnitName, + const Standard_Real theUnitValue) +{ + return Set(theLabel, GetID(), theUnitName, theUnitValue); +} + +//======================================================================= +//function : Set +//purpose : +//======================================================================= +Handle(XCAFDoc_LengthUnit) XCAFDoc_LengthUnit::Set(const TDF_Label& theLabel, + const Standard_Real theUnitValue) +{ + TCollection_AsciiString aUnitName = UnitsMethods::DumpLengthUnit(theUnitValue, UnitsMethods_LengthUnit_Meter); + return Set(theLabel, GetID(), aUnitName, theUnitValue); +} + +//======================================================================= +//function : Set +//purpose : +//======================================================================= +Handle(XCAFDoc_LengthUnit) XCAFDoc_LengthUnit::Set(const TDF_Label& theLabel, + const Standard_GUID& theGUID, + const TCollection_AsciiString& theUnitName, + const Standard_Real theUnitValue) +{ + Handle(XCAFDoc_LengthUnit) A; + if (!theLabel.FindAttribute(theGUID, A)) { + A = new XCAFDoc_LengthUnit(); + A->SetID(theGUID); + theLabel.AddAttribute(A); + } + A->Set(theUnitName, theUnitValue); + return A; +} + +//======================================================================= +//function : Set +//purpose : +//======================================================================= +void XCAFDoc_LengthUnit::Set(const TCollection_AsciiString& theUnitName, + const Standard_Real theUnitValue) +{ + Backup(); + myUnitName = theUnitName; + myUnitScaleValue = theUnitValue; +} + +//======================================================================= +//function : GetID +//purpose : +//======================================================================= +const Standard_GUID& XCAFDoc_LengthUnit::GetID() +{ + static const Standard_GUID theGUID ("efd212f8-6dfd-11d4-b9c8-0060b0ee281b"); + return theGUID; +} + +//======================================================================= +//function : ID +//purpose : +//======================================================================= + +const Standard_GUID& XCAFDoc_LengthUnit::ID() const +{ + return GetID(); +} + +//======================================================================= +//function : Restore +//purpose : +//======================================================================= + +void XCAFDoc_LengthUnit::Restore(const Handle(TDF_Attribute)& theWith) +{ + Handle(XCAFDoc_LengthUnit) anAttr = Handle(XCAFDoc_LengthUnit)::DownCast(theWith); + myUnitName = anAttr->GetUnitName(); + myUnitScaleValue = anAttr->GetUnitValue(); +} + +//======================================================================= +//function : Paste +//purpose : +//======================================================================= +void XCAFDoc_LengthUnit::Paste(const Handle(TDF_Attribute)& theInto, + const Handle(TDF_RelocationTable)& theRT ) const +{ + (void)theRT; + Handle(XCAFDoc_LengthUnit) anAttr = Handle(XCAFDoc_LengthUnit)::DownCast(theInto); + anAttr->Set(myUnitName, myUnitScaleValue); +} + +//======================================================================= +//function : Dump +//purpose : +//======================================================================= +Standard_OStream& XCAFDoc_LengthUnit::Dump(Standard_OStream& theOS) const +{ + Standard_OStream& anOS = TDF_Attribute::Dump(theOS); + anOS << " UnitName=|" << myUnitName << "|"; + anOS << " UnitScaleValue=|" << myUnitScaleValue << "|"; + Standard_Character aSGUID[Standard_GUID_SIZE_ALLOC]; + ID().ToCString(aSGUID); + anOS << aSGUID << "|" << std::endl; + return anOS; +} + +//======================================================================= +//function : DumpJson +//purpose : +//======================================================================= +void XCAFDoc_LengthUnit::DumpJson(Standard_OStream& theOStream, Standard_Integer theDepth) const +{ + OCCT_DUMP_TRANSIENT_CLASS_BEGIN(theOStream) + + OCCT_DUMP_BASE_CLASS(theOStream, theDepth, TDF_Attribute) + + OCCT_DUMP_FIELD_VALUES_STRING(theOStream, "UnitName", 1, &myUnitName) + + OCCT_DUMP_FIELD_VALUES_NUMERICAL(theOStream, "UnitScaleValue", 1, &myUnitScaleValue) +} diff --git a/src/XCAFDoc/XCAFDoc_LengthUnit.hxx b/src/XCAFDoc/XCAFDoc_LengthUnit.hxx new file mode 100644 index 0000000000..17e612ce02 --- /dev/null +++ b/src/XCAFDoc/XCAFDoc_LengthUnit.hxx @@ -0,0 +1,104 @@ +// Copyright (c) 2021 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 _XCAFDoc_LengthUnit_HeaderFile +#define _XCAFDoc_LengthUnit_HeaderFile + +#include +#include +#include + +#include +#include +#include +#include +#include + +class TDF_Label; +class TCollection_AsciiString; +class TDF_Attribute; +class TDF_RelocationTable; + + +class XCAFDoc_LengthUnit; +DEFINE_STANDARD_HANDLE(XCAFDoc_LengthUnit, TDF_Attribute) + +//! Used to define a Length Unit attribute containing a length unit info +class XCAFDoc_LengthUnit : public TDF_Attribute +{ + +public: + + //! Returns the GUID of the attribute. + Standard_EXPORT static const Standard_GUID& GetID(); + + //! Finds or creates a LengthUnit attribute + //! @param theUnitName - name of the unit: mm, m, cm, km, micron, in, min, nin, ft, stat.mile + //! @param theUnitValue - length scale factor to meter + //! The LengthUnit attribute is returned. + Standard_EXPORT static Handle(XCAFDoc_LengthUnit) Set(const TDF_Label& theLabel, + const TCollection_AsciiString& theUnitName, + const Standard_Real theUnitValue); + + //! Finds or creates a LengthUnit attribute + //! @param theUnitValue - length scale factor to meter + //! The LengthUnit attribute is returned. + Standard_EXPORT static Handle(XCAFDoc_LengthUnit) Set(const TDF_Label& theLabel, + const Standard_Real theUnitValue); + + //! Finds, or creates, a LengthUnit attribute with explicit user defined GUID + //! @param theUnitName - name of the unit: mm, m, cm, km, micron, in, min, nin, ft, stat.mile + //! @param theUnitValue - length scale factor to meter + //! The LengthUnit attribute is returned + Standard_EXPORT static Handle(XCAFDoc_LengthUnit) Set(const TDF_Label& theLabel, + const Standard_GUID& theGUID, + const TCollection_AsciiString& theUnitName, + const Standard_Real theUnitValue); + + //! Creates a LengthUnit attribute + //! @param theUnitName - name of the unit: mm, m, cm, km, micron, in, min, nin, ft, stat.mile + //! @param theUnitValue - length scale factor to meter + Standard_EXPORT void Set(const TCollection_AsciiString& theUnitName, + const Standard_Real theUnitValue); + + //! Length unit description (could be arbitrary text) + const TCollection_AsciiString& GetUnitName() const { return myUnitName; } + + //! Returns length unit scale factor to meter + Standard_Real GetUnitValue() const { return myUnitScaleValue; } + + Standard_EXPORT Standard_Boolean IsEmpty() const { return myUnitName.IsEmpty(); } + + Standard_EXPORT XCAFDoc_LengthUnit(); + + Standard_EXPORT virtual const Standard_GUID& ID() const Standard_OVERRIDE; + + Standard_EXPORT virtual void Restore(const Handle(TDF_Attribute)& theWith) Standard_OVERRIDE; + + Standard_EXPORT virtual void Paste(const Handle(TDF_Attribute)& theInto, const Handle(TDF_RelocationTable)& theRT) const Standard_OVERRIDE; + + Standard_EXPORT virtual Standard_OStream& Dump(Standard_OStream& anOS) const Standard_OVERRIDE; + + //! Dumps the content of me into the stream + Standard_EXPORT virtual void DumpJson(Standard_OStream& theOStream, Standard_Integer theDepth = -1) const Standard_OVERRIDE; + + + DEFINE_DERIVED_ATTRIBUTE(XCAFDoc_LengthUnit, TDF_Attribute) + +private: + + Standard_Real myUnitScaleValue; + TCollection_AsciiString myUnitName; +}; + +#endif // _XCAFDoc_LengthUnit_HeaderFile diff --git a/src/XDEDRAW/XDEDRAW.cxx b/src/XDEDRAW/XDEDRAW.cxx index bb9ecf0a79..e3a278f00c 100644 --- a/src/XDEDRAW/XDEDRAW.cxx +++ b/src/XDEDRAW/XDEDRAW.cxx @@ -41,6 +41,7 @@ #include #include #include +#include #include #include #include @@ -96,6 +97,7 @@ #include #include #include +#include #include #include @@ -1063,6 +1065,93 @@ static Standard_Integer XSetTransparency (Draw_Interpretor& di, Standard_Integer return 0; } +//======================================================================= +//function : setLengthUnit +//purpose : +//======================================================================= +static Standard_Integer setLengthUnit(Draw_Interpretor& di, + Standard_Integer argc, + const char** argv) +{ + if (argc != 3) + { + di << "Use: " << argv[0] << " Doc {unitName|scaleFactor} \n"; + return 1; + } + + Handle(TDocStd_Document) aDoc; + DDocStd::GetDocument(argv[1], aDoc); + if (aDoc.IsNull()) + { + di << "Error: " << argv[1] << " is not a document\n"; return 1; + } + + TCollection_AsciiString anUnit(argv[2]); + Standard_Real anUnitValue = 1.; + TCollection_AsciiString anUnitName; + if (!anUnit.IsRealValue(true)) + { + UnitsMethods_LengthUnit aTypeUnit = UnitsMethods::LengthUnitFromString(anUnit.ToCString(), Standard_False); + if (aTypeUnit == UnitsMethods_LengthUnit_Undefined) + { + di << "Error: " << anUnit + << " is incorrect unit, use m, mm, km, cm, micron, mille, in, min, nin, ft, stat.mile\n"; + return 1; + } + anUnitName = anUnit; + anUnitValue = UnitsMethods::GetLengthFactorValue(aTypeUnit) * 0.001; + } + else + { + anUnitValue = anUnit.RealValue(); + anUnitName = UnitsMethods::DumpLengthUnit(anUnitValue, UnitsMethods_LengthUnit_Meter); + } + XCAFDoc_LengthUnit::Set(aDoc->Main().Root(), anUnitName, anUnitValue); + return 0; +} + +//======================================================================= +//function : dumpLengthUnit +//purpose : +//======================================================================= +static Standard_Integer dumpLengthUnit(Draw_Interpretor& di, Standard_Integer argc, const char** argv) +{ + if (argc != 2 && argc != 3) { + di << "Use: " << argv[0] << " Doc [-scale]\n"; + return 1; + } + + Handle(TDocStd_Document) aDoc; + DDocStd::GetDocument(argv[1], aDoc); + if (aDoc.IsNull()) + { + di << "Error: " << argv[1] << " is not a document\n"; return 1; + } + Handle(XCAFDoc_LengthUnit) aUnits; + if (!aDoc->Main().Root().FindAttribute(XCAFDoc_LengthUnit::GetID(), aUnits)) + { + di << "Error: Document doesn't contain a Length Unit\n"; + return 1; + } + if (argc == 3) + { + TCollection_AsciiString anOption(argv[2]); + anOption.LowerCase(); + if (anOption.IsEqual("-scale")) + { + di << aUnits->GetUnitValue(); + return 0; + } + else + { + di << "Error: Incorrect option, use -scale\n"; + return 1; + } + } + di << aUnits->GetUnitName(); + return 0; +} + //======================================================================= //function : XShowFaceBoundary //purpose : Set face boundaries on/off @@ -1328,7 +1417,18 @@ void XDEDRAW::Init(Draw_Interpretor& di) di.Add ("XSetTransparency", "Doc Transparency [label1 label2 ...]\t: Set transparency for given label(s) or whole doc", __FILE__, XSetTransparency, g); - di.Add ("XShowFaceBoundary", + di.Add("XSetLengthUnit", + "Doc {unit_name|scale_factor}\t: Set value of length unit" + "\n\t\t: Possible unit_name: m, mm, km, cm, micron, mille, in(inch), min(microinch), nin(nano inch), ft, stat.mile" + "\n\t\t: Possible scale factor: any real value more then 0. Factor to meter.", + __FILE__, setLengthUnit, g); + + di.Add("XGetLengthUnit", + "Doc [-scale]\t: Print name of length unit" + "\n\t\t: -scale : print value of the scaling factor to meter of length unit", + __FILE__, dumpLengthUnit, g); + + di.Add ("XShowFaceBoundary", "Doc Label IsOn [R G B [LineWidth [LineStyle]]]:" "- turns on/off drawing of face boundaries and defines boundary line style", __FILE__, XShowFaceBoundary, g); diff --git a/src/XDEDRAW/XDEDRAW_Common.cxx b/src/XDEDRAW/XDEDRAW_Common.cxx index 45cb4b1e0c..55a900499a 100644 --- a/src/XDEDRAW/XDEDRAW_Common.cxx +++ b/src/XDEDRAW/XDEDRAW_Common.cxx @@ -36,6 +36,8 @@ #include #include #include +#include +#include #include #include #include @@ -510,7 +512,6 @@ static Standard_Integer WriteStep (Draw_Interpretor& di, Standard_Integer argc, } k++; } - TDF_Label label; if( argc > k) { @@ -653,10 +654,13 @@ static Standard_Integer WriteVrml(Draw_Interpretor& di, Standard_Integer argc, c VrmlAPI_Writer writer; writer.SetRepresentation(VrmlAPI_ShadedRepresentation); - Standard_Real anOCCLengthUnit = - UnitsMethods::GetLengthFactorValue(Interface_Static::IVal("xstep.cascade.unit")); - Standard_Real aScale = 0.001*anOCCLengthUnit; - if (!writer.WriteDoc(aDoc, argv[2], aScale)) + Standard_Real aScaleFactorM = 1.; + if (!XCAFDoc_DocumentTool::GetLengthUnit(aDoc, aScaleFactorM)) + { + XSAlgo::AlgoContainer()->PrepareForTransfer(); // update unit info + aScaleFactorM = UnitsMethods::GetCasCadeLengthUnit(UnitsMethods_LengthUnit_Meter); + } + if (!writer.WriteDoc(aDoc, argv[2], aScaleFactorM)) { di << "Error: File " << argv[2] << " was not written\n"; } diff --git a/src/XDEDRAW/XDEDRAW_Shapes.cxx b/src/XDEDRAW/XDEDRAW_Shapes.cxx index 286c7e4685..4096d6b784 100644 --- a/src/XDEDRAW/XDEDRAW_Shapes.cxx +++ b/src/XDEDRAW/XDEDRAW_Shapes.cxx @@ -34,6 +34,9 @@ #include #include #include +#include +#include +#include #include //======================================================================= @@ -56,6 +59,14 @@ static Standard_Integer addShape (Draw_Interpretor& di, Standard_Integer argc, c return 1; } + Standard_Real aLengthUnit = 1.; + if (!XCAFDoc_DocumentTool::GetLengthUnit(Doc, aLengthUnit)) + { + XSAlgo::AlgoContainer()->PrepareForTransfer(); // update unit info + aLengthUnit = UnitsMethods::GetCasCadeLengthUnit(UnitsMethods_LengthUnit_Meter); + XCAFDoc_DocumentTool::SetLengthUnit(Doc, aLengthUnit); + } + Handle(XCAFDoc_ShapeTool) myAssembly = XCAFDoc_DocumentTool::ShapeTool(Doc->Main()); Standard_Boolean makeAssembly = Standard_True; if ( argc==4 && Draw::Atoi(argv[3]) == 0 ) makeAssembly = Standard_False; diff --git a/src/XSAlgo/XSAlgo_AlgoContainer.cxx b/src/XSAlgo/XSAlgo_AlgoContainer.cxx index ee58a6bd69..60da82932b 100644 --- a/src/XSAlgo/XSAlgo_AlgoContainer.cxx +++ b/src/XSAlgo/XSAlgo_AlgoContainer.cxx @@ -82,7 +82,7 @@ XSAlgo_AlgoContainer::XSAlgo_AlgoContainer() void XSAlgo_AlgoContainer::PrepareForTransfer() const { - UnitsMethods::SetCasCadeLengthUnit ( Interface_Static::IVal("xstep.cascade.unit") ); + UnitsMethods::SetCasCadeLengthUnit(Interface_Static::IVal("xstep.cascade.unit")); } //======================================================================= diff --git a/src/XSDRAWSTEP/XSDRAWSTEP.cxx b/src/XSDRAWSTEP/XSDRAWSTEP.cxx index ab7cf79a1d..3edd421600 100644 --- a/src/XSDRAWSTEP/XSDRAWSTEP.cxx +++ b/src/XSDRAWSTEP/XSDRAWSTEP.cxx @@ -43,12 +43,15 @@ #include #include #include +#include +#include #include #include #include #include #include #include +#include #include // Pour le transfert (write) @@ -151,7 +154,10 @@ static Standard_Integer stepread (Draw_Interpretor& di, Standard_Integer argc, c else di<<"No model loaded\n"; return 1; } - + + XSAlgo::AlgoContainer()->PrepareForTransfer(); // update unit info + sr.SetSystemLengthUnit(UnitsMethods::GetCasCadeLengthUnit()); + // nom = "." -> fichier deja lu Standard_Integer i, num, nbs, modepri = 1; if (fromtcl) modepri = 4; @@ -299,7 +305,9 @@ static Standard_Integer testreadstep (Draw_Interpretor& di, Standard_Integer arg case IFSelect_RetError : { di<<"file not found\n"; return 1; } case IFSelect_RetFail : { di<<"error during read\n"; return 1; } default : { di<<"failure\n"; return 1; } - } + } + XSAlgo::AlgoContainer()->PrepareForTransfer(); // update unit info + Reader.SetSystemLengthUnit(UnitsMethods::GetCasCadeLengthUnit()); Reader.TransferRoots(); TopoDS_Shape shape = Reader.OneShape(); DBRep::Set(argv[2],shape); diff --git a/src/XSDRAWSTLVRML/XSDRAWSTLVRML.cxx b/src/XSDRAWSTLVRML/XSDRAWSTLVRML.cxx index 20c6ee9389..a1ab08d303 100644 --- a/src/XSDRAWSTLVRML/XSDRAWSTLVRML.cxx +++ b/src/XSDRAWSTLVRML/XSDRAWSTLVRML.cxx @@ -74,6 +74,8 @@ #include #include #include +#include +#include #include #include #include @@ -179,7 +181,6 @@ static Standard_Integer ReadGltf (Draw_Interpretor& theDI, { TCollection_AsciiString aDestName, aFilePath; Standard_Boolean toUseExistingDoc = Standard_False; - Standard_Real aSystemUnitFactor = UnitsMethods::GetCasCadeLengthUnit() * 0.001; Standard_Boolean toListExternalFiles = Standard_False; Standard_Boolean isParallel = Standard_False; Standard_Boolean isDoublePrec = Standard_False; @@ -306,9 +307,14 @@ static Standard_Integer ReadGltf (Draw_Interpretor& theDI, return 1; } } - + Standard_Real aScaleFactorM = 1.; + if (!XCAFDoc_DocumentTool::GetLengthUnit(aDoc, aScaleFactorM, UnitsMethods_LengthUnit_Meter)) + { + XSAlgo::AlgoContainer()->PrepareForTransfer(); // update unit info + aScaleFactorM = UnitsMethods::GetCasCadeLengthUnit(UnitsMethods_LengthUnit_Meter); + } RWGltf_CafReader aReader; - aReader.SetSystemLengthUnit (aSystemUnitFactor); + aReader.SetSystemLengthUnit (aScaleFactorM); aReader.SetSystemCoordinateSystem (RWMesh_CoordinateSystem_Zup); aReader.SetDocument (aDoc); aReader.SetParallel (isParallel); @@ -504,8 +510,12 @@ static Standard_Integer WriteGltf (Draw_Interpretor& theDI, TCollection_AsciiString anExt = aGltfFilePath; anExt.LowerCase(); - - const Standard_Real aSystemUnitFactor = UnitsMethods::GetCasCadeLengthUnit() * 0.001; + Standard_Real aScaleFactorM = 1.; + if (!XCAFDoc_DocumentTool::GetLengthUnit(aDoc, aScaleFactorM, UnitsMethods_LengthUnit_Meter)) + { + XSAlgo::AlgoContainer()->PrepareForTransfer(); // update unit info + aScaleFactorM = UnitsMethods::GetCasCadeLengthUnit(UnitsMethods_LengthUnit_Meter); + } RWGltf_CafWriter aWriter (aGltfFilePath, anExt.EndsWith (".glb")); aWriter.SetTransformationFormat (aTrsfFormat); @@ -515,7 +525,7 @@ static Standard_Integer WriteGltf (Draw_Interpretor& theDI, aWriter.SetToEmbedTexturesInGlb (toEmbedTexturesInGlb); aWriter.SetMergeFaces (toMergeFaces); aWriter.SetSplitIndices16 (toSplitIndices16); - aWriter.ChangeCoordinateSystemConverter().SetInputLengthUnit (aSystemUnitFactor); + aWriter.ChangeCoordinateSystemConverter().SetInputLengthUnit (aScaleFactorM); aWriter.ChangeCoordinateSystemConverter().SetInputCoordinateSystem (aSystemCoordSys); aWriter.Perform (aDoc, aFileInfo, aProgress->Start()); return 0; @@ -742,10 +752,16 @@ static Standard_Integer ReadObj (Draw_Interpretor& theDI, return 1; } } + Standard_Real aScaleFactorM = 1.; + if (!XCAFDoc_DocumentTool::GetLengthUnit(aDoc, aScaleFactorM, UnitsMethods_LengthUnit_Meter)) + { + XSAlgo::AlgoContainer()->PrepareForTransfer(); // update unit info + aScaleFactorM = UnitsMethods::GetCasCadeLengthUnit(UnitsMethods_LengthUnit_Meter); + } RWObj_CafReader aReader; aReader.SetSinglePrecision (isSinglePrecision); - aReader.SetSystemLengthUnit (UnitsMethods::GetCasCadeLengthUnit() * 0.001); + aReader.SetSystemLengthUnit (aScaleFactorM); aReader.SetSystemCoordinateSystem (aResultCoordSys); aReader.SetFileLengthUnit (aFileUnitFactor); aReader.SetFileCoordinateSystem (aFileCoordSys); @@ -982,8 +998,8 @@ static Standard_Integer loadvrml } VrmlData_Scene aScene; - Standard_Real anOCCUnit = UnitsMethods::GetCasCadeLengthUnit(); - aScene.SetLinearScale(1000. / anOCCUnit); + Standard_Real anOCCUnitMM = UnitsMethods::GetCasCadeLengthUnit(); + aScene.SetLinearScale(1000. / anOCCUnitMM); aScene.SetVrmlDir (aVrmlDir); aScene << aStream; diff --git a/src/XmlMXCAFDoc/FILES b/src/XmlMXCAFDoc/FILES index 588ea8ea9a..de2f6209ae 100644 --- a/src/XmlMXCAFDoc/FILES +++ b/src/XmlMXCAFDoc/FILES @@ -12,6 +12,8 @@ XmlMXCAFDoc_DimTolDriver.cxx XmlMXCAFDoc_DimTolDriver.hxx XmlMXCAFDoc_GraphNodeDriver.cxx XmlMXCAFDoc_GraphNodeDriver.hxx +XmlMXCAFDoc_LengthUnitDriver.cxx +XmlMXCAFDoc_LengthUnitDriver.hxx XmlMXCAFDoc_LocationDriver.cxx XmlMXCAFDoc_LocationDriver.hxx XmlMXCAFDoc_LocationDriver.lxx diff --git a/src/XmlMXCAFDoc/XmlMXCAFDoc.cxx b/src/XmlMXCAFDoc/XmlMXCAFDoc.cxx index 4d4cc1204e..ffd01b6df8 100644 --- a/src/XmlMXCAFDoc/XmlMXCAFDoc.cxx +++ b/src/XmlMXCAFDoc/XmlMXCAFDoc.cxx @@ -25,6 +25,7 @@ #include #include #include +#include #include #include #include @@ -56,6 +57,7 @@ void XmlMXCAFDoc::AddDrivers (const Handle(XmlMDF_ADriverTable)& aDriverTable, } aDriverTable -> AddDriver (aLocationDriver); + aDriverTable -> AddDriver (new XmlMXCAFDoc_LengthUnitDriver (anMsgDrv)); aDriverTable -> AddDriver (new XmlMXCAFDoc_AssemblyItemRefDriver(anMsgDrv)); aDriverTable -> AddDriver (new XmlMXCAFDoc_DatumDriver (anMsgDrv)); aDriverTable -> AddDriver (new XmlMXCAFDoc_DimTolDriver (anMsgDrv)); diff --git a/src/XmlMXCAFDoc/XmlMXCAFDoc.hxx b/src/XmlMXCAFDoc/XmlMXCAFDoc.hxx index a6dc13b1c7..7da0f4edec 100644 --- a/src/XmlMXCAFDoc/XmlMXCAFDoc.hxx +++ b/src/XmlMXCAFDoc/XmlMXCAFDoc.hxx @@ -25,6 +25,7 @@ class Message_Messenger; class XmlMXCAFDoc_CentroidDriver; class XmlMXCAFDoc_ColorDriver; class XmlMXCAFDoc_GraphNodeDriver; +class XmlMXCAFDoc_LengthUnitDriver; class XmlMXCAFDoc_LocationDriver; class XmlMXCAFDoc_DatumDriver; class XmlMXCAFDoc_DimTolDriver; @@ -63,6 +64,7 @@ private: friend class XmlMXCAFDoc_CentroidDriver; friend class XmlMXCAFDoc_ColorDriver; friend class XmlMXCAFDoc_GraphNodeDriver; +friend class XmlMXCAFDoc_LengthUnitDriver; friend class XmlMXCAFDoc_LocationDriver; friend class XmlMXCAFDoc_DatumDriver; friend class XmlMXCAFDoc_DimTolDriver; diff --git a/src/XmlMXCAFDoc/XmlMXCAFDoc_LengthUnitDriver.cxx b/src/XmlMXCAFDoc/XmlMXCAFDoc_LengthUnitDriver.cxx new file mode 100644 index 0000000000..a2dbabd0d7 --- /dev/null +++ b/src/XmlMXCAFDoc/XmlMXCAFDoc_LengthUnitDriver.cxx @@ -0,0 +1,98 @@ +// Copyright (c) 2021 OPEN CASCADE SAS +// +// This file is part of Open CASCADE Technology software library. +// +// This library is free software; you can redistribute it and/or modify it under +// the terms of the GNU Lesser General Public License version 2.1 as published +// by the Free Software Foundation, with special exception defined in the file +// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT +// distribution for complete text of the license and disclaimer of any warranty. +// +// Alternatively, this file may be used under the terms of Open CASCADE +// commercial license or contractual agreement. + +#include + +#include +#include +#include +#include +#include +#include + +IMPLEMENT_STANDARD_RTTIEXT(XmlMXCAFDoc_LengthUnitDriver, XmlMDF_ADriver) +IMPLEMENT_DOMSTRING(UnitScaleValue, "value") + +//======================================================================= +//function : XmlMXCAFDoc_LengthUnitDriver +//purpose : Constructor +//======================================================================= +XmlMXCAFDoc_LengthUnitDriver::XmlMXCAFDoc_LengthUnitDriver +(const Handle(Message_Messenger)& theMsgDriver) + : XmlMDF_ADriver(theMsgDriver, "xcaf", "LengthUnit") +{} + +//======================================================================= +//function : NewEmpty +//purpose : +//======================================================================= +Handle(TDF_Attribute) XmlMXCAFDoc_LengthUnitDriver::NewEmpty() const +{ + return (new XCAFDoc_LengthUnit()); +} + +//======================================================================= +//function : Paste +//purpose : persistent -> transient (retrieve) +//======================================================================= +Standard_Boolean XmlMXCAFDoc_LengthUnitDriver::Paste(const XmlObjMgt_Persistent& theSource, + const Handle(TDF_Attribute)& theTarget, + XmlObjMgt_RRelocationTable&) const +{ + XmlObjMgt_DOMString aNameStr = XmlObjMgt::GetStringValue(theSource); + + if (aNameStr == NULL) + { + TCollection_ExtendedString aMessageString = + TCollection_ExtendedString("Cannot retrieve LengthUnit attribute"); + myMessageDriver->Send(aMessageString, Message_Fail); + return Standard_False; + } + const XmlObjMgt_Element& anElement = theSource; + XmlObjMgt_DOMString aUnitScaleValue = anElement.getAttribute(::UnitScaleValue()); + if (aUnitScaleValue == NULL) + { + TCollection_ExtendedString aMessageString + ("Cannot retrieve LengthUnit scale factor"); + myMessageDriver->Send(aMessageString, Message_Fail); + return Standard_False; + } + TCollection_AsciiString aScaleFactor(aUnitScaleValue.GetString()); + TCollection_AsciiString anUnitName(aNameStr.GetString()); + if (!aScaleFactor.IsRealValue(true)) + { + TCollection_ExtendedString aMessageString + ("Cannot retrieve LengthUnit scale factor"); + myMessageDriver->Send(aMessageString, Message_Fail); + return Standard_False; + } + + Handle(XCAFDoc_LengthUnit) anInt = Handle(XCAFDoc_LengthUnit)::DownCast(theTarget); + anInt->Set(anUnitName, aScaleFactor.RealValue()); + return Standard_True; +} + +//======================================================================= +//function : Paste +//purpose : transient -> persistent (store) +//======================================================================= +void XmlMXCAFDoc_LengthUnitDriver::Paste (const Handle(TDF_Attribute)& theSource, + XmlObjMgt_Persistent& theTarget, + XmlObjMgt_SRelocationTable& ) const +{ + Handle(XCAFDoc_LengthUnit) anAtt = Handle(XCAFDoc_LengthUnit)::DownCast(theSource); + XmlObjMgt_DOMString aNameUnit = anAtt->GetUnitName().ToCString(); + XmlObjMgt_DOMString aValueUnit = TCollection_AsciiString(anAtt->GetUnitValue()).ToCString(); + XmlObjMgt::SetStringValue (theTarget, aNameUnit); + theTarget.Element().setAttribute(::UnitScaleValue(), aValueUnit); +} diff --git a/src/XmlMXCAFDoc/XmlMXCAFDoc_LengthUnitDriver.hxx b/src/XmlMXCAFDoc/XmlMXCAFDoc_LengthUnitDriver.hxx new file mode 100644 index 0000000000..e0954f6308 --- /dev/null +++ b/src/XmlMXCAFDoc/XmlMXCAFDoc_LengthUnitDriver.hxx @@ -0,0 +1,54 @@ +// Copyright (c) 2021 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 _XmlMXCAFDoc_LengthUnitDriver_HeaderFile +#define _XmlMXCAFDoc_LengthUnitDriver_HeaderFile + +#include +#include + +#include +#include +#include +#include +class Message_Messenger; +class TDF_Attribute; +class XmlObjMgt_Persistent; + + +class XmlMXCAFDoc_LengthUnitDriver; +DEFINE_STANDARD_HANDLE(XmlMXCAFDoc_LengthUnitDriver, XmlMDF_ADriver) + +//! Attribute Driver. +class XmlMXCAFDoc_LengthUnitDriver : public XmlMDF_ADriver +{ + +public: + + Standard_EXPORT XmlMXCAFDoc_LengthUnitDriver(const Handle(Message_Messenger)& theMessageDriver); + + Standard_EXPORT virtual Handle(TDF_Attribute) NewEmpty() const Standard_OVERRIDE; + + Standard_EXPORT virtual Standard_Boolean Paste (const XmlObjMgt_Persistent& theSource, + const Handle(TDF_Attribute)& theTarget, + XmlObjMgt_RRelocationTable& theRelocTable) const Standard_OVERRIDE; + + Standard_EXPORT virtual void Paste (const Handle(TDF_Attribute)& theSource, + XmlObjMgt_Persistent& theTarget, + XmlObjMgt_SRelocationTable& theRelocTable) const Standard_OVERRIDE; + + DEFINE_STANDARD_RTTIEXT(XmlMXCAFDoc_LengthUnitDriver,XmlMDF_ADriver) + +}; + +#endif // _XmlMXCAFDoc_LengthUnitDriver_HeaderFile diff --git a/tests/bugs/xde/bug22962 b/tests/bugs/xde/bug22962 index 53b527dc9e..97d19c6f58 100755 --- a/tests/bugs/xde/bug22962 +++ b/tests/bugs/xde/bug22962 @@ -7,7 +7,7 @@ puts "" ####################################################################### set BugNumber OCC22962 -set check_value 96 +set check_value 97 pload DCAF ReadStep D1 [locate_data_file OCC22962-dm1-oc-214.stp] diff --git a/tests/bugs/xde/bug31382 b/tests/bugs/xde/bug31382 new file mode 100644 index 0000000000..cc6773e3a7 --- /dev/null +++ b/tests/bugs/xde/bug31382 @@ -0,0 +1,81 @@ +puts "# ==============================================================================" +puts "# 0031382: Data Exchange - BinXCAF should preserve length unit information" +puts "# ==============================================================================" + +pload DCAF + +box b 10 20 30 + +catch { Close D } +catch { Close D1 } +# check saving value of length unit +NewDocument D XmlXCAF +XAddShape D b 0 +XSetLengthUnit D in +XSave D ${imagedir}/${casename}.xml +XOpen ${imagedir}//${casename}.xml D1 +set LU [XGetLengthUnit D1] +if {$LU != "in"} { + puts "Error: Length unit is not coincided with given1" +} +Close D +Close D1 +NewDocument D BinXCAF +XAddShape D b 0 +XSetLengthUnit D m +XSave D ${imagedir}/${casename}.xbf +XOpen ${imagedir}//${casename}.xbf D1 +set LU [XGetLengthUnit D1] +if {$LU != "m"} { + puts "Error: Length unit is not coincided with given2" +} +Close D +Close D1 + +# if length unit is undefined in the document value from session +# must be set to document before saving it to xml +NewDocument D XmlXCAF +param xstep.cascade.unit 5 +XAddShape D b 0 +XSave D ${imagedir}/${casename}.xml +set LU [XGetLengthUnit D] +if {$LU == "mm"} { + puts "Error: Length unit is not coincided with given3" +} +XOpen ${imagedir}//${casename}.xml D1 +set LU [XGetLengthUnit D1] +if {$LU == "stat.mile"} { + puts "Length unit is coincided with given" +} else { + puts "Error: Length unit is not coincided with given4" +} +Close D +Close D1 + +# if length unit is undefined in the document value from session +# must be set to document before saving it to xbf +NewDocument D BinXCAF +param xstep.cascade.unit 7 +XAddShape D b 0 +XSave D ${imagedir}/${casename}.xbf +set LU [XGetLengthUnit D] +if {$LU == "km"} { + puts "Length unit is coincided with given" +} else { + puts "Error: Length unit is not coincided with given" +} +XOpen ${imagedir}//${casename}.xbf D1 +set LU [XGetLengthUnit D1] +if {$LU == "km"} { + puts "Length unit is coincided with given" +} else { + puts "Error: Length unit is not coincided with given" +} + +# return to default global unit +param xstep.cascade.unit 2 +file delete ${imagedir}//${casename}.xbf +file delete ${imagedir}//${casename}.xml + +Close D +Close D1 diff --git a/tests/de/begin b/tests/de/begin index 056eb262e8..7dbfbf66fb 100644 --- a/tests/de/begin +++ b/tests/de/begin @@ -8,5 +8,8 @@ cpulimit 1000 NewDocument D BinXCAF UndoLimit D 100 +# Local length unit value +set lengthunit_start "" + # Open a transaction NewCommand D diff --git a/tests/de/end b/tests/de/end index 7fe1a83195..be9d6b28f0 100644 --- a/tests/de/end +++ b/tests/de/end @@ -38,6 +38,8 @@ set fa_Second 0; set sh_Second 0; set so_Second 0; set co_Second 0; set shpp_Sec ###################################### CHECKSHAPE ################## set chwi_First 0; set chfa_First 0; set chsh_First 0; set chso_First 0 set chwi_Second 0; set chfa_Second 0; set chsh_Second 0; set chso_Second 0 +#################################################UNITS############# +set lengthunit_First ""; set lengthunit_Second ""; ################################################################### set ref_Compare 0 set todo_msg "" @@ -48,6 +50,10 @@ set end_line "\" \n" # Read original file if { [string length $filename] > 1} { + XNewDoc D_First + if { $lengthunit_start != "" } { + XSetLengthUnit D_First $lengthunit_start + } set ext [file extension $filename] set ReadCommand ReadStep set WriteCommand WriteStep @@ -75,7 +81,9 @@ if { [string length $filename] > 1} { # Get information about translation if { $mist < 1} { puts "" - + if { $lengthunit_start != "" } { + set lengthunit_First [XGetLengthUnit D_First] + } set tps_2 [data c] if { [llength $tps_2] > 0 } { # Finding all strings with warnings @@ -248,7 +256,10 @@ if { $mist < 1} { set mist_w 1 } if { $mist_w < 1 } { - + XNewDoc D_Second + if { $lengthunit_start != "" } { + XSetLengthUnit D_Second $lengthunit_start + } if { [catch { $ReadCommand D_Second $imagedir/${casename}_D_First$ext } catch_result] } { set err_msg "Error: Second - file was not read - exception" puts $err_msg @@ -274,7 +285,9 @@ if { $mist_w > 0 || $mist_Second > 0 } { # Get information about translation if { $mist < 1} { puts "" - + if { $lengthunit_start != "" } { + set lengthunit_Second [XGetLengthUnit D_Second] + } set tps_2 [data c] if { [llength $tps_2] > 0 } { # Finding all strings with warnings @@ -599,6 +612,13 @@ if { $dump_file == 1 } { puts $fd_stream "set ProductMode OFF" } puts $fd_stream "set filename $filename" + + if {$lengthunit_start != ""} { + puts $fd_stream "" + puts $fd_stream "# set $lengthunit_start as local lenght unit" + puts $fd_stream "set lengthunit_start \"$lengthunit_start\"" + } + if { $mist != 1 } { puts $fd_stream "" puts $fd_stream "set ref_data \{" @@ -718,7 +738,10 @@ if { $dump_file != 0 } { puts "Error : $ref_Compare differences with reference data found :\n$err_compare_ref" } else { puts "Comparison of current result with reference data - OK\n" - } + } + if { $lengthunit_First != $lengthunit_Second } { + puts "Error: different length units $lengthunit_First & $lengthunit_Second in result documents" + } } puts "--------------------------------------------------------------------" diff --git a/tests/de/iges_1/A2 b/tests/de/iges_1/A2 index 51ba39c15b..c927fd8c73 100644 --- a/tests/de/iges_1/A2 +++ b/tests/de/iges_1/A2 @@ -1,13 +1,16 @@ # !!!! This file is generated automatically, do not edit manually! See end script set filename buc40130.igs +# set min as local length unit +set lengthunit_start "min" + set ref_data { DATA : Faulties = 0 ( 0 ) Warnings = 0 ( 1 ) Summary = 0 ( 1 ) TPSTAT : Faulties = 0 ( 0 ) Warnings = 38 ( 54 ) Summary = 38 ( 54 ) CHECKSHAPE : Wires = 0 ( 0 ) Faces = 0 ( 0 ) Shells = 0 ( 0 ) Solids = 0 ( 0 ) NBSHAPES : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 3312 ( 3312 ) STATSHAPE : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 3312 ( 3312 ) FreeWire = 0 ( 0 ) -TOLERANCE : MaxTol = 0.9010557082 ( 0.9010557089 ) AvgTol = 0.005653398036 ( 0.005653399581 ) +TOLERANCE : MaxTol = 0.9957815729 ( 12.75113485 ) AvgTol = 0.1129308837 ( 0.1590338739 ) LABELS : N0Labels = 3312 ( 3312 ) N1Labels = 0 ( 0 ) N2Labels = 0 ( 0 ) TotalLabels = 3312 ( 3312 ) NameLabels = 3312 ( 3312 ) ColorLabels = 0 ( 0 ) LayerLabels = 0 ( 0 ) PROPS : Centroid = 0 ( 0 ) Volume = 0 ( 0 ) Area = 0 ( 0 ) NCOLORS : NColors = 0 ( 0 ) diff --git a/tests/de/iges_1/B4 b/tests/de/iges_1/B4 index ecbda70cfa..9c480c2486 100644 --- a/tests/de/iges_1/B4 +++ b/tests/de/iges_1/B4 @@ -1,13 +1,16 @@ # !!!! This file is generated automatically, do not edit manually! See end script set filename t500core.igs +# set min as local length unit +set lengthunit_start "min" + set ref_data { DATA : Faulties = 0 ( 0 ) Warnings = 0 ( 0 ) Summary = 0 ( 0 ) -TPSTAT : Faulties = 0 ( 0 ) Warnings = 169 ( 444 ) Summary = 169 ( 444 ) -CHECKSHAPE : Wires = 0 ( 0 ) Faces = 0 ( 0 ) Shells = 0 ( 0 ) Solids = 0 ( 0 ) +TPSTAT : Faulties = 0 ( 0 ) Warnings = 179 ( 535 ) Summary = 179 ( 535 ) +CHECKSHAPE : Wires = 5 ( 5 ) Faces = 5 ( 5 ) Shells = 0 ( 0 ) Solids = 0 ( 0 ) NBSHAPES : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 674 ( 674 ) STATSHAPE : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 674 ( 674 ) FreeWire = 0 ( 0 ) -TOLERANCE : MaxTol = 0.483503583 ( 0.4835035831 ) AvgTol = 0.003038641057 ( 0.003027097474 ) +TOLERANCE : MaxTol = 0.9933031338 ( 0.9932065271 ) AvgTol = 0.0725721901 ( 0.07359500431 ) LABELS : N0Labels = 702 ( 702 ) N1Labels = 0 ( 0 ) N2Labels = 0 ( 0 ) TotalLabels = 702 ( 702 ) NameLabels = 702 ( 702 ) ColorLabels = 16 ( 16 ) LayerLabels = 702 ( 702 ) PROPS : Centroid = 0 ( 0 ) Volume = 0 ( 0 ) Area = 0 ( 0 ) NCOLORS : NColors = 1 ( 1 ) diff --git a/tests/de/iges_1/M9 b/tests/de/iges_1/M9 index 8b99b0c00e..1b4dca8325 100644 --- a/tests/de/iges_1/M9 +++ b/tests/de/iges_1/M9 @@ -1,13 +1,16 @@ # !!!! This file is generated automatically, do not edit manually! See end script set filename ardi1.igs +# set in as local length unit +set lengthunit_start "in" + set ref_data { DATA : Faulties = 0 ( 2 ) Warnings = 0 ( 1 ) Summary = 0 ( 3 ) TPSTAT : Faulties = 0 ( 0 ) Warnings = 2 ( 6 ) Summary = 2 ( 6 ) CHECKSHAPE : Wires = 0 ( 0 ) Faces = 0 ( 0 ) Shells = 0 ( 0 ) Solids = 0 ( 0 ) NBSHAPES : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 4 ( 4 ) STATSHAPE : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 4 ( 4 ) FreeWire = 0 ( 0 ) -TOLERANCE : MaxTol = 1.000100016e-007 ( 1.000100016e-007 ) AvgTol = 1.000015387e-007 ( 1.000015387e-007 ) +TOLERANCE : MaxTol = 1.000100001e-007 ( 1.000100001e-007 ) AvgTol = 1.000015385e-007 ( 1.000015385e-007 ) LABELS : N0Labels = 4 ( 4 ) N1Labels = 0 ( 0 ) N2Labels = 0 ( 0 ) TotalLabels = 4 ( 4 ) NameLabels = 4 ( 4 ) ColorLabels = 0 ( 0 ) LayerLabels = 0 ( 0 ) PROPS : Centroid = 0 ( 0 ) Volume = 0 ( 0 ) Area = 0 ( 0 ) NCOLORS : NColors = 0 ( 0 ) diff --git a/tests/de/iges_2/H1 b/tests/de/iges_2/H1 index 5b3dfb4c68..2b3dac1197 100755 --- a/tests/de/iges_2/H1 +++ b/tests/de/iges_2/H1 @@ -1,13 +1,16 @@ # !!!! This file is generated automatically, do not edit manually! See end script set filename waaier_para.igs +# set min as local lenght unit +set lengthunit_start "min" + set ref_data { DATA : Faulties = 0 ( 1 ) Warnings = 0 ( 1 ) Summary = 0 ( 2 ) -TPSTAT : Faulties = 0 ( 0 ) Warnings = 40 ( 622 ) Summary = 40 ( 622 ) -CHECKSHAPE : Wires = 2 ( 2 ) Faces = 3 ( 3 ) Shells = 0 ( 0 ) Solids = 0 ( 0 ) +TPSTAT : Faulties = 0 ( 0 ) Warnings = 56 ( 608 ) Summary = 56 ( 608 ) +CHECKSHAPE : Wires = 0 ( 0 ) Faces = 0 ( 0 ) Shells = 0 ( 0 ) Solids = 0 ( 0 ) NBSHAPES : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 162 ( 162 ) STATSHAPE : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 162 ( 162 ) FreeWire = 0 ( 0 ) -TOLERANCE : MaxTol = 0.9221218176 ( 0.9410156556 ) AvgTol = 0.01501977367 ( 0.01438008679 ) +TOLERANCE : MaxTol = 0.4450036298 ( 0.4450020791 ) AvgTol = 0.004412017114 ( 0.004434725442 ) LABELS : N0Labels = 162 ( 162 ) N1Labels = 0 ( 0 ) N2Labels = 0 ( 0 ) TotalLabels = 162 ( 162 ) NameLabels = 162 ( 162 ) ColorLabels = 162 ( 162 ) LayerLabels = 162 ( 162 ) PROPS : Centroid = 0 ( 0 ) Volume = 0 ( 0 ) Area = 0 ( 0 ) NCOLORS : NColors = 1 ( 1 ) diff --git a/tests/de/step_1/E4 b/tests/de/step_1/E4 index 0ce212cf0a..8893606cd3 100644 --- a/tests/de/step_1/E4 +++ b/tests/de/step_1/E4 @@ -1,13 +1,16 @@ # !!!! This file is generated automatically, do not edit manually! See end script set filename r0701_ug.stp +# set in as local length unit +set lengthunit_start "in" + set ref_data { DATA : Faulties = 0 ( 0 ) Warnings = 0 ( 0 ) Summary = 0 ( 0 ) TPSTAT : Faulties = 0 ( 0 ) Warnings = 3 ( 20 ) Summary = 3 ( 20 ) CHECKSHAPE : Wires = 0 ( 0 ) Faces = 0 ( 0 ) Shells = 0 ( 0 ) Solids = 0 ( 0 ) NBSHAPES : Solid = 1 ( 1 ) Shell = 1 ( 1 ) Face = 26 ( 26 ) STATSHAPE : Solid = 1 ( 1 ) Shell = 1 ( 1 ) Face = 26 ( 26 ) FreeWire = 0 ( 0 ) -TOLERANCE : MaxTol = 1.497084727e-005 ( 1.497084651e-005 ) AvgTol = 2.422471639e-006 ( 7.787901742e-006 ) +TOLERANCE : MaxTol = 2.908188025e-006 ( 1e-005 ) AvgTol = 2.202340438e-007 ( 6.439786142e-006 ) LABELS : N0Labels = 1 ( 1 ) N1Labels = 0 ( 0 ) N2Labels = 0 ( 0 ) TotalLabels = 1 ( 1 ) NameLabels = 1 ( 1 ) ColorLabels = 1 ( 1 ) LayerLabels = 0 ( 0 ) PROPS : Centroid = 0 ( 0 ) Volume = 0 ( 0 ) Area = 0 ( 0 ) NCOLORS : NColors = 1 ( 1 ) diff --git a/tests/de/step_1/J5 b/tests/de/step_1/J5 index 322cd38916..8556295451 100644 --- a/tests/de/step_1/J5 +++ b/tests/de/step_1/J5 @@ -1,13 +1,16 @@ # !!!! This file is generated automatically, do not edit manually! See end script set filename bm1_ie_t4.stp +# set in as local length unit +set lengthunit_start "in" + set ref_data { DATA : Faulties = 0 ( 0 ) Warnings = 0 ( 0 ) Summary = 0 ( 0 ) TPSTAT : Faulties = 0 ( 0 ) Warnings = 0 ( 0 ) Summary = 0 ( 0 ) CHECKSHAPE : Wires = 0 ( 0 ) Faces = 0 ( 0 ) Shells = 0 ( 0 ) Solids = 0 ( 0 ) NBSHAPES : Solid = 0 ( 0 ) Shell = 15 ( 15 ) Face = 16 ( 16 ) STATSHAPE : Solid = 0 ( 0 ) Shell = 15 ( 15 ) Face = 16 ( 16 ) FreeWire = 0 ( 0 ) -TOLERANCE : MaxTol = 0.005727453836 ( 0.005727453946 ) AvgTol = 0.001247002689 ( 0.001247002697 ) +TOLERANCE : MaxTol = 0.0002254903085 ( 0.0002254903128 ) AvgTol = 4.915646123e-005 ( 4.915646149e-005 ) LABELS : N0Labels = 1 ( 1 ) N1Labels = 0 ( 0 ) N2Labels = 0 ( 0 ) TotalLabels = 1 ( 1 ) NameLabels = 1 ( 1 ) ColorLabels = 0 ( 0 ) LayerLabels = 0 ( 0 ) PROPS : Centroid = 0 ( 0 ) Volume = 0 ( 0 ) Area = 0 ( 0 ) NCOLORS : NColors = 0 ( 0 ) diff --git a/tests/de/step_1/O7 b/tests/de/step_1/O7 index 5847fb98cb..7ebda2b4ad 100644 --- a/tests/de/step_1/O7 +++ b/tests/de/step_1/O7 @@ -1,6 +1,9 @@ # !!!! This file is generated automatically, do not edit manually! See end script set filename dnc_63_050_ppv_a.stp +# set in as local length unit +set lengthunit_start "in" + set ref_data { DATA : Faulties = 0 ( 0 ) Warnings = 0 ( 0 ) Summary = 0 ( 0 ) TPSTAT : Faulties = 0 ( 0 ) Warnings = 0 ( 0 ) Summary = 0 ( 0 ) diff --git a/tests/de/step_2/A3 b/tests/de/step_2/A3 index bf6afcb087..d3a584649a 100755 --- a/tests/de/step_2/A3 +++ b/tests/de/step_2/A3 @@ -1,13 +1,16 @@ # !!!! This file is generated automatically, do not edit manually! See end script set filename tr9_r0501-ug.stp +# set in as local length unit +set lengthunit_start "in" + set ref_data { DATA : Faulties = 0 ( 0 ) Warnings = 0 ( 0 ) Summary = 0 ( 0 ) -TPSTAT : Faulties = 0 ( 0 ) Warnings = 1 ( 398 ) Summary = 1 ( 398 ) +TPSTAT : Faulties = 0 ( 0 ) Warnings = 6 ( 403 ) Summary = 6 ( 403 ) CHECKSHAPE : Wires = 0 ( 0 ) Faces = 0 ( 0 ) Shells = 0 ( 0 ) Solids = 0 ( 0 ) NBSHAPES : Solid = 1 ( 1 ) Shell = 1 ( 1 ) Face = 532 ( 532 ) STATSHAPE : Solid = 1 ( 1 ) Shell = 1 ( 1 ) Face = 532 ( 532 ) FreeWire = 0 ( 0 ) -TOLERANCE : MaxTol = 1.956021749e-005 ( 0.0003145873437 ) AvgTol = 8.898149576e-007 ( 7.870748276e-006 ) +TOLERANCE : MaxTol = 1e-005 ( 1.238532849e-005 ) AvgTol = 2.427533179e-007 ( 6.244877739e-006 ) LABELS : N0Labels = 1 ( 1 ) N1Labels = 0 ( 0 ) N2Labels = 0 ( 0 ) TotalLabels = 1 ( 1 ) NameLabels = 1 ( 1 ) ColorLabels = 1 ( 1 ) LayerLabels = 0 ( 0 ) PROPS : Centroid = 0 ( 0 ) Volume = 0 ( 0 ) Area = 0 ( 0 ) NCOLORS : NColors = 1 ( 1 ) diff --git a/tests/de/step_2/M3 b/tests/de/step_2/M3 index fb8bd61879..cfe8e5673b 100644 --- a/tests/de/step_2/M3 +++ b/tests/de/step_2/M3 @@ -1,13 +1,16 @@ # !!!! This file is generated automatically, do not edit manually! See end script set filename ca_exhaust.stp +# set in as local length unit +set lengthunit_start "in" + set ref_data { DATA : Faulties = 0 ( 0 ) Warnings = 0 ( 0 ) Summary = 0 ( 0 ) TPSTAT : Faulties = 0 ( 0 ) Warnings = 10 ( 12 ) Summary = 10 ( 12 ) CHECKSHAPE : Wires = 0 ( 0 ) Faces = 0 ( 0 ) Shells = 0 ( 0 ) Solids = 0 ( 0 ) NBSHAPES : Solid = 1 ( 1 ) Shell = 1 ( 1 ) Face = 32 ( 32 ) STATSHAPE : Solid = 1 ( 1 ) Shell = 1 ( 1 ) Face = 32 ( 32 ) FreeWire = 0 ( 0 ) -TOLERANCE : MaxTol = 0.009164178529 ( 0.009164178525 ) AvgTol = 0.001138135471 ( 0.001138139984 ) +TOLERANCE : MaxTol = 0.0003607944462 ( 0.000360794446 ) AvgTol = 4.485642177e-005 ( 4.485642172e-005 ) LABELS : N0Labels = 1 ( 1 ) N1Labels = 0 ( 0 ) N2Labels = 0 ( 0 ) TotalLabels = 1 ( 1 ) NameLabels = 1 ( 1 ) ColorLabels = 0 ( 0 ) LayerLabels = 0 ( 0 ) PROPS : Centroid = 0 ( 0 ) Volume = 0 ( 0 ) Area = 0 ( 0 ) NCOLORS : NColors = 0 ( 0 ) diff --git a/tests/de/step_2/Q2 b/tests/de/step_2/Q2 index 5b2290443a..ee61fe25bc 100644 --- a/tests/de/step_2/Q2 +++ b/tests/de/step_2/Q2 @@ -1,13 +1,16 @@ # !!!! This file is generated automatically, do not edit manually! See end script set filename trj5_k1-al-214.stp +# set in as local length unit +set lengthunit_start "in" + set ref_data { DATA : Faulties = 0 ( 0 ) Warnings = 0 ( 0 ) Summary = 0 ( 0 ) -TPSTAT : Faulties = 0 ( 0 ) Warnings = 23 ( 23 ) Summary = 23 ( 23 ) +TPSTAT : Faulties = 0 ( 0 ) Warnings = 24 ( 24 ) Summary = 24 ( 24 ) CHECKSHAPE : Wires = 0 ( 0 ) Faces = 0 ( 0 ) Shells = 0 ( 0 ) Solids = 0 ( 0 ) NBSHAPES : Solid = 1 ( 1 ) Shell = 1 ( 1 ) Face = 39 ( 39 ) STATSHAPE : Solid = 1 ( 1 ) Shell = 1 ( 1 ) Face = 39 ( 39 ) FreeWire = 0 ( 0 ) -TOLERANCE : MaxTol = 0.001016447268 ( 0.001059860842 ) AvgTol = 0.0001469856415 ( 0.0001714018813 ) +TOLERANCE : MaxTol = 4.0017609e-005 ( 4.172680481e-005 ) AvgTol = 5.844755983e-006 ( 6.806025269e-006 ) LABELS : N0Labels = 1 ( 1 ) N1Labels = 0 ( 0 ) N2Labels = 0 ( 0 ) TotalLabels = 1 ( 1 ) NameLabels = 1 ( 1 ) ColorLabels = 1 ( 1 ) LayerLabels = 0 ( 0 ) PROPS : Centroid = 0 ( 0 ) Volume = 0 ( 0 ) Area = 0 ( 0 ) NCOLORS : NColors = 1 ( 1 ) diff --git a/tests/de/step_2/X1 b/tests/de/step_2/X1 index 5eca6164c8..1be2ee1e99 100644 --- a/tests/de/step_2/X1 +++ b/tests/de/step_2/X1 @@ -1,13 +1,16 @@ # !!!! This file is generated automatically, do not edit manually! See end script set filename trj9_b2-in-214.stp +# set in as local length unit +set lengthunit_start "in" + set ref_data { DATA : Faulties = 0 ( 0 ) Warnings = 0 ( 0 ) Summary = 0 ( 0 ) TPSTAT : Faulties = 0 ( 0 ) Warnings = 12 ( 17 ) Summary = 12 ( 17 ) CHECKSHAPE : Wires = 0 ( 0 ) Faces = 0 ( 0 ) Shells = 0 ( 0 ) Solids = 0 ( 0 ) NBSHAPES : Solid = 1 ( 1 ) Shell = 2 ( 2 ) Face = 306 ( 306 ) STATSHAPE : Solid = 1 ( 1 ) Shell = 2 ( 2 ) Face = 306 ( 306 ) FreeWire = 0 ( 0 ) -TOLERANCE : MaxTol = 0.1005256507 ( 0.1005256507 ) AvgTol = 0.0007133932383 ( 0.0007138150606 ) +TOLERANCE : MaxTol = 0.003957702784 ( 0.003957702784 ) AvgTol = 2.816914725e-005 ( 2.817757736e-005 ) LABELS : N0Labels = 1 ( 1 ) N1Labels = 0 ( 0 ) N2Labels = 0 ( 0 ) TotalLabels = 1 ( 1 ) NameLabels = 1 ( 1 ) ColorLabels = 1 ( 1 ) LayerLabels = 0 ( 0 ) PROPS : Centroid = 0 ( 0 ) Volume = 0 ( 0 ) Area = 0 ( 0 ) NCOLORS : NColors = 1 ( 1 ) diff --git a/tests/de/step_3/A5 b/tests/de/step_3/A5 index b2559ed5f5..bbfa0907dd 100755 --- a/tests/de/step_3/A5 +++ b/tests/de/step_3/A5 @@ -1,13 +1,16 @@ # !!!! This file is generated automatically, do not edit manually! See end script set filename trj8_pm6-hc-214.stp +# set in as local length unit +set lengthunit_start "in" + set ref_data { DATA : Faulties = 0 ( 0 ) Warnings = 0 ( 80 ) Summary = 0 ( 80 ) -TPSTAT : Faulties = 0 ( 0 ) Warnings = 14 ( 545 ) Summary = 14 ( 545 ) +TPSTAT : Faulties = 0 ( 0 ) Warnings = 10 ( 539 ) Summary = 10 ( 539 ) CHECKSHAPE : Wires = 0 ( 0 ) Faces = 0 ( 0 ) Shells = 0 ( 0 ) Solids = 0 ( 0 ) NBSHAPES : Solid = 98 ( 98 ) Shell = 98 ( 98 ) Face = 1504 ( 1504 ) STATSHAPE : Solid = 272 ( 272 ) Shell = 272 ( 272 ) Face = 3214 ( 3214 ) FreeWire = 0 ( 0 ) -TOLERANCE : MaxTol = 0.9320948364 ( 3.3196868 ) AvgTol = 0.0006692755906 ( 0.003731702354 ) +TOLERANCE : MaxTol = 0.050070202 ( 0.1306963307 ) AvgTol = 2.387622465e-005 ( 0.0001483894796 ) LABELS : N0Labels = 230 ( 230 ) N1Labels = 1907 ( 1907 ) N2Labels = 0 ( 0 ) TotalLabels = 2137 ( 2137 ) NameLabels = 633 ( 633 ) ColorLabels = 1602 ( 1602 ) LayerLabels = 0 ( 0 ) PROPS : Centroid = 161 ( 161 ) Volume = 161 ( 161 ) Area = 161 ( 161 ) NCOLORS : NColors = 6 ( 6 ) diff --git a/tests/de/step_3/F2 b/tests/de/step_3/F2 index 91e4308932..4a58c10f35 100644 --- a/tests/de/step_3/F2 +++ b/tests/de/step_3/F2 @@ -1,13 +1,16 @@ # !!!! This file is generated automatically, do not edit manually! See end script set filename PRO10368.stp +# set in as local length unit +set lengthunit_start "in" + set ref_data { DATA : Faulties = 0 ( 0 ) Warnings = 0 ( 0 ) Summary = 0 ( 0 ) -TPSTAT : Faulties = 0 ( 0 ) Warnings = 128 ( 158 ) Summary = 128 ( 158 ) -CHECKSHAPE : Wires = 0 ( 0 ) Faces = 0 ( 0 ) Shells = 0 ( 0 ) Solids = 0 ( 0 ) +TPSTAT : Faulties = 0 ( 0 ) Warnings = 100 ( 111 ) Summary = 100 ( 111 ) +CHECKSHAPE : Wires = 2 ( 2 ) Faces = 2 ( 2 ) Shells = 0 ( 0 ) Solids = 0 ( 0 ) NBSHAPES : Solid = 0 ( 0 ) Shell = 3 ( 3 ) Face = 773 ( 773 ) STATSHAPE : Solid = 0 ( 0 ) Shell = 3 ( 3 ) Face = 773 ( 773 ) FreeWire = 0 ( 0 ) -TOLERANCE : MaxTol = 0.06070038836 ( 0.06070038829 ) AvgTol = 0.002531214122 ( 0.003392486293 ) +TOLERANCE : MaxTol = 0.01182785352 ( 0.01199490965 ) AvgTol = 0.0001340065537 ( 0.0001692956662 ) LABELS : N0Labels = 1 ( 1 ) N1Labels = 3 ( 3 ) N2Labels = 0 ( 0 ) TotalLabels = 4 ( 4 ) NameLabels = 1 ( 1 ) ColorLabels = 0 ( 0 ) LayerLabels = 3 ( 3 ) PROPS : Centroid = 0 ( 0 ) Volume = 0 ( 0 ) Area = 0 ( 0 ) NCOLORS : NColors = 0 ( 0 ) diff --git a/tests/de/step_4/A5 b/tests/de/step_4/A5 index 4b0af3eaad..03e7516396 100644 --- a/tests/de/step_4/A5 +++ b/tests/de/step_4/A5 @@ -1,13 +1,16 @@ # !!!! This file is generated automatically, do not edit manually! See end script set filename BUC60031.stp +# set in as local length unit +set lengthunit_start "in" + set ref_data { DATA : Faulties = 0 ( 0 ) Warnings = 0 ( 0 ) Summary = 0 ( 0 ) TPSTAT : Faulties = 0 ( 0 ) Warnings = 0 ( 0 ) Summary = 0 ( 0 ) CHECKSHAPE : Wires = 0 ( 0 ) Faces = 0 ( 0 ) Shells = 0 ( 0 ) Solids = 0 ( 0 ) NBSHAPES : Solid = 1 ( 1 ) Shell = 1 ( 1 ) Face = 22 ( 22 ) STATSHAPE : Solid = 1 ( 1 ) Shell = 1 ( 1 ) Face = 22 ( 22 ) FreeWire = 0 ( 0 ) -TOLERANCE : MaxTol = 0.01755144512 ( 0.05734823138 ) AvgTol = 0.004026424043 ( 0.008725930264 ) +TOLERANCE : MaxTol = 0.0008790534196 ( 0.002257804385 ) AvgTol = 0.0002077159479 ( 0.0003435677762 ) LABELS : N0Labels = 3 ( 3 ) N1Labels = 19 ( 19 ) N2Labels = 0 ( 0 ) TotalLabels = 22 ( 22 ) NameLabels = 5 ( 5 ) ColorLabels = 18 ( 18 ) LayerLabels = 0 ( 0 ) PROPS : Centroid = 0 ( 0 ) Volume = 0 ( 0 ) Area = 0 ( 0 ) NCOLORS : NColors = 4 ( 4 ) diff --git a/tests/de/step_4/C9 b/tests/de/step_4/C9 index 38b263a388..5b79700aae 100644 --- a/tests/de/step_4/C9 +++ b/tests/de/step_4/C9 @@ -1,13 +1,16 @@ # !!!! This file is generated automatically, do not edit manually! See end script set filename db_exhaust-A.stp +# set in as local length unit +set lengthunit_start "in" + set ref_data { DATA : Faulties = 0 ( 0 ) Warnings = 0 ( 0 ) Summary = 0 ( 0 ) -TPSTAT : Faulties = 0 ( 0 ) Warnings = 4 ( 6 ) Summary = 4 ( 6 ) +TPSTAT : Faulties = 0 ( 0 ) Warnings = 6 ( 6 ) Summary = 6 ( 6 ) CHECKSHAPE : Wires = 0 ( 0 ) Faces = 0 ( 0 ) Shells = 0 ( 0 ) Solids = 0 ( 0 ) NBSHAPES : Solid = 3 ( 3 ) Shell = 3 ( 3 ) Face = 41 ( 41 ) STATSHAPE : Solid = 3 ( 3 ) Shell = 3 ( 3 ) Face = 41 ( 41 ) FreeWire = 0 ( 0 ) -TOLERANCE : MaxTol = 0.003918852111 ( 0.02740530648 ) AvgTol = 0.0003818720564 ( 0.001490986976 ) +TOLERANCE : MaxTol = 8.622882581e-005 ( 0.0009633609586 ) AvgTol = 9.2909299e-006 ( 5.719855947e-005 ) LABELS : N0Labels = 1 ( 1 ) N1Labels = 3 ( 3 ) N2Labels = 0 ( 0 ) TotalLabels = 4 ( 4 ) NameLabels = 1 ( 1 ) ColorLabels = 3 ( 3 ) LayerLabels = 3 ( 3 ) PROPS : Centroid = 0 ( 0 ) Volume = 0 ( 0 ) Area = 0 ( 0 ) NCOLORS : NColors = 1 ( 1 ) diff --git a/tests/de/step_4/E3 b/tests/de/step_4/E3 index fff471648c..6d62ff26b3 100644 --- a/tests/de/step_4/E3 +++ b/tests/de/step_4/E3 @@ -1,13 +1,16 @@ # !!!! This file is generated automatically, do not edit manually! See end script set filename tr9_r0101-pe.stp +# set in as local length unit +set lengthunit_start "in" + set ref_data { DATA : Faulties = 0 ( 0 ) Warnings = 0 ( 0 ) Summary = 0 ( 0 ) -TPSTAT : Faulties = 0 ( 0 ) Warnings = 0 ( 9 ) Summary = 0 ( 9 ) +TPSTAT : Faulties = 0 ( 0 ) Warnings = 0 ( 5 ) Summary = 0 ( 5 ) CHECKSHAPE : Wires = 0 ( 0 ) Faces = 0 ( 0 ) Shells = 0 ( 0 ) Solids = 0 ( 0 ) NBSHAPES : Solid = 1 ( 1 ) Shell = 1 ( 1 ) Face = 621 ( 621 ) STATSHAPE : Solid = 1 ( 1 ) Shell = 1 ( 1 ) Face = 621 ( 621 ) FreeWire = 0 ( 0 ) -TOLERANCE : MaxTol = 0.009439804956 ( 0.06828121929 ) AvgTol = 0.002407155114 ( 0.006125891304 ) +TOLERANCE : MaxTol = 0.0003716458644 ( 0.001004445675 ) AvgTol = 9.473671712e-005 ( 0.0002334520641 ) LABELS : N0Labels = 1 ( 1 ) N1Labels = 0 ( 0 ) N2Labels = 0 ( 0 ) TotalLabels = 1 ( 1 ) NameLabels = 1 ( 1 ) ColorLabels = 1 ( 1 ) LayerLabels = 0 ( 0 ) PROPS : Centroid = 0 ( 0 ) Volume = 0 ( 0 ) Area = 0 ( 0 ) NCOLORS : NColors = 1 ( 1 ) diff --git a/tests/de/step_4/G6 b/tests/de/step_4/G6 index eb9f7c25f4..2f6ca48f0a 100644 --- a/tests/de/step_4/G6 +++ b/tests/de/step_4/G6 @@ -1,13 +1,19 @@ # !!!! This file is generated automatically, do not edit manually! See end script +puts "TODO CR23096 ALL: TOLERANCE : Faulty" + + set filename BUC61003-3.stp +# set in as local length unit +set lengthunit_start "in" + set ref_data { -DATA : Faulties = 0 ( 2 ) Warnings = 0 ( 1611 ) Summary = 0 ( 1613 ) -TPSTAT : Faulties = 0 ( 0 ) Warnings = 108 ( 168 ) Summary = 108 ( 168 ) +DATA : Faulties = 0 ( 1 ) Warnings = 0 ( 1611 ) Summary = 0 ( 1612 ) +TPSTAT : Faulties = 0 ( 0 ) Warnings = 76 ( 168 ) Summary = 76 ( 168 ) CHECKSHAPE : Wires = 0 ( 0 ) Faces = 0 ( 0 ) Shells = 0 ( 0 ) Solids = 0 ( 0 ) NBSHAPES : Solid = 34 ( 34 ) Shell = 34 ( 34 ) Face = 3882 ( 3882 ) STATSHAPE : Solid = 34 ( 34 ) Shell = 34 ( 34 ) Face = 3882 ( 3882 ) FreeWire = 0 ( 0 ) -TOLERANCE : MaxTol = 0.2091571291 ( 0.2091571291 ) AvgTol = 0.0003480273495 ( 0.0003489544134 ) +TOLERANCE : MaxTol = 0.2952785433 ( 0.008234532641 ) AvgTol = 0.0003974949851 ( 1.38845912e-005 ) LABELS : N0Labels = 35 ( 35 ) N1Labels = 34 ( 34 ) N2Labels = 0 ( 0 ) TotalLabels = 69 ( 69 ) NameLabels = 69 ( 69 ) ColorLabels = 0 ( 0 ) LayerLabels = 0 ( 0 ) PROPS : Centroid = 0 ( 0 ) Volume = 0 ( 0 ) Area = 0 ( 0 ) NCOLORS : NColors = 0 ( 0 ) diff --git a/tests/de/step_5/B2 b/tests/de/step_5/B2 index 444da2b355..5fd07ae989 100644 --- a/tests/de/step_5/B2 +++ b/tests/de/step_5/B2 @@ -1,13 +1,16 @@ # !!!! This file is generated automatically, do not edit manually! See end script set filename tr10_r0601_id.stp +# set in as local length unit +set lengthunit_start "in" + set ref_data { DATA : Faulties = 0 ( 0 ) Warnings = 0 ( 0 ) Summary = 0 ( 0 ) -TPSTAT : Faulties = 0 ( 0 ) Warnings = 187 ( 204 ) Summary = 187 ( 204 ) +TPSTAT : Faulties = 0 ( 0 ) Warnings = 177 ( 177 ) Summary = 177 ( 177 ) CHECKSHAPE : Wires = 0 ( 0 ) Faces = 0 ( 0 ) Shells = 0 ( 0 ) Solids = 0 ( 0 ) NBSHAPES : Solid = 1 ( 1 ) Shell = 1 ( 1 ) Face = 1327 ( 1327 ) STATSHAPE : Solid = 1 ( 1 ) Shell = 1 ( 1 ) Face = 1327 ( 1327 ) FreeWire = 0 ( 0 ) -TOLERANCE : MaxTol = 0.0796871773 ( 0.07968717732 ) AvgTol = 0.0006754901311 ( 0.001252692846 ) +TOLERANCE : MaxTol = 0.003137290445 ( 0.003137290446 ) AvgTol = 2.733421898e-005 ( 4.935392768e-005 ) LABELS : N0Labels = 3 ( 3 ) N1Labels = 3707 ( 3707 ) N2Labels = 0 ( 0 ) TotalLabels = 3710 ( 3710 ) NameLabels = 5 ( 5 ) ColorLabels = 3706 ( 3706 ) LayerLabels = 0 ( 0 ) PROPS : Centroid = 0 ( 0 ) Volume = 0 ( 0 ) Area = 0 ( 0 ) NCOLORS : NColors = 8 ( 8 ) diff --git a/tests/de_mesh/gltf_write/helmet b/tests/de_mesh/gltf_write/helmet index a2e9f91485..39d9854714 100644 --- a/tests/de_mesh/gltf_write/helmet +++ b/tests/de_mesh/gltf_write/helmet @@ -4,7 +4,11 @@ puts "Test case exporting glTF model into glTF file." puts "========" Close D1 -silent -ReadGltf D1 [locate_data_file bug30691_DamagedHelmet.gltf] +XNewDoc D1 +XSetLengthUnit D1 cm +ReadGltf D1 [locate_data_file bug30691_DamagedHelmet.gltf] -nocreatedoc +XGetOneShape s1 D1 +set aLProps1 [uplevel #0 sprops $s1] set aTmpGltfBase "${imagedir}/${casename}_tmp" set aTmpGltf "${aTmpGltfBase}.gltf" @@ -14,7 +18,17 @@ lappend occ_tmp_files "${aTmpGltfBase}_textures" WriteGltf D1 "$aTmpGltf" -ReadGltf D "$aTmpGltf" +Close D -silent +XNewDoc D +XSetLengthUnit D cm +ReadGltf D "$aTmpGltf" -nocreatedoc + XGetOneShape s D +set aLProps2 [uplevel #0 sprops $s] checknbshapes s -face 1 -compound 0 checktrinfo s -tri 15452 -nod 14556 +regexp {Mass\s:\s*([0-9\.]+)} $aLProps1 dummy anArea1 +regexp {Mass\s:\s*([0-9\.]+)} $aLProps2 dummy anArea2 +if {abs($anArea1 - $anArea2) > 1e-8 * $anArea1} { + puts "Error: invalid area $anArea1 instead of $anArea2" +} diff --git a/tests/de_mesh/obj_read/ship_boat b/tests/de_mesh/obj_read/ship_boat index 206876b8ac..d138eaf68e 100644 --- a/tests/de_mesh/obj_read/ship_boat +++ b/tests/de_mesh/obj_read/ship_boat @@ -3,7 +3,14 @@ puts "0029296: Data Exchange - implement import of mesh data from files in OBJ f puts "Ship model with transparent windows" puts "========" -ReadObj D [locate_data_file ship_boat.obj] +XNewDoc D +XSetLengthUnit D in +ReadObj D [locate_data_file ship_boat.obj] -nocreatedoc -unit 1 XGetOneShape s D checknbshapes s -face 2359 -compound 2 checktrinfo s -tri 27297 -nod 40496 +set aLProps [uplevel #0 sprops $s] +regexp {Mass\s:\s*([0-9\.e\+]+)} $aLProps dummy anArea +if {abs($anArea - 2.65152e+10) > 1e-8} { + puts "Error: invalid area $anArea instead of 2.65152e+10" +} diff --git a/tests/de_mesh/obj_write/mustang b/tests/de_mesh/obj_write/mustang index e4c494056f..45ffd014d8 100644 --- a/tests/de_mesh/obj_write/mustang +++ b/tests/de_mesh/obj_write/mustang @@ -6,7 +6,12 @@ puts "========" pload XDE OCAF MODELING VISUALIZATION Close D -silent Close D1 -silent -ReadObj D1 [locate_data_file "P-51 Mustang.obj"] + +XNewDoc D1 +XSetLengthUnit D1 cm +ReadObj D1 [locate_data_file "P-51 Mustang.obj"] -nocreatedoc -unit 1 +XGetOneShape s1 D1 +set aLProps1 [uplevel #0 sprops $s1] set aTmpObjBase "${imagedir}/${casename}_tmp" set aTmpObj "${aTmpObjBase}.obj" @@ -16,11 +21,20 @@ lappend occ_tmp_files "${aTmpObjBase}_textures" WriteObj D1 "$aTmpObj" -ReadObj D "$aTmpObj" +XNewDoc D +XSetLengthUnit D cm +ReadObj D "$aTmpObj" -nocreatedoc -unit 1 XGetOneShape s D +set aLProps2 [uplevel #0 sprops $s] checknbshapes s -face 14 -compound 1 checktrinfo s -tri 4309 -nod 4727 +regexp {Mass\s:\s*([0-9\.]+)} $aLProps1 dummy anArea1 +regexp {Mass\s:\s*([0-9\.]+)} $aLProps2 dummy anArea2 +if {abs($anArea1 - $anArea2) > 1e-8 * $anArea1} { + puts "Error: invalid area $anArea1 instead of $anArea2" +} + vclear vinit View1 XDisplay -dispMode 1 D From 45d498ef1ff559c5e4693cd71a167356ee4d7e22 Mon Sep 17 00:00:00 2001 From: msv Date: Thu, 23 Apr 2020 13:13:11 +0300 Subject: [PATCH 018/639] 0031514: Foundation Classes - Add Base64 encoding function The class FSD_Base64Decoder has been renamed to FSD_Base64. The new method FSD_Base64::Encode has been added. The method Decode has been improved for performance. --- src/FSD/FILES | 4 +- src/FSD/FSD_Base64.cxx | 177 +++++++++++++++++++++++++++ src/FSD/FSD_Base64.hxx | 68 ++++++++++ src/FSD/FSD_Base64Decoder.cxx | 106 ---------------- src/FSD/FSD_Base64Decoder.hxx | 30 ----- src/RWGltf/RWGltf_GltfJsonParser.cxx | 20 ++- 6 files changed, 263 insertions(+), 142 deletions(-) create mode 100644 src/FSD/FSD_Base64.cxx create mode 100644 src/FSD/FSD_Base64.hxx delete mode 100644 src/FSD/FSD_Base64Decoder.cxx delete mode 100644 src/FSD/FSD_Base64Decoder.hxx diff --git a/src/FSD/FILES b/src/FSD/FILES index 20ecdc5ef1..11df58edb3 100755 --- a/src/FSD/FILES +++ b/src/FSD/FILES @@ -1,6 +1,6 @@ FILES -FSD_Base64Decoder.cxx -FSD_Base64Decoder.hxx +FSD_Base64.cxx +FSD_Base64.hxx FSD_BinaryFile.cxx FSD_BinaryFile.hxx FSD_BStream.hxx diff --git a/src/FSD/FSD_Base64.cxx b/src/FSD/FSD_Base64.cxx new file mode 100644 index 0000000000..1e92edb68b --- /dev/null +++ b/src/FSD/FSD_Base64.cxx @@ -0,0 +1,177 @@ +// Copyright (c) 2016-2019 OPEN CASCADE SAS +// +// This file is part of Open CASCADE Technology software library. +// +// This library is free software; you can redistribute it and/or modify it under +// the terms of the GNU Lesser General Public License version 2.1 as published +// by the Free Software Foundation, with special exception defined in the file +// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT +// distribution for complete text of the license and disclaimer of any warranty. +// +// Alternatively, this file may be used under the terms of Open CASCADE +// commercial license or contractual agreement. + +#include + +// ======================================================================= +// function : Encode +// ======================================================================= +Standard_Size FSD_Base64::Encode (char* theEncodedStr, + const Standard_Size theStrLen, + const Standard_Byte* theData, + const Standard_Size theDataLen) +{ + static const char aBase64Chars[] = + "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; + if (theDataLen == 0) + { + return 0; + } + + Standard_Size aPad = theDataLen % 3; + const Standard_Size aSize64 = 4 * ((theDataLen + 2) / 3); + if (theEncodedStr == NULL) + { + return aSize64; + } + if (aSize64 > theStrLen) + { + return 0; + } + + Standard_Size iStr = 0; + for (Standard_Size i = 0; i < theDataLen - aPad; i += 3) + { + uint32_t aWord = (uint32_t(theData[i]) << 16) + + (uint32_t(theData[i + 1]) << 8) + + theData[i + 2]; + theEncodedStr[iStr++] = aBase64Chars[aWord >> 18]; + theEncodedStr[iStr++] = aBase64Chars[aWord >> 12 & 0x3F]; + theEncodedStr[iStr++] = aBase64Chars[aWord >> 6 & 0x3F]; + theEncodedStr[iStr++] = aBase64Chars[aWord & 0x3F]; + } + if (aPad-- != 0) + { + if (aPad != 0) + { + uint32_t aWord = uint32_t(theData[theDataLen - 2]) << 8 | theData[theDataLen - 1]; + theEncodedStr[iStr++] = aBase64Chars[aWord >> 10]; + theEncodedStr[iStr++] = aBase64Chars[aWord >> 4 & 0x03F]; + theEncodedStr[iStr++] = aBase64Chars[(aWord & 0xF) << 2]; + } + else + { + uint32_t aWord = theData[theDataLen - 1]; + theEncodedStr[iStr++] = aBase64Chars[aWord >> 2]; + theEncodedStr[iStr++] = aBase64Chars[(aWord & 3) << 4]; + theEncodedStr[iStr++] = '='; + } + } + while (iStr < aSize64) + { + theEncodedStr[iStr++] = '='; + } + return aSize64; +} + +// ======================================================================= +// function : Encode +// ======================================================================= +TCollection_AsciiString FSD_Base64::Encode(const Standard_Byte* theData, + const Standard_Size theDataLen) +{ + Standard_Size aStrLen = Encode (NULL, 0, theData, theDataLen); + TCollection_AsciiString aStr ((Standard_Integer)aStrLen, 0); + Encode (const_cast(aStr.ToCString()), aStrLen, theData, theDataLen); + return aStr; +} + +// ======================================================================= +// function : Decode +// ======================================================================= +Standard_Size FSD_Base64::Decode (Standard_Byte* theDecodedData, + const Standard_Size theDataLen, + Standard_CString theEncodedStr, + const Standard_Size theStrLen) +{ + static const Standard_Byte aBase64Codes[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, 62, 63, 62, 62, 63, 52, 53, 54, 55, + 56, 57, 58, 59, 60, 61, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 4, 5, 6, + 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 0, + 0, 0, 0, 63, 0, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, + 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51 + }; + if (theStrLen == 0) + { + return 0; + } + + // Calculate pad bytes and number of bytes without pad + uint32_t aPad (theStrLen % 4 || theEncodedStr[theStrLen - 1] == '='); + const Standard_Size aNbIter = ((theStrLen + 3) / 4 - aPad) * 4; + if (theStrLen > aNbIter + 2 && theEncodedStr[aNbIter + 2] != '=') + { + ++aPad; + } + + // Calculate new size + const Standard_Size aDecodedSize = aNbIter / 4 * 3 + aPad; + if (theDecodedData == NULL) + { + return aDecodedSize; + } + if (aDecodedSize > theDataLen) + { + return 0; + } + + // Decoding loop + for (Standard_Size i = 0; i < aNbIter; i += 4) + { + unsigned aWord = (aBase64Codes[unsigned (theEncodedStr[i])] << 18) + + (aBase64Codes[unsigned (theEncodedStr[i + 1])] << 12) + + (aBase64Codes[unsigned (theEncodedStr[i + 2])] << 6) + + aBase64Codes[unsigned (theEncodedStr[i + 3])]; + *theDecodedData++ = static_cast (aWord >> 16); + *theDecodedData++ = static_cast (aWord >> 8 & 0xFF); + *theDecodedData++ = static_cast (aWord & 0xFF); + } + + // Decoding pad bytes + if (aPad > 0) + { + unsigned aWord = (aBase64Codes[unsigned (theEncodedStr[aNbIter])] << 18) + + (aBase64Codes[unsigned (theEncodedStr[aNbIter + 1])] << 12); + *theDecodedData++ = static_cast (aWord >> 16); + + if (aPad > 1) + { + aWord += (aBase64Codes[unsigned (theEncodedStr[aNbIter + 2])] << 6); + *theDecodedData++ = static_cast (aWord >> 8 & 0xFF); + } + } + return aDecodedSize; +} + +// ======================================================================= +// function : Decode +// ======================================================================= +Handle(NCollection_Buffer) FSD_Base64::Decode (Standard_CString theEncodedStr, + const Standard_Size theStrLen) +{ + const Standard_Size aDataSize = Decode (NULL, 0, theEncodedStr, theStrLen); + Handle(NCollection_Buffer) aBuf = new NCollection_Buffer (NCollection_BaseAllocator::CommonBaseAllocator()); + if (aDataSize == 0) + { + return aBuf; + } + if (!aBuf->Allocate (aDataSize)) + { + return Handle(NCollection_Buffer)(); + } + Decode (aBuf->ChangeData(), aDataSize, theEncodedStr, theStrLen); + return aBuf; +} diff --git a/src/FSD/FSD_Base64.hxx b/src/FSD/FSD_Base64.hxx new file mode 100644 index 0000000000..ca1ea7cc44 --- /dev/null +++ b/src/FSD/FSD_Base64.hxx @@ -0,0 +1,68 @@ +// Copyright (c) 2016-2019 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 _FSD_Base64_HeaderFile +#define _FSD_Base64_HeaderFile + +#include +#include + +//! Tool for encoding/decoding base64 stream. +class FSD_Base64 +{ +public: + + //! Function encoding a buffer to base64 string. + //! @param[out] theEncodedStr the place for encoded string. Terminating null is not put. + //! If it is NULL just return the needed size. + //! @param[in] theStrLen the length of the buffer theEncodedStr in bytes. + //! This value must not be less than value returned when theEncodedStr is NULL. + //! @param[in] theData the input binary data. + //! @param[in] theDataLen the length of input data in bytes. + //! @return the length of the encoded string not including terminating null. + //! If theStrLen is not enough for storing all data nothing is written and 0 is returned. + Standard_EXPORT static Standard_Size Encode (char* theEncodedStr, + const Standard_Size theStrLen, + const Standard_Byte* theData, + const Standard_Size theDataLen); + + //! Function encoding a buffer to base64 string. + //! @param[in] theData the input binary data + //! @param[in] theDataLen the length of input data in bytes + //! @return Base64 encoded string. + Standard_EXPORT static TCollection_AsciiString Encode(const Standard_Byte* theData, + const Standard_Size theDataLen); + + //! Function decoding base64 string. + //! @param[out] theDecodedData the place for decoded data. + //! If it is NULL just return the needed size. + //! @param[in] theDataLen the length of the buffer theDecodedData in bytes. + //! This value must not be less than value returned when theDecodedData is NULL. + //! @param[in] theEncodedStr the input encoded string. + //! @param[in] theStrLen the length of input encoded string. + //! @return the length of the decoded data in bytes. If theDataLen is not enough + //! for storing all data nothing is written and 0 is returned. + Standard_EXPORT static Standard_Size Decode (Standard_Byte* theDecodedData, + const Standard_Size theDataLen, + Standard_CString theEncodedStr, + const Standard_Size theStrLen); + + //! Function decoding base64 string. + //! @param[in] theStr the input encoded string + //! @param[in] theLen the length of input encoded string + //! @return null handle in case of out of memory condition + Standard_EXPORT static Handle(NCollection_Buffer) Decode (Standard_CString theStr, + const Standard_Size theLen); +}; + +#endif // _FSD_Base64_HeaderFile diff --git a/src/FSD/FSD_Base64Decoder.cxx b/src/FSD/FSD_Base64Decoder.cxx deleted file mode 100644 index f51ec5bb30..0000000000 --- a/src/FSD/FSD_Base64Decoder.cxx +++ /dev/null @@ -1,106 +0,0 @@ -// Author: Kirill Gavrilov -// Copyright (c) 2016-2019 OPEN CASCADE SAS -// -// This file is part of Open CASCADE Technology software library. -// -// This library is free software; you can redistribute it and/or modify it under -// the terms of the GNU Lesser General Public License version 2.1 as published -// by the Free Software Foundation, with special exception defined in the file -// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT -// distribution for complete text of the license and disclaimer of any warranty. -// -// Alternatively, this file may be used under the terms of Open CASCADE -// commercial license or contractual agreement. - -#include - -#include -#include - -//! Buffer with decoded data. -class FSD_Base64DecoderBuffer : public NCollection_Buffer -{ -public: - //! Empty constructor. - FSD_Base64DecoderBuffer() : NCollection_Buffer (NCollection_BaseAllocator::CommonBaseAllocator()) {} - - //! Shrink data size. - void ShrinkSize (Standard_Size theSize) - { - if (theSize < mySize) - { - mySize = theSize; - } - } -}; - -// ======================================================================= -// function : Decode -// purpose : -// ======================================================================= -Handle(NCollection_Buffer) FSD_Base64Decoder::Decode (const Standard_Byte* theStr, - const Standard_Size theLen) -{ - //! Look-up table for decoding base64 stream. - static const Standard_Byte THE_BASE64_FROM[128] = - { - 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, - 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, - 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 62, 255, 62, 255, 63, - 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 255, 255, 0, 255, 255, 255, - 255, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, - 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 255, 255, 255, 255, 63, - 255, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, - 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 255, 255, 255, 255, 255 - }; - - Handle(FSD_Base64DecoderBuffer) aData = new FSD_Base64DecoderBuffer(); - if (!aData->Allocate (3 * theLen / 4)) - { - Message::SendFail ("Fail to allocate memory."); - return Handle(NCollection_Buffer)(); - } - - Standard_Byte* aDataPtr = aData->ChangeData(); - const Standard_Byte* anEnd = theStr + theLen; - for (const Standard_Byte* aByteIter = theStr; aByteIter < anEnd; aByteIter += 4) - { - // get values for each group of four base 64 characters - const Standard_Byte b4[4] = - { - aByteIter + 0 < anEnd && aByteIter[0] <= 'z' ? THE_BASE64_FROM[aByteIter[0]] : Standard_Byte(0xFF), - aByteIter + 1 < anEnd && aByteIter[1] <= 'z' ? THE_BASE64_FROM[aByteIter[1]] : Standard_Byte(0xFF), - aByteIter + 2 < anEnd && aByteIter[2] <= 'z' ? THE_BASE64_FROM[aByteIter[2]] : Standard_Byte(0xFF), - aByteIter + 3 < anEnd && aByteIter[3] <= 'z' ? THE_BASE64_FROM[aByteIter[3]] : Standard_Byte(0xFF) - }; - - // transform into a group of three bytes - const Standard_Byte b3[3] = - { - Standard_Byte(((b4[0] & 0x3F) << 2) + ((b4[1] & 0x30) >> 4)), - Standard_Byte(((b4[1] & 0x0F) << 4) + ((b4[2] & 0x3C) >> 2)), - Standard_Byte(((b4[2] & 0x03) << 6) + ((b4[3] & 0x3F) >> 0)) - }; - - // add the byte to the return value if it isn't part of an '=' character (indicated by 0xFF) - if (b4[1] != 0xFF) - { - *aDataPtr = b3[0]; - ++aDataPtr; - } - if (b4[2] != 0xFF) - { - *aDataPtr = b3[1]; - ++aDataPtr; - } - if (b4[3] != 0xFF) - { - *aDataPtr = b3[2]; - ++aDataPtr; - } - } - // shrink buffer size to actual length - const Standard_Size aFinalLen = aDataPtr - aData->ChangeData(); - aData->ShrinkSize (aFinalLen); - return aData; -} diff --git a/src/FSD/FSD_Base64Decoder.hxx b/src/FSD/FSD_Base64Decoder.hxx deleted file mode 100644 index 1c1abc353b..0000000000 --- a/src/FSD/FSD_Base64Decoder.hxx +++ /dev/null @@ -1,30 +0,0 @@ -// Author: Kirill Gavrilov -// Copyright (c) 2016-2019 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 _FSD_Base64Decoder_HeaderFile -#define _FSD_Base64Decoder_HeaderFile - -#include - -//! Tool decoding base64 stream. -class FSD_Base64Decoder -{ -public: - - //! Function decoding base64 stream. - Standard_EXPORT static Handle(NCollection_Buffer) Decode (const Standard_Byte* theStr, - const Standard_Size theLen); -}; - -#endif // _FSD_Base64Decoder_HeaderFile diff --git a/src/RWGltf/RWGltf_GltfJsonParser.cxx b/src/RWGltf/RWGltf_GltfJsonParser.cxx index c1bb4911c8..9974cfa8d2 100644 --- a/src/RWGltf/RWGltf_GltfJsonParser.cxx +++ b/src/RWGltf/RWGltf_GltfJsonParser.cxx @@ -24,7 +24,7 @@ #include #include #include -#include +#include #include #include #include @@ -808,7 +808,11 @@ bool RWGltf_GltfJsonParser::gltfParseTexture (Handle(Image_Texture)& theTexture, const char* aBase64Data = aDataIter + 8; const size_t aBase64Len = size_t(aBase64End - aBase64Data); //const TCollection_AsciiString aMime (aDataStart, aDataIter - aDataStart); - Handle(NCollection_Buffer) aData = FSD_Base64Decoder::Decode ((const Standard_Byte* )aBase64Data, aBase64Len); + Handle(NCollection_Buffer) aData = FSD_Base64::Decode (aBase64Data, aBase64Len); + if (aData.IsNull()) + { + Message::SendFail ("Fail to allocate memory."); + } theTexture = new Image_Texture (aData, myFilePath + "@" + getKeyString (*aSrcVal)); return true; } @@ -933,7 +937,11 @@ bool RWGltf_GltfJsonParser::gltfParseTextureInBufferView (Handle(Image_Texture)& Handle(NCollection_Buffer) aBaseBuffer; if (!myDecodedBuffers.Find (aBufferId, aBaseBuffer)) { - aBaseBuffer = FSD_Base64Decoder::Decode ((const Standard_Byte* )anUriData + 37, anUriVal->GetStringLength() - 37); + aBaseBuffer = FSD_Base64::Decode (anUriData + 37, anUriVal->GetStringLength() - 37); + if (aBaseBuffer.IsNull()) + { + Message::SendFail ("Fail to allocate memory."); + } myDecodedBuffers.Bind (aBufferId, aBaseBuffer); } @@ -1805,7 +1813,11 @@ bool RWGltf_GltfJsonParser::gltfParseBuffer (const Handle(RWGltf_GltfLatePrimiti if (!myDecodedBuffers.Find (theName, aData.StreamData)) { // it is better decoding in multiple threads - aData.StreamData = FSD_Base64Decoder::Decode ((const Standard_Byte* )anUriData + 37, anUriVal->GetStringLength() - 37); + aData.StreamData = FSD_Base64::Decode (anUriData + 37, anUriVal->GetStringLength() - 37); + if (aData.StreamData.IsNull()) + { + Message::SendFail ("Fail to allocate memory."); + } myDecodedBuffers.Bind (theName, aData.StreamData); } return true; From 8a77384b0cca8a1bcc3e5f6030ce049007428e96 Mon Sep 17 00:00:00 2001 From: kgv Date: Wed, 25 Aug 2021 10:55:38 +0300 Subject: [PATCH 019/639] 0032403: Visualization - RayTracing renders all object as white color in view with white background OpenGl_Caps::buffersOpaqueAlpha is now set to TRUE by default. OpenGl_View::runPathtrace - fixed higlighting with PathTracing turned on and buffersOpaqueAlpha=true. --- src/OpenGl/OpenGl_Caps.cxx | 5 ++--- src/OpenGl/OpenGl_Caps.hxx | 2 +- src/OpenGl/OpenGl_View_Raytrace.cxx | 19 +++++++++++-------- tests/vselect/bugs/bug26726 | 22 ++++++++-------------- 4 files changed, 22 insertions(+), 26 deletions(-) diff --git a/src/OpenGl/OpenGl_Caps.cxx b/src/OpenGl/OpenGl_Caps.cxx index e7f23a2d81..28169e84b0 100755 --- a/src/OpenGl/OpenGl_Caps.cxx +++ b/src/OpenGl/OpenGl_Caps.cxx @@ -35,7 +35,7 @@ OpenGl_Caps::OpenGl_Caps() swapInterval (1), useZeroToOneDepth (Standard_False), buffersNoSwap (Standard_False), - buffersOpaqueAlpha(Standard_False), + buffersOpaqueAlpha(Standard_True), contextStereo (Standard_False), contextDebug (Standard_False), contextSyncDebug (Standard_False), @@ -54,8 +54,7 @@ OpenGl_Caps::OpenGl_Caps() glslDumpLevel (OpenGl_ShaderProgramDumpLevel_Off) { #if defined(__EMSCRIPTEN__) - buffersNoSwap = true; // swap has no effect in WebGL - buffersOpaqueAlpha = true; // avoid unexpected blending of canvas with page background + buffersNoSwap = true; // swap has no effect in WebGL #endif #ifdef OCCT_DEBUG contextDebug = true; diff --git a/src/OpenGl/OpenGl_Caps.hxx b/src/OpenGl/OpenGl_Caps.hxx index dc46fd5099..1f62243c4c 100755 --- a/src/OpenGl/OpenGl_Caps.hxx +++ b/src/OpenGl/OpenGl_Caps.hxx @@ -56,7 +56,7 @@ public: //! @name context creation parameters * (e.g. it could be opaque or not in case of transparent material). * With alpha writes disabled, color buffer will be kept opaque. * - * OFF by default. + * ON by default. */ Standard_Boolean buffersOpaqueAlpha; diff --git a/src/OpenGl/OpenGl_View_Raytrace.cxx b/src/OpenGl/OpenGl_View_Raytrace.cxx index eb6b9f2051..c1e4f48f0a 100644 --- a/src/OpenGl/OpenGl_View_Raytrace.cxx +++ b/src/OpenGl/OpenGl_View_Raytrace.cxx @@ -2861,14 +2861,14 @@ Standard_Boolean OpenGl_View::runRaytrace (const Standard_Integer theSize { myRaytraceFBO1[aFBOIdx]->BindBuffer (theGlContext); - glClear (GL_DEPTH_BUFFER_BIT); // render the image with depth + theGlContext->core11fwd->glClear (GL_DEPTH_BUFFER_BIT); // render the image with depth } theGlContext->core20fwd->glDrawArrays (GL_TRIANGLES, 0, 6); if (myRenderParams.IsAntialiasingEnabled) { - glDisable (GL_DEPTH_TEST); // improve jagged edges without depth buffer + theGlContext->core11fwd->glDisable (GL_DEPTH_TEST); // improve jagged edges without depth buffer // bind ray-tracing output image as input myRaytraceFBO1[aFBOIdx]->ColorTexture()->Bind (theGlContext, OpenGl_RT_FsaaInputTexture); @@ -2924,7 +2924,7 @@ Standard_Boolean OpenGl_View::runRaytrace (const Standard_Integer theSize const Handle(OpenGl_FrameBuffer)& aRenderImageFramebuffer = myRaytraceFBO2[aFBOIdx]; const Handle(OpenGl_FrameBuffer)& aDepthSourceFramebuffer = myRaytraceFBO1[aFBOIdx]; - glEnable (GL_DEPTH_TEST); + theGlContext->core11fwd->glEnable (GL_DEPTH_TEST); // Display filtered image theGlContext->BindProgram (myOutImageProgram); @@ -3032,11 +3032,13 @@ Standard_Boolean OpenGl_View::runPathtrace (const Standard_Integer // extend viewport here, so that tiles at boundaries (cut tile size by target rendering viewport) // redirected to inner tiles (full tile size) are drawn entirely const Graphic3d_Vec2i anOffsetViewport = myTileSampler.OffsetTilesViewport (myAccumFrames > 1); // shrunk offsets texture will be uploaded since 3rd frame - glViewport (0, 0, anOffsetViewport.x(), anOffsetViewport.y()); + theGlContext->core11fwd->glViewport (0, 0, anOffsetViewport.x(), anOffsetViewport.y()); } + const NCollection_Vec4 aColorMask = theGlContext->ColorMaskRGBA(); + theGlContext->SetColorMaskRGBA (NCollection_Vec4 (true)); // force writes into all components, including alpha // Generate for the given RNG seed - glDisable (GL_DEPTH_TEST); + theGlContext->core11fwd->glDisable (GL_DEPTH_TEST); // Adaptive Screen Sampling computes the same overall amount of samples per frame redraw as normal Path Tracing, // but distributes them unequally across pixels (grouped in tiles), so that some pixels do not receive new samples at all. @@ -3070,10 +3072,11 @@ Standard_Boolean OpenGl_View::runPathtrace (const Standard_Integer } aRenderImageFramebuffer->UnbindBuffer (theGlContext); + theGlContext->SetColorMaskRGBA (aColorMask); if (myRaytraceParameters.AdaptiveScreenSampling && myRaytraceParameters.AdaptiveScreenSamplingAtomic) { - glViewport (0, 0, theSizeX, theSizeY); + theGlContext->core11fwd->glViewport (0, 0, theSizeX, theSizeY); } return true; } @@ -3125,7 +3128,7 @@ Standard_Boolean OpenGl_View::runPathtraceOut (const Graphic3d_Camera::Projectio aRenderImageFramebuffer->ColorTexture()->Bind (theGlContext, OpenGl_RT_PrevAccumTexture); // Copy accumulated image with correct depth values - glEnable (GL_DEPTH_TEST); + theGlContext->core11fwd->glEnable (GL_DEPTH_TEST); theGlContext->core20fwd->glDrawArrays (GL_TRIANGLES, 0, 6); aRenderImageFramebuffer->ColorTexture()->Unbind (theGlContext, OpenGl_RT_PrevAccumTexture); @@ -3190,7 +3193,7 @@ Standard_Boolean OpenGl_View::raytrace (const Standard_Integer theSizeX, 0, GL_DEBUG_SEVERITY_MEDIUM, "Error: Failed to acquire OpenGL image textures"); } - glDisable (GL_BLEND); + theGlContext->core11fwd->glDisable (GL_BLEND); const Standard_Boolean aResult = runRaytraceShaders (theSizeX, theSizeY, diff --git a/tests/vselect/bugs/bug26726 b/tests/vselect/bugs/bug26726 index 32660e1ec4..302868f723 100644 --- a/tests/vselect/bugs/bug26726 +++ b/tests/vselect/bugs/bug26726 @@ -2,34 +2,28 @@ puts "============" puts "OCC26726 erase selected objects" puts "============" puts "" -pload VISUALIZATION +pload VISUALIZATION vclear -vclose all vinit View1 -vsetdispmode 1 box b0 5 0 0 1 1 1 box b1 0 5 0 1 1 1 box b2 0 0 5 1 1 1 box b3 5 5 5 1 1 1 -vdisplay b0 b1 b2 b3 - -vdump $imagedir/${casename}_0.png - +vdisplay b0 b1 b2 b3 -dispMode 1 vfit +vdump $imagedir/${casename}_0.png vselect 0 0 500 500 verase - vdump $imagedir/${casename}_1.png -set info_b0 [vreadpixel 205 355 name] -set info_b1 [vreadpixel 205 190 name] -set info_b2 [vreadpixel 60 100 name] -set info_b3 [vreadpixel 350 100 name] - -if { $info_b0 != "BLACK 0" || $info_b1 != "BLACK 0" || $info_b2 != "BLACK 0" || $info_b3 != "BLACK 0" } { +set info_b0 [vreadpixel 205 355 -rgb -name] +set info_b1 [vreadpixel 205 190 -rgb -name] +set info_b2 [vreadpixel 60 100 -rgb -name] +set info_b3 [vreadpixel 350 100 -rgb -name] +if { $info_b0 != "BLACK" || $info_b1 != "BLACK" || $info_b2 != "BLACK" || $info_b3 != "BLACK" } { puts "Error: OCC26726 is reproduced. AIS_InteractiveContext::EraseSelected is incorrect." } From 9dd8af261f416c0fd9822cf339ddbf22a2c59d39 Mon Sep 17 00:00:00 2001 From: mkrylova Date: Mon, 5 Jul 2021 15:06:50 +0300 Subject: [PATCH 020/639] 0032281: Visualization - add Select3D_SensitiveCylinder - implemented Select3D_SensitiveCylinder class performing an analytical intersection with an untriangulated cone/cylinder - added tests --- src/Select3D/FILES | 2 + src/Select3D/Select3D_SensitiveCylinder.cxx | 104 +++++++ src/Select3D/Select3D_SensitiveCylinder.hxx | 64 +++++ .../SelectBasics_SelectingVolumeManager.hxx | 16 ++ src/SelectMgr/SelectMgr_AxisIntersector.cxx | 60 ++++ src/SelectMgr/SelectMgr_AxisIntersector.hxx | 17 ++ src/SelectMgr/SelectMgr_BaseIntersector.cxx | 129 +++++++++ src/SelectMgr/SelectMgr_BaseIntersector.hxx | 27 ++ src/SelectMgr/SelectMgr_Frustum.hxx | 26 ++ src/SelectMgr/SelectMgr_Frustum.lxx | 256 +++++++++++++++++- .../SelectMgr_RectangularFrustum.cxx | 59 ++++ .../SelectMgr_RectangularFrustum.hxx | 17 ++ .../SelectMgr_SelectingVolumeManager.cxx | 34 +++ .../SelectMgr_SelectingVolumeManager.hxx | 16 ++ .../SelectMgr_SelectionImageFiller.cxx | 54 ++++ src/SelectMgr/SelectMgr_TriangularFrustum.cxx | 30 ++ src/SelectMgr/SelectMgr_TriangularFrustum.hxx | 17 ++ .../SelectMgr_TriangularFrustumSet.cxx | 117 ++++++++ .../SelectMgr_TriangularFrustumSet.hxx | 17 ++ src/StdSelect/StdSelect_BRepSelectionTool.cxx | 140 ++++++++++ .../StdSelect_TypeOfSelectionImage.hxx | 1 + src/ViewerTest/ViewerTest_ViewerCommands.cxx | 10 +- tests/vselect/cone_cylinder/begin | 2 + tests/vselect/cone_cylinder/check_depth | 56 ++++ tests/vselect/cone_cylinder/detecting | 24 ++ tests/vselect/cone_cylinder/generate_images | 33 +++ tests/vselect/cone_cylinder/polygon_selection | 69 +++++ .../vselect/cone_cylinder/rectangle_selection | 96 +++++++ .../cone_cylinder/single_click_selection_cone | 21 ++ .../single_click_selection_cylinder | 36 +++ .../single_click_selection_trunc_cone | 21 ++ tests/vselect/grids.list | 1 + 32 files changed, 1568 insertions(+), 4 deletions(-) create mode 100644 src/Select3D/Select3D_SensitiveCylinder.cxx create mode 100644 src/Select3D/Select3D_SensitiveCylinder.hxx create mode 100644 tests/vselect/cone_cylinder/begin create mode 100644 tests/vselect/cone_cylinder/check_depth create mode 100644 tests/vselect/cone_cylinder/detecting create mode 100644 tests/vselect/cone_cylinder/generate_images create mode 100644 tests/vselect/cone_cylinder/polygon_selection create mode 100644 tests/vselect/cone_cylinder/rectangle_selection create mode 100644 tests/vselect/cone_cylinder/single_click_selection_cone create mode 100644 tests/vselect/cone_cylinder/single_click_selection_cylinder create mode 100644 tests/vselect/cone_cylinder/single_click_selection_trunc_cone diff --git a/src/Select3D/FILES b/src/Select3D/FILES index d779a8c322..d0c23b19fd 100755 --- a/src/Select3D/FILES +++ b/src/Select3D/FILES @@ -13,6 +13,8 @@ Select3D_SensitiveCircle.cxx Select3D_SensitiveCircle.hxx Select3D_SensitiveCurve.cxx Select3D_SensitiveCurve.hxx +Select3D_SensitiveCylinder.cxx +Select3D_SensitiveCylinder.hxx Select3D_SensitiveEntity.cxx Select3D_SensitiveEntity.hxx Select3D_SensitiveFace.cxx diff --git a/src/Select3D/Select3D_SensitiveCylinder.cxx b/src/Select3D/Select3D_SensitiveCylinder.cxx new file mode 100644 index 0000000000..62fe013b25 --- /dev/null +++ b/src/Select3D/Select3D_SensitiveCylinder.cxx @@ -0,0 +1,104 @@ +// Created on: 2021-04-19 +// Created by: Maria KRYLOVA +// Copyright (c) 2021 OPEN CASCADE SAS +// +// This file is part of Open CASCADE Technology software library. +// +// This library is free software; you can redistribute it and/or modify it under +// the terms of the GNU Lesser General Public License version 2.1 as published +// by the Free Software Foundation, with special exception defined in the file +// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT +// distribution for complete text of the license and disclaimer of any warranty. +// +// Alternatively, this file may be used under the terms of Open CASCADE +// commercial license or contractual agreement. + +#include + +IMPLEMENT_STANDARD_RTTIEXT(Select3D_SensitiveCylinder, Select3D_SensitiveEntity) + +//================================================== +// Function: Select3D_SensitiveSphere +// Purpose : +//================================================== +Select3D_SensitiveCylinder::Select3D_SensitiveCylinder (const Handle(SelectMgr_EntityOwner)& theOwnerId, + const Standard_Real theBottomRad, + const Standard_Real theTopRad, + const Standard_Real theHeight, + const gp_Trsf& theTrsf) +: Select3D_SensitiveEntity (theOwnerId), + myTrsf (theTrsf), + myBottomRadius (theBottomRad), + myTopRadius (theTopRad), + myHeight (theHeight) +{ +} + +//================================================== +// Function: Matches +// Purpose : +//================================================== +Standard_Boolean Select3D_SensitiveCylinder::Matches (SelectBasics_SelectingVolumeManager& theMgr, + SelectBasics_PickResult& thePickResult) +{ + if (theMgr.GetActiveSelectionType() != SelectMgr_SelectionType_Point) + { + if (!theMgr.IsOverlapAllowed()) + { + bool isInside = true; + return theMgr.OverlapsCylinder (myBottomRadius, myTopRadius, myHeight, myTrsf, &isInside) && isInside; + } + else + { + return theMgr.OverlapsCylinder (myBottomRadius, myTopRadius, myHeight, myTrsf, NULL); + } + } + if (!theMgr.OverlapsCylinder (myBottomRadius, myTopRadius, myHeight, myTrsf, thePickResult)) + { + return false; + } + + thePickResult.SetDistToGeomCenter (theMgr.DistToGeometryCenter (CenterOfGeometry())); + return true; +} + +//================================================== +// Function: GetConnected +// Purpose : +//================================================== +Handle(Select3D_SensitiveEntity) Select3D_SensitiveCylinder::GetConnected() +{ + Handle(Select3D_SensitiveEntity) aNewEntity = new Select3D_SensitiveCylinder (myOwnerId, myBottomRadius, + myTopRadius, myHeight, + myTrsf); + return aNewEntity; +} + +//================================================== +// Function: BoundingBox +// Purpose : +//================================================== +Select3D_BndBox3d Select3D_SensitiveCylinder::BoundingBox() +{ + Standard_Real aMaxRad = Max (myBottomRadius, myTopRadius); + gp_Pnt aCenterBottom (0, 0, 0); + gp_Pnt aCenterTop (0, 0, myHeight); + aCenterBottom.Transform (myTrsf); + aCenterTop.Transform (myTrsf); + const SelectMgr_Vec3 aMinPnt (Min (aCenterBottom.X(), aCenterTop.X()) - aMaxRad, + Min (aCenterBottom.Y(), aCenterTop.Y()) - aMaxRad, + Min (aCenterBottom.Z(), aCenterTop.Z()) - aMaxRad); + const SelectMgr_Vec3 aMaxPnt (Max (aCenterBottom.X(), aCenterTop.X()) + aMaxRad, + Max (aCenterBottom.Y(), aCenterTop.Y()) + aMaxRad, + Max (aCenterBottom.Z(), aCenterTop.Z()) + aMaxRad); + return Select3D_BndBox3d (aMinPnt, aMaxPnt); +} + +//================================================== +// Function: CenterOfGeometry +// Purpose : +//================================================== +gp_Pnt Select3D_SensitiveCylinder::CenterOfGeometry() const +{ + return gp_Pnt (0, 0, myHeight / 2).Transformed (myTrsf); +} diff --git a/src/Select3D/Select3D_SensitiveCylinder.hxx b/src/Select3D/Select3D_SensitiveCylinder.hxx new file mode 100644 index 0000000000..533341ee54 --- /dev/null +++ b/src/Select3D/Select3D_SensitiveCylinder.hxx @@ -0,0 +1,64 @@ +// Created on: 2021-04-19 +// Created by: Maria KRYLOVA +// Copyright (c) 2021 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 _Select3D_SensitiveCylinder_HeaderFile +#define _Select3D_SensitiveCylinder_HeaderFile + +#include + +//! A framework to define selection by a sensitive cylinder or cone. +class Select3D_SensitiveCylinder : public Select3D_SensitiveEntity +{ + DEFINE_STANDARD_RTTIEXT (Select3D_SensitiveCylinder, Select3D_SensitiveEntity) + +public: + //! Constructs a sensitive cylinder object defined by the owner theOwnerId, + //! @param[in] theBottomRad cylinder bottom radius + //! @param[in] theTopRad cylinder top radius + //! @param[in] theHeight cylinder height + Standard_EXPORT Select3D_SensitiveCylinder (const Handle(SelectMgr_EntityOwner)& theOwnerId, + const Standard_Real theBottomRad, + const Standard_Real theTopRad, + const Standard_Real theHeight, + const gp_Trsf& theTrsf); + + //! Checks whether the cylinder overlaps current selecting volume + Standard_EXPORT virtual Standard_Boolean Matches (SelectBasics_SelectingVolumeManager& theMgr, + SelectBasics_PickResult& thePickResult) Standard_OVERRIDE; + + //! Returns the copy of this + Standard_EXPORT virtual Handle (Select3D_SensitiveEntity) GetConnected() Standard_OVERRIDE; + + //! Returns bounding box of the cylinder. + //! If location transformation is set, it will be applied + Standard_EXPORT virtual Select3D_BndBox3d BoundingBox() Standard_OVERRIDE; + + //! Always returns Standard_False + virtual Standard_Boolean ToBuildBVH() const Standard_OVERRIDE { return Standard_False; } + + //! Returns the amount of points + virtual Standard_Integer NbSubElements() const Standard_OVERRIDE { return 1; } + + //! Returns center of the cylinder with transformation applied + Standard_EXPORT virtual gp_Pnt CenterOfGeometry() const Standard_OVERRIDE; + +protected: + gp_Trsf myTrsf; //!< cylinder transformation to apply + Standard_Real myBottomRadius; //!< cylinder bottom radius + Standard_Real myTopRadius; //!< cylinder top radius + Standard_Real myHeight; //!< cylinder height +}; + +#endif // _Select3D_SensitiveSphere_HeaderFile diff --git a/src/SelectBasics/SelectBasics_SelectingVolumeManager.hxx b/src/SelectBasics/SelectBasics_SelectingVolumeManager.hxx index 324d18958e..60dbadb698 100644 --- a/src/SelectBasics/SelectBasics_SelectingVolumeManager.hxx +++ b/src/SelectBasics/SelectBasics_SelectingVolumeManager.hxx @@ -97,6 +97,22 @@ public: const Standard_Real theRadius, Standard_Boolean* theInside = NULL) const = 0; + //! Returns true if selecting volume is overlapped by cylinder (or cone) with radiuses theBottomRad + //! and theTopRad, height theHeight and transformation to apply theTrsf. + virtual Standard_Boolean OverlapsCylinder (const Standard_Real theBottomRad, + const Standard_Real theTopRad, + const Standard_Real theHeight, + const gp_Trsf& theTrsf, + SelectBasics_PickResult& thePickResult) const = 0; + + //! Returns true if selecting volume is overlapped by cylinder (or cone) with radiuses theBottomRad + //! and theTopRad, height theHeight and transformation to apply theTrsf. + virtual Standard_Boolean OverlapsCylinder (const Standard_Real theBottomRad, + const Standard_Real theTopRad, + const Standard_Real theHeight, + const gp_Trsf& theTrsf, + Standard_Boolean* theInside = NULL) const = 0; + public: //! Calculates distance from 3d projection of user-defined selection point diff --git a/src/SelectMgr/SelectMgr_AxisIntersector.cxx b/src/SelectMgr/SelectMgr_AxisIntersector.cxx index 7cc2e9f2a2..ec27694381 100644 --- a/src/SelectMgr/SelectMgr_AxisIntersector.cxx +++ b/src/SelectMgr/SelectMgr_AxisIntersector.cxx @@ -547,6 +547,66 @@ Standard_Boolean SelectMgr_AxisIntersector::OverlapsSphere (const gp_Pnt& theCen return Standard_True; } +//======================================================================= +// function : OverlapsCylinder +// purpose : +//======================================================================= +Standard_Boolean SelectMgr_AxisIntersector::OverlapsCylinder (const Standard_Real theBottomRad, + const Standard_Real theTopRad, + const Standard_Real theHeight, + const gp_Trsf& theTrsf, + const SelectMgr_ViewClipRange& theClipRange, + SelectBasics_PickResult& thePickResult) const +{ + Standard_ASSERT_RAISE (mySelectionType == SelectMgr_SelectionType_Point, + "Error! SelectMgr_AxisIntersector::Overlaps() should be called after selection axis initialization"); + Standard_Real aTimeEnter = 0.0, aTimeLeave = 0.0; + gp_Trsf aTrsfInv = theTrsf.Inverted(); + gp_Pnt aLoc = myAxis.Location() .Transformed (aTrsfInv); + gp_Dir aRayDir = myAxis.Direction().Transformed (aTrsfInv); + if (!RayCylinderIntersection (theBottomRad, theTopRad, theHeight, aLoc, aRayDir, aTimeEnter, aTimeLeave)) + { + return false; + } + + Standard_Real aDepth = 0.0; + Bnd_Range aRange (Max (aTimeEnter, 0.0), aTimeLeave); + aRange.GetMin (aDepth); + if (!theClipRange.GetNearestDepth (aRange, aDepth)) + { + return false; + } + thePickResult.SetDepth (aDepth); + return true; +} + +//======================================================================= +// function : OverlapsCylinder +// purpose : +//======================================================================= +Standard_Boolean SelectMgr_AxisIntersector::OverlapsCylinder (const Standard_Real theBottomRad, + const Standard_Real theTopRad, + const Standard_Real theHeight, + const gp_Trsf& theTrsf, + Standard_Boolean* theInside) const +{ + Standard_ASSERT_RAISE (mySelectionType == SelectMgr_SelectionType_Point, + "Error! SelectMgr_AxisIntersector::Overlaps() should be called after selection axis initialization"); + Standard_Real aTimeEnter = 0.0, aTimeLeave = 0.0; + gp_Trsf aTrsfInv = theTrsf.Inverted(); + gp_Pnt aLoc = myAxis.Location() .Transformed (aTrsfInv); + gp_Dir aRayDir = myAxis.Direction().Transformed (aTrsfInv); + if (!RayCylinderIntersection (theBottomRad, theTopRad, theHeight, aLoc, aRayDir, aTimeEnter, aTimeLeave)) + { + return false; + } + if (theInside != NULL) + { + *theInside &= (aTimeEnter >= 0.0); + } + return true; +} + //======================================================================= // function : GetNearPnt // purpose : diff --git a/src/SelectMgr/SelectMgr_AxisIntersector.hxx b/src/SelectMgr/SelectMgr_AxisIntersector.hxx index 5de38f3646..543c4e6175 100644 --- a/src/SelectMgr/SelectMgr_AxisIntersector.hxx +++ b/src/SelectMgr/SelectMgr_AxisIntersector.hxx @@ -111,6 +111,23 @@ public: const SelectMgr_ViewClipRange& theClipRange, SelectBasics_PickResult& thePickResult) const Standard_OVERRIDE; + //! Returns true if selecting volume is overlapped by cylinder (or cone) with radiuses theBottomRad + //! and theTopRad, height theHeight and transformation to apply theTrsf. + Standard_EXPORT virtual Standard_Boolean OverlapsCylinder (const Standard_Real theBottomRad, + const Standard_Real theTopRad, + const Standard_Real theHeight, + const gp_Trsf& theTrsf, + const SelectMgr_ViewClipRange& theClipRange, + SelectBasics_PickResult& thePickResult) const Standard_OVERRIDE; + + //! Returns true if selecting volume is overlapped by cylinder (or cone) with radiuses theBottomRad + //! and theTopRad, height theHeight and transformation to apply theTrsf. + Standard_EXPORT virtual Standard_Boolean OverlapsCylinder (const Standard_Real theBottomRad, + const Standard_Real theTopRad, + const Standard_Real theHeight, + const gp_Trsf& theTrsf, + Standard_Boolean* theInside = NULL) const Standard_OVERRIDE; + public: //! Measures distance between start axis point and given point theCOG. diff --git a/src/SelectMgr/SelectMgr_BaseIntersector.cxx b/src/SelectMgr/SelectMgr_BaseIntersector.cxx index 6b7e81cd5d..2ce3de8123 100644 --- a/src/SelectMgr/SelectMgr_BaseIntersector.cxx +++ b/src/SelectMgr/SelectMgr_BaseIntersector.cxx @@ -14,6 +14,9 @@ #include #include +#include + +#include IMPLEMENT_STANDARD_RTTIEXT(SelectMgr_BaseIntersector, Standard_Transient) @@ -164,6 +167,132 @@ Standard_Boolean SelectMgr_BaseIntersector::RaySphereIntersection (const gp_Pnt& return Standard_True; } +//======================================================================= +// function : RayCylinderIntersection +// purpose : +//======================================================================= +Standard_Boolean SelectMgr_BaseIntersector::RayCylinderIntersection (const Standard_Real theBottomRadius, + const Standard_Real theTopRadius, + const Standard_Real theHeight, + const gp_Pnt& theLoc, + const gp_Dir& theRayDir, + Standard_Real& theTimeEnter, + Standard_Real& theTimeLeave) const +{ + Standard_Integer aNbIntersections = 0; + Standard_Real anIntersections[4] = { RealLast(), RealLast(), RealLast(), RealLast() }; + //NCollection_Vector anIntersections; // vector for all intersections + // Check intersections with end faces + // point of intersection theRayDir and z = 0 + if (theRayDir.Z() != 0) + { + const Standard_Real aTime1 = (0 - theLoc.Z()) / theRayDir.Z(); + const Standard_Real aX1 = theLoc.X() + theRayDir.X() * aTime1; + const Standard_Real anY1 = theLoc.Y() + theRayDir.Y() * aTime1; + if (aX1 * aX1 + anY1 * anY1 <= theBottomRadius * theBottomRadius) + { + anIntersections[aNbIntersections++] = aTime1; + } + // point of intersection theRayDir and z = theHeight + const Standard_Real aTime2 = (theHeight - theLoc.Z()) / theRayDir.Z(); + const Standard_Real aX2 = theLoc.X() + theRayDir.X() * aTime2; + const Standard_Real anY2 = theLoc.Y() + theRayDir.Y() * aTime2; + if (aX2 * aX2 + anY2 * anY2 <= theTopRadius * theTopRadius) + { + anIntersections[aNbIntersections++] = aTime2; + } + } + // ray intersection with cone / truncated cone + if (theTopRadius != theBottomRadius) + { + const Standard_Real aTriangleHeight = Min (theBottomRadius, theTopRadius) * theHeight / + (Abs (theBottomRadius - theTopRadius)); + gp_Ax3 aSystem; + if (theBottomRadius > theTopRadius) + { + aSystem.SetLocation (gp_Pnt (0, 0, theHeight + aTriangleHeight)); + aSystem.SetDirection (-gp::DZ()); + } + else + { + aSystem.SetLocation (gp_Pnt (0, 0, -aTriangleHeight)); + aSystem.SetDirection (gp::DZ()); + } + gp_Trsf aTrsfCone; + aTrsfCone.SetTransformation (gp_Ax3(), aSystem); + const gp_Pnt aPnt (theLoc.Transformed (aTrsfCone)); + const gp_Dir aDir (theRayDir.Transformed (aTrsfCone)); + const Standard_Real aMaxRad = Max (theBottomRadius, theTopRadius); + const Standard_Real aConeHeight = theHeight + aTriangleHeight; + + // solving quadratic equation anA * T^2 + 2 * aK * T + aC = 0 + const Standard_Real anA = aDir.X() * aDir.X() / (aMaxRad * aMaxRad) + + aDir.Y() * aDir.Y() / (aMaxRad * aMaxRad) + - aDir.Z() * aDir.Z() / (aConeHeight * aConeHeight); + const Standard_Real aK = aDir.X() * aPnt.X() / (aMaxRad * aMaxRad) + + aDir.Y() * aPnt.Y() / (aMaxRad * aMaxRad) + - aDir.Z() * aPnt.Z() / (aConeHeight * aConeHeight); + const Standard_Real aC = aPnt.X() * aPnt.X() / (aMaxRad * aMaxRad) + + aPnt.Y() * aPnt.Y() / (aMaxRad * aMaxRad) + - aPnt.Z() * aPnt.Z() / (aConeHeight * aConeHeight); + Standard_Real aDiscr = aK * aK - anA * aC; + if (aDiscr > 0) + { + const Standard_Real aTimeEnterCone = (-aK - Sqrt (aDiscr)) / anA; + const Standard_Real aTimeLeaveCone = (-aK + Sqrt (aDiscr)) / anA; + const Standard_Real aZFromRoot1 = aPnt.Z() + aTimeEnterCone * aDir.Z(); + const Standard_Real aZFromRoot2 = aPnt.Z() + aTimeLeaveCone * aDir.Z(); + + if (aZFromRoot1 > aTriangleHeight && aZFromRoot1 < aConeHeight) + { + anIntersections[aNbIntersections++] = aTimeEnterCone; + } + if (aZFromRoot2 > aTriangleHeight && aZFromRoot2 < aConeHeight) + { + anIntersections[aNbIntersections++] = aTimeLeaveCone; + } + } + } + else // ray intersection with cylinder + { + const gp_Pnt2d aLoc2d (theLoc.X(), theLoc.Y()); + const gp_Vec2d aRayDir2d (theRayDir.X(), theRayDir.Y()); + + // solving quadratic equation anA * T^2 + 2 * aK * T + aC = 0 + const Standard_Real anA = aRayDir2d.Dot (aRayDir2d); + const Standard_Real aK = aLoc2d.XY().Dot (aRayDir2d.XY()); + const Standard_Real aC = aLoc2d.XY().Dot (aLoc2d.XY()) - theTopRadius * theTopRadius; + const Standard_Real aDiscr = aK * aK - anA * aC; + if (aDiscr > 0) + { + const Standard_Real aRoot1 = (-aK + Sqrt (aDiscr)) / anA; + const Standard_Real aRoot2 = (-aK - Sqrt (aDiscr)) / anA; + const Standard_Real aZFromRoot1 = theLoc.Z() + aRoot1 * theRayDir.Z(); + const Standard_Real aZFromRoot2 = theLoc.Z() + aRoot2 * theRayDir.Z(); + if (aZFromRoot1 > 0 && aZFromRoot1 < theHeight) + { + anIntersections[aNbIntersections++] = aRoot1; + } + if (aZFromRoot2 > 0 && aZFromRoot2 < theHeight) + { + anIntersections[aNbIntersections++] = aRoot2; + } + } + } + if (aNbIntersections == 0) + { + return false; + } + + std::sort (anIntersections, anIntersections + aNbIntersections); + theTimeEnter = anIntersections[0]; + if (aNbIntersections > 1) + { + theTimeLeave = anIntersections[1]; + } + return true; +} + //======================================================================= // function : DistToGeometryCenter // purpose : diff --git a/src/SelectMgr/SelectMgr_BaseIntersector.hxx b/src/SelectMgr/SelectMgr_BaseIntersector.hxx index 9013040497..5ab38e9ea9 100644 --- a/src/SelectMgr/SelectMgr_BaseIntersector.hxx +++ b/src/SelectMgr/SelectMgr_BaseIntersector.hxx @@ -181,6 +181,23 @@ public: const SelectMgr_ViewClipRange& theClipRange, SelectBasics_PickResult& thePickResult) const = 0; + //! Returns true if selecting volume is overlapped by cylinder (or cone) with radiuses theBottomRad + //! and theTopRad, height theHeight and transformation to apply theTrsf. + virtual Standard_Boolean OverlapsCylinder (const Standard_Real theBottomRad, + const Standard_Real theTopRad, + const Standard_Real theHeight, + const gp_Trsf& theTrsf, + const SelectMgr_ViewClipRange& theClipRange, + SelectBasics_PickResult& thePickResult) const = 0; + + //! Returns true if selecting volume is overlapped by cylinder (or cone) with radiuses theBottomRad + //! and theTopRad, height theHeight and transformation to apply theTrsf. + virtual Standard_Boolean OverlapsCylinder (const Standard_Real theBottomRad, + const Standard_Real theTopRad, + const Standard_Real theHeight, + const gp_Trsf& theTrsf, + Standard_Boolean* theInside = NULL) const = 0; + public: //! Measures distance between 3d projection of user-picked @@ -206,6 +223,16 @@ public: Standard_Real& theTimeEnter, Standard_Real& theTimeLeave) const; + //! Checks whether the ray that starts at the point theLoc and directs with the direction theRayDir intersects + //! with the cylinder (or cone) with radiuses theBottomRad and theTopRad and height theHeights + Standard_EXPORT virtual Standard_Boolean RayCylinderIntersection (const Standard_Real theBottomRadius, + const Standard_Real theTopRadius, + const Standard_Real theHeight, + const gp_Pnt& theLoc, + const gp_Dir& theRayDir, + Standard_Real& theTimeEnter, + Standard_Real& theTimeLeave) const; + DEFINE_STANDARD_RTTIEXT(SelectMgr_BaseIntersector,Standard_Transient) protected: diff --git a/src/SelectMgr/SelectMgr_Frustum.hxx b/src/SelectMgr/SelectMgr_Frustum.hxx index 5b635b9acb..6299db613b 100644 --- a/src/SelectMgr/SelectMgr_Frustum.hxx +++ b/src/SelectMgr/SelectMgr_Frustum.hxx @@ -93,8 +93,34 @@ protected: const Standard_Real theRadius, Standard_Boolean* theInside = NULL) const; + //! Intersection test between defined volume and given cylinder (or cone). + Standard_Boolean hasCylinderOverlap (const Standard_Real theBottomRad, + const Standard_Real theTopRad, + const Standard_Real theHeight, + const gp_Trsf& theTrsf, + Standard_Boolean* theInside = NULL) const; + + //! Checking whether the point thePnt is inside the shape with borders theVertices. + //! thePnt and theVertices lie in the same plane. + Standard_Boolean IsDotInside (const gp_Pnt& thePnt, + const TColgp_Array1OfPnt& theVertices) const; + private: + //! Return true if one segment enclosed between the points thePnt1Seg1 and thePnt2Seg1 + //! intersects another segment that enclosed between thePnt1Seg2 and thePnt2Seg2. + Standard_Boolean isSegmentsIntersect (const gp_Pnt& thePnt1Seg1, + const gp_Pnt& thePnt2Seg1, + const gp_Pnt& thePnt1Seg2, + const gp_Pnt& thePnt2Seg2) const; + + //! Checking whether the borders theVertices of the shape intersect + //! the cylinder (or cone) end face with the center theCenter and radius theRadius + Standard_Boolean isIntersectCylinderEndFace (const Standard_Real theRad, + const gp_Pnt& theCenter, + const gp_Trsf& theTrsf, + const TColgp_Array1OfPnt& theVertices) const; + //! Checks if AABB and frustum are separated along the given axis Standard_Boolean isSeparated (const SelectMgr_Vec3& theBoxMin, const SelectMgr_Vec3& theBoxMax, diff --git a/src/SelectMgr/SelectMgr_Frustum.lxx b/src/SelectMgr/SelectMgr_Frustum.lxx index 4357516dea..07be0d8d99 100644 --- a/src/SelectMgr/SelectMgr_Frustum.lxx +++ b/src/SelectMgr/SelectMgr_Frustum.lxx @@ -13,6 +13,7 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. +#include #include #include #include @@ -147,7 +148,6 @@ Standard_Boolean SelectMgr_Frustum::hasBoxOverlap (const SelectMgr_Vec3& theM } const Standard_Integer anIncFactor = (Camera()->IsOrthographic() && N == 4) ? 2 : 1; - for (Standard_Integer aPlaneIdx = 0; aPlaneIdx < N + 1; aPlaneIdx += anIncFactor) { const gp_XYZ& aPlane = myPlanes[aPlaneIdx].XYZ(); @@ -207,7 +207,6 @@ template Standard_Boolean SelectMgr_Frustum::hasPointOverlap (const gp_Pnt& thePnt) const { const Standard_Integer anIncFactor = (Camera()->IsOrthographic() && N == 4) ? 2 : 1; - for (Standard_Integer aPlaneIdx = 0; aPlaneIdx < N + 1; aPlaneIdx += anIncFactor) { const Standard_Real aPointProj = myPlanes[aPlaneIdx].XYZ().Dot (thePnt.XYZ()); @@ -516,6 +515,259 @@ Standard_Boolean SelectMgr_Frustum::hasSphereOverlap (const gp_Pnt& thePnt, return IsBoundaryIntersectSphere (aCenterProj, theRadius, aNorm, aBoundaries, isBoundaryInside); } +// ======================================================================= +// function : IsDotInside +// purpose : +// ======================================================================= +template +Standard_Boolean SelectMgr_Frustum::IsDotInside (const gp_Pnt& thePnt, + const TColgp_Array1OfPnt& theVertices) const +{ + Standard_Real anAngle = 0.0; + for (Standard_Integer aVertIdx = 0; aVertIdx < theVertices.Size(); aVertIdx++) + { + const gp_Pnt aVert1 = theVertices[aVertIdx]; + const gp_Pnt aVert2 = (aVertIdx == (theVertices.Size() - 1) ? theVertices[0] : theVertices[aVertIdx + 1]); + const gp_Vec aVec1 (thePnt, aVert1); + const gp_Vec aVec2 (thePnt, aVert2); + anAngle += aVec1.Angle (aVec2); + } + if (Abs (anAngle - 2.0 * M_PI) < Precision::Angular()) + { + return true; + } + return false; +} + +// ======================================================================= +// function : isSegmentsIntersect +// purpose : +// ======================================================================= +template +Standard_Boolean SelectMgr_Frustum::isSegmentsIntersect (const gp_Pnt& thePnt1Seg1, + const gp_Pnt& thePnt2Seg1, + const gp_Pnt& thePnt1Seg2, + const gp_Pnt& thePnt2Seg2) const +{ + const gp_Mat aMatPln (thePnt2Seg1.X() - thePnt1Seg1.X(), thePnt2Seg1.Y() - thePnt1Seg1.Y(), thePnt2Seg1.Z() - thePnt1Seg1.Z(), + thePnt1Seg2.X() - thePnt1Seg1.X(), thePnt1Seg2.Y() - thePnt1Seg1.Y(), thePnt1Seg2.Z() - thePnt1Seg1.Z(), + thePnt2Seg2.X() - thePnt1Seg1.X(), thePnt2Seg2.Y() - thePnt1Seg1.Y(), thePnt2Seg2.Z() - thePnt1Seg1.Z()); + if (Abs (aMatPln.Determinant()) > Precision::Confusion()) + { + return false; + } + + Standard_Real aFst[4] = {thePnt1Seg1.X(), thePnt2Seg1.X(), thePnt1Seg2.X(), thePnt2Seg2.X()}; + Standard_Real aSnd[4] = {thePnt1Seg1.Y(), thePnt2Seg1.Y(), thePnt1Seg2.Y(), thePnt2Seg2.Y()}; + if (aFst[0] == aFst[2] && aFst[1] == aFst[3]) + { + aFst[0] = thePnt1Seg1.Z(); + aFst[1] = thePnt2Seg1.Z(); + aFst[2] = thePnt1Seg2.Z(); + aFst[3] = thePnt2Seg2.Z(); + } + if (aSnd[0] == aSnd[2] + && aSnd[1] == aSnd[3]) + { + aSnd[0] = thePnt1Seg1.Z(); + aSnd[1] = thePnt2Seg1.Z(); + aSnd[2] = thePnt1Seg2.Z(); + aSnd[3] = thePnt2Seg2.Z(); + } + const gp_Mat2d aMat (gp_XY (aFst[0] - aFst[1], aSnd[0] - aSnd[1]), + gp_XY (aFst[3] - aFst[2], aSnd[3] - aSnd[2])); + + const gp_Mat2d aMatU (gp_XY (aFst[0] - aFst[2], aSnd[0] - aSnd[2]), + gp_XY (aFst[3] - aFst[2], aSnd[3] - aSnd[2])); + + const gp_Mat2d aMatV (gp_XY (aFst[0] - aFst[1], aSnd[0] - aSnd[1]), + gp_XY (aFst[0] - aFst[2], aSnd[0] - aSnd[2])); + if (aMat.Determinant() == 0.0) + { + return false; + } + + const Standard_Real anU = aMatU.Determinant() / aMat.Determinant(); + const Standard_Real aV = aMatV.Determinant() / aMat.Determinant(); + if (anU >= 0.0 && anU <= 1.0 + && aV >= 0.0 && aV <= 1.0) + { + return true; + } + return false; +} + +// ======================================================================= +// function : isIntersectCylinderEndFace +// purpose : +// ======================================================================= +template +Standard_Boolean SelectMgr_Frustum::isIntersectCylinderEndFace (const Standard_Real theRad, + const gp_Pnt& theCenter, + const gp_Trsf& theTrsf, + const TColgp_Array1OfPnt& theVertices) const +{ + const gp_Trsf aTrsfInv = theTrsf.Inverted(); + const gp_Dir aRayDir = gp_Dir (myEdgeDirs[N == 4 ? 4 : 0]).Transformed (aTrsfInv); + if (aRayDir.Z() == 0.0) + { + return false; + } + + for (Standard_Integer anIdx = theVertices.Lower(); anIdx <= theVertices.Upper(); anIdx++) + { + const gp_Pnt aPntStart = theVertices.Value (anIdx).Transformed (aTrsfInv); + const gp_Pnt aPntFinish = anIdx == theVertices.Upper() + ? theVertices.Value (theVertices.Lower()).Transformed (aTrsfInv) + : theVertices.Value (anIdx + 1).Transformed (aTrsfInv); + + // Project points on the end face plane + const Standard_Real aParam1 = (theCenter.Z() - aPntStart.Z()) / aRayDir.Z(); + const Standard_Real aX1 = aPntStart.X() + aRayDir.X() * aParam1; + const Standard_Real anY1 = aPntStart.Y() + aRayDir.Y() * aParam1; + + const Standard_Real aParam2 = (theCenter.Z() - aPntFinish.Z()) / aRayDir.Z(); + const Standard_Real aX2 = aPntFinish.X() + aRayDir.X() * aParam2; + const Standard_Real anY2 = aPntFinish.Y() + aRayDir.Y() * aParam2; + + // Solving quadratic equation anA * T^2 + 2 * aK * T + aC = 0 + const Standard_Real anA = (aX1 - aX2) * (aX1 - aX2) + (anY1 - anY2) * (anY1 - anY2); + const Standard_Real aK = aX1 * (aX2 - aX1) + anY1 * (anY2 - anY1); + const Standard_Real aC = aX1 * aX1 + anY1 * anY1 - theRad * theRad; + + const Standard_Real aDiscr = aK * aK - anA * aC; + if (aDiscr >= 0.0) + { + const Standard_Real aT1 = (-aK + Sqrt (aDiscr)) / anA; + const Standard_Real aT2 = (-aK - Sqrt (aDiscr)) / anA; + if ((aT1 >= 0 && aT1 <= 1) || (aT2 >= 0 && aT2 <= 1)) + { + return true; + } + } + } + return false; +} + +// ======================================================================= +// function : hasCylinderOverlap +// purpose : +// ======================================================================= +template +Standard_Boolean SelectMgr_Frustum::hasCylinderOverlap (const Standard_Real theBottomRad, + const Standard_Real theTopRad, + const Standard_Real theHeight, + const gp_Trsf& theTrsf, + Standard_Boolean* theInside) const +{ + const gp_Dir aCylNorm (gp::DZ().Transformed (theTrsf)); + const gp_Pnt aBottomCenter (gp::Origin().Transformed (theTrsf)); + const gp_Pnt aTopCenter = aBottomCenter.XYZ() + aCylNorm.XYZ() * theHeight; + + const gp_Dir aViewRayDir = gp_Dir (myEdgeDirs[N == 4 ? 4 : 0]); + const gp_Pln aPln (myVertices[0], aViewRayDir); + Standard_Real aCoefA, aCoefB, aCoefC, aCoefD; + aPln.Coefficients (aCoefA, aCoefB, aCoefC, aCoefD); + + const Standard_Real aTBottom = -(aBottomCenter.XYZ().Dot (aViewRayDir.XYZ()) + aCoefD); + const gp_Pnt aBottomCenterProject (aCoefA * aTBottom + aBottomCenter.X(), + aCoefB * aTBottom + aBottomCenter.Y(), + aCoefC * aTBottom + aBottomCenter.Z()); + const Standard_Real aTTop = -(aTopCenter.XYZ().Dot (aViewRayDir.XYZ()) + aCoefD); + const gp_Pnt aTopCenterProject (aCoefA * aTTop + aTopCenter.X(), + aCoefB * aTTop + aTopCenter.Y(), + aCoefC * aTTop + aTopCenter.Z()); + gp_Vec aCylNormProject (0, 0, 0); + if (aTopCenterProject.Distance (aBottomCenterProject) > 0.0) + { + aCylNormProject = gp_Vec ((aTopCenterProject.XYZ() - aBottomCenterProject.XYZ()) + / aTopCenterProject.Distance (aBottomCenterProject)); + } + + gp_Pnt aPoints[6]; + const gp_Dir aDirEndFaces = (aCylNorm.IsParallel (aViewRayDir, Precision::Angular())) + ? gp::DY().Transformed (theTrsf) + : aCylNorm.Crossed (aViewRayDir); + + const Standard_Real anAngle = aCylNorm.Angle (aViewRayDir); + aPoints[0] = aBottomCenterProject.XYZ() - aCylNormProject.XYZ() * theBottomRad * Abs (Cos (anAngle)); + aPoints[1] = aBottomCenterProject.XYZ() + aDirEndFaces.XYZ() * theBottomRad; + aPoints[2] = aTopCenterProject.XYZ() + aDirEndFaces.XYZ() * theTopRad; + aPoints[3] = aTopCenterProject.XYZ() + aCylNormProject.XYZ() * theTopRad * Abs (Cos (anAngle)); + aPoints[4] = aTopCenterProject.XYZ() - aDirEndFaces.XYZ() * theTopRad; + aPoints[5] = aBottomCenterProject.XYZ() - aDirEndFaces.XYZ() * theBottomRad; + const TColgp_Array1OfPnt aPointsArr (aPoints[0], 0, 5); + + gp_Pnt aVerticesBuf[N]; + TColgp_Array1OfPnt aVertices (aVerticesBuf[0], 0, N - 1); + const Standard_Integer anIncFactor = (Camera()->IsOrthographic() && N == 4) ? 2 : 1; + if (anIncFactor == 2) + { + const Standard_Integer anIndices[] = { 0, 2, 6, 4 }; + for (Standard_Integer anIdx = 0; anIdx < N; anIdx++) + { + aVertices.SetValue (anIdx, myVertices[anIndices[anIdx]]); + } + } + else + { + for (Standard_Integer anIdx = 0; anIdx < N; anIdx++) + { + aVertices.SetValue (anIdx, myVertices[anIdx]); + } + } + for (Standard_Integer anIdx = 0; anIdx < N; anIdx++) + { + if ((aCylNormProject.Dot (aCylNormProject) == 0.0 + && aVertices.Value (anIdx).Distance (aPoints[0]) <= Max (theTopRad, theBottomRad)) + || IsDotInside (aVertices.Value (anIdx), aPointsArr)) + { + if (theInside != NULL) + { + *theInside = false; + } + return true; + } + } + + for (Standard_Integer anIdx = aVertices.Lower(); anIdx <= aVertices.Upper(); anIdx++) + { + const gp_Pnt aPnt1Seg = aVertices[anIdx]; + const gp_Pnt aPnt2Seg = (anIdx == aVertices.Upper()) ? aVertices[aVertices.Lower()] : aVertices[anIdx + 1]; + if (isSegmentsIntersect (aPoints[1], aPoints[2], aPnt1Seg, aPnt2Seg) + || isSegmentsIntersect (aPoints[4], aPoints[5], aPnt1Seg, aPnt2Seg) + || isSegmentsIntersect (aPoints[4], aPoints[2], aPnt1Seg, aPnt2Seg) + || isSegmentsIntersect (aPoints[1], aPoints[5], aPnt1Seg, aPnt2Seg)) + { + if (theInside != NULL) + { + *theInside = false; + } + return true; + } + } + + if (isIntersectCylinderEndFace (theBottomRad, gp_Pnt (0, 0, 0), theTrsf, aVertices) + || isIntersectCylinderEndFace (theTopRad, gp_Pnt (0, 0, theHeight), theTrsf, aVertices)) + { + if (theInside != NULL) + { + *theInside = false; + } + return true; + } + bool isCylInsideRec = true; + for (int i = 0; i < 6; ++i) + { + isCylInsideRec &= IsDotInside (aPoints[i], aVertices); + } + if (theInside != NULL) + { + *theInside &= isCylInsideRec; + } + return isCylInsideRec; +} + //======================================================================= //function : DumpJson //purpose : diff --git a/src/SelectMgr/SelectMgr_RectangularFrustum.cxx b/src/SelectMgr/SelectMgr_RectangularFrustum.cxx index 9b8925f12d..44354f1f84 100644 --- a/src/SelectMgr/SelectMgr_RectangularFrustum.cxx +++ b/src/SelectMgr/SelectMgr_RectangularFrustum.cxx @@ -740,6 +740,65 @@ Standard_Boolean SelectMgr_RectangularFrustum::OverlapsTriangle (const gp_Pnt& t return !theClipRange.IsClipped (thePickResult.Depth()); } +//======================================================================= +// function : OverlapsCylinder +// purpose : +//======================================================================= +Standard_Boolean SelectMgr_RectangularFrustum::OverlapsCylinder (const Standard_Real theBottomRad, + const Standard_Real theTopRad, + const Standard_Real theHeight, + const gp_Trsf& theTrsf, + const SelectMgr_ViewClipRange& theClipRange, + SelectBasics_PickResult& thePickResult) const +{ + Standard_ASSERT_RAISE (mySelectionType == SelectMgr_SelectionType_Point || mySelectionType == SelectMgr_SelectionType_Box, + "Error! SelectMgr_RectangularFrustum::Overlaps() should be called after selection frustum initialization"); + Standard_Real aTimeEnter = 0.0, aTimeLeave = 0.0; + const gp_Trsf aTrsfInv = theTrsf.Inverted(); + const gp_Pnt aLoc = myNearPickedPnt.Transformed (aTrsfInv); + const gp_Dir aRayDir = myViewRayDir .Transformed (aTrsfInv); + if (!RayCylinderIntersection (theBottomRad, theTopRad, theHeight, aLoc, aRayDir, aTimeEnter, aTimeLeave)) + { + return Standard_False; + } + thePickResult.SetDepth (aTimeEnter * myScale); + if (theClipRange.IsClipped (thePickResult.Depth())) + { + thePickResult.SetDepth (aTimeLeave * myScale); + } + const gp_Pnt aPntOnCylinder (aLoc.XYZ() + aRayDir.XYZ() * thePickResult.Depth()); + if (Abs (aPntOnCylinder.Z()) < Precision::Confusion()) + { + thePickResult.SetSurfaceNormal (-gp::DZ().Transformed (theTrsf)); + } + else if (Abs (aPntOnCylinder.Z() - theHeight) < Precision::Confusion()) + { + thePickResult.SetSurfaceNormal (gp::DZ().Transformed (theTrsf)); + } + else + { + thePickResult.SetSurfaceNormal (gp_Vec (aPntOnCylinder.X(), aPntOnCylinder.Y(), 0.0).Transformed (theTrsf)); + } + thePickResult.SetPickedPoint (aPntOnCylinder); + return !theClipRange.IsClipped (thePickResult.Depth()); +} + +//======================================================================= +// function : OverlapsCylinder +// purpose : +//======================================================================= +Standard_Boolean SelectMgr_RectangularFrustum::OverlapsCylinder (const Standard_Real theBottomRad, + const Standard_Real theTopRad, + const Standard_Real theHeight, + const gp_Trsf& theTrsf, + Standard_Boolean* theInside) const +{ + Standard_ASSERT_RAISE (mySelectionType == SelectMgr_SelectionType_Point || mySelectionType == SelectMgr_SelectionType_Box, + "Error! SelectMgr_RectangularFrustum::Overlaps() should be called after selection frustum initialization"); + + return hasCylinderOverlap (theBottomRad, theTopRad, theHeight, theTrsf, theInside); +} + // ======================================================================= // function : GetMousePosition // purpose : diff --git a/src/SelectMgr/SelectMgr_RectangularFrustum.hxx b/src/SelectMgr/SelectMgr_RectangularFrustum.hxx index 145f1d072a..8788a4af51 100644 --- a/src/SelectMgr/SelectMgr_RectangularFrustum.hxx +++ b/src/SelectMgr/SelectMgr_RectangularFrustum.hxx @@ -144,6 +144,23 @@ public: const Standard_Real theRadius, Standard_Boolean* theInside) const Standard_OVERRIDE; + //! Returns true if selecting volume is overlapped by cylinder (or cone) with radiuses theBottomRad + //! and theTopRad, height theHeight and transformation to apply theTrsf. + Standard_EXPORT virtual Standard_Boolean OverlapsCylinder (const Standard_Real theBottomRad, + const Standard_Real theTopRad, + const Standard_Real theHeight, + const gp_Trsf& theTrsf, + const SelectMgr_ViewClipRange& theClipRange, + SelectBasics_PickResult& thePickResult) const Standard_OVERRIDE; + + //! Returns true if selecting volume is overlapped by cylinder (or cone) with radiuses theBottomRad + //! and theTopRad, height theHeight and transformation to apply theTrsf. + Standard_EXPORT virtual Standard_Boolean OverlapsCylinder (const Standard_Real theBottomRad, + const Standard_Real theTopRad, + const Standard_Real theHeight, + const gp_Trsf& theTrsf, + Standard_Boolean* theInside = NULL) const Standard_OVERRIDE; + //! Measures distance between 3d projection of user-picked //! screen point and given point theCOG. //! It makes sense only for frustums built on a single point. diff --git a/src/SelectMgr/SelectMgr_SelectingVolumeManager.cxx b/src/SelectMgr/SelectMgr_SelectingVolumeManager.cxx index 8ecc30fa92..d4eee16aec 100644 --- a/src/SelectMgr/SelectMgr_SelectingVolumeManager.cxx +++ b/src/SelectMgr/SelectMgr_SelectingVolumeManager.cxx @@ -418,6 +418,40 @@ Standard_Boolean SelectMgr_SelectingVolumeManager::OverlapsSphere (const gp_Pnt& return myActiveSelectingVolume->OverlapsSphere (theCenter, theRadius, theInside); } +//======================================================================= +// function : OverlapsCylinder +// purpose : +//======================================================================= +Standard_Boolean SelectMgr_SelectingVolumeManager::OverlapsCylinder (const Standard_Real theBottomRad, + const Standard_Real theTopRad, + const Standard_Real theHeight, + const gp_Trsf& theTrsf, + SelectBasics_PickResult& thePickResult) const +{ + if (myActiveSelectingVolume.IsNull()) + { + return false; + } + return myActiveSelectingVolume->OverlapsCylinder (theBottomRad, theTopRad, theHeight, theTrsf, myViewClipRange, thePickResult); +} + +//======================================================================= +// function : OverlapsCylinder +// purpose : +//======================================================================= +Standard_Boolean SelectMgr_SelectingVolumeManager::OverlapsCylinder (const Standard_Real theBottomRad, + const Standard_Real theTopRad, + const Standard_Real theHeight, + const gp_Trsf& theTrsf, + Standard_Boolean* theInside) const +{ + if (myActiveSelectingVolume.IsNull()) + { + return false; + } + return myActiveSelectingVolume->OverlapsCylinder (theBottomRad, theTopRad, theHeight, theTrsf, theInside); +} + //======================================================================= // function : DistToGeometryCenter // purpose : Measures distance between 3d projection of user-picked diff --git a/src/SelectMgr/SelectMgr_SelectingVolumeManager.hxx b/src/SelectMgr/SelectMgr_SelectingVolumeManager.hxx index 992a1c834f..580e206cda 100644 --- a/src/SelectMgr/SelectMgr_SelectingVolumeManager.hxx +++ b/src/SelectMgr/SelectMgr_SelectingVolumeManager.hxx @@ -162,6 +162,22 @@ public: const Standard_Real theRadius, Standard_Boolean* theInside = NULL) const Standard_OVERRIDE; + //! Returns true if selecting volume is overlapped by cylinder (or cone) with radiuses theBottomRad + //! and theTopRad, height theHeight and transformation to apply theTrsf. + Standard_EXPORT virtual Standard_Boolean OverlapsCylinder (const Standard_Real theBottomRad, + const Standard_Real theTopRad, + const Standard_Real theHeight, + const gp_Trsf& theTrsf, + SelectBasics_PickResult& thePickResult) const Standard_OVERRIDE; + + //! Returns true if selecting volume is overlapped by cylinder (or cone) with radiuses theBottomRad + //! and theTopRad, height theHeight and transformation to apply theTrsf. + Standard_EXPORT virtual Standard_Boolean OverlapsCylinder (const Standard_Real theBottomRad, + const Standard_Real theTopRad, + const Standard_Real theHeight, + const gp_Trsf& theTrsf, + Standard_Boolean* theInside = NULL) const Standard_OVERRIDE; + //! Measures distance between 3d projection of user-picked //! screen point and given point theCOG Standard_EXPORT virtual Standard_Real DistToGeometryCenter (const gp_Pnt& theCOG) const Standard_OVERRIDE; diff --git a/src/SelectMgr/SelectMgr_SelectionImageFiller.cxx b/src/SelectMgr/SelectMgr_SelectionImageFiller.cxx index 76177b2087..5436525f6e 100644 --- a/src/SelectMgr/SelectMgr_SelectionImageFiller.cxx +++ b/src/SelectMgr/SelectMgr_SelectionImageFiller.cxx @@ -67,6 +67,56 @@ namespace NCollection_DataMap myMapEntityColors; }; + //! Help class for filling pixel with random color. + class GeneratedEntityTypeColorFiller : public SelectMgr_SelectionImageFiller + { + public: + GeneratedEntityTypeColorFiller (Image_PixMap& thePixMap, + SelectMgr_ViewerSelector* theSelector) + : SelectMgr_SelectionImageFiller (thePixMap, theSelector) + { + // generate per-entity colors in the order as they have been activated + for (SelectMgr_SelectableObjectSet::Iterator anObjIter (theSelector->SelectableObjects()); anObjIter.More(); anObjIter.Next()) + { + const Handle(SelectMgr_SelectableObject)& anObj = anObjIter.Value(); + for (SelectMgr_SequenceOfSelection::Iterator aSelIter (anObj->Selections()); aSelIter.More(); aSelIter.Next()) + { + const Handle(SelectMgr_Selection)& aSel = aSelIter.Value(); + for (NCollection_Vector::Iterator aSelEntIter (aSel->Entities()); aSelEntIter.More(); aSelEntIter.Next()) + { + const Handle(SelectMgr_SensitiveEntity)& aSens = aSelEntIter.Value(); + if (!myMapEntityColors.IsBound (aSens->BaseSensitive()->DynamicType())) + { + Quantity_Color aColor; + randomPastelColor (aColor); + myMapEntityColors.Bind (aSens->BaseSensitive()->DynamicType(), aColor); + } + } + } + } + } + + virtual void Fill (const Standard_Integer theCol, + const Standard_Integer theRow, + const Standard_Integer thePicked) Standard_OVERRIDE + { + if (thePicked < 1 + || thePicked > myMainSel->NbPicked()) + { + myImage->SetPixelColor (theCol, theRow, Quantity_Color(Quantity_NOC_BLACK)); + return; + } + + const Handle(Select3D_SensitiveEntity)& aPickedEntity = myMainSel->PickedEntity (thePicked); + Quantity_Color aColor (Quantity_NOC_BLACK); + myMapEntityColors.Find (aPickedEntity->DynamicType(), aColor); + myImage->SetPixelColor (theCol, theRow, aColor); + } + + protected: + NCollection_DataMap myMapEntityColors; + }; + //! Help class for filling pixel with normalized depth of ray. class NormalizedDepthFiller : public SelectMgr_SelectionImageFiller { @@ -384,6 +434,10 @@ Handle(SelectMgr_SelectionImageFiller) SelectMgr_SelectionImageFiller::CreateFil { return new GeneratedEntityColorFiller (thePixMap, theSelector); } + case StdSelect_TypeOfSelectionImage_ColoredEntityType: + { + return new GeneratedEntityTypeColorFiller (thePixMap, theSelector); + } case StdSelect_TypeOfSelectionImage_ColoredOwner: { return new GeneratedOwnerColorFiller (thePixMap, theSelector); diff --git a/src/SelectMgr/SelectMgr_TriangularFrustum.cxx b/src/SelectMgr/SelectMgr_TriangularFrustum.cxx index 6f458b033b..44e8dac76d 100644 --- a/src/SelectMgr/SelectMgr_TriangularFrustum.cxx +++ b/src/SelectMgr/SelectMgr_TriangularFrustum.cxx @@ -329,6 +329,36 @@ Standard_Boolean SelectMgr_TriangularFrustum::OverlapsSphere (const gp_Pnt& theC return hasSphereOverlap (theCenter, theRadius); } +//======================================================================= +// function : OverlapsCylinder +// purpose : +//======================================================================= +Standard_Boolean SelectMgr_TriangularFrustum::OverlapsCylinder (const Standard_Real theBottomRad, + const Standard_Real theTopRad, + const Standard_Real theHeight, + const gp_Trsf& theTrsf, + const SelectMgr_ViewClipRange& theClipRange, + SelectBasics_PickResult& thePickResult) const +{ + (void)theClipRange; + (void)thePickResult; + return hasCylinderOverlap (theBottomRad, theTopRad, theHeight, theTrsf); +} + +//======================================================================= +// function : OverlapsCylinder +// purpose : +//======================================================================= +Standard_Boolean SelectMgr_TriangularFrustum::OverlapsCylinder (const Standard_Real theBottomRad, + const Standard_Real theTopRad, + const Standard_Real theHeight, + const gp_Trsf& theTrsf, + Standard_Boolean* theInside) const +{ + (void) theInside; + return hasCylinderOverlap (theBottomRad, theTopRad, theHeight, theTrsf); +} + // ======================================================================= // function : Clear // purpose : Nullifies the handle for corresponding builder instance to prevent diff --git a/src/SelectMgr/SelectMgr_TriangularFrustum.hxx b/src/SelectMgr/SelectMgr_TriangularFrustum.hxx index 0719132ef5..a5c7d08576 100644 --- a/src/SelectMgr/SelectMgr_TriangularFrustum.hxx +++ b/src/SelectMgr/SelectMgr_TriangularFrustum.hxx @@ -117,6 +117,23 @@ public: //! @name SAT Tests for different objects const SelectMgr_ViewClipRange& theClipRange, SelectBasics_PickResult& thePickResult) const Standard_OVERRIDE; + //! Returns true if selecting volume is overlapped by cylinder (or cone) with radiuses theBottomRad + //! and theTopRad, height theHeight and transformation to apply theTrsf. + Standard_EXPORT virtual Standard_Boolean OverlapsCylinder (const Standard_Real theBottomRad, + const Standard_Real theTopRad, + const Standard_Real theHeight, + const gp_Trsf& theTrsf, + const SelectMgr_ViewClipRange& theClipRange, + SelectBasics_PickResult& thePickResult) const Standard_OVERRIDE; + + //! Returns true if selecting volume is overlapped by cylinder (or cone) with radiuses theBottomRad + //! and theTopRad, height theHeight and transformation to apply theTrsf. + Standard_EXPORT virtual Standard_Boolean OverlapsCylinder (const Standard_Real theBottomRad, + const Standard_Real theTopRad, + const Standard_Real theHeight, + const gp_Trsf& theTrsf, + Standard_Boolean* theInside = NULL) const Standard_OVERRIDE; + public: //! Nullifies the handle to corresponding builder instance to prevent memory leaks diff --git a/src/SelectMgr/SelectMgr_TriangularFrustumSet.cxx b/src/SelectMgr/SelectMgr_TriangularFrustumSet.cxx index f8ed8857f0..31cc5e69f4 100644 --- a/src/SelectMgr/SelectMgr_TriangularFrustumSet.cxx +++ b/src/SelectMgr/SelectMgr_TriangularFrustumSet.cxx @@ -498,6 +498,123 @@ Standard_Boolean SelectMgr_TriangularFrustumSet::OverlapsSphere (const gp_Pnt& t return Standard_False; } +//======================================================================= +// function : OverlapsCylinder +// purpose : +//======================================================================= +Standard_Boolean SelectMgr_TriangularFrustumSet::OverlapsCylinder (const Standard_Real theBottomRad, + const Standard_Real theTopRad, + const Standard_Real theHeight, + const gp_Trsf& theTrsf, + const SelectMgr_ViewClipRange& theClipRange, + SelectBasics_PickResult& thePickResult) const +{ + Standard_ASSERT_RAISE (mySelectionType == SelectMgr_SelectionType_Polyline, + "Error! SelectMgr_TriangularFrustumSet::Overlaps() should be called after selection frustum initialization"); + for (SelectMgr_TriangFrustums::Iterator anIter (myFrustums); anIter.More(); anIter.Next()) + { + if (anIter.Value()->OverlapsCylinder (theBottomRad, theTopRad, theHeight, theTrsf, theClipRange, thePickResult)) + { + return true; + } + } + return false; +} + +//======================================================================= +// function : OverlapsCylinder +// purpose : +//======================================================================= +Standard_Boolean SelectMgr_TriangularFrustumSet::OverlapsCylinder (const Standard_Real theBottomRad, + const Standard_Real theTopRad, + const Standard_Real theHeight, + const gp_Trsf& theTrsf, + Standard_Boolean* theInside) const +{ + const gp_Dir aCylNorm (gp::DZ().Transformed (theTrsf)); + const gp_Pnt aBottomCenter (gp::Origin().Transformed (theTrsf)); + const gp_Pnt aTopCenter = aBottomCenter.XYZ() + aCylNorm.XYZ() * theHeight; + + const gp_Vec aVecPlane1 (myFrustums.First()->myVertices[0], myFrustums.First()->myVertices[1]); + const gp_Vec aVecPlane2 (myFrustums.First()->myVertices[0], myFrustums.First()->myVertices[2]); + + const gp_Dir aDirNorm (aVecPlane1.Crossed (aVecPlane2)); + const Standard_Real anAngle = aCylNorm.Angle (aDirNorm); + const Standard_Real aCosAngle = Cos (anAngle); + const gp_Pln aPln (myFrustums.First()->myVertices[0], aDirNorm); + Standard_Real aCoefA, aCoefB, aCoefC, aCoefD; + aPln.Coefficients (aCoefA, aCoefB, aCoefC, aCoefD); + + const Standard_Real aTBottom = -(aBottomCenter.XYZ().Dot (aDirNorm.XYZ()) + aCoefD) / aDirNorm.Dot (aDirNorm); + const gp_Pnt aBottomCenterProject (aCoefA * aTBottom + aBottomCenter.X(), + aCoefB * aTBottom + aBottomCenter.Y(), + aCoefC * aTBottom + aBottomCenter.Z()); + + const Standard_Real aTTop = -(aTopCenter.XYZ().Dot (aDirNorm.XYZ()) + aCoefD) / aDirNorm.Dot (aDirNorm); + const gp_Pnt aTopCenterProject (aCoefA * aTTop + aTopCenter.X(), + aCoefB * aTTop + aTopCenter.Y(), + aCoefC * aTTop + aTopCenter.Z()); + + gp_XYZ aCylNormProject; + const gp_XYZ aTopBottomVec = aTopCenterProject.XYZ() - aBottomCenterProject.XYZ(); + const Standard_Real aTopBottomDist = aTopBottomVec.Modulus(); + if (aTopBottomDist > 0.0) + { + aCylNormProject = aTopBottomVec / aTopBottomDist; + } + + gp_Pnt aPoints[6]; + aPoints[0] = aBottomCenterProject.XYZ() - aCylNormProject * theBottomRad * Abs (aCosAngle); + aPoints[1] = aTopCenterProject.XYZ() + aCylNormProject * theTopRad * Abs (aCosAngle); + const gp_Dir aDirEndFaces = (aCylNorm.IsParallel (aDirNorm, Precision::Angular())) + ? gp::DY().Transformed (theTrsf) + : aCylNorm.Crossed (aDirNorm); + + aPoints[2] = aTopCenterProject.XYZ() + aDirEndFaces.XYZ() * theTopRad; + aPoints[3] = aTopCenterProject.XYZ() - aDirEndFaces.XYZ() * theTopRad; + aPoints[4] = aBottomCenterProject.XYZ() + aDirEndFaces.XYZ() * theBottomRad; + aPoints[5] = aBottomCenterProject.XYZ() - aDirEndFaces.XYZ() * theBottomRad; + + gp_Pnt aVerticesBuf[3]; + TColgp_Array1OfPnt aVertices (aVerticesBuf[0], 0, 2); + + bool isCylInsideTriangSet = true; + for (int i = 0; i < 6; ++i) + { + bool isInside = false; + for (SelectMgr_TriangFrustums::Iterator anIter (myFrustums); anIter.More(); anIter.Next()) + { + + for (int anIdx = 0; anIdx < 3; anIdx++) + { + aVertices[anIdx] = anIter.Value()->myVertices[anIdx]; + } + if (anIter.Value()->IsDotInside (aPoints[i], aVertices)) + { + isInside = true; + break; + } + } + isCylInsideTriangSet &= isInside; + } + if (theInside != NULL) + { + *theInside &= isCylInsideTriangSet; + } + if (isCylInsideTriangSet) + { + return true; + } + for (SelectMgr_TriangFrustums::Iterator anIter (myFrustums); anIter.More(); anIter.Next()) + { + if (anIter.Value()->OverlapsCylinder (theBottomRad, theTopRad, theHeight, theTrsf, theInside)) + { + return true; + } + } + return false; +} + // ======================================================================= // function : GetPlanes // purpose : diff --git a/src/SelectMgr/SelectMgr_TriangularFrustumSet.hxx b/src/SelectMgr/SelectMgr_TriangularFrustumSet.hxx index 1618b44d64..f5c51f31a0 100644 --- a/src/SelectMgr/SelectMgr_TriangularFrustumSet.hxx +++ b/src/SelectMgr/SelectMgr_TriangularFrustumSet.hxx @@ -118,6 +118,23 @@ public: const SelectMgr_ViewClipRange& theClipRange, SelectBasics_PickResult& thePickResult) const Standard_OVERRIDE; + //! Returns true if selecting volume is overlapped by cylinder (or cone) with radiuses theBottomRad + //! and theTopRad, height theHeight and transformation to apply theTrsf. + Standard_EXPORT virtual Standard_Boolean OverlapsCylinder (const Standard_Real theBottomRad, + const Standard_Real theTopRad, + const Standard_Real theHeight, + const gp_Trsf& theTrsf, + const SelectMgr_ViewClipRange& theClipRange, + SelectBasics_PickResult& thePickResult) const Standard_OVERRIDE; + + //! Returns true if selecting volume is overlapped by cylinder (or cone) with radiuses theBottomRad + //! and theTopRad, height theHeight and transformation to apply theTrsf. + Standard_EXPORT virtual Standard_Boolean OverlapsCylinder (const Standard_Real theBottomRad, + const Standard_Real theTopRad, + const Standard_Real theHeight, + const gp_Trsf& theTrsf, + Standard_Boolean* theInside = NULL) const Standard_OVERRIDE; + //! Stores plane equation coefficients (in the following form: //! Ax + By + Cz + D = 0) to the given vector Standard_EXPORT virtual void GetPlanes (NCollection_Vector& thePlaneEquations) const Standard_OVERRIDE; diff --git a/src/StdSelect/StdSelect_BRepSelectionTool.cxx b/src/StdSelect/StdSelect_BRepSelectionTool.cxx index 8d3a79c15d..ce3ecbf5be 100644 --- a/src/StdSelect/StdSelect_BRepSelectionTool.cxx +++ b/src/StdSelect/StdSelect_BRepSelectionTool.cxx @@ -27,6 +27,9 @@ #include #include #include +#include +#include +#include #include #include #include @@ -37,6 +40,7 @@ #include #include #include +#include #include #include #include @@ -268,6 +272,142 @@ void StdSelect_BRepSelectionTool::ComputeSensitive (const TopoDS_Shape& theShape { TopTools_IndexedMapOfShape aSubfacesMap; TopExp::MapShapes (theShape, TopAbs_FACE, aSubfacesMap); + if (aSubfacesMap.Extent() == 2) // detect cone + { + const TopoDS_Face* aFaces[2] = + { + &TopoDS::Face (aSubfacesMap.FindKey (1)), + &TopoDS::Face (aSubfacesMap.FindKey (2)) + }; + + TopLoc_Location aLocSurf; + const Handle(Geom_Surface)* aSurfaces[2] = + { + &BRep_Tool::Surface (*aFaces[0], aLocSurf), + &BRep_Tool::Surface (*aFaces[1], aLocSurf) + }; + + Standard_Integer aConIndex = 0; + Handle(Geom_ConicalSurface) aGeomCone = Handle(Geom_ConicalSurface)::DownCast (*aSurfaces[0]); + Handle(Geom_Plane) aGeomPln; + if (!aGeomCone.IsNull()) + { + aGeomPln = Handle(Geom_Plane)::DownCast (*aSurfaces[1]); + } + else + { + aConIndex = 1; + aGeomCone = Handle(Geom_ConicalSurface)::DownCast (*aSurfaces[1]); + aGeomPln = Handle(Geom_Plane)::DownCast (*aSurfaces[0]); + } + if (!aGeomCone.IsNull() + && !aGeomPln.IsNull() + && aGeomPln->Position().Direction().IsEqual (aGeomCone->Position().Direction(), Precision::Angular())) + { + const gp_Cone aCone = BRepAdaptor_Surface (*aFaces[aConIndex]).Cone(); + const Standard_Real aRad1 = aCone.RefRadius(); + const Standard_Real aHeight = (aRad1 != 0.0) + ? aRad1 / Abs (Tan (aCone.SemiAngle())) + : aCone.Location().Distance (aGeomPln->Location()); + const Standard_Real aRad2 = (aRad1 != 0.0) ? 0.0 : Tan (aCone.SemiAngle()) * aHeight; + gp_Trsf aTrsf; + aTrsf.SetTransformation (aCone.Position(), gp_Ax3()); + Handle(Select3D_SensitiveCylinder) aSensSCyl = new Select3D_SensitiveCylinder (theOwner, aRad1, aRad2, aHeight, aTrsf); + theSelection->Add (aSensSCyl); + break; + } + } + if (aSubfacesMap.Extent() == 3) // detect cylinder or truncated cone + { + const TopoDS_Face* aFaces[3] = + { + &TopoDS::Face (aSubfacesMap.FindKey (1)), + &TopoDS::Face (aSubfacesMap.FindKey (2)), + &TopoDS::Face (aSubfacesMap.FindKey (3)) + }; + + TopLoc_Location aLocSurf; + const Handle(Geom_Surface)* aSurfaces[3] = + { + &BRep_Tool::Surface (*aFaces[0], aLocSurf), + &BRep_Tool::Surface (*aFaces[1], aLocSurf), + &BRep_Tool::Surface (*aFaces[2], aLocSurf) + }; + + Standard_Integer aConIndex = -1, aNbPlanes = 0; + Handle(Geom_ConicalSurface) aGeomCone; + Handle(Geom_CylindricalSurface) aGeomCyl; + Handle(Geom_Plane) aGeomPlanes[2]; + for (Standard_Integer aSurfIter = 0; aSurfIter < 3; ++aSurfIter) + { + const Handle(Geom_Surface)& aSurf = *aSurfaces[aSurfIter]; + if (aConIndex == -1) + { + aGeomCone = Handle (Geom_ConicalSurface)::DownCast (aSurf); + if (!aGeomCone.IsNull()) + { + aConIndex = aSurfIter; + continue; + } + aGeomCyl = Handle (Geom_CylindricalSurface)::DownCast (aSurf); + if (!aGeomCyl.IsNull()) + { + aConIndex = aSurfIter; + continue; + } + } + if (aNbPlanes < 2) + { + aGeomPlanes[aNbPlanes] = Handle(Geom_Plane)::DownCast (aSurf); + if (!aGeomPlanes[aNbPlanes].IsNull()) + { + ++aNbPlanes; + } + } + } + + if (!aGeomCone.IsNull()) + { + if (!aGeomPlanes[0].IsNull() + && !aGeomPlanes[1].IsNull() + && aGeomPlanes[0]->Position().Direction().IsEqual (aGeomCone->Position().Direction(), Precision::Angular()) + && aGeomPlanes[1]->Position().Direction().IsEqual (aGeomCone->Position().Direction(), Precision::Angular())) + { + const gp_Cone aCone = BRepAdaptor_Surface (*aFaces[aConIndex]).Cone(); + const Standard_Real aRad1 = aCone.RefRadius(); + const Standard_Real aHeight = aGeomPlanes[0]->Location().Distance (aGeomPlanes[1]->Location()); + gp_Trsf aTrsf; + aTrsf.SetTransformation (aCone.Position(), gp_Ax3()); + const Standard_Real aTriangleHeight = (aCone.SemiAngle() > 0.0) + ? aRad1 / Tan (aCone.SemiAngle()) + : aRad1 / Tan (Abs (aCone.SemiAngle())) - aHeight; + const Standard_Real aRad2 = (aCone.SemiAngle() > 0.0) + ? aRad1 * (aTriangleHeight + aHeight) / aTriangleHeight + : aRad1 * aTriangleHeight / (aTriangleHeight + aHeight); + Handle(Select3D_SensitiveCylinder) aSensSCyl = new Select3D_SensitiveCylinder (theOwner, aRad1, aRad2, aHeight, aTrsf); + theSelection->Add (aSensSCyl); + break; + } + } + else if (!aGeomCyl.IsNull()) + { + if (!aGeomPlanes[0].IsNull() + && !aGeomPlanes[1].IsNull() + && aGeomPlanes[0]->Position().Direction().IsEqual (aGeomCyl->Position().Direction(), Precision::Angular()) + && aGeomPlanes[1]->Position().Direction().IsEqual (aGeomCyl->Position().Direction(), Precision::Angular())) + { + const gp_Cylinder aCyl = BRepAdaptor_Surface (*aFaces[aConIndex]).Cylinder(); + const Standard_Real aRad = aCyl.Radius(); + const Standard_Real aHeight = aGeomPlanes[0]->Location().Distance (aGeomPlanes[1]->Location()); + gp_Trsf aTrsf; + aTrsf.SetTransformation (aCyl.Position(), gp_Ax3()); + Handle(Select3D_SensitiveCylinder) aSensSCyl = new Select3D_SensitiveCylinder (theOwner, aRad, aRad, aHeight, aTrsf); + theSelection->Add (aSensSCyl); + break; + } + } + } + for (Standard_Integer aShIndex = 1; aShIndex <= aSubfacesMap.Extent(); ++aShIndex) { ComputeSensitive (aSubfacesMap (aShIndex), theOwner, diff --git a/src/StdSelect/StdSelect_TypeOfSelectionImage.hxx b/src/StdSelect/StdSelect_TypeOfSelectionImage.hxx index 52c64307d9..bfca297dbf 100644 --- a/src/StdSelect/StdSelect_TypeOfSelectionImage.hxx +++ b/src/StdSelect/StdSelect_TypeOfSelectionImage.hxx @@ -23,6 +23,7 @@ enum StdSelect_TypeOfSelectionImage StdSelect_TypeOfSelectionImage_UnnormalizedDepth, //!< unnormalized depth (grayscale) StdSelect_TypeOfSelectionImage_ColoredDetectedObject, //!< color of detected object StdSelect_TypeOfSelectionImage_ColoredEntity, //!< random color for each entity + StdSelect_TypeOfSelectionImage_ColoredEntityType, //!< random color for each entity type StdSelect_TypeOfSelectionImage_ColoredOwner, //!< random color for each owner StdSelect_TypeOfSelectionImage_ColoredSelectionMode, //!< color of selection mode StdSelect_TypeOfSelectionImage_SurfaceNormal //!< normal direction values diff --git a/src/ViewerTest/ViewerTest_ViewerCommands.cxx b/src/ViewerTest/ViewerTest_ViewerCommands.cxx index 67870df603..235badc394 100644 --- a/src/ViewerTest/ViewerTest_ViewerCommands.cxx +++ b/src/ViewerTest/ViewerTest_ViewerCommands.cxx @@ -13699,6 +13699,11 @@ static int VDumpSelectionImage (Draw_Interpretor& /*theDi*/, { aType = StdSelect_TypeOfSelectionImage_ColoredEntity; } + else if (aValue == "entitytypecolor" + || aValue == "entitytype") + { + aType = StdSelect_TypeOfSelectionImage_ColoredEntityType; + } else if (aValue == "ownercolor" || aValue == "owner") { @@ -15148,7 +15153,7 @@ void ViewerTest::ViewerCommands(Draw_Interpretor& theCommands) __FILE__, VSelectionProperties, group); theCommands.Add ("vseldump", - "vseldump file -type {depth|unnormDepth|object|owner|selMode|entity|surfNormal}=depth -pickedIndex Index=1" + "vseldump file -type {depth|unnormDepth|object|owner|selMode|entity|entityType|surfNormal}=depth -pickedIndex Index=1" "\n\t\t: [-xrPose base|head=base]" "\n\t\t: Generate an image based on detection results:" "\n\t\t: depth normalized depth values" @@ -15156,7 +15161,8 @@ void ViewerTest::ViewerCommands(Draw_Interpretor& theCommands) "\n\t\t: object color of detected object" "\n\t\t: owner color of detected owner" "\n\t\t: selMode color of selection mode" - "\n\t\t: entity color of etected entity" + "\n\t\t: entity color of detected entity" + "\n\t\t: entityType color of detected entity type" "\n\t\t: surfNormal normal direction values", __FILE__, VDumpSelectionImage, group); diff --git a/tests/vselect/cone_cylinder/begin b/tests/vselect/cone_cylinder/begin new file mode 100644 index 0000000000..26ce00044f --- /dev/null +++ b/tests/vselect/cone_cylinder/begin @@ -0,0 +1,2 @@ +vinit View1 -height 400 -width 600 +set subgroup "cone_cylinder" diff --git a/tests/vselect/cone_cylinder/check_depth b/tests/vselect/cone_cylinder/check_depth new file mode 100644 index 0000000000..f4ba540ad1 --- /dev/null +++ b/tests/vselect/cone_cylinder/check_depth @@ -0,0 +1,56 @@ +puts "=================================" +puts "0032281: Visualization - add Select3D_SensitiveCylinder" +puts "Tests depth value returned by Select3D_SensitiveCylinder" +puts "=================================" + +pcylinder cyl 10 20 +vdisplay cyl -dispmode 1 +vfit +set center_cyl [vmoveto 300 200] +if { ![string match "*Select3D_SensitiveCylinder*" [vstate -entities]] } { puts "Error: cylinder should be detected" } +checkpoint center_cyl_p $center_cyl {7.0710678118654755 -7.0710678118654755 16.970067811865476} 0.0001 +vtop +vfit +set top_cyl [vmoveto 300 200] +if { ![string match "*Select3D_SensitiveCylinder*" [vstate -entities]] } { puts "Error: cylinder should be detected" } +checkpoint top_cyl_p $top_cyl {0 -0.050500000000000045 20} 0.0001 +vbottom +set bottom_cyl [vmoveto 300 200] +if { ![string match "*Select3D_SensitiveCylinder*" [vstate -entities]] } { puts "Error: cylinder should be detected" } +checkpoint bottom_cyl_p $bottom_cyl {0 0.050500000000000052 0} 0.0001 +vright +vfit +set right_cyl [vmoveto 300 200] +if { ![string match "*Select3D_SensitiveCylinder*" [vstate -entities]] } { puts "Error: cylinder should be detected" } +checkpoint right_cyl_p $right_cyl {10 0 9.9495000000000005} 0.0001 +vleft +set left_cyl [vmoveto 300 200] +if { ![string match "*Select3D_SensitiveCylinder*" [vstate -entities]] } { puts "Error: cylinder should be detected" } +checkpoint left_cyl_p $left_cyl {-10 0 9.9495000000000005} 0.0001 +vremove cyl + +pcone cone 10 0 20 +vdisplay cone -dispmode 1 +vaxo +vfit +set center_cone [vmoveto 300 200] +if { ![string match "*Select3D_SensitiveCylinder*" [vstate -entities]] } { puts "Error: cone should be detected" } +checkpoint center_cone_p $center_cone {2.6384203410087546 -2.6384203410087546 12.537420341008755} 0.0001 +vtop +vfit +set top_cone [vmoveto 300 200] +if { ![string match "*Select3D_SensitiveCylinder*" [vstate -entities]] } { puts "Error: cone should be detected" } +checkpoint top_cone_p $top_cone {0 -0.050500000000000045 19.899000000000001} 0.0001 +vbottom +set bottom_cone [vmoveto 300 200] +if { ![string match "*Select3D_SensitiveCylinder*" [vstate -entities]] } { puts "Error: cone should be detected" } +checkpoint bottom_cone_p $bottom_cone {0 0.050500000000000052 0} 0.0001 +vright +vfit +set right_cone [vmoveto 300 200] +if { ![string match "*Select3D_SensitiveCylinder*" [vstate -entities]] } { puts "Error: cone should be detected" } +checkpoint right_cone_p $right_cone {5.0252500000000007 0 9.9495000000000005} 0.0001 +vleft +set left_cone [vmoveto 300 200] +if { ![string match "*Select3D_SensitiveCylinder*" [vstate -entities]] } { puts "Error: cone should be detected" } +checkpoint left_cone_p $left_cone {-5.0252500000000007 0 9.9495000000000005} 0.0001 diff --git a/tests/vselect/cone_cylinder/detecting b/tests/vselect/cone_cylinder/detecting new file mode 100644 index 0000000000..0608ca670c --- /dev/null +++ b/tests/vselect/cone_cylinder/detecting @@ -0,0 +1,24 @@ +puts "=================================" +puts "0032281: Visualization - add Select3D_SensitiveCylinder" +puts "Tests detecting Select3D_SensitiveCylinder" +puts "=================================" + +pcylinder cyl 10 20 +vdisplay cyl -dispmode 1 +vfit +vmoveto 300 200 +if { ![string match "*Select3D_SensitiveCylinder*" [vstate -entities]] } { puts "Error: cylinder should be detected" } +vremove cyl + +pcone cone 10 0 20 +vdisplay cone -dispmode 1 +vfit +vmoveto 300 200 +if { ![string match "*Select3D_SensitiveCylinder*" [vstate -entities]] } { puts "Error: cone should be detected" } +vremove cone + +pcone tr_cone 10 5 10 +vdisplay tr_cone -dispmode 1 +vfit +vmoveto 300 200 +if { ![string match "*Select3D_SensitiveCylinder*" [vstate -entities]] } { puts "Error: truncated cone should be detected" } diff --git a/tests/vselect/cone_cylinder/generate_images b/tests/vselect/cone_cylinder/generate_images new file mode 100644 index 0000000000..5bc5d10b1d --- /dev/null +++ b/tests/vselect/cone_cylinder/generate_images @@ -0,0 +1,33 @@ +puts "=================================" +puts "0032281: Visualization - add Select3D_SensitiveCylinder" +puts "Generating images based on detection of Select3D_SensitiveCylinder" +puts "=================================" + +pcylinder cyl 10 20 +vdisplay cyl -dispmode 1 +vfit +vseldump $imagedir/${casename}_cylinder_selmode_0.png -type surfNormal +vselmode 1 1 +vseldump $imagedir/${casename}_cylinder_selmode_1.png -type surfNormal +vselmode 4 1 +vseldump $imagedir/${casename}_cylinder_selmode_4.png -type surfNormal +vremove cyl + +pcone cone 10 0 20 +vdisplay cone -dispmode 1 +vfit +vseldump $imagedir/${casename}_cone_selmode_0.png -type surfNormal +vselmode 1 1 +vseldump $imagedir/${casename}_cone_selmode_1.png -type surfNormal +vselmode 4 1 +vseldump $imagedir/${casename}_cone_selmode_4.png -type surfNormal +vremove cone + +pcone tr_cone 10 5 10 +vdisplay tr_cone -dispmode 1 +vfit +vseldump $imagedir/${casename}_truncated_cone_selmode_0.png -type surfNormal +vselmode 1 1 +vseldump $imagedir/${casename}_truncated_cone_selmode_1.png -type surfNormal +vselmode 4 1 +vseldump $imagedir/${casename}_truncated_cone_selmode_4.png -type surfNormal diff --git a/tests/vselect/cone_cylinder/polygon_selection b/tests/vselect/cone_cylinder/polygon_selection new file mode 100644 index 0000000000..1f5ae6a65d --- /dev/null +++ b/tests/vselect/cone_cylinder/polygon_selection @@ -0,0 +1,69 @@ +puts "=================================" +puts "0032281: Visualization - add Select3D_SensitiveCylinder" +puts "Tests polygon selection of Select3D_SensitiveCylinder" +puts "=================================" + +pcylinder c1 10 20 +pcone c2 10 0 20 +pcone c3 10 5 10 +ttranslate c1 25 25 0 +ttranslate c2 -25 25 0 +vdisplay -dispmode 1 c1 c2 c3 +vfit + +vselect 124 93 234 24 394 85 539 125 542 346 329 351 123 335 +if { ![string match "*Selected*" [vstate c1]] || + ![string match "*Selected*" [vstate c2]] || + ![string match "*Selected*" [vstate c3]]} { puts "Error: all shapes should be selected" } +vselect 124 93 234 24 394 85 539 125 542 346 329 351 123 335 -allowoverlap +if { ![string match "*Selected*" [vstate c1]] || + ![string match "*Selected*" [vstate c2]] || + ![string match "*Selected*" [vstate c3]]} { puts "Error: all shapes should be selected" } +vselect 397 223 401 161 431 142 468 135 504 145 531 164 533 191 531 267 533 301 509 314 475 327 442 323 406 313 396 288 +if { ![string match "*Selected*" [vstate c1]] || + [string match "*Selected*" [vstate c2]] || + [string match "*Selected*" [vstate c3]]} { puts "Error: only cylinder c1 should be selected" } +vselect 176 143 242 39 316 147 308 171 299 180 284 187 266 196 245 196 222 196 200 187 188 182 179 171 172 154 +if { [string match "*Selected*" [vstate c1]] || + ![string match "*Selected*" [vstate c2]] || + [string match "*Selected*" [vstate c3]]} { puts "Error: only cone c2 should be selected" } +vselect 179 272 217 214 242 207 271 216 279 223 282 233 311 274 311 287 303 304 283 315 247 323 221 321 196 314 184 304 177 292 172 279 +if { [string match "*Selected*" [vstate c1]] || + [string match "*Selected*" [vstate c2]] || + ![string match "*Selected*" [vstate c3]]} { puts "Error: only cone c3 should be selected" } +vtop +vfit +vselect 183 124 281 46 423 115 295 207 -allowoverlap 1 +if { [string match "*Selected*" [vstate c1]] || + [string match "*Selected*" [vstate c2]] || + [string match "*Selected*" [vstate c3]] } { puts "Error: all shapes should be unselected" } +vselect 7 10 87 2 145 16 189 60 380 257 396 317 381 356 360 390 301 396 241 383 195 338 2 133 2 103 3 57 +if { [string match "*Selected*" [vstate c1]] || + ![string match "*Selected*" [vstate c2]] || + ![string match "*Selected*" [vstate c3]]} { puts "Error: only cones c2 and c3 should be selected" } +vselect 410 142 465 149 445 205 +if { [string match "*Selected*" [vstate c1]] || + [string match "*Selected*" [vstate c2]] || + [string match "*Selected*" [vstate c3]] } { puts "Error: all shapes should be unselected" } +vselect 410 142 465 149 445 205 -allowoverlap 1 +if { ![string match "*Selected*" [vstate c1]] || + [string match "*Selected*" [vstate c2]] || + [string match "*Selected*" [vstate c3]]} { puts "Error: only cylinder c1 should be selected" } +vselect 261 306 297 275 325 320 -allowoverlap 1 +if { [string match "*Selected*" [vstate c1]] || + [string match "*Selected*" [vstate c2]] || + ![string match "*Selected*" [vstate c3]]} { puts "Error: only cone c3 should be selected" } +vright +vfit +vselect 0 332 65 198 201 198 269 331 260 358 15 350 +if { [string match "*Selected*" [vstate c1]] || + [string match "*Selected*" [vstate c2]] || + ![string match "*Selected*" [vstate c3]]} { puts "Error: only cone c3 should be selected" } +vselect 50 376 85 156 163 155 208 381 -allowoverlap 1 +if { [string match "*Selected*" [vstate c1]] || + [string match "*Selected*" [vstate c2]] || + ![string match "*Selected*" [vstate c3]]} { puts "Error: only cone c3 should be selected" } +vselect 318 172 599 191 599 236 322 242 -allowoverlap 1 +if { ![string match "*Selected*" [vstate c1]] || + ![string match "*Selected*" [vstate c2]] || + [string match "*Selected*" [vstate c3]]} { puts "Error: cylinder c1 and cone c2 should be selected" } diff --git a/tests/vselect/cone_cylinder/rectangle_selection b/tests/vselect/cone_cylinder/rectangle_selection new file mode 100644 index 0000000000..6fa39a7877 --- /dev/null +++ b/tests/vselect/cone_cylinder/rectangle_selection @@ -0,0 +1,96 @@ +puts "=================================" +puts "0032281: Visualization - add Select3D_SensitiveCylinder" +puts "Tests rectangular selection of Select3D_SensitiveCylinder" +puts "=================================" + +pcylinder c1 10 20 +pcone c2 10 0 20 +pcone c3 10 5 10 +ttranslate c1 25 25 0 +ttranslate c2 -25 25 0 +vdisplay -dispmode 1 c1 c2 c3 +vfit +vselect 15 15 585 385 +if { ![string match "*Selected*" [vstate c1]] || + ![string match "*Selected*" [vstate c2]] || + ![string match "*Selected*" [vstate c3]]} { puts "Error: all shapes should be selected" } +vselect 15 15 585 385 -allowoverlap 1 +if { ![string match "*Selected*" [vstate c1]] || + ![string match "*Selected*" [vstate c2]] || + ![string match "*Selected*" [vstate c3]]} { puts "Error: all shapes should be selected" } +vselect 314 52 565 347 +if { ![string match "*Selected*" [vstate c1]] || + [string match "*Selected*" [vstate c2]] || + [string match "*Selected*" [vstate c3]]} { puts "Error: only cylinder c1 should be selected" } +vselect 314 52 565 347 -allowoverlap 1 +if { ![string match "*Selected*" [vstate c1]] || + [string match "*Selected*" [vstate c2]] || + [string match "*Selected*" [vstate c3]]} { puts "Error: only cylinder c1 should be selected" } +vselect 304 52 565 347 +if { ![string match "*Selected*" [vstate c1]] || + [string match "*Selected*" [vstate c2]] || + [string match "*Selected*" [vstate c3]]} { puts "Error: only cylinder c1 should be selected" } +vselect 304 52 565 347 -allowoverlap 1 +if { ![string match "*Selected*" [vstate c1]] || + ![string match "*Selected*" [vstate c2]] || + ![string match "*Selected*" [vstate c3]]} { puts "Error: all shapes should be selected" } +vselect 274 77 282 92 -allowoverlap 1 +if { [string match "*Selected*" [vstate c1]] || + [string match "*Selected*" [vstate c2]] || + [string match "*Selected*" [vstate c3]] } { puts "Error: all shapes should be unselected" } +vtop +vfit +vselect 90 90 510 310 +if { [string match "*Selected*" [vstate c1]] || + [string match "*Selected*" [vstate c2]] || + [string match "*Selected*" [vstate c3]] } { puts "Error: all shapes should be unselected" } +vselect 90 90 510 310 -allowoverlap 1 +if { ![string match "*Selected*" [vstate c1]] || + ![string match "*Selected*" [vstate c2]] || + ![string match "*Selected*" [vstate c3]]} { puts "Error: all shapes should be selected" } +vselect 480 60 540 120 -allowoverlap 1 +if { ![string match "*Selected*" [vstate c1]] || + [string match "*Selected*" [vstate c2]] || + [string match "*Selected*" [vstate c3]]} { puts "Error: only cylinder c1 should be selected" } +vselect 60 60 120 120 -allowoverlap 1 +if { [string match "*Selected*" [vstate c1]] || + ![string match "*Selected*" [vstate c2]] || + [string match "*Selected*" [vstate c3]]} { puts "Error: only cone c2 should be selected" } +vselect 270 270 330 330 -allowoverlap 1 +if { [string match "*Selected*" [vstate c1]] || + [string match "*Selected*" [vstate c2]] || + ![string match "*Selected*" [vstate c3]]} { puts "Error: only cone c3 should be selected" } +vselect 146 158 162 169 -allowoverlap 1 +if { [string match "*Selected*" [vstate c1]] || + [string match "*Selected*" [vstate c2]] || + [string match "*Selected*" [vstate c3]]} { puts "Error: all shapes should be unselected" } +vright +vfit +vselect 0 0 600 400 +if { ![string match "*Selected*" [vstate c1]] || + ![string match "*Selected*" [vstate c2]] || + ![string match "*Selected*" [vstate c3]]} { puts "Error: all shapes should be selected" } +vselect 0 175 290 350 +if { [string match "*Selected*" [vstate c1]] || + [string match "*Selected*" [vstate c2]] || + ![string match "*Selected*" [vstate c3]]} { puts "Error: only cone c3 should be selected" } +vselect 310 20 600 360 +if { ![string match "*Selected*" [vstate c1]] || + ![string match "*Selected*" [vstate c2]] || + [string match "*Selected*" [vstate c3]]} { puts "Error: cylinder c1 and cone c2 should be selected" } +vselect 0 230 600 250 -allowoverlap 1 +if { ![string match "*Selected*" [vstate c1]] || + ![string match "*Selected*" [vstate c2]] || + ![string match "*Selected*" [vstate c3]]} { puts "Error: all shapes should be selected" } +vselect 85 185 205 355 -allowoverlap 1 +if { [string match "*Selected*" [vstate c1]] || + [string match "*Selected*" [vstate c2]] || + ![string match "*Selected*" [vstate c3]]} { puts "Error: only cone c3 should be selected" } +vselect 400 40 500 370 -allowoverlap 1 +if { ![string match "*Selected*" [vstate c1]] || + ![string match "*Selected*" [vstate c2]] || + [string match "*Selected*" [vstate c3]]} { puts "Error: cylinder c1 and cone c2 should be selected" } +vselect 425 160 500 250 -allowoverlap 1 +if { ![string match "*Selected*" [vstate c1]] || + ![string match "*Selected*" [vstate c2]] || + [string match "*Selected*" [vstate c3]]} { puts "Error: cylinder c1 and cone c2 should be selected" } diff --git a/tests/vselect/cone_cylinder/single_click_selection_cone b/tests/vselect/cone_cylinder/single_click_selection_cone new file mode 100644 index 0000000000..9dc996baed --- /dev/null +++ b/tests/vselect/cone_cylinder/single_click_selection_cone @@ -0,0 +1,21 @@ +puts "=================================" +puts "0032281: Visualization - add Select3D_SensitiveCylinder" +puts "Tests selection of Select3D_SensitiveCylinder" +puts "=================================" + +pcone cone 10 0 20 +vdisplay cone -dispmode 1 +vfit +vselect 300 200 +if { ![string match "*Selected*" [vstate cone]] } { puts "Error: cone should be selected" } +vselect 300 101 +if { ![string match "*Selected*" [vstate cone]] } { puts "Error: cone should be selected" } +vselect 300 300 +if { ![string match "*Selected*" [vstate cone]] } { puts "Error: cone should be selected" } + +vselect 357 182 +if { [string match "*Selected*" [vstate cone]] } { puts "Error: cone should be unselected" } +vselect 242 182 +if { [string match "*Selected*" [vstate cone]] } { puts "Error: cone should be unselected" } +vselect 310 101 +if { [string match "*Selected*" [vstate cone]] } { puts "Error: cone should be unselected" } diff --git a/tests/vselect/cone_cylinder/single_click_selection_cylinder b/tests/vselect/cone_cylinder/single_click_selection_cylinder new file mode 100644 index 0000000000..15148b8a30 --- /dev/null +++ b/tests/vselect/cone_cylinder/single_click_selection_cylinder @@ -0,0 +1,36 @@ +puts "=================================" +puts "0032281: Visualization - add Select3D_SensitiveCylinder" +puts "Tests selection of Select3D_SensitiveCylinder" +puts "=================================" + +pcylinder cyl 10 20 +vdisplay cyl -dispmode 1 +vfit +vselect 300 200 +if { ![string match "*Selected*" [vstate cyl]] } { puts "Error: cylinder should be selected" } +vselect 300 100 +if { ![string match "*Selected*" [vstate cyl]] } { puts "Error: cylinder should be selected" } +vselect 300 300 +if { ![string match "*Selected*" [vstate cyl]] } { puts "Error: cylinder should be selected" } + +vselect 300 25 +if { [string match "*Selected*" [vstate cyl]] } { puts "Error: cylinder should be unselected" } +vselect 388 50 +if { [string match "*Selected*" [vstate cyl]] } { puts "Error: cylinder should be unselected" } +vselect 424 200 +if { [string match "*Selected*" [vstate cyl]] } { puts "Error: cylinder should be unselected" } + +vselect 300 35 +if { ![string match "*Selected*" [vstate cyl]] } { puts "Error: cylinder should be selected" } +vselect 420 95 +if { ![string match "*Selected*" [vstate cyl]] } { puts "Error: cylinder should be selected" } +vselect 420 200 +if { ![string match "*Selected*" [vstate cyl]] } { puts "Error: cylinder should be selected" } +vtop +vfit +vselect 300 200 +if { ![string match "*Selected*" [vstate cyl]] } { puts "Error: cylinder should be selected" } +vselect 440 64 +if { ![string match "*Selected*" [vstate cyl]] } { puts "Error: cylinder should be selected" } +vselect 446 60 +if { [string match "*Selected*" [vstate cyl]] } { puts "Error: cylinder should be unselected" } diff --git a/tests/vselect/cone_cylinder/single_click_selection_trunc_cone b/tests/vselect/cone_cylinder/single_click_selection_trunc_cone new file mode 100644 index 0000000000..315910e8b1 --- /dev/null +++ b/tests/vselect/cone_cylinder/single_click_selection_trunc_cone @@ -0,0 +1,21 @@ +puts "=================================" +puts "0032281: Visualization - add Select3D_SensitiveCylinder" +puts "Tests selection of Select3D_SensitiveCylinder" +puts "=================================" + +pcone tr_cone 10 5 10 +vdisplay tr_cone -dispmode 1 +vfit +vselect 300 200 +if { ![string match "*Selected*" [vstate tr_cone]] } { puts "Error: truncated cone should be selected" } +vselect 300 88 +if { ![string match "*Selected*" [vstate tr_cone]] } { puts "Error: truncated cone should be selected" } +vselect 421 187 +if { ![string match "*Selected*" [vstate tr_cone]] } { puts "Error: truncated cone should be selected" } + +vselect 300 86 +if { [string match "*Selected*" [vstate tr_cone]] } { puts "Error: truncated cone should be unselected" } +vselect 378 120 +if { [string match "*Selected*" [vstate tr_cone]] } { puts "Error: truncated cone should be unselected" } +vselect 423 187 +if { [string match "*Selected*" [vstate tr_cone]] } { puts "Error: truncated cone should be unselected" } diff --git a/tests/vselect/grids.list b/tests/vselect/grids.list index 3442e0976f..fac6935271 100644 --- a/tests/vselect/grids.list +++ b/tests/vselect/grids.list @@ -13,3 +13,4 @@ 013 wire_solid 014 sphere 015 axis +016 cone_cylinder From 8f70959571ab8999b47f88d673343587e733f364 Mon Sep 17 00:00:00 2001 From: kgv Date: Sun, 27 Jun 2021 20:13:49 +0300 Subject: [PATCH 021/639] 0032464: Draw Harness, ViewerTest - rely on AIS_ViewController within vanimation command Added AIS_ViewController::ObjectsAnimation() property similar to AIS_ViewController::ViewAnimation() but designed for objects animation. --- src/AIS/AIS_Animation.hxx | 6 + src/AIS/AIS_ViewController.cxx | 18 ++ src/AIS/AIS_ViewController.hxx | 15 + src/ViewerTest/ViewerTest_ViewerCommands.cxx | 321 +++++++++++-------- 4 files changed, 223 insertions(+), 137 deletions(-) diff --git a/src/AIS/AIS_Animation.hxx b/src/AIS/AIS_Animation.hxx index 2658e43185..ed31d0262b 100644 --- a/src/AIS/AIS_Animation.hxx +++ b/src/AIS/AIS_Animation.hxx @@ -147,6 +147,12 @@ public: //! Return elapsed time. Standard_Real ElapsedTime() const { return !myTimer.IsNull() ? myTimer->ElapsedTime() : 0.0; } + //! Return playback timer. + const Handle(Media_Timer)& Timer() const { return myTimer; } + + //! Set playback timer. + void SetTimer (const Handle(Media_Timer)& theTimer) { myTimer = theTimer; } + public: //! Start animation. This method changes status of the animation to Started. diff --git a/src/AIS/AIS_ViewController.cxx b/src/AIS/AIS_ViewController.cxx index 76b04e285b..2d08659425 100644 --- a/src/AIS/AIS_ViewController.cxx +++ b/src/AIS/AIS_ViewController.cxx @@ -63,6 +63,8 @@ AIS_ViewController::AIS_ViewController() myHasThrust (false), // myViewAnimation (new AIS_AnimationCamera ("AIS_ViewController_ViewAnimation", Handle(V3d_View)())), + myObjAnimation (new AIS_Animation ("AIS_ViewController_ObjectsAnimation")), + myToPauseObjAnimation (false), myPrevMoveTo (-1, -1), myHasHlrOnBeforeRotation (false), // @@ -610,6 +612,14 @@ bool AIS_ViewController::UpdateMouseClick (const Graphic3d_Vec2i& thePoint, bool theIsDoubleClick) { (void )theIsDoubleClick; + + if (myToPauseObjAnimation + && !myObjAnimation.IsNull() + && !myObjAnimation->IsStopped()) + { + myObjAnimation->Pause(); + } + AIS_SelectionScheme aScheme = AIS_SelectionScheme_UNKNOWN; if (myMouseSelectionSchemes.Find (theButton | theModifiers, aScheme)) { @@ -2944,6 +2954,14 @@ void AIS_ViewController::handleViewRedraw (const Handle(AIS_InteractiveContext)& setAskNextFrame(); } + if (!myObjAnimation.IsNull() + && !myObjAnimation->IsStopped()) + { + myObjAnimation->UpdateTimer(); + ResetPreviousMoveTo(); + setAskNextFrame(); + } + if (myIsContinuousRedraw) { myToAskNextFrame = true; diff --git a/src/AIS/AIS_ViewController.hxx b/src/AIS/AIS_ViewController.hxx index 7d8e0fc50d..f22c8bf8e7 100644 --- a/src/AIS/AIS_ViewController.hxx +++ b/src/AIS/AIS_ViewController.hxx @@ -34,6 +34,7 @@ #include #include +class AIS_Animation; class AIS_AnimationCamera; class AIS_InteractiveObject; class AIS_InteractiveContext; @@ -77,6 +78,18 @@ public: //! Interrupt active view animation. Standard_EXPORT void AbortViewAnimation(); + //! Return objects animation; empty (but not NULL) animation by default. + const Handle(AIS_Animation)& ObjectsAnimation() const { return myObjAnimation; } + + //! Set object animation to be handled within handleViewRedraw(). + void SetObjectsAnimation (const Handle(AIS_Animation)& theAnimation) { myObjAnimation = theAnimation; } + + //! Return TRUE if object animation should be paused on mouse click; FALSE by default. + bool ToPauseObjectsAnimation() const { return myToPauseObjAnimation; } + + //! Set if object animation should be paused on mouse click. + void SetPauseObjectsAnimation (bool theToPause) { myToPauseObjAnimation = theToPause; } + //! Return TRUE if continuous redrawing is enabled; FALSE by default. //! This option would request a next viewer frame to be completely redrawn right after current frame is finished. bool IsContinuousRedraw() const { return myIsContinuousRedraw; } @@ -713,6 +726,8 @@ protected: Standard_Boolean myHasThrust; //!< flag indicating active thrust Handle(AIS_AnimationCamera) myViewAnimation; //!< view animation + Handle(AIS_Animation) myObjAnimation; //!< objects animation + Standard_Boolean myToPauseObjAnimation; //!< flag to pause objects animation on mouse click; FALSE by default Handle(AIS_RubberBand) myRubberBand; //!< Rubber-band presentation Handle(SelectMgr_EntityOwner) myDragOwner; //!< detected owner of currently dragged object Handle(AIS_InteractiveObject) myDragObject; //!< currently dragged object diff --git a/src/ViewerTest/ViewerTest_ViewerCommands.cxx b/src/ViewerTest/ViewerTest_ViewerCommands.cxx index 235badc394..3caf99b262 100644 --- a/src/ViewerTest/ViewerTest_ViewerCommands.cxx +++ b/src/ViewerTest/ViewerTest_ViewerCommands.cxx @@ -197,8 +197,6 @@ static struct // EVENT GLOBAL VARIABLES //============================================================================== -Standard_Boolean TheIsAnimating = Standard_False; - namespace { @@ -3325,11 +3323,6 @@ static LRESULT WINAPI AdvViewerWindowProc (HWND theWinHandle, } return 0; } - case WM_LBUTTONDOWN: - { - TheIsAnimating = Standard_False; - } - Standard_FALLTHROUGH default: { const Handle(V3d_View)& aView = ViewerTest::CurrentView(); @@ -3426,14 +3419,6 @@ int ViewerMainLoop (Standard_Integer theNbArgs, const char** theArgVec) } break; } - case ButtonPress: - { - if (aReport.xbutton.button == Button1) - { - TheIsAnimating = Standard_False; - } - } - Standard_FALLTHROUGH default: { const Handle(V3d_View)& aView = ViewerTest::CurrentView(); @@ -7294,6 +7279,7 @@ namespace //! The animation calling the Draw Harness command. class ViewerTest_AnimationProc : public AIS_Animation { + DEFINE_STANDARD_RTTI_INLINE(ViewerTest_AnimationProc, AIS_Animation) public: //! Main constructor. @@ -7360,6 +7346,85 @@ namespace }; + //! Auxiliary animation holder. + class ViewerTest_AnimationHolder : public AIS_AnimationCamera + { + DEFINE_STANDARD_RTTI_INLINE(ViewerTest_AnimationHolder, AIS_AnimationCamera) + public: + ViewerTest_AnimationHolder (const Handle(AIS_Animation)& theAnim, + const Handle(V3d_View)& theView, + const Standard_Boolean theIsFreeView) + : AIS_AnimationCamera ("ViewerTest_AnimationHolder", Handle(V3d_View)()) + { + if (theAnim->Timer().IsNull()) + { + theAnim->SetTimer (new Media_Timer()); + } + myTimer = theAnim->Timer(); + myView = theView; + if (theIsFreeView) + { + myCamStart = new Graphic3d_Camera (theView->Camera()); + } + Add (theAnim); + } + + //! Start playback. + virtual void StartTimer (const Standard_Real theStartPts, + const Standard_Real thePlaySpeed, + const Standard_Boolean theToUpdate, + const Standard_Boolean theToStopTimer) Standard_OVERRIDE + { + base_type::StartTimer (theStartPts, thePlaySpeed, theToUpdate, theToStopTimer); + if (theToStopTimer) + { + abortPlayback(); + } + } + + //! Pause animation. + virtual void Pause() Standard_OVERRIDE + { + myState = AnimationState_Paused; + // default implementation would stop all children, + // but we want to keep wrapped animation paused + myAnimations.First()->Pause(); + abortPlayback(); + } + + //! Stop animation. + virtual void Stop() Standard_OVERRIDE + { + base_type::Stop(); + abortPlayback(); + } + + //! Process one step of the animation according to the input time progress, including all children. + virtual void updateWithChildren (const AIS_AnimationProgress& thePosition) Standard_OVERRIDE + { + Handle(V3d_View) aView = myView; + if (!aView.IsNull() + && !myCamStart.IsNull()) + { + myCamStart->Copy (aView->Camera()); + } + base_type::updateWithChildren (thePosition); + if (!aView.IsNull() + && !myCamStart.IsNull()) + { + aView->Camera()->Copy (myCamStart); + } + } + private: + void abortPlayback() + { + if (!myView.IsNull()) + { + myView.Nullify(); + } + } + }; + //! Replace the animation with the new one. static void replaceAnimation (const Handle(AIS_Animation)& theParentAnimation, Handle(AIS_Animation)& theAnimation, @@ -7853,6 +7918,7 @@ static Standard_Integer VAnimation (Draw_Interpretor& theDI, Standard_Real aPlayStartTime = anAnimation->StartPts(); Standard_Real aPlayDuration = anAnimation->Duration(); Standard_Boolean isFreeCamera = Standard_False; + Standard_Boolean toPauseOnClick = Standard_True; Standard_Boolean isLockLoop = Standard_False; // video recording parameters @@ -7922,6 +7988,14 @@ static Standard_Integer VAnimation (Draw_Interpretor& theDI, aPlayDuration = Draw::Atof (theArgVec[anArgIter]); } } + else if (anArg == "-pause") + { + anAnimation->Pause(); + } + else if (anArg == "-stop") + { + anAnimation->Stop(); + } else if (anArg == "-playspeed" || anArg == "-speed") { @@ -7936,13 +8010,22 @@ static Standard_Integer VAnimation (Draw_Interpretor& theDI, || anArg == "-lockloop" || anArg == "-playlockloop") { - isLockLoop = Standard_True; + isLockLoop = Draw::ParseOnOffIterator (theArgNb, theArgVec, anArgIter); } else if (anArg == "-freecamera" + || anArg == "-nofreecamera" || anArg == "-playfreecamera" - || anArg == "-freelook") + || anArg == "-noplayfreecamera" + || anArg == "-freelook" + || anArg == "-nofreelook") + { + isFreeCamera = Draw::ParseOnOffNoIterator (theArgNb, theArgVec, anArgIter); + } + else if (anArg == "-pauseonclick" + || anArg == "-nopauseonclick" + || anArg == "-nopause") { - isFreeCamera = Standard_True; + toPauseOnClick = Draw::ParseOnOffNoIterator (theArgNb, theArgVec, anArgIter); } // video recodring options else if (anArg == "-rec" @@ -8298,155 +8381,118 @@ static Standard_Integer VAnimation (Draw_Interpretor& theDI, } } + ViewerTest::CurrentEventManager()->AbortViewAnimation(); + ViewerTest::CurrentEventManager()->SetObjectsAnimation (Handle(AIS_Animation)()); if (!toPlay && aRecFile.IsEmpty()) { return 0; } // Start animation timeline and process frame updating. - TheIsAnimating = Standard_True; - const Standard_Boolean wasImmediateUpdate = aView->SetImmediateUpdate (Standard_False); - Handle(Graphic3d_Camera) aCameraBack = new Graphic3d_Camera (aView->Camera()); - anAnimation->StartTimer (aPlayStartTime, aPlaySpeed, Standard_True, aPlayDuration <= 0.0); - if (isFreeCamera) - { - aView->Camera()->Copy (aCameraBack); + if (aRecParams.FpsNum <= 0 + && !isLockLoop) + { + Handle(ViewerTest_AnimationHolder) aHolder = new ViewerTest_AnimationHolder (anAnimation, aView, isFreeCamera); + aHolder->StartTimer (aPlayStartTime, aPlaySpeed, Standard_True, aPlayDuration <= 0.0); + ViewerTest::CurrentEventManager()->SetPauseObjectsAnimation (toPauseOnClick); + ViewerTest::CurrentEventManager()->SetObjectsAnimation (aHolder); + ViewerTest::CurrentEventManager()->ProcessExpose(); + return 0; } + // Perform video recording + const Standard_Boolean wasImmediateUpdate = aView->SetImmediateUpdate (Standard_False); const Standard_Real anUpperPts = aPlayStartTime + aPlayDuration; - if (aRecParams.FpsNum <= 0) - { - while (!anAnimation->IsStopped()) - { - aCameraBack->Copy (aView->Camera()); - const Standard_Real aPts = anAnimation->UpdateTimer(); - if (isFreeCamera) - { - aView->Camera()->Copy (aCameraBack); - } + anAnimation->StartTimer (aPlayStartTime, aPlaySpeed, Standard_True, aPlayDuration <= 0.0); - if (aPts >= anUpperPts) - { - anAnimation->Pause(); - break; - } + OSD_Timer aPerfTimer; + aPerfTimer.Start(); - if (aView->IsInvalidated()) - { - aView->Redraw(); - } - else - { - aView->RedrawImmediate(); - } + Handle(Image_VideoRecorder) aRecorder; + ImageFlipper aFlipper; + Handle(Draw_ProgressIndicator) aProgress; + if (!aRecFile.IsEmpty()) + { + if (aRecParams.Width <= 0 + || aRecParams.Height <= 0) + { + aView->Window()->Size (aRecParams.Width, aRecParams.Height); + } - if (!isLockLoop) - { - // handle user events - theDI.Eval ("after 1 set waiter 1"); - theDI.Eval ("vwait waiter"); - } - if (!TheIsAnimating) - { - anAnimation->Pause(); - theDI << aPts; - break; - } + aRecorder = new Image_VideoRecorder(); + if (!aRecorder->Open (aRecFile.ToCString(), aRecParams)) + { + Message::SendFail ("Error: failed to open video file for recording"); + return 0; } - if (aView->IsInvalidated()) + aProgress = new Draw_ProgressIndicator (theDI, 1); + } + + // Manage frame-rated animation here + Standard_Real aPts = aPlayStartTime; + int64_t aNbFrames = 0; + Message_ProgressScope aPS(Message_ProgressIndicator::Start(aProgress), + "Video recording, sec", Max(1, Standard_Integer(aPlayDuration / aPlaySpeed))); + Standard_Integer aSecondsProgress = 0; + for (; aPts <= anUpperPts && aPS.More();) + { + Standard_Real aRecPts = 0.0; + if (aRecParams.FpsNum > 0) { - aView->Redraw(); + aRecPts = aPlaySpeed * ((Standard_Real(aRecParams.FpsDen) / Standard_Real(aRecParams.FpsNum)) * Standard_Real(aNbFrames)); } else { - aView->RedrawImmediate(); + aRecPts = aPlaySpeed * aPerfTimer.ElapsedTime(); } - } - else - { - OSD_Timer aPerfTimer; - aPerfTimer.Start(); - Handle(Image_VideoRecorder) aRecorder; - ImageFlipper aFlipper; - Handle(Draw_ProgressIndicator) aProgress; - if (!aRecFile.IsEmpty()) + aPts = aPlayStartTime + aRecPts; + ++aNbFrames; + if (!anAnimation->Update (aPts)) { - if (aRecParams.Width <= 0 - || aRecParams.Height <= 0) - { - aView->Window()->Size (aRecParams.Width, aRecParams.Height); - } - - aRecorder = new Image_VideoRecorder(); - if (!aRecorder->Open (aRecFile.ToCString(), aRecParams)) - { - Message::SendFail ("Error: failed to open video file for recording"); - return 0; - } - - aProgress = new Draw_ProgressIndicator (theDI, 1); + break; } - // Manage frame-rated animation here - Standard_Real aPts = aPlayStartTime; - int64_t aNbFrames = 0; - Message_ProgressScope aPS(Message_ProgressIndicator::Start(aProgress), - "Video recording, sec", Max(1, Standard_Integer(aPlayDuration / aPlaySpeed))); - Standard_Integer aSecondsProgress = 0; - for (; aPts <= anUpperPts && aPS.More();) + if (!aRecorder.IsNull()) { - const Standard_Real aRecPts = aPlaySpeed * ((Standard_Real(aRecParams.FpsDen) / Standard_Real(aRecParams.FpsNum)) * Standard_Real(aNbFrames)); - aPts = aPlayStartTime + aRecPts; - ++aNbFrames; - if (!anAnimation->Update (aPts)) - { - break; - } - - if (!aRecorder.IsNull()) - { - V3d_ImageDumpOptions aDumpParams; - aDumpParams.Width = aRecParams.Width; - aDumpParams.Height = aRecParams.Height; - aDumpParams.BufferType = Graphic3d_BT_RGBA; - aDumpParams.StereoOptions = V3d_SDO_MONO; - aDumpParams.ToAdjustAspect = Standard_True; - if (!aView->ToPixMap (aRecorder->ChangeFrame(), aDumpParams)) - { - Message::SendFail ("Error: view dump is failed"); - return 0; - } - aFlipper.FlipY (aRecorder->ChangeFrame()); - if (!aRecorder->PushFrame()) - { - return 0; - } - } - else + V3d_ImageDumpOptions aDumpParams; + aDumpParams.Width = aRecParams.Width; + aDumpParams.Height = aRecParams.Height; + aDumpParams.BufferType = Graphic3d_BT_RGBA; + aDumpParams.StereoOptions = V3d_SDO_MONO; + aDumpParams.ToAdjustAspect = Standard_True; + if (!aView->ToPixMap (aRecorder->ChangeFrame(), aDumpParams)) { - aView->Redraw(); + Message::SendFail ("Error: view dump is failed"); + return 0; } - - while (aSecondsProgress < Standard_Integer(aRecPts / aPlaySpeed)) + aFlipper.FlipY (aRecorder->ChangeFrame()); + if (!aRecorder->PushFrame()) { - aPS.Next(); - ++aSecondsProgress; + return 0; } } + else + { + aView->Redraw(); + } - aPerfTimer.Stop(); - anAnimation->Stop(); - const Standard_Real aRecFps = Standard_Real(aNbFrames) / aPerfTimer.ElapsedTime(); - theDI << "Average FPS: " << aRecFps << "\n" - << "Nb. Frames: " << Standard_Real(aNbFrames); - - aView->Redraw(); + while (aSecondsProgress < Standard_Integer(aRecPts / aPlaySpeed)) + { + aPS.Next(); + ++aSecondsProgress; + } } + aPerfTimer.Stop(); + anAnimation->Stop(); + const Standard_Real aRecFps = Standard_Real(aNbFrames) / aPerfTimer.ElapsedTime(); + theDI << "Average FPS: " << aRecFps << "\n" + << "Nb. Frames: " << Standard_Real(aNbFrames); + + aView->Redraw(); aView->SetImmediateUpdate (wasImmediateUpdate); - TheIsAnimating = Standard_False; return 0; } @@ -14740,10 +14786,11 @@ void ViewerTest::ViewerCommands(Draw_Interpretor& theCommands) "List existing animations:" "\n\t\t: vanim" "\n\t\t: Animation playback:" - "\n\t\t: vanim name -play|-resume [playFrom [playDuration]]" - "\n\t\t: [-speed Coeff] [-freeLook] [-lockLoop]" + "\n\t\t: vanim name {-play|-resume|-pause|-stop} [playFrom [playDuration]]" + "\n\t\t: [-speed Coeff] [-freeLook] [-noPauseOnClick] [-lockLoop]" "\n\t\t: -speed playback speed (1.0 is normal speed)" "\n\t\t: -freeLook skip camera animations" + "\n\t\t: -noPauseOnClick do not pause animation on mouse click" "\n\t\t: -lockLoop disable any interactions" "\n\t\t:" "\n\t\t: Animation definition:" @@ -14791,7 +14838,7 @@ void ViewerTest::ViewerCommands(Draw_Interpretor& theCommands) "\n\t\t: -vcodec video codec identifier (ffv1, mjpeg, etc.)" "\n\t\t: -pix_fmt image pixel format (yuv420p, rgb24, etc.)" "\n\t\t: -crf constant rate factor (specific to codec)" - "\n\t\t: -preset codec parameters preset (specific to codec)" + "\n\t\t: -preset codec parameters preset (specific to codec)", __FILE__, VAnimation, group); theCommands.Add("vchangeselected", From 55b5d19bd8d1a1803be5d53055d03db50e5af64d Mon Sep 17 00:00:00 2001 From: akaftasev Date: Tue, 24 Aug 2021 22:47:18 +0300 Subject: [PATCH 022/639] 0028684: BRepOffsetAPI_MakeOffset produces wire with another orientation in compare with source wire Added flag to reverse resulting shape, if it was reverse in BuildDomains() to bringing to the same direction as the original shape --- .../BRepOffsetAPI_MakeOffset.cxx | 18 ++++++----- tests/bugs/modalg_5/bug25298_02 | 4 +++ tests/bugs/modalg_5/bug25334_1 | 3 ++ tests/bugs/modalg_5/bug25334_10 | 3 ++ tests/bugs/modalg_5/bug25334_11 | 3 ++ tests/bugs/modalg_5/bug25334_12 | 3 ++ tests/bugs/modalg_5/bug25334_13 | 3 ++ tests/bugs/modalg_5/bug25334_14 | 3 ++ tests/bugs/modalg_5/bug25334_15 | 3 ++ tests/bugs/modalg_5/bug25334_16 | 3 ++ tests/bugs/modalg_5/bug25334_17 | 3 ++ tests/bugs/modalg_5/bug25334_18 | 3 ++ tests/bugs/modalg_5/bug25334_19 | 3 ++ tests/bugs/modalg_5/bug25334_2 | 3 ++ tests/bugs/modalg_5/bug25334_20 | 3 ++ tests/bugs/modalg_5/bug25334_3 | 3 ++ tests/bugs/modalg_5/bug25334_4 | 3 ++ tests/bugs/modalg_5/bug25334_5 | 3 ++ tests/bugs/modalg_5/bug25334_6 | 3 ++ tests/bugs/modalg_5/bug25334_7 | 3 ++ tests/bugs/modalg_5/bug25334_8 | 3 ++ tests/bugs/modalg_5/bug25334_9 | 3 ++ tests/bugs/modalg_7/bug28684_1 | 31 +++++++++++++++++++ tests/bugs/modalg_7/bug28684_2 | 31 +++++++++++++++++++ 24 files changed, 136 insertions(+), 8 deletions(-) create mode 100644 tests/bugs/modalg_7/bug28684_1 create mode 100644 tests/bugs/modalg_7/bug28684_2 diff --git a/src/BRepOffsetAPI/BRepOffsetAPI_MakeOffset.cxx b/src/BRepOffsetAPI/BRepOffsetAPI_MakeOffset.cxx index df157f5b05..9c25655175 100644 --- a/src/BRepOffsetAPI/BRepOffsetAPI_MakeOffset.cxx +++ b/src/BRepOffsetAPI/BRepOffsetAPI_MakeOffset.cxx @@ -138,7 +138,8 @@ static void BuildDomains(TopoDS_Face& myFace, BRepFill_ListOfOffsetWire& myAlgos, GeomAbs_JoinType myJoin, Standard_Boolean myIsOpenResult, - Standard_Boolean isPositive) + Standard_Boolean isPositive, + Standard_Boolean& isWasReversed) { BRepAlgo_FaceRestrictor FR; TopoDS_Vertex VF,VL; @@ -164,6 +165,7 @@ static void BuildDomains(TopoDS_Face& myFace, const TopoDS_Shape& W = itl.Value(); LWires.Append(W.Reversed()); } + isWasReversed = Standard_True; WorkWires = LWires; } } @@ -296,13 +298,13 @@ void BRepOffsetAPI_MakeOffset::Perform(const Standard_Real Offset, BRep_Builder B; B.MakeCompound (Res); myLastIsLeft = (Offset <= 0); - + Standard_Boolean isWasReversed = Standard_False; if( Offset <= 0. ) { if( myLeft.IsEmpty() ) { // Modified by Sergey KHROMOV - Fri Apr 27 14:35:26 2001 Begin - BuildDomains(myFace,myWires,myLeft,myJoin,myIsOpenResult, Standard_False); + BuildDomains(myFace,myWires,myLeft,myJoin,myIsOpenResult, Standard_False, isWasReversed); // Modified by Sergey KHROMOV - Fri Apr 27 14:35:26 2001 End } @@ -312,9 +314,9 @@ void BRepOffsetAPI_MakeOffset::Perform(const Standard_Real Offset, Algo.Perform(Abs(Offset),Alt); if (Algo.IsDone() && !Algo.Shape().IsNull()) { - B.Add(Res,Algo.Shape()); + B.Add(Res,isWasReversed ? Algo.Shape().Reversed() : Algo.Shape()); if (i == 1) - myShape = Algo.Shape(); + myShape = isWasReversed ? Algo.Shape().Reversed() : Algo.Shape(); i++; } @@ -325,7 +327,7 @@ void BRepOffsetAPI_MakeOffset::Perform(const Standard_Real Offset, if (myRight.IsEmpty()) { // Modified by Sergey KHROMOV - Fri Apr 27 14:35:28 2001 Begin - BuildDomains(myFace,myWires,myRight,myJoin,myIsOpenResult, Standard_True); + BuildDomains(myFace,myWires,myRight,myJoin,myIsOpenResult, Standard_True, isWasReversed); // Modified by Sergey KHROMOV - Fri Apr 27 14:35:35 2001 End } @@ -336,10 +338,10 @@ void BRepOffsetAPI_MakeOffset::Perform(const Standard_Real Offset, if (Algo.IsDone() && !Algo.Shape().IsNull()) { - B.Add(Res,Algo.Shape()); + B.Add(Res, isWasReversed ? Algo.Shape().Reversed() : Algo.Shape()); if (i == 1) - myShape = Algo.Shape(); + myShape = isWasReversed ? Algo.Shape().Reversed() : Algo.Shape(); i++; } diff --git a/tests/bugs/modalg_5/bug25298_02 b/tests/bugs/modalg_5/bug25298_02 index 21e1d1ea3c..940fb1d529 100755 --- a/tests/bugs/modalg_5/bug25298_02 +++ b/tests/bugs/modalg_5/bug25298_02 @@ -12,11 +12,15 @@ smallview display a fit +vori a + if [catch { openoffset resoffset a 1 10 i } ] { puts "Error : mkoffset is wrong" } else { renamevar resoffset_1 result +vori result + checkprops result -l 159.96 checkshape result checksection result diff --git a/tests/bugs/modalg_5/bug25334_1 b/tests/bugs/modalg_5/bug25334_1 index ff86ea6e8c..550317e322 100644 --- a/tests/bugs/modalg_5/bug25334_1 +++ b/tests/bugs/modalg_5/bug25334_1 @@ -18,6 +18,9 @@ donly ww openoffset res ww 1 10 renamevar res_1 result +vori ww +vori result + fit checkprops result -l 613.39 diff --git a/tests/bugs/modalg_5/bug25334_10 b/tests/bugs/modalg_5/bug25334_10 index 671cf6aa07..8e7a28d18c 100644 --- a/tests/bugs/modalg_5/bug25334_10 +++ b/tests/bugs/modalg_5/bug25334_10 @@ -18,6 +18,9 @@ donly ww openoffset res ww 1 10 renamevar res_1 result +vori ww +vori result + fit checkprops result -l 548.106 diff --git a/tests/bugs/modalg_5/bug25334_11 b/tests/bugs/modalg_5/bug25334_11 index cc96e58864..dc4e389521 100644 --- a/tests/bugs/modalg_5/bug25334_11 +++ b/tests/bugs/modalg_5/bug25334_11 @@ -18,6 +18,9 @@ donly ww openoffset res ww 1 10 renamevar res_1 result +vori ww +vori result + fit checkprops result -l 846.702 diff --git a/tests/bugs/modalg_5/bug25334_12 b/tests/bugs/modalg_5/bug25334_12 index f937639a02..7600b09ad3 100644 --- a/tests/bugs/modalg_5/bug25334_12 +++ b/tests/bugs/modalg_5/bug25334_12 @@ -18,6 +18,9 @@ donly ww openoffset res ww 1 -10 renamevar res_1 result +vori ww +vori result + fit checkprops result -l 768.339 diff --git a/tests/bugs/modalg_5/bug25334_13 b/tests/bugs/modalg_5/bug25334_13 index e5ad24cb9b..c360ed8cf3 100644 --- a/tests/bugs/modalg_5/bug25334_13 +++ b/tests/bugs/modalg_5/bug25334_13 @@ -18,6 +18,9 @@ donly ww openoffset res ww 1 10 renamevar res_1 result +vori ww +vori result + fit checkprops result -l 1216.59 diff --git a/tests/bugs/modalg_5/bug25334_14 b/tests/bugs/modalg_5/bug25334_14 index 11f3f4bc4d..fbeadb0c32 100644 --- a/tests/bugs/modalg_5/bug25334_14 +++ b/tests/bugs/modalg_5/bug25334_14 @@ -18,6 +18,9 @@ donly ww openoffset res ww 1 -10 renamevar res_1 result +vori ww +vori result + fit checkprops result -l 1132.6 diff --git a/tests/bugs/modalg_5/bug25334_15 b/tests/bugs/modalg_5/bug25334_15 index 9ba0113c8a..4f0b30b835 100644 --- a/tests/bugs/modalg_5/bug25334_15 +++ b/tests/bugs/modalg_5/bug25334_15 @@ -18,6 +18,9 @@ donly ww openoffset res ww 1 10 renamevar res_1 result +vori ww +vori result + fit checkprops result -l 1042.35 diff --git a/tests/bugs/modalg_5/bug25334_16 b/tests/bugs/modalg_5/bug25334_16 index f628bd32e4..723324a7d1 100644 --- a/tests/bugs/modalg_5/bug25334_16 +++ b/tests/bugs/modalg_5/bug25334_16 @@ -18,6 +18,9 @@ donly ww openoffset res ww 1 -10 renamevar res_1 result +vori ww +vori result + fit checkprops result -l 937.174 diff --git a/tests/bugs/modalg_5/bug25334_17 b/tests/bugs/modalg_5/bug25334_17 index 758ed1dd44..7baad788dd 100644 --- a/tests/bugs/modalg_5/bug25334_17 +++ b/tests/bugs/modalg_5/bug25334_17 @@ -18,6 +18,9 @@ donly ww openoffset res ww 1 10 renamevar res_1 result +vori ww +vori result + fit checkprops result -l 1211.6 diff --git a/tests/bugs/modalg_5/bug25334_18 b/tests/bugs/modalg_5/bug25334_18 index d6f6a92b83..89b12722ff 100644 --- a/tests/bugs/modalg_5/bug25334_18 +++ b/tests/bugs/modalg_5/bug25334_18 @@ -18,6 +18,9 @@ donly ww openoffset res ww 1 -10 renamevar res_1 result +vori ww +vori result + fit checkprops result -l 1143.61 diff --git a/tests/bugs/modalg_5/bug25334_19 b/tests/bugs/modalg_5/bug25334_19 index eb427c1928..93daf0877b 100644 --- a/tests/bugs/modalg_5/bug25334_19 +++ b/tests/bugs/modalg_5/bug25334_19 @@ -18,6 +18,9 @@ donly ww openoffset res ww 1 10 renamevar res_1 result +vori ww +vori result + fit checkprops result -l 752.799 diff --git a/tests/bugs/modalg_5/bug25334_2 b/tests/bugs/modalg_5/bug25334_2 index a210f56469..3f16c789c7 100644 --- a/tests/bugs/modalg_5/bug25334_2 +++ b/tests/bugs/modalg_5/bug25334_2 @@ -18,6 +18,9 @@ donly ww openoffset res ww 1 -10 renamevar res_1 result +vori ww +vori result + fit checkprops result -l 644.509 diff --git a/tests/bugs/modalg_5/bug25334_20 b/tests/bugs/modalg_5/bug25334_20 index 4159c399da..0cdeb5d8e9 100644 --- a/tests/bugs/modalg_5/bug25334_20 +++ b/tests/bugs/modalg_5/bug25334_20 @@ -18,6 +18,9 @@ donly ww openoffset res ww 1 -10 renamevar res_1 result +vori ww +vori result + fit checkprops result -l 705.994 diff --git a/tests/bugs/modalg_5/bug25334_3 b/tests/bugs/modalg_5/bug25334_3 index 5291afb78a..8659654ede 100644 --- a/tests/bugs/modalg_5/bug25334_3 +++ b/tests/bugs/modalg_5/bug25334_3 @@ -18,6 +18,9 @@ donly ww openoffset res ww 1 -10 renamevar res_1 result +vori ww +vori result + fit checkprops result -l 354.958 diff --git a/tests/bugs/modalg_5/bug25334_4 b/tests/bugs/modalg_5/bug25334_4 index 4e16e92a05..d22bb01edc 100644 --- a/tests/bugs/modalg_5/bug25334_4 +++ b/tests/bugs/modalg_5/bug25334_4 @@ -18,6 +18,9 @@ donly ww openoffset res ww 1 10 renamevar res_1 result +vori ww +vori result + fit checkprops result -l 386.077 diff --git a/tests/bugs/modalg_5/bug25334_5 b/tests/bugs/modalg_5/bug25334_5 index e4f8abca54..836760ba88 100644 --- a/tests/bugs/modalg_5/bug25334_5 +++ b/tests/bugs/modalg_5/bug25334_5 @@ -18,6 +18,9 @@ donly ww openoffset res ww 1 10 renamevar res_1 result +vori ww +vori result + fit checkprops result -l 840.157 diff --git a/tests/bugs/modalg_5/bug25334_6 b/tests/bugs/modalg_5/bug25334_6 index a7fd08bd6e..a51e4e57a3 100644 --- a/tests/bugs/modalg_5/bug25334_6 +++ b/tests/bugs/modalg_5/bug25334_6 @@ -18,6 +18,9 @@ donly ww openoffset res ww 1 -10 renamevar res_1 result +vori ww +vori result + fit checkprops result -l 782.224 diff --git a/tests/bugs/modalg_5/bug25334_7 b/tests/bugs/modalg_5/bug25334_7 index bfb115366a..2b9af4c80f 100644 --- a/tests/bugs/modalg_5/bug25334_7 +++ b/tests/bugs/modalg_5/bug25334_7 @@ -18,6 +18,9 @@ donly ww openoffset res ww 1 10 renamevar res_1 result +vori ww +vori result + fit checkprops result -l 559.65 diff --git a/tests/bugs/modalg_5/bug25334_8 b/tests/bugs/modalg_5/bug25334_8 index fed53f80d9..48d9a00a5d 100644 --- a/tests/bugs/modalg_5/bug25334_8 +++ b/tests/bugs/modalg_5/bug25334_8 @@ -18,6 +18,9 @@ donly ww openoffset res ww 1 -10 renamevar res_1 result +vori ww +vori result + fit checkprops result -l 533.593 diff --git a/tests/bugs/modalg_5/bug25334_9 b/tests/bugs/modalg_5/bug25334_9 index c301fc61e6..4bd3febef0 100644 --- a/tests/bugs/modalg_5/bug25334_9 +++ b/tests/bugs/modalg_5/bug25334_9 @@ -18,6 +18,9 @@ donly ww openoffset res ww 1 -10 renamevar res_1 result +vori ww +vori result + fit checkprops result -l 558.479 diff --git a/tests/bugs/modalg_7/bug28684_1 b/tests/bugs/modalg_7/bug28684_1 new file mode 100644 index 0000000000..1ad83da731 --- /dev/null +++ b/tests/bugs/modalg_7/bug28684_1 @@ -0,0 +1,31 @@ +puts "============" +puts "OCC25298: Modeling Algorithms - BRepOffsetAPI_MakeOffset produces wire with another orientation in compare with source wire" +puts "============" +puts "" + +circle c 0 0 0 100 +mkedge e c +wire a e + +smallview +display a +fit + +vori a + +if [catch { mkoffset resoffset a 1 10 } ] { + puts "Error : mkoffset is wrong" +} else { + renamevar resoffset_1 result + + vori result + + checkprops result -l 691.15 + checkshape result + checksection result + + display result + fit +} + +checkview -screenshot -2d -path ${imagedir}/${test_image}.png diff --git a/tests/bugs/modalg_7/bug28684_2 b/tests/bugs/modalg_7/bug28684_2 new file mode 100644 index 0000000000..c7871c0239 --- /dev/null +++ b/tests/bugs/modalg_7/bug28684_2 @@ -0,0 +1,31 @@ +puts "============" +puts "OCC25298: Modeling Algorithms - BRepOffsetAPI_MakeOffset produces wire with another orientation in compare with source wire" +puts "============" +puts "" + +circle c 0 0 0 100 +mkedge e c +wire a e + +smallview +display a +fit + +vori a + +if [catch { mkoffset resoffset a 1 -10 } ] { + puts "Error : mkoffset is wrong" +} else { + renamevar resoffset_1 result + + vori result + + checkprops result -l 565.487 + checkshape result + checksection result + + display result + fit +} + +checkview -screenshot -2d -path ${imagedir}/${test_image}.png From 7e187d6b22e782161450fbf09c5c7563faaecc66 Mon Sep 17 00:00:00 2001 From: akaftasev Date: Thu, 26 Aug 2021 14:33:56 +0300 Subject: [PATCH 023/639] 0028687: Offset for open wire is built with incorrect direction Added new condition to exclude offsetting non closed part of circle as complete circle --- src/BRepFill/BRepFill_OffsetWire.cxx | 4 ++++ tests/bugs/modalg_5/bug25334_1 | 2 +- tests/bugs/modalg_5/bug25334_2 | 2 +- tests/bugs/modalg_5/bug25334_3 | 2 +- tests/bugs/modalg_5/bug25334_4 | 2 +- 5 files changed, 8 insertions(+), 4 deletions(-) diff --git a/src/BRepFill/BRepFill_OffsetWire.cxx b/src/BRepFill/BRepFill_OffsetWire.cxx index be82150111..a1a1699211 100644 --- a/src/BRepFill/BRepFill_OffsetWire.cxx +++ b/src/BRepFill/BRepFill_OffsetWire.cxx @@ -283,6 +283,10 @@ static Standard_Boolean KPartCircle { if (E.Orientation() == TopAbs_FORWARD) anOffset *= -1; + if (!BRep_Tool::IsClosed(E)) + { + anOffset *= -1; + } gp_Circ2d theCirc = AHC->Circle(); if (anOffset > 0. || Abs(anOffset) < theCirc.Radius()) OC = new Geom2d_Circle (theCirc.Position(), theCirc.Radius() + anOffset); diff --git a/tests/bugs/modalg_5/bug25334_1 b/tests/bugs/modalg_5/bug25334_1 index 550317e322..f4d7734dcd 100644 --- a/tests/bugs/modalg_5/bug25334_1 +++ b/tests/bugs/modalg_5/bug25334_1 @@ -23,7 +23,7 @@ vori result fit -checkprops result -l 613.39 +checkprops result -l 644.509 checkshape result checksection result diff --git a/tests/bugs/modalg_5/bug25334_2 b/tests/bugs/modalg_5/bug25334_2 index 3f16c789c7..b5f90d7539 100644 --- a/tests/bugs/modalg_5/bug25334_2 +++ b/tests/bugs/modalg_5/bug25334_2 @@ -23,7 +23,7 @@ vori result fit -checkprops result -l 644.509 +checkprops result -l 613.39 checkshape result checksection result diff --git a/tests/bugs/modalg_5/bug25334_3 b/tests/bugs/modalg_5/bug25334_3 index 8659654ede..e045bc1b6a 100644 --- a/tests/bugs/modalg_5/bug25334_3 +++ b/tests/bugs/modalg_5/bug25334_3 @@ -23,7 +23,7 @@ vori result fit -checkprops result -l 354.958 +checkprops result -l 386.077 checkshape result checksection result diff --git a/tests/bugs/modalg_5/bug25334_4 b/tests/bugs/modalg_5/bug25334_4 index d22bb01edc..40b13eb67e 100644 --- a/tests/bugs/modalg_5/bug25334_4 +++ b/tests/bugs/modalg_5/bug25334_4 @@ -23,7 +23,7 @@ vori result fit -checkprops result -l 386.077 +checkprops result -l 354.958 checkshape result checksection result From 19691a22fda814e70ff3416dedce91f74b9dde56 Mon Sep 17 00:00:00 2001 From: kgv Date: Sat, 28 Aug 2021 01:42:10 +0300 Subject: [PATCH 024/639] 0032545: Configuration, CMake - add BUILD_FORCE_RelWithDebInfo option for generating VS project files with Debug info in Release mode --- CMakeLists.txt | 10 ++++++++++ adm/cmake/ffmpeg.cmake | 6 +++--- adm/cmake/occt_defs_flags.cmake | 13 +++++++++++++ adm/cmake/occt_toolkit.cmake | 7 ++++++- adm/cmake/vardescr.cmake | 3 +++ adm/scripts/cmake_custom.bat.template | 1 + adm/scripts/cmake_gen.bat | 2 ++ 7 files changed, 38 insertions(+), 4 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 43440b6388..d98acc0ff9 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -91,6 +91,16 @@ if (NOT DEFINED BUILD_RELEASE_DISABLE_EXCEPTIONS) set (BUILD_RELEASE_DISABLE_EXCEPTIONS ON CACHE BOOL "${BUILD_RELEASE_DISABLE_EXCEPTIONS_DESCR}") endif() +if (MSVC) + set (BUILD_FORCE_RelWithDebInfo OFF CACHE BOOL "${BUILD_FORCE_RelWithDebInfo_DESCR}") +else() + set (BUILD_FORCE_RelWithDebInfo OFF) +endif() + +if (BUILD_FORCE_RelWithDebInfo) + set (CMAKE_CONFIGURATION_TYPES Release Debug CACHE INTERNAL "" FORCE) +endif() + # option to enable or disable use of precompiled headers if (NOT DEFINED BUILD_USE_PCH) set (BUILD_USE_PCH OFF CACHE BOOL "${BUILD_USE_PCH_DESCR}") diff --git a/adm/cmake/ffmpeg.cmake b/adm/cmake/ffmpeg.cmake index e4cd736e7c..f619d2d410 100644 --- a/adm/cmake/ffmpeg.cmake +++ b/adm/cmake/ffmpeg.cmake @@ -191,13 +191,13 @@ foreach (LIBRARY_NAME ${CSF_FFmpeg}) else() install (FILES "${3RDPARTY_FFMPEG_DLL_${LIBRARY_NAME}}" CONFIGURATIONS Release - DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/bin") + DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/${INSTALL_DIR_BIN}") install (FILES "${3RDPARTY_FFMPEG_DLL_${LIBRARY_NAME}}" CONFIGURATIONS RelWithDebInfo - DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/bini") + DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/${INSTALL_DIR_BIN}i") install (FILES "${3RDPARTY_FFMPEG_DLL_${LIBRARY_NAME}}" CONFIGURATIONS Debug - DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/bind") + DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/${INSTALL_DIR_BIN}d") endif() else() get_filename_component(3RDPARTY_FFMPEG_LIBRARY_ABS ${3RDPARTY_FFMPEG_LIBRARY_${LIBRARY_NAME}} REALPATH) diff --git a/adm/cmake/occt_defs_flags.cmake b/adm/cmake/occt_defs_flags.cmake index 03eaea60ea..200790c048 100644 --- a/adm/cmake/occt_defs_flags.cmake +++ b/adm/cmake/occt_defs_flags.cmake @@ -40,6 +40,19 @@ elseif (MSVC) set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /EHa") endif() +if (MSVC) + # string pooling (GF), function-level linking (Gy) + set (CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /GF /Gy") + set (CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} /GF /Gy") + if (BUILD_FORCE_RelWithDebInfo) + # generate debug info (Zi), inline expansion level (Ob1) + set (CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /Zi /Ob1") + set (CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} /Zi /Ob1") + # generate debug info (debug), OptimizeReferences=true (OPT:REF), EnableCOMDATFolding=true (OPT:ICF) + set (CMAKE_SHARED_LINKER_FLAGS_RELEASE "${CMAKE_SHARED_LINKER_FLAGS_RELEASE} /debug /OPT:REF /OPT:ICF") + endif() +endif() + # remove _WINDOWS flag if it exists string (REGEX MATCH "/D_WINDOWS" IS_WINDOWSFLAG "${CMAKE_CXX_FLAGS}") if (IS_WINDOWSFLAG) diff --git a/adm/cmake/occt_toolkit.cmake b/adm/cmake/occt_toolkit.cmake index a3826f3f9a..2f96c6f148 100644 --- a/adm/cmake/occt_toolkit.cmake +++ b/adm/cmake/occt_toolkit.cmake @@ -236,8 +236,13 @@ else() add_library (${PROJECT_NAME} ${USED_SRCFILES} ${USED_INCFILES} ${USED_RCFILE} ${RESOURCE_FILES} ${${PROJECT_NAME}_MOC_FILES}) if (MSVC) + if (BUILD_FORCE_RelWithDebInfo) + set (aReleasePdbConf "Release") + else() + set (aReleasePdbConf) + endif() install (FILES ${CMAKE_BINARY_DIR}/${OS_WITH_BIT}/${COMPILER}/bin\${OCCT_INSTALL_BIN_LETTER}/${PROJECT_NAME}.pdb - CONFIGURATIONS Debug RelWithDebInfo + CONFIGURATIONS Debug ${aReleasePdbConf} RelWithDebInfo DESTINATION "${INSTALL_DIR_BIN}\${OCCT_INSTALL_BIN_LETTER}") endif() diff --git a/adm/cmake/vardescr.cmake b/adm/cmake/vardescr.cmake index 06dab5b4ca..0733af0ac2 100644 --- a/adm/cmake/vardescr.cmake +++ b/adm/cmake/vardescr.cmake @@ -38,6 +38,9 @@ set (BUILD_ENABLE_FPE_SIGNAL_HANDLER_DESCR Corresponding environment variable (CSF_FPE) can be changed manually in custom.bat/sh scripts without regeneration by CMake.") +set (BUILD_FORCE_RelWithDebInfo_DESCR +"Generate PDB files within normal Release build.") + set (BUILD_USE_PCH_DESCR "Use precompiled headers to accelerate the build. Precompiled headers are generated automatically by Cotire tool.") diff --git a/adm/scripts/cmake_custom.bat.template b/adm/scripts/cmake_custom.bat.template index 51813eaa09..eabc8290b0 100644 --- a/adm/scripts/cmake_custom.bat.template +++ b/adm/scripts/cmake_custom.bat.template @@ -22,6 +22,7 @@ rem set BUILD_RELEASE_DISABLE_EXCEPTIONS=ON rem set BUILD_WITH_DEBUG=OFF rem set BUILD_ENABLE_FPE_SIGNAL_HANDLER=ON rem set BUILD_USE_PCH=OFF +rem set BUILD_FORCE_RelWithDebInfo=OFF rem Use semicolon-separated list of toolkits if you want to disable all modules rem and build only some toolkits. diff --git a/adm/scripts/cmake_gen.bat b/adm/scripts/cmake_gen.bat index 38c6918305..f60e47b129 100644 --- a/adm/scripts/cmake_gen.bat +++ b/adm/scripts/cmake_gen.bat @@ -24,6 +24,7 @@ set BUILD_RELEASE_DISABLE_EXCEPTIONS=ON set BUILD_WITH_DEBUG=OFF set BUILD_ENABLE_FPE_SIGNAL_HANDLER=ON set BUILD_USE_PCH=OFF +set BUILD_FORCE_RelWithDebInfo=OFF set BUILD_MODULE_ApplicationFramework=ON set BUILD_MODULE_DataExchange=ON @@ -71,6 +72,7 @@ cmake -G "%arch_compile%" ^ -D BUILD_WITH_DEBUG:BOOL=%BUILD_WITH_DEBUG% ^ -D BUILD_ENABLE_FPE_SIGNAL_HANDLER:BOOL=%BUILD_ENABLE_FPE_SIGNAL_HANDLER% ^ -D BUILD_USE_PCH:BOOL=%BUILD_USE_PCH% ^ + -D BUILD_FORCE_RelWithDebInfo:BOOL=%BUILD_FORCE_RelWithDebInfo% ^ -D INSTALL_DIR:PATH="%INSTALL_DIR%" ^ -D USE_D3D:BOOL=%USE_D3D% ^ -D USE_FFMPEG:BOOL=%USE_FFMPEG% ^ From ce83709ac96e3e20edabc03d8033162d0cbd5012 Mon Sep 17 00:00:00 2001 From: kgv Date: Mon, 30 Aug 2021 20:53:33 +0300 Subject: [PATCH 025/639] 0032546: Data Exchange, XCAF - mark material as defined XCAFDoc_VisMaterialPBR::IsDefined=true within default constructor XCAFDoc_VisMaterialCommon and XCAFDoc_VisMaterialPBR default constructors now set IsDefined property to TRUE. So that it is required to set IsDefined=false explicitly to create an undefined material, which is done by XCAFDoc_VisMaterial constructor. Existing application code shouldn't require any modifications in most cases (IsDefined=true required before to setup material could be now removed). --- src/XCAFDoc/XCAFDoc_VisMaterial.cxx | 3 ++- src/XCAFDoc/XCAFDoc_VisMaterial.hxx | 20 ++++++++++++++++---- src/XCAFDoc/XCAFDoc_VisMaterialCommon.hxx | 4 ++-- src/XCAFDoc/XCAFDoc_VisMaterialPBR.hxx | 4 ++-- 4 files changed, 22 insertions(+), 9 deletions(-) diff --git a/src/XCAFDoc/XCAFDoc_VisMaterial.cxx b/src/XCAFDoc/XCAFDoc_VisMaterial.cxx index 847289eb09..9e223b9f51 100644 --- a/src/XCAFDoc/XCAFDoc_VisMaterial.cxx +++ b/src/XCAFDoc/XCAFDoc_VisMaterial.cxx @@ -40,7 +40,8 @@ XCAFDoc_VisMaterial::XCAFDoc_VisMaterial() myAlphaCutOff (0.5f), myFaceCulling (Graphic3d_TypeOfBackfacingModel_Auto) { - // + myPbrMat .IsDefined = false; + myCommonMat.IsDefined = false; } //======================================================================= diff --git a/src/XCAFDoc/XCAFDoc_VisMaterial.hxx b/src/XCAFDoc/XCAFDoc_VisMaterial.hxx index a94a81a507..92456cf631 100644 --- a/src/XCAFDoc/XCAFDoc_VisMaterial.hxx +++ b/src/XCAFDoc/XCAFDoc_VisMaterial.hxx @@ -69,29 +69,41 @@ public: //! Fill in graphic aspects. Standard_EXPORT void FillAspect (const Handle(Graphic3d_Aspects)& theAspect) const; - //! Return TRUE if metal-roughness PBR material is defined. + //! Return TRUE if metal-roughness PBR material is defined; FALSE by default. Standard_Boolean HasPbrMaterial() const { return myPbrMat.IsDefined; } //! Return metal-roughness PBR material. + //! Note that default constructor creates an empty material (@sa XCAFDoc_VisMaterialPBR::IsDefined). const XCAFDoc_VisMaterialPBR& PbrMaterial() const { return myPbrMat; } //! Setup metal-roughness PBR material. Standard_EXPORT void SetPbrMaterial (const XCAFDoc_VisMaterialPBR& theMaterial); //! Setup undefined metal-roughness PBR material. - void UnsetPbrMaterial() { SetPbrMaterial (XCAFDoc_VisMaterialPBR()); } + void UnsetPbrMaterial() + { + XCAFDoc_VisMaterialPBR anEmpty; + anEmpty.IsDefined = false; + SetPbrMaterial (anEmpty); + } - //! Return TRUE if common material is defined. + //! Return TRUE if common material is defined; FALSE by default. Standard_Boolean HasCommonMaterial() const { return myCommonMat.IsDefined; } //! Return common material. + //! Note that default constructor creates an empty material (@sa XCAFDoc_VisMaterialCommon::IsDefined). const XCAFDoc_VisMaterialCommon& CommonMaterial() const { return myCommonMat; } //! Setup common material. Standard_EXPORT void SetCommonMaterial (const XCAFDoc_VisMaterialCommon& theMaterial); //! Setup undefined common material. - void UnsetCommonMaterial() { SetCommonMaterial (XCAFDoc_VisMaterialCommon()); } + void UnsetCommonMaterial() + { + XCAFDoc_VisMaterialCommon anEmpty; + anEmpty.IsDefined = false; + SetCommonMaterial (anEmpty); + } //! Return base color. Standard_EXPORT Quantity_ColorRGBA BaseColor() const; diff --git a/src/XCAFDoc/XCAFDoc_VisMaterialCommon.hxx b/src/XCAFDoc/XCAFDoc_VisMaterialCommon.hxx index 22cb88a336..88148f2dfa 100644 --- a/src/XCAFDoc/XCAFDoc_VisMaterialCommon.hxx +++ b/src/XCAFDoc/XCAFDoc_VisMaterialCommon.hxx @@ -33,7 +33,7 @@ struct XCAFDoc_VisMaterialCommon Quantity_Color EmissiveColor; //!< emission color Standard_ShortReal Shininess; //!< shininess value Standard_ShortReal Transparency; //!< transparency value within [0, 1] range with 0 meaning opaque - Standard_Boolean IsDefined; //!< defined flag; FALSE by default + Standard_Boolean IsDefined; //!< defined flag; TRUE by default //! Empty constructor. XCAFDoc_VisMaterialCommon() @@ -43,7 +43,7 @@ struct XCAFDoc_VisMaterialCommon EmissiveColor(0.0, 0.0, 0.0, Quantity_TOC_RGB), Shininess (1.0f), Transparency (0.0f), - IsDefined (Standard_False) {} + IsDefined (Standard_True) {} //! Compare two materials. Standard_Boolean IsEqual (const XCAFDoc_VisMaterialCommon& theOther) const diff --git a/src/XCAFDoc/XCAFDoc_VisMaterialPBR.hxx b/src/XCAFDoc/XCAFDoc_VisMaterialPBR.hxx index 39bd90abfb..123a815a87 100644 --- a/src/XCAFDoc/XCAFDoc_VisMaterialPBR.hxx +++ b/src/XCAFDoc/XCAFDoc_VisMaterialPBR.hxx @@ -33,7 +33,7 @@ struct XCAFDoc_VisMaterialPBR Standard_ShortReal Metallic; //!< metalness (or scale factor to the texture) within range [0.0, 1.0]; 1.0 by default Standard_ShortReal Roughness; //!< roughness (or scale factor to the texture) within range [0.0, 1.0]; 1.0 by default Standard_ShortReal RefractionIndex; //!< IOR (index of refraction) within range [1.0, 3.0]; 1.5 by default - Standard_Boolean IsDefined; //!< defined flag; FALSE by default + Standard_Boolean IsDefined; //!< defined flag; TRUE by default //! Empty constructor. XCAFDoc_VisMaterialPBR() @@ -42,7 +42,7 @@ struct XCAFDoc_VisMaterialPBR Metallic (1.0f), Roughness (1.0f), RefractionIndex (1.5f), - IsDefined (Standard_False) {} + IsDefined (Standard_True) {} //! Compare two materials. Standard_Boolean IsEqual (const XCAFDoc_VisMaterialPBR& theOther) const From c1b3ce202ab35c1e28902d4df6c5b617fba819f7 Mon Sep 17 00:00:00 2001 From: kgv Date: Tue, 31 Aug 2021 10:58:00 +0300 Subject: [PATCH 026/639] 0032549: Configuration - fix misprint in adm/scripts/android_build.bat for Draco library name --- adm/scripts/android_build.bat | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/adm/scripts/android_build.bat b/adm/scripts/android_build.bat index 65466d437e..ce1aa67bd2 100644 --- a/adm/scripts/android_build.bat +++ b/adm/scripts/android_build.bat @@ -141,6 +141,9 @@ echo Start building OCCT for %aPlatformAndCompiler%, API level %anApi%>> %aLogFi pushd "%aWorkDir%" +set "aFreeTypeLibName=libfreetype.so" +if exist "%aFreeType%/libs/%anAbi%/libfreetype.a" ( set "aFreeTypeLibName=libfreetype.a" ) + set "aTimeZERO=%TIME%" if ["%toCMake%"] == ["1"] ( echo Configuring OCCT for Android %anAbi%, API level %anApi%... @@ -170,15 +173,14 @@ if ["%toCMake%"] == ["1"] ( -D 3RDPARTY_FREETYPE_INCLUDE_DIR_freetype2:FILEPATH="%aFreeType%/include" ^ -D 3RDPARTY_FREETYPE_INCLUDE_DIR_ft2build:FILEPATH="%aFreeType%/include" ^ -D 3RDPARTY_FREETYPE_LIBRARY_DIR:PATH="%aFreeType%/libs/%anAbi%" ^ - -D 3RDPARTY_FREETYPE_LIBRARY:FILEPATH="%aFreeType%/libs/%anAbi%/libfreetype.so" ^ + -D 3RDPARTY_FREETYPE_LIBRARY:FILEPATH="%aFreeType%/libs/%anAbi%/%aFreeTypeLibName%" ^ -D USE_RAPIDJSON:BOOL="%USE_RAPIDJSON%" ^ -D 3RDPARTY_RAPIDJSON_DIR:PATH="%aRapidJson%" ^ -D 3RDPARTY_RAPIDJSON_INCLUDE_DIR:PATH="%aRapidJson%/include" ^ -D USE_DRACO:BOOL="%USE_DRACO%" ^ -D 3RDPARTY_DRACO_DIR:PATH="%aDraco%" ^ -D 3RDPARTY_DRACO_INCLUDE_DIR:FILEPATH="%aDraco%/include" ^ - -D 3RDPARTY_DRACO_LIBRARY_DIR:PATH="%aDraco%/libs/%anAbi%" ^ - -D 3RDPARTY_DRACO_LIBRARY:FILEPATH="%aDraco%/libs/%anAbi%/libfreetype.so" ^ + -D 3RDPARTY_DRACO_LIBRARY_DIR_draco:PATH="%aDraco%/libs/%anAbi%" ^ "%aCasSrc%" if errorlevel 1 ( From 13584d1468739555db4ae23bf203c76625ec2ad5 Mon Sep 17 00:00:00 2001 From: jgv Date: Fri, 27 Aug 2021 12:53:29 +0300 Subject: [PATCH 027/639] 0032502: Modeling Algorithms - BOP wrong result on sphere and cylinder Modifications in the method IntPatch_ALineToWLine::MakeWLine: correct setting parameters to vertices on IntPatch_WLine curve. --- src/IntPatch/IntPatch_ALineToWLine.cxx | 12 +++++++++--- tests/bugs/modalg_7/bug32502 | 24 ++++++++++++++++++++++++ 2 files changed, 33 insertions(+), 3 deletions(-) create mode 100644 tests/bugs/modalg_7/bug32502 diff --git a/src/IntPatch/IntPatch_ALineToWLine.cxx b/src/IntPatch/IntPatch_ALineToWLine.cxx index 7055727a44..59cbff38ae 100644 --- a/src/IntPatch/IntPatch_ALineToWLine.cxx +++ b/src/IntPatch/IntPatch_ALineToWLine.cxx @@ -676,7 +676,11 @@ void IntPatch_ALineToWLine::MakeWLine(const Handle(IntPatch_ALine)& theALine, IntPatch_Point aLVtx = theALine->Vertex(i); aLVtx.SetValue(aVertP2S); aLVtx.SetTolerance(aVertToler); - aLVtx.SetParameter(aNewVertexParam); + Standard_Real aParam = aLVtx.ParameterOnLine(); + if (Abs(aParam - theLPar) <= Precision::PConfusion()) //in the case of closed curve, + aLVtx.SetParameter(-1); //we don't know yet the number of points in the curve + else + aLVtx.SetParameter(aNewVertexParam); aSeqVertex(++aNewVertID) = aLVtx; hasVertexBeenChecked(i) = Standard_True; isFound = Standard_True; @@ -748,7 +752,9 @@ void IntPatch_ALineToWLine::MakeWLine(const Handle(IntPatch_ALine)& theALine, for(Standard_Integer i = aSeqVertex.Lower(); i <= aNewVertID; i++) { - const IntPatch_Point& aVtx = aSeqVertex(i); + IntPatch_Point aVtx = aSeqVertex(i); + if (aVtx.ParameterOnLine() == -1) //in the case of closed curve, + aVtx.SetParameter (aWLine->NbPnts()); //we set the last parameter aWLine->AddVertex(aVtx); } @@ -756,7 +762,7 @@ void IntPatch_ALineToWLine::MakeWLine(const Handle(IntPatch_ALine)& theALine, //the method ComputeVertexParameters can reduce the number of points in aWLine->ComputeVertexParameters(myTol3D); - + if (aWLine->NbPnts() > 1) { aWLine->EnablePurging(Standard_False); diff --git a/tests/bugs/modalg_7/bug32502 b/tests/bugs/modalg_7/bug32502 new file mode 100644 index 0000000000..2f4cef1dbf --- /dev/null +++ b/tests/bugs/modalg_7/bug32502 @@ -0,0 +1,24 @@ +puts "=================================================" +puts "OCC32502: BOP wrong result on sphere and cylinder" +puts "=================================================" +puts "" + +psphere sph 10 +plane pln 0 0 7 0 1 0 0 0 1 +pcylinder cyl pln 3 40 +ttranslate cyl 0 -20 0 + +bop sph cyl +bopfuse result + +checkshape result + +checknbshapes result -t -vertex 4 -edge 11 -wire 5 -face 5 -shell 1 -solid 1 + +set tolres [checkmaxtol result] + +if { ${tolres} > 3.e-5} { + puts "Error: bad tolerance of result" +} + +checkprops result -s 1750.1 -v 4947.2 From 0b1fd5909d8435be894968f7eadb480dc167cecd Mon Sep 17 00:00:00 2001 From: sshutina Date: Wed, 1 Sep 2021 15:43:40 +0300 Subject: [PATCH 028/639] 0031351: Inspectors - thread in DFBrowser removing - DFBrowser_Thread and connected are removed from the package as obsolete --- tools/DFBrowser/DFBrowser_Thread.cxx | 150 --------------- tools/DFBrowser/DFBrowser_Thread.hxx | 74 -------- tools/DFBrowser/DFBrowser_ThreadItem.hxx | 42 ----- .../DFBrowser/DFBrowser_ThreadItemSearch.cxx | 173 ------------------ .../DFBrowser/DFBrowser_ThreadItemSearch.hxx | 93 ---------- tools/DFBrowser/DFBrowser_Window.cxx | 21 +-- tools/DFBrowser/DFBrowser_Window.hxx | 11 +- tools/DFBrowser/FILES | 5 - 8 files changed, 4 insertions(+), 565 deletions(-) delete mode 100644 tools/DFBrowser/DFBrowser_Thread.cxx delete mode 100644 tools/DFBrowser/DFBrowser_Thread.hxx delete mode 100644 tools/DFBrowser/DFBrowser_ThreadItem.hxx delete mode 100644 tools/DFBrowser/DFBrowser_ThreadItemSearch.cxx delete mode 100644 tools/DFBrowser/DFBrowser_ThreadItemSearch.hxx diff --git a/tools/DFBrowser/DFBrowser_Thread.cxx b/tools/DFBrowser/DFBrowser_Thread.cxx deleted file mode 100644 index 75996be31a..0000000000 --- a/tools/DFBrowser/DFBrowser_Thread.cxx +++ /dev/null @@ -1,150 +0,0 @@ -// Created on: 2017-06-16 -// Created by: Natalia ERMOLAEVA -// Copyright (c) 2017 OPEN CASCADE SAS -// -// This file is part of Open CASCADE Technology software library. -// -// This library is free software; you can redistribute it and/or modify it under -// the terms of the GNU Lesser General Public License version 2.1 as published -// by the Free Software Foundation, with special exception defined in the file -// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT -// distribution for complete text of the license and disclaimer of any warranty. -// -// Alternatively, this file may be used under the terms of Open CASCADE -// commercial license or contractual agreement. - -#include -#include -#include -#include - -#include - -#include -#include -#include - -//! \class DFBrowser_QThread -//! Internal class to cover QThread in order to process ThreadItem. -class DFBrowser_QThread : public QThread -{ -public: - - //! Constructor - DFBrowser_QThread (QObject* theParent) : QThread (theParent), myItem (0) {} - - //! Destructor - virtual ~DFBrowser_QThread() {} - - //! Sets thread item to be processed - //! \param theItem a thread item - void setItem (DFBrowser_ThreadItem* theItem) { myItem = theItem; } - - //! Returns the current processing thread item - DFBrowser_ThreadItem* getItem() const { return myItem; } - -protected: - - //! Starts thread item - virtual void run() Standard_OVERRIDE - { - if (myItem) - myItem->Run(); - } - -private: - - DFBrowser_ThreadItem* myItem; -}; - -// ======================================================================= -// function : Constructor -// purpose : -// ======================================================================= -DFBrowser_Thread::DFBrowser_Thread (DFBrowser_Window* theWindow) -: QObject (theWindow), myPostponedItem (0), myIsFinishProcessing (false), - myIsProcessPostponed (Standard_False) -{ - DFBrowser_SearchLine* aSearchLine = theWindow->GetTreeLevelLine()->GetSearchLine(); - myItems.append (new DFBrowser_ThreadItemSearch(aSearchLine)); -} - -// ======================================================================= -// function : ProcessApplication -// purpose : -// ======================================================================= -void DFBrowser_Thread::ProcessApplication() -{ - if (!myStartedThreads.empty()) - { - myIsProcessPostponed = Standard_True; - return; - } - for (int anItemId = 0, aSize = myItems.size(); anItemId < aSize; anItemId++) - startThread (myItems[anItemId]); -} - -// ======================================================================= -// function : startThread -// purpose : -// ======================================================================= -void DFBrowser_Thread::startThread (DFBrowser_ThreadItem* theItem) -{ - DFBrowser_QThread* aThread = new DFBrowser_QThread (this); - aThread->setItem (theItem); - aThread->start(); - connect (aThread, SIGNAL (finished()), this, SLOT (onFinished()), Qt::QueuedConnection); - myStartedThreads.append (aThread); -} - -// ======================================================================= -// function : TerminateThread -// purpose : -// ======================================================================= -void DFBrowser_Thread::TerminateThread() -{ - for (int aThreadsId = 0, aCount = myStartedThreads.size(); aThreadsId < aCount; aThreadsId++) - { - QThread* aThread = myStartedThreads[aThreadsId]; - if (aThread->isRunning()) - aThread->terminate(); - } -} - -// ======================================================================= -// function : onFinished -// purpose : -// ======================================================================= -void DFBrowser_Thread::onFinished() -{ - DFBrowser_QThread* aThread = (DFBrowser_QThread*)(sender()); - if (myIsFinishProcessing) - { - // if thread send signal when other finished signal is processed - if (aThread) - myPostponedItem = aThread->getItem(); - return; - } - - myIsFinishProcessing = true; - if (aThread) - { - myStartedThreads.removeAll (aThread); - DFBrowser_ThreadItem* anItem = aThread->getItem(); - if (anItem) - anItem->ApplyValues(); - } - - myIsFinishProcessing = false; - if (myPostponedItem) - { - myPostponedItem->ApplyValues(); - myPostponedItem = 0; - } - - if (myIsProcessPostponed) - { - myIsProcessPostponed = Standard_False; - ProcessApplication(); - } -} diff --git a/tools/DFBrowser/DFBrowser_Thread.hxx b/tools/DFBrowser/DFBrowser_Thread.hxx deleted file mode 100644 index f6e3465fed..0000000000 --- a/tools/DFBrowser/DFBrowser_Thread.hxx +++ /dev/null @@ -1,74 +0,0 @@ -// Created on: 2017-06-16 -// Created by: Natalia ERMOLAEVA -// Copyright (c) 2017 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 DFBrowser_Thread_H -#define DFBrowser_Thread_H - -#include - -#include -#include -#include -#include - -class DFBrowser_Module; -class DFBrowser_ThreadItem; -class DFBrowser_Window; - -class QThread; - -//! /class DFBrowser_Thread -//! Starts algorithm item in a separate thread and perform some functionality by the algorithm(thread) is finished -class DFBrowser_Thread : public QObject -{ - Q_OBJECT -public: - - //! Constructor - Standard_EXPORT DFBrowser_Thread (DFBrowser_Window* theWindow); - - //! Destructor - virtual ~DFBrowser_Thread() {} - - //! Starts all candidate thread items - Standard_EXPORT void ProcessApplication(); - - //! Terminates all started threads. - Standard_EXPORT void TerminateThread(); - -protected: - - //! Creates new Qt thread and starts the item. Connects to finished signal of thread. - //! \param theItem a thread item - void startThread (DFBrowser_ThreadItem* theItem); - -protected slots: - - //! Removes finished thread from the thread items and apply values of this thread - //! If this signal is come when another thread is processed, the current thread is stored in a cache and - //! is processed after the previous thread is processed. - void onFinished(); - -private: - - QList myItems; //!< candidates to be processed in a thread - QList myStartedThreads; //!< container of started threads - DFBrowser_ThreadItem* myPostponedItem; //!< currently processed item in onFinished() - bool myIsFinishProcessing; //!< blocking state if onFinished() is started but has not been finished yet - Standard_Boolean myIsProcessPostponed; //!< state if process application should be done by finish active thread -}; - - -#endif diff --git a/tools/DFBrowser/DFBrowser_ThreadItem.hxx b/tools/DFBrowser/DFBrowser_ThreadItem.hxx deleted file mode 100644 index c066ca8873..0000000000 --- a/tools/DFBrowser/DFBrowser_ThreadItem.hxx +++ /dev/null @@ -1,42 +0,0 @@ -// Created on: 2017-06-16 -// Created by: Natalia ERMOLAEVA -// Copyright (c) 2017 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 DFBrowser_ThreadItem_H -#define DFBrowser_ThreadItem_H - -#include - -//! \class DFBrowser_ThreadItem -//! An abstract interface for candidates to be processed in a separate thread. -//! To do this, new thread item should inherit this interface and be started in DFBrowser_Thread. -class DFBrowser_ThreadItem -{ -public: - - //! Constructor - DFBrowser_ThreadItem() {} - - //! Destructor - virtual ~DFBrowser_ThreadItem() {} - - //! Algorithm of this item work. It will be performed only once - virtual void Run() = 0; - - //! Applying values accepted by algorithm - virtual void ApplyValues() = 0; -}; - - -#endif diff --git a/tools/DFBrowser/DFBrowser_ThreadItemSearch.cxx b/tools/DFBrowser/DFBrowser_ThreadItemSearch.cxx deleted file mode 100644 index 6a605ee28b..0000000000 --- a/tools/DFBrowser/DFBrowser_ThreadItemSearch.cxx +++ /dev/null @@ -1,173 +0,0 @@ -// Created on: 2017-06-16 -// Created by: Natalia ERMOLAEVA -// Copyright (c) 2017 OPEN CASCADE SAS -// -// This file is part of Open CASCADE Technology software library. -// -// This library is free software; you can redistribute it and/or modify it under -// the terms of the GNU Lesser General Public License version 2.1 as published -// by the Free Software Foundation, with special exception defined in the file -// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT -// distribution for complete text of the license and disclaimer of any warranty. -// -// Alternatively, this file may be used under the terms of Open CASCADE -// commercial license or contractual agreement. - -#include - -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include - -#include -#include -#include - -// ======================================================================= -// function : Run -// purpose : -// ======================================================================= -void DFBrowser_ThreadItemSearch::Run() -{ - DFBrowser_TreeModel* aModel = dynamic_cast (mySearchLine->GetModule()->GetOCAFViewModel()); - Handle(TDocStd_Application) anApplication = aModel->GetTDocStdApplication(); - if (anApplication.IsNull()) - return; - - myDocumentValues.clear(); - myDocumentInfoValues.clear(); - - QMap anAdditionalValues; - QStringList anInfoValues; - QStringList aCurrentPath; - for (Standard_Integer aDocId = 1, aNbDoc = anApplication->NbDocuments(); aDocId <= aNbDoc; aDocId++) - { - Handle(TDocStd_Document) aDocument; - anApplication->GetDocument (aDocId, aDocument); - if (aDocument.IsNull()) - continue; - - anAdditionalValues.clear(); - anInfoValues.clear(); - aCurrentPath.clear(); - getLabelLines (aDocument->Main().Root(), aCurrentPath, anAdditionalValues, anInfoValues); - - myDocumentValues[aDocId] = anAdditionalValues; - myDocumentInfoValues[aDocId] = anInfoValues; - } -} - -// ======================================================================= -// function : ApplyValues -// purpose : -// ======================================================================= -void DFBrowser_ThreadItemSearch::ApplyValues() -{ - mySearchLine->SetValues (myDocumentValues, myDocumentInfoValues); -} - -// ======================================================================= -// function : ClearValues -// purpose : -// ======================================================================= -void DFBrowser_ThreadItemSearch::ClearValues (DFBrowser_SearchLine* theSearchLine) -{ - theSearchLine->ClearValues(); -} - -// ======================================================================= -// function : getLabelLines -// purpose : -// ======================================================================= -void DFBrowser_ThreadItemSearch::getLabelLines (const TDF_Label& theLabel, QStringList& theCurrentPath, - QMap& theValues, - QStringList& theInfoValues) -{ - addLabel (theLabel, theCurrentPath, theValues, theInfoValues); - theCurrentPath.append (DFBrowserPane_Tools::GetEntry (theLabel).ToCString()); - - int anId = 0; - for (TDF_AttributeIterator anAttrIt (theLabel); anAttrIt.More(); anAttrIt.Next(), anId++) - addAttribute(anAttrIt.Value(), theCurrentPath, theValues, theInfoValues); - - for (TDF_ChildIterator aChildIt (theLabel); aChildIt.More(); aChildIt.Next()) - getLabelLines(aChildIt.Value(), theCurrentPath, theValues, theInfoValues); - - theCurrentPath.removeLast(); -} - -// ======================================================================= -// function : addLabel -// purpose : -// ======================================================================= -void DFBrowser_ThreadItemSearch::addLabel (const TDF_Label& theLabel, const QStringList& theCurrentPath, - QMap& theValues, - QStringList& theInfoValues) -{ - QString anEntry = DFBrowserPane_Tools::GetEntry (theLabel).ToCString(); - if (!theValues.contains (anEntry)) - { - theInfoValues.append (anEntry); - theValues[anEntry] = DFBrowser_SearchItemInfo ("40x40_label_icon", anEntry, theCurrentPath, QDir::separator()); - } -} - -// ======================================================================= -// function : addAttribute -// purpose : -// ======================================================================= -void DFBrowser_ThreadItemSearch::addAttribute (const Handle(TDF_Attribute)& theAttribute, - const QStringList& theCurrentPath, - QMap& theValues, - QStringList& theInfoValues) -{ - Standard_CString anAttributeKind = theAttribute->DynamicType()->Name(); - // add element of attribute kind - QString anAttributeName = QString ("%1%2%3").arg (anAttributeKind) - .arg (DFBrowser_SearchLineModel::SplitSeparator()) - .arg (DFBrowserPane_Tools::GetEntry (theAttribute->Label()).ToCString()); - - if (!theInfoValues.contains (anAttributeName)) - { - theInfoValues.append (anAttributeName); - theValues[anAttributeName] = DFBrowser_SearchItemInfo (QVariant(), anAttributeName, theCurrentPath, - QDir::separator()); - } - - // add element of attribute value, e.g. Name or Comment string - QString anAttributeValue; - if (anAttributeKind == STANDARD_TYPE (TDataStd_Name)->Name()) - { - Handle(TDataStd_Name) anAttribute = Handle(TDataStd_Name)::DownCast (theAttribute); - anAttributeValue = DFBrowserPane_Tools::ToString (anAttribute->Get()); - } - else if (anAttributeKind == STANDARD_TYPE (TDataStd_Comment)->Name()) - { - Handle(TDataStd_Comment) anAttribute = Handle(TDataStd_Comment)::DownCast (theAttribute); - anAttributeValue = DFBrowserPane_Tools::ToString (anAttribute->Get()); - } - else - return; - - if (anAttributeValue == "") - return; - - // using attribute value in the name - QString anAttributeValueExt = QString ("%1%2%3").arg (anAttributeValue) - .arg (DFBrowser_SearchLineModel::SplitSeparator()) - .arg (DFBrowserPane_Tools::GetEntry (theAttribute->Label()).ToCString()); - if (!theInfoValues.contains (anAttributeValueExt)) - { - theInfoValues.append (anAttributeValueExt); - theValues[anAttributeValueExt] = DFBrowser_SearchItemInfo (QVariant(), anAttributeValueExt, - theCurrentPath, QDir::separator()); - } -} diff --git a/tools/DFBrowser/DFBrowser_ThreadItemSearch.hxx b/tools/DFBrowser/DFBrowser_ThreadItemSearch.hxx deleted file mode 100644 index 1ed4382a6d..0000000000 --- a/tools/DFBrowser/DFBrowser_ThreadItemSearch.hxx +++ /dev/null @@ -1,93 +0,0 @@ -// Created on: 2017-06-16 -// Created by: Natalia ERMOLAEVA -// Copyright (c) 2017 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 DFBrowser_ThreadItemSearch_H -#define DFBrowser_ThreadItemSearch_H - -#include -#include // to include DFBrowser_SearchItemInfo - -#include -#include - -#include -#include -#include -#include -#include - -class DFBrowser_Module; -class DFBrowser_SearchLine; -class DFBrowser_SearchLineModel; - -//! \class DFBrowser_ThreadItemSearch -//! Iterates by OCAF application to fill internal containers with information necessary for search -class DFBrowser_ThreadItemSearch : public DFBrowser_ThreadItem -{ -public: - - //! Constructor - DFBrowser_ThreadItemSearch (DFBrowser_SearchLine* theSearchLine) : mySearchLine (theSearchLine) {} - - //! Destructor - virtual ~DFBrowser_ThreadItemSearch() {} - - //! Obtains the current OCAF application from the current module, iterates by all documents to fill - //! internal containers for search functionality - Standard_EXPORT virtual void Run() Standard_OVERRIDE; - - //! Sets filled containers into search line - Standard_EXPORT virtual void ApplyValues() Standard_OVERRIDE; - - //! Clears search line values - Standard_EXPORT static void ClearValues (DFBrowser_SearchLine* theSearchLine); - -private: - - //! Fills information containers by iterating through sub-labels and attributes - //! The method is recursive by labels. - //! \parm theLabel a current label, the label information is got and children and attributes information - //! \param theCurrentPath it contains the current path to the label (stores in container) - //! \param theValues container of document item values - //! \param theInfoValues container of document item values - void getLabelLines (const TDF_Label& theLabel, QStringList& theCurrentPath, - QMap& theValues, QStringList& theInfoValues); - - //! Adds label information into container: search will be performed by label entry - //! \parm theLabel a current label - //! \param theCurrentPath it contains the current path to the label (stores in container) - //! \param theValues container of document item values - //! \param theInfoValues container of document item values - void addLabel (const TDF_Label& theLabel, const QStringList& theCurrentPath, - QMap& theValues, QStringList& theInfoValues); - - //! Adds attribute information, it is either attribute kind or attribute value for TDataStd_Name or TDataStd_Comment - //! \parm theAttribute a current attribute - //! \param theCurrentPath it contains the current path to the label (stores in container) - //! \param theValues container of document item values - //! \param theInfoValues container of document item values - void addAttribute (const Handle(TDF_Attribute)& theAttribute, const QStringList& theCurrentPath, - QMap& theValues, QStringList& theInfoValues); - -private: - - DFBrowser_SearchLine* mySearchLine; //!< class that should be filled by apply of the thread item - //!< a document index to container of entry/attribute name to item information - QMap > myDocumentValues; - QMap myDocumentInfoValues; //!< a document index to entry/attribute name -}; - - -#endif diff --git a/tools/DFBrowser/DFBrowser_Window.cxx b/tools/DFBrowser/DFBrowser_Window.cxx index 2e6d4dde89..4b59aa79a7 100644 --- a/tools/DFBrowser/DFBrowser_Window.cxx +++ b/tools/DFBrowser/DFBrowser_Window.cxx @@ -31,8 +31,6 @@ #include #include #include -#include -#include #include #include #include @@ -209,8 +207,6 @@ DFBrowser_Window::DFBrowser_Window() myMainWindow->tabifyDockWidget (aDumpDockWidget, aViewDockWidget); myTreeView->resize (DFBROWSER_DEFAULT_TREE_VIEW_WIDTH, DFBROWSER_DEFAULT_TREE_VIEW_HEIGHT); - - myThread = new DFBrowser_Thread (this); } // ======================================================================= @@ -457,8 +453,7 @@ void DFBrowser_Window::Init (const NCollection_List& //! expand first three levels: CUSTOM QModelIndex aParentIndex = aModel->index (0, 0); setExpandedLevels (myTreeView, aParentIndex, 3/*levels*/); - - myThread->ProcessApplication(); + myModule->SetInitialTreeViewSelection(); } @@ -469,7 +464,6 @@ void DFBrowser_Window::Init (const NCollection_List& void DFBrowser_Window::OpenFile (const TCollection_AsciiString& theFileName) { QApplication::setOverrideCursor (Qt::WaitCursor); - myThread->TerminateThread(); myTreeLevelLine->ClearHistory(); QItemSelectionModel* aSelectionModel = myModule->GetOCAFViewSelectionModel(); @@ -479,7 +473,6 @@ void DFBrowser_Window::OpenFile (const TCollection_AsciiString& theFileName) QModelIndex anIndex; aSelectionModel->select (anIndex, QItemSelectionModel::ClearAndSelect); } - ClearThreadCache(); myTreeLevelLine->ClearHistory(); @@ -520,7 +513,6 @@ void DFBrowser_Window::OpenFile (const TCollection_AsciiString& theFileName) QModelIndex aParentIndex = anOCAFViewModel->index (0, 0); setExpandedLevels (myTreeView, aParentIndex, 3/*levels*/); - myThread->ProcessApplication(); myModule->SetInitialTreeViewSelection(); QApplication::restoreOverrideCursor(); } @@ -592,17 +584,6 @@ void DFBrowser_Window::setOCAFModel (QAbstractItemModel* theModel) void DFBrowser_Window::onBeforeUpdateTreeModel() { myTreeLevelLine->ClearHistory(); - ClearThreadCache(); - myThread->ProcessApplication(); -} - -// ======================================================================= -// function : ClearThreadCache -// purpose : -// ======================================================================= -void DFBrowser_Window::ClearThreadCache() -{ - DFBrowser_ThreadItemSearch::ClearValues (GetTreeLevelLine()->GetSearchLine()); } // ======================================================================= diff --git a/tools/DFBrowser/DFBrowser_Window.hxx b/tools/DFBrowser/DFBrowser_Window.hxx index eb4459e105..5b1564ccaf 100644 --- a/tools/DFBrowser/DFBrowser_Window.hxx +++ b/tools/DFBrowser/DFBrowser_Window.hxx @@ -35,7 +35,6 @@ class DFBrowser_DumpView; class DFBrowser_Module; class DFBrowser_PropertyPanel; -class DFBrowser_Thread; class DFBrowser_TreeLevelLine; class ViewControl_MessageDialog; @@ -92,12 +91,12 @@ public: //! Fills controls of the plugin by parameters: //! - Find TDocStd_Application and fills OCAF tree model if it differs from the current application //! - Fine AIS_InteractiveObject and fills View if it if it differs from the current context - //! - If it is the first call, it creates module, start thread to cache application information, fills selection models + //! - If it is the first call, it creates module, fills selection models //! \param theParameters a parameters container Standard_EXPORT void Init (const NCollection_List& theParameters); //! Opens application by the name, it may be either OCAF document or STEP file. - //! Before opening it cleans tree view history, current selections, stop threads(if it was started), + //! Before opening it cleans tree view history, current selections, //! reset OCAF tree view model. After opening document, it fills all controls by the created application. //! \param theFileName a file name to be opened Standard_EXPORT void OpenFile (const TCollection_AsciiString& theFileName); @@ -108,9 +107,6 @@ public: //! Returns the current module DFBrowser_Module* GetModule() const { return myModule; } - //! Clears thread cache - Standard_EXPORT void ClearThreadCache(); - //! Returns tree level line control DFBrowser_TreeLevelLine* GetTreeLevelLine() const { return myTreeLevelLine; } @@ -126,7 +122,7 @@ public: private slots: - //! Cleans history in tree level line, clears cache of thread processing, starts threads for application + //! Cleans history in tree level line void onBeforeUpdateTreeModel(); //! Shows context menu for tree view selected item. It contains clear view or BREP operations items @@ -233,7 +229,6 @@ private: ViewControl_PropertyView* myPropertyView; //!< property control to display model item values if exist View_Window* myViewWindow; //!< V3d view to visualize presentations/references if it can be build for a selected item DFBrowser_DumpView* myDumpView; //!< Text editor where "Dump" method output is shown - DFBrowser_Thread* myThread; //!< Threads manipulator, starting thread items, listens finalizing ViewControl_MessageDialog* myExportToShapeViewDialog; //!< dialog about exporting TopoDS_Shape to ShapeView plugin Handle(TInspectorAPI_PluginParameters) myParameters; //!< contains application, context, files that should be opened QString myOpenedFileName; //!< cached name of opened file between parent is set, apply it by parent setting and nullify diff --git a/tools/DFBrowser/FILES b/tools/DFBrowser/FILES index 349918d9c3..d4d1f2b2cf 100644 --- a/tools/DFBrowser/FILES +++ b/tools/DFBrowser/FILES @@ -30,11 +30,6 @@ DFBrowser_SearchLineModel.cxx DFBrowser_SearchLineModel.hxx DFBrowser_SearchView.cxx DFBrowser_SearchView.hxx -DFBrowser_Thread.cxx -DFBrowser_Thread.hxx -DFBrowser_ThreadItem.hxx -DFBrowser_ThreadItemSearch.cxx -DFBrowser_ThreadItemSearch.hxx DFBrowser_Tools.cxx DFBrowser_Tools.hxx DFBrowser_TreeLevelLine.cxx From e639e9bcdc6b4215c22c0209abaa481a7aade6a4 Mon Sep 17 00:00:00 2001 From: kgv Date: Thu, 2 Sep 2021 09:03:55 +0300 Subject: [PATCH 029/639] 0032553: Configuration, CMake - unable to building with ActiveTcl Removed linkage with "tcl8.6.lib" with help of pragma lib specific to msvc. Tcl libraries should be configured as normal external dependencies via CSF_TclLibs by CMake and genproj, which is already done (information was duplicated). --- src/Draw/Draw.cxx | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/src/Draw/Draw.cxx b/src/Draw/Draw.cxx index 957aec927a..cb43f83d8e 100644 --- a/src/Draw/Draw.cxx +++ b/src/Draw/Draw.cxx @@ -43,18 +43,6 @@ #include -// on MSVC, use #pragma to define name of the Tcl library to link with, -// depending on Tcl version number -#ifdef _MSC_VER -// two helper macros are needed to convert version number macro to string literal -#define STRINGIZE1(a) #a -#define STRINGIZE2(a) STRINGIZE1(a) -#pragma comment (lib, "tcl" STRINGIZE2(TCL_MAJOR_VERSION) STRINGIZE2(TCL_MINOR_VERSION) ".lib") -#pragma comment (lib, "tk" STRINGIZE2(TCL_MAJOR_VERSION) STRINGIZE2(TCL_MINOR_VERSION) ".lib") -#undef STRINGIZE2 -#undef STRINGIZE1 -#endif - extern Standard_Boolean Draw_ParseFailed; Standard_EXPORT Draw_Viewer dout; From e21db5b80e7d9234c320b3d880d381b4b766bf23 Mon Sep 17 00:00:00 2001 From: kgv Date: Fri, 3 Sep 2021 15:22:22 +0300 Subject: [PATCH 030/639] 0030976: Configuration, CMake - Build failure with static FreeType dependency Removed linkage with "freetype.lib" with help of pragma lib specific to msvc. FreeType library should be configured as a normal external dependency via CSF_FreeType by CMake and genproj, which is already done (information was duplicated). --- src/Font/Font_FontMgr.cxx | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/Font/Font_FontMgr.cxx b/src/Font/Font_FontMgr.cxx index b9b2d47e8f..3e31c207eb 100644 --- a/src/Font/Font_FontMgr.cxx +++ b/src/Font/Font_FontMgr.cxx @@ -41,10 +41,6 @@ IMPLEMENT_STANDARD_RTTIEXT(Font_FontMgr,Standard_Transient) #include #include - #if defined(_MSC_VER) && defined(HAVE_FREETYPE) - #pragma comment (lib, "freetype.lib") - #endif - namespace { // list of supported extensions From 3016a390713d2e893f4bfa797882b9f0266840e1 Mon Sep 17 00:00:00 2001 From: mkrylova Date: Wed, 28 Jul 2021 09:32:34 +0300 Subject: [PATCH 031/639] 0032495: Coding rules - eliminate CLang UndefinedBehaviorSanitizer warnings - fixed CLang UndefinedBehaviorSanitizer warnings --- src/AdvApp2Var/AdvApp2Var_ApproxF2var.cxx | 123 +++++++++++----------- src/AdvApp2Var/AdvApp2Var_SysBase.cxx | 53 +++------- src/NCollection/NCollection_Array1.hxx | 7 +- 3 files changed, 78 insertions(+), 105 deletions(-) diff --git a/src/AdvApp2Var/AdvApp2Var_ApproxF2var.cxx b/src/AdvApp2Var/AdvApp2Var_ApproxF2var.cxx index c8595771a8..86f8b910de 100644 --- a/src/AdvApp2Var/AdvApp2Var_ApproxF2var.cxx +++ b/src/AdvApp2Var/AdvApp2Var_ApproxF2var.cxx @@ -3316,10 +3316,11 @@ int AdvApp2Var_ApproxF2var::mma2cdi_( integer *ndimen, integer ilong; intptr_t iofwr; doublereal* wrkar = 0; + doublereal* wrkar_off; integer iszwr; integer ibb, ier = 0; integer isz1, isz2, isz3, isz4; - intptr_t ipt1, ipt2, ipt3, ipt4; + intptr_t ipt1, ipt2, ipt3; @@ -3505,17 +3506,17 @@ int AdvApp2Var_ApproxF2var::mma2cdi_( integer *ndimen, if (ier > 0) { goto L9013; } - ipt1 = iofwr; - ipt2 = ipt1 + isz1; - ipt3 = ipt2 + isz2; - ipt4 = ipt3 + isz3; + wrkar_off = reinterpret_cast(iofwr * sizeof(double)); + ipt1 = isz1; + ipt2 = ipt1 + isz2; + ipt3 = ipt2 + isz3; if (*iordru >= 0 && *iordru <= 2) { /* --- Return 2*(IORDRU+1) coeff of 2*(IORDRU+1) polynoms of Hermite --- */ - AdvApp2Var_ApproxF2var::mma1her_(iordru, &wrkar[ipt1], iercod); + AdvApp2Var_ApproxF2var::mma1her_(iordru, wrkar_off, iercod); if (*iercod > 0) { goto L9100; } @@ -3523,10 +3524,10 @@ int AdvApp2Var_ApproxF2var::mma2cdi_( integer *ndimen, /* ---- Subract discretizations of polynoms of constraints ---- */ - mma2cd3_(ndimen, nbpntu, &urootl[1], nbpntv, iordru, &sotbu1[1], & - sotbu2[1], &ditbu1[1], &ditbu2[1], &wrkar[ipt3], &wrkar[ipt1], - &sosotb[sosotb_offset], &soditb[soditb_offset], &disotb[ - disotb_offset], &diditb[diditb_offset]); + mma2cd3_(ndimen, nbpntu, &urootl[1], nbpntv, iordru, &sotbu1[1], + &sotbu2[1], &ditbu1[1], &ditbu2[1], &wrkar_off[ipt2], wrkar_off, + &sosotb[sosotb_offset], &soditb[soditb_offset], + &disotb[disotb_offset], &diditb[diditb_offset]); } if (*iordrv >= 0 && *iordrv <= 2) { @@ -3534,7 +3535,7 @@ int AdvApp2Var_ApproxF2var::mma2cdi_( integer *ndimen, /* --- Return 2*(IORDRV+1) coeff of 2*(IORDRV+1) polynoms of Hermite --- */ - AdvApp2Var_ApproxF2var::mma1her_(iordrv, &wrkar[ipt2], iercod); + AdvApp2Var_ApproxF2var::mma1her_(iordrv, &wrkar_off[ipt1], iercod); if (*iercod > 0) { goto L9100; } @@ -3542,10 +3543,10 @@ int AdvApp2Var_ApproxF2var::mma2cdi_( integer *ndimen, /* ---- Subtract discretisations of polynoms of constraint ---- */ - mma2cd2_(ndimen, nbpntu, nbpntv, &vrootl[1], iordrv, &sotbv1[1], & - sotbv2[1], &ditbv1[1], &ditbv2[1], &wrkar[ipt4], &wrkar[ipt2], - &sosotb[sosotb_offset], &soditb[soditb_offset], &disotb[ - disotb_offset], &diditb[diditb_offset]); + mma2cd2_(ndimen, nbpntu, nbpntv, &vrootl[1], iordrv, &sotbv1[1], + &sotbv2[1], &ditbv1[1], &ditbv2[1], &wrkar_off[ipt3], &wrkar_off[ipt1], + &sosotb[sosotb_offset], &soditb[soditb_offset], + &disotb[disotb_offset], &diditb[diditb_offset]); } /* --------------- Subtract constraints of corners ---------------- @@ -3553,11 +3554,11 @@ int AdvApp2Var_ApproxF2var::mma2cdi_( integer *ndimen, if (*iordru >= 0 && *iordrv >= 0) { mma2cd1_(ndimen, nbpntu, &urootl[1], nbpntv, &vrootl[1], iordru, - iordrv, &contr1[contr1_offset], &contr2[contr2_offset], & - contr3[contr3_offset], &contr4[contr4_offset], &wrkar[ipt3], & - wrkar[ipt4], &wrkar[ipt1], &wrkar[ipt2], &sosotb[ - sosotb_offset], &soditb[soditb_offset], &disotb[disotb_offset] - , &diditb[diditb_offset]); + iordrv, &contr1[contr1_offset], &contr2[contr2_offset], + &contr3[contr3_offset], &contr4[contr4_offset], &wrkar_off[ipt2], + &wrkar_off[ipt3], wrkar_off, &wrkar_off[ipt1], + &sosotb[sosotb_offset], &soditb[soditb_offset], + &disotb[disotb_offset], &diditb[diditb_offset]); } goto L9999; @@ -3630,10 +3631,11 @@ int AdvApp2Var_ApproxF2var::mma2ce1_(integer *numdec, logical ldbg; intptr_t iofwr; doublereal* wrkar = 0; + doublereal* wrkar_off; integer iszwr; integer ier; integer isz1, isz2, isz3, isz4, isz5, isz6, isz7; - intptr_t ipt1, ipt2, ipt3, ipt4, ipt5, ipt6, ipt7; + intptr_t ipt1, ipt2, ipt3, ipt4, ipt5, ipt6; @@ -3796,25 +3798,25 @@ int AdvApp2Var_ApproxF2var::mma2ce1_(integer *numdec, iszwr = isz1 + isz2 + isz3 + isz4 + isz5 + isz6 + isz7; AdvApp2Var_SysBase anAdvApp2Var_SysBase; anAdvApp2Var_SysBase.mcrrqst_(&c__8, &iszwr, wrkar, &iofwr, &ier); + wrkar_off = reinterpret_cast (iofwr * sizeof(double)); if (ier > 0) { goto L9013; } - ipt1 = iofwr; - ipt2 = ipt1 + isz1; - ipt3 = ipt2 + isz2; - ipt4 = ipt3 + isz3; - ipt5 = ipt4 + isz4; - ipt6 = ipt5 + isz5; - ipt7 = ipt6 + isz6; + ipt1 = isz1; + ipt2 = ipt1 + isz2; + ipt3 = ipt2 + isz3; + ipt4 = ipt3 + isz4; + ipt5 = ipt4 + isz5; + ipt6 = ipt5 + isz6; /* ----------------- Return Gauss coefficients of integration ---------------- */ - AdvApp2Var_ApproxF2var::mmapptt_(ndjacu, nbpntu, iordru, &wrkar[ipt1], iercod); + AdvApp2Var_ApproxF2var::mmapptt_(ndjacu, nbpntu, iordru, wrkar_off, iercod); if (*iercod > 0) { goto L9999; } - AdvApp2Var_ApproxF2var::mmapptt_(ndjacv, nbpntv, iordrv, &wrkar[ipt2], iercod); + AdvApp2Var_ApproxF2var::mmapptt_(ndjacv, nbpntv, iordrv, &wrkar_off[ipt1], iercod); if (*iercod > 0) { goto L9999; } @@ -3822,18 +3824,18 @@ int AdvApp2Var_ApproxF2var::mma2ce1_(integer *numdec, /* ------------------- Return max polynoms of Jacobi ------------ */ - AdvApp2Var_ApproxF2var::mma2jmx_(ndjacu, iordru, &wrkar[ipt5]); - AdvApp2Var_ApproxF2var::mma2jmx_(ndjacv, iordrv, &wrkar[ipt6]); + AdvApp2Var_ApproxF2var::mma2jmx_(ndjacu, iordru, &wrkar_off[ipt5]); + AdvApp2Var_ApproxF2var::mma2jmx_(ndjacv, iordrv, &wrkar_off[ipt5]); /* ------ Calculate the coefficients and their contribution to the error ---- */ mma2ce2_(numdec, ndimen, nbsesp, &ndimse[1], ndminu, ndminv, ndguli, - ndgvli, ndjacu, ndjacv, iordru, iordrv, nbpntu, nbpntv, &epsapr[1] - , &sosotb[sosotb_offset], &disotb[disotb_offset], &soditb[ - soditb_offset], &diditb[diditb_offset], &wrkar[ipt1], &wrkar[ipt2] - , &wrkar[ipt5], &wrkar[ipt6], &wrkar[ipt7], &wrkar[ipt3], &wrkar[ - ipt4], &patjac[patjac_offset], &errmax[1], &errmoy[1], ndegpu, + ndgvli, ndjacu, ndjacv, iordru, iordrv, nbpntu, nbpntv, &epsapr[1], + &sosotb[sosotb_offset], &disotb[disotb_offset], &soditb[soditb_offset], + &diditb[diditb_offset], wrkar_off, &wrkar_off[ipt1], + &wrkar_off[ipt4], &wrkar_off[ipt5], &wrkar_off[ipt6], &wrkar_off[ipt2], + &wrkar_off[ipt3], &patjac[patjac_offset], &errmax[1], &errmoy[1], ndegpu, ndegpv, itydec, iercod); if (*iercod > 0) { goto L9999; @@ -6167,6 +6169,7 @@ int AdvApp2Var_ApproxF2var::mma2fnc_(integer *ndimen, integer ideb1, ibid1, ibid2, ncfja, ndgre, ilong, ndwrk; doublereal* wrkar = 0; + doublereal* wrkar_off; integer nupil; intptr_t iofwr; doublereal uvpav[4] /* was [2][2] */; @@ -6177,7 +6180,7 @@ int AdvApp2Var_ApproxF2var::mma2fnc_(integer *ndimen, integer ncb1; doublereal eps3; integer isz1, isz2, isz3, isz4, isz5; - intptr_t ipt1, ipt2, ipt3, ipt4, ipt5,iptt, jptt; + intptr_t ipt1, ipt2, ipt3, ipt4,iptt, jptt; /* ********************************************************************** */ @@ -6427,19 +6430,19 @@ int AdvApp2Var_ApproxF2var::mma2fnc_(integer *ndimen, ndwrk = isz1 + isz2 + isz3 + isz4 + isz5; anAdvApp2Var_SysBase.mcrrqst_(&c__8, &ndwrk, wrkar, &iofwr, &ier); + wrkar_off = reinterpret_cast(iofwr * sizeof(double)); if (ier > 0) { goto L9013; } /* --> For the parameters of discretisation (NBROOT+2 extremities). */ - ipt1 = iofwr; /* --> For the points of discretisation FPNTAB(NDIMEN,NBROOT+2), */ /* FPNTAB(NBROOT,2*(IORDRE+1)) and for WRKAR of MMAPCMP. */ - ipt2 = ipt1 + isz1; + ipt1 = isz1; /* --> For the polynoms of Hermit */ - ipt3 = ipt2 + isz2; + ipt2 = ipt1 + isz2; /* --> For the Gauss coeff of integration. */ - ipt4 = ipt3 + isz3; + ipt3 = ipt2 + isz3; /* --> For the curve in Jacobi. */ - ipt5 = ipt4 + isz4; + ipt4 = ipt3 + isz4; /* ------------------ Initialisation of management of cuts --------- */ @@ -6485,15 +6488,15 @@ int AdvApp2Var_ApproxF2var::mma2fnc_(integer *ndimen, /* -------------------- Normalization of parameters -------------------- */ - mma1nop_(nbroot, &rootlg[1], uvpav, isofav, &wrkar[ipt1], &ier); + mma1nop_(nbroot, &rootlg[1], uvpav, isofav, wrkar_off, &ier); if (ier > 0) { goto L9100; } /* -------------------- Discretisation of FONCNP ------------------------ */ - mma1fdi_(ndimen, uvpav, foncnp, isofav, tconst, nbroot, &wrkar[ipt1], - iordre, ideriv, &wrkar[ipt2], &somtab[(ncb1 * somtab_dim2 + 1) * + mma1fdi_(ndimen, uvpav, foncnp, isofav, tconst, nbroot, wrkar_off, + iordre, ideriv, &wrkar_off[ipt1], &somtab[(ncb1 * somtab_dim2 + 1) * somtab_dim1], &diftab[(ncb1 * diftab_dim2 + 1) * diftab_dim1], & contr1[(ncb1 * contr1_dim2 + 1) * contr1_dim1 + 1], &contr2[(ncb1 * contr2_dim2 + 1) * contr2_dim1 + 1], iercod); @@ -6508,7 +6511,7 @@ int AdvApp2Var_ApproxF2var::mma2fnc_(integer *ndimen, contr1_dim2 + 1) * contr1_dim1 + 1], &contr2[(ncb1 * contr2_dim2 + 1) * contr2_dim1 + 1], &somtab[(ncb1 * somtab_dim2 + 1) * somtab_dim1], &diftab[(ncb1 * diftab_dim2 - + 1) * diftab_dim1], &wrkar[ipt2], &wrkar[ipt3], &ier); + + 1) * diftab_dim1], &wrkar_off[ipt1], &wrkar_off[ipt2], &ier); if (ier > 0) { goto L9100; } @@ -6522,8 +6525,8 @@ int AdvApp2Var_ApproxF2var::mma2fnc_(integer *ndimen, */ mma1jak_(ndimen, nbroot, iordre, ndgjac, &somtab[(ncb1 * somtab_dim2 + 1) - * somtab_dim1], &diftab[(ncb1 * diftab_dim2 + 1) * diftab_dim1], & - wrkar[ipt4], &wrkar[ipt5], &ier); + * somtab_dim1], &diftab[(ncb1 * diftab_dim2 + 1) * diftab_dim1], + &wrkar_off[ipt3], &wrkar_off[ipt4], &ier); if (ier > 0) { goto L9100; } @@ -6538,7 +6541,7 @@ int AdvApp2Var_ApproxF2var::mma2fnc_(integer *ndimen, if (*iordre >= 0) { mma1cnt_(ndimen, iordre, &contr1[(ncb1 * contr1_dim2 + 1) * contr1_dim1 + 1], &contr2[(ncb1 * contr2_dim2 + 1) * - contr2_dim1 + 1], &wrkar[ipt3], ndgjac, &wrkar[ipt5]); + contr2_dim1 + 1], &wrkar_off[ipt2], ndgjac, &wrkar_off[ipt4]); } /* ********************************************************************** @@ -6548,8 +6551,8 @@ int AdvApp2Var_ApproxF2var::mma2fnc_(integer *ndimen, /* ********************************************************************** */ - mma1fer_(ndimen, nbsesp, &ndimse[1], iordre, ndgjac, &wrkar[ipt5], ncflim, - &epsapr[1], &wrkar[ipt2], &errmax[ncb1 * errmax_dim1 + 1], & + mma1fer_(ndimen, nbsesp, &ndimse[1], iordre, ndgjac, &wrkar_off[ipt4], ncflim, + &epsapr[1], &wrkar_off[ipt1], &errmax[ncb1 * errmax_dim1 + 1], & errmoy[ncb1 * errmoy_dim1 + 1], &ncoeff[ncb1], &ier); if (ier > 0) { goto L9100; @@ -6577,26 +6580,26 @@ int AdvApp2Var_ApproxF2var::mma2fnc_(integer *ndimen, AdvApp2Var_MathBase::mmapcmp_((integer*)ndimen, &ncfja, &ncoeff[ncb1], - &wrkar[ipt5], - &wrkar[ipt2]); + &wrkar_off[ipt4], + &wrkar_off[ipt1]); /*pkv t*/ ilong = *ndimen * *ncflim; - AdvApp2Var_SysBase::mvriraz_(&ilong, &wrkar[ipt5]); + AdvApp2Var_SysBase::mvriraz_(&ilong, &wrkar_off[ipt4]); /* -> Passage to canonic base (-1,1) (result in WRKAR(IPT5)). */ ndgre = ncoeff[ncb1] - 1; i__1 = *ndimen; for (nd = 1; nd <= i__1; ++nd) { - iptt = ipt2 + ((nd - 1) << 1) * (ndgre / 2 + 1); - jptt = ipt5 + (nd - 1) * ncoeff[ncb1]; - AdvApp2Var_MathBase::mmjacan_(iordre, &ndgre, &wrkar[iptt], &wrkar[jptt]); + iptt = ipt1 + ((nd - 1) << 1) * (ndgre / 2 + 1); + jptt = ipt4 + (nd - 1) * ncoeff[ncb1]; + AdvApp2Var_MathBase::mmjacan_(iordre, &ndgre, &wrkar_off[iptt], &wrkar_off[jptt]); /* L400: */ } /* -> Store the calculated curve */ ibid1 = 1; - AdvApp2Var_MathBase::mmfmca8_(&ncoeff[ncb1], ndimen, &ibid1, ncflim, ndimen, &ibid1, & - wrkar[ipt5], &courbe[(ncb1 * courbe_dim2 + 1) * courbe_dim1 + + AdvApp2Var_MathBase::mmfmca8_(&ncoeff[ncb1], ndimen, &ibid1, ncflim, ndimen, &ibid1, + &wrkar_off[ipt4], &courbe[(ncb1 * courbe_dim2 + 1) * courbe_dim1 + 1]); /* -> Before normalization of constraints on (-1,1), recalculate */ diff --git a/src/AdvApp2Var/AdvApp2Var_SysBase.cxx b/src/AdvApp2Var/AdvApp2Var_SysBase.cxx index ec648a0779..6d6a283453 100644 --- a/src/AdvApp2Var/AdvApp2Var_SysBase.cxx +++ b/src/AdvApp2Var/AdvApp2Var_SysBase.cxx @@ -115,11 +115,6 @@ int mcrgetv_(integer *sz, intptr_t *iad, integer *ier); -static -int mcrlocv_(void* t, - intptr_t *l); - - static struct { integer lec, imp, keyb, mae, jscrn, itblt, ibb; } mblank__; @@ -383,9 +378,6 @@ int AdvApp2Var_SysBase::macrchk_() /* Local variables */ integer i__, j; - intptr_t ioff; - doublereal* t = 0; - intptr_t loc; /* *********************************************************************** */ @@ -469,8 +461,6 @@ int AdvApp2Var_SysBase::macrchk_() /* ----------------------------------------------------------------------* */ -/* CALCULATE ADDRESS OF T */ - mcrlocv_(t, &loc); /* CONTROL OF FLAGS IN THE TABLE */ i__1 = mcrgene_.ncore; for (i__ = 0; i__ < i__1; ++i__) { @@ -481,10 +471,9 @@ int AdvApp2Var_SysBase::macrchk_() intptr_t* pp = p + j; if (*pp != -1) { - ioff = (*pp - loc) / 8; - - if (t[ioff] != -134744073.) { - + double* t = reinterpret_cast(*pp); + if (*t != -134744073.) + { /* MSG : '*** ERREUR : REMOVAL FROM MEMORY OF ADDRESS E:',ICORE(J,I) */ /* AND OF RANK ICORE(12,I) */ @@ -727,10 +716,7 @@ int macrgfl_(intptr_t *iadfld, char cbid[1] = {}; integer ibid, ienr; - doublereal* t = 0; integer novfl = 0; - intptr_t ioff,iadt; - /* *********************************************************************** */ @@ -824,27 +810,25 @@ int macrgfl_(intptr_t *iadfld, ifois = 1; } - /* CALCULATE THE ADDRESS OF T */ - mcrlocv_(t, &iadt); - + /* CALCULATE THE OFFSET */ - ioff = (*iadfld - iadt) / 8; + double* t = reinterpret_cast(*iadfld); /* SET TO OVERFLOW OF THE USER ZONE IN CASE OF PRODUCTION VERSION */ if (*iphase == 1 && novfl == 0) { ienr = *iznuti / 8; - maoverf_(&ienr, &t[ioff + 1]); + maoverf_(&ienr, &t[1]); } /* UPDATE THE START FLAG */ - t[ioff] = -134744073.; + *t = -134744073.; /* FAKE CALL TO STOP THE DEBUGGER : */ macrbrk_(); /* UPDATE THE START FLAG */ - ioff = (*iadflf - iadt) / 8; - t[ioff] = -134744073.; + t = reinterpret_cast(*iadflf); + *t = -134744073.; /* FAKE CALL TO STOP THE DEBUGGER : */ macrbrk_(); @@ -2076,7 +2060,7 @@ int mcrcomm_(integer *kop, itab[(i__ << 2) - 4] = *noct / 8 + 1; itab[(i__ << 2) - 3] = ipre; itab[(i__ << 2) - 2] = *noct; - mcrlocv_(&dtab[ipre - 1], iadr); + *iadr = reinterpret_cast (&dtab[ipre - 1]); itab[(i__ << 2) - 1] = *iadr; goto L9900; } @@ -2270,7 +2254,7 @@ int AdvApp2Var_SysBase::mcrdelt_(integer *iunit, /* SEARCH IN MCRGENE */ n = -1; - mcrlocv_(t, &loc); + loc = reinterpret_cast (t); for (i__ = mcrgene_.ncore - 1; i__ >= 0; --i__) { if (*iunit == mcrgene_.icore[i__].unit && *isize == @@ -2670,19 +2654,6 @@ int AdvApp2Var_SysBase::mcrlist_(integer *ier) const return 0 ; } /* mcrlist_ */ - -//======================================================================= -//function : mcrlocv_ -//purpose : -//======================================================================= -int mcrlocv_(void* t, - intptr_t *l) - -{ - *l = reinterpret_cast (t); - return 0 ; -} - //======================================================================= //function : AdvApp2Var_SysBase::mcrrqst_ //purpose : @@ -2888,7 +2859,7 @@ int AdvApp2Var_SysBase::mcrrqst_(integer *iunit, /* . add delta for alinement with the base */ /* . round to multiple of 8 above */ - mcrlocv_(t, &loc); + loc = reinterpret_cast (t); izu = ibyte + loc % *iunit; irest = izu % 8; if (irest != 0) { diff --git a/src/NCollection/NCollection_Array1.hxx b/src/NCollection/NCollection_Array1.hxx index ce020eb035..97718aedb2 100644 --- a/src/NCollection/NCollection_Array1.hxx +++ b/src/NCollection/NCollection_Array1.hxx @@ -390,11 +390,10 @@ public: const Standard_Boolean theToCopyData) { Standard_RangeError_Raise_if (theUpper < theLower, "NCollection_Array1::Resize"); - const Standard_Integer anOldLen = Length(); - const Standard_Integer aNewLen = theUpper - theLower + 1; - const Standard_Integer aLowerOld = myLowerBound; + const Standard_Integer anOldLen = Length(); + const Standard_Integer aNewLen = theUpper - theLower + 1; - TheItemType* aBeginOld = &myData[aLowerOld]; + TheItemType* aBeginOld = myData != NULL ? &myData[myLowerBound] : NULL; myLowerBound = theLower; myUpperBound = theUpper; if (aNewLen == anOldLen) From 9443cf8ec48fdc138ad5359b5adc7dbddcf617ca Mon Sep 17 00:00:00 2001 From: dpasukhi Date: Fri, 3 Sep 2021 14:42:02 +0300 Subject: [PATCH 032/639] 0032556: Data Exchange - A toroidal part of solid is corrupted while writing or reading STEP file Fix STEP writing Wire for periodic surface --- .../TopoDSToStep_MakeStepWire.cxx | 4 +-- tests/bugs/step/bug25989 | 2 -- tests/bugs/step/bug32556 | 30 +++++++++++++++++++ 3 files changed, 32 insertions(+), 4 deletions(-) create mode 100644 tests/bugs/step/bug32556 diff --git a/src/TopoDSToStep/TopoDSToStep_MakeStepWire.cxx b/src/TopoDSToStep/TopoDSToStep_MakeStepWire.cxx index b5176d2d7f..5ee5a6e124 100644 --- a/src/TopoDSToStep/TopoDSToStep_MakeStepWire.cxx +++ b/src/TopoDSToStep/TopoDSToStep_MakeStepWire.cxx @@ -197,8 +197,8 @@ void TopoDSToStep_MakeStepWire::Init(const TopoDS_Wire& aWire, //#11 ItW.Init(ForwardWire, aTool.CurrentFace()); //#11 for (;ItW.More();ItW.Next()) { - Handle(ShapeFix_Wire) STW = new ShapeFix_Wire; - STW->Load (ForwardWire); + Handle(ShapeFix_Wire) STW = + new ShapeFix_Wire(ForwardWire, aTool.CurrentFace(), Precision::Confusion()); STW->FixReorder(); Handle(ShapeExtend_WireData) sbwd = STW->WireData(); Standard_Integer nb = sbwd->NbEdges(); diff --git a/tests/bugs/step/bug25989 b/tests/bugs/step/bug25989 index efcc5f47a1..4d4651ed1e 100644 --- a/tests/bugs/step/bug25989 +++ b/tests/bugs/step/bug25989 @@ -1,5 +1,3 @@ -puts "TODO OCC25989 ALL: Error : The volume of result shape is" - puts "========" puts "OCC25989" puts "========" diff --git a/tests/bugs/step/bug32556 b/tests/bugs/step/bug32556 new file mode 100644 index 0000000000..05aba8e6c8 --- /dev/null +++ b/tests/bugs/step/bug32556 @@ -0,0 +1,30 @@ +puts "========================" +puts "0032556: Data Exchange - A toroidal part of solid is corrupted while writing or reading STEP file" +puts "========================" + +# Create fused shape +ptorus a1 5 3 +plane pp 5 0 -5 +pcylinder a2 pp 2 10 +bfuse a a1 a2 + +# Write fused shape +testwritestep ${imagedir}/${casename}.stp a +# Read fused shape +testreadstep ${imagedir}/${casename}.stp res + +file delete ${imagedir}/${casename}.stp + +# Check fused shape +checkshape res f +checknbshapes res -edge 12 -vertex 7 +checkprops res -s 649.9 + +# Display result fused shape +clear +smallview +donly res +isos res 0 +fit +isos res 2 +checkview -screenshot -2d -path ${imagedir}/${test_image}.png From 632deee0b066a3ab17154a093875d8a05c13b518 Mon Sep 17 00:00:00 2001 From: vro Date: Wed, 1 Sep 2021 11:47:41 +0300 Subject: [PATCH 033/639] 0032125: Application Framework, OCAF - need to have adequate message if document cannot be saved due to unrecognized format A list of storage statuses (PCDM_StoreStatus) is extended for PCDM_SS_UnrecognizedFormat. It is set if - extension of a document file name is not defined (the extension doesn't correspond to any declared file formats) or - a storage driver is not found for the document storage format. Modified: CDF_StoreList.cxx: the mechanism of raising and catching exceptions is replaced by direct setting the status and error message for each particular error. PCDM_StoreStatus.hxx: a new enumeration value is added - PCDM_SS_UnrecognizedFormat. Also, a short explanation is added to each enumeration value. DDocStd_ApplicationCommands.cxx: processing of a new enumeration value by the draw-command. XDEDRAW.cxx: processed a new enumeration value PCDM_SS_UnrecognizedFormat by saveDoc draw-command. Deleted: CDF_MetaDataDriverError.hxx: It is not used anywhere and it seems it will not be used by someone. --- src/CDF/CDF_MetaDataDriverError.hxx | 41 ----------- src/CDF/CDF_StoreList.cxx | 102 ++++++++++++++-------------- src/CDF/FILES | 1 - src/PCDM/PCDM_StoreStatus.hxx | 21 +++--- src/TDocStd/TDocStd_Application.cxx | 4 +- src/XDEDRAW/XDEDRAW.cxx | 3 + 6 files changed, 69 insertions(+), 103 deletions(-) delete mode 100644 src/CDF/CDF_MetaDataDriverError.hxx diff --git a/src/CDF/CDF_MetaDataDriverError.hxx b/src/CDF/CDF_MetaDataDriverError.hxx deleted file mode 100644 index 4b9e173d23..0000000000 --- a/src/CDF/CDF_MetaDataDriverError.hxx +++ /dev/null @@ -1,41 +0,0 @@ -// Created on: 1997-08-07 -// Created by: Jean-Louis Frenkel -// 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 _CDF_MetaDataDriverError_HeaderFile -#define _CDF_MetaDataDriverError_HeaderFile - -#include -#include -#include -#include - -//! This exception is used in the deferred methods. -//! Programmer implementing such methods may use this -//! exception or any exception inheriting MetaDataDriverError. - -class CDF_MetaDataDriverError; -DEFINE_STANDARD_HANDLE(CDF_MetaDataDriverError, Standard_Failure) - -#if !defined No_Exception && !defined No_CDF_MetaDataDriverError - #define CDF_MetaDataDriverError_Raise_if(CONDITION, MESSAGE) \ - if (CONDITION) throw CDF_MetaDataDriverError(MESSAGE); -#else - #define CDF_MetaDataDriverError_Raise_if(CONDITION, MESSAGE) -#endif - -DEFINE_STANDARD_EXCEPTION(CDF_MetaDataDriverError, Standard_Failure) - -#endif // _CDF_MetaDataDriverError_HeaderFile diff --git a/src/CDF/CDF_StoreList.cxx b/src/CDF/CDF_StoreList.cxx index 5ef2668fb6..e8b44c3a86 100644 --- a/src/CDF/CDF_StoreList.cxx +++ b/src/CDF/CDF_StoreList.cxx @@ -17,7 +17,6 @@ #include #include -#include #include #include #include @@ -25,8 +24,6 @@ #include #include #include -#include -#include #include IMPLEMENT_STANDARD_RTTIEXT(CDF_StoreList,Standard_Transient) @@ -77,62 +74,65 @@ PCDM_StoreStatus CDF_StoreList::Store (Handle(CDM_MetaData)& aMetaData, TCollection_ExtendedString& aStatusAssociatedText, const Message_ProgressRange& theRange) { - Handle(CDF_MetaDataDriver) theMetaDataDriver = Handle(CDF_Application)::DownCast((myMainDocument->Application()))->MetaDataDriver(); - PCDM_StoreStatus status = PCDM_SS_OK; + Handle(CDF_MetaDataDriver) theMetaDataDriver = Handle(CDF_Application)::DownCast ((myMainDocument->Application()))->MetaDataDriver(); + for (; !myStack.IsEmpty(); myStack.RemoveFirst()) { - try { - OCC_CATCH_SIGNALS - for (; !myStack.IsEmpty(); myStack.RemoveFirst()) { - - Handle(CDM_Document) theDocument = myStack.First(); - if( theDocument == myMainDocument || theDocument->IsModified()) { - - Handle(CDF_Application) anApp = Handle(CDF_Application)::DownCast (theDocument->Application()); - if (anApp.IsNull()) - { - throw Standard_Failure("Document has no application, cannot save!"); - } - Handle(PCDM_StorageDriver) aDocumentStorageDriver = - anApp->WriterFromFormat(theDocument->StorageFormat()); + Handle(CDM_Document) theDocument = myStack.First(); + if (theDocument == myMainDocument || theDocument->IsModified()) + { + try + { + OCC_CATCH_SIGNALS + Handle(CDF_Application) anApp = Handle(CDF_Application)::DownCast (theDocument->Application()); + if (anApp.IsNull()) + { + aStatusAssociatedText = "driver failed; reason: "; + aStatusAssociatedText += "document has no application, cannot save!"; + status = PCDM_SS_Failure; + } + else + { + Handle(PCDM_StorageDriver) aDocumentStorageDriver = anApp->WriterFromFormat(theDocument->StorageFormat()); if (aDocumentStorageDriver.IsNull()) { - Standard_SStream aMsg; - aMsg <<"No storage driver does exist for this format: " << theDocument->StorageFormat() << (char)0; - throw Standard_Failure(aMsg.str().c_str()); - } - - // Reset the store-status. - // It has sense in multi-threaded access to the storage driver - this way we reset the status for each call. - aDocumentStorageDriver->SetStoreStatus(PCDM_SS_OK); - - if(!theMetaDataDriver->FindFolder(theDocument->RequestedFolder())) { - Standard_SStream aMsg; aMsg << "could not find the active dbunit"; - aMsg << TCollection_ExtendedString(theDocument->RequestedFolder())<< (char)0; - throw Standard_NoSuchObject(aMsg.str().c_str()); + aStatusAssociatedText = "driver not found; reason: no storage driver does exist for this format: "; + aStatusAssociatedText += theDocument->StorageFormat(); + status = PCDM_SS_UnrecognizedFormat; } - TCollection_ExtendedString theName=theMetaDataDriver->BuildFileName(theDocument); - - aDocumentStorageDriver->Write(theDocument, theName, theRange); - status = aDocumentStorageDriver->GetStoreStatus(); - aMetaData = theMetaDataDriver->CreateMetaData(theDocument,theName); - theDocument->SetMetaData(aMetaData); - - CDM_ReferenceIterator it(theDocument); - for(; it.More();it.Next()) { - theMetaDataDriver->CreateReference(aMetaData,it.Document()->MetaData(),it.ReferenceIdentifier(),it.DocumentVersion()); + else + { + // Reset the store-status. + // It has sense in multi-threaded access to the storage driver - this way we reset the status for each call. + aDocumentStorageDriver->SetStoreStatus(PCDM_SS_OK); + + if (!theMetaDataDriver->FindFolder(theDocument->RequestedFolder())) + { + aStatusAssociatedText = "driver not found; reason: "; + aStatusAssociatedText += "could not find the active dbunit "; + aStatusAssociatedText += theDocument->RequestedFolder(); + status = PCDM_SS_UnrecognizedFormat; + } + else + { + TCollection_ExtendedString theName = theMetaDataDriver->BuildFileName (theDocument); + aDocumentStorageDriver->Write (theDocument, theName, theRange); + status = aDocumentStorageDriver->GetStoreStatus(); + aMetaData = theMetaDataDriver->CreateMetaData (theDocument, theName); + theDocument->SetMetaData (aMetaData); + + CDM_ReferenceIterator it (theDocument); + for (; it.More(); it.Next()) + theMetaDataDriver->CreateReference (aMetaData, it.Document()->MetaData(), it.ReferenceIdentifier(), it.DocumentVersion()); + } } } } - } - - catch (CDF_MetaDataDriverError const& anException) { - CAUGHT(anException, aStatusAssociatedText, TCollection_ExtendedString("metadatadriver failed; reason:")); - status = PCDM_SS_DriverFailure; - } - catch (Standard_Failure const& anException) { - CAUGHT(anException, aStatusAssociatedText, TCollection_ExtendedString("driver failed; reason:")); - status = PCDM_SS_Failure; + catch (Standard_Failure const& anException) + { + CAUGHT (anException, aStatusAssociatedText, TCollection_ExtendedString ("driver failed; reason: ")); + status = PCDM_SS_DriverFailure; + } } } diff --git a/src/CDF/FILES b/src/CDF/FILES index 1bdfb4dd53..fdf055df2c 100755 --- a/src/CDF/FILES +++ b/src/CDF/FILES @@ -8,7 +8,6 @@ CDF_FWOSDriver.cxx CDF_FWOSDriver.hxx CDF_MetaDataDriver.cxx CDF_MetaDataDriver.hxx -CDF_MetaDataDriverError.hxx CDF_MetaDataDriverFactory.cxx CDF_MetaDataDriverFactory.hxx CDF_Store.cxx diff --git a/src/PCDM/PCDM_StoreStatus.hxx b/src/PCDM/PCDM_StoreStatus.hxx index cd0e56354c..ed6c50abed 100644 --- a/src/PCDM/PCDM_StoreStatus.hxx +++ b/src/PCDM/PCDM_StoreStatus.hxx @@ -17,17 +17,20 @@ #ifndef _PCDM_StoreStatus_HeaderFile #define _PCDM_StoreStatus_HeaderFile - +//! Status of storage of a document on disk. +//! If it is PCDM_SS_OK, the document is successfully saved on disk. +//! Else - there is an error. enum PCDM_StoreStatus { -PCDM_SS_OK, -PCDM_SS_DriverFailure, -PCDM_SS_WriteFailure, -PCDM_SS_Failure, -PCDM_SS_Doc_IsNull, -PCDM_SS_No_Obj, -PCDM_SS_Info_Section_Error, -PCDM_SS_UserBreak +PCDM_SS_OK, //!< Document is saved successfully +PCDM_SS_DriverFailure, //!< Storage driver is not found +PCDM_SS_WriteFailure, //!< Attempt to write a file on disk failed +PCDM_SS_Failure, //!< A general error occurred (unexpected) +PCDM_SS_Doc_IsNull, //!< Attempt to save a null document +PCDM_SS_No_Obj, //!< Document has no objects to be saved +PCDM_SS_Info_Section_Error, //!< Error occured on writing of an information-section +PCDM_SS_UserBreak, //!< User interrupted the process of storage of the document on disk +PCDM_SS_UnrecognizedFormat //!< No storage driver exist for this document format }; #endif // _PCDM_StoreStatus_HeaderFile diff --git a/src/TDocStd/TDocStd_Application.cxx b/src/TDocStd/TDocStd_Application.cxx index 7c1d347f21..d172b0228f 100644 --- a/src/TDocStd/TDocStd_Application.cxx +++ b/src/TDocStd/TDocStd_Application.cxx @@ -383,8 +383,10 @@ PCDM_StoreStatus TDocStd_Application::SaveAs (const Handle(TDocStd_Document)& th MessageDriver()->Send(aString.ToExtString(), Message_Fail); } } - if(storer.StoreStatus() == PCDM_SS_OK) + if (storer.StoreStatus() == PCDM_SS_OK) theDoc->SetSaved(); + else if (!MessageDriver().IsNull()) + MessageDriver()->Send (storer.AssociatedStatusText(), Message_Fail); #ifdef OCCT_DEBUG std::cout<<"TDocStd_Application::SaveAs(): The status = "<StorageFormat() << "\n"; + break; } return 0; From d03c08988c259682fbcb21a908bb25d5b6a3d5b4 Mon Sep 17 00:00:00 2001 From: akaftasev Date: Wed, 1 Sep 2021 12:48:54 +0300 Subject: [PATCH 034/639] 0021264: Modeling Algorithms - Progress indicator for Boolean operations Update BOP commands to use progress indicator Deleted wrong usage of progress indicator from bop operations Added UserBreak() method to break execution boolean operation if progress indicator is used Added method AnalyzeProgress() to calculate steps of progress indicator Introduce BOPAlgo_ParallelAlgo which has myRange as a field to be used in parallel vector. Provide suitable way of keeping the progress steps of operations. Give meaningful names to progress scopes. Propagate progress indicator into deeper methods of BOA. Add progress indicator to BOPAlgo_BuilderFace and BOPAlgo_WireSplitter, BOPAlgo_BuilderSolid and BOPAlgo_ShellSplitter --- dox/upgrade/upgrade.md | 10 + src/BOPAlgo/BOPAlgo_Alerts.hxx | 3 + src/BOPAlgo/BOPAlgo_Algo.cxx | 66 +++++ src/BOPAlgo/BOPAlgo_Algo.hxx | 101 ++++++- src/BOPAlgo/BOPAlgo_ArgumentAnalyzer.cxx | 72 +++-- src/BOPAlgo/BOPAlgo_ArgumentAnalyzer.hxx | 4 +- src/BOPAlgo/BOPAlgo_BOP.cxx | 125 +++++++-- src/BOPAlgo/BOPAlgo_BOP.hxx | 25 +- src/BOPAlgo/BOPAlgo_Builder.cxx | 171 +++++++++--- src/BOPAlgo/BOPAlgo_Builder.hxx | 136 +++++++--- src/BOPAlgo/BOPAlgo_BuilderArea.hxx | 8 +- src/BOPAlgo/BOPAlgo_BuilderFace.cxx | 104 +++++--- src/BOPAlgo/BOPAlgo_BuilderFace.hxx | 25 +- src/BOPAlgo/BOPAlgo_BuilderSolid.cxx | 98 +++++-- src/BOPAlgo/BOPAlgo_BuilderSolid.hxx | 10 +- src/BOPAlgo/BOPAlgo_Builder_1.cxx | 34 ++- src/BOPAlgo/BOPAlgo_Builder_2.cxx | 166 +++++++++--- src/BOPAlgo/BOPAlgo_Builder_3.cxx | 126 +++++++-- src/BOPAlgo/BOPAlgo_Builder_4.cxx | 10 +- src/BOPAlgo/BOPAlgo_CellsBuilder.cxx | 15 +- src/BOPAlgo/BOPAlgo_CellsBuilder.hxx | 2 +- src/BOPAlgo/BOPAlgo_CheckerSI.cxx | 53 ++-- src/BOPAlgo/BOPAlgo_CheckerSI.hxx | 16 +- src/BOPAlgo/BOPAlgo_CheckerSI_1.cxx | 103 +++++-- src/BOPAlgo/BOPAlgo_MakerVolume.cxx | 68 +++-- src/BOPAlgo/BOPAlgo_MakerVolume.hxx | 28 +- src/BOPAlgo/BOPAlgo_Options.cxx | 31 +-- src/BOPAlgo/BOPAlgo_Options.hxx | 14 +- src/BOPAlgo/BOPAlgo_PaveFiller.cxx | 251 ++++++++++++------ src/BOPAlgo/BOPAlgo_PaveFiller.hxx | 51 ++-- src/BOPAlgo/BOPAlgo_PaveFiller_1.cxx | 21 +- src/BOPAlgo/BOPAlgo_PaveFiller_2.cxx | 47 +++- src/BOPAlgo/BOPAlgo_PaveFiller_3.cxx | 111 ++++++-- src/BOPAlgo/BOPAlgo_PaveFiller_4.cxx | 37 ++- src/BOPAlgo/BOPAlgo_PaveFiller_5.cxx | 103 +++++-- src/BOPAlgo/BOPAlgo_PaveFiller_6.cxx | 75 ++++-- src/BOPAlgo/BOPAlgo_PaveFiller_7.cxx | 106 ++++++-- src/BOPAlgo/BOPAlgo_PaveFiller_8.cxx | 10 +- src/BOPAlgo/BOPAlgo_RemoveFeatures.cxx | 2 +- src/BOPAlgo/BOPAlgo_RemoveFeatures.hxx | 2 +- src/BOPAlgo/BOPAlgo_Section.cxx | 63 ++++- src/BOPAlgo/BOPAlgo_Section.hxx | 25 +- src/BOPAlgo/BOPAlgo_ShellSplitter.cxx | 34 ++- src/BOPAlgo/BOPAlgo_ShellSplitter.hxx | 4 +- src/BOPAlgo/BOPAlgo_Splitter.cxx | 12 +- src/BOPAlgo/BOPAlgo_Splitter.hxx | 2 +- src/BOPAlgo/BOPAlgo_Tools.cxx | 39 ++- src/BOPAlgo/BOPAlgo_Tools.hxx | 4 +- src/BOPAlgo/BOPAlgo_WireSplitter.cxx | 35 ++- src/BOPAlgo/BOPAlgo_WireSplitter.hxx | 4 +- src/BOPTest/BOPTest_APICommands.cxx | 11 +- src/BOPTest/BOPTest_BOPCommands.cxx | 54 ++-- src/BOPTest/BOPTest_CellsCommands.cxx | 6 +- src/BOPTest/BOPTest_CheckCommands.cxx | 8 +- src/BOPTest/BOPTest_PartitionCommands.cxx | 18 +- src/BRepAlgo/BRepAlgo_Section.cxx | 2 +- src/BRepAlgo/BRepAlgo_Section.hxx | 2 +- src/BRepAlgoAPI/BRepAlgoAPI_Algo.hxx | 1 - .../BRepAlgoAPI_BooleanOperation.cxx | 31 ++- .../BRepAlgoAPI_BooleanOperation.hxx | 2 +- src/BRepAlgoAPI/BRepAlgoAPI_BuilderAlgo.cxx | 26 +- src/BRepAlgoAPI/BRepAlgoAPI_BuilderAlgo.hxx | 6 +- src/BRepAlgoAPI/BRepAlgoAPI_Check.cxx | 23 +- src/BRepAlgoAPI/BRepAlgoAPI_Check.hxx | 11 +- src/BRepAlgoAPI/BRepAlgoAPI_Common.cxx | 10 +- src/BRepAlgoAPI/BRepAlgoAPI_Common.hxx | 9 +- src/BRepAlgoAPI/BRepAlgoAPI_Cut.cxx | 10 +- src/BRepAlgoAPI/BRepAlgoAPI_Cut.hxx | 7 +- src/BRepAlgoAPI/BRepAlgoAPI_Defeaturing.cxx | 2 +- src/BRepAlgoAPI/BRepAlgoAPI_Defeaturing.hxx | 2 +- src/BRepAlgoAPI/BRepAlgoAPI_Fuse.cxx | 10 +- src/BRepAlgoAPI/BRepAlgoAPI_Fuse.hxx | 6 +- src/BRepAlgoAPI/BRepAlgoAPI_Section.cxx | 4 +- src/BRepAlgoAPI/BRepAlgoAPI_Section.hxx | 2 +- src/BRepAlgoAPI/BRepAlgoAPI_Splitter.cxx | 7 +- src/BRepAlgoAPI/BRepAlgoAPI_Splitter.hxx | 2 +- .../BRepBuilderAPI_MakeShape.cxx | 2 +- .../BRepBuilderAPI_MakeShape.hxx | 3 +- src/BRepFeat/BRepFeat_Builder.cxx | 104 +++++--- src/BRepFeat/BRepFeat_Builder.hxx | 6 +- src/BRepFeat/BRepFeat_Gluer.cxx | 2 +- src/BRepFeat/BRepFeat_Gluer.hxx | 2 +- src/BRepFeat/BRepFeat_SplitShape.cxx | 2 +- src/BRepFeat/BRepFeat_SplitShape.hxx | 2 +- src/BRepFill/BRepFill_Draft.cxx | 6 +- .../BRepFilletAPI_MakeChamfer.cxx | 2 +- .../BRepFilletAPI_MakeChamfer.hxx | 2 +- .../BRepFilletAPI_MakeFillet.cxx | 2 +- .../BRepFilletAPI_MakeFillet.hxx | 2 +- .../BRepFilletAPI_MakeFillet2d.cxx | 2 +- .../BRepFilletAPI_MakeFillet2d.hxx | 2 +- .../BRepOffsetAPI_DraftAngle.cxx | 2 +- .../BRepOffsetAPI_DraftAngle.hxx | 2 +- .../BRepOffsetAPI_MakeEvolved.cxx | 2 +- .../BRepOffsetAPI_MakeEvolved.hxx | 2 +- .../BRepOffsetAPI_MakeFilling.cxx | 2 +- .../BRepOffsetAPI_MakeFilling.hxx | 2 +- .../BRepOffsetAPI_MakeOffset.cxx | 2 +- .../BRepOffsetAPI_MakeOffset.hxx | 2 +- .../BRepOffsetAPI_MakeOffsetShape.cxx | 2 +- .../BRepOffsetAPI_MakeOffsetShape.hxx | 2 +- src/BRepOffsetAPI/BRepOffsetAPI_MakePipe.cxx | 2 +- src/BRepOffsetAPI/BRepOffsetAPI_MakePipe.hxx | 2 +- .../BRepOffsetAPI_MakePipeShell.cxx | 2 +- .../BRepOffsetAPI_MakePipeShell.hxx | 2 +- .../BRepOffsetAPI_MakeThickSolid.cxx | 2 +- .../BRepOffsetAPI_MakeThickSolid.hxx | 2 +- .../BRepOffsetAPI_MiddlePath.cxx | 2 +- .../BRepOffsetAPI_MiddlePath.hxx | 2 +- .../BRepOffsetAPI_NormalProjection.cxx | 2 +- .../BRepOffsetAPI_NormalProjection.hxx | 2 +- .../BRepOffsetAPI_ThruSections.cxx | 2 +- .../BRepOffsetAPI_ThruSections.hxx | 2 +- src/BRepPreviewAPI/BRepPreviewAPI_MakeBox.cxx | 2 +- src/BRepPreviewAPI/BRepPreviewAPI_MakeBox.hxx | 2 +- src/BRepPrimAPI/BRepPrimAPI_MakeBox.cxx | 2 +- src/BRepPrimAPI/BRepPrimAPI_MakeBox.hxx | 2 +- src/BRepPrimAPI/BRepPrimAPI_MakeOneAxis.cxx | 2 +- src/BRepPrimAPI/BRepPrimAPI_MakeOneAxis.hxx | 2 +- src/BRepPrimAPI/BRepPrimAPI_MakePrism.cxx | 2 +- src/BRepPrimAPI/BRepPrimAPI_MakePrism.hxx | 2 +- src/BRepPrimAPI/BRepPrimAPI_MakeRevol.cxx | 2 +- src/BRepPrimAPI/BRepPrimAPI_MakeRevol.hxx | 2 +- src/BRepPrimAPI/BRepPrimAPI_MakeWedge.cxx | 2 +- src/BRepPrimAPI/BRepPrimAPI_MakeWedge.hxx | 2 +- src/BRepTest/BRepTest_FilletCommands.cxx | 10 +- src/Draw/Draw_ProgressIndicator.cxx | 2 +- .../ShapeConstruct_MakeTriangulation.cxx | 2 +- .../ShapeConstruct_MakeTriangulation.hxx | 2 +- tests/bugs/modalg_7/bug21264 | 117 ++++++++ 130 files changed, 2407 insertions(+), 869 deletions(-) create mode 100644 tests/bugs/modalg_7/bug21264 diff --git a/dox/upgrade/upgrade.md b/dox/upgrade/upgrade.md index b5f57b5838..a19bc6335f 100644 --- a/dox/upgrade/upgrade.md +++ b/dox/upgrade/upgrade.md @@ -2253,3 +2253,13 @@ Access to an OCAF label via its entry is accelerated. In order to activate it, c The method *TDF_Tool::Label()*, which returns a label by an entry, becomes faster for about 10 .. 20 times. It has sense for applications, which use an entry as a unique key to access the data in OCAF tree. Also, the method *TDF_Tool::Entry()*, which returns an entry for a label, is accelerated as well. + +@subsection upgrade_occt760_bop_progress_indicator Progress indicator in Boolean operations + +Method SetProgressIndicator() has been removed due to Progress indicator mechanism refactoring. +To enable progress indicator and user break in Boolean operations user has to pass progress range as a parameter to Perform or Build method. +For example: +~~~~ +Handle(Draw_ProgressIndicator) aProgress = new Draw_ProgressIndicator(di, 1); +BRepAlgoApi_Cut(S1, S2, aProgress->Start()); // method Start() creates range for usage in cut algorithm +~~~~ diff --git a/src/BOPAlgo/BOPAlgo_Alerts.hxx b/src/BOPAlgo/BOPAlgo_Alerts.hxx index 3871c58fcd..d670a6e437 100644 --- a/src/BOPAlgo/BOPAlgo_Alerts.hxx +++ b/src/BOPAlgo/BOPAlgo_Alerts.hxx @@ -18,6 +18,9 @@ #include +//! Boolean operation was stopped by user +DEFINE_SIMPLE_ALERT(BOPAlgo_AlertUserBreak) + //! Boolean operation of given type is not allowed on the given inputs DEFINE_SIMPLE_ALERT(BOPAlgo_AlertBOPNotAllowed) diff --git a/src/BOPAlgo/BOPAlgo_Algo.cxx b/src/BOPAlgo/BOPAlgo_Algo.cxx index 1fd54eced9..794a32eb10 100644 --- a/src/BOPAlgo/BOPAlgo_Algo.cxx +++ b/src/BOPAlgo/BOPAlgo_Algo.cxx @@ -18,6 +18,8 @@ #include +#include + //======================================================================= // function: // purpose: @@ -60,3 +62,67 @@ void BOPAlgo_Algo::CheckResult() { GetReport()->Clear(Message_Fail); } + +//======================================================================= +// function: analyzeProgress +// purpose: +//======================================================================= +void BOPAlgo_Algo::analyzeProgress(const Standard_Real theWhole, + BOPAlgo_PISteps& theSteps) const +{ + Standard_Real aWhole = theWhole; + + // Fill progress steps for constant operations + fillPIConstants(theWhole, theSteps); + + TColStd_Array1OfReal& aSteps = theSteps.ChangeSteps(); + TColStd_MapOfInteger aMIConst; + for (Standard_Integer i = aSteps.Lower(); i <= aSteps.Upper(); ++i) + { + if (aSteps(i) > 0.) + { + aMIConst.Add(i); + aWhole -= aSteps(i); + } + } + + // Fill progress steps for other operations + fillPISteps(theSteps); + + Standard_Real aSum = 0.; + for (Standard_Integer i = aSteps.Lower(); i <= aSteps.Upper(); ++i) + { + if (!aMIConst.Contains(i)) + { + aSum += aSteps(i); + } + } + + // Normalize steps + if (aSum > 0.) + { + for (Standard_Integer i = aSteps.Lower(); i <= aSteps.Upper(); ++i) + { + if (!aMIConst.Contains(i)) + { + aSteps(i) = aWhole * aSteps(i) / aSum; + } + } + } +} + +//======================================================================= +// function: fillPIConstants +// purpose: +//======================================================================= +void BOPAlgo_Algo::fillPIConstants (const Standard_Real, BOPAlgo_PISteps&) const +{ +} + +//======================================================================= +// function: fillPISteps +// purpose: +//======================================================================= +void BOPAlgo_Algo::fillPISteps(BOPAlgo_PISteps&) const +{ +} diff --git a/src/BOPAlgo/BOPAlgo_Algo.hxx b/src/BOPAlgo/BOPAlgo_Algo.hxx index fb62632d28..d65caf1878 100644 --- a/src/BOPAlgo/BOPAlgo_Algo.hxx +++ b/src/BOPAlgo/BOPAlgo_Algo.hxx @@ -21,9 +21,13 @@ #include #include #include +#include +#include #include +class BOPAlgo_PISteps; + //! The class provides the root interface for the algorithms in Boolean Component.
class BOPAlgo_Algo : public BOPAlgo_Options { @@ -31,7 +35,9 @@ public: DEFINE_STANDARD_ALLOC - Standard_EXPORT virtual void Perform() = 0; + //! The main method to implement the operation + //! Providing the range allows to enable Progress indicator User break functionalities. + Standard_EXPORT virtual void Perform(const Message_ProgressRange& theRange = Message_ProgressRange()) = 0; protected: @@ -47,6 +53,99 @@ protected: //! Checks the obtained result Standard_EXPORT virtual void CheckResult(); +protected: //! @name Analyzing operations to fill progress indicator + + //! Analyze progress steps of the whole operation. + //! @param theWhole - sum of progress of all operations. + //! @oaram theSteps - steps of the operations supported by PI + //! + //! To use this method, one has to override the following methods: + //! * fillPIConstants - method filling values for constant operations. + //! * fillPISteps - method filling steps for the rest of operations. + Standard_EXPORT void analyzeProgress(const Standard_Real theWhole, + BOPAlgo_PISteps& theSteps) const; + + //! Fills the values for constant operations - the operations having constant relative running time. + //! @param theWhole - sum of all operations supported by PI, i.e. the value to normalize the steps to, if necessary. + //! @param theSteps - steps of the operations supported by PI + Standard_EXPORT virtual void fillPIConstants(const Standard_Real theWhole, + BOPAlgo_PISteps& theSteps) const; + + //! Fills the values for the operations dependent on the inputs. + //! Filled values may not be normalized to represent percentage of total running time. + //! The values should just correlate to each other. + //! E.g. if progress depends on the number of input shapes, the values may look like this: + //! step1 = number_of_input_vertices; + //! step2 = 2 * number_of_input_edges; + //! step3 = 10 * number_of_input_faces. + //! Normalization of these values will be done automatically in analyzeProgress() method. + Standard_EXPORT virtual void fillPISteps(BOPAlgo_PISteps& theSteps) const; +}; + +//! Additional root class to provide interface to be launched from parallel vector. +//! It already has the range as a field, and has to be used with caution to create +//! scope from the range only once. +class BOPAlgo_ParallelAlgo : public BOPAlgo_Algo +{ +public: + DEFINE_STANDARD_ALLOC + + //! The main method to implement the operation + Standard_EXPORT virtual void Perform() = 0; + +public: + //! Sets the range for a single run + void SetProgressRange(const Message_ProgressRange& theRange) + { + myProgressRange = theRange; + } + +private: + //! Disable the range enabled method + virtual void Perform(const Message_ProgressRange& /*theRange*/ = Message_ProgressRange()) {}; + +protected: + Message_ProgressRange myProgressRange; +}; + +//! Class for representing the relative contribution of each step of +//! the operation to the whole progress +class BOPAlgo_PISteps +{ +public: + //! Constructor + BOPAlgo_PISteps(const Standard_Integer theNbOp) + : mySteps(0, theNbOp - 1) + { + mySteps.Init(0); + } + + //! Returns the steps + const TColStd_Array1OfReal& Steps() const { return mySteps; } + //! Returns modifiable steps + TColStd_Array1OfReal& ChangeSteps() { return mySteps; } + + //! Assign the value theStep to theOperation + void SetStep(const Standard_Integer theOperation, const Standard_Real theStep) + { + if (theOperation >= mySteps.Lower() && theOperation <= mySteps.Upper()) + { + mySteps(theOperation) = theStep; + } + } + + //! Returns the step assigned to the operation + Standard_Real GetStep(const Standard_Integer theOperation) + { + if (theOperation < mySteps.Lower() || theOperation > mySteps.Upper()) + { + return 0.; + } + return mySteps(theOperation); + } + +protected: + TColStd_Array1OfReal mySteps; }; #endif // _BOPAlgo_Algo_HeaderFile diff --git a/src/BOPAlgo/BOPAlgo_ArgumentAnalyzer.cxx b/src/BOPAlgo/BOPAlgo_ArgumentAnalyzer.cxx index e92da635d8..9a79159b94 100644 --- a/src/BOPAlgo/BOPAlgo_ArgumentAnalyzer.cxx +++ b/src/BOPAlgo/BOPAlgo_ArgumentAnalyzer.cxx @@ -151,81 +151,99 @@ void BOPAlgo_ArgumentAnalyzer::Prepare() // function: Perform // purpose: // ================================================================================ -void BOPAlgo_ArgumentAnalyzer::Perform() +void BOPAlgo_ArgumentAnalyzer::Perform(const Message_ProgressRange& theRange) { + Message_ProgressScope aPS(theRange, "Analyze shapes", 10); try { OCC_CATCH_SIGNALS myResult.Clear(); - // - UserBreak(); - // + if (UserBreak(aPS)) + { + return; + } // 1. Prepare Prepare(); // - UserBreak(); - // // 2. Test types if(myArgumentTypeMode) { TestTypes(); + if (UserBreak(aPS)) + { + return; + } } // - UserBreak(); - // // 3. Test self-interference if(mySelfInterMode) { - TestSelfInterferences(); + TestSelfInterferences(aPS.Next(8)); + if (UserBreak(aPS)) + { + return; + } } // - UserBreak(); - // // 4. Test small edges if(mySmallEdgeMode) { if(!(!myResult.IsEmpty() && myStopOnFirst)) TestSmallEdge(); + if (UserBreak(aPS)) + { + return; + } } // - UserBreak(); - // // 5. Test possibility to rebuild faces if(myRebuildFaceMode) { if(!(!myResult.IsEmpty() && myStopOnFirst)) TestRebuildFace(); + if (UserBreak(aPS)) + { + return; + } } // - UserBreak(); - // // 6. Test tangent if(myTangentMode) { - if(!(!myResult.IsEmpty() && myStopOnFirst)) + if (!(!myResult.IsEmpty() && myStopOnFirst)) + { TestTangent(); + if (UserBreak(aPS)) + { + return; + } + } } // - UserBreak(); - // // 7. Test merge vertices if(myMergeVertexMode) { if(!(!myResult.IsEmpty() && myStopOnFirst)) TestMergeVertex(); + if (UserBreak(aPS)) + { + return; + } } // - UserBreak(); - // // 8. Test merge edges if(myMergeEdgeMode) { if(!(!myResult.IsEmpty() && myStopOnFirst)) TestMergeEdge(); + if (UserBreak(aPS)) + { + return; + } } // - UserBreak(); - // // 9. Test shapes continuity if(myContinuityMode) { if(!(!myResult.IsEmpty() && myStopOnFirst)) TestContinuity(); + if (UserBreak(aPS)) + { + return; + } } // - UserBreak(); - // // 10. Test validity of the curves on the surfaces if(myCurveOnSurfaceMode) { if(!(!myResult.IsEmpty() && myStopOnFirst)) @@ -332,8 +350,9 @@ void BOPAlgo_ArgumentAnalyzer::TestTypes() //function : TestSelfInterferences //purpose : //======================================================================= -void BOPAlgo_ArgumentAnalyzer::TestSelfInterferences() +void BOPAlgo_ArgumentAnalyzer::TestSelfInterferences(const Message_ProgressRange& theRange) { + Message_ProgressScope aPS(theRange, NULL, (!myShape1.IsNull() && !myShape2.IsNull() ? 2 : 1)); Standard_Integer ii; // for(ii = 0; ii < 2; ii++) { @@ -357,9 +376,8 @@ void BOPAlgo_ArgumentAnalyzer::TestSelfInterferences() aChecker.SetNonDestructive(Standard_True); aChecker.SetRunParallel(myRunParallel); aChecker.SetFuzzyValue(myFuzzyValue); - aChecker.SetProgressIndicator(*myProgressScope); // - aChecker.Perform(); + aChecker.Perform(aPS.Next()); Standard_Boolean hasError = aChecker.HasErrors(); // const BOPDS_DS& aDS=*(aChecker.PDS()); diff --git a/src/BOPAlgo/BOPAlgo_ArgumentAnalyzer.hxx b/src/BOPAlgo/BOPAlgo_ArgumentAnalyzer.hxx index b26d3d2c3c..2c127cf55e 100644 --- a/src/BOPAlgo/BOPAlgo_ArgumentAnalyzer.hxx +++ b/src/BOPAlgo/BOPAlgo_ArgumentAnalyzer.hxx @@ -97,7 +97,7 @@ Standard_EXPORT virtual ~BOPAlgo_ArgumentAnalyzer(); Standard_Boolean& CurveOnSurfaceMode(); //! performs analysis - Standard_EXPORT void Perform(); + Standard_EXPORT void Perform(const Message_ProgressRange& theRange = Message_ProgressRange()); //! result of test Standard_EXPORT Standard_Boolean HasFaulty() const; @@ -114,7 +114,7 @@ protected: Standard_EXPORT void TestTypes(); - Standard_EXPORT void TestSelfInterferences(); + Standard_EXPORT void TestSelfInterferences(const Message_ProgressRange& theRange); Standard_EXPORT void TestSmallEdge(); diff --git a/src/BOPAlgo/BOPAlgo_BOP.cxx b/src/BOPAlgo/BOPAlgo_BOP.cxx index b3367e2eb0..1c6c51ae7f 100644 --- a/src/BOPAlgo/BOPAlgo_BOP.cxx +++ b/src/BOPAlgo/BOPAlgo_BOP.cxx @@ -353,7 +353,7 @@ void BOPAlgo_BOP::BuildResult(const TopAbs_ShapeEnum theType) //function : Perform //purpose : //======================================================================= -void BOPAlgo_BOP::Perform() +void BOPAlgo_BOP::Perform(const Message_ProgressRange& theRange) { Handle(NCollection_BaseAllocator) aAllocator; BOPAlgo_PaveFiller* pPF; @@ -387,25 +387,35 @@ void BOPAlgo_BOP::Perform() pPF=new BOPAlgo_PaveFiller(aAllocator); pPF->SetArguments(aLS); pPF->SetRunParallel(myRunParallel); - if (myProgressScope != NULL) - { - pPF->SetProgressIndicator(*myProgressScope); - } + Message_ProgressScope aPS(theRange, "Performing Boolean operation", 10); + pPF->SetFuzzyValue(myFuzzyValue); pPF->SetNonDestructive(myNonDestructive); pPF->SetGlue(myGlue); pPF->SetUseOBB(myUseOBB); // - pPF->Perform(); + pPF->Perform(aPS.Next(9)); // myEntryPoint=1; - PerformInternal(*pPF); + PerformInternal(*pPF, aPS.Next()); +} + +//======================================================================= +// function: fillPIConstants +// purpose: +//======================================================================= +void BOPAlgo_BOP::fillPIConstants (const Standard_Real theWhole, BOPAlgo_PISteps& theSteps) const +{ + BOPAlgo_Builder::fillPIConstants(theWhole, theSteps); + theSteps.SetStep (PIOperation_BuildShape, (myOperation == BOPAlgo_FUSE ? 10. : 5.) * theWhole / 100.); } + //======================================================================= //function : PerformInternal1 //purpose : //======================================================================= -void BOPAlgo_BOP::PerformInternal1(const BOPAlgo_PaveFiller& theFiller) +void BOPAlgo_BOP::PerformInternal1(const BOPAlgo_PaveFiller& theFiller, + const Message_ProgressRange& theRange) { myPaveFiller=(BOPAlgo_PaveFiller*)&theFiller; myDS=myPaveFiller->PDS(); @@ -429,14 +439,18 @@ void BOPAlgo_BOP::PerformInternal1(const BOPAlgo_PaveFiller& theFiller) { Standard_Boolean bDone = TreatEmptyShape(); if (bDone) { - PrepareHistory(); + PrepareHistory (theRange); return; } } + Message_ProgressScope aPS(theRange, "Building the result of Boolean operation", 100); // + BOPAlgo_PISteps aSteps (PIOperation_Last); + analyzeProgress (100, aSteps); + // 3. Fill Images // 3.1 Vertices - FillImagesVertices(); + FillImagesVertices(aPS.Next(aSteps.GetStep(PIOperation_TreatVertices))); if (HasErrors()) { return; } @@ -446,7 +460,7 @@ void BOPAlgo_BOP::PerformInternal1(const BOPAlgo_PaveFiller& theFiller) return; } // 3.2 Edges - FillImagesEdges(); + FillImagesEdges(aPS.Next(aSteps.GetStep(PIOperation_TreatEdges))); if (HasErrors()) { return; } @@ -457,7 +471,7 @@ void BOPAlgo_BOP::PerformInternal1(const BOPAlgo_PaveFiller& theFiller) } // // 3.3 Wires - FillImagesContainers(TopAbs_WIRE); + FillImagesContainers(TopAbs_WIRE, aPS.Next(aSteps.GetStep(PIOperation_TreatWires))); if (HasErrors()) { return; } @@ -468,18 +482,18 @@ void BOPAlgo_BOP::PerformInternal1(const BOPAlgo_PaveFiller& theFiller) } // // 3.4 Faces - FillImagesFaces(); + FillImagesFaces(aPS.Next(aSteps.GetStep(PIOperation_TreatFaces))); if (HasErrors()) { return; } - + BuildResult(TopAbs_FACE); if (HasErrors()) { return; } // // 3.5 Shells - FillImagesContainers(TopAbs_SHELL); + FillImagesContainers(TopAbs_SHELL, aPS.Next(aSteps.GetStep(PIOperation_TreatShells))); if (HasErrors()) { return; } @@ -490,7 +504,7 @@ void BOPAlgo_BOP::PerformInternal1(const BOPAlgo_PaveFiller& theFiller) } // // 3.6 Solids - FillImagesSolids(); + FillImagesSolids(aPS.Next(aSteps.GetStep(PIOperation_TreatSolids))); if (HasErrors()) { return; } @@ -501,7 +515,7 @@ void BOPAlgo_BOP::PerformInternal1(const BOPAlgo_PaveFiller& theFiller) } // // 3.7 CompSolids - FillImagesContainers(TopAbs_COMPSOLID); + FillImagesContainers(TopAbs_COMPSOLID, aPS.Next(aSteps.GetStep(PIOperation_TreatCompsolids))); if (HasErrors()) { return; } @@ -512,7 +526,7 @@ void BOPAlgo_BOP::PerformInternal1(const BOPAlgo_PaveFiller& theFiller) } // // 3.8 Compounds - FillImagesCompounds(); + FillImagesCompounds(aPS.Next(aSteps.GetStep(PIOperation_TreatCompounds))); if (HasErrors()) { return; } @@ -523,23 +537,28 @@ void BOPAlgo_BOP::PerformInternal1(const BOPAlgo_PaveFiller& theFiller) } // // 4.BuildShape; - BuildShape(); + BuildShape(aPS.Next(aSteps.GetStep(PIOperation_BuildShape))); if (HasErrors()) { return; } // // 5.History - PrepareHistory(); + PrepareHistory(aPS.Next(aSteps.GetStep(PIOperation_FillHistory))); + if (HasErrors()) { + return; + } // // 6 Post-treatment - PostTreat(); + PostTreat(aPS.Next(aSteps.GetStep(PIOperation_PostTreat))); } //======================================================================= //function : BuildRC //purpose : //======================================================================= -void BOPAlgo_BOP::BuildRC() +void BOPAlgo_BOP::BuildRC(const Message_ProgressRange& theRange) { + Message_ProgressScope aPS(theRange, NULL, 1); + TopAbs_ShapeEnum aType; TopoDS_Compound aC; BRep_Builder aBB; @@ -561,6 +580,10 @@ void BOPAlgo_BOP::BuildRC() return; } // + if (UserBreak(aPS)) + { + return; + } // B. Common, Cut, Cut21 // Standard_Integer i, j, aNb, iDim; @@ -589,6 +612,11 @@ void BOPAlgo_BOP::BuildRC() } } // + if (UserBreak(aPS)) + { + return; + } + // bCheckEdges = Standard_False; // // get splits of building elements @@ -723,6 +751,10 @@ void BOPAlgo_BOP::BuildRC() return; } // + if (UserBreak(aPS)) + { + return; + } // The squats around degenerated edges Standard_Integer nVD; TopTools_IndexedMapOfShape aMVC; @@ -768,8 +800,10 @@ void BOPAlgo_BOP::BuildRC() //function : BuildShape //purpose : //======================================================================= -void BOPAlgo_BOP::BuildShape() +void BOPAlgo_BOP::BuildShape(const Message_ProgressRange& theRange) { + Message_ProgressScope aPS(theRange, NULL, 10.); + if (myDims[0] == 3 && myDims[1] == 3) { // For the Boolean operation on solids we need to check first @@ -784,7 +818,7 @@ void BOPAlgo_BOP::BuildShape() if (hasNotClosedSolids) { Handle(Message_Report) aReport = new Message_Report(); - BuildBOP(myArguments, myTools, myOperation, aReport); + BuildBOP(myArguments, myTools, myOperation, Message_ProgressRange(), aReport); if (aReport->GetAlerts(Message_Fail).IsEmpty()) { // Success. Merge the report into the main report. @@ -795,11 +829,16 @@ void BOPAlgo_BOP::BuildShape() } // Build the result using splits of arguments. - - BuildRC(); + BuildRC(aPS.Next(2.)); // if ((myOperation == BOPAlgo_FUSE) && (myDims[0] == 3)) { - BuildSolid(); + BuildSolid(aPS.Next(8.)); + return; + } + + // Check for user break + if (UserBreak(aPS)) + { return; } // @@ -825,6 +864,11 @@ void BOPAlgo_BOP::BuildShape() CollectContainers(aS, aLSC); } } + // Check for user break + if (UserBreak(aPS)) + { + return; + } // make containers TopTools_ListOfShape aLCRes; TopTools_MapOfShape aMInpFence; @@ -904,6 +948,12 @@ void BOPAlgo_BOP::BuildShape() } // RemoveDuplicates(aLCRes); + + // Check for user break + if (UserBreak(aPS)) + { + return; + } // // add containers to result TopoDS_Compound aResult; @@ -957,8 +1007,9 @@ void BOPAlgo_BOP::BuildShape() //function : BuildSolid //purpose : //======================================================================= -void BOPAlgo_BOP::BuildSolid() +void BOPAlgo_BOP::BuildSolid(const Message_ProgressRange& theRange) { + Message_ProgressScope aPS(theRange, NULL, 10.); // Containers TopTools_ListOfShape aLSC; // @@ -986,6 +1037,11 @@ void BOPAlgo_BOP::BuildSolid() CollectContainers(aSA, aLSC); } } + // Check for user break + if (UserBreak(aPS)) + { + return; + } // // Find solids in input arguments sharing faces with other solids TopTools_MapOfShape aMTSols; @@ -1045,6 +1101,11 @@ void BOPAlgo_BOP::BuildSolid() } } } + // Check for user break + if (UserBreak(aPS)) + { + return; + } // TopTools_IndexedDataMapOfShapeListOfShape aMEF; // Fill the list of faces to build the result solids @@ -1067,7 +1128,7 @@ void BOPAlgo_BOP::BuildSolid() aBS.SetContext(myContext); aBS.SetShapes(aSFS); aBS.SetAvoidInternalShapes (Standard_True); - aBS.Perform(); + aBS.Perform(aPS.Next(8.)); if (aBS.HasErrors()) { AddError (new BOPAlgo_AlertSolidBuilderFailed); // SolidBuilder failed return; @@ -1105,6 +1166,7 @@ void BOPAlgo_BOP::BuildSolid() TopoDS_Shape aResult; BOPTools_AlgoTools::MakeContainer(TopAbs_COMPOUND, aResult); // + aIt.Initialize(aRC); if (!aIt.More()) { // no solids in the result @@ -1147,6 +1209,11 @@ void BOPAlgo_BOP::BuildSolid() } } // + // Check for user break + if (UserBreak(aPS)) + { + return; + } // build connexity blocks from new solids TopTools_ListOfShape aLCBS; BOPTools_AlgoTools::MakeConnexityBlocks(aRC, TopAbs_FACE, TopAbs_SOLID, aLCBS); diff --git a/src/BOPAlgo/BOPAlgo_BOP.hxx b/src/BOPAlgo/BOPAlgo_BOP.hxx index 4598262348..d91b86e851 100644 --- a/src/BOPAlgo/BOPAlgo_BOP.hxx +++ b/src/BOPAlgo/BOPAlgo_BOP.hxx @@ -84,7 +84,7 @@ public: Standard_EXPORT BOPAlgo_Operation Operation() const; - Standard_EXPORT virtual void Perform() Standard_OVERRIDE; + Standard_EXPORT virtual void Perform(const Message_ProgressRange& theRange = Message_ProgressRange()) Standard_OVERRIDE; protected: @@ -92,15 +92,16 @@ protected: //! Performs calculations using prepared Filler //! object - Standard_EXPORT virtual void PerformInternal1 (const BOPAlgo_PaveFiller& thePF) Standard_OVERRIDE; - + Standard_EXPORT virtual void PerformInternal1 (const BOPAlgo_PaveFiller& thePF, + const Message_ProgressRange& theRange) Standard_OVERRIDE; + Standard_EXPORT virtual void BuildResult (const TopAbs_ShapeEnum theType) Standard_OVERRIDE; - Standard_EXPORT void BuildShape(); + Standard_EXPORT void BuildShape(const Message_ProgressRange& theRange); - Standard_EXPORT void BuildRC(); + Standard_EXPORT void BuildRC(const Message_ProgressRange& theRange); - Standard_EXPORT void BuildSolid(); + Standard_EXPORT void BuildSolid(const Message_ProgressRange& theRange); //! Treatment of the cases with empty shapes.
//! It returns TRUE if there is nothing to do, i.e. @@ -113,6 +114,18 @@ protected: //! for building the result shape. Standard_EXPORT virtual Standard_Boolean CheckArgsForOpenSolid(); +protected: + + //! Extend list of operations to be supported by the Progress Indicator + enum BOPAlgo_PIOperation + { + PIOperation_BuildShape = BOPAlgo_ToolsProvider::PIOperation_Last, + PIOperation_Last + }; + + //! Fill PI steps + Standard_EXPORT virtual void fillPIConstants(const Standard_Real theWhole, BOPAlgo_PISteps& theSteps) const Standard_OVERRIDE; + protected: BOPAlgo_Operation myOperation; diff --git a/src/BOPAlgo/BOPAlgo_Builder.cxx b/src/BOPAlgo/BOPAlgo_Builder.cxx index 7ef864a1b6..d4c080e419 100644 --- a/src/BOPAlgo/BOPAlgo_Builder.cxx +++ b/src/BOPAlgo/BOPAlgo_Builder.cxx @@ -36,7 +36,6 @@ #include #include - //======================================================================= //function : //purpose : @@ -177,7 +176,7 @@ void BOPAlgo_Builder::Prepare() //function : Perform //purpose : //======================================================================= -void BOPAlgo_Builder::Perform() +void BOPAlgo_Builder::Perform(const Message_ProgressRange& theRange) { GetReport()->Clear(); // @@ -195,25 +194,22 @@ void BOPAlgo_Builder::Perform() // pPF->SetArguments(myArguments); pPF->SetRunParallel(myRunParallel); - if (myProgressScope != NULL) - { - pPF->SetProgressIndicator(*myProgressScope); - } + Message_ProgressScope aPS(theRange, "Performing General Fuse operation", 10); pPF->SetFuzzyValue(myFuzzyValue); pPF->SetNonDestructive(myNonDestructive); pPF->SetGlue(myGlue); pPF->SetUseOBB(myUseOBB); // - pPF->Perform(); + pPF->Perform(aPS.Next(9)); // myEntryPoint=1; - PerformInternal(*pPF); + PerformInternal(*pPF, aPS.Next(1)); } //======================================================================= //function : PerformWithFiller //purpose : //======================================================================= -void BOPAlgo_Builder::PerformWithFiller(const BOPAlgo_PaveFiller& theFiller) +void BOPAlgo_Builder::PerformWithFiller(const BOPAlgo_PaveFiller& theFiller, const Message_ProgressRange& theRange) { GetReport()->Clear(); myEntryPoint=0; @@ -221,30 +217,118 @@ void BOPAlgo_Builder::PerformWithFiller(const BOPAlgo_PaveFiller& theFiller) myFuzzyValue = theFiller.FuzzyValue(); myGlue = theFiller.Glue(); myUseOBB = theFiller.UseOBB(); - PerformInternal(theFiller); + PerformInternal(theFiller, theRange); } //======================================================================= //function : PerformInternal //purpose : //======================================================================= -void BOPAlgo_Builder::PerformInternal(const BOPAlgo_PaveFiller& theFiller) +void BOPAlgo_Builder::PerformInternal(const BOPAlgo_PaveFiller& theFiller, const Message_ProgressRange& theRange) { GetReport()->Clear(); // try { OCC_CATCH_SIGNALS - PerformInternal1(theFiller); + PerformInternal1(theFiller, theRange); } // catch (Standard_Failure const&) { AddError (new BOPAlgo_AlertBuilderFailed); } } + +//======================================================================= +//function : getNbShapes +//purpose : +//======================================================================= +BOPAlgo_Builder::NbShapes BOPAlgo_Builder::getNbShapes() const +{ + NbShapes aCounter; + aCounter.NbVertices() = myDS->ShapesSD().Size(); + for (Standard_Integer i = 0; i < myDS->NbSourceShapes(); ++i) + { + const BOPDS_ShapeInfo& aSI = myDS->ShapeInfo(i); + switch (aSI.ShapeType()) + { + case TopAbs_EDGE: + { + if (myDS->HasPaveBlocks(i)) + { + aCounter.NbEdges()++; + } + break; + } + case TopAbs_WIRE: + aCounter.NbWires()++; + break; + case TopAbs_FACE: + { + if (myDS->HasFaceInfo(i)) + { + aCounter.NbFaces()++; + } + break; + } + case TopAbs_SHELL: + aCounter.NbShells()++; + break; + case TopAbs_SOLID: + aCounter.NbSolids()++; + break; + case TopAbs_COMPSOLID: + aCounter.NbCompsolids()++; + break; + case TopAbs_COMPOUND: + aCounter.NbCompounds()++; + break; + default: break; + } + } + return aCounter; +} + +//======================================================================= +// function: fillPIConstants +// purpose: +//======================================================================= +void BOPAlgo_Builder::fillPIConstants (const Standard_Real theWhole, + BOPAlgo_PISteps& theSteps) const +{ + // Fill in the constants: + if (myFillHistory) + { + // for FillHistroty, which takes about 5% of the whole operation + theSteps.SetStep(PIOperation_FillHistory, 0.05 * theWhole); + } + + // and for PostTreat, which takes about 3% of the whole operation + theSteps.SetStep(PIOperation_PostTreat, 0.03 * theWhole); +} + +//======================================================================= +// function: fillPISteps +// purpose: +//======================================================================= +void BOPAlgo_Builder::fillPISteps (BOPAlgo_PISteps& theSteps) const +{ + // Compute the rest of the operations - all depend on the number of sub-shapes of certain type + NbShapes aNbShapes = getNbShapes(); + + theSteps.SetStep(PIOperation_TreatVertices, aNbShapes.NbVertices()); + theSteps.SetStep(PIOperation_TreatEdges, aNbShapes.NbEdges()); + theSteps.SetStep(PIOperation_TreatWires, aNbShapes.NbWires()); + theSteps.SetStep(PIOperation_TreatFaces, 20 * aNbShapes.NbFaces()); + theSteps.SetStep(PIOperation_TreatShells, aNbShapes.NbShells()); + theSteps.SetStep(PIOperation_TreatSolids, 50 * aNbShapes.NbSolids()); + theSteps.SetStep(PIOperation_TreatCompsolids, aNbShapes.NbCompsolids()); + theSteps.SetStep(PIOperation_TreatCompounds, aNbShapes.NbCompounds()); +} + //======================================================================= //function : PerformInternal1 //purpose : //======================================================================= -void BOPAlgo_Builder::PerformInternal1(const BOPAlgo_PaveFiller& theFiller) +void BOPAlgo_Builder::PerformInternal1(const BOPAlgo_PaveFiller& theFiller, const Message_ProgressRange& theRange) { myPaveFiller=(BOPAlgo_PaveFiller*)&theFiller; myDS=myPaveFiller->PDS(); @@ -252,6 +336,7 @@ void BOPAlgo_Builder::PerformInternal1(const BOPAlgo_PaveFiller& theFiller) myFuzzyValue = myPaveFiller->FuzzyValue(); myNonDestructive = myPaveFiller->NonDestructive(); // + Message_ProgressScope aPS(theRange, "Building the result of General Fuse operation", 100); // 1. CheckData CheckData(); if (HasErrors()) { @@ -264,9 +349,11 @@ void BOPAlgo_Builder::PerformInternal1(const BOPAlgo_PaveFiller& theFiller) return; } // + BOPAlgo_PISteps aSteps(PIOperation_Last); + analyzeProgress(100., aSteps); // 3. Fill Images // 3.1 Vertice - FillImagesVertices(); + FillImagesVertices(aPS.Next(aSteps.GetStep(PIOperation_TreatVertices))); if (HasErrors()) { return; } @@ -276,7 +363,7 @@ void BOPAlgo_Builder::PerformInternal1(const BOPAlgo_PaveFiller& theFiller) return; } // 3.2 Edges - FillImagesEdges(); + FillImagesEdges(aPS.Next(aSteps.GetStep(PIOperation_TreatEdges))); if (HasErrors()) { return; } @@ -287,7 +374,7 @@ void BOPAlgo_Builder::PerformInternal1(const BOPAlgo_PaveFiller& theFiller) } // // 3.3 Wires - FillImagesContainers(TopAbs_WIRE); + FillImagesContainers(TopAbs_WIRE, aPS.Next(aSteps.GetStep(PIOperation_TreatWires))); if (HasErrors()) { return; } @@ -298,7 +385,7 @@ void BOPAlgo_Builder::PerformInternal1(const BOPAlgo_PaveFiller& theFiller) } // 3.4 Faces - FillImagesFaces(); + FillImagesFaces(aPS.Next(aSteps.GetStep(PIOperation_TreatFaces))); if (HasErrors()) { return; } @@ -308,7 +395,7 @@ void BOPAlgo_Builder::PerformInternal1(const BOPAlgo_PaveFiller& theFiller) return; } // 3.5 Shells - FillImagesContainers(TopAbs_SHELL); + FillImagesContainers(TopAbs_SHELL, aPS.Next(aSteps.GetStep(PIOperation_TreatShells))); if (HasErrors()) { return; } @@ -318,7 +405,7 @@ void BOPAlgo_Builder::PerformInternal1(const BOPAlgo_PaveFiller& theFiller) return; } // 3.6 Solids - FillImagesSolids(); + FillImagesSolids(aPS.Next(aSteps.GetStep(PIOperation_TreatSolids))); if (HasErrors()) { return; } @@ -328,7 +415,7 @@ void BOPAlgo_Builder::PerformInternal1(const BOPAlgo_PaveFiller& theFiller) return; } // 3.7 CompSolids - FillImagesContainers(TopAbs_COMPSOLID); + FillImagesContainers(TopAbs_COMPSOLID, aPS.Next(aSteps.GetStep(PIOperation_TreatCompsolids))); if (HasErrors()) { return; } @@ -339,7 +426,7 @@ void BOPAlgo_Builder::PerformInternal1(const BOPAlgo_PaveFiller& theFiller) } // 3.8 Compounds - FillImagesCompounds(); + FillImagesCompounds(aPS.Next(aSteps.GetStep(PIOperation_TreatCompounds))); if (HasErrors()) { return; } @@ -349,19 +436,21 @@ void BOPAlgo_Builder::PerformInternal1(const BOPAlgo_PaveFiller& theFiller) return; } // - // 4.History - PrepareHistory(); - // + // 4 History + PrepareHistory(aPS.Next(aSteps.GetStep(PIOperation_FillHistory))); + if (HasErrors()) { + return; + } // // 5 Post-treatment - PostTreat(); - + PostTreat(aPS.Next(aSteps.GetStep(PIOperation_PostTreat))); } + //======================================================================= //function : PostTreat //purpose : //======================================================================= -void BOPAlgo_Builder::PostTreat() +void BOPAlgo_Builder::PostTreat(const Message_ProgressRange& theRange) { Standard_Integer i, aNbS; TopAbs_ShapeEnum aType; @@ -381,7 +470,9 @@ void BOPAlgo_Builder::PostTreat() } } // + Message_ProgressScope aPS(theRange, "Post treatment of result shape", 2); BOPTools_AlgoTools::CorrectTolerances(myShape, aMA, 0.05, myRunParallel); + aPS.Next(); BOPTools_AlgoTools::CorrectShapeTolerances(myShape, aMA, myRunParallel); } @@ -389,11 +480,12 @@ void BOPAlgo_Builder::PostTreat() //function : BuildBOP //purpose : //======================================================================= -void BOPAlgo_Builder::BuildBOP(const TopTools_ListOfShape& theObjects, - const TopAbs_State theObjState, - const TopTools_ListOfShape& theTools, - const TopAbs_State theToolsState, - Handle(Message_Report) theReport) +void BOPAlgo_Builder::BuildBOP(const TopTools_ListOfShape& theObjects, + const TopAbs_State theObjState, + const TopTools_ListOfShape& theTools, + const TopAbs_State theToolsState, + const Message_ProgressRange& theRange, + Handle(Message_Report) theReport) { if (HasErrors()) return; @@ -406,7 +498,6 @@ void BOPAlgo_Builder::BuildBOP(const TopTools_ListOfShape& theObjects, aReport->AddAlert(Message_Fail, new BOPAlgo_AlertBuilderFailed()); return; } - // Check the input data if ((theObjState != TopAbs_IN && theObjState != TopAbs_OUT) || (theToolsState != TopAbs_IN && theToolsState != TopAbs_OUT)) @@ -626,7 +717,7 @@ void BOPAlgo_Builder::BuildBOP(const TopTools_ListOfShape& theObjects, if (!aMFToAvoid.Contains(aRF)) aResFaces.Append(aRF); } - + Message_ProgressScope aPS(theRange, NULL, 2); BRep_Builder aBB; // Try to build closed solids from the faces @@ -635,11 +726,7 @@ void BOPAlgo_Builder::BuildBOP(const TopTools_ListOfShape& theObjects, aBS.SetRunParallel(myRunParallel); aBS.SetContext(myContext); aBS.SetFuzzyValue(myFuzzyValue); - if (myProgressScope != NULL) - { - aBS.SetProgressIndicator(*myProgressScope); - } - aBS.Perform(); + aBS.Perform(aPS.Next()); // Resulting solids TopTools_ListOfShape aResSolids; @@ -668,6 +755,10 @@ void BOPAlgo_Builder::BuildBOP(const TopTools_ListOfShape& theObjects, } } } + else + { + return; + } // Collect unused faces TopoDS_Compound anUnUsedFaces; @@ -748,5 +839,5 @@ void BOPAlgo_Builder::BuildBOP(const TopTools_ListOfShape& theObjects, aBB.Add(aResult, itLS.Value()); myShape = aResult; - PrepareHistory(); + PrepareHistory(aPS.Next()); } diff --git a/src/BOPAlgo/BOPAlgo_Builder.hxx b/src/BOPAlgo/BOPAlgo_Builder.hxx index 2d8d1e97c9..1d908c79bc 100644 --- a/src/BOPAlgo/BOPAlgo_Builder.hxx +++ b/src/BOPAlgo/BOPAlgo_Builder.hxx @@ -169,11 +169,11 @@ public: //! @name Performing the operation //! Performs the operation. //! The intersection will be performed also. - Standard_EXPORT virtual void Perform() Standard_OVERRIDE; + Standard_EXPORT virtual void Perform(const Message_ProgressRange& theRange = Message_ProgressRange()) Standard_OVERRIDE; //! Performs the operation with the prepared filler. //! The intersection will not be performed in this case. - Standard_EXPORT virtual void PerformWithFiller (const BOPAlgo_PaveFiller& theFiller); + Standard_EXPORT virtual void PerformWithFiller (const BOPAlgo_PaveFiller& theFiller, const Message_ProgressRange& theRange = Message_ProgressRange()); public: //! @name BOPs on open solids @@ -212,16 +212,17 @@ public: //! @name BOPs on open solids //! - BOPAlgo_AlertUnknownShape - the shape is unknown for the operation. //! //! Parameters: - //! @param theObjects - The group of Objects for BOP; - //! @param theObjState - State for objects faces to pass into result; - //! @param theTools - The group of Tools for BOP; - //! @param theObjState - State for tools faces to pass into result; - //! @param theReport - The alternative report to avoid pollution of the main one. - Standard_EXPORT virtual void BuildBOP(const TopTools_ListOfShape& theObjects, - const TopAbs_State theObjState, - const TopTools_ListOfShape& theTools, - const TopAbs_State theToolsState, - Handle(Message_Report) theReport = NULL); + //! @param theObjects - The group of Objects for BOP; + //! @param theObjState - State for objects faces to pass into result; + //! @param theTools - The group of Tools for BOP; + //! @param theToolsState - State for tools faces to pass into result; + //! @param theReport - The alternative report to avoid pollution of the main one. + Standard_EXPORT virtual void BuildBOP(const TopTools_ListOfShape& theObjects, + const TopAbs_State theObjState, + const TopTools_ListOfShape& theTools, + const TopAbs_State theToolsState, + const Message_ProgressRange& theRange, + Handle(Message_Report) theReport = NULL); //! Builds the result of Boolean operation of given type //! basing on the result of Builder operation (GF or any other). @@ -241,11 +242,13 @@ public: //! @name BOPs on open solids //! @param theObjects - The group of Objects for BOP; //! @param theTools - The group of Tools for BOP; //! @param theOperation - The BOP type; + //! @param theRange - The parameter to progressIndicator //! @param theReport - The alternative report to avoid pollution of the global one. - void BuildBOP(const TopTools_ListOfShape& theObjects, - const TopTools_ListOfShape& theTools, - const BOPAlgo_Operation theOperation, - Handle(Message_Report) theReport = NULL) + void BuildBOP(const TopTools_ListOfShape& theObjects, + const TopTools_ListOfShape& theTools, + const BOPAlgo_Operation theOperation, + const Message_ProgressRange& theRange, + Handle(Message_Report) theReport = NULL) { TopAbs_State anObjState, aToolsState; switch (theOperation) @@ -281,13 +284,13 @@ public: //! @name BOPs on open solids break; } } - BuildBOP(theObjects, anObjState, theTools, aToolsState, theReport); + BuildBOP(theObjects, anObjState, theTools, aToolsState, theRange, theReport); } protected: //! @name History methods //! Prepare information for history support. - Standard_EXPORT void PrepareHistory(); + Standard_EXPORT void PrepareHistory(const Message_ProgressRange& theRange); //! Prepare history information for the input shapes taking into account possible //! operation-specific modifications. @@ -334,17 +337,81 @@ public: //! @name Images/Origins return myShapesSD; } +protected://! @name Analyze progress of the operation + + //! List of operations to be supported by the Progress Indicator + enum BOPAlgo_PIOperation + { + PIOperation_TreatVertices = 0, + PIOperation_TreatEdges, + PIOperation_TreatWires, + PIOperation_TreatFaces, + PIOperation_TreatShells, + PIOperation_TreatSolids, + PIOperation_TreatCompsolids, + PIOperation_TreatCompounds, + PIOperation_FillHistory, + PIOperation_PostTreat, + PIOperation_Last + }; + + + //! Auxiliary structure to get information about number of shapes + //! of each type participated in operation. + class NbShapes + { + public: + NbShapes() + { + for (Standard_Integer i = 0; i < 8; ++i) + { + myNbShapesArr[i] = 0; + } + } + + Standard_Integer NbVertices() const { return myNbShapesArr[0]; } + Standard_Integer NbEdges() const { return myNbShapesArr[1]; } + Standard_Integer NbWires() const { return myNbShapesArr[2]; } + Standard_Integer NbFaces() const { return myNbShapesArr[3]; } + Standard_Integer NbShells() const { return myNbShapesArr[4]; } + Standard_Integer NbSolids() const { return myNbShapesArr[5]; } + Standard_Integer NbCompsolids() const { return myNbShapesArr[6]; } + Standard_Integer NbCompounds() const { return myNbShapesArr[7]; } + + Standard_Integer& NbVertices() { return myNbShapesArr[0]; } + Standard_Integer& NbEdges() { return myNbShapesArr[1]; } + Standard_Integer& NbWires() { return myNbShapesArr[2]; } + Standard_Integer& NbFaces() { return myNbShapesArr[3]; } + Standard_Integer& NbShells() { return myNbShapesArr[4]; } + Standard_Integer& NbSolids() { return myNbShapesArr[5]; } + Standard_Integer& NbCompsolids() { return myNbShapesArr[6]; } + Standard_Integer& NbCompounds() { return myNbShapesArr[7]; } + + private: + Standard_Integer myNbShapesArr[8]; + }; + +protected: + + //! Compute number of shapes of certain type participating in operation + Standard_EXPORT NbShapes getNbShapes() const; + + //! Filling steps for constant operations + Standard_EXPORT void fillPIConstants(const Standard_Real theWhole, BOPAlgo_PISteps& theSteps) const Standard_OVERRIDE; + + //! Filling steps for all other operations + Standard_EXPORT void fillPISteps(BOPAlgo_PISteps& theSteps) const Standard_OVERRIDE; protected: //! @name Methods for building the result //! Performs the building of the result. //! The method calls the PerformInternal1() method surrounded by a try-catch block. - Standard_EXPORT virtual void PerformInternal (const BOPAlgo_PaveFiller& thePF); + Standard_EXPORT virtual void PerformInternal (const BOPAlgo_PaveFiller& thePF, const Message_ProgressRange& theRange); //! Performs the building of the result. //! To build the result of any other operation //! it will be necessary to override this method. - Standard_EXPORT virtual void PerformInternal1 (const BOPAlgo_PaveFiller& thePF); + Standard_EXPORT virtual void PerformInternal1 (const BOPAlgo_PaveFiller& thePF, const Message_ProgressRange& theRange); //! Builds the result of operation. //! The method is called for each of the arguments type and @@ -367,19 +434,19 @@ protected: //! @name Checking input arguments protected: //! @name Fill Images of VERTICES //! Fills the images of vertices. - Standard_EXPORT void FillImagesVertices(); + Standard_EXPORT void FillImagesVertices(const Message_ProgressRange& theRange); protected: //! @name Fill Images of EDGES //! Fills the images of edges. - Standard_EXPORT void FillImagesEdges(); + Standard_EXPORT void FillImagesEdges(const Message_ProgressRange& theRange); protected: //! @name Fill Images of CONTAINERS //! Fills the images of containers (WIRES/SHELLS/COMPSOLID). - Standard_EXPORT void FillImagesContainers (const TopAbs_ShapeEnum theType); + Standard_EXPORT void FillImagesContainers (const TopAbs_ShapeEnum theType, const Message_ProgressRange& theRange); //! Builds the image of the given container using the splits //! of its sub-shapes. @@ -393,19 +460,19 @@ protected: //! @name Fill Images of FACES //! 1. Build the splits of faces; //! 2. Find SD faces; //! 3. Add internal vertices (if any) to faces. - Standard_EXPORT void FillImagesFaces(); + Standard_EXPORT void FillImagesFaces(const Message_ProgressRange& theRange); //! Builds the splits of faces using the information from the //! intersection stage stored in Data Structure. - Standard_EXPORT virtual void BuildSplitFaces(); + Standard_EXPORT virtual void BuildSplitFaces(const Message_ProgressRange& theRange); //! Looks for the same domain faces among the splits of the faces. //! Updates the map of images with SD faces. - Standard_EXPORT void FillSameDomainFaces(); + Standard_EXPORT void FillSameDomainFaces(const Message_ProgressRange& theRange); //! Classifies the alone vertices on faces relatively its splits //! and adds them as INTERNAL into the splits. - Standard_EXPORT void FillInternalVertices(); + Standard_EXPORT void FillInternalVertices(const Message_ProgressRange& theRange); protected: //! @name Fill Images of SOLIDS @@ -416,7 +483,7 @@ protected: //! @name Fill Images of SOLIDS //! 2. Find faces from other arguments located inside the solids; //! 3. Build splits of solid using the inside faces; //! 4. Fill internal shapes for the splits (Wires and vertices). - Standard_EXPORT void FillImagesSolids(); + Standard_EXPORT void FillImagesSolids(const Message_ProgressRange& theRange); //! Builds the draft solid by rebuilding the shells of the solid //! with the splits of faces. @@ -425,21 +492,23 @@ protected: //! @name Fill Images of SOLIDS TopTools_ListOfShape& theLIF); //! Finds faces located inside each solid. - Standard_EXPORT virtual void FillIn3DParts(TopTools_DataMapOfShapeShape& theDraftSolids); + Standard_EXPORT virtual void FillIn3DParts(TopTools_DataMapOfShapeShape& theDraftSolids, + const Message_ProgressRange& theRange); //! Builds the splits of the solids using their draft versions //! and faces located inside. - Standard_EXPORT void BuildSplitSolids(TopTools_DataMapOfShapeShape& theDraftSolids); + Standard_EXPORT void BuildSplitSolids(TopTools_DataMapOfShapeShape& theDraftSolids, + const Message_ProgressRange& theRange); //! Classifies the vertices and edges from the arguments relatively //! splits of solids and makes them INTERNAL for solids. - Standard_EXPORT void FillInternalShapes(); + Standard_EXPORT void FillInternalShapes(const Message_ProgressRange& theRange); protected: //! @name Fill Images of COMPOUNDS //! Fills the images of compounds. - Standard_EXPORT void FillImagesCompounds(); + Standard_EXPORT void FillImagesCompounds(const Message_ProgressRange& theRange); //! Builds the image of the given compound. Standard_EXPORT void FillImagesCompound (const TopoDS_Shape& theS, @@ -450,8 +519,7 @@ protected: //! @name Post treatment //! Post treatment of the result of the operation. //! The method checks validity of the sub-shapes of the result //! and updates the tolerances to make them valid. - Standard_EXPORT virtual void PostTreat(); - + Standard_EXPORT virtual void PostTreat(const Message_ProgressRange& theRange); protected: //! @name Fields diff --git a/src/BOPAlgo/BOPAlgo_BuilderArea.hxx b/src/BOPAlgo/BOPAlgo_BuilderArea.hxx index ae818a50a8..5f12f43cb6 100644 --- a/src/BOPAlgo/BOPAlgo_BuilderArea.hxx +++ b/src/BOPAlgo/BOPAlgo_BuilderArea.hxx @@ -80,13 +80,13 @@ protected: Standard_EXPORT BOPAlgo_BuilderArea(const Handle(NCollection_BaseAllocator)& theAllocator); - virtual void PerformShapesToAvoid() = 0; + virtual void PerformShapesToAvoid(const Message_ProgressRange& theRange) = 0; - virtual void PerformLoops() = 0; + virtual void PerformLoops(const Message_ProgressRange& theRange) = 0; - virtual void PerformAreas() = 0; + virtual void PerformAreas(const Message_ProgressRange& theRange) = 0; - virtual void PerformInternalShapes() = 0; + virtual void PerformInternalShapes(const Message_ProgressRange& theRange) = 0; Handle(IntTools_Context) myContext; diff --git a/src/BOPAlgo/BOPAlgo_BuilderFace.cxx b/src/BOPAlgo/BOPAlgo_BuilderFace.cxx index 8fe38f13ff..46addcede5 100644 --- a/src/BOPAlgo/BOPAlgo_BuilderFace.cxx +++ b/src/BOPAlgo/BOPAlgo_BuilderFace.cxx @@ -141,8 +141,10 @@ void BOPAlgo_BuilderFace::CheckData() //function : Perform //purpose : //======================================================================= -void BOPAlgo_BuilderFace::Perform() +void BOPAlgo_BuilderFace::Perform(const Message_ProgressRange& theRange) { + Message_ProgressScope aPS (theRange, NULL, 100); + GetReport()->Clear(); // CheckData(); @@ -150,39 +152,28 @@ void BOPAlgo_BuilderFace::Perform() return; } // - UserBreak(); - // - PerformShapesToAvoid(); + PerformShapesToAvoid (aPS.Next(1)); if (HasErrors()) { return; } // - UserBreak(); - // - PerformLoops(); + PerformLoops (aPS.Next(10)); if (HasErrors()) { return; } // - UserBreak(); - // - PerformAreas(); + PerformAreas (aPS.Next(80)); if (HasErrors()) { return; } // - UserBreak(); - // - PerformInternalShapes(); - if (HasErrors()) { - return; - } + PerformInternalShapes(aPS.Next(9)); } //======================================================================= //function :PerformShapesToAvoid //purpose : //======================================================================= -void BOPAlgo_BuilderFace::PerformShapesToAvoid() +void BOPAlgo_BuilderFace::PerformShapesToAvoid(const Message_ProgressRange& theRange) { Standard_Boolean bFound; Standard_Integer i, iCnt, aNbV, aNbE; @@ -191,8 +182,15 @@ void BOPAlgo_BuilderFace::PerformShapesToAvoid() // myShapesToAvoid.Clear(); // + Message_ProgressScope aPS(theRange, NULL, 1); + // iCnt=0; for(;;) { + if (UserBreak(aPS)) + { + return; + } + ++iCnt; bFound=Standard_False; // @@ -247,15 +245,13 @@ void BOPAlgo_BuilderFace::PerformShapesToAvoid() if (!bFound) { break; } - // - }//while (1) - //printf(" EdgesToAvoid=%d, iCnt=%d\n", EdgesToAvoid.Extent(), iCnt); + } } //======================================================================= //function : PerformLoops //purpose : //======================================================================= -void BOPAlgo_BuilderFace::PerformLoops() +void BOPAlgo_BuilderFace::PerformLoops(const Message_ProgressRange& theRange) { Standard_Boolean bFlag; Standard_Integer i, aNbEA; @@ -267,6 +263,8 @@ void BOPAlgo_BuilderFace::PerformLoops() BOPAlgo_WireEdgeSet aWES(myAllocator); BOPAlgo_WireSplitter aWSp(myAllocator); // + Message_ProgressScope aMainScope(theRange, "Making wires", 10); + // // 1. myLoops.Clear(); aWES.SetFace(myFace); @@ -282,7 +280,7 @@ void BOPAlgo_BuilderFace::PerformLoops() aWSp.SetWES(aWES); aWSp.SetRunParallel(myRunParallel); aWSp.SetContext(myContext); - aWSp.Perform(); + aWSp.Perform(aMainScope.Next(9)); if (aWSp.HasErrors()) { return; } @@ -306,6 +304,9 @@ void BOPAlgo_BuilderFace::PerformLoops() aMEP.Add(aE); } } + if (UserBreak (aMainScope)) { + return; + } // // b. collect all edges that are to avoid aNbEA = myShapesToAvoid.Extent(); @@ -323,16 +324,19 @@ void BOPAlgo_BuilderFace::PerformLoops() } } // + if (UserBreak (aMainScope)) { + return; + } // 2. Internal Wires myLoopsInternal.Clear(); // aNbEA = myShapesToAvoid.Extent(); for (i = 1; i <= aNbEA; ++i) { const TopoDS_Shape& aEE = myShapesToAvoid(i); - TopExp::MapShapesAndAncestors(aEE, - TopAbs_VERTEX, - TopAbs_EDGE, - aVEMap); + TopExp::MapShapesAndAncestors(aEE, + TopAbs_VERTEX, + TopAbs_EDGE, + aVEMap); } // bFlag=Standard_True; @@ -342,6 +346,9 @@ void BOPAlgo_BuilderFace::PerformLoops() continue; } // + if (UserBreak (aMainScope)) { + return; + } // make new wire TopoDS_Wire aW; aBB.MakeWire(aW); @@ -375,7 +382,7 @@ void BOPAlgo_BuilderFace::PerformLoops() //function : PerformAreas //purpose : //======================================================================= -void BOPAlgo_BuilderFace::PerformAreas() +void BOPAlgo_BuilderFace::PerformAreas(const Message_ProgressRange& theRange) { myAreas.Clear(); BRep_Builder aBB; @@ -386,6 +393,8 @@ void BOPAlgo_BuilderFace::PerformAreas() // Get tolerance of myFace Standard_Real aTol = BRep_Tool::Tolerance(myFace); + Message_ProgressScope aMainScope (theRange, NULL, 10); + // Check if there are no loops at all if (myLoops.IsEmpty()) { @@ -410,9 +419,15 @@ void BOPAlgo_BuilderFace::PerformAreas() TopTools_IndexedMapOfShape aMHE; // Analyze the new wires - classify them to be the holes and growths + Message_ProgressScope aPSClass(aMainScope.Next(5), "Making faces", myLoops.Size()); TopTools_ListIteratorOfListOfShape aItLL(myLoops); - for (; aItLL.More(); aItLL.Next()) + for (; aItLL.More(); aItLL.Next(), aPSClass.Next()) { + if (UserBreak(aPSClass)) + { + return; + } + const TopoDS_Shape& aWire = aItLL.Value(); TopoDS_Face aFace; @@ -471,9 +486,14 @@ void BOPAlgo_BuilderFace::PerformAreas() BOPTools_Box2dTreeSelector aSelector; aSelector.SetBVHSet (&aBoxTree); + Message_ProgressScope aPSHoles(aMainScope.Next(4), "Adding holes", aNewFaces.Extent()); TopTools_ListIteratorOfListOfShape aItLS(aNewFaces); - for (; aItLS.More(); aItLS.Next()) + for (; aItLS.More(); aItLS.Next(), aPSHoles.Next()) { + if (UserBreak (aPSHoles)) + { + return; + } const TopoDS_Face& aFace = TopoDS::Face(aItLS.Value()); // Build box @@ -550,9 +570,15 @@ void BOPAlgo_BuilderFace::PerformAreas() } // Add Holes to Faces and add them to myAreas + Message_ProgressScope aPSU (aMainScope.Next(), NULL, aNewFaces.Size()); aItLS.Initialize(aNewFaces); - for ( ; aItLS.More(); aItLS.Next()) + for ( ; aItLS.More(); aItLS.Next(), aPSU.Next()) { + if (UserBreak (aPSU)) + { + return; + } + TopoDS_Face& aFace = *(TopoDS_Face*)&aItLS.Value(); const TopTools_ListOfShape* pLHoles = aFaceHolesMap.Seek(aFace); if (pLHoles) @@ -579,7 +605,7 @@ void BOPAlgo_BuilderFace::PerformAreas() //function : PerformInternalShapes //purpose : //======================================================================= -void BOPAlgo_BuilderFace::PerformInternalShapes() +void BOPAlgo_BuilderFace::PerformInternalShapes(const Message_ProgressRange& theRange) { if (myAvoidInternalShapes) // User-defined option to avoid internal edges @@ -596,10 +622,17 @@ void BOPAlgo_BuilderFace::PerformInternalShapes() // Map of edges to classify TopTools_IndexedMapOfShape anEdgesMap; + // Main progress scope + Message_ProgressScope aMainScope (theRange, "Adding internal shapes", 3); + // Fill the tree and the map TopTools_ListIteratorOfListOfShape itLE(myLoopsInternal); for (; itLE.More(); itLE.Next()) { + if (UserBreak (aMainScope)) + { + return; + } TopoDS_Iterator itE(itLE.Value()); for (; itE.More(); itE.Next()) { @@ -618,13 +651,20 @@ void BOPAlgo_BuilderFace::PerformInternalShapes() // Build BVH aBoxTree.Build(); + aMainScope.Next(); + // Fence map TColStd_MapOfInteger aMEDone; // Classify edges relatively faces + Message_ProgressScope aPSClass(aMainScope.Next(), NULL, myAreas.Size()); TopTools_ListIteratorOfListOfShape itLF(myAreas); - for (; itLF.More(); itLF.Next()) + for (; itLF.More(); itLF.Next(), aPSClass.Next()) { + if (UserBreak(aPSClass)) + { + return; + } TopoDS_Face& aF = *(TopoDS_Face*)&itLF.Value(); // Build box diff --git a/src/BOPAlgo/BOPAlgo_BuilderFace.hxx b/src/BOPAlgo/BOPAlgo_BuilderFace.hxx index 4ded4e6cc3..4823d587cf 100644 --- a/src/BOPAlgo/BOPAlgo_BuilderFace.hxx +++ b/src/BOPAlgo/BOPAlgo_BuilderFace.hxx @@ -54,7 +54,7 @@ Standard_EXPORT virtual ~BOPAlgo_BuilderFace(); Standard_EXPORT const TopoDS_Face& Face() const; //! Performs the algorithm - Standard_EXPORT virtual void Perform() Standard_OVERRIDE; + Standard_EXPORT virtual void Perform(const Message_ProgressRange& theRange = Message_ProgressRange()) Standard_OVERRIDE; Standard_EXPORT TopAbs_Orientation Orientation() const; @@ -63,40 +63,27 @@ protected: //! Collect the edges that //! a) are internal //! b) are the same and have different orientation - Standard_EXPORT virtual void PerformShapesToAvoid() Standard_OVERRIDE; + Standard_EXPORT virtual void PerformShapesToAvoid(const Message_ProgressRange& theRange) Standard_OVERRIDE; //! Build draft wires //! a)myLoops - draft wires that consist of //! boundary edges //! b)myLoopsInternal - draft wires that contains //! inner edges - Standard_EXPORT virtual void PerformLoops() Standard_OVERRIDE; + Standard_EXPORT virtual void PerformLoops(const Message_ProgressRange& theRange) Standard_OVERRIDE; //! Build draft faces that contains boundary edges - Standard_EXPORT virtual void PerformAreas() Standard_OVERRIDE; + Standard_EXPORT virtual void PerformAreas(const Message_ProgressRange& theRange) Standard_OVERRIDE; //! Build finalized faces with internals - Standard_EXPORT virtual void PerformInternalShapes() Standard_OVERRIDE; + Standard_EXPORT virtual void PerformInternalShapes(const Message_ProgressRange& theRange) Standard_OVERRIDE; Standard_EXPORT virtual void CheckData() Standard_OVERRIDE; +protected: TopoDS_Face myFace; TopAbs_Orientation myOrientation; - - -private: - - - - - }; - - - - - - #endif // _BOPAlgo_BuilderFace_HeaderFile diff --git a/src/BOPAlgo/BOPAlgo_BuilderSolid.cxx b/src/BOPAlgo/BOPAlgo_BuilderSolid.cxx index a024a4f2ca..4dfe15c897 100644 --- a/src/BOPAlgo/BOPAlgo_BuilderSolid.cxx +++ b/src/BOPAlgo/BOPAlgo_BuilderSolid.cxx @@ -106,8 +106,10 @@ BOPAlgo_BuilderSolid::~BOPAlgo_BuilderSolid() //function : Perform //purpose : //======================================================================= -void BOPAlgo_BuilderSolid::Perform() +void BOPAlgo_BuilderSolid::Perform(const Message_ProgressRange& theRange) { + Message_ProgressScope aPS (theRange, NULL, 100); + GetReport()->Clear(); // if (myShapes.IsEmpty()) @@ -130,39 +132,28 @@ void BOPAlgo_BuilderSolid::Perform() aBB.Add(aC, aF); } // - UserBreak(); - // - PerformShapesToAvoid(); + PerformShapesToAvoid (aPS.Next(1)); if (HasErrors()) { return; } // - UserBreak(); - // - PerformLoops(); + PerformLoops (aPS.Next(10)); if (HasErrors()) { return; } // - UserBreak(); - // - PerformAreas(); + PerformAreas (aPS.Next(80)); if (HasErrors()) { return; } // - UserBreak(); - // - PerformInternalShapes(); - if (HasErrors()) { - return; - } + PerformInternalShapes (aPS.Next(9)); } //======================================================================= //function :PerformShapesToAvoid //purpose : //======================================================================= -void BOPAlgo_BuilderSolid::PerformShapesToAvoid() +void BOPAlgo_BuilderSolid::PerformShapesToAvoid(const Message_ProgressRange& theRange) { Standard_Boolean bFound; Standard_Integer i, iCnt, aNbE, aNbF; @@ -172,8 +163,13 @@ void BOPAlgo_BuilderSolid::PerformShapesToAvoid() // myShapesToAvoid.Clear(); // + Message_ProgressScope aPS(theRange, NULL, 1); + // iCnt=0; for(;;) { + if (UserBreak(aPS)) { + return; + } ++iCnt; bFound=Standard_False; // @@ -242,7 +238,7 @@ void BOPAlgo_BuilderSolid::PerformShapesToAvoid() //function : PerformLoops //purpose : //======================================================================= -void BOPAlgo_BuilderSolid::PerformLoops() +void BOPAlgo_BuilderSolid::PerformLoops(const Message_ProgressRange& theRange) { Standard_Integer i, aNbSh; TopTools_ListIteratorOfListOfShape aIt; @@ -255,7 +251,9 @@ void BOPAlgo_BuilderSolid::PerformLoops() NCollection_BaseAllocator::CommonBaseAllocator(); BOPAlgo_ShellSplitter aSSp(aAlr); // - // 1. Shells Usual + Message_ProgressScope aMainScope (theRange, "Building shells", 10); + + // 1. Shells Usual aIt.Initialize (myShapes); for (; aIt.More(); aIt.Next()) { const TopoDS_Face& aF=*((TopoDS_Face*)&aIt.Value()); @@ -275,9 +273,10 @@ void BOPAlgo_BuilderSolid::PerformLoops() } // aSSp.SetRunParallel(myRunParallel); - aSSp.Perform(); + aSSp.Perform(aMainScope.Next(9)); if (aSSp.HasErrors()) { // add warning status + if (aMainScope.More()) { TopoDS_Compound aFacesSp; BRep_Builder().MakeCompound(aFacesSp); @@ -314,6 +313,9 @@ void BOPAlgo_BuilderSolid::PerformLoops() aMP.Add(aF); } } + if (UserBreak (aMainScope)) { + return; + } // // b. collect all edges that are to avoid aNbSh = myShapesToAvoid.Extent(); @@ -333,6 +335,9 @@ void BOPAlgo_BuilderSolid::PerformLoops() } } //================================================= + if (UserBreak (aMainScope)) { + return; + } // // 3.Internal Shells myLoopsInternal.Clear(); @@ -349,6 +354,9 @@ void BOPAlgo_BuilderSolid::PerformLoops() } // for (i = 1; i <= aNbSh; ++i) { + if (UserBreak(aMainScope)) { + return; + } const TopoDS_Shape& aFF = myShapesToAvoid(i); if (!AddedFacesMap.Add(aFF)) { continue; @@ -385,7 +393,7 @@ void BOPAlgo_BuilderSolid::PerformLoops() //function : PerformAreas //purpose : //======================================================================= -void BOPAlgo_BuilderSolid::PerformAreas() +void BOPAlgo_BuilderSolid::PerformAreas(const Message_ProgressRange& theRange) { myAreas.Clear(); BRep_Builder aBB; @@ -397,10 +405,17 @@ void BOPAlgo_BuilderSolid::PerformAreas() // If the analyzed shell contains any of the hole faces, it is considered as growth. TopTools_IndexedMapOfShape aMHF; + Message_ProgressScope aMainScope(theRange, "Building solids", 10); + // Analyze the shells + Message_ProgressScope aPSClass(aMainScope.Next(5), "Classify solids", myLoops.Size()); TopTools_ListIteratorOfListOfShape aItLL(myLoops); - for (; aItLL.More(); aItLL.Next()) + for (; aItLL.More(); aItLL.Next(), aPSClass.Next()) { + if (UserBreak (aPSClass)) + { + return; + } const TopoDS_Shape& aShell = aItLL.Value(); Standard_Boolean bIsGrowth = IsGrowthShell(aShell, aMHF); @@ -464,9 +479,14 @@ void BOPAlgo_BuilderSolid::PerformAreas() // Find outer growth shell that is most close to each hole shell TopTools_IndexedDataMapOfShapeShape aHoleSolidMap; + Message_ProgressScope aPSH(aMainScope.Next(4), "Adding holes", aNewSolids.Size()); TopTools_ListIteratorOfListOfShape aItLS(aNewSolids); - for (; aItLS.More(); aItLS.Next()) + for (; aItLS.More(); aItLS.Next(), aPSH.Next()) { + if (UserBreak (aPSH)) + { + return; + } const TopoDS_Shape& aSolid = aItLS.Value(); // Build box @@ -522,9 +542,14 @@ void BOPAlgo_BuilderSolid::PerformAreas() } // Add Holes to Solids and add them to myAreas + Message_ProgressScope aPSU (aMainScope.Next(), NULL, aNewSolids.Size()); aItLS.Initialize(aNewSolids); - for ( ; aItLS.More(); aItLS.Next()) + for ( ; aItLS.More(); aItLS.Next(), aPSU.Next()) { + if (UserBreak (aPSU)) + { + return; + } TopoDS_Solid& aSolid = *(TopoDS_Solid*)&aItLS.Value(); const TopTools_ListOfShape* pLHoles = aSolidHolesMap.Seek(aSolid); if (pLHoles) @@ -569,7 +594,7 @@ void BOPAlgo_BuilderSolid::PerformAreas() //function : PerformInternalShapes //purpose : //======================================================================= -void BOPAlgo_BuilderSolid::PerformInternalShapes() +void BOPAlgo_BuilderSolid::PerformInternalShapes(const Message_ProgressRange& theRange) { if (myAvoidInternalShapes) // user-defined option to avoid internal parts is in force @@ -579,6 +604,8 @@ void BOPAlgo_BuilderSolid::PerformInternalShapes() // no internal parts return; + Message_ProgressScope aMainScope (theRange, "Adding internal shapes", 2); + // Get all faces to classify TopTools_IndexedMapOfShape aMFs; TopTools_ListIteratorOfListOfShape aItLS(myLoopsInternal); @@ -610,6 +637,11 @@ void BOPAlgo_BuilderSolid::PerformInternalShapes() return; } + if (UserBreak (aMainScope)) + { + return; + } + // Classify faces relatively solids // Prepare list of faces to classify @@ -622,15 +654,27 @@ void BOPAlgo_BuilderSolid::PerformInternalShapes() TopTools_IndexedDataMapOfShapeListOfShape aMSLF; // Perform classification - BOPAlgo_Tools::ClassifyFaces(aLFaces, myAreas, myRunParallel, myContext, aMSLF, myBoxes); + BOPAlgo_Tools::ClassifyFaces(aLFaces, + myAreas, + myRunParallel, + myContext, + aMSLF, + myBoxes, + TopTools_DataMapOfShapeListOfShape(), + aMainScope.Next()); // Update Solids by internal Faces TopTools_MapOfShape aMFDone; Standard_Integer aNbS = aMSLF.Extent(); - for (i = 1; i <= aNbS; ++i) + Message_ProgressScope aPSLoop(aMainScope.Next(), NULL, aNbS); + for (i = 1; i <= aNbS; ++i, aPSLoop.Next()) { + if (UserBreak (aPSLoop)) + { + return; + } const TopoDS_Shape& aSolid = aMSLF.FindKey(i); TopoDS_Shape *pSolid = (TopoDS_Shape*)&aSolid; diff --git a/src/BOPAlgo/BOPAlgo_BuilderSolid.hxx b/src/BOPAlgo/BOPAlgo_BuilderSolid.hxx index 756d1861e8..1a8e3cea84 100644 --- a/src/BOPAlgo/BOPAlgo_BuilderSolid.hxx +++ b/src/BOPAlgo/BOPAlgo_BuilderSolid.hxx @@ -96,7 +96,7 @@ public: //! @name Constructors public: //! @name Performing the operation //! Performs the construction of the solids from the given faces - Standard_EXPORT virtual void Perform() Standard_OVERRIDE; + Standard_EXPORT virtual void Perform(const Message_ProgressRange& theRange = Message_ProgressRange()) Standard_OVERRIDE; public: //! @name Getting the bounding boxes of the created solids @@ -114,23 +114,23 @@ protected: //! @name Protected methods performing the operation //! - that are alone but given twice with different orientation. //! These faces will be put into the map *myShapesToAvoid* and will be //! avoided in shells construction, but will be classified later on. - Standard_EXPORT virtual void PerformShapesToAvoid() Standard_OVERRIDE; + Standard_EXPORT virtual void PerformShapesToAvoid(const Message_ProgressRange& theRange) Standard_OVERRIDE; //! Build all possible closed shells from the given faces. //! The method fills the following maps: //! - myLoops - Created closed shells; //! - myLoopsInternal - The shells created from unused faces. - Standard_EXPORT virtual void PerformLoops() Standard_OVERRIDE; + Standard_EXPORT virtual void PerformLoops(const Message_ProgressRange& theRange) Standard_OVERRIDE; //! Classifies the created shells on the Holes and Growths. //! Creates the solids from the Growths shells. //! Puts the Hole shells into the closest Growths solids. - Standard_EXPORT virtual void PerformAreas() Standard_OVERRIDE; + Standard_EXPORT virtual void PerformAreas(const Message_ProgressRange& theRange) Standard_OVERRIDE; //! Classifies the unused faces relatively the created solids. //! Puts the classified faces into the closest solids as internal shells. //! Warns the user about unclassified faces if any. - Standard_EXPORT virtual void PerformInternalShapes() Standard_OVERRIDE; + Standard_EXPORT virtual void PerformInternalShapes(const Message_ProgressRange& theRange) Standard_OVERRIDE; private: diff --git a/src/BOPAlgo/BOPAlgo_Builder_1.cxx b/src/BOPAlgo/BOPAlgo_Builder_1.cxx index 90767d6982..f343f9d274 100644 --- a/src/BOPAlgo/BOPAlgo_Builder_1.cxx +++ b/src/BOPAlgo/BOPAlgo_Builder_1.cxx @@ -38,11 +38,16 @@ //function : FillImagesVertices //purpose : //======================================================================= -void BOPAlgo_Builder::FillImagesVertices() +void BOPAlgo_Builder::FillImagesVertices(const Message_ProgressRange& theRange) { + Message_ProgressScope aPS(theRange, "Filling splits of vertices", myDS->ShapesSD().Size()); TColStd_DataMapIteratorOfDataMapOfIntegerInteger aIt(myDS->ShapesSD()); - for (; aIt.More(); aIt.Next()) + for (; aIt.More(); aIt.Next(), aPS.Next()) { + if (UserBreak(aPS)) + { + return; + } Standard_Integer nV = aIt.Key(); Standard_Integer nVSD = aIt.Value(); @@ -63,10 +68,11 @@ void BOPAlgo_Builder::FillImagesVertices() //function : FillImagesEdges //purpose : //======================================================================= - void BOPAlgo_Builder::FillImagesEdges() + void BOPAlgo_Builder::FillImagesEdges(const Message_ProgressRange& theRange) { Standard_Integer i, aNbS = myDS->NbSourceShapes(); - for (i = 0; i < aNbS; ++i) { + Message_ProgressScope aPS(theRange, "Filling splits of edges", aNbS); + for (i = 0; i < aNbS; ++i, aPS.Next()) { const BOPDS_ShapeInfo& aSI = myDS->ShapeInfo(i); if (aSI.ShapeType() != TopAbs_EDGE) { continue; @@ -106,6 +112,10 @@ void BOPAlgo_Builder::FillImagesVertices() myShapesSD.Bind(aSp, aSpR); } } + if (UserBreak(aPS)) + { + return; + } } } //======================================================================= @@ -149,36 +159,46 @@ void BOPAlgo_Builder::BuildResult(const TopAbs_ShapeEnum theType) // function: FillImagesContainers // purpose: //======================================================================= - void BOPAlgo_Builder::FillImagesContainers(const TopAbs_ShapeEnum theType) + void BOPAlgo_Builder::FillImagesContainers(const TopAbs_ShapeEnum theType, const Message_ProgressRange& theRange) { Standard_Integer i, aNbS; TopTools_MapOfShape aMFP(100, myAllocator); // aNbS=myDS->NbSourceShapes(); + Message_ProgressScope aPS(theRange, "Building splits of containers", 1); for (i=0; iShapeInfo(i); if (aSI.ShapeType()==theType) { const TopoDS_Shape& aC=aSI.Shape(); FillImagesContainer(aC, theType); } + if (UserBreak(aPS)) + { + return; + } }// for (; aItS.More(); aItS.Next()) { } //======================================================================= // function: FillImagesCompounds // purpose: //======================================================================= - void BOPAlgo_Builder::FillImagesCompounds() + void BOPAlgo_Builder::FillImagesCompounds(const Message_ProgressRange& theRange) { Standard_Integer i, aNbS; TopTools_MapOfShape aMFP(100, myAllocator); // aNbS=myDS->NbSourceShapes(); - for (i=0; iShapeInfo(i); if (aSI.ShapeType()==TopAbs_COMPOUND) { const TopoDS_Shape& aC=aSI.Shape(); FillImagesCompound(aC, aMFP); } + if (UserBreak(aPS)) + { + return; + } }// for (; aItS.More(); aItS.Next()) { } //======================================================================= diff --git a/src/BOPAlgo/BOPAlgo_Builder_2.cxx b/src/BOPAlgo/BOPAlgo_Builder_2.cxx index a0a2fc870c..186cd88399 100644 --- a/src/BOPAlgo/BOPAlgo_Builder_2.cxx +++ b/src/BOPAlgo/BOPAlgo_Builder_2.cxx @@ -69,13 +69,13 @@ static //class : BOPAlgo_PairOfShapeBoolean //purpose : //======================================================================= -class BOPAlgo_PairOfShapeBoolean : public BOPAlgo_Algo { +class BOPAlgo_PairOfShapeBoolean : public BOPAlgo_ParallelAlgo { public: DEFINE_STANDARD_ALLOC BOPAlgo_PairOfShapeBoolean() : - BOPAlgo_Algo(), + BOPAlgo_ParallelAlgo(), myFlag(Standard_False) { } // @@ -103,8 +103,12 @@ class BOPAlgo_PairOfShapeBoolean : public BOPAlgo_Algo { } // virtual void Perform() { - BOPAlgo_Algo::UserBreak(); - // + Message_ProgressScope aPS(myProgressRange, NULL, 1); + if (UserBreak(aPS)) + { + return; + } + const TopoDS_Face& aFj=*((TopoDS_Face*)&myShape1); const TopoDS_Face& aFk=*((TopoDS_Face*)&myShape2); myFlag=BOPTools_AlgoTools::AreFacesSameDomain(aFj, aFk, myContext, myFuzzyValue); @@ -120,21 +124,49 @@ class BOPAlgo_PairOfShapeBoolean : public BOPAlgo_Algo { typedef NCollection_Vector BOPAlgo_VectorOfPairOfShapeBoolean; //======================================================================= -// BuilderFace -// -typedef NCollection_Vector BOPAlgo_VectorOfBuilderFace; +//class : BOPAlgo_SplitFace +//purpose : Auxiliary class to extend BOPAlgo_BuilderFace with progress support +//======================================================================= +class BOPAlgo_SplitFace : public BOPAlgo_BuilderFace +{ +public: + //! Sets progress range + void SetProgressRange(const Message_ProgressRange& theRange) + { + myRange = theRange; + } + + // New perform method, using own progress range + void Perform() + { + Message_ProgressScope aPS(myRange, NULL, 1); + if (!aPS.More()) + { + return; + } + BOPAlgo_BuilderFace::Perform(aPS.Next()); + } + +private: + //! Disable the range enabled method + virtual void Perform(const Message_ProgressRange& /*theRange*/) {}; + +private: + Message_ProgressRange myRange; +}; +typedef NCollection_Vector BOPAlgo_VectorOfBuilderFace; //======================================================================= //class : BOPAlgo_VFI //purpose : //======================================================================= -class BOPAlgo_VFI : public BOPAlgo_Algo { +class BOPAlgo_VFI : public BOPAlgo_ParallelAlgo { public: DEFINE_STANDARD_ALLOC BOPAlgo_VFI() : - BOPAlgo_Algo(), + BOPAlgo_ParallelAlgo(), myIsInternal(Standard_False) { } // @@ -170,9 +202,14 @@ class BOPAlgo_VFI : public BOPAlgo_Algo { } // virtual void Perform() { + Message_ProgressScope aPS(myProgressRange, NULL, 1); + if (UserBreak(aPS)) + { + return; + } + Standard_Real aT1, aT2, dummy; // - BOPAlgo_Algo::UserBreak(); Standard_Integer iFlag = myContext->ComputeVF(myV, myF, aT1, aT2, dummy, myFuzzyValue); myIsInternal = (iFlag == 0); @@ -191,17 +228,26 @@ typedef NCollection_Vector BOPAlgo_VectorOfVFI; //function : FillImagesFaces //purpose : //======================================================================= -void BOPAlgo_Builder::FillImagesFaces() +void BOPAlgo_Builder::FillImagesFaces(const Message_ProgressRange& theRange) { - BuildSplitFaces(); - FillSameDomainFaces(); - FillInternalVertices(); + Message_ProgressScope aPS(theRange, "Filing spligs of faces", 10); + BuildSplitFaces(aPS.Next(9)); + if (HasErrors()) + { + return; + } + FillSameDomainFaces(aPS.Next(0.5)); + if (HasErrors()) + { + return; + } + FillInternalVertices(aPS.Next(0.5)); } //======================================================================= //function : BuildSplitFaces //purpose : //======================================================================= -void BOPAlgo_Builder::BuildSplitFaces() +void BOPAlgo_Builder::BuildSplitFaces(const Message_ProgressRange& theRange) { Standard_Boolean bHasFaceInfo, bIsClosed, bIsDegenerated, bToReverse; Standard_Integer i, j, k, aNbS, aNbPBIn, aNbPBOn, aNbPBSc, aNbAV, nSp; @@ -222,6 +268,7 @@ void BOPAlgo_Builder::BuildSplitFaces() TopTools_ListOfShape aLE(aAllocator); TopTools_MapOfShape aMDE(100, aAllocator); // + Message_ProgressScope aPSOuter(theRange, NULL, 10); // Build temporary map of faces images to avoid rebuilding // of the faces without any IN or section edges NCollection_IndexedDataMap aFacesIm; @@ -233,6 +280,10 @@ void BOPAlgo_Builder::BuildSplitFaces() if (aSI.ShapeType()!=TopAbs_FACE) { continue; } + if (UserBreak(aPSOuter)) + { + return; + } // const TopoDS_Face& aF=(*(TopoDS_Face*)(&aSI.Shape())); Standard_Boolean isUClosed = Standard_False, @@ -446,22 +497,31 @@ void BOPAlgo_Builder::BuildSplitFaces() BRepLib::BuildPCurveForEdgesOnPlane(aLE, aFF); } // 3 Build split faces - BOPAlgo_BuilderFace& aBF=aVBF.Appended(); + BOPAlgo_SplitFace& aBF=aVBF.Appended(); aBF.SetFace(aF); aBF.SetShapes(aLE); aBF.SetRunParallel(myRunParallel); - if (myProgressScope != NULL) - { - aBF.SetProgressIndicator(*myProgressScope); - } // }// for (i=0; iShapeInfo(nF); const TopoDS_Shape& aF = aSI.Shape(); @@ -614,6 +684,10 @@ void BOPAlgo_Builder::FillSameDomainFaces() Standard_Integer aNbSets = anESetFaces.Extent(); for (Standard_Integer i = 1; i <= aNbSets; ++i) { + if (UserBreak(aPSOuter)) + { + return; + } const TopTools_ListOfShape& aLF = anESetFaces(i); if (aLF.Extent() < 2) continue; @@ -640,18 +714,26 @@ void BOPAlgo_Builder::FillSameDomainFaces() aPSB.Shape1() = aF1; aPSB.Shape2() = aF2; aPSB.SetFuzzyValue(myFuzzyValue); - if (myProgressScope != NULL) - { - aPSB.SetProgressIndicator(*myProgressScope); - } } } } + aPSOuter.Next(); + + // Set progress range for each task to be run in parallel + Message_ProgressScope aPSParallel(aPSOuter.Next(6), "Checking SD faces", aVPSB.Size()); + for (Standard_Integer iPSB = 0; iPSB < aVPSB.Size(); ++iPSB) + { + aVPSB.ChangeValue(iPSB).SetProgressRange(aPSParallel.Next()); + } //================================================================ // Perform analysis BOPTools_Parallel::Perform (myRunParallel, aVPSB, myContext); //================================================================ + if (UserBreak(aPSOuter)) + { + return; + } NCollection_List aMBlocks(aAllocator); // Fill map with SD faces to make the blocks @@ -669,10 +751,15 @@ void BOPAlgo_Builder::FillSameDomainFaces() BOPAlgo_Tools::MakeBlocks (aDMSLS, aMBlocks, aAllocator); + Message_ProgressScope aPS(aPSOuter.Next(3), "Filling same domain faces map", aMBlocks.Size()); // Fill same domain faces map NCollection_List::Iterator aItB(aMBlocks); - for (; aItB.More(); aItB.Next()) + for (; aItB.More(); aItB.Next(), aPS.Next()) { + if (UserBreak(aPS)) + { + return; + } const TopTools_ListOfShape& aLSD = aItB.Value(); // If the group contains some original faces, the one with minimal // index in the DS will be chosen as the SD for the whole group. @@ -758,8 +845,10 @@ void BOPAlgo_Builder::FillSameDomainFaces() // function: FillImagesFaces1 // purpose: //======================================================================= -void BOPAlgo_Builder::FillInternalVertices() +void BOPAlgo_Builder::FillInternalVertices(const Message_ProgressRange& theRange) { + Message_ProgressScope aPSOuter(theRange, NULL, 1); + // Vector of pairs of Vertex/Face for classification of the vertices // relatively faces, and adding them as internal into the faces BOPAlgo_VectorOfVFI aVVFI; @@ -771,6 +860,11 @@ void BOPAlgo_Builder::FillInternalVertices() if (aSI.ShapeType() != TopAbs_FACE) continue; + if (UserBreak(aPSOuter)) + { + return; + } + const TopoDS_Shape& aF = aSI.Shape(); const TopTools_ListOfShape* pLFIm = myImages.Seek(aF); if (!pLFIm) @@ -796,18 +890,24 @@ void BOPAlgo_Builder::FillInternalVertices() aVFI.SetVertex(aV); aVFI.SetFace(aFIm); aVFI.SetFuzzyValue(myFuzzyValue); - if (myProgressScope != NULL) - { - aVFI.SetProgressIndicator(*myProgressScope); - } } } } + // Set progress range for each task to be run in parallel + Message_ProgressScope aPSParallel(aPSOuter.Next(), "Looking for internal shapes", aVVFI.Size()); + for (Standard_Integer iVFI = 0; iVFI< aVVFI.Size(); ++iVFI) + { + aVVFI.ChangeValue(iVFI).SetProgressRange(aPSParallel.Next()); + } // Perform classification //================================================================ BOPTools_Parallel::Perform (myRunParallel, aVVFI, myContext); //================================================================ + if (UserBreak(aPSOuter)) + { + return; + } Standard_Integer aNbVFI = aVVFI.Length(); for (Standard_Integer i = 0; i < aNbVFI; ++i) diff --git a/src/BOPAlgo/BOPAlgo_Builder_3.cxx b/src/BOPAlgo/BOPAlgo_Builder_3.cxx index f8d5b50999..1a6fd06f3a 100644 --- a/src/BOPAlgo/BOPAlgo_Builder_3.cxx +++ b/src/BOPAlgo/BOPAlgo_Builder_3.cxx @@ -73,40 +73,47 @@ static //function : FillImagesSolids //purpose : //======================================================================= -void BOPAlgo_Builder::FillImagesSolids() +void BOPAlgo_Builder::FillImagesSolids(const Message_ProgressRange& theRange) { - Standard_Boolean bHasSolids; - Standard_Integer i, aNbS; - // - bHasSolids=Standard_False; - aNbS=myDS->NbSourceShapes(); - for (i=0; iShapeInfo(i); - if (aSI.ShapeType()==TopAbs_SOLID) { - bHasSolids=!bHasSolids; + Standard_Integer i = 0, aNbS = myDS->NbSourceShapes(); + for (i = 0; i < aNbS; ++i) { + const BOPDS_ShapeInfo& aSI = myDS->ShapeInfo(i); + if (aSI.ShapeType() == TopAbs_SOLID) + { break; } } - // - if (!bHasSolids) { + if (i >= aNbS) { return; } + Message_ProgressScope aPS(theRange, "Building splits of solids", 10); // Draft solids TopTools_DataMapOfShapeShape aDraftSolids; // Find all IN faces for all IN faces - FillIn3DParts(aDraftSolids); + FillIn3DParts(aDraftSolids, aPS.Next(4)); + if (HasErrors()) + { + return; + } // Build split of the solids - BuildSplitSolids(aDraftSolids); + BuildSplitSolids(aDraftSolids, aPS.Next(5)); + if (HasErrors()) + { + return; + } // Fill solids with internal parts - FillInternalShapes(); + FillInternalShapes(aPS.Next()); } //======================================================================= //function : FillIn3DParts //purpose : //======================================================================= -void BOPAlgo_Builder::FillIn3DParts(TopTools_DataMapOfShapeShape& theDraftSolids) +void BOPAlgo_Builder::FillIn3DParts(TopTools_DataMapOfShapeShape& theDraftSolids, + const Message_ProgressRange& theRange) { + Message_ProgressScope aPS(theRange, NULL, 2); + Handle(NCollection_BaseAllocator) anAlloc = new NCollection_IncAllocator; // Find all faces that are IN solids @@ -127,6 +134,11 @@ void BOPAlgo_Builder::FillIn3DParts(TopTools_DataMapOfShapeShape& theDraftSolids if (aSI.ShapeType() != TopAbs_FACE) continue; + if (UserBreak(aPS)) + { + return; + } + const TopoDS_Shape& aS = aSI.Shape(); const TopTools_ListOfShape* pLSIm = myImages.Seek(aS); @@ -160,8 +172,13 @@ void BOPAlgo_Builder::FillIn3DParts(TopTools_DataMapOfShapeShape& theDraftSolids { BOPDS_ShapeInfo& aSI = myDS->ChangeShapeInfo(i); if (aSI.ShapeType() != TopAbs_SOLID) + { continue; - + } + if (UserBreak(aPS)) + { + return; + } const TopoDS_Shape& aS = aSI.Shape(); const TopoDS_Solid& aSolid = (*(TopoDS_Solid*)(&aS)); // @@ -186,12 +203,17 @@ void BOPAlgo_Builder::FillIn3DParts(TopTools_DataMapOfShapeShape& theDraftSolids TopTools_IndexedDataMapOfShapeListOfShape anInParts; BOPAlgo_Tools::ClassifyFaces(aLFaces, aLSolids, myRunParallel, - myContext, anInParts, aShapeBoxMap, aSolidsIF); + myContext, anInParts, aShapeBoxMap, + aSolidsIF, aPS.Next()); // Analyze the results of classification Standard_Integer aNbSol = aDraftSolid.Extent(); for (i = 1; i <= aNbSol; ++i) { + if (UserBreak(aPS)) + { + return; + } const TopoDS_Solid& aSolid = TopoDS::Solid(aDraftSolid.FindKey(i)); const TopoDS_Solid& aSDraft = TopoDS::Solid(aDraftSolid(i)); const TopTools_ListOfShape& aLInFaces = anInParts.FindFromKey(aSDraft); @@ -335,8 +357,30 @@ class BOPAlgo_SplitSolid : public BOPAlgo_BuilderSolid //! Returns the solid const TopoDS_Solid& Solid() const { return mySolid; } + //! Sets progress range + void SetProgressRange(const Message_ProgressRange& theRange) + { + myRange = theRange; + } + + // New perform method, using own progress range + void Perform() + { + Message_ProgressScope aPS(myRange, NULL, 1); + if (!aPS.More()) + { + return; + } + BOPAlgo_BuilderSolid::Perform(aPS.Next()); + } + +private: + //! Disable the range enabled method + virtual void Perform(const Message_ProgressRange&/* theRange*/) {} + private: TopoDS_Solid mySolid; //!< Solid to split + Message_ProgressRange myRange; }; // Vector of Solid Builders @@ -346,7 +390,8 @@ typedef NCollection_Vector BOPAlgo_VectorOfBuilderSolid; //function : BuildSplitSolids //purpose : //======================================================================= -void BOPAlgo_Builder::BuildSplitSolids(TopTools_DataMapOfShapeShape& theDraftSolids) +void BOPAlgo_Builder::BuildSplitSolids(TopTools_DataMapOfShapeShape& theDraftSolids, + const Message_ProgressRange& theRange) { Standard_Boolean bFlagSD; Standard_Integer i, aNbS; @@ -361,6 +406,7 @@ void BOPAlgo_Builder::BuildSplitSolids(TopTools_DataMapOfShapeShape& theDraftSol BOPTools_MapOfSet aMST(100, aAlr0); BOPAlgo_VectorOfBuilderSolid aVBS; // + Message_ProgressScope aPSOuter (theRange, NULL, 10); // 0. Find same domain solids for non-interfered solids aNbS=myDS->NbSourceShapes(); for (i=0; iNbSourceShapes(); - for (Standard_Integer i = 0; i < aNbS; ++i) + Message_ProgressScope aPS(theRange, "Preparing history information", aNbS); + for (Standard_Integer i = 0; i < aNbS; ++i, aPS.Next()) { const TopoDS_Shape& aS = myDS->Shape(i); @@ -174,6 +175,11 @@ void BOPAlgo_Builder::PrepareHistory() if (!BRepTools_History::IsSupportedType(aS)) continue; + if (UserBreak(aPS)) + { + return; + } + Standard_Boolean isModified = Standard_False; // Check if the shape has any splits diff --git a/src/BOPAlgo/BOPAlgo_CellsBuilder.cxx b/src/BOPAlgo/BOPAlgo_CellsBuilder.cxx index 83e87b2414..e9645238e4 100644 --- a/src/BOPAlgo/BOPAlgo_CellsBuilder.cxx +++ b/src/BOPAlgo/BOPAlgo_CellsBuilder.cxx @@ -102,14 +102,15 @@ const TopoDS_Shape& BOPAlgo_CellsBuilder::GetAllParts() const //function : PerformInternal1 //purpose : //======================================================================= -void BOPAlgo_CellsBuilder::PerformInternal1(const BOPAlgo_PaveFiller& theFiller) +void BOPAlgo_CellsBuilder::PerformInternal1(const BOPAlgo_PaveFiller& theFiller, const Message_ProgressRange& theRange) { // Avoid filling history after GF operation as later // in this method the result shape will be nullified Standard_Boolean isHistory = HasHistory(); SetToFillHistory(Standard_False); // Perform splitting of the arguments - BOPAlgo_Builder::PerformInternal1(theFiller); + Message_ProgressScope aPS(theRange, "Performing MakeCells operation", 1); + BOPAlgo_Builder::PerformInternal1(theFiller, aPS.Next()); if (HasErrors()) { return; } @@ -296,7 +297,7 @@ void BOPAlgo_CellsBuilder::AddToResult(const TopTools_ListOfShape& theLSToTake, // if (!theUpdate) { if (bChanged) { - PrepareHistory(); + PrepareHistory(Message_ProgressRange()); } } else { @@ -329,7 +330,7 @@ void BOPAlgo_CellsBuilder::AddAllToResult(const Standard_Integer theMaterial, } // if (!theUpdate) { - PrepareHistory(); + PrepareHistory(Message_ProgressRange()); } else { RemoveInternalBoundaries(); @@ -419,7 +420,7 @@ void BOPAlgo_CellsBuilder::RemoveFromResult(const TopTools_ListOfShape& theLSToT if (bChanged) { myShape = aResult; // - PrepareHistory(); + PrepareHistory(Message_ProgressRange()); } } @@ -438,7 +439,7 @@ void BOPAlgo_CellsBuilder::RemoveAllFromResult() myShapeMaterial.Clear(); myMapModified.Clear(); // - PrepareHistory(); + PrepareHistory(Message_ProgressRange()); } //======================================================================= @@ -598,7 +599,7 @@ void BOPAlgo_CellsBuilder::RemoveInternalBoundaries() // myShape = aResult; // - PrepareHistory(); + PrepareHistory(Message_ProgressRange()); } } diff --git a/src/BOPAlgo/BOPAlgo_CellsBuilder.hxx b/src/BOPAlgo/BOPAlgo_CellsBuilder.hxx index 02d0022101..fd03822e54 100644 --- a/src/BOPAlgo/BOPAlgo_CellsBuilder.hxx +++ b/src/BOPAlgo/BOPAlgo_CellsBuilder.hxx @@ -242,7 +242,7 @@ class BOPAlgo_CellsBuilder : public BOPAlgo_Builder //! Redefined method PerformInternal1 - makes all split parts, //! nullifies the result , and index all parts. - Standard_EXPORT virtual void PerformInternal1 (const BOPAlgo_PaveFiller& thePF) Standard_OVERRIDE; + Standard_EXPORT virtual void PerformInternal1 (const BOPAlgo_PaveFiller& thePF, const Message_ProgressRange& theRange) Standard_OVERRIDE; //! Indexes the parts for quick access to the arguments. Standard_EXPORT void IndexParts(); diff --git a/src/BOPAlgo/BOPAlgo_CheckerSI.cxx b/src/BOPAlgo/BOPAlgo_CheckerSI.cxx index 845659ab7c..6c93b78613 100644 --- a/src/BOPAlgo/BOPAlgo_CheckerSI.cxx +++ b/src/BOPAlgo/BOPAlgo_CheckerSI.cxx @@ -50,14 +50,14 @@ //======================================================================= class BOPAlgo_FaceSelfIntersect : public IntTools_FaceFace, - public BOPAlgo_Algo { + public BOPAlgo_ParallelAlgo { public: DEFINE_STANDARD_ALLOC BOPAlgo_FaceSelfIntersect() : IntTools_FaceFace(), - BOPAlgo_Algo(), + BOPAlgo_ParallelAlgo(), myIF(-1), myTolF(1.e-7) { } // @@ -89,7 +89,11 @@ class BOPAlgo_FaceSelfIntersect : } // virtual void Perform() { - BOPAlgo_Algo::UserBreak(); + Message_ProgressScope aPS(myProgressRange, NULL, 1); + if (UserBreak(aPS)) + { + return; + } IntTools_FaceFace::Perform (myF, myF, myRunParallel); } // @@ -140,7 +144,7 @@ void BOPAlgo_CheckerSI::SetLevelOfCheck(const Standard_Integer theLevel) //function : Init //purpose : //======================================================================= -void BOPAlgo_CheckerSI::Init() +void BOPAlgo_CheckerSI::Init(const Message_ProgressRange& /*theRange*/) { Clear(); // @@ -164,7 +168,7 @@ void BOPAlgo_CheckerSI::Init() //function : Perform //purpose : //======================================================================= -void BOPAlgo_CheckerSI::Perform() +void BOPAlgo_CheckerSI::Perform(const Message_ProgressRange& theRange) { try { OCC_CATCH_SIGNALS @@ -174,24 +178,33 @@ void BOPAlgo_CheckerSI::Perform() return; } // + Message_ProgressScope aPS(theRange, "Checking shape on self-intersection", 10); // Perform intersection of sub shapes - BOPAlgo_PaveFiller::Perform(); + BOPAlgo_PaveFiller::Perform(aPS.Next(8)); + if (UserBreak(aPS)) + { + return; + } // - CheckFaceSelfIntersection(); + CheckFaceSelfIntersection(aPS.Next()); + Message_ProgressScope aPSZZ(aPS.Next(), NULL, 4); // Perform intersection with solids if (!HasErrors()) - PerformVZ(); + PerformVZ(aPSZZ.Next()); // if (!HasErrors()) - PerformEZ(); + PerformEZ(aPSZZ.Next()); // if (!HasErrors()) - PerformFZ(); + PerformFZ(aPSZZ.Next()); // if (!HasErrors()) - PerformZZ(); + PerformZZ(aPSZZ.Next()); // + if (HasErrors()) + return; + // Treat the intersection results PostTreat(); } @@ -384,7 +397,7 @@ void BOPAlgo_CheckerSI::PostTreat() //function : CheckFaceSelfIntersection //purpose : //======================================================================= -void BOPAlgo_CheckerSI::CheckFaceSelfIntersection() +void BOPAlgo_CheckerSI::CheckFaceSelfIntersection(const Message_ProgressRange& theRange) { if (myLevelOfCheck < 5) return; @@ -398,6 +411,8 @@ void BOPAlgo_CheckerSI::CheckFaceSelfIntersection() BOPAlgo_VectorOfFaceSelfIntersect aVFace; Standard_Integer aNbS=myDS->NbSourceShapes(); + + Message_ProgressScope aPSOuter(theRange, NULL, 1); // for (Standard_Integer i = 0; i < aNbS; i++) @@ -432,17 +447,21 @@ void BOPAlgo_CheckerSI::CheckFaceSelfIntersection() aFaceSelfIntersect.SetIndex(i); aFaceSelfIntersect.SetFace(aF); aFaceSelfIntersect.SetTolF(aTolF); - // - if (myProgressScope != NULL) - { - aFaceSelfIntersect.SetProgressIndicator(*myProgressScope); - } } Standard_Integer aNbFace = aVFace.Length(); + Message_ProgressScope aPSParallel(aPSOuter.Next(), "Checking surface on self-intersection", aNbFace); + for (Standard_Integer iF = 0; iF < aNbFace; ++iF) + { + aVFace.ChangeValue(iF).SetProgressRange(aPSParallel.Next()); + } //====================================================== BOPTools_Parallel::Perform (myRunParallel, aVFace); //====================================================== + if (UserBreak(aPSOuter)) + { + return; + } // for (Standard_Integer k = 0; k < aNbFace; k++) { diff --git a/src/BOPAlgo/BOPAlgo_CheckerSI.hxx b/src/BOPAlgo/BOPAlgo_CheckerSI.hxx index da10832f5a..31dd03118a 100644 --- a/src/BOPAlgo/BOPAlgo_CheckerSI.hxx +++ b/src/BOPAlgo/BOPAlgo_CheckerSI.hxx @@ -46,7 +46,7 @@ public: Standard_EXPORT BOPAlgo_CheckerSI(); Standard_EXPORT virtual ~BOPAlgo_CheckerSI(); - Standard_EXPORT virtual void Perform() Standard_OVERRIDE; + Standard_EXPORT virtual void Perform(const Message_ProgressRange& theRange = Message_ProgressRange()) Standard_OVERRIDE; //! Sets the level of checking shape on self-interference.
//! It defines which interferences will be checked:
@@ -64,29 +64,29 @@ public: protected: - Standard_EXPORT virtual void Init() Standard_OVERRIDE; + Standard_EXPORT virtual void Init(const Message_ProgressRange& theRange) Standard_OVERRIDE; //! Treats the intersection results Standard_EXPORT void PostTreat(); - Standard_EXPORT void CheckFaceSelfIntersection(); + Standard_EXPORT void CheckFaceSelfIntersection(const Message_ProgressRange& theRange); //! Methods for intersection with solids //! Vertex/Solid intersection - Standard_EXPORT virtual void PerformVZ(); + Standard_EXPORT virtual void PerformVZ(const Message_ProgressRange& theRange); //! Edge/Solid intersection - Standard_EXPORT virtual void PerformEZ(); + Standard_EXPORT virtual void PerformEZ(const Message_ProgressRange& theRange); //! Face/Solid intersection - Standard_EXPORT virtual void PerformFZ(); + Standard_EXPORT virtual void PerformFZ(const Message_ProgressRange& theRange); //! Solid/Solid intersection - Standard_EXPORT virtual void PerformZZ(); + Standard_EXPORT virtual void PerformZZ(const Message_ProgressRange& theRange); //! Used for intersection of edges and faces with solids - Standard_EXPORT virtual void PerformSZ(const TopAbs_ShapeEnum aTS); + Standard_EXPORT virtual void PerformSZ(const TopAbs_ShapeEnum aTS, const Message_ProgressRange& theRange); Standard_Integer myLevelOfCheck; diff --git a/src/BOPAlgo/BOPAlgo_CheckerSI_1.cxx b/src/BOPAlgo/BOPAlgo_CheckerSI_1.cxx index dc9b8c6f90..d607cba573 100644 --- a/src/BOPAlgo/BOPAlgo_CheckerSI_1.cxx +++ b/src/BOPAlgo/BOPAlgo_CheckerSI_1.cxx @@ -41,12 +41,12 @@ //class : BOPAlgo_VertexSolid //purpose : //======================================================================= -class BOPAlgo_VertexSolid { +class BOPAlgo_VertexSolid { public: DEFINE_STANDARD_ALLOC - BOPAlgo_VertexSolid() - : myIV(-1), myIZ(-1), myState(TopAbs_UNKNOWN) { + BOPAlgo_VertexSolid() : + myIV(-1), myIZ(-1), myState(TopAbs_UNKNOWN) { }; // virtual ~BOPAlgo_VertexSolid(){ @@ -92,7 +92,18 @@ class BOPAlgo_VertexSolid { return myState; }; // - void Perform() { + void SetProgressRange(const Message_ProgressRange& theRange) + { + myProgressRange = theRange; + } + // + virtual void Perform() { + Message_ProgressScope aPS(myProgressRange, NULL, 1); + if (!aPS.More()) + { + return; + } + Standard_Real aTol; gp_Pnt aPV; // @@ -113,6 +124,7 @@ class BOPAlgo_VertexSolid { TopoDS_Vertex myV; TopoDS_Solid myZ; Handle(IntTools_Context) myContext; + Message_ProgressRange myProgressRange; }; //======================================================================= typedef NCollection_Vector BOPAlgo_VectorOfVertexSolid; @@ -122,7 +134,7 @@ typedef NCollection_Vector BOPAlgo_VectorOfVertexSolid; //class : BOPAlgo_ShapeSolid //purpose : //======================================================================= -class BOPAlgo_ShapeSolid { +class BOPAlgo_ShapeSolid { public: DEFINE_STANDARD_ALLOC @@ -156,7 +168,18 @@ class BOPAlgo_ShapeSolid { return myHasInterf; }; // + void SetProgressRange(const Message_ProgressRange& theRange) + { + myProgressRange = theRange; + } + // virtual void Perform() { + Message_ProgressScope aPS(myProgressRange, NULL, 1); + if (!aPS.More()) + { + return; + } + Standard_Boolean bHasInterf; // myHasInterf=Standard_False; @@ -172,6 +195,7 @@ class BOPAlgo_ShapeSolid { Standard_Integer myIZ; Standard_Boolean myHasInterf; BOPDS_DS* myDS; + Message_ProgressRange myProgressRange; }; //======================================================================= typedef NCollection_Vector BOPAlgo_VectorOfShapeSolid; @@ -193,6 +217,12 @@ class BOPAlgo_SolidSolid : public BOPAlgo_ShapeSolid { }; // virtual void Perform() { + Message_ProgressScope aPS(myProgressRange, NULL, 1); + if (!aPS.More()) + { + return; + } + Standard_Boolean bFlag; // bFlag=Standard_False; @@ -211,8 +241,10 @@ typedef NCollection_Vector BOPAlgo_VectorOfSolidSolid; //function : PerformVZ //purpose : //======================================================================= -void BOPAlgo_CheckerSI::PerformVZ() +void BOPAlgo_CheckerSI::PerformVZ(const Message_ProgressRange& theRange) { + Message_ProgressScope aPSOuter(theRange, NULL, 1); + Standard_Integer iSize, nV, nZ, k, aNbVVS; TopAbs_State aState; BOPDS_MapOfPair aMPK; @@ -229,6 +261,10 @@ void BOPAlgo_CheckerSI::PerformVZ() BOPAlgo_VectorOfVertexSolid aVVS; // for (; myIterator->More(); myIterator->Next()) { + if (UserBreak(aPSOuter)) + { + return; + } myIterator->Value(nV, nZ); // if (myDS->HasInterfShapeSubShapes(nV, nZ)) { @@ -254,9 +290,19 @@ void BOPAlgo_CheckerSI::PerformVZ() } // aNbVVS=aVVS.Length(); + + Message_ProgressScope aPSParallel(aPSOuter.Next(), "Performing Vertex-Solid intersection", aNbVVS); + for (Standard_Integer iVS = 0; iVS < aNbVVS; ++iVS) + { + aVVS.ChangeValue(iVS).SetProgressRange(aPSParallel.Next()); + } //============================================================= BOPTools_Parallel::Perform (myRunParallel, aVVS, myContext); //============================================================= + if (UserBreak(aPSOuter)) + { + return; + } for (k=0; k < aNbVVS; ++k) { const BOPAlgo_VertexSolid& aVertexSolid=aVVS(k); aState=aVertexSolid.State(); @@ -274,24 +320,26 @@ void BOPAlgo_CheckerSI::PerformVZ() //function : PerformEZ //purpose : //======================================================================= -void BOPAlgo_CheckerSI::PerformEZ() +void BOPAlgo_CheckerSI::PerformEZ(const Message_ProgressRange& theRange) { - PerformSZ(TopAbs_EDGE); + PerformSZ(TopAbs_EDGE, theRange); } //======================================================================= //function : PerformFZ //purpose : //======================================================================= -void BOPAlgo_CheckerSI::PerformFZ() +void BOPAlgo_CheckerSI::PerformFZ(const Message_ProgressRange& theRange) { - PerformSZ(TopAbs_FACE); + PerformSZ(TopAbs_FACE, theRange); } //======================================================================= //function : PerformZZ //purpose : //======================================================================= -void BOPAlgo_CheckerSI::PerformZZ() +void BOPAlgo_CheckerSI::PerformZZ(const Message_ProgressRange& theRange) { + Message_ProgressScope aPSOuter(theRange, NULL, 1); + Standard_Boolean bHasInterf; Standard_Integer iSize, nZ1, nZ, k, aNbSolidSolid; // @@ -312,9 +360,19 @@ void BOPAlgo_CheckerSI::PerformZZ() } // aNbSolidSolid=aVSolidSolid.Length(); + + Message_ProgressScope aPSParallel(aPSOuter.Next(), "Performing Solid-Solid intersection", aNbSolidSolid); + for (Standard_Integer iSS = 0; iSS < aNbSolidSolid; ++iSS) + { + aVSolidSolid.ChangeValue(iSS).SetProgressRange(aPSParallel.Next()); + } //====================================================== BOPTools_Parallel::Perform (myRunParallel, aVSolidSolid); //====================================================== + if (UserBreak(aPSOuter)) + { + return; + } // BOPDS_VectorOfInterfZZ& aZZs=myDS->InterfZZ(); // @@ -337,12 +395,14 @@ void BOPAlgo_CheckerSI::PerformZZ() //function : PerformSZ //purpose : //======================================================================= -void BOPAlgo_CheckerSI::PerformSZ(const TopAbs_ShapeEnum aTS) +void BOPAlgo_CheckerSI::PerformSZ(const TopAbs_ShapeEnum theTS, const Message_ProgressRange& theRange) { + Message_ProgressScope aPSOuter(theRange, NULL, 1); + Standard_Boolean bHasInterf; Standard_Integer iSize, nS, nZ, k, aNbShapeSolid; // - myIterator->Initialize(aTS, TopAbs_SOLID); + myIterator->Initialize(theTS, TopAbs_SOLID); iSize=myIterator->ExpectedLength(); if (!iSize) { return; @@ -359,14 +419,27 @@ void BOPAlgo_CheckerSI::PerformSZ(const TopAbs_ShapeEnum aTS) } // aNbShapeSolid=aVShapeSolid.Length(); + + Message_ProgressScope aPSParallel(aPSOuter.Next(), + theTS == TopAbs_EDGE ? "Performing Edge-Solid intersection" : + "Performing Face-Solid intersection", + aNbShapeSolid); + for (Standard_Integer iSS = 0; iSS < aNbShapeSolid; ++iSS) + { + aVShapeSolid.ChangeValue(iSS).SetProgressRange(aPSParallel.Next()); + } //====================================================== BOPTools_Parallel::Perform (myRunParallel, aVShapeSolid); //====================================================== + if (UserBreak(aPSOuter)) + { + return; + } // BOPDS_VectorOfInterfEZ& aEZs=myDS->InterfEZ(); BOPDS_VectorOfInterfFZ& aFZs=myDS->InterfFZ(); // - if (aTS==TopAbs_EDGE) { + if (theTS==TopAbs_EDGE) { aEZs.SetIncrement(iSize); } else {//if (aTS==TopAbs_FACE) @@ -379,7 +452,7 @@ void BOPAlgo_CheckerSI::PerformSZ(const TopAbs_ShapeEnum aTS) if (bHasInterf) { aShapeSolid.Indices(nS, nZ); // - if (aTS==TopAbs_EDGE) { + if (theTS==TopAbs_EDGE) { BOPDS_InterfEZ& aEZ=aEZs.Appended(); aEZ.SetIndices(nS, nZ); } diff --git a/src/BOPAlgo/BOPAlgo_MakerVolume.cxx b/src/BOPAlgo/BOPAlgo_MakerVolume.cxx index 2ea86e8783..2332cec777 100644 --- a/src/BOPAlgo/BOPAlgo_MakerVolume.cxx +++ b/src/BOPAlgo/BOPAlgo_MakerVolume.cxx @@ -48,8 +48,12 @@ void BOPAlgo_MakerVolume::CheckData() //function : Perform //purpose : //======================================================================= -void BOPAlgo_MakerVolume::Perform() +void BOPAlgo_MakerVolume::Perform(const Message_ProgressRange& theRange) { + Message_ProgressScope aPS(theRange, "Performing MakeVolume operation", 10); + Standard_Real anInterPart = myIntersect ? 9 : 0.5; + Standard_Real aBuildPart = 10. - anInterPart; + GetReport()->Clear(); // if (myEntryPoint == 1) { @@ -86,18 +90,14 @@ void BOPAlgo_MakerVolume::Perform() } // pPF->SetRunParallel(myRunParallel); - if (myProgressScope != NULL) - { - pPF->SetProgressIndicator(*myProgressScope); - } pPF->SetFuzzyValue(myFuzzyValue); pPF->SetNonDestructive(myNonDestructive); pPF->SetGlue(myGlue); pPF->SetUseOBB(myUseOBB); - pPF->Perform(); + pPF->Perform(aPS.Next(anInterPart)); // myEntryPoint = 1; - PerformInternal(*pPF); + PerformInternal(*pPF, aPS.Next(aBuildPart)); } //======================================================================= @@ -105,8 +105,9 @@ void BOPAlgo_MakerVolume::Perform() //purpose : //======================================================================= void BOPAlgo_MakerVolume::PerformInternal1 - (const BOPAlgo_PaveFiller& theFiller) + (const BOPAlgo_PaveFiller& theFiller, const Message_ProgressRange& theRange) { + Message_ProgressScope aPS(theRange, "Building volumes", 100); myPaveFiller = (BOPAlgo_PaveFiller*)&theFiller; myDS = myPaveFiller->PDS(); myContext = myPaveFiller->Context(); @@ -123,25 +124,28 @@ void BOPAlgo_MakerVolume::PerformInternal1 return; } // + BOPAlgo_PISteps aSteps(PIOperation_Last); + analyzeProgress(100., aSteps); + // 3. Fill Images - // 3.1. Vertice if (myIntersect) { - FillImagesVertices(); + // 3.1. Vertices + FillImagesVertices(aPS.Next(aSteps.GetStep(PIOperation_TreatVertices))); if (HasErrors()) { return; } // 3.2. Edges - FillImagesEdges(); + FillImagesEdges(aPS.Next(aSteps.GetStep(PIOperation_TreatEdges))); if (HasErrors()) { return; } // 3.3. Wires - FillImagesContainers(TopAbs_WIRE); + FillImagesContainers(TopAbs_WIRE, aPS.Next(aSteps.GetStep(PIOperation_TreatWires))); if (HasErrors()) { return; } // 3.4. Faces - FillImagesFaces(); + FillImagesFaces(aPS.Next(aSteps.GetStep(PIOperation_TreatFaces))); if (HasErrors()) { return; } @@ -160,7 +164,7 @@ void BOPAlgo_MakerVolume::PerformInternal1 MakeBox(aBoxFaces); // // 6. Make volumes - BuildSolids(aLSR); + BuildSolids(aLSR, aPS.Next(aSteps.GetStep(PIOperation_BuildSolids))); if (HasErrors()) { return; } @@ -175,10 +179,30 @@ void BOPAlgo_MakerVolume::PerformInternal1 BuildShape(aLSR); // // 10. History - PrepareHistory(); + PrepareHistory(aPS.Next(aSteps.GetStep(PIOperation_FillHistory))); + if (HasErrors()) { + return; + } // // 11. Post-treatment - PostTreat(); + PostTreat(aPS.Next(aSteps.GetStep(PIOperation_PostTreat))); +} + +//======================================================================= +//function : fillPISteps +//purpose : +//======================================================================= +void BOPAlgo_MakerVolume::fillPISteps(BOPAlgo_PISteps& theSteps) const +{ + NbShapes aNbShapes = getNbShapes(); + if (myIntersect) + { + theSteps.SetStep(PIOperation_TreatVertices, aNbShapes.NbVertices()); + theSteps.SetStep(PIOperation_TreatEdges, aNbShapes.NbEdges()); + theSteps.SetStep(PIOperation_TreatWires, aNbShapes.NbWires()); + theSteps.SetStep(PIOperation_TreatFaces, 50 * aNbShapes.NbFaces()); + } + theSteps.SetStep(PIOperation_BuildSolids, 50 * aNbShapes.NbFaces()); } //======================================================================= @@ -187,7 +211,6 @@ void BOPAlgo_MakerVolume::PerformInternal1 //======================================================================= void BOPAlgo_MakerVolume::CollectFaces() { - UserBreak(); // Standard_Integer i, aNbShapes; TopTools_ListIteratorOfListOfShape aIt; @@ -226,7 +249,6 @@ void BOPAlgo_MakerVolume::CollectFaces() //======================================================================= void BOPAlgo_MakerVolume::MakeBox(TopTools_MapOfShape& theBoxFaces) { - UserBreak(); // Standard_Real aXmin, aYmin, aZmin, aXmax, aYmax, aZmax, anExt; // @@ -251,16 +273,15 @@ void BOPAlgo_MakerVolume::MakeBox(TopTools_MapOfShape& theBoxFaces) //function : BuildSolids //purpose : //======================================================================= -void BOPAlgo_MakerVolume::BuildSolids(TopTools_ListOfShape& theLSR) +void BOPAlgo_MakerVolume::BuildSolids(TopTools_ListOfShape& theLSR, + const Message_ProgressRange& theRange) { - UserBreak(); - // BOPAlgo_BuilderSolid aBS; // aBS.SetShapes(myFaces); aBS.SetRunParallel(myRunParallel); aBS.SetAvoidInternalShapes(myAvoidInternalShapes); - aBS.Perform(); + aBS.Perform(theRange); if (aBS.HasErrors()) { AddError (new BOPAlgo_AlertSolidBuilderFailed); // SolidBuilder failed @@ -279,7 +300,6 @@ void BOPAlgo_MakerVolume::BuildSolids(TopTools_ListOfShape& theLSR) void BOPAlgo_MakerVolume::RemoveBox(TopTools_ListOfShape& theLSR, const TopTools_MapOfShape& theBoxFaces) { - UserBreak(); // TopTools_ListIteratorOfListOfShape aIt; TopExp_Explorer aExp; @@ -336,8 +356,6 @@ void BOPAlgo_MakerVolume::FillInternalShapes(const TopTools_ListOfShape& theLSR) return; } - UserBreak(); - // Get all non-compound shapes TopTools_ListOfShape aLSC; // Fence map diff --git a/src/BOPAlgo/BOPAlgo_MakerVolume.hxx b/src/BOPAlgo/BOPAlgo_MakerVolume.hxx index a17424363b..5d116869dd 100644 --- a/src/BOPAlgo/BOPAlgo_MakerVolume.hxx +++ b/src/BOPAlgo/BOPAlgo_MakerVolume.hxx @@ -113,8 +113,6 @@ public: DEFINE_STANDARD_ALLOC - - //! Empty constructor. BOPAlgo_MakerVolume(); virtual ~BOPAlgo_MakerVolume(); @@ -151,7 +149,7 @@ public: } //! Performs the operation. - Standard_EXPORT virtual void Perform() Standard_OVERRIDE; + Standard_EXPORT virtual void Perform(const Message_ProgressRange& theRange = Message_ProgressRange()) Standard_OVERRIDE; protected: @@ -159,7 +157,7 @@ protected: Standard_EXPORT virtual void CheckData() Standard_OVERRIDE; //! Performs the operation. - Standard_EXPORT virtual void PerformInternal1 (const BOPAlgo_PaveFiller& thePF) Standard_OVERRIDE; + Standard_EXPORT virtual void PerformInternal1 (const BOPAlgo_PaveFiller& thePF, const Message_ProgressRange& theRange = Message_ProgressRange()) Standard_OVERRIDE; //! Collects all faces. Standard_EXPORT void CollectFaces(); @@ -168,7 +166,8 @@ protected: Standard_EXPORT void MakeBox (TopTools_MapOfShape& theBoxFaces); //! Builds solids. - Standard_EXPORT void BuildSolids (TopTools_ListOfShape& theLSR); + Standard_EXPORT void BuildSolids (TopTools_ListOfShape& theLSR, + const Message_ProgressRange& theRange); //! Removes the covering box. Standard_EXPORT void RemoveBox (TopTools_ListOfShape& theLSR, const TopTools_MapOfShape& theBoxFaces); @@ -179,6 +178,25 @@ protected: //! Builds the result. Standard_EXPORT void BuildShape (const TopTools_ListOfShape& theLSR); +protected: + //! List of operations to be supported by the Progress Indicator. + //! Enumeration is going to contain some extra operations from base class, + //! which are not going to be used here. So, the array of steps will also + //! contain some extra zero values. This is the only extra resource that is + //! going to be used, but it allows us not to override the methods that use + //! the values of the enumeration of base class. + //! Starting the enumeration from the middle of enumeration of base class is + //! not a good idea as the values in enumeration may be swapped. + enum BOPAlgo_PIOperation + { + PIOperation_BuildSolids = BOPAlgo_Builder::PIOperation_Last, + PIOperation_Last + }; + + //! Analyze progress steps + Standard_EXPORT void fillPISteps(BOPAlgo_PISteps& theSteps) const Standard_OVERRIDE; + +protected: Standard_Boolean myIntersect; Bnd_Box myBBox; diff --git a/src/BOPAlgo/BOPAlgo_Options.cxx b/src/BOPAlgo/BOPAlgo_Options.cxx index 34da6bcd3b..7ff5d35b07 100644 --- a/src/BOPAlgo/BOPAlgo_Options.cxx +++ b/src/BOPAlgo/BOPAlgo_Options.cxx @@ -21,6 +21,7 @@ #include #include #include +#include namespace { @@ -52,7 +53,6 @@ BOPAlgo_Options::BOPAlgo_Options() myReport(new Message_Report), myRunParallel(myGlobalRunParallel), myFuzzyValue(Precision::Confusion()), - myProgressScope(0L), myUseOBB(Standard_False) { BOPAlgo_LoadMessages(); @@ -69,7 +69,6 @@ BOPAlgo_Options::BOPAlgo_Options myReport(new Message_Report), myRunParallel(myGlobalRunParallel), myFuzzyValue(Precision::Confusion()), - myProgressScope(0L), myUseOBB(Standard_False) { BOPAlgo_LoadMessages(); @@ -129,27 +128,13 @@ void BOPAlgo_Options::SetFuzzyValue(const Standard_Real theFuzz) myFuzzyValue = Max(theFuzz, Precision::Confusion()); } - -//======================================================================= -//function : SetProgressIndicator -//purpose : -//======================================================================= -void BOPAlgo_Options::SetProgressIndicator - (const Message_ProgressScope& theScope) +Standard_Boolean BOPAlgo_Options::UserBreak(const Message_ProgressScope& thePS) { - myProgressScope = &theScope; -} - -//======================================================================= -//function : UserBreak -//purpose : -//======================================================================= -void BOPAlgo_Options::UserBreak() const -{ - if (!myProgressScope) { - return; - } - if (myProgressScope->UserBreak()) { - throw Standard_NotImplemented("BOPAlgo_Options::UserBreak(), method is not implemented"); + if (thePS.UserBreak()) + { + AddError(new BOPAlgo_AlertUserBreak); + return Standard_True; } + return Standard_False; } + diff --git a/src/BOPAlgo/BOPAlgo_Options.hxx b/src/BOPAlgo/BOPAlgo_Options.hxx index 6043fec316..2805d4cbea 100644 --- a/src/BOPAlgo/BOPAlgo_Options.hxx +++ b/src/BOPAlgo/BOPAlgo_Options.hxx @@ -30,8 +30,6 @@ class Message_ProgressScope; //! - *Parallel processing mode* - provides the possibility to perform operation in parallel mode; //! - *Fuzzy tolerance* - additional tolerance for the operation to detect //! touching or coinciding cases; -//! - *Progress indicator* - provides interface to track the progress of -//! operation and stop the operation by user's break. //! - *Using the Oriented Bounding Boxes* - Allows using the Oriented Bounding Boxes of the shapes //! for filtering the intersections. //! @@ -152,12 +150,6 @@ public: return myFuzzyValue; } -public: - //!@name Progress indicator - - //! Set the Progress Indicator object. - Standard_EXPORT void SetProgressIndicator(const Message_ProgressScope& theProgress); - public: //!@name Usage of Oriented Bounding boxes @@ -175,9 +167,8 @@ public: protected: - //! Breaks the execution if the break signal - //! is indicated by myProgressIndicator. - Standard_EXPORT void UserBreak() const; + //! Adds error to the report if the break signal was caught. Returns true in this case, false otherwise. + Standard_EXPORT Standard_Boolean UserBreak(const Message_ProgressScope& thePS); protected: @@ -185,7 +176,6 @@ protected: Handle(Message_Report) myReport; Standard_Boolean myRunParallel; Standard_Real myFuzzyValue; - const Message_ProgressScope* myProgressScope; Standard_Boolean myUseOBB; }; diff --git a/src/BOPAlgo/BOPAlgo_PaveFiller.cxx b/src/BOPAlgo/BOPAlgo_PaveFiller.cxx index faf4ce3ee9..afe18b1e8d 100644 --- a/src/BOPAlgo/BOPAlgo_PaveFiller.cxx +++ b/src/BOPAlgo/BOPAlgo_PaveFiller.cxx @@ -32,12 +32,38 @@ #include #include +namespace +{ + //======================================================================= + //function : BOPAlgo_PIOperation + //purpose : List of operations to be supported by the Progress Indicator + //======================================================================= + enum BOPAlgo_PIOperation + { + PIOperation_Prepare = 0, + PIOperation_PerformVV, + PIOperation_PerformVE, + PIOperation_PerformEE, + PIOperation_PerformVF, + PIOperation_PerformEF, + PIOperation_RepeatIntersection, + PIOperation_ForceInterfEE, + PIOperation_ForceInterfEF, + PIOperation_PerformFF, + PIOperation_MakeSplitEdges, + PIOperation_MakeBlocks, + PIOperation_MakePCurves, + PIOperation_ProcessDE, + PIOperation_Last + }; +} + //======================================================================= //function : //purpose : //======================================================================= BOPAlgo_PaveFiller::BOPAlgo_PaveFiller() -: + : BOPAlgo_Algo() { myDS = NULL; @@ -52,13 +78,13 @@ BOPAlgo_PaveFiller::BOPAlgo_PaveFiller() //purpose : //======================================================================= BOPAlgo_PaveFiller::BOPAlgo_PaveFiller - (const Handle(NCollection_BaseAllocator)& theAllocator) -: - BOPAlgo_Algo(theAllocator), - myFPBDone(1, theAllocator), - myIncreasedSS(1, theAllocator), - myVertsToAvoidExtension(1, theAllocator), - myDistances(1, theAllocator) +(const Handle (NCollection_BaseAllocator)& theAllocator) + : + BOPAlgo_Algo (theAllocator), + myFPBDone (1, theAllocator), + myIncreasedSS (1, theAllocator), + myVertsToAvoidExtension (1, theAllocator), + myDistances (1, theAllocator) { myDS = NULL; myIterator = NULL; @@ -79,15 +105,15 @@ BOPAlgo_PaveFiller::~BOPAlgo_PaveFiller() //function : SetNonDestructive //purpose : //======================================================================= -void BOPAlgo_PaveFiller::SetNonDestructive(const Standard_Boolean bFlag) +void BOPAlgo_PaveFiller::SetNonDestructive (const Standard_Boolean bFlag) { - myNonDestructive=bFlag; + myNonDestructive = bFlag; } //======================================================================= //function : NonDestructive //purpose : //======================================================================= -Standard_Boolean BOPAlgo_PaveFiller::NonDestructive()const +Standard_Boolean BOPAlgo_PaveFiller::NonDestructive() const { return myNonDestructive; } @@ -95,15 +121,15 @@ Standard_Boolean BOPAlgo_PaveFiller::NonDestructive()const //function : SetGlue //purpose : //======================================================================= -void BOPAlgo_PaveFiller::SetGlue(const BOPAlgo_GlueEnum theGlue) +void BOPAlgo_PaveFiller::SetGlue (const BOPAlgo_GlueEnum theGlue) { - myGlue=theGlue; + myGlue = theGlue; } //======================================================================= //function : Glue //purpose : //======================================================================= -BOPAlgo_GlueEnum BOPAlgo_PaveFiller::Glue() const +BOPAlgo_GlueEnum BOPAlgo_PaveFiller::Glue() const { return myGlue; } @@ -111,15 +137,15 @@ BOPAlgo_GlueEnum BOPAlgo_PaveFiller::Glue() const //function : SetIsPrimary //purpose : //======================================================================= -void BOPAlgo_PaveFiller::SetIsPrimary(const Standard_Boolean bFlag) +void BOPAlgo_PaveFiller::SetIsPrimary (const Standard_Boolean bFlag) { - myIsPrimary=bFlag; + myIsPrimary = bFlag; } //======================================================================= //function : IsPrimary //purpose : //======================================================================= -Standard_Boolean BOPAlgo_PaveFiller::IsPrimary()const +Standard_Boolean BOPAlgo_PaveFiller::IsPrimary() const { return myIsPrimary; } @@ -132,11 +158,11 @@ void BOPAlgo_PaveFiller::Clear() BOPAlgo_Algo::Clear(); if (myIterator) { delete myIterator; - myIterator=NULL; + myIterator = NULL; } if (myDS) { delete myDS; - myDS=NULL; + myDS = NULL; } myIncreasedSS.Clear(); } @@ -160,7 +186,7 @@ BOPDS_PDS BOPAlgo_PaveFiller::PDS() //function : Context //purpose : //======================================================================= -const Handle(IntTools_Context)& BOPAlgo_PaveFiller::Context() +const Handle (IntTools_Context)& BOPAlgo_PaveFiller::Context() { return myContext; } @@ -169,7 +195,7 @@ const Handle(IntTools_Context)& BOPAlgo_PaveFiller::Context() //purpose : //======================================================================= void BOPAlgo_PaveFiller::SetSectionAttribute - (const BOPAlgo_SectionAttribute& theSecAttr) +(const BOPAlgo_SectionAttribute& theSecAttr) { mySectionAttribute = theSecAttr; } @@ -177,14 +203,15 @@ void BOPAlgo_PaveFiller::SetSectionAttribute // function: Init // purpose: //======================================================================= -void BOPAlgo_PaveFiller::Init() +void BOPAlgo_PaveFiller::Init (const Message_ProgressRange& theRange) { if (!myArguments.Extent()) { AddError (new BOPAlgo_AlertTooFewArguments); return; } // - TopTools_ListIteratorOfListOfShape aIt(myArguments); + Message_ProgressScope aPS (theRange, "Initialization of Intersection algorithm", 1); + TopTools_ListIteratorOfListOfShape aIt (myArguments); for (; aIt.More(); aIt.Next()) { if (aIt.Value().IsNull()) { AddError (new BOPAlgo_AlertNullInputShapes); @@ -196,117 +223,132 @@ void BOPAlgo_PaveFiller::Init() Clear(); // // 1.myDS - myDS=new BOPDS_DS(myAllocator); - myDS->SetArguments(myArguments); - myDS->Init(myFuzzyValue); + myDS = new BOPDS_DS (myAllocator); + myDS->SetArguments (myArguments); + myDS->Init (myFuzzyValue); // // 2 myContext - myContext=new IntTools_Context; + myContext = new IntTools_Context; // // 3.myIterator - myIterator=new BOPDS_Iterator(myAllocator); - myIterator->SetRunParallel(myRunParallel); - myIterator->SetDS(myDS); - myIterator->Prepare(myContext, myUseOBB, myFuzzyValue); + myIterator = new BOPDS_Iterator (myAllocator); + myIterator->SetRunParallel (myRunParallel); + myIterator->SetDS (myDS); + myIterator->Prepare (myContext, myUseOBB, myFuzzyValue); // // 4 NonDestructive flag SetNonDestructive(); } + //======================================================================= // function: Perform // purpose: //======================================================================= -void BOPAlgo_PaveFiller::Perform() +void BOPAlgo_PaveFiller::Perform (const Message_ProgressRange& theRange) { try { OCC_CATCH_SIGNALS - // - PerformInternal(); + // + PerformInternal (theRange); } // catch (Standard_Failure const&) { AddError (new BOPAlgo_AlertIntersectionFailed); - } + } } + //======================================================================= // function: PerformInternal // purpose: //======================================================================= -void BOPAlgo_PaveFiller::PerformInternal() +void BOPAlgo_PaveFiller::PerformInternal (const Message_ProgressRange& theRange) { - Init(); + Message_ProgressScope aPS (theRange, "Performing intersection of shapes", 100); + + Init (aPS.Next (5)); if (HasErrors()) { - return; + return; } + + // Compute steps of the PI + BOPAlgo_PISteps aSteps (PIOperation_Last); + analyzeProgress (95, aSteps); // - Prepare(); + Prepare (aPS.Next (aSteps.GetStep (PIOperation_Prepare))); if (HasErrors()) { - return; + return; } // 00 - PerformVV(); + PerformVV (aPS.Next (aSteps.GetStep (PIOperation_PerformVV))); if (HasErrors()) { - return; + return; } // 01 - PerformVE(); + PerformVE (aPS.Next (aSteps.GetStep (PIOperation_PerformVE))); if (HasErrors()) { - return; + return; } // UpdatePaveBlocksWithSDVertices(); // 11 - PerformEE(); + PerformEE (aPS.Next (aSteps.GetStep (PIOperation_PerformEE))); if (HasErrors()) { - return; + return; } UpdatePaveBlocksWithSDVertices(); // 02 - PerformVF(); + PerformVF (aPS.Next (aSteps.GetStep (PIOperation_PerformVF))); if (HasErrors()) { - return; + return; } UpdatePaveBlocksWithSDVertices(); // 12 - PerformEF(); + PerformEF (aPS.Next (aSteps.GetStep (PIOperation_PerformEF))); if (HasErrors()) { - return; + return; } UpdatePaveBlocksWithSDVertices(); UpdateInterfsWithSDVertices(); // Repeat Intersection with increased vertices - RepeatIntersection(); + RepeatIntersection (aPS.Next (aSteps.GetStep (PIOperation_RepeatIntersection))); if (HasErrors()) return; - // Force intersection of edges after increase // of the tolerance values of their vertices - ForceInterfEE(); + ForceInterfEE (aPS.Next (aSteps.GetStep (PIOperation_ForceInterfEE))); + if (HasErrors()) + { + return; + } // Force Edge/Face intersection after increase // of the tolerance values of their vertices - ForceInterfEF(); + ForceInterfEF (aPS.Next (aSteps.GetStep (PIOperation_ForceInterfEF))); + if (HasErrors()) + { + return; + } // // 22 - PerformFF(); + PerformFF (aPS.Next (aSteps.GetStep (PIOperation_PerformFF))); if (HasErrors()) { - return; + return; } // UpdateBlocksWithSharedVertices(); // myDS->RefineFaceInfoIn(); // - MakeSplitEdges(); + MakeSplitEdges (aPS.Next (aSteps.GetStep (PIOperation_MakeSplitEdges))); if (HasErrors()) { return; } // UpdatePaveBlocksWithSDVertices(); // - MakeBlocks(); + MakeBlocks (aPS.Next (aSteps.GetStep (PIOperation_MakeBlocks))); if (HasErrors()) { - return; + return; } // CheckSelfInterference(); @@ -317,14 +359,14 @@ void BOPAlgo_PaveFiller::PerformInternal() // RemoveMicroEdges(); // - MakePCurves(); + MakePCurves (aPS.Next (aSteps.GetStep (PIOperation_MakePCurves))); if (HasErrors()) { - return; + return; } // - ProcessDE(); + ProcessDE (aPS.Next (aSteps.GetStep (PIOperation_ProcessDE))); if (HasErrors()) { - return; + return; } } @@ -332,53 +374,114 @@ void BOPAlgo_PaveFiller::PerformInternal() // function: RepeatIntersection // purpose: //======================================================================= -void BOPAlgo_PaveFiller::RepeatIntersection() +void BOPAlgo_PaveFiller::RepeatIntersection (const Message_ProgressRange& theRange) { // Find all vertices with increased tolerance TColStd_MapOfInteger anExtraInterfMap; const Standard_Integer aNbS = myDS->NbSourceShapes(); + Message_ProgressScope aPS (theRange, "Repeat intersection", 3); for (Standard_Integer i = 0; i < aNbS; ++i) { - const BOPDS_ShapeInfo& aSI = myDS->ShapeInfo(i); + const BOPDS_ShapeInfo& aSI = myDS->ShapeInfo (i); if (aSI.ShapeType() != TopAbs_VERTEX) continue; // Check if the tolerance of the original vertex has been increased - if (myIncreasedSS.Contains(i)) + if (myIncreasedSS.Contains (i)) { - anExtraInterfMap.Add(i); + anExtraInterfMap.Add (i); continue; } // Check if the vertex created a new vertex with greater tolerance Standard_Integer nVSD; - if (!myDS->HasShapeSD(i, nVSD)) + if (!myDS->HasShapeSD (i, nVSD)) continue; - if (myIncreasedSS.Contains(nVSD)) - anExtraInterfMap.Add(i); + if (myIncreasedSS.Contains (nVSD)) + anExtraInterfMap.Add (i); } if (anExtraInterfMap.IsEmpty()) return; // Update iterator of pairs of shapes with interfering boxes - myIterator->IntersectExt(anExtraInterfMap); + myIterator->IntersectExt (anExtraInterfMap); // Perform intersections with vertices - PerformVV(); + + PerformVV (aPS.Next()); if (HasErrors()) return; UpdatePaveBlocksWithSDVertices(); - PerformVE(); + PerformVE (aPS.Next()); if (HasErrors()) return; UpdatePaveBlocksWithSDVertices(); - PerformVF(); + PerformVF (aPS.Next()); if (HasErrors()) return; UpdatePaveBlocksWithSDVertices(); UpdateInterfsWithSDVertices(); } + + +//======================================================================= +// function: fillPISteps +// purpose: +//======================================================================= +void BOPAlgo_PaveFiller::fillPIConstants (const Standard_Real theWhole, + BOPAlgo_PISteps& theSteps) const +{ + if (!myNonDestructive) + { + theSteps.SetStep (PIOperation_Prepare, 1 * theWhole / 100.); + } +} + +//======================================================================= +// function: fillPISteps +// purpose: +//======================================================================= +void BOPAlgo_PaveFiller::fillPISteps (BOPAlgo_PISteps& theSteps) const +{ + // Get number of all intersecting pairs + Standard_Integer aVVSize = 0, aVESize = 0, aEESize = 0, aVFSize = 0, aEFSize = 0, aFFSize = 0; + + myIterator->Initialize (TopAbs_VERTEX, TopAbs_VERTEX); + aVVSize = myIterator->ExpectedLength(); + + myIterator->Initialize (TopAbs_VERTEX, TopAbs_EDGE); + aVESize = myIterator->ExpectedLength(); + + myIterator->Initialize (TopAbs_EDGE, TopAbs_EDGE); + aEESize = myIterator->ExpectedLength(); + + myIterator->Initialize (TopAbs_VERTEX, TopAbs_FACE); + aVFSize = myIterator->ExpectedLength(); + + if (myGlue != BOPAlgo_GlueFull) + { + myIterator->Initialize (TopAbs_EDGE, TopAbs_FACE); + aEFSize = myIterator->ExpectedLength(); + } + + myIterator->Initialize (TopAbs_FACE, TopAbs_FACE); + aFFSize = myIterator->ExpectedLength(); + + theSteps.SetStep (PIOperation_PerformVV, aVVSize); + theSteps.SetStep (PIOperation_PerformVE, 2 * aVESize); + theSteps.SetStep (PIOperation_PerformEE, 5 * aEESize); + theSteps.SetStep (PIOperation_PerformVF, 5 * aVFSize); + theSteps.SetStep (PIOperation_PerformEF, 10 * aEFSize); + theSteps.SetStep (PIOperation_RepeatIntersection, 0.2 * (aVVSize + aVESize + aVFSize)); + theSteps.SetStep (PIOperation_ForceInterfEE, 2 * aEESize); + theSteps.SetStep (PIOperation_ForceInterfEF, 2 * aEFSize); + theSteps.SetStep (PIOperation_PerformFF, (myGlue == BOPAlgo_GlueFull ? 1 : 30) * aFFSize); + theSteps.SetStep (PIOperation_MakeSplitEdges, aEESize); + theSteps.SetStep (PIOperation_MakeBlocks, (myGlue == BOPAlgo_GlueFull ? 0 : 5) * aFFSize); + theSteps.SetStep (PIOperation_MakePCurves, myAvoidBuildPCurve ? 0 : 0.2 * (aEESize + aEFSize)); + theSteps.SetStep (PIOperation_ProcessDE, 0.1 * aEESize); +} diff --git a/src/BOPAlgo/BOPAlgo_PaveFiller.hxx b/src/BOPAlgo/BOPAlgo_PaveFiller.hxx index 307f2e5031..5906e81825 100644 --- a/src/BOPAlgo/BOPAlgo_PaveFiller.hxx +++ b/src/BOPAlgo/BOPAlgo_PaveFiller.hxx @@ -158,7 +158,7 @@ public: //! a copy of a sub-shape is created in the result if it is needed to be updated. Standard_EXPORT Standard_Boolean NonDestructive() const; - Standard_EXPORT virtual void Perform() Standard_OVERRIDE; + Standard_EXPORT virtual void Perform(const Message_ProgressRange& theRange = Message_ProgressRange()) Standard_OVERRIDE; @@ -204,20 +204,21 @@ protected: Standard_EXPORT Standard_Boolean IsPrimary() const; - Standard_EXPORT virtual void PerformInternal(); + Standard_EXPORT virtual void PerformInternal(const Message_ProgressRange& theRange); Standard_EXPORT virtual void Clear() Standard_OVERRIDE; - Standard_EXPORT virtual void Init(); + Standard_EXPORT virtual void Init(const Message_ProgressRange& theRange); - Standard_EXPORT void Prepare(); + Standard_EXPORT void Prepare(const Message_ProgressRange& theRange); - Standard_EXPORT virtual void PerformVV(); + Standard_EXPORT virtual void PerformVV(const Message_ProgressRange& theRange); - Standard_EXPORT virtual void PerformVE(); + Standard_EXPORT virtual void PerformVE(const Message_ProgressRange& theRange); //! Performs the intersection of the vertices with edges. Standard_EXPORT void IntersectVE(const BOPDS_IndexedDataMapOfPaveBlockListOfInteger& theVEPairs, + const Message_ProgressRange& theRange, const Standard_Boolean bAddInterfs = Standard_True); //! Splits the Pave Blocks of the given edges with the extra paves.
@@ -230,30 +231,30 @@ protected: //! of the Pave Blocks will also form a Common Block. Standard_EXPORT void SplitPaveBlocks(const TColStd_MapOfInteger& theMEdges, const Standard_Boolean theAddInterfs); + + Standard_EXPORT virtual void PerformVF(const Message_ProgressRange& theRange); - Standard_EXPORT virtual void PerformVF(); - - Standard_EXPORT virtual void PerformEE(); + Standard_EXPORT virtual void PerformEE(const Message_ProgressRange& theRange); - Standard_EXPORT virtual void PerformEF(); + Standard_EXPORT virtual void PerformEF(const Message_ProgressRange& theRange); - Standard_EXPORT virtual void PerformFF(); + Standard_EXPORT virtual void PerformFF(const Message_ProgressRange& theRange); Standard_EXPORT void TreatVerticesEE(); Standard_EXPORT void MakeSDVerticesFF(const TColStd_DataMapOfIntegerListOfInteger& aDMVLV, TColStd_DataMapOfIntegerInteger& theDMNewSD); - Standard_EXPORT void MakeSplitEdges(); + Standard_EXPORT void MakeSplitEdges(const Message_ProgressRange& theRange); - Standard_EXPORT void MakeBlocks(); + Standard_EXPORT void MakeBlocks(const Message_ProgressRange& theRange); - Standard_EXPORT void MakePCurves(); + Standard_EXPORT void MakePCurves(const Message_ProgressRange& theRange); Standard_EXPORT Standard_Integer MakeSDVertices(const TColStd_ListOfInteger& theVertIndices, const Standard_Boolean theAddInterfs = 1); - Standard_EXPORT void ProcessDE(); + Standard_EXPORT void ProcessDE(const Message_ProgressRange& theRange); Standard_EXPORT void FillShrunkData (Handle(BOPDS_PaveBlock)& thePB); @@ -269,6 +270,7 @@ protected: //! Performs intersection of new vertices, obtained in E/E and E/F intersections Standard_EXPORT void PerformNewVertices(BOPDS_IndexedDataMapOfShapeCoupleOfPaveBlocks& theMVCPB, const Handle(NCollection_BaseAllocator)& theAllocator, + const Message_ProgressRange& theRange, const Standard_Boolean theIsEEIntersection = Standard_True); Standard_EXPORT Standard_Boolean CheckFacePaves (const TopoDS_Vertex& theVnew, @@ -341,7 +343,8 @@ protected: TColStd_DataMapOfIntegerInteger& theDMNewSD, const BOPDS_IndexedMapOfPaveBlock& theMicroPB, const TopTools_IndexedMapOfShape& theVertsOnRejectedPB, - const Handle(NCollection_BaseAllocator)& theAllocator); + const Handle(NCollection_BaseAllocator)& theAllocator, + const Message_ProgressRange& theRange); Standard_EXPORT void FindPaveBlocks (const Standard_Integer theV, const Standard_Integer theF, @@ -564,7 +567,7 @@ protected: //! If the intersection says that the section edge is lying on the face //! it will be added into FaceInfo structure of the face as IN edge //! and will be used for splitting. - Standard_EXPORT void PutSEInOtherFaces(); + Standard_EXPORT void PutSEInOtherFaces(const Message_ProgressRange& theRange); //! Analyzes the results of interferences of sub-shapes of the shapes //! looking for self-interfering entities by the following rules:
@@ -581,22 +584,23 @@ protected: const TopoDS_Shape& theS2); //! Repeat intersection of sub-shapes with increased vertices. - Standard_EXPORT void RepeatIntersection(); + Standard_EXPORT void RepeatIntersection(const Message_ProgressRange& theRange); //! Updates vertices of CommonBlocks with real tolerance of CB. Standard_EXPORT void UpdateVerticesOfCB(); //! The method looks for the additional common blocks among pairs of edges //! with the same bounding vertices. - Standard_EXPORT void ForceInterfEE(); + Standard_EXPORT void ForceInterfEE(const Message_ProgressRange& theRange); //! The method looks for the additional edge/face common blocks //! among pairs of edge/face having the same vertices. - Standard_EXPORT void ForceInterfEF(); + Standard_EXPORT void ForceInterfEF(const Message_ProgressRange& theRange); //! Performs intersection of given pave blocks //! with all faces from arguments. Standard_EXPORT void ForceInterfEF(const BOPDS_IndexedMapOfPaveBlock& theMPB, + const Message_ProgressRange& theRange, const Standard_Boolean theAddInterf); //! When all section edges are created and no increase of the tolerance @@ -631,6 +635,13 @@ protected: {} }; +protected: //! Analyzing Progress steps + + //! Filling steps for constant operations + Standard_EXPORT void fillPIConstants(const Standard_Real theWhole, BOPAlgo_PISteps& theSteps) const Standard_OVERRIDE; + //! Filling steps for all other operations + Standard_EXPORT void fillPISteps(BOPAlgo_PISteps& theSteps) const Standard_OVERRIDE; + protected: //! Fields TopTools_ListOfShape myArguments; diff --git a/src/BOPAlgo/BOPAlgo_PaveFiller_1.cxx b/src/BOPAlgo/BOPAlgo_PaveFiller_1.cxx index 6c27314ce3..aa1e754562 100644 --- a/src/BOPAlgo/BOPAlgo_PaveFiller_1.cxx +++ b/src/BOPAlgo/BOPAlgo_PaveFiller_1.cxx @@ -44,13 +44,14 @@ // function: PerformVV // purpose: //======================================================================= -void BOPAlgo_PaveFiller::PerformVV() +void BOPAlgo_PaveFiller::PerformVV(const Message_ProgressRange& theRange) { Standard_Integer n1, n2, iFlag, aSize; Handle(NCollection_BaseAllocator) aAllocator; // myIterator->Initialize(TopAbs_VERTEX, TopAbs_VERTEX); aSize=myIterator->ExpectedLength(); + Message_ProgressScope aPS(theRange, NULL, 2.); if (!aSize) { return; } @@ -65,7 +66,13 @@ void BOPAlgo_PaveFiller::PerformVV() NCollection_List aMBlocks(aAllocator); // // 1. Map V/LV - for (; myIterator->More(); myIterator->Next()) { + // Split progress range on intersection stage and making blocks. Display only intersection stage. + Message_ProgressScope aPSLoop(aPS.Next(1.), "Performing Vertex-Vertex intersection", aSize); + for (; myIterator->More(); myIterator->Next(), aPSLoop.Next()) { + if (UserBreak(aPS)) + { + return; + } myIterator->Value(n1, n2); // if (myDS->HasInterf(n1, n2)) @@ -96,6 +103,10 @@ void BOPAlgo_PaveFiller::PerformVV() // 3. Make vertices NCollection_List::Iterator aItB(aMBlocks); for (; aItB.More(); aItB.Next()) { + if (UserBreak(aPS)) + { + return; + } const TColStd_ListOfInteger& aLI = aItB.Value(); MakeSDVertices(aLI); } @@ -105,6 +116,10 @@ void BOPAlgo_PaveFiller::PerformVV() TColStd_DataMapOfIntegerInteger& aDMII=myDS->ShapesSD(); aItDMII.Initialize(aDMII); for (; aItDMII.More(); aItDMII.Next()) { + if (UserBreak(aPS)) + { + return; + } n1=aItDMII.Key(); myDS->InitPaveBlocksForVertex(n1); } @@ -115,7 +130,7 @@ void BOPAlgo_PaveFiller::PerformVV() } //======================================================================= -// function: PerformVV +// function: MakeSDVertices // purpose: //======================================================================= Standard_Integer BOPAlgo_PaveFiller::MakeSDVertices diff --git a/src/BOPAlgo/BOPAlgo_PaveFiller_2.cxx b/src/BOPAlgo/BOPAlgo_PaveFiller_2.cxx index ee6b573d59..c91453ec4f 100644 --- a/src/BOPAlgo/BOPAlgo_PaveFiller_2.cxx +++ b/src/BOPAlgo/BOPAlgo_PaveFiller_2.cxx @@ -41,13 +41,13 @@ //class : BOPAlgo_VertexEdge //purpose : //======================================================================= -class BOPAlgo_VertexEdge : public BOPAlgo_Algo { +class BOPAlgo_VertexEdge : public BOPAlgo_ParallelAlgo { public: DEFINE_STANDARD_ALLOC BOPAlgo_VertexEdge() : - BOPAlgo_Algo(), + BOPAlgo_ParallelAlgo(), myIV(-1), myIE(-1), myFlag(-1), myT(-1.), myTolVNew(-1.) { }; // @@ -111,7 +111,11 @@ class BOPAlgo_VertexEdge : public BOPAlgo_Algo { } // virtual void Perform() { - BOPAlgo_Algo::UserBreak(); + Message_ProgressScope aPS(myProgressRange, NULL, 1); + if (UserBreak(aPS)) + { + return; + } try { OCC_CATCH_SIGNALS @@ -142,11 +146,13 @@ typedef NCollection_Vector BOPAlgo_VectorOfVertexEdge; // function: PerformVE // purpose: //======================================================================= -void BOPAlgo_PaveFiller::PerformVE() +void BOPAlgo_PaveFiller::PerformVE(const Message_ProgressRange& theRange) { FillShrunkData(TopAbs_VERTEX, TopAbs_EDGE); // myIterator->Initialize(TopAbs_VERTEX, TopAbs_EDGE); + Message_ProgressScope aPS(theRange, NULL, 1); + Standard_Integer iSize = myIterator->ExpectedLength(); if (!iSize) { return; @@ -155,6 +161,10 @@ void BOPAlgo_PaveFiller::PerformVE() // Prepare pairs for intersection BOPDS_IndexedDataMapOfPaveBlockListOfInteger aMVEPairs; for (; myIterator->More(); myIterator->Next()) { + if (UserBreak(aPS)) + { + return; + } Standard_Integer nV, nE; myIterator->Value(nV, nE); // @@ -192,7 +202,7 @@ void BOPAlgo_PaveFiller::PerformVE() pLV->Append(nV); } // - IntersectVE(aMVEPairs); + IntersectVE(aMVEPairs, aPS.Next()); } //======================================================================= @@ -201,6 +211,7 @@ void BOPAlgo_PaveFiller::PerformVE() //======================================================================= void BOPAlgo_PaveFiller::IntersectVE (const BOPDS_IndexedDataMapOfPaveBlockListOfInteger& theVEPairs, + const Message_ProgressRange& theRange, const Standard_Boolean theAddInterfs) { Standard_Integer i, aNbVE = theVEPairs.Extent(); @@ -221,7 +232,12 @@ void BOPAlgo_PaveFiller::IntersectVE // intersection of the same SD vertex with edge NCollection_DataMap aDMVSD; // + Message_ProgressScope aPSOuter(theRange, NULL, 10); for (i = 1; i <= aNbVE; ++i) { + if (UserBreak(aPSOuter)) + { + return; + } const Handle(BOPDS_PaveBlock)& aPB = theVEPairs.FindKey(i); Standard_Integer nE = aPB->OriginalEdge(); // @@ -264,24 +280,35 @@ void BOPAlgo_PaveFiller::IntersectVE aVESolver.SetEdge(aE); aVESolver.SetPaveBlock(aPB); aVESolver.SetFuzzyValue(myFuzzyValue); - if (myProgressScope != NULL) - { - aVESolver.SetProgressIndicator(*myProgressScope); - } } } // + aNbVE = aVVE.Length(); + + Message_ProgressScope aPS(aPSOuter.Next(9), "Performing Vertex-Edge intersection", aNbVE); + for (i = 0; i < aNbVE; i++) + { + BOPAlgo_VertexEdge& aVESolver = aVVE.ChangeValue(i); + aVESolver.SetProgressRange(aPS.Next()); + } // Perform intersection //============================================================= BOPTools_Parallel::Perform (myRunParallel, aVVE, myContext); //============================================================= + if (UserBreak(aPSOuter)) + { + return; + } // // Keep the modified edges for further update TColStd_MapOfInteger aMEdges; // // Analyze intersections - aNbVE = aVVE.Length(); for (i = 0; i < aNbVE; ++i) { + if (UserBreak(aPSOuter)) + { + return; + } const BOPAlgo_VertexEdge& aVESolver = aVVE(i); if (aVESolver.Flag() != 0) { if (aVESolver.HasErrors()) diff --git a/src/BOPAlgo/BOPAlgo_PaveFiller_3.cxx b/src/BOPAlgo/BOPAlgo_PaveFiller_3.cxx index 0c0835ecbe..0d31a176bf 100644 --- a/src/BOPAlgo/BOPAlgo_PaveFiller_3.cxx +++ b/src/BOPAlgo/BOPAlgo_PaveFiller_3.cxx @@ -60,7 +60,7 @@ //======================================================================= class BOPAlgo_EdgeEdge : public IntTools_EdgeEdge, - public BOPAlgo_Algo { + public BOPAlgo_ParallelAlgo { public: @@ -68,7 +68,7 @@ class BOPAlgo_EdgeEdge : // BOPAlgo_EdgeEdge(): IntTools_EdgeEdge(), - BOPAlgo_Algo() { + BOPAlgo_ParallelAlgo() { }; // virtual ~BOPAlgo_EdgeEdge(){ @@ -102,7 +102,11 @@ class BOPAlgo_EdgeEdge : } // virtual void Perform() { - BOPAlgo_Algo::UserBreak(); + Message_ProgressScope aPS(myProgressRange, NULL, 1); + if (UserBreak(aPS)) + { + return; + } TopoDS_Edge anE1 = myEdge1, anE2 = myEdge2; Standard_Boolean hasTrsf = false; try @@ -155,12 +159,13 @@ typedef NCollection_Vector BOPAlgo_VectorOfEdgeEdge; // function: PerformEE // purpose: //======================================================================= -void BOPAlgo_PaveFiller::PerformEE() +void BOPAlgo_PaveFiller::PerformEE(const Message_ProgressRange& theRange) { FillShrunkData(TopAbs_EDGE, TopAbs_EDGE); // myIterator->Initialize(TopAbs_EDGE, TopAbs_EDGE); Standard_Integer iSize = myIterator->ExpectedLength(); + Message_ProgressScope aPSOuter(theRange, NULL, 10); if (!iSize) { return; } @@ -187,6 +192,10 @@ void BOPAlgo_PaveFiller::PerformEE() aEEs.SetIncrement(iSize); // for (; myIterator->More(); myIterator->Next()) { + if (UserBreak(aPSOuter)) + { + return; + } myIterator->Value(nE1, nE2); // const BOPDS_ShapeInfo& aSIE1=myDS->ShapeInfo(nE1); @@ -213,6 +222,10 @@ void BOPAlgo_PaveFiller::PerformEE() // aIt1.Initialize(aLPB1); for (; aIt1.More(); aIt1.Next()) { + if (UserBreak(aPSOuter)) + { + return; + } Bnd_Box aBB1; // Handle(BOPDS_PaveBlock)& aPB1=aIt1.ChangeValue(); @@ -253,20 +266,31 @@ void BOPAlgo_PaveFiller::PerformEE() anEdgeEdge.SetEdge2(aE2, aT21, aT22); anEdgeEdge.SetBoxes (aBB1, aBB2); anEdgeEdge.SetFuzzyValue(myFuzzyValue); - if (myProgressScope != NULL) - { - anEdgeEdge.SetProgressIndicator(*myProgressScope); - } }//for (; aIt2.More(); aIt2.Next()) { }//for (; aIt1.More(); aIt1.Next()) { }//for (; myIterator->More(); myIterator->Next()) { // aNbEdgeEdge=aVEdgeEdge.Length(); + + Message_ProgressScope aPS(aPSOuter.Next(9), "Performing Edge-edge intersection", aNbEdgeEdge); + for (k = 0; k < aNbEdgeEdge; k++) + { + BOPAlgo_EdgeEdge& anEdgeEdge = aVEdgeEdge.ChangeValue(k); + anEdgeEdge.SetProgressRange(aPS.Next()); + } //====================================================== BOPTools_Parallel::Perform (myRunParallel, aVEdgeEdge); //====================================================== + if (UserBreak(aPSOuter)) + { + return; + } // for (k = 0; k < aNbEdgeEdge; ++k) { + if (UserBreak(aPSOuter)) + { + return; + } Bnd_Box aBB1, aBB2; // BOPAlgo_EdgeEdge& anEdgeEdge=aVEdgeEdge(k); @@ -331,6 +355,10 @@ void BOPAlgo_PaveFiller::PerformEE() } // for (i=1; i<=aNbCPrts; ++i) { + if (UserBreak(aPSOuter)) + { + return; + } const IntTools_CommonPrt& aCPart=aCPrts(i); // const TopoDS_Edge& aE1=aCPart.Edge1(); @@ -519,7 +547,11 @@ void BOPAlgo_PaveFiller::PerformEE() // Update vertices of common blocks with real CB tolerances UpdateVerticesOfCB(); - PerformNewVertices(aMVCPB, aAllocator); + PerformNewVertices(aMVCPB, aAllocator, aPSOuter.Next()); + if (HasErrors()) + { + return; + } // if (aMEdges.Extent()) { Standard_Integer aNbV = aMVCPB.Extent(); @@ -546,6 +578,7 @@ void BOPAlgo_PaveFiller::PerformEE() void BOPAlgo_PaveFiller::PerformNewVertices (BOPDS_IndexedDataMapOfShapeCoupleOfPaveBlocks& theMVCPB, const Handle(NCollection_BaseAllocator)& theAllocator, + const Message_ProgressRange& theRange, const Standard_Boolean bIsEEIntersection) { Standard_Integer aNbV = theMVCPB.Extent(); @@ -563,8 +596,15 @@ void BOPAlgo_PaveFiller::PerformNewVertices BOPDS_VectorOfInterfEE& aEEs = myDS->InterfEE(); BOPDS_VectorOfInterfEF& aEFs = myDS->InterfEF(); // + // 4. Compute Extra Paves and split Pave blocks by the Extra paves + Message_ProgressScope aPS(theRange, NULL, 2); Standard_Integer i, aNb = aImages.Extent(); - for (i = 1; i <= aNb; ++i) { + Message_ProgressScope aPS1(aPS.Next(), NULL, aNb + aNbV); + for (i = 1; i <= aNb; ++i, aPS1.Next()) { + if (UserBreak(aPS)) + { + return; + } const TopoDS_Vertex& aV = TopoDS::Vertex(aImages.FindKey(i)); const TopTools_ListOfShape& aLVSD = aImages.FindFromIndex(i); // @@ -592,7 +632,11 @@ void BOPAlgo_PaveFiller::PerformNewVertices // // 3. Map PaveBlock/ListOfVertices to add to this PaveBlock ->aMPBLI BOPDS_IndexedDataMapOfPaveBlockListOfInteger aMPBLI(100, theAllocator); - for (i = 1; i <= aNbV; ++i) { + for (i = 1; i <= aNbV; ++i, aPS1.Next()) { + if (UserBreak(aPS)) + { + return; + } const BOPDS_CoupleOfPaveBlocks& aCPB = theMVCPB.FindFromIndex(i); Standard_Integer iV = aCPB.Index(); // @@ -610,9 +654,8 @@ void BOPAlgo_PaveFiller::PerformNewVertices } } } - // // 4. Compute Extra Paves and split Pave blocks by the Extra paves - IntersectVE(aMPBLI, Standard_False); + IntersectVE(aMPBLI, aPS.Next(), Standard_False); } //======================================================================= //function : TreatNewVertices @@ -898,7 +941,7 @@ void BOPAlgo_PaveFiller::UpdateVerticesOfCB() //function : ForceInterfEE //purpose : //======================================================================= -void BOPAlgo_PaveFiller::ForceInterfEE() +void BOPAlgo_PaveFiller::ForceInterfEE(const Message_ProgressRange& theRange) { // Now that we have vertices increased and unified, try to find additional // common blocks among the pairs of edges. @@ -907,7 +950,7 @@ void BOPAlgo_PaveFiller::ForceInterfEE() // those pairs of pave blocks with the same bounding vertices. Handle(NCollection_IncAllocator) anAlloc = new NCollection_IncAllocator; - + Message_ProgressScope aPSOuter(theRange, NULL, 10); // Initialize pave blocks for all vertices which participated in intersections const Standard_Integer aNbS = myDS->NbSourceShapes(); for (Standard_Integer i = 0; i < aNbS; ++i) @@ -918,8 +961,11 @@ void BOPAlgo_PaveFiller::ForceInterfEE() if (myDS->HasInterf(i)) myDS->InitPaveBlocksForVertex(i); } + if (UserBreak(aPSOuter)) + { + return; + } } - // Fill the connection map from bounding vertices to pave blocks // having those bounding vertices NCollection_IndexedDataMapPaveBlocks(i); BOPDS_ListIteratorOfListOfPaveBlock aItLPB(aLPB); for (; aItLPB.More(); aItLPB.Next()) @@ -976,6 +1025,10 @@ void BOPAlgo_PaveFiller::ForceInterfEE() for (Standard_Integer i = 1; i <= aNbPB; ++i) { + if (UserBreak(aPSOuter)) + { + return; + } const BOPDS_ListOfPaveBlock& aLPB = aPBMap(i); if (aLPB.Extent() < 2) continue; @@ -1086,10 +1139,6 @@ void BOPAlgo_PaveFiller::ForceInterfEE() { anEdgeEdge.SetFuzzyValue(myFuzzyValue); } - if (myProgressScope != NULL) - { - anEdgeEdge.SetProgressIndicator(*myProgressScope); - } } } } @@ -1098,13 +1147,26 @@ void BOPAlgo_PaveFiller::ForceInterfEE() if (!aNbPairs) return; + // close preparation step + aPSOuter.Next(0.7); + aPBMap.Clear(); aMPBFence.Clear(); anAlloc->Reset(); + Message_ProgressScope aPS(aPSOuter.Next(9), "Checking for coinciding edges", aNbPairs); + for (Standard_Integer i = 0; i < aNbPairs; i++) + { + BOPAlgo_EdgeEdge& anEdgeEdge = aVEdgeEdge.ChangeValue(i); + anEdgeEdge.SetProgressRange(aPS.Next()); + } + // Perform intersection of the found pairs BOPTools_Parallel::Perform (myRunParallel, aVEdgeEdge); - + if (UserBreak(aPSOuter)) + { + return; + } BOPDS_VectorOfInterfEE& aEEs = myDS->InterfEE(); if (aEEs.IsEmpty()) aEEs.SetIncrement(10); @@ -1113,9 +1175,12 @@ void BOPAlgo_PaveFiller::ForceInterfEE() // intersection type only. BOPDS_IndexedDataMapOfPaveBlockListOfPaveBlock aMPBLPB(1, anAlloc); - for (Standard_Integer i = 0; i < aNbPairs; ++i) { + if (UserBreak(aPSOuter)) + { + return; + } BOPAlgo_EdgeEdge& anEdgeEdge = aVEdgeEdge(i); if (!anEdgeEdge.IsDone() || anEdgeEdge.HasErrors()) { diff --git a/src/BOPAlgo/BOPAlgo_PaveFiller_4.cxx b/src/BOPAlgo/BOPAlgo_PaveFiller_4.cxx index 9a289ddf6d..6b5287a022 100644 --- a/src/BOPAlgo/BOPAlgo_PaveFiller_4.cxx +++ b/src/BOPAlgo/BOPAlgo_PaveFiller_4.cxx @@ -43,12 +43,12 @@ //class : BOPAlgo_VertexFace //purpose : //======================================================================= -class BOPAlgo_VertexFace : public BOPAlgo_Algo { +class BOPAlgo_VertexFace : public BOPAlgo_ParallelAlgo { public: DEFINE_STANDARD_ALLOC BOPAlgo_VertexFace() : - BOPAlgo_Algo(), + BOPAlgo_ParallelAlgo(), myIV(-1), myIF(-1), myFlag(-1), myT1(-1.), myT2(-1.), myTolVNew(-1.) { } @@ -107,7 +107,11 @@ class BOPAlgo_VertexFace : public BOPAlgo_Algo { } // virtual void Perform() { - BOPAlgo_Algo::UserBreak(); + Message_ProgressScope aPS(myProgressRange, NULL, 1); + if (UserBreak(aPS)) + { + return; + } try { OCC_CATCH_SIGNALS @@ -138,13 +142,14 @@ typedef NCollection_Vector BOPAlgo_VectorOfVertexFace; // function: PerformVF // purpose: //======================================================================= -void BOPAlgo_PaveFiller::PerformVF() +void BOPAlgo_PaveFiller::PerformVF(const Message_ProgressRange& theRange) { myIterator->Initialize(TopAbs_VERTEX, TopAbs_FACE); Standard_Integer iSize = myIterator->ExpectedLength(); // Standard_Integer nV, nF; // + Message_ProgressScope aPSOuter(theRange, NULL, 10); if (myGlue == BOPAlgo_GlueFull) { // there is no need to intersect vertices with faces in this mode // just initialize FaceInfo for all faces @@ -175,8 +180,11 @@ void BOPAlgo_PaveFiller::PerformVF() // Avoid repeated intersection of the same vertex with face in case // the group of vertices formed a single SD vertex NCollection_DataMap aMVFPairs; - for (; myIterator->More(); myIterator->Next()) { + if (UserBreak(aPSOuter)) + { + return; + } myIterator->Value(nV, nF); // if (myDS->IsSubShape(nV, nF)) { @@ -217,18 +225,29 @@ void BOPAlgo_PaveFiller::PerformVF() aVertexFace.SetVertex(aV); aVertexFace.SetFace(aF); aVertexFace.SetFuzzyValue(myFuzzyValue); - if (myProgressScope != NULL) - { - aVertexFace.SetProgressIndicator(*myProgressScope); - } + }//for (; myIterator->More(); myIterator->Next()) { // aNbVF=aVVF.Length(); + Message_ProgressScope aPS(aPSOuter.Next(9), "Performing Vertex-Face intersection", aNbVF); + for (k = 0; k < aNbVF; k++) + { + BOPAlgo_VertexFace& aVertexFace = aVVF.ChangeValue(k); + aVertexFace.SetProgressRange(aPS.Next()); + } //================================================================ BOPTools_Parallel::Perform (myRunParallel, aVVF, myContext); //================================================================ + if (UserBreak(aPSOuter)) + { + return; + } // for (k=0; k < aNbVF; ++k) { + if (UserBreak(aPSOuter)) + { + return; + } const BOPAlgo_VertexFace& aVertexFace=aVVF(k); // iFlag=aVertexFace.Flag(); diff --git a/src/BOPAlgo/BOPAlgo_PaveFiller_5.cxx b/src/BOPAlgo/BOPAlgo_PaveFiller_5.cxx index aebd4882d4..827135c9b4 100644 --- a/src/BOPAlgo/BOPAlgo_PaveFiller_5.cxx +++ b/src/BOPAlgo/BOPAlgo_PaveFiller_5.cxx @@ -59,14 +59,14 @@ //======================================================================= class BOPAlgo_EdgeFace : public IntTools_EdgeFace, - public BOPAlgo_Algo { + public BOPAlgo_ParallelAlgo { public: DEFINE_STANDARD_ALLOC BOPAlgo_EdgeFace() : IntTools_EdgeFace(), - BOPAlgo_Algo(), + BOPAlgo_ParallelAlgo(), myIE(-1), myIF(-1) { }; // @@ -113,7 +113,11 @@ class BOPAlgo_EdgeFace : } // virtual void Perform() { - BOPAlgo_Algo::UserBreak(); + Message_ProgressScope aPS(myProgressRange, NULL, 1); + if (UserBreak(aPS)) + { + return; + } TopoDS_Face aFace = myFace; TopoDS_Edge anEdge = myEdge; Standard_Boolean hasTrsf = false; @@ -167,11 +171,12 @@ typedef NCollection_Vector BOPAlgo_VectorOfEdgeFace; //function : PerformEF //purpose : //======================================================================= -void BOPAlgo_PaveFiller::PerformEF() +void BOPAlgo_PaveFiller::PerformEF(const Message_ProgressRange& theRange) { FillShrunkData(TopAbs_EDGE, TopAbs_FACE); // myIterator->Initialize(TopAbs_EDGE, TopAbs_FACE); + Message_ProgressScope aPSOuter(theRange, NULL, 10); Standard_Integer iSize = myIterator->ExpectedLength(); if (!iSize) { return; @@ -214,6 +219,10 @@ void BOPAlgo_PaveFiller::PerformEF() aEFs.SetIncrement(iSize); // for (; myIterator->More(); myIterator->Next()) { + if (UserBreak(aPSOuter)) + { + return; + } myIterator->Value(nE, nF); // const BOPDS_ShapeInfo& aSIE=myDS->ShapeInfo(nE); @@ -237,6 +246,10 @@ void BOPAlgo_PaveFiller::PerformEF() BOPDS_ListOfPaveBlock& aLPB=myDS->ChangePaveBlocks(nE); aIt.Initialize(aLPB); for (; aIt.More(); aIt.Next()) { + if (UserBreak(aPSOuter)) + { + return; + } Handle(BOPDS_PaveBlock)& aPB=aIt.ChangeValue(); // const Handle(BOPDS_PaveBlock) aPBR=myDS->RealPaveBlock(aPB); @@ -268,20 +281,17 @@ void BOPAlgo_PaveFiller::PerformEF() aEdgeFace.SetBoxes (myDS->ShapeInfo(nE).Box(), myDS->ShapeInfo (nF).Box()); aEdgeFace.SetFuzzyValue(myFuzzyValue); aEdgeFace.UseQuickCoincidenceCheck(bExpressCompute); - // + IntTools_Range aSR(aTS1, aTS2); - IntTools_Range anewSR=aSR; + IntTools_Range anewSR = aSR; BOPTools_AlgoTools::CorrectRange(aE, aF, aSR, anewSR); aEdgeFace.SetNewSR(anewSR); // IntTools_Range aPBRange(aT1, aT2); aSR = aPBRange; BOPTools_AlgoTools::CorrectRange(aE, aF, aSR, aPBRange); - aEdgeFace.SetRange (aPBRange); - if (myProgressScope != NULL) - { - aEdgeFace.SetProgressIndicator(*myProgressScope); - } + aEdgeFace.SetRange(aPBRange); + // // Save the pair to avoid their forced intersection BOPDS_MapOfPaveBlock* pMPB = myFPBDone.ChangeSeek(nF); if (!pMPB) @@ -291,11 +301,25 @@ void BOPAlgo_PaveFiller::PerformEF() }//for (; myIterator->More(); myIterator->Next()) { // aNbEdgeFace=aVEdgeFace.Length(); + Message_ProgressScope aPS(aPSOuter.Next(9), "Performing Edge-Face intersection", aNbEdgeFace); + for (Standard_Integer index = 0; index < aNbEdgeFace; index++) + { + BOPAlgo_EdgeFace& aEdgeFace = aVEdgeFace.ChangeValue(index); + aEdgeFace.SetProgressRange(aPS.Next()); + } //================================================================= BOPTools_Parallel::Perform (myRunParallel, aVEdgeFace, myContext); //================================================================= + if (UserBreak(aPSOuter)) + { + return; + } // for (k=0; k < aNbEdgeFace; ++k) { + if (UserBreak(aPSOuter)) + { + return; + } BOPAlgo_EdgeFace& aEdgeFace=aVEdgeFace(k); if (!aEdgeFace.IsDone() || aEdgeFace.HasErrors()) { // Warn about failed intersection of sub-shapes @@ -358,6 +382,10 @@ void BOPAlgo_PaveFiller::PerformEF() } // for (i=1; i<=aNbCPrts; ++i) { + if (UserBreak(aPSOuter)) + { + return; + } const IntTools_CommonPrt& aCPart=aCPrts(i); aType=aCPart.Type(); switch (aType) { @@ -524,7 +552,11 @@ void BOPAlgo_PaveFiller::PerformEF() //========================================= BOPAlgo_Tools::PerformCommonBlocks(aMPBLI, aAllocator, myDS, myContext); UpdateVerticesOfCB(); - PerformNewVertices(aMVCPB, aAllocator, Standard_False); + PerformNewVertices(aMVCPB, aAllocator, aPSOuter.Next(1), Standard_False); + if (HasErrors()) + { + return; + } // // Update FaceInfoIn for all faces having EF common parts myDS->UpdateFaceInfoIn (aMIEFC); @@ -733,8 +765,9 @@ void BOPAlgo_PaveFiller::ReduceIntersectionRange(const Standard_Integer theV1, //function : ForceInterfEF //purpose : //======================================================================= -void BOPAlgo_PaveFiller::ForceInterfEF() +void BOPAlgo_PaveFiller::ForceInterfEF(const Message_ProgressRange& theRange) { + Message_ProgressScope aPS(theRange, NULL, 1); if (!myIsPrimary) return; @@ -762,6 +795,10 @@ void BOPAlgo_PaveFiller::ForceInterfEF() // Degenerated edge continue; + if (UserBreak(aPS)) + { + return; + } const BOPDS_ListOfPaveBlock& aLPB = myDS->PaveBlocks(nE); BOPDS_ListIteratorOfListOfPaveBlock aItLPB(aLPB); for (; aItLPB.More(); aItLPB.Next()) @@ -773,7 +810,8 @@ void BOPAlgo_PaveFiller::ForceInterfEF() } // Perform intersection of collected pave blocks with faces - ForceInterfEF(aMPB, Standard_True); + + ForceInterfEF(aMPB, aPS.Next(), Standard_True); } //======================================================================= @@ -781,11 +819,13 @@ void BOPAlgo_PaveFiller::ForceInterfEF() //purpose : //======================================================================= void BOPAlgo_PaveFiller::ForceInterfEF(const BOPDS_IndexedMapOfPaveBlock& theMPB, + const Message_ProgressRange& theRange, const Standard_Boolean theAddInterf) { + // Split progress on preparation, intersection and post-treatment stages + Message_ProgressScope aPSOuter(theRange, NULL, 10); if (theMPB.IsEmpty()) return; - // Fill the tree with bounding boxes of the pave blocks BOPTools_BoxTree aBBTree; @@ -802,6 +842,10 @@ void BOPAlgo_PaveFiller::ForceInterfEF(const BOPDS_IndexedMapOfPaveBlock& theMPB if (!aPB->HasShrunkData()) continue; } + if (UserBreak(aPSOuter)) + { + return; + } Standard_Real f, l; Bnd_Box aPBBox; @@ -832,6 +876,11 @@ void BOPAlgo_PaveFiller::ForceInterfEF(const BOPDS_IndexedMapOfPaveBlock& theMPB // Face has no face info continue; + if (UserBreak(aPSOuter)) + { + return; + } + const Bnd_Box& aBoxF = aSI.Box(); BOPTools_BoxTreeSelector aSelector; aSelector.SetBox(Bnd_Tools::Bnd2BVH(aBoxF)); @@ -1013,23 +1062,34 @@ void BOPAlgo_PaveFiller::ForceInterfEF(const BOPDS_IndexedMapOfPaveBlock& theMPB aEdgeFace.SetFuzzyValue(myFuzzyValue + aTolAdd); aEdgeFace.UseQuickCoincidenceCheck(Standard_True); aEdgeFace.SetRange(IntTools_Range(aPB->Pave1().Parameter(), aPB->Pave2().Parameter())); - if (myProgressScope != NULL) - { - aEdgeFace.SetProgressIndicator(*myProgressScope); - } } } } Standard_Integer aNbEFs = aVEdgeFace.Length(); if (!aNbEFs) + { return; + } + + // close preparation step + aPSOuter.Next(0.7); aPBMap.Clear(); anAlloc->Reset(); + Message_ProgressScope aPS(aPSOuter.Next(9), "Checking for edges coinciding with faces", aNbEFs); + for (Standard_Integer i = 0; i < aNbEFs; i++) + { + BOPAlgo_EdgeFace& aEdgeFace = aVEdgeFace.ChangeValue(i); + aEdgeFace.SetProgressRange(aPS.Next()); + } // Perform intersection of the found pairs BOPTools_Parallel::Perform (myRunParallel, aVEdgeFace, myContext); + if (UserBreak(aPSOuter)) + { + return; + } BOPDS_VectorOfInterfEF& aEFs = myDS->InterfEF(); if (theAddInterf && aEFs.IsEmpty()) @@ -1040,9 +1100,12 @@ void BOPAlgo_PaveFiller::ForceInterfEF(const BOPDS_IndexedMapOfPaveBlock& theMPB // Collect all pairs for common block creation BOPDS_IndexedDataMapOfPaveBlockListOfInteger aMPBLI(1, anAlloc); - for (Standard_Integer i = 0; i < aNbEFs; ++i) { + if (UserBreak(aPSOuter)) + { + return; + } BOPAlgo_EdgeFace& anEdgeFace = aVEdgeFace(i); if (!anEdgeFace.IsDone() || anEdgeFace.HasErrors()) { diff --git a/src/BOPAlgo/BOPAlgo_PaveFiller_6.cxx b/src/BOPAlgo/BOPAlgo_PaveFiller_6.cxx index bba02bfbaa..51558709ab 100644 --- a/src/BOPAlgo/BOPAlgo_PaveFiller_6.cxx +++ b/src/BOPAlgo/BOPAlgo_PaveFiller_6.cxx @@ -92,14 +92,14 @@ static Standard_Real ToleranceFF(const BRepAdaptor_Surface& aBAS1, //======================================================================= class BOPAlgo_FaceFace : public IntTools_FaceFace, - public BOPAlgo_Algo { + public BOPAlgo_ParallelAlgo { public: DEFINE_STANDARD_ALLOC BOPAlgo_FaceFace() : IntTools_FaceFace(), - BOPAlgo_Algo(), + BOPAlgo_ParallelAlgo(), myIF1(-1), myIF2(-1), myTolFF(1.e-7) { } // @@ -153,7 +153,11 @@ class BOPAlgo_FaceFace : const gp_Trsf& Trsf() const { return myTrsf; } // virtual void Perform() { - BOPAlgo_Algo::UserBreak(); + Message_ProgressScope aPS(myProgressRange, NULL, 1); + if (UserBreak(aPS)) + { + return; + } try { OCC_CATCH_SIGNALS @@ -231,10 +235,11 @@ typedef NCollection_Vector BOPAlgo_VectorOfFaceFace; //function : PerformFF //purpose : //======================================================================= -void BOPAlgo_PaveFiller::PerformFF() +void BOPAlgo_PaveFiller::PerformFF(const Message_ProgressRange& theRange) { myIterator->Initialize(TopAbs_FACE, TopAbs_FACE); Standard_Integer iSize = myIterator->ExpectedLength(); + Message_ProgressScope aPSOuter(theRange, NULL, 1); if (!iSize) { return; } @@ -269,6 +274,10 @@ void BOPAlgo_PaveFiller::PerformFF() // Initialize interferences myIterator->Initialize(TopAbs_FACE, TopAbs_FACE); for (; myIterator->More(); myIterator->Next()) { + if (UserBreak(aPSOuter)) + { + return; + } myIterator->Value(nF1, nF2); if (myGlue == BOPAlgo_GlueOff) @@ -309,10 +318,6 @@ void BOPAlgo_PaveFiller::PerformFF() // aFaceFace.SetParameters(bApprox, bCompC2D1, bCompC2D2, anApproxTol); aFaceFace.SetFuzzyValue(myFuzzyValue); - if (myProgressScope != NULL) - { - aFaceFace.SetProgressIndicator(*myProgressScope); - } } else { // for the Glue mode just add all interferences of that type @@ -323,13 +328,28 @@ void BOPAlgo_PaveFiller::PerformFF() } }//for (; myIterator->More(); myIterator->Next()) { // + Standard_Integer k, aNbFaceFace = aVFaceFace.Length();; + Message_ProgressScope aPS(aPSOuter.Next(), "Performing Face-Face intersection", aNbFaceFace); + for (k = 0; k < aNbFaceFace; k++) + { + BOPAlgo_FaceFace& aFaceFace = aVFaceFace.ChangeValue(k); + aFaceFace.SetProgressRange(aPS.Next()); + } //====================================================== // Perform intersection BOPTools_Parallel::Perform (myRunParallel, aVFaceFace); + if (UserBreak(aPSOuter)) + { + return; + } //====================================================== // Treatment of the results - Standard_Integer k, aNbFaceFace = aVFaceFace.Length(); + for (k = 0; k < aNbFaceFace; ++k) { + if (UserBreak(aPSOuter)) + { + return; + } BOPAlgo_FaceFace& aFaceFace = aVFaceFace(k); aFaceFace.Indices(nF1, nF2); if (!aFaceFace.IsDone() || aFaceFace.HasErrors()) { @@ -377,6 +397,10 @@ void BOPAlgo_PaveFiller::PerformFF() // BOPDS_VectorOfCurve& aVNC = aFF.ChangeCurves(); for (Standard_Integer i = 1; i <= aNbCurves; ++i) { + if (UserBreak(aPSOuter)) + { + return; + } Bnd_Box aBox; const IntTools_Curve& aIC = aCvsX(i); Standard_Boolean bIsValid = IntTools_Tools::CheckCurve(aIC, aBox); @@ -427,14 +451,16 @@ static void UpdateSavedTolerance(const BOPDS_PDS& theDS, //function : MakeBlocks //purpose : //======================================================================= -void BOPAlgo_PaveFiller::MakeBlocks() +void BOPAlgo_PaveFiller::MakeBlocks(const Message_ProgressRange& theRange) { + Message_ProgressScope aPSOuter(theRange, NULL, 4); if (myGlue != BOPAlgo_GlueOff) { return; } // BOPDS_VectorOfInterfFF& aFFs=myDS->InterfFF(); Standard_Integer aNbFF = aFFs.Length(); + Message_ProgressScope aPS(aPSOuter.Next(), "Building section edges", aNbFF); if (!aNbFF) { return; } @@ -472,9 +498,11 @@ void BOPAlgo_PaveFiller::MakeBlocks() // Map of PaveBlocks with the faces to which it has to be added BOPAlgo_DataMapOfPaveBlockListOfInteger aPBFacesMap; // - for (i=0; iInterfFF(); const Standard_Integer aNbFF = aFFs.Length(); + Message_ProgressScope aPS(theRange, NULL, 1); for (Standard_Integer i = 0; i < aNbFF; ++i) { const BOPDS_VectorOfCurve& aVNC = aFFs(i).Curves(); @@ -3686,7 +3715,7 @@ void BOPAlgo_PaveFiller::PutSEInOtherFaces() } } // Perform intersection of collected pave blocks - ForceInterfEF(aMPBScAll, Standard_False); + ForceInterfEF(aMPBScAll, aPS.Next(), Standard_False); } //======================================================================= diff --git a/src/BOPAlgo/BOPAlgo_PaveFiller_7.cxx b/src/BOPAlgo/BOPAlgo_PaveFiller_7.cxx index 11a0cacc39..1ba29aae8a 100644 --- a/src/BOPAlgo/BOPAlgo_PaveFiller_7.cxx +++ b/src/BOPAlgo/BOPAlgo_PaveFiller_7.cxx @@ -74,13 +74,13 @@ static void UpdateVertices(const TopoDS_Edge& aE, //class : BOPAlgo_SplitEdge //purpose : //======================================================================= -class BOPAlgo_SplitEdge : public BOPAlgo_Algo { +class BOPAlgo_SplitEdge : public BOPAlgo_ParallelAlgo { public: DEFINE_STANDARD_ALLOC BOPAlgo_SplitEdge() : - BOPAlgo_Algo() { + BOPAlgo_ParallelAlgo() { myT1=0.; myT2=0.; myTol = 0.; @@ -139,7 +139,11 @@ class BOPAlgo_SplitEdge : public BOPAlgo_Algo { } // virtual void Perform () { - BOPAlgo_Algo::UserBreak(); + Message_ProgressScope aPS(myProgressRange, NULL, 1); + if (UserBreak(aPS)) + { + return; + } myTol = BOPAlgo_Tools::ComputeToleranceOfCB(myCB, myDS, myContext); BOPTools_AlgoTools::MakeSplitEdge(myE, myV1, myT1, @@ -175,13 +179,13 @@ typedef NCollection_Vector BOPAlgo_VectorOfSplitEdge; //class : BOPAlgo_MPC //purpose : //======================================================================= -class BOPAlgo_MPC : public BOPAlgo_Algo { +class BOPAlgo_MPC : public BOPAlgo_ParallelAlgo { public: DEFINE_STANDARD_ALLOC BOPAlgo_MPC() : - BOPAlgo_Algo(), + BOPAlgo_ParallelAlgo(), myFlag(Standard_False) { }; // @@ -233,6 +237,11 @@ class BOPAlgo_MPC : public BOPAlgo_Algo { } // virtual void Perform() { + Message_ProgressScope aPS(myProgressRange, NULL, 1); + if (UserBreak(aPS)) + { + return; + } try { OCC_CATCH_SIGNALS @@ -355,8 +364,17 @@ class BOPAlgo_BPC { Standard_Boolean IsToUpdate() const { return myToUpdate; } + void SetRange(const Message_ProgressRange& theRange) + { + myRange = theRange; + } // void Perform() { + Message_ProgressScope aPS(myRange, NULL, 1); + if (!aPS.More()) + { + return; + } BRepLib::BuildPCurveForEdgeOnPlane(myE, myF, myCurve, myToUpdate); }; // @@ -365,6 +383,8 @@ class BOPAlgo_BPC { TopoDS_Face myF; Handle(Geom2d_Curve) myCurve; Standard_Boolean myToUpdate; +private: + Message_ProgressRange myRange; }; //======================================================================= typedef NCollection_Vector BOPAlgo_VectorOfBPC; @@ -373,10 +393,11 @@ typedef NCollection_Vector BOPAlgo_VectorOfBPC; // function: MakeSplitEdges // purpose: //======================================================================= -void BOPAlgo_PaveFiller::MakeSplitEdges() +void BOPAlgo_PaveFiller::MakeSplitEdges(const Message_ProgressRange& theRange) { BOPDS_VectorOfListOfPaveBlock& aPBP=myDS->ChangePaveBlocksPool(); Standard_Integer aNbPBP = aPBP.Length(); + Message_ProgressScope aPSOuter(theRange, NULL, 1); if(!aNbPBP) { return; } @@ -397,6 +418,10 @@ void BOPAlgo_PaveFiller::MakeSplitEdges() // for (i = 0; i < aNbPBP; ++i) { + if (UserBreak(aPSOuter)) + { + return; + } BOPDS_ListOfPaveBlock& aLPB = aPBP(i); // aItPB.Initialize(aLPB); @@ -484,19 +509,29 @@ void BOPAlgo_PaveFiller::MakeSplitEdges() aBSE.SetCommonBlock(aCB); } aBSE.SetDS(myDS); - if (myProgressScope != NULL) - { - aBSE.SetProgressIndicator(*myProgressScope); - } } // for (; aItPB.More(); aItPB.Next()) { } // for (i=0; iInitialize(aType[i], aType[2]); for (; myIterator->More(); myIterator->Next()) { @@ -853,14 +896,27 @@ void BOPAlgo_PaveFiller::Prepare() } } // + Message_ProgressScope aPS(aPSOuter.Next(), "Building 2d curves on planar faces", aVBPC.Length()); + for (i = 0; i < aVBPC.Length(); i++) + { + BOPAlgo_BPC& aBPC = aVBPC.ChangeValue(i); + aBPC.SetRange(aPS.Next()); + } //====================================================== BOPTools_Parallel::Perform (myRunParallel, aVBPC); //====================================================== - + if (UserBreak(aPS)) + { + return; + } // pcurves are built, and now update edges BRep_Builder aBB; TopoDS_Edge E; for (i = 0; i < aVBPC.Length(); i++) { + if (UserBreak(aPSOuter)) + { + return; + } const BOPAlgo_BPC& aBPC=aVBPC(i); if (aBPC.IsToUpdate()) { Standard_Real aTolE = BRep_Tool::Tolerance(aBPC.GetEdge()); diff --git a/src/BOPAlgo/BOPAlgo_PaveFiller_8.cxx b/src/BOPAlgo/BOPAlgo_PaveFiller_8.cxx index 69619a0043..d71031252d 100644 --- a/src/BOPAlgo/BOPAlgo_PaveFiller_8.cxx +++ b/src/BOPAlgo/BOPAlgo_PaveFiller_8.cxx @@ -62,8 +62,10 @@ static //function : ProcessDE //purpose : //======================================================================= -void BOPAlgo_PaveFiller::ProcessDE() +void BOPAlgo_PaveFiller::ProcessDE(const Message_ProgressRange& theRange) { + Message_ProgressScope aPSOuter(theRange, NULL, 1); + Standard_Integer nF, aNb, nE, nV, nVSD, aNbPB; Handle(NCollection_BaseAllocator) aAllocator; Handle(BOPDS_PaveBlock) aPBD; @@ -89,7 +91,7 @@ void BOPAlgo_PaveFiller::ProcessDE() //nV,nE,nF // if (aSIF.ShapeType() == TopAbs_FACE) { - // 1. Find PaveBlocks that are go through nV for nF + // 1. Find PaveBlocks that go through nV for nF FindPaveBlocks(nV, nF, aLPBOut); aNbPB=aLPBOut.Extent(); if (aNbPB) { @@ -131,6 +133,10 @@ void BOPAlgo_PaveFiller::ProcessDE() aPBD->SetEdge(nEn); } } + if (UserBreak(aPSOuter)) + { + return; + } } } } diff --git a/src/BOPAlgo/BOPAlgo_RemoveFeatures.cxx b/src/BOPAlgo/BOPAlgo_RemoveFeatures.cxx index 3ae8e5b773..7616e1d841 100644 --- a/src/BOPAlgo/BOPAlgo_RemoveFeatures.cxx +++ b/src/BOPAlgo/BOPAlgo_RemoveFeatures.cxx @@ -124,7 +124,7 @@ static void FindSolid(const TopoDS_Shape& theSolIn, // function: Perform // purpose: Performs the removal of the requested faces from the input shape //======================================================================= -void BOPAlgo_RemoveFeatures::Perform() +void BOPAlgo_RemoveFeatures::Perform(const Message_ProgressRange& /*theRange*/) { try { diff --git a/src/BOPAlgo/BOPAlgo_RemoveFeatures.hxx b/src/BOPAlgo/BOPAlgo_RemoveFeatures.hxx index e855f24815..7db54ffa8c 100644 --- a/src/BOPAlgo/BOPAlgo_RemoveFeatures.hxx +++ b/src/BOPAlgo/BOPAlgo_RemoveFeatures.hxx @@ -201,7 +201,7 @@ public: //! @name Setting input data for the algorithm public: //! @name Performing the operation //! Performs the operation - Standard_EXPORT virtual void Perform() Standard_OVERRIDE; + Standard_EXPORT virtual void Perform(const Message_ProgressRange& theRange = Message_ProgressRange()) Standard_OVERRIDE; public: //! @name Clearing the contents of the algorithm diff --git a/src/BOPAlgo/BOPAlgo_Section.cxx b/src/BOPAlgo/BOPAlgo_Section.cxx index 26ec591fc5..e889a5c514 100644 --- a/src/BOPAlgo/BOPAlgo_Section.cxx +++ b/src/BOPAlgo/BOPAlgo_Section.cxx @@ -83,13 +83,45 @@ void BOPAlgo_Section::CheckData() // CheckFiller(); } + +//======================================================================= +// function: fillPIConstants +// purpose: +//======================================================================= +void BOPAlgo_Section::fillPIConstants (const Standard_Real theWhole, + BOPAlgo_PISteps& theSteps) const +{ + // Fill in the constants: + if (myFillHistory) + { + // for FillHistroty, which takes about 10% of the whole operation + theSteps.SetStep(PIOperation_FillHistory, 10. * theWhole / 100.); + } + + // and for PostTreat, which takes about 5% of the whole operation + theSteps.SetStep(PIOperation_PostTreat, 5. * theWhole / 100.); +} + +//======================================================================= +// function: fillPISteps +// purpose: +//======================================================================= +void BOPAlgo_Section::fillPISteps (BOPAlgo_PISteps& theSteps) const +{ + // Compute the rest of the operations - all depend on the number of sub-shapes of certain type + NbShapes aNbShapes = getNbShapes(); + theSteps.SetStep(PIOperation_TreatVertices, aNbShapes.NbVertices()); + theSteps.SetStep(PIOperation_TreatEdges, aNbShapes.NbEdges()); + theSteps.SetStep(PIOperation_BuildSection, aNbShapes.NbEdges() + aNbShapes.NbFaces()); +} //======================================================================= //function : PerformInternal1 //purpose : //======================================================================= void BOPAlgo_Section::PerformInternal1 - (const BOPAlgo_PaveFiller& theFiller) + (const BOPAlgo_PaveFiller& theFiller, const Message_ProgressRange& theRange) { + Message_ProgressScope aPS(theRange, "Building result of SECTION operation", 100); myPaveFiller=(BOPAlgo_PaveFiller*)&theFiller; myDS=myPaveFiller->PDS(); myContext=myPaveFiller->Context(); @@ -106,9 +138,11 @@ void BOPAlgo_Section::PerformInternal1 return; } // + BOPAlgo_PISteps aSteps (PIOperation_Last); + analyzeProgress(100., aSteps); // 3. Fill Images // 3.1 Vertices - FillImagesVertices(); + FillImagesVertices(aPS.Next(aSteps.GetStep(PIOperation_TreatVertices))); if (HasErrors()) { return; } @@ -118,7 +152,7 @@ void BOPAlgo_Section::PerformInternal1 return; } // 3.2 Edges - FillImagesEdges(); + FillImagesEdges(aPS.Next(aSteps.GetStep(PIOperation_TreatEdges))); if (HasErrors()) { return; } @@ -128,26 +162,25 @@ void BOPAlgo_Section::PerformInternal1 return; } // 4. Section - BuildSection(); - // + BuildSection(aPS.Next(aSteps.GetStep(PIOperation_BuildSection))); if (HasErrors()) { return; } // 5.History - PrepareHistory(); - // + PrepareHistory(aPS.Next(aSteps.GetStep(PIOperation_FillHistory))); if (HasErrors()) { return; } // 6. Post-treatment - PostTreat(); + PostTreat(aPS.Next(aSteps.GetStep(PIOperation_PostTreat))); } //======================================================================= //function : BuildSection //purpose : //======================================================================= -void BOPAlgo_Section::BuildSection() +void BOPAlgo_Section::BuildSection(const Message_ProgressRange& theRange) { + Message_ProgressScope aPS(theRange, "Building the result of Section operation", 1); Standard_Integer i, aNbMS, aNbLE; Standard_Integer j, nE, nV, aNb, aNbF, aNbPBSc; TopoDS_Shape aRC, aRC1; @@ -174,6 +207,10 @@ void BOPAlgo_Section::BuildSection() if (aSI.ShapeType()!=TopAbs_FACE) { continue; } + if (UserBreak(aPS)) + { + return; + } // const BOPDS_FaceInfo& aFI=myDS->FaceInfo(i); // @@ -250,6 +287,10 @@ void BOPAlgo_Section::BuildSection() // 3.1 Set to treat => aLS aIt.Initialize(aLSA); for (; aIt.More(); aIt.Next()) { + if (UserBreak(aPS)) + { + return; + } const TopoDS_Shape& aSA=aIt.Value(); // aLS.Clear(); @@ -331,6 +372,10 @@ void BOPAlgo_Section::BuildSection() // aNbMS=aMVE.Extent(); for (i=1; i<=aNbMS; ++i) { + if (UserBreak(aPS)) + { + return; + } const TopoDS_Shape& aV=aMVE.FindKey(i); const TopTools_ListOfShape& aLE=aMVE.FindFromIndex(i); aNbLE=aLE.Extent(); diff --git a/src/BOPAlgo/BOPAlgo_Section.hxx b/src/BOPAlgo/BOPAlgo_Section.hxx index 588b4b3062..fde4a020a1 100644 --- a/src/BOPAlgo/BOPAlgo_Section.hxx +++ b/src/BOPAlgo/BOPAlgo_Section.hxx @@ -53,12 +53,31 @@ protected: Standard_EXPORT virtual void CheckData() Standard_OVERRIDE; //! Combine the result of section operation - Standard_EXPORT virtual void BuildSection(); + Standard_EXPORT virtual void BuildSection(const Message_ProgressRange& theRange); //! Performs calculations using prepared Filler object - Standard_EXPORT virtual void PerformInternal1(const BOPAlgo_PaveFiller& thePF) Standard_OVERRIDE; + Standard_EXPORT virtual void PerformInternal1(const BOPAlgo_PaveFiller& thePF, const Message_ProgressRange& theRange) Standard_OVERRIDE; -private: +protected: + + //! List of operations to be supported by the Progress Indicator. + //! Override the whole enumeration here since the constant operations are also + //! going to be overridden. + enum BOPAlgo_PIOperation + { + PIOperation_TreatVertices = 0, + PIOperation_TreatEdges, + PIOperation_BuildSection, + PIOperation_FillHistory, + PIOperation_PostTreat, + PIOperation_Last + }; + + //! Filling steps for constant operations + Standard_EXPORT void fillPIConstants(const Standard_Real theWhole, BOPAlgo_PISteps& theSteps) const Standard_OVERRIDE; + + //! Filling steps for all other operations + Standard_EXPORT void fillPISteps(BOPAlgo_PISteps& theSteps) const Standard_OVERRIDE; }; diff --git a/src/BOPAlgo/BOPAlgo_ShellSplitter.cxx b/src/BOPAlgo/BOPAlgo_ShellSplitter.cxx index 108d44f408..107a86a4b5 100644 --- a/src/BOPAlgo/BOPAlgo_ShellSplitter.cxx +++ b/src/BOPAlgo/BOPAlgo_ShellSplitter.cxx @@ -64,11 +64,22 @@ class BOPAlgo_CBK { return *myPCB; } // + void SetProgressRange(const Message_ProgressRange& theRange) + { + myProgressRange = theRange; + } + // void Perform() { + Message_ProgressScope aPS(myProgressRange, NULL, 1); + if (!aPS.More()) + { + return; + } BOPAlgo_ShellSplitter::SplitBlock(*myPCB); } protected: BOPTools_ConnexityBlock *myPCB; + Message_ProgressRange myProgressRange; }; //======================================================================= typedef NCollection_Vector BOPAlgo_VectorOfCBK; @@ -133,14 +144,19 @@ const TopTools_ListOfShape& BOPAlgo_ShellSplitter::Shells()const //function : Perform //purpose : //======================================================================= -void BOPAlgo_ShellSplitter::Perform() +void BOPAlgo_ShellSplitter::Perform(const Message_ProgressRange& theRange) { GetReport()->Clear(); + Message_ProgressScope aPS(theRange, "Building shells", 1); // BOPTools_AlgoTools::MakeConnexityBlocks (myStartShapes, TopAbs_EDGE, TopAbs_FACE, myLCB); - // - MakeShells(); + if (UserBreak (aPS)) + { + return; + } + + MakeShells(aPS.Next()); } //======================================================================= @@ -535,7 +551,7 @@ void RefineShell(TopoDS_Shell& theShell, //function : MakeShells //purpose : //======================================================================= -void BOPAlgo_ShellSplitter::MakeShells() +void BOPAlgo_ShellSplitter::MakeShells(const Message_ProgressRange& theRange) { Standard_Boolean bIsRegular; Standard_Integer aNbVCBK, k; @@ -543,10 +559,15 @@ void BOPAlgo_ShellSplitter::MakeShells() TopTools_ListIteratorOfListOfShape aIt; BOPAlgo_VectorOfCBK aVCBK; // + Message_ProgressScope aPSOuter(theRange, NULL, 1); myShells.Clear(); // aItCB.Initialize(myLCB); for (; aItCB.More(); aItCB.Next()) { + if (UserBreak (aPSOuter)) + { + return; + } BOPTools_ConnexityBlock& aCB=aItCB.ChangeValue(); bIsRegular=aCB.IsRegular(); if (bIsRegular) { @@ -564,6 +585,11 @@ void BOPAlgo_ShellSplitter::MakeShells() } // aNbVCBK=aVCBK.Length(); + Message_ProgressScope aPSParallel(aPSOuter.Next(), NULL, aNbVCBK); + for (Standard_Integer iS = 0; iS < aNbVCBK; ++iS) + { + aVCBK.ChangeValue(iS).SetProgressRange(aPSParallel.Next()); + } //=================================================== BOPTools_Parallel::Perform (myRunParallel, aVCBK); //=================================================== diff --git a/src/BOPAlgo/BOPAlgo_ShellSplitter.hxx b/src/BOPAlgo/BOPAlgo_ShellSplitter.hxx index 95ef70540e..71a341f1d7 100644 --- a/src/BOPAlgo/BOPAlgo_ShellSplitter.hxx +++ b/src/BOPAlgo/BOPAlgo_ShellSplitter.hxx @@ -51,7 +51,7 @@ Standard_EXPORT virtual ~BOPAlgo_ShellSplitter(); Standard_EXPORT const TopTools_ListOfShape& StartElements() const; //! performs the algorithm - Standard_EXPORT virtual void Perform() Standard_OVERRIDE; + Standard_EXPORT virtual void Perform(const Message_ProgressRange& theRange = Message_ProgressRange()) Standard_OVERRIDE; //! returns the loops Standard_EXPORT const TopTools_ListOfShape& Shells() const; @@ -61,7 +61,7 @@ Standard_EXPORT virtual ~BOPAlgo_ShellSplitter(); protected: - Standard_EXPORT void MakeShells(); + Standard_EXPORT void MakeShells(const Message_ProgressRange& theRange); TopTools_ListOfShape myStartShapes; diff --git a/src/BOPAlgo/BOPAlgo_Splitter.cxx b/src/BOPAlgo/BOPAlgo_Splitter.cxx index dc53bef848..a2c8180ead 100644 --- a/src/BOPAlgo/BOPAlgo_Splitter.cxx +++ b/src/BOPAlgo/BOPAlgo_Splitter.cxx @@ -62,7 +62,7 @@ void BOPAlgo_Splitter::CheckData() //function : Perform //purpose : //======================================================================= -void BOPAlgo_Splitter::Perform() +void BOPAlgo_Splitter::Perform(const Message_ProgressRange& theRange) { GetReport()->Clear(); // @@ -89,19 +89,17 @@ void BOPAlgo_Splitter::Perform() BOPAlgo_PaveFiller *pPF = new BOPAlgo_PaveFiller(); pPF->SetArguments(aLS); pPF->SetRunParallel(myRunParallel); - if (myProgressScope != NULL) - { - pPF->SetProgressIndicator(*myProgressScope); - } + pPF->SetFuzzyValue(myFuzzyValue); pPF->SetNonDestructive(myNonDestructive); pPF->SetGlue(myGlue); pPF->SetUseOBB(myUseOBB); // - pPF->Perform(); + Message_ProgressScope aPS(theRange, "Performing Split operation", 10); + pPF->Perform(aPS.Next(9)); // myEntryPoint = 1; - PerformInternal(*pPF); + PerformInternal(*pPF, aPS.Next(1)); } //======================================================================= diff --git a/src/BOPAlgo/BOPAlgo_Splitter.hxx b/src/BOPAlgo/BOPAlgo_Splitter.hxx index 67189f3160..bc3a08ee23 100644 --- a/src/BOPAlgo/BOPAlgo_Splitter.hxx +++ b/src/BOPAlgo/BOPAlgo_Splitter.hxx @@ -60,7 +60,7 @@ public: Standard_EXPORT BOPAlgo_Splitter(const Handle(NCollection_BaseAllocator)& theAllocator); //! Performs the operation - Standard_EXPORT virtual void Perform() Standard_OVERRIDE; + Standard_EXPORT virtual void Perform(const Message_ProgressRange& theRange = Message_ProgressRange()) Standard_OVERRIDE; protected: diff --git a/src/BOPAlgo/BOPAlgo_Tools.cxx b/src/BOPAlgo/BOPAlgo_Tools.cxx index e5f3c071a2..c102ed7c53 100644 --- a/src/BOPAlgo/BOPAlgo_Tools.cxx +++ b/src/BOPAlgo/BOPAlgo_Tools.cxx @@ -1143,7 +1143,7 @@ typedef NCollection_Vector BOPAlgo_VectorOfShapeBox; //class : BOPAlgo_FillIn3DParts //purpose : Auxiliary class for faces classification in parallel mode //======================================================================= -class BOPAlgo_FillIn3DParts : public BOPAlgo_Algo +class BOPAlgo_FillIn3DParts : public BOPAlgo_ParallelAlgo { public: DEFINE_STANDARD_ALLOC @@ -1262,7 +1262,11 @@ class BOPAlgo_FillIn3DParts : public BOPAlgo_Algo //======================================================================= void BOPAlgo_FillIn3DParts::Perform() { - BOPAlgo_Algo::UserBreak(); + Message_ProgressScope aPSOuter(myProgressRange, NULL, 2); + if (UserBreak(aPSOuter)) + { + return; + } myInFaces.Clear(); @@ -1334,6 +1338,8 @@ void BOPAlgo_FillIn3DParts::Perform() MapEdgesAndFaces(aVShapeBox(aIVec(k)).Shape(), aMEFP, anAlloc); } + aPSOuter.Next(); + // Map of Edge-Face connection, necessary for solid classification. // It will be filled when first classification is performed. TopTools_IndexedDataMapOfShapeListOfShape aMEFDS(1, anAlloc); @@ -1341,8 +1347,13 @@ void BOPAlgo_FillIn3DParts::Perform() // Fence map to avoid processing of the same faces twice TopTools_MapOfShape aMFDone(1, anAlloc); - for (k = 0; k < aNbFP; ++k) + Message_ProgressScope aPSLoop (aPSOuter.Next(), NULL, aNbFP); + for (k = 0; k < aNbFP; ++k, aPSLoop.Next()) { + if (UserBreak (aPSLoop)) + { + return; + } Standard_Integer nFP = aIVec(k); const TopoDS_Face& aFP = (*(TopoDS_Face*)&aVShapeBox(nFP).Shape()); if (!aMFDone.Add(aFP)) @@ -1491,16 +1502,24 @@ void BOPAlgo_Tools::ClassifyFaces(const TopTools_ListOfShape& theFaces, Handle(IntTools_Context)& theContext, TopTools_IndexedDataMapOfShapeListOfShape& theInParts, const TopTools_DataMapOfShapeBox& theShapeBoxMap, - const TopTools_DataMapOfShapeListOfShape& theSolidsIF) + const TopTools_DataMapOfShapeListOfShape& theSolidsIF, + const Message_ProgressRange& theRange) { Handle(NCollection_BaseAllocator) anAlloc = new NCollection_IncAllocator; + Message_ProgressScope aPSOuter(theRange, NULL, 10); + // Fill the vector of shape box with faces and its bounding boxes BOPAlgo_VectorOfShapeBox aVSB(256, anAlloc); TopTools_ListIteratorOfListOfShape aItLF(theFaces); for (; aItLF.More(); aItLF.Next()) { + if (!aPSOuter.More()) + { + return; + } + const TopoDS_Shape& aF = aItLF.Value(); // Append face to the vector of shape box BOPAlgo_ShapeBox& aSB = aVSB.Appended(); @@ -1568,14 +1587,20 @@ void BOPAlgo_Tools::ClassifyFaces(const TopTools_ListOfShape& theFaces, aFIP.SetShapeBoxVector(aVSB); } + // Close preparation task + aPSOuter.Next(); + // Set progress range for each task to be run in parallel + Standard_Integer aNbS = aVFIP.Length(); + Message_ProgressScope aPSParallel(aPSOuter.Next(9), "Classification of faces relatively solids", aNbS); + for (Standard_Integer iFS = 0; iFS < aNbS; ++iFS) + { + aVFIP.ChangeValue(iFS).SetProgressRange(aPSParallel.Next()); + } // Perform classification //================================================================ BOPTools_Parallel::Perform (theRunParallel, aVFIP, theContext); //================================================================ - // Analyze the results and fill the resulting map - - Standard_Integer aNbS = aVFIP.Length(); for (Standard_Integer i = 0; i < aNbS; ++i) { BOPAlgo_FillIn3DParts& aFIP = aVFIP(i); diff --git a/src/BOPAlgo/BOPAlgo_Tools.hxx b/src/BOPAlgo/BOPAlgo_Tools.hxx index b91d3420fb..f6aaee2c25 100644 --- a/src/BOPAlgo/BOPAlgo_Tools.hxx +++ b/src/BOPAlgo/BOPAlgo_Tools.hxx @@ -31,6 +31,7 @@ #include #include #include +#include class BOPDS_PaveBlock; class BOPDS_CommonBlock; @@ -184,7 +185,8 @@ public: Handle(IntTools_Context)& theContext, TopTools_IndexedDataMapOfShapeListOfShape& theInParts, const TopTools_DataMapOfShapeBox& theShapeBoxMap = TopTools_DataMapOfShapeBox(), - const TopTools_DataMapOfShapeListOfShape& theSolidsIF = TopTools_DataMapOfShapeListOfShape()); + const TopTools_DataMapOfShapeListOfShape& theSolidsIF = TopTools_DataMapOfShapeListOfShape(), + const Message_ProgressRange& theRange = Message_ProgressRange()); //! Classifies the given parts relatively the given solids and //! fills the solids with the parts classified as INTERNAL. diff --git a/src/BOPAlgo/BOPAlgo_WireSplitter.cxx b/src/BOPAlgo/BOPAlgo_WireSplitter.cxx index 9302342c52..0653cf4b05 100644 --- a/src/BOPAlgo/BOPAlgo_WireSplitter.cxx +++ b/src/BOPAlgo/BOPAlgo_WireSplitter.cxx @@ -109,9 +109,10 @@ void BOPAlgo_WireSplitter::CheckData() //function : Perform //purpose : //======================================================================= -void BOPAlgo_WireSplitter::Perform() +void BOPAlgo_WireSplitter::Perform(const Message_ProgressRange& theRange) { GetReport()->Clear(); + Message_ProgressScope aPS(theRange, "Building wires", 1); // CheckData(); if (HasErrors()) { @@ -125,8 +126,12 @@ void BOPAlgo_WireSplitter::Perform() // BOPTools_AlgoTools::MakeConnexityBlocks (myWES->StartElements(), TopAbs_VERTEX, TopAbs_EDGE, myLCB); + if (UserBreak (aPS)) + { + return; + } - MakeWires(); + MakeWires(aPS.Next()); } ///////////////////////////////////////////////////////////////////////// @@ -158,8 +163,17 @@ class BOPAlgo_WS_ConnexityBlock { const Handle(IntTools_Context)& Context()const { return myContext; } + // + void SetProgressRange(const Message_ProgressRange& theRange) { + myRange = theRange; + } void Perform() { + Message_ProgressScope aPS (myRange, NULL, 1); + if (!aPS.More()) + { + return; + } BOPAlgo_WireSplitter::SplitBlock(myFace, myCB, myContext); } @@ -167,6 +181,7 @@ class BOPAlgo_WS_ConnexityBlock { TopoDS_Face myFace; BOPTools_ConnexityBlock myCB; Handle(IntTools_Context) myContext; + Message_ProgressRange myRange; }; typedef NCollection_Vector BOPAlgo_VectorOfConnexityBlock; @@ -175,7 +190,7 @@ typedef NCollection_Vector BOPAlgo_VectorOfConnexityB //function : MakeWires //purpose : //======================================================================= -void BOPAlgo_WireSplitter::MakeWires() +void BOPAlgo_WireSplitter::MakeWires(const Message_ProgressRange& theRange) { Standard_Boolean bIsRegular; Standard_Integer aNbVCB, k; @@ -184,10 +199,17 @@ void BOPAlgo_WireSplitter::MakeWires() TopTools_ListIteratorOfListOfShape aIt; BOPAlgo_VectorOfConnexityBlock aVCB; // + Message_ProgressScope aPSOuter(theRange, NULL, 1); + // const TopoDS_Face& aF=myWES->Face(); // aItCB.Initialize(myLCB); for (; aItCB.More(); aItCB.Next()) { + if (UserBreak (aPSOuter)) + { + return; + } + BOPTools_ConnexityBlock& aCB=aItCB.ChangeValue(); bIsRegular=aCB.IsRegular(); if (bIsRegular) { @@ -201,10 +223,15 @@ void BOPAlgo_WireSplitter::MakeWires() aWSCB.SetConnexityBlock(aCB); } } + aNbVCB=aVCB.Length(); + Message_ProgressScope aPSParallel(aPSOuter.Next(), NULL, aNbVCB); + for (Standard_Integer iW = 0; iW < aNbVCB; ++iW) + { + aVCB.ChangeValue(iW).SetProgressRange(aPSParallel.Next()); + } //=================================================== BOPTools_Parallel::Perform (myRunParallel, aVCB, myContext); //=================================================== - aNbVCB=aVCB.Length(); for (k=0; k #include +#include + #include #include @@ -130,7 +132,8 @@ Standard_Integer bapibop(Draw_Interpretor& di, pBuilder->SetUseOBB(BOPTest_Objects::UseOBB()); pBuilder->SetToFillHistory(BRepTest_Objects::IsHistoryNeeded()); // - pBuilder->Build(); + Handle(Draw_ProgressIndicator) aProgress = new Draw_ProgressIndicator(di, 1); + pBuilder->Build(aProgress->Start()); pBuilder->SimplifyResult(BOPTest_Objects::UnifyEdges(), BOPTest_Objects::UnifyFaces(), BOPTest_Objects::Angular()); @@ -197,7 +200,8 @@ Standard_Integer bapibuild(Draw_Interpretor& di, aBuilder.SetUseOBB(BOPTest_Objects::UseOBB()); aBuilder.SetToFillHistory(BRepTest_Objects::IsHistoryNeeded()); // - aBuilder.Build(); + Handle(Draw_ProgressIndicator) aProgress = new Draw_ProgressIndicator(di, 1); + aBuilder.Build(aProgress->Start()); aBuilder.SimplifyResult(BOPTest_Objects::UnifyEdges(), BOPTest_Objects::UnifyFaces(), BOPTest_Objects::Angular()); @@ -257,7 +261,8 @@ Standard_Integer bapisplit(Draw_Interpretor& di, aSplitter.SetToFillHistory(BRepTest_Objects::IsHistoryNeeded()); // // performing operation - aSplitter.Build(); + Handle(Draw_ProgressIndicator) aProgress = new Draw_ProgressIndicator(di, 1); + aSplitter.Build(aProgress->Start()); aSplitter.SimplifyResult(BOPTest_Objects::UnifyEdges(), BOPTest_Objects::UnifyFaces(), BOPTest_Objects::Angular()); diff --git a/src/BOPTest/BOPTest_BOPCommands.cxx b/src/BOPTest/BOPTest_BOPCommands.cxx index 1d2e682ee1..a9ee0eed15 100644 --- a/src/BOPTest/BOPTest_BOPCommands.cxx +++ b/src/BOPTest/BOPTest_BOPCommands.cxx @@ -43,6 +43,7 @@ #include #include #include +#include #include // @@ -145,6 +146,7 @@ Standard_Integer bop(Draw_Interpretor& di, bRunParallel=BOPTest_Objects::RunParallel(); bNonDestructive = BOPTest_Objects::NonDestructive(); BOPAlgo_GlueEnum aGlue = BOPTest_Objects::Glue(); + Handle(Draw_ProgressIndicator) aProgress = new Draw_ProgressIndicator(di, 1); // aLC.Append(aS1); aLC.Append(aS2); @@ -164,7 +166,7 @@ Standard_Integer bop(Draw_Interpretor& di, pPF->SetGlue(aGlue); pPF->SetUseOBB(BOPTest_Objects::UseOBB()); // - pPF->Perform(); + pPF->Perform(aProgress->Start()); BOPTest::ReportAlerts(pPF->GetReport()); // return 0; @@ -247,6 +249,7 @@ Standard_Integer bopsmt(Draw_Interpretor& di, } // bRunParallel=BOPTest_Objects::RunParallel(); + Handle(Draw_ProgressIndicator) aProgress = new Draw_ProgressIndicator(di, 1); // const TopoDS_Shape& aS1=aLC.First(); const TopoDS_Shape& aS2=aLC.Last(); @@ -258,7 +261,7 @@ Standard_Integer bopsmt(Draw_Interpretor& di, aBOP.SetCheckInverted(BOPTest_Objects::CheckInverted()); aBOP.SetToFillHistory(BRepTest_Objects::IsHistoryNeeded()); // - aBOP.PerformWithFiller(*pPF); + aBOP.PerformWithFiller(*pPF, aProgress->Start()); BOPTest::ReportAlerts(aBOP.GetReport()); // Store the history of Boolean operation into the session @@ -325,7 +328,8 @@ Standard_Integer bopsection(Draw_Interpretor& di, aBOP.SetCheckInverted(BOPTest_Objects::CheckInverted()); aBOP.SetToFillHistory(BRepTest_Objects::IsHistoryNeeded()); // - aBOP.PerformWithFiller(*pPF); + Handle(Draw_ProgressIndicator) aProgress = new Draw_ProgressIndicator(di, 1); + aBOP.PerformWithFiller(*pPF, aProgress->Start()); BOPTest::ReportAlerts(aBOP.GetReport()); // Store the history of Section operation into the session @@ -436,6 +440,7 @@ Standard_Integer bsection(Draw_Interpretor& di, // BRepAlgoAPI_Section aSec(aS1, aS2, Standard_False); // + Handle(Draw_ProgressIndicator) aProgress = new Draw_ProgressIndicator(di, 1); aSec.Approximation(bApp); aSec.ComputePCurveOn1(bPC1); aSec.ComputePCurveOn2(bPC2); @@ -446,8 +451,7 @@ Standard_Integer bsection(Draw_Interpretor& di, aSec.SetGlue(aGlue); aSec.SetUseOBB(BOPTest_Objects::UseOBB()); // - aSec.Build(); - + aSec.Build(aProgress->Start()); // Store the history of Section operation into the session if (BRepTest_Objects::IsHistoryNeeded()) BRepTest_Objects::SetHistory(aSec.History()); @@ -483,10 +487,8 @@ Standard_Integer bsmt (Draw_Interpretor& di, const char** a, const BOPAlgo_Operation aOp) { - Standard_Boolean bRunParallel, bNonDestructive; TopoDS_Shape aS1, aS2; TopTools_ListOfShape aLC; - Standard_Real aTol; // if (n != 4) { di << " use bx r s1 s2\n"; @@ -502,47 +504,30 @@ Standard_Integer bsmt (Draw_Interpretor& di, } aLC.Append(aS1); aLC.Append(aS2); - // - aTol=BOPTest_Objects::FuzzyValue(); - bRunParallel = BOPTest_Objects::RunParallel(); - bNonDestructive = BOPTest_Objects::NonDestructive(); - BOPAlgo_GlueEnum aGlue = BOPTest_Objects::Glue(); // Handle(NCollection_BaseAllocator)aAL= NCollection_BaseAllocator::CommonBaseAllocator(); // - //--------------------------------------------------------------- - BOPAlgo_PaveFiller aPF(aAL); - // - aPF.SetArguments(aLC); - aPF.SetFuzzyValue(aTol); - aPF.SetRunParallel(bRunParallel); - aPF.SetNonDestructive(bNonDestructive); - aPF.SetGlue(aGlue); - aPF.SetUseOBB(BOPTest_Objects::UseOBB()); - // - aPF.Perform(); - BOPTest::ReportAlerts(aPF.GetReport()); - if (aPF.HasErrors()) { - return 0; - } - // - //--------------------------------------------------------------- BOPAlgo_BOP aBOP(aAL); - // aBOP.AddArgument(aS1); aBOP.AddTool(aS2); aBOP.SetOperation(aOp); - aBOP.SetRunParallel(bRunParallel); + // set options + aBOP.SetGlue(BOPTest_Objects::Glue()); + aBOP.SetFuzzyValue(BOPTest_Objects::FuzzyValue()); + aBOP.SetNonDestructive(BOPTest_Objects::NonDestructive()); + aBOP.SetRunParallel(BOPTest_Objects::RunParallel()); + aBOP.SetUseOBB(BOPTest_Objects::UseOBB()); aBOP.SetCheckInverted(BOPTest_Objects::CheckInverted()); aBOP.SetToFillHistory(BRepTest_Objects::IsHistoryNeeded()); // - aBOP.PerformWithFiller(aPF); + Handle(Draw_ProgressIndicator) aProgress = new Draw_ProgressIndicator(di, 1); + aBOP.Perform(aProgress->Start()); BOPTest::ReportAlerts(aBOP.GetReport()); // Store the history of Boolean operation into the session if (BRepTest_Objects::IsHistoryNeeded()) - BRepTest_Objects::SetHistory(aPF.Arguments(), aBOP); + BRepTest_Objects::SetHistory(aBOP.PDS()->Arguments(), aBOP); if (aBOP.HasErrors()) { return 0; @@ -852,7 +837,8 @@ Standard_Integer mkvolume(Draw_Interpretor& di, Standard_Integer n, const char** aMV.SetUseOBB(BOPTest_Objects::UseOBB()); aMV.SetToFillHistory(BRepTest_Objects::IsHistoryNeeded()); // - aMV.Perform(); + Handle(Draw_ProgressIndicator) aProgress = new Draw_ProgressIndicator(di, 1); + aMV.Perform(aProgress->Start()); BOPTest::ReportAlerts(aMV.GetReport()); // Store the history of Volume Maker into the session diff --git a/src/BOPTest/BOPTest_CellsCommands.cxx b/src/BOPTest/BOPTest_CellsCommands.cxx index 6ff33c655f..2878fa32b0 100644 --- a/src/BOPTest/BOPTest_CellsCommands.cxx +++ b/src/BOPTest/BOPTest_CellsCommands.cxx @@ -25,6 +25,8 @@ #include +#include + static Standard_Integer bcbuild (Draw_Interpretor&, Standard_Integer, const char**); static Standard_Integer bcaddall (Draw_Interpretor&, Standard_Integer, const char**); static Standard_Integer bcremoveall (Draw_Interpretor&, Standard_Integer, const char**); @@ -116,9 +118,9 @@ Standard_Integer bcbuild(Draw_Interpretor& di, aCBuilder.SetUseOBB(BOPTest_Objects::UseOBB()); aCBuilder.SetToFillHistory(BRepTest_Objects::IsHistoryNeeded()); // - aCBuilder.PerformWithFiller(aPF); + Handle(Draw_ProgressIndicator) aProgress = new Draw_ProgressIndicator(di, 1); + aCBuilder.PerformWithFiller(aPF, aProgress->Start()); BOPTest::ReportAlerts(aCBuilder.GetReport()); - // Store the history of the Cells Builder into the session if (BRepTest_Objects::IsHistoryNeeded()) BRepTest_Objects::SetHistory(aCBuilder.Arguments(), aCBuilder); diff --git a/src/BOPTest/BOPTest_CheckCommands.cxx b/src/BOPTest/BOPTest_CheckCommands.cxx index 83ccd18a47..7a67b013d4 100644 --- a/src/BOPTest/BOPTest_CheckCommands.cxx +++ b/src/BOPTest/BOPTest_CheckCommands.cxx @@ -26,6 +26,7 @@ #include #include #include +#include #include #include #include @@ -243,7 +244,8 @@ Standard_Integer bopcheck (Draw_Interpretor& di, OSD_Timer aTimer; aTimer.Start(); // - aChecker.Perform(); + Handle(Draw_ProgressIndicator) aProgress = new Draw_ProgressIndicator(di, 1); + aChecker.Perform(aProgress->Start()); // aTimer.Stop(); // @@ -549,9 +551,9 @@ Standard_Integer bopargcheck (Draw_Interpretor& di, } } + Handle(Draw_ProgressIndicator) aProgress = new Draw_ProgressIndicator(di, 1); // run checker - aChecker.Perform(); - + aChecker.Perform(aProgress->Start()); // process result of checking if(!aChecker.HasFaulty()) { di << "Shape(s) seem(s) to be valid for BOP." << "\n"; diff --git a/src/BOPTest/BOPTest_PartitionCommands.cxx b/src/BOPTest/BOPTest_PartitionCommands.cxx index ebbb605d21..b85f70110e 100644 --- a/src/BOPTest/BOPTest_PartitionCommands.cxx +++ b/src/BOPTest/BOPTest_PartitionCommands.cxx @@ -31,6 +31,7 @@ #include #include #include +#include #include #include @@ -138,7 +139,8 @@ Standard_Integer bfillds(Draw_Interpretor& di, OSD_Timer aTimer; aTimer.Start(); // - aPF.Perform(); + Handle(Draw_ProgressIndicator) aProgress = new Draw_ProgressIndicator(di, 1); + aPF.Perform(aProgress->Start()); BOPTest::ReportAlerts(aPF.GetReport()); if (aPF.HasErrors()) { return 0; @@ -210,11 +212,12 @@ Standard_Integer bbuild(Draw_Interpretor& di, aBuilder.SetCheckInverted(BOPTest_Objects::CheckInverted()); aBuilder.SetToFillHistory(BRepTest_Objects::IsHistoryNeeded()); // + Handle(Draw_ProgressIndicator) aProgress = new Draw_ProgressIndicator(di, 1); // OSD_Timer aTimer; aTimer.Start(); // - aBuilder.PerformWithFiller(aPF); + aBuilder.PerformWithFiller(aPF, aProgress->Start()); BOPTest::ReportAlerts(aBuilder.GetReport()); // Set history of GF operation into the session @@ -327,10 +330,12 @@ Standard_Integer bbop(Draw_Interpretor& di, pBuilder->SetCheckInverted(BOPTest_Objects::CheckInverted()); pBuilder->SetToFillHistory(BRepTest_Objects::IsHistoryNeeded()); // + Handle(Draw_ProgressIndicator) aProgress = new Draw_ProgressIndicator(di, 1); + // OSD_Timer aTimer; aTimer.Start(); // - pBuilder->PerformWithFiller(aPF); + pBuilder->PerformWithFiller(aPF, aProgress->Start()); BOPTest::ReportAlerts(pBuilder->GetReport()); // Set history of Boolean operation into the session @@ -404,7 +409,8 @@ Standard_Integer bsplit(Draw_Interpretor& di, aTimer.Start(); // // perform the operation - pSplitter->PerformWithFiller(aPF); + Handle(Draw_ProgressIndicator) aProgress = new Draw_ProgressIndicator(di, 1); + pSplitter->PerformWithFiller(aPF, aProgress->Start()); // aTimer.Stop(); BOPTest::ReportAlerts(pSplitter->GetReport()); @@ -567,9 +573,9 @@ Standard_Integer buildbop(Draw_Interpretor& di, // Create new report for the operation Handle(Message_Report) aReport = new Message_Report; - + Handle(Draw_ProgressIndicator) aProgress = new Draw_ProgressIndicator(di, 1); // Build specific operation - pBuilder->BuildBOP(aLObjects, aLTools, anOp, aReport); + pBuilder->BuildBOP(aLObjects, aLTools, anOp, aProgress->Start(), aReport); // Report alerts of the operation BOPTest::ReportAlerts(aReport); diff --git a/src/BRepAlgo/BRepAlgo_Section.cxx b/src/BRepAlgo/BRepAlgo_Section.cxx index 1e9b3672c0..cc713e63fa 100644 --- a/src/BRepAlgo/BRepAlgo_Section.cxx +++ b/src/BRepAlgo/BRepAlgo_Section.cxx @@ -269,7 +269,7 @@ Standard_DISABLE_DEPRECATION_WARNINGS //function : Build //purpose : compute the section //======================================================================= - void BRepAlgo_Section::Build() + void BRepAlgo_Section::Build(const Message_ProgressRange& /*theRange*/) { if (myS1Changed || myS2Changed || diff --git a/src/BRepAlgo/BRepAlgo_Section.hxx b/src/BRepAlgo/BRepAlgo_Section.hxx index 20b80f1831..ba5f98247f 100644 --- a/src/BRepAlgo/BRepAlgo_Section.hxx +++ b/src/BRepAlgo/BRepAlgo_Section.hxx @@ -264,7 +264,7 @@ public: //! You may also have combined these computation //! options: look at the example given above to illustrate //! the use of the constructors. - Standard_EXPORT void Build() Standard_OVERRIDE; + Standard_EXPORT void Build(const Message_ProgressRange& theRange = Message_ProgressRange()) Standard_OVERRIDE; //! Identifies the ancestor faces of the new //! intersection edge E resulting from the last diff --git a/src/BRepAlgoAPI/BRepAlgoAPI_Algo.hxx b/src/BRepAlgoAPI/BRepAlgoAPI_Algo.hxx index 1511ee4645..5ff5a9e8aa 100644 --- a/src/BRepAlgoAPI/BRepAlgoAPI_Algo.hxx +++ b/src/BRepAlgoAPI/BRepAlgoAPI_Algo.hxx @@ -53,7 +53,6 @@ public: using BOPAlgo_Options::DumpWarnings; using BOPAlgo_Options::ClearWarnings; using BOPAlgo_Options::GetReport; - using BOPAlgo_Options::SetProgressIndicator; using BOPAlgo_Options::SetUseOBB; protected: diff --git a/src/BRepAlgoAPI/BRepAlgoAPI_BooleanOperation.cxx b/src/BRepAlgoAPI/BRepAlgoAPI_BooleanOperation.cxx index 969b9be10d..845b4f4e20 100644 --- a/src/BRepAlgoAPI/BRepAlgoAPI_BooleanOperation.cxx +++ b/src/BRepAlgoAPI/BRepAlgoAPI_BooleanOperation.cxx @@ -138,7 +138,7 @@ BRepAlgoAPI_BooleanOperation::BRepAlgoAPI_BooleanOperation //function : Build //purpose : //======================================================================= -void BRepAlgoAPI_BooleanOperation::Build() +void BRepAlgoAPI_BooleanOperation::Build(const Message_ProgressRange& theRange) { // Set Not Done status by default NotDone(); @@ -167,6 +167,27 @@ void BRepAlgoAPI_BooleanOperation::Build() } } + TCollection_AsciiString aPSName; + switch (myOperation) + { + case BOPAlgo_COMMON: + aPSName = "Performing COMMON operation"; + break; + case BOPAlgo_FUSE: + aPSName = "Performing FUSE operation"; + break; + case BOPAlgo_CUT: + case BOPAlgo_CUT21: + aPSName = "Performing CUT operation"; + break; + case BOPAlgo_SECTION: + aPSName = "Performing SECTION operation"; + break; + default: + return; + } + + Message_ProgressScope aPS(theRange, aPSName, myIsIntersectionNeeded ? 100 : 30); // If necessary perform intersection of the argument shapes if (myIsIntersectionNeeded) { @@ -176,7 +197,7 @@ void BRepAlgoAPI_BooleanOperation::Build() aLArgs.Append(it.Value()); // Perform intersection - IntersectShapes(aLArgs); + IntersectShapes(aLArgs, aPS.Next(70)); if (HasErrors()) { if (aDumpOper.IsDump()) @@ -203,7 +224,11 @@ void BRepAlgoAPI_BooleanOperation::Build() } // Build the result - BuildResult(); + BuildResult(aPS.Next(30)); + if (HasErrors()) + { + return; + } if (aDumpOper.IsDump()) { Standard_Boolean isDumpRes = myShape.IsNull() || diff --git a/src/BRepAlgoAPI/BRepAlgoAPI_BooleanOperation.hxx b/src/BRepAlgoAPI/BRepAlgoAPI_BooleanOperation.hxx index b298efa54a..7ab0800f56 100644 --- a/src/BRepAlgoAPI/BRepAlgoAPI_BooleanOperation.hxx +++ b/src/BRepAlgoAPI/BRepAlgoAPI_BooleanOperation.hxx @@ -110,7 +110,7 @@ public: //! @name Setting/Getting the type of Boolean operation public: //! @name Performing the operation //! Performs the Boolean operation. - Standard_EXPORT virtual void Build() Standard_OVERRIDE; + Standard_EXPORT virtual void Build(const Message_ProgressRange& theRange = Message_ProgressRange()) Standard_OVERRIDE; protected: //! @name Constructors diff --git a/src/BRepAlgoAPI/BRepAlgoAPI_BuilderAlgo.cxx b/src/BRepAlgoAPI/BRepAlgoAPI_BuilderAlgo.cxx index 4e310b2f6d..740a7fa66b 100644 --- a/src/BRepAlgoAPI/BRepAlgoAPI_BuilderAlgo.cxx +++ b/src/BRepAlgoAPI/BRepAlgoAPI_BuilderAlgo.cxx @@ -87,14 +87,15 @@ void BRepAlgoAPI_BuilderAlgo::Clear() //function : Build //purpose : //======================================================================= -void BRepAlgoAPI_BuilderAlgo::Build() +void BRepAlgoAPI_BuilderAlgo::Build(const Message_ProgressRange& theRange) { // Setting not done status NotDone(); // Destroy the tools if necessary Clear(); + Message_ProgressScope aPS(theRange, "Performing General Fuse operation", 100); // If necessary perform intersection of the argument shapes - IntersectShapes(myArguments); + IntersectShapes(myArguments, aPS.Next(70)); if (HasErrors()) return; @@ -102,16 +103,15 @@ void BRepAlgoAPI_BuilderAlgo::Build() myBuilder = new BOPAlgo_Builder(myAllocator); // Set arguments to builder myBuilder->SetArguments(myArguments); - // Build the result basing on intersection results - BuildResult(); + BuildResult(aPS.Next(30)); } //======================================================================= //function : IntersectShapes //purpose : Intersects the given shapes with the intersection tool //======================================================================= -void BRepAlgoAPI_BuilderAlgo::IntersectShapes(const TopTools_ListOfShape& theArgs) +void BRepAlgoAPI_BuilderAlgo::IntersectShapes(const TopTools_ListOfShape& theArgs, const Message_ProgressRange& theRange) { if (!myIsIntersectionNeeded) return; @@ -125,10 +125,7 @@ void BRepAlgoAPI_BuilderAlgo::IntersectShapes(const TopTools_ListOfShape& theArg myDSFiller->SetArguments(theArgs); // Set options for intersection myDSFiller->SetRunParallel(myRunParallel); - if (myProgressScope != NULL) - { - myDSFiller->SetProgressIndicator(*myProgressScope); - } + myDSFiller->SetFuzzyValue(myFuzzyValue); myDSFiller->SetNonDestructive(myNonDestructive); myDSFiller->SetGlue(myGlue); @@ -136,7 +133,7 @@ void BRepAlgoAPI_BuilderAlgo::IntersectShapes(const TopTools_ListOfShape& theArg // Set Face/Face intersection options to the intersection algorithm SetAttributes(); // Perform intersection - myDSFiller->Perform(); + myDSFiller->Perform(theRange); // Check for the errors during intersection GetReport()->Merge(myDSFiller->GetReport()); } @@ -144,18 +141,15 @@ void BRepAlgoAPI_BuilderAlgo::IntersectShapes(const TopTools_ListOfShape& theArg //function : BuildResult //purpose : Builds the result shape //======================================================================= -void BRepAlgoAPI_BuilderAlgo::BuildResult() +void BRepAlgoAPI_BuilderAlgo::BuildResult(const Message_ProgressRange& theRange) { // Set options to the builder myBuilder->SetRunParallel(myRunParallel); - if (myProgressScope != NULL) - { - myBuilder->SetProgressIndicator(*myProgressScope); - } + myBuilder->SetCheckInverted(myCheckInverted); myBuilder->SetToFillHistory(myFillHistory); // Perform building of the result with pre-calculated intersections - myBuilder->PerformWithFiller(*myDSFiller); + myBuilder->PerformWithFiller(*myDSFiller, theRange); // Merge the warnings of the Building part GetReport()->Merge(myBuilder->GetReport()); // Check for the errors diff --git a/src/BRepAlgoAPI/BRepAlgoAPI_BuilderAlgo.hxx b/src/BRepAlgoAPI/BRepAlgoAPI_BuilderAlgo.hxx index d8cc474de3..051e9ef930 100644 --- a/src/BRepAlgoAPI/BRepAlgoAPI_BuilderAlgo.hxx +++ b/src/BRepAlgoAPI/BRepAlgoAPI_BuilderAlgo.hxx @@ -138,7 +138,7 @@ public: //! @name Setting options public: //! @name Performing the operation //! Performs the algorithm - Standard_EXPORT virtual void Build() Standard_OVERRIDE; + Standard_EXPORT virtual void Build(const Message_ProgressRange& theRange = Message_ProgressRange()) Standard_OVERRIDE; public: //! @name Result simplification @@ -250,10 +250,10 @@ protected: //! @name Setting options to the Intersection tool protected: //! @name Protected methods for shapes intersection and building result //! Intersects the given shapes with the intersection tool - Standard_EXPORT void IntersectShapes(const TopTools_ListOfShape& theArgs); + Standard_EXPORT void IntersectShapes(const TopTools_ListOfShape& theArgs, const Message_ProgressRange& theRange); //! Builds the resulting shape - Standard_EXPORT void BuildResult(); + Standard_EXPORT void BuildResult(const Message_ProgressRange& theRange = Message_ProgressRange()); protected: //! @name Clearing the contents of the algorithm diff --git a/src/BRepAlgoAPI/BRepAlgoAPI_Check.cxx b/src/BRepAlgoAPI/BRepAlgoAPI_Check.cxx index 3dc0098779..3c7d4da21a 100644 --- a/src/BRepAlgoAPI/BRepAlgoAPI_Check.cxx +++ b/src/BRepAlgoAPI/BRepAlgoAPI_Check.cxx @@ -38,7 +38,8 @@ BRepAlgoAPI_Check::BRepAlgoAPI_Check() //======================================================================= BRepAlgoAPI_Check::BRepAlgoAPI_Check(const TopoDS_Shape& theS, const Standard_Boolean bTestSE, - const Standard_Boolean bTestSI) + const Standard_Boolean bTestSI, + const Message_ProgressRange& theRange) : BOPAlgo_Options(), myS1(theS), @@ -46,7 +47,7 @@ BRepAlgoAPI_Check::BRepAlgoAPI_Check(const TopoDS_Shape& theS, myTestSI(bTestSI), myOperation(BOPAlgo_UNKNOWN) { - Perform(); + Perform(theRange); } //======================================================================= @@ -57,7 +58,8 @@ BRepAlgoAPI_Check::BRepAlgoAPI_Check(const TopoDS_Shape& theS1, const TopoDS_Shape& theS2, const BOPAlgo_Operation theOp, const Standard_Boolean bTestSE, - const Standard_Boolean bTestSI) + const Standard_Boolean bTestSI, + const Message_ProgressRange& theRange) : BOPAlgo_Options(), myS1(theS1), @@ -66,7 +68,7 @@ BRepAlgoAPI_Check::BRepAlgoAPI_Check(const TopoDS_Shape& theS1, myTestSI(bTestSI), myOperation(theOp) { - Perform(); + Perform(theRange); } //======================================================================= @@ -81,7 +83,7 @@ BRepAlgoAPI_Check::~BRepAlgoAPI_Check() //function : Perform //purpose : //======================================================================= -void BRepAlgoAPI_Check::Perform() +void BRepAlgoAPI_Check::Perform(const Message_ProgressRange& theRange) { // Check the incompatibility of shapes types, small edges and self-interference BOPAlgo_ArgumentAnalyzer anAnalyzer; @@ -94,13 +96,14 @@ void BRepAlgoAPI_Check::Perform() anAnalyzer.SelfInterMode() = myTestSI; // Set options from BOPAlgo_Options anAnalyzer.SetRunParallel(myRunParallel); - if (myProgressScope != NULL) - { - anAnalyzer.SetProgressIndicator(*myProgressScope); - } anAnalyzer.SetFuzzyValue(myFuzzyValue); // Perform the check - anAnalyzer.Perform(); + Message_ProgressScope aPS(theRange, "Checking shapes", 1); + anAnalyzer.Perform(aPS.Next()); + if (UserBreak(aPS)) + { + return; + } // Get the results myFaultyShapes = anAnalyzer.GetCheckResult(); diff --git a/src/BRepAlgoAPI/BRepAlgoAPI_Check.hxx b/src/BRepAlgoAPI/BRepAlgoAPI_Check.hxx index e3ded7899c..bf9e252580 100644 --- a/src/BRepAlgoAPI/BRepAlgoAPI_Check.hxx +++ b/src/BRepAlgoAPI/BRepAlgoAPI_Check.hxx @@ -26,6 +26,7 @@ #include #include #include +#include //! The class Check provides a diagnostic tool for checking the validity @@ -66,9 +67,11 @@ public: //! @name Constructors //! on small edges or not; by default it is set to TRUE; //! @param bTestSI [in] - flag which specifies whether to check the shape //! on self-interference or not; by default it is set to TRUE; + //! @param theRange [in] - parameter to use progress indicator Standard_EXPORT BRepAlgoAPI_Check(const TopoDS_Shape& theS, const Standard_Boolean bTestSE = Standard_True, - const Standard_Boolean bTestSI = Standard_True); + const Standard_Boolean bTestSI = Standard_True, + const Message_ProgressRange& theRange = Message_ProgressRange()); //! Constructor for checking the couple of shapes. //! Additionally to the validity checks of each given shape, @@ -83,11 +86,13 @@ public: //! @name Constructors //! on small edges or not; by default it is set to TRUE; //! @param bTestSI [in] - flag which specifies whether to check the shape //! on self-interference or not; by default it is set to TRUE; + //! @param theRange [in] - parameter to use progress indicator Standard_EXPORT BRepAlgoAPI_Check(const TopoDS_Shape& theS1, const TopoDS_Shape& theS2, const BOPAlgo_Operation theOp = BOPAlgo_UNKNOWN, const Standard_Boolean bTestSE = Standard_True, - const Standard_Boolean bTestSI = Standard_True); + const Standard_Boolean bTestSI = Standard_True, + const Message_ProgressRange& theRange = Message_ProgressRange()); public: //! @name Initializing the algorithm @@ -141,7 +146,7 @@ public: //! @name Initializing the algorithm public: //! @name Performing the operation //! Performs the check. - Standard_EXPORT void Perform(); + Standard_EXPORT void Perform(const Message_ProgressRange& theRange = Message_ProgressRange()); public: //! @name Getting the results. diff --git a/src/BRepAlgoAPI/BRepAlgoAPI_Common.cxx b/src/BRepAlgoAPI/BRepAlgoAPI_Common.cxx index 12f7f53b0a..5060b99596 100644 --- a/src/BRepAlgoAPI/BRepAlgoAPI_Common.cxx +++ b/src/BRepAlgoAPI/BRepAlgoAPI_Common.cxx @@ -52,10 +52,11 @@ BRepAlgoAPI_Common::~BRepAlgoAPI_Common() //purpose : //======================================================================= BRepAlgoAPI_Common::BRepAlgoAPI_Common(const TopoDS_Shape& S1, - const TopoDS_Shape& S2) + const TopoDS_Shape& S2, + const Message_ProgressRange& theRange) : BRepAlgoAPI_BooleanOperation(S1, S2, BOPAlgo_COMMON) { - Build(); + Build(theRange); } //======================================================================= //function : BRepAlgoAPI_Common @@ -63,10 +64,11 @@ BRepAlgoAPI_Common::BRepAlgoAPI_Common(const TopoDS_Shape& S1, //======================================================================= BRepAlgoAPI_Common::BRepAlgoAPI_Common(const TopoDS_Shape& S1, const TopoDS_Shape& S2, - const BOPAlgo_PaveFiller& aDSF) + const BOPAlgo_PaveFiller& aDSF, + const Message_ProgressRange& theRange) : BRepAlgoAPI_BooleanOperation(S1, S2, aDSF, BOPAlgo_COMMON) { - Build(); + Build(theRange); } diff --git a/src/BRepAlgoAPI/BRepAlgoAPI_Common.hxx b/src/BRepAlgoAPI/BRepAlgoAPI_Common.hxx index 401593cd1b..a3151a2df8 100644 --- a/src/BRepAlgoAPI/BRepAlgoAPI_Common.hxx +++ b/src/BRepAlgoAPI/BRepAlgoAPI_Common.hxx @@ -49,7 +49,9 @@ Standard_EXPORT virtual ~BRepAlgoAPI_Common(); //! -tool //! - the type of the operation //! Obsolete - Standard_EXPORT BRepAlgoAPI_Common(const TopoDS_Shape& S1, const TopoDS_Shape& S2); + Standard_EXPORT BRepAlgoAPI_Common(const TopoDS_Shape& S1, + const TopoDS_Shape& S2, + const Message_ProgressRange& theRange = Message_ProgressRange()); //! Constructor with two shapes //! -argument @@ -57,7 +59,10 @@ Standard_EXPORT virtual ~BRepAlgoAPI_Common(); //! - the type of the operation //! - PaveFiller object that is carried out //! Obsolete - Standard_EXPORT BRepAlgoAPI_Common(const TopoDS_Shape& S1, const TopoDS_Shape& S2, const BOPAlgo_PaveFiller& PF); + Standard_EXPORT BRepAlgoAPI_Common(const TopoDS_Shape& S1, + const TopoDS_Shape& S2, + const BOPAlgo_PaveFiller& PF, + const Message_ProgressRange& theRange = Message_ProgressRange()); diff --git a/src/BRepAlgoAPI/BRepAlgoAPI_Cut.cxx b/src/BRepAlgoAPI/BRepAlgoAPI_Cut.cxx index f2a3d4fdd1..89defaf635 100644 --- a/src/BRepAlgoAPI/BRepAlgoAPI_Cut.cxx +++ b/src/BRepAlgoAPI/BRepAlgoAPI_Cut.cxx @@ -52,11 +52,12 @@ BRepAlgoAPI_Cut::~BRepAlgoAPI_Cut() //purpose : //======================================================================= BRepAlgoAPI_Cut::BRepAlgoAPI_Cut(const TopoDS_Shape& S1, - const TopoDS_Shape& S2) + const TopoDS_Shape& S2, + const Message_ProgressRange& theRange) : BRepAlgoAPI_BooleanOperation(S1, S2, BOPAlgo_CUT) { - Build(); + Build(theRange); } //======================================================================= //function : BRepAlgoAPI_Cut @@ -65,10 +66,11 @@ BRepAlgoAPI_Cut::BRepAlgoAPI_Cut(const TopoDS_Shape& S1, BRepAlgoAPI_Cut::BRepAlgoAPI_Cut(const TopoDS_Shape& S1, const TopoDS_Shape& S2, const BOPAlgo_PaveFiller& aDSF, - const Standard_Boolean bFWD) + const Standard_Boolean bFWD, + const Message_ProgressRange& theRange) : BRepAlgoAPI_BooleanOperation(S1, S2, aDSF, (bFWD) ? BOPAlgo_CUT : BOPAlgo_CUT21) { - Build(); + Build(theRange); } diff --git a/src/BRepAlgoAPI/BRepAlgoAPI_Cut.hxx b/src/BRepAlgoAPI/BRepAlgoAPI_Cut.hxx index b5255bb089..41dba20286 100644 --- a/src/BRepAlgoAPI/BRepAlgoAPI_Cut.hxx +++ b/src/BRepAlgoAPI/BRepAlgoAPI_Cut.hxx @@ -50,7 +50,8 @@ Standard_EXPORT virtual ~BRepAlgoAPI_Cut(); //! -tool //! - the type of the operation //! Obsolete - Standard_EXPORT BRepAlgoAPI_Cut(const TopoDS_Shape& S1, const TopoDS_Shape& S2); + Standard_EXPORT BRepAlgoAPI_Cut(const TopoDS_Shape& S1, const TopoDS_Shape& S2, + const Message_ProgressRange& theRange = Message_ProgressRange()); //! Constructor with two shapes //! -argument @@ -58,7 +59,9 @@ Standard_EXPORT virtual ~BRepAlgoAPI_Cut(); //! - the type of the operation //! - PaveFiller object that is carried out //! Obsolete - Standard_EXPORT BRepAlgoAPI_Cut(const TopoDS_Shape& S1, const TopoDS_Shape& S2, const BOPAlgo_PaveFiller& aDSF, const Standard_Boolean bFWD = Standard_True); + Standard_EXPORT BRepAlgoAPI_Cut(const TopoDS_Shape& S1, const TopoDS_Shape& S2, const BOPAlgo_PaveFiller& aDSF, + const Standard_Boolean bFWD = Standard_True, + const Message_ProgressRange& theRange = Message_ProgressRange()); diff --git a/src/BRepAlgoAPI/BRepAlgoAPI_Defeaturing.cxx b/src/BRepAlgoAPI/BRepAlgoAPI_Defeaturing.cxx index 272a876a94..2f4def8b8d 100644 --- a/src/BRepAlgoAPI/BRepAlgoAPI_Defeaturing.cxx +++ b/src/BRepAlgoAPI/BRepAlgoAPI_Defeaturing.cxx @@ -21,7 +21,7 @@ //function : Build //purpose : //======================================================================= -void BRepAlgoAPI_Defeaturing::Build() +void BRepAlgoAPI_Defeaturing::Build(const Message_ProgressRange& /*theRange*/) { // Set not done state for the operation NotDone(); diff --git a/src/BRepAlgoAPI/BRepAlgoAPI_Defeaturing.hxx b/src/BRepAlgoAPI/BRepAlgoAPI_Defeaturing.hxx index 43258f9548..a547766f76 100644 --- a/src/BRepAlgoAPI/BRepAlgoAPI_Defeaturing.hxx +++ b/src/BRepAlgoAPI/BRepAlgoAPI_Defeaturing.hxx @@ -157,7 +157,7 @@ public: //! @name Setting input data for the algorithm public: //! @name Performing the operation //! Performs the operation - Standard_EXPORT virtual void Build() Standard_OVERRIDE; + Standard_EXPORT virtual void Build(const Message_ProgressRange& theRange = Message_ProgressRange()) Standard_OVERRIDE; public: //! @name History Methods diff --git a/src/BRepAlgoAPI/BRepAlgoAPI_Fuse.cxx b/src/BRepAlgoAPI/BRepAlgoAPI_Fuse.cxx index 1e24153be7..cd3689b915 100644 --- a/src/BRepAlgoAPI/BRepAlgoAPI_Fuse.cxx +++ b/src/BRepAlgoAPI/BRepAlgoAPI_Fuse.cxx @@ -52,11 +52,12 @@ BRepAlgoAPI_Fuse::~BRepAlgoAPI_Fuse() //purpose : //======================================================================= BRepAlgoAPI_Fuse::BRepAlgoAPI_Fuse(const TopoDS_Shape& S1, - const TopoDS_Shape& S2) + const TopoDS_Shape& S2, + const Message_ProgressRange& theRange) : BRepAlgoAPI_BooleanOperation(S1, S2, BOPAlgo_FUSE) { - Build(); + Build(theRange); } //======================================================================= //function : BRepAlgoAPI_Fuse @@ -64,9 +65,10 @@ BRepAlgoAPI_Fuse::BRepAlgoAPI_Fuse(const TopoDS_Shape& S1, //======================================================================= BRepAlgoAPI_Fuse::BRepAlgoAPI_Fuse(const TopoDS_Shape& S1, const TopoDS_Shape& S2, - const BOPAlgo_PaveFiller& aDSF) + const BOPAlgo_PaveFiller& aDSF, + const Message_ProgressRange& theRange) : BRepAlgoAPI_BooleanOperation(S1, S2, aDSF, BOPAlgo_FUSE) { - Build(); + Build(theRange); } diff --git a/src/BRepAlgoAPI/BRepAlgoAPI_Fuse.hxx b/src/BRepAlgoAPI/BRepAlgoAPI_Fuse.hxx index 52dd5dc89e..53fd176773 100644 --- a/src/BRepAlgoAPI/BRepAlgoAPI_Fuse.hxx +++ b/src/BRepAlgoAPI/BRepAlgoAPI_Fuse.hxx @@ -49,7 +49,8 @@ Standard_EXPORT virtual ~BRepAlgoAPI_Fuse(); //! -tool //! - the type of the operation //! Obsolete - Standard_EXPORT BRepAlgoAPI_Fuse(const TopoDS_Shape& S1, const TopoDS_Shape& S2); + Standard_EXPORT BRepAlgoAPI_Fuse(const TopoDS_Shape& S1, const TopoDS_Shape& S2, + const Message_ProgressRange& theRange = Message_ProgressRange()); //! Constructor with two shapes //! -argument @@ -57,7 +58,8 @@ Standard_EXPORT virtual ~BRepAlgoAPI_Fuse(); //! - the type of the operation //! - PaveFiller object that is carried out //! Obsolete - Standard_EXPORT BRepAlgoAPI_Fuse(const TopoDS_Shape& S1, const TopoDS_Shape& S2, const BOPAlgo_PaveFiller& aDSF); + Standard_EXPORT BRepAlgoAPI_Fuse(const TopoDS_Shape& S1, const TopoDS_Shape& S2, const BOPAlgo_PaveFiller& aDSF, + const Message_ProgressRange& theRange = Message_ProgressRange()); diff --git a/src/BRepAlgoAPI/BRepAlgoAPI_Section.cxx b/src/BRepAlgoAPI/BRepAlgoAPI_Section.cxx index 2e59aaf5f4..1125e6d719 100644 --- a/src/BRepAlgoAPI/BRepAlgoAPI_Section.cxx +++ b/src/BRepAlgoAPI/BRepAlgoAPI_Section.cxx @@ -271,9 +271,9 @@ void BRepAlgoAPI_Section::SetAttributes() //function : Build //purpose : //======================================================================= -void BRepAlgoAPI_Section::Build() +void BRepAlgoAPI_Section::Build(const Message_ProgressRange& theRange) { - BRepAlgoAPI_BooleanOperation::Build(); + BRepAlgoAPI_BooleanOperation::Build(theRange); } //======================================================================= //function : HasAncestorFaceOn1 diff --git a/src/BRepAlgoAPI/BRepAlgoAPI_Section.hxx b/src/BRepAlgoAPI/BRepAlgoAPI_Section.hxx index 2582d5705a..78e525f8b7 100644 --- a/src/BRepAlgoAPI/BRepAlgoAPI_Section.hxx +++ b/src/BRepAlgoAPI/BRepAlgoAPI_Section.hxx @@ -158,7 +158,7 @@ Standard_EXPORT virtual ~BRepAlgoAPI_Section(); //! Performs the algorithm //! Filling interference Data Structure (if it is necessary) //! Building the result of the operation. - Standard_EXPORT virtual void Build() Standard_OVERRIDE; + Standard_EXPORT virtual void Build(const Message_ProgressRange& theRange = Message_ProgressRange()) Standard_OVERRIDE; //! get the face of the first part giving section edge . diff --git a/src/BRepAlgoAPI/BRepAlgoAPI_Splitter.cxx b/src/BRepAlgoAPI/BRepAlgoAPI_Splitter.cxx index 4a0fd00d70..bd5a978792 100644 --- a/src/BRepAlgoAPI/BRepAlgoAPI_Splitter.cxx +++ b/src/BRepAlgoAPI/BRepAlgoAPI_Splitter.cxx @@ -35,7 +35,7 @@ BRepAlgoAPI_Splitter::BRepAlgoAPI_Splitter(const BOPAlgo_PaveFiller& thePF) // function: Build // purpose: //======================================================================= -void BRepAlgoAPI_Splitter::Build() +void BRepAlgoAPI_Splitter::Build(const Message_ProgressRange& theRange) { // Set Not Done status by default NotDone(); @@ -50,6 +50,7 @@ void BRepAlgoAPI_Splitter::Build() } // If necessary perform intersection of the argument shapes + Message_ProgressScope aPS(theRange, "Performing Split operation", myIsIntersectionNeeded ? 100 : 30); if (myIsIntersectionNeeded) { // Combine Arguments and Tools for intersection into a single list @@ -58,7 +59,7 @@ void BRepAlgoAPI_Splitter::Build() aLArgs.Append(it.Value()); // Perform intersection - IntersectShapes(aLArgs); + IntersectShapes(aLArgs, aPS.Next(70)); if (HasErrors()) return; } @@ -69,5 +70,5 @@ void BRepAlgoAPI_Splitter::Build() ((BOPAlgo_Splitter*)myBuilder)->SetTools(myTools); // Build result shape basing on the intersection results - BuildResult(); + BuildResult(aPS.Next(30)); } diff --git a/src/BRepAlgoAPI/BRepAlgoAPI_Splitter.hxx b/src/BRepAlgoAPI/BRepAlgoAPI_Splitter.hxx index 97288441d2..eed0680760 100644 --- a/src/BRepAlgoAPI/BRepAlgoAPI_Splitter.hxx +++ b/src/BRepAlgoAPI/BRepAlgoAPI_Splitter.hxx @@ -82,7 +82,7 @@ public: //! @name Performing the operation //! Performs the Split operation. //! Performs the intersection of the argument shapes (both objects and tools) //! and splits objects by the tools. - Standard_EXPORT virtual void Build() Standard_OVERRIDE; + Standard_EXPORT virtual void Build(const Message_ProgressRange& theRange = Message_ProgressRange()) Standard_OVERRIDE; protected: //! @name Fields diff --git a/src/BRepBuilderAPI/BRepBuilderAPI_MakeShape.cxx b/src/BRepBuilderAPI/BRepBuilderAPI_MakeShape.cxx index ba27b58772..2ff0a1454c 100644 --- a/src/BRepBuilderAPI/BRepBuilderAPI_MakeShape.cxx +++ b/src/BRepBuilderAPI/BRepBuilderAPI_MakeShape.cxx @@ -36,7 +36,7 @@ BRepBuilderAPI_MakeShape::BRepBuilderAPI_MakeShape() //purpose : //======================================================================= -void BRepBuilderAPI_MakeShape::Build() +void BRepBuilderAPI_MakeShape::Build(const Message_ProgressRange& /*theRange*/) { } diff --git a/src/BRepBuilderAPI/BRepBuilderAPI_MakeShape.hxx b/src/BRepBuilderAPI/BRepBuilderAPI_MakeShape.hxx index 7536e26b13..d7d6b5ec91 100644 --- a/src/BRepBuilderAPI/BRepBuilderAPI_MakeShape.hxx +++ b/src/BRepBuilderAPI/BRepBuilderAPI_MakeShape.hxx @@ -25,6 +25,7 @@ #include #include #include +#include class StdFail_NotDone; class TopoDS_Shape; @@ -42,7 +43,7 @@ public: //! This is called by Shape(). It does nothing but //! may be redefined. - Standard_EXPORT virtual void Build(); + Standard_EXPORT virtual void Build(const Message_ProgressRange& theRange = Message_ProgressRange()); //! Returns a shape built by the shape construction algorithm. //! Raises exception StdFail_NotDone if the shape was not built. diff --git a/src/BRepFeat/BRepFeat_Builder.cxx b/src/BRepFeat/BRepFeat_Builder.cxx index 4a6635ea55..24c641209b 100644 --- a/src/BRepFeat/BRepFeat_Builder.cxx +++ b/src/BRepFeat/BRepFeat_Builder.cxx @@ -213,45 +213,76 @@ //function : PerformResult //purpose : //======================================================================= - void BRepFeat_Builder::PerformResult() + void BRepFeat_Builder::PerformResult(const Message_ProgressRange& theRange) { myOperation = myFuse ? BOPAlgo_FUSE : BOPAlgo_CUT; - // - if (!myShapes.IsEmpty()) { - // - Prepare(); - // - RebuildFaces(); - // - FillImagesContainers(TopAbs_SHELL); - if (HasErrors()) { - return; - } - // - FillImagesSolids(); - if (HasErrors()) { - return; - } - // - CheckSolidImages(); - // - BuildResult(TopAbs_SOLID); - if (HasErrors()) { - return; - } - // - FillImagesCompounds(); - if (HasErrors()) { - return; - } - // - BuildResult(TopAbs_COMPOUND); - if (HasErrors()) { - return; + if (myShapes.IsEmpty()) + { + BuildShape(theRange); + return; + } + + Standard_Real aWhole = 100.; + Message_ProgressScope aPS(theRange, "BRepFeat_Builder", aWhole); + Standard_Real aBSPart = 15; + aWhole -= aBSPart; + + // Compute PI steps + const Standard_Integer aSize = 4; + NCollection_Array1 aSteps(0, aSize - 1); + { + for (Standard_Integer i = 0; i < aSize; ++i) + aSteps(i) = 0.; + + NbShapes aNbShapes = getNbShapes(); + Standard_Real aTreatFaces = 5 * aNbShapes.NbFaces(); + Standard_Real aTreatShells = aNbShapes.NbShells(); + Standard_Real aTreatSolids = 20 * aNbShapes.NbSolids(); + Standard_Real aTreatCompounds = aNbShapes.NbCompounds(); + + Standard_Real aSum = aTreatFaces + aTreatShells + aTreatSolids + aTreatCompounds; + if (aSum > 0) + { + aSteps(0) = aTreatFaces * aWhole / aSum; + aSteps(1) = aTreatShells * aWhole / aSum; + aSteps(2) = aTreatSolids * aWhole / aSum; + aSteps(3) = aTreatCompounds * aWhole / aSum; } } // - BuildShape(); + Prepare(); + // + RebuildFaces(); + aPS.Next(aSteps(0)); + // + FillImagesContainers(TopAbs_SHELL, aPS.Next(aSteps(1))); + if (HasErrors()) { + return; + } + // + FillImagesSolids(aPS.Next(aSteps(2))); + if (HasErrors()) { + return; + } + // + CheckSolidImages(); + // + BuildResult(TopAbs_SOLID); + if (HasErrors()) { + return; + } + // + FillImagesCompounds(aPS.Next(aSteps(3))); + if (HasErrors()) { + return; + } + // + BuildResult(TopAbs_COMPOUND); + if (HasErrors()) { + return; + } + // + BuildShape(aPS.Next(aBSPart)); } //======================================================================= @@ -732,11 +763,12 @@ //function : FillIn3DParts //purpose : //======================================================================= - void BRepFeat_Builder::FillIn3DParts(TopTools_DataMapOfShapeShape& theDraftSolids) + void BRepFeat_Builder::FillIn3DParts(TopTools_DataMapOfShapeShape& theDraftSolids, + const Message_ProgressRange& theRange) { GetReport()->Clear(); - BOPAlgo_Builder::FillIn3DParts(theDraftSolids); + BOPAlgo_Builder::FillIn3DParts(theDraftSolids, theRange); // Clear the IN parts of the solids from the removed faces TopTools_DataMapOfShapeListOfShape::Iterator itM(myInParts); diff --git a/src/BRepFeat/BRepFeat_Builder.hxx b/src/BRepFeat/BRepFeat_Builder.hxx index a9a96a03b5..b0f2616832 100644 --- a/src/BRepFeat/BRepFeat_Builder.hxx +++ b/src/BRepFeat/BRepFeat_Builder.hxx @@ -89,7 +89,7 @@ Standard_EXPORT virtual ~BRepFeat_Builder(); //! Main function to build the result of the //! local operation required. - Standard_EXPORT void PerformResult(); + Standard_EXPORT void PerformResult(const Message_ProgressRange& theRange = Message_ProgressRange()); //! Rebuilds faces in accordance with the kept parts of the tool. Standard_EXPORT void RebuildFaces(); @@ -112,12 +112,12 @@ Standard_EXPORT virtual ~BRepFeat_Builder(); protected: - //! Prepares builder of local operation. Standard_EXPORT virtual void Prepare() Standard_OVERRIDE; //! Function is redefined to avoid the usage of removed faces. - Standard_EXPORT virtual void FillIn3DParts (TopTools_DataMapOfShapeShape& theDraftSolids) Standard_OVERRIDE; + Standard_EXPORT virtual void FillIn3DParts (TopTools_DataMapOfShapeShape& theDraftSolids, + const Message_ProgressRange& theRange) Standard_OVERRIDE; //! Avoid the check for open solids and always use the splits //! of solids for building the result shape. diff --git a/src/BRepFeat/BRepFeat_Gluer.cxx b/src/BRepFeat/BRepFeat_Gluer.cxx index a6f9c836f8..b119560b4a 100644 --- a/src/BRepFeat/BRepFeat_Gluer.cxx +++ b/src/BRepFeat/BRepFeat_Gluer.cxx @@ -26,7 +26,7 @@ //function : Build //purpose : //======================================================================= -void BRepFeat_Gluer::Build() +void BRepFeat_Gluer::Build(const Message_ProgressRange& /*theRange*/) { myGluer.Perform(); if (myGluer.IsDone()) { diff --git a/src/BRepFeat/BRepFeat_Gluer.hxx b/src/BRepFeat/BRepFeat_Gluer.hxx index cd29cd033c..aba0dfe40c 100644 --- a/src/BRepFeat/BRepFeat_Gluer.hxx +++ b/src/BRepFeat/BRepFeat_Gluer.hxx @@ -91,7 +91,7 @@ public: //! This is called by Shape(). It does nothing but //! may be redefined. - Standard_EXPORT virtual void Build() Standard_OVERRIDE; + Standard_EXPORT virtual void Build(const Message_ProgressRange& theRange = Message_ProgressRange()) Standard_OVERRIDE; //! returns the status of the Face after //! the shape creation. diff --git a/src/BRepFeat/BRepFeat_SplitShape.cxx b/src/BRepFeat/BRepFeat_SplitShape.cxx index 2a559c05fa..4b5ea9399c 100644 --- a/src/BRepFeat/BRepFeat_SplitShape.cxx +++ b/src/BRepFeat/BRepFeat_SplitShape.cxx @@ -33,7 +33,7 @@ //function : Build //purpose : //======================================================================= -void BRepFeat_SplitShape::Build () +void BRepFeat_SplitShape::Build (const Message_ProgressRange& /*theRange*/) { mySShape.Perform(myWOnShape); if (mySShape.IsDone()) { diff --git a/src/BRepFeat/BRepFeat_SplitShape.hxx b/src/BRepFeat/BRepFeat_SplitShape.hxx index 1ebcce2a01..e38edf2d5e 100644 --- a/src/BRepFeat/BRepFeat_SplitShape.hxx +++ b/src/BRepFeat/BRepFeat_SplitShape.hxx @@ -109,7 +109,7 @@ public: Standard_EXPORT const TopTools_ListOfShape& Right() const; //! Builds the cut and the resulting faces and edges as well. - Standard_EXPORT void Build() Standard_OVERRIDE; + Standard_EXPORT void Build(const Message_ProgressRange& theRange = Message_ProgressRange()) Standard_OVERRIDE; //! Returns true if the shape has been deleted. Standard_EXPORT virtual Standard_Boolean IsDeleted (const TopoDS_Shape& S) Standard_OVERRIDE; diff --git a/src/BRepFill/BRepFill_Draft.cxx b/src/BRepFill/BRepFill_Draft.cxx index eb44aca877..65f605bf74 100644 --- a/src/BRepFill/BRepFill_Draft.cxx +++ b/src/BRepFill/BRepFill_Draft.cxx @@ -722,7 +722,7 @@ static Standard_Boolean GoodOrientation(const Bnd_Box& B, TopTools_ListOfShape aLO, aLT; aLO.Append(Sol1); aLT.Append(Sol2); - aBuilder.BuildBOP(aLO, aLT, BOPAlgo_CUT); + aBuilder.BuildBOP(aLO, aLT, BOPAlgo_CUT, Message_ProgressRange()); if (!aBuilder.HasErrors()) { TopoDS_Solid aCutMin; @@ -769,7 +769,7 @@ static Standard_Boolean GoodOrientation(const Bnd_Box& B, aLO.Clear(); aLO.Append(aCutMin); - aGluer.BuildBOP(aLO, State1, aLT, State2); + aGluer.BuildBOP(aLO, State1, aLT, State2, Message_ProgressRange()); if (!aGluer.HasErrors()) { @@ -791,7 +791,7 @@ static Standard_Boolean GoodOrientation(const Bnd_Box& B, aLO.Append(Sol1); aLT.Append(Sol2); - aBuilder.BuildBOP(aLO, State1, aLT, State2); + aBuilder.BuildBOP(aLO, State1, aLT, State2, Message_ProgressRange()); if (aBuilder.HasErrors()) return Standard_False; diff --git a/src/BRepFilletAPI/BRepFilletAPI_MakeChamfer.cxx b/src/BRepFilletAPI/BRepFilletAPI_MakeChamfer.cxx index 25dbeb6190..85bcc71d61 100644 --- a/src/BRepFilletAPI/BRepFilletAPI_MakeChamfer.cxx +++ b/src/BRepFilletAPI/BRepFilletAPI_MakeChamfer.cxx @@ -391,7 +391,7 @@ Handle(TopOpeBRepBuild_HBuilder) BRepFilletAPI_MakeChamfer::Builder()const //purpose : //======================================================================= -void BRepFilletAPI_MakeChamfer::Build() +void BRepFilletAPI_MakeChamfer::Build(const Message_ProgressRange& /*theRange*/) { myBuilder.Compute(); if (myBuilder.IsDone()){ diff --git a/src/BRepFilletAPI/BRepFilletAPI_MakeChamfer.hxx b/src/BRepFilletAPI/BRepFilletAPI_MakeChamfer.hxx index b395ef88fa..b13cc67e3c 100644 --- a/src/BRepFilletAPI/BRepFilletAPI_MakeChamfer.hxx +++ b/src/BRepFilletAPI/BRepFilletAPI_MakeChamfer.hxx @@ -250,7 +250,7 @@ public: //! intersection of 4 or more edges of the shape, or //! - the intersection of the chamfer with a face which //! limits the contour is not fully contained in this face. - Standard_EXPORT virtual void Build() Standard_OVERRIDE; + Standard_EXPORT virtual void Build(const Message_ProgressRange& theRange = Message_ProgressRange()) Standard_OVERRIDE; //! Reinitializes this algorithm, thus canceling the effects of the Build function. //! This function allows modifications to be made to the diff --git a/src/BRepFilletAPI/BRepFilletAPI_MakeFillet.cxx b/src/BRepFilletAPI/BRepFilletAPI_MakeFillet.cxx index 8a942e992b..54c31dafd1 100644 --- a/src/BRepFilletAPI/BRepFilletAPI_MakeFillet.cxx +++ b/src/BRepFilletAPI/BRepFilletAPI_MakeFillet.cxx @@ -528,7 +528,7 @@ Handle(TopOpeBRepBuild_HBuilder) BRepFilletAPI_MakeFillet::Builder()const //purpose : //======================================================================= -void BRepFilletAPI_MakeFillet::Build() +void BRepFilletAPI_MakeFillet::Build(const Message_ProgressRange& /*theRange*/) { myBuilder.Compute(); if(myBuilder.IsDone()) { diff --git a/src/BRepFilletAPI/BRepFilletAPI_MakeFillet.hxx b/src/BRepFilletAPI/BRepFilletAPI_MakeFillet.hxx index 8c22d8a09c..1d4dee1bab 100644 --- a/src/BRepFilletAPI/BRepFilletAPI_MakeFillet.hxx +++ b/src/BRepFilletAPI/BRepFilletAPI_MakeFillet.hxx @@ -293,7 +293,7 @@ public: //! intersection of 4 or more edges of the shape, or //! - the intersection of the fillet with a face which limits //! the contour is not fully contained in this face. - Standard_EXPORT virtual void Build() Standard_OVERRIDE; + Standard_EXPORT virtual void Build(const Message_ProgressRange& theRange = Message_ProgressRange()) Standard_OVERRIDE; //! Reinitializes this algorithm, thus canceling the effects of the Build function. //! This function allows modifications to be made to the diff --git a/src/BRepFilletAPI/BRepFilletAPI_MakeFillet2d.cxx b/src/BRepFilletAPI/BRepFilletAPI_MakeFillet2d.cxx index 08926078e6..3c544d8e63 100644 --- a/src/BRepFilletAPI/BRepFilletAPI_MakeFillet2d.cxx +++ b/src/BRepFilletAPI/BRepFilletAPI_MakeFillet2d.cxx @@ -155,7 +155,7 @@ const TopoDS_Edge& BRepFilletAPI_MakeFillet2d::BasisEdge(const TopoDS_Edge& E) c //purpose : //======================================================================= -void BRepFilletAPI_MakeFillet2d::Build() +void BRepFilletAPI_MakeFillet2d::Build(const Message_ProgressRange& /*theRange*/) { // test if the operation is done if (Status() == ChFi2d_IsDone) { diff --git a/src/BRepFilletAPI/BRepFilletAPI_MakeFillet2d.hxx b/src/BRepFilletAPI/BRepFilletAPI_MakeFillet2d.hxx index 645e4b14f2..a7a3a85a26 100644 --- a/src/BRepFilletAPI/BRepFilletAPI_MakeFillet2d.hxx +++ b/src/BRepFilletAPI/BRepFilletAPI_MakeFillet2d.hxx @@ -282,7 +282,7 @@ public: ChFi2d_ConstructionError Status() const; //! Update the result and set the Done flag - Standard_EXPORT virtual void Build() Standard_OVERRIDE; + Standard_EXPORT virtual void Build(const Message_ProgressRange& theRange = Message_ProgressRange()) Standard_OVERRIDE; diff --git a/src/BRepOffsetAPI/BRepOffsetAPI_DraftAngle.cxx b/src/BRepOffsetAPI/BRepOffsetAPI_DraftAngle.cxx index 50eadac75b..4e2f73ed37 100644 --- a/src/BRepOffsetAPI/BRepOffsetAPI_DraftAngle.cxx +++ b/src/BRepOffsetAPI/BRepOffsetAPI_DraftAngle.cxx @@ -305,7 +305,7 @@ TopoDS_Shape BRepOffsetAPI_DraftAngle::ModifiedShape //purpose : //======================================================================= -void BRepOffsetAPI_DraftAngle::Build() +void BRepOffsetAPI_DraftAngle::Build(const Message_ProgressRange& /*theRange*/) { Handle(Draft_Modification)::DownCast (myModification)->Perform(); if (!Handle(Draft_Modification)::DownCast (myModification)->IsDone()) { diff --git a/src/BRepOffsetAPI/BRepOffsetAPI_DraftAngle.hxx b/src/BRepOffsetAPI/BRepOffsetAPI_DraftAngle.hxx index 8fef1b0227..a74e31b3bb 100644 --- a/src/BRepOffsetAPI/BRepOffsetAPI_DraftAngle.hxx +++ b/src/BRepOffsetAPI/BRepOffsetAPI_DraftAngle.hxx @@ -176,7 +176,7 @@ public: Standard_EXPORT const TopTools_ListOfShape& ModifiedFaces() const; //! Builds the resulting shape (redefined from MakeShape). - Standard_EXPORT virtual void Build() Standard_OVERRIDE; + Standard_EXPORT virtual void Build(const Message_ProgressRange& theRange = Message_ProgressRange()) Standard_OVERRIDE; Standard_EXPORT void CorrectWires(); diff --git a/src/BRepOffsetAPI/BRepOffsetAPI_MakeEvolved.cxx b/src/BRepOffsetAPI/BRepOffsetAPI_MakeEvolved.cxx index 1b7612b570..0fc1c6763c 100644 --- a/src/BRepOffsetAPI/BRepOffsetAPI_MakeEvolved.cxx +++ b/src/BRepOffsetAPI/BRepOffsetAPI_MakeEvolved.cxx @@ -114,7 +114,7 @@ const BRepFill_Evolved& BRepOffsetAPI_MakeEvolved::Evolved() const //function : Build //purpose : //======================================================================= -void BRepOffsetAPI_MakeEvolved::Build() +void BRepOffsetAPI_MakeEvolved::Build(const Message_ProgressRange& /*theRange*/) { if (myEvolved.IsDone()) { diff --git a/src/BRepOffsetAPI/BRepOffsetAPI_MakeEvolved.hxx b/src/BRepOffsetAPI/BRepOffsetAPI_MakeEvolved.hxx index ea2e106211..f311f4c561 100644 --- a/src/BRepOffsetAPI/BRepOffsetAPI_MakeEvolved.hxx +++ b/src/BRepOffsetAPI/BRepOffsetAPI_MakeEvolved.hxx @@ -106,7 +106,7 @@ public: Standard_EXPORT const BRepFill_Evolved& Evolved() const; //! Builds the resulting shape (redefined from MakeShape). - Standard_EXPORT virtual void Build() Standard_OVERRIDE; + Standard_EXPORT virtual void Build(const Message_ProgressRange& theRange = Message_ProgressRange()) Standard_OVERRIDE; //! Returns the shapes created from a subshape //! of the spine and a subshape diff --git a/src/BRepOffsetAPI/BRepOffsetAPI_MakeFilling.cxx b/src/BRepOffsetAPI/BRepOffsetAPI_MakeFilling.cxx index b8bfcbef66..5eb9909159 100644 --- a/src/BRepOffsetAPI/BRepOffsetAPI_MakeFilling.cxx +++ b/src/BRepOffsetAPI/BRepOffsetAPI_MakeFilling.cxx @@ -144,7 +144,7 @@ Standard_Integer BRepOffsetAPI_MakeFilling::Add( const Standard_Real U, //function : Build //purpose : builds the resulting face //====================================================================== -void BRepOffsetAPI_MakeFilling::Build() +void BRepOffsetAPI_MakeFilling::Build(const Message_ProgressRange& /*theRange*/) { myFilling.Build(); myShape = myFilling.Face(); diff --git a/src/BRepOffsetAPI/BRepOffsetAPI_MakeFilling.hxx b/src/BRepOffsetAPI/BRepOffsetAPI_MakeFilling.hxx index 975eac073e..641633c407 100644 --- a/src/BRepOffsetAPI/BRepOffsetAPI_MakeFilling.hxx +++ b/src/BRepOffsetAPI/BRepOffsetAPI_MakeFilling.hxx @@ -183,7 +183,7 @@ public: Standard_EXPORT Standard_Integer Add (const Standard_Real U, const Standard_Real V, const TopoDS_Face& Support, const GeomAbs_Shape Order); //! Builds the resulting faces - Standard_EXPORT virtual void Build() Standard_OVERRIDE; + Standard_EXPORT virtual void Build(const Message_ProgressRange& theRange = Message_ProgressRange()) Standard_OVERRIDE; //! Tests whether computation of the filling plate has been completed. Standard_EXPORT virtual Standard_Boolean IsDone() const Standard_OVERRIDE; diff --git a/src/BRepOffsetAPI/BRepOffsetAPI_MakeOffset.cxx b/src/BRepOffsetAPI/BRepOffsetAPI_MakeOffset.cxx index 9c25655175..a6b1720535 100644 --- a/src/BRepOffsetAPI/BRepOffsetAPI_MakeOffset.cxx +++ b/src/BRepOffsetAPI/BRepOffsetAPI_MakeOffset.cxx @@ -373,7 +373,7 @@ void BRepOffsetAPI_MakeOffset::Perform(const Standard_Real Offset, //purpose : //======================================================================= -void BRepOffsetAPI_MakeOffset::Build() +void BRepOffsetAPI_MakeOffset::Build(const Message_ProgressRange& /*theRange*/) { Done(); } diff --git a/src/BRepOffsetAPI/BRepOffsetAPI_MakeOffset.hxx b/src/BRepOffsetAPI/BRepOffsetAPI_MakeOffset.hxx index f2ea8cb646..1ab16bb1fd 100644 --- a/src/BRepOffsetAPI/BRepOffsetAPI_MakeOffset.hxx +++ b/src/BRepOffsetAPI/BRepOffsetAPI_MakeOffset.hxx @@ -79,7 +79,7 @@ public: Standard_EXPORT void Perform (const Standard_Real Offset, const Standard_Real Alt = 0.0); //! Builds the resulting shape (redefined from MakeShape). - Standard_EXPORT virtual void Build() Standard_OVERRIDE; + Standard_EXPORT virtual void Build(const Message_ProgressRange& theRange = Message_ProgressRange()) Standard_OVERRIDE; //! returns a list of the created shapes //! from the shape . diff --git a/src/BRepOffsetAPI/BRepOffsetAPI_MakeOffsetShape.cxx b/src/BRepOffsetAPI/BRepOffsetAPI_MakeOffsetShape.cxx index 99e6eb4a74..d00d7d1610 100644 --- a/src/BRepOffsetAPI/BRepOffsetAPI_MakeOffsetShape.cxx +++ b/src/BRepOffsetAPI/BRepOffsetAPI_MakeOffsetShape.cxx @@ -90,7 +90,7 @@ const BRepOffset_MakeOffset& BRepOffsetAPI_MakeOffsetShape::MakeOffset() const //function : Build //purpose : //======================================================================= -void BRepOffsetAPI_MakeOffsetShape::Build() +void BRepOffsetAPI_MakeOffsetShape::Build(const Message_ProgressRange& /*theRange*/) { } diff --git a/src/BRepOffsetAPI/BRepOffsetAPI_MakeOffsetShape.hxx b/src/BRepOffsetAPI/BRepOffsetAPI_MakeOffsetShape.hxx index c380e1b275..1a863c1091 100644 --- a/src/BRepOffsetAPI/BRepOffsetAPI_MakeOffsetShape.hxx +++ b/src/BRepOffsetAPI/BRepOffsetAPI_MakeOffsetShape.hxx @@ -120,7 +120,7 @@ public: Standard_EXPORT virtual const BRepOffset_MakeOffset& MakeOffset() const; //! Does nothing. - Standard_EXPORT virtual void Build() Standard_OVERRIDE; + Standard_EXPORT virtual void Build(const Message_ProgressRange& theRange = Message_ProgressRange()) Standard_OVERRIDE; //! Returns the list of shapes generated from the shape . Standard_EXPORT virtual const TopTools_ListOfShape& Generated (const TopoDS_Shape& S) Standard_OVERRIDE; diff --git a/src/BRepOffsetAPI/BRepOffsetAPI_MakePipe.cxx b/src/BRepOffsetAPI/BRepOffsetAPI_MakePipe.cxx index a4131ea8ca..3d3f80fe6e 100644 --- a/src/BRepOffsetAPI/BRepOffsetAPI_MakePipe.cxx +++ b/src/BRepOffsetAPI/BRepOffsetAPI_MakePipe.cxx @@ -77,7 +77,7 @@ const BRepFill_Pipe& BRepOffsetAPI_MakePipe::Pipe() const //purpose : //======================================================================= -void BRepOffsetAPI_MakePipe::Build() +void BRepOffsetAPI_MakePipe::Build(const Message_ProgressRange& /*theRange*/) { myShape = myPipe.Shape(); //Check for emptiness of result diff --git a/src/BRepOffsetAPI/BRepOffsetAPI_MakePipe.hxx b/src/BRepOffsetAPI/BRepOffsetAPI_MakePipe.hxx index fc49ce31eb..7e2f30f8ec 100644 --- a/src/BRepOffsetAPI/BRepOffsetAPI_MakePipe.hxx +++ b/src/BRepOffsetAPI/BRepOffsetAPI_MakePipe.hxx @@ -71,7 +71,7 @@ public: Standard_EXPORT const BRepFill_Pipe& Pipe() const; //! Builds the resulting shape (redefined from MakeShape). - Standard_EXPORT virtual void Build() Standard_OVERRIDE; + Standard_EXPORT virtual void Build(const Message_ProgressRange& theRange = Message_ProgressRange()) Standard_OVERRIDE; //! Returns the TopoDS Shape of the bottom of the prism. Standard_EXPORT TopoDS_Shape FirstShape() Standard_OVERRIDE; diff --git a/src/BRepOffsetAPI/BRepOffsetAPI_MakePipeShell.cxx b/src/BRepOffsetAPI/BRepOffsetAPI_MakePipeShell.cxx index ef0343c4a0..b222a52b04 100644 --- a/src/BRepOffsetAPI/BRepOffsetAPI_MakePipeShell.cxx +++ b/src/BRepOffsetAPI/BRepOffsetAPI_MakePipeShell.cxx @@ -253,7 +253,7 @@ void BRepOffsetAPI_MakePipeShell::SetMaxSegments(const Standard_Integer NewMaxSe //function :Build() //purpose : //======================================================================= - void BRepOffsetAPI_MakePipeShell::Build() + void BRepOffsetAPI_MakePipeShell::Build(const Message_ProgressRange& /*theRange*/) { Standard_Boolean Ok; Ok = myPipe->Build(); diff --git a/src/BRepOffsetAPI/BRepOffsetAPI_MakePipeShell.hxx b/src/BRepOffsetAPI/BRepOffsetAPI_MakePipeShell.hxx index a10a9d4f31..401df7340d 100644 --- a/src/BRepOffsetAPI/BRepOffsetAPI_MakePipeShell.hxx +++ b/src/BRepOffsetAPI/BRepOffsetAPI_MakePipeShell.hxx @@ -241,7 +241,7 @@ public: Standard_EXPORT void Simulate (const Standard_Integer NumberOfSection, TopTools_ListOfShape& Result); //! Builds the resulting shape (redefined from MakeShape). - Standard_EXPORT virtual void Build() Standard_OVERRIDE; + Standard_EXPORT virtual void Build(const Message_ProgressRange& theRange = Message_ProgressRange()) Standard_OVERRIDE; //! Transforms the sweeping Shell in Solid. //! If a propfile is not closed returns False diff --git a/src/BRepOffsetAPI/BRepOffsetAPI_MakeThickSolid.cxx b/src/BRepOffsetAPI/BRepOffsetAPI_MakeThickSolid.cxx index 4376c6cd0a..5024a3dfad 100644 --- a/src/BRepOffsetAPI/BRepOffsetAPI_MakeThickSolid.cxx +++ b/src/BRepOffsetAPI/BRepOffsetAPI_MakeThickSolid.cxx @@ -89,7 +89,7 @@ void BRepOffsetAPI_MakeThickSolid::MakeThickSolidBySimple(const TopoDS_Shape& th //function : Build //purpose : //======================================================================= -void BRepOffsetAPI_MakeThickSolid::Build() +void BRepOffsetAPI_MakeThickSolid::Build(const Message_ProgressRange& /*theRange*/) { } diff --git a/src/BRepOffsetAPI/BRepOffsetAPI_MakeThickSolid.hxx b/src/BRepOffsetAPI/BRepOffsetAPI_MakeThickSolid.hxx index 4dc6589c3d..b15eb150f5 100644 --- a/src/BRepOffsetAPI/BRepOffsetAPI_MakeThickSolid.hxx +++ b/src/BRepOffsetAPI/BRepOffsetAPI_MakeThickSolid.hxx @@ -113,7 +113,7 @@ public: const Standard_Boolean RemoveIntEdges = Standard_False); // Does nothing. - Standard_EXPORT virtual void Build() Standard_OVERRIDE; + Standard_EXPORT virtual void Build(const Message_ProgressRange& theRange = Message_ProgressRange()) Standard_OVERRIDE; //! Returns the list of shapes modified from the shape //! . diff --git a/src/BRepOffsetAPI/BRepOffsetAPI_MiddlePath.cxx b/src/BRepOffsetAPI/BRepOffsetAPI_MiddlePath.cxx index 305c6ffdcf..67bce0849c 100644 --- a/src/BRepOffsetAPI/BRepOffsetAPI_MiddlePath.cxx +++ b/src/BRepOffsetAPI/BRepOffsetAPI_MiddlePath.cxx @@ -332,7 +332,7 @@ BRepOffsetAPI_MiddlePath::BRepOffsetAPI_MiddlePath(const TopoDS_Shape& aShape, //purpose : //======================================================================= -void BRepOffsetAPI_MiddlePath::Build() +void BRepOffsetAPI_MiddlePath::Build(const Message_ProgressRange& /*theRange*/) { TopTools_ListIteratorOfListOfShape itl; diff --git a/src/BRepOffsetAPI/BRepOffsetAPI_MiddlePath.hxx b/src/BRepOffsetAPI/BRepOffsetAPI_MiddlePath.hxx index a68cb68368..68e533ca43 100644 --- a/src/BRepOffsetAPI/BRepOffsetAPI_MiddlePath.hxx +++ b/src/BRepOffsetAPI/BRepOffsetAPI_MiddlePath.hxx @@ -43,7 +43,7 @@ public: //! a wire or a face Standard_EXPORT BRepOffsetAPI_MiddlePath(const TopoDS_Shape& aShape, const TopoDS_Shape& StartShape, const TopoDS_Shape& EndShape); - Standard_EXPORT virtual void Build() Standard_OVERRIDE; + Standard_EXPORT virtual void Build(const Message_ProgressRange& theRange = Message_ProgressRange()) Standard_OVERRIDE; diff --git a/src/BRepOffsetAPI/BRepOffsetAPI_NormalProjection.cxx b/src/BRepOffsetAPI/BRepOffsetAPI_NormalProjection.cxx index 08361b7a84..6d0be92578 100644 --- a/src/BRepOffsetAPI/BRepOffsetAPI_NormalProjection.cxx +++ b/src/BRepOffsetAPI/BRepOffsetAPI_NormalProjection.cxx @@ -61,7 +61,7 @@ BRepOffsetAPI_NormalProjection::BRepOffsetAPI_NormalProjection() myNormalProjector.Compute3d(With3d); } - void BRepOffsetAPI_NormalProjection::Build() + void BRepOffsetAPI_NormalProjection::Build(const Message_ProgressRange& /*theRange*/) { myNormalProjector.Build(); myShape = myNormalProjector.Projection(); diff --git a/src/BRepOffsetAPI/BRepOffsetAPI_NormalProjection.hxx b/src/BRepOffsetAPI/BRepOffsetAPI_NormalProjection.hxx index 2156812b9c..4b569019e0 100644 --- a/src/BRepOffsetAPI/BRepOffsetAPI_NormalProjection.hxx +++ b/src/BRepOffsetAPI/BRepOffsetAPI_NormalProjection.hxx @@ -91,7 +91,7 @@ public: //! Builds the result of the projection as a compound of //! wires. Tries to build oriented wires. - Standard_EXPORT virtual void Build() Standard_OVERRIDE; + Standard_EXPORT virtual void Build(const Message_ProgressRange& theRange = Message_ProgressRange()) Standard_OVERRIDE; //! Returns true if the object was correctly built by the shape //! construction algorithm. diff --git a/src/BRepOffsetAPI/BRepOffsetAPI_ThruSections.cxx b/src/BRepOffsetAPI/BRepOffsetAPI_ThruSections.cxx index dd7eeee2e9..745eba1f38 100644 --- a/src/BRepOffsetAPI/BRepOffsetAPI_ThruSections.cxx +++ b/src/BRepOffsetAPI/BRepOffsetAPI_ThruSections.cxx @@ -339,7 +339,7 @@ void BRepOffsetAPI_ThruSections::CheckCompatibility(const Standard_Boolean check //purpose : //======================================================================= -void BRepOffsetAPI_ThruSections::Build() +void BRepOffsetAPI_ThruSections::Build(const Message_ProgressRange& /*theRange*/) { //Check set of section for right configuration of punctual sections Standard_Integer i; diff --git a/src/BRepOffsetAPI/BRepOffsetAPI_ThruSections.hxx b/src/BRepOffsetAPI/BRepOffsetAPI_ThruSections.hxx index 79c88394d4..705939443b 100644 --- a/src/BRepOffsetAPI/BRepOffsetAPI_ThruSections.hxx +++ b/src/BRepOffsetAPI/BRepOffsetAPI_ThruSections.hxx @@ -130,7 +130,7 @@ public: //! the optimization. Standard_EXPORT void CriteriumWeight (Standard_Real& W1, Standard_Real& W2, Standard_Real& W3) const; - Standard_EXPORT virtual void Build() Standard_OVERRIDE; + Standard_EXPORT virtual void Build(const Message_ProgressRange& theRange = Message_ProgressRange()) Standard_OVERRIDE; //! Returns the TopoDS Shape of the bottom of the loft if solid Standard_EXPORT const TopoDS_Shape& FirstShape() const; diff --git a/src/BRepPreviewAPI/BRepPreviewAPI_MakeBox.cxx b/src/BRepPreviewAPI/BRepPreviewAPI_MakeBox.cxx index 5a75797ed1..6cd21578fb 100644 --- a/src/BRepPreviewAPI/BRepPreviewAPI_MakeBox.cxx +++ b/src/BRepPreviewAPI/BRepPreviewAPI_MakeBox.cxx @@ -27,7 +27,7 @@ //function : Build //purpose : //======================================================================= -void BRepPreviewAPI_MakeBox::Build() +void BRepPreviewAPI_MakeBox::Build(const Message_ProgressRange& /*theRange*/) { gp_Pnt anLocation = myWedge.Axes().Location(); diff --git a/src/BRepPreviewAPI/BRepPreviewAPI_MakeBox.hxx b/src/BRepPreviewAPI/BRepPreviewAPI_MakeBox.hxx index 3cee338dc1..17c478676c 100644 --- a/src/BRepPreviewAPI/BRepPreviewAPI_MakeBox.hxx +++ b/src/BRepPreviewAPI/BRepPreviewAPI_MakeBox.hxx @@ -34,7 +34,7 @@ public: BRepPreviewAPI_MakeBox() {} //! Creates a preview depending on point values. - Standard_EXPORT virtual void Build() Standard_OVERRIDE; + Standard_EXPORT virtual void Build(const Message_ProgressRange& theRange = Message_ProgressRange()) Standard_OVERRIDE; private: diff --git a/src/BRepPrimAPI/BRepPrimAPI_MakeBox.cxx b/src/BRepPrimAPI/BRepPrimAPI_MakeBox.cxx index 8cf9916704..52cda67cc8 100644 --- a/src/BRepPrimAPI/BRepPrimAPI_MakeBox.cxx +++ b/src/BRepPrimAPI/BRepPrimAPI_MakeBox.cxx @@ -181,7 +181,7 @@ const TopoDS_Shell& BRepPrimAPI_MakeBox::Shell() //purpose : //======================================================================= -void BRepPrimAPI_MakeBox::Build() +void BRepPrimAPI_MakeBox::Build(const Message_ProgressRange& /*theRange*/) { Solid(); } diff --git a/src/BRepPrimAPI/BRepPrimAPI_MakeBox.hxx b/src/BRepPrimAPI/BRepPrimAPI_MakeBox.hxx index dd58918ab4..26c2680cd7 100644 --- a/src/BRepPrimAPI/BRepPrimAPI_MakeBox.hxx +++ b/src/BRepPrimAPI/BRepPrimAPI_MakeBox.hxx @@ -98,7 +98,7 @@ public: Standard_EXPORT BRepPrim_Wedge& Wedge(); //! Stores the solid in myShape. - Standard_EXPORT virtual void Build() Standard_OVERRIDE; + Standard_EXPORT virtual void Build(const Message_ProgressRange& theRange = Message_ProgressRange()) Standard_OVERRIDE; //! Returns the constructed box as a shell. Standard_EXPORT const TopoDS_Shell& Shell(); diff --git a/src/BRepPrimAPI/BRepPrimAPI_MakeOneAxis.cxx b/src/BRepPrimAPI/BRepPrimAPI_MakeOneAxis.cxx index 218a0b9e51..dc9d9fefe4 100644 --- a/src/BRepPrimAPI/BRepPrimAPI_MakeOneAxis.cxx +++ b/src/BRepPrimAPI/BRepPrimAPI_MakeOneAxis.cxx @@ -51,7 +51,7 @@ const TopoDS_Shell& BRepPrimAPI_MakeOneAxis::Shell() //purpose : //======================================================================= -void BRepPrimAPI_MakeOneAxis::Build() +void BRepPrimAPI_MakeOneAxis::Build(const Message_ProgressRange& /*theRange*/) { BRep_Builder B; B.MakeSolid(TopoDS::Solid(myShape)); diff --git a/src/BRepPrimAPI/BRepPrimAPI_MakeOneAxis.hxx b/src/BRepPrimAPI/BRepPrimAPI_MakeOneAxis.hxx index 0bf2bd6c27..647300dde4 100644 --- a/src/BRepPrimAPI/BRepPrimAPI_MakeOneAxis.hxx +++ b/src/BRepPrimAPI/BRepPrimAPI_MakeOneAxis.hxx @@ -43,7 +43,7 @@ public: Standard_EXPORT virtual Standard_Address OneAxis() = 0; //! Stores the solid in myShape. - Standard_EXPORT virtual void Build() Standard_OVERRIDE; + Standard_EXPORT virtual void Build(const Message_ProgressRange& theRange = Message_ProgressRange()) Standard_OVERRIDE; //! Returns the lateral face of the rotational primitive. Standard_EXPORT const TopoDS_Face& Face(); diff --git a/src/BRepPrimAPI/BRepPrimAPI_MakePrism.cxx b/src/BRepPrimAPI/BRepPrimAPI_MakePrism.cxx index 18d9803257..40809742c2 100644 --- a/src/BRepPrimAPI/BRepPrimAPI_MakePrism.cxx +++ b/src/BRepPrimAPI/BRepPrimAPI_MakePrism.cxx @@ -78,7 +78,7 @@ const BRepSweep_Prism& BRepPrimAPI_MakePrism::Prism()const //purpose : //======================================================================= -void BRepPrimAPI_MakePrism::Build() +void BRepPrimAPI_MakePrism::Build(const Message_ProgressRange& /*theRange*/) { myShape = myPrism.Shape(); Done(); diff --git a/src/BRepPrimAPI/BRepPrimAPI_MakePrism.hxx b/src/BRepPrimAPI/BRepPrimAPI_MakePrism.hxx index c33de96aac..d069851b3f 100644 --- a/src/BRepPrimAPI/BRepPrimAPI_MakePrism.hxx +++ b/src/BRepPrimAPI/BRepPrimAPI_MakePrism.hxx @@ -72,7 +72,7 @@ public: Standard_EXPORT const BRepSweep_Prism& Prism() const; //! Builds the resulting shape (redefined from MakeShape). - Standard_EXPORT virtual void Build() Standard_OVERRIDE; + Standard_EXPORT virtual void Build(const Message_ProgressRange& theRange = Message_ProgressRange()) Standard_OVERRIDE; //! Returns the TopoDS Shape of the bottom of the prism. Standard_EXPORT TopoDS_Shape FirstShape() Standard_OVERRIDE; diff --git a/src/BRepPrimAPI/BRepPrimAPI_MakeRevol.cxx b/src/BRepPrimAPI/BRepPrimAPI_MakeRevol.cxx index ec5a69a96e..b8e61e9b06 100644 --- a/src/BRepPrimAPI/BRepPrimAPI_MakeRevol.cxx +++ b/src/BRepPrimAPI/BRepPrimAPI_MakeRevol.cxx @@ -109,7 +109,7 @@ const BRepSweep_Revol& BRepPrimAPI_MakeRevol::Revol() const //purpose : //======================================================================= -void BRepPrimAPI_MakeRevol::Build() +void BRepPrimAPI_MakeRevol::Build(const Message_ProgressRange& /*theRange*/) { if (myIsBuild) { diff --git a/src/BRepPrimAPI/BRepPrimAPI_MakeRevol.hxx b/src/BRepPrimAPI/BRepPrimAPI_MakeRevol.hxx index a24adbad2b..1132df39ca 100644 --- a/src/BRepPrimAPI/BRepPrimAPI_MakeRevol.hxx +++ b/src/BRepPrimAPI/BRepPrimAPI_MakeRevol.hxx @@ -81,7 +81,7 @@ public: Standard_EXPORT const BRepSweep_Revol& Revol() const; //! Builds the resulting shape (redefined from MakeShape). - Standard_EXPORT virtual void Build() Standard_OVERRIDE; + Standard_EXPORT virtual void Build(const Message_ProgressRange& theRange = Message_ProgressRange()) Standard_OVERRIDE; //! Returns the first shape of the revol (coinciding with //! the generating shape). diff --git a/src/BRepPrimAPI/BRepPrimAPI_MakeWedge.cxx b/src/BRepPrimAPI/BRepPrimAPI_MakeWedge.cxx index 0491f4f9e1..d98e4d25d8 100644 --- a/src/BRepPrimAPI/BRepPrimAPI_MakeWedge.cxx +++ b/src/BRepPrimAPI/BRepPrimAPI_MakeWedge.cxx @@ -119,7 +119,7 @@ const TopoDS_Shell& BRepPrimAPI_MakeWedge::Shell() //purpose : //======================================================================= -void BRepPrimAPI_MakeWedge::Build() +void BRepPrimAPI_MakeWedge::Build(const Message_ProgressRange& /*theRange*/) { BRep_Builder B; B.MakeSolid(TopoDS::Solid(myShape)); diff --git a/src/BRepPrimAPI/BRepPrimAPI_MakeWedge.hxx b/src/BRepPrimAPI/BRepPrimAPI_MakeWedge.hxx index c65b051c65..5ade9348bb 100644 --- a/src/BRepPrimAPI/BRepPrimAPI_MakeWedge.hxx +++ b/src/BRepPrimAPI/BRepPrimAPI_MakeWedge.hxx @@ -60,7 +60,7 @@ public: Standard_EXPORT BRepPrim_Wedge& Wedge(); //! Stores the solid in myShape. - Standard_EXPORT virtual void Build() Standard_OVERRIDE; + Standard_EXPORT virtual void Build(const Message_ProgressRange& theRange = Message_ProgressRange()) Standard_OVERRIDE; //! Returns the constructed box in the form of a shell. Standard_EXPORT const TopoDS_Shell& Shell(); diff --git a/src/BRepTest/BRepTest_FilletCommands.cxx b/src/BRepTest/BRepTest_FilletCommands.cxx index a9af23106d..18d39c1800 100644 --- a/src/BRepTest/BRepTest_FilletCommands.cxx +++ b/src/BRepTest/BRepTest_FilletCommands.cxx @@ -52,6 +52,7 @@ #include #include #include +#include #include @@ -357,23 +358,24 @@ Standard_Integer boptopoblend(Draw_Interpretor& di, Standard_Integer narg, const } BOPAlgo_PaveFiller theDSFiller; + Handle(Draw_ProgressIndicator) aProgress = new Draw_ProgressIndicator(di, 1); + Message_ProgressScope aPS(aProgress->Start(), NULL, 10); TopTools_ListOfShape aLS; aLS.Append(S1); aLS.Append(S2); theDSFiller.SetArguments(aLS); // - theDSFiller.Perform(); + theDSFiller.Perform(aPS.Next(8)); if (theDSFiller.HasErrors()) { Message::SendFail() << "Check types of the arguments, please"; return 1; } BRepAlgoAPI_BooleanOperation* pBuilder=NULL; - if (fuse) - pBuilder = new BRepAlgoAPI_Fuse( S1, S2, theDSFiller ); + pBuilder = new BRepAlgoAPI_Fuse( S1, S2, theDSFiller, aPS.Next(2) ); else - pBuilder = new BRepAlgoAPI_Cut ( S1, S2, theDSFiller ); + pBuilder = new BRepAlgoAPI_Cut ( S1, S2, theDSFiller, Standard_True, aPS.Next(2)); Standard_Boolean anIsDone = pBuilder->IsDone(); if (!anIsDone) diff --git a/src/Draw/Draw_ProgressIndicator.cxx b/src/Draw/Draw_ProgressIndicator.cxx index 6b2f4efaae..a31a1717a5 100644 --- a/src/Draw/Draw_ProgressIndicator.cxx +++ b/src/Draw/Draw_ProgressIndicator.cxx @@ -100,7 +100,7 @@ void Draw_ProgressIndicator::Show (const Message_ProgressScope& theScope, const // unless show is forced, show updated state only if at least 1% progress has been reached since the last update Standard_Real aPosition = GetPosition(); - if ( ! force && aPosition < 1. && Abs (aPosition - myLastPosition) < myUpdateThreshold) + if ( ! force && (1. - aPosition) > Precision::Confusion() && Abs (aPosition - myLastPosition) < myUpdateThreshold) return; // return if update interval has not elapsed myLastPosition = aPosition; diff --git a/src/ShapeConstruct/ShapeConstruct_MakeTriangulation.cxx b/src/ShapeConstruct/ShapeConstruct_MakeTriangulation.cxx index fc4bf61dbd..66fd7791a7 100644 --- a/src/ShapeConstruct/ShapeConstruct_MakeTriangulation.cxx +++ b/src/ShapeConstruct/ShapeConstruct_MakeTriangulation.cxx @@ -142,7 +142,7 @@ ShapeConstruct_MakeTriangulation::ShapeConstruct_MakeTriangulation (const TopoDS //purpose : //======================================================================= - void ShapeConstruct_MakeTriangulation::Build() + void ShapeConstruct_MakeTriangulation::Build(const Message_ProgressRange& /*theRange*/) { if (myShape.IsNull()) { // Triangulate polygonal wire diff --git a/src/ShapeConstruct/ShapeConstruct_MakeTriangulation.hxx b/src/ShapeConstruct/ShapeConstruct_MakeTriangulation.hxx index db04bbc859..10ed234cc7 100644 --- a/src/ShapeConstruct/ShapeConstruct_MakeTriangulation.hxx +++ b/src/ShapeConstruct/ShapeConstruct_MakeTriangulation.hxx @@ -41,7 +41,7 @@ public: Standard_EXPORT ShapeConstruct_MakeTriangulation(const TopoDS_Wire& wire, const Standard_Real prec = 0.0); - Standard_EXPORT virtual void Build() Standard_OVERRIDE; + Standard_EXPORT virtual void Build(const Message_ProgressRange& theRange = Message_ProgressRange()) Standard_OVERRIDE; Standard_EXPORT virtual Standard_Boolean IsDone() const Standard_OVERRIDE; diff --git a/tests/bugs/modalg_7/bug21264 b/tests/bugs/modalg_7/bug21264 new file mode 100644 index 0000000000..30f898b775 --- /dev/null +++ b/tests/bugs/modalg_7/bug21264 @@ -0,0 +1,117 @@ +puts "============================================" +puts "0021264: Modeling Algorithms - Progress indicator for Boolean operations" +puts "============================================" +puts "" + +proc isTracked { theOutput } { + if {![regexp "Progress" $theOutput]} { + puts "Error: progress is not tracked" + } +} + +XProgress +t + +box b1 10 10 10 +box b2 5 5 5 10 10 10 + +# check that progress is tracked for boolean operations + +# bop + operations + +set log [bop b1 b2] +isTracked $log + +set log [bopfuse r] +isTracked $log + +set log [bopcommon r] +isTracked $log + +set log [bopcut r] +isTracked $log + +set log [boptuc r] +isTracked $log + +set log [bopsection r] +isTracked $log + + +# b[operation] + +set log [bfuse r b1 b2] +isTracked $log + +set log [bcommon r b1 b2] +isTracked $log + +set log [bcut r b1 b2] +isTracked $log + +set log [btuc r b1 b2] +isTracked $log + +set log [bsection r b1 b2] +isTracked $log + + +# bfillds + bbop + +bclearobjects +bcleartools +baddobjects b1 +baddtools b2 + +set log [bfillds] +isTracked $log + +set log [bbop r 0] +isTracked $log + +set log [bbop r 1] +isTracked $log + +set log [bbop r 2] +isTracked $log + +set log [bbop r 3] +isTracked $log + +set log [bbop r 4] +isTracked $log + +set log [bbuild r] +isTracked $log + +set log [bsplit r] +isTracked $log + + +# API + +set log [bapibop r 0] +isTracked $log + +set log [bapibop r 1] +isTracked $log + +set log [bapibop r 2] +isTracked $log + +set log [bapibop r 3] +isTracked $log + +set log [bapibop r 4] +isTracked $log + +set log [bapibuild r] +isTracked $log + +set log [bapisplit r] +isTracked $log + + +# bopcheck + +set log [bopcheck r] +isTracked $log From 82bee1621aaeb5412ae75fa6a6ccbcddc8151cc7 Mon Sep 17 00:00:00 2001 From: asuraven Date: Wed, 18 Aug 2021 15:05:58 +0300 Subject: [PATCH 035/639] 0031942: Modeling Algorithms - add possibility to abort the BRepExtrema_DistShapeShape algorithm - Now available to interrupt the DRAW 'distmini' command by Ctrl/C - Message_ProgressRange/Message_ProgressScope used in BRepExtrema_DistShapeShape::Perform() to provide user break --- .../BRepExtrema_DistShapeShape.cxx | 176 ++++++++++++------ .../BRepExtrema_DistShapeShape.hxx | 29 ++- src/BRepTest/BRepTest_ExtremaCommands.cxx | 5 +- 3 files changed, 146 insertions(+), 64 deletions(-) diff --git a/src/BRepExtrema/BRepExtrema_DistShapeShape.cxx b/src/BRepExtrema/BRepExtrema_DistShapeShape.cxx index 13efe953dc..be1354366d 100644 --- a/src/BRepExtrema/BRepExtrema_DistShapeShape.cxx +++ b/src/BRepExtrema/BRepExtrema_DistShapeShape.cxx @@ -109,16 +109,27 @@ namespace //purpose : //======================================================================= -void BRepExtrema_DistShapeShape::DistanceMapMap (const TopTools_IndexedMapOfShape& theMap1, - const TopTools_IndexedMapOfShape& theMap2, - const Bnd_SeqOfBox& theLBox1, - const Bnd_SeqOfBox& theLBox2) +Standard_Boolean BRepExtrema_DistShapeShape::DistanceMapMap (const TopTools_IndexedMapOfShape& theMap1, + const TopTools_IndexedMapOfShape& theMap2, + const Bnd_SeqOfBox& theLBox1, + const Bnd_SeqOfBox& theLBox2, + const Message_ProgressRange& theRange) { NCollection_Vector aPairList; const Standard_Integer aCount1 = theMap1.Extent(); const Standard_Integer aCount2 = theMap2.Extent(); + + Message_ProgressScope aTwinScope(theRange, NULL, 1.0); + Message_ProgressRange aBoxRange(aTwinScope.Next(0.3)); + Message_ProgressScope aBoxScope(aBoxRange, NULL, aCount1); + for (Standard_Integer anIdx1 = 1; anIdx1 <= aCount1; ++anIdx1) { + aBoxScope.Next(); + if (!aBoxScope.More()) + { + return Standard_False; + } for (Standard_Integer anIdx2 = 1; anIdx2 <= aCount2; ++anIdx2) { const Bnd_Box& aBox1 = theLBox1.Value (anIdx1); @@ -138,10 +149,16 @@ void BRepExtrema_DistShapeShape::DistanceMapMap (const TopTools_IndexedMapOfShap } std::stable_sort(aPairList.begin(), aPairList.end(), BRepExtrema_CheckPair_Comparator); - + Message_ProgressRange aDistRange(aTwinScope.Next(0.7)); + Message_ProgressScope aDistScope(aDistRange, NULL, aPairList.Size()); for (NCollection_Vector::Iterator aPairIter (aPairList); aPairIter.More(); aPairIter.Next()) { + aDistScope.Next(); + if (!aDistScope.More()) + { + return Standard_False; + } const BRepExtrema_CheckPair& aPair = aPairIter.Value(); if (aPair.Distance > myDistRef + myEps) { @@ -185,6 +202,7 @@ void BRepExtrema_DistShapeShape::DistanceMapMap (const TopTools_IndexedMapOfShap } } } + return Standard_True; } //======================================================================= @@ -212,7 +230,8 @@ BRepExtrema_DistShapeShape::BRepExtrema_DistShapeShape() BRepExtrema_DistShapeShape::BRepExtrema_DistShapeShape(const TopoDS_Shape& Shape1, const TopoDS_Shape& Shape2, const Extrema_ExtFlag F, - const Extrema_ExtAlgo A) + const Extrema_ExtAlgo A, + const Message_ProgressRange& theRange) : myDistRef (0.0), myIsDone (Standard_False), myInnerSol (Standard_False), @@ -224,7 +243,7 @@ BRepExtrema_DistShapeShape::BRepExtrema_DistShapeShape(const TopoDS_Shape& Shape { LoadS1(Shape1); LoadS2(Shape2); - Perform(); + Perform(theRange); } //======================================================================= @@ -236,7 +255,8 @@ BRepExtrema_DistShapeShape::BRepExtrema_DistShapeShape(const TopoDS_Shape& Shape const TopoDS_Shape& Shape2, const Standard_Real theDeflection, const Extrema_ExtFlag F, - const Extrema_ExtAlgo A) + const Extrema_ExtAlgo A, + const Message_ProgressRange& theRange) : myDistRef (0.0), myIsDone (Standard_False), myInnerSol (Standard_False), @@ -248,7 +268,7 @@ BRepExtrema_DistShapeShape::BRepExtrema_DistShapeShape(const TopoDS_Shape& Shape { LoadS1(Shape1); LoadS2(Shape2); - Perform(); + Perform(theRange); } //======================================================================= @@ -275,12 +295,47 @@ void BRepExtrema_DistShapeShape::LoadS2 (const TopoDS_Shape& Shape2) Decomposition (Shape2, myMapV2, myMapE2, myMapF2); } +//======================================================================= +//function : SolidTreatment +//purpose : +//======================================================================= +Standard_Boolean BRepExtrema_DistShapeShape::SolidTreatment(const TopoDS_Shape& theShape, + const TopTools_IndexedMapOfShape& theMap, + const Message_ProgressRange& theRange) +{ + BRepClass3d_SolidClassifier aClassifier(theShape); + const Standard_Real aTolerance = 0.001; + Message_ProgressScope aScope(theRange, NULL, theMap.Extent()); + for (Standard_Integer i = 1; i < theMap.Extent(); ++i) + { + aScope.Next(); + if (!aScope.More()) + { + return Standard_False; + } + const TopoDS_Vertex& aVertex = TopoDS::Vertex(theMap(i)); + const gp_Pnt& aPnt = BRep_Tool::Pnt(aVertex); + aClassifier.Perform(aPnt, aTolerance); + if (aClassifier.State() == TopAbs_IN) + { + myInnerSol = Standard_True; + myDistRef = 0.; + myIsDone = Standard_True; + BRepExtrema_SolutionElem Sol(0, aPnt, BRepExtrema_IsVertex, aVertex); + mySolutionsShape1.Append(Sol); + mySolutionsShape2.Append(Sol); + break; + } + } + return Standard_True; +} + //======================================================================= //function : Perform //purpose : //======================================================================= -Standard_Boolean BRepExtrema_DistShapeShape::Perform() +Standard_Boolean BRepExtrema_DistShapeShape::Perform(const Message_ProgressRange& theRange) { myIsDone=Standard_False; myInnerSol=Standard_False; @@ -290,54 +345,29 @@ Standard_Boolean BRepExtrema_DistShapeShape::Perform() if ( myShape1.IsNull() || myShape2.IsNull() ) return Standard_False; - TopoDS_Vertex V; - const Standard_Real tol = 0.001; - // Treatment of solids - const TopAbs_ShapeEnum Type1 = myShape1.ShapeType(); - if ((Type1==TopAbs_SOLID) || (Type1 == TopAbs_COMPSOLID)) + Standard_Boolean anIsSolid1 = (myShape1.ShapeType() == TopAbs_SOLID) || + (myShape1.ShapeType() == TopAbs_COMPSOLID); + Standard_Boolean anIsSolid2 = (myShape2.ShapeType() == TopAbs_SOLID) || + (myShape2.ShapeType() == TopAbs_COMPSOLID); + Standard_Integer aRootStepsNum = 9; // By num of DistanceMapMap calls + aRootStepsNum = anIsSolid1 ? aRootStepsNum+1 : aRootStepsNum; + aRootStepsNum = anIsSolid2 ? aRootStepsNum+1 : aRootStepsNum; + Message_ProgressScope aRootScope(theRange, "calculating distance", aRootStepsNum); + + if (anIsSolid1) { - BRepClass3d_SolidClassifier Classi(myShape1); - const Standard_Integer nbv2 = myMapV2.Extent(); - Standard_Integer nbv1 = 0; - while ( (nbv1 myEps) { - DistanceMapMap (myMapF1, myMapF2, myBF1, myBF2); + if(!DistanceMapMap (myMapF1, myMapF2, myBF1, myBF2, aRootScope.Next())) + { + return Standard_False; + } } // Modified by Sergey KHROMOV - Tue Mar 6 11:55:03 2001 Begin @@ -403,6 +460,7 @@ Standard_Boolean BRepExtrema_DistShapeShape::Perform() // Modified by Sergey KHROMOV - Tue Mar 6 11:55:04 2001 End myIsDone = ( mySolutionsShape1.Length() > 0 ); } + return myIsDone; } diff --git a/src/BRepExtrema/BRepExtrema_DistShapeShape.hxx b/src/BRepExtrema/BRepExtrema_DistShapeShape.hxx index 3812de0f4d..797a4e94a7 100644 --- a/src/BRepExtrema/BRepExtrema_DistShapeShape.hxx +++ b/src/BRepExtrema/BRepExtrema_DistShapeShape.hxx @@ -21,6 +21,7 @@ #include #include #include +#include #include #include #include @@ -39,9 +40,18 @@ class BRepExtrema_DistShapeShape Standard_EXPORT BRepExtrema_DistShapeShape(); //! computation of the minimum distance (value and pair of points) using default deflection
//! Default value is Precision::Confusion().
- Standard_EXPORT BRepExtrema_DistShapeShape(const TopoDS_Shape& Shape1,const TopoDS_Shape& Shape2,const Extrema_ExtFlag F = Extrema_ExtFlag_MINMAX,const Extrema_ExtAlgo A = Extrema_ExtAlgo_Grad); + Standard_EXPORT BRepExtrema_DistShapeShape(const TopoDS_Shape& Shape1, + const TopoDS_Shape& Shape2, + const Extrema_ExtFlag F = Extrema_ExtFlag_MINMAX, + const Extrema_ExtAlgo A = Extrema_ExtAlgo_Grad, + const Message_ProgressRange& theRange = Message_ProgressRange()); //! create tool and load both shapes into it
- Standard_EXPORT BRepExtrema_DistShapeShape(const TopoDS_Shape& Shape1,const TopoDS_Shape& Shape2,const Standard_Real theDeflection,const Extrema_ExtFlag F = Extrema_ExtFlag_MINMAX,const Extrema_ExtAlgo A = Extrema_ExtAlgo_Grad); + Standard_EXPORT BRepExtrema_DistShapeShape(const TopoDS_Shape& Shape1, + const TopoDS_Shape& Shape2, + const Standard_Real theDeflection, + const Extrema_ExtFlag F = Extrema_ExtFlag_MINMAX, + const Extrema_ExtAlgo A = Extrema_ExtAlgo_Grad, + const Message_ProgressRange& theRange = Message_ProgressRange()); void SetDeflection(const Standard_Real theDeflection) { @@ -56,7 +66,8 @@ class BRepExtrema_DistShapeShape //! to specify a maximum deviation of extreme distances
//! from the minimum one.
//! Returns IsDone status.
- Standard_EXPORT Standard_Boolean Perform(); + //! theProgress - progress indicator of algorithm + Standard_EXPORT Standard_Boolean Perform(const Message_ProgressRange& theRange = Message_ProgressRange()); //! True if the minimum distance is found.
Standard_Boolean IsDone() const { @@ -137,7 +148,17 @@ class BRepExtrema_DistShapeShape private: //! computes the minimum distance between two maps of shapes (Face,Edge,Vertex)
- Standard_EXPORT void DistanceMapMap(const TopTools_IndexedMapOfShape& Map1,const TopTools_IndexedMapOfShape& Map2,const Bnd_SeqOfBox& LBox1,const Bnd_SeqOfBox& LBox2); + Standard_Boolean DistanceMapMap(const TopTools_IndexedMapOfShape& Map1, + const TopTools_IndexedMapOfShape& Map2, + const Bnd_SeqOfBox& LBox1, + const Bnd_SeqOfBox& LBox2, + const Message_ProgressRange& theRange); + + Standard_Boolean SolidTreatment(const TopoDS_Shape& theShape, + const TopTools_IndexedMapOfShape& theMap, + const Message_ProgressRange& theRange); + +private: Standard_Real myDistRef; Standard_Boolean myIsDone; diff --git a/src/BRepTest/BRepTest_ExtremaCommands.cxx b/src/BRepTest/BRepTest_ExtremaCommands.cxx index 0ca2fa983b..0fa44321d1 100644 --- a/src/BRepTest/BRepTest_ExtremaCommands.cxx +++ b/src/BRepTest/BRepTest_ExtremaCommands.cxx @@ -23,6 +23,7 @@ #include #include #include +#include #include #include #include @@ -73,7 +74,9 @@ static Standard_Integer distmini(Draw_Interpretor& di, Standard_Integer n, const if (n == 5) aDeflection = Draw::Atof(a[4]); - BRepExtrema_DistShapeShape dst(S1 ,S2, aDeflection); + Handle(Draw_ProgressIndicator) aProgress = new Draw_ProgressIndicator(di, 1); + BRepExtrema_DistShapeShape dst(S1 ,S2, aDeflection, Extrema_ExtFlag_MINMAX, + Extrema_ExtAlgo_Grad, aProgress->Start()); if (dst.IsDone()) { From 872a7e3a7ef0efbe60b12916a0e8c6beaac6d8c3 Mon Sep 17 00:00:00 2001 From: asuraven Date: Tue, 20 Jul 2021 18:44:23 +0300 Subject: [PATCH 036/639] 0032485: Modeling Algorithms - Add Clone() function for adapters Provide ShallowCopy() functions for adapters & evaluators of curves, 2d curves and surfaces. This will allow using copies of the same adapter in multi-thread calculations. --- src/Adaptor2d/Adaptor2d_Curve2d.cxx | 10 ++++++ src/Adaptor2d/Adaptor2d_Curve2d.hxx | 3 ++ src/Adaptor2d/Adaptor2d_Line2d.cxx | 16 +++++++++ src/Adaptor2d/Adaptor2d_Line2d.hxx | 5 ++- src/Adaptor2d/Adaptor2d_OffsetCurve.cxx | 19 ++++++++++ src/Adaptor2d/Adaptor2d_OffsetCurve.hxx | 3 ++ src/Adaptor3d/Adaptor3d_Curve.cxx | 10 ++++++ src/Adaptor3d/Adaptor3d_Curve.hxx | 3 ++ src/Adaptor3d/Adaptor3d_CurveOnSurface.cxx | 34 ++++++++++++++++++ src/Adaptor3d/Adaptor3d_CurveOnSurface.hxx | 3 ++ src/Adaptor3d/Adaptor3d_IsoCurve.cxx | 21 +++++++++++ src/Adaptor3d/Adaptor3d_IsoCurve.hxx | 3 ++ src/Adaptor3d/Adaptor3d_Surface.cxx | 9 +++++ src/Adaptor3d/Adaptor3d_Surface.hxx | 3 ++ src/BRepAdaptor/BRepAdaptor_CompCurve.cxx | 28 +++++++++++++++ src/BRepAdaptor/BRepAdaptor_CompCurve.hxx | 3 ++ src/BRepAdaptor/BRepAdaptor_Curve.cxx | 24 +++++++++++++ src/BRepAdaptor/BRepAdaptor_Curve.hxx | 3 ++ src/BRepAdaptor/BRepAdaptor_Curve2d.cxx | 21 +++++++++++ src/BRepAdaptor/BRepAdaptor_Curve2d.hxx | 3 ++ src/BRepAdaptor/BRepAdaptor_Surface.cxx | 18 ++++++++++ src/BRepAdaptor/BRepAdaptor_Surface.hxx | 3 ++ src/BiTgte/BiTgte_CurveOnEdge.cxx | 17 +++++++++ src/BiTgte/BiTgte_CurveOnEdge.hxx | 3 ++ src/ChFiDS/ChFiDS_ElSpine.cxx | 32 +++++++++++++++-- src/ChFiDS/ChFiDS_ElSpine.hxx | 3 ++ src/Geom2dAdaptor/Geom2dAdaptor_Curve.cxx | 22 ++++++++++++ src/Geom2dAdaptor/Geom2dAdaptor_Curve.hxx | 5 ++- src/Geom2dEvaluator/Geom2dEvaluator_Curve.hxx | 2 ++ .../Geom2dEvaluator_OffsetCurve.cxx | 16 +++++++++ .../Geom2dEvaluator_OffsetCurve.hxx | 2 ++ src/GeomAdaptor/GeomAdaptor_Curve.cxx | 22 ++++++++++++ src/GeomAdaptor/GeomAdaptor_Curve.hxx | 3 ++ src/GeomAdaptor/GeomAdaptor_Surface.cxx | 27 ++++++++++++++ src/GeomAdaptor/GeomAdaptor_Surface.hxx | 6 ++-- .../GeomAdaptor_SurfaceOfLinearExtrusion.cxx | 33 +++++++++++++++++ .../GeomAdaptor_SurfaceOfLinearExtrusion.hxx | 3 ++ .../GeomAdaptor_SurfaceOfRevolution.cxx | 35 +++++++++++++++++++ .../GeomAdaptor_SurfaceOfRevolution.hxx | 3 ++ src/GeomEvaluator/GeomEvaluator_Curve.hxx | 2 ++ .../GeomEvaluator_OffsetCurve.cxx | 15 ++++++++ .../GeomEvaluator_OffsetCurve.hxx | 2 ++ .../GeomEvaluator_OffsetSurface.cxx | 16 +++++++++ .../GeomEvaluator_OffsetSurface.hxx | 2 ++ src/GeomEvaluator/GeomEvaluator_Surface.hxx | 2 ++ .../GeomEvaluator_SurfaceOfExtrusion.cxx | 15 ++++++++ .../GeomEvaluator_SurfaceOfExtrusion.hxx | 2 ++ .../GeomEvaluator_SurfaceOfRevolution.cxx | 17 +++++++++ .../GeomEvaluator_SurfaceOfRevolution.hxx | 2 ++ src/GeomFill/GeomFill_SnglrFunc.cxx | 12 +++++++ src/GeomFill/GeomFill_SnglrFunc.hxx | 3 ++ src/ProjLib/ProjLib_CompProjectedCurve.cxx | 35 ++++++++++++++++++- src/ProjLib/ProjLib_CompProjectedCurve.hxx | 3 ++ src/ProjLib/ProjLib_ProjectOnPlane.cxx | 29 +++++++++++++++ src/ProjLib/ProjLib_ProjectOnPlane.hxx | 3 ++ src/ProjLib/ProjLib_ProjectedCurve.cxx | 27 ++++++++++++++ src/ProjLib/ProjLib_ProjectedCurve.hxx | 3 ++ 57 files changed, 662 insertions(+), 7 deletions(-) diff --git a/src/Adaptor2d/Adaptor2d_Curve2d.cxx b/src/Adaptor2d/Adaptor2d_Curve2d.cxx index 3df4666d44..5bcd2eb872 100644 --- a/src/Adaptor2d/Adaptor2d_Curve2d.cxx +++ b/src/Adaptor2d/Adaptor2d_Curve2d.cxx @@ -40,6 +40,16 @@ Adaptor2d_Curve2d::~Adaptor2d_Curve2d() { } +//======================================================================= +//function : ShallowCopy() +//purpose : +//======================================================================= + +Handle(Adaptor2d_Curve2d) Adaptor2d_Curve2d::ShallowCopy() const +{ + throw Standard_NotImplemented("Adaptor2d_Curve2d::ShallowCopy"); +} + //======================================================================= //function : FirstParameter //purpose : diff --git a/src/Adaptor2d/Adaptor2d_Curve2d.hxx b/src/Adaptor2d/Adaptor2d_Curve2d.hxx index ae14128738..1da082692c 100644 --- a/src/Adaptor2d/Adaptor2d_Curve2d.hxx +++ b/src/Adaptor2d/Adaptor2d_Curve2d.hxx @@ -54,6 +54,9 @@ class Adaptor2d_Curve2d : public Standard_Transient { DEFINE_STANDARD_RTTIEXT(Adaptor2d_Curve2d, Standard_Transient) public: + + //! Shallow copy of adaptor + Standard_EXPORT virtual Handle(Adaptor2d_Curve2d) ShallowCopy() const; Standard_EXPORT virtual Standard_Real FirstParameter() const; diff --git a/src/Adaptor2d/Adaptor2d_Line2d.cxx b/src/Adaptor2d/Adaptor2d_Line2d.cxx index 7e5cd5deec..16792e654a 100644 --- a/src/Adaptor2d/Adaptor2d_Line2d.cxx +++ b/src/Adaptor2d/Adaptor2d_Line2d.cxx @@ -53,6 +53,22 @@ Adaptor2d_Line2d::Adaptor2d_Line2d() { } +//======================================================================= +//function : ShallowCopy +//purpose : +//======================================================================= + + Handle(Adaptor2d_Curve2d) Adaptor2d_Line2d::ShallowCopy() const + { + Handle(Adaptor2d_Line2d) aCopy = new Adaptor2d_Line2d(); + + aCopy->myUfirst = myUfirst; + aCopy->myUlast = myUlast; + aCopy->myAx2d = myAx2d; + + return aCopy; + } + //======================================================================= //function : Load //purpose : diff --git a/src/Adaptor2d/Adaptor2d_Line2d.hxx b/src/Adaptor2d/Adaptor2d_Line2d.hxx index 3cdb10ef14..db8ee1a6c0 100644 --- a/src/Adaptor2d/Adaptor2d_Line2d.hxx +++ b/src/Adaptor2d/Adaptor2d_Line2d.hxx @@ -53,7 +53,10 @@ public: Standard_EXPORT Adaptor2d_Line2d(); Standard_EXPORT Adaptor2d_Line2d(const gp_Pnt2d& P, const gp_Dir2d& D, const Standard_Real UFirst, const Standard_Real ULast); - + + //! Shallow copy of adaptor + Standard_EXPORT virtual Handle(Adaptor2d_Curve2d) ShallowCopy() const Standard_OVERRIDE; + Standard_EXPORT void Load (const gp_Lin2d& L); Standard_EXPORT void Load (const gp_Lin2d& L, const Standard_Real UFirst, const Standard_Real ULast); diff --git a/src/Adaptor2d/Adaptor2d_OffsetCurve.cxx b/src/Adaptor2d/Adaptor2d_OffsetCurve.cxx index db84f18200..dd1e205e89 100644 --- a/src/Adaptor2d/Adaptor2d_OffsetCurve.cxx +++ b/src/Adaptor2d/Adaptor2d_OffsetCurve.cxx @@ -90,6 +90,25 @@ Adaptor2d_OffsetCurve::Adaptor2d_OffsetCurve( { } +//======================================================================= +//function : ShallowCopy +//purpose : +//======================================================================= + +Handle(Adaptor2d_Curve2d) Adaptor2d_OffsetCurve::ShallowCopy() const +{ + Handle(Adaptor2d_OffsetCurve) aCopy = new Adaptor2d_OffsetCurve(); + + if (!myCurve.IsNull()) + { + aCopy->myCurve = myCurve->ShallowCopy(); + } + aCopy->myOffset = myOffset; + aCopy->myFirst = myFirst; + aCopy->myLast = myLast; + + return aCopy; +} //======================================================================= //function : Load //purpose : diff --git a/src/Adaptor2d/Adaptor2d_OffsetCurve.hxx b/src/Adaptor2d/Adaptor2d_OffsetCurve.hxx index bdfa376dd5..14c5bd838d 100644 --- a/src/Adaptor2d/Adaptor2d_OffsetCurve.hxx +++ b/src/Adaptor2d/Adaptor2d_OffsetCurve.hxx @@ -57,6 +57,9 @@ public: //! WFirst,WLast define the bounds of the Offset curve. Standard_EXPORT Adaptor2d_OffsetCurve(const Handle(Adaptor2d_Curve2d)& C, const Standard_Real Offset, const Standard_Real WFirst, const Standard_Real WLast); + //! Shallow copy of adaptor + Standard_EXPORT virtual Handle(Adaptor2d_Curve2d) ShallowCopy() const Standard_OVERRIDE; + //! Changes the curve. The Offset is reset to 0. Standard_EXPORT void Load (const Handle(Adaptor2d_Curve2d)& S); diff --git a/src/Adaptor3d/Adaptor3d_Curve.cxx b/src/Adaptor3d/Adaptor3d_Curve.cxx index d82c14b1b8..76b13c5557 100644 --- a/src/Adaptor3d/Adaptor3d_Curve.cxx +++ b/src/Adaptor3d/Adaptor3d_Curve.cxx @@ -41,6 +41,16 @@ Adaptor3d_Curve::~Adaptor3d_Curve() { } +//======================================================================= +//function : ShallowCopy +//purpose : +//======================================================================= + +Handle(Adaptor3d_Curve) Adaptor3d_Curve::ShallowCopy() const +{ + throw Standard_NotImplemented("Adaptor3d_Curve::ShallowCopy"); +} + //======================================================================= //function : FirstParameter //purpose : diff --git a/src/Adaptor3d/Adaptor3d_Curve.hxx b/src/Adaptor3d/Adaptor3d_Curve.hxx index 52897871e4..78f062eafc 100644 --- a/src/Adaptor3d/Adaptor3d_Curve.hxx +++ b/src/Adaptor3d/Adaptor3d_Curve.hxx @@ -58,6 +58,9 @@ class Adaptor3d_Curve : public Standard_Transient DEFINE_STANDARD_RTTIEXT(Adaptor3d_Curve, Standard_Transient) public: + //! Shallow copy of adaptor + Standard_EXPORT virtual Handle(Adaptor3d_Curve) ShallowCopy() const; + Standard_EXPORT virtual Standard_Real FirstParameter() const; Standard_EXPORT virtual Standard_Real LastParameter() const; diff --git a/src/Adaptor3d/Adaptor3d_CurveOnSurface.cxx b/src/Adaptor3d/Adaptor3d_CurveOnSurface.cxx index a0dff90f24..8480ace335 100644 --- a/src/Adaptor3d/Adaptor3d_CurveOnSurface.cxx +++ b/src/Adaptor3d/Adaptor3d_CurveOnSurface.cxx @@ -718,6 +718,40 @@ Adaptor3d_CurveOnSurface::Adaptor3d_CurveOnSurface Load(C); } +//======================================================================= +//function : ShallowCopy +//purpose : +//======================================================================= + +Handle(Adaptor3d_Curve) Adaptor3d_CurveOnSurface::ShallowCopy() const +{ + Handle(Adaptor3d_CurveOnSurface) aCopy = new Adaptor3d_CurveOnSurface(); + + if (!mySurface.IsNull()) + { + aCopy->mySurface = mySurface->ShallowCopy(); + } + if (!myCurve.IsNull()) + { + aCopy->myCurve = myCurve->ShallowCopy(); + } + aCopy->myType = myType; + aCopy->myCirc = myCirc; + aCopy->myLin = myLin; + if (!myFirstSurf.IsNull()) + { + aCopy->myFirstSurf = myFirstSurf->ShallowCopy(); + } + if (!myLastSurf.IsNull()) + { + aCopy->myLastSurf = myLastSurf->ShallowCopy(); + } + aCopy->myIntervals = myIntervals; + aCopy->myIntCont = myIntCont; + + return aCopy; +} + //======================================================================= //function : Load //purpose : diff --git a/src/Adaptor3d/Adaptor3d_CurveOnSurface.hxx b/src/Adaptor3d/Adaptor3d_CurveOnSurface.hxx index 96c2309534..554a7edf39 100644 --- a/src/Adaptor3d/Adaptor3d_CurveOnSurface.hxx +++ b/src/Adaptor3d/Adaptor3d_CurveOnSurface.hxx @@ -45,6 +45,9 @@ public: //! the surface . Standard_EXPORT Adaptor3d_CurveOnSurface(const Handle(Adaptor2d_Curve2d)& C, const Handle(Adaptor3d_Surface)& S); + //! Shallow copy of adaptor + Standard_EXPORT virtual Handle(Adaptor3d_Curve) ShallowCopy() const Standard_OVERRIDE; + //! Changes the surface. Standard_EXPORT void Load (const Handle(Adaptor3d_Surface)& S); diff --git a/src/Adaptor3d/Adaptor3d_IsoCurve.cxx b/src/Adaptor3d/Adaptor3d_IsoCurve.cxx index 712d89a8a3..7493df89da 100644 --- a/src/Adaptor3d/Adaptor3d_IsoCurve.cxx +++ b/src/Adaptor3d/Adaptor3d_IsoCurve.cxx @@ -104,6 +104,27 @@ Adaptor3d_IsoCurve::Adaptor3d_IsoCurve(const Handle(Adaptor3d_Surface)& theS, Load(theIso, theParam, theWFirst, theWLast); } +//======================================================================= +//function : ShallowCopy +//purpose : +//======================================================================= + +Handle(Adaptor3d_Curve) Adaptor3d_IsoCurve::ShallowCopy() const +{ + Handle(Adaptor3d_IsoCurve) aCopy = new Adaptor3d_IsoCurve(); + + if (!mySurface.IsNull()) + { + aCopy->mySurface = mySurface->ShallowCopy(); + } + aCopy->myIso = myIso; + aCopy->myFirst = myFirst; + aCopy->myLast = myLast; + aCopy->myParameter = myParameter; + + return aCopy; +} + //======================================================================= //function : Load //purpose : diff --git a/src/Adaptor3d/Adaptor3d_IsoCurve.hxx b/src/Adaptor3d/Adaptor3d_IsoCurve.hxx index b05da9e2c7..9fa24f5a95 100644 --- a/src/Adaptor3d/Adaptor3d_IsoCurve.hxx +++ b/src/Adaptor3d/Adaptor3d_IsoCurve.hxx @@ -49,6 +49,9 @@ public: //! iso. WFirst,WLast define the bounds of the iso. Standard_EXPORT Adaptor3d_IsoCurve(const Handle(Adaptor3d_Surface)& S, const GeomAbs_IsoType Iso, const Standard_Real Param, const Standard_Real WFirst, const Standard_Real WLast); + //! Shallow copy of adaptor + Standard_EXPORT virtual Handle(Adaptor3d_Curve) ShallowCopy() const Standard_OVERRIDE; + //! Changes the surface. The iso is reset to //! NoneIso. Standard_EXPORT void Load (const Handle(Adaptor3d_Surface)& S); diff --git a/src/Adaptor3d/Adaptor3d_Surface.cxx b/src/Adaptor3d/Adaptor3d_Surface.cxx index 5a52130b5c..c48bbc5b42 100644 --- a/src/Adaptor3d/Adaptor3d_Surface.cxx +++ b/src/Adaptor3d/Adaptor3d_Surface.cxx @@ -43,6 +43,15 @@ Adaptor3d_Surface::~Adaptor3d_Surface() { } +//======================================================================= +//function : ShallowCopy() +//purpose : +//======================================================================= + +Handle(Adaptor3d_Surface) Adaptor3d_Surface::ShallowCopy() const +{ + throw Standard_NotImplemented("Adaptor3d_Surface::ShallowCopy"); +} //======================================================================= //function : FirstUParameter //purpose : diff --git a/src/Adaptor3d/Adaptor3d_Surface.hxx b/src/Adaptor3d/Adaptor3d_Surface.hxx index a3163f92da..5972b5ff76 100644 --- a/src/Adaptor3d/Adaptor3d_Surface.hxx +++ b/src/Adaptor3d/Adaptor3d_Surface.hxx @@ -59,6 +59,9 @@ class Adaptor3d_Surface : public Standard_Transient DEFINE_STANDARD_RTTIEXT(Adaptor3d_Surface, Standard_Transient) public: + //! Shallow copy of adaptor + Standard_EXPORT virtual Handle(Adaptor3d_Surface) ShallowCopy() const; + Standard_EXPORT virtual Standard_Real FirstUParameter() const; Standard_EXPORT virtual Standard_Real LastUParameter() const; diff --git a/src/BRepAdaptor/BRepAdaptor_CompCurve.cxx b/src/BRepAdaptor/BRepAdaptor_CompCurve.cxx index 64acb5ee91..2cf7998f0a 100644 --- a/src/BRepAdaptor/BRepAdaptor_CompCurve.cxx +++ b/src/BRepAdaptor/BRepAdaptor_CompCurve.cxx @@ -79,6 +79,34 @@ BRepAdaptor_CompCurve::BRepAdaptor_CompCurve(const TopoDS_Wire& theWire, Initialize(theWire, theIsAC, theFirst, theLast, theTolerance); } +//======================================================================= +//function : ShallowCopy +//purpose : +//======================================================================= + +Handle(Adaptor3d_Curve) BRepAdaptor_CompCurve::ShallowCopy() const +{ + Handle(BRepAdaptor_CompCurve) aCopy = new BRepAdaptor_CompCurve(); + + aCopy->myWire = myWire; + aCopy->TFirst = TFirst; + aCopy->TLast = TLast; + aCopy->PTol = PTol; + aCopy->myCurves = new (BRepAdaptor_HArray1OfCurve) (1, myCurves->Size()); + for (Standard_Integer anI = 1; anI <= myCurves->Size(); ++anI) + { + const Handle(Adaptor3d_Curve) aCurve = myCurves->Value(anI).ShallowCopy(); + const BRepAdaptor_Curve& aBrepCurve = *(Handle(BRepAdaptor_Curve)::DownCast(aCurve)); + aCopy->myCurves->SetValue(anI, aBrepCurve); + } + aCopy->myKnots = myKnots; + aCopy->CurIndex = CurIndex; + aCopy->Forward = Forward; + aCopy->IsbyAC = IsbyAC; + + return aCopy; +} + void BRepAdaptor_CompCurve::Initialize(const TopoDS_Wire& W, const Standard_Boolean AC) { diff --git a/src/BRepAdaptor/BRepAdaptor_CompCurve.hxx b/src/BRepAdaptor/BRepAdaptor_CompCurve.hxx index cf772a41a9..9378600ea0 100644 --- a/src/BRepAdaptor/BRepAdaptor_CompCurve.hxx +++ b/src/BRepAdaptor/BRepAdaptor_CompCurve.hxx @@ -74,6 +74,9 @@ public: //! . Standard_EXPORT BRepAdaptor_CompCurve(const TopoDS_Wire& W, const Standard_Boolean KnotByCurvilinearAbcissa, const Standard_Real First, const Standard_Real Last, const Standard_Real Tol); + //! Shallow copy of adaptor + Standard_EXPORT virtual Handle(Adaptor3d_Curve) ShallowCopy() const Standard_OVERRIDE; + //! Sets the wire . Standard_EXPORT void Initialize (const TopoDS_Wire& W, const Standard_Boolean KnotByCurvilinearAbcissa); diff --git a/src/BRepAdaptor/BRepAdaptor_Curve.cxx b/src/BRepAdaptor/BRepAdaptor_Curve.cxx index f6915be1f6..1bd9a2f7da 100644 --- a/src/BRepAdaptor/BRepAdaptor_Curve.cxx +++ b/src/BRepAdaptor/BRepAdaptor_Curve.cxx @@ -73,6 +73,30 @@ BRepAdaptor_Curve::BRepAdaptor_Curve(const TopoDS_Edge& E, Initialize(E,F); } +//======================================================================= +//function : ShallowCopy +//purpose : +//======================================================================= + +Handle(Adaptor3d_Curve) BRepAdaptor_Curve::ShallowCopy() const +{ + Handle(BRepAdaptor_Curve) aCopy = new BRepAdaptor_Curve(); + + aCopy->myTrsf = myTrsf; + + const Handle(Adaptor3d_Curve) aCurve = myCurve.ShallowCopy(); + const GeomAdaptor_Curve& aGeomCurve = *(Handle(GeomAdaptor_Curve)::DownCast(aCurve)); + aCopy->myCurve = aGeomCurve; + + if (!myConSurf.IsNull()) + { + aCopy->myConSurf = Handle(Adaptor3d_CurveOnSurface)::DownCast(myConSurf->ShallowCopy()); + } + aCopy->myEdge = myEdge; + + return aCopy; +} + //======================================================================= //function : Reset //purpose : diff --git a/src/BRepAdaptor/BRepAdaptor_Curve.hxx b/src/BRepAdaptor/BRepAdaptor_Curve.hxx index ded2fda66c..b411124337 100644 --- a/src/BRepAdaptor/BRepAdaptor_Curve.hxx +++ b/src/BRepAdaptor/BRepAdaptor_Curve.hxx @@ -82,6 +82,9 @@ public: //! the face. Standard_EXPORT BRepAdaptor_Curve(const TopoDS_Edge& E, const TopoDS_Face& F); + //! Shallow copy of adaptor + Standard_EXPORT virtual Handle(Adaptor3d_Curve) ShallowCopy() const Standard_OVERRIDE; + //! Reset currently loaded curve (undone Load()). Standard_EXPORT void Reset(); diff --git a/src/BRepAdaptor/BRepAdaptor_Curve2d.cxx b/src/BRepAdaptor/BRepAdaptor_Curve2d.cxx index 140f4dd97b..ceccc9e5b4 100644 --- a/src/BRepAdaptor/BRepAdaptor_Curve2d.cxx +++ b/src/BRepAdaptor/BRepAdaptor_Curve2d.cxx @@ -43,6 +43,27 @@ BRepAdaptor_Curve2d::BRepAdaptor_Curve2d(const TopoDS_Edge& E, Initialize(E,F); } +//======================================================================= +//function : ShallowCopy +//purpose : +//======================================================================= + +Handle(Adaptor2d_Curve2d) BRepAdaptor_Curve2d::ShallowCopy() const +{ + Handle(BRepAdaptor_Curve2d) aCopy = new BRepAdaptor_Curve2d(); + + aCopy->myCurve = myCurve; + aCopy->myTypeCurve = myTypeCurve; + aCopy->myFirst = myFirst; + aCopy->myLast = myLast; + aCopy->myBSplineCurve = myBSplineCurve; + if (!myNestedEvaluator.IsNull()) + { + aCopy->myNestedEvaluator = myNestedEvaluator->ShallowCopy(); + } + + return aCopy; +} //======================================================================= //function : Initialize diff --git a/src/BRepAdaptor/BRepAdaptor_Curve2d.hxx b/src/BRepAdaptor/BRepAdaptor_Curve2d.hxx index f19157649d..a78e3c987a 100644 --- a/src/BRepAdaptor/BRepAdaptor_Curve2d.hxx +++ b/src/BRepAdaptor/BRepAdaptor_Curve2d.hxx @@ -49,6 +49,9 @@ public: //! Creates with the pcurve of on . Standard_EXPORT BRepAdaptor_Curve2d(const TopoDS_Edge& E, const TopoDS_Face& F); + + //! Shallow copy of adaptor + Standard_EXPORT virtual Handle(Adaptor2d_Curve2d) ShallowCopy() const Standard_OVERRIDE; //! Initialize with the pcurve of on . Standard_EXPORT void Initialize (const TopoDS_Edge& E, const TopoDS_Face& F); diff --git a/src/BRepAdaptor/BRepAdaptor_Surface.cxx b/src/BRepAdaptor/BRepAdaptor_Surface.cxx index 1eda58f4fe..98acaaba90 100644 --- a/src/BRepAdaptor/BRepAdaptor_Surface.cxx +++ b/src/BRepAdaptor/BRepAdaptor_Surface.cxx @@ -63,6 +63,24 @@ BRepAdaptor_Surface::BRepAdaptor_Surface(const TopoDS_Face& F, } +//======================================================================= +//function : ShallowCopy +//purpose : +//======================================================================= + +Handle(Adaptor3d_Surface) BRepAdaptor_Surface::ShallowCopy() const +{ + Handle(BRepAdaptor_Surface) aCopy = new BRepAdaptor_Surface(); + + const Handle(Adaptor3d_Surface) aSurface = mySurf.ShallowCopy(); + const GeomAdaptor_Surface& aGeomSurface = *(Handle(GeomAdaptor_Surface)::DownCast(aSurface)); + aCopy->mySurf = aGeomSurface; + + aCopy->myTrsf = myTrsf; + aCopy->myFace = myFace; + + return aCopy; +} //======================================================================= //function : Initialize //purpose : diff --git a/src/BRepAdaptor/BRepAdaptor_Surface.hxx b/src/BRepAdaptor/BRepAdaptor_Surface.hxx index ffd8648d35..ed067dc619 100644 --- a/src/BRepAdaptor/BRepAdaptor_Surface.hxx +++ b/src/BRepAdaptor/BRepAdaptor_Surface.hxx @@ -68,6 +68,9 @@ public: //! the parameter range in the UV space of the //! restriction. Standard_EXPORT BRepAdaptor_Surface(const TopoDS_Face& F, const Standard_Boolean R = Standard_True); + + //! Shallow copy of adaptor + Standard_EXPORT virtual Handle(Adaptor3d_Surface) ShallowCopy() const Standard_OVERRIDE; //! Sets the surface to the geometry of . Standard_EXPORT void Initialize (const TopoDS_Face& F, const Standard_Boolean Restriction = Standard_True); diff --git a/src/BiTgte/BiTgte_CurveOnEdge.cxx b/src/BiTgte/BiTgte_CurveOnEdge.cxx index d3dc87b552..a94b3a6091 100644 --- a/src/BiTgte/BiTgte_CurveOnEdge.cxx +++ b/src/BiTgte/BiTgte_CurveOnEdge.cxx @@ -64,7 +64,24 @@ BiTgte_CurveOnEdge::BiTgte_CurveOnEdge(const TopoDS_Edge& theEonF, Init(theEonF, theEdge); } +//======================================================================= +//function : ShallowCopy +//purpose : +//======================================================================= +Handle(Adaptor3d_Curve) BiTgte_CurveOnEdge::ShallowCopy() const +{ + Handle(BiTgte_CurveOnEdge) aCopy = new BiTgte_CurveOnEdge(); + + aCopy->myEdge = myEdge; + aCopy->myEonF = myEonF; + aCopy->myCurv = myCurv; + aCopy->myConF = myConF; + aCopy->myType = myType; + aCopy->myCirc = myCirc; + + return aCopy; +} //======================================================================= //function : Init //purpose : diff --git a/src/BiTgte/BiTgte_CurveOnEdge.hxx b/src/BiTgte/BiTgte_CurveOnEdge.hxx index 1c2c0c8793..d1b3142fc6 100644 --- a/src/BiTgte/BiTgte_CurveOnEdge.hxx +++ b/src/BiTgte/BiTgte_CurveOnEdge.hxx @@ -57,6 +57,9 @@ public: Standard_EXPORT BiTgte_CurveOnEdge(); Standard_EXPORT BiTgte_CurveOnEdge(const TopoDS_Edge& EonF, const TopoDS_Edge& Edge); + + //! Shallow copy of adaptor + Standard_EXPORT virtual Handle(Adaptor3d_Curve) ShallowCopy() const Standard_OVERRIDE; Standard_EXPORT void Init (const TopoDS_Edge& EonF, const TopoDS_Edge& Edge); diff --git a/src/ChFiDS/ChFiDS_ElSpine.cxx b/src/ChFiDS/ChFiDS_ElSpine.cxx index a2866fffa9..8e46350225 100644 --- a/src/ChFiDS/ChFiDS_ElSpine.cxx +++ b/src/ChFiDS/ChFiDS_ElSpine.cxx @@ -51,6 +51,34 @@ ChFiDS_ElSpine::ChFiDS_ElSpine() { } +//======================================================================= +//function : ShallowCopy +//purpose : +//======================================================================= +Handle(Adaptor3d_Curve) ChFiDS_ElSpine::ShallowCopy() const +{ + Handle(ChFiDS_ElSpine) aCopy = new ChFiDS_ElSpine(); + + const Handle(Adaptor3d_Curve) aCurve = curve.ShallowCopy(); + const GeomAdaptor_Curve& aGeomCurve = *(Handle(GeomAdaptor_Curve)::DownCast(aCurve)); + aCopy->curve = aGeomCurve; + + aCopy->ptfirst = ptfirst; + aCopy->ptlast = ptlast; + aCopy->tgfirst = tgfirst; + aCopy->tglast = tglast; + aCopy->VerticesWithTangents = VerticesWithTangents; + aCopy->previous = previous; + aCopy->next = next; + aCopy->pfirst = pfirst; + aCopy->plast = plast; + aCopy->period = period; + aCopy->periodic = periodic; + aCopy->pfirstsav = pfirstsav; + aCopy->plastsav = plastsav; + + return aCopy; +} //======================================================================= //function : FirstParameter @@ -449,7 +477,7 @@ Handle(ChFiDS_SurfData)& ChFiDS_ElSpine::ChangeNext() gp_Lin ChFiDS_ElSpine::Line() const { - return curve.Line(); + return curve.Line(); } //======================================================================= @@ -479,7 +507,7 @@ gp_Elips ChFiDS_ElSpine::Ellipse() const gp_Hypr ChFiDS_ElSpine::Hyperbola() const { - return curve.Hyperbola(); + return curve.Hyperbola(); } //======================================================================= diff --git a/src/ChFiDS/ChFiDS_ElSpine.hxx b/src/ChFiDS/ChFiDS_ElSpine.hxx index 9dfc5a0146..374eeead39 100644 --- a/src/ChFiDS/ChFiDS_ElSpine.hxx +++ b/src/ChFiDS/ChFiDS_ElSpine.hxx @@ -57,6 +57,9 @@ class ChFiDS_ElSpine : public Adaptor3d_Curve public: Standard_EXPORT ChFiDS_ElSpine(); + + //! Shallow copy of adaptor + Standard_EXPORT virtual Handle(Adaptor3d_Curve) ShallowCopy() const Standard_OVERRIDE; Standard_EXPORT virtual Standard_Real FirstParameter() const Standard_OVERRIDE; diff --git a/src/Geom2dAdaptor/Geom2dAdaptor_Curve.cxx b/src/Geom2dAdaptor/Geom2dAdaptor_Curve.cxx index 2220bb3c65..b3ce81771b 100644 --- a/src/Geom2dAdaptor/Geom2dAdaptor_Curve.cxx +++ b/src/Geom2dAdaptor/Geom2dAdaptor_Curve.cxx @@ -65,6 +65,28 @@ static const Standard_Real PosTol = Precision::PConfusion() / 2; IMPLEMENT_STANDARD_RTTIEXT(Geom2dAdaptor_Curve, Adaptor2d_Curve2d) +//======================================================================= +//function : ShallowCopy +//purpose : +//======================================================================= + +Handle(Adaptor2d_Curve2d) Geom2dAdaptor_Curve::ShallowCopy() const +{ + Handle(Geom2dAdaptor_Curve) aCopy = new Geom2dAdaptor_Curve(); + + aCopy->myCurve = myCurve; + aCopy->myTypeCurve = myTypeCurve; + aCopy->myFirst = myFirst; + aCopy->myLast = myLast; + aCopy->myBSplineCurve = myBSplineCurve; + if(!myNestedEvaluator.IsNull()) + { + aCopy->myNestedEvaluator = myNestedEvaluator->ShallowCopy(); + } + + return aCopy; +} + //======================================================================= //function : LocalContinuity //purpose : Computes the Continuity of a BSplineCurve diff --git a/src/Geom2dAdaptor/Geom2dAdaptor_Curve.hxx b/src/Geom2dAdaptor/Geom2dAdaptor_Curve.hxx index 0c668ec6d4..accca173af 100644 --- a/src/Geom2dAdaptor/Geom2dAdaptor_Curve.hxx +++ b/src/Geom2dAdaptor/Geom2dAdaptor_Curve.hxx @@ -58,6 +58,9 @@ public: //! Standard_ConstructionError is raised if Ufirst>Ulast Standard_EXPORT Geom2dAdaptor_Curve(const Handle(Geom2d_Curve)& C, const Standard_Real UFirst, const Standard_Real ULast); + //! Shallow copy of adaptor + Standard_EXPORT virtual Handle(Adaptor2d_Curve2d) ShallowCopy() const Standard_OVERRIDE; + //! Reset currently loaded curve (undone Load()). Standard_EXPORT void Reset(); @@ -183,7 +186,7 @@ private: //! \param theParameter the value on the knot axis which identifies the caching span void RebuildCache (const Standard_Real theParameter) const; -private: +protected: Handle(Geom2d_Curve) myCurve; GeomAbs_CurveType myTypeCurve; diff --git a/src/Geom2dEvaluator/Geom2dEvaluator_Curve.hxx b/src/Geom2dEvaluator/Geom2dEvaluator_Curve.hxx index 4c99991a8e..9a82007b1b 100644 --- a/src/Geom2dEvaluator/Geom2dEvaluator_Curve.hxx +++ b/src/Geom2dEvaluator/Geom2dEvaluator_Curve.hxx @@ -44,6 +44,8 @@ public: virtual gp_Vec2d DN(const Standard_Real theU, const Standard_Integer theDerU) const = 0; + virtual Handle(Geom2dEvaluator_Curve) ShallowCopy() const = 0; + DEFINE_STANDARD_RTTI_INLINE(Geom2dEvaluator_Curve,Standard_Transient) }; diff --git a/src/Geom2dEvaluator/Geom2dEvaluator_OffsetCurve.cxx b/src/Geom2dEvaluator/Geom2dEvaluator_OffsetCurve.cxx index 88e3421484..6cbe24e2f4 100644 --- a/src/Geom2dEvaluator/Geom2dEvaluator_OffsetCurve.cxx +++ b/src/Geom2dEvaluator/Geom2dEvaluator_OffsetCurve.cxx @@ -113,6 +113,22 @@ gp_Vec2d Geom2dEvaluator_OffsetCurve::DN(const Standard_Real theU, return aDN; } +Handle(Geom2dEvaluator_Curve) Geom2dEvaluator_OffsetCurve::ShallowCopy() const +{ + Handle(Geom2dEvaluator_OffsetCurve) aCopy; + if (!myBaseAdaptor.IsNull()) + { + aCopy = new Geom2dEvaluator_OffsetCurve(Handle(Geom2dAdaptor_Curve)::DownCast(myBaseAdaptor->ShallowCopy()), + myOffset); + } + else + { + aCopy = new Geom2dEvaluator_OffsetCurve(myBaseCurve, myOffset); + } + + return aCopy; +} + void Geom2dEvaluator_OffsetCurve::BaseD0(const Standard_Real theU, gp_Pnt2d& theValue) const diff --git a/src/Geom2dEvaluator/Geom2dEvaluator_OffsetCurve.hxx b/src/Geom2dEvaluator/Geom2dEvaluator_OffsetCurve.hxx index 356a89e9fc..209255983a 100644 --- a/src/Geom2dEvaluator/Geom2dEvaluator_OffsetCurve.hxx +++ b/src/Geom2dEvaluator/Geom2dEvaluator_OffsetCurve.hxx @@ -53,6 +53,8 @@ public: Standard_EXPORT gp_Vec2d DN(const Standard_Real theU, const Standard_Integer theDeriv) const Standard_OVERRIDE; + Standard_EXPORT Handle(Geom2dEvaluator_Curve) ShallowCopy() const Standard_OVERRIDE; + DEFINE_STANDARD_RTTIEXT(Geom2dEvaluator_OffsetCurve,Geom2dEvaluator_Curve) private: diff --git a/src/GeomAdaptor/GeomAdaptor_Curve.cxx b/src/GeomAdaptor/GeomAdaptor_Curve.cxx index 6d8bfae812..7115a0f80f 100644 --- a/src/GeomAdaptor/GeomAdaptor_Curve.cxx +++ b/src/GeomAdaptor/GeomAdaptor_Curve.cxx @@ -63,6 +63,28 @@ static const Standard_Real PosTol = Precision::PConfusion() / 2; IMPLEMENT_STANDARD_RTTIEXT(GeomAdaptor_Curve, Adaptor3d_Curve) +//======================================================================= +//function : ShallowCopy +//purpose : +//======================================================================= + +Handle(Adaptor3d_Curve) GeomAdaptor_Curve::ShallowCopy() const +{ + Handle(GeomAdaptor_Curve) aCopy = new GeomAdaptor_Curve(); + + aCopy->myCurve = myCurve; + aCopy->myTypeCurve = myTypeCurve; + aCopy->myFirst = myFirst; + aCopy->myLast = myLast; + aCopy->myBSplineCurve = myBSplineCurve; + if (!myNestedEvaluator.IsNull()) + { + aCopy->myNestedEvaluator = myNestedEvaluator->ShallowCopy(); + } + + return aCopy; +} + //======================================================================= //function : LocalContinuity //purpose : Computes the Continuity of a BSplineCurve diff --git a/src/GeomAdaptor/GeomAdaptor_Curve.hxx b/src/GeomAdaptor/GeomAdaptor_Curve.hxx index 894623beba..4c2fe32d8c 100644 --- a/src/GeomAdaptor/GeomAdaptor_Curve.hxx +++ b/src/GeomAdaptor/GeomAdaptor_Curve.hxx @@ -54,6 +54,9 @@ public: Load (theCurve, theUFirst, theULast); } + //! Shallow copy of adaptor + Standard_EXPORT virtual Handle(Adaptor3d_Curve) ShallowCopy() const Standard_OVERRIDE; + //! Reset currently loaded curve (undone Load()). Standard_EXPORT void Reset(); diff --git a/src/GeomAdaptor/GeomAdaptor_Surface.cxx b/src/GeomAdaptor/GeomAdaptor_Surface.cxx index 27d058aefc..3c912b8a61 100644 --- a/src/GeomAdaptor/GeomAdaptor_Surface.cxx +++ b/src/GeomAdaptor/GeomAdaptor_Surface.cxx @@ -114,6 +114,33 @@ GeomAbs_Shape LocalContinuity(Standard_Integer Degree, return GeomAbs_CN; } +//======================================================================= +//function : ShallowCopy +//purpose : +//======================================================================= + +Handle(Adaptor3d_Surface) GeomAdaptor_Surface::ShallowCopy() const +{ + Handle(GeomAdaptor_Surface) aCopy = new GeomAdaptor_Surface(); + + aCopy->mySurface = mySurface; + aCopy->myUFirst = myUFirst; + aCopy->myULast = myULast; + aCopy->myVFirst = myVFirst; + aCopy->myVLast = myVLast; + aCopy->myTolU = myTolU; + aCopy->myTolV = myTolV; + aCopy->myBSplineSurface = myBSplineSurface; + + aCopy->mySurfaceType = mySurfaceType; + if (!myNestedEvaluator.IsNull()) + { + aCopy->myNestedEvaluator = myNestedEvaluator->ShallowCopy(); + } + + return aCopy; +} + //======================================================================= //function : Load //purpose : diff --git a/src/GeomAdaptor/GeomAdaptor_Surface.hxx b/src/GeomAdaptor/GeomAdaptor_Surface.hxx index 725bcfb6b5..49efc81932 100644 --- a/src/GeomAdaptor/GeomAdaptor_Surface.hxx +++ b/src/GeomAdaptor/GeomAdaptor_Surface.hxx @@ -61,6 +61,9 @@ public: Load (theSurf, theUFirst, theULast, theVFirst, theVLast, theTolU, theTolV); } + //! Shallow copy of adaptor + Standard_EXPORT virtual Handle(Adaptor3d_Surface) ShallowCopy() const Standard_OVERRIDE; + void Load (const Handle(Geom_Surface)& theSurf) { if (theSurf.IsNull()) { throw Standard_NullObject("GeomAdaptor_Surface::Load"); } @@ -257,7 +260,7 @@ private: //! \param theV second parameter to identify the span for caching Standard_EXPORT void RebuildCache (const Standard_Real theU, const Standard_Real theV) const; -private: + protected: Handle(Geom_Surface) mySurface; Standard_Real myUFirst; @@ -270,7 +273,6 @@ private: Handle(Geom_BSplineSurface) myBSplineSurface; ///< B-spline representation to prevent downcasts mutable Handle(BSplSLib_Cache) mySurfaceCache; ///< Cached data for B-spline or Bezier surface -protected: GeomAbs_SurfaceType mySurfaceType; Handle(GeomEvaluator_Surface) myNestedEvaluator; ///< Calculates values of nested complex surfaces (offset surface, surface of extrusion or revolution) }; diff --git a/src/GeomAdaptor/GeomAdaptor_SurfaceOfLinearExtrusion.cxx b/src/GeomAdaptor/GeomAdaptor_SurfaceOfLinearExtrusion.cxx index d196c8e908..55e7e6b098 100644 --- a/src/GeomAdaptor/GeomAdaptor_SurfaceOfLinearExtrusion.cxx +++ b/src/GeomAdaptor/GeomAdaptor_SurfaceOfLinearExtrusion.cxx @@ -58,6 +58,39 @@ GeomAdaptor_SurfaceOfLinearExtrusion::GeomAdaptor_SurfaceOfLinearExtrusion Load(V); } +//======================================================================= +//function : ShallowCopy +//purpose : +//======================================================================= + +Handle(Adaptor3d_Surface) GeomAdaptor_SurfaceOfLinearExtrusion::ShallowCopy() const +{ + Handle(GeomAdaptor_SurfaceOfLinearExtrusion) aCopy = new GeomAdaptor_SurfaceOfLinearExtrusion(); + + if (!myBasisCurve.IsNull()) + { + aCopy->myBasisCurve = myBasisCurve->ShallowCopy(); + } + aCopy->myDirection = myDirection; + aCopy->myHaveDir = myHaveDir; + + aCopy->mySurface = mySurface; + aCopy->myUFirst = myUFirst; + aCopy->myULast = myULast; + aCopy->myVFirst = myVFirst; + aCopy->myVLast = myVLast; + aCopy->myTolU = myTolU; + aCopy->myTolV = myTolV; + aCopy->myBSplineSurface = myBSplineSurface; + + aCopy->mySurfaceType = mySurfaceType; + if (!myNestedEvaluator.IsNull()) + { + aCopy->myNestedEvaluator = myNestedEvaluator->ShallowCopy(); + } + + return aCopy; +} //======================================================================= //function : Load //purpose : diff --git a/src/GeomAdaptor/GeomAdaptor_SurfaceOfLinearExtrusion.hxx b/src/GeomAdaptor/GeomAdaptor_SurfaceOfLinearExtrusion.hxx index f5e28e909a..c9b3179e9e 100644 --- a/src/GeomAdaptor/GeomAdaptor_SurfaceOfLinearExtrusion.hxx +++ b/src/GeomAdaptor/GeomAdaptor_SurfaceOfLinearExtrusion.hxx @@ -57,6 +57,9 @@ public: //! Thew Curve and the Direction are loaded. Standard_EXPORT GeomAdaptor_SurfaceOfLinearExtrusion(const Handle(Adaptor3d_Curve)& C, const gp_Dir& V); + //! Shallow copy of adaptor + Standard_EXPORT virtual Handle(Adaptor3d_Surface) ShallowCopy() const Standard_OVERRIDE; + //! Changes the Curve Standard_EXPORT void Load (const Handle(Adaptor3d_Curve)& C); diff --git a/src/GeomAdaptor/GeomAdaptor_SurfaceOfRevolution.cxx b/src/GeomAdaptor/GeomAdaptor_SurfaceOfRevolution.cxx index b2bc4336c2..eea5ae45c9 100644 --- a/src/GeomAdaptor/GeomAdaptor_SurfaceOfRevolution.cxx +++ b/src/GeomAdaptor/GeomAdaptor_SurfaceOfRevolution.cxx @@ -58,6 +58,41 @@ GeomAdaptor_SurfaceOfRevolution::GeomAdaptor_SurfaceOfRevolution( Load(V); } +//======================================================================= +//function : ShallowCopy +//purpose : +//======================================================================= + +Handle(Adaptor3d_Surface) GeomAdaptor_SurfaceOfRevolution::ShallowCopy() const +{ + Handle(GeomAdaptor_SurfaceOfRevolution) aCopy = new GeomAdaptor_SurfaceOfRevolution(); + + if (!myBasisCurve.IsNull()) + { + aCopy->myBasisCurve = myBasisCurve->ShallowCopy(); + } + aCopy->myAxis = myAxis; + aCopy->myHaveAxis = myHaveAxis; + aCopy->myAxeRev = myAxeRev; + + aCopy->mySurface = mySurface; + aCopy->myUFirst = myUFirst; + aCopy->myULast = myULast; + aCopy->myVFirst = myVFirst; + aCopy->myVLast = myVLast; + aCopy->myTolU = myTolU; + aCopy->myTolV = myTolV; + aCopy->myBSplineSurface = myBSplineSurface; + + aCopy->mySurfaceType = mySurfaceType; + if (!myNestedEvaluator.IsNull()) + { + aCopy->myNestedEvaluator = myNestedEvaluator->ShallowCopy(); + } + + return aCopy; +} + //======================================================================= //function : Load //purpose : diff --git a/src/GeomAdaptor/GeomAdaptor_SurfaceOfRevolution.hxx b/src/GeomAdaptor/GeomAdaptor_SurfaceOfRevolution.hxx index a41b151871..35485e9fb5 100644 --- a/src/GeomAdaptor/GeomAdaptor_SurfaceOfRevolution.hxx +++ b/src/GeomAdaptor/GeomAdaptor_SurfaceOfRevolution.hxx @@ -65,6 +65,9 @@ public: //! The Curve and the Direction are loaded. Standard_EXPORT GeomAdaptor_SurfaceOfRevolution(const Handle(Adaptor3d_Curve)& C, const gp_Ax1& V); + + //! Shallow copy of adaptor + Standard_EXPORT virtual Handle(Adaptor3d_Surface) ShallowCopy() const Standard_OVERRIDE; //! Changes the Curve Standard_EXPORT void Load (const Handle(Adaptor3d_Curve)& C); diff --git a/src/GeomEvaluator/GeomEvaluator_Curve.hxx b/src/GeomEvaluator/GeomEvaluator_Curve.hxx index 6d57afad87..4a13acad50 100644 --- a/src/GeomEvaluator/GeomEvaluator_Curve.hxx +++ b/src/GeomEvaluator/GeomEvaluator_Curve.hxx @@ -44,6 +44,8 @@ public: virtual gp_Vec DN(const Standard_Real theU, const Standard_Integer theDerU) const = 0; + virtual Handle(GeomEvaluator_Curve) ShallowCopy() const = 0; + DEFINE_STANDARD_RTTI_INLINE(GeomEvaluator_Curve,Standard_Transient) }; diff --git a/src/GeomEvaluator/GeomEvaluator_OffsetCurve.cxx b/src/GeomEvaluator/GeomEvaluator_OffsetCurve.cxx index d01328ba5d..641221b9c5 100644 --- a/src/GeomEvaluator/GeomEvaluator_OffsetCurve.cxx +++ b/src/GeomEvaluator/GeomEvaluator_OffsetCurve.cxx @@ -117,6 +117,21 @@ gp_Vec GeomEvaluator_OffsetCurve::DN(const Standard_Real theU, return aDN; } +Handle(GeomEvaluator_Curve) GeomEvaluator_OffsetCurve::ShallowCopy() const +{ + Handle(GeomEvaluator_OffsetCurve) aCopy; + if (!myBaseAdaptor.IsNull()) + { + aCopy = new GeomEvaluator_OffsetCurve(Handle(GeomAdaptor_Curve)::DownCast(myBaseAdaptor->ShallowCopy()), + myOffset, myOffsetDir); + } + else + { + aCopy = new GeomEvaluator_OffsetCurve(myBaseCurve, myOffset, myOffsetDir); + } + return aCopy; +} + void GeomEvaluator_OffsetCurve::BaseD0(const Standard_Real theU, gp_Pnt& theValue) const diff --git a/src/GeomEvaluator/GeomEvaluator_OffsetCurve.hxx b/src/GeomEvaluator/GeomEvaluator_OffsetCurve.hxx index 1e894ce3b0..c16b1d34d5 100644 --- a/src/GeomEvaluator/GeomEvaluator_OffsetCurve.hxx +++ b/src/GeomEvaluator/GeomEvaluator_OffsetCurve.hxx @@ -59,6 +59,8 @@ public: Standard_EXPORT gp_Vec DN(const Standard_Real theU, const Standard_Integer theDeriv) const Standard_OVERRIDE; + Standard_EXPORT virtual Handle(GeomEvaluator_Curve) ShallowCopy() const Standard_OVERRIDE; + DEFINE_STANDARD_RTTIEXT(GeomEvaluator_OffsetCurve,GeomEvaluator_Curve) private: diff --git a/src/GeomEvaluator/GeomEvaluator_OffsetSurface.cxx b/src/GeomEvaluator/GeomEvaluator_OffsetSurface.cxx index b154668fb1..6fac3fe0b1 100644 --- a/src/GeomEvaluator/GeomEvaluator_OffsetSurface.cxx +++ b/src/GeomEvaluator/GeomEvaluator_OffsetSurface.cxx @@ -408,6 +408,22 @@ gp_Vec GeomEvaluator_OffsetSurface::DN( } } +Handle(GeomEvaluator_Surface) GeomEvaluator_OffsetSurface::ShallowCopy() const +{ + Handle(GeomEvaluator_OffsetSurface) aCopy; + if (!myBaseAdaptor.IsNull()) + { + aCopy = new GeomEvaluator_OffsetSurface(Handle(GeomAdaptor_Surface)::DownCast(myBaseAdaptor->ShallowCopy()), + myOffset, myOscSurf); + } + else + { + aCopy = new GeomEvaluator_OffsetSurface(myBaseSurf, myOffset, myOscSurf); + } + + return aCopy; +} + void GeomEvaluator_OffsetSurface::BaseD0(const Standard_Real theU, const Standard_Real theV, gp_Pnt& theValue) const diff --git a/src/GeomEvaluator/GeomEvaluator_OffsetSurface.hxx b/src/GeomEvaluator/GeomEvaluator_OffsetSurface.hxx index b6e6cb7d9d..e4433e28fa 100644 --- a/src/GeomEvaluator/GeomEvaluator_OffsetSurface.hxx +++ b/src/GeomEvaluator/GeomEvaluator_OffsetSurface.hxx @@ -63,6 +63,8 @@ public: const Standard_Integer theDerU, const Standard_Integer theDerV) const Standard_OVERRIDE; + Standard_EXPORT Handle(GeomEvaluator_Surface) ShallowCopy() const Standard_OVERRIDE; + DEFINE_STANDARD_RTTIEXT(GeomEvaluator_OffsetSurface,GeomEvaluator_Surface) private: diff --git a/src/GeomEvaluator/GeomEvaluator_Surface.hxx b/src/GeomEvaluator/GeomEvaluator_Surface.hxx index 4ec9aa5dbd..23fdcf8227 100644 --- a/src/GeomEvaluator/GeomEvaluator_Surface.hxx +++ b/src/GeomEvaluator/GeomEvaluator_Surface.hxx @@ -49,6 +49,8 @@ public: virtual gp_Vec DN(const Standard_Real theU, const Standard_Real theV, const Standard_Integer theDerU, const Standard_Integer theDerV) const = 0; + virtual Handle(GeomEvaluator_Surface) ShallowCopy() const = 0; + DEFINE_STANDARD_RTTI_INLINE(GeomEvaluator_Surface,Standard_Transient) }; diff --git a/src/GeomEvaluator/GeomEvaluator_SurfaceOfExtrusion.cxx b/src/GeomEvaluator/GeomEvaluator_SurfaceOfExtrusion.cxx index b6a65e3e61..f84e72c0aa 100644 --- a/src/GeomEvaluator/GeomEvaluator_SurfaceOfExtrusion.cxx +++ b/src/GeomEvaluator/GeomEvaluator_SurfaceOfExtrusion.cxx @@ -119,3 +119,18 @@ gp_Vec GeomEvaluator_SurfaceOfExtrusion::DN( return aResult; } +Handle(GeomEvaluator_Surface) GeomEvaluator_SurfaceOfExtrusion::ShallowCopy() const +{ + Handle(GeomEvaluator_SurfaceOfExtrusion) aCopy; + if (!myBaseAdaptor.IsNull()) + { + aCopy = new GeomEvaluator_SurfaceOfExtrusion(myBaseAdaptor->ShallowCopy(), myDirection); + } + else + { + aCopy = new GeomEvaluator_SurfaceOfExtrusion(myBaseCurve, myDirection); + } + + return aCopy; +} + diff --git a/src/GeomEvaluator/GeomEvaluator_SurfaceOfExtrusion.hxx b/src/GeomEvaluator/GeomEvaluator_SurfaceOfExtrusion.hxx index 8b2a08c81c..49a48752b6 100644 --- a/src/GeomEvaluator/GeomEvaluator_SurfaceOfExtrusion.hxx +++ b/src/GeomEvaluator/GeomEvaluator_SurfaceOfExtrusion.hxx @@ -59,6 +59,8 @@ public: const Standard_Integer theDerU, const Standard_Integer theDerV) const Standard_OVERRIDE; + Standard_EXPORT Handle(GeomEvaluator_Surface) ShallowCopy() const Standard_OVERRIDE; + DEFINE_STANDARD_RTTIEXT(GeomEvaluator_SurfaceOfExtrusion,GeomEvaluator_Surface) private: diff --git a/src/GeomEvaluator/GeomEvaluator_SurfaceOfRevolution.cxx b/src/GeomEvaluator/GeomEvaluator_SurfaceOfRevolution.cxx index fbce3b0a5b..6af64d0bd6 100644 --- a/src/GeomEvaluator/GeomEvaluator_SurfaceOfRevolution.cxx +++ b/src/GeomEvaluator/GeomEvaluator_SurfaceOfRevolution.cxx @@ -203,3 +203,20 @@ gp_Vec GeomEvaluator_SurfaceOfRevolution::DN( return aResult; } +Handle(GeomEvaluator_Surface) GeomEvaluator_SurfaceOfRevolution::ShallowCopy() const +{ + Handle(GeomEvaluator_SurfaceOfRevolution) aCopy; + if (!myBaseAdaptor.IsNull()) + { + aCopy = new GeomEvaluator_SurfaceOfRevolution(myBaseAdaptor->ShallowCopy(), + myRotAxis.Direction(), myRotAxis.Location()); + } + else + { + aCopy = new GeomEvaluator_SurfaceOfRevolution(myBaseCurve, + myRotAxis.Direction(), myRotAxis.Location()); + } + + return aCopy; +} + diff --git a/src/GeomEvaluator/GeomEvaluator_SurfaceOfRevolution.hxx b/src/GeomEvaluator/GeomEvaluator_SurfaceOfRevolution.hxx index 97085349a4..c2858d0e5f 100644 --- a/src/GeomEvaluator/GeomEvaluator_SurfaceOfRevolution.hxx +++ b/src/GeomEvaluator/GeomEvaluator_SurfaceOfRevolution.hxx @@ -71,6 +71,8 @@ public: const Standard_Integer theDerU, const Standard_Integer theDerV) const Standard_OVERRIDE; + Standard_EXPORT Handle(GeomEvaluator_Surface) ShallowCopy() const Standard_OVERRIDE; + DEFINE_STANDARD_RTTIEXT(GeomEvaluator_SurfaceOfRevolution,GeomEvaluator_Surface) private: diff --git a/src/GeomFill/GeomFill_SnglrFunc.cxx b/src/GeomFill/GeomFill_SnglrFunc.cxx index 825758bff5..337f52e50a 100644 --- a/src/GeomFill/GeomFill_SnglrFunc.cxx +++ b/src/GeomFill/GeomFill_SnglrFunc.cxx @@ -29,6 +29,18 @@ GeomFill_SnglrFunc::GeomFill_SnglrFunc(const Handle(Adaptor3d_Curve)& HC) : { } +//======================================================================= +//function : ShallowCopy +//purpose : +//======================================================================= + +Handle(Adaptor3d_Curve) GeomFill_SnglrFunc::ShallowCopy() const +{ + Handle(GeomFill_SnglrFunc) aCopy = new GeomFill_SnglrFunc(myHCurve->ShallowCopy()); + aCopy->ratio = ratio; + return aCopy; +} + void GeomFill_SnglrFunc::SetRatio(const Standard_Real Ratio) { ratio = Ratio; diff --git a/src/GeomFill/GeomFill_SnglrFunc.hxx b/src/GeomFill/GeomFill_SnglrFunc.hxx index 69d9f7df65..8cbfc726e6 100644 --- a/src/GeomFill/GeomFill_SnglrFunc.hxx +++ b/src/GeomFill/GeomFill_SnglrFunc.hxx @@ -44,6 +44,9 @@ public: Standard_EXPORT GeomFill_SnglrFunc(const Handle(Adaptor3d_Curve)& HC); + + //! Shallow copy of adaptor + Standard_EXPORT virtual Handle(Adaptor3d_Curve) ShallowCopy() const Standard_OVERRIDE; Standard_EXPORT void SetRatio (const Standard_Real Ratio); diff --git a/src/ProjLib/ProjLib_CompProjectedCurve.cxx b/src/ProjLib/ProjLib_CompProjectedCurve.cxx index 49c15ece7d..b13f5ac3c6 100644 --- a/src/ProjLib/ProjLib_CompProjectedCurve.cxx +++ b/src/ProjLib/ProjLib_CompProjectedCurve.cxx @@ -631,6 +631,36 @@ ProjLib_CompProjectedCurve::ProjLib_CompProjectedCurve Init(); } +//======================================================================= +//function : ShallowCopy +//purpose : +//======================================================================= + +Handle(Adaptor2d_Curve2d) ProjLib_CompProjectedCurve::ShallowCopy() const +{ + Handle(ProjLib_CompProjectedCurve) aCopy = new ProjLib_CompProjectedCurve(); + + if (!mySurface.IsNull()) + { + aCopy->mySurface = mySurface->ShallowCopy(); + } + if (!myCurve.IsNull()) + { + aCopy->myCurve = myCurve->ShallowCopy(); + } + aCopy->myNbCurves = myNbCurves; + aCopy->mySequence = mySequence; + aCopy->myTolU = myTolU; + aCopy->myTolV = myTolV; + aCopy->myMaxDist = myMaxDist; + aCopy->myUIso = myUIso; + aCopy->myVIso = myVIso; + aCopy->mySnglPnts = mySnglPnts; + aCopy->myMaxDistance = myMaxDistance; + + return aCopy; +} + //======================================================================= //function : Init //purpose : @@ -1274,7 +1304,10 @@ void ProjLib_CompProjectedCurve::D0(const Standard_Real U,gp_Pnt2d& P) const break; } } - if (!found) throw Standard_DomainError("ProjLib_CompProjectedCurve::D0"); + if (!found) + { + throw Standard_DomainError("ProjLib_CompProjectedCurve::D0"); + } Standard_Real U0, V0; diff --git a/src/ProjLib/ProjLib_CompProjectedCurve.hxx b/src/ProjLib/ProjLib_CompProjectedCurve.hxx index d086f7e6d2..0838670521 100644 --- a/src/ProjLib/ProjLib_CompProjectedCurve.hxx +++ b/src/ProjLib/ProjLib_CompProjectedCurve.hxx @@ -45,6 +45,9 @@ public: //! if MaxDist < 0 then algorithm works as above. Standard_EXPORT ProjLib_CompProjectedCurve(const Handle(Adaptor3d_Surface)& S, const Handle(Adaptor3d_Curve)& C, const Standard_Real TolU, const Standard_Real TolV, const Standard_Real MaxDist); + //! Shallow copy of adaptor + Standard_EXPORT virtual Handle(Adaptor2d_Curve2d) ShallowCopy() const Standard_OVERRIDE; + //! computes a set of projected point and determine the //! continuous parts of the projected curves. The points //! corresponding to a projection on the bounds of the surface are diff --git a/src/ProjLib/ProjLib_ProjectOnPlane.cxx b/src/ProjLib/ProjLib_ProjectOnPlane.cxx index 1496e2848d..07d3292333 100644 --- a/src/ProjLib/ProjLib_ProjectOnPlane.cxx +++ b/src/ProjLib/ProjLib_ProjectOnPlane.cxx @@ -446,6 +446,35 @@ myIsApprox (Standard_False) // } } +//======================================================================= +//function : ShallowCopy +//purpose : +//======================================================================= + +Handle(Adaptor3d_Curve) ProjLib_ProjectOnPlane::ShallowCopy() const +{ + Handle(ProjLib_ProjectOnPlane) aCopy = new ProjLib_ProjectOnPlane(); + + if (!myCurve.IsNull()) + { + aCopy->myCurve = myCurve->ShallowCopy(); + } + aCopy->myPlane = myPlane; + aCopy->myDirection = myDirection; + aCopy->myKeepParam = myKeepParam; + aCopy->myFirstPar = myFirstPar; + aCopy->myLastPar = myLastPar; + aCopy->myTolerance = myTolerance; + aCopy->myType = myType; + if (!myResult.IsNull()) + { + aCopy->myResult = Handle(GeomAdaptor_Curve)::DownCast(myResult->ShallowCopy()); + } + aCopy->myIsApprox = myIsApprox; + + return aCopy; +} + //======================================================================= //function : Project //purpose : Returns the projection of a point on a plane diff --git a/src/ProjLib/ProjLib_ProjectOnPlane.hxx b/src/ProjLib/ProjLib_ProjectOnPlane.hxx index a9fb55bc15..1fc5e228dc 100644 --- a/src/ProjLib/ProjLib_ProjectOnPlane.hxx +++ b/src/ProjLib/ProjLib_ProjectOnPlane.hxx @@ -70,6 +70,9 @@ public: //! raises if the direction is parallel to the //! plane . Standard_EXPORT ProjLib_ProjectOnPlane(const gp_Ax3& Pl, const gp_Dir& D); + + //! Shallow copy of adaptor + Standard_EXPORT virtual Handle(Adaptor3d_Curve) ShallowCopy() const Standard_OVERRIDE; //! Sets the Curve and perform the projection. //! if is true, the parametrization diff --git a/src/ProjLib/ProjLib_ProjectedCurve.cxx b/src/ProjLib/ProjLib_ProjectedCurve.cxx index f3617344e8..875caf9e46 100644 --- a/src/ProjLib/ProjLib_ProjectedCurve.cxx +++ b/src/ProjLib/ProjLib_ProjectedCurve.cxx @@ -371,6 +371,33 @@ ProjLib_ProjectedCurve::ProjLib_ProjectedCurve Perform(C); } +//======================================================================= +//function : ShallowCopy +//purpose : +//======================================================================= + +Handle(Adaptor2d_Curve2d) ProjLib_ProjectedCurve::ShallowCopy() const +{ + Handle(ProjLib_ProjectedCurve) aCopy = new ProjLib_ProjectedCurve(); + + aCopy->myTolerance = myTolerance; + if (!mySurface.IsNull()) + { + aCopy->mySurface = mySurface->ShallowCopy(); + } + if (!myCurve.IsNull()) + { + aCopy->myCurve = myCurve->ShallowCopy(); + } + aCopy->myResult = myResult; + aCopy->myDegMin = myDegMin; + aCopy->myDegMax = myDegMax; + aCopy->myMaxSegments = myMaxSegments; + aCopy->myMaxDist = myMaxDist; + aCopy->myBndPnt = myBndPnt; + + return aCopy; +} //======================================================================= //function : Load diff --git a/src/ProjLib/ProjLib_ProjectedCurve.hxx b/src/ProjLib/ProjLib_ProjectedCurve.hxx index 22e447ae53..61587c468a 100644 --- a/src/ProjLib/ProjLib_ProjectedCurve.hxx +++ b/src/ProjLib/ProjLib_ProjectedCurve.hxx @@ -67,6 +67,9 @@ public: //! If projecting uses approximation, 3d tolerance is Tol, default parameters are used, Standard_EXPORT ProjLib_ProjectedCurve(const Handle(Adaptor3d_Surface)& S, const Handle(Adaptor3d_Curve)& C, const Standard_Real Tol); + //! Shallow copy of adaptor + Standard_EXPORT virtual Handle(Adaptor2d_Curve2d) ShallowCopy() const Standard_OVERRIDE; + //! Changes the tolerance used to project //! the curve on the surface Standard_EXPORT void Load (const Standard_Real Tolerance); From 4391df896c9b713caad1cbe06b073272ca465189 Mon Sep 17 00:00:00 2001 From: ifv Date: Fri, 6 Aug 2021 14:49:14 +0300 Subject: [PATCH 037/639] 0026269: Modeling Data - Analytical extrema does not take into account trimmed input data Treatment of trimmed data is added Extrema/Extrema_ExtCC.cxx Test cases added tests/lowalgos/extcc/bug26269_1 tests/lowalgos/extcc/bug26269_2 Test cases are modified according to new behavior of algorithm --- src/Extrema/Extrema_ExtCC.cxx | 170 ++++++++++++++++++++++++------- src/Extrema/Extrema_ExtCC.hxx | 49 ++++++--- tests/lowalgos/extcc/bug26269_1 | 24 +++++ tests/lowalgos/extcc/bug26269_2 | 24 +++++ tests/lowalgos/extcc/bug29712_13 | 19 +++- tests/lowalgos/extcc/bug29712_21 | 19 +++- tests/lowalgos/extcc/bug29712_22 | 21 ++-- tests/lowalgos/extcc/bug29712_24 | 20 +++- tests/lowalgos/extcc/bug29712_25 | 19 +++- tests/lowalgos/extcc/bug29712_29 | 20 +++- tests/lowalgos/extcc/bug29712_3 | 12 ++- tests/lowalgos/extcc/bug29712_32 | 19 +++- tests/lowalgos/extcc/bug29712_37 | 20 +++- tests/lowalgos/extcc/bug29712_5 | 11 +- 14 files changed, 359 insertions(+), 88 deletions(-) create mode 100644 tests/lowalgos/extcc/bug26269_1 create mode 100644 tests/lowalgos/extcc/bug26269_2 diff --git a/src/Extrema/Extrema_ExtCC.cxx b/src/Extrema/Extrema_ExtCC.cxx index fa77b80c79..e3bfe4a60e 100644 --- a/src/Extrema/Extrema_ExtCC.cxx +++ b/src/Extrema/Extrema_ExtCC.cxx @@ -56,7 +56,7 @@ Extrema_ExtCC::Extrema_ExtCC (const Standard_Real TolC1, const Standard_Real TolC2) : myIsFindSingleSolution(Standard_False), myDone (Standard_False), - myIsPar(Standard_False) + myIsParallel(Standard_False) { myC[0] = 0; myC[1] = 0; myInf[0] = myInf[1] = -Precision::Infinite(); @@ -217,7 +217,7 @@ void Extrema_ExtCC::Perform() myDone = Standard_False; mypoints.Clear(); mySqDist.Clear(); - myIsPar = Standard_False; + myIsParallel = Standard_False; GeomAbs_CurveType type1 = myC[0]->GetType(); GeomAbs_CurveType type2 = myC[1]->GetType(); @@ -228,20 +228,20 @@ void Extrema_ExtCC::Perform() U21 = myInf[1]; U22 = mySup[1]; - if (!Precision::IsInfinite(U11)) P1f = Extrema_CurveTool::Value(*myC[0], U11); - if (!Precision::IsInfinite(U12)) P1l = Extrema_CurveTool::Value(*myC[0], U12); - if (!Precision::IsInfinite(U21)) P2f = Extrema_CurveTool::Value(*myC[1], U21); - if (!Precision::IsInfinite(U22)) P2l = Extrema_CurveTool::Value(*myC[1], U22); + if (!Precision::IsInfinite(U11)) myP1f = Extrema_CurveTool::Value(*myC[0], U11); + if (!Precision::IsInfinite(U12)) myP1l = Extrema_CurveTool::Value(*myC[0], U12); + if (!Precision::IsInfinite(U21)) myP2f = Extrema_CurveTool::Value(*myC[1], U21); + if (!Precision::IsInfinite(U22)) myP2l = Extrema_CurveTool::Value(*myC[1], U22); if (Precision::IsInfinite(U11) || Precision::IsInfinite(U21)) mydist11 = RealLast(); - else mydist11 = P1f.SquareDistance(P2f); + else mydist11 = myP1f.SquareDistance(myP2f); if (Precision::IsInfinite(U11) || Precision::IsInfinite(U22)) mydist12 = RealLast(); - else mydist12 = P1f.SquareDistance(P2l); + else mydist12 = myP1f.SquareDistance(myP2l); if (Precision::IsInfinite(U12) || Precision::IsInfinite(U21)) mydist21 = RealLast(); - else mydist21 = P1l.SquareDistance(P2f); + else mydist21 = myP1l.SquareDistance(myP2f); if (Precision::IsInfinite(U12) || Precision::IsInfinite(U22)) mydist22 = RealLast(); - else mydist22 = P1l.SquareDistance(P2l); + else mydist22 = myP1l.SquareDistance(myP2l); //Depending on the types of curves, the algorithm is chosen: //- _ExtElC, when one of the curves is a line and the other is elementary, @@ -329,7 +329,7 @@ Standard_Boolean Extrema_ExtCC::IsParallel() const throw StdFail_NotDone(); } - return myIsPar; + return myIsParallel; } @@ -395,10 +395,10 @@ void Extrema_ExtCC::TrimmedSquareDistances(Standard_Real& dist11, dist12 = mydist12; dist21 = mydist21; dist22 = mydist22; - P11 = P1f; - P12 = P1l; - P21 = P2f; - P22 = P2l; + P11 = myP1f; + P12 = myP1l; + P21 = myP2f; + P22 = myP2l; } //======================================================================= @@ -411,7 +411,7 @@ void Extrema_ExtCC::PrepareParallelResult(const Standard_Real theUt11, const Standard_Real theUt22, const Standard_Real theSqDist) { - if (!myIsPar) + if (!myIsParallel) return; const GeomAbs_CurveType aType1 = Extrema_CurveTool::GetType (*myC[0]); @@ -421,7 +421,7 @@ void Extrema_ExtCC::PrepareParallelResult(const Standard_Real theUt11, { mySqDist.Append(theSqDist); myDone = Standard_True; - myIsPar = Standard_True; + myIsParallel = Standard_True; return; } @@ -446,7 +446,7 @@ void Extrema_ExtCC::PrepareParallelResult(const Standard_Real theUt11, } else { - myIsPar = Standard_False; + myIsParallel = Standard_False; } return; @@ -473,7 +473,7 @@ void Extrema_ExtCC::PrepareParallelResult(const Standard_Real theUt11, // to the 2nd one must intersect the (native) trimmed range of // the 2nd line. - myIsPar = Standard_False; + myIsParallel = Standard_False; const gp_Lin aLin1 = myC[0]->Line(); const gp_Lin aLin2 = myC[1]->Line(); @@ -515,7 +515,7 @@ void Extrema_ExtCC::PrepareParallelResult(const Standard_Real theUt11, { ClearSolutions(); mySqDist.Append(theSqDist); - myIsPar = Standard_True; + myIsParallel = Standard_True; } else if (!aRange2.IsVoid()) { @@ -539,12 +539,59 @@ void Extrema_ExtCC::PrepareParallelResult(const Standard_Real theUt11, mypoints.Append(aP2); mySqDist.Append(theSqDist); } - } + else + { + //Case like this: + + // ************** aLin1 + // o + // o + // *********** aLin2 + // + //Take minimal trimmed distance + Standard_Real aDmin, aDists[4] = {mydist11, mydist12, mydist21, mydist22}; + Extrema_POnCurv aP1, aP2; + aDmin = aDists[0]; + Standard_Integer i, imin = 0; + for (i = 1; i < 4; ++i) + { + if (aDmin > aDists[i]) + { + aDmin = aDists[i]; + imin = i; + } + } + if (imin == 0) + { + aP1.SetValues(myInf[0], myP1f); + aP2.SetValues(myInf[1], myP2f); + } + else if (imin == 1) + { + aP1.SetValues(myInf[0], myP1f); + aP2.SetValues(mySup[1], myP2l); + } + else if (imin == 2) + { + aP1.SetValues(mySup[0], myP1l); + aP2.SetValues(myInf[1], myP2f); + } + else + { + aP1.SetValues(mySup[0], myP1l); + aP2.SetValues(mySup[1], myP2l); + } + ClearSolutions(); + mypoints.Append(aP1); + mypoints.Append(aP2); + mySqDist.Append(aDmin); + } + } } else { // Circle - Circle - myIsPar = Standard_False; + myIsParallel = Standard_False; //Two arcs with ranges [U1, U2] and [V1, V2] correspondingly are //considered to be parallel in the following case: @@ -614,14 +661,14 @@ void Extrema_ExtCC::PrepareParallelResult(const Standard_Real theUt11, //Cases are possible and processed below: //1. Extrema does not exist. In this case all common ranges are VOID. //2. Arcs are parallel and distance between them is equal to sqrt(theSqDist). - // In this case myIsPar = TRUE definitely. + // In this case myIsParallel = TRUE definitely. //3. Arcs are parallel and distance between them is equal to (sqrt(theSqDist) + R), - // where R is the least radius of the both circles. In this case myIsPar flag + // where R is the least radius of the both circles. In this case myIsParallel flag // will temporary be set to TRUE but check will be continued until less // distance will be found. At that, region with the least distance can be - // either a local point or continuous range. In 1st case myIsPar = FALSE and + // either a local point or continuous range. In 1st case myIsParallel = FALSE and // several (or single) extremas will be returned. In the 2nd one - // myIsPar = TRUE and only the least distance will be returned. + // myIsParallel = TRUE and only the least distance will be returned. //4. Arcs are not parallel. Then several (or single) extremas will be returned. if (aRng.Delta() > Precision::Angular()) @@ -639,11 +686,11 @@ void Extrema_ExtCC::PrepareParallelResult(const Standard_Real theUt11, aMinSqD = Min(aMinSqD, ExtPCir.SquareDistance(anExtID)); } - if (aMinSqD <= aMinSquareDist) + if (aMinSqD <= aMinSquareDist + 10.* Epsilon(1. + aMinSqD)) { ClearSolutions(); mySqDist.Append(aMinSqD); - myIsPar = Standard_True; + myIsParallel = Standard_True; const Standard_Real aDeltaSqDist = aMinSqD - theSqDist; const Standard_Real aSqD = Max(aMinSqD, theSqDist); @@ -685,13 +732,13 @@ void Extrema_ExtCC::PrepareParallelResult(const Standard_Real theUt11, Extrema_CurveTool::Circle (*myC[0]), Precision::Confusion(), theUt11, theUt12); - Standard_Boolean isFound = !myIsPar; + Standard_Boolean isFound = !myIsParallel; if (!isFound) { - //If the flag myIsPar was set earlier then it does not mean that + //If the flag myIsParallel was set earlier then it does not mean that //we have found the minimal distance. Here we check it. If there is - //a pair of points, which are in less distance then myIsPar flag + //a pair of points, which are in less distance then myIsParallel flag //was unset and the algorithm will return these nearest points. for (Standard_Integer anExtID = 1; anExtID <= ExtPCir.NbExt(); anExtID++) @@ -707,7 +754,7 @@ void Extrema_ExtCC::PrepareParallelResult(const Standard_Real theUt11, if (isFound) { ClearSolutions(); - myIsPar = Standard_False; + myIsParallel = Standard_False; for (Standard_Integer anExtID = 1; anExtID <= ExtPCir.NbExt(); anExtID++) { mypoints.Append(ExtPCir.Point(anExtID)); @@ -717,7 +764,58 @@ void Extrema_ExtCC::PrepareParallelResult(const Standard_Real theUt11, } } } + else + { + //Case like this: + // ************** Cir1 + // o + // o + // *********** Cir2 + // + //Take minimal trimmed distance + myIsParallel = Standard_False; + Standard_Real aDmin, aDists[4] = { mydist11, mydist12, mydist21, mydist22 }; + Extrema_POnCurv aP1, aP2; + aDmin = aDists[0]; + Standard_Integer k, imin = 0; + for (k = 1; k < 4; ++k) + { + if (aDmin > aDists[k]) + { + aDmin = aDists[k]; + imin = k; + } + } + if (aDmin <= aMinSquareDist + 10.* Epsilon(1. + aDmin)) + { + if (imin == 0) + { + aP1.SetValues(myInf[0], myP1f); + aP2.SetValues(myInf[1], myP2f); + } + else if (imin == 1) + { + aP1.SetValues(myInf[0], myP1f); + aP2.SetValues(mySup[1], myP2l); + } + else if (imin == 2) + { + aP1.SetValues(mySup[0], myP1l); + aP2.SetValues(myInf[1], myP2f); + } + else + { + aP1.SetValues(mySup[0], myP1l); + aP2.SetValues(mySup[1], myP2l); + } + ClearSolutions(); + mypoints.Append(aP1); + mypoints.Append(aP2); + mySqDist.Append(aDmin); + aMinSquareDist = Min(aMinSquareDist, aDmin); + } + } aProjRng1.Shift(M_PI); } } @@ -741,8 +839,8 @@ void Extrema_ExtCC::PrepareResults(const Extrema_ExtElC& AlgExt, myDone = AlgExt.IsDone(); if (myDone) { - myIsPar = AlgExt.IsParallel(); - if (myIsPar) { + myIsParallel = AlgExt.IsParallel(); + if (myIsParallel) { PrepareParallelResult(Ut11, Ut12, Ut21, Ut22, AlgExt.SquareDistance()); } else { @@ -814,8 +912,8 @@ void Extrema_ExtCC::PrepareResults(const Extrema_ECC& AlgExt, myDone = AlgExt.IsDone(); if (myDone) { - myIsPar = AlgExt.IsParallel(); - if (myIsPar) + myIsParallel = AlgExt.IsParallel(); + if (myIsParallel) { PrepareParallelResult(Ut11, Ut12, Ut21, Ut22, AlgExt.SquareDistance()); } diff --git a/src/Extrema/Extrema_ExtCC.hxx b/src/Extrema/Extrema_ExtCC.hxx index f3a41288ff..0a8ff0228a 100644 --- a/src/Extrema/Extrema_ExtCC.hxx +++ b/src/Extrema/Extrema_ExtCC.hxx @@ -46,13 +46,24 @@ public: DEFINE_STANDARD_ALLOC - Standard_EXPORT Extrema_ExtCC(const Standard_Real TolC1 = 1.0e-10, const Standard_Real TolC2 = 1.0e-10); + Standard_EXPORT Extrema_ExtCC(const Standard_Real TolC1 = 1.0e-10, + const Standard_Real TolC2 = 1.0e-10); //! It calculates all the distances. - Standard_EXPORT Extrema_ExtCC(const Adaptor3d_Curve& C1, const Adaptor3d_Curve& C2, const Standard_Real TolC1 = 1.0e-10, const Standard_Real TolC2 = 1.0e-10); + Standard_EXPORT Extrema_ExtCC(const Adaptor3d_Curve& C1, + const Adaptor3d_Curve& C2, + const Standard_Real TolC1 = 1.0e-10, + const Standard_Real TolC2 = 1.0e-10); //! It calculates all the distances. - Standard_EXPORT Extrema_ExtCC(const Adaptor3d_Curve& C1, const Adaptor3d_Curve& C2, const Standard_Real U1, const Standard_Real U2, const Standard_Real V1, const Standard_Real V2, const Standard_Real TolC1 = 1.0e-10, const Standard_Real TolC2 = 1.0e-10); + Standard_EXPORT Extrema_ExtCC(const Adaptor3d_Curve& C1, + const Adaptor3d_Curve& C2, + const Standard_Real U1, + const Standard_Real U2, + const Standard_Real V1, + const Standard_Real V2, + const Standard_Real TolC1 = 1.0e-10, + const Standard_Real TolC2 = 1.0e-10); //! Initializes but does not perform algorithm. Standard_EXPORT void Initialize (const Adaptor3d_Curve& C1, @@ -72,9 +83,14 @@ public: Standard_EXPORT void SetCurve (const Standard_Integer theRank, const Adaptor3d_Curve& C); - Standard_EXPORT void SetCurve (const Standard_Integer theRank, const Adaptor3d_Curve& C, const Standard_Real Uinf, const Standard_Real Usup); + Standard_EXPORT void SetCurve (const Standard_Integer theRank, + const Adaptor3d_Curve& C, + const Standard_Real Uinf, + const Standard_Real Usup); - Standard_EXPORT void SetRange (const Standard_Integer theRank, const Standard_Real Uinf, const Standard_Real Usup); + Standard_EXPORT void SetRange (const Standard_Integer theRank, + const Standard_Real Uinf, + const Standard_Real Usup); Standard_EXPORT void SetTolerance (const Standard_Integer theRank, const Standard_Real Tol); @@ -94,13 +110,22 @@ public: //! Returns the points of the Nth extremum distance. //! P1 is on the first curve, P2 on the second one. - Standard_EXPORT void Points (const Standard_Integer N, Extrema_POnCurv& P1, Extrema_POnCurv& P2) const; + Standard_EXPORT void Points (const Standard_Integer N, + Extrema_POnCurv& P1, + Extrema_POnCurv& P2) const; //! if the curve is a trimmed curve, //! dist11 is a square distance between the point on C1 //! of parameter FirstParameter and the point of //! parameter FirstParameter on C2. - Standard_EXPORT void TrimmedSquareDistances (Standard_Real& dist11, Standard_Real& distP12, Standard_Real& distP21, Standard_Real& distP22, gp_Pnt& P11, gp_Pnt& P12, gp_Pnt& P21, gp_Pnt& P22) const; + Standard_EXPORT void TrimmedSquareDistances (Standard_Real& dist11, + Standard_Real& distP12, + Standard_Real& distP21, + Standard_Real& distP22, + gp_Pnt& P11, + gp_Pnt& P12, + gp_Pnt& P21, + gp_Pnt& P22) const; //! Set flag for single extrema computation. Works on parametric solver only. Standard_EXPORT void SetSingleSolutionFlag (const Standard_Boolean theSingleSolutionFlag); @@ -151,17 +176,17 @@ private: Standard_Boolean myIsFindSingleSolution; // Default value is false. Extrema_ECC myECC; Standard_Boolean myDone; - Standard_Boolean myIsPar; + Standard_Boolean myIsParallel; Extrema_SequenceOfPOnCurv mypoints; TColStd_SequenceOfReal mySqDist; const Adaptor3d_Curve* myC[2]; Standard_Real myInf[2]; Standard_Real mySup[2]; Standard_Real myTol[2]; - gp_Pnt P1f; - gp_Pnt P1l; - gp_Pnt P2f; - gp_Pnt P2l; + gp_Pnt myP1f; + gp_Pnt myP1l; + gp_Pnt myP2f; + gp_Pnt myP2l; Standard_Real mydist11; Standard_Real mydist12; Standard_Real mydist21; diff --git a/tests/lowalgos/extcc/bug26269_1 b/tests/lowalgos/extcc/bug26269_1 new file mode 100644 index 0000000000..a07c5f6c81 --- /dev/null +++ b/tests/lowalgos/extcc/bug26269_1 @@ -0,0 +1,24 @@ +puts "========" +puts "0026269: Modeling Data - Analytical extrema does not take into account trimmed input data" +puts "========" +puts "" + +#case 1 +line l1 0 0 0 1 0 0 +line l2 2 2 0 1 0 0 +trim l1 l1 0 1 +trim l2 l2 0 1 + +set res_extrema [extrema l1 l2] + +if { [regexp "Infinite number of extremas" $res_extrema] == 0} { + if {[llength $res_extrema] != 1} { + puts "Error : expected 1 extrema, but found [llength $res_extrema]" + } +} else { + puts "Error : Infinite number of extremas is found" +} + +smallview +X+Y +fit +checkview -screenshot -2d -path ${imagedir}/${test_image}.png \ No newline at end of file diff --git a/tests/lowalgos/extcc/bug26269_2 b/tests/lowalgos/extcc/bug26269_2 new file mode 100644 index 0000000000..0726fd2dca --- /dev/null +++ b/tests/lowalgos/extcc/bug26269_2 @@ -0,0 +1,24 @@ +puts "========" +puts "0026269: Modeling Data - Analytical extrema does not take into account trimmed input data" +puts "========" +puts "" + +#case 2 +circle c1 0 0 0 10 +circle c2 0 0 0 5 +trim c1 c1 0 1 +trim c2 c2 3 4 + +set res_extrema [extrema c1 c2] + +if { [regexp "Infinite number of extremas" $res_extrema] == 0} { + if {[llength $res_extrema] != 1} { + puts "Error : expected 1 extrema, but found [llength $res_extrema]" + } +} else { + puts "Error : Infinite number of extremas is found" +} + +smallview +X+Y +fit +checkview -screenshot -2d -path ${imagedir}/${test_image}.png diff --git a/tests/lowalgos/extcc/bug29712_13 b/tests/lowalgos/extcc/bug29712_13 index 36dc300487..3e54f3fd65 100644 --- a/tests/lowalgos/extcc/bug29712_13 +++ b/tests/lowalgos/extcc/bug29712_13 @@ -17,8 +17,19 @@ circle c2 0 0 0 0 0 1 50 trim c1 c1 0 3 trim c2 c2 4 6 -regexp {Infinite number of extremas, distance = +([-0-9.+eE]+)} [extrema c1 c2] full aDist1 -checkreal Distance $aDist1 $ExpDist 1.0e-7 0.0 +extrema c1 c2 -regexp {Infinite number of extremas, distance = +([-0-9.+eE]+)} [extrema c2 c1] full aDist2 -checkreal Distance $aDist2 $ExpDist 1.0e-7 0.0 +if { ![isdraw ext_1 ] } { + puts "Error in Extrema-algorithm" +} else { + puts "Extrema-algorithm works properly" +} + +renamevar ext_1 e1 +extrema c2 c1 + +if { ![isdraw ext_1 ] } { + puts "Error in Extrema-algorithm" +} else { + puts "Extrema-algorithm works properly" +} diff --git a/tests/lowalgos/extcc/bug29712_21 b/tests/lowalgos/extcc/bug29712_21 index f2a1b419fe..569a0687c4 100644 --- a/tests/lowalgos/extcc/bug29712_21 +++ b/tests/lowalgos/extcc/bug29712_21 @@ -17,8 +17,19 @@ circle c2 0 0 0 0 0 1 50 trim c1 c1 0 3 trim c2 c2 -3.2 -1.2 -regexp {Infinite number of extremas, distance = +([-0-9.+eE]+)} [extrema c1 c2] full aDist1 -checkreal Distance $aDist1 $ExpDist 1.0e-7 0.0 +extrema c1 c2 -regexp {Infinite number of extremas, distance = +([-0-9.+eE]+)} [extrema c2 c1] full aDist2 -checkreal Distance $aDist2 $ExpDist 1.0e-7 0.0 +if { ![isdraw ext_1 ] } { + puts "Error in Extrema-algorithm" +} else { + puts "Extrema-algorithm works properly" +} + +renamevar ext_1 e1 +extrema c2 c1 + +if { ![isdraw ext_1 ] } { + puts "Error in Extrema-algorithm" +} else { + puts "Extrema-algorithm works properly" +} \ No newline at end of file diff --git a/tests/lowalgos/extcc/bug29712_22 b/tests/lowalgos/extcc/bug29712_22 index 9287c1f237..b9e5d07333 100644 --- a/tests/lowalgos/extcc/bug29712_22 +++ b/tests/lowalgos/extcc/bug29712_22 @@ -10,15 +10,24 @@ puts "" # However, they are bounded (trimmed) curves # and are shifted relatively to each other. -set ExpDist 150.0 - circle c1 0 0 0 0 0 1 100 circle c2 0 0 0 0 0 1 50 trim c1 c1 0 3 trim c2 c2 -3.1 -1.1 -regexp {Infinite number of extremas, distance = +([-0-9.+eE]+)} [extrema c1 c2] full aDist1 -checkreal Distance $aDist1 $ExpDist 1.0e-7 0.0 +extrema c1 c2 + +if { ![isdraw ext_1 ] } { + puts "Error in Extrema-algorithm" +} else { + puts "Extrema-algorithm works properly" +} + +renamevar ext_1 e1 +extrema c2 c1 -regexp {Infinite number of extremas, distance = +([-0-9.+eE]+)} [extrema c2 c1] full aDist2 -checkreal Distance $aDist2 $ExpDist 1.0e-7 0.0 +if { ![isdraw ext_1 ] } { + puts "Error in Extrema-algorithm" +} else { + puts "Extrema-algorithm works properly" +} diff --git a/tests/lowalgos/extcc/bug29712_24 b/tests/lowalgos/extcc/bug29712_24 index 280f73a4ed..7c0e22d63f 100644 --- a/tests/lowalgos/extcc/bug29712_24 +++ b/tests/lowalgos/extcc/bug29712_24 @@ -10,15 +10,25 @@ puts "" # However, they are bounded (trimmed) curves # and are shifted relatively to each other. -set ExpDist 150.0 circle c1 0 0 0 0 0 1 100 circle c2 0 0 0 0 0 1 50 trim c1 c1 0 3 trim c2 c2 -9.5 -7.5 -regexp {Infinite number of extremas, distance = +([-0-9.+eE]+)} [extrema c1 c2] full aDist1 -checkreal Distance $aDist1 $ExpDist 1.0e-7 0.0 +extrema c1 c2 -regexp {Infinite number of extremas, distance = +([-0-9.+eE]+)} [extrema c2 c1] full aDist2 -checkreal Distance $aDist2 $ExpDist 1.0e-7 0.0 +if { ![isdraw ext_1 ] } { + puts "Error in Extrema-algorithm" +} else { + puts "Extrema-algorithm works properly" +} + +renamevar ext_1 e1 +extrema c2 c1 + +if { ![isdraw ext_1 ] } { + puts "Error in Extrema-algorithm" +} else { + puts "Extrema-algorithm works properly" +} diff --git a/tests/lowalgos/extcc/bug29712_25 b/tests/lowalgos/extcc/bug29712_25 index c8bd0973ba..1503119687 100644 --- a/tests/lowalgos/extcc/bug29712_25 +++ b/tests/lowalgos/extcc/bug29712_25 @@ -17,8 +17,19 @@ circle c2 0 0 0 0 0 1 50 trim c1 c1 0 3 trim c2 c2 -8.3 -6.3 -regexp {Infinite number of extremas, distance = +([-0-9.+eE]+)} [extrema c1 c2] full aDist1 -checkreal Distance $aDist1 $ExpDist 1.0e-7 0.0 +extrema c1 c2 -regexp {Infinite number of extremas, distance = +([-0-9.+eE]+)} [extrema c2 c1] full aDist2 -checkreal Distance $aDist2 $ExpDist 1.0e-7 0.0 +if { ![isdraw ext_1 ] } { + puts "Error in Extrema-algorithm" +} else { + puts "Extrema-algorithm works properly" +} + +renamevar ext_1 e1 +extrema c2 c1 + +if { ![isdraw ext_1 ] } { + puts "Error in Extrema-algorithm" +} else { + puts "Extrema-algorithm works properly" +} diff --git a/tests/lowalgos/extcc/bug29712_29 b/tests/lowalgos/extcc/bug29712_29 index 0339082b9b..eeb9d4efa3 100644 --- a/tests/lowalgos/extcc/bug29712_29 +++ b/tests/lowalgos/extcc/bug29712_29 @@ -10,15 +10,25 @@ puts "" # However, they are bounded (trimmed) curves # and are shifted relatively to each other. -set ExpDist 150.0 circle c1 0 0 0 0 0 1 100 circle c2 0 0 0 0 0 1 50 trim c1 c1 0 3 trim c2 c2 3.1 5.1 -regexp {Infinite number of extremas, distance = +([-0-9.+eE]+)} [extrema c1 c2] full aDist1 -checkreal Distance $aDist1 $ExpDist 1.0e-7 0.0 +extrema c1 c2 -regexp {Infinite number of extremas, distance = +([-0-9.+eE]+)} [extrema c2 c1] full aDist2 -checkreal Distance $aDist2 $ExpDist 1.0e-7 0.0 +if { ![isdraw ext_1 ] } { + puts "Error in Extrema-algorithm" +} else { + puts "Extrema-algorithm works properly" +} + +renamevar ext_1 e1 +extrema c2 c1 + +if { ![isdraw ext_1 ] } { + puts "Error in Extrema-algorithm" +} else { + puts "Extrema-algorithm works properly" +} diff --git a/tests/lowalgos/extcc/bug29712_3 b/tests/lowalgos/extcc/bug29712_3 index e5424faea6..e996370645 100644 --- a/tests/lowalgos/extcc/bug29712_3 +++ b/tests/lowalgos/extcc/bug29712_3 @@ -17,9 +17,19 @@ line c2 3 4 0 1 0 0 trim c1 c1 0 1 trim c2 c2 0 1 -if { ![regexp {No solutions!} [extrema c1 c2] ] } { +extrema c1 c2 + +if { ![isdraw ext_1 ] } { puts "Error in Extrema-algorithm" } else { puts "Extrema-algorithm works properly" } +renamevar ext_1 e1 +extrema c2 c1 + +if { ![isdraw ext_1 ] } { + puts "Error in Extrema-algorithm" +} else { + puts "Extrema-algorithm works properly" +} diff --git a/tests/lowalgos/extcc/bug29712_32 b/tests/lowalgos/extcc/bug29712_32 index bd554f5035..53a41faeb9 100644 --- a/tests/lowalgos/extcc/bug29712_32 +++ b/tests/lowalgos/extcc/bug29712_32 @@ -17,8 +17,19 @@ circle c2 0 0 0 0 0 1 50 trim c1 c1 0 pi trim c2 c2 -9.4 -7.4 -regexp {Infinite number of extremas, distance = +([-0-9.+eE]+)} [extrema c1 c2] full aDist1 -checkreal Distance $aDist1 $ExpDist 1.0e-7 0.0 +extrema c1 c2 -regexp {Infinite number of extremas, distance = +([-0-9.+eE]+)} [extrema c2 c1] full aDist2 -checkreal Distance $aDist2 $ExpDist 1.0e-7 0.0 +if { ![isdraw ext_1 ] } { + puts "Error in Extrema-algorithm" +} else { + puts "Extrema-algorithm works properly" +} + +renamevar ext_1 e1 +extrema c2 c1 + +if { ![isdraw ext_1 ] } { + puts "Error in Extrema-algorithm" +} else { + puts "Extrema-algorithm works properly" +} diff --git a/tests/lowalgos/extcc/bug29712_37 b/tests/lowalgos/extcc/bug29712_37 index ab063504aa..f9efb64981 100644 --- a/tests/lowalgos/extcc/bug29712_37 +++ b/tests/lowalgos/extcc/bug29712_37 @@ -18,8 +18,20 @@ circle c2 0 0 0 0 0 1 50 trim c1 c1 3 6.5 trim c2 c2 4 6 -regexp {Infinite number of extremas, distance = +([-0-9.+eE]+)} [extrema c1 c2] full aDist1 -checkreal Distance $aDist1 $ExpDist 1.0e-7 0.0 +extrema c1 c2 + +if { ![isdraw ext_1 ] } { + puts "Error in Extrema-algorithm" +} else { + puts "Extrema-algorithm works properly" +} + +renamevar ext_1 e1 +extrema c2 c1 + +if { ![isdraw ext_1 ] } { + puts "Error in Extrema-algorithm" +} else { + puts "Extrema-algorithm works properly" +} -regexp {Infinite number of extremas, distance = +([-0-9.+eE]+)} [extrema c2 c1] full aDist2 -checkreal Distance $aDist2 $ExpDist 1.0e-7 0.0 diff --git a/tests/lowalgos/extcc/bug29712_5 b/tests/lowalgos/extcc/bug29712_5 index b5794fadc3..c43d75dd96 100644 --- a/tests/lowalgos/extcc/bug29712_5 +++ b/tests/lowalgos/extcc/bug29712_5 @@ -16,14 +16,19 @@ line c2 5 0 0 0 0 1 trim c1 c1 -1.0e100 5 trim c2 c2 10 20 -if { ![regexp {No solutions!} [extrema c1 c2] ] } { +extrema c1 c2 + +if { ![isdraw ext_1 ] } { puts "Error in Extrema-algorithm" } else { puts "Extrema-algorithm works properly" } -if { ![regexp {No solutions!} [extrema c2 c1] ] } { +renamevar ext_1 e1 +extrema c2 c1 + +if { ![isdraw ext_1 ] } { puts "Error in Extrema-algorithm" } else { puts "Extrema-algorithm works properly" -} +} \ No newline at end of file From f26ee38f2a309ffbf7de4eebbcef2c5a5c57d84e Mon Sep 17 00:00:00 2001 From: asuraven Date: Wed, 18 Aug 2021 16:54:40 +0300 Subject: [PATCH 038/639] 0029792: Add ::IsParallel method to GeomAPI_Extrema* classes Add IsParallel() methods for classes: - GeomAPI_ExtremaCurveCurve - GeomAPI_ExtremaCurveSurface - GeomAPI_ExtremaSurfaceSurface --- src/Extrema/Extrema_ExtSS.hxx | 2 +- src/GeomAPI/GeomAPI_ExtremaCurveCurve.hxx | 6 ++++++ src/GeomAPI/GeomAPI_ExtremaCurveSurface.hxx | 6 ++++++ src/GeomAPI/GeomAPI_ExtremaSurfaceSurface.hxx | 6 ++++++ 4 files changed, 19 insertions(+), 1 deletion(-) diff --git a/src/Extrema/Extrema_ExtSS.hxx b/src/Extrema/Extrema_ExtSS.hxx index 64956956c7..da4785d671 100644 --- a/src/Extrema/Extrema_ExtSS.hxx +++ b/src/Extrema/Extrema_ExtSS.hxx @@ -63,7 +63,7 @@ public: //! Returns True if the distances are found. Standard_EXPORT Standard_Boolean IsDone() const; - //! Returns True if the curve is on a parallel surface. + //! Returns True if the surfaces are parallel Standard_EXPORT Standard_Boolean IsParallel() const; //! Returns the number of extremum distances. diff --git a/src/GeomAPI/GeomAPI_ExtremaCurveCurve.hxx b/src/GeomAPI/GeomAPI_ExtremaCurveCurve.hxx index 9aa545c0f9..20c3d6d601 100644 --- a/src/GeomAPI/GeomAPI_ExtremaCurveCurve.hxx +++ b/src/GeomAPI/GeomAPI_ExtremaCurveCurve.hxx @@ -125,6 +125,12 @@ Standard_EXPORT operator Standard_Integer() const; //! 1,NbExtrema ], where NbExtrema is the //! number of extrema computed by this algorithm. Standard_EXPORT Standard_Real Distance (const Standard_Integer Index) const; + + //! Returns True if the two curves are parallel. + Standard_Boolean IsParallel() const + { + return myExtCC.IsParallel(); + } //! Returns the points P1 on the first curve and P2 on //! the second curve, which are the ends of the shortest diff --git a/src/GeomAPI/GeomAPI_ExtremaCurveSurface.hxx b/src/GeomAPI/GeomAPI_ExtremaCurveSurface.hxx index 6e08b14d75..8841367ee7 100644 --- a/src/GeomAPI/GeomAPI_ExtremaCurveSurface.hxx +++ b/src/GeomAPI/GeomAPI_ExtremaCurveSurface.hxx @@ -127,6 +127,12 @@ Standard_EXPORT operator Standard_Integer() const; //! 1,NbExtrema ], where NbExtrema is the //! number of extrema computed by this algorithm. Standard_EXPORT Standard_Real Distance (const Standard_Integer Index) const; + + //! Returns True if the curve is on a parallel surface. + Standard_Boolean IsParallel() const + { + return myExtCS.IsParallel(); + } //! Returns the points PC on the curve and PS on the //! surface, which are the ends of the shortest extremum computed by this algorithm. diff --git a/src/GeomAPI/GeomAPI_ExtremaSurfaceSurface.hxx b/src/GeomAPI/GeomAPI_ExtremaSurfaceSurface.hxx index 894dc85f9e..86e9f90af0 100644 --- a/src/GeomAPI/GeomAPI_ExtremaSurfaceSurface.hxx +++ b/src/GeomAPI/GeomAPI_ExtremaSurfaceSurface.hxx @@ -128,6 +128,12 @@ Standard_EXPORT operator Standard_Integer() const; //! 1,NbExtrema ], where NbExtrema is the //! number of extrema computed by this algorithm. Standard_EXPORT Standard_Real Distance (const Standard_Integer Index) const; + + //! Returns True if the surfaces are parallel + Standard_Boolean IsParallel() const + { + return myExtSS.IsParallel(); + } //! Returns the points P1 on the first surface and P2 on //! the second surface, which are the ends of the From a1ae05e173dcc09d5e193d73164662c81bd2fbfa Mon Sep 17 00:00:00 2001 From: msv Date: Fri, 3 Sep 2021 16:11:35 +0300 Subject: [PATCH 039/639] 0018170: Modeling Data - crash in TopExp_Explorer::Init if Clear was called after empty constructor TopExp_Explorer::Clear() now sets myTop=-1 with align to TopExp_Explorer::Init() logic. --- src/TopExp/TopExp_Explorer.cxx | 95 ++++++++++++++++++---------------- src/TopExp/TopExp_Explorer.hxx | 31 +++-------- 2 files changed, 57 insertions(+), 69 deletions(-) diff --git a/src/TopExp/TopExp_Explorer.cxx b/src/TopExp/TopExp_Explorer.cxx index 569f5f21b1..d87dd372ed 100644 --- a/src/TopExp/TopExp_Explorer.cxx +++ b/src/TopExp/TopExp_Explorer.cxx @@ -33,49 +33,49 @@ static const Standard_Integer theStackSize = 20; //======================================================================= //function : TopExp_Explorer -//purpose : +//purpose : //======================================================================= - -TopExp_Explorer::TopExp_Explorer() : - myStack(0L),myTop(-1),hasMore(Standard_False) +TopExp_Explorer::TopExp_Explorer() +: myStack (0L), + myTop (-1), + mySizeOfStack (theStackSize), + toFind (TopAbs_SHAPE), + toAvoid (TopAbs_SHAPE), + hasMore (Standard_False) { myStack = (TopoDS_Iterator*)Standard::Allocate(theStackSize*sizeof(TopoDS_Iterator)); - mySizeOfStack = theStackSize; } - //======================================================================= //function : TopExp_Explorer -//purpose : +//purpose : //======================================================================= - -TopExp_Explorer::TopExp_Explorer(const TopoDS_Shape& S, - const TopAbs_ShapeEnum ToFind, - const TopAbs_ShapeEnum ToAvoid): - myStack(0L),myTop(-1),hasMore(Standard_False) - +TopExp_Explorer::TopExp_Explorer (const TopoDS_Shape& theS, + const TopAbs_ShapeEnum theToFind, + const TopAbs_ShapeEnum theToAvoid) +: myStack (0L), + myTop (-1), + mySizeOfStack (theStackSize), + toFind (theToFind), + toAvoid (theToAvoid), + hasMore (Standard_False) { myStack = (TopoDS_Iterator*)Standard::Allocate(theStackSize*sizeof(TopoDS_Iterator)); - mySizeOfStack = theStackSize; - Init(S,ToFind,ToAvoid); + + Init (theS, theToFind, theToAvoid); } //======================================================================= //function : Init -//purpose : +//purpose : //======================================================================= - void TopExp_Explorer::Init(const TopoDS_Shape& S, const TopAbs_ShapeEnum ToFind, const TopAbs_ShapeEnum ToAvoid) { - if(myTop >=0) { - for(int i=0;i<= myTop; i++) - myStack[i].~TopoDS_Iterator(); - } - - myTop = -1; + Clear(); + myShape = S; toFind = ToFind; toAvoid = ToAvoid; @@ -131,18 +131,11 @@ const TopoDS_Shape& TopExp_Explorer::Current()const return myShape; } - //======================================================================= //function : Next -//purpose : +//purpose : //======================================================================= - -#ifdef _MSC_VER -#pragma warning(push) -#pragma warning(disable: 4291) // to avoid warning when using new(buffer) syntax -#endif - -void TopExp_Explorer::Next() +void TopExp_Explorer::Next() { Standard_Integer NewSize; TopoDS_Shape ShapTop; @@ -219,28 +212,40 @@ void TopExp_Explorer::Next() hasMore = Standard_False; } -#ifdef _MSC_VER -#pragma warning(pop) -#endif - //======================================================================= //function : ReInit -//purpose : +//purpose : //======================================================================= - -void TopExp_Explorer::ReInit() +void TopExp_Explorer::ReInit() { Init(myShape,toFind,toAvoid); } -void TopExp_Explorer::Destroy() +//======================================================================= +//function : ~TopExp_Explorer +//purpose : +//======================================================================= +TopExp_Explorer::~TopExp_Explorer() { - if (myStack) - { - for(int i=0;i<= myTop; i++)myStack[i].~TopoDS_Iterator(); - Standard::Free(myStack); - } + Clear(); + if (myStack) + { + Standard::Free(myStack); + } mySizeOfStack = 0; myStack = 0L; } +//======================================================================= +//function : Clear +//purpose : +//======================================================================= +void TopExp_Explorer::Clear() +{ + hasMore = Standard_False; + for (int i = 0; i <= myTop; ++i) + { + myStack[i].~TopoDS_Iterator(); + } + myTop = -1; +} diff --git a/src/TopExp/TopExp_Explorer.hxx b/src/TopExp/TopExp_Explorer.hxx index a49d3f15e7..bbdaba0d2e 100644 --- a/src/TopExp/TopExp_Explorer.hxx +++ b/src/TopExp/TopExp_Explorer.hxx @@ -18,6 +18,7 @@ #define _TopExp_Explorer_HeaderFile #include +#include #include //! An Explorer is a Tool to visit a Topological Data @@ -136,39 +137,21 @@ public: //! Clears the content of the explorer. It will return //! False on More(). - void Clear(); - - Standard_EXPORT void Destroy(); -~TopExp_Explorer() -{ - Destroy(); -} + Standard_EXPORT void Clear(); + + //! Destructor. + Standard_EXPORT ~TopExp_Explorer(); private: TopExp_Stack myStack; + TopoDS_Shape myShape; Standard_Integer myTop; Standard_Integer mySizeOfStack; - TopoDS_Shape myShape; - Standard_Boolean hasMore; TopAbs_ShapeEnum toFind; TopAbs_ShapeEnum toAvoid; + Standard_Boolean hasMore; }; -#include - -inline void TopExp_Explorer::Clear() -{ - hasMore = Standard_False; - if (myTop > 0) - { - for (int i = 1; i <= myTop; i++) - { - myStack[i].~TopoDS_Iterator(); - } - } - myTop = 0; -} - #endif // _TopExp_Explorer_HeaderFile From 41e2eed0fc1c6d9ed1f005174b5f0f874566b349 Mon Sep 17 00:00:00 2001 From: abulyche Date: Wed, 1 Sep 2021 17:45:52 +0300 Subject: [PATCH 040/639] 0030722: Modeling Algorithms - BRepExtrema_DistShapeShape computes wrong distances Updated the math_DirectPolynomialRoots.cxx Added the test case "bug30722" Updated the command "b2dclassify" in the BOPTest_LowCommands.cxx --- src/BOPTest/BOPTest_LowCommands.cxx | 14 +++++++++----- src/math/math_DirectPolynomialRoots.cxx | 16 +++++++--------- tests/bugs/modalg_7/bug30722 | 16 ++++++++++++++++ 3 files changed, 32 insertions(+), 14 deletions(-) create mode 100644 tests/bugs/modalg_7/bug30722 diff --git a/src/BOPTest/BOPTest_LowCommands.cxx b/src/BOPTest/BOPTest_LowCommands.cxx index 4f032f001f..c7bdd09b1f 100644 --- a/src/BOPTest/BOPTest_LowCommands.cxx +++ b/src/BOPTest/BOPTest_LowCommands.cxx @@ -68,7 +68,11 @@ static Standard_Integer bhaspc (Draw_Interpretor& , Standard_Integer , con const char* g = "BOPTest commands"; theCommands.Add("bclassify" , "use bclassify Solid Point [Tolerance=1.e-7]", __FILE__, bclassify , g); - theCommands.Add("b2dclassify" , "use b2dclassify Face Point2d [Tol] ", + theCommands.Add("b2dclassify" , "use b2dclassify Face Point2d [Tol] [UseBox] [GapCheckTol]\n" + "Classify the Point Point2d with Tolerance on the face described by .\n" + " == 1/0 (default = 0): switch on/off the use Bnd_Box in the classification.\n" + " (default = 0.1): this is for additional verification of\n" + "the vertex with a tolerance >= .", __FILE__, b2dclassify , g); theCommands.Add("b2dclassifx" , "use b2dclassifx Face Point2d [Tol] ", __FILE__, b2dclassifx , g); @@ -77,7 +81,7 @@ static Standard_Integer bhaspc (Draw_Interpretor& , Standard_Integer , con } -// +//lj cd //======================================================================= //function : b2dclassifx //purpose : @@ -142,10 +146,10 @@ Standard_Integer b2dclassify (Draw_Interpretor& theDI, // DrawTrSurf::GetPoint2d (theArgVec[2], aP); const TopoDS_Face& aF = TopoDS::Face(aS); - const Standard_Real aTol = (theArgNb == 4) ? + const Standard_Real aTol = (theArgNb >= 4) ? Draw::Atof (theArgVec[3]) : BRep_Tool::Tolerance (aF); - const Standard_Boolean anUseBox = (theArgNb == 5 && Draw::Atof(theArgVec[4]) == 0) ? - Standard_False : Standard_True; + const Standard_Boolean anUseBox = (theArgNb >= 5 && Draw::Atof(theArgVec[4]) == 1) ? + Standard_True : Standard_False; const Standard_Real aGapCheckTol = (theArgNb == 6) ? Draw::Atof(theArgVec[5]) : 0.1; BRepClass_FaceClassifier aClassifier; aClassifier.Perform(aF, aP, aTol, anUseBox, aGapCheckTol); diff --git a/src/math/math_DirectPolynomialRoots.cxx b/src/math/math_DirectPolynomialRoots.cxx index 50932dc68c..17ef931f0e 100644 --- a/src/math/math_DirectPolynomialRoots.cxx +++ b/src/math/math_DirectPolynomialRoots.cxx @@ -263,21 +263,19 @@ void math_DirectPolynomialRoots::Solve(const Standard_Real a, Q = Ydemi + SdiscrQ0; P1 = Ademi - P0; Q1 = Ydemi - SdiscrQ0; -// Modified by skv - Wed Apr 14 16:05:24 2004 IDEM(Airbus) Begin - Standard_Real eps; + // + Standard_Real anEps = 100 * EPSILON; - eps = Epsilon(100.*Max(Ademi, P0)); - if (Abs(P) <= eps) + if (Abs(P) <= anEps) P = 0.; - if (Abs(P1) <= eps) + if (Abs(P1) <= anEps) P1 = 0.; - eps = Epsilon(100.*Max(Ydemi, SdiscrQ0)); - if (Abs(Q) <= eps) + if (Abs(Q) <= anEps) Q = 0.; - if (Abs(Q1) <= eps) + if (Abs(Q1) <= anEps) Q1 = 0.; -// Modified by skv - Wed Apr 14 16:05:24 2004 IDEM(Airbus) End + // Ademi = 1.0; math_DirectPolynomialRoots ASol2(Ademi, P, Q); diff --git a/tests/bugs/modalg_7/bug30722 b/tests/bugs/modalg_7/bug30722 new file mode 100644 index 0000000000..f768d5d305 --- /dev/null +++ b/tests/bugs/modalg_7/bug30722 @@ -0,0 +1,16 @@ +puts "=================================================================" +puts "OCC30722: Modeling Algorithms - BRepExtrema_DistShapeShape computes wrong distances" +puts "=================================================================" +puts "" + +restore [locate_data_file bug30722_1.brep] w +restore [locate_data_file bug30722_2.brep] e + +explode w +mkcurve c1 w_1 +mkcurve c2 e +extrema c1 c2 + +if { [isdraw ext_1] == 0 } { +puts "Error: no solutions!" +} \ No newline at end of file From 5e7632824302761b84cfceb5bfb2241d906d0eb4 Mon Sep 17 00:00:00 2001 From: kgv Date: Mon, 6 Sep 2021 10:36:38 +0300 Subject: [PATCH 041/639] 0032328: Missing include of TopoDS_Edge.hxx in ShapeUpgrade_UnifySameDomain.hxx --- .../ShapeUpgrade_UnifySameDomain.cxx | 26 +++++++++++-------- .../ShapeUpgrade_UnifySameDomain.hxx | 21 ++++++++++----- 2 files changed, 29 insertions(+), 18 deletions(-) diff --git a/src/ShapeUpgrade/ShapeUpgrade_UnifySameDomain.cxx b/src/ShapeUpgrade/ShapeUpgrade_UnifySameDomain.cxx index 8e7b86df24..458d79b2aa 100644 --- a/src/ShapeUpgrade/ShapeUpgrade_UnifySameDomain.cxx +++ b/src/ShapeUpgrade/ShapeUpgrade_UnifySameDomain.cxx @@ -13,6 +13,7 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. +#include #include #include @@ -61,7 +62,6 @@ #include #include #include -#include #include #include #include @@ -2235,17 +2235,21 @@ static Standard_Boolean GetLineEdgePoints(const TopoDS_Edge& theInpEdge, gp_Pnt& return Standard_True; } +struct ShapeUpgrade_UnifySameDomain::SubSequenceOfEdges +{ + TopTools_SequenceOfShape SeqsEdges; + TopoDS_Edge UnionEdges; +}; + //======================================================================= -//function : GenerateSubSeq -//purpose : Generates sub-sequences of edges from sequence of edges -//Edges from each subsequences can be merged into the one edge +//function : generateSubSeq +//purpose : //======================================================================= - -static void GenerateSubSeq (const TopTools_SequenceOfShape& anInpEdgeSeq, - NCollection_Sequence& SeqOfSubSeqOfEdges, - Standard_Boolean IsClosed, double theAngTol, double theLinTol, - const TopTools_MapOfShape& AvoidEdgeVrt, - const TopTools_IndexedDataMapOfShapeListOfShape& theVFmap) +void ShapeUpgrade_UnifySameDomain::generateSubSeq (const TopTools_SequenceOfShape& anInpEdgeSeq, + NCollection_Sequence& SeqOfSubSeqOfEdges, + Standard_Boolean IsClosed, double theAngTol, double theLinTol, + const TopTools_MapOfShape& AvoidEdgeVrt, + const TopTools_IndexedDataMapOfShapeListOfShape& theVFmap) { Standard_Boolean isOk = Standard_False; TopoDS_Edge edge1, edge2; @@ -2377,7 +2381,7 @@ Standard_Boolean ShapeUpgrade_UnifySameDomain::MergeEdges(TopTools_SequenceOfSha // split chain by vertices at which merging is not possible NCollection_Sequence aOneSeq; - GenerateSubSeq(aChain, aOneSeq, IsClosed, myAngTol, myLinTol, VerticesToAvoid, theVFmap); + generateSubSeq(aChain, aOneSeq, IsClosed, myAngTol, myLinTol, VerticesToAvoid, theVFmap); // put sub-chains in the result SeqOfSubSeqOfEdges.Append(aOneSeq); diff --git a/src/ShapeUpgrade/ShapeUpgrade_UnifySameDomain.hxx b/src/ShapeUpgrade/ShapeUpgrade_UnifySameDomain.hxx index b1558d111f..cb2f6b7d12 100644 --- a/src/ShapeUpgrade/ShapeUpgrade_UnifySameDomain.hxx +++ b/src/ShapeUpgrade/ShapeUpgrade_UnifySameDomain.hxx @@ -65,13 +65,6 @@ DEFINE_STANDARD_HANDLE(ShapeUpgrade_UnifySameDomain, Standard_Transient) //! The algorithm provides a place holder for the history and collects the //! history by default. //! To avoid collecting of the history the place holder should be set to null handle. - -struct SubSequenceOfEdges -{ - TopTools_SequenceOfShape SeqsEdges; - TopoDS_Edge UnionEdges; -}; - class ShapeUpgrade_UnifySameDomain : public Standard_Transient { @@ -161,6 +154,10 @@ public: DEFINE_STANDARD_RTTIEXT(ShapeUpgrade_UnifySameDomain,Standard_Transient) +protected: + + struct SubSequenceOfEdges; + protected: //! This method makes if possible a common face from each @@ -198,6 +195,16 @@ protected: //! Fills the history of the modifications during the operation. Standard_EXPORT void FillHistory(); +private: + + //! Generates sub-sequences of edges from sequence of edges. + //! Edges from each subsequences can be merged into the one edge. + static void generateSubSeq (const TopTools_SequenceOfShape& anInpEdgeSeq, + NCollection_Sequence& SeqOfSubSeqOfEdges, + Standard_Boolean IsClosed, double theAngTol, double theLinTol, + const TopTools_MapOfShape& AvoidEdgeVrt, + const TopTools_IndexedDataMapOfShapeListOfShape& theVFmap); + private: TopoDS_Shape myInitShape; From 8ab0b859df698e1cc94588c22b59168e18e35d16 Mon Sep 17 00:00:00 2001 From: akaftasev Date: Tue, 7 Sep 2021 18:03:20 +0300 Subject: [PATCH 042/639] 0030788: Modeling Algorithms - BRepAlgoAPI_Defeaturing does not propagate progress indicator to underlying algorithms Added progress indicator to BRepAlgoAPI_Defeaturing --- src/BOPAlgo/BOPAlgo_RemoveFeatures.cxx | 189 ++++++++++++++---- src/BOPAlgo/BOPAlgo_RemoveFeatures.hxx | 14 +- .../BOPTest_RemoveFeaturesCommands.cxx | 5 +- src/BRepAlgoAPI/BRepAlgoAPI_Defeaturing.cxx | 4 +- tests/bugs/modalg_7/bug30788 | 22 ++ 5 files changed, 191 insertions(+), 43 deletions(-) create mode 100644 tests/bugs/modalg_7/bug30788 diff --git a/src/BOPAlgo/BOPAlgo_RemoveFeatures.cxx b/src/BOPAlgo/BOPAlgo_RemoveFeatures.cxx index 7616e1d841..12b972b3a1 100644 --- a/src/BOPAlgo/BOPAlgo_RemoveFeatures.cxx +++ b/src/BOPAlgo/BOPAlgo_RemoveFeatures.cxx @@ -119,12 +119,41 @@ static void FindSolid(const TopoDS_Shape& theSolIn, BOPAlgo_Builder& theBuilder, TopoDS_Shape& theSolOut); +namespace +{ + //======================================================================= + //function : BOPAlgo_PIOperation + //purpose : List of operations to be supported by the Progress Indicator + //======================================================================= + enum BOPAlgo_PIOperation + { + PIOperation_PrepareFeatures = 0, + PIOperation_RemoveFeatures, + PIOperation_UpdateHistory, + PIOperation_SimplifyResult, + + PIOperation_Last + }; +} + +//======================================================================= +// function: fillPISteps +// purpose: +//======================================================================= +void BOPAlgo_RemoveFeatures::fillPIConstants (const Standard_Real theWhole, + BOPAlgo_PISteps& theSteps) const +{ + theSteps.SetStep(PIOperation_PrepareFeatures, 0.05 * theWhole); + theSteps.SetStep(PIOperation_RemoveFeatures, 0.8 * theWhole); + theSteps.SetStep(PIOperation_UpdateHistory, 0.05 * theWhole); + theSteps.SetStep(PIOperation_SimplifyResult, 0.1 * theWhole); +} //======================================================================= // function: Perform // purpose: Performs the removal of the requested faces from the input shape //======================================================================= -void BOPAlgo_RemoveFeatures::Perform(const Message_ProgressRange& /*theRange*/) +void BOPAlgo_RemoveFeatures::Perform(const Message_ProgressRange& theRange) { try { @@ -137,21 +166,36 @@ void BOPAlgo_RemoveFeatures::Perform(const Message_ProgressRange& /*theRange*/) CheckData(); if (HasErrors()) return; + Message_ProgressScope aPS(theRange, "Removing features", 100); + BOPAlgo_PISteps aSteps(PIOperation_Last); + analyzeProgress(100., aSteps); // Prepare the faces to remove. - PrepareFeatures(); + PrepareFeatures(aPS.Next(aSteps.GetStep(PIOperation_PrepareFeatures))); if (HasErrors()) + { return; + } // Remove the features and fill the created gaps - RemoveFeatures(); + RemoveFeatures(aPS.Next(aSteps.GetStep(PIOperation_RemoveFeatures))); + if (HasErrors()) + { + return; + } // Update history with the removed features - UpdateHistory(); - + UpdateHistory(aPS.Next(aSteps.GetStep(PIOperation_UpdateHistory))); + if (HasErrors()) + { + return; + } // Simplify the result - SimplifyResult(); - + SimplifyResult(aPS.Next(aSteps.GetStep(PIOperation_SimplifyResult))); + if (HasErrors()) + { + return; + } // Post treatment PostTreat(); } @@ -243,7 +287,7 @@ void BOPAlgo_RemoveFeatures::CheckData() // function: PrepareFeatures // purpose: Prepares the features to remove //======================================================================= -void BOPAlgo_RemoveFeatures::PrepareFeatures() +void BOPAlgo_RemoveFeatures::PrepareFeatures(const Message_ProgressRange& theRange) { // Map all sub-shapes of the input solids TopExp::MapShapes(myInputShape, myInputsMap); @@ -251,12 +295,18 @@ void BOPAlgo_RemoveFeatures::PrepareFeatures() // Collect all faces of the input shape requested for removal TopTools_ListOfShape aFacesToRemove; TopTools_ListIteratorOfListOfShape aIt(myFacesToRemove); - for (; aIt.More(); aIt.Next()) + Message_ProgressScope aPSOuter(theRange, "Preparing features", 2); + Message_ProgressScope aPS(aPSOuter.Next(), "Preparing the faces to remove", myFacesToRemove.Size()); + for (; aIt.More(); aIt.Next(),aPS.Next()) { const TopoDS_Shape& aS = aIt.Value(); TopExp_Explorer anExpF(aS, TopAbs_FACE); for (; anExpF.More(); anExpF.Next()) { + if (UserBreak(aPS)) + { + return; + } const TopoDS_Shape& aF = anExpF.Current(); if (myInputsMap.Contains(aF)) aFacesToRemove.Append(aF); @@ -327,6 +377,11 @@ class FillGap return myHistory; } + void SetRange(const Message_ProgressRange& theRange) + { + myRange = theRange; + } + public: //! @name Perform the operation //! Performs the extension of the adjacent faces and @@ -337,11 +392,17 @@ class FillGap try { + Message_ProgressScope aPS(myRange, NULL, 3); + myHistory = new BRepTools_History(); // Find the faces adjacent to the faces of the feature TopTools_IndexedMapOfShape aMFAdjacent; - FindAdjacentFaces(aMFAdjacent); + FindAdjacentFaces(aMFAdjacent, aPS.Next()); + if (!aPS.More()) + { + return; + } myHasAdjacentFaces = (aMFAdjacent.Extent() > 0); if (!myHasAdjacentFaces) @@ -349,10 +410,14 @@ class FillGap // Extend the adjacent faces keeping the connection to the original faces TopTools_IndexedDataMapOfShapeShape aFaceExtFaceMap; - ExtendAdjacentFaces(aMFAdjacent, aFaceExtFaceMap); + ExtendAdjacentFaces(aMFAdjacent, aFaceExtFaceMap, aPS.Next()); + if (!aPS.More()) + { + return; + } // Trim the extended faces - TrimExtendedFaces(aFaceExtFaceMap); + TrimExtendedFaces(aFaceExtFaceMap, aPS.Next()); } catch (Standard_Failure const&) { @@ -380,17 +445,22 @@ class FillGap private: //! @name Private methods performing the operation //! Finds the faces adjacent to the feature and stores them into outgoing map. - void FindAdjacentFaces(TopTools_IndexedMapOfShape& theMFAdjacent) + void FindAdjacentFaces(TopTools_IndexedMapOfShape& theMFAdjacent, const Message_ProgressRange& theRange) { // Map the faces of the feature to avoid them in the map of adjacent faces TopoDS_Iterator aIt(myFeature); for (; aIt.More(); aIt.Next()) myFeatureFacesMap.Add(aIt.Value()); - + Message_ProgressScope aPSOuter(theRange, NULL, 2); // Find faces adjacent to the feature using the connection map aIt.Initialize(myFeature); - for (; aIt.More(); aIt.Next()) + Message_ProgressScope aPSF(aPSOuter.Next(), "Looking for adjacent faces", 1, Standard_True); + for (; aIt.More(); aIt.Next(), aPSF.Next()) { + if (!aPSF.More()) + { + return; + } const TopoDS_Shape& aF = aIt.Value(); TopExp_Explorer anExpE(aF, TopAbs_EDGE); for (; anExpE.More(); anExpE.Next()) @@ -420,8 +490,13 @@ class FillGap // Find solids containing the edges of adjacent faces const Standard_Integer aNbFA = theMFAdjacent.Extent(); - for (Standard_Integer i = 1; i <= aNbFA; ++i) + Message_ProgressScope aPSS(aPSOuter.Next(), "Looking for adjacent solids", aNbFA); + for (Standard_Integer i = 1; i <= aNbFA; ++i, aPSS.Next()) { + if (!aPSS.More()) + { + return; + } TopExp_Explorer anExpEA(theMFAdjacent(i), TopAbs_EDGE); for (; anExpEA.More(); anExpEA.Next()) { @@ -448,7 +523,8 @@ class FillGap //! Extends the found adjacent faces and binds them to the original faces. void ExtendAdjacentFaces(const TopTools_IndexedMapOfShape& theMFAdjacent, - TopTools_IndexedDataMapOfShapeShape& theFaceExtFaceMap) + TopTools_IndexedDataMapOfShapeShape& theFaceExtFaceMap, + const Message_ProgressRange& theRange) { // Get the extension value for the faces - half of the diagonal of bounding box of the feature Bnd_Box aFeatureBox; @@ -457,7 +533,8 @@ class FillGap const Standard_Real anExtLength = sqrt(aFeatureBox.SquareExtent()); const Standard_Integer aNbFA = theMFAdjacent.Extent(); - for (Standard_Integer i = 1; i <= aNbFA; ++i) + Message_ProgressScope aPS(theRange, "Extending adjacent faces", aNbFA); + for (Standard_Integer i = 1; i <= aNbFA && aPS.More(); ++i, aPS.Next()) { const TopoDS_Face& aF = TopoDS::Face(theMFAdjacent(i)); // Extend the face @@ -473,7 +550,8 @@ class FillGap //! Trims the extended adjacent faces by intersection with each other //! and following intersection with the bounds of original faces. - void TrimExtendedFaces(const TopTools_IndexedDataMapOfShapeShape& theFaceExtFaceMap) + void TrimExtendedFaces(const TopTools_IndexedDataMapOfShapeShape& theFaceExtFaceMap, + const Message_ProgressRange& theRange) { // Intersect the extended faces first BOPAlgo_Builder aGFInter; @@ -486,9 +564,10 @@ class FillGap // Intersection result TopoDS_Shape anIntResult; + Message_ProgressScope aPSOuter(theRange, NULL, (aGFInter.Arguments().Extent() > 1) ? 2 : 1); if (aGFInter.Arguments().Extent() > 1) { - aGFInter.Perform(); + aGFInter.Perform(aPSOuter.Next()); if (aGFInter.HasErrors()) return; @@ -511,7 +590,8 @@ class FillGap TopTools_IndexedMapOfShape aFeatureEdgesMap; TopExp::MapShapes(myFeature, TopAbs_EDGE, aFeatureEdgesMap); - for (Standard_Integer i = 1; i <= aNbF; ++i) + Message_ProgressScope aPS(aPSOuter.Next(), "Trimming faces", aNbF); + for (Standard_Integer i = 1; i <= aNbF && aPS.More(); ++i, aPS.Next()) { const TopoDS_Face& aFOriginal = TopoDS::Face(theFaceExtFaceMap.FindKey(i)); const TopoDS_Face& aFExt = TopoDS::Face(theFaceExtFaceMap(i)); @@ -705,6 +785,7 @@ class FillGap TopoDS_Shape myFeature; //!< Feature to remove TopTools_IndexedDataMapOfShapeListOfShape* myEFMap; //!< EF Connection map to find adjacent faces TopTools_IndexedDataMapOfShapeListOfShape* myFSMap; //!< FS Connection map to find solids participating in the feature removal + Message_ProgressRange myRange; //!< Indication of progress // Results TopTools_MapOfShape myFeatureFacesMap; //!< Faces of the feature @@ -721,7 +802,7 @@ typedef NCollection_Vector VectorOfFillGap; // purpose: Remove features by filling the gaps by extension of the // adjacent faces //======================================================================= -void BOPAlgo_RemoveFeatures::RemoveFeatures() +void BOPAlgo_RemoveFeatures::RemoveFeatures(const Message_ProgressRange& theRange) { // For each feature: // - Find the faces adjacent to the feature; @@ -730,6 +811,8 @@ void BOPAlgo_RemoveFeatures::RemoveFeatures() // - Rebuild the solids with reconstructed adjacent faces // and avoiding the feature faces. + Message_ProgressScope aPSOuter(theRange, "Removing features", 2); + // Make Edge-Face connection map of the input // shape to find faces adjacent to the feature TopTools_IndexedDataMapOfShapeListOfShape anEFMap; @@ -755,9 +838,19 @@ void BOPAlgo_RemoveFeatures::RemoveFeatures() aFG.SetRunParallel(myRunParallel); } + const Standard_Integer aNbF = aVFG.Length(); + Message_ProgressScope aPS(aPSOuter.Next(), "Filling gaps", aNbF); + for (Standard_Integer i = 0; i < aNbF; ++i) + { + FillGap& aFG = aVFG.ChangeValue(i); + aFG.SetRange(aPS.Next()); + } // Perform the reconstruction of the adjacent faces BOPTools_Parallel::Perform (myRunParallel, aVFG); - + if (UserBreak(aPSOuter)) + { + return; + } // Even if the history is not requested, it is necessary to track: // - The solids modification after each feature removal to find // the necessary solids to rebuild on the next step. @@ -769,9 +862,13 @@ void BOPAlgo_RemoveFeatures::RemoveFeatures() // Remove the features one by one. // It will allow removing the features even if there were // some problems with removal of the previous features. - const Standard_Integer aNbF = aVFG.Length(); + Message_ProgressScope aPSLoop(aPSOuter.Next(), "Removing features one by one", aNbF); for (Standard_Integer i = 0; i < aNbF; ++i) { + if (UserBreak(aPSLoop)) + { + return; + } FillGap& aFG = aVFG(i); // No need to fill the history for solids if the history is not @@ -781,7 +878,7 @@ void BOPAlgo_RemoveFeatures::RemoveFeatures() // Perform removal of the single feature RemoveFeature(aFG.Feature(), aFG.Solids(), aFG.FeatureFacesMap(), aFG.HasAdjacentFaces(), aFG.Faces(), aFG.History(), - isSolidsHistoryNeeded); + isSolidsHistoryNeeded, aPSLoop.Next()); } } @@ -796,7 +893,8 @@ void BOPAlgo_RemoveFeatures::RemoveFeature const Standard_Boolean theHasAdjacentFaces, const TopTools_IndexedDataMapOfShapeListOfShape& theAdjFaces, const Handle(BRepTools_History)& theAdjFacesHistory, - const Standard_Boolean theSolidsHistoryNeeded) + const Standard_Boolean theSolidsHistoryNeeded, + const Message_ProgressRange& theRange) { Standard_Boolean bFuseShapes = Standard_True; const Standard_Integer aNbAF = theAdjFaces.Extent(); @@ -817,6 +915,7 @@ void BOPAlgo_RemoveFeatures::RemoveFeature bFuseShapes = Standard_False; } + Message_ProgressScope aPS(theRange, NULL, 100); // Rebuild the shape using MakerVolume algorithm avoiding the faces of the // feature and replacing the adjacent faces with their images @@ -848,7 +947,8 @@ void BOPAlgo_RemoveFeatures::RemoveFeature GetOriginalFaces(myShape, theSolids, theFeatureFacesMap, theAdjFaces, myHistory, aFacesToBeKept, anInternalShapes, aFacesToCheckOri, aSolidsToRebuild, aSharedFaces, anUnTouchedSolids); - + + aPS.Next(3); // To avoid excessive intersection of the faces collect the faces // of the input shape into a compound TopoDS_Compound anOrigF; @@ -898,7 +998,7 @@ void BOPAlgo_RemoveFeatures::RemoveFeature } // Build solids - aMV.Perform(); + aMV.Perform(aPS.Next(90)); if (aMV.HasErrors()) { // Add warning for the feature @@ -926,6 +1026,10 @@ void BOPAlgo_RemoveFeatures::RemoveFeature TopTools_MapOfShape anAdjFacesSplits; for (Standard_Integer i = 1; i <= aNbAF; ++i) { + if (!aPS.More()) + { + return; + } const TopoDS_Shape& aF = theAdjFaces.FindKey(i); const TopTools_ListOfShape& aLFIm = myHistory->Modified(aF); if (aLFIm.IsEmpty()) @@ -943,9 +1047,14 @@ void BOPAlgo_RemoveFeatures::RemoveFeature aNbFK = aFacesToBeKept.Extent(); for (Standard_Integer i = 1; i <= aNbFK && bValid; ++i) { + const TopoDS_Shape& aS = aFacesToBeKept(i); if (anAdjFacesSplits.Contains(aS)) continue; + if (!aPS.More()) + { + return; + } TopExp_Explorer anExpF(aS, TopAbs_FACE); for (; anExpF.More(); anExpF.Next()) { @@ -976,7 +1085,7 @@ void BOPAlgo_RemoveFeatures::RemoveFeature AddWarning(new BOPAlgo_AlertUnableToRemoveTheFeature(theFeature)); return; } - + aPS.Next(3); // Remove internal wires from the faces, possibly appeared after intersection RemoveInternalWires(aLSRes, &anInternalShapes); @@ -1000,7 +1109,7 @@ void BOPAlgo_RemoveFeatures::RemoveFeature MakeRemoved(anInternalShapes, aRemHist, aMSRes); myHistory->Merge(aRemHist); } - + aPS.Next(3); // Fill the history for the solids if (theSolidsHistoryNeeded) { @@ -1029,7 +1138,7 @@ void BOPAlgo_RemoveFeatures::RemoveFeature // function: UpdateHistory // purpose: Update history with the removed features //======================================================================= -void BOPAlgo_RemoveFeatures::UpdateHistory() +void BOPAlgo_RemoveFeatures::UpdateHistory(const Message_ProgressRange& theRange) { if (!HasHistory()) return; @@ -1042,7 +1151,8 @@ void BOPAlgo_RemoveFeatures::UpdateHistory() BRepTools_History aHistory; const Standard_Integer aNbS = myInputsMap.Extent(); - for (Standard_Integer i = 1; i <= aNbS; ++i) + Message_ProgressScope aPS(theRange, "Updating history", aNbS); + for (Standard_Integer i = 1; i <= aNbS; ++i, aPS.Next()) { const TopoDS_Shape& aS = myInputsMap(i); if (!BRepTools_History::IsSupportedType(aS)) @@ -1051,6 +1161,10 @@ void BOPAlgo_RemoveFeatures::UpdateHistory() if (myHistory->IsRemoved(aS)) continue; + if (UserBreak(aPS)) + { + return; + } // Check if the shape has any trace in the result const TopTools_ListOfShape& aLSIm = myHistory->Modified(aS); if (aLSIm.IsEmpty()) @@ -1075,10 +1189,11 @@ void BOPAlgo_RemoveFeatures::UpdateHistory() // purpose: Simplifies the result by removing extra edges and vertices // created during operation //======================================================================= -void BOPAlgo_RemoveFeatures::SimplifyResult() +void BOPAlgo_RemoveFeatures::SimplifyResult(const Message_ProgressRange& theRange) { if (myShape.IsSame(myInputShape)) return; + Message_ProgressScope aPSOuter(theRange, "Simplifyingthe result", 2); ShapeUpgrade_UnifySameDomain aSDTool; aSDTool.Initialize(myShape, Standard_True, Standard_True); // Do not allow producing internal edges @@ -1088,14 +1203,20 @@ void BOPAlgo_RemoveFeatures::SimplifyResult() TopExp::MapShapes(myShape, myMapShape); const Standard_Integer aNbS = myInputsMap.Extent(); - for (Standard_Integer i = 1; i <= aNbS; ++i) + Message_ProgressScope aPS(aPSOuter.Next(), NULL, aNbS); + for (Standard_Integer i = 1; i <= aNbS; ++i, aPS.Next()) { + if (UserBreak(aPS)) + { + return; + } if (myMapShape.Contains(myInputsMap(i))) aSDTool.KeepShape(myInputsMap(i)); } // Perform unification aSDTool.Build(); + aPSOuter.Next(); myShape = aSDTool.Shape(); if (HasHistory()) myHistory->Merge(aSDTool.History()); diff --git a/src/BOPAlgo/BOPAlgo_RemoveFeatures.hxx b/src/BOPAlgo/BOPAlgo_RemoveFeatures.hxx index 7db54ffa8c..1303bc8570 100644 --- a/src/BOPAlgo/BOPAlgo_RemoveFeatures.hxx +++ b/src/BOPAlgo/BOPAlgo_RemoveFeatures.hxx @@ -231,11 +231,11 @@ protected: //! @name Protected methods performing the removal //! Prepares the faces to remove: //! - Gets only faces contained in the input solids; //! - Builds connected blocks of faces creating separate features to remove. - Standard_EXPORT void PrepareFeatures(); + Standard_EXPORT void PrepareFeatures(const Message_ProgressRange& theRange); //! Removes the features and fills the created gaps by extension of the adjacent faces. //! Processes each feature separately. - Standard_EXPORT void RemoveFeatures(); + Standard_EXPORT void RemoveFeatures(const Message_ProgressRange& theRange); //! Remove the single feature from the shape. //! @param theFeature [in] The feature to remove; @@ -253,18 +253,22 @@ protected: //! @name Protected methods performing the removal const Standard_Boolean theHasAdjacentFaces, const TopTools_IndexedDataMapOfShapeListOfShape& theAdjFaces, const Handle(BRepTools_History)& theAdjFacesHistory, - const Standard_Boolean theSolidsHistoryNeeded); + const Standard_Boolean theSolidsHistoryNeeded, + const Message_ProgressRange& theRange); //! Updates history with the removed features - Standard_EXPORT void UpdateHistory(); + Standard_EXPORT void UpdateHistory(const Message_ProgressRange& theRange); //! Simplifies the result by removing extra edges and vertices created //! during removal of the features. - Standard_EXPORT void SimplifyResult(); + Standard_EXPORT void SimplifyResult(const Message_ProgressRange& theRange); //! Post treatment - restore the type of the initial shape Standard_EXPORT void PostTreat(); + //! Filling steps for constant operations + Standard_EXPORT void fillPIConstants(const Standard_Real theWhole, BOPAlgo_PISteps& theSteps) const Standard_OVERRIDE; + protected: //! @name Fields // Inputs diff --git a/src/BOPTest/BOPTest_RemoveFeaturesCommands.cxx b/src/BOPTest/BOPTest_RemoveFeaturesCommands.cxx index 7a85b1d099..2f00af4c38 100644 --- a/src/BOPTest/BOPTest_RemoveFeaturesCommands.cxx +++ b/src/BOPTest/BOPTest_RemoveFeaturesCommands.cxx @@ -25,6 +25,7 @@ #include #include +#include #include #include @@ -98,9 +99,9 @@ Standard_Integer RemoveFeatures(Draw_Interpretor& theDI, } aRF.SetToFillHistory(BRepTest_Objects::IsHistoryNeeded()); - + Handle(Draw_ProgressIndicator) aProgress = new Draw_ProgressIndicator(theDI, 1); // Perform the removal - aRF.Build(); + aRF.Build(aProgress->Start()); // Check for the errors/warnings BOPTest::ReportAlerts(aRF.GetReport()); diff --git a/src/BRepAlgoAPI/BRepAlgoAPI_Defeaturing.cxx b/src/BRepAlgoAPI/BRepAlgoAPI_Defeaturing.cxx index 2f4def8b8d..04fa1a3dbd 100644 --- a/src/BRepAlgoAPI/BRepAlgoAPI_Defeaturing.cxx +++ b/src/BRepAlgoAPI/BRepAlgoAPI_Defeaturing.cxx @@ -21,7 +21,7 @@ //function : Build //purpose : //======================================================================= -void BRepAlgoAPI_Defeaturing::Build(const Message_ProgressRange& /*theRange*/) +void BRepAlgoAPI_Defeaturing::Build(const Message_ProgressRange& theRange) { // Set not done state for the operation NotDone(); @@ -36,7 +36,7 @@ void BRepAlgoAPI_Defeaturing::Build(const Message_ProgressRange& /*theRange*/) myFeatureRemovalTool.SetRunParallel(myRunParallel); // Perform the features removal - myFeatureRemovalTool.Perform(); + myFeatureRemovalTool.Perform(theRange); // Merge the Errors/Warnings from the features removal tool GetReport()->Merge(myFeatureRemovalTool.GetReport()); diff --git a/tests/bugs/modalg_7/bug30788 b/tests/bugs/modalg_7/bug30788 new file mode 100644 index 0000000000..a0ebc39615 --- /dev/null +++ b/tests/bugs/modalg_7/bug30788 @@ -0,0 +1,22 @@ +puts "============================================" +puts "0030788: Modeling Algorithms - BRepAlgoAPI_Defeaturing does not propagate progress indicator to underlying algorithms" +puts "============================================" +puts "" + +proc isTracked { theOutput } { + if {![regexp "Progress" $theOutput]} { + puts "Error: progress is not tracked" + } +} + +XProgress +t + +restore [locate_data_file bug29481_ex1.brep] s +explode s f + +compound s_6 s_18 step + +# check that progress is tracked for removefeatures operation + +set log [removefeatures res s step] +isTracked $log From 35ad04e78bd6b34d31cc3072ca3611f6e40c7051 Mon Sep 17 00:00:00 2001 From: kgv Date: Sun, 5 Sep 2021 18:40:55 +0300 Subject: [PATCH 043/639] 0032107: Data Exchange, RWGltf_CafReader - reading glTF document back loses sharing RWGltf_CafWriter has been fixed to write shared Faces having a different style. RWGltf_GltfJsonParser::gltfParsePrimArray() now tries to create a shared TopoDS_Face from the same primitive array definition. RWGltf_CafReader - improved name generation. --- src/RWGltf/RWGltf_CafWriter.cxx | 105 +++++++++++++++- src/RWGltf/RWGltf_CafWriter.hxx | 26 +++- src/RWGltf/RWGltf_GltfJsonParser.cxx | 173 ++++++++++++++++++--------- src/RWGltf/RWGltf_GltfJsonParser.hxx | 10 +- src/RWMesh/RWMesh_CafReader.cxx | 6 + src/RWMesh/RWMesh_FaceIterator.cxx | 3 +- tests/de_mesh/gltf_write/as1 | 4 +- tests/de_mesh/gltf_write/spheres | 56 +++++++++ 8 files changed, 312 insertions(+), 71 deletions(-) create mode 100644 tests/de_mesh/gltf_write/spheres diff --git a/src/RWGltf/RWGltf_CafWriter.cxx b/src/RWGltf/RWGltf_CafWriter.cxx index 71f88bb499..b54198fba7 100644 --- a/src/RWGltf/RWGltf_CafWriter.cxx +++ b/src/RWGltf/RWGltf_CafWriter.cxx @@ -434,13 +434,14 @@ bool RWGltf_CafWriter::writeBinData (const Handle(TDocStd_Document)& theDocument RWMesh_FaceIterator aFaceIter (aDocNode.RefLabel, TopLoc_Location(), true, aDocNode.Style); if (myToMergeFaces) { - if (myBinDataMap.Contains (aFaceIter.ExploredShape())) + RWGltf_StyledShape aStyledShape (aFaceIter.ExploredShape(), aDocNode.Style); + if (myBinDataMap.Contains (aStyledShape)) { continue; } Handle(RWGltf_GltfFaceList) aGltfFaceList = new RWGltf_GltfFaceList(); - myBinDataMap.Add (aFaceIter.ExploredShape(), aGltfFaceList); + myBinDataMap.Add (aStyledShape, aGltfFaceList); for (; aFaceIter.More() && aPSentryBin.More(); aFaceIter.Next()) { if (toSkipFaceMesh (aFaceIter)) @@ -489,8 +490,9 @@ bool RWGltf_CafWriter::writeBinData (const Handle(TDocStd_Document)& theDocument { for (; aFaceIter.More() && aPSentryBin.More(); aFaceIter.Next()) { + RWGltf_StyledShape aStyledShape (aFaceIter.Face(), aFaceIter.FaceStyle()); if (toSkipFaceMesh (aFaceIter) - || myBinDataMap.Contains (aFaceIter.Face())) + || myBinDataMap.Contains (aStyledShape)) { continue; } @@ -500,13 +502,14 @@ bool RWGltf_CafWriter::writeBinData (const Handle(TDocStd_Document)& theDocument aGltfFace->Shape = aFaceIter.Face(); aGltfFace->Style = aFaceIter.FaceStyle(); aGltfFaceList->Append (aGltfFace); - myBinDataMap.Add (aFaceIter.Face(), aGltfFaceList); + myBinDataMap.Add (aStyledShape, aGltfFaceList); } } } Standard_Integer aNbAccessors = 0; NCollection_Map aWrittenFaces; + NCollection_DataMap aWrittenPrimData; for (Standard_Integer aTypeIter = 0; aTypeIter < 4; ++aTypeIter) { const RWGltf_GltfArrayType anArrType = (RWGltf_GltfArrayType )anArrTypes[aTypeIter]; @@ -521,6 +524,7 @@ bool RWGltf_CafWriter::writeBinData (const Handle(TDocStd_Document)& theDocument } aBuffView->ByteOffset = aBinFile->tellp(); aWrittenFaces.Clear (false); + aWrittenPrimData.Clear (false); for (ShapeToGltfFaceMap::Iterator aBinDataIter (myBinDataMap); aBinDataIter.More() && aPSentryBin.More(); aBinDataIter.Next()) { const Handle(RWGltf_GltfFaceList)& aGltfFaceList = aBinDataIter.Value(); @@ -532,6 +536,41 @@ bool RWGltf_CafWriter::writeBinData (const Handle(TDocStd_Document)& theDocument for (RWGltf_GltfFaceList::Iterator aGltfFaceIter (*aGltfFaceList); aGltfFaceIter.More() && aPSentryBin.More(); aGltfFaceIter.Next()) { const Handle(RWGltf_GltfFace)& aGltfFace = aGltfFaceIter.Value(); + + Handle(RWGltf_GltfFace) anOldGltfFace; + if (aWrittenPrimData.Find (aGltfFace->Shape, anOldGltfFace)) + { + switch (anArrType) + { + case RWGltf_GltfArrayType_Position: + { + aGltfFace->NodePos = anOldGltfFace->NodePos; + break; + } + case RWGltf_GltfArrayType_Normal: + { + aGltfFace->NodeNorm = anOldGltfFace->NodeNorm; + break; + } + case RWGltf_GltfArrayType_TCoord0: + { + aGltfFace->NodeUV = anOldGltfFace->NodeUV; + break; + } + case RWGltf_GltfArrayType_Indices: + { + aGltfFace->Indices = anOldGltfFace->Indices; + break; + } + default: + { + break; + } + } + continue; + } + aWrittenPrimData.Bind (aGltfFace->Shape, aGltfFace); + for (RWMesh_FaceIterator aFaceIter (aGltfFace->Shape, aGltfFace->Style); aFaceIter.More() && aPSentryBin.More(); aFaceIter.Next()) { switch (anArrType) @@ -864,6 +903,8 @@ void RWGltf_CafWriter::writeAccessors (const RWGltf_GltfSceneNodeMap& ) RWGltf_GltfArrayType_Indices }; NCollection_Map aWrittenFaces; + NCollection_Map aWrittenIds; + int aNbAccessors = 0; for (Standard_Integer aTypeIter = 0; aTypeIter < 4; ++aTypeIter) { const RWGltf_GltfArrayType anArrType = (RWGltf_GltfArrayType )anArrTypes[aTypeIter]; @@ -883,21 +924,71 @@ void RWGltf_CafWriter::writeAccessors (const RWGltf_GltfSceneNodeMap& ) { case RWGltf_GltfArrayType_Position: { + const int anAccessorId = aGltfFace->NodePos.Id; + if (anAccessorId == RWGltf_GltfAccessor::INVALID_ID + || !aWrittenIds.Add (anAccessorId)) + { + break; + } + + if (anAccessorId != aNbAccessors) + { + throw Standard_ProgramError ("Internal error: RWGltf_CafWriter::writeAccessors()"); + } + ++aNbAccessors; writePositions (*aGltfFace); break; } case RWGltf_GltfArrayType_Normal: { + const int anAccessorId = aGltfFace->NodeNorm.Id; + if (anAccessorId == RWGltf_GltfAccessor::INVALID_ID + || !aWrittenIds.Add (anAccessorId)) + { + break; + } + + if (anAccessorId != aNbAccessors) + { + throw Standard_ProgramError ("Internal error: RWGltf_CafWriter::writeAccessors()"); + } + ++aNbAccessors; writeNormals (*aGltfFace); break; } case RWGltf_GltfArrayType_TCoord0: { + const int anAccessorId = aGltfFace->NodeUV.Id; + if (anAccessorId == RWGltf_GltfAccessor::INVALID_ID + || !aWrittenIds.Add (anAccessorId) + ) + { + break; + } + + if (anAccessorId != aNbAccessors) + { + throw Standard_ProgramError ("Internal error: RWGltf_CafWriter::writeAccessors()"); + } + ++aNbAccessors; writeTextCoords (*aGltfFace); break; } case RWGltf_GltfArrayType_Indices: { + const int anAccessorId = aGltfFace->Indices.Id; + if (anAccessorId == RWGltf_GltfAccessor::INVALID_ID + || !aWrittenIds.Add (anAccessorId) + ) + { + break; + } + + if (anAccessorId != aNbAccessors) + { + throw Standard_ProgramError ("Internal error: RWGltf_CafWriter::writeAccessors()"); + } + ++aNbAccessors; writeIndices (*aGltfFace); break; } @@ -1420,7 +1511,8 @@ void RWGltf_CafWriter::writeMeshes (const RWGltf_GltfSceneNodeMap& theSceneNodeM Handle(RWGltf_GltfFaceList) aGltfFaceList; aShape.Location (TopLoc_Location()); - myBinDataMap.FindFromKey (aShape, aGltfFaceList); + RWGltf_StyledShape aStyledShape (aShape, aDocNode.Style); + myBinDataMap.FindFromKey (aStyledShape, aGltfFaceList); if (!aWrittenFaces.Add (aGltfFaceList)) { continue; @@ -1441,7 +1533,8 @@ void RWGltf_CafWriter::writeMeshes (const RWGltf_GltfSceneNodeMap& theSceneNodeM continue; } - const Handle(RWGltf_GltfFaceList)& aGltfFaceList = myBinDataMap.FindFromKey (aFaceIter.Face()); + RWGltf_StyledShape aStyledShape (aFaceIter.Face(), aFaceIter.FaceStyle()); + const Handle(RWGltf_GltfFaceList)& aGltfFaceList = myBinDataMap.FindFromKey (aStyledShape); if (!aWrittenFaces.Add (aGltfFaceList)) { continue; diff --git a/src/RWGltf/RWGltf_CafWriter.hxx b/src/RWGltf/RWGltf_CafWriter.hxx index bfc5119177..328c1b7a94 100644 --- a/src/RWGltf/RWGltf_CafWriter.hxx +++ b/src/RWGltf/RWGltf_CafWriter.hxx @@ -318,7 +318,31 @@ protected: protected: - typedef NCollection_IndexedDataMap ShapeToGltfFaceMap; + //! Shape + Style pair. + struct RWGltf_StyledShape + { + TopoDS_Shape Shape; + XCAFPrs_Style Style; + + RWGltf_StyledShape() {} + explicit RWGltf_StyledShape (const TopoDS_Shape& theShape) : Shape (theShape) {} + explicit RWGltf_StyledShape (const TopoDS_Shape& theShape, + const XCAFPrs_Style& theStyle) : Shape (theShape), Style (theStyle) {} + public: + //! Computes a hash code. + static Standard_Integer HashCode (const RWGltf_StyledShape& theShape, Standard_Integer theUpperBound) + { + return theShape.Shape.HashCode (theUpperBound); + } + //! Equality comparison. + static Standard_Boolean IsEqual (const RWGltf_StyledShape& theS1, const RWGltf_StyledShape& theS2) + { + return theS1.Shape.IsSame (theS2.Shape) + && theS1.Style.IsEqual(theS2.Style); + } + }; + + typedef NCollection_IndexedDataMap ShapeToGltfFaceMap; protected: diff --git a/src/RWGltf/RWGltf_GltfJsonParser.cxx b/src/RWGltf/RWGltf_GltfJsonParser.cxx index 9974cfa8d2..e29b4b4e47 100644 --- a/src/RWGltf/RWGltf_GltfJsonParser.cxx +++ b/src/RWGltf/RWGltf_GltfJsonParser.cxx @@ -1340,51 +1340,27 @@ bool RWGltf_GltfJsonParser::gltfParseMesh (TopoDS_Shape& theMeshShape, return true; } + const TCollection_AsciiString aUserName ((aName != NULL && aName->IsString()) ? aName->GetString() : ""); + BRep_Builder aBuilder; TopoDS_Compound aMeshShape; int aNbFaces = 0; for (rapidjson::Value::ConstValueIterator aPrimArrIter = aPrims->Begin(); aPrimArrIter != aPrims->End(); ++aPrimArrIter) { - TCollection_AsciiString aUserName; - if (aName != NULL - && aName->IsString()) - { - aUserName = aName->GetString(); - } - - Handle(RWGltf_GltfLatePrimitiveArray) aMeshData = new RWGltf_GltfLatePrimitiveArray (theMeshId, aUserName); - if (!gltfParsePrimArray (aMeshData, theMeshId, *aPrimArrIter)) + TopoDS_Shape aFace; + if (!gltfParsePrimArray (aFace, theMeshId, aUserName, *aPrimArrIter)) { return false; } - if (!aMeshData->Data().IsEmpty()) + if (!aFace.IsNull()) { if (aMeshShape.IsNull()) { aBuilder.MakeCompound (aMeshShape); } - - TopoDS_Face aFace; - aBuilder.MakeFace (aFace, aMeshData); aBuilder.Add (aMeshShape, aFace); - if (myAttribMap != NULL - && aMeshData->HasStyle()) - { - RWMesh_NodeAttributes aShapeAttribs; - aShapeAttribs.RawName = aUserName; - - // assign material and not color - //aShapeAttribs.Style.SetColorSurf (aMeshData->BaseColor()); - - Handle(XCAFDoc_VisMaterial) aMat; - myMaterials.Find (!aMeshData->MaterialPbr().IsNull() ? aMeshData->MaterialPbr()->Id : aMeshData->MaterialCommon()->Id, aMat); - aShapeAttribs.Style.SetMaterial (aMat); - - myAttribMap->Bind (aFace, aShapeAttribs); - } - myFaceList.Append (aFace); ++aNbFaces; } } @@ -1405,8 +1381,9 @@ bool RWGltf_GltfJsonParser::gltfParseMesh (TopoDS_Shape& theMeshShape, // function : gltfParsePrimArray // purpose : // ======================================================================= -bool RWGltf_GltfJsonParser::gltfParsePrimArray (const Handle(RWGltf_GltfLatePrimitiveArray)& theMeshData, +bool RWGltf_GltfJsonParser::gltfParsePrimArray (TopoDS_Shape& thePrimArrayShape, const TCollection_AsciiString& theMeshId, + const TCollection_AsciiString& theMeshName, const RWGltf_JsonValue& thePrimArray) { const RWGltf_JsonValue* anAttribs = findObjectMember (thePrimArray, "attributes"); @@ -1447,22 +1424,69 @@ bool RWGltf_GltfJsonParser::gltfParsePrimArray (const Handle(RWGltf_GltfLatePrim Message::SendWarning (TCollection_AsciiString() + "Primitive array within Mesh '" + theMeshId + "' skipped due to unsupported mode"); return true; } - theMeshData->SetPrimitiveMode (aMode); - // assign material + const TCollection_AsciiString aMatId = aMaterial != NULL ? getKeyString (*aMaterial) : TCollection_AsciiString(); + const TCollection_AsciiString anIndicesId = anIndices != NULL ? getKeyString (*anIndices) : TCollection_AsciiString(); + Handle(RWGltf_MaterialMetallicRoughness) aMatPbr; + Handle(RWGltf_MaterialCommon) aMatCommon; + Handle(XCAFDoc_VisMaterial) aMat; if (aMaterial != NULL) { - Handle(RWGltf_MaterialMetallicRoughness) aMatPbr; - if (myMaterialsPbr.Find (getKeyString (*aMaterial), aMatPbr)) + if (myMaterialsPbr.Find (aMatId, aMatPbr)) { - theMeshData->SetMaterialPbr (aMatPbr); + myMaterials.Find (aMatPbr->Id, aMat); } + if (myMaterialsCommon.Find (aMatId, aMatCommon)) + { + if (aMat.IsNull()) + { + myMaterials.Find (aMatCommon->Id, aMat); + } + } + } - Handle(RWGltf_MaterialCommon) aMatCommon; - if (myMaterialsCommon.Find (getKeyString (*aMaterial), aMatCommon)) + // try reusing already loaded primitive array - generate a unique id + TCollection_AsciiString aPrimArrayId, aPrimArrayIdWithMat; + aPrimArrayId += TCollection_AsciiString (aMode); + aPrimArrayId += TCollection_AsciiString (":") + anIndicesId; + for (rapidjson::Value::ConstMemberIterator anAttribIter = anAttribs->MemberBegin(); + anAttribIter != anAttribs->MemberEnd(); ++anAttribIter) + { + const TCollection_AsciiString anAttribId = getKeyString (anAttribIter->value); + aPrimArrayId += TCollection_AsciiString (":") + anAttribId; + } + aPrimArrayIdWithMat = aPrimArrayId + TCollection_AsciiString ("::") + aMatId; + if (myShapeMap[ShapeMapGroup_PrimArray].Find (aPrimArrayIdWithMat, thePrimArrayShape)) + { + return true; + } + else if (myShapeMap[ShapeMapGroup_PrimArray].Find (aPrimArrayId, thePrimArrayShape)) + { + if (myAttribMap != NULL) { - theMeshData->SetMaterialCommon (aMatCommon); + // sharing just triangulation is not much useful + //Handle(RWGltf_GltfLatePrimitiveArray) aLateData = Handle(RWGltf_GltfLatePrimitiveArray)::DownCast (BRep_Tool::Triangulation (TopoDS::Face (thePrimArrayShape), aDummy)); + //TopoDS_Face aFaceCopy; BRep_Builder().MakeFace (aFaceCopy, aLateData); + + // make a located Face copy + TopoDS_Shape aFaceCopy = thePrimArrayShape; + aFaceCopy.Location (TopLoc_Location (gp_Trsf())); + RWMesh_NodeAttributes aShapeAttribs; + aShapeAttribs.RawName = theMeshName; + aShapeAttribs.Style.SetMaterial (aMat); + myAttribMap->Bind (aFaceCopy, aShapeAttribs); + myShapeMap[ShapeMapGroup_PrimArray].Bind (aPrimArrayIdWithMat, aFaceCopy); + thePrimArrayShape = aFaceCopy; } + return true; + } + + Handle(RWGltf_GltfLatePrimitiveArray) aMeshData = new RWGltf_GltfLatePrimitiveArray (theMeshId, theMeshName); + aMeshData->SetPrimitiveMode (aMode); + if (aMaterial != NULL) + { + aMeshData->SetMaterialPbr (aMatPbr); + aMeshData->SetMaterialCommon (aMatCommon); } bool hasPositions = false; @@ -1490,7 +1514,7 @@ bool RWGltf_GltfJsonParser::gltfParsePrimArray (const Handle(RWGltf_GltfLatePrim reportGltfError ("Primitive array attribute accessor key '" + anAttribId + "' points to non-existing object."); return false; } - else if (!gltfParseAccessor (theMeshData, anAttribId, *anAccessor, aType, aDracoBuf)) + else if (!gltfParseAccessor (aMeshData, anAttribId, *anAccessor, aType, aDracoBuf)) { return false; } @@ -1507,7 +1531,6 @@ bool RWGltf_GltfJsonParser::gltfParsePrimArray (const Handle(RWGltf_GltfLatePrim if (anIndices != NULL) { - const TCollection_AsciiString anIndicesId = getKeyString (*anIndices); const RWGltf_JsonValue* anAccessor = myGltfRoots[RWGltf_GltfRootElement_Accessors].FindChild (*anIndices); if (anAccessor == NULL || !anAccessor->IsObject()) @@ -1515,16 +1538,38 @@ bool RWGltf_GltfJsonParser::gltfParsePrimArray (const Handle(RWGltf_GltfLatePrim reportGltfError ("Primitive array indices accessor key '" + anIndicesId + "' points to non-existing object."); return false; } - else if (!gltfParseAccessor (theMeshData, anIndicesId, *anAccessor, RWGltf_GltfArrayType_Indices, aDracoBuf)) + else if (!gltfParseAccessor (aMeshData, anIndicesId, *anAccessor, RWGltf_GltfArrayType_Indices, aDracoBuf)) { return false; } } else { - theMeshData->SetNbDeferredTriangles (theMeshData->NbDeferredNodes() / 3); + aMeshData->SetNbDeferredTriangles (aMeshData->NbDeferredNodes() / 3); } + if (!aMeshData->Data().IsEmpty()) + { + TopoDS_Face aFace; + BRep_Builder aBuilder; + aBuilder.MakeFace (aFace, aMeshData); + if (myAttribMap != NULL + && aMeshData->HasStyle()) + { + RWMesh_NodeAttributes aShapeAttribs; + aShapeAttribs.RawName = theMeshName; + + // assign material and not color + //aShapeAttribs.Style.SetColorSurf (aMeshData->BaseColor()); + aShapeAttribs.Style.SetMaterial (aMat); + + myAttribMap->Bind (aFace, aShapeAttribs); + } + myFaceList.Append (aFace); + myShapeMap[ShapeMapGroup_PrimArray].Bind (aPrimArrayId, aFace); + myShapeMap[ShapeMapGroup_PrimArray].Bind (aPrimArrayIdWithMat, aFace); + thePrimArrayShape = aFace; + } return true; } @@ -1873,6 +1918,7 @@ void RWGltf_GltfJsonParser::bindNamedShape (TopoDS_Shape& theShape, return; } + TopoDS_Shape aShape = theShape; if (!theLoc.IsIdentity()) { if (!theShape.Location().IsIdentity()) @@ -1896,31 +1942,32 @@ void RWGltf_GltfJsonParser::bindNamedShape (TopoDS_Shape& theShape, aUserName = theId; } - myShapeMap[theGroup].Bind (theId, theShape); if (myAttribMap != NULL) { RWMesh_NodeAttributes aShapeAttribs; - aShapeAttribs.Name = aUserName; - aShapeAttribs.RawName = theId; + aShapeAttribs.Name = aUserName; + if (myIsGltf1) + { + aShapeAttribs.RawName = theId; + } if (theShape.ShapeType() == TopAbs_FACE) { - TopLoc_Location aDummy; - if (Handle(RWGltf_GltfLatePrimitiveArray) aLateData = Handle(RWGltf_GltfLatePrimitiveArray)::DownCast (BRep_Tool::Triangulation (TopoDS::Face (theShape), aDummy))) + RWMesh_NodeAttributes aFaceAttribs; + if (myAttribMap->Find (aShape, aFaceAttribs)) { - if (aLateData->HasStyle()) - { - // assign material and not color - //aShapeAttribs.Style.SetColorSurf (aLateData->BaseColor()); - - Handle(XCAFDoc_VisMaterial) aMat; - myMaterials.Find (!aLateData->MaterialPbr().IsNull() ? aLateData->MaterialPbr()->Id : aLateData->MaterialCommon()->Id, aMat); - aShapeAttribs.Style.SetMaterial (aMat); - } + aShapeAttribs.Style.SetMaterial (aFaceAttribs.Style.Material()); if (aShapeAttribs.Name.IsEmpty() && myUseMeshNameAsFallback) { // fallback using Mesh name - aShapeAttribs.Name = aLateData->Name(); + aShapeAttribs.Name = aFaceAttribs.RawName; + } + else if (!aFaceAttribs.Name.IsEmpty() + && theLoc.IsIdentity() + && theGroup == ShapeMapGroup_Nodes) + { + // keep Product name (from Mesh) separated from Instance name (from Node) + theShape.Location (TopLoc_Location (gp_Trsf()) * theShape.Location(), Standard_False); } } } @@ -1955,8 +2002,20 @@ void RWGltf_GltfJsonParser::bindNamedShape (TopoDS_Shape& theShape, aShapeAttribs.Name = aMeshName; } } + else if (!aShapeAttribs.Name.IsEmpty() + && theGroup == ShapeMapGroup_Nodes) + { + RWMesh_NodeAttributes anOldAttribs; + if (myAttribMap->Find (aShape, anOldAttribs) + && !anOldAttribs.Name.IsEmpty()) + { + // keep Product name (from Mesh) separated from Instance name (from Node) + theShape.Location (TopLoc_Location (gp_Trsf()) * theShape.Location(), Standard_False); + } + } myAttribMap->Bind (theShape, aShapeAttribs); } + myShapeMap[theGroup].Bind (theId, theShape); } #endif diff --git a/src/RWGltf/RWGltf_GltfJsonParser.hxx b/src/RWGltf/RWGltf_GltfJsonParser.hxx index b285932e02..922b9790fc 100644 --- a/src/RWGltf/RWGltf_GltfJsonParser.hxx +++ b/src/RWGltf/RWGltf_GltfJsonParser.hxx @@ -188,7 +188,8 @@ protected: const RWGltf_JsonValue& theMesh); //! Parse primitive array. - Standard_EXPORT bool gltfParsePrimArray (const Handle(RWGltf_GltfLatePrimitiveArray)& theMeshData, + Standard_EXPORT bool gltfParsePrimArray (TopoDS_Shape& thePrimArrayShape, + const TCollection_AsciiString& theMeshId, const TCollection_AsciiString& theMeshName, const RWGltf_JsonValue& thePrimArray); @@ -284,8 +285,9 @@ protected: //! Groups for re-using shapes. enum ShapeMapGroup { - ShapeMapGroup_Nodes, //!< nodes - ShapeMapGroup_Meshes, //!< meshes + ShapeMapGroup_Nodes, //!< nodes + ShapeMapGroup_Meshes, //!< meshes + ShapeMapGroup_PrimArray, //!< primitive array }; //! Bind name attribute. @@ -416,7 +418,7 @@ protected: NCollection_DataMap myMaterialsPbr; NCollection_DataMap myMaterialsCommon; NCollection_DataMap myMaterials; - NCollection_DataMap myShapeMap[2]; + NCollection_DataMap myShapeMap[3]; NCollection_DataMap myProbedFiles; NCollection_DataMap myDecodedBuffers; diff --git a/src/RWMesh/RWMesh_CafReader.cxx b/src/RWMesh/RWMesh_CafReader.cxx index f998d3b8b9..64c9b6e9d0 100644 --- a/src/RWMesh/RWMesh_CafReader.cxx +++ b/src/RWMesh/RWMesh_CafReader.cxx @@ -402,6 +402,12 @@ Standard_Boolean RWMesh_CafReader::addShapeIntoDoc (CafDocumentTools& theTools, hasProductName = true; setShapeName (aNewRefLabel, aShapeType, aShapeAttribs.Name, theLabel, theParentName); } + else if (aShapeAttribs.Name.IsEmpty() + && !aRefShapeAttribs.Name.IsEmpty()) + { + // copy name from Product + setShapeName (aNewLabel, aShapeType, aRefShapeAttribs.Name, theLabel, theParentName); + } } else { diff --git a/src/RWMesh/RWMesh_FaceIterator.cxx b/src/RWMesh/RWMesh_FaceIterator.cxx index a19ee16920..a7f6d58ae5 100644 --- a/src/RWMesh/RWMesh_FaceIterator.cxx +++ b/src/RWMesh/RWMesh_FaceIterator.cxx @@ -42,12 +42,13 @@ RWMesh_FaceIterator::RWMesh_FaceIterator (const TDF_Label& theLabel, return; } - aShape.Location (theLocation); + aShape.Location (theLocation, false); myFaceIter.Init (aShape, TopAbs_FACE); if (theToMapColors) { dispatchStyles (theLabel, theLocation, theStyle); + myStyles.Bind (aShape, theStyle); } Next(); diff --git a/tests/de_mesh/gltf_write/as1 b/tests/de_mesh/gltf_write/as1 index 3efb8b1ea4..eda810ba4a 100644 --- a/tests/de_mesh/gltf_write/as1 +++ b/tests/de_mesh/gltf_write/as1 @@ -17,8 +17,8 @@ WriteGltf D0 "$aTmpGltf2" -mergeFaces ReadGltf D1 "$aTmpGltf1" XGetOneShape s1 D1 -checknbshapes s1 -face 160 -compound 28 +checknbshapes s1 -face 53 -compound 28 ReadGltf D "$aTmpGltf2" XGetOneShape s2 D -checknbshapes s2 -face 18 -compound 10 +checknbshapes s2 -face 5 -compound 10 diff --git a/tests/de_mesh/gltf_write/spheres b/tests/de_mesh/gltf_write/spheres new file mode 100644 index 0000000000..ec01a88d56 --- /dev/null +++ b/tests/de_mesh/gltf_write/spheres @@ -0,0 +1,56 @@ +puts "========" +puts "0032107: Data Exchange, RWGltf_CafReader - reading glTF document back loses sharing" +puts "========" + +vclear +vclose ALL +Close * +source $env(CSF_OCCTSamplesPath)/tcl/vis_pbr_spheres.tcl +vdump "${imagedir}/${casename}_0.png" + +set aTmpGltf1 "${imagedir}/${casename}_tmp1.glb" +set aTmpGltf1m "${imagedir}/${casename}_tmp1m.glb" +set aTmpGltf2 "${imagedir}/${casename}_tmp2.glb" +set aTmpGltf2m "${imagedir}/${casename}_tmp2m.glb" +lappend occ_tmp_files $aTmpGltf1 +lappend occ_tmp_files $aTmpGltf1m +lappend occ_tmp_files $aTmpGltf2 +lappend occ_tmp_files $aTmpGltf2m + +WriteGltf D "$aTmpGltf1" +puts [file size "$aTmpGltf1"] +WriteGltf D "$aTmpGltf1m" -mergeFaces +puts [file size "$aTmpGltf1m"] + +ReadGltf D1 "$aTmpGltf1" +XGetOneShape s1 D1 +checknbshapes s1 -face 26 -compound 22 +vclear +XDisplay D1 -dispMode 1 +vdump "${imagedir}/${casename}_1.png" + +ReadGltf D1m "$aTmpGltf1m" +XGetOneShape s1m D1m +checknbshapes s1m -face 5 -compound 18 +vclear +XDisplay D1m -dispMode 1 +vdump "${imagedir}/${casename}_1m.png" + +WriteGltf D1 "$aTmpGltf2" +puts [file size "$aTmpGltf2"] +WriteGltf D1m "$aTmpGltf2m" -mergeFaces +puts [file size "$aTmpGltf2m"] + +ReadGltf D2 "$aTmpGltf2" +XGetOneShape s2 D2 +checknbshapes s2 -face 26 -compound 22 +vclear +XDisplay D2 -dispMode 1 +vdump "${imagedir}/${casename}_2.png" + +ReadGltf D2m "$aTmpGltf2m" +XGetOneShape s2m D2m +checknbshapes s2m -face 5 -compound 18 +vclear +XDisplay D2m -dispMode 1 +vdump "${imagedir}/${casename}_2m.png" From efac1733770f766f136694da42454bdd0db62c67 Mon Sep 17 00:00:00 2001 From: emv Date: Fri, 21 Sep 2018 11:43:16 +0300 Subject: [PATCH 044/639] 0030151: Modeling Algorithms - Removal of the API level of old Boolean operations algorithm (BRepAlgo_BooleanOperation) The following classes have been removed as obsolete: - BRepAlgo_BooleanOperation - BRepAlgo_Fuse - BRepAlgo_Cut - BRepAlgo_Common - BRepAlgo_Section The corresponding classes from BRepAlgoAPI package have to be used instead. Draw commands: - fuse - cut - common - section/psection have also been removed as obsolete. The corresponding commands for modern Boolean operations algorithm (bfuse/bcut/bcommon/bsection) have to be used instead. Adjustment of the test cases to use the commands for modern algorithm. --- dox/upgrade/upgrade.md | 30 + .../draw_test_harness/draw_test_harness.md | 83 +- .../shape_healing/shape_healing.md | 2 +- samples/ocafsamples/TNaming_Sample.cxx | 9 +- samples/tcl/cutter.tcl | 3 +- samples/tcl/drill.tcl | 4 +- src/BRepAlgo/BRepAlgo.hxx | 69 +- src/BRepAlgo/BRepAlgo_BooleanOperation.cxx | 917 ------------------ src/BRepAlgo/BRepAlgo_BooleanOperation.hxx | 108 --- src/BRepAlgo/BRepAlgo_CheckStatus.hxx | 27 - src/BRepAlgo/BRepAlgo_Common.cxx | 36 - src/BRepAlgo/BRepAlgo_Common.hxx | 68 -- src/BRepAlgo/BRepAlgo_Cut.cxx | 36 - src/BRepAlgo/BRepAlgo_Cut.hxx | 68 -- src/BRepAlgo/BRepAlgo_Fuse.cxx | 36 - src/BRepAlgo/BRepAlgo_Fuse.hxx | 68 -- src/BRepAlgo/BRepAlgo_Section.cxx | 358 ------- src/BRepAlgo/BRepAlgo_Section.hxx | 355 ------- src/BRepAlgo/BRepAlgo_Tool.cxx | 104 -- src/BRepAlgo/BRepAlgo_Tool.hxx | 67 -- src/BRepAlgo/FILES | 13 - src/BRepOffset/BRepOffset_Tool.cxx | 69 +- src/BRepTest/BRepTest_TopologyCommands.cxx | 124 --- tests/bugs/caf/bug31918_2 | 2 +- tests/bugs/modalg_1/buc60585_1 | 3 +- tests/bugs/modalg_1/buc60585_2 | 3 +- tests/bugs/modalg_2/bug526 | 9 +- tests/bugs/modalg_4/bug82 | 6 +- tests/bugs/modalg_5/bug23855 | 12 +- tests/bugs/modalg_5/bug24463 | 7 +- tests/bugs/modalg_5/bug24519 | 17 +- tests/bugs/modalg_5/bug24758_1 | 3 +- tests/bugs/modalg_5/bug24758_2 | 4 +- tests/bugs/modalg_5/bug25766 | 4 +- tests/bugs/modalg_6/bug21507 | 12 - tests/bugs/modalg_7/bug83 | 4 +- tests/bugs/moddata_1/bug17046 | 2 +- tests/bugs/moddata_1/bug22194 | 18 +- tests/bugs/moddata_2/bug254 | 2 +- tests/caf/nam/A3 | 12 +- tests/v3d/bugs/bug331_1 | 2 +- 41 files changed, 185 insertions(+), 2591 deletions(-) delete mode 100644 src/BRepAlgo/BRepAlgo_BooleanOperation.cxx delete mode 100644 src/BRepAlgo/BRepAlgo_BooleanOperation.hxx delete mode 100644 src/BRepAlgo/BRepAlgo_CheckStatus.hxx delete mode 100644 src/BRepAlgo/BRepAlgo_Common.cxx delete mode 100644 src/BRepAlgo/BRepAlgo_Common.hxx delete mode 100644 src/BRepAlgo/BRepAlgo_Cut.cxx delete mode 100644 src/BRepAlgo/BRepAlgo_Cut.hxx delete mode 100644 src/BRepAlgo/BRepAlgo_Fuse.cxx delete mode 100644 src/BRepAlgo/BRepAlgo_Fuse.hxx delete mode 100644 src/BRepAlgo/BRepAlgo_Section.cxx delete mode 100644 src/BRepAlgo/BRepAlgo_Section.hxx delete mode 100644 src/BRepAlgo/BRepAlgo_Tool.cxx delete mode 100644 src/BRepAlgo/BRepAlgo_Tool.hxx diff --git a/dox/upgrade/upgrade.md b/dox/upgrade/upgrade.md index a19bc6335f..d9e70e476b 100644 --- a/dox/upgrade/upgrade.md +++ b/dox/upgrade/upgrade.md @@ -2263,3 +2263,33 @@ For example: Handle(Draw_ProgressIndicator) aProgress = new Draw_ProgressIndicator(di, 1); BRepAlgoApi_Cut(S1, S2, aProgress->Start()); // method Start() creates range for usage in cut algorithm ~~~~ + +@subsection upgrade_occt760_old_bop_removed Removal of old Boolean operations algorithm (BRepAlgo_BooleanOperation) + +* The method *BRepAlgo_Tool::Deboucle3D* has been removed as duplicating. The corresponding method from *BRepOffset_Tool* class has to be used instead. +* The API classes from *BRepAlgo* package performing old Boolean operations algorithm have been removed: + - *BRepAlgo_BooleanOperation* + - *BRepAlgo_Fuse* + - *BRepAlgo_Common* + - *BRepAlgo_Cut* + - *BRepAlgo_Section* + The corresponding classes from the *BRepAlgoAPI* package have to be used instead. + +@subsection upgrade_occt760_change_check_to_adaptors Changes in BRepLib_CheckCurveOnSurface & GeomLib_CheckCurveOnSurface interfaces + +Now the classes accept adaptors instead objects as input parameters. +*BRepLib_CheckCurveOnSurface* does no more provide access to curves, surface and parameters: methods PCurve(), PCurve2(), Surface() and Range() have been removed. +*BRepLib_CheckCurveOnSurface*: the default value of the *isMultiThread* parameter of the *Perform()* function has been changed from *true* to *false* +*GeomLib_CheckCurveOnSurface* does no more provide access to curve, surface and parameters: methods Curve(), Surface() and Range() have been removed. +*GeomLib_CheckCurveOnSurface*: the default value of the *isMultiThread* parameter of the *Perform()* function has been changed from *true* to *false* + +The following functions in *GeomLib_CheckCurveOnSurface* have been modified: +~~~~{.cpp} +GeomLib_CheckCurveOnSurface(const Handle(Adaptor3d_Curve)& theCurve, + const Standard_Real theTolRange); + +void Init (const Handle(Adaptor3d_Curve)& theCurve, const Standard_Real theTolRange); + +void Perform(const Handle(Adaptor3d_CurveOnSurface)& theCurveOnSurface, + const Standard_Boolean isMultiThread); +~~~~ \ No newline at end of file diff --git a/dox/user_guides/draw_test_harness/draw_test_harness.md b/dox/user_guides/draw_test_harness/draw_test_harness.md index f86168f4f1..33ca38fc0b 100644 --- a/dox/user_guides/draw_test_harness/draw_test_harness.md +++ b/dox/user_guides/draw_test_harness/draw_test_harness.md @@ -1,4 +1,4 @@ -Draw Test Harness {#occt_user_guides__test_harness} +Draw Test Harness {#occt_user_guides__test_harness} =============================== @tableofcontents @@ -6866,83 +6866,9 @@ tscale c1 0 0 0 0.5 ~~~~ -@subsection occt_draw_7_6 Old Topological operations - - * **fuse**, **cut**, **common** are boolean operations. - * **section**, **psection** compute sections. - * **sewing** joins two or more shapes. - - -@subsubsection occt_draw_7_6_1 fuse, cut, common - -These commands are no longer supported, so the result may be unpredictable. -Use the commands bfuse, bcut, bcommon instead. - -Syntax: -~~~~{.php} -fuse name shape1 shape2 -cut name shape1 shape2 -common name shape1 shape2 -~~~~ - -**fuse** creates a new shape by a boolean operation on two existing shapes. The new shape contains both originals intact. - -**cut** creates a new shape which contains all parts of the second shape but only the first shape without the intersection of the two shapes. - -**common** creates a new shape which contains only what is in common between the two original shapes in their intersection. - -**Example:** -~~~~{.php} -# all four boolean operations on a box and a cylinder - -box b 0 -10 5 20 20 10 -pcylinder c 5 20 - -fuse s1 b c -ttranslate s1 40 0 0 - -cut s2 b c -ttranslate s2 -40 0 0 - -cut s3 c b -ttranslate s3 0 40 0 - -common s4 b c -ttranslate s4 0 -40 0 -~~~~ - - -@subsubsection occt_draw_7_6_2 section, psection - -These commands are no longer supported, so the result may be unpredictable. -Use the command **bsection** instead. - -Syntax: -~~~~{.php} -section result shape1 shape2 -psection name shape plane -~~~~ - -**section** creates a compound object consisting of the edges for the intersection curves on the faces of two shapes. - -**psection** creates a planar section consisting of the edges for the intersection curves on the faces of a shape and a plane. - -**Example:** -~~~~{.php} -# section line between a cylinder and a box -pcylinder c 10 20 -box b 0 0 5 15 15 15 -trotate b 0 0 0 1 1 1 20 -section s b c - -# planar section of a cone -pcone c 10 30 30 -plane p 0 0 15 1 1 2 -psection s c p -~~~~ - -@subsubsection occt_draw_7_6_3 sewing +@subsection occt_draw_7_6 Sewing +**sewing** joins two or more shapes. Syntax: ~~~~{.php} sewing result [tolerance] shape1 shape2 ... @@ -6960,7 +6886,8 @@ whatis sr sr is a shape COMPOUND FORWARD Free Modified ~~~~ -@subsection occt_draw_7_7 New Topological operations + +@subsection occt_draw_7_7 Topological operations The new algorithm of Boolean operations avoids a large number of weak points and limitations presented in the old Boolean operation algorithm. It also provides wider range of options and diagnostics. diff --git a/dox/user_guides/shape_healing/shape_healing.md b/dox/user_guides/shape_healing/shape_healing.md index fbe129932c..cce5db574e 100644 --- a/dox/user_guides/shape_healing/shape_healing.md +++ b/dox/user_guides/shape_healing/shape_healing.md @@ -802,7 +802,7 @@ if (MaxOnVertex > MaxAllowed) { Class ShapeAnalysis_FreeBounds is intended to analyze and output the free bounds of a shape. Free bounds are wires consisting of edges referenced only once by only one face in the shape. This class works on two distinct types of shapes when analyzing their free bounds: -* Analysis of possible free bounds taking the specified tolerance into account. This analysis can be applied to a compound of faces. The analyzer of the sewing algorithm (*BRepAlgo_Sewing*) is used to forecast what free bounds would be obtained after the sewing of these faces is performed. The following method should be used for this analysis: +* Analysis of possible free bounds taking the specified tolerance into account. This analysis can be applied to a compound of faces. The analyzer of the sewing algorithm is used to forecast what free bounds would be obtained after the sewing of these faces is performed. The following method should be used for this analysis: ~~~~{.cpp} ShapeAnalysis_FreeBounds safb(shape,toler); ~~~~ diff --git a/samples/ocafsamples/TNaming_Sample.cxx b/samples/ocafsamples/TNaming_Sample.cxx index fbfcfbde09..1a6320be9d 100644 --- a/samples/ocafsamples/TNaming_Sample.cxx +++ b/samples/ocafsamples/TNaming_Sample.cxx @@ -26,12 +26,10 @@ #include #include -#include - #include #include -#include +#include #include #include @@ -305,7 +303,7 @@ void Sample() ToolSelector.Select(Tool, Tool); const TopoDS_Shape& TOOL = ToolSelector.NamedShape()->Get(); - BRepAlgo_Cut mkCUT (OBJECT, TOOL); + BRepAlgoAPI_Cut mkCUT (OBJECT, TOOL); if (!mkCUT.IsDone()) { std::cout << "CUT: Algorithm failed" << std::endl; @@ -365,8 +363,7 @@ void Sample() // push in the DF section edges TNaming_Builder IntersBuilder(Intersections); - Handle(TopOpeBRepBuild_HBuilder) build = mkCUT.Builder(); - TopTools_ListIteratorOfListOfShape its = build->Section(); + TopTools_ListIteratorOfListOfShape its(mkCUT.SectionEdges()); for (; its.More(); its.Next()) { // TNaming_Evolution == SELECTED IntersBuilder.Select(its.Value(),its.Value()); diff --git a/samples/tcl/cutter.tcl b/samples/tcl/cutter.tcl index 322a77f717..c30f1ece0e 100644 --- a/samples/tcl/cutter.tcl +++ b/samples/tcl/cutter.tcl @@ -34,9 +34,10 @@ bcommon teeth teeth outer tcopy inner profile set nbteeths 25 for {set i 0} {$i < $nbteeths} {incr i} { - fuse profile profile teeth + bfuse profile profile teeth trotate teeth 0 0 0 0 0 1 360./$nbteeths } +unifysamedom profile profile # sweep profile along curved shape diff --git a/samples/tcl/drill.tcl b/samples/tcl/drill.tcl index 6c94899817..4a68cc3ec0 100644 --- a/samples/tcl/drill.tcl +++ b/samples/tcl/drill.tcl @@ -37,8 +37,8 @@ mkface circle1 p0 circle1 mkface circle2 p0 circle2 bcommon sec rectangle1 circle1 -# note use of 'fuse' instead of 'bfuse' -- we need to get single face -fuse sec sec circle2 +bfuse sec sec circle2 +unifysamedom sec sec # Construct flute profile so as to have cutting lip straight after sharpening. # Here we need to take into account spiral shift of the flute edge diff --git a/src/BRepAlgo/BRepAlgo.hxx b/src/BRepAlgo/BRepAlgo.hxx index 1f0c8164b5..57463d1a23 100644 --- a/src/BRepAlgo/BRepAlgo.hxx +++ b/src/BRepAlgo/BRepAlgo.hxx @@ -17,10 +17,6 @@ #ifndef _BRepAlgo_HeaderFile #define _BRepAlgo_HeaderFile -#include -#include -#include - #include #include #include @@ -28,38 +24,22 @@ class TopoDS_Wire; class TopoDS_Edge; class TopoDS_Shape; -class BRepAlgo_BooleanOperation; -class BRepAlgo_Fuse; -class BRepAlgo_Cut; -class BRepAlgo_Common; -class BRepAlgo_Section; -class BRepAlgo_Loop; -class BRepAlgo_Tool; -class BRepAlgo_Image; -class BRepAlgo_AsDes; -class BRepAlgo_FaceRestrictor; -class BRepAlgo_NormalProjection; - -//! The BRepAlgo package provides a full range of -//! services to perform Old Boolean Operations in Open CASCADE. -//! Attention: -//! The New Boolean Operation has replaced the Old -//! Boolean Operations algorithm in the BrepAlgoAPI -//! package in Open CASCADE. +//! The BRepAlgo class provides the following tools for: +//! - Checking validity of the shape; +//! - Concatenation of the edges of the wire. class BRepAlgo { public: - DEFINE_STANDARD_ALLOC - - //! this method makes a wire whose edges are C1 from //! a Wire whose edges could be G1. It removes a vertex //! between G1 edges. //! Option can be G1 or C1. - Standard_EXPORT static TopoDS_Wire ConcatenateWire (const TopoDS_Wire& Wire, const GeomAbs_Shape Option, const Standard_Real AngularTolerance = 1.0e-4); + Standard_EXPORT static TopoDS_Wire ConcatenateWire (const TopoDS_Wire& Wire, + const GeomAbs_Shape Option, + const Standard_Real AngularTolerance = 1.0e-4); //! this method makes an edge from a wire. //! Junction points between edges of wire may be sharp, @@ -78,7 +58,10 @@ public: //! If is False the geometry of new //! vertices and edges are not verified and the //! auto-intersection of new wires are not searched. - Standard_EXPORT static Standard_Boolean IsValid (const TopTools_ListOfShape& theArgs, const TopoDS_Shape& theResult, const Standard_Boolean closedSolid = Standard_False, const Standard_Boolean GeomCtrl = Standard_True); + Standard_EXPORT static Standard_Boolean IsValid (const TopTools_ListOfShape& theArgs, + const TopoDS_Shape& theResult, + const Standard_Boolean closedSolid = Standard_False, + const Standard_Boolean GeomCtrl = Standard_True); //! Checks if the shape is "correct". //! If not, returns FALSE, else returns TRUE. @@ -86,38 +69,6 @@ public: //! (intersection of wires, pcurve validity) are performed. Standard_EXPORT static Standard_Boolean IsTopologicallyValid (const TopoDS_Shape& S); - - - -protected: - - - - - -private: - - - - -friend class BRepAlgo_BooleanOperation; -friend class BRepAlgo_Fuse; -friend class BRepAlgo_Cut; -friend class BRepAlgo_Common; -friend class BRepAlgo_Section; -friend class BRepAlgo_Loop; -friend class BRepAlgo_Tool; -friend class BRepAlgo_Image; -friend class BRepAlgo_AsDes; -friend class BRepAlgo_FaceRestrictor; -friend class BRepAlgo_NormalProjection; - }; - - - - - - #endif // _BRepAlgo_HeaderFile diff --git a/src/BRepAlgo/BRepAlgo_BooleanOperation.cxx b/src/BRepAlgo/BRepAlgo_BooleanOperation.cxx deleted file mode 100644 index f2af2dde3e..0000000000 --- a/src/BRepAlgo/BRepAlgo_BooleanOperation.cxx +++ /dev/null @@ -1,917 +0,0 @@ -// Created on: 1993-10-15 -// Created by: Remi LEQUETTE -// Copyright (c) 1993-1999 Matra Datavision -// Copyright (c) 1999-2014 OPEN CASCADE SAS -// -// This file is part of Open CASCADE Technology software library. -// -// This library is free software; you can redistribute it and/or modify it under -// the terms of the GNU Lesser General Public License version 2.1 as published -// by the Free Software Foundation, with special exception defined in the file -// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT -// distribution for complete text of the license and disclaimer of any warranty. -// -// Alternatively, this file may be used under the terms of Open CASCADE -// commercial license or contractual agreement. - -#define TRC 0 -#define MODIF 1 - - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -// sewing -#ifdef OCCT_DEBUG -extern Standard_Boolean TopOpeBRepTool_GetcontextNOSEW(); -#endif - -#define Opecom(st1,st2) (((st1)==TopAbs_IN) && ((st2)==TopAbs_IN)) -#define Opefus(st1,st2) (((st1)==TopAbs_OUT) && ((st2)==TopAbs_OUT)) -#define Opecut(st1,st2) (((st1)==TopAbs_OUT) && ((st2)==TopAbs_IN)) - -// ------------------------------------------------------------------- -static void Sub_Classify(TopExp_Explorer& Ex, - const TopAbs_State St1, - TopTools_ListOfShape& Solids2, - BRep_Builder& BB, - TopTools_ListIteratorOfListOfShape& LIter, - TopoDS_Shape& myShape); - - -#ifdef OCCT_DEBUG -Standard_IMPORT Standard_Integer TopOpeBRepTool_BOOOPE_CHECK_DEB; -#endif - -//modified by NIZHNY-MZV Wed Apr 19 17:19:11 2000 -//see comments at the top of file TopOpeBRepBuild_Builder1.cxx -//about using of this global variable -extern Standard_Boolean GLOBAL_USE_NEW_BUILDER; -// -//modified by NIZNHY-PKV Sun Dec 15 17:17:56 2002 f -extern void FDSCNX_Close();// see TopOpeBRepDS_connex.cxx -extern void FDSSDM_Close();// see TopOpeBRepDS_samdom.cxx - -//======================================================================= -//function : ~BRepAlgo_BooleanOperation -//purpose : -//======================================================================= -BRepAlgo_BooleanOperation::~BRepAlgo_BooleanOperation() -{ - FDSSDM_Close(); - FDSCNX_Close(); -} -//modified by NIZNHY-PKV Sun Dec 15 17:17:58 2002 t - -//======================================================================= -//function : BRepAlgoAPI_BooleanOperation -//purpose : -//======================================================================= - BRepAlgo_BooleanOperation::BRepAlgo_BooleanOperation(const TopoDS_Shape& S1, - const TopoDS_Shape& S2) -: myS1(S1),myS2(S2),myBuilderCanWork(Standard_False) -{ - TopOpeBRepDS_BuildTool BT; - myHBuilder = new TopOpeBRepBuild_HBuilder(BT); -} - -//======================================================================= -//function : PerformDS -//purpose : -//======================================================================= - void BRepAlgo_BooleanOperation::PerformDS() -{ -// const Standard_Boolean CheckShapes = Standard_True; - - // create a data structure - Handle(TopOpeBRepDS_HDataStructure) HDS; - if (myHBuilder->DataStructure().IsNull()) - HDS = new TopOpeBRepDS_HDataStructure(); - else { - HDS = myHBuilder->DataStructure(); - HDS->ChangeDS().Init(); - } - - // fill the data Structure - TopOpeBRep_DSFiller DSFiller; - - // define face/face intersection tolerances - Standard_Boolean forcetoli = Standard_False; - if (forcetoli) { - Standard_Real tolarc=0,toltang=0; - TopOpeBRep_ShapeIntersector& tobsi = DSFiller.ChangeShapeIntersector(); - TopOpeBRep_FacesIntersector& tobfi = tobsi.ChangeFacesIntersector(); - tobfi.ForceTolerances(tolarc,toltang); - } - DSFiller.Insert(myS1,myS2,HDS); - - // 020499 : JYL : reject if there is an edge of the SD - // not coded sameparameter and not degenerated - Standard_Boolean esp = HDS->EdgesSameParameter(); - Standard_Boolean tede = Standard_True; - if (!esp) { - Standard_Integer i,n = HDS->NbShapes(); - for (i = 1 ; i <= n; i++) { - const TopoDS_Shape& s = HDS->Shape(i); - if ( s.ShapeType() == TopAbs_EDGE ) { - const TopoDS_Edge& e = TopoDS::Edge(s); - Standard_Boolean sp = BRep_Tool::SameParameter(e); - Standard_Boolean de = BRep_Tool::Degenerated(e); - if ( !sp && !de ) { - tede = Standard_False; - break; - } - } - } - } - myBuilderCanWork = (esp || tede) ; -#ifdef OCCT_DEBUG - if (!esp) std::cout<<"BRepAlgo_BooleanOperation(DEB) some edges not SameParameter"<ChangeBuildTool(); - TopOpeBRepTool_GeomTool& GTofBTofBuilder = BTofBuilder.ChangeGeomTool(); - GTofBTofBuilder.SetTolerances(tol3dAPPROX,tol2dAPPROX); - - //modified by NIZHNY-MZV Thu Apr 20 09:35:44 2000 - //see comments at the top of file TopOpeBRepBuild_Builder1.cxx - //about using of this global variable - GLOBAL_USE_NEW_BUILDER = Standard_True; - myHBuilder->Perform(HDS,myS1,myS2); - GLOBAL_USE_NEW_BUILDER = Standard_False; -} - -//======================================================================= -//function : Perform -//purpose : -//======================================================================= - void BRepAlgo_BooleanOperation::Perform(const TopAbs_State St1, - const TopAbs_State St2) -{ - if ( ! BuilderCanWork() ) { - return; - } - - // modif JYL suite aux modifs LBR #if MODIF ... - // on privilegie le traitement KPart (si c'en est un) - // a tous les autres - Standard_Integer kp = myHBuilder->IsKPart(); - BRep_Builder BB; - Standard_Boolean sewing = Standard_True; - if ( kp ) { - //modified by NIZHNY-MZV Thu Apr 20 09:34:33 2000 - //see comments at the top of file TopOpeBRepBuild_Builder1.cxx - //about using of this global variable - GLOBAL_USE_NEW_BUILDER = Standard_True; - myHBuilder->MergeKPart(St1,St2); - GLOBAL_USE_NEW_BUILDER = Standard_False; - - BB.MakeCompound(TopoDS::Compound(myShape)); - Done(); - - TopTools_ListIteratorOfListOfShape its(myHBuilder->Merged(myS1,St1)); - for(; its.More(); its.Next()) BB.Add(myShape,its.Value()); - - } - else { -#if MODIF - - //====================================================================== - //== Exploration of input shapes - //== Creation of the list of solids - //== Creation of the list of faces OUT OF solid - //== Creation of the list of edges OUT OF face - Standard_Integer nbs1,nbs2,nbf1,nbf2,nbe1,nbe2,nbv1,nbv2; - - TopTools_ListOfShape Solids1,Solids2,Faces1,Faces2,Edges1,Edges2,Vertex1,Vertex2; - TopExp_Explorer Ex; - for(Ex.Init(myS1,TopAbs_SOLID),nbs1=0; Ex.More(); Ex.Next()) { - Solids1.Append(Ex.Current()); nbs1++; - } - for(Ex.Init(myS2,TopAbs_SOLID),nbs2=0; Ex.More(); Ex.Next()) { - Solids2.Append(Ex.Current()); nbs2++; - } - //== Faces not in a solid - for(Ex.Init(myS1,TopAbs_FACE,TopAbs_SOLID),nbf1=0; Ex.More(); Ex.Next()) { - Faces1.Append(Ex.Current()); nbf1++; - } - for(Ex.Init(myS2,TopAbs_FACE,TopAbs_SOLID),nbf2=0; Ex.More(); Ex.Next()) { - Faces2.Append(Ex.Current()); nbf2++; - } - //== Edges not in a solid - for(Ex.Init(myS1,TopAbs_EDGE,TopAbs_FACE),nbe1=0; Ex.More(); Ex.Next()) { - Edges1.Append(Ex.Current()); nbe1++; - } - for(Ex.Init(myS2,TopAbs_EDGE,TopAbs_FACE),nbe2=0; Ex.More(); Ex.Next()) { - Edges2.Append(Ex.Current()); nbe2++; - } - //== Vertices not in an edge - for(Ex.Init(myS1,TopAbs_VERTEX,TopAbs_EDGE),nbv1=0; Ex.More(); Ex.Next()) { - Vertex1.Append(Ex.Current()); nbv1++; - } - for(Ex.Init(myS2,TopAbs_VERTEX,TopAbs_EDGE),nbv2=0; Ex.More(); Ex.Next()) { - Vertex2.Append(Ex.Current()); nbv2++; - } - - //-- std::cout<<"Solids1: "<0 && nbs2>0) - && (nbe1 || nbe2 || nbf1 || nbf2 || nbv1 || nbv2)) { - //-- std::cout<<"***** Not Yet Implemented : Compound of solid and non Solid"<Section(); - for(; itloe.More(); itloe.Next()) BB.Add(myShape,itloe.Value()); - } - else { - if(nbf1) { - myHBuilder->MergeShapes(myS1,St1,SNULL,St2); - - for(LIter.Initialize(Faces1);LIter.More();LIter.Next()) { - if (myHBuilder->IsSplit(LIter.Value(),St1)) { - TopTools_ListIteratorOfListOfShape its; - for(its.Initialize(myHBuilder->Splits(LIter.Value(),St1)); - its.More();its.Next()) BB.Add(myShape,its.Value()); - } - else { - const TopoDS_Shape& LV = LIter.Value(); - if( (LV.Orientation() == TopAbs_EXTERNAL && St1==TopAbs_OUT ) - ||(LV.Orientation() == TopAbs_INTERNAL && St1==TopAbs_IN )) { - BB.Add(myShape,LV); - } - else { - //-- Classify : - Sub_Classify(Ex,St1,Solids2,BB,LIter,myShape); - } - //-- End Classification - } - } - } // nbf1 - SNULL.Nullify(); - if ( Opefus(St1,St2) ) { - if(nbf2) { - myHBuilder->MergeShapes(SNULL,St1,myS2,St2); - for(LIter.Initialize(Faces2);LIter.More();LIter.Next()) { - if (myHBuilder->IsSplit(LIter.Value(),St2)) { - TopTools_ListIteratorOfListOfShape its; - for(its.Initialize(myHBuilder->Splits(LIter.Value(),St2)); - its.More();its.Next()) BB.Add(myShape,its.Value()); - } - else { - const TopoDS_Shape& LV = LIter.Value(); - if( (LV.Orientation() == TopAbs_EXTERNAL && St2==TopAbs_OUT ) - ||(LV.Orientation() == TopAbs_INTERNAL && St2==TopAbs_IN )) { - BB.Add(myShape,LV); - } - else { - //-- Classify : - Sub_Classify(Ex,St2,Solids1,BB,LIter,myShape); - } - //-- End Classification - } - } - } // nbf2 - } // Fus - } - } // nbf1 && nbf2 - else if (nbf1 || nbf2) { - SNULL.Nullify(); - if(nbf1) { - myHBuilder->MergeShapes(myS1,St1,SNULL,St2); - // modified by IFV for treating operation between shell and solid - const TopTools_ListOfShape& MergedShapes = myHBuilder->Merged(myS1,St1); - TopTools_IndexedMapOfShape aMapOfFaces; - - sewing = Standard_False; - - if(MergedShapes.Extent() != 0) { - TopTools_ListIteratorOfListOfShape its(MergedShapes); - for(; its.More(); its.Next()) { - BB.Add(myShape,its.Value()); - } - TopExp::MapShapes(myShape, TopAbs_FACE, aMapOfFaces); - } - - for(LIter.Initialize(Faces1);LIter.More();LIter.Next()) { - - if (myHBuilder->IsSplit(LIter.Value(),St1)) { - TopTools_ListIteratorOfListOfShape its; - for(its.Initialize(myHBuilder->Splits(LIter.Value(),St1)); - its.More();its.Next()) { - if(!aMapOfFaces.Contains(its.Value())) BB.Add(myShape,its.Value()); - } - } - else { - const TopoDS_Shape& LV = LIter.Value(); - if(!aMapOfFaces.Contains(LV)) { - if( (LV.Orientation() == TopAbs_EXTERNAL && St1==TopAbs_OUT ) - ||(LV.Orientation() == TopAbs_INTERNAL && St1==TopAbs_IN )) { - BB.Add(myShape,LV); - } - else { - //-- Classify : - Sub_Classify(Ex,St1,Solids2,BB,LIter,myShape); - } - //-- End Classification - } - } - } - } // nbf1 - SNULL.Nullify(); - if(nbf2) { - myHBuilder->MergeShapes(SNULL,St1,myS2,St2); - // modified by IFV for treating operation between shell and solid - const TopTools_ListOfShape& MergedShapes = myHBuilder->Merged(myS2,St2); - TopTools_IndexedMapOfShape aMapOfFaces; - sewing = Standard_False; - - if(MergedShapes.Extent() != 0) { - TopTools_ListIteratorOfListOfShape its(MergedShapes); - for(; its.More(); its.Next()) { - BB.Add(myShape,its.Value()); - } - TopExp::MapShapes(myShape, TopAbs_FACE, aMapOfFaces); - } - - for(LIter.Initialize(Faces2);LIter.More();LIter.Next()) { - if (myHBuilder->IsSplit(LIter.Value(),St2)) { - TopTools_ListIteratorOfListOfShape its; - for(its.Initialize(myHBuilder->Splits(LIter.Value(),St2)); - its.More();its.Next()) { - if(!aMapOfFaces.Contains(its.Value())) BB.Add(myShape,its.Value()); - } - } - else { - const TopoDS_Shape& LV = LIter.Value(); - if(!aMapOfFaces.Contains(LV)) { - if( (LV.Orientation() == TopAbs_EXTERNAL && St2==TopAbs_OUT ) - ||(LV.Orientation() == TopAbs_INTERNAL && St2==TopAbs_IN )) { - BB.Add(myShape,LV); - } - else { - //-- Classify : - Sub_Classify(Ex,St2,Solids1,BB,LIter,myShape); - } - //-- End Classification - } - } - } - } // nbf2 - } // (nbf1 || nbf2) - - //---------------------------------------------------------------------- - if(nbe1) { - myHBuilder->MergeShapes(myS1,St1,SNULL,St2); - - for(LIter.Initialize(Edges1);LIter.More();LIter.Next()) { - if (myHBuilder->IsSplit(LIter.Value(),St1)) { - TopTools_ListIteratorOfListOfShape its; - for(its.Initialize(myHBuilder->Splits(LIter.Value(),St1)); - its.More();its.Next()) { - BB.Add(myShape,its.Value()); - } - } - else { - const TopoDS_Shape& LV = LIter.Value(); - if( (LV.Orientation() == TopAbs_EXTERNAL && St1==TopAbs_OUT ) - ||(LV.Orientation() == TopAbs_INTERNAL && St1==TopAbs_IN )) { - BB.Add(myShape,LV); - } - else { - //-- Classify : - Sub_Classify(Ex,St1,Solids2,BB,LIter,myShape); - } - //-- End Classification - } - } - } - if(nbe2) { - myHBuilder->MergeShapes(SNULL,St1,myS2,St2); - - for(LIter.Initialize(Edges2);LIter.More();LIter.Next()) { - if (myHBuilder->IsSplit(LIter.Value(),St2)) { - TopTools_ListIteratorOfListOfShape its; - for(its.Initialize(myHBuilder->Splits(LIter.Value(),St2)); - its.More();its.Next()) { - BB.Add(myShape,its.Value()); - } - } - else { - const TopoDS_Shape& LV = LIter.Value(); - if( (LV.Orientation() == TopAbs_EXTERNAL && St2==TopAbs_OUT ) - ||(LV.Orientation() == TopAbs_INTERNAL && St2==TopAbs_IN )) { - BB.Add(myShape,LV); - } - else { - //-- Classify : - Sub_Classify(Ex,St2,Solids1,BB,LIter,myShape); - } - //-- End Classification - } - } - } - //---------------------------------------------------------------------- - //-- V1:Vertex1 state1 = OUT -> Preserve V1 if V1 is Out all S2 - //-- V1:Vertex1 state1 = IN -> Preserve V1 if V1 is In one of S2 - if(nbv1 && nbs2) { - if(St1 == TopAbs_IN) { - for(LIter.Initialize(Vertex1);LIter.More();LIter.Next()) { - Standard_Boolean keep = Standard_False; - Standard_Boolean ok = Standard_True; - const TopoDS_Vertex& V=TopoDS::Vertex(LIter.Value()); - gp_Pnt P=BRep_Tool::Pnt(V); - Standard_Real Tol = BRep_Tool::Tolerance(V); - TopTools_ListIteratorOfListOfShape SIter; - for(SIter.Initialize(Solids2); - SIter.More() && ok==Standard_True; - SIter.Next()) { - BRepClass3d_SolidClassifier SolClass(SIter.Value()); - SolClass.Perform(P,Tol); - if(SolClass.State() == TopAbs_IN) { - ok=Standard_False; - keep = Standard_True; - } - } - if(keep) { - BB.Add(myShape,LIter.Value()); - } - } - } - else { - if(St1 == TopAbs_OUT) { - for(LIter.Initialize(Vertex1);LIter.More();LIter.Next()) { - Standard_Boolean keep = Standard_True; - Standard_Boolean ok = Standard_True; - const TopoDS_Vertex& V=TopoDS::Vertex(LIter.Value()); - gp_Pnt P=BRep_Tool::Pnt(V); - Standard_Real Tol = BRep_Tool::Tolerance(V); - TopTools_ListIteratorOfListOfShape SIter; - for(SIter.Initialize(Solids2); - SIter.More() && ok==Standard_True; - SIter.Next()) { - BRepClass3d_SolidClassifier SolClass(SIter.Value()); - SolClass.Perform(P,Tol); - if(SolClass.State() != TopAbs_OUT) { - keep = Standard_False; - ok = Standard_False; - } - } - if(keep) { - BB.Add(myShape,LIter.Value()); - } - } - } - } - } - - if(nbv2 && nbs1) { - if(St2 == TopAbs_IN) { - for(LIter.Initialize(Vertex2);LIter.More();LIter.Next()) { - Standard_Boolean keep = Standard_False; - Standard_Boolean ok = Standard_True; - const TopoDS_Vertex& V=TopoDS::Vertex(LIter.Value()); - gp_Pnt P=BRep_Tool::Pnt(V); - Standard_Real Tol = BRep_Tool::Tolerance(V); - TopTools_ListIteratorOfListOfShape SIter; - for(SIter.Initialize(Solids1); - SIter.More() && ok==Standard_True; - SIter.Next()) { - BRepClass3d_SolidClassifier SolClass(SIter.Value()); - SolClass.Perform(P,Tol); - if(SolClass.State() == TopAbs_IN) { - ok=Standard_False; - keep = Standard_True; - } - } - if(keep) { - BB.Add(myShape,LIter.Value()); - } - } - } - else { - if(St2 == TopAbs_OUT) { - for(LIter.Initialize(Vertex2);LIter.More();LIter.Next()) { - Standard_Boolean keep = Standard_True; - Standard_Boolean ok = Standard_True; - const TopoDS_Vertex& V=TopoDS::Vertex(LIter.Value()); - gp_Pnt P=BRep_Tool::Pnt(V); - Standard_Real Tol = BRep_Tool::Tolerance(V); - TopTools_ListIteratorOfListOfShape SIter; - for(SIter.Initialize(Solids1); - SIter.More() && ok==Standard_True; - SIter.Next()) { - BRepClass3d_SolidClassifier SolClass(SIter.Value()); - SolClass.Perform(P,Tol); - if(SolClass.State() != TopAbs_OUT) { - keep = Standard_False; - ok = Standard_False; - } - } - if(keep) { - BB.Add(myShape,LIter.Value()); - } - } - } - } - } - - if(nbs1 && nbs2 ) { - myHBuilder->MergeShapes(myS1,St1,myS2,St2); - if(myHBuilder->IsMerged(myS1,St1)) { - TopTools_ListIteratorOfListOfShape its; - its = myHBuilder->Merged(myS1,St1); - Standard_Integer nbSolids = 0; - for(; its.More(); its.Next(), nbSolids++) { - BB.Add(myShape,its.Value()); - } - } - } - -#else - - myHBuilder->MergeSolids(myS1,St1,myS2,St2); - TopTools_ListIteratorOfListOfShape its; - - BB.MakeCompound(TopoDS::Compound(myShape)); - its = myHBuilder->Merged(myS1,St1); - while (its.More()) { - BB.Add(myShape,its.Value()); - its.Next(); - } - -#endif -// #if MODIF - - } - - // Creation of the Map used in IsDeleted. - TopExp_Explorer ex; - ex.Init(myShape,TopAbs_FACE); - for (; ex.More(); ex.Next()) myMap.Add(ex.Current()); - ex.Init(myShape,TopAbs_EDGE); // for FRIKO - for (; ex.More(); ex.Next()) myMap.Add(ex.Current()); - - // Checking same parameter of new edges of section - Standard_Real eTol,cTol; - for (myHBuilder->InitSection(1); - myHBuilder->MoreSection(); - myHBuilder->NextSection()) { - const TopoDS_Shape& cur = myHBuilder->CurrentSection(); - if (cur.ShapeType()==TopAbs_EDGE) { - BRepCheck_Edge bce(TopoDS::Edge(cur)); - cTol=bce.Tolerance(); - eTol = BRep_Tool::Tolerance(TopoDS::Edge(cur)); - if (eTolChangeBuildTool(); - TopOpeBRepTool_GeomTool& GTofBTofBuilder = BTofBuilder.ChangeGeomTool(); - - GTofBTofBuilder.Define(TopOpeBRepTool_APPROX); - GTofBTofBuilder.DefineCurves(Standard_True); - GTofBTofBuilder.DefinePCurves1(Standard_True); - GTofBTofBuilder.DefinePCurves2(Standard_True); -} - -//======================================================================= -//function : Modified -//purpose : -//======================================================================= -const TopTools_ListOfShape& BRepAlgo_BooleanOperation::Modified(const TopoDS_Shape& S) -{ - myGenerated.Clear(); - TopTools_MapOfShape aMap; // to check if shape can be added in list more then one time - aMap.Clear(); - if (myHBuilder->IsSplit(S, TopAbs_OUT)) { - TopTools_ListIteratorOfListOfShape It(myHBuilder->Splits(S, TopAbs_OUT)); - for(;It.More();It.Next()) { - if (topToSew.IsBound(It.Value())) - {if(aMap.Add(topToSew.Find(It.Value()))) myGenerated.Append(topToSew.Find(It.Value()));} - else - {if(aMap.Add(It.Value())) myGenerated.Append(It.Value());} - } - } - if (myHBuilder->IsSplit(S, TopAbs_IN)) { - TopTools_ListIteratorOfListOfShape It(myHBuilder->Splits(S, TopAbs_IN)); - for(;It.More();It.Next()) { - if (topToSew.IsBound(It.Value())) - {if(aMap.Add(topToSew.Find(It.Value()))) myGenerated.Append(topToSew.Find(It.Value()));} - else - {if(aMap.Add(It.Value())) myGenerated.Append(It.Value());} - } - } - if (myHBuilder->IsSplit(S, TopAbs_ON)) { - TopTools_ListIteratorOfListOfShape It(myHBuilder->Splits(S, TopAbs_ON)); - for(;It.More();It.Next()) { - if (topToSew.IsBound(It.Value())) - {if(aMap.Add(topToSew.Find(It.Value()))) myGenerated.Append(topToSew.Find(It.Value()));} - else - {if(aMap.Add(It.Value())) myGenerated.Append(It.Value());} - } - } - - if (myHBuilder->IsMerged(S, TopAbs_OUT)) { - TopTools_ListIteratorOfListOfShape It(myHBuilder->Merged(S, TopAbs_OUT)); - for(;It.More();It.Next()) { - if (topToSew.IsBound(It.Value())) - {if(aMap.Add(topToSew.Find(It.Value()))) myGenerated.Append(topToSew.Find(It.Value()));} - else - {if(aMap.Add(It.Value())) myGenerated.Append(It.Value());} - } - } - if (myHBuilder->IsMerged(S, TopAbs_IN)) { - TopTools_ListIteratorOfListOfShape It(myHBuilder->Merged(S, TopAbs_IN)); - for(;It.More();It.Next()) { - if (topToSew.IsBound(It.Value())) - {if(aMap.Add(topToSew.Find(It.Value()))) myGenerated.Append(topToSew.Find(It.Value()));} - else - {if(aMap.Add(It.Value())) myGenerated.Append(It.Value());} - } - } - if (myHBuilder->IsMerged(S, TopAbs_ON)) { - TopTools_ListIteratorOfListOfShape It(myHBuilder->Merged(S, TopAbs_ON)); - for(;It.More();It.Next()) { - if (topToSew.IsBound(It.Value())) - {if(aMap.Add(topToSew.Find(It.Value()))) myGenerated.Append(topToSew.Find(It.Value()));} - else - {if(aMap.Add(It.Value())) myGenerated.Append(It.Value());} - } - } - return myGenerated; -} - - -//======================================================================= -//function : IsDeleted -//purpose : -//======================================================================= -Standard_Boolean BRepAlgo_BooleanOperation::IsDeleted(const TopoDS_Shape& S) -{ - Standard_Boolean Deleted = Standard_True; - if (myMap.Contains(S) || - myHBuilder->IsMerged(S, TopAbs_OUT) || - myHBuilder->IsMerged(S, TopAbs_IN) || - myHBuilder->IsMerged(S, TopAbs_ON) || - myHBuilder->IsSplit (S, TopAbs_OUT) || - myHBuilder->IsSplit (S, TopAbs_IN) || - myHBuilder->IsSplit (S, TopAbs_ON)) - return Standard_False; - - return Deleted; -} diff --git a/src/BRepAlgo/BRepAlgo_BooleanOperation.hxx b/src/BRepAlgo/BRepAlgo_BooleanOperation.hxx deleted file mode 100644 index 69f20024ab..0000000000 --- a/src/BRepAlgo/BRepAlgo_BooleanOperation.hxx +++ /dev/null @@ -1,108 +0,0 @@ -// Created on: 1993-10-14 -// Created by: Remi LEQUETTE -// Copyright (c) 1993-1999 Matra Datavision -// Copyright (c) 1999-2014 OPEN CASCADE SAS -// -// This file is part of Open CASCADE Technology software library. -// -// This library is free software; you can redistribute it and/or modify it under -// the terms of the GNU Lesser General Public License version 2.1 as published -// by the Free Software Foundation, with special exception defined in the file -// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT -// distribution for complete text of the license and disclaimer of any warranty. -// -// Alternatively, this file may be used under the terms of Open CASCADE -// commercial license or contractual agreement. - -#ifndef _BRepAlgo_BooleanOperation_HeaderFile -#define _BRepAlgo_BooleanOperation_HeaderFile - -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -class TopOpeBRepBuild_HBuilder; -class TopoDS_Shape; - - -//! The abstract class BooleanOperation is the root -//! class of Boolean operations. -//! A BooleanOperation object stores the two shapes in -//! preparation for the Boolean operation specified in -//! one of the classes inheriting from this one. These include: -//! - Common -//! - Cut -//! - Fuse -//! - Section. -class BRepAlgo_BooleanOperation : public BRepBuilderAPI_MakeShape -{ -public: - - DEFINE_STANDARD_ALLOC - - Standard_EXPORT virtual ~BRepAlgo_BooleanOperation(); - - Standard_EXPORT void PerformDS(); - - Standard_EXPORT void Perform (const TopAbs_State St1, const TopAbs_State St2); - - Standard_EXPORT Handle(TopOpeBRepBuild_HBuilder) Builder() const; - - //! Returns the first shape involved in this Boolean operation. - Standard_EXPORT const TopoDS_Shape& Shape1() const; - - //! Returns the second shape involved in this Boolean operation. - Standard_EXPORT const TopoDS_Shape& Shape2() const; - - //! Returns the list of shapes modified from the shape - //! . - Standard_EXPORT virtual const TopTools_ListOfShape& Modified (const TopoDS_Shape& S) Standard_OVERRIDE; - - Standard_EXPORT virtual Standard_Boolean IsDeleted (const TopoDS_Shape& S) Standard_OVERRIDE; - - - - -protected: - - - //! Prepares the operations for S1 and S2. - Standard_EXPORT BRepAlgo_BooleanOperation(const TopoDS_Shape& S1, const TopoDS_Shape& S2); - - Standard_EXPORT void BuilderCanWork (const Standard_Boolean B); - - Standard_EXPORT Standard_Boolean BuilderCanWork() const; - - Standard_EXPORT virtual void InitParameters(); - - - Handle(TopOpeBRepBuild_HBuilder) myHBuilder; - TopoDS_Shape myS1; - TopoDS_Shape myS2; - - -private: - - - - TopTools_MapOfShape myMap; - Standard_Boolean myBuilderCanWork; - TopTools_DataMapOfShapeShape topToSew; - - -}; - - - - - - - -#endif // _BRepAlgo_BooleanOperation_HeaderFile diff --git a/src/BRepAlgo/BRepAlgo_CheckStatus.hxx b/src/BRepAlgo/BRepAlgo_CheckStatus.hxx deleted file mode 100644 index bac79edd57..0000000000 --- a/src/BRepAlgo/BRepAlgo_CheckStatus.hxx +++ /dev/null @@ -1,27 +0,0 @@ -// Created on: 1997-01-17 -// Created by: Didier PIFFAULT -// 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 _BRepAlgo_CheckStatus_HeaderFile -#define _BRepAlgo_CheckStatus_HeaderFile - - -enum BRepAlgo_CheckStatus -{ -BRepAlgo_OK, -BRepAlgo_NOK -}; - -#endif // _BRepAlgo_CheckStatus_HeaderFile diff --git a/src/BRepAlgo/BRepAlgo_Common.cxx b/src/BRepAlgo/BRepAlgo_Common.cxx deleted file mode 100644 index dc2a1d3e00..0000000000 --- a/src/BRepAlgo/BRepAlgo_Common.cxx +++ /dev/null @@ -1,36 +0,0 @@ -// Created on: 1993-10-15 -// Created by: Remi LEQUETTE -// Copyright (c) 1993-1999 Matra Datavision -// Copyright (c) 1999-2014 OPEN CASCADE SAS -// -// This file is part of Open CASCADE Technology software library. -// -// This library is free software; you can redistribute it and/or modify it under -// the terms of the GNU Lesser General Public License version 2.1 as published -// by the Free Software Foundation, with special exception defined in the file -// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT -// distribution for complete text of the license and disclaimer of any warranty. -// -// Alternatively, this file may be used under the terms of Open CASCADE -// commercial license or contractual agreement. - - -#include -#include - -Standard_DISABLE_DEPRECATION_WARNINGS - -//======================================================================= -//function : BRepAlgo_Common -//purpose : -//======================================================================= -BRepAlgo_Common::BRepAlgo_Common(const TopoDS_Shape& S1, - const TopoDS_Shape& S2) -: BRepAlgo_BooleanOperation(S1,S2) -{ - InitParameters(); - PerformDS(); - Perform(TopAbs_IN,TopAbs_IN); -} - -Standard_ENABLE_DEPRECATION_WARNINGS diff --git a/src/BRepAlgo/BRepAlgo_Common.hxx b/src/BRepAlgo/BRepAlgo_Common.hxx deleted file mode 100644 index 4a8b4d0157..0000000000 --- a/src/BRepAlgo/BRepAlgo_Common.hxx +++ /dev/null @@ -1,68 +0,0 @@ -// Created on: 1993-10-14 -// Created by: Remi LEQUETTE -// Copyright (c) 1993-1999 Matra Datavision -// Copyright (c) 1999-2014 OPEN CASCADE SAS -// -// This file is part of Open CASCADE Technology software library. -// -// This library is free software; you can redistribute it and/or modify it under -// the terms of the GNU Lesser General Public License version 2.1 as published -// by the Free Software Foundation, with special exception defined in the file -// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT -// distribution for complete text of the license and disclaimer of any warranty. -// -// Alternatively, this file may be used under the terms of Open CASCADE -// commercial license or contractual agreement. - -#ifndef _BRepAlgo_Common_HeaderFile -#define _BRepAlgo_Common_HeaderFile - -#include -#include -#include - -#include -class TopoDS_Shape; - - -//! Describes functions for performing a topological -//! common operation (Boolean intersection). -//! A Common object provides the framework for: -//! - defining the construction of a common shape, -//! - implementing the construction algorithm, and -//! - consulting the result. -class Standard_DEPRECATED("This class is deprecated - BRepAlgoAPI_Common should be used instead") - BRepAlgo_Common : public BRepAlgo_BooleanOperation -{ -public: - - DEFINE_STANDARD_ALLOC - - - //! Constructs the common part of shapes S1 and S2. - Standard_EXPORT BRepAlgo_Common(const TopoDS_Shape& S1, const TopoDS_Shape& S2); - - - - -protected: - - - - - -private: - - - - - -}; - - - - - - - -#endif // _BRepAlgo_Common_HeaderFile diff --git a/src/BRepAlgo/BRepAlgo_Cut.cxx b/src/BRepAlgo/BRepAlgo_Cut.cxx deleted file mode 100644 index c180c762bc..0000000000 --- a/src/BRepAlgo/BRepAlgo_Cut.cxx +++ /dev/null @@ -1,36 +0,0 @@ -// Created on: 1993-10-15 -// Created by: Remi LEQUETTE -// Copyright (c) 1993-1999 Matra Datavision -// Copyright (c) 1999-2014 OPEN CASCADE SAS -// -// This file is part of Open CASCADE Technology software library. -// -// This library is free software; you can redistribute it and/or modify it under -// the terms of the GNU Lesser General Public License version 2.1 as published -// by the Free Software Foundation, with special exception defined in the file -// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT -// distribution for complete text of the license and disclaimer of any warranty. -// -// Alternatively, this file may be used under the terms of Open CASCADE -// commercial license or contractual agreement. - - -#include -#include - -Standard_DISABLE_DEPRECATION_WARNINGS - -//======================================================================= -//function : BRepAlgo_Cut -//purpose : -//======================================================================= -BRepAlgo_Cut::BRepAlgo_Cut(const TopoDS_Shape& S1, - const TopoDS_Shape& S2) -: BRepAlgo_BooleanOperation(S1,S2) -{ - InitParameters(); - PerformDS(); - Perform(TopAbs_OUT,TopAbs_IN); -} - -Standard_ENABLE_DEPRECATION_WARNINGS diff --git a/src/BRepAlgo/BRepAlgo_Cut.hxx b/src/BRepAlgo/BRepAlgo_Cut.hxx deleted file mode 100644 index 7b35738a64..0000000000 --- a/src/BRepAlgo/BRepAlgo_Cut.hxx +++ /dev/null @@ -1,68 +0,0 @@ -// Created on: 1993-10-14 -// Created by: Remi LEQUETTE -// Copyright (c) 1993-1999 Matra Datavision -// Copyright (c) 1999-2014 OPEN CASCADE SAS -// -// This file is part of Open CASCADE Technology software library. -// -// This library is free software; you can redistribute it and/or modify it under -// the terms of the GNU Lesser General Public License version 2.1 as published -// by the Free Software Foundation, with special exception defined in the file -// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT -// distribution for complete text of the license and disclaimer of any warranty. -// -// Alternatively, this file may be used under the terms of Open CASCADE -// commercial license or contractual agreement. - -#ifndef _BRepAlgo_Cut_HeaderFile -#define _BRepAlgo_Cut_HeaderFile - -#include -#include -#include - -#include -class TopoDS_Shape; - - -//! Describes functions for performing a topological cut -//! operation (Boolean subtraction). -//! A Cut object provides the framework for: -//! - defining the construction of a cut shape, -//! - implementing the construction algorithm, and -//! - consulting the result. -class Standard_DEPRECATED("This class is deprecated - BRepAlgoAPI_Cut should be used instead") - BRepAlgo_Cut : public BRepAlgo_BooleanOperation -{ -public: - - DEFINE_STANDARD_ALLOC - - - //! Cuts the shape S2 from the shape S1. - Standard_EXPORT BRepAlgo_Cut(const TopoDS_Shape& S1, const TopoDS_Shape& S2); - - - - -protected: - - - - - -private: - - - - - -}; - - - - - - - -#endif // _BRepAlgo_Cut_HeaderFile diff --git a/src/BRepAlgo/BRepAlgo_Fuse.cxx b/src/BRepAlgo/BRepAlgo_Fuse.cxx deleted file mode 100644 index f36dbbb3ee..0000000000 --- a/src/BRepAlgo/BRepAlgo_Fuse.cxx +++ /dev/null @@ -1,36 +0,0 @@ -// Created on: 1993-10-15 -// Created by: Remi LEQUETTE -// Copyright (c) 1993-1999 Matra Datavision -// Copyright (c) 1999-2014 OPEN CASCADE SAS -// -// This file is part of Open CASCADE Technology software library. -// -// This library is free software; you can redistribute it and/or modify it under -// the terms of the GNU Lesser General Public License version 2.1 as published -// by the Free Software Foundation, with special exception defined in the file -// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT -// distribution for complete text of the license and disclaimer of any warranty. -// -// Alternatively, this file may be used under the terms of Open CASCADE -// commercial license or contractual agreement. - - -#include -#include - -Standard_DISABLE_DEPRECATION_WARNINGS - -//======================================================================= -//function : BRepAlgo_Fuse -//purpose : -//======================================================================= -BRepAlgo_Fuse::BRepAlgo_Fuse(const TopoDS_Shape& S1, - const TopoDS_Shape& S2) -: BRepAlgo_BooleanOperation(S1,S2) -{ - InitParameters(); - PerformDS(); - Perform(TopAbs_OUT,TopAbs_OUT); -} - -Standard_ENABLE_DEPRECATION_WARNINGS diff --git a/src/BRepAlgo/BRepAlgo_Fuse.hxx b/src/BRepAlgo/BRepAlgo_Fuse.hxx deleted file mode 100644 index 432b70a300..0000000000 --- a/src/BRepAlgo/BRepAlgo_Fuse.hxx +++ /dev/null @@ -1,68 +0,0 @@ -// Created on: 1993-10-14 -// Created by: Remi LEQUETTE -// Copyright (c) 1993-1999 Matra Datavision -// Copyright (c) 1999-2014 OPEN CASCADE SAS -// -// This file is part of Open CASCADE Technology software library. -// -// This library is free software; you can redistribute it and/or modify it under -// the terms of the GNU Lesser General Public License version 2.1 as published -// by the Free Software Foundation, with special exception defined in the file -// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT -// distribution for complete text of the license and disclaimer of any warranty. -// -// Alternatively, this file may be used under the terms of Open CASCADE -// commercial license or contractual agreement. - -#ifndef _BRepAlgo_Fuse_HeaderFile -#define _BRepAlgo_Fuse_HeaderFile - -#include -#include -#include - -#include -class TopoDS_Shape; - - -//! Describes functions for performing a topological -//! fusion operation (Boolean union). -//! A Fuse object provides the framework for: -//! - defining the construction of a fused shape, -//! - implementing the construction algorithm, and -//! - consulting the result. -class Standard_DEPRECATED("This class is deprecated - BRepAlgoAPI_Fuse should be used instead") - BRepAlgo_Fuse : public BRepAlgo_BooleanOperation -{ -public: - - DEFINE_STANDARD_ALLOC - - - //! Fuse S1 and S2. - Standard_EXPORT BRepAlgo_Fuse(const TopoDS_Shape& S1, const TopoDS_Shape& S2); - - - - -protected: - - - - - -private: - - - - - -}; - - - - - - - -#endif // _BRepAlgo_Fuse_HeaderFile diff --git a/src/BRepAlgo/BRepAlgo_Section.cxx b/src/BRepAlgo/BRepAlgo_Section.cxx deleted file mode 100644 index cc713e63fa..0000000000 --- a/src/BRepAlgo/BRepAlgo_Section.cxx +++ /dev/null @@ -1,358 +0,0 @@ -// Created on: 1994-02-18 -// Created by: Remi LEQUETTE -// Copyright (c) 1994-1999 Matra Datavision -// Copyright (c) 1999-2014 OPEN CASCADE SAS -// -// This file is part of Open CASCADE Technology software library. -// -// This library is free software; you can redistribute it and/or modify it under -// the terms of the GNU Lesser General Public License version 2.1 as published -// by the Free Software Foundation, with special exception defined in the file -// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT -// distribution for complete text of the license and disclaimer of any warranty. -// -// Alternatively, this file may be used under the terms of Open CASCADE -// commercial license or contractual agreement. - - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -static TopoDS_Shape MakeShape(const Handle(Geom_Surface)& ); - -Standard_DISABLE_DEPRECATION_WARNINGS - -//======================================================================= -//function : BRepAlgo_Section -//purpose : -//======================================================================= - BRepAlgo_Section::BRepAlgo_Section(const TopoDS_Shape& S1, - const TopoDS_Shape& S2, - const Standard_Boolean PerformNow) -: BRepAlgo_BooleanOperation(S1, S2) -{ - InitParameters(); - myS1Changed = Standard_True; - myS2Changed = Standard_True; - if(myS1.IsNull() || S2.IsNull()) { - myshapeisnull = Standard_True; - } - if (PerformNow) - Build(); -} - -//======================================================================= -//function : BRepAlgo_Section -//purpose : -//======================================================================= - BRepAlgo_Section::BRepAlgo_Section(const TopoDS_Shape& S1, - const gp_Pln& Pl, - const Standard_Boolean PerformNow) -: BRepAlgo_BooleanOperation(S1, MakeShape(new Geom_Plane(Pl))) -{ - InitParameters(); - myS1Changed = Standard_True; - myS2Changed = Standard_True; - if(S1.IsNull() || myS2.IsNull()) { - myshapeisnull = Standard_True; - } - if (PerformNow) - Build(); -} - -//======================================================================= -//function : BRepAlgo_Section -//purpose : -//======================================================================= - BRepAlgo_Section::BRepAlgo_Section(const TopoDS_Shape& S1, - const Handle(Geom_Surface)& Sf, - const Standard_Boolean PerformNow) -: BRepAlgo_BooleanOperation(S1, MakeShape(Sf)) -{ - InitParameters(); - myS1Changed = Standard_True; - myS2Changed = Standard_True; - if(S1.IsNull() || myS2.IsNull()) { - myshapeisnull = Standard_True; - } - if (PerformNow) - Build(); -} - -//======================================================================= -//function : BRepAlgo_Section -//purpose : -//======================================================================= - BRepAlgo_Section::BRepAlgo_Section(const Handle(Geom_Surface)& Sf, - const TopoDS_Shape& S2, - const Standard_Boolean PerformNow) -: BRepAlgo_BooleanOperation(MakeShape(Sf), S2) -{ - InitParameters(); - myS1Changed = Standard_True; - myS2Changed = Standard_True; - if(myS1.IsNull() || S2.IsNull()) { - myshapeisnull = Standard_True; - } - if (PerformNow) - Build(); -} - -//======================================================================= -//function : BRepAlgo_Section -//purpose : -//======================================================================= - BRepAlgo_Section::BRepAlgo_Section(const Handle(Geom_Surface)& Sf1, - const Handle(Geom_Surface)& Sf2, - const Standard_Boolean PerformNow) -: BRepAlgo_BooleanOperation(MakeShape(Sf1), MakeShape(Sf2)) -{ - InitParameters(); - myS1Changed = Standard_True; - myS2Changed = Standard_True; - if(myS1.IsNull() || myS2.IsNull()) { - myshapeisnull = Standard_True; - } - if (PerformNow) - Build(); -} - -//======================================================================= -//function : Init1 -//purpose : initialize the first Shape -//======================================================================= - void BRepAlgo_Section::Init1(const TopoDS_Shape& S1) -{ - if(!S1.IsNull()) { - if (!S1.IsEqual(myS1)) { - myS1 = S1; - myS1Changed = Standard_True; - } - } else { - if(!myS1.IsNull()) { - myS1 = S1; - myS1Changed = Standard_True; - } - } - if (myS1Changed || myS2Changed) - NotDone(); -} - -//======================================================================= -//function : Init1 -//purpose : initialize the first Shape -//======================================================================= - void BRepAlgo_Section::Init1(const gp_Pln& Pl) -{ - Init1(MakeShape(new Geom_Plane(Pl))); -} - -//======================================================================= -//function : Init1 -//purpose : initialize the first Shape -//======================================================================= - void BRepAlgo_Section::Init1(const Handle(Geom_Surface)& Sf) -{ - Init1(MakeShape(Sf)); -} - -//======================================================================= -//function : Init2 -//purpose : initialize the second Shape -//======================================================================= - void BRepAlgo_Section::Init2(const TopoDS_Shape& S2) -{ - if(!S2.IsNull()) { - if (!S2.IsEqual(myS2)) { - myS2 = S2; - myS2Changed = Standard_True; - } - } else { - if(!myS2.IsNull()) { - myS2 = S2; - myS2Changed = Standard_True; - } - } - if (myS1Changed || myS2Changed) - NotDone(); -} - -//======================================================================= -//function : Init2 -//purpose : initialize the second Shape -//======================================================================= - void BRepAlgo_Section::Init2(const gp_Pln& Pl) -{ - Init2(MakeShape(new Geom_Plane(Pl))); -} - -//======================================================================= -//function : Init2 -//purpose : initialize the second Shape -//======================================================================= - void BRepAlgo_Section::Init2(const Handle(Geom_Surface)& Sf) -{ - Init2(MakeShape(Sf)); -} - -//======================================================================= -//function : Approximation -//purpose : To learn if an approximation of the geometry is calculated -//======================================================================= - void BRepAlgo_Section::Approximation(const Standard_Boolean Approx) -{ - TopOpeBRepDS_BuildTool& BTofBuilder = myHBuilder->ChangeBuildTool(); - TopOpeBRepTool_GeomTool& GTofBTofBuilder = BTofBuilder.ChangeGeomTool(); - - TopOpeBRepTool_OutCurveType OCT = - (Approx) ? TopOpeBRepTool_APPROX :TopOpeBRepTool_BSPLINE1; - if (GTofBTofBuilder.TypeC3D() != OCT) { - myApproxChanged = Standard_True; - GTofBTofBuilder.Define(OCT); - } - - if (myApproxChanged) - NotDone(); -} - -//======================================================================= -//function : ComputePCurveOn1 -//purpose : To learn if PCurves are calculated on the faces of the 1st Shape -//======================================================================= - void BRepAlgo_Section::ComputePCurveOn1(const Standard_Boolean ComputePCurve1) -{ - TopOpeBRepDS_BuildTool& BTofBuilder = myHBuilder->ChangeBuildTool(); - TopOpeBRepTool_GeomTool& GTofBTofBuilder = BTofBuilder.ChangeGeomTool(); - - if( GTofBTofBuilder.CompPC1() != ComputePCurve1) { - GTofBTofBuilder.DefinePCurves1(ComputePCurve1); - myPCurve1Changed = Standard_True; - } - - if(myPCurve1Changed) - NotDone(); -} - -//======================================================================= -//function : ComputePCurve2 -//purpose : To learn if PCurves are calculated on the faces of the 2nd Shape -//======================================================================= - void BRepAlgo_Section::ComputePCurveOn2(const Standard_Boolean ComputePCurve2) -{ - TopOpeBRepDS_BuildTool& BTofBuilder = myHBuilder->ChangeBuildTool(); - TopOpeBRepTool_GeomTool& GTofBTofBuilder = BTofBuilder.ChangeGeomTool(); - - if( GTofBTofBuilder.CompPC2() != ComputePCurve2) { - GTofBTofBuilder.DefinePCurves2(ComputePCurve2); - myPCurve2Changed = Standard_True; - } - - if(myPCurve2Changed) - NotDone(); -} - -//======================================================================= -//function : Build -//purpose : compute the section -//======================================================================= - void BRepAlgo_Section::Build(const Message_ProgressRange& /*theRange*/) -{ - if (myS1Changed || - myS2Changed || - myApproxChanged || - myPCurve1Changed || - myPCurve2Changed) { - PerformDS(); - Standard_Boolean bcw = BuilderCanWork(); - if ( ! bcw || myshapeisnull) return; - BRep_Builder BB; - BB.MakeCompound(TopoDS::Compound(myShape)); - Handle(TopOpeBRepBuild_HBuilder) HB = Builder(); - TopTools_ListIteratorOfListOfShape itloe = HB->Section(); - for(; itloe.More(); itloe.Next()) BB.Add(myShape,itloe.Value()); - - TopOpeBRepBuild_Tools::CorrectTolerances(myShape); - - - Done(); - } - - -} - -//======================================================================= -//function : HasAncestorFaceOn1 -//purpose : -//======================================================================= - Standard_Boolean BRepAlgo_Section::HasAncestorFaceOn1(const TopoDS_Shape& E, - TopoDS_Shape& F)const -{ - TopoDS_Shape F1,F2; Standard_Integer iC; - Standard_Boolean res = myHBuilder->EdgeCurveAncestors(E,F1,F2,iC); - if ( res ) F = F1; - return res; -} - -//======================================================================= -//function : HasAncestorFaceOn2 -//purpose : -//======================================================================= - Standard_Boolean BRepAlgo_Section::HasAncestorFaceOn2(const TopoDS_Shape& E, - TopoDS_Shape& F)const -{ - TopoDS_Shape F1,F2; Standard_Integer iC; - Standard_Boolean res = myHBuilder->EdgeCurveAncestors(E,F1,F2,iC); - if ( res ) F = F2; - return res; -} - -//======================================================================= -//function : InitParameters -//purpose : initialize the fields of the class -//======================================================================= - void BRepAlgo_Section::InitParameters() -{ - TopOpeBRepDS_BuildTool& BTofBuilder = myHBuilder->ChangeBuildTool(); - TopOpeBRepTool_GeomTool& GTofBTofBuilder = BTofBuilder.ChangeGeomTool(); - - GTofBTofBuilder.Define(TopOpeBRepTool_BSPLINE1); - GTofBTofBuilder.DefineCurves(Standard_True); - GTofBTofBuilder.DefinePCurves1(Standard_False); - GTofBTofBuilder.DefinePCurves2(Standard_False); - - myS1Changed = Standard_False; - myS2Changed = Standard_False; - // - myApproxChanged = Standard_False; - // - myPCurve1Changed = Standard_False; - // - myPCurve2Changed = Standard_False; - myshapeisnull = Standard_False; -} -//======================================================================= -//function : MakeShape -//purpose : -//======================================================================= -TopoDS_Shape MakeShape(const Handle(Geom_Surface)& S) -{ - GeomAbs_Shape c = S->Continuity(); - if (c >= GeomAbs_C2) return BRepBuilderAPI_MakeFace(S, Precision::Confusion()); - else return BRepBuilderAPI_MakeShell(S); -} - -Standard_ENABLE_DEPRECATION_WARNINGS diff --git a/src/BRepAlgo/BRepAlgo_Section.hxx b/src/BRepAlgo/BRepAlgo_Section.hxx deleted file mode 100644 index ba5f98247f..0000000000 --- a/src/BRepAlgo/BRepAlgo_Section.hxx +++ /dev/null @@ -1,355 +0,0 @@ -// Created on: 1994-02-18 -// Created by: Remi LEQUETTE -// Copyright (c) 1994-1999 Matra Datavision -// Copyright (c) 1999-2014 OPEN CASCADE SAS -// -// This file is part of Open CASCADE Technology software library. -// -// This library is free software; you can redistribute it and/or modify it under -// the terms of the GNU Lesser General Public License version 2.1 as published -// by the Free Software Foundation, with special exception defined in the file -// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT -// distribution for complete text of the license and disclaimer of any warranty. -// -// Alternatively, this file may be used under the terms of Open CASCADE -// commercial license or contractual agreement. - -#ifndef _BRepAlgo_Section_HeaderFile -#define _BRepAlgo_Section_HeaderFile - -#include -#include -#include - -#include -#include -class TopoDS_Shape; -class gp_Pln; -class Geom_Surface; - - -//! Construction of the section lines between two shapes. -//! For this Boolean operation, each face of the first -//! shape is intersected by each face of the second -//! shape. The resulting intersection edges are brought -//! together into a compound object, but not chained or -//! grouped into wires. -//! Computation of the intersection of two Shapes or Surfaces -//! The two parts involved in this Boolean operation may -//! be defined from geometric surfaces: the most common -//! use is the computation of the planar section of a shape. -//! A Section object provides the framework for: -//! - defining the shapes to be intersected, and the -//! computation options, -//! - implementing the construction algorithm, and -//! - consulting the result. -//! Example : giving two shapes S1,S2 accessing faces, -//! let compute the section edges R on S1,S2, -//! performing approximation on new curves, -//! performing PCurve on part 1 but not on part 2 : -//! Standard_Boolean PerformNow = Standard_False; -//! BRepBoolAPI_Section S(S1,S2,PerformNow); -//! S.ComputePCurveOn1(Standard_True); -//! S.Approximation(Standard_True); -//! S.Build(); -//! TopoDS_Shape R = S.Shape(); -//! On Null Shapes of geometries, NotDone() is called. -class Standard_DEPRECATED("This class is deprecated - BRepAlgoAPI_Section should be used instead") - BRepAlgo_Section : public BRepAlgo_BooleanOperation -{ -public: - - DEFINE_STANDARD_ALLOC - - - Standard_EXPORT BRepAlgo_Section(const TopoDS_Shape& Sh1, const TopoDS_Shape& Sh2, const Standard_Boolean PerformNow = Standard_True); - - Standard_EXPORT BRepAlgo_Section(const TopoDS_Shape& Sh, const gp_Pln& Pl, const Standard_Boolean PerformNow = Standard_True); - - Standard_EXPORT BRepAlgo_Section(const TopoDS_Shape& Sh, const Handle(Geom_Surface)& Sf, const Standard_Boolean PerformNow = Standard_True); - - Standard_EXPORT BRepAlgo_Section(const Handle(Geom_Surface)& Sf, const TopoDS_Shape& Sh, const Standard_Boolean PerformNow = Standard_True); - - //! This and the above algorithms construct a framework for computing the section lines of - //! - the two shapes Sh1 and Sh2, or - //! - the shape Sh and the plane Pl, or - //! - the shape Sh and the surface Sf, or - //! - the surface Sf and the shape Sh, or - //! - the two surfaces Sf1 and Sf2, - //! and builds the result if PerformNow equals true, its - //! default value. If PerformNow equals false, the - //! intersection will be computed later by the function Build. - //! The constructed shape will be returned by the - //! function Shape. This is a compound object - //! composed of edges. These intersection edges may be built: - //! - on new intersection lines, or - //! - on coincident portions of edges in the two intersected shapes. - //! These intersection edges are independent: they - //! are not chained or grouped in wires. - //! If no intersection edge exists, the result is an empty compound object. - //! Note that other objects than TopoDS_Shape - //! shapes involved in these syntaxes are converted - //! into faces or shells before performing the - //! computation of the intersection. A shape resulting - //! from this conversion can be retrieved with the - //! function Shape1 or Shape2. - //! Parametric 2D curves on intersection edges - //! No parametric 2D curve (pcurve) is defined for - //! each elementary edge of the result. To attach such - //! parametric curves to the constructed edges you - //! may use a constructor with the PerformNow flag - //! equal to false; then you use: - //! - the function ComputePCurveOn1 to ask for the - //! additional computation of a pcurve in the - //! parametric space of the first shape, - //! - the function ComputePCurveOn2 to ask for the - //! additional computation of a pcurve in the - //! parametric space of the second shape, - //! - in the end, the function Build to construct the result. - //! Note that as a result, pcurves will only be added on - //! edges built on new intersection lines. - //! Approximation of intersection edges - //! The underlying 3D geometry attached to each - //! elementary edge of the result is: - //! - analytic where possible, provided the - //! corresponding geometry corresponds to a type - //! of analytic curve defined in the Geom package; - //! for example, the intersection of a cylindrical - //! shape with a plane gives an ellipse or a circle; - //! - or elsewhere, given as a succession of points - //! grouped together in a BSpline curve of degree 1. - //! If you prefer to have an attached 3D geometry - //! which is a BSpline approximation of the computed - //! set of points on computed elementary intersection - //! edges whose underlying geometry is not analytic, - //! you may use a constructor with the PerformNow - //! flag equal to false. Then you use: - //! - the function Approximation to ask for this - //! computation option, and - //! - the function Build to construct the result. - //! Note that as a result, approximations will only be - //! computed on edges built on new intersection lines. - //! Example - //! You may also combine these computation options. - //! In the following example: - //! - each elementary edge of the computed - //! intersection, built on a new intersection line, - //! which does not correspond to an analytic Geom - //! curve, will be approximated by a BSpline curve - //! whose degree is not greater than 8. - //! - each elementary edge built on a new intersection line, will have: - //! - a pcurve in the parametric space of the shape S1, - //! - no pcurve in the parametric space of the shape S2. - //! // TopoDS_Shape S1 = ... , S2 = ... ; - //! Standard_Boolean PerformNow = Standard_False; - //! BRepAlgo_Section S ( S1, S2, PerformNow ); - //! S.ComputePCurveOn1 (Standard_True); - //! S.Approximation (Standard_True); - //! S.Build(); - //! TopoDS_Shape R = S.Shape(); - Standard_EXPORT BRepAlgo_Section(const Handle(Geom_Surface)& Sf1, const Handle(Geom_Surface)& Sf2, const Standard_Boolean PerformNow = Standard_True); - - //! Initializes the first part - Standard_EXPORT void Init1 (const TopoDS_Shape& S1); - - //! Initializes the first part - Standard_EXPORT void Init1 (const gp_Pln& Pl); - - //! Initializes the first part - Standard_EXPORT void Init1 (const Handle(Geom_Surface)& Sf); - - //! initialize second part - Standard_EXPORT void Init2 (const TopoDS_Shape& S2); - - //! Initializes the second part - Standard_EXPORT void Init2 (const gp_Pln& Pl); - - //! This and the above algorithms - //! reinitialize the first and the second parts on which - //! this algorithm is going to perform the intersection - //! computation. This is done with either: the surface - //! Sf, the plane Pl or the shape Sh. - //! You use the function Build to construct the result. - Standard_EXPORT void Init2 (const Handle(Geom_Surface)& Sf); - - //! Defines an option for computation of further - //! intersections. This computation will be performed by - //! the function Build in this framework. - //! By default, the underlying 3D geometry attached to - //! each elementary edge of the result of a computed intersection is: - //! - analytic where possible, provided the - //! corresponding geometry corresponds to a type of - //! analytic curve defined in the Geom package; for - //! example the intersection of a cylindrical shape with - //! a plane gives an ellipse or a circle; - //! - or elsewhere, given as a succession of points - //! grouped together in a BSpline curve of degree 1. If - //! Approx equals true, when further computations are - //! performed in this framework with the function - //! Build, these edges will have an attached 3D - //! geometry which is a BSpline approximation of the - //! computed set of points. - //! Note that as a result, approximations will be computed - //! on edges built only on new intersection lines. - Standard_EXPORT void Approximation (const Standard_Boolean B); - - //! Indicates if the Pcurve must be (or not) performed on first part. - Standard_EXPORT void ComputePCurveOn1 (const Standard_Boolean B); - - //! Define options for the computation of further - //! intersections which will be performed by the function - //! Build in this framework. - //! By default, no parametric 2D curve (pcurve) is defined - //! for the elementary edges of the result. - //! If ComputePCurve1 equals true, further computations - //! performed in this framework with the function Build - //! will attach an additional pcurve in the parametric - //! space of the first shape to the constructed edges. - //! If ComputePCurve2 equals true, the additional pcurve - //! will be attached to the constructed edges in the - //! parametric space of the second shape. - //! These two functions may be used together. - //! Note that as a result, pcurves will only be added onto - //! edges built on new intersection lines. - Standard_EXPORT void ComputePCurveOn2 (const Standard_Boolean B); - - //! Performs the computation of the section lines - //! between the two parts defined at the time of - //! construction of this framework or reinitialized with the - //! Init1 and Init2 functions. - //! The constructed shape will be returned by the function - //! Shape. This is a compound object composed of - //! edges. These intersection edges may be built: - //! - on new intersection lines, or - //! - on coincident portions of edges in the two intersected shapes. - //! These intersection edges are independent: they are - //! not chained or grouped into wires. - //! If no intersection edge exists, the result is an empty compound object. - //! The shapes involved in the construction of the section - //! lines can be retrieved with the function Shape1 or - //! Shape2. Note that other objects than - //! TopoDS_Shape shapes given as arguments at the - //! construction time of this framework, or to the Init1 or - //! Init2 function, are converted into faces or shells - //! before performing the computation of the intersection. - //! Parametric 2D curves on intersection edges - //! No parametric 2D curve (pcurve) is defined for the - //! elementary edges of the result. To attach parametric - //! curves like this to the constructed edges you have to use: - //! - the function ComputePCurveOn1 to ask for the - //! additional computation of a pcurve in the - //! parametric space of the first shape, - //! - the function ComputePCurveOn2 to ask for the - //! additional computation of a pcurve in the - //! parametric space of the second shape. - //! This must be done before calling this function. - //! Note that as a result, pcurves are added on edges - //! built on new intersection lines only. - //! Approximation of intersection edges - //! The underlying 3D geometry attached to each - //! elementary edge of the result is: - //! - analytic where possible provided the corresponding - //! geometry corresponds to a type of analytic curve - //! defined in the Geom package; for example, the - //! intersection of a cylindrical shape with a plane - //! gives an ellipse or a circle; or - //! - elsewhere, given as a succession of points grouped - //! together in a BSpline curve of degree 1. - //! If, on computed elementary intersection edges whose - //! underlying geometry is not analytic, you prefer to - //! have an attached 3D geometry which is a BSpline - //! approximation of the computed set of points, you have - //! to use the function Approximation to ask for this - //! computation option before calling this function. - //! You may also have combined these computation - //! options: look at the example given above to illustrate - //! the use of the constructors. - Standard_EXPORT void Build(const Message_ProgressRange& theRange = Message_ProgressRange()) Standard_OVERRIDE; - - //! Identifies the ancestor faces of the new - //! intersection edge E resulting from the last - //! computation performed in this framework, that is, - //! the faces of the two original shapes on which the edge E lies: - //! - HasAncestorFaceOn1 gives the ancestor face - //! in the first shape, and - //! These functions return: - //! - true if an ancestor face F is found, or - //! - false if not. - //! An ancestor face is identifiable for the edge E if the - //! three following conditions are satisfied: - //! - the first part on which this algorithm performed - //! its last computation is a shape, that is, it was not - //! given as a surface or a plane at the time of - //! construction of this algorithm or at a later time by - //! the Init1 function, - //! - E is one of the elementary edges built by the last - //! computation of this section algorithm, - //! - the edge E is built on an intersection curve. In - //! other words, E is a new edge built on the - //! intersection curve, not on edges belonging to the - //! intersecting shapes. - //! To use these functions properly, you have to test - //! the returned Boolean value before using the - //! ancestor face: F is significant only if the returned - //! Boolean value equals true. - Standard_EXPORT Standard_Boolean HasAncestorFaceOn1 (const TopoDS_Shape& E, TopoDS_Shape& F) const; - - //! Identifies the ancestor faces of the new - //! intersection edge E resulting from the last - //! computation performed in this framework, that is, - //! the faces of the two original shapes on which the edge E lies: - //! - HasAncestorFaceOn2 gives the ancestor face in the second shape. - //! These functions return: - //! - true if an ancestor face F is found, or - //! - false if not. - //! An ancestor face is identifiable for the edge E if the - //! three following conditions are satisfied: - //! - the first part on which this algorithm performed - //! its last computation is a shape, that is, it was not - //! given as a surface or a plane at the time of - //! construction of this algorithm or at a later time by - //! the Init1 function, - //! - E is one of the elementary edges built by the last - //! computation of this section algorithm, - //! - the edge E is built on an intersection curve. In - //! other words, E is a new edge built on the - //! intersection curve, not on edges belonging to the - //! intersecting shapes. - //! To use these functions properly, you have to test - //! the returned Boolean value before using the - //! ancestor face: F is significant only if the returned - //! Boolean value equals true. - Standard_EXPORT Standard_Boolean HasAncestorFaceOn2 (const TopoDS_Shape& E, TopoDS_Shape& F) const; - - - - -protected: - - - - - -private: - - - Standard_EXPORT virtual void InitParameters() Standard_OVERRIDE; - - - Standard_Boolean myS1Changed; - Standard_Boolean myS2Changed; - Standard_Boolean myApproxChanged; - Standard_Boolean myPCurve1Changed; - Standard_Boolean myPCurve2Changed; - Standard_Boolean myshapeisnull; - - -}; - - - - - - - -#endif // _BRepAlgo_Section_HeaderFile diff --git a/src/BRepAlgo/BRepAlgo_Tool.cxx b/src/BRepAlgo/BRepAlgo_Tool.cxx deleted file mode 100644 index 26da9031fb..0000000000 --- a/src/BRepAlgo/BRepAlgo_Tool.cxx +++ /dev/null @@ -1,104 +0,0 @@ -// Created on: 1995-10-23 -// Created by: Yves FRICAUD -// Copyright (c) 1995-1999 Matra Datavision -// Copyright (c) 1999-2014 OPEN CASCADE SAS -// -// This file is part of Open CASCADE Technology software library. -// -// This library is free software; you can redistribute it and/or modify it under -// the terms of the GNU Lesser General Public License version 2.1 as published -// by the Free Software Foundation, with special exception defined in the file -// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT -// distribution for complete text of the license and disclaimer of any warranty. -// -// Alternatively, this file may be used under the terms of Open CASCADE -// commercial license or contractual agreement. - - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -//======================================================================= -//function : Deboucle3D -//purpose : -//======================================================================= -TopoDS_Shape BRepAlgo_Tool::Deboucle3D(const TopoDS_Shape& S, - const TopTools_MapOfShape& Boundary) -{ - TopoDS_Shape SS; - - switch ( S.ShapeType()) { - case TopAbs_FACE: - { - } - break; - case TopAbs_SHELL: - { - // if the shell contains free borders that do not belong to the - // free borders of caps ( Boundary) it is removed. - TopTools_IndexedDataMapOfShapeListOfShape Map; - TopExp::MapShapesAndAncestors(S,TopAbs_EDGE,TopAbs_FACE,Map); - - Standard_Boolean JeGarde = Standard_True; - for ( Standard_Integer i = 1; i <= Map.Extent() && JeGarde; i++) { - const TopTools_ListOfShape& aLF = Map(i); - if (aLF.Extent() < 2) { - const TopoDS_Edge& anEdge = TopoDS::Edge(Map.FindKey(i)); - if (anEdge.Orientation() == TopAbs_INTERNAL) { - const TopoDS_Face& aFace = TopoDS::Face(aLF.First()); - if (aFace.Orientation() != TopAbs_INTERNAL) { - continue; - } - } - if (!Boundary.Contains(anEdge) && - !BRep_Tool::Degenerated(anEdge) ) - JeGarde = Standard_False; - } - } - if ( JeGarde) SS = S; - } - break; - case TopAbs_COMPOUND: - case TopAbs_SOLID: - { - // iterate on sub-shapes and add non-empty. - TopoDS_Iterator it(S); - TopoDS_Shape SubShape; - Standard_Integer NbSub = 0; - BRep_Builder B; - if (S.ShapeType() == TopAbs_COMPOUND) { - B.MakeCompound(TopoDS::Compound(SS)); - } - else { - B.MakeSolid(TopoDS::Solid(SS)); - } - for ( ; it.More(); it.Next()) { - const TopoDS_Shape& CurS = it.Value(); - SubShape = Deboucle3D(CurS,Boundary); - if ( !SubShape.IsNull()) { - B.Add(SS, SubShape); - NbSub++; - } - } - if (NbSub == 0) - { -#ifdef OCCT_DEBUG - std::cout << "No subhape in shape!" << std::endl; -#endif - SS = TopoDS_Shape(); - } - } - break; - default: - break; - } - return SS; -} diff --git a/src/BRepAlgo/BRepAlgo_Tool.hxx b/src/BRepAlgo/BRepAlgo_Tool.hxx deleted file mode 100644 index 277da9704f..0000000000 --- a/src/BRepAlgo/BRepAlgo_Tool.hxx +++ /dev/null @@ -1,67 +0,0 @@ -// Created on: 1995-10-23 -// Created by: Yves FRICAUD -// Copyright (c) 1995-1999 Matra Datavision -// Copyright (c) 1999-2014 OPEN CASCADE SAS -// -// This file is part of Open CASCADE Technology software library. -// -// This library is free software; you can redistribute it and/or modify it under -// the terms of the GNU Lesser General Public License version 2.1 as published -// by the Free Software Foundation, with special exception defined in the file -// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT -// distribution for complete text of the license and disclaimer of any warranty. -// -// Alternatively, this file may be used under the terms of Open CASCADE -// commercial license or contractual agreement. - -#ifndef _BRepAlgo_Tool_HeaderFile -#define _BRepAlgo_Tool_HeaderFile - -#include -#include -#include - -#include -class TopoDS_Shape; - - - -class BRepAlgo_Tool -{ -public: - - DEFINE_STANDARD_ALLOC - - - //! Remove the non valid part of an offsetshape - //! 1 - Remove all the free boundary and the faces - //! connex to such edges. - //! 2 - Remove all the shapes not valid in the result - //! (according to the side of offsetting) - //! in this version only the first point is implemented. - Standard_EXPORT static TopoDS_Shape Deboucle3D (const TopoDS_Shape& S, const TopTools_MapOfShape& Boundary); - - - - -protected: - - - - - -private: - - - - - -}; - - - - - - - -#endif // _BRepAlgo_Tool_HeaderFile diff --git a/src/BRepAlgo/FILES b/src/BRepAlgo/FILES index 4cf963e8d4..b2f09b0cc4 100755 --- a/src/BRepAlgo/FILES +++ b/src/BRepAlgo/FILES @@ -3,24 +3,11 @@ BRepAlgo.hxx BRepAlgo_1.cxx BRepAlgo_AsDes.cxx BRepAlgo_AsDes.hxx -BRepAlgo_BooleanOperation.cxx -BRepAlgo_BooleanOperation.hxx -BRepAlgo_CheckStatus.hxx -BRepAlgo_Common.cxx -BRepAlgo_Common.hxx -BRepAlgo_Cut.cxx -BRepAlgo_Cut.hxx BRepAlgo_FaceRestrictor.cxx BRepAlgo_FaceRestrictor.hxx -BRepAlgo_Fuse.cxx -BRepAlgo_Fuse.hxx BRepAlgo_Image.cxx BRepAlgo_Image.hxx BRepAlgo_Loop.cxx BRepAlgo_Loop.hxx BRepAlgo_NormalProjection.cxx BRepAlgo_NormalProjection.hxx -BRepAlgo_Section.cxx -BRepAlgo_Section.hxx -BRepAlgo_Tool.cxx -BRepAlgo_Tool.hxx diff --git a/src/BRepOffset/BRepOffset_Tool.cxx b/src/BRepOffset/BRepOffset_Tool.cxx index 93719846c1..97cc14cd26 100644 --- a/src/BRepOffset/BRepOffset_Tool.cxx +++ b/src/BRepOffset/BRepOffset_Tool.cxx @@ -32,7 +32,6 @@ #include #include #include -#include #include #include #include @@ -3901,11 +3900,73 @@ void BRepOffset_Tool::ExtentFace (const TopoDS_Face& F, //function : Deboucle3D //purpose : //======================================================================= - TopoDS_Shape BRepOffset_Tool::Deboucle3D(const TopoDS_Shape& S, - const TopTools_MapOfShape& Boundary) + const TopTools_MapOfShape& Boundary) { - return BRepAlgo_Tool::Deboucle3D(S,Boundary); + TopoDS_Shape SS; + switch (S.ShapeType()) + { + case TopAbs_SHELL: + { + // if the shell contains free borders that do not belong to the + // free borders of caps ( Boundary) it is removed. + TopTools_IndexedDataMapOfShapeListOfShape Map; + TopExp::MapShapesAndAncestors(S, TopAbs_EDGE, TopAbs_FACE, Map); + + Standard_Boolean JeGarde = Standard_True; + for (Standard_Integer i = 1; i <= Map.Extent() && JeGarde; i++) { + const TopTools_ListOfShape& aLF = Map(i); + if (aLF.Extent() < 2) { + const TopoDS_Edge& anEdge = TopoDS::Edge(Map.FindKey(i)); + if (anEdge.Orientation() == TopAbs_INTERNAL) { + const TopoDS_Face& aFace = TopoDS::Face(aLF.First()); + if (aFace.Orientation() != TopAbs_INTERNAL) { + continue; + } + } + if (!Boundary.Contains(anEdge) && + !BRep_Tool::Degenerated(anEdge)) + JeGarde = Standard_False; + } + } + if (JeGarde) SS = S; + } + break; + + case TopAbs_COMPOUND: + case TopAbs_SOLID: + { + // iterate on sub-shapes and add non-empty. + TopoDS_Iterator it(S); + TopoDS_Shape SubShape; + Standard_Integer NbSub = 0; + BRep_Builder B; + if (S.ShapeType() == TopAbs_COMPOUND) { + B.MakeCompound(TopoDS::Compound(SS)); + } + else { + B.MakeSolid(TopoDS::Solid(SS)); + } + for (; it.More(); it.Next()) { + const TopoDS_Shape& CurS = it.Value(); + SubShape = Deboucle3D(CurS, Boundary); + if (!SubShape.IsNull()) { + B.Add(SS, SubShape); + NbSub++; + } + } + if (NbSub == 0) + { + SS = TopoDS_Shape(); + } + } + break; + + default: + break; + } + + return SS; } //======================================================================= diff --git a/src/BRepTest/BRepTest_TopologyCommands.cxx b/src/BRepTest/BRepTest_TopologyCommands.cxx index 7016f9a71e..6dd9c0c4b7 100644 --- a/src/BRepTest/BRepTest_TopologyCommands.cxx +++ b/src/BRepTest/BRepTest_TopologyCommands.cxx @@ -22,11 +22,6 @@ #include #include -#include -#include -#include -#include - #include #include #include @@ -42,123 +37,9 @@ #include #include #include -#include #include #include -Standard_DISABLE_DEPRECATION_WARNINGS - -//======================================================================= -// topop -//======================================================================= - -static Standard_Integer topop(Draw_Interpretor& , Standard_Integer n, const char** a) -{ - if (n < 4) return 1; - - TopoDS_Shape s1 = DBRep::Get(a[2]); - TopoDS_Shape s2 = DBRep::Get(a[3]); - - if (s1.IsNull() || s2.IsNull()) return 1; - - TopoDS_Shape res; - - if (*a[0] == 'f') - res = BRepAlgo_Fuse(s1,s2); - else if (*(a[0]+1) == 'o') - res = BRepAlgo_Common(s1,s2); - else - res = BRepAlgo_Cut(s1,s2); - - DBRep::Set(a[1],res); - - return 0; -} - - -//======================================================================= -// section -//======================================================================= - -static Standard_Integer section(Draw_Interpretor& , Standard_Integer n, const char** a) -{ - - if (n < 4) return 1; - - TopoDS_Shape s1 = DBRep::Get(a[2]); - TopoDS_Shape s2 = DBRep::Get(a[3]); - - if (s1.IsNull() || s2.IsNull()) - return 1; - - BRepAlgo_Section Sec(s1, s2, Standard_False); - TopoDS_Shape res; - - for (int i=4; i < n; i++) { - if (!strcasecmp(a[i], "-2d")) - { - Sec.ComputePCurveOn1(Standard_True); - Sec.ComputePCurveOn2(Standard_True); - } - else if (!strcasecmp(a[i], "-2d1")) - { - Sec.ComputePCurveOn1(Standard_True); - Sec.ComputePCurveOn2(Standard_False); - } - else if (!strcasecmp(a[i], "-2d2")) - { - Sec.ComputePCurveOn1(Standard_False); - Sec.ComputePCurveOn2(Standard_True); - } - else if (!strcasecmp(a[i], "-no2d")) - { - Sec.ComputePCurveOn1(Standard_False); - Sec.ComputePCurveOn2(Standard_False); - } - else if (!strcasecmp(a[i], "-a")) - Sec.Approximation(Standard_True); - else if (strcasecmp(a[i], "-p")) - { - Message::SendFail() << "Unknown option: " << a[i]; - return 1; - } - } - - res = Sec.Shape(); - - DBRep::Set(a[1],res); - - return 0; -} - -//======================================================================= -// psection -//======================================================================= - -static Standard_Integer psection(Draw_Interpretor& , Standard_Integer n, const char** a) -{ - if (n < 4) return 1; - - TopoDS_Shape s = DBRep::Get(a[2]); - if (s.IsNull()) return 1; - - Handle(Geom_Surface) ps = DrawTrSurf::GetSurface(a[3]); - if (ps.IsNull()) return 1; - - Handle(Geom_Plane) pg = Handle(Geom_Plane)::DownCast(ps); - if (pg.IsNull()) return 1; - - const gp_Pln& p = pg->Pln(); - - TopoDS_Shape res = BRepAlgo_Section(s,p); - - DBRep::Set(a[1],res); - - return 0; -} - -Standard_ENABLE_DEPRECATION_WARNINGS - static Standard_Integer halfspace(Draw_Interpretor& di, Standard_Integer n, const char** a) { @@ -247,11 +128,6 @@ void BRepTest::TopologyCommands(Draw_Interpretor& theCommands) const char* g = "TOPOLOGY Topological operation commands"; - theCommands.Add("fuse","fuse result s1 s2",__FILE__,topop,g); - theCommands.Add("common","common result s1 s2",__FILE__,topop,g); - theCommands.Add("cut","cut result part tool",__FILE__,topop,g); - theCommands.Add("section","section result s1 s2 [-no2d/-2d/-2d1/-2d2] [-p/-a]",__FILE__,section,g); - theCommands.Add("psection","psection result s plane",__FILE__,psection,g); theCommands.Add("halfspace","halfspace result face/shell x y z",__FILE__,halfspace,g); theCommands.Add("buildfaces","buildfaces result faceReference wire1 wire2 ...",__FILE__,buildfaces,g); } diff --git a/tests/bugs/caf/bug31918_2 b/tests/bugs/caf/bug31918_2 index 9b4eb1bac2..32ced7e5e6 100644 --- a/tests/bugs/caf/bug31918_2 +++ b/tests/bugs/caf/bug31918_2 @@ -11,7 +11,7 @@ proc store_part {nx ny dx dy dz entry} { global D0 box b1 0 0 0 [expr $nx + .5] [expr $ny + .5] 1 box b2 0.5 0.5 0 [expr $nx - .5] [expr $nx - .5] 0.4 - cut base b1 b2 + bcut base b1 b2 set command "compound" for {set x 0} {$x < $nx} {incr x} { diff --git a/tests/bugs/modalg_1/buc60585_1 b/tests/bugs/modalg_1/buc60585_1 index 6e26656658..42c389aa90 100755 --- a/tests/bugs/modalg_1/buc60585_1 +++ b/tests/bugs/modalg_1/buc60585_1 @@ -6,8 +6,9 @@ puts "========================" restore [locate_data_file buc60585a.brep] s checkshape s plane ps 2036.25 -97.5 -1460.499755859375 0.0 -0.75103523489975432 -0.66026212668838646 1.0 0.0 0.0 +mkface fs ps -psection result s ps +bsection result s fs checkprops result -l 117.81 checkshape result diff --git a/tests/bugs/modalg_1/buc60585_2 b/tests/bugs/modalg_1/buc60585_2 index 2e0419f79b..0ecead9655 100755 --- a/tests/bugs/modalg_1/buc60585_2 +++ b/tests/bugs/modalg_1/buc60585_2 @@ -6,8 +6,9 @@ puts "========================" restore [locate_data_file buc60585b.brep] t checkshape t plane pt 2036.25 -97.5 -1460.499755859375 0.0 -1.0 0.0 1.0 0.0 0.0 +mkface ft pt -psection result t pt +bsection result t ft checkprops result -l 22.0446 checkshape result diff --git a/tests/bugs/modalg_2/bug526 b/tests/bugs/modalg_2/bug526 index fc2b5ad0f0..a9179b8dfb 100755 --- a/tests/bugs/modalg_2/bug526 +++ b/tests/bugs/modalg_2/bug526 @@ -13,17 +13,20 @@ restore [locate_data_file OCC592.brep] a set Z 67.599311020481764 plane p 0 0 $Z -psection r1 a p +mkface f p +bsection r1 a f if ![regexp VERTEX [statshape r1]] {puts [format "OCC526 FAULTY Z=%f" $Z ] } set Z 66.599311020481764 plane p 0 0 $Z -psection r2 a p +mkface f p +bsection r2 a f if ![regexp VERTEX [statshape r2]] {puts [format "OCC526 FAULTY Z=%f" $Z ] } set Z 65.599311020481764 plane p 0 0 $Z -psection result a p +mkface f p +bsection result a f if ![regexp VERTEX [statshape result]] {puts [format "OCC526 FAULTY Z=%f" $Z ] } checkprops result -l 27.8021 diff --git a/tests/bugs/modalg_4/bug82 b/tests/bugs/modalg_4/bug82 index e8d4cb5a16..c08e750993 100755 --- a/tests/bugs/modalg_4/bug82 +++ b/tests/bugs/modalg_4/bug82 @@ -1,5 +1,3 @@ -puts "TODO OCC82 ALL: Error : Incomplete section of shell by plane" - puts "=====" puts "OCC82" puts "=====" @@ -16,14 +14,14 @@ set length 113.703 set nbshapes_expected " Number of shapes in shape - VERTEX : 44 + VERTEX : 42 EDGE : 41 " plane f 0 14.8053 0 0 1 0 mkface f f -section result sh f +bsection result sh f checkshape result diff --git a/tests/bugs/modalg_5/bug23855 b/tests/bugs/modalg_5/bug23855 index eb6769abc0..3d1524f25b 100644 --- a/tests/bugs/modalg_5/bug23855 +++ b/tests/bugs/modalg_5/bug23855 @@ -8,4 +8,14 @@ puts "" psphere s1 10 psphere s2 10 -common result s1 s2 +bcommon result s1 s2 + +explode result so + +checkshape result + +checknbshapes result_1 -ref [nbshapes s1] +checknbshapes result_1 -ref [nbshapes s2] + +checkprops result_1 -equal s1 +checkprops result_1 -equal s2 \ No newline at end of file diff --git a/tests/bugs/modalg_5/bug24463 b/tests/bugs/modalg_5/bug24463 index aa85623e98..a83bf04476 100644 --- a/tests/bugs/modalg_5/bug24463 +++ b/tests/bugs/modalg_5/bug24463 @@ -8,4 +8,9 @@ puts "" restore [locate_data_file bug24463_TK0000000000480_109.brep] a plane p 0 7000 0 0 -1 0 0 0 -1 -psection r a p +mkface f p + +bsection r a f + +checkprops r -l 61.6434 +checksection r -r 2 \ No newline at end of file diff --git a/tests/bugs/modalg_5/bug24519 b/tests/bugs/modalg_5/bug24519 index 30bc749640..f0faa5e996 100644 --- a/tests/bugs/modalg_5/bug24519 +++ b/tests/bugs/modalg_5/bug24519 @@ -9,19 +9,12 @@ puts "" restore [locate_data_file bug24519_cylinder.brep] cy restore [locate_data_file bug24519_plane.brep] pl -bsection r1 cy pl -section r2 cy pl -set exp1 [explode r1] -set exp2 [explode r2] +bsection r cy pl +set exp [explode r] -if { $exp1 != "r1_1" } { +if { $exp != "r_1" } { puts "Error: First intersection is not returned" } -if { $exp2 != "r2_1" } { - puts "Error: Second intersection is not returned" -} -checksection r1 -checksection r2 -checkprops r1 -l 3.83537 -checkprops r2 -l 3.83537 +checksection r -r 2 +checkprops r -l 3.83537 diff --git a/tests/bugs/modalg_5/bug24758_1 b/tests/bugs/modalg_5/bug24758_1 index 9bc0ef868e..4b7bca46ec 100644 --- a/tests/bugs/modalg_5/bug24758_1 +++ b/tests/bugs/modalg_5/bug24758_1 @@ -35,9 +35,10 @@ bcommon teeth teeth outer tcopy inner profile set nbteeths 25 for {set i 0} {$i < $nbteeths} {incr i} { - fuse profile profile teeth + bfuse profile profile teeth trotate teeth 0 0 0 0 0 1 360./$nbteeths } +unifysamedom profile profile # sweep profile along curved shape polyline sp 0 0 0 0 0 H diff --git a/tests/bugs/modalg_5/bug24758_2 b/tests/bugs/modalg_5/bug24758_2 index 87875b7351..6f7b2b89e6 100644 --- a/tests/bugs/modalg_5/bug24758_2 +++ b/tests/bugs/modalg_5/bug24758_2 @@ -42,8 +42,8 @@ mkface circle1 p0 circle1 mkface circle2 p0 circle2 bcommon sec rectangle1 circle1 -# note use of 'fuse' instead of 'bfuse' -- we need to get single face -fuse sec sec circle2 +bfuse sec sec circle2 +unifysamedom sec sec # Construct flute profile so as to have cutting lip straight after sharpening. # Here we need to take into account spiral shift of the flute edge diff --git a/tests/bugs/modalg_5/bug25766 b/tests/bugs/modalg_5/bug25766 index fe7e6ee021..da387c12c2 100644 --- a/tests/bugs/modalg_5/bug25766 +++ b/tests/bugs/modalg_5/bug25766 @@ -8,4 +8,6 @@ puts "" restore [locate_data_file OCC25766_surface1.brep] b1 restore [locate_data_file OCC25766_surface2.brep] b2 -section r b1 b2 +bsection r b1 b2 +checkprops r -l 950.001 +checksection r -r 2 \ No newline at end of file diff --git a/tests/bugs/modalg_6/bug21507 b/tests/bugs/modalg_6/bug21507 index 1f3c80ad67..11967a898d 100644 --- a/tests/bugs/modalg_6/bug21507 +++ b/tests/bugs/modalg_6/bug21507 @@ -42,16 +42,4 @@ if { [llength $rfaces] != 1 } { puts "Result is as expected" } -# Do the same using cut -puts "Now running old cut" -cut rcut face tool - -# Evaluate result by number of faces (cut) -set rcfaces [explode rcut f] -if { [llength $rcfaces] != 1 } { - puts "Error: [llength $rcfaces] faces instead of 1" -} else { - puts "Result is as expected" -} - checkview -display result -2d -path ${imagedir}/${test_image}.png diff --git a/tests/bugs/modalg_7/bug83 b/tests/bugs/modalg_7/bug83 index e43c3b0f23..05cbc3d3a9 100755 --- a/tests/bugs/modalg_7/bug83 +++ b/tests/bugs/modalg_7/bug83 @@ -17,12 +17,12 @@ mkface f f -11 11 -11 11 puts "Info: perform section with plane" chrono h1 reset; chrono h1 start -section r1 f pr +bsection r1 f pr chrono h1 stop counter "CPU section r1" puts "Info: perform section with planar BSpline surface" chrono h2 reset; chrono h2 start -section r2 sh pr +bsection r2 sh pr chrono h2 stop counter "CPU section r2" regexp {Elapsed time: +([-0-9.+eE]+) Hours +([-0-9.+eE]+) Minutes +([-0-9.+eE]+) Seconds} [dchrono h1 show] full h1_Hours h1_Minutes h1_Seconds diff --git a/tests/bugs/moddata_1/bug17046 b/tests/bugs/moddata_1/bug17046 index 09c419e18f..959ef2bbae 100755 --- a/tests/bugs/moddata_1/bug17046 +++ b/tests/bugs/moddata_1/bug17046 @@ -15,7 +15,7 @@ wire ell_w ell_e mkplane ell_f ell_w 1 box ell_t -10 -110 140 20 110 460 -cut ell_d ell_f ell_t +bcut ell_d ell_f ell_t revol ell_z ell_d 0 0 0 0 0 1 360 explode ell_z F diff --git a/tests/bugs/moddata_1/bug22194 b/tests/bugs/moddata_1/bug22194 index eef1ac92bb..83477457b0 100755 --- a/tests/bugs/moddata_1/bug22194 +++ b/tests/bugs/moddata_1/bug22194 @@ -8,9 +8,19 @@ puts "" restore [locate_data_file OCC22194-sh.brep] s restore [locate_data_file OCC22194-pl.brep] pl -section r s pl -explode r -explode s F -splitshape result s s_1 r_1 s_5 r_2 s_13 r_3 s_22 r_4 s_31 r_5 s_39 r_6 s_46 r_7 s_51 r_8 s_68 r_9 s_90 r_10 s_112 r_11 s_133 r_12 s_143 r_13 s_146 r_14 s_151 r_15 s_161 r_16 s_176 r_17 s_183 r_18 s_201 r_19 s_213 r_20 s_213 r_21 s_235 r_22 s_257 r_23 s_270 r_24 s_285 r_25 s_300 r_26 s_314 r_27 +bsection r s pl +savehistory sec_hist + +set sections {} +foreach f [explode s f] { + if {![regexp "No shapes" [generated g_$f sec_hist $f]]} { + puts "$f g_$f" + lappend sections $f g_$f + } +} + +eval splitshape result s $sections + checkprops result -s 24041.4 +checknbshapes result -face 352 checkview -display result -2d -path ${imagedir}/${test_image}.png diff --git a/tests/bugs/moddata_2/bug254 b/tests/bugs/moddata_2/bug254 index 25f863ed0d..7085f32086 100755 --- a/tests/bugs/moddata_2/bug254 +++ b/tests/bugs/moddata_2/bug254 @@ -9,7 +9,7 @@ checkshape shape1 restore [locate_data_file OCC254-3.brep] shape3 checkshape shape3 -common result shape1 shape3 +bsection result shape1 shape3 checkshape result checkprops result -l 1194.29 diff --git a/tests/caf/nam/A3 b/tests/caf/nam/A3 index ad2af0295d..0190276baf 100644 --- a/tests/caf/nam/A3 +++ b/tests/caf/nam/A3 @@ -60,7 +60,7 @@ for {set a 1} {$a <= 6} {incr a} { BuildNamedShape D [set TestLab]:3:$a PRIMITIVE b_$a } -cut c p b +bcut c p b BuildNamedShape D [set TestLab]:4 MODIFY p c explode c F set needgenerate "" @@ -92,7 +92,7 @@ BuildNamedShape D [set TestLab]:4:1 MODIFY [lindex $needgenerate 0] [lindex $nee BuildNamedShape D [set TestLab]:4:2 GENERATED [lindex $needmodify 0] [lindex $needmodify 1] [lindex $needmodify 2] [lindex $needmodify 3] b_1 b_1 #################### test TNamig_Tool::NamedShape command #################### -set names "e1 e2 e3 p p_1 p_2 p_3 p_5 b b_1 b_2 b_3 b_4 b_5 b_6 c c_1 c_2 c_3 c_5 c_6 c_7 c_8 c_9 c_10" +set names "e1 e2 e3 p p_1 p_2 p_3 p_5 b b_1 b_2 b_3 b_4 b_5 b_6 c c_1 c_5 c_4 c_3 c_6 c_10 c_7 c_9 c_8" set entities "1:1 1:2 1:3 2 2:1 2:1 2:1 2:3 3 3:1 3:2 3:3 3:4 3:5 3:6 4 4:1 4:1 4:2 4:1 4:1 4:1 4:2 2:3 4:1" for {set i 0} {[string compare [lindex $names $i] ""] != 0} {incr i} { @@ -106,8 +106,8 @@ for {set i 0} {[string compare [lindex $names $i] ""] != 0} {incr i} { } #################### test TNaming_Tool::CurrentShape command #################### set entities "1 1:1 1:2 1:3 2 2:1 2:2 2:3 3 3:1 3:2 3:3 3:4 3:5 3:6 4 4:1 4:2" -# rem: f p_4 c_4 are same, p_5 c_9 are same -set names "c_4 e1 e2 e3 c # p_4 c_9 b b_1 b_2 b_3 b_4 b_5 b_6 c # #" +# rem: f p_4 c_2 are same, p_5 c_9 are same +set names "c_2 e1 e2 e3 c # p_4 c_9 b b_1 b_2 b_3 b_4 b_5 b_6 c # #" for {set i 0} {[string compare [lindex $entities $i] ""] != 0} {incr i} { CurrentShape D "[set TestLab]:[lindex $entities $i]" r @@ -127,8 +127,8 @@ for {set i 0} {[string compare [lindex $entities $i] ""] != 0} {incr i} { #################### test TNaming_Tool::GetShape command #################### set entities "1 1:1 1:2 1:3 2 2:1 2:2 2:3 3 3:1 3:2 3:3 3:4 3:5 3:6 4 4:1 4:2" -# rem: f p_4 c_4 are same, p_5 c_9 are same -set names "c_4 e1 e2 e3 p # p_4 c_9 b b_1 b_2 b_3 b_4 b_5 b_6 c # #" +# rem: f p_4 c_2 are same, p_5 c_9 are same +set names "c_2 e1 e2 e3 p # p_4 c_9 b b_1 b_2 b_3 b_4 b_5 b_6 c # #" for {set i 0} {[string compare [lindex $entities $i] ""] != 0} {incr i} { GetShape D "[set TestLab]:[lindex $entities $i]" r diff --git a/tests/v3d/bugs/bug331_1 b/tests/v3d/bugs/bug331_1 index 67d580c740..7b1306e06d 100644 --- a/tests/v3d/bugs/bug331_1 +++ b/tests/v3d/bugs/bug331_1 @@ -6,7 +6,7 @@ puts "" pload MODELING VISUALIZATION box b -5 -5 -5 10 10 10 psphere s 6 -fuse res2 s b +bfuse res2 s b nurbsconvert result res2 vinit View1 From 74a53b82dcc4622d0987ed2f0e5f08c8fb7e91be Mon Sep 17 00:00:00 2001 From: emv Date: Tue, 7 Sep 2021 16:00:25 +0300 Subject: [PATCH 045/639] 0030206: Improve API of commands bbop and bapibop 0030620: Tests - perf/bop/buildfaces does not match description (broken) Allow using meaningful parameters for the commands bbop and bapibop: * common - for Common operation * fuse - for Fuse operation * cut - for Cut operation * tuc/cut21 - for Cut21 operation * section - for Section operation Add description for the commands dealing with Boolean/GF/Split operations. Validate arguments of these commands. Correct test case perf/bop/buildfaces to perform GF execution in parallel and serial modes - compare the results. --- src/BOPTest/BOPTest.cxx | 45 ++++++ src/BOPTest/BOPTest.hxx | 5 + src/BOPTest/BOPTest_APICommands.cxx | 64 +++++--- src/BOPTest/BOPTest_ObjCommands.cxx | 143 +++++++++++------- src/BOPTest/BOPTest_PartitionCommands.cxx | 172 ++++++++++++++-------- tests/bugs/modalg_5/bug24639 | 15 +- tests/bugs/modalg_7/bug30206 | 84 +++++++++++ tests/perf/bop/buildfaces | 18 ++- 8 files changed, 398 insertions(+), 148 deletions(-) create mode 100644 tests/bugs/modalg_7/bug30206 diff --git a/src/BOPTest/BOPTest.cxx b/src/BOPTest/BOPTest.cxx index 23c67bddeb..5de6f3d84d 100644 --- a/src/BOPTest/BOPTest.cxx +++ b/src/BOPTest/BOPTest.cxx @@ -142,3 +142,48 @@ void BOPTest::ReportAlerts(const Handle(Message_Report)& theReport) } } } + +//======================================================================= +//function : GetOperationType +//purpose : +//======================================================================= +BOPAlgo_Operation BOPTest::GetOperationType(const Standard_CString theOp) +{ + TCollection_AsciiString anOp(theOp); + anOp.LowerCase(); + + if (anOp.IsIntegerValue()) + { + // Check if the given value satisfies the enumeration. + Standard_Integer iOp = anOp.IntegerValue(); + if (iOp >= 0 && iOp <= 4) + { + return static_cast(iOp); + } + return BOPAlgo_UNKNOWN; + } + + // Check for the meaningful symbolic operation parameter + if (anOp == "common") + { + return BOPAlgo_COMMON; + } + else if (anOp == "fuse") + { + return BOPAlgo_FUSE; + } + else if (anOp == "cut") + { + return BOPAlgo_CUT; + } + else if (anOp == "tuc" || anOp == "cut21") + { + return BOPAlgo_CUT21; + } + else if (anOp == "section") + { + return BOPAlgo_SECTION; + } + + return BOPAlgo_UNKNOWN; +} diff --git a/src/BOPTest/BOPTest.hxx b/src/BOPTest/BOPTest.hxx index 8a34659201..5f0a999948 100644 --- a/src/BOPTest/BOPTest.hxx +++ b/src/BOPTest/BOPTest.hxx @@ -19,6 +19,7 @@ #include #include #include +#include #include class BOPTest_Objects; @@ -68,6 +69,10 @@ public: //! if flag BOPTest_Objects::DrawWarnShapes() is set Standard_EXPORT static void ReportAlerts (const Handle(Message_Report)& theReport); + //! Returns operation type according to the given string. + //! For numeric values, the number correspond to the order in enum. + Standard_EXPORT static BOPAlgo_Operation GetOperationType(const Standard_CString theOp); + protected: private: diff --git a/src/BOPTest/BOPTest_APICommands.cxx b/src/BOPTest/BOPTest_APICommands.cxx index 613ea086d6..3a9949551e 100644 --- a/src/BOPTest/BOPTest_APICommands.cxx +++ b/src/BOPTest/BOPTest_APICommands.cxx @@ -50,9 +50,28 @@ void BOPTest::APICommands(Draw_Interpretor& theCommands) // Chapter's name const char* g = "BOPTest commands"; // Commands - theCommands.Add("bapibuild", "use bapibuild r" , __FILE__, bapibuild, g); - theCommands.Add("bapibop", "use bapibop r type" , __FILE__, bapibop, g); - theCommands.Add("bapisplit", "use bapisplit r" , __FILE__, bapisplit, g); + theCommands.Add("bapibuild", "Builds the result of General Fuse operation using top level API.\n" + "\t\tObjects for the operation are added using commands baddobjects and baddtools.\n" + "\t\tUsage: bapibuild result", + __FILE__, bapibuild, g); + + theCommands.Add("bapibop", "Builds the result of Boolean operation using top level API.\n" + "\t\tObjects for the operation are added using commands baddobjects and baddtools.\n" + "\t\tUsage: bapibop r operation\n" + "\t\tWhere:\n" + "\t\tresult - name of the result shape\n" + "\t\top - type of Boolean operation. Possible values:\n" + "\t\t - 0/common - for Common operation\n" + "\t\t - 1/fuse - for Fuse operation\n" + "\t\t - 2/cut - for Cut operation\n" + "\t\t - 3/tuc/cut21 - for Cut21 operation\n" + "\t\t - 4/section - for Section operation", + __FILE__, bapibop, g); + + theCommands.Add("bapisplit", "Builds the result of Split operation using top level API.\n" + "\t\tObjects for the operation are added using commands baddobjects and baddtools.\n" + "\t\tUsage: bapisplit result", + __FILE__, bapisplit, g); } //======================================================================= //function : bapibop @@ -62,30 +81,29 @@ Standard_Integer bapibop(Draw_Interpretor& di, Standard_Integer n, const char** a) { - if (n<3) { - di << " use bapibop r type\n"; + if (n != 3) { + di.PrintHelp(a[0]); + return 1; + } + + BOPAlgo_Operation anOp = BOPTest::GetOperationType(a[2]); + if (anOp == BOPAlgo_UNKNOWN) + { + di << "Invalid operation type\n"; return 0; } // Standard_Boolean bRunParallel, bNonDestructive; - Standard_Integer iOp; Standard_Real aFuzzyValue; BRepAlgoAPI_Common aCommon; BRepAlgoAPI_Fuse aFuse; BRepAlgoAPI_Cut aCut; BRepAlgoAPI_Section aSection; BRepAlgoAPI_BooleanOperation *pBuilder; - BOPAlgo_Operation aOp; // pBuilder=NULL; - iOp=atoi(a[2]); - if (iOp<0 || iOp>4) { - di << "invalid operation type\n"; - return 0; - } - aOp=(BOPAlgo_Operation)iOp; // - switch (aOp) { + switch (anOp) { case BOPAlgo_COMMON: pBuilder=&aCommon; break; @@ -115,7 +133,7 @@ Standard_Integer bapibop(Draw_Interpretor& di, bNonDestructive = BOPTest_Objects::NonDestructive(); BOPAlgo_GlueEnum aGlue = BOPTest_Objects::Glue(); // - if (aOp!=BOPAlgo_CUT21) { + if (anOp!=BOPAlgo_CUT21) { pBuilder->SetArguments(aLS); pBuilder->SetTools(aLT); } @@ -157,7 +175,7 @@ Standard_Integer bapibop(Draw_Interpretor& di, // const TopoDS_Shape& aR=pBuilder->Shape(); if (aR.IsNull()) { - di << " null shape\n"; + di << "Result is a null shape\n"; return 0; } // @@ -172,9 +190,9 @@ Standard_Integer bapibuild(Draw_Interpretor& di, Standard_Integer n, const char** a) { - if (n<2) { - di << " use bapibuild r\n"; - return 0; + if (n != 2) { + di.PrintHelp(a[0]); + return 1; } // Standard_Boolean bRunParallel, bNonDestructive; @@ -226,7 +244,7 @@ Standard_Integer bapibuild(Draw_Interpretor& di, // const TopoDS_Shape& aR=aBuilder.Shape(); if (aR.IsNull()) { - di << " null shape\n"; + di << "Result is a null shape\n"; return 0; } // @@ -242,8 +260,8 @@ Standard_Integer bapisplit(Draw_Interpretor& di, Standard_Integer n, const char** a) { - if (n < 2) { - di << " use bapisplit r\n"; + if (n != 2) { + di.PrintHelp(a[0]); return 1; } // @@ -289,7 +307,7 @@ Standard_Integer bapisplit(Draw_Interpretor& di, // getting the result of the operation const TopoDS_Shape& aR = aSplitter.Shape(); if (aR.IsNull()) { - di << " null shape\n"; + di << "Result is a null shape\n"; return 0; } // diff --git a/src/BOPTest/BOPTest_ObjCommands.cxx b/src/BOPTest/BOPTest_ObjCommands.cxx index 2170f7861e..ef440650dd 100644 --- a/src/BOPTest/BOPTest_ObjCommands.cxx +++ b/src/BOPTest/BOPTest_ObjCommands.cxx @@ -14,26 +14,26 @@ #include + #include + #include + #include + #include #include + #include -#include -// -// -// -static Standard_Integer baddobjects (Draw_Interpretor& , Standard_Integer , const char** ); +static Standard_Integer baddobjects (Draw_Interpretor& , Standard_Integer , const char** ); static Standard_Integer bclearobjects (Draw_Interpretor& , Standard_Integer , const char** ); -static Standard_Integer baddtools (Draw_Interpretor& , Standard_Integer , const char** ); -static Standard_Integer bcleartools (Draw_Interpretor& , Standard_Integer , const char** ); -static Standard_Integer baddcompound(Draw_Interpretor& , Standard_Integer , const char** ); -static Standard_Integer baddctools (Draw_Interpretor& , Standard_Integer , const char** ); -static Standard_Integer bclear (Draw_Interpretor&, Standard_Integer, const char**); +static Standard_Integer baddtools (Draw_Interpretor& , Standard_Integer , const char** ); +static Standard_Integer bcleartools (Draw_Interpretor& , Standard_Integer , const char** ); +static Standard_Integer baddcompound (Draw_Interpretor& , Standard_Integer , const char** ); +static Standard_Integer baddctools (Draw_Interpretor& , Standard_Integer , const char** ); +static Standard_Integer bclear (Draw_Interpretor&, Standard_Integer, const char**); -// //======================================================================= //function :ObjCommands //purpose : @@ -46,25 +46,56 @@ static Standard_Integer bclear (Draw_Interpretor&, Standard_Integer, const cha // Chapter's name const char* g = "BOPTest commands"; // Commands - theCommands.Add("baddobjects" , "use baddobjects s1 s2 ..." , __FILE__, baddobjects, g); - theCommands.Add("bclearobjects" , "use bclearobjects" , __FILE__, bclearobjects, g); - theCommands.Add("baddtools" , "use baddtools s1 s2 ..." , __FILE__, baddtools, g); - theCommands.Add("bcleartools" , "use bcleartools" , __FILE__, bcleartools, g); - theCommands.Add("baddcompound" , "use baddcompound c" , __FILE__, baddcompound, g); - theCommands.Add("baddctools" , "use baddctools c" , __FILE__, baddctools, g); - theCommands.Add("bclear" , "use bclear" , __FILE__, bclear, g); + theCommands.Add("baddobjects", "Adds objects for Boolean/GF/Split/Cells operations.\n" + "\t\tThe command has cumulative effect, thus can be used several times for single operation.\n" + "\t\tFor new operation the objects have to be cleared by bclearobjects or bclear commands.\n" + "\t\tUsage: baddobjects s1 s2 ...", + __FILE__, baddobjects, g); + + theCommands.Add("bclearobjects", "Clears the objects previously added for Boolean/GF/Split/Cells operations.\n" + "\t\tUsage: bclearobjects", + __FILE__, bclearobjects, g); + + theCommands.Add("baddtools", "Adds tools for Boolean/GF/Split/Cells operations.\n" + "\t\tThe command has cumulative effect, thus can be used several times for single operation.\n" + "\t\tFor new operation the tools have to be cleared by bcleartools or bclear commands.\n" + "\t\tUsage: baddtools s1 s2 ...", + __FILE__, baddtools, g); + + theCommands.Add("bcleartools", "Clears the tools previously added for Boolean/GF/Split/Cells operations.\n" + "\t\tUsage: bcleartools", + __FILE__, bcleartools, g); + + theCommands.Add("baddcompound", "Command for adding multiple objects for Boolean/GF/Split/Cells operations grouped in one object.\n" + "\t\tGiven object will be exploded on first level sub-shapes and each of these sub-shapes will act as a separate object.\n" + "\t\tThe command has cumulative effect, thus can be used several times for single operation.\n" + "\t\tFor new operation the objects have to be cleared by bclearobjects or bclear commands.\n" + "\t\tUsage: baddcompound c", + __FILE__, baddcompound, g); + + theCommands.Add("baddctools", "Command for adding multiple tools for Boolean/GF/Split/Cells operations grouped in one object.\n" + "\t\tGiven object will be exploded on first level sub-shapes and each of these sub-shapes will act as a separate tool.\n" + "\t\tThe command has cumulative effect, thus can be used several times for single operation.\n" + "\t\tFor new operation the tools have to be cleared by bcleartools or bclear commands.\n" + "\t\tUsage: baddctools c", + __FILE__, baddctools, g); + + theCommands.Add("bclear" , "Clears both objects and tools previously added for Boolean/GF/Split/Cells operations.\n" + "\t\tUsage: bclear", + __FILE__, bclear, g); } + //======================================================================= //function : baddcompound //purpose : //======================================================================= -Standard_Integer baddcompound (Draw_Interpretor& , - Standard_Integer n, +Standard_Integer baddcompound (Draw_Interpretor& di, + Standard_Integer n, const char** a) { - if (n<2) { - printf(" use baddcompound c\n"); - return 0; + if (n < 2) { + di.PrintHelp(a[0]); + return 1; } // TopoDS_Iterator aIt; @@ -85,13 +116,13 @@ Standard_Integer baddcompound (Draw_Interpretor& , //function : baddctools //purpose : //======================================================================= -Standard_Integer baddctools (Draw_Interpretor& , - Standard_Integer n, +Standard_Integer baddctools (Draw_Interpretor& di, + Standard_Integer n, const char** a) { - if (n<2) { - printf(" use baddctools c\n"); - return 0; + if (n < 2) { + di.PrintHelp(a[0]); + return 1; } // TopoDS_Iterator aIt; @@ -113,13 +144,13 @@ Standard_Integer baddctools (Draw_Interpretor& , //function :baddobjects //purpose : //======================================================================= -Standard_Integer baddobjects (Draw_Interpretor& , - Standard_Integer n, +Standard_Integer baddobjects (Draw_Interpretor& di, + Standard_Integer n, const char** a) { - if (n<2) { - printf(" use baddobjects s1 s2 ...\n"); - return 0; + if (n < 2) { + di.PrintHelp(a[0]); + return 1; } // Standard_Integer i; @@ -137,13 +168,13 @@ Standard_Integer baddobjects (Draw_Interpretor& , //function : bclearobjects //purpose : //======================================================================= -Standard_Integer bclearobjects (Draw_Interpretor& , - Standard_Integer n, - const char** ) +Standard_Integer bclearobjects (Draw_Interpretor& di, + Standard_Integer n, + const char** a) { - if (n!=1) { - printf(" use bclearobjects\n"); - return 0; + if (n != 1) { + di.PrintHelp(a[0]); + return 1; } TopTools_ListOfShape& aLS=BOPTest_Objects::Shapes(); aLS.Clear(); @@ -154,13 +185,13 @@ Standard_Integer bclearobjects (Draw_Interpretor& , //function : baddtools //purpose : //======================================================================= -Standard_Integer baddtools (Draw_Interpretor& , - Standard_Integer n, +Standard_Integer baddtools (Draw_Interpretor& di, + Standard_Integer n, const char** a) { - if (n<2) { - printf(" use baddtools s1 s2 ...\n"); - return 0; + if (n < 2) { + di.PrintHelp(a[0]); + return 1; } // Standard_Integer i; @@ -178,13 +209,13 @@ Standard_Integer baddtools (Draw_Interpretor& , //function : bcleartools //purpose : //======================================================================= -Standard_Integer bcleartools (Draw_Interpretor& , - Standard_Integer n, - const char** ) +Standard_Integer bcleartools (Draw_Interpretor& di, + Standard_Integer n, + const char** a) { - if (n!=1) { - printf(" use bcleartools\n"); - return 0; + if (n != 1) { + di.PrintHelp(a[0]); + return 1; } TopTools_ListOfShape& aLS=BOPTest_Objects::Tools(); aLS.Clear(); @@ -195,13 +226,13 @@ Standard_Integer bcleartools (Draw_Interpretor& , //function : bclear //purpose : //======================================================================= -Standard_Integer bclear(Draw_Interpretor& di, - Standard_Integer n, - const char** ) +Standard_Integer bclear(Draw_Interpretor& di, + Standard_Integer n, + const char** a) { - if (n!=1) { - di << " use bclear\n"; - return 0; + if (n != 1) { + di.PrintHelp(a[0]); + return 1; } // BOPTest_Objects::Clear(); diff --git a/src/BOPTest/BOPTest_PartitionCommands.cxx b/src/BOPTest/BOPTest_PartitionCommands.cxx index b85f70110e..ffc15f6fc4 100644 --- a/src/BOPTest/BOPTest_PartitionCommands.cxx +++ b/src/BOPTest/BOPTest_PartitionCommands.cxx @@ -55,25 +55,53 @@ void BOPTest::PartitionCommands(Draw_Interpretor& theCommands) // Chapter's name const char* g = "BOPTest commands"; // Commands - theCommands.Add("bfillds", "use bfillds [-t]" , __FILE__, bfillds, g); - theCommands.Add("bbuild" , "use bbuild r [-t]" , __FILE__, bbuild, g); - theCommands.Add("bbop" , "use bbop r op [-t]", __FILE__, bbop, g); - theCommands.Add("bsplit" , "use bsplit r [-t]" , __FILE__, bsplit, g); - - theCommands.Add("buildbop", "Builds the result of BOP basing on the GF.\n" - " The command uses classification approach for building the result of BOP\n" - " (thus it operates on solids only and can be used on open solids):\n" - " - FUSE is built from the faces OUT of all arguments\n" - " - COMMON is built from the faces IN any of the object/tools\n" - " - CUT is built from the objects faces OUT of the tools and tools faces IN the objects.\n" - " Please note that history for solids will not be available.\n\n" - " Usage: buildbop result -o s1 [s2 ...] -t s3 [s4 ...] -op operation (common/fuse/cut/tuc)\n" - " Where:\n" - " result - result shape of the operation\n" - " s1 s2 s3 s4 - arguments (solids) of the GF operation\n" - " operation - type of boolean operation", + theCommands.Add("bfillds", "Performs intersection of the arguments added for the operation by baddobjects and baddtools commands.\n" + "\t\tUsage: bfillds [-t]\n" + "\t\tWhere: -t is the optional parameter for enabling timer and showing elapsed time of the operation", + __FILE__, bfillds, g); + + theCommands.Add("bbuild" , "Builds the result of General Fuse operation. Intersection (bfillds) has to be already performed by this moment.\n" + "\t\tUsage: bbuild result [-t]\n" + "\t\tWhere:\n" + "\t\tresult - name of the result shape\n" + "\t\t-t is the optional parameter for enabling timer and showing elapsed time of the operation", + __FILE__, bbuild, g); + + theCommands.Add("bbop" , "Builds the result of Boolean operation. Intersection (bfillds) has to be already performed by this moment.\n" + "\t\tUsage: bbop result op [-t]\n" + "\t\tWhere:\n" + "\t\tresult - name of the result shape\n" + "\t\top - type of Boolean operation. Possible values:\n" + "\t\t - 0/common - for Common operation\n" + "\t\t - 1/fuse - for Fuse operation\n" + "\t\t - 2/cut - for Cut operation\n" + "\t\t - 3/tuc/cut21 - for Cut21 operation\n" + "\t\t - 4/section - for Section operation\n" + "\t\t-t - optional parameter for enabling timer and showing elapsed time of the operation", + __FILE__, bbop, g); + + theCommands.Add("bsplit" , "Builds the result of Split operation. Intersection (bfillds) has to be already performed by this moment.\n" + "\t\tUsage: bsplit result [-t]\n" + "\t\tWhere:\n" + "\t\tresult - name of the result shape\n" + "\t\t-t is the optional parameter for enabling timer and showing elapsed time of the operation", + __FILE__, bsplit, g); + + theCommands.Add("buildbop", "Builds the result of BOP basing on the GF, thus bbuild command has to be already performed\n" + "\t\tThe command uses classification approach for building the result of BOP\n" + "\t\t(thus it operates on solids only and can be used on open solids):\n" + "\t\t - FUSE is built from the faces OUT of all arguments\n" + "\t\t - COMMON is built from the faces IN any of the object/tools\n" + "\t\t - CUT is built from the objects faces OUT of the tools and tools faces IN the objects.\n" + "\t\tPlease note that history for solids will not be available.\n\n" + "\t\tUsage: buildbop result -o s1 [s2 ...] -t s3 [s4 ...] -op operation (common/fuse/cut/tuc)\n" + "\t\tWhere:\n" + "\t\tresult - result shape of the operation\n" + "\t\ts1 s2 s3 s4 - arguments (solids) of the GF operation\n" + "\t\toperation - type of boolean operation", __FILE__, buildbop, g); } + //======================================================================= //function : bfillds //purpose : @@ -83,20 +111,20 @@ Standard_Integer bfillds(Draw_Interpretor& di, const char** a) { if (n > 2) { - di << " use bfillds [-t]\n"; - return 0; + di.PrintHelp(a[0]); + return 1; } // char buf[32]; Standard_Boolean bRunParallel, bNonDestructive, bShowTime; - Standard_Integer i, aNbS; + Standard_Integer aNbS; Standard_Real aTol; TopTools_ListIteratorOfListOfShape aIt; TopTools_ListOfShape aLC; TopTools_ListOfShape& aLS=BOPTest_Objects::Shapes(); aNbS=aLS.Extent(); if (!aNbS) { - di << " no objects to process\n"; + di << "No objects to process\n"; return 0; } // @@ -107,10 +135,16 @@ Standard_Integer bfillds(Draw_Interpretor& di, aTol = BOPTest_Objects::FuzzyValue(); BOPAlgo_GlueEnum aGlue = BOPTest_Objects::Glue(); // - for (i=1; i 3) { + di.PrintHelp(a[0]); + return 1; } // BOPDS_PDS pDS=BOPTest_Objects::PDS(); if (!pDS) { - di << " prepare PaveFiller first\n"; + di << "Prepare PaveFiller first\n"; return 0; } // char buf[128]; Standard_Boolean bRunParallel, bShowTime; - Standard_Integer i; TopTools_ListIteratorOfListOfShape aIt; // @@ -203,10 +236,16 @@ Standard_Integer bbuild(Draw_Interpretor& di, // bShowTime=Standard_False; bRunParallel=BOPTest_Objects::RunParallel(); - for (i=2; i 4) { + di.PrintHelp(a[0]); + return 1; } // BOPDS_PDS pDS=BOPTest_Objects::PDS(); if (!pDS) { - di << " prepare PaveFiller first\n"; + di << "Prepare PaveFiller first\n"; return 0; } // - char buf[32]; - Standard_Boolean bRunParallel, bShowTime; - Standard_Integer iOp, i; - BOPAlgo_Operation aOp; - TopTools_ListIteratorOfListOfShape aIt; - // - iOp=Draw::Atoi(a[2]); - if (iOp<0 || iOp>4) { - di << " invalid operation type\n"; + BOPAlgo_Operation anOp = BOPTest::GetOperationType(a[2]); + if (anOp == BOPAlgo_UNKNOWN) + { + di << "Invalid operation type\n"; return 0; } - aOp=(BOPAlgo_Operation)iOp; - // - bShowTime=Standard_False; - bRunParallel=BOPTest_Objects::RunParallel(); - for (i=3; iClear(); // TopTools_ListOfShape& aLSObj=BOPTest_Objects::Shapes(); - aIt.Initialize(aLSObj); + TopTools_ListIteratorOfListOfShape aIt(aLSObj); for (; aIt.More(); aIt.Next()) { const TopoDS_Shape& aS=aIt.Value(); pBuilder->AddArgument(aS); } // - if (aOp!=BOPAlgo_SECTION) { + if (anOp!=BOPAlgo_SECTION) { BOPAlgo_BOP *pBOP=(BOPAlgo_BOP *)pBuilder; // TopTools_ListOfShape& aLSTools=BOPTest_Objects::Tools(); @@ -315,7 +354,7 @@ Standard_Integer bbop(Draw_Interpretor& di, pBOP->AddTool(aS); } // - pBOP->SetOperation(aOp); + pBOP->SetOperation(anOp); } else { TopTools_ListOfShape& aLSTools=BOPTest_Objects::Tools(); @@ -349,13 +388,14 @@ Standard_Integer bbop(Draw_Interpretor& di, aTimer.Stop(); // if (bShowTime) { + char buf[32]; Sprintf(buf, " Tps: %7.2lf\n", aTimer.ElapsedTime()); di << buf; } // const TopoDS_Shape& aR=pBuilder->Shape(); if (aR.IsNull()) { - di << " null shape\n"; + di << "Result is a null shape\n"; return 0; } // @@ -373,14 +413,14 @@ Standard_Integer bsplit(Draw_Interpretor& di, Standard_Integer n, const char** a) { - if (n < 2) { - di << " use bsplit r [-t (show time)]\n"; + if (n < 2 || n > 3) { + di.PrintHelp(a[0]); return 1; } // BOPDS_PDS pDS = BOPTest_Objects::PDS(); if (!pDS) { - di << " prepare PaveFiller first\n"; + di << "Prepare PaveFiller first\n"; return 0; } // @@ -424,10 +464,18 @@ Standard_Integer bsplit(Draw_Interpretor& di, } // // show time if necessary - if (n == 3 && !strcmp(a[2], "-t")) { - char buf[20]; - Sprintf(buf, " Tps: %7.2lf\n", aTimer.ElapsedTime()); - di << buf; + if (n == 3) + { + if (!strcmp(a[2], "-t")) + { + char buf[20]; + Sprintf(buf, " Tps: %7.2lf\n", aTimer.ElapsedTime()); + di << buf; + } + else + { + di << "Warning: invalid key\n"; + } } // // Debug commands support diff --git a/tests/bugs/modalg_5/bug24639 b/tests/bugs/modalg_5/bug24639 index f5b855ae00..49aa6a5fbb 100644 --- a/tests/bugs/modalg_5/bug24639 +++ b/tests/bugs/modalg_5/bug24639 @@ -69,8 +69,15 @@ baddcompound bx baddcompound by baddcompound bz -# intersection step -bfillds -t +# intersection step in serial mode +brunparallel 0 +regexp {Tps: +([-0-9.+eE]+)} [bfillds -t] full Tps1 -# intersection step -bfillds -t -s +# intersection step in parallel mode +brunparallel 1 +regexp {Tps: +([-0-9.+eE]+)} [bfillds -t] full Tps2 + +# parallel execution is expected to be at least 20% faster than serial execution +if {${Tps2} > [dval 0.8*${Tps1}]} { + puts "Error: Parallel execution does not give expected performance speed up" +} diff --git a/tests/bugs/modalg_7/bug30206 b/tests/bugs/modalg_7/bug30206 new file mode 100644 index 0000000000..158725d573 --- /dev/null +++ b/tests/bugs/modalg_7/bug30206 @@ -0,0 +1,84 @@ +puts "============================================" +puts "0030206: Improve API of commands bbop and bapibop" +puts "============================================" +puts "" + +box b1 10 10 10 +box b2 5 5 5 10 10 10 + +bclearobjects +bcleartools +baddobjects b1 +baddtools b2 +bfillds + +bcommon r0 b1 b2 +bbop r0_1 0 +bbop r0_2 common +bapibop r0_3 0 +bapibop r0_4 common + +checknbshapes r0_1 -ref [nbshapes r0] +checknbshapes r0_2 -ref [nbshapes r0] +checknbshapes r0_3 -ref [nbshapes r0] +checknbshapes r0_4 -ref [nbshapes r0] + + +bfuse r1 b1 b2 +bbop r1_1 1 +bbop r1_2 fuse +bapibop r1_3 1 +bapibop r1_4 fuse + +checknbshapes r1_1 -ref [nbshapes r1] +checknbshapes r1_2 -ref [nbshapes r1] +checknbshapes r1_3 -ref [nbshapes r1] +checknbshapes r1_4 -ref [nbshapes r1] + + +bcut r2 b1 b2 +bbop r2_1 2 +bbop r2_2 cut +bapibop r2_3 2 +bapibop r2_4 cut + +checknbshapes r2_1 -ref [nbshapes r2] +checknbshapes r2_2 -ref [nbshapes r2] +checknbshapes r2_3 -ref [nbshapes r2] +checknbshapes r2_4 -ref [nbshapes r2] + + +btuc r3 b1 b2 +bbop r3_1 3 +bbop r3_2 tuc +bbop r3_3 cut21 +bapibop r3_4 3 +bapibop r3_5 tuc +bapibop r3_6 cut21 + +checknbshapes r3_1 -ref [nbshapes r3] +checknbshapes r3_2 -ref [nbshapes r3] +checknbshapes r3_3 -ref [nbshapes r3] +checknbshapes r3_4 -ref [nbshapes r3] +checknbshapes r3_5 -ref [nbshapes r3] +checknbshapes r3_6 -ref [nbshapes r3] + + +bsection r4 b1 b2 +bbop r4_1 4 +bbop r4_2 section +bapibop r4_3 4 +bapibop r4_4 section + +checknbshapes r4_1 -ref [nbshapes r4] +checknbshapes r4_2 -ref [nbshapes r4] +checknbshapes r4_3 -ref [nbshapes r4] +checknbshapes r4_4 -ref [nbshapes r4] + +if {![regexp "Invalid operation type" [bbop r 5]]} { + puts "Error: incorrect parameter is not treated" +} + +if {![regexp "Invalid operation type" [bbop r f]]} { + puts "Error: incorrect parameter is not treated" +} diff --git a/tests/perf/bop/buildfaces b/tests/perf/bop/buildfaces index eb7563a4b9..7a51598254 100644 --- a/tests/perf/bop/buildfaces +++ b/tests/perf/bop/buildfaces @@ -40,22 +40,34 @@ puts "Comparing performance of building many faces" puts "in parallel and serial modes" # -# parallel +# parallel +brunparallel 1 puts "Build faces in parallel mode:" +dchrono h start set info1 [bbuild rp -t] +dchrono h stop counter Parallel_Builder regexp {Tps: +([-0-9.+eE]+)} ${info1} full Tps1 puts "Tps1=${Tps1}" # # serial -puts "Build faces in serial mode:" -set info2 [bbuild rs -s -t] +brunparallel 0 +puts "Build faces in serial mode:" +dchrono h restart +set info2 [bbuild rs -t] +dchrono h stop counter Serial_Builder + regexp {Tps: +([-0-9.+eE]+)} ${info2} full Tps2 puts "Tps2=${Tps2}" checknbshapes rp -vertex 23060 -edge 35880 -wire 11704 -face 11704 -shell 0 -solid 0 -compsolid 0 -compound 1 -shape 82349 checknbshapes rs -vertex 23060 -edge 35880 -wire 11704 -face 11704 -shell 0 -solid 0 -compsolid 0 -compound 1 -shape 82349 +# parallel execution is expected to be at least 20% faster than serial execution +if {${Tps1} > [dval 0.8*${Tps2}]} { + puts "Error: Parallel execution does not give expected performance speed up" +} + vinit vdisplay rs vfit From e8ae1c42a83280a53bae0541a3abaa57d7ed4f80 Mon Sep 17 00:00:00 2001 From: vro Date: Wed, 8 Sep 2021 09:49:52 +0300 Subject: [PATCH 046/639] 0032531: Application Framework - There should be methods to get explanations of PCDM_StoreStatus and PCDM_ReaderStatus values Documentation is added for PCDM_ReaderStatus enumeration. Modified: - PCDM_ReaderStatus.hxx: each value received a short explanation. --- src/PCDM/PCDM_ReaderStatus.hxx | 72 ++++++++++++++++++++++------------ 1 file changed, 48 insertions(+), 24 deletions(-) diff --git a/src/PCDM/PCDM_ReaderStatus.hxx b/src/PCDM/PCDM_ReaderStatus.hxx index 5e04801432..1a61abe736 100644 --- a/src/PCDM/PCDM_ReaderStatus.hxx +++ b/src/PCDM/PCDM_ReaderStatus.hxx @@ -17,32 +17,56 @@ #ifndef _PCDM_ReaderStatus_HeaderFile #define _PCDM_ReaderStatus_HeaderFile - +//! Status of reading of a document. +//! The following values are accessible: +//! - PCDM_RS_OK: the document was successfully read; +//! - PCDM_RS_NoDriver: driver is not found for the defined file format; +//! - PCDM_RS_UnknownFileDriver: check of the file failed (file doesn't exist, for example); +//! - PCDM_RS_OpenError: attempt to open the file failed; +//! - PCDM_RS_NoVersion: document version of the file is out of scope; +//! - PCDM_RS_NoSchema: NOT USED; +//! - PCDM_RS_NoDocument: document is empty (failed to be read correctly); +//! - PCDM_RS_ExtensionFailure: NOT USED; +//! - PCDM_RS_WrongStreamMode: file is not open for reading (a mistaken mode); +//! - PCDM_RS_FormatFailure: mistake in document data structure; +//! - PCDM_RS_TypeFailure: data type is unknown; +//! - PCDM_RS_TypeNotFoundInSchema: data type is not found in schema (STD file format); +//! - PCDM_RS_UnrecognizedFileFormat: document data structure is wrong (binary file format); +//! - PCDM_RS_MakeFailure: conversion of data from persistent to transient attributes failed (XML file format); +//! - PCDM_RS_PermissionDenied: file can't be opened because permission is denied; +//! - PCDM_RS_DriverFailure: something went wrong (a general mistake of reading of a document); +//! - PCDM_RS_AlreadyRetrievedAndModified: document is already retrieved and modified in current session; +//! - PCDM_RS_AlreadyRetrieved: document is already in current session (already retrieved); +//! - PCDM_RS_UnknownDocument: file doesn't exist on disk; +//! - PCDM_RS_WrongResource: wrong resource file (.RetrievalPlugin); +//! - PCDM_RS_ReaderException: no shape section in the document file (binary file format); +//! - PCDM_RS_NoModel: NOT USED; +//! - PCDM_RS_UserBreak: user stopped reading of the document; enum PCDM_ReaderStatus { -PCDM_RS_OK, -PCDM_RS_NoDriver, -PCDM_RS_UnknownFileDriver, -PCDM_RS_OpenError, -PCDM_RS_NoVersion, -PCDM_RS_NoSchema, -PCDM_RS_NoDocument, -PCDM_RS_ExtensionFailure, -PCDM_RS_WrongStreamMode, -PCDM_RS_FormatFailure, -PCDM_RS_TypeFailure, -PCDM_RS_TypeNotFoundInSchema, -PCDM_RS_UnrecognizedFileFormat, -PCDM_RS_MakeFailure, -PCDM_RS_PermissionDenied, -PCDM_RS_DriverFailure, -PCDM_RS_AlreadyRetrievedAndModified, -PCDM_RS_AlreadyRetrieved, -PCDM_RS_UnknownDocument, -PCDM_RS_WrongResource, -PCDM_RS_ReaderException, -PCDM_RS_NoModel, -PCDM_RS_UserBreak +PCDM_RS_OK, //!< Success +PCDM_RS_NoDriver, //!< No driver for file format +PCDM_RS_UnknownFileDriver, //!< File is bad +PCDM_RS_OpenError, //!< Can't open file +PCDM_RS_NoVersion, //!< Unknown document version +PCDM_RS_NoSchema, //!< NOT USED +PCDM_RS_NoDocument, //!< Document is empty +PCDM_RS_ExtensionFailure, //!< NOT USED +PCDM_RS_WrongStreamMode, //!< Open mode is mistaken +PCDM_RS_FormatFailure, //!< Document data structure is wrong +PCDM_RS_TypeFailure, //!< Data type is unknown +PCDM_RS_TypeNotFoundInSchema, //!< Data type is not found in schema +PCDM_RS_UnrecognizedFileFormat, //!< Document data structure is wrong +PCDM_RS_MakeFailure, //!< Conversion of data failed +PCDM_RS_PermissionDenied, //!< Permission denied to open file +PCDM_RS_DriverFailure, //!< General mistake of reading +PCDM_RS_AlreadyRetrievedAndModified, //!< Document is already retrieved and modified +PCDM_RS_AlreadyRetrieved, //!< Document is already retrieved +PCDM_RS_UnknownDocument, //!< File doesn't exist +PCDM_RS_WrongResource, //!< Wrong resource file +PCDM_RS_ReaderException, //!< Wrong data structure +PCDM_RS_NoModel, //!< NOT USED +PCDM_RS_UserBreak //!< User interrupted reading }; #endif // _PCDM_ReaderStatus_HeaderFile From 7d7541ceebe6e3983721844bcb1b895bcde2f468 Mon Sep 17 00:00:00 2001 From: sshutina Date: Thu, 9 Sep 2021 17:54:13 +0300 Subject: [PATCH 047/639] 0032507: Visualization, TKOpenGl - topmost text disappears with Graphic3d_RTM_DEPTH_PEELING_OIT enabled --- src/OpenGl/OpenGl_DepthPeeling.hxx | 6 +++-- src/OpenGl/OpenGl_LayerList.cxx | 7 +++++ .../opengl/data/transparency/oit_osdtext_bug | 26 +++++++++++++++++++ 3 files changed, 37 insertions(+), 2 deletions(-) create mode 100644 tests/opengl/data/transparency/oit_osdtext_bug diff --git a/src/OpenGl/OpenGl_DepthPeeling.hxx b/src/OpenGl/OpenGl_DepthPeeling.hxx index 7345cd9c4c..7c34f54c05 100644 --- a/src/OpenGl/OpenGl_DepthPeeling.hxx +++ b/src/OpenGl/OpenGl_DepthPeeling.hxx @@ -36,11 +36,13 @@ public: //! Returns estimated GPU memory usage for holding data without considering overheads and allocation alignment rules. Standard_EXPORT virtual Standard_Size EstimatedDataSize() const Standard_OVERRIDE; - //! Attach a texture image + //! Attach a texture image. + //! Resets the active FBO to 0. Standard_EXPORT void AttachDepthTexture (const Handle(OpenGl_Context)& theCtx, const Handle(OpenGl_Texture)& theDepthStencilTexture); - //! Detach a texture image + //! Detach a texture image. + //! Resets the active FBO to 0. Standard_EXPORT void DetachDepthTexture (const Handle(OpenGl_Context)& theCtx); //! Returns additional buffers for ping-pong diff --git a/src/OpenGl/OpenGl_LayerList.cxx b/src/OpenGl/OpenGl_LayerList.cxx index 53d616fb94..d12e38ea5f 100644 --- a/src/OpenGl/OpenGl_LayerList.cxx +++ b/src/OpenGl/OpenGl_LayerList.cxx @@ -1219,6 +1219,13 @@ void OpenGl_LayerList::renderTransparent (const Handle(OpenGl_Workspace)& theW } } aView->DepthPeelingFbos()->DetachDepthTexture (aCtx); + + // Bind the framebuffer for reading depth and writing final color + // after DetachDepthTexture() because after the function it's unbinded. + if (theReadDrawFbo) + { + theReadDrawFbo->BindBuffer (aCtx); + } break; } } diff --git a/tests/opengl/data/transparency/oit_osdtext_bug b/tests/opengl/data/transparency/oit_osdtext_bug new file mode 100644 index 0000000000..ef688e30f3 --- /dev/null +++ b/tests/opengl/data/transparency/oit_osdtext_bug @@ -0,0 +1,26 @@ +puts "========" +puts "0032507: Visualization, TKOpenGl - topmost text disappears with Graphic3d_RTM_DEPTH_PEELING_OIT enabled" +puts "========" + +pload MODELING VISUALIZATION + +vclear +vinit View1 + +box b 1 2 3 +vdisplay b -dispMode 1 +vaspects b -transparency 0.5 +vfit + +vlight headlight -display +vdisplay headlight -2d bottomright 120 50 +vlight amblight -display +vdisplay amblight -2d bottomright 50 50 + +vrenderparams -perfCounters triangles + +vdump $imagedir/${casename}_1.png + +vrenderparams -oit peel + +vdump $imagedir/${casename}_2.png From 801e67bc7b5494c649e39e4a5895aeb5c7383e93 Mon Sep 17 00:00:00 2001 From: kgv Date: Thu, 9 Sep 2021 18:00:38 +0300 Subject: [PATCH 048/639] 0032564: Foundation Classes, OSD_CachedFileSystem - allow referring to non-default File System Linked file system can be now customized within OSD_CachedFileSystem. --- src/OSD/OSD_CachedFileSystem.cxx | 24 +++++++++++++++++------- src/OSD/OSD_CachedFileSystem.hxx | 13 ++++++++++--- 2 files changed, 27 insertions(+), 10 deletions(-) diff --git a/src/OSD/OSD_CachedFileSystem.cxx b/src/OSD/OSD_CachedFileSystem.cxx index e7c119a784..123e54ec85 100644 --- a/src/OSD/OSD_CachedFileSystem.cxx +++ b/src/OSD/OSD_CachedFileSystem.cxx @@ -16,13 +16,23 @@ IMPLEMENT_STANDARD_RTTIEXT(OSD_CachedFileSystem, OSD_FileSystem) +//======================================================================= +// function : OSD_CachedFileSystem +// purpose : +//======================================================================= +OSD_CachedFileSystem::OSD_CachedFileSystem (const Handle(OSD_FileSystem)& theLinkedFileSystem) +: myLinkedFS (!theLinkedFileSystem.IsNull() ? theLinkedFileSystem : OSD_FileSystem::DefaultFileSystem()) +{ + // +} + //======================================================================= // function : IsSupportedPath // purpose : //======================================================================= Standard_Boolean OSD_CachedFileSystem::IsSupportedPath (const TCollection_AsciiString& theUrl) const { - return OSD_FileSystem::DefaultFileSystem()->IsSupportedPath (theUrl); + return myLinkedFS->IsSupportedPath (theUrl); } //======================================================================= @@ -31,7 +41,7 @@ Standard_Boolean OSD_CachedFileSystem::IsSupportedPath (const TCollection_AsciiS //======================================================================= Standard_Boolean OSD_CachedFileSystem::IsOpenIStream (const opencascade::std::shared_ptr& theStream) const { - return OSD_FileSystem::DefaultFileSystem()->IsOpenIStream (theStream); + return myLinkedFS->IsOpenIStream (theStream); } //======================================================================= @@ -40,7 +50,7 @@ Standard_Boolean OSD_CachedFileSystem::IsOpenIStream (const opencascade::std::sh //======================================================================= Standard_Boolean OSD_CachedFileSystem::IsOpenOStream (const opencascade::std::shared_ptr& theStream) const { - return OSD_FileSystem::DefaultFileSystem()->IsOpenOStream (theStream); + return myLinkedFS->IsOpenOStream (theStream); } //======================================================================= @@ -57,7 +67,7 @@ opencascade::std::shared_ptr OSD_CachedFileSystem::OpenIStream (co myStream.Url = theUrl; myStream.Reset(); } - myStream.Stream = OSD_FileSystem::DefaultFileSystem()->OpenIStream (theUrl, theParams, theOffset, myStream.Stream); + myStream.Stream = myLinkedFS->OpenIStream (theUrl, theParams, theOffset, myStream.Stream); return myStream.Stream; } @@ -68,7 +78,7 @@ opencascade::std::shared_ptr OSD_CachedFileSystem::OpenIStream (co opencascade::std::shared_ptr OSD_CachedFileSystem::OpenOStream (const TCollection_AsciiString& theUrl, const std::ios_base::openmode theMode) { - return OSD_FileSystem::DefaultFileSystem()->OpenOStream (theUrl, theMode); + return myLinkedFS->OpenOStream (theUrl, theMode); } //======================================================================= @@ -82,13 +92,13 @@ opencascade::std::shared_ptr OSD_CachedFileSystem::OpenStreamBuf { if ((theMode & std::ios::out) == std::ios::out) { - return OSD_FileSystem::DefaultFileSystem()->OpenStreamBuffer (theUrl, theMode, theOffset, theOutBufSize); + return myLinkedFS->OpenStreamBuffer (theUrl, theMode, theOffset, theOutBufSize); } if (myStream.Url != theUrl) { myStream.Url = theUrl; myStream.Reset(); } - myStream.StreamBuf = OSD_FileSystem::DefaultFileSystem()->OpenStreamBuffer (theUrl, theMode, theOffset, theOutBufSize); + myStream.StreamBuf = myLinkedFS->OpenStreamBuffer (theUrl, theMode, theOffset, theOutBufSize); return myStream.StreamBuf; } diff --git a/src/OSD/OSD_CachedFileSystem.hxx b/src/OSD/OSD_CachedFileSystem.hxx index b7389ec890..170edcf7a9 100644 --- a/src/OSD/OSD_CachedFileSystem.hxx +++ b/src/OSD/OSD_CachedFileSystem.hxx @@ -16,7 +16,7 @@ #include -//! File system keeping last stream created by OSD_FileSystem::DefaultFileSystem() to be reused for opening a stream with the same URL. +//! File system keeping last stream created by linked file system (OSD_FileSystem::DefaultFileSystem() by default) to be reused for opening a stream with the same URL. //! Note that as file is kept in opened state, application will need destroying this object to ensure all files being closed. //! This interface could be handy in context of reading numerous objects pointing to the same file (at different offset). //! Make sure to create a dedicated OSD_CachedFileSystem for each working thread to avoid data races. @@ -26,7 +26,13 @@ class OSD_CachedFileSystem : public OSD_FileSystem public: //! Constructor. - OSD_CachedFileSystem() {} + Standard_EXPORT OSD_CachedFileSystem (const Handle(OSD_FileSystem)& theLinkedFileSystem = Handle(OSD_FileSystem)()); + + //! Return linked file system; initialized with OSD_FileSystem::DefaultFileSystem() by default. + const Handle(OSD_FileSystem)& LinkedFileSystem() const { return myLinkedFS; } + + //! Sets linked file system. + void SetLinkedFileSystem (const Handle(OSD_FileSystem)& theLinkedFileSystem) { myLinkedFS = theLinkedFileSystem; } //! Returns TRUE if URL defines a supported protocol. Standard_EXPORT virtual Standard_Boolean IsSupportedPath (const TCollection_AsciiString& theUrl) const Standard_OVERRIDE; @@ -73,7 +79,8 @@ protected: protected: - OSD_CachedStream myStream; + OSD_CachedStream myStream; //!< active cached stream + Handle(OSD_FileSystem) myLinkedFS; //!< linked file system to open files }; From cd4977383d1879188990b1dad0e78b5a71e3a90e Mon Sep 17 00:00:00 2001 From: kgv Date: Thu, 9 Sep 2021 22:34:48 +0300 Subject: [PATCH 049/639] 0032092: Visualization, TKService - Image_VideoRecorder writes garbage from Grayscale image Image_VideoRecorder::writeVideoFrame(), added protection from API misuse. --- src/Image/Image_VideoRecorder.cxx | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/Image/Image_VideoRecorder.cxx b/src/Image/Image_VideoRecorder.cxx index 65ed0383cb..e2a3977721 100644 --- a/src/Image/Image_VideoRecorder.cxx +++ b/src/Image/Image_VideoRecorder.cxx @@ -431,6 +431,11 @@ Standard_Boolean Image_VideoRecorder::openVideoCodec (const Image_VideoParams& t Standard_Boolean Image_VideoRecorder::writeVideoFrame (const Standard_Boolean theToFlush) { #ifdef HAVE_FFMPEG + if (myImgSrcRgba.Format() != Image_Format_RGBA) + { + throw Standard_ProgramError ("Image_VideoRecorder, unsupported image format"); + } + int aResAv = 0; AVCodecContext* aCodecCtx = myVideoStream->codec; if (!theToFlush) From 8dcb81ac820f1d103517919c903e855df344e367 Mon Sep 17 00:00:00 2001 From: sshutina Date: Thu, 9 Sep 2021 18:28:31 +0300 Subject: [PATCH 050/639] 0031337: Inspectors - user guide update - Modifyed 3D view: Added the trihedron, view cube Removed the scene manipulation actions (Fit all isn't removed) - Added the new MessageView plugin to display content of Message_Report - DFBrowser plugin improvements: Added the button to switch ON DumpJson in DFBrowser(OFF by default, for better performance) Renamed in DFBrowser "Property Panel" into "Property Panel (custom) Removed the selection controls - ShapeView plugin improvements: Property View content based on DumpJson (columns in tree view for properties are removed), Properties for TopoDS_Shape are displayed - VInspector plugin imrovements: Property View content based on DumpJson (columns in tree view for properties are removed), Properties for AIS_InteractiveContext and AIS_InteractiveObject are displayed Removed History panel in VInspector as not used Implemented the item and actions in VInspector for setting Lights in the view --- dox/user_guides/inspector/images/3DView.png | Bin 6115 -> 7068 bytes .../images/3DView_set_orientation.png | Bin 8477 -> 9474 bytes .../inspector/images/TStandaloneEXE.png | Bin 27861 -> 35425 bytes .../inspector/images/TStandaloneEXE_open.png | Bin 20037 -> 30523 bytes .../inspector/images/dfbrowser.png | Bin 39068 -> 39068 bytes .../inspector/images/dfbrowser_elements.svg | 311 ++---------------- .../inspector/images/drawexe_tinspector.png | Bin 13629 -> 22859 bytes .../images/messageview_dump_panel.png | Bin 0 -> 33994 bytes .../inspector/images/messageview_elements.svg | 21 ++ .../images/messageview_pop_up_menu.png | Bin 0 -> 15022 bytes .../messageview_property_panel_custom.png | Bin 0 -> 25005 bytes .../inspector/images/messageview_view.png | Bin 0 -> 31358 bytes .../inspector/images/property_panel.png | Bin 0 -> 155383 bytes ...ay.png => property_panel_custom_array.png} | Bin ... property_panel_custom_item_selection.svg} | 0 ...el.png => property_panel_custom_label.png} | Bin ...g => property_panel_custom_named_data.png} | Bin ... => property_panel_custom_simple_type.png} | Bin ...erty_panel_custom_tnaming_named_shape.png} | Bin ... property_panel_custom_tnaming_naming.png} | Bin ...erty_panel_custom_tnaming_used_shapes.png} | Bin ...ng => property_panel_custom_tree_node.png} | Bin .../inspector/images/shapeview.png | Bin 38101 -> 63536 bytes .../inspector/images/shapeview_elements.svg | 158 +-------- .../images/shapeview_property_panel.png | Bin 0 -> 24606 bytes .../images/shapeview_tree_columns.png | Bin 40010 -> 19597 bytes .../inspector/images/tinspector_elements.svg | 261 +-------------- .../inspector/images/vinspector.png | Bin 22464 -> 21381 bytes .../inspector/images/vinspector_elements.svg | 217 +----------- .../images/vinspector_light_setting.png | Bin 0 -> 31964 bytes .../images/vinspector_property_panel.png | Bin 0 -> 36449 bytes .../images/vinspector_tree_columns.png | Bin 36341 -> 17567 bytes dox/user_guides/inspector/inspector.md | 129 +++++--- 33 files changed, 188 insertions(+), 909 deletions(-) create mode 100644 dox/user_guides/inspector/images/messageview_dump_panel.png create mode 100644 dox/user_guides/inspector/images/messageview_elements.svg create mode 100644 dox/user_guides/inspector/images/messageview_pop_up_menu.png create mode 100644 dox/user_guides/inspector/images/messageview_property_panel_custom.png create mode 100644 dox/user_guides/inspector/images/messageview_view.png create mode 100644 dox/user_guides/inspector/images/property_panel.png rename dox/user_guides/inspector/images/{property_panel_array.png => property_panel_custom_array.png} (100%) rename dox/user_guides/inspector/images/{property_panel_item_selection.svg => property_panel_custom_item_selection.svg} (100%) rename dox/user_guides/inspector/images/{property_panel_label.png => property_panel_custom_label.png} (100%) rename dox/user_guides/inspector/images/{property_panel_named_data.png => property_panel_custom_named_data.png} (100%) rename dox/user_guides/inspector/images/{property_panel_simple_type.png => property_panel_custom_simple_type.png} (100%) rename dox/user_guides/inspector/images/{property_panel_tnaming_named_shape.png => property_panel_custom_tnaming_named_shape.png} (100%) rename dox/user_guides/inspector/images/{property_panel_tnaming_naming.png => property_panel_custom_tnaming_naming.png} (100%) rename dox/user_guides/inspector/images/{property_panel_tnaming_used_shapes.png => property_panel_custom_tnaming_used_shapes.png} (100%) rename dox/user_guides/inspector/images/{property_panel_tree_node.png => property_panel_custom_tree_node.png} (100%) create mode 100644 dox/user_guides/inspector/images/shapeview_property_panel.png create mode 100644 dox/user_guides/inspector/images/vinspector_light_setting.png create mode 100644 dox/user_guides/inspector/images/vinspector_property_panel.png diff --git a/dox/user_guides/inspector/images/3DView.png b/dox/user_guides/inspector/images/3DView.png index 48529de60c5d7436ab13f85f5f77b47625634bfe..71c00818e5f14db602fa316addd64d7eb87996c5 100644 GIT binary patch literal 7068 zcmeHMYgCfy+QzJGYSip7PC?pXvZf4cRM1S(G_9P}j^^O0gJLP5l7ga;xz)^!&Sr{a zj)%%Tb4=>!0vB~V?_E0(LC?A`j-R`sKWIpJ~;P}C0kth!l> za5&}w0F;teEu34Xy8kZpuongZSaap;rNs#}#sL7peMg)ePT_p{Y-RC9Z0wNGVY5)* z>E+551g_!l*D9{SEv>#gdnxGfq3w5nG;Jybu6c6&*|quDOV~sEfQ}jEI~^db=HR0N z@aCfveT}$Oc9YLpR$l-zBravE*OsM+elESaCiJ#d?Z-B<4WgYs&PkUANX#XoA3tZ; zV(OUq$;VOc*4Wu!q7~AQK!CsPP3IhEx|Vh$uRMl~6+gf)e`!VCQ|D zcKu@mG~lfHs4gJ*>qw?*WXL>uNP1C}2leS+AmR z;V)g7)+Am{v5O}(Uxx*#-*5E^NBr#SciApnE@o=$$DBj4`*n(=s*9Sm>H z&mhHo*v5p(>UAFPCXVi)74H~`pbio6qAukyVzllBZf+zgLsBP*WqU1{EsVZrvav(# z!H8ZTrVT-1SQ8*1Dq+ZW3d~r-hyTKnzLSP};gvVI2t=hde&L2t`$|#JEecbX2VKFg zTLtdbt|v&x{G<=kTe-1<{3zjLRl( zaPP>Z*y8Ec=R@DbKsfPyo7!QltRpMgFE-{v|CzU43P6cc@t&c8l1HW`3t#Xw%5mxl zrvv8>eqhXwiQilOx2(!zXRb>^GP}0(({b+YzsC#vuPEDUbt7cXPYfqU(yalY+lPb- zu|AEqBuIpgZND`lcGXuv?(6w?EX z7zVZ=d&OpdXxBSX70L`s<9pK0eCd6eR$;HCGMFN-+WmpMT>?h|6p;us z-M1Kp0ZllPHk-fNZkgR$0aJ!C4ri?p&78o=0-vz+45i>tzV{})z_~w+&@cJ9h$8Kuox4jX zZe3oVJN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U za$Z*;*3-e_l*If$mx=`tR)OpV&lqq1ix$%%khIHLLGK)O@J+Rn`qc5HVVG~oF=e;B z|HLHpTXoKmF1d*{GN&|YvJzQ*KZ04 z>b!;rLTz}=)G}-f7|#cc6^PQ~k7frjCJ6gq8_z`E^5yVK-Gix%-58!4HdtH;qjQ=5 zF`y}S7Nn2B0G=Y0FPOGy?`#PS;JvN_V$PQaG=WME7>}LpWU0 z7{3*W2rN^#ozY1P1TBqnZT8wt&ypraL$`b_o4Gz7p^E)ttNaYZ^Dy$j%`53j;8!11 zVx&zkBfBbbNQ~__2~rKIlGB1kEMnt%R8P5UAsXeMDVh`+7=eRX34XKOdY8Gs(h5hbujJw>OLVH^7M|w&m|w%*LAeYCfoE(=R|8t`TtW9pJAz~ z9r|@iuljUMeYx8RpVY^e|0KxIP(Hsd7hKPB1{el&yzZM1XmXrKnAQ?u7R*2&>-v4M zD;sRR4{h;YvB=N1EucBeCxA>4h(2#_wITe}7OgJTcy3M?h3Osm>}DjZ^tzI=y)I>8 z*IoGTvhaCU03R5F+`J_i66vEogZ1zc0tfPyKY6)UkYRUz8sNJ^&e*$Fo73+K!8~t1 zOK7P7b8S}`G5y)h`hN_g|HXXz-@OEUBIJ?z%E409zU|d}fPh^kdN?LM*Dg)_MKP1v zqDW{Nb$&^Jw$`bz{bJTo6w?VZAgUA(dVISCrmZ&+gT!6#DD(eYEm6Ok)3l;b^DsP@$3Rpc0rE5F@;V5t zj21(e;}P}qemLXYgVSwyCnaR_EcKPms)xVcrd~%jlh3t0I4czLQ54M G1^q8v1AkQj diff --git a/dox/user_guides/inspector/images/TStandaloneEXE.png b/dox/user_guides/inspector/images/TStandaloneEXE.png index e11bedaf4b03cfe1789540d484a414909186c4fe..6cdd5c902fc8e2b6f6425ad805e5dcbd07ab9a3c 100644 GIT binary patch literal 35425 zcmcG0cT|(x_AQnpA|Oq%fJQ*!C?cW)Qlp{*(o~cxgeoFUx|AdeND(0-q98)7AT`o^ zqJV(3NDYusA|*f|g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- 3D View - Dump View - - + + + Layer 1 + + + + + + + + + + Tree Navigation + Update + Search + Search + + + + + Property panel + OCAF tree view + Dump View + 3D View + Property panel (custom) + + \ No newline at end of file diff --git a/dox/user_guides/inspector/images/drawexe_tinspector.png b/dox/user_guides/inspector/images/drawexe_tinspector.png index bec3b751787646050b33f007fa0232c5d6b9fe40..5cb0eabeec139f5dea9f8f32fbafa7c37f31e0d7 100644 GIT binary patch literal 22859 zcmeIad05iv|2OK)v~TLDS(#$$L^HXxYHlzlW@c(m3+6^;rnzSB3ozLtW=d(PxiML4 zxsjUT3S}x|E~KQWDCCNWNGgbe!1JM*=J%cN@B2L0Ip?~bbFOpF{NeSH`{HxI@B6*H z-pl>INj&9fyLrQo4GIbho9&Lneo;{P4yK^+?fG?UfRV)A0w(bICiEBEqYC9+JK4a8 zRX$b@RtgFg*o`X}R|B8dUpsz2R6*hUF!|p%j4Plh1qGK+b}*|mQJ&o4jSsz}J^IB5 z>dH+b%QR?pCMJnk-;Vc!R;8y`jwc14RP`F&cyHae$#2)R9y|8!8Y`Ro+m(F3#cY1N z)@b|B7oOeNe(g$>=_bo}78ma137;1E{OWwj4>RIdu9!24rUdgApw&Xz4AKwY`(k>q z2*Ru;auBQ;pRScI$7@3!85BmK167UFK z$V}6#)sKwP!g7PnF$^Ttjp_!O8{{`}@*bgPi;JGI5aN6Ml(gUz!Z^_xmdGJnWy+D{ z()Zt{Sg;@lWG&FrZ%!50mmeoZ395SRgQ7fRIs?f)*|R8*nD!SYg@{^i29*k#Z|2W) zx}1c=Xavivs&jqVUh$hwP9~3-vOFt)bjo*A*|D%xd9@4Swjtj>I2s=FF_v`DQu3Z$ z#6k$~@#8rtGs%iA`hetPBKVmXfu!Haf302=ijO-fD$8c{FE0gzemgt^x#s^LR+_im zq)yx?@rymg!f(Dg^)VM@kE@xD5;Y5|LB#25_JiQ%R{ml(^S)yqao6y28=d;XiTP-D zX*`g9*PM}ontzA2r!;a|J*OekX8uM{bWB~q_f96v*ve2ku$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2ep>bT@4F zuSiTv>K(`w`#X|G0TL`OFHh;~Q^h{WzjT8nYkiiVWN-Y2$4Cu`o{Wr>4Q|mktL|f# zeQ{7^+Y|f97w$Y+=bn8wPYV0y4I1*iO+*CDdy?JfWIH8ckmMRS^^VHiFg~d9Th5u# z8x(teP$=>2qt;bLSf?t&3V;Q(QD5BgPMr=YkC#|ENNyaEy5>_bz8_O(hfmmiu_Uq^%wTnAS=ce?)sOXIO?OFPB!^~cH+dhF1ccg)p56QgkM(SnBa_dD=$ zj)KWT#rSLrZ<~ErCXGKz6^+_UwY~B8O9j^<@}V}VLh{M$?RFdX$S0XX6iP54GLU^C z6Bm0E;+{!QX~OSStom?Cf&{3T{BW!qUgXsQT5P$x%4+$7Y2qTXp@?XNlR%5(xiYmV zv!TK?bCoyea%(7oRi5Af?`_IZ16E}-5kyTf+nSVk@Dgv14 z9|mGs47x?P58Lg03hubZ3*zNqYu2qO+nI)1Aj*oG? zf-;9~qnV$AUaNEow2RSuLD+%gPw^Ql5cH(QcvCDb}VvfAn zpDB)D8qOy8E=Th^nqP_jP&N;7Ynoo6D8y_qj`7Q2#UoUoB#j~A-(V%jc_fgp@LLHr zD1hvrCPzHK{5|R8U&9YN;iX$Zi<{~yZHbK50>-};4V!Z&l4^FWk_WC(kPGl(4_zTOo{{@`BfRq3L diff --git a/dox/user_guides/inspector/images/messageview_dump_panel.png b/dox/user_guides/inspector/images/messageview_dump_panel.png new file mode 100644 index 0000000000000000000000000000000000000000..23c815dc0abc6d264f22d1d9de06f8802404a07c GIT binary patch literal 33994 zcmbSzcU)6j({4nA5Tr?zCSXB{l@8J&C{`eX0@4*}QUybYNQhtqR79GT2-2H$2oMkj zl&X}_LPQiKArwPG4|fO4Iq!SUcfb3)e~4u7?6qdintA4#nYFo(FgU{v5rKd}AntQ# zPZ@zgTfra@n;Zu_a3#^rVF37Vi?`7kIH<65&lK=so1>1t4hZx*nrrPE@J$e>=h>^? zAkfa+tbbcZ9VGlfAdJnqQ#zOZtf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;(6!XtSh)?Rf#?7y)KDOg}dl%2d6ElnE&SpK5I6GFdI(|n<+YT|EQH{q*+4>yN#@O zGHBGZb?pbU9YqZkpQz@f_pd$&s?}D?Q%`t7@FTca@}KSa@BC968sP)-H zC-9A!UqbIw(Cj0Kcu3dG=o6|ilx<<4g~Z55?e?+Sv82n6WAKHv*F2ZA0nPLLKgyqi zaIsT{E82-7}*$piK242dunjcIOz^( QbO1SX>fFgpbu+*J1zc(hxBvhE literal 0 HcmV?d00001 diff --git a/dox/user_guides/inspector/images/messageview_elements.svg b/dox/user_guides/inspector/images/messageview_elements.svg new file mode 100644 index 0000000000..14bc397452 --- /dev/null +++ b/dox/user_guides/inspector/images/messageview_elements.svg @@ -0,0 +1,21 @@ + + + Layer 1 + + + + + + + + + + + Message report + tree view + Dump panel + 3D View + Property panel + (custom) + + \ No newline at end of file diff --git a/dox/user_guides/inspector/images/messageview_pop_up_menu.png b/dox/user_guides/inspector/images/messageview_pop_up_menu.png new file mode 100644 index 0000000000000000000000000000000000000000..058d4094471e65df92a37d8ba9c92122511f4928 GIT binary patch literal 15022 zcmeHuXH-*Nw{GYtT|feaVgnVCDnzOv7!(iz0hJa+dJPCj7f=ug!9quhBE2hw-UJe) z_ZF(58F~pVl)K^m-gEE$zSHg)=jZ*A5werD_S$pJ`OIfNa}oOJA&lWH*I5t<#Bg6t zMF#{TLjkX^wA8?rHQNhfz#EyX4on$T&6%yV*ea?12vtWao@OT|)C%qLpZuTma6fm-JLe6F+46nkeNGaaKAH1N@;`{gLVsg2 z5NPIk1b!Rmq$p(s)A1|<=L8-9RD5%#!L!yUZnIgN6Khbr5uI*68ciduM?Dw**_E}s z^Egtd2(FA*k`4uMs!+p0_=ZAAu^YwRjIWFdcu`PonWNKE!02 zq)#{>+YR{3zKY%d8JqGTCf30Y(iSrO{Yi!tO3V15+^esquE1~S%cQ>l z?ryTz(EQ{VM{h#Oeh~Kf(|)v~cZF9QMOjW}-Ns87QyLnNy_VZpXbc6W*yo*axW#p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1!-(w zF}beE60W6#h~@TDN5vvni5U+uh7d>-E;x)%$QgNj<0(TnGE0$5n_)YZht7J@od*o? z;;T#ww{lE3Po^l(_ToFOmnK&IV60DPeN@P%awA6#CIFEs39}v`H3DGHny75p=Bawc zDglbe12i~+-S$~A+<}Qx zGDG;|VZHVPdpsIW5n9Af+pap~>0{_?iFAvM;;X~ou)5x(5w;^_ArY1Y35RE$zx_|y zXU>qG8GKVohFV|Nh76KJa@6te&OZFhcgR_CE20%N{#kh~D2Oi?Up84tj)8 zL0bprT|`A$=Kkjo_B)q^7=Kb3v7VkV2mgXa=>zHi?g&pUv4<91YUmZcmP7xK!~2c* JQ4H)t{vU?i3=aSR literal 0 HcmV?d00001 diff --git a/dox/user_guides/inspector/images/property_panel.png b/dox/user_guides/inspector/images/property_panel.png new file mode 100644 index 0000000000000000000000000000000000000000..84e1bbf169a65e00c2e391020a1db1c45bf77ee3 GIT binary patch literal 155383 zcmYJa1yCH_^971Ki~Hj4uEE`%puybfu~Ab|>HAM+)@gh@B{xP~dN`!>913JidRbfriu3<7XSu)c;|1GUvR(TkyZX`Lx(E4MDH65s{JM+@Q0w zv#K9Iq-A6Vr8IPO@NCc=PI58x^<$%Nu`8a{EoB*hI}o3bQi!s+3t$tg91K7px0jHD zK)Q-b!&A~<9-l;<+`@w{{V=iP1_Spm=hVbxoSaxsPfs^@c3@pxE)d!1>FGT@TPSHd zF~8ohZ=Ln1`dGBX&WRk>_9Q&k%M5W`DMuAm?qtZ{(unY|xS5*!bwLVzE1qX2t`6K1 z)K2wH&CTr{9i`38wxX-6s-m@Yb?NyW|IFI}9PI4{=01P{87+`HHp*`;KaM83v|@z;NZun zr-bORurL9W&+18u6S?hc_JHqhrHEt+)ng7xT3L~Yr>>8dT?32@C}czc`QLGJzWV=) zR!8Rl0(*m}Be?~U@z#|eD2ToK?BKRa47ZDDLE1c5r!H>@V*xW(=;-J@bEUNXR>)#F zbL&U@HWlx;t_Ad60RQtWvI@Nb3v+XGVgoLBd2~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8{=bvgtEYIR(`Yvmt@}K&egggo1759SfgpflqWa9tEzm<%PjEqcI zM>M)RJL}~zE-s!IM2nzE%MDy2kw_$en}{2Pkb$m<{tch;^NDp{MYnrn$DV)0b!sTe zx=X31!N~EBr{z0!H(J)|m64H=k?DRB6c!e$>lTZK-51n75{X12kw_#Gi9{m#8wUOt XRsEaVI>3=C00000NkvXXu0mjf8v9jZ literal 0 HcmV?d00001 diff --git a/dox/user_guides/inspector/images/property_panel_array.png b/dox/user_guides/inspector/images/property_panel_custom_array.png similarity index 100% rename from dox/user_guides/inspector/images/property_panel_array.png rename to dox/user_guides/inspector/images/property_panel_custom_array.png diff --git a/dox/user_guides/inspector/images/property_panel_item_selection.svg b/dox/user_guides/inspector/images/property_panel_custom_item_selection.svg similarity index 100% rename from dox/user_guides/inspector/images/property_panel_item_selection.svg rename to dox/user_guides/inspector/images/property_panel_custom_item_selection.svg diff --git a/dox/user_guides/inspector/images/property_panel_label.png b/dox/user_guides/inspector/images/property_panel_custom_label.png similarity index 100% rename from dox/user_guides/inspector/images/property_panel_label.png rename to dox/user_guides/inspector/images/property_panel_custom_label.png diff --git a/dox/user_guides/inspector/images/property_panel_named_data.png b/dox/user_guides/inspector/images/property_panel_custom_named_data.png similarity index 100% rename from dox/user_guides/inspector/images/property_panel_named_data.png rename to dox/user_guides/inspector/images/property_panel_custom_named_data.png diff --git a/dox/user_guides/inspector/images/property_panel_simple_type.png b/dox/user_guides/inspector/images/property_panel_custom_simple_type.png similarity index 100% rename from dox/user_guides/inspector/images/property_panel_simple_type.png rename to dox/user_guides/inspector/images/property_panel_custom_simple_type.png diff --git a/dox/user_guides/inspector/images/property_panel_tnaming_named_shape.png b/dox/user_guides/inspector/images/property_panel_custom_tnaming_named_shape.png similarity index 100% rename from dox/user_guides/inspector/images/property_panel_tnaming_named_shape.png rename to dox/user_guides/inspector/images/property_panel_custom_tnaming_named_shape.png diff --git a/dox/user_guides/inspector/images/property_panel_tnaming_naming.png b/dox/user_guides/inspector/images/property_panel_custom_tnaming_naming.png similarity index 100% rename from dox/user_guides/inspector/images/property_panel_tnaming_naming.png rename to dox/user_guides/inspector/images/property_panel_custom_tnaming_naming.png diff --git a/dox/user_guides/inspector/images/property_panel_tnaming_used_shapes.png b/dox/user_guides/inspector/images/property_panel_custom_tnaming_used_shapes.png similarity index 100% rename from dox/user_guides/inspector/images/property_panel_tnaming_used_shapes.png rename to dox/user_guides/inspector/images/property_panel_custom_tnaming_used_shapes.png diff --git a/dox/user_guides/inspector/images/property_panel_tree_node.png b/dox/user_guides/inspector/images/property_panel_custom_tree_node.png similarity index 100% rename from dox/user_guides/inspector/images/property_panel_tree_node.png rename to dox/user_guides/inspector/images/property_panel_custom_tree_node.png diff --git a/dox/user_guides/inspector/images/shapeview.png b/dox/user_guides/inspector/images/shapeview.png index b8e0f80f6ed2abe0902fd103b25d9470eaa44c04..0c335e472343a8af0841abea5cf6e8ae60a9d53f 100644 GIT binary patch literal 63536 zcmZ^~WmH>1*EU=ON{a@kNRdD(R-m}GxKoO|y9Bo)#ogVD7k3C=Bv8CGxP@TBEx5kv z{oL=j-si`6);cR|GBbPj*gn^ueNDs{C28zenk&&@pEOiVcj4>oqozlGF>CUg#?tb?=ULA(D-D?7Wjx+9Cl3#g%MHJV zqt4(b0ki?ZW{3RU&q3}Q_1+#U`yy3WSDte3F)=aA3Aq(YuIOejk%|vDu`y9;UN{N2 z|4F1KpdPOddPYX%BB;C2?Q}yn*CUo%G`6meV`pdQ>gJ}Pre>l{wKTGl8F|LLXAtfUt%OK&F&-joP0#oXRBTi{4&dP7ilpDZ$Jn;|-P*zkI3;2{M>S`p zIC$ju@8sflxkXoHf3*7w58O_dzEb)$;{pI0(>jR>{42im*bO*k8fljE+D;h~i z41^CybpBVHe+jh4e+g>ICr2rcrQs}gVt>tZKWEc5940yX`#;jQ#Ee3v`8{MX(-IPx zqEv)-hEtfqZEfW~O?-t{>8CYo%fqe6G($fxXUxlE7jc*a^*1}7hF^BHT%cH!jBBiM zekus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zu`L)_ZYe2D!9JRPrXK2G>?_8x_br zj`9{2d+9~XW~MSC1c65Yjva=5Zh|hWd3VBY*;;lRc0JW#0+vLibG9*0;94;y`}&z1 z{0#CWU;tHGDsjqS#nv15_&`oK@R>Vq`-`2ji zT=~o?NB`ZRUqJsWXs?P2b7W@)^_{3e - - - - - - - - - image/svg+xml - - - - - - - - - - - - TopoDS_Shape View - 3D View - - + + + Layer 1 + + + + + + Topo_DS + Shape view + + 3D view + + Property panel + + \ No newline at end of file diff --git a/dox/user_guides/inspector/images/shapeview_property_panel.png b/dox/user_guides/inspector/images/shapeview_property_panel.png new file mode 100644 index 0000000000000000000000000000000000000000..198cdcb2a30aa922b251f684b0ab162a43b3a7c5 GIT binary patch literal 24606 zcmce;cUTi&yEYoTh>CO+1d%SG2ud%CN-xqwm(T<$(xqEK=?F+@0wPVip?55a2%$(9 zLXmE$Lg)}UE1*C1d-uD)ckk<*^9On{%&eJN>nZnrKhK(=+p2P>PMkXdfj~|v$lug} zKn^0nkKFO2;K-%tG!Mal2b?wJWFQ5t3^?%1VXNyZ*C7yO1nIWv5%4?7eR(}+2!z6g z_;X;$lIZ~iVp6Pd^SagpyYke_Pmi#i)SK&9xuL$I>AqdD*|KGvCAFEw zM2@X?bhx?Y+s=9lJWqvBIE;}!aAIWt7U-d4TkPJu3#^Dlvf)f)!q7~2+YrH_i%+sb ztI%t`bovxir5>T-n4c;EFYO()x#m9fN@^!4B4nl?JU?&4wKB4QJE%Jirrhsa{`5w@ zbJ8Yq&AWaxTinmEcDgk-H)T7`@AVFPj!y^k%s6dl@X4+Y;hUH7E8nr5MD&W?0DXH| z!?mgaDQWKkDLE(^C2Hx1W1+Lm=L-136GWTe4!%#Vn!Ik;AZS9abq6-+HD%CMyP$@j zZ{f?GsvXImZXw&wsan{!cU|Qm%Z}K_J?nn9Gk)C_`^;C35ba(sU%T|)FWYyyAoh(P z;hA*iP^A3#Lrm3b17%(;IpRkwCmSC`K9k*Z%C&W_|95PPs^slcNjW9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P7&T~TST-LGiG zsVhC6#aPI1c6y9E6{bIn8A8Z`Lj;uY|I5@R%#xQnhtt1_!|8ztNZ(+eI`63S{{|N* BLFWJf literal 0 HcmV?d00001 diff --git a/dox/user_guides/inspector/images/shapeview_tree_columns.png b/dox/user_guides/inspector/images/shapeview_tree_columns.png index dd9e0ae6d48430af753257ff609b550893fe1f7f..94cf9598435602b6c639db581187905f8d5ab157 100644 GIT binary patch literal 19597 zcmbrmcUV(h(=Uu&vCu)3qEvwZ0t(U*>7gi6LdQTTBB1n+H==YREg@8;ic$>KP%S}9 zK&l{JgajcJA@mZ?4%qJJdC$4t>-+xj(!I0xteIJ}W_~kkmJv5~)lXBOqo$&wI<2Xp zqEAJ25J5$Cz~J~%;7x{1z$M_X1Md3j%2dUl*rtJp!}iy8u2WH=;U~B6908tB+}AL1 zr=p_wp!_*7YRBnAMWxN9sdC-G$8xSN2I*pKG39Gfjo4KxnZCtl<+lQze(}(KTnpKr z{PuE;8g^XutGM-J>x*9`K{xvD-m7*!(T&&WfLPYlDD|4Z4gD^xjmi<1twz&bYO+*e7nbsY<}4RWrTdVNxB()O9|tG=J4{WJCENOFcv zE_G9MH;!KnrB&AG*T&KVEK@xb9^0xLlVZY^1g*RRegJ+g*Sdh<+-O#}qpy-MWo6}K zBP~wEZlIA3@My+j%D<&A+FoS{$7jP8Wc;>cH7uQQPlG;)aVnC_g0^j9A+Zctx9$Dk#61+h4+e`uH^SD;Z4^A#Tv1k- z9YK=o+L&$7My1u2;QK!gkT9YOg(3@03*q0ln@%(ZY_B)5q1pJu@#~8v?#j&pjVq4= z8LD=5p_tvT?F5S|b6C(y@vil#_ip9J+Zzi~oPO(fNmlc_o+MZDw-tioNKk9Qc$er4 zV)Z&ZUHa~|@nksXZZbDw;xL*`k?g5^998lr=(X#&)iG0$>vo%Zn~;KEfiI5V%06gg z)#}PZ?T!`+oVn>s>T^e?&K(=I37RACI*k5kF-DCwOx^ViWNF~eB60Fl^v3CqbxXT| zm}qMFbmAh3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7c0cRcpJPZt={3xFWDJ!g zFwqa(o<%s|$_f876$YG|nBX|-a7$i7AzOVL4}aD%Y^jO#mA0+Nc%j$UmAgky7^$#9 zh)WOQ^keW?5`n|vT8Dg*#7&)0@u~u zHTs|UM&kNs;L@SSna}FHduCti2xmCd=%a7tj?}AXl8@SmeB_ zz2rLZIL(h`Z#2Fyw2x5U;4<;rT9XCgRoQ11mrR%rtgLK-DUJ(Xhj_ftf*fqSr7iF< z@OY8Khx0b_s%~gWNS;>~pHZ84V%OI{jh~pgL2HEDi_sZBc)2Ps|nZ&PXD^Z z2^vf{^p;{$Ws&ornzwn1NXLZKLvqKB)~+gcGw<3^s`GRwuuGANNNKB{H~iX*al2^ z!KYg$2Sm3Wwm!!Ey5my}Fcku?KUY0fK70FuJKKdryZbIkIeSMgNZ+z%Da&5qB~mfg zz^-#@)J4eMVX8~?%H0+IwgsIwIgrVA5!_y0AT~J@lp>d}+|+*HZop>uf{HbaXLWV} zOE}dekkPLgbYE)T75(=0-=Txa-PH-eess0()dTB-f%PjR&||ENfc5D|;ALXzhpO`q zi`))in!ogq0%O%o;MHH}%NE^TUR{uSD}vkVi%IA=fgRGTDy++ zked!}C>e#FmHtwz6t%2dTz}Q=+2;AHq8GW`!O^+>lxr6k}m6c zVB>a+4ZLwH7rjWN>hIU=d#Wzp$P!wDMg?F diff --git a/dox/user_guides/inspector/images/tinspector_elements.svg b/dox/user_guides/inspector/images/tinspector_elements.svg index b8602bb7b5..e112187b45 100644 --- a/dox/user_guides/inspector/images/tinspector_elements.svg +++ b/dox/user_guides/inspector/images/tinspector_elements.svg @@ -1,244 +1,19 @@ - - + - - - - - - - - - image/svg+xml - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + Layer 1 + + + + + + + + + + DFBrowser + MessageView + ShapeView + VInspector + + \ No newline at end of file diff --git a/dox/user_guides/inspector/images/vinspector.png b/dox/user_guides/inspector/images/vinspector.png index a803af0b83b26f8d164ac7fb90f6c49a1f1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_*GhPqt(dqJC+jmDpo};iaQo1EFm&n~%Y$n|lKa5nx0IN}W5Mn*Q(q@q- zouWDRfLkpbwTP$tD)!b{PQ3J%8eL})ok&nIfT3JeJ+D(lIk zl^Q9U;>;xTpfA7<6fexL{B$#s-`OYMP&lx~`E2=C<#JHvO9(b@ z5U|z_2j*W`N6hNme~YuqCQ!7eLDC4d*1^wGLBU>%k=7apH@8nQPKt^u(W>ADuVWX? ztvCoFM7Ijd2b|w6ADv4pDjb8e^Z{FXK=ibeq^a4Ev9^(@LMy-)*E&_^?a2+R>5OkP z=Cd}R*shT7bj*4?^pyWs{|V7@v0W$8j+I0Cqbm!uD-pQpZU_nG?GH$=l;ly`z()v| z|MA?AJ|>5irCWf6{B7O`NP%d6Y+wg%1uP);mehBMhJeKnzpCe`@Ty4!w1Q%=`I$o*9Y<4>LU^A&lZ=YpV|gP= zn*$s#|7$g>cZq_rE`$&V4KehT${W7Kj%vYlg;EEa{NVP%R-VK>+1x(v>P_RkQ;mIA zpX{x{ulf0>|6=QX&EE>ZdQor3(>I2*5&g=$B~LVL%=1$H218;JsC~u+I-}WiVKx~o zAZ^G!%)Fm}UR4;glI6IY^e}yL^A8LT`ZlmOVNIsC1E(-yzKkmwfz>3D=kN8=e@p4W zoByo%`9D)o;-h35x8$KGBU2<3E`v`=1ROt!9nGS%oPMT`dR5>d9WBGlg%@oD{|juX BC~yD( diff --git a/dox/user_guides/inspector/images/vinspector_elements.svg b/dox/user_guides/inspector/images/vinspector_elements.svg index 5f644e6054..89fd298344 100644 --- a/dox/user_guides/inspector/images/vinspector_elements.svg +++ b/dox/user_guides/inspector/images/vinspector_elements.svg @@ -1,200 +1,19 @@ - - + + + Layer 1 + + + + + + Update + 3D view + + + Presentations tree view + + + Property panel + - - - - - - - image/svg+xml - - - - - - - - - - - - Update - Selection controls - - Presentations tree view - - - History view - - + \ No newline at end of file diff --git a/dox/user_guides/inspector/images/vinspector_light_setting.png b/dox/user_guides/inspector/images/vinspector_light_setting.png new file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+|b*jTRf%f^Xkk zLpXr?KmH(bmm&wT(6Nix!d}Tffv)T@7x#{@mjs{Z8w%9IO7TBL2R=*JHm(BnDiEjj bHoSS;WnE94mOLgxKUkaFo0aT6dj9_a?GP*2 literal 0 HcmV?d00001 diff --git a/dox/user_guides/inspector/images/vinspector_property_panel.png b/dox/user_guides/inspector/images/vinspector_property_panel.png new file mode 100644 index 0000000000000000000000000000000000000000..7650dd502744a29ae7ea55c1d61bd01dcdaf6297 GIT binary patch literal 36449 zcmb@tcTiJb*EWn55fSMsB`Qs+B1(`JQF;{+5GfHNpa?;NbP^Or>Afie3W^jV)IcbS zLLfjuM8OCNL_(DwN+<#H1%BnepJ(Qs_xo#ggeMTg15SLG2TNeQ>v0^2R6Ry@LpMo!L_d^=741Cm7uE8#^sx%lV4i`&`VO z6Rz$Ko>iAalS3zza|c4!IofYRGVLFAtpP-qw_k>JS%2UD;toFJFVfD%8fqahJ=jPn zKLb?eWXIQQCK=Uo_F}J;o=Bs<DGVs?a_E?~At!|X$cx{*9#lR{Vva^ks_ zUUP)%fQlhyPt3nF7eHH(c=D`tqHy?`BY85O$M2oefqu>1%nY3A2PtYT#oI>V!@l73 z!*(9xNQkkX885^DFl^D8R=TjMMvEZsJXs&aJ6+hB*2mu2+6dTsK%+2M0KD8yOh$O+ z|4nqpMdUZ|ts$yAWkm>w4coGBHO>t!4g6E2m_c)0S|CO;7o)rdW&qnRj&148MPl;Ak zp$ZJ$H7JzQuXuuct1Fka3Pp@rXp5qJYX)L5jF&m~jADPEqz5w0HJXjbB?)mmln$4T z=CHSl*Z6TOz83WjaS%IUo9|@{xH6w9fFQx?B%4=$*|h8Ffjnxkj&qsB@u{l0r31Ve>hFhJ^VZU*(DL>W4|~ zJHwNZOUZj1Te$3-KR#|vH7XxA=mBUVH0;Inq&g4mDSn%f3VS6^8Mu=b;d9Fwxt(r_ z4#EpFs{{Z1L8e?;GOVJG z{_Z7?h*>ah?a|u#dA$Mg*nIPr1aHHcjbfv%JTJANgl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4M45Lv4w$qjn##&z4t zTe9j+wg53=(_3SE)Apd8_3kpBH$oJf52OG+c?_EU)WKl$_{<h~{H#y_YE&j))pT+a^x%UR>Cn+*S*a}>KvIB;4M zeOvQssxbEMn`{^Y@&QN_NJVS)PvY?jC`o+wyR(ENfIj=L8V@l|+L8gf+tC1_;>v05 zUmAvWVW>M%dGZ|BCM_7~sGk2sI3Iq>i~pxl3RBtBJz57azt-f;^Wc(v@sB|sa8C|D zV=$v^W3flTByD~^9i#A-ZVI5TzfekGC&?4lkBwqA{uOL&|Xs0=8Rothr5c08F8Nl{?1yY zYp#rv9R${8KQG$|lnWaK&fT4^PhnB)t_*qVcYu9oG`Hs>&pHFV@WS7W(HT4T9juaa z3pn)kfKyognCn&A+4TE>W#_q2aO*<>rC70u-!#%sjtG~yv?&{|6qFtRZ^ZEQm@ U*nh74A?ZJ~HT2Y9s9E3pKOy6bc>n+a literal 0 HcmV?d00001 diff --git a/dox/user_guides/inspector/images/vinspector_tree_columns.png b/dox/user_guides/inspector/images/vinspector_tree_columns.png index 9dc79bd9aedc41632c9420dc4f8b1725a250b59d..34617f832421b31da35b0497061d128716bf035c 100644 GIT binary patch literal 17567 zcmbWe2UJsAw>BI^@kkMsDpk6GfJpC354|HLR4JiK@1P){bV4ryfzW&JpwbC7^se+! zrFZxO>N)TGzxV$4e%}~7BV#9ft-bbKb3XH#&szJFl7bWtCJ8100KfrCi>m+tw?Y5_ zwA{aLp?>)|{xbpfh323lB?>6&BSWH2ZkxT5e+2-PhGU%@-a(z;dn>Kw002C4y#Aog zno_y~0OFiL@mFfDdYe$32y!W}@04-FGfR0zDs3a`knR~e-6fS1UtMaYpAfP~PEE3+ z4?l_>N1VJiF2^8!dtdC)-Md(CCCF%N{XaPTMX7C7KulYLV_qsBvZGz~rXqH!vY@!K zf|u`+Z`5m-Y2Yo(-h(m6E03&|MmO6z4-VUvqkPs)x&CI4Q~B`IYN74T^}bxyY+()= zwTlelHrj6{K-6KxCcBbJN#FH`4eQHk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Baj-}1%&1!>c+D*yKVM;zoyRW5W=D$Property Panel -Property panel is used to display the content of *Label* or *Attribute* tree view items or Search result view. +Property panel is used to display the result of TDF_Attribute::Dump() or TDF_Label::Dump() of the selected tree view item. +The information is shown in one table. + +@figure{property_panel.png,"PropertyPanel",360} + +Property Panel (custom) + +Property panel (custom) is used to display the content of *Label* or *Attribute* tree view items or Search result view. The information is usually shown in one or several tables. *TDF_Attribute* has the following content in the Property Panel: @@ -114,28 +121,28 @@ The information is usually shown in one or several tables. TypeDescriptionContent TDF_Label a table of [entry or attribute name, value] - @figure{property_panel_label.png, "",140} + @figure{property_panel_custom_label.png, "",140} TDocStd_Owner,
Simple type attributes,
List type attributes a table of [method name, value] - @figure{property_panel_simple_type.png, "",140} + @figure{property_panel_custom_simple_type.png, "",140} TDataStd_BooleanArray,
TDataStd_ByteArray,
other Array type attributes 2 controls:
- a table of [array bound, value],
- a table of [method name, value] - @figure{property_panel_array.png, "",140} + @figure{property_panel_custom_array.png, "",140} TDataStd_TreeNode 2 controls:
- a table of [Tree ID, value] (visible only if Tree ID() != ID() ),
- a tree view of tree nodes starting from *Root()* of the tree node. The current tree node has dark blue text. - @figure{property_panel_tree_node.png, "",140} + @figure{property_panel_custom_tree_node.png, "",140} TDataStd_NamedData tab bar of attribute elements, each tab has a table of [name, value] - @figure{property_panel_named_data.png, "",140} + @figure{property_panel_custom_named_data.png, "",140} TNaming_UsedShapes a table of all shapes handled by the framework - @figure{property_panel_tnaming_used_shapes.png, "",140} + @figure{property_panel_custom_tnaming_used_shapes.png, "",140} TNaming_NamedShape 2 controls:
- a table of [method name, value] including CurrentShape/OriginalShape methods result of TNaming_Tools,
- an evolution table.
Tables contain buttons for @ref occt_shape_export "TopoDS_Shape export". - @figure{property_panel_tnaming_named_shape.png, "",140} + @figure{property_panel_custom_tnaming_named_shape.png, "",140} TNaming_Naming 2 controls:
- a table of TNaming_Name values,
- a table of [method name, value] - @figure{property_panel_tnaming_naming.png, "",140} + @figure{property_panel_custom_tnaming_naming.png, "",140} @@ -203,17 +210,17 @@ Selection of tree view item updates content of the following controls: @figure{dfbrowser_selection_in_tree_view.svg,"",360} -Property Panel item selection +Property Panel (custom) item selection -If the property panel shows content of *TDF_Label*: +If the property panel (custom) shows content of *TDF_Label*: * selection of the table row highlights the corresponding item in the tree view, * double click on the table row selects this item in the tree view. -If the property panel shows content of *TDF_Attribute* that has reference to another attribute, selection of this reference: +If the property panel (custom) shows content of *TDF_Attribute* that has reference to another attribute, selection of this reference: * highlights the referenced item in the tree view, * displays additional presentation in the 3D view if it can be created. -@figure{property_panel_item_selection.svg,"",360} +@figure{property_panel_custom_item_selection.svg,"",360} Attributes having references: @@ -281,27 +288,6 @@ Context popup menu in tree view: This button synchronizes the plugin content with the current state of *AIS_InteractiveContext* and updates the presence of items and their current selection. -Selection controls - -Selection controls switch on/off the possibility to set selection in the context from VInspector plugin. - -| Action | Tree view item | Functionality | -| :----- | :----- | :----- | -| Select Presentations | *AIS_InteractiveObject* | Calls *AddOrRemoveSelected* of interactive object for the selected item. | -| Select Owners | *SelectMgr_EntityOwner* or
*SelectMgr_SensitiveEntity* | Calls *AddOrRemoveSelected* of *SelectMgr_EntityOwner* for the selected item. | - -Note that the initial selection in the context will be cleared. -If the button is toggled, the button selection is active. Only one button may be toggled at the moment. - - -History view - -At present, the History view is under implementation and may be used only in a custom application where Inspector is loaded. - -To fill this view, *VInspectorAPI_CallBack* should be redefined in the application and send signals about some actions applied to the context. -After that, the call back should be given as a parameter in the plugin. -If done, new items will be created in the history view for each action. - @subsubsection occt_inspector_2_3_3 Elements cooperation *VInspector* marks the presentations currently selected in *AIS_InteractiveContext* with a blue background in tree items. Use **Update** button to synchronize VInspector selected items state to the context. @@ -320,6 +306,14 @@ Selection change: Use context pop-up menu on the tree view header to select, which columns should be displayed. @figure{vinspector_tree_columns.png, "Vinspector tree header context menu",360} +Use the setting Lights (position, color) in the view. +@figure{vinspector_light_setting.png, "Vinspector light setting",360} + +@subsubsection occt_inspector_2_3_5 VInspector property panel + +Property panel shows the result of AIS_InteractiveContext::Dump() or AIS_InteractiveObject::Dump(). +@figure{vinspector_property_panel.png, "Vinspector property panel",360} + @subsection occt_inspector_2_4 ShapeView Plugin @subsubsection occt_inspector_2_4_1 Overview @@ -328,7 +322,13 @@ Use context pop-up menu on the tree view header to select, which columns should This plugin visualizes content of *TopoDS_Shape* in a tree view. -@subsubsection occt_inspector_2_4_2 Elements +@subsubsection occt_inspector_2_4_2 Property panel + +Property panel shows properties for TopoDS_Shape based on DumpJson. + +@figure{shapeview_property_panel.png, "ShapeView Property panel",360} + +@subsubsection occt_inspector_2_4_3 Elements @figure{shapeview_elements.svg,"ShapeView Elements",360} @@ -351,15 +351,56 @@ Context pop-up menu in tree view: | Close All BREP views | Closes all opened text views. | | BREP directory | Displays the folder, where temporary BREP files have been stored. | -@subsubsection occt_inspector_2_4_3 Elements cooperation +@subsubsection occt_inspector_2_4_4 Elements cooperation Selection of one or several items in *TopoDS_Shape* View creates its *AIS_Shape* presentation and displays it in the 3D View. -@subsubsection occt_inspector_2_4_4 ShapeView tree view columns +@subsubsection occt_inspector_2_4_5 ShapeView tree view columns Use context pop-up menu on the tree view header to select, which columns should be displayed. @figure{shapeview_tree_columns.png, "ShapeView tree header context menu",360} +@subsection occt_inspector_2_5 MessageView Plugin + +MessageView plugin is used to display content of Message_Report. + +@subsubsection occt_inspector_2_5_1 Message report tree view + +Message report tree view shows the content of the Message_Report. + +Context pop-up menu in message report tree view: +| Action | Functionality | +| :----- | :----- | +| Export Report | Exports the report as json file. | +| WallClock Metric statistic | Creates the table that sums the number of calls and the time spent on the functionality inside the value and shows it in Property panel (custom). It's necessary to activate "WallClock metric". | +| Preview children presentations | Displays presentations of children items of selected items if found. | +| Deactivate | Deactivates all types of metrics for the current report. | +| Activate | Appends items to activate report metrics. | +| Clear | Clears message report. | +| Activate metric | Switches active state in report for clicked type of metric. | +| Test metric | Sends several alerts to check metric of message-alert-tool mechanism. | +| Test Message_Messenger | Sends several alerts to check property panel/presentations of messenger-alert-tool mechanism. | +| Test Tree of messages | Sends several alerts to check tree of alerts. | + +@figure{messageview_pop_up_menu.png, "MessageView pop-up menu",360} + +@subsubsection occt_inspector_2_5_2 3D View + +3D View shows the selected item (TopoDS_Shape) in message report tree view. +@figure{messageview_view.png, "MessageView 3D View",360} + +@subsubsection occt_inspector_2_5_3 Dump panel + +Shows Dump() information of the selected item if the item has Dump(). +@figure{messageview_dump_panel.png, "MessageView 3D View",360} + +@subsubsection occt_inspector_2_5_4 Property panel (custom) + +Shows the table for WallClock Metric statistic option. +@figure{messageview_property_panel_custom.png, "MessageView 3D View",360} + +@subsubsection occt_inspector_2_5_5 Elements +@figure{messageview_elements.svg, "MessageView elements",360} @section occt_inspector_3 Common controls @@ -400,7 +441,9 @@ This control for OCCT 3D viewer creates visualization view components and allows | Context | Allows choosing another context that should be used in the plugin. The following contexts are available:
**Own** - the context of this view,
**External** - the context of the @ref occt_inspector_4_3 "external application", which initializes the plugin,
**None** - the visualization is not performed at all (useful if the presentation is too complex). | | Multi/Single | The buttons define what to do with the previously displayed objects:
**Multi** displays new presentations together with already displayed ones,
**Single** removes all previously displayed presentations. | | Clean | Removes all displayed presentations. | -| Fit All,
Fit Area,
Zoom,
Pan,
Rotation | Scene manipulation actions
(Fit All is checkable. If checked(by double click), display/hide of new objects will perform **Fit All** of the scene.) | +| Trihedron display | Shows the trihedron. | +| View cube display | Shows the view cube. | +| Fit All | Scene manipulation actions
(Fit All is checkable. If checked(by double click), display/hide of new objects will perform **Fit All** of the scene.) | | Display Mode | Sets *AIS_Shading* or *AIS_WireFrame* display mode for all presentations. | Context popup menu: @@ -420,7 +463,7 @@ View preferences store the current view orientation. Context menu contains: | Element | Functionality | | :----- | :----- | -| Tree Level Line,
PropertyPanel,
Dump,
View| Names of dock widgets in the active plugin. If the button is checked, dock widget is visible. | +| Tree Level Line,
PropertyPanel,
PropertyPanel (custom),
Dump,
View| Names of dock widgets in the active plugin. If the button is checked, dock widget is visible. | | Store Preferences | Creates ".tinspector.xml" preferences file with the current settings for each plugin.
This file is created in TEMP/TMP directory (by default) or in a user-defined directory. | | Remove Preferences | Removes preferences file. After the Inspector is restarted, default values will be applied. | @@ -487,7 +530,7 @@ tinspector @figure{drawexe_tinspector.png,"tinspector",360} This command does the following: -- all available Plugins are presented in the Inspector. These are @ref occt_inspector_2_2 "DFBrowser", @ref occt_inspector_2_3 "VInspector" and @ref occt_inspector_2_4 "ShapeView"; +- all available Plugins are presented in the Inspector. These are @ref occt_inspector_2_2 "DFBrowser", @ref occt_inspector_2_3 "VInspector", @ref occt_inspector_2_4 "ShapeView" and @ref occt_inspector_2_5 "MessageView"; - DFBrowser is the active plugin; - OCAF tree is empty. @@ -527,6 +570,7 @@ void CreateInspector() MyTCommunicator->RegisterPlugin ("TKDFBrowser"); MyTCommunicator->RegisterPlugin ("TKVInspector"); MyTCommunicator->RegisterPlugin ("TKShapeView"); + MyTCommunicator->RegisterPlugin ("TKMessageView"); MyTCommunicator->Init (aParameters); MyTCommunicator->Activate ("TKDFBrowser"); @@ -542,6 +586,7 @@ Give one the following objects for a plugin using a container of parameters: | *TKDFBrowser* | *TDocStd_Application* | | *TKVInspector* | *AIS_InteractiveContext* | | *TKShapeView* | *TopoDS_TShape* | +| *TKMessageView* | *Message_Report* | @section occt_inspector_5 Build procedure @@ -567,11 +612,13 @@ Distribution of plugin packages : | *DFBrowser*,
*DFBrowserPane*,
*DFBrowserPaneXDE*,
*TKDFBrowser* | DFBrowser | | *VInspector*,
*TKVInspector* | VInspector | | *ShapeView*,
*TKShapeView* | ShapeView | +| *MessageView*,
*TKMessageView* | MessageView | Other packages: | Source packages| Used in | | :----- | :----- | | *TInspectorAPI*,
*TKInspectorAPI* | Interface for connection to plugin. | +| *ViewControl*,
*TKTreeModel* | Classes for property view, table, table model. | | *TreeModel*,
*TKTreeView* | Items-oriented model to simplify work with GUI tree control. | | *View*,
*TKView* | 3D View component. | | *TInspector*,
*TKTInspector* | Inspector window, where plugins are placed. | From 8a17a8bb45c4c633dc25ab6019ba7f94c019c9f2 Mon Sep 17 00:00:00 2001 From: kgv Date: Thu, 9 Sep 2021 21:59:18 +0300 Subject: [PATCH 051/639] 0032540: RWGltf_CafReader - optional "scene" parameter encoded as mandatory First scene is now loaded when default one is undefined. --- src/RWGltf/RWGltf_CafReader.cxx | 2 ++ src/RWGltf/RWGltf_CafReader.hxx | 7 ++++ src/RWGltf/RWGltf_GltfJsonParser.cxx | 47 +++++++++++++++++++++++++-- src/RWGltf/RWGltf_GltfJsonParser.hxx | 4 +++ src/RWGltf/RWGltf_GltfRootElement.hxx | 2 +- src/XSDRAWSTLVRML/XSDRAWSTLVRML.cxx | 12 +++++++ 6 files changed, 71 insertions(+), 3 deletions(-) diff --git a/src/RWGltf/RWGltf_CafReader.cxx b/src/RWGltf/RWGltf_CafReader.cxx index 499ffdb0e8..c53b59b11a 100644 --- a/src/RWGltf/RWGltf_CafReader.cxx +++ b/src/RWGltf/RWGltf_CafReader.cxx @@ -168,6 +168,7 @@ class RWGltf_CafReader::CafReader_GltfStreamDataLoadingFunctor : public RWGltf_C RWGltf_CafReader::RWGltf_CafReader() : myToParallel (false), myToSkipEmptyNodes (true), + myToLoadAllScenes (false), myUseMeshNameAsFallback (true), myIsDoublePrecision (false), myToSkipLateDataLoading (false), @@ -290,6 +291,7 @@ Standard_Boolean RWGltf_CafReader::performMesh (const TCollection_AsciiString& t aDoc.SetErrorPrefix (anErrPrefix); aDoc.SetCoordinateSystemConverter (myCoordSysConverter); aDoc.SetSkipEmptyNodes (myToSkipEmptyNodes); + aDoc.SetLoadAllScenes (myToLoadAllScenes); aDoc.SetMeshNameAsFallback (myUseMeshNameAsFallback); if (!theToProbe) { diff --git a/src/RWGltf/RWGltf_CafReader.hxx b/src/RWGltf/RWGltf_CafReader.hxx index 6d36cb7504..d084408d43 100644 --- a/src/RWGltf/RWGltf_CafReader.hxx +++ b/src/RWGltf/RWGltf_CafReader.hxx @@ -43,6 +43,12 @@ public: //! Set flag to ignore nodes without Geometry. void SetSkipEmptyNodes (bool theToSkip) { myToSkipEmptyNodes = theToSkip; } + //! Return TRUE if all scenes in the document should be loaded, FALSE by default which means only main (default) scene will be loaded. + bool ToLoadAllScenes() const { return myToLoadAllScenes; } + + //! Set flag to flag to load all scenes in the document, FALSE by default which means only main (default) scene will be loaded. + void SetLoadAllScenes (bool theToLoadAll) { myToLoadAllScenes = theToLoadAll; } + //! Set flag to use Mesh name in case if Node name is empty, TRUE by default. bool ToUseMeshNameAsFallback() { return myUseMeshNameAsFallback; } @@ -106,6 +112,7 @@ protected: Standard_Boolean myToParallel; //!< flag to use multithreading; FALSE by default Standard_Boolean myToSkipEmptyNodes; //!< ignore nodes without Geometry; TRUE by default + Standard_Boolean myToLoadAllScenes; //!< flag to load all scenes in the document, FALSE by default Standard_Boolean myUseMeshNameAsFallback; //!< flag to use Mesh name in case if Node name is empty, TRUE by default Standard_Boolean myIsDoublePrecision; //!< flag to fill in triangulation using single or double precision Standard_Boolean myToSkipLateDataLoading; //!< flag to skip triangulation loading diff --git a/src/RWGltf/RWGltf_GltfJsonParser.cxx b/src/RWGltf/RWGltf_GltfJsonParser.cxx index e29b4b4e47..a77903cc6c 100644 --- a/src/RWGltf/RWGltf_GltfJsonParser.cxx +++ b/src/RWGltf/RWGltf_GltfJsonParser.cxx @@ -186,6 +186,7 @@ RWGltf_GltfJsonParser::RWGltf_GltfJsonParser (TopTools_SequenceOfShape& theRootS myIsBinary (false), myIsGltf1 (false), myToSkipEmptyNodes (true), + myToLoadAllScenes (false), myUseMeshNameAsFallback (true), myToProbeHeader (false) { @@ -236,7 +237,8 @@ bool RWGltf_GltfJsonParser::gltfParseRoots() for (int aRootNameIter = 0; aRootNameIter < RWGltf_GltfRootElement_NB_MANDATORY; ++aRootNameIter) { - if (myGltfRoots[aRootNameIter].IsNull()) + if (myGltfRoots[aRootNameIter].IsNull() + && aRootNameIter != RWGltf_GltfRootElement_Scene) { reportGltfError ("Member '" + RWGltf_GltfRootElementName ((RWGltf_GltfRootElement )aRootNameIter) + "' is not found."); return false; @@ -984,8 +986,49 @@ bool RWGltf_GltfJsonParser::gltfParseTextureInBufferView (Handle(Image_Texture)& // ======================================================================= bool RWGltf_GltfJsonParser::gltfParseScene (const Message_ProgressRange& theProgress) { + const RWGltf_JsonValue* aScenes = myGltfRoots[RWGltf_GltfRootElement_Scenes].Root(); + if (myToLoadAllScenes + && !myIsGltf1 + && aScenes->IsArray() + && aScenes->Size() > 1) + { + Message_ProgressScope aPS (theProgress, "Parsing scenes", aScenes->Size()); + for (rapidjson::Value::ConstValueIterator aSceneIter = aScenes->Begin(); aSceneIter != aScenes->End(); ++aSceneIter) + { + if (!aPS.More()) + { + return false; + } + Message_ProgressRange aRange = aPS.Next(); + const RWGltf_JsonValue* aSceneNodes = findObjectMember (*aSceneIter, "nodes"); + if (aSceneNodes == NULL + || !aSceneNodes->IsArray()) + { + reportGltfWarning ("Empty scene '" + getKeyString (*aSceneIter) + "'."); + } + if (!gltfParseSceneNodes (*myRootShapes, *aSceneNodes, aRange)) + { + return false; + } + } + return true; + } + // search default scene - const RWGltf_JsonValue* aDefScene = myGltfRoots[RWGltf_GltfRootElement_Scenes].FindChild (*myGltfRoots[RWGltf_GltfRootElement_Scene].Root()); + const RWGltf_JsonValue* aDefScene = NULL; + if (!myGltfRoots[RWGltf_GltfRootElement_Scene].IsNull()) + { + aDefScene = myGltfRoots[RWGltf_GltfRootElement_Scenes].FindChild (*myGltfRoots[RWGltf_GltfRootElement_Scene].Root()); + } + else if (!myIsGltf1) + { + rapidjson::Value::ConstValueIterator aSceneIter = aScenes->Begin(); + if (aSceneIter != aScenes->End()) + { + aDefScene = aSceneIter; + reportGltfWarning ("Default scene is undefined, the first one will be loaded."); + } + } if (aDefScene == NULL) { reportGltfError ("Default scene is not found."); diff --git a/src/RWGltf/RWGltf_GltfJsonParser.hxx b/src/RWGltf/RWGltf_GltfJsonParser.hxx index 922b9790fc..7fcb5bce51 100644 --- a/src/RWGltf/RWGltf_GltfJsonParser.hxx +++ b/src/RWGltf/RWGltf_GltfJsonParser.hxx @@ -111,6 +111,9 @@ public: //! Set flag to ignore nodes without Geometry, TRUE by default. void SetSkipEmptyNodes (bool theToSkip) { myToSkipEmptyNodes = theToSkip; } + //! Set flag to flag to load all scenes in the document, FALSE by default which means only main (default) scene will be loaded. + void SetLoadAllScenes (bool theToLoadAll) { myToLoadAllScenes = theToLoadAll; } + //! Set flag to use Mesh name in case if Node name is empty, TRUE by default. void SetMeshNameAsFallback (bool theToFallback) { myUseMeshNameAsFallback = theToFallback; } @@ -432,6 +435,7 @@ protected: bool myIsBinary; //!< binary document bool myIsGltf1; //!< obsolete glTF 1.0 version format bool myToSkipEmptyNodes; //!< ignore nodes without Geometry + bool myToLoadAllScenes; //!< flag to load all scenes in the document, FALSE by default bool myUseMeshNameAsFallback; //!< flag to use Mesh name in case if Node name is empty, TRUE by default bool myToProbeHeader; //!< flag to probe header without full reading, FALSE by default diff --git a/src/RWGltf/RWGltf_GltfRootElement.hxx b/src/RWGltf/RWGltf_GltfRootElement.hxx index 7d8d0e6566..f0b5a6917c 100644 --- a/src/RWGltf/RWGltf_GltfRootElement.hxx +++ b/src/RWGltf/RWGltf_GltfRootElement.hxx @@ -20,7 +20,7 @@ enum RWGltf_GltfRootElement { RWGltf_GltfRootElement_Asset, //!< "asset" element, mandatory RWGltf_GltfRootElement_Scenes, //!< "scenes" element, mandatory - RWGltf_GltfRootElement_Scene, //!< "scene" element, mandatory + RWGltf_GltfRootElement_Scene, //!< "scene" element, optional RWGltf_GltfRootElement_Nodes, //!< "nodes" element, mandatory RWGltf_GltfRootElement_Meshes, //!< "meshes" element, mandatory RWGltf_GltfRootElement_Accessors, //!< "accessors" element, mandatory diff --git a/src/XSDRAWSTLVRML/XSDRAWSTLVRML.cxx b/src/XSDRAWSTLVRML/XSDRAWSTLVRML.cxx index a1ab08d303..2f96e14eb6 100644 --- a/src/XSDRAWSTLVRML/XSDRAWSTLVRML.cxx +++ b/src/XSDRAWSTLVRML/XSDRAWSTLVRML.cxx @@ -187,6 +187,7 @@ static Standard_Integer ReadGltf (Draw_Interpretor& theDI, Standard_Boolean toSkipLateDataLoading = Standard_False; Standard_Boolean toKeepLateData = Standard_True; Standard_Boolean toPrintDebugInfo = Standard_False; + Standard_Boolean toLoadAllScenes = Standard_False; Standard_Boolean isNoDoc = (TCollection_AsciiString(theArgVec[0]) == "readgltf"); for (Standard_Integer anArgIter = 1; anArgIter < theNbArgs; ++anArgIter) { @@ -246,6 +247,15 @@ static Standard_Integer ReadGltf (Draw_Interpretor& theDI, ++anArgIter; } } + else if (anArgCase == "-allscenes") + { + toLoadAllScenes = Standard_True; + if (anArgIter + 1 < theNbArgs + && Draw::ParseOnOff (theArgVec[anArgIter + 1], toLoadAllScenes)) + { + ++anArgIter; + } + } else if (anArgCase == "-toprintinfo" || anArgCase == "-toprintdebuginfo") { @@ -322,6 +332,7 @@ static Standard_Integer ReadGltf (Draw_Interpretor& theDI, aReader.SetToSkipLateDataLoading (toSkipLateDataLoading); aReader.SetToKeepLateData (toKeepLateData); aReader.SetToPrintDebugMessages (toPrintDebugInfo); + aReader.SetLoadAllScenes (toLoadAllScenes); if (toListExternalFiles) { aReader.ProbeHeader (aFilePath); @@ -2032,6 +2043,7 @@ void XSDRAWSTLVRML::InitCommands (Draw_Interpretor& theCommands) "\n\t\t: (false by default)" "\n\t\t: -keepLate data is loaded into itself with preservation of information" "\n\t\t: about deferred storage to load/unload this data later.", + "\n\t\t: -allScenes load all scenes defined in the document instead of default one (false by default)" "\n\t\t: -toPrintDebugInfo print additional debug information during data reading" __FILE__, ReadGltf, g); theCommands.Add ("readgltf", From 36d21f1a1a157065b28f8348d5b7f4c91a015e52 Mon Sep 17 00:00:00 2001 From: kgv Date: Thu, 9 Sep 2021 21:04:21 +0300 Subject: [PATCH 052/639] 0032565: Foundation Classes, OSD_FileSystem - expose interface for registering global protocols Added methods OSD_FileSystem::AddDefaultProtocol()/::RemoveDefaultProtocol() and fixed misleading description of OSD_FileSystemSelector::AddProtocol(). --- src/OSD/OSD_FileSystem.cxx | 20 ++++++++++++++++++++ src/OSD/OSD_FileSystem.hxx | 11 ++++++++++- src/OSD/OSD_FileSystemSelector.hxx | 4 ++-- 3 files changed, 32 insertions(+), 3 deletions(-) diff --git a/src/OSD/OSD_FileSystem.cxx b/src/OSD/OSD_FileSystem.cxx index 81fc4c2de1..ccb0a25c48 100644 --- a/src/OSD/OSD_FileSystem.cxx +++ b/src/OSD/OSD_FileSystem.cxx @@ -54,6 +54,26 @@ const Handle(OSD_FileSystem)& OSD_FileSystem::DefaultFileSystem() return aDefSystem; } +//======================================================================= +// function : AddDefaultProtocol +// purpose : +//======================================================================= +void OSD_FileSystem::AddDefaultProtocol (const Handle(OSD_FileSystem)& theFileSystem, bool theIsPreferred) +{ + Handle(OSD_FileSystemSelector) aFileSelector = Handle(OSD_FileSystemSelector)::DownCast (DefaultFileSystem()); + aFileSelector->AddProtocol (theFileSystem, theIsPreferred); +} + +//======================================================================= +// function : RemoveDefaultProtocol +// purpose : +//======================================================================= +void OSD_FileSystem::RemoveDefaultProtocol (const Handle(OSD_FileSystem)& theFileSystem) +{ + Handle(OSD_FileSystemSelector) aFileSelector = Handle(OSD_FileSystemSelector)::DownCast (DefaultFileSystem()); + aFileSelector->RemoveProtocol (theFileSystem); +} + //======================================================================= // function : openIStream // purpose : diff --git a/src/OSD/OSD_FileSystem.hxx b/src/OSD/OSD_FileSystem.hxx index 19334f9068..f741dc09a9 100644 --- a/src/OSD/OSD_FileSystem.hxx +++ b/src/OSD/OSD_FileSystem.hxx @@ -24,9 +24,18 @@ class OSD_FileSystem : public Standard_Transient DEFINE_STANDARD_RTTIEXT(OSD_FileSystem, Standard_Transient) public: - //! Returns a global file system, which a selector between registered file systems. + //! Returns a global file system, which a selector between registered file systems (OSD_FileSystemSelector). Standard_EXPORT static const Handle(OSD_FileSystem)& DefaultFileSystem(); + //! Registers file system within the global file system selector returned by OSD_FileSystem::DefaultFileSystem(). + //! Note that registering protocols is not thread-safe operation and expected to be done once at application startup. + //! @param[in] theFileSystem file system to register + //! @param[in] theIsPreferred add to the beginning of the list when TRUE, or add to the end otherwise + Standard_EXPORT static void AddDefaultProtocol (const Handle(OSD_FileSystem)& theFileSystem, bool theIsPreferred = false); + + //! Unregisters file system within the global file system selector returned by OSD_FileSystem::DefaultFileSystem(). + Standard_EXPORT static void RemoveDefaultProtocol (const Handle(OSD_FileSystem)& theFileSystem); + public: //! Returns TRUE if URL defines a supported protocol. diff --git a/src/OSD/OSD_FileSystemSelector.hxx b/src/OSD/OSD_FileSystemSelector.hxx index 60aa5e1fd6..89777f4175 100644 --- a/src/OSD/OSD_FileSystemSelector.hxx +++ b/src/OSD/OSD_FileSystemSelector.hxx @@ -27,12 +27,12 @@ public: //! Constructor. OSD_FileSystemSelector() {} - //! Registers file system within the global file system selector returned by OSD_FileSystem::DefaultFileSystem(). + //! Registers file system within this selector. //! @param theFileSystem [in] file system to register //! @param theIsPreferred [in] add to the beginning of the list when TRUE, or add to the end otherwise Standard_EXPORT void AddProtocol (const Handle(OSD_FileSystem)& theFileSystem, bool theIsPreferred = false); - //! Unregisters file system within the global file system selector returned by OSD_FileSystem::DefaultFileSystem(). + //! Unregisters file system within this selector. Standard_EXPORT void RemoveProtocol (const Handle(OSD_FileSystem)& theFileSystem); public: From 8019a482b5208e9da2ba52f1202f500125df53b8 Mon Sep 17 00:00:00 2001 From: asemenov Date: Thu, 2 Sep 2021 15:32:11 +0300 Subject: [PATCH 053/639] 0029233: Incorrect result of conversion to the STEP format. Modified the method TopoDSToStep_MakeStepFace::Init Added processing of degenerate toroidal surfaces, which are the base surfaces of offset surfaces Added test --- .../TopoDSToStep_MakeStepFace.cxx | 66 +++++++++++++------ tests/bugs/step/bug29233 | 15 +++++ 2 files changed, 60 insertions(+), 21 deletions(-) create mode 100644 tests/bugs/step/bug29233 diff --git a/src/TopoDSToStep/TopoDSToStep_MakeStepFace.cxx b/src/TopoDSToStep/TopoDSToStep_MakeStepFace.cxx index a562a599e5..5cf564b01f 100644 --- a/src/TopoDSToStep/TopoDSToStep_MakeStepFace.cxx +++ b/src/TopoDSToStep/TopoDSToStep_MakeStepFace.cxx @@ -63,6 +63,7 @@ #include #include #include +#include #include #include #include @@ -211,40 +212,63 @@ void TopoDSToStep_MakeStepFace::Init(const TopoDS_Face& aFace, //%pdn 30 Nov 98: TestRally 9 issue on r1001_ec.stp: // toruses with major_radius < minor are re-coded as degenerate // rln 19.01.99: uncomment %30 pdn for integration into K4L - if(Spms->IsKind(STANDARD_TYPE(StepGeom_ToroidalSurface))) { - Handle(StepGeom_ToroidalSurface) trsf = Handle(StepGeom_ToroidalSurface)::DownCast(Spms); - Standard_Real R = trsf->MajorRadius(); - Standard_Real r = trsf->MinorRadius(); - if ( R < r ) { // if torus is degenerate, make revolution instead - Handle(Geom_ToroidalSurface) TS = Handle(Geom_ToroidalSurface)::DownCast(Su); +{ + // If the surface is Offset it is necessary to check the base surface + Standard_Boolean aSurfaceIsOffset = Standard_False; + Handle(Geom_OffsetSurface) anOffsetSu; + if (Su->IsKind(STANDARD_TYPE(Geom_OffsetSurface))) + { + aSurfaceIsOffset = Standard_True; + anOffsetSu = Handle(Geom_OffsetSurface)::DownCast(Su); + } + if ((Spms->IsKind(STANDARD_TYPE(StepGeom_ToroidalSurface))) || + ((aSurfaceIsOffset) && anOffsetSu->BasisSurface()->IsKind(STANDARD_TYPE(Geom_ToroidalSurface)))) + { + Handle(Geom_ToroidalSurface) TS; + if (aSurfaceIsOffset) + TS = Handle(Geom_ToroidalSurface)::DownCast(anOffsetSu->BasisSurface()); + else + TS = Handle(Geom_ToroidalSurface)::DownCast(Su); + Standard_Real R = TS->MajorRadius(); + Standard_Real r = TS->MinorRadius(); + if (R < r) // if torus is degenerate or base surface is degenerate, make revolution instead + { gp_Ax3 Ax3 = TS->Position(); gp_Pnt pos = Ax3.Location(); gp_Dir dir = Ax3.Direction(); - gp_Dir X = Ax3.XDirection(); - + gp_Dir X = Ax3.XDirection(); // create basis curve Standard_Real UF, VF, UL, VL; - ShapeAlgo::AlgoContainer()->GetFaceUVBounds ( aFace, UF, UL, VF, VL ); - gp_Ax2 Ax2 ( pos.XYZ() + X.XYZ() * TS->MajorRadius(), X ^ dir, X ); - Handle(Geom_Curve) BasisCurve = new Geom_Circle ( Ax2, TS->MinorRadius() ); - + ShapeAlgo::AlgoContainer()->GetFaceUVBounds(aFace, UF, UL, VF, VL); + gp_Ax2 Ax2(pos.XYZ() + X.XYZ() * TS->MajorRadius(), X ^ dir, X); + Handle(Geom_Curve) BasisCurve = new Geom_Circle(Ax2, TS->MinorRadius()); // convert basis curve to bspline in order to avoid self-intersecting // surface of revolution (necessary e.g. for CATIA) - if ( VL - VF - 2 * M_PI < -Precision::PConfusion() ) - BasisCurve = ShapeAlgo::AlgoContainer()->ConvertCurveToBSpline (BasisCurve, VF, VL, Precision::Approximation(), - GeomAbs_C1, 100, 9); -// BasisCurve = new Geom_TrimmedCurve ( BasisCurve, VF, VL ); + if (VL - VF - 2 * M_PI < -Precision::PConfusion()) + BasisCurve = ShapeAlgo::AlgoContainer()->ConvertCurveToBSpline(BasisCurve, VF, VL, Precision::Approximation(), + GeomAbs_C1, 100, 9); + //BasisCurve = new Geom_TrimmedCurve ( BasisCurve, VF, VL ); // create surface of revolution gp_Ax1 Axis = Ax3.Axis(); - if ( ! Ax3.Direct() ) Axis.Reverse(); - Handle(Geom_SurfaceOfRevolution) Rev = new Geom_SurfaceOfRevolution ( BasisCurve, Axis ); - + if (!Ax3.Direct()) Axis.Reverse(); + Handle(Geom_SurfaceOfRevolution) Rev = new Geom_SurfaceOfRevolution(BasisCurve, Axis); + // and translate it - GeomToStep_MakeSurface MkRev(Rev); - Spms = MkRev.Value(); + if (aSurfaceIsOffset) + { + anOffsetSu->SetBasisSurface(Rev); + GeomToStep_MakeSurface MkRev(anOffsetSu); + Spms = MkRev.Value(); + } + else + { + GeomToStep_MakeSurface MkRev(Rev); + Spms = MkRev.Value(); + } } } +} // ---------------- // Translates Wires diff --git a/tests/bugs/step/bug29233 b/tests/bugs/step/bug29233 new file mode 100644 index 0000000000..441e5da722 --- /dev/null +++ b/tests/bugs/step/bug29233 @@ -0,0 +1,15 @@ +puts "============" +puts "OCC29233" +puts "============" +puts "" +##################################################### +# Incorrect result of conversion to the STEP format. +##################################################### + +restore [locate_data_file bug29233.brep] orig +set aTmpFile "$imagedir/${casename}.brep" +testwritestep "$aTmpFile" orig +testreadstep "$aTmpFile" result +file delete "$aTmpFile" +checknbshapes result -face 22 +checkmaxtol result -ref 1.e-7 \ No newline at end of file From 9ae883970dd77a39d856b49e6883ed5d0e60d20f Mon Sep 17 00:00:00 2001 From: asuraven Date: Tue, 13 Jul 2021 17:17:51 +0300 Subject: [PATCH 054/639] 0032450: Modeling Algorithms - change BRepLib_CheckCurveOnSurface & GeomLib_CheckCurveOnSurface interfaces to adapters --- dox/upgrade/upgrade.md | 24 +-- src/BRepLib/BRepLib_CheckCurveOnSurface.cxx | 54 +++--- src/BRepLib/BRepLib_CheckCurveOnSurface.hxx | 41 +---- src/BRepTools/BRepTools.cxx | 13 +- src/GeomLib/GeomLib_CheckCurveOnSurface.cxx | 186 +++++++++----------- src/GeomLib/GeomLib_CheckCurveOnSurface.hxx | 46 +---- src/IntTools/IntTools_Tools.cxx | 13 +- 7 files changed, 164 insertions(+), 213 deletions(-) diff --git a/dox/upgrade/upgrade.md b/dox/upgrade/upgrade.md index d9e70e476b..58c8681e72 100644 --- a/dox/upgrade/upgrade.md +++ b/dox/upgrade/upgrade.md @@ -2264,17 +2264,6 @@ Handle(Draw_ProgressIndicator) aProgress = new Draw_ProgressIndicator(di, 1); BRepAlgoApi_Cut(S1, S2, aProgress->Start()); // method Start() creates range for usage in cut algorithm ~~~~ -@subsection upgrade_occt760_old_bop_removed Removal of old Boolean operations algorithm (BRepAlgo_BooleanOperation) - -* The method *BRepAlgo_Tool::Deboucle3D* has been removed as duplicating. The corresponding method from *BRepOffset_Tool* class has to be used instead. -* The API classes from *BRepAlgo* package performing old Boolean operations algorithm have been removed: - - *BRepAlgo_BooleanOperation* - - *BRepAlgo_Fuse* - - *BRepAlgo_Common* - - *BRepAlgo_Cut* - - *BRepAlgo_Section* - The corresponding classes from the *BRepAlgoAPI* package have to be used instead. - @subsection upgrade_occt760_change_check_to_adaptors Changes in BRepLib_CheckCurveOnSurface & GeomLib_CheckCurveOnSurface interfaces Now the classes accept adaptors instead objects as input parameters. @@ -2292,4 +2281,15 @@ void Init (const Handle(Adaptor3d_Curve)& theCurve, const Standard_Real theTolRa void Perform(const Handle(Adaptor3d_CurveOnSurface)& theCurveOnSurface, const Standard_Boolean isMultiThread); -~~~~ \ No newline at end of file +~~~~ + +@subsection upgrade_occt760_old_bop_removed Removal of old Boolean operations algorithm (BRepAlgo_BooleanOperation) + +* The method *BRepAlgo_Tool::Deboucle3D* has been removed as duplicating. The corresponding method from *BRepOffset_Tool* class has to be used instead. +* The API classes from *BRepAlgo* package performing old Boolean operations algorithm have been removed: + - *BRepAlgo_BooleanOperation* + - *BRepAlgo_Fuse* + - *BRepAlgo_Common* + - *BRepAlgo_Cut* + - *BRepAlgo_Section* + The corresponding classes from the *BRepAlgoAPI* package have to be used instead. diff --git a/src/BRepLib/BRepLib_CheckCurveOnSurface.cxx b/src/BRepLib/BRepLib_CheckCurveOnSurface.cxx index c9a3257c81..8f656f81d4 100644 --- a/src/BRepLib/BRepLib_CheckCurveOnSurface.cxx +++ b/src/BRepLib/BRepLib_CheckCurveOnSurface.cxx @@ -12,8 +12,12 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. +#include #include +#include #include +#include +#include #include #include #include @@ -36,9 +40,7 @@ BRepLib_CheckCurveOnSurface::BRepLib_CheckCurveOnSurface //function : Init //purpose : //======================================================================= -void BRepLib_CheckCurveOnSurface::Init - (const TopoDS_Edge& theEdge, - const TopoDS_Face& theFace) +void BRepLib_CheckCurveOnSurface::Init(const TopoDS_Edge& theEdge, const TopoDS_Face& theFace) { myCOnSurfGeom.Init(); @@ -53,26 +55,34 @@ void BRepLib_CheckCurveOnSurface::Init return; } - // - TopLoc_Location aLocE, aLocF, aLocC2D; - Standard_Real aFirst = 0.0, aLast = 0.0; - // // 3D curve initialization - const Handle(Geom_Curve)& aC3dTmp = BRep_Tool::Curve(theEdge, aLocE, aFirst, aLast); - const Handle(Geom_Curve) aC3d(Handle(Geom_Curve)::DownCast(aC3dTmp->Transformed(aLocE.Transformation()))); + const Handle(Adaptor3d_Curve) anAdaptor3dCurve = new BRepAdaptor_Curve(theEdge); // Surface initialization - const Handle(Geom_Surface)& aSTmp = BRep_Tool::Surface(theFace, aLocF); - const Handle(Geom_Surface) aS(Handle(Geom_Surface)::DownCast(aSTmp->Transformed(aLocF.Transformation()))); - // + + TopLoc_Location aLocation; + Standard_Real aFirstParam, aLastParam; + + Handle(Geom2d_Curve) aGeom2dCurve = BRep_Tool::CurveOnSurface(theEdge, theFace, aFirstParam, aLastParam); + Handle(Geom_Surface) aGeomSurface = BRep_Tool::Surface(theFace); + // 2D curves initialization - myPCurve = BRep_Tool::CurveOnSurface(theEdge, theFace, aFirst, aLast); + Handle(Adaptor2d_Curve2d) anAdaptorCurve = + new Geom2dAdaptor_Curve(aGeom2dCurve, aFirstParam, aLastParam); + Handle(GeomAdaptor_Surface) aGeomAdaptorSurface = new GeomAdaptor_Surface(aGeomSurface); + + myAdaptorCurveOnSurface = new Adaptor3d_CurveOnSurface(anAdaptorCurve, aGeomAdaptorSurface); if(BRep_Tool::IsClosed(theEdge, theFace)) - myPCurve2 = BRep_Tool::CurveOnSurface(TopoDS::Edge(theEdge.Reversed()), - theFace, aFirst, aLast); + { + Handle(Geom2d_Curve) aGeom2dReversedCurve = + BRep_Tool::CurveOnSurface(TopoDS::Edge(theEdge.Reversed()), theFace, aFirstParam, aLastParam); + Handle(Adaptor2d_Curve2d) anAdaptorReversedCurve = + new Geom2dAdaptor_Curve(aGeom2dReversedCurve, aFirstParam, aLastParam); + myAdaptorCurveOnSurface2 = new Adaptor3d_CurveOnSurface(anAdaptorReversedCurve, aGeomAdaptorSurface); + } - myCOnSurfGeom.Init(aC3d, aS, aFirst, aLast); + myCOnSurfGeom.Init(anAdaptor3dCurve); } //======================================================================= @@ -82,17 +92,17 @@ void BRepLib_CheckCurveOnSurface::Init void BRepLib_CheckCurveOnSurface::Perform(const Standard_Boolean isMultiThread) { // Compute the max distance - Compute(myPCurve, isMultiThread); + Compute(myAdaptorCurveOnSurface, isMultiThread); if (ErrorStatus()) { return; } // - if (!myPCurve2.IsNull()) + if (!myAdaptorCurveOnSurface2.IsNull()) { - // compute max distance for myPCurve2 + // compute max distance for myAdaptorCurveOnSurface2 // (for the second curve on closed surface) - Compute(myPCurve2, isMultiThread); + Compute(myAdaptorCurveOnSurface2, isMultiThread); } } @@ -100,8 +110,8 @@ void BRepLib_CheckCurveOnSurface::Perform(const Standard_Boolean isMultiThread) //function : Compute //purpose : if isTheMTDisabled == TRUE parallelization is not used //======================================================================= -void BRepLib_CheckCurveOnSurface::Compute(const Handle(Geom2d_Curve)& thePCurve, +void BRepLib_CheckCurveOnSurface::Compute(const Handle(Adaptor3d_CurveOnSurface)& theCurveOnSurface, const Standard_Boolean isMultiThread) { - myCOnSurfGeom.Perform(thePCurve, isMultiThread); + myCOnSurfGeom.Perform(theCurveOnSurface, isMultiThread); } diff --git a/src/BRepLib/BRepLib_CheckCurveOnSurface.hxx b/src/BRepLib/BRepLib_CheckCurveOnSurface.hxx index a30aae6521..328493b48a 100644 --- a/src/BRepLib/BRepLib_CheckCurveOnSurface.hxx +++ b/src/BRepLib/BRepLib_CheckCurveOnSurface.hxx @@ -38,38 +38,7 @@ public: //! Performs the calculation //! If isMultiThread == Standard_True then computation will be performed in parallel. - Standard_EXPORT void Perform(const Standard_Boolean isMultiThread = Standard_True); - - //! Returns source 3D-Curve - const Handle(Geom_Curve)& Curve() const - { - return myCOnSurfGeom.Curve(); - } - - //! Returns mine 2D-Curve - const Handle(Geom2d_Curve)& PCurve() const - { - return myPCurve; - } - - //! Returns 2nd 2D-Curve (if it exists, e.g. for seam-edge) - const Handle(Geom2d_Curve)& PCurve2() const - { - return myPCurve2; - } - - //! Returns source surface - const Handle(Geom_Surface)& Surface() const - { - return myCOnSurfGeom.Surface(); - } - - //! Returns first and last parameter of the curves - //! (2D- and 3D-curves are considered to have same range) - void Range (Standard_Real& theFirst, Standard_Real& theLast) - { - myCOnSurfGeom.Range(theFirst, theLast); - } + Standard_EXPORT void Perform(const Standard_Boolean isMultiThread = Standard_False); //! Returns true if the max distance has been found Standard_Boolean IsDone() const @@ -103,16 +72,16 @@ public: protected: //! Computes the max distance for the 3d curve of - //! and 2d curve + //! and 2d curve //! If isMultiThread == Standard_True then computation will be performed in parallel. - Standard_EXPORT void Compute (const Handle(Geom2d_Curve)& thePCurve, + Standard_EXPORT void Compute (const Handle(Adaptor3d_CurveOnSurface)& theCurveOnSurface, const Standard_Boolean isMultiThread); private: GeomLib_CheckCurveOnSurface myCOnSurfGeom; - Handle(Geom2d_Curve) myPCurve; - Handle(Geom2d_Curve) myPCurve2; + Handle(Adaptor3d_CurveOnSurface) myAdaptorCurveOnSurface; + Handle(Adaptor3d_CurveOnSurface) myAdaptorCurveOnSurface2; }; #endif // _BRepLib_CheckCurveOnSurface_HeaderFile diff --git a/src/BRepTools/BRepTools.cxx b/src/BRepTools/BRepTools.cxx index 99b3828d6f..7b75cc325b 100644 --- a/src/BRepTools/BRepTools.cxx +++ b/src/BRepTools/BRepTools.cxx @@ -15,6 +15,7 @@ // commercial license or contractual agreement. +#include #include #include #include @@ -30,6 +31,7 @@ #include #include #include +#include #include #include #include @@ -1333,9 +1335,16 @@ Standard_Real BRepTools::EvalAndUpdateTol(const TopoDS_Edge& theE, first = Max(first, C2d->FirstParameter()); last = Min(last, C2d->LastParameter()); } + const Handle(Adaptor3d_Curve) aGeomAdaptorCurve = new GeomAdaptor_Curve(C3d, first, last); - GeomLib_CheckCurveOnSurface CT(C3d, S, first, last); - CT.Perform(C2d); + Handle(Adaptor2d_Curve2d) aGeom2dAdaptorCurve = new Geom2dAdaptor_Curve(C2d, first, last); + Handle(GeomAdaptor_Surface) aGeomAdaptorSurface = new GeomAdaptor_Surface(S); + + Handle(Adaptor3d_CurveOnSurface) anAdaptor3dCurveOnSurface = + new Adaptor3d_CurveOnSurface(aGeom2dAdaptorCurve, aGeomAdaptorSurface); + + GeomLib_CheckCurveOnSurface CT(aGeomAdaptorCurve); + CT.Perform(anAdaptor3dCurveOnSurface); if(CT.IsDone()) { newtol = CT.MaxDistance(); diff --git a/src/GeomLib/GeomLib_CheckCurveOnSurface.cxx b/src/GeomLib/GeomLib_CheckCurveOnSurface.cxx index 5693499324..c736d458d8 100644 --- a/src/GeomLib/GeomLib_CheckCurveOnSurface.cxx +++ b/src/GeomLib/GeomLib_CheckCurveOnSurface.cxx @@ -36,6 +36,8 @@ #include #include +typedef NCollection_Array1 Array1OfHCurve; + class GeomLib_CheckCurveOnSurface_TargetFunc; static @@ -46,11 +48,11 @@ Standard_Boolean MinComputing( Standard_Real& theBestValue, Standard_Real& theBestParameter); -static Standard_Integer FillSubIntervals( const Handle(Geom_Curve)& theCurve3d, - const Handle(Geom2d_Curve)& theCurve2d, +static Standard_Integer FillSubIntervals( const Handle(Adaptor3d_Curve)& theCurve3d, + const Handle(Adaptor2d_Curve2d)& theCurve2d, const Standard_Real theFirst, const Standard_Real theLast, - Standard_Integer &theNbParticles, + Standard_Integer& theNbParticles, TColStd_Array1OfReal* const theSubIntervals = 0); //======================================================================= @@ -62,11 +64,11 @@ class GeomLib_CheckCurveOnSurface_TargetFunc : { public: GeomLib_CheckCurveOnSurface_TargetFunc( const Adaptor3d_Curve& theC3D, - const Adaptor3d_Curve& theAdCS, + const Adaptor3d_Curve& theCurveOnSurface, const Standard_Real theFirst, const Standard_Real theLast): myCurve1(theC3D), - myCurve2(theAdCS), + myCurve2(theCurveOnSurface), myFirst(theFirst), myLast(theLast) { @@ -214,7 +216,7 @@ class GeomLib_CheckCurveOnSurface_TargetFunc : } private: - GeomLib_CheckCurveOnSurface_TargetFunc operator=(GeomLib_CheckCurveOnSurface_TargetFunc&); + GeomLib_CheckCurveOnSurface_TargetFunc operator=(GeomLib_CheckCurveOnSurface_TargetFunc&) Standard_DELETE; //checks if the function can be computed when its parameter is //equal to theParam @@ -237,50 +239,43 @@ class GeomLib_CheckCurveOnSurface_Local { public: GeomLib_CheckCurveOnSurface_Local( - const Handle(Geom_Curve)& theCurve3D, - const Handle(Geom2d_Curve)& theCurve2D, - const Handle(Geom_Surface)& theSurface, - const TColStd_Array1OfReal& theIntervalsArr, - const Standard_Real theEpsilonRange, - const Standard_Integer theNbParticles): - myCurve3D(theCurve3D), - myCurve2D(theCurve2D), - mySurface(theSurface), - mySubIntervals(theIntervalsArr), - myEpsilonRange(theEpsilonRange), - myNbParticles(theNbParticles), - myArrOfDist(theIntervalsArr.Lower(), theIntervalsArr.Upper()-1), - myArrOfParam(theIntervalsArr.Lower(), theIntervalsArr.Upper()-1) + const Array1OfHCurve& theCurveArray, + const Array1OfHCurve& theCurveOnSurfaceArray, + const TColStd_Array1OfReal& theIntervalsArr, + const Standard_Real theEpsilonRange, + const Standard_Integer theNbParticles): + myCurveArray(theCurveArray), + myCurveOnSurfaceArray(theCurveOnSurfaceArray), + mySubIntervals(theIntervalsArr), + myEpsilonRange(theEpsilonRange), + myNbParticles(theNbParticles), + myArrOfDist(theIntervalsArr.Lower(), theIntervalsArr.Upper() - 1), + myArrOfParam(theIntervalsArr.Lower(), theIntervalsArr.Upper() - 1) { } - void operator()(const Standard_Integer& theIndex) const + void operator()(Standard_Integer theThreadIndex, Standard_Integer theElemIndex) const { //For every sub-interval (which is set by mySubIntervals array) this method //computes optimal value of GeomLib_CheckCurveOnSurface_TargetFunc function. //This optimal value will be put in corresponding (depending on theIndex - the //identificator of the current interval in mySubIntervals array) cell of //myArrOfDist and myArrOfParam arrays. - const GeomAdaptor_Curve anAC(myCurve3D); - const Handle(Adaptor2d_Curve2d) anAd2dC = new Geom2dAdaptor_Curve(myCurve2D); - const Handle(Adaptor3d_Surface) anAdS = new GeomAdaptor_Surface(mySurface); - - const Adaptor3d_CurveOnSurface anACS(anAd2dC, anAdS); - - GeomLib_CheckCurveOnSurface_TargetFunc aFunc( anAC, anACS, - mySubIntervals.Value(theIndex), - mySubIntervals.Value(theIndex+1)); + GeomLib_CheckCurveOnSurface_TargetFunc aFunc(*(myCurveArray.Value(theThreadIndex).get()), + *(myCurveOnSurfaceArray.Value(theThreadIndex).get()), + mySubIntervals.Value(theElemIndex), + mySubIntervals.Value(theElemIndex + 1)); Standard_Real aMinDist = RealLast(), aPar = 0.0; - if(!MinComputing(aFunc, myEpsilonRange, myNbParticles, aMinDist, aPar)) + if (!MinComputing(aFunc, myEpsilonRange, myNbParticles, aMinDist, aPar)) { - myArrOfDist(theIndex) = RealLast(); - myArrOfParam(theIndex) = aFunc.FirstParameter(); + myArrOfDist(theElemIndex) = RealLast(); + myArrOfParam(theElemIndex) = aFunc.FirstParameter(); return; } - myArrOfDist(theIndex) = aMinDist; - myArrOfParam(theIndex) = aPar; + myArrOfDist(theElemIndex) = aMinDist; + myArrOfParam(theElemIndex) = aPar; } //Returns optimal value (inverse of square of maximal distance) @@ -302,10 +297,11 @@ class GeomLib_CheckCurveOnSurface_Local } private: - GeomLib_CheckCurveOnSurface_Local operator=(GeomLib_CheckCurveOnSurface_Local&); - const Handle(Geom_Curve)& myCurve3D; - const Handle(Geom2d_Curve)& myCurve2D; - const Handle(Geom_Surface)& mySurface; + GeomLib_CheckCurveOnSurface_Local operator=(const GeomLib_CheckCurveOnSurface_Local&) Standard_DELETE; + +private: + const Array1OfHCurve& myCurveArray; + const Array1OfHCurve& myCurveOnSurfaceArray; const TColStd_Array1OfReal& mySubIntervals; const Standard_Real myEpsilonRange; @@ -320,8 +316,6 @@ class GeomLib_CheckCurveOnSurface_Local //======================================================================= GeomLib_CheckCurveOnSurface::GeomLib_CheckCurveOnSurface() : - myFirst(0.), - myLast(0.), myErrorStatus(0), myMaxDistance(RealLast()), myMaxParameter(0.), @@ -334,15 +328,9 @@ GeomLib_CheckCurveOnSurface::GeomLib_CheckCurveOnSurface() //purpose : //======================================================================= GeomLib_CheckCurveOnSurface:: - GeomLib_CheckCurveOnSurface(const Handle(Geom_Curve)& theCurve, - const Handle(Geom_Surface)& theSurface, - const Standard_Real theFirst, - const Standard_Real theLast, + GeomLib_CheckCurveOnSurface(const Handle(Adaptor3d_Curve)& theCurve, const Standard_Real theTolRange): myCurve(theCurve), - mySurface(theSurface), - myFirst(theFirst), - myLast(theLast), myErrorStatus(0), myMaxDistance(RealLast()), myMaxParameter(0.), @@ -357,9 +345,6 @@ GeomLib_CheckCurveOnSurface:: void GeomLib_CheckCurveOnSurface::Init() { myCurve.Nullify(); - mySurface.Nullify(); - myFirst = 0.0; - myLast = 0.0; myErrorStatus = 0; myMaxDistance = RealLast(); myMaxParameter = 0.0; @@ -370,16 +355,10 @@ void GeomLib_CheckCurveOnSurface::Init() //function : Init //purpose : //======================================================================= -void GeomLib_CheckCurveOnSurface::Init( const Handle(Geom_Curve)& theCurve, - const Handle(Geom_Surface)& theSurface, - const Standard_Real theFirst, - const Standard_Real theLast, +void GeomLib_CheckCurveOnSurface::Init( const Handle(Adaptor3d_Curve)& theCurve, const Standard_Real theTolRange) { myCurve = theCurve; - mySurface = theSurface; - myFirst = theFirst; - myLast = theLast; myErrorStatus = 0; myMaxDistance = RealLast(); myMaxParameter = 0.0; @@ -390,21 +369,18 @@ void GeomLib_CheckCurveOnSurface::Init( const Handle(Geom_Curve)& theCurve, //function : Perform //purpose : //======================================================================= -void GeomLib_CheckCurveOnSurface::Perform(const Handle(Geom2d_Curve)& thePCurve, +void GeomLib_CheckCurveOnSurface::Perform(const Handle(Adaptor3d_CurveOnSurface)& theCurveOnSurface, const Standard_Boolean isMultiThread) { if( myCurve.IsNull() || - mySurface.IsNull() || - thePCurve.IsNull()) + theCurveOnSurface.IsNull()) { myErrorStatus = 1; return; } - if(((myCurve->FirstParameter() - myFirst) > myTolRange) || - ((myCurve->LastParameter() - myLast) < -myTolRange) || - ((thePCurve->FirstParameter() - myFirst) > myTolRange) || - ((thePCurve->LastParameter() - myLast) < -myTolRange)) + if ((myCurve->FirstParameter() - theCurveOnSurface->FirstParameter() > myTolRange) || + (myCurve->LastParameter() - theCurveOnSurface->LastParameter() < -myTolRange)) { myErrorStatus = 2; return; @@ -421,9 +397,9 @@ void GeomLib_CheckCurveOnSurface::Perform(const Handle(Geom2d_Curve)& thePCurve, //at least one particle in every monotonicity interval. Therefore, //number of particles should be equal to n. - const Standard_Integer aNbSubIntervals = - FillSubIntervals( myCurve, thePCurve, - myFirst, myLast, aNbParticles); + const Standard_Integer aNbSubIntervals = + FillSubIntervals(myCurve, theCurveOnSurface->GetCurve(), + myCurve->FirstParameter(), myCurve->LastParameter(), aNbParticles); if(!aNbSubIntervals) { @@ -431,22 +407,45 @@ void GeomLib_CheckCurveOnSurface::Perform(const Handle(Geom2d_Curve)& thePCurve, return; } - try { + try + { OCC_CATCH_SIGNALS - TColStd_Array1OfReal anIntervals(1, aNbSubIntervals+1); - FillSubIntervals(myCurve, thePCurve, myFirst, myLast, aNbParticles, &anIntervals); - - GeomLib_CheckCurveOnSurface_Local aComp(myCurve, thePCurve, - mySurface, anIntervals, anEpsilonRange, aNbParticles); - - OSD_Parallel::For(anIntervals.Lower(), anIntervals.Upper(), aComp, !isMultiThread); + TColStd_Array1OfReal anIntervals(1, aNbSubIntervals + 1); + FillSubIntervals(myCurve, theCurveOnSurface->GetCurve(), + myCurve->FirstParameter(), myCurve->LastParameter(), aNbParticles, &anIntervals); + const Standard_Integer aNbThreads = isMultiThread ? Min(anIntervals.Size(), OSD_ThreadPool::DefaultPool()->NbDefaultThreadsToLaunch()) : 1; + Array1OfHCurve aCurveArray(0, aNbThreads - 1); + Array1OfHCurve aCurveOnSurfaceArray(0, aNbThreads - 1); + for (Standard_Integer anI = 0; anI < aNbThreads; ++anI) + { + aCurveArray.SetValue(anI, aNbThreads > 1 ? myCurve->ShallowCopy() : myCurve); + aCurveOnSurfaceArray.SetValue(anI, aNbThreads > 1 + ? theCurveOnSurface->ShallowCopy() + : static_cast (theCurveOnSurface)); + } + GeomLib_CheckCurveOnSurface_Local aComp(aCurveArray, aCurveOnSurfaceArray, anIntervals, + anEpsilonRange, aNbParticles); + if (aNbThreads > 1) + { + const Handle(OSD_ThreadPool)& aThreadPool = OSD_ThreadPool::DefaultPool(); + OSD_ThreadPool::Launcher aLauncher(*aThreadPool, aNbThreads); + aLauncher.Perform(anIntervals.Lower(), anIntervals.Upper(), aComp); + } + else + { + for (Standard_Integer anI = anIntervals.Lower(); anI < anIntervals.Upper(); ++anI) + { + aComp(0, anI); + } + } aComp.OptimalValues(myMaxDistance, myMaxParameter); myMaxDistance = sqrt(Abs(myMaxDistance)); } - catch (Standard_Failure const&) { + catch (Standard_Failure const&) + { myErrorStatus = 3; } } @@ -458,11 +457,11 @@ void GeomLib_CheckCurveOnSurface::Perform(const Handle(Geom2d_Curve)& thePCurve, // (fills theSubIntervals array). // Returns number of subintervals. //======================================================================= -Standard_Integer FillSubIntervals(const Handle(Geom_Curve)& theCurve3d, - const Handle(Geom2d_Curve)& theCurve2d, +Standard_Integer FillSubIntervals(const Handle(Adaptor3d_Curve)& theCurve3d, + const Handle(Adaptor2d_Curve2d)& theCurve2d, const Standard_Real theFirst, const Standard_Real theLast, - Standard_Integer &theNbParticles, + Standard_Integer& theNbParticles, TColStd_Array1OfReal* const theSubIntervals) { const Standard_Integer aMaxKnots = 101; @@ -475,33 +474,18 @@ Standard_Integer FillSubIntervals(const Handle(Geom_Curve)& theCurve3d, Standard_Boolean isTrimmed3D = Standard_False, isTrimmed2D = Standard_False; // - if (theCurve3d->IsKind(STANDARD_TYPE(Geom_TrimmedCurve))) + if (theCurve3d->GetType() == GeomAbs_BSplineCurve) { - aBS3DCurv = Handle(Geom_BSplineCurve):: - DownCast(Handle(Geom_TrimmedCurve):: - DownCast(theCurve3d)->BasisCurve()); - isTrimmed3D = Standard_True; + aBS3DCurv = theCurve3d->BSpline(); } - else + if (theCurve2d->GetType() == GeomAbs_BSplineCurve) { - aBS3DCurv = Handle(Geom_BSplineCurve)::DownCast(theCurve3d); + aBS2DCurv = theCurve2d->BSpline(); } - if (theCurve2d->IsKind(STANDARD_TYPE(Geom2d_TrimmedCurve))) - { - aBS2DCurv = Handle(Geom2d_BSplineCurve):: - DownCast(Handle(Geom2d_TrimmedCurve):: - DownCast(theCurve2d)->BasisCurve()); - isTrimmed2D = Standard_True; - } - else - { - aBS2DCurv = Handle(Geom2d_BSplineCurve)::DownCast(theCurve2d); - } + Handle(TColStd_HArray1OfReal) anArrKnots3D, anArrKnots2D; - Handle(TColStd_HArray1OfReal) anArrKnots3D, anArrKnots2D; - - if(!aBS3DCurv.IsNull()) + if (!aBS3DCurv.IsNull()) { if(aBS3DCurv->NbKnots() <= aMaxKnots) { diff --git a/src/GeomLib/GeomLib_CheckCurveOnSurface.hxx b/src/GeomLib/GeomLib_CheckCurveOnSurface.hxx index 1e89a2191a..bc68342407 100644 --- a/src/GeomLib/GeomLib_CheckCurveOnSurface.hxx +++ b/src/GeomLib/GeomLib_CheckCurveOnSurface.hxx @@ -15,12 +15,11 @@ #ifndef _GeomLib_CheckCurveOnSurface_HeaderFile #define _GeomLib_CheckCurveOnSurface_HeaderFile -#include +#include #include #include -class Geom_Surface; -class Geom2d_Curve; +class Adaptor3d_CurveOnSurface; //! Computes the max distance between 3D-curve and 2D-curve //! in some surface. @@ -35,48 +34,22 @@ public: //! Constructor Standard_EXPORT - GeomLib_CheckCurveOnSurface(const Handle(Geom_Curve)& theCurve, - const Handle(Geom_Surface)& theSurface, - const Standard_Real theFirst, - const Standard_Real theLast, + GeomLib_CheckCurveOnSurface(const Handle(Adaptor3d_Curve)& theCurve, const Standard_Real theTolRange = Precision::PConfusion()); //! Sets the data for the algorithm - Standard_EXPORT void Init (const Handle(Geom_Curve)& theCurve, - const Handle(Geom_Surface)& theSurface, - const Standard_Real theFirst, - const Standard_Real theLast, + Standard_EXPORT void Init (const Handle(Adaptor3d_Curve)& theCurve, const Standard_Real theTolRange = Precision::PConfusion()); //! Initializes all members by default values Standard_EXPORT void Init(); //! Computes the max distance for the 3d curve - //! and 2d curve + //! and 2d curve //! If isMultiThread == Standard_True then computation will be performed in parallel. - Standard_EXPORT void Perform(const Handle(Geom2d_Curve)& thePCurve, - const Standard_Boolean isMultiThread = Standard_True); - - //! Returns my3DCurve - const Handle(Geom_Curve)& Curve() const - { - return myCurve; - } - - //! Returns mySurface - const Handle(Geom_Surface)& Surface() const - { - return mySurface; - } - - //! Returns first and last parameter of the curves - //! (2D- and 3D-curves are considered to have same range) - void Range (Standard_Real& theFirst, Standard_Real& theLast) - { - theFirst = myFirst; - theLast = myLast; - } + Standard_EXPORT void Perform(const Handle(Adaptor3d_CurveOnSurface)& theCurveOnSurface, + const Standard_Boolean isMultiThread = Standard_False); //! Returns true if the max distance has been found Standard_Boolean IsDone() const @@ -109,10 +82,7 @@ public: private: - Handle(Geom_Curve) myCurve; - Handle(Geom_Surface) mySurface; - Standard_Real myFirst; - Standard_Real myLast; + Handle(Adaptor3d_Curve) myCurve; Standard_Integer myErrorStatus; Standard_Real myMaxDistance; Standard_Real myMaxParameter; diff --git a/src/IntTools/IntTools_Tools.cxx b/src/IntTools/IntTools_Tools.cxx index a50033b0a7..bf7b91e634 100644 --- a/src/IntTools/IntTools_Tools.cxx +++ b/src/IntTools/IntTools_Tools.cxx @@ -21,6 +21,7 @@ #include #include #include +#include #include #include #include @@ -797,8 +798,16 @@ Standard_Boolean IntTools_Tools::ComputeTolerance { GeomLib_CheckCurveOnSurface aCS; // - aCS.Init(theCurve3D, theSurf, theFirst, theLast, theTolRange); - aCS.Perform (theCurve2D, theToRunParallel); + const Handle(Adaptor3d_Curve) aGeomAdaptorCurve = new GeomAdaptor_Curve(theCurve3D, theFirst, theLast); + + Handle(Adaptor2d_Curve2d) aGeom2dAdaptorCurve = new Geom2dAdaptor_Curve(theCurve2D, theFirst, theLast); + Handle(GeomAdaptor_Surface) aGeomAdaptorSurface = new GeomAdaptor_Surface(theSurf); + + Handle(Adaptor3d_CurveOnSurface) anAdaptor3dCurveOnSurface = + new Adaptor3d_CurveOnSurface(aGeom2dAdaptorCurve, aGeomAdaptorSurface); + + aCS.Init(aGeomAdaptorCurve, theTolRange); + aCS.Perform(anAdaptor3dCurveOnSurface, theToRunParallel); if (!aCS.IsDone()) { return Standard_False; } From e2d6f0e37afc2df53b3dcc6c637d76b4ad91b851 Mon Sep 17 00:00:00 2001 From: kgv Date: Fri, 10 Sep 2021 21:45:03 +0300 Subject: [PATCH 055/639] 0032423: Coding Rules - NSOpenGLContext deprecation warnings during compilation for macOS 10.14+ The warning has been suppressed for building TKOpenGl. --- src/Aspect/Aspect_RenderingContext.hxx | 4 ++++ src/OpenGl/OpenGl_Window_1.mm | 6 ++++++ 2 files changed, 10 insertions(+) diff --git a/src/Aspect/Aspect_RenderingContext.hxx b/src/Aspect/Aspect_RenderingContext.hxx index 112c6feb82..7e4633878b 100644 --- a/src/Aspect/Aspect_RenderingContext.hxx +++ b/src/Aspect/Aspect_RenderingContext.hxx @@ -22,6 +22,8 @@ #ifndef _Aspect_RenderingContext_HeaderFile #define _Aspect_RenderingContext_HeaderFile +#include + #if defined(__APPLE__) && !defined(HAVE_XLIB) #import #if defined(TARGET_OS_IPHONE) && TARGET_OS_IPHONE @@ -37,7 +39,9 @@ #else struct NSOpenGLContext; #endif + Standard_DISABLE_DEPRECATION_WARNINGS typedef NSOpenGLContext* Aspect_RenderingContext; + Standard_ENABLE_DEPRECATION_WARNINGS #endif #else typedef void* Aspect_RenderingContext; // GLXContext under UNIX diff --git a/src/OpenGl/OpenGl_Window_1.mm b/src/OpenGl/OpenGl_Window_1.mm index 93e0470ac6..49108d4f2b 100644 --- a/src/OpenGl/OpenGl_Window_1.mm +++ b/src/OpenGl/OpenGl_Window_1.mm @@ -216,7 +216,9 @@ const Handle(OpenGl_Context)& theShareCtx) } NSView* aView = (NSView* )myPlatformWindow->NativeHandle(); + Standard_DISABLE_DEPRECATION_WARNINGS [aGLContext setView: aView]; + Standard_ENABLE_DEPRECATION_WARNINGS isCore = (aTryCore == 1); } @@ -273,7 +275,9 @@ const Handle(OpenGl_Context)& theShareCtx) #else // check backing store change (moving to another screen) NSOpenGLContext* aGLCtx = myGlContext->myGContext; + Standard_DISABLE_DEPRECATION_WARNINGS NSView* aView = [aGLCtx view]; + Standard_ENABLE_DEPRECATION_WARNINGS if (![aView respondsToSelector: @selector(convertSizeToBacking:)]) { return; @@ -353,7 +357,9 @@ const Handle(OpenGl_Context)& theShareCtx) aDefFbo.Nullify(); #else NSOpenGLContext* aGLCtx = myGlContext->myGContext; +Standard_DISABLE_DEPRECATION_WARNINGS NSView* aView = [aGLCtx view]; +Standard_ENABLE_DEPRECATION_WARNINGS NSRect aBounds = [aView bounds]; // we should call this method each time when window is resized From 1e6b2065b56039c9c977ca3d029ab81d3a2e7680 Mon Sep 17 00:00:00 2001 From: jgv Date: Fri, 10 Sep 2021 19:30:38 +0300 Subject: [PATCH 056/639] 0032561: Modelling Algorithms - UnifySameDomain does nothing while it is expected to union two pairs of faces Correct method ShapeUpgrade_UnifySameDomain::UnifyFaces: when creating the Edge-Face map of initial shape, count each face only once. --- .../ShapeUpgrade_UnifySameDomain.cxx | 6 +++++- tests/boolean/removefeatures/C5 | 4 ++-- tests/bugs/heal/bug32561 | 18 ++++++++++++++++++ 3 files changed, 25 insertions(+), 3 deletions(-) create mode 100644 tests/bugs/heal/bug32561 diff --git a/src/ShapeUpgrade/ShapeUpgrade_UnifySameDomain.cxx b/src/ShapeUpgrade/ShapeUpgrade_UnifySameDomain.cxx index 458d79b2aa..6b883e3149 100644 --- a/src/ShapeUpgrade/ShapeUpgrade_UnifySameDomain.cxx +++ b/src/ShapeUpgrade/ShapeUpgrade_UnifySameDomain.cxx @@ -2573,7 +2573,11 @@ void ShapeUpgrade_UnifySameDomain::UnifyFaces() { // creating map of edge faces for the whole shape TopTools_IndexedDataMapOfShapeListOfShape aGMapEdgeFaces; - TopExp::MapShapesAndAncestors(myShape, TopAbs_EDGE, TopAbs_FACE, aGMapEdgeFaces); + + TopTools_IndexedMapOfShape aFaceMap; + TopExp::MapShapes (myShape, TopAbs_FACE, aFaceMap); + for (Standard_Integer i = 1; i <= aFaceMap.Extent(); i++) + TopExp::MapShapesAndAncestors (aFaceMap(i), TopAbs_EDGE, TopAbs_FACE, aGMapEdgeFaces); // unify faces in each shell separately TopExp_Explorer exps; diff --git a/tests/boolean/removefeatures/C5 b/tests/boolean/removefeatures/C5 index fe32e78e5d..4d393e4936 100644 --- a/tests/boolean/removefeatures/C5 +++ b/tests/boolean/removefeatures/C5 @@ -8,7 +8,7 @@ compound s_11 s_12 s_17 gap2 removefeatures res1 s gap1 checkshape res1 checkprops res1 -s 1200 -v 1875 -checknbshapes res1 -vertex 21 -edge 35 -wire 17 -face 17 -shell 2 -solid 2 +checknbshapes res1 -vertex 19 -edge 31 -wire 15 -face 15 -shell 2 -solid 2 CheckIsFeatureRemoved gap1 {e f} # check that the common face is still shared @@ -32,7 +32,7 @@ checkprops m1 -s 600 -v 1000 removefeatures res2 s gap2 checkshape res2 checkprops res2 -s 1200 -v 1875 -checknbshapes res2 -vertex 21 -edge 35 -wire 17 -face 17 -shell 2 -solid 2 +checknbshapes res2 -vertex 19 -edge 31 -wire 15 -face 15 -shell 2 -solid 2 CheckIsFeatureRemoved gap2 {e f} # get history of the operation diff --git a/tests/bugs/heal/bug32561 b/tests/bugs/heal/bug32561 new file mode 100644 index 0000000000..5b9ab8423a --- /dev/null +++ b/tests/bugs/heal/bug32561 @@ -0,0 +1,18 @@ +puts "=======================================================================================" +puts "OCC32561: UnifySameDomain does nothing while it is expected to union two pairs of faces" +puts "=======================================================================================" +puts "" + +restore [locate_data_file bug32561.brep] a + +unifysamedom result a + +checkshape result + +checknbshapes result -t -solid 64 -shell 64 -face 233 -wire 233 -edge 284 -vertex 116 + +set tolres [checkmaxtol result] + +if { ${tolres} > 2.e-7} { + puts "Error: bad tolerance of result" +} From e2421df543599048dec275c4f913788912edfdb6 Mon Sep 17 00:00:00 2001 From: ifv Date: Thu, 19 Aug 2021 15:05:53 +0300 Subject: [PATCH 057/639] 0030422: Random behaviour of BRepAdaptor_CompCurve BRepTools/BRepTools_WireExplorer.cxx - replace MapOfShape vmap by IndexedMapOfShape to avoid random behavior of algorithm bugs/moddata_3/bug30422 - new test case added --- src/BRepTools/BRepTools_WireExplorer.cxx | 37 +++++++++++----- tests/bugs/moddata_3/bug30422 | 56 ++++++++++++++++++++++++ 2 files changed, 83 insertions(+), 10 deletions(-) create mode 100644 tests/bugs/moddata_3/bug30422 diff --git a/src/BRepTools/BRepTools_WireExplorer.cxx b/src/BRepTools/BRepTools_WireExplorer.cxx index 4a71206512..be98890d39 100644 --- a/src/BRepTools/BRepTools_WireExplorer.cxx +++ b/src/BRepTools/BRepTools_WireExplorer.cxx @@ -226,7 +226,7 @@ void BRepTools_WireExplorer::Init(const TopoDS_Wire& W, } // map of vertices to know if the wire is open - TopTools_MapOfShape vmap; + TopTools_IndexedMapOfShape vmap; // map of infinite edges TopTools_MapOfShape anInfEmap; @@ -254,15 +254,23 @@ void BRepTools_WireExplorer::Init(const TopoDS_Wire& W, // add or remove in the vertex map V1.Orientation(TopAbs_FORWARD); - if (!vmap.Add(V1)) - vmap.Remove(V1); + Standard_Integer currsize = vmap.Extent(), + ind = vmap.Add(V1); + if (currsize >= ind) + { + vmap.RemoveKey(V1); + } } if (!V2.IsNull()) { V2.Orientation(TopAbs_REVERSED); - if (!vmap.Add(V2)) - vmap.Remove(V2); + Standard_Integer currsize = vmap.Extent(), + ind = vmap.Add(V2); + if (currsize >= ind) + { + vmap.RemoveKey(V2); + } } if (V1.IsNull() || V2.IsNull()) @@ -295,12 +303,21 @@ void BRepTools_WireExplorer::Init(const TopoDS_Wire& W, // if vmap is not empty the wire is open, let us find the first vertex if (!vmap.IsEmpty()) { - TopTools_MapIteratorOfMapOfShape itt(vmap); - while (itt.Key().Orientation() != TopAbs_FORWARD) { - itt.Next(); - if (!itt.More()) break; + //TopTools_MapIteratorOfMapOfShape itt(vmap); + //while (itt.Key().Orientation() != TopAbs_FORWARD) { + // itt.Next(); + // if (!itt.More()) break; + //} + //if (itt.More()) V1 = TopoDS::Vertex(itt.Key()); + Standard_Integer ind = 0; + for (ind = 1; ind <= vmap.Extent(); ++ind) + { + if (vmap(ind).Orientation() == TopAbs_FORWARD) + { + V1 = TopoDS::Vertex(vmap(ind)); + break; + } } - if (itt.More()) V1 = TopoDS::Vertex(itt.Key()); } else { // The wire is infinite Try to find the first vertex. It may be NULL. diff --git a/tests/bugs/moddata_3/bug30422 b/tests/bugs/moddata_3/bug30422 new file mode 100644 index 0000000000..c897054a21 --- /dev/null +++ b/tests/bugs/moddata_3/bug30422 @@ -0,0 +1,56 @@ +puts "=========" +puts "0030422: Modeling Data - Random behaviour of BRepAdaptor_CompCurve" +puts "=========" +puts "" + +vertex vf1 0 0 0 +vertex vf2 1 0 0 +vertex vf3 2 0 0 +vertex vf4 3 0 0 +vertex vf5 4 0 0 +## +edge ef1 vf1 vf2 +edge ef2 vf2 vf3 +edge ef3 vf3 vf4 +edge ef4 vf5 vf4 +## +shape wf w +add ef1 wf +add ef2 wf +add ef3 wf +add ef4 wf +## +wexplo wf +# +if {![isdraw WEDGE_3] } { + puts "Error: wire explorer failed" +} else { + unset WEDGE_1 + unset WEDGE_2 + unset WEDGE_3 +} +## +vertex vs5 4 0 0 +vertex vs2 1 0 0 +vertex vs3 2 0 0 +vertex vs4 3 0 0 +vertex vs1 0 0 0 +## +edge es1 vs1 vs2 +edge es2 vs2 vs3 +edge es3 vs3 vs4 +edge es4 vs5 vs4 +## +shape ws w +add es1 ws +add es4 ws +add es3 ws +add es2 ws +## +wexplo ws +# +if {![isdraw WEDGE_3] } { + puts "Error: wire explorer failed" +} + + From 13b36bb14fed2ee0994d43a42407f159f454a528 Mon Sep 17 00:00:00 2001 From: kgv Date: Mon, 13 Sep 2021 22:19:54 +0300 Subject: [PATCH 058/639] 0032567: Coding Rules - rename Graphic3d_TypeOfShadingModel values to include full enumeration name --- .../visualization/visualization.md | 4 +- samples/webgl/WasmOcctView.cpp | 2 +- src/AIS/AIS_ColorScale.cxx | 2 +- src/AIS/AIS_LightSource.cxx | 4 +- src/AIS/AIS_MediaPlayer.cxx | 2 +- src/AIS/AIS_RubberBand.cxx | 6 +- src/Graphic3d/Graphic3d_AspectLine3d.cxx | 4 +- src/Graphic3d/Graphic3d_AspectMarker3d.cxx | 8 +- src/Graphic3d/Graphic3d_AspectText3d.cxx | 4 +- src/Graphic3d/Graphic3d_Aspects.cxx | 2 +- src/Graphic3d/Graphic3d_Aspects.hxx | 2 +- src/Graphic3d/Graphic3d_CView.cxx | 2 +- src/Graphic3d/Graphic3d_CView.hxx | 4 +- src/Graphic3d/Graphic3d_RenderingParams.hxx | 4 +- src/Graphic3d/Graphic3d_TypeOfLimit.hxx | 2 +- .../Graphic3d_TypeOfShadingModel.hxx | 48 ++++++----- src/OpenGl/OpenGl_Aspects.cxx | 8 +- src/OpenGl/OpenGl_Aspects.hxx | 2 +- src/OpenGl/OpenGl_Context.cxx | 6 +- src/OpenGl/OpenGl_Context.hxx | 2 +- src/OpenGl/OpenGl_FrameStatsPrs.cxx | 2 +- src/OpenGl/OpenGl_PrimitiveArray.cxx | 4 +- src/OpenGl/OpenGl_SetOfShaderPrograms.hxx | 2 +- src/OpenGl/OpenGl_ShaderManager.cxx | 10 +-- src/OpenGl/OpenGl_ShaderManager.hxx | 86 +++++++++---------- src/OpenGl/OpenGl_Structure.cxx | 2 +- src/OpenGl/OpenGl_Text.cxx | 2 +- src/OpenGl/OpenGl_View.cxx | 12 +-- src/OpenGl/OpenGl_View_Raytrace.cxx | 2 +- src/OpenGl/OpenGl_Workspace.cxx | 6 +- src/OpenGlTest/OpenGlTest_Commands.cxx | 2 +- src/PrsDim/PrsDim_Dimension.cxx | 2 +- src/QABugs/QABugs_1.cxx | 2 +- src/V3d/V3d_View.hxx | 2 +- src/V3d/V3d_Viewer.hxx | 2 +- src/ViewerTest/ViewerTest.cxx | 24 +++--- src/ViewerTest/ViewerTest_ViewerCommands.cxx | 32 +++---- 37 files changed, 159 insertions(+), 153 deletions(-) diff --git a/dox/user_guides/visualization/visualization.md b/dox/user_guides/visualization/visualization.md index bc96d5d34b..a4bf2cd0a9 100644 --- a/dox/user_guides/visualization/visualization.md +++ b/dox/user_guides/visualization/visualization.md @@ -1468,8 +1468,8 @@ The following items are required to determine the three colors of reflection: * Coefficient of ambient reflection; * Coefficient of specular reflection. -Common material properties are used within Gouraud and Phong shading models (Graphic3d_TOSM_FACET, Graphic3d_TOSM_VERTEX and Graphic3d_TOSM_FRAGMENT). -Within PBR shading model (Graphic3d_TOSM_PBR and Graphic3d_TOSM_PBR_FACET), material properties are defined by the following *Graphic3d_PBRMaterial* properties (Graphic3d_MaterialAspect::PBRMaterial()): +Common material properties are used within Phong shading model (Graphic3d_TypeOfShadingModel_Phong, Graphic3d_TypeOfShadingModel_PhongFacet and Graphic3d_TypeOfShadingModel_Gouraud). +Within PBR shading model (Graphic3d_TypeOfShadingModel_Pbr and Graphic3d_TypeOfShadingModel_PbrFacet), material properties are defined by the following *Graphic3d_PBRMaterial* properties (Graphic3d_MaterialAspect::PBRMaterial()): * Albedo (main color); * Metallic factor; * Roughness factor; diff --git a/samples/webgl/WasmOcctView.cpp b/samples/webgl/WasmOcctView.cpp index cf2b86e98e..65efdd3ab4 100644 --- a/samples/webgl/WasmOcctView.cpp +++ b/samples/webgl/WasmOcctView.cpp @@ -307,7 +307,7 @@ bool WasmOcctView::initViewer() Handle(V3d_Viewer) aViewer = new V3d_Viewer (aDriver); aViewer->SetComputedMode (false); - aViewer->SetDefaultShadingModel (Graphic3d_TOSM_FRAGMENT); + aViewer->SetDefaultShadingModel (Graphic3d_TypeOfShadingModel_Phong); aViewer->SetDefaultLights(); aViewer->SetLightOn(); for (V3d_ListOfLight::Iterator aLightIter (aViewer->ActiveLights()); aLightIter.More(); aLightIter.Next()) diff --git a/src/AIS/AIS_ColorScale.cxx b/src/AIS/AIS_ColorScale.cxx index 36b1aa6fdf..70aa1ec75f 100644 --- a/src/AIS/AIS_ColorScale.cxx +++ b/src/AIS/AIS_ColorScale.cxx @@ -133,7 +133,7 @@ AIS_ColorScale::AIS_ColorScale() { SetDisplayMode (0); myDrawer->SetupOwnShadingAspect(); - myDrawer->ShadingAspect()->Aspect()->SetShadingModel (Graphic3d_TOSM_UNLIT); + myDrawer->ShadingAspect()->Aspect()->SetShadingModel (Graphic3d_TypeOfShadingModel_Unlit); myDrawer->ShadingAspect()->Aspect()->SetAlphaMode (Graphic3d_AlphaMode_Opaque); myDrawer->ShadingAspect()->Aspect()->SetInteriorColor (Quantity_NOC_WHITE); } diff --git a/src/AIS/AIS_LightSource.cxx b/src/AIS/AIS_LightSource.cxx index 42a25a9a4d..c48e80528f 100644 --- a/src/AIS/AIS_LightSource.cxx +++ b/src/AIS/AIS_LightSource.cxx @@ -200,7 +200,7 @@ AIS_LightSource::AIS_LightSource (const Handle(Graphic3d_CLight)& theLight) aMat.SetColor (aColor); myDrawer->SetArrowAspect (new Prs3d_ArrowAspect()); myDrawer->ArrowAspect()->SetColor (aColor); - myDrawer->ArrowAspect()->Aspect()->SetShadingModel (Graphic3d_TOSM_UNLIT); + myDrawer->ArrowAspect()->Aspect()->SetShadingModel (Graphic3d_TypeOfShadingModel_Unlit); myDrawer->ArrowAspect()->Aspect()->ChangeFrontMaterial() = aMat; myDrawer->ArrowAspect()->Aspect()->SetMarkerType (Aspect_TOM_EMPTY); myDrawer->ArrowAspect()->Aspect()->SetMarkerScale (2.0f); @@ -211,7 +211,7 @@ AIS_LightSource::AIS_LightSource (const Handle(Graphic3d_CLight)& theLight) myDrawer->ShadingAspect()->SetColor (aColor); myDrawer->ShadingAspect()->SetMaterial (aMat); myDrawer->ShadingAspect()->SetTransparency (0.5f); - myDrawer->ShadingAspect()->Aspect()->SetShadingModel (Graphic3d_TOSM_UNLIT); + myDrawer->ShadingAspect()->Aspect()->SetShadingModel (Graphic3d_TypeOfShadingModel_Unlit); myDrawer->SetTextAspect (new Prs3d_TextAspect()); myDrawer->TextAspect()->Aspect()->SetDisplayType (Aspect_TODT_SHADOW); diff --git a/src/AIS/AIS_MediaPlayer.cxx b/src/AIS/AIS_MediaPlayer.cxx index ee7093a2fe..8cd1c13f64 100644 --- a/src/AIS/AIS_MediaPlayer.cxx +++ b/src/AIS/AIS_MediaPlayer.cxx @@ -56,7 +56,7 @@ AIS_MediaPlayer::AIS_MediaPlayer() Graphic3d_MaterialAspect aMat; myFrameAspect = new Graphic3d_AspectFillArea3d (Aspect_IS_SOLID, Quantity_NOC_WHITE, Quantity_NOC_BLACK, Aspect_TOL_SOLID, 1.0f, aMat, aMat); - myFrameAspect->SetShadingModel (Graphic3d_TOSM_UNLIT); + myFrameAspect->SetShadingModel (Graphic3d_TypeOfShadingModel_Unlit); myFrameAspect->SetTextureMapOn (true); myFrameAspect->SetTextureSet (myFramePair); } diff --git a/src/AIS/AIS_RubberBand.cxx b/src/AIS/AIS_RubberBand.cxx index a5ce2927f5..8019f714ed 100644 --- a/src/AIS/AIS_RubberBand.cxx +++ b/src/AIS/AIS_RubberBand.cxx @@ -43,7 +43,7 @@ AIS_RubberBand::AIS_RubberBand() myDrawer->SetLineAspect (new Prs3d_LineAspect (Quantity_NOC_WHITE, Aspect_TOL_SOLID, 1.0)); myDrawer->SetShadingAspect (new Prs3d_ShadingAspect()); myDrawer->ShadingAspect()->SetMaterial (Graphic3d_NameOfMaterial_Plastified); - myDrawer->ShadingAspect()->Aspect()->SetShadingModel (Graphic3d_TOSM_UNLIT); + myDrawer->ShadingAspect()->Aspect()->SetShadingModel (Graphic3d_TypeOfShadingModel_Unlit); myDrawer->ShadingAspect()->Aspect()->SetInteriorStyle (Aspect_IS_EMPTY); myDrawer->ShadingAspect()->Aspect()->SetAlphaMode (Graphic3d_AlphaMode_Blend); myDrawer->ShadingAspect()->SetTransparency (1.0); @@ -66,7 +66,7 @@ AIS_RubberBand::AIS_RubberBand (const Quantity_Color& theLineColor, myDrawer->SetLineAspect (new Prs3d_LineAspect (theLineColor, theLineType, theWidth)); myDrawer->SetShadingAspect (new Prs3d_ShadingAspect()); myDrawer->ShadingAspect()->SetMaterial (Graphic3d_NameOfMaterial_Plastified); - myDrawer->ShadingAspect()->Aspect()->SetShadingModel (Graphic3d_TOSM_UNLIT); + myDrawer->ShadingAspect()->Aspect()->SetShadingModel (Graphic3d_TypeOfShadingModel_Unlit); myDrawer->ShadingAspect()->Aspect()->SetInteriorStyle (Aspect_IS_EMPTY); myDrawer->ShadingAspect()->Aspect()->SetAlphaMode (Graphic3d_AlphaMode_Blend); myDrawer->ShadingAspect()->SetTransparency (1.0); @@ -92,7 +92,7 @@ AIS_RubberBand::AIS_RubberBand (const Quantity_Color& theLineColor, myDrawer->SetShadingAspect (new Prs3d_ShadingAspect()); myDrawer->ShadingAspect()->SetMaterial (Graphic3d_NameOfMaterial_Plastified); myDrawer->ShadingAspect()->SetColor (theFillColor); - myDrawer->ShadingAspect()->Aspect()->SetShadingModel (Graphic3d_TOSM_UNLIT); + myDrawer->ShadingAspect()->Aspect()->SetShadingModel (Graphic3d_TypeOfShadingModel_Unlit); myDrawer->ShadingAspect()->Aspect()->SetInteriorStyle (Aspect_IS_SOLID); myDrawer->ShadingAspect()->Aspect()->SetAlphaMode (Graphic3d_AlphaMode_Blend); myDrawer->ShadingAspect()->SetTransparency (theTransparency); diff --git a/src/Graphic3d/Graphic3d_AspectLine3d.cxx b/src/Graphic3d/Graphic3d_AspectLine3d.cxx index 757c3473d6..ddbf185299 100644 --- a/src/Graphic3d/Graphic3d_AspectLine3d.cxx +++ b/src/Graphic3d/Graphic3d_AspectLine3d.cxx @@ -23,7 +23,7 @@ IMPLEMENT_STANDARD_RTTIEXT(Graphic3d_AspectLine3d, Graphic3d_Aspects) // ======================================================================= Graphic3d_AspectLine3d::Graphic3d_AspectLine3d() { - myShadingModel = Graphic3d_TOSM_UNLIT; + myShadingModel = Graphic3d_TypeOfShadingModel_Unlit; myInteriorColor.SetRGB (Quantity_NOC_YELLOW); myLineType = Aspect_TOL_SOLID; myLineWidth = 1.0f; @@ -37,7 +37,7 @@ Graphic3d_AspectLine3d::Graphic3d_AspectLine3d (const Quantity_Color& theColor, Aspect_TypeOfLine theType, Standard_Real theWidth) { - myShadingModel = Graphic3d_TOSM_UNLIT; + myShadingModel = Graphic3d_TypeOfShadingModel_Unlit; myInteriorColor.SetRGB (theColor); SetLineType (theType); SetLineWidth ((float)theWidth); diff --git a/src/Graphic3d/Graphic3d_AspectMarker3d.cxx b/src/Graphic3d/Graphic3d_AspectMarker3d.cxx index 802d5b7136..319af764e4 100644 --- a/src/Graphic3d/Graphic3d_AspectMarker3d.cxx +++ b/src/Graphic3d/Graphic3d_AspectMarker3d.cxx @@ -23,7 +23,7 @@ IMPLEMENT_STANDARD_RTTIEXT(Graphic3d_AspectMarker3d, Graphic3d_Aspects) // ======================================================================= Graphic3d_AspectMarker3d::Graphic3d_AspectMarker3d() { - myShadingModel = Graphic3d_TOSM_UNLIT; + myShadingModel = Graphic3d_TypeOfShadingModel_Unlit; myInteriorColor.SetRGB (Quantity_NOC_YELLOW); myMarkerType = Aspect_TOM_X; myMarkerScale = 1.0f; @@ -37,7 +37,7 @@ Graphic3d_AspectMarker3d::Graphic3d_AspectMarker3d (const Aspect_TypeOfMarker th const Quantity_Color& theColor, const Standard_Real theScale) { - myShadingModel = Graphic3d_TOSM_UNLIT; + myShadingModel = Graphic3d_TypeOfShadingModel_Unlit; myInteriorColor.SetRGB (theColor); myMarkerType = theType; SetMarkerScale ((float )theScale); @@ -52,7 +52,7 @@ Graphic3d_AspectMarker3d::Graphic3d_AspectMarker3d (const Quantity_Color& theCo const Standard_Integer theHeight, const Handle(TColStd_HArray1OfByte)& theTextureBitMap) { - myShadingModel = Graphic3d_TOSM_UNLIT; + myShadingModel = Graphic3d_TypeOfShadingModel_Unlit; myMarkerImage = new Graphic3d_MarkerImage(theTextureBitMap, theWidth, theHeight); myInteriorColor.SetRGB (theColor), myMarkerType = Aspect_TOM_USERDEFINED; @@ -65,7 +65,7 @@ Graphic3d_AspectMarker3d::Graphic3d_AspectMarker3d (const Quantity_Color& theCo // ======================================================================= Graphic3d_AspectMarker3d::Graphic3d_AspectMarker3d (const Handle(Image_PixMap)& theTextureImage) { - myShadingModel = Graphic3d_TOSM_UNLIT; + myShadingModel = Graphic3d_TypeOfShadingModel_Unlit; myMarkerImage = new Graphic3d_MarkerImage (theTextureImage); myInteriorColor.SetRGB (Quantity_NOC_YELLOW); myMarkerType = Aspect_TOM_USERDEFINED; diff --git a/src/Graphic3d/Graphic3d_AspectText3d.cxx b/src/Graphic3d/Graphic3d_AspectText3d.cxx index f4b92243a5..4944812877 100644 --- a/src/Graphic3d/Graphic3d_AspectText3d.cxx +++ b/src/Graphic3d/Graphic3d_AspectText3d.cxx @@ -24,7 +24,7 @@ IMPLEMENT_STANDARD_RTTIEXT(Graphic3d_AspectText3d, Graphic3d_Aspects) Graphic3d_AspectText3d::Graphic3d_AspectText3d() { SetAlphaMode (Graphic3d_AlphaMode_MaskBlend, 0.285f); - myShadingModel = Graphic3d_TOSM_UNLIT; + myShadingModel = Graphic3d_TypeOfShadingModel_Unlit; myInteriorColor.SetRGB (Quantity_NOC_YELLOW); myEdgeColor.SetRGB (Quantity_NOC_WHITE); } @@ -41,7 +41,7 @@ Graphic3d_AspectText3d::Graphic3d_AspectText3d (const Quantity_Color& theColor, Aspect_TypeOfDisplayText theDisplayType) { SetAlphaMode (Graphic3d_AlphaMode_MaskBlend, 0.285f); - myShadingModel = Graphic3d_TOSM_UNLIT; + myShadingModel = Graphic3d_TypeOfShadingModel_Unlit; myTextStyle = theStyle; myTextDisplayType = theDisplayType; myInteriorColor.SetRGB (theColor); diff --git a/src/Graphic3d/Graphic3d_Aspects.cxx b/src/Graphic3d/Graphic3d_Aspects.cxx index e50ea53708..b9420a8203 100644 --- a/src/Graphic3d/Graphic3d_Aspects.cxx +++ b/src/Graphic3d/Graphic3d_Aspects.cxx @@ -25,7 +25,7 @@ Graphic3d_Aspects::Graphic3d_Aspects() myBackInteriorColor (Quantity_NOC_CYAN1), myEdgeColor (Quantity_NOC_WHITE), myInteriorStyle (Aspect_IS_SOLID), - myShadingModel (Graphic3d_TOSM_DEFAULT), + myShadingModel (Graphic3d_TypeOfShadingModel_DEFAULT), myFaceCulling (Graphic3d_TypeOfBackfacingModel_Auto), myAlphaMode (Graphic3d_AlphaMode_BlendAuto), myAlphaCutoff (0.5f), diff --git a/src/Graphic3d/Graphic3d_Aspects.hxx b/src/Graphic3d/Graphic3d_Aspects.hxx index 6606d129e0..dd2b45df72 100644 --- a/src/Graphic3d/Graphic3d_Aspects.hxx +++ b/src/Graphic3d/Graphic3d_Aspects.hxx @@ -49,7 +49,7 @@ public: //! Modifies the interior type used for rendering void SetInteriorStyle (const Aspect_InteriorStyle theStyle) { myInteriorStyle = theStyle; } - //! Returns shading model; Graphic3d_TOSM_DEFAULT by default. + //! Returns shading model; Graphic3d_TypeOfShadingModel_DEFAULT by default. //! Graphic3d_TOSM_DEFAULT means that Shading Model set as default for entire Viewer will be used. Graphic3d_TypeOfShadingModel ShadingModel() const { return myShadingModel; } diff --git a/src/Graphic3d/Graphic3d_CView.cxx b/src/Graphic3d/Graphic3d_CView.cxx index 2a2a20820b..4328c08d62 100644 --- a/src/Graphic3d/Graphic3d_CView.cxx +++ b/src/Graphic3d/Graphic3d_CView.cxx @@ -1092,7 +1092,7 @@ void Graphic3d_CView::CopySettings (const Handle(Graphic3d_CView)& theOther) // ======================================================================= void Graphic3d_CView::SetShadingModel (Graphic3d_TypeOfShadingModel theModel) { - if (theModel == Graphic3d_TOSM_DEFAULT) + if (theModel == Graphic3d_TypeOfShadingModel_DEFAULT) { throw Standard_ProgramError ("Graphic3d_CView::SetShadingModel() - attempt to set invalid Shading Model!"); } diff --git a/src/Graphic3d/Graphic3d_CView.hxx b/src/Graphic3d/Graphic3d_CView.hxx index 9af619b8f2..999b9b4a4e 100644 --- a/src/Graphic3d/Graphic3d_CView.hxx +++ b/src/Graphic3d/Graphic3d_CView.hxx @@ -99,11 +99,11 @@ public: public: - //! Returns default Shading Model of the view; Graphic3d_TOSM_FRAGMENT by default. + //! Returns default Shading Model of the view; Graphic3d_TypeOfShadingModel_Phong by default. Graphic3d_TypeOfShadingModel ShadingModel() const { return myRenderParams.ShadingModel; } //! Sets default Shading Model of the view. - //! Will throw an exception on attempt to set Graphic3d_TOSM_DEFAULT. + //! Will throw an exception on attempt to set Graphic3d_TypeOfShadingModel_DEFAULT. Standard_EXPORT void SetShadingModel (Graphic3d_TypeOfShadingModel theModel); //! Return backfacing model used for the view; Graphic3d_TypeOfBackfacingModel_Auto by default, diff --git a/src/Graphic3d/Graphic3d_RenderingParams.hxx b/src/Graphic3d/Graphic3d_RenderingParams.hxx index 78982b1942..38fafd4a78 100644 --- a/src/Graphic3d/Graphic3d_RenderingParams.hxx +++ b/src/Graphic3d/Graphic3d_RenderingParams.hxx @@ -96,7 +96,7 @@ public: //! Creates default rendering parameters. Graphic3d_RenderingParams() : Method (Graphic3d_RM_RASTERIZATION), - ShadingModel (Graphic3d_TOSM_FRAGMENT), + ShadingModel (Graphic3d_TypeOfShadingModel_Phong), TransparencyMethod (Graphic3d_RTM_BLEND_UNORDERED), Resolution (THE_DEFAULT_RESOLUTION), FontHinting (Font_Hinting_Off), @@ -189,7 +189,7 @@ public: public: //! @name general parameters Graphic3d_RenderingMode Method; //!< specifies rendering mode, Graphic3d_RM_RASTERIZATION by default - Graphic3d_TypeOfShadingModel ShadingModel; //!< specified default shading model, Graphic3d_TOSM_FRAGMENT by default + Graphic3d_TypeOfShadingModel ShadingModel; //!< specified default shading model, Graphic3d_TypeOfShadingModel_Phong by default Graphic3d_RenderTransparentMethod TransparencyMethod; //!< specifies rendering method for transparent graphics unsigned int Resolution; //!< Pixels density (PPI), defines scaling factor for parameters like text size //! (when defined in screen-space units rather than in 3D) to be properly displayed diff --git a/src/Graphic3d/Graphic3d_TypeOfLimit.hxx b/src/Graphic3d/Graphic3d_TypeOfLimit.hxx index 3b501ae535..fa524493df 100644 --- a/src/Graphic3d/Graphic3d_TypeOfLimit.hxx +++ b/src/Graphic3d/Graphic3d_TypeOfLimit.hxx @@ -33,7 +33,7 @@ enum Graphic3d_TypeOfLimit Graphic3d_TypeOfLimit_HasSRGB, //!< indicates whether sRGB rendering is supported Graphic3d_TypeOfLimit_HasBlendedOit, //!< indicates whether necessary GL extensions for Weighted, Blended OIT available (without MSAA). Graphic3d_TypeOfLimit_HasBlendedOitMsaa, //!< indicates whether necessary GL extensions for Weighted, Blended OIT available (with MSAA). - Graphic3d_TypeOfLimit_HasFlatShading, //!< indicates whether Flat shading (Graphic3d_TOSM_FACET) is supported + Graphic3d_TypeOfLimit_HasFlatShading, //!< indicates whether Flat shading (Graphic3d_TypeOfShadingModel_PhongFacet) is supported Graphic3d_TypeOfLimit_HasMeshEdges, //!< indicates whether advanced mesh edges presentation is supported Graphic3d_TypeOfLimit_IsWorkaroundFBO, //!< indicates whether workaround for Intel driver problem with empty FBO for images with big width is applied. Graphic3d_TypeOfLimit_NB //!< number of elements in this enumeration diff --git a/src/Graphic3d/Graphic3d_TypeOfShadingModel.hxx b/src/Graphic3d/Graphic3d_TypeOfShadingModel.hxx index 01b560565e..dc099678b5 100644 --- a/src/Graphic3d/Graphic3d_TypeOfShadingModel.hxx +++ b/src/Graphic3d/Graphic3d_TypeOfShadingModel.hxx @@ -21,38 +21,44 @@ enum Graphic3d_TypeOfShadingModel { //! Use Shading Model, specified as default for entire Viewer. - Graphic3d_TOSM_DEFAULT = -1, + Graphic3d_TypeOfShadingModel_DEFAULT = -1, //! Unlit Shading (or shadeless), lighting is ignored and facet is fully filled by its material color. //! This model is useful for artificial/auxiliary objects, not intended to be lit, //! or for objects with pre-calculated lighting information (e.g. captured by camera). - Graphic3d_TOSM_UNLIT = 0, + Graphic3d_TypeOfShadingModel_Unlit = 0, - //! Flat Shading, calculated per-facet basing on facet normal. - //! This model is useful for mesh element analysis. - //! Note that unlike Graphic3d_TOSM_VERTEX/Graphic3d_TOSM_FRAGMENT, - //! this shading model does NOT require normals to be defined within vertex attributes. - Graphic3d_TOSM_FACET, + //! Flat Shading for Phong material model, calculated using triangle normal. + //! Could be useful for mesh element analysis. + //! This shading model does NOT require normals to be defined within vertex attributes. + Graphic3d_TypeOfShadingModel_PhongFacet, - //! Gouraud Shading, calculated per-vertex basing on nodal normal, and then color is interpolated across fragments. - //! This shading model was default within Fixed-Function Pipeline of old OpenGL (and Direct3d); - //! still can be used as alternative to Graphic3d_TOSM_FRAGMENT for better performance on low-poly (and middle-poly) models - //! (per-fragment shading is more optimal for considerably high-poly models, since expensive shading is not computed for discarded fragments). - //! Shading model requires normals to be defined within vertex attributes. - Graphic3d_TOSM_VERTEX, + //! Gouraud shading uses the same material definition as Phong reflection model, + //! but emulates an obsolete per-vertex calculations with result color interpolated across fragments, + //! as implemented by T&L hardware blocks on old graphics hardware. + //! This shading model requires normals to be defined within vertex attributes. + Graphic3d_TypeOfShadingModel_Gouraud, - //! Phong Shading, calculated per-fragment basing on nodal normal, so that normal is interpolated across fragments. - //! This is a main shading model nowadays, providing the best image quality. - //! Shading model requires normals to be defined within vertex attributes. - Graphic3d_TOSM_FRAGMENT, + //! Phong reflection model, an empirical model defined by Diffuse/Ambient/Specular/Shininess components. + //! Lighting is calculated per-fragment basing on nodal normal (normal is interpolated across fragments of triangle). + //! This shading model requires normals to be defined within vertex attributes. + Graphic3d_TypeOfShadingModel_Phong, //! Metallic-roughness physically based (PBR) illumination system. - Graphic3d_TOSM_PBR, + Graphic3d_TypeOfShadingModel_Pbr, - //! Same as Graphic3d_TOSM_PBR but using flat per-triangle normal. - Graphic3d_TOSM_PBR_FACET, + //! Same as Graphic3d_TypeOfShadingModel_Pbr but using flat per-triangle normal. + Graphic3d_TypeOfShadingModel_PbrFacet, // obsolete aliases + Graphic3d_TOSM_DEFAULT = Graphic3d_TypeOfShadingModel_DEFAULT, + Graphic3d_TOSM_UNLIT = Graphic3d_TypeOfShadingModel_Unlit, + Graphic3d_TOSM_FACET = Graphic3d_TypeOfShadingModel_PhongFacet, + Graphic3d_TOSM_VERTEX = Graphic3d_TypeOfShadingModel_Gouraud, + Graphic3d_TOSM_FRAGMENT = Graphic3d_TypeOfShadingModel_Phong, + Graphic3d_TOSM_PBR = Graphic3d_TypeOfShadingModel_Pbr, + Graphic3d_TOSM_PBR_FACET = Graphic3d_TypeOfShadingModel_PbrFacet, + // Graphic3d_TOSM_NONE = Graphic3d_TOSM_UNLIT, V3d_COLOR = Graphic3d_TOSM_NONE, V3d_FLAT = Graphic3d_TOSM_FACET, @@ -63,7 +69,7 @@ enum Graphic3d_TypeOfShadingModel enum { //! Auxiliary value defining the overall number of values in enumeration Graphic3d_TypeOfShadingModel - Graphic3d_TypeOfShadingModel_NB = Graphic3d_TOSM_PBR_FACET + 1 + Graphic3d_TypeOfShadingModel_NB = Graphic3d_TypeOfShadingModel_PbrFacet + 1 }; #endif // _Graphic3d_TypeOfShadingModel_HeaderFile diff --git a/src/OpenGl/OpenGl_Aspects.cxx b/src/OpenGl/OpenGl_Aspects.cxx index 4879091e8e..7196a8e55e 100644 --- a/src/OpenGl/OpenGl_Aspects.cxx +++ b/src/OpenGl/OpenGl_Aspects.cxx @@ -43,7 +43,7 @@ namespace // ======================================================================= OpenGl_Aspects::OpenGl_Aspects() : myAspect (new Graphic3d_Aspects()), - myShadingModel (Graphic3d_TOSM_UNLIT) + myShadingModel (Graphic3d_TypeOfShadingModel_Unlit) { myAspect->SetInteriorStyle (Aspect_IS_SOLID); myAspect->SetInteriorColor (Quantity_NOC_WHITE); @@ -59,7 +59,7 @@ OpenGl_Aspects::OpenGl_Aspects() // purpose : // ======================================================================= OpenGl_Aspects::OpenGl_Aspects (const Handle(Graphic3d_Aspects)& theAspect) -: myShadingModel (Graphic3d_TOSM_DEFAULT) +: myShadingModel (Graphic3d_TypeOfShadingModel_DEFAULT) { SetAspect (theAspect); } @@ -73,13 +73,13 @@ void OpenGl_Aspects::SetAspect (const Handle(Graphic3d_Aspects)& theAspect) myAspect = theAspect; const Graphic3d_MaterialAspect& aMat = theAspect->FrontMaterial(); - myShadingModel = theAspect->ShadingModel() != Graphic3d_TOSM_UNLIT + myShadingModel = theAspect->ShadingModel() != Graphic3d_TypeOfShadingModel_Unlit && (aMat.ReflectionMode (Graphic3d_TOR_AMBIENT) || aMat.ReflectionMode (Graphic3d_TOR_DIFFUSE) || aMat.ReflectionMode (Graphic3d_TOR_SPECULAR) || aMat.ReflectionMode (Graphic3d_TOR_EMISSION)) ? theAspect->ShadingModel() - : Graphic3d_TOSM_UNLIT; + : Graphic3d_TypeOfShadingModel_Unlit; // invalidate resources myResTextureSet.UpdateRediness (myAspect); diff --git a/src/OpenGl/OpenGl_Aspects.hxx b/src/OpenGl/OpenGl_Aspects.hxx index f32f63edeb..81516b9b76 100644 --- a/src/OpenGl/OpenGl_Aspects.hxx +++ b/src/OpenGl/OpenGl_Aspects.hxx @@ -42,7 +42,7 @@ public: Graphic3d_TypeOfShadingModel ShadingModel() const { return myShadingModel; } //! Set if lighting should be disabled or not. - void SetNoLighting() { myShadingModel = Graphic3d_TOSM_UNLIT; } + void SetNoLighting() { myShadingModel = Graphic3d_TypeOfShadingModel_Unlit; } //! Returns textures map. const Handle(OpenGl_TextureSet)& TextureSet (const Handle(OpenGl_Context)& theCtx, diff --git a/src/OpenGl/OpenGl_Context.cxx b/src/OpenGl/OpenGl_Context.cxx index 8bf742ef0a..9dd3afd573 100644 --- a/src/OpenGl/OpenGl_Context.cxx +++ b/src/OpenGl/OpenGl_Context.cxx @@ -2419,7 +2419,7 @@ void OpenGl_Context::SetShadingMaterial (const OpenGl_Aspects* theAspect, anAlphaCutoff = 0.285f; } } - if (theAspect->ShadingModel() == Graphic3d_TOSM_UNLIT) + if (theAspect->ShadingModel() == Graphic3d_TypeOfShadingModel_Unlit) { if (anAlphaCutoff == aMatState.AlphaCutoff()) { @@ -2725,8 +2725,8 @@ void OpenGl_Context::SetShadeModel (Graphic3d_TypeOfShadingModel theModel) #if !defined(GL_ES_VERSION_2_0) if (core11ffp != NULL) { - const Standard_Integer aModel = theModel == Graphic3d_TOSM_FACET - || theModel == Graphic3d_TOSM_PBR_FACET ? GL_FLAT : GL_SMOOTH; + const Standard_Integer aModel = theModel == Graphic3d_TypeOfShadingModel_PhongFacet + || theModel == Graphic3d_TypeOfShadingModel_PbrFacet ? GL_FLAT : GL_SMOOTH; if (myShadeModel == aModel) { return; diff --git a/src/OpenGl/OpenGl_Context.hxx b/src/OpenGl/OpenGl_Context.hxx index 3a5274646d..893047b0f6 100644 --- a/src/OpenGl/OpenGl_Context.hxx +++ b/src/OpenGl/OpenGl_Context.hxx @@ -1051,7 +1051,7 @@ public: //! @name extensions Standard_Boolean hasFboSRGB; //!< sRGB FBO render targets (desktop OpenGL 2.1, OpenGL ES 3.0) Standard_Boolean hasSRGBControl; //!< sRGB write control (any desktop OpenGL, OpenGL ES + GL_EXT_sRGB_write_control extension) Standard_Boolean hasFboRenderMipmap; //!< FBO render target could be non-zero mipmap level of texture - OpenGl_FeatureFlag hasFlatShading; //!< Complex flag indicating support of Flat shading (Graphic3d_TOSM_FACET) (always available on desktop; on OpenGL ES - since 3.0 or as extension GL_OES_standard_derivatives) + OpenGl_FeatureFlag hasFlatShading; //!< Complex flag indicating support of Flat shading (Graphic3d_TypeOfShadingModel_Phong) (always available on desktop; on OpenGL ES - since 3.0 or as extension GL_OES_standard_derivatives) OpenGl_FeatureFlag hasGlslBitwiseOps; //!< GLSL supports bitwise operations; OpenGL 3.0 / OpenGL ES 3.0 (GLSL 130 / GLSL ES 300) or OpenGL 2.1 + GL_EXT_gpu_shader4 OpenGl_FeatureFlag hasDrawBuffers; //!< Complex flag indicating support of multiple draw buffers (desktop OpenGL 2.0, OpenGL ES 3.0, GL_ARB_draw_buffers, GL_EXT_draw_buffers) OpenGl_FeatureFlag hasFloatBuffer; //!< Complex flag indicating support of float color buffer format (desktop OpenGL 3.0, GL_ARB_color_buffer_float, GL_EXT_color_buffer_float) diff --git a/src/OpenGl/OpenGl_FrameStatsPrs.cxx b/src/OpenGl/OpenGl_FrameStatsPrs.cxx index deafb1c0b4..d6891588ef 100644 --- a/src/OpenGl/OpenGl_FrameStatsPrs.cxx +++ b/src/OpenGl/OpenGl_FrameStatsPrs.cxx @@ -413,7 +413,7 @@ void OpenGl_FrameStatsPrs::Render (const Handle(OpenGl_Workspace)& theWorkspace) } aCtx->ApplyModelViewMatrix(); - aCtx->ShaderManager()->BindFaceProgram (Handle(OpenGl_TextureSet)(), Graphic3d_TOSM_UNLIT, + aCtx->ShaderManager()->BindFaceProgram (Handle(OpenGl_TextureSet)(), Graphic3d_TypeOfShadingModel_Unlit, Graphic3d_AlphaMode_Blend, true, false, Handle(OpenGl_ShaderProgram)()); aCtx->SetColor4fv (OpenGl_Vec4 (1.0f, 1.0f, 1.0f, 1.0f)); diff --git a/src/OpenGl/OpenGl_PrimitiveArray.cxx b/src/OpenGl/OpenGl_PrimitiveArray.cxx index 6a75ca8808..b9f12d0992 100644 --- a/src/OpenGl/OpenGl_PrimitiveArray.cxx +++ b/src/OpenGl/OpenGl_PrimitiveArray.cxx @@ -510,7 +510,7 @@ void OpenGl_PrimitiveArray::drawEdges (const Handle(OpenGl_Workspace)& theWorksp if (aGlContext->core20fwd != NULL) { aGlContext->ShaderManager()->BindLineProgram (Handle(OpenGl_TextureSet)(), anAspect->Aspect()->EdgeLineType(), - Graphic3d_TOSM_UNLIT, Graphic3d_AlphaMode_Opaque, Standard_False, + Graphic3d_TypeOfShadingModel_Unlit, Graphic3d_AlphaMode_Opaque, Standard_False, anAspect->ShaderProgramRes (aGlContext)); } aGlContext->SetSampleAlphaToCoverage (aGlContext->ShaderManager()->MaterialState().HasAlphaCutoff()); @@ -935,7 +935,7 @@ void OpenGl_PrimitiveArray::Render (const Handle(OpenGl_Workspace)& theWorkspace updateVBO (aCtx); } - Graphic3d_TypeOfShadingModel aShadingModel = Graphic3d_TOSM_UNLIT; + Graphic3d_TypeOfShadingModel aShadingModel = Graphic3d_TypeOfShadingModel_Unlit; anAspectFace = theWorkspace->ApplyAspects (false); // do not bind textures before binding the program const Handle(OpenGl_TextureSet)& aTextureSet = theWorkspace->TextureSet(); const bool toEnableEnvMap = !aTextureSet.IsNull() diff --git a/src/OpenGl/OpenGl_SetOfShaderPrograms.hxx b/src/OpenGl/OpenGl_SetOfShaderPrograms.hxx index 8d6ab3e083..ef1332cec5 100644 --- a/src/OpenGl/OpenGl_SetOfShaderPrograms.hxx +++ b/src/OpenGl/OpenGl_SetOfShaderPrograms.hxx @@ -69,7 +69,7 @@ public: } protected: - Handle(OpenGl_SetOfPrograms) myPrograms[Graphic3d_TypeOfShadingModel_NB - 1]; //!< programs array, excluding Graphic3d_TOSM_UNLIT + Handle(OpenGl_SetOfPrograms) myPrograms[Graphic3d_TypeOfShadingModel_NB - 1]; //!< programs array, excluding Graphic3d_TypeOfShadingModel_Unlit }; typedef NCollection_DataMap OpenGl_MapOfShaderPrograms; diff --git a/src/OpenGl/OpenGl_ShaderManager.cxx b/src/OpenGl/OpenGl_ShaderManager.cxx index 43315dc2f6..4abc046bfe 100644 --- a/src/OpenGl/OpenGl_ShaderManager.cxx +++ b/src/OpenGl/OpenGl_ShaderManager.cxx @@ -128,7 +128,7 @@ OpenGl_ShaderManager::OpenGl_ShaderManager (OpenGl_Context* theContext) : Graphic3d_ShaderManager (Aspect_GraphicsLibrary_OpenGL), #endif myFfpProgram (new OpenGl_ShaderProgramFFP()), - myShadingModel (Graphic3d_TOSM_VERTEX), + myShadingModel (Graphic3d_TypeOfShadingModel_Gouraud), myUnlitPrograms (new OpenGl_SetOfPrograms()), myContext (theContext), myHasLocalOrigin (Standard_False) @@ -318,7 +318,7 @@ void OpenGl_ShaderManager::UpdateLightSourceState() // ======================================================================= void OpenGl_ShaderManager::SetShadingModel (const Graphic3d_TypeOfShadingModel theModel) { - if (theModel == Graphic3d_TOSM_DEFAULT) + if (theModel == Graphic3d_TypeOfShadingModel_DEFAULT) { throw Standard_ProgramError ("OpenGl_ShaderManager::SetShadingModel() - attempt to set invalid Shading Model!"); } @@ -1055,7 +1055,7 @@ void OpenGl_ShaderManager::PushState (const Handle(OpenGl_ShaderProgram)& thePro { // manage FFP lighting myContext->SetShadeModel (theShadingModel); - if (theShadingModel == Graphic3d_TOSM_UNLIT) + if (theShadingModel == Graphic3d_TypeOfShadingModel_Unlit) { myContext->core11fwd->glDisable (GL_LIGHTING); } @@ -1078,7 +1078,7 @@ Standard_Boolean OpenGl_ShaderManager::BindFontProgram (const Handle(OpenGl_Shad if (!theCustomProgram.IsNull() || myContext->caps->ffpEnable) { - return bindProgramWithState (theCustomProgram, Graphic3d_TOSM_UNLIT); + return bindProgramWithState (theCustomProgram, Graphic3d_TypeOfShadingModel_Unlit); } if (myFontProgram.IsNull()) @@ -1092,7 +1092,7 @@ Standard_Boolean OpenGl_ShaderManager::BindFontProgram (const Handle(OpenGl_Shad } } - return bindProgramWithState (myFontProgram, Graphic3d_TOSM_UNLIT); + return bindProgramWithState (myFontProgram, Graphic3d_TypeOfShadingModel_Unlit); } // ======================================================================= diff --git a/src/OpenGl/OpenGl_ShaderManager.hxx b/src/OpenGl/OpenGl_ShaderManager.hxx index bb4b5717a0..464323e06e 100644 --- a/src/OpenGl/OpenGl_ShaderManager.hxx +++ b/src/OpenGl/OpenGl_ShaderManager.hxx @@ -116,10 +116,10 @@ public: Standard_Boolean theEnableMeshEdges, const Handle(OpenGl_ShaderProgram)& theCustomProgram) { - const Graphic3d_TypeOfShadingModel aShadeModelOnFace = theShadingModel != Graphic3d_TOSM_UNLIT + const Graphic3d_TypeOfShadingModel aShadeModelOnFace = theShadingModel != Graphic3d_TypeOfShadingModel_Unlit && (theTextures.IsNull() || theTextures->IsModulate()) ? theShadingModel - : Graphic3d_TOSM_UNLIT; + : Graphic3d_TypeOfShadingModel_Unlit; if (!theCustomProgram.IsNull() || myContext->caps->ffpEnable) { @@ -183,7 +183,7 @@ public: { prepareStdProgramUnlit (aProgram, aBits, true); } - return bindProgramWithState (aProgram, Graphic3d_TOSM_UNLIT); + return bindProgramWithState (aProgram, Graphic3d_TypeOfShadingModel_Unlit); } //! Bind program for FBO blit operation. @@ -211,7 +211,7 @@ public: { prepareStdProgramBoundBox(); } - return bindProgramWithState (myBoundBoxProgram, Graphic3d_TOSM_UNLIT); + return bindProgramWithState (myBoundBoxProgram, Graphic3d_TypeOfShadingModel_Unlit); } //! Returns bounding box vertex buffer. @@ -241,8 +241,8 @@ public: switch (theShadingModel) { - case Graphic3d_TOSM_PBR: return Graphic3d_TOSM_FRAGMENT; - case Graphic3d_TOSM_PBR_FACET: return Graphic3d_TOSM_FACET; + case Graphic3d_TypeOfShadingModel_Pbr: return Graphic3d_TypeOfShadingModel_Phong; + case Graphic3d_TypeOfShadingModel_PbrFacet: return Graphic3d_TypeOfShadingModel_PhongFacet; default: return theShadingModel; } } @@ -454,7 +454,7 @@ public: //! Pushes current state of OCCT graphics parameters to specified program. Standard_EXPORT void PushState (const Handle(OpenGl_ShaderProgram)& theProgram, - Graphic3d_TypeOfShadingModel theShadingModel = Graphic3d_TOSM_UNLIT) const; + Graphic3d_TypeOfShadingModel theShadingModel = Graphic3d_TypeOfShadingModel_Unlit) const; public: @@ -478,24 +478,24 @@ public: { if (!myContext->ColorMask()) { - return Graphic3d_TOSM_UNLIT; + return Graphic3d_TypeOfShadingModel_Unlit; } - Graphic3d_TypeOfShadingModel aModel = theCustomModel != Graphic3d_TOSM_DEFAULT ? theCustomModel : myShadingModel; + Graphic3d_TypeOfShadingModel aModel = theCustomModel != Graphic3d_TypeOfShadingModel_DEFAULT ? theCustomModel : myShadingModel; switch (aModel) { - case Graphic3d_TOSM_DEFAULT: - case Graphic3d_TOSM_UNLIT: - case Graphic3d_TOSM_FACET: + case Graphic3d_TypeOfShadingModel_DEFAULT: + case Graphic3d_TypeOfShadingModel_Unlit: + case Graphic3d_TypeOfShadingModel_PhongFacet: return aModel; - case Graphic3d_TOSM_VERTEX: - case Graphic3d_TOSM_FRAGMENT: - return theHasNodalNormals ? aModel : Graphic3d_TOSM_FACET; - case Graphic3d_TOSM_PBR: - return PBRShadingModelFallback (theHasNodalNormals ? aModel : Graphic3d_TOSM_PBR_FACET, IsPbrAllowed()); - case Graphic3d_TOSM_PBR_FACET: + case Graphic3d_TypeOfShadingModel_Gouraud: + case Graphic3d_TypeOfShadingModel_Phong: + return theHasNodalNormals ? aModel : Graphic3d_TypeOfShadingModel_PhongFacet; + case Graphic3d_TypeOfShadingModel_Pbr: + return PBRShadingModelFallback (theHasNodalNormals ? aModel : Graphic3d_TypeOfShadingModel_PbrFacet, IsPbrAllowed()); + case Graphic3d_TypeOfShadingModel_PbrFacet: return PBRShadingModelFallback (aModel, IsPbrAllowed()); } - return Graphic3d_TOSM_UNLIT; + return Graphic3d_TypeOfShadingModel_Unlit; } //! Choose Shading Model for line primitives. @@ -506,24 +506,24 @@ public: { if (!myContext->ColorMask()) { - return Graphic3d_TOSM_UNLIT; + return Graphic3d_TypeOfShadingModel_Unlit; } - Graphic3d_TypeOfShadingModel aModel = theCustomModel != Graphic3d_TOSM_DEFAULT ? theCustomModel : myShadingModel; + Graphic3d_TypeOfShadingModel aModel = theCustomModel != Graphic3d_TypeOfShadingModel_DEFAULT ? theCustomModel : myShadingModel; switch (aModel) { - case Graphic3d_TOSM_DEFAULT: - case Graphic3d_TOSM_UNLIT: - case Graphic3d_TOSM_FACET: - return Graphic3d_TOSM_UNLIT; - case Graphic3d_TOSM_VERTEX: - case Graphic3d_TOSM_FRAGMENT: - return theHasNodalNormals ? aModel : Graphic3d_TOSM_UNLIT; - case Graphic3d_TOSM_PBR: - return PBRShadingModelFallback (theHasNodalNormals ? aModel : Graphic3d_TOSM_UNLIT, IsPbrAllowed()); - case Graphic3d_TOSM_PBR_FACET: - return Graphic3d_TOSM_UNLIT; + case Graphic3d_TypeOfShadingModel_DEFAULT: + case Graphic3d_TypeOfShadingModel_Unlit: + case Graphic3d_TypeOfShadingModel_PhongFacet: + return Graphic3d_TypeOfShadingModel_Unlit; + case Graphic3d_TypeOfShadingModel_Gouraud: + case Graphic3d_TypeOfShadingModel_Phong: + return theHasNodalNormals ? aModel : Graphic3d_TypeOfShadingModel_Unlit; + case Graphic3d_TypeOfShadingModel_Pbr: + return PBRShadingModelFallback (theHasNodalNormals ? aModel : Graphic3d_TypeOfShadingModel_Unlit, IsPbrAllowed()); + case Graphic3d_TypeOfShadingModel_PbrFacet: + return Graphic3d_TypeOfShadingModel_Unlit; } - return Graphic3d_TOSM_UNLIT; + return Graphic3d_TypeOfShadingModel_Unlit; } //! Choose Shading Model for Marker primitives. @@ -632,7 +632,7 @@ protected: Handle(OpenGl_ShaderProgram)& getStdProgram (Graphic3d_TypeOfShadingModel theShadingModel, Standard_Integer theBits) { - if (theShadingModel == Graphic3d_TOSM_UNLIT + if (theShadingModel == Graphic3d_TypeOfShadingModel_Unlit || (theBits & Graphic3d_ShaderFlags_HasTextures) == Graphic3d_ShaderFlags_TextureEnv) { // If environment map is enabled lighting calculations are @@ -665,13 +665,13 @@ protected: { switch (theShadingModel) { - case Graphic3d_TOSM_UNLIT: return prepareStdProgramUnlit (theProgram, theBits, false); - case Graphic3d_TOSM_FACET: return prepareStdProgramPhong (theProgram, theBits, true); - case Graphic3d_TOSM_VERTEX: return prepareStdProgramGouraud(theProgram, theBits); - case Graphic3d_TOSM_DEFAULT: - case Graphic3d_TOSM_FRAGMENT: return prepareStdProgramPhong (theProgram, theBits, false); - case Graphic3d_TOSM_PBR: return prepareStdProgramPhong (theProgram, theBits, false, true); - case Graphic3d_TOSM_PBR_FACET: return prepareStdProgramPhong (theProgram, theBits, true, true); + case Graphic3d_TypeOfShadingModel_Unlit: return prepareStdProgramUnlit (theProgram, theBits, false); + case Graphic3d_TypeOfShadingModel_PhongFacet: return prepareStdProgramPhong (theProgram, theBits, true); + case Graphic3d_TypeOfShadingModel_Gouraud: return prepareStdProgramGouraud(theProgram, theBits); + case Graphic3d_TypeOfShadingModel_DEFAULT: + case Graphic3d_TypeOfShadingModel_Phong: return prepareStdProgramPhong (theProgram, theBits, false); + case Graphic3d_TypeOfShadingModel_Pbr: return prepareStdProgramPhong (theProgram, theBits, false, true); + case Graphic3d_TypeOfShadingModel_PbrFacet: return prepareStdProgramPhong (theProgram, theBits, true, true); } return false; } @@ -702,8 +702,8 @@ protected: Standard_EXPORT Standard_Boolean preparePBREnvBakingProgram (Standard_Integer theIndex); //! Checks whether one of PBR shading models is set as default model. - Standard_Boolean IsPbrAllowed() const { return myShadingModel == Graphic3d_TOSM_PBR - || myShadingModel == Graphic3d_TOSM_PBR_FACET; } + Standard_Boolean IsPbrAllowed() const { return myShadingModel == Graphic3d_TypeOfShadingModel_Pbr + || myShadingModel == Graphic3d_TypeOfShadingModel_PbrFacet; } protected: diff --git a/src/OpenGl/OpenGl_Structure.cxx b/src/OpenGl/OpenGl_Structure.cxx index 0134e2f368..722df45c7d 100644 --- a/src/OpenGl/OpenGl_Structure.cxx +++ b/src/OpenGl/OpenGl_Structure.cxx @@ -86,7 +86,7 @@ void OpenGl_Structure::renderBoundingBox (const Handle(OpenGl_Workspace)& theWor OpenGl_Vec3 (aMin.x(), aMin.y(), aMax.z()) }; - aCtx->ShaderManager()->BindLineProgram (Handle(OpenGl_TextureSet)(), Aspect_TOL_SOLID, Graphic3d_TOSM_UNLIT, Graphic3d_AlphaMode_Opaque, false, Handle(OpenGl_ShaderProgram)()); + aCtx->ShaderManager()->BindLineProgram (Handle(OpenGl_TextureSet)(), Aspect_TOL_SOLID, Graphic3d_TypeOfShadingModel_Unlit, Graphic3d_AlphaMode_Opaque, false, Handle(OpenGl_ShaderProgram)()); aCtx->SetColor4fv (theWorkspace->InteriorColor()); aCtx->core11fwd->glDisable (GL_LIGHTING); aCtx->core11ffp->glEnableClientState (GL_VERTEX_ARRAY); diff --git a/src/OpenGl/OpenGl_Text.cxx b/src/OpenGl/OpenGl_Text.cxx index 5fa52b6568..05c36af339 100644 --- a/src/OpenGl/OpenGl_Text.cxx +++ b/src/OpenGl/OpenGl_Text.cxx @@ -640,7 +640,7 @@ void OpenGl_Text::drawRect (const Handle(OpenGl_Context)& theCtx, } // bind unlit program - theCtx->ShaderManager()->BindFaceProgram (Handle(OpenGl_TextureSet)(), Graphic3d_TOSM_UNLIT, + theCtx->ShaderManager()->BindFaceProgram (Handle(OpenGl_TextureSet)(), Graphic3d_TypeOfShadingModel_Unlit, Graphic3d_AlphaMode_Opaque, Standard_False, Standard_False, Handle(OpenGl_ShaderProgram)()); diff --git a/src/OpenGl/OpenGl_View.cxx b/src/OpenGl/OpenGl_View.cxx index bc45b81c19..0fd648c30c 100644 --- a/src/OpenGl/OpenGl_View.cxx +++ b/src/OpenGl/OpenGl_View.cxx @@ -572,7 +572,7 @@ void OpenGl_View::SetBackgroundImage (const Handle(Graphic3d_TextureMap)& theTex Handle(Graphic3d_TextureSet) aTextureSet = new Graphic3d_TextureSet (theTextureMap); anAspect->SetInteriorStyle (Aspect_IS_SOLID); anAspect->SetFaceCulling (Graphic3d_TypeOfBackfacingModel_DoubleSided); - anAspect->SetShadingModel (Graphic3d_TOSM_UNLIT); + anAspect->SetShadingModel (Graphic3d_TypeOfShadingModel_Unlit); anAspect->SetTextureSet (aTextureSet); anAspect->SetTextureMapOn (true); @@ -1193,8 +1193,8 @@ bool OpenGl_View::prepareFrameBuffers (Graphic3d_Camera::Projection& theProj) } // process PBR environment - if (myRenderParams.ShadingModel == Graphic3d_TOSM_PBR - || myRenderParams.ShadingModel == Graphic3d_TOSM_PBR_FACET) + if (myRenderParams.ShadingModel == Graphic3d_TypeOfShadingModel_Pbr + || myRenderParams.ShadingModel == Graphic3d_TypeOfShadingModel_PbrFacet) { if (!myPBREnvironment.IsNull() && myPBREnvironment->SizesAreDifferent (myRenderParams.PbrEnvPow2Size, @@ -1424,7 +1424,7 @@ bool OpenGl_View::prepareFrameBuffers (Graphic3d_Camera::Projection& theProj) } // allocate shadow maps - const Handle(Graphic3d_LightSet)& aLights = myRenderParams.ShadingModel == Graphic3d_TOSM_UNLIT ? myNoShadingLight : myLights; + const Handle(Graphic3d_LightSet)& aLights = myRenderParams.ShadingModel == Graphic3d_TypeOfShadingModel_Unlit ? myNoShadingLight : myLights; if (!aLights.IsNull()) { aLights->UpdateRevision(); @@ -2094,7 +2094,7 @@ void OpenGl_View::renderShadowMap (const Handle(OpenGl_ShadowMap)& theShadowMap) aCtx->ShaderManager()->UpdateMaterialState(); aCtx->ShaderManager()->UpdateModelWorldStateTo (OpenGl_Mat4()); - aCtx->ShaderManager()->SetShadingModel (Graphic3d_TOSM_UNLIT); + aCtx->ShaderManager()->SetShadingModel (Graphic3d_TypeOfShadingModel_Unlit); const Handle(OpenGl_FrameBuffer)& aShadowBuffer = theShadowMap->FrameBuffer(); aShadowBuffer->BindBuffer (aCtx); @@ -2162,7 +2162,7 @@ void OpenGl_View::render (Graphic3d_Camera::Projection theProjection, myBVHSelector.CacheClipPtsProjections(); const Handle(OpenGl_ShaderManager)& aManager = aContext->ShaderManager(); - const Handle(Graphic3d_LightSet)& aLights = myRenderParams.ShadingModel == Graphic3d_TOSM_UNLIT ? myNoShadingLight : myLights; + const Handle(Graphic3d_LightSet)& aLights = myRenderParams.ShadingModel == Graphic3d_TypeOfShadingModel_Unlit ? myNoShadingLight : myLights; Standard_Size aLightsRevision = 0; if (!aLights.IsNull()) { diff --git a/src/OpenGl/OpenGl_View_Raytrace.cxx b/src/OpenGl/OpenGl_View_Raytrace.cxx index c1e4f48f0a..6088506e74 100644 --- a/src/OpenGl/OpenGl_View_Raytrace.cxx +++ b/src/OpenGl/OpenGl_View_Raytrace.cxx @@ -2429,7 +2429,7 @@ Standard_Boolean OpenGl_View::updateRaytraceLightSources (const OpenGl_Mat4& the { std::vector aLightSources; Graphic3d_Vec4 aNewAmbient (0.0f); - if (myRenderParams.ShadingModel != Graphic3d_TOSM_UNLIT + if (myRenderParams.ShadingModel != Graphic3d_TypeOfShadingModel_Unlit && !myLights.IsNull()) { aNewAmbient.SetValues (myLights->AmbientColor().rgb(), 0.0f); diff --git a/src/OpenGl/OpenGl_Workspace.cxx b/src/OpenGl/OpenGl_Workspace.cxx index ed5b8a3f52..8b927eb652 100644 --- a/src/OpenGl/OpenGl_Workspace.cxx +++ b/src/OpenGl/OpenGl_Workspace.cxx @@ -323,7 +323,7 @@ const OpenGl_Aspects* OpenGl_Workspace::ApplyAspects (bool theToBindTextures) { // copy all values including line edge aspect *myAspectFaceHl.Aspect() = *myAspectsSet->Aspect(); - myAspectFaceHl.Aspect()->SetShadingModel (Graphic3d_TOSM_UNLIT); + myAspectFaceHl.Aspect()->SetShadingModel (Graphic3d_TypeOfShadingModel_Unlit); myAspectFaceHl.Aspect()->SetInteriorColor (myView->BackgroundColor().GetRGB()); myAspectFaceHl.Aspect()->SetDistinguish (false); myAspectFaceHl.SetNoLighting(); @@ -340,8 +340,8 @@ const OpenGl_Aspects* OpenGl_Workspace::ApplyAspects (bool theToBindTextures) myGlContext->BindTextures (aTextureSet, Handle(OpenGl_ShaderProgram)()); } - if ((myView->ShadingModel() == Graphic3d_TOSM_PBR - || myView->ShadingModel() == Graphic3d_TOSM_PBR_FACET) + if ((myView->ShadingModel() == Graphic3d_TypeOfShadingModel_Pbr + || myView->ShadingModel() == Graphic3d_TypeOfShadingModel_PbrFacet) && !myView->myPBREnvironment.IsNull() && myView->myPBREnvironment->IsNeededToBeBound()) { diff --git a/src/OpenGlTest/OpenGlTest_Commands.cxx b/src/OpenGlTest/OpenGlTest_Commands.cxx index 7636ee6959..792ee68113 100644 --- a/src/OpenGlTest/OpenGlTest_Commands.cxx +++ b/src/OpenGlTest/OpenGlTest_Commands.cxx @@ -183,7 +183,7 @@ void VUserDrawObj::Render(const Handle(OpenGl_Workspace)& theWorkspace) const OpenGl_Vec4 aColor = theWorkspace->InteriorColor(); aCtx->ShaderManager()->BindLineProgram (Handle(OpenGl_TextureSet)(), Aspect_TOL_SOLID, - Graphic3d_TOSM_UNLIT, Graphic3d_AlphaMode_Opaque, false, + Graphic3d_TypeOfShadingModel_Unlit, Graphic3d_AlphaMode_Opaque, false, Handle(OpenGl_ShaderProgram)()); aCtx->SetColor4fv (aColor); diff --git a/src/PrsDim/PrsDim_Dimension.cxx b/src/PrsDim/PrsDim_Dimension.cxx index 7526eecbf4..225bf1e109 100644 --- a/src/PrsDim/PrsDim_Dimension.cxx +++ b/src/PrsDim/PrsDim_Dimension.cxx @@ -396,7 +396,7 @@ void PrsDim_Dimension::DrawArrow (const Handle(Prs3d_Presentation)& thePresentat Handle(Graphic3d_AspectFillArea3d) aShadingStyle = new Graphic3d_AspectFillArea3d(); aShadingStyle->SetInteriorStyle (Aspect_IS_SOLID); aShadingStyle->SetColor (myDrawer->DimensionAspect()->ArrowAspect()->Aspect()->Color()); - aShadingStyle->SetShadingModel (Graphic3d_TOSM_UNLIT); + aShadingStyle->SetShadingModel (Graphic3d_TypeOfShadingModel_Unlit); aShadingStyle->SetPolygonOffset (aPolOffset); aGroup->SetPrimitivesAspect (aShadingStyle); diff --git a/src/QABugs/QABugs_1.cxx b/src/QABugs/QABugs_1.cxx index 7890b3c807..670bb8e401 100644 --- a/src/QABugs/QABugs_1.cxx +++ b/src/QABugs/QABugs_1.cxx @@ -506,7 +506,7 @@ static Standard_Integer OCC30182 (Draw_Interpretor& , Standard_Integer theNbArgs aPrs->SetDisplayMode (AIS_Shaded); aPrs->Attributes()->SetupOwnShadingAspect(); const Handle(Graphic3d_AspectFillArea3d)& anAspect = aPrs->Attributes()->ShadingAspect()->Aspect(); - anAspect->SetShadingModel (Graphic3d_TOSM_UNLIT); + anAspect->SetShadingModel (Graphic3d_TypeOfShadingModel_Unlit); anAspect->SetTextureMapOn (true); anAspect->SetTextureMap (new Graphic3d_Texture2Dmanual (anImage)); if (anImage->IsTopDown()) diff --git a/src/V3d/V3d_View.hxx b/src/V3d/V3d_View.hxx index 738a38e291..22beabcc7e 100644 --- a/src/V3d/V3d_View.hxx +++ b/src/V3d/V3d_View.hxx @@ -688,7 +688,7 @@ public: //! the visual axis measured from the Y axis of the screen. Standard_EXPORT Standard_Real Twist() const; - //! Returns the current shading model; Graphic3d_TOSM_FRAGMENT by default. + //! Returns the current shading model; Graphic3d_TypeOfShadingModel_Phong by default. Standard_EXPORT Graphic3d_TypeOfShadingModel ShadingModel() const; //! Defines the shading model for the visualization. diff --git a/src/V3d/V3d_Viewer.hxx b/src/V3d/V3d_Viewer.hxx index 898782d775..2e368f82db 100644 --- a/src/V3d/V3d_Viewer.hxx +++ b/src/V3d/V3d_Viewer.hxx @@ -153,7 +153,7 @@ public: //! Gives the default visualization mode. void SetDefaultVisualization (const V3d_TypeOfVisualization theType) { myVisualization = theType; } - //! Returns the default type of Shading; Graphic3d_TOSM_FRAGMENT by default. + //! Returns the default type of Shading; Graphic3d_TypeOfShadingModel_Phong by default. Graphic3d_TypeOfShadingModel DefaultShadingModel() const { return myDefaultRenderingParams.ShadingModel; } //! Gives the default type of SHADING. diff --git a/src/ViewerTest/ViewerTest.cxx b/src/ViewerTest/ViewerTest.cxx index c19ba0bab1..8331608257 100644 --- a/src/ViewerTest/ViewerTest.cxx +++ b/src/ViewerTest/ViewerTest.cxx @@ -340,43 +340,43 @@ Standard_Boolean ViewerTest::ParseShadingModel (Standard_CString th || aTypeStr == "color" || aTypeStr == "none") { - theModel = Graphic3d_TOSM_UNLIT; + theModel = Graphic3d_TypeOfShadingModel_Unlit; } else if (aTypeStr == "flat" || aTypeStr == "facet") { - theModel = Graphic3d_TOSM_FACET; + theModel = Graphic3d_TypeOfShadingModel_PhongFacet; } else if (aTypeStr == "gouraud" || aTypeStr == "vertex" || aTypeStr == "vert") { - theModel = Graphic3d_TOSM_VERTEX; + theModel = Graphic3d_TypeOfShadingModel_Gouraud; } else if (aTypeStr == "phong" || aTypeStr == "fragment" || aTypeStr == "frag" || aTypeStr == "pixel") { - theModel = Graphic3d_TOSM_FRAGMENT; + theModel = Graphic3d_TypeOfShadingModel_Phong; } else if (aTypeStr == "pbr") { - theModel = Graphic3d_TOSM_PBR; + theModel = Graphic3d_TypeOfShadingModel_Pbr; } else if (aTypeStr == "pbr_facet") { - theModel = Graphic3d_TOSM_PBR_FACET; + theModel = Graphic3d_TypeOfShadingModel_PbrFacet; } else if (aTypeStr == "default" || aTypeStr == "def") { - theModel = Graphic3d_TOSM_DEFAULT; + theModel = Graphic3d_TypeOfShadingModel_DEFAULT; } else if (aTypeStr.IsIntegerValue()) { const int aTypeInt = aTypeStr.IntegerValue(); - if (aTypeInt <= Graphic3d_TOSM_DEFAULT || aTypeInt >= Graphic3d_TypeOfShadingModel_NB) + if (aTypeInt <= Graphic3d_TypeOfShadingModel_DEFAULT || aTypeInt >= Graphic3d_TypeOfShadingModel_NB) { return Standard_False; } @@ -1815,7 +1815,7 @@ struct ViewerTest_AspectsChangeSet ToSetHatch (0), StdHatchStyle (-1), ToSetShadingModel (0), - ShadingModel (Graphic3d_TOSM_DEFAULT), + ShadingModel (Graphic3d_TypeOfShadingModel_DEFAULT), ToSetInterior (0), InteriorStyle (Aspect_IS_SOLID), ToSetDrawSilhouette (0), @@ -1909,7 +1909,7 @@ struct ViewerTest_AspectsChangeSet isOk = Standard_False; } if (ToSetShadingModel == 1 - && (ShadingModel < Graphic3d_TOSM_DEFAULT || ShadingModel > Graphic3d_TOSM_PBR_FACET)) + && (ShadingModel < Graphic3d_TypeOfShadingModel_DEFAULT || ShadingModel > Graphic3d_TypeOfShadingModel_PbrFacet)) { Message::SendFail() << "Error: unknown shading model " << ShadingModelName << "."; isOk = Standard_False; @@ -3114,7 +3114,7 @@ static Standard_Integer VAspects (Draw_Interpretor& theDI, else if (anArg == "-unsetshadingmodel") { aChangeSet->ToSetShadingModel = -1; - aChangeSet->ShadingModel = Graphic3d_TOSM_DEFAULT; + aChangeSet->ShadingModel = Graphic3d_TypeOfShadingModel_DEFAULT; } else if (anArg == "-setinterior" || anArg == "-setinteriorstyle" @@ -3243,7 +3243,7 @@ static Standard_Integer VAspects (Draw_Interpretor& theDI, aChangeSet->StdHatchStyle = -1; aChangeSet->PathToHatchPattern.Clear(); aChangeSet->ToSetShadingModel = -1; - aChangeSet->ShadingModel = Graphic3d_TOSM_DEFAULT; + aChangeSet->ShadingModel = Graphic3d_TypeOfShadingModel_DEFAULT; aChangeSet->ToSetInterior = -1; aChangeSet->InteriorStyle = Aspect_IS_SOLID; aChangeSet->ToSetDrawSilhouette = -1; diff --git a/src/ViewerTest/ViewerTest_ViewerCommands.cxx b/src/ViewerTest/ViewerTest_ViewerCommands.cxx index 3caf99b262..b225df725f 100644 --- a/src/ViewerTest/ViewerTest_ViewerCommands.cxx +++ b/src/ViewerTest/ViewerTest_ViewerCommands.cxx @@ -11333,13 +11333,13 @@ static Standard_Integer VRenderParams (Draw_Interpretor& theDI, theDI << "shadingModel: "; switch (aView->ShadingModel()) { - case Graphic3d_TOSM_DEFAULT: theDI << "default"; break; - case Graphic3d_TOSM_UNLIT: theDI << "unlit"; break; - case Graphic3d_TOSM_FACET: theDI << "flat"; break; - case Graphic3d_TOSM_VERTEX: theDI << "gouraud"; break; - case Graphic3d_TOSM_FRAGMENT: theDI << "phong"; break; - case Graphic3d_TOSM_PBR: theDI << "pbr"; break; - case Graphic3d_TOSM_PBR_FACET: theDI << "pbr_facet"; break; + case Graphic3d_TypeOfShadingModel_DEFAULT: theDI << "default"; break; + case Graphic3d_TypeOfShadingModel_Unlit: theDI << "unlit"; break; + case Graphic3d_TypeOfShadingModel_PhongFacet: theDI << "flat"; break; + case Graphic3d_TypeOfShadingModel_Gouraud: theDI << "gouraud"; break; + case Graphic3d_TypeOfShadingModel_Phong: theDI << "phong"; break; + case Graphic3d_TypeOfShadingModel_Pbr: theDI << "pbr"; break; + case Graphic3d_TypeOfShadingModel_PbrFacet: theDI << "pbr_facet"; break; } theDI << "\n"; { @@ -12130,13 +12130,13 @@ static Standard_Integer VRenderParams (Draw_Interpretor& theDI, { switch (aView->ShadingModel()) { - case Graphic3d_TOSM_DEFAULT: theDI << "default"; break; - case Graphic3d_TOSM_UNLIT: theDI << "unlit "; break; - case Graphic3d_TOSM_FACET: theDI << "flat "; break; - case Graphic3d_TOSM_VERTEX: theDI << "gouraud "; break; - case Graphic3d_TOSM_FRAGMENT: theDI << "phong "; break; - case Graphic3d_TOSM_PBR: theDI << "pbr"; break; - case Graphic3d_TOSM_PBR_FACET: theDI << "pbr_facet"; break; + case Graphic3d_TypeOfShadingModel_DEFAULT: theDI << "default"; break; + case Graphic3d_TypeOfShadingModel_Unlit: theDI << "unlit "; break; + case Graphic3d_TypeOfShadingModel_PhongFacet: theDI << "flat "; break; + case Graphic3d_TypeOfShadingModel_Gouraud: theDI << "gouraud "; break; + case Graphic3d_TypeOfShadingModel_Phong: theDI << "phong "; break; + case Graphic3d_TypeOfShadingModel_Pbr: theDI << "pbr"; break; + case Graphic3d_TypeOfShadingModel_PbrFacet: theDI << "pbr_facet"; break; } continue; } @@ -12146,9 +12146,9 @@ static Standard_Integer VRenderParams (Draw_Interpretor& theDI, Message::SendFail() << "Syntax error at argument '" << anArg << "'"; } - Graphic3d_TypeOfShadingModel aModel = Graphic3d_TOSM_DEFAULT; + Graphic3d_TypeOfShadingModel aModel = Graphic3d_TypeOfShadingModel_DEFAULT; if (ViewerTest::ParseShadingModel (theArgVec[anArgIter], aModel) - && aModel != Graphic3d_TOSM_DEFAULT) + && aModel != Graphic3d_TypeOfShadingModel_DEFAULT) { aView->SetShadingModel (aModel); } From 7c6fecf9a8009d9da9d2ec5f545ace1f9b38fac7 Mon Sep 17 00:00:00 2001 From: akaftasev Date: Thu, 18 Mar 2021 19:44:11 +0300 Subject: [PATCH 059/639] 0032330: Modeling Algorithms - Extend Offset algorithm with Progress Indicator and User Break Add progress indicator to BRepOffset_MakeOffset::MakeOffsetShape(). --- src/BRepOffset/BRepOffset_Analyse.cxx | 42 +- src/BRepOffset/BRepOffset_Analyse.hxx | 8 +- src/BRepOffset/BRepOffset_Error.hxx | 3 +- src/BRepOffset/BRepOffset_Inter2d.cxx | 37 +- src/BRepOffset/BRepOffset_Inter2d.hxx | 10 +- src/BRepOffset/BRepOffset_Inter3d.cxx | 131 +++-- src/BRepOffset/BRepOffset_Inter3d.hxx | 124 +++-- src/BRepOffset/BRepOffset_MakeLoops.cxx | 115 +++-- src/BRepOffset/BRepOffset_MakeLoops.hxx | 11 +- src/BRepOffset/BRepOffset_MakeOffset.cxx | 483 +++++++++++++++--- src/BRepOffset/BRepOffset_MakeOffset.hxx | 50 +- src/BRepOffset/BRepOffset_MakeOffset_1.cxx | 372 ++++++++++---- .../BRepOffsetAPI_MakeOffsetShape.cxx | 5 +- .../BRepOffsetAPI_MakeOffsetShape.hxx | 3 +- .../BRepOffsetAPI_MakeThickSolid.cxx | 7 +- .../BRepOffsetAPI_MakeThickSolid.hxx | 3 +- src/BRepTest/BRepTest_FeatureCommands.cxx | 15 +- src/BRepTest/BRepTest_OtherCommands.cxx | 7 +- src/BiTgte/BiTgte_Blend.cxx | 18 +- tests/bugs/modalg_7/bug32330 | 47 ++ 20 files changed, 1084 insertions(+), 407 deletions(-) create mode 100644 tests/bugs/modalg_7/bug32330 diff --git a/src/BRepOffset/BRepOffset_Analyse.cxx b/src/BRepOffset/BRepOffset_Analyse.cxx index 20bfba9a86..8247b362af 100644 --- a/src/BRepOffset/BRepOffset_Analyse.cxx +++ b/src/BRepOffset/BRepOffset_Analyse.cxx @@ -140,7 +140,8 @@ static void BuildAncestors (const TopoDS_Shape& S, //purpose : //======================================================================= void BRepOffset_Analyse::Perform (const TopoDS_Shape& S, - const Standard_Real Angle) + const Standard_Real Angle, + const Message_ProgressRange& theRange) { myShape = S; myNewFaces .Clear(); @@ -155,9 +156,14 @@ void BRepOffset_Analyse::Perform (const TopoDS_Shape& S, BuildAncestors (S,myAncestors); TopTools_ListOfShape aLETang; - TopExp_Explorer Exp(S.Oriented(TopAbs_FORWARD),TopAbs_EDGE); - for ( ; Exp.More(); Exp.Next()) { + Message_ProgressScope aPSOuter(theRange, NULL, 2); + Message_ProgressScope aPS(aPSOuter.Next(), "Performing edges analysis", 1, Standard_True); + for ( ; Exp.More(); Exp.Next(), aPS.Next()) { + if (!aPS.More()) + { + return; + } const TopoDS_Edge& E = TopoDS::Edge(Exp.Current()); if (!myMapEdgeType.IsBound(E)) { BRepOffset_ListOfInterval LI; @@ -196,7 +202,11 @@ void BRepOffset_Analyse::Perform (const TopoDS_Shape& S, } } - TreatTangentFaces (aLETang); + TreatTangentFaces (aLETang, aPSOuter.Next()); + if (!aPSOuter.More()) + { + return; + } myDone = Standard_True; } @@ -204,7 +214,7 @@ void BRepOffset_Analyse::Perform (const TopoDS_Shape& S, //function : Generated //purpose : //======================================================================= -void BRepOffset_Analyse::TreatTangentFaces (const TopTools_ListOfShape& theLE) +void BRepOffset_Analyse::TreatTangentFaces (const TopTools_ListOfShape& theLE, const Message_ProgressRange& theRange) { if (theLE.IsEmpty() || myFaceOffsetMap.IsEmpty()) { @@ -221,8 +231,14 @@ void BRepOffset_Analyse::TreatTangentFaces (const TopTools_ListOfShape& theLE) // Bind vertices of the tangent edges with connected edges // of the face with smaller offset value TopTools_DataMapOfShapeShape aDMVEMin; - for (TopTools_ListOfShape::Iterator it (theLE); it.More(); it.Next()) + Message_ProgressScope aPSOuter(theRange, NULL, 3); + Message_ProgressScope aPS1(aPSOuter.Next(), "Binding vertices with connected edges", theLE.Size()); + for (TopTools_ListOfShape::Iterator it (theLE); it.More(); it.Next(), aPS1.Next()) { + if (!aPS1.More()) + { + return; + } const TopoDS_Shape& aE = it.Value(); const TopTools_ListOfShape& aLA = Ancestors (aE); @@ -266,8 +282,13 @@ void BRepOffset_Analyse::TreatTangentFaces (const TopTools_ListOfShape& theLE) // Create map of Face ancestors for the vertices on tangent edges TopTools_DataMapOfShapeListOfShape aDMVFAnc; - for (TopTools_ListOfShape::Iterator itE (theLE); itE.More(); itE.Next()) + Message_ProgressScope aPS2(aPSOuter.Next(), "Creating map of Face ancestors", theLE.Size()); + for (TopTools_ListOfShape::Iterator itE (theLE); itE.More(); itE.Next(), aPS2.Next()) { + if (!aPS2.More()) + { + return; + } const TopoDS_Shape& aE = itE.Value(); if (!anEdgeOffsetMap.IsBound (aE)) continue; @@ -315,8 +336,13 @@ void BRepOffset_Analyse::TreatTangentFaces (const TopTools_ListOfShape& theLE) BOPTools_AlgoTools::MakeConnexityBlocks (aCETangent, TopAbs_VERTEX, TopAbs_EDGE, aLCB, aMVEMap); // Analyze each block to find co-planar edges - for (TopTools_ListOfListOfShape::Iterator itLCB (aLCB); itLCB.More(); itLCB.Next()) + Message_ProgressScope aPS3(aPSOuter.Next(), "Analyzing blocks to find co-planar edges", aLCB.Size()); + for (TopTools_ListOfListOfShape::Iterator itLCB (aLCB); itLCB.More(); itLCB.Next(), aPS3.Next()) { + if (!aPS3.More()) + { + return; + } const TopTools_ListOfShape& aCB = itLCB.Value(); TopTools_MapOfShape aMFence; diff --git a/src/BRepOffset/BRepOffset_Analyse.hxx b/src/BRepOffset/BRepOffset_Analyse.hxx index 51e319d251..3c079c6114 100644 --- a/src/BRepOffset/BRepOffset_Analyse.hxx +++ b/src/BRepOffset/BRepOffset_Analyse.hxx @@ -33,6 +33,9 @@ #include #include #include + +#include + class TopoDS_Shape; class TopoDS_Edge; class TopoDS_Vertex; @@ -59,7 +62,8 @@ public: //! @name Performing analysis //! Performs the analysis Standard_EXPORT void Perform (const TopoDS_Shape& theS, - const Standard_Real theAngle); + const Standard_Real theAngle, + const Message_ProgressRange& theRange = Message_ProgressRange()); public: //! @name Results @@ -171,7 +175,7 @@ private: //! @name Treatment of tangential cases //! Treatment of the tangential cases. //! @param theEdges List of edges connecting tangent faces - Standard_EXPORT void TreatTangentFaces (const TopTools_ListOfShape& theEdges); + Standard_EXPORT void TreatTangentFaces (const TopTools_ListOfShape& theEdges, const Message_ProgressRange& theRange); private: //! @name Fields diff --git a/src/BRepOffset/BRepOffset_Error.hxx b/src/BRepOffset/BRepOffset_Error.hxx index c809f4a983..e5dda91fdb 100644 --- a/src/BRepOffset/BRepOffset_Error.hxx +++ b/src/BRepOffset/BRepOffset_Error.hxx @@ -28,7 +28,8 @@ enum BRepOffset_Error BRepOffset_NotConnectedShell, BRepOffset_CannotTrimEdges, //!< exception while trim edges BRepOffset_CannotFuseVertices, //!< exception while fuse vertices - BRepOffset_CannotExtentEdge //!< exception while extent edges + BRepOffset_CannotExtentEdge, //!< exception while extent edges + BRepOffset_UserBreak //!< user break }; #endif // _BRepOffset_Error_HeaderFile diff --git a/src/BRepOffset/BRepOffset_Inter2d.cxx b/src/BRepOffset/BRepOffset_Inter2d.cxx index 1af28492a8..f59ca2b58d 100644 --- a/src/BRepOffset/BRepOffset_Inter2d.cxx +++ b/src/BRepOffset/BRepOffset_Inter2d.cxx @@ -1572,7 +1572,8 @@ void BRepOffset_Inter2d::Compute (const Handle(BRepAlgo_AsDes)& AsDes, const TopTools_IndexedMapOfShape& NewEdges, const Standard_Real Tol, const TopTools_DataMapOfShapeListOfShape& theEdgeIntEdges, - TopTools_IndexedDataMapOfShapeListOfShape& theDMVV) + TopTools_IndexedDataMapOfShapeListOfShape& theDMVV, + const Message_ProgressRange& theRange) { #ifdef DRAW NbF2d++; @@ -1600,7 +1601,12 @@ void BRepOffset_Inter2d::Compute (const Handle(BRepAlgo_AsDes)& AsDes, Standard_Integer j, i = 1; BRepAdaptor_Surface BAsurf(F); // - for ( it1LE.Initialize(LE) ; it1LE.More(); it1LE.Next()) { + Message_ProgressScope aPS(theRange, "Intersecting edges on faces", LE.Size()); + for ( it1LE.Initialize(LE) ; it1LE.More(); it1LE.Next(), aPS.Next()) { + if (!aPS.More()) + { + return; + } const TopoDS_Edge& E1 = TopoDS::Edge(it1LE.Value()); j = 1; it2LE.Initialize(LE); @@ -1670,18 +1676,23 @@ Standard_Boolean BRepOffset_Inter2d::ConnexIntByInt TopTools_IndexedMapOfShape& FacesWithVerts, BRepAlgo_Image& theImageVV, TopTools_DataMapOfShapeListOfShape& theEdgeIntEdges, - TopTools_IndexedDataMapOfShapeListOfShape& theDMVV) + TopTools_IndexedDataMapOfShapeListOfShape& theDMVV, + const Message_ProgressRange& theRange) { TopTools_DataMapOfShapeListOfShape MVE; BRepOffset_Tool::MapVertexEdges(FI,MVE); - + Message_ProgressScope aPS(theRange, "Intersecting edges obtained as intersection of faces", 1, Standard_True); //--------------------- // Extension of edges. //--------------------- TopoDS_Edge NE; TopTools_DataMapIteratorOfDataMapOfShapeListOfShape it(MVE); for ( ; it.More(); it.Next()) { + if (!aPS.More()) + { + return Standard_False; + } const TopTools_ListOfShape& L = it.Value(); Standard_Boolean YaBuild = 0; TopTools_ListIteratorOfListOfShape itL(L); @@ -1712,9 +1723,13 @@ Standard_Boolean BRepOffset_Inter2d::ConnexIntByInt if (MES.IsBound(FIO)) FIO = TopoDS::Face(MES(FIO)); // BRepAdaptor_Surface BAsurf(FIO); - + TopExp_Explorer exp(FI.Oriented(TopAbs_FORWARD),TopAbs_WIRE); - for (; exp.More(); exp.Next()) { + for (; exp.More(); exp.Next(), aPS.Next()) { + if (!aPS.More()) + { + return Standard_False; + } const TopoDS_Wire& W = TopoDS::Wire(exp.Current()); BRepTools_WireExplorer wexp; Standard_Boolean end = Standard_False ; @@ -1871,7 +1886,8 @@ void BRepOffset_Inter2d::ConnexIntByIntInVert const Handle(BRepAlgo_AsDes)& AsDes2d, const Standard_Real Tol, const BRepOffset_Analyse& Analyse, - TopTools_IndexedDataMapOfShapeListOfShape& theDMVV) + TopTools_IndexedDataMapOfShapeListOfShape& theDMVV, + const Message_ProgressRange& theRange) { TopoDS_Face FIO = TopoDS::Face(OFI.Face()); if (MES.IsBound(FIO)) FIO = TopoDS::Face(MES(FIO)); @@ -1886,8 +1902,13 @@ void BRepOffset_Inter2d::ConnexIntByIntInVert // BRepAdaptor_Surface BAsurf(FIO); // + Message_ProgressScope aPS(theRange, "Intersecting edges created from vertices", 1, Standard_True); TopExp_Explorer exp(FI.Oriented(TopAbs_FORWARD),TopAbs_WIRE); - for (; exp.More(); exp.Next()) { + for (; exp.More(); exp.Next(), aPS.Next()) { + if (!aPS.More()) + { + return; + } const TopoDS_Wire& W = TopoDS::Wire(exp.Current()); // BRepTools_WireExplorer wexp; diff --git a/src/BRepOffset/BRepOffset_Inter2d.hxx b/src/BRepOffset/BRepOffset_Inter2d.hxx index 850a674c20..a2b04fb6af 100644 --- a/src/BRepOffset/BRepOffset_Inter2d.hxx +++ b/src/BRepOffset/BRepOffset_Inter2d.hxx @@ -21,6 +21,7 @@ #include #include #include +#include class BRepAlgo_AsDes; class BRepAlgo_Image; @@ -49,7 +50,8 @@ public: const TopTools_IndexedMapOfShape& NewEdges, const Standard_Real Tol, const TopTools_DataMapOfShapeListOfShape& theEdgeIntEdges, - TopTools_IndexedDataMapOfShapeListOfShape& theDMVV); + TopTools_IndexedDataMapOfShapeListOfShape& theDMVV, + const Message_ProgressRange& theRange); //! Computes the intersection between the offset edges of the . //! All intersection vertices will be stored in AsDes2d. @@ -68,7 +70,8 @@ public: TopTools_IndexedMapOfShape& FacesWithVerts, BRepAlgo_Image& theImageVV, TopTools_DataMapOfShapeListOfShape& theEdgeIntEdges, - TopTools_IndexedDataMapOfShapeListOfShape& theDMVV); + TopTools_IndexedDataMapOfShapeListOfShape& theDMVV, + const Message_ProgressRange& theRange); //! Computes the intersection between the offset edges generated //! from vertices and stored into AsDes as descendants of the . @@ -84,7 +87,8 @@ public: const Handle(BRepAlgo_AsDes)& AsDes2d, const Standard_Real Tol, const BRepOffset_Analyse& Analyse, - TopTools_IndexedDataMapOfShapeListOfShape& theDMVV); + TopTools_IndexedDataMapOfShapeListOfShape& theDMVV, + const Message_ProgressRange& theRange); //! Fuses the chains of vertices in the theDMVV //! and updates AsDes by replacing the old vertices diff --git a/src/BRepOffset/BRepOffset_Inter3d.cxx b/src/BRepOffset/BRepOffset_Inter3d.cxx index 9f1ceb951d..8fc46ce06d 100644 --- a/src/BRepOffset/BRepOffset_Inter3d.cxx +++ b/src/BRepOffset/BRepOffset_Inter3d.cxx @@ -105,8 +105,9 @@ static void ExtentEdge(const TopoDS_Face& /*F*/, //purpose : //======================================================================= -void BRepOffset_Inter3d::CompletInt(const TopTools_ListOfShape& SetOfFaces, - const BRepAlgo_Image& InitOffsetFace) +void BRepOffset_Inter3d::CompletInt (const TopTools_ListOfShape& SetOfFaces, + const BRepAlgo_Image& InitOffsetFace, + const Message_ProgressRange& theRange) { //--------------------------------------------------------------- // Calculate the intersections of offset faces @@ -145,9 +146,13 @@ void BRepOffset_Inter3d::CompletInt(const TopTools_ListOfShape& SetOfFaces, // Treat the selected pairs const std::vector& aPairs = aSelector.Pairs(); const Standard_Integer aNbPairs = static_cast (aPairs.size()); - - for (Standard_Integer iPair = 0; iPair < aNbPairs; ++iPair) + Message_ProgressScope aPS(theRange, "Complete intersection", aNbPairs); + for (Standard_Integer iPair = 0; iPair < aNbPairs; ++iPair, aPS.Next()) { + if (!aPS.More()) + { + return; + } const BOPTools_BoxPairSelector::PairIDs& aPair = aPairs[iPair]; const TopoDS_Face& aF1 = TopoDS::Face (aMFaces.FindKey (Min (aPair.ID1, aPair.ID2))); @@ -250,9 +255,10 @@ void BRepOffset_Inter3d::FaceInter(const TopoDS_Face& F1, //======================================================================= void BRepOffset_Inter3d::ConnexIntByArc(const TopTools_ListOfShape& /*SetOfFaces*/, - const TopoDS_Shape& ShapeInit, - const BRepOffset_Analyse& Analyse, - const BRepAlgo_Image& InitOffsetFace) + const TopoDS_Shape& ShapeInit, + const BRepOffset_Analyse& Analyse, + const BRepAlgo_Image& InitOffsetFace, + const Message_ProgressRange& theRange) { ChFiDS_TypeOfConcavity OT = ChFiDS_Concave; if (mySide == TopAbs_OUT) OT = ChFiDS_Convex; @@ -261,12 +267,17 @@ void BRepOffset_Inter3d::ConnexIntByArc(const TopTools_ListOfShape& /*SetOfFaces TopoDS_Face F1,F2; TopoDS_Edge NullEdge; TopoDS_Face NullFace; - + Message_ProgressScope aPSOuter(theRange, NULL, 2); + Message_ProgressScope aPSIntF(aPSOuter.Next(), "Intersecting offset faces", 1, Standard_True); //--------------------------------------------------------------------- // etape 1 : Intersection of faces // corresponding to the initial faces // separated by a concave edge if offset > 0, otherwise convex. //--------------------------------------------------------------------- - for (; Exp.More(); Exp.Next()) { + for (; Exp.More(); Exp.Next(), aPSIntF.Next()) { + if (!aPSIntF.More()) + { + return; + } const TopoDS_Edge& E = TopoDS::Edge(Exp.Current()); const BRepOffset_ListOfInterval& L = Analyse.Type(E); if (!L.IsEmpty() && L.First().Type() == OT) { @@ -294,8 +305,12 @@ void BRepOffset_Inter3d::ConnexIntByArc(const TopTools_ListOfShape& /*SetOfFaces //--------------------------------------------------------------------- TopoDS_Vertex V[2]; TopTools_ListIteratorOfListOfShape it; - - for (Exp.Init(ShapeInit,TopAbs_EDGE); Exp.More(); Exp.Next()) { + Message_ProgressScope aPSIntT(aPSOuter.Next(), "Intersecting tubes", 1, Standard_True); + for (Exp.Init(ShapeInit,TopAbs_EDGE); Exp.More(); Exp.Next(), aPSIntT.Next()) { + if (!aPSIntT.More()) + { + return; + } const TopoDS_Edge& E1 = TopoDS::Edge(Exp.Current()); if (InitOffsetFace.HasImage(E1)) { //--------------------------- @@ -402,6 +417,7 @@ void BRepOffset_Inter3d::ConnexIntByInt TopTools_DataMapOfShapeShape& MES, TopTools_DataMapOfShapeShape& Build, TopTools_ListOfShape& Failed, + const Message_ProgressRange& theRange, const Standard_Boolean bIsPlanar) { TopTools_IndexedMapOfShape VEmap; @@ -414,6 +430,7 @@ void BRepOffset_Inter3d::ConnexIntByInt // TopExp::MapShapes (SI, TopAbs_EDGE, VEmap); // Take the vertices for treatment + Message_ProgressScope aPSOuter(theRange, NULL, 10); if (bIsPlanar) { aNb = VEmap.Extent(); @@ -461,6 +478,10 @@ void BRepOffset_Inter3d::ConnexIntByInt // Analyze faces connected through vertices for (i = aNb + 1, aNb = VEmap.Extent(); i <= aNb; ++i) { + if (!aPSOuter.More()) + { + return; + } const TopoDS_Shape& aS = VEmap(i); if (aS.ShapeType() != TopAbs_VERTEX) continue; @@ -560,7 +581,12 @@ void BRepOffset_Inter3d::ConnexIntByInt } // aNb = VEmap.Extent(); - for (i = 1; i <= aNb; ++i) { + Message_ProgressScope aPSInter(aPSOuter.Next(8), "Intersecting offset faces", aNb); + for (i = 1; i <= aNb; ++i, aPSInter.Next()) { + if (!aPSInter.More()) + { + return; + } const TopoDS_Shape& aS = VEmap(i); // TopoDS_Edge E; @@ -721,7 +747,12 @@ void BRepOffset_Inter3d::ConnexIntByInt // // create unique intersection for each localized shared part aNb = aDMIntE.Extent(); - for (i = 1; i <= aNb; ++i) { + Message_ProgressScope aPSPostTreat(aPSOuter.Next(2), "Creating unique intersection", aNb); + for (i = 1; i <= aNb; ++i, aPSPostTreat.Next()) { + if (!aPSPostTreat.More()) + { + return; + } const TopTools_ListOfShape& aLS = aDMIntE(i); if (aLS.Extent() < 2) { continue; @@ -893,6 +924,7 @@ void BRepOffset_Inter3d::ContextIntByInt TopTools_DataMapOfShapeShape& MES, TopTools_DataMapOfShapeShape& Build, TopTools_ListOfShape& Failed, + const Message_ProgressRange& theRange, const Standard_Boolean bIsPlanar) { TopTools_MapOfShape MV; @@ -916,7 +948,12 @@ void BRepOffset_Inter3d::ContextIntByInt } TopAbs_State Side = TopAbs_OUT; - for (i = 1; i <= aNb; i++) { + Message_ProgressScope aPS(theRange, "Intersecting with deepening faces", aNb); + for (i = 1; i <= aNb; i++, aPS.Next()) { + if (!aPS.More()) + { + return; + } const TopoDS_Face& CF = TopoDS::Face(ContextFaces(i)); if (ExtentContext) WCF = TopoDS::Face(MES(CF)); else WCF = CF; @@ -1076,13 +1113,12 @@ void BRepOffset_Inter3d::ContextIntByInt //function : ContextIntByArc //purpose : //======================================================================= - void BRepOffset_Inter3d::ContextIntByArc(const TopTools_IndexedMapOfShape& ContextFaces, const Standard_Boolean InSide, const BRepOffset_Analyse& Analyse, const BRepAlgo_Image& InitOffsetFace, - BRepAlgo_Image& InitOffsetEdge) - + BRepAlgo_Image& InitOffsetEdge, + const Message_ProgressRange& theRange) { TopTools_ListOfShape LInt1,LInt2; TopTools_MapOfShape MV; @@ -1099,7 +1135,12 @@ void BRepOffset_Inter3d::ContextIntByArc(const TopTools_IndexedMapOfShape& Conte myTouched.Add(CF); } - for (j = 1; j <= ContextFaces.Extent(); j++) { + Message_ProgressScope aPS(theRange, "Intersecting with deepening faces", ContextFaces.Extent()); + for (j = 1; j <= ContextFaces.Extent(); j++, aPS.Next()) { + if (!aPS.More()) + { + return; + } const TopoDS_Face& CF = TopoDS::Face(ContextFaces(j)); for (exp.Init(CF.Oriented(TopAbs_FORWARD),TopAbs_EDGE); exp.More(); exp.Next()) { @@ -1271,21 +1312,10 @@ void BRepOffset_Inter3d::ContextIntByArc(const TopTools_IndexedMapOfShape& Conte } } -//======================================================================= -//function : AddCommonEdges -//purpose : -//======================================================================= - -void BRepOffset_Inter3d::AddCommonEdges(const TopTools_ListOfShape&) -{ -} - - //======================================================================= //function : SetDone //purpose : //======================================================================= - void BRepOffset_Inter3d::SetDone(const TopoDS_Face& F1, const TopoDS_Face& F2) { @@ -1301,15 +1331,12 @@ void BRepOffset_Inter3d::SetDone(const TopoDS_Face& F1, myDone(F2).Append(F1); } - //======================================================================= //function : IsDone //purpose : //======================================================================= - -Standard_Boolean BRepOffset_Inter3d::IsDone(const TopoDS_Face& F1, - const TopoDS_Face& F2) -const +Standard_Boolean BRepOffset_Inter3d::IsDone(const TopoDS_Face& F1, + const TopoDS_Face& F2) const { if (myDone.IsBound(F1)) { TopTools_ListIteratorOfListOfShape it (myDone(F1)); @@ -1320,46 +1347,10 @@ const return Standard_False; } - -//======================================================================= -//function : TouchedFaces -//purpose : -//======================================================================= - -TopTools_IndexedMapOfShape& BRepOffset_Inter3d::TouchedFaces() -{ - return myTouched; -} - - -//======================================================================= -//function : AsDes -//purpose : -//======================================================================= - -Handle(BRepAlgo_AsDes) BRepOffset_Inter3d::AsDes() const -{ - return myAsDes; -} - - -//======================================================================= -//function : NewEdges -//purpose : -//======================================================================= - -TopTools_IndexedMapOfShape& BRepOffset_Inter3d::NewEdges() -{ - return myNewEdges; -} - - - //======================================================================= //function : Store //purpose : //======================================================================= - void BRepOffset_Inter3d::Store(const TopoDS_Face& F1, const TopoDS_Face& F2, const TopTools_ListOfShape& LInt1, diff --git a/src/BRepOffset/BRepOffset_Inter3d.hxx b/src/BRepOffset/BRepOffset_Inter3d.hxx index e9607c89c5..ffbddf3844 100644 --- a/src/BRepOffset/BRepOffset_Inter3d.hxx +++ b/src/BRepOffset/BRepOffset_Inter3d.hxx @@ -17,6 +17,7 @@ #ifndef _BRepOffset_Inter3d_HeaderFile #define _BRepOffset_Inter3d_HeaderFile +#include #include #include #include @@ -36,70 +37,99 @@ class TopoDS_Shape; class BRepOffset_Analyse; -//! Computes the intersection face face in a set of faces -//! Store the result in a SD as AsDes. -class BRepOffset_Inter3d + +//! Computes the connection of the offset and not offset faces +//! according to the connection type required. +//! Store the result in AsDes tool. +class BRepOffset_Inter3d { public: - DEFINE_STANDARD_ALLOC - - Standard_EXPORT BRepOffset_Inter3d(const Handle(BRepAlgo_AsDes)& AsDes, const TopAbs_State Side, const Standard_Real Tol); - - Standard_EXPORT void CompletInt (const TopTools_ListOfShape& SetOfFaces, const BRepAlgo_Image& InitOffsetFace); - - Standard_EXPORT void FaceInter (const TopoDS_Face& F1, const TopoDS_Face& F2, const BRepAlgo_Image& InitOffsetFace); - - Standard_EXPORT void ConnexIntByArc (const TopTools_ListOfShape& SetOfFaces, const TopoDS_Shape& ShapeInit, const BRepOffset_Analyse& Analyse, const BRepAlgo_Image& InitOffsetFace); - - Standard_EXPORT void ConnexIntByInt (const TopoDS_Shape& SI, const BRepOffset_DataMapOfShapeOffset& MapSF, const BRepOffset_Analyse& A, TopTools_DataMapOfShapeShape& MES, TopTools_DataMapOfShapeShape& Build, TopTools_ListOfShape& Failed, const Standard_Boolean bIsPlanar = Standard_False); - - Standard_EXPORT void ContextIntByInt (const TopTools_IndexedMapOfShape& ContextFaces, const Standard_Boolean ExtentContext, const BRepOffset_DataMapOfShapeOffset& MapSF, const BRepOffset_Analyse& A, TopTools_DataMapOfShapeShape& MES, TopTools_DataMapOfShapeShape& Build, TopTools_ListOfShape& Failed, const Standard_Boolean bIsPlanar = Standard_False); - - Standard_EXPORT void ContextIntByArc (const TopTools_IndexedMapOfShape& ContextFaces, const Standard_Boolean ExtentContext, const BRepOffset_Analyse& Analyse, const BRepAlgo_Image& InitOffsetFace, BRepAlgo_Image& InitOffsetEdge); - - Standard_EXPORT void AddCommonEdges (const TopTools_ListOfShape& SetOfFaces); - - Standard_EXPORT void SetDone (const TopoDS_Face& F1, const TopoDS_Face& F2); - - Standard_EXPORT Standard_Boolean IsDone (const TopoDS_Face& F1, const TopoDS_Face& F2) const; - - Standard_EXPORT TopTools_IndexedMapOfShape& TouchedFaces(); - - Standard_EXPORT Handle(BRepAlgo_AsDes) AsDes() const; - - Standard_EXPORT TopTools_IndexedMapOfShape& NewEdges(); - - - +public: -protected: + //! Constructor + Standard_EXPORT BRepOffset_Inter3d (const Handle (BRepAlgo_AsDes)& AsDes, + const TopAbs_State Side, + const Standard_Real Tol); + + // Computes intersection of the given faces among each other + Standard_EXPORT void CompletInt (const TopTools_ListOfShape& SetOfFaces, + const BRepAlgo_Image& InitOffsetFace, + const Message_ProgressRange& theRange); + + //! Computes intersection of pair of faces + Standard_EXPORT void FaceInter (const TopoDS_Face& F1, + const TopoDS_Face& F2, + const BRepAlgo_Image& InitOffsetFace); + + //! Computes connections of the offset faces that have to be connected by arcs. + Standard_EXPORT void ConnexIntByArc (const TopTools_ListOfShape& SetOfFaces, + const TopoDS_Shape& ShapeInit, + const BRepOffset_Analyse& Analyse, + const BRepAlgo_Image& InitOffsetFace, + const Message_ProgressRange& theRange); + + //! Computes intersection of the offset faces that have to be connected by + //! sharp edges, i.e. it computes intersection between extended offset faces. + Standard_EXPORT void ConnexIntByInt (const TopoDS_Shape& SI, + const BRepOffset_DataMapOfShapeOffset& MapSF, + const BRepOffset_Analyse& A, + TopTools_DataMapOfShapeShape& MES, + TopTools_DataMapOfShapeShape& Build, + TopTools_ListOfShape& Failed, + const Message_ProgressRange& theRange, + const Standard_Boolean bIsPlanar = Standard_False); + + //! Computes intersection with not offset faces . + Standard_EXPORT void ContextIntByInt (const TopTools_IndexedMapOfShape& ContextFaces, + const Standard_Boolean ExtentContext, + const BRepOffset_DataMapOfShapeOffset& MapSF, + const BRepOffset_Analyse& A, + TopTools_DataMapOfShapeShape& MES, + TopTools_DataMapOfShapeShape& Build, + TopTools_ListOfShape& Failed, + const Message_ProgressRange& theRange, + const Standard_Boolean bIsPlanar = Standard_False); + + //! Computes connections of the not offset faces that have to be connected by arcs + Standard_EXPORT void ContextIntByArc (const TopTools_IndexedMapOfShape& ContextFaces, + const Standard_Boolean ExtentContext, + const BRepOffset_Analyse& Analyse, + const BRepAlgo_Image& InitOffsetFace, + BRepAlgo_Image& InitOffsetEdge, + const Message_ProgressRange& theRange); + + //! Marks the pair of faces as already intersected + Standard_EXPORT void SetDone (const TopoDS_Face& F1, const TopoDS_Face& F2); + //! Checks if the pair of faces has already been treated. + Standard_EXPORT Standard_Boolean IsDone (const TopoDS_Face& F1, + const TopoDS_Face& F2) const; + //! Returns touched faces + TopTools_IndexedMapOfShape& TouchedFaces() { return myTouched; }; + //! Returns AsDes tool + Handle (BRepAlgo_AsDes) AsDes() const { return myAsDes; } + //! Returns new edges + TopTools_IndexedMapOfShape& NewEdges() { return myNewEdges; } private: - - Standard_EXPORT void Store (const TopoDS_Face& F1, const TopoDS_Face& F2, const TopTools_ListOfShape& LInt1, const TopTools_ListOfShape& LInt2); + //! Stores the intersection results into AsDes + Standard_EXPORT void Store (const TopoDS_Face& F1, + const TopoDS_Face& F2, + const TopTools_ListOfShape& LInt1, + const TopTools_ListOfShape& LInt2); - - Handle(BRepAlgo_AsDes) myAsDes; +private: + Handle (BRepAlgo_AsDes) myAsDes; TopTools_IndexedMapOfShape myTouched; TopTools_DataMapOfShapeListOfShape myDone; TopTools_IndexedMapOfShape myNewEdges; TopAbs_State mySide; Standard_Real myTol; - - }; - - - - - - - #endif // _BRepOffset_Inter3d_HeaderFile diff --git a/src/BRepOffset/BRepOffset_MakeLoops.cxx b/src/BRepOffset/BRepOffset_MakeLoops.cxx index de5eb39747..738dba4132 100644 --- a/src/BRepOffset/BRepOffset_MakeLoops.cxx +++ b/src/BRepOffset/BRepOffset_MakeLoops.cxx @@ -52,15 +52,21 @@ BRepOffset_MakeLoops::BRepOffset_MakeLoops() void BRepOffset_MakeLoops::Build(const TopTools_ListOfShape& LF, const Handle(BRepAlgo_AsDes)& AsDes, BRepAlgo_Image& Image, - BRepAlgo_Image& theImageVV) + BRepAlgo_Image& theImageVV, + const Message_ProgressRange& theRange) { TopTools_ListIteratorOfListOfShape it(LF); TopTools_ListIteratorOfListOfShape itl,itLCE; BRepAlgo_Loop Loops; Loops.VerticesForSubstitute( myVerVerMap ); Loops.SetImageVV (theImageVV); - - for (; it.More(); it.Next()) { + Message_ProgressScope aPSOuter(theRange, NULL, 2); + Message_ProgressScope aPS1(aPSOuter.Next(), "Init loops", LF.Size()); + for (; it.More(); it.Next(), aPS1.Next()) { + if (!aPS1.More()) + { + return; + } const TopoDS_Face& F = TopoDS::Face(it.Value()); //--------------------------- // Initialization of Loops. @@ -124,44 +130,49 @@ void BRepOffset_MakeLoops::Build(const TopTools_ListOfShape& LF, if (myVerVerMap.IsEmpty()) return; BRep_Builder BB; - for (it.Initialize( LF ); it.More(); it.Next()) + Message_ProgressScope aPS2(aPSOuter.Next(), "Building loops", LF.Size()); + for (it.Initialize(LF); it.More(); it.Next(), aPS2.Next()) + { + if (!aPS2.More()) { - TopoDS_Shape F = it.Value(); - TopTools_ListOfShape LIF; - Image.LastImage( F, LIF ); - for (itl.Initialize(LIF); itl.More(); itl.Next()) - { - const TopoDS_Shape& IF = itl.Value(); - TopExp_Explorer EdExp( IF, TopAbs_EDGE ); - for (; EdExp.More(); EdExp.Next()) - { - TopoDS_Shape E = EdExp.Current(); - TopTools_ListOfShape VList; - TopoDS_Iterator VerExp( E ); - for (; VerExp.More(); VerExp.Next()) - VList.Append( VerExp.Value() ); - TopTools_ListIteratorOfListOfShape itlv( VList ); - for (; itlv.More(); itlv.Next()) - { - const TopoDS_Shape& V = itlv.Value(); - if (myVerVerMap.IsBound( V )) - { - TopoDS_Shape NewV = myVerVerMap( V ); - E.Free( Standard_True ); - NewV.Orientation( V.Orientation() ); - Handle(BRep_TVertex)& TV = *((Handle(BRep_TVertex)*) &V.TShape()); - Handle(BRep_TVertex)& NewTV = *((Handle(BRep_TVertex)*) &NewV.TShape()); - if (TV->Tolerance() > NewTV->Tolerance()) - NewTV->Tolerance( TV->Tolerance() ); - NewTV->ChangePoints().Append( TV->ChangePoints() ); - AsDes->Replace( V, NewV ); - BB.Remove( E, V ); - BB.Add( E, NewV ); - } - } - } - } + return; + } + TopoDS_Shape F = it.Value(); + TopTools_ListOfShape LIF; + Image.LastImage(F, LIF); + for (itl.Initialize(LIF); itl.More(); itl.Next()) + { + const TopoDS_Shape& IF = itl.Value(); + TopExp_Explorer EdExp(IF, TopAbs_EDGE); + for (; EdExp.More(); EdExp.Next()) + { + TopoDS_Shape E = EdExp.Current(); + TopTools_ListOfShape VList; + TopoDS_Iterator VerExp(E); + for (; VerExp.More(); VerExp.Next()) + VList.Append(VerExp.Value()); + TopTools_ListIteratorOfListOfShape itlv(VList); + for (; itlv.More(); itlv.Next()) + { + const TopoDS_Shape& V = itlv.Value(); + if (myVerVerMap.IsBound(V)) + { + TopoDS_Shape NewV = myVerVerMap(V); + E.Free(Standard_True); + NewV.Orientation(V.Orientation()); + Handle(BRep_TVertex)& TV = *((Handle(BRep_TVertex)*) &V.TShape()); + Handle(BRep_TVertex)& NewTV = *((Handle(BRep_TVertex)*) &NewV.TShape()); + if (TV->Tolerance() > NewTV->Tolerance()) + NewTV->Tolerance(TV->Tolerance()); + NewTV->ChangePoints().Append(TV->ChangePoints()); + AsDes->Replace(V, NewV); + BB.Remove(E, V); + BB.Add(E, NewV); + } + } + } } + } } //======================================================================= @@ -196,10 +207,11 @@ static Standard_Boolean IsBetweenCorks(const TopoDS_Shape& E, //======================================================================= void BRepOffset_MakeLoops::BuildOnContext(const TopTools_ListOfShape& LContext, - const BRepOffset_Analyse& Analyse, - const Handle(BRepAlgo_AsDes)& AsDes, - BRepAlgo_Image& Image, - const Standard_Boolean InSide) + const BRepOffset_Analyse& Analyse, + const Handle(BRepAlgo_AsDes)& AsDes, + BRepAlgo_Image& Image, + const Standard_Boolean InSide, + const Message_ProgressRange& theRange) { //----------------------------------------- // unwinding of caps. @@ -211,7 +223,12 @@ void BRepOffset_MakeLoops::BuildOnContext(const TopTools_ListOfShape& LContext TopExp_Explorer exp; TopTools_MapOfShape MapExtent; - for (; it.More(); it.Next()) { + Message_ProgressScope aPS(theRange, "Building deepening faces", LContext.Extent()); + for (; it.More(); it.Next(), aPS.Next()) { + if (!aPS.More()) + { + return; + } const TopoDS_Face& F = TopoDS::Face(it.Value()); TopTools_MapOfShape MBound; //----------------------------------------------- @@ -383,7 +400,8 @@ void BRepOffset_MakeLoops::BuildOnContext(const TopTools_ListOfShape& LContext void BRepOffset_MakeLoops::BuildFaces(const TopTools_ListOfShape& LF, const Handle(BRepAlgo_AsDes)& AsDes, - BRepAlgo_Image& Image) + BRepAlgo_Image& Image, + const Message_ProgressRange& theRange) { TopTools_ListIteratorOfListOfShape itr,itl,itLCE; Standard_Boolean ToRebuild; @@ -394,7 +412,12 @@ void BRepOffset_MakeLoops::BuildFaces(const TopTools_ListOfShape& LF, //---------------------------------- // Loop on all faces //. //---------------------------------- - for (itr.Initialize(LF); itr.More(); itr.Next()) { + Message_ProgressScope aPS(theRange, "Building faces", LF.Size()); + for (itr.Initialize(LF); itr.More(); itr.Next(), aPS.Next()) { + if (!aPS.More()) + { + return; + } TopoDS_Face F = TopoDS::Face(itr.Value()); Loops.Init(F); ToRebuild = Standard_False; diff --git a/src/BRepOffset/BRepOffset_MakeLoops.hxx b/src/BRepOffset/BRepOffset_MakeLoops.hxx index 7caf1b3fe6..e309f50e4f 100644 --- a/src/BRepOffset/BRepOffset_MakeLoops.hxx +++ b/src/BRepOffset/BRepOffset_MakeLoops.hxx @@ -17,6 +17,8 @@ #ifndef _BRepOffset_MakeLoops_HeaderFile #define _BRepOffset_MakeLoops_HeaderFile +#include + #include #include #include @@ -42,17 +44,20 @@ public: Standard_EXPORT void Build (const TopTools_ListOfShape& LF, const Handle(BRepAlgo_AsDes)& AsDes, BRepAlgo_Image& Image, - BRepAlgo_Image& theImageVV); + BRepAlgo_Image& theImageVV, + const Message_ProgressRange& theRange); Standard_EXPORT void BuildOnContext (const TopTools_ListOfShape& LContext, const BRepOffset_Analyse& Analyse, const Handle(BRepAlgo_AsDes)& AsDes, BRepAlgo_Image& Image, - const Standard_Boolean InSide); + const Standard_Boolean InSide, + const Message_ProgressRange& theRange); Standard_EXPORT void BuildFaces (const TopTools_ListOfShape& LF, const Handle(BRepAlgo_AsDes)& AsDes, - BRepAlgo_Image& Image); + BRepAlgo_Image& Image, + const Message_ProgressRange& theRange); diff --git a/src/BRepOffset/BRepOffset_MakeOffset.cxx b/src/BRepOffset/BRepOffset_MakeOffset.cxx index 2c5fe795f3..e18919550c 100644 --- a/src/BRepOffset/BRepOffset_MakeOffset.cxx +++ b/src/BRepOffset/BRepOffset_MakeOffset.cxx @@ -241,6 +241,46 @@ static void DEBVerticesControl (const TopTools_IndexedMapOfShape& NewEdges, } #endif +namespace +{ + //======================================================================= + //function : BRepOffset_PIOperation + //purpose : List of operations to be supported by the Progress Indicator + //======================================================================= + enum BRepOffset_PIOperation + { + PIOperation_CheckInputData = 0, + PIOperation_Analyse, + PIOperation_BuildOffsetBy, + PIOperation_Intersection, + PIOperation_MakeMissingWalls, + PIOperation_MakeShells, + PIOperation_MakeSolid, + PIOperation_Sewing, + PIOperation_Last + }; + + //======================================================================= + //function : normalizeSteps + //purpose : Normalization of progress steps + //======================================================================= + static void normalizeSteps(const Standard_Real theWhole, + TColStd_Array1OfReal& theSteps) + { + Standard_Real aSum = 0.; + for (Standard_Integer i = theSteps.Lower(); i <= theSteps.Upper(); ++i) + { + aSum += theSteps(i); + } + + // Normalize steps + for (Standard_Integer i = theSteps.Lower(); i <= theSteps.Upper(); ++i) + { + theSteps(i) = theWhole * theSteps(i) / aSum; + } + } + +} //======================================================================= // static methods @@ -256,7 +296,8 @@ static static Standard_Boolean BuildShellsCompleteInter(const TopTools_ListOfShape& theLF, BRepAlgo_Image& theImage, - TopoDS_Shape& theShells); + TopoDS_Shape& theShells, + const Message_ProgressRange& theRange); static Standard_Boolean GetSubShapes(const TopoDS_Shape& theShape, @@ -581,13 +622,14 @@ BRepOffset_MakeOffset::BRepOffset_MakeOffset() BRepOffset_MakeOffset::BRepOffset_MakeOffset(const TopoDS_Shape& S, const Standard_Real Offset, - const Standard_Real Tol, + const Standard_Real Tol, const BRepOffset_Mode Mode, const Standard_Boolean Inter, const Standard_Boolean SelfInter, const GeomAbs_JoinType Join, const Standard_Boolean Thickening, - const Standard_Boolean RemoveIntEdges) + const Standard_Boolean RemoveIntEdges, + const Message_ProgressRange& theRange) : myOffset (Offset), myTol (Tol), @@ -604,7 +646,7 @@ myDone (Standard_False) myAsDes = new BRepAlgo_AsDes(); myIsLinearizationAllowed = Standard_True; - MakeOffsetShape(); + MakeOffsetShape(theRange); } @@ -835,7 +877,7 @@ void BRepOffset_MakeOffset::SetFacesWithOffset() //purpose : //======================================================================= -void BRepOffset_MakeOffset::MakeOffsetShape() +void BRepOffset_MakeOffset::MakeOffsetShape(const Message_ProgressRange& theRange) { myDone = Standard_False; // @@ -857,7 +899,12 @@ void BRepOffset_MakeOffset::MakeOffsetShape() RemoveCorks (myFaceComp, myFaces); } - if (!CheckInputData()) + Message_ProgressScope aPS(theRange, "Making offset shape", 100); + + TColStd_Array1OfReal aSteps(0, PIOperation_Last - 1); + analyzeProgress(100., aSteps); + + if (!CheckInputData(aPS.Next(aSteps(PIOperation_CheckInputData))) || myError != BRepOffset_NoError) { // There is error in input data. // Check Error() method. @@ -879,7 +926,12 @@ void BRepOffset_MakeOffset::MakeOffsetShape() myAnalyse.SetOffsetValue (myOffset); myAnalyse.SetFaceOffsetMap (myFaceOffset); } - myAnalyse.Perform(myFaceComp,TolAngle); + myAnalyse.Perform(myFaceComp,TolAngle, aPS.Next(aSteps(PIOperation_Analyse))); + if (!aPS.More()) + { + myError = BRepOffset_UserBreak; + return; + } //--------------------------------------------------- // Construction of Offset from preanalysis. //--------------------------------------------------- @@ -889,9 +941,9 @@ void BRepOffset_MakeOffset::MakeOffsetShape() UpdateFaceOffset(); if (myJoin == GeomAbs_Arc) - BuildOffsetByArc(); + BuildOffsetByArc(aPS.Next(aSteps(PIOperation_BuildOffsetBy))); else if (myJoin == GeomAbs_Intersection) - BuildOffsetByInter(); + BuildOffsetByInter(aPS.Next(aSteps(PIOperation_BuildOffsetBy))); if (myError != BRepOffset_NoError) { return; @@ -903,32 +955,71 @@ void BRepOffset_MakeOffset::MakeOffsetShape() //----------------- // Intersection 3d . //----------------- + Message_ProgressScope aPSInter(aPS.Next(aSteps(PIOperation_Intersection)), NULL, 100); + aPSInter.SetName((myJoin == GeomAbs_Arc) ? "Connect offset faces by arc" : + "Connect offset faces by intersection"); + BRepOffset_Inter3d Inter(myAsDes,Side,myTol); - Intersection3D (Inter); + Intersection3D (Inter, aPSInter.Next(90)); + if (myError != BRepOffset_NoError) + { + return; + } //----------------- // Intersection2D //----------------- TopTools_IndexedMapOfShape& Modif = Inter.TouchedFaces(); TopTools_IndexedMapOfShape& NewEdges = Inter.NewEdges(); - if (!Modif.IsEmpty()) Intersection2D (Modif,NewEdges); + if (!Modif.IsEmpty()) + { + Intersection2D(Modif, NewEdges, aPSInter.Next(4)); + if (myError != BRepOffset_NoError) + { + return; + } + } + //------------------------------------------------------- // Unwinding 2D and reconstruction of modified faces //---------------------------------------------------- - MakeLoops (Modif); + MakeLoops (Modif, aPSInter.Next(4)); + if (myError != BRepOffset_NoError) + { + return; + } //----------------------------------------------------- // Reconstruction of non modified faces sharing // reconstructed edges //------------------------------------------------------ - if (!Modif.IsEmpty()) MakeFaces (Modif); + if (!Modif.IsEmpty()) + { + MakeFaces(Modif, aPSInter.Next(2)); + if (myError != BRepOffset_NoError) + { + return; + } + } + + aPSInter.Close(); if (myThickening) - MakeMissingWalls(); + { + MakeMissingWalls(aPS.Next(aSteps(PIOperation_MakeMissingWalls))); + if (myError != BRepOffset_NoError) + { + return; + } + } //------------------------- // Construction of shells. //------------------------- - MakeShells (); + MakeShells (aPS.Next(aSteps(PIOperation_MakeShells))); + if (myError != BRepOffset_NoError) + { + return; + } if (myOffsetShape.IsNull()) { // not done myDone = Standard_False; @@ -955,8 +1046,11 @@ void BRepOffset_MakeOffset::MakeOffsetShape() //---------------------- // Creation of solids. //---------------------- - MakeSolid (); - + MakeSolid (aPS.Next(aSteps(PIOperation_MakeSolid))); + if (myError != BRepOffset_NoError) + { + return; + } //----------------------------- // MAJ Tolerance edge and Vertex // ---------------------------- @@ -973,13 +1067,22 @@ void BRepOffset_MakeOffset::MakeOffsetShape() { BRepBuilderAPI_Sewing aSew(myTol); aSew.Add(myOffsetShape); - aSew.Perform(); + aSew.Perform(aPS.Next(aSteps(PIOperation_Sewing) / 2.)); + if (!aPS.More()) + { + myError = BRepOffset_UserBreak; + return; + } myOffsetShape = aSew.SewedShape(); // Rebuild solid. // Offset shape expected to be really closed after sewing. myOffsetShape.Closed(Standard_True); - MakeSolid(); + MakeSolid(aPS.Next(aSteps(PIOperation_Sewing) / 2.)); + if (myError != BRepOffset_NoError) + { + return; + } } myDone = Standard_True; @@ -992,12 +1095,12 @@ void BRepOffset_MakeOffset::MakeOffsetShape() //purpose : //======================================================================= -void BRepOffset_MakeOffset::MakeThickSolid() +void BRepOffset_MakeOffset::MakeThickSolid(const Message_ProgressRange& theRange) { //-------------------------------------------------------------- // Construction of shell parallel to shell (initial without cap). //-------------------------------------------------------------- - MakeOffsetShape (); + MakeOffsetShape (theRange); if (!myDone) { @@ -1115,7 +1218,7 @@ const TopoDS_Shape& BRepOffset_MakeOffset::Shape() const //function : MakeOffsetFaces //purpose : //======================================================================= -void BRepOffset_MakeOffset::MakeOffsetFaces(BRepOffset_DataMapOfShapeOffset& theMapSF) +void BRepOffset_MakeOffset::MakeOffsetFaces(BRepOffset_DataMapOfShapeOffset& theMapSF, const Message_ProgressRange& theRange) { Standard_Real aCurOffset; TopTools_ListOfShape aLF; @@ -1126,8 +1229,14 @@ void BRepOffset_MakeOffset::MakeOffsetFaces(BRepOffset_DataMapOfShapeOffset& the // BRepLib::SortFaces(myFaceComp, aLF); // + Message_ProgressScope aPS(theRange, "Making offset faces", aLF.Size()); aItLF.Initialize(aLF); - for (; aItLF.More(); aItLF.Next()) { + for (; aItLF.More(); aItLF.Next(), aPS.Next()) { + if (!aPS.More()) + { + myError = BRepOffset_UserBreak; + return; + } const TopoDS_Face& aF = TopoDS::Face(aItLF.Value()); aCurOffset = myFaceOffset.IsBound(aF) ? myFaceOffset(aF) : myOffset; BRepOffset_Offset OF(aF, aCurOffset, ShapeTgt, OffsetOutside, myJoin); @@ -1175,7 +1284,7 @@ void BRepOffset_MakeOffset::MakeOffsetFaces(BRepOffset_DataMapOfShapeOffset& the //function : BuildOffsetByInter //purpose : //======================================================================= -void BRepOffset_MakeOffset::BuildOffsetByInter() +void BRepOffset_MakeOffset::BuildOffsetByInter(const Message_ProgressRange& theRange) { #ifdef OCCT_DEBUG if ( ChronBuild) { @@ -1185,14 +1294,57 @@ void BRepOffset_MakeOffset::BuildOffsetByInter() } #endif + Message_ProgressScope aPSOuter(theRange, "Connect offset faces by intersection", 100); + // just for better management and visualization of the progress steps + // define a nested enum listing all the steps of the current method. + enum BuildOffsetByInter_PISteps + { + BuildOffsetByInter_MakeOffsetFaces = 0, + BuildOffsetByInter_ConnexIntByInt, + BuildOffsetByInter_ContextIntByInt, + BuildOffsetByInter_IntersectEdges, + BuildOffsetByInter_CompleteEdgesIntersection, + BuildOffsetByInter_BuildFaces, + BuildOffsetByInter_FillHistoryForOffsets, + BuildOffsetByInter_FillHistoryForDeepenings, + BuildOffsetByInter_Last + }; + + Standard_Real aNbFaces = myFaceComp.NbChildren() + myAnalyse.NewFaces().Extent() + myFaces.Extent(); + Standard_Real anOffsetsPart = (myFaceComp.NbChildren() + myAnalyse.NewFaces().Extent()) / aNbFaces; + Standard_Real aDeepeningsPart = myFaces.Extent() / aNbFaces; + + TColStd_Array1OfReal aSteps(0, BuildOffsetByInter_Last - 1); + { + aSteps.Init(0); + + Standard_Boolean isInter = myJoin == GeomAbs_Intersection; + Standard_Real aFaceInter = isInter ? 25. : 50.; + Standard_Real aBuildFaces = isInter ? 50. : 25.; + aSteps(BuildOffsetByInter_MakeOffsetFaces) = 5.; + aSteps(BuildOffsetByInter_ConnexIntByInt) = aFaceInter * anOffsetsPart; + aSteps(BuildOffsetByInter_ContextIntByInt) = aFaceInter * aDeepeningsPart; + aSteps(BuildOffsetByInter_IntersectEdges) = 10.; + aSteps(BuildOffsetByInter_CompleteEdgesIntersection) = 5.; + aSteps(BuildOffsetByInter_BuildFaces) = aBuildFaces; + aSteps(BuildOffsetByInter_FillHistoryForOffsets) = 5. * anOffsetsPart; + aSteps(BuildOffsetByInter_FillHistoryForDeepenings) = 5. * aDeepeningsPart; + normalizeSteps(100., aSteps); + } + TopExp_Explorer Exp, Exp2, ExpC; TopTools_ListIteratorOfListOfShape itLF; - + //-------------------------------------------------------- // Construction of faces parallel to initial faces //-------------------------------------------------------- BRepOffset_DataMapOfShapeOffset MapSF; - MakeOffsetFaces(MapSF); + MakeOffsetFaces(MapSF, aPSOuter.Next(aSteps(BuildOffsetByInter_MakeOffsetFaces))); + if (!aPSOuter.More()) + { + myError = BRepOffset_UserBreak; + return; + } //-------------------------------------------------------------------- // MES : Map of OffsetShape -> Extended Shapes. // Build : Map of Initial SS -> OffsetShape build by Inter. @@ -1212,9 +1364,21 @@ void BRepOffset_MakeOffset::BuildOffsetByInter() BRepOffset_Inter3d Inter3 (AsDes,Side,myTol); // Intersection between parallel faces - Inter3.ConnexIntByInt(myFaceComp,MapSF,myAnalyse,MES,Build,Failed,myIsPlanar); + Inter3.ConnexIntByInt(myFaceComp, MapSF, myAnalyse, MES, Build, Failed, + aPSOuter.Next(aSteps(BuildOffsetByInter_ConnexIntByInt)), myIsPlanar); + if (!aPSOuter.More()) + { + myError = BRepOffset_UserBreak; + return; + } // Intersection with caps. - Inter3.ContextIntByInt(myFaces,ExtentContext,MapSF,myAnalyse,MES,Build,Failed,myIsPlanar); + Inter3.ContextIntByInt(myFaces, ExtentContext, MapSF, myAnalyse, MES, Build, Failed, + aPSOuter.Next(aSteps(BuildOffsetByInter_ContextIntByInt)), myIsPlanar); + if (!aPSOuter.More()) + { + myError = BRepOffset_UserBreak; + return; + } TopTools_ListOfShape aLFaces; for (Exp.Init(myFaceComp,TopAbs_FACE) ; Exp.More(); Exp.Next()) @@ -1225,7 +1389,8 @@ void BRepOffset_MakeOffset::BuildOffsetByInter() // Extension of neighbor edges of new edges and intersection between neighbors. //-------------------------------------------------------------------------------- Handle(BRepAlgo_AsDes) AsDes2d = new BRepAlgo_AsDes(); - IntersectEdges(aLFaces, MapSF, MES, Build, AsDes, AsDes2d); + IntersectEdges(aLFaces, MapSF, MES, Build, AsDes, AsDes2d, + aPSOuter.Next(aSteps(BuildOffsetByInter_IntersectEdges))); if (myError != BRepOffset_NoError) { return; @@ -1240,7 +1405,8 @@ void BRepOffset_MakeOffset::BuildOffsetByInter() //Map of edges obtained after FACE-FACE (offsetted) intersection. //Key1 is edge trimmed by intersection points with other edges; //Item is not-trimmed edge. - if (!TrimEdges(myFaceComp, myOffset, myAnalyse, MapSF, MES, Build, AsDes, AsDes2d, NewEdges, aETrimEInf, anEdgesOrigins)) + if (!TrimEdges(myFaceComp, myOffset, myAnalyse, MapSF, MES, Build, + AsDes, AsDes2d, NewEdges, aETrimEInf, anEdgesOrigins)) { myError = BRepOffset_CannotTrimEdges; return; @@ -1256,21 +1422,34 @@ void BRepOffset_MakeOffset::BuildOffsetByInter() GetEnlargedFaces(aLFaces, MapSF, MES, aFacesOrigins, IMOE, LFE); // TopTools_ListIteratorOfListOfShape itLFE(LFE); + Message_ProgressScope aPS2d(aPSOuter.Next(aSteps(BuildOffsetByInter_CompleteEdgesIntersection)), NULL, 2); + Message_ProgressScope aPS2dOffsets(aPS2d.Next(2. * anOffsetsPart), NULL, LFE.Size()); for (; itLFE.More(); itLFE.Next()) { + if (!aPS2dOffsets.More()) + { + myError = BRepOffset_UserBreak; + return; + } const TopoDS_Face& NEF = TopoDS::Face(itLFE.Value()); Standard_Real aCurrFaceTol = BRep_Tool::Tolerance(NEF); - BRepOffset_Inter2d::Compute(AsDes, NEF, NewEdges, aCurrFaceTol, myEdgeIntEdges, aDMVV); + BRepOffset_Inter2d::Compute(AsDes, NEF, NewEdges, aCurrFaceTol, myEdgeIntEdges, aDMVV, aPS2dOffsets.Next()); } //---------------------------------------------- // Intersections 2d on caps. //---------------------------------------------- Standard_Integer i; + Message_ProgressScope aPS2dCaps(aPS2d.Next(2. * aDeepeningsPart), NULL, myFaces.Extent()); for (i = 1; i <= myFaces.Extent(); i++) { + if (!aPS2dCaps.More()) + { + myError = BRepOffset_UserBreak; + return; + } const TopoDS_Face& Cork = TopoDS::Face(myFaces(i)); Standard_Real aCurrFaceTol = BRep_Tool::Tolerance(Cork); - BRepOffset_Inter2d::Compute(AsDes, Cork, NewEdges, aCurrFaceTol, myEdgeIntEdges, aDMVV); + BRepOffset_Inter2d::Compute(AsDes, Cork, NewEdges, aCurrFaceTol, myEdgeIntEdges, aDMVV, aPS2dCaps.Next()); } // BRepOffset_Inter2d::FuseVertices(aDMVV, AsDes, myImageVV); @@ -1281,7 +1460,12 @@ void BRepOffset_MakeOffset::BuildOffsetByInter() TopTools_MapOfShape aMFDone; // if ((myJoin == GeomAbs_Intersection) && myInter && myIsPlanar) { - BuildSplitsOfExtendedFaces(LFE, myAnalyse, AsDes, anEdgesOrigins, aFacesOrigins, aETrimEInf, IMOE); + BuildSplitsOfExtendedFaces(LFE, myAnalyse, AsDes, anEdgesOrigins, aFacesOrigins, aETrimEInf, + IMOE, aPSOuter.Next(aSteps(BuildOffsetByInter_BuildFaces))); + if (myError != BRepOffset_NoError) + { + return; + } // TopTools_ListIteratorOfListOfShape aItLF(LFE); for (; aItLF.More(); aItLF.Next()) { @@ -1290,7 +1474,12 @@ void BRepOffset_MakeOffset::BuildOffsetByInter() } } else { - myMakeLoops.Build(LFE, AsDes, IMOE, myImageVV); + myMakeLoops.Build(LFE, AsDes, IMOE, myImageVV, aPSOuter.Next(aSteps(BuildOffsetByInter_BuildFaces))); + if (!aPSOuter.More()) + { + myError = BRepOffset_UserBreak; + return; + } } // #ifdef OCCT_DEBUG @@ -1299,8 +1488,15 @@ void BRepOffset_MakeOffset::BuildOffsetByInter() //--------------------------- // MAJ SD. for faces // //--------------------------- - for (TopTools_ListOfShape::Iterator it (aLFaces); it.More(); it.Next()) + Message_ProgressScope aPSHist(aPSOuter.Next(aSteps(BuildOffsetByInter_FillHistoryForOffsets)), + "Fill history for offset faces", aLFaces.Size()); + for (TopTools_ListOfShape::Iterator it (aLFaces); it.More(); it.Next(), aPSHist.Next()) { + if (!aPSHist.More()) + { + myError = BRepOffset_UserBreak; + return; + } const TopoDS_Shape& FI = it.Value(); myInitOffsetFace.SetRoot(FI); TopoDS_Face OF = MapSF(FI).Face(); @@ -1420,7 +1616,7 @@ void BRepOffset_MakeOffset::BuildOffsetByInter() TopoDS_Vertex CV1,CV2; TopExp::Vertices(COE,CV1,CV2); if (!CV1.IsNull()) myAsDes->Add(COE,CV1.Oriented(TopAbs_FORWARD)); - if (!CV2.IsNull()) myAsDes->Add(COE,CV2.Oriented(TopAbs_REVERSED)); + if (!CV2.IsNull()) myAsDes->Add(COE,CV2.Oriented(TopAbs_REVERSED)); } } } @@ -1491,7 +1687,14 @@ void BRepOffset_MakeOffset::BuildOffsetByInter() // MAJ SD. for caps //--------------------------- //TopTools_MapOfShape View; - for (i = 1; i <= myFaces.Extent(); i++) { + Message_ProgressScope aPSHist2(aPSOuter.Next(aSteps(BuildOffsetByInter_FillHistoryForDeepenings)), + "Fill history for deepening faces", myFaces.Extent()); + for (i = 1; i <= myFaces.Extent(); i++, aPSHist2.Next()) { + if (!aPSHist2.More()) + { + myError = BRepOffset_UserBreak; + return; + } const TopoDS_Shape& Cork = myFaces(i); const TopTools_ListOfShape& LE = AsDes->Descendant(Cork); for (itLF.Initialize(LE) ; itLF.More(); itLF.Next()) { @@ -1514,7 +1717,7 @@ void BRepOffset_MakeOffset::BuildOffsetByInter() TopoDS_Vertex CV1,CV2; TopExp::Vertices(COE,CV1,CV2); if (!CV1.IsNull()) myAsDes->Add(COE,CV1.Oriented(TopAbs_FORWARD)); - if (!CV2.IsNull()) myAsDes->Add(COE,CV2.Oriented(TopAbs_REVERSED)); + if (!CV2.IsNull()) myAsDes->Add(COE,CV2.Oriented(TopAbs_REVERSED)); } } } @@ -1604,7 +1807,7 @@ void BRepOffset_MakeOffset::BuildFaceComp() //function : BuildOffsetByArc //purpose : //======================================================================= -void BRepOffset_MakeOffset::BuildOffsetByArc() +void BRepOffset_MakeOffset::BuildOffsetByArc(const Message_ProgressRange& theRange) { #ifdef OCCT_DEBUG if ( ChronBuild) { @@ -1617,19 +1820,29 @@ void BRepOffset_MakeOffset::BuildOffsetByArc() TopExp_Explorer Exp; TopTools_ListIteratorOfListOfShape itLF; TopTools_MapOfShape Done; - + Message_ProgressScope aPSOuter(theRange, NULL, 10); //-------------------------------------------------------- // Construction of faces parallel to initial faces //-------------------------------------------------------- BRepOffset_DataMapOfShapeOffset MapSF; - MakeOffsetFaces(MapSF); + MakeOffsetFaces(MapSF, aPSOuter.Next()); + if (myError != BRepOffset_NoError) + { + return; + } //-------------------------------------------------------- // Construction of tubes on edge. //-------------------------------------------------------- ChFiDS_TypeOfConcavity OT = ChFiDS_Convex; if (myOffset < 0.) OT = ChFiDS_Concave; - - for (Exp.Init(myFaceComp,TopAbs_EDGE); Exp.More(); Exp.Next()) { + + Message_ProgressScope aPS1(aPSOuter.Next(4), "Constructing tubes on edges", 1, Standard_True); + for (Exp.Init(myFaceComp,TopAbs_EDGE); Exp.More(); Exp.Next(), aPS1.Next()) { + if (!aPS1.More()) + { + myError = BRepOffset_UserBreak; + return; + } const TopoDS_Edge& E = TopoDS::Edge(Exp.Current()); if (Done.Add(E)) { const TopTools_ListOfShape& Anc = myAnalyse.Ancestors(E); @@ -1697,8 +1910,13 @@ void BRepOffset_MakeOffset::BuildOffsetByArc() //-------------------------------------------------------- Done.Clear(); TopTools_ListIteratorOfListOfShape it; - - for (Exp.Init(myFaceComp,TopAbs_VERTEX); Exp.More(); Exp.Next()) { + Message_ProgressScope aPS2(aPSOuter.Next(4), "Constructing spheres on vertices", 1, Standard_True); + for (Exp.Init(myFaceComp,TopAbs_VERTEX); Exp.More(); Exp.Next(), aPS2.Next()) { + if (!aPS2.More()) + { + myError = BRepOffset_UserBreak; + return; + } const TopoDS_Vertex& V = TopoDS::Vertex (Exp.Current()); if (Done.Add(V)) { const TopTools_ListOfShape& LA = myAnalyse.Ancestors(V); @@ -1758,7 +1976,13 @@ void BRepOffset_MakeOffset::BuildOffsetByArc() ChFiDS_TypeOfConcavity RT = ChFiDS_Concave; if (myOffset < 0.) RT = ChFiDS_Convex; BRepOffset_DataMapIteratorOfDataMapOfShapeOffset It(MapSF); - for ( ; It.More(); It.Next()) { + Message_ProgressScope aPS3(aPSOuter.Next(), NULL, MapSF.Size()); + for ( ; It.More(); It.Next(), aPS3.Next()) { + if (!aPS3.More()) + { + myError = BRepOffset_UserBreak; + return; + } const TopoDS_Shape& SI = It.Key(); const BRepOffset_Offset& SF = It.Value(); if (SF.Status() == BRepOffset_Reversed || @@ -2449,7 +2673,7 @@ void BRepOffset_MakeOffset::CorrectConicalFaces() //purpose : //======================================================================= -void BRepOffset_MakeOffset::Intersection3D(BRepOffset_Inter3d& Inter) +void BRepOffset_MakeOffset::Intersection3D(BRepOffset_Inter3d& Inter, const Message_ProgressRange& theRange) { #ifdef OCCT_DEBUG if (ChronBuild) { @@ -2458,6 +2682,7 @@ void BRepOffset_MakeOffset::Intersection3D(BRepOffset_Inter3d& Inter) Clock.Start(); } #endif + Message_ProgressScope aPS(theRange, NULL, (myFaces.Extent() && myJoin == GeomAbs_Arc) ? 2 : 1); // In the Complete Intersection mode, implemented currently for planar // solids only, there is no need to intersect the faces here. @@ -2480,13 +2705,18 @@ void BRepOffset_MakeOffset::Intersection3D(BRepOffset_Inter3d& Inter) // between the cap and the part. if (myJoin == GeomAbs_Arc) - Inter.ContextIntByArc (myFaces,InSide,myAnalyse,myInitOffsetFace,myInitOffsetEdge); + Inter.ContextIntByArc (myFaces,InSide,myAnalyse,myInitOffsetFace,myInitOffsetEdge, aPS.Next()); } if (myInter) { //------------- //Complete. //------------- - Inter.CompletInt (OffsetFaces,myInitOffsetFace); + Inter.CompletInt (OffsetFaces,myInitOffsetFace, aPS.Next()); + if (!aPS.More()) + { + myError = BRepOffset_UserBreak; + return; + } TopTools_IndexedMapOfShape& NewEdges = Inter.NewEdges(); if (myJoin == GeomAbs_Intersection) { BRepOffset_Tool::CorrectOrientation (myFaceComp,NewEdges,myAsDes,myInitOffsetFace,myOffset); @@ -2496,7 +2726,12 @@ void BRepOffset_MakeOffset::Intersection3D(BRepOffset_Inter3d& Inter) //-------------------------------- // Only between neighbor faces. //-------------------------------- - Inter.ConnexIntByArc(OffsetFaces,myFaceComp,myAnalyse,myInitOffsetFace); + Inter.ConnexIntByArc(OffsetFaces,myFaceComp,myAnalyse,myInitOffsetFace, aPS.Next()); + if (!aPS.More()) + { + myError = BRepOffset_UserBreak; + return; + } } #ifdef OCCT_DEBUG if ( ChronBuild) Clock.Show(); @@ -2508,8 +2743,9 @@ void BRepOffset_MakeOffset::Intersection3D(BRepOffset_Inter3d& Inter) //purpose : //======================================================================= -void BRepOffset_MakeOffset::Intersection2D(const TopTools_IndexedMapOfShape& Modif, - const TopTools_IndexedMapOfShape& NewEdges) +void BRepOffset_MakeOffset::Intersection2D (const TopTools_IndexedMapOfShape& Modif, + const TopTools_IndexedMapOfShape& NewEdges, + const Message_ProgressRange& theRange) { #ifdef OCCT_DEBUG if (ChronBuild) { @@ -2528,9 +2764,15 @@ void BRepOffset_MakeOffset::Intersection2D(const TopTools_IndexedMapOfShape& Mod //----------------------------------------------- TopTools_IndexedDataMapOfShapeListOfShape aDMVV; Standard_Integer i; + Message_ProgressScope aPS(theRange, "Intersection 2D", Modif.Extent()); for (i = 1; i <= Modif.Extent(); i++) { + if (!aPS.More()) + { + myError = BRepOffset_UserBreak; + return; + } const TopoDS_Face& F = TopoDS::Face(Modif(i)); - BRepOffset_Inter2d::Compute(myAsDes, F, NewEdges, myTol, myEdgeIntEdges, aDMVV); + BRepOffset_Inter2d::Compute(myAsDes, F, NewEdges, myTol, myEdgeIntEdges, aDMVV, aPS.Next()); } // BRepOffset_Inter2d::FuseVertices(aDMVV, myAsDes, myImageVV); @@ -2549,7 +2791,7 @@ void BRepOffset_MakeOffset::Intersection2D(const TopTools_IndexedMapOfShape& Mod //purpose : //======================================================================= -void BRepOffset_MakeOffset::MakeLoops(TopTools_IndexedMapOfShape& Modif) +void BRepOffset_MakeOffset::MakeLoops(TopTools_IndexedMapOfShape& Modif, const Message_ProgressRange& theRange) { #ifdef OCCT_DEBUG if (ChronBuild) { @@ -2569,11 +2811,17 @@ void BRepOffset_MakeOffset::MakeLoops(TopTools_IndexedMapOfShape& Modif) LF.Append(Modif(i)); } // + Message_ProgressScope aPS(theRange, NULL, LF.Extent() + myFaces.Extent()); if ((myJoin == GeomAbs_Intersection) && myInter && myIsPlanar) { - BuildSplitsOfTrimmedFaces(LF, myAsDes, myImageOffset); + BuildSplitsOfTrimmedFaces(LF, myAsDes, myImageOffset, aPS.Next(LF.Extent())); } else { - myMakeLoops.Build(LF,myAsDes,myImageOffset,myImageVV); + myMakeLoops.Build(LF,myAsDes,myImageOffset,myImageVV, aPS.Next(LF.Extent())); + } + if (!aPS.More()) + { + myError = BRepOffset_UserBreak; + return; } //----------------------------------------- @@ -2584,7 +2832,7 @@ void BRepOffset_MakeOffset::MakeLoops(TopTools_IndexedMapOfShape& Modif) Standard_Boolean InSide = 1; if (myOffset > 0 ) InSide = 0; - myMakeLoops.BuildOnContext(LC,myAnalyse,myAsDes,myImageOffset,InSide); + myMakeLoops.BuildOnContext(LC,myAnalyse,myAsDes,myImageOffset,InSide, aPS.Next(LC.Extent())); #ifdef OCCT_DEBUG if ( ChronBuild) Clock.Show(); @@ -2597,10 +2845,11 @@ void BRepOffset_MakeOffset::MakeLoops(TopTools_IndexedMapOfShape& Modif) // share edges that were reconstructed. //======================================================================= -void BRepOffset_MakeOffset::MakeFaces(TopTools_IndexedMapOfShape& /*Modif*/) +void BRepOffset_MakeOffset::MakeFaces (TopTools_IndexedMapOfShape& /*Modif*/, + const Message_ProgressRange& theRange) { #ifdef OCCT_DEBUG - if (ChronBuild) { + if (ChronBuild) { std::cout << " RECONSTRUCTION OF FACES:" << std::endl; Clock.Reset(); Clock.Start(); @@ -2619,13 +2868,18 @@ void BRepOffset_MakeOffset::MakeFaces(TopTools_IndexedMapOfShape& /*Modif*/) } } // + Message_ProgressScope aPS(theRange, NULL, 1); if ((myJoin == GeomAbs_Intersection) && myInter && myIsPlanar) { - BuildSplitsOfTrimmedFaces(LOF, myAsDes, myImageOffset); + BuildSplitsOfTrimmedFaces(LOF, myAsDes, myImageOffset, aPS.Next()); } else { - myMakeLoops.BuildFaces(LOF,myAsDes,myImageOffset); + myMakeLoops.BuildFaces(LOF, myAsDes, myImageOffset, aPS.Next()); + } + if (!aPS.More()) + { + myError = BRepOffset_UserBreak; + return; } - #ifdef OCCT_DEBUG if ( ChronBuild) Clock.Show(); #endif @@ -2672,7 +2926,7 @@ static void UpdateInitOffset (BRepAlgo_Image& myInitOffset, //function : MakeMissingWalls //purpose : //======================================================================= -void BRepOffset_MakeOffset::MakeMissingWalls () +void BRepOffset_MakeOffset::MakeMissingWalls (const Message_ProgressRange& theRange) { TopTools_IndexedDataMapOfShapeListOfShape Contours; //Start vertex + list of connected edges (free boundary) TopTools_DataMapOfShapeShape MapEF; //Edges of contours: edge + face @@ -2680,8 +2934,14 @@ void BRepOffset_MakeOffset::MakeMissingWalls () FillContours(myFaceComp, myAnalyse, Contours, MapEF); - for (Standard_Integer ic = 1; ic <= Contours.Extent(); ic++) + Message_ProgressScope aPS(theRange, "Making missing walls", Contours.Extent()); + for (Standard_Integer ic = 1; ic <= Contours.Extent(); ic++, aPS.Next()) { + if (!aPS.More()) + { + myError = BRepOffset_UserBreak; + return; + } TopoDS_Vertex StartVertex = TopoDS::Vertex(Contours.FindKey(ic)); TopoDS_Edge StartEdge; const TopTools_ListOfShape& aContour = Contours(ic); @@ -3105,7 +3365,7 @@ void BRepOffset_MakeOffset::MakeMissingWalls () //purpose : //======================================================================= -void BRepOffset_MakeOffset::MakeShells () +void BRepOffset_MakeOffset::MakeShells (const Message_ProgressRange& theRange) { #ifdef OCCT_DEBUG if (ChronBuild) { @@ -3115,12 +3375,18 @@ void BRepOffset_MakeOffset::MakeShells () } #endif // + Message_ProgressScope aPS(theRange, "Making shells", 1); // Prepare list of splits of the offset faces to make the shells TopTools_ListOfShape aLSF; const TopTools_ListOfShape& R = myImageOffset.Roots(); TopTools_ListIteratorOfListOfShape it(R); // for (; it.More(); it.Next()) { + if (!aPS.More()) + { + myError = BRepOffset_UserBreak; + return; + } TopoDS_Shape aF = it.Value(); if (myThickening) //offsetted faces must change their orientations aF.Reverse(); @@ -3158,7 +3424,7 @@ void BRepOffset_MakeOffset::MakeShells () IsSolid(myShape) && myIsPlanar) { // TopoDS_Shape aShells; - bDone = BuildShellsCompleteInter(aLSF, myImageOffset, aShells); + bDone = BuildShellsCompleteInter(aLSF, myImageOffset, aShells, aPS.Next()); if (bDone) { myOffsetShape = aShells; } @@ -3193,7 +3459,7 @@ void BRepOffset_MakeOffset::MakeShells () //purpose : //======================================================================= -void BRepOffset_MakeOffset::MakeSolid () +void BRepOffset_MakeOffset::MakeSolid (const Message_ProgressRange& theRange) { if (myOffsetShape.IsNull()) return; @@ -3209,11 +3475,18 @@ void BRepOffset_MakeOffset::MakeSolid () TopoDS_Shape S1; B.MakeCompound (NC); + Message_ProgressScope aPS(theRange, "Making solid", 1); + TopoDS_Solid Sol; B.MakeSolid(Sol); Sol.Closed(Standard_True); Standard_Boolean aMakeSolid = (myShape.ShapeType() == TopAbs_SOLID) || myThickening; for (exp.Init(myOffsetShape,TopAbs_SHELL); exp.More(); exp.Next()) { + if (!aPS.More()) + { + myError = BRepOffset_UserBreak; + return; + } TopoDS_Shell Sh = TopoDS::Shell(exp.Current()); if (myThickening && myOffset > 0.) Sh.Reverse(); @@ -3714,13 +3987,13 @@ void CorrectSolid(TopoDS_Solid& theSol, TopTools_ListOfShape& theSolList) //function : CheckInputData //purpose : Check input data for possibility of offset perform. //======================================================================= -Standard_Boolean BRepOffset_MakeOffset::CheckInputData() +Standard_Boolean BRepOffset_MakeOffset::CheckInputData(const Message_ProgressRange& theRange) { // Set initial error state. myError = BRepOffset_NoError; TopoDS_Shape aTmpShape; myBadShape = aTmpShape; - + Message_ProgressScope aPS(theRange, NULL, 1); // Non-null offset. if (Abs(myOffset) <= myTol) { @@ -3759,6 +4032,11 @@ Standard_Boolean BRepOffset_MakeOffset::CheckInputData() gp_Pnt2d aPnt2d; for( ; anExpSF.More(); anExpSF.Next()) { + if (!aPS.More()) + { + myError = BRepOffset_UserBreak; + return Standard_False; + } const TopoDS_Face& aF = TopoDS::Face(anExpSF.Current()); if (aPresenceMap.Contains(aF.TShape())) @@ -3992,30 +4270,44 @@ void BRepOffset_MakeOffset::IntersectEdges(const TopTools_ListOfShape& theFaces, TopTools_DataMapOfShapeShape& theMES, TopTools_DataMapOfShapeShape& theBuild, Handle(BRepAlgo_AsDes)& theAsDes, - Handle(BRepAlgo_AsDes)& theAsDes2d) + Handle(BRepAlgo_AsDes)& theAsDes2d, + const Message_ProgressRange& theRange) { Standard_Real aTolF; TopTools_IndexedDataMapOfShapeListOfShape aDMVV; // intersect edges created from edges TopTools_IndexedMapOfShape aMFV; + Message_ProgressScope aPSOuter(theRange, NULL , 2); + Message_ProgressScope aPS1(aPSOuter.Next(), NULL, theFaces.Size()); for (TopTools_ListOfShape::Iterator it (theFaces); it.More(); it.Next()) { const TopoDS_Face& aF = TopoDS::Face (it.Value()); aTolF = BRep_Tool::Tolerance (aF); if (!BRepOffset_Inter2d::ConnexIntByInt(aF, theMapSF(aF), theMES, theBuild, theAsDes, theAsDes2d, - myOffset, aTolF, myAnalyse, aMFV, myImageVV, myEdgeIntEdges, aDMVV)) + myOffset, aTolF, myAnalyse, aMFV, myImageVV, myEdgeIntEdges, aDMVV, aPS1.Next())) { myError = BRepOffset_CannotExtentEdge; return; } + if (!aPS1.More()) + { + myError = BRepOffset_UserBreak; + return; + } } // intersect edges created from vertices Standard_Integer i, aNbF = aMFV.Extent(); + Message_ProgressScope aPS2(aPSOuter.Next(), "Intersecting edges created from vertices", aNbF); for (i = 1; i <= aNbF; ++i) { const TopoDS_Face& aF = TopoDS::Face(aMFV(i)); aTolF = BRep_Tool::Tolerance(aF); BRepOffset_Inter2d::ConnexIntByIntInVert - (aF, theMapSF(aF), theMES, theBuild, theAsDes, theAsDes2d, aTolF, myAnalyse, aDMVV); + (aF, theMapSF(aF), theMES, theBuild, theAsDes, theAsDes2d, aTolF, myAnalyse, aDMVV, aPS2.Next()); + if (!aPS2.More()) + { + myError = BRepOffset_UserBreak; + return; + } } // // fuse vertices on edges @@ -4294,15 +4586,17 @@ void GetEnlargedFaces(const TopTools_ListOfShape& theFaces, //======================================================================= Standard_Boolean BuildShellsCompleteInter(const TopTools_ListOfShape& theLF, BRepAlgo_Image& theImage, - TopoDS_Shape& theShells) + TopoDS_Shape& theShells, + const Message_ProgressRange& theRange) { + Message_ProgressScope aPS(theRange, NULL, 5); // make solids BOPAlgo_MakerVolume aMV1; aMV1.SetArguments(theLF); // we need to intersect the faces to process the tangential faces aMV1.SetIntersect(Standard_True); aMV1.SetAvoidInternalShapes(Standard_True); - aMV1.Perform(); + aMV1.Perform(aPS.Next(3)); // Standard_Boolean bDone = ! aMV1.HasErrors(); if (!bDone) { @@ -4382,7 +4676,7 @@ Standard_Boolean BuildShellsCompleteInter(const TopTools_ListOfShape& theLF, // no need to intersect this time aMV2.SetIntersect(Standard_False); aMV2.SetAvoidInternalShapes(Standard_True); - aMV2.Perform(); + aMV2.Perform(aPS.Next()); bDone = ! aMV2.HasErrors(); if (!bDone) { return bDone; @@ -4433,7 +4727,7 @@ Standard_Boolean BuildShellsCompleteInter(const TopTools_ListOfShape& theLF, aMV3.SetArguments(aLF); aMV3.SetIntersect(Standard_False); aMV3.SetAvoidInternalShapes(Standard_True); - aMV3.Perform(); + aMV3.Perform(aPS.Next()); bDone = ! aMV3.HasErrors(); if (!bDone) { return bDone; @@ -4613,6 +4907,43 @@ Standard_Boolean GetSubShapes(const TopoDS_Shape& theShape, return Standard_True; } +//======================================================================= +//function : analyzeProgress +//purpose : +//======================================================================= +void BRepOffset_MakeOffset::analyzeProgress (const Standard_Real theWhole, + TColStd_Array1OfReal& theSteps) const +{ + theSteps.Init(0.0); + + // Set, approximately, the proportions for each operation. + // It is not a problem that the sum of the set values will not + // be equal to 100%, as the values will be normalized. + // The main point is to make the proportions valid relatively each other. + + // Proportions will be different for different connection types + Standard_Boolean isArc = (myJoin == GeomAbs_Arc); + Standard_Boolean isPlanarIntCase = myInter && !isArc && myIsPlanar && !myThickening && + myFaces.IsEmpty() && IsSolid(myShape); + + theSteps(PIOperation_CheckInputData) = 1.; + theSteps(PIOperation_Analyse) = 2.; + theSteps(PIOperation_BuildOffsetBy) = isPlanarIntCase ? 70. : (isArc ? 20. : 50.); + theSteps(PIOperation_Intersection) = isPlanarIntCase ? 0. : (isArc ? 50. : 20.); + if (myThickening) + { + theSteps(PIOperation_MakeMissingWalls) = 5.; + } + theSteps(PIOperation_MakeShells) = isPlanarIntCase ? 25. : 5.; + theSteps(PIOperation_MakeSolid) = 5.; + if (myIsPerformSewing && myThickening) + { + theSteps(PIOperation_Sewing) = 10.; + } + + normalizeSteps(theWhole, theSteps); +} + //======================================================================= //function : IsPlanar //purpose : Checks if all the faces of the shape are planes diff --git a/src/BRepOffset/BRepOffset_MakeOffset.hxx b/src/BRepOffset/BRepOffset_MakeOffset.hxx index ea99f9c92b..db5b95a4b4 100644 --- a/src/BRepOffset/BRepOffset_MakeOffset.hxx +++ b/src/BRepOffset/BRepOffset_MakeOffset.hxx @@ -36,6 +36,9 @@ #include #include #include +#include + +#include class BRepAlgo_AsDes; class TopoDS_Shape; class TopoDS_Face; @@ -44,7 +47,6 @@ class BRepAlgo_Image; class BRepOffset_Inter3d; - class BRepOffset_MakeOffset { public: @@ -61,7 +63,8 @@ public: const Standard_Boolean SelfInter = Standard_False, const GeomAbs_JoinType Join = GeomAbs_Arc, const Standard_Boolean Thickening = Standard_False, - const Standard_Boolean RemoveIntEdges = Standard_False); + const Standard_Boolean RemoveIntEdges = Standard_False, + const Message_ProgressRange& theRange = Message_ProgressRange()); Standard_EXPORT void Initialize (const TopoDS_Shape& S, const Standard_Real Offset, @@ -85,9 +88,9 @@ public: //! set the offset on the Face Standard_EXPORT void SetOffsetOnFace (const TopoDS_Face& F, const Standard_Real Off); - Standard_EXPORT void MakeOffsetShape(); + Standard_EXPORT void MakeOffsetShape(const Message_ProgressRange& theRange = Message_ProgressRange()); - Standard_EXPORT void MakeThickSolid(); + Standard_EXPORT void MakeThickSolid(const Message_ProgressRange& theRange = Message_ProgressRange()); Standard_EXPORT const BRepOffset_Analyse& GetAnalyse() const; @@ -124,7 +127,7 @@ public: //! 3) Check continuity of input surfaces. //! 4) Check for normals existence on grid. //! @return True if possible make computations and false otherwise. - Standard_EXPORT Standard_Boolean CheckInputData(); + Standard_EXPORT Standard_Boolean CheckInputData(const Message_ProgressRange& theRange); //! Return bad shape, which obtained in CheckInputData. Standard_EXPORT const TopoDS_Shape& GetBadShape() const; @@ -142,7 +145,11 @@ public: //! @name History methods protected: - + //! Analyze progress steps of the whole operation. + //! @param theWhole - sum of progress of all operations. + //! @oaram theSteps - steps of the operations supported by PI + Standard_EXPORT void analyzeProgress (const Standard_Real theWhole, + TColStd_Array1OfReal& theSteps) const; private: @@ -159,26 +166,28 @@ private: Standard_EXPORT void BuildFaceComp(); - Standard_EXPORT void BuildOffsetByArc(); + Standard_EXPORT void BuildOffsetByArc(const Message_ProgressRange& theRange); - Standard_EXPORT void BuildOffsetByInter(); + Standard_EXPORT void BuildOffsetByInter(const Message_ProgressRange& theRange); //! Make Offset faces - Standard_EXPORT void MakeOffsetFaces(BRepOffset_DataMapOfShapeOffset& theMapSF); + Standard_EXPORT void MakeOffsetFaces(BRepOffset_DataMapOfShapeOffset& theMapSF, const Message_ProgressRange& theRange); Standard_EXPORT void SelfInter (TopTools_MapOfShape& Modif); - Standard_EXPORT void Intersection3D (BRepOffset_Inter3d& Inter); + Standard_EXPORT void Intersection3D (BRepOffset_Inter3d& Inter, const Message_ProgressRange& theRange); - Standard_EXPORT void Intersection2D (const TopTools_IndexedMapOfShape& Modif, const TopTools_IndexedMapOfShape& NewEdges); + Standard_EXPORT void Intersection2D (const TopTools_IndexedMapOfShape& Modif, + const TopTools_IndexedMapOfShape& NewEdges, + const Message_ProgressRange& theRange); - Standard_EXPORT void MakeLoops (TopTools_IndexedMapOfShape& Modif); + Standard_EXPORT void MakeLoops (TopTools_IndexedMapOfShape& Modif, const Message_ProgressRange& theRange); Standard_EXPORT void MakeLoopsOnContext (TopTools_MapOfShape& Modif); - Standard_EXPORT void MakeFaces (TopTools_IndexedMapOfShape& Modif); + Standard_EXPORT void MakeFaces (TopTools_IndexedMapOfShape& Modif, const Message_ProgressRange& theRange); - Standard_EXPORT void MakeShells(); + Standard_EXPORT void MakeShells(const Message_ProgressRange& theRange); Standard_EXPORT void SelectShells(); @@ -187,7 +196,7 @@ private: //! Replace roots in history maps Standard_EXPORT void ReplaceRoots(); - Standard_EXPORT void MakeSolid(); + Standard_EXPORT void MakeSolid(const Message_ProgressRange& theRange); Standard_EXPORT void ToContext (BRepOffset_DataMapOfShapeOffset& MapSF); @@ -198,7 +207,7 @@ private: Standard_EXPORT void CorrectConicalFaces(); //! Private method used to build walls for thickening the shell - Standard_EXPORT void MakeMissingWalls(); + Standard_EXPORT void MakeMissingWalls(const Message_ProgressRange& theRange); //! Removes INTERNAL edges from the result Standard_EXPORT void RemoveInternalEdges(); @@ -209,7 +218,8 @@ private: TopTools_DataMapOfShapeShape& theMES, TopTools_DataMapOfShapeShape& theBuild, Handle(BRepAlgo_AsDes)& theAsDes, - Handle(BRepAlgo_AsDes)& theAsDes2d); + Handle(BRepAlgo_AsDes)& theAsDes2d, + const Message_ProgressRange& theRange); //! Building of the splits of the offset faces for mode Complete //! and joint type Intersection. This method is an advanced alternative @@ -221,13 +231,15 @@ private: TopTools_DataMapOfShapeListOfShape& theEdgesOrigins, TopTools_DataMapOfShapeShape& theFacesOrigins, TopTools_DataMapOfShapeShape& theETrimEInf, - BRepAlgo_Image& theImage); + BRepAlgo_Image& theImage, + const Message_ProgressRange& theRange); //! Building of the splits of the already trimmed offset faces for mode Complete //! and joint type Intersection. Standard_EXPORT void BuildSplitsOfTrimmedFaces(const TopTools_ListOfShape& theLF, const Handle(BRepAlgo_AsDes)& theAsDes, - BRepAlgo_Image& theImage); + BRepAlgo_Image& theImage, + const Message_ProgressRange& theRange); Standard_Real myOffset; Standard_Real myTol; diff --git a/src/BRepOffset/BRepOffset_MakeOffset_1.cxx b/src/BRepOffset/BRepOffset_MakeOffset_1.cxx index 3adba98fcd..170eed611f 100644 --- a/src/BRepOffset/BRepOffset_MakeOffset_1.cxx +++ b/src/BRepOffset/BRepOffset_MakeOffset_1.cxx @@ -119,7 +119,7 @@ namespace { ContainerType& theContainer, FenceMapType* theMFence) { - const TopTools_ListOfShape *pLSIm = theImages.Seek (theS); + const TopTools_ListOfShape* pLSIm = theImages.Seek (theS); if (pLSIm) { TopTools_ListIteratorOfListOfShape itLSIm (*pLSIm); @@ -181,7 +181,7 @@ namespace { //purpose : Checking if the edge is micro edge //======================================================================= static Standard_Boolean ProcessMicroEdge (const TopoDS_Edge& theEdge, - const Handle (IntTools_Context)& theCtx) + const Handle(IntTools_Context)& theCtx) { TopoDS_Vertex aV1, aV2; TopExp::Vertices (theEdge, aV1, aV2); @@ -220,7 +220,7 @@ namespace { } TopTools_ListOfShape aLSEmpt; - TopTools_ListOfShape *pLS = theOrigins.ChangeSeek (aS); + TopTools_ListOfShape* pLS = theOrigins.ChangeSeek (aS); if (!pLS) { pLS = &aLSEmpt; @@ -230,7 +230,7 @@ namespace { for (TopTools_ListOfShape::Iterator aIt (aLSIm); aIt.More(); aIt.Next()) { const TopoDS_Shape& aSIm = aIt.Value(); - if (TopTools_ListOfShape *pLSOr = theOrigins.ChangeSeek (aSIm)) + if (TopTools_ListOfShape* pLSOr = theOrigins.ChangeSeek (aSIm)) { // merge two lists for (TopTools_ListOfShape::Iterator aIt1 (*pLS); aIt1.More(); aIt1.Next()) @@ -371,7 +371,7 @@ namespace { if (!bFound && theAnalyse) { - const TopTools_ListOfShape *pLD = theAnalyse->Descendants (theSWhere); + const TopTools_ListOfShape* pLD = theAnalyse->Descendants (theSWhere); if (pLD) { for (TopTools_ListOfShape::Iterator it (*pLD); it.More(); it.Next()) @@ -396,14 +396,15 @@ namespace { //======================================================================= static void BuildSplitsOfTrimmedFace (const TopoDS_Face& theFace, const TopoDS_Shape& theEdges, - TopTools_ListOfShape& theLFImages) + TopTools_ListOfShape& theLFImages, + const Message_ProgressRange& theRange) { BOPAlgo_Splitter aSplitter; // aSplitter.AddArgument (theFace); aSplitter.AddArgument (theEdges); aSplitter.SetToFillHistory (Standard_False); - aSplitter.Perform(); + aSplitter.Perform (theRange); if (aSplitter.HasErrors()) { return; @@ -451,6 +452,10 @@ namespace { aBF.SetFace (aFF); aBF.SetShapes (aLE); aBF.Perform(); + if (aBF.HasErrors()) + { + return; + } // const TopTools_ListOfShape& aLFSp = aBF.Areas(); TopTools_ListIteratorOfListOfShape aItLF (aLFSp); @@ -478,7 +483,7 @@ namespace { const TopoDS_Edge& aE = *(TopoDS_Edge*)&aExp.Current(); // Standard_Real aT1, aT2; - const Handle (Geom_Curve)& aC = BRep_Tool::Curve (aE, aT1, aT2); + const Handle(Geom_Curve)& aC = BRep_Tool::Curve (aE, aT1, aT2); // gp_Pnt aP; gp_Vec aV, aVSum; @@ -528,7 +533,7 @@ class BRepOffset_BuildOffsetFaces void SetFaces (const TopTools_ListOfShape& theFaces) { myFaces = &theFaces; } //! Sets ascendants/descendants information - void SetAsDesInfo (const Handle (BRepAlgo_AsDes)& theAsDes) { myAsDes = theAsDes; } + void SetAsDesInfo (const Handle(BRepAlgo_AsDes)& theAsDes) { myAsDes = theAsDes; } //! Sets the analysis info of the input shape void SetAnalysis (const BRepOffset_Analyse& theAnalyse) { myAnalyzer = &theAnalyse; } @@ -545,18 +550,18 @@ class BRepOffset_BuildOffsetFaces public: //! @name Public methods to build the splits //! Build splits of already trimmed faces - void BuildSplitsOfTrimmedFaces(); + void BuildSplitsOfTrimmedFaces (const Message_ProgressRange& theRange); //! Building splits of not-trimmed offset faces. //! For the cases in which invalidities will be found, these invalidities will be rebuilt. - void BuildSplitsOfExtendedFaces(); + void BuildSplitsOfExtendedFaces (const Message_ProgressRange& theRange); private: //! @name private methods performing the job private: //! @name Intersection and post-treatment of edges //! Intersection of the trimmed edges among themselves - void IntersectTrimmedEdges(); + void IntersectTrimmedEdges (const Message_ProgressRange& theRange); //! Saving connection from trimmed edges to not trimmed ones void UpdateIntersectedEdges (const TopTools_ListOfShape& theLA, @@ -577,7 +582,8 @@ class BRepOffset_BuildOffsetFaces BRepOffset_DataMapOfShapeMapOfShape& theDMFMVIE, TopTools_DataMapOfShapeListOfShape& theDMEOrLEIm, TopTools_MapOfShape& theEdgesInvalidByVertex, - TopTools_MapOfShape& theEdgesValidByVertex); + TopTools_MapOfShape& theEdgesValidByVertex, + const Message_ProgressRange& theRange); //! Additional method to look for invalid edges void FindInvalidEdges (const TopTools_ListOfShape& theLFOffset, @@ -616,7 +622,7 @@ class BRepOffset_BuildOffsetFaces private: //! @name Checking faces //! Build splits of faces - void BuildSplitsOfFaces(); + void BuildSplitsOfFaces (const Message_ProgressRange& theRange); //! Looking for the invalid faces by analyzing their invalid edges void FindInvalidFaces (TopTools_ListOfShape& theLFImages, @@ -647,7 +653,8 @@ class BRepOffset_BuildOffsetFaces const TopTools_IndexedMapOfShape& theMFInvInHole, const TopoDS_Shape& theFHoles, TopTools_IndexedMapOfShape& theMERemoved, - TopTools_IndexedMapOfShape& theMEInside); + TopTools_IndexedMapOfShape& theMEInside, + const Message_ProgressRange& theRange); //! Looking for the connections between faces not to miss some necessary intersection void ShapesConnections (const TopTools_DataMapOfShapeShape& theDMFOr, @@ -686,7 +693,8 @@ class BRepOffset_BuildOffsetFaces void FindFacesToRebuild(); //! Intersection of the faces that should be rebuild to resolve all invalidities - void IntersectFaces (TopTools_MapOfShape& theVertsToAvoid); + void IntersectFaces (TopTools_MapOfShape& theVertsToAvoid, + const Message_ProgressRange& theRange); //! Preparation of the maps for analyzing intersections of the faces void PrepareFacesForIntersection (const Standard_Boolean theLookVertToAvoid, @@ -775,7 +783,8 @@ class BRepOffset_BuildOffsetFaces TopTools_MapOfShape& theMECheckExt, TopTools_MapOfShape& theVertsToAvoid, TopTools_DataMapOfShapeListOfShape& theEImages, - TopTools_DataMapOfShapeListOfShape& theEETrim); + TopTools_DataMapOfShapeListOfShape& theEETrim, + const Message_ProgressRange& theRange); //! Trims intersection edges void TrimNewIntersectionEdges (const TopTools_ListOfShape& theLE, @@ -842,7 +851,7 @@ class BRepOffset_BuildOffsetFaces private: //! Fill possible gaps (holes) in the splits of the offset faces - void FillGaps(); + void FillGaps (const Message_ProgressRange& theRange); //! Saving obtained results in history tools void FillHistory(); @@ -850,7 +859,7 @@ class BRepOffset_BuildOffsetFaces private: // Input data const TopTools_ListOfShape* myFaces; //!< Input faces which have to be split - Handle (BRepAlgo_AsDes) myAsDes; //!< Ascendants/descendants of the edges faces + Handle(BRepAlgo_AsDes) myAsDes; //!< Ascendants/descendants of the edges faces const BRepOffset_Analyse* myAnalyzer; //!< Analyzer of the input parameters TopTools_DataMapOfShapeListOfShape* myEdgesOrigins; //!< Origins of the offset edges (binding between offset edge and original edge) @@ -888,7 +897,7 @@ class BRepOffset_BuildOffsetFaces TopoDS_Shape mySolids; //!< Solids built from the splits of faces // Auxiliary tools - Handle (IntTools_Context) myContext; + Handle(IntTools_Context) myContext; // Output BRepAlgo_Image* myImage; //!< History of modifications @@ -898,7 +907,7 @@ class BRepOffset_BuildOffsetFaces //function : BuildSplitsOfTrimmedFaces //purpose : //======================================================================= -void BRepOffset_BuildOffsetFaces::BuildSplitsOfTrimmedFaces() +void BRepOffset_BuildOffsetFaces::BuildSplitsOfTrimmedFaces (const Message_ProgressRange& theRange) { if (!hasData (myFaces)) { @@ -911,11 +920,18 @@ void BRepOffset_BuildOffsetFaces::BuildSplitsOfTrimmedFaces() myEdgesOrigins = &anEdgesOrigins; } + Message_ProgressScope aPS (theRange, "Building splits of trimmed faces", 5); + // Fuse all edges - IntersectTrimmedEdges(); + IntersectTrimmedEdges (aPS.Next (1)); + Message_ProgressScope aPSLoop (aPS.Next (4), NULL, myFaces->Extent()); for (TopTools_ListOfShape::Iterator aItLF (*myFaces); aItLF.More(); aItLF.Next()) { + if (!aPSLoop.More()) + { + return; + } const TopoDS_Face& aF = *(TopoDS_Face*)&aItLF.Value(); TopoDS_Shape aCE; @@ -932,7 +948,7 @@ void BRepOffset_BuildOffsetFaces::BuildSplitsOfTrimmedFaces() } TopTools_ListOfShape aLFImages; - BuildSplitsOfTrimmedFace (aF, aCE, aLFImages); + BuildSplitsOfTrimmedFace (aF, aCE, aLFImages, aPSLoop.Next()); myOFImages.Add (aF, aLFImages); } @@ -944,7 +960,7 @@ void BRepOffset_BuildOffsetFaces::BuildSplitsOfTrimmedFaces() //function : BuildSplitsOfExtendedFaces //purpose : //======================================================================= -void BRepOffset_BuildOffsetFaces::BuildSplitsOfExtendedFaces() +void BRepOffset_BuildOffsetFaces::BuildSplitsOfExtendedFaces (const Message_ProgressRange& theRange) { // Check input data if (!hasData (myFaces) || !hasData (myEdgesOrigins) || !hasData (myFacesOrigins) || !hasData (myETrimEInf)) @@ -952,17 +968,36 @@ void BRepOffset_BuildOffsetFaces::BuildSplitsOfExtendedFaces() return; } - // Fusing all trimmed offset edges to avoid self-intersections in the splits - IntersectTrimmedEdges(); + Message_ProgressScope aPS (theRange, "Building splits of extended faces", 100.); + // Scope has to be added into a loop of undefined size. + // In general there are about 2 to 5 loops performed, each time + // decreasing complexity. So reserve for each next loop smaller time. + // Reserve also 4% on filling gaps after the faces are built. + Standard_Real aWhole = 100. - 4.; + // Fusing all trimmed offset edges to avoid self-intersections in the splits + IntersectTrimmedEdges (aPS.Next()); + if (!aPS.More()) + { + return; + } // vertices to avoid TopTools_MapOfShape aVertsToAvoid; // Limit total number of attempts by 10. This should be extra, as each invalid face can be // rebuilt only three times. So, in general, there are about 2-5 loops done. const Standard_Integer aNbMaxAttempts = 10; - for (Standard_Integer iCount = 0; iCount < aNbMaxAttempts; ++iCount) + // First progress portion is the half of the whole. Each next step is half of the previous: + // 48%, 24%, 12%, 6% and so on. This way in three loops it will already be 84%, + // and in four - 90%. So even if the loop will stop earlier, the not advanced scope + // will be acceptable. + Standard_Real aPart = aWhole / 2.; + for (Standard_Integer iCount = 1; iCount <= aNbMaxAttempts; ++iCount, aPart /= 2.) { + if (!aPS.More()) + { + return; + } // Clear the data before further faces construction myInvalidFaces.Clear(); myArtInvalidFaces.Clear(); @@ -974,8 +1009,13 @@ void BRepOffset_BuildOffsetFaces::BuildSplitsOfExtendedFaces() myFacesToRebuild.Clear(); myFSelfRebAvoid.Clear(); + // Split progress range on + // * building faces basing on currently available edges and + // * rebuilding faces basing on edges classification + Message_ProgressScope aPSLoop (aPS.Next (aPart), NULL, 10.); + // Build splits of the faces having new intersection edges - BuildSplitsOfFaces(); + BuildSplitsOfFaces (aPSLoop.Next (7.)); if (myInvalidFaces.IsEmpty()) { break; @@ -990,12 +1030,12 @@ void BRepOffset_BuildOffsetFaces::BuildSplitsOfExtendedFaces() // Perform new intersections myModifiedEdges.Clear(); - IntersectFaces (aVertsToAvoid); + IntersectFaces (aVertsToAvoid, aPSLoop.Next (3.)); } // Fill possible gaps in the splits of offset faces to increase possibility of // creating closed volume from these splits - FillGaps(); + FillGaps (aPS.Next (4.)); // Fill history for faces and edges FillHistory(); @@ -1038,14 +1078,19 @@ void BRepOffset_BuildOffsetFaces::UpdateIntersectedEdges (const TopTools_ListOfS //function : IntersectTrimmedEdges //purpose : //======================================================================= -void BRepOffset_BuildOffsetFaces::IntersectTrimmedEdges() +void BRepOffset_BuildOffsetFaces::IntersectTrimmedEdges (const Message_ProgressRange& theRange) { // get edges to intersect from descendants of the offset faces TopTools_ListOfShape aLS; // + Message_ProgressScope aPS (theRange, NULL, 2); TopTools_ListIteratorOfListOfShape aItLF (*myFaces); for (; aItLF.More(); aItLF.Next()) { + if (!aPS.More()) + { + return; + } const TopoDS_Face& aF = *(TopoDS_Face*)&aItLF.Value(); // const TopTools_ListOfShape& aLE = myAsDes->Descendant (aF); @@ -1075,7 +1120,7 @@ void BRepOffset_BuildOffsetFaces::IntersectTrimmedEdges() // perform intersection of the edges BOPAlgo_Builder aGFE; aGFE.SetArguments (aLS); - aGFE.Perform(); + aGFE.Perform (aPS.Next()); if (aGFE.HasErrors()) { return; @@ -1083,8 +1128,13 @@ void BRepOffset_BuildOffsetFaces::IntersectTrimmedEdges() // TopTools_ListOfShape aLA; // fill map with edges images - for (TopTools_ListOfShape::Iterator aIt (aLS); aIt.More(); aIt.Next()) + Message_ProgressScope aPSLoop (aPS.Next(), NULL, aLS.Size()); + for (TopTools_ListOfShape::Iterator aIt (aLS); aIt.More(); aIt.Next(), aPSLoop.Next()) { + if (!aPSLoop.More()) + { + return; + } const TopoDS_Shape& aE = aIt.Value(); const TopTools_ListOfShape& aLEIm = aGFE.Modified (aE); if (aLEIm.IsEmpty()) @@ -1120,7 +1170,7 @@ void BRepOffset_BuildOffsetFaces::IntersectTrimmedEdges() //purpose : Building the splits of offset faces and // looking for the invalid splits //======================================================================= -void BRepOffset_BuildOffsetFaces::BuildSplitsOfFaces() +void BRepOffset_BuildOffsetFaces::BuildSplitsOfFaces (const Message_ProgressRange& theRange) { BRep_Builder aBB; Standard_Integer i, aNb; @@ -1144,10 +1194,17 @@ void BRepOffset_BuildOffsetFaces::BuildSplitsOfFaces() // connection map from old edges to new ones TopTools_DataMapOfShapeListOfShape aDMEOrLEIm; // + // Outer range + Message_ProgressScope aPSOuter (theRange, NULL, 10.); // build splits of faces + Message_ProgressScope aPSBF (aPSOuter.Next (3.), "Building faces", 2 * myFaces->Extent()); TopTools_ListOfShape::Iterator aItLF (*myFaces); - for (; aItLF.More(); aItLF.Next()) + for (; aItLF.More(); aItLF.Next(), aPSBF.Next()) { + if (!aPSBF.More()) + { + return; + } const TopoDS_Face& aF = *(TopoDS_Face*)&aItLF.Value(); // TopTools_ListOfShape* pLFIm = myOFImages.ChangeSeek (aF); @@ -1276,7 +1333,7 @@ void BRepOffset_BuildOffsetFaces::BuildSplitsOfFaces() // find invalid edges FindInvalidEdges (aF, aLFImages, aDMFMVE, aDMFMNE, aDMFMIE, aDMFMVIE, - aDMEOrLEIm, aMEdgeInvalidByVertex, aMEdgeValidByVertex); + aDMEOrLEIm, aMEdgeInvalidByVertex, aMEdgeValidByVertex, aPSBF.Next()); // save the new splits if (!pLFIm) @@ -1365,11 +1422,17 @@ void BRepOffset_BuildOffsetFaces::BuildSplitsOfFaces() aBB.MakeCompound (aFHoles); // Find the faces containing only the inverted edges and the invalid ones TopTools_ListOfShape anInvertedFaces; + + Message_ProgressScope aPSIF (aPSOuter.Next (2.), "Checking validity of faces", aLFDone.Extent()); // find invalid faces // considering faces containing only invalid edges as invalid aItLF.Initialize (aLFDone); - for (; aItLF.More(); aItLF.Next()) + for (; aItLF.More(); aItLF.Next(), aPSIF.Next()) { + if (!aPSIF.More()) + { + return; + } const TopoDS_Face& aF = TopoDS::Face (aItLF.Value()); TopTools_ListOfShape& aLFImages = myOFImages.ChangeFromKey (aF); // @@ -1458,7 +1521,8 @@ void BRepOffset_BuildOffsetFaces::BuildSplitsOfFaces() // // remove inside faces TopTools_IndexedMapOfShape aMEInside; - RemoveInsideFaces (anInvertedFaces, aMFToCheckInt, aMFInvInHole, aFHoles, aMERemoved, aMEInside); + RemoveInsideFaces (anInvertedFaces, aMFToCheckInt, aMFInvInHole, aFHoles, + aMERemoved, aMEInside, aPSOuter.Next (5.)); // // make compound of valid splits TopoDS_Compound aCFIm; @@ -1779,7 +1843,8 @@ void BRepOffset_BuildOffsetFaces::FindInvalidEdges (const TopoDS_Face& theF, BRepOffset_DataMapOfShapeMapOfShape& theDMFMVIE, TopTools_DataMapOfShapeListOfShape& theDMEOrLEIm, TopTools_MapOfShape& theEdgesInvalidByVertex, - TopTools_MapOfShape& theEdgesValidByVertex) + TopTools_MapOfShape& theEdgesValidByVertex, + const Message_ProgressRange& theRange) { // Edge is considered as invalid in the following cases: // 1. Its orientation on the face has changed comparing to the originals edge and face; @@ -1804,9 +1869,14 @@ void BRepOffset_BuildOffsetFaces::FindInvalidEdges (const TopoDS_Face& theF, // back map from the original shapes to their offset images TopTools_DataMapOfShapeListOfShape anImages; // + Message_ProgressScope aPS (theRange, "Checking validity of edges", 2 * theLFImages.Extent()); TopTools_ListIteratorOfListOfShape aItLF (theLFImages); - for (; aItLF.More(); aItLF.Next()) + for (; aItLF.More(); aItLF.Next(), aPS.Next()) { + if (!aPS.More()) + { + return; + } const TopoDS_Face& aFIm = *(TopoDS_Face*)&aItLF.Value(); // TopExp_Explorer aExp (aFIm, TopAbs_EDGE); @@ -1861,8 +1931,12 @@ void BRepOffset_BuildOffsetFaces::FindInvalidEdges (const TopoDS_Face& theF, TopTools_IndexedDataMapOfShapeListOfShape aDMVEFOr; // aItLF.Initialize (theLFImages); - for (; aItLF.More(); aItLF.Next()) + for (; aItLF.More(); aItLF.Next(), aPS.Next()) { + if (!aPS.More()) + { + return; + } const TopoDS_Face& aFIm = *(TopoDS_Face*)&aItLF.Value(); // // valid edges for this split @@ -1928,7 +2002,7 @@ void BRepOffset_BuildOffsetFaces::FindInvalidEdges (const TopoDS_Face& theF, TopExp::MapShapesAndAncestors (aFOr, TopAbs_VERTEX, TopAbs_EDGE, aDMVEFOr); } // - TopTools_ListOfShape *pLEFOr = aDMVEFOr.ChangeSeek (aSOr); + TopTools_ListOfShape* pLEFOr = aDMVEFOr.ChangeSeek (aSOr); if (pLEFOr) { TopoDS_Compound aCEOr; @@ -1955,7 +2029,7 @@ void BRepOffset_BuildOffsetFaces::FindInvalidEdges (const TopoDS_Face& theF, { FindShape (aSOr, aFOr, myAnalyzer, aEOrF); // - TopTools_ListOfShape *pLEIm = theDMEOrLEIm.ChangeSeek (aSOr); + TopTools_ListOfShape* pLEIm = theDMEOrLEIm.ChangeSeek (aSOr); if (!pLEIm) { pLEIm = theDMEOrLEIm.Bound (aSOr, TopTools_ListOfShape()); @@ -2266,7 +2340,7 @@ void BRepOffset_BuildOffsetFaces::FindInvalidEdges (const TopTools_ListOfShape& (!pMEValid || !pMEValid->Contains (aE))) { // but not in the current one - TopTools_MapOfShape *pMap = aMEUnclassified.ChangeSeek (aE); + TopTools_MapOfShape* pMap = aMEUnclassified.ChangeSeek (aE); if (!pMap) pMap = &aMEUnclassified (aMEUnclassified.Add (aE, TopTools_MapOfShape())); pMap->Add (aFIm); @@ -2696,7 +2770,7 @@ void BRepOffset_BuildOffsetFaces::FindFacesInsideHoleWires (const TopoDS_Face& t return; } // - TopTools_ListOfShape *pLFNewHoles = myFNewHoles.ChangeSeek (theFOrigin); + TopTools_ListOfShape* pLFNewHoles = myFNewHoles.ChangeSeek (theFOrigin); // if (!pLFNewHoles) { @@ -2727,7 +2801,7 @@ void BRepOffset_BuildOffsetFaces::FindFacesInsideHoleWires (const TopoDS_Face& t for (; aItE.More(); aItE.Next()) { const TopoDS_Shape& aEOr = aItE.Value(); - const TopTools_ListOfShape *pLEIm = theDMEOrLEIm.Seek (aEOr); + const TopTools_ListOfShape* pLEIm = theDMEOrLEIm.Seek (aEOr); if (!pLEIm || pLEIm->IsEmpty()) { continue; @@ -3162,7 +3236,7 @@ Standard_Boolean BRepOffset_BuildOffsetFaces::CheckInvertedBlock (const TopoDS_S for (; aItE.More(); aItE.Next()) { const TopoDS_Shape& aE = aItE.Value(); - const TopTools_ListOfShape *pLEOr = myOEOrigins.Seek (aE); + const TopTools_ListOfShape* pLEOr = myOEOrigins.Seek (aE); if (!pLEOr) { aMEOrigins.Add (aE); @@ -3275,7 +3349,7 @@ void BRepOffset_BuildOffsetFaces::RemoveInvalidSplitsByInvertedEdges (TopTools_I { const TopoDS_Shape& aE = aExp.Current(); // - TopTools_ListOfShape *pLF = aDMEF.ChangeSeek (aE); + TopTools_ListOfShape* pLF = aDMEF.ChangeSeek (aE); if (!pLF) { pLF = aDMEF.Bound (aE, TopTools_ListOfShape()); @@ -3294,7 +3368,7 @@ void BRepOffset_BuildOffsetFaces::RemoveInvalidSplitsByInvertedEdges (TopTools_I { const TopoDS_Shape& aV = aExp.Current(); // - TopTools_ListOfShape *pLF = aDMVF.ChangeSeek (aV); + TopTools_ListOfShape* pLF = aDMVF.ChangeSeek (aV); if (!pLF) { pLF = aDMVF.Bound (aV, TopTools_ListOfShape()); @@ -3340,7 +3414,7 @@ void BRepOffset_BuildOffsetFaces::RemoveInvalidSplitsByInvertedEdges (TopTools_I for (; aIt.More(); aIt.Next()) { const TopoDS_Shape& aV = aIt.Value(); - const TopTools_ListOfShape *pLF = aDMVF.Seek (aV); + const TopTools_ListOfShape* pLF = aDMVF.Seek (aV); if (pLF && (pLF->Extent() > 3)) { aMERem.Add (aE); @@ -3787,7 +3861,8 @@ void BRepOffset_BuildOffsetFaces::RemoveInsideFaces (const TopTools_ListOfShape& const TopTools_IndexedMapOfShape& theMFInvInHole, const TopoDS_Shape& theFHoles, TopTools_IndexedMapOfShape& theMERemoved, - TopTools_IndexedMapOfShape& theMEInside) + TopTools_IndexedMapOfShape& theMEInside, + const Message_ProgressRange& theRange) { TopTools_ListOfShape aLS; TopTools_MapOfShape aMFence; @@ -3795,9 +3870,14 @@ void BRepOffset_BuildOffsetFaces::RemoveInsideFaces (const TopTools_ListOfShape& TopTools_ListIteratorOfListOfShape aItLF; TopTools_DataMapOfShapeShape aDMFImF; // + Message_ProgressScope aPS (theRange, "Looking for inside faces", 10); Standard_Integer i, aNb = myOFImages.Extent(); for (i = 1; i <= aNb; ++i) { + if (!aPS.More()) + { + return; + } const TopoDS_Shape& aF = myOFImages.FindKey (i); // to avoid intersection of the splits of the same // offset faces among themselves make compound of the @@ -3847,7 +3927,7 @@ void BRepOffset_BuildOffsetFaces::RemoveInsideFaces (const TopTools_ListOfShape& BOPAlgo_MakerVolume aMV; aMV.SetArguments (aLS); aMV.SetIntersect (Standard_True); - aMV.Perform(); + aMV.Perform (aPS.Next (9)); if (aMV.HasErrors()) return; @@ -3888,6 +3968,10 @@ void BRepOffset_BuildOffsetFaces::RemoveInsideFaces (const TopTools_ListOfShape& aNb = myOFImages.Extent(); for (i = 1; i <= aNb; ++i) { + if (!aPS.More()) + { + return; + } const TopTools_ListOfShape& aLFIm = myOFImages (i); if (aLFIm.IsEmpty()) { @@ -3969,6 +4053,10 @@ void BRepOffset_BuildOffsetFaces::RemoveInsideFaces (const TopTools_ListOfShape& Standard_Integer aNbFH = theMFInvInHole.Extent(); for (i = 1; i <= aNbFH; ++i) { + if (!aPS.More()) + { + return; + } const TopoDS_Shape& aFInv = theMFInvInHole (i); TopTools_ListOfShape aLFInvIm = aMV.Modified (aFInv); if (aLFInvIm.IsEmpty()) @@ -3976,7 +4064,7 @@ void BRepOffset_BuildOffsetFaces::RemoveInsideFaces (const TopTools_ListOfShape& aLFInvIm.Append (aFInv); } // - const TopoDS_Shape *pFOffset = aDMFImF.Seek (aFInv); + const TopoDS_Shape* pFOffset = aDMFImF.Seek (aFInv); if (!pFOffset) { continue; @@ -4014,6 +4102,10 @@ void BRepOffset_BuildOffsetFaces::RemoveInsideFaces (const TopTools_ListOfShape& TopExp_Explorer aExpS (aSols, TopAbs_SOLID); for (; aExpS.More(); aExpS.Next()) { + if (!aPS.More()) + { + return; + } const TopoDS_Shape& aSol = aExpS.Current(); // Standard_Boolean bAllInv (Standard_True), bAllRemoved (Standard_True); @@ -4176,7 +4268,7 @@ void BRepOffset_BuildOffsetFaces::ShapesConnections (const TopTools_DataMapOfSha BOPDS_ListIteratorOfListOfPaveBlock aItLPB (aLPB); for (; aItLPB.More(); aItLPB.Next()) { - const Handle (BOPDS_PaveBlock)& aPB = aItLPB.Value(); + const Handle(BOPDS_PaveBlock)& aPB = aItLPB.Value(); Standard_Integer nEInt; if (aPB->HasEdge (nEInt)) { @@ -4257,7 +4349,7 @@ void BRepOffset_BuildOffsetFaces::ShapesConnections (const TopTools_DataMapOfSha for (; aItLE.More(); aItLE.Next()) { const TopoDS_Shape& aEOr = aItLE.Value(); - TopTools_ListOfShape *pLFE = mySSInterfs.ChangeSeek (aEOr); + TopTools_ListOfShape* pLFE = mySSInterfs.ChangeSeek (aEOr); if (!pLFE) { pLFE = mySSInterfs.Bound (aEOr, TopTools_ListOfShape()); @@ -4269,7 +4361,7 @@ void BRepOffset_BuildOffsetFaces::ShapesConnections (const TopTools_DataMapOfSha if (bFound) { // save connection between offset faces - TopTools_ListOfShape *pLF = mySSInterfs.ChangeSeek (aF); + TopTools_ListOfShape* pLF = mySSInterfs.ChangeSeek (aF); if (!pLF) { pLF = mySSInterfs.Bound (aF, TopTools_ListOfShape()); @@ -4394,7 +4486,7 @@ void BRepOffset_BuildOffsetFaces::RemoveHangingParts (const BOPAlgo_MakerVolume& for (; anExpE.More() && !bIsConnected; anExpE.Next()) { const TopoDS_Shape& aE = anExpE.Current(); - const TopTools_ListOfShape *pLF = aDMEF.Seek (aE); + const TopTools_ListOfShape* pLF = aDMEF.Seek (aE); if (pLF) { TopTools_ListIteratorOfListOfShape aItLF (*pLF); @@ -4409,7 +4501,7 @@ void BRepOffset_BuildOffsetFaces::RemoveHangingParts (const BOPAlgo_MakerVolume& for (; anExpV.More() && !bIsConnected; anExpV.Next()) { const TopoDS_Shape& aV = anExpV.Current(); - const TopTools_ListOfShape *pLE = aDMVE.Seek (aV); + const TopTools_ListOfShape* pLE = aDMVE.Seek (aV); if (pLE) { TopTools_ListIteratorOfListOfShape aItLE (*pLE); @@ -5119,13 +5211,16 @@ void BRepOffset_BuildOffsetFaces::FindFacesToRebuild() //function : IntersectFaces //purpose : Intersection of the faces that should be rebuild to resolve all invalidities //======================================================================= -void BRepOffset_BuildOffsetFaces::IntersectFaces (TopTools_MapOfShape& theVertsToAvoid) +void BRepOffset_BuildOffsetFaces::IntersectFaces (TopTools_MapOfShape& theVertsToAvoid, + const Message_ProgressRange& theRange) { Standard_Integer aNbFR = myFacesToRebuild.Extent(); if (!aNbFR) { return; } + + Message_ProgressScope aPSOuter (theRange, "Rebuilding invalid faces", 10); // Standard_Integer i, j, k, aNbInv; TopTools_ListIteratorOfListOfShape aItLF, aItLE; @@ -5167,6 +5262,12 @@ void BRepOffset_BuildOffsetFaces::IntersectFaces (TopTools_MapOfShape& theVertsT TopTools_MapOfShape aMVRInv = theVertsToAvoid; FindVerticesToAvoid (aDMEFInv, aDMVEFull, aMVRInv); // + aPSOuter.Next(); + if (!aPSOuter.More()) + { + return; + } + // The faces should be intersected selectively - // intersect only faces neighboring to the same invalid face // and connected to its invalid edges; @@ -5198,9 +5299,14 @@ void BRepOffset_BuildOffsetFaces::IntersectFaces (TopTools_MapOfShape& theVertsT // alone edges TopTools_MapOfShape aMEAlone, aMEInvOnArt; // + Message_ProgressScope aPSArt (aPSOuter.Next(), NULL, aLCBArt.Extent()); TopTools_ListIteratorOfListOfShape aItLCBArt (aLCBArt); - for (; aItLCBArt.More(); aItLCBArt.Next()) + for (; aItLCBArt.More(); aItLCBArt.Next(), aPSArt.Next()) { + if (!aPSArt.More()) + { + return; + } const TopoDS_Shape& aCB = aItLCBArt.Value(); // // check if aCB contains splits of only one offset face @@ -5235,7 +5341,7 @@ void BRepOffset_BuildOffsetFaces::IntersectFaces (TopTools_MapOfShape& theVertsT // if (bAlone) { - const TopTools_ListOfShape *pLEOr = myOEOrigins.Seek (aE); + const TopTools_ListOfShape* pLEOr = myOEOrigins.Seek (aE); if (pLEOr) { TopTools_ListIteratorOfListOfShape aItLEOr (*pLEOr); @@ -5307,7 +5413,7 @@ void BRepOffset_BuildOffsetFaces::IntersectFaces (TopTools_MapOfShape& theVertsT } // // the edge is useless - look for other images - const TopTools_ListOfShape *pLEOr = myOEOrigins.Seek (aE); + const TopTools_ListOfShape* pLEOr = myOEOrigins.Seek (aE); if (!pLEOr) { continue; @@ -5374,8 +5480,13 @@ void BRepOffset_BuildOffsetFaces::IntersectFaces (TopTools_MapOfShape& theVertsT TopTools_IndexedDataMapOfShapeListOfShape aDMOENEdges; aNbInv = myInvalidFaces.Extent(); + Message_ProgressScope aPSInter (aPSOuter.Next (5), NULL, aNbInv); for (k = 1; k <= aNbInv; ++k) { + if (!aPSInter.More()) + { + return; + } const TopoDS_Shape& aFInv = myInvalidFaces.FindKey (k); Standard_Boolean bSelfRebAvoid = myFSelfRebAvoid.Contains (aFInv); const TopTools_ListOfShape& aLFInv = myInvalidFaces (k); @@ -5402,10 +5513,15 @@ void BRepOffset_BuildOffsetFaces::IntersectFaces (TopTools_MapOfShape& theVertsT aLCB = aLFInv; } // + Message_ProgressScope aPSCB (aPSInter.Next(), NULL, aLCB.Extent()); Standard_Boolean bArtificial = myArtInvalidFaces.IsBound (aFInv); TopTools_ListIteratorOfListOfShape aItLCB (aLCB); for (; aItLCB.More(); aItLCB.Next()) { + if (!aPSCB.More()) + { + return; + } const TopoDS_Shape& aCBInv = aItLCB.Value(); // TopTools_MapOfShape aMEFence; @@ -5430,9 +5546,14 @@ void BRepOffset_BuildOffsetFaces::IntersectFaces (TopTools_MapOfShape& theVertsT TopTools_ListOfShape aLCBE; BOPTools_AlgoTools::MakeConnexityBlocks (aCBE, TopAbs_VERTEX, TopAbs_EDGE, aLCBE); // + Message_ProgressScope aPSCBE (aPSCB.Next(), NULL, aLCBE.Extent()); TopTools_ListIteratorOfListOfShape aItLCBE (aLCBE); for (; aItLCBE.More(); aItLCBE.Next()) { + if (!aPSCBE.More()) + { + return; + } const TopoDS_Shape& aCBELoc = aItLCBE.Value(); // // map of edges and vertices of processing invalidity @@ -5458,6 +5579,7 @@ void BRepOffset_BuildOffsetFaces::IntersectFaces (TopTools_MapOfShape& theVertsT if (aMFInt.Extent() < 3) { // nothing to intersect + aPSCBE.Next(); continue; } // @@ -5466,8 +5588,13 @@ void BRepOffset_BuildOffsetFaces::IntersectFaces (TopTools_MapOfShape& theVertsT // among each other (except for the artificially invalid faces) TopTools_IndexedMapOfShape aMEToInt; Standard_Integer aNb = aMFInt.Extent(); - for (i = 1; i <= aNb; ++i) + Message_ProgressScope aPSIntPair (aPSCBE.Next(), NULL, aNb); + for (i = 1; i <= aNb; ++i, aPSIntPair.Next()) { + if (!aPSIntPair.More()) + { + return; + } const TopoDS_Face& aFi = TopoDS::Face (aMFInt (i)); if (bSelfRebAvoid && aFi.IsSame (aFInv)) { @@ -5573,7 +5700,8 @@ void BRepOffset_BuildOffsetFaces::IntersectFaces (TopTools_MapOfShape& theVertsT } // // filter the obtained edges - UpdateValidEdges (aFLE, aDMOENEdges, aMVBounds, aMEInvOnArt, aMECheckExt, theVertsToAvoid, aEImages, aDMEETrim); + UpdateValidEdges (aFLE, aDMOENEdges, aMVBounds, aMEInvOnArt, aMECheckExt, + theVertsToAvoid, aEImages, aDMEETrim, aPSOuter.Next (3)); } //======================================================================= @@ -5607,7 +5735,7 @@ void BRepOffset_BuildOffsetFaces::PrepareFacesForIntersection (const Standard_Bo { const TopoDS_Shape& aE = aExp.Current(); // save connection to untrimmed face - TopTools_ListOfShape *pLF = theDMSF.ChangeSeek (aE); + TopTools_ListOfShape* pLF = theDMSF.ChangeSeek (aE); if (!pLF) { pLF = theDMSF.Bound (aE, TopTools_ListOfShape()); @@ -5616,7 +5744,7 @@ void BRepOffset_BuildOffsetFaces::PrepareFacesForIntersection (const Standard_Bo // // save connection to untrimmed edge const TopoDS_Shape& aEInf = myETrimEInf->Find (aE); - TopTools_ListOfShape *pLETrim = theMEInfETrim.ChangeSeek (aEInf); + TopTools_ListOfShape* pLETrim = theMEInfETrim.ChangeSeek (aEInf); if (!pLETrim) { pLETrim = theMEInfETrim.Bound (aEInf, TopTools_ListOfShape()); @@ -5628,7 +5756,7 @@ void BRepOffset_BuildOffsetFaces::PrepareFacesForIntersection (const Standard_Bo { const TopoDS_Shape& aV = aExpV.Current(); // save connection to face - TopTools_ListOfShape *pLFV = theDMSF.ChangeSeek (aV); + TopTools_ListOfShape* pLFV = theDMSF.ChangeSeek (aV); if (!pLFV) { pLFV = theDMSF.Bound (aV, TopTools_ListOfShape()); @@ -5638,7 +5766,7 @@ void BRepOffset_BuildOffsetFaces::PrepareFacesForIntersection (const Standard_Bo if (theLookVertToAvoid) { // save connection to edges - TopTools_ListOfShape *pLEV = theDMVEFull.ChangeSeek (aV); + TopTools_ListOfShape* pLEV = theDMVEFull.ChangeSeek (aV); if (!pLEV) { pLEV = theDMVEFull.Bound (aV, TopTools_ListOfShape()); @@ -5652,7 +5780,7 @@ void BRepOffset_BuildOffsetFaces::PrepareFacesForIntersection (const Standard_Bo if (theLookVertToAvoid) { // get edges of invalid faces (from invalid splits only) - const TopTools_ListOfShape *pLFInv = myInvalidFaces.Seek (aF); + const TopTools_ListOfShape* pLFInv = myInvalidFaces.Seek (aF); if (!pLFInv || myArtInvalidFaces.IsBound (aF)) { continue; @@ -5666,7 +5794,7 @@ void BRepOffset_BuildOffsetFaces::PrepareFacesForIntersection (const Standard_Bo for (; aExp.More(); aExp.Next()) { const TopoDS_Shape& aE = aExp.Current(); - TopTools_ListOfShape *pLF = theDMEFInv.ChangeSeek (aE); + TopTools_ListOfShape* pLF = theDMEFInv.ChangeSeek (aE); if (!pLF) { pLF = &theDMEFInv (theDMEFInv.Add (aE, TopTools_ListOfShape())); @@ -5707,7 +5835,7 @@ void BRepOffset_BuildOffsetFaces::FindVerticesToAvoid (const TopTools_IndexedDat TopTools_IndexedDataMapOfShapeListOfShape aMVEEdges; // Do not check the splitting vertices, but check only the ending ones - const TopTools_ListOfShape *pLEOr = myOEOrigins.Seek (aE); + const TopTools_ListOfShape* pLEOr = myOEOrigins.Seek (aE); if (pLEOr) { TopTools_ListIteratorOfListOfShape aItLEOr (*pLEOr); @@ -5736,7 +5864,7 @@ void BRepOffset_BuildOffsetFaces::FindVerticesToAvoid (const TopTools_IndexedDat const TopoDS_Shape& aV = aMVEEdges.FindKey (j); if (!aMFence.Add (aV)) continue; - const TopTools_ListOfShape *pLE = theDMVEFull.Seek (aV); + const TopTools_ListOfShape* pLE = theDMVEFull.Seek (aV); if (!pLE) { // isolated vertex @@ -6350,7 +6478,7 @@ void BRepOffset_BuildOffsetFaces::IntersectAndTrimEdges (const TopTools_IndexedM continue; } // - TopTools_ListOfShape *pLVE = aDMVE.ChangeSeek (aV); + TopTools_ListOfShape* pLVE = aDMVE.ChangeSeek (aV); if (!pLVE) { continue; @@ -6639,8 +6767,10 @@ void BRepOffset_BuildOffsetFaces::UpdateValidEdges (const TopTools_IndexedDataMa TopTools_MapOfShape& theMECheckExt, TopTools_MapOfShape& theVertsToAvoid, TopTools_DataMapOfShapeListOfShape& theEImages, - TopTools_DataMapOfShapeListOfShape& theEETrim) + TopTools_DataMapOfShapeListOfShape& theEETrim, + const Message_ProgressRange& theRange) { + Message_ProgressScope aPSOuter (theRange, "Updating edges", 10); // update images and origins of edges, plus update AsDes // // new edges @@ -6702,6 +6832,12 @@ void BRepOffset_BuildOffsetFaces::UpdateValidEdges (const TopTools_IndexedDataMa return; } + aPSOuter.Next(); + if (!aPSOuter.More()) + { + return; + } + BRep_Builder aBB; // Make connexity blocks of the invalid edges @@ -6724,9 +6860,14 @@ void BRepOffset_BuildOffsetFaces::UpdateValidEdges (const TopTools_IndexedDataMa // Intersected splits TopTools_IndexedDataMapOfShapeListOfShape aMBlocksSp; + Message_ProgressScope aPSB (aPSOuter.Next(), NULL, aLBlocks.Extent()); TopTools_ListIteratorOfListOfShape aItLB (aLBlocks); - for (; aItLB.More(); aItLB.Next()) + for (; aItLB.More(); aItLB.Next(), aPSB.Next()) { + if (!aPSB.More()) + { + return; + } const TopoDS_Shape& aBlock = aItLB.Value(); // Get the list of new edges for the block @@ -6795,8 +6936,13 @@ void BRepOffset_BuildOffsetFaces::UpdateValidEdges (const TopTools_IndexedDataMa TopTools_ListOfShape aLValBlocks; Standard_Integer aNbB = aMBlocksSp.Extent(); - for (i = 1; i <= aNbB; ++i) + Message_ProgressScope aPSBSp (aPSOuter.Next(), NULL, aNbB); + for (i = 1; i <= aNbB; ++i, aPSBSp.Next()) { + if (!aPSBSp.More()) + { + return; + } const TopoDS_Shape& aCE = aMBlocksSp.FindKey (i); const TopTools_ListOfShape& aBlockLENew = aMBlocksSp (i); @@ -6805,7 +6951,7 @@ void BRepOffset_BuildOffsetFaces::UpdateValidEdges (const TopTools_IndexedDataMa TopTools_ListIteratorOfListOfShape aItLE (aBlockLENew); for (; aItLE.More(); aItLE.Next()) { - const TopTools_ListOfShape *pLF = aMELF.Seek (aItLE.Value()); + const TopTools_ListOfShape* pLF = aMELF.Seek (aItLE.Value()); if (!pLF) continue; TopTools_ListIteratorOfListOfShape aItLF (*pLF); @@ -6855,6 +7001,12 @@ void BRepOffset_BuildOffsetFaces::UpdateValidEdges (const TopTools_IndexedDataMa return; } + aPSOuter.Next(); + if (!aPSOuter.More()) + { + return; + } + // SECOND STAGE - Filter the remaining splits together // Add for intersection already removed new edges using them @@ -6878,6 +7030,12 @@ void BRepOffset_BuildOffsetFaces::UpdateValidEdges (const TopTools_IndexedDataMa else aSplits1 = aLValBlocks.First(); + aPSOuter.Next(); + if (!aPSOuter.More()) + { + return; + } + // Get all faces to get the bounds from their splits TopTools_ListOfShape aLFaces; for (i = 1; i <= myOFImages.Extent(); ++i) @@ -6897,6 +7055,12 @@ void BRepOffset_BuildOffsetFaces::UpdateValidEdges (const TopTools_IndexedDataMa TopoDS_Shape aSplits; FilterSplits (aLE, aMEInv, Standard_True, theEImages, aSplits); + aPSOuter.Next(); + if (!aPSOuter.More()) + { + return; + } + // get bounds to update // we need to update the edges of all the affected faces TopTools_ListOfShape aLF; @@ -6952,7 +7116,7 @@ void BRepOffset_BuildOffsetFaces::UpdateValidEdges (const TopTools_IndexedDataMa BOPAlgo_Builder aGF; aGF.AddArgument (aBounds); aGF.AddArgument (aSplits); - aGF.Perform(); + aGF.Perform (aPSOuter.Next (3)); // // update splits UpdateImages (aLE, theEImages, aGF, myModifiedEdges); @@ -6996,8 +7160,8 @@ void BRepOffset_BuildOffsetFaces::UpdateValidEdges (const TopTools_IndexedDataMa const BOPDS_ListOfPaveBlock& aLPB = pDS->PaveBlocks (pDS->Index (aE)); if (aLPB.Extent() == 1) { - const Handle (BOPDS_PaveBlock)& aPB = aLPB.First(); - const Handle (BOPDS_CommonBlock)& aCB = pDS->CommonBlock (aPB); + const Handle(BOPDS_PaveBlock)& aPB = aLPB.First(); + const Handle(BOPDS_CommonBlock)& aCB = pDS->CommonBlock (aPB); if (!aCB.IsNull()) { const BOPDS_ListOfPaveBlock& aLPBCB = aCB->PaveBlocks(); @@ -7393,7 +7557,7 @@ void BRepOffset_BuildOffsetFaces::GetBoundsToUpdate (const TopTools_ListOfShape& for (; aItLFDes.More(); aItLFDes.Next()) { const TopoDS_Shape& aED = aItLFDes.Value(); - const TopTools_ListOfShape *pLEDIm = myOEImages.Seek (aED); + const TopTools_ListOfShape* pLEDIm = myOEImages.Seek (aED); if (!pLEDIm) { aMDE.Add (aED); @@ -7419,7 +7583,7 @@ void BRepOffset_BuildOffsetFaces::GetBoundsToUpdate (const TopTools_ListOfShape& theLABounds.Append (aEIm); } // - const TopTools_ListOfShape *pLO = myOEOrigins.Seek (aEIm); + const TopTools_ListOfShape* pLO = myOEOrigins.Seek (aEIm); if (pLO) { TopTools_ListIteratorOfListOfShape aItLO (*pLO); @@ -7521,7 +7685,7 @@ void BRepOffset_BuildOffsetFaces::GetInvalidEdgesByBounds (const TopoDS_Shape& t { const TopoDS_Shape& aEOr = aItLEOr.Value(); // - const TopTools_ListOfShape *pLEIm = theEImages.Seek (aEOr); + const TopTools_ListOfShape* pLEIm = theEImages.Seek (aEOr); if (!pLEIm) continue; TopTools_ListIteratorOfListOfShape aItLEIm (*pLEIm); @@ -7590,8 +7754,8 @@ void BRepOffset_BuildOffsetFaces::GetInvalidEdgesByBounds (const TopoDS_Shape& t // add this edge for checking by making new vertex in the middle of the edge TopoDS_Vertex aV; Standard_Real f, l; - const Handle (Geom_Curve)& aC = BRep_Tool::Curve (TopoDS::Edge (aEIm), f, l); - BRep_Builder().MakeVertex (aV, aC->Value ((f + l)*0.5), Precision::Confusion()); + const Handle(Geom_Curve)& aC = BRep_Tool::Curve (TopoDS::Edge (aEIm), f, l); + BRep_Builder().MakeVertex (aV, aC->Value ((f + l) * 0.5), Precision::Confusion()); // and adding this vertex for checking aDMVE.ChangeFromIndex (aDMVE.Add (aV, TopTools_ListOfShape())).Append (aE); aMVInv.Add (aV); @@ -7612,8 +7776,8 @@ void BRepOffset_BuildOffsetFaces::GetInvalidEdgesByBounds (const TopoDS_Shape& t // make new vertex in the middle of the edge TopoDS_Vertex aV; Standard_Real f, l; - const Handle (Geom_Curve)& aC = BRep_Tool::Curve (TopoDS::Edge (aE), f, l); - BRep_Builder().MakeVertex (aV, aC->Value ((f + l)*0.5), Precision::Confusion()); + const Handle(Geom_Curve)& aC = BRep_Tool::Curve (TopoDS::Edge (aE), f, l); + BRep_Builder().MakeVertex (aV, aC->Value ((f + l) * 0.5), Precision::Confusion()); // add this vertex for checking aDMVE.ChangeFromIndex (aDMVE.Add (aV, TopTools_ListOfShape())).Append (aE); aMVInv.Add (aV); @@ -7777,7 +7941,7 @@ void BRepOffset_BuildOffsetFaces::FilterSplits (const TopTools_ListOfShape& theL for (; aItLE.More(); aItLE.Next()) { const TopoDS_Shape& aE = aItLE.Value(); - TopTools_ListOfShape *pLEIm = theEImages.ChangeSeek (aE); + TopTools_ListOfShape* pLEIm = theEImages.ChangeSeek (aE); if (!pLEIm) continue; @@ -8051,19 +8215,26 @@ void BRepOffset_BuildOffsetFaces::UpdateNewIntersectionEdges (const TopTools_Lis //function : FillGaps //purpose : Fill possible gaps (holes) in the splits of the offset faces //======================================================================= -void BRepOffset_BuildOffsetFaces::FillGaps() +void BRepOffset_BuildOffsetFaces::FillGaps (const Message_ProgressRange& theRange) { Standard_Integer aNbF = myOFImages.Extent(); if (!aNbF) return; + Message_ProgressScope aPS (theRange, "Filling gaps", 2 * aNbF); + // Check the splits of offset faces on the free edges and fill the gaps (holes) // in created splits, otherwise the closed volume will not be possible to create. // Map the splits of faces to find free edges TopTools_IndexedDataMapOfShapeListOfShape anEFMap; - for (Standard_Integer i = 1; i <= aNbF; ++i) + for (Standard_Integer i = 1; i <= aNbF; ++i, aPS.Next()) { + if (!aPS.More()) + { + return; + } + TopTools_ListIteratorOfListOfShape itLF (myOFImages (i)); for (; itLF.More(); itLF.Next()) TopExp::MapShapesAndAncestors (itLF.Value(), TopAbs_EDGE, TopAbs_FACE, anEFMap); @@ -8071,8 +8242,13 @@ void BRepOffset_BuildOffsetFaces::FillGaps() // Analyze images of each offset face on the presence of free edges // and try to fill the holes - for (Standard_Integer i = 1; i <= aNbF; ++i) + for (Standard_Integer i = 1; i <= aNbF; ++i, aPS.Next()) { + if (!aPS.More()) + { + return; + } + TopTools_ListOfShape& aLFImages = myOFImages (i); if (aLFImages.IsEmpty()) continue; @@ -8224,13 +8400,14 @@ void BRepOffset_BuildOffsetFaces::FillHistory() //purpose : Building splits of already trimmed faces //======================================================================= void BRepOffset_MakeOffset::BuildSplitsOfTrimmedFaces (const TopTools_ListOfShape& theLF, - const Handle (BRepAlgo_AsDes)& theAsDes, - BRepAlgo_Image& theImage) + const Handle(BRepAlgo_AsDes)& theAsDes, + BRepAlgo_Image& theImage, + const Message_ProgressRange& theRange) { BRepOffset_BuildOffsetFaces aBFTool (theImage); aBFTool.SetFaces (theLF); aBFTool.SetAsDesInfo (theAsDes); - aBFTool.BuildSplitsOfTrimmedFaces(); + aBFTool.BuildSplitsOfTrimmedFaces (theRange); } //======================================================================= @@ -8241,11 +8418,12 @@ void BRepOffset_MakeOffset::BuildSplitsOfTrimmedFaces (const TopTools_ListOfShap //======================================================================= void BRepOffset_MakeOffset::BuildSplitsOfExtendedFaces (const TopTools_ListOfShape& theLF, const BRepOffset_Analyse& theAnalyse, - const Handle (BRepAlgo_AsDes)& theAsDes, + const Handle(BRepAlgo_AsDes)& theAsDes, TopTools_DataMapOfShapeListOfShape& theEdgesOrigins, TopTools_DataMapOfShapeShape& theFacesOrigins, TopTools_DataMapOfShapeShape& theETrimEInf, - BRepAlgo_Image& theImage) + BRepAlgo_Image& theImage, + const Message_ProgressRange& theRange) { BRepOffset_BuildOffsetFaces aBFTool (theImage); aBFTool.SetFaces (theLF); @@ -8254,5 +8432,5 @@ void BRepOffset_MakeOffset::BuildSplitsOfExtendedFaces (const TopTools_ListOfSha aBFTool.SetEdgesOrigins (theEdgesOrigins); aBFTool.SetFacesOrigins (theFacesOrigins); aBFTool.SetInfEdges (theETrimEInf); - aBFTool.BuildSplitsOfExtendedFaces(); + aBFTool.BuildSplitsOfExtendedFaces (theRange); } diff --git a/src/BRepOffsetAPI/BRepOffsetAPI_MakeOffsetShape.cxx b/src/BRepOffsetAPI/BRepOffsetAPI_MakeOffsetShape.cxx index d00d7d1610..f6a5ff0a13 100644 --- a/src/BRepOffsetAPI/BRepOffsetAPI_MakeOffsetShape.cxx +++ b/src/BRepOffsetAPI/BRepOffsetAPI_MakeOffsetShape.cxx @@ -41,14 +41,15 @@ void BRepOffsetAPI_MakeOffsetShape::PerformByJoin const Standard_Boolean Intersection, const Standard_Boolean SelfInter, const GeomAbs_JoinType Join, - const Standard_Boolean RemoveIntEdges) + const Standard_Boolean RemoveIntEdges, + const Message_ProgressRange& theRange) { NotDone(); myLastUsedAlgo = OffsetAlgo_JOIN; myOffsetShape.Initialize (S,Offset,Tol,Mode,Intersection,SelfInter, Join, Standard_False, RemoveIntEdges); - myOffsetShape.MakeOffsetShape(); + myOffsetShape.MakeOffsetShape(theRange); if (!myOffsetShape.IsDone()) return; diff --git a/src/BRepOffsetAPI/BRepOffsetAPI_MakeOffsetShape.hxx b/src/BRepOffsetAPI/BRepOffsetAPI_MakeOffsetShape.hxx index 1a863c1091..4457cb1a4e 100644 --- a/src/BRepOffsetAPI/BRepOffsetAPI_MakeOffsetShape.hxx +++ b/src/BRepOffsetAPI/BRepOffsetAPI_MakeOffsetShape.hxx @@ -114,7 +114,8 @@ public: const Standard_Boolean Intersection = Standard_False, const Standard_Boolean SelfInter = Standard_False, const GeomAbs_JoinType Join = GeomAbs_Arc, - const Standard_Boolean RemoveIntEdges = Standard_False); + const Standard_Boolean RemoveIntEdges = Standard_False, + const Message_ProgressRange& theRange = Message_ProgressRange()); //! Returns instance of the unrelying intersection / arc algorithm. Standard_EXPORT virtual const BRepOffset_MakeOffset& MakeOffset() const; diff --git a/src/BRepOffsetAPI/BRepOffsetAPI_MakeThickSolid.cxx b/src/BRepOffsetAPI/BRepOffsetAPI_MakeThickSolid.cxx index 5024a3dfad..5238dd920d 100644 --- a/src/BRepOffsetAPI/BRepOffsetAPI_MakeThickSolid.cxx +++ b/src/BRepOffsetAPI/BRepOffsetAPI_MakeThickSolid.cxx @@ -41,12 +41,13 @@ void BRepOffsetAPI_MakeThickSolid::MakeThickSolidByJoin (const TopoDS_Shape& S, const TopTools_ListOfShape& ClosingFaces, const Standard_Real Offset, - const Standard_Real Tol, + const Standard_Real Tol, const BRepOffset_Mode Mode, const Standard_Boolean Intersection, const Standard_Boolean SelfInter, const GeomAbs_JoinType Join, - const Standard_Boolean RemoveIntEdges) + const Standard_Boolean RemoveIntEdges, + const Message_ProgressRange& theRange) { NotDone(); myLastUsedAlgo = OffsetAlgo_JOIN; @@ -57,7 +58,7 @@ void BRepOffsetAPI_MakeThickSolid::MakeThickSolidByJoin for (; it.More(); it.Next()) myOffsetShape.AddFace(TopoDS::Face(it.Value())); - myOffsetShape.MakeThickSolid(); + myOffsetShape.MakeThickSolid(theRange); if (!myOffsetShape.IsDone()) return; diff --git a/src/BRepOffsetAPI/BRepOffsetAPI_MakeThickSolid.hxx b/src/BRepOffsetAPI/BRepOffsetAPI_MakeThickSolid.hxx index b15eb150f5..245f7bdf7e 100644 --- a/src/BRepOffsetAPI/BRepOffsetAPI_MakeThickSolid.hxx +++ b/src/BRepOffsetAPI/BRepOffsetAPI_MakeThickSolid.hxx @@ -110,7 +110,8 @@ public: const Standard_Boolean Intersection = Standard_False, const Standard_Boolean SelfInter = Standard_False, const GeomAbs_JoinType Join = GeomAbs_Arc, - const Standard_Boolean RemoveIntEdges = Standard_False); + const Standard_Boolean RemoveIntEdges = Standard_False, + const Message_ProgressRange& theRange = Message_ProgressRange()); // Does nothing. Standard_EXPORT virtual void Build(const Message_ProgressRange& theRange = Message_ProgressRange()) Standard_OVERRIDE; diff --git a/src/BRepTest/BRepTest_FeatureCommands.cxx b/src/BRepTest/BRepTest_FeatureCommands.cxx index a56e27068f..ccccc457f6 100644 --- a/src/BRepTest/BRepTest_FeatureCommands.cxx +++ b/src/BRepTest/BRepTest_FeatureCommands.cxx @@ -17,6 +17,7 @@ #include #include #include +#include #include #include @@ -976,10 +977,12 @@ Standard_Integer thickshell(Draw_Interpretor& theCommands, if (n > 5) Tol = Draw::Atof(a[5]); + Handle(Draw_ProgressIndicator) aProgress = new Draw_ProgressIndicator(theCommands, 1); + BRepOffset_MakeOffset B; B.Initialize(S, Of, Tol, BRepOffset_Skin, Inter, 0, JT, Standard_True); - B.MakeOffsetShape(); + B.MakeOffsetShape(aProgress->Start()); const BRepOffset_Error aRetCode = B.Error(); reportOffsetState(theCommands, aRetCode); @@ -1037,8 +1040,9 @@ Standard_Integer offsetshape(Draw_Interpretor& theCommands, } } - if (!YaBouchon) B.MakeOffsetShape(); - else B.MakeThickSolid(); + Handle(Draw_ProgressIndicator) aProgress = new Draw_ProgressIndicator(theCommands, 1); + if (!YaBouchon) B.MakeOffsetShape(aProgress->Start()); + else B.MakeThickSolid(aProgress->Start()); const BRepOffset_Error aRetCode = B.Error(); reportOffsetState(theCommands, aRetCode); @@ -1169,10 +1173,11 @@ Standard_Integer offsetperform(Draw_Interpretor& theCommands, { if (theNArg < 2) return 1; + Handle(Draw_ProgressIndicator) aProgress = new Draw_ProgressIndicator(theCommands, 1); if (theYaBouchon) - TheOffset.MakeThickSolid(); + TheOffset.MakeThickSolid(aProgress->Start()); else - TheOffset.MakeOffsetShape(); + TheOffset.MakeOffsetShape(aProgress->Start()); if (TheOffset.IsDone()) { diff --git a/src/BRepTest/BRepTest_OtherCommands.cxx b/src/BRepTest/BRepTest_OtherCommands.cxx index 682d7243ea..17d5d26ffd 100644 --- a/src/BRepTest/BRepTest_OtherCommands.cxx +++ b/src/BRepTest/BRepTest_OtherCommands.cxx @@ -20,6 +20,7 @@ #include #include #include +#include #include #include @@ -392,7 +393,7 @@ Standard_Integer MakeBoss(Draw_Interpretor& , Standard_Integer , const char** a) //function : MakeShell //purpose : //======================================================================= -Standard_Integer MakeShell(Draw_Interpretor& , Standard_Integer , const char** a) +Standard_Integer MakeShell(Draw_Interpretor& theDI, Standard_Integer , const char** a) { TopoDS_Shape aShape = DBRep::Get( a[1] ); @@ -404,12 +405,14 @@ Standard_Integer MakeShell(Draw_Interpretor& , Standard_Integer , const char** a Standard_Real Off = -Draw::Atof( a[3] ); + Handle(Draw_ProgressIndicator) aProgress = new Draw_ProgressIndicator(theDI, 1); + BRepOffset_MakeOffset Offset; Offset.Initialize( aShape, Off, 1.0e-3, BRepOffset_Skin, Standard_True , Standard_False , GeomAbs_Arc ); Offset.AddFace( F ); - Offset.MakeThickSolid(); + Offset.MakeThickSolid(aProgress->Start()); if( Offset.IsDone() ) { // SaveShape::Save(Offset.Shape(), "ss"); diff --git a/src/BiTgte/BiTgte_Blend.cxx b/src/BiTgte/BiTgte_Blend.cxx index dae680ea9e..5304099da2 100644 --- a/src/BiTgte/BiTgte_Blend.cxx +++ b/src/BiTgte/BiTgte_Blend.cxx @@ -1781,12 +1781,8 @@ void BiTgte_Blend::ComputeCenters() } } TopTools_DataMapOfShapeListOfShape anEmptyMap; - BRepOffset_Inter2d::Compute(myAsDes, - CurOF, - myEdges, - myTol, - anEmptyMap, - aDMVV); + BRepOffset_Inter2d::Compute(myAsDes, CurOF, myEdges, myTol, + anEmptyMap, aDMVV, Message_ProgressRange()); } } @@ -1816,12 +1812,8 @@ void BiTgte_Blend::ComputeCenters() } TopTools_DataMapOfShapeListOfShape anEmptyMap; - BRepOffset_Inter2d::Compute(myAsDes, - CurOF, - myEdges, - myTol, - anEmptyMap, - aDMVV); + BRepOffset_Inter2d::Compute(myAsDes, CurOF, myEdges, myTol, + anEmptyMap, aDMVV, Message_ProgressRange()); } // // fuse vertices on edges stored in AsDes @@ -1831,7 +1823,7 @@ void BiTgte_Blend::ComputeCenters() // unwinding // ------------ BRepOffset_MakeLoops MakeLoops; - MakeLoops.Build (LOF, myAsDes, myImageOffset, anEmptyImage); + MakeLoops.Build (LOF, myAsDes, myImageOffset, anEmptyImage, Message_ProgressRange()); // ------------------------------------------------------------ // It is possible to unwind edges at least one ancestor which of diff --git a/tests/bugs/modalg_7/bug32330 b/tests/bugs/modalg_7/bug32330 new file mode 100644 index 0000000000..c0f01b7764 --- /dev/null +++ b/tests/bugs/modalg_7/bug32330 @@ -0,0 +1,47 @@ +puts "============================================" +puts "0032330: Modeling Algorithms - Extend Offset algorithm with Progress Indicator and User Break" +puts "============================================" +puts "" + +proc isTracked { theOutput } { + if {![regexp "Progress" $theOutput]} { + puts "Error: progress is not tracked" + } +} + +XProgress +t + +# check that progress is tracked for offsetshape operation + +box s1 100 100 100 +explode s1 f +set log [offsetshape result1 s1 -5 s1_1] +isTracked $log + +# check that progress is tracked for offsetperform operation + +restore [locate_data_file bug27908.brep] s2 +offsetparameter 1e-7 p i +offsetload s2 10 +set log [offsetperform result2] +isTracked $log + + +polyline p 0 0 0 5 0 0 7 0 3 3 0 3 4 0 1 1 0 1 2 0 3 -2 0 3 0 0 0 +mkplane f p +prism s3 f 0 5 0 +offsetparameter 1e-7 c i +offsetload s3 1 +set log [offsetperform result3] +isTracked $log + +box s4 10 10 10 +offsetparameter 1e-7 c a +offsetload s4 5 +set log [offsetperform result4] +isTracked $log + +offsetparameter 1e-7 p a +offsetload s4 5 +set log [offsetperform result5] +isTracked $log From 58f2990bc5423f527655e136948cbd4eb859e954 Mon Sep 17 00:00:00 2001 From: sshutina Date: Wed, 15 Sep 2021 13:48:51 +0300 Subject: [PATCH 060/639] 0032461: Visualization - expensive call of glGetTexEnviv/glTexEnvi in each render of OpenGl_Text - removed the call of glGetTexEnviv, glTexEnvi - replaced on the OpenGl_Sampler::applyGlobalTextureParams/resetGlobalTextureParams - added the method in OpenGl_Font returning first texture --- src/OpenGl/OpenGl_Font.hxx | 6 ++++++ src/OpenGl/OpenGl_Sampler.hxx | 1 + src/OpenGl/OpenGl_Text.cxx | 18 +++++++----------- 3 files changed, 14 insertions(+), 11 deletions(-) diff --git a/src/OpenGl/OpenGl_Font.hxx b/src/OpenGl/OpenGl_Font.hxx index 3373ac8918..7797674824 100755 --- a/src/OpenGl/OpenGl_Font.hxx +++ b/src/OpenGl/OpenGl_Font.hxx @@ -114,6 +114,12 @@ public: const Standard_Utf32Char theUChar, Tile& theGlyph); + //! @return first texture. + const Handle(OpenGl_Texture)& Texture() const + { + return myTextures.First(); + } + protected: //! Render new glyph to the texture. diff --git a/src/OpenGl/OpenGl_Sampler.hxx b/src/OpenGl/OpenGl_Sampler.hxx index bca6e4416e..9e3ac27b32 100644 --- a/src/OpenGl/OpenGl_Sampler.hxx +++ b/src/OpenGl/OpenGl_Sampler.hxx @@ -27,6 +27,7 @@ class OpenGl_Sampler : public OpenGl_Resource { friend class OpenGl_Context; friend class OpenGl_Texture; + friend class OpenGl_Text; DEFINE_STANDARD_RTTIEXT(OpenGl_Sampler, OpenGl_Resource) public: diff --git a/src/OpenGl/OpenGl_Text.cxx b/src/OpenGl/OpenGl_Text.cxx index 05c36af339..f27d9d6c7e 100644 --- a/src/OpenGl/OpenGl_Text.cxx +++ b/src/OpenGl/OpenGl_Text.cxx @@ -16,6 +16,7 @@ #include #include #include +#include #include #include #include @@ -780,16 +781,10 @@ void OpenGl_Text::render (const Handle(OpenGl_Context)& theCtx, } #if !defined(GL_ES_VERSION_2_0) // activate texture unit - GLint aTexEnvParam = GL_REPLACE; - if (theCtx->core11ffp != NULL) + if (theCtx->core11ffp != NULL && theCtx->ActiveProgram().IsNull()) { - theCtx->core11fwd->glDisable (GL_TEXTURE_1D); - theCtx->core11fwd->glEnable (GL_TEXTURE_2D); - theCtx->core11ffp->glGetTexEnviv (GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, &aTexEnvParam); - if (aTexEnvParam != GL_REPLACE) - { - theCtx->core11ffp->glTexEnvi (GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE); - } + const Handle(OpenGl_Texture)& aTexture = myFont->Texture(); + OpenGl_Sampler::applyGlobalTextureParams (theCtx, *aTexture, aTexture->Sampler()->Parameters()); } #endif @@ -861,9 +856,10 @@ void OpenGl_Text::render (const Handle(OpenGl_Context)& theCtx, } #if !defined(GL_ES_VERSION_2_0) - if (theCtx->core11ffp != NULL) + if (theCtx->core11ffp != NULL && theCtx->ActiveProgram().IsNull()) { - theCtx->core11ffp->glTexEnvi (GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, aTexEnvParam); + const Handle(OpenGl_Texture)& aTexture = myFont->Texture(); + OpenGl_Sampler::resetGlobalTextureParams (theCtx, *aTexture, aTexture->Sampler()->Parameters()); } #endif From eee6a80a90d88091747de0bf8096a36d703f4df9 Mon Sep 17 00:00:00 2001 From: kgv Date: Thu, 16 Sep 2021 10:50:18 +0300 Subject: [PATCH 061/639] 0032089: Visualization, TKOpenGl - support GL_EXT_sRGB extension to OpenGL ES 2.0 --- src/OpenGl/OpenGl_Context.cxx | 11 ++++- src/OpenGl/OpenGl_Context.hxx | 2 +- src/OpenGl/OpenGl_GLESExtensions.hxx | 4 ++ src/OpenGl/OpenGl_GlFunctions.cxx | 7 +++ src/OpenGl/OpenGl_Texture.cxx | 25 ++++++++-- src/OpenGl/OpenGl_TextureFormat.cxx | 68 +++++++++++++++++++++++----- 6 files changed, 98 insertions(+), 19 deletions(-) diff --git a/src/OpenGl/OpenGl_Context.cxx b/src/OpenGl/OpenGl_Context.cxx index 9dd3afd573..38c27c2015 100644 --- a/src/OpenGl/OpenGl_Context.cxx +++ b/src/OpenGl/OpenGl_Context.cxx @@ -1650,8 +1650,15 @@ void OpenGl_Context::init (const Standard_Boolean theIsCoreProfile) GL_BACK; #endif GLint aWinColorEncoding = 0; // GL_LINEAR - arbFBO->glGetFramebufferAttachmentParameteriv (GL_FRAMEBUFFER, aDefWinBuffer, GL_FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING, &aWinColorEncoding); - ResetErrors (true); + bool toSkipCheck = false; + #if defined(GL_ES_VERSION_2_0) + toSkipCheck = !IsGlGreaterEqual (3, 0); + #endif + if (!toSkipCheck) + { + arbFBO->glGetFramebufferAttachmentParameteriv (GL_FRAMEBUFFER, aDefWinBuffer, GL_FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING, &aWinColorEncoding); + ResetErrors (true); + } myIsSRgbWindow = aWinColorEncoding == GL_SRGB; // On desktop OpenGL, pixel formats are almost always sRGB-ready, even when not requested; diff --git a/src/OpenGl/OpenGl_Context.hxx b/src/OpenGl/OpenGl_Context.hxx index 893047b0f6..f2a205fa31 100644 --- a/src/OpenGl/OpenGl_Context.hxx +++ b/src/OpenGl/OpenGl_Context.hxx @@ -1047,7 +1047,7 @@ public: //! @name extensions Standard_Boolean hasUintIndex; //!< GLuint for index buffer is supported (always available on desktop; on OpenGL ES - since 3.0 or as extension GL_OES_element_index_uint) Standard_Boolean hasTexRGBA8; //!< always available on desktop; on OpenGL ES - since 3.0 or as extension GL_OES_rgb8_rgba8 Standard_Boolean hasTexFloatLinear; //!< texture-filterable state for 32-bit floating texture formats (always on desktop, GL_OES_texture_float_linear within OpenGL ES) - Standard_Boolean hasTexSRGB; //!< sRGB texture formats (desktop OpenGL 2.1, OpenGL ES 3.0 or GL_EXT_texture_sRGB) + Standard_Boolean hasTexSRGB; //!< sRGB texture formats (desktop OpenGL 2.1, OpenGL ES 3.0 or OpenGL ES 2.0 + GL_EXT_sRGB) Standard_Boolean hasFboSRGB; //!< sRGB FBO render targets (desktop OpenGL 2.1, OpenGL ES 3.0) Standard_Boolean hasSRGBControl; //!< sRGB write control (any desktop OpenGL, OpenGL ES + GL_EXT_sRGB_write_control extension) Standard_Boolean hasFboRenderMipmap; //!< FBO render target could be non-zero mipmap level of texture diff --git a/src/OpenGl/OpenGl_GLESExtensions.hxx b/src/OpenGl/OpenGl_GLESExtensions.hxx index 03fb90b2ec..30d0181f50 100644 --- a/src/OpenGl/OpenGl_GLESExtensions.hxx +++ b/src/OpenGl/OpenGl_GLESExtensions.hxx @@ -33,6 +33,10 @@ typedef double GLclampd; // GL_EXT_texture_format_BGRA8888 #define GL_BGRA_EXT 0x80E1 // same as GL_BGRA on desktop +// GL_EXT_sRGB +#define GL_SRGB_EXT 0x8C40 // GL_SRGB_EXT +#define GL_SRGB_ALPHA_EXT 0x8C42 // GL_SRGB_ALPHA_EXT + #define GL_R16 0x822A #define GL_RGB4 0x804F #define GL_RGB5 0x8050 diff --git a/src/OpenGl/OpenGl_GlFunctions.cxx b/src/OpenGl/OpenGl_GlFunctions.cxx index 0ee1aef309..67688584bb 100644 --- a/src/OpenGl/OpenGl_GlFunctions.cxx +++ b/src/OpenGl/OpenGl_GlFunctions.cxx @@ -78,6 +78,13 @@ void OpenGl_GlFunctions::load (OpenGl_Context& theCtx, || checkExtensionShort ("GL_OES_rgb8_rgba8"); theCtx.hasTexSRGB = isGlGreaterEqualShort (3, 0); theCtx.hasFboSRGB = isGlGreaterEqualShort (3, 0); + if (!isGlGreaterEqualShort (3, 0) + && checkExtensionShort ("GL_EXT_sRGB")) + { + // limited support + theCtx.hasTexSRGB = true; + theCtx.hasFboSRGB = true; + } theCtx.hasFboRenderMipmap = isGlGreaterEqualShort (3, 0) || checkExtensionShort ("GL_OES_fbo_render_mipmap"); theCtx.hasSRGBControl = checkExtensionShort ("GL_EXT_sRGB_write_control"); diff --git a/src/OpenGl/OpenGl_Texture.cxx b/src/OpenGl/OpenGl_Texture.cxx index 16a4f20f48..759a12fe3f 100644 --- a/src/OpenGl/OpenGl_Texture.cxx +++ b/src/OpenGl/OpenGl_Texture.cxx @@ -336,10 +336,9 @@ bool OpenGl_Texture::Init (const Handle(OpenGl_Context)& theCtx, || theSizeXY.y() != aHeightP2) { theCtx->PushMessage (GL_DEBUG_SOURCE_APPLICATION, GL_DEBUG_TYPE_PORTABILITY, 0, GL_DEBUG_SEVERITY_HIGH, - TCollection_AsciiString ("Error: Mipmap NPOT Textures (") + theSizeXY.x() + "x" + theSizeXY.y() + ")" + TCollection_AsciiString ("Warning: Mipmap NPOT Textures (") + theSizeXY.x() + "x" + theSizeXY.y() + ")" " are not supported by OpenGL ES 2.0 [" + myResourceId +"]"); - Release (theCtx.get()); - return false; + myMaxMipLevel = 0; } } #endif @@ -1012,6 +1011,20 @@ bool OpenGl_Texture::InitCubeMap (const Handle(OpenGl_Context)& theCtx, return false; } +#if defined(GL_ES_VERSION_2_0) + if (theToGenMipmap + && !theCtx->IsGlGreaterEqual (3, 0) + && (aFormat.PixelFormat() == GL_SRGB_EXT + || aFormat.PixelFormat() == GL_SRGB_ALPHA_EXT)) + { + theCtx->PushMessage (GL_DEBUG_SOURCE_APPLICATION, GL_DEBUG_TYPE_PORTABILITY, 0, GL_DEBUG_SEVERITY_HIGH, + TCollection_AsciiString ("Warning, GL_EXT_sRGB disallows generation of mipmaps - fallback using non-sRGB format") + + " [" + myResourceId +"]"); + aFormat.SetPixelFormat (aFormat.PixelFormat() == GL_SRGB_EXT ? GL_RGB : GL_RGBA); + aFormat.SetInternalFormat(aFormat.PixelFormat() == GL_SRGB_EXT ? GL_RGB8 : GL_RGBA8); + } +#endif + myTarget = GL_TEXTURE_CUBE_MAP; myNbSamples = 1; mySizeX = (GLsizei )theSize; @@ -1132,7 +1145,11 @@ bool OpenGl_Texture::InitCubeMap (const Handle(OpenGl_Context)& theCtx, if (anErr != GL_NO_ERROR) { theCtx->PushMessage (GL_DEBUG_SOURCE_APPLICATION, GL_DEBUG_TYPE_ERROR, 0, GL_DEBUG_SEVERITY_HIGH, - TCollection_AsciiString ("Unable to initialize side of cubemap. Error ") + OpenGl_Context::FormatGlError (anErr)); + TCollection_AsciiString ("Error: cubemap side ") + (int )theSize + "x" + (int )theSize + + " IF: " + OpenGl_TextureFormat::FormatFormat (anIntFormat) + + " PF: " + OpenGl_TextureFormat::FormatFormat (aFormat.PixelFormat()) + + " DT: " + OpenGl_TextureFormat::FormatDataType (aFormat.DataType()) + + " can not be created with error " + OpenGl_Context::FormatGlError (anErr) + "."); Unbind (theCtx); Release (theCtx.get()); return false; diff --git a/src/OpenGl/OpenGl_TextureFormat.cxx b/src/OpenGl/OpenGl_TextureFormat.cxx index 02b1d0a727..14a89723a4 100644 --- a/src/OpenGl/OpenGl_TextureFormat.cxx +++ b/src/OpenGl/OpenGl_TextureFormat.cxx @@ -46,6 +46,7 @@ TCollection_AsciiString OpenGl_TextureFormat::FormatFormat (GLint theInternalFor case 0x8050: return "GL_RGB5"; case GL_RGB8: return "GL_RGB8"; case GL_SRGB8: return "GL_SRGB8"; + case GL_SRGB_EXT: return "GL_SRGB_EXT"; case 0x8052: return "GL_RGB10"; case 0x8053: return "GL_RGB12"; case 0x8054: return "GL_RGB16"; @@ -55,7 +56,8 @@ TCollection_AsciiString OpenGl_TextureFormat::FormatFormat (GLint theInternalFor // RGBA variations case GL_RGBA: return "GL_RGBA"; case GL_RGBA8: return "GL_RGBA8"; - case GL_SRGB8_ALPHA8: return "GL_SRGB8_ALPHA8"; + case GL_SRGB8_ALPHA8: return "GL_SRGB8_ALPHA8"; + case GL_SRGB_ALPHA_EXT: return "GL_SRGB_ALPHA_EXT"; case GL_RGB10_A2: return "GL_RGB10_A2"; case 0x805A: return "GL_RGBA12"; case 0x805B: return "GL_RGBA16"; @@ -259,6 +261,12 @@ OpenGl_TextureFormat OpenGl_TextureFormat::FindFormat (const Handle(OpenGl_Conte if (theIsColorMap && theCtx->ToRenderSRGB()) { + #if defined(GL_ES_VERSION_2_0) + if (!theCtx->IsGlGreaterEqual (3, 0)) + { + aFormat.SetPixelFormat (GL_SRGB_ALPHA_EXT); + } + #endif aFormat.SetInternalFormat (GL_SRGB8_ALPHA8); } return aFormat; @@ -301,6 +309,8 @@ OpenGl_TextureFormat OpenGl_TextureFormat::FindFormat (const Handle(OpenGl_Conte // ask driver to convert data to RGB8 to save memory aFormat.SetNbComponents (3); aFormat.SetInternalFormat (GL_RGB8); + aFormat.SetPixelFormat (GL_RGBA); + aFormat.SetDataType (GL_UNSIGNED_BYTE); if (theIsColorMap && theCtx->ToRenderSRGB()) { @@ -310,14 +320,18 @@ OpenGl_TextureFormat OpenGl_TextureFormat::FindFormat (const Handle(OpenGl_Conte // conversion is not supported aFormat.SetNbComponents (4); aFormat.SetInternalFormat (GL_RGBA8); + aFormat.SetPixelFormat (GL_RGBA); + aFormat.SetDataType (GL_UNSIGNED_BYTE); if (theIsColorMap && theCtx->ToRenderSRGB()) { + if (!theCtx->IsGlGreaterEqual (3, 0)) + { + aFormat.SetPixelFormat (GL_SRGB_ALPHA_EXT); + } aFormat.SetInternalFormat (GL_SRGB8_ALPHA8); } #endif - aFormat.SetPixelFormat (GL_RGBA); - aFormat.SetDataType (GL_UNSIGNED_BYTE); return aFormat; } case Image_Format_BGR32: @@ -360,6 +374,12 @@ OpenGl_TextureFormat OpenGl_TextureFormat::FindFormat (const Handle(OpenGl_Conte if (theIsColorMap && theCtx->ToRenderSRGB()) { + #if defined(GL_ES_VERSION_2_0) + if (!theCtx->IsGlGreaterEqual (3, 0)) + { + aFormat.SetPixelFormat (GL_SRGB_EXT); + } + #endif aFormat.SetInternalFormat (GL_SRGB8); } return aFormat; @@ -374,13 +394,13 @@ OpenGl_TextureFormat OpenGl_TextureFormat::FindFormat (const Handle(OpenGl_Conte } aFormat.SetNbComponents (3); aFormat.SetInternalFormat (GL_RGB8); + aFormat.SetPixelFormat (GL_BGR); // equals to GL_BGR_EXT + aFormat.SetDataType (GL_UNSIGNED_BYTE); if (theIsColorMap && theCtx->ToRenderSRGB()) { aFormat.SetInternalFormat (GL_SRGB8); } - aFormat.SetPixelFormat (GL_BGR); // equals to GL_BGR_EXT - aFormat.SetDataType (GL_UNSIGNED_BYTE); #endif return aFormat; } @@ -521,6 +541,7 @@ OpenGl_TextureFormat OpenGl_TextureFormat::FindSizedFormat (const Handle(OpenGl_ return aFormat; } case GL_SRGB8_ALPHA8: + case GL_SRGB_ALPHA_EXT: case GL_RGBA8: case GL_RGBA: { @@ -529,14 +550,26 @@ OpenGl_TextureFormat OpenGl_TextureFormat::FindSizedFormat (const Handle(OpenGl_ aFormat.SetPixelFormat (GL_RGBA); aFormat.SetDataType (GL_UNSIGNED_BYTE); aFormat.SetImageFormat (Image_Format_RGBA); - if (theSizedFormat == GL_SRGB8_ALPHA8 - && !theCtx->ToRenderSRGB()) + if ((theSizedFormat == GL_SRGB8_ALPHA8 || theSizedFormat == GL_SRGB_ALPHA_EXT)) { - aFormat.SetInternalFormat (GL_RGBA8); // fallback format + if (theCtx->ToRenderSRGB()) + { + #if defined(GL_ES_VERSION_2_0) + if (!theCtx->IsGlGreaterEqual (3, 0)) + { + aFormat.SetPixelFormat (GL_SRGB_ALPHA_EXT); + } + #endif + } + else + { + aFormat.SetInternalFormat (GL_RGBA8); // fallback format + } } return aFormat; } case GL_SRGB8: + case GL_SRGB_EXT: case GL_RGB8: case GL_RGB: { @@ -545,10 +578,21 @@ OpenGl_TextureFormat OpenGl_TextureFormat::FindSizedFormat (const Handle(OpenGl_ aFormat.SetPixelFormat (GL_RGB); aFormat.SetDataType (GL_UNSIGNED_BYTE); aFormat.SetImageFormat (Image_Format_RGB); - if (theSizedFormat == GL_SRGB8 - && !theCtx->ToRenderSRGB()) - { - aFormat.SetInternalFormat (GL_RGB8); // fallback format + if ((theSizedFormat == GL_SRGB8 || theSizedFormat == GL_SRGB_EXT)) + { + if (theCtx->ToRenderSRGB()) + { + #if defined(GL_ES_VERSION_2_0) + if (!theCtx->IsGlGreaterEqual (3, 0)) + { + aFormat.SetPixelFormat (GL_SRGB_EXT); + } + #endif + } + else + { + aFormat.SetInternalFormat (GL_RGB8); // fallback format + } } return aFormat; } From 5aa7b6108331cbf65c56d49dcb882eb09d33d5c2 Mon Sep 17 00:00:00 2001 From: kgv Date: Wed, 24 Mar 2021 10:37:29 +0300 Subject: [PATCH 062/639] 0032236: Modeling Algorithms - Exception on calculation optimal bounding box - BRepBndLib - added VOID box checks to AdjustFaceBox() method. - added the test --- src/BRepBndLib/BRepBndLib.cxx | 20 ++++- tests/bugs/modalg_7/optimal_bndbox_exception | 93 ++++++++++++++++++++ 2 files changed, 110 insertions(+), 3 deletions(-) create mode 100644 tests/bugs/modalg_7/optimal_bndbox_exception diff --git a/src/BRepBndLib/BRepBndLib.cxx b/src/BRepBndLib/BRepBndLib.cxx index 5d015da737..a225c55540 100644 --- a/src/BRepBndLib/BRepBndLib.cxx +++ b/src/BRepBndLib/BRepBndLib.cxx @@ -306,9 +306,13 @@ void BRepBndLib::AddOptimal(const TopoDS_Shape& S, Bnd_Box& B, Tol); } } - Standard_Real xmin, ymin, zmin, xmax, ymax, zmax; - aLocBox.Get(xmin, ymin, zmin, xmax, ymax, zmax); - B.Update(xmin, ymin, zmin, xmax, ymax, zmax); + + if (!aLocBox.IsVoid()) + { + Standard_Real xmin, ymin, zmin, xmax, ymax, zmax; + aLocBox.Get(xmin, ymin, zmin, xmax, ymax, zmax); + B.Update(xmin, ymin, zmin, xmax, ymax, zmax); + } } } } @@ -703,6 +707,16 @@ void AdjustFaceBox(const BRepAdaptor_Surface& BS, Bnd_Box& FaceBox, const Bnd_Box& EdgeBox, const Standard_Real Tol) { + if (EdgeBox.IsVoid()) + { + return; + } + if (FaceBox.IsVoid()) + { + FaceBox = EdgeBox; + return; + } + Standard_Real fxmin, fymin, fzmin, fxmax, fymax, fzmax; Standard_Real exmin, eymin, ezmin, exmax, eymax, ezmax; // diff --git a/tests/bugs/modalg_7/optimal_bndbox_exception b/tests/bugs/modalg_7/optimal_bndbox_exception new file mode 100644 index 0000000000..4126d3a869 --- /dev/null +++ b/tests/bugs/modalg_7/optimal_bndbox_exception @@ -0,0 +1,93 @@ +puts "========" +puts "0032236: Modeling Algorithms - E x c e p t i o n on calculation optimal bounding box" +puts "========" +puts "" + +set aShapeData " +DBRep_DrawableShape + +CASCADE Topology V1, (c) Matra-Datavision +Locations 0 +Curve2ds 4 +1 -1.3333333333333335 0 0 1 +1 0 -1.6666666666666667 1 0 +1 1.6666666666666665 0 0 1 +1 0 1.3333333333333333 1 0 +Curves 0 +Polygon3D 0 +PolygonOnTriangulations 0 +Surfaces 1 +9 0 0 0 0 3 3 4 4 2 2 0 3 1.9999999999999998 0 1.6666666666666665 1.9999999999999998 0 0.3333333333333332 1.9999999999999996 0 -0.99999999999999989 2 +0 2.9999999999999991 0.66666666666666718 0 1.6666666666666659 0.66666666666666741 0 0.3333333333333332 0.66666666666666663 0 -0.99999999999999956 0.66666666666666663 +0 3.0000000000000009 -0.66666666666666718 0 1.6666666666666676 -0.66666666666666752 0 0.33333333333333331 -0.66666666666666652 0 -1.0000000000000002 -0.66666666666666685 +0 3.0000000000000004 -2 0 1.6666666666666667 -2 0 0.33333333333333326 -1.9999999999999996 0 -1 -2 + +-1.3333333333333335 4 +2.6666666666666665 4 + +-2.666666666666667 4 +1.3333333333333333 4 + +Triangulations 0 + +TShapes 8 +Ve +4.000004 +0 -1 -1 +0 0 + +0101101 +* +Ed + 4.000004 1 1 1 +2 1 1 0 -1.66666666666667 1.33333333333333 +0 + +0101000 ++8 0 -8 0 * +Ed + 4.000004 1 1 1 +2 2 1 0 -1.33333333333333 1.66666666666667 +0 + +0101000 ++8 0 -8 0 * +Ed + 4.000004 1 1 1 +2 3 1 0 -1.66666666666667 1.33333333333333 +0 + +0101000 ++8 0 -8 0 * +Ed + 4.000004 1 1 1 +2 4 1 0 -1.33333333333333 1.66666666666667 +0 + +0101000 ++8 0 -8 0 * +Wi + +0101100 +-7 0 +6 0 +5 0 -4 0 * +Fa +0 1e-07 1 0 + +0101000 ++3 0 * +Sh + +1101000 ++2 0 * + ++1 0 +" + +set aFile [open "$imagedir/${casename}.brep" wb] +puts $aFile $aShapeData +close $aFile + +restore "$imagedir/${casename}.brep" aShape +bounding -optimal aShape + +file delete "$imagedir/${casename}.brep" From b8781394613481000901216936008f01ee96b8fd Mon Sep 17 00:00:00 2001 From: emv Date: Fri, 10 Sep 2021 16:06:50 +0300 Subject: [PATCH 063/639] 0032566: Modeling Algorithms - Incorrect result of offset operation in mode "Complete" join type "Intersection" Before removal of the part make sure that it was not filled due to overlapping of opposite parts. Improve procedure of checking for inverted edges by taking into account that the original edges may not be connected. Correct test case offset/shape_type_i_c/YL5, as it was working incorrectly - some parts were missing. --- src/BRepOffset/BRepOffset_MakeOffset_1.cxx | 74 ++++++++++------------ tests/offset/shape_type_i_c/XY8 | 44 +++++++++++++ tests/offset/shape_type_i_c/YL5 | 8 ++- 3 files changed, 84 insertions(+), 42 deletions(-) create mode 100644 tests/offset/shape_type_i_c/XY8 diff --git a/src/BRepOffset/BRepOffset_MakeOffset_1.cxx b/src/BRepOffset/BRepOffset_MakeOffset_1.cxx index 170eed611f..b4c9f12243 100644 --- a/src/BRepOffset/BRepOffset_MakeOffset_1.cxx +++ b/src/BRepOffset/BRepOffset_MakeOffset_1.cxx @@ -1384,10 +1384,9 @@ void BRepOffset_BuildOffsetFaces::BuildSplitsOfFaces (const Message_ProgressRang // show inverted edges TopoDS_Compound aCEInverted; BRep_Builder().MakeCompound (aCEInverted); - TopTools_MapIteratorOfMapOfShape aItM (myInvertedEdges); - for (; aItM.More(); aItM.Next()) + for (i = 1; i <= myInvertedEdges.Extent(); ++i) { - BRep_Builder().Add (aCEInverted, aItM.Value()); + BRep_Builder().Add (aCEInverted, myInvertedEdges(i)); } #endif @@ -2131,7 +2130,9 @@ void BRepOffset_BuildOffsetFaces::FindInvalidEdges (const TopoDS_Face& theF, { Standard_Boolean bSkip = Standard_True; - // Allow the edge to be analyzed if it is: + // It seems the edge originated from not connected edges and cannot be + // considered as correctly classified as it may fill some undesired parts. + // Still, allow the edge to be accounted for local analysis if it is: // * originated from more than two faces // * unanimously considered valid or invalid // * not a boundary edge in the splits @@ -2544,7 +2545,7 @@ void BRepOffset_BuildOffsetFaces::FindInvalidFaces (TopTools_ListOfShape& theLFI // 1. Some of the edges are valid for this face. Standard_Boolean bHasValid, bAllValid, bAllInvalid, bHasReallyInvalid, bAllInvNeutral; Standard_Boolean bValid, bValidLoc, bInvalid, bInvalidLoc, bNeutral, bInverted; - Standard_Boolean bIsInvalidByInverted; + Standard_Boolean bIsInvalidByInverted, bHasInverted; Standard_Integer aNbChecked; // Standard_Boolean bTreatInvertedAsInvalid = (theLFImages.Extent() == 1); @@ -2579,6 +2580,7 @@ void BRepOffset_BuildOffsetFaces::FindInvalidFaces (TopTools_ListOfShape& theLFI bHasReallyInvalid = Standard_False; bAllInvNeutral = Standard_True; bIsInvalidByInverted = Standard_True; + bHasInverted = Standard_False; aNbChecked = 0; // const TopoDS_Wire& aWIm = BRepTools::OuterWire (aFIm); @@ -2628,6 +2630,7 @@ void BRepOffset_BuildOffsetFaces::FindInvalidFaces (TopTools_ListOfShape& theLFI bAllInvalid &= (bInvalid || bInvalidLoc); bAllInvNeutral &= (bAllInvalid && bNeutral); bIsInvalidByInverted &= (bInvalidLoc || bInverted); + bHasInverted |= bInverted; } // if (!aNbChecked) @@ -2638,6 +2641,13 @@ void BRepOffset_BuildOffsetFaces::FindInvalidFaces (TopTools_ListOfShape& theLFI // if (!bHasReallyInvalid && (bAllInvNeutral && !bHasValid) && (aNbChecked > 1)) { + if (bHasInverted) + { + // The part seems to be filled due to overlapping of parts rather than + // due to multi-connection of faces. No need to remove the part. + aItLF.Next(); + continue; + } // remove edges from neutral TopExp::MapShapes (aFIm, TopAbs_EDGE, aMENRem); // remove face @@ -3084,49 +3094,35 @@ Standard_Boolean BRepOffset_BuildOffsetFaces::CheckInverted (const TopoDS_Edge& return Standard_False; } // - // find vertices common for all edges in the lists + // find vertices common for the max number of edges in the lists for (i = 0; i < 2; ++i) { const TopTools_ListOfShape& aLOE = !i ? aLOE1 : aLOE2; TopoDS_Vertex& aVO = !i ? aVO1 : aVO2; - // - const TopoDS_Shape& aEO = aLOE.First(); - TopExp_Explorer aExpV (aEO, TopAbs_VERTEX); - for (; aExpV.More(); aExpV.Next()) + + TopTools_IndexedDataMapOfShapeListOfShape aDMVELoc; + for (TopTools_ListOfShape::Iterator itLOE (aLOE); itLOE.More(); itLOE.Next()) { - const TopoDS_Vertex& aV = *(TopoDS_Vertex*)&aExpV.Current(); - // - Standard_Boolean bVertValid = Standard_True; - TopTools_ListIteratorOfListOfShape aItLOE (aLOE); - for (aItLOE.Next(); aItLOE.More(); aItLOE.Next()) - { - const TopoDS_Shape& aEOx = aItLOE.Value(); - TopExp_Explorer aExpVx (aEOx, TopAbs_VERTEX); - for (; aExpVx.More(); aExpVx.Next()) - { - const TopoDS_Shape& aVx = aExpVx.Current(); - if (aVx.IsSame (aV)) - { - break; - } - } - // - if (!aExpVx.More()) - { - bVertValid = Standard_False; - break; - } - } - // - if (bVertValid) + TopExp::MapShapesAndAncestors (itLOE.Value(), TopAbs_VERTEX, TopAbs_EDGE, aDMVELoc); + } + + Standard_Integer aNbEMax = 0; + for (Standard_Integer j = 1; j <= aDMVELoc.Extent(); ++j) + { + Standard_Integer aNbE = aDMVELoc (j).Extent(); + if (aNbE > 1 && aNbE > aNbEMax) { - aVO = aV; - break; + aVO = TopoDS::Vertex (aDMVELoc.FindKey (j)); + aNbEMax = aNbE; } } + if (aVO.IsNull()) + { + return Standard_False; + } } - // - if (aVO1.IsNull() || aVO2.IsNull() || aVO1.IsSame (aVO2)) + + if (aVO1.IsSame (aVO2)) { return Standard_False; } diff --git a/tests/offset/shape_type_i_c/XY8 b/tests/offset/shape_type_i_c/XY8 new file mode 100644 index 0000000000..a6736ae090 --- /dev/null +++ b/tests/offset/shape_type_i_c/XY8 @@ -0,0 +1,44 @@ +puts "=============================================================================================" +puts "0032566: Modeling Algorithms - Incorrect result of offset operation in mode \"Complete\" join type \"Intersection\"" +puts "=============================================================================================" +puts "" + +restore [locate_data_file bug32566.brep] s + +set ref_values { { 3.94658e+06 9.49773e+07 58 58 } \ + { 4.15709e+06 1.15236e+08 58 58 } \ + { 4.36881e+06 1.3655e+08 58 58 } \ + { 2.91882e+06 1.54418e+08 16 16 } \ + { 3.04675e+06 1.69332e+08 16 16 } \ + { 3.17587e+06 1.84888e+08 16 16 } \ + { 3.30619e+06 2.01092e+08 16 16 } \ + { 3.43772e+06 2.17952e+08 16 16 } \ + { 3.57044e+06 2.35471e+08 16 16 } \ + { 3.70436e+06 2.53658e+08 16 16 } \ + { 3.83949e+06 2.72517e+08 16 16 } \ + { 3.97581e+06 2.92055e+08 16 16 } \ + { 4.11334e+06 3.12277e+08 16 16 } \ + { 4.2523e+06 3.3319e+08 17 17 } \ + { 4.39391e+06 3.54805e+08 17 17 } \ + { 4.53673e+06 3.77131e+08 17 17 } \ + { 4.68075e+06 4.00175e+08 17 17 } \ + { 4.82596e+06 4.23941e+08 17 17 } \ + { 4.97238e+06 4.48436e+08 17 17 } \ + { 5.12e+06 4.73667e+08 17 17 } \ + { 5.26881e+06 4.99638e+08 17 17 } \ + { 5.41883e+06 5.26357e+08 17 17 } \ + { 5.57005e+06 5.53829e+08 17 17 } \ + { 5.72247e+06 5.82059e+08 17 17 } \ + { 5.87608e+06 6.11055e+08 17 17 } \ + { 6.0309e+06 6.40822e+08 17 17 } \ + { 6.18692e+06 6.71366e+08 17 17 } \ + { 6.34413e+06 7.02693e+08 17 17 } \ + { 6.50255e+06 7.3481e+08 17 17 } \ + { 6.66217e+06 7.67721e+08 17 17 } } + +perform_offset_increasing s 5 150 5 $ref_values + +copy r90 result +copy r90_unif result_unif + +checkview -display result_unif -2d -path ${imagedir}/${test_image}.png diff --git a/tests/offset/shape_type_i_c/YL5 b/tests/offset/shape_type_i_c/YL5 index c86e2a4eda..447966a4df 100644 --- a/tests/offset/shape_type_i_c/YL5 +++ b/tests/offset/shape_type_i_c/YL5 @@ -1,10 +1,12 @@ restore [locate_data_file bug28501_input.r2.brep] s -OFFSETSHAPE 10 {} $calcul $type +offsetparameter 1e-7 c i r +offsetload s 10 +offsetperform result -checkprops result -v 2.48594e+007 -s 1.07443e+006 +checkprops result -s 1.06886e+06 -v 2.48884e+07 unifysamedom result_unif result -checknbshapes result_unif -face 313 -shell 1 +checknbshapes result_unif -wire 324 -face 289 -shell 1 -solid 1 checkview -display result_unif -2d -path ${imagedir}/${test_image}.png From 92c1f9728ec553dfca665e25ba876da1a3e8e87c Mon Sep 17 00:00:00 2001 From: asuraven Date: Thu, 2 Sep 2021 13:59:04 +0300 Subject: [PATCH 064/639] 0032552: Modeling Algorithms - BRepExtrema_DistShapeShape algorithm consumes too much memory Used a new BRepExtrema_DistShapeShape::DistanceVertVert() function to replace DistanceMapMap() to calculate vertex/vertex distance --- .../BRepExtrema_DistShapeShape.cxx | 61 ++++++++++++++++++- .../BRepExtrema_DistShapeShape.hxx | 5 ++ 2 files changed, 64 insertions(+), 2 deletions(-) diff --git a/src/BRepExtrema/BRepExtrema_DistShapeShape.cxx b/src/BRepExtrema/BRepExtrema_DistShapeShape.cxx index be1354366d..dcd92f2fc2 100644 --- a/src/BRepExtrema/BRepExtrema_DistShapeShape.cxx +++ b/src/BRepExtrema/BRepExtrema_DistShapeShape.cxx @@ -147,7 +147,6 @@ Standard_Boolean BRepExtrema_DistShapeShape::DistanceMapMap (const TopTools_Inde } } } - std::stable_sort(aPairList.begin(), aPairList.end(), BRepExtrema_CheckPair_Comparator); Message_ProgressRange aDistRange(aTwinScope.Next(0.7)); Message_ProgressScope aDistScope(aDistRange, NULL, aPairList.Size()); @@ -205,6 +204,64 @@ Standard_Boolean BRepExtrema_DistShapeShape::DistanceMapMap (const TopTools_Inde return Standard_True; } +//======================================================================= +//function : DistanceVertVert +//purpose : +//======================================================================= + +Standard_Boolean BRepExtrema_DistShapeShape::DistanceVertVert(const TopTools_IndexedMapOfShape& theMap1, + const TopTools_IndexedMapOfShape& theMap2, + const Message_ProgressRange& theRange) +{ + const Standard_Integer aCount1 = theMap1.Extent(); + const Standard_Integer aCount2 = theMap2.Extent(); + + Message_ProgressScope aScope(theRange, NULL, aCount1); + + for (Standard_Integer anIdx1 = 1; anIdx1 <= aCount1; ++anIdx1) + { + aScope.Next(); + if (!aScope.More()) + { + return Standard_False; + } + const TopoDS_Vertex& aVertex1 = TopoDS::Vertex(theMap1.FindKey(anIdx1)); + const gp_Pnt aPoint1 = BRep_Tool::Pnt(aVertex1); + for (Standard_Integer anIdx2 = 1; anIdx2 <= aCount2; ++anIdx2) + { + const TopoDS_Vertex& aVertex2 = TopoDS::Vertex(theMap2.FindKey(anIdx2)); + const gp_Pnt aPoint2 = BRep_Tool::Pnt(aVertex2); + + const Standard_Real aDist = aPoint1.Distance(aPoint2); + if (aDist < myDistRef - myEps) + { + mySolutionsShape1.Clear(); + mySolutionsShape2.Clear(); + + const BRepExtrema_SolutionElem Sol1(aDist, aPoint1, BRepExtrema_IsVertex, aVertex1); + const BRepExtrema_SolutionElem Sol2(aDist, aPoint2, BRepExtrema_IsVertex, aVertex2); + mySolutionsShape1.Append(Sol1); + mySolutionsShape2.Append(Sol2); + + myDistRef = aDist; + } + else if (fabs(aDist - myDistRef) < myEps) + { + const BRepExtrema_SolutionElem Sol1(aDist, aPoint1, BRepExtrema_IsVertex, aVertex1); + const BRepExtrema_SolutionElem Sol2(aDist, aPoint2, BRepExtrema_IsVertex, aVertex2); + mySolutionsShape1.Append(Sol1); + mySolutionsShape2.Append(Sol2); + + if (myDistRef > aDist) + { + myDistRef = aDist; + } + } + } + } + return Standard_True; +} + //======================================================================= //function : BRepExtrema_DistShapeShape //purpose : @@ -408,7 +465,7 @@ Standard_Boolean BRepExtrema_DistShapeShape::Perform(const Message_ProgressRange else myDistRef= 1.e30; //szv:!!! - if(!DistanceMapMap (myMapV1, myMapV2, myBV1, myBV2, aRootScope.Next())) + if(!DistanceVertVert(myMapV1, myMapV2, aRootScope.Next())) { return Standard_False; } diff --git a/src/BRepExtrema/BRepExtrema_DistShapeShape.hxx b/src/BRepExtrema/BRepExtrema_DistShapeShape.hxx index 797a4e94a7..8b3450e074 100644 --- a/src/BRepExtrema/BRepExtrema_DistShapeShape.hxx +++ b/src/BRepExtrema/BRepExtrema_DistShapeShape.hxx @@ -154,6 +154,11 @@ private: const Bnd_SeqOfBox& LBox2, const Message_ProgressRange& theRange); + //! computes the minimum distance between two maps of vertices
+ Standard_Boolean DistanceVertVert(const TopTools_IndexedMapOfShape& theMap1, + const TopTools_IndexedMapOfShape& theMap2, + const Message_ProgressRange& theRange); + Standard_Boolean SolidTreatment(const TopoDS_Shape& theShape, const TopTools_IndexedMapOfShape& theMap, const Message_ProgressRange& theRange); From 812ee2c9bec89902de2ff85201cb314e0de894cc Mon Sep 17 00:00:00 2001 From: dpasukhi Date: Thu, 12 Mar 2020 19:29:21 +0300 Subject: [PATCH 065/639] 0031388: Data Exchange - support kinematics data in STEP format - add new STEP entities. --- adm/UDLIST | 2 + src/RWStepAP214/RWStepAP214_GeneralModule.cxx | 1008 ++++++- .../RWStepAP214_ReadWriteModule.cxx | 2299 +++++++++++++--- src/RWStepGeom/FILES | 2 + src/RWStepGeom/RWStepGeom_RWSuParameters.cxx | 122 + src/RWStepGeom/RWStepGeom_RWSuParameters.hxx | 46 + src/RWStepKinematics/FILES | 148 ++ ...atics_RWActuatedKinPairAndOrderKinPair.cxx | 2309 +++++++++++++++++ ...atics_RWActuatedKinPairAndOrderKinPair.hxx | 47 + ...StepKinematics_RWActuatedKinematicPair.cxx | 318 +++ ...StepKinematics_RWActuatedKinematicPair.hxx | 46 + ...xtDependentKinematicLinkRepresentation.cxx | 86 + ...xtDependentKinematicLinkRepresentation.hxx | 46 + .../RWStepKinematics_RWCylindricalPair.cxx | 180 ++ .../RWStepKinematics_RWCylindricalPair.hxx | 46 + ...WStepKinematics_RWCylindricalPairValue.cxx | 109 + ...WStepKinematics_RWCylindricalPairValue.hxx | 46 + ...pKinematics_RWCylindricalPairWithRange.cxx | 255 ++ ...pKinematics_RWCylindricalPairWithRange.hxx | 46 + ...WStepKinematics_RWFullyConstrainedPair.cxx | 180 ++ ...WStepKinematics_RWFullyConstrainedPair.hxx | 46 + .../RWStepKinematics_RWGearPair.cxx | 174 ++ .../RWStepKinematics_RWGearPair.hxx | 46 + .../RWStepKinematics_RWGearPairValue.cxx | 103 + .../RWStepKinematics_RWGearPairValue.hxx | 46 + .../RWStepKinematics_RWGearPairWithRange.cxx | 214 ++ .../RWStepKinematics_RWGearPairWithRange.hxx | 46 + .../RWStepKinematics_RWHomokineticPair.cxx | 204 ++ .../RWStepKinematics_RWHomokineticPair.hxx | 46 + .../RWStepKinematics_RWKinematicJoint.cxx | 98 + .../RWStepKinematics_RWKinematicJoint.hxx | 46 + .../RWStepKinematics_RWKinematicLink.cxx | 75 + .../RWStepKinematics_RWKinematicLink.hxx | 46 + ...KinematicLinkRepresentationAssociation.cxx | 111 + ...KinematicLinkRepresentationAssociation.hxx | 46 + ...nematicPropertyMechanismRepresentation.cxx | 101 + ...nematicPropertyMechanismRepresentation.hxx | 46 + ...s_RWKinematicTopologyDirectedStructure.cxx | 127 + ...s_RWKinematicTopologyDirectedStructure.hxx | 46 + ...cs_RWKinematicTopologyNetworkStructure.cxx | 127 + ...cs_RWKinematicTopologyNetworkStructure.hxx | 46 + ...inematics_RWKinematicTopologyStructure.cxx | 112 + ...inematics_RWKinematicTopologyStructure.hxx | 46 + ...nematics_RWLinearFlexibleAndPinionPair.cxx | 150 ++ ...nematics_RWLinearFlexibleAndPinionPair.hxx | 46 + ...ics_RWLinearFlexibleAndPlanarCurvePair.cxx | 159 ++ ...ics_RWLinearFlexibleAndPlanarCurvePair.hxx | 46 + ...ics_RWLinearFlexibleLinkRepresentation.cxx | 127 + ...ics_RWLinearFlexibleLinkRepresentation.hxx | 46 + ...StepKinematics_RWLowOrderKinematicPair.cxx | 180 ++ ...StepKinematics_RWLowOrderKinematicPair.hxx | 46 + ...inematics_RWLowOrderKinematicPairValue.cxx | 133 + ...inematics_RWLowOrderKinematicPairValue.hxx | 46 + ...atics_RWLowOrderKinematicPairWithRange.cxx | 391 +++ ...atics_RWLowOrderKinematicPairWithRange.hxx | 46 + ...epKinematics_RWMechanismRepresentation.cxx | 128 + ...epKinematics_RWMechanismRepresentation.hxx | 46 + ...ematics_RWMechanismStateRepresentation.cxx | 117 + ...ematics_RWMechanismStateRepresentation.hxx | 47 + .../RWStepKinematics_RWOrientedJoint.cxx | 118 + .../RWStepKinematics_RWOrientedJoint.hxx | 46 + ...atics_RWPairRepresentationRelationship.cxx | 138 + ...atics_RWPairRepresentationRelationship.hxx | 46 + .../RWStepKinematics_RWPlanarCurvePair.cxx | 167 ++ .../RWStepKinematics_RWPlanarCurvePair.hxx | 46 + ...WStepKinematics_RWPlanarCurvePairRange.cxx | 190 ++ ...WStepKinematics_RWPlanarCurvePairRange.hxx | 46 + .../RWStepKinematics_RWPlanarPair.cxx | 180 ++ .../RWStepKinematics_RWPlanarPair.hxx | 46 + .../RWStepKinematics_RWPlanarPairValue.cxx | 115 + .../RWStepKinematics_RWPlanarPairValue.hxx | 46 + ...RWStepKinematics_RWPlanarPairWithRange.cxx | 289 +++ ...RWStepKinematics_RWPlanarPairWithRange.hxx | 46 + ...tepKinematics_RWPointOnPlanarCurvePair.cxx | 159 ++ ...tepKinematics_RWPointOnPlanarCurvePair.hxx | 46 + ...nematics_RWPointOnPlanarCurvePairValue.cxx | 142 + ...nematics_RWPointOnPlanarCurvePairValue.hxx | 46 + ...tics_RWPointOnPlanarCurvePairWithRange.cxx | 277 ++ ...tics_RWPointOnPlanarCurvePairWithRange.hxx | 46 + .../RWStepKinematics_RWPointOnSurfacePair.cxx | 152 ++ .../RWStepKinematics_RWPointOnSurfacePair.hxx | 46 + ...epKinematics_RWPointOnSurfacePairValue.cxx | 142 + ...epKinematics_RWPointOnSurfacePairValue.hxx | 46 + ...nematics_RWPointOnSurfacePairWithRange.cxx | 270 ++ ...nematics_RWPointOnSurfacePairWithRange.hxx | 46 + .../RWStepKinematics_RWPrismaticPair.cxx | 180 ++ .../RWStepKinematics_RWPrismaticPair.hxx | 46 + .../RWStepKinematics_RWPrismaticPairValue.cxx | 103 + .../RWStepKinematics_RWPrismaticPairValue.hxx | 46 + ...tepKinematics_RWPrismaticPairWithRange.cxx | 221 ++ ...tepKinematics_RWPrismaticPairWithRange.hxx | 46 + ...nematics_RWProductDefinitionKinematics.cxx | 101 + ...nematics_RWProductDefinitionKinematics.hxx | 46 + ...roductDefinitionRelationshipKinematics.cxx | 101 + ...roductDefinitionRelationshipKinematics.hxx | 46 + .../RWStepKinematics_RWRackAndPinionPair.cxx | 150 ++ .../RWStepKinematics_RWRackAndPinionPair.hxx | 46 + ...tepKinematics_RWRackAndPinionPairValue.cxx | 103 + ...tepKinematics_RWRackAndPinionPairValue.hxx | 46 + ...inematics_RWRackAndPinionPairWithRange.cxx | 190 ++ ...inematics_RWRackAndPinionPairWithRange.hxx | 46 + .../RWStepKinematics_RWRevolutePair.cxx | 180 ++ .../RWStepKinematics_RWRevolutePair.hxx | 46 + .../RWStepKinematics_RWRevolutePairValue.cxx | 103 + .../RWStepKinematics_RWRevolutePairValue.hxx | 46 + ...StepKinematics_RWRevolutePairWithRange.cxx | 221 ++ ...StepKinematics_RWRevolutePairWithRange.hxx | 46 + ...epKinematics_RWRigidLinkRepresentation.cxx | 127 + ...epKinematics_RWRigidLinkRepresentation.hxx | 46 + .../RWStepKinematics_RWRollingCurvePair.cxx | 167 ++ .../RWStepKinematics_RWRollingCurvePair.hxx | 46 + ...StepKinematics_RWRollingCurvePairValue.cxx | 105 + ...StepKinematics_RWRollingCurvePairValue.hxx | 46 + .../RWStepKinematics_RWRollingSurfacePair.cxx | 167 ++ .../RWStepKinematics_RWRollingSurfacePair.hxx | 46 + ...epKinematics_RWRollingSurfacePairValue.cxx | 112 + ...epKinematics_RWRollingSurfacePairValue.hxx | 46 + ...tepKinematics_RWRotationAboutDirection.cxx | 97 + ...tepKinematics_RWRotationAboutDirection.hxx | 46 + .../RWStepKinematics_RWScrewPair.cxx | 150 ++ .../RWStepKinematics_RWScrewPair.hxx | 46 + .../RWStepKinematics_RWScrewPairValue.cxx | 103 + .../RWStepKinematics_RWScrewPairValue.hxx | 46 + .../RWStepKinematics_RWScrewPairWithRange.cxx | 190 ++ .../RWStepKinematics_RWScrewPairWithRange.hxx | 46 + .../RWStepKinematics_RWSlidingCurvePair.cxx | 167 ++ .../RWStepKinematics_RWSlidingCurvePair.hxx | 46 + ...StepKinematics_RWSlidingCurvePairValue.cxx | 113 + ...StepKinematics_RWSlidingCurvePairValue.hxx | 46 + .../RWStepKinematics_RWSlidingSurfacePair.cxx | 167 ++ .../RWStepKinematics_RWSlidingSurfacePair.hxx | 46 + ...epKinematics_RWSlidingSurfacePairValue.cxx | 120 + ...epKinematics_RWSlidingSurfacePairValue.hxx | 46 + .../RWStepKinematics_RWSphericalPair.cxx | 180 ++ .../RWStepKinematics_RWSphericalPair.hxx | 46 + .../RWStepKinematics_RWSphericalPairValue.cxx | 133 + .../RWStepKinematics_RWSphericalPairValue.hxx | 46 + ...WStepKinematics_RWSphericalPairWithPin.cxx | 180 ++ ...WStepKinematics_RWSphericalPairWithPin.hxx | 46 + ...ematics_RWSphericalPairWithPinAndRange.cxx | 255 ++ ...ematics_RWSphericalPairWithPinAndRange.hxx | 46 + ...tepKinematics_RWSphericalPairWithRange.cxx | 289 +++ ...tepKinematics_RWSphericalPairWithRange.hxx | 46 + ...WStepKinematics_RWSurfacePairWithRange.cxx | 225 ++ ...WStepKinematics_RWSurfacePairWithRange.hxx | 46 + .../RWStepKinematics_RWUnconstrainedPair.cxx | 180 ++ .../RWStepKinematics_RWUnconstrainedPair.hxx | 46 + ...tepKinematics_RWUnconstrainedPairValue.cxx | 105 + ...tepKinematics_RWUnconstrainedPairValue.hxx | 46 + .../RWStepKinematics_RWUniversalPair.cxx | 204 ++ .../RWStepKinematics_RWUniversalPair.hxx | 46 + .../RWStepKinematics_RWUniversalPairValue.cxx | 109 + .../RWStepKinematics_RWUniversalPairValue.hxx | 46 + ...tepKinematics_RWUniversalPairWithRange.cxx | 278 ++ ...tepKinematics_RWUniversalPairWithRange.hxx | 46 + src/RWStepRepr/FILES | 4 + ...pRepr_RWRepresentationContextReference.cxx | 79 + ...pRepr_RWRepresentationContextReference.hxx | 46 + .../RWStepRepr_RWRepresentationReference.cxx | 88 + .../RWStepRepr_RWRepresentationReference.hxx | 46 + src/STEPCAFControl/STEPCAFControl_Reader.cxx | 74 +- src/STEPCAFControl/STEPCAFControl_Reader.hxx | 17 +- src/StepAP214/StepAP214_Protocol.cxx | 160 +- src/StepGeom/FILES | 2 + src/StepGeom/StepGeom_SuParameters.cxx | 176 ++ src/StepGeom/StepGeom_SuParameters.hxx | 86 + src/StepKinematics/FILES | 171 ++ .../StepKinematics_ActuatedDirection.hxx | 27 + ...ematics_ActuatedKinPairAndOrderKinPair.cxx | 54 + ...ematics_ActuatedKinPairAndOrderKinPair.hxx | 72 + .../StepKinematics_ActuatedKinematicPair.cxx | 264 ++ .../StepKinematics_ActuatedKinematicPair.hxx | 121 + ...xtDependentKinematicLinkRepresentation.cxx | 76 + ...xtDependentKinematicLinkRepresentation.hxx | 58 + .../StepKinematics_CylindricalPair.cxx | 27 + .../StepKinematics_CylindricalPair.hxx | 42 + .../StepKinematics_CylindricalPairValue.cxx | 80 + .../StepKinematics_CylindricalPairValue.hxx | 60 + ...tepKinematics_CylindricalPairWithRange.cxx | 204 ++ ...tepKinematics_CylindricalPairWithRange.hxx | 103 + .../StepKinematics_FullyConstrainedPair.cxx | 27 + .../StepKinematics_FullyConstrainedPair.hxx | 42 + .../StepKinematics_GearPair.cxx | 153 ++ .../StepKinematics_GearPair.hxx | 88 + .../StepKinematics_GearPairValue.cxx | 59 + .../StepKinematics_GearPairValue.hxx | 53 + .../StepKinematics_GearPairWithRange.cxx | 130 + .../StepKinematics_GearPairWithRange.hxx | 80 + .../StepKinematics_HighOrderKinematicPair.cxx | 27 + .../StepKinematics_HighOrderKinematicPair.hxx | 42 + .../StepKinematics_HomokineticPair.cxx | 27 + .../StepKinematics_HomokineticPair.hxx | 42 + .../StepKinematics_KinematicJoint.cxx | 27 + .../StepKinematics_KinematicJoint.hxx | 40 + .../StepKinematics_KinematicLink.cxx | 27 + .../StepKinematics_KinematicLink.hxx | 39 + ...Kinematics_KinematicLinkRepresentation.cxx | 61 + ...Kinematics_KinematicLinkRepresentation.hxx | 56 + ...KinematicLinkRepresentationAssociation.cxx | 27 + ...KinematicLinkRepresentationAssociation.hxx | 40 + .../StepKinematics_KinematicPair.cxx | 86 + .../StepKinematics_KinematicPair.hxx | 65 + ...ematicPropertyDefinitionRepresentation.cxx | 27 + ...ematicPropertyDefinitionRepresentation.hxx | 40 + ...nematicPropertyMechanismRepresentation.cxx | 59 + ...nematicPropertyMechanismRepresentation.hxx | 54 + ...ics_KinematicTopologyDirectedStructure.cxx | 61 + ...ics_KinematicTopologyDirectedStructure.hxx | 56 + ...tics_KinematicTopologyNetworkStructure.cxx | 61 + ...tics_KinematicTopologyNetworkStructure.hxx | 56 + ..._KinematicTopologyRepresentationSelect.cxx | 69 + ..._KinematicTopologyRepresentationSelect.hxx | 58 + ...pKinematics_KinematicTopologyStructure.cxx | 27 + ...pKinematics_KinematicTopologyStructure.hxx | 41 + ...Kinematics_LinearFlexibleAndPinionPair.cxx | 69 + ...Kinematics_LinearFlexibleAndPinionPair.hxx | 60 + ...atics_LinearFlexibleAndPlanarCurvePair.cxx | 90 + ...atics_LinearFlexibleAndPlanarCurvePair.hxx | 68 + ...atics_LinearFlexibleLinkRepresentation.cxx | 27 + ...atics_LinearFlexibleLinkRepresentation.hxx | 42 + .../StepKinematics_LowOrderKinematicPair.cxx | 174 ++ .../StepKinematics_LowOrderKinematicPair.hxx | 95 + ...pKinematics_LowOrderKinematicPairValue.cxx | 164 ++ ...pKinematics_LowOrderKinematicPairValue.hxx | 88 + ...owOrderKinematicPairWithMotionCoupling.cxx | 27 + ...owOrderKinematicPairWithMotionCoupling.hxx | 42 + ...ematics_LowOrderKinematicPairWithRange.cxx | 492 ++++ ...ematics_LowOrderKinematicPairWithRange.hxx | 191 ++ ...StepKinematics_MechanismRepresentation.cxx | 61 + ...StepKinematics_MechanismRepresentation.hxx | 56 + ...inematics_MechanismStateRepresentation.cxx | 42 + ...inematics_MechanismStateRepresentation.hxx | 49 + .../StepKinematics_OrientedJoint.cxx | 27 + .../StepKinematics_OrientedJoint.hxx | 41 + ...ematics_PairRepresentationRelationship.cxx | 67 + ...ematics_PairRepresentationRelationship.hxx | 59 + .../StepKinematics_PairValue.cxx | 57 + .../StepKinematics_PairValue.hxx | 52 + .../StepKinematics_PlanarCurvePair.cxx | 111 + .../StepKinematics_PlanarCurvePair.hxx | 75 + .../StepKinematics_PlanarCurvePairRange.cxx | 96 + .../StepKinematics_PlanarCurvePairRange.hxx | 72 + .../StepKinematics_PlanarPair.cxx | 27 + .../StepKinematics_PlanarPair.hxx | 42 + .../StepKinematics_PlanarPairValue.cxx | 101 + .../StepKinematics_PlanarPairValue.hxx | 67 + .../StepKinematics_PlanarPairWithRange.cxx | 276 ++ .../StepKinematics_PlanarPairWithRange.hxx | 125 + .../StepKinematics_PointOnPlanarCurvePair.cxx | 90 + .../StepKinematics_PointOnPlanarCurvePair.hxx | 68 + ...Kinematics_PointOnPlanarCurvePairValue.cxx | 80 + ...Kinematics_PointOnPlanarCurvePairValue.hxx | 62 + ...matics_PointOnPlanarCurvePairWithRange.cxx | 289 +++ ...matics_PointOnPlanarCurvePairWithRange.hxx | 130 + .../StepKinematics_PointOnSurfacePair.cxx | 69 + .../StepKinematics_PointOnSurfacePair.hxx | 61 + ...StepKinematics_PointOnSurfacePairValue.cxx | 80 + ...StepKinematics_PointOnSurfacePairValue.hxx | 62 + ...Kinematics_PointOnSurfacePairWithRange.cxx | 287 ++ ...Kinematics_PointOnSurfacePairWithRange.hxx | 129 + .../StepKinematics_PrismaticPair.cxx | 27 + .../StepKinematics_PrismaticPair.hxx | 42 + .../StepKinematics_PrismaticPairValue.cxx | 59 + .../StepKinematics_PrismaticPairValue.hxx | 53 + .../StepKinematics_PrismaticPairWithRange.cxx | 132 + .../StepKinematics_PrismaticPairWithRange.hxx | 81 + ...Kinematics_ProductDefinitionKinematics.cxx | 27 + ...Kinematics_ProductDefinitionKinematics.hxx | 40 + ...roductDefinitionRelationshipKinematics.cxx | 27 + ...roductDefinitionRelationshipKinematics.hxx | 40 + .../StepKinematics_RackAndPinionPair.cxx | 69 + .../StepKinematics_RackAndPinionPair.hxx | 60 + .../StepKinematics_RackAndPinionPairValue.cxx | 59 + .../StepKinematics_RackAndPinionPairValue.hxx | 53 + ...pKinematics_RackAndPinionPairWithRange.cxx | 122 + ...pKinematics_RackAndPinionPairWithRange.hxx | 76 + .../StepKinematics_RevolutePair.cxx | 27 + .../StepKinematics_RevolutePair.hxx | 42 + .../StepKinematics_RevolutePairValue.cxx | 59 + .../StepKinematics_RevolutePairValue.hxx | 53 + .../StepKinematics_RevolutePairWithRange.cxx | 132 + .../StepKinematics_RevolutePairWithRange.hxx | 81 + ...StepKinematics_RigidLinkRepresentation.cxx | 27 + ...StepKinematics_RigidLinkRepresentation.hxx | 42 + .../StepKinematics_RigidPlacement.cxx | 57 + .../StepKinematics_RigidPlacement.hxx | 53 + .../StepKinematics_RollingCurvePair.cxx | 27 + .../StepKinematics_RollingCurvePair.hxx | 43 + .../StepKinematics_RollingCurvePairValue.cxx | 59 + .../StepKinematics_RollingCurvePairValue.hxx | 54 + .../StepKinematics_RollingSurfacePair.cxx | 27 + .../StepKinematics_RollingSurfacePair.hxx | 43 + ...StepKinematics_RollingSurfacePairValue.cxx | 80 + ...StepKinematics_RollingSurfacePairValue.hxx | 61 + .../StepKinematics_RotationAboutDirection.cxx | 78 + .../StepKinematics_RotationAboutDirection.hxx | 59 + .../StepKinematics_ScrewPair.cxx | 69 + .../StepKinematics_ScrewPair.hxx | 60 + .../StepKinematics_ScrewPairValue.cxx | 59 + .../StepKinematics_ScrewPairValue.hxx | 53 + .../StepKinematics_ScrewPairWithRange.cxx | 122 + .../StepKinematics_ScrewPairWithRange.hxx | 76 + .../StepKinematics_SlidingCurvePair.cxx | 27 + .../StepKinematics_SlidingCurvePair.hxx | 43 + .../StepKinematics_SlidingCurvePairValue.cxx | 80 + .../StepKinematics_SlidingCurvePairValue.hxx | 61 + .../StepKinematics_SlidingSurfacePair.cxx | 27 + .../StepKinematics_SlidingSurfacePair.hxx | 43 + ...StepKinematics_SlidingSurfacePairValue.cxx | 101 + ...StepKinematics_SlidingSurfacePairValue.hxx | 68 + .../StepKinematics_SpatialRotation.cxx | 57 + .../StepKinematics_SpatialRotation.hxx | 53 + .../StepKinematics_SphericalPair.cxx | 27 + .../StepKinematics_SphericalPair.hxx | 42 + .../StepKinematics_SphericalPairSelect.cxx | 57 + .../StepKinematics_SphericalPairSelect.hxx | 53 + .../StepKinematics_SphericalPairValue.cxx | 59 + .../StepKinematics_SphericalPairValue.hxx | 54 + .../StepKinematics_SphericalPairWithPin.cxx | 27 + .../StepKinematics_SphericalPairWithPin.hxx | 42 + ...inematics_SphericalPairWithPinAndRange.cxx | 204 ++ ...inematics_SphericalPairWithPinAndRange.hxx | 103 + .../StepKinematics_SphericalPairWithRange.cxx | 276 ++ .../StepKinematics_SphericalPairWithRange.hxx | 125 + .../StepKinematics_SurfacePair.cxx | 111 + .../StepKinematics_SurfacePair.hxx | 75 + .../StepKinematics_SurfacePairWithRange.cxx | 168 ++ .../StepKinematics_SurfacePairWithRange.hxx | 94 + .../StepKinematics_UnconstrainedPair.cxx | 27 + .../StepKinematics_UnconstrainedPair.hxx | 42 + .../StepKinematics_UnconstrainedPairValue.cxx | 59 + .../StepKinematics_UnconstrainedPairValue.hxx | 54 + .../StepKinematics_UniversalPair.cxx | 96 + .../StepKinematics_UniversalPair.hxx | 70 + .../StepKinematics_UniversalPairValue.cxx | 80 + .../StepKinematics_UniversalPairValue.hxx | 60 + .../StepKinematics_UniversalPairWithRange.cxx | 208 ++ .../StepKinematics_UniversalPairWithRange.hxx | 105 + src/StepRepr/FILES | 6 + .../StepRepr_ItemDefinedTransformation.hxx | 2 + ...tepRepr_RepresentationContextReference.cxx | 59 + ...tepRepr_RepresentationContextReference.hxx | 50 + ...epresentationOrRepresentationReference.cxx | 61 + ...epresentationOrRepresentationReference.hxx | 53 + .../StepRepr_RepresentationReference.cxx | 82 + .../StepRepr_RepresentationReference.hxx | 58 + .../StepRepr_RepresentationRelationship.hxx | 2 + src/StepRepr/StepRepr_Transformation.cxx | 2 + src/StepRepr/StepRepr_Transformation.hxx | 2 - src/StepToGeom/StepToGeom.cxx | 249 ++ src/StepToGeom/StepToGeom.hxx | 6 + src/TKSTEPAttr/PACKAGES | 2 + 352 files changed, 35311 insertions(+), 450 deletions(-) create mode 100644 src/RWStepGeom/RWStepGeom_RWSuParameters.cxx create mode 100644 src/RWStepGeom/RWStepGeom_RWSuParameters.hxx create mode 100644 src/RWStepKinematics/FILES create mode 100644 src/RWStepKinematics/RWStepKinematics_RWActuatedKinPairAndOrderKinPair.cxx create mode 100644 src/RWStepKinematics/RWStepKinematics_RWActuatedKinPairAndOrderKinPair.hxx create mode 100644 src/RWStepKinematics/RWStepKinematics_RWActuatedKinematicPair.cxx create mode 100644 src/RWStepKinematics/RWStepKinematics_RWActuatedKinematicPair.hxx create mode 100644 src/RWStepKinematics/RWStepKinematics_RWContextDependentKinematicLinkRepresentation.cxx create mode 100644 src/RWStepKinematics/RWStepKinematics_RWContextDependentKinematicLinkRepresentation.hxx create mode 100644 src/RWStepKinematics/RWStepKinematics_RWCylindricalPair.cxx create mode 100644 src/RWStepKinematics/RWStepKinematics_RWCylindricalPair.hxx create mode 100644 src/RWStepKinematics/RWStepKinematics_RWCylindricalPairValue.cxx create mode 100644 src/RWStepKinematics/RWStepKinematics_RWCylindricalPairValue.hxx create mode 100644 src/RWStepKinematics/RWStepKinematics_RWCylindricalPairWithRange.cxx create mode 100644 src/RWStepKinematics/RWStepKinematics_RWCylindricalPairWithRange.hxx create mode 100644 src/RWStepKinematics/RWStepKinematics_RWFullyConstrainedPair.cxx create mode 100644 src/RWStepKinematics/RWStepKinematics_RWFullyConstrainedPair.hxx create mode 100644 src/RWStepKinematics/RWStepKinematics_RWGearPair.cxx create mode 100644 src/RWStepKinematics/RWStepKinematics_RWGearPair.hxx create mode 100644 src/RWStepKinematics/RWStepKinematics_RWGearPairValue.cxx create mode 100644 src/RWStepKinematics/RWStepKinematics_RWGearPairValue.hxx create mode 100644 src/RWStepKinematics/RWStepKinematics_RWGearPairWithRange.cxx create mode 100644 src/RWStepKinematics/RWStepKinematics_RWGearPairWithRange.hxx create mode 100644 src/RWStepKinematics/RWStepKinematics_RWHomokineticPair.cxx create mode 100644 src/RWStepKinematics/RWStepKinematics_RWHomokineticPair.hxx create mode 100644 src/RWStepKinematics/RWStepKinematics_RWKinematicJoint.cxx create mode 100644 src/RWStepKinematics/RWStepKinematics_RWKinematicJoint.hxx create mode 100644 src/RWStepKinematics/RWStepKinematics_RWKinematicLink.cxx create mode 100644 src/RWStepKinematics/RWStepKinematics_RWKinematicLink.hxx create mode 100644 src/RWStepKinematics/RWStepKinematics_RWKinematicLinkRepresentationAssociation.cxx create mode 100644 src/RWStepKinematics/RWStepKinematics_RWKinematicLinkRepresentationAssociation.hxx create mode 100644 src/RWStepKinematics/RWStepKinematics_RWKinematicPropertyMechanismRepresentation.cxx create mode 100644 src/RWStepKinematics/RWStepKinematics_RWKinematicPropertyMechanismRepresentation.hxx create mode 100644 src/RWStepKinematics/RWStepKinematics_RWKinematicTopologyDirectedStructure.cxx create mode 100644 src/RWStepKinematics/RWStepKinematics_RWKinematicTopologyDirectedStructure.hxx create mode 100644 src/RWStepKinematics/RWStepKinematics_RWKinematicTopologyNetworkStructure.cxx create mode 100644 src/RWStepKinematics/RWStepKinematics_RWKinematicTopologyNetworkStructure.hxx create mode 100644 src/RWStepKinematics/RWStepKinematics_RWKinematicTopologyStructure.cxx create mode 100644 src/RWStepKinematics/RWStepKinematics_RWKinematicTopologyStructure.hxx create mode 100644 src/RWStepKinematics/RWStepKinematics_RWLinearFlexibleAndPinionPair.cxx create mode 100644 src/RWStepKinematics/RWStepKinematics_RWLinearFlexibleAndPinionPair.hxx create mode 100644 src/RWStepKinematics/RWStepKinematics_RWLinearFlexibleAndPlanarCurvePair.cxx create mode 100644 src/RWStepKinematics/RWStepKinematics_RWLinearFlexibleAndPlanarCurvePair.hxx create mode 100644 src/RWStepKinematics/RWStepKinematics_RWLinearFlexibleLinkRepresentation.cxx create mode 100644 src/RWStepKinematics/RWStepKinematics_RWLinearFlexibleLinkRepresentation.hxx create mode 100644 src/RWStepKinematics/RWStepKinematics_RWLowOrderKinematicPair.cxx create mode 100644 src/RWStepKinematics/RWStepKinematics_RWLowOrderKinematicPair.hxx create mode 100644 src/RWStepKinematics/RWStepKinematics_RWLowOrderKinematicPairValue.cxx create mode 100644 src/RWStepKinematics/RWStepKinematics_RWLowOrderKinematicPairValue.hxx create mode 100644 src/RWStepKinematics/RWStepKinematics_RWLowOrderKinematicPairWithRange.cxx create mode 100644 src/RWStepKinematics/RWStepKinematics_RWLowOrderKinematicPairWithRange.hxx create mode 100644 src/RWStepKinematics/RWStepKinematics_RWMechanismRepresentation.cxx create mode 100644 src/RWStepKinematics/RWStepKinematics_RWMechanismRepresentation.hxx create mode 100644 src/RWStepKinematics/RWStepKinematics_RWMechanismStateRepresentation.cxx create mode 100644 src/RWStepKinematics/RWStepKinematics_RWMechanismStateRepresentation.hxx create mode 100644 src/RWStepKinematics/RWStepKinematics_RWOrientedJoint.cxx create mode 100644 src/RWStepKinematics/RWStepKinematics_RWOrientedJoint.hxx create mode 100644 src/RWStepKinematics/RWStepKinematics_RWPairRepresentationRelationship.cxx create mode 100644 src/RWStepKinematics/RWStepKinematics_RWPairRepresentationRelationship.hxx create mode 100644 src/RWStepKinematics/RWStepKinematics_RWPlanarCurvePair.cxx create mode 100644 src/RWStepKinematics/RWStepKinematics_RWPlanarCurvePair.hxx create mode 100644 src/RWStepKinematics/RWStepKinematics_RWPlanarCurvePairRange.cxx create mode 100644 src/RWStepKinematics/RWStepKinematics_RWPlanarCurvePairRange.hxx create mode 100644 src/RWStepKinematics/RWStepKinematics_RWPlanarPair.cxx create mode 100644 src/RWStepKinematics/RWStepKinematics_RWPlanarPair.hxx create mode 100644 src/RWStepKinematics/RWStepKinematics_RWPlanarPairValue.cxx create mode 100644 src/RWStepKinematics/RWStepKinematics_RWPlanarPairValue.hxx create mode 100644 src/RWStepKinematics/RWStepKinematics_RWPlanarPairWithRange.cxx create mode 100644 src/RWStepKinematics/RWStepKinematics_RWPlanarPairWithRange.hxx create mode 100644 src/RWStepKinematics/RWStepKinematics_RWPointOnPlanarCurvePair.cxx create mode 100644 src/RWStepKinematics/RWStepKinematics_RWPointOnPlanarCurvePair.hxx create mode 100644 src/RWStepKinematics/RWStepKinematics_RWPointOnPlanarCurvePairValue.cxx create mode 100644 src/RWStepKinematics/RWStepKinematics_RWPointOnPlanarCurvePairValue.hxx create mode 100644 src/RWStepKinematics/RWStepKinematics_RWPointOnPlanarCurvePairWithRange.cxx create mode 100644 src/RWStepKinematics/RWStepKinematics_RWPointOnPlanarCurvePairWithRange.hxx create mode 100644 src/RWStepKinematics/RWStepKinematics_RWPointOnSurfacePair.cxx create mode 100644 src/RWStepKinematics/RWStepKinematics_RWPointOnSurfacePair.hxx create mode 100644 src/RWStepKinematics/RWStepKinematics_RWPointOnSurfacePairValue.cxx create mode 100644 src/RWStepKinematics/RWStepKinematics_RWPointOnSurfacePairValue.hxx create mode 100644 src/RWStepKinematics/RWStepKinematics_RWPointOnSurfacePairWithRange.cxx create mode 100644 src/RWStepKinematics/RWStepKinematics_RWPointOnSurfacePairWithRange.hxx create mode 100644 src/RWStepKinematics/RWStepKinematics_RWPrismaticPair.cxx create mode 100644 src/RWStepKinematics/RWStepKinematics_RWPrismaticPair.hxx create mode 100644 src/RWStepKinematics/RWStepKinematics_RWPrismaticPairValue.cxx create mode 100644 src/RWStepKinematics/RWStepKinematics_RWPrismaticPairValue.hxx create mode 100644 src/RWStepKinematics/RWStepKinematics_RWPrismaticPairWithRange.cxx create mode 100644 src/RWStepKinematics/RWStepKinematics_RWPrismaticPairWithRange.hxx create mode 100644 src/RWStepKinematics/RWStepKinematics_RWProductDefinitionKinematics.cxx create mode 100644 src/RWStepKinematics/RWStepKinematics_RWProductDefinitionKinematics.hxx create mode 100644 src/RWStepKinematics/RWStepKinematics_RWProductDefinitionRelationshipKinematics.cxx create mode 100644 src/RWStepKinematics/RWStepKinematics_RWProductDefinitionRelationshipKinematics.hxx create mode 100644 src/RWStepKinematics/RWStepKinematics_RWRackAndPinionPair.cxx create mode 100644 src/RWStepKinematics/RWStepKinematics_RWRackAndPinionPair.hxx create mode 100644 src/RWStepKinematics/RWStepKinematics_RWRackAndPinionPairValue.cxx create mode 100644 src/RWStepKinematics/RWStepKinematics_RWRackAndPinionPairValue.hxx create mode 100644 src/RWStepKinematics/RWStepKinematics_RWRackAndPinionPairWithRange.cxx create mode 100644 src/RWStepKinematics/RWStepKinematics_RWRackAndPinionPairWithRange.hxx create mode 100644 src/RWStepKinematics/RWStepKinematics_RWRevolutePair.cxx create mode 100644 src/RWStepKinematics/RWStepKinematics_RWRevolutePair.hxx create mode 100644 src/RWStepKinematics/RWStepKinematics_RWRevolutePairValue.cxx create mode 100644 src/RWStepKinematics/RWStepKinematics_RWRevolutePairValue.hxx create mode 100644 src/RWStepKinematics/RWStepKinematics_RWRevolutePairWithRange.cxx create mode 100644 src/RWStepKinematics/RWStepKinematics_RWRevolutePairWithRange.hxx create mode 100644 src/RWStepKinematics/RWStepKinematics_RWRigidLinkRepresentation.cxx create mode 100644 src/RWStepKinematics/RWStepKinematics_RWRigidLinkRepresentation.hxx create mode 100644 src/RWStepKinematics/RWStepKinematics_RWRollingCurvePair.cxx create mode 100644 src/RWStepKinematics/RWStepKinematics_RWRollingCurvePair.hxx create mode 100644 src/RWStepKinematics/RWStepKinematics_RWRollingCurvePairValue.cxx create mode 100644 src/RWStepKinematics/RWStepKinematics_RWRollingCurvePairValue.hxx create mode 100644 src/RWStepKinematics/RWStepKinematics_RWRollingSurfacePair.cxx create mode 100644 src/RWStepKinematics/RWStepKinematics_RWRollingSurfacePair.hxx create mode 100644 src/RWStepKinematics/RWStepKinematics_RWRollingSurfacePairValue.cxx create mode 100644 src/RWStepKinematics/RWStepKinematics_RWRollingSurfacePairValue.hxx create mode 100644 src/RWStepKinematics/RWStepKinematics_RWRotationAboutDirection.cxx create mode 100644 src/RWStepKinematics/RWStepKinematics_RWRotationAboutDirection.hxx create mode 100644 src/RWStepKinematics/RWStepKinematics_RWScrewPair.cxx create mode 100644 src/RWStepKinematics/RWStepKinematics_RWScrewPair.hxx create mode 100644 src/RWStepKinematics/RWStepKinematics_RWScrewPairValue.cxx create mode 100644 src/RWStepKinematics/RWStepKinematics_RWScrewPairValue.hxx create mode 100644 src/RWStepKinematics/RWStepKinematics_RWScrewPairWithRange.cxx create mode 100644 src/RWStepKinematics/RWStepKinematics_RWScrewPairWithRange.hxx create mode 100644 src/RWStepKinematics/RWStepKinematics_RWSlidingCurvePair.cxx create mode 100644 src/RWStepKinematics/RWStepKinematics_RWSlidingCurvePair.hxx create mode 100644 src/RWStepKinematics/RWStepKinematics_RWSlidingCurvePairValue.cxx create mode 100644 src/RWStepKinematics/RWStepKinematics_RWSlidingCurvePairValue.hxx create mode 100644 src/RWStepKinematics/RWStepKinematics_RWSlidingSurfacePair.cxx create mode 100644 src/RWStepKinematics/RWStepKinematics_RWSlidingSurfacePair.hxx create mode 100644 src/RWStepKinematics/RWStepKinematics_RWSlidingSurfacePairValue.cxx create mode 100644 src/RWStepKinematics/RWStepKinematics_RWSlidingSurfacePairValue.hxx create mode 100644 src/RWStepKinematics/RWStepKinematics_RWSphericalPair.cxx create mode 100644 src/RWStepKinematics/RWStepKinematics_RWSphericalPair.hxx create mode 100644 src/RWStepKinematics/RWStepKinematics_RWSphericalPairValue.cxx create mode 100644 src/RWStepKinematics/RWStepKinematics_RWSphericalPairValue.hxx create mode 100644 src/RWStepKinematics/RWStepKinematics_RWSphericalPairWithPin.cxx create mode 100644 src/RWStepKinematics/RWStepKinematics_RWSphericalPairWithPin.hxx create mode 100644 src/RWStepKinematics/RWStepKinematics_RWSphericalPairWithPinAndRange.cxx create mode 100644 src/RWStepKinematics/RWStepKinematics_RWSphericalPairWithPinAndRange.hxx create mode 100644 src/RWStepKinematics/RWStepKinematics_RWSphericalPairWithRange.cxx create mode 100644 src/RWStepKinematics/RWStepKinematics_RWSphericalPairWithRange.hxx create mode 100644 src/RWStepKinematics/RWStepKinematics_RWSurfacePairWithRange.cxx create mode 100644 src/RWStepKinematics/RWStepKinematics_RWSurfacePairWithRange.hxx create mode 100644 src/RWStepKinematics/RWStepKinematics_RWUnconstrainedPair.cxx create mode 100644 src/RWStepKinematics/RWStepKinematics_RWUnconstrainedPair.hxx create mode 100644 src/RWStepKinematics/RWStepKinematics_RWUnconstrainedPairValue.cxx create mode 100644 src/RWStepKinematics/RWStepKinematics_RWUnconstrainedPairValue.hxx create mode 100644 src/RWStepKinematics/RWStepKinematics_RWUniversalPair.cxx create mode 100644 src/RWStepKinematics/RWStepKinematics_RWUniversalPair.hxx create mode 100644 src/RWStepKinematics/RWStepKinematics_RWUniversalPairValue.cxx create mode 100644 src/RWStepKinematics/RWStepKinematics_RWUniversalPairValue.hxx create mode 100644 src/RWStepKinematics/RWStepKinematics_RWUniversalPairWithRange.cxx create mode 100644 src/RWStepKinematics/RWStepKinematics_RWUniversalPairWithRange.hxx create mode 100644 src/RWStepRepr/RWStepRepr_RWRepresentationContextReference.cxx create mode 100644 src/RWStepRepr/RWStepRepr_RWRepresentationContextReference.hxx create mode 100644 src/RWStepRepr/RWStepRepr_RWRepresentationReference.cxx create mode 100644 src/RWStepRepr/RWStepRepr_RWRepresentationReference.hxx create mode 100644 src/StepGeom/StepGeom_SuParameters.cxx create mode 100644 src/StepGeom/StepGeom_SuParameters.hxx create mode 100644 src/StepKinematics/FILES create mode 100644 src/StepKinematics/StepKinematics_ActuatedDirection.hxx create mode 100644 src/StepKinematics/StepKinematics_ActuatedKinPairAndOrderKinPair.cxx create mode 100644 src/StepKinematics/StepKinematics_ActuatedKinPairAndOrderKinPair.hxx create mode 100644 src/StepKinematics/StepKinematics_ActuatedKinematicPair.cxx create mode 100644 src/StepKinematics/StepKinematics_ActuatedKinematicPair.hxx create mode 100644 src/StepKinematics/StepKinematics_ContextDependentKinematicLinkRepresentation.cxx create mode 100644 src/StepKinematics/StepKinematics_ContextDependentKinematicLinkRepresentation.hxx create mode 100644 src/StepKinematics/StepKinematics_CylindricalPair.cxx create mode 100644 src/StepKinematics/StepKinematics_CylindricalPair.hxx create mode 100644 src/StepKinematics/StepKinematics_CylindricalPairValue.cxx create mode 100644 src/StepKinematics/StepKinematics_CylindricalPairValue.hxx create mode 100644 src/StepKinematics/StepKinematics_CylindricalPairWithRange.cxx create mode 100644 src/StepKinematics/StepKinematics_CylindricalPairWithRange.hxx create mode 100644 src/StepKinematics/StepKinematics_FullyConstrainedPair.cxx create mode 100644 src/StepKinematics/StepKinematics_FullyConstrainedPair.hxx create mode 100644 src/StepKinematics/StepKinematics_GearPair.cxx create mode 100644 src/StepKinematics/StepKinematics_GearPair.hxx create mode 100644 src/StepKinematics/StepKinematics_GearPairValue.cxx create mode 100644 src/StepKinematics/StepKinematics_GearPairValue.hxx create mode 100644 src/StepKinematics/StepKinematics_GearPairWithRange.cxx create mode 100644 src/StepKinematics/StepKinematics_GearPairWithRange.hxx create mode 100644 src/StepKinematics/StepKinematics_HighOrderKinematicPair.cxx create mode 100644 src/StepKinematics/StepKinematics_HighOrderKinematicPair.hxx create mode 100644 src/StepKinematics/StepKinematics_HomokineticPair.cxx create mode 100644 src/StepKinematics/StepKinematics_HomokineticPair.hxx create mode 100644 src/StepKinematics/StepKinematics_KinematicJoint.cxx create mode 100644 src/StepKinematics/StepKinematics_KinematicJoint.hxx create mode 100644 src/StepKinematics/StepKinematics_KinematicLink.cxx create mode 100644 src/StepKinematics/StepKinematics_KinematicLink.hxx create mode 100644 src/StepKinematics/StepKinematics_KinematicLinkRepresentation.cxx create mode 100644 src/StepKinematics/StepKinematics_KinematicLinkRepresentation.hxx create mode 100644 src/StepKinematics/StepKinematics_KinematicLinkRepresentationAssociation.cxx create mode 100644 src/StepKinematics/StepKinematics_KinematicLinkRepresentationAssociation.hxx create mode 100644 src/StepKinematics/StepKinematics_KinematicPair.cxx create mode 100644 src/StepKinematics/StepKinematics_KinematicPair.hxx create mode 100644 src/StepKinematics/StepKinematics_KinematicPropertyDefinitionRepresentation.cxx create mode 100644 src/StepKinematics/StepKinematics_KinematicPropertyDefinitionRepresentation.hxx create mode 100644 src/StepKinematics/StepKinematics_KinematicPropertyMechanismRepresentation.cxx create mode 100644 src/StepKinematics/StepKinematics_KinematicPropertyMechanismRepresentation.hxx create mode 100644 src/StepKinematics/StepKinematics_KinematicTopologyDirectedStructure.cxx create mode 100644 src/StepKinematics/StepKinematics_KinematicTopologyDirectedStructure.hxx create mode 100644 src/StepKinematics/StepKinematics_KinematicTopologyNetworkStructure.cxx create mode 100644 src/StepKinematics/StepKinematics_KinematicTopologyNetworkStructure.hxx create mode 100644 src/StepKinematics/StepKinematics_KinematicTopologyRepresentationSelect.cxx create mode 100644 src/StepKinematics/StepKinematics_KinematicTopologyRepresentationSelect.hxx create mode 100644 src/StepKinematics/StepKinematics_KinematicTopologyStructure.cxx create mode 100644 src/StepKinematics/StepKinematics_KinematicTopologyStructure.hxx create mode 100644 src/StepKinematics/StepKinematics_LinearFlexibleAndPinionPair.cxx create mode 100644 src/StepKinematics/StepKinematics_LinearFlexibleAndPinionPair.hxx create mode 100644 src/StepKinematics/StepKinematics_LinearFlexibleAndPlanarCurvePair.cxx create mode 100644 src/StepKinematics/StepKinematics_LinearFlexibleAndPlanarCurvePair.hxx create mode 100644 src/StepKinematics/StepKinematics_LinearFlexibleLinkRepresentation.cxx create mode 100644 src/StepKinematics/StepKinematics_LinearFlexibleLinkRepresentation.hxx create mode 100644 src/StepKinematics/StepKinematics_LowOrderKinematicPair.cxx create mode 100644 src/StepKinematics/StepKinematics_LowOrderKinematicPair.hxx create mode 100644 src/StepKinematics/StepKinematics_LowOrderKinematicPairValue.cxx create mode 100644 src/StepKinematics/StepKinematics_LowOrderKinematicPairValue.hxx create mode 100644 src/StepKinematics/StepKinematics_LowOrderKinematicPairWithMotionCoupling.cxx create mode 100644 src/StepKinematics/StepKinematics_LowOrderKinematicPairWithMotionCoupling.hxx create mode 100644 src/StepKinematics/StepKinematics_LowOrderKinematicPairWithRange.cxx create mode 100644 src/StepKinematics/StepKinematics_LowOrderKinematicPairWithRange.hxx create mode 100644 src/StepKinematics/StepKinematics_MechanismRepresentation.cxx create mode 100644 src/StepKinematics/StepKinematics_MechanismRepresentation.hxx create mode 100644 src/StepKinematics/StepKinematics_MechanismStateRepresentation.cxx create mode 100644 src/StepKinematics/StepKinematics_MechanismStateRepresentation.hxx create mode 100644 src/StepKinematics/StepKinematics_OrientedJoint.cxx create mode 100644 src/StepKinematics/StepKinematics_OrientedJoint.hxx create mode 100644 src/StepKinematics/StepKinematics_PairRepresentationRelationship.cxx create mode 100644 src/StepKinematics/StepKinematics_PairRepresentationRelationship.hxx create mode 100644 src/StepKinematics/StepKinematics_PairValue.cxx create mode 100644 src/StepKinematics/StepKinematics_PairValue.hxx create mode 100644 src/StepKinematics/StepKinematics_PlanarCurvePair.cxx create mode 100644 src/StepKinematics/StepKinematics_PlanarCurvePair.hxx create mode 100644 src/StepKinematics/StepKinematics_PlanarCurvePairRange.cxx create mode 100644 src/StepKinematics/StepKinematics_PlanarCurvePairRange.hxx create mode 100644 src/StepKinematics/StepKinematics_PlanarPair.cxx create mode 100644 src/StepKinematics/StepKinematics_PlanarPair.hxx create mode 100644 src/StepKinematics/StepKinematics_PlanarPairValue.cxx create mode 100644 src/StepKinematics/StepKinematics_PlanarPairValue.hxx create mode 100644 src/StepKinematics/StepKinematics_PlanarPairWithRange.cxx create mode 100644 src/StepKinematics/StepKinematics_PlanarPairWithRange.hxx create mode 100644 src/StepKinematics/StepKinematics_PointOnPlanarCurvePair.cxx create mode 100644 src/StepKinematics/StepKinematics_PointOnPlanarCurvePair.hxx create mode 100644 src/StepKinematics/StepKinematics_PointOnPlanarCurvePairValue.cxx create mode 100644 src/StepKinematics/StepKinematics_PointOnPlanarCurvePairValue.hxx create mode 100644 src/StepKinematics/StepKinematics_PointOnPlanarCurvePairWithRange.cxx create mode 100644 src/StepKinematics/StepKinematics_PointOnPlanarCurvePairWithRange.hxx create mode 100644 src/StepKinematics/StepKinematics_PointOnSurfacePair.cxx create mode 100644 src/StepKinematics/StepKinematics_PointOnSurfacePair.hxx create mode 100644 src/StepKinematics/StepKinematics_PointOnSurfacePairValue.cxx create mode 100644 src/StepKinematics/StepKinematics_PointOnSurfacePairValue.hxx create mode 100644 src/StepKinematics/StepKinematics_PointOnSurfacePairWithRange.cxx create mode 100644 src/StepKinematics/StepKinematics_PointOnSurfacePairWithRange.hxx create mode 100644 src/StepKinematics/StepKinematics_PrismaticPair.cxx create mode 100644 src/StepKinematics/StepKinematics_PrismaticPair.hxx create mode 100644 src/StepKinematics/StepKinematics_PrismaticPairValue.cxx create mode 100644 src/StepKinematics/StepKinematics_PrismaticPairValue.hxx create mode 100644 src/StepKinematics/StepKinematics_PrismaticPairWithRange.cxx create mode 100644 src/StepKinematics/StepKinematics_PrismaticPairWithRange.hxx create mode 100644 src/StepKinematics/StepKinematics_ProductDefinitionKinematics.cxx create mode 100644 src/StepKinematics/StepKinematics_ProductDefinitionKinematics.hxx create mode 100644 src/StepKinematics/StepKinematics_ProductDefinitionRelationshipKinematics.cxx create mode 100644 src/StepKinematics/StepKinematics_ProductDefinitionRelationshipKinematics.hxx create mode 100644 src/StepKinematics/StepKinematics_RackAndPinionPair.cxx create mode 100644 src/StepKinematics/StepKinematics_RackAndPinionPair.hxx create mode 100644 src/StepKinematics/StepKinematics_RackAndPinionPairValue.cxx create mode 100644 src/StepKinematics/StepKinematics_RackAndPinionPairValue.hxx create mode 100644 src/StepKinematics/StepKinematics_RackAndPinionPairWithRange.cxx create mode 100644 src/StepKinematics/StepKinematics_RackAndPinionPairWithRange.hxx create mode 100644 src/StepKinematics/StepKinematics_RevolutePair.cxx create mode 100644 src/StepKinematics/StepKinematics_RevolutePair.hxx create mode 100644 src/StepKinematics/StepKinematics_RevolutePairValue.cxx create mode 100644 src/StepKinematics/StepKinematics_RevolutePairValue.hxx create mode 100644 src/StepKinematics/StepKinematics_RevolutePairWithRange.cxx create mode 100644 src/StepKinematics/StepKinematics_RevolutePairWithRange.hxx create mode 100644 src/StepKinematics/StepKinematics_RigidLinkRepresentation.cxx create mode 100644 src/StepKinematics/StepKinematics_RigidLinkRepresentation.hxx create mode 100644 src/StepKinematics/StepKinematics_RigidPlacement.cxx create mode 100644 src/StepKinematics/StepKinematics_RigidPlacement.hxx create mode 100644 src/StepKinematics/StepKinematics_RollingCurvePair.cxx create mode 100644 src/StepKinematics/StepKinematics_RollingCurvePair.hxx create mode 100644 src/StepKinematics/StepKinematics_RollingCurvePairValue.cxx create mode 100644 src/StepKinematics/StepKinematics_RollingCurvePairValue.hxx create mode 100644 src/StepKinematics/StepKinematics_RollingSurfacePair.cxx create mode 100644 src/StepKinematics/StepKinematics_RollingSurfacePair.hxx create mode 100644 src/StepKinematics/StepKinematics_RollingSurfacePairValue.cxx create mode 100644 src/StepKinematics/StepKinematics_RollingSurfacePairValue.hxx create mode 100644 src/StepKinematics/StepKinematics_RotationAboutDirection.cxx create mode 100644 src/StepKinematics/StepKinematics_RotationAboutDirection.hxx create mode 100644 src/StepKinematics/StepKinematics_ScrewPair.cxx create mode 100644 src/StepKinematics/StepKinematics_ScrewPair.hxx create mode 100644 src/StepKinematics/StepKinematics_ScrewPairValue.cxx create mode 100644 src/StepKinematics/StepKinematics_ScrewPairValue.hxx create mode 100644 src/StepKinematics/StepKinematics_ScrewPairWithRange.cxx create mode 100644 src/StepKinematics/StepKinematics_ScrewPairWithRange.hxx create mode 100644 src/StepKinematics/StepKinematics_SlidingCurvePair.cxx create mode 100644 src/StepKinematics/StepKinematics_SlidingCurvePair.hxx create mode 100644 src/StepKinematics/StepKinematics_SlidingCurvePairValue.cxx create mode 100644 src/StepKinematics/StepKinematics_SlidingCurvePairValue.hxx create mode 100644 src/StepKinematics/StepKinematics_SlidingSurfacePair.cxx create mode 100644 src/StepKinematics/StepKinematics_SlidingSurfacePair.hxx create mode 100644 src/StepKinematics/StepKinematics_SlidingSurfacePairValue.cxx create mode 100644 src/StepKinematics/StepKinematics_SlidingSurfacePairValue.hxx create mode 100644 src/StepKinematics/StepKinematics_SpatialRotation.cxx create mode 100644 src/StepKinematics/StepKinematics_SpatialRotation.hxx create mode 100644 src/StepKinematics/StepKinematics_SphericalPair.cxx create mode 100644 src/StepKinematics/StepKinematics_SphericalPair.hxx create mode 100644 src/StepKinematics/StepKinematics_SphericalPairSelect.cxx create mode 100644 src/StepKinematics/StepKinematics_SphericalPairSelect.hxx create mode 100644 src/StepKinematics/StepKinematics_SphericalPairValue.cxx create mode 100644 src/StepKinematics/StepKinematics_SphericalPairValue.hxx create mode 100644 src/StepKinematics/StepKinematics_SphericalPairWithPin.cxx create mode 100644 src/StepKinematics/StepKinematics_SphericalPairWithPin.hxx create mode 100644 src/StepKinematics/StepKinematics_SphericalPairWithPinAndRange.cxx create mode 100644 src/StepKinematics/StepKinematics_SphericalPairWithPinAndRange.hxx create mode 100644 src/StepKinematics/StepKinematics_SphericalPairWithRange.cxx create mode 100644 src/StepKinematics/StepKinematics_SphericalPairWithRange.hxx create mode 100644 src/StepKinematics/StepKinematics_SurfacePair.cxx create mode 100644 src/StepKinematics/StepKinematics_SurfacePair.hxx create mode 100644 src/StepKinematics/StepKinematics_SurfacePairWithRange.cxx create mode 100644 src/StepKinematics/StepKinematics_SurfacePairWithRange.hxx create mode 100644 src/StepKinematics/StepKinematics_UnconstrainedPair.cxx create mode 100644 src/StepKinematics/StepKinematics_UnconstrainedPair.hxx create mode 100644 src/StepKinematics/StepKinematics_UnconstrainedPairValue.cxx create mode 100644 src/StepKinematics/StepKinematics_UnconstrainedPairValue.hxx create mode 100644 src/StepKinematics/StepKinematics_UniversalPair.cxx create mode 100644 src/StepKinematics/StepKinematics_UniversalPair.hxx create mode 100644 src/StepKinematics/StepKinematics_UniversalPairValue.cxx create mode 100644 src/StepKinematics/StepKinematics_UniversalPairValue.hxx create mode 100644 src/StepKinematics/StepKinematics_UniversalPairWithRange.cxx create mode 100644 src/StepKinematics/StepKinematics_UniversalPairWithRange.hxx create mode 100644 src/StepRepr/StepRepr_RepresentationContextReference.cxx create mode 100644 src/StepRepr/StepRepr_RepresentationContextReference.hxx create mode 100644 src/StepRepr/StepRepr_RepresentationOrRepresentationReference.cxx create mode 100644 src/StepRepr/StepRepr_RepresentationOrRepresentationReference.hxx create mode 100644 src/StepRepr/StepRepr_RepresentationReference.cxx create mode 100644 src/StepRepr/StepRepr_RepresentationReference.hxx diff --git a/adm/UDLIST b/adm/UDLIST index f5d2176244..4cc783fdd6 100644 --- a/adm/UDLIST +++ b/adm/UDLIST @@ -328,6 +328,7 @@ n RWStepDimTol n RWStepElement n RWStepFEA n RWStepGeom +n RWStepKinematics n RWStepRepr n RWStepShape n RWStepVisual @@ -347,6 +348,7 @@ n StepDimTol n StepElement n StepFEA n StepGeom +n StepKinematics n StepRepr n StepSelect n StepShape diff --git a/src/RWStepAP214/RWStepAP214_GeneralModule.cxx b/src/RWStepAP214/RWStepAP214_GeneralModule.cxx index 55ea79fee6..cea13b4ee6 100644 --- a/src/RWStepAP214/RWStepAP214_GeneralModule.cxx +++ b/src/RWStepAP214/RWStepAP214_GeneralModule.cxx @@ -348,6 +348,7 @@ #include #include #include +#include #include #include #include @@ -381,6 +382,8 @@ #include #include #include +#include +#include #include #include #include @@ -872,6 +875,7 @@ #include #include #include +#include #include #include #include @@ -923,8 +927,10 @@ #include #include #include +#include #include #include +#include #include #include #include @@ -1366,6 +1372,158 @@ IMPLEMENT_STANDARD_RTTIEXT(RWStepAP214_GeneralModule,StepData_GeneralModule) #include #include +// Added for kinematics implementation +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + + static Standard_Integer catsh,catdr,catstr,catdsc,cataux; @@ -5193,6 +5351,546 @@ void RWStepAP214_GeneralModule::FillSharedCase(const Standard_Integer CN, tool.Share(anent, iter); } break; + case 724: + { + DeclareAndCast(StepRepr_RepresentationContextReference, anent, ent); + RWStepRepr_RWRepresentationContextReference tool; + tool.Share(anent, iter); + } + break; + case 725: + { + DeclareAndCast(StepRepr_RepresentationReference, anent, ent); + RWStepRepr_RWRepresentationReference tool; + tool.Share(anent, iter); + } + break; + case 726: + { + DeclareAndCast(StepGeom_SuParameters, anent, ent); + RWStepGeom_RWSuParameters tool; + tool.Share(anent, iter); + } + break; + case 727: + { + DeclareAndCast(StepKinematics_RotationAboutDirection, anent, ent); + RWStepKinematics_RWRotationAboutDirection tool; + tool.Share(anent, iter); + } + break; + case 728: + { + DeclareAndCast(StepKinematics_KinematicJoint, anent, ent); + RWStepKinematics_RWKinematicJoint tool; + tool.Share(anent, iter); + } + break; + case 729: + { + DeclareAndCast(StepKinematics_ActuatedKinematicPair, anent, ent); + RWStepKinematics_RWActuatedKinematicPair tool; + tool.Share(anent, iter); + } + break; + case 730: + { + DeclareAndCast(StepKinematics_ContextDependentKinematicLinkRepresentation, anent, ent); + RWStepKinematics_RWContextDependentKinematicLinkRepresentation tool; + tool.Share(anent, iter); + } + break; + case 731: + { + DeclareAndCast(StepKinematics_CylindricalPair, anent, ent); + RWStepKinematics_RWCylindricalPair tool; + tool.Share(anent, iter); + } + break; + case 732: + { + DeclareAndCast(StepKinematics_CylindricalPairValue, anent, ent); + RWStepKinematics_RWCylindricalPairValue tool; + tool.Share(anent, iter); + } + break; + case 733: + { + DeclareAndCast(StepKinematics_CylindricalPairWithRange, anent, ent); + RWStepKinematics_RWCylindricalPairWithRange tool; + tool.Share(anent, iter); + } + break; + case 734: + { + DeclareAndCast(StepKinematics_FullyConstrainedPair, anent, ent); + RWStepKinematics_RWFullyConstrainedPair tool; + tool.Share(anent, iter); + } + break; + case 735: + { + DeclareAndCast(StepKinematics_GearPair, anent, ent); + RWStepKinematics_RWGearPair tool; + tool.Share(anent, iter); + } + break; + case 736: + { + DeclareAndCast(StepKinematics_GearPairValue, anent, ent); + RWStepKinematics_RWGearPairValue tool; + tool.Share(anent, iter); + } + break; + case 737: + { + DeclareAndCast(StepKinematics_GearPairWithRange, anent, ent); + RWStepKinematics_RWGearPairWithRange tool; + tool.Share(anent, iter); + } + break; + case 738: + { + DeclareAndCast(StepKinematics_HomokineticPair, anent, ent); + RWStepKinematics_RWHomokineticPair tool; + tool.Share(anent, iter); + } + break; + case 739: + { + DeclareAndCast(StepKinematics_KinematicLink, anent, ent); + RWStepKinematics_RWKinematicLink tool; + tool.Share(anent, iter); + } + break; + case 740: + { + DeclareAndCast(StepKinematics_KinematicLinkRepresentationAssociation, anent, ent); + RWStepKinematics_RWKinematicLinkRepresentationAssociation tool; + tool.Share(anent, iter); + } + break; + case 741: + { + DeclareAndCast(StepKinematics_KinematicPropertyMechanismRepresentation, anent, ent); + RWStepKinematics_RWKinematicPropertyMechanismRepresentation tool; + tool.Share(anent, iter); + } + break; + case 742: + { + DeclareAndCast(StepKinematics_KinematicTopologyStructure, anent, ent); + RWStepKinematics_RWKinematicTopologyStructure tool; + tool.Share(anent, iter); + } + break; + case 743: + { + DeclareAndCast(StepKinematics_LowOrderKinematicPair, anent, ent); + RWStepKinematics_RWLowOrderKinematicPair tool; + tool.Share(anent, iter); + } + break; + case 744: + { + DeclareAndCast(StepKinematics_LowOrderKinematicPairValue, anent, ent); + RWStepKinematics_RWLowOrderKinematicPairValue tool; + tool.Share(anent, iter); + } + break; + case 745: + { + DeclareAndCast(StepKinematics_LowOrderKinematicPairWithRange, anent, ent); + RWStepKinematics_RWLowOrderKinematicPairWithRange tool; + tool.Share(anent, iter); + } + break; + case 746: + { + DeclareAndCast(StepKinematics_MechanismRepresentation, anent, ent); + RWStepKinematics_RWMechanismRepresentation tool; + tool.Share(anent, iter); + } + break; + case 747: + { + DeclareAndCast(StepKinematics_OrientedJoint, anent, ent); + RWStepKinematics_RWOrientedJoint tool; + tool.Share(anent, iter); + } + break; + case 748: + { + DeclareAndCast(StepKinematics_PlanarCurvePair, anent, ent); + RWStepKinematics_RWPlanarCurvePair tool; + tool.Share(anent, iter); + } + break; + case 749: + { + DeclareAndCast(StepKinematics_PlanarCurvePairRange, anent, ent); + RWStepKinematics_RWPlanarCurvePairRange tool; + tool.Share(anent, iter); + } + break; + case 750: + { + DeclareAndCast(StepKinematics_PlanarPair, anent, ent); + RWStepKinematics_RWPlanarPair tool; + tool.Share(anent, iter); + } + break; + case 751: + { + DeclareAndCast(StepKinematics_PlanarPairValue, anent, ent); + RWStepKinematics_RWPlanarPairValue tool; + tool.Share(anent, iter); + } + break; + case 752: + { + DeclareAndCast(StepKinematics_PlanarPairWithRange, anent, ent); + RWStepKinematics_RWPlanarPairWithRange tool; + tool.Share(anent, iter); + } + break; + case 753: + { + DeclareAndCast(StepKinematics_PointOnPlanarCurvePair, anent, ent); + RWStepKinematics_RWPointOnPlanarCurvePair tool; + tool.Share(anent, iter); + } + break; + case 754: + { + DeclareAndCast(StepKinematics_PointOnPlanarCurvePairValue, anent, ent); + RWStepKinematics_RWPointOnPlanarCurvePairValue tool; + tool.Share(anent, iter); + } + break; + case 755: + { + DeclareAndCast(StepKinematics_PointOnPlanarCurvePairWithRange, anent, ent); + RWStepKinematics_RWPointOnPlanarCurvePairWithRange tool; + tool.Share(anent, iter); + } + break; + case 756: + { + DeclareAndCast(StepKinematics_PointOnSurfacePair, anent, ent); + RWStepKinematics_RWPointOnSurfacePair tool; + tool.Share(anent, iter); + } + break; + case 757: + { + DeclareAndCast(StepKinematics_PointOnSurfacePairValue, anent, ent); + RWStepKinematics_RWPointOnSurfacePairValue tool; + tool.Share(anent, iter); + } + break; + case 758: + { + DeclareAndCast(StepKinematics_PointOnSurfacePairWithRange, anent, ent); + RWStepKinematics_RWPointOnSurfacePairWithRange tool; + tool.Share(anent, iter); + } + break; + case 759: + { + DeclareAndCast(StepKinematics_PrismaticPair, anent, ent); + RWStepKinematics_RWPrismaticPair tool; + tool.Share(anent, iter); + } + break; + case 760: + { + DeclareAndCast(StepKinematics_PrismaticPairValue, anent, ent); + RWStepKinematics_RWPrismaticPairValue tool; + tool.Share(anent, iter); + } + break; + case 761: + { + DeclareAndCast(StepKinematics_PrismaticPairWithRange, anent, ent); + RWStepKinematics_RWPrismaticPairWithRange tool; + tool.Share(anent, iter); + } + break; + case 762: + { + DeclareAndCast(StepKinematics_ProductDefinitionKinematics, anent, ent); + RWStepKinematics_RWProductDefinitionKinematics tool; + tool.Share(anent, iter); + } + break; + case 763: + { + DeclareAndCast(StepKinematics_ProductDefinitionRelationshipKinematics, anent, ent); + RWStepKinematics_RWProductDefinitionRelationshipKinematics tool; + tool.Share(anent, iter); + } + break; + case 764: + { + DeclareAndCast(StepKinematics_RackAndPinionPair, anent, ent); + RWStepKinematics_RWRackAndPinionPair tool; + tool.Share(anent, iter); + } + break; + case 765: + { + DeclareAndCast(StepKinematics_RackAndPinionPairValue, anent, ent); + RWStepKinematics_RWRackAndPinionPairValue tool; + tool.Share(anent, iter); + } + break; + case 766: + { + DeclareAndCast(StepKinematics_RackAndPinionPairWithRange, anent, ent); + RWStepKinematics_RWRackAndPinionPairWithRange tool; + tool.Share(anent, iter); + } + break; + case 767: + { + DeclareAndCast(StepKinematics_RevolutePair, anent, ent); + RWStepKinematics_RWRevolutePair tool; + tool.Share(anent, iter); + } + break; + case 768: + { + DeclareAndCast(StepKinematics_RevolutePairValue, anent, ent); + RWStepKinematics_RWRevolutePairValue tool; + tool.Share(anent, iter); + } + break; + case 769: + { + DeclareAndCast(StepKinematics_RevolutePairWithRange, anent, ent); + RWStepKinematics_RWRevolutePairWithRange tool; + tool.Share(anent, iter); + } + break; + case 770: + { + DeclareAndCast(StepKinematics_RollingCurvePair, anent, ent); + RWStepKinematics_RWRollingCurvePair tool; + tool.Share(anent, iter); + } + break; + case 771: + { + DeclareAndCast(StepKinematics_RollingCurvePairValue, anent, ent); + RWStepKinematics_RWRollingCurvePairValue tool; + tool.Share(anent, iter); + } + break; + case 772: + { + DeclareAndCast(StepKinematics_RollingSurfacePair, anent, ent); + RWStepKinematics_RWRollingSurfacePair tool; + tool.Share(anent, iter); + } + break; + case 773: + { + DeclareAndCast(StepKinematics_RollingSurfacePairValue, anent, ent); + RWStepKinematics_RWRollingSurfacePairValue tool; + tool.Share(anent, iter); + } + break; + case 774: + { + DeclareAndCast(StepKinematics_ScrewPair, anent, ent); + RWStepKinematics_RWScrewPair tool; + tool.Share(anent, iter); + } + break; + case 775: + { + DeclareAndCast(StepKinematics_ScrewPairValue, anent, ent); + RWStepKinematics_RWScrewPairValue tool; + tool.Share(anent, iter); + } + break; + case 776: + { + DeclareAndCast(StepKinematics_ScrewPairWithRange, anent, ent); + RWStepKinematics_RWScrewPairWithRange tool; + tool.Share(anent, iter); + } + break; + case 777: + { + DeclareAndCast(StepKinematics_SlidingCurvePair, anent, ent); + RWStepKinematics_RWSlidingCurvePair tool; + tool.Share(anent, iter); + } + break; + case 778: + { + DeclareAndCast(StepKinematics_SlidingCurvePairValue, anent, ent); + RWStepKinematics_RWSlidingCurvePairValue tool; + tool.Share(anent, iter); + } + break; + case 779: + { + DeclareAndCast(StepKinematics_SlidingSurfacePair, anent, ent); + RWStepKinematics_RWSlidingSurfacePair tool; + tool.Share(anent, iter); + } + break; + case 780: + { + DeclareAndCast(StepKinematics_SlidingSurfacePairValue, anent, ent); + RWStepKinematics_RWSlidingSurfacePairValue tool; + tool.Share(anent, iter); + } + break; + case 781: + { + DeclareAndCast(StepKinematics_SphericalPair, anent, ent); + RWStepKinematics_RWSphericalPair tool; + tool.Share(anent, iter); + } + break; + case 782: + { + DeclareAndCast(StepKinematics_SphericalPairValue, anent, ent); + RWStepKinematics_RWSphericalPairValue tool; + tool.Share(anent, iter); + } + break; + case 783: + { + DeclareAndCast(StepKinematics_SphericalPairWithPin, anent, ent); + RWStepKinematics_RWSphericalPairWithPin tool; + tool.Share(anent, iter); + } + break; + case 784: + { + DeclareAndCast(StepKinematics_SphericalPairWithPinAndRange, anent, ent); + RWStepKinematics_RWSphericalPairWithPinAndRange tool; + tool.Share(anent, iter); + } + break; + case 785: + { + DeclareAndCast(StepKinematics_SphericalPairWithRange, anent, ent); + RWStepKinematics_RWSphericalPairWithRange tool; + tool.Share(anent, iter); + } + break; + case 786: + { + DeclareAndCast(StepKinematics_SurfacePairWithRange, anent, ent); + RWStepKinematics_RWSurfacePairWithRange tool; + tool.Share(anent, iter); + } + break; + case 787: + { + DeclareAndCast(StepKinematics_UnconstrainedPair, anent, ent); + RWStepKinematics_RWUnconstrainedPair tool; + tool.Share(anent, iter); + } + break; + case 788: + { + DeclareAndCast(StepKinematics_UnconstrainedPairValue, anent, ent); + RWStepKinematics_RWUnconstrainedPairValue tool; + tool.Share(anent, iter); + } + break; + case 789: + { + DeclareAndCast(StepKinematics_UniversalPair, anent, ent); + RWStepKinematics_RWUniversalPair tool; + tool.Share(anent, iter); + } + break; + case 790: + { + DeclareAndCast(StepKinematics_UniversalPairValue, anent, ent); + RWStepKinematics_RWUniversalPairValue tool; + tool.Share(anent, iter); + } + break; + case 791: + { + DeclareAndCast(StepKinematics_UniversalPairWithRange, anent, ent); + RWStepKinematics_RWUniversalPairWithRange tool; + tool.Share(anent, iter); + } + break; + case 792: + { + DeclareAndCast(StepKinematics_PairRepresentationRelationship, anent, ent); + RWStepKinematics_RWPairRepresentationRelationship tool; + tool.Share(anent, iter); + } + break; + case 793: + { + DeclareAndCast(StepKinematics_RigidLinkRepresentation, anent, ent); + RWStepKinematics_RWRigidLinkRepresentation tool; + tool.Share(anent, iter); + } + break; + case 794: + { + DeclareAndCast(StepKinematics_KinematicTopologyDirectedStructure, anent, ent); + RWStepKinematics_RWKinematicTopologyDirectedStructure tool; + tool.Share(anent, iter); + } + break; + case 795: + { + DeclareAndCast(StepKinematics_KinematicTopologyNetworkStructure, anent, ent); + RWStepKinematics_RWKinematicTopologyNetworkStructure tool; + tool.Share(anent, iter); + } + break; + case 796: + { + DeclareAndCast(StepKinematics_LinearFlexibleAndPinionPair, anent, ent); + RWStepKinematics_RWLinearFlexibleAndPinionPair tool; + tool.Share(anent, iter); + } + break; + case 797: + { + DeclareAndCast(StepKinematics_LinearFlexibleAndPlanarCurvePair, anent, ent); + RWStepKinematics_RWLinearFlexibleAndPlanarCurvePair tool; + tool.Share(anent, iter); + } + break; + case 798: + { + DeclareAndCast(StepKinematics_LinearFlexibleLinkRepresentation, anent, ent); + RWStepKinematics_RWLinearFlexibleLinkRepresentation tool; + tool.Share(anent, iter); + } + break; + case 800: + { + DeclareAndCast(StepKinematics_ActuatedKinPairAndOrderKinPair, anent, ent); + RWStepKinematics_RWActuatedKinPairAndOrderKinPair tool; + tool.Share(anent, iter); + } + break; + case 801: + { + DeclareAndCast(StepKinematics_MechanismStateRepresentation, anent, ent); + RWStepKinematics_RWMechanismStateRepresentation tool; + tool.Share(anent, iter); + } + break; + default : break; } } @@ -7217,6 +7915,238 @@ Standard_Boolean RWStepAP214_GeneralModule::NewVoid case 723: ent = new StepVisual_SurfaceStyleRenderingWithProperties; break; + case 724: + ent = new StepRepr_RepresentationContextReference; + break; + case 725: + ent = new StepRepr_RepresentationReference; + break; + case 726: + ent = new StepGeom_SuParameters; + break; + case 727: + ent = new StepKinematics_RotationAboutDirection; + break; + case 728: + ent = new StepKinematics_KinematicJoint; + break; + case 729: + ent = new StepKinematics_ActuatedKinematicPair; + break; + case 730: + ent = new StepKinematics_ContextDependentKinematicLinkRepresentation; + break; + case 731: + ent = new StepKinematics_CylindricalPair; + break; + case 732: + ent = new StepKinematics_CylindricalPairValue; + break; + case 733: + ent = new StepKinematics_CylindricalPairWithRange; + break; + case 734: + ent = new StepKinematics_FullyConstrainedPair; + break; + case 735: + ent = new StepKinematics_GearPair; + break; + case 736: + ent = new StepKinematics_GearPairValue; + break; + case 737: + ent = new StepKinematics_GearPairWithRange; + break; + case 738: + ent = new StepKinematics_HomokineticPair; + break; + case 739: + ent = new StepKinematics_KinematicLink; + break; + case 740: + ent = new StepKinematics_KinematicLinkRepresentationAssociation; + break; + case 741: + ent = new StepKinematics_KinematicPropertyMechanismRepresentation; + break; + case 742: + ent = new StepKinematics_KinematicTopologyStructure; + break; + case 743: + ent = new StepKinematics_LowOrderKinematicPair; + break; + case 744: + ent = new StepKinematics_LowOrderKinematicPairValue; + break; + case 745: + ent = new StepKinematics_LowOrderKinematicPairWithRange; + break; + case 746: + ent = new StepKinematics_MechanismRepresentation; + break; + case 747: + ent = new StepKinematics_OrientedJoint; + break; + case 748: + ent = new StepKinematics_PlanarCurvePair; + break; + case 749: + ent = new StepKinematics_PlanarCurvePairRange; + break; + case 750: + ent = new StepKinematics_PlanarPair; + break; + case 751: + ent = new StepKinematics_PlanarPairValue; + break; + case 752: + ent = new StepKinematics_PlanarPairWithRange; + break; + case 753: + ent = new StepKinematics_PointOnPlanarCurvePair; + break; + case 754: + ent = new StepKinematics_PointOnPlanarCurvePairValue; + break; + case 755: + ent = new StepKinematics_PointOnPlanarCurvePairWithRange; + break; + case 756: + ent = new StepKinematics_PointOnSurfacePair; + break; + case 757: + ent = new StepKinematics_PointOnSurfacePairValue; + break; + case 758: + ent = new StepKinematics_PointOnSurfacePairWithRange; + break; + case 759: + ent = new StepKinematics_PrismaticPair; + break; + case 760: + ent = new StepKinematics_PrismaticPairValue; + break; + case 761: + ent = new StepKinematics_PrismaticPairWithRange; + break; + case 762: + ent = new StepKinematics_ProductDefinitionKinematics; + break; + case 763: + ent = new StepKinematics_ProductDefinitionRelationshipKinematics; + break; + case 764: + ent = new StepKinematics_RackAndPinionPair; + break; + case 765: + ent = new StepKinematics_RackAndPinionPairValue; + break; + case 766: + ent = new StepKinematics_RackAndPinionPairWithRange; + break; + case 767: + ent = new StepKinematics_RevolutePair; + break; + case 768: + ent = new StepKinematics_RevolutePairValue; + break; + case 769: + ent = new StepKinematics_RevolutePairWithRange; + break; + case 770: + ent = new StepKinematics_RollingCurvePair; + break; + case 771: + ent = new StepKinematics_RollingCurvePairValue; + break; + case 772: + ent = new StepKinematics_RollingSurfacePair; + break; + case 773: + ent = new StepKinematics_RollingSurfacePairValue; + break; + case 774: + ent = new StepKinematics_ScrewPair; + break; + case 775: + ent = new StepKinematics_ScrewPairValue; + break; + case 776: + ent = new StepKinematics_ScrewPairWithRange; + break; + case 777: + ent = new StepKinematics_SlidingCurvePair; + break; + case 778: + ent = new StepKinematics_SlidingCurvePairValue; + break; + case 779: + ent = new StepKinematics_SlidingSurfacePair; + break; + case 780: + ent = new StepKinematics_SlidingSurfacePairValue; + break; + case 781: + ent = new StepKinematics_SphericalPair; + break; + case 782: + ent = new StepKinematics_SphericalPairValue; + break; + case 783: + ent = new StepKinematics_SphericalPairWithPin; + break; + case 784: + ent = new StepKinematics_SphericalPairWithPinAndRange; + break; + case 785: + ent = new StepKinematics_SphericalPairWithRange; + break; + case 786: + ent = new StepKinematics_SurfacePairWithRange; + break; + case 787: + ent = new StepKinematics_UnconstrainedPair; + break; + case 788: + ent = new StepKinematics_UnconstrainedPairValue; + break; + case 789: + ent = new StepKinematics_UniversalPair; + break; + case 790: + ent = new StepKinematics_UniversalPairValue; + break; + case 791: + ent = new StepKinematics_UniversalPairWithRange; + break; + case 792: + ent = new StepKinematics_PairRepresentationRelationship; + break; + case 793: + ent = new StepKinematics_RigidLinkRepresentation; + break; + case 794: + ent = new StepKinematics_KinematicTopologyDirectedStructure; + break; + case 795: + ent = new StepKinematics_KinematicTopologyNetworkStructure; + break; + case 796: + ent = new StepKinematics_LinearFlexibleAndPinionPair; + break; + case 797: + ent = new StepKinematics_LinearFlexibleAndPlanarCurvePair; + break; + case 798: + ent = new StepKinematics_LinearFlexibleLinkRepresentation; + break; + case 800: + ent = new StepKinematics_ActuatedKinPairAndOrderKinPair; + break; + case 801: + ent = new StepKinematics_MechanismStateRepresentation; + break; + default: return Standard_False; } @@ -7819,7 +8749,83 @@ Standard_Integer RWStepAP214_GeneralModule::CategoryNumber case 721: case 722: case 723: return catdr; - + case 724: return cataux; + case 725: return cataux; + case 726: return cataux; + case 727: return cataux; + case 728: return cataux; + case 729: return cataux; + case 730: return cataux; + case 731: return cataux; + case 732: return cataux; + case 733: return cataux; + case 734: return cataux; + case 735: return cataux; + case 736: return cataux; + case 737: return cataux; + case 738: return cataux; + case 739: return cataux; + case 740: return cataux; + case 741: return cataux; + case 742: return cataux; + case 743: return cataux; + case 744: return cataux; + case 745: return cataux; + case 746: return cataux; + case 747: return cataux; + case 748: return cataux; + case 749: return cataux; + case 750: return cataux; + case 751: return cataux; + case 752: return cataux; + case 753: return cataux; + case 754: return cataux; + case 755: return cataux; + case 756: return cataux; + case 757: return cataux; + case 758: return cataux; + case 759: return cataux; + case 760: return cataux; + case 761: return cataux; + case 762: return cataux; + case 763: return cataux; + case 764: return cataux; + case 765: return cataux; + case 766: return cataux; + case 767: return cataux; + case 768: return cataux; + case 769: return cataux; + case 770: return cataux; + case 771: return cataux; + case 772: return cataux; + case 773: return cataux; + case 774: return cataux; + case 775: return cataux; + case 776: return cataux; + case 777: return cataux; + case 778: return cataux; + case 779: return cataux; + case 780: return cataux; + case 781: return cataux; + case 782: return cataux; + case 783: return cataux; + case 784: return cataux; + case 785: return cataux; + case 786: return cataux; + case 787: return cataux; + case 788: return cataux; + case 789: return cataux; + case 790: return cataux; + case 791: return cataux; + case 792: return cataux; + case 793: return cataux; + case 794: return cataux; + case 795: return cataux; + case 796: return cataux; + case 797: return cataux; + case 798: return cataux; + case 800: return catsh; + case 801: return cataux; default : break; } return 0; diff --git a/src/RWStepAP214/RWStepAP214_ReadWriteModule.cxx b/src/RWStepAP214/RWStepAP214_ReadWriteModule.cxx index 2e7bcb36d8..fbc05b8024 100644 --- a/src/RWStepAP214/RWStepAP214_ReadWriteModule.cxx +++ b/src/RWStepAP214/RWStepAP214_ReadWriteModule.cxx @@ -1414,6 +1414,164 @@ IMPLEMENT_STANDARD_RTTIEXT(RWStepAP214_ReadWriteModule,StepData_ReadWriteModule) #include #include +// Added for kinematics implementation +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + // -- General Declarations (Recognize, StepType) --- static TCollection_AsciiString PasReco("?"); @@ -2060,6 +2218,84 @@ static TCollection_AsciiString Reco_SurfaceStyleReflectanceAmbient("SURFACE_STYL static TCollection_AsciiString Reco_SurfaceStyleRendering("SURFACE_STYLE_RENDERING"); static TCollection_AsciiString Reco_SurfaceStyleRenderingWithProperties("SURFACE_STYLE_RENDERING_WITH_PROPERTIES"); +static TCollection_AsciiString Reco_RepresentationContextReference("REPRESENTATION_CONTEXT_REFERENCE"); +static TCollection_AsciiString Reco_RepresentationReference("REPRESENTATION_REFERENCE"); +static TCollection_AsciiString Reco_SuParameters("SU_PARAMETERS"); +static TCollection_AsciiString Reco_RotationAboutDirection("ROTATION_ABOUT_DIRECTION"); +static TCollection_AsciiString Reco_KinematicJoint("KINEMATIC_JOINT"); +static TCollection_AsciiString Reco_ActuatedKinematicPair("ACTUATED_KINEMATIC_PAIR"); +static TCollection_AsciiString Reco_ContextDependentKinematicLinkRepresentation("CONTEXT_DEPENDENT_KINEMATIC_LINK_REPRESENTATION"); +static TCollection_AsciiString Reco_CylindricalPair("CYLINDRICAL_PAIR"); +static TCollection_AsciiString Reco_CylindricalPairValue("CYLINDRICAL_PAIR_VALUE"); +static TCollection_AsciiString Reco_CylindricalPairWithRange("CYLINDRICAL_PAIR_WITH_RANGE"); +static TCollection_AsciiString Reco_FullyConstrainedPair("FULLY_CONSTRAINED_PAIR"); +static TCollection_AsciiString Reco_GearPair("GEAR_PAIR"); +static TCollection_AsciiString Reco_GearPairValue("GEAR_PAIR_VALUE"); +static TCollection_AsciiString Reco_GearPairWithRange("GEAR_PAIR_WITH_RANGE"); +static TCollection_AsciiString Reco_HomokineticPair("HOMOKINETIC_PAIR"); +static TCollection_AsciiString Reco_KinematicLink("KINEMATIC_LINK"); +static TCollection_AsciiString Reco_KinematicLinkRepresentationAssociation("KINEMATIC_LINK_REPRESENTATION_ASSOCIATION"); +static TCollection_AsciiString Reco_KinematicPropertyMechanismRepresentation("KINEMATIC_PROPERTY_MECHANISM_REPRESENTATION"); +static TCollection_AsciiString Reco_KinematicTopologyDirectedStructure("KINEMATIC_TOPOLOGY_DIRECTED_STRUCTURE"); +static TCollection_AsciiString Reco_KinematicTopologyNetworkStructure("KINEMATIC_TOPOLOGY_NETWORK_STRUCTURE"); +static TCollection_AsciiString Reco_KinematicTopologyStructure("KINEMATIC_TOPOLOGY_STRUCTURE"); +static TCollection_AsciiString Reco_LinearFlexibleAndPinionPair("LINEAR_FLEXIBLE_AND_PINION_PAIR"); +static TCollection_AsciiString Reco_LinearFlexibleAndPlanarCurvePair("LINEAR_FLEXIBLE_AND_PLANAR_CURVE_PAIR"); +static TCollection_AsciiString Reco_LinearFlexibleLinkRepresentation("LINEAR_FLEXIBLE_LINK_REPRESENTATION"); +static TCollection_AsciiString Reco_LowOrderKinematicPair("LOW_ORDER_KINEMATIC_PAIR"); +static TCollection_AsciiString Reco_LowOrderKinematicPairValue("LOW_ORDER_KINEMATIC_PAIR_VALUE"); +static TCollection_AsciiString Reco_LowOrderKinematicPairWithRange("LOW_ORDER_KINEMATIC_PAIR_WITH_RANGE"); +static TCollection_AsciiString Reco_MechanismRepresentation("MECHANISM_REPRESENTATION"); +static TCollection_AsciiString Reco_OrientedJoint("ORIENTED_JOINT"); +static TCollection_AsciiString Reco_PairRepresentationRelationship("PAIR_REPRESENTATION_RELATIONSHIP"); +static TCollection_AsciiString Reco_PlanarCurvePair("PLANAR_CURVE_PAIR"); +static TCollection_AsciiString Reco_PlanarCurvePairRange("PLANAR_CURVE_PAIR_RANGE"); +static TCollection_AsciiString Reco_PlanarPair("PLANAR_PAIR"); +static TCollection_AsciiString Reco_PlanarPairValue("PLANAR_PAIR_VALUE"); +static TCollection_AsciiString Reco_PlanarPairWithRange("PLANAR_PAIR_WITH_RANGE"); +static TCollection_AsciiString Reco_PointOnPlanarCurvePair("POINT_ON_PLANAR_CURVE_PAIR"); +static TCollection_AsciiString Reco_PointOnPlanarCurvePairValue("POINT_ON_PLANAR_CURVE_PAIR_VALUE"); +static TCollection_AsciiString Reco_PointOnPlanarCurvePairWithRange("POINT_ON_PLANAR_CURVE_PAIR_WITH_RANGE"); +static TCollection_AsciiString Reco_PointOnSurfacePair("POINT_ON_SURFACE_PAIR"); +static TCollection_AsciiString Reco_PointOnSurfacePairValue("POINT_ON_SURFACE_PAIR_VALUE"); +static TCollection_AsciiString Reco_PointOnSurfacePairWithRange("POINT_ON_SURFACE_PAIR_WITH_RANGE"); +static TCollection_AsciiString Reco_PrismaticPair("PRISMATIC_PAIR"); +static TCollection_AsciiString Reco_PrismaticPairValue("PRISMATIC_PAIR_VALUE"); +static TCollection_AsciiString Reco_PrismaticPairWithRange("PRISMATIC_PAIR_WITH_RANGE"); +static TCollection_AsciiString Reco_ProductDefinitionKinematics("PRODUCT_DEFINITION_KINEMATICS"); +static TCollection_AsciiString Reco_ProductDefinitionRelationshipKinematics("PRODUCT_DEFINITION_RELATIONSHIP_KINEMATICS"); +static TCollection_AsciiString Reco_RackAndPinionPair("RACK_AND_PINION_PAIR"); +static TCollection_AsciiString Reco_RackAndPinionPairValue("RACK_AND_PINION_PAIR_VALUE"); +static TCollection_AsciiString Reco_RackAndPinionPairWithRange("RACK_AND_PINION_PAIR_WITH_RANGE"); +static TCollection_AsciiString Reco_RevolutePair("REVOLUTE_PAIR"); +static TCollection_AsciiString Reco_RevolutePairValue("REVOLUTE_PAIR_VALUE"); +static TCollection_AsciiString Reco_RevolutePairWithRange("REVOLUTE_PAIR_WITH_RANGE"); +static TCollection_AsciiString Reco_RigidLinkRepresentation("RIGID_LINK_REPRESENTATION"); +static TCollection_AsciiString Reco_RollingCurvePair("ROLLING_CURVE_PAIR"); +static TCollection_AsciiString Reco_RollingCurvePairValue("ROLLING_CURVE_PAIR_VALUE"); +static TCollection_AsciiString Reco_RollingSurfacePair("ROLLING_SURFACE_PAIR"); +static TCollection_AsciiString Reco_RollingSurfacePairValue("ROLLING_SURFACE_PAIR_VALUE"); +static TCollection_AsciiString Reco_ScrewPair("SCREW_PAIR"); +static TCollection_AsciiString Reco_ScrewPairValue("SCREW_PAIR_VALUE"); +static TCollection_AsciiString Reco_ScrewPairWithRange("SCREW_PAIR_WITH_RANGE"); +static TCollection_AsciiString Reco_SlidingCurvePair("SLIDING_CURVE_PAIR"); +static TCollection_AsciiString Reco_SlidingCurvePairValue("SLIDING_CURVE_PAIR_VALUE"); +static TCollection_AsciiString Reco_SlidingSurfacePair("SLIDING_SURFACE_PAIR"); +static TCollection_AsciiString Reco_SlidingSurfacePairValue("SLIDING_SURFACE_PAIR_VALUE"); +static TCollection_AsciiString Reco_SphericalPair("SPHERICAL_PAIR"); +static TCollection_AsciiString Reco_SphericalPairValue("SPHERICAL_PAIR_VALUE"); +static TCollection_AsciiString Reco_SphericalPairWithPin("SPHERICAL_PAIR_WITH_PIN"); +static TCollection_AsciiString Reco_SphericalPairWithPinAndRange("SPHERICAL_PAIR_WITH_PIN_AND_RANGE"); +static TCollection_AsciiString Reco_SphericalPairWithRange("SPHERICAL_PAIR_WITH_RANGE"); +static TCollection_AsciiString Reco_SurfacePairWithRange("SURFACE_PAIR_WITH_RANGE"); +static TCollection_AsciiString Reco_UnconstrainedPair("UNCONSTRAINED_PAIR"); +static TCollection_AsciiString Reco_UnconstrainedPairValue("UNCONSTRAINED_PAIR_VALUE"); +static TCollection_AsciiString Reco_UniversalPair("UNIVERSAL_PAIR"); +static TCollection_AsciiString Reco_UniversalPairValue("UNIVERSAL_PAIR_VALUE"); +static TCollection_AsciiString Reco_UniversalPairWithRange("UNIVERSAL_PAIR_WITH_RANGE"); +static TCollection_AsciiString Reco_KinematicPair("KINEMATIC_PAIR"); +static TCollection_AsciiString Reco_MechanismStateRepresentation("MECHANISM_STATE_REPRESENTATION"); + // -- Definition of the libraries -- static NCollection_DataMap typenums; @@ -2722,6 +2958,85 @@ RWStepAP214_ReadWriteModule::RWStepAP214_ReadWriteModule () typenums.Bind (Reco_SurfaceStyleRendering, 722); typenums.Bind (Reco_SurfaceStyleRenderingWithProperties, 723); + typenums.Bind(Reco_RepresentationContextReference, 724); + typenums.Bind(Reco_RepresentationReference, 725); + typenums.Bind(Reco_SuParameters, 726); + typenums.Bind(Reco_RotationAboutDirection, 727); + typenums.Bind(Reco_KinematicJoint, 728); + typenums.Bind(Reco_ActuatedKinematicPair, 729); + typenums.Bind(Reco_ContextDependentKinematicLinkRepresentation, 730); + typenums.Bind(Reco_CylindricalPair, 731); + typenums.Bind(Reco_CylindricalPairValue, 732); + typenums.Bind(Reco_CylindricalPairWithRange, 733); + typenums.Bind(Reco_FullyConstrainedPair, 734); + typenums.Bind(Reco_GearPair, 735); + typenums.Bind(Reco_GearPairValue, 736); + typenums.Bind(Reco_GearPairWithRange, 737); + typenums.Bind(Reco_HomokineticPair, 738); + typenums.Bind(Reco_KinematicLink, 739); + typenums.Bind(Reco_KinematicLinkRepresentationAssociation, 740); + typenums.Bind(Reco_KinematicPropertyMechanismRepresentation, 741); + typenums.Bind(Reco_KinematicTopologyStructure, 742); + typenums.Bind(Reco_LowOrderKinematicPair, 743); + typenums.Bind(Reco_LowOrderKinematicPairValue, 744); + typenums.Bind(Reco_LowOrderKinematicPairWithRange, 745); + typenums.Bind(Reco_MechanismRepresentation, 746); + typenums.Bind(Reco_OrientedJoint, 747); + typenums.Bind(Reco_PlanarCurvePair, 748); + typenums.Bind(Reco_PlanarCurvePairRange, 749); + typenums.Bind(Reco_PlanarPair, 750); + typenums.Bind(Reco_PlanarPairValue, 751); + typenums.Bind(Reco_PlanarPairWithRange, 752); + typenums.Bind(Reco_PointOnPlanarCurvePair, 753); + typenums.Bind(Reco_PointOnPlanarCurvePairValue, 754); + typenums.Bind(Reco_PointOnPlanarCurvePairWithRange, 755); + typenums.Bind(Reco_PointOnSurfacePair, 756); + typenums.Bind(Reco_PointOnSurfacePairValue, 757); + typenums.Bind(Reco_PointOnSurfacePairWithRange, 758); + typenums.Bind(Reco_PrismaticPair, 759); + typenums.Bind(Reco_PrismaticPairValue, 760); + typenums.Bind(Reco_PrismaticPairWithRange, 761); + typenums.Bind(Reco_ProductDefinitionKinematics, 762); + typenums.Bind(Reco_ProductDefinitionRelationshipKinematics, 763); + typenums.Bind(Reco_RackAndPinionPair, 764); + typenums.Bind(Reco_RackAndPinionPairValue, 765); + typenums.Bind(Reco_RackAndPinionPairWithRange, 766); + typenums.Bind(Reco_RevolutePair, 767); + typenums.Bind(Reco_RevolutePairValue, 768); + typenums.Bind(Reco_RevolutePairWithRange, 769); + typenums.Bind(Reco_RollingCurvePair, 770); + typenums.Bind(Reco_RollingCurvePairValue, 771); + typenums.Bind(Reco_RollingSurfacePair, 772); + typenums.Bind(Reco_RollingSurfacePairValue, 773); + typenums.Bind(Reco_ScrewPair, 774); + typenums.Bind(Reco_ScrewPairValue, 775); + typenums.Bind(Reco_ScrewPairWithRange, 776); + typenums.Bind(Reco_SlidingCurvePair, 777); + typenums.Bind(Reco_SlidingCurvePairValue, 778); + typenums.Bind(Reco_SlidingSurfacePair, 779); + typenums.Bind(Reco_SlidingSurfacePairValue, 780); + typenums.Bind(Reco_SphericalPair, 781); + typenums.Bind(Reco_SphericalPairValue, 782); + typenums.Bind(Reco_SphericalPairWithPin, 783); + typenums.Bind(Reco_SphericalPairWithPinAndRange, 784); + typenums.Bind(Reco_SphericalPairWithRange, 785); + typenums.Bind(Reco_SurfacePairWithRange, 786); + typenums.Bind(Reco_UnconstrainedPair, 787); + typenums.Bind(Reco_UnconstrainedPairValue, 788); + typenums.Bind(Reco_UniversalPair, 789); + typenums.Bind(Reco_UniversalPairValue, 790); + typenums.Bind(Reco_UniversalPairWithRange, 791); + typenums.Bind(Reco_PairRepresentationRelationship, 792); + typenums.Bind(Reco_RigidLinkRepresentation, 793); + typenums.Bind(Reco_KinematicTopologyDirectedStructure, 794); + typenums.Bind(Reco_KinematicTopologyNetworkStructure, 795); + typenums.Bind(Reco_LinearFlexibleAndPinionPair, 796); + typenums.Bind(Reco_LinearFlexibleAndPlanarCurvePair, 797); + typenums.Bind(Reco_LinearFlexibleLinkRepresentation, 798); + typenums.Bind(Reco_KinematicPair, 799); + typenums.Bind(Reco_MechanismStateRepresentation, 801); + + // SHORT NAMES // NB : la liste est celle de AP203 // Directement exploite pour les types simples @@ -3337,7 +3652,30 @@ Standard_Integer RWStepAP214_ReadWriteModule::CaseStep } } - if (NbComp == 7) { + if (NbComp == 8) + { + if ((types(1).IsEqual(StepType(729))) && + (types(2).IsEqual(StepType(144))) && + (types(3).IsEqual(StepType(354))) && + (types(4).IsEqual(StepType(799))) && + (types(5).IsEqual(StepType(743))) && + (((types(6).IsEqual(StepType(759))) && + (types(7).IsEqual(StepType(761)))) || + ((types(6).IsEqual(StepType(731))) && + (types(7).IsEqual(StepType(733)))) || + ((types(6).IsEqual(StepType(767))) && + (types(7).IsEqual(StepType(769)))) || + ((types(6).IsEqual(StepType(789))) && + (types(7).IsEqual(StepType(791)))) || + ((types(6).IsEqual(StepType(781))) && + (types(7).IsEqual(StepType(785)))) || + ((types(6).IsEqual(StepType(783))) && + (types(7).IsEqual(StepType(784))))) && + (types(8).IsEqual(StepType(247)))) { + return 800; + } + } + else if (NbComp == 7) { if ((types(1).IsEqual(StepType(48))) && (types(2).IsEqual(StepType(38))) && (types(3).IsEqual(StepType(84))) && @@ -4581,6 +4919,84 @@ const TCollection_AsciiString& RWStepAP214_ReadWriteModule::StepType case 722 : return Reco_SurfaceStyleRendering; case 723 : return Reco_SurfaceStyleRenderingWithProperties; + case 724: return Reco_RepresentationContextReference; + case 725: return Reco_RepresentationReference; + case 726: return Reco_SuParameters; + case 727: return Reco_RotationAboutDirection; + case 728: return Reco_KinematicJoint; + case 729: return Reco_ActuatedKinematicPair; + case 730: return Reco_ContextDependentKinematicLinkRepresentation; + case 731: return Reco_CylindricalPair; + case 732: return Reco_CylindricalPairValue; + case 733: return Reco_CylindricalPairWithRange; + case 734: return Reco_FullyConstrainedPair; + case 735: return Reco_GearPair; + case 736: return Reco_GearPairValue; + case 737: return Reco_GearPairWithRange; + case 738: return Reco_HomokineticPair; + case 739: return Reco_KinematicLink; + case 740: return Reco_KinematicLinkRepresentationAssociation; + case 741: return Reco_KinematicPropertyMechanismRepresentation; + case 742: return Reco_KinematicTopologyStructure; + case 743: return Reco_LowOrderKinematicPair; + case 744: return Reco_LowOrderKinematicPairValue; + case 745: return Reco_LowOrderKinematicPairWithRange; + case 746: return Reco_MechanismRepresentation; + case 747: return Reco_OrientedJoint; + case 748: return Reco_PlanarCurvePair; + case 749: return Reco_PlanarCurvePairRange; + case 750: return Reco_PlanarPair; + case 751: return Reco_PlanarPairValue; + case 752: return Reco_PlanarPairWithRange; + case 753: return Reco_PointOnPlanarCurvePair; + case 754: return Reco_PointOnPlanarCurvePairValue; + case 755: return Reco_PointOnPlanarCurvePairWithRange; + case 756: return Reco_PointOnSurfacePair; + case 757: return Reco_PointOnSurfacePairValue; + case 758: return Reco_PointOnSurfacePairWithRange; + case 759: return Reco_PrismaticPair; + case 760: return Reco_PrismaticPairValue; + case 761: return Reco_PrismaticPairWithRange; + case 762: return Reco_ProductDefinitionKinematics; + case 763: return Reco_ProductDefinitionRelationshipKinematics; + case 764: return Reco_RackAndPinionPair; + case 765: return Reco_RackAndPinionPairValue; + case 766: return Reco_RackAndPinionPairWithRange; + case 767: return Reco_RevolutePair; + case 768: return Reco_RevolutePairValue; + case 769: return Reco_RevolutePairWithRange; + case 770: return Reco_RollingCurvePair; + case 771: return Reco_RollingCurvePairValue; + case 772: return Reco_RollingSurfacePair; + case 773: return Reco_RollingSurfacePairValue; + case 774: return Reco_ScrewPair; + case 775: return Reco_ScrewPairValue; + case 776: return Reco_ScrewPairWithRange; + case 777: return Reco_SlidingCurvePair; + case 778: return Reco_SlidingCurvePairValue; + case 779: return Reco_SlidingSurfacePair; + case 780: return Reco_SlidingSurfacePairValue; + case 781: return Reco_SphericalPair; + case 782: return Reco_SphericalPairValue; + case 783: return Reco_SphericalPairWithPin; + case 784: return Reco_SphericalPairWithPinAndRange; + case 785: return Reco_SphericalPairWithRange; + case 786: return Reco_SurfacePairWithRange; + case 787: return Reco_UnconstrainedPair; + case 788: return Reco_UnconstrainedPairValue; + case 789: return Reco_UniversalPair; + case 790: return Reco_UniversalPairValue; + case 791: return Reco_UniversalPairWithRange; + case 792: return Reco_PairRepresentationRelationship; + case 793: return Reco_RigidLinkRepresentation; + case 794: return Reco_KinematicTopologyDirectedStructure; + case 795: return Reco_KinematicTopologyNetworkStructure; + case 796: return Reco_LinearFlexibleAndPinionPair; + case 797: return Reco_LinearFlexibleAndPlanarCurvePair; + case 798: return Reco_LinearFlexibleLinkRepresentation; + case 799: return Reco_KinematicPair; + case 801: return Reco_MechanismStateRepresentation; + default : return PasReco; } } @@ -4864,7 +5280,6 @@ Standard_Boolean RWStepAP214_ReadWriteModule::ComplexType(const Standard_Integer types.Append (StepType(625)); types.Append (StepType(677)); break; - default : return Standard_False; case 698: types.Append (StepType(671)); types.Append (StepType(470)); @@ -4902,6 +5317,17 @@ Standard_Boolean RWStepAP214_ReadWriteModule::ComplexType(const Standard_Integer types.Append(StepType(247)); types.Append(StepType(270)); break; + case 800: + types.Append(StepType(729)); + types.Append(StepType(144)); + types.Append(StepType(354)); + types.Append(StepType(799)); + types.Append(StepType(743)); + types.Append(StepType(757)); + types.Append(StepType(759)); + types.Append(StepType(247)); + break; + default: return Standard_False; } return Standard_True; } @@ -9508,251 +9934,790 @@ void RWStepAP214_ReadWriteModule::ReadStep(const Standard_Integer CN, tool.ReadStep(data, num, ach, anent); } break; - - default: - ach->AddFail("Type Mismatch when reading - Entity"); + case 724: + { + DeclareAndCast(StepRepr_RepresentationContextReference, anent, ent); + RWStepRepr_RWRepresentationContextReference tool; + tool.ReadStep(data, num, ach, anent); } - return; -} - - -//======================================================================= -//function : WriteStep -//purpose : Writing of a file -//======================================================================= - -void RWStepAP214_ReadWriteModule::WriteStep(const Standard_Integer CN, - StepData_StepWriter& SW, - const Handle(Standard_Transient)&ent) const -{ - if (CN == 0) return; - switch (CN) { - case 1 : - { - DeclareAndCast(StepBasic_Address, anent, ent); - RWStepBasic_RWAddress tool; -// if (anent.IsNull()) return; - tool.WriteStep (SW,anent); - } - - break; - case 2 : - { - DeclareAndCast(StepShape_AdvancedBrepShapeRepresentation, anent, ent); - RWStepShape_RWAdvancedBrepShapeRepresentation tool; -// if (anent.IsNull()) return; - tool.WriteStep (SW,anent); - } - - break; - case 3 : - { - DeclareAndCast(StepShape_AdvancedFace, anent, ent); - RWStepShape_RWAdvancedFace tool; -// if (anent.IsNull()) return; - tool.WriteStep (SW,anent); - } - - break; - case 4 : - { - DeclareAndCast(StepVisual_AnnotationCurveOccurrence, anent, ent); - RWStepVisual_RWAnnotationCurveOccurrence tool; - tool.WriteStep (SW,anent); - } - break; - case 5: + break; + case 725: { - DeclareAndCast(StepVisual_AnnotationFillArea, anent, ent); - RWStepVisual_RWAnnotationFillArea tool; - tool.WriteStep(SW, anent); + DeclareAndCast(StepRepr_RepresentationReference, anent, ent); + RWStepRepr_RWRepresentationReference tool; + tool.ReadStep(data, num, ach, anent); } - break; - case 6: + break; + case 726: { - DeclareAndCast(StepVisual_AnnotationFillAreaOccurrence, anent, ent); - RWStepVisual_RWAnnotationFillAreaOccurrence tool; - tool.WriteStep(SW, anent); + DeclareAndCast(StepGeom_SuParameters, anent, ent); + RWStepGeom_RWSuParameters tool; + tool.ReadStep(data, num, ach, anent); } - break; - case 7 : - { - DeclareAndCast(StepVisual_AnnotationOccurrence, anent, ent); - RWStepVisual_RWAnnotationOccurrence tool; - tool.WriteStep (SW,anent); - } - - break; - case 11 : - { - DeclareAndCast(StepRepr_MappedItem, anent, ent); - RWStepRepr_RWMappedItem tool; -// if (anent.IsNull()) return; - tool.WriteStep (SW,anent); - } - - break; - case 12 : - { - DeclareAndCast(StepVisual_StyledItem, anent, ent); - RWStepVisual_RWStyledItem tool; -// if (anent.IsNull()) return; - tool.WriteStep (SW,anent); - } - - break; - case 13 : - { - DeclareAndCast(StepBasic_ApplicationContext, anent, ent); - RWStepBasic_RWApplicationContext tool; -// if (anent.IsNull()) return; - tool.WriteStep (SW,anent); - } - - break; - case 14 : - { - DeclareAndCast(StepBasic_ApplicationContextElement, anent, ent); - RWStepBasic_RWApplicationContextElement tool; -// if (anent.IsNull()) return; - tool.WriteStep (SW,anent); - } - - break; - case 15 : - { - DeclareAndCast(StepBasic_ApplicationProtocolDefinition, anent, ent); - RWStepBasic_RWApplicationProtocolDefinition tool; -// if (anent.IsNull()) return; - tool.WriteStep (SW,anent); - } - - break; - case 16 : - { - DeclareAndCast(StepBasic_Approval, anent, ent); - RWStepBasic_RWApproval tool; -// if (anent.IsNull()) return; - tool.WriteStep (SW,anent); - } - - break; - case 18 : - { - DeclareAndCast(StepBasic_ApprovalPersonOrganization, anent, ent); - RWStepBasic_RWApprovalPersonOrganization tool; -// if (anent.IsNull()) return; - tool.WriteStep (SW,anent); - } - - break; - case 19 : - { - DeclareAndCast(StepBasic_ApprovalRelationship, anent, ent); - RWStepBasic_RWApprovalRelationship tool; -// if (anent.IsNull()) return; - tool.WriteStep (SW,anent); - } - - break; - case 20 : - { - DeclareAndCast(StepBasic_ApprovalRole, anent, ent); - RWStepBasic_RWApprovalRole tool; -// if (anent.IsNull()) return; - tool.WriteStep (SW,anent); - } - - break; - case 21 : - { - DeclareAndCast(StepBasic_ApprovalStatus, anent, ent); - RWStepBasic_RWApprovalStatus tool; -// if (anent.IsNull()) return; - tool.WriteStep (SW,anent); - } - - break; - case 22 : - { - DeclareAndCast(StepVisual_AreaInSet, anent, ent); - RWStepVisual_RWAreaInSet tool; -// if (anent.IsNull()) return; - tool.WriteStep (SW,anent); - } - - break; - case 23 : - { - DeclareAndCast(StepAP214_AutoDesignActualDateAndTimeAssignment, anent, ent); - RWStepAP214_RWAutoDesignActualDateAndTimeAssignment tool; -// if (anent.IsNull()) return; - tool.WriteStep (SW,anent); - } - - break; - case 24 : - { - DeclareAndCast(StepAP214_AutoDesignActualDateAssignment, anent, ent); - RWStepAP214_RWAutoDesignActualDateAssignment tool; -// if (anent.IsNull()) return; - tool.WriteStep (SW,anent); - } - - break; - case 25 : - { - DeclareAndCast(StepAP214_AutoDesignApprovalAssignment, anent, ent); - RWStepAP214_RWAutoDesignApprovalAssignment tool; -// if (anent.IsNull()) return; - tool.WriteStep (SW,anent); - } - - break; - case 26 : - { - DeclareAndCast(StepAP214_AutoDesignDateAndPersonAssignment, anent, ent); - RWStepAP214_RWAutoDesignDateAndPersonAssignment tool; -// if (anent.IsNull()) return; - tool.WriteStep (SW,anent); - } - - break; - case 27 : - { - DeclareAndCast(StepAP214_AutoDesignGroupAssignment, anent, ent); - RWStepAP214_RWAutoDesignGroupAssignment tool; -// if (anent.IsNull()) return; - tool.WriteStep (SW,anent); - } - - break; - case 28 : - { - DeclareAndCast(StepAP214_AutoDesignNominalDateAndTimeAssignment, anent, ent); - RWStepAP214_RWAutoDesignNominalDateAndTimeAssignment tool; -// if (anent.IsNull()) return; - tool.WriteStep (SW,anent); - } - - break; - case 29 : - { - DeclareAndCast(StepAP214_AutoDesignNominalDateAssignment, anent, ent); - RWStepAP214_RWAutoDesignNominalDateAssignment tool; -// if (anent.IsNull()) return; - tool.WriteStep (SW,anent); - } - - break; - case 30 : - { - DeclareAndCast(StepAP214_AutoDesignOrganizationAssignment, anent, ent); - RWStepAP214_RWAutoDesignOrganizationAssignment tool; -// if (anent.IsNull()) return; - tool.WriteStep (SW,anent); - } - + break; + case 727: + { + DeclareAndCast(StepKinematics_RotationAboutDirection, anent, ent); + RWStepKinematics_RWRotationAboutDirection tool; + tool.ReadStep(data, num, ach, anent); + } + break; + case 728: + { + DeclareAndCast(StepKinematics_KinematicJoint, anent, ent); + RWStepKinematics_RWKinematicJoint tool; + tool.ReadStep(data, num, ach, anent); + } + break; + case 729: + { + DeclareAndCast(StepKinematics_ActuatedKinematicPair, anent, ent); + RWStepKinematics_RWActuatedKinematicPair tool; + tool.ReadStep(data, num, ach, anent); + } + break; + case 730: + { + DeclareAndCast(StepKinematics_ContextDependentKinematicLinkRepresentation, anent, ent); + RWStepKinematics_RWContextDependentKinematicLinkRepresentation tool; + tool.ReadStep(data, num, ach, anent); + } + break; + case 731: + { + DeclareAndCast(StepKinematics_CylindricalPair, anent, ent); + RWStepKinematics_RWCylindricalPair tool; + tool.ReadStep(data, num, ach, anent); + } + break; + case 732: + { + DeclareAndCast(StepKinematics_CylindricalPairValue, anent, ent); + RWStepKinematics_RWCylindricalPairValue tool; + tool.ReadStep(data, num, ach, anent); + } + break; + case 733: + { + DeclareAndCast(StepKinematics_CylindricalPairWithRange, anent, ent); + RWStepKinematics_RWCylindricalPairWithRange tool; + tool.ReadStep(data, num, ach, anent); + } + break; + case 734: + { + DeclareAndCast(StepKinematics_FullyConstrainedPair, anent, ent); + RWStepKinematics_RWFullyConstrainedPair tool; + tool.ReadStep(data, num, ach, anent); + } + break; + case 735: + { + DeclareAndCast(StepKinematics_GearPair, anent, ent); + RWStepKinematics_RWGearPair tool; + tool.ReadStep(data, num, ach, anent); + } + break; + case 736: + { + DeclareAndCast(StepKinematics_GearPairValue, anent, ent); + RWStepKinematics_RWGearPairValue tool; + tool.ReadStep(data, num, ach, anent); + } + break; + case 737: + { + DeclareAndCast(StepKinematics_GearPairWithRange, anent, ent); + RWStepKinematics_RWGearPairWithRange tool; + tool.ReadStep(data, num, ach, anent); + } + break; + case 738: + { + DeclareAndCast(StepKinematics_HomokineticPair, anent, ent); + RWStepKinematics_RWHomokineticPair tool; + tool.ReadStep(data, num, ach, anent); + } + break; + case 739: + { + DeclareAndCast(StepKinematics_KinematicLink, anent, ent); + RWStepKinematics_RWKinematicLink tool; + tool.ReadStep(data, num, ach, anent); + } + break; + case 740: + { + DeclareAndCast(StepKinematics_KinematicLinkRepresentationAssociation, anent, ent); + RWStepKinematics_RWKinematicLinkRepresentationAssociation tool; + tool.ReadStep(data, num, ach, anent); + } + break; + case 741: + { + DeclareAndCast(StepKinematics_KinematicPropertyMechanismRepresentation, anent, ent); + RWStepKinematics_RWKinematicPropertyMechanismRepresentation tool; + tool.ReadStep(data, num, ach, anent); + } + break; + case 742: + { + DeclareAndCast(StepKinematics_KinematicTopologyStructure, anent, ent); + RWStepKinematics_RWKinematicTopologyStructure tool; + tool.ReadStep(data, num, ach, anent); + } + break; + case 743: + { + DeclareAndCast(StepKinematics_LowOrderKinematicPair, anent, ent); + RWStepKinematics_RWLowOrderKinematicPair tool; + tool.ReadStep(data, num, ach, anent); + } + break; + case 744: + { + DeclareAndCast(StepKinematics_LowOrderKinematicPairValue, anent, ent); + RWStepKinematics_RWLowOrderKinematicPairValue tool; + tool.ReadStep(data, num, ach, anent); + } + break; + case 745: + { + DeclareAndCast(StepKinematics_LowOrderKinematicPairWithRange, anent, ent); + RWStepKinematics_RWLowOrderKinematicPairWithRange tool; + tool.ReadStep(data, num, ach, anent); + } + break; + case 746: + { + DeclareAndCast(StepKinematics_MechanismRepresentation, anent, ent); + RWStepKinematics_RWMechanismRepresentation tool; + tool.ReadStep(data, num, ach, anent); + } + break; + case 747: + { + DeclareAndCast(StepKinematics_OrientedJoint, anent, ent); + RWStepKinematics_RWOrientedJoint tool; + tool.ReadStep(data, num, ach, anent); + } + break; + case 748: + { + DeclareAndCast(StepKinematics_PlanarCurvePair, anent, ent); + RWStepKinematics_RWPlanarCurvePair tool; + tool.ReadStep(data, num, ach, anent); + } + break; + case 749: + { + DeclareAndCast(StepKinematics_PlanarCurvePairRange, anent, ent); + RWStepKinematics_RWPlanarCurvePairRange tool; + tool.ReadStep(data, num, ach, anent); + } + break; + case 750: + { + DeclareAndCast(StepKinematics_PlanarPair, anent, ent); + RWStepKinematics_RWPlanarPair tool; + tool.ReadStep(data, num, ach, anent); + } + break; + case 751: + { + DeclareAndCast(StepKinematics_PlanarPairValue, anent, ent); + RWStepKinematics_RWPlanarPairValue tool; + tool.ReadStep(data, num, ach, anent); + } + break; + case 752: + { + DeclareAndCast(StepKinematics_PlanarPairWithRange, anent, ent); + RWStepKinematics_RWPlanarPairWithRange tool; + tool.ReadStep(data, num, ach, anent); + } + break; + case 753: + { + DeclareAndCast(StepKinematics_PointOnPlanarCurvePair, anent, ent); + RWStepKinematics_RWPointOnPlanarCurvePair tool; + tool.ReadStep(data, num, ach, anent); + } + break; + case 754: + { + DeclareAndCast(StepKinematics_PointOnPlanarCurvePairValue, anent, ent); + RWStepKinematics_RWPointOnPlanarCurvePairValue tool; + tool.ReadStep(data, num, ach, anent); + } + break; + case 755: + { + DeclareAndCast(StepKinematics_PointOnPlanarCurvePairWithRange, anent, ent); + RWStepKinematics_RWPointOnPlanarCurvePairWithRange tool; + tool.ReadStep(data, num, ach, anent); + } + break; + case 756: + { + DeclareAndCast(StepKinematics_PointOnSurfacePair, anent, ent); + RWStepKinematics_RWPointOnSurfacePair tool; + tool.ReadStep(data, num, ach, anent); + } + break; + case 757: + { + DeclareAndCast(StepKinematics_PointOnSurfacePairValue, anent, ent); + RWStepKinematics_RWPointOnSurfacePairValue tool; + tool.ReadStep(data, num, ach, anent); + } + break; + case 758: + { + DeclareAndCast(StepKinematics_PointOnSurfacePairWithRange, anent, ent); + RWStepKinematics_RWPointOnSurfacePairWithRange tool; + tool.ReadStep(data, num, ach, anent); + } + break; + case 759: + { + DeclareAndCast(StepKinematics_PrismaticPair, anent, ent); + RWStepKinematics_RWPrismaticPair tool; + tool.ReadStep(data, num, ach, anent); + } + break; + case 760: + { + DeclareAndCast(StepKinematics_PrismaticPairValue, anent, ent); + RWStepKinematics_RWPrismaticPairValue tool; + tool.ReadStep(data, num, ach, anent); + } + break; + case 761: + { + DeclareAndCast(StepKinematics_PrismaticPairWithRange, anent, ent); + RWStepKinematics_RWPrismaticPairWithRange tool; + tool.ReadStep(data, num, ach, anent); + } + break; + case 762: + { + DeclareAndCast(StepKinematics_ProductDefinitionKinematics, anent, ent); + RWStepKinematics_RWProductDefinitionKinematics tool; + tool.ReadStep(data, num, ach, anent); + } + break; + case 763: + { + DeclareAndCast(StepKinematics_ProductDefinitionRelationshipKinematics, anent, ent); + RWStepKinematics_RWProductDefinitionRelationshipKinematics tool; + tool.ReadStep(data, num, ach, anent); + } + break; + case 764: + { + DeclareAndCast(StepKinematics_RackAndPinionPair, anent, ent); + RWStepKinematics_RWRackAndPinionPair tool; + tool.ReadStep(data, num, ach, anent); + } + break; + case 765: + { + DeclareAndCast(StepKinematics_RackAndPinionPairValue, anent, ent); + RWStepKinematics_RWRackAndPinionPairValue tool; + tool.ReadStep(data, num, ach, anent); + } + break; + case 766: + { + DeclareAndCast(StepKinematics_RackAndPinionPairWithRange, anent, ent); + RWStepKinematics_RWRackAndPinionPairWithRange tool; + tool.ReadStep(data, num, ach, anent); + } + break; + case 767: + { + DeclareAndCast(StepKinematics_RevolutePair, anent, ent); + RWStepKinematics_RWRevolutePair tool; + tool.ReadStep(data, num, ach, anent); + } + break; + case 768: + { + DeclareAndCast(StepKinematics_RevolutePairValue, anent, ent); + RWStepKinematics_RWRevolutePairValue tool; + tool.ReadStep(data, num, ach, anent); + } + break; + case 769: + { + DeclareAndCast(StepKinematics_RevolutePairWithRange, anent, ent); + RWStepKinematics_RWRevolutePairWithRange tool; + tool.ReadStep(data, num, ach, anent); + } + break; + case 770: + { + DeclareAndCast(StepKinematics_RollingCurvePair, anent, ent); + RWStepKinematics_RWRollingCurvePair tool; + tool.ReadStep(data, num, ach, anent); + } + break; + case 771: + { + DeclareAndCast(StepKinematics_RollingCurvePairValue, anent, ent); + RWStepKinematics_RWRollingCurvePairValue tool; + tool.ReadStep(data, num, ach, anent); + } + break; + case 772: + { + DeclareAndCast(StepKinematics_RollingSurfacePair, anent, ent); + RWStepKinematics_RWRollingSurfacePair tool; + tool.ReadStep(data, num, ach, anent); + } + break; + case 773: + { + DeclareAndCast(StepKinematics_RollingSurfacePairValue, anent, ent); + RWStepKinematics_RWRollingSurfacePairValue tool; + tool.ReadStep(data, num, ach, anent); + } + break; + case 774: + { + DeclareAndCast(StepKinematics_ScrewPair, anent, ent); + RWStepKinematics_RWScrewPair tool; + tool.ReadStep(data, num, ach, anent); + } + break; + case 775: + { + DeclareAndCast(StepKinematics_ScrewPairValue, anent, ent); + RWStepKinematics_RWScrewPairValue tool; + tool.ReadStep(data, num, ach, anent); + } + break; + case 776: + { + DeclareAndCast(StepKinematics_ScrewPairWithRange, anent, ent); + RWStepKinematics_RWScrewPairWithRange tool; + tool.ReadStep(data, num, ach, anent); + } + break; + case 777: + { + DeclareAndCast(StepKinematics_SlidingCurvePair, anent, ent); + RWStepKinematics_RWSlidingCurvePair tool; + tool.ReadStep(data, num, ach, anent); + } + break; + case 778: + { + DeclareAndCast(StepKinematics_SlidingCurvePairValue, anent, ent); + RWStepKinematics_RWSlidingCurvePairValue tool; + tool.ReadStep(data, num, ach, anent); + } + break; + case 779: + { + DeclareAndCast(StepKinematics_SlidingSurfacePair, anent, ent); + RWStepKinematics_RWSlidingSurfacePair tool; + tool.ReadStep(data, num, ach, anent); + } + break; + case 780: + { + DeclareAndCast(StepKinematics_SlidingSurfacePairValue, anent, ent); + RWStepKinematics_RWSlidingSurfacePairValue tool; + tool.ReadStep(data, num, ach, anent); + } + break; + case 781: + { + DeclareAndCast(StepKinematics_SphericalPair, anent, ent); + RWStepKinematics_RWSphericalPair tool; + tool.ReadStep(data, num, ach, anent); + } + break; + case 782: + { + DeclareAndCast(StepKinematics_SphericalPairValue, anent, ent); + RWStepKinematics_RWSphericalPairValue tool; + tool.ReadStep(data, num, ach, anent); + } + break; + case 783: + { + DeclareAndCast(StepKinematics_SphericalPairWithPin, anent, ent); + RWStepKinematics_RWSphericalPairWithPin tool; + tool.ReadStep(data, num, ach, anent); + } + break; + case 784: + { + DeclareAndCast(StepKinematics_SphericalPairWithPinAndRange, anent, ent); + RWStepKinematics_RWSphericalPairWithPinAndRange tool; + tool.ReadStep(data, num, ach, anent); + } + break; + case 785: + { + DeclareAndCast(StepKinematics_SphericalPairWithRange, anent, ent); + RWStepKinematics_RWSphericalPairWithRange tool; + tool.ReadStep(data, num, ach, anent); + } + break; + case 786: + { + DeclareAndCast(StepKinematics_SurfacePairWithRange, anent, ent); + RWStepKinematics_RWSurfacePairWithRange tool; + tool.ReadStep(data, num, ach, anent); + } + break; + case 787: + { + DeclareAndCast(StepKinematics_UnconstrainedPair, anent, ent); + RWStepKinematics_RWUnconstrainedPair tool; + tool.ReadStep(data, num, ach, anent); + } + break; + case 788: + { + DeclareAndCast(StepKinematics_UnconstrainedPairValue, anent, ent); + RWStepKinematics_RWUnconstrainedPairValue tool; + tool.ReadStep(data, num, ach, anent); + } + break; + case 789: + { + DeclareAndCast(StepKinematics_UniversalPair, anent, ent); + RWStepKinematics_RWUniversalPair tool; + tool.ReadStep(data, num, ach, anent); + } + break; + case 790: + { + DeclareAndCast(StepKinematics_UniversalPairValue, anent, ent); + RWStepKinematics_RWUniversalPairValue tool; + tool.ReadStep(data, num, ach, anent); + } + break; + case 791: + { + DeclareAndCast(StepKinematics_UniversalPairWithRange, anent, ent); + RWStepKinematics_RWUniversalPairWithRange tool; + tool.ReadStep(data, num, ach, anent); + } + break; + case 792: + { + DeclareAndCast(StepKinematics_PairRepresentationRelationship, anent, ent); + RWStepKinematics_RWPairRepresentationRelationship tool; + tool.ReadStep(data, num, ach, anent); + } + break; + case 793: + { + DeclareAndCast(StepKinematics_RigidLinkRepresentation, anent, ent); + RWStepKinematics_RWRigidLinkRepresentation tool; + tool.ReadStep(data, num, ach, anent); + } + break; + case 794: + { + DeclareAndCast(StepKinematics_KinematicTopologyDirectedStructure, anent, ent); + RWStepKinematics_RWKinematicTopologyDirectedStructure tool; + tool.ReadStep(data, num, ach, anent); + } + break; + case 795: + { + DeclareAndCast(StepKinematics_KinematicTopologyNetworkStructure, anent, ent); + RWStepKinematics_RWKinematicTopologyNetworkStructure tool; + tool.ReadStep(data, num, ach, anent); + } + break; + case 796: + { + DeclareAndCast(StepKinematics_LinearFlexibleAndPinionPair, anent, ent); + RWStepKinematics_RWLinearFlexibleAndPinionPair tool; + tool.ReadStep(data, num, ach, anent); + } + break; + case 797: + { + DeclareAndCast(StepKinematics_LinearFlexibleAndPlanarCurvePair, anent, ent); + RWStepKinematics_RWLinearFlexibleAndPlanarCurvePair tool; + tool.ReadStep(data, num, ach, anent); + } + break; + case 798: + { + DeclareAndCast(StepKinematics_LinearFlexibleLinkRepresentation, anent, ent); + RWStepKinematics_RWLinearFlexibleLinkRepresentation tool; + tool.ReadStep(data, num, ach, anent); + } + break; + case 800: + { + DeclareAndCast(StepKinematics_ActuatedKinPairAndOrderKinPair, anent, ent); + RWStepKinematics_RWActuatedKinPairAndOrderKinPair tool; + tool.ReadStep(data, num, ach, anent); + } + break; + case 801: + { + DeclareAndCast(StepKinematics_MechanismStateRepresentation, anent, ent); + RWStepKinematics_RWMechanismStateRepresentation tool; + tool.ReadStep(data, num, ach, anent); + } + break; + + default: + ach->AddFail("Type Mismatch when reading - Entity"); + } + return; +} + + +//======================================================================= +//function : WriteStep +//purpose : Writing of a file +//======================================================================= + +void RWStepAP214_ReadWriteModule::WriteStep(const Standard_Integer CN, + StepData_StepWriter& SW, + const Handle(Standard_Transient)&ent) const +{ + if (CN == 0) return; + switch (CN) { + case 1 : + { + DeclareAndCast(StepBasic_Address, anent, ent); + RWStepBasic_RWAddress tool; +// if (anent.IsNull()) return; + tool.WriteStep (SW,anent); + } + + break; + case 2 : + { + DeclareAndCast(StepShape_AdvancedBrepShapeRepresentation, anent, ent); + RWStepShape_RWAdvancedBrepShapeRepresentation tool; +// if (anent.IsNull()) return; + tool.WriteStep (SW,anent); + } + + break; + case 3 : + { + DeclareAndCast(StepShape_AdvancedFace, anent, ent); + RWStepShape_RWAdvancedFace tool; +// if (anent.IsNull()) return; + tool.WriteStep (SW,anent); + } + + break; + case 4 : + { + DeclareAndCast(StepVisual_AnnotationCurveOccurrence, anent, ent); + RWStepVisual_RWAnnotationCurveOccurrence tool; + tool.WriteStep (SW,anent); + } + break; + case 5: + { + DeclareAndCast(StepVisual_AnnotationFillArea, anent, ent); + RWStepVisual_RWAnnotationFillArea tool; + tool.WriteStep(SW, anent); + } + break; + case 6: + { + DeclareAndCast(StepVisual_AnnotationFillAreaOccurrence, anent, ent); + RWStepVisual_RWAnnotationFillAreaOccurrence tool; + tool.WriteStep(SW, anent); + } + break; + case 7 : + { + DeclareAndCast(StepVisual_AnnotationOccurrence, anent, ent); + RWStepVisual_RWAnnotationOccurrence tool; + tool.WriteStep (SW,anent); + } + + break; + case 11 : + { + DeclareAndCast(StepRepr_MappedItem, anent, ent); + RWStepRepr_RWMappedItem tool; +// if (anent.IsNull()) return; + tool.WriteStep (SW,anent); + } + + break; + case 12 : + { + DeclareAndCast(StepVisual_StyledItem, anent, ent); + RWStepVisual_RWStyledItem tool; +// if (anent.IsNull()) return; + tool.WriteStep (SW,anent); + } + + break; + case 13 : + { + DeclareAndCast(StepBasic_ApplicationContext, anent, ent); + RWStepBasic_RWApplicationContext tool; +// if (anent.IsNull()) return; + tool.WriteStep (SW,anent); + } + + break; + case 14 : + { + DeclareAndCast(StepBasic_ApplicationContextElement, anent, ent); + RWStepBasic_RWApplicationContextElement tool; +// if (anent.IsNull()) return; + tool.WriteStep (SW,anent); + } + + break; + case 15 : + { + DeclareAndCast(StepBasic_ApplicationProtocolDefinition, anent, ent); + RWStepBasic_RWApplicationProtocolDefinition tool; +// if (anent.IsNull()) return; + tool.WriteStep (SW,anent); + } + + break; + case 16 : + { + DeclareAndCast(StepBasic_Approval, anent, ent); + RWStepBasic_RWApproval tool; +// if (anent.IsNull()) return; + tool.WriteStep (SW,anent); + } + + break; + case 18 : + { + DeclareAndCast(StepBasic_ApprovalPersonOrganization, anent, ent); + RWStepBasic_RWApprovalPersonOrganization tool; +// if (anent.IsNull()) return; + tool.WriteStep (SW,anent); + } + + break; + case 19 : + { + DeclareAndCast(StepBasic_ApprovalRelationship, anent, ent); + RWStepBasic_RWApprovalRelationship tool; +// if (anent.IsNull()) return; + tool.WriteStep (SW,anent); + } + + break; + case 20 : + { + DeclareAndCast(StepBasic_ApprovalRole, anent, ent); + RWStepBasic_RWApprovalRole tool; +// if (anent.IsNull()) return; + tool.WriteStep (SW,anent); + } + + break; + case 21 : + { + DeclareAndCast(StepBasic_ApprovalStatus, anent, ent); + RWStepBasic_RWApprovalStatus tool; +// if (anent.IsNull()) return; + tool.WriteStep (SW,anent); + } + + break; + case 22 : + { + DeclareAndCast(StepVisual_AreaInSet, anent, ent); + RWStepVisual_RWAreaInSet tool; +// if (anent.IsNull()) return; + tool.WriteStep (SW,anent); + } + + break; + case 23 : + { + DeclareAndCast(StepAP214_AutoDesignActualDateAndTimeAssignment, anent, ent); + RWStepAP214_RWAutoDesignActualDateAndTimeAssignment tool; +// if (anent.IsNull()) return; + tool.WriteStep (SW,anent); + } + + break; + case 24 : + { + DeclareAndCast(StepAP214_AutoDesignActualDateAssignment, anent, ent); + RWStepAP214_RWAutoDesignActualDateAssignment tool; +// if (anent.IsNull()) return; + tool.WriteStep (SW,anent); + } + + break; + case 25 : + { + DeclareAndCast(StepAP214_AutoDesignApprovalAssignment, anent, ent); + RWStepAP214_RWAutoDesignApprovalAssignment tool; +// if (anent.IsNull()) return; + tool.WriteStep (SW,anent); + } + + break; + case 26 : + { + DeclareAndCast(StepAP214_AutoDesignDateAndPersonAssignment, anent, ent); + RWStepAP214_RWAutoDesignDateAndPersonAssignment tool; +// if (anent.IsNull()) return; + tool.WriteStep (SW,anent); + } + + break; + case 27 : + { + DeclareAndCast(StepAP214_AutoDesignGroupAssignment, anent, ent); + RWStepAP214_RWAutoDesignGroupAssignment tool; +// if (anent.IsNull()) return; + tool.WriteStep (SW,anent); + } + + break; + case 28 : + { + DeclareAndCast(StepAP214_AutoDesignNominalDateAndTimeAssignment, anent, ent); + RWStepAP214_RWAutoDesignNominalDateAndTimeAssignment tool; +// if (anent.IsNull()) return; + tool.WriteStep (SW,anent); + } + + break; + case 29 : + { + DeclareAndCast(StepAP214_AutoDesignNominalDateAssignment, anent, ent); + RWStepAP214_RWAutoDesignNominalDateAssignment tool; +// if (anent.IsNull()) return; + tool.WriteStep (SW,anent); + } + + break; + case 30 : + { + DeclareAndCast(StepAP214_AutoDesignOrganizationAssignment, anent, ent); + RWStepAP214_RWAutoDesignOrganizationAssignment tool; +// if (anent.IsNull()) return; + tool.WriteStep (SW,anent); + } + break; case 31 : { @@ -14201,197 +15166,737 @@ void RWStepAP214_ReadWriteModule::WriteStep(const Standard_Integer CN, tool.WriteStep (SW,anent); } break; - case 697: + case 697: + { + DeclareAndCast(StepDimTol_GeoTolAndGeoTolWthDatRefAndUneqDisGeoTol,anent,ent); + RWStepDimTol_RWGeoTolAndGeoTolWthDatRefAndUneqDisGeoTol tool; + tool.WriteStep (SW,anent); + } + break; + case 698: + { + DeclareAndCast(StepRepr_CompGroupShAspAndCompShAspAndDatumFeatAndShAsp,anent,ent); + RWStepRepr_RWCompGroupShAspAndCompShAspAndDatumFeatAndShAsp tool; + tool.WriteStep (SW,anent); + } + break; + case 699: + { + DeclareAndCast(StepRepr_CompShAspAndDatumFeatAndShAsp,anent,ent); + RWStepRepr_RWCompShAspAndDatumFeatAndShAsp tool; + tool.WriteStep (SW,anent); + } + break; + case 700: + { + DeclareAndCast(StepRepr_IntegerRepresentationItem,anent,ent); + RWStepRepr_RWIntegerRepresentationItem tool; + tool.WriteStep (SW,anent); + } + break; + case 701: + { + DeclareAndCast(StepRepr_ValueRepresentationItem,anent,ent); + RWStepRepr_RWValueRepresentationItem tool; + tool.WriteStep (SW,anent); + } + break; + case 702: + { + DeclareAndCast(StepRepr_FeatureForDatumTargetRelationship,anent,ent); + RWStepRepr_RWFeatureForDatumTargetRelationship tool; + tool.WriteStep (SW,anent); + } + break; + case 703: + { + DeclareAndCast(StepAP242_DraughtingModelItemAssociation,anent,ent); + RWStepAP242_RWDraughtingModelItemAssociation tool; + tool.WriteStep (SW,anent); + } + break; + case 704: + { + DeclareAndCast(StepVisual_AnnotationPlane,anent,ent); + RWStepVisual_RWAnnotationPlane tool; + tool.WriteStep (SW,anent); + } + break; + case 705: + { + DeclareAndCast(StepDimTol_GeoTolAndGeoTolWthDatRefAndGeoTolWthMaxTol,anent,ent); + RWStepDimTol_RWGeoTolAndGeoTolWthDatRefAndGeoTolWthMaxTol tool; + tool.WriteStep (SW,anent); + } + break; + case 706: + { + DeclareAndCast(StepDimTol_GeoTolAndGeoTolWthMaxTol,anent,ent); + RWStepDimTol_RWGeoTolAndGeoTolWthMaxTol tool; + tool.WriteStep (SW,anent); + } + break; + case 707: + { + DeclareAndCast(StepVisual_TessellatedAnnotationOccurrence,anent,ent); + RWStepVisual_RWTessellatedAnnotationOccurrence tool; + tool.WriteStep (SW,anent); + } + break; + + case 708: + { + DeclareAndCast(StepVisual_TessellatedItem,anent,ent); + RWStepVisual_RWTessellatedItem tool; + tool.WriteStep (SW,anent); + } + break; + + case 709: + { + DeclareAndCast(StepVisual_TessellatedGeometricSet,anent,ent); + RWStepVisual_RWTessellatedGeometricSet tool; + tool.WriteStep (SW,anent); + } + break; + case 710: + { + DeclareAndCast(StepVisual_TessellatedCurveSet,anent,ent); + RWStepVisual_RWTessellatedCurveSet tool; + tool.WriteStep (SW,anent); + } + break; + case 711: + { + DeclareAndCast(StepVisual_CoordinatesList,anent,ent); + RWStepVisual_RWCoordinatesList tool; + tool.WriteStep(SW,anent); + } + break; + case 712: { - DeclareAndCast(StepDimTol_GeoTolAndGeoTolWthDatRefAndUneqDisGeoTol,anent,ent); - RWStepDimTol_RWGeoTolAndGeoTolWthDatRefAndUneqDisGeoTol tool; - tool.WriteStep (SW,anent); + DeclareAndCast(StepRepr_ConstructiveGeometryRepresentation,anent,ent); + RWStepRepr_RWConstructiveGeometryRepresentation tool; + tool.WriteStep(SW,anent); } break; - case 698: + case 713: { - DeclareAndCast(StepRepr_CompGroupShAspAndCompShAspAndDatumFeatAndShAsp,anent,ent); - RWStepRepr_RWCompGroupShAspAndCompShAspAndDatumFeatAndShAsp tool; - tool.WriteStep (SW,anent); + DeclareAndCast(StepRepr_ConstructiveGeometryRepresentationRelationship,anent,ent); + RWStepRepr_RWConstructiveGeometryRepresentationRelationship tool; + tool.WriteStep(SW,anent); } break; - case 699: + case 714: { - DeclareAndCast(StepRepr_CompShAspAndDatumFeatAndShAsp,anent,ent); - RWStepRepr_RWCompShAspAndDatumFeatAndShAsp tool; - tool.WriteStep (SW,anent); + DeclareAndCast(StepRepr_CharacterizedRepresentation, anent, ent); + RWStepRepr_RWCharacterizedRepresentation tool; + tool.WriteStep(SW, anent); } break; - case 700: + case 715: { - DeclareAndCast(StepRepr_IntegerRepresentationItem,anent,ent); - RWStepRepr_RWIntegerRepresentationItem tool; - tool.WriteStep (SW,anent); + DeclareAndCast(StepVisual_CharacterizedObjAndRepresentationAndDraughtingModel, anent, ent); + RWStepVisual_RWCharacterizedObjAndRepresentationAndDraughtingModel tool; + tool.WriteStep(SW, anent); } break; - case 701: + case 716: { - DeclareAndCast(StepRepr_ValueRepresentationItem,anent,ent); - RWStepRepr_RWValueRepresentationItem tool; - tool.WriteStep (SW,anent); + DeclareAndCast(StepVisual_CameraModelD3MultiClipping, anent, ent); + RWStepVisual_RWCameraModelD3MultiClipping tool; + tool.WriteStep(SW, anent); } break; - case 702: + case 717: { - DeclareAndCast(StepRepr_FeatureForDatumTargetRelationship,anent,ent); - RWStepRepr_RWFeatureForDatumTargetRelationship tool; - tool.WriteStep (SW,anent); + DeclareAndCast(StepVisual_CameraModelD3MultiClippingIntersection, anent, ent); + RWStepVisual_RWCameraModelD3MultiClippingIntersection tool; + tool.WriteStep(SW, anent); } break; - case 703: + case 718: { - DeclareAndCast(StepAP242_DraughtingModelItemAssociation,anent,ent); - RWStepAP242_RWDraughtingModelItemAssociation tool; - tool.WriteStep (SW,anent); + DeclareAndCast(StepVisual_CameraModelD3MultiClippingUnion, anent, ent); + RWStepVisual_RWCameraModelD3MultiClippingUnion tool; + tool.WriteStep(SW, anent); } break; - case 704: + case 719: { - DeclareAndCast(StepVisual_AnnotationPlane,anent,ent); - RWStepVisual_RWAnnotationPlane tool; - tool.WriteStep (SW,anent); + DeclareAndCast(StepVisual_AnnotationCurveOccurrenceAndGeomReprItem, anent, ent); + RWStepVisual_RWAnnotationCurveOccurrenceAndGeomReprItem tool; + tool.WriteStep(SW, anent); } - break; - case 705: + break; + case 720: { - DeclareAndCast(StepDimTol_GeoTolAndGeoTolWthDatRefAndGeoTolWthMaxTol,anent,ent); - RWStepDimTol_RWGeoTolAndGeoTolWthDatRefAndGeoTolWthMaxTol tool; - tool.WriteStep (SW,anent); + DeclareAndCast(StepVisual_SurfaceStyleTransparent, anent, ent); + RWStepVisual_RWSurfaceStyleTransparent tool; + tool.WriteStep(SW, anent); } break; - case 706: + case 721: { - DeclareAndCast(StepDimTol_GeoTolAndGeoTolWthMaxTol,anent,ent); - RWStepDimTol_RWGeoTolAndGeoTolWthMaxTol tool; - tool.WriteStep (SW,anent); + DeclareAndCast(StepVisual_SurfaceStyleReflectanceAmbient, anent, ent); + RWStepVisual_RWSurfaceStyleReflectanceAmbient tool; + tool.WriteStep(SW, anent); } break; - case 707: + case 722: { - DeclareAndCast(StepVisual_TessellatedAnnotationOccurrence,anent,ent); - RWStepVisual_RWTessellatedAnnotationOccurrence tool; - tool.WriteStep (SW,anent); + DeclareAndCast(StepVisual_SurfaceStyleRendering, anent, ent); + RWStepVisual_RWSurfaceStyleRendering tool; + tool.WriteStep(SW, anent); } break; - - case 708: + case 723: { - DeclareAndCast(StepVisual_TessellatedItem,anent,ent); - RWStepVisual_RWTessellatedItem tool; - tool.WriteStep (SW,anent); + DeclareAndCast(StepVisual_SurfaceStyleRenderingWithProperties, anent, ent); + RWStepVisual_RWSurfaceStyleRenderingWithProperties tool; + tool.WriteStep(SW, anent); } break; + case 724: + { + DeclareAndCast(StepRepr_RepresentationContextReference, anent, ent); + RWStepRepr_RWRepresentationContextReference tool; + tool.WriteStep(SW, anent); + } + break; + case 725: + { + DeclareAndCast(StepRepr_RepresentationReference, anent, ent); + RWStepRepr_RWRepresentationReference tool; + tool.WriteStep(SW, anent); + } + break; + case 726: + { + DeclareAndCast(StepGeom_SuParameters, anent, ent); + RWStepGeom_RWSuParameters tool; + tool.WriteStep(SW, anent); + } + break; + case 727: + { + DeclareAndCast(StepKinematics_RotationAboutDirection, anent, ent); + RWStepKinematics_RWRotationAboutDirection tool; + tool.WriteStep(SW, anent); + } + break; + case 728: + { + DeclareAndCast(StepKinematics_KinematicJoint, anent, ent); + RWStepKinematics_RWKinematicJoint tool; + tool.WriteStep(SW, anent); + } + break; + case 729: + { + DeclareAndCast(StepKinematics_ActuatedKinematicPair, anent, ent); + RWStepKinematics_RWActuatedKinematicPair tool; + tool.WriteStep(SW, anent); + } + break; + case 730: + { + DeclareAndCast(StepKinematics_ContextDependentKinematicLinkRepresentation, anent, ent); + RWStepKinematics_RWContextDependentKinematicLinkRepresentation tool; + tool.WriteStep(SW, anent); + } + break; + case 731: + { + DeclareAndCast(StepKinematics_CylindricalPair, anent, ent); + RWStepKinematics_RWCylindricalPair tool; + tool.WriteStep(SW, anent); + } + break; + case 732: + { + DeclareAndCast(StepKinematics_CylindricalPairValue, anent, ent); + RWStepKinematics_RWCylindricalPairValue tool; + tool.WriteStep(SW, anent); + } + break; + case 733: + { + DeclareAndCast(StepKinematics_CylindricalPairWithRange, anent, ent); + RWStepKinematics_RWCylindricalPairWithRange tool; + tool.WriteStep(SW, anent); + } + break; + case 734: + { + DeclareAndCast(StepKinematics_FullyConstrainedPair, anent, ent); + RWStepKinematics_RWFullyConstrainedPair tool; + tool.WriteStep(SW, anent); + } + break; + case 735: + { + DeclareAndCast(StepKinematics_GearPair, anent, ent); + RWStepKinematics_RWGearPair tool; + tool.WriteStep(SW, anent); + } + break; + case 736: + { + DeclareAndCast(StepKinematics_GearPairValue, anent, ent); + RWStepKinematics_RWGearPairValue tool; + tool.WriteStep(SW, anent); + } + break; + case 737: + { + DeclareAndCast(StepKinematics_GearPairWithRange, anent, ent); + RWStepKinematics_RWGearPairWithRange tool; + tool.WriteStep(SW, anent); + } + break; + case 738: + { + DeclareAndCast(StepKinematics_HomokineticPair, anent, ent); + RWStepKinematics_RWHomokineticPair tool; + tool.WriteStep(SW, anent); + } + break; + case 739: + { + DeclareAndCast(StepKinematics_KinematicLink, anent, ent); + RWStepKinematics_RWKinematicLink tool; + tool.WriteStep(SW, anent); + } + break; + case 740: + { + DeclareAndCast(StepKinematics_KinematicLinkRepresentationAssociation, anent, ent); + RWStepKinematics_RWKinematicLinkRepresentationAssociation tool; + tool.WriteStep(SW, anent); + } + break; + case 741: + { + DeclareAndCast(StepKinematics_KinematicPropertyMechanismRepresentation, anent, ent); + RWStepKinematics_RWKinematicPropertyMechanismRepresentation tool; + tool.WriteStep(SW, anent); + } + break; + case 742: + { + DeclareAndCast(StepKinematics_KinematicTopologyStructure, anent, ent); + RWStepKinematics_RWKinematicTopologyStructure tool; + tool.WriteStep(SW, anent); + } + break; + case 743: + { + DeclareAndCast(StepKinematics_LowOrderKinematicPair, anent, ent); + RWStepKinematics_RWLowOrderKinematicPair tool; + tool.WriteStep(SW, anent); + } + break; + case 744: + { + DeclareAndCast(StepKinematics_LowOrderKinematicPairValue, anent, ent); + RWStepKinematics_RWLowOrderKinematicPairValue tool; + tool.WriteStep(SW, anent); + } + break; + case 745: + { + DeclareAndCast(StepKinematics_LowOrderKinematicPairWithRange, anent, ent); + RWStepKinematics_RWLowOrderKinematicPairWithRange tool; + tool.WriteStep(SW, anent); + } + break; + case 746: + { + DeclareAndCast(StepKinematics_MechanismRepresentation, anent, ent); + RWStepKinematics_RWMechanismRepresentation tool; + tool.WriteStep(SW, anent); + } + break; + case 747: + { + DeclareAndCast(StepKinematics_OrientedJoint, anent, ent); + RWStepKinematics_RWOrientedJoint tool; + tool.WriteStep(SW, anent); + } + break; + case 748: + { + DeclareAndCast(StepKinematics_PlanarCurvePair, anent, ent); + RWStepKinematics_RWPlanarCurvePair tool; + tool.WriteStep(SW, anent); + } + break; + case 749: + { + DeclareAndCast(StepKinematics_PlanarCurvePairRange, anent, ent); + RWStepKinematics_RWPlanarCurvePairRange tool; + tool.WriteStep(SW, anent); + } + break; + case 750: + { + DeclareAndCast(StepKinematics_PlanarPair, anent, ent); + RWStepKinematics_RWPlanarPair tool; + tool.WriteStep(SW, anent); + } + break; + case 751: + { + DeclareAndCast(StepKinematics_PlanarPairValue, anent, ent); + RWStepKinematics_RWPlanarPairValue tool; + tool.WriteStep(SW, anent); + } + break; + case 752: + { + DeclareAndCast(StepKinematics_PlanarPairWithRange, anent, ent); + RWStepKinematics_RWPlanarPairWithRange tool; + tool.WriteStep(SW, anent); + } + break; + case 753: + { + DeclareAndCast(StepKinematics_PointOnPlanarCurvePair, anent, ent); + RWStepKinematics_RWPointOnPlanarCurvePair tool; + tool.WriteStep(SW, anent); + } + break; + case 754: + { + DeclareAndCast(StepKinematics_PointOnPlanarCurvePairValue, anent, ent); + RWStepKinematics_RWPointOnPlanarCurvePairValue tool; + tool.WriteStep(SW, anent); + } + break; + case 755: + { + DeclareAndCast(StepKinematics_PointOnPlanarCurvePairWithRange, anent, ent); + RWStepKinematics_RWPointOnPlanarCurvePairWithRange tool; + tool.WriteStep(SW, anent); + } + break; + case 756: + { + DeclareAndCast(StepKinematics_PointOnSurfacePair, anent, ent); + RWStepKinematics_RWPointOnSurfacePair tool; + tool.WriteStep(SW, anent); + } + break; + case 757: + { + DeclareAndCast(StepKinematics_PointOnSurfacePairValue, anent, ent); + RWStepKinematics_RWPointOnSurfacePairValue tool; + tool.WriteStep(SW, anent); + } + break; + case 758: + { + DeclareAndCast(StepKinematics_PointOnSurfacePairWithRange, anent, ent); + RWStepKinematics_RWPointOnSurfacePairWithRange tool; + tool.WriteStep(SW, anent); + } + break; + case 759: + { + DeclareAndCast(StepKinematics_PrismaticPair, anent, ent); + RWStepKinematics_RWPrismaticPair tool; + tool.WriteStep(SW, anent); + } + break; + case 760: + { + DeclareAndCast(StepKinematics_PrismaticPairValue, anent, ent); + RWStepKinematics_RWPrismaticPairValue tool; + tool.WriteStep(SW, anent); + } + break; + case 761: + { + DeclareAndCast(StepKinematics_PrismaticPairWithRange, anent, ent); + RWStepKinematics_RWPrismaticPairWithRange tool; + tool.WriteStep(SW, anent); + } + break; + case 762: + { + DeclareAndCast(StepKinematics_ProductDefinitionKinematics, anent, ent); + RWStepKinematics_RWProductDefinitionKinematics tool; + tool.WriteStep(SW, anent); + } + break; + case 763: + { + DeclareAndCast(StepKinematics_ProductDefinitionRelationshipKinematics, anent, ent); + RWStepKinematics_RWProductDefinitionRelationshipKinematics tool; + tool.WriteStep(SW, anent); + } + break; + case 764: + { + DeclareAndCast(StepKinematics_RackAndPinionPair, anent, ent); + RWStepKinematics_RWRackAndPinionPair tool; + tool.WriteStep(SW, anent); + } + break; + case 765: + { + DeclareAndCast(StepKinematics_RackAndPinionPairValue, anent, ent); + RWStepKinematics_RWRackAndPinionPairValue tool; + tool.WriteStep(SW, anent); + } + break; + case 766: + { + DeclareAndCast(StepKinematics_RackAndPinionPairWithRange, anent, ent); + RWStepKinematics_RWRackAndPinionPairWithRange tool; + tool.WriteStep(SW, anent); + } + break; + case 767: + { + DeclareAndCast(StepKinematics_RevolutePair, anent, ent); + RWStepKinematics_RWRevolutePair tool; + tool.WriteStep(SW, anent); + } + break; + case 768: + { + DeclareAndCast(StepKinematics_RevolutePairValue, anent, ent); + RWStepKinematics_RWRevolutePairValue tool; + tool.WriteStep(SW, anent); + } + break; + case 769: + { + DeclareAndCast(StepKinematics_RevolutePairWithRange, anent, ent); + RWStepKinematics_RWRevolutePairWithRange tool; + tool.WriteStep(SW, anent); + } + break; + case 770: + { + DeclareAndCast(StepKinematics_RollingCurvePair, anent, ent); + RWStepKinematics_RWRollingCurvePair tool; + tool.WriteStep(SW, anent); + } + break; + case 771: + { + DeclareAndCast(StepKinematics_RollingCurvePairValue, anent, ent); + RWStepKinematics_RWRollingCurvePairValue tool; + tool.WriteStep(SW, anent); + } + break; + case 772: + { + DeclareAndCast(StepKinematics_RollingSurfacePair, anent, ent); + RWStepKinematics_RWRollingSurfacePair tool; + tool.WriteStep(SW, anent); + } + break; + case 773: + { + DeclareAndCast(StepKinematics_RollingSurfacePairValue, anent, ent); + RWStepKinematics_RWRollingSurfacePairValue tool; + tool.WriteStep(SW, anent); + } + break; + case 774: + { + DeclareAndCast(StepKinematics_ScrewPair, anent, ent); + RWStepKinematics_RWScrewPair tool; + tool.WriteStep(SW, anent); + } + break; + case 775: + { + DeclareAndCast(StepKinematics_ScrewPairValue, anent, ent); + RWStepKinematics_RWScrewPairValue tool; + tool.WriteStep(SW, anent); + } + break; + case 776: + { + DeclareAndCast(StepKinematics_ScrewPairWithRange, anent, ent); + RWStepKinematics_RWScrewPairWithRange tool; + tool.WriteStep(SW, anent); + } + break; + case 777: + { + DeclareAndCast(StepKinematics_SlidingCurvePair, anent, ent); + RWStepKinematics_RWSlidingCurvePair tool; + tool.WriteStep(SW, anent); + } + break; + case 778: + { + DeclareAndCast(StepKinematics_SlidingCurvePairValue, anent, ent); + RWStepKinematics_RWSlidingCurvePairValue tool; + tool.WriteStep(SW, anent); + } + break; + case 779: + { + DeclareAndCast(StepKinematics_SlidingSurfacePair, anent, ent); + RWStepKinematics_RWSlidingSurfacePair tool; + tool.WriteStep(SW, anent); + } + break; + case 780: + { + DeclareAndCast(StepKinematics_SlidingSurfacePairValue, anent, ent); + RWStepKinematics_RWSlidingSurfacePairValue tool; + tool.WriteStep(SW, anent); + } + break; + case 781: + { + DeclareAndCast(StepKinematics_SphericalPair, anent, ent); + RWStepKinematics_RWSphericalPair tool; + tool.WriteStep(SW, anent); + } + break; + case 782: + { + DeclareAndCast(StepKinematics_SphericalPairValue, anent, ent); + RWStepKinematics_RWSphericalPairValue tool; + tool.WriteStep(SW, anent); + } + break; + case 783: + { + DeclareAndCast(StepKinematics_SphericalPairWithPin, anent, ent); + RWStepKinematics_RWSphericalPairWithPin tool; + tool.WriteStep(SW, anent); + } + break; + case 784: + { + DeclareAndCast(StepKinematics_SphericalPairWithPinAndRange, anent, ent); + RWStepKinematics_RWSphericalPairWithPinAndRange tool; + tool.WriteStep(SW, anent); + } + break; + case 785: + { + DeclareAndCast(StepKinematics_SphericalPairWithRange, anent, ent); + RWStepKinematics_RWSphericalPairWithRange tool; + tool.WriteStep(SW, anent); + } + break; + case 786: + { + DeclareAndCast(StepKinematics_SurfacePairWithRange, anent, ent); + RWStepKinematics_RWSurfacePairWithRange tool; + tool.WriteStep(SW, anent); + } + break; + case 787: + { + DeclareAndCast(StepKinematics_UnconstrainedPair, anent, ent); + RWStepKinematics_RWUnconstrainedPair tool; + tool.WriteStep(SW, anent); + } + break; + case 788: + { + DeclareAndCast(StepKinematics_UnconstrainedPairValue, anent, ent); + RWStepKinematics_RWUnconstrainedPairValue tool; + tool.WriteStep(SW, anent); + } + break; + case 789: + { + DeclareAndCast(StepKinematics_UniversalPair, anent, ent); + RWStepKinematics_RWUniversalPair tool; + tool.WriteStep(SW, anent); + } + break; + case 790: + { + DeclareAndCast(StepKinematics_UniversalPairValue, anent, ent); + RWStepKinematics_RWUniversalPairValue tool; + tool.WriteStep(SW, anent); + } + break; + case 791: + { + DeclareAndCast(StepKinematics_UniversalPairWithRange, anent, ent); + RWStepKinematics_RWUniversalPairWithRange tool; + tool.WriteStep(SW, anent); + } + break; + case 792: + { + DeclareAndCast(StepKinematics_PairRepresentationRelationship, anent, ent); + RWStepKinematics_RWPairRepresentationRelationship tool; + tool.WriteStep(SW, anent); + } + break; + case 793: + { + DeclareAndCast(StepKinematics_RigidLinkRepresentation, anent, ent); + RWStepKinematics_RWRigidLinkRepresentation tool; + tool.WriteStep(SW, anent); + } + break; + case 794: + { + DeclareAndCast(StepKinematics_KinematicTopologyDirectedStructure, anent, ent); + RWStepKinematics_RWKinematicTopologyDirectedStructure tool; + tool.WriteStep(SW, anent); + } + break; + case 795: + { + DeclareAndCast(StepKinematics_KinematicTopologyNetworkStructure, anent, ent); + RWStepKinematics_RWKinematicTopologyNetworkStructure tool; + tool.WriteStep(SW, anent); + } + break; + case 796: + { + DeclareAndCast(StepKinematics_LinearFlexibleAndPinionPair, anent, ent); + RWStepKinematics_RWLinearFlexibleAndPinionPair tool; + tool.WriteStep(SW, anent); + } + break; + case 797: + { + DeclareAndCast(StepKinematics_LinearFlexibleAndPlanarCurvePair, anent, ent); + RWStepKinematics_RWLinearFlexibleAndPlanarCurvePair tool; + tool.WriteStep(SW, anent); + } + break; + case 798: + { + DeclareAndCast(StepKinematics_LinearFlexibleLinkRepresentation, anent, ent); + RWStepKinematics_RWLinearFlexibleLinkRepresentation tool; + tool.WriteStep(SW, anent); + } + break; + case 800: + { + DeclareAndCast(StepKinematics_ActuatedKinPairAndOrderKinPair, anent, ent); + RWStepKinematics_RWActuatedKinPairAndOrderKinPair tool; + tool.WriteStep(SW, anent); + } + break; + case 801: + { + DeclareAndCast(StepKinematics_MechanismStateRepresentation, anent, ent); + RWStepKinematics_RWMechanismStateRepresentation tool; + tool.WriteStep(SW, anent); + } + break; - case 709: - { - DeclareAndCast(StepVisual_TessellatedGeometricSet,anent,ent); - RWStepVisual_RWTessellatedGeometricSet tool; - tool.WriteStep (SW,anent); - } - break; - case 710: - { - DeclareAndCast(StepVisual_TessellatedCurveSet,anent,ent); - RWStepVisual_RWTessellatedCurveSet tool; - tool.WriteStep (SW,anent); - } - break; - case 711: - { - DeclareAndCast(StepVisual_CoordinatesList,anent,ent); - RWStepVisual_RWCoordinatesList tool; - tool.WriteStep(SW,anent); - } - break; - case 712: - { - DeclareAndCast(StepRepr_ConstructiveGeometryRepresentation,anent,ent); - RWStepRepr_RWConstructiveGeometryRepresentation tool; - tool.WriteStep(SW,anent); - } - break; - case 713: - { - DeclareAndCast(StepRepr_ConstructiveGeometryRepresentationRelationship,anent,ent); - RWStepRepr_RWConstructiveGeometryRepresentationRelationship tool; - tool.WriteStep(SW,anent); - } - break; - case 714: - { - DeclareAndCast(StepRepr_CharacterizedRepresentation, anent, ent); - RWStepRepr_RWCharacterizedRepresentation tool; - tool.WriteStep(SW, anent); - } - break; - case 715: - { - DeclareAndCast(StepVisual_CharacterizedObjAndRepresentationAndDraughtingModel, anent, ent); - RWStepVisual_RWCharacterizedObjAndRepresentationAndDraughtingModel tool; - tool.WriteStep(SW, anent); - } - break; - case 716: - { - DeclareAndCast(StepVisual_CameraModelD3MultiClipping, anent, ent); - RWStepVisual_RWCameraModelD3MultiClipping tool; - tool.WriteStep(SW, anent); - } - break; - case 717: - { - DeclareAndCast(StepVisual_CameraModelD3MultiClippingIntersection, anent, ent); - RWStepVisual_RWCameraModelD3MultiClippingIntersection tool; - tool.WriteStep(SW, anent); - } - break; - case 718: - { - DeclareAndCast(StepVisual_CameraModelD3MultiClippingUnion, anent, ent); - RWStepVisual_RWCameraModelD3MultiClippingUnion tool; - tool.WriteStep(SW, anent); - } - break; - case 719: - { - DeclareAndCast(StepVisual_AnnotationCurveOccurrenceAndGeomReprItem, anent, ent); - RWStepVisual_RWAnnotationCurveOccurrenceAndGeomReprItem tool; - tool.WriteStep(SW, anent); - } - break; - case 720: - { - DeclareAndCast(StepVisual_SurfaceStyleTransparent, anent, ent); - RWStepVisual_RWSurfaceStyleTransparent tool; - tool.WriteStep(SW, anent); - } - break; - case 721: - { - DeclareAndCast(StepVisual_SurfaceStyleReflectanceAmbient, anent, ent); - RWStepVisual_RWSurfaceStyleReflectanceAmbient tool; - tool.WriteStep(SW, anent); - } - break; - case 722: - { - DeclareAndCast(StepVisual_SurfaceStyleRendering, anent, ent); - RWStepVisual_RWSurfaceStyleRendering tool; - tool.WriteStep(SW, anent); - } - break; - case 723: - { - DeclareAndCast(StepVisual_SurfaceStyleRenderingWithProperties, anent, ent); - RWStepVisual_RWSurfaceStyleRenderingWithProperties tool; - tool.WriteStep(SW, anent); - } - break; default: return; } diff --git a/src/RWStepGeom/FILES b/src/RWStepGeom/FILES index 0798a61801..082b068beb 100755 --- a/src/RWStepGeom/FILES +++ b/src/RWStepGeom/FILES @@ -132,6 +132,8 @@ RWStepGeom_RWSeamCurve.cxx RWStepGeom_RWSeamCurve.hxx RWStepGeom_RWSphericalSurface.cxx RWStepGeom_RWSphericalSurface.hxx +RWStepGeom_RWSuParameters.cxx +RWStepGeom_RWSuParameters.hxx RWStepGeom_RWSurface.cxx RWStepGeom_RWSurface.hxx RWStepGeom_RWSurfaceCurve.cxx diff --git a/src/RWStepGeom/RWStepGeom_RWSuParameters.cxx b/src/RWStepGeom/RWStepGeom_RWSuParameters.cxx new file mode 100644 index 0000000000..b299060c49 --- /dev/null +++ b/src/RWStepGeom/RWStepGeom_RWSuParameters.cxx @@ -0,0 +1,122 @@ +// Created on : Sat May 02 12:41:14 2020 +// Created by: Irina KRYLOVA +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V3.0 +// Copyright (c) Open CASCADE 2020 +// +// This file is part of Open CASCADE Technology software library. +// +// This library is free software; you can redistribute it and/or modify it under +// the terms of the GNU Lesser General Public License version 2.1 as published +// by the Free Software Foundation, with special exception defined in the file +// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT +// distribution for complete text of the license and disclaimer of any warranty. +// +// Alternatively, this file may be used under the terms of Open CASCADE +// commercial license or contractual agreement. + +#include + +#include +#include +#include +#include +#include +#include + +//======================================================================= +//function : RWStepGeom_RWSuParameters +//purpose : +//======================================================================= + +RWStepGeom_RWSuParameters::RWStepGeom_RWSuParameters() {} + + +//======================================================================= +//function : ReadStep +//purpose : +//======================================================================= + +void RWStepGeom_RWSuParameters::ReadStep (const Handle(StepData_StepReaderData)& theData, + const Standard_Integer theNum, + Handle(Interface_Check)& theAch, + const Handle(StepGeom_SuParameters)& theEnt) const +{ + // Check number of parameters + if ( ! theData->CheckNbParams(theNum,7,theAch,"su_parameters") ) return; + + // Inherited fields of RepresentationItem + + Handle(TCollection_HAsciiString) aRepresentationItem_Name; + theData->ReadString (theNum, 1, "representation_item.name", theAch, aRepresentationItem_Name); + + // Own fields of SuParameters + + Standard_Real aA; + theData->ReadReal (theNum, 2, "a", theAch, aA); + + Standard_Real aAlpha; + theData->ReadReal (theNum, 3, "alpha", theAch, aAlpha); + + Standard_Real aB; + theData->ReadReal (theNum, 4, "b", theAch, aB); + + Standard_Real aBeta; + theData->ReadReal (theNum, 5, "beta", theAch, aBeta); + + Standard_Real aC; + theData->ReadReal (theNum, 6, "c", theAch, aC); + + Standard_Real aGamma; + theData->ReadReal (theNum, 7, "gamma", theAch, aGamma); + + // Initialize entity + theEnt->Init(aRepresentationItem_Name, + aA, + aAlpha, + aB, + aBeta, + aC, + aGamma); +} + +//======================================================================= +//function : WriteStep +//purpose : +//======================================================================= + +void RWStepGeom_RWSuParameters::WriteStep (StepData_StepWriter& theSW, + const Handle(StepGeom_SuParameters)& theEnt) const +{ + + // Own fields of RepresentationItem + + theSW.Send (theEnt->Name()); + + // Own fields of SuParameters + + theSW.Send (theEnt->A()); + + theSW.Send (theEnt->Alpha()); + + theSW.Send (theEnt->B()); + + theSW.Send (theEnt->Beta()); + + theSW.Send (theEnt->C()); + + theSW.Send (theEnt->Gamma()); +} + +//======================================================================= +//function : Share +//purpose : +//======================================================================= + +void RWStepGeom_RWSuParameters::Share (const Handle(StepGeom_SuParameters)& /*theEnt*/, + Interface_EntityIterator& /*iter*/) const +{ + + // Inherited fields of RepresentationItem + + // Own fields of SuParameters +} diff --git a/src/RWStepGeom/RWStepGeom_RWSuParameters.hxx b/src/RWStepGeom/RWStepGeom_RWSuParameters.hxx new file mode 100644 index 0000000000..0e68ea0c8d --- /dev/null +++ b/src/RWStepGeom/RWStepGeom_RWSuParameters.hxx @@ -0,0 +1,46 @@ +// Created on : Sat May 02 12:41:14 2020 +// Created by: Irina KRYLOVA +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V3.0 +// Copyright (c) Open CASCADE 2020 +// +// 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 _RWStepGeom_RWSuParameters_HeaderFile_ +#define _RWStepGeom_RWSuParameters_HeaderFile_ + +#include +#include +#include + +class StepData_StepReaderData; +class Interface_Check; +class StepData_StepWriter; +class Interface_EntityIterator; +class StepGeom_SuParameters; + +//! Read & Write tool for SuParameters +class RWStepGeom_RWSuParameters +{ +public: + + DEFINE_STANDARD_ALLOC + + Standard_EXPORT RWStepGeom_RWSuParameters(); + + Standard_EXPORT void ReadStep(const Handle(StepData_StepReaderData)& theData, const Standard_Integer theNum, Handle(Interface_Check)& theAch, const Handle(StepGeom_SuParameters)& theEnt) const; + + Standard_EXPORT void WriteStep(StepData_StepWriter& theSW, const Handle(StepGeom_SuParameters)& theEnt) const; + + Standard_EXPORT void Share(const Handle(StepGeom_SuParameters)& theEnt, Interface_EntityIterator& iter) const; + +}; +#endif // _RWStepGeom_RWSuParameters_HeaderFile_ diff --git a/src/RWStepKinematics/FILES b/src/RWStepKinematics/FILES new file mode 100644 index 0000000000..9aa1669306 --- /dev/null +++ b/src/RWStepKinematics/FILES @@ -0,0 +1,148 @@ +RWStepKinematics_RWActuatedKinematicPair.cxx +RWStepKinematics_RWActuatedKinematicPair.hxx +RWStepKinematics_RWContextDependentKinematicLinkRepresentation.cxx +RWStepKinematics_RWContextDependentKinematicLinkRepresentation.hxx +RWStepKinematics_RWCylindricalPair.cxx +RWStepKinematics_RWCylindricalPair.hxx +RWStepKinematics_RWCylindricalPairValue.cxx +RWStepKinematics_RWCylindricalPairValue.hxx +RWStepKinematics_RWCylindricalPairWithRange.cxx +RWStepKinematics_RWCylindricalPairWithRange.hxx +RWStepKinematics_RWFullyConstrainedPair.cxx +RWStepKinematics_RWFullyConstrainedPair.hxx +RWStepKinematics_RWGearPair.cxx +RWStepKinematics_RWGearPair.hxx +RWStepKinematics_RWGearPairValue.cxx +RWStepKinematics_RWGearPairValue.hxx +RWStepKinematics_RWGearPairWithRange.cxx +RWStepKinematics_RWGearPairWithRange.hxx +RWStepKinematics_RWHomokineticPair.cxx +RWStepKinematics_RWHomokineticPair.hxx +RWStepKinematics_RWActuatedKinPairAndOrderKinPair.cxx +RWStepKinematics_RWActuatedKinPairAndOrderKinPair.hxx +RWStepKinematics_RWKinematicJoint.cxx +RWStepKinematics_RWKinematicJoint.hxx +RWStepKinematics_RWKinematicLink.cxx +RWStepKinematics_RWKinematicLink.hxx +RWStepKinematics_RWKinematicLinkRepresentationAssociation.cxx +RWStepKinematics_RWKinematicLinkRepresentationAssociation.hxx +RWStepKinematics_RWKinematicPropertyMechanismRepresentation.cxx +RWStepKinematics_RWKinematicPropertyMechanismRepresentation.hxx +RWStepKinematics_RWKinematicTopologyStructure.cxx +RWStepKinematics_RWKinematicTopologyStructure.hxx +RWStepKinematics_RWLinearFlexibleAndPinionPair.cxx +RWStepKinematics_RWLinearFlexibleAndPinionPair.hxx +RWStepKinematics_RWLinearFlexibleAndPlanarCurvePair.cxx +RWStepKinematics_RWLinearFlexibleAndPlanarCurvePair.hxx +RWStepKinematics_RWLinearFlexibleLinkRepresentation.cxx +RWStepKinematics_RWLinearFlexibleLinkRepresentation.hxx +RWStepKinematics_RWLowOrderKinematicPair.cxx +RWStepKinematics_RWLowOrderKinematicPair.hxx +RWStepKinematics_RWLowOrderKinematicPairValue.cxx +RWStepKinematics_RWLowOrderKinematicPairValue.hxx +RWStepKinematics_RWLowOrderKinematicPairWithRange.cxx +RWStepKinematics_RWLowOrderKinematicPairWithRange.hxx +RWStepKinematics_RWMechanismRepresentation.cxx +RWStepKinematics_RWMechanismRepresentation.hxx +RWStepKinematics_RWMechanismStateRepresentation.cxx +RWStepKinematics_RWMechanismStateRepresentation.hxx +RWStepKinematics_RWOrientedJoint.cxx +RWStepKinematics_RWOrientedJoint.hxx +RWStepKinematics_RWPairRepresentationRelationship.cxx +RWStepKinematics_RWPairRepresentationRelationship.hxx +RWStepKinematics_RWPlanarCurvePair.cxx +RWStepKinematics_RWPlanarCurvePair.hxx +RWStepKinematics_RWPlanarCurvePairRange.cxx +RWStepKinematics_RWPlanarCurvePairRange.hxx +RWStepKinematics_RWPlanarPair.cxx +RWStepKinematics_RWPlanarPair.hxx +RWStepKinematics_RWPlanarPairValue.cxx +RWStepKinematics_RWPlanarPairValue.hxx +RWStepKinematics_RWPlanarPairWithRange.cxx +RWStepKinematics_RWPlanarPairWithRange.hxx +RWStepKinematics_RWPointOnPlanarCurvePair.cxx +RWStepKinematics_RWPointOnPlanarCurvePair.hxx +RWStepKinematics_RWPointOnPlanarCurvePairValue.cxx +RWStepKinematics_RWPointOnPlanarCurvePairValue.hxx +RWStepKinematics_RWPointOnPlanarCurvePairWithRange.cxx +RWStepKinematics_RWPointOnPlanarCurvePairWithRange.hxx +RWStepKinematics_RWPointOnSurfacePair.cxx +RWStepKinematics_RWPointOnSurfacePair.hxx +RWStepKinematics_RWPointOnSurfacePairValue.cxx +RWStepKinematics_RWPointOnSurfacePairValue.hxx +RWStepKinematics_RWPointOnSurfacePairWithRange.cxx +RWStepKinematics_RWPointOnSurfacePairWithRange.hxx +RWStepKinematics_RWPrismaticPair.cxx +RWStepKinematics_RWPrismaticPair.hxx +RWStepKinematics_RWPrismaticPairValue.cxx +RWStepKinematics_RWPrismaticPairValue.hxx +RWStepKinematics_RWPrismaticPairWithRange.cxx +RWStepKinematics_RWPrismaticPairWithRange.hxx +RWStepKinematics_RWProductDefinitionKinematics.cxx +RWStepKinematics_RWProductDefinitionKinematics.hxx +RWStepKinematics_RWProductDefinitionRelationshipKinematics.cxx +RWStepKinematics_RWProductDefinitionRelationshipKinematics.hxx +RWStepKinematics_RWRackAndPinionPair.cxx +RWStepKinematics_RWRackAndPinionPair.hxx +RWStepKinematics_RWRackAndPinionPairValue.cxx +RWStepKinematics_RWRackAndPinionPairValue.hxx +RWStepKinematics_RWRackAndPinionPairWithRange.cxx +RWStepKinematics_RWRackAndPinionPairWithRange.hxx +RWStepKinematics_RWRevolutePair.cxx +RWStepKinematics_RWRevolutePair.hxx +RWStepKinematics_RWRevolutePairValue.cxx +RWStepKinematics_RWRevolutePairValue.hxx +RWStepKinematics_RWRevolutePairWithRange.cxx +RWStepKinematics_RWRevolutePairWithRange.hxx +RWStepKinematics_RWRigidLinkRepresentation.cxx +RWStepKinematics_RWRigidLinkRepresentation.hxx +RWStepKinematics_RWRollingCurvePair.cxx +RWStepKinematics_RWRollingCurvePair.hxx +RWStepKinematics_RWRollingCurvePairValue.cxx +RWStepKinematics_RWRollingCurvePairValue.hxx +RWStepKinematics_RWRollingSurfacePair.cxx +RWStepKinematics_RWRollingSurfacePair.hxx +RWStepKinematics_RWRollingSurfacePairValue.cxx +RWStepKinematics_RWRollingSurfacePairValue.hxx +RWStepKinematics_RWRotationAboutDirection.cxx +RWStepKinematics_RWRotationAboutDirection.hxx +RWStepKinematics_RWScrewPair.cxx +RWStepKinematics_RWScrewPair.hxx +RWStepKinematics_RWScrewPairValue.cxx +RWStepKinematics_RWScrewPairValue.hxx +RWStepKinematics_RWScrewPairWithRange.cxx +RWStepKinematics_RWScrewPairWithRange.hxx +RWStepKinematics_RWSlidingCurvePair.cxx +RWStepKinematics_RWSlidingCurvePair.hxx +RWStepKinematics_RWSlidingCurvePairValue.cxx +RWStepKinematics_RWSlidingCurvePairValue.hxx +RWStepKinematics_RWSlidingSurfacePair.cxx +RWStepKinematics_RWSlidingSurfacePair.hxx +RWStepKinematics_RWSlidingSurfacePairValue.cxx +RWStepKinematics_RWSlidingSurfacePairValue.hxx +RWStepKinematics_RWSphericalPair.cxx +RWStepKinematics_RWSphericalPair.hxx +RWStepKinematics_RWSphericalPairValue.cxx +RWStepKinematics_RWSphericalPairValue.hxx +RWStepKinematics_RWSphericalPairWithPin.cxx +RWStepKinematics_RWSphericalPairWithPin.hxx +RWStepKinematics_RWSphericalPairWithPinAndRange.cxx +RWStepKinematics_RWSphericalPairWithPinAndRange.hxx +RWStepKinematics_RWSphericalPairWithRange.cxx +RWStepKinematics_RWSphericalPairWithRange.hxx +RWStepKinematics_RWSurfacePairWithRange.cxx +RWStepKinematics_RWSurfacePairWithRange.hxx +RWStepKinematics_RWKinematicTopologyDirectedStructure.cxx +RWStepKinematics_RWKinematicTopologyDirectedStructure.hxx +RWStepKinematics_RWKinematicTopologyNetworkStructure.cxx +RWStepKinematics_RWKinematicTopologyNetworkStructure.hxx +RWStepKinematics_RWUnconstrainedPair.cxx +RWStepKinematics_RWUnconstrainedPair.hxx +RWStepKinematics_RWUnconstrainedPairValue.cxx +RWStepKinematics_RWUnconstrainedPairValue.hxx +RWStepKinematics_RWUniversalPair.cxx +RWStepKinematics_RWUniversalPair.hxx +RWStepKinematics_RWUniversalPairValue.cxx +RWStepKinematics_RWUniversalPairValue.hxx +RWStepKinematics_RWUniversalPairWithRange.cxx +RWStepKinematics_RWUniversalPairWithRange.hxx \ No newline at end of file diff --git a/src/RWStepKinematics/RWStepKinematics_RWActuatedKinPairAndOrderKinPair.cxx b/src/RWStepKinematics/RWStepKinematics_RWActuatedKinPairAndOrderKinPair.cxx new file mode 100644 index 0000000000..54cbc333d5 --- /dev/null +++ b/src/RWStepKinematics/RWStepKinematics_RWActuatedKinPairAndOrderKinPair.cxx @@ -0,0 +1,2309 @@ +// Created on: 2020-05-26 +// Created by: PASUKHIN DMITRY +// Copyright (c) 2020 OPEN CASCADE SAS +// +// This file is part of Open CASCADE Technology software library. +// +// This library is free software; you can redistribute it and/or modify it under +// the terms of the GNU Lesser General Public License version 2.1 as published +// by the Free Software Foundation, with special exception defined in the file +// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT +// distribution for complete text of the license and disclaimer of any warranty. +// +// Alternatively, this file may be used under the terms of Open CASCADE +// commercial license or contractual agreement. + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +//======================================================================= +//function : RWStepDimTol_RWGeoTolAndGeoTolWthMod +//purpose : +//======================================================================= +RWStepKinematics_RWActuatedKinPairAndOrderKinPair::RWStepKinematics_RWActuatedKinPairAndOrderKinPair() +{ +} + + +//======================================================================= +//function : ReadStep +//purpose : +//======================================================================= +void RWStepKinematics_RWActuatedKinPairAndOrderKinPair::ReadStep +(const Handle(StepData_StepReaderData)& theData, + const Standard_Integer num0, Handle(Interface_Check)& theArch, + const Handle(StepKinematics_ActuatedKinPairAndOrderKinPair)& theEnt) const +{ + Standard_Integer theNum = 0;//num0; + theData->NamedForComplex("ACTUATED_KINEMATIC_PAIR", "ACKNPR", num0, theNum, theArch); + if (!theData->CheckNbParams(theNum, 6, theArch, "kinematic actuated_kinematic_pair")) return; + // Own fields of ActuatedKinematicPair + Handle(StepKinematics_ActuatedKinematicPair) anActuatedKinematicPair = + new StepKinematics_ActuatedKinematicPair; + StepKinematics_ActuatedDirection aTX = StepKinematics_adNotActuated; + Standard_Boolean hasTX = Standard_True; + if (theData->IsParamDefined(theNum, 1)) + { + if (theData->ParamType(theNum, 1) == Interface_ParamEnum) + { + Standard_CString text = theData->ParamCValue(theNum, 1); + if (strcmp(text, ".BIDIRECTIONAL.")) aTX = StepKinematics_adBidirectional; + else if (strcmp(text, ".POSITIVE_ONLY.")) aTX = StepKinematics_adPositiveOnly; + else if (strcmp(text, ".NEGATIVE_ONLY.")) aTX = StepKinematics_adNegativeOnly; + else if (strcmp(text, ".NOT_ACTUATED.")) aTX = StepKinematics_adNotActuated; + else theArch->AddFail("Parameter #1 (t_x) has not allowed value"); + } + else theArch->AddFail("Parameter #1 (t_x) is not enumeration"); + } + else + { + hasTX = Standard_False; + } + + StepKinematics_ActuatedDirection aTY = StepKinematics_adNotActuated; + Standard_Boolean hasTY = Standard_True; + if (theData->IsParamDefined(theNum, 2)) + { + if (theData->ParamType(theNum, 2) == Interface_ParamEnum) + { + Standard_CString text = theData->ParamCValue(theNum, 8); + if (strcmp(text, ".BIDIRECTIONAL.")) aTY = StepKinematics_adBidirectional; + else if (strcmp(text, ".POSITIVE_ONLY.")) aTY = StepKinematics_adPositiveOnly; + else if (strcmp(text, ".NEGATIVE_ONLY.")) aTY = StepKinematics_adNegativeOnly; + else if (strcmp(text, ".NOT_ACTUATED.")) aTY = StepKinematics_adNotActuated; + else theArch->AddFail("Parameter #2 (t_y) has not allowed value"); + } + else theArch->AddFail("Parameter #2 (t_y) is not enumeration"); + } + else + { + hasTY = Standard_False; + } + + StepKinematics_ActuatedDirection aTZ = StepKinematics_adNotActuated; + Standard_Boolean hasTZ = Standard_True; + if (theData->IsParamDefined(theNum, 3)) + { + if (theData->ParamType(theNum, 3) == Interface_ParamEnum) + { + Standard_CString text = theData->ParamCValue(theNum, 9); + if (strcmp(text, ".BIDIRECTIONAL.")) aTZ = StepKinematics_adBidirectional; + else if (strcmp(text, ".POSITIVE_ONLY.")) aTZ = StepKinematics_adPositiveOnly; + else if (strcmp(text, ".NEGATIVE_ONLY.")) aTZ = StepKinematics_adNegativeOnly; + else if (strcmp(text, ".NOT_ACTUATED.")) aTZ = StepKinematics_adNotActuated; + else theArch->AddFail("Parameter #3 (t_z) has not allowed value"); + } + else theArch->AddFail("Parameter #3 (t_z) is not enumeration"); + } + else + { + hasTZ = Standard_False; + } + + StepKinematics_ActuatedDirection aRX = StepKinematics_adNotActuated; + Standard_Boolean hasRX = Standard_True; + if (theData->IsParamDefined(theNum, 4)) + { + if (theData->ParamType(theNum, 4) == Interface_ParamEnum) + { + Standard_CString text = theData->ParamCValue(theNum, 10); + if (strcmp(text, ".BIDIRECTIONAL.")) aRX = StepKinematics_adBidirectional; + else if (strcmp(text, ".POSITIVE_ONLY.")) aRX = StepKinematics_adPositiveOnly; + else if (strcmp(text, ".NEGATIVE_ONLY.")) aRX = StepKinematics_adNegativeOnly; + else if (strcmp(text, ".NOT_ACTUATED.")) aRX = StepKinematics_adNotActuated; + else theArch->AddFail("Parameter #14 (r_x) has not allowed value"); + } + else theArch->AddFail("Parameter #14 (r_x) is not enumeration"); + } + else + { + hasRX = Standard_False; + } + + StepKinematics_ActuatedDirection aRY = StepKinematics_adNotActuated; + Standard_Boolean hasRY = Standard_True; + if (theData->IsParamDefined(theNum, 5)) + { + if (theData->ParamType(theNum, 5) == Interface_ParamEnum) + { + Standard_CString text = theData->ParamCValue(theNum, 11); + if (strcmp(text, ".BIDIRECTIONAL.")) aRY = StepKinematics_adBidirectional; + else if (strcmp(text, ".POSITIVE_ONLY.")) aRY = StepKinematics_adPositiveOnly; + else if (strcmp(text, ".NEGATIVE_ONLY.")) aRY = StepKinematics_adNegativeOnly; + else if (strcmp(text, ".NOT_ACTUATED.")) aRY = StepKinematics_adNotActuated; + else theArch->AddFail("Parameter #5 (r_y) has not allowed value"); + } + else theArch->AddFail("Parameter #5 (r_y) is not enumeration"); + } + else + { + hasRY = Standard_False; + } + + StepKinematics_ActuatedDirection aRZ = StepKinematics_adNotActuated; + Standard_Boolean hasRZ = Standard_True; + if (theData->IsParamDefined(theNum, 6)) + { + if (theData->ParamType(theNum, 6) == Interface_ParamEnum) + { + Standard_CString text = theData->ParamCValue(theNum, 12); + if (strcmp(text, ".BIDIRECTIONAL.")) aRZ = StepKinematics_adBidirectional; + else if (strcmp(text, ".POSITIVE_ONLY.")) aRZ = StepKinematics_adPositiveOnly; + else if (strcmp(text, ".NEGATIVE_ONLY.")) aRZ = StepKinematics_adNegativeOnly; + else if (strcmp(text, ".NOT_ACTUATED.")) aRZ = StepKinematics_adNotActuated; + else theArch->AddFail("Parameter #6 (r_z) has not allowed value"); + } + else theArch->AddFail("Parameter #6 (r_z) is not enumeration"); + } + else + { + hasRZ = Standard_False; + } + + Handle(TCollection_HAsciiString) aRepresentationItem_Name; + theData->NamedForComplex("GEOMETRIC_REPRESENTATION_ITEM", "GMRPIT", num0, theNum, theArch); + //geometricrepresentation_item is non-defined + + theData->NamedForComplex("ITEM_DEFINED_TRANSFORMATION", "ITDFTR", num0, theNum, theArch); + // Own fields of item_defined_transformation + + Handle(TCollection_HAsciiString) aItemDefinedTransformation_Name; + if (strcmp(theData->ParamCValue(theNum, 1), "*")) + theData->ReadString(theNum, 1, "item_defined_transformation.name", theArch, aItemDefinedTransformation_Name); + + Handle(TCollection_HAsciiString) aItemDefinedTransformation_Description; + Standard_Boolean hasItemDefinedTransformation_Description = Standard_True; + if (theData->IsParamDefined(theNum, 2)) + { + theData->ReadString(theNum, 2, "item_defined_transformation.description", theArch, aItemDefinedTransformation_Description); + } + else + { + hasItemDefinedTransformation_Description = Standard_False; + aItemDefinedTransformation_Description.Nullify(); + } + + Handle(StepRepr_RepresentationItem) aItemDefinedTransformation_TransformItem1; + theData->ReadEntity(theNum, 3, "ITEM_DEFINED_TRANSFORMATION", theArch, STANDARD_TYPE(StepRepr_RepresentationItem), aItemDefinedTransformation_TransformItem1); + + Handle(StepRepr_RepresentationItem) aItemDefinedTransformation_TransformItem2; + theData->ReadEntity(theNum, 4, "ITEM_DEFINED_TRANSFORMATION", theArch, STANDARD_TYPE(StepRepr_RepresentationItem), aItemDefinedTransformation_TransformItem2); + + theData->NamedForComplex("KINEMATIC_PAIR", "KNMPR", num0, theNum, theArch); + + // Inherited fields of KinematicPair + + Handle(StepKinematics_KinematicJoint) aKinematicPair_Joint; + theData->ReadEntity(theNum, 1, "kinematic_pair.joint", theArch, STANDARD_TYPE(StepKinematics_KinematicJoint), aKinematicPair_Joint); + + //Select pair supertype + theNum = theData->NextForComplex(theNum); + Standard_CString aPairSuperType = theData->CType(theNum); + Handle(StepKinematics_KinematicPair) aKinematicPair; + if (!strcmp(aPairSuperType, "LOW_ORDER_KINEMATIC_PAIR")) + { + // Own fields of low_order_kinematic_pair + Standard_Boolean aLowOrderKinematicPair_TX = Standard_True; + Standard_Boolean aLowOrderKinematicPair_TY = Standard_True; + Standard_Boolean aLowOrderKinematicPair_TZ = Standard_True; + Standard_Boolean aLowOrderKinematicPair_RX = Standard_True; + Standard_Boolean aLowOrderKinematicPair_RY = Standard_True; + Standard_Boolean aLowOrderKinematicPair_RZ = Standard_True; + if (theData->CheckNbParams(theNum, 6, theArch, "LOW_ORDER_KINEMATIC_PAIR")) + { + if (strcmp(theData->ParamCValue(theNum, 1), "*")) + theData->ReadBoolean(theNum, 1, "low_order_kinematic_pair.t_x", theArch, aLowOrderKinematicPair_TX); + if (strcmp(theData->ParamCValue(theNum, 2), "*")) + theData->ReadBoolean(theNum, 2, "low_order_kinematic_pair.t_y", theArch, aLowOrderKinematicPair_TY); + if (strcmp(theData->ParamCValue(theNum, 3), "*")) + theData->ReadBoolean(theNum, 3, "low_order_kinematic_pair.t_z", theArch, aLowOrderKinematicPair_TZ); + if (strcmp(theData->ParamCValue(theNum, 4), "*")) + theData->ReadBoolean(theNum, 4, "low_order_kinematic_pair.r_x", theArch, aLowOrderKinematicPair_RX); + if (strcmp(theData->ParamCValue(theNum, 5), "*")) + theData->ReadBoolean(theNum, 5, "low_order_kinematic_pair.r_y", theArch, aLowOrderKinematicPair_RY); + if (strcmp(theData->ParamCValue(theNum, 6), "*")) + theData->ReadBoolean(theNum, 6, "low_order_kinematic_pair.r_z", theArch, aLowOrderKinematicPair_RZ); + } + else theArch->AddFail("The supertype of kinematic pair is not supported"); + aKinematicPair = new StepKinematics_KinematicPair; + aKinematicPair->Init(aRepresentationItem_Name, + aItemDefinedTransformation_Name, hasItemDefinedTransformation_Description, + aItemDefinedTransformation_Description, + aItemDefinedTransformation_TransformItem1, + aItemDefinedTransformation_TransformItem2, + aKinematicPair_Joint); + theNum = theData->NextForComplex(theNum); + Standard_CString aPairtype = theData->CType(theNum); + if (!strcmp(aPairtype, "REVOLUTE_PAIR")) + { + // Own fields of revolute_pair is non-defined + + if (theData->NamedForComplex("REVOLUTE_PAIR_WITH_RANGE", "RPWR", num0, theNum, theArch)) + { + if (theData->CheckNbParams(theNum, 2, theArch, "REVOLUTE_PAIR_WITH_RANGE")) + { + // Own fields of revolute_pair_with_range + aKinematicPair = new StepKinematics_RevolutePairWithRange; + Standard_Real aLowerLimitActualRotation; + Standard_Boolean hasLowerLimitActualRotation = Standard_True; + if (theData->IsParamDefined(theNum, 1)) + { + theData->ReadReal(theNum, 1, "lower_limit_actual_rotation", theArch, aLowerLimitActualRotation); + } + else + { + hasLowerLimitActualRotation = Standard_False; + aLowerLimitActualRotation = 0; + } + + Standard_Real aUpperLimitActualRotation; + Standard_Boolean hasUpperLimitActualRotation = Standard_True; + if (theData->IsParamDefined(theNum, 2)) + { + theData->ReadReal(theNum, 2, "upper_limit_actual_rotation", theArch, aUpperLimitActualRotation); + } + else + { + hasUpperLimitActualRotation = Standard_False; + aUpperLimitActualRotation = 0; + } + Handle(StepKinematics_RevolutePairWithRange) aLocalPair = Handle(StepKinematics_RevolutePairWithRange)::DownCast(aKinematicPair); + // Initialize kinematic_pair + aLocalPair->Init(aRepresentationItem_Name, + aItemDefinedTransformation_Name, + hasItemDefinedTransformation_Description, + aItemDefinedTransformation_Description, + aItemDefinedTransformation_TransformItem1, + aItemDefinedTransformation_TransformItem2, + aKinematicPair_Joint, + aLowOrderKinematicPair_TX, + aLowOrderKinematicPair_TY, + aLowOrderKinematicPair_TZ, + aLowOrderKinematicPair_RX, + aLowOrderKinematicPair_RY, + aLowOrderKinematicPair_RZ, + hasLowerLimitActualRotation, + aLowerLimitActualRotation, + hasUpperLimitActualRotation, + aUpperLimitActualRotation); + } + else // revolute_pair_with_range hasn't params + { + aKinematicPair = new StepKinematics_RevolutePair; + Handle(StepKinematics_RevolutePair) aLocalPair = Handle(StepKinematics_RevolutePair)::DownCast(aKinematicPair); + // Initialize kinematic_pair + aLocalPair->Init(aRepresentationItem_Name, + aItemDefinedTransformation_Name, + hasItemDefinedTransformation_Description, + aItemDefinedTransformation_Description, + aItemDefinedTransformation_TransformItem1, + aItemDefinedTransformation_TransformItem2, + aKinematicPair_Joint, + aLowOrderKinematicPair_TX, + aLowOrderKinematicPair_TY, + aLowOrderKinematicPair_TZ, + aLowOrderKinematicPair_RX, + aLowOrderKinematicPair_RY, + aLowOrderKinematicPair_RZ); + } + } + } + else if (!strcmp(aPairtype, "CYLINDRICAL_PAIR")) + { + // Own fields of cylindrical_pair is non-defined + + if (theData->NamedForComplex("CYLINDRICAL_PAIR_WITH_RANGE", "CPW0", num0, theNum, theArch)) + { + if (theData->CheckNbParams(theNum, 4, theArch, "CYLINDRICAL_PAIR_WITH_RANGE")) + { + // Own fields of cylindrical_pair_with_range + aKinematicPair = new StepKinematics_CylindricalPairWithRange; + + Standard_Real aLowerLimitActualTranslation; + Standard_Boolean hasLowerLimitActualTranslation = Standard_True; + if (theData->IsParamDefined(theNum, 1)) + { + theData->ReadReal(theNum, 1, "lower_limit_actual_translation", theArch, aLowerLimitActualTranslation); + } + else + { + hasLowerLimitActualTranslation = Standard_False; + aLowerLimitActualTranslation = 0; + } + + Standard_Real aUpperLimitActualTranslation; + Standard_Boolean hasUpperLimitActualTranslation = Standard_True; + if (theData->IsParamDefined(theNum, 2)) + { + theData->ReadReal(theNum, 2, "upper_limit_actual_translation", theArch, aUpperLimitActualTranslation); + } + else + { + hasUpperLimitActualTranslation = Standard_False; + aUpperLimitActualTranslation = 0; + } + + Standard_Real aLowerLimitActualRotation; + Standard_Boolean hasLowerLimitActualRotation = Standard_True; + if (theData->IsParamDefined(theNum, 3)) + { + theData->ReadReal(theNum, 3, "lower_limit_actual_rotation", theArch, aLowerLimitActualRotation); + } + else + { + hasLowerLimitActualRotation = Standard_False; + aLowerLimitActualRotation = 0; + } + + Standard_Real aUpperLimitActualRotation; + Standard_Boolean hasUpperLimitActualRotation = Standard_True; + if (theData->IsParamDefined(theNum, 4)) + { + theData->ReadReal(theNum, 4, "upper_limit_actual_rotation", theArch, aUpperLimitActualRotation); + } + else + { + hasUpperLimitActualRotation = Standard_False; + aUpperLimitActualRotation = 0; + } + Handle(StepKinematics_CylindricalPairWithRange) aLocalPair = Handle(StepKinematics_CylindricalPairWithRange)::DownCast(aKinematicPair); + // Initialize kinematic_pair + aLocalPair->Init(aRepresentationItem_Name, + aItemDefinedTransformation_Name, + hasItemDefinedTransformation_Description, + aItemDefinedTransformation_Description, + aItemDefinedTransformation_TransformItem1, + aItemDefinedTransformation_TransformItem2, + aKinematicPair_Joint, + aLowOrderKinematicPair_TX, + aLowOrderKinematicPair_TY, + aLowOrderKinematicPair_TZ, + aLowOrderKinematicPair_RX, + aLowOrderKinematicPair_RY, + aLowOrderKinematicPair_RZ, + hasLowerLimitActualTranslation, + aLowerLimitActualTranslation, + hasUpperLimitActualTranslation, + aUpperLimitActualTranslation, + hasLowerLimitActualRotation, + aLowerLimitActualRotation, + hasUpperLimitActualRotation, + aUpperLimitActualRotation); + } + else // cylindrical_pair_with_range hasn't params + { + aKinematicPair = new StepKinematics_CylindricalPair; + Handle(StepKinematics_CylindricalPair) aLocalPair = Handle(StepKinematics_CylindricalPair)::DownCast(aKinematicPair); + // Initialize kinematic_pair + aLocalPair->Init(aRepresentationItem_Name, + aItemDefinedTransformation_Name, + hasItemDefinedTransformation_Description, + aItemDefinedTransformation_Description, + aItemDefinedTransformation_TransformItem1, + aItemDefinedTransformation_TransformItem2, + aKinematicPair_Joint, + aLowOrderKinematicPair_TX, + aLowOrderKinematicPair_TY, + aLowOrderKinematicPair_TZ, + aLowOrderKinematicPair_RX, + aLowOrderKinematicPair_RY, + aLowOrderKinematicPair_RZ); + } + } + } + else if (!strcmp(aPairtype, "SPHERICAL_PAIR")) + { + // Own fields of cylindrical_pair is non-defined + + if (theData->NamedForComplex("SPHERICAL_PAIR_WITH_RANGE", "SPW0", num0, theNum, theArch)) + { + if (theData->CheckNbParams(theNum, 6, theArch, "SPHERICAL_PAIR_WITH_RANGE")) + { + // Own fields of spherical_pair_with_range + aKinematicPair = new StepKinematics_SphericalPairWithRange; + + Standard_Real aLowerLimitYaw; + Standard_Boolean hasLowerLimitYaw = Standard_True; + if (theData->IsParamDefined(theNum, 1)) + { + theData->ReadReal(theNum, 1, "lower_limit_yaw", theArch, aLowerLimitYaw); + } + else + { + hasLowerLimitYaw = Standard_False; + aLowerLimitYaw = 0; + } + + Standard_Real aUpperLimitYaw; + Standard_Boolean hasUpperLimitYaw = Standard_True; + if (theData->IsParamDefined(theNum, 2)) + { + theData->ReadReal(theNum, 2, "upper_limit_yaw", theArch, aUpperLimitYaw); + } + else + { + hasUpperLimitYaw = Standard_False; + aUpperLimitYaw = 0; + } + + Standard_Real aLowerLimitPitch; + Standard_Boolean hasLowerLimitPitch = Standard_True; + if (theData->IsParamDefined(theNum, 3)) + { + theData->ReadReal(theNum, 3, "lower_limit_pitch", theArch, aLowerLimitPitch); + } + else + { + hasLowerLimitPitch = Standard_False; + aLowerLimitPitch = 0; + } + + Standard_Real aUpperLimitPitch; + Standard_Boolean hasUpperLimitPitch = Standard_True; + if (theData->IsParamDefined(theNum, 4)) + { + theData->ReadReal(theNum, 4, "upper_limit_pitch", theArch, aUpperLimitPitch); + } + else + { + hasUpperLimitPitch = Standard_False; + aUpperLimitPitch = 0; + } + + Standard_Real aLowerLimitRoll; + Standard_Boolean hasLowerLimitRoll = Standard_True; + if (theData->IsParamDefined(theNum, 5)) + { + theData->ReadReal(theNum, 5, "lower_limit_roll", theArch, aLowerLimitRoll); + } + else + { + hasLowerLimitRoll = Standard_False; + aLowerLimitRoll = 0; + } + + Standard_Real aUpperLimitRoll; + Standard_Boolean hasUpperLimitRoll = Standard_True; + if (theData->IsParamDefined(theNum, 6)) + { + theData->ReadReal(theNum, 6, "upper_limit_roll", theArch, aUpperLimitRoll); + } + else + { + hasUpperLimitRoll = Standard_False; + aUpperLimitRoll = 0; + } + Handle(StepKinematics_SphericalPairWithRange) aLocalPair = Handle(StepKinematics_SphericalPairWithRange)::DownCast(aKinematicPair); + // Initialize kinematic_pair + aLocalPair->Init(aRepresentationItem_Name, + aItemDefinedTransformation_Name, + hasItemDefinedTransformation_Description, + aItemDefinedTransformation_Description, + aItemDefinedTransformation_TransformItem1, + aItemDefinedTransformation_TransformItem2, + aKinematicPair_Joint, + aLowOrderKinematicPair_TX, + aLowOrderKinematicPair_TY, + aLowOrderKinematicPair_TZ, + aLowOrderKinematicPair_RX, + aLowOrderKinematicPair_RY, + aLowOrderKinematicPair_RZ, + hasLowerLimitYaw, + aLowerLimitYaw, + hasUpperLimitYaw, + aUpperLimitYaw, + hasLowerLimitPitch, + aLowerLimitPitch, + hasUpperLimitPitch, + aUpperLimitPitch, + hasLowerLimitRoll, + aLowerLimitRoll, + hasUpperLimitRoll, + aUpperLimitRoll); + } + else // spherical_pair_with_range hasn't params + { + aKinematicPair = new StepKinematics_SphericalPair; + Handle(StepKinematics_SphericalPair) aLocalPair = Handle(StepKinematics_SphericalPair)::DownCast(aKinematicPair); + // Initialize kinematic_pair + aLocalPair->Init(aRepresentationItem_Name, + aItemDefinedTransformation_Name, + hasItemDefinedTransformation_Description, + aItemDefinedTransformation_Description, + aItemDefinedTransformation_TransformItem1, + aItemDefinedTransformation_TransformItem2, + aKinematicPair_Joint, + aLowOrderKinematicPair_TX, + aLowOrderKinematicPair_TY, + aLowOrderKinematicPair_TZ, + aLowOrderKinematicPair_RX, + aLowOrderKinematicPair_RY, + aLowOrderKinematicPair_RZ); + } + } + } + else if (!strcmp(aPairtype, "SPHERICAL_PAIR_WITH_PIN")) + { + // Own fields of spherical_pair_with_pin is non-defined + + if (theData->NamedForComplex("SPHERICAL_PAIR_WITH_PIN_AND_RANGE", "SPWPAR", num0, theNum, theArch)) + { + if (theData->CheckNbParams(theNum, 4, theArch, "SPHERICAL_PAIR_WITH_PIN_AND_RANGE")) + { + // Own fields of spherical_pair_with_pin_and_range + aKinematicPair = new StepKinematics_SphericalPairWithPinAndRange; + + + Standard_Real aLowerLimitYaw; + Standard_Boolean hasLowerLimitYaw = Standard_True; + if (theData->IsParamDefined(theNum, 1)) + { + theData->ReadReal(theNum, 1, "lower_limit_yaw", theArch, aLowerLimitYaw); + } + else + { + hasLowerLimitYaw = Standard_False; + aLowerLimitYaw = 0; + } + + Standard_Real aUpperLimitYaw; + Standard_Boolean hasUpperLimitYaw = Standard_True; + if (theData->IsParamDefined(theNum, 2)) + { + theData->ReadReal(theNum, 2, "upper_limit_yaw", theArch, aUpperLimitYaw); + } + else + { + hasUpperLimitYaw = Standard_False; + aUpperLimitYaw = 0; + } + + Standard_Real aLowerLimitRoll; + Standard_Boolean hasLowerLimitRoll = Standard_True; + if (theData->IsParamDefined(theNum, 3)) + { + theData->ReadReal(theNum, 3, "lower_limit_roll", theArch, aLowerLimitRoll); + } + else + { + hasLowerLimitRoll = Standard_False; + aLowerLimitRoll = 0; + } + + Standard_Real aUpperLimitRoll; + Standard_Boolean hasUpperLimitRoll = Standard_True; + if (theData->IsParamDefined(theNum, 4)) + { + theData->ReadReal(theNum, 4, "upper_limit_roll", theArch, aUpperLimitRoll); + } + else + { + hasUpperLimitRoll = Standard_False; + aUpperLimitRoll = 0; + } + Handle(StepKinematics_SphericalPairWithPinAndRange) aLocalPair = Handle(StepKinematics_SphericalPairWithPinAndRange)::DownCast(aKinematicPair); + // Initialize kinematic_pair + aLocalPair->Init(aRepresentationItem_Name, + aItemDefinedTransformation_Name, + hasItemDefinedTransformation_Description, + aItemDefinedTransformation_Description, + aItemDefinedTransformation_TransformItem1, + aItemDefinedTransformation_TransformItem2, + aKinematicPair_Joint, + aLowOrderKinematicPair_TX, + aLowOrderKinematicPair_TY, + aLowOrderKinematicPair_TZ, + aLowOrderKinematicPair_RX, + aLowOrderKinematicPair_RY, + aLowOrderKinematicPair_RZ, + hasLowerLimitYaw, + aLowerLimitYaw, + hasUpperLimitYaw, + aUpperLimitYaw, + hasLowerLimitRoll, + aLowerLimitRoll, + hasUpperLimitRoll, + aUpperLimitRoll); + } + else // spherical_pair_with_pin_and_range hasn't params + { + aKinematicPair = new StepKinematics_SphericalPairWithPin; + Handle(StepKinematics_SphericalPairWithPin) aLocalPair = Handle(StepKinematics_SphericalPairWithPin)::DownCast(aKinematicPair); + // Initialize kinematic_pair + aLocalPair->Init(aRepresentationItem_Name, + aItemDefinedTransformation_Name, + hasItemDefinedTransformation_Description, + aItemDefinedTransformation_Description, + aItemDefinedTransformation_TransformItem1, + aItemDefinedTransformation_TransformItem2, + aKinematicPair_Joint, + aLowOrderKinematicPair_TX, + aLowOrderKinematicPair_TY, + aLowOrderKinematicPair_TZ, + aLowOrderKinematicPair_RX, + aLowOrderKinematicPair_RY, + aLowOrderKinematicPair_RZ); + } + } + else theArch->AddFail("The type of kinematic pair with range is not supported"); + } + else if (!strcmp(aPairtype, "PRISMATIC_PAIR")) + { + // Own fields of prismatic_pair is non-defined + + if (theData->NamedForComplex("PRISMATIC_PAIR_WITH_RANGE", "PPW0", num0, theNum, theArch)) + { + if (theData->CheckNbParams(theNum, 2, theArch, "PRISMATIC_PAIR_WITH_RANGE")) + { + aKinematicPair = new StepKinematics_PrismaticPairWithRange; + // Own fields of prismatic_pair_with_range + + Standard_Real aLowerLimitActualTranslation; + Standard_Boolean hasLowerLimitActualTranslation = Standard_True; + if (theData->IsParamDefined(theNum, 1)) + { + theData->ReadReal(theNum, 1, "lower_limit_actual_translation", theArch, aLowerLimitActualTranslation); + } + else + { + hasLowerLimitActualTranslation = Standard_False; + aLowerLimitActualTranslation = 0; + } + + Standard_Real aUpperLimitActualTranslation; + Standard_Boolean hasUpperLimitActualTranslation = Standard_True; + if (theData->IsParamDefined(theNum, 2)) + { + theData->ReadReal(theNum, 2, "upper_limit_actual_translation", theArch, aUpperLimitActualTranslation); + } + else + { + hasUpperLimitActualTranslation = Standard_False; + aUpperLimitActualTranslation = 0; + } + Handle(StepKinematics_PrismaticPairWithRange) aLocalPair = Handle(StepKinematics_PrismaticPairWithRange)::DownCast(aKinematicPair); + // Initialize kinematic_pair + aLocalPair->Init(aRepresentationItem_Name, + aItemDefinedTransformation_Name, + hasItemDefinedTransformation_Description, + aItemDefinedTransformation_Description, + aItemDefinedTransformation_TransformItem1, + aItemDefinedTransformation_TransformItem2, + aKinematicPair_Joint, + aLowOrderKinematicPair_TX, + aLowOrderKinematicPair_TY, + aLowOrderKinematicPair_TZ, + aLowOrderKinematicPair_RX, + aLowOrderKinematicPair_RY, + aLowOrderKinematicPair_RZ, + hasLowerLimitActualTranslation, + aLowerLimitActualTranslation, + hasUpperLimitActualTranslation, + aUpperLimitActualTranslation); + } + else // prismatic_pair_with_range hasn't params + { + aKinematicPair = new StepKinematics_PrismaticPair; + Handle(StepKinematics_PrismaticPair) aLocalPair = Handle(StepKinematics_PrismaticPair)::DownCast(aKinematicPair); + // Initialize kinematic_pair + aLocalPair->Init(aRepresentationItem_Name, + aItemDefinedTransformation_Name, + hasItemDefinedTransformation_Description, + aItemDefinedTransformation_Description, + aItemDefinedTransformation_TransformItem1, + aItemDefinedTransformation_TransformItem2, + aKinematicPair_Joint, + aLowOrderKinematicPair_TX, + aLowOrderKinematicPair_TY, + aLowOrderKinematicPair_TZ, + aLowOrderKinematicPair_RX, + aLowOrderKinematicPair_RY, + aLowOrderKinematicPair_RZ); + } + } + } + else if (!strcmp(aPairtype, "UNIVERSAL_PAIR")) + { + // Own fields of universal_pair + + aKinematicPair = new StepKinematics_UniversalPair; + Standard_Real aInputSkewAngle; + Standard_Boolean hasInputSkewAngle = Standard_True; + if (theData->IsParamDefined(theNum, 1)) + { + theData->ReadReal(theNum, 1, "input_skew_angle", theArch, aInputSkewAngle); + } + else + { + hasInputSkewAngle = Standard_False; + aInputSkewAngle = 0; + } + + if (theData->NamedForComplex("UNIVERSAL_PAIR_WITH_RANGE", "UPWR", num0, theNum, theArch)) + { + if (theData->CheckNbParams(theNum, 4, theArch, "UNIVERSAL_PAIR_WITH_RANGE")) + { + // Own fields of universal_pair_with_range + + Standard_Real aLowerLimitFirstRotation; + Standard_Boolean hasLowerLimitFirstRotation = Standard_True; + if (theData->IsParamDefined(theNum, 1)) + { + theData->ReadReal(theNum, 1, "lower_limit_first_rotation", theArch, aLowerLimitFirstRotation); + } + else + { + hasLowerLimitFirstRotation = Standard_False; + aLowerLimitFirstRotation = 0; + } + + Standard_Real aUpperLimitFirstRotation; + Standard_Boolean hasUpperLimitFirstRotation = Standard_True; + if (theData->IsParamDefined(theNum, 2)) + { + theData->ReadReal(theNum, 2, "upper_limit_first_rotation", theArch, aUpperLimitFirstRotation); + } + else + { + hasUpperLimitFirstRotation = Standard_False; + aUpperLimitFirstRotation = 0; + } + + Standard_Real aLowerLimitSecondRotation; + Standard_Boolean hasLowerLimitSecondRotation = Standard_True; + if (theData->IsParamDefined(theNum, 3)) + { + theData->ReadReal(theNum, 3, "lower_limit_second_rotation", theArch, aLowerLimitSecondRotation); + } + else + { + hasLowerLimitSecondRotation = Standard_False; + aLowerLimitSecondRotation = 0; + } + + Standard_Real aUpperLimitSecondRotation; + Standard_Boolean hasUpperLimitSecondRotation = Standard_True; + if (theData->IsParamDefined(theNum, 4)) + { + theData->ReadReal(theNum, 4, "upper_limit_second_rotation", theArch, aUpperLimitSecondRotation); + } + else + { + hasUpperLimitSecondRotation = Standard_False; + aUpperLimitSecondRotation = 0; + } + aKinematicPair = new StepKinematics_UniversalPairWithRange; + Handle(StepKinematics_UniversalPairWithRange) aLocalPair = Handle(StepKinematics_UniversalPairWithRange)::DownCast(aKinematicPair); + // Initialize kinematic_pair + aLocalPair->Init(aRepresentationItem_Name, + aItemDefinedTransformation_Name, + hasItemDefinedTransformation_Description, + aItemDefinedTransformation_Description, + aItemDefinedTransformation_TransformItem1, + aItemDefinedTransformation_TransformItem2, + aKinematicPair_Joint, + aLowOrderKinematicPair_TX, + aLowOrderKinematicPair_TY, + aLowOrderKinematicPair_TZ, + aLowOrderKinematicPair_RX, + aLowOrderKinematicPair_RY, + aLowOrderKinematicPair_RZ, + hasInputSkewAngle, + aInputSkewAngle, + hasLowerLimitFirstRotation, + aLowerLimitFirstRotation, + hasUpperLimitFirstRotation, + aUpperLimitFirstRotation, + hasLowerLimitSecondRotation, + aLowerLimitSecondRotation, + hasUpperLimitSecondRotation, + aUpperLimitSecondRotation); + } + else // universal_pair_with_range hasn't params + { + aKinematicPair = new StepKinematics_UniversalPair; + Handle(StepKinematics_UniversalPair) aLocalPair = Handle(StepKinematics_UniversalPair)::DownCast(aKinematicPair); + // Initialize kinematic_pair + aLocalPair->Init(aRepresentationItem_Name, + aItemDefinedTransformation_Name, + hasItemDefinedTransformation_Description, + aItemDefinedTransformation_Description, + aItemDefinedTransformation_TransformItem1, + aItemDefinedTransformation_TransformItem2, + aKinematicPair_Joint, + aLowOrderKinematicPair_TX, + aLowOrderKinematicPair_TY, + aLowOrderKinematicPair_TZ, + aLowOrderKinematicPair_RX, + aLowOrderKinematicPair_RY, + aLowOrderKinematicPair_RZ, + hasInputSkewAngle, + aInputSkewAngle); + } + } + } + else if (!strcmp(aPairtype, "PLANAR_PAIR")) + { + // Own fields of planar_pair is non-defined + + if (theData->NamedForComplex("PLANAR_PAIR_WITH_RANGE", "PPWR", num0, theNum, theArch)) + { + if (theData->CheckNbParams(theNum, 6, theArch, "UNIVERSAL_PAIR_WITH_RANGE")) + { + // Own fields of universal_pair_with_range + + aKinematicPair = new StepKinematics_PlanarPairWithRange; + Standard_Real aLowerLimitActualRotation; + Standard_Boolean hasLowerLimitActualRotation = Standard_True; + if (theData->IsParamDefined(theNum, 1)) + { + theData->ReadReal(theNum, 1, "lower_limit_actual_rotation", theArch, aLowerLimitActualRotation); + } + else + { + hasLowerLimitActualRotation = Standard_False; + aLowerLimitActualRotation = 0; + } + + Standard_Real aUpperLimitActualRotation; + Standard_Boolean hasUpperLimitActualRotation = Standard_True; + if (theData->IsParamDefined(theNum, 2)) + { + theData->ReadReal(theNum, 2, "upper_limit_actual_rotation", theArch, aUpperLimitActualRotation); + } + else + { + hasUpperLimitActualRotation = Standard_False; + aUpperLimitActualRotation = 0; + } + + Standard_Real aLowerLimitActualTranslationX; + Standard_Boolean hasLowerLimitActualTranslationX = Standard_True; + if (theData->IsParamDefined(theNum, 3)) + { + theData->ReadReal(theNum, 3, "lower_limit_actual_translation_x", theArch, aLowerLimitActualTranslationX); + } + else + { + hasLowerLimitActualTranslationX = Standard_False; + aLowerLimitActualTranslationX = 0; + } + + Standard_Real aUpperLimitActualTranslationX; + Standard_Boolean hasUpperLimitActualTranslationX = Standard_True; + if (theData->IsParamDefined(theNum, 4)) + { + theData->ReadReal(theNum, 4, "upper_limit_actual_translation_x", theArch, aUpperLimitActualTranslationX); + } + else + { + hasUpperLimitActualTranslationX = Standard_False; + aUpperLimitActualTranslationX = 0; + } + + Standard_Real aLowerLimitActualTranslationY; + Standard_Boolean hasLowerLimitActualTranslationY = Standard_True; + if (theData->IsParamDefined(theNum, 5)) + { + theData->ReadReal(theNum, 5, "lower_limit_actual_translation_y", theArch, aLowerLimitActualTranslationY); + } + else + { + hasLowerLimitActualTranslationY = Standard_False; + aLowerLimitActualTranslationY = 0; + } + + Standard_Real aUpperLimitActualTranslationY; + Standard_Boolean hasUpperLimitActualTranslationY = Standard_True; + if (theData->IsParamDefined(theNum, 6)) + { + theData->ReadReal(theNum, 6, "upper_limit_actual_translation_y", theArch, aUpperLimitActualTranslationY); + } + else + { + hasUpperLimitActualTranslationY = Standard_False; + aUpperLimitActualTranslationY = 0; + } + Handle(StepKinematics_PlanarPairWithRange) aLocalPair = Handle(StepKinematics_PlanarPairWithRange)::DownCast(aKinematicPair); + // Initialize kinematic_pair + aLocalPair->Init(aRepresentationItem_Name, + aItemDefinedTransformation_Name, + hasItemDefinedTransformation_Description, + aItemDefinedTransformation_Description, + aItemDefinedTransformation_TransformItem1, + aItemDefinedTransformation_TransformItem2, + aKinematicPair_Joint, + aLowOrderKinematicPair_TX, + aLowOrderKinematicPair_TY, + aLowOrderKinematicPair_TZ, + aLowOrderKinematicPair_RX, + aLowOrderKinematicPair_RY, + aLowOrderKinematicPair_RZ, + hasLowerLimitActualRotation, + aLowerLimitActualRotation, + hasUpperLimitActualRotation, + aUpperLimitActualRotation, + hasLowerLimitActualTranslationX, + aLowerLimitActualTranslationX, + hasUpperLimitActualTranslationX, + aUpperLimitActualTranslationX, + hasLowerLimitActualTranslationY, + aLowerLimitActualTranslationY, + hasUpperLimitActualTranslationY, + aUpperLimitActualTranslationY); + } + else // universal_pair_with_range hasn't params + { + aKinematicPair = new StepKinematics_PlanarPair; + Handle(StepKinematics_PlanarPair) aLocalPair = Handle(StepKinematics_PlanarPair)::DownCast(aKinematicPair); + // Initialize kinematic_pair + aLocalPair->Init(aRepresentationItem_Name, + aItemDefinedTransformation_Name, + hasItemDefinedTransformation_Description, + aItemDefinedTransformation_Description, + aItemDefinedTransformation_TransformItem1, + aItemDefinedTransformation_TransformItem2, + aKinematicPair_Joint, + aLowOrderKinematicPair_TX, + aLowOrderKinematicPair_TY, + aLowOrderKinematicPair_TZ, + aLowOrderKinematicPair_RX, + aLowOrderKinematicPair_RY, + aLowOrderKinematicPair_RZ); + } + } + } + } + else if (!strcmp(aPairSuperType, "LOW_ORDER_KINEMATIC_PAIR_WITH_MOTION_COUPLING")) + { + theNum = theData->NextForComplex(theNum); + Standard_CString aPairtype = theData->CType(theNum); + if (!strcmp(aPairtype, "GEAR_PAIR")) + { + + // Inherited fields of GearPair + + Standard_Real aGearPair_RadiusFirstLink; + theData->ReadReal(theNum, 1, "gear_pair.radius_first_link", theArch, aGearPair_RadiusFirstLink); + + Standard_Real aGearPair_RadiusSecondLink; + theData->ReadReal(theNum, 2, "gear_pair.radius_second_link", theArch, aGearPair_RadiusSecondLink); + + Standard_Real aGearPair_Bevel; + theData->ReadReal(theNum, 3, "gear_pair.bevel", theArch, aGearPair_Bevel); + + Standard_Real aGearPair_HelicalAngle; + theData->ReadReal(theNum, 4, "gear_pair.helical_angle", theArch, aGearPair_HelicalAngle); + + Standard_Real aGearPair_GearRatio; + theData->ReadReal(theNum, 5, "gear_pair.gear_ratio", theArch, aGearPair_GearRatio); + + if (theData->NamedForComplex("GEAR_PAIR_WITH_RANGE", "GPWR", num0, theNum, theArch)) + { + if (theData->CheckNbParams(theNum, 2, theArch, "GEAR_PAIR_WITH_RANGE")) + { + // Own fields of GearPairWithRange + + aKinematicPair = new StepKinematics_GearPairWithRange; + + Standard_Real aLowerLimitActualRotation1; + Standard_Boolean hasLowerLimitActualRotation1 = Standard_True; + if (theData->IsParamDefined(theNum, 1)) + { + theData->ReadReal(theNum, 1, "lower_limit_actual_rotation1", theArch, aLowerLimitActualRotation1); + } + else + { + hasLowerLimitActualRotation1 = Standard_False; + aLowerLimitActualRotation1 = 0; + } + + Standard_Real aUpperLimitActualRotation1; + Standard_Boolean hasUpperLimitActualRotation1 = Standard_True; + if (theData->IsParamDefined(theNum, 2)) + { + theData->ReadReal(theNum, 2, "upper_limit_actual_rotation1", theArch, aUpperLimitActualRotation1); + } + else + { + hasUpperLimitActualRotation1 = Standard_False; + aUpperLimitActualRotation1 = 0; + } + Handle(StepKinematics_GearPairWithRange) aLocalPair = Handle(StepKinematics_GearPairWithRange)::DownCast(aKinematicPair); + // Initialize kinematic_pair + aLocalPair->Init(aRepresentationItem_Name, + aItemDefinedTransformation_Name, + hasItemDefinedTransformation_Description, + aItemDefinedTransformation_Description, + aItemDefinedTransformation_TransformItem1, + aItemDefinedTransformation_TransformItem2, + aKinematicPair_Joint, + aGearPair_RadiusFirstLink, + aGearPair_RadiusSecondLink, + aGearPair_Bevel, + aGearPair_HelicalAngle, + aGearPair_GearRatio, + hasLowerLimitActualRotation1, + aLowerLimitActualRotation1, + hasUpperLimitActualRotation1, + aUpperLimitActualRotation1); + + } + else // StepKinematics_GearPairWithRange hasn't params + { + aKinematicPair = new StepKinematics_GearPair; + Handle(StepKinematics_GearPair) aLocalPair = Handle(StepKinematics_GearPair)::DownCast(aKinematicPair); + // Initialize kinematic_pair + aLocalPair->Init(aRepresentationItem_Name, + aItemDefinedTransformation_Name, + hasItemDefinedTransformation_Description, + aItemDefinedTransformation_Description, + aItemDefinedTransformation_TransformItem1, + aItemDefinedTransformation_TransformItem2, + aKinematicPair_Joint, + aGearPair_RadiusFirstLink, + aGearPair_RadiusSecondLink, + aGearPair_Bevel, + aGearPair_HelicalAngle, + aGearPair_GearRatio); + } + } + } + else if (!strcmp(aPairtype, "RACK_AND_PINION_PAIR")) + { + + // Inherited fields of RackAndPinionPair + Standard_Real aRackAndPinionPair_PinionRadius; + theData->ReadReal(theNum, 1, "rack_and_pinion_pair.pinion_radius", theArch, aRackAndPinionPair_PinionRadius); + + if (theData->NamedForComplex("RACK_AND_PINION_PAIR_WITH_RANGE", "RAPPWR", num0, theNum, theArch)) + { + if (theData->CheckNbParams(theNum, 2, theArch, "RACK_AND_PINION_PAIR_WITH_RANGE")) + { + // Own fields of GearPairWithRange + + aKinematicPair = new StepKinematics_RackAndPinionPairWithRange; + + + Standard_Real aLowerLimitRackDisplacement; + Standard_Boolean hasLowerLimitRackDisplacement = Standard_True; + if (theData->IsParamDefined(theNum, 1)) + { + theData->ReadReal(theNum, 1, "lower_limit_rack_displacement", theArch, aLowerLimitRackDisplacement); + } + else + { + hasLowerLimitRackDisplacement = Standard_False; + aLowerLimitRackDisplacement = 0; + } + + Standard_Real aUpperLimitRackDisplacement; + Standard_Boolean hasUpperLimitRackDisplacement = Standard_True; + if (theData->IsParamDefined(theNum, 2)) + { + theData->ReadReal(theNum, 2, "upper_limit_rack_displacement", theArch, aUpperLimitRackDisplacement); + } + else + { + hasUpperLimitRackDisplacement = Standard_False; + aUpperLimitRackDisplacement = 0; + } + + Handle(StepKinematics_RackAndPinionPairWithRange) aLocalPair = Handle(StepKinematics_RackAndPinionPairWithRange)::DownCast(aKinematicPair); + // Initialize kinematic_pair + aLocalPair->Init(aRepresentationItem_Name, + aItemDefinedTransformation_Name, + hasItemDefinedTransformation_Description, + aItemDefinedTransformation_Description, + aItemDefinedTransformation_TransformItem1, + aItemDefinedTransformation_TransformItem2, + aKinematicPair_Joint, + aRackAndPinionPair_PinionRadius, + hasLowerLimitRackDisplacement, + aLowerLimitRackDisplacement, + hasUpperLimitRackDisplacement, + aUpperLimitRackDisplacement); + } + else // StepKinematics_RackAndPinionPairWithRange hasn't params + { + aKinematicPair = new StepKinematics_RackAndPinionPair; + Handle(StepKinematics_RackAndPinionPair) aLocalPair = Handle(StepKinematics_RackAndPinionPair)::DownCast(aKinematicPair); + // Initialize kinematic_pair + aLocalPair->Init(aRepresentationItem_Name, + aItemDefinedTransformation_Name, + hasItemDefinedTransformation_Description, + aItemDefinedTransformation_Description, + aItemDefinedTransformation_TransformItem1, + aItemDefinedTransformation_TransformItem2, + aKinematicPair_Joint, + aRackAndPinionPair_PinionRadius); + } + } + } + else if (!strcmp(aPairtype, "SCREW_PAIR")) + { + // Inherited fields of ScrewPair + + Standard_Real aScrewPair_Pitch; + theData->ReadReal(theNum, 1, "screw_pair.pitch", theArch, aScrewPair_Pitch); + + if (theData->NamedForComplex("SCREW_PAIR_WITH_RANGE", "SPWR", num0, theNum, theArch)) + { + if (theData->CheckNbParams(theNum, 2, theArch, "SCREW_PAIR_WITH_RANGE")) + { + // Own fields of ScrewPairWithRange + + aKinematicPair = new StepKinematics_ScrewPairWithRange; + Standard_Real aLowerLimitActualRotation; + Standard_Boolean hasLowerLimitActualRotation = Standard_True; + if (theData->IsParamDefined(theNum, 1)) + { + theData->ReadReal(theNum, 1, "lower_limit_actual_rotation", theArch, aLowerLimitActualRotation); + } + else + { + hasLowerLimitActualRotation = Standard_False; + aLowerLimitActualRotation = 0; + } + + Standard_Real aUpperLimitActualRotation; + Standard_Boolean hasUpperLimitActualRotation = Standard_True; + if (theData->IsParamDefined(theNum, 2)) + { + theData->ReadReal(theNum, 2, "upper_limit_actual_rotation", theArch, aUpperLimitActualRotation); + } + else + { + hasUpperLimitActualRotation = Standard_False; + aUpperLimitActualRotation = 0; + } + + Handle(StepKinematics_ScrewPairWithRange) aLocalPair = Handle(StepKinematics_ScrewPairWithRange)::DownCast(aKinematicPair); + // Initialize kinematic_pair + aLocalPair->Init(aRepresentationItem_Name, + aItemDefinedTransformation_Name, + hasItemDefinedTransformation_Description, + aItemDefinedTransformation_Description, + aItemDefinedTransformation_TransformItem1, + aItemDefinedTransformation_TransformItem2, + aKinematicPair_Joint, + aScrewPair_Pitch, + hasLowerLimitActualRotation, + aLowerLimitActualRotation, + hasUpperLimitActualRotation, + aUpperLimitActualRotation); + } + else // StepKinematics_ScrewPairWithRange hasn't params + { + aKinematicPair = new StepKinematics_ScrewPair; + Handle(StepKinematics_ScrewPair) aLocalPair = Handle(StepKinematics_ScrewPair)::DownCast(aKinematicPair); + // Initialize kinematic_pair + aLocalPair->Init(aRepresentationItem_Name, + aItemDefinedTransformation_Name, + hasItemDefinedTransformation_Description, + aItemDefinedTransformation_Description, + aItemDefinedTransformation_TransformItem1, + aItemDefinedTransformation_TransformItem2, + aKinematicPair_Joint, + aScrewPair_Pitch); + } + } + } + } + else // "HIGH_ORDER_KINEMATIC_PAIR" + { + theNum = theData->NextForComplex(theNum); + Standard_CString aPairtype = theData->CType(theNum); + if (!strcmp(aPairtype, "POINT_ON_PLANAR_CURVE_PAIR")) + { + + // Inherited fields of PointOnPlanarCurvePair + + Handle(StepGeom_Curve) aPointOnPlanarCurvePair_PairCurve; + theData->ReadEntity(theNum, 1, "point_on_planar_curve_pair.pair_curve", theArch, STANDARD_TYPE(StepGeom_Curve), aPointOnPlanarCurvePair_PairCurve); + + Standard_Boolean aPointOnPlanarCurvePair_Orientation; + theData->ReadBoolean(theNum, 2, "point_on_planar_curve_pair.orientation", theArch, aPointOnPlanarCurvePair_Orientation); + + + if (theData->NamedForComplex("POINT_ON_PLANAR_CURVE_PAIR_WITH_RANGE", "POPCPW", num0, theNum, theArch)) + { + if (theData->CheckNbParams(theNum, 7, theArch, "POINT_ON_PLANAR_CURVE_PAIR_WITH_RANGE")) + { + // Own fields of PointOnPlanarCurvePairWithRange + + aKinematicPair = new StepKinematics_PointOnPlanarCurvePairWithRange; + + Handle(StepGeom_TrimmedCurve) aRangeOnPairCurve; + theData->ReadEntity(theNum, 1, "range_on_pair_curve", theArch, STANDARD_TYPE(StepGeom_TrimmedCurve), aRangeOnPairCurve); + + Standard_Real aLowerLimitYaw; + Standard_Boolean hasLowerLimitYaw = Standard_True; + if (theData->IsParamDefined(theNum, 2)) + { + theData->ReadReal(theNum, 2, "lower_limit_yaw", theArch, aLowerLimitYaw); + } + else + { + hasLowerLimitYaw = Standard_False; + aLowerLimitYaw = 0; + } + + Standard_Real aUpperLimitYaw; + Standard_Boolean hasUpperLimitYaw = Standard_True; + if (theData->IsParamDefined(theNum, 3)) + { + theData->ReadReal(theNum, 3, "upper_limit_yaw", theArch, aUpperLimitYaw); + } + else + { + hasUpperLimitYaw = Standard_False; + aUpperLimitYaw = 0; + } + + Standard_Real aLowerLimitPitch; + Standard_Boolean hasLowerLimitPitch = Standard_True; + if (theData->IsParamDefined(theNum, 4)) + { + theData->ReadReal(theNum, 4, "lower_limit_pitch", theArch, aLowerLimitPitch); + } + else + { + hasLowerLimitPitch = Standard_False; + aLowerLimitPitch = 0; + } + + Standard_Real aUpperLimitPitch; + Standard_Boolean hasUpperLimitPitch = Standard_True; + if (theData->IsParamDefined(theNum, 5)) + { + theData->ReadReal(theNum, 5, "upper_limit_pitch", theArch, aUpperLimitPitch); + } + else + { + hasUpperLimitPitch = Standard_False; + aUpperLimitPitch = 0; + } + + Standard_Real aLowerLimitRoll; + Standard_Boolean hasLowerLimitRoll = Standard_True; + if (theData->IsParamDefined(theNum, 6)) + { + theData->ReadReal(theNum, 6, "lower_limit_roll", theArch, aLowerLimitRoll); + } + else + { + hasLowerLimitRoll = Standard_False; + aLowerLimitRoll = 0; + } + + Standard_Real aUpperLimitRoll; + Standard_Boolean hasUpperLimitRoll = Standard_True; + if (theData->IsParamDefined(theNum, 7)) + { + theData->ReadReal(theNum, 7, "upper_limit_roll", theArch, aUpperLimitRoll); + } + else + { + hasUpperLimitRoll = Standard_False; + aUpperLimitRoll = 0; + } + Handle(StepKinematics_PointOnPlanarCurvePairWithRange) aLocalPair = Handle(StepKinematics_PointOnPlanarCurvePairWithRange)::DownCast(aKinematicPair); + // Initialize kinematic_pair + aLocalPair->Init(aRepresentationItem_Name, + aItemDefinedTransformation_Name, + hasItemDefinedTransformation_Description, + aItemDefinedTransformation_Description, + aItemDefinedTransformation_TransformItem1, + aItemDefinedTransformation_TransformItem2, + aKinematicPair_Joint, + aPointOnPlanarCurvePair_PairCurve, + aPointOnPlanarCurvePair_Orientation, + aRangeOnPairCurve, + hasLowerLimitYaw, + aLowerLimitYaw, + hasUpperLimitYaw, + aUpperLimitYaw, + hasLowerLimitPitch, + aLowerLimitPitch, + hasUpperLimitPitch, + aUpperLimitPitch, + hasLowerLimitRoll, + aLowerLimitRoll, + hasUpperLimitRoll, + aUpperLimitRoll); + + } + else // point_on_planar_curve_pair_with_range hasn't params + { + aKinematicPair = new StepKinematics_PointOnPlanarCurvePair; + Handle(StepKinematics_PointOnPlanarCurvePair) aLocalPair = Handle(StepKinematics_PointOnPlanarCurvePair)::DownCast(aKinematicPair); + // Initialize kinematic_pair + aLocalPair->Init(aRepresentationItem_Name, + aItemDefinedTransformation_Name, + hasItemDefinedTransformation_Description, + aItemDefinedTransformation_Description, + aItemDefinedTransformation_TransformItem1, + aItemDefinedTransformation_TransformItem2, + aKinematicPair_Joint, + aPointOnPlanarCurvePair_PairCurve, + aPointOnPlanarCurvePair_Orientation); + } + } + } + else if (!strcmp(aPairtype, "POINT_ON_SURFACE_PAIR")) + { + // Inherited fields of PointOnSurfacePair + + Handle(StepGeom_Surface) aPointOnSurfacePair_PairSurface; + theData->ReadEntity(theNum, 1, "point_on_surface_pair.pair_surface", theArch, STANDARD_TYPE(StepGeom_Surface), aPointOnSurfacePair_PairSurface); + + if (theData->NamedForComplex("POINT_ON_SURFACE_PAIR_WITH_RANGE ", "RAPPWR", num0, theNum, theArch)) + { + if (theData->CheckNbParams(theNum, 2, theArch, "POINT_ON_SURFACE_PAIR_WITH_RANGE ")) + { + // Own fields of PointOnSurfacePairWithRange + + aKinematicPair = new StepKinematics_PointOnSurfacePairWithRange; + + + Handle(StepGeom_RectangularTrimmedSurface) aRangeOnPairSurface; + theData->ReadEntity(theNum, 1, "range_on_pair_surface", theArch, STANDARD_TYPE(StepGeom_RectangularTrimmedSurface), aRangeOnPairSurface); + + Standard_Real aLowerLimitYaw; + Standard_Boolean hasLowerLimitYaw = Standard_True; + if (theData->IsParamDefined(theNum, 2)) + { + theData->ReadReal(theNum, 2, "lower_limit_yaw", theArch, aLowerLimitYaw); + } + else + { + hasLowerLimitYaw = Standard_False; + aLowerLimitYaw = 0; + } + + Standard_Real aUpperLimitYaw; + Standard_Boolean hasUpperLimitYaw = Standard_True; + if (theData->IsParamDefined(theNum, 3)) + { + theData->ReadReal(theNum, 3, "upper_limit_yaw", theArch, aUpperLimitYaw); + } + else + { + hasUpperLimitYaw = Standard_False; + aUpperLimitYaw = 0; + } + + Standard_Real aLowerLimitPitch; + Standard_Boolean hasLowerLimitPitch = Standard_True; + if (theData->IsParamDefined(theNum, 4)) + { + theData->ReadReal(theNum, 4, "lower_limit_pitch", theArch, aLowerLimitPitch); + } + else + { + hasLowerLimitPitch = Standard_False; + aLowerLimitPitch = 0; + } + + Standard_Real aUpperLimitPitch; + Standard_Boolean hasUpperLimitPitch = Standard_True; + if (theData->IsParamDefined(theNum, 5)) + { + theData->ReadReal(theNum, 5, "upper_limit_pitch", theArch, aUpperLimitPitch); + } + else + { + hasUpperLimitPitch = Standard_False; + aUpperLimitPitch = 0; + } + + Standard_Real aLowerLimitRoll; + Standard_Boolean hasLowerLimitRoll = Standard_True; + if (theData->IsParamDefined(theNum, 6)) + { + theData->ReadReal(theNum, 6, "lower_limit_roll", theArch, aLowerLimitRoll); + } + else + { + hasLowerLimitRoll = Standard_False; + aLowerLimitRoll = 0; + } + + Standard_Real aUpperLimitRoll; + Standard_Boolean hasUpperLimitRoll = Standard_True; + if (theData->IsParamDefined(theNum, 7)) + { + theData->ReadReal(theNum, 7, "upper_limit_roll", theArch, aUpperLimitRoll); + } + else + { + hasUpperLimitRoll = Standard_False; + aUpperLimitRoll = 0; + } + Handle(StepKinematics_PointOnSurfacePairWithRange) aLocalPair = Handle(StepKinematics_PointOnSurfacePairWithRange)::DownCast(aKinematicPair); + // Initialize kinematic_pair + aLocalPair->Init(aRepresentationItem_Name, + aItemDefinedTransformation_Name, + hasItemDefinedTransformation_Description, + aItemDefinedTransformation_Description, + aItemDefinedTransformation_TransformItem1, + aItemDefinedTransformation_TransformItem2, + aKinematicPair_Joint, + aPointOnSurfacePair_PairSurface, + aRangeOnPairSurface, + hasLowerLimitYaw, + aLowerLimitYaw, + hasUpperLimitYaw, + aUpperLimitYaw, + hasLowerLimitPitch, + aLowerLimitPitch, + hasUpperLimitPitch, + aUpperLimitPitch, + hasLowerLimitRoll, + aLowerLimitRoll, + hasUpperLimitRoll, + aUpperLimitRoll); + } + else // StepKinematics_PointOnSurfacePairWithRange hasn't params + { + aKinematicPair = new StepKinematics_PointOnSurfacePair; + Handle(StepKinematics_PointOnSurfacePair) aLocalPair = Handle(StepKinematics_PointOnSurfacePair)::DownCast(aKinematicPair); + // Initialize kinematic_pair + aLocalPair->Init(aRepresentationItem_Name, + aItemDefinedTransformation_Name, + hasItemDefinedTransformation_Description, + aItemDefinedTransformation_Description, + aItemDefinedTransformation_TransformItem1, + aItemDefinedTransformation_TransformItem2, + aKinematicPair_Joint, + aPointOnSurfacePair_PairSurface); + } + } + } + else if (!strcmp(aPairtype, "PLANAR_CURVE_PAIR")) + { + // Inherited fields of PlanarCurvePair + + Handle(StepGeom_Curve) aPlanarCurvePair_Curve1; + theData->ReadEntity(theNum, 1, "planar_curve_pair.curve1", theArch, STANDARD_TYPE(StepGeom_Curve), aPlanarCurvePair_Curve1); + + Handle(StepGeom_Curve) aPlanarCurvePair_Curve2; + theData->ReadEntity(theNum, 2, "planar_curve_pair.curve2", theArch, STANDARD_TYPE(StepGeom_Curve), aPlanarCurvePair_Curve2); + + Standard_Boolean aPlanarCurvePair_Orientation; + theData->ReadBoolean(theNum, 3, "planar_curve_pair.orientation", theArch, aPlanarCurvePair_Orientation); + + if (theData->NamedForComplex("PLANAR_CURVE_PAIR_RANGE", "PCPR", num0, theNum, theArch)) + { + if (theData->CheckNbParams(theNum, 2, theArch, "PLANAR_CURVE_PAIR_RANGE")) + { + // Own fields of PlanarCurvePairRange + aKinematicPair = new StepKinematics_PlanarCurvePairRange; + + Handle(StepGeom_TrimmedCurve) aRangeOnCurve1; + theData->ReadEntity(theNum, 1, "range_on_curve1", theArch, STANDARD_TYPE(StepGeom_TrimmedCurve), aRangeOnCurve1); + + Handle(StepGeom_TrimmedCurve) aRangeOnCurve2; + theData->ReadEntity(theNum, 2, "range_on_curve2", theArch, STANDARD_TYPE(StepGeom_TrimmedCurve), aRangeOnCurve2); + + + Handle(StepKinematics_PlanarCurvePairRange) aLocalPair = Handle(StepKinematics_PlanarCurvePairRange)::DownCast(aKinematicPair); + // Initialize kinematic_pair + aLocalPair->Init(aRepresentationItem_Name, + aItemDefinedTransformation_Name, + hasItemDefinedTransformation_Description, + aItemDefinedTransformation_Description, + aItemDefinedTransformation_TransformItem1, + aItemDefinedTransformation_TransformItem2, + aKinematicPair_Joint, + aPlanarCurvePair_Curve1, + aPlanarCurvePair_Curve2, + aPlanarCurvePair_Orientation, + aRangeOnCurve1, + aRangeOnCurve2); + } + else // StepKinematics_ScrewPairWithRange hasn't params + { + aKinematicPair = new StepKinematics_PlanarCurvePair; + Handle(StepKinematics_PlanarCurvePair) aLocalPair = Handle(StepKinematics_PlanarCurvePair)::DownCast(aKinematicPair); + // Initialize kinematic_pair + aLocalPair->Init(aRepresentationItem_Name, + aItemDefinedTransformation_Name, + hasItemDefinedTransformation_Description, + aItemDefinedTransformation_Description, + aItemDefinedTransformation_TransformItem1, + aItemDefinedTransformation_TransformItem2, + aKinematicPair_Joint, + aPlanarCurvePair_Curve1, + aPlanarCurvePair_Curve2, + aPlanarCurvePair_Orientation); + } + } + } + else if (!strcmp(aPairtype, "SURFACE_PAIR")) + { + // Inherited fields of SurfacePair + + Handle(StepGeom_Surface) aSurfacePair_Surface1; + theData->ReadEntity(theNum, 1, "surface_pair.surface1", theArch, STANDARD_TYPE(StepGeom_Surface), aSurfacePair_Surface1); + + Handle(StepGeom_Surface) aSurfacePair_Surface2; + theData->ReadEntity(theNum, 2, "surface_pair.surface2", theArch, STANDARD_TYPE(StepGeom_Surface), aSurfacePair_Surface2); + + Standard_Boolean aSurfacePair_Orientation; + theData->ReadBoolean(theNum, 3, "surface_pair.orientation", theArch, aSurfacePair_Orientation); + + if (theData->NamedForComplex("SURFACE_PAIR_WITH_RANGE", "SPW1", num0, theNum, theArch)) + { + if (theData->CheckNbParams(theNum, 4, theArch, "SURFACE_PAIR_WITH_RANGE")) + { + aKinematicPair = new StepKinematics_SurfacePairWithRange; + // Own fields of SurfacePairWithRange + + Handle(StepGeom_RectangularTrimmedSurface) aRangeOnSurface1; + theData->ReadEntity(theNum, 1, "range_on_surface1", theArch, STANDARD_TYPE(StepGeom_RectangularTrimmedSurface), aRangeOnSurface1); + + Handle(StepGeom_RectangularTrimmedSurface) aRangeOnSurface2; + theData->ReadEntity(theNum, 2, "range_on_surface2", theArch, STANDARD_TYPE(StepGeom_RectangularTrimmedSurface), aRangeOnSurface2); + + Standard_Real aLowerLimitActualRotation; + Standard_Boolean hasLowerLimitActualRotation = Standard_True; + if (theData->IsParamDefined(theNum, 3)) + { + theData->ReadReal(theNum, 3, "lower_limit_actual_rotation", theArch, aLowerLimitActualRotation); + } + else + { + hasLowerLimitActualRotation = Standard_False; + aLowerLimitActualRotation = 0; + } + + Standard_Real aUpperLimitActualRotation; + Standard_Boolean hasUpperLimitActualRotation = Standard_True; + if (theData->IsParamDefined(theNum, 4)) + { + theData->ReadReal(theNum, 4, "upper_limit_actual_rotation", theArch, aUpperLimitActualRotation); + } + else + { + hasUpperLimitActualRotation = Standard_False; + aUpperLimitActualRotation = 0; + } + + Handle(StepKinematics_SurfacePairWithRange) aLocalPair = Handle(StepKinematics_SurfacePairWithRange)::DownCast(aKinematicPair); + // Initialize kinematic_pair + aLocalPair->Init(aRepresentationItem_Name, + aItemDefinedTransformation_Name, + hasItemDefinedTransformation_Description, + aItemDefinedTransformation_Description, + aItemDefinedTransformation_TransformItem1, + aItemDefinedTransformation_TransformItem2, + aKinematicPair_Joint, + aSurfacePair_Surface1, + aSurfacePair_Surface2, + aSurfacePair_Orientation, + aRangeOnSurface1, + aRangeOnSurface2, + hasLowerLimitActualRotation, + aLowerLimitActualRotation, + hasUpperLimitActualRotation, + aUpperLimitActualRotation); + } + else // StepKinematics_SurfacePairWithRange hasn't params + { + aKinematicPair = new StepKinematics_SurfacePair; + Handle(StepKinematics_SurfacePair) aLocalPair = Handle(StepKinematics_SurfacePair)::DownCast(aKinematicPair); + // Initialize kinematic_pair + aLocalPair->Init(aRepresentationItem_Name, + aItemDefinedTransformation_Name, + hasItemDefinedTransformation_Description, + aItemDefinedTransformation_Description, + aItemDefinedTransformation_TransformItem1, + aItemDefinedTransformation_TransformItem2, + aKinematicPair_Joint, + aSurfacePair_Surface1, + aSurfacePair_Surface2, + aSurfacePair_Orientation); + } + } + } + } + theData->NamedForComplex("REPRESENTATION_ITEM", "RPRITM", num0, theNum, theArch); + + // Own fields of representation_item + theData->ReadString(theNum, 1, "representation_item.name", theArch, aRepresentationItem_Name); + anActuatedKinematicPair->Init(aRepresentationItem_Name, + aItemDefinedTransformation_Name, hasItemDefinedTransformation_Description, + aItemDefinedTransformation_Description, + aItemDefinedTransformation_TransformItem1, + aItemDefinedTransformation_TransformItem2, + aKinematicPair_Joint, hasTX, aTX, hasTY, aTY, hasTZ, + aTZ, hasRX, aRX, hasRY, aRY, hasRZ, aRZ); + + // Initialize kinematic_pair + aKinematicPair->SetName(aRepresentationItem_Name); + // Initialize entity + theEnt->Init(aRepresentationItem_Name, + aItemDefinedTransformation_Name, + hasItemDefinedTransformation_Description, + aItemDefinedTransformation_Description, + aItemDefinedTransformation_TransformItem1, + aItemDefinedTransformation_TransformItem2, + aKinematicPair_Joint, + anActuatedKinematicPair, aKinematicPair); +} + + +//======================================================================= +//function : WriteStep +//purpose : +//======================================================================= +void RWStepKinematics_RWActuatedKinPairAndOrderKinPair::WriteStep +(StepData_StepWriter& theSW, + const Handle(StepKinematics_ActuatedKinPairAndOrderKinPair)& theEnt) const +{ + // --- Instance of plex componant BoundedCurve --- + + theSW.StartEntity("(ACTUATED_KINEMATIC_PAIR"); + + if (theEnt->GetActuatedKinematicPair()->HasTX()) + { + switch (theEnt->GetActuatedKinematicPair()->TX()) + { + case StepKinematics_adBidirectional: theSW.SendEnum(".BIDIRECTIONAL."); break; + case StepKinematics_adPositiveOnly: theSW.SendEnum(".POSITIVE_ONLY."); break; + case StepKinematics_adNegativeOnly: theSW.SendEnum(".NEGATIVE_ONLY."); break; + case StepKinematics_adNotActuated: theSW.SendEnum(".NOT_ACTUATED."); break; + } + } + else theSW.SendUndef(); + + if (theEnt->GetActuatedKinematicPair()->HasTY()) + { + switch (theEnt->GetActuatedKinematicPair()->TY()) + { + case StepKinematics_adBidirectional: theSW.SendEnum(".BIDIRECTIONAL."); break; + case StepKinematics_adPositiveOnly: theSW.SendEnum(".POSITIVE_ONLY."); break; + case StepKinematics_adNegativeOnly: theSW.SendEnum(".NEGATIVE_ONLY."); break; + case StepKinematics_adNotActuated: theSW.SendEnum(".NOT_ACTUATED."); break; + } + } + else theSW.SendUndef(); + + if (theEnt->GetActuatedKinematicPair()->HasTZ()) + { + switch (theEnt->GetActuatedKinematicPair()->TZ()) + { + case StepKinematics_adBidirectional: theSW.SendEnum(".BIDIRECTIONAL."); break; + case StepKinematics_adPositiveOnly: theSW.SendEnum(".POSITIVE_ONLY."); break; + case StepKinematics_adNegativeOnly: theSW.SendEnum(".NEGATIVE_ONLY."); break; + case StepKinematics_adNotActuated: theSW.SendEnum(".NOT_ACTUATED."); break; + } + } + else theSW.SendUndef(); + + if (theEnt->GetActuatedKinematicPair()->HasRX()) + { + switch (theEnt->GetActuatedKinematicPair()->RX()) + { + case StepKinematics_adBidirectional: theSW.SendEnum(".BIDIRECTIONAL."); break; + case StepKinematics_adPositiveOnly: theSW.SendEnum(".POSITIVE_ONLY."); break; + case StepKinematics_adNegativeOnly: theSW.SendEnum(".NEGATIVE_ONLY."); break; + case StepKinematics_adNotActuated: theSW.SendEnum(".NOT_ACTUATED."); break; + } + } + else theSW.SendUndef(); + + if (theEnt->GetActuatedKinematicPair()->HasRY()) + { + switch (theEnt->GetActuatedKinematicPair()->RY()) + { + case StepKinematics_adBidirectional: theSW.SendEnum(".BIDIRECTIONAL."); break; + case StepKinematics_adPositiveOnly: theSW.SendEnum(".POSITIVE_ONLY."); break; + case StepKinematics_adNegativeOnly: theSW.SendEnum(".NEGATIVE_ONLY."); break; + case StepKinematics_adNotActuated: theSW.SendEnum(".NOT_ACTUATED."); break; + } + } + else theSW.SendUndef(); + + if (theEnt->GetActuatedKinematicPair()->HasRZ()) + { + switch (theEnt->GetActuatedKinematicPair()->RZ()) + { + case StepKinematics_adBidirectional: theSW.SendEnum(".BIDIRECTIONAL."); break; + case StepKinematics_adPositiveOnly: theSW.SendEnum(".POSITIVE_ONLY."); break; + case StepKinematics_adNegativeOnly: theSW.SendEnum(".NEGATIVE_ONLY."); break; + case StepKinematics_adNotActuated: theSW.SendEnum(".NOT_ACTUATED."); break; + } + } + else theSW.SendUndef(); + theSW.StartEntity("(GEOMETRIC_REPRESENTATION_ITEM"); + + theSW.StartEntity("(ITEM_DEFINED_TRANSFORMATION"); + // Inherited fields of ItemDefinedTransformation + + theSW.Send(theEnt->ItemDefinedTransformation()->Name()); + + if (theEnt->ItemDefinedTransformation()->HasDescription()) + { + theSW.Send(theEnt->ItemDefinedTransformation()->Description()); + } + else theSW.SendUndef(); + + theSW.Send(theEnt->ItemDefinedTransformation()->TransformItem1()); + + theSW.Send(theEnt->ItemDefinedTransformation()->TransformItem2()); + + theSW.StartEntity("(KINEMATIC_PAIR"); + + // Own fields of KinematicPair + + theSW.Send(theEnt->Joint()); + if (theEnt->GetOrderKinematicPair()->IsKind(STANDARD_TYPE(StepKinematics_LowOrderKinematicPair))) + { + Handle(StepKinematics_LowOrderKinematicPair) aLowOrderKinematicPair = Handle(StepKinematics_LowOrderKinematicPair)::DownCast(theEnt->GetOrderKinematicPair()); + theSW.StartEntity("(LOW_ORDER_KINEMATIC_PAIR"); + + theSW.SendBoolean(aLowOrderKinematicPair->TX()); + + theSW.SendBoolean(aLowOrderKinematicPair->TY()); + + theSW.SendBoolean(aLowOrderKinematicPair->TZ()); + + theSW.SendBoolean(aLowOrderKinematicPair->RX()); + + theSW.SendBoolean(aLowOrderKinematicPair->RY()); + + theSW.SendBoolean(aLowOrderKinematicPair->RZ()); + + if (theEnt->GetOrderKinematicPair()->IsKind(STANDARD_TYPE(StepKinematics_RevolutePair))) + { + theSW.StartEntity("(REVOLUTE_PAIR"); + theSW.StartEntity("(REVOLUTE_PAIR_WITH_RANGE"); + if (theEnt->GetOrderKinematicPair()->IsKind(STANDARD_TYPE(StepKinematics_RevolutePairWithRange))) + { + Handle(StepKinematics_RevolutePairWithRange) aRevolutePairWithRange = Handle(StepKinematics_RevolutePairWithRange)::DownCast(theEnt->GetOrderKinematicPair()); + // Own fields of RevolutePairWithRange + + if (aRevolutePairWithRange->HasLowerLimitActualRotation()) + { + theSW.Send(aRevolutePairWithRange->LowerLimitActualRotation()); + } + else theSW.SendUndef(); + + if (aRevolutePairWithRange->HasUpperLimitActualRotation()) + { + theSW.Send(aRevolutePairWithRange->UpperLimitActualRotation()); + } + else theSW.SendUndef(); + } + } + else if (theEnt->GetOrderKinematicPair()->IsKind(STANDARD_TYPE(StepKinematics_CylindricalPair))) + { + theSW.StartEntity("(CYLINDRICAL_PAIR"); + theSW.StartEntity("(CYLINDRICAL_PAIR_WITH_RANGE"); + if (theEnt->GetOrderKinematicPair()->IsKind(STANDARD_TYPE(StepKinematics_CylindricalPairWithRange))) + { + Handle(StepKinematics_CylindricalPairWithRange) aCylindricalPairWithRange = Handle(StepKinematics_CylindricalPairWithRange)::DownCast(theEnt->GetOrderKinematicPair()); + // Own fields of CylindricalPairWithRange + + if (aCylindricalPairWithRange->HasLowerLimitActualTranslation()) + { + theSW.Send(aCylindricalPairWithRange->LowerLimitActualTranslation()); + } + else theSW.SendUndef(); + + if (aCylindricalPairWithRange->HasUpperLimitActualTranslation()) + { + theSW.Send(aCylindricalPairWithRange->UpperLimitActualTranslation()); + } + else theSW.SendUndef(); + + if (aCylindricalPairWithRange->HasLowerLimitActualRotation()) + { + theSW.Send(aCylindricalPairWithRange->LowerLimitActualRotation()); + } + else theSW.SendUndef(); + + if (aCylindricalPairWithRange->HasUpperLimitActualRotation()) + { + theSW.Send(aCylindricalPairWithRange->UpperLimitActualRotation()); + } + else theSW.SendUndef(); + } + } + else if (theEnt->GetOrderKinematicPair()->IsKind(STANDARD_TYPE(StepKinematics_SphericalPair))) + { + theSW.StartEntity("(SPHERICAL_PAIR"); + theSW.StartEntity("(SPHERICAL_PAIR_WITH_RANGE"); + if (theEnt->GetOrderKinematicPair()->IsKind(STANDARD_TYPE(StepKinematics_SphericalPairWithRange))) + { + Handle(StepKinematics_SphericalPairWithRange) aSphericalPairWithRange = Handle(StepKinematics_SphericalPairWithRange)::DownCast(theEnt->GetOrderKinematicPair()); + // Own fields of SphericalPairWithRange + + if (aSphericalPairWithRange->HasLowerLimitYaw()) + { + theSW.Send(aSphericalPairWithRange->LowerLimitYaw()); + } + else theSW.SendUndef(); + + if (aSphericalPairWithRange->HasUpperLimitYaw()) + { + theSW.Send(aSphericalPairWithRange->UpperLimitYaw()); + } + else theSW.SendUndef(); + + if (aSphericalPairWithRange->HasLowerLimitPitch()) + { + theSW.Send(aSphericalPairWithRange->LowerLimitPitch()); + } + else theSW.SendUndef(); + + if (aSphericalPairWithRange->HasUpperLimitPitch()) + { + theSW.Send(aSphericalPairWithRange->UpperLimitPitch()); + } + else theSW.SendUndef(); + + if (aSphericalPairWithRange->HasLowerLimitRoll()) + { + theSW.Send(aSphericalPairWithRange->LowerLimitRoll()); + } + else theSW.SendUndef(); + + if (aSphericalPairWithRange->HasUpperLimitRoll()) + { + theSW.Send(aSphericalPairWithRange->UpperLimitRoll()); + } + else theSW.SendUndef(); + } + } + else if (theEnt->GetOrderKinematicPair()->IsKind(STANDARD_TYPE(StepKinematics_SphericalPairWithPin))) + { + theSW.StartEntity("(SPHERICAL_PAIR_WITH_PIN"); + theSW.StartEntity("(SPHERICAL_PAIR_WITH_PIN_AND_RANGE"); + if (theEnt->GetOrderKinematicPair()->IsKind(STANDARD_TYPE(StepKinematics_SphericalPairWithPinAndRange))) + { + Handle(StepKinematics_SphericalPairWithPinAndRange) aSphericalPairWithPinAndRange = Handle(StepKinematics_SphericalPairWithPinAndRange)::DownCast(theEnt->GetOrderKinematicPair()); + // Own fields of SphericalPairWithPinAndRange + + if (aSphericalPairWithPinAndRange->HasLowerLimitYaw()) + { + theSW.Send(aSphericalPairWithPinAndRange->LowerLimitYaw()); + } + else theSW.SendUndef(); + + if (aSphericalPairWithPinAndRange->HasUpperLimitYaw()) + { + theSW.Send(aSphericalPairWithPinAndRange->UpperLimitYaw()); + } + else theSW.SendUndef(); + + if (aSphericalPairWithPinAndRange->HasLowerLimitRoll()) + { + theSW.Send(aSphericalPairWithPinAndRange->LowerLimitRoll()); + } + else theSW.SendUndef(); + + if (aSphericalPairWithPinAndRange->HasUpperLimitRoll()) + { + theSW.Send(aSphericalPairWithPinAndRange->UpperLimitRoll()); + } + else theSW.SendUndef(); + } + } + else if (theEnt->GetOrderKinematicPair()->IsKind(STANDARD_TYPE(StepKinematics_PrismaticPair))) + { + theSW.StartEntity("(PRISMATIC_PAIR"); + theSW.StartEntity("(PRISMATIC_PAIR_WITH_RANGE"); + if (theEnt->GetOrderKinematicPair()->IsKind(STANDARD_TYPE(StepKinematics_PrismaticPairWithRange))) + { + Handle(StepKinematics_PrismaticPairWithRange) aPrismaticPairWithRange = Handle(StepKinematics_PrismaticPairWithRange)::DownCast(theEnt->GetOrderKinematicPair()); + // Own fields of PrismaticPairWithRange + + if (aPrismaticPairWithRange->HasLowerLimitActualTranslation()) + { + theSW.Send(aPrismaticPairWithRange->LowerLimitActualTranslation()); + } + else theSW.SendUndef(); + + if (aPrismaticPairWithRange->HasUpperLimitActualTranslation()) + { + theSW.Send(aPrismaticPairWithRange->UpperLimitActualTranslation()); + } + else theSW.SendUndef(); + } + } + else if (theEnt->GetOrderKinematicPair()->IsKind(STANDARD_TYPE(StepKinematics_UniversalPair))) + { + theSW.StartEntity("(UNIVERSAL_PAIR"); + Handle(StepKinematics_UniversalPair) anUniversalPair = Handle(StepKinematics_UniversalPair)::DownCast(theEnt->GetOrderKinematicPair()); + // Own fields of UniversalPair + + if (anUniversalPair->HasInputSkewAngle()) + { + theSW.Send(anUniversalPair->InputSkewAngle()); + } + else theSW.SendUndef(); + + theSW.StartEntity("(PRISMATIC_PAIR_WITH_RANGE"); + if (theEnt->GetOrderKinematicPair()->IsKind(STANDARD_TYPE(StepKinematics_PrismaticPairWithRange))) + { + Handle(StepKinematics_UniversalPairWithRange) anUniversalPairWithRange = Handle(StepKinematics_UniversalPairWithRange)::DownCast(theEnt->GetOrderKinematicPair()); + // Own fields of UniversalPairWithRange + + if (anUniversalPairWithRange->HasLowerLimitFirstRotation()) + { + theSW.Send(anUniversalPairWithRange->LowerLimitFirstRotation()); + } + else theSW.SendUndef(); + + if (anUniversalPairWithRange->HasUpperLimitFirstRotation()) + { + theSW.Send(anUniversalPairWithRange->UpperLimitFirstRotation()); + } + else theSW.SendUndef(); + + if (anUniversalPairWithRange->HasLowerLimitSecondRotation()) + { + theSW.Send(anUniversalPairWithRange->LowerLimitSecondRotation()); + } + else theSW.SendUndef(); + + if (anUniversalPairWithRange->HasUpperLimitSecondRotation()) + { + theSW.Send(anUniversalPairWithRange->UpperLimitSecondRotation()); + } + else theSW.SendUndef(); + } + } + } + else if (theEnt->GetOrderKinematicPair()->IsKind(STANDARD_TYPE(StepKinematics_LowOrderKinematicPairWithMotionCoupling))) + { + if (theEnt->GetOrderKinematicPair()->IsKind(STANDARD_TYPE(StepKinematics_GearPair))) + { + theSW.StartEntity("(GEAR_PAIR"); + Handle(StepKinematics_GearPair) aGearPair = Handle(StepKinematics_GearPair)::DownCast(theEnt->GetOrderKinematicPair()); + // Own fields of GearPair + + theSW.Send(aGearPair->RadiusFirstLink()); + + theSW.Send(aGearPair->RadiusSecondLink()); + + theSW.Send(aGearPair->Bevel()); + + theSW.Send(aGearPair->HelicalAngle()); + + theSW.Send(aGearPair->GearRatio()); + + theSW.StartEntity("(PRISMATIC_PAIR_WITH_RANGE"); + if (theEnt->GetOrderKinematicPair()->IsKind(STANDARD_TYPE(StepKinematics_GearPairWithRange))) + { + Handle(StepKinematics_GearPairWithRange) aGearPairWithRange = Handle(StepKinematics_GearPairWithRange)::DownCast(theEnt->GetOrderKinematicPair()); + // Own fields of GearPairWithRange + + if (aGearPairWithRange->HasLowerLimitActualRotation1()) + { + theSW.Send(aGearPairWithRange->LowerLimitActualRotation1()); + } + else theSW.SendUndef(); + + if (aGearPairWithRange->HasUpperLimitActualRotation1()) + { + theSW.Send(aGearPairWithRange->UpperLimitActualRotation1()); + } + else theSW.SendUndef(); + } + } + else if (theEnt->GetOrderKinematicPair()->IsKind(STANDARD_TYPE(StepKinematics_RackAndPinionPair))) + { + theSW.StartEntity("RACK_AND_PINION_PAIR"); + Handle(StepKinematics_RackAndPinionPair) aRackAndPinionPair = Handle(StepKinematics_RackAndPinionPair)::DownCast(theEnt->GetOrderKinematicPair()); + // Own fields of RackAndPinionPair + + theSW.Send(aRackAndPinionPair->PinionRadius()); + + theSW.StartEntity("(RACK_AND_PINION_PAIR_WITH_RANGE"); + if (theEnt->GetOrderKinematicPair()->IsKind(STANDARD_TYPE(StepKinematics_RackAndPinionPairWithRange))) + { + Handle(StepKinematics_RackAndPinionPairWithRange) aRackAndPinionPairWithRange = Handle(StepKinematics_RackAndPinionPairWithRange)::DownCast(theEnt->GetOrderKinematicPair()); + // Own fields of aRackAndPinionPairWithRange + + if (aRackAndPinionPairWithRange->HasLowerLimitRackDisplacement()) + { + theSW.Send(aRackAndPinionPairWithRange->LowerLimitRackDisplacement()); + } + else theSW.SendUndef(); + + if (aRackAndPinionPairWithRange->HasUpperLimitRackDisplacement()) + { + theSW.Send(aRackAndPinionPairWithRange->UpperLimitRackDisplacement()); + } + else theSW.SendUndef(); + } + } + else if (theEnt->GetOrderKinematicPair()->IsKind(STANDARD_TYPE(StepKinematics_ScrewPair))) + { + theSW.StartEntity("SCREW_PAIR"); + Handle(StepKinematics_ScrewPair) aScrewPair = Handle(StepKinematics_ScrewPair)::DownCast(theEnt->GetOrderKinematicPair()); + // Own fields of ScrewPair + + theSW.Send(aScrewPair->Pitch()); + + theSW.StartEntity("(SCREW_PAIR_WITH_RANGE"); + if (theEnt->GetOrderKinematicPair()->IsKind(STANDARD_TYPE(StepKinematics_ScrewPairWithRange))) + { + Handle(StepKinematics_ScrewPairWithRange) aScrewPairWithRange = Handle(StepKinematics_ScrewPairWithRange)::DownCast(theEnt->GetOrderKinematicPair()); + // Own fields of aRackAndPinionPairWithRange + + if (aScrewPairWithRange->HasLowerLimitActualRotation()) + { + theSW.Send(aScrewPairWithRange->LowerLimitActualRotation()); + } + else theSW.SendUndef(); + + if (aScrewPairWithRange->HasUpperLimitActualRotation()) + { + theSW.Send(aScrewPairWithRange->UpperLimitActualRotation()); + } + else theSW.SendUndef(); + } + } + } + else if (theEnt->GetOrderKinematicPair()->IsKind(STANDARD_TYPE(StepKinematics_HighOrderKinematicPair))) + { + if (theEnt->GetOrderKinematicPair()->IsKind(STANDARD_TYPE(StepKinematics_ScrewPair))) + { + theSW.StartEntity("POINT_ON_PLANAR_CURVE_PAIR"); + Handle(StepKinematics_PointOnPlanarCurvePair) aPointOnPlanarCurvePair = Handle(StepKinematics_PointOnPlanarCurvePair)::DownCast(theEnt->GetOrderKinematicPair()); + // Own fields of PointOnPlanarCurvePair + + theSW.Send(aPointOnPlanarCurvePair->PairCurve()); + + theSW.SendBoolean(aPointOnPlanarCurvePair->Orientation()); + + theSW.StartEntity("(POINT_ON_PLANAR_CURVE_PAIR_WITH_RANGE"); + if (theEnt->GetOrderKinematicPair()->IsKind(STANDARD_TYPE(StepKinematics_PointOnPlanarCurvePairWithRange))) + { + Handle(StepKinematics_PointOnPlanarCurvePairWithRange) aPointOnPlanarCurvePairWithRange = Handle(StepKinematics_PointOnPlanarCurvePairWithRange)::DownCast(theEnt->GetOrderKinematicPair()); + // Own fields of PointOnPlanarCurvePairWithRange + + theSW.Send(aPointOnPlanarCurvePairWithRange->RangeOnPairCurve()); + + if (aPointOnPlanarCurvePairWithRange->HasLowerLimitYaw()) + { + theSW.Send(aPointOnPlanarCurvePairWithRange->LowerLimitYaw()); + } + else theSW.SendUndef(); + + if (aPointOnPlanarCurvePairWithRange->HasUpperLimitYaw()) + { + theSW.Send(aPointOnPlanarCurvePairWithRange->UpperLimitYaw()); + } + else theSW.SendUndef(); + + if (aPointOnPlanarCurvePairWithRange->HasLowerLimitPitch()) + { + theSW.Send(aPointOnPlanarCurvePairWithRange->LowerLimitPitch()); + } + else theSW.SendUndef(); + + if (aPointOnPlanarCurvePairWithRange->HasUpperLimitPitch()) + { + theSW.Send(aPointOnPlanarCurvePairWithRange->UpperLimitPitch()); + } + else theSW.SendUndef(); + + if (aPointOnPlanarCurvePairWithRange->HasLowerLimitRoll()) + { + theSW.Send(aPointOnPlanarCurvePairWithRange->LowerLimitRoll()); + } + else theSW.SendUndef(); + + if (aPointOnPlanarCurvePairWithRange->HasUpperLimitRoll()) + { + theSW.Send(aPointOnPlanarCurvePairWithRange->UpperLimitRoll()); + } + else theSW.SendUndef(); + } + } + else if (theEnt->GetOrderKinematicPair()->IsKind(STANDARD_TYPE(StepKinematics_PointOnSurfacePair))) + { + theSW.StartEntity("POINT_ON_SURFACE_PAIR"); + Handle(StepKinematics_PointOnSurfacePair) aPointOnSurfacePair = Handle(StepKinematics_PointOnSurfacePair)::DownCast(theEnt->GetOrderKinematicPair()); + // Own fields of PointOnSurfacePair + + theSW.Send(aPointOnSurfacePair->PairSurface()); + + theSW.StartEntity("(SCREW_PAIR_WITH_RANGE"); + if (theEnt->GetOrderKinematicPair()->IsKind(STANDARD_TYPE(StepKinematics_PointOnSurfacePairWithRange))) + { + Handle(StepKinematics_PointOnSurfacePairWithRange) aPointOnSurfacePairWithRange = Handle(StepKinematics_PointOnSurfacePairWithRange)::DownCast(theEnt->GetOrderKinematicPair()); + // Own fields of PointOnSurfacePairWithRange + + theSW.Send(aPointOnSurfacePairWithRange->RangeOnPairSurface()); + + if (aPointOnSurfacePairWithRange->HasLowerLimitYaw()) + { + theSW.Send(aPointOnSurfacePairWithRange->LowerLimitYaw()); + } + else theSW.SendUndef(); + + if (aPointOnSurfacePairWithRange->HasUpperLimitYaw()) + { + theSW.Send(aPointOnSurfacePairWithRange->UpperLimitYaw()); + } + else theSW.SendUndef(); + + if (aPointOnSurfacePairWithRange->HasLowerLimitPitch()) + { + theSW.Send(aPointOnSurfacePairWithRange->LowerLimitPitch()); + } + else theSW.SendUndef(); + + if (aPointOnSurfacePairWithRange->HasUpperLimitPitch()) + { + theSW.Send(aPointOnSurfacePairWithRange->UpperLimitPitch()); + } + else theSW.SendUndef(); + + if (aPointOnSurfacePairWithRange->HasLowerLimitRoll()) + { + theSW.Send(aPointOnSurfacePairWithRange->LowerLimitRoll()); + } + else theSW.SendUndef(); + + if (aPointOnSurfacePairWithRange->HasUpperLimitRoll()) + { + theSW.Send(aPointOnSurfacePairWithRange->UpperLimitRoll()); + } + else theSW.SendUndef(); + } + } + else if (theEnt->GetOrderKinematicPair()->IsKind(STANDARD_TYPE(StepKinematics_PlanarCurvePair))) + { + theSW.StartEntity("PLANAR_CURVE_PAIR"); + Handle(StepKinematics_PlanarCurvePair) aPlanarCurvePair = Handle(StepKinematics_PlanarCurvePair)::DownCast(theEnt->GetOrderKinematicPair()); + // Own fields of PlanarCurvePair + + theSW.Send(aPlanarCurvePair->Curve1()); + + theSW.Send(aPlanarCurvePair->Curve2()); + + theSW.StartEntity("(PLANAR_CURVE_PAIR_RANGE"); + if (theEnt->GetOrderKinematicPair()->IsKind(STANDARD_TYPE(StepKinematics_PlanarCurvePairRange))) + { + Handle(StepKinematics_PlanarCurvePairRange) aPlanarCurvePairRange = Handle(StepKinematics_PlanarCurvePairRange)::DownCast(theEnt->GetOrderKinematicPair()); + // Own fields of PlanarCurvePairRange + + theSW.Send(aPlanarCurvePairRange->RangeOnCurve1()); + + theSW.Send(aPlanarCurvePairRange->RangeOnCurve2()); + } + } + else if (theEnt->GetOrderKinematicPair()->IsKind(STANDARD_TYPE(StepKinematics_SurfacePair))) + { + theSW.StartEntity("SURFACE_PAIR"); + Handle(StepKinematics_SurfacePair) aSurfacePair = Handle(StepKinematics_SurfacePair)::DownCast(theEnt->GetOrderKinematicPair()); + // Own fields of SurfacePair + + theSW.Send(aSurfacePair->Surface1()); + + theSW.Send(aSurfacePair->Surface2()); + + theSW.SendBoolean(aSurfacePair->Orientation()); + + theSW.StartEntity("(SURFACE_PAIR_WITH_RANGE"); + if (theEnt->GetOrderKinematicPair()->IsKind(STANDARD_TYPE(StepKinematics_SurfacePairWithRange))) + { + Handle(StepKinematics_SurfacePairWithRange) aSurfacePairWithRange = Handle(StepKinematics_SurfacePairWithRange)::DownCast(theEnt->GetOrderKinematicPair()); + // Own fields of SurfacePairWithRange + + theSW.Send(aSurfacePairWithRange->RangeOnSurface1()); + + theSW.Send(aSurfacePairWithRange->RangeOnSurface2()); + + if (aSurfacePairWithRange->HasLowerLimitActualRotation()) + { + theSW.Send(aSurfacePairWithRange->LowerLimitActualRotation()); + } + else theSW.SendUndef(); + + if (aSurfacePairWithRange->HasUpperLimitActualRotation()) + { + theSW.Send(aSurfacePairWithRange->UpperLimitActualRotation()); + } + else theSW.SendUndef(); + } + } + } + + // Own fields of RepresentationItem + theSW.StartEntity("REPRESENTATION_ITEM"); + theSW.Send(theEnt->Name()); +} + + +//======================================================================= +//function : Share +//purpose : +//======================================================================= +void RWStepKinematics_RWActuatedKinPairAndOrderKinPair::Share +(const Handle(StepKinematics_ActuatedKinPairAndOrderKinPair)& theEnt, + Interface_EntityIterator& iter) const +{ + iter.AddItem(theEnt->GetOrderKinematicPair()); + iter.AddItem(theEnt->GetOrderKinematicPair()->Joint()); + iter.AddItem(theEnt->GetActuatedKinematicPair()); + iter.AddItem(theEnt->GetOrderKinematicPair()->ItemDefinedTransformation()); +} diff --git a/src/RWStepKinematics/RWStepKinematics_RWActuatedKinPairAndOrderKinPair.hxx b/src/RWStepKinematics/RWStepKinematics_RWActuatedKinPairAndOrderKinPair.hxx new file mode 100644 index 0000000000..07a60a2119 --- /dev/null +++ b/src/RWStepKinematics/RWStepKinematics_RWActuatedKinPairAndOrderKinPair.hxx @@ -0,0 +1,47 @@ +// Created on: 2020-05-26 +// Created by: PASUKHIN DMITRY +// Copyright (c) 2015 OPEN CASCADE SAS +// +// This file is part of Open CASCADE Technology software library. +// +// This library is free software; you can redistribute it and/or modify it under +// the terms of the GNU Lesser General Public License version 2.1 as published +// by the Free Software Foundation, with special exception defined in the file +// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT +// distribution for complete text of the license and disclaimer of any warranty. +// +// Alternatively, this file may be used under the terms of Open CASCADE +// commercial license or contractual agreement. + +#ifndef _RWStepKinematics_RWActuatedKinPairAndOrderKinPair_HeaderFile +#define _RWStepKinematics_RWActuatedKinPairAndOrderKinPair_HeaderFile + +#include +#include +#include + +#include +class StepData_StepReaderData; +class Interface_Check; +class StepData_StepWriter; +class Interface_EntityIterator; +class StepKinematics_ActuatedKinPairAndOrderKinPair; + + +//! Read & Write Module for GeoTolAndGeoTolWthMod +class RWStepKinematics_RWActuatedKinPairAndOrderKinPair +{ +public: + + DEFINE_STANDARD_ALLOC + + + Standard_EXPORT RWStepKinematics_RWActuatedKinPairAndOrderKinPair(); + + Standard_EXPORT void ReadStep (const Handle(StepData_StepReaderData)& theData, const Standard_Integer theNum, Handle(Interface_Check)& theArch, const Handle(StepKinematics_ActuatedKinPairAndOrderKinPair)& theEnt) const; + + Standard_EXPORT void WriteStep (StepData_StepWriter& theSW, const Handle(StepKinematics_ActuatedKinPairAndOrderKinPair)& theEnt) const; + + Standard_EXPORT void Share (const Handle(StepKinematics_ActuatedKinPairAndOrderKinPair)& theEnt, Interface_EntityIterator& iter) const; +}; +#endif // _RWStepDimTol_RWGeoTolAndGeoTolWthMod_HeaderFile diff --git a/src/RWStepKinematics/RWStepKinematics_RWActuatedKinematicPair.cxx b/src/RWStepKinematics/RWStepKinematics_RWActuatedKinematicPair.cxx new file mode 100644 index 0000000000..81c6f23897 --- /dev/null +++ b/src/RWStepKinematics/RWStepKinematics_RWActuatedKinematicPair.cxx @@ -0,0 +1,318 @@ +// Created on : Sat May 02 12:41:15 2020 +// Created by: Irina KRYLOVA +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V3.0 +// Copyright (c) Open CASCADE 2020 +// +// This file is part of Open CASCADE Technology software library. +// +// This library is free software; you can redistribute it and/or modify it under +// the terms of the GNU Lesser General Public License version 2.1 as published +// by the Free Software Foundation, with special exception defined in the file +// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT +// distribution for complete text of the license and disclaimer of any warranty. +// +// Alternatively, this file may be used under the terms of Open CASCADE +// commercial license or contractual agreement. + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +//======================================================================= +//function : RWStepKinematics_RWActuatedKinematicPair +//purpose : +//======================================================================= +RWStepKinematics_RWActuatedKinematicPair::RWStepKinematics_RWActuatedKinematicPair() {} + + +//======================================================================= +//function : ReadStep +//purpose : +//======================================================================= +void RWStepKinematics_RWActuatedKinematicPair::ReadStep (const Handle(StepData_StepReaderData)& theData, + const Standard_Integer theNum, + Handle(Interface_Check)& theArch, + const Handle(StepKinematics_ActuatedKinematicPair)& theEnt) const +{ + // Check number of parameters + if ( ! theData->CheckNbParams(theNum,12,theArch,"actuated_kinematic_pair") ) return; + + // Inherited fields of RepresentationItem + + Handle(TCollection_HAsciiString) aRepresentationItem_Name; + theData->ReadString (theNum, 1, "representation_item.name", theArch, aRepresentationItem_Name); + + // Inherited fields of ItemDefinedTransformation + + Handle(TCollection_HAsciiString) aItemDefinedTransformation_Name; + theData->ReadString (theNum, 2, "item_defined_transformation.name", theArch, aItemDefinedTransformation_Name); + + Handle(TCollection_HAsciiString) aItemDefinedTransformation_Description; + Standard_Boolean hasItemDefinedTransformation_Description = Standard_True; + if ( theData->IsParamDefined (theNum,3) ) { + theData->ReadString (theNum, 3, "item_defined_transformation.description", theArch, aItemDefinedTransformation_Description); + } + else { + hasItemDefinedTransformation_Description = Standard_False; + aItemDefinedTransformation_Description.Nullify(); + } + + Handle(StepRepr_RepresentationItem) aItemDefinedTransformation_TransformItem1; + theData->ReadEntity (theNum, 4, "item_defined_transformation.transform_item1", theArch, STANDARD_TYPE(StepRepr_RepresentationItem), aItemDefinedTransformation_TransformItem1); + + Handle(StepRepr_RepresentationItem) aItemDefinedTransformation_TransformItem2; + theData->ReadEntity (theNum, 5, "item_defined_transformation.transform_item2", theArch, STANDARD_TYPE(StepRepr_RepresentationItem), aItemDefinedTransformation_TransformItem2); + + // Inherited fields of KinematicPair + + Handle(StepKinematics_KinematicJoint) aKinematicPair_Joint; + theData->ReadEntity (theNum, 6, "kinematic_pair.joint", theArch, STANDARD_TYPE(StepKinematics_KinematicJoint), aKinematicPair_Joint); + + // Own fields of ActuatedKinematicPair + + StepKinematics_ActuatedDirection aTX = StepKinematics_adNotActuated; + Standard_Boolean hasTX = Standard_True; + if ( theData->IsParamDefined (theNum,7) ) { + if (theData->ParamType (theNum, 7) == Interface_ParamEnum) { + Standard_CString text = theData->ParamCValue(theNum, 7); + if (strcmp(text, ".BIDIRECTIONAL.")) aTX = StepKinematics_adBidirectional; + else if (strcmp(text, ".POSITIVE_ONLY.")) aTX = StepKinematics_adPositiveOnly; + else if (strcmp(text, ".NEGATIVE_ONLY.")) aTX = StepKinematics_adNegativeOnly; + else if (strcmp(text, ".NOT_ACTUATED.")) aTX = StepKinematics_adNotActuated; + else theArch->AddFail("Parameter #7 (t_x) has not allowed value"); + } + else theArch->AddFail("Parameter #7 (t_x) is not enumeration"); + } + else { + hasTX = Standard_False; + } + + StepKinematics_ActuatedDirection aTY = StepKinematics_adNotActuated; + Standard_Boolean hasTY = Standard_True; + if ( theData->IsParamDefined (theNum,8) ) { + if (theData->ParamType (theNum, 8) == Interface_ParamEnum) { + Standard_CString text = theData->ParamCValue(theNum, 8); + if (strcmp(text, ".BIDIRECTIONAL.")) aTY = StepKinematics_adBidirectional; + else if (strcmp(text, ".POSITIVE_ONLY.")) aTY = StepKinematics_adPositiveOnly; + else if (strcmp(text, ".NEGATIVE_ONLY.")) aTY = StepKinematics_adNegativeOnly; + else if (strcmp(text, ".NOT_ACTUATED.")) aTY = StepKinematics_adNotActuated; + else theArch->AddFail("Parameter #8 (t_y) has not allowed value"); + } + else theArch->AddFail("Parameter #8 (t_y) is not enumeration"); + } + else { + hasTY = Standard_False; + } + + StepKinematics_ActuatedDirection aTZ = StepKinematics_adNotActuated; + Standard_Boolean hasTZ = Standard_True; + if ( theData->IsParamDefined (theNum,9) ) { + if (theData->ParamType (theNum, 9) == Interface_ParamEnum) { + Standard_CString text = theData->ParamCValue(theNum, 9); + if (strcmp(text, ".BIDIRECTIONAL.")) aTZ = StepKinematics_adBidirectional; + else if (strcmp(text, ".POSITIVE_ONLY.")) aTZ = StepKinematics_adPositiveOnly; + else if (strcmp(text, ".NEGATIVE_ONLY.")) aTZ = StepKinematics_adNegativeOnly; + else if (strcmp(text, ".NOT_ACTUATED.")) aTZ = StepKinematics_adNotActuated; + else theArch->AddFail("Parameter #9 (t_z) has not allowed value"); + } + else theArch->AddFail("Parameter #9 (t_z) is not enumeration"); + } + else { + hasTZ = Standard_False; + } + + StepKinematics_ActuatedDirection aRX = StepKinematics_adNotActuated; + Standard_Boolean hasRX = Standard_True; + if ( theData->IsParamDefined (theNum,10) ) { + if (theData->ParamType (theNum, 10) == Interface_ParamEnum) { + Standard_CString text = theData->ParamCValue(theNum, 10); + if (strcmp(text, ".BIDIRECTIONAL.")) aRX = StepKinematics_adBidirectional; + else if (strcmp(text, ".POSITIVE_ONLY.")) aRX = StepKinematics_adPositiveOnly; + else if (strcmp(text, ".NEGATIVE_ONLY.")) aRX = StepKinematics_adNegativeOnly; + else if (strcmp(text, ".NOT_ACTUATED.")) aRX = StepKinematics_adNotActuated; + else theArch->AddFail("Parameter #10 (r_x) has not allowed value"); + } + else theArch->AddFail("Parameter #10 (r_x) is not enumeration"); + } + else { + hasRX = Standard_False; + } + + StepKinematics_ActuatedDirection aRY = StepKinematics_adNotActuated; + Standard_Boolean hasRY = Standard_True; + if ( theData->IsParamDefined (theNum,11) ) { + if (theData->ParamType (theNum, 11) == Interface_ParamEnum) { + Standard_CString text = theData->ParamCValue(theNum, 11); + if (strcmp(text, ".BIDIRECTIONAL.")) aRY = StepKinematics_adBidirectional; + else if (strcmp(text, ".POSITIVE_ONLY.")) aRY = StepKinematics_adPositiveOnly; + else if (strcmp(text, ".NEGATIVE_ONLY.")) aRY = StepKinematics_adNegativeOnly; + else if (strcmp(text, ".NOT_ACTUATED.")) aRY = StepKinematics_adNotActuated; + else theArch->AddFail("Parameter #11 (r_y) has not allowed value"); + } + else theArch->AddFail("Parameter #11 (r_y) is not enumeration"); + } + else { + hasRY = Standard_False; + } + + StepKinematics_ActuatedDirection aRZ = StepKinematics_adNotActuated; + Standard_Boolean hasRZ = Standard_True; + if ( theData->IsParamDefined (theNum,12) ) { + if (theData->ParamType (theNum, 12) == Interface_ParamEnum) { + Standard_CString text = theData->ParamCValue(theNum, 12); + if (strcmp(text, ".BIDIRECTIONAL.")) aRZ = StepKinematics_adBidirectional; + else if (strcmp(text, ".POSITIVE_ONLY.")) aRZ = StepKinematics_adPositiveOnly; + else if (strcmp(text, ".NEGATIVE_ONLY.")) aRZ = StepKinematics_adNegativeOnly; + else if (strcmp(text, ".NOT_ACTUATED.")) aRZ = StepKinematics_adNotActuated; + else theArch->AddFail("Parameter #12 (r_z) has not allowed value"); + } + else theArch->AddFail("Parameter #12 (r_z) is not enumeration"); + } + else { + hasRZ = Standard_False; + } + + // Initialize entity + theEnt->Init(aRepresentationItem_Name, + aItemDefinedTransformation_Name, + hasItemDefinedTransformation_Description, + aItemDefinedTransformation_Description, + aItemDefinedTransformation_TransformItem1, + aItemDefinedTransformation_TransformItem2, + aKinematicPair_Joint, + hasTX, + aTX, + hasTY, + aTY, + hasTZ, + aTZ, + hasRX, + aRX, + hasRY, + aRY, + hasRZ, + aRZ); +} + +//======================================================================= +//function : WriteStep +//purpose : +//======================================================================= +void RWStepKinematics_RWActuatedKinematicPair::WriteStep (StepData_StepWriter& theSW, + const Handle(StepKinematics_ActuatedKinematicPair)& theEnt) const +{ + + // Own fields of RepresentationItem + + theSW.Send (theEnt->Name()); + + // Inherited fields of ItemDefinedTransformation + + theSW.Send (theEnt->ItemDefinedTransformation()->Name()); + + if ( theEnt->ItemDefinedTransformation()->HasDescription() ) { + theSW.Send (theEnt->ItemDefinedTransformation()->Description()); + } + else theSW.SendUndef(); + + theSW.Send (theEnt->ItemDefinedTransformation()->TransformItem1()); + + theSW.Send (theEnt->ItemDefinedTransformation()->TransformItem2()); + + // Own fields of KinematicPair + + theSW.Send (theEnt->Joint()); + + // Own fields of ActuatedKinematicPair + + if ( theEnt->HasTX() ) { + switch (theEnt->TX()) { + case StepKinematics_adBidirectional: theSW.SendEnum (".BIDIRECTIONAL."); break; + case StepKinematics_adPositiveOnly: theSW.SendEnum (".POSITIVE_ONLY."); break; + case StepKinematics_adNegativeOnly: theSW.SendEnum (".NEGATIVE_ONLY."); break; + case StepKinematics_adNotActuated: theSW.SendEnum (".NOT_ACTUATED."); break; + } + } + else theSW.SendUndef(); + + if ( theEnt->HasTY() ) { + switch (theEnt->TY()) { + case StepKinematics_adBidirectional: theSW.SendEnum (".BIDIRECTIONAL."); break; + case StepKinematics_adPositiveOnly: theSW.SendEnum (".POSITIVE_ONLY."); break; + case StepKinematics_adNegativeOnly: theSW.SendEnum (".NEGATIVE_ONLY."); break; + case StepKinematics_adNotActuated: theSW.SendEnum (".NOT_ACTUATED."); break; + } + } + else theSW.SendUndef(); + + if ( theEnt->HasTZ() ) { + switch (theEnt->TZ()) { + case StepKinematics_adBidirectional: theSW.SendEnum (".BIDIRECTIONAL."); break; + case StepKinematics_adPositiveOnly: theSW.SendEnum (".POSITIVE_ONLY."); break; + case StepKinematics_adNegativeOnly: theSW.SendEnum (".NEGATIVE_ONLY."); break; + case StepKinematics_adNotActuated: theSW.SendEnum (".NOT_ACTUATED."); break; + } + } + else theSW.SendUndef(); + + if ( theEnt->HasRX() ) { + switch (theEnt->RX()) { + case StepKinematics_adBidirectional: theSW.SendEnum (".BIDIRECTIONAL."); break; + case StepKinematics_adPositiveOnly: theSW.SendEnum (".POSITIVE_ONLY."); break; + case StepKinematics_adNegativeOnly: theSW.SendEnum (".NEGATIVE_ONLY."); break; + case StepKinematics_adNotActuated: theSW.SendEnum (".NOT_ACTUATED."); break; + } + } + else theSW.SendUndef(); + + if ( theEnt->HasRY() ) { + switch (theEnt->RY()) { + case StepKinematics_adBidirectional: theSW.SendEnum (".BIDIRECTIONAL."); break; + case StepKinematics_adPositiveOnly: theSW.SendEnum (".POSITIVE_ONLY."); break; + case StepKinematics_adNegativeOnly: theSW.SendEnum (".NEGATIVE_ONLY."); break; + case StepKinematics_adNotActuated: theSW.SendEnum (".NOT_ACTUATED."); break; + } + } + else theSW.SendUndef(); + + if ( theEnt->HasRZ() ) { + switch (theEnt->RZ()) { + case StepKinematics_adBidirectional: theSW.SendEnum (".BIDIRECTIONAL."); break; + case StepKinematics_adPositiveOnly: theSW.SendEnum (".POSITIVE_ONLY."); break; + case StepKinematics_adNegativeOnly: theSW.SendEnum (".NEGATIVE_ONLY."); break; + case StepKinematics_adNotActuated: theSW.SendEnum (".NOT_ACTUATED."); break; + } + } + else theSW.SendUndef(); +} + +//======================================================================= +//function : Share +//purpose : +//======================================================================= +void RWStepKinematics_RWActuatedKinematicPair::Share (const Handle(StepKinematics_ActuatedKinematicPair)& theEnt, + Interface_EntityIterator& iter) const +{ + + // Inherited fields of RepresentationItem + + // Inherited fields of ItemDefinedTransformation + + iter.AddItem (theEnt->ItemDefinedTransformation()->TransformItem1()); + + iter.AddItem (theEnt->ItemDefinedTransformation()->TransformItem2()); + + // Inherited fields of KinematicPair + + iter.AddItem (theEnt->StepKinematics_KinematicPair::Joint()); + + // Own fields of ActuatedKinematicPair +} diff --git a/src/RWStepKinematics/RWStepKinematics_RWActuatedKinematicPair.hxx b/src/RWStepKinematics/RWStepKinematics_RWActuatedKinematicPair.hxx new file mode 100644 index 0000000000..353c7e9813 --- /dev/null +++ b/src/RWStepKinematics/RWStepKinematics_RWActuatedKinematicPair.hxx @@ -0,0 +1,46 @@ +// Created on : Sat May 02 12:41:15 2020 +// Created by: Irina KRYLOVA +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V3.0 +// Copyright (c) Open CASCADE 2020 +// +// 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 _RWStepKinematics_RWActuatedKinematicPair_HeaderFile_ +#define _RWStepKinematics_RWActuatedKinematicPair_HeaderFile_ + +#include +#include +#include + +class StepData_StepReaderData; +class Interface_Check; +class StepData_StepWriter; +class Interface_EntityIterator; +class StepKinematics_ActuatedKinematicPair; + +//! Read & Write tool for ActuatedKinematicPair +class RWStepKinematics_RWActuatedKinematicPair +{ +public: + + DEFINE_STANDARD_ALLOC + + Standard_EXPORT RWStepKinematics_RWActuatedKinematicPair(); + + Standard_EXPORT void ReadStep(const Handle(StepData_StepReaderData)& theData, const Standard_Integer theNum, Handle(Interface_Check)& theArch, const Handle(StepKinematics_ActuatedKinematicPair)& theEnt) const; + + Standard_EXPORT void WriteStep(StepData_StepWriter& theSW, const Handle(StepKinematics_ActuatedKinematicPair)& theEnt) const; + + Standard_EXPORT void Share(const Handle(StepKinematics_ActuatedKinematicPair)& theEnt, Interface_EntityIterator& iter) const; + +}; +#endif // _RWStepKinematics_RWActuatedKinematicPair_HeaderFile_ diff --git a/src/RWStepKinematics/RWStepKinematics_RWContextDependentKinematicLinkRepresentation.cxx b/src/RWStepKinematics/RWStepKinematics_RWContextDependentKinematicLinkRepresentation.cxx new file mode 100644 index 0000000000..104f157268 --- /dev/null +++ b/src/RWStepKinematics/RWStepKinematics_RWContextDependentKinematicLinkRepresentation.cxx @@ -0,0 +1,86 @@ +// Created on : Sat May 02 12:41:15 2020 +// Created by: Irina KRYLOVA +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V3.0 +// Copyright (c) Open CASCADE 2020 +// +// This file is part of Open CASCADE Technology software library. +// +// This library is free software; you can redistribute it and/or modify it under +// the terms of the GNU Lesser General Public License version 2.1 as published +// by the Free Software Foundation, with special exception defined in the file +// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT +// distribution for complete text of the license and disclaimer of any warranty. +// +// Alternatively, this file may be used under the terms of Open CASCADE +// commercial license or contractual agreement. + +#include + +#include +#include +#include +#include +#include +#include + +//======================================================================= +//function : RWStepKinematics_RWContextDependentKinematicLinkRepresentation +//purpose : +//======================================================================= +RWStepKinematics_RWContextDependentKinematicLinkRepresentation::RWStepKinematics_RWContextDependentKinematicLinkRepresentation() {} + + +//======================================================================= +//function : ReadStep +//purpose : +//======================================================================= +void RWStepKinematics_RWContextDependentKinematicLinkRepresentation::ReadStep (const Handle(StepData_StepReaderData)& theData, + const Standard_Integer theNum, + Handle(Interface_Check)& theArch, + const Handle(StepKinematics_ContextDependentKinematicLinkRepresentation)& theEnt) const +{ + // Check number of parameters + if ( ! theData->CheckNbParams(theNum,2,theArch,"context_dependent_kinematic_link_representation") ) return; + + // Own fields of ContextDependentKinematicLinkRepresentation + + Handle(StepKinematics_KinematicLinkRepresentationAssociation) aRepresentationRelation; + theData->ReadEntity (theNum, 1, "representation_relation", theArch, STANDARD_TYPE(StepKinematics_KinematicLinkRepresentationAssociation), aRepresentationRelation); + + Handle(StepKinematics_ProductDefinitionRelationshipKinematics) aRepresentedProductRelation; + theData->ReadEntity (theNum, 2, "represented_product_relation", theArch, STANDARD_TYPE(StepKinematics_ProductDefinitionRelationshipKinematics), aRepresentedProductRelation); + + // Initialize entity + theEnt->Init(aRepresentationRelation, + aRepresentedProductRelation); +} + +//======================================================================= +//function : WriteStep +//purpose : +//======================================================================= +void RWStepKinematics_RWContextDependentKinematicLinkRepresentation::WriteStep (StepData_StepWriter& theSW, + const Handle(StepKinematics_ContextDependentKinematicLinkRepresentation)& theEnt) const +{ + + // Own fields of ContextDependentKinematicLinkRepresentation + + theSW.Send (theEnt->RepresentationRelation()); + + theSW.Send (theEnt->RepresentedProductRelation()); +} + +//======================================================================= +//function : Share +//purpose : +//======================================================================= +void RWStepKinematics_RWContextDependentKinematicLinkRepresentation::Share (const Handle(StepKinematics_ContextDependentKinematicLinkRepresentation)& theEnt, + Interface_EntityIterator& iter) const +{ + + // Own fields of ContextDependentKinematicLinkRepresentation + + iter.AddItem (theEnt->RepresentationRelation()); + + iter.AddItem (theEnt->RepresentedProductRelation()); +} diff --git a/src/RWStepKinematics/RWStepKinematics_RWContextDependentKinematicLinkRepresentation.hxx b/src/RWStepKinematics/RWStepKinematics_RWContextDependentKinematicLinkRepresentation.hxx new file mode 100644 index 0000000000..f905b20aed --- /dev/null +++ b/src/RWStepKinematics/RWStepKinematics_RWContextDependentKinematicLinkRepresentation.hxx @@ -0,0 +1,46 @@ +// Created on : Sat May 02 12:41:15 2020 +// Created by: Irina KRYLOVA +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V3.0 +// Copyright (c) Open CASCADE 2020 +// +// 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 _RWStepKinematics_RWContextDependentKinematicLinkRepresentation_HeaderFile_ +#define _RWStepKinematics_RWContextDependentKinematicLinkRepresentation_HeaderFile_ + +#include +#include +#include + +class StepData_StepReaderData; +class Interface_Check; +class StepData_StepWriter; +class Interface_EntityIterator; +class StepKinematics_ContextDependentKinematicLinkRepresentation; + +//! Read & Write tool for ContextDependentKinematicLinkRepresentation +class RWStepKinematics_RWContextDependentKinematicLinkRepresentation +{ +public: + + DEFINE_STANDARD_ALLOC + + Standard_EXPORT RWStepKinematics_RWContextDependentKinematicLinkRepresentation(); + + Standard_EXPORT void ReadStep(const Handle(StepData_StepReaderData)& theData, const Standard_Integer theNum, Handle(Interface_Check)& theArch, const Handle(StepKinematics_ContextDependentKinematicLinkRepresentation)& theEnt) const; + + Standard_EXPORT void WriteStep(StepData_StepWriter& theSW, const Handle(StepKinematics_ContextDependentKinematicLinkRepresentation)& theEnt) const; + + Standard_EXPORT void Share(const Handle(StepKinematics_ContextDependentKinematicLinkRepresentation)& theEnt, Interface_EntityIterator& iter) const; + +}; +#endif // _RWStepKinematics_RWContextDependentKinematicLinkRepresentation_HeaderFile_ diff --git a/src/RWStepKinematics/RWStepKinematics_RWCylindricalPair.cxx b/src/RWStepKinematics/RWStepKinematics_RWCylindricalPair.cxx new file mode 100644 index 0000000000..23a0f027d5 --- /dev/null +++ b/src/RWStepKinematics/RWStepKinematics_RWCylindricalPair.cxx @@ -0,0 +1,180 @@ +// Created on : Sat May 02 12:41:15 2020 +// Created by: Irina KRYLOVA +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V3.0 +// Copyright (c) Open CASCADE 2020 +// +// This file is part of Open CASCADE Technology software library. +// +// This library is free software; you can redistribute it and/or modify it under +// the terms of the GNU Lesser General Public License version 2.1 as published +// by the Free Software Foundation, with special exception defined in the file +// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT +// distribution for complete text of the license and disclaimer of any warranty. +// +// Alternatively, this file may be used under the terms of Open CASCADE +// commercial license or contractual agreement. + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +//======================================================================= +//function : RWStepKinematics_RWCylindricalPair +//purpose : +//======================================================================= +RWStepKinematics_RWCylindricalPair::RWStepKinematics_RWCylindricalPair() {} + + +//======================================================================= +//function : ReadStep +//purpose : +//======================================================================= +void RWStepKinematics_RWCylindricalPair::ReadStep (const Handle(StepData_StepReaderData)& theData, + const Standard_Integer theNum, + Handle(Interface_Check)& theArch, + const Handle(StepKinematics_CylindricalPair)& theEnt) const +{ + // Check number of parameters + if ( ! theData->CheckNbParams(theNum,12,theArch,"cylindrical_pair") ) return; + + // Inherited fields of RepresentationItem + + Handle(TCollection_HAsciiString) aRepresentationItem_Name; + theData->ReadString (theNum, 1, "representation_item.name", theArch, aRepresentationItem_Name); + + // Inherited fields of ItemDefinedTransformation + + Handle(TCollection_HAsciiString) aItemDefinedTransformation_Name; + theData->ReadString (theNum, 2, "item_defined_transformation.name", theArch, aItemDefinedTransformation_Name); + + Handle(TCollection_HAsciiString) aItemDefinedTransformation_Description; + Standard_Boolean hasItemDefinedTransformation_Description = Standard_True; + if ( theData->IsParamDefined (theNum,3) ) { + theData->ReadString (theNum, 3, "item_defined_transformation.description", theArch, aItemDefinedTransformation_Description); + } + else { + hasItemDefinedTransformation_Description = Standard_False; + aItemDefinedTransformation_Description.Nullify(); + } + + Handle(StepRepr_RepresentationItem) aItemDefinedTransformation_TransformItem1; + theData->ReadEntity (theNum, 4, "item_defined_transformation.transform_item1", theArch, STANDARD_TYPE(StepRepr_RepresentationItem), aItemDefinedTransformation_TransformItem1); + + Handle(StepRepr_RepresentationItem) aItemDefinedTransformation_TransformItem2; + theData->ReadEntity (theNum, 5, "item_defined_transformation.transform_item2", theArch, STANDARD_TYPE(StepRepr_RepresentationItem), aItemDefinedTransformation_TransformItem2); + + // Inherited fields of KinematicPair + + Handle(StepKinematics_KinematicJoint) aKinematicPair_Joint; + theData->ReadEntity (theNum, 6, "kinematic_pair.joint", theArch, STANDARD_TYPE(StepKinematics_KinematicJoint), aKinematicPair_Joint); + + // Inherited fields of LowOrderKinematicPair + + Standard_Boolean aLowOrderKinematicPair_TX; + theData->ReadBoolean (theNum, 7, "low_order_kinematic_pair.t_x", theArch, aLowOrderKinematicPair_TX); + + Standard_Boolean aLowOrderKinematicPair_TY; + theData->ReadBoolean (theNum, 8, "low_order_kinematic_pair.t_y", theArch, aLowOrderKinematicPair_TY); + + Standard_Boolean aLowOrderKinematicPair_TZ; + theData->ReadBoolean (theNum, 9, "low_order_kinematic_pair.t_z", theArch, aLowOrderKinematicPair_TZ); + + Standard_Boolean aLowOrderKinematicPair_RX; + theData->ReadBoolean (theNum, 10, "low_order_kinematic_pair.r_x", theArch, aLowOrderKinematicPair_RX); + + Standard_Boolean aLowOrderKinematicPair_RY; + theData->ReadBoolean (theNum, 11, "low_order_kinematic_pair.r_y", theArch, aLowOrderKinematicPair_RY); + + Standard_Boolean aLowOrderKinematicPair_RZ; + theData->ReadBoolean (theNum, 12, "low_order_kinematic_pair.r_z", theArch, aLowOrderKinematicPair_RZ); + + // Initialize entity + theEnt->Init(aRepresentationItem_Name, + aItemDefinedTransformation_Name, + hasItemDefinedTransformation_Description, + aItemDefinedTransformation_Description, + aItemDefinedTransformation_TransformItem1, + aItemDefinedTransformation_TransformItem2, + aKinematicPair_Joint, + aLowOrderKinematicPair_TX, + aLowOrderKinematicPair_TY, + aLowOrderKinematicPair_TZ, + aLowOrderKinematicPair_RX, + aLowOrderKinematicPair_RY, + aLowOrderKinematicPair_RZ); +} + +//======================================================================= +//function : WriteStep +//purpose : +//======================================================================= +void RWStepKinematics_RWCylindricalPair::WriteStep (StepData_StepWriter& theSW, + const Handle(StepKinematics_CylindricalPair)& theEnt) const +{ + + // Own fields of RepresentationItem + + theSW.Send (theEnt->Name()); + + // Inherited fields of ItemDefinedTransformation + + theSW.Send (theEnt->ItemDefinedTransformation()->Name()); + + if ( theEnt->ItemDefinedTransformation()->HasDescription() ) { + theSW.Send (theEnt->ItemDefinedTransformation()->Description()); + } + else theSW.SendUndef(); + + theSW.Send (theEnt->ItemDefinedTransformation()->TransformItem1()); + + theSW.Send (theEnt->ItemDefinedTransformation()->TransformItem2()); + + // Own fields of KinematicPair + + theSW.Send (theEnt->Joint()); + + // Own fields of LowOrderKinematicPair + + theSW.SendBoolean (theEnt->TX()); + + theSW.SendBoolean (theEnt->TY()); + + theSW.SendBoolean (theEnt->TZ()); + + theSW.SendBoolean (theEnt->RX()); + + theSW.SendBoolean (theEnt->RY()); + + theSW.SendBoolean (theEnt->RZ()); +} + +//======================================================================= +//function : Share +//purpose : +//======================================================================= +void RWStepKinematics_RWCylindricalPair::Share (const Handle(StepKinematics_CylindricalPair)& theEnt, + Interface_EntityIterator& iter) const +{ + + // Inherited fields of RepresentationItem + + // Inherited fields of ItemDefinedTransformation + + iter.AddItem (theEnt->ItemDefinedTransformation()->TransformItem1()); + + iter.AddItem (theEnt->ItemDefinedTransformation()->TransformItem2()); + + // Inherited fields of KinematicPair + + iter.AddItem (theEnt->StepKinematics_KinematicPair::Joint()); + + // Inherited fields of LowOrderKinematicPair +} diff --git a/src/RWStepKinematics/RWStepKinematics_RWCylindricalPair.hxx b/src/RWStepKinematics/RWStepKinematics_RWCylindricalPair.hxx new file mode 100644 index 0000000000..bccc2d4764 --- /dev/null +++ b/src/RWStepKinematics/RWStepKinematics_RWCylindricalPair.hxx @@ -0,0 +1,46 @@ +// Created on : Sat May 02 12:41:15 2020 +// Created by: Irina KRYLOVA +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V3.0 +// Copyright (c) Open CASCADE 2020 +// +// 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 _RWStepKinematics_RWCylindricalPair_HeaderFile_ +#define _RWStepKinematics_RWCylindricalPair_HeaderFile_ + +#include +#include +#include + +class StepData_StepReaderData; +class Interface_Check; +class StepData_StepWriter; +class Interface_EntityIterator; +class StepKinematics_CylindricalPair; + +//! Read & Write tool for CylindricalPair +class RWStepKinematics_RWCylindricalPair +{ +public: + + DEFINE_STANDARD_ALLOC + + Standard_EXPORT RWStepKinematics_RWCylindricalPair(); + + Standard_EXPORT void ReadStep(const Handle(StepData_StepReaderData)& theData, const Standard_Integer theNum, Handle(Interface_Check)& theArch, const Handle(StepKinematics_CylindricalPair)& theEnt) const; + + Standard_EXPORT void WriteStep(StepData_StepWriter& theSW, const Handle(StepKinematics_CylindricalPair)& theEnt) const; + + Standard_EXPORT void Share(const Handle(StepKinematics_CylindricalPair)& theEnt, Interface_EntityIterator& iter) const; + +}; +#endif // _RWStepKinematics_RWCylindricalPair_HeaderFile_ diff --git a/src/RWStepKinematics/RWStepKinematics_RWCylindricalPairValue.cxx b/src/RWStepKinematics/RWStepKinematics_RWCylindricalPairValue.cxx new file mode 100644 index 0000000000..3b7583aa2c --- /dev/null +++ b/src/RWStepKinematics/RWStepKinematics_RWCylindricalPairValue.cxx @@ -0,0 +1,109 @@ +// Created on : Sat May 02 12:41:15 2020 +// Created by: Irina KRYLOVA +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V3.0 +// Copyright (c) Open CASCADE 2020 +// +// This file is part of Open CASCADE Technology software library. +// +// This library is free software; you can redistribute it and/or modify it under +// the terms of the GNU Lesser General Public License version 2.1 as published +// by the Free Software Foundation, with special exception defined in the file +// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT +// distribution for complete text of the license and disclaimer of any warranty. +// +// Alternatively, this file may be used under the terms of Open CASCADE +// commercial license or contractual agreement. + +#include + +#include +#include +#include +#include +#include +#include +#include + +//======================================================================= +//function : RWStepKinematics_RWCylindricalPairValue +//purpose : +//======================================================================= +RWStepKinematics_RWCylindricalPairValue::RWStepKinematics_RWCylindricalPairValue() {} + + +//======================================================================= +//function : ReadStep +//purpose : +//======================================================================= +void RWStepKinematics_RWCylindricalPairValue::ReadStep (const Handle(StepData_StepReaderData)& theData, + const Standard_Integer theNum, + Handle(Interface_Check)& theArch, + const Handle(StepKinematics_CylindricalPairValue)& theEnt) const +{ + // Check number of parameters + if ( ! theData->CheckNbParams(theNum,4,theArch,"cylindrical_pair_value") ) return; + + // Inherited fields of RepresentationItem + + Handle(TCollection_HAsciiString) aRepresentationItem_Name; + theData->ReadString (theNum, 1, "representation_item.name", theArch, aRepresentationItem_Name); + + // Inherited fields of PairValue + + Handle(StepKinematics_KinematicPair) aPairValue_AppliesToPair; + theData->ReadEntity (theNum, 2, "pair_value.applies_to_pair", theArch, STANDARD_TYPE(StepKinematics_KinematicPair), aPairValue_AppliesToPair); + + // Own fields of CylindricalPairValue + + Standard_Real aActualTranslation; + theData->ReadReal (theNum, 3, "actual_translation", theArch, aActualTranslation); + + Standard_Real aActualRotation; + theData->ReadReal (theNum, 4, "actual_rotation", theArch, aActualRotation); + + // Initialize entity + theEnt->Init(aRepresentationItem_Name, + aPairValue_AppliesToPair, + aActualTranslation, + aActualRotation); +} + +//======================================================================= +//function : WriteStep +//purpose : +//======================================================================= +void RWStepKinematics_RWCylindricalPairValue::WriteStep (StepData_StepWriter& theSW, + const Handle(StepKinematics_CylindricalPairValue)& theEnt) const +{ + + // Own fields of RepresentationItem + + theSW.Send (theEnt->Name()); + + // Own fields of PairValue + + theSW.Send (theEnt->AppliesToPair()); + + // Own fields of CylindricalPairValue + + theSW.Send (theEnt->ActualTranslation()); + + theSW.Send (theEnt->ActualRotation()); +} + +//======================================================================= +//function : Share +//purpose : +//======================================================================= +void RWStepKinematics_RWCylindricalPairValue::Share (const Handle(StepKinematics_CylindricalPairValue)& theEnt, + Interface_EntityIterator& iter) const +{ + + // Inherited fields of RepresentationItem + + // Inherited fields of PairValue + + iter.AddItem (theEnt->StepKinematics_PairValue::AppliesToPair()); + + // Own fields of CylindricalPairValue +} diff --git a/src/RWStepKinematics/RWStepKinematics_RWCylindricalPairValue.hxx b/src/RWStepKinematics/RWStepKinematics_RWCylindricalPairValue.hxx new file mode 100644 index 0000000000..c4449c6dac --- /dev/null +++ b/src/RWStepKinematics/RWStepKinematics_RWCylindricalPairValue.hxx @@ -0,0 +1,46 @@ +// Created on : Sat May 02 12:41:15 2020 +// Created by: Irina KRYLOVA +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V3.0 +// Copyright (c) Open CASCADE 2020 +// +// 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 _RWStepKinematics_RWCylindricalPairValue_HeaderFile_ +#define _RWStepKinematics_RWCylindricalPairValue_HeaderFile_ + +#include +#include +#include + +class StepData_StepReaderData; +class Interface_Check; +class StepData_StepWriter; +class Interface_EntityIterator; +class StepKinematics_CylindricalPairValue; + +//! Read & Write tool for CylindricalPairValue +class RWStepKinematics_RWCylindricalPairValue +{ +public: + + DEFINE_STANDARD_ALLOC + + Standard_EXPORT RWStepKinematics_RWCylindricalPairValue(); + + Standard_EXPORT void ReadStep(const Handle(StepData_StepReaderData)& theData, const Standard_Integer theNum, Handle(Interface_Check)& theArch, const Handle(StepKinematics_CylindricalPairValue)& theEnt) const; + + Standard_EXPORT void WriteStep(StepData_StepWriter& theSW, const Handle(StepKinematics_CylindricalPairValue)& theEnt) const; + + Standard_EXPORT void Share(const Handle(StepKinematics_CylindricalPairValue)& theEnt, Interface_EntityIterator& iter) const; + +}; +#endif // _RWStepKinematics_RWCylindricalPairValue_HeaderFile_ diff --git a/src/RWStepKinematics/RWStepKinematics_RWCylindricalPairWithRange.cxx b/src/RWStepKinematics/RWStepKinematics_RWCylindricalPairWithRange.cxx new file mode 100644 index 0000000000..b31ac4ff3a --- /dev/null +++ b/src/RWStepKinematics/RWStepKinematics_RWCylindricalPairWithRange.cxx @@ -0,0 +1,255 @@ +// Created on : Sat May 02 12:41:15 2020 +// Created by: Irina KRYLOVA +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V3.0 +// Copyright (c) Open CASCADE 2020 +// +// This file is part of Open CASCADE Technology software library. +// +// This library is free software; you can redistribute it and/or modify it under +// the terms of the GNU Lesser General Public License version 2.1 as published +// by the Free Software Foundation, with special exception defined in the file +// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT +// distribution for complete text of the license and disclaimer of any warranty. +// +// Alternatively, this file may be used under the terms of Open CASCADE +// commercial license or contractual agreement. + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +//======================================================================= +//function : RWStepKinematics_RWCylindricalPairWithRange +//purpose : +//======================================================================= +RWStepKinematics_RWCylindricalPairWithRange::RWStepKinematics_RWCylindricalPairWithRange() {} + + +//======================================================================= +//function : ReadStep +//purpose : +//======================================================================= +void RWStepKinematics_RWCylindricalPairWithRange::ReadStep (const Handle(StepData_StepReaderData)& theData, + const Standard_Integer theNum, + Handle(Interface_Check)& theArch, + const Handle(StepKinematics_CylindricalPairWithRange)& theEnt) const +{ + // Check number of parameters + if ( ! theData->CheckNbParams(theNum,16,theArch,"cylindrical_pair_with_range") ) return; + + // Inherited fields of RepresentationItem + + Handle(TCollection_HAsciiString) aRepresentationItem_Name; + theData->ReadString (theNum, 1, "representation_item.name", theArch, aRepresentationItem_Name); + + // Inherited fields of ItemDefinedTransformation + + Handle(TCollection_HAsciiString) aItemDefinedTransformation_Name; + theData->ReadString (theNum, 2, "item_defined_transformation.name", theArch, aItemDefinedTransformation_Name); + + Handle(TCollection_HAsciiString) aItemDefinedTransformation_Description; + Standard_Boolean hasItemDefinedTransformation_Description = Standard_True; + if ( theData->IsParamDefined (theNum,3) ) { + theData->ReadString (theNum, 3, "item_defined_transformation.description", theArch, aItemDefinedTransformation_Description); + } + else { + hasItemDefinedTransformation_Description = Standard_False; + aItemDefinedTransformation_Description.Nullify(); + } + + Handle(StepRepr_RepresentationItem) aItemDefinedTransformation_TransformItem1; + theData->ReadEntity (theNum, 4, "item_defined_transformation.transform_item1", theArch, STANDARD_TYPE(StepRepr_RepresentationItem), aItemDefinedTransformation_TransformItem1); + + Handle(StepRepr_RepresentationItem) aItemDefinedTransformation_TransformItem2; + theData->ReadEntity (theNum, 5, "item_defined_transformation.transform_item2", theArch, STANDARD_TYPE(StepRepr_RepresentationItem), aItemDefinedTransformation_TransformItem2); + + // Inherited fields of KinematicPair + + Handle(StepKinematics_KinematicJoint) aKinematicPair_Joint; + theData->ReadEntity (theNum, 6, "kinematic_pair.joint", theArch, STANDARD_TYPE(StepKinematics_KinematicJoint), aKinematicPair_Joint); + + // Inherited fields of LowOrderKinematicPair + + Standard_Boolean aLowOrderKinematicPair_TX; + theData->ReadBoolean (theNum, 7, "low_order_kinematic_pair.t_x", theArch, aLowOrderKinematicPair_TX); + + Standard_Boolean aLowOrderKinematicPair_TY; + theData->ReadBoolean (theNum, 8, "low_order_kinematic_pair.t_y", theArch, aLowOrderKinematicPair_TY); + + Standard_Boolean aLowOrderKinematicPair_TZ; + theData->ReadBoolean (theNum, 9, "low_order_kinematic_pair.t_z", theArch, aLowOrderKinematicPair_TZ); + + Standard_Boolean aLowOrderKinematicPair_RX; + theData->ReadBoolean (theNum, 10, "low_order_kinematic_pair.r_x", theArch, aLowOrderKinematicPair_RX); + + Standard_Boolean aLowOrderKinematicPair_RY; + theData->ReadBoolean (theNum, 11, "low_order_kinematic_pair.r_y", theArch, aLowOrderKinematicPair_RY); + + Standard_Boolean aLowOrderKinematicPair_RZ; + theData->ReadBoolean (theNum, 12, "low_order_kinematic_pair.r_z", theArch, aLowOrderKinematicPair_RZ); + + // Own fields of CylindricalPairWithRange + + Standard_Real aLowerLimitActualTranslation; + Standard_Boolean hasLowerLimitActualTranslation = Standard_True; + if ( theData->IsParamDefined (theNum,13) ) { + theData->ReadReal (theNum, 13, "lower_limit_actual_translation", theArch, aLowerLimitActualTranslation); + } + else { + hasLowerLimitActualTranslation = Standard_False; + aLowerLimitActualTranslation = 0; + } + + Standard_Real aUpperLimitActualTranslation; + Standard_Boolean hasUpperLimitActualTranslation = Standard_True; + if ( theData->IsParamDefined (theNum,14) ) { + theData->ReadReal (theNum, 14, "upper_limit_actual_translation", theArch, aUpperLimitActualTranslation); + } + else { + hasUpperLimitActualTranslation = Standard_False; + aUpperLimitActualTranslation = 0; + } + + Standard_Real aLowerLimitActualRotation; + Standard_Boolean hasLowerLimitActualRotation = Standard_True; + if ( theData->IsParamDefined (theNum,15) ) { + theData->ReadReal (theNum, 15, "lower_limit_actual_rotation", theArch, aLowerLimitActualRotation); + } + else { + hasLowerLimitActualRotation = Standard_False; + aLowerLimitActualRotation = 0; + } + + Standard_Real aUpperLimitActualRotation; + Standard_Boolean hasUpperLimitActualRotation = Standard_True; + if ( theData->IsParamDefined (theNum,16) ) { + theData->ReadReal (theNum, 16, "upper_limit_actual_rotation", theArch, aUpperLimitActualRotation); + } + else { + hasUpperLimitActualRotation = Standard_False; + aUpperLimitActualRotation = 0; + } + + // Initialize entity + theEnt->Init(aRepresentationItem_Name, + aItemDefinedTransformation_Name, + hasItemDefinedTransformation_Description, + aItemDefinedTransformation_Description, + aItemDefinedTransformation_TransformItem1, + aItemDefinedTransformation_TransformItem2, + aKinematicPair_Joint, + aLowOrderKinematicPair_TX, + aLowOrderKinematicPair_TY, + aLowOrderKinematicPair_TZ, + aLowOrderKinematicPair_RX, + aLowOrderKinematicPair_RY, + aLowOrderKinematicPair_RZ, + hasLowerLimitActualTranslation, + aLowerLimitActualTranslation, + hasUpperLimitActualTranslation, + aUpperLimitActualTranslation, + hasLowerLimitActualRotation, + aLowerLimitActualRotation, + hasUpperLimitActualRotation, + aUpperLimitActualRotation); +} + +//======================================================================= +//function : WriteStep +//purpose : +//======================================================================= +void RWStepKinematics_RWCylindricalPairWithRange::WriteStep (StepData_StepWriter& theSW, + const Handle(StepKinematics_CylindricalPairWithRange)& theEnt) const +{ + + // Own fields of RepresentationItem + + theSW.Send (theEnt->Name()); + + // Inherited fields of ItemDefinedTransformation + + theSW.Send (theEnt->ItemDefinedTransformation()->Name()); + + if ( theEnt->ItemDefinedTransformation()->HasDescription() ) { + theSW.Send (theEnt->ItemDefinedTransformation()->Description()); + } + else theSW.SendUndef(); + + theSW.Send (theEnt->ItemDefinedTransformation()->TransformItem1()); + + theSW.Send (theEnt->ItemDefinedTransformation()->TransformItem2()); + + // Own fields of KinematicPair + + theSW.Send (theEnt->Joint()); + + // Own fields of LowOrderKinematicPair + + theSW.SendBoolean (theEnt->TX()); + + theSW.SendBoolean (theEnt->TY()); + + theSW.SendBoolean (theEnt->TZ()); + + theSW.SendBoolean (theEnt->RX()); + + theSW.SendBoolean (theEnt->RY()); + + theSW.SendBoolean (theEnt->RZ()); + + // Own fields of CylindricalPairWithRange + + if ( theEnt->HasLowerLimitActualTranslation() ) { + theSW.Send (theEnt->LowerLimitActualTranslation()); + } + else theSW.SendUndef(); + + if ( theEnt->HasUpperLimitActualTranslation() ) { + theSW.Send (theEnt->UpperLimitActualTranslation()); + } + else theSW.SendUndef(); + + if ( theEnt->HasLowerLimitActualRotation() ) { + theSW.Send (theEnt->LowerLimitActualRotation()); + } + else theSW.SendUndef(); + + if ( theEnt->HasUpperLimitActualRotation() ) { + theSW.Send (theEnt->UpperLimitActualRotation()); + } + else theSW.SendUndef(); +} + +//======================================================================= +//function : Share +//purpose : +//======================================================================= +void RWStepKinematics_RWCylindricalPairWithRange::Share (const Handle(StepKinematics_CylindricalPairWithRange)& theEnt, + Interface_EntityIterator& iter) const +{ + + // Inherited fields of RepresentationItem + + // Inherited fields of ItemDefinedTransformation + + iter.AddItem (theEnt->ItemDefinedTransformation()->TransformItem1()); + + iter.AddItem (theEnt->ItemDefinedTransformation()->TransformItem2()); + + // Inherited fields of KinematicPair + + iter.AddItem (theEnt->StepKinematics_KinematicPair::Joint()); + + // Inherited fields of LowOrderKinematicPair + + // Own fields of CylindricalPairWithRange +} diff --git a/src/RWStepKinematics/RWStepKinematics_RWCylindricalPairWithRange.hxx b/src/RWStepKinematics/RWStepKinematics_RWCylindricalPairWithRange.hxx new file mode 100644 index 0000000000..a547f407c1 --- /dev/null +++ b/src/RWStepKinematics/RWStepKinematics_RWCylindricalPairWithRange.hxx @@ -0,0 +1,46 @@ +// Created on : Sat May 02 12:41:15 2020 +// Created by: Irina KRYLOVA +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V3.0 +// Copyright (c) Open CASCADE 2020 +// +// 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 _RWStepKinematics_RWCylindricalPairWithRange_HeaderFile_ +#define _RWStepKinematics_RWCylindricalPairWithRange_HeaderFile_ + +#include +#include +#include + +class StepData_StepReaderData; +class Interface_Check; +class StepData_StepWriter; +class Interface_EntityIterator; +class StepKinematics_CylindricalPairWithRange; + +//! Read & Write tool for CylindricalPairWithRange +class RWStepKinematics_RWCylindricalPairWithRange +{ +public: + + DEFINE_STANDARD_ALLOC + + Standard_EXPORT RWStepKinematics_RWCylindricalPairWithRange(); + + Standard_EXPORT void ReadStep(const Handle(StepData_StepReaderData)& theData, const Standard_Integer theNum, Handle(Interface_Check)& theArch, const Handle(StepKinematics_CylindricalPairWithRange)& theEnt) const; + + Standard_EXPORT void WriteStep(StepData_StepWriter& theSW, const Handle(StepKinematics_CylindricalPairWithRange)& theEnt) const; + + Standard_EXPORT void Share(const Handle(StepKinematics_CylindricalPairWithRange)& theEnt, Interface_EntityIterator& iter) const; + +}; +#endif // _RWStepKinematics_RWCylindricalPairWithRange_HeaderFile_ diff --git a/src/RWStepKinematics/RWStepKinematics_RWFullyConstrainedPair.cxx b/src/RWStepKinematics/RWStepKinematics_RWFullyConstrainedPair.cxx new file mode 100644 index 0000000000..5d39829c2e --- /dev/null +++ b/src/RWStepKinematics/RWStepKinematics_RWFullyConstrainedPair.cxx @@ -0,0 +1,180 @@ +// Created on : Sat May 02 12:41:15 2020 +// Created by: Irina KRYLOVA +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V3.0 +// Copyright (c) Open CASCADE 2020 +// +// This file is part of Open CASCADE Technology software library. +// +// This library is free software; you can redistribute it and/or modify it under +// the terms of the GNU Lesser General Public License version 2.1 as published +// by the Free Software Foundation, with special exception defined in the file +// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT +// distribution for complete text of the license and disclaimer of any warranty. +// +// Alternatively, this file may be used under the terms of Open CASCADE +// commercial license or contractual agreement. + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +//======================================================================= +//function : RWStepKinematics_RWFullyConstrainedPair +//purpose : +//======================================================================= +RWStepKinematics_RWFullyConstrainedPair::RWStepKinematics_RWFullyConstrainedPair() {} + + +//======================================================================= +//function : ReadStep +//purpose : +//======================================================================= +void RWStepKinematics_RWFullyConstrainedPair::ReadStep (const Handle(StepData_StepReaderData)& theData, + const Standard_Integer theNum, + Handle(Interface_Check)& theArch, + const Handle(StepKinematics_FullyConstrainedPair)& theEnt) const +{ + // Check number of parameters + if ( ! theData->CheckNbParams(theNum,12,theArch,"fully_constrained_pair") ) return; + + // Inherited fields of RepresentationItem + + Handle(TCollection_HAsciiString) aRepresentationItem_Name; + theData->ReadString (theNum, 1, "representation_item.name", theArch, aRepresentationItem_Name); + + // Inherited fields of ItemDefinedTransformation + + Handle(TCollection_HAsciiString) aItemDefinedTransformation_Name; + theData->ReadString (theNum, 2, "item_defined_transformation.name", theArch, aItemDefinedTransformation_Name); + + Handle(TCollection_HAsciiString) aItemDefinedTransformation_Description; + Standard_Boolean hasItemDefinedTransformation_Description = Standard_True; + if ( theData->IsParamDefined (theNum,3) ) { + theData->ReadString (theNum, 3, "item_defined_transformation.description", theArch, aItemDefinedTransformation_Description); + } + else { + hasItemDefinedTransformation_Description = Standard_False; + aItemDefinedTransformation_Description.Nullify(); + } + + Handle(StepRepr_RepresentationItem) aItemDefinedTransformation_TransformItem1; + theData->ReadEntity (theNum, 4, "item_defined_transformation.transform_item1", theArch, STANDARD_TYPE(StepRepr_RepresentationItem), aItemDefinedTransformation_TransformItem1); + + Handle(StepRepr_RepresentationItem) aItemDefinedTransformation_TransformItem2; + theData->ReadEntity (theNum, 5, "item_defined_transformation.transform_item2", theArch, STANDARD_TYPE(StepRepr_RepresentationItem), aItemDefinedTransformation_TransformItem2); + + // Inherited fields of KinematicPair + + Handle(StepKinematics_KinematicJoint) aKinematicPair_Joint; + theData->ReadEntity (theNum, 6, "kinematic_pair.joint", theArch, STANDARD_TYPE(StepKinematics_KinematicJoint), aKinematicPair_Joint); + + // Inherited fields of LowOrderKinematicPair + + Standard_Boolean aLowOrderKinematicPair_TX; + theData->ReadBoolean (theNum, 7, "low_order_kinematic_pair.t_x", theArch, aLowOrderKinematicPair_TX); + + Standard_Boolean aLowOrderKinematicPair_TY; + theData->ReadBoolean (theNum, 8, "low_order_kinematic_pair.t_y", theArch, aLowOrderKinematicPair_TY); + + Standard_Boolean aLowOrderKinematicPair_TZ; + theData->ReadBoolean (theNum, 9, "low_order_kinematic_pair.t_z", theArch, aLowOrderKinematicPair_TZ); + + Standard_Boolean aLowOrderKinematicPair_RX; + theData->ReadBoolean (theNum, 10, "low_order_kinematic_pair.r_x", theArch, aLowOrderKinematicPair_RX); + + Standard_Boolean aLowOrderKinematicPair_RY; + theData->ReadBoolean (theNum, 11, "low_order_kinematic_pair.r_y", theArch, aLowOrderKinematicPair_RY); + + Standard_Boolean aLowOrderKinematicPair_RZ; + theData->ReadBoolean (theNum, 12, "low_order_kinematic_pair.r_z", theArch, aLowOrderKinematicPair_RZ); + + // Initialize entity + theEnt->Init(aRepresentationItem_Name, + aItemDefinedTransformation_Name, + hasItemDefinedTransformation_Description, + aItemDefinedTransformation_Description, + aItemDefinedTransformation_TransformItem1, + aItemDefinedTransformation_TransformItem2, + aKinematicPair_Joint, + aLowOrderKinematicPair_TX, + aLowOrderKinematicPair_TY, + aLowOrderKinematicPair_TZ, + aLowOrderKinematicPair_RX, + aLowOrderKinematicPair_RY, + aLowOrderKinematicPair_RZ); +} + +//======================================================================= +//function : WriteStep +//purpose : +//======================================================================= +void RWStepKinematics_RWFullyConstrainedPair::WriteStep (StepData_StepWriter& theSW, + const Handle(StepKinematics_FullyConstrainedPair)& theEnt) const +{ + + // Own fields of RepresentationItem + + theSW.Send (theEnt->Name()); + + // Inherited fields of ItemDefinedTransformation + + theSW.Send (theEnt->ItemDefinedTransformation()->Name()); + + if ( theEnt->ItemDefinedTransformation()->HasDescription() ) { + theSW.Send (theEnt->ItemDefinedTransformation()->Description()); + } + else theSW.SendUndef(); + + theSW.Send (theEnt->ItemDefinedTransformation()->TransformItem1()); + + theSW.Send (theEnt->ItemDefinedTransformation()->TransformItem2()); + + // Own fields of KinematicPair + + theSW.Send (theEnt->Joint()); + + // Own fields of LowOrderKinematicPair + + theSW.SendBoolean (theEnt->TX()); + + theSW.SendBoolean (theEnt->TY()); + + theSW.SendBoolean (theEnt->TZ()); + + theSW.SendBoolean (theEnt->RX()); + + theSW.SendBoolean (theEnt->RY()); + + theSW.SendBoolean (theEnt->RZ()); +} + +//======================================================================= +//function : Share +//purpose : +//======================================================================= +void RWStepKinematics_RWFullyConstrainedPair::Share (const Handle(StepKinematics_FullyConstrainedPair)& theEnt, + Interface_EntityIterator& iter) const +{ + + // Inherited fields of RepresentationItem + + // Inherited fields of ItemDefinedTransformation + + iter.AddItem (theEnt->ItemDefinedTransformation()->TransformItem1()); + + iter.AddItem (theEnt->ItemDefinedTransformation()->TransformItem2()); + + // Inherited fields of KinematicPair + + iter.AddItem (theEnt->StepKinematics_KinematicPair::Joint()); + + // Inherited fields of LowOrderKinematicPair +} diff --git a/src/RWStepKinematics/RWStepKinematics_RWFullyConstrainedPair.hxx b/src/RWStepKinematics/RWStepKinematics_RWFullyConstrainedPair.hxx new file mode 100644 index 0000000000..0ea24d8f50 --- /dev/null +++ b/src/RWStepKinematics/RWStepKinematics_RWFullyConstrainedPair.hxx @@ -0,0 +1,46 @@ +// Created on : Sat May 02 12:41:15 2020 +// Created by: Irina KRYLOVA +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V3.0 +// Copyright (c) Open CASCADE 2020 +// +// 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 _RWStepKinematics_RWFullyConstrainedPair_HeaderFile_ +#define _RWStepKinematics_RWFullyConstrainedPair_HeaderFile_ + +#include +#include +#include + +class StepData_StepReaderData; +class Interface_Check; +class StepData_StepWriter; +class Interface_EntityIterator; +class StepKinematics_FullyConstrainedPair; + +//! Read & Write tool for FullyConstrainedPair +class RWStepKinematics_RWFullyConstrainedPair +{ +public: + + DEFINE_STANDARD_ALLOC + + Standard_EXPORT RWStepKinematics_RWFullyConstrainedPair(); + + Standard_EXPORT void ReadStep(const Handle(StepData_StepReaderData)& theData, const Standard_Integer theNum, Handle(Interface_Check)& theArch, const Handle(StepKinematics_FullyConstrainedPair)& theEnt) const; + + Standard_EXPORT void WriteStep(StepData_StepWriter& theSW, const Handle(StepKinematics_FullyConstrainedPair)& theEnt) const; + + Standard_EXPORT void Share(const Handle(StepKinematics_FullyConstrainedPair)& theEnt, Interface_EntityIterator& iter) const; + +}; +#endif // _RWStepKinematics_RWFullyConstrainedPair_HeaderFile_ diff --git a/src/RWStepKinematics/RWStepKinematics_RWGearPair.cxx b/src/RWStepKinematics/RWStepKinematics_RWGearPair.cxx new file mode 100644 index 0000000000..3aa037d18b --- /dev/null +++ b/src/RWStepKinematics/RWStepKinematics_RWGearPair.cxx @@ -0,0 +1,174 @@ +// Created on : Sat May 02 12:41:15 2020 +// Created by: Irina KRYLOVA +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V3.0 +// Copyright (c) Open CASCADE 2020 +// +// This file is part of Open CASCADE Technology software library. +// +// This library is free software; you can redistribute it and/or modify it under +// the terms of the GNU Lesser General Public License version 2.1 as published +// by the Free Software Foundation, with special exception defined in the file +// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT +// distribution for complete text of the license and disclaimer of any warranty. +// +// Alternatively, this file may be used under the terms of Open CASCADE +// commercial license or contractual agreement. + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +//======================================================================= +//function : RWStepKinematics_RWGearPair +//purpose : +//======================================================================= +RWStepKinematics_RWGearPair::RWStepKinematics_RWGearPair() {} + + +//======================================================================= +//function : ReadStep +//purpose : +//======================================================================= +void RWStepKinematics_RWGearPair::ReadStep (const Handle(StepData_StepReaderData)& theData, + const Standard_Integer theNum, + Handle(Interface_Check)& theArch, + const Handle(StepKinematics_GearPair)& theEnt) const +{ + // Check number of parameters + if ( ! theData->CheckNbParams(theNum,11,theArch,"gear_pair") ) return; + + // Inherited fields of RepresentationItem + + Handle(TCollection_HAsciiString) aRepresentationItem_Name; + theData->ReadString (theNum, 1, "representation_item.name", theArch, aRepresentationItem_Name); + + // Inherited fields of ItemDefinedTransformation + + Handle(TCollection_HAsciiString) aItemDefinedTransformation_Name; + theData->ReadString (theNum, 2, "item_defined_transformation.name", theArch, aItemDefinedTransformation_Name); + + Handle(TCollection_HAsciiString) aItemDefinedTransformation_Description; + Standard_Boolean hasItemDefinedTransformation_Description = Standard_True; + if ( theData->IsParamDefined (theNum,3) ) { + theData->ReadString (theNum, 3, "item_defined_transformation.description", theArch, aItemDefinedTransformation_Description); + } + else { + hasItemDefinedTransformation_Description = Standard_False; + aItemDefinedTransformation_Description.Nullify(); + } + + Handle(StepRepr_RepresentationItem) aItemDefinedTransformation_TransformItem1; + theData->ReadEntity (theNum, 4, "item_defined_transformation.transform_item1", theArch, STANDARD_TYPE(StepRepr_RepresentationItem), aItemDefinedTransformation_TransformItem1); + + Handle(StepRepr_RepresentationItem) aItemDefinedTransformation_TransformItem2; + theData->ReadEntity (theNum, 5, "item_defined_transformation.transform_item2", theArch, STANDARD_TYPE(StepRepr_RepresentationItem), aItemDefinedTransformation_TransformItem2); + + // Inherited fields of KinematicPair + + Handle(StepKinematics_KinematicJoint) aKinematicPair_Joint; + theData->ReadEntity (theNum, 6, "kinematic_pair.joint", theArch, STANDARD_TYPE(StepKinematics_KinematicJoint), aKinematicPair_Joint); + + // Own fields of GearPair + + Standard_Real aRadiusFirstLink; + theData->ReadReal (theNum, 7, "radius_first_link", theArch, aRadiusFirstLink); + + Standard_Real aRadiusSecondLink; + theData->ReadReal (theNum, 8, "radius_second_link", theArch, aRadiusSecondLink); + + Standard_Real aBevel; + theData->ReadReal (theNum, 9, "bevel", theArch, aBevel); + + Standard_Real aHelicalAngle; + theData->ReadReal (theNum, 10, "helical_angle", theArch, aHelicalAngle); + + Standard_Real aGearRatio; + theData->ReadReal (theNum, 11, "gear_ratio", theArch, aGearRatio); + + // Initialize entity + theEnt->Init(aRepresentationItem_Name, + aItemDefinedTransformation_Name, + hasItemDefinedTransformation_Description, + aItemDefinedTransformation_Description, + aItemDefinedTransformation_TransformItem1, + aItemDefinedTransformation_TransformItem2, + aKinematicPair_Joint, + aRadiusFirstLink, + aRadiusSecondLink, + aBevel, + aHelicalAngle, + aGearRatio); +} + +//======================================================================= +//function : WriteStep +//purpose : +//======================================================================= +void RWStepKinematics_RWGearPair::WriteStep (StepData_StepWriter& theSW, + const Handle(StepKinematics_GearPair)& theEnt) const +{ + + // Own fields of RepresentationItem + + theSW.Send (theEnt->Name()); + + // Inherited fields of ItemDefinedTransformation + + theSW.Send (theEnt->ItemDefinedTransformation()->Name()); + + if ( theEnt->ItemDefinedTransformation()->HasDescription() ) { + theSW.Send (theEnt->ItemDefinedTransformation()->Description()); + } + else theSW.SendUndef(); + + theSW.Send (theEnt->ItemDefinedTransformation()->TransformItem1()); + + theSW.Send (theEnt->ItemDefinedTransformation()->TransformItem2()); + + // Own fields of KinematicPair + + theSW.Send (theEnt->Joint()); + + // Own fields of GearPair + + theSW.Send (theEnt->RadiusFirstLink()); + + theSW.Send (theEnt->RadiusSecondLink()); + + theSW.Send (theEnt->Bevel()); + + theSW.Send (theEnt->HelicalAngle()); + + theSW.Send (theEnt->GearRatio()); +} + +//======================================================================= +//function : Share +//purpose : +//======================================================================= +void RWStepKinematics_RWGearPair::Share (const Handle(StepKinematics_GearPair)& theEnt, + Interface_EntityIterator& iter) const +{ + + // Inherited fields of RepresentationItem + + // Inherited fields of ItemDefinedTransformation + + iter.AddItem (theEnt->ItemDefinedTransformation()->TransformItem1()); + + iter.AddItem (theEnt->ItemDefinedTransformation()->TransformItem2()); + + // Inherited fields of KinematicPair + + iter.AddItem (theEnt->StepKinematics_KinematicPair::Joint()); + + // Own fields of GearPair +} diff --git a/src/RWStepKinematics/RWStepKinematics_RWGearPair.hxx b/src/RWStepKinematics/RWStepKinematics_RWGearPair.hxx new file mode 100644 index 0000000000..925939954c --- /dev/null +++ b/src/RWStepKinematics/RWStepKinematics_RWGearPair.hxx @@ -0,0 +1,46 @@ +// Created on : Sat May 02 12:41:15 2020 +// Created by: Irina KRYLOVA +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V3.0 +// Copyright (c) Open CASCADE 2020 +// +// 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 _RWStepKinematics_RWGearPair_HeaderFile_ +#define _RWStepKinematics_RWGearPair_HeaderFile_ + +#include +#include +#include + +class StepData_StepReaderData; +class Interface_Check; +class StepData_StepWriter; +class Interface_EntityIterator; +class StepKinematics_GearPair; + +//! Read & Write tool for GearPair +class RWStepKinematics_RWGearPair +{ +public: + + DEFINE_STANDARD_ALLOC + + Standard_EXPORT RWStepKinematics_RWGearPair(); + + Standard_EXPORT void ReadStep(const Handle(StepData_StepReaderData)& theData, const Standard_Integer theNum, Handle(Interface_Check)& theArch, const Handle(StepKinematics_GearPair)& theEnt) const; + + Standard_EXPORT void WriteStep(StepData_StepWriter& theSW, const Handle(StepKinematics_GearPair)& theEnt) const; + + Standard_EXPORT void Share(const Handle(StepKinematics_GearPair)& theEnt, Interface_EntityIterator& iter) const; + +}; +#endif // _RWStepKinematics_RWGearPair_HeaderFile_ diff --git a/src/RWStepKinematics/RWStepKinematics_RWGearPairValue.cxx b/src/RWStepKinematics/RWStepKinematics_RWGearPairValue.cxx new file mode 100644 index 0000000000..74715d5a7e --- /dev/null +++ b/src/RWStepKinematics/RWStepKinematics_RWGearPairValue.cxx @@ -0,0 +1,103 @@ +// Created on : Sat May 02 12:41:15 2020 +// Created by: Irina KRYLOVA +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V3.0 +// Copyright (c) Open CASCADE 2020 +// +// This file is part of Open CASCADE Technology software library. +// +// This library is free software; you can redistribute it and/or modify it under +// the terms of the GNU Lesser General Public License version 2.1 as published +// by the Free Software Foundation, with special exception defined in the file +// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT +// distribution for complete text of the license and disclaimer of any warranty. +// +// Alternatively, this file may be used under the terms of Open CASCADE +// commercial license or contractual agreement. + +#include + +#include +#include +#include +#include +#include +#include +#include + +//======================================================================= +//function : RWStepKinematics_RWGearPairValue +//purpose : +//======================================================================= +RWStepKinematics_RWGearPairValue::RWStepKinematics_RWGearPairValue() {} + + +//======================================================================= +//function : ReadStep +//purpose : +//======================================================================= +void RWStepKinematics_RWGearPairValue::ReadStep (const Handle(StepData_StepReaderData)& theData, + const Standard_Integer theNum, + Handle(Interface_Check)& theArch, + const Handle(StepKinematics_GearPairValue)& theEnt) const +{ + // Check number of parameters + if ( ! theData->CheckNbParams(theNum,3,theArch,"gear_pair_value") ) return; + + // Inherited fields of RepresentationItem + + Handle(TCollection_HAsciiString) aRepresentationItem_Name; + theData->ReadString (theNum, 1, "representation_item.name", theArch, aRepresentationItem_Name); + + // Inherited fields of PairValue + + Handle(StepKinematics_KinematicPair) aPairValue_AppliesToPair; + theData->ReadEntity (theNum, 2, "pair_value.applies_to_pair", theArch, STANDARD_TYPE(StepKinematics_KinematicPair), aPairValue_AppliesToPair); + + // Own fields of GearPairValue + + Standard_Real aActualRotation1; + theData->ReadReal (theNum, 3, "actual_rotation1", theArch, aActualRotation1); + + // Initialize entity + theEnt->Init(aRepresentationItem_Name, + aPairValue_AppliesToPair, + aActualRotation1); +} + +//======================================================================= +//function : WriteStep +//purpose : +//======================================================================= +void RWStepKinematics_RWGearPairValue::WriteStep (StepData_StepWriter& theSW, + const Handle(StepKinematics_GearPairValue)& theEnt) const +{ + + // Own fields of RepresentationItem + + theSW.Send (theEnt->Name()); + + // Own fields of PairValue + + theSW.Send (theEnt->AppliesToPair()); + + // Own fields of GearPairValue + + theSW.Send (theEnt->ActualRotation1()); +} + +//======================================================================= +//function : Share +//purpose : +//======================================================================= +void RWStepKinematics_RWGearPairValue::Share (const Handle(StepKinematics_GearPairValue)& theEnt, + Interface_EntityIterator& iter) const +{ + + // Inherited fields of RepresentationItem + + // Inherited fields of PairValue + + iter.AddItem (theEnt->StepKinematics_PairValue::AppliesToPair()); + + // Own fields of GearPairValue +} diff --git a/src/RWStepKinematics/RWStepKinematics_RWGearPairValue.hxx b/src/RWStepKinematics/RWStepKinematics_RWGearPairValue.hxx new file mode 100644 index 0000000000..9e1fe2b871 --- /dev/null +++ b/src/RWStepKinematics/RWStepKinematics_RWGearPairValue.hxx @@ -0,0 +1,46 @@ +// Created on : Sat May 02 12:41:15 2020 +// Created by: Irina KRYLOVA +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V3.0 +// Copyright (c) Open CASCADE 2020 +// +// 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 _RWStepKinematics_RWGearPairValue_HeaderFile_ +#define _RWStepKinematics_RWGearPairValue_HeaderFile_ + +#include +#include +#include + +class StepData_StepReaderData; +class Interface_Check; +class StepData_StepWriter; +class Interface_EntityIterator; +class StepKinematics_GearPairValue; + +//! Read & Write tool for GearPairValue +class RWStepKinematics_RWGearPairValue +{ +public: + + DEFINE_STANDARD_ALLOC + + Standard_EXPORT RWStepKinematics_RWGearPairValue(); + + Standard_EXPORT void ReadStep(const Handle(StepData_StepReaderData)& theData, const Standard_Integer theNum, Handle(Interface_Check)& theArch, const Handle(StepKinematics_GearPairValue)& theEnt) const; + + Standard_EXPORT void WriteStep(StepData_StepWriter& theSW, const Handle(StepKinematics_GearPairValue)& theEnt) const; + + Standard_EXPORT void Share(const Handle(StepKinematics_GearPairValue)& theEnt, Interface_EntityIterator& iter) const; + +}; +#endif // _RWStepKinematics_RWGearPairValue_HeaderFile_ diff --git a/src/RWStepKinematics/RWStepKinematics_RWGearPairWithRange.cxx b/src/RWStepKinematics/RWStepKinematics_RWGearPairWithRange.cxx new file mode 100644 index 0000000000..292f3aa3f6 --- /dev/null +++ b/src/RWStepKinematics/RWStepKinematics_RWGearPairWithRange.cxx @@ -0,0 +1,214 @@ +// Created on : Sat May 02 12:41:15 2020 +// Created by: Irina KRYLOVA +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V3.0 +// Copyright (c) Open CASCADE 2020 +// +// This file is part of Open CASCADE Technology software library. +// +// This library is free software; you can redistribute it and/or modify it under +// the terms of the GNU Lesser General Public License version 2.1 as published +// by the Free Software Foundation, with special exception defined in the file +// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT +// distribution for complete text of the license and disclaimer of any warranty. +// +// Alternatively, this file may be used under the terms of Open CASCADE +// commercial license or contractual agreement. + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +//======================================================================= +//function : RWStepKinematics_RWGearPairWithRange +//purpose : +//======================================================================= +RWStepKinematics_RWGearPairWithRange::RWStepKinematics_RWGearPairWithRange() {} + + +//======================================================================= +//function : ReadStep +//purpose : +//======================================================================= +void RWStepKinematics_RWGearPairWithRange::ReadStep (const Handle(StepData_StepReaderData)& theData, + const Standard_Integer theNum, + Handle(Interface_Check)& theArch, + const Handle(StepKinematics_GearPairWithRange)& theEnt) const +{ + // Check number of parameters + if ( ! theData->CheckNbParams(theNum,13,theArch,"gear_pair_with_range") ) return; + + // Inherited fields of RepresentationItem + + Handle(TCollection_HAsciiString) aRepresentationItem_Name; + theData->ReadString (theNum, 1, "representation_item.name", theArch, aRepresentationItem_Name); + + // Inherited fields of ItemDefinedTransformation + + Handle(TCollection_HAsciiString) aItemDefinedTransformation_Name; + theData->ReadString (theNum, 2, "item_defined_transformation.name", theArch, aItemDefinedTransformation_Name); + + Handle(TCollection_HAsciiString) aItemDefinedTransformation_Description; + Standard_Boolean hasItemDefinedTransformation_Description = Standard_True; + if ( theData->IsParamDefined (theNum,3) ) { + theData->ReadString (theNum, 3, "item_defined_transformation.description", theArch, aItemDefinedTransformation_Description); + } + else { + hasItemDefinedTransformation_Description = Standard_False; + aItemDefinedTransformation_Description.Nullify(); + } + + Handle(StepRepr_RepresentationItem) aItemDefinedTransformation_TransformItem1; + theData->ReadEntity (theNum, 4, "item_defined_transformation.transform_item1", theArch, STANDARD_TYPE(StepRepr_RepresentationItem), aItemDefinedTransformation_TransformItem1); + + Handle(StepRepr_RepresentationItem) aItemDefinedTransformation_TransformItem2; + theData->ReadEntity (theNum, 5, "item_defined_transformation.transform_item2", theArch, STANDARD_TYPE(StepRepr_RepresentationItem), aItemDefinedTransformation_TransformItem2); + + // Inherited fields of KinematicPair + + Handle(StepKinematics_KinematicJoint) aKinematicPair_Joint; + theData->ReadEntity (theNum, 6, "kinematic_pair.joint", theArch, STANDARD_TYPE(StepKinematics_KinematicJoint), aKinematicPair_Joint); + + // Inherited fields of GearPair + + Standard_Real aGearPair_RadiusFirstLink; + theData->ReadReal (theNum, 7, "gear_pair.radius_first_link", theArch, aGearPair_RadiusFirstLink); + + Standard_Real aGearPair_RadiusSecondLink; + theData->ReadReal (theNum, 8, "gear_pair.radius_second_link", theArch, aGearPair_RadiusSecondLink); + + Standard_Real aGearPair_Bevel; + theData->ReadReal (theNum, 9, "gear_pair.bevel", theArch, aGearPair_Bevel); + + Standard_Real aGearPair_HelicalAngle; + theData->ReadReal (theNum, 10, "gear_pair.helical_angle", theArch, aGearPair_HelicalAngle); + + Standard_Real aGearPair_GearRatio; + theData->ReadReal (theNum, 11, "gear_pair.gear_ratio", theArch, aGearPair_GearRatio); + + // Own fields of GearPairWithRange + + Standard_Real aLowerLimitActualRotation1; + Standard_Boolean hasLowerLimitActualRotation1 = Standard_True; + if ( theData->IsParamDefined (theNum,12) ) { + theData->ReadReal (theNum, 12, "lower_limit_actual_rotation1", theArch, aLowerLimitActualRotation1); + } + else { + hasLowerLimitActualRotation1 = Standard_False; + aLowerLimitActualRotation1 = 0; + } + + Standard_Real aUpperLimitActualRotation1; + Standard_Boolean hasUpperLimitActualRotation1 = Standard_True; + if ( theData->IsParamDefined (theNum,13) ) { + theData->ReadReal (theNum, 13, "upper_limit_actual_rotation1", theArch, aUpperLimitActualRotation1); + } + else { + hasUpperLimitActualRotation1 = Standard_False; + aUpperLimitActualRotation1 = 0; + } + + // Initialize entity + theEnt->Init(aRepresentationItem_Name, + aItemDefinedTransformation_Name, + hasItemDefinedTransformation_Description, + aItemDefinedTransformation_Description, + aItemDefinedTransformation_TransformItem1, + aItemDefinedTransformation_TransformItem2, + aKinematicPair_Joint, + aGearPair_RadiusFirstLink, + aGearPair_RadiusSecondLink, + aGearPair_Bevel, + aGearPair_HelicalAngle, + aGearPair_GearRatio, + hasLowerLimitActualRotation1, + aLowerLimitActualRotation1, + hasUpperLimitActualRotation1, + aUpperLimitActualRotation1); +} + +//======================================================================= +//function : WriteStep +//purpose : +//======================================================================= +void RWStepKinematics_RWGearPairWithRange::WriteStep (StepData_StepWriter& theSW, + const Handle(StepKinematics_GearPairWithRange)& theEnt) const +{ + + // Own fields of RepresentationItem + + theSW.Send (theEnt->Name()); + + // Inherited fields of ItemDefinedTransformation + + theSW.Send (theEnt->ItemDefinedTransformation()->Name()); + + if ( theEnt->ItemDefinedTransformation()->HasDescription() ) { + theSW.Send (theEnt->ItemDefinedTransformation()->Description()); + } + else theSW.SendUndef(); + + theSW.Send (theEnt->ItemDefinedTransformation()->TransformItem1()); + + theSW.Send (theEnt->ItemDefinedTransformation()->TransformItem2()); + + // Own fields of KinematicPair + + theSW.Send (theEnt->Joint()); + + // Own fields of GearPair + + theSW.Send (theEnt->RadiusFirstLink()); + + theSW.Send (theEnt->RadiusSecondLink()); + + theSW.Send (theEnt->Bevel()); + + theSW.Send (theEnt->HelicalAngle()); + + theSW.Send (theEnt->GearRatio()); + + // Own fields of GearPairWithRange + + if ( theEnt->HasLowerLimitActualRotation1() ) { + theSW.Send (theEnt->LowerLimitActualRotation1()); + } + else theSW.SendUndef(); + + if ( theEnt->HasUpperLimitActualRotation1() ) { + theSW.Send (theEnt->UpperLimitActualRotation1()); + } + else theSW.SendUndef(); +} + +//======================================================================= +//function : Share +//purpose : +//======================================================================= +void RWStepKinematics_RWGearPairWithRange::Share (const Handle(StepKinematics_GearPairWithRange)& theEnt, + Interface_EntityIterator& iter) const +{ + + // Inherited fields of RepresentationItem + + // Inherited fields of ItemDefinedTransformation + + iter.AddItem (theEnt->ItemDefinedTransformation()->TransformItem1()); + + iter.AddItem (theEnt->ItemDefinedTransformation()->TransformItem2()); + + // Inherited fields of KinematicPair + + iter.AddItem (theEnt->StepKinematics_KinematicPair::Joint()); + + // Inherited fields of GearPair + + // Own fields of GearPairWithRange +} diff --git a/src/RWStepKinematics/RWStepKinematics_RWGearPairWithRange.hxx b/src/RWStepKinematics/RWStepKinematics_RWGearPairWithRange.hxx new file mode 100644 index 0000000000..ae79708ced --- /dev/null +++ b/src/RWStepKinematics/RWStepKinematics_RWGearPairWithRange.hxx @@ -0,0 +1,46 @@ +// Created on : Sat May 02 12:41:15 2020 +// Created by: Irina KRYLOVA +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V3.0 +// Copyright (c) Open CASCADE 2020 +// +// 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 _RWStepKinematics_RWGearPairWithRange_HeaderFile_ +#define _RWStepKinematics_RWGearPairWithRange_HeaderFile_ + +#include +#include +#include + +class StepData_StepReaderData; +class Interface_Check; +class StepData_StepWriter; +class Interface_EntityIterator; +class StepKinematics_GearPairWithRange; + +//! Read & Write tool for GearPairWithRange +class RWStepKinematics_RWGearPairWithRange +{ +public: + + DEFINE_STANDARD_ALLOC + + Standard_EXPORT RWStepKinematics_RWGearPairWithRange(); + + Standard_EXPORT void ReadStep(const Handle(StepData_StepReaderData)& theData, const Standard_Integer theNum, Handle(Interface_Check)& theArch, const Handle(StepKinematics_GearPairWithRange)& theEnt) const; + + Standard_EXPORT void WriteStep(StepData_StepWriter& theSW, const Handle(StepKinematics_GearPairWithRange)& theEnt) const; + + Standard_EXPORT void Share(const Handle(StepKinematics_GearPairWithRange)& theEnt, Interface_EntityIterator& iter) const; + +}; +#endif // _RWStepKinematics_RWGearPairWithRange_HeaderFile_ diff --git a/src/RWStepKinematics/RWStepKinematics_RWHomokineticPair.cxx b/src/RWStepKinematics/RWStepKinematics_RWHomokineticPair.cxx new file mode 100644 index 0000000000..e0309dc5dd --- /dev/null +++ b/src/RWStepKinematics/RWStepKinematics_RWHomokineticPair.cxx @@ -0,0 +1,204 @@ +// Created on : Sat May 02 12:41:15 2020 +// Created by: Irina KRYLOVA +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V3.0 +// Copyright (c) Open CASCADE 2020 +// +// This file is part of Open CASCADE Technology software library. +// +// This library is free software; you can redistribute it and/or modify it under +// the terms of the GNU Lesser General Public License version 2.1 as published +// by the Free Software Foundation, with special exception defined in the file +// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT +// distribution for complete text of the license and disclaimer of any warranty. +// +// Alternatively, this file may be used under the terms of Open CASCADE +// commercial license or contractual agreement. + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +//======================================================================= +//function : RWStepKinematics_RWHomokineticPair +//purpose : +//======================================================================= +RWStepKinematics_RWHomokineticPair::RWStepKinematics_RWHomokineticPair() {} + + +//======================================================================= +//function : ReadStep +//purpose : +//======================================================================= +void RWStepKinematics_RWHomokineticPair::ReadStep (const Handle(StepData_StepReaderData)& theData, + const Standard_Integer theNum, + Handle(Interface_Check)& theArch, + const Handle(StepKinematics_HomokineticPair)& theEnt) const +{ + // Check number of parameters + if ( ! theData->CheckNbParams(theNum,13,theArch,"homokinetic_pair") ) return; + + // Inherited fields of RepresentationItem + + Handle(TCollection_HAsciiString) aRepresentationItem_Name; + theData->ReadString (theNum, 1, "representation_item.name", theArch, aRepresentationItem_Name); + + // Inherited fields of ItemDefinedTransformation + + Handle(TCollection_HAsciiString) aItemDefinedTransformation_Name; + theData->ReadString (theNum, 2, "item_defined_transformation.name", theArch, aItemDefinedTransformation_Name); + + Handle(TCollection_HAsciiString) aItemDefinedTransformation_Description; + Standard_Boolean hasItemDefinedTransformation_Description = Standard_True; + if ( theData->IsParamDefined (theNum,3) ) { + theData->ReadString (theNum, 3, "item_defined_transformation.description", theArch, aItemDefinedTransformation_Description); + } + else { + hasItemDefinedTransformation_Description = Standard_False; + aItemDefinedTransformation_Description.Nullify(); + } + + Handle(StepRepr_RepresentationItem) aItemDefinedTransformation_TransformItem1; + theData->ReadEntity (theNum, 4, "item_defined_transformation.transform_item1", theArch, STANDARD_TYPE(StepRepr_RepresentationItem), aItemDefinedTransformation_TransformItem1); + + Handle(StepRepr_RepresentationItem) aItemDefinedTransformation_TransformItem2; + theData->ReadEntity (theNum, 5, "item_defined_transformation.transform_item2", theArch, STANDARD_TYPE(StepRepr_RepresentationItem), aItemDefinedTransformation_TransformItem2); + + // Inherited fields of KinematicPair + + Handle(StepKinematics_KinematicJoint) aKinematicPair_Joint; + theData->ReadEntity (theNum, 6, "kinematic_pair.joint", theArch, STANDARD_TYPE(StepKinematics_KinematicJoint), aKinematicPair_Joint); + + // Inherited fields of LowOrderKinematicPair + + Standard_Boolean aLowOrderKinematicPair_TX; + theData->ReadBoolean (theNum, 7, "low_order_kinematic_pair.t_x", theArch, aLowOrderKinematicPair_TX); + + Standard_Boolean aLowOrderKinematicPair_TY; + theData->ReadBoolean (theNum, 8, "low_order_kinematic_pair.t_y", theArch, aLowOrderKinematicPair_TY); + + Standard_Boolean aLowOrderKinematicPair_TZ; + theData->ReadBoolean (theNum, 9, "low_order_kinematic_pair.t_z", theArch, aLowOrderKinematicPair_TZ); + + Standard_Boolean aLowOrderKinematicPair_RX; + theData->ReadBoolean (theNum, 10, "low_order_kinematic_pair.r_x", theArch, aLowOrderKinematicPair_RX); + + Standard_Boolean aLowOrderKinematicPair_RY; + theData->ReadBoolean (theNum, 11, "low_order_kinematic_pair.r_y", theArch, aLowOrderKinematicPair_RY); + + Standard_Boolean aLowOrderKinematicPair_RZ; + theData->ReadBoolean (theNum, 12, "low_order_kinematic_pair.r_z", theArch, aLowOrderKinematicPair_RZ); + + // Inherited fields of UniversalPair + + Standard_Real aUniversalPair_InputSkewAngle; + Standard_Boolean hasUniversalPair_InputSkewAngle = Standard_True; + if ( theData->IsParamDefined (theNum,13) ) { + theData->ReadReal (theNum, 13, "universal_pair.input_skew_angle", theArch, aUniversalPair_InputSkewAngle); + } + else { + hasUniversalPair_InputSkewAngle = Standard_False; + aUniversalPair_InputSkewAngle = 0; + } + + // Initialize entity + theEnt->Init(aRepresentationItem_Name, + aItemDefinedTransformation_Name, + hasItemDefinedTransformation_Description, + aItemDefinedTransformation_Description, + aItemDefinedTransformation_TransformItem1, + aItemDefinedTransformation_TransformItem2, + aKinematicPair_Joint, + aLowOrderKinematicPair_TX, + aLowOrderKinematicPair_TY, + aLowOrderKinematicPair_TZ, + aLowOrderKinematicPair_RX, + aLowOrderKinematicPair_RY, + aLowOrderKinematicPair_RZ, + hasUniversalPair_InputSkewAngle, + aUniversalPair_InputSkewAngle); +} + +//======================================================================= +//function : WriteStep +//purpose : +//======================================================================= +void RWStepKinematics_RWHomokineticPair::WriteStep (StepData_StepWriter& theSW, + const Handle(StepKinematics_HomokineticPair)& theEnt) const +{ + + // Own fields of RepresentationItem + + theSW.Send (theEnt->Name()); + + // Inherited fields of ItemDefinedTransformation + + theSW.Send (theEnt->ItemDefinedTransformation()->Name()); + + if ( theEnt->ItemDefinedTransformation()->HasDescription() ) { + theSW.Send (theEnt->ItemDefinedTransformation()->Description()); + } + else theSW.SendUndef(); + + theSW.Send (theEnt->ItemDefinedTransformation()->TransformItem1()); + + theSW.Send (theEnt->ItemDefinedTransformation()->TransformItem2()); + + // Own fields of KinematicPair + + theSW.Send (theEnt->Joint()); + + // Own fields of LowOrderKinematicPair + + theSW.SendBoolean (theEnt->TX()); + + theSW.SendBoolean (theEnt->TY()); + + theSW.SendBoolean (theEnt->TZ()); + + theSW.SendBoolean (theEnt->RX()); + + theSW.SendBoolean (theEnt->RY()); + + theSW.SendBoolean (theEnt->RZ()); + + // Own fields of UniversalPair + + if ( theEnt->HasInputSkewAngle() ) { + theSW.Send (theEnt->InputSkewAngle()); + } + else theSW.SendUndef(); +} + +//======================================================================= +//function : Share +//purpose : +//======================================================================= +void RWStepKinematics_RWHomokineticPair::Share (const Handle(StepKinematics_HomokineticPair)& theEnt, + Interface_EntityIterator& iter) const +{ + + // Inherited fields of RepresentationItem + + // Inherited fields of ItemDefinedTransformation + + iter.AddItem (theEnt->ItemDefinedTransformation()->TransformItem1()); + + iter.AddItem (theEnt->ItemDefinedTransformation()->TransformItem2()); + + // Inherited fields of KinematicPair + + iter.AddItem (theEnt->StepKinematics_KinematicPair::Joint()); + + // Inherited fields of LowOrderKinematicPair + + // Inherited fields of UniversalPair +} diff --git a/src/RWStepKinematics/RWStepKinematics_RWHomokineticPair.hxx b/src/RWStepKinematics/RWStepKinematics_RWHomokineticPair.hxx new file mode 100644 index 0000000000..53146bb6a5 --- /dev/null +++ b/src/RWStepKinematics/RWStepKinematics_RWHomokineticPair.hxx @@ -0,0 +1,46 @@ +// Created on : Sat May 02 12:41:15 2020 +// Created by: Irina KRYLOVA +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V3.0 +// Copyright (c) Open CASCADE 2020 +// +// 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 _RWStepKinematics_RWHomokineticPair_HeaderFile_ +#define _RWStepKinematics_RWHomokineticPair_HeaderFile_ + +#include +#include +#include + +class StepData_StepReaderData; +class Interface_Check; +class StepData_StepWriter; +class Interface_EntityIterator; +class StepKinematics_HomokineticPair; + +//! Read & Write tool for HomokineticPair +class RWStepKinematics_RWHomokineticPair +{ +public: + + DEFINE_STANDARD_ALLOC + + Standard_EXPORT RWStepKinematics_RWHomokineticPair(); + + Standard_EXPORT void ReadStep(const Handle(StepData_StepReaderData)& theData, const Standard_Integer theNum, Handle(Interface_Check)& theArch, const Handle(StepKinematics_HomokineticPair)& theEnt) const; + + Standard_EXPORT void WriteStep(StepData_StepWriter& theSW, const Handle(StepKinematics_HomokineticPair)& theEnt) const; + + Standard_EXPORT void Share(const Handle(StepKinematics_HomokineticPair)& theEnt, Interface_EntityIterator& iter) const; + +}; +#endif // _RWStepKinematics_RWHomokineticPair_HeaderFile_ diff --git a/src/RWStepKinematics/RWStepKinematics_RWKinematicJoint.cxx b/src/RWStepKinematics/RWStepKinematics_RWKinematicJoint.cxx new file mode 100644 index 0000000000..32e7db487b --- /dev/null +++ b/src/RWStepKinematics/RWStepKinematics_RWKinematicJoint.cxx @@ -0,0 +1,98 @@ +// Created on : Sat May 02 12:41:15 2020 +// Created by: Irina KRYLOVA +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V3.0 +// Copyright (c) Open CASCADE 2020 +// +// This file is part of Open CASCADE Technology software library. +// +// This library is free software; you can redistribute it and/or modify it under +// the terms of the GNU Lesser General Public License version 2.1 as published +// by the Free Software Foundation, with special exception defined in the file +// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT +// distribution for complete text of the license and disclaimer of any warranty. +// +// Alternatively, this file may be used under the terms of Open CASCADE +// commercial license or contractual agreement. + +#include + +#include +#include +#include +#include +#include +#include + +//======================================================================= +//function : RWStepKinematics_RWKinematicJoint +//purpose : +//======================================================================= +RWStepKinematics_RWKinematicJoint::RWStepKinematics_RWKinematicJoint() {} + + +//======================================================================= +//function : ReadStep +//purpose : +//======================================================================= +void RWStepKinematics_RWKinematicJoint::ReadStep (const Handle(StepData_StepReaderData)& theData, + const Standard_Integer theNum, + Handle(Interface_Check)& theArch, + const Handle(StepKinematics_KinematicJoint)& theEnt) const +{ + // Check number of parameters + if ( ! theData->CheckNbParams(theNum,3,theArch,"kinematic_joint") ) return; + + // Inherited fields of RepresentationItem + + Handle(TCollection_HAsciiString) aRepresentationItem_Name; + theData->ReadString (theNum, 1, "representation_item.name", theArch, aRepresentationItem_Name); + + // Inherited fields of Edge + + Handle(StepShape_Vertex) aEdge_EdgeStart; + theData->ReadEntity (theNum, 2, "edge.edge_start", theArch, STANDARD_TYPE(StepShape_Vertex), aEdge_EdgeStart); + + Handle(StepShape_Vertex) aEdge_EdgeEnd; + theData->ReadEntity (theNum, 3, "edge.edge_end", theArch, STANDARD_TYPE(StepShape_Vertex), aEdge_EdgeEnd); + + // Initialize entity + theEnt->Init(aRepresentationItem_Name, + aEdge_EdgeStart, + aEdge_EdgeEnd); +} + +//======================================================================= +//function : WriteStep +//purpose : +//======================================================================= +void RWStepKinematics_RWKinematicJoint::WriteStep (StepData_StepWriter& theSW, + const Handle(StepKinematics_KinematicJoint)& theEnt) const +{ + + // Own fields of RepresentationItem + + theSW.Send (theEnt->Name()); + + // Own fields of Edge + + theSW.Send (theEnt->EdgeStart()); + + theSW.Send (theEnt->EdgeEnd()); +} + +//======================================================================= +//function : Share +//purpose : +//======================================================================= +void RWStepKinematics_RWKinematicJoint::Share (const Handle(StepKinematics_KinematicJoint)& theEnt, + Interface_EntityIterator& iter) const +{ + + // Inherited fields of RepresentationItem + + // Inherited fields of Edge + + iter.AddItem (theEnt->StepShape_Edge::EdgeStart()); + + iter.AddItem (theEnt->StepShape_Edge::EdgeEnd()); +} diff --git a/src/RWStepKinematics/RWStepKinematics_RWKinematicJoint.hxx b/src/RWStepKinematics/RWStepKinematics_RWKinematicJoint.hxx new file mode 100644 index 0000000000..9b7cc9952c --- /dev/null +++ b/src/RWStepKinematics/RWStepKinematics_RWKinematicJoint.hxx @@ -0,0 +1,46 @@ +// Created on : Sat May 02 12:41:15 2020 +// Created by: Irina KRYLOVA +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V3.0 +// Copyright (c) Open CASCADE 2020 +// +// 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 _RWStepKinematics_RWKinematicJoint_HeaderFile_ +#define _RWStepKinematics_RWKinematicJoint_HeaderFile_ + +#include +#include +#include + +class StepData_StepReaderData; +class Interface_Check; +class StepData_StepWriter; +class Interface_EntityIterator; +class StepKinematics_KinematicJoint; + +//! Read & Write tool for KinematicJoint +class RWStepKinematics_RWKinematicJoint +{ +public: + + DEFINE_STANDARD_ALLOC + + Standard_EXPORT RWStepKinematics_RWKinematicJoint(); + + Standard_EXPORT void ReadStep(const Handle(StepData_StepReaderData)& theData, const Standard_Integer theNum, Handle(Interface_Check)& theArch, const Handle(StepKinematics_KinematicJoint)& theEnt) const; + + Standard_EXPORT void WriteStep(StepData_StepWriter& theSW, const Handle(StepKinematics_KinematicJoint)& theEnt) const; + + Standard_EXPORT void Share(const Handle(StepKinematics_KinematicJoint)& theEnt, Interface_EntityIterator& iter) const; + +}; +#endif // _RWStepKinematics_RWKinematicJoint_HeaderFile_ diff --git a/src/RWStepKinematics/RWStepKinematics_RWKinematicLink.cxx b/src/RWStepKinematics/RWStepKinematics_RWKinematicLink.cxx new file mode 100644 index 0000000000..688ed56b8e --- /dev/null +++ b/src/RWStepKinematics/RWStepKinematics_RWKinematicLink.cxx @@ -0,0 +1,75 @@ +// Created on : Sat May 02 12:41:15 2020 +// Created by: Irina KRYLOVA +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V3.0 +// Copyright (c) Open CASCADE 2020 +// +// This file is part of Open CASCADE Technology software library. +// +// This library is free software; you can redistribute it and/or modify it under +// the terms of the GNU Lesser General Public License version 2.1 as published +// by the Free Software Foundation, with special exception defined in the file +// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT +// distribution for complete text of the license and disclaimer of any warranty. +// +// Alternatively, this file may be used under the terms of Open CASCADE +// commercial license or contractual agreement. + +#include + +#include +#include +#include +#include +#include + +//======================================================================= +//function : RWStepKinematics_RWKinematicLink +//purpose : +//======================================================================= +RWStepKinematics_RWKinematicLink::RWStepKinematics_RWKinematicLink() {} + + +//======================================================================= +//function : ReadStep +//purpose : +//======================================================================= +void RWStepKinematics_RWKinematicLink::ReadStep (const Handle(StepData_StepReaderData)& theData, + const Standard_Integer theNum, + Handle(Interface_Check)& theArch, + const Handle(StepKinematics_KinematicLink)& theEnt) const +{ + // Check number of parameters + if ( ! theData->CheckNbParams(theNum,1,theArch,"kinematic_link") ) return; + + // Inherited fields of RepresentationItem + + Handle(TCollection_HAsciiString) aRepresentationItem_Name; + theData->ReadString (theNum, 1, "representation_item.name", theArch, aRepresentationItem_Name); + + // Initialize entity + theEnt->Init(aRepresentationItem_Name); +} + +//======================================================================= +//function : WriteStep +//purpose : +//======================================================================= +void RWStepKinematics_RWKinematicLink::WriteStep (StepData_StepWriter& theSW, + const Handle(StepKinematics_KinematicLink)& theEnt) const +{ + + // Own fields of RepresentationItem + + theSW.Send (theEnt->Name()); +} + +//======================================================================= +//function : Share +//purpose : +//======================================================================= +void RWStepKinematics_RWKinematicLink::Share (const Handle(StepKinematics_KinematicLink)& /*theEnt*/, + Interface_EntityIterator& /*iter*/) const +{ + + // Inherited fields of RepresentationItem +} diff --git a/src/RWStepKinematics/RWStepKinematics_RWKinematicLink.hxx b/src/RWStepKinematics/RWStepKinematics_RWKinematicLink.hxx new file mode 100644 index 0000000000..65dc3ef165 --- /dev/null +++ b/src/RWStepKinematics/RWStepKinematics_RWKinematicLink.hxx @@ -0,0 +1,46 @@ +// Created on : Sat May 02 12:41:15 2020 +// Created by: Irina KRYLOVA +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V3.0 +// Copyright (c) Open CASCADE 2020 +// +// 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 _RWStepKinematics_RWKinematicLink_HeaderFile_ +#define _RWStepKinematics_RWKinematicLink_HeaderFile_ + +#include +#include +#include + +class StepData_StepReaderData; +class Interface_Check; +class StepData_StepWriter; +class Interface_EntityIterator; +class StepKinematics_KinematicLink; + +//! Read & Write tool for KinematicLink +class RWStepKinematics_RWKinematicLink +{ +public: + + DEFINE_STANDARD_ALLOC + + Standard_EXPORT RWStepKinematics_RWKinematicLink(); + + Standard_EXPORT void ReadStep(const Handle(StepData_StepReaderData)& theData, const Standard_Integer theNum, Handle(Interface_Check)& theArch, const Handle(StepKinematics_KinematicLink)& theEnt) const; + + Standard_EXPORT void WriteStep(StepData_StepWriter& theSW, const Handle(StepKinematics_KinematicLink)& theEnt) const; + + Standard_EXPORT void Share(const Handle(StepKinematics_KinematicLink)& theEnt, Interface_EntityIterator& iter) const; + +}; +#endif // _RWStepKinematics_RWKinematicLink_HeaderFile_ diff --git a/src/RWStepKinematics/RWStepKinematics_RWKinematicLinkRepresentationAssociation.cxx b/src/RWStepKinematics/RWStepKinematics_RWKinematicLinkRepresentationAssociation.cxx new file mode 100644 index 0000000000..26d87cb2af --- /dev/null +++ b/src/RWStepKinematics/RWStepKinematics_RWKinematicLinkRepresentationAssociation.cxx @@ -0,0 +1,111 @@ +// Created on : Sat May 02 12:41:15 2020 +// Created by: Irina KRYLOVA +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V3.0 +// Copyright (c) Open CASCADE 2020 +// +// This file is part of Open CASCADE Technology software library. +// +// This library is free software; you can redistribute it and/or modify it under +// the terms of the GNU Lesser General Public License version 2.1 as published +// by the Free Software Foundation, with special exception defined in the file +// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT +// distribution for complete text of the license and disclaimer of any warranty. +// +// Alternatively, this file may be used under the terms of Open CASCADE +// commercial license or contractual agreement. + +#include + +#include +#include +#include +#include +#include +#include +#include + +//======================================================================= +//function : RWStepKinematics_RWKinematicLinkRepresentationAssociation +//purpose : +//======================================================================= +RWStepKinematics_RWKinematicLinkRepresentationAssociation::RWStepKinematics_RWKinematicLinkRepresentationAssociation() {} + + +//======================================================================= +//function : ReadStep +//purpose : +//======================================================================= +void RWStepKinematics_RWKinematicLinkRepresentationAssociation::ReadStep (const Handle(StepData_StepReaderData)& theData, + const Standard_Integer theNum, + Handle(Interface_Check)& theArch, + const Handle(StepKinematics_KinematicLinkRepresentationAssociation)& theEnt) const +{ + // Check number of parameters + if ( ! theData->CheckNbParams(theNum,4,theArch,"kinematic_link_representation_association") ) return; + + // Inherited fields of RepresentationRelationship + + Handle(TCollection_HAsciiString) aRepresentationRelationship_Name; + theData->ReadString (theNum, 1, "representation_relationship.name", theArch, aRepresentationRelationship_Name); + + Handle(TCollection_HAsciiString) aRepresentationRelationship_Description; + if ( theData->IsParamDefined (theNum,2) ) { + theData->ReadString (theNum, 2, "representation_relationship.description", theArch, aRepresentationRelationship_Description); + } + else { + aRepresentationRelationship_Description.Nullify(); + } + + StepRepr_RepresentationOrRepresentationReference aRepresentationRelationship_Rep1; + theData->ReadEntity (theNum, 3, "representation_relationship.rep1", theArch, aRepresentationRelationship_Rep1); + + StepRepr_RepresentationOrRepresentationReference aRepresentationRelationship_Rep2; + theData->ReadEntity (theNum, 4, "representation_relationship.rep2", theArch, aRepresentationRelationship_Rep2); + + // Process only one type (Representaion) + if (aRepresentationRelationship_Rep1.CaseNumber() != 1 || aRepresentationRelationship_Rep1.CaseNumber() != 1) + return; + + // Initialize entity + theEnt->Init(aRepresentationRelationship_Name, + aRepresentationRelationship_Description, + aRepresentationRelationship_Rep1.Representation(), + aRepresentationRelationship_Rep2.Representation()); +} + +//======================================================================= +//function : WriteStep +//purpose : +//======================================================================= +void RWStepKinematics_RWKinematicLinkRepresentationAssociation::WriteStep (StepData_StepWriter& theSW, + const Handle(StepKinematics_KinematicLinkRepresentationAssociation)& theEnt) const +{ + + // Own fields of RepresentationRelationship + + theSW.Send (theEnt->Name()); + + if ( theEnt->HasDescription() ) { + theSW.Send (theEnt->Description()); + } + else theSW.SendUndef(); + + theSW.Send (theEnt->Rep1()); + + theSW.Send (theEnt->Rep2()); +} + +//======================================================================= +//function : Share +//purpose : +//======================================================================= +void RWStepKinematics_RWKinematicLinkRepresentationAssociation::Share (const Handle(StepKinematics_KinematicLinkRepresentationAssociation)& theEnt, + Interface_EntityIterator& iter) const +{ + + // Inherited fields of RepresentationRelationship + + iter.AddItem (theEnt->StepRepr_RepresentationRelationship::Rep1()); + + iter.AddItem (theEnt->StepRepr_RepresentationRelationship::Rep2()); +} diff --git a/src/RWStepKinematics/RWStepKinematics_RWKinematicLinkRepresentationAssociation.hxx b/src/RWStepKinematics/RWStepKinematics_RWKinematicLinkRepresentationAssociation.hxx new file mode 100644 index 0000000000..514bac06a3 --- /dev/null +++ b/src/RWStepKinematics/RWStepKinematics_RWKinematicLinkRepresentationAssociation.hxx @@ -0,0 +1,46 @@ +// Created on : Sat May 02 12:41:15 2020 +// Created by: Irina KRYLOVA +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V3.0 +// Copyright (c) Open CASCADE 2020 +// +// 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 _RWStepKinematics_RWKinematicLinkRepresentationAssociation_HeaderFile_ +#define _RWStepKinematics_RWKinematicLinkRepresentationAssociation_HeaderFile_ + +#include +#include +#include + +class StepData_StepReaderData; +class Interface_Check; +class StepData_StepWriter; +class Interface_EntityIterator; +class StepKinematics_KinematicLinkRepresentationAssociation; + +//! Read & Write tool for KinematicLinkRepresentationAssociation +class RWStepKinematics_RWKinematicLinkRepresentationAssociation +{ +public: + + DEFINE_STANDARD_ALLOC + + Standard_EXPORT RWStepKinematics_RWKinematicLinkRepresentationAssociation(); + + Standard_EXPORT void ReadStep(const Handle(StepData_StepReaderData)& theData, const Standard_Integer theNum, Handle(Interface_Check)& theArch, const Handle(StepKinematics_KinematicLinkRepresentationAssociation)& theEnt) const; + + Standard_EXPORT void WriteStep(StepData_StepWriter& theSW, const Handle(StepKinematics_KinematicLinkRepresentationAssociation)& theEnt) const; + + Standard_EXPORT void Share(const Handle(StepKinematics_KinematicLinkRepresentationAssociation)& theEnt, Interface_EntityIterator& iter) const; + +}; +#endif // _RWStepKinematics_RWKinematicLinkRepresentationAssociation_HeaderFile_ diff --git a/src/RWStepKinematics/RWStepKinematics_RWKinematicPropertyMechanismRepresentation.cxx b/src/RWStepKinematics/RWStepKinematics_RWKinematicPropertyMechanismRepresentation.cxx new file mode 100644 index 0000000000..7108842ee2 --- /dev/null +++ b/src/RWStepKinematics/RWStepKinematics_RWKinematicPropertyMechanismRepresentation.cxx @@ -0,0 +1,101 @@ +// Created on : Sat May 02 12:41:15 2020 +// Created by: Irina KRYLOVA +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V3.0 +// Copyright (c) Open CASCADE 2020 +// +// This file is part of Open CASCADE Technology software library. +// +// This library is free software; you can redistribute it and/or modify it under +// the terms of the GNU Lesser General Public License version 2.1 as published +// by the Free Software Foundation, with special exception defined in the file +// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT +// distribution for complete text of the license and disclaimer of any warranty. +// +// Alternatively, this file may be used under the terms of Open CASCADE +// commercial license or contractual agreement. + +#include + +#include +#include +#include +#include +#include +#include +#include + +//======================================================================= +//function : RWStepKinematics_RWKinematicPropertyMechanismRepresentation +//purpose : +//======================================================================= +RWStepKinematics_RWKinematicPropertyMechanismRepresentation::RWStepKinematics_RWKinematicPropertyMechanismRepresentation() {} + + +//======================================================================= +//function : ReadStep +//purpose : +//======================================================================= +void RWStepKinematics_RWKinematicPropertyMechanismRepresentation::ReadStep (const Handle(StepData_StepReaderData)& theData, + const Standard_Integer theNum, + Handle(Interface_Check)& theArch, + const Handle(StepKinematics_KinematicPropertyMechanismRepresentation)& theEnt) const +{ + // Check number of parameters + if ( ! theData->CheckNbParams(theNum,3,theArch,"kinematic_property_mechanism_representation") ) return; + + // Inherited fields of PropertyDefinitionRepresentation + + StepRepr_RepresentedDefinition aPropertyDefinitionRepresentation_Definition; + theData->ReadEntity (theNum, 1, "property_definition_representation.definition", theArch, aPropertyDefinitionRepresentation_Definition); + + Handle(StepRepr_Representation) aPropertyDefinitionRepresentation_UsedRepresentation; + theData->ReadEntity (theNum, 2, "property_definition_representation.used_representation", theArch, STANDARD_TYPE(StepRepr_Representation), aPropertyDefinitionRepresentation_UsedRepresentation); + + // Own fields of KinematicPropertyMechanismRepresentation + + Handle(StepKinematics_KinematicLinkRepresentation) aBase; + theData->ReadEntity (theNum, 3, "base", theArch, STANDARD_TYPE(StepKinematics_KinematicLinkRepresentation), aBase); + + // Initialize entity + theEnt->Init(aPropertyDefinitionRepresentation_Definition, + aPropertyDefinitionRepresentation_UsedRepresentation, + aBase); +} + +//======================================================================= +//function : WriteStep +//purpose : +//======================================================================= +void RWStepKinematics_RWKinematicPropertyMechanismRepresentation::WriteStep (StepData_StepWriter& theSW, + const Handle(StepKinematics_KinematicPropertyMechanismRepresentation)& theEnt) const +{ + + // Own fields of PropertyDefinitionRepresentation + + theSW.Send (theEnt->Definition().Value()); + + theSW.Send (theEnt->UsedRepresentation()); + + // Own fields of KinematicPropertyMechanismRepresentation + + theSW.Send (theEnt->Base()); +} + +//======================================================================= +//function : Share +//purpose : +//======================================================================= +void RWStepKinematics_RWKinematicPropertyMechanismRepresentation::Share (const Handle(StepKinematics_KinematicPropertyMechanismRepresentation)& theEnt, + Interface_EntityIterator& iter) const +{ + + // Inherited fields of PropertyDefinitionRepresentation + + iter.AddItem (theEnt->StepRepr_PropertyDefinitionRepresentation::Definition().Value()); + + iter.AddItem (theEnt->StepRepr_PropertyDefinitionRepresentation::UsedRepresentation()); + + // Own fields of KinematicPropertyMechanismRepresentation + + iter.AddItem (theEnt->Base()); +} diff --git a/src/RWStepKinematics/RWStepKinematics_RWKinematicPropertyMechanismRepresentation.hxx b/src/RWStepKinematics/RWStepKinematics_RWKinematicPropertyMechanismRepresentation.hxx new file mode 100644 index 0000000000..ca281d752e --- /dev/null +++ b/src/RWStepKinematics/RWStepKinematics_RWKinematicPropertyMechanismRepresentation.hxx @@ -0,0 +1,46 @@ +// Created on : Sat May 02 12:41:15 2020 +// Created by: Irina KRYLOVA +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V3.0 +// Copyright (c) Open CASCADE 2020 +// +// 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 _RWStepKinematics_RWKinematicPropertyMechanismRepresentation_HeaderFile_ +#define _RWStepKinematics_RWKinematicPropertyMechanismRepresentation_HeaderFile_ + +#include +#include +#include + +class StepData_StepReaderData; +class Interface_Check; +class StepData_StepWriter; +class Interface_EntityIterator; +class StepKinematics_KinematicPropertyMechanismRepresentation; + +//! Read & Write tool for KinematicPropertyMechanismRepresentation +class RWStepKinematics_RWKinematicPropertyMechanismRepresentation +{ +public: + + DEFINE_STANDARD_ALLOC + + Standard_EXPORT RWStepKinematics_RWKinematicPropertyMechanismRepresentation(); + + Standard_EXPORT void ReadStep(const Handle(StepData_StepReaderData)& theData, const Standard_Integer theNum, Handle(Interface_Check)& theArch, const Handle(StepKinematics_KinematicPropertyMechanismRepresentation)& theEnt) const; + + Standard_EXPORT void WriteStep(StepData_StepWriter& theSW, const Handle(StepKinematics_KinematicPropertyMechanismRepresentation)& theEnt) const; + + Standard_EXPORT void Share(const Handle(StepKinematics_KinematicPropertyMechanismRepresentation)& theEnt, Interface_EntityIterator& iter) const; + +}; +#endif // _RWStepKinematics_RWKinematicPropertyMechanismRepresentation_HeaderFile_ diff --git a/src/RWStepKinematics/RWStepKinematics_RWKinematicTopologyDirectedStructure.cxx b/src/RWStepKinematics/RWStepKinematics_RWKinematicTopologyDirectedStructure.cxx new file mode 100644 index 0000000000..59021d0c79 --- /dev/null +++ b/src/RWStepKinematics/RWStepKinematics_RWKinematicTopologyDirectedStructure.cxx @@ -0,0 +1,127 @@ +// Created on : Sat May 02 12:41:15 2020 +// Created by: Irina KRYLOVA +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V3.0 +// Copyright (c) Open CASCADE 2020 +// +// This file is part of Open CASCADE Technology software library. +// +// This library is free software; you can redistribute it and/or modify it under +// the terms of the GNU Lesser General Public License version 2.1 as published +// by the Free Software Foundation, with special exception defined in the file +// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT +// distribution for complete text of the license and disclaimer of any warranty. +// +// Alternatively, this file may be used under the terms of Open CASCADE +// commercial license or contractual agreement. + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +//======================================================================= +//function : RWStepKinematics_RWKinematicTopologyDirectedStructure +//purpose : +//======================================================================= +RWStepKinematics_RWKinematicTopologyDirectedStructure::RWStepKinematics_RWKinematicTopologyDirectedStructure() {} + + +//======================================================================= +//function : ReadStep +//purpose : +//======================================================================= +void RWStepKinematics_RWKinematicTopologyDirectedStructure::ReadStep (const Handle(StepData_StepReaderData)& theData, + const Standard_Integer theNum, + Handle(Interface_Check)& theArch, + const Handle(StepKinematics_KinematicTopologyDirectedStructure)& theEnt) const +{ + // Check number of parameters + if ( ! theData->CheckNbParams(theNum,4,theArch,"kinematic_topology_directed_structure") ) return; + + // Inherited fields of Representation + + Handle(TCollection_HAsciiString) aRepresentation_Name; + theData->ReadString (theNum, 1, "representation.name", theArch, aRepresentation_Name); + + Handle(StepRepr_HArray1OfRepresentationItem) aRepresentation_Items; + Standard_Integer sub2 = 0; + if ( theData->ReadSubList (theNum, 2, "representation.items", theArch, sub2) ) { + Standard_Integer nb0 = theData->NbParams(sub2); + aRepresentation_Items = new StepRepr_HArray1OfRepresentationItem (1, nb0); + Standard_Integer num2 = sub2; + for ( Standard_Integer i0=1; i0 <= nb0; i0++ ) { + Handle(StepRepr_RepresentationItem) anIt0; + theData->ReadEntity (num2, i0, "representation_item", theArch, STANDARD_TYPE(StepRepr_RepresentationItem), anIt0); + aRepresentation_Items->SetValue(i0, anIt0); + } + } + + Handle(StepRepr_RepresentationContext) aRepresentation_ContextOfItems; + theData->ReadEntity (theNum, 3, "representation.context_of_items", theArch, STANDARD_TYPE(StepRepr_RepresentationContext), aRepresentation_ContextOfItems); + + // Own fields of KinematicTopologyDirectedStructure + + Handle(StepKinematics_KinematicTopologyStructure) aParent; + theData->ReadEntity (theNum, 4, "parent", theArch, STANDARD_TYPE(StepKinematics_KinematicTopologyStructure), aParent); + + // Initialize entity + theEnt->Init(aRepresentation_Name, + aRepresentation_Items, + aRepresentation_ContextOfItems, + aParent); +} + +//======================================================================= +//function : WriteStep +//purpose : +//======================================================================= +void RWStepKinematics_RWKinematicTopologyDirectedStructure::WriteStep (StepData_StepWriter& theSW, + const Handle(StepKinematics_KinematicTopologyDirectedStructure)& theEnt) const +{ + + // Own fields of Representation + + theSW.Send (theEnt->Name()); + + theSW.OpenSub(); + for (Standard_Integer i1=1; i1 <= theEnt->Items()->Length(); i1++ ) { + Handle(StepRepr_RepresentationItem) Var0 = theEnt->Items()->Value(i1); + theSW.Send (Var0); + } + theSW.CloseSub(); + + theSW.Send (theEnt->ContextOfItems()); + + // Own fields of KinematicTopologyDirectedStructure + + theSW.Send (theEnt->Parent()); +} + +//======================================================================= +//function : Share +//purpose : +//======================================================================= +void RWStepKinematics_RWKinematicTopologyDirectedStructure::Share (const Handle(StepKinematics_KinematicTopologyDirectedStructure)& theEnt, + Interface_EntityIterator& iter) const +{ + + // Inherited fields of Representation + + for (Standard_Integer i1=1; i1 <= theEnt->StepRepr_Representation::Items()->Length(); i1++ ) { + Handle(StepRepr_RepresentationItem) Var0 = theEnt->StepRepr_Representation::Items()->Value(i1); + iter.AddItem (Var0); + } + + iter.AddItem (theEnt->StepRepr_Representation::ContextOfItems()); + + // Own fields of KinematicTopologyDirectedStructure + + iter.AddItem (theEnt->Parent()); +} diff --git a/src/RWStepKinematics/RWStepKinematics_RWKinematicTopologyDirectedStructure.hxx b/src/RWStepKinematics/RWStepKinematics_RWKinematicTopologyDirectedStructure.hxx new file mode 100644 index 0000000000..4aa061bc91 --- /dev/null +++ b/src/RWStepKinematics/RWStepKinematics_RWKinematicTopologyDirectedStructure.hxx @@ -0,0 +1,46 @@ +// Created on : Sat May 02 12:41:15 2020 +// Created by: Irina KRYLOVA +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V3.0 +// Copyright (c) Open CASCADE 2020 +// +// 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 _RWStepKinematics_RWKinematicTopologyDirectedStructure_HeaderFile_ +#define _RWStepKinematics_RWKinematicTopologyDirectedStructure_HeaderFile_ + +#include +#include +#include + +class StepData_StepReaderData; +class Interface_Check; +class StepData_StepWriter; +class Interface_EntityIterator; +class StepKinematics_KinematicTopologyDirectedStructure; + +//! Read & Write tool for KinematicTopologyDirectedStructure +class RWStepKinematics_RWKinematicTopologyDirectedStructure +{ +public: + + DEFINE_STANDARD_ALLOC + + Standard_EXPORT RWStepKinematics_RWKinematicTopologyDirectedStructure(); + + Standard_EXPORT void ReadStep(const Handle(StepData_StepReaderData)& theData, const Standard_Integer theNum, Handle(Interface_Check)& theArch, const Handle(StepKinematics_KinematicTopologyDirectedStructure)& theEnt) const; + + Standard_EXPORT void WriteStep(StepData_StepWriter& theSW, const Handle(StepKinematics_KinematicTopologyDirectedStructure)& theEnt) const; + + Standard_EXPORT void Share(const Handle(StepKinematics_KinematicTopologyDirectedStructure)& theEnt, Interface_EntityIterator& iter) const; + +}; +#endif // _RWStepKinematics_RWKinematicTopologyDirectedStructure_HeaderFile_ diff --git a/src/RWStepKinematics/RWStepKinematics_RWKinematicTopologyNetworkStructure.cxx b/src/RWStepKinematics/RWStepKinematics_RWKinematicTopologyNetworkStructure.cxx new file mode 100644 index 0000000000..f1e11db7b8 --- /dev/null +++ b/src/RWStepKinematics/RWStepKinematics_RWKinematicTopologyNetworkStructure.cxx @@ -0,0 +1,127 @@ +// Created on : Sat May 02 12:41:15 2020 +// Created by: Irina KRYLOVA +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V3.0 +// Copyright (c) Open CASCADE 2020 +// +// This file is part of Open CASCADE Technology software library. +// +// This library is free software; you can redistribute it and/or modify it under +// the terms of the GNU Lesser General Public License version 2.1 as published +// by the Free Software Foundation, with special exception defined in the file +// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT +// distribution for complete text of the license and disclaimer of any warranty. +// +// Alternatively, this file may be used under the terms of Open CASCADE +// commercial license or contractual agreement. + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +//======================================================================= +//function : RWStepKinematics_RWKinematicTopologyNetworkStructure +//purpose : +//======================================================================= +RWStepKinematics_RWKinematicTopologyNetworkStructure::RWStepKinematics_RWKinematicTopologyNetworkStructure() {} + + +//======================================================================= +//function : ReadStep +//purpose : +//======================================================================= +void RWStepKinematics_RWKinematicTopologyNetworkStructure::ReadStep (const Handle(StepData_StepReaderData)& theData, + const Standard_Integer theNum, + Handle(Interface_Check)& theArch, + const Handle(StepKinematics_KinematicTopologyNetworkStructure)& theEnt) const +{ + // Check number of parameters + if ( ! theData->CheckNbParams(theNum,4,theArch,"kinematic_topology_network_structure") ) return; + + // Inherited fields of Representation + + Handle(TCollection_HAsciiString) aRepresentation_Name; + theData->ReadString (theNum, 1, "representation.name", theArch, aRepresentation_Name); + + Handle(StepRepr_HArray1OfRepresentationItem) aRepresentation_Items; + Standard_Integer sub2 = 0; + if ( theData->ReadSubList (theNum, 2, "representation.items", theArch, sub2) ) { + Standard_Integer nb0 = theData->NbParams(sub2); + aRepresentation_Items = new StepRepr_HArray1OfRepresentationItem (1, nb0); + Standard_Integer num2 = sub2; + for ( Standard_Integer i0=1; i0 <= nb0; i0++ ) { + Handle(StepRepr_RepresentationItem) anIt0; + theData->ReadEntity (num2, i0, "representation_item", theArch, STANDARD_TYPE(StepRepr_RepresentationItem), anIt0); + aRepresentation_Items->SetValue(i0, anIt0); + } + } + + Handle(StepRepr_RepresentationContext) aRepresentation_ContextOfItems; + theData->ReadEntity (theNum, 3, "representation.context_of_items", theArch, STANDARD_TYPE(StepRepr_RepresentationContext), aRepresentation_ContextOfItems); + + // Own fields of KinematicTopologyNetworkStructure + + Handle(StepKinematics_KinematicTopologyStructure) aParent; + theData->ReadEntity (theNum, 4, "parent", theArch, STANDARD_TYPE(StepKinematics_KinematicTopologyStructure), aParent); + + // Initialize entity + theEnt->Init(aRepresentation_Name, + aRepresentation_Items, + aRepresentation_ContextOfItems, + aParent); +} + +//======================================================================= +//function : WriteStep +//purpose : +//======================================================================= +void RWStepKinematics_RWKinematicTopologyNetworkStructure::WriteStep (StepData_StepWriter& theSW, + const Handle(StepKinematics_KinematicTopologyNetworkStructure)& theEnt) const +{ + + // Own fields of Representation + + theSW.Send (theEnt->Name()); + + theSW.OpenSub(); + for (Standard_Integer i1=1; i1 <= theEnt->Items()->Length(); i1++ ) { + Handle(StepRepr_RepresentationItem) Var0 = theEnt->Items()->Value(i1); + theSW.Send (Var0); + } + theSW.CloseSub(); + + theSW.Send (theEnt->ContextOfItems()); + + // Own fields of KinematicTopologyNetworkStructure + + theSW.Send (theEnt->Parent()); +} + +//======================================================================= +//function : Share +//purpose : +//======================================================================= +void RWStepKinematics_RWKinematicTopologyNetworkStructure::Share (const Handle(StepKinematics_KinematicTopologyNetworkStructure)& theEnt, + Interface_EntityIterator& iter) const +{ + + // Inherited fields of Representation + + for (Standard_Integer i1=1; i1 <= theEnt->StepRepr_Representation::Items()->Length(); i1++ ) { + Handle(StepRepr_RepresentationItem) Var0 = theEnt->StepRepr_Representation::Items()->Value(i1); + iter.AddItem (Var0); + } + + iter.AddItem (theEnt->StepRepr_Representation::ContextOfItems()); + + // Own fields of KinematicTopologyNetworkStructure + + iter.AddItem (theEnt->Parent()); +} diff --git a/src/RWStepKinematics/RWStepKinematics_RWKinematicTopologyNetworkStructure.hxx b/src/RWStepKinematics/RWStepKinematics_RWKinematicTopologyNetworkStructure.hxx new file mode 100644 index 0000000000..0bfa4bc559 --- /dev/null +++ b/src/RWStepKinematics/RWStepKinematics_RWKinematicTopologyNetworkStructure.hxx @@ -0,0 +1,46 @@ +// Created on : Sat May 02 12:41:15 2020 +// Created by: Irina KRYLOVA +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V3.0 +// Copyright (c) Open CASCADE 2020 +// +// 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 _RWStepKinematics_RWKinematicTopologyNetworkStructure_HeaderFile_ +#define _RWStepKinematics_RWKinematicTopologyNetworkStructure_HeaderFile_ + +#include +#include +#include + +class StepData_StepReaderData; +class Interface_Check; +class StepData_StepWriter; +class Interface_EntityIterator; +class StepKinematics_KinematicTopologyNetworkStructure; + +//! Read & Write tool for KinematicTopologyNetworkStructure +class RWStepKinematics_RWKinematicTopologyNetworkStructure +{ +public: + + DEFINE_STANDARD_ALLOC + + Standard_EXPORT RWStepKinematics_RWKinematicTopologyNetworkStructure(); + + Standard_EXPORT void ReadStep(const Handle(StepData_StepReaderData)& theData, const Standard_Integer theNum, Handle(Interface_Check)& theArch, const Handle(StepKinematics_KinematicTopologyNetworkStructure)& theEnt) const; + + Standard_EXPORT void WriteStep(StepData_StepWriter& theSW, const Handle(StepKinematics_KinematicTopologyNetworkStructure)& theEnt) const; + + Standard_EXPORT void Share(const Handle(StepKinematics_KinematicTopologyNetworkStructure)& theEnt, Interface_EntityIterator& iter) const; + +}; +#endif // _RWStepKinematics_RWKinematicTopologyNetworkStructure_HeaderFile_ diff --git a/src/RWStepKinematics/RWStepKinematics_RWKinematicTopologyStructure.cxx b/src/RWStepKinematics/RWStepKinematics_RWKinematicTopologyStructure.cxx new file mode 100644 index 0000000000..25de7bd368 --- /dev/null +++ b/src/RWStepKinematics/RWStepKinematics_RWKinematicTopologyStructure.cxx @@ -0,0 +1,112 @@ +// Created on : Sat May 02 12:41:15 2020 +// Created by: Irina KRYLOVA +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V3.0 +// Copyright (c) Open CASCADE 2020 +// +// This file is part of Open CASCADE Technology software library. +// +// This library is free software; you can redistribute it and/or modify it under +// the terms of the GNU Lesser General Public License version 2.1 as published +// by the Free Software Foundation, with special exception defined in the file +// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT +// distribution for complete text of the license and disclaimer of any warranty. +// +// Alternatively, this file may be used under the terms of Open CASCADE +// commercial license or contractual agreement. + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +//======================================================================= +//function : RWStepKinematics_RWKinematicTopologyStructure +//purpose : +//======================================================================= +RWStepKinematics_RWKinematicTopologyStructure::RWStepKinematics_RWKinematicTopologyStructure() {} + + +//======================================================================= +//function : ReadStep +//purpose : +//======================================================================= +void RWStepKinematics_RWKinematicTopologyStructure::ReadStep (const Handle(StepData_StepReaderData)& theData, + const Standard_Integer theNum, + Handle(Interface_Check)& theArch, + const Handle(StepKinematics_KinematicTopologyStructure)& theEnt) const +{ + // Check number of parameters + if ( ! theData->CheckNbParams(theNum,3,theArch,"kinematic_topology_structure") ) return; + + // Inherited fields of Representation + + Handle(TCollection_HAsciiString) aRepresentation_Name; + theData->ReadString (theNum, 1, "representation.name", theArch, aRepresentation_Name); + + Handle(StepRepr_HArray1OfRepresentationItem) aRepresentation_Items; + Standard_Integer sub2 = 0; + if ( theData->ReadSubList (theNum, 2, "representation.items", theArch, sub2) ) { + Standard_Integer nb0 = theData->NbParams(sub2); + aRepresentation_Items = new StepRepr_HArray1OfRepresentationItem (1, nb0); + Standard_Integer num2 = sub2; + for ( Standard_Integer i0=1; i0 <= nb0; i0++ ) { + Handle(StepRepr_RepresentationItem) anIt0; + theData->ReadEntity (num2, i0, "representation_item", theArch, STANDARD_TYPE(StepRepr_RepresentationItem), anIt0); + aRepresentation_Items->SetValue(i0, anIt0); + } + } + + Handle(StepRepr_RepresentationContext) aRepresentation_ContextOfItems; + theData->ReadEntity (theNum, 3, "representation.context_of_items", theArch, STANDARD_TYPE(StepRepr_RepresentationContext), aRepresentation_ContextOfItems); + + // Initialize entity + theEnt->Init(aRepresentation_Name, + aRepresentation_Items, + aRepresentation_ContextOfItems); +} + +//======================================================================= +//function : WriteStep +//purpose : +//======================================================================= +void RWStepKinematics_RWKinematicTopologyStructure::WriteStep (StepData_StepWriter& theSW, + const Handle(StepKinematics_KinematicTopologyStructure)& theEnt) const +{ + + // Own fields of Representation + + theSW.Send (theEnt->Name()); + + theSW.OpenSub(); + for (Standard_Integer i1=1; i1 <= theEnt->Items()->Length(); i1++ ) { + Handle(StepRepr_RepresentationItem) Var0 = theEnt->Items()->Value(i1); + theSW.Send (Var0); + } + theSW.CloseSub(); + + theSW.Send (theEnt->ContextOfItems()); +} + +//======================================================================= +//function : Share +//purpose : +//======================================================================= +void RWStepKinematics_RWKinematicTopologyStructure::Share (const Handle(StepKinematics_KinematicTopologyStructure)& theEnt, + Interface_EntityIterator& iter) const +{ + + // Inherited fields of Representation + + for (Standard_Integer i1=1; i1 <= theEnt->StepRepr_Representation::Items()->Length(); i1++ ) { + Handle(StepRepr_RepresentationItem) Var0 = theEnt->StepRepr_Representation::Items()->Value(i1); + iter.AddItem (Var0); + } + + iter.AddItem (theEnt->StepRepr_Representation::ContextOfItems()); +} diff --git a/src/RWStepKinematics/RWStepKinematics_RWKinematicTopologyStructure.hxx b/src/RWStepKinematics/RWStepKinematics_RWKinematicTopologyStructure.hxx new file mode 100644 index 0000000000..86643d4ea2 --- /dev/null +++ b/src/RWStepKinematics/RWStepKinematics_RWKinematicTopologyStructure.hxx @@ -0,0 +1,46 @@ +// Created on : Sat May 02 12:41:15 2020 +// Created by: Irina KRYLOVA +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V3.0 +// Copyright (c) Open CASCADE 2020 +// +// 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 _RWStepKinematics_RWKinematicTopologyStructure_HeaderFile_ +#define _RWStepKinematics_RWKinematicTopologyStructure_HeaderFile_ + +#include +#include +#include + +class StepData_StepReaderData; +class Interface_Check; +class StepData_StepWriter; +class Interface_EntityIterator; +class StepKinematics_KinematicTopologyStructure; + +//! Read & Write tool for KinematicTopologyStructure +class RWStepKinematics_RWKinematicTopologyStructure +{ +public: + + DEFINE_STANDARD_ALLOC + + Standard_EXPORT RWStepKinematics_RWKinematicTopologyStructure(); + + Standard_EXPORT void ReadStep(const Handle(StepData_StepReaderData)& theData, const Standard_Integer theNum, Handle(Interface_Check)& theArch, const Handle(StepKinematics_KinematicTopologyStructure)& theEnt) const; + + Standard_EXPORT void WriteStep(StepData_StepWriter& theSW, const Handle(StepKinematics_KinematicTopologyStructure)& theEnt) const; + + Standard_EXPORT void Share(const Handle(StepKinematics_KinematicTopologyStructure)& theEnt, Interface_EntityIterator& iter) const; + +}; +#endif // _RWStepKinematics_RWKinematicTopologyStructure_HeaderFile_ diff --git a/src/RWStepKinematics/RWStepKinematics_RWLinearFlexibleAndPinionPair.cxx b/src/RWStepKinematics/RWStepKinematics_RWLinearFlexibleAndPinionPair.cxx new file mode 100644 index 0000000000..b6aca30c9c --- /dev/null +++ b/src/RWStepKinematics/RWStepKinematics_RWLinearFlexibleAndPinionPair.cxx @@ -0,0 +1,150 @@ +// Created on : Fri May 08 19:02:07 2020 +// Created by: Irina KRYLOVA +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V3.0 +// Copyright (c) Open CASCADE 2020 +// +// This file is part of Open CASCADE Technology software library. +// +// This library is free software; you can redistribute it and/or modify it under +// the terms of the GNU Lesser General Public License version 2.1 as published +// by the Free Software Foundation, with special exception defined in the file +// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT +// distribution for complete text of the license and disclaimer of any warranty. +// +// Alternatively, this file may be used under the terms of Open CASCADE +// commercial license or contractual agreement. + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +//======================================================================= +//function : RWStepKinematics_RWLinearFlexibleAndPinionPair +//purpose : +//======================================================================= +RWStepKinematics_RWLinearFlexibleAndPinionPair::RWStepKinematics_RWLinearFlexibleAndPinionPair() {} + + +//======================================================================= +//function : ReadStep +//purpose : +//======================================================================= +void RWStepKinematics_RWLinearFlexibleAndPinionPair::ReadStep (const Handle(StepData_StepReaderData)& theData, + const Standard_Integer theNum, + Handle(Interface_Check)& theArch, + const Handle(StepKinematics_LinearFlexibleAndPinionPair)& theEnt) const +{ + // Check number of parameters + if ( ! theData->CheckNbParams(theNum,7,theArch,"linear_flexible_and_pinion_pair") ) return; + + // Inherited fields of RepresentationItem + + Handle(TCollection_HAsciiString) aRepresentationItem_Name; + theData->ReadString (theNum, 1, "representation_item.name", theArch, aRepresentationItem_Name); + + // Inherited fields of ItemDefinedTransformation + + Handle(TCollection_HAsciiString) aItemDefinedTransformation_Name; + theData->ReadString (theNum, 2, "item_defined_transformation.name", theArch, aItemDefinedTransformation_Name); + + Handle(TCollection_HAsciiString) aItemDefinedTransformation_Description; + Standard_Boolean hasItemDefinedTransformation_Description = Standard_True; + if ( theData->IsParamDefined (theNum,3) ) { + theData->ReadString (theNum, 3, "item_defined_transformation.description", theArch, aItemDefinedTransformation_Description); + } + else { + hasItemDefinedTransformation_Description = Standard_False; + aItemDefinedTransformation_Description.Nullify(); + } + + Handle(StepRepr_RepresentationItem) aItemDefinedTransformation_TransformItem1; + theData->ReadEntity (theNum, 4, "item_defined_transformation.transform_item1", theArch, STANDARD_TYPE(StepRepr_RepresentationItem), aItemDefinedTransformation_TransformItem1); + + Handle(StepRepr_RepresentationItem) aItemDefinedTransformation_TransformItem2; + theData->ReadEntity (theNum, 5, "item_defined_transformation.transform_item2", theArch, STANDARD_TYPE(StepRepr_RepresentationItem), aItemDefinedTransformation_TransformItem2); + + // Inherited fields of KinematicPair + + Handle(StepKinematics_KinematicJoint) aKinematicPair_Joint; + theData->ReadEntity (theNum, 6, "kinematic_pair.joint", theArch, STANDARD_TYPE(StepKinematics_KinematicJoint), aKinematicPair_Joint); + + // Own fields of LinearFlexibleAndPinionPair + + Standard_Real aPinionRadius; + theData->ReadReal (theNum, 7, "pinion_radius", theArch, aPinionRadius); + + // Initialize entity + theEnt->Init(aRepresentationItem_Name, + aItemDefinedTransformation_Name, + hasItemDefinedTransformation_Description, + aItemDefinedTransformation_Description, + aItemDefinedTransformation_TransformItem1, + aItemDefinedTransformation_TransformItem2, + aKinematicPair_Joint, + aPinionRadius); +} + +//======================================================================= +//function : WriteStep +//purpose : +//======================================================================= +void RWStepKinematics_RWLinearFlexibleAndPinionPair::WriteStep (StepData_StepWriter& theSW, + const Handle(StepKinematics_LinearFlexibleAndPinionPair)& theEnt) const +{ + + // Own fields of RepresentationItem + + theSW.Send (theEnt->Name()); + + // Inherited fields of ItemDefinedTransformation + + theSW.Send (theEnt->ItemDefinedTransformation()->Name()); + + if ( theEnt->ItemDefinedTransformation()->HasDescription() ) { + theSW.Send (theEnt->ItemDefinedTransformation()->Description()); + } + else theSW.SendUndef(); + + theSW.Send (theEnt->ItemDefinedTransformation()->TransformItem1()); + + theSW.Send (theEnt->ItemDefinedTransformation()->TransformItem2()); + + // Own fields of KinematicPair + + theSW.Send (theEnt->Joint()); + + // Own fields of LinearFlexibleAndPinionPair + + theSW.Send (theEnt->PinionRadius()); +} + +//======================================================================= +//function : Share +//purpose : +//======================================================================= +void RWStepKinematics_RWLinearFlexibleAndPinionPair::Share (const Handle(StepKinematics_LinearFlexibleAndPinionPair)& theEnt, + Interface_EntityIterator& iter) const +{ + + // Inherited fields of RepresentationItem + + // Inherited fields of ItemDefinedTransformation + + iter.AddItem (theEnt->ItemDefinedTransformation()->TransformItem1()); + + iter.AddItem (theEnt->ItemDefinedTransformation()->TransformItem2()); + + // Inherited fields of KinematicPair + + iter.AddItem (theEnt->StepKinematics_KinematicPair::Joint()); + + // Own fields of LinearFlexibleAndPinionPair +} diff --git a/src/RWStepKinematics/RWStepKinematics_RWLinearFlexibleAndPinionPair.hxx b/src/RWStepKinematics/RWStepKinematics_RWLinearFlexibleAndPinionPair.hxx new file mode 100644 index 0000000000..cc3d9125c9 --- /dev/null +++ b/src/RWStepKinematics/RWStepKinematics_RWLinearFlexibleAndPinionPair.hxx @@ -0,0 +1,46 @@ +// Created on : Fri May 08 19:02:07 2020 +// Created by: Irina KRYLOVA +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V3.0 +// Copyright (c) Open CASCADE 2020 +// +// 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 _RWStepKinematics_RWLinearFlexibleAndPinionPair_HeaderFile_ +#define _RWStepKinematics_RWLinearFlexibleAndPinionPair_HeaderFile_ + +#include +#include +#include + +class StepData_StepReaderData; +class Interface_Check; +class StepData_StepWriter; +class Interface_EntityIterator; +class StepKinematics_LinearFlexibleAndPinionPair; + +//! Read & Write tool for LinearFlexibleAndPinionPair +class RWStepKinematics_RWLinearFlexibleAndPinionPair +{ +public: + + DEFINE_STANDARD_ALLOC + + Standard_EXPORT RWStepKinematics_RWLinearFlexibleAndPinionPair(); + + Standard_EXPORT void ReadStep(const Handle(StepData_StepReaderData)& theData, const Standard_Integer theNum, Handle(Interface_Check)& theArch, const Handle(StepKinematics_LinearFlexibleAndPinionPair)& theEnt) const; + + Standard_EXPORT void WriteStep(StepData_StepWriter& theSW, const Handle(StepKinematics_LinearFlexibleAndPinionPair)& theEnt) const; + + Standard_EXPORT void Share(const Handle(StepKinematics_LinearFlexibleAndPinionPair)& theEnt, Interface_EntityIterator& iter) const; + +}; +#endif // _RWStepKinematics_RWLinearFlexibleAndPinionPair_HeaderFile_ diff --git a/src/RWStepKinematics/RWStepKinematics_RWLinearFlexibleAndPlanarCurvePair.cxx b/src/RWStepKinematics/RWStepKinematics_RWLinearFlexibleAndPlanarCurvePair.cxx new file mode 100644 index 0000000000..c3d1e3c645 --- /dev/null +++ b/src/RWStepKinematics/RWStepKinematics_RWLinearFlexibleAndPlanarCurvePair.cxx @@ -0,0 +1,159 @@ +// Created on : Fri May 08 19:02:07 2020 +// Created by: Irina KRYLOVA +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V3.0 +// Copyright (c) Open CASCADE 2020 +// +// This file is part of Open CASCADE Technology software library. +// +// This library is free software; you can redistribute it and/or modify it under +// the terms of the GNU Lesser General Public License version 2.1 as published +// by the Free Software Foundation, with special exception defined in the file +// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT +// distribution for complete text of the license and disclaimer of any warranty. +// +// Alternatively, this file may be used under the terms of Open CASCADE +// commercial license or contractual agreement. + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +//======================================================================= +//function : RWStepKinematics_RWLinearFlexibleAndPlanarCurvePair +//purpose : +//======================================================================= +RWStepKinematics_RWLinearFlexibleAndPlanarCurvePair::RWStepKinematics_RWLinearFlexibleAndPlanarCurvePair() {} + + +//======================================================================= +//function : ReadStep +//purpose : +//======================================================================= +void RWStepKinematics_RWLinearFlexibleAndPlanarCurvePair::ReadStep (const Handle(StepData_StepReaderData)& theData, + const Standard_Integer theNum, + Handle(Interface_Check)& theArch, + const Handle(StepKinematics_LinearFlexibleAndPlanarCurvePair)& theEnt) const +{ + // Check number of parameters + if ( ! theData->CheckNbParams(theNum,8,theArch,"linear_flexible_and_planar_curve_pair") ) return; + + // Inherited fields of RepresentationItem + + Handle(TCollection_HAsciiString) aRepresentationItem_Name; + theData->ReadString (theNum, 1, "representation_item.name", theArch, aRepresentationItem_Name); + + // Inherited fields of ItemDefinedTransformation + + Handle(TCollection_HAsciiString) aItemDefinedTransformation_Name; + theData->ReadString (theNum, 2, "item_defined_transformation.name", theArch, aItemDefinedTransformation_Name); + + Handle(TCollection_HAsciiString) aItemDefinedTransformation_Description; + Standard_Boolean hasItemDefinedTransformation_Description = Standard_True; + if ( theData->IsParamDefined (theNum,3) ) { + theData->ReadString (theNum, 3, "item_defined_transformation.description", theArch, aItemDefinedTransformation_Description); + } + else { + hasItemDefinedTransformation_Description = Standard_False; + aItemDefinedTransformation_Description.Nullify(); + } + + Handle(StepRepr_RepresentationItem) aItemDefinedTransformation_TransformItem1; + theData->ReadEntity (theNum, 4, "item_defined_transformation.transform_item1", theArch, STANDARD_TYPE(StepRepr_RepresentationItem), aItemDefinedTransformation_TransformItem1); + + Handle(StepRepr_RepresentationItem) aItemDefinedTransformation_TransformItem2; + theData->ReadEntity (theNum, 5, "item_defined_transformation.transform_item2", theArch, STANDARD_TYPE(StepRepr_RepresentationItem), aItemDefinedTransformation_TransformItem2); + + // Inherited fields of KinematicPair + + Handle(StepKinematics_KinematicJoint) aKinematicPair_Joint; + theData->ReadEntity (theNum, 6, "kinematic_pair.joint", theArch, STANDARD_TYPE(StepKinematics_KinematicJoint), aKinematicPair_Joint); + + // Own fields of LinearFlexibleAndPlanarCurvePair + + Handle(StepGeom_Curve) aPairCurve; + theData->ReadEntity (theNum, 7, "pair_curve", theArch, STANDARD_TYPE(StepGeom_Curve), aPairCurve); + + Standard_Boolean aOrientation; + theData->ReadBoolean (theNum, 8, "orientation", theArch, aOrientation); + + // Initialize entity + theEnt->Init(aRepresentationItem_Name, + aItemDefinedTransformation_Name, + hasItemDefinedTransformation_Description, + aItemDefinedTransformation_Description, + aItemDefinedTransformation_TransformItem1, + aItemDefinedTransformation_TransformItem2, + aKinematicPair_Joint, + aPairCurve, + aOrientation); +} + +//======================================================================= +//function : WriteStep +//purpose : +//======================================================================= +void RWStepKinematics_RWLinearFlexibleAndPlanarCurvePair::WriteStep (StepData_StepWriter& theSW, + const Handle(StepKinematics_LinearFlexibleAndPlanarCurvePair)& theEnt) const +{ + + // Own fields of RepresentationItem + + theSW.Send (theEnt->Name()); + + // Inherited fields of ItemDefinedTransformation + + theSW.Send (theEnt->ItemDefinedTransformation()->Name()); + + if ( theEnt->ItemDefinedTransformation()->HasDescription() ) { + theSW.Send (theEnt->ItemDefinedTransformation()->Description()); + } + else theSW.SendUndef(); + + theSW.Send (theEnt->ItemDefinedTransformation()->TransformItem1()); + + theSW.Send (theEnt->ItemDefinedTransformation()->TransformItem2()); + + // Own fields of KinematicPair + + theSW.Send (theEnt->Joint()); + + // Own fields of LinearFlexibleAndPlanarCurvePair + + theSW.Send (theEnt->PairCurve()); + + theSW.SendBoolean (theEnt->Orientation()); +} + +//======================================================================= +//function : Share +//purpose : +//======================================================================= +void RWStepKinematics_RWLinearFlexibleAndPlanarCurvePair::Share (const Handle(StepKinematics_LinearFlexibleAndPlanarCurvePair)& theEnt, + Interface_EntityIterator& iter) const +{ + + // Inherited fields of RepresentationItem + + // Inherited fields of ItemDefinedTransformation + + iter.AddItem (theEnt->ItemDefinedTransformation()->TransformItem1()); + + iter.AddItem (theEnt->ItemDefinedTransformation()->TransformItem2()); + + // Inherited fields of KinematicPair + + iter.AddItem (theEnt->StepKinematics_KinematicPair::Joint()); + + // Own fields of LinearFlexibleAndPlanarCurvePair + + iter.AddItem (theEnt->PairCurve()); +} diff --git a/src/RWStepKinematics/RWStepKinematics_RWLinearFlexibleAndPlanarCurvePair.hxx b/src/RWStepKinematics/RWStepKinematics_RWLinearFlexibleAndPlanarCurvePair.hxx new file mode 100644 index 0000000000..58d1582fc8 --- /dev/null +++ b/src/RWStepKinematics/RWStepKinematics_RWLinearFlexibleAndPlanarCurvePair.hxx @@ -0,0 +1,46 @@ +// Created on : Fri May 08 19:02:07 2020 +// Created by: Irina KRYLOVA +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V3.0 +// Copyright (c) Open CASCADE 2020 +// +// 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 _RWStepKinematics_RWLinearFlexibleAndPlanarCurvePair_HeaderFile_ +#define _RWStepKinematics_RWLinearFlexibleAndPlanarCurvePair_HeaderFile_ + +#include +#include +#include + +class StepData_StepReaderData; +class Interface_Check; +class StepData_StepWriter; +class Interface_EntityIterator; +class StepKinematics_LinearFlexibleAndPlanarCurvePair; + +//! Read & Write tool for LinearFlexibleAndPlanarCurvePair +class RWStepKinematics_RWLinearFlexibleAndPlanarCurvePair +{ +public: + + DEFINE_STANDARD_ALLOC + + Standard_EXPORT RWStepKinematics_RWLinearFlexibleAndPlanarCurvePair(); + + Standard_EXPORT void ReadStep(const Handle(StepData_StepReaderData)& theData, const Standard_Integer theNum, Handle(Interface_Check)& theArch, const Handle(StepKinematics_LinearFlexibleAndPlanarCurvePair)& theEnt) const; + + Standard_EXPORT void WriteStep(StepData_StepWriter& theSW, const Handle(StepKinematics_LinearFlexibleAndPlanarCurvePair)& theEnt) const; + + Standard_EXPORT void Share(const Handle(StepKinematics_LinearFlexibleAndPlanarCurvePair)& theEnt, Interface_EntityIterator& iter) const; + +}; +#endif // _RWStepKinematics_RWLinearFlexibleAndPlanarCurvePair_HeaderFile_ diff --git a/src/RWStepKinematics/RWStepKinematics_RWLinearFlexibleLinkRepresentation.cxx b/src/RWStepKinematics/RWStepKinematics_RWLinearFlexibleLinkRepresentation.cxx new file mode 100644 index 0000000000..f73067b647 --- /dev/null +++ b/src/RWStepKinematics/RWStepKinematics_RWLinearFlexibleLinkRepresentation.cxx @@ -0,0 +1,127 @@ +// Created on : Fri May 08 19:02:07 2020 +// Created by: Irina KRYLOVA +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V3.0 +// Copyright (c) Open CASCADE 2020 +// +// This file is part of Open CASCADE Technology software library. +// +// This library is free software; you can redistribute it and/or modify it under +// the terms of the GNU Lesser General Public License version 2.1 as published +// by the Free Software Foundation, with special exception defined in the file +// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT +// distribution for complete text of the license and disclaimer of any warranty. +// +// Alternatively, this file may be used under the terms of Open CASCADE +// commercial license or contractual agreement. + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +//======================================================================= +//function : RWStepKinematics_RWLinearFlexibleLinkRepresentation +//purpose : +//======================================================================= +RWStepKinematics_RWLinearFlexibleLinkRepresentation::RWStepKinematics_RWLinearFlexibleLinkRepresentation() {} + + +//======================================================================= +//function : ReadStep +//purpose : +//======================================================================= +void RWStepKinematics_RWLinearFlexibleLinkRepresentation::ReadStep (const Handle(StepData_StepReaderData)& theData, + const Standard_Integer theNum, + Handle(Interface_Check)& theArch, + const Handle(StepKinematics_LinearFlexibleLinkRepresentation)& theEnt) const +{ + // Check number of parameters + if ( ! theData->CheckNbParams(theNum,4,theArch,"linear_flexible_link_representation") ) return; + + // Inherited fields of Representation + + Handle(TCollection_HAsciiString) aRepresentation_Name; + theData->ReadString (theNum, 1, "representation.name", theArch, aRepresentation_Name); + + Handle(StepRepr_HArray1OfRepresentationItem) aRepresentation_Items; + Standard_Integer sub2 = 0; + if ( theData->ReadSubList (theNum, 2, "representation.items", theArch, sub2) ) { + Standard_Integer nb0 = theData->NbParams(sub2); + aRepresentation_Items = new StepRepr_HArray1OfRepresentationItem (1, nb0); + Standard_Integer num2 = sub2; + for ( Standard_Integer i0=1; i0 <= nb0; i0++ ) { + Handle(StepRepr_RepresentationItem) anIt0; + theData->ReadEntity (num2, i0, "representation_item", theArch, STANDARD_TYPE(StepRepr_RepresentationItem), anIt0); + aRepresentation_Items->SetValue(i0, anIt0); + } + } + + Handle(StepRepr_RepresentationContext) aRepresentation_ContextOfItems; + theData->ReadEntity (theNum, 3, "representation.context_of_items", theArch, STANDARD_TYPE(StepRepr_RepresentationContext), aRepresentation_ContextOfItems); + + // Inherited fields of KinematicLinkRepresentation + + Handle(StepKinematics_KinematicLink) aKinematicLinkRepresentation_RepresentedLink; + theData->ReadEntity (theNum, 4, "kinematic_link_representation.represented_link", theArch, STANDARD_TYPE(StepKinematics_KinematicLink), aKinematicLinkRepresentation_RepresentedLink); + + // Initialize entity + theEnt->Init(aRepresentation_Name, + aRepresentation_Items, + aRepresentation_ContextOfItems, + aKinematicLinkRepresentation_RepresentedLink); +} + +//======================================================================= +//function : WriteStep +//purpose : +//======================================================================= +void RWStepKinematics_RWLinearFlexibleLinkRepresentation::WriteStep (StepData_StepWriter& theSW, + const Handle(StepKinematics_LinearFlexibleLinkRepresentation)& theEnt) const +{ + + // Own fields of Representation + + theSW.Send (theEnt->Name()); + + theSW.OpenSub(); + for (Standard_Integer i1=1; i1 <= theEnt->Items()->Length(); i1++ ) { + Handle(StepRepr_RepresentationItem) Var0 = theEnt->Items()->Value(i1); + theSW.Send (Var0); + } + theSW.CloseSub(); + + theSW.Send (theEnt->ContextOfItems()); + + // Own fields of KinematicLinkRepresentation + + theSW.Send (theEnt->RepresentedLink()); +} + +//======================================================================= +//function : Share +//purpose : +//======================================================================= +void RWStepKinematics_RWLinearFlexibleLinkRepresentation::Share (const Handle(StepKinematics_LinearFlexibleLinkRepresentation)& theEnt, + Interface_EntityIterator& iter) const +{ + + // Inherited fields of Representation + + for (Standard_Integer i1=1; i1 <= theEnt->StepRepr_Representation::Items()->Length(); i1++ ) { + Handle(StepRepr_RepresentationItem) Var0 = theEnt->StepRepr_Representation::Items()->Value(i1); + iter.AddItem (Var0); + } + + iter.AddItem (theEnt->StepRepr_Representation::ContextOfItems()); + + // Inherited fields of KinematicLinkRepresentation + + iter.AddItem (theEnt->StepKinematics_KinematicLinkRepresentation::RepresentedLink()); +} diff --git a/src/RWStepKinematics/RWStepKinematics_RWLinearFlexibleLinkRepresentation.hxx b/src/RWStepKinematics/RWStepKinematics_RWLinearFlexibleLinkRepresentation.hxx new file mode 100644 index 0000000000..567e5a8c0e --- /dev/null +++ b/src/RWStepKinematics/RWStepKinematics_RWLinearFlexibleLinkRepresentation.hxx @@ -0,0 +1,46 @@ +// Created on : Fri May 08 19:02:07 2020 +// Created by: Irina KRYLOVA +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V3.0 +// Copyright (c) Open CASCADE 2020 +// +// 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 _RWStepKinematics_RWLinearFlexibleLinkRepresentation_HeaderFile_ +#define _RWStepKinematics_RWLinearFlexibleLinkRepresentation_HeaderFile_ + +#include +#include +#include + +class StepData_StepReaderData; +class Interface_Check; +class StepData_StepWriter; +class Interface_EntityIterator; +class StepKinematics_LinearFlexibleLinkRepresentation; + +//! Read & Write tool for LinearFlexibleLinkRepresentation +class RWStepKinematics_RWLinearFlexibleLinkRepresentation +{ +public: + + DEFINE_STANDARD_ALLOC + + Standard_EXPORT RWStepKinematics_RWLinearFlexibleLinkRepresentation(); + + Standard_EXPORT void ReadStep(const Handle(StepData_StepReaderData)& theData, const Standard_Integer theNum, Handle(Interface_Check)& theArch, const Handle(StepKinematics_LinearFlexibleLinkRepresentation)& theEnt) const; + + Standard_EXPORT void WriteStep(StepData_StepWriter& theSW, const Handle(StepKinematics_LinearFlexibleLinkRepresentation)& theEnt) const; + + Standard_EXPORT void Share(const Handle(StepKinematics_LinearFlexibleLinkRepresentation)& theEnt, Interface_EntityIterator& iter) const; + +}; +#endif // _RWStepKinematics_RWLinearFlexibleLinkRepresentation_HeaderFile_ diff --git a/src/RWStepKinematics/RWStepKinematics_RWLowOrderKinematicPair.cxx b/src/RWStepKinematics/RWStepKinematics_RWLowOrderKinematicPair.cxx new file mode 100644 index 0000000000..599783cf4f --- /dev/null +++ b/src/RWStepKinematics/RWStepKinematics_RWLowOrderKinematicPair.cxx @@ -0,0 +1,180 @@ +// Created on : Sat May 02 12:41:15 2020 +// Created by: Irina KRYLOVA +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V3.0 +// Copyright (c) Open CASCADE 2020 +// +// This file is part of Open CASCADE Technology software library. +// +// This library is free software; you can redistribute it and/or modify it under +// the terms of the GNU Lesser General Public License version 2.1 as published +// by the Free Software Foundation, with special exception defined in the file +// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT +// distribution for complete text of the license and disclaimer of any warranty. +// +// Alternatively, this file may be used under the terms of Open CASCADE +// commercial license or contractual agreement. + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +//======================================================================= +//function : RWStepKinematics_RWLowOrderKinematicPair +//purpose : +//======================================================================= +RWStepKinematics_RWLowOrderKinematicPair::RWStepKinematics_RWLowOrderKinematicPair() {} + + +//======================================================================= +//function : ReadStep +//purpose : +//======================================================================= +void RWStepKinematics_RWLowOrderKinematicPair::ReadStep (const Handle(StepData_StepReaderData)& theData, + const Standard_Integer theNum, + Handle(Interface_Check)& theArch, + const Handle(StepKinematics_LowOrderKinematicPair)& theEnt) const +{ + // Check number of parameters + if ( ! theData->CheckNbParams(theNum,12,theArch,"low_order_kinematic_pair") ) return; + + // Inherited fields of RepresentationItem + + Handle(TCollection_HAsciiString) aRepresentationItem_Name; + theData->ReadString (theNum, 1, "representation_item.name", theArch, aRepresentationItem_Name); + + // Inherited fields of ItemDefinedTransformation + + Handle(TCollection_HAsciiString) aItemDefinedTransformation_Name; + theData->ReadString (theNum, 2, "item_defined_transformation.name", theArch, aItemDefinedTransformation_Name); + + Handle(TCollection_HAsciiString) aItemDefinedTransformation_Description; + Standard_Boolean hasItemDefinedTransformation_Description = Standard_True; + if ( theData->IsParamDefined (theNum,3) ) { + theData->ReadString (theNum, 3, "item_defined_transformation.description", theArch, aItemDefinedTransformation_Description); + } + else { + hasItemDefinedTransformation_Description = Standard_False; + aItemDefinedTransformation_Description.Nullify(); + } + + Handle(StepRepr_RepresentationItem) aItemDefinedTransformation_TransformItem1; + theData->ReadEntity (theNum, 4, "item_defined_transformation.transform_item1", theArch, STANDARD_TYPE(StepRepr_RepresentationItem), aItemDefinedTransformation_TransformItem1); + + Handle(StepRepr_RepresentationItem) aItemDefinedTransformation_TransformItem2; + theData->ReadEntity (theNum, 5, "item_defined_transformation.transform_item2", theArch, STANDARD_TYPE(StepRepr_RepresentationItem), aItemDefinedTransformation_TransformItem2); + + // Inherited fields of KinematicPair + + Handle(StepKinematics_KinematicJoint) aKinematicPair_Joint; + theData->ReadEntity (theNum, 6, "kinematic_pair.joint", theArch, STANDARD_TYPE(StepKinematics_KinematicJoint), aKinematicPair_Joint); + + // Own fields of LowOrderKinematicPair + + Standard_Boolean aTX; + theData->ReadBoolean (theNum, 7, "t_x", theArch, aTX); + + Standard_Boolean aTY; + theData->ReadBoolean (theNum, 8, "t_y", theArch, aTY); + + Standard_Boolean aTZ; + theData->ReadBoolean (theNum, 9, "t_z", theArch, aTZ); + + Standard_Boolean aRX; + theData->ReadBoolean (theNum, 10, "r_x", theArch, aRX); + + Standard_Boolean aRY; + theData->ReadBoolean (theNum, 11, "r_y", theArch, aRY); + + Standard_Boolean aRZ; + theData->ReadBoolean (theNum, 12, "r_z", theArch, aRZ); + + // Initialize entity + theEnt->Init(aRepresentationItem_Name, + aItemDefinedTransformation_Name, + hasItemDefinedTransformation_Description, + aItemDefinedTransformation_Description, + aItemDefinedTransformation_TransformItem1, + aItemDefinedTransformation_TransformItem2, + aKinematicPair_Joint, + aTX, + aTY, + aTZ, + aRX, + aRY, + aRZ); +} + +//======================================================================= +//function : WriteStep +//purpose : +//======================================================================= +void RWStepKinematics_RWLowOrderKinematicPair::WriteStep (StepData_StepWriter& theSW, + const Handle(StepKinematics_LowOrderKinematicPair)& theEnt) const +{ + + // Own fields of RepresentationItem + + theSW.Send (theEnt->Name()); + + // Inherited fields of ItemDefinedTransformation + + theSW.Send (theEnt->ItemDefinedTransformation()->Name()); + + if ( theEnt->ItemDefinedTransformation()->HasDescription() ) { + theSW.Send (theEnt->ItemDefinedTransformation()->Description()); + } + else theSW.SendUndef(); + + theSW.Send (theEnt->ItemDefinedTransformation()->TransformItem1()); + + theSW.Send (theEnt->ItemDefinedTransformation()->TransformItem2()); + + // Own fields of KinematicPair + + theSW.Send (theEnt->Joint()); + + // Own fields of LowOrderKinematicPair + + theSW.SendBoolean (theEnt->TX()); + + theSW.SendBoolean (theEnt->TY()); + + theSW.SendBoolean (theEnt->TZ()); + + theSW.SendBoolean (theEnt->RX()); + + theSW.SendBoolean (theEnt->RY()); + + theSW.SendBoolean (theEnt->RZ()); +} + +//======================================================================= +//function : Share +//purpose : +//======================================================================= +void RWStepKinematics_RWLowOrderKinematicPair::Share (const Handle(StepKinematics_LowOrderKinematicPair)& theEnt, + Interface_EntityIterator& iter) const +{ + + // Inherited fields of RepresentationItem + + // Inherited fields of ItemDefinedTransformation + + iter.AddItem (theEnt->ItemDefinedTransformation()->TransformItem1()); + + iter.AddItem (theEnt->ItemDefinedTransformation()->TransformItem2()); + + // Inherited fields of KinematicPair + + iter.AddItem (theEnt->StepKinematics_KinematicPair::Joint()); + + // Own fields of LowOrderKinematicPair +} diff --git a/src/RWStepKinematics/RWStepKinematics_RWLowOrderKinematicPair.hxx b/src/RWStepKinematics/RWStepKinematics_RWLowOrderKinematicPair.hxx new file mode 100644 index 0000000000..74e5a45880 --- /dev/null +++ b/src/RWStepKinematics/RWStepKinematics_RWLowOrderKinematicPair.hxx @@ -0,0 +1,46 @@ +// Created on : Sat May 02 12:41:15 2020 +// Created by: Irina KRYLOVA +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V3.0 +// Copyright (c) Open CASCADE 2020 +// +// 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 _RWStepKinematics_RWLowOrderKinematicPair_HeaderFile_ +#define _RWStepKinematics_RWLowOrderKinematicPair_HeaderFile_ + +#include +#include +#include + +class StepData_StepReaderData; +class Interface_Check; +class StepData_StepWriter; +class Interface_EntityIterator; +class StepKinematics_LowOrderKinematicPair; + +//! Read & Write tool for LowOrderKinematicPair +class RWStepKinematics_RWLowOrderKinematicPair +{ +public: + + DEFINE_STANDARD_ALLOC + + Standard_EXPORT RWStepKinematics_RWLowOrderKinematicPair(); + + Standard_EXPORT void ReadStep(const Handle(StepData_StepReaderData)& theData, const Standard_Integer theNum, Handle(Interface_Check)& theArch, const Handle(StepKinematics_LowOrderKinematicPair)& theEnt) const; + + Standard_EXPORT void WriteStep(StepData_StepWriter& theSW, const Handle(StepKinematics_LowOrderKinematicPair)& theEnt) const; + + Standard_EXPORT void Share(const Handle(StepKinematics_LowOrderKinematicPair)& theEnt, Interface_EntityIterator& iter) const; + +}; +#endif // _RWStepKinematics_RWLowOrderKinematicPair_HeaderFile_ diff --git a/src/RWStepKinematics/RWStepKinematics_RWLowOrderKinematicPairValue.cxx b/src/RWStepKinematics/RWStepKinematics_RWLowOrderKinematicPairValue.cxx new file mode 100644 index 0000000000..41a432b814 --- /dev/null +++ b/src/RWStepKinematics/RWStepKinematics_RWLowOrderKinematicPairValue.cxx @@ -0,0 +1,133 @@ +// Created on : Sat May 02 12:41:15 2020 +// Created by: Irina KRYLOVA +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V3.0 +// Copyright (c) Open CASCADE 2020 +// +// This file is part of Open CASCADE Technology software library. +// +// This library is free software; you can redistribute it and/or modify it under +// the terms of the GNU Lesser General Public License version 2.1 as published +// by the Free Software Foundation, with special exception defined in the file +// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT +// distribution for complete text of the license and disclaimer of any warranty. +// +// Alternatively, this file may be used under the terms of Open CASCADE +// commercial license or contractual agreement. + +#include + +#include +#include +#include +#include +#include +#include +#include + +//======================================================================= +//function : RWStepKinematics_RWLowOrderKinematicPairValue +//purpose : +//======================================================================= +RWStepKinematics_RWLowOrderKinematicPairValue::RWStepKinematics_RWLowOrderKinematicPairValue() {} + + +//======================================================================= +//function : ReadStep +//purpose : +//======================================================================= +void RWStepKinematics_RWLowOrderKinematicPairValue::ReadStep (const Handle(StepData_StepReaderData)& theData, + const Standard_Integer theNum, + Handle(Interface_Check)& theArch, + const Handle(StepKinematics_LowOrderKinematicPairValue)& theEnt) const +{ + // Check number of parameters + if ( ! theData->CheckNbParams(theNum,8,theArch,"low_order_kinematic_pair_value") ) return; + + // Inherited fields of RepresentationItem + + Handle(TCollection_HAsciiString) aRepresentationItem_Name; + theData->ReadString (theNum, 1, "representation_item.name", theArch, aRepresentationItem_Name); + + // Inherited fields of PairValue + + Handle(StepKinematics_KinematicPair) aPairValue_AppliesToPair; + theData->ReadEntity (theNum, 2, "pair_value.applies_to_pair", theArch, STANDARD_TYPE(StepKinematics_KinematicPair), aPairValue_AppliesToPair); + + // Own fields of LowOrderKinematicPairValue + + Standard_Real aActualTranslationX; + theData->ReadReal (theNum, 3, "actual_translation_x", theArch, aActualTranslationX); + + Standard_Real aActualTranslationY; + theData->ReadReal (theNum, 4, "actual_translation_y", theArch, aActualTranslationY); + + Standard_Real aActualTranslationZ; + theData->ReadReal (theNum, 5, "actual_translation_z", theArch, aActualTranslationZ); + + Standard_Real aActualRotationX; + theData->ReadReal (theNum, 6, "actual_rotation_x", theArch, aActualRotationX); + + Standard_Real aActualRotationY; + theData->ReadReal (theNum, 7, "actual_rotation_y", theArch, aActualRotationY); + + Standard_Real aActualRotationZ; + theData->ReadReal (theNum, 8, "actual_rotation_z", theArch, aActualRotationZ); + + // Initialize entity + theEnt->Init(aRepresentationItem_Name, + aPairValue_AppliesToPair, + aActualTranslationX, + aActualTranslationY, + aActualTranslationZ, + aActualRotationX, + aActualRotationY, + aActualRotationZ); +} + +//======================================================================= +//function : WriteStep +//purpose : +//======================================================================= +void RWStepKinematics_RWLowOrderKinematicPairValue::WriteStep (StepData_StepWriter& theSW, + const Handle(StepKinematics_LowOrderKinematicPairValue)& theEnt) const +{ + + // Own fields of RepresentationItem + + theSW.Send (theEnt->Name()); + + // Own fields of PairValue + + theSW.Send (theEnt->AppliesToPair()); + + // Own fields of LowOrderKinematicPairValue + + theSW.Send (theEnt->ActualTranslationX()); + + theSW.Send (theEnt->ActualTranslationY()); + + theSW.Send (theEnt->ActualTranslationZ()); + + theSW.Send (theEnt->ActualRotationX()); + + theSW.Send (theEnt->ActualRotationY()); + + theSW.Send (theEnt->ActualRotationZ()); +} + +//======================================================================= +//function : Share +//purpose : +//======================================================================= +void RWStepKinematics_RWLowOrderKinematicPairValue::Share (const Handle(StepKinematics_LowOrderKinematicPairValue)& theEnt, + Interface_EntityIterator& iter) const +{ + + // Inherited fields of RepresentationItem + + // Inherited fields of PairValue + + iter.AddItem (theEnt->StepKinematics_PairValue::AppliesToPair()); + + // Own fields of LowOrderKinematicPairValue +} diff --git a/src/RWStepKinematics/RWStepKinematics_RWLowOrderKinematicPairValue.hxx b/src/RWStepKinematics/RWStepKinematics_RWLowOrderKinematicPairValue.hxx new file mode 100644 index 0000000000..b9060d0348 --- /dev/null +++ b/src/RWStepKinematics/RWStepKinematics_RWLowOrderKinematicPairValue.hxx @@ -0,0 +1,46 @@ +// Created on : Sat May 02 12:41:15 2020 +// Created by: Irina KRYLOVA +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V3.0 +// Copyright (c) Open CASCADE 2020 +// +// 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 _RWStepKinematics_RWLowOrderKinematicPairValue_HeaderFile_ +#define _RWStepKinematics_RWLowOrderKinematicPairValue_HeaderFile_ + +#include +#include +#include + +class StepData_StepReaderData; +class Interface_Check; +class StepData_StepWriter; +class Interface_EntityIterator; +class StepKinematics_LowOrderKinematicPairValue; + +//! Read & Write tool for LowOrderKinematicPairValue +class RWStepKinematics_RWLowOrderKinematicPairValue +{ +public: + + DEFINE_STANDARD_ALLOC + + Standard_EXPORT RWStepKinematics_RWLowOrderKinematicPairValue(); + + Standard_EXPORT void ReadStep(const Handle(StepData_StepReaderData)& theData, const Standard_Integer theNum, Handle(Interface_Check)& theArch, const Handle(StepKinematics_LowOrderKinematicPairValue)& theEnt) const; + + Standard_EXPORT void WriteStep(StepData_StepWriter& theSW, const Handle(StepKinematics_LowOrderKinematicPairValue)& theEnt) const; + + Standard_EXPORT void Share(const Handle(StepKinematics_LowOrderKinematicPairValue)& theEnt, Interface_EntityIterator& iter) const; + +}; +#endif // _RWStepKinematics_RWLowOrderKinematicPairValue_HeaderFile_ diff --git a/src/RWStepKinematics/RWStepKinematics_RWLowOrderKinematicPairWithRange.cxx b/src/RWStepKinematics/RWStepKinematics_RWLowOrderKinematicPairWithRange.cxx new file mode 100644 index 0000000000..f3070a5580 --- /dev/null +++ b/src/RWStepKinematics/RWStepKinematics_RWLowOrderKinematicPairWithRange.cxx @@ -0,0 +1,391 @@ +// Created on : Sat May 02 12:41:15 2020 +// Created by: Irina KRYLOVA +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V3.0 +// Copyright (c) Open CASCADE 2020 +// +// This file is part of Open CASCADE Technology software library. +// +// This library is free software; you can redistribute it and/or modify it under +// the terms of the GNU Lesser General Public License version 2.1 as published +// by the Free Software Foundation, with special exception defined in the file +// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT +// distribution for complete text of the license and disclaimer of any warranty. +// +// Alternatively, this file may be used under the terms of Open CASCADE +// commercial license or contractual agreement. + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +//======================================================================= +//function : RWStepKinematics_RWLowOrderKinematicPairWithRange +//purpose : +//======================================================================= +RWStepKinematics_RWLowOrderKinematicPairWithRange::RWStepKinematics_RWLowOrderKinematicPairWithRange() {} + + +//======================================================================= +//function : ReadStep +//purpose : +//======================================================================= +void RWStepKinematics_RWLowOrderKinematicPairWithRange::ReadStep (const Handle(StepData_StepReaderData)& theData, + const Standard_Integer theNum, + Handle(Interface_Check)& theArch, + const Handle(StepKinematics_LowOrderKinematicPairWithRange)& theEnt) const +{ + // Check number of parameters + if ( ! theData->CheckNbParams(theNum,24,theArch,"low_order_kinematic_pair_with_range") ) return; + + // Inherited fields of RepresentationItem + + Handle(TCollection_HAsciiString) aRepresentationItem_Name; + theData->ReadString (theNum, 1, "representation_item.name", theArch, aRepresentationItem_Name); + + // Inherited fields of ItemDefinedTransformation + + Handle(TCollection_HAsciiString) aItemDefinedTransformation_Name; + theData->ReadString (theNum, 2, "item_defined_transformation.name", theArch, aItemDefinedTransformation_Name); + + Handle(TCollection_HAsciiString) aItemDefinedTransformation_Description; + Standard_Boolean hasItemDefinedTransformation_Description = Standard_True; + if ( theData->IsParamDefined (theNum,3) ) { + theData->ReadString (theNum, 3, "item_defined_transformation.description", theArch, aItemDefinedTransformation_Description); + } + else { + hasItemDefinedTransformation_Description = Standard_False; + aItemDefinedTransformation_Description.Nullify(); + } + + Handle(StepRepr_RepresentationItem) aItemDefinedTransformation_TransformItem1; + theData->ReadEntity (theNum, 4, "item_defined_transformation.transform_item1", theArch, STANDARD_TYPE(StepRepr_RepresentationItem), aItemDefinedTransformation_TransformItem1); + + Handle(StepRepr_RepresentationItem) aItemDefinedTransformation_TransformItem2; + theData->ReadEntity (theNum, 5, "item_defined_transformation.transform_item2", theArch, STANDARD_TYPE(StepRepr_RepresentationItem), aItemDefinedTransformation_TransformItem2); + + // Inherited fields of KinematicPair + + Handle(StepKinematics_KinematicJoint) aKinematicPair_Joint; + theData->ReadEntity (theNum, 6, "kinematic_pair.joint", theArch, STANDARD_TYPE(StepKinematics_KinematicJoint), aKinematicPair_Joint); + + // Inherited fields of LowOrderKinematicPair + + Standard_Boolean aLowOrderKinematicPair_TX; + theData->ReadBoolean (theNum, 7, "low_order_kinematic_pair.t_x", theArch, aLowOrderKinematicPair_TX); + + Standard_Boolean aLowOrderKinematicPair_TY; + theData->ReadBoolean (theNum, 8, "low_order_kinematic_pair.t_y", theArch, aLowOrderKinematicPair_TY); + + Standard_Boolean aLowOrderKinematicPair_TZ; + theData->ReadBoolean (theNum, 9, "low_order_kinematic_pair.t_z", theArch, aLowOrderKinematicPair_TZ); + + Standard_Boolean aLowOrderKinematicPair_RX; + theData->ReadBoolean (theNum, 10, "low_order_kinematic_pair.r_x", theArch, aLowOrderKinematicPair_RX); + + Standard_Boolean aLowOrderKinematicPair_RY; + theData->ReadBoolean (theNum, 11, "low_order_kinematic_pair.r_y", theArch, aLowOrderKinematicPair_RY); + + Standard_Boolean aLowOrderKinematicPair_RZ; + theData->ReadBoolean (theNum, 12, "low_order_kinematic_pair.r_z", theArch, aLowOrderKinematicPair_RZ); + + // Own fields of LowOrderKinematicPairWithRange + + Standard_Real aLowerLimitActualRotationX; + Standard_Boolean hasLowerLimitActualRotationX = Standard_True; + if ( theData->IsParamDefined (theNum,13) ) { + theData->ReadReal (theNum, 13, "lower_limit_actual_rotation_x", theArch, aLowerLimitActualRotationX); + } + else { + hasLowerLimitActualRotationX = Standard_False; + aLowerLimitActualRotationX = 0; + } + + Standard_Real aUpperLimitActualRotationX; + Standard_Boolean hasUpperLimitActualRotationX = Standard_True; + if ( theData->IsParamDefined (theNum,14) ) { + theData->ReadReal (theNum, 14, "upper_limit_actual_rotation_x", theArch, aUpperLimitActualRotationX); + } + else { + hasUpperLimitActualRotationX = Standard_False; + aUpperLimitActualRotationX = 0; + } + + Standard_Real aLowerLimitActualRotationY; + Standard_Boolean hasLowerLimitActualRotationY = Standard_True; + if ( theData->IsParamDefined (theNum,15) ) { + theData->ReadReal (theNum, 15, "lower_limit_actual_rotation_y", theArch, aLowerLimitActualRotationY); + } + else { + hasLowerLimitActualRotationY = Standard_False; + aLowerLimitActualRotationY = 0; + } + + Standard_Real aUpperLimitActualRotationY; + Standard_Boolean hasUpperLimitActualRotationY = Standard_True; + if ( theData->IsParamDefined (theNum,16) ) { + theData->ReadReal (theNum, 16, "upper_limit_actual_rotation_y", theArch, aUpperLimitActualRotationY); + } + else { + hasUpperLimitActualRotationY = Standard_False; + aUpperLimitActualRotationY = 0; + } + + Standard_Real aLowerLimitActualRotationZ; + Standard_Boolean hasLowerLimitActualRotationZ = Standard_True; + if ( theData->IsParamDefined (theNum,17) ) { + theData->ReadReal (theNum, 17, "lower_limit_actual_rotation_z", theArch, aLowerLimitActualRotationZ); + } + else { + hasLowerLimitActualRotationZ = Standard_False; + aLowerLimitActualRotationZ = 0; + } + + Standard_Real aUpperLimitActualRotationZ; + Standard_Boolean hasUpperLimitActualRotationZ = Standard_True; + if ( theData->IsParamDefined (theNum,18) ) { + theData->ReadReal (theNum, 18, "upper_limit_actual_rotation_z", theArch, aUpperLimitActualRotationZ); + } + else { + hasUpperLimitActualRotationZ = Standard_False; + aUpperLimitActualRotationZ = 0; + } + + Standard_Real aLowerLimitActualTranslationX; + Standard_Boolean hasLowerLimitActualTranslationX = Standard_True; + if ( theData->IsParamDefined (theNum,19) ) { + theData->ReadReal (theNum, 19, "lower_limit_actual_translation_x", theArch, aLowerLimitActualTranslationX); + } + else { + hasLowerLimitActualTranslationX = Standard_False; + aLowerLimitActualTranslationX = 0; + } + + Standard_Real aUpperLimitActualTranslationX; + Standard_Boolean hasUpperLimitActualTranslationX = Standard_True; + if ( theData->IsParamDefined (theNum,20) ) { + theData->ReadReal (theNum, 20, "upper_limit_actual_translation_x", theArch, aUpperLimitActualTranslationX); + } + else { + hasUpperLimitActualTranslationX = Standard_False; + aUpperLimitActualTranslationX = 0; + } + + Standard_Real aLowerLimitActualTranslationY; + Standard_Boolean hasLowerLimitActualTranslationY = Standard_True; + if ( theData->IsParamDefined (theNum,21) ) { + theData->ReadReal (theNum, 21, "lower_limit_actual_translation_y", theArch, aLowerLimitActualTranslationY); + } + else { + hasLowerLimitActualTranslationY = Standard_False; + aLowerLimitActualTranslationY = 0; + } + + Standard_Real aUpperLimitActualTranslationY; + Standard_Boolean hasUpperLimitActualTranslationY = Standard_True; + if ( theData->IsParamDefined (theNum,22) ) { + theData->ReadReal (theNum, 22, "upper_limit_actual_translation_y", theArch, aUpperLimitActualTranslationY); + } + else { + hasUpperLimitActualTranslationY = Standard_False; + aUpperLimitActualTranslationY = 0; + } + + Standard_Real aLowerLimitActualTranslationZ; + Standard_Boolean hasLowerLimitActualTranslationZ = Standard_True; + if ( theData->IsParamDefined (theNum,23) ) { + theData->ReadReal (theNum, 23, "lower_limit_actual_translation_z", theArch, aLowerLimitActualTranslationZ); + } + else { + hasLowerLimitActualTranslationZ = Standard_False; + aLowerLimitActualTranslationZ = 0; + } + + Standard_Real aUpperLimitActualTranslationZ; + Standard_Boolean hasUpperLimitActualTranslationZ = Standard_True; + if ( theData->IsParamDefined (theNum,24) ) { + theData->ReadReal (theNum, 24, "upper_limit_actual_translation_z", theArch, aUpperLimitActualTranslationZ); + } + else { + hasUpperLimitActualTranslationZ = Standard_False; + aUpperLimitActualTranslationZ = 0; + } + + // Initialize entity + theEnt->Init(aRepresentationItem_Name, + aItemDefinedTransformation_Name, + hasItemDefinedTransformation_Description, + aItemDefinedTransformation_Description, + aItemDefinedTransformation_TransformItem1, + aItemDefinedTransformation_TransformItem2, + aKinematicPair_Joint, + aLowOrderKinematicPair_TX, + aLowOrderKinematicPair_TY, + aLowOrderKinematicPair_TZ, + aLowOrderKinematicPair_RX, + aLowOrderKinematicPair_RY, + aLowOrderKinematicPair_RZ, + hasLowerLimitActualRotationX, + aLowerLimitActualRotationX, + hasUpperLimitActualRotationX, + aUpperLimitActualRotationX, + hasLowerLimitActualRotationY, + aLowerLimitActualRotationY, + hasUpperLimitActualRotationY, + aUpperLimitActualRotationY, + hasLowerLimitActualRotationZ, + aLowerLimitActualRotationZ, + hasUpperLimitActualRotationZ, + aUpperLimitActualRotationZ, + hasLowerLimitActualTranslationX, + aLowerLimitActualTranslationX, + hasUpperLimitActualTranslationX, + aUpperLimitActualTranslationX, + hasLowerLimitActualTranslationY, + aLowerLimitActualTranslationY, + hasUpperLimitActualTranslationY, + aUpperLimitActualTranslationY, + hasLowerLimitActualTranslationZ, + aLowerLimitActualTranslationZ, + hasUpperLimitActualTranslationZ, + aUpperLimitActualTranslationZ); +} + +//======================================================================= +//function : WriteStep +//purpose : +//======================================================================= +void RWStepKinematics_RWLowOrderKinematicPairWithRange::WriteStep (StepData_StepWriter& theSW, + const Handle(StepKinematics_LowOrderKinematicPairWithRange)& theEnt) const +{ + + // Own fields of RepresentationItem + + theSW.Send (theEnt->Name()); + + // Inherited fields of ItemDefinedTransformation + + theSW.Send (theEnt->ItemDefinedTransformation()->Name()); + + if ( theEnt->ItemDefinedTransformation()->HasDescription() ) { + theSW.Send (theEnt->ItemDefinedTransformation()->Description()); + } + else theSW.SendUndef(); + + theSW.Send (theEnt->ItemDefinedTransformation()->TransformItem1()); + + theSW.Send (theEnt->ItemDefinedTransformation()->TransformItem2()); + + // Own fields of KinematicPair + + theSW.Send (theEnt->Joint()); + + // Own fields of LowOrderKinematicPair + + theSW.SendBoolean (theEnt->TX()); + + theSW.SendBoolean (theEnt->TY()); + + theSW.SendBoolean (theEnt->TZ()); + + theSW.SendBoolean (theEnt->RX()); + + theSW.SendBoolean (theEnt->RY()); + + theSW.SendBoolean (theEnt->RZ()); + + // Own fields of LowOrderKinematicPairWithRange + + if ( theEnt->HasLowerLimitActualRotationX() ) { + theSW.Send (theEnt->LowerLimitActualRotationX()); + } + else theSW.SendUndef(); + + if ( theEnt->HasUpperLimitActualRotationX() ) { + theSW.Send (theEnt->UpperLimitActualRotationX()); + } + else theSW.SendUndef(); + + if ( theEnt->HasLowerLimitActualRotationY() ) { + theSW.Send (theEnt->LowerLimitActualRotationY()); + } + else theSW.SendUndef(); + + if ( theEnt->HasUpperLimitActualRotationY() ) { + theSW.Send (theEnt->UpperLimitActualRotationY()); + } + else theSW.SendUndef(); + + if ( theEnt->HasLowerLimitActualRotationZ() ) { + theSW.Send (theEnt->LowerLimitActualRotationZ()); + } + else theSW.SendUndef(); + + if ( theEnt->HasUpperLimitActualRotationZ() ) { + theSW.Send (theEnt->UpperLimitActualRotationZ()); + } + else theSW.SendUndef(); + + if ( theEnt->HasLowerLimitActualTranslationX() ) { + theSW.Send (theEnt->LowerLimitActualTranslationX()); + } + else theSW.SendUndef(); + + if ( theEnt->HasUpperLimitActualTranslationX() ) { + theSW.Send (theEnt->UpperLimitActualTranslationX()); + } + else theSW.SendUndef(); + + if ( theEnt->HasLowerLimitActualTranslationY() ) { + theSW.Send (theEnt->LowerLimitActualTranslationY()); + } + else theSW.SendUndef(); + + if ( theEnt->HasUpperLimitActualTranslationY() ) { + theSW.Send (theEnt->UpperLimitActualTranslationY()); + } + else theSW.SendUndef(); + + if ( theEnt->HasLowerLimitActualTranslationZ() ) { + theSW.Send (theEnt->LowerLimitActualTranslationZ()); + } + else theSW.SendUndef(); + + if ( theEnt->HasUpperLimitActualTranslationZ() ) { + theSW.Send (theEnt->UpperLimitActualTranslationZ()); + } + else theSW.SendUndef(); +} + +//======================================================================= +//function : Share +//purpose : +//======================================================================= +void RWStepKinematics_RWLowOrderKinematicPairWithRange::Share (const Handle(StepKinematics_LowOrderKinematicPairWithRange)& theEnt, + Interface_EntityIterator& iter) const +{ + + // Inherited fields of RepresentationItem + + // Inherited fields of ItemDefinedTransformation + + iter.AddItem (theEnt->ItemDefinedTransformation()->TransformItem1()); + + iter.AddItem (theEnt->ItemDefinedTransformation()->TransformItem2()); + + // Inherited fields of KinematicPair + + iter.AddItem (theEnt->StepKinematics_KinematicPair::Joint()); + + // Inherited fields of LowOrderKinematicPair + + // Own fields of LowOrderKinematicPairWithRange +} diff --git a/src/RWStepKinematics/RWStepKinematics_RWLowOrderKinematicPairWithRange.hxx b/src/RWStepKinematics/RWStepKinematics_RWLowOrderKinematicPairWithRange.hxx new file mode 100644 index 0000000000..8b1f3c669d --- /dev/null +++ b/src/RWStepKinematics/RWStepKinematics_RWLowOrderKinematicPairWithRange.hxx @@ -0,0 +1,46 @@ +// Created on : Sat May 02 12:41:15 2020 +// Created by: Irina KRYLOVA +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V3.0 +// Copyright (c) Open CASCADE 2020 +// +// 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 _RWStepKinematics_RWLowOrderKinematicPairWithRange_HeaderFile_ +#define _RWStepKinematics_RWLowOrderKinematicPairWithRange_HeaderFile_ + +#include +#include +#include + +class StepData_StepReaderData; +class Interface_Check; +class StepData_StepWriter; +class Interface_EntityIterator; +class StepKinematics_LowOrderKinematicPairWithRange; + +//! Read & Write tool for LowOrderKinematicPairWithRange +class RWStepKinematics_RWLowOrderKinematicPairWithRange +{ +public: + + DEFINE_STANDARD_ALLOC + + Standard_EXPORT RWStepKinematics_RWLowOrderKinematicPairWithRange(); + + Standard_EXPORT void ReadStep(const Handle(StepData_StepReaderData)& theData, const Standard_Integer theNum, Handle(Interface_Check)& theArch, const Handle(StepKinematics_LowOrderKinematicPairWithRange)& theEnt) const; + + Standard_EXPORT void WriteStep(StepData_StepWriter& theSW, const Handle(StepKinematics_LowOrderKinematicPairWithRange)& theEnt) const; + + Standard_EXPORT void Share(const Handle(StepKinematics_LowOrderKinematicPairWithRange)& theEnt, Interface_EntityIterator& iter) const; + +}; +#endif // _RWStepKinematics_RWLowOrderKinematicPairWithRange_HeaderFile_ diff --git a/src/RWStepKinematics/RWStepKinematics_RWMechanismRepresentation.cxx b/src/RWStepKinematics/RWStepKinematics_RWMechanismRepresentation.cxx new file mode 100644 index 0000000000..f15a344521 --- /dev/null +++ b/src/RWStepKinematics/RWStepKinematics_RWMechanismRepresentation.cxx @@ -0,0 +1,128 @@ +// Created on : Sat May 02 12:41:15 2020 +// Created by: Irina KRYLOVA +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V3.0 +// Copyright (c) Open CASCADE 2020 +// +// This file is part of Open CASCADE Technology software library. +// +// This library is free software; you can redistribute it and/or modify it under +// the terms of the GNU Lesser General Public License version 2.1 as published +// by the Free Software Foundation, with special exception defined in the file +// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT +// distribution for complete text of the license and disclaimer of any warranty. +// +// Alternatively, this file may be used under the terms of Open CASCADE +// commercial license or contractual agreement. + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +//======================================================================= +//function : RWStepKinematics_RWMechanismRepresentation +//purpose : +//======================================================================= +RWStepKinematics_RWMechanismRepresentation::RWStepKinematics_RWMechanismRepresentation() {} + + +//======================================================================= +//function : ReadStep +//purpose : +//======================================================================= +void RWStepKinematics_RWMechanismRepresentation::ReadStep (const Handle(StepData_StepReaderData)& theData, + const Standard_Integer theNum, + Handle(Interface_Check)& theArch, + const Handle(StepKinematics_MechanismRepresentation)& theEnt) const +{ + // Check number of parameters + if ( ! theData->CheckNbParams(theNum,4,theArch,"mechanism_representation") ) return; + + // Inherited fields of Representation + + Handle(TCollection_HAsciiString) aRepresentation_Name; + theData->ReadString (theNum, 1, "representation.name", theArch, aRepresentation_Name); + + Handle(StepRepr_HArray1OfRepresentationItem) aRepresentation_Items; + Standard_Integer sub2 = 0; + if ( theData->ReadSubList (theNum, 2, "representation.items", theArch, sub2) ) { + Standard_Integer nb0 = theData->NbParams(sub2); + aRepresentation_Items = new StepRepr_HArray1OfRepresentationItem (1, nb0); + Standard_Integer num2 = sub2; + for ( Standard_Integer i0=1; i0 <= nb0; i0++ ) { + Handle(StepRepr_RepresentationItem) anIt0; + theData->ReadEntity (num2, i0, "representation_item", theArch, STANDARD_TYPE(StepRepr_RepresentationItem), anIt0); + aRepresentation_Items->SetValue(i0, anIt0); + } + } + + Handle(StepRepr_RepresentationContext) aRepresentation_ContextOfItems; + theData->ReadEntity (theNum, 3, "representation.context_of_items", theArch, STANDARD_TYPE(StepRepr_RepresentationContext), aRepresentation_ContextOfItems); + + // Own fields of MechanismRepresentation + + StepKinematics_KinematicTopologyRepresentationSelect aRepresentedTopology; + theData->ReadEntity (theNum, 4, "represented_topology", theArch, aRepresentedTopology); + + // Initialize entity + theEnt->Init(aRepresentation_Name, + aRepresentation_Items, + aRepresentation_ContextOfItems, + aRepresentedTopology); +} + +//======================================================================= +//function : WriteStep +//purpose : +//======================================================================= +void RWStepKinematics_RWMechanismRepresentation::WriteStep (StepData_StepWriter& theSW, + const Handle(StepKinematics_MechanismRepresentation)& theEnt) const +{ + + // Own fields of Representation + + theSW.Send (theEnt->Name()); + + theSW.OpenSub(); + for (Standard_Integer i1=1; i1 <= theEnt->Items()->Length(); i1++ ) { + Handle(StepRepr_RepresentationItem) Var0 = theEnt->Items()->Value(i1); + theSW.Send (Var0); + } + theSW.CloseSub(); + + theSW.Send (theEnt->ContextOfItems()); + + // Own fields of MechanismRepresentation + + theSW.Send (theEnt->RepresentedTopology().Value()); +} + +//======================================================================= +//function : Share +//purpose : +//======================================================================= + +void RWStepKinematics_RWMechanismRepresentation::Share (const Handle(StepKinematics_MechanismRepresentation)& theEnt, + Interface_EntityIterator& iter) const +{ + + // Inherited fields of Representation + + for (Standard_Integer i1=1; i1 <= theEnt->StepRepr_Representation::Items()->Length(); i1++ ) { + Handle(StepRepr_RepresentationItem) Var0 = theEnt->StepRepr_Representation::Items()->Value(i1); + iter.AddItem (Var0); + } + + iter.AddItem (theEnt->StepRepr_Representation::ContextOfItems()); + + // Own fields of MechanismRepresentation + + iter.AddItem (theEnt->RepresentedTopology().Value()); +} diff --git a/src/RWStepKinematics/RWStepKinematics_RWMechanismRepresentation.hxx b/src/RWStepKinematics/RWStepKinematics_RWMechanismRepresentation.hxx new file mode 100644 index 0000000000..8032b8f60f --- /dev/null +++ b/src/RWStepKinematics/RWStepKinematics_RWMechanismRepresentation.hxx @@ -0,0 +1,46 @@ +// Created on : Sat May 02 12:41:15 2020 +// Created by: Irina KRYLOVA +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V3.0 +// Copyright (c) Open CASCADE 2020 +// +// 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 _RWStepKinematics_RWMechanismRepresentation_HeaderFile_ +#define _RWStepKinematics_RWMechanismRepresentation_HeaderFile_ + +#include +#include +#include + +class StepData_StepReaderData; +class Interface_Check; +class StepData_StepWriter; +class Interface_EntityIterator; +class StepKinematics_MechanismRepresentation; + +//! Read & Write tool for MechanismRepresentation +class RWStepKinematics_RWMechanismRepresentation +{ +public: + + DEFINE_STANDARD_ALLOC + + Standard_EXPORT RWStepKinematics_RWMechanismRepresentation(); + + Standard_EXPORT void ReadStep(const Handle(StepData_StepReaderData)& theData, const Standard_Integer theNum, Handle(Interface_Check)& theArch, const Handle(StepKinematics_MechanismRepresentation)& theEnt) const; + + Standard_EXPORT void WriteStep(StepData_StepWriter& theSW, const Handle(StepKinematics_MechanismRepresentation)& theEnt) const; + + Standard_EXPORT void Share(const Handle(StepKinematics_MechanismRepresentation)& theEnt, Interface_EntityIterator& iter) const; + +}; +#endif // _RWStepKinematics_RWMechanismRepresentation_HeaderFile_ diff --git a/src/RWStepKinematics/RWStepKinematics_RWMechanismStateRepresentation.cxx b/src/RWStepKinematics/RWStepKinematics_RWMechanismStateRepresentation.cxx new file mode 100644 index 0000000000..26c96aace3 --- /dev/null +++ b/src/RWStepKinematics/RWStepKinematics_RWMechanismStateRepresentation.cxx @@ -0,0 +1,117 @@ +// Created on: 2020-06-18 +// Created by: PASUKHIN DMITRY +// Copyright (c) 2020 OPEN CASCADE SAS +// +// This file is part of Open CASCADE Technology software library. +// +// This library is free software; you can redistribute it and/or modify it under +// the terms of the GNU Lesser General Public License version 2.1 as published +// by the Free Software Foundation, with special exception defined in the file +// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT +// distribution for complete text of the license and disclaimer of any warranty. +// +// Alternatively, this file may be used under the terms of Open CASCADE +// commercial license or contractual agreement. + + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +//======================================================================= +//function : RWStepKinematics_RWMechanismStateRepresentation +//purpose : +//======================================================================= +RWStepKinematics_RWMechanismStateRepresentation::RWStepKinematics_RWMechanismStateRepresentation() {} + +//======================================================================= +//function : ReadStep +//purpose : +//======================================================================= +void RWStepKinematics_RWMechanismStateRepresentation::ReadStep + (const Handle(StepData_StepReaderData)& theData, + const Standard_Integer theNum, + Handle(Interface_Check)& theArch, + const Handle(StepKinematics_MechanismStateRepresentation)& theEnt) const +{ + // Number of Parameter Control + if (!theData->CheckNbParams(theNum, 4, theArch, "mechanism_state_representation")) return; + + // Inherited field : name + Handle(TCollection_HAsciiString) aName; + theData->ReadString (theNum, 1, "name" ,theArch, aName); + + // Inherited field : items + Handle(StepRepr_HArray1OfRepresentationItem) aItems; + Handle(StepRepr_RepresentationItem) anEnt; + Standard_Integer nsub; + if (theData->ReadSubList (theNum, 2, "items", theArch, nsub)) { + Standard_Integer nb = theData->NbParams(nsub); + aItems = new StepRepr_HArray1OfRepresentationItem (1, nb); + for (Standard_Integer i = 1; i <= nb; i ++) { + if (theData->ReadEntity (nsub, i, "representation_item", theArch, + STANDARD_TYPE(StepRepr_RepresentationItem), anEnt)) + aItems->SetValue(i, anEnt); + } + } + + // Inherited field : context_of_items + Handle(StepRepr_RepresentationContext) aContextOfItems; + theData->ReadEntity(theNum, 3,"context_of_items", theArch, STANDARD_TYPE(StepRepr_RepresentationContext), aContextOfItems); + + // Inherited field : represented_mechanism + Handle(StepKinematics_MechanismRepresentation) aRepresentedMechanism; + theData->ReadEntity(theNum, 4, "represented_mechanism", theArch, STANDARD_TYPE(StepKinematics_MechanismRepresentation), aRepresentedMechanism); + + // Initialisation of the read entity + theEnt->Init(aName, aItems, aContextOfItems, aRepresentedMechanism); +} + +//======================================================================= +//function : WriteStep +//purpose : +//======================================================================= +void RWStepKinematics_RWMechanismStateRepresentation::WriteStep + (StepData_StepWriter& theSW, + const Handle(StepKinematics_MechanismStateRepresentation)& theEnt) const +{ + // Inherited field : name + theSW.Send(theEnt->Name()); + + // Inherited field : items + theSW.OpenSub(); + for (Standard_Integer i = 1; i <= theEnt->NbItems(); i++) { + theSW.Send(theEnt->ItemsValue(i)); + } + theSW.CloseSub(); + + // Inherited field : context_of_items + theSW.Send(theEnt->ContextOfItems()); + + // Inherited field : represented_mechanism + theSW.Send(theEnt->Mechanism()); + +} + +//======================================================================= +//function : Share +//purpose : +//======================================================================= +void RWStepKinematics_RWMechanismStateRepresentation::Share(const Handle(StepKinematics_MechanismStateRepresentation)& theEnt, Interface_EntityIterator& iter) const +{ + Standard_Integer nbElem = theEnt->NbItems(); + for (Standard_Integer i = 1; i <= nbElem; i++) { + iter.GetOneItem(theEnt->ItemsValue(i)); + } + iter.GetOneItem(theEnt->ContextOfItems()); + iter.GetOneItem(theEnt->Mechanism()); +} + diff --git a/src/RWStepKinematics/RWStepKinematics_RWMechanismStateRepresentation.hxx b/src/RWStepKinematics/RWStepKinematics_RWMechanismStateRepresentation.hxx new file mode 100644 index 0000000000..5bdde4c7cc --- /dev/null +++ b/src/RWStepKinematics/RWStepKinematics_RWMechanismStateRepresentation.hxx @@ -0,0 +1,47 @@ +// Created on: 2020-06-18 +// Created by: PASUKHIN DMITRY +// Copyright (c) 2020 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 _RWStepKinematics_RWMechanismStateRepresentation_HeaderFile +#define _RWStepKinematics_RWMechanismStateRepresentation_HeaderFile + +#include +#include +#include + +#include +class StepData_StepReaderData; +class Interface_Check; +class StepKinematics_MechanismStateRepresentation; +class StepData_StepWriter; +class Interface_EntityIterator; + + +//! Read & Write Module for MechanismStateRepresentation +class RWStepKinematics_RWMechanismStateRepresentation +{ +public: + + DEFINE_STANDARD_ALLOC + + Standard_EXPORT RWStepKinematics_RWMechanismStateRepresentation(); + + Standard_EXPORT void ReadStep (const Handle(StepData_StepReaderData)& theData, const Standard_Integer theNum, Handle(Interface_Check)& theArch, const Handle(StepKinematics_MechanismStateRepresentation)& theEnt) const; + + Standard_EXPORT void WriteStep (StepData_StepWriter& theSW, const Handle(StepKinematics_MechanismStateRepresentation)& theEnt) const; + + Standard_EXPORT void Share (const Handle(StepKinematics_MechanismStateRepresentation)& theEnt, Interface_EntityIterator& iter) const; + +}; +#endif // _RWStepKinematics_RWMechanismStateRepresentation_HeaderFile diff --git a/src/RWStepKinematics/RWStepKinematics_RWOrientedJoint.cxx b/src/RWStepKinematics/RWStepKinematics_RWOrientedJoint.cxx new file mode 100644 index 0000000000..66c9ce32f9 --- /dev/null +++ b/src/RWStepKinematics/RWStepKinematics_RWOrientedJoint.cxx @@ -0,0 +1,118 @@ +// Created on : Sat May 02 12:41:15 2020 +// Created by: Irina KRYLOVA +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V3.0 +// Copyright (c) Open CASCADE 2020 +// +// This file is part of Open CASCADE Technology software library. +// +// This library is free software; you can redistribute it and/or modify it under +// the terms of the GNU Lesser General Public License version 2.1 as published +// by the Free Software Foundation, with special exception defined in the file +// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT +// distribution for complete text of the license and disclaimer of any warranty. +// +// Alternatively, this file may be used under the terms of Open CASCADE +// commercial license or contractual agreement. + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +//======================================================================= +//function : RWStepKinematics_RWOrientedJoint +//purpose : +//======================================================================= +RWStepKinematics_RWOrientedJoint::RWStepKinematics_RWOrientedJoint() {} + + +//======================================================================= +//function : ReadStep +//purpose : +//======================================================================= +void RWStepKinematics_RWOrientedJoint::ReadStep (const Handle(StepData_StepReaderData)& theData, + const Standard_Integer theNum, + Handle(Interface_Check)& theArch, + const Handle(StepKinematics_OrientedJoint)& theEnt) const +{ + // Check number of parameters + if ( ! theData->CheckNbParams(theNum,5,theArch,"oriented_joint") ) return; + + // Inherited fields of RepresentationItem + + Handle(TCollection_HAsciiString) aRepresentationItem_Name; + theData->ReadString (theNum, 1, "representation_item.name", theArch, aRepresentationItem_Name); + + // Inherited fields of Edge + + Handle(StepShape_Vertex) aEdge_EdgeStart; + theData->ReadEntity (theNum, 2, "edge.edge_start", theArch, STANDARD_TYPE(StepShape_Vertex), aEdge_EdgeStart); + + Handle(StepShape_Vertex) aEdge_EdgeEnd; + theData->ReadEntity (theNum, 3, "edge.edge_end", theArch, STANDARD_TYPE(StepShape_Vertex), aEdge_EdgeEnd); + + // Inherited fields of OrientedEdge + + Handle(StepShape_Edge) aOrientedEdge_EdgeElement; + theData->ReadEntity (theNum, 4, "oriented_edge.edge_element", theArch, STANDARD_TYPE(StepShape_Edge), aOrientedEdge_EdgeElement); + + Standard_Boolean aOrientedEdge_Orientation; + theData->ReadBoolean (theNum, 5, "oriented_edge.orientation", theArch, aOrientedEdge_Orientation); + + // Initialize entity + theEnt->Init(aRepresentationItem_Name, + aOrientedEdge_EdgeElement, + aOrientedEdge_Orientation); +} + +//======================================================================= +//function : WriteStep +//purpose : +//======================================================================= +void RWStepKinematics_RWOrientedJoint::WriteStep (StepData_StepWriter& theSW, + const Handle(StepKinematics_OrientedJoint)& theEnt) const +{ + + // Own fields of RepresentationItem + + theSW.Send (theEnt->Name()); + + // Own fields of Edge + + theSW.Send (theEnt->EdgeStart()); + + theSW.Send (theEnt->EdgeEnd()); + + // Own fields of OrientedEdge + + theSW.Send (theEnt->EdgeElement()); + + theSW.SendBoolean (theEnt->Orientation()); +} + +//======================================================================= +//function : Share +//purpose : +//======================================================================= +void RWStepKinematics_RWOrientedJoint::Share (const Handle(StepKinematics_OrientedJoint)& theEnt, + Interface_EntityIterator& iter) const +{ + + // Inherited fields of RepresentationItem + + // Inherited fields of Edge + + iter.AddItem (theEnt->StepShape_Edge::EdgeStart()); + + iter.AddItem (theEnt->StepShape_Edge::EdgeEnd()); + + // Inherited fields of OrientedEdge + + iter.AddItem (theEnt->StepShape_OrientedEdge::EdgeElement()); +} diff --git a/src/RWStepKinematics/RWStepKinematics_RWOrientedJoint.hxx b/src/RWStepKinematics/RWStepKinematics_RWOrientedJoint.hxx new file mode 100644 index 0000000000..47dd3f9f2e --- /dev/null +++ b/src/RWStepKinematics/RWStepKinematics_RWOrientedJoint.hxx @@ -0,0 +1,46 @@ +// Created on : Sat May 02 12:41:15 2020 +// Created by: Irina KRYLOVA +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V3.0 +// Copyright (c) Open CASCADE 2020 +// +// 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 _RWStepKinematics_RWOrientedJoint_HeaderFile_ +#define _RWStepKinematics_RWOrientedJoint_HeaderFile_ + +#include +#include +#include + +class StepData_StepReaderData; +class Interface_Check; +class StepData_StepWriter; +class Interface_EntityIterator; +class StepKinematics_OrientedJoint; + +//! Read & Write tool for OrientedJoint +class RWStepKinematics_RWOrientedJoint +{ +public: + + DEFINE_STANDARD_ALLOC + + Standard_EXPORT RWStepKinematics_RWOrientedJoint(); + + Standard_EXPORT void ReadStep(const Handle(StepData_StepReaderData)& theData, const Standard_Integer theNum, Handle(Interface_Check)& theArch, const Handle(StepKinematics_OrientedJoint)& theEnt) const; + + Standard_EXPORT void WriteStep(StepData_StepWriter& theSW, const Handle(StepKinematics_OrientedJoint)& theEnt) const; + + Standard_EXPORT void Share(const Handle(StepKinematics_OrientedJoint)& theEnt, Interface_EntityIterator& iter) const; + +}; +#endif // _RWStepKinematics_RWOrientedJoint_HeaderFile_ diff --git a/src/RWStepKinematics/RWStepKinematics_RWPairRepresentationRelationship.cxx b/src/RWStepKinematics/RWStepKinematics_RWPairRepresentationRelationship.cxx new file mode 100644 index 0000000000..5dfd3e531f --- /dev/null +++ b/src/RWStepKinematics/RWStepKinematics_RWPairRepresentationRelationship.cxx @@ -0,0 +1,138 @@ +// Created on : Sat May 02 12:41:15 2020 +// Created by: Irina KRYLOVA +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V3.0 +// Copyright (c) Open CASCADE 2020 +// +// This file is part of Open CASCADE Technology software library. +// +// This library is free software; you can redistribute it and/or modify it under +// the terms of the GNU Lesser General Public License version 2.1 as published +// by the Free Software Foundation, with special exception defined in the file +// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT +// distribution for complete text of the license and disclaimer of any warranty. +// +// Alternatively, this file may be used under the terms of Open CASCADE +// commercial license or contractual agreement. + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +//======================================================================= +//function : RWStepKinematics_RWPairRepresentationRelationship +//purpose : +//======================================================================= +RWStepKinematics_RWPairRepresentationRelationship::RWStepKinematics_RWPairRepresentationRelationship() {} + + +//======================================================================= +//function : ReadStep +//purpose : +//======================================================================= +void RWStepKinematics_RWPairRepresentationRelationship::ReadStep (const Handle(StepData_StepReaderData)& theData, + const Standard_Integer theNum, + Handle(Interface_Check)& theArch, + const Handle(StepKinematics_PairRepresentationRelationship)& theEnt) const +{ + // Check number of parameters + if ( ! theData->CheckNbParams(theNum,6,theArch,"pair_representation_relationship") ) return; + + // Inherited fields of RepresentationItem + + Handle(TCollection_HAsciiString) aRepresentationItem_Name; + theData->ReadString (theNum, 1, "representation_item.name", theArch, aRepresentationItem_Name); + + // Inherited fields of RepresentationRelationship + + Handle(TCollection_HAsciiString) aRepresentationRelationship_Name; + theData->ReadString (theNum, 2, "representation_relationship.name", theArch, aRepresentationRelationship_Name); + + Handle(TCollection_HAsciiString) aRepresentationRelationship_Description; + Standard_Boolean hasRepresentationRelationship_Description = Standard_True; + if ( theData->IsParamDefined (theNum,3) ) { + theData->ReadString (theNum, 3, "representation_relationship.description", theArch, aRepresentationRelationship_Description); + } + else { + hasRepresentationRelationship_Description = Standard_False; + aRepresentationRelationship_Description.Nullify(); + } + + StepRepr_RepresentationOrRepresentationReference aRepresentationRelationship_Rep1; + theData->ReadEntity (theNum, 4, "representation_relationship.rep1", theArch, aRepresentationRelationship_Rep1); + + StepRepr_RepresentationOrRepresentationReference aRepresentationRelationship_Rep2; + theData->ReadEntity (theNum, 5, "representation_relationship.rep2", theArch, aRepresentationRelationship_Rep2); + + // Inherited fields of RepresentationRelationshipWithTransformation + + StepRepr_Transformation aRepresentationRelationshipWithTransformation_TransformationOperator; + theData->ReadEntity (theNum, 6, "representation_relationship_with_transformation.transformation_operator", theArch, aRepresentationRelationshipWithTransformation_TransformationOperator); + + // Initialize entity + theEnt->Init(aRepresentationItem_Name, + aRepresentationRelationship_Name, + hasRepresentationRelationship_Description, + aRepresentationRelationship_Description, + aRepresentationRelationship_Rep1, + aRepresentationRelationship_Rep2, + aRepresentationRelationshipWithTransformation_TransformationOperator); +} + +//======================================================================= +//function : WriteStep +//purpose : +//======================================================================= +void RWStepKinematics_RWPairRepresentationRelationship::WriteStep (StepData_StepWriter& theSW, + const Handle(StepKinematics_PairRepresentationRelationship)& theEnt) const +{ + + // Own fields of RepresentationItem + + theSW.Send (theEnt->Name()); + + // Own fields of RepresentationRelationship + + theSW.Send (theEnt->Name()); + + + if (theEnt->RepresentationRelationshipWithTransformation()->HasDescription()) + theSW.Send (theEnt->RepresentationRelationshipWithTransformation()->Description()); + else theSW.SendUndef(); + + theSW.Send (theEnt->RepresentationRelationshipWithTransformation()->Rep1()); + + theSW.Send (theEnt->RepresentationRelationshipWithTransformation()->Rep2()); + + // Inherited fields of RepresentationRelationshipWithTransformation + + theSW.Send (theEnt->RepresentationRelationshipWithTransformation()->TransformationOperator().Value()); +} + +//======================================================================= +//function : Share +//purpose : +//======================================================================= +void RWStepKinematics_RWPairRepresentationRelationship::Share (const Handle(StepKinematics_PairRepresentationRelationship)& theEnt, + Interface_EntityIterator& iter) const +{ + + // Inherited fields of RepresentationItem + + // Inherited fields of RepresentationRelationship + + iter.AddItem (theEnt->RepresentationRelationshipWithTransformation()->Rep1()); + + iter.AddItem (theEnt->RepresentationRelationshipWithTransformation()->Rep2()); + + // Inherited fields of RepresentationRelationshipWithTransformation + + iter.AddItem (theEnt->RepresentationRelationshipWithTransformation()->TransformationOperator().Value()); +} diff --git a/src/RWStepKinematics/RWStepKinematics_RWPairRepresentationRelationship.hxx b/src/RWStepKinematics/RWStepKinematics_RWPairRepresentationRelationship.hxx new file mode 100644 index 0000000000..23fa5e698f --- /dev/null +++ b/src/RWStepKinematics/RWStepKinematics_RWPairRepresentationRelationship.hxx @@ -0,0 +1,46 @@ +// Created on : Sat May 02 12:41:15 2020 +// Created by: Irina KRYLOVA +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V3.0 +// Copyright (c) Open CASCADE 2020 +// +// 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 _RWStepKinematics_RWPairRepresentationRelationship_HeaderFile_ +#define _RWStepKinematics_RWPairRepresentationRelationship_HeaderFile_ + +#include +#include +#include + +class StepData_StepReaderData; +class Interface_Check; +class StepData_StepWriter; +class Interface_EntityIterator; +class StepKinematics_PairRepresentationRelationship; + +//! Read & Write tool for PairRepresentationRelationship +class RWStepKinematics_RWPairRepresentationRelationship +{ +public: + + DEFINE_STANDARD_ALLOC + + Standard_EXPORT RWStepKinematics_RWPairRepresentationRelationship(); + + Standard_EXPORT void ReadStep(const Handle(StepData_StepReaderData)& theData, const Standard_Integer theNum, Handle(Interface_Check)& theArch, const Handle(StepKinematics_PairRepresentationRelationship)& theEnt) const; + + Standard_EXPORT void WriteStep(StepData_StepWriter& theSW, const Handle(StepKinematics_PairRepresentationRelationship)& theEnt) const; + + Standard_EXPORT void Share(const Handle(StepKinematics_PairRepresentationRelationship)& theEnt, Interface_EntityIterator& iter) const; + +}; +#endif // _RWStepKinematics_RWPairRepresentationRelationship_HeaderFile_ diff --git a/src/RWStepKinematics/RWStepKinematics_RWPlanarCurvePair.cxx b/src/RWStepKinematics/RWStepKinematics_RWPlanarCurvePair.cxx new file mode 100644 index 0000000000..58564bcae7 --- /dev/null +++ b/src/RWStepKinematics/RWStepKinematics_RWPlanarCurvePair.cxx @@ -0,0 +1,167 @@ +// Created on : Sat May 02 12:41:15 2020 +// Created by: Irina KRYLOVA +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V3.0 +// Copyright (c) Open CASCADE 2020 +// +// This file is part of Open CASCADE Technology software library. +// +// This library is free software; you can redistribute it and/or modify it under +// the terms of the GNU Lesser General Public License version 2.1 as published +// by the Free Software Foundation, with special exception defined in the file +// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT +// distribution for complete text of the license and disclaimer of any warranty. +// +// Alternatively, this file may be used under the terms of Open CASCADE +// commercial license or contractual agreement. + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +//======================================================================= +//function : RWStepKinematics_RWPlanarCurvePair +//purpose : +//======================================================================= +RWStepKinematics_RWPlanarCurvePair::RWStepKinematics_RWPlanarCurvePair() {} + + +//======================================================================= +//function : ReadStep +//purpose : +//======================================================================= +void RWStepKinematics_RWPlanarCurvePair::ReadStep (const Handle(StepData_StepReaderData)& theData, + const Standard_Integer theNum, + Handle(Interface_Check)& theArch, + const Handle(StepKinematics_PlanarCurvePair)& theEnt) const +{ + // Check number of parameters + if ( ! theData->CheckNbParams(theNum,9,theArch,"planar_curve_pair") ) return; + + // Inherited fields of RepresentationItem + + Handle(TCollection_HAsciiString) aRepresentationItem_Name; + theData->ReadString (theNum, 1, "representation_item.name", theArch, aRepresentationItem_Name); + + // Inherited fields of ItemDefinedTransformation + + Handle(TCollection_HAsciiString) aItemDefinedTransformation_Name; + theData->ReadString (theNum, 2, "item_defined_transformation.name", theArch, aItemDefinedTransformation_Name); + + Handle(TCollection_HAsciiString) aItemDefinedTransformation_Description; + Standard_Boolean hasItemDefinedTransformation_Description = Standard_True; + if ( theData->IsParamDefined (theNum,3) ) { + theData->ReadString (theNum, 3, "item_defined_transformation.description", theArch, aItemDefinedTransformation_Description); + } + else { + hasItemDefinedTransformation_Description = Standard_False; + aItemDefinedTransformation_Description.Nullify(); + } + + Handle(StepRepr_RepresentationItem) aItemDefinedTransformation_TransformItem1; + theData->ReadEntity (theNum, 4, "item_defined_transformation.transform_item1", theArch, STANDARD_TYPE(StepRepr_RepresentationItem), aItemDefinedTransformation_TransformItem1); + + Handle(StepRepr_RepresentationItem) aItemDefinedTransformation_TransformItem2; + theData->ReadEntity (theNum, 5, "item_defined_transformation.transform_item2", theArch, STANDARD_TYPE(StepRepr_RepresentationItem), aItemDefinedTransformation_TransformItem2); + + // Inherited fields of KinematicPair + + Handle(StepKinematics_KinematicJoint) aKinematicPair_Joint; + theData->ReadEntity (theNum, 6, "kinematic_pair.joint", theArch, STANDARD_TYPE(StepKinematics_KinematicJoint), aKinematicPair_Joint); + + // Own fields of PlanarCurvePair + + Handle(StepGeom_Curve) aCurve1; + theData->ReadEntity (theNum, 7, "curve1", theArch, STANDARD_TYPE(StepGeom_Curve), aCurve1); + + Handle(StepGeom_Curve) aCurve2; + theData->ReadEntity (theNum, 8, "curve2", theArch, STANDARD_TYPE(StepGeom_Curve), aCurve2); + + Standard_Boolean aOrientation; + theData->ReadBoolean (theNum, 9, "orientation", theArch, aOrientation); + + // Initialize entity + theEnt->Init(aRepresentationItem_Name, + aItemDefinedTransformation_Name, + hasItemDefinedTransformation_Description, + aItemDefinedTransformation_Description, + aItemDefinedTransformation_TransformItem1, + aItemDefinedTransformation_TransformItem2, + aKinematicPair_Joint, + aCurve1, + aCurve2, + aOrientation); +} + +//======================================================================= +//function : WriteStep +//purpose : +//======================================================================= +void RWStepKinematics_RWPlanarCurvePair::WriteStep (StepData_StepWriter& theSW, + const Handle(StepKinematics_PlanarCurvePair)& theEnt) const +{ + + // Own fields of RepresentationItem + + theSW.Send (theEnt->Name()); + + // Inherited fields of ItemDefinedTransformation + + theSW.Send (theEnt->ItemDefinedTransformation()->Name()); + + if ( theEnt->ItemDefinedTransformation()->HasDescription() ) { + theSW.Send (theEnt->ItemDefinedTransformation()->Description()); + } + else theSW.SendUndef(); + + theSW.Send (theEnt->ItemDefinedTransformation()->TransformItem1()); + + theSW.Send (theEnt->ItemDefinedTransformation()->TransformItem2()); + + // Own fields of KinematicPair + + theSW.Send (theEnt->Joint()); + + // Own fields of PlanarCurvePair + + theSW.Send (theEnt->Curve1()); + + theSW.Send (theEnt->Curve2()); + + theSW.SendBoolean (theEnt->Orientation()); +} + +//======================================================================= +//function : Share +//purpose : +//======================================================================= +void RWStepKinematics_RWPlanarCurvePair::Share (const Handle(StepKinematics_PlanarCurvePair)& theEnt, + Interface_EntityIterator& iter) const +{ + + // Inherited fields of RepresentationItem + + // Inherited fields of ItemDefinedTransformation + + iter.AddItem (theEnt->ItemDefinedTransformation()->TransformItem1()); + + iter.AddItem (theEnt->ItemDefinedTransformation()->TransformItem2()); + + // Inherited fields of KinematicPair + + iter.AddItem (theEnt->StepKinematics_KinematicPair::Joint()); + + // Own fields of PlanarCurvePair + + iter.AddItem (theEnt->Curve1()); + + iter.AddItem (theEnt->Curve2()); +} diff --git a/src/RWStepKinematics/RWStepKinematics_RWPlanarCurvePair.hxx b/src/RWStepKinematics/RWStepKinematics_RWPlanarCurvePair.hxx new file mode 100644 index 0000000000..577b943242 --- /dev/null +++ b/src/RWStepKinematics/RWStepKinematics_RWPlanarCurvePair.hxx @@ -0,0 +1,46 @@ +// Created on : Sat May 02 12:41:15 2020 +// Created by: Irina KRYLOVA +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V3.0 +// Copyright (c) Open CASCADE 2020 +// +// 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 _RWStepKinematics_RWPlanarCurvePair_HeaderFile_ +#define _RWStepKinematics_RWPlanarCurvePair_HeaderFile_ + +#include +#include +#include + +class StepData_StepReaderData; +class Interface_Check; +class StepData_StepWriter; +class Interface_EntityIterator; +class StepKinematics_PlanarCurvePair; + +//! Read & Write tool for PlanarCurvePair +class RWStepKinematics_RWPlanarCurvePair +{ +public: + + DEFINE_STANDARD_ALLOC + + Standard_EXPORT RWStepKinematics_RWPlanarCurvePair(); + + Standard_EXPORT void ReadStep(const Handle(StepData_StepReaderData)& theData, const Standard_Integer theNum, Handle(Interface_Check)& theArch, const Handle(StepKinematics_PlanarCurvePair)& theEnt) const; + + Standard_EXPORT void WriteStep(StepData_StepWriter& theSW, const Handle(StepKinematics_PlanarCurvePair)& theEnt) const; + + Standard_EXPORT void Share(const Handle(StepKinematics_PlanarCurvePair)& theEnt, Interface_EntityIterator& iter) const; + +}; +#endif // _RWStepKinematics_RWPlanarCurvePair_HeaderFile_ diff --git a/src/RWStepKinematics/RWStepKinematics_RWPlanarCurvePairRange.cxx b/src/RWStepKinematics/RWStepKinematics_RWPlanarCurvePairRange.cxx new file mode 100644 index 0000000000..5b75c30eb1 --- /dev/null +++ b/src/RWStepKinematics/RWStepKinematics_RWPlanarCurvePairRange.cxx @@ -0,0 +1,190 @@ +// Created on : Sat May 02 12:41:15 2020 +// Created by: Irina KRYLOVA +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V3.0 +// Copyright (c) Open CASCADE 2020 +// +// This file is part of Open CASCADE Technology software library. +// +// This library is free software; you can redistribute it and/or modify it under +// the terms of the GNU Lesser General Public License version 2.1 as published +// by the Free Software Foundation, with special exception defined in the file +// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT +// distribution for complete text of the license and disclaimer of any warranty. +// +// Alternatively, this file may be used under the terms of Open CASCADE +// commercial license or contractual agreement. + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +//======================================================================= +//function : RWStepKinematics_RWPlanarCurvePairRange +//purpose : +//======================================================================= +RWStepKinematics_RWPlanarCurvePairRange::RWStepKinematics_RWPlanarCurvePairRange() {} + + +//======================================================================= +//function : ReadStep +//purpose : +//======================================================================= +void RWStepKinematics_RWPlanarCurvePairRange::ReadStep (const Handle(StepData_StepReaderData)& theData, + const Standard_Integer theNum, + Handle(Interface_Check)& theArch, + const Handle(StepKinematics_PlanarCurvePairRange)& theEnt) const +{ + // Check number of parameters + if ( ! theData->CheckNbParams(theNum,11,theArch,"planar_curve_pair_range") ) return; + + // Inherited fields of RepresentationItem + + Handle(TCollection_HAsciiString) aRepresentationItem_Name; + theData->ReadString (theNum, 1, "representation_item.name", theArch, aRepresentationItem_Name); + + // Inherited fields of ItemDefinedTransformation + + Handle(TCollection_HAsciiString) aItemDefinedTransformation_Name; + theData->ReadString (theNum, 2, "item_defined_transformation.name", theArch, aItemDefinedTransformation_Name); + + Handle(TCollection_HAsciiString) aItemDefinedTransformation_Description; + Standard_Boolean hasItemDefinedTransformation_Description = Standard_True; + if ( theData->IsParamDefined (theNum,3) ) { + theData->ReadString (theNum, 3, "item_defined_transformation.description", theArch, aItemDefinedTransformation_Description); + } + else { + hasItemDefinedTransformation_Description = Standard_False; + aItemDefinedTransformation_Description.Nullify(); + } + + Handle(StepRepr_RepresentationItem) aItemDefinedTransformation_TransformItem1; + theData->ReadEntity (theNum, 4, "item_defined_transformation.transform_item1", theArch, STANDARD_TYPE(StepRepr_RepresentationItem), aItemDefinedTransformation_TransformItem1); + + Handle(StepRepr_RepresentationItem) aItemDefinedTransformation_TransformItem2; + theData->ReadEntity (theNum, 5, "item_defined_transformation.transform_item2", theArch, STANDARD_TYPE(StepRepr_RepresentationItem), aItemDefinedTransformation_TransformItem2); + + // Inherited fields of KinematicPair + + Handle(StepKinematics_KinematicJoint) aKinematicPair_Joint; + theData->ReadEntity (theNum, 6, "kinematic_pair.joint", theArch, STANDARD_TYPE(StepKinematics_KinematicJoint), aKinematicPair_Joint); + + // Inherited fields of PlanarCurvePair + + Handle(StepGeom_Curve) aPlanarCurvePair_Curve1; + theData->ReadEntity (theNum, 7, "planar_curve_pair.curve1", theArch, STANDARD_TYPE(StepGeom_Curve), aPlanarCurvePair_Curve1); + + Handle(StepGeom_Curve) aPlanarCurvePair_Curve2; + theData->ReadEntity (theNum, 8, "planar_curve_pair.curve2", theArch, STANDARD_TYPE(StepGeom_Curve), aPlanarCurvePair_Curve2); + + Standard_Boolean aPlanarCurvePair_Orientation; + theData->ReadBoolean (theNum, 9, "planar_curve_pair.orientation", theArch, aPlanarCurvePair_Orientation); + + // Own fields of PlanarCurvePairRange + + Handle(StepGeom_TrimmedCurve) aRangeOnCurve1; + theData->ReadEntity (theNum, 10, "range_on_curve1", theArch, STANDARD_TYPE(StepGeom_TrimmedCurve), aRangeOnCurve1); + + Handle(StepGeom_TrimmedCurve) aRangeOnCurve2; + theData->ReadEntity (theNum, 11, "range_on_curve2", theArch, STANDARD_TYPE(StepGeom_TrimmedCurve), aRangeOnCurve2); + + // Initialize entity + theEnt->Init(aRepresentationItem_Name, + aItemDefinedTransformation_Name, + hasItemDefinedTransformation_Description, + aItemDefinedTransformation_Description, + aItemDefinedTransformation_TransformItem1, + aItemDefinedTransformation_TransformItem2, + aKinematicPair_Joint, + aPlanarCurvePair_Curve1, + aPlanarCurvePair_Curve2, + aPlanarCurvePair_Orientation, + aRangeOnCurve1, + aRangeOnCurve2); +} + +//======================================================================= +//function : WriteStep +//purpose : +//======================================================================= +void RWStepKinematics_RWPlanarCurvePairRange::WriteStep (StepData_StepWriter& theSW, + const Handle(StepKinematics_PlanarCurvePairRange)& theEnt) const +{ + + // Own fields of RepresentationItem + + theSW.Send (theEnt->Name()); + + // Inherited fields of ItemDefinedTransformation + + theSW.Send (theEnt->ItemDefinedTransformation()->Name()); + + if ( theEnt->ItemDefinedTransformation()->HasDescription() ) { + theSW.Send (theEnt->ItemDefinedTransformation()->Description()); + } + else theSW.SendUndef(); + + theSW.Send (theEnt->ItemDefinedTransformation()->TransformItem1()); + + theSW.Send (theEnt->ItemDefinedTransformation()->TransformItem2()); + + // Own fields of KinematicPair + + theSW.Send (theEnt->Joint()); + + // Own fields of PlanarCurvePair + + theSW.Send (theEnt->Curve1()); + + theSW.Send (theEnt->Curve2()); + + theSW.SendBoolean (theEnt->Orientation()); + + // Own fields of PlanarCurvePairRange + + theSW.Send (theEnt->RangeOnCurve1()); + + theSW.Send (theEnt->RangeOnCurve2()); +} + +//======================================================================= +//function : Share +//purpose : +//======================================================================= +void RWStepKinematics_RWPlanarCurvePairRange::Share (const Handle(StepKinematics_PlanarCurvePairRange)& theEnt, + Interface_EntityIterator& iter) const +{ + + // Inherited fields of RepresentationItem + + // Inherited fields of ItemDefinedTransformation + + iter.AddItem (theEnt->ItemDefinedTransformation()->TransformItem1()); + + iter.AddItem (theEnt->ItemDefinedTransformation()->TransformItem2()); + + // Inherited fields of KinematicPair + + iter.AddItem (theEnt->StepKinematics_KinematicPair::Joint()); + + // Inherited fields of PlanarCurvePair + + iter.AddItem (theEnt->StepKinematics_PlanarCurvePair::Curve1()); + + iter.AddItem (theEnt->StepKinematics_PlanarCurvePair::Curve2()); + + // Own fields of PlanarCurvePairRange + + iter.AddItem (theEnt->RangeOnCurve1()); + + iter.AddItem (theEnt->RangeOnCurve2()); +} diff --git a/src/RWStepKinematics/RWStepKinematics_RWPlanarCurvePairRange.hxx b/src/RWStepKinematics/RWStepKinematics_RWPlanarCurvePairRange.hxx new file mode 100644 index 0000000000..8da86eeaa4 --- /dev/null +++ b/src/RWStepKinematics/RWStepKinematics_RWPlanarCurvePairRange.hxx @@ -0,0 +1,46 @@ +// Created on : Sat May 02 12:41:15 2020 +// Created by: Irina KRYLOVA +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V3.0 +// Copyright (c) Open CASCADE 2020 +// +// 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 _RWStepKinematics_RWPlanarCurvePairRange_HeaderFile_ +#define _RWStepKinematics_RWPlanarCurvePairRange_HeaderFile_ + +#include +#include +#include + +class StepData_StepReaderData; +class Interface_Check; +class StepData_StepWriter; +class Interface_EntityIterator; +class StepKinematics_PlanarCurvePairRange; + +//! Read & Write tool for PlanarCurvePairRange +class RWStepKinematics_RWPlanarCurvePairRange +{ +public: + + DEFINE_STANDARD_ALLOC + + Standard_EXPORT RWStepKinematics_RWPlanarCurvePairRange(); + + Standard_EXPORT void ReadStep(const Handle(StepData_StepReaderData)& theData, const Standard_Integer theNum, Handle(Interface_Check)& theArch, const Handle(StepKinematics_PlanarCurvePairRange)& theEnt) const; + + Standard_EXPORT void WriteStep(StepData_StepWriter& theSW, const Handle(StepKinematics_PlanarCurvePairRange)& theEnt) const; + + Standard_EXPORT void Share(const Handle(StepKinematics_PlanarCurvePairRange)& theEnt, Interface_EntityIterator& iter) const; + +}; +#endif // _RWStepKinematics_RWPlanarCurvePairRange_HeaderFile_ diff --git a/src/RWStepKinematics/RWStepKinematics_RWPlanarPair.cxx b/src/RWStepKinematics/RWStepKinematics_RWPlanarPair.cxx new file mode 100644 index 0000000000..775498f47d --- /dev/null +++ b/src/RWStepKinematics/RWStepKinematics_RWPlanarPair.cxx @@ -0,0 +1,180 @@ +// Created on : Sat May 02 12:41:15 2020 +// Created by: Irina KRYLOVA +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V3.0 +// Copyright (c) Open CASCADE 2020 +// +// This file is part of Open CASCADE Technology software library. +// +// This library is free software; you can redistribute it and/or modify it under +// the terms of the GNU Lesser General Public License version 2.1 as published +// by the Free Software Foundation, with special exception defined in the file +// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT +// distribution for complete text of the license and disclaimer of any warranty. +// +// Alternatively, this file may be used under the terms of Open CASCADE +// commercial license or contractual agreement. + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +//======================================================================= +//function : RWStepKinematics_RWPlanarPair +//purpose : +//======================================================================= +RWStepKinematics_RWPlanarPair::RWStepKinematics_RWPlanarPair() {} + + +//======================================================================= +//function : ReadStep +//purpose : +//======================================================================= +void RWStepKinematics_RWPlanarPair::ReadStep (const Handle(StepData_StepReaderData)& theData, + const Standard_Integer theNum, + Handle(Interface_Check)& theArch, + const Handle(StepKinematics_PlanarPair)& theEnt) const +{ + // Check number of parameters + if ( ! theData->CheckNbParams(theNum,12,theArch,"planar_pair") ) return; + + // Inherited fields of RepresentationItem + + Handle(TCollection_HAsciiString) aRepresentationItem_Name; + theData->ReadString (theNum, 1, "representation_item.name", theArch, aRepresentationItem_Name); + + // Inherited fields of ItemDefinedTransformation + + Handle(TCollection_HAsciiString) aItemDefinedTransformation_Name; + theData->ReadString (theNum, 2, "item_defined_transformation.name", theArch, aItemDefinedTransformation_Name); + + Handle(TCollection_HAsciiString) aItemDefinedTransformation_Description; + Standard_Boolean hasItemDefinedTransformation_Description = Standard_True; + if ( theData->IsParamDefined (theNum,3) ) { + theData->ReadString (theNum, 3, "item_defined_transformation.description", theArch, aItemDefinedTransformation_Description); + } + else { + hasItemDefinedTransformation_Description = Standard_False; + aItemDefinedTransformation_Description.Nullify(); + } + + Handle(StepRepr_RepresentationItem) aItemDefinedTransformation_TransformItem1; + theData->ReadEntity (theNum, 4, "item_defined_transformation.transform_item1", theArch, STANDARD_TYPE(StepRepr_RepresentationItem), aItemDefinedTransformation_TransformItem1); + + Handle(StepRepr_RepresentationItem) aItemDefinedTransformation_TransformItem2; + theData->ReadEntity (theNum, 5, "item_defined_transformation.transform_item2", theArch, STANDARD_TYPE(StepRepr_RepresentationItem), aItemDefinedTransformation_TransformItem2); + + // Inherited fields of KinematicPair + + Handle(StepKinematics_KinematicJoint) aKinematicPair_Joint; + theData->ReadEntity (theNum, 6, "kinematic_pair.joint", theArch, STANDARD_TYPE(StepKinematics_KinematicJoint), aKinematicPair_Joint); + + // Inherited fields of LowOrderKinematicPair + + Standard_Boolean aLowOrderKinematicPair_TX; + theData->ReadBoolean (theNum, 7, "low_order_kinematic_pair.t_x", theArch, aLowOrderKinematicPair_TX); + + Standard_Boolean aLowOrderKinematicPair_TY; + theData->ReadBoolean (theNum, 8, "low_order_kinematic_pair.t_y", theArch, aLowOrderKinematicPair_TY); + + Standard_Boolean aLowOrderKinematicPair_TZ; + theData->ReadBoolean (theNum, 9, "low_order_kinematic_pair.t_z", theArch, aLowOrderKinematicPair_TZ); + + Standard_Boolean aLowOrderKinematicPair_RX; + theData->ReadBoolean (theNum, 10, "low_order_kinematic_pair.r_x", theArch, aLowOrderKinematicPair_RX); + + Standard_Boolean aLowOrderKinematicPair_RY; + theData->ReadBoolean (theNum, 11, "low_order_kinematic_pair.r_y", theArch, aLowOrderKinematicPair_RY); + + Standard_Boolean aLowOrderKinematicPair_RZ; + theData->ReadBoolean (theNum, 12, "low_order_kinematic_pair.r_z", theArch, aLowOrderKinematicPair_RZ); + + // Initialize entity + theEnt->Init(aRepresentationItem_Name, + aItemDefinedTransformation_Name, + hasItemDefinedTransformation_Description, + aItemDefinedTransformation_Description, + aItemDefinedTransformation_TransformItem1, + aItemDefinedTransformation_TransformItem2, + aKinematicPair_Joint, + aLowOrderKinematicPair_TX, + aLowOrderKinematicPair_TY, + aLowOrderKinematicPair_TZ, + aLowOrderKinematicPair_RX, + aLowOrderKinematicPair_RY, + aLowOrderKinematicPair_RZ); +} + +//======================================================================= +//function : WriteStep +//purpose : +//======================================================================= +void RWStepKinematics_RWPlanarPair::WriteStep (StepData_StepWriter& theSW, + const Handle(StepKinematics_PlanarPair)& theEnt) const +{ + + // Own fields of RepresentationItem + + theSW.Send (theEnt->Name()); + + // Inherited fields of ItemDefinedTransformation + + theSW.Send (theEnt->ItemDefinedTransformation()->Name()); + + if ( theEnt->ItemDefinedTransformation()->HasDescription() ) { + theSW.Send (theEnt->ItemDefinedTransformation()->Description()); + } + else theSW.SendUndef(); + + theSW.Send (theEnt->ItemDefinedTransformation()->TransformItem1()); + + theSW.Send (theEnt->ItemDefinedTransformation()->TransformItem2()); + + // Own fields of KinematicPair + + theSW.Send (theEnt->Joint()); + + // Own fields of LowOrderKinematicPair + + theSW.SendBoolean (theEnt->TX()); + + theSW.SendBoolean (theEnt->TY()); + + theSW.SendBoolean (theEnt->TZ()); + + theSW.SendBoolean (theEnt->RX()); + + theSW.SendBoolean (theEnt->RY()); + + theSW.SendBoolean (theEnt->RZ()); +} + +//======================================================================= +//function : Share +//purpose : +//======================================================================= +void RWStepKinematics_RWPlanarPair::Share (const Handle(StepKinematics_PlanarPair)& theEnt, + Interface_EntityIterator& iter) const +{ + + // Inherited fields of RepresentationItem + + // Inherited fields of ItemDefinedTransformation + + iter.AddItem (theEnt->ItemDefinedTransformation()->TransformItem1()); + + iter.AddItem (theEnt->ItemDefinedTransformation()->TransformItem2()); + + // Inherited fields of KinematicPair + + iter.AddItem (theEnt->StepKinematics_KinematicPair::Joint()); + + // Inherited fields of LowOrderKinematicPair +} diff --git a/src/RWStepKinematics/RWStepKinematics_RWPlanarPair.hxx b/src/RWStepKinematics/RWStepKinematics_RWPlanarPair.hxx new file mode 100644 index 0000000000..8ba23e684f --- /dev/null +++ b/src/RWStepKinematics/RWStepKinematics_RWPlanarPair.hxx @@ -0,0 +1,46 @@ +// Created on : Sat May 02 12:41:15 2020 +// Created by: Irina KRYLOVA +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V3.0 +// Copyright (c) Open CASCADE 2020 +// +// 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 _RWStepKinematics_RWPlanarPair_HeaderFile_ +#define _RWStepKinematics_RWPlanarPair_HeaderFile_ + +#include +#include +#include + +class StepData_StepReaderData; +class Interface_Check; +class StepData_StepWriter; +class Interface_EntityIterator; +class StepKinematics_PlanarPair; + +//! Read & Write tool for PlanarPair +class RWStepKinematics_RWPlanarPair +{ +public: + + DEFINE_STANDARD_ALLOC + + Standard_EXPORT RWStepKinematics_RWPlanarPair(); + + Standard_EXPORT void ReadStep(const Handle(StepData_StepReaderData)& theData, const Standard_Integer theNum, Handle(Interface_Check)& theArch, const Handle(StepKinematics_PlanarPair)& theEnt) const; + + Standard_EXPORT void WriteStep(StepData_StepWriter& theSW, const Handle(StepKinematics_PlanarPair)& theEnt) const; + + Standard_EXPORT void Share(const Handle(StepKinematics_PlanarPair)& theEnt, Interface_EntityIterator& iter) const; + +}; +#endif // _RWStepKinematics_RWPlanarPair_HeaderFile_ diff --git a/src/RWStepKinematics/RWStepKinematics_RWPlanarPairValue.cxx b/src/RWStepKinematics/RWStepKinematics_RWPlanarPairValue.cxx new file mode 100644 index 0000000000..f93b976eb3 --- /dev/null +++ b/src/RWStepKinematics/RWStepKinematics_RWPlanarPairValue.cxx @@ -0,0 +1,115 @@ +// Created on : Sat May 02 12:41:15 2020 +// Created by: Irina KRYLOVA +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V3.0 +// Copyright (c) Open CASCADE 2020 +// +// This file is part of Open CASCADE Technology software library. +// +// This library is free software; you can redistribute it and/or modify it under +// the terms of the GNU Lesser General Public License version 2.1 as published +// by the Free Software Foundation, with special exception defined in the file +// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT +// distribution for complete text of the license and disclaimer of any warranty. +// +// Alternatively, this file may be used under the terms of Open CASCADE +// commercial license or contractual agreement. + +#include + +#include +#include +#include +#include +#include +#include +#include + +//======================================================================= +//function : RWStepKinematics_RWPlanarPairValue +//purpose : +//======================================================================= +RWStepKinematics_RWPlanarPairValue::RWStepKinematics_RWPlanarPairValue() {} + + +//======================================================================= +//function : ReadStep +//purpose : +//======================================================================= +void RWStepKinematics_RWPlanarPairValue::ReadStep (const Handle(StepData_StepReaderData)& theData, + const Standard_Integer theNum, + Handle(Interface_Check)& theArch, + const Handle(StepKinematics_PlanarPairValue)& theEnt) const +{ + // Check number of parameters + if ( ! theData->CheckNbParams(theNum,5,theArch,"planar_pair_value") ) return; + + // Inherited fields of RepresentationItem + + Handle(TCollection_HAsciiString) aRepresentationItem_Name; + theData->ReadString (theNum, 1, "representation_item.name", theArch, aRepresentationItem_Name); + + // Inherited fields of PairValue + + Handle(StepKinematics_KinematicPair) aPairValue_AppliesToPair; + theData->ReadEntity (theNum, 2, "pair_value.applies_to_pair", theArch, STANDARD_TYPE(StepKinematics_KinematicPair), aPairValue_AppliesToPair); + + // Own fields of PlanarPairValue + + Standard_Real aActualRotation; + theData->ReadReal (theNum, 3, "actual_rotation", theArch, aActualRotation); + + Standard_Real aActualTranslationX; + theData->ReadReal (theNum, 4, "actual_translation_x", theArch, aActualTranslationX); + + Standard_Real aActualTranslationY; + theData->ReadReal (theNum, 5, "actual_translation_y", theArch, aActualTranslationY); + + // Initialize entity + theEnt->Init(aRepresentationItem_Name, + aPairValue_AppliesToPair, + aActualRotation, + aActualTranslationX, + aActualTranslationY); +} + +//======================================================================= +//function : WriteStep +//purpose : +//======================================================================= +void RWStepKinematics_RWPlanarPairValue::WriteStep (StepData_StepWriter& theSW, + const Handle(StepKinematics_PlanarPairValue)& theEnt) const +{ + + // Own fields of RepresentationItem + + theSW.Send (theEnt->Name()); + + // Own fields of PairValue + + theSW.Send (theEnt->AppliesToPair()); + + // Own fields of PlanarPairValue + + theSW.Send (theEnt->ActualRotation()); + + theSW.Send (theEnt->ActualTranslationX()); + + theSW.Send (theEnt->ActualTranslationY()); +} + +//======================================================================= +//function : Share +//purpose : +//======================================================================= +void RWStepKinematics_RWPlanarPairValue::Share (const Handle(StepKinematics_PlanarPairValue)& theEnt, + Interface_EntityIterator& iter) const +{ + + // Inherited fields of RepresentationItem + + // Inherited fields of PairValue + + iter.AddItem (theEnt->StepKinematics_PairValue::AppliesToPair()); + + // Own fields of PlanarPairValue +} diff --git a/src/RWStepKinematics/RWStepKinematics_RWPlanarPairValue.hxx b/src/RWStepKinematics/RWStepKinematics_RWPlanarPairValue.hxx new file mode 100644 index 0000000000..5382856a06 --- /dev/null +++ b/src/RWStepKinematics/RWStepKinematics_RWPlanarPairValue.hxx @@ -0,0 +1,46 @@ +// Created on : Sat May 02 12:41:15 2020 +// Created by: Irina KRYLOVA +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V3.0 +// Copyright (c) Open CASCADE 2020 +// +// 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 _RWStepKinematics_RWPlanarPairValue_HeaderFile_ +#define _RWStepKinematics_RWPlanarPairValue_HeaderFile_ + +#include +#include +#include + +class StepData_StepReaderData; +class Interface_Check; +class StepData_StepWriter; +class Interface_EntityIterator; +class StepKinematics_PlanarPairValue; + +//! Read & Write tool for PlanarPairValue +class RWStepKinematics_RWPlanarPairValue +{ +public: + + DEFINE_STANDARD_ALLOC + + Standard_EXPORT RWStepKinematics_RWPlanarPairValue(); + + Standard_EXPORT void ReadStep(const Handle(StepData_StepReaderData)& theData, const Standard_Integer theNum, Handle(Interface_Check)& theArch, const Handle(StepKinematics_PlanarPairValue)& theEnt) const; + + Standard_EXPORT void WriteStep(StepData_StepWriter& theSW, const Handle(StepKinematics_PlanarPairValue)& theEnt) const; + + Standard_EXPORT void Share(const Handle(StepKinematics_PlanarPairValue)& theEnt, Interface_EntityIterator& iter) const; + +}; +#endif // _RWStepKinematics_RWPlanarPairValue_HeaderFile_ diff --git a/src/RWStepKinematics/RWStepKinematics_RWPlanarPairWithRange.cxx b/src/RWStepKinematics/RWStepKinematics_RWPlanarPairWithRange.cxx new file mode 100644 index 0000000000..4426dadb46 --- /dev/null +++ b/src/RWStepKinematics/RWStepKinematics_RWPlanarPairWithRange.cxx @@ -0,0 +1,289 @@ +// Created on : Sat May 02 12:41:15 2020 +// Created by: Irina KRYLOVA +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V3.0 +// Copyright (c) Open CASCADE 2020 +// +// This file is part of Open CASCADE Technology software library. +// +// This library is free software; you can redistribute it and/or modify it under +// the terms of the GNU Lesser General Public License version 2.1 as published +// by the Free Software Foundation, with special exception defined in the file +// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT +// distribution for complete text of the license and disclaimer of any warranty. +// +// Alternatively, this file may be used under the terms of Open CASCADE +// commercial license or contractual agreement. + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +//======================================================================= +//function : RWStepKinematics_RWPlanarPairWithRange +//purpose : +//======================================================================= +RWStepKinematics_RWPlanarPairWithRange::RWStepKinematics_RWPlanarPairWithRange() {} + + +//======================================================================= +//function : ReadStep +//purpose : +//======================================================================= +void RWStepKinematics_RWPlanarPairWithRange::ReadStep (const Handle(StepData_StepReaderData)& theData, + const Standard_Integer theNum, + Handle(Interface_Check)& theArch, + const Handle(StepKinematics_PlanarPairWithRange)& theEnt) const +{ + // Check number of parameters + if ( ! theData->CheckNbParams(theNum,18,theArch,"planar_pair_with_range") ) return; + + // Inherited fields of RepresentationItem + + Handle(TCollection_HAsciiString) aRepresentationItem_Name; + theData->ReadString (theNum, 1, "representation_item.name", theArch, aRepresentationItem_Name); + + // Inherited fields of ItemDefinedTransformation + + Handle(TCollection_HAsciiString) aItemDefinedTransformation_Name; + theData->ReadString (theNum, 2, "item_defined_transformation.name", theArch, aItemDefinedTransformation_Name); + + Handle(TCollection_HAsciiString) aItemDefinedTransformation_Description; + Standard_Boolean hasItemDefinedTransformation_Description = Standard_True; + if ( theData->IsParamDefined (theNum,3) ) { + theData->ReadString (theNum, 3, "item_defined_transformation.description", theArch, aItemDefinedTransformation_Description); + } + else { + hasItemDefinedTransformation_Description = Standard_False; + aItemDefinedTransformation_Description.Nullify(); + } + + Handle(StepRepr_RepresentationItem) aItemDefinedTransformation_TransformItem1; + theData->ReadEntity (theNum, 4, "item_defined_transformation.transform_item1", theArch, STANDARD_TYPE(StepRepr_RepresentationItem), aItemDefinedTransformation_TransformItem1); + + Handle(StepRepr_RepresentationItem) aItemDefinedTransformation_TransformItem2; + theData->ReadEntity (theNum, 5, "item_defined_transformation.transform_item2", theArch, STANDARD_TYPE(StepRepr_RepresentationItem), aItemDefinedTransformation_TransformItem2); + + // Inherited fields of KinematicPair + + Handle(StepKinematics_KinematicJoint) aKinematicPair_Joint; + theData->ReadEntity (theNum, 6, "kinematic_pair.joint", theArch, STANDARD_TYPE(StepKinematics_KinematicJoint), aKinematicPair_Joint); + + // Inherited fields of LowOrderKinematicPair + + Standard_Boolean aLowOrderKinematicPair_TX; + theData->ReadBoolean (theNum, 7, "low_order_kinematic_pair.t_x", theArch, aLowOrderKinematicPair_TX); + + Standard_Boolean aLowOrderKinematicPair_TY; + theData->ReadBoolean (theNum, 8, "low_order_kinematic_pair.t_y", theArch, aLowOrderKinematicPair_TY); + + Standard_Boolean aLowOrderKinematicPair_TZ; + theData->ReadBoolean (theNum, 9, "low_order_kinematic_pair.t_z", theArch, aLowOrderKinematicPair_TZ); + + Standard_Boolean aLowOrderKinematicPair_RX; + theData->ReadBoolean (theNum, 10, "low_order_kinematic_pair.r_x", theArch, aLowOrderKinematicPair_RX); + + Standard_Boolean aLowOrderKinematicPair_RY; + theData->ReadBoolean (theNum, 11, "low_order_kinematic_pair.r_y", theArch, aLowOrderKinematicPair_RY); + + Standard_Boolean aLowOrderKinematicPair_RZ; + theData->ReadBoolean (theNum, 12, "low_order_kinematic_pair.r_z", theArch, aLowOrderKinematicPair_RZ); + + // Own fields of PlanarPairWithRange + + Standard_Real aLowerLimitActualRotation; + Standard_Boolean hasLowerLimitActualRotation = Standard_True; + if ( theData->IsParamDefined (theNum,13) ) { + theData->ReadReal (theNum, 13, "lower_limit_actual_rotation", theArch, aLowerLimitActualRotation); + } + else { + hasLowerLimitActualRotation = Standard_False; + aLowerLimitActualRotation = 0; + } + + Standard_Real aUpperLimitActualRotation; + Standard_Boolean hasUpperLimitActualRotation = Standard_True; + if ( theData->IsParamDefined (theNum,14) ) { + theData->ReadReal (theNum, 14, "upper_limit_actual_rotation", theArch, aUpperLimitActualRotation); + } + else { + hasUpperLimitActualRotation = Standard_False; + aUpperLimitActualRotation = 0; + } + + Standard_Real aLowerLimitActualTranslationX; + Standard_Boolean hasLowerLimitActualTranslationX = Standard_True; + if ( theData->IsParamDefined (theNum,15) ) { + theData->ReadReal (theNum, 15, "lower_limit_actual_translation_x", theArch, aLowerLimitActualTranslationX); + } + else { + hasLowerLimitActualTranslationX = Standard_False; + aLowerLimitActualTranslationX = 0; + } + + Standard_Real aUpperLimitActualTranslationX; + Standard_Boolean hasUpperLimitActualTranslationX = Standard_True; + if ( theData->IsParamDefined (theNum,16) ) { + theData->ReadReal (theNum, 16, "upper_limit_actual_translation_x", theArch, aUpperLimitActualTranslationX); + } + else { + hasUpperLimitActualTranslationX = Standard_False; + aUpperLimitActualTranslationX = 0; + } + + Standard_Real aLowerLimitActualTranslationY; + Standard_Boolean hasLowerLimitActualTranslationY = Standard_True; + if ( theData->IsParamDefined (theNum,17) ) { + theData->ReadReal (theNum, 17, "lower_limit_actual_translation_y", theArch, aLowerLimitActualTranslationY); + } + else { + hasLowerLimitActualTranslationY = Standard_False; + aLowerLimitActualTranslationY = 0; + } + + Standard_Real aUpperLimitActualTranslationY; + Standard_Boolean hasUpperLimitActualTranslationY = Standard_True; + if ( theData->IsParamDefined (theNum,18) ) { + theData->ReadReal (theNum, 18, "upper_limit_actual_translation_y", theArch, aUpperLimitActualTranslationY); + } + else { + hasUpperLimitActualTranslationY = Standard_False; + aUpperLimitActualTranslationY = 0; + } + + // Initialize entity + theEnt->Init(aRepresentationItem_Name, + aItemDefinedTransformation_Name, + hasItemDefinedTransformation_Description, + aItemDefinedTransformation_Description, + aItemDefinedTransformation_TransformItem1, + aItemDefinedTransformation_TransformItem2, + aKinematicPair_Joint, + aLowOrderKinematicPair_TX, + aLowOrderKinematicPair_TY, + aLowOrderKinematicPair_TZ, + aLowOrderKinematicPair_RX, + aLowOrderKinematicPair_RY, + aLowOrderKinematicPair_RZ, + hasLowerLimitActualRotation, + aLowerLimitActualRotation, + hasUpperLimitActualRotation, + aUpperLimitActualRotation, + hasLowerLimitActualTranslationX, + aLowerLimitActualTranslationX, + hasUpperLimitActualTranslationX, + aUpperLimitActualTranslationX, + hasLowerLimitActualTranslationY, + aLowerLimitActualTranslationY, + hasUpperLimitActualTranslationY, + aUpperLimitActualTranslationY); +} + +//======================================================================= +//function : WriteStep +//purpose : +//======================================================================= +void RWStepKinematics_RWPlanarPairWithRange::WriteStep (StepData_StepWriter& theSW, + const Handle(StepKinematics_PlanarPairWithRange)& theEnt) const +{ + + // Own fields of RepresentationItem + + theSW.Send (theEnt->Name()); + + // Inherited fields of ItemDefinedTransformation + + theSW.Send (theEnt->ItemDefinedTransformation()->Name()); + + if ( theEnt->ItemDefinedTransformation()->HasDescription() ) { + theSW.Send (theEnt->ItemDefinedTransformation()->Description()); + } + else theSW.SendUndef(); + + theSW.Send (theEnt->ItemDefinedTransformation()->TransformItem1()); + + theSW.Send (theEnt->ItemDefinedTransformation()->TransformItem2()); + + // Own fields of KinematicPair + + theSW.Send (theEnt->Joint()); + + // Own fields of LowOrderKinematicPair + + theSW.SendBoolean (theEnt->TX()); + + theSW.SendBoolean (theEnt->TY()); + + theSW.SendBoolean (theEnt->TZ()); + + theSW.SendBoolean (theEnt->RX()); + + theSW.SendBoolean (theEnt->RY()); + + theSW.SendBoolean (theEnt->RZ()); + + // Own fields of PlanarPairWithRange + + if ( theEnt->HasLowerLimitActualRotation() ) { + theSW.Send (theEnt->LowerLimitActualRotation()); + } + else theSW.SendUndef(); + + if ( theEnt->HasUpperLimitActualRotation() ) { + theSW.Send (theEnt->UpperLimitActualRotation()); + } + else theSW.SendUndef(); + + if ( theEnt->HasLowerLimitActualTranslationX() ) { + theSW.Send (theEnt->LowerLimitActualTranslationX()); + } + else theSW.SendUndef(); + + if ( theEnt->HasUpperLimitActualTranslationX() ) { + theSW.Send (theEnt->UpperLimitActualTranslationX()); + } + else theSW.SendUndef(); + + if ( theEnt->HasLowerLimitActualTranslationY() ) { + theSW.Send (theEnt->LowerLimitActualTranslationY()); + } + else theSW.SendUndef(); + + if ( theEnt->HasUpperLimitActualTranslationY() ) { + theSW.Send (theEnt->UpperLimitActualTranslationY()); + } + else theSW.SendUndef(); +} + +//======================================================================= +//function : Share +//purpose : +//======================================================================= +void RWStepKinematics_RWPlanarPairWithRange::Share (const Handle(StepKinematics_PlanarPairWithRange)& theEnt, + Interface_EntityIterator& iter) const +{ + + // Inherited fields of RepresentationItem + + // Inherited fields of ItemDefinedTransformation + + iter.AddItem (theEnt->ItemDefinedTransformation()->TransformItem1()); + + iter.AddItem (theEnt->ItemDefinedTransformation()->TransformItem2()); + + // Inherited fields of KinematicPair + + iter.AddItem (theEnt->StepKinematics_KinematicPair::Joint()); + + // Inherited fields of LowOrderKinematicPair + + // Own fields of PlanarPairWithRange +} diff --git a/src/RWStepKinematics/RWStepKinematics_RWPlanarPairWithRange.hxx b/src/RWStepKinematics/RWStepKinematics_RWPlanarPairWithRange.hxx new file mode 100644 index 0000000000..f1a8229a8a --- /dev/null +++ b/src/RWStepKinematics/RWStepKinematics_RWPlanarPairWithRange.hxx @@ -0,0 +1,46 @@ +// Created on : Sat May 02 12:41:15 2020 +// Created by: Irina KRYLOVA +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V3.0 +// Copyright (c) Open CASCADE 2020 +// +// 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 _RWStepKinematics_RWPlanarPairWithRange_HeaderFile_ +#define _RWStepKinematics_RWPlanarPairWithRange_HeaderFile_ + +#include +#include +#include + +class StepData_StepReaderData; +class Interface_Check; +class StepData_StepWriter; +class Interface_EntityIterator; +class StepKinematics_PlanarPairWithRange; + +//! Read & Write tool for PlanarPairWithRange +class RWStepKinematics_RWPlanarPairWithRange +{ +public: + + DEFINE_STANDARD_ALLOC + + Standard_EXPORT RWStepKinematics_RWPlanarPairWithRange(); + + Standard_EXPORT void ReadStep(const Handle(StepData_StepReaderData)& theData, const Standard_Integer theNum, Handle(Interface_Check)& theArch, const Handle(StepKinematics_PlanarPairWithRange)& theEnt) const; + + Standard_EXPORT void WriteStep(StepData_StepWriter& theSW, const Handle(StepKinematics_PlanarPairWithRange)& theEnt) const; + + Standard_EXPORT void Share(const Handle(StepKinematics_PlanarPairWithRange)& theEnt, Interface_EntityIterator& iter) const; + +}; +#endif // _RWStepKinematics_RWPlanarPairWithRange_HeaderFile_ diff --git a/src/RWStepKinematics/RWStepKinematics_RWPointOnPlanarCurvePair.cxx b/src/RWStepKinematics/RWStepKinematics_RWPointOnPlanarCurvePair.cxx new file mode 100644 index 0000000000..72fa34aa09 --- /dev/null +++ b/src/RWStepKinematics/RWStepKinematics_RWPointOnPlanarCurvePair.cxx @@ -0,0 +1,159 @@ +// Created on : Sat May 02 12:41:15 2020 +// Created by: Irina KRYLOVA +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V3.0 +// Copyright (c) Open CASCADE 2020 +// +// This file is part of Open CASCADE Technology software library. +// +// This library is free software; you can redistribute it and/or modify it under +// the terms of the GNU Lesser General Public License version 2.1 as published +// by the Free Software Foundation, with special exception defined in the file +// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT +// distribution for complete text of the license and disclaimer of any warranty. +// +// Alternatively, this file may be used under the terms of Open CASCADE +// commercial license or contractual agreement. + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +//======================================================================= +//function : RWStepKinematics_RWPointOnPlanarCurvePair +//purpose : +//======================================================================= +RWStepKinematics_RWPointOnPlanarCurvePair::RWStepKinematics_RWPointOnPlanarCurvePair() {} + + +//======================================================================= +//function : ReadStep +//purpose : +//======================================================================= +void RWStepKinematics_RWPointOnPlanarCurvePair::ReadStep (const Handle(StepData_StepReaderData)& theData, + const Standard_Integer theNum, + Handle(Interface_Check)& theArch, + const Handle(StepKinematics_PointOnPlanarCurvePair)& theEnt) const +{ + // Check number of parameters + if ( ! theData->CheckNbParams(theNum,8,theArch,"point_on_planar_curve_pair") ) return; + + // Inherited fields of RepresentationItem + + Handle(TCollection_HAsciiString) aRepresentationItem_Name; + theData->ReadString (theNum, 1, "representation_item.name", theArch, aRepresentationItem_Name); + + // Inherited fields of ItemDefinedTransformation + + Handle(TCollection_HAsciiString) aItemDefinedTransformation_Name; + theData->ReadString (theNum, 2, "item_defined_transformation.name", theArch, aItemDefinedTransformation_Name); + + Handle(TCollection_HAsciiString) aItemDefinedTransformation_Description; + Standard_Boolean hasItemDefinedTransformation_Description = Standard_True; + if ( theData->IsParamDefined (theNum,3) ) { + theData->ReadString (theNum, 3, "item_defined_transformation.description", theArch, aItemDefinedTransformation_Description); + } + else { + hasItemDefinedTransformation_Description = Standard_False; + aItemDefinedTransformation_Description.Nullify(); + } + + Handle(StepRepr_RepresentationItem) aItemDefinedTransformation_TransformItem1; + theData->ReadEntity (theNum, 4, "item_defined_transformation.transform_item1", theArch, STANDARD_TYPE(StepRepr_RepresentationItem), aItemDefinedTransformation_TransformItem1); + + Handle(StepRepr_RepresentationItem) aItemDefinedTransformation_TransformItem2; + theData->ReadEntity (theNum, 5, "item_defined_transformation.transform_item2", theArch, STANDARD_TYPE(StepRepr_RepresentationItem), aItemDefinedTransformation_TransformItem2); + + // Inherited fields of KinematicPair + + Handle(StepKinematics_KinematicJoint) aKinematicPair_Joint; + theData->ReadEntity (theNum, 6, "kinematic_pair.joint", theArch, STANDARD_TYPE(StepKinematics_KinematicJoint), aKinematicPair_Joint); + + // Own fields of PointOnPlanarCurvePair + + Handle(StepGeom_Curve) aPairCurve; + theData->ReadEntity (theNum, 7, "pair_curve", theArch, STANDARD_TYPE(StepGeom_Curve), aPairCurve); + + Standard_Boolean aOrientation; + theData->ReadBoolean (theNum, 8, "orientation", theArch, aOrientation); + + // Initialize entity + theEnt->Init(aRepresentationItem_Name, + aItemDefinedTransformation_Name, + hasItemDefinedTransformation_Description, + aItemDefinedTransformation_Description, + aItemDefinedTransformation_TransformItem1, + aItemDefinedTransformation_TransformItem2, + aKinematicPair_Joint, + aPairCurve, + aOrientation); +} + +//======================================================================= +//function : WriteStep +//purpose : +//======================================================================= +void RWStepKinematics_RWPointOnPlanarCurvePair::WriteStep (StepData_StepWriter& theSW, + const Handle(StepKinematics_PointOnPlanarCurvePair)& theEnt) const +{ + + // Own fields of RepresentationItem + + theSW.Send (theEnt->Name()); + + // Inherited fields of ItemDefinedTransformation + + theSW.Send (theEnt->ItemDefinedTransformation()->Name()); + + if ( theEnt->ItemDefinedTransformation()->HasDescription() ) { + theSW.Send (theEnt->ItemDefinedTransformation()->Description()); + } + else theSW.SendUndef(); + + theSW.Send (theEnt->ItemDefinedTransformation()->TransformItem1()); + + theSW.Send (theEnt->ItemDefinedTransformation()->TransformItem2()); + + // Own fields of KinematicPair + + theSW.Send (theEnt->Joint()); + + // Own fields of PointOnPlanarCurvePair + + theSW.Send (theEnt->PairCurve()); + + theSW.SendBoolean (theEnt->Orientation()); +} + +//======================================================================= +//function : Share +//purpose : +//======================================================================= +void RWStepKinematics_RWPointOnPlanarCurvePair::Share (const Handle(StepKinematics_PointOnPlanarCurvePair)& theEnt, + Interface_EntityIterator& iter) const +{ + + // Inherited fields of RepresentationItem + + // Inherited fields of ItemDefinedTransformation + + iter.AddItem (theEnt->ItemDefinedTransformation()->TransformItem1()); + + iter.AddItem (theEnt->ItemDefinedTransformation()->TransformItem2()); + + // Inherited fields of KinematicPair + + iter.AddItem (theEnt->StepKinematics_KinematicPair::Joint()); + + // Own fields of PointOnPlanarCurvePair + + iter.AddItem (theEnt->PairCurve()); +} diff --git a/src/RWStepKinematics/RWStepKinematics_RWPointOnPlanarCurvePair.hxx b/src/RWStepKinematics/RWStepKinematics_RWPointOnPlanarCurvePair.hxx new file mode 100644 index 0000000000..54d5fd1545 --- /dev/null +++ b/src/RWStepKinematics/RWStepKinematics_RWPointOnPlanarCurvePair.hxx @@ -0,0 +1,46 @@ +// Created on : Sat May 02 12:41:15 2020 +// Created by: Irina KRYLOVA +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V3.0 +// Copyright (c) Open CASCADE 2020 +// +// 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 _RWStepKinematics_RWPointOnPlanarCurvePair_HeaderFile_ +#define _RWStepKinematics_RWPointOnPlanarCurvePair_HeaderFile_ + +#include +#include +#include + +class StepData_StepReaderData; +class Interface_Check; +class StepData_StepWriter; +class Interface_EntityIterator; +class StepKinematics_PointOnPlanarCurvePair; + +//! Read & Write tool for PointOnPlanarCurvePair +class RWStepKinematics_RWPointOnPlanarCurvePair +{ +public: + + DEFINE_STANDARD_ALLOC + + Standard_EXPORT RWStepKinematics_RWPointOnPlanarCurvePair(); + + Standard_EXPORT void ReadStep(const Handle(StepData_StepReaderData)& theData, const Standard_Integer theNum, Handle(Interface_Check)& theArch, const Handle(StepKinematics_PointOnPlanarCurvePair)& theEnt) const; + + Standard_EXPORT void WriteStep(StepData_StepWriter& theSW, const Handle(StepKinematics_PointOnPlanarCurvePair)& theEnt) const; + + Standard_EXPORT void Share(const Handle(StepKinematics_PointOnPlanarCurvePair)& theEnt, Interface_EntityIterator& iter) const; + +}; +#endif // _RWStepKinematics_RWPointOnPlanarCurvePair_HeaderFile_ diff --git a/src/RWStepKinematics/RWStepKinematics_RWPointOnPlanarCurvePairValue.cxx b/src/RWStepKinematics/RWStepKinematics_RWPointOnPlanarCurvePairValue.cxx new file mode 100644 index 0000000000..c05ef8f6e6 --- /dev/null +++ b/src/RWStepKinematics/RWStepKinematics_RWPointOnPlanarCurvePairValue.cxx @@ -0,0 +1,142 @@ +// Created on : Sat May 02 12:41:15 2020 +// Created by: Irina KRYLOVA +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V3.0 +// Copyright (c) Open CASCADE 2020 +// +// This file is part of Open CASCADE Technology software library. +// +// This library is free software; you can redistribute it and/or modify it under +// the terms of the GNU Lesser General Public License version 2.1 as published +// by the Free Software Foundation, with special exception defined in the file +// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT +// distribution for complete text of the license and disclaimer of any warranty. +// +// Alternatively, this file may be used under the terms of Open CASCADE +// commercial license or contractual agreement. + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +//======================================================================= +//function : RWStepKinematics_RWPointOnPlanarCurvePairValue +//purpose : +//======================================================================= +RWStepKinematics_RWPointOnPlanarCurvePairValue::RWStepKinematics_RWPointOnPlanarCurvePairValue() {} + + +//======================================================================= +//function : ReadStep +//purpose : +//======================================================================= +void RWStepKinematics_RWPointOnPlanarCurvePairValue::ReadStep (const Handle(StepData_StepReaderData)& theData, + const Standard_Integer theNum, + Handle(Interface_Check)& theArch, + const Handle(StepKinematics_PointOnPlanarCurvePairValue)& theEnt) const +{ + // Check number of parameters + if ( ! theData->CheckNbParams(theNum,4,theArch,"point_on_planar_curve_pair_value") ) return; + + // Inherited fields of RepresentationItem + + Handle(TCollection_HAsciiString) aRepresentationItem_Name; + theData->ReadString (theNum, 1, "representation_item.name", theArch, aRepresentationItem_Name); + + // Inherited fields of PairValue + + Handle(StepKinematics_KinematicPair) aPairValue_AppliesToPair; + theData->ReadEntity (theNum, 2, "pair_value.applies_to_pair", theArch, STANDARD_TYPE(StepKinematics_KinematicPair), aPairValue_AppliesToPair); + + // Own fields of PointOnPlanarCurvePairValue + + Handle(StepGeom_PointOnCurve) aActualPointOnCurve; + theData->ReadEntity (theNum, 3, "actual_point_on_curve", theArch, STANDARD_TYPE(StepGeom_PointOnCurve), aActualPointOnCurve); + + StepKinematics_SpatialRotation aInputOrientation; + if (theData->SubListNumber(theNum, 4, Standard_True)) + { + Handle(TColStd_HArray1OfReal) aItems; + Standard_Integer nsub = 0; + if (theData->ReadSubList(theNum, 4, "items", theArch, nsub)) { + Standard_Integer nb = theData->NbParams(nsub); + aItems = new TColStd_HArray1OfReal(1, nb); + Standard_Integer num2 = nsub; + for (Standard_Integer i0 = 1; i0 <= nb; i0++) { + Standard_Real anIt0; + theData->ReadReal(num2, i0, "real", theArch, anIt0); + aItems->SetValue(i0, anIt0); + } + } + aInputOrientation.SetValue(aItems); + } + else + theData->ReadEntity(theNum, 4, "input_orientation", theArch, aInputOrientation); + + // Initialize entity + theEnt->Init(aRepresentationItem_Name, + aPairValue_AppliesToPair, + aActualPointOnCurve, + aInputOrientation); +} + +//======================================================================= +//function : WriteStep +//purpose : +//======================================================================= +void RWStepKinematics_RWPointOnPlanarCurvePairValue::WriteStep (StepData_StepWriter& theSW, + const Handle(StepKinematics_PointOnPlanarCurvePairValue)& theEnt) const +{ + + // Own fields of RepresentationItem + + theSW.Send (theEnt->Name()); + + // Own fields of PairValue + + theSW.Send (theEnt->AppliesToPair()); + + // Own fields of PointOnPlanarCurvePairValue + + theSW.Send (theEnt->ActualPointOnCurve()); + + if (!theEnt->InputOrientation().YprRotation().IsNull()) + { + // Inherited field : YPR + theSW.OpenSub(); + for (Standard_Integer i = 1; i <= theEnt->InputOrientation().YprRotation()->Length(); i++) { + theSW.Send(theEnt->InputOrientation().YprRotation()->Value(i)); + } + theSW.CloseSub(); + } + else + theSW.Send(theEnt->InputOrientation().Value()); +} + +//======================================================================= +//function : Share +//purpose : +//======================================================================= +void RWStepKinematics_RWPointOnPlanarCurvePairValue::Share (const Handle(StepKinematics_PointOnPlanarCurvePairValue)& theEnt, + Interface_EntityIterator& iter) const +{ + + // Inherited fields of RepresentationItem + + // Inherited fields of PairValue + + iter.AddItem (theEnt->StepKinematics_PairValue::AppliesToPair()); + + // Own fields of PointOnPlanarCurvePairValue + + iter.AddItem (theEnt->ActualPointOnCurve()); + + if (!theEnt->InputOrientation().RotationAboutDirection().IsNull()) + iter.AddItem(theEnt->InputOrientation().Value()); +} diff --git a/src/RWStepKinematics/RWStepKinematics_RWPointOnPlanarCurvePairValue.hxx b/src/RWStepKinematics/RWStepKinematics_RWPointOnPlanarCurvePairValue.hxx new file mode 100644 index 0000000000..29e605eb87 --- /dev/null +++ b/src/RWStepKinematics/RWStepKinematics_RWPointOnPlanarCurvePairValue.hxx @@ -0,0 +1,46 @@ +// Created on : Sat May 02 12:41:15 2020 +// Created by: Irina KRYLOVA +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V3.0 +// Copyright (c) Open CASCADE 2020 +// +// 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 _RWStepKinematics_RWPointOnPlanarCurvePairValue_HeaderFile_ +#define _RWStepKinematics_RWPointOnPlanarCurvePairValue_HeaderFile_ + +#include +#include +#include + +class StepData_StepReaderData; +class Interface_Check; +class StepData_StepWriter; +class Interface_EntityIterator; +class StepKinematics_PointOnPlanarCurvePairValue; + +//! Read & Write tool for PointOnPlanarCurvePairValue +class RWStepKinematics_RWPointOnPlanarCurvePairValue +{ +public: + + DEFINE_STANDARD_ALLOC + + Standard_EXPORT RWStepKinematics_RWPointOnPlanarCurvePairValue(); + + Standard_EXPORT void ReadStep(const Handle(StepData_StepReaderData)& theData, const Standard_Integer theNum, Handle(Interface_Check)& theArch, const Handle(StepKinematics_PointOnPlanarCurvePairValue)& theEnt) const; + + Standard_EXPORT void WriteStep(StepData_StepWriter& theSW, const Handle(StepKinematics_PointOnPlanarCurvePairValue)& theEnt) const; + + Standard_EXPORT void Share(const Handle(StepKinematics_PointOnPlanarCurvePairValue)& theEnt, Interface_EntityIterator& iter) const; + +}; +#endif // _RWStepKinematics_RWPointOnPlanarCurvePairValue_HeaderFile_ diff --git a/src/RWStepKinematics/RWStepKinematics_RWPointOnPlanarCurvePairWithRange.cxx b/src/RWStepKinematics/RWStepKinematics_RWPointOnPlanarCurvePairWithRange.cxx new file mode 100644 index 0000000000..1760cea88a --- /dev/null +++ b/src/RWStepKinematics/RWStepKinematics_RWPointOnPlanarCurvePairWithRange.cxx @@ -0,0 +1,277 @@ +// Created on : Sat May 02 12:41:15 2020 +// Created by: Irina KRYLOVA +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V3.0 +// Copyright (c) Open CASCADE 2020 +// +// This file is part of Open CASCADE Technology software library. +// +// This library is free software; you can redistribute it and/or modify it under +// the terms of the GNU Lesser General Public License version 2.1 as published +// by the Free Software Foundation, with special exception defined in the file +// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT +// distribution for complete text of the license and disclaimer of any warranty. +// +// Alternatively, this file may be used under the terms of Open CASCADE +// commercial license or contractual agreement. + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +//======================================================================= +//function : RWStepKinematics_RWPointOnPlanarCurvePairWithRange +//purpose : +//======================================================================= +RWStepKinematics_RWPointOnPlanarCurvePairWithRange::RWStepKinematics_RWPointOnPlanarCurvePairWithRange() {} + + +//======================================================================= +//function : ReadStep +//purpose : +//======================================================================= +void RWStepKinematics_RWPointOnPlanarCurvePairWithRange::ReadStep (const Handle(StepData_StepReaderData)& theData, + const Standard_Integer theNum, + Handle(Interface_Check)& theArch, + const Handle(StepKinematics_PointOnPlanarCurvePairWithRange)& theEnt) const +{ + // Check number of parameters + if ( ! theData->CheckNbParams(theNum,15,theArch,"point_on_planar_curve_pair_with_range") ) return; + + // Inherited fields of RepresentationItem + + Handle(TCollection_HAsciiString) aRepresentationItem_Name; + theData->ReadString (theNum, 1, "representation_item.name", theArch, aRepresentationItem_Name); + + // Inherited fields of ItemDefinedTransformation + + Handle(TCollection_HAsciiString) aItemDefinedTransformation_Name; + theData->ReadString (theNum, 2, "item_defined_transformation.name", theArch, aItemDefinedTransformation_Name); + + Handle(TCollection_HAsciiString) aItemDefinedTransformation_Description; + Standard_Boolean hasItemDefinedTransformation_Description = Standard_True; + if ( theData->IsParamDefined (theNum,3) ) { + theData->ReadString (theNum, 3, "item_defined_transformation.description", theArch, aItemDefinedTransformation_Description); + } + else { + hasItemDefinedTransformation_Description = Standard_False; + aItemDefinedTransformation_Description.Nullify(); + } + + Handle(StepRepr_RepresentationItem) aItemDefinedTransformation_TransformItem1; + theData->ReadEntity (theNum, 4, "item_defined_transformation.transform_item1", theArch, STANDARD_TYPE(StepRepr_RepresentationItem), aItemDefinedTransformation_TransformItem1); + + Handle(StepRepr_RepresentationItem) aItemDefinedTransformation_TransformItem2; + theData->ReadEntity (theNum, 5, "item_defined_transformation.transform_item2", theArch, STANDARD_TYPE(StepRepr_RepresentationItem), aItemDefinedTransformation_TransformItem2); + + // Inherited fields of KinematicPair + + Handle(StepKinematics_KinematicJoint) aKinematicPair_Joint; + theData->ReadEntity (theNum, 6, "kinematic_pair.joint", theArch, STANDARD_TYPE(StepKinematics_KinematicJoint), aKinematicPair_Joint); + + // Inherited fields of PointOnPlanarCurvePair + + Handle(StepGeom_Curve) aPointOnPlanarCurvePair_PairCurve; + theData->ReadEntity (theNum, 7, "point_on_planar_curve_pair.pair_curve", theArch, STANDARD_TYPE(StepGeom_Curve), aPointOnPlanarCurvePair_PairCurve); + + Standard_Boolean aPointOnPlanarCurvePair_Orientation; + theData->ReadBoolean (theNum, 8, "point_on_planar_curve_pair.orientation", theArch, aPointOnPlanarCurvePair_Orientation); + + // Own fields of PointOnPlanarCurvePairWithRange + + Handle(StepGeom_TrimmedCurve) aRangeOnPairCurve; + theData->ReadEntity (theNum, 9, "range_on_pair_curve", theArch, STANDARD_TYPE(StepGeom_TrimmedCurve), aRangeOnPairCurve); + + Standard_Real aLowerLimitYaw; + Standard_Boolean hasLowerLimitYaw = Standard_True; + if ( theData->IsParamDefined (theNum,10) ) { + theData->ReadReal (theNum, 10, "lower_limit_yaw", theArch, aLowerLimitYaw); + } + else { + hasLowerLimitYaw = Standard_False; + aLowerLimitYaw = 0; + } + + Standard_Real aUpperLimitYaw; + Standard_Boolean hasUpperLimitYaw = Standard_True; + if ( theData->IsParamDefined (theNum,11) ) { + theData->ReadReal (theNum, 11, "upper_limit_yaw", theArch, aUpperLimitYaw); + } + else { + hasUpperLimitYaw = Standard_False; + aUpperLimitYaw = 0; + } + + Standard_Real aLowerLimitPitch; + Standard_Boolean hasLowerLimitPitch = Standard_True; + if ( theData->IsParamDefined (theNum,12) ) { + theData->ReadReal (theNum, 12, "lower_limit_pitch", theArch, aLowerLimitPitch); + } + else { + hasLowerLimitPitch = Standard_False; + aLowerLimitPitch = 0; + } + + Standard_Real aUpperLimitPitch; + Standard_Boolean hasUpperLimitPitch = Standard_True; + if ( theData->IsParamDefined (theNum,13) ) { + theData->ReadReal (theNum, 13, "upper_limit_pitch", theArch, aUpperLimitPitch); + } + else { + hasUpperLimitPitch = Standard_False; + aUpperLimitPitch = 0; + } + + Standard_Real aLowerLimitRoll; + Standard_Boolean hasLowerLimitRoll = Standard_True; + if ( theData->IsParamDefined (theNum,14) ) { + theData->ReadReal (theNum, 14, "lower_limit_roll", theArch, aLowerLimitRoll); + } + else { + hasLowerLimitRoll = Standard_False; + aLowerLimitRoll = 0; + } + + Standard_Real aUpperLimitRoll; + Standard_Boolean hasUpperLimitRoll = Standard_True; + if ( theData->IsParamDefined (theNum,15) ) { + theData->ReadReal (theNum, 15, "upper_limit_roll", theArch, aUpperLimitRoll); + } + else { + hasUpperLimitRoll = Standard_False; + aUpperLimitRoll = 0; + } + + // Initialize entity + theEnt->Init(aRepresentationItem_Name, + aItemDefinedTransformation_Name, + hasItemDefinedTransformation_Description, + aItemDefinedTransformation_Description, + aItemDefinedTransformation_TransformItem1, + aItemDefinedTransformation_TransformItem2, + aKinematicPair_Joint, + aPointOnPlanarCurvePair_PairCurve, + aPointOnPlanarCurvePair_Orientation, + aRangeOnPairCurve, + hasLowerLimitYaw, + aLowerLimitYaw, + hasUpperLimitYaw, + aUpperLimitYaw, + hasLowerLimitPitch, + aLowerLimitPitch, + hasUpperLimitPitch, + aUpperLimitPitch, + hasLowerLimitRoll, + aLowerLimitRoll, + hasUpperLimitRoll, + aUpperLimitRoll); +} + +//======================================================================= +//function : WriteStep +//purpose : +//======================================================================= +void RWStepKinematics_RWPointOnPlanarCurvePairWithRange::WriteStep (StepData_StepWriter& theSW, + const Handle(StepKinematics_PointOnPlanarCurvePairWithRange)& theEnt) const +{ + + // Own fields of RepresentationItem + + theSW.Send (theEnt->Name()); + + // Inherited fields of ItemDefinedTransformation + + theSW.Send (theEnt->ItemDefinedTransformation()->Name()); + + if ( theEnt->ItemDefinedTransformation()->HasDescription() ) { + theSW.Send (theEnt->ItemDefinedTransformation()->Description()); + } + else theSW.SendUndef(); + + theSW.Send (theEnt->ItemDefinedTransformation()->TransformItem1()); + + theSW.Send (theEnt->ItemDefinedTransformation()->TransformItem2()); + + // Own fields of KinematicPair + + theSW.Send (theEnt->Joint()); + + // Own fields of PointOnPlanarCurvePair + + theSW.Send (theEnt->PairCurve()); + + theSW.SendBoolean (theEnt->Orientation()); + + // Own fields of PointOnPlanarCurvePairWithRange + + theSW.Send (theEnt->RangeOnPairCurve()); + + if ( theEnt->HasLowerLimitYaw() ) { + theSW.Send (theEnt->LowerLimitYaw()); + } + else theSW.SendUndef(); + + if ( theEnt->HasUpperLimitYaw() ) { + theSW.Send (theEnt->UpperLimitYaw()); + } + else theSW.SendUndef(); + + if ( theEnt->HasLowerLimitPitch() ) { + theSW.Send (theEnt->LowerLimitPitch()); + } + else theSW.SendUndef(); + + if ( theEnt->HasUpperLimitPitch() ) { + theSW.Send (theEnt->UpperLimitPitch()); + } + else theSW.SendUndef(); + + if ( theEnt->HasLowerLimitRoll() ) { + theSW.Send (theEnt->LowerLimitRoll()); + } + else theSW.SendUndef(); + + if ( theEnt->HasUpperLimitRoll() ) { + theSW.Send (theEnt->UpperLimitRoll()); + } + else theSW.SendUndef(); +} + +//======================================================================= +//function : Share +//purpose : +//======================================================================= +void RWStepKinematics_RWPointOnPlanarCurvePairWithRange::Share (const Handle(StepKinematics_PointOnPlanarCurvePairWithRange)& theEnt, + Interface_EntityIterator& iter) const +{ + + // Inherited fields of RepresentationItem + + // Inherited fields of ItemDefinedTransformation + + iter.AddItem (theEnt->ItemDefinedTransformation()->TransformItem1()); + + iter.AddItem (theEnt->ItemDefinedTransformation()->TransformItem2()); + + // Inherited fields of KinematicPair + + iter.AddItem (theEnt->StepKinematics_KinematicPair::Joint()); + + // Inherited fields of PointOnPlanarCurvePair + + iter.AddItem (theEnt->StepKinematics_PointOnPlanarCurvePair::PairCurve()); + + // Own fields of PointOnPlanarCurvePairWithRange + + iter.AddItem (theEnt->RangeOnPairCurve()); +} diff --git a/src/RWStepKinematics/RWStepKinematics_RWPointOnPlanarCurvePairWithRange.hxx b/src/RWStepKinematics/RWStepKinematics_RWPointOnPlanarCurvePairWithRange.hxx new file mode 100644 index 0000000000..b4c93d4707 --- /dev/null +++ b/src/RWStepKinematics/RWStepKinematics_RWPointOnPlanarCurvePairWithRange.hxx @@ -0,0 +1,46 @@ +// Created on : Sat May 02 12:41:15 2020 +// Created by: Irina KRYLOVA +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V3.0 +// Copyright (c) Open CASCADE 2020 +// +// 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 _RWStepKinematics_RWPointOnPlanarCurvePairWithRange_HeaderFile_ +#define _RWStepKinematics_RWPointOnPlanarCurvePairWithRange_HeaderFile_ + +#include +#include +#include + +class StepData_StepReaderData; +class Interface_Check; +class StepData_StepWriter; +class Interface_EntityIterator; +class StepKinematics_PointOnPlanarCurvePairWithRange; + +//! Read & Write tool for PointOnPlanarCurvePairWithRange +class RWStepKinematics_RWPointOnPlanarCurvePairWithRange +{ +public: + + DEFINE_STANDARD_ALLOC + + Standard_EXPORT RWStepKinematics_RWPointOnPlanarCurvePairWithRange(); + + Standard_EXPORT void ReadStep(const Handle(StepData_StepReaderData)& theData, const Standard_Integer theNum, Handle(Interface_Check)& theArch, const Handle(StepKinematics_PointOnPlanarCurvePairWithRange)& theEnt) const; + + Standard_EXPORT void WriteStep(StepData_StepWriter& theSW, const Handle(StepKinematics_PointOnPlanarCurvePairWithRange)& theEnt) const; + + Standard_EXPORT void Share(const Handle(StepKinematics_PointOnPlanarCurvePairWithRange)& theEnt, Interface_EntityIterator& iter) const; + +}; +#endif // _RWStepKinematics_RWPointOnPlanarCurvePairWithRange_HeaderFile_ diff --git a/src/RWStepKinematics/RWStepKinematics_RWPointOnSurfacePair.cxx b/src/RWStepKinematics/RWStepKinematics_RWPointOnSurfacePair.cxx new file mode 100644 index 0000000000..3c476808e7 --- /dev/null +++ b/src/RWStepKinematics/RWStepKinematics_RWPointOnSurfacePair.cxx @@ -0,0 +1,152 @@ +// Created on : Sat May 02 12:41:15 2020 +// Created by: Irina KRYLOVA +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V3.0 +// Copyright (c) Open CASCADE 2020 +// +// This file is part of Open CASCADE Technology software library. +// +// This library is free software; you can redistribute it and/or modify it under +// the terms of the GNU Lesser General Public License version 2.1 as published +// by the Free Software Foundation, with special exception defined in the file +// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT +// distribution for complete text of the license and disclaimer of any warranty. +// +// Alternatively, this file may be used under the terms of Open CASCADE +// commercial license or contractual agreement. + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +//======================================================================= +//function : RWStepKinematics_RWPointOnSurfacePair +//purpose : +//======================================================================= +RWStepKinematics_RWPointOnSurfacePair::RWStepKinematics_RWPointOnSurfacePair() {} + + +//======================================================================= +//function : ReadStep +//purpose : +//======================================================================= +void RWStepKinematics_RWPointOnSurfacePair::ReadStep (const Handle(StepData_StepReaderData)& theData, + const Standard_Integer theNum, + Handle(Interface_Check)& theArch, + const Handle(StepKinematics_PointOnSurfacePair)& theEnt) const +{ + // Check number of parameters + if ( ! theData->CheckNbParams(theNum,7,theArch,"point_on_surface_pair") ) return; + + // Inherited fields of RepresentationItem + + Handle(TCollection_HAsciiString) aRepresentationItem_Name; + theData->ReadString (theNum, 1, "representation_item.name", theArch, aRepresentationItem_Name); + + // Inherited fields of ItemDefinedTransformation + + Handle(TCollection_HAsciiString) aItemDefinedTransformation_Name; + theData->ReadString (theNum, 2, "item_defined_transformation.name", theArch, aItemDefinedTransformation_Name); + + Handle(TCollection_HAsciiString) aItemDefinedTransformation_Description; + Standard_Boolean hasItemDefinedTransformation_Description = Standard_True; + if ( theData->IsParamDefined (theNum,3) ) { + theData->ReadString (theNum, 3, "item_defined_transformation.description", theArch, aItemDefinedTransformation_Description); + } + else { + hasItemDefinedTransformation_Description = Standard_False; + aItemDefinedTransformation_Description.Nullify(); + } + + Handle(StepRepr_RepresentationItem) aItemDefinedTransformation_TransformItem1; + theData->ReadEntity (theNum, 4, "item_defined_transformation.transform_item1", theArch, STANDARD_TYPE(StepRepr_RepresentationItem), aItemDefinedTransformation_TransformItem1); + + Handle(StepRepr_RepresentationItem) aItemDefinedTransformation_TransformItem2; + theData->ReadEntity (theNum, 5, "item_defined_transformation.transform_item2", theArch, STANDARD_TYPE(StepRepr_RepresentationItem), aItemDefinedTransformation_TransformItem2); + + // Inherited fields of KinematicPair + + Handle(StepKinematics_KinematicJoint) aKinematicPair_Joint; + theData->ReadEntity (theNum, 6, "kinematic_pair.joint", theArch, STANDARD_TYPE(StepKinematics_KinematicJoint), aKinematicPair_Joint); + + // Own fields of PointOnSurfacePair + + Handle(StepGeom_Surface) aPairSurface; + theData->ReadEntity (theNum, 7, "pair_surface", theArch, STANDARD_TYPE(StepGeom_Surface), aPairSurface); + + // Initialize entity + theEnt->Init(aRepresentationItem_Name, + aItemDefinedTransformation_Name, + hasItemDefinedTransformation_Description, + aItemDefinedTransformation_Description, + aItemDefinedTransformation_TransformItem1, + aItemDefinedTransformation_TransformItem2, + aKinematicPair_Joint, + aPairSurface); +} + +//======================================================================= +//function : WriteStep +//purpose : +//======================================================================= +void RWStepKinematics_RWPointOnSurfacePair::WriteStep (StepData_StepWriter& theSW, + const Handle(StepKinematics_PointOnSurfacePair)& theEnt) const +{ + + // Own fields of RepresentationItem + + theSW.Send (theEnt->Name()); + + // Inherited fields of ItemDefinedTransformation + + theSW.Send (theEnt->ItemDefinedTransformation()->Name()); + + if ( theEnt->ItemDefinedTransformation()->HasDescription() ) { + theSW.Send (theEnt->ItemDefinedTransformation()->Description()); + } + else theSW.SendUndef(); + + theSW.Send (theEnt->ItemDefinedTransformation()->TransformItem1()); + + theSW.Send (theEnt->ItemDefinedTransformation()->TransformItem2()); + + // Own fields of KinematicPair + + theSW.Send (theEnt->Joint()); + + // Own fields of PointOnSurfacePair + + theSW.Send (theEnt->PairSurface()); +} + +//======================================================================= +//function : Share +//purpose : +//======================================================================= +void RWStepKinematics_RWPointOnSurfacePair::Share (const Handle(StepKinematics_PointOnSurfacePair)& theEnt, + Interface_EntityIterator& iter) const +{ + + // Inherited fields of RepresentationItem + + // Inherited fields of ItemDefinedTransformation + + iter.AddItem (theEnt->ItemDefinedTransformation()->TransformItem1()); + + iter.AddItem (theEnt->ItemDefinedTransformation()->TransformItem2()); + + // Inherited fields of KinematicPair + + iter.AddItem (theEnt->StepKinematics_KinematicPair::Joint()); + + // Own fields of PointOnSurfacePair + + iter.AddItem (theEnt->PairSurface()); +} diff --git a/src/RWStepKinematics/RWStepKinematics_RWPointOnSurfacePair.hxx b/src/RWStepKinematics/RWStepKinematics_RWPointOnSurfacePair.hxx new file mode 100644 index 0000000000..d990b26468 --- /dev/null +++ b/src/RWStepKinematics/RWStepKinematics_RWPointOnSurfacePair.hxx @@ -0,0 +1,46 @@ +// Created on : Sat May 02 12:41:15 2020 +// Created by: Irina KRYLOVA +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V3.0 +// Copyright (c) Open CASCADE 2020 +// +// 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 _RWStepKinematics_RWPointOnSurfacePair_HeaderFile_ +#define _RWStepKinematics_RWPointOnSurfacePair_HeaderFile_ + +#include +#include +#include + +class StepData_StepReaderData; +class Interface_Check; +class StepData_StepWriter; +class Interface_EntityIterator; +class StepKinematics_PointOnSurfacePair; + +//! Read & Write tool for PointOnSurfacePair +class RWStepKinematics_RWPointOnSurfacePair +{ +public: + + DEFINE_STANDARD_ALLOC + + Standard_EXPORT RWStepKinematics_RWPointOnSurfacePair(); + + Standard_EXPORT void ReadStep(const Handle(StepData_StepReaderData)& theData, const Standard_Integer theNum, Handle(Interface_Check)& theArch, const Handle(StepKinematics_PointOnSurfacePair)& theEnt) const; + + Standard_EXPORT void WriteStep(StepData_StepWriter& theSW, const Handle(StepKinematics_PointOnSurfacePair)& theEnt) const; + + Standard_EXPORT void Share(const Handle(StepKinematics_PointOnSurfacePair)& theEnt, Interface_EntityIterator& iter) const; + +}; +#endif // _RWStepKinematics_RWPointOnSurfacePair_HeaderFile_ diff --git a/src/RWStepKinematics/RWStepKinematics_RWPointOnSurfacePairValue.cxx b/src/RWStepKinematics/RWStepKinematics_RWPointOnSurfacePairValue.cxx new file mode 100644 index 0000000000..94ae94355c --- /dev/null +++ b/src/RWStepKinematics/RWStepKinematics_RWPointOnSurfacePairValue.cxx @@ -0,0 +1,142 @@ +// Created on : Sat May 02 12:41:15 2020 +// Created by: Irina KRYLOVA +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V3.0 +// Copyright (c) Open CASCADE 2020 +// +// This file is part of Open CASCADE Technology software library. +// +// This library is free software; you can redistribute it and/or modify it under +// the terms of the GNU Lesser General Public License version 2.1 as published +// by the Free Software Foundation, with special exception defined in the file +// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT +// distribution for complete text of the license and disclaimer of any warranty. +// +// Alternatively, this file may be used under the terms of Open CASCADE +// commercial license or contractual agreement. + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +//======================================================================= +//function : RWStepKinematics_RWPointOnSurfacePairValue +//purpose : +//======================================================================= +RWStepKinematics_RWPointOnSurfacePairValue::RWStepKinematics_RWPointOnSurfacePairValue() {} + + +//======================================================================= +//function : ReadStep +//purpose : +//======================================================================= +void RWStepKinematics_RWPointOnSurfacePairValue::ReadStep (const Handle(StepData_StepReaderData)& theData, + const Standard_Integer theNum, + Handle(Interface_Check)& theArch, + const Handle(StepKinematics_PointOnSurfacePairValue)& theEnt) const +{ + // Check number of parameters + if ( ! theData->CheckNbParams(theNum,4,theArch,"point_on_surface_pair_value") ) return; + + // Inherited fields of RepresentationItem + + Handle(TCollection_HAsciiString) aRepresentationItem_Name; + theData->ReadString (theNum, 1, "representation_item.name", theArch, aRepresentationItem_Name); + + // Inherited fields of PairValue + + Handle(StepKinematics_KinematicPair) aPairValue_AppliesToPair; + theData->ReadEntity (theNum, 2, "pair_value.applies_to_pair", theArch, STANDARD_TYPE(StepKinematics_KinematicPair), aPairValue_AppliesToPair); + + // Own fields of PointOnSurfacePairValue + + Handle(StepGeom_PointOnSurface) aActualPointOnSurface; + theData->ReadEntity (theNum, 3, "actual_point_on_surface", theArch, STANDARD_TYPE(StepGeom_PointOnSurface), aActualPointOnSurface); + + StepKinematics_SpatialRotation aInputOrientation; + if (theData->SubListNumber(theNum, 4, Standard_True)) + { + Handle(TColStd_HArray1OfReal) aItems; + Standard_Integer nsub = 0; + if (theData->ReadSubList(theNum, 4, "items", theArch, nsub)) { + Standard_Integer nb = theData->NbParams(nsub); + aItems = new TColStd_HArray1OfReal(1, nb); + Standard_Integer num2 = nsub; + for (Standard_Integer i0 = 1; i0 <= nb; i0++) { + Standard_Real anIt0; + theData->ReadReal(num2, i0, "real", theArch, anIt0); + aItems->SetValue(i0, anIt0); + } + } + aInputOrientation.SetValue(aItems); + } + else + theData->ReadEntity(theNum, 4, "input_orientation", theArch, aInputOrientation); + + // Initialize entity + theEnt->Init(aRepresentationItem_Name, + aPairValue_AppliesToPair, + aActualPointOnSurface, + aInputOrientation); +} + +//======================================================================= +//function : WriteStep +//purpose : +//======================================================================= +void RWStepKinematics_RWPointOnSurfacePairValue::WriteStep (StepData_StepWriter& theSW, + const Handle(StepKinematics_PointOnSurfacePairValue)& theEnt) const +{ + + // Own fields of RepresentationItem + + theSW.Send (theEnt->Name()); + + // Own fields of PairValue + + theSW.Send (theEnt->AppliesToPair()); + + // Own fields of PointOnSurfacePairValue + + theSW.Send (theEnt->ActualPointOnSurface()); + + if (!theEnt->InputOrientation().YprRotation().IsNull()) + { + // Inherited field : YPR + theSW.OpenSub(); + for (Standard_Integer i = 1; i <= theEnt->InputOrientation().YprRotation()->Length(); i++) { + theSW.Send(theEnt->InputOrientation().YprRotation()->Value(i)); + } + theSW.CloseSub(); + } + else + theSW.Send(theEnt->InputOrientation().Value()); +} + +//======================================================================= +//function : Share +//purpose : +//======================================================================= +void RWStepKinematics_RWPointOnSurfacePairValue::Share (const Handle(StepKinematics_PointOnSurfacePairValue)& theEnt, + Interface_EntityIterator& iter) const +{ + + // Inherited fields of RepresentationItem + + // Inherited fields of PairValue + + iter.AddItem (theEnt->StepKinematics_PairValue::AppliesToPair()); + + // Own fields of PointOnSurfacePairValue + + iter.AddItem (theEnt->ActualPointOnSurface()); + + if (!theEnt->InputOrientation().RotationAboutDirection().IsNull()) + iter.AddItem(theEnt->InputOrientation().Value()); +} diff --git a/src/RWStepKinematics/RWStepKinematics_RWPointOnSurfacePairValue.hxx b/src/RWStepKinematics/RWStepKinematics_RWPointOnSurfacePairValue.hxx new file mode 100644 index 0000000000..b8341294c9 --- /dev/null +++ b/src/RWStepKinematics/RWStepKinematics_RWPointOnSurfacePairValue.hxx @@ -0,0 +1,46 @@ +// Created on : Sat May 02 12:41:15 2020 +// Created by: Irina KRYLOVA +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V3.0 +// Copyright (c) Open CASCADE 2020 +// +// 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 _RWStepKinematics_RWPointOnSurfacePairValue_HeaderFile_ +#define _RWStepKinematics_RWPointOnSurfacePairValue_HeaderFile_ + +#include +#include +#include + +class StepData_StepReaderData; +class Interface_Check; +class StepData_StepWriter; +class Interface_EntityIterator; +class StepKinematics_PointOnSurfacePairValue; + +//! Read & Write tool for PointOnSurfacePairValue +class RWStepKinematics_RWPointOnSurfacePairValue +{ +public: + + DEFINE_STANDARD_ALLOC + + Standard_EXPORT RWStepKinematics_RWPointOnSurfacePairValue(); + + Standard_EXPORT void ReadStep(const Handle(StepData_StepReaderData)& theData, const Standard_Integer theNum, Handle(Interface_Check)& theArch, const Handle(StepKinematics_PointOnSurfacePairValue)& theEnt) const; + + Standard_EXPORT void WriteStep(StepData_StepWriter& theSW, const Handle(StepKinematics_PointOnSurfacePairValue)& theEnt) const; + + Standard_EXPORT void Share(const Handle(StepKinematics_PointOnSurfacePairValue)& theEnt, Interface_EntityIterator& iter) const; + +}; +#endif // _RWStepKinematics_RWPointOnSurfacePairValue_HeaderFile_ diff --git a/src/RWStepKinematics/RWStepKinematics_RWPointOnSurfacePairWithRange.cxx b/src/RWStepKinematics/RWStepKinematics_RWPointOnSurfacePairWithRange.cxx new file mode 100644 index 0000000000..91014584d9 --- /dev/null +++ b/src/RWStepKinematics/RWStepKinematics_RWPointOnSurfacePairWithRange.cxx @@ -0,0 +1,270 @@ +// Created on : Sat May 02 12:41:15 2020 +// Created by: Irina KRYLOVA +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V3.0 +// Copyright (c) Open CASCADE 2020 +// +// This file is part of Open CASCADE Technology software library. +// +// This library is free software; you can redistribute it and/or modify it under +// the terms of the GNU Lesser General Public License version 2.1 as published +// by the Free Software Foundation, with special exception defined in the file +// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT +// distribution for complete text of the license and disclaimer of any warranty. +// +// Alternatively, this file may be used under the terms of Open CASCADE +// commercial license or contractual agreement. + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +//======================================================================= +//function : RWStepKinematics_RWPointOnSurfacePairWithRange +//purpose : +//======================================================================= +RWStepKinematics_RWPointOnSurfacePairWithRange::RWStepKinematics_RWPointOnSurfacePairWithRange() {} + + +//======================================================================= +//function : ReadStep +//purpose : +//======================================================================= +void RWStepKinematics_RWPointOnSurfacePairWithRange::ReadStep (const Handle(StepData_StepReaderData)& theData, + const Standard_Integer theNum, + Handle(Interface_Check)& theArch, + const Handle(StepKinematics_PointOnSurfacePairWithRange)& theEnt) const +{ + // Check number of parameters + if ( ! theData->CheckNbParams(theNum,14,theArch,"point_on_surface_pair_with_range") ) return; + + // Inherited fields of RepresentationItem + + Handle(TCollection_HAsciiString) aRepresentationItem_Name; + theData->ReadString (theNum, 1, "representation_item.name", theArch, aRepresentationItem_Name); + + // Inherited fields of ItemDefinedTransformation + + Handle(TCollection_HAsciiString) aItemDefinedTransformation_Name; + theData->ReadString (theNum, 2, "item_defined_transformation.name", theArch, aItemDefinedTransformation_Name); + + Handle(TCollection_HAsciiString) aItemDefinedTransformation_Description; + Standard_Boolean hasItemDefinedTransformation_Description = Standard_True; + if ( theData->IsParamDefined (theNum,3) ) { + theData->ReadString (theNum, 3, "item_defined_transformation.description", theArch, aItemDefinedTransformation_Description); + } + else { + hasItemDefinedTransformation_Description = Standard_False; + aItemDefinedTransformation_Description.Nullify(); + } + + Handle(StepRepr_RepresentationItem) aItemDefinedTransformation_TransformItem1; + theData->ReadEntity (theNum, 4, "item_defined_transformation.transform_item1", theArch, STANDARD_TYPE(StepRepr_RepresentationItem), aItemDefinedTransformation_TransformItem1); + + Handle(StepRepr_RepresentationItem) aItemDefinedTransformation_TransformItem2; + theData->ReadEntity (theNum, 5, "item_defined_transformation.transform_item2", theArch, STANDARD_TYPE(StepRepr_RepresentationItem), aItemDefinedTransformation_TransformItem2); + + // Inherited fields of KinematicPair + + Handle(StepKinematics_KinematicJoint) aKinematicPair_Joint; + theData->ReadEntity (theNum, 6, "kinematic_pair.joint", theArch, STANDARD_TYPE(StepKinematics_KinematicJoint), aKinematicPair_Joint); + + // Inherited fields of PointOnSurfacePair + + Handle(StepGeom_Surface) aPointOnSurfacePair_PairSurface; + theData->ReadEntity (theNum, 7, "point_on_surface_pair.pair_surface", theArch, STANDARD_TYPE(StepGeom_Surface), aPointOnSurfacePair_PairSurface); + + // Own fields of PointOnSurfacePairWithRange + + Handle(StepGeom_RectangularTrimmedSurface) aRangeOnPairSurface; + theData->ReadEntity (theNum, 8, "range_on_pair_surface", theArch, STANDARD_TYPE(StepGeom_RectangularTrimmedSurface), aRangeOnPairSurface); + + Standard_Real aLowerLimitYaw; + Standard_Boolean hasLowerLimitYaw = Standard_True; + if ( theData->IsParamDefined (theNum,9) ) { + theData->ReadReal (theNum, 9, "lower_limit_yaw", theArch, aLowerLimitYaw); + } + else { + hasLowerLimitYaw = Standard_False; + aLowerLimitYaw = 0; + } + + Standard_Real aUpperLimitYaw; + Standard_Boolean hasUpperLimitYaw = Standard_True; + if ( theData->IsParamDefined (theNum,10) ) { + theData->ReadReal (theNum, 10, "upper_limit_yaw", theArch, aUpperLimitYaw); + } + else { + hasUpperLimitYaw = Standard_False; + aUpperLimitYaw = 0; + } + + Standard_Real aLowerLimitPitch; + Standard_Boolean hasLowerLimitPitch = Standard_True; + if ( theData->IsParamDefined (theNum,11) ) { + theData->ReadReal (theNum, 11, "lower_limit_pitch", theArch, aLowerLimitPitch); + } + else { + hasLowerLimitPitch = Standard_False; + aLowerLimitPitch = 0; + } + + Standard_Real aUpperLimitPitch; + Standard_Boolean hasUpperLimitPitch = Standard_True; + if ( theData->IsParamDefined (theNum,12) ) { + theData->ReadReal (theNum, 12, "upper_limit_pitch", theArch, aUpperLimitPitch); + } + else { + hasUpperLimitPitch = Standard_False; + aUpperLimitPitch = 0; + } + + Standard_Real aLowerLimitRoll; + Standard_Boolean hasLowerLimitRoll = Standard_True; + if ( theData->IsParamDefined (theNum,13) ) { + theData->ReadReal (theNum, 13, "lower_limit_roll", theArch, aLowerLimitRoll); + } + else { + hasLowerLimitRoll = Standard_False; + aLowerLimitRoll = 0; + } + + Standard_Real aUpperLimitRoll; + Standard_Boolean hasUpperLimitRoll = Standard_True; + if ( theData->IsParamDefined (theNum,14) ) { + theData->ReadReal (theNum, 14, "upper_limit_roll", theArch, aUpperLimitRoll); + } + else { + hasUpperLimitRoll = Standard_False; + aUpperLimitRoll = 0; + } + + // Initialize entity + theEnt->Init(aRepresentationItem_Name, + aItemDefinedTransformation_Name, + hasItemDefinedTransformation_Description, + aItemDefinedTransformation_Description, + aItemDefinedTransformation_TransformItem1, + aItemDefinedTransformation_TransformItem2, + aKinematicPair_Joint, + aPointOnSurfacePair_PairSurface, + aRangeOnPairSurface, + hasLowerLimitYaw, + aLowerLimitYaw, + hasUpperLimitYaw, + aUpperLimitYaw, + hasLowerLimitPitch, + aLowerLimitPitch, + hasUpperLimitPitch, + aUpperLimitPitch, + hasLowerLimitRoll, + aLowerLimitRoll, + hasUpperLimitRoll, + aUpperLimitRoll); +} + +//======================================================================= +//function : WriteStep +//purpose : +//======================================================================= +void RWStepKinematics_RWPointOnSurfacePairWithRange::WriteStep (StepData_StepWriter& theSW, + const Handle(StepKinematics_PointOnSurfacePairWithRange)& theEnt) const +{ + + // Own fields of RepresentationItem + + theSW.Send (theEnt->Name()); + + // Inherited fields of ItemDefinedTransformation + + theSW.Send (theEnt->ItemDefinedTransformation()->Name()); + + if ( theEnt->ItemDefinedTransformation()->HasDescription() ) { + theSW.Send (theEnt->ItemDefinedTransformation()->Description()); + } + else theSW.SendUndef(); + + theSW.Send (theEnt->ItemDefinedTransformation()->TransformItem1()); + + theSW.Send (theEnt->ItemDefinedTransformation()->TransformItem2()); + + // Own fields of KinematicPair + + theSW.Send (theEnt->Joint()); + + // Own fields of PointOnSurfacePair + + theSW.Send (theEnt->PairSurface()); + + // Own fields of PointOnSurfacePairWithRange + + theSW.Send (theEnt->RangeOnPairSurface()); + + if ( theEnt->HasLowerLimitYaw() ) { + theSW.Send (theEnt->LowerLimitYaw()); + } + else theSW.SendUndef(); + + if ( theEnt->HasUpperLimitYaw() ) { + theSW.Send (theEnt->UpperLimitYaw()); + } + else theSW.SendUndef(); + + if ( theEnt->HasLowerLimitPitch() ) { + theSW.Send (theEnt->LowerLimitPitch()); + } + else theSW.SendUndef(); + + if ( theEnt->HasUpperLimitPitch() ) { + theSW.Send (theEnt->UpperLimitPitch()); + } + else theSW.SendUndef(); + + if ( theEnt->HasLowerLimitRoll() ) { + theSW.Send (theEnt->LowerLimitRoll()); + } + else theSW.SendUndef(); + + if ( theEnt->HasUpperLimitRoll() ) { + theSW.Send (theEnt->UpperLimitRoll()); + } + else theSW.SendUndef(); +} + +//======================================================================= +//function : Share +//purpose : +//======================================================================= +void RWStepKinematics_RWPointOnSurfacePairWithRange::Share (const Handle(StepKinematics_PointOnSurfacePairWithRange)& theEnt, + Interface_EntityIterator& iter) const +{ + + // Inherited fields of RepresentationItem + + // Inherited fields of ItemDefinedTransformation + + iter.AddItem (theEnt->ItemDefinedTransformation()->TransformItem1()); + + iter.AddItem (theEnt->ItemDefinedTransformation()->TransformItem2()); + + // Inherited fields of KinematicPair + + iter.AddItem (theEnt->StepKinematics_KinematicPair::Joint()); + + // Inherited fields of PointOnSurfacePair + + iter.AddItem (theEnt->StepKinematics_PointOnSurfacePair::PairSurface()); + + // Own fields of PointOnSurfacePairWithRange + + iter.AddItem (theEnt->RangeOnPairSurface()); +} diff --git a/src/RWStepKinematics/RWStepKinematics_RWPointOnSurfacePairWithRange.hxx b/src/RWStepKinematics/RWStepKinematics_RWPointOnSurfacePairWithRange.hxx new file mode 100644 index 0000000000..45ed322ece --- /dev/null +++ b/src/RWStepKinematics/RWStepKinematics_RWPointOnSurfacePairWithRange.hxx @@ -0,0 +1,46 @@ +// Created on : Sat May 02 12:41:15 2020 +// Created by: Irina KRYLOVA +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V3.0 +// Copyright (c) Open CASCADE 2020 +// +// 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 _RWStepKinematics_RWPointOnSurfacePairWithRange_HeaderFile_ +#define _RWStepKinematics_RWPointOnSurfacePairWithRange_HeaderFile_ + +#include +#include +#include + +class StepData_StepReaderData; +class Interface_Check; +class StepData_StepWriter; +class Interface_EntityIterator; +class StepKinematics_PointOnSurfacePairWithRange; + +//! Read & Write tool for PointOnSurfacePairWithRange +class RWStepKinematics_RWPointOnSurfacePairWithRange +{ +public: + + DEFINE_STANDARD_ALLOC + + Standard_EXPORT RWStepKinematics_RWPointOnSurfacePairWithRange(); + + Standard_EXPORT void ReadStep(const Handle(StepData_StepReaderData)& theData, const Standard_Integer theNum, Handle(Interface_Check)& theArch, const Handle(StepKinematics_PointOnSurfacePairWithRange)& theEnt) const; + + Standard_EXPORT void WriteStep(StepData_StepWriter& theSW, const Handle(StepKinematics_PointOnSurfacePairWithRange)& theEnt) const; + + Standard_EXPORT void Share(const Handle(StepKinematics_PointOnSurfacePairWithRange)& theEnt, Interface_EntityIterator& iter) const; + +}; +#endif // _RWStepKinematics_RWPointOnSurfacePairWithRange_HeaderFile_ diff --git a/src/RWStepKinematics/RWStepKinematics_RWPrismaticPair.cxx b/src/RWStepKinematics/RWStepKinematics_RWPrismaticPair.cxx new file mode 100644 index 0000000000..74ba10d636 --- /dev/null +++ b/src/RWStepKinematics/RWStepKinematics_RWPrismaticPair.cxx @@ -0,0 +1,180 @@ +// Created on : Sat May 02 12:41:15 2020 +// Created by: Irina KRYLOVA +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V3.0 +// Copyright (c) Open CASCADE 2020 +// +// This file is part of Open CASCADE Technology software library. +// +// This library is free software; you can redistribute it and/or modify it under +// the terms of the GNU Lesser General Public License version 2.1 as published +// by the Free Software Foundation, with special exception defined in the file +// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT +// distribution for complete text of the license and disclaimer of any warranty. +// +// Alternatively, this file may be used under the terms of Open CASCADE +// commercial license or contractual agreement. + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +//======================================================================= +//function : RWStepKinematics_RWPrismaticPair +//purpose : +//======================================================================= +RWStepKinematics_RWPrismaticPair::RWStepKinematics_RWPrismaticPair() {} + + +//======================================================================= +//function : ReadStep +//purpose : +//======================================================================= +void RWStepKinematics_RWPrismaticPair::ReadStep (const Handle(StepData_StepReaderData)& theData, + const Standard_Integer theNum, + Handle(Interface_Check)& theArch, + const Handle(StepKinematics_PrismaticPair)& theEnt) const +{ + // Check number of parameters + if ( ! theData->CheckNbParams(theNum,12,theArch,"prismatic_pair") ) return; + + // Inherited fields of RepresentationItem + + Handle(TCollection_HAsciiString) aRepresentationItem_Name; + theData->ReadString (theNum, 1, "representation_item.name", theArch, aRepresentationItem_Name); + + // Inherited fields of ItemDefinedTransformation + + Handle(TCollection_HAsciiString) aItemDefinedTransformation_Name; + theData->ReadString (theNum, 2, "item_defined_transformation.name", theArch, aItemDefinedTransformation_Name); + + Handle(TCollection_HAsciiString) aItemDefinedTransformation_Description; + Standard_Boolean hasItemDefinedTransformation_Description = Standard_True; + if ( theData->IsParamDefined (theNum,3) ) { + theData->ReadString (theNum, 3, "item_defined_transformation.description", theArch, aItemDefinedTransformation_Description); + } + else { + hasItemDefinedTransformation_Description = Standard_False; + aItemDefinedTransformation_Description.Nullify(); + } + + Handle(StepRepr_RepresentationItem) aItemDefinedTransformation_TransformItem1; + theData->ReadEntity (theNum, 4, "item_defined_transformation.transform_item1", theArch, STANDARD_TYPE(StepRepr_RepresentationItem), aItemDefinedTransformation_TransformItem1); + + Handle(StepRepr_RepresentationItem) aItemDefinedTransformation_TransformItem2; + theData->ReadEntity (theNum, 5, "item_defined_transformation.transform_item2", theArch, STANDARD_TYPE(StepRepr_RepresentationItem), aItemDefinedTransformation_TransformItem2); + + // Inherited fields of KinematicPair + + Handle(StepKinematics_KinematicJoint) aKinematicPair_Joint; + theData->ReadEntity (theNum, 6, "kinematic_pair.joint", theArch, STANDARD_TYPE(StepKinematics_KinematicJoint), aKinematicPair_Joint); + + // Inherited fields of LowOrderKinematicPair + + Standard_Boolean aLowOrderKinematicPair_TX; + theData->ReadBoolean (theNum, 7, "low_order_kinematic_pair.t_x", theArch, aLowOrderKinematicPair_TX); + + Standard_Boolean aLowOrderKinematicPair_TY; + theData->ReadBoolean (theNum, 8, "low_order_kinematic_pair.t_y", theArch, aLowOrderKinematicPair_TY); + + Standard_Boolean aLowOrderKinematicPair_TZ; + theData->ReadBoolean (theNum, 9, "low_order_kinematic_pair.t_z", theArch, aLowOrderKinematicPair_TZ); + + Standard_Boolean aLowOrderKinematicPair_RX; + theData->ReadBoolean (theNum, 10, "low_order_kinematic_pair.r_x", theArch, aLowOrderKinematicPair_RX); + + Standard_Boolean aLowOrderKinematicPair_RY; + theData->ReadBoolean (theNum, 11, "low_order_kinematic_pair.r_y", theArch, aLowOrderKinematicPair_RY); + + Standard_Boolean aLowOrderKinematicPair_RZ; + theData->ReadBoolean (theNum, 12, "low_order_kinematic_pair.r_z", theArch, aLowOrderKinematicPair_RZ); + + // Initialize entity + theEnt->Init(aRepresentationItem_Name, + aItemDefinedTransformation_Name, + hasItemDefinedTransformation_Description, + aItemDefinedTransformation_Description, + aItemDefinedTransformation_TransformItem1, + aItemDefinedTransformation_TransformItem2, + aKinematicPair_Joint, + aLowOrderKinematicPair_TX, + aLowOrderKinematicPair_TY, + aLowOrderKinematicPair_TZ, + aLowOrderKinematicPair_RX, + aLowOrderKinematicPair_RY, + aLowOrderKinematicPair_RZ); +} + +//======================================================================= +//function : WriteStep +//purpose : +//======================================================================= +void RWStepKinematics_RWPrismaticPair::WriteStep (StepData_StepWriter& theSW, + const Handle(StepKinematics_PrismaticPair)& theEnt) const +{ + + // Own fields of RepresentationItem + + theSW.Send (theEnt->Name()); + + // Inherited fields of ItemDefinedTransformation + + theSW.Send (theEnt->ItemDefinedTransformation()->Name()); + + if ( theEnt->ItemDefinedTransformation()->HasDescription() ) { + theSW.Send (theEnt->ItemDefinedTransformation()->Description()); + } + else theSW.SendUndef(); + + theSW.Send (theEnt->ItemDefinedTransformation()->TransformItem1()); + + theSW.Send (theEnt->ItemDefinedTransformation()->TransformItem2()); + + // Own fields of KinematicPair + + theSW.Send (theEnt->Joint()); + + // Own fields of LowOrderKinematicPair + + theSW.SendBoolean (theEnt->TX()); + + theSW.SendBoolean (theEnt->TY()); + + theSW.SendBoolean (theEnt->TZ()); + + theSW.SendBoolean (theEnt->RX()); + + theSW.SendBoolean (theEnt->RY()); + + theSW.SendBoolean (theEnt->RZ()); +} + +//======================================================================= +//function : Share +//purpose : +//======================================================================= +void RWStepKinematics_RWPrismaticPair::Share (const Handle(StepKinematics_PrismaticPair)& theEnt, + Interface_EntityIterator& iter) const +{ + + // Inherited fields of RepresentationItem + + // Inherited fields of ItemDefinedTransformation + + iter.AddItem (theEnt->ItemDefinedTransformation()->TransformItem1()); + + iter.AddItem (theEnt->ItemDefinedTransformation()->TransformItem2()); + + // Inherited fields of KinematicPair + + iter.AddItem (theEnt->StepKinematics_KinematicPair::Joint()); + + // Inherited fields of LowOrderKinematicPair +} diff --git a/src/RWStepKinematics/RWStepKinematics_RWPrismaticPair.hxx b/src/RWStepKinematics/RWStepKinematics_RWPrismaticPair.hxx new file mode 100644 index 0000000000..e685a6ad4e --- /dev/null +++ b/src/RWStepKinematics/RWStepKinematics_RWPrismaticPair.hxx @@ -0,0 +1,46 @@ +// Created on : Sat May 02 12:41:15 2020 +// Created by: Irina KRYLOVA +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V3.0 +// Copyright (c) Open CASCADE 2020 +// +// 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 _RWStepKinematics_RWPrismaticPair_HeaderFile_ +#define _RWStepKinematics_RWPrismaticPair_HeaderFile_ + +#include +#include +#include + +class StepData_StepReaderData; +class Interface_Check; +class StepData_StepWriter; +class Interface_EntityIterator; +class StepKinematics_PrismaticPair; + +//! Read & Write tool for PrismaticPair +class RWStepKinematics_RWPrismaticPair +{ +public: + + DEFINE_STANDARD_ALLOC + + Standard_EXPORT RWStepKinematics_RWPrismaticPair(); + + Standard_EXPORT void ReadStep(const Handle(StepData_StepReaderData)& theData, const Standard_Integer theNum, Handle(Interface_Check)& theArch, const Handle(StepKinematics_PrismaticPair)& theEnt) const; + + Standard_EXPORT void WriteStep(StepData_StepWriter& theSW, const Handle(StepKinematics_PrismaticPair)& theEnt) const; + + Standard_EXPORT void Share(const Handle(StepKinematics_PrismaticPair)& theEnt, Interface_EntityIterator& iter) const; + +}; +#endif // _RWStepKinematics_RWPrismaticPair_HeaderFile_ diff --git a/src/RWStepKinematics/RWStepKinematics_RWPrismaticPairValue.cxx b/src/RWStepKinematics/RWStepKinematics_RWPrismaticPairValue.cxx new file mode 100644 index 0000000000..6c9d9052be --- /dev/null +++ b/src/RWStepKinematics/RWStepKinematics_RWPrismaticPairValue.cxx @@ -0,0 +1,103 @@ +// Created on : Sat May 02 12:41:15 2020 +// Created by: Irina KRYLOVA +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V3.0 +// Copyright (c) Open CASCADE 2020 +// +// This file is part of Open CASCADE Technology software library. +// +// This library is free software; you can redistribute it and/or modify it under +// the terms of the GNU Lesser General Public License version 2.1 as published +// by the Free Software Foundation, with special exception defined in the file +// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT +// distribution for complete text of the license and disclaimer of any warranty. +// +// Alternatively, this file may be used under the terms of Open CASCADE +// commercial license or contractual agreement. + +#include + +#include +#include +#include +#include +#include +#include +#include + +//======================================================================= +//function : RWStepKinematics_RWPrismaticPairValue +//purpose : +//======================================================================= +RWStepKinematics_RWPrismaticPairValue::RWStepKinematics_RWPrismaticPairValue() {} + + +//======================================================================= +//function : ReadStep +//purpose : +//======================================================================= +void RWStepKinematics_RWPrismaticPairValue::ReadStep (const Handle(StepData_StepReaderData)& theData, + const Standard_Integer theNum, + Handle(Interface_Check)& theArch, + const Handle(StepKinematics_PrismaticPairValue)& theEnt) const +{ + // Check number of parameters + if ( ! theData->CheckNbParams(theNum,3,theArch,"prismatic_pair_value") ) return; + + // Inherited fields of RepresentationItem + + Handle(TCollection_HAsciiString) aRepresentationItem_Name; + theData->ReadString (theNum, 1, "representation_item.name", theArch, aRepresentationItem_Name); + + // Inherited fields of PairValue + + Handle(StepKinematics_KinematicPair) aPairValue_AppliesToPair; + theData->ReadEntity (theNum, 2, "pair_value.applies_to_pair", theArch, STANDARD_TYPE(StepKinematics_KinematicPair), aPairValue_AppliesToPair); + + // Own fields of PrismaticPairValue + + Standard_Real aActualTranslation; + theData->ReadReal (theNum, 3, "actual_translation", theArch, aActualTranslation); + + // Initialize entity + theEnt->Init(aRepresentationItem_Name, + aPairValue_AppliesToPair, + aActualTranslation); +} + +//======================================================================= +//function : WriteStep +//purpose : +//======================================================================= +void RWStepKinematics_RWPrismaticPairValue::WriteStep (StepData_StepWriter& theSW, + const Handle(StepKinematics_PrismaticPairValue)& theEnt) const +{ + + // Own fields of RepresentationItem + + theSW.Send (theEnt->Name()); + + // Own fields of PairValue + + theSW.Send (theEnt->AppliesToPair()); + + // Own fields of PrismaticPairValue + + theSW.Send (theEnt->ActualTranslation()); +} + +//======================================================================= +//function : Share +//purpose : +//======================================================================= +void RWStepKinematics_RWPrismaticPairValue::Share (const Handle(StepKinematics_PrismaticPairValue)& theEnt, + Interface_EntityIterator& iter) const +{ + + // Inherited fields of RepresentationItem + + // Inherited fields of PairValue + + iter.AddItem (theEnt->StepKinematics_PairValue::AppliesToPair()); + + // Own fields of PrismaticPairValue +} diff --git a/src/RWStepKinematics/RWStepKinematics_RWPrismaticPairValue.hxx b/src/RWStepKinematics/RWStepKinematics_RWPrismaticPairValue.hxx new file mode 100644 index 0000000000..fee0c19933 --- /dev/null +++ b/src/RWStepKinematics/RWStepKinematics_RWPrismaticPairValue.hxx @@ -0,0 +1,46 @@ +// Created on : Sat May 02 12:41:15 2020 +// Created by: Irina KRYLOVA +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V3.0 +// Copyright (c) Open CASCADE 2020 +// +// 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 _RWStepKinematics_RWPrismaticPairValue_HeaderFile_ +#define _RWStepKinematics_RWPrismaticPairValue_HeaderFile_ + +#include +#include +#include + +class StepData_StepReaderData; +class Interface_Check; +class StepData_StepWriter; +class Interface_EntityIterator; +class StepKinematics_PrismaticPairValue; + +//! Read & Write tool for PrismaticPairValue +class RWStepKinematics_RWPrismaticPairValue +{ +public: + + DEFINE_STANDARD_ALLOC + + Standard_EXPORT RWStepKinematics_RWPrismaticPairValue(); + + Standard_EXPORT void ReadStep(const Handle(StepData_StepReaderData)& theData, const Standard_Integer theNum, Handle(Interface_Check)& theArch, const Handle(StepKinematics_PrismaticPairValue)& theEnt) const; + + Standard_EXPORT void WriteStep(StepData_StepWriter& theSW, const Handle(StepKinematics_PrismaticPairValue)& theEnt) const; + + Standard_EXPORT void Share(const Handle(StepKinematics_PrismaticPairValue)& theEnt, Interface_EntityIterator& iter) const; + +}; +#endif // _RWStepKinematics_RWPrismaticPairValue_HeaderFile_ diff --git a/src/RWStepKinematics/RWStepKinematics_RWPrismaticPairWithRange.cxx b/src/RWStepKinematics/RWStepKinematics_RWPrismaticPairWithRange.cxx new file mode 100644 index 0000000000..85decffdd9 --- /dev/null +++ b/src/RWStepKinematics/RWStepKinematics_RWPrismaticPairWithRange.cxx @@ -0,0 +1,221 @@ +// Created on : Sat May 02 12:41:15 2020 +// Created by: Irina KRYLOVA +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V3.0 +// Copyright (c) Open CASCADE 2020 +// +// This file is part of Open CASCADE Technology software library. +// +// This library is free software; you can redistribute it and/or modify it under +// the terms of the GNU Lesser General Public License version 2.1 as published +// by the Free Software Foundation, with special exception defined in the file +// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT +// distribution for complete text of the license and disclaimer of any warranty. +// +// Alternatively, this file may be used under the terms of Open CASCADE +// commercial license or contractual agreement. + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +//======================================================================= +//function : RWStepKinematics_RWPrismaticPairWithRange +//purpose : +//======================================================================= +RWStepKinematics_RWPrismaticPairWithRange::RWStepKinematics_RWPrismaticPairWithRange() {} + + +//======================================================================= +//function : ReadStep +//purpose : +//======================================================================= +void RWStepKinematics_RWPrismaticPairWithRange::ReadStep (const Handle(StepData_StepReaderData)& theData, + const Standard_Integer theNum, + Handle(Interface_Check)& theArch, + const Handle(StepKinematics_PrismaticPairWithRange)& theEnt) const +{ + // Check number of parameters + if ( ! theData->CheckNbParams(theNum,14,theArch,"prismatic_pair_with_range") ) return; + + // Inherited fields of RepresentationItem + + Handle(TCollection_HAsciiString) aRepresentationItem_Name; + theData->ReadString (theNum, 1, "representation_item.name", theArch, aRepresentationItem_Name); + + // Inherited fields of ItemDefinedTransformation + + Handle(TCollection_HAsciiString) aItemDefinedTransformation_Name; + theData->ReadString (theNum, 2, "item_defined_transformation.name", theArch, aItemDefinedTransformation_Name); + + Handle(TCollection_HAsciiString) aItemDefinedTransformation_Description; + Standard_Boolean hasItemDefinedTransformation_Description = Standard_True; + if ( theData->IsParamDefined (theNum,3) ) { + theData->ReadString (theNum, 3, "item_defined_transformation.description", theArch, aItemDefinedTransformation_Description); + } + else { + hasItemDefinedTransformation_Description = Standard_False; + aItemDefinedTransformation_Description.Nullify(); + } + + Handle(StepRepr_RepresentationItem) aItemDefinedTransformation_TransformItem1; + theData->ReadEntity (theNum, 4, "item_defined_transformation.transform_item1", theArch, STANDARD_TYPE(StepRepr_RepresentationItem), aItemDefinedTransformation_TransformItem1); + + Handle(StepRepr_RepresentationItem) aItemDefinedTransformation_TransformItem2; + theData->ReadEntity (theNum, 5, "item_defined_transformation.transform_item2", theArch, STANDARD_TYPE(StepRepr_RepresentationItem), aItemDefinedTransformation_TransformItem2); + + // Inherited fields of KinematicPair + + Handle(StepKinematics_KinematicJoint) aKinematicPair_Joint; + theData->ReadEntity (theNum, 6, "kinematic_pair.joint", theArch, STANDARD_TYPE(StepKinematics_KinematicJoint), aKinematicPair_Joint); + + // Inherited fields of LowOrderKinematicPair + + Standard_Boolean aLowOrderKinematicPair_TX; + theData->ReadBoolean (theNum, 7, "low_order_kinematic_pair.t_x", theArch, aLowOrderKinematicPair_TX); + + Standard_Boolean aLowOrderKinematicPair_TY; + theData->ReadBoolean (theNum, 8, "low_order_kinematic_pair.t_y", theArch, aLowOrderKinematicPair_TY); + + Standard_Boolean aLowOrderKinematicPair_TZ; + theData->ReadBoolean (theNum, 9, "low_order_kinematic_pair.t_z", theArch, aLowOrderKinematicPair_TZ); + + Standard_Boolean aLowOrderKinematicPair_RX; + theData->ReadBoolean (theNum, 10, "low_order_kinematic_pair.r_x", theArch, aLowOrderKinematicPair_RX); + + Standard_Boolean aLowOrderKinematicPair_RY; + theData->ReadBoolean (theNum, 11, "low_order_kinematic_pair.r_y", theArch, aLowOrderKinematicPair_RY); + + Standard_Boolean aLowOrderKinematicPair_RZ; + theData->ReadBoolean (theNum, 12, "low_order_kinematic_pair.r_z", theArch, aLowOrderKinematicPair_RZ); + + // Own fields of PrismaticPairWithRange + + Standard_Real aLowerLimitActualTranslation; + Standard_Boolean hasLowerLimitActualTranslation = Standard_True; + if ( theData->IsParamDefined (theNum,13) ) { + theData->ReadReal (theNum, 13, "lower_limit_actual_translation", theArch, aLowerLimitActualTranslation); + } + else { + hasLowerLimitActualTranslation = Standard_False; + aLowerLimitActualTranslation = 0; + } + + Standard_Real aUpperLimitActualTranslation; + Standard_Boolean hasUpperLimitActualTranslation = Standard_True; + if ( theData->IsParamDefined (theNum,14) ) { + theData->ReadReal (theNum, 14, "upper_limit_actual_translation", theArch, aUpperLimitActualTranslation); + } + else { + hasUpperLimitActualTranslation = Standard_False; + aUpperLimitActualTranslation = 0; + } + + // Initialize entity + theEnt->Init(aRepresentationItem_Name, + aItemDefinedTransformation_Name, + hasItemDefinedTransformation_Description, + aItemDefinedTransformation_Description, + aItemDefinedTransformation_TransformItem1, + aItemDefinedTransformation_TransformItem2, + aKinematicPair_Joint, + aLowOrderKinematicPair_TX, + aLowOrderKinematicPair_TY, + aLowOrderKinematicPair_TZ, + aLowOrderKinematicPair_RX, + aLowOrderKinematicPair_RY, + aLowOrderKinematicPair_RZ, + hasLowerLimitActualTranslation, + aLowerLimitActualTranslation, + hasUpperLimitActualTranslation, + aUpperLimitActualTranslation); +} + +//======================================================================= +//function : WriteStep +//purpose : +//======================================================================= +void RWStepKinematics_RWPrismaticPairWithRange::WriteStep (StepData_StepWriter& theSW, + const Handle(StepKinematics_PrismaticPairWithRange)& theEnt) const +{ + + // Own fields of RepresentationItem + + theSW.Send (theEnt->Name()); + + // Inherited fields of ItemDefinedTransformation + + theSW.Send (theEnt->ItemDefinedTransformation()->Name()); + + if ( theEnt->ItemDefinedTransformation()->HasDescription() ) { + theSW.Send (theEnt->ItemDefinedTransformation()->Description()); + } + else theSW.SendUndef(); + + theSW.Send (theEnt->ItemDefinedTransformation()->TransformItem1()); + + theSW.Send (theEnt->ItemDefinedTransformation()->TransformItem2()); + + // Own fields of KinematicPair + + theSW.Send (theEnt->Joint()); + + // Own fields of LowOrderKinematicPair + + theSW.SendBoolean (theEnt->TX()); + + theSW.SendBoolean (theEnt->TY()); + + theSW.SendBoolean (theEnt->TZ()); + + theSW.SendBoolean (theEnt->RX()); + + theSW.SendBoolean (theEnt->RY()); + + theSW.SendBoolean (theEnt->RZ()); + + // Own fields of PrismaticPairWithRange + + if ( theEnt->HasLowerLimitActualTranslation() ) { + theSW.Send (theEnt->LowerLimitActualTranslation()); + } + else theSW.SendUndef(); + + if ( theEnt->HasUpperLimitActualTranslation() ) { + theSW.Send (theEnt->UpperLimitActualTranslation()); + } + else theSW.SendUndef(); +} + +//======================================================================= +//function : Share +//purpose : +//======================================================================= +void RWStepKinematics_RWPrismaticPairWithRange::Share (const Handle(StepKinematics_PrismaticPairWithRange)& theEnt, + Interface_EntityIterator& iter) const +{ + + // Inherited fields of RepresentationItem + + // Inherited fields of ItemDefinedTransformation + + iter.AddItem (theEnt->ItemDefinedTransformation()->TransformItem1()); + + iter.AddItem (theEnt->ItemDefinedTransformation()->TransformItem2()); + + // Inherited fields of KinematicPair + + iter.AddItem (theEnt->StepKinematics_KinematicPair::Joint()); + + // Inherited fields of LowOrderKinematicPair + + // Own fields of PrismaticPairWithRange +} diff --git a/src/RWStepKinematics/RWStepKinematics_RWPrismaticPairWithRange.hxx b/src/RWStepKinematics/RWStepKinematics_RWPrismaticPairWithRange.hxx new file mode 100644 index 0000000000..665069283e --- /dev/null +++ b/src/RWStepKinematics/RWStepKinematics_RWPrismaticPairWithRange.hxx @@ -0,0 +1,46 @@ +// Created on : Sat May 02 12:41:15 2020 +// Created by: Irina KRYLOVA +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V3.0 +// Copyright (c) Open CASCADE 2020 +// +// 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 _RWStepKinematics_RWPrismaticPairWithRange_HeaderFile_ +#define _RWStepKinematics_RWPrismaticPairWithRange_HeaderFile_ + +#include +#include +#include + +class StepData_StepReaderData; +class Interface_Check; +class StepData_StepWriter; +class Interface_EntityIterator; +class StepKinematics_PrismaticPairWithRange; + +//! Read & Write tool for PrismaticPairWithRange +class RWStepKinematics_RWPrismaticPairWithRange +{ +public: + + DEFINE_STANDARD_ALLOC + + Standard_EXPORT RWStepKinematics_RWPrismaticPairWithRange(); + + Standard_EXPORT void ReadStep(const Handle(StepData_StepReaderData)& theData, const Standard_Integer theNum, Handle(Interface_Check)& theArch, const Handle(StepKinematics_PrismaticPairWithRange)& theEnt) const; + + Standard_EXPORT void WriteStep(StepData_StepWriter& theSW, const Handle(StepKinematics_PrismaticPairWithRange)& theEnt) const; + + Standard_EXPORT void Share(const Handle(StepKinematics_PrismaticPairWithRange)& theEnt, Interface_EntityIterator& iter) const; + +}; +#endif // _RWStepKinematics_RWPrismaticPairWithRange_HeaderFile_ diff --git a/src/RWStepKinematics/RWStepKinematics_RWProductDefinitionKinematics.cxx b/src/RWStepKinematics/RWStepKinematics_RWProductDefinitionKinematics.cxx new file mode 100644 index 0000000000..ef3b100e2f --- /dev/null +++ b/src/RWStepKinematics/RWStepKinematics_RWProductDefinitionKinematics.cxx @@ -0,0 +1,101 @@ +// Created on : Sat May 02 12:41:15 2020 +// Created by: Irina KRYLOVA +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V3.0 +// Copyright (c) Open CASCADE 2020 +// +// This file is part of Open CASCADE Technology software library. +// +// This library is free software; you can redistribute it and/or modify it under +// the terms of the GNU Lesser General Public License version 2.1 as published +// by the Free Software Foundation, with special exception defined in the file +// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT +// distribution for complete text of the license and disclaimer of any warranty. +// +// Alternatively, this file may be used under the terms of Open CASCADE +// commercial license or contractual agreement. + +#include + +#include +#include +#include +#include +#include +#include + +//======================================================================= +//function : RWStepKinematics_RWProductDefinitionKinematics +//purpose : +//======================================================================= +RWStepKinematics_RWProductDefinitionKinematics::RWStepKinematics_RWProductDefinitionKinematics() {} + + +//======================================================================= +//function : ReadStep +//purpose : +//======================================================================= +void RWStepKinematics_RWProductDefinitionKinematics::ReadStep (const Handle(StepData_StepReaderData)& theData, + const Standard_Integer theNum, + Handle(Interface_Check)& theArch, + const Handle(StepKinematics_ProductDefinitionKinematics)& theEnt) const +{ + // Check number of parameters + if ( ! theData->CheckNbParams(theNum,3,theArch,"product_definition_kinematics") ) return; + + // Inherited fields of PropertyDefinition + + Handle(TCollection_HAsciiString) aPropertyDefinition_Name; + theData->ReadString (theNum, 1, "property_definition.name", theArch, aPropertyDefinition_Name); + + Handle(TCollection_HAsciiString) aPropertyDefinition_Description; + Standard_Boolean hasPropertyDefinition_Description = Standard_True; + if ( theData->IsParamDefined (theNum,2) ) { + theData->ReadString (theNum, 2, "property_definition.description", theArch, aPropertyDefinition_Description); + } + else { + hasPropertyDefinition_Description = Standard_False; + aPropertyDefinition_Description.Nullify(); + } + + StepRepr_CharacterizedDefinition aPropertyDefinition_Definition; + theData->ReadEntity (theNum, 3, "property_definition.definition", theArch, aPropertyDefinition_Definition); + + // Initialize entity + theEnt->Init(aPropertyDefinition_Name, + hasPropertyDefinition_Description, + aPropertyDefinition_Description, + aPropertyDefinition_Definition); +} + +//======================================================================= +//function : WriteStep +//purpose : +//======================================================================= +void RWStepKinematics_RWProductDefinitionKinematics::WriteStep (StepData_StepWriter& theSW, + const Handle(StepKinematics_ProductDefinitionKinematics)& theEnt) const +{ + + // Own fields of PropertyDefinition + + theSW.Send (theEnt->Name()); + + if ( theEnt->HasDescription() ) { + theSW.Send (theEnt->Description()); + } + else theSW.SendUndef(); + + theSW.Send (theEnt->Definition().Value()); +} + +//======================================================================= +//function : Share +//purpose : +//======================================================================= +void RWStepKinematics_RWProductDefinitionKinematics::Share (const Handle(StepKinematics_ProductDefinitionKinematics)& theEnt, + Interface_EntityIterator& iter) const +{ + + // Inherited fields of PropertyDefinition + + iter.AddItem (theEnt->StepRepr_PropertyDefinition::Definition().Value()); +} diff --git a/src/RWStepKinematics/RWStepKinematics_RWProductDefinitionKinematics.hxx b/src/RWStepKinematics/RWStepKinematics_RWProductDefinitionKinematics.hxx new file mode 100644 index 0000000000..3d5796fbc6 --- /dev/null +++ b/src/RWStepKinematics/RWStepKinematics_RWProductDefinitionKinematics.hxx @@ -0,0 +1,46 @@ +// Created on : Sat May 02 12:41:15 2020 +// Created by: Irina KRYLOVA +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V3.0 +// Copyright (c) Open CASCADE 2020 +// +// 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 _RWStepKinematics_RWProductDefinitionKinematics_HeaderFile_ +#define _RWStepKinematics_RWProductDefinitionKinematics_HeaderFile_ + +#include +#include +#include + +class StepData_StepReaderData; +class Interface_Check; +class StepData_StepWriter; +class Interface_EntityIterator; +class StepKinematics_ProductDefinitionKinematics; + +//! Read & Write tool for ProductDefinitionKinematics +class RWStepKinematics_RWProductDefinitionKinematics +{ +public: + + DEFINE_STANDARD_ALLOC + + Standard_EXPORT RWStepKinematics_RWProductDefinitionKinematics(); + + Standard_EXPORT void ReadStep(const Handle(StepData_StepReaderData)& theData, const Standard_Integer theNum, Handle(Interface_Check)& theArch, const Handle(StepKinematics_ProductDefinitionKinematics)& theEnt) const; + + Standard_EXPORT void WriteStep(StepData_StepWriter& theSW, const Handle(StepKinematics_ProductDefinitionKinematics)& theEnt) const; + + Standard_EXPORT void Share(const Handle(StepKinematics_ProductDefinitionKinematics)& theEnt, Interface_EntityIterator& iter) const; + +}; +#endif // _RWStepKinematics_RWProductDefinitionKinematics_HeaderFile_ diff --git a/src/RWStepKinematics/RWStepKinematics_RWProductDefinitionRelationshipKinematics.cxx b/src/RWStepKinematics/RWStepKinematics_RWProductDefinitionRelationshipKinematics.cxx new file mode 100644 index 0000000000..b191df446c --- /dev/null +++ b/src/RWStepKinematics/RWStepKinematics_RWProductDefinitionRelationshipKinematics.cxx @@ -0,0 +1,101 @@ +// Created on : Sat May 02 12:41:15 2020 +// Created by: Irina KRYLOVA +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V3.0 +// Copyright (c) Open CASCADE 2020 +// +// This file is part of Open CASCADE Technology software library. +// +// This library is free software; you can redistribute it and/or modify it under +// the terms of the GNU Lesser General Public License version 2.1 as published +// by the Free Software Foundation, with special exception defined in the file +// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT +// distribution for complete text of the license and disclaimer of any warranty. +// +// Alternatively, this file may be used under the terms of Open CASCADE +// commercial license or contractual agreement. + +#include + +#include +#include +#include +#include +#include +#include + +//======================================================================= +//function : RWStepKinematics_RWProductDefinitionRelationshipKinematics +//purpose : +//======================================================================= +RWStepKinematics_RWProductDefinitionRelationshipKinematics::RWStepKinematics_RWProductDefinitionRelationshipKinematics() {} + + +//======================================================================= +//function : ReadStep +//purpose : +//======================================================================= +void RWStepKinematics_RWProductDefinitionRelationshipKinematics::ReadStep (const Handle(StepData_StepReaderData)& theData, + const Standard_Integer theNum, + Handle(Interface_Check)& theArch, + const Handle(StepKinematics_ProductDefinitionRelationshipKinematics)& theEnt) const +{ + // Check number of parameters + if ( ! theData->CheckNbParams(theNum,3,theArch,"product_definition_relationship_kinematics") ) return; + + // Inherited fields of PropertyDefinition + + Handle(TCollection_HAsciiString) aPropertyDefinition_Name; + theData->ReadString (theNum, 1, "property_definition.name", theArch, aPropertyDefinition_Name); + + Handle(TCollection_HAsciiString) aPropertyDefinition_Description; + Standard_Boolean hasPropertyDefinition_Description = Standard_True; + if ( theData->IsParamDefined (theNum,2) ) { + theData->ReadString (theNum, 2, "property_definition.description", theArch, aPropertyDefinition_Description); + } + else { + hasPropertyDefinition_Description = Standard_False; + aPropertyDefinition_Description.Nullify(); + } + + StepRepr_CharacterizedDefinition aPropertyDefinition_Definition; + theData->ReadEntity (theNum, 3, "property_definition.definition", theArch, aPropertyDefinition_Definition); + + // Initialize entity + theEnt->Init(aPropertyDefinition_Name, + hasPropertyDefinition_Description, + aPropertyDefinition_Description, + aPropertyDefinition_Definition); +} + +//======================================================================= +//function : WriteStep +//purpose : +//======================================================================= +void RWStepKinematics_RWProductDefinitionRelationshipKinematics::WriteStep (StepData_StepWriter& theSW, + const Handle(StepKinematics_ProductDefinitionRelationshipKinematics)& theEnt) const +{ + + // Own fields of PropertyDefinition + + theSW.Send (theEnt->Name()); + + if ( theEnt->HasDescription() ) { + theSW.Send (theEnt->Description()); + } + else theSW.SendUndef(); + + theSW.Send (theEnt->Definition().Value()); +} + +//======================================================================= +//function : Share +//purpose : +//======================================================================= +void RWStepKinematics_RWProductDefinitionRelationshipKinematics::Share (const Handle(StepKinematics_ProductDefinitionRelationshipKinematics)& theEnt, + Interface_EntityIterator& iter) const +{ + + // Inherited fields of PropertyDefinition + + iter.AddItem (theEnt->StepRepr_PropertyDefinition::Definition().Value()); +} diff --git a/src/RWStepKinematics/RWStepKinematics_RWProductDefinitionRelationshipKinematics.hxx b/src/RWStepKinematics/RWStepKinematics_RWProductDefinitionRelationshipKinematics.hxx new file mode 100644 index 0000000000..0fc3a20722 --- /dev/null +++ b/src/RWStepKinematics/RWStepKinematics_RWProductDefinitionRelationshipKinematics.hxx @@ -0,0 +1,46 @@ +// Created on : Sat May 02 12:41:15 2020 +// Created by: Irina KRYLOVA +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V3.0 +// Copyright (c) Open CASCADE 2020 +// +// 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 _RWStepKinematics_RWProductDefinitionRelationshipKinematics_HeaderFile_ +#define _RWStepKinematics_RWProductDefinitionRelationshipKinematics_HeaderFile_ + +#include +#include +#include + +class StepData_StepReaderData; +class Interface_Check; +class StepData_StepWriter; +class Interface_EntityIterator; +class StepKinematics_ProductDefinitionRelationshipKinematics; + +//! Read & Write tool for ProductDefinitionRelationshipKinematics +class RWStepKinematics_RWProductDefinitionRelationshipKinematics +{ +public: + + DEFINE_STANDARD_ALLOC + + Standard_EXPORT RWStepKinematics_RWProductDefinitionRelationshipKinematics(); + + Standard_EXPORT void ReadStep(const Handle(StepData_StepReaderData)& theData, const Standard_Integer theNum, Handle(Interface_Check)& theArch, const Handle(StepKinematics_ProductDefinitionRelationshipKinematics)& theEnt) const; + + Standard_EXPORT void WriteStep(StepData_StepWriter& theSW, const Handle(StepKinematics_ProductDefinitionRelationshipKinematics)& theEnt) const; + + Standard_EXPORT void Share(const Handle(StepKinematics_ProductDefinitionRelationshipKinematics)& theEnt, Interface_EntityIterator& iter) const; + +}; +#endif // _RWStepKinematics_RWProductDefinitionRelationshipKinematics_HeaderFile_ diff --git a/src/RWStepKinematics/RWStepKinematics_RWRackAndPinionPair.cxx b/src/RWStepKinematics/RWStepKinematics_RWRackAndPinionPair.cxx new file mode 100644 index 0000000000..ebbd68bbf9 --- /dev/null +++ b/src/RWStepKinematics/RWStepKinematics_RWRackAndPinionPair.cxx @@ -0,0 +1,150 @@ +// Created on : Sat May 02 12:41:15 2020 +// Created by: Irina KRYLOVA +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V3.0 +// Copyright (c) Open CASCADE 2020 +// +// This file is part of Open CASCADE Technology software library. +// +// This library is free software; you can redistribute it and/or modify it under +// the terms of the GNU Lesser General Public License version 2.1 as published +// by the Free Software Foundation, with special exception defined in the file +// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT +// distribution for complete text of the license and disclaimer of any warranty. +// +// Alternatively, this file may be used under the terms of Open CASCADE +// commercial license or contractual agreement. + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +//======================================================================= +//function : RWStepKinematics_RWRackAndPinionPair +//purpose : +//======================================================================= +RWStepKinematics_RWRackAndPinionPair::RWStepKinematics_RWRackAndPinionPair() {} + + +//======================================================================= +//function : ReadStep +//purpose : +//======================================================================= +void RWStepKinematics_RWRackAndPinionPair::ReadStep (const Handle(StepData_StepReaderData)& theData, + const Standard_Integer theNum, + Handle(Interface_Check)& theArch, + const Handle(StepKinematics_RackAndPinionPair)& theEnt) const +{ + // Check number of parameters + if ( ! theData->CheckNbParams(theNum,7,theArch,"rack_and_pinion_pair") ) return; + + // Inherited fields of RepresentationItem + + Handle(TCollection_HAsciiString) aRepresentationItem_Name; + theData->ReadString (theNum, 1, "representation_item.name", theArch, aRepresentationItem_Name); + + // Inherited fields of ItemDefinedTransformation + + Handle(TCollection_HAsciiString) aItemDefinedTransformation_Name; + theData->ReadString (theNum, 2, "item_defined_transformation.name", theArch, aItemDefinedTransformation_Name); + + Handle(TCollection_HAsciiString) aItemDefinedTransformation_Description; + Standard_Boolean hasItemDefinedTransformation_Description = Standard_True; + if ( theData->IsParamDefined (theNum,3) ) { + theData->ReadString (theNum, 3, "item_defined_transformation.description", theArch, aItemDefinedTransformation_Description); + } + else { + hasItemDefinedTransformation_Description = Standard_False; + aItemDefinedTransformation_Description.Nullify(); + } + + Handle(StepRepr_RepresentationItem) aItemDefinedTransformation_TransformItem1; + theData->ReadEntity (theNum, 4, "item_defined_transformation.transform_item1", theArch, STANDARD_TYPE(StepRepr_RepresentationItem), aItemDefinedTransformation_TransformItem1); + + Handle(StepRepr_RepresentationItem) aItemDefinedTransformation_TransformItem2; + theData->ReadEntity (theNum, 5, "item_defined_transformation.transform_item2", theArch, STANDARD_TYPE(StepRepr_RepresentationItem), aItemDefinedTransformation_TransformItem2); + + // Inherited fields of KinematicPair + + Handle(StepKinematics_KinematicJoint) aKinematicPair_Joint; + theData->ReadEntity (theNum, 6, "kinematic_pair.joint", theArch, STANDARD_TYPE(StepKinematics_KinematicJoint), aKinematicPair_Joint); + + // Own fields of RackAndPinionPair + + Standard_Real aPinionRadius; + theData->ReadReal (theNum, 7, "pinion_radius", theArch, aPinionRadius); + + // Initialize entity + theEnt->Init(aRepresentationItem_Name, + aItemDefinedTransformation_Name, + hasItemDefinedTransformation_Description, + aItemDefinedTransformation_Description, + aItemDefinedTransformation_TransformItem1, + aItemDefinedTransformation_TransformItem2, + aKinematicPair_Joint, + aPinionRadius); +} + +//======================================================================= +//function : WriteStep +//purpose : +//======================================================================= +void RWStepKinematics_RWRackAndPinionPair::WriteStep (StepData_StepWriter& theSW, + const Handle(StepKinematics_RackAndPinionPair)& theEnt) const +{ + + // Own fields of RepresentationItem + + theSW.Send (theEnt->Name()); + + // Inherited fields of ItemDefinedTransformation + + theSW.Send (theEnt->ItemDefinedTransformation()->Name()); + + if ( theEnt->ItemDefinedTransformation()->HasDescription() ) { + theSW.Send (theEnt->ItemDefinedTransformation()->Description()); + } + else theSW.SendUndef(); + + theSW.Send (theEnt->ItemDefinedTransformation()->TransformItem1()); + + theSW.Send (theEnt->ItemDefinedTransformation()->TransformItem2()); + + // Own fields of KinematicPair + + theSW.Send (theEnt->Joint()); + + // Own fields of RackAndPinionPair + + theSW.Send (theEnt->PinionRadius()); +} + +//======================================================================= +//function : Share +//purpose : +//======================================================================= +void RWStepKinematics_RWRackAndPinionPair::Share (const Handle(StepKinematics_RackAndPinionPair)& theEnt, + Interface_EntityIterator& iter) const +{ + + // Inherited fields of RepresentationItem + + // Inherited fields of ItemDefinedTransformation + + iter.AddItem (theEnt->ItemDefinedTransformation()->TransformItem1()); + + iter.AddItem (theEnt->ItemDefinedTransformation()->TransformItem2()); + + // Inherited fields of KinematicPair + + iter.AddItem (theEnt->StepKinematics_KinematicPair::Joint()); + + // Own fields of RackAndPinionPair +} diff --git a/src/RWStepKinematics/RWStepKinematics_RWRackAndPinionPair.hxx b/src/RWStepKinematics/RWStepKinematics_RWRackAndPinionPair.hxx new file mode 100644 index 0000000000..1032ae3701 --- /dev/null +++ b/src/RWStepKinematics/RWStepKinematics_RWRackAndPinionPair.hxx @@ -0,0 +1,46 @@ +// Created on : Sat May 02 12:41:15 2020 +// Created by: Irina KRYLOVA +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V3.0 +// Copyright (c) Open CASCADE 2020 +// +// 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 _RWStepKinematics_RWRackAndPinionPair_HeaderFile_ +#define _RWStepKinematics_RWRackAndPinionPair_HeaderFile_ + +#include +#include +#include + +class StepData_StepReaderData; +class Interface_Check; +class StepData_StepWriter; +class Interface_EntityIterator; +class StepKinematics_RackAndPinionPair; + +//! Read & Write tool for RackAndPinionPair +class RWStepKinematics_RWRackAndPinionPair +{ +public: + + DEFINE_STANDARD_ALLOC + + Standard_EXPORT RWStepKinematics_RWRackAndPinionPair(); + + Standard_EXPORT void ReadStep(const Handle(StepData_StepReaderData)& theData, const Standard_Integer theNum, Handle(Interface_Check)& theArch, const Handle(StepKinematics_RackAndPinionPair)& theEnt) const; + + Standard_EXPORT void WriteStep(StepData_StepWriter& theSW, const Handle(StepKinematics_RackAndPinionPair)& theEnt) const; + + Standard_EXPORT void Share(const Handle(StepKinematics_RackAndPinionPair)& theEnt, Interface_EntityIterator& iter) const; + +}; +#endif // _RWStepKinematics_RWRackAndPinionPair_HeaderFile_ diff --git a/src/RWStepKinematics/RWStepKinematics_RWRackAndPinionPairValue.cxx b/src/RWStepKinematics/RWStepKinematics_RWRackAndPinionPairValue.cxx new file mode 100644 index 0000000000..650d333c57 --- /dev/null +++ b/src/RWStepKinematics/RWStepKinematics_RWRackAndPinionPairValue.cxx @@ -0,0 +1,103 @@ +// Created on : Sat May 02 12:41:15 2020 +// Created by: Irina KRYLOVA +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V3.0 +// Copyright (c) Open CASCADE 2020 +// +// This file is part of Open CASCADE Technology software library. +// +// This library is free software; you can redistribute it and/or modify it under +// the terms of the GNU Lesser General Public License version 2.1 as published +// by the Free Software Foundation, with special exception defined in the file +// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT +// distribution for complete text of the license and disclaimer of any warranty. +// +// Alternatively, this file may be used under the terms of Open CASCADE +// commercial license or contractual agreement. + +#include + +#include +#include +#include +#include +#include +#include +#include + +//======================================================================= +//function : RWStepKinematics_RWRackAndPinionPairValue +//purpose : +//======================================================================= +RWStepKinematics_RWRackAndPinionPairValue::RWStepKinematics_RWRackAndPinionPairValue() {} + + +//======================================================================= +//function : ReadStep +//purpose : +//======================================================================= +void RWStepKinematics_RWRackAndPinionPairValue::ReadStep (const Handle(StepData_StepReaderData)& theData, + const Standard_Integer theNum, + Handle(Interface_Check)& theArch, + const Handle(StepKinematics_RackAndPinionPairValue)& theEnt) const +{ + // Check number of parameters + if ( ! theData->CheckNbParams(theNum,3,theArch,"rack_and_pinion_pair_value") ) return; + + // Inherited fields of RepresentationItem + + Handle(TCollection_HAsciiString) aRepresentationItem_Name; + theData->ReadString (theNum, 1, "representation_item.name", theArch, aRepresentationItem_Name); + + // Inherited fields of PairValue + + Handle(StepKinematics_KinematicPair) aPairValue_AppliesToPair; + theData->ReadEntity (theNum, 2, "pair_value.applies_to_pair", theArch, STANDARD_TYPE(StepKinematics_KinematicPair), aPairValue_AppliesToPair); + + // Own fields of RackAndPinionPairValue + + Standard_Real aActualDisplacement; + theData->ReadReal (theNum, 3, "actual_displacement", theArch, aActualDisplacement); + + // Initialize entity + theEnt->Init(aRepresentationItem_Name, + aPairValue_AppliesToPair, + aActualDisplacement); +} + +//======================================================================= +//function : WriteStep +//purpose : +//======================================================================= +void RWStepKinematics_RWRackAndPinionPairValue::WriteStep (StepData_StepWriter& theSW, + const Handle(StepKinematics_RackAndPinionPairValue)& theEnt) const +{ + + // Own fields of RepresentationItem + + theSW.Send (theEnt->Name()); + + // Own fields of PairValue + + theSW.Send (theEnt->AppliesToPair()); + + // Own fields of RackAndPinionPairValue + + theSW.Send (theEnt->ActualDisplacement()); +} + +//======================================================================= +//function : Share +//purpose : +//======================================================================= +void RWStepKinematics_RWRackAndPinionPairValue::Share (const Handle(StepKinematics_RackAndPinionPairValue)& theEnt, + Interface_EntityIterator& iter) const +{ + + // Inherited fields of RepresentationItem + + // Inherited fields of PairValue + + iter.AddItem (theEnt->StepKinematics_PairValue::AppliesToPair()); + + // Own fields of RackAndPinionPairValue +} diff --git a/src/RWStepKinematics/RWStepKinematics_RWRackAndPinionPairValue.hxx b/src/RWStepKinematics/RWStepKinematics_RWRackAndPinionPairValue.hxx new file mode 100644 index 0000000000..e7cbc804de --- /dev/null +++ b/src/RWStepKinematics/RWStepKinematics_RWRackAndPinionPairValue.hxx @@ -0,0 +1,46 @@ +// Created on : Sat May 02 12:41:15 2020 +// Created by: Irina KRYLOVA +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V3.0 +// Copyright (c) Open CASCADE 2020 +// +// 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 _RWStepKinematics_RWRackAndPinionPairValue_HeaderFile_ +#define _RWStepKinematics_RWRackAndPinionPairValue_HeaderFile_ + +#include +#include +#include + +class StepData_StepReaderData; +class Interface_Check; +class StepData_StepWriter; +class Interface_EntityIterator; +class StepKinematics_RackAndPinionPairValue; + +//! Read & Write tool for RackAndPinionPairValue +class RWStepKinematics_RWRackAndPinionPairValue +{ +public: + + DEFINE_STANDARD_ALLOC + + Standard_EXPORT RWStepKinematics_RWRackAndPinionPairValue(); + + Standard_EXPORT void ReadStep(const Handle(StepData_StepReaderData)& theData, const Standard_Integer theNum, Handle(Interface_Check)& theArch, const Handle(StepKinematics_RackAndPinionPairValue)& theEnt) const; + + Standard_EXPORT void WriteStep(StepData_StepWriter& theSW, const Handle(StepKinematics_RackAndPinionPairValue)& theEnt) const; + + Standard_EXPORT void Share(const Handle(StepKinematics_RackAndPinionPairValue)& theEnt, Interface_EntityIterator& iter) const; + +}; +#endif // _RWStepKinematics_RWRackAndPinionPairValue_HeaderFile_ diff --git a/src/RWStepKinematics/RWStepKinematics_RWRackAndPinionPairWithRange.cxx b/src/RWStepKinematics/RWStepKinematics_RWRackAndPinionPairWithRange.cxx new file mode 100644 index 0000000000..b97d8ba6f6 --- /dev/null +++ b/src/RWStepKinematics/RWStepKinematics_RWRackAndPinionPairWithRange.cxx @@ -0,0 +1,190 @@ +// Created on : Sat May 02 12:41:15 2020 +// Created by: Irina KRYLOVA +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V3.0 +// Copyright (c) Open CASCADE 2020 +// +// This file is part of Open CASCADE Technology software library. +// +// This library is free software; you can redistribute it and/or modify it under +// the terms of the GNU Lesser General Public License version 2.1 as published +// by the Free Software Foundation, with special exception defined in the file +// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT +// distribution for complete text of the license and disclaimer of any warranty. +// +// Alternatively, this file may be used under the terms of Open CASCADE +// commercial license or contractual agreement. + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +//======================================================================= +//function : RWStepKinematics_RWRackAndPinionPairWithRange +//purpose : +//======================================================================= +RWStepKinematics_RWRackAndPinionPairWithRange::RWStepKinematics_RWRackAndPinionPairWithRange() {} + + +//======================================================================= +//function : ReadStep +//purpose : +//======================================================================= +void RWStepKinematics_RWRackAndPinionPairWithRange::ReadStep (const Handle(StepData_StepReaderData)& theData, + const Standard_Integer theNum, + Handle(Interface_Check)& theArch, + const Handle(StepKinematics_RackAndPinionPairWithRange)& theEnt) const +{ + // Check number of parameters + if ( ! theData->CheckNbParams(theNum,9,theArch,"rack_and_pinion_pair_with_range") ) return; + + // Inherited fields of RepresentationItem + + Handle(TCollection_HAsciiString) aRepresentationItem_Name; + theData->ReadString (theNum, 1, "representation_item.name", theArch, aRepresentationItem_Name); + + // Inherited fields of ItemDefinedTransformation + + Handle(TCollection_HAsciiString) aItemDefinedTransformation_Name; + theData->ReadString (theNum, 2, "item_defined_transformation.name", theArch, aItemDefinedTransformation_Name); + + Handle(TCollection_HAsciiString) aItemDefinedTransformation_Description; + Standard_Boolean hasItemDefinedTransformation_Description = Standard_True; + if ( theData->IsParamDefined (theNum,3) ) { + theData->ReadString (theNum, 3, "item_defined_transformation.description", theArch, aItemDefinedTransformation_Description); + } + else { + hasItemDefinedTransformation_Description = Standard_False; + aItemDefinedTransformation_Description.Nullify(); + } + + Handle(StepRepr_RepresentationItem) aItemDefinedTransformation_TransformItem1; + theData->ReadEntity (theNum, 4, "item_defined_transformation.transform_item1", theArch, STANDARD_TYPE(StepRepr_RepresentationItem), aItemDefinedTransformation_TransformItem1); + + Handle(StepRepr_RepresentationItem) aItemDefinedTransformation_TransformItem2; + theData->ReadEntity (theNum, 5, "item_defined_transformation.transform_item2", theArch, STANDARD_TYPE(StepRepr_RepresentationItem), aItemDefinedTransformation_TransformItem2); + + // Inherited fields of KinematicPair + + Handle(StepKinematics_KinematicJoint) aKinematicPair_Joint; + theData->ReadEntity (theNum, 6, "kinematic_pair.joint", theArch, STANDARD_TYPE(StepKinematics_KinematicJoint), aKinematicPair_Joint); + + // Inherited fields of RackAndPinionPair + + Standard_Real aRackAndPinionPair_PinionRadius; + theData->ReadReal (theNum, 7, "rack_and_pinion_pair.pinion_radius", theArch, aRackAndPinionPair_PinionRadius); + + // Own fields of RackAndPinionPairWithRange + + Standard_Real aLowerLimitRackDisplacement; + Standard_Boolean hasLowerLimitRackDisplacement = Standard_True; + if ( theData->IsParamDefined (theNum,8) ) { + theData->ReadReal (theNum, 8, "lower_limit_rack_displacement", theArch, aLowerLimitRackDisplacement); + } + else { + hasLowerLimitRackDisplacement = Standard_False; + aLowerLimitRackDisplacement = 0; + } + + Standard_Real aUpperLimitRackDisplacement; + Standard_Boolean hasUpperLimitRackDisplacement = Standard_True; + if ( theData->IsParamDefined (theNum,9) ) { + theData->ReadReal (theNum, 9, "upper_limit_rack_displacement", theArch, aUpperLimitRackDisplacement); + } + else { + hasUpperLimitRackDisplacement = Standard_False; + aUpperLimitRackDisplacement = 0; + } + + // Initialize entity + theEnt->Init(aRepresentationItem_Name, + aItemDefinedTransformation_Name, + hasItemDefinedTransformation_Description, + aItemDefinedTransformation_Description, + aItemDefinedTransformation_TransformItem1, + aItemDefinedTransformation_TransformItem2, + aKinematicPair_Joint, + aRackAndPinionPair_PinionRadius, + hasLowerLimitRackDisplacement, + aLowerLimitRackDisplacement, + hasUpperLimitRackDisplacement, + aUpperLimitRackDisplacement); +} + +//======================================================================= +//function : WriteStep +//purpose : +//======================================================================= +void RWStepKinematics_RWRackAndPinionPairWithRange::WriteStep (StepData_StepWriter& theSW, + const Handle(StepKinematics_RackAndPinionPairWithRange)& theEnt) const +{ + + // Own fields of RepresentationItem + + theSW.Send (theEnt->Name()); + + // Inherited fields of ItemDefinedTransformation + + theSW.Send (theEnt->ItemDefinedTransformation()->Name()); + + if ( theEnt->ItemDefinedTransformation()->HasDescription() ) { + theSW.Send (theEnt->ItemDefinedTransformation()->Description()); + } + else theSW.SendUndef(); + + theSW.Send (theEnt->ItemDefinedTransformation()->TransformItem1()); + + theSW.Send (theEnt->ItemDefinedTransformation()->TransformItem2()); + + // Own fields of KinematicPair + + theSW.Send (theEnt->Joint()); + + // Own fields of RackAndPinionPair + + theSW.Send (theEnt->PinionRadius()); + + // Own fields of RackAndPinionPairWithRange + + if ( theEnt->HasLowerLimitRackDisplacement() ) { + theSW.Send (theEnt->LowerLimitRackDisplacement()); + } + else theSW.SendUndef(); + + if ( theEnt->HasUpperLimitRackDisplacement() ) { + theSW.Send (theEnt->UpperLimitRackDisplacement()); + } + else theSW.SendUndef(); +} + +//======================================================================= +//function : Share +//purpose : +//======================================================================= +void RWStepKinematics_RWRackAndPinionPairWithRange::Share (const Handle(StepKinematics_RackAndPinionPairWithRange)& theEnt, + Interface_EntityIterator& iter) const +{ + + // Inherited fields of RepresentationItem + + // Inherited fields of ItemDefinedTransformation + + iter.AddItem (theEnt->ItemDefinedTransformation()->TransformItem1()); + + iter.AddItem (theEnt->ItemDefinedTransformation()->TransformItem2()); + + // Inherited fields of KinematicPair + + iter.AddItem (theEnt->StepKinematics_KinematicPair::Joint()); + + // Inherited fields of RackAndPinionPair + + // Own fields of RackAndPinionPairWithRange +} diff --git a/src/RWStepKinematics/RWStepKinematics_RWRackAndPinionPairWithRange.hxx b/src/RWStepKinematics/RWStepKinematics_RWRackAndPinionPairWithRange.hxx new file mode 100644 index 0000000000..5179abfaa4 --- /dev/null +++ b/src/RWStepKinematics/RWStepKinematics_RWRackAndPinionPairWithRange.hxx @@ -0,0 +1,46 @@ +// Created on : Sat May 02 12:41:15 2020 +// Created by: Irina KRYLOVA +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V3.0 +// Copyright (c) Open CASCADE 2020 +// +// 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 _RWStepKinematics_RWRackAndPinionPairWithRange_HeaderFile_ +#define _RWStepKinematics_RWRackAndPinionPairWithRange_HeaderFile_ + +#include +#include +#include + +class StepData_StepReaderData; +class Interface_Check; +class StepData_StepWriter; +class Interface_EntityIterator; +class StepKinematics_RackAndPinionPairWithRange; + +//! Read & Write tool for RackAndPinionPairWithRange +class RWStepKinematics_RWRackAndPinionPairWithRange +{ +public: + + DEFINE_STANDARD_ALLOC + + Standard_EXPORT RWStepKinematics_RWRackAndPinionPairWithRange(); + + Standard_EXPORT void ReadStep(const Handle(StepData_StepReaderData)& theData, const Standard_Integer theNum, Handle(Interface_Check)& theArch, const Handle(StepKinematics_RackAndPinionPairWithRange)& theEnt) const; + + Standard_EXPORT void WriteStep(StepData_StepWriter& theSW, const Handle(StepKinematics_RackAndPinionPairWithRange)& theEnt) const; + + Standard_EXPORT void Share(const Handle(StepKinematics_RackAndPinionPairWithRange)& theEnt, Interface_EntityIterator& iter) const; + +}; +#endif // _RWStepKinematics_RWRackAndPinionPairWithRange_HeaderFile_ diff --git a/src/RWStepKinematics/RWStepKinematics_RWRevolutePair.cxx b/src/RWStepKinematics/RWStepKinematics_RWRevolutePair.cxx new file mode 100644 index 0000000000..5b5686c251 --- /dev/null +++ b/src/RWStepKinematics/RWStepKinematics_RWRevolutePair.cxx @@ -0,0 +1,180 @@ +// Created on : Sat May 02 12:41:15 2020 +// Created by: Irina KRYLOVA +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V3.0 +// Copyright (c) Open CASCADE 2020 +// +// This file is part of Open CASCADE Technology software library. +// +// This library is free software; you can redistribute it and/or modify it under +// the terms of the GNU Lesser General Public License version 2.1 as published +// by the Free Software Foundation, with special exception defined in the file +// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT +// distribution for complete text of the license and disclaimer of any warranty. +// +// Alternatively, this file may be used under the terms of Open CASCADE +// commercial license or contractual agreement. + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +//======================================================================= +//function : RWStepKinematics_RWRevolutePair +//purpose : +//======================================================================= +RWStepKinematics_RWRevolutePair::RWStepKinematics_RWRevolutePair() {} + + +//======================================================================= +//function : ReadStep +//purpose : +//======================================================================= +void RWStepKinematics_RWRevolutePair::ReadStep (const Handle(StepData_StepReaderData)& theData, + const Standard_Integer theNum, + Handle(Interface_Check)& theArch, + const Handle(StepKinematics_RevolutePair)& theEnt) const +{ + // Check number of parameters + if ( ! theData->CheckNbParams(theNum,12,theArch,"revolute_pair") ) return; + + // Inherited fields of RepresentationItem + + Handle(TCollection_HAsciiString) aRepresentationItem_Name; + theData->ReadString (theNum, 1, "representation_item.name", theArch, aRepresentationItem_Name); + + // Inherited fields of ItemDefinedTransformation + + Handle(TCollection_HAsciiString) aItemDefinedTransformation_Name; + theData->ReadString (theNum, 2, "item_defined_transformation.name", theArch, aItemDefinedTransformation_Name); + + Handle(TCollection_HAsciiString) aItemDefinedTransformation_Description; + Standard_Boolean hasItemDefinedTransformation_Description = Standard_True; + if ( theData->IsParamDefined (theNum,3) ) { + theData->ReadString (theNum, 3, "item_defined_transformation.description", theArch, aItemDefinedTransformation_Description); + } + else { + hasItemDefinedTransformation_Description = Standard_False; + aItemDefinedTransformation_Description.Nullify(); + } + + Handle(StepRepr_RepresentationItem) aItemDefinedTransformation_TransformItem1; + theData->ReadEntity (theNum, 4, "item_defined_transformation.transform_item1", theArch, STANDARD_TYPE(StepRepr_RepresentationItem), aItemDefinedTransformation_TransformItem1); + + Handle(StepRepr_RepresentationItem) aItemDefinedTransformation_TransformItem2; + theData->ReadEntity (theNum, 5, "item_defined_transformation.transform_item2", theArch, STANDARD_TYPE(StepRepr_RepresentationItem), aItemDefinedTransformation_TransformItem2); + + // Inherited fields of KinematicPair + + Handle(StepKinematics_KinematicJoint) aKinematicPair_Joint; + theData->ReadEntity (theNum, 6, "kinematic_pair.joint", theArch, STANDARD_TYPE(StepKinematics_KinematicJoint), aKinematicPair_Joint); + + // Inherited fields of LowOrderKinematicPair + + Standard_Boolean aLowOrderKinematicPair_TX; + theData->ReadBoolean (theNum, 7, "low_order_kinematic_pair.t_x", theArch, aLowOrderKinematicPair_TX); + + Standard_Boolean aLowOrderKinematicPair_TY; + theData->ReadBoolean (theNum, 8, "low_order_kinematic_pair.t_y", theArch, aLowOrderKinematicPair_TY); + + Standard_Boolean aLowOrderKinematicPair_TZ; + theData->ReadBoolean (theNum, 9, "low_order_kinematic_pair.t_z", theArch, aLowOrderKinematicPair_TZ); + + Standard_Boolean aLowOrderKinematicPair_RX; + theData->ReadBoolean (theNum, 10, "low_order_kinematic_pair.r_x", theArch, aLowOrderKinematicPair_RX); + + Standard_Boolean aLowOrderKinematicPair_RY; + theData->ReadBoolean (theNum, 11, "low_order_kinematic_pair.r_y", theArch, aLowOrderKinematicPair_RY); + + Standard_Boolean aLowOrderKinematicPair_RZ; + theData->ReadBoolean (theNum, 12, "low_order_kinematic_pair.r_z", theArch, aLowOrderKinematicPair_RZ); + + // Initialize entity + theEnt->Init(aRepresentationItem_Name, + aItemDefinedTransformation_Name, + hasItemDefinedTransformation_Description, + aItemDefinedTransformation_Description, + aItemDefinedTransformation_TransformItem1, + aItemDefinedTransformation_TransformItem2, + aKinematicPair_Joint, + aLowOrderKinematicPair_TX, + aLowOrderKinematicPair_TY, + aLowOrderKinematicPair_TZ, + aLowOrderKinematicPair_RX, + aLowOrderKinematicPair_RY, + aLowOrderKinematicPair_RZ); +} + +//======================================================================= +//function : WriteStep +//purpose : +//======================================================================= +void RWStepKinematics_RWRevolutePair::WriteStep (StepData_StepWriter& theSW, + const Handle(StepKinematics_RevolutePair)& theEnt) const +{ + + // Own fields of RepresentationItem + + theSW.Send (theEnt->Name()); + + // Inherited fields of ItemDefinedTransformation + + theSW.Send (theEnt->ItemDefinedTransformation()->Name()); + + if ( theEnt->ItemDefinedTransformation()->HasDescription() ) { + theSW.Send (theEnt->ItemDefinedTransformation()->Description()); + } + else theSW.SendUndef(); + + theSW.Send (theEnt->ItemDefinedTransformation()->TransformItem1()); + + theSW.Send (theEnt->ItemDefinedTransformation()->TransformItem2()); + + // Own fields of KinematicPair + + theSW.Send (theEnt->Joint()); + + // Own fields of LowOrderKinematicPair + + theSW.SendBoolean (theEnt->TX()); + + theSW.SendBoolean (theEnt->TY()); + + theSW.SendBoolean (theEnt->TZ()); + + theSW.SendBoolean (theEnt->RX()); + + theSW.SendBoolean (theEnt->RY()); + + theSW.SendBoolean (theEnt->RZ()); +} + +//======================================================================= +//function : Share +//purpose : +//======================================================================= +void RWStepKinematics_RWRevolutePair::Share (const Handle(StepKinematics_RevolutePair)& theEnt, + Interface_EntityIterator& iter) const +{ + + // Inherited fields of RepresentationItem + + // Inherited fields of ItemDefinedTransformation + + iter.AddItem (theEnt->ItemDefinedTransformation()->TransformItem1()); + + iter.AddItem (theEnt->ItemDefinedTransformation()->TransformItem2()); + + // Inherited fields of KinematicPair + + iter.AddItem (theEnt->StepKinematics_KinematicPair::Joint()); + + // Inherited fields of LowOrderKinematicPair +} diff --git a/src/RWStepKinematics/RWStepKinematics_RWRevolutePair.hxx b/src/RWStepKinematics/RWStepKinematics_RWRevolutePair.hxx new file mode 100644 index 0000000000..b4b3d40037 --- /dev/null +++ b/src/RWStepKinematics/RWStepKinematics_RWRevolutePair.hxx @@ -0,0 +1,46 @@ +// Created on : Sat May 02 12:41:15 2020 +// Created by: Irina KRYLOVA +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V3.0 +// Copyright (c) Open CASCADE 2020 +// +// 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 _RWStepKinematics_RWRevolutePair_HeaderFile_ +#define _RWStepKinematics_RWRevolutePair_HeaderFile_ + +#include +#include +#include + +class StepData_StepReaderData; +class Interface_Check; +class StepData_StepWriter; +class Interface_EntityIterator; +class StepKinematics_RevolutePair; + +//! Read & Write tool for RevolutePair +class RWStepKinematics_RWRevolutePair +{ +public: + + DEFINE_STANDARD_ALLOC + + Standard_EXPORT RWStepKinematics_RWRevolutePair(); + + Standard_EXPORT void ReadStep(const Handle(StepData_StepReaderData)& theData, const Standard_Integer theNum, Handle(Interface_Check)& theArch, const Handle(StepKinematics_RevolutePair)& theEnt) const; + + Standard_EXPORT void WriteStep(StepData_StepWriter& theSW, const Handle(StepKinematics_RevolutePair)& theEnt) const; + + Standard_EXPORT void Share(const Handle(StepKinematics_RevolutePair)& theEnt, Interface_EntityIterator& iter) const; + +}; +#endif // _RWStepKinematics_RWRevolutePair_HeaderFile_ diff --git a/src/RWStepKinematics/RWStepKinematics_RWRevolutePairValue.cxx b/src/RWStepKinematics/RWStepKinematics_RWRevolutePairValue.cxx new file mode 100644 index 0000000000..98ae04859b --- /dev/null +++ b/src/RWStepKinematics/RWStepKinematics_RWRevolutePairValue.cxx @@ -0,0 +1,103 @@ +// Created on : Sat May 02 12:41:15 2020 +// Created by: Irina KRYLOVA +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V3.0 +// Copyright (c) Open CASCADE 2020 +// +// This file is part of Open CASCADE Technology software library. +// +// This library is free software; you can redistribute it and/or modify it under +// the terms of the GNU Lesser General Public License version 2.1 as published +// by the Free Software Foundation, with special exception defined in the file +// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT +// distribution for complete text of the license and disclaimer of any warranty. +// +// Alternatively, this file may be used under the terms of Open CASCADE +// commercial license or contractual agreement. + +#include + +#include +#include +#include +#include +#include +#include +#include + +//======================================================================= +//function : RWStepKinematics_RWRevolutePairValue +//purpose : +//======================================================================= +RWStepKinematics_RWRevolutePairValue::RWStepKinematics_RWRevolutePairValue() {} + + +//======================================================================= +//function : ReadStep +//purpose : +//======================================================================= +void RWStepKinematics_RWRevolutePairValue::ReadStep (const Handle(StepData_StepReaderData)& theData, + const Standard_Integer theNum, + Handle(Interface_Check)& theArch, + const Handle(StepKinematics_RevolutePairValue)& theEnt) const +{ + // Check number of parameters + if ( ! theData->CheckNbParams(theNum,3,theArch,"revolute_pair_value") ) return; + + // Inherited fields of RepresentationItem + + Handle(TCollection_HAsciiString) aRepresentationItem_Name; + theData->ReadString (theNum, 1, "representation_item.name", theArch, aRepresentationItem_Name); + + // Inherited fields of PairValue + + Handle(StepKinematics_KinematicPair) aPairValue_AppliesToPair; + theData->ReadEntity (theNum, 2, "pair_value.applies_to_pair", theArch, STANDARD_TYPE(StepKinematics_KinematicPair), aPairValue_AppliesToPair); + + // Own fields of RevolutePairValue + + Standard_Real aActualRotation; + theData->ReadReal (theNum, 3, "actual_rotation", theArch, aActualRotation); + + // Initialize entity + theEnt->Init(aRepresentationItem_Name, + aPairValue_AppliesToPair, + aActualRotation); +} + +//======================================================================= +//function : WriteStep +//purpose : +//======================================================================= +void RWStepKinematics_RWRevolutePairValue::WriteStep (StepData_StepWriter& theSW, + const Handle(StepKinematics_RevolutePairValue)& theEnt) const +{ + + // Own fields of RepresentationItem + + theSW.Send (theEnt->Name()); + + // Own fields of PairValue + + theSW.Send (theEnt->AppliesToPair()); + + // Own fields of RevolutePairValue + + theSW.Send (theEnt->ActualRotation()); +} + +//======================================================================= +//function : Share +//purpose : +//======================================================================= +void RWStepKinematics_RWRevolutePairValue::Share (const Handle(StepKinematics_RevolutePairValue)& theEnt, + Interface_EntityIterator& iter) const +{ + + // Inherited fields of RepresentationItem + + // Inherited fields of PairValue + + iter.AddItem (theEnt->StepKinematics_PairValue::AppliesToPair()); + + // Own fields of RevolutePairValue +} diff --git a/src/RWStepKinematics/RWStepKinematics_RWRevolutePairValue.hxx b/src/RWStepKinematics/RWStepKinematics_RWRevolutePairValue.hxx new file mode 100644 index 0000000000..eb38224ca6 --- /dev/null +++ b/src/RWStepKinematics/RWStepKinematics_RWRevolutePairValue.hxx @@ -0,0 +1,46 @@ +// Created on : Sat May 02 12:41:15 2020 +// Created by: Irina KRYLOVA +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V3.0 +// Copyright (c) Open CASCADE 2020 +// +// 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 _RWStepKinematics_RWRevolutePairValue_HeaderFile_ +#define _RWStepKinematics_RWRevolutePairValue_HeaderFile_ + +#include +#include +#include + +class StepData_StepReaderData; +class Interface_Check; +class StepData_StepWriter; +class Interface_EntityIterator; +class StepKinematics_RevolutePairValue; + +//! Read & Write tool for RevolutePairValue +class RWStepKinematics_RWRevolutePairValue +{ +public: + + DEFINE_STANDARD_ALLOC + + Standard_EXPORT RWStepKinematics_RWRevolutePairValue(); + + Standard_EXPORT void ReadStep(const Handle(StepData_StepReaderData)& theData, const Standard_Integer theNum, Handle(Interface_Check)& theArch, const Handle(StepKinematics_RevolutePairValue)& theEnt) const; + + Standard_EXPORT void WriteStep(StepData_StepWriter& theSW, const Handle(StepKinematics_RevolutePairValue)& theEnt) const; + + Standard_EXPORT void Share(const Handle(StepKinematics_RevolutePairValue)& theEnt, Interface_EntityIterator& iter) const; + +}; +#endif // _RWStepKinematics_RWRevolutePairValue_HeaderFile_ diff --git a/src/RWStepKinematics/RWStepKinematics_RWRevolutePairWithRange.cxx b/src/RWStepKinematics/RWStepKinematics_RWRevolutePairWithRange.cxx new file mode 100644 index 0000000000..6113928edd --- /dev/null +++ b/src/RWStepKinematics/RWStepKinematics_RWRevolutePairWithRange.cxx @@ -0,0 +1,221 @@ +// Created on : Sat May 02 12:41:15 2020 +// Created by: Irina KRYLOVA +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V3.0 +// Copyright (c) Open CASCADE 2020 +// +// This file is part of Open CASCADE Technology software library. +// +// This library is free software; you can redistribute it and/or modify it under +// the terms of the GNU Lesser General Public License version 2.1 as published +// by the Free Software Foundation, with special exception defined in the file +// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT +// distribution for complete text of the license and disclaimer of any warranty. +// +// Alternatively, this file may be used under the terms of Open CASCADE +// commercial license or contractual agreement. + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +//======================================================================= +//function : RWStepKinematics_RWRevolutePairWithRange +//purpose : +//======================================================================= +RWStepKinematics_RWRevolutePairWithRange::RWStepKinematics_RWRevolutePairWithRange() {} + + +//======================================================================= +//function : ReadStep +//purpose : +//======================================================================= +void RWStepKinematics_RWRevolutePairWithRange::ReadStep (const Handle(StepData_StepReaderData)& theData, + const Standard_Integer theNum, + Handle(Interface_Check)& theArch, + const Handle(StepKinematics_RevolutePairWithRange)& theEnt) const +{ + // Check number of parameters + if ( ! theData->CheckNbParams(theNum,14,theArch,"revolute_pair_with_range") ) return; + + // Inherited fields of RepresentationItem + + Handle(TCollection_HAsciiString) aRepresentationItem_Name; + theData->ReadString (theNum, 1, "representation_item.name", theArch, aRepresentationItem_Name); + + // Inherited fields of ItemDefinedTransformation + + Handle(TCollection_HAsciiString) aItemDefinedTransformation_Name; + theData->ReadString (theNum, 2, "item_defined_transformation.name", theArch, aItemDefinedTransformation_Name); + + Handle(TCollection_HAsciiString) aItemDefinedTransformation_Description; + Standard_Boolean hasItemDefinedTransformation_Description = Standard_True; + if ( theData->IsParamDefined (theNum,3) ) { + theData->ReadString (theNum, 3, "item_defined_transformation.description", theArch, aItemDefinedTransformation_Description); + } + else { + hasItemDefinedTransformation_Description = Standard_False; + aItemDefinedTransformation_Description.Nullify(); + } + + Handle(StepRepr_RepresentationItem) aItemDefinedTransformation_TransformItem1; + theData->ReadEntity (theNum, 4, "item_defined_transformation.transform_item1", theArch, STANDARD_TYPE(StepRepr_RepresentationItem), aItemDefinedTransformation_TransformItem1); + + Handle(StepRepr_RepresentationItem) aItemDefinedTransformation_TransformItem2; + theData->ReadEntity (theNum, 5, "item_defined_transformation.transform_item2", theArch, STANDARD_TYPE(StepRepr_RepresentationItem), aItemDefinedTransformation_TransformItem2); + + // Inherited fields of KinematicPair + + Handle(StepKinematics_KinematicJoint) aKinematicPair_Joint; + theData->ReadEntity (theNum, 6, "kinematic_pair.joint", theArch, STANDARD_TYPE(StepKinematics_KinematicJoint), aKinematicPair_Joint); + + // Inherited fields of LowOrderKinematicPair + + Standard_Boolean aLowOrderKinematicPair_TX; + theData->ReadBoolean (theNum, 7, "low_order_kinematic_pair.t_x", theArch, aLowOrderKinematicPair_TX); + + Standard_Boolean aLowOrderKinematicPair_TY; + theData->ReadBoolean (theNum, 8, "low_order_kinematic_pair.t_y", theArch, aLowOrderKinematicPair_TY); + + Standard_Boolean aLowOrderKinematicPair_TZ; + theData->ReadBoolean (theNum, 9, "low_order_kinematic_pair.t_z", theArch, aLowOrderKinematicPair_TZ); + + Standard_Boolean aLowOrderKinematicPair_RX; + theData->ReadBoolean (theNum, 10, "low_order_kinematic_pair.r_x", theArch, aLowOrderKinematicPair_RX); + + Standard_Boolean aLowOrderKinematicPair_RY; + theData->ReadBoolean (theNum, 11, "low_order_kinematic_pair.r_y", theArch, aLowOrderKinematicPair_RY); + + Standard_Boolean aLowOrderKinematicPair_RZ; + theData->ReadBoolean (theNum, 12, "low_order_kinematic_pair.r_z", theArch, aLowOrderKinematicPair_RZ); + + // Own fields of RevolutePairWithRange + + Standard_Real aLowerLimitActualRotation; + Standard_Boolean hasLowerLimitActualRotation = Standard_True; + if ( theData->IsParamDefined (theNum,13) ) { + theData->ReadReal (theNum, 13, "lower_limit_actual_rotation", theArch, aLowerLimitActualRotation); + } + else { + hasLowerLimitActualRotation = Standard_False; + aLowerLimitActualRotation = 0; + } + + Standard_Real aUpperLimitActualRotation; + Standard_Boolean hasUpperLimitActualRotation = Standard_True; + if ( theData->IsParamDefined (theNum,14) ) { + theData->ReadReal (theNum, 14, "upper_limit_actual_rotation", theArch, aUpperLimitActualRotation); + } + else { + hasUpperLimitActualRotation = Standard_False; + aUpperLimitActualRotation = 0; + } + + // Initialize entity + theEnt->Init(aRepresentationItem_Name, + aItemDefinedTransformation_Name, + hasItemDefinedTransformation_Description, + aItemDefinedTransformation_Description, + aItemDefinedTransformation_TransformItem1, + aItemDefinedTransformation_TransformItem2, + aKinematicPair_Joint, + aLowOrderKinematicPair_TX, + aLowOrderKinematicPair_TY, + aLowOrderKinematicPair_TZ, + aLowOrderKinematicPair_RX, + aLowOrderKinematicPair_RY, + aLowOrderKinematicPair_RZ, + hasLowerLimitActualRotation, + aLowerLimitActualRotation, + hasUpperLimitActualRotation, + aUpperLimitActualRotation); +} + +//======================================================================= +//function : WriteStep +//purpose : +//======================================================================= +void RWStepKinematics_RWRevolutePairWithRange::WriteStep (StepData_StepWriter& theSW, + const Handle(StepKinematics_RevolutePairWithRange)& theEnt) const +{ + + // Own fields of RepresentationItem + + theSW.Send (theEnt->Name()); + + // Inherited fields of ItemDefinedTransformation + + theSW.Send (theEnt->ItemDefinedTransformation()->Name()); + + if ( theEnt->ItemDefinedTransformation()->HasDescription() ) { + theSW.Send (theEnt->ItemDefinedTransformation()->Description()); + } + else theSW.SendUndef(); + + theSW.Send (theEnt->ItemDefinedTransformation()->TransformItem1()); + + theSW.Send (theEnt->ItemDefinedTransformation()->TransformItem2()); + + // Own fields of KinematicPair + + theSW.Send (theEnt->Joint()); + + // Own fields of LowOrderKinematicPair + + theSW.SendBoolean (theEnt->TX()); + + theSW.SendBoolean (theEnt->TY()); + + theSW.SendBoolean (theEnt->TZ()); + + theSW.SendBoolean (theEnt->RX()); + + theSW.SendBoolean (theEnt->RY()); + + theSW.SendBoolean (theEnt->RZ()); + + // Own fields of RevolutePairWithRange + + if ( theEnt->HasLowerLimitActualRotation() ) { + theSW.Send (theEnt->LowerLimitActualRotation()); + } + else theSW.SendUndef(); + + if ( theEnt->HasUpperLimitActualRotation() ) { + theSW.Send (theEnt->UpperLimitActualRotation()); + } + else theSW.SendUndef(); +} + +//======================================================================= +//function : Share +//purpose : +//======================================================================= +void RWStepKinematics_RWRevolutePairWithRange::Share (const Handle(StepKinematics_RevolutePairWithRange)& theEnt, + Interface_EntityIterator& iter) const +{ + + // Inherited fields of RepresentationItem + + // Inherited fields of ItemDefinedTransformation + + iter.AddItem (theEnt->ItemDefinedTransformation()->TransformItem1()); + + iter.AddItem (theEnt->ItemDefinedTransformation()->TransformItem2()); + + // Inherited fields of KinematicPair + + iter.AddItem (theEnt->StepKinematics_KinematicPair::Joint()); + + // Inherited fields of LowOrderKinematicPair + + // Own fields of RevolutePairWithRange +} diff --git a/src/RWStepKinematics/RWStepKinematics_RWRevolutePairWithRange.hxx b/src/RWStepKinematics/RWStepKinematics_RWRevolutePairWithRange.hxx new file mode 100644 index 0000000000..d594494186 --- /dev/null +++ b/src/RWStepKinematics/RWStepKinematics_RWRevolutePairWithRange.hxx @@ -0,0 +1,46 @@ +// Created on : Sat May 02 12:41:15 2020 +// Created by: Irina KRYLOVA +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V3.0 +// Copyright (c) Open CASCADE 2020 +// +// 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 _RWStepKinematics_RWRevolutePairWithRange_HeaderFile_ +#define _RWStepKinematics_RWRevolutePairWithRange_HeaderFile_ + +#include +#include +#include + +class StepData_StepReaderData; +class Interface_Check; +class StepData_StepWriter; +class Interface_EntityIterator; +class StepKinematics_RevolutePairWithRange; + +//! Read & Write tool for RevolutePairWithRange +class RWStepKinematics_RWRevolutePairWithRange +{ +public: + + DEFINE_STANDARD_ALLOC + + Standard_EXPORT RWStepKinematics_RWRevolutePairWithRange(); + + Standard_EXPORT void ReadStep(const Handle(StepData_StepReaderData)& theData, const Standard_Integer theNum, Handle(Interface_Check)& theArch, const Handle(StepKinematics_RevolutePairWithRange)& theEnt) const; + + Standard_EXPORT void WriteStep(StepData_StepWriter& theSW, const Handle(StepKinematics_RevolutePairWithRange)& theEnt) const; + + Standard_EXPORT void Share(const Handle(StepKinematics_RevolutePairWithRange)& theEnt, Interface_EntityIterator& iter) const; + +}; +#endif // _RWStepKinematics_RWRevolutePairWithRange_HeaderFile_ diff --git a/src/RWStepKinematics/RWStepKinematics_RWRigidLinkRepresentation.cxx b/src/RWStepKinematics/RWStepKinematics_RWRigidLinkRepresentation.cxx new file mode 100644 index 0000000000..3b486573f9 --- /dev/null +++ b/src/RWStepKinematics/RWStepKinematics_RWRigidLinkRepresentation.cxx @@ -0,0 +1,127 @@ +// Created on : Sat May 02 12:41:15 2020 +// Created by: Irina KRYLOVA +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V3.0 +// Copyright (c) Open CASCADE 2020 +// +// This file is part of Open CASCADE Technology software library. +// +// This library is free software; you can redistribute it and/or modify it under +// the terms of the GNU Lesser General Public License version 2.1 as published +// by the Free Software Foundation, with special exception defined in the file +// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT +// distribution for complete text of the license and disclaimer of any warranty. +// +// Alternatively, this file may be used under the terms of Open CASCADE +// commercial license or contractual agreement. + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +//======================================================================= +//function : RWStepKinematics_RWRigidLinkRepresentation +//purpose : +//======================================================================= +RWStepKinematics_RWRigidLinkRepresentation::RWStepKinematics_RWRigidLinkRepresentation() {} + + +//======================================================================= +//function : ReadStep +//purpose : +//======================================================================= +void RWStepKinematics_RWRigidLinkRepresentation::ReadStep (const Handle(StepData_StepReaderData)& theData, + const Standard_Integer theNum, + Handle(Interface_Check)& theArch, + const Handle(StepKinematics_RigidLinkRepresentation)& theEnt) const +{ + // Check number of parameters + if ( ! theData->CheckNbParams(theNum,4,theArch,"rigid_link_representation") ) return; + + // Inherited fields of Representation + + Handle(TCollection_HAsciiString) aRepresentation_Name; + theData->ReadString (theNum, 1, "representation.name", theArch, aRepresentation_Name); + + Handle(StepRepr_HArray1OfRepresentationItem) aRepresentation_Items; + Standard_Integer sub2 = 0; + if ( theData->ReadSubList (theNum, 2, "representation.items", theArch, sub2) ) { + Standard_Integer nb0 = theData->NbParams(sub2); + aRepresentation_Items = new StepRepr_HArray1OfRepresentationItem (1, nb0); + Standard_Integer num2 = sub2; + for ( Standard_Integer i0=1; i0 <= nb0; i0++ ) { + Handle(StepRepr_RepresentationItem) anIt0; + theData->ReadEntity (num2, i0, "representation_item", theArch, STANDARD_TYPE(StepRepr_RepresentationItem), anIt0); + aRepresentation_Items->SetValue(i0, anIt0); + } + } + + Handle(StepRepr_RepresentationContext) aRepresentation_ContextOfItems; + theData->ReadEntity (theNum, 3, "representation.context_of_items", theArch, STANDARD_TYPE(StepRepr_RepresentationContext), aRepresentation_ContextOfItems); + + // Inherited fields of KinematicLinkRepresentation + + Handle(StepKinematics_KinematicLink) aKinematicLinkRepresentation_RepresentedLink; + theData->ReadEntity (theNum, 4, "kinematic_link_representation.represented_link", theArch, STANDARD_TYPE(StepKinematics_KinematicLink), aKinematicLinkRepresentation_RepresentedLink); + + // Initialize entity + theEnt->Init(aRepresentation_Name, + aRepresentation_Items, + aRepresentation_ContextOfItems, + aKinematicLinkRepresentation_RepresentedLink); +} + +//======================================================================= +//function : WriteStep +//purpose : +//======================================================================= +void RWStepKinematics_RWRigidLinkRepresentation::WriteStep (StepData_StepWriter& theSW, + const Handle(StepKinematics_RigidLinkRepresentation)& theEnt) const +{ + + // Own fields of Representation + + theSW.Send (theEnt->Name()); + + theSW.OpenSub(); + for (Standard_Integer i1=1; i1 <= theEnt->Items()->Length(); i1++ ) { + Handle(StepRepr_RepresentationItem) Var0 = theEnt->Items()->Value(i1); + theSW.Send (Var0); + } + theSW.CloseSub(); + + theSW.Send (theEnt->ContextOfItems()); + + // Own fields of KinematicLinkRepresentation + + theSW.Send (theEnt->RepresentedLink()); +} + +//======================================================================= +//function : Share +//purpose : +//======================================================================= +void RWStepKinematics_RWRigidLinkRepresentation::Share (const Handle(StepKinematics_RigidLinkRepresentation)& theEnt, + Interface_EntityIterator& iter) const +{ + + // Inherited fields of Representation + + for (Standard_Integer i1=1; i1 <= theEnt->StepRepr_Representation::Items()->Length(); i1++ ) { + Handle(StepRepr_RepresentationItem) Var0 = theEnt->StepRepr_Representation::Items()->Value(i1); + iter.AddItem (Var0); + } + + iter.AddItem (theEnt->StepRepr_Representation::ContextOfItems()); + + // Inherited fields of KinematicLinkRepresentation + + iter.AddItem (theEnt->StepKinematics_KinematicLinkRepresentation::RepresentedLink()); +} diff --git a/src/RWStepKinematics/RWStepKinematics_RWRigidLinkRepresentation.hxx b/src/RWStepKinematics/RWStepKinematics_RWRigidLinkRepresentation.hxx new file mode 100644 index 0000000000..0f95af72b0 --- /dev/null +++ b/src/RWStepKinematics/RWStepKinematics_RWRigidLinkRepresentation.hxx @@ -0,0 +1,46 @@ +// Created on : Sat May 02 12:41:15 2020 +// Created by: Irina KRYLOVA +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V3.0 +// Copyright (c) Open CASCADE 2020 +// +// 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 _RWStepKinematics_RWRigidLinkRepresentation_HeaderFile_ +#define _RWStepKinematics_RWRigidLinkRepresentation_HeaderFile_ + +#include +#include +#include + +class StepData_StepReaderData; +class Interface_Check; +class StepData_StepWriter; +class Interface_EntityIterator; +class StepKinematics_RigidLinkRepresentation; + +//! Read & Write tool for RigidLinkRepresentation +class RWStepKinematics_RWRigidLinkRepresentation +{ +public: + + DEFINE_STANDARD_ALLOC + + Standard_EXPORT RWStepKinematics_RWRigidLinkRepresentation(); + + Standard_EXPORT void ReadStep(const Handle(StepData_StepReaderData)& theData, const Standard_Integer theNum, Handle(Interface_Check)& theArch, const Handle(StepKinematics_RigidLinkRepresentation)& theEnt) const; + + Standard_EXPORT void WriteStep(StepData_StepWriter& theSW, const Handle(StepKinematics_RigidLinkRepresentation)& theEnt) const; + + Standard_EXPORT void Share(const Handle(StepKinematics_RigidLinkRepresentation)& theEnt, Interface_EntityIterator& iter) const; + +}; +#endif // _RWStepKinematics_RWRigidLinkRepresentation_HeaderFile_ diff --git a/src/RWStepKinematics/RWStepKinematics_RWRollingCurvePair.cxx b/src/RWStepKinematics/RWStepKinematics_RWRollingCurvePair.cxx new file mode 100644 index 0000000000..aaec07c51d --- /dev/null +++ b/src/RWStepKinematics/RWStepKinematics_RWRollingCurvePair.cxx @@ -0,0 +1,167 @@ +// Created on : Sat May 02 12:41:16 2020 +// Created by: Irina KRYLOVA +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V3.0 +// Copyright (c) Open CASCADE 2020 +// +// This file is part of Open CASCADE Technology software library. +// +// This library is free software; you can redistribute it and/or modify it under +// the terms of the GNU Lesser General Public License version 2.1 as published +// by the Free Software Foundation, with special exception defined in the file +// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT +// distribution for complete text of the license and disclaimer of any warranty. +// +// Alternatively, this file may be used under the terms of Open CASCADE +// commercial license or contractual agreement. + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +//======================================================================= +//function : RWStepKinematics_RWRollingCurvePair +//purpose : +//======================================================================= +RWStepKinematics_RWRollingCurvePair::RWStepKinematics_RWRollingCurvePair() {} + + +//======================================================================= +//function : ReadStep +//purpose : +//======================================================================= +void RWStepKinematics_RWRollingCurvePair::ReadStep (const Handle(StepData_StepReaderData)& theData, + const Standard_Integer theNum, + Handle(Interface_Check)& theArch, + const Handle(StepKinematics_RollingCurvePair)& theEnt) const +{ + // Check number of parameters + if ( ! theData->CheckNbParams(theNum,9,theArch,"rolling_curve_pair") ) return; + + // Inherited fields of RepresentationItem + + Handle(TCollection_HAsciiString) aRepresentationItem_Name; + theData->ReadString (theNum, 1, "representation_item.name", theArch, aRepresentationItem_Name); + + // Inherited fields of ItemDefinedTransformation + + Handle(TCollection_HAsciiString) aItemDefinedTransformation_Name; + theData->ReadString (theNum, 2, "item_defined_transformation.name", theArch, aItemDefinedTransformation_Name); + + Handle(TCollection_HAsciiString) aItemDefinedTransformation_Description; + Standard_Boolean hasItemDefinedTransformation_Description = Standard_True; + if ( theData->IsParamDefined (theNum,3) ) { + theData->ReadString (theNum, 3, "item_defined_transformation.description", theArch, aItemDefinedTransformation_Description); + } + else { + hasItemDefinedTransformation_Description = Standard_False; + aItemDefinedTransformation_Description.Nullify(); + } + + Handle(StepRepr_RepresentationItem) aItemDefinedTransformation_TransformItem1; + theData->ReadEntity (theNum, 4, "item_defined_transformation.transform_item1", theArch, STANDARD_TYPE(StepRepr_RepresentationItem), aItemDefinedTransformation_TransformItem1); + + Handle(StepRepr_RepresentationItem) aItemDefinedTransformation_TransformItem2; + theData->ReadEntity (theNum, 5, "item_defined_transformation.transform_item2", theArch, STANDARD_TYPE(StepRepr_RepresentationItem), aItemDefinedTransformation_TransformItem2); + + // Inherited fields of KinematicPair + + Handle(StepKinematics_KinematicJoint) aKinematicPair_Joint; + theData->ReadEntity (theNum, 6, "kinematic_pair.joint", theArch, STANDARD_TYPE(StepKinematics_KinematicJoint), aKinematicPair_Joint); + + // Inherited fields of PlanarCurvePair + + Handle(StepGeom_Curve) aPlanarCurvePair_Curve1; + theData->ReadEntity (theNum, 7, "planar_curve_pair.curve1", theArch, STANDARD_TYPE(StepGeom_Curve), aPlanarCurvePair_Curve1); + + Handle(StepGeom_Curve) aPlanarCurvePair_Curve2; + theData->ReadEntity (theNum, 8, "planar_curve_pair.curve2", theArch, STANDARD_TYPE(StepGeom_Curve), aPlanarCurvePair_Curve2); + + Standard_Boolean aPlanarCurvePair_Orientation; + theData->ReadBoolean (theNum, 9, "planar_curve_pair.orientation", theArch, aPlanarCurvePair_Orientation); + + // Initialize entity + theEnt->Init(aRepresentationItem_Name, + aItemDefinedTransformation_Name, + hasItemDefinedTransformation_Description, + aItemDefinedTransformation_Description, + aItemDefinedTransformation_TransformItem1, + aItemDefinedTransformation_TransformItem2, + aKinematicPair_Joint, + aPlanarCurvePair_Curve1, + aPlanarCurvePair_Curve2, + aPlanarCurvePair_Orientation); +} + +//======================================================================= +//function : WriteStep +//purpose : +//======================================================================= +void RWStepKinematics_RWRollingCurvePair::WriteStep (StepData_StepWriter& theSW, + const Handle(StepKinematics_RollingCurvePair)& theEnt) const +{ + + // Own fields of RepresentationItem + + theSW.Send (theEnt->Name()); + + // Inherited fields of ItemDefinedTransformation + + theSW.Send (theEnt->ItemDefinedTransformation()->Name()); + + if ( theEnt->ItemDefinedTransformation()->HasDescription() ) { + theSW.Send (theEnt->ItemDefinedTransformation()->Description()); + } + else theSW.SendUndef(); + + theSW.Send (theEnt->ItemDefinedTransformation()->TransformItem1()); + + theSW.Send (theEnt->ItemDefinedTransformation()->TransformItem2()); + + // Own fields of KinematicPair + + theSW.Send (theEnt->Joint()); + + // Own fields of PlanarCurvePair + + theSW.Send (theEnt->Curve1()); + + theSW.Send (theEnt->Curve2()); + + theSW.SendBoolean (theEnt->Orientation()); +} + +//======================================================================= +//function : Share +//purpose : +//======================================================================= +void RWStepKinematics_RWRollingCurvePair::Share (const Handle(StepKinematics_RollingCurvePair)& theEnt, + Interface_EntityIterator& iter) const +{ + + // Inherited fields of RepresentationItem + + // Inherited fields of ItemDefinedTransformation + + iter.AddItem (theEnt->ItemDefinedTransformation()->TransformItem1()); + + iter.AddItem (theEnt->ItemDefinedTransformation()->TransformItem2()); + + // Inherited fields of KinematicPair + + iter.AddItem (theEnt->StepKinematics_KinematicPair::Joint()); + + // Inherited fields of PlanarCurvePair + + iter.AddItem (theEnt->StepKinematics_PlanarCurvePair::Curve1()); + + iter.AddItem (theEnt->StepKinematics_PlanarCurvePair::Curve2()); +} diff --git a/src/RWStepKinematics/RWStepKinematics_RWRollingCurvePair.hxx b/src/RWStepKinematics/RWStepKinematics_RWRollingCurvePair.hxx new file mode 100644 index 0000000000..6b4e6c1597 --- /dev/null +++ b/src/RWStepKinematics/RWStepKinematics_RWRollingCurvePair.hxx @@ -0,0 +1,46 @@ +// Created on : Sat May 02 12:41:16 2020 +// Created by: Irina KRYLOVA +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V3.0 +// Copyright (c) Open CASCADE 2020 +// +// 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 _RWStepKinematics_RWRollingCurvePair_HeaderFile_ +#define _RWStepKinematics_RWRollingCurvePair_HeaderFile_ + +#include +#include +#include + +class StepData_StepReaderData; +class Interface_Check; +class StepData_StepWriter; +class Interface_EntityIterator; +class StepKinematics_RollingCurvePair; + +//! Read & Write tool for RollingCurvePair +class RWStepKinematics_RWRollingCurvePair +{ +public: + + DEFINE_STANDARD_ALLOC + + Standard_EXPORT RWStepKinematics_RWRollingCurvePair(); + + Standard_EXPORT void ReadStep(const Handle(StepData_StepReaderData)& theData, const Standard_Integer theNum, Handle(Interface_Check)& theArch, const Handle(StepKinematics_RollingCurvePair)& theEnt) const; + + Standard_EXPORT void WriteStep(StepData_StepWriter& theSW, const Handle(StepKinematics_RollingCurvePair)& theEnt) const; + + Standard_EXPORT void Share(const Handle(StepKinematics_RollingCurvePair)& theEnt, Interface_EntityIterator& iter) const; + +}; +#endif // _RWStepKinematics_RWRollingCurvePair_HeaderFile_ diff --git a/src/RWStepKinematics/RWStepKinematics_RWRollingCurvePairValue.cxx b/src/RWStepKinematics/RWStepKinematics_RWRollingCurvePairValue.cxx new file mode 100644 index 0000000000..b608d04469 --- /dev/null +++ b/src/RWStepKinematics/RWStepKinematics_RWRollingCurvePairValue.cxx @@ -0,0 +1,105 @@ +// Created on : Sat May 02 12:41:16 2020 +// Created by: Irina KRYLOVA +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V3.0 +// Copyright (c) Open CASCADE 2020 +// +// This file is part of Open CASCADE Technology software library. +// +// This library is free software; you can redistribute it and/or modify it under +// the terms of the GNU Lesser General Public License version 2.1 as published +// by the Free Software Foundation, with special exception defined in the file +// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT +// distribution for complete text of the license and disclaimer of any warranty. +// +// Alternatively, this file may be used under the terms of Open CASCADE +// commercial license or contractual agreement. + +#include + +#include +#include +#include +#include +#include +#include +#include + +//======================================================================= +//function : RWStepKinematics_RWRollingCurvePairValue +//purpose : +//======================================================================= +RWStepKinematics_RWRollingCurvePairValue::RWStepKinematics_RWRollingCurvePairValue() {} + + +//======================================================================= +//function : ReadStep +//purpose : +//======================================================================= +void RWStepKinematics_RWRollingCurvePairValue::ReadStep (const Handle(StepData_StepReaderData)& theData, + const Standard_Integer theNum, + Handle(Interface_Check)& theArch, + const Handle(StepKinematics_RollingCurvePairValue)& theEnt) const +{ + // Check number of parameters + if ( ! theData->CheckNbParams(theNum,3,theArch,"rolling_curve_pair_value") ) return; + + // Inherited fields of RepresentationItem + + Handle(TCollection_HAsciiString) aRepresentationItem_Name; + theData->ReadString (theNum, 1, "representation_item.name", theArch, aRepresentationItem_Name); + + // Inherited fields of PairValue + + Handle(StepKinematics_KinematicPair) aPairValue_AppliesToPair; + theData->ReadEntity (theNum, 2, "pair_value.applies_to_pair", theArch, STANDARD_TYPE(StepKinematics_KinematicPair), aPairValue_AppliesToPair); + + // Own fields of RollingCurvePairValue + + Handle(StepGeom_PointOnCurve) aActualPointOnCurve1; + theData->ReadEntity (theNum, 3, "actual_point_on_curve1", theArch, STANDARD_TYPE(StepGeom_PointOnCurve), aActualPointOnCurve1); + + // Initialize entity + theEnt->Init(aRepresentationItem_Name, + aPairValue_AppliesToPair, + aActualPointOnCurve1); +} + +//======================================================================= +//function : WriteStep +//purpose : +//======================================================================= +void RWStepKinematics_RWRollingCurvePairValue::WriteStep (StepData_StepWriter& theSW, + const Handle(StepKinematics_RollingCurvePairValue)& theEnt) const +{ + + // Own fields of RepresentationItem + + theSW.Send (theEnt->Name()); + + // Own fields of PairValue + + theSW.Send (theEnt->AppliesToPair()); + + // Own fields of RollingCurvePairValue + + theSW.Send (theEnt->ActualPointOnCurve1()); +} + +//======================================================================= +//function : Share +//purpose : +//======================================================================= +void RWStepKinematics_RWRollingCurvePairValue::Share (const Handle(StepKinematics_RollingCurvePairValue)& theEnt, + Interface_EntityIterator& iter) const +{ + + // Inherited fields of RepresentationItem + + // Inherited fields of PairValue + + iter.AddItem (theEnt->StepKinematics_PairValue::AppliesToPair()); + + // Own fields of RollingCurvePairValue + + iter.AddItem (theEnt->ActualPointOnCurve1()); +} diff --git a/src/RWStepKinematics/RWStepKinematics_RWRollingCurvePairValue.hxx b/src/RWStepKinematics/RWStepKinematics_RWRollingCurvePairValue.hxx new file mode 100644 index 0000000000..9ec3e53661 --- /dev/null +++ b/src/RWStepKinematics/RWStepKinematics_RWRollingCurvePairValue.hxx @@ -0,0 +1,46 @@ +// Created on : Sat May 02 12:41:16 2020 +// Created by: Irina KRYLOVA +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V3.0 +// Copyright (c) Open CASCADE 2020 +// +// 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 _RWStepKinematics_RWRollingCurvePairValue_HeaderFile_ +#define _RWStepKinematics_RWRollingCurvePairValue_HeaderFile_ + +#include +#include +#include + +class StepData_StepReaderData; +class Interface_Check; +class StepData_StepWriter; +class Interface_EntityIterator; +class StepKinematics_RollingCurvePairValue; + +//! Read & Write tool for RollingCurvePairValue +class RWStepKinematics_RWRollingCurvePairValue +{ +public: + + DEFINE_STANDARD_ALLOC + + Standard_EXPORT RWStepKinematics_RWRollingCurvePairValue(); + + Standard_EXPORT void ReadStep(const Handle(StepData_StepReaderData)& theData, const Standard_Integer theNum, Handle(Interface_Check)& theArch, const Handle(StepKinematics_RollingCurvePairValue)& theEnt) const; + + Standard_EXPORT void WriteStep(StepData_StepWriter& theSW, const Handle(StepKinematics_RollingCurvePairValue)& theEnt) const; + + Standard_EXPORT void Share(const Handle(StepKinematics_RollingCurvePairValue)& theEnt, Interface_EntityIterator& iter) const; + +}; +#endif // _RWStepKinematics_RWRollingCurvePairValue_HeaderFile_ diff --git a/src/RWStepKinematics/RWStepKinematics_RWRollingSurfacePair.cxx b/src/RWStepKinematics/RWStepKinematics_RWRollingSurfacePair.cxx new file mode 100644 index 0000000000..5bf922c282 --- /dev/null +++ b/src/RWStepKinematics/RWStepKinematics_RWRollingSurfacePair.cxx @@ -0,0 +1,167 @@ +// Created on : Sat May 02 12:41:16 2020 +// Created by: Irina KRYLOVA +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V3.0 +// Copyright (c) Open CASCADE 2020 +// +// This file is part of Open CASCADE Technology software library. +// +// This library is free software; you can redistribute it and/or modify it under +// the terms of the GNU Lesser General Public License version 2.1 as published +// by the Free Software Foundation, with special exception defined in the file +// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT +// distribution for complete text of the license and disclaimer of any warranty. +// +// Alternatively, this file may be used under the terms of Open CASCADE +// commercial license or contractual agreement. + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +//======================================================================= +//function : RWStepKinematics_RWRollingSurfacePair +//purpose : +//======================================================================= +RWStepKinematics_RWRollingSurfacePair::RWStepKinematics_RWRollingSurfacePair() {} + + +//======================================================================= +//function : ReadStep +//purpose : +//======================================================================= +void RWStepKinematics_RWRollingSurfacePair::ReadStep (const Handle(StepData_StepReaderData)& theData, + const Standard_Integer theNum, + Handle(Interface_Check)& theArch, + const Handle(StepKinematics_RollingSurfacePair)& theEnt) const +{ + // Check number of parameters + if ( ! theData->CheckNbParams(theNum,9,theArch,"rolling_surface_pair") ) return; + + // Inherited fields of RepresentationItem + + Handle(TCollection_HAsciiString) aRepresentationItem_Name; + theData->ReadString (theNum, 1, "representation_item.name", theArch, aRepresentationItem_Name); + + // Inherited fields of ItemDefinedTransformation + + Handle(TCollection_HAsciiString) aItemDefinedTransformation_Name; + theData->ReadString (theNum, 2, "item_defined_transformation.name", theArch, aItemDefinedTransformation_Name); + + Handle(TCollection_HAsciiString) aItemDefinedTransformation_Description; + Standard_Boolean hasItemDefinedTransformation_Description = Standard_True; + if ( theData->IsParamDefined (theNum,3) ) { + theData->ReadString (theNum, 3, "item_defined_transformation.description", theArch, aItemDefinedTransformation_Description); + } + else { + hasItemDefinedTransformation_Description = Standard_False; + aItemDefinedTransformation_Description.Nullify(); + } + + Handle(StepRepr_RepresentationItem) aItemDefinedTransformation_TransformItem1; + theData->ReadEntity (theNum, 4, "item_defined_transformation.transform_item1", theArch, STANDARD_TYPE(StepRepr_RepresentationItem), aItemDefinedTransformation_TransformItem1); + + Handle(StepRepr_RepresentationItem) aItemDefinedTransformation_TransformItem2; + theData->ReadEntity (theNum, 5, "item_defined_transformation.transform_item2", theArch, STANDARD_TYPE(StepRepr_RepresentationItem), aItemDefinedTransformation_TransformItem2); + + // Inherited fields of KinematicPair + + Handle(StepKinematics_KinematicJoint) aKinematicPair_Joint; + theData->ReadEntity (theNum, 6, "kinematic_pair.joint", theArch, STANDARD_TYPE(StepKinematics_KinematicJoint), aKinematicPair_Joint); + + // Inherited fields of SurfacePair + + Handle(StepGeom_Surface) aSurfacePair_Surface1; + theData->ReadEntity (theNum, 7, "surface_pair.surface1", theArch, STANDARD_TYPE(StepGeom_Surface), aSurfacePair_Surface1); + + Handle(StepGeom_Surface) aSurfacePair_Surface2; + theData->ReadEntity (theNum, 8, "surface_pair.surface2", theArch, STANDARD_TYPE(StepGeom_Surface), aSurfacePair_Surface2); + + Standard_Boolean aSurfacePair_Orientation; + theData->ReadBoolean (theNum, 9, "surface_pair.orientation", theArch, aSurfacePair_Orientation); + + // Initialize entity + theEnt->Init(aRepresentationItem_Name, + aItemDefinedTransformation_Name, + hasItemDefinedTransformation_Description, + aItemDefinedTransformation_Description, + aItemDefinedTransformation_TransformItem1, + aItemDefinedTransformation_TransformItem2, + aKinematicPair_Joint, + aSurfacePair_Surface1, + aSurfacePair_Surface2, + aSurfacePair_Orientation); +} + +//======================================================================= +//function : WriteStep +//purpose : +//======================================================================= +void RWStepKinematics_RWRollingSurfacePair::WriteStep (StepData_StepWriter& theSW, + const Handle(StepKinematics_RollingSurfacePair)& theEnt) const +{ + + // Own fields of RepresentationItem + + theSW.Send (theEnt->Name()); + + // Inherited fields of ItemDefinedTransformation + + theSW.Send (theEnt->ItemDefinedTransformation()->Name()); + + if ( theEnt->ItemDefinedTransformation()->HasDescription() ) { + theSW.Send (theEnt->ItemDefinedTransformation()->Description()); + } + else theSW.SendUndef(); + + theSW.Send (theEnt->ItemDefinedTransformation()->TransformItem1()); + + theSW.Send (theEnt->ItemDefinedTransformation()->TransformItem2()); + + // Own fields of KinematicPair + + theSW.Send (theEnt->Joint()); + + // Own fields of SurfacePair + + theSW.Send (theEnt->Surface1()); + + theSW.Send (theEnt->Surface2()); + + theSW.SendBoolean (theEnt->Orientation()); +} + +//======================================================================= +//function : Share +//purpose : +//======================================================================= +void RWStepKinematics_RWRollingSurfacePair::Share (const Handle(StepKinematics_RollingSurfacePair)& theEnt, + Interface_EntityIterator& iter) const +{ + + // Inherited fields of RepresentationItem + + // Inherited fields of ItemDefinedTransformation + + iter.AddItem (theEnt->ItemDefinedTransformation()->TransformItem1()); + + iter.AddItem (theEnt->ItemDefinedTransformation()->TransformItem2()); + + // Inherited fields of KinematicPair + + iter.AddItem (theEnt->StepKinematics_KinematicPair::Joint()); + + // Inherited fields of SurfacePair + + iter.AddItem (theEnt->StepKinematics_SurfacePair::Surface1()); + + iter.AddItem (theEnt->StepKinematics_SurfacePair::Surface2()); +} diff --git a/src/RWStepKinematics/RWStepKinematics_RWRollingSurfacePair.hxx b/src/RWStepKinematics/RWStepKinematics_RWRollingSurfacePair.hxx new file mode 100644 index 0000000000..491eda205b --- /dev/null +++ b/src/RWStepKinematics/RWStepKinematics_RWRollingSurfacePair.hxx @@ -0,0 +1,46 @@ +// Created on : Sat May 02 12:41:16 2020 +// Created by: Irina KRYLOVA +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V3.0 +// Copyright (c) Open CASCADE 2020 +// +// 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 _RWStepKinematics_RWRollingSurfacePair_HeaderFile_ +#define _RWStepKinematics_RWRollingSurfacePair_HeaderFile_ + +#include +#include +#include + +class StepData_StepReaderData; +class Interface_Check; +class StepData_StepWriter; +class Interface_EntityIterator; +class StepKinematics_RollingSurfacePair; + +//! Read & Write tool for RollingSurfacePair +class RWStepKinematics_RWRollingSurfacePair +{ +public: + + DEFINE_STANDARD_ALLOC + + Standard_EXPORT RWStepKinematics_RWRollingSurfacePair(); + + Standard_EXPORT void ReadStep(const Handle(StepData_StepReaderData)& theData, const Standard_Integer theNum, Handle(Interface_Check)& theArch, const Handle(StepKinematics_RollingSurfacePair)& theEnt) const; + + Standard_EXPORT void WriteStep(StepData_StepWriter& theSW, const Handle(StepKinematics_RollingSurfacePair)& theEnt) const; + + Standard_EXPORT void Share(const Handle(StepKinematics_RollingSurfacePair)& theEnt, Interface_EntityIterator& iter) const; + +}; +#endif // _RWStepKinematics_RWRollingSurfacePair_HeaderFile_ diff --git a/src/RWStepKinematics/RWStepKinematics_RWRollingSurfacePairValue.cxx b/src/RWStepKinematics/RWStepKinematics_RWRollingSurfacePairValue.cxx new file mode 100644 index 0000000000..78851c7ee8 --- /dev/null +++ b/src/RWStepKinematics/RWStepKinematics_RWRollingSurfacePairValue.cxx @@ -0,0 +1,112 @@ +// Created on : Sat May 02 12:41:16 2020 +// Created by: Irina KRYLOVA +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V3.0 +// Copyright (c) Open CASCADE 2020 +// +// This file is part of Open CASCADE Technology software library. +// +// This library is free software; you can redistribute it and/or modify it under +// the terms of the GNU Lesser General Public License version 2.1 as published +// by the Free Software Foundation, with special exception defined in the file +// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT +// distribution for complete text of the license and disclaimer of any warranty. +// +// Alternatively, this file may be used under the terms of Open CASCADE +// commercial license or contractual agreement. + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +//======================================================================= +//function : RWStepKinematics_RWRollingSurfacePairValue +//purpose : +//======================================================================= +RWStepKinematics_RWRollingSurfacePairValue::RWStepKinematics_RWRollingSurfacePairValue() {} + + +//======================================================================= +//function : ReadStep +//purpose : +//======================================================================= +void RWStepKinematics_RWRollingSurfacePairValue::ReadStep (const Handle(StepData_StepReaderData)& theData, + const Standard_Integer theNum, + Handle(Interface_Check)& theArch, + const Handle(StepKinematics_RollingSurfacePairValue)& theEnt) const +{ + // Check number of parameters + if ( ! theData->CheckNbParams(theNum,4,theArch,"rolling_surface_pair_value") ) return; + + // Inherited fields of RepresentationItem + + Handle(TCollection_HAsciiString) aRepresentationItem_Name; + theData->ReadString (theNum, 1, "representation_item.name", theArch, aRepresentationItem_Name); + + // Inherited fields of PairValue + + Handle(StepKinematics_KinematicPair) aPairValue_AppliesToPair; + theData->ReadEntity (theNum, 2, "pair_value.applies_to_pair", theArch, STANDARD_TYPE(StepKinematics_KinematicPair), aPairValue_AppliesToPair); + + // Own fields of RollingSurfacePairValue + + Handle(StepGeom_PointOnSurface) aActualPointOnSurface; + theData->ReadEntity (theNum, 3, "actual_point_on_surface", theArch, STANDARD_TYPE(StepGeom_PointOnSurface), aActualPointOnSurface); + + Standard_Real aActualRotation; + theData->ReadReal (theNum, 4, "actual_rotation", theArch, aActualRotation); + + // Initialize entity + theEnt->Init(aRepresentationItem_Name, + aPairValue_AppliesToPair, + aActualPointOnSurface, + aActualRotation); +} + +//======================================================================= +//function : WriteStep +//purpose : +//======================================================================= +void RWStepKinematics_RWRollingSurfacePairValue::WriteStep (StepData_StepWriter& theSW, + const Handle(StepKinematics_RollingSurfacePairValue)& theEnt) const +{ + + // Own fields of RepresentationItem + + theSW.Send (theEnt->Name()); + + // Own fields of PairValue + + theSW.Send (theEnt->AppliesToPair()); + + // Own fields of RollingSurfacePairValue + + theSW.Send (theEnt->ActualPointOnSurface()); + + theSW.Send (theEnt->ActualRotation()); +} + +//======================================================================= +//function : Share +//purpose : +//======================================================================= +void RWStepKinematics_RWRollingSurfacePairValue::Share (const Handle(StepKinematics_RollingSurfacePairValue)& theEnt, + Interface_EntityIterator& iter) const +{ + + // Inherited fields of RepresentationItem + + // Inherited fields of PairValue + + iter.AddItem (theEnt->StepKinematics_PairValue::AppliesToPair()); + + // Own fields of RollingSurfacePairValue + + iter.AddItem (theEnt->ActualPointOnSurface()); +} diff --git a/src/RWStepKinematics/RWStepKinematics_RWRollingSurfacePairValue.hxx b/src/RWStepKinematics/RWStepKinematics_RWRollingSurfacePairValue.hxx new file mode 100644 index 0000000000..5ae75477ad --- /dev/null +++ b/src/RWStepKinematics/RWStepKinematics_RWRollingSurfacePairValue.hxx @@ -0,0 +1,46 @@ +// Created on : Sat May 02 12:41:16 2020 +// Created by: Irina KRYLOVA +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V3.0 +// Copyright (c) Open CASCADE 2020 +// +// 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 _RWStepKinematics_RWRollingSurfacePairValue_HeaderFile_ +#define _RWStepKinematics_RWRollingSurfacePairValue_HeaderFile_ + +#include +#include +#include + +class StepData_StepReaderData; +class Interface_Check; +class StepData_StepWriter; +class Interface_EntityIterator; +class StepKinematics_RollingSurfacePairValue; + +//! Read & Write tool for RollingSurfacePairValue +class RWStepKinematics_RWRollingSurfacePairValue +{ +public: + + DEFINE_STANDARD_ALLOC + + Standard_EXPORT RWStepKinematics_RWRollingSurfacePairValue(); + + Standard_EXPORT void ReadStep(const Handle(StepData_StepReaderData)& theData, const Standard_Integer theNum, Handle(Interface_Check)& theArch, const Handle(StepKinematics_RollingSurfacePairValue)& theEnt) const; + + Standard_EXPORT void WriteStep(StepData_StepWriter& theSW, const Handle(StepKinematics_RollingSurfacePairValue)& theEnt) const; + + Standard_EXPORT void Share(const Handle(StepKinematics_RollingSurfacePairValue)& theEnt, Interface_EntityIterator& iter) const; + +}; +#endif // _RWStepKinematics_RWRollingSurfacePairValue_HeaderFile_ diff --git a/src/RWStepKinematics/RWStepKinematics_RWRotationAboutDirection.cxx b/src/RWStepKinematics/RWStepKinematics_RWRotationAboutDirection.cxx new file mode 100644 index 0000000000..65f3109391 --- /dev/null +++ b/src/RWStepKinematics/RWStepKinematics_RWRotationAboutDirection.cxx @@ -0,0 +1,97 @@ +// Created on : Sat May 02 12:41:14 2020 +// Created by: Irina KRYLOVA +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V3.0 +// Copyright (c) Open CASCADE 2020 +// +// This file is part of Open CASCADE Technology software library. +// +// This library is free software; you can redistribute it and/or modify it under +// the terms of the GNU Lesser General Public License version 2.1 as published +// by the Free Software Foundation, with special exception defined in the file +// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT +// distribution for complete text of the license and disclaimer of any warranty. +// +// Alternatively, this file may be used under the terms of Open CASCADE +// commercial license or contractual agreement. + +#include + +#include +#include +#include +#include +#include +#include +#include + +//======================================================================= +//function : RWStepKinematics_RWRotationAboutDirection +//purpose : +//======================================================================= +RWStepKinematics_RWRotationAboutDirection::RWStepKinematics_RWRotationAboutDirection() {} + + +//======================================================================= +//function : ReadStep +//purpose : +//======================================================================= +void RWStepKinematics_RWRotationAboutDirection::ReadStep (const Handle(StepData_StepReaderData)& theData, + const Standard_Integer theNum, + Handle(Interface_Check)& theArch, + const Handle(StepKinematics_RotationAboutDirection)& theEnt) const +{ + // Check number of parameters + if ( ! theData->CheckNbParams(theNum,3,theArch,"rotation_about_direction") ) return; + + // Inherited fields of RepresentationItem + + Handle(TCollection_HAsciiString) aRepresentationItem_Name; + theData->ReadString (theNum, 1, "representation_item.name", theArch, aRepresentationItem_Name); + + // Own fields of RotationAboutDirection + + Handle(StepGeom_Direction) aDirectionOfAxis; + theData->ReadEntity (theNum, 2, "direction_of_axis", theArch, STANDARD_TYPE(StepGeom_Direction), aDirectionOfAxis); + + Standard_Real aRotationAngle; + theData->ReadReal (theNum, 3, "rotation_angle", theArch, aRotationAngle); + + // Initialize entity + theEnt->Init(aRepresentationItem_Name, + aDirectionOfAxis, + aRotationAngle); +} + +//======================================================================= +//function : WriteStep +//purpose : +//======================================================================= +void RWStepKinematics_RWRotationAboutDirection::WriteStep (StepData_StepWriter& theSW, + const Handle(StepKinematics_RotationAboutDirection)& theEnt) const +{ + + // Own fields of RepresentationItem + + theSW.Send (theEnt->Name()); + + // Own fields of RotationAboutDirection + + theSW.Send (theEnt->DirectionOfAxis()); + + theSW.Send (theEnt->RotationAngle()); +} + +//======================================================================= +//function : Share +//purpose : +//======================================================================= +void RWStepKinematics_RWRotationAboutDirection::Share (const Handle(StepKinematics_RotationAboutDirection)& theEnt, + Interface_EntityIterator& iter) const +{ + + // Inherited fields of RepresentationItem + + // Own fields of RotationAboutDirection + + iter.AddItem (theEnt->DirectionOfAxis()); +} diff --git a/src/RWStepKinematics/RWStepKinematics_RWRotationAboutDirection.hxx b/src/RWStepKinematics/RWStepKinematics_RWRotationAboutDirection.hxx new file mode 100644 index 0000000000..32e35d6490 --- /dev/null +++ b/src/RWStepKinematics/RWStepKinematics_RWRotationAboutDirection.hxx @@ -0,0 +1,46 @@ +// Created on : Sat May 02 12:41:14 2020 +// Created by: Irina KRYLOVA +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V3.0 +// Copyright (c) Open CASCADE 2020 +// +// 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 _RWStepKinematics_RWRotationAboutDirection_HeaderFile_ +#define _RWStepKinematics_RWRotationAboutDirection_HeaderFile_ + +#include +#include +#include + +class StepData_StepReaderData; +class Interface_Check; +class StepData_StepWriter; +class Interface_EntityIterator; +class StepKinematics_RotationAboutDirection; + +//! Read & Write tool for RotationAboutDirection +class RWStepKinematics_RWRotationAboutDirection +{ +public: + + DEFINE_STANDARD_ALLOC + + Standard_EXPORT RWStepKinematics_RWRotationAboutDirection(); + + Standard_EXPORT void ReadStep(const Handle(StepData_StepReaderData)& theData, const Standard_Integer theNum, Handle(Interface_Check)& theArch, const Handle(StepKinematics_RotationAboutDirection)& theEnt) const; + + Standard_EXPORT void WriteStep(StepData_StepWriter& theSW, const Handle(StepKinematics_RotationAboutDirection)& theEnt) const; + + Standard_EXPORT void Share(const Handle(StepKinematics_RotationAboutDirection)& theEnt, Interface_EntityIterator& iter) const; + +}; +#endif // _RWStepKinematics_RWRotationAboutDirection_HeaderFile_ diff --git a/src/RWStepKinematics/RWStepKinematics_RWScrewPair.cxx b/src/RWStepKinematics/RWStepKinematics_RWScrewPair.cxx new file mode 100644 index 0000000000..3bed0f9004 --- /dev/null +++ b/src/RWStepKinematics/RWStepKinematics_RWScrewPair.cxx @@ -0,0 +1,150 @@ +// Created on : Sat May 02 12:41:16 2020 +// Created by: Irina KRYLOVA +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V3.0 +// Copyright (c) Open CASCADE 2020 +// +// This file is part of Open CASCADE Technology software library. +// +// This library is free software; you can redistribute it and/or modify it under +// the terms of the GNU Lesser General Public License version 2.1 as published +// by the Free Software Foundation, with special exception defined in the file +// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT +// distribution for complete text of the license and disclaimer of any warranty. +// +// Alternatively, this file may be used under the terms of Open CASCADE +// commercial license or contractual agreement. + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +//======================================================================= +//function : RWStepKinematics_RWScrewPair +//purpose : +//======================================================================= +RWStepKinematics_RWScrewPair::RWStepKinematics_RWScrewPair() {} + + +//======================================================================= +//function : ReadStep +//purpose : +//======================================================================= +void RWStepKinematics_RWScrewPair::ReadStep (const Handle(StepData_StepReaderData)& theData, + const Standard_Integer theNum, + Handle(Interface_Check)& theArch, + const Handle(StepKinematics_ScrewPair)& theEnt) const +{ + // Check number of parameters + if ( ! theData->CheckNbParams(theNum,7,theArch,"screw_pair") ) return; + + // Inherited fields of RepresentationItem + + Handle(TCollection_HAsciiString) aRepresentationItem_Name; + theData->ReadString (theNum, 1, "representation_item.name", theArch, aRepresentationItem_Name); + + // Inherited fields of ItemDefinedTransformation + + Handle(TCollection_HAsciiString) aItemDefinedTransformation_Name; + theData->ReadString (theNum, 2, "item_defined_transformation.name", theArch, aItemDefinedTransformation_Name); + + Handle(TCollection_HAsciiString) aItemDefinedTransformation_Description; + Standard_Boolean hasItemDefinedTransformation_Description = Standard_True; + if ( theData->IsParamDefined (theNum,3) ) { + theData->ReadString (theNum, 3, "item_defined_transformation.description", theArch, aItemDefinedTransformation_Description); + } + else { + hasItemDefinedTransformation_Description = Standard_False; + aItemDefinedTransformation_Description.Nullify(); + } + + Handle(StepRepr_RepresentationItem) aItemDefinedTransformation_TransformItem1; + theData->ReadEntity (theNum, 4, "item_defined_transformation.transform_item1", theArch, STANDARD_TYPE(StepRepr_RepresentationItem), aItemDefinedTransformation_TransformItem1); + + Handle(StepRepr_RepresentationItem) aItemDefinedTransformation_TransformItem2; + theData->ReadEntity (theNum, 5, "item_defined_transformation.transform_item2", theArch, STANDARD_TYPE(StepRepr_RepresentationItem), aItemDefinedTransformation_TransformItem2); + + // Inherited fields of KinematicPair + + Handle(StepKinematics_KinematicJoint) aKinematicPair_Joint; + theData->ReadEntity (theNum, 6, "kinematic_pair.joint", theArch, STANDARD_TYPE(StepKinematics_KinematicJoint), aKinematicPair_Joint); + + // Own fields of ScrewPair + + Standard_Real aPitch; + theData->ReadReal (theNum, 7, "pitch", theArch, aPitch); + + // Initialize entity + theEnt->Init(aRepresentationItem_Name, + aItemDefinedTransformation_Name, + hasItemDefinedTransformation_Description, + aItemDefinedTransformation_Description, + aItemDefinedTransformation_TransformItem1, + aItemDefinedTransformation_TransformItem2, + aKinematicPair_Joint, + aPitch); +} + +//======================================================================= +//function : WriteStep +//purpose : +//======================================================================= +void RWStepKinematics_RWScrewPair::WriteStep (StepData_StepWriter& theSW, + const Handle(StepKinematics_ScrewPair)& theEnt) const +{ + + // Own fields of RepresentationItem + + theSW.Send (theEnt->Name()); + + // Inherited fields of ItemDefinedTransformation + + theSW.Send (theEnt->ItemDefinedTransformation()->Name()); + + if ( theEnt->ItemDefinedTransformation()->HasDescription() ) { + theSW.Send (theEnt->ItemDefinedTransformation()->Description()); + } + else theSW.SendUndef(); + + theSW.Send (theEnt->ItemDefinedTransformation()->TransformItem1()); + + theSW.Send (theEnt->ItemDefinedTransformation()->TransformItem2()); + + // Own fields of KinematicPair + + theSW.Send (theEnt->Joint()); + + // Own fields of ScrewPair + + theSW.Send (theEnt->Pitch()); +} + +//======================================================================= +//function : Share +//purpose : +//======================================================================= +void RWStepKinematics_RWScrewPair::Share (const Handle(StepKinematics_ScrewPair)& theEnt, + Interface_EntityIterator& iter) const +{ + + // Inherited fields of RepresentationItem + + // Inherited fields of ItemDefinedTransformation + + iter.AddItem (theEnt->ItemDefinedTransformation()->TransformItem1()); + + iter.AddItem (theEnt->ItemDefinedTransformation()->TransformItem2()); + + // Inherited fields of KinematicPair + + iter.AddItem (theEnt->StepKinematics_KinematicPair::Joint()); + + // Own fields of ScrewPair +} diff --git a/src/RWStepKinematics/RWStepKinematics_RWScrewPair.hxx b/src/RWStepKinematics/RWStepKinematics_RWScrewPair.hxx new file mode 100644 index 0000000000..379e7dd34b --- /dev/null +++ b/src/RWStepKinematics/RWStepKinematics_RWScrewPair.hxx @@ -0,0 +1,46 @@ +// Created on : Sat May 02 12:41:16 2020 +// Created by: Irina KRYLOVA +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V3.0 +// Copyright (c) Open CASCADE 2020 +// +// 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 _RWStepKinematics_RWScrewPair_HeaderFile_ +#define _RWStepKinematics_RWScrewPair_HeaderFile_ + +#include +#include +#include + +class StepData_StepReaderData; +class Interface_Check; +class StepData_StepWriter; +class Interface_EntityIterator; +class StepKinematics_ScrewPair; + +//! Read & Write tool for ScrewPair +class RWStepKinematics_RWScrewPair +{ +public: + + DEFINE_STANDARD_ALLOC + + Standard_EXPORT RWStepKinematics_RWScrewPair(); + + Standard_EXPORT void ReadStep(const Handle(StepData_StepReaderData)& theData, const Standard_Integer theNum, Handle(Interface_Check)& theArch, const Handle(StepKinematics_ScrewPair)& theEnt) const; + + Standard_EXPORT void WriteStep(StepData_StepWriter& theSW, const Handle(StepKinematics_ScrewPair)& theEnt) const; + + Standard_EXPORT void Share(const Handle(StepKinematics_ScrewPair)& theEnt, Interface_EntityIterator& iter) const; + +}; +#endif // _RWStepKinematics_RWScrewPair_HeaderFile_ diff --git a/src/RWStepKinematics/RWStepKinematics_RWScrewPairValue.cxx b/src/RWStepKinematics/RWStepKinematics_RWScrewPairValue.cxx new file mode 100644 index 0000000000..06343e4538 --- /dev/null +++ b/src/RWStepKinematics/RWStepKinematics_RWScrewPairValue.cxx @@ -0,0 +1,103 @@ +// Created on : Sat May 02 12:41:16 2020 +// Created by: Irina KRYLOVA +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V3.0 +// Copyright (c) Open CASCADE 2020 +// +// This file is part of Open CASCADE Technology software library. +// +// This library is free software; you can redistribute it and/or modify it under +// the terms of the GNU Lesser General Public License version 2.1 as published +// by the Free Software Foundation, with special exception defined in the file +// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT +// distribution for complete text of the license and disclaimer of any warranty. +// +// Alternatively, this file may be used under the terms of Open CASCADE +// commercial license or contractual agreement. + +#include + +#include +#include +#include +#include +#include +#include +#include + +//======================================================================= +//function : RWStepKinematics_RWScrewPairValue +//purpose : +//======================================================================= +RWStepKinematics_RWScrewPairValue::RWStepKinematics_RWScrewPairValue() {} + + +//======================================================================= +//function : ReadStep +//purpose : +//======================================================================= +void RWStepKinematics_RWScrewPairValue::ReadStep (const Handle(StepData_StepReaderData)& theData, + const Standard_Integer theNum, + Handle(Interface_Check)& theArch, + const Handle(StepKinematics_ScrewPairValue)& theEnt) const +{ + // Check number of parameters + if ( ! theData->CheckNbParams(theNum,3,theArch,"screw_pair_value") ) return; + + // Inherited fields of RepresentationItem + + Handle(TCollection_HAsciiString) aRepresentationItem_Name; + theData->ReadString (theNum, 1, "representation_item.name", theArch, aRepresentationItem_Name); + + // Inherited fields of PairValue + + Handle(StepKinematics_KinematicPair) aPairValue_AppliesToPair; + theData->ReadEntity (theNum, 2, "pair_value.applies_to_pair", theArch, STANDARD_TYPE(StepKinematics_KinematicPair), aPairValue_AppliesToPair); + + // Own fields of ScrewPairValue + + Standard_Real aActualRotation; + theData->ReadReal (theNum, 3, "actual_rotation", theArch, aActualRotation); + + // Initialize entity + theEnt->Init(aRepresentationItem_Name, + aPairValue_AppliesToPair, + aActualRotation); +} + +//======================================================================= +//function : WriteStep +//purpose : +//======================================================================= +void RWStepKinematics_RWScrewPairValue::WriteStep (StepData_StepWriter& theSW, + const Handle(StepKinematics_ScrewPairValue)& theEnt) const +{ + + // Own fields of RepresentationItem + + theSW.Send (theEnt->Name()); + + // Own fields of PairValue + + theSW.Send (theEnt->AppliesToPair()); + + // Own fields of ScrewPairValue + + theSW.Send (theEnt->ActualRotation()); +} + +//======================================================================= +//function : Share +//purpose : +//======================================================================= +void RWStepKinematics_RWScrewPairValue::Share (const Handle(StepKinematics_ScrewPairValue)& theEnt, + Interface_EntityIterator& iter) const +{ + + // Inherited fields of RepresentationItem + + // Inherited fields of PairValue + + iter.AddItem (theEnt->StepKinematics_PairValue::AppliesToPair()); + + // Own fields of ScrewPairValue +} diff --git a/src/RWStepKinematics/RWStepKinematics_RWScrewPairValue.hxx b/src/RWStepKinematics/RWStepKinematics_RWScrewPairValue.hxx new file mode 100644 index 0000000000..916284e17f --- /dev/null +++ b/src/RWStepKinematics/RWStepKinematics_RWScrewPairValue.hxx @@ -0,0 +1,46 @@ +// Created on : Sat May 02 12:41:16 2020 +// Created by: Irina KRYLOVA +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V3.0 +// Copyright (c) Open CASCADE 2020 +// +// 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 _RWStepKinematics_RWScrewPairValue_HeaderFile_ +#define _RWStepKinematics_RWScrewPairValue_HeaderFile_ + +#include +#include +#include + +class StepData_StepReaderData; +class Interface_Check; +class StepData_StepWriter; +class Interface_EntityIterator; +class StepKinematics_ScrewPairValue; + +//! Read & Write tool for ScrewPairValue +class RWStepKinematics_RWScrewPairValue +{ +public: + + DEFINE_STANDARD_ALLOC + + Standard_EXPORT RWStepKinematics_RWScrewPairValue(); + + Standard_EXPORT void ReadStep(const Handle(StepData_StepReaderData)& theData, const Standard_Integer theNum, Handle(Interface_Check)& theArch, const Handle(StepKinematics_ScrewPairValue)& theEnt) const; + + Standard_EXPORT void WriteStep(StepData_StepWriter& theSW, const Handle(StepKinematics_ScrewPairValue)& theEnt) const; + + Standard_EXPORT void Share(const Handle(StepKinematics_ScrewPairValue)& theEnt, Interface_EntityIterator& iter) const; + +}; +#endif // _RWStepKinematics_RWScrewPairValue_HeaderFile_ diff --git a/src/RWStepKinematics/RWStepKinematics_RWScrewPairWithRange.cxx b/src/RWStepKinematics/RWStepKinematics_RWScrewPairWithRange.cxx new file mode 100644 index 0000000000..7fe42958a9 --- /dev/null +++ b/src/RWStepKinematics/RWStepKinematics_RWScrewPairWithRange.cxx @@ -0,0 +1,190 @@ +// Created on : Sat May 02 12:41:16 2020 +// Created by: Irina KRYLOVA +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V3.0 +// Copyright (c) Open CASCADE 2020 +// +// This file is part of Open CASCADE Technology software library. +// +// This library is free software; you can redistribute it and/or modify it under +// the terms of the GNU Lesser General Public License version 2.1 as published +// by the Free Software Foundation, with special exception defined in the file +// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT +// distribution for complete text of the license and disclaimer of any warranty. +// +// Alternatively, this file may be used under the terms of Open CASCADE +// commercial license or contractual agreement. + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +//======================================================================= +//function : RWStepKinematics_RWScrewPairWithRange +//purpose : +//======================================================================= +RWStepKinematics_RWScrewPairWithRange::RWStepKinematics_RWScrewPairWithRange() {} + + +//======================================================================= +//function : ReadStep +//purpose : +//======================================================================= +void RWStepKinematics_RWScrewPairWithRange::ReadStep (const Handle(StepData_StepReaderData)& theData, + const Standard_Integer theNum, + Handle(Interface_Check)& theArch, + const Handle(StepKinematics_ScrewPairWithRange)& theEnt) const +{ + // Check number of parameters + if ( ! theData->CheckNbParams(theNum,9,theArch,"screw_pair_with_range") ) return; + + // Inherited fields of RepresentationItem + + Handle(TCollection_HAsciiString) aRepresentationItem_Name; + theData->ReadString (theNum, 1, "representation_item.name", theArch, aRepresentationItem_Name); + + // Inherited fields of ItemDefinedTransformation + + Handle(TCollection_HAsciiString) aItemDefinedTransformation_Name; + theData->ReadString (theNum, 2, "item_defined_transformation.name", theArch, aItemDefinedTransformation_Name); + + Handle(TCollection_HAsciiString) aItemDefinedTransformation_Description; + Standard_Boolean hasItemDefinedTransformation_Description = Standard_True; + if ( theData->IsParamDefined (theNum,3) ) { + theData->ReadString (theNum, 3, "item_defined_transformation.description", theArch, aItemDefinedTransformation_Description); + } + else { + hasItemDefinedTransformation_Description = Standard_False; + aItemDefinedTransformation_Description.Nullify(); + } + + Handle(StepRepr_RepresentationItem) aItemDefinedTransformation_TransformItem1; + theData->ReadEntity (theNum, 4, "item_defined_transformation.transform_item1", theArch, STANDARD_TYPE(StepRepr_RepresentationItem), aItemDefinedTransformation_TransformItem1); + + Handle(StepRepr_RepresentationItem) aItemDefinedTransformation_TransformItem2; + theData->ReadEntity (theNum, 5, "item_defined_transformation.transform_item2", theArch, STANDARD_TYPE(StepRepr_RepresentationItem), aItemDefinedTransformation_TransformItem2); + + // Inherited fields of KinematicPair + + Handle(StepKinematics_KinematicJoint) aKinematicPair_Joint; + theData->ReadEntity (theNum, 6, "kinematic_pair.joint", theArch, STANDARD_TYPE(StepKinematics_KinematicJoint), aKinematicPair_Joint); + + // Inherited fields of ScrewPair + + Standard_Real aScrewPair_Pitch; + theData->ReadReal (theNum, 7, "screw_pair.pitch", theArch, aScrewPair_Pitch); + + // Own fields of ScrewPairWithRange + + Standard_Real aLowerLimitActualRotation; + Standard_Boolean hasLowerLimitActualRotation = Standard_True; + if ( theData->IsParamDefined (theNum,8) ) { + theData->ReadReal (theNum, 8, "lower_limit_actual_rotation", theArch, aLowerLimitActualRotation); + } + else { + hasLowerLimitActualRotation = Standard_False; + aLowerLimitActualRotation = 0; + } + + Standard_Real aUpperLimitActualRotation; + Standard_Boolean hasUpperLimitActualRotation = Standard_True; + if ( theData->IsParamDefined (theNum,9) ) { + theData->ReadReal (theNum, 9, "upper_limit_actual_rotation", theArch, aUpperLimitActualRotation); + } + else { + hasUpperLimitActualRotation = Standard_False; + aUpperLimitActualRotation = 0; + } + + // Initialize entity + theEnt->Init(aRepresentationItem_Name, + aItemDefinedTransformation_Name, + hasItemDefinedTransformation_Description, + aItemDefinedTransformation_Description, + aItemDefinedTransformation_TransformItem1, + aItemDefinedTransformation_TransformItem2, + aKinematicPair_Joint, + aScrewPair_Pitch, + hasLowerLimitActualRotation, + aLowerLimitActualRotation, + hasUpperLimitActualRotation, + aUpperLimitActualRotation); +} + +//======================================================================= +//function : WriteStep +//purpose : +//======================================================================= +void RWStepKinematics_RWScrewPairWithRange::WriteStep (StepData_StepWriter& theSW, + const Handle(StepKinematics_ScrewPairWithRange)& theEnt) const +{ + + // Own fields of RepresentationItem + + theSW.Send (theEnt->Name()); + + // Inherited fields of ItemDefinedTransformation + + theSW.Send (theEnt->ItemDefinedTransformation()->Name()); + + if ( theEnt->ItemDefinedTransformation()->HasDescription() ) { + theSW.Send (theEnt->ItemDefinedTransformation()->Description()); + } + else theSW.SendUndef(); + + theSW.Send (theEnt->ItemDefinedTransformation()->TransformItem1()); + + theSW.Send (theEnt->ItemDefinedTransformation()->TransformItem2()); + + // Own fields of KinematicPair + + theSW.Send (theEnt->Joint()); + + // Own fields of ScrewPair + + theSW.Send (theEnt->Pitch()); + + // Own fields of ScrewPairWithRange + + if ( theEnt->HasLowerLimitActualRotation() ) { + theSW.Send (theEnt->LowerLimitActualRotation()); + } + else theSW.SendUndef(); + + if ( theEnt->HasUpperLimitActualRotation() ) { + theSW.Send (theEnt->UpperLimitActualRotation()); + } + else theSW.SendUndef(); +} + +//======================================================================= +//function : Share +//purpose : +//======================================================================= +void RWStepKinematics_RWScrewPairWithRange::Share (const Handle(StepKinematics_ScrewPairWithRange)& theEnt, + Interface_EntityIterator& iter) const +{ + + // Inherited fields of RepresentationItem + + // Inherited fields of ItemDefinedTransformation + + iter.AddItem (theEnt->ItemDefinedTransformation()->TransformItem1()); + + iter.AddItem (theEnt->ItemDefinedTransformation()->TransformItem2()); + + // Inherited fields of KinematicPair + + iter.AddItem (theEnt->StepKinematics_KinematicPair::Joint()); + + // Inherited fields of ScrewPair + + // Own fields of ScrewPairWithRange +} diff --git a/src/RWStepKinematics/RWStepKinematics_RWScrewPairWithRange.hxx b/src/RWStepKinematics/RWStepKinematics_RWScrewPairWithRange.hxx new file mode 100644 index 0000000000..8826564b04 --- /dev/null +++ b/src/RWStepKinematics/RWStepKinematics_RWScrewPairWithRange.hxx @@ -0,0 +1,46 @@ +// Created on : Sat May 02 12:41:16 2020 +// Created by: Irina KRYLOVA +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V3.0 +// Copyright (c) Open CASCADE 2020 +// +// 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 _RWStepKinematics_RWScrewPairWithRange_HeaderFile_ +#define _RWStepKinematics_RWScrewPairWithRange_HeaderFile_ + +#include +#include +#include + +class StepData_StepReaderData; +class Interface_Check; +class StepData_StepWriter; +class Interface_EntityIterator; +class StepKinematics_ScrewPairWithRange; + +//! Read & Write tool for ScrewPairWithRange +class RWStepKinematics_RWScrewPairWithRange +{ +public: + + DEFINE_STANDARD_ALLOC + + Standard_EXPORT RWStepKinematics_RWScrewPairWithRange(); + + Standard_EXPORT void ReadStep(const Handle(StepData_StepReaderData)& theData, const Standard_Integer theNum, Handle(Interface_Check)& theArch, const Handle(StepKinematics_ScrewPairWithRange)& theEnt) const; + + Standard_EXPORT void WriteStep(StepData_StepWriter& theSW, const Handle(StepKinematics_ScrewPairWithRange)& theEnt) const; + + Standard_EXPORT void Share(const Handle(StepKinematics_ScrewPairWithRange)& theEnt, Interface_EntityIterator& iter) const; + +}; +#endif // _RWStepKinematics_RWScrewPairWithRange_HeaderFile_ diff --git a/src/RWStepKinematics/RWStepKinematics_RWSlidingCurvePair.cxx b/src/RWStepKinematics/RWStepKinematics_RWSlidingCurvePair.cxx new file mode 100644 index 0000000000..ce5613cc92 --- /dev/null +++ b/src/RWStepKinematics/RWStepKinematics_RWSlidingCurvePair.cxx @@ -0,0 +1,167 @@ +// Created on : Sat May 02 12:41:16 2020 +// Created by: Irina KRYLOVA +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V3.0 +// Copyright (c) Open CASCADE 2020 +// +// This file is part of Open CASCADE Technology software library. +// +// This library is free software; you can redistribute it and/or modify it under +// the terms of the GNU Lesser General Public License version 2.1 as published +// by the Free Software Foundation, with special exception defined in the file +// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT +// distribution for complete text of the license and disclaimer of any warranty. +// +// Alternatively, this file may be used under the terms of Open CASCADE +// commercial license or contractual agreement. + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +//======================================================================= +//function : RWStepKinematics_RWSlidingCurvePair +//purpose : +//======================================================================= +RWStepKinematics_RWSlidingCurvePair::RWStepKinematics_RWSlidingCurvePair() {} + + +//======================================================================= +//function : ReadStep +//purpose : +//======================================================================= +void RWStepKinematics_RWSlidingCurvePair::ReadStep (const Handle(StepData_StepReaderData)& theData, + const Standard_Integer theNum, + Handle(Interface_Check)& theArch, + const Handle(StepKinematics_SlidingCurvePair)& theEnt) const +{ + // Check number of parameters + if ( ! theData->CheckNbParams(theNum,9,theArch,"sliding_curve_pair") ) return; + + // Inherited fields of RepresentationItem + + Handle(TCollection_HAsciiString) aRepresentationItem_Name; + theData->ReadString (theNum, 1, "representation_item.name", theArch, aRepresentationItem_Name); + + // Inherited fields of ItemDefinedTransformation + + Handle(TCollection_HAsciiString) aItemDefinedTransformation_Name; + theData->ReadString (theNum, 2, "item_defined_transformation.name", theArch, aItemDefinedTransformation_Name); + + Handle(TCollection_HAsciiString) aItemDefinedTransformation_Description; + Standard_Boolean hasItemDefinedTransformation_Description = Standard_True; + if ( theData->IsParamDefined (theNum,3) ) { + theData->ReadString (theNum, 3, "item_defined_transformation.description", theArch, aItemDefinedTransformation_Description); + } + else { + hasItemDefinedTransformation_Description = Standard_False; + aItemDefinedTransformation_Description.Nullify(); + } + + Handle(StepRepr_RepresentationItem) aItemDefinedTransformation_TransformItem1; + theData->ReadEntity (theNum, 4, "item_defined_transformation.transform_item1", theArch, STANDARD_TYPE(StepRepr_RepresentationItem), aItemDefinedTransformation_TransformItem1); + + Handle(StepRepr_RepresentationItem) aItemDefinedTransformation_TransformItem2; + theData->ReadEntity (theNum, 5, "item_defined_transformation.transform_item2", theArch, STANDARD_TYPE(StepRepr_RepresentationItem), aItemDefinedTransformation_TransformItem2); + + // Inherited fields of KinematicPair + + Handle(StepKinematics_KinematicJoint) aKinematicPair_Joint; + theData->ReadEntity (theNum, 6, "kinematic_pair.joint", theArch, STANDARD_TYPE(StepKinematics_KinematicJoint), aKinematicPair_Joint); + + // Inherited fields of PlanarCurvePair + + Handle(StepGeom_Curve) aPlanarCurvePair_Curve1; + theData->ReadEntity (theNum, 7, "planar_curve_pair.curve1", theArch, STANDARD_TYPE(StepGeom_Curve), aPlanarCurvePair_Curve1); + + Handle(StepGeom_Curve) aPlanarCurvePair_Curve2; + theData->ReadEntity (theNum, 8, "planar_curve_pair.curve2", theArch, STANDARD_TYPE(StepGeom_Curve), aPlanarCurvePair_Curve2); + + Standard_Boolean aPlanarCurvePair_Orientation; + theData->ReadBoolean (theNum, 9, "planar_curve_pair.orientation", theArch, aPlanarCurvePair_Orientation); + + // Initialize entity + theEnt->Init(aRepresentationItem_Name, + aItemDefinedTransformation_Name, + hasItemDefinedTransformation_Description, + aItemDefinedTransformation_Description, + aItemDefinedTransformation_TransformItem1, + aItemDefinedTransformation_TransformItem2, + aKinematicPair_Joint, + aPlanarCurvePair_Curve1, + aPlanarCurvePair_Curve2, + aPlanarCurvePair_Orientation); +} + +//======================================================================= +//function : WriteStep +//purpose : +//======================================================================= +void RWStepKinematics_RWSlidingCurvePair::WriteStep (StepData_StepWriter& theSW, + const Handle(StepKinematics_SlidingCurvePair)& theEnt) const +{ + + // Own fields of RepresentationItem + + theSW.Send (theEnt->Name()); + + // Inherited fields of ItemDefinedTransformation + + theSW.Send (theEnt->ItemDefinedTransformation()->Name()); + + if ( theEnt->ItemDefinedTransformation()->HasDescription() ) { + theSW.Send (theEnt->ItemDefinedTransformation()->Description()); + } + else theSW.SendUndef(); + + theSW.Send (theEnt->ItemDefinedTransformation()->TransformItem1()); + + theSW.Send (theEnt->ItemDefinedTransformation()->TransformItem2()); + + // Own fields of KinematicPair + + theSW.Send (theEnt->Joint()); + + // Own fields of PlanarCurvePair + + theSW.Send (theEnt->Curve1()); + + theSW.Send (theEnt->Curve2()); + + theSW.SendBoolean (theEnt->Orientation()); +} + +//======================================================================= +//function : Share +//purpose : +//======================================================================= +void RWStepKinematics_RWSlidingCurvePair::Share (const Handle(StepKinematics_SlidingCurvePair)& theEnt, + Interface_EntityIterator& iter) const +{ + + // Inherited fields of RepresentationItem + + // Inherited fields of ItemDefinedTransformation + + iter.AddItem (theEnt->ItemDefinedTransformation()->TransformItem1()); + + iter.AddItem (theEnt->ItemDefinedTransformation()->TransformItem2()); + + // Inherited fields of KinematicPair + + iter.AddItem (theEnt->StepKinematics_KinematicPair::Joint()); + + // Inherited fields of PlanarCurvePair + + iter.AddItem (theEnt->StepKinematics_PlanarCurvePair::Curve1()); + + iter.AddItem (theEnt->StepKinematics_PlanarCurvePair::Curve2()); +} diff --git a/src/RWStepKinematics/RWStepKinematics_RWSlidingCurvePair.hxx b/src/RWStepKinematics/RWStepKinematics_RWSlidingCurvePair.hxx new file mode 100644 index 0000000000..6b319d28c3 --- /dev/null +++ b/src/RWStepKinematics/RWStepKinematics_RWSlidingCurvePair.hxx @@ -0,0 +1,46 @@ +// Created on : Sat May 02 12:41:16 2020 +// Created by: Irina KRYLOVA +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V3.0 +// Copyright (c) Open CASCADE 2020 +// +// 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 _RWStepKinematics_RWSlidingCurvePair_HeaderFile_ +#define _RWStepKinematics_RWSlidingCurvePair_HeaderFile_ + +#include +#include +#include + +class StepData_StepReaderData; +class Interface_Check; +class StepData_StepWriter; +class Interface_EntityIterator; +class StepKinematics_SlidingCurvePair; + +//! Read & Write tool for SlidingCurvePair +class RWStepKinematics_RWSlidingCurvePair +{ +public: + + DEFINE_STANDARD_ALLOC + + Standard_EXPORT RWStepKinematics_RWSlidingCurvePair(); + + Standard_EXPORT void ReadStep(const Handle(StepData_StepReaderData)& theData, const Standard_Integer theNum, Handle(Interface_Check)& theArch, const Handle(StepKinematics_SlidingCurvePair)& theEnt) const; + + Standard_EXPORT void WriteStep(StepData_StepWriter& theSW, const Handle(StepKinematics_SlidingCurvePair)& theEnt) const; + + Standard_EXPORT void Share(const Handle(StepKinematics_SlidingCurvePair)& theEnt, Interface_EntityIterator& iter) const; + +}; +#endif // _RWStepKinematics_RWSlidingCurvePair_HeaderFile_ diff --git a/src/RWStepKinematics/RWStepKinematics_RWSlidingCurvePairValue.cxx b/src/RWStepKinematics/RWStepKinematics_RWSlidingCurvePairValue.cxx new file mode 100644 index 0000000000..67eb5f9e1e --- /dev/null +++ b/src/RWStepKinematics/RWStepKinematics_RWSlidingCurvePairValue.cxx @@ -0,0 +1,113 @@ +// Created on : Sat May 02 12:41:16 2020 +// Created by: Irina KRYLOVA +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V3.0 +// Copyright (c) Open CASCADE 2020 +// +// This file is part of Open CASCADE Technology software library. +// +// This library is free software; you can redistribute it and/or modify it under +// the terms of the GNU Lesser General Public License version 2.1 as published +// by the Free Software Foundation, with special exception defined in the file +// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT +// distribution for complete text of the license and disclaimer of any warranty. +// +// Alternatively, this file may be used under the terms of Open CASCADE +// commercial license or contractual agreement. + +#include + +#include +#include +#include +#include +#include +#include +#include + +//======================================================================= +//function : RWStepKinematics_RWSlidingCurvePairValue +//purpose : +//======================================================================= +RWStepKinematics_RWSlidingCurvePairValue::RWStepKinematics_RWSlidingCurvePairValue() {} + + +//======================================================================= +//function : ReadStep +//purpose : +//======================================================================= +void RWStepKinematics_RWSlidingCurvePairValue::ReadStep (const Handle(StepData_StepReaderData)& theData, + const Standard_Integer theNum, + Handle(Interface_Check)& theArch, + const Handle(StepKinematics_SlidingCurvePairValue)& theEnt) const +{ + // Check number of parameters + if ( ! theData->CheckNbParams(theNum,4,theArch,"sliding_curve_pair_value") ) return; + + // Inherited fields of RepresentationItem + + Handle(TCollection_HAsciiString) aRepresentationItem_Name; + theData->ReadString (theNum, 1, "representation_item.name", theArch, aRepresentationItem_Name); + + // Inherited fields of PairValue + + Handle(StepKinematics_KinematicPair) aPairValue_AppliesToPair; + theData->ReadEntity (theNum, 2, "pair_value.applies_to_pair", theArch, STANDARD_TYPE(StepKinematics_KinematicPair), aPairValue_AppliesToPair); + + // Own fields of SlidingCurvePairValue + + Handle(StepGeom_PointOnCurve) aActualPointOnCurve1; + theData->ReadEntity (theNum, 3, "actual_point_on_curve1", theArch, STANDARD_TYPE(StepGeom_PointOnCurve), aActualPointOnCurve1); + + Handle(StepGeom_PointOnCurve) aActualPointOnCurve2; + theData->ReadEntity (theNum, 4, "actual_point_on_curve2", theArch, STANDARD_TYPE(StepGeom_PointOnCurve), aActualPointOnCurve2); + + // Initialize entity + theEnt->Init(aRepresentationItem_Name, + aPairValue_AppliesToPair, + aActualPointOnCurve1, + aActualPointOnCurve2); +} + +//======================================================================= +//function : WriteStep +//purpose : +//======================================================================= +void RWStepKinematics_RWSlidingCurvePairValue::WriteStep (StepData_StepWriter& theSW, + const Handle(StepKinematics_SlidingCurvePairValue)& theEnt) const +{ + + // Own fields of RepresentationItem + + theSW.Send (theEnt->Name()); + + // Own fields of PairValue + + theSW.Send (theEnt->AppliesToPair()); + + // Own fields of SlidingCurvePairValue + + theSW.Send (theEnt->ActualPointOnCurve1()); + + theSW.Send (theEnt->ActualPointOnCurve2()); +} + +//======================================================================= +//function : Share +//purpose : +//======================================================================= +void RWStepKinematics_RWSlidingCurvePairValue::Share (const Handle(StepKinematics_SlidingCurvePairValue)& theEnt, + Interface_EntityIterator& iter) const +{ + + // Inherited fields of RepresentationItem + + // Inherited fields of PairValue + + iter.AddItem (theEnt->StepKinematics_PairValue::AppliesToPair()); + + // Own fields of SlidingCurvePairValue + + iter.AddItem (theEnt->ActualPointOnCurve1()); + + iter.AddItem (theEnt->ActualPointOnCurve2()); +} diff --git a/src/RWStepKinematics/RWStepKinematics_RWSlidingCurvePairValue.hxx b/src/RWStepKinematics/RWStepKinematics_RWSlidingCurvePairValue.hxx new file mode 100644 index 0000000000..262d7882a5 --- /dev/null +++ b/src/RWStepKinematics/RWStepKinematics_RWSlidingCurvePairValue.hxx @@ -0,0 +1,46 @@ +// Created on : Sat May 02 12:41:16 2020 +// Created by: Irina KRYLOVA +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V3.0 +// Copyright (c) Open CASCADE 2020 +// +// 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 _RWStepKinematics_RWSlidingCurvePairValue_HeaderFile_ +#define _RWStepKinematics_RWSlidingCurvePairValue_HeaderFile_ + +#include +#include +#include + +class StepData_StepReaderData; +class Interface_Check; +class StepData_StepWriter; +class Interface_EntityIterator; +class StepKinematics_SlidingCurvePairValue; + +//! Read & Write tool for SlidingCurvePairValue +class RWStepKinematics_RWSlidingCurvePairValue +{ +public: + + DEFINE_STANDARD_ALLOC + + Standard_EXPORT RWStepKinematics_RWSlidingCurvePairValue(); + + Standard_EXPORT void ReadStep(const Handle(StepData_StepReaderData)& theData, const Standard_Integer theNum, Handle(Interface_Check)& theArch, const Handle(StepKinematics_SlidingCurvePairValue)& theEnt) const; + + Standard_EXPORT void WriteStep(StepData_StepWriter& theSW, const Handle(StepKinematics_SlidingCurvePairValue)& theEnt) const; + + Standard_EXPORT void Share(const Handle(StepKinematics_SlidingCurvePairValue)& theEnt, Interface_EntityIterator& iter) const; + +}; +#endif // _RWStepKinematics_RWSlidingCurvePairValue_HeaderFile_ diff --git a/src/RWStepKinematics/RWStepKinematics_RWSlidingSurfacePair.cxx b/src/RWStepKinematics/RWStepKinematics_RWSlidingSurfacePair.cxx new file mode 100644 index 0000000000..857f5bb66e --- /dev/null +++ b/src/RWStepKinematics/RWStepKinematics_RWSlidingSurfacePair.cxx @@ -0,0 +1,167 @@ +// Created on : Sat May 02 12:41:16 2020 +// Created by: Irina KRYLOVA +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V3.0 +// Copyright (c) Open CASCADE 2020 +// +// This file is part of Open CASCADE Technology software library. +// +// This library is free software; you can redistribute it and/or modify it under +// the terms of the GNU Lesser General Public License version 2.1 as published +// by the Free Software Foundation, with special exception defined in the file +// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT +// distribution for complete text of the license and disclaimer of any warranty. +// +// Alternatively, this file may be used under the terms of Open CASCADE +// commercial license or contractual agreement. + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +//======================================================================= +//function : RWStepKinematics_RWSlidingSurfacePair +//purpose : +//======================================================================= +RWStepKinematics_RWSlidingSurfacePair::RWStepKinematics_RWSlidingSurfacePair() {} + + +//======================================================================= +//function : ReadStep +//purpose : +//======================================================================= +void RWStepKinematics_RWSlidingSurfacePair::ReadStep (const Handle(StepData_StepReaderData)& theData, + const Standard_Integer theNum, + Handle(Interface_Check)& theArch, + const Handle(StepKinematics_SlidingSurfacePair)& theEnt) const +{ + // Check number of parameters + if ( ! theData->CheckNbParams(theNum,9,theArch,"sliding_surface_pair") ) return; + + // Inherited fields of RepresentationItem + + Handle(TCollection_HAsciiString) aRepresentationItem_Name; + theData->ReadString (theNum, 1, "representation_item.name", theArch, aRepresentationItem_Name); + + // Inherited fields of ItemDefinedTransformation + + Handle(TCollection_HAsciiString) aItemDefinedTransformation_Name; + theData->ReadString (theNum, 2, "item_defined_transformation.name", theArch, aItemDefinedTransformation_Name); + + Handle(TCollection_HAsciiString) aItemDefinedTransformation_Description; + Standard_Boolean hasItemDefinedTransformation_Description = Standard_True; + if ( theData->IsParamDefined (theNum,3) ) { + theData->ReadString (theNum, 3, "item_defined_transformation.description", theArch, aItemDefinedTransformation_Description); + } + else { + hasItemDefinedTransformation_Description = Standard_False; + aItemDefinedTransformation_Description.Nullify(); + } + + Handle(StepRepr_RepresentationItem) aItemDefinedTransformation_TransformItem1; + theData->ReadEntity (theNum, 4, "item_defined_transformation.transform_item1", theArch, STANDARD_TYPE(StepRepr_RepresentationItem), aItemDefinedTransformation_TransformItem1); + + Handle(StepRepr_RepresentationItem) aItemDefinedTransformation_TransformItem2; + theData->ReadEntity (theNum, 5, "item_defined_transformation.transform_item2", theArch, STANDARD_TYPE(StepRepr_RepresentationItem), aItemDefinedTransformation_TransformItem2); + + // Inherited fields of KinematicPair + + Handle(StepKinematics_KinematicJoint) aKinematicPair_Joint; + theData->ReadEntity (theNum, 6, "kinematic_pair.joint", theArch, STANDARD_TYPE(StepKinematics_KinematicJoint), aKinematicPair_Joint); + + // Inherited fields of SurfacePair + + Handle(StepGeom_Surface) aSurfacePair_Surface1; + theData->ReadEntity (theNum, 7, "surface_pair.surface1", theArch, STANDARD_TYPE(StepGeom_Surface), aSurfacePair_Surface1); + + Handle(StepGeom_Surface) aSurfacePair_Surface2; + theData->ReadEntity (theNum, 8, "surface_pair.surface2", theArch, STANDARD_TYPE(StepGeom_Surface), aSurfacePair_Surface2); + + Standard_Boolean aSurfacePair_Orientation; + theData->ReadBoolean (theNum, 9, "surface_pair.orientation", theArch, aSurfacePair_Orientation); + + // Initialize entity + theEnt->Init(aRepresentationItem_Name, + aItemDefinedTransformation_Name, + hasItemDefinedTransformation_Description, + aItemDefinedTransformation_Description, + aItemDefinedTransformation_TransformItem1, + aItemDefinedTransformation_TransformItem2, + aKinematicPair_Joint, + aSurfacePair_Surface1, + aSurfacePair_Surface2, + aSurfacePair_Orientation); +} + +//======================================================================= +//function : WriteStep +//purpose : +//======================================================================= +void RWStepKinematics_RWSlidingSurfacePair::WriteStep (StepData_StepWriter& theSW, + const Handle(StepKinematics_SlidingSurfacePair)& theEnt) const +{ + + // Own fields of RepresentationItem + + theSW.Send (theEnt->Name()); + + // Inherited fields of ItemDefinedTransformation + + theSW.Send (theEnt->ItemDefinedTransformation()->Name()); + + if ( theEnt->ItemDefinedTransformation()->HasDescription() ) { + theSW.Send (theEnt->ItemDefinedTransformation()->Description()); + } + else theSW.SendUndef(); + + theSW.Send (theEnt->ItemDefinedTransformation()->TransformItem1()); + + theSW.Send (theEnt->ItemDefinedTransformation()->TransformItem2()); + + // Own fields of KinematicPair + + theSW.Send (theEnt->Joint()); + + // Own fields of SurfacePair + + theSW.Send (theEnt->Surface1()); + + theSW.Send (theEnt->Surface2()); + + theSW.SendBoolean (theEnt->Orientation()); +} + +//======================================================================= +//function : Share +//purpose : +//======================================================================= +void RWStepKinematics_RWSlidingSurfacePair::Share (const Handle(StepKinematics_SlidingSurfacePair)& theEnt, + Interface_EntityIterator& iter) const +{ + + // Inherited fields of RepresentationItem + + // Inherited fields of ItemDefinedTransformation + + iter.AddItem (theEnt->ItemDefinedTransformation()->TransformItem1()); + + iter.AddItem (theEnt->ItemDefinedTransformation()->TransformItem2()); + + // Inherited fields of KinematicPair + + iter.AddItem (theEnt->StepKinematics_KinematicPair::Joint()); + + // Inherited fields of SurfacePair + + iter.AddItem (theEnt->StepKinematics_SurfacePair::Surface1()); + + iter.AddItem (theEnt->StepKinematics_SurfacePair::Surface2()); +} diff --git a/src/RWStepKinematics/RWStepKinematics_RWSlidingSurfacePair.hxx b/src/RWStepKinematics/RWStepKinematics_RWSlidingSurfacePair.hxx new file mode 100644 index 0000000000..dbc46e4ab1 --- /dev/null +++ b/src/RWStepKinematics/RWStepKinematics_RWSlidingSurfacePair.hxx @@ -0,0 +1,46 @@ +// Created on : Sat May 02 12:41:16 2020 +// Created by: Irina KRYLOVA +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V3.0 +// Copyright (c) Open CASCADE 2020 +// +// 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 _RWStepKinematics_RWSlidingSurfacePair_HeaderFile_ +#define _RWStepKinematics_RWSlidingSurfacePair_HeaderFile_ + +#include +#include +#include + +class StepData_StepReaderData; +class Interface_Check; +class StepData_StepWriter; +class Interface_EntityIterator; +class StepKinematics_SlidingSurfacePair; + +//! Read & Write tool for SlidingSurfacePair +class RWStepKinematics_RWSlidingSurfacePair +{ +public: + + DEFINE_STANDARD_ALLOC + + Standard_EXPORT RWStepKinematics_RWSlidingSurfacePair(); + + Standard_EXPORT void ReadStep(const Handle(StepData_StepReaderData)& theData, const Standard_Integer theNum, Handle(Interface_Check)& theArch, const Handle(StepKinematics_SlidingSurfacePair)& theEnt) const; + + Standard_EXPORT void WriteStep(StepData_StepWriter& theSW, const Handle(StepKinematics_SlidingSurfacePair)& theEnt) const; + + Standard_EXPORT void Share(const Handle(StepKinematics_SlidingSurfacePair)& theEnt, Interface_EntityIterator& iter) const; + +}; +#endif // _RWStepKinematics_RWSlidingSurfacePair_HeaderFile_ diff --git a/src/RWStepKinematics/RWStepKinematics_RWSlidingSurfacePairValue.cxx b/src/RWStepKinematics/RWStepKinematics_RWSlidingSurfacePairValue.cxx new file mode 100644 index 0000000000..fabe4bd53c --- /dev/null +++ b/src/RWStepKinematics/RWStepKinematics_RWSlidingSurfacePairValue.cxx @@ -0,0 +1,120 @@ +// Created on : Sat May 02 12:41:16 2020 +// Created by: Irina KRYLOVA +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V3.0 +// Copyright (c) Open CASCADE 2020 +// +// This file is part of Open CASCADE Technology software library. +// +// This library is free software; you can redistribute it and/or modify it under +// the terms of the GNU Lesser General Public License version 2.1 as published +// by the Free Software Foundation, with special exception defined in the file +// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT +// distribution for complete text of the license and disclaimer of any warranty. +// +// Alternatively, this file may be used under the terms of Open CASCADE +// commercial license or contractual agreement. + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +//======================================================================= +//function : RWStepKinematics_RWSlidingSurfacePairValue +//purpose : +//======================================================================= +RWStepKinematics_RWSlidingSurfacePairValue::RWStepKinematics_RWSlidingSurfacePairValue() {} + + +//======================================================================= +//function : ReadStep +//purpose : +//======================================================================= +void RWStepKinematics_RWSlidingSurfacePairValue::ReadStep (const Handle(StepData_StepReaderData)& theData, + const Standard_Integer theNum, + Handle(Interface_Check)& theArch, + const Handle(StepKinematics_SlidingSurfacePairValue)& theEnt) const +{ + // Check number of parameters + if ( ! theData->CheckNbParams(theNum,5,theArch,"sliding_surface_pair_value") ) return; + + // Inherited fields of RepresentationItem + + Handle(TCollection_HAsciiString) aRepresentationItem_Name; + theData->ReadString (theNum, 1, "representation_item.name", theArch, aRepresentationItem_Name); + + // Inherited fields of PairValue + + Handle(StepKinematics_KinematicPair) aPairValue_AppliesToPair; + theData->ReadEntity (theNum, 2, "pair_value.applies_to_pair", theArch, STANDARD_TYPE(StepKinematics_KinematicPair), aPairValue_AppliesToPair); + + // Own fields of SlidingSurfacePairValue + + Handle(StepGeom_PointOnSurface) aActualPointOnSurface1; + theData->ReadEntity (theNum, 3, "actual_point_on_surface1", theArch, STANDARD_TYPE(StepGeom_PointOnSurface), aActualPointOnSurface1); + + Handle(StepGeom_PointOnSurface) aActualPointOnSurface2; + theData->ReadEntity (theNum, 4, "actual_point_on_surface2", theArch, STANDARD_TYPE(StepGeom_PointOnSurface), aActualPointOnSurface2); + + Standard_Real aActualRotation; + theData->ReadReal (theNum, 5, "actual_rotation", theArch, aActualRotation); + + // Initialize entity + theEnt->Init(aRepresentationItem_Name, + aPairValue_AppliesToPair, + aActualPointOnSurface1, + aActualPointOnSurface2, + aActualRotation); +} + +//======================================================================= +//function : WriteStep +//purpose : +//======================================================================= +void RWStepKinematics_RWSlidingSurfacePairValue::WriteStep (StepData_StepWriter& theSW, + const Handle(StepKinematics_SlidingSurfacePairValue)& theEnt) const +{ + + // Own fields of RepresentationItem + + theSW.Send (theEnt->Name()); + + // Own fields of PairValue + + theSW.Send (theEnt->AppliesToPair()); + + // Own fields of SlidingSurfacePairValue + + theSW.Send (theEnt->ActualPointOnSurface1()); + + theSW.Send (theEnt->ActualPointOnSurface2()); + + theSW.Send (theEnt->ActualRotation()); +} + +//======================================================================= +//function : Share +//purpose : +//======================================================================= +void RWStepKinematics_RWSlidingSurfacePairValue::Share (const Handle(StepKinematics_SlidingSurfacePairValue)& theEnt, + Interface_EntityIterator& iter) const +{ + + // Inherited fields of RepresentationItem + + // Inherited fields of PairValue + + iter.AddItem (theEnt->StepKinematics_PairValue::AppliesToPair()); + + // Own fields of SlidingSurfacePairValue + + iter.AddItem (theEnt->ActualPointOnSurface1()); + + iter.AddItem (theEnt->ActualPointOnSurface2()); +} diff --git a/src/RWStepKinematics/RWStepKinematics_RWSlidingSurfacePairValue.hxx b/src/RWStepKinematics/RWStepKinematics_RWSlidingSurfacePairValue.hxx new file mode 100644 index 0000000000..278adb3d82 --- /dev/null +++ b/src/RWStepKinematics/RWStepKinematics_RWSlidingSurfacePairValue.hxx @@ -0,0 +1,46 @@ +// Created on : Sat May 02 12:41:16 2020 +// Created by: Irina KRYLOVA +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V3.0 +// Copyright (c) Open CASCADE 2020 +// +// 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 _RWStepKinematics_RWSlidingSurfacePairValue_HeaderFile_ +#define _RWStepKinematics_RWSlidingSurfacePairValue_HeaderFile_ + +#include +#include +#include + +class StepData_StepReaderData; +class Interface_Check; +class StepData_StepWriter; +class Interface_EntityIterator; +class StepKinematics_SlidingSurfacePairValue; + +//! Read & Write tool for SlidingSurfacePairValue +class RWStepKinematics_RWSlidingSurfacePairValue +{ +public: + + DEFINE_STANDARD_ALLOC + + Standard_EXPORT RWStepKinematics_RWSlidingSurfacePairValue(); + + Standard_EXPORT void ReadStep(const Handle(StepData_StepReaderData)& theData, const Standard_Integer theNum, Handle(Interface_Check)& theArch, const Handle(StepKinematics_SlidingSurfacePairValue)& theEnt) const; + + Standard_EXPORT void WriteStep(StepData_StepWriter& theSW, const Handle(StepKinematics_SlidingSurfacePairValue)& theEnt) const; + + Standard_EXPORT void Share(const Handle(StepKinematics_SlidingSurfacePairValue)& theEnt, Interface_EntityIterator& iter) const; + +}; +#endif // _RWStepKinematics_RWSlidingSurfacePairValue_HeaderFile_ diff --git a/src/RWStepKinematics/RWStepKinematics_RWSphericalPair.cxx b/src/RWStepKinematics/RWStepKinematics_RWSphericalPair.cxx new file mode 100644 index 0000000000..b37c6003d3 --- /dev/null +++ b/src/RWStepKinematics/RWStepKinematics_RWSphericalPair.cxx @@ -0,0 +1,180 @@ +// Created on : Sat May 02 12:41:16 2020 +// Created by: Irina KRYLOVA +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V3.0 +// Copyright (c) Open CASCADE 2020 +// +// This file is part of Open CASCADE Technology software library. +// +// This library is free software; you can redistribute it and/or modify it under +// the terms of the GNU Lesser General Public License version 2.1 as published +// by the Free Software Foundation, with special exception defined in the file +// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT +// distribution for complete text of the license and disclaimer of any warranty. +// +// Alternatively, this file may be used under the terms of Open CASCADE +// commercial license or contractual agreement. + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +//======================================================================= +//function : RWStepKinematics_RWSphericalPair +//purpose : +//======================================================================= +RWStepKinematics_RWSphericalPair::RWStepKinematics_RWSphericalPair() {} + + +//======================================================================= +//function : ReadStep +//purpose : +//======================================================================= +void RWStepKinematics_RWSphericalPair::ReadStep (const Handle(StepData_StepReaderData)& theData, + const Standard_Integer theNum, + Handle(Interface_Check)& theArch, + const Handle(StepKinematics_SphericalPair)& theEnt) const +{ + // Check number of parameters + if ( ! theData->CheckNbParams(theNum,12,theArch,"spherical_pair") ) return; + + // Inherited fields of RepresentationItem + + Handle(TCollection_HAsciiString) aRepresentationItem_Name; + theData->ReadString (theNum, 1, "representation_item.name", theArch, aRepresentationItem_Name); + + // Inherited fields of ItemDefinedTransformation + + Handle(TCollection_HAsciiString) aItemDefinedTransformation_Name; + theData->ReadString (theNum, 2, "item_defined_transformation.name", theArch, aItemDefinedTransformation_Name); + + Handle(TCollection_HAsciiString) aItemDefinedTransformation_Description; + Standard_Boolean hasItemDefinedTransformation_Description = Standard_True; + if ( theData->IsParamDefined (theNum,3) ) { + theData->ReadString (theNum, 3, "item_defined_transformation.description", theArch, aItemDefinedTransformation_Description); + } + else { + hasItemDefinedTransformation_Description = Standard_False; + aItemDefinedTransformation_Description.Nullify(); + } + + Handle(StepRepr_RepresentationItem) aItemDefinedTransformation_TransformItem1; + theData->ReadEntity (theNum, 4, "item_defined_transformation.transform_item1", theArch, STANDARD_TYPE(StepRepr_RepresentationItem), aItemDefinedTransformation_TransformItem1); + + Handle(StepRepr_RepresentationItem) aItemDefinedTransformation_TransformItem2; + theData->ReadEntity (theNum, 5, "item_defined_transformation.transform_item2", theArch, STANDARD_TYPE(StepRepr_RepresentationItem), aItemDefinedTransformation_TransformItem2); + + // Inherited fields of KinematicPair + + Handle(StepKinematics_KinematicJoint) aKinematicPair_Joint; + theData->ReadEntity (theNum, 6, "kinematic_pair.joint", theArch, STANDARD_TYPE(StepKinematics_KinematicJoint), aKinematicPair_Joint); + + // Inherited fields of LowOrderKinematicPair + + Standard_Boolean aLowOrderKinematicPair_TX; + theData->ReadBoolean (theNum, 7, "low_order_kinematic_pair.t_x", theArch, aLowOrderKinematicPair_TX); + + Standard_Boolean aLowOrderKinematicPair_TY; + theData->ReadBoolean (theNum, 8, "low_order_kinematic_pair.t_y", theArch, aLowOrderKinematicPair_TY); + + Standard_Boolean aLowOrderKinematicPair_TZ; + theData->ReadBoolean (theNum, 9, "low_order_kinematic_pair.t_z", theArch, aLowOrderKinematicPair_TZ); + + Standard_Boolean aLowOrderKinematicPair_RX; + theData->ReadBoolean (theNum, 10, "low_order_kinematic_pair.r_x", theArch, aLowOrderKinematicPair_RX); + + Standard_Boolean aLowOrderKinematicPair_RY; + theData->ReadBoolean (theNum, 11, "low_order_kinematic_pair.r_y", theArch, aLowOrderKinematicPair_RY); + + Standard_Boolean aLowOrderKinematicPair_RZ; + theData->ReadBoolean (theNum, 12, "low_order_kinematic_pair.r_z", theArch, aLowOrderKinematicPair_RZ); + + // Initialize entity + theEnt->Init(aRepresentationItem_Name, + aItemDefinedTransformation_Name, + hasItemDefinedTransformation_Description, + aItemDefinedTransformation_Description, + aItemDefinedTransformation_TransformItem1, + aItemDefinedTransformation_TransformItem2, + aKinematicPair_Joint, + aLowOrderKinematicPair_TX, + aLowOrderKinematicPair_TY, + aLowOrderKinematicPair_TZ, + aLowOrderKinematicPair_RX, + aLowOrderKinematicPair_RY, + aLowOrderKinematicPair_RZ); +} + +//======================================================================= +//function : WriteStep +//purpose : +//======================================================================= +void RWStepKinematics_RWSphericalPair::WriteStep (StepData_StepWriter& theSW, + const Handle(StepKinematics_SphericalPair)& theEnt) const +{ + + // Own fields of RepresentationItem + + theSW.Send (theEnt->Name()); + + // Inherited fields of ItemDefinedTransformation + + theSW.Send (theEnt->ItemDefinedTransformation()->Name()); + + if ( theEnt->ItemDefinedTransformation()->HasDescription() ) { + theSW.Send (theEnt->ItemDefinedTransformation()->Description()); + } + else theSW.SendUndef(); + + theSW.Send (theEnt->ItemDefinedTransformation()->TransformItem1()); + + theSW.Send (theEnt->ItemDefinedTransformation()->TransformItem2()); + + // Own fields of KinematicPair + + theSW.Send (theEnt->Joint()); + + // Own fields of LowOrderKinematicPair + + theSW.SendBoolean (theEnt->TX()); + + theSW.SendBoolean (theEnt->TY()); + + theSW.SendBoolean (theEnt->TZ()); + + theSW.SendBoolean (theEnt->RX()); + + theSW.SendBoolean (theEnt->RY()); + + theSW.SendBoolean (theEnt->RZ()); +} + +//======================================================================= +//function : Share +//purpose : +//======================================================================= +void RWStepKinematics_RWSphericalPair::Share (const Handle(StepKinematics_SphericalPair)& theEnt, + Interface_EntityIterator& iter) const +{ + + // Inherited fields of RepresentationItem + + // Inherited fields of ItemDefinedTransformation + + iter.AddItem (theEnt->ItemDefinedTransformation()->TransformItem1()); + + iter.AddItem (theEnt->ItemDefinedTransformation()->TransformItem2()); + + // Inherited fields of KinematicPair + + iter.AddItem (theEnt->StepKinematics_KinematicPair::Joint()); + + // Inherited fields of LowOrderKinematicPair +} diff --git a/src/RWStepKinematics/RWStepKinematics_RWSphericalPair.hxx b/src/RWStepKinematics/RWStepKinematics_RWSphericalPair.hxx new file mode 100644 index 0000000000..9f9967c3e9 --- /dev/null +++ b/src/RWStepKinematics/RWStepKinematics_RWSphericalPair.hxx @@ -0,0 +1,46 @@ +// Created on : Sat May 02 12:41:16 2020 +// Created by: Irina KRYLOVA +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V3.0 +// Copyright (c) Open CASCADE 2020 +// +// 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 _RWStepKinematics_RWSphericalPair_HeaderFile_ +#define _RWStepKinematics_RWSphericalPair_HeaderFile_ + +#include +#include +#include + +class StepData_StepReaderData; +class Interface_Check; +class StepData_StepWriter; +class Interface_EntityIterator; +class StepKinematics_SphericalPair; + +//! Read & Write tool for SphericalPair +class RWStepKinematics_RWSphericalPair +{ +public: + + DEFINE_STANDARD_ALLOC + + Standard_EXPORT RWStepKinematics_RWSphericalPair(); + + Standard_EXPORT void ReadStep(const Handle(StepData_StepReaderData)& theData, const Standard_Integer theNum, Handle(Interface_Check)& theArch, const Handle(StepKinematics_SphericalPair)& theEnt) const; + + Standard_EXPORT void WriteStep(StepData_StepWriter& theSW, const Handle(StepKinematics_SphericalPair)& theEnt) const; + + Standard_EXPORT void Share(const Handle(StepKinematics_SphericalPair)& theEnt, Interface_EntityIterator& iter) const; + +}; +#endif // _RWStepKinematics_RWSphericalPair_HeaderFile_ diff --git a/src/RWStepKinematics/RWStepKinematics_RWSphericalPairValue.cxx b/src/RWStepKinematics/RWStepKinematics_RWSphericalPairValue.cxx new file mode 100644 index 0000000000..5bf44d0d2f --- /dev/null +++ b/src/RWStepKinematics/RWStepKinematics_RWSphericalPairValue.cxx @@ -0,0 +1,133 @@ +// Created on : Sat May 02 12:41:16 2020 +// Created by: Irina KRYLOVA +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V3.0 +// Copyright (c) Open CASCADE 2020 +// +// This file is part of Open CASCADE Technology software library. +// +// This library is free software; you can redistribute it and/or modify it under +// the terms of the GNU Lesser General Public License version 2.1 as published +// by the Free Software Foundation, with special exception defined in the file +// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT +// distribution for complete text of the license and disclaimer of any warranty. +// +// Alternatively, this file may be used under the terms of Open CASCADE +// commercial license or contractual agreement. + +#include + +#include +#include +#include +#include +#include +#include +#include + +//======================================================================= +//function : RWStepKinematics_RWSphericalPairValue +//purpose : +//======================================================================= +RWStepKinematics_RWSphericalPairValue::RWStepKinematics_RWSphericalPairValue() {} + + +//======================================================================= +//function : ReadStep +//purpose : +//======================================================================= +void RWStepKinematics_RWSphericalPairValue::ReadStep (const Handle(StepData_StepReaderData)& theData, + const Standard_Integer theNum, + Handle(Interface_Check)& theArch, + const Handle(StepKinematics_SphericalPairValue)& theEnt) const +{ + // Check number of parameters + if ( ! theData->CheckNbParams(theNum,3,theArch,"spherical_pair_value") ) return; + + // Inherited fields of RepresentationItem + + Handle(TCollection_HAsciiString) aRepresentationItem_Name; + theData->ReadString (theNum, 1, "representation_item.name", theArch, aRepresentationItem_Name); + + // Inherited fields of PairValue + + Handle(StepKinematics_KinematicPair) aPairValue_AppliesToPair; + theData->ReadEntity (theNum, 2, "pair_value.applies_to_pair", theArch, STANDARD_TYPE(StepKinematics_KinematicPair), aPairValue_AppliesToPair); + + + // Own fields of SphericalPairValue + StepKinematics_SpatialRotation aInputOrientation; + if (theData->SubListNumber(theNum, 3, Standard_True)) + { + Handle(TColStd_HArray1OfReal) aItems; + Standard_Integer nsub = 0; + if (theData->ReadSubList(theNum, 3, "items", theArch, nsub)) { + Standard_Integer nb = theData->NbParams(nsub); + aItems = new TColStd_HArray1OfReal(1, nb); + Standard_Integer num2 = nsub; + for (Standard_Integer i0 = 1; i0 <= nb; i0++) { + Standard_Real anIt0; + theData->ReadReal(num2, i0, "real", theArch, anIt0); + aItems->SetValue(i0, anIt0); + } + } + aInputOrientation.SetValue(aItems); + } + else + theData->ReadEntity (theNum, 3, "input_orientation", theArch, aInputOrientation); + + // Initialize entity + theEnt->Init(aRepresentationItem_Name, + aPairValue_AppliesToPair, + aInputOrientation); +} + +//======================================================================= +//function : WriteStep +//purpose : +//======================================================================= +void RWStepKinematics_RWSphericalPairValue::WriteStep(StepData_StepWriter& theSW, + const Handle(StepKinematics_SphericalPairValue)& theEnt) const +{ + + // Own fields of RepresentationItem + + theSW.Send(theEnt->Name()); + + // Own fields of PairValue + + theSW.Send(theEnt->AppliesToPair()); + + // Own fields of SphericalPairValue + + if (!theEnt->InputOrientation().YprRotation().IsNull()) + { + // Inherited field : YPR + theSW.OpenSub(); + for (Standard_Integer i = 1; i <= theEnt->InputOrientation().YprRotation()->Length(); i++) { + theSW.Send(theEnt->InputOrientation().YprRotation()->Value(i)); + } + theSW.CloseSub(); + } + else + theSW.Send(theEnt->InputOrientation().Value()); +} + +//======================================================================= +//function : Share +//purpose : +//======================================================================= +void RWStepKinematics_RWSphericalPairValue::Share (const Handle(StepKinematics_SphericalPairValue)& theEnt, + Interface_EntityIterator& iter) const +{ + + // Inherited fields of RepresentationItem + + // Inherited fields of PairValue + + iter.AddItem (theEnt->StepKinematics_PairValue::AppliesToPair()); + + // Own fields of SphericalPairValue + + if (!theEnt->InputOrientation().RotationAboutDirection().IsNull()) + iter.AddItem(theEnt->InputOrientation().Value()); +} diff --git a/src/RWStepKinematics/RWStepKinematics_RWSphericalPairValue.hxx b/src/RWStepKinematics/RWStepKinematics_RWSphericalPairValue.hxx new file mode 100644 index 0000000000..f145b48a11 --- /dev/null +++ b/src/RWStepKinematics/RWStepKinematics_RWSphericalPairValue.hxx @@ -0,0 +1,46 @@ +// Created on : Sat May 02 12:41:16 2020 +// Created by: Irina KRYLOVA +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V3.0 +// Copyright (c) Open CASCADE 2020 +// +// 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 _RWStepKinematics_RWSphericalPairValue_HeaderFile_ +#define _RWStepKinematics_RWSphericalPairValue_HeaderFile_ + +#include +#include +#include + +class StepData_StepReaderData; +class Interface_Check; +class StepData_StepWriter; +class Interface_EntityIterator; +class StepKinematics_SphericalPairValue; + +//! Read & Write tool for SphericalPairValue +class RWStepKinematics_RWSphericalPairValue +{ +public: + + DEFINE_STANDARD_ALLOC + + Standard_EXPORT RWStepKinematics_RWSphericalPairValue(); + + Standard_EXPORT void ReadStep(const Handle(StepData_StepReaderData)& theData, const Standard_Integer theNum, Handle(Interface_Check)& theArch, const Handle(StepKinematics_SphericalPairValue)& theEnt) const; + + Standard_EXPORT void WriteStep(StepData_StepWriter& theSW, const Handle(StepKinematics_SphericalPairValue)& theEnt) const; + + Standard_EXPORT void Share(const Handle(StepKinematics_SphericalPairValue)& theEnt, Interface_EntityIterator& iter) const; + +}; +#endif // _RWStepKinematics_RWSphericalPairValue_HeaderFile_ diff --git a/src/RWStepKinematics/RWStepKinematics_RWSphericalPairWithPin.cxx b/src/RWStepKinematics/RWStepKinematics_RWSphericalPairWithPin.cxx new file mode 100644 index 0000000000..540f91b9cf --- /dev/null +++ b/src/RWStepKinematics/RWStepKinematics_RWSphericalPairWithPin.cxx @@ -0,0 +1,180 @@ +// Created on : Sat May 02 12:41:16 2020 +// Created by: Irina KRYLOVA +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V3.0 +// Copyright (c) Open CASCADE 2020 +// +// This file is part of Open CASCADE Technology software library. +// +// This library is free software; you can redistribute it and/or modify it under +// the terms of the GNU Lesser General Public License version 2.1 as published +// by the Free Software Foundation, with special exception defined in the file +// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT +// distribution for complete text of the license and disclaimer of any warranty. +// +// Alternatively, this file may be used under the terms of Open CASCADE +// commercial license or contractual agreement. + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +//======================================================================= +//function : RWStepKinematics_RWSphericalPairWithPin +//purpose : +//======================================================================= +RWStepKinematics_RWSphericalPairWithPin::RWStepKinematics_RWSphericalPairWithPin() {} + + +//======================================================================= +//function : ReadStep +//purpose : +//======================================================================= +void RWStepKinematics_RWSphericalPairWithPin::ReadStep (const Handle(StepData_StepReaderData)& theData, + const Standard_Integer theNum, + Handle(Interface_Check)& theArch, + const Handle(StepKinematics_SphericalPairWithPin)& theEnt) const +{ + // Check number of parameters + if ( ! theData->CheckNbParams(theNum,12,theArch,"spherical_pair_with_pin") ) return; + + // Inherited fields of RepresentationItem + + Handle(TCollection_HAsciiString) aRepresentationItem_Name; + theData->ReadString (theNum, 1, "representation_item.name", theArch, aRepresentationItem_Name); + + // Inherited fields of ItemDefinedTransformation + + Handle(TCollection_HAsciiString) aItemDefinedTransformation_Name; + theData->ReadString (theNum, 2, "item_defined_transformation.name", theArch, aItemDefinedTransformation_Name); + + Handle(TCollection_HAsciiString) aItemDefinedTransformation_Description; + Standard_Boolean hasItemDefinedTransformation_Description = Standard_True; + if ( theData->IsParamDefined (theNum,3) ) { + theData->ReadString (theNum, 3, "item_defined_transformation.description", theArch, aItemDefinedTransformation_Description); + } + else { + hasItemDefinedTransformation_Description = Standard_False; + aItemDefinedTransformation_Description.Nullify(); + } + + Handle(StepRepr_RepresentationItem) aItemDefinedTransformation_TransformItem1; + theData->ReadEntity (theNum, 4, "item_defined_transformation.transform_item1", theArch, STANDARD_TYPE(StepRepr_RepresentationItem), aItemDefinedTransformation_TransformItem1); + + Handle(StepRepr_RepresentationItem) aItemDefinedTransformation_TransformItem2; + theData->ReadEntity (theNum, 5, "item_defined_transformation.transform_item2", theArch, STANDARD_TYPE(StepRepr_RepresentationItem), aItemDefinedTransformation_TransformItem2); + + // Inherited fields of KinematicPair + + Handle(StepKinematics_KinematicJoint) aKinematicPair_Joint; + theData->ReadEntity (theNum, 6, "kinematic_pair.joint", theArch, STANDARD_TYPE(StepKinematics_KinematicJoint), aKinematicPair_Joint); + + // Inherited fields of LowOrderKinematicPair + + Standard_Boolean aLowOrderKinematicPair_TX; + theData->ReadBoolean (theNum, 7, "low_order_kinematic_pair.t_x", theArch, aLowOrderKinematicPair_TX); + + Standard_Boolean aLowOrderKinematicPair_TY; + theData->ReadBoolean (theNum, 8, "low_order_kinematic_pair.t_y", theArch, aLowOrderKinematicPair_TY); + + Standard_Boolean aLowOrderKinematicPair_TZ; + theData->ReadBoolean (theNum, 9, "low_order_kinematic_pair.t_z", theArch, aLowOrderKinematicPair_TZ); + + Standard_Boolean aLowOrderKinematicPair_RX; + theData->ReadBoolean (theNum, 10, "low_order_kinematic_pair.r_x", theArch, aLowOrderKinematicPair_RX); + + Standard_Boolean aLowOrderKinematicPair_RY; + theData->ReadBoolean (theNum, 11, "low_order_kinematic_pair.r_y", theArch, aLowOrderKinematicPair_RY); + + Standard_Boolean aLowOrderKinematicPair_RZ; + theData->ReadBoolean (theNum, 12, "low_order_kinematic_pair.r_z", theArch, aLowOrderKinematicPair_RZ); + + // Initialize entity + theEnt->Init(aRepresentationItem_Name, + aItemDefinedTransformation_Name, + hasItemDefinedTransformation_Description, + aItemDefinedTransformation_Description, + aItemDefinedTransformation_TransformItem1, + aItemDefinedTransformation_TransformItem2, + aKinematicPair_Joint, + aLowOrderKinematicPair_TX, + aLowOrderKinematicPair_TY, + aLowOrderKinematicPair_TZ, + aLowOrderKinematicPair_RX, + aLowOrderKinematicPair_RY, + aLowOrderKinematicPair_RZ); +} + +//======================================================================= +//function : WriteStep +//purpose : +//======================================================================= +void RWStepKinematics_RWSphericalPairWithPin::WriteStep (StepData_StepWriter& theSW, + const Handle(StepKinematics_SphericalPairWithPin)& theEnt) const +{ + + // Own fields of RepresentationItem + + theSW.Send (theEnt->Name()); + + // Inherited fields of ItemDefinedTransformation + + theSW.Send (theEnt->ItemDefinedTransformation()->Name()); + + if ( theEnt->ItemDefinedTransformation()->HasDescription() ) { + theSW.Send (theEnt->ItemDefinedTransformation()->Description()); + } + else theSW.SendUndef(); + + theSW.Send (theEnt->ItemDefinedTransformation()->TransformItem1()); + + theSW.Send (theEnt->ItemDefinedTransformation()->TransformItem2()); + + // Own fields of KinematicPair + + theSW.Send (theEnt->Joint()); + + // Own fields of LowOrderKinematicPair + + theSW.SendBoolean (theEnt->TX()); + + theSW.SendBoolean (theEnt->TY()); + + theSW.SendBoolean (theEnt->TZ()); + + theSW.SendBoolean (theEnt->RX()); + + theSW.SendBoolean (theEnt->RY()); + + theSW.SendBoolean (theEnt->RZ()); +} + +//======================================================================= +//function : Share +//purpose : +//======================================================================= +void RWStepKinematics_RWSphericalPairWithPin::Share (const Handle(StepKinematics_SphericalPairWithPin)& theEnt, + Interface_EntityIterator& iter) const +{ + + // Inherited fields of RepresentationItem + + // Inherited fields of ItemDefinedTransformation + + iter.AddItem (theEnt->ItemDefinedTransformation()->TransformItem1()); + + iter.AddItem (theEnt->ItemDefinedTransformation()->TransformItem2()); + + // Inherited fields of KinematicPair + + iter.AddItem (theEnt->StepKinematics_KinematicPair::Joint()); + + // Inherited fields of LowOrderKinematicPair +} diff --git a/src/RWStepKinematics/RWStepKinematics_RWSphericalPairWithPin.hxx b/src/RWStepKinematics/RWStepKinematics_RWSphericalPairWithPin.hxx new file mode 100644 index 0000000000..eb398abb53 --- /dev/null +++ b/src/RWStepKinematics/RWStepKinematics_RWSphericalPairWithPin.hxx @@ -0,0 +1,46 @@ +// Created on : Sat May 02 12:41:16 2020 +// Created by: Irina KRYLOVA +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V3.0 +// Copyright (c) Open CASCADE 2020 +// +// 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 _RWStepKinematics_RWSphericalPairWithPin_HeaderFile_ +#define _RWStepKinematics_RWSphericalPairWithPin_HeaderFile_ + +#include +#include +#include + +class StepData_StepReaderData; +class Interface_Check; +class StepData_StepWriter; +class Interface_EntityIterator; +class StepKinematics_SphericalPairWithPin; + +//! Read & Write tool for SphericalPairWithPin +class RWStepKinematics_RWSphericalPairWithPin +{ +public: + + DEFINE_STANDARD_ALLOC + + Standard_EXPORT RWStepKinematics_RWSphericalPairWithPin(); + + Standard_EXPORT void ReadStep(const Handle(StepData_StepReaderData)& theData, const Standard_Integer theNum, Handle(Interface_Check)& theArch, const Handle(StepKinematics_SphericalPairWithPin)& theEnt) const; + + Standard_EXPORT void WriteStep(StepData_StepWriter& theSW, const Handle(StepKinematics_SphericalPairWithPin)& theEnt) const; + + Standard_EXPORT void Share(const Handle(StepKinematics_SphericalPairWithPin)& theEnt, Interface_EntityIterator& iter) const; + +}; +#endif // _RWStepKinematics_RWSphericalPairWithPin_HeaderFile_ diff --git a/src/RWStepKinematics/RWStepKinematics_RWSphericalPairWithPinAndRange.cxx b/src/RWStepKinematics/RWStepKinematics_RWSphericalPairWithPinAndRange.cxx new file mode 100644 index 0000000000..5a99ab8146 --- /dev/null +++ b/src/RWStepKinematics/RWStepKinematics_RWSphericalPairWithPinAndRange.cxx @@ -0,0 +1,255 @@ +// Created on : Sat May 02 12:41:16 2020 +// Created by: Irina KRYLOVA +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V3.0 +// Copyright (c) Open CASCADE 2020 +// +// This file is part of Open CASCADE Technology software library. +// +// This library is free software; you can redistribute it and/or modify it under +// the terms of the GNU Lesser General Public License version 2.1 as published +// by the Free Software Foundation, with special exception defined in the file +// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT +// distribution for complete text of the license and disclaimer of any warranty. +// +// Alternatively, this file may be used under the terms of Open CASCADE +// commercial license or contractual agreement. + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +//======================================================================= +//function : RWStepKinematics_RWSphericalPairWithPinAndRange +//purpose : +//======================================================================= +RWStepKinematics_RWSphericalPairWithPinAndRange::RWStepKinematics_RWSphericalPairWithPinAndRange() {} + + +//======================================================================= +//function : ReadStep +//purpose : +//======================================================================= +void RWStepKinematics_RWSphericalPairWithPinAndRange::ReadStep (const Handle(StepData_StepReaderData)& theData, + const Standard_Integer theNum, + Handle(Interface_Check)& theArch, + const Handle(StepKinematics_SphericalPairWithPinAndRange)& theEnt) const +{ + // Check number of parameters + if ( ! theData->CheckNbParams(theNum,16,theArch,"spherical_pair_with_pin_and_range") ) return; + + // Inherited fields of RepresentationItem + + Handle(TCollection_HAsciiString) aRepresentationItem_Name; + theData->ReadString (theNum, 1, "representation_item.name", theArch, aRepresentationItem_Name); + + // Inherited fields of ItemDefinedTransformation + + Handle(TCollection_HAsciiString) aItemDefinedTransformation_Name; + theData->ReadString (theNum, 2, "item_defined_transformation.name", theArch, aItemDefinedTransformation_Name); + + Handle(TCollection_HAsciiString) aItemDefinedTransformation_Description; + Standard_Boolean hasItemDefinedTransformation_Description = Standard_True; + if ( theData->IsParamDefined (theNum,3) ) { + theData->ReadString (theNum, 3, "item_defined_transformation.description", theArch, aItemDefinedTransformation_Description); + } + else { + hasItemDefinedTransformation_Description = Standard_False; + aItemDefinedTransformation_Description.Nullify(); + } + + Handle(StepRepr_RepresentationItem) aItemDefinedTransformation_TransformItem1; + theData->ReadEntity (theNum, 4, "item_defined_transformation.transform_item1", theArch, STANDARD_TYPE(StepRepr_RepresentationItem), aItemDefinedTransformation_TransformItem1); + + Handle(StepRepr_RepresentationItem) aItemDefinedTransformation_TransformItem2; + theData->ReadEntity (theNum, 5, "item_defined_transformation.transform_item2", theArch, STANDARD_TYPE(StepRepr_RepresentationItem), aItemDefinedTransformation_TransformItem2); + + // Inherited fields of KinematicPair + + Handle(StepKinematics_KinematicJoint) aKinematicPair_Joint; + theData->ReadEntity (theNum, 6, "kinematic_pair.joint", theArch, STANDARD_TYPE(StepKinematics_KinematicJoint), aKinematicPair_Joint); + + // Inherited fields of LowOrderKinematicPair + + Standard_Boolean aLowOrderKinematicPair_TX; + theData->ReadBoolean (theNum, 7, "low_order_kinematic_pair.t_x", theArch, aLowOrderKinematicPair_TX); + + Standard_Boolean aLowOrderKinematicPair_TY; + theData->ReadBoolean (theNum, 8, "low_order_kinematic_pair.t_y", theArch, aLowOrderKinematicPair_TY); + + Standard_Boolean aLowOrderKinematicPair_TZ; + theData->ReadBoolean (theNum, 9, "low_order_kinematic_pair.t_z", theArch, aLowOrderKinematicPair_TZ); + + Standard_Boolean aLowOrderKinematicPair_RX; + theData->ReadBoolean (theNum, 10, "low_order_kinematic_pair.r_x", theArch, aLowOrderKinematicPair_RX); + + Standard_Boolean aLowOrderKinematicPair_RY; + theData->ReadBoolean (theNum, 11, "low_order_kinematic_pair.r_y", theArch, aLowOrderKinematicPair_RY); + + Standard_Boolean aLowOrderKinematicPair_RZ; + theData->ReadBoolean (theNum, 12, "low_order_kinematic_pair.r_z", theArch, aLowOrderKinematicPair_RZ); + + // Own fields of SphericalPairWithPinAndRange + + Standard_Real aLowerLimitYaw; + Standard_Boolean hasLowerLimitYaw = Standard_True; + if ( theData->IsParamDefined (theNum,13) ) { + theData->ReadReal (theNum, 13, "lower_limit_yaw", theArch, aLowerLimitYaw); + } + else { + hasLowerLimitYaw = Standard_False; + aLowerLimitYaw = 0; + } + + Standard_Real aUpperLimitYaw; + Standard_Boolean hasUpperLimitYaw = Standard_True; + if ( theData->IsParamDefined (theNum,14) ) { + theData->ReadReal (theNum, 14, "upper_limit_yaw", theArch, aUpperLimitYaw); + } + else { + hasUpperLimitYaw = Standard_False; + aUpperLimitYaw = 0; + } + + Standard_Real aLowerLimitRoll; + Standard_Boolean hasLowerLimitRoll = Standard_True; + if ( theData->IsParamDefined (theNum,15) ) { + theData->ReadReal (theNum, 15, "lower_limit_roll", theArch, aLowerLimitRoll); + } + else { + hasLowerLimitRoll = Standard_False; + aLowerLimitRoll = 0; + } + + Standard_Real aUpperLimitRoll; + Standard_Boolean hasUpperLimitRoll = Standard_True; + if ( theData->IsParamDefined (theNum,16) ) { + theData->ReadReal (theNum, 16, "upper_limit_roll", theArch, aUpperLimitRoll); + } + else { + hasUpperLimitRoll = Standard_False; + aUpperLimitRoll = 0; + } + + // Initialize entity + theEnt->Init(aRepresentationItem_Name, + aItemDefinedTransformation_Name, + hasItemDefinedTransformation_Description, + aItemDefinedTransformation_Description, + aItemDefinedTransformation_TransformItem1, + aItemDefinedTransformation_TransformItem2, + aKinematicPair_Joint, + aLowOrderKinematicPair_TX, + aLowOrderKinematicPair_TY, + aLowOrderKinematicPair_TZ, + aLowOrderKinematicPair_RX, + aLowOrderKinematicPair_RY, + aLowOrderKinematicPair_RZ, + hasLowerLimitYaw, + aLowerLimitYaw, + hasUpperLimitYaw, + aUpperLimitYaw, + hasLowerLimitRoll, + aLowerLimitRoll, + hasUpperLimitRoll, + aUpperLimitRoll); +} + +//======================================================================= +//function : WriteStep +//purpose : +//======================================================================= +void RWStepKinematics_RWSphericalPairWithPinAndRange::WriteStep (StepData_StepWriter& theSW, + const Handle(StepKinematics_SphericalPairWithPinAndRange)& theEnt) const +{ + + // Own fields of RepresentationItem + + theSW.Send (theEnt->Name()); + + // Inherited fields of ItemDefinedTransformation + + theSW.Send (theEnt->ItemDefinedTransformation()->Name()); + + if ( theEnt->ItemDefinedTransformation()->HasDescription() ) { + theSW.Send (theEnt->ItemDefinedTransformation()->Description()); + } + else theSW.SendUndef(); + + theSW.Send (theEnt->ItemDefinedTransformation()->TransformItem1()); + + theSW.Send (theEnt->ItemDefinedTransformation()->TransformItem2()); + + // Own fields of KinematicPair + + theSW.Send (theEnt->Joint()); + + // Own fields of LowOrderKinematicPair + + theSW.SendBoolean (theEnt->TX()); + + theSW.SendBoolean (theEnt->TY()); + + theSW.SendBoolean (theEnt->TZ()); + + theSW.SendBoolean (theEnt->RX()); + + theSW.SendBoolean (theEnt->RY()); + + theSW.SendBoolean (theEnt->RZ()); + + // Own fields of SphericalPairWithPinAndRange + + if ( theEnt->HasLowerLimitYaw() ) { + theSW.Send (theEnt->LowerLimitYaw()); + } + else theSW.SendUndef(); + + if ( theEnt->HasUpperLimitYaw() ) { + theSW.Send (theEnt->UpperLimitYaw()); + } + else theSW.SendUndef(); + + if ( theEnt->HasLowerLimitRoll() ) { + theSW.Send (theEnt->LowerLimitRoll()); + } + else theSW.SendUndef(); + + if ( theEnt->HasUpperLimitRoll() ) { + theSW.Send (theEnt->UpperLimitRoll()); + } + else theSW.SendUndef(); +} + +//======================================================================= +//function : Share +//purpose : +//======================================================================= +void RWStepKinematics_RWSphericalPairWithPinAndRange::Share (const Handle(StepKinematics_SphericalPairWithPinAndRange)& theEnt, + Interface_EntityIterator& iter) const +{ + + // Inherited fields of RepresentationItem + + // Inherited fields of ItemDefinedTransformation + + iter.AddItem (theEnt->ItemDefinedTransformation()->TransformItem1()); + + iter.AddItem (theEnt->ItemDefinedTransformation()->TransformItem2()); + + // Inherited fields of KinematicPair + + iter.AddItem (theEnt->StepKinematics_KinematicPair::Joint()); + + // Inherited fields of LowOrderKinematicPair + + // Own fields of SphericalPairWithPinAndRange +} diff --git a/src/RWStepKinematics/RWStepKinematics_RWSphericalPairWithPinAndRange.hxx b/src/RWStepKinematics/RWStepKinematics_RWSphericalPairWithPinAndRange.hxx new file mode 100644 index 0000000000..8a0e0b4c05 --- /dev/null +++ b/src/RWStepKinematics/RWStepKinematics_RWSphericalPairWithPinAndRange.hxx @@ -0,0 +1,46 @@ +// Created on : Sat May 02 12:41:16 2020 +// Created by: Irina KRYLOVA +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V3.0 +// Copyright (c) Open CASCADE 2020 +// +// 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 _RWStepKinematics_RWSphericalPairWithPinAndRange_HeaderFile_ +#define _RWStepKinematics_RWSphericalPairWithPinAndRange_HeaderFile_ + +#include +#include +#include + +class StepData_StepReaderData; +class Interface_Check; +class StepData_StepWriter; +class Interface_EntityIterator; +class StepKinematics_SphericalPairWithPinAndRange; + +//! Read & Write tool for SphericalPairWithPinAndRange +class RWStepKinematics_RWSphericalPairWithPinAndRange +{ +public: + + DEFINE_STANDARD_ALLOC + + Standard_EXPORT RWStepKinematics_RWSphericalPairWithPinAndRange(); + + Standard_EXPORT void ReadStep(const Handle(StepData_StepReaderData)& theData, const Standard_Integer theNum, Handle(Interface_Check)& theArch, const Handle(StepKinematics_SphericalPairWithPinAndRange)& theEnt) const; + + Standard_EXPORT void WriteStep(StepData_StepWriter& theSW, const Handle(StepKinematics_SphericalPairWithPinAndRange)& theEnt) const; + + Standard_EXPORT void Share(const Handle(StepKinematics_SphericalPairWithPinAndRange)& theEnt, Interface_EntityIterator& iter) const; + +}; +#endif // _RWStepKinematics_RWSphericalPairWithPinAndRange_HeaderFile_ diff --git a/src/RWStepKinematics/RWStepKinematics_RWSphericalPairWithRange.cxx b/src/RWStepKinematics/RWStepKinematics_RWSphericalPairWithRange.cxx new file mode 100644 index 0000000000..edc3148cba --- /dev/null +++ b/src/RWStepKinematics/RWStepKinematics_RWSphericalPairWithRange.cxx @@ -0,0 +1,289 @@ +// Created on : Sat May 02 12:41:16 2020 +// Created by: Irina KRYLOVA +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V3.0 +// Copyright (c) Open CASCADE 2020 +// +// This file is part of Open CASCADE Technology software library. +// +// This library is free software; you can redistribute it and/or modify it under +// the terms of the GNU Lesser General Public License version 2.1 as published +// by the Free Software Foundation, with special exception defined in the file +// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT +// distribution for complete text of the license and disclaimer of any warranty. +// +// Alternatively, this file may be used under the terms of Open CASCADE +// commercial license or contractual agreement. + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +//======================================================================= +//function : RWStepKinematics_RWSphericalPairWithRange +//purpose : +//======================================================================= +RWStepKinematics_RWSphericalPairWithRange::RWStepKinematics_RWSphericalPairWithRange() {} + + +//======================================================================= +//function : ReadStep +//purpose : +//======================================================================= +void RWStepKinematics_RWSphericalPairWithRange::ReadStep (const Handle(StepData_StepReaderData)& theData, + const Standard_Integer theNum, + Handle(Interface_Check)& theArch, + const Handle(StepKinematics_SphericalPairWithRange)& theEnt) const +{ + // Check number of parameters + if ( ! theData->CheckNbParams(theNum,18,theArch,"spherical_pair_with_range") ) return; + + // Inherited fields of RepresentationItem + + Handle(TCollection_HAsciiString) aRepresentationItem_Name; + theData->ReadString (theNum, 1, "representation_item.name", theArch, aRepresentationItem_Name); + + // Inherited fields of ItemDefinedTransformation + + Handle(TCollection_HAsciiString) aItemDefinedTransformation_Name; + theData->ReadString (theNum, 2, "item_defined_transformation.name", theArch, aItemDefinedTransformation_Name); + + Handle(TCollection_HAsciiString) aItemDefinedTransformation_Description; + Standard_Boolean hasItemDefinedTransformation_Description = Standard_True; + if ( theData->IsParamDefined (theNum,3) ) { + theData->ReadString (theNum, 3, "item_defined_transformation.description", theArch, aItemDefinedTransformation_Description); + } + else { + hasItemDefinedTransformation_Description = Standard_False; + aItemDefinedTransformation_Description.Nullify(); + } + + Handle(StepRepr_RepresentationItem) aItemDefinedTransformation_TransformItem1; + theData->ReadEntity (theNum, 4, "item_defined_transformation.transform_item1", theArch, STANDARD_TYPE(StepRepr_RepresentationItem), aItemDefinedTransformation_TransformItem1); + + Handle(StepRepr_RepresentationItem) aItemDefinedTransformation_TransformItem2; + theData->ReadEntity (theNum, 5, "item_defined_transformation.transform_item2", theArch, STANDARD_TYPE(StepRepr_RepresentationItem), aItemDefinedTransformation_TransformItem2); + + // Inherited fields of KinematicPair + + Handle(StepKinematics_KinematicJoint) aKinematicPair_Joint; + theData->ReadEntity (theNum, 6, "kinematic_pair.joint", theArch, STANDARD_TYPE(StepKinematics_KinematicJoint), aKinematicPair_Joint); + + // Inherited fields of LowOrderKinematicPair + + Standard_Boolean aLowOrderKinematicPair_TX; + theData->ReadBoolean (theNum, 7, "low_order_kinematic_pair.t_x", theArch, aLowOrderKinematicPair_TX); + + Standard_Boolean aLowOrderKinematicPair_TY; + theData->ReadBoolean (theNum, 8, "low_order_kinematic_pair.t_y", theArch, aLowOrderKinematicPair_TY); + + Standard_Boolean aLowOrderKinematicPair_TZ; + theData->ReadBoolean (theNum, 9, "low_order_kinematic_pair.t_z", theArch, aLowOrderKinematicPair_TZ); + + Standard_Boolean aLowOrderKinematicPair_RX; + theData->ReadBoolean (theNum, 10, "low_order_kinematic_pair.r_x", theArch, aLowOrderKinematicPair_RX); + + Standard_Boolean aLowOrderKinematicPair_RY; + theData->ReadBoolean (theNum, 11, "low_order_kinematic_pair.r_y", theArch, aLowOrderKinematicPair_RY); + + Standard_Boolean aLowOrderKinematicPair_RZ; + theData->ReadBoolean (theNum, 12, "low_order_kinematic_pair.r_z", theArch, aLowOrderKinematicPair_RZ); + + // Own fields of SphericalPairWithRange + + Standard_Real aLowerLimitYaw; + Standard_Boolean hasLowerLimitYaw = Standard_True; + if ( theData->IsParamDefined (theNum,13) ) { + theData->ReadReal (theNum, 13, "lower_limit_yaw", theArch, aLowerLimitYaw); + } + else { + hasLowerLimitYaw = Standard_False; + aLowerLimitYaw = 0; + } + + Standard_Real aUpperLimitYaw; + Standard_Boolean hasUpperLimitYaw = Standard_True; + if ( theData->IsParamDefined (theNum,14) ) { + theData->ReadReal (theNum, 14, "upper_limit_yaw", theArch, aUpperLimitYaw); + } + else { + hasUpperLimitYaw = Standard_False; + aUpperLimitYaw = 0; + } + + Standard_Real aLowerLimitPitch; + Standard_Boolean hasLowerLimitPitch = Standard_True; + if ( theData->IsParamDefined (theNum,15) ) { + theData->ReadReal (theNum, 15, "lower_limit_pitch", theArch, aLowerLimitPitch); + } + else { + hasLowerLimitPitch = Standard_False; + aLowerLimitPitch = 0; + } + + Standard_Real aUpperLimitPitch; + Standard_Boolean hasUpperLimitPitch = Standard_True; + if ( theData->IsParamDefined (theNum,16) ) { + theData->ReadReal (theNum, 16, "upper_limit_pitch", theArch, aUpperLimitPitch); + } + else { + hasUpperLimitPitch = Standard_False; + aUpperLimitPitch = 0; + } + + Standard_Real aLowerLimitRoll; + Standard_Boolean hasLowerLimitRoll = Standard_True; + if ( theData->IsParamDefined (theNum,17) ) { + theData->ReadReal (theNum, 17, "lower_limit_roll", theArch, aLowerLimitRoll); + } + else { + hasLowerLimitRoll = Standard_False; + aLowerLimitRoll = 0; + } + + Standard_Real aUpperLimitRoll; + Standard_Boolean hasUpperLimitRoll = Standard_True; + if ( theData->IsParamDefined (theNum,18) ) { + theData->ReadReal (theNum, 18, "upper_limit_roll", theArch, aUpperLimitRoll); + } + else { + hasUpperLimitRoll = Standard_False; + aUpperLimitRoll = 0; + } + + // Initialize entity + theEnt->Init(aRepresentationItem_Name, + aItemDefinedTransformation_Name, + hasItemDefinedTransformation_Description, + aItemDefinedTransformation_Description, + aItemDefinedTransformation_TransformItem1, + aItemDefinedTransformation_TransformItem2, + aKinematicPair_Joint, + aLowOrderKinematicPair_TX, + aLowOrderKinematicPair_TY, + aLowOrderKinematicPair_TZ, + aLowOrderKinematicPair_RX, + aLowOrderKinematicPair_RY, + aLowOrderKinematicPair_RZ, + hasLowerLimitYaw, + aLowerLimitYaw, + hasUpperLimitYaw, + aUpperLimitYaw, + hasLowerLimitPitch, + aLowerLimitPitch, + hasUpperLimitPitch, + aUpperLimitPitch, + hasLowerLimitRoll, + aLowerLimitRoll, + hasUpperLimitRoll, + aUpperLimitRoll); +} + +//======================================================================= +//function : WriteStep +//purpose : +//======================================================================= +void RWStepKinematics_RWSphericalPairWithRange::WriteStep (StepData_StepWriter& theSW, + const Handle(StepKinematics_SphericalPairWithRange)& theEnt) const +{ + + // Own fields of RepresentationItem + + theSW.Send (theEnt->Name()); + + // Inherited fields of ItemDefinedTransformation + + theSW.Send (theEnt->ItemDefinedTransformation()->Name()); + + if ( theEnt->ItemDefinedTransformation()->HasDescription() ) { + theSW.Send (theEnt->ItemDefinedTransformation()->Description()); + } + else theSW.SendUndef(); + + theSW.Send (theEnt->ItemDefinedTransformation()->TransformItem1()); + + theSW.Send (theEnt->ItemDefinedTransformation()->TransformItem2()); + + // Own fields of KinematicPair + + theSW.Send (theEnt->Joint()); + + // Own fields of LowOrderKinematicPair + + theSW.SendBoolean (theEnt->TX()); + + theSW.SendBoolean (theEnt->TY()); + + theSW.SendBoolean (theEnt->TZ()); + + theSW.SendBoolean (theEnt->RX()); + + theSW.SendBoolean (theEnt->RY()); + + theSW.SendBoolean (theEnt->RZ()); + + // Own fields of SphericalPairWithRange + + if ( theEnt->HasLowerLimitYaw() ) { + theSW.Send (theEnt->LowerLimitYaw()); + } + else theSW.SendUndef(); + + if ( theEnt->HasUpperLimitYaw() ) { + theSW.Send (theEnt->UpperLimitYaw()); + } + else theSW.SendUndef(); + + if ( theEnt->HasLowerLimitPitch() ) { + theSW.Send (theEnt->LowerLimitPitch()); + } + else theSW.SendUndef(); + + if ( theEnt->HasUpperLimitPitch() ) { + theSW.Send (theEnt->UpperLimitPitch()); + } + else theSW.SendUndef(); + + if ( theEnt->HasLowerLimitRoll() ) { + theSW.Send (theEnt->LowerLimitRoll()); + } + else theSW.SendUndef(); + + if ( theEnt->HasUpperLimitRoll() ) { + theSW.Send (theEnt->UpperLimitRoll()); + } + else theSW.SendUndef(); +} + +//======================================================================= +//function : Share +//purpose : +//======================================================================= +void RWStepKinematics_RWSphericalPairWithRange::Share (const Handle(StepKinematics_SphericalPairWithRange)& theEnt, + Interface_EntityIterator& iter) const +{ + + // Inherited fields of RepresentationItem + + // Inherited fields of ItemDefinedTransformation + + iter.AddItem (theEnt->ItemDefinedTransformation()->TransformItem1()); + + iter.AddItem (theEnt->ItemDefinedTransformation()->TransformItem2()); + + // Inherited fields of KinematicPair + + iter.AddItem (theEnt->StepKinematics_KinematicPair::Joint()); + + // Inherited fields of LowOrderKinematicPair + + // Own fields of SphericalPairWithRange +} diff --git a/src/RWStepKinematics/RWStepKinematics_RWSphericalPairWithRange.hxx b/src/RWStepKinematics/RWStepKinematics_RWSphericalPairWithRange.hxx new file mode 100644 index 0000000000..f08c617128 --- /dev/null +++ b/src/RWStepKinematics/RWStepKinematics_RWSphericalPairWithRange.hxx @@ -0,0 +1,46 @@ +// Created on : Sat May 02 12:41:16 2020 +// Created by: Irina KRYLOVA +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V3.0 +// Copyright (c) Open CASCADE 2020 +// +// 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 _RWStepKinematics_RWSphericalPairWithRange_HeaderFile_ +#define _RWStepKinematics_RWSphericalPairWithRange_HeaderFile_ + +#include +#include +#include + +class StepData_StepReaderData; +class Interface_Check; +class StepData_StepWriter; +class Interface_EntityIterator; +class StepKinematics_SphericalPairWithRange; + +//! Read & Write tool for SphericalPairWithRange +class RWStepKinematics_RWSphericalPairWithRange +{ +public: + + DEFINE_STANDARD_ALLOC + + Standard_EXPORT RWStepKinematics_RWSphericalPairWithRange(); + + Standard_EXPORT void ReadStep(const Handle(StepData_StepReaderData)& theData, const Standard_Integer theNum, Handle(Interface_Check)& theArch, const Handle(StepKinematics_SphericalPairWithRange)& theEnt) const; + + Standard_EXPORT void WriteStep(StepData_StepWriter& theSW, const Handle(StepKinematics_SphericalPairWithRange)& theEnt) const; + + Standard_EXPORT void Share(const Handle(StepKinematics_SphericalPairWithRange)& theEnt, Interface_EntityIterator& iter) const; + +}; +#endif // _RWStepKinematics_RWSphericalPairWithRange_HeaderFile_ diff --git a/src/RWStepKinematics/RWStepKinematics_RWSurfacePairWithRange.cxx b/src/RWStepKinematics/RWStepKinematics_RWSurfacePairWithRange.cxx new file mode 100644 index 0000000000..f7469aee8e --- /dev/null +++ b/src/RWStepKinematics/RWStepKinematics_RWSurfacePairWithRange.cxx @@ -0,0 +1,225 @@ +// Created on : Sat May 02 12:41:16 2020 +// Created by: Irina KRYLOVA +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V3.0 +// Copyright (c) Open CASCADE 2020 +// +// This file is part of Open CASCADE Technology software library. +// +// This library is free software; you can redistribute it and/or modify it under +// the terms of the GNU Lesser General Public License version 2.1 as published +// by the Free Software Foundation, with special exception defined in the file +// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT +// distribution for complete text of the license and disclaimer of any warranty. +// +// Alternatively, this file may be used under the terms of Open CASCADE +// commercial license or contractual agreement. + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +//======================================================================= +//function : RWStepKinematics_RWSurfacePairWithRange +//purpose : +//======================================================================= +RWStepKinematics_RWSurfacePairWithRange::RWStepKinematics_RWSurfacePairWithRange() {} + + +//======================================================================= +//function : ReadStep +//purpose : +//======================================================================= +void RWStepKinematics_RWSurfacePairWithRange::ReadStep (const Handle(StepData_StepReaderData)& theData, + const Standard_Integer theNum, + Handle(Interface_Check)& theArch, + const Handle(StepKinematics_SurfacePairWithRange)& theEnt) const +{ + // Check number of parameters + if ( ! theData->CheckNbParams(theNum,13,theArch,"surface_pair_with_range") ) return; + + // Inherited fields of RepresentationItem + + Handle(TCollection_HAsciiString) aRepresentationItem_Name; + theData->ReadString (theNum, 1, "representation_item.name", theArch, aRepresentationItem_Name); + + // Inherited fields of ItemDefinedTransformation + + Handle(TCollection_HAsciiString) aItemDefinedTransformation_Name; + theData->ReadString (theNum, 2, "item_defined_transformation.name", theArch, aItemDefinedTransformation_Name); + + Handle(TCollection_HAsciiString) aItemDefinedTransformation_Description; + Standard_Boolean hasItemDefinedTransformation_Description = Standard_True; + if ( theData->IsParamDefined (theNum,3) ) { + theData->ReadString (theNum, 3, "item_defined_transformation.description", theArch, aItemDefinedTransformation_Description); + } + else { + hasItemDefinedTransformation_Description = Standard_False; + aItemDefinedTransformation_Description.Nullify(); + } + + Handle(StepRepr_RepresentationItem) aItemDefinedTransformation_TransformItem1; + theData->ReadEntity (theNum, 4, "item_defined_transformation.transform_item1", theArch, STANDARD_TYPE(StepRepr_RepresentationItem), aItemDefinedTransformation_TransformItem1); + + Handle(StepRepr_RepresentationItem) aItemDefinedTransformation_TransformItem2; + theData->ReadEntity (theNum, 5, "item_defined_transformation.transform_item2", theArch, STANDARD_TYPE(StepRepr_RepresentationItem), aItemDefinedTransformation_TransformItem2); + + // Inherited fields of KinematicPair + + Handle(StepKinematics_KinematicJoint) aKinematicPair_Joint; + theData->ReadEntity (theNum, 6, "kinematic_pair.joint", theArch, STANDARD_TYPE(StepKinematics_KinematicJoint), aKinematicPair_Joint); + + // Inherited fields of SurfacePair + + Handle(StepGeom_Surface) aSurfacePair_Surface1; + theData->ReadEntity (theNum, 7, "surface_pair.surface1", theArch, STANDARD_TYPE(StepGeom_Surface), aSurfacePair_Surface1); + + Handle(StepGeom_Surface) aSurfacePair_Surface2; + theData->ReadEntity (theNum, 8, "surface_pair.surface2", theArch, STANDARD_TYPE(StepGeom_Surface), aSurfacePair_Surface2); + + Standard_Boolean aSurfacePair_Orientation; + theData->ReadBoolean (theNum, 9, "surface_pair.orientation", theArch, aSurfacePair_Orientation); + + // Own fields of SurfacePairWithRange + + Handle(StepGeom_RectangularTrimmedSurface) aRangeOnSurface1; + theData->ReadEntity (theNum, 10, "range_on_surface1", theArch, STANDARD_TYPE(StepGeom_RectangularTrimmedSurface), aRangeOnSurface1); + + Handle(StepGeom_RectangularTrimmedSurface) aRangeOnSurface2; + theData->ReadEntity (theNum, 11, "range_on_surface2", theArch, STANDARD_TYPE(StepGeom_RectangularTrimmedSurface), aRangeOnSurface2); + + Standard_Real aLowerLimitActualRotation; + Standard_Boolean hasLowerLimitActualRotation = Standard_True; + if ( theData->IsParamDefined (theNum,12) ) { + theData->ReadReal (theNum, 12, "lower_limit_actual_rotation", theArch, aLowerLimitActualRotation); + } + else { + hasLowerLimitActualRotation = Standard_False; + aLowerLimitActualRotation = 0; + } + + Standard_Real aUpperLimitActualRotation; + Standard_Boolean hasUpperLimitActualRotation = Standard_True; + if ( theData->IsParamDefined (theNum,13) ) { + theData->ReadReal (theNum, 13, "upper_limit_actual_rotation", theArch, aUpperLimitActualRotation); + } + else { + hasUpperLimitActualRotation = Standard_False; + aUpperLimitActualRotation = 0; + } + + // Initialize entity + theEnt->Init(aRepresentationItem_Name, + aItemDefinedTransformation_Name, + hasItemDefinedTransformation_Description, + aItemDefinedTransformation_Description, + aItemDefinedTransformation_TransformItem1, + aItemDefinedTransformation_TransformItem2, + aKinematicPair_Joint, + aSurfacePair_Surface1, + aSurfacePair_Surface2, + aSurfacePair_Orientation, + aRangeOnSurface1, + aRangeOnSurface2, + hasLowerLimitActualRotation, + aLowerLimitActualRotation, + hasUpperLimitActualRotation, + aUpperLimitActualRotation); +} + +//======================================================================= +//function : WriteStep +//purpose : +//======================================================================= +void RWStepKinematics_RWSurfacePairWithRange::WriteStep (StepData_StepWriter& theSW, + const Handle(StepKinematics_SurfacePairWithRange)& theEnt) const +{ + + // Own fields of RepresentationItem + + theSW.Send (theEnt->Name()); + + // Inherited fields of ItemDefinedTransformation + + theSW.Send (theEnt->ItemDefinedTransformation()->Name()); + + if ( theEnt->ItemDefinedTransformation()->HasDescription() ) { + theSW.Send (theEnt->ItemDefinedTransformation()->Description()); + } + else theSW.SendUndef(); + + theSW.Send (theEnt->ItemDefinedTransformation()->TransformItem1()); + + theSW.Send (theEnt->ItemDefinedTransformation()->TransformItem2()); + + // Own fields of KinematicPair + + theSW.Send (theEnt->Joint()); + + // Own fields of SurfacePair + + theSW.Send (theEnt->Surface1()); + + theSW.Send (theEnt->Surface2()); + + theSW.SendBoolean (theEnt->Orientation()); + + // Own fields of SurfacePairWithRange + + theSW.Send (theEnt->RangeOnSurface1()); + + theSW.Send (theEnt->RangeOnSurface2()); + + if ( theEnt->HasLowerLimitActualRotation() ) { + theSW.Send (theEnt->LowerLimitActualRotation()); + } + else theSW.SendUndef(); + + if ( theEnt->HasUpperLimitActualRotation() ) { + theSW.Send (theEnt->UpperLimitActualRotation()); + } + else theSW.SendUndef(); +} + +//======================================================================= +//function : Share +//purpose : +//======================================================================= +void RWStepKinematics_RWSurfacePairWithRange::Share (const Handle(StepKinematics_SurfacePairWithRange)& theEnt, + Interface_EntityIterator& iter) const +{ + + // Inherited fields of RepresentationItem + + // Inherited fields of ItemDefinedTransformation + + iter.AddItem (theEnt->ItemDefinedTransformation()->TransformItem1()); + + iter.AddItem (theEnt->ItemDefinedTransformation()->TransformItem2()); + + // Inherited fields of KinematicPair + + iter.AddItem (theEnt->StepKinematics_KinematicPair::Joint()); + + // Inherited fields of SurfacePair + + iter.AddItem (theEnt->StepKinematics_SurfacePair::Surface1()); + + iter.AddItem (theEnt->StepKinematics_SurfacePair::Surface2()); + + // Own fields of SurfacePairWithRange + + iter.AddItem (theEnt->RangeOnSurface1()); + + iter.AddItem (theEnt->RangeOnSurface2()); +} diff --git a/src/RWStepKinematics/RWStepKinematics_RWSurfacePairWithRange.hxx b/src/RWStepKinematics/RWStepKinematics_RWSurfacePairWithRange.hxx new file mode 100644 index 0000000000..b423e4b7ef --- /dev/null +++ b/src/RWStepKinematics/RWStepKinematics_RWSurfacePairWithRange.hxx @@ -0,0 +1,46 @@ +// Created on : Sat May 02 12:41:16 2020 +// Created by: Irina KRYLOVA +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V3.0 +// Copyright (c) Open CASCADE 2020 +// +// 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 _RWStepKinematics_RWSurfacePairWithRange_HeaderFile_ +#define _RWStepKinematics_RWSurfacePairWithRange_HeaderFile_ + +#include +#include +#include + +class StepData_StepReaderData; +class Interface_Check; +class StepData_StepWriter; +class Interface_EntityIterator; +class StepKinematics_SurfacePairWithRange; + +//! Read & Write tool for SurfacePairWithRange +class RWStepKinematics_RWSurfacePairWithRange +{ +public: + + DEFINE_STANDARD_ALLOC + + Standard_EXPORT RWStepKinematics_RWSurfacePairWithRange(); + + Standard_EXPORT void ReadStep(const Handle(StepData_StepReaderData)& theData, const Standard_Integer theNum, Handle(Interface_Check)& theArch, const Handle(StepKinematics_SurfacePairWithRange)& theEnt) const; + + Standard_EXPORT void WriteStep(StepData_StepWriter& theSW, const Handle(StepKinematics_SurfacePairWithRange)& theEnt) const; + + Standard_EXPORT void Share(const Handle(StepKinematics_SurfacePairWithRange)& theEnt, Interface_EntityIterator& iter) const; + +}; +#endif // _RWStepKinematics_RWSurfacePairWithRange_HeaderFile_ diff --git a/src/RWStepKinematics/RWStepKinematics_RWUnconstrainedPair.cxx b/src/RWStepKinematics/RWStepKinematics_RWUnconstrainedPair.cxx new file mode 100644 index 0000000000..16163a9dbf --- /dev/null +++ b/src/RWStepKinematics/RWStepKinematics_RWUnconstrainedPair.cxx @@ -0,0 +1,180 @@ +// Created on : Sat May 02 12:41:16 2020 +// Created by: Irina KRYLOVA +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V3.0 +// Copyright (c) Open CASCADE 2020 +// +// This file is part of Open CASCADE Technology software library. +// +// This library is free software; you can redistribute it and/or modify it under +// the terms of the GNU Lesser General Public License version 2.1 as published +// by the Free Software Foundation, with special exception defined in the file +// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT +// distribution for complete text of the license and disclaimer of any warranty. +// +// Alternatively, this file may be used under the terms of Open CASCADE +// commercial license or contractual agreement. + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +//======================================================================= +//function : RWStepKinematics_RWUnconstrainedPair +//purpose : +//======================================================================= +RWStepKinematics_RWUnconstrainedPair::RWStepKinematics_RWUnconstrainedPair() {} + + +//======================================================================= +//function : ReadStep +//purpose : +//======================================================================= +void RWStepKinematics_RWUnconstrainedPair::ReadStep (const Handle(StepData_StepReaderData)& theData, + const Standard_Integer theNum, + Handle(Interface_Check)& theArch, + const Handle(StepKinematics_UnconstrainedPair)& theEnt) const +{ + // Check number of parameters + if ( ! theData->CheckNbParams(theNum,12,theArch,"unconstrained_pair") ) return; + + // Inherited fields of RepresentationItem + + Handle(TCollection_HAsciiString) aRepresentationItem_Name; + theData->ReadString (theNum, 1, "representation_item.name", theArch, aRepresentationItem_Name); + + // Inherited fields of ItemDefinedTransformation + + Handle(TCollection_HAsciiString) aItemDefinedTransformation_Name; + theData->ReadString (theNum, 2, "item_defined_transformation.name", theArch, aItemDefinedTransformation_Name); + + Handle(TCollection_HAsciiString) aItemDefinedTransformation_Description; + Standard_Boolean hasItemDefinedTransformation_Description = Standard_True; + if ( theData->IsParamDefined (theNum,3) ) { + theData->ReadString (theNum, 3, "item_defined_transformation.description", theArch, aItemDefinedTransformation_Description); + } + else { + hasItemDefinedTransformation_Description = Standard_False; + aItemDefinedTransformation_Description.Nullify(); + } + + Handle(StepRepr_RepresentationItem) aItemDefinedTransformation_TransformItem1; + theData->ReadEntity (theNum, 4, "item_defined_transformation.transform_item1", theArch, STANDARD_TYPE(StepRepr_RepresentationItem), aItemDefinedTransformation_TransformItem1); + + Handle(StepRepr_RepresentationItem) aItemDefinedTransformation_TransformItem2; + theData->ReadEntity (theNum, 5, "item_defined_transformation.transform_item2", theArch, STANDARD_TYPE(StepRepr_RepresentationItem), aItemDefinedTransformation_TransformItem2); + + // Inherited fields of KinematicPair + + Handle(StepKinematics_KinematicJoint) aKinematicPair_Joint; + theData->ReadEntity (theNum, 6, "kinematic_pair.joint", theArch, STANDARD_TYPE(StepKinematics_KinematicJoint), aKinematicPair_Joint); + + // Inherited fields of LowOrderKinematicPair + + Standard_Boolean aLowOrderKinematicPair_TX; + theData->ReadBoolean (theNum, 7, "low_order_kinematic_pair.t_x", theArch, aLowOrderKinematicPair_TX); + + Standard_Boolean aLowOrderKinematicPair_TY; + theData->ReadBoolean (theNum, 8, "low_order_kinematic_pair.t_y", theArch, aLowOrderKinematicPair_TY); + + Standard_Boolean aLowOrderKinematicPair_TZ; + theData->ReadBoolean (theNum, 9, "low_order_kinematic_pair.t_z", theArch, aLowOrderKinematicPair_TZ); + + Standard_Boolean aLowOrderKinematicPair_RX; + theData->ReadBoolean (theNum, 10, "low_order_kinematic_pair.r_x", theArch, aLowOrderKinematicPair_RX); + + Standard_Boolean aLowOrderKinematicPair_RY; + theData->ReadBoolean (theNum, 11, "low_order_kinematic_pair.r_y", theArch, aLowOrderKinematicPair_RY); + + Standard_Boolean aLowOrderKinematicPair_RZ; + theData->ReadBoolean (theNum, 12, "low_order_kinematic_pair.r_z", theArch, aLowOrderKinematicPair_RZ); + + // Initialize entity + theEnt->Init(aRepresentationItem_Name, + aItemDefinedTransformation_Name, + hasItemDefinedTransformation_Description, + aItemDefinedTransformation_Description, + aItemDefinedTransformation_TransformItem1, + aItemDefinedTransformation_TransformItem2, + aKinematicPair_Joint, + aLowOrderKinematicPair_TX, + aLowOrderKinematicPair_TY, + aLowOrderKinematicPair_TZ, + aLowOrderKinematicPair_RX, + aLowOrderKinematicPair_RY, + aLowOrderKinematicPair_RZ); +} + +//======================================================================= +//function : WriteStep +//purpose : +//======================================================================= +void RWStepKinematics_RWUnconstrainedPair::WriteStep (StepData_StepWriter& theSW, + const Handle(StepKinematics_UnconstrainedPair)& theEnt) const +{ + + // Own fields of RepresentationItem + + theSW.Send (theEnt->Name()); + + // Inherited fields of ItemDefinedTransformation + + theSW.Send (theEnt->ItemDefinedTransformation()->Name()); + + if ( theEnt->ItemDefinedTransformation()->HasDescription() ) { + theSW.Send (theEnt->ItemDefinedTransformation()->Description()); + } + else theSW.SendUndef(); + + theSW.Send (theEnt->ItemDefinedTransformation()->TransformItem1()); + + theSW.Send (theEnt->ItemDefinedTransformation()->TransformItem2()); + + // Own fields of KinematicPair + + theSW.Send (theEnt->Joint()); + + // Own fields of LowOrderKinematicPair + + theSW.SendBoolean (theEnt->TX()); + + theSW.SendBoolean (theEnt->TY()); + + theSW.SendBoolean (theEnt->TZ()); + + theSW.SendBoolean (theEnt->RX()); + + theSW.SendBoolean (theEnt->RY()); + + theSW.SendBoolean (theEnt->RZ()); +} + +//======================================================================= +//function : Share +//purpose : +//======================================================================= +void RWStepKinematics_RWUnconstrainedPair::Share (const Handle(StepKinematics_UnconstrainedPair)& theEnt, + Interface_EntityIterator& iter) const +{ + + // Inherited fields of RepresentationItem + + // Inherited fields of ItemDefinedTransformation + + iter.AddItem (theEnt->ItemDefinedTransformation()->TransformItem1()); + + iter.AddItem (theEnt->ItemDefinedTransformation()->TransformItem2()); + + // Inherited fields of KinematicPair + + iter.AddItem (theEnt->StepKinematics_KinematicPair::Joint()); + + // Inherited fields of LowOrderKinematicPair +} diff --git a/src/RWStepKinematics/RWStepKinematics_RWUnconstrainedPair.hxx b/src/RWStepKinematics/RWStepKinematics_RWUnconstrainedPair.hxx new file mode 100644 index 0000000000..9b262bd9ae --- /dev/null +++ b/src/RWStepKinematics/RWStepKinematics_RWUnconstrainedPair.hxx @@ -0,0 +1,46 @@ +// Created on : Sat May 02 12:41:16 2020 +// Created by: Irina KRYLOVA +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V3.0 +// Copyright (c) Open CASCADE 2020 +// +// 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 _RWStepKinematics_RWUnconstrainedPair_HeaderFile_ +#define _RWStepKinematics_RWUnconstrainedPair_HeaderFile_ + +#include +#include +#include + +class StepData_StepReaderData; +class Interface_Check; +class StepData_StepWriter; +class Interface_EntityIterator; +class StepKinematics_UnconstrainedPair; + +//! Read & Write tool for UnconstrainedPair +class RWStepKinematics_RWUnconstrainedPair +{ +public: + + DEFINE_STANDARD_ALLOC + + Standard_EXPORT RWStepKinematics_RWUnconstrainedPair(); + + Standard_EXPORT void ReadStep(const Handle(StepData_StepReaderData)& theData, const Standard_Integer theNum, Handle(Interface_Check)& theArch, const Handle(StepKinematics_UnconstrainedPair)& theEnt) const; + + Standard_EXPORT void WriteStep(StepData_StepWriter& theSW, const Handle(StepKinematics_UnconstrainedPair)& theEnt) const; + + Standard_EXPORT void Share(const Handle(StepKinematics_UnconstrainedPair)& theEnt, Interface_EntityIterator& iter) const; + +}; +#endif // _RWStepKinematics_RWUnconstrainedPair_HeaderFile_ diff --git a/src/RWStepKinematics/RWStepKinematics_RWUnconstrainedPairValue.cxx b/src/RWStepKinematics/RWStepKinematics_RWUnconstrainedPairValue.cxx new file mode 100644 index 0000000000..d5c05409db --- /dev/null +++ b/src/RWStepKinematics/RWStepKinematics_RWUnconstrainedPairValue.cxx @@ -0,0 +1,105 @@ +// Created on : Sat May 02 12:41:16 2020 +// Created by: Irina KRYLOVA +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V3.0 +// Copyright (c) Open CASCADE 2020 +// +// This file is part of Open CASCADE Technology software library. +// +// This library is free software; you can redistribute it and/or modify it under +// the terms of the GNU Lesser General Public License version 2.1 as published +// by the Free Software Foundation, with special exception defined in the file +// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT +// distribution for complete text of the license and disclaimer of any warranty. +// +// Alternatively, this file may be used under the terms of Open CASCADE +// commercial license or contractual agreement. + +#include + +#include +#include +#include +#include +#include +#include +#include + +//======================================================================= +//function : RWStepKinematics_RWUnconstrainedPairValue +//purpose : +//======================================================================= +RWStepKinematics_RWUnconstrainedPairValue::RWStepKinematics_RWUnconstrainedPairValue() {} + + +//======================================================================= +//function : ReadStep +//purpose : +//======================================================================= +void RWStepKinematics_RWUnconstrainedPairValue::ReadStep (const Handle(StepData_StepReaderData)& theData, + const Standard_Integer theNum, + Handle(Interface_Check)& theArch, + const Handle(StepKinematics_UnconstrainedPairValue)& theEnt) const +{ + // Check number of parameters + if ( ! theData->CheckNbParams(theNum,3,theArch,"unconstrained_pair_value") ) return; + + // Inherited fields of RepresentationItem + + Handle(TCollection_HAsciiString) aRepresentationItem_Name; + theData->ReadString (theNum, 1, "representation_item.name", theArch, aRepresentationItem_Name); + + // Inherited fields of PairValue + + Handle(StepKinematics_KinematicPair) aPairValue_AppliesToPair; + theData->ReadEntity (theNum, 2, "pair_value.applies_to_pair", theArch, STANDARD_TYPE(StepKinematics_KinematicPair), aPairValue_AppliesToPair); + + // Own fields of UnconstrainedPairValue + + Handle(StepGeom_Axis2Placement3d) aActualPlacement; + theData->ReadEntity (theNum, 3, "actual_placement", theArch, STANDARD_TYPE(StepGeom_Axis2Placement3d), aActualPlacement); + + // Initialize entity + theEnt->Init(aRepresentationItem_Name, + aPairValue_AppliesToPair, + aActualPlacement); +} + +//======================================================================= +//function : WriteStep +//purpose : +//======================================================================= +void RWStepKinematics_RWUnconstrainedPairValue::WriteStep (StepData_StepWriter& theSW, + const Handle(StepKinematics_UnconstrainedPairValue)& theEnt) const +{ + + // Own fields of RepresentationItem + + theSW.Send (theEnt->Name()); + + // Own fields of PairValue + + theSW.Send (theEnt->AppliesToPair()); + + // Own fields of UnconstrainedPairValue + + theSW.Send (theEnt->ActualPlacement()); +} + +//======================================================================= +//function : Share +//purpose : +//======================================================================= +void RWStepKinematics_RWUnconstrainedPairValue::Share (const Handle(StepKinematics_UnconstrainedPairValue)& theEnt, + Interface_EntityIterator& iter) const +{ + + // Inherited fields of RepresentationItem + + // Inherited fields of PairValue + + iter.AddItem (theEnt->StepKinematics_PairValue::AppliesToPair()); + + // Own fields of UnconstrainedPairValue + + iter.AddItem (theEnt->ActualPlacement()); +} diff --git a/src/RWStepKinematics/RWStepKinematics_RWUnconstrainedPairValue.hxx b/src/RWStepKinematics/RWStepKinematics_RWUnconstrainedPairValue.hxx new file mode 100644 index 0000000000..8f53fb4bf5 --- /dev/null +++ b/src/RWStepKinematics/RWStepKinematics_RWUnconstrainedPairValue.hxx @@ -0,0 +1,46 @@ +// Created on : Sat May 02 12:41:16 2020 +// Created by: Irina KRYLOVA +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V3.0 +// Copyright (c) Open CASCADE 2020 +// +// 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 _RWStepKinematics_RWUnconstrainedPairValue_HeaderFile_ +#define _RWStepKinematics_RWUnconstrainedPairValue_HeaderFile_ + +#include +#include +#include + +class StepData_StepReaderData; +class Interface_Check; +class StepData_StepWriter; +class Interface_EntityIterator; +class StepKinematics_UnconstrainedPairValue; + +//! Read & Write tool for UnconstrainedPairValue +class RWStepKinematics_RWUnconstrainedPairValue +{ +public: + + DEFINE_STANDARD_ALLOC + + Standard_EXPORT RWStepKinematics_RWUnconstrainedPairValue(); + + Standard_EXPORT void ReadStep(const Handle(StepData_StepReaderData)& theData, const Standard_Integer theNum, Handle(Interface_Check)& theArch, const Handle(StepKinematics_UnconstrainedPairValue)& theEnt) const; + + Standard_EXPORT void WriteStep(StepData_StepWriter& theSW, const Handle(StepKinematics_UnconstrainedPairValue)& theEnt) const; + + Standard_EXPORT void Share(const Handle(StepKinematics_UnconstrainedPairValue)& theEnt, Interface_EntityIterator& iter) const; + +}; +#endif // _RWStepKinematics_RWUnconstrainedPairValue_HeaderFile_ diff --git a/src/RWStepKinematics/RWStepKinematics_RWUniversalPair.cxx b/src/RWStepKinematics/RWStepKinematics_RWUniversalPair.cxx new file mode 100644 index 0000000000..9de814daae --- /dev/null +++ b/src/RWStepKinematics/RWStepKinematics_RWUniversalPair.cxx @@ -0,0 +1,204 @@ +// Created on : Sat May 02 12:41:16 2020 +// Created by: Irina KRYLOVA +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V3.0 +// Copyright (c) Open CASCADE 2020 +// +// This file is part of Open CASCADE Technology software library. +// +// This library is free software; you can redistribute it and/or modify it under +// the terms of the GNU Lesser General Public License version 2.1 as published +// by the Free Software Foundation, with special exception defined in the file +// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT +// distribution for complete text of the license and disclaimer of any warranty. +// +// Alternatively, this file may be used under the terms of Open CASCADE +// commercial license or contractual agreement. + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +//======================================================================= +//function : RWStepKinematics_RWUniversalPair +//purpose : +//======================================================================= +RWStepKinematics_RWUniversalPair::RWStepKinematics_RWUniversalPair() {} + + +//======================================================================= +//function : ReadStep +//purpose : +//======================================================================= +void RWStepKinematics_RWUniversalPair::ReadStep (const Handle(StepData_StepReaderData)& theData, + const Standard_Integer theNum, + Handle(Interface_Check)& theArch, + const Handle(StepKinematics_UniversalPair)& theEnt) const +{ + // Check number of parameters + if ( ! theData->CheckNbParams(theNum,13,theArch,"universal_pair") ) return; + + // Inherited fields of RepresentationItem + + Handle(TCollection_HAsciiString) aRepresentationItem_Name; + theData->ReadString (theNum, 1, "representation_item.name", theArch, aRepresentationItem_Name); + + // Inherited fields of ItemDefinedTransformation + + Handle(TCollection_HAsciiString) aItemDefinedTransformation_Name; + theData->ReadString (theNum, 2, "item_defined_transformation.name", theArch, aItemDefinedTransformation_Name); + + Handle(TCollection_HAsciiString) aItemDefinedTransformation_Description; + Standard_Boolean hasItemDefinedTransformation_Description = Standard_True; + if ( theData->IsParamDefined (theNum,3) ) { + theData->ReadString (theNum, 3, "item_defined_transformation.description", theArch, aItemDefinedTransformation_Description); + } + else { + hasItemDefinedTransformation_Description = Standard_False; + aItemDefinedTransformation_Description.Nullify(); + } + + Handle(StepRepr_RepresentationItem) aItemDefinedTransformation_TransformItem1; + theData->ReadEntity (theNum, 4, "item_defined_transformation.transform_item1", theArch, STANDARD_TYPE(StepRepr_RepresentationItem), aItemDefinedTransformation_TransformItem1); + + Handle(StepRepr_RepresentationItem) aItemDefinedTransformation_TransformItem2; + theData->ReadEntity (theNum, 5, "item_defined_transformation.transform_item2", theArch, STANDARD_TYPE(StepRepr_RepresentationItem), aItemDefinedTransformation_TransformItem2); + + // Inherited fields of KinematicPair + + Handle(StepKinematics_KinematicJoint) aKinematicPair_Joint; + theData->ReadEntity (theNum, 6, "kinematic_pair.joint", theArch, STANDARD_TYPE(StepKinematics_KinematicJoint), aKinematicPair_Joint); + + // Inherited fields of LowOrderKinematicPair + + Standard_Boolean aLowOrderKinematicPair_TX; + theData->ReadBoolean (theNum, 7, "low_order_kinematic_pair.t_x", theArch, aLowOrderKinematicPair_TX); + + Standard_Boolean aLowOrderKinematicPair_TY; + theData->ReadBoolean (theNum, 8, "low_order_kinematic_pair.t_y", theArch, aLowOrderKinematicPair_TY); + + Standard_Boolean aLowOrderKinematicPair_TZ; + theData->ReadBoolean (theNum, 9, "low_order_kinematic_pair.t_z", theArch, aLowOrderKinematicPair_TZ); + + Standard_Boolean aLowOrderKinematicPair_RX; + theData->ReadBoolean (theNum, 10, "low_order_kinematic_pair.r_x", theArch, aLowOrderKinematicPair_RX); + + Standard_Boolean aLowOrderKinematicPair_RY; + theData->ReadBoolean (theNum, 11, "low_order_kinematic_pair.r_y", theArch, aLowOrderKinematicPair_RY); + + Standard_Boolean aLowOrderKinematicPair_RZ; + theData->ReadBoolean (theNum, 12, "low_order_kinematic_pair.r_z", theArch, aLowOrderKinematicPair_RZ); + + // Own fields of UniversalPair + + Standard_Real aInputSkewAngle; + Standard_Boolean hasInputSkewAngle = Standard_True; + if ( theData->IsParamDefined (theNum,13) ) { + theData->ReadReal (theNum, 13, "input_skew_angle", theArch, aInputSkewAngle); + } + else { + hasInputSkewAngle = Standard_False; + aInputSkewAngle = 0; + } + + // Initialize entity + theEnt->Init(aRepresentationItem_Name, + aItemDefinedTransformation_Name, + hasItemDefinedTransformation_Description, + aItemDefinedTransformation_Description, + aItemDefinedTransformation_TransformItem1, + aItemDefinedTransformation_TransformItem2, + aKinematicPair_Joint, + aLowOrderKinematicPair_TX, + aLowOrderKinematicPair_TY, + aLowOrderKinematicPair_TZ, + aLowOrderKinematicPair_RX, + aLowOrderKinematicPair_RY, + aLowOrderKinematicPair_RZ, + hasInputSkewAngle, + aInputSkewAngle); +} + +//======================================================================= +//function : WriteStep +//purpose : +//======================================================================= +void RWStepKinematics_RWUniversalPair::WriteStep (StepData_StepWriter& theSW, + const Handle(StepKinematics_UniversalPair)& theEnt) const +{ + + // Own fields of RepresentationItem + + theSW.Send (theEnt->Name()); + + // Inherited fields of ItemDefinedTransformation + + theSW.Send (theEnt->ItemDefinedTransformation()->Name()); + + if ( theEnt->ItemDefinedTransformation()->HasDescription() ) { + theSW.Send (theEnt->ItemDefinedTransformation()->Description()); + } + else theSW.SendUndef(); + + theSW.Send (theEnt->ItemDefinedTransformation()->TransformItem1()); + + theSW.Send (theEnt->ItemDefinedTransformation()->TransformItem2()); + + // Own fields of KinematicPair + + theSW.Send (theEnt->Joint()); + + // Own fields of LowOrderKinematicPair + + theSW.SendBoolean (theEnt->TX()); + + theSW.SendBoolean (theEnt->TY()); + + theSW.SendBoolean (theEnt->TZ()); + + theSW.SendBoolean (theEnt->RX()); + + theSW.SendBoolean (theEnt->RY()); + + theSW.SendBoolean (theEnt->RZ()); + + // Own fields of UniversalPair + + if ( theEnt->HasInputSkewAngle() ) { + theSW.Send (theEnt->InputSkewAngle()); + } + else theSW.SendUndef(); +} + +//======================================================================= +//function : Share +//purpose : +//======================================================================= +void RWStepKinematics_RWUniversalPair::Share (const Handle(StepKinematics_UniversalPair)& theEnt, + Interface_EntityIterator& iter) const +{ + + // Inherited fields of RepresentationItem + + // Inherited fields of ItemDefinedTransformation + + iter.AddItem (theEnt->ItemDefinedTransformation()->TransformItem1()); + + iter.AddItem (theEnt->ItemDefinedTransformation()->TransformItem2()); + + // Inherited fields of KinematicPair + + iter.AddItem (theEnt->StepKinematics_KinematicPair::Joint()); + + // Inherited fields of LowOrderKinematicPair + + // Own fields of UniversalPair +} diff --git a/src/RWStepKinematics/RWStepKinematics_RWUniversalPair.hxx b/src/RWStepKinematics/RWStepKinematics_RWUniversalPair.hxx new file mode 100644 index 0000000000..687f3ed934 --- /dev/null +++ b/src/RWStepKinematics/RWStepKinematics_RWUniversalPair.hxx @@ -0,0 +1,46 @@ +// Created on : Sat May 02 12:41:16 2020 +// Created by: Irina KRYLOVA +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V3.0 +// Copyright (c) Open CASCADE 2020 +// +// 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 _RWStepKinematics_RWUniversalPair_HeaderFile_ +#define _RWStepKinematics_RWUniversalPair_HeaderFile_ + +#include +#include +#include + +class StepData_StepReaderData; +class Interface_Check; +class StepData_StepWriter; +class Interface_EntityIterator; +class StepKinematics_UniversalPair; + +//! Read & Write tool for UniversalPair +class RWStepKinematics_RWUniversalPair +{ +public: + + DEFINE_STANDARD_ALLOC + + Standard_EXPORT RWStepKinematics_RWUniversalPair(); + + Standard_EXPORT void ReadStep(const Handle(StepData_StepReaderData)& theData, const Standard_Integer theNum, Handle(Interface_Check)& theArch, const Handle(StepKinematics_UniversalPair)& theEnt) const; + + Standard_EXPORT void WriteStep(StepData_StepWriter& theSW, const Handle(StepKinematics_UniversalPair)& theEnt) const; + + Standard_EXPORT void Share(const Handle(StepKinematics_UniversalPair)& theEnt, Interface_EntityIterator& iter) const; + +}; +#endif // _RWStepKinematics_RWUniversalPair_HeaderFile_ diff --git a/src/RWStepKinematics/RWStepKinematics_RWUniversalPairValue.cxx b/src/RWStepKinematics/RWStepKinematics_RWUniversalPairValue.cxx new file mode 100644 index 0000000000..45b86dbed6 --- /dev/null +++ b/src/RWStepKinematics/RWStepKinematics_RWUniversalPairValue.cxx @@ -0,0 +1,109 @@ +// Created on : Sat May 02 12:41:16 2020 +// Created by: Irina KRYLOVA +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V3.0 +// Copyright (c) Open CASCADE 2020 +// +// This file is part of Open CASCADE Technology software library. +// +// This library is free software; you can redistribute it and/or modify it under +// the terms of the GNU Lesser General Public License version 2.1 as published +// by the Free Software Foundation, with special exception defined in the file +// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT +// distribution for complete text of the license and disclaimer of any warranty. +// +// Alternatively, this file may be used under the terms of Open CASCADE +// commercial license or contractual agreement. + +#include + +#include +#include +#include +#include +#include +#include +#include + +//======================================================================= +//function : RWStepKinematics_RWUniversalPairValue +//purpose : +//======================================================================= +RWStepKinematics_RWUniversalPairValue::RWStepKinematics_RWUniversalPairValue() {} + + +//======================================================================= +//function : ReadStep +//purpose : +//======================================================================= +void RWStepKinematics_RWUniversalPairValue::ReadStep (const Handle(StepData_StepReaderData)& theData, + const Standard_Integer theNum, + Handle(Interface_Check)& theArch, + const Handle(StepKinematics_UniversalPairValue)& theEnt) const +{ + // Check number of parameters + if ( ! theData->CheckNbParams(theNum,4,theArch,"universal_pair_value") ) return; + + // Inherited fields of RepresentationItem + + Handle(TCollection_HAsciiString) aRepresentationItem_Name; + theData->ReadString (theNum, 1, "representation_item.name", theArch, aRepresentationItem_Name); + + // Inherited fields of PairValue + + Handle(StepKinematics_KinematicPair) aPairValue_AppliesToPair; + theData->ReadEntity (theNum, 2, "pair_value.applies_to_pair", theArch, STANDARD_TYPE(StepKinematics_KinematicPair), aPairValue_AppliesToPair); + + // Own fields of UniversalPairValue + + Standard_Real aFirstRotationAngle; + theData->ReadReal (theNum, 3, "first_rotation_angle", theArch, aFirstRotationAngle); + + Standard_Real aSecondRotationAngle; + theData->ReadReal (theNum, 4, "second_rotation_angle", theArch, aSecondRotationAngle); + + // Initialize entity + theEnt->Init(aRepresentationItem_Name, + aPairValue_AppliesToPair, + aFirstRotationAngle, + aSecondRotationAngle); +} + +//======================================================================= +//function : WriteStep +//purpose : +//======================================================================= +void RWStepKinematics_RWUniversalPairValue::WriteStep (StepData_StepWriter& theSW, + const Handle(StepKinematics_UniversalPairValue)& theEnt) const +{ + + // Own fields of RepresentationItem + + theSW.Send (theEnt->Name()); + + // Own fields of PairValue + + theSW.Send (theEnt->AppliesToPair()); + + // Own fields of UniversalPairValue + + theSW.Send (theEnt->FirstRotationAngle()); + + theSW.Send (theEnt->SecondRotationAngle()); +} + +//======================================================================= +//function : Share +//purpose : +//======================================================================= +void RWStepKinematics_RWUniversalPairValue::Share (const Handle(StepKinematics_UniversalPairValue)& theEnt, + Interface_EntityIterator& iter) const +{ + + // Inherited fields of RepresentationItem + + // Inherited fields of PairValue + + iter.AddItem (theEnt->StepKinematics_PairValue::AppliesToPair()); + + // Own fields of UniversalPairValue +} diff --git a/src/RWStepKinematics/RWStepKinematics_RWUniversalPairValue.hxx b/src/RWStepKinematics/RWStepKinematics_RWUniversalPairValue.hxx new file mode 100644 index 0000000000..d31050498e --- /dev/null +++ b/src/RWStepKinematics/RWStepKinematics_RWUniversalPairValue.hxx @@ -0,0 +1,46 @@ +// Created on : Sat May 02 12:41:16 2020 +// Created by: Irina KRYLOVA +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V3.0 +// Copyright (c) Open CASCADE 2020 +// +// 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 _RWStepKinematics_RWUniversalPairValue_HeaderFile_ +#define _RWStepKinematics_RWUniversalPairValue_HeaderFile_ + +#include +#include +#include + +class StepData_StepReaderData; +class Interface_Check; +class StepData_StepWriter; +class Interface_EntityIterator; +class StepKinematics_UniversalPairValue; + +//! Read & Write tool for UniversalPairValue +class RWStepKinematics_RWUniversalPairValue +{ +public: + + DEFINE_STANDARD_ALLOC + + Standard_EXPORT RWStepKinematics_RWUniversalPairValue(); + + Standard_EXPORT void ReadStep(const Handle(StepData_StepReaderData)& theData, const Standard_Integer theNum, Handle(Interface_Check)& theArch, const Handle(StepKinematics_UniversalPairValue)& theEnt) const; + + Standard_EXPORT void WriteStep(StepData_StepWriter& theSW, const Handle(StepKinematics_UniversalPairValue)& theEnt) const; + + Standard_EXPORT void Share(const Handle(StepKinematics_UniversalPairValue)& theEnt, Interface_EntityIterator& iter) const; + +}; +#endif // _RWStepKinematics_RWUniversalPairValue_HeaderFile_ diff --git a/src/RWStepKinematics/RWStepKinematics_RWUniversalPairWithRange.cxx b/src/RWStepKinematics/RWStepKinematics_RWUniversalPairWithRange.cxx new file mode 100644 index 0000000000..511546e68d --- /dev/null +++ b/src/RWStepKinematics/RWStepKinematics_RWUniversalPairWithRange.cxx @@ -0,0 +1,278 @@ +// Created on : Sat May 02 12:41:16 2020 +// Created by: Irina KRYLOVA +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V3.0 +// Copyright (c) Open CASCADE 2020 +// +// This file is part of Open CASCADE Technology software library. +// +// This library is free software; you can redistribute it and/or modify it under +// the terms of the GNU Lesser General Public License version 2.1 as published +// by the Free Software Foundation, with special exception defined in the file +// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT +// distribution for complete text of the license and disclaimer of any warranty. +// +// Alternatively, this file may be used under the terms of Open CASCADE +// commercial license or contractual agreement. + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +//======================================================================= +//function : RWStepKinematics_RWUniversalPairWithRange +//purpose : +//======================================================================= +RWStepKinematics_RWUniversalPairWithRange::RWStepKinematics_RWUniversalPairWithRange() {} + + +//======================================================================= +//function : ReadStep +//purpose : +//======================================================================= +void RWStepKinematics_RWUniversalPairWithRange::ReadStep (const Handle(StepData_StepReaderData)& theData, + const Standard_Integer theNum, + Handle(Interface_Check)& theArch, + const Handle(StepKinematics_UniversalPairWithRange)& theEnt) const +{ + // Check number of parameters + if ( ! theData->CheckNbParams(theNum,17,theArch,"universal_pair_with_range") ) return; + + // Inherited fields of RepresentationItem + + Handle(TCollection_HAsciiString) aRepresentationItem_Name; + theData->ReadString (theNum, 1, "representation_item.name", theArch, aRepresentationItem_Name); + + // Inherited fields of ItemDefinedTransformation + + Handle(TCollection_HAsciiString) aItemDefinedTransformation_Name; + theData->ReadString (theNum, 2, "item_defined_transformation.name", theArch, aItemDefinedTransformation_Name); + + Handle(TCollection_HAsciiString) aItemDefinedTransformation_Description; + Standard_Boolean hasItemDefinedTransformation_Description = Standard_True; + if ( theData->IsParamDefined (theNum,3) ) { + theData->ReadString (theNum, 3, "item_defined_transformation.description", theArch, aItemDefinedTransformation_Description); + } + else { + hasItemDefinedTransformation_Description = Standard_False; + aItemDefinedTransformation_Description.Nullify(); + } + + Handle(StepRepr_RepresentationItem) aItemDefinedTransformation_TransformItem1; + theData->ReadEntity (theNum, 4, "item_defined_transformation.transform_item1", theArch, STANDARD_TYPE(StepRepr_RepresentationItem), aItemDefinedTransformation_TransformItem1); + + Handle(StepRepr_RepresentationItem) aItemDefinedTransformation_TransformItem2; + theData->ReadEntity (theNum, 5, "item_defined_transformation.transform_item2", theArch, STANDARD_TYPE(StepRepr_RepresentationItem), aItemDefinedTransformation_TransformItem2); + + // Inherited fields of KinematicPair + + Handle(StepKinematics_KinematicJoint) aKinematicPair_Joint; + theData->ReadEntity (theNum, 6, "kinematic_pair.joint", theArch, STANDARD_TYPE(StepKinematics_KinematicJoint), aKinematicPair_Joint); + + // Inherited fields of LowOrderKinematicPair + + Standard_Boolean aLowOrderKinematicPair_TX; + theData->ReadBoolean (theNum, 7, "low_order_kinematic_pair.t_x", theArch, aLowOrderKinematicPair_TX); + + Standard_Boolean aLowOrderKinematicPair_TY; + theData->ReadBoolean (theNum, 8, "low_order_kinematic_pair.t_y", theArch, aLowOrderKinematicPair_TY); + + Standard_Boolean aLowOrderKinematicPair_TZ; + theData->ReadBoolean (theNum, 9, "low_order_kinematic_pair.t_z", theArch, aLowOrderKinematicPair_TZ); + + Standard_Boolean aLowOrderKinematicPair_RX; + theData->ReadBoolean (theNum, 10, "low_order_kinematic_pair.r_x", theArch, aLowOrderKinematicPair_RX); + + Standard_Boolean aLowOrderKinematicPair_RY; + theData->ReadBoolean (theNum, 11, "low_order_kinematic_pair.r_y", theArch, aLowOrderKinematicPair_RY); + + Standard_Boolean aLowOrderKinematicPair_RZ; + theData->ReadBoolean (theNum, 12, "low_order_kinematic_pair.r_z", theArch, aLowOrderKinematicPair_RZ); + + // Inherited fields of UniversalPair + + Standard_Real aUniversalPair_InputSkewAngle; + Standard_Boolean hasUniversalPair_InputSkewAngle = Standard_True; + if ( theData->IsParamDefined (theNum,13) ) { + theData->ReadReal (theNum, 13, "universal_pair.input_skew_angle", theArch, aUniversalPair_InputSkewAngle); + } + else { + hasUniversalPair_InputSkewAngle = Standard_False; + aUniversalPair_InputSkewAngle = 0; + } + + // Own fields of UniversalPairWithRange + + Standard_Real aLowerLimitFirstRotation; + Standard_Boolean hasLowerLimitFirstRotation = Standard_True; + if ( theData->IsParamDefined (theNum,14) ) { + theData->ReadReal (theNum, 14, "lower_limit_first_rotation", theArch, aLowerLimitFirstRotation); + } + else { + hasLowerLimitFirstRotation = Standard_False; + aLowerLimitFirstRotation = 0; + } + + Standard_Real aUpperLimitFirstRotation; + Standard_Boolean hasUpperLimitFirstRotation = Standard_True; + if ( theData->IsParamDefined (theNum,15) ) { + theData->ReadReal (theNum, 15, "upper_limit_first_rotation", theArch, aUpperLimitFirstRotation); + } + else { + hasUpperLimitFirstRotation = Standard_False; + aUpperLimitFirstRotation = 0; + } + + Standard_Real aLowerLimitSecondRotation; + Standard_Boolean hasLowerLimitSecondRotation = Standard_True; + if ( theData->IsParamDefined (theNum,16) ) { + theData->ReadReal (theNum, 16, "lower_limit_second_rotation", theArch, aLowerLimitSecondRotation); + } + else { + hasLowerLimitSecondRotation = Standard_False; + aLowerLimitSecondRotation = 0; + } + + Standard_Real aUpperLimitSecondRotation; + Standard_Boolean hasUpperLimitSecondRotation = Standard_True; + if ( theData->IsParamDefined (theNum,17) ) { + theData->ReadReal (theNum, 17, "upper_limit_second_rotation", theArch, aUpperLimitSecondRotation); + } + else { + hasUpperLimitSecondRotation = Standard_False; + aUpperLimitSecondRotation = 0; + } + + // Initialize entity + theEnt->Init(aRepresentationItem_Name, + aItemDefinedTransformation_Name, + hasItemDefinedTransformation_Description, + aItemDefinedTransformation_Description, + aItemDefinedTransformation_TransformItem1, + aItemDefinedTransformation_TransformItem2, + aKinematicPair_Joint, + aLowOrderKinematicPair_TX, + aLowOrderKinematicPair_TY, + aLowOrderKinematicPair_TZ, + aLowOrderKinematicPair_RX, + aLowOrderKinematicPair_RY, + aLowOrderKinematicPair_RZ, + hasUniversalPair_InputSkewAngle, + aUniversalPair_InputSkewAngle, + hasLowerLimitFirstRotation, + aLowerLimitFirstRotation, + hasUpperLimitFirstRotation, + aUpperLimitFirstRotation, + hasLowerLimitSecondRotation, + aLowerLimitSecondRotation, + hasUpperLimitSecondRotation, + aUpperLimitSecondRotation); +} + +//======================================================================= +//function : WriteStep +//purpose : +//======================================================================= +void RWStepKinematics_RWUniversalPairWithRange::WriteStep (StepData_StepWriter& theSW, + const Handle(StepKinematics_UniversalPairWithRange)& theEnt) const +{ + + // Own fields of RepresentationItem + + theSW.Send (theEnt->Name()); + + // Inherited fields of ItemDefinedTransformation + + theSW.Send (theEnt->ItemDefinedTransformation()->Name()); + + if ( theEnt->ItemDefinedTransformation()->HasDescription() ) { + theSW.Send (theEnt->ItemDefinedTransformation()->Description()); + } + else theSW.SendUndef(); + + theSW.Send (theEnt->ItemDefinedTransformation()->TransformItem1()); + + theSW.Send (theEnt->ItemDefinedTransformation()->TransformItem2()); + + // Own fields of KinematicPair + + theSW.Send (theEnt->Joint()); + + // Own fields of LowOrderKinematicPair + + theSW.SendBoolean (theEnt->TX()); + + theSW.SendBoolean (theEnt->TY()); + + theSW.SendBoolean (theEnt->TZ()); + + theSW.SendBoolean (theEnt->RX()); + + theSW.SendBoolean (theEnt->RY()); + + theSW.SendBoolean (theEnt->RZ()); + + // Own fields of UniversalPair + + if ( theEnt->HasInputSkewAngle() ) { + theSW.Send (theEnt->InputSkewAngle()); + } + else theSW.SendUndef(); + + // Own fields of UniversalPairWithRange + + if ( theEnt->HasLowerLimitFirstRotation() ) { + theSW.Send (theEnt->LowerLimitFirstRotation()); + } + else theSW.SendUndef(); + + if ( theEnt->HasUpperLimitFirstRotation() ) { + theSW.Send (theEnt->UpperLimitFirstRotation()); + } + else theSW.SendUndef(); + + if ( theEnt->HasLowerLimitSecondRotation() ) { + theSW.Send (theEnt->LowerLimitSecondRotation()); + } + else theSW.SendUndef(); + + if ( theEnt->HasUpperLimitSecondRotation() ) { + theSW.Send (theEnt->UpperLimitSecondRotation()); + } + else theSW.SendUndef(); +} + +//======================================================================= +//function : Share +//purpose : +//======================================================================= +void RWStepKinematics_RWUniversalPairWithRange::Share (const Handle(StepKinematics_UniversalPairWithRange)& theEnt, + Interface_EntityIterator& iter) const +{ + + // Inherited fields of RepresentationItem + + // Inherited fields of ItemDefinedTransformation + + iter.AddItem (theEnt->ItemDefinedTransformation()->TransformItem1()); + + iter.AddItem (theEnt->ItemDefinedTransformation()->TransformItem2()); + + // Inherited fields of KinematicPair + + iter.AddItem (theEnt->StepKinematics_KinematicPair::Joint()); + + // Inherited fields of LowOrderKinematicPair + + // Inherited fields of UniversalPair + + // Own fields of UniversalPairWithRange +} diff --git a/src/RWStepKinematics/RWStepKinematics_RWUniversalPairWithRange.hxx b/src/RWStepKinematics/RWStepKinematics_RWUniversalPairWithRange.hxx new file mode 100644 index 0000000000..c4bbbe36df --- /dev/null +++ b/src/RWStepKinematics/RWStepKinematics_RWUniversalPairWithRange.hxx @@ -0,0 +1,46 @@ +// Created on : Sat May 02 12:41:16 2020 +// Created by: Irina KRYLOVA +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V3.0 +// Copyright (c) Open CASCADE 2020 +// +// 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 _RWStepKinematics_RWUniversalPairWithRange_HeaderFile_ +#define _RWStepKinematics_RWUniversalPairWithRange_HeaderFile_ + +#include +#include +#include + +class StepData_StepReaderData; +class Interface_Check; +class StepData_StepWriter; +class Interface_EntityIterator; +class StepKinematics_UniversalPairWithRange; + +//! Read & Write tool for UniversalPairWithRange +class RWStepKinematics_RWUniversalPairWithRange +{ +public: + + DEFINE_STANDARD_ALLOC + + Standard_EXPORT RWStepKinematics_RWUniversalPairWithRange(); + + Standard_EXPORT void ReadStep(const Handle(StepData_StepReaderData)& theData, const Standard_Integer theNum, Handle(Interface_Check)& theArch, const Handle(StepKinematics_UniversalPairWithRange)& theEnt) const; + + Standard_EXPORT void WriteStep(StepData_StepWriter& theSW, const Handle(StepKinematics_UniversalPairWithRange)& theEnt) const; + + Standard_EXPORT void Share(const Handle(StepKinematics_UniversalPairWithRange)& theEnt, Interface_EntityIterator& iter) const; + +}; +#endif // _RWStepKinematics_RWUniversalPairWithRange_HeaderFile_ diff --git a/src/RWStepRepr/FILES b/src/RWStepRepr/FILES index e1dc12da99..3dab652854 100644 --- a/src/RWStepRepr/FILES +++ b/src/RWStepRepr/FILES @@ -92,10 +92,14 @@ RWStepRepr_RWRepresentation.cxx RWStepRepr_RWRepresentation.hxx RWStepRepr_RWRepresentationContext.cxx RWStepRepr_RWRepresentationContext.hxx +RWStepRepr_RWRepresentationContextReference.cxx +RWStepRepr_RWRepresentationContextReference.hxx RWStepRepr_RWRepresentationItem.cxx RWStepRepr_RWRepresentationItem.hxx RWStepRepr_RWRepresentationMap.cxx RWStepRepr_RWRepresentationMap.hxx +RWStepRepr_RWRepresentationReference.cxx +RWStepRepr_RWRepresentationReference.hxx RWStepRepr_RWRepresentationRelationship.cxx RWStepRepr_RWRepresentationRelationship.hxx RWStepRepr_RWRepresentationRelationshipWithTransformation.cxx diff --git a/src/RWStepRepr/RWStepRepr_RWRepresentationContextReference.cxx b/src/RWStepRepr/RWStepRepr_RWRepresentationContextReference.cxx new file mode 100644 index 0000000000..c30de07974 --- /dev/null +++ b/src/RWStepRepr/RWStepRepr_RWRepresentationContextReference.cxx @@ -0,0 +1,79 @@ +// Created on : Sat May 02 12:41:14 2020 +// Created by: Irina KRYLOVA +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V3.0 +// Copyright (c) Open CASCADE 2020 +// +// This file is part of Open CASCADE Technology software library. +// +// This library is free software; you can redistribute it and/or modify it under +// the terms of the GNU Lesser General Public License version 2.1 as published +// by the Free Software Foundation, with special exception defined in the file +// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT +// distribution for complete text of the license and disclaimer of any warranty. +// +// Alternatively, this file may be used under the terms of Open CASCADE +// commercial license or contractual agreement. + +#include + +#include +#include +#include +#include +#include + +//======================================================================= +//function : RWStepRepr_RWRepresentationContextReference +//purpose : +//======================================================================= + +RWStepRepr_RWRepresentationContextReference::RWStepRepr_RWRepresentationContextReference() {} + + +//======================================================================= +//function : ReadStep +//purpose : +//======================================================================= + +void RWStepRepr_RWRepresentationContextReference::ReadStep (const Handle(StepData_StepReaderData)& theData, + const Standard_Integer theNum, + Handle(Interface_Check)& theAch, + const Handle(StepRepr_RepresentationContextReference)& theEnt) const +{ + // Check number of parameters + if ( ! theData->CheckNbParams(theNum,1,theAch,"representation_context_reference") ) return; + + // Own fields of RepresentationContextReference + + Handle(TCollection_HAsciiString) aContextIdentifier; + theData->ReadString (theNum, 1, "context_identifier", theAch, aContextIdentifier); + + // Initialize entity + theEnt->Init(aContextIdentifier); +} + +//======================================================================= +//function : WriteStep +//purpose : +//======================================================================= + +void RWStepRepr_RWRepresentationContextReference::WriteStep (StepData_StepWriter& theSW, + const Handle(StepRepr_RepresentationContextReference)& theEnt) const +{ + + // Own fields of RepresentationContextReference + + theSW.Send (theEnt->ContextIdentifier()); +} + +//======================================================================= +//function : Share +//purpose : +//======================================================================= + +void RWStepRepr_RWRepresentationContextReference::Share (const Handle(StepRepr_RepresentationContextReference)& /*theEnt*/, + Interface_EntityIterator& /*iter*/) const +{ + + // Own fields of RepresentationContextReference +} diff --git a/src/RWStepRepr/RWStepRepr_RWRepresentationContextReference.hxx b/src/RWStepRepr/RWStepRepr_RWRepresentationContextReference.hxx new file mode 100644 index 0000000000..5cb1bb4d18 --- /dev/null +++ b/src/RWStepRepr/RWStepRepr_RWRepresentationContextReference.hxx @@ -0,0 +1,46 @@ +// Created on : Sat May 02 12:41:14 2020 +// Created by: Irina KRYLOVA +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V3.0 +// Copyright (c) Open CASCADE 2020 +// +// 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 _RWStepRepr_RWRepresentationContextReference_HeaderFile_ +#define _RWStepRepr_RWRepresentationContextReference_HeaderFile_ + +#include +#include +#include + +class StepData_StepReaderData; +class Interface_Check; +class StepData_StepWriter; +class Interface_EntityIterator; +class StepRepr_RepresentationContextReference; + +//! Read & Write tool for RepresentationContextReference +class RWStepRepr_RWRepresentationContextReference +{ +public: + + DEFINE_STANDARD_ALLOC + + Standard_EXPORT RWStepRepr_RWRepresentationContextReference(); + + Standard_EXPORT void ReadStep(const Handle(StepData_StepReaderData)& theData, const Standard_Integer theNum, Handle(Interface_Check)& theAch, const Handle(StepRepr_RepresentationContextReference)& theEnt) const; + + Standard_EXPORT void WriteStep(StepData_StepWriter& SW, const Handle(StepRepr_RepresentationContextReference)& theEnt) const; + + Standard_EXPORT void Share(const Handle(StepRepr_RepresentationContextReference)& theEnt, Interface_EntityIterator& iter) const; + +}; +#endif // _RWStepRepr_RWRepresentationContextReference_HeaderFile_ diff --git a/src/RWStepRepr/RWStepRepr_RWRepresentationReference.cxx b/src/RWStepRepr/RWStepRepr_RWRepresentationReference.cxx new file mode 100644 index 0000000000..680db6227d --- /dev/null +++ b/src/RWStepRepr/RWStepRepr_RWRepresentationReference.cxx @@ -0,0 +1,88 @@ +// Created on : Sat May 02 12:41:14 2020 +// Created by: Irina KRYLOVA +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V3.0 +// Copyright (c) Open CASCADE 2020 +// +// This file is part of Open CASCADE Technology software library. +// +// This library is free software; you can redistribute it and/or modify it under +// the terms of the GNU Lesser General Public License version 2.1 as published +// by the Free Software Foundation, with special exception defined in the file +// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT +// distribution for complete text of the license and disclaimer of any warranty. +// +// Alternatively, this file may be used under the terms of Open CASCADE +// commercial license or contractual agreement. + +#include + +#include +#include +#include +#include +#include +#include + +//======================================================================= +//function : RWStepRepr_RWRepresentationReference +//purpose : +//======================================================================= + +RWStepRepr_RWRepresentationReference::RWStepRepr_RWRepresentationReference() {} + + +//======================================================================= +//function : ReadStep +//purpose : +//======================================================================= + +void RWStepRepr_RWRepresentationReference::ReadStep (const Handle(StepData_StepReaderData)& theData, + const Standard_Integer theNum, + Handle(Interface_Check)& theAch, + const Handle(StepRepr_RepresentationReference)& theEnt) const +{ + // Check number of parameters + if ( ! theData->CheckNbParams(theNum,2,theAch,"representation_reference") ) return; + + // Own fields of RepresentationReference + + Handle(TCollection_HAsciiString) aId; + theData->ReadString (theNum, 1, "id", theAch, aId); + + Handle(StepRepr_RepresentationContextReference) aContextOfItems; + theData->ReadEntity (theNum, 2, "context_of_items", theAch, STANDARD_TYPE(StepRepr_RepresentationContextReference), aContextOfItems); + + // Initialize entity + theEnt->Init(aId, + aContextOfItems); +} + +//======================================================================= +//function : WriteStep +//purpose : +//======================================================================= + +void RWStepRepr_RWRepresentationReference::WriteStep (StepData_StepWriter& SW, + const Handle(StepRepr_RepresentationReference)& theEnt) const +{ + + // Own fields of RepresentationReference + + SW.Send (theEnt->Id()); + + SW.Send (theEnt->ContextOfItems()); +} + +//======================================================================= +//function : Share +//purpose : +//======================================================================= + +void RWStepRepr_RWRepresentationReference::Share (const Handle(StepRepr_RepresentationReference)& theEnt, + Interface_EntityIterator& iter) const +{ + + // Own fields of RepresentationReference + + iter.AddItem (theEnt->ContextOfItems()); +} diff --git a/src/RWStepRepr/RWStepRepr_RWRepresentationReference.hxx b/src/RWStepRepr/RWStepRepr_RWRepresentationReference.hxx new file mode 100644 index 0000000000..633b92dd15 --- /dev/null +++ b/src/RWStepRepr/RWStepRepr_RWRepresentationReference.hxx @@ -0,0 +1,46 @@ +// Created on : Sat May 02 12:41:14 2020 +// Created by: Irina KRYLOVA +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V3.0 +// Copyright (c) Open CASCADE 2020 +// +// 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 _RWStepRepr_RWRepresentationReference_HeaderFile_ +#define _RWStepRepr_RWRepresentationReference_HeaderFile_ + +#include +#include +#include + +class StepData_StepReaderData; +class Interface_Check; +class StepData_StepWriter; +class Interface_EntityIterator; +class StepRepr_RepresentationReference; + +//! Read & Write tool for RepresentationReference +class RWStepRepr_RWRepresentationReference +{ +public: + + DEFINE_STANDARD_ALLOC + + Standard_EXPORT RWStepRepr_RWRepresentationReference(); + + Standard_EXPORT void ReadStep(const Handle(StepData_StepReaderData)& theData, const Standard_Integer theNum, Handle(Interface_Check)& theAch, const Handle(StepRepr_RepresentationReference)& theEnt) const; + + Standard_EXPORT void WriteStep(StepData_StepWriter& SW, const Handle(StepRepr_RepresentationReference)& theEnt) const; + + Standard_EXPORT void Share(const Handle(StepRepr_RepresentationReference)& theEnt, Interface_EntityIterator& iter) const; + +}; +#endif // _RWStepRepr_RWRepresentationReference_HeaderFile_ diff --git a/src/STEPCAFControl/STEPCAFControl_Reader.cxx b/src/STEPCAFControl/STEPCAFControl_Reader.cxx index a0b4fbb0bb..93a952e404 100644 --- a/src/STEPCAFControl/STEPCAFControl_Reader.cxx +++ b/src/STEPCAFControl/STEPCAFControl_Reader.cxx @@ -374,6 +374,7 @@ void STEPCAFControl_Reader::Init(const Handle(XSControl_WorkSession)& WS, // necessary only in Writer, to set good actor: WS->SelectNorm ( "STEP" ); myReader.SetWS(WS, scratch); myFiles.Clear(); + myMap.Clear(); } //======================================================================= @@ -724,26 +725,25 @@ Standard_Boolean STEPCAFControl_Reader::Transfer (STEPControl_Reader &reader, // and insert them to the document Handle(XCAFDoc_ShapeTool) STool = XCAFDoc_DocumentTool::ShapeTool(doc->Main()); if (STool.IsNull()) return Standard_False; - XCAFDoc_DataMapOfShapeLabel map; if (asOne) - Lseq.Append(AddShape(reader.OneShape(), STool, NewShapesMap, ShapePDMap, PDFileMap, map)); + Lseq.Append(AddShape(reader.OneShape(), STool, NewShapesMap, ShapePDMap, PDFileMap)); else { for (i = 1; i <= num; i++) { - Lseq.Append(AddShape(reader.Shape(i), STool, NewShapesMap, ShapePDMap, PDFileMap, map)); + Lseq.Append(AddShape(reader.Shape(i), STool, NewShapesMap, ShapePDMap, PDFileMap)); } } // read colors if (GetColorMode()) - ReadColors(reader.WS(), doc, map); + ReadColors(reader.WS(), doc); // read names if (GetNameMode()) - ReadNames(reader.WS(), doc, PDFileMap, map); + ReadNames(reader.WS(), doc, PDFileMap); // read validation props if (GetPropsMode()) - ReadValProps(reader.WS(), doc, PDFileMap, map); + ReadValProps(reader.WS(), doc, PDFileMap); // read layers if (GetLayerMode()) @@ -751,7 +751,7 @@ Standard_Boolean STEPCAFControl_Reader::Transfer (STEPControl_Reader &reader, // read SHUO entities from STEP model if (GetSHUOMode()) - ReadSHUOs(reader.WS(), doc, PDFileMap, map); + ReadSHUOs(reader.WS(), doc, PDFileMap); // read GDT entities from STEP model if (GetGDTMode()) @@ -767,7 +767,7 @@ Standard_Boolean STEPCAFControl_Reader::Transfer (STEPControl_Reader &reader, // Expand resulting CAF structure for sub-shapes (optionally with their // names) if requested - ExpandSubShapes(STool, map, ShapePDMap); + ExpandSubShapes(STool, ShapePDMap); // Update assembly compounds STool->UpdateAssemblies(); @@ -783,12 +783,11 @@ TDF_Label STEPCAFControl_Reader::AddShape(const TopoDS_Shape &S, const Handle(XCAFDoc_ShapeTool) &STool, const TopTools_MapOfShape &NewShapesMap, const STEPCAFControl_DataMapOfShapePD &ShapePDMap, - const STEPCAFControl_DataMapOfPDExternFile &PDFileMap, - XCAFDoc_DataMapOfShapeLabel &ShapeLabelMap) const + const STEPCAFControl_DataMapOfPDExternFile &PDFileMap) { // if shape has already been mapped, just return corresponding label - if (ShapeLabelMap.IsBound(S)) { - return ShapeLabelMap.Find(S); + if (myMap.IsBound(S)) { + return myMap.Find(S); } // if shape is located, create instance @@ -796,16 +795,16 @@ TDF_Label STEPCAFControl_Reader::AddShape(const TopoDS_Shape &S, TopoDS_Shape S0 = S; TopLoc_Location loc; S0.Location(loc); - AddShape(S0, STool, NewShapesMap, ShapePDMap, PDFileMap, ShapeLabelMap); + AddShape(S0, STool, NewShapesMap, ShapePDMap, PDFileMap); TDF_Label L = STool->AddShape(S, Standard_False); // should create reference - ShapeLabelMap.Bind(S, L); + myMap.Bind(S, L); return L; } // if shape is not compound, simple add it if (S.ShapeType() != TopAbs_COMPOUND) { TDF_Label L = STool->AddShape(S, Standard_False); - ShapeLabelMap.Bind(S, L); + myMap.Bind(S, L); return L; } @@ -833,7 +832,7 @@ TDF_Label STEPCAFControl_Reader::AddShape(const TopoDS_Shape &S, if (!EF->GetLabel().IsNull()) { // but if components >0, ignore extern ref! if (nbComponents <= 0) { - ShapeLabelMap.Bind(S, EF->GetLabel()); + myMap.Bind(S, EF->GetLabel()); STool->SetExternRefs(EF->GetLabel(), SHAS); return EF->GetLabel(); } @@ -851,7 +850,7 @@ TDF_Label STEPCAFControl_Reader::AddShape(const TopoDS_Shape &S, if (!isAssembly) { TDF_Label L = STool->AddShape(S, Standard_False); if (SHAS.Length() > 0) STool->SetExternRefs(L, SHAS); - ShapeLabelMap.Bind(S, L); + myMap.Bind(S, L); return L; } @@ -862,16 +861,16 @@ TDF_Label STEPCAFControl_Reader::AddShape(const TopoDS_Shape &S, TopoDS_Shape Sub0 = it.Value(); TopLoc_Location loc; Sub0.Location(loc); - TDF_Label subL = AddShape(Sub0, STool, NewShapesMap, ShapePDMap, PDFileMap, ShapeLabelMap); + TDF_Label subL = AddShape(Sub0, STool, NewShapesMap, ShapePDMap, PDFileMap); if (!subL.IsNull()) { TDF_Label instL = STool->AddComponent(L, subL, it.Value().Location()); - if (!ShapeLabelMap.IsBound(it.Value())) { - ShapeLabelMap.Bind(it.Value(), instL); + if (!myMap.IsBound(it.Value())) { + myMap.Bind(it.Value(), instL); } } } if (SHAS.Length() > 0) STool->SetExternRefs(L, SHAS); - ShapeLabelMap.Bind(S, L); + myMap.Bind(S, L); //STool->SetShape ( L, S ); // it is necessary for assemblies OCC1747 // commemted by skl for OCC2941 return L; @@ -991,8 +990,7 @@ static void propagateColorToParts(const Handle(XCAFDoc_ShapeTool)& theSTool, //======================================================================= Standard_Boolean STEPCAFControl_Reader::ReadColors(const Handle(XSControl_WorkSession) &WS, - Handle(TDocStd_Document)& Doc, - const XCAFDoc_DataMapOfShapeLabel &ShapeLabelMap) const + Handle(TDocStd_Document)& Doc) const { STEPConstruct_Styles Styles(WS); if (!Styles.LoadStyles()) { @@ -1086,7 +1084,7 @@ Standard_Boolean STEPCAFControl_Reader::ReadColors(const Handle(XSControl_WorkSe TopoDS_Shape aSh; // PTV 10.02.2003 to find component of assembly CORRECTLY STEPConstruct_Tool Tool(WS); - TDF_Label aShLab = FindInstance(NAUO, CTool->ShapeTool(), Tool, ShapeLabelMap); + TDF_Label aShLab = FindInstance(NAUO, CTool->ShapeTool(), Tool, myMap); aSh = CTool->ShapeTool()->GetShape(aShLab); if (!aSh.IsNull()) { S = aSh; @@ -1241,8 +1239,7 @@ TDF_Label STEPCAFControl_Reader::FindInstance(const Handle(StepRepr_NextAssembly Standard_Boolean STEPCAFControl_Reader::ReadNames(const Handle(XSControl_WorkSession) &WS, Handle(TDocStd_Document)& Doc, - const STEPCAFControl_DataMapOfPDExternFile &PDFileMap, - const XCAFDoc_DataMapOfShapeLabel &ShapeLabelMap) const + const STEPCAFControl_DataMapOfPDExternFile &PDFileMap) const { // get starting data const Handle(Interface_InterfaceModel) &Model = WS->Model(); @@ -1282,7 +1279,7 @@ Standard_Boolean STEPCAFControl_Reader::ReadNames(const Handle(XSControl_WorkSes else name = new TCollection_HAsciiString; } // find proper label - L = FindInstance(NAUO, STool, Tool, ShapeLabelMap); + L = FindInstance(NAUO, STool, Tool, myMap); if (L.IsNull()) continue; TCollection_ExtendedString str = convertName (name->String()); @@ -1304,7 +1301,7 @@ Standard_Boolean STEPCAFControl_Reader::ReadNames(const Handle(XSControl_WorkSes name = Prod->Id(); else name = new TCollection_HAsciiString; - L = GetLabelFromPD(PD, STool, TP, PDFileMap, ShapeLabelMap); + L = GetLabelFromPD(PD, STool, TP, PDFileMap, myMap); if (L.IsNull()) continue; TCollection_ExtendedString str = convertName (name->String()); TDataStd_Name::Set(L, str); @@ -1352,8 +1349,7 @@ static TDF_Label GetLabelFromPD(const Handle(StepBasic_ProductDefinition) &PD, Standard_Boolean STEPCAFControl_Reader::ReadValProps(const Handle(XSControl_WorkSession) &WS, Handle(TDocStd_Document)& Doc, - const STEPCAFControl_DataMapOfPDExternFile &PDFileMap, - const XCAFDoc_DataMapOfShapeLabel &ShapeLabelMap) const + const STEPCAFControl_DataMapOfPDExternFile &PDFileMap) const { // get starting data const Handle(XSControl_TransferReader) &TR = WS->TransferReader(); @@ -1393,7 +1389,7 @@ Standard_Boolean STEPCAFControl_Reader::ReadValProps(const Handle(XSControl_Work NAUO = Handle(StepRepr_NextAssemblyUsageOccurrence)::DownCast(subs1.Value()); } if (!NAUO.IsNull()) { - L = FindInstance(NAUO, STool, WS, ShapeLabelMap); + L = FindInstance(NAUO, STool, WS, myMap); if (L.IsNull()) continue; } else { @@ -1405,7 +1401,7 @@ Standard_Boolean STEPCAFControl_Reader::ReadValProps(const Handle(XSControl_Work ProdDef = Handle(StepBasic_ProductDefinition)::DownCast(subsPDS.Value()); } if (ProdDef.IsNull()) continue; - L = GetLabelFromPD(ProdDef, STool, Props, PDFileMap, ShapeLabelMap); + L = GetLabelFromPD(ProdDef, STool, Props, PDFileMap, myMap); } } @@ -1450,8 +1446,8 @@ Standard_Boolean STEPCAFControl_Reader::ReadValProps(const Handle(XSControl_Work TopoDS_Shape S; S = TransferBRep::ShapeResult(TP, binder); if (S.IsNull()) continue; - if (ShapeLabelMap.IsBound(S)) - L = ShapeLabelMap.Find(S); + if (myMap.IsBound(S)) + L = myMap.Find(S); if (L.IsNull()) STool->Search(S, L, Standard_True, Standard_True, Standard_True); } @@ -1656,8 +1652,7 @@ static TDF_Label setSHUOintoDoc(const Handle(XSControl_WorkSession) &WS, Standard_Boolean STEPCAFControl_Reader::ReadSHUOs(const Handle(XSControl_WorkSession) &WS, Handle(TDocStd_Document)& Doc, - const STEPCAFControl_DataMapOfPDExternFile &PDFileMap, - const XCAFDoc_DataMapOfShapeLabel &ShapeLabelMap) const + const STEPCAFControl_DataMapOfPDExternFile &PDFileMap) const { // the big part code duplication from ReadColors. // It is possible to share this code functionality, just to decide how ??? @@ -1724,7 +1719,7 @@ Standard_Boolean STEPCAFControl_Reader::ReadSHUOs(const Handle(XSControl_WorkSes continue; // set the SHUO structure to the document - TDF_Label aLabelForStyle = setSHUOintoDoc(WS, SHUO, STool, PDFileMap, ShapeLabelMap); + TDF_Label aLabelForStyle = setSHUOintoDoc(WS, SHUO, STool, PDFileMap, myMap); if (aLabelForStyle.IsNull()) { #ifdef OCCT_DEBUG std::cout << "Warning: " << __FILE__ << ": coudnot create SHUO structure in the document" << std::endl; @@ -4560,7 +4555,6 @@ void collectRepresentationItems(const Interface_Graph& theGraph, //======================================================================= void STEPCAFControl_Reader::ExpandSubShapes(const Handle(XCAFDoc_ShapeTool)& ShapeTool, - const XCAFDoc_DataMapOfShapeLabel& ShapeLabelMap, const STEPCAFControl_DataMapOfShapePD& ShapePDMap) const { const Handle(Transfer_TransientProcess)& TP = Reader().WS()->TransferReader()->TransientProcess(); @@ -4610,10 +4604,10 @@ void STEPCAFControl_Reader::ExpandSubShapes(const Handle(XCAFDoc_ShapeTool)& Sha if (aReprItems.Length() == 0) continue; - if (!ShapeLabelMap.IsBound(aRootShape)) + if (!myMap.IsBound(aRootShape)) continue; - TDF_Label aRootLab = ShapeLabelMap.Find(aRootShape); + TDF_Label aRootLab = myMap.Find(aRootShape); // Do not add subshapes to assembly, // they will be processed with corresponding Shape_Product_Definition of necessary part. if (ShapeTool->IsAssembly(aRootLab)) diff --git a/src/STEPCAFControl/STEPCAFControl_Reader.hxx b/src/STEPCAFControl/STEPCAFControl_Reader.hxx index def983cbdb..355acdd57f 100644 --- a/src/STEPCAFControl/STEPCAFControl_Reader.hxx +++ b/src/STEPCAFControl/STEPCAFControl_Reader.hxx @@ -172,8 +172,7 @@ public: //! Get View mode Standard_EXPORT Standard_Boolean GetViewMode() const; - - + const XCAFDoc_DataMapOfShapeLabel& GetShapeLabelMap() const { return myMap; } protected: @@ -195,7 +194,7 @@ protected: //! Depending on a case, this shape can be added as one, or //! as assembly, or (in case if it is associated with external //! reference) taken as that referred shape - Standard_EXPORT TDF_Label AddShape (const TopoDS_Shape& S, const Handle(XCAFDoc_ShapeTool)& STool, const TopTools_MapOfShape& NewShapesMap, const STEPCAFControl_DataMapOfShapePD& ShapePDMap, const STEPCAFControl_DataMapOfPDExternFile& PDFileMap, XCAFDoc_DataMapOfShapeLabel& ShapeLabelMap) const; + Standard_EXPORT TDF_Label AddShape (const TopoDS_Shape& S, const Handle(XCAFDoc_ShapeTool)& STool, const TopTools_MapOfShape& NewShapesMap, const STEPCAFControl_DataMapOfShapePD& ShapePDMap, const STEPCAFControl_DataMapOfPDExternFile& PDFileMap); //! Reads (or if returns already read) extern file with //! given name @@ -208,17 +207,16 @@ protected: //! corresponding color assignments in the DECAF document Standard_EXPORT Standard_Boolean ReadColors (const Handle(XSControl_WorkSession)& WS, - Handle(TDocStd_Document)& doc, - const XCAFDoc_DataMapOfShapeLabel& ShapeLabelMap) const; + Handle(TDocStd_Document)& doc) const; //! Reads names of parts defined in the STEP model and //! assigns them to corresponding labels in the DECAF document - Standard_EXPORT Standard_Boolean ReadNames (const Handle(XSControl_WorkSession)& WS, Handle(TDocStd_Document)& doc, const STEPCAFControl_DataMapOfPDExternFile& PDFileMap, const XCAFDoc_DataMapOfShapeLabel& ShapeLabelMap) const; + Standard_EXPORT Standard_Boolean ReadNames (const Handle(XSControl_WorkSession)& WS, Handle(TDocStd_Document)& doc, const STEPCAFControl_DataMapOfPDExternFile& PDFileMap) const; //! Reads validation properties assigned to shapes in the STEP //! model and assigns them to corresponding labels in the DECAF //! document - Standard_EXPORT Standard_Boolean ReadValProps (const Handle(XSControl_WorkSession)& WS, Handle(TDocStd_Document)& doc, const STEPCAFControl_DataMapOfPDExternFile& PDFileMap, const XCAFDoc_DataMapOfShapeLabel& ShapeLabelMap) const; + Standard_EXPORT Standard_Boolean ReadValProps (const Handle(XSControl_WorkSession)& WS, Handle(TDocStd_Document)& doc, const STEPCAFControl_DataMapOfPDExternFile& PDFileMap) const; //! Reads layers of parts defined in the STEP model and //! set reference between shape and layers in the DECAF document @@ -226,7 +224,7 @@ protected: //! Reads SHUO for instances defined in the STEP model and //! set reference between shape instances from different assemblyes - Standard_EXPORT Standard_Boolean ReadSHUOs (const Handle(XSControl_WorkSession)& WS, Handle(TDocStd_Document)& doc, const STEPCAFControl_DataMapOfPDExternFile& PDFileMap, const XCAFDoc_DataMapOfShapeLabel& ShapeLabelMap) const; + Standard_EXPORT Standard_Boolean ReadSHUOs (const Handle(XSControl_WorkSession)& WS, Handle(TDocStd_Document)& doc, const STEPCAFControl_DataMapOfPDExternFile& PDFileMap) const; //! Reads D> for instances defined in the STEP model and //! set reference between shape instances from different assemblyes @@ -248,7 +246,7 @@ protected: //! expands their correspondent Labels in XDE Document so that //! to have a dedicated sub-Label for each sub-shape coming //! with associated name in its STEP Representation Item. - Standard_EXPORT void ExpandSubShapes (const Handle(XCAFDoc_ShapeTool)& theShapeTool, const XCAFDoc_DataMapOfShapeLabel& theShapeLabelMap, const STEPCAFControl_DataMapOfShapePD& theShapePDMap) const; + Standard_EXPORT void ExpandSubShapes (const Handle(XCAFDoc_ShapeTool)& theShapeTool, const STEPCAFControl_DataMapOfShapePD& theShapePDMap) const; //! Expands the topological structure of Manifold Solid BRep //! STEP entity to OCAF sub-tree. Entities having no names @@ -299,6 +297,7 @@ private: STEPControl_Reader myReader; NCollection_DataMap myFiles; + XCAFDoc_DataMapOfShapeLabel myMap; Standard_Boolean myColorMode; Standard_Boolean myNameMode; Standard_Boolean myLayerMode; diff --git a/src/StepAP214/StepAP214_Protocol.cxx b/src/StepAP214/StepAP214_Protocol.cxx index 00da5908ca..7d69f8e42b 100644 --- a/src/StepAP214/StepAP214_Protocol.cxx +++ b/src/StepAP214/StepAP214_Protocol.cxx @@ -750,13 +750,92 @@ static Standard_CString schemaAP242DIS = "AP242_MANAGED_MODEL_BASED_3D_ENGINEERI #include #include +// Added for kinematics implementation +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + #include #include #include #include static int THE_StepAP214_Protocol_init = 0; -static Interface_DataMapOfTransientInteger types(800); +static Interface_DataMapOfTransientInteger types(803); //======================================================================= //function : StepAP214_Protocol @@ -1468,6 +1547,85 @@ StepAP214_Protocol::StepAP214_Protocol () types.Bind (STANDARD_TYPE(StepVisual_SurfaceStyleReflectanceAmbient), 721); types.Bind (STANDARD_TYPE(StepVisual_SurfaceStyleRendering), 722); types.Bind (STANDARD_TYPE(StepVisual_SurfaceStyleRenderingWithProperties), 723); + + // Added for kinematics implementation + types.Bind(STANDARD_TYPE(StepRepr_RepresentationContextReference), 724); + types.Bind(STANDARD_TYPE(StepRepr_RepresentationReference), 725); + types.Bind(STANDARD_TYPE(StepGeom_SuParameters), 726); + types.Bind(STANDARD_TYPE(StepKinematics_RotationAboutDirection), 727); + types.Bind(STANDARD_TYPE(StepKinematics_KinematicJoint), 728); + types.Bind(STANDARD_TYPE(StepKinematics_ActuatedKinematicPair), 729); + types.Bind(STANDARD_TYPE(StepKinematics_ContextDependentKinematicLinkRepresentation), 730); + types.Bind(STANDARD_TYPE(StepKinematics_CylindricalPair), 731); + types.Bind(STANDARD_TYPE(StepKinematics_CylindricalPairValue), 732); + types.Bind(STANDARD_TYPE(StepKinematics_CylindricalPairWithRange), 733); + types.Bind(STANDARD_TYPE(StepKinematics_FullyConstrainedPair), 734); + types.Bind(STANDARD_TYPE(StepKinematics_GearPair), 735); + types.Bind(STANDARD_TYPE(StepKinematics_GearPairValue), 736); + types.Bind(STANDARD_TYPE(StepKinematics_GearPairWithRange), 737); + types.Bind(STANDARD_TYPE(StepKinematics_HomokineticPair), 738); + types.Bind(STANDARD_TYPE(StepKinematics_KinematicLink), 739); + types.Bind(STANDARD_TYPE(StepKinematics_KinematicLinkRepresentationAssociation), 740); + types.Bind(STANDARD_TYPE(StepKinematics_KinematicPropertyMechanismRepresentation), 741); + types.Bind(STANDARD_TYPE(StepKinematics_KinematicTopologyStructure), 742); + types.Bind(STANDARD_TYPE(StepKinematics_LowOrderKinematicPair), 743); + types.Bind(STANDARD_TYPE(StepKinematics_LowOrderKinematicPairValue), 744); + types.Bind(STANDARD_TYPE(StepKinematics_LowOrderKinematicPairWithRange), 745); + types.Bind(STANDARD_TYPE(StepKinematics_MechanismRepresentation), 746); + types.Bind(STANDARD_TYPE(StepKinematics_OrientedJoint), 747); + types.Bind(STANDARD_TYPE(StepKinematics_PlanarCurvePair), 748); + types.Bind(STANDARD_TYPE(StepKinematics_PlanarCurvePairRange), 749); + types.Bind(STANDARD_TYPE(StepKinematics_PlanarPair), 750); + types.Bind(STANDARD_TYPE(StepKinematics_PlanarPairValue), 751); + types.Bind(STANDARD_TYPE(StepKinematics_PlanarPairWithRange), 752); + types.Bind(STANDARD_TYPE(StepKinematics_PointOnPlanarCurvePair), 753); + types.Bind(STANDARD_TYPE(StepKinematics_PointOnPlanarCurvePairValue), 754); + types.Bind(STANDARD_TYPE(StepKinematics_PointOnPlanarCurvePairWithRange), 755); + types.Bind(STANDARD_TYPE(StepKinematics_PointOnSurfacePair), 756); + types.Bind(STANDARD_TYPE(StepKinematics_PointOnSurfacePairValue), 757); + types.Bind(STANDARD_TYPE(StepKinematics_PointOnSurfacePairWithRange), 758); + types.Bind(STANDARD_TYPE(StepKinematics_PrismaticPair), 759); + types.Bind(STANDARD_TYPE(StepKinematics_PrismaticPairValue), 760); + types.Bind(STANDARD_TYPE(StepKinematics_PrismaticPairWithRange), 761); + types.Bind(STANDARD_TYPE(StepKinematics_ProductDefinitionKinematics), 762); + types.Bind(STANDARD_TYPE(StepKinematics_ProductDefinitionRelationshipKinematics), 763); + types.Bind(STANDARD_TYPE(StepKinematics_RackAndPinionPair), 764); + types.Bind(STANDARD_TYPE(StepKinematics_RackAndPinionPairValue), 765); + types.Bind(STANDARD_TYPE(StepKinematics_RackAndPinionPairWithRange), 766); + types.Bind(STANDARD_TYPE(StepKinematics_RevolutePair), 767); + types.Bind(STANDARD_TYPE(StepKinematics_RevolutePairValue), 768); + types.Bind(STANDARD_TYPE(StepKinematics_RevolutePairWithRange), 769); + types.Bind(STANDARD_TYPE(StepKinematics_RollingCurvePair), 770); + types.Bind(STANDARD_TYPE(StepKinematics_RollingCurvePairValue), 771); + types.Bind(STANDARD_TYPE(StepKinematics_RollingSurfacePair), 772); + types.Bind(STANDARD_TYPE(StepKinematics_RollingSurfacePairValue), 773); + types.Bind(STANDARD_TYPE(StepKinematics_ScrewPair), 774); + types.Bind(STANDARD_TYPE(StepKinematics_ScrewPairValue), 775); + types.Bind(STANDARD_TYPE(StepKinematics_ScrewPairWithRange), 776); + types.Bind(STANDARD_TYPE(StepKinematics_SlidingCurvePair), 777); + types.Bind(STANDARD_TYPE(StepKinematics_SlidingCurvePairValue), 778); + types.Bind(STANDARD_TYPE(StepKinematics_SlidingSurfacePair), 779); + types.Bind(STANDARD_TYPE(StepKinematics_SlidingSurfacePairValue), 780); + types.Bind(STANDARD_TYPE(StepKinematics_SphericalPair), 781); + types.Bind(STANDARD_TYPE(StepKinematics_SphericalPairValue), 782); + types.Bind(STANDARD_TYPE(StepKinematics_SphericalPairWithPin), 783); + types.Bind(STANDARD_TYPE(StepKinematics_SphericalPairWithPinAndRange), 784); + types.Bind(STANDARD_TYPE(StepKinematics_SphericalPairWithRange), 785); + types.Bind(STANDARD_TYPE(StepKinematics_SurfacePairWithRange), 786); + types.Bind(STANDARD_TYPE(StepKinematics_UnconstrainedPair), 787); + types.Bind(STANDARD_TYPE(StepKinematics_UnconstrainedPairValue), 788); + types.Bind(STANDARD_TYPE(StepKinematics_UniversalPair), 789); + types.Bind(STANDARD_TYPE(StepKinematics_UniversalPairValue), 790); + types.Bind(STANDARD_TYPE(StepKinematics_UniversalPairWithRange), 791); + types.Bind(STANDARD_TYPE(StepKinematics_PairRepresentationRelationship), 792); + types.Bind(STANDARD_TYPE(StepKinematics_RigidLinkRepresentation), 793); + types.Bind(STANDARD_TYPE(StepKinematics_KinematicTopologyDirectedStructure), 794); + types.Bind(STANDARD_TYPE(StepKinematics_KinematicTopologyNetworkStructure), 795); + types.Bind(STANDARD_TYPE(StepKinematics_LinearFlexibleAndPinionPair), 796); + types.Bind(STANDARD_TYPE(StepKinematics_LinearFlexibleAndPlanarCurvePair), 797); + types.Bind(STANDARD_TYPE(StepKinematics_LinearFlexibleLinkRepresentation), 798); + types.Bind(STANDARD_TYPE(StepKinematics_ActuatedKinPairAndOrderKinPair), 800); + types.Bind(STANDARD_TYPE(StepKinematics_MechanismStateRepresentation), 801); } diff --git a/src/StepGeom/FILES b/src/StepGeom/FILES index 600f2c225e..2f6c00435c 100644 --- a/src/StepGeom/FILES +++ b/src/StepGeom/FILES @@ -162,6 +162,8 @@ StepGeom_SeamCurve.cxx StepGeom_SeamCurve.hxx StepGeom_SphericalSurface.cxx StepGeom_SphericalSurface.hxx +StepGeom_SuParameters.cxx +StepGeom_SuParameters.hxx StepGeom_Surface.cxx StepGeom_Surface.hxx StepGeom_SurfaceBoundary.cxx diff --git a/src/StepGeom/StepGeom_SuParameters.cxx b/src/StepGeom/StepGeom_SuParameters.cxx new file mode 100644 index 0000000000..20c2ce38b8 --- /dev/null +++ b/src/StepGeom/StepGeom_SuParameters.cxx @@ -0,0 +1,176 @@ +// Created on : Sat May 02 12:41:14 2020 +// Created by: Irina KRYLOVA +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V3.0 +// Copyright (c) Open CASCADE 2020 +// +// This file is part of Open CASCADE Technology software library. +// +// This library is free software; you can redistribute it and/or modify it under +// the terms of the GNU Lesser General Public License version 2.1 as published +// by the Free Software Foundation, with special exception defined in the file +// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT +// distribution for complete text of the license and disclaimer of any warranty. +// +// Alternatively, this file may be used under the terms of Open CASCADE +// commercial license or contractual agreement. + +#include + +IMPLEMENT_STANDARD_RTTIEXT(StepGeom_SuParameters, StepGeom_GeometricRepresentationItem) + +//======================================================================= +//function : StepGeom_SuParameters +//purpose : +//======================================================================= + +StepGeom_SuParameters::StepGeom_SuParameters () +{ +} + +//======================================================================= +//function : Init +//purpose : +//======================================================================= + +void StepGeom_SuParameters::Init (const Handle(TCollection_HAsciiString)& theRepresentationItem_Name, + const Standard_Real theA, + const Standard_Real theAlpha, + const Standard_Real theB, + const Standard_Real theBeta, + const Standard_Real theC, + const Standard_Real theGamma) +{ + StepGeom_GeometricRepresentationItem::Init(theRepresentationItem_Name); + + myA = theA; + + myAlpha = theAlpha; + + myB = theB; + + myBeta = theBeta; + + myC = theC; + + myGamma = theGamma; +} + +//======================================================================= +//function : A +//purpose : +//======================================================================= + +Standard_Real StepGeom_SuParameters::A () const +{ + return myA; +} + +//======================================================================= +//function : SetA +//purpose : +//======================================================================= + +void StepGeom_SuParameters::SetA (const Standard_Real theA) +{ + myA = theA; +} + +//======================================================================= +//function : Alpha +//purpose : +//======================================================================= + +Standard_Real StepGeom_SuParameters::Alpha () const +{ + return myAlpha; +} + +//======================================================================= +//function : SetAlpha +//purpose : +//======================================================================= + +void StepGeom_SuParameters::SetAlpha (const Standard_Real theAlpha) +{ + myAlpha = theAlpha; +} + +//======================================================================= +//function : B +//purpose : +//======================================================================= + +Standard_Real StepGeom_SuParameters::B () const +{ + return myB; +} + +//======================================================================= +//function : SetB +//purpose : +//======================================================================= + +void StepGeom_SuParameters::SetB (const Standard_Real theB) +{ + myB = theB; +} + +//======================================================================= +//function : Beta +//purpose : +//======================================================================= + +Standard_Real StepGeom_SuParameters::Beta () const +{ + return myBeta; +} + +//======================================================================= +//function : SetBeta +//purpose : +//======================================================================= + +void StepGeom_SuParameters::SetBeta (const Standard_Real theBeta) +{ + myBeta = theBeta; +} + +//======================================================================= +//function : C +//purpose : +//======================================================================= + +Standard_Real StepGeom_SuParameters::C () const +{ + return myC; +} + +//======================================================================= +//function : SetC +//purpose : +//======================================================================= + +void StepGeom_SuParameters::SetC (const Standard_Real theC) +{ + myC = theC; +} + +//======================================================================= +//function : Gamma +//purpose : +//======================================================================= + +Standard_Real StepGeom_SuParameters::Gamma () const +{ + return myGamma; +} + +//======================================================================= +//function : SetGamma +//purpose : +//======================================================================= + +void StepGeom_SuParameters::SetGamma (const Standard_Real theGamma) +{ + myGamma = theGamma; +} diff --git a/src/StepGeom/StepGeom_SuParameters.hxx b/src/StepGeom/StepGeom_SuParameters.hxx new file mode 100644 index 0000000000..1a47dbf9e8 --- /dev/null +++ b/src/StepGeom/StepGeom_SuParameters.hxx @@ -0,0 +1,86 @@ +// Created on : Sat May 02 12:41:14 2020 +// Created by: Irina KRYLOVA +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V3.0 +// Copyright (c) Open CASCADE 2020 +// +// 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 _StepGeom_SuParameters_HeaderFile_ +#define _StepGeom_SuParameters_HeaderFile_ + +#include +#include +#include + +#include + +DEFINE_STANDARD_HANDLE(StepGeom_SuParameters, StepGeom_GeometricRepresentationItem) + +//! Representation of STEP entity SuParameters +class StepGeom_SuParameters : public StepGeom_GeometricRepresentationItem +{ +public : + + //! default constructor + Standard_EXPORT StepGeom_SuParameters(); + + //! Initialize all fields (own and inherited) + Standard_EXPORT void Init(const Handle(TCollection_HAsciiString)& theRepresentationItem_Name, + const Standard_Real theA, + const Standard_Real theAlpha, + const Standard_Real theB, + const Standard_Real theBeta, + const Standard_Real theC, + const Standard_Real theGamma); + + //! Returns field A + Standard_EXPORT Standard_Real A() const; + //! Sets field A + Standard_EXPORT void SetA (const Standard_Real theA); + + //! Returns field Alpha + Standard_EXPORT Standard_Real Alpha() const; + //! Sets field Alpha + Standard_EXPORT void SetAlpha (const Standard_Real theAlpha); + + //! Returns field B + Standard_EXPORT Standard_Real B() const; + //! Sets field B + Standard_EXPORT void SetB (const Standard_Real theB); + + //! Returns field Beta + Standard_EXPORT Standard_Real Beta() const; + //! Sets field Beta + Standard_EXPORT void SetBeta (const Standard_Real theBeta); + + //! Returns field C + Standard_EXPORT Standard_Real C() const; + //! Sets field C + Standard_EXPORT void SetC (const Standard_Real theC); + + //! Returns field Gamma + Standard_EXPORT Standard_Real Gamma() const; + //! Sets field Gamma + Standard_EXPORT void SetGamma (const Standard_Real theGamma); + +DEFINE_STANDARD_RTTIEXT(StepGeom_SuParameters, StepGeom_GeometricRepresentationItem) + +private: + Standard_Real myA; + Standard_Real myAlpha; + Standard_Real myB; + Standard_Real myBeta; + Standard_Real myC; + Standard_Real myGamma; + +}; +#endif // _StepGeom_SuParameters_HeaderFile_ diff --git a/src/StepKinematics/FILES b/src/StepKinematics/FILES new file mode 100644 index 0000000000..7e884b996f --- /dev/null +++ b/src/StepKinematics/FILES @@ -0,0 +1,171 @@ +StepKinematics_ActuatedDirection.hxx +StepKinematics_ActuatedKinematicPair.cxx +StepKinematics_ActuatedKinematicPair.hxx +StepKinematics_ContextDependentKinematicLinkRepresentation.cxx +StepKinematics_ContextDependentKinematicLinkRepresentation.hxx +StepKinematics_CylindricalPair.cxx +StepKinematics_CylindricalPair.hxx +StepKinematics_CylindricalPairValue.cxx +StepKinematics_CylindricalPairValue.hxx +StepKinematics_CylindricalPairWithRange.cxx +StepKinematics_CylindricalPairWithRange.hxx +StepKinematics_FullyConstrainedPair.cxx +StepKinematics_FullyConstrainedPair.hxx +StepKinematics_GearPair.cxx +StepKinematics_GearPair.hxx +StepKinematics_GearPairValue.cxx +StepKinematics_GearPairValue.hxx +StepKinematics_GearPairWithRange.cxx +StepKinematics_GearPairWithRange.hxx +StepKinematics_HighOrderKinematicPair.cxx +StepKinematics_HighOrderKinematicPair.hxx +StepKinematics_HomokineticPair.cxx +StepKinematics_HomokineticPair.hxx +StepKinematics_KinematicJoint.cxx +StepKinematics_KinematicJoint.hxx +StepKinematics_KinematicLink.cxx +StepKinematics_KinematicLink.hxx +StepKinematics_KinematicLinkRepresentation.cxx +StepKinematics_KinematicLinkRepresentation.hxx +StepKinematics_KinematicLinkRepresentationAssociation.cxx +StepKinematics_KinematicLinkRepresentationAssociation.hxx +StepKinematics_KinematicPair.cxx +StepKinematics_KinematicPair.hxx +StepKinematics_ActuatedKinPairAndOrderKinPair.cxx +StepKinematics_ActuatedKinPairAndOrderKinPair.hxx +StepKinematics_KinematicPropertyDefinitionRepresentation.cxx +StepKinematics_KinematicPropertyDefinitionRepresentation.hxx +StepKinematics_KinematicPropertyMechanismRepresentation.cxx +StepKinematics_KinematicPropertyMechanismRepresentation.hxx +StepKinematics_KinematicTopologyStructure.cxx +StepKinematics_KinematicTopologyStructure.hxx +StepKinematics_LinearFlexibleAndPinionPair.cxx +StepKinematics_LinearFlexibleAndPinionPair.hxx +StepKinematics_LinearFlexibleAndPlanarCurvePair.cxx +StepKinematics_LinearFlexibleAndPlanarCurvePair.hxx +StepKinematics_LinearFlexibleLinkRepresentation.cxx +StepKinematics_LinearFlexibleLinkRepresentation.hxx +StepKinematics_LowOrderKinematicPair.cxx +StepKinematics_LowOrderKinematicPair.hxx +StepKinematics_LowOrderKinematicPairValue.cxx +StepKinematics_LowOrderKinematicPairValue.hxx +StepKinematics_LowOrderKinematicPairWithMotionCoupling.cxx +StepKinematics_LowOrderKinematicPairWithMotionCoupling.hxx +StepKinematics_LowOrderKinematicPairWithRange.cxx +StepKinematics_LowOrderKinematicPairWithRange.hxx +StepKinematics_MechanismRepresentation.cxx +StepKinematics_MechanismRepresentation.hxx +StepKinematics_MechanismStateRepresentation.cxx +StepKinematics_MechanismStateRepresentation.hxx +StepKinematics_OrientedJoint.cxx +StepKinematics_OrientedJoint.hxx +StepKinematics_PairRepresentationRelationship.cxx +StepKinematics_PairRepresentationRelationship.hxx +StepKinematics_PairValue.cxx +StepKinematics_PairValue.hxx +StepKinematics_PlanarCurvePair.cxx +StepKinematics_PlanarCurvePair.hxx +StepKinematics_PlanarCurvePairRange.cxx +StepKinematics_PlanarCurvePairRange.hxx +StepKinematics_PlanarPair.cxx +StepKinematics_PlanarPair.hxx +StepKinematics_PlanarPairValue.cxx +StepKinematics_PlanarPairValue.hxx +StepKinematics_PlanarPairWithRange.cxx +StepKinematics_PlanarPairWithRange.hxx +StepKinematics_PointOnPlanarCurvePair.cxx +StepKinematics_PointOnPlanarCurvePair.hxx +StepKinematics_PointOnPlanarCurvePairValue.cxx +StepKinematics_PointOnPlanarCurvePairValue.hxx +StepKinematics_PointOnPlanarCurvePairWithRange.cxx +StepKinematics_PointOnPlanarCurvePairWithRange.hxx +StepKinematics_PointOnSurfacePair.cxx +StepKinematics_PointOnSurfacePair.hxx +StepKinematics_PointOnSurfacePairValue.cxx +StepKinematics_PointOnSurfacePairValue.hxx +StepKinematics_PointOnSurfacePairWithRange.cxx +StepKinematics_PointOnSurfacePairWithRange.hxx +StepKinematics_PrismaticPair.cxx +StepKinematics_PrismaticPair.hxx +StepKinematics_PrismaticPairValue.cxx +StepKinematics_PrismaticPairValue.hxx +StepKinematics_PrismaticPairWithRange.cxx +StepKinematics_PrismaticPairWithRange.hxx +StepKinematics_ProductDefinitionKinematics.cxx +StepKinematics_ProductDefinitionKinematics.hxx +StepKinematics_ProductDefinitionRelationshipKinematics.cxx +StepKinematics_ProductDefinitionRelationshipKinematics.hxx +StepKinematics_RackAndPinionPair.cxx +StepKinematics_RackAndPinionPair.hxx +StepKinematics_RackAndPinionPairValue.cxx +StepKinematics_RackAndPinionPairValue.hxx +StepKinematics_RackAndPinionPairWithRange.cxx +StepKinematics_RackAndPinionPairWithRange.hxx +StepKinematics_RevolutePair.cxx +StepKinematics_RevolutePair.hxx +StepKinematics_RevolutePairValue.cxx +StepKinematics_RevolutePairValue.hxx +StepKinematics_RevolutePairWithRange.cxx +StepKinematics_RevolutePairWithRange.hxx +StepKinematics_RigidLinkRepresentation.cxx +StepKinematics_RigidLinkRepresentation.hxx +StepKinematics_RigidPlacement.cxx +StepKinematics_RigidPlacement.hxx +StepKinematics_RollingCurvePair.cxx +StepKinematics_RollingCurvePair.hxx +StepKinematics_RollingCurvePairValue.cxx +StepKinematics_RollingCurvePairValue.hxx +StepKinematics_RollingSurfacePair.cxx +StepKinematics_RollingSurfacePair.hxx +StepKinematics_RollingSurfacePairValue.cxx +StepKinematics_RollingSurfacePairValue.hxx +StepKinematics_RotationAboutDirection.cxx +StepKinematics_RotationAboutDirection.hxx +StepKinematics_ScrewPair.cxx +StepKinematics_ScrewPair.hxx +StepKinematics_ScrewPairValue.cxx +StepKinematics_ScrewPairValue.hxx +StepKinematics_ScrewPairWithRange.cxx +StepKinematics_ScrewPairWithRange.hxx +StepKinematics_SlidingCurvePair.cxx +StepKinematics_SlidingCurvePair.hxx +StepKinematics_SlidingCurvePairValue.cxx +StepKinematics_SlidingCurvePairValue.hxx +StepKinematics_SlidingSurfacePair.cxx +StepKinematics_SlidingSurfacePair.hxx +StepKinematics_SlidingSurfacePairValue.cxx +StepKinematics_SlidingSurfacePairValue.hxx +StepKinematics_SpatialRotation.cxx +StepKinematics_SpatialRotation.hxx +StepKinematics_SphericalPair.cxx +StepKinematics_SphericalPair.hxx +StepKinematics_SphericalPairSelect.cxx +StepKinematics_SphericalPairSelect.hxx +StepKinematics_SphericalPairValue.cxx +StepKinematics_SphericalPairValue.hxx +StepKinematics_SphericalPairWithPin.cxx +StepKinematics_SphericalPairWithPin.hxx +StepKinematics_SphericalPairWithPinAndRange.cxx +StepKinematics_SphericalPairWithPinAndRange.hxx +StepKinematics_SphericalPairWithRange.cxx +StepKinematics_SphericalPairWithRange.hxx +StepKinematics_SurfacePair.cxx +StepKinematics_SurfacePair.hxx +StepKinematics_SurfacePairWithRange.cxx +StepKinematics_SurfacePairWithRange.hxx +StepKinematics_KinematicTopologyDirectedStructure.cxx +StepKinematics_KinematicTopologyDirectedStructure.hxx +StepKinematics_KinematicTopologyNetworkStructure.cxx +StepKinematics_KinematicTopologyNetworkStructure.hxx +StepKinematics_KinematicTopologyRepresentationSelect.cxx +StepKinematics_KinematicTopologyRepresentationSelect.hxx +StepKinematics_UnconstrainedPair.cxx +StepKinematics_UnconstrainedPair.hxx +StepKinematics_UnconstrainedPairValue.cxx +StepKinematics_UnconstrainedPairValue.hxx +StepKinematics_UniversalPair.cxx +StepKinematics_UniversalPair.hxx +StepKinematics_UniversalPairValue.cxx +StepKinematics_UniversalPairValue.hxx +StepKinematics_UniversalPairWithRange.cxx +StepKinematics_UniversalPairWithRange.hxx \ No newline at end of file diff --git a/src/StepKinematics/StepKinematics_ActuatedDirection.hxx b/src/StepKinematics/StepKinematics_ActuatedDirection.hxx new file mode 100644 index 0000000000..81c3ca5888 --- /dev/null +++ b/src/StepKinematics/StepKinematics_ActuatedDirection.hxx @@ -0,0 +1,27 @@ +// Created on : Sat May 02 12:41:15 2020 +// Created by: Irina KRYLOVA +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V3.0 +// Copyright (c) Open CASCADE 2020 +// +// 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 _StepKinematics_ActuatedDirection_HeaderFile +#define _StepKinematics_ActuatedDirection_HeaderFile + +enum StepKinematics_ActuatedDirection +{ + StepKinematics_adBidirectional, + StepKinematics_adPositiveOnly, + StepKinematics_adNegativeOnly, + StepKinematics_adNotActuated +}; +#endif // _StepKinematics_ActuatedDirection_HeaderFile diff --git a/src/StepKinematics/StepKinematics_ActuatedKinPairAndOrderKinPair.cxx b/src/StepKinematics/StepKinematics_ActuatedKinPairAndOrderKinPair.cxx new file mode 100644 index 0000000000..9b97de8684 --- /dev/null +++ b/src/StepKinematics/StepKinematics_ActuatedKinPairAndOrderKinPair.cxx @@ -0,0 +1,54 @@ +// Created on: 2020-05-26 +// Created by: PASUKHIN DMITRY +// Copyright (c) 2020 OPEN CASCADE SAS +// +// This file is part of Open CASCADE Technology software library. +// +// This library is free software; you can redistribute it and/or modify it under +// the terms of the GNU Lesser General Public License version 2.1 as published +// by the Free Software Foundation, with special exception defined in the file +// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT +// distribution for complete text of the license and disclaimer of any warranty. +// +// Alternatively, this file may be used under the terms of Open CASCADE +// commercial license or contractual agreement. + +#include +#include +#include +#include +#include + +IMPLEMENT_STANDARD_RTTIEXT(StepKinematics_ActuatedKinPairAndOrderKinPair, StepKinematics_KinematicPair) + +//======================================================================= +//function : StepKinematics_ActuatedKinPairAndOrderKinPair +//purpose : +//======================================================================= +StepKinematics_ActuatedKinPairAndOrderKinPair::StepKinematics_ActuatedKinPairAndOrderKinPair() +{} + +//======================================================================= +//function : Init +//purpose : +//======================================================================= +void StepKinematics_ActuatedKinPairAndOrderKinPair::Init(const Handle(TCollection_HAsciiString)& theRepresentationItem_Name, + const Handle(TCollection_HAsciiString)& theItemDefinedTransformation_Name, + const Standard_Boolean hasItemDefinedTransformation_Description, + const Handle(TCollection_HAsciiString)& theItemDefinedTransformation_Description, + const Handle(StepRepr_RepresentationItem)& theItemDefinedTransformation_TransformItem1, + const Handle(StepRepr_RepresentationItem)& theItemDefinedTransformation_TransformItem2, + const Handle(StepKinematics_KinematicJoint)& theJoint, + const Handle(StepKinematics_ActuatedKinematicPair)& theActuatedKinematicPair, + const Handle(StepKinematics_KinematicPair)& theOrderKinematicPair) +{ + StepKinematics_KinematicPair::Init(theRepresentationItem_Name, + theItemDefinedTransformation_Name, + hasItemDefinedTransformation_Description, + theItemDefinedTransformation_Description, + theItemDefinedTransformation_TransformItem1, + theItemDefinedTransformation_TransformItem2, + theJoint); + SetActuatedKinematicPair(theActuatedKinematicPair); + SetOrderKinematicPair(theOrderKinematicPair); +} diff --git a/src/StepKinematics/StepKinematics_ActuatedKinPairAndOrderKinPair.hxx b/src/StepKinematics/StepKinematics_ActuatedKinPairAndOrderKinPair.hxx new file mode 100644 index 0000000000..e9e8b3ec5b --- /dev/null +++ b/src/StepKinematics/StepKinematics_ActuatedKinPairAndOrderKinPair.hxx @@ -0,0 +1,72 @@ +// Created on: 2020-05-26 +// Created by: PASUKHIN DMITRY +// Copyright (c) 2020 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 _StepKinematics_ActuatedKinPairAndOrderKinPair_HeaderFile_ +#define _StepKinematics_ActuatedKinPairAndOrderKinPair_HeaderFile_ + +#include +#include +#include +#include +#include +#include +class StepRepr_RepresentationItem; +class StepKinematics_ActuatedKinematicPair; +class StepKinematics_ActuatedKinPairAndOrderKinPair; + +DEFINE_STANDARD_HANDLE(StepKinematics_ActuatedKinPairAndOrderKinPair, StepKinematics_KinematicPair) + +//! Representation of STEP entity ActuatedKinPairAndOrderKinPair +class StepKinematics_ActuatedKinPairAndOrderKinPair : public StepKinematics_KinematicPair +{ +public : + + //! default constructor + Standard_EXPORT StepKinematics_ActuatedKinPairAndOrderKinPair(); + + + Standard_EXPORT void Init(const Handle(TCollection_HAsciiString)& theRepresentationItem_Name, + const Handle(TCollection_HAsciiString)& theItemDefinedTransformation_Name, + const Standard_Boolean hasItemDefinedTransformation_Description, + const Handle(TCollection_HAsciiString)& theItemDefinedTransformation_Description, + const Handle(StepRepr_RepresentationItem)& theItemDefinedTransformation_TransformItem1, + const Handle(StepRepr_RepresentationItem)& theItemDefinedTransformation_TransformItem2, + const Handle(StepKinematics_KinematicJoint)& theJoint, + const Handle(StepKinematics_ActuatedKinematicPair)& theActuatedKinematicPair, + const Handle(StepKinematics_KinematicPair)& theOrderKinematicPair); + + inline void SetActuatedKinematicPair(const Handle(StepKinematics_ActuatedKinematicPair)& aKP) { + myActuatedKinematicPair = aKP; + } + + inline Handle(StepKinematics_ActuatedKinematicPair) GetActuatedKinematicPair() const { + return myActuatedKinematicPair; + } + inline void SetOrderKinematicPair(const Handle(StepKinematics_KinematicPair)& aKP) { + myOrderKinematicPair = aKP; + } + + inline Handle(StepKinematics_KinematicPair) GetOrderKinematicPair() const { + return myOrderKinematicPair; + } + + +DEFINE_STANDARD_RTTIEXT(StepKinematics_ActuatedKinPairAndOrderKinPair, StepKinematics_KinematicPair) + +private: + Handle(StepKinematics_ActuatedKinematicPair) myActuatedKinematicPair; + Handle(StepKinematics_KinematicPair) myOrderKinematicPair; +}; +#endif // StepKinematics_ActuatedKinPairAndOrderKinPair diff --git a/src/StepKinematics/StepKinematics_ActuatedKinematicPair.cxx b/src/StepKinematics/StepKinematics_ActuatedKinematicPair.cxx new file mode 100644 index 0000000000..123f8f3024 --- /dev/null +++ b/src/StepKinematics/StepKinematics_ActuatedKinematicPair.cxx @@ -0,0 +1,264 @@ +// Created on : Sat May 02 12:41:15 2020 +// Created by: Irina KRYLOVA +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V3.0 +// Copyright (c) Open CASCADE 2020 +// +// This file is part of Open CASCADE Technology software library. +// +// This library is free software; you can redistribute it and/or modify it under +// the terms of the GNU Lesser General Public License version 2.1 as published +// by the Free Software Foundation, with special exception defined in the file +// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT +// distribution for complete text of the license and disclaimer of any warranty. +// +// Alternatively, this file may be used under the terms of Open CASCADE +// commercial license or contractual agreement. + +#include + +IMPLEMENT_STANDARD_RTTIEXT(StepKinematics_ActuatedKinematicPair, StepKinematics_KinematicPair) + +//======================================================================= +//function : StepKinematics_ActuatedKinematicPair +//purpose : +//======================================================================= +StepKinematics_ActuatedKinematicPair::StepKinematics_ActuatedKinematicPair () +{ + defTX = Standard_False; + defTY = Standard_False; + defTZ = Standard_False; + defRX = Standard_False; + defRY = Standard_False; + defRZ = Standard_False; +} + +//======================================================================= +//function : Init +//purpose : +//======================================================================= +void StepKinematics_ActuatedKinematicPair::Init (const Handle(TCollection_HAsciiString)& theRepresentationItem_Name, + const Handle(TCollection_HAsciiString)& theItemDefinedTransformation_Name, + const Standard_Boolean hasItemDefinedTransformation_Description, + const Handle(TCollection_HAsciiString)& theItemDefinedTransformation_Description, + const Handle(StepRepr_RepresentationItem)& theItemDefinedTransformation_TransformItem1, + const Handle(StepRepr_RepresentationItem)& theItemDefinedTransformation_TransformItem2, + const Handle(StepKinematics_KinematicJoint)& theKinematicPair_Joint, + const Standard_Boolean hasTX, + const StepKinematics_ActuatedDirection theTX, + const Standard_Boolean hasTY, + const StepKinematics_ActuatedDirection theTY, + const Standard_Boolean hasTZ, + const StepKinematics_ActuatedDirection theTZ, + const Standard_Boolean hasRX, + const StepKinematics_ActuatedDirection theRX, + const Standard_Boolean hasRY, + const StepKinematics_ActuatedDirection theRY, + const Standard_Boolean hasRZ, + const StepKinematics_ActuatedDirection theRZ) +{ + StepKinematics_KinematicPair::Init(theRepresentationItem_Name, + theItemDefinedTransformation_Name, + hasItemDefinedTransformation_Description, + theItemDefinedTransformation_Description, + theItemDefinedTransformation_TransformItem1, + theItemDefinedTransformation_TransformItem2, + theKinematicPair_Joint); + + defTX = hasTX; + if (defTX) { + myTX = theTX; + } + else myTX = StepKinematics_ActuatedDirection(); + + defTY = hasTY; + if (defTY) { + myTY = theTY; + } + else myTY = StepKinematics_ActuatedDirection(); + + defTZ = hasTZ; + if (defTZ) { + myTZ = theTZ; + } + else myTZ = StepKinematics_ActuatedDirection(); + + defRX = hasRX; + if (defRX) { + myRX = theRX; + } + else myRX = StepKinematics_ActuatedDirection(); + + defRY = hasRY; + if (defRY) { + myRY = theRY; + } + else myRY = StepKinematics_ActuatedDirection(); + + defRZ = hasRZ; + if (defRZ) { + myRZ = theRZ; + } + else myRZ = StepKinematics_ActuatedDirection(); +} + +//======================================================================= +//function : TX +//purpose : +//======================================================================= +StepKinematics_ActuatedDirection StepKinematics_ActuatedKinematicPair::TX () const +{ + return myTX; +} + +//======================================================================= +//function : SetTX +//purpose : +//======================================================================= +void StepKinematics_ActuatedKinematicPair::SetTX (const StepKinematics_ActuatedDirection theTX) +{ + myTX = theTX; +} + +//======================================================================= +//function : HasTX +//purpose : +//======================================================================= +Standard_Boolean StepKinematics_ActuatedKinematicPair::HasTX () const +{ + return defTX; +} + +//======================================================================= +//function : TY +//purpose : +//======================================================================= +StepKinematics_ActuatedDirection StepKinematics_ActuatedKinematicPair::TY () const +{ + return myTY; +} + +//======================================================================= +//function : SetTY +//purpose : +//======================================================================= +void StepKinematics_ActuatedKinematicPair::SetTY (const StepKinematics_ActuatedDirection theTY) +{ + myTY = theTY; +} + +//======================================================================= +//function : HasTY +//purpose : +//======================================================================= +Standard_Boolean StepKinematics_ActuatedKinematicPair::HasTY () const +{ + return defTY; +} + +//======================================================================= +//function : TZ +//purpose : +//======================================================================= +StepKinematics_ActuatedDirection StepKinematics_ActuatedKinematicPair::TZ () const +{ + return myTZ; +} + +//======================================================================= +//function : SetTZ +//purpose : +//======================================================================= +void StepKinematics_ActuatedKinematicPair::SetTZ (const StepKinematics_ActuatedDirection theTZ) +{ + myTZ = theTZ; +} + +//======================================================================= +//function : HasTZ +//purpose : +//======================================================================= +Standard_Boolean StepKinematics_ActuatedKinematicPair::HasTZ () const +{ + return defTZ; +} + +//======================================================================= +//function : RX +//purpose : +//======================================================================= +StepKinematics_ActuatedDirection StepKinematics_ActuatedKinematicPair::RX () const +{ + return myRX; +} + +//======================================================================= +//function : SetRX +//purpose : +//======================================================================= +void StepKinematics_ActuatedKinematicPair::SetRX (const StepKinematics_ActuatedDirection theRX) +{ + myRX = theRX; +} + +//======================================================================= +//function : HasRX +//purpose : +//======================================================================= +Standard_Boolean StepKinematics_ActuatedKinematicPair::HasRX () const +{ + return defRX; +} + +//======================================================================= +//function : RY +//purpose : +//======================================================================= +StepKinematics_ActuatedDirection StepKinematics_ActuatedKinematicPair::RY () const +{ + return myRY; +} + +//======================================================================= +//function : SetRY +//purpose : +//======================================================================= +void StepKinematics_ActuatedKinematicPair::SetRY (const StepKinematics_ActuatedDirection theRY) +{ + myRY = theRY; +} + +//======================================================================= +//function : HasRY +//purpose : +//======================================================================= +Standard_Boolean StepKinematics_ActuatedKinematicPair::HasRY () const +{ + return defRY; +} + +//======================================================================= +//function : RZ +//purpose : +//======================================================================= +StepKinematics_ActuatedDirection StepKinematics_ActuatedKinematicPair::RZ () const +{ + return myRZ; +} + +//======================================================================= +//function : SetRZ +//purpose : +//======================================================================= +void StepKinematics_ActuatedKinematicPair::SetRZ (const StepKinematics_ActuatedDirection theRZ) +{ + myRZ = theRZ; +} + +//======================================================================= +//function : HasRZ +//purpose : +//======================================================================= +Standard_Boolean StepKinematics_ActuatedKinematicPair::HasRZ () const +{ + return defRZ; +} diff --git a/src/StepKinematics/StepKinematics_ActuatedKinematicPair.hxx b/src/StepKinematics/StepKinematics_ActuatedKinematicPair.hxx new file mode 100644 index 0000000000..d7360a68b5 --- /dev/null +++ b/src/StepKinematics/StepKinematics_ActuatedKinematicPair.hxx @@ -0,0 +1,121 @@ +// Created on : Sat May 02 12:41:15 2020 +// Created by: Irina KRYLOVA +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V3.0 +// Copyright (c) Open CASCADE 2020 +// +// 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 _StepKinematics_ActuatedKinematicPair_HeaderFile_ +#define _StepKinematics_ActuatedKinematicPair_HeaderFile_ + +#include +#include +#include + +#include +#include +#include +#include +#include +#include + +DEFINE_STANDARD_HANDLE(StepKinematics_ActuatedKinematicPair, StepKinematics_KinematicPair) + +//! Representation of STEP entity ActuatedKinematicPair +class StepKinematics_ActuatedKinematicPair : public StepKinematics_KinematicPair +{ +public : + + //! default constructor + Standard_EXPORT StepKinematics_ActuatedKinematicPair(); + + //! Initialize all fields (own and inherited) + Standard_EXPORT void Init(const Handle(TCollection_HAsciiString)& theRepresentationItem_Name, + const Handle(TCollection_HAsciiString)& theItemDefinedTransformation_Name, + const Standard_Boolean hasItemDefinedTransformation_Description, + const Handle(TCollection_HAsciiString)& theItemDefinedTransformation_Description, + const Handle(StepRepr_RepresentationItem)& theItemDefinedTransformation_TransformItem1, + const Handle(StepRepr_RepresentationItem)& theItemDefinedTransformation_TransformItem2, + const Handle(StepKinematics_KinematicJoint)& theKinematicPair_Joint, + const Standard_Boolean hasTX, + const StepKinematics_ActuatedDirection theTX, + const Standard_Boolean hasTY, + const StepKinematics_ActuatedDirection theTY, + const Standard_Boolean hasTZ, + const StepKinematics_ActuatedDirection theTZ, + const Standard_Boolean hasRX, + const StepKinematics_ActuatedDirection theRX, + const Standard_Boolean hasRY, + const StepKinematics_ActuatedDirection theRY, + const Standard_Boolean hasRZ, + const StepKinematics_ActuatedDirection theRZ); + + //! Returns field TX + Standard_EXPORT StepKinematics_ActuatedDirection TX() const; + //! Sets field TX + Standard_EXPORT void SetTX (const StepKinematics_ActuatedDirection theTX); + //! Returns True if optional field TX is defined + Standard_EXPORT Standard_Boolean HasTX() const; + + //! Returns field TY + Standard_EXPORT StepKinematics_ActuatedDirection TY() const; + //! Sets field TY + Standard_EXPORT void SetTY (const StepKinematics_ActuatedDirection theTY); + //! Returns True if optional field TY is defined + Standard_EXPORT Standard_Boolean HasTY() const; + + //! Returns field TZ + Standard_EXPORT StepKinematics_ActuatedDirection TZ() const; + //! Sets field TZ + Standard_EXPORT void SetTZ (const StepKinematics_ActuatedDirection theTZ); + //! Returns True if optional field TZ is defined + Standard_EXPORT Standard_Boolean HasTZ() const; + + //! Returns field RX + Standard_EXPORT StepKinematics_ActuatedDirection RX() const; + //! Sets field RX + Standard_EXPORT void SetRX (const StepKinematics_ActuatedDirection theRX); + //! Returns True if optional field RX is defined + Standard_EXPORT Standard_Boolean HasRX() const; + + //! Returns field RY + Standard_EXPORT StepKinematics_ActuatedDirection RY() const; + //! Sets field RY + Standard_EXPORT void SetRY (const StepKinematics_ActuatedDirection theRY); + //! Returns True if optional field RY is defined + Standard_EXPORT Standard_Boolean HasRY() const; + + //! Returns field RZ + Standard_EXPORT StepKinematics_ActuatedDirection RZ() const; + //! Sets field RZ + Standard_EXPORT void SetRZ (const StepKinematics_ActuatedDirection theRZ); + //! Returns True if optional field RZ is defined + Standard_EXPORT Standard_Boolean HasRZ() const; + +DEFINE_STANDARD_RTTIEXT(StepKinematics_ActuatedKinematicPair, StepKinematics_KinematicPair) + +private: + StepKinematics_ActuatedDirection myTX; //!< optional + StepKinematics_ActuatedDirection myTY; //!< optional + StepKinematics_ActuatedDirection myTZ; //!< optional + StepKinematics_ActuatedDirection myRX; //!< optional + StepKinematics_ActuatedDirection myRY; //!< optional + StepKinematics_ActuatedDirection myRZ; //!< optional + Standard_Boolean defTX; //!< flag "is TX defined" + Standard_Boolean defTY; //!< flag "is TY defined" + Standard_Boolean defTZ; //!< flag "is TZ defined" + Standard_Boolean defRX; //!< flag "is RX defined" + Standard_Boolean defRY; //!< flag "is RY defined" + Standard_Boolean defRZ; //!< flag "is RZ defined" + +}; +#endif // _StepKinematics_ActuatedKinematicPair_HeaderFile_ diff --git a/src/StepKinematics/StepKinematics_ContextDependentKinematicLinkRepresentation.cxx b/src/StepKinematics/StepKinematics_ContextDependentKinematicLinkRepresentation.cxx new file mode 100644 index 0000000000..358e62cad0 --- /dev/null +++ b/src/StepKinematics/StepKinematics_ContextDependentKinematicLinkRepresentation.cxx @@ -0,0 +1,76 @@ +// Created on : Sat May 02 12:41:15 2020 +// Created by: Irina KRYLOVA +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V3.0 +// Copyright (c) Open CASCADE 2020 +// +// This file is part of Open CASCADE Technology software library. +// +// This library is free software; you can redistribute it and/or modify it under +// the terms of the GNU Lesser General Public License version 2.1 as published +// by the Free Software Foundation, with special exception defined in the file +// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT +// distribution for complete text of the license and disclaimer of any warranty. +// +// Alternatively, this file may be used under the terms of Open CASCADE +// commercial license or contractual agreement. + +#include + +IMPLEMENT_STANDARD_RTTIEXT(StepKinematics_ContextDependentKinematicLinkRepresentation, Standard_Transient) + +//======================================================================= +//function : StepKinematics_ContextDependentKinematicLinkRepresentation +//purpose : +//======================================================================= +StepKinematics_ContextDependentKinematicLinkRepresentation::StepKinematics_ContextDependentKinematicLinkRepresentation () +{ +} + +//======================================================================= +//function : Init +//purpose : +//======================================================================= +void StepKinematics_ContextDependentKinematicLinkRepresentation::Init (const Handle(StepKinematics_KinematicLinkRepresentationAssociation)& theRepresentationRelation, + const Handle(StepKinematics_ProductDefinitionRelationshipKinematics)& theRepresentedProductRelation) +{ + + myRepresentationRelation = theRepresentationRelation; + + myRepresentedProductRelation = theRepresentedProductRelation; +} + +//======================================================================= +//function : RepresentationRelation +//purpose : +//======================================================================= +Handle(StepKinematics_KinematicLinkRepresentationAssociation) StepKinematics_ContextDependentKinematicLinkRepresentation::RepresentationRelation () const +{ + return myRepresentationRelation; +} + +//======================================================================= +//function : SetRepresentationRelation +//purpose : +//======================================================================= +void StepKinematics_ContextDependentKinematicLinkRepresentation::SetRepresentationRelation (const Handle(StepKinematics_KinematicLinkRepresentationAssociation)& theRepresentationRelation) +{ + myRepresentationRelation = theRepresentationRelation; +} + +//======================================================================= +//function : RepresentedProductRelation +//purpose : +//======================================================================= +Handle(StepKinematics_ProductDefinitionRelationshipKinematics) StepKinematics_ContextDependentKinematicLinkRepresentation::RepresentedProductRelation () const +{ + return myRepresentedProductRelation; +} + +//======================================================================= +//function : SetRepresentedProductRelation +//purpose : +//======================================================================= +void StepKinematics_ContextDependentKinematicLinkRepresentation::SetRepresentedProductRelation (const Handle(StepKinematics_ProductDefinitionRelationshipKinematics)& theRepresentedProductRelation) +{ + myRepresentedProductRelation = theRepresentedProductRelation; +} diff --git a/src/StepKinematics/StepKinematics_ContextDependentKinematicLinkRepresentation.hxx b/src/StepKinematics/StepKinematics_ContextDependentKinematicLinkRepresentation.hxx new file mode 100644 index 0000000000..fe94b4cb4b --- /dev/null +++ b/src/StepKinematics/StepKinematics_ContextDependentKinematicLinkRepresentation.hxx @@ -0,0 +1,58 @@ +// Created on : Sat May 02 12:41:15 2020 +// Created by: Irina KRYLOVA +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V3.0 +// Copyright (c) Open CASCADE 2020 +// +// 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 _StepKinematics_ContextDependentKinematicLinkRepresentation_HeaderFile_ +#define _StepKinematics_ContextDependentKinematicLinkRepresentation_HeaderFile_ + +#include +#include +#include + +#include +#include + +DEFINE_STANDARD_HANDLE(StepKinematics_ContextDependentKinematicLinkRepresentation, Standard_Transient) + +//! Representation of STEP entity ContextDependentKinematicLinkRepresentation +class StepKinematics_ContextDependentKinematicLinkRepresentation : public Standard_Transient +{ +public : + + //! default constructor + Standard_EXPORT StepKinematics_ContextDependentKinematicLinkRepresentation(); + + //! Initialize all fields (own and inherited) + Standard_EXPORT void Init(const Handle(StepKinematics_KinematicLinkRepresentationAssociation)& theRepresentationRelation, + const Handle(StepKinematics_ProductDefinitionRelationshipKinematics)& theRepresentedProductRelation); + + //! Returns field RepresentationRelation + Standard_EXPORT Handle(StepKinematics_KinematicLinkRepresentationAssociation) RepresentationRelation() const; + //! Sets field RepresentationRelation + Standard_EXPORT void SetRepresentationRelation (const Handle(StepKinematics_KinematicLinkRepresentationAssociation)& theRepresentationRelation); + + //! Returns field RepresentedProductRelation + Standard_EXPORT Handle(StepKinematics_ProductDefinitionRelationshipKinematics) RepresentedProductRelation() const; + //! Sets field RepresentedProductRelation + Standard_EXPORT void SetRepresentedProductRelation (const Handle(StepKinematics_ProductDefinitionRelationshipKinematics)& theRepresentedProductRelation); + +DEFINE_STANDARD_RTTIEXT(StepKinematics_ContextDependentKinematicLinkRepresentation, Standard_Transient) + +private: + Handle(StepKinematics_KinematicLinkRepresentationAssociation) myRepresentationRelation; + Handle(StepKinematics_ProductDefinitionRelationshipKinematics) myRepresentedProductRelation; + +}; +#endif // _StepKinematics_ContextDependentKinematicLinkRepresentation_HeaderFile_ diff --git a/src/StepKinematics/StepKinematics_CylindricalPair.cxx b/src/StepKinematics/StepKinematics_CylindricalPair.cxx new file mode 100644 index 0000000000..98c2a4dcc5 --- /dev/null +++ b/src/StepKinematics/StepKinematics_CylindricalPair.cxx @@ -0,0 +1,27 @@ +// Created on : Sat May 02 12:41:15 2020 +// Created by: Irina KRYLOVA +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V3.0 +// Copyright (c) Open CASCADE 2020 +// +// This file is part of Open CASCADE Technology software library. +// +// This library is free software; you can redistribute it and/or modify it under +// the terms of the GNU Lesser General Public License version 2.1 as published +// by the Free Software Foundation, with special exception defined in the file +// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT +// distribution for complete text of the license and disclaimer of any warranty. +// +// Alternatively, this file may be used under the terms of Open CASCADE +// commercial license or contractual agreement. + +#include + +IMPLEMENT_STANDARD_RTTIEXT(StepKinematics_CylindricalPair, StepKinematics_LowOrderKinematicPair) + +//======================================================================= +//function : StepKinematics_CylindricalPair +//purpose : +//======================================================================= +StepKinematics_CylindricalPair::StepKinematics_CylindricalPair () +{ +} diff --git a/src/StepKinematics/StepKinematics_CylindricalPair.hxx b/src/StepKinematics/StepKinematics_CylindricalPair.hxx new file mode 100644 index 0000000000..4c2740855b --- /dev/null +++ b/src/StepKinematics/StepKinematics_CylindricalPair.hxx @@ -0,0 +1,42 @@ +// Created on : Sat May 02 12:41:15 2020 +// Created by: Irina KRYLOVA +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V3.0 +// Copyright (c) Open CASCADE 2020 +// +// 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 _StepKinematics_CylindricalPair_HeaderFile_ +#define _StepKinematics_CylindricalPair_HeaderFile_ + +#include +#include +#include + +#include +#include +#include +#include + +DEFINE_STANDARD_HANDLE(StepKinematics_CylindricalPair, StepKinematics_LowOrderKinematicPair) + +//! Representation of STEP entity CylindricalPair +class StepKinematics_CylindricalPair : public StepKinematics_LowOrderKinematicPair +{ +public : + + //! default constructor + Standard_EXPORT StepKinematics_CylindricalPair(); + +DEFINE_STANDARD_RTTIEXT(StepKinematics_CylindricalPair, StepKinematics_LowOrderKinematicPair) + +}; +#endif // _StepKinematics_CylindricalPair_HeaderFile_ diff --git a/src/StepKinematics/StepKinematics_CylindricalPairValue.cxx b/src/StepKinematics/StepKinematics_CylindricalPairValue.cxx new file mode 100644 index 0000000000..ef143e8bb3 --- /dev/null +++ b/src/StepKinematics/StepKinematics_CylindricalPairValue.cxx @@ -0,0 +1,80 @@ +// Created on : Sat May 02 12:41:15 2020 +// Created by: Irina KRYLOVA +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V3.0 +// Copyright (c) Open CASCADE 2020 +// +// This file is part of Open CASCADE Technology software library. +// +// This library is free software; you can redistribute it and/or modify it under +// the terms of the GNU Lesser General Public License version 2.1 as published +// by the Free Software Foundation, with special exception defined in the file +// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT +// distribution for complete text of the license and disclaimer of any warranty. +// +// Alternatively, this file may be used under the terms of Open CASCADE +// commercial license or contractual agreement. + +#include + +IMPLEMENT_STANDARD_RTTIEXT(StepKinematics_CylindricalPairValue, StepKinematics_PairValue) + +//======================================================================= +//function : StepKinematics_CylindricalPairValue +//purpose : +//======================================================================= +StepKinematics_CylindricalPairValue::StepKinematics_CylindricalPairValue () +{ +} + +//======================================================================= +//function : Init +//purpose : +//======================================================================= +void StepKinematics_CylindricalPairValue::Init (const Handle(TCollection_HAsciiString)& theRepresentationItem_Name, + const Handle(StepKinematics_KinematicPair)& thePairValue_AppliesToPair, + const Standard_Real theActualTranslation, + const Standard_Real theActualRotation) +{ + StepKinematics_PairValue::Init(theRepresentationItem_Name, + thePairValue_AppliesToPair); + + myActualTranslation = theActualTranslation; + + myActualRotation = theActualRotation; +} + +//======================================================================= +//function : ActualTranslation +//purpose : +//======================================================================= +Standard_Real StepKinematics_CylindricalPairValue::ActualTranslation () const +{ + return myActualTranslation; +} + +//======================================================================= +//function : SetActualTranslation +//purpose : +//======================================================================= +void StepKinematics_CylindricalPairValue::SetActualTranslation (const Standard_Real theActualTranslation) +{ + myActualTranslation = theActualTranslation; +} + +//======================================================================= +//function : ActualRotation +//purpose : +//======================================================================= +Standard_Real StepKinematics_CylindricalPairValue::ActualRotation () const +{ + return myActualRotation; +} + +//======================================================================= +//function : SetActualRotation +//purpose : +//======================================================================= +void StepKinematics_CylindricalPairValue::SetActualRotation (const Standard_Real theActualRotation) +{ + myActualRotation = theActualRotation; +} diff --git a/src/StepKinematics/StepKinematics_CylindricalPairValue.hxx b/src/StepKinematics/StepKinematics_CylindricalPairValue.hxx new file mode 100644 index 0000000000..2222a8750f --- /dev/null +++ b/src/StepKinematics/StepKinematics_CylindricalPairValue.hxx @@ -0,0 +1,60 @@ +// Created on : Sat May 02 12:41:15 2020 +// Created by: Irina KRYLOVA +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V3.0 +// Copyright (c) Open CASCADE 2020 +// +// 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 _StepKinematics_CylindricalPairValue_HeaderFile_ +#define _StepKinematics_CylindricalPairValue_HeaderFile_ + +#include +#include +#include + +#include +#include + +DEFINE_STANDARD_HANDLE(StepKinematics_CylindricalPairValue, StepKinematics_PairValue) + +//! Representation of STEP entity CylindricalPairValue +class StepKinematics_CylindricalPairValue : public StepKinematics_PairValue +{ +public : + + //! default constructor + Standard_EXPORT StepKinematics_CylindricalPairValue(); + + //! Initialize all fields (own and inherited) + Standard_EXPORT void Init(const Handle(TCollection_HAsciiString)& theRepresentationItem_Name, + const Handle(StepKinematics_KinematicPair)& thePairValue_AppliesToPair, + const Standard_Real theActualTranslation, + const Standard_Real theActualRotation); + + //! Returns field ActualTranslation + Standard_EXPORT Standard_Real ActualTranslation() const; + //! Sets field ActualTranslation + Standard_EXPORT void SetActualTranslation (const Standard_Real theActualTranslation); + + //! Returns field ActualRotation + Standard_EXPORT Standard_Real ActualRotation() const; + //! Sets field ActualRotation + Standard_EXPORT void SetActualRotation (const Standard_Real theActualRotation); + +DEFINE_STANDARD_RTTIEXT(StepKinematics_CylindricalPairValue, StepKinematics_PairValue) + +private: + Standard_Real myActualTranslation; + Standard_Real myActualRotation; + +}; +#endif // _StepKinematics_CylindricalPairValue_HeaderFile_ diff --git a/src/StepKinematics/StepKinematics_CylindricalPairWithRange.cxx b/src/StepKinematics/StepKinematics_CylindricalPairWithRange.cxx new file mode 100644 index 0000000000..81dbb23807 --- /dev/null +++ b/src/StepKinematics/StepKinematics_CylindricalPairWithRange.cxx @@ -0,0 +1,204 @@ +// Created on : Sat May 02 12:41:15 2020 +// Created by: Irina KRYLOVA +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V3.0 +// Copyright (c) Open CASCADE 2020 +// +// This file is part of Open CASCADE Technology software library. +// +// This library is free software; you can redistribute it and/or modify it under +// the terms of the GNU Lesser General Public License version 2.1 as published +// by the Free Software Foundation, with special exception defined in the file +// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT +// distribution for complete text of the license and disclaimer of any warranty. +// +// Alternatively, this file may be used under the terms of Open CASCADE +// commercial license or contractual agreement. + +#include + +IMPLEMENT_STANDARD_RTTIEXT(StepKinematics_CylindricalPairWithRange, StepKinematics_CylindricalPair) + +//======================================================================= +//function : StepKinematics_CylindricalPairWithRange +//purpose : +//======================================================================= +StepKinematics_CylindricalPairWithRange::StepKinematics_CylindricalPairWithRange () +{ + defLowerLimitActualTranslation = Standard_False; + defUpperLimitActualTranslation = Standard_False; + defLowerLimitActualRotation = Standard_False; + defUpperLimitActualRotation = Standard_False; +} + +//======================================================================= +//function : Init +//purpose : +//======================================================================= +void StepKinematics_CylindricalPairWithRange::Init (const Handle(TCollection_HAsciiString)& theRepresentationItem_Name, + const Handle(TCollection_HAsciiString)& theItemDefinedTransformation_Name, + const Standard_Boolean hasItemDefinedTransformation_Description, + const Handle(TCollection_HAsciiString)& theItemDefinedTransformation_Description, + const Handle(StepRepr_RepresentationItem)& theItemDefinedTransformation_TransformItem1, + const Handle(StepRepr_RepresentationItem)& theItemDefinedTransformation_TransformItem2, + const Handle(StepKinematics_KinematicJoint)& theKinematicPair_Joint, + const Standard_Boolean theLowOrderKinematicPair_TX, + const Standard_Boolean theLowOrderKinematicPair_TY, + const Standard_Boolean theLowOrderKinematicPair_TZ, + const Standard_Boolean theLowOrderKinematicPair_RX, + const Standard_Boolean theLowOrderKinematicPair_RY, + const Standard_Boolean theLowOrderKinematicPair_RZ, + const Standard_Boolean hasLowerLimitActualTranslation, + const Standard_Real theLowerLimitActualTranslation, + const Standard_Boolean hasUpperLimitActualTranslation, + const Standard_Real theUpperLimitActualTranslation, + const Standard_Boolean hasLowerLimitActualRotation, + const Standard_Real theLowerLimitActualRotation, + const Standard_Boolean hasUpperLimitActualRotation, + const Standard_Real theUpperLimitActualRotation) +{ + StepKinematics_CylindricalPair::Init(theRepresentationItem_Name, + theItemDefinedTransformation_Name, + hasItemDefinedTransformation_Description, + theItemDefinedTransformation_Description, + theItemDefinedTransformation_TransformItem1, + theItemDefinedTransformation_TransformItem2, + theKinematicPair_Joint, + theLowOrderKinematicPair_TX, + theLowOrderKinematicPair_TY, + theLowOrderKinematicPair_TZ, + theLowOrderKinematicPair_RX, + theLowOrderKinematicPair_RY, + theLowOrderKinematicPair_RZ); + + defLowerLimitActualTranslation = hasLowerLimitActualTranslation; + if (defLowerLimitActualTranslation) { + myLowerLimitActualTranslation = theLowerLimitActualTranslation; + } + else myLowerLimitActualTranslation = 0; + + defUpperLimitActualTranslation = hasUpperLimitActualTranslation; + if (defUpperLimitActualTranslation) { + myUpperLimitActualTranslation = theUpperLimitActualTranslation; + } + else myUpperLimitActualTranslation = 0; + + defLowerLimitActualRotation = hasLowerLimitActualRotation; + if (defLowerLimitActualRotation) { + myLowerLimitActualRotation = theLowerLimitActualRotation; + } + else myLowerLimitActualRotation = 0; + + defUpperLimitActualRotation = hasUpperLimitActualRotation; + if (defUpperLimitActualRotation) { + myUpperLimitActualRotation = theUpperLimitActualRotation; + } + else myUpperLimitActualRotation = 0; +} + +//======================================================================= +//function : LowerLimitActualTranslation +//purpose : +//======================================================================= +Standard_Real StepKinematics_CylindricalPairWithRange::LowerLimitActualTranslation () const +{ + return myLowerLimitActualTranslation; +} + +//======================================================================= +//function : SetLowerLimitActualTranslation +//purpose : +//======================================================================= +void StepKinematics_CylindricalPairWithRange::SetLowerLimitActualTranslation (const Standard_Real theLowerLimitActualTranslation) +{ + myLowerLimitActualTranslation = theLowerLimitActualTranslation; +} + +//======================================================================= +//function : HasLowerLimitActualTranslation +//purpose : +//======================================================================= +Standard_Boolean StepKinematics_CylindricalPairWithRange::HasLowerLimitActualTranslation () const +{ + return defLowerLimitActualTranslation; +} + +//======================================================================= +//function : UpperLimitActualTranslation +//purpose : +//======================================================================= +Standard_Real StepKinematics_CylindricalPairWithRange::UpperLimitActualTranslation () const +{ + return myUpperLimitActualTranslation; +} + +//======================================================================= +//function : SetUpperLimitActualTranslation +//purpose : +//======================================================================= +void StepKinematics_CylindricalPairWithRange::SetUpperLimitActualTranslation (const Standard_Real theUpperLimitActualTranslation) +{ + myUpperLimitActualTranslation = theUpperLimitActualTranslation; +} + +//======================================================================= +//function : HasUpperLimitActualTranslation +//purpose : +//======================================================================= +Standard_Boolean StepKinematics_CylindricalPairWithRange::HasUpperLimitActualTranslation () const +{ + return defUpperLimitActualTranslation; +} + +//======================================================================= +//function : LowerLimitActualRotation +//purpose : +//======================================================================= +Standard_Real StepKinematics_CylindricalPairWithRange::LowerLimitActualRotation () const +{ + return myLowerLimitActualRotation; +} + +//======================================================================= +//function : SetLowerLimitActualRotation +//purpose : +//======================================================================= +void StepKinematics_CylindricalPairWithRange::SetLowerLimitActualRotation (const Standard_Real theLowerLimitActualRotation) +{ + myLowerLimitActualRotation = theLowerLimitActualRotation; +} + +//======================================================================= +//function : HasLowerLimitActualRotation +//purpose : +//======================================================================= +Standard_Boolean StepKinematics_CylindricalPairWithRange::HasLowerLimitActualRotation () const +{ + return defLowerLimitActualRotation; +} + +//======================================================================= +//function : UpperLimitActualRotation +//purpose : +//======================================================================= +Standard_Real StepKinematics_CylindricalPairWithRange::UpperLimitActualRotation () const +{ + return myUpperLimitActualRotation; +} + +//======================================================================= +//function : SetUpperLimitActualRotation +//purpose : +//======================================================================= +void StepKinematics_CylindricalPairWithRange::SetUpperLimitActualRotation (const Standard_Real theUpperLimitActualRotation) +{ + myUpperLimitActualRotation = theUpperLimitActualRotation; +} + +//======================================================================= +//function : HasUpperLimitActualRotation +//purpose : +//======================================================================= +Standard_Boolean StepKinematics_CylindricalPairWithRange::HasUpperLimitActualRotation () const +{ + return defUpperLimitActualRotation; +} diff --git a/src/StepKinematics/StepKinematics_CylindricalPairWithRange.hxx b/src/StepKinematics/StepKinematics_CylindricalPairWithRange.hxx new file mode 100644 index 0000000000..74393e425b --- /dev/null +++ b/src/StepKinematics/StepKinematics_CylindricalPairWithRange.hxx @@ -0,0 +1,103 @@ +// Created on : Sat May 02 12:41:15 2020 +// Created by: Irina KRYLOVA +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V3.0 +// Copyright (c) Open CASCADE 2020 +// +// 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 _StepKinematics_CylindricalPairWithRange_HeaderFile_ +#define _StepKinematics_CylindricalPairWithRange_HeaderFile_ + +#include +#include +#include + +#include +#include +#include +#include + +DEFINE_STANDARD_HANDLE(StepKinematics_CylindricalPairWithRange, StepKinematics_CylindricalPair) + +//! Representation of STEP entity CylindricalPairWithRange +class StepKinematics_CylindricalPairWithRange : public StepKinematics_CylindricalPair +{ +public : + + //! default constructor + Standard_EXPORT StepKinematics_CylindricalPairWithRange(); + + //! Initialize all fields (own and inherited) + Standard_EXPORT void Init(const Handle(TCollection_HAsciiString)& theRepresentationItem_Name, + const Handle(TCollection_HAsciiString)& theItemDefinedTransformation_Name, + const Standard_Boolean hasItemDefinedTransformation_Description, + const Handle(TCollection_HAsciiString)& theItemDefinedTransformation_Description, + const Handle(StepRepr_RepresentationItem)& theItemDefinedTransformation_TransformItem1, + const Handle(StepRepr_RepresentationItem)& theItemDefinedTransformation_TransformItem2, + const Handle(StepKinematics_KinematicJoint)& theKinematicPair_Joint, + const Standard_Boolean theLowOrderKinematicPair_TX, + const Standard_Boolean theLowOrderKinematicPair_TY, + const Standard_Boolean theLowOrderKinematicPair_TZ, + const Standard_Boolean theLowOrderKinematicPair_RX, + const Standard_Boolean theLowOrderKinematicPair_RY, + const Standard_Boolean theLowOrderKinematicPair_RZ, + const Standard_Boolean hasLowerLimitActualTranslation, + const Standard_Real theLowerLimitActualTranslation, + const Standard_Boolean hasUpperLimitActualTranslation, + const Standard_Real theUpperLimitActualTranslation, + const Standard_Boolean hasLowerLimitActualRotation, + const Standard_Real theLowerLimitActualRotation, + const Standard_Boolean hasUpperLimitActualRotation, + const Standard_Real theUpperLimitActualRotation); + + //! Returns field LowerLimitActualTranslation + Standard_EXPORT Standard_Real LowerLimitActualTranslation() const; + //! Sets field LowerLimitActualTranslation + Standard_EXPORT void SetLowerLimitActualTranslation (const Standard_Real theLowerLimitActualTranslation); + //! Returns True if optional field LowerLimitActualTranslation is defined + Standard_EXPORT Standard_Boolean HasLowerLimitActualTranslation() const; + + //! Returns field UpperLimitActualTranslation + Standard_EXPORT Standard_Real UpperLimitActualTranslation() const; + //! Sets field UpperLimitActualTranslation + Standard_EXPORT void SetUpperLimitActualTranslation (const Standard_Real theUpperLimitActualTranslation); + //! Returns True if optional field UpperLimitActualTranslation is defined + Standard_EXPORT Standard_Boolean HasUpperLimitActualTranslation() const; + + //! Returns field LowerLimitActualRotation + Standard_EXPORT Standard_Real LowerLimitActualRotation() const; + //! Sets field LowerLimitActualRotation + Standard_EXPORT void SetLowerLimitActualRotation (const Standard_Real theLowerLimitActualRotation); + //! Returns True if optional field LowerLimitActualRotation is defined + Standard_EXPORT Standard_Boolean HasLowerLimitActualRotation() const; + + //! Returns field UpperLimitActualRotation + Standard_EXPORT Standard_Real UpperLimitActualRotation() const; + //! Sets field UpperLimitActualRotation + Standard_EXPORT void SetUpperLimitActualRotation (const Standard_Real theUpperLimitActualRotation); + //! Returns True if optional field UpperLimitActualRotation is defined + Standard_EXPORT Standard_Boolean HasUpperLimitActualRotation() const; + +DEFINE_STANDARD_RTTIEXT(StepKinematics_CylindricalPairWithRange, StepKinematics_CylindricalPair) + +private: + Standard_Real myLowerLimitActualTranslation; //!< optional + Standard_Real myUpperLimitActualTranslation; //!< optional + Standard_Real myLowerLimitActualRotation; //!< optional + Standard_Real myUpperLimitActualRotation; //!< optional + Standard_Boolean defLowerLimitActualTranslation; //!< flag "is LowerLimitActualTranslation defined" + Standard_Boolean defUpperLimitActualTranslation; //!< flag "is UpperLimitActualTranslation defined" + Standard_Boolean defLowerLimitActualRotation; //!< flag "is LowerLimitActualRotation defined" + Standard_Boolean defUpperLimitActualRotation; //!< flag "is UpperLimitActualRotation defined" + +}; +#endif // _StepKinematics_CylindricalPairWithRange_HeaderFile_ diff --git a/src/StepKinematics/StepKinematics_FullyConstrainedPair.cxx b/src/StepKinematics/StepKinematics_FullyConstrainedPair.cxx new file mode 100644 index 0000000000..7aa923da30 --- /dev/null +++ b/src/StepKinematics/StepKinematics_FullyConstrainedPair.cxx @@ -0,0 +1,27 @@ +// Created on : Sat May 02 12:41:15 2020 +// Created by: Irina KRYLOVA +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V3.0 +// Copyright (c) Open CASCADE 2020 +// +// This file is part of Open CASCADE Technology software library. +// +// This library is free software; you can redistribute it and/or modify it under +// the terms of the GNU Lesser General Public License version 2.1 as published +// by the Free Software Foundation, with special exception defined in the file +// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT +// distribution for complete text of the license and disclaimer of any warranty. +// +// Alternatively, this file may be used under the terms of Open CASCADE +// commercial license or contractual agreement. + +#include + +IMPLEMENT_STANDARD_RTTIEXT(StepKinematics_FullyConstrainedPair, StepKinematics_LowOrderKinematicPair) + +//======================================================================= +//function : StepKinematics_FullyConstrainedPair +//purpose : +//======================================================================= +StepKinematics_FullyConstrainedPair::StepKinematics_FullyConstrainedPair () +{ +} diff --git a/src/StepKinematics/StepKinematics_FullyConstrainedPair.hxx b/src/StepKinematics/StepKinematics_FullyConstrainedPair.hxx new file mode 100644 index 0000000000..573f7cce74 --- /dev/null +++ b/src/StepKinematics/StepKinematics_FullyConstrainedPair.hxx @@ -0,0 +1,42 @@ +// Created on : Sat May 02 12:41:15 2020 +// Created by: Irina KRYLOVA +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V3.0 +// Copyright (c) Open CASCADE 2020 +// +// 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 _StepKinematics_FullyConstrainedPair_HeaderFile_ +#define _StepKinematics_FullyConstrainedPair_HeaderFile_ + +#include +#include +#include + +#include +#include +#include +#include + +DEFINE_STANDARD_HANDLE(StepKinematics_FullyConstrainedPair, StepKinematics_LowOrderKinematicPair) + +//! Representation of STEP entity FullyConstrainedPair +class StepKinematics_FullyConstrainedPair : public StepKinematics_LowOrderKinematicPair +{ +public : + + //! default constructor + Standard_EXPORT StepKinematics_FullyConstrainedPair(); + +DEFINE_STANDARD_RTTIEXT(StepKinematics_FullyConstrainedPair, StepKinematics_LowOrderKinematicPair) + +}; +#endif // _StepKinematics_FullyConstrainedPair_HeaderFile_ diff --git a/src/StepKinematics/StepKinematics_GearPair.cxx b/src/StepKinematics/StepKinematics_GearPair.cxx new file mode 100644 index 0000000000..07c4c5c4ae --- /dev/null +++ b/src/StepKinematics/StepKinematics_GearPair.cxx @@ -0,0 +1,153 @@ +// Created on : Sat May 02 12:41:15 2020 +// Created by: Irina KRYLOVA +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V3.0 +// Copyright (c) Open CASCADE 2020 +// +// This file is part of Open CASCADE Technology software library. +// +// This library is free software; you can redistribute it and/or modify it under +// the terms of the GNU Lesser General Public License version 2.1 as published +// by the Free Software Foundation, with special exception defined in the file +// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT +// distribution for complete text of the license and disclaimer of any warranty. +// +// Alternatively, this file may be used under the terms of Open CASCADE +// commercial license or contractual agreement. + +#include + +IMPLEMENT_STANDARD_RTTIEXT(StepKinematics_GearPair, StepKinematics_LowOrderKinematicPairWithMotionCoupling) + +//======================================================================= +//function : StepKinematics_GearPair +//purpose : +//======================================================================= +StepKinematics_GearPair::StepKinematics_GearPair () +{ +} + +//======================================================================= +//function : Init +//purpose : +//======================================================================= +void StepKinematics_GearPair::Init (const Handle(TCollection_HAsciiString)& theRepresentationItem_Name, + const Handle(TCollection_HAsciiString)& theItemDefinedTransformation_Name, + const Standard_Boolean hasItemDefinedTransformation_Description, + const Handle(TCollection_HAsciiString)& theItemDefinedTransformation_Description, + const Handle(StepRepr_RepresentationItem)& theItemDefinedTransformation_TransformItem1, + const Handle(StepRepr_RepresentationItem)& theItemDefinedTransformation_TransformItem2, + const Handle(StepKinematics_KinematicJoint)& theKinematicPair_Joint, + const Standard_Real theRadiusFirstLink, + const Standard_Real theRadiusSecondLink, + const Standard_Real theBevel, + const Standard_Real theHelicalAngle, + const Standard_Real theGearRatio) +{ + StepKinematics_LowOrderKinematicPairWithMotionCoupling::Init(theRepresentationItem_Name, + theItemDefinedTransformation_Name, + hasItemDefinedTransformation_Description, + theItemDefinedTransformation_Description, + theItemDefinedTransformation_TransformItem1, + theItemDefinedTransformation_TransformItem2, + theKinematicPair_Joint); + + myRadiusFirstLink = theRadiusFirstLink; + + myRadiusSecondLink = theRadiusSecondLink; + + myBevel = theBevel; + + myHelicalAngle = theHelicalAngle; + + myGearRatio = theGearRatio; +} + +//======================================================================= +//function : RadiusFirstLink +//purpose : +//======================================================================= +Standard_Real StepKinematics_GearPair::RadiusFirstLink () const +{ + return myRadiusFirstLink; +} + +//======================================================================= +//function : SetRadiusFirstLink +//purpose : +//======================================================================= +void StepKinematics_GearPair::SetRadiusFirstLink (const Standard_Real theRadiusFirstLink) +{ + myRadiusFirstLink = theRadiusFirstLink; +} + +//======================================================================= +//function : RadiusSecondLink +//purpose : +//======================================================================= +Standard_Real StepKinematics_GearPair::RadiusSecondLink () const +{ + return myRadiusSecondLink; +} + +//======================================================================= +//function : SetRadiusSecondLink +//purpose : +//======================================================================= +void StepKinematics_GearPair::SetRadiusSecondLink (const Standard_Real theRadiusSecondLink) +{ + myRadiusSecondLink = theRadiusSecondLink; +} + +//======================================================================= +//function : Bevel +//purpose : +//======================================================================= +Standard_Real StepKinematics_GearPair::Bevel () const +{ + return myBevel; +} + +//======================================================================= +//function : SetBevel +//purpose : +//======================================================================= +void StepKinematics_GearPair::SetBevel (const Standard_Real theBevel) +{ + myBevel = theBevel; +} + +//======================================================================= +//function : HelicalAngle +//purpose : +//======================================================================= +Standard_Real StepKinematics_GearPair::HelicalAngle () const +{ + return myHelicalAngle; +} + +//======================================================================= +//function : SetHelicalAngle +//purpose : +//======================================================================= +void StepKinematics_GearPair::SetHelicalAngle (const Standard_Real theHelicalAngle) +{ + myHelicalAngle = theHelicalAngle; +} + +//======================================================================= +//function : GearRatio +//purpose : +//======================================================================= +Standard_Real StepKinematics_GearPair::GearRatio () const +{ + return myGearRatio; +} + +//======================================================================= +//function : SetGearRatio +//purpose : +//======================================================================= +void StepKinematics_GearPair::SetGearRatio (const Standard_Real theGearRatio) +{ + myGearRatio = theGearRatio; +} diff --git a/src/StepKinematics/StepKinematics_GearPair.hxx b/src/StepKinematics/StepKinematics_GearPair.hxx new file mode 100644 index 0000000000..493a7d3766 --- /dev/null +++ b/src/StepKinematics/StepKinematics_GearPair.hxx @@ -0,0 +1,88 @@ +// Created on : Sat May 02 12:41:15 2020 +// Created by: Irina KRYLOVA +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V3.0 +// Copyright (c) Open CASCADE 2020 +// +// 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 _StepKinematics_GearPair_HeaderFile_ +#define _StepKinematics_GearPair_HeaderFile_ + +#include +#include +#include + +#include +#include +#include +#include + +DEFINE_STANDARD_HANDLE(StepKinematics_GearPair, StepKinematics_LowOrderKinematicPairWithMotionCoupling) + +//! Representation of STEP entity GearPair +class StepKinematics_GearPair : public StepKinematics_LowOrderKinematicPairWithMotionCoupling +{ +public : + + //! default constructor + Standard_EXPORT StepKinematics_GearPair(); + + //! Initialize all fields (own and inherited) + Standard_EXPORT void Init(const Handle(TCollection_HAsciiString)& theRepresentationItem_Name, + const Handle(TCollection_HAsciiString)& theItemDefinedTransformation_Name, + const Standard_Boolean hasItemDefinedTransformation_Description, + const Handle(TCollection_HAsciiString)& theItemDefinedTransformation_Description, + const Handle(StepRepr_RepresentationItem)& theItemDefinedTransformation_TransformItem1, + const Handle(StepRepr_RepresentationItem)& theItemDefinedTransformation_TransformItem2, + const Handle(StepKinematics_KinematicJoint)& theKinematicPair_Joint, + const Standard_Real theRadiusFirstLink, + const Standard_Real theRadiusSecondLink, + const Standard_Real theBevel, + const Standard_Real theHelicalAngle, + const Standard_Real theGearRatio); + + //! Returns field RadiusFirstLink + Standard_EXPORT Standard_Real RadiusFirstLink() const; + //! Sets field RadiusFirstLink + Standard_EXPORT void SetRadiusFirstLink (const Standard_Real theRadiusFirstLink); + + //! Returns field RadiusSecondLink + Standard_EXPORT Standard_Real RadiusSecondLink() const; + //! Sets field RadiusSecondLink + Standard_EXPORT void SetRadiusSecondLink (const Standard_Real theRadiusSecondLink); + + //! Returns field Bevel + Standard_EXPORT Standard_Real Bevel() const; + //! Sets field Bevel + Standard_EXPORT void SetBevel (const Standard_Real theBevel); + + //! Returns field HelicalAngle + Standard_EXPORT Standard_Real HelicalAngle() const; + //! Sets field HelicalAngle + Standard_EXPORT void SetHelicalAngle (const Standard_Real theHelicalAngle); + + //! Returns field GearRatio + Standard_EXPORT Standard_Real GearRatio() const; + //! Sets field GearRatio + Standard_EXPORT void SetGearRatio (const Standard_Real theGearRatio); + +DEFINE_STANDARD_RTTIEXT(StepKinematics_GearPair, StepKinematics_LowOrderKinematicPairWithMotionCoupling) + +private: + Standard_Real myRadiusFirstLink; + Standard_Real myRadiusSecondLink; + Standard_Real myBevel; + Standard_Real myHelicalAngle; + Standard_Real myGearRatio; + +}; +#endif // _StepKinematics_GearPair_HeaderFile_ diff --git a/src/StepKinematics/StepKinematics_GearPairValue.cxx b/src/StepKinematics/StepKinematics_GearPairValue.cxx new file mode 100644 index 0000000000..a91f3940ea --- /dev/null +++ b/src/StepKinematics/StepKinematics_GearPairValue.cxx @@ -0,0 +1,59 @@ +// Created on : Sat May 02 12:41:15 2020 +// Created by: Irina KRYLOVA +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V3.0 +// Copyright (c) Open CASCADE 2020 +// +// This file is part of Open CASCADE Technology software library. +// +// This library is free software; you can redistribute it and/or modify it under +// the terms of the GNU Lesser General Public License version 2.1 as published +// by the Free Software Foundation, with special exception defined in the file +// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT +// distribution for complete text of the license and disclaimer of any warranty. +// +// Alternatively, this file may be used under the terms of Open CASCADE +// commercial license or contractual agreement. + +#include + +IMPLEMENT_STANDARD_RTTIEXT(StepKinematics_GearPairValue, StepKinematics_PairValue) + +//======================================================================= +//function : StepKinematics_GearPairValue +//purpose : +//======================================================================= +StepKinematics_GearPairValue::StepKinematics_GearPairValue () +{ +} + +//======================================================================= +//function : Init +//purpose : +//======================================================================= +void StepKinematics_GearPairValue::Init (const Handle(TCollection_HAsciiString)& theRepresentationItem_Name, + const Handle(StepKinematics_KinematicPair)& thePairValue_AppliesToPair, + const Standard_Real theActualRotation1) +{ + StepKinematics_PairValue::Init(theRepresentationItem_Name, + thePairValue_AppliesToPair); + + myActualRotation1 = theActualRotation1; +} + +//======================================================================= +//function : ActualRotation1 +//purpose : +//======================================================================= +Standard_Real StepKinematics_GearPairValue::ActualRotation1 () const +{ + return myActualRotation1; +} + +//======================================================================= +//function : SetActualRotation1 +//purpose : +//======================================================================= +void StepKinematics_GearPairValue::SetActualRotation1 (const Standard_Real theActualRotation1) +{ + myActualRotation1 = theActualRotation1; +} diff --git a/src/StepKinematics/StepKinematics_GearPairValue.hxx b/src/StepKinematics/StepKinematics_GearPairValue.hxx new file mode 100644 index 0000000000..8c8a2eb2ec --- /dev/null +++ b/src/StepKinematics/StepKinematics_GearPairValue.hxx @@ -0,0 +1,53 @@ +// Created on : Sat May 02 12:41:15 2020 +// Created by: Irina KRYLOVA +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V3.0 +// Copyright (c) Open CASCADE 2020 +// +// 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 _StepKinematics_GearPairValue_HeaderFile_ +#define _StepKinematics_GearPairValue_HeaderFile_ + +#include +#include +#include + +#include +#include + +DEFINE_STANDARD_HANDLE(StepKinematics_GearPairValue, StepKinematics_PairValue) + +//! Representation of STEP entity GearPairValue +class StepKinematics_GearPairValue : public StepKinematics_PairValue +{ +public : + + //! default constructor + Standard_EXPORT StepKinematics_GearPairValue(); + + //! Initialize all fields (own and inherited) + Standard_EXPORT void Init(const Handle(TCollection_HAsciiString)& theRepresentationItem_Name, + const Handle(StepKinematics_KinematicPair)& thePairValue_AppliesToPair, + const Standard_Real theActualRotation1); + + //! Returns field ActualRotation1 + Standard_EXPORT Standard_Real ActualRotation1() const; + //! Sets field ActualRotation1 + Standard_EXPORT void SetActualRotation1 (const Standard_Real theActualRotation1); + +DEFINE_STANDARD_RTTIEXT(StepKinematics_GearPairValue, StepKinematics_PairValue) + +private: + Standard_Real myActualRotation1; + +}; +#endif // _StepKinematics_GearPairValue_HeaderFile_ diff --git a/src/StepKinematics/StepKinematics_GearPairWithRange.cxx b/src/StepKinematics/StepKinematics_GearPairWithRange.cxx new file mode 100644 index 0000000000..4e2448f80a --- /dev/null +++ b/src/StepKinematics/StepKinematics_GearPairWithRange.cxx @@ -0,0 +1,130 @@ +// Created on : Sat May 02 12:41:15 2020 +// Created by: Irina KRYLOVA +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V3.0 +// Copyright (c) Open CASCADE 2020 +// +// This file is part of Open CASCADE Technology software library. +// +// This library is free software; you can redistribute it and/or modify it under +// the terms of the GNU Lesser General Public License version 2.1 as published +// by the Free Software Foundation, with special exception defined in the file +// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT +// distribution for complete text of the license and disclaimer of any warranty. +// +// Alternatively, this file may be used under the terms of Open CASCADE +// commercial license or contractual agreement. + +#include + +IMPLEMENT_STANDARD_RTTIEXT(StepKinematics_GearPairWithRange, StepKinematics_GearPair) + +//======================================================================= +//function : StepKinematics_GearPairWithRange +//purpose : +//======================================================================= +StepKinematics_GearPairWithRange::StepKinematics_GearPairWithRange () +{ + defLowerLimitActualRotation1 = Standard_False; + defUpperLimitActualRotation1 = Standard_False; +} + +//======================================================================= +//function : Init +//purpose : +//======================================================================= +void StepKinematics_GearPairWithRange::Init (const Handle(TCollection_HAsciiString)& theRepresentationItem_Name, + const Handle(TCollection_HAsciiString)& theItemDefinedTransformation_Name, + const Standard_Boolean hasItemDefinedTransformation_Description, + const Handle(TCollection_HAsciiString)& theItemDefinedTransformation_Description, + const Handle(StepRepr_RepresentationItem)& theItemDefinedTransformation_TransformItem1, + const Handle(StepRepr_RepresentationItem)& theItemDefinedTransformation_TransformItem2, + const Handle(StepKinematics_KinematicJoint)& theKinematicPair_Joint, + const Standard_Real theGearPair_RadiusFirstLink, + const Standard_Real theGearPair_RadiusSecondLink, + const Standard_Real theGearPair_Bevel, + const Standard_Real theGearPair_HelicalAngle, + const Standard_Real theGearPair_GearRatio, + const Standard_Boolean hasLowerLimitActualRotation1, + const Standard_Real theLowerLimitActualRotation1, + const Standard_Boolean hasUpperLimitActualRotation1, + const Standard_Real theUpperLimitActualRotation1) +{ + StepKinematics_GearPair::Init(theRepresentationItem_Name, + theItemDefinedTransformation_Name, + hasItemDefinedTransformation_Description, + theItemDefinedTransformation_Description, + theItemDefinedTransformation_TransformItem1, + theItemDefinedTransformation_TransformItem2, + theKinematicPair_Joint, + theGearPair_RadiusFirstLink, + theGearPair_RadiusSecondLink, + theGearPair_Bevel, + theGearPair_HelicalAngle, + theGearPair_GearRatio); + + defLowerLimitActualRotation1 = hasLowerLimitActualRotation1; + if (defLowerLimitActualRotation1) { + myLowerLimitActualRotation1 = theLowerLimitActualRotation1; + } + else myLowerLimitActualRotation1 = 0; + + defUpperLimitActualRotation1 = hasUpperLimitActualRotation1; + if (defUpperLimitActualRotation1) { + myUpperLimitActualRotation1 = theUpperLimitActualRotation1; + } + else myUpperLimitActualRotation1 = 0; +} + +//======================================================================= +//function : LowerLimitActualRotation1 +//purpose : +//======================================================================= +Standard_Real StepKinematics_GearPairWithRange::LowerLimitActualRotation1 () const +{ + return myLowerLimitActualRotation1; +} + +//======================================================================= +//function : SetLowerLimitActualRotation1 +//purpose : +//======================================================================= +void StepKinematics_GearPairWithRange::SetLowerLimitActualRotation1 (const Standard_Real theLowerLimitActualRotation1) +{ + myLowerLimitActualRotation1 = theLowerLimitActualRotation1; +} + +//======================================================================= +//function : HasLowerLimitActualRotation1 +//purpose : +//======================================================================= +Standard_Boolean StepKinematics_GearPairWithRange::HasLowerLimitActualRotation1 () const +{ + return defLowerLimitActualRotation1; +} + +//======================================================================= +//function : UpperLimitActualRotation1 +//purpose : +//======================================================================= +Standard_Real StepKinematics_GearPairWithRange::UpperLimitActualRotation1 () const +{ + return myUpperLimitActualRotation1; +} + +//======================================================================= +//function : SetUpperLimitActualRotation1 +//purpose : +//======================================================================= +void StepKinematics_GearPairWithRange::SetUpperLimitActualRotation1 (const Standard_Real theUpperLimitActualRotation1) +{ + myUpperLimitActualRotation1 = theUpperLimitActualRotation1; +} + +//======================================================================= +//function : HasUpperLimitActualRotation1 +//purpose : +//======================================================================= +Standard_Boolean StepKinematics_GearPairWithRange::HasUpperLimitActualRotation1 () const +{ + return defUpperLimitActualRotation1; +} diff --git a/src/StepKinematics/StepKinematics_GearPairWithRange.hxx b/src/StepKinematics/StepKinematics_GearPairWithRange.hxx new file mode 100644 index 0000000000..8f011aa9ab --- /dev/null +++ b/src/StepKinematics/StepKinematics_GearPairWithRange.hxx @@ -0,0 +1,80 @@ +// Created on : Sat May 02 12:41:15 2020 +// Created by: Irina KRYLOVA +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V3.0 +// Copyright (c) Open CASCADE 2020 +// +// 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 _StepKinematics_GearPairWithRange_HeaderFile_ +#define _StepKinematics_GearPairWithRange_HeaderFile_ + +#include +#include +#include + +#include +#include +#include +#include + +DEFINE_STANDARD_HANDLE(StepKinematics_GearPairWithRange, StepKinematics_GearPair) + +//! Representation of STEP entity GearPairWithRange +class StepKinematics_GearPairWithRange : public StepKinematics_GearPair +{ +public : + + //! default constructor + Standard_EXPORT StepKinematics_GearPairWithRange(); + + //! Initialize all fields (own and inherited) + Standard_EXPORT void Init(const Handle(TCollection_HAsciiString)& theRepresentationItem_Name, + const Handle(TCollection_HAsciiString)& theItemDefinedTransformation_Name, + const Standard_Boolean hasItemDefinedTransformation_Description, + const Handle(TCollection_HAsciiString)& theItemDefinedTransformation_Description, + const Handle(StepRepr_RepresentationItem)& theItemDefinedTransformation_TransformItem1, + const Handle(StepRepr_RepresentationItem)& theItemDefinedTransformation_TransformItem2, + const Handle(StepKinematics_KinematicJoint)& theKinematicPair_Joint, + const Standard_Real theGearPair_RadiusFirstLink, + const Standard_Real theGearPair_RadiusSecondLink, + const Standard_Real theGearPair_Bevel, + const Standard_Real theGearPair_HelicalAngle, + const Standard_Real theGearPair_GearRatio, + const Standard_Boolean hasLowerLimitActualRotation1, + const Standard_Real theLowerLimitActualRotation1, + const Standard_Boolean hasUpperLimitActualRotation1, + const Standard_Real theUpperLimitActualRotation1); + + //! Returns field LowerLimitActualRotation1 + Standard_EXPORT Standard_Real LowerLimitActualRotation1() const; + //! Sets field LowerLimitActualRotation1 + Standard_EXPORT void SetLowerLimitActualRotation1 (const Standard_Real theLowerLimitActualRotation1); + //! Returns True if optional field LowerLimitActualRotation1 is defined + Standard_EXPORT Standard_Boolean HasLowerLimitActualRotation1() const; + + //! Returns field UpperLimitActualRotation1 + Standard_EXPORT Standard_Real UpperLimitActualRotation1() const; + //! Sets field UpperLimitActualRotation1 + Standard_EXPORT void SetUpperLimitActualRotation1 (const Standard_Real theUpperLimitActualRotation1); + //! Returns True if optional field UpperLimitActualRotation1 is defined + Standard_EXPORT Standard_Boolean HasUpperLimitActualRotation1() const; + +DEFINE_STANDARD_RTTIEXT(StepKinematics_GearPairWithRange, StepKinematics_GearPair) + +private: + Standard_Real myLowerLimitActualRotation1; //!< optional + Standard_Real myUpperLimitActualRotation1; //!< optional + Standard_Boolean defLowerLimitActualRotation1; //!< flag "is LowerLimitActualRotation1 defined" + Standard_Boolean defUpperLimitActualRotation1; //!< flag "is UpperLimitActualRotation1 defined" + +}; +#endif // _StepKinematics_GearPairWithRange_HeaderFile_ diff --git a/src/StepKinematics/StepKinematics_HighOrderKinematicPair.cxx b/src/StepKinematics/StepKinematics_HighOrderKinematicPair.cxx new file mode 100644 index 0000000000..281af578ed --- /dev/null +++ b/src/StepKinematics/StepKinematics_HighOrderKinematicPair.cxx @@ -0,0 +1,27 @@ +// Created on : Sat May 02 12:41:15 2020 +// Created by: Irina KRYLOVA +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V3.0 +// Copyright (c) Open CASCADE 2020 +// +// This file is part of Open CASCADE Technology software library. +// +// This library is free software; you can redistribute it and/or modify it under +// the terms of the GNU Lesser General Public License version 2.1 as published +// by the Free Software Foundation, with special exception defined in the file +// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT +// distribution for complete text of the license and disclaimer of any warranty. +// +// Alternatively, this file may be used under the terms of Open CASCADE +// commercial license or contractual agreement. + +#include + +IMPLEMENT_STANDARD_RTTIEXT(StepKinematics_HighOrderKinematicPair, StepKinematics_KinematicPair) + +//======================================================================= +//function : StepKinematics_HighOrderKinematicPair +//purpose : +//======================================================================= +StepKinematics_HighOrderKinematicPair::StepKinematics_HighOrderKinematicPair () +{ +} diff --git a/src/StepKinematics/StepKinematics_HighOrderKinematicPair.hxx b/src/StepKinematics/StepKinematics_HighOrderKinematicPair.hxx new file mode 100644 index 0000000000..40930a83fe --- /dev/null +++ b/src/StepKinematics/StepKinematics_HighOrderKinematicPair.hxx @@ -0,0 +1,42 @@ +// Created on : Sat May 02 12:41:15 2020 +// Created by: Irina KRYLOVA +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V3.0 +// Copyright (c) Open CASCADE 2020 +// +// 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 _StepKinematics_HighOrderKinematicPair_HeaderFile_ +#define _StepKinematics_HighOrderKinematicPair_HeaderFile_ + +#include +#include +#include + +#include +#include +#include +#include + +DEFINE_STANDARD_HANDLE(StepKinematics_HighOrderKinematicPair, StepKinematics_KinematicPair) + +//! Representation of STEP entity HighOrderKinematicPair +class StepKinematics_HighOrderKinematicPair : public StepKinematics_KinematicPair +{ +public : + + //! default constructor + Standard_EXPORT StepKinematics_HighOrderKinematicPair(); + +DEFINE_STANDARD_RTTIEXT(StepKinematics_HighOrderKinematicPair, StepKinematics_KinematicPair) + +}; +#endif // _StepKinematics_HighOrderKinematicPair_HeaderFile_ diff --git a/src/StepKinematics/StepKinematics_HomokineticPair.cxx b/src/StepKinematics/StepKinematics_HomokineticPair.cxx new file mode 100644 index 0000000000..017bc00ce4 --- /dev/null +++ b/src/StepKinematics/StepKinematics_HomokineticPair.cxx @@ -0,0 +1,27 @@ +// Created on : Sat May 02 12:41:15 2020 +// Created by: Irina KRYLOVA +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V3.0 +// Copyright (c) Open CASCADE 2020 +// +// This file is part of Open CASCADE Technology software library. +// +// This library is free software; you can redistribute it and/or modify it under +// the terms of the GNU Lesser General Public License version 2.1 as published +// by the Free Software Foundation, with special exception defined in the file +// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT +// distribution for complete text of the license and disclaimer of any warranty. +// +// Alternatively, this file may be used under the terms of Open CASCADE +// commercial license or contractual agreement. + +#include + +IMPLEMENT_STANDARD_RTTIEXT(StepKinematics_HomokineticPair, StepKinematics_UniversalPair) + +//======================================================================= +//function : StepKinematics_HomokineticPair +//purpose : +//======================================================================= +StepKinematics_HomokineticPair::StepKinematics_HomokineticPair () +{ +} diff --git a/src/StepKinematics/StepKinematics_HomokineticPair.hxx b/src/StepKinematics/StepKinematics_HomokineticPair.hxx new file mode 100644 index 0000000000..fa60e49701 --- /dev/null +++ b/src/StepKinematics/StepKinematics_HomokineticPair.hxx @@ -0,0 +1,42 @@ +// Created on : Sat May 02 12:41:15 2020 +// Created by: Irina KRYLOVA +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V3.0 +// Copyright (c) Open CASCADE 2020 +// +// 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 _StepKinematics_HomokineticPair_HeaderFile_ +#define _StepKinematics_HomokineticPair_HeaderFile_ + +#include +#include +#include + +#include +#include +#include +#include + +DEFINE_STANDARD_HANDLE(StepKinematics_HomokineticPair, StepKinematics_UniversalPair) + +//! Representation of STEP entity HomokineticPair +class StepKinematics_HomokineticPair : public StepKinematics_UniversalPair +{ +public : + + //! default constructor + Standard_EXPORT StepKinematics_HomokineticPair(); + +DEFINE_STANDARD_RTTIEXT(StepKinematics_HomokineticPair, StepKinematics_UniversalPair) + +}; +#endif // _StepKinematics_HomokineticPair_HeaderFile_ diff --git a/src/StepKinematics/StepKinematics_KinematicJoint.cxx b/src/StepKinematics/StepKinematics_KinematicJoint.cxx new file mode 100644 index 0000000000..1ce2c403ff --- /dev/null +++ b/src/StepKinematics/StepKinematics_KinematicJoint.cxx @@ -0,0 +1,27 @@ +// Created on : Sat May 02 12:41:15 2020 +// Created by: Irina KRYLOVA +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V3.0 +// Copyright (c) Open CASCADE 2020 +// +// This file is part of Open CASCADE Technology software library. +// +// This library is free software; you can redistribute it and/or modify it under +// the terms of the GNU Lesser General Public License version 2.1 as published +// by the Free Software Foundation, with special exception defined in the file +// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT +// distribution for complete text of the license and disclaimer of any warranty. +// +// Alternatively, this file may be used under the terms of Open CASCADE +// commercial license or contractual agreement. + +#include + +IMPLEMENT_STANDARD_RTTIEXT(StepKinematics_KinematicJoint, StepShape_Edge) + +//======================================================================= +//function : StepKinematics_KinematicJoint +//purpose : +//======================================================================= +StepKinematics_KinematicJoint::StepKinematics_KinematicJoint () +{ +} diff --git a/src/StepKinematics/StepKinematics_KinematicJoint.hxx b/src/StepKinematics/StepKinematics_KinematicJoint.hxx new file mode 100644 index 0000000000..be7a2622c6 --- /dev/null +++ b/src/StepKinematics/StepKinematics_KinematicJoint.hxx @@ -0,0 +1,40 @@ +// Created on : Sat May 02 12:41:15 2020 +// Created by: Irina KRYLOVA +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V3.0 +// Copyright (c) Open CASCADE 2020 +// +// 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 _StepKinematics_KinematicJoint_HeaderFile_ +#define _StepKinematics_KinematicJoint_HeaderFile_ + +#include +#include +#include + +#include +#include + +DEFINE_STANDARD_HANDLE(StepKinematics_KinematicJoint, StepShape_Edge) + +//! Representation of STEP entity KinematicJoint +class StepKinematics_KinematicJoint : public StepShape_Edge +{ +public : + + //! default constructor + Standard_EXPORT StepKinematics_KinematicJoint(); + +DEFINE_STANDARD_RTTIEXT(StepKinematics_KinematicJoint, StepShape_Edge) + +}; +#endif // _StepKinematics_KinematicJoint_HeaderFile_ diff --git a/src/StepKinematics/StepKinematics_KinematicLink.cxx b/src/StepKinematics/StepKinematics_KinematicLink.cxx new file mode 100644 index 0000000000..cfb1a09657 --- /dev/null +++ b/src/StepKinematics/StepKinematics_KinematicLink.cxx @@ -0,0 +1,27 @@ +// Created on : Sat May 02 12:41:15 2020 +// Created by: Irina KRYLOVA +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V3.0 +// Copyright (c) Open CASCADE 2020 +// +// This file is part of Open CASCADE Technology software library. +// +// This library is free software; you can redistribute it and/or modify it under +// the terms of the GNU Lesser General Public License version 2.1 as published +// by the Free Software Foundation, with special exception defined in the file +// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT +// distribution for complete text of the license and disclaimer of any warranty. +// +// Alternatively, this file may be used under the terms of Open CASCADE +// commercial license or contractual agreement. + +#include + +IMPLEMENT_STANDARD_RTTIEXT(StepKinematics_KinematicLink, StepShape_Vertex) + +//======================================================================= +//function : StepKinematics_KinematicLink +//purpose : +//======================================================================= +StepKinematics_KinematicLink::StepKinematics_KinematicLink () +{ +} diff --git a/src/StepKinematics/StepKinematics_KinematicLink.hxx b/src/StepKinematics/StepKinematics_KinematicLink.hxx new file mode 100644 index 0000000000..14ed0dafcf --- /dev/null +++ b/src/StepKinematics/StepKinematics_KinematicLink.hxx @@ -0,0 +1,39 @@ +// Created on : Sat May 02 12:41:15 2020 +// Created by: Irina KRYLOVA +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V3.0 +// Copyright (c) Open CASCADE 2020 +// +// 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 _StepKinematics_KinematicLink_HeaderFile_ +#define _StepKinematics_KinematicLink_HeaderFile_ + +#include +#include +#include + +#include + +DEFINE_STANDARD_HANDLE(StepKinematics_KinematicLink, StepShape_Vertex) + +//! Representation of STEP entity KinematicLink +class StepKinematics_KinematicLink : public StepShape_Vertex +{ +public : + + //! default constructor + Standard_EXPORT StepKinematics_KinematicLink(); + +DEFINE_STANDARD_RTTIEXT(StepKinematics_KinematicLink, StepShape_Vertex) + +}; +#endif // _StepKinematics_KinematicLink_HeaderFile_ diff --git a/src/StepKinematics/StepKinematics_KinematicLinkRepresentation.cxx b/src/StepKinematics/StepKinematics_KinematicLinkRepresentation.cxx new file mode 100644 index 0000000000..96937268da --- /dev/null +++ b/src/StepKinematics/StepKinematics_KinematicLinkRepresentation.cxx @@ -0,0 +1,61 @@ +// Created on : Sat May 02 12:41:15 2020 +// Created by: Irina KRYLOVA +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V3.0 +// Copyright (c) Open CASCADE 2020 +// +// This file is part of Open CASCADE Technology software library. +// +// This library is free software; you can redistribute it and/or modify it under +// the terms of the GNU Lesser General Public License version 2.1 as published +// by the Free Software Foundation, with special exception defined in the file +// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT +// distribution for complete text of the license and disclaimer of any warranty. +// +// Alternatively, this file may be used under the terms of Open CASCADE +// commercial license or contractual agreement. + +#include + +IMPLEMENT_STANDARD_RTTIEXT(StepKinematics_KinematicLinkRepresentation, StepRepr_Representation) + +//======================================================================= +//function : StepKinematics_KinematicLinkRepresentation +//purpose : +//======================================================================= +StepKinematics_KinematicLinkRepresentation::StepKinematics_KinematicLinkRepresentation () +{ +} + +//======================================================================= +//function : Init +//purpose : +//======================================================================= +void StepKinematics_KinematicLinkRepresentation::Init (const Handle(TCollection_HAsciiString)& theRepresentation_Name, + const Handle(StepRepr_HArray1OfRepresentationItem)& theRepresentation_Items, + const Handle(StepRepr_RepresentationContext)& theRepresentation_ContextOfItems, + const Handle(StepKinematics_KinematicLink)& theRepresentedLink) +{ + StepRepr_Representation::Init(theRepresentation_Name, + theRepresentation_Items, + theRepresentation_ContextOfItems); + + myRepresentedLink = theRepresentedLink; +} + +//======================================================================= +//function : RepresentedLink +//purpose : +//======================================================================= +Handle(StepKinematics_KinematicLink) StepKinematics_KinematicLinkRepresentation::RepresentedLink () const +{ + return myRepresentedLink; +} + +//======================================================================= +//function : SetRepresentedLink +//purpose : +//======================================================================= +void StepKinematics_KinematicLinkRepresentation::SetRepresentedLink (const Handle(StepKinematics_KinematicLink)& theRepresentedLink) +{ + myRepresentedLink = theRepresentedLink; +} diff --git a/src/StepKinematics/StepKinematics_KinematicLinkRepresentation.hxx b/src/StepKinematics/StepKinematics_KinematicLinkRepresentation.hxx new file mode 100644 index 0000000000..e042105f1c --- /dev/null +++ b/src/StepKinematics/StepKinematics_KinematicLinkRepresentation.hxx @@ -0,0 +1,56 @@ +// Created on : Sat May 02 12:41:15 2020 +// Created by: Irina KRYLOVA +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V3.0 +// Copyright (c) Open CASCADE 2020 +// +// 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 _StepKinematics_KinematicLinkRepresentation_HeaderFile_ +#define _StepKinematics_KinematicLinkRepresentation_HeaderFile_ + +#include +#include +#include + +#include +#include +#include +#include + +DEFINE_STANDARD_HANDLE(StepKinematics_KinematicLinkRepresentation, StepRepr_Representation) + +//! Representation of STEP entity KinematicLinkRepresentation +class StepKinematics_KinematicLinkRepresentation : public StepRepr_Representation +{ +public : + + //! default constructor + Standard_EXPORT StepKinematics_KinematicLinkRepresentation(); + + //! Initialize all fields (own and inherited) + Standard_EXPORT void Init(const Handle(TCollection_HAsciiString)& theRepresentation_Name, + const Handle(StepRepr_HArray1OfRepresentationItem)& theRepresentation_Items, + const Handle(StepRepr_RepresentationContext)& theRepresentation_ContextOfItems, + const Handle(StepKinematics_KinematicLink)& theRepresentedLink); + + //! Returns field RepresentedLink + Standard_EXPORT Handle(StepKinematics_KinematicLink) RepresentedLink() const; + //! Sets field RepresentedLink + Standard_EXPORT void SetRepresentedLink (const Handle(StepKinematics_KinematicLink)& theRepresentedLink); + +DEFINE_STANDARD_RTTIEXT(StepKinematics_KinematicLinkRepresentation, StepRepr_Representation) + +private: + Handle(StepKinematics_KinematicLink) myRepresentedLink; + +}; +#endif // _StepKinematics_KinematicLinkRepresentation_HeaderFile_ diff --git a/src/StepKinematics/StepKinematics_KinematicLinkRepresentationAssociation.cxx b/src/StepKinematics/StepKinematics_KinematicLinkRepresentationAssociation.cxx new file mode 100644 index 0000000000..bd3bda23a2 --- /dev/null +++ b/src/StepKinematics/StepKinematics_KinematicLinkRepresentationAssociation.cxx @@ -0,0 +1,27 @@ +// Created on : Sat May 02 12:41:15 2020 +// Created by: Irina KRYLOVA +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V3.0 +// Copyright (c) Open CASCADE 2020 +// +// This file is part of Open CASCADE Technology software library. +// +// This library is free software; you can redistribute it and/or modify it under +// the terms of the GNU Lesser General Public License version 2.1 as published +// by the Free Software Foundation, with special exception defined in the file +// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT +// distribution for complete text of the license and disclaimer of any warranty. +// +// Alternatively, this file may be used under the terms of Open CASCADE +// commercial license or contractual agreement. + +#include + +IMPLEMENT_STANDARD_RTTIEXT(StepKinematics_KinematicLinkRepresentationAssociation, StepRepr_RepresentationRelationship) + +//======================================================================= +//function : StepKinematics_KinematicLinkRepresentationAssociation +//purpose : +//======================================================================= +StepKinematics_KinematicLinkRepresentationAssociation::StepKinematics_KinematicLinkRepresentationAssociation () +{ +} diff --git a/src/StepKinematics/StepKinematics_KinematicLinkRepresentationAssociation.hxx b/src/StepKinematics/StepKinematics_KinematicLinkRepresentationAssociation.hxx new file mode 100644 index 0000000000..e20ccad9d2 --- /dev/null +++ b/src/StepKinematics/StepKinematics_KinematicLinkRepresentationAssociation.hxx @@ -0,0 +1,40 @@ +// Created on : Sat May 02 12:41:15 2020 +// Created by: Irina KRYLOVA +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V3.0 +// Copyright (c) Open CASCADE 2020 +// +// 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 _StepKinematics_KinematicLinkRepresentationAssociation_HeaderFile_ +#define _StepKinematics_KinematicLinkRepresentationAssociation_HeaderFile_ + +#include +#include +#include + +#include +#include + +DEFINE_STANDARD_HANDLE(StepKinematics_KinematicLinkRepresentationAssociation, StepRepr_RepresentationRelationship) + +//! Representation of STEP entity KinematicLinkRepresentationAssociation +class StepKinematics_KinematicLinkRepresentationAssociation : public StepRepr_RepresentationRelationship +{ +public : + + //! default constructor + Standard_EXPORT StepKinematics_KinematicLinkRepresentationAssociation(); + +DEFINE_STANDARD_RTTIEXT(StepKinematics_KinematicLinkRepresentationAssociation, StepRepr_RepresentationRelationship) + +}; +#endif // _StepKinematics_KinematicLinkRepresentationAssociation_HeaderFile_ diff --git a/src/StepKinematics/StepKinematics_KinematicPair.cxx b/src/StepKinematics/StepKinematics_KinematicPair.cxx new file mode 100644 index 0000000000..4aeee107a8 --- /dev/null +++ b/src/StepKinematics/StepKinematics_KinematicPair.cxx @@ -0,0 +1,86 @@ +// Created on : Sat May 02 12:41:15 2020 +// Created by: Irina KRYLOVA +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V3.0 +// Copyright (c) Open CASCADE 2020 +// +// This file is part of Open CASCADE Technology software library. +// +// This library is free software; you can redistribute it and/or modify it under +// the terms of the GNU Lesser General Public License version 2.1 as published +// by the Free Software Foundation, with special exception defined in the file +// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT +// distribution for complete text of the license and disclaimer of any warranty. +// +// Alternatively, this file may be used under the terms of Open CASCADE +// commercial license or contractual agreement. + +#include + +IMPLEMENT_STANDARD_RTTIEXT(StepKinematics_KinematicPair, StepGeom_GeometricRepresentationItem) + +//======================================================================= +//function : StepKinematics_KinematicPair +//purpose : +//======================================================================= +StepKinematics_KinematicPair::StepKinematics_KinematicPair () +{ +} + +//======================================================================= +//function : Init +//purpose : +//======================================================================= +void StepKinematics_KinematicPair::Init (const Handle(TCollection_HAsciiString)& theRepresentationItem_Name, + const Handle(TCollection_HAsciiString)& theItemDefinedTransformation_Name, + const Standard_Boolean /*hasItemDefinedTransformation_Description*/, + const Handle(TCollection_HAsciiString)& theItemDefinedTransformation_Description, + const Handle(StepRepr_RepresentationItem)& theItemDefinedTransformation_TransformItem1, + const Handle(StepRepr_RepresentationItem)& theItemDefinedTransformation_TransformItem2, + const Handle(StepKinematics_KinematicJoint)& theJoint) +{ + StepGeom_GeometricRepresentationItem::Init(theRepresentationItem_Name); + myItemDefinedTransformation = new StepRepr_ItemDefinedTransformation; + myItemDefinedTransformation->Init(theItemDefinedTransformation_Name, + /*hasItemDefinedTransformation_Description,*/ + theItemDefinedTransformation_Description, + theItemDefinedTransformation_TransformItem1, + theItemDefinedTransformation_TransformItem2); + + myJoint = theJoint; +} + +//======================================================================= +//function : ItemDefinedTransformation +//purpose : +//======================================================================= +Handle(StepRepr_ItemDefinedTransformation) StepKinematics_KinematicPair::ItemDefinedTransformation () const +{ + return myItemDefinedTransformation; +} + +//======================================================================= +//function : SetItemDefinedTransformation +//purpose : +//======================================================================= +void StepKinematics_KinematicPair::SetItemDefinedTransformation (const Handle(StepRepr_ItemDefinedTransformation)& theItemDefinedTransformation) +{ + myItemDefinedTransformation = theItemDefinedTransformation; +} + +//======================================================================= +//function : Joint +//purpose : +//======================================================================= +Handle(StepKinematics_KinematicJoint) StepKinematics_KinematicPair::Joint () const +{ + return myJoint; +} + +//======================================================================= +//function : SetJoint +//purpose : +//======================================================================= +void StepKinematics_KinematicPair::SetJoint (const Handle(StepKinematics_KinematicJoint)& theJoint) +{ + myJoint = theJoint; +} diff --git a/src/StepKinematics/StepKinematics_KinematicPair.hxx b/src/StepKinematics/StepKinematics_KinematicPair.hxx new file mode 100644 index 0000000000..8e34b1652a --- /dev/null +++ b/src/StepKinematics/StepKinematics_KinematicPair.hxx @@ -0,0 +1,65 @@ +// Created on : Sat May 02 12:41:15 2020 +// Created by: Irina KRYLOVA +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V3.0 +// Copyright (c) Open CASCADE 2020 +// +// 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 _StepKinematics_KinematicPair_HeaderFile_ +#define _StepKinematics_KinematicPair_HeaderFile_ + +#include +#include +#include + +#include +#include +#include +#include + +DEFINE_STANDARD_HANDLE(StepKinematics_KinematicPair, StepGeom_GeometricRepresentationItem) + +//! Representation of STEP entity KinematicPair +class StepKinematics_KinematicPair : public StepGeom_GeometricRepresentationItem +{ +public : + + //! default constructor + Standard_EXPORT StepKinematics_KinematicPair(); + + //! Initialize all fields (own and inherited) + Standard_EXPORT void Init(const Handle(TCollection_HAsciiString)& theRepresentationItem_Name, + const Handle(TCollection_HAsciiString)& theItemDefinedTransformation_Name, + const Standard_Boolean hasItemDefinedTransformation_Description, + const Handle(TCollection_HAsciiString)& theItemDefinedTransformation_Description, + const Handle(StepRepr_RepresentationItem)& theItemDefinedTransformation_TransformItem1, + const Handle(StepRepr_RepresentationItem)& theItemDefinedTransformation_TransformItem2, + const Handle(StepKinematics_KinematicJoint)& theJoint); + + //! Returns data for supertype ItemDefinedTransformation + Standard_EXPORT Handle(StepRepr_ItemDefinedTransformation) ItemDefinedTransformation() const; + //! Sets data for supertype ItemDefinedTransformation + Standard_EXPORT void SetItemDefinedTransformation (const Handle(StepRepr_ItemDefinedTransformation)& theItemDefinedTransformation); + + //! Returns field Joint + Standard_EXPORT Handle(StepKinematics_KinematicJoint) Joint() const; + //! Sets field Joint + Standard_EXPORT void SetJoint (const Handle(StepKinematics_KinematicJoint)& theJoint); + +DEFINE_STANDARD_RTTIEXT(StepKinematics_KinematicPair, StepGeom_GeometricRepresentationItem) + +private: + Handle(StepRepr_ItemDefinedTransformation) myItemDefinedTransformation; //!< supertype + Handle(StepKinematics_KinematicJoint) myJoint; + +}; +#endif // _StepKinematics_KinematicPair_HeaderFile_ diff --git a/src/StepKinematics/StepKinematics_KinematicPropertyDefinitionRepresentation.cxx b/src/StepKinematics/StepKinematics_KinematicPropertyDefinitionRepresentation.cxx new file mode 100644 index 0000000000..2c84c91bab --- /dev/null +++ b/src/StepKinematics/StepKinematics_KinematicPropertyDefinitionRepresentation.cxx @@ -0,0 +1,27 @@ +// Created on : Sat May 02 12:41:15 2020 +// Created by: Irina KRYLOVA +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V3.0 +// Copyright (c) Open CASCADE 2020 +// +// This file is part of Open CASCADE Technology software library. +// +// This library is free software; you can redistribute it and/or modify it under +// the terms of the GNU Lesser General Public License version 2.1 as published +// by the Free Software Foundation, with special exception defined in the file +// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT +// distribution for complete text of the license and disclaimer of any warranty. +// +// Alternatively, this file may be used under the terms of Open CASCADE +// commercial license or contractual agreement. + +#include + +IMPLEMENT_STANDARD_RTTIEXT(StepKinematics_KinematicPropertyDefinitionRepresentation, StepRepr_PropertyDefinitionRepresentation) + +//======================================================================= +//function : StepKinematics_KinematicPropertyDefinitionRepresentation +//purpose : +//======================================================================= +StepKinematics_KinematicPropertyDefinitionRepresentation::StepKinematics_KinematicPropertyDefinitionRepresentation () +{ +} diff --git a/src/StepKinematics/StepKinematics_KinematicPropertyDefinitionRepresentation.hxx b/src/StepKinematics/StepKinematics_KinematicPropertyDefinitionRepresentation.hxx new file mode 100644 index 0000000000..d2924497b0 --- /dev/null +++ b/src/StepKinematics/StepKinematics_KinematicPropertyDefinitionRepresentation.hxx @@ -0,0 +1,40 @@ +// Created on : Sat May 02 12:41:15 2020 +// Created by: Irina KRYLOVA +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V3.0 +// Copyright (c) Open CASCADE 2020 +// +// 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 _StepKinematics_KinematicPropertyDefinitionRepresentation_HeaderFile_ +#define _StepKinematics_KinematicPropertyDefinitionRepresentation_HeaderFile_ + +#include +#include +#include + +#include +#include + +DEFINE_STANDARD_HANDLE(StepKinematics_KinematicPropertyDefinitionRepresentation, StepRepr_PropertyDefinitionRepresentation) + +//! Representation of STEP entity KinematicPropertyDefinitionRepresentation +class StepKinematics_KinematicPropertyDefinitionRepresentation : public StepRepr_PropertyDefinitionRepresentation +{ +public : + + //! default constructor + Standard_EXPORT StepKinematics_KinematicPropertyDefinitionRepresentation(); + +DEFINE_STANDARD_RTTIEXT(StepKinematics_KinematicPropertyDefinitionRepresentation, StepRepr_PropertyDefinitionRepresentation) + +}; +#endif // _StepKinematics_KinematicPropertyDefinitionRepresentation_HeaderFile_ diff --git a/src/StepKinematics/StepKinematics_KinematicPropertyMechanismRepresentation.cxx b/src/StepKinematics/StepKinematics_KinematicPropertyMechanismRepresentation.cxx new file mode 100644 index 0000000000..a47dfe2fd2 --- /dev/null +++ b/src/StepKinematics/StepKinematics_KinematicPropertyMechanismRepresentation.cxx @@ -0,0 +1,59 @@ +// Created on : Sat May 02 12:41:15 2020 +// Created by: Irina KRYLOVA +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V3.0 +// Copyright (c) Open CASCADE 2020 +// +// This file is part of Open CASCADE Technology software library. +// +// This library is free software; you can redistribute it and/or modify it under +// the terms of the GNU Lesser General Public License version 2.1 as published +// by the Free Software Foundation, with special exception defined in the file +// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT +// distribution for complete text of the license and disclaimer of any warranty. +// +// Alternatively, this file may be used under the terms of Open CASCADE +// commercial license or contractual agreement. + +#include + +IMPLEMENT_STANDARD_RTTIEXT(StepKinematics_KinematicPropertyMechanismRepresentation, StepKinematics_KinematicPropertyDefinitionRepresentation) + +//======================================================================= +//function : StepKinematics_KinematicPropertyMechanismRepresentation +//purpose : +//======================================================================= +StepKinematics_KinematicPropertyMechanismRepresentation::StepKinematics_KinematicPropertyMechanismRepresentation () +{ +} + +//======================================================================= +//function : Init +//purpose : +//======================================================================= +void StepKinematics_KinematicPropertyMechanismRepresentation::Init (const StepRepr_RepresentedDefinition& thePropertyDefinitionRepresentation_Definition, + const Handle(StepRepr_Representation)& thePropertyDefinitionRepresentation_UsedRepresentation, + const Handle(StepKinematics_KinematicLinkRepresentation)& theBase) +{ + StepKinematics_KinematicPropertyDefinitionRepresentation::Init(thePropertyDefinitionRepresentation_Definition, + thePropertyDefinitionRepresentation_UsedRepresentation); + + myBase = theBase; +} + +//======================================================================= +//function : Base +//purpose : +//======================================================================= +Handle(StepKinematics_KinematicLinkRepresentation) StepKinematics_KinematicPropertyMechanismRepresentation::Base () const +{ + return myBase; +} + +//======================================================================= +//function : SetBase +//purpose : +//======================================================================= +void StepKinematics_KinematicPropertyMechanismRepresentation::SetBase (const Handle(StepKinematics_KinematicLinkRepresentation)& theBase) +{ + myBase = theBase; +} diff --git a/src/StepKinematics/StepKinematics_KinematicPropertyMechanismRepresentation.hxx b/src/StepKinematics/StepKinematics_KinematicPropertyMechanismRepresentation.hxx new file mode 100644 index 0000000000..9eb6cc66b9 --- /dev/null +++ b/src/StepKinematics/StepKinematics_KinematicPropertyMechanismRepresentation.hxx @@ -0,0 +1,54 @@ +// Created on : Sat May 02 12:41:15 2020 +// Created by: Irina KRYLOVA +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V3.0 +// Copyright (c) Open CASCADE 2020 +// +// 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 _StepKinematics_KinematicPropertyMechanismRepresentation_HeaderFile_ +#define _StepKinematics_KinematicPropertyMechanismRepresentation_HeaderFile_ + +#include +#include +#include + +#include +#include +#include + +DEFINE_STANDARD_HANDLE(StepKinematics_KinematicPropertyMechanismRepresentation, StepKinematics_KinematicPropertyDefinitionRepresentation) + +//! Representation of STEP entity KinematicPropertyMechanismRepresentation +class StepKinematics_KinematicPropertyMechanismRepresentation : public StepKinematics_KinematicPropertyDefinitionRepresentation +{ +public : + + //! default constructor + Standard_EXPORT StepKinematics_KinematicPropertyMechanismRepresentation(); + + //! Initialize all fields (own and inherited) + Standard_EXPORT void Init(const StepRepr_RepresentedDefinition& thePropertyDefinitionRepresentation_Definition, + const Handle(StepRepr_Representation)& thePropertyDefinitionRepresentation_UsedRepresentation, + const Handle(StepKinematics_KinematicLinkRepresentation)& theBase); + + //! Returns field Base + Standard_EXPORT Handle(StepKinematics_KinematicLinkRepresentation) Base() const; + //! Sets field Base + Standard_EXPORT void SetBase (const Handle(StepKinematics_KinematicLinkRepresentation)& theBase); + +DEFINE_STANDARD_RTTIEXT(StepKinematics_KinematicPropertyMechanismRepresentation, StepKinematics_KinematicPropertyDefinitionRepresentation) + +private: + Handle(StepKinematics_KinematicLinkRepresentation) myBase; + +}; +#endif // _StepKinematics_KinematicPropertyMechanismRepresentation_HeaderFile_ diff --git a/src/StepKinematics/StepKinematics_KinematicTopologyDirectedStructure.cxx b/src/StepKinematics/StepKinematics_KinematicTopologyDirectedStructure.cxx new file mode 100644 index 0000000000..540ca4fc40 --- /dev/null +++ b/src/StepKinematics/StepKinematics_KinematicTopologyDirectedStructure.cxx @@ -0,0 +1,61 @@ +// Created on : Sat May 02 12:41:15 2020 +// Created by: Irina KRYLOVA +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V3.0 +// Copyright (c) Open CASCADE 2020 +// +// This file is part of Open CASCADE Technology software library. +// +// This library is free software; you can redistribute it and/or modify it under +// the terms of the GNU Lesser General Public License version 2.1 as published +// by the Free Software Foundation, with special exception defined in the file +// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT +// distribution for complete text of the license and disclaimer of any warranty. +// +// Alternatively, this file may be used under the terms of Open CASCADE +// commercial license or contractual agreement. + +#include + +IMPLEMENT_STANDARD_RTTIEXT(StepKinematics_KinematicTopologyDirectedStructure, StepRepr_Representation) + +//======================================================================= +//function : StepKinematics_KinematicTopologyDirectedStructure +//purpose : +//======================================================================= +StepKinematics_KinematicTopologyDirectedStructure::StepKinematics_KinematicTopologyDirectedStructure () +{ +} + +//======================================================================= +//function : Init +//purpose : +//======================================================================= +void StepKinematics_KinematicTopologyDirectedStructure::Init (const Handle(TCollection_HAsciiString)& theRepresentation_Name, + const Handle(StepRepr_HArray1OfRepresentationItem)& theRepresentation_Items, + const Handle(StepRepr_RepresentationContext)& theRepresentation_ContextOfItems, + const Handle(StepKinematics_KinematicTopologyStructure)& theParent) +{ + StepRepr_Representation::Init(theRepresentation_Name, + theRepresentation_Items, + theRepresentation_ContextOfItems); + + myParent = theParent; +} + +//======================================================================= +//function : Parent +//purpose : +//======================================================================= +Handle(StepKinematics_KinematicTopologyStructure) StepKinematics_KinematicTopologyDirectedStructure::Parent () const +{ + return myParent; +} + +//======================================================================= +//function : SetParent +//purpose : +//======================================================================= +void StepKinematics_KinematicTopologyDirectedStructure::SetParent (const Handle(StepKinematics_KinematicTopologyStructure)& theParent) +{ + myParent = theParent; +} diff --git a/src/StepKinematics/StepKinematics_KinematicTopologyDirectedStructure.hxx b/src/StepKinematics/StepKinematics_KinematicTopologyDirectedStructure.hxx new file mode 100644 index 0000000000..1ff25be00a --- /dev/null +++ b/src/StepKinematics/StepKinematics_KinematicTopologyDirectedStructure.hxx @@ -0,0 +1,56 @@ +// Created on : Sat May 02 12:41:15 2020 +// Created by: Irina KRYLOVA +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V3.0 +// Copyright (c) Open CASCADE 2020 +// +// 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 _StepKinematics_KinematicTopologyDirectedStructure_HeaderFile_ +#define _StepKinematics_KinematicTopologyDirectedStructure_HeaderFile_ + +#include +#include +#include + +#include +#include +#include +#include + +DEFINE_STANDARD_HANDLE(StepKinematics_KinematicTopologyDirectedStructure, StepRepr_Representation) + +//! Representation of STEP entity KinematicTopologyDirectedStructure +class StepKinematics_KinematicTopologyDirectedStructure : public StepRepr_Representation +{ +public : + + //! default constructor + Standard_EXPORT StepKinematics_KinematicTopologyDirectedStructure(); + + //! Initialize all fields (own and inherited) + Standard_EXPORT void Init(const Handle(TCollection_HAsciiString)& theRepresentation_Name, + const Handle(StepRepr_HArray1OfRepresentationItem)& theRepresentation_Items, + const Handle(StepRepr_RepresentationContext)& theRepresentation_ContextOfItems, + const Handle(StepKinematics_KinematicTopologyStructure)& theParent); + + //! Returns field Parent + Standard_EXPORT Handle(StepKinematics_KinematicTopologyStructure) Parent() const; + //! Sets field Parent + Standard_EXPORT void SetParent (const Handle(StepKinematics_KinematicTopologyStructure)& theParent); + +DEFINE_STANDARD_RTTIEXT(StepKinematics_KinematicTopologyDirectedStructure, StepRepr_Representation) + +private: + Handle(StepKinematics_KinematicTopologyStructure) myParent; + +}; +#endif // _StepKinematics_KinematicTopologyDirectedStructure_HeaderFile_ diff --git a/src/StepKinematics/StepKinematics_KinematicTopologyNetworkStructure.cxx b/src/StepKinematics/StepKinematics_KinematicTopologyNetworkStructure.cxx new file mode 100644 index 0000000000..5f9c86ee0b --- /dev/null +++ b/src/StepKinematics/StepKinematics_KinematicTopologyNetworkStructure.cxx @@ -0,0 +1,61 @@ +// Created on : Sat May 02 12:41:15 2020 +// Created by: Irina KRYLOVA +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V3.0 +// Copyright (c) Open CASCADE 2020 +// +// This file is part of Open CASCADE Technology software library. +// +// This library is free software; you can redistribute it and/or modify it under +// the terms of the GNU Lesser General Public License version 2.1 as published +// by the Free Software Foundation, with special exception defined in the file +// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT +// distribution for complete text of the license and disclaimer of any warranty. +// +// Alternatively, this file may be used under the terms of Open CASCADE +// commercial license or contractual agreement. + +#include + +IMPLEMENT_STANDARD_RTTIEXT(StepKinematics_KinematicTopologyNetworkStructure, StepRepr_Representation) + +//======================================================================= +//function : StepKinematics_KinematicTopologyNetworkStructure +//purpose : +//======================================================================= +StepKinematics_KinematicTopologyNetworkStructure::StepKinematics_KinematicTopologyNetworkStructure () +{ +} + +//======================================================================= +//function : Init +//purpose : +//======================================================================= +void StepKinematics_KinematicTopologyNetworkStructure::Init (const Handle(TCollection_HAsciiString)& theRepresentation_Name, + const Handle(StepRepr_HArray1OfRepresentationItem)& theRepresentation_Items, + const Handle(StepRepr_RepresentationContext)& theRepresentation_ContextOfItems, + const Handle(StepKinematics_KinematicTopologyStructure)& theParent) +{ + StepRepr_Representation::Init(theRepresentation_Name, + theRepresentation_Items, + theRepresentation_ContextOfItems); + + myParent = theParent; +} + +//======================================================================= +//function : Parent +//purpose : +//======================================================================= +Handle(StepKinematics_KinematicTopologyStructure) StepKinematics_KinematicTopologyNetworkStructure::Parent () const +{ + return myParent; +} + +//======================================================================= +//function : SetParent +//purpose : +//======================================================================= +void StepKinematics_KinematicTopologyNetworkStructure::SetParent (const Handle(StepKinematics_KinematicTopologyStructure)& theParent) +{ + myParent = theParent; +} diff --git a/src/StepKinematics/StepKinematics_KinematicTopologyNetworkStructure.hxx b/src/StepKinematics/StepKinematics_KinematicTopologyNetworkStructure.hxx new file mode 100644 index 0000000000..4a2801685a --- /dev/null +++ b/src/StepKinematics/StepKinematics_KinematicTopologyNetworkStructure.hxx @@ -0,0 +1,56 @@ +// Created on : Sat May 02 12:41:15 2020 +// Created by: Irina KRYLOVA +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V3.0 +// Copyright (c) Open CASCADE 2020 +// +// 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 _StepKinematics_KinematicTopologyNetworkStructure_HeaderFile_ +#define _StepKinematics_KinematicTopologyNetworkStructure_HeaderFile_ + +#include +#include +#include + +#include +#include +#include +#include + +DEFINE_STANDARD_HANDLE(StepKinematics_KinematicTopologyNetworkStructure, StepRepr_Representation) + +//! Representation of STEP entity KinematicTopologyNetworkStructure +class StepKinematics_KinematicTopologyNetworkStructure : public StepRepr_Representation +{ +public : + + //! default constructor + Standard_EXPORT StepKinematics_KinematicTopologyNetworkStructure(); + + //! Initialize all fields (own and inherited) + Standard_EXPORT void Init(const Handle(TCollection_HAsciiString)& theRepresentation_Name, + const Handle(StepRepr_HArray1OfRepresentationItem)& theRepresentation_Items, + const Handle(StepRepr_RepresentationContext)& theRepresentation_ContextOfItems, + const Handle(StepKinematics_KinematicTopologyStructure)& theParent); + + //! Returns field Parent + Standard_EXPORT Handle(StepKinematics_KinematicTopologyStructure) Parent() const; + //! Sets field Parent + Standard_EXPORT void SetParent (const Handle(StepKinematics_KinematicTopologyStructure)& theParent); + +DEFINE_STANDARD_RTTIEXT(StepKinematics_KinematicTopologyNetworkStructure, StepRepr_Representation) + +private: + Handle(StepKinematics_KinematicTopologyStructure) myParent; + +}; +#endif // _StepKinematics_KinematicTopologyNetworkStructure_HeaderFile_ diff --git a/src/StepKinematics/StepKinematics_KinematicTopologyRepresentationSelect.cxx b/src/StepKinematics/StepKinematics_KinematicTopologyRepresentationSelect.cxx new file mode 100644 index 0000000000..a4f228545d --- /dev/null +++ b/src/StepKinematics/StepKinematics_KinematicTopologyRepresentationSelect.cxx @@ -0,0 +1,69 @@ +// Created on : Sat May 02 12:41:15 2020 +// Created by: Irina KRYLOVA +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V3.0 +// Copyright (c) Open CASCADE 2020 +// +// This file is part of Open CASCADE Technology software library. +// +// This library is free software; you can redistribute it and/or modify it under +// the terms of the GNU Lesser General Public License version 2.1 as published +// by the Free Software Foundation, with special exception defined in the file +// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT +// distribution for complete text of the license and disclaimer of any warranty. +// +// Alternatively, this file may be used under the terms of Open CASCADE +// commercial license or contractual agreement. + +#include + +#include +#include +#include + +//======================================================================= +//function : StepKinematics_KinematicTopologyRepresentationSelect +//purpose : +//======================================================================= +StepKinematics_KinematicTopologyRepresentationSelect::StepKinematics_KinematicTopologyRepresentationSelect () +{ +} + +//======================================================================= +//function : CaseNum +//purpose : +//======================================================================= +Standard_Integer StepKinematics_KinematicTopologyRepresentationSelect::CaseNum (const Handle(Standard_Transient)& ent) const +{ + if (ent.IsNull()) return 0; + if (ent->IsKind(STANDARD_TYPE(StepKinematics_KinematicTopologyDirectedStructure))) return 1; + if (ent->IsKind(STANDARD_TYPE(StepKinematics_KinematicTopologyNetworkStructure))) return 2; + if (ent->IsKind(STANDARD_TYPE(StepKinematics_KinematicTopologyStructure))) return 3; + return 0; +} + +//======================================================================= +//function : KinematicTopologyDirectedStructure +//purpose : +//======================================================================= +Handle(StepKinematics_KinematicTopologyDirectedStructure) StepKinematics_KinematicTopologyRepresentationSelect::KinematicTopologyDirectedStructure () const +{ + return Handle(StepKinematics_KinematicTopologyDirectedStructure)::DownCast(Value()); +} + +//======================================================================= +//function : KinematicTopologyNetworkStructure +//purpose : +//======================================================================= +Handle(StepKinematics_KinematicTopologyNetworkStructure) StepKinematics_KinematicTopologyRepresentationSelect::KinematicTopologyNetworkStructure () const +{ + return Handle(StepKinematics_KinematicTopologyNetworkStructure)::DownCast(Value()); +} + +//======================================================================= +//function : KinematicTopologyStructure +//purpose : +//======================================================================= +Handle(StepKinematics_KinematicTopologyStructure) StepKinematics_KinematicTopologyRepresentationSelect::KinematicTopologyStructure () const +{ + return Handle(StepKinematics_KinematicTopologyStructure)::DownCast(Value()); +} diff --git a/src/StepKinematics/StepKinematics_KinematicTopologyRepresentationSelect.hxx b/src/StepKinematics/StepKinematics_KinematicTopologyRepresentationSelect.hxx new file mode 100644 index 0000000000..3d6d89c095 --- /dev/null +++ b/src/StepKinematics/StepKinematics_KinematicTopologyRepresentationSelect.hxx @@ -0,0 +1,58 @@ +// Created on : Sat May 02 12:41:15 2020 +// Created by: Irina KRYLOVA +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V3.0 +// Copyright (c) Open CASCADE 2020 +// +// 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 _StepKinematics_KinematicTopologyRepresentationSelect_HeaderFile +#define _StepKinematics_KinematicTopologyRepresentationSelect_HeaderFile + +#include +#include +#include +#include +#include + +class Standard_Transient; +class StepKinematics_KinematicTopologyDirectedStructure; +class StepKinematics_KinematicTopologyNetworkStructure; +class StepKinematics_KinematicTopologyStructure; + +//! Representation of STEP SELECT type KinematicTopologyRepresentationSelect +class StepKinematics_KinematicTopologyRepresentationSelect : public StepData_SelectType +{ + +public: + + DEFINE_STANDARD_ALLOC + + //! Empty constructor + Standard_EXPORT StepKinematics_KinematicTopologyRepresentationSelect(); + + //! Recognizes a kind of KinematicTopologyRepresentationSelect select type + //! -- 1 -> KinematicTopologyDirectedStructure + //! -- 2 -> KinematicTopologyNetworkStructure + //! -- 3 -> KinematicTopologyStructure + Standard_EXPORT Standard_Integer CaseNum (const Handle(Standard_Transient)& ent) const Standard_OVERRIDE; + + //! Returns Value as KinematicTopologyDirectedStructure (or Null if another type) + Standard_EXPORT Handle(StepKinematics_KinematicTopologyDirectedStructure) KinematicTopologyDirectedStructure() const; + + //! Returns Value as KinematicTopologyNetworkStructure (or Null if another type) + Standard_EXPORT Handle(StepKinematics_KinematicTopologyNetworkStructure) KinematicTopologyNetworkStructure() const; + + //! Returns Value as KinematicTopologyStructure (or Null if another type) + Standard_EXPORT Handle(StepKinematics_KinematicTopologyStructure) KinematicTopologyStructure() const; + +}; +#endif // _StepKinematics_KinematicTopologyRepresentationSelect_HeaderFile diff --git a/src/StepKinematics/StepKinematics_KinematicTopologyStructure.cxx b/src/StepKinematics/StepKinematics_KinematicTopologyStructure.cxx new file mode 100644 index 0000000000..d207bb113d --- /dev/null +++ b/src/StepKinematics/StepKinematics_KinematicTopologyStructure.cxx @@ -0,0 +1,27 @@ +// Created on : Sat May 02 12:41:15 2020 +// Created by: Irina KRYLOVA +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V3.0 +// Copyright (c) Open CASCADE 2020 +// +// This file is part of Open CASCADE Technology software library. +// +// This library is free software; you can redistribute it and/or modify it under +// the terms of the GNU Lesser General Public License version 2.1 as published +// by the Free Software Foundation, with special exception defined in the file +// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT +// distribution for complete text of the license and disclaimer of any warranty. +// +// Alternatively, this file may be used under the terms of Open CASCADE +// commercial license or contractual agreement. + +#include + +IMPLEMENT_STANDARD_RTTIEXT(StepKinematics_KinematicTopologyStructure, StepRepr_Representation) + +//======================================================================= +//function : StepKinematics_KinematicTopologyStructure +//purpose : +//======================================================================= +StepKinematics_KinematicTopologyStructure::StepKinematics_KinematicTopologyStructure () +{ +} diff --git a/src/StepKinematics/StepKinematics_KinematicTopologyStructure.hxx b/src/StepKinematics/StepKinematics_KinematicTopologyStructure.hxx new file mode 100644 index 0000000000..8359003836 --- /dev/null +++ b/src/StepKinematics/StepKinematics_KinematicTopologyStructure.hxx @@ -0,0 +1,41 @@ +// Created on : Sat May 02 12:41:15 2020 +// Created by: Irina KRYLOVA +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V3.0 +// Copyright (c) Open CASCADE 2020 +// +// 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 _StepKinematics_KinematicTopologyStructure_HeaderFile_ +#define _StepKinematics_KinematicTopologyStructure_HeaderFile_ + +#include +#include +#include + +#include +#include +#include + +DEFINE_STANDARD_HANDLE(StepKinematics_KinematicTopologyStructure, StepRepr_Representation) + +//! Representation of STEP entity KinematicTopologyStructure +class StepKinematics_KinematicTopologyStructure : public StepRepr_Representation +{ +public : + + //! default constructor + Standard_EXPORT StepKinematics_KinematicTopologyStructure(); + +DEFINE_STANDARD_RTTIEXT(StepKinematics_KinematicTopologyStructure, StepRepr_Representation) + +}; +#endif // _StepKinematics_KinematicTopologyStructure_HeaderFile_ diff --git a/src/StepKinematics/StepKinematics_LinearFlexibleAndPinionPair.cxx b/src/StepKinematics/StepKinematics_LinearFlexibleAndPinionPair.cxx new file mode 100644 index 0000000000..7b3a7826ac --- /dev/null +++ b/src/StepKinematics/StepKinematics_LinearFlexibleAndPinionPair.cxx @@ -0,0 +1,69 @@ +// Created on : Fri May 08 19:02:07 2020 +// Created by: Irina KRYLOVA +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V3.0 +// Copyright (c) Open CASCADE 2020 +// +// This file is part of Open CASCADE Technology software library. +// +// This library is free software; you can redistribute it and/or modify it under +// the terms of the GNU Lesser General Public License version 2.1 as published +// by the Free Software Foundation, with special exception defined in the file +// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT +// distribution for complete text of the license and disclaimer of any warranty. +// +// Alternatively, this file may be used under the terms of Open CASCADE +// commercial license or contractual agreement. + +#include + +IMPLEMENT_STANDARD_RTTIEXT(StepKinematics_LinearFlexibleAndPinionPair, StepKinematics_LowOrderKinematicPairWithMotionCoupling) + +//======================================================================= +//function : StepKinematics_LinearFlexibleAndPinionPair +//purpose : +//======================================================================= +StepKinematics_LinearFlexibleAndPinionPair::StepKinematics_LinearFlexibleAndPinionPair () +{ +} + +//======================================================================= +//function : Init +//purpose : +//======================================================================= +void StepKinematics_LinearFlexibleAndPinionPair::Init (const Handle(TCollection_HAsciiString)& theRepresentationItem_Name, + const Handle(TCollection_HAsciiString)& theItemDefinedTransformation_Name, + const Standard_Boolean hasItemDefinedTransformation_Description, + const Handle(TCollection_HAsciiString)& theItemDefinedTransformation_Description, + const Handle(StepRepr_RepresentationItem)& theItemDefinedTransformation_TransformItem1, + const Handle(StepRepr_RepresentationItem)& theItemDefinedTransformation_TransformItem2, + const Handle(StepKinematics_KinematicJoint)& theKinematicPair_Joint, + const Standard_Real thePinionRadius) +{ + StepKinematics_LowOrderKinematicPairWithMotionCoupling::Init(theRepresentationItem_Name, + theItemDefinedTransformation_Name, + hasItemDefinedTransformation_Description, + theItemDefinedTransformation_Description, + theItemDefinedTransformation_TransformItem1, + theItemDefinedTransformation_TransformItem2, + theKinematicPair_Joint); + + myPinionRadius = thePinionRadius; +} + +//======================================================================= +//function : PinionRadius +//purpose : +//======================================================================= +Standard_Real StepKinematics_LinearFlexibleAndPinionPair::PinionRadius () const +{ + return myPinionRadius; +} + +//======================================================================= +//function : SetPinionRadius +//purpose : +//======================================================================= +void StepKinematics_LinearFlexibleAndPinionPair::SetPinionRadius (const Standard_Real thePinionRadius) +{ + myPinionRadius = thePinionRadius; +} diff --git a/src/StepKinematics/StepKinematics_LinearFlexibleAndPinionPair.hxx b/src/StepKinematics/StepKinematics_LinearFlexibleAndPinionPair.hxx new file mode 100644 index 0000000000..966e2859de --- /dev/null +++ b/src/StepKinematics/StepKinematics_LinearFlexibleAndPinionPair.hxx @@ -0,0 +1,60 @@ +// Created on : Fri May 08 19:02:07 2020 +// Created by: Irina KRYLOVA +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V3.0 +// Copyright (c) Open CASCADE 2020 +// +// 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 _StepKinematics_LinearFlexibleAndPinionPair_HeaderFile_ +#define _StepKinematics_LinearFlexibleAndPinionPair_HeaderFile_ + +#include +#include +#include + +#include +#include +#include +#include + +DEFINE_STANDARD_HANDLE(StepKinematics_LinearFlexibleAndPinionPair, StepKinematics_LowOrderKinematicPairWithMotionCoupling) + +//! Representation of STEP entity LinearFlexibleAndPinionPair +class StepKinematics_LinearFlexibleAndPinionPair : public StepKinematics_LowOrderKinematicPairWithMotionCoupling +{ +public : + + //! default constructor + Standard_EXPORT StepKinematics_LinearFlexibleAndPinionPair(); + + //! Initialize all fields (own and inherited) + Standard_EXPORT void Init(const Handle(TCollection_HAsciiString)& theRepresentationItem_Name, + const Handle(TCollection_HAsciiString)& theItemDefinedTransformation_Name, + const Standard_Boolean hasItemDefinedTransformation_Description, + const Handle(TCollection_HAsciiString)& theItemDefinedTransformation_Description, + const Handle(StepRepr_RepresentationItem)& theItemDefinedTransformation_TransformItem1, + const Handle(StepRepr_RepresentationItem)& theItemDefinedTransformation_TransformItem2, + const Handle(StepKinematics_KinematicJoint)& theKinematicPair_Joint, + const Standard_Real thePinionRadius); + + //! Returns field PinionRadius + Standard_EXPORT Standard_Real PinionRadius() const; + //! Sets field PinionRadius + Standard_EXPORT void SetPinionRadius (const Standard_Real thePinionRadius); + +DEFINE_STANDARD_RTTIEXT(StepKinematics_LinearFlexibleAndPinionPair, StepKinematics_LowOrderKinematicPairWithMotionCoupling) + +private: + Standard_Real myPinionRadius; + +}; +#endif // _StepKinematics_LinearFlexibleAndPinionPair_HeaderFile_ diff --git a/src/StepKinematics/StepKinematics_LinearFlexibleAndPlanarCurvePair.cxx b/src/StepKinematics/StepKinematics_LinearFlexibleAndPlanarCurvePair.cxx new file mode 100644 index 0000000000..5f74b551c8 --- /dev/null +++ b/src/StepKinematics/StepKinematics_LinearFlexibleAndPlanarCurvePair.cxx @@ -0,0 +1,90 @@ +// Created on : Fri May 08 19:02:07 2020 +// Created by: Irina KRYLOVA +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V3.0 +// Copyright (c) Open CASCADE 2020 +// +// This file is part of Open CASCADE Technology software library. +// +// This library is free software; you can redistribute it and/or modify it under +// the terms of the GNU Lesser General Public License version 2.1 as published +// by the Free Software Foundation, with special exception defined in the file +// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT +// distribution for complete text of the license and disclaimer of any warranty. +// +// Alternatively, this file may be used under the terms of Open CASCADE +// commercial license or contractual agreement. + +#include + +IMPLEMENT_STANDARD_RTTIEXT(StepKinematics_LinearFlexibleAndPlanarCurvePair, StepKinematics_HighOrderKinematicPair) + +//======================================================================= +//function : StepKinematics_LinearFlexibleAndPlanarCurvePair +//purpose : +//======================================================================= +StepKinematics_LinearFlexibleAndPlanarCurvePair::StepKinematics_LinearFlexibleAndPlanarCurvePair () +{ +} + +//======================================================================= +//function : Init +//purpose : +//======================================================================= +void StepKinematics_LinearFlexibleAndPlanarCurvePair::Init (const Handle(TCollection_HAsciiString)& theRepresentationItem_Name, + const Handle(TCollection_HAsciiString)& theItemDefinedTransformation_Name, + const Standard_Boolean hasItemDefinedTransformation_Description, + const Handle(TCollection_HAsciiString)& theItemDefinedTransformation_Description, + const Handle(StepRepr_RepresentationItem)& theItemDefinedTransformation_TransformItem1, + const Handle(StepRepr_RepresentationItem)& theItemDefinedTransformation_TransformItem2, + const Handle(StepKinematics_KinematicJoint)& theKinematicPair_Joint, + const Handle(StepGeom_Curve)& thePairCurve, + const Standard_Boolean theOrientation) +{ + StepKinematics_HighOrderKinematicPair::Init(theRepresentationItem_Name, + theItemDefinedTransformation_Name, + hasItemDefinedTransformation_Description, + theItemDefinedTransformation_Description, + theItemDefinedTransformation_TransformItem1, + theItemDefinedTransformation_TransformItem2, + theKinematicPair_Joint); + + myPairCurve = thePairCurve; + + myOrientation = theOrientation; +} + +//======================================================================= +//function : PairCurve +//purpose : +//======================================================================= +Handle(StepGeom_Curve) StepKinematics_LinearFlexibleAndPlanarCurvePair::PairCurve () const +{ + return myPairCurve; +} + +//======================================================================= +//function : SetPairCurve +//purpose : +//======================================================================= +void StepKinematics_LinearFlexibleAndPlanarCurvePair::SetPairCurve (const Handle(StepGeom_Curve)& thePairCurve) +{ + myPairCurve = thePairCurve; +} + +//======================================================================= +//function : Orientation +//purpose : +//======================================================================= +Standard_Boolean StepKinematics_LinearFlexibleAndPlanarCurvePair::Orientation () const +{ + return myOrientation; +} + +//======================================================================= +//function : SetOrientation +//purpose : +//======================================================================= +void StepKinematics_LinearFlexibleAndPlanarCurvePair::SetOrientation (const Standard_Boolean theOrientation) +{ + myOrientation = theOrientation; +} diff --git a/src/StepKinematics/StepKinematics_LinearFlexibleAndPlanarCurvePair.hxx b/src/StepKinematics/StepKinematics_LinearFlexibleAndPlanarCurvePair.hxx new file mode 100644 index 0000000000..22c4b3c346 --- /dev/null +++ b/src/StepKinematics/StepKinematics_LinearFlexibleAndPlanarCurvePair.hxx @@ -0,0 +1,68 @@ +// Created on : Fri May 08 19:02:07 2020 +// Created by: Irina KRYLOVA +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V3.0 +// Copyright (c) Open CASCADE 2020 +// +// 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 _StepKinematics_LinearFlexibleAndPlanarCurvePair_HeaderFile_ +#define _StepKinematics_LinearFlexibleAndPlanarCurvePair_HeaderFile_ + +#include +#include +#include + +#include +#include +#include +#include +#include + +DEFINE_STANDARD_HANDLE(StepKinematics_LinearFlexibleAndPlanarCurvePair, StepKinematics_HighOrderKinematicPair) + +//! Representation of STEP entity LinearFlexibleAndPlanarCurvePair +class StepKinematics_LinearFlexibleAndPlanarCurvePair : public StepKinematics_HighOrderKinematicPair +{ +public : + + //! default constructor + Standard_EXPORT StepKinematics_LinearFlexibleAndPlanarCurvePair(); + + //! Initialize all fields (own and inherited) + Standard_EXPORT void Init(const Handle(TCollection_HAsciiString)& theRepresentationItem_Name, + const Handle(TCollection_HAsciiString)& theItemDefinedTransformation_Name, + const Standard_Boolean hasItemDefinedTransformation_Description, + const Handle(TCollection_HAsciiString)& theItemDefinedTransformation_Description, + const Handle(StepRepr_RepresentationItem)& theItemDefinedTransformation_TransformItem1, + const Handle(StepRepr_RepresentationItem)& theItemDefinedTransformation_TransformItem2, + const Handle(StepKinematics_KinematicJoint)& theKinematicPair_Joint, + const Handle(StepGeom_Curve)& thePairCurve, + const Standard_Boolean theOrientation); + + //! Returns field PairCurve + Standard_EXPORT Handle(StepGeom_Curve) PairCurve() const; + //! Sets field PairCurve + Standard_EXPORT void SetPairCurve (const Handle(StepGeom_Curve)& thePairCurve); + + //! Returns field Orientation + Standard_EXPORT Standard_Boolean Orientation() const; + //! Sets field Orientation + Standard_EXPORT void SetOrientation (const Standard_Boolean theOrientation); + +DEFINE_STANDARD_RTTIEXT(StepKinematics_LinearFlexibleAndPlanarCurvePair, StepKinematics_HighOrderKinematicPair) + +private: + Handle(StepGeom_Curve) myPairCurve; + Standard_Boolean myOrientation; + +}; +#endif // _StepKinematics_LinearFlexibleAndPlanarCurvePair_HeaderFile_ diff --git a/src/StepKinematics/StepKinematics_LinearFlexibleLinkRepresentation.cxx b/src/StepKinematics/StepKinematics_LinearFlexibleLinkRepresentation.cxx new file mode 100644 index 0000000000..636017e759 --- /dev/null +++ b/src/StepKinematics/StepKinematics_LinearFlexibleLinkRepresentation.cxx @@ -0,0 +1,27 @@ +// Created on : Fri May 08 19:02:07 2020 +// Created by: Irina KRYLOVA +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V3.0 +// Copyright (c) Open CASCADE 2020 +// +// This file is part of Open CASCADE Technology software library. +// +// This library is free software; you can redistribute it and/or modify it under +// the terms of the GNU Lesser General Public License version 2.1 as published +// by the Free Software Foundation, with special exception defined in the file +// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT +// distribution for complete text of the license and disclaimer of any warranty. +// +// Alternatively, this file may be used under the terms of Open CASCADE +// commercial license or contractual agreement. + +#include + +IMPLEMENT_STANDARD_RTTIEXT(StepKinematics_LinearFlexibleLinkRepresentation, StepKinematics_KinematicLinkRepresentation) + +//======================================================================= +//function : StepKinematics_LinearFlexibleLinkRepresentation +//purpose : +//======================================================================= +StepKinematics_LinearFlexibleLinkRepresentation::StepKinematics_LinearFlexibleLinkRepresentation () +{ +} diff --git a/src/StepKinematics/StepKinematics_LinearFlexibleLinkRepresentation.hxx b/src/StepKinematics/StepKinematics_LinearFlexibleLinkRepresentation.hxx new file mode 100644 index 0000000000..de0a6c207b --- /dev/null +++ b/src/StepKinematics/StepKinematics_LinearFlexibleLinkRepresentation.hxx @@ -0,0 +1,42 @@ +// Created on : Fri May 08 19:02:07 2020 +// Created by: Irina KRYLOVA +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V3.0 +// Copyright (c) Open CASCADE 2020 +// +// 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 _StepKinematics_LinearFlexibleLinkRepresentation_HeaderFile_ +#define _StepKinematics_LinearFlexibleLinkRepresentation_HeaderFile_ + +#include +#include +#include + +#include +#include +#include +#include + +DEFINE_STANDARD_HANDLE(StepKinematics_LinearFlexibleLinkRepresentation, StepKinematics_KinematicLinkRepresentation) + +//! Representation of STEP entity LinearFlexibleLinkRepresentation +class StepKinematics_LinearFlexibleLinkRepresentation : public StepKinematics_KinematicLinkRepresentation +{ +public : + + //! default constructor + Standard_EXPORT StepKinematics_LinearFlexibleLinkRepresentation(); + +DEFINE_STANDARD_RTTIEXT(StepKinematics_LinearFlexibleLinkRepresentation, StepKinematics_KinematicLinkRepresentation) + +}; +#endif // _StepKinematics_LinearFlexibleLinkRepresentation_HeaderFile_ diff --git a/src/StepKinematics/StepKinematics_LowOrderKinematicPair.cxx b/src/StepKinematics/StepKinematics_LowOrderKinematicPair.cxx new file mode 100644 index 0000000000..237bcd558c --- /dev/null +++ b/src/StepKinematics/StepKinematics_LowOrderKinematicPair.cxx @@ -0,0 +1,174 @@ +// Created on : Sat May 02 12:41:15 2020 +// Created by: Irina KRYLOVA +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V3.0 +// Copyright (c) Open CASCADE 2020 +// +// This file is part of Open CASCADE Technology software library. +// +// This library is free software; you can redistribute it and/or modify it under +// the terms of the GNU Lesser General Public License version 2.1 as published +// by the Free Software Foundation, with special exception defined in the file +// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT +// distribution for complete text of the license and disclaimer of any warranty. +// +// Alternatively, this file may be used under the terms of Open CASCADE +// commercial license or contractual agreement. + +#include + +IMPLEMENT_STANDARD_RTTIEXT(StepKinematics_LowOrderKinematicPair, StepKinematics_KinematicPair) + +//======================================================================= +//function : StepKinematics_LowOrderKinematicPair +//purpose : +//======================================================================= +StepKinematics_LowOrderKinematicPair::StepKinematics_LowOrderKinematicPair () +{ +} + +//======================================================================= +//function : Init +//purpose : +//======================================================================= +void StepKinematics_LowOrderKinematicPair::Init (const Handle(TCollection_HAsciiString)& theRepresentationItem_Name, + const Handle(TCollection_HAsciiString)& theItemDefinedTransformation_Name, + const Standard_Boolean hasItemDefinedTransformation_Description, + const Handle(TCollection_HAsciiString)& theItemDefinedTransformation_Description, + const Handle(StepRepr_RepresentationItem)& theItemDefinedTransformation_TransformItem1, + const Handle(StepRepr_RepresentationItem)& theItemDefinedTransformation_TransformItem2, + const Handle(StepKinematics_KinematicJoint)& theKinematicPair_Joint, + const Standard_Boolean theTX, + const Standard_Boolean theTY, + const Standard_Boolean theTZ, + const Standard_Boolean theRX, + const Standard_Boolean theRY, + const Standard_Boolean theRZ) +{ + StepKinematics_KinematicPair::Init(theRepresentationItem_Name, + theItemDefinedTransformation_Name, + hasItemDefinedTransformation_Description, + theItemDefinedTransformation_Description, + theItemDefinedTransformation_TransformItem1, + theItemDefinedTransformation_TransformItem2, + theKinematicPair_Joint); + + myTX = theTX; + + myTY = theTY; + + myTZ = theTZ; + + myRX = theRX; + + myRY = theRY; + + myRZ = theRZ; +} + +//======================================================================= +//function : TX +//purpose : +//======================================================================= +Standard_Boolean StepKinematics_LowOrderKinematicPair::TX () const +{ + return myTX; +} + +//======================================================================= +//function : SetTX +//purpose : +//======================================================================= +void StepKinematics_LowOrderKinematicPair::SetTX (const Standard_Boolean theTX) +{ + myTX = theTX; +} + +//======================================================================= +//function : TY +//purpose : +//======================================================================= +Standard_Boolean StepKinematics_LowOrderKinematicPair::TY () const +{ + return myTY; +} + +//======================================================================= +//function : SetTY +//purpose : +//======================================================================= +void StepKinematics_LowOrderKinematicPair::SetTY (const Standard_Boolean theTY) +{ + myTY = theTY; +} + +//======================================================================= +//function : TZ +//purpose : +//======================================================================= +Standard_Boolean StepKinematics_LowOrderKinematicPair::TZ () const +{ + return myTZ; +} + +//======================================================================= +//function : SetTZ +//purpose : +//======================================================================= +void StepKinematics_LowOrderKinematicPair::SetTZ (const Standard_Boolean theTZ) +{ + myTZ = theTZ; +} + +//======================================================================= +//function : RX +//purpose : +//======================================================================= +Standard_Boolean StepKinematics_LowOrderKinematicPair::RX () const +{ + return myRX; +} + +//======================================================================= +//function : SetRX +//purpose : +//======================================================================= +void StepKinematics_LowOrderKinematicPair::SetRX (const Standard_Boolean theRX) +{ + myRX = theRX; +} + +//======================================================================= +//function : RY +//purpose : +//======================================================================= +Standard_Boolean StepKinematics_LowOrderKinematicPair::RY () const +{ + return myRY; +} + +//======================================================================= +//function : SetRY +//purpose : +//======================================================================= +void StepKinematics_LowOrderKinematicPair::SetRY (const Standard_Boolean theRY) +{ + myRY = theRY; +} + +//======================================================================= +//function : RZ +//purpose : +//======================================================================= +Standard_Boolean StepKinematics_LowOrderKinematicPair::RZ () const +{ + return myRZ; +} + +//======================================================================= +//function : SetRZ +//purpose : +//======================================================================= +void StepKinematics_LowOrderKinematicPair::SetRZ (const Standard_Boolean theRZ) +{ + myRZ = theRZ; +} diff --git a/src/StepKinematics/StepKinematics_LowOrderKinematicPair.hxx b/src/StepKinematics/StepKinematics_LowOrderKinematicPair.hxx new file mode 100644 index 0000000000..55ca99c5aa --- /dev/null +++ b/src/StepKinematics/StepKinematics_LowOrderKinematicPair.hxx @@ -0,0 +1,95 @@ +// Created on : Sat May 02 12:41:15 2020 +// Created by: Irina KRYLOVA +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V3.0 +// Copyright (c) Open CASCADE 2020 +// +// 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 _StepKinematics_LowOrderKinematicPair_HeaderFile_ +#define _StepKinematics_LowOrderKinematicPair_HeaderFile_ + +#include +#include +#include + +#include +#include +#include +#include + +DEFINE_STANDARD_HANDLE(StepKinematics_LowOrderKinematicPair, StepKinematics_KinematicPair) + +//! Representation of STEP entity LowOrderKinematicPair +class StepKinematics_LowOrderKinematicPair : public StepKinematics_KinematicPair +{ +public : + + //! default constructor + Standard_EXPORT StepKinematics_LowOrderKinematicPair(); + + //! Initialize all fields (own and inherited) + Standard_EXPORT void Init(const Handle(TCollection_HAsciiString)& theRepresentationItem_Name, + const Handle(TCollection_HAsciiString)& theItemDefinedTransformation_Name, + const Standard_Boolean hasItemDefinedTransformation_Description, + const Handle(TCollection_HAsciiString)& theItemDefinedTransformation_Description, + const Handle(StepRepr_RepresentationItem)& theItemDefinedTransformation_TransformItem1, + const Handle(StepRepr_RepresentationItem)& theItemDefinedTransformation_TransformItem2, + const Handle(StepKinematics_KinematicJoint)& theKinematicPair_Joint, + const Standard_Boolean theTX, + const Standard_Boolean theTY, + const Standard_Boolean theTZ, + const Standard_Boolean theRX, + const Standard_Boolean theRY, + const Standard_Boolean theRZ); + + //! Returns field TX + Standard_EXPORT Standard_Boolean TX() const; + //! Sets field TX + Standard_EXPORT void SetTX (const Standard_Boolean theTX); + + //! Returns field TY + Standard_EXPORT Standard_Boolean TY() const; + //! Sets field TY + Standard_EXPORT void SetTY (const Standard_Boolean theTY); + + //! Returns field TZ + Standard_EXPORT Standard_Boolean TZ() const; + //! Sets field TZ + Standard_EXPORT void SetTZ (const Standard_Boolean theTZ); + + //! Returns field RX + Standard_EXPORT Standard_Boolean RX() const; + //! Sets field RX + Standard_EXPORT void SetRX (const Standard_Boolean theRX); + + //! Returns field RY + Standard_EXPORT Standard_Boolean RY() const; + //! Sets field RY + Standard_EXPORT void SetRY (const Standard_Boolean theRY); + + //! Returns field RZ + Standard_EXPORT Standard_Boolean RZ() const; + //! Sets field RZ + Standard_EXPORT void SetRZ (const Standard_Boolean theRZ); + +DEFINE_STANDARD_RTTIEXT(StepKinematics_LowOrderKinematicPair, StepKinematics_KinematicPair) + +private: + Standard_Boolean myTX; + Standard_Boolean myTY; + Standard_Boolean myTZ; + Standard_Boolean myRX; + Standard_Boolean myRY; + Standard_Boolean myRZ; + +}; +#endif // _StepKinematics_LowOrderKinematicPair_HeaderFile_ diff --git a/src/StepKinematics/StepKinematics_LowOrderKinematicPairValue.cxx b/src/StepKinematics/StepKinematics_LowOrderKinematicPairValue.cxx new file mode 100644 index 0000000000..464e4e05c5 --- /dev/null +++ b/src/StepKinematics/StepKinematics_LowOrderKinematicPairValue.cxx @@ -0,0 +1,164 @@ +// Created on : Sat May 02 12:41:15 2020 +// Created by: Irina KRYLOVA +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V3.0 +// Copyright (c) Open CASCADE 2020 +// +// This file is part of Open CASCADE Technology software library. +// +// This library is free software; you can redistribute it and/or modify it under +// the terms of the GNU Lesser General Public License version 2.1 as published +// by the Free Software Foundation, with special exception defined in the file +// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT +// distribution for complete text of the license and disclaimer of any warranty. +// +// Alternatively, this file may be used under the terms of Open CASCADE +// commercial license or contractual agreement. + +#include + +IMPLEMENT_STANDARD_RTTIEXT(StepKinematics_LowOrderKinematicPairValue, StepKinematics_PairValue) + +//======================================================================= +//function : StepKinematics_LowOrderKinematicPairValue +//purpose : +//======================================================================= +StepKinematics_LowOrderKinematicPairValue::StepKinematics_LowOrderKinematicPairValue () +{ +} + +//======================================================================= +//function : Init +//purpose : +//======================================================================= +void StepKinematics_LowOrderKinematicPairValue::Init (const Handle(TCollection_HAsciiString)& theRepresentationItem_Name, + const Handle(StepKinematics_KinematicPair)& thePairValue_AppliesToPair, + const Standard_Real theActualTranslationX, + const Standard_Real theActualTranslationY, + const Standard_Real theActualTranslationZ, + const Standard_Real theActualRotationX, + const Standard_Real theActualRotationY, + const Standard_Real theActualRotationZ) +{ + StepKinematics_PairValue::Init(theRepresentationItem_Name, + thePairValue_AppliesToPair); + + myActualTranslationX = theActualTranslationX; + + myActualTranslationY = theActualTranslationY; + + myActualTranslationZ = theActualTranslationZ; + + myActualRotationX = theActualRotationX; + + myActualRotationY = theActualRotationY; + + myActualRotationZ = theActualRotationZ; +} + +//======================================================================= +//function : ActualTranslationX +//purpose : +//======================================================================= +Standard_Real StepKinematics_LowOrderKinematicPairValue::ActualTranslationX () const +{ + return myActualTranslationX; +} + +//======================================================================= +//function : SetActualTranslationX +//purpose : +//======================================================================= +void StepKinematics_LowOrderKinematicPairValue::SetActualTranslationX (const Standard_Real theActualTranslationX) +{ + myActualTranslationX = theActualTranslationX; +} + +//======================================================================= +//function : ActualTranslationY +//purpose : +//======================================================================= +Standard_Real StepKinematics_LowOrderKinematicPairValue::ActualTranslationY () const +{ + return myActualTranslationY; +} + +//======================================================================= +//function : SetActualTranslationY +//purpose : +//======================================================================= +void StepKinematics_LowOrderKinematicPairValue::SetActualTranslationY (const Standard_Real theActualTranslationY) +{ + myActualTranslationY = theActualTranslationY; +} + +//======================================================================= +//function : ActualTranslationZ +//purpose : +//======================================================================= +Standard_Real StepKinematics_LowOrderKinematicPairValue::ActualTranslationZ () const +{ + return myActualTranslationZ; +} + +//======================================================================= +//function : SetActualTranslationZ +//purpose : +//======================================================================= +void StepKinematics_LowOrderKinematicPairValue::SetActualTranslationZ (const Standard_Real theActualTranslationZ) +{ + myActualTranslationZ = theActualTranslationZ; +} + +//======================================================================= +//function : ActualRotationX +//purpose : +//======================================================================= +Standard_Real StepKinematics_LowOrderKinematicPairValue::ActualRotationX () const +{ + return myActualRotationX; +} + +//======================================================================= +//function : SetActualRotationX +//purpose : +//======================================================================= +void StepKinematics_LowOrderKinematicPairValue::SetActualRotationX (const Standard_Real theActualRotationX) +{ + myActualRotationX = theActualRotationX; +} + +//======================================================================= +//function : ActualRotationY +//purpose : +//======================================================================= +Standard_Real StepKinematics_LowOrderKinematicPairValue::ActualRotationY () const +{ + return myActualRotationY; +} + +//======================================================================= +//function : SetActualRotationY +//purpose : +//======================================================================= +void StepKinematics_LowOrderKinematicPairValue::SetActualRotationY (const Standard_Real theActualRotationY) +{ + myActualRotationY = theActualRotationY; +} + +//======================================================================= +//function : ActualRotationZ +//purpose : +//======================================================================= +Standard_Real StepKinematics_LowOrderKinematicPairValue::ActualRotationZ () const +{ + return myActualRotationZ; +} + +//======================================================================= +//function : SetActualRotationZ +//purpose : +//======================================================================= +void StepKinematics_LowOrderKinematicPairValue::SetActualRotationZ (const Standard_Real theActualRotationZ) +{ + myActualRotationZ = theActualRotationZ; +} diff --git a/src/StepKinematics/StepKinematics_LowOrderKinematicPairValue.hxx b/src/StepKinematics/StepKinematics_LowOrderKinematicPairValue.hxx new file mode 100644 index 0000000000..0591a3a1d6 --- /dev/null +++ b/src/StepKinematics/StepKinematics_LowOrderKinematicPairValue.hxx @@ -0,0 +1,88 @@ +// Created on : Sat May 02 12:41:15 2020 +// Created by: Irina KRYLOVA +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V3.0 +// Copyright (c) Open CASCADE 2020 +// +// 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 _StepKinematics_LowOrderKinematicPairValue_HeaderFile_ +#define _StepKinematics_LowOrderKinematicPairValue_HeaderFile_ + +#include +#include +#include + +#include +#include + +DEFINE_STANDARD_HANDLE(StepKinematics_LowOrderKinematicPairValue, StepKinematics_PairValue) + +//! Representation of STEP entity LowOrderKinematicPairValue +class StepKinematics_LowOrderKinematicPairValue : public StepKinematics_PairValue +{ +public : + + //! default constructor + Standard_EXPORT StepKinematics_LowOrderKinematicPairValue(); + + //! Initialize all fields (own and inherited) + Standard_EXPORT void Init(const Handle(TCollection_HAsciiString)& theRepresentationItem_Name, + const Handle(StepKinematics_KinematicPair)& thePairValue_AppliesToPair, + const Standard_Real theActualTranslationX, + const Standard_Real theActualTranslationY, + const Standard_Real theActualTranslationZ, + const Standard_Real theActualRotationX, + const Standard_Real theActualRotationY, + const Standard_Real theActualRotationZ); + + //! Returns field ActualTranslationX + Standard_EXPORT Standard_Real ActualTranslationX() const; + //! Sets field ActualTranslationX + Standard_EXPORT void SetActualTranslationX (const Standard_Real theActualTranslationX); + + //! Returns field ActualTranslationY + Standard_EXPORT Standard_Real ActualTranslationY() const; + //! Sets field ActualTranslationY + Standard_EXPORT void SetActualTranslationY (const Standard_Real theActualTranslationY); + + //! Returns field ActualTranslationZ + Standard_EXPORT Standard_Real ActualTranslationZ() const; + //! Sets field ActualTranslationZ + Standard_EXPORT void SetActualTranslationZ (const Standard_Real theActualTranslationZ); + + //! Returns field ActualRotationX + Standard_EXPORT Standard_Real ActualRotationX() const; + //! Sets field ActualRotationX + Standard_EXPORT void SetActualRotationX (const Standard_Real theActualRotationX); + + //! Returns field ActualRotationY + Standard_EXPORT Standard_Real ActualRotationY() const; + //! Sets field ActualRotationY + Standard_EXPORT void SetActualRotationY (const Standard_Real theActualRotationY); + + //! Returns field ActualRotationZ + Standard_EXPORT Standard_Real ActualRotationZ() const; + //! Sets field ActualRotationZ + Standard_EXPORT void SetActualRotationZ (const Standard_Real theActualRotationZ); + +DEFINE_STANDARD_RTTIEXT(StepKinematics_LowOrderKinematicPairValue, StepKinematics_PairValue) + +private: + Standard_Real myActualTranslationX; + Standard_Real myActualTranslationY; + Standard_Real myActualTranslationZ; + Standard_Real myActualRotationX; + Standard_Real myActualRotationY; + Standard_Real myActualRotationZ; + +}; +#endif // _StepKinematics_LowOrderKinematicPairValue_HeaderFile_ diff --git a/src/StepKinematics/StepKinematics_LowOrderKinematicPairWithMotionCoupling.cxx b/src/StepKinematics/StepKinematics_LowOrderKinematicPairWithMotionCoupling.cxx new file mode 100644 index 0000000000..1fe2071302 --- /dev/null +++ b/src/StepKinematics/StepKinematics_LowOrderKinematicPairWithMotionCoupling.cxx @@ -0,0 +1,27 @@ +// Created on : Sat May 02 12:41:15 2020 +// Created by: Irina KRYLOVA +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V3.0 +// Copyright (c) Open CASCADE 2020 +// +// This file is part of Open CASCADE Technology software library. +// +// This library is free software; you can redistribute it and/or modify it under +// the terms of the GNU Lesser General Public License version 2.1 as published +// by the Free Software Foundation, with special exception defined in the file +// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT +// distribution for complete text of the license and disclaimer of any warranty. +// +// Alternatively, this file may be used under the terms of Open CASCADE +// commercial license or contractual agreement. + +#include + +IMPLEMENT_STANDARD_RTTIEXT(StepKinematics_LowOrderKinematicPairWithMotionCoupling, StepKinematics_KinematicPair) + +//======================================================================= +//function : StepKinematics_LowOrderKinematicPairWithMotionCoupling +//purpose : +//======================================================================= +StepKinematics_LowOrderKinematicPairWithMotionCoupling::StepKinematics_LowOrderKinematicPairWithMotionCoupling () +{ +} diff --git a/src/StepKinematics/StepKinematics_LowOrderKinematicPairWithMotionCoupling.hxx b/src/StepKinematics/StepKinematics_LowOrderKinematicPairWithMotionCoupling.hxx new file mode 100644 index 0000000000..d85ecc64fc --- /dev/null +++ b/src/StepKinematics/StepKinematics_LowOrderKinematicPairWithMotionCoupling.hxx @@ -0,0 +1,42 @@ +// Created on : Sat May 02 12:41:15 2020 +// Created by: Irina KRYLOVA +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V3.0 +// Copyright (c) Open CASCADE 2020 +// +// 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 _StepKinematics_LowOrderKinematicPairWithMotionCoupling_HeaderFile_ +#define _StepKinematics_LowOrderKinematicPairWithMotionCoupling_HeaderFile_ + +#include +#include +#include + +#include +#include +#include +#include + +DEFINE_STANDARD_HANDLE(StepKinematics_LowOrderKinematicPairWithMotionCoupling, StepKinematics_KinematicPair) + +//! Representation of STEP entity LowOrderKinematicPairWithMotionCoupling +class StepKinematics_LowOrderKinematicPairWithMotionCoupling : public StepKinematics_KinematicPair +{ +public : + + //! default constructor + Standard_EXPORT StepKinematics_LowOrderKinematicPairWithMotionCoupling(); + +DEFINE_STANDARD_RTTIEXT(StepKinematics_LowOrderKinematicPairWithMotionCoupling, StepKinematics_KinematicPair) + +}; +#endif // _StepKinematics_LowOrderKinematicPairWithMotionCoupling_HeaderFile_ diff --git a/src/StepKinematics/StepKinematics_LowOrderKinematicPairWithRange.cxx b/src/StepKinematics/StepKinematics_LowOrderKinematicPairWithRange.cxx new file mode 100644 index 0000000000..277303707b --- /dev/null +++ b/src/StepKinematics/StepKinematics_LowOrderKinematicPairWithRange.cxx @@ -0,0 +1,492 @@ +// Created on : Sat May 02 12:41:15 2020 +// Created by: Irina KRYLOVA +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V3.0 +// Copyright (c) Open CASCADE 2020 +// +// This file is part of Open CASCADE Technology software library. +// +// This library is free software; you can redistribute it and/or modify it under +// the terms of the GNU Lesser General Public License version 2.1 as published +// by the Free Software Foundation, with special exception defined in the file +// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT +// distribution for complete text of the license and disclaimer of any warranty. +// +// Alternatively, this file may be used under the terms of Open CASCADE +// commercial license or contractual agreement. + +#include + +IMPLEMENT_STANDARD_RTTIEXT(StepKinematics_LowOrderKinematicPairWithRange, StepKinematics_LowOrderKinematicPair) + +//======================================================================= +//function : StepKinematics_LowOrderKinematicPairWithRange +//purpose : +//======================================================================= +StepKinematics_LowOrderKinematicPairWithRange::StepKinematics_LowOrderKinematicPairWithRange () +{ + defLowerLimitActualRotationX = Standard_False; + defUpperLimitActualRotationX = Standard_False; + defLowerLimitActualRotationY = Standard_False; + defUpperLimitActualRotationY = Standard_False; + defLowerLimitActualRotationZ = Standard_False; + defUpperLimitActualRotationZ = Standard_False; + defLowerLimitActualTranslationX = Standard_False; + defUpperLimitActualTranslationX = Standard_False; + defLowerLimitActualTranslationY = Standard_False; + defUpperLimitActualTranslationY = Standard_False; + defLowerLimitActualTranslationZ = Standard_False; + defUpperLimitActualTranslationZ = Standard_False; +} + +//======================================================================= +//function : Init +//purpose : +//======================================================================= +void StepKinematics_LowOrderKinematicPairWithRange::Init (const Handle(TCollection_HAsciiString)& theRepresentationItem_Name, + const Handle(TCollection_HAsciiString)& theItemDefinedTransformation_Name, + const Standard_Boolean hasItemDefinedTransformation_Description, + const Handle(TCollection_HAsciiString)& theItemDefinedTransformation_Description, + const Handle(StepRepr_RepresentationItem)& theItemDefinedTransformation_TransformItem1, + const Handle(StepRepr_RepresentationItem)& theItemDefinedTransformation_TransformItem2, + const Handle(StepKinematics_KinematicJoint)& theKinematicPair_Joint, + const Standard_Boolean theLowOrderKinematicPair_TX, + const Standard_Boolean theLowOrderKinematicPair_TY, + const Standard_Boolean theLowOrderKinematicPair_TZ, + const Standard_Boolean theLowOrderKinematicPair_RX, + const Standard_Boolean theLowOrderKinematicPair_RY, + const Standard_Boolean theLowOrderKinematicPair_RZ, + const Standard_Boolean hasLowerLimitActualRotationX, + const Standard_Real theLowerLimitActualRotationX, + const Standard_Boolean hasUpperLimitActualRotationX, + const Standard_Real theUpperLimitActualRotationX, + const Standard_Boolean hasLowerLimitActualRotationY, + const Standard_Real theLowerLimitActualRotationY, + const Standard_Boolean hasUpperLimitActualRotationY, + const Standard_Real theUpperLimitActualRotationY, + const Standard_Boolean hasLowerLimitActualRotationZ, + const Standard_Real theLowerLimitActualRotationZ, + const Standard_Boolean hasUpperLimitActualRotationZ, + const Standard_Real theUpperLimitActualRotationZ, + const Standard_Boolean hasLowerLimitActualTranslationX, + const Standard_Real theLowerLimitActualTranslationX, + const Standard_Boolean hasUpperLimitActualTranslationX, + const Standard_Real theUpperLimitActualTranslationX, + const Standard_Boolean hasLowerLimitActualTranslationY, + const Standard_Real theLowerLimitActualTranslationY, + const Standard_Boolean hasUpperLimitActualTranslationY, + const Standard_Real theUpperLimitActualTranslationY, + const Standard_Boolean hasLowerLimitActualTranslationZ, + const Standard_Real theLowerLimitActualTranslationZ, + const Standard_Boolean hasUpperLimitActualTranslationZ, + const Standard_Real theUpperLimitActualTranslationZ) +{ + StepKinematics_LowOrderKinematicPair::Init(theRepresentationItem_Name, + theItemDefinedTransformation_Name, + hasItemDefinedTransformation_Description, + theItemDefinedTransformation_Description, + theItemDefinedTransformation_TransformItem1, + theItemDefinedTransformation_TransformItem2, + theKinematicPair_Joint, + theLowOrderKinematicPair_TX, + theLowOrderKinematicPair_TY, + theLowOrderKinematicPair_TZ, + theLowOrderKinematicPair_RX, + theLowOrderKinematicPair_RY, + theLowOrderKinematicPair_RZ); + + defLowerLimitActualRotationX = hasLowerLimitActualRotationX; + if (defLowerLimitActualRotationX) { + myLowerLimitActualRotationX = theLowerLimitActualRotationX; + } + else myLowerLimitActualRotationX = 0; + + defUpperLimitActualRotationX = hasUpperLimitActualRotationX; + if (defUpperLimitActualRotationX) { + myUpperLimitActualRotationX = theUpperLimitActualRotationX; + } + else myUpperLimitActualRotationX = 0; + + defLowerLimitActualRotationY = hasLowerLimitActualRotationY; + if (defLowerLimitActualRotationY) { + myLowerLimitActualRotationY = theLowerLimitActualRotationY; + } + else myLowerLimitActualRotationY = 0; + + defUpperLimitActualRotationY = hasUpperLimitActualRotationY; + if (defUpperLimitActualRotationY) { + myUpperLimitActualRotationY = theUpperLimitActualRotationY; + } + else myUpperLimitActualRotationY = 0; + + defLowerLimitActualRotationZ = hasLowerLimitActualRotationZ; + if (defLowerLimitActualRotationZ) { + myLowerLimitActualRotationZ = theLowerLimitActualRotationZ; + } + else myLowerLimitActualRotationZ = 0; + + defUpperLimitActualRotationZ = hasUpperLimitActualRotationZ; + if (defUpperLimitActualRotationZ) { + myUpperLimitActualRotationZ = theUpperLimitActualRotationZ; + } + else myUpperLimitActualRotationZ = 0; + + defLowerLimitActualTranslationX = hasLowerLimitActualTranslationX; + if (defLowerLimitActualTranslationX) { + myLowerLimitActualTranslationX = theLowerLimitActualTranslationX; + } + else myLowerLimitActualTranslationX = 0; + + defUpperLimitActualTranslationX = hasUpperLimitActualTranslationX; + if (defUpperLimitActualTranslationX) { + myUpperLimitActualTranslationX = theUpperLimitActualTranslationX; + } + else myUpperLimitActualTranslationX = 0; + + defLowerLimitActualTranslationY = hasLowerLimitActualTranslationY; + if (defLowerLimitActualTranslationY) { + myLowerLimitActualTranslationY = theLowerLimitActualTranslationY; + } + else myLowerLimitActualTranslationY = 0; + + defUpperLimitActualTranslationY = hasUpperLimitActualTranslationY; + if (defUpperLimitActualTranslationY) { + myUpperLimitActualTranslationY = theUpperLimitActualTranslationY; + } + else myUpperLimitActualTranslationY = 0; + + defLowerLimitActualTranslationZ = hasLowerLimitActualTranslationZ; + if (defLowerLimitActualTranslationZ) { + myLowerLimitActualTranslationZ = theLowerLimitActualTranslationZ; + } + else myLowerLimitActualTranslationZ = 0; + + defUpperLimitActualTranslationZ = hasUpperLimitActualTranslationZ; + if (defUpperLimitActualTranslationZ) { + myUpperLimitActualTranslationZ = theUpperLimitActualTranslationZ; + } + else myUpperLimitActualTranslationZ = 0; +} + +//======================================================================= +//function : LowerLimitActualRotationX +//purpose : +//======================================================================= +Standard_Real StepKinematics_LowOrderKinematicPairWithRange::LowerLimitActualRotationX () const +{ + return myLowerLimitActualRotationX; +} + +//======================================================================= +//function : SetLowerLimitActualRotationX +//purpose : +//======================================================================= +void StepKinematics_LowOrderKinematicPairWithRange::SetLowerLimitActualRotationX (const Standard_Real theLowerLimitActualRotationX) +{ + myLowerLimitActualRotationX = theLowerLimitActualRotationX; +} + +//======================================================================= +//function : HasLowerLimitActualRotationX +//purpose : +//======================================================================= +Standard_Boolean StepKinematics_LowOrderKinematicPairWithRange::HasLowerLimitActualRotationX () const +{ + return defLowerLimitActualRotationX; +} + +//======================================================================= +//function : UpperLimitActualRotationX +//purpose : +//======================================================================= +Standard_Real StepKinematics_LowOrderKinematicPairWithRange::UpperLimitActualRotationX () const +{ + return myUpperLimitActualRotationX; +} + +//======================================================================= +//function : SetUpperLimitActualRotationX +//purpose : +//======================================================================= +void StepKinematics_LowOrderKinematicPairWithRange::SetUpperLimitActualRotationX (const Standard_Real theUpperLimitActualRotationX) +{ + myUpperLimitActualRotationX = theUpperLimitActualRotationX; +} + +//======================================================================= +//function : HasUpperLimitActualRotationX +//purpose : +//======================================================================= +Standard_Boolean StepKinematics_LowOrderKinematicPairWithRange::HasUpperLimitActualRotationX () const +{ + return defUpperLimitActualRotationX; +} + +//======================================================================= +//function : LowerLimitActualRotationY +//purpose : +//======================================================================= +Standard_Real StepKinematics_LowOrderKinematicPairWithRange::LowerLimitActualRotationY () const +{ + return myLowerLimitActualRotationY; +} + +//======================================================================= +//function : SetLowerLimitActualRotationY +//purpose : +//======================================================================= +void StepKinematics_LowOrderKinematicPairWithRange::SetLowerLimitActualRotationY (const Standard_Real theLowerLimitActualRotationY) +{ + myLowerLimitActualRotationY = theLowerLimitActualRotationY; +} + +//======================================================================= +//function : HasLowerLimitActualRotationY +//purpose : +//======================================================================= +Standard_Boolean StepKinematics_LowOrderKinematicPairWithRange::HasLowerLimitActualRotationY () const +{ + return defLowerLimitActualRotationY; +} + +//======================================================================= +//function : UpperLimitActualRotationY +//purpose : +//======================================================================= +Standard_Real StepKinematics_LowOrderKinematicPairWithRange::UpperLimitActualRotationY () const +{ + return myUpperLimitActualRotationY; +} + +//======================================================================= +//function : SetUpperLimitActualRotationY +//purpose : +//======================================================================= +void StepKinematics_LowOrderKinematicPairWithRange::SetUpperLimitActualRotationY (const Standard_Real theUpperLimitActualRotationY) +{ + myUpperLimitActualRotationY = theUpperLimitActualRotationY; +} + +//======================================================================= +//function : HasUpperLimitActualRotationY +//purpose : +//======================================================================= +Standard_Boolean StepKinematics_LowOrderKinematicPairWithRange::HasUpperLimitActualRotationY () const +{ + return defUpperLimitActualRotationY; +} + +//======================================================================= +//function : LowerLimitActualRotationZ +//purpose : +//======================================================================= +Standard_Real StepKinematics_LowOrderKinematicPairWithRange::LowerLimitActualRotationZ () const +{ + return myLowerLimitActualRotationZ; +} + +//======================================================================= +//function : SetLowerLimitActualRotationZ +//purpose : +//======================================================================= +void StepKinematics_LowOrderKinematicPairWithRange::SetLowerLimitActualRotationZ (const Standard_Real theLowerLimitActualRotationZ) +{ + myLowerLimitActualRotationZ = theLowerLimitActualRotationZ; +} + +//======================================================================= +//function : HasLowerLimitActualRotationZ +//purpose : +//======================================================================= +Standard_Boolean StepKinematics_LowOrderKinematicPairWithRange::HasLowerLimitActualRotationZ () const +{ + return defLowerLimitActualRotationZ; +} + +//======================================================================= +//function : UpperLimitActualRotationZ +//purpose : +//======================================================================= +Standard_Real StepKinematics_LowOrderKinematicPairWithRange::UpperLimitActualRotationZ () const +{ + return myUpperLimitActualRotationZ; +} + +//======================================================================= +//function : SetUpperLimitActualRotationZ +//purpose : +//======================================================================= +void StepKinematics_LowOrderKinematicPairWithRange::SetUpperLimitActualRotationZ (const Standard_Real theUpperLimitActualRotationZ) +{ + myUpperLimitActualRotationZ = theUpperLimitActualRotationZ; +} + +//======================================================================= +//function : HasUpperLimitActualRotationZ +//purpose : +//======================================================================= +Standard_Boolean StepKinematics_LowOrderKinematicPairWithRange::HasUpperLimitActualRotationZ () const +{ + return defUpperLimitActualRotationZ; +} + +//======================================================================= +//function : LowerLimitActualTranslationX +//purpose : +//======================================================================= +Standard_Real StepKinematics_LowOrderKinematicPairWithRange::LowerLimitActualTranslationX () const +{ + return myLowerLimitActualTranslationX; +} + +//======================================================================= +//function : SetLowerLimitActualTranslationX +//purpose : +//======================================================================= +void StepKinematics_LowOrderKinematicPairWithRange::SetLowerLimitActualTranslationX (const Standard_Real theLowerLimitActualTranslationX) +{ + myLowerLimitActualTranslationX = theLowerLimitActualTranslationX; +} + +//======================================================================= +//function : HasLowerLimitActualTranslationX +//purpose : +//======================================================================= +Standard_Boolean StepKinematics_LowOrderKinematicPairWithRange::HasLowerLimitActualTranslationX () const +{ + return defLowerLimitActualTranslationX; +} + +//======================================================================= +//function : UpperLimitActualTranslationX +//purpose : +//======================================================================= +Standard_Real StepKinematics_LowOrderKinematicPairWithRange::UpperLimitActualTranslationX () const +{ + return myUpperLimitActualTranslationX; +} + +//======================================================================= +//function : SetUpperLimitActualTranslationX +//purpose : +//======================================================================= +void StepKinematics_LowOrderKinematicPairWithRange::SetUpperLimitActualTranslationX (const Standard_Real theUpperLimitActualTranslationX) +{ + myUpperLimitActualTranslationX = theUpperLimitActualTranslationX; +} + +//======================================================================= +//function : HasUpperLimitActualTranslationX +//purpose : +//======================================================================= +Standard_Boolean StepKinematics_LowOrderKinematicPairWithRange::HasUpperLimitActualTranslationX () const +{ + return defUpperLimitActualTranslationX; +} + +//======================================================================= +//function : LowerLimitActualTranslationY +//purpose : +//======================================================================= +Standard_Real StepKinematics_LowOrderKinematicPairWithRange::LowerLimitActualTranslationY () const +{ + return myLowerLimitActualTranslationY; +} + +//======================================================================= +//function : SetLowerLimitActualTranslationY +//purpose : +//======================================================================= +void StepKinematics_LowOrderKinematicPairWithRange::SetLowerLimitActualTranslationY (const Standard_Real theLowerLimitActualTranslationY) +{ + myLowerLimitActualTranslationY = theLowerLimitActualTranslationY; +} + +//======================================================================= +//function : HasLowerLimitActualTranslationY +//purpose : +//======================================================================= +Standard_Boolean StepKinematics_LowOrderKinematicPairWithRange::HasLowerLimitActualTranslationY () const +{ + return defLowerLimitActualTranslationY; +} + +//======================================================================= +//function : UpperLimitActualTranslationY +//purpose : +//======================================================================= +Standard_Real StepKinematics_LowOrderKinematicPairWithRange::UpperLimitActualTranslationY () const +{ + return myUpperLimitActualTranslationY; +} + +//======================================================================= +//function : SetUpperLimitActualTranslationY +//purpose : +//======================================================================= +void StepKinematics_LowOrderKinematicPairWithRange::SetUpperLimitActualTranslationY (const Standard_Real theUpperLimitActualTranslationY) +{ + myUpperLimitActualTranslationY = theUpperLimitActualTranslationY; +} + +//======================================================================= +//function : HasUpperLimitActualTranslationY +//purpose : +//======================================================================= +Standard_Boolean StepKinematics_LowOrderKinematicPairWithRange::HasUpperLimitActualTranslationY () const +{ + return defUpperLimitActualTranslationY; +} + +//======================================================================= +//function : LowerLimitActualTranslationZ +//purpose : +//======================================================================= +Standard_Real StepKinematics_LowOrderKinematicPairWithRange::LowerLimitActualTranslationZ () const +{ + return myLowerLimitActualTranslationZ; +} + +//======================================================================= +//function : SetLowerLimitActualTranslationZ +//purpose : +//======================================================================= +void StepKinematics_LowOrderKinematicPairWithRange::SetLowerLimitActualTranslationZ (const Standard_Real theLowerLimitActualTranslationZ) +{ + myLowerLimitActualTranslationZ = theLowerLimitActualTranslationZ; +} + +//======================================================================= +//function : HasLowerLimitActualTranslationZ +//purpose : +//======================================================================= +Standard_Boolean StepKinematics_LowOrderKinematicPairWithRange::HasLowerLimitActualTranslationZ () const +{ + return defLowerLimitActualTranslationZ; +} + +//======================================================================= +//function : UpperLimitActualTranslationZ +//purpose : +//======================================================================= +Standard_Real StepKinematics_LowOrderKinematicPairWithRange::UpperLimitActualTranslationZ () const +{ + return myUpperLimitActualTranslationZ; +} + +//======================================================================= +//function : SetUpperLimitActualTranslationZ +//purpose : +//======================================================================= +void StepKinematics_LowOrderKinematicPairWithRange::SetUpperLimitActualTranslationZ (const Standard_Real theUpperLimitActualTranslationZ) +{ + myUpperLimitActualTranslationZ = theUpperLimitActualTranslationZ; +} + +//======================================================================= +//function : HasUpperLimitActualTranslationZ +//purpose : +//======================================================================= +Standard_Boolean StepKinematics_LowOrderKinematicPairWithRange::HasUpperLimitActualTranslationZ () const +{ + return defUpperLimitActualTranslationZ; +} diff --git a/src/StepKinematics/StepKinematics_LowOrderKinematicPairWithRange.hxx b/src/StepKinematics/StepKinematics_LowOrderKinematicPairWithRange.hxx new file mode 100644 index 0000000000..f715290773 --- /dev/null +++ b/src/StepKinematics/StepKinematics_LowOrderKinematicPairWithRange.hxx @@ -0,0 +1,191 @@ +// Created on : Sat May 02 12:41:15 2020 +// Created by: Irina KRYLOVA +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V3.0 +// Copyright (c) Open CASCADE 2020 +// +// 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 _StepKinematics_LowOrderKinematicPairWithRange_HeaderFile_ +#define _StepKinematics_LowOrderKinematicPairWithRange_HeaderFile_ + +#include +#include +#include + +#include +#include +#include +#include + +DEFINE_STANDARD_HANDLE(StepKinematics_LowOrderKinematicPairWithRange, StepKinematics_LowOrderKinematicPair) + +//! Representation of STEP entity LowOrderKinematicPairWithRange +class StepKinematics_LowOrderKinematicPairWithRange : public StepKinematics_LowOrderKinematicPair +{ +public : + + //! default constructor + Standard_EXPORT StepKinematics_LowOrderKinematicPairWithRange(); + + //! Initialize all fields (own and inherited) + Standard_EXPORT void Init(const Handle(TCollection_HAsciiString)& theRepresentationItem_Name, + const Handle(TCollection_HAsciiString)& theItemDefinedTransformation_Name, + const Standard_Boolean hasItemDefinedTransformation_Description, + const Handle(TCollection_HAsciiString)& theItemDefinedTransformation_Description, + const Handle(StepRepr_RepresentationItem)& theItemDefinedTransformation_TransformItem1, + const Handle(StepRepr_RepresentationItem)& theItemDefinedTransformation_TransformItem2, + const Handle(StepKinematics_KinematicJoint)& theKinematicPair_Joint, + const Standard_Boolean theLowOrderKinematicPair_TX, + const Standard_Boolean theLowOrderKinematicPair_TY, + const Standard_Boolean theLowOrderKinematicPair_TZ, + const Standard_Boolean theLowOrderKinematicPair_RX, + const Standard_Boolean theLowOrderKinematicPair_RY, + const Standard_Boolean theLowOrderKinematicPair_RZ, + const Standard_Boolean hasLowerLimitActualRotationX, + const Standard_Real theLowerLimitActualRotationX, + const Standard_Boolean hasUpperLimitActualRotationX, + const Standard_Real theUpperLimitActualRotationX, + const Standard_Boolean hasLowerLimitActualRotationY, + const Standard_Real theLowerLimitActualRotationY, + const Standard_Boolean hasUpperLimitActualRotationY, + const Standard_Real theUpperLimitActualRotationY, + const Standard_Boolean hasLowerLimitActualRotationZ, + const Standard_Real theLowerLimitActualRotationZ, + const Standard_Boolean hasUpperLimitActualRotationZ, + const Standard_Real theUpperLimitActualRotationZ, + const Standard_Boolean hasLowerLimitActualTranslationX, + const Standard_Real theLowerLimitActualTranslationX, + const Standard_Boolean hasUpperLimitActualTranslationX, + const Standard_Real theUpperLimitActualTranslationX, + const Standard_Boolean hasLowerLimitActualTranslationY, + const Standard_Real theLowerLimitActualTranslationY, + const Standard_Boolean hasUpperLimitActualTranslationY, + const Standard_Real theUpperLimitActualTranslationY, + const Standard_Boolean hasLowerLimitActualTranslationZ, + const Standard_Real theLowerLimitActualTranslationZ, + const Standard_Boolean hasUpperLimitActualTranslationZ, + const Standard_Real theUpperLimitActualTranslationZ); + + //! Returns field LowerLimitActualRotationX + Standard_EXPORT Standard_Real LowerLimitActualRotationX() const; + //! Sets field LowerLimitActualRotationX + Standard_EXPORT void SetLowerLimitActualRotationX (const Standard_Real theLowerLimitActualRotationX); + //! Returns True if optional field LowerLimitActualRotationX is defined + Standard_EXPORT Standard_Boolean HasLowerLimitActualRotationX() const; + + //! Returns field UpperLimitActualRotationX + Standard_EXPORT Standard_Real UpperLimitActualRotationX() const; + //! Sets field UpperLimitActualRotationX + Standard_EXPORT void SetUpperLimitActualRotationX (const Standard_Real theUpperLimitActualRotationX); + //! Returns True if optional field UpperLimitActualRotationX is defined + Standard_EXPORT Standard_Boolean HasUpperLimitActualRotationX() const; + + //! Returns field LowerLimitActualRotationY + Standard_EXPORT Standard_Real LowerLimitActualRotationY() const; + //! Sets field LowerLimitActualRotationY + Standard_EXPORT void SetLowerLimitActualRotationY (const Standard_Real theLowerLimitActualRotationY); + //! Returns True if optional field LowerLimitActualRotationY is defined + Standard_EXPORT Standard_Boolean HasLowerLimitActualRotationY() const; + + //! Returns field UpperLimitActualRotationY + Standard_EXPORT Standard_Real UpperLimitActualRotationY() const; + //! Sets field UpperLimitActualRotationY + Standard_EXPORT void SetUpperLimitActualRotationY (const Standard_Real theUpperLimitActualRotationY); + //! Returns True if optional field UpperLimitActualRotationY is defined + Standard_EXPORT Standard_Boolean HasUpperLimitActualRotationY() const; + + //! Returns field LowerLimitActualRotationZ + Standard_EXPORT Standard_Real LowerLimitActualRotationZ() const; + //! Sets field LowerLimitActualRotationZ + Standard_EXPORT void SetLowerLimitActualRotationZ (const Standard_Real theLowerLimitActualRotationZ); + //! Returns True if optional field LowerLimitActualRotationZ is defined + Standard_EXPORT Standard_Boolean HasLowerLimitActualRotationZ() const; + + //! Returns field UpperLimitActualRotationZ + Standard_EXPORT Standard_Real UpperLimitActualRotationZ() const; + //! Sets field UpperLimitActualRotationZ + Standard_EXPORT void SetUpperLimitActualRotationZ (const Standard_Real theUpperLimitActualRotationZ); + //! Returns True if optional field UpperLimitActualRotationZ is defined + Standard_EXPORT Standard_Boolean HasUpperLimitActualRotationZ() const; + + //! Returns field LowerLimitActualTranslationX + Standard_EXPORT Standard_Real LowerLimitActualTranslationX() const; + //! Sets field LowerLimitActualTranslationX + Standard_EXPORT void SetLowerLimitActualTranslationX (const Standard_Real theLowerLimitActualTranslationX); + //! Returns True if optional field LowerLimitActualTranslationX is defined + Standard_EXPORT Standard_Boolean HasLowerLimitActualTranslationX() const; + + //! Returns field UpperLimitActualTranslationX + Standard_EXPORT Standard_Real UpperLimitActualTranslationX() const; + //! Sets field UpperLimitActualTranslationX + Standard_EXPORT void SetUpperLimitActualTranslationX (const Standard_Real theUpperLimitActualTranslationX); + //! Returns True if optional field UpperLimitActualTranslationX is defined + Standard_EXPORT Standard_Boolean HasUpperLimitActualTranslationX() const; + + //! Returns field LowerLimitActualTranslationY + Standard_EXPORT Standard_Real LowerLimitActualTranslationY() const; + //! Sets field LowerLimitActualTranslationY + Standard_EXPORT void SetLowerLimitActualTranslationY (const Standard_Real theLowerLimitActualTranslationY); + //! Returns True if optional field LowerLimitActualTranslationY is defined + Standard_EXPORT Standard_Boolean HasLowerLimitActualTranslationY() const; + + //! Returns field UpperLimitActualTranslationY + Standard_EXPORT Standard_Real UpperLimitActualTranslationY() const; + //! Sets field UpperLimitActualTranslationY + Standard_EXPORT void SetUpperLimitActualTranslationY (const Standard_Real theUpperLimitActualTranslationY); + //! Returns True if optional field UpperLimitActualTranslationY is defined + Standard_EXPORT Standard_Boolean HasUpperLimitActualTranslationY() const; + + //! Returns field LowerLimitActualTranslationZ + Standard_EXPORT Standard_Real LowerLimitActualTranslationZ() const; + //! Sets field LowerLimitActualTranslationZ + Standard_EXPORT void SetLowerLimitActualTranslationZ (const Standard_Real theLowerLimitActualTranslationZ); + //! Returns True if optional field LowerLimitActualTranslationZ is defined + Standard_EXPORT Standard_Boolean HasLowerLimitActualTranslationZ() const; + + //! Returns field UpperLimitActualTranslationZ + Standard_EXPORT Standard_Real UpperLimitActualTranslationZ() const; + //! Sets field UpperLimitActualTranslationZ + Standard_EXPORT void SetUpperLimitActualTranslationZ (const Standard_Real theUpperLimitActualTranslationZ); + //! Returns True if optional field UpperLimitActualTranslationZ is defined + Standard_EXPORT Standard_Boolean HasUpperLimitActualTranslationZ() const; + +DEFINE_STANDARD_RTTIEXT(StepKinematics_LowOrderKinematicPairWithRange, StepKinematics_LowOrderKinematicPair) + +private: + Standard_Real myLowerLimitActualRotationX; //!< optional + Standard_Real myUpperLimitActualRotationX; //!< optional + Standard_Real myLowerLimitActualRotationY; //!< optional + Standard_Real myUpperLimitActualRotationY; //!< optional + Standard_Real myLowerLimitActualRotationZ; //!< optional + Standard_Real myUpperLimitActualRotationZ; //!< optional + Standard_Real myLowerLimitActualTranslationX; //!< optional + Standard_Real myUpperLimitActualTranslationX; //!< optional + Standard_Real myLowerLimitActualTranslationY; //!< optional + Standard_Real myUpperLimitActualTranslationY; //!< optional + Standard_Real myLowerLimitActualTranslationZ; //!< optional + Standard_Real myUpperLimitActualTranslationZ; //!< optional + Standard_Boolean defLowerLimitActualRotationX; //!< flag "is LowerLimitActualRotationX defined" + Standard_Boolean defUpperLimitActualRotationX; //!< flag "is UpperLimitActualRotationX defined" + Standard_Boolean defLowerLimitActualRotationY; //!< flag "is LowerLimitActualRotationY defined" + Standard_Boolean defUpperLimitActualRotationY; //!< flag "is UpperLimitActualRotationY defined" + Standard_Boolean defLowerLimitActualRotationZ; //!< flag "is LowerLimitActualRotationZ defined" + Standard_Boolean defUpperLimitActualRotationZ; //!< flag "is UpperLimitActualRotationZ defined" + Standard_Boolean defLowerLimitActualTranslationX; //!< flag "is LowerLimitActualTranslationX defined" + Standard_Boolean defUpperLimitActualTranslationX; //!< flag "is UpperLimitActualTranslationX defined" + Standard_Boolean defLowerLimitActualTranslationY; //!< flag "is LowerLimitActualTranslationY defined" + Standard_Boolean defUpperLimitActualTranslationY; //!< flag "is UpperLimitActualTranslationY defined" + Standard_Boolean defLowerLimitActualTranslationZ; //!< flag "is LowerLimitActualTranslationZ defined" + Standard_Boolean defUpperLimitActualTranslationZ; //!< flag "is UpperLimitActualTranslationZ defined" + +}; +#endif // _StepKinematics_LowOrderKinematicPairWithRange_HeaderFile_ diff --git a/src/StepKinematics/StepKinematics_MechanismRepresentation.cxx b/src/StepKinematics/StepKinematics_MechanismRepresentation.cxx new file mode 100644 index 0000000000..cfa327feb9 --- /dev/null +++ b/src/StepKinematics/StepKinematics_MechanismRepresentation.cxx @@ -0,0 +1,61 @@ +// Created on : Sat May 02 12:41:15 2020 +// Created by: Irina KRYLOVA +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V3.0 +// Copyright (c) Open CASCADE 2020 +// +// This file is part of Open CASCADE Technology software library. +// +// This library is free software; you can redistribute it and/or modify it under +// the terms of the GNU Lesser General Public License version 2.1 as published +// by the Free Software Foundation, with special exception defined in the file +// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT +// distribution for complete text of the license and disclaimer of any warranty. +// +// Alternatively, this file may be used under the terms of Open CASCADE +// commercial license or contractual agreement. + +#include + +IMPLEMENT_STANDARD_RTTIEXT(StepKinematics_MechanismRepresentation, StepRepr_Representation) + +//======================================================================= +//function : StepKinematics_MechanismRepresentation +//purpose : +//======================================================================= +StepKinematics_MechanismRepresentation::StepKinematics_MechanismRepresentation () +{ +} + +//======================================================================= +//function : Init +//purpose : +//======================================================================= +void StepKinematics_MechanismRepresentation::Init (const Handle(TCollection_HAsciiString)& theRepresentation_Name, + const Handle(StepRepr_HArray1OfRepresentationItem)& theRepresentation_Items, + const Handle(StepRepr_RepresentationContext)& theRepresentation_ContextOfItems, + const StepKinematics_KinematicTopologyRepresentationSelect& theRepresentedTopology) +{ + StepRepr_Representation::Init(theRepresentation_Name, + theRepresentation_Items, + theRepresentation_ContextOfItems); + + myRepresentedTopology = theRepresentedTopology; +} + +//======================================================================= +//function : RepresentedTopology +//purpose : +//======================================================================= +StepKinematics_KinematicTopologyRepresentationSelect StepKinematics_MechanismRepresentation::RepresentedTopology () const +{ + return myRepresentedTopology; +} + +//======================================================================= +//function : SetRepresentedTopology +//purpose : +//======================================================================= +void StepKinematics_MechanismRepresentation::SetRepresentedTopology (const StepKinematics_KinematicTopologyRepresentationSelect& theRepresentedTopology) +{ + myRepresentedTopology = theRepresentedTopology; +} diff --git a/src/StepKinematics/StepKinematics_MechanismRepresentation.hxx b/src/StepKinematics/StepKinematics_MechanismRepresentation.hxx new file mode 100644 index 0000000000..cfaa5823da --- /dev/null +++ b/src/StepKinematics/StepKinematics_MechanismRepresentation.hxx @@ -0,0 +1,56 @@ +// Created on : Sat May 02 12:41:15 2020 +// Created by: Irina KRYLOVA +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V3.0 +// Copyright (c) Open CASCADE 2020 +// +// 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 _StepKinematics_MechanismRepresentation_HeaderFile_ +#define _StepKinematics_MechanismRepresentation_HeaderFile_ + +#include +#include +#include + +#include +#include +#include +#include + +DEFINE_STANDARD_HANDLE(StepKinematics_MechanismRepresentation, StepRepr_Representation) + +//! Representation of STEP entity MechanismRepresentation +class StepKinematics_MechanismRepresentation : public StepRepr_Representation +{ +public : + + //! default constructor + Standard_EXPORT StepKinematics_MechanismRepresentation(); + + //! Initialize all fields (own and inherited) + Standard_EXPORT void Init(const Handle(TCollection_HAsciiString)& theRepresentation_Name, + const Handle(StepRepr_HArray1OfRepresentationItem)& theRepresentation_Items, + const Handle(StepRepr_RepresentationContext)& theRepresentation_ContextOfItems, + const StepKinematics_KinematicTopologyRepresentationSelect& theRepresentedTopology); + + //! Returns field RepresentedTopology + Standard_EXPORT StepKinematics_KinematicTopologyRepresentationSelect RepresentedTopology() const; + //! Sets field RepresentedTopology + Standard_EXPORT void SetRepresentedTopology (const StepKinematics_KinematicTopologyRepresentationSelect& theRepresentedTopology); + +DEFINE_STANDARD_RTTIEXT(StepKinematics_MechanismRepresentation, StepRepr_Representation) + +private: + StepKinematics_KinematicTopologyRepresentationSelect myRepresentedTopology; + +}; +#endif // _StepKinematics_MechanismRepresentation_HeaderFile_ diff --git a/src/StepKinematics/StepKinematics_MechanismStateRepresentation.cxx b/src/StepKinematics/StepKinematics_MechanismStateRepresentation.cxx new file mode 100644 index 0000000000..f34be4621a --- /dev/null +++ b/src/StepKinematics/StepKinematics_MechanismStateRepresentation.cxx @@ -0,0 +1,42 @@ +// Created on: 2020-06-18 +// Created by: PASUKHIN DMITRY +// Copyright (c) 2020 OPEN CASCADE SAS +// +// This file is part of Open CASCADE Technology software library. +// +// This library is free software; you can redistribute it and/or modify it under +// the terms of the GNU Lesser General Public License version 2.1 as published +// by the Free Software Foundation, with special exception defined in the file +// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT +// distribution for complete text of the license and disclaimer of any warranty. +// +// Alternatively, this file may be used under the terms of Open CASCADE +// commercial license or contractual agreement. + + +#include +#include +#include + +IMPLEMENT_STANDARD_RTTIEXT(StepKinematics_MechanismStateRepresentation, StepRepr_Representation) + +StepKinematics_MechanismStateRepresentation::StepKinematics_MechanismStateRepresentation() {} + +void StepKinematics_MechanismStateRepresentation::Init(const Handle(TCollection_HAsciiString)& theName, + const Handle(StepRepr_HArray1OfRepresentationItem)& theItems, + const Handle(StepRepr_RepresentationContext)& theContextOfItems, + const Handle(StepKinematics_MechanismRepresentation) theMechanism) +{ + StepRepr_Representation::Init(theName, theItems, theContextOfItems); + myRepresentedMechanism = theMechanism; +} + +void StepKinematics_MechanismStateRepresentation::SetMechanism(const Handle(StepKinematics_MechanismRepresentation)& theMechanism) +{ + myRepresentedMechanism = theMechanism; +} + +Handle(StepKinematics_MechanismRepresentation) StepKinematics_MechanismStateRepresentation::Mechanism() const +{ + return myRepresentedMechanism; +} \ No newline at end of file diff --git a/src/StepKinematics/StepKinematics_MechanismStateRepresentation.hxx b/src/StepKinematics/StepKinematics_MechanismStateRepresentation.hxx new file mode 100644 index 0000000000..82ee1ca25c --- /dev/null +++ b/src/StepKinematics/StepKinematics_MechanismStateRepresentation.hxx @@ -0,0 +1,49 @@ +// Created on: 2020-06-18 +// Created by: PASUKHIN DMITRY +// Copyright (c) 2020 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 _StepKinematics_MechanismStateRepresentation_HeaderFile +#define _StepKinematics_MechanismStateRepresentation_HeaderFile + +#include +#include + +#include + +class StepKinematics_MechanismRepresentation; + +class StepKinematics_MechanismStateRepresentation; +DEFINE_STANDARD_HANDLE(StepKinematics_MechanismStateRepresentation, StepRepr_Representation) + + +class StepKinematics_MechanismStateRepresentation : public StepRepr_Representation +{ +public: + + //! Returns a MechanismStateRepresentation + Standard_EXPORT StepKinematics_MechanismStateRepresentation(); + + Standard_EXPORT void Init(const Handle(TCollection_HAsciiString)& theName, const Handle(StepRepr_HArray1OfRepresentationItem)& theItems, const Handle(StepRepr_RepresentationContext)& theContextOfItems, const Handle(StepKinematics_MechanismRepresentation) theMechanism); + + Standard_EXPORT void SetMechanism(const Handle(StepKinematics_MechanismRepresentation)& theMechanism); + + Standard_EXPORT Handle(StepKinematics_MechanismRepresentation) Mechanism() const; + +private: + Handle(StepKinematics_MechanismRepresentation) myRepresentedMechanism; + + DEFINE_STANDARD_RTTIEXT(StepKinematics_MechanismStateRepresentation,StepRepr_Representation) +}; + +#endif // _StepKinematics_MechanismStateRepresentation_HeaderFile diff --git a/src/StepKinematics/StepKinematics_OrientedJoint.cxx b/src/StepKinematics/StepKinematics_OrientedJoint.cxx new file mode 100644 index 0000000000..e8202b02a7 --- /dev/null +++ b/src/StepKinematics/StepKinematics_OrientedJoint.cxx @@ -0,0 +1,27 @@ +// Created on : Sat May 02 12:41:15 2020 +// Created by: Irina KRYLOVA +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V3.0 +// Copyright (c) Open CASCADE 2020 +// +// This file is part of Open CASCADE Technology software library. +// +// This library is free software; you can redistribute it and/or modify it under +// the terms of the GNU Lesser General Public License version 2.1 as published +// by the Free Software Foundation, with special exception defined in the file +// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT +// distribution for complete text of the license and disclaimer of any warranty. +// +// Alternatively, this file may be used under the terms of Open CASCADE +// commercial license or contractual agreement. + +#include + +IMPLEMENT_STANDARD_RTTIEXT(StepKinematics_OrientedJoint, StepShape_OrientedEdge) + +//======================================================================= +//function : StepKinematics_OrientedJoint +//purpose : +//======================================================================= +StepKinematics_OrientedJoint::StepKinematics_OrientedJoint () +{ +} diff --git a/src/StepKinematics/StepKinematics_OrientedJoint.hxx b/src/StepKinematics/StepKinematics_OrientedJoint.hxx new file mode 100644 index 0000000000..17ef0fe1c5 --- /dev/null +++ b/src/StepKinematics/StepKinematics_OrientedJoint.hxx @@ -0,0 +1,41 @@ +// Created on : Sat May 02 12:41:15 2020 +// Created by: Irina KRYLOVA +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V3.0 +// Copyright (c) Open CASCADE 2020 +// +// 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 _StepKinematics_OrientedJoint_HeaderFile_ +#define _StepKinematics_OrientedJoint_HeaderFile_ + +#include +#include +#include + +#include +#include +#include + +DEFINE_STANDARD_HANDLE(StepKinematics_OrientedJoint, StepShape_OrientedEdge) + +//! Representation of STEP entity OrientedJoint +class StepKinematics_OrientedJoint : public StepShape_OrientedEdge +{ +public : + + //! default constructor + Standard_EXPORT StepKinematics_OrientedJoint(); + +DEFINE_STANDARD_RTTIEXT(StepKinematics_OrientedJoint, StepShape_OrientedEdge) + +}; +#endif // _StepKinematics_OrientedJoint_HeaderFile_ diff --git a/src/StepKinematics/StepKinematics_PairRepresentationRelationship.cxx b/src/StepKinematics/StepKinematics_PairRepresentationRelationship.cxx new file mode 100644 index 0000000000..9e3710e9ef --- /dev/null +++ b/src/StepKinematics/StepKinematics_PairRepresentationRelationship.cxx @@ -0,0 +1,67 @@ +// Created on : Sat May 02 12:41:15 2020 +// Created by: Irina KRYLOVA +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V3.0 +// Copyright (c) Open CASCADE 2020 +// +// This file is part of Open CASCADE Technology software library. +// +// This library is free software; you can redistribute it and/or modify it under +// the terms of the GNU Lesser General Public License version 2.1 as published +// by the Free Software Foundation, with special exception defined in the file +// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT +// distribution for complete text of the license and disclaimer of any warranty. +// +// Alternatively, this file may be used under the terms of Open CASCADE +// commercial license or contractual agreement. + +#include + +IMPLEMENT_STANDARD_RTTIEXT(StepKinematics_PairRepresentationRelationship, StepGeom_GeometricRepresentationItem) + +//======================================================================= +//function : StepKinematics_PairRepresentationRelationship +//purpose : +//======================================================================= +StepKinematics_PairRepresentationRelationship::StepKinematics_PairRepresentationRelationship () +{ +} + +//======================================================================= +//function : Init +//purpose : +//======================================================================= +void StepKinematics_PairRepresentationRelationship::Init (const Handle(TCollection_HAsciiString)& theRepresentationItem_Name, + const Handle(TCollection_HAsciiString)& theRepresentationRelationship_Name, + const Standard_Boolean /*hasRepresentationRelationship_Description*/, + const Handle(TCollection_HAsciiString)& theRepresentationRelationship_Description, + const StepRepr_RepresentationOrRepresentationReference& theRepresentationRelationship_Rep1, + const StepRepr_RepresentationOrRepresentationReference& theRepresentationRelationship_Rep2, + const StepRepr_Transformation& theRepresentationRelationshipWithTransformation_TransformationOperator) +{ + StepGeom_GeometricRepresentationItem::Init(theRepresentationItem_Name); + myRepresentationRelationshipWithTransformation = new StepRepr_RepresentationRelationshipWithTransformation; + myRepresentationRelationshipWithTransformation->Init(theRepresentationRelationship_Name, + /*hasRepresentationRelationship_Description,*/ + theRepresentationRelationship_Description, + theRepresentationRelationship_Rep1.Representation(), + theRepresentationRelationship_Rep2.Representation(), + theRepresentationRelationshipWithTransformation_TransformationOperator); +} + +//======================================================================= +//function : RepresentationRelationshipWithTransformation +//purpose : +//======================================================================= +Handle(StepRepr_RepresentationRelationshipWithTransformation) StepKinematics_PairRepresentationRelationship::RepresentationRelationshipWithTransformation () const +{ + return myRepresentationRelationshipWithTransformation; +} + +//======================================================================= +//function : SetRepresentationRelationshipWithTransformation +//purpose : +//======================================================================= +void StepKinematics_PairRepresentationRelationship::SetRepresentationRelationshipWithTransformation (const Handle(StepRepr_RepresentationRelationshipWithTransformation)& theRepresentationRelationshipWithTransformation) +{ + myRepresentationRelationshipWithTransformation = theRepresentationRelationshipWithTransformation; +} diff --git a/src/StepKinematics/StepKinematics_PairRepresentationRelationship.hxx b/src/StepKinematics/StepKinematics_PairRepresentationRelationship.hxx new file mode 100644 index 0000000000..289f133a41 --- /dev/null +++ b/src/StepKinematics/StepKinematics_PairRepresentationRelationship.hxx @@ -0,0 +1,59 @@ +// Created on : Sat May 02 12:41:15 2020 +// Created by: Irina KRYLOVA +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V3.0 +// Copyright (c) Open CASCADE 2020 +// +// 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 _StepKinematics_PairRepresentationRelationship_HeaderFile_ +#define _StepKinematics_PairRepresentationRelationship_HeaderFile_ + +#include +#include +#include + +#include +#include +#include +#include + +DEFINE_STANDARD_HANDLE(StepKinematics_PairRepresentationRelationship, StepGeom_GeometricRepresentationItem) + +//! Representation of STEP entity PairRepresentationRelationship +class StepKinematics_PairRepresentationRelationship : public StepGeom_GeometricRepresentationItem +{ +public : + + //! default constructor + Standard_EXPORT StepKinematics_PairRepresentationRelationship(); + + //! Initialize all fields (own and inherited) + Standard_EXPORT void Init(const Handle(TCollection_HAsciiString)& theRepresentationItem_Name, + const Handle(TCollection_HAsciiString)& theRepresentationRelationship_Name, + const Standard_Boolean hasRepresentationRelationship_Description, + const Handle(TCollection_HAsciiString)& theRepresentationRelationship_Description, + const StepRepr_RepresentationOrRepresentationReference& theRepresentationRelationship_Rep1, + const StepRepr_RepresentationOrRepresentationReference& theRepresentationRelationship_Rep2, + const StepRepr_Transformation& theRepresentationRelationshipWithTransformation_TransformationOperator); + + //! Returns data for supertype RepresentationRelationshipWithTransformation + Standard_EXPORT Handle(StepRepr_RepresentationRelationshipWithTransformation) RepresentationRelationshipWithTransformation() const; + //! Sets data for supertype RepresentationRelationshipWithTransformation + Standard_EXPORT void SetRepresentationRelationshipWithTransformation (const Handle(StepRepr_RepresentationRelationshipWithTransformation)& theRepresentationRelationshipWithTransformation); + +DEFINE_STANDARD_RTTIEXT(StepKinematics_PairRepresentationRelationship, StepGeom_GeometricRepresentationItem) + +private: + Handle(StepRepr_RepresentationRelationshipWithTransformation) myRepresentationRelationshipWithTransformation; //!< supertype + +}; +#endif // _StepKinematics_PairRepresentationRelationship_HeaderFile_ diff --git a/src/StepKinematics/StepKinematics_PairValue.cxx b/src/StepKinematics/StepKinematics_PairValue.cxx new file mode 100644 index 0000000000..6c424a53f4 --- /dev/null +++ b/src/StepKinematics/StepKinematics_PairValue.cxx @@ -0,0 +1,57 @@ +// Created on : Sat May 02 12:41:15 2020 +// Created by: Irina KRYLOVA +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V3.0 +// Copyright (c) Open CASCADE 2020 +// +// This file is part of Open CASCADE Technology software library. +// +// This library is free software; you can redistribute it and/or modify it under +// the terms of the GNU Lesser General Public License version 2.1 as published +// by the Free Software Foundation, with special exception defined in the file +// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT +// distribution for complete text of the license and disclaimer of any warranty. +// +// Alternatively, this file may be used under the terms of Open CASCADE +// commercial license or contractual agreement. + +#include + +IMPLEMENT_STANDARD_RTTIEXT(StepKinematics_PairValue, StepGeom_GeometricRepresentationItem) + +//======================================================================= +//function : StepKinematics_PairValue +//purpose : +//======================================================================= +StepKinematics_PairValue::StepKinematics_PairValue () +{ +} + +//======================================================================= +//function : Init +//purpose : +//======================================================================= +void StepKinematics_PairValue::Init (const Handle(TCollection_HAsciiString)& theRepresentationItem_Name, + const Handle(StepKinematics_KinematicPair)& theAppliesToPair) +{ + StepGeom_GeometricRepresentationItem::Init(theRepresentationItem_Name); + + myAppliesToPair = theAppliesToPair; +} + +//======================================================================= +//function : AppliesToPair +//purpose : +//======================================================================= +Handle(StepKinematics_KinematicPair) StepKinematics_PairValue::AppliesToPair () const +{ + return myAppliesToPair; +} + +//======================================================================= +//function : SetAppliesToPair +//purpose : +//======================================================================= +void StepKinematics_PairValue::SetAppliesToPair (const Handle(StepKinematics_KinematicPair)& theAppliesToPair) +{ + myAppliesToPair = theAppliesToPair; +} diff --git a/src/StepKinematics/StepKinematics_PairValue.hxx b/src/StepKinematics/StepKinematics_PairValue.hxx new file mode 100644 index 0000000000..ec6e68391f --- /dev/null +++ b/src/StepKinematics/StepKinematics_PairValue.hxx @@ -0,0 +1,52 @@ +// Created on : Sat May 02 12:41:15 2020 +// Created by: Irina KRYLOVA +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V3.0 +// Copyright (c) Open CASCADE 2020 +// +// 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 _StepKinematics_PairValue_HeaderFile_ +#define _StepKinematics_PairValue_HeaderFile_ + +#include +#include +#include + +#include +#include + +DEFINE_STANDARD_HANDLE(StepKinematics_PairValue, StepGeom_GeometricRepresentationItem) + +//! Representation of STEP entity PairValue +class StepKinematics_PairValue : public StepGeom_GeometricRepresentationItem +{ +public : + + //! default constructor + Standard_EXPORT StepKinematics_PairValue(); + + //! Initialize all fields (own and inherited) + Standard_EXPORT void Init(const Handle(TCollection_HAsciiString)& theRepresentationItem_Name, + const Handle(StepKinematics_KinematicPair)& theAppliesToPair); + + //! Returns field AppliesToPair + Standard_EXPORT Handle(StepKinematics_KinematicPair) AppliesToPair() const; + //! Sets field AppliesToPair + Standard_EXPORT void SetAppliesToPair (const Handle(StepKinematics_KinematicPair)& theAppliesToPair); + +DEFINE_STANDARD_RTTIEXT(StepKinematics_PairValue, StepGeom_GeometricRepresentationItem) + +private: + Handle(StepKinematics_KinematicPair) myAppliesToPair; + +}; +#endif // _StepKinematics_PairValue_HeaderFile_ diff --git a/src/StepKinematics/StepKinematics_PlanarCurvePair.cxx b/src/StepKinematics/StepKinematics_PlanarCurvePair.cxx new file mode 100644 index 0000000000..b1b4054cab --- /dev/null +++ b/src/StepKinematics/StepKinematics_PlanarCurvePair.cxx @@ -0,0 +1,111 @@ +// Created on : Sat May 02 12:41:15 2020 +// Created by: Irina KRYLOVA +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V3.0 +// Copyright (c) Open CASCADE 2020 +// +// This file is part of Open CASCADE Technology software library. +// +// This library is free software; you can redistribute it and/or modify it under +// the terms of the GNU Lesser General Public License version 2.1 as published +// by the Free Software Foundation, with special exception defined in the file +// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT +// distribution for complete text of the license and disclaimer of any warranty. +// +// Alternatively, this file may be used under the terms of Open CASCADE +// commercial license or contractual agreement. + +#include + +IMPLEMENT_STANDARD_RTTIEXT(StepKinematics_PlanarCurvePair, StepKinematics_HighOrderKinematicPair) + +//======================================================================= +//function : StepKinematics_PlanarCurvePair +//purpose : +//======================================================================= +StepKinematics_PlanarCurvePair::StepKinematics_PlanarCurvePair () +{ +} + +//======================================================================= +//function : Init +//purpose : +//======================================================================= +void StepKinematics_PlanarCurvePair::Init (const Handle(TCollection_HAsciiString)& theRepresentationItem_Name, + const Handle(TCollection_HAsciiString)& theItemDefinedTransformation_Name, + const Standard_Boolean hasItemDefinedTransformation_Description, + const Handle(TCollection_HAsciiString)& theItemDefinedTransformation_Description, + const Handle(StepRepr_RepresentationItem)& theItemDefinedTransformation_TransformItem1, + const Handle(StepRepr_RepresentationItem)& theItemDefinedTransformation_TransformItem2, + const Handle(StepKinematics_KinematicJoint)& theKinematicPair_Joint, + const Handle(StepGeom_Curve)& theCurve1, + const Handle(StepGeom_Curve)& theCurve2, + const Standard_Boolean theOrientation) +{ + StepKinematics_HighOrderKinematicPair::Init(theRepresentationItem_Name, + theItemDefinedTransformation_Name, + hasItemDefinedTransformation_Description, + theItemDefinedTransformation_Description, + theItemDefinedTransformation_TransformItem1, + theItemDefinedTransformation_TransformItem2, + theKinematicPair_Joint); + + myCurve1 = theCurve1; + + myCurve2 = theCurve2; + + myOrientation = theOrientation; +} + +//======================================================================= +//function : Curve1 +//purpose : +//======================================================================= +Handle(StepGeom_Curve) StepKinematics_PlanarCurvePair::Curve1 () const +{ + return myCurve1; +} + +//======================================================================= +//function : SetCurve1 +//purpose : +//======================================================================= +void StepKinematics_PlanarCurvePair::SetCurve1 (const Handle(StepGeom_Curve)& theCurve1) +{ + myCurve1 = theCurve1; +} + +//======================================================================= +//function : Curve2 +//purpose : +//======================================================================= +Handle(StepGeom_Curve) StepKinematics_PlanarCurvePair::Curve2 () const +{ + return myCurve2; +} + +//======================================================================= +//function : SetCurve2 +//purpose : +//======================================================================= +void StepKinematics_PlanarCurvePair::SetCurve2 (const Handle(StepGeom_Curve)& theCurve2) +{ + myCurve2 = theCurve2; +} + +//======================================================================= +//function : Orientation +//purpose : +//======================================================================= +Standard_Boolean StepKinematics_PlanarCurvePair::Orientation () const +{ + return myOrientation; +} + +//======================================================================= +//function : SetOrientation +//purpose : +//======================================================================= +void StepKinematics_PlanarCurvePair::SetOrientation (const Standard_Boolean theOrientation) +{ + myOrientation = theOrientation; +} diff --git a/src/StepKinematics/StepKinematics_PlanarCurvePair.hxx b/src/StepKinematics/StepKinematics_PlanarCurvePair.hxx new file mode 100644 index 0000000000..cf379d3faf --- /dev/null +++ b/src/StepKinematics/StepKinematics_PlanarCurvePair.hxx @@ -0,0 +1,75 @@ +// Created on : Sat May 02 12:41:15 2020 +// Created by: Irina KRYLOVA +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V3.0 +// Copyright (c) Open CASCADE 2020 +// +// 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 _StepKinematics_PlanarCurvePair_HeaderFile_ +#define _StepKinematics_PlanarCurvePair_HeaderFile_ + +#include +#include +#include + +#include +#include +#include +#include +#include + +DEFINE_STANDARD_HANDLE(StepKinematics_PlanarCurvePair, StepKinematics_HighOrderKinematicPair) + +//! Representation of STEP entity PlanarCurvePair +class StepKinematics_PlanarCurvePair : public StepKinematics_HighOrderKinematicPair +{ +public : + + //! default constructor + Standard_EXPORT StepKinematics_PlanarCurvePair(); + + //! Initialize all fields (own and inherited) + Standard_EXPORT void Init(const Handle(TCollection_HAsciiString)& theRepresentationItem_Name, + const Handle(TCollection_HAsciiString)& theItemDefinedTransformation_Name, + const Standard_Boolean hasItemDefinedTransformation_Description, + const Handle(TCollection_HAsciiString)& theItemDefinedTransformation_Description, + const Handle(StepRepr_RepresentationItem)& theItemDefinedTransformation_TransformItem1, + const Handle(StepRepr_RepresentationItem)& theItemDefinedTransformation_TransformItem2, + const Handle(StepKinematics_KinematicJoint)& theKinematicPair_Joint, + const Handle(StepGeom_Curve)& theCurve1, + const Handle(StepGeom_Curve)& theCurve2, + const Standard_Boolean theOrientation); + + //! Returns field Curve1 + Standard_EXPORT Handle(StepGeom_Curve) Curve1() const; + //! Sets field Curve1 + Standard_EXPORT void SetCurve1 (const Handle(StepGeom_Curve)& theCurve1); + + //! Returns field Curve2 + Standard_EXPORT Handle(StepGeom_Curve) Curve2() const; + //! Sets field Curve2 + Standard_EXPORT void SetCurve2 (const Handle(StepGeom_Curve)& theCurve2); + + //! Returns field Orientation + Standard_EXPORT Standard_Boolean Orientation() const; + //! Sets field Orientation + Standard_EXPORT void SetOrientation (const Standard_Boolean theOrientation); + +DEFINE_STANDARD_RTTIEXT(StepKinematics_PlanarCurvePair, StepKinematics_HighOrderKinematicPair) + +private: + Handle(StepGeom_Curve) myCurve1; + Handle(StepGeom_Curve) myCurve2; + Standard_Boolean myOrientation; + +}; +#endif // _StepKinematics_PlanarCurvePair_HeaderFile_ diff --git a/src/StepKinematics/StepKinematics_PlanarCurvePairRange.cxx b/src/StepKinematics/StepKinematics_PlanarCurvePairRange.cxx new file mode 100644 index 0000000000..c9c8bad185 --- /dev/null +++ b/src/StepKinematics/StepKinematics_PlanarCurvePairRange.cxx @@ -0,0 +1,96 @@ +// Created on : Sat May 02 12:41:15 2020 +// Created by: Irina KRYLOVA +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V3.0 +// Copyright (c) Open CASCADE 2020 +// +// This file is part of Open CASCADE Technology software library. +// +// This library is free software; you can redistribute it and/or modify it under +// the terms of the GNU Lesser General Public License version 2.1 as published +// by the Free Software Foundation, with special exception defined in the file +// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT +// distribution for complete text of the license and disclaimer of any warranty. +// +// Alternatively, this file may be used under the terms of Open CASCADE +// commercial license or contractual agreement. + +#include + +IMPLEMENT_STANDARD_RTTIEXT(StepKinematics_PlanarCurvePairRange, StepKinematics_PlanarCurvePair) + +//======================================================================= +//function : StepKinematics_PlanarCurvePairRange +//purpose : +//======================================================================= +StepKinematics_PlanarCurvePairRange::StepKinematics_PlanarCurvePairRange () +{ +} + +//======================================================================= +//function : Init +//purpose : +//======================================================================= +void StepKinematics_PlanarCurvePairRange::Init (const Handle(TCollection_HAsciiString)& theRepresentationItem_Name, + const Handle(TCollection_HAsciiString)& theItemDefinedTransformation_Name, + const Standard_Boolean hasItemDefinedTransformation_Description, + const Handle(TCollection_HAsciiString)& theItemDefinedTransformation_Description, + const Handle(StepRepr_RepresentationItem)& theItemDefinedTransformation_TransformItem1, + const Handle(StepRepr_RepresentationItem)& theItemDefinedTransformation_TransformItem2, + const Handle(StepKinematics_KinematicJoint)& theKinematicPair_Joint, + const Handle(StepGeom_Curve)& thePlanarCurvePair_Curve1, + const Handle(StepGeom_Curve)& thePlanarCurvePair_Curve2, + const Standard_Boolean thePlanarCurvePair_Orientation, + const Handle(StepGeom_TrimmedCurve)& theRangeOnCurve1, + const Handle(StepGeom_TrimmedCurve)& theRangeOnCurve2) +{ + StepKinematics_PlanarCurvePair::Init(theRepresentationItem_Name, + theItemDefinedTransformation_Name, + hasItemDefinedTransformation_Description, + theItemDefinedTransformation_Description, + theItemDefinedTransformation_TransformItem1, + theItemDefinedTransformation_TransformItem2, + theKinematicPair_Joint, + thePlanarCurvePair_Curve1, + thePlanarCurvePair_Curve2, + thePlanarCurvePair_Orientation); + + myRangeOnCurve1 = theRangeOnCurve1; + + myRangeOnCurve2 = theRangeOnCurve2; +} + +//======================================================================= +//function : RangeOnCurve1 +//purpose : +//======================================================================= +Handle(StepGeom_TrimmedCurve) StepKinematics_PlanarCurvePairRange::RangeOnCurve1 () const +{ + return myRangeOnCurve1; +} + +//======================================================================= +//function : SetRangeOnCurve1 +//purpose : +//======================================================================= +void StepKinematics_PlanarCurvePairRange::SetRangeOnCurve1 (const Handle(StepGeom_TrimmedCurve)& theRangeOnCurve1) +{ + myRangeOnCurve1 = theRangeOnCurve1; +} + +//======================================================================= +//function : RangeOnCurve2 +//purpose : +//======================================================================= +Handle(StepGeom_TrimmedCurve) StepKinematics_PlanarCurvePairRange::RangeOnCurve2 () const +{ + return myRangeOnCurve2; +} + +//======================================================================= +//function : SetRangeOnCurve2 +//purpose : +//======================================================================= +void StepKinematics_PlanarCurvePairRange::SetRangeOnCurve2 (const Handle(StepGeom_TrimmedCurve)& theRangeOnCurve2) +{ + myRangeOnCurve2 = theRangeOnCurve2; +} diff --git a/src/StepKinematics/StepKinematics_PlanarCurvePairRange.hxx b/src/StepKinematics/StepKinematics_PlanarCurvePairRange.hxx new file mode 100644 index 0000000000..fd7b526634 --- /dev/null +++ b/src/StepKinematics/StepKinematics_PlanarCurvePairRange.hxx @@ -0,0 +1,72 @@ +// Created on : Sat May 02 12:41:15 2020 +// Created by: Irina KRYLOVA +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V3.0 +// Copyright (c) Open CASCADE 2020 +// +// 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 _StepKinematics_PlanarCurvePairRange_HeaderFile_ +#define _StepKinematics_PlanarCurvePairRange_HeaderFile_ + +#include +#include +#include + +#include +#include +#include +#include +#include +#include + +DEFINE_STANDARD_HANDLE(StepKinematics_PlanarCurvePairRange, StepKinematics_PlanarCurvePair) + +//! Representation of STEP entity PlanarCurvePairRange +class StepKinematics_PlanarCurvePairRange : public StepKinematics_PlanarCurvePair +{ +public : + + //! default constructor + Standard_EXPORT StepKinematics_PlanarCurvePairRange(); + + //! Initialize all fields (own and inherited) + Standard_EXPORT void Init(const Handle(TCollection_HAsciiString)& theRepresentationItem_Name, + const Handle(TCollection_HAsciiString)& theItemDefinedTransformation_Name, + const Standard_Boolean hasItemDefinedTransformation_Description, + const Handle(TCollection_HAsciiString)& theItemDefinedTransformation_Description, + const Handle(StepRepr_RepresentationItem)& theItemDefinedTransformation_TransformItem1, + const Handle(StepRepr_RepresentationItem)& theItemDefinedTransformation_TransformItem2, + const Handle(StepKinematics_KinematicJoint)& theKinematicPair_Joint, + const Handle(StepGeom_Curve)& thePlanarCurvePair_Curve1, + const Handle(StepGeom_Curve)& thePlanarCurvePair_Curve2, + const Standard_Boolean thePlanarCurvePair_Orientation, + const Handle(StepGeom_TrimmedCurve)& theRangeOnCurve1, + const Handle(StepGeom_TrimmedCurve)& theRangeOnCurve2); + + //! Returns field RangeOnCurve1 + Standard_EXPORT Handle(StepGeom_TrimmedCurve) RangeOnCurve1() const; + //! Sets field RangeOnCurve1 + Standard_EXPORT void SetRangeOnCurve1 (const Handle(StepGeom_TrimmedCurve)& theRangeOnCurve1); + + //! Returns field RangeOnCurve2 + Standard_EXPORT Handle(StepGeom_TrimmedCurve) RangeOnCurve2() const; + //! Sets field RangeOnCurve2 + Standard_EXPORT void SetRangeOnCurve2 (const Handle(StepGeom_TrimmedCurve)& theRangeOnCurve2); + +DEFINE_STANDARD_RTTIEXT(StepKinematics_PlanarCurvePairRange, StepKinematics_PlanarCurvePair) + +private: + Handle(StepGeom_TrimmedCurve) myRangeOnCurve1; + Handle(StepGeom_TrimmedCurve) myRangeOnCurve2; + +}; +#endif // _StepKinematics_PlanarCurvePairRange_HeaderFile_ diff --git a/src/StepKinematics/StepKinematics_PlanarPair.cxx b/src/StepKinematics/StepKinematics_PlanarPair.cxx new file mode 100644 index 0000000000..f469339119 --- /dev/null +++ b/src/StepKinematics/StepKinematics_PlanarPair.cxx @@ -0,0 +1,27 @@ +// Created on : Sat May 02 12:41:15 2020 +// Created by: Irina KRYLOVA +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V3.0 +// Copyright (c) Open CASCADE 2020 +// +// This file is part of Open CASCADE Technology software library. +// +// This library is free software; you can redistribute it and/or modify it under +// the terms of the GNU Lesser General Public License version 2.1 as published +// by the Free Software Foundation, with special exception defined in the file +// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT +// distribution for complete text of the license and disclaimer of any warranty. +// +// Alternatively, this file may be used under the terms of Open CASCADE +// commercial license or contractual agreement. + +#include + +IMPLEMENT_STANDARD_RTTIEXT(StepKinematics_PlanarPair, StepKinematics_LowOrderKinematicPair) + +//======================================================================= +//function : StepKinematics_PlanarPair +//purpose : +//======================================================================= +StepKinematics_PlanarPair::StepKinematics_PlanarPair () +{ +} diff --git a/src/StepKinematics/StepKinematics_PlanarPair.hxx b/src/StepKinematics/StepKinematics_PlanarPair.hxx new file mode 100644 index 0000000000..f419fca67e --- /dev/null +++ b/src/StepKinematics/StepKinematics_PlanarPair.hxx @@ -0,0 +1,42 @@ +// Created on : Sat May 02 12:41:15 2020 +// Created by: Irina KRYLOVA +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V3.0 +// Copyright (c) Open CASCADE 2020 +// +// 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 _StepKinematics_PlanarPair_HeaderFile_ +#define _StepKinematics_PlanarPair_HeaderFile_ + +#include +#include +#include + +#include +#include +#include +#include + +DEFINE_STANDARD_HANDLE(StepKinematics_PlanarPair, StepKinematics_LowOrderKinematicPair) + +//! Representation of STEP entity PlanarPair +class StepKinematics_PlanarPair : public StepKinematics_LowOrderKinematicPair +{ +public : + + //! default constructor + Standard_EXPORT StepKinematics_PlanarPair(); + +DEFINE_STANDARD_RTTIEXT(StepKinematics_PlanarPair, StepKinematics_LowOrderKinematicPair) + +}; +#endif // _StepKinematics_PlanarPair_HeaderFile_ diff --git a/src/StepKinematics/StepKinematics_PlanarPairValue.cxx b/src/StepKinematics/StepKinematics_PlanarPairValue.cxx new file mode 100644 index 0000000000..a39d8f0494 --- /dev/null +++ b/src/StepKinematics/StepKinematics_PlanarPairValue.cxx @@ -0,0 +1,101 @@ +// Created on : Sat May 02 12:41:15 2020 +// Created by: Irina KRYLOVA +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V3.0 +// Copyright (c) Open CASCADE 2020 +// +// This file is part of Open CASCADE Technology software library. +// +// This library is free software; you can redistribute it and/or modify it under +// the terms of the GNU Lesser General Public License version 2.1 as published +// by the Free Software Foundation, with special exception defined in the file +// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT +// distribution for complete text of the license and disclaimer of any warranty. +// +// Alternatively, this file may be used under the terms of Open CASCADE +// commercial license or contractual agreement. + +#include + +IMPLEMENT_STANDARD_RTTIEXT(StepKinematics_PlanarPairValue, StepKinematics_PairValue) + +//======================================================================= +//function : StepKinematics_PlanarPairValue +//purpose : +//======================================================================= +StepKinematics_PlanarPairValue::StepKinematics_PlanarPairValue () +{ +} + +//======================================================================= +//function : Init +//purpose : +//======================================================================= +void StepKinematics_PlanarPairValue::Init (const Handle(TCollection_HAsciiString)& theRepresentationItem_Name, + const Handle(StepKinematics_KinematicPair)& thePairValue_AppliesToPair, + const Standard_Real theActualRotation, + const Standard_Real theActualTranslationX, + const Standard_Real theActualTranslationY) +{ + StepKinematics_PairValue::Init(theRepresentationItem_Name, + thePairValue_AppliesToPair); + + myActualRotation = theActualRotation; + + myActualTranslationX = theActualTranslationX; + + myActualTranslationY = theActualTranslationY; +} + +//======================================================================= +//function : ActualRotation +//purpose : +//======================================================================= +Standard_Real StepKinematics_PlanarPairValue::ActualRotation () const +{ + return myActualRotation; +} + +//======================================================================= +//function : SetActualRotation +//purpose : +//======================================================================= +void StepKinematics_PlanarPairValue::SetActualRotation (const Standard_Real theActualRotation) +{ + myActualRotation = theActualRotation; +} + +//======================================================================= +//function : ActualTranslationX +//purpose : +//======================================================================= +Standard_Real StepKinematics_PlanarPairValue::ActualTranslationX () const +{ + return myActualTranslationX; +} + +//======================================================================= +//function : SetActualTranslationX +//purpose : +//======================================================================= +void StepKinematics_PlanarPairValue::SetActualTranslationX (const Standard_Real theActualTranslationX) +{ + myActualTranslationX = theActualTranslationX; +} + +//======================================================================= +//function : ActualTranslationY +//purpose : +//======================================================================= +Standard_Real StepKinematics_PlanarPairValue::ActualTranslationY () const +{ + return myActualTranslationY; +} + +//======================================================================= +//function : SetActualTranslationY +//purpose : +//======================================================================= +void StepKinematics_PlanarPairValue::SetActualTranslationY (const Standard_Real theActualTranslationY) +{ + myActualTranslationY = theActualTranslationY; +} diff --git a/src/StepKinematics/StepKinematics_PlanarPairValue.hxx b/src/StepKinematics/StepKinematics_PlanarPairValue.hxx new file mode 100644 index 0000000000..87c682a769 --- /dev/null +++ b/src/StepKinematics/StepKinematics_PlanarPairValue.hxx @@ -0,0 +1,67 @@ +// Created on : Sat May 02 12:41:15 2020 +// Created by: Irina KRYLOVA +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V3.0 +// Copyright (c) Open CASCADE 2020 +// +// 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 _StepKinematics_PlanarPairValue_HeaderFile_ +#define _StepKinematics_PlanarPairValue_HeaderFile_ + +#include +#include +#include + +#include +#include + +DEFINE_STANDARD_HANDLE(StepKinematics_PlanarPairValue, StepKinematics_PairValue) + +//! Representation of STEP entity PlanarPairValue +class StepKinematics_PlanarPairValue : public StepKinematics_PairValue +{ +public : + + //! default constructor + Standard_EXPORT StepKinematics_PlanarPairValue(); + + //! Initialize all fields (own and inherited) + Standard_EXPORT void Init(const Handle(TCollection_HAsciiString)& theRepresentationItem_Name, + const Handle(StepKinematics_KinematicPair)& thePairValue_AppliesToPair, + const Standard_Real theActualRotation, + const Standard_Real theActualTranslationX, + const Standard_Real theActualTranslationY); + + //! Returns field ActualRotation + Standard_EXPORT Standard_Real ActualRotation() const; + //! Sets field ActualRotation + Standard_EXPORT void SetActualRotation (const Standard_Real theActualRotation); + + //! Returns field ActualTranslationX + Standard_EXPORT Standard_Real ActualTranslationX() const; + //! Sets field ActualTranslationX + Standard_EXPORT void SetActualTranslationX (const Standard_Real theActualTranslationX); + + //! Returns field ActualTranslationY + Standard_EXPORT Standard_Real ActualTranslationY() const; + //! Sets field ActualTranslationY + Standard_EXPORT void SetActualTranslationY (const Standard_Real theActualTranslationY); + +DEFINE_STANDARD_RTTIEXT(StepKinematics_PlanarPairValue, StepKinematics_PairValue) + +private: + Standard_Real myActualRotation; + Standard_Real myActualTranslationX; + Standard_Real myActualTranslationY; + +}; +#endif // _StepKinematics_PlanarPairValue_HeaderFile_ diff --git a/src/StepKinematics/StepKinematics_PlanarPairWithRange.cxx b/src/StepKinematics/StepKinematics_PlanarPairWithRange.cxx new file mode 100644 index 0000000000..3328a4a0ee --- /dev/null +++ b/src/StepKinematics/StepKinematics_PlanarPairWithRange.cxx @@ -0,0 +1,276 @@ +// Created on : Sat May 02 12:41:15 2020 +// Created by: Irina KRYLOVA +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V3.0 +// Copyright (c) Open CASCADE 2020 +// +// This file is part of Open CASCADE Technology software library. +// +// This library is free software; you can redistribute it and/or modify it under +// the terms of the GNU Lesser General Public License version 2.1 as published +// by the Free Software Foundation, with special exception defined in the file +// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT +// distribution for complete text of the license and disclaimer of any warranty. +// +// Alternatively, this file may be used under the terms of Open CASCADE +// commercial license or contractual agreement. + +#include + +IMPLEMENT_STANDARD_RTTIEXT(StepKinematics_PlanarPairWithRange, StepKinematics_PlanarPair) + +//======================================================================= +//function : StepKinematics_PlanarPairWithRange +//purpose : +//======================================================================= +StepKinematics_PlanarPairWithRange::StepKinematics_PlanarPairWithRange () +{ + defLowerLimitActualRotation = Standard_False; + defUpperLimitActualRotation = Standard_False; + defLowerLimitActualTranslationX = Standard_False; + defUpperLimitActualTranslationX = Standard_False; + defLowerLimitActualTranslationY = Standard_False; + defUpperLimitActualTranslationY = Standard_False; +} + +//======================================================================= +//function : Init +//purpose : +//======================================================================= +void StepKinematics_PlanarPairWithRange::Init (const Handle(TCollection_HAsciiString)& theRepresentationItem_Name, + const Handle(TCollection_HAsciiString)& theItemDefinedTransformation_Name, + const Standard_Boolean hasItemDefinedTransformation_Description, + const Handle(TCollection_HAsciiString)& theItemDefinedTransformation_Description, + const Handle(StepRepr_RepresentationItem)& theItemDefinedTransformation_TransformItem1, + const Handle(StepRepr_RepresentationItem)& theItemDefinedTransformation_TransformItem2, + const Handle(StepKinematics_KinematicJoint)& theKinematicPair_Joint, + const Standard_Boolean theLowOrderKinematicPair_TX, + const Standard_Boolean theLowOrderKinematicPair_TY, + const Standard_Boolean theLowOrderKinematicPair_TZ, + const Standard_Boolean theLowOrderKinematicPair_RX, + const Standard_Boolean theLowOrderKinematicPair_RY, + const Standard_Boolean theLowOrderKinematicPair_RZ, + const Standard_Boolean hasLowerLimitActualRotation, + const Standard_Real theLowerLimitActualRotation, + const Standard_Boolean hasUpperLimitActualRotation, + const Standard_Real theUpperLimitActualRotation, + const Standard_Boolean hasLowerLimitActualTranslationX, + const Standard_Real theLowerLimitActualTranslationX, + const Standard_Boolean hasUpperLimitActualTranslationX, + const Standard_Real theUpperLimitActualTranslationX, + const Standard_Boolean hasLowerLimitActualTranslationY, + const Standard_Real theLowerLimitActualTranslationY, + const Standard_Boolean hasUpperLimitActualTranslationY, + const Standard_Real theUpperLimitActualTranslationY) +{ + StepKinematics_PlanarPair::Init(theRepresentationItem_Name, + theItemDefinedTransformation_Name, + hasItemDefinedTransformation_Description, + theItemDefinedTransformation_Description, + theItemDefinedTransformation_TransformItem1, + theItemDefinedTransformation_TransformItem2, + theKinematicPair_Joint, + theLowOrderKinematicPair_TX, + theLowOrderKinematicPair_TY, + theLowOrderKinematicPair_TZ, + theLowOrderKinematicPair_RX, + theLowOrderKinematicPair_RY, + theLowOrderKinematicPair_RZ); + + defLowerLimitActualRotation = hasLowerLimitActualRotation; + if (defLowerLimitActualRotation) { + myLowerLimitActualRotation = theLowerLimitActualRotation; + } + else myLowerLimitActualRotation = 0; + + defUpperLimitActualRotation = hasUpperLimitActualRotation; + if (defUpperLimitActualRotation) { + myUpperLimitActualRotation = theUpperLimitActualRotation; + } + else myUpperLimitActualRotation = 0; + + defLowerLimitActualTranslationX = hasLowerLimitActualTranslationX; + if (defLowerLimitActualTranslationX) { + myLowerLimitActualTranslationX = theLowerLimitActualTranslationX; + } + else myLowerLimitActualTranslationX = 0; + + defUpperLimitActualTranslationX = hasUpperLimitActualTranslationX; + if (defUpperLimitActualTranslationX) { + myUpperLimitActualTranslationX = theUpperLimitActualTranslationX; + } + else myUpperLimitActualTranslationX = 0; + + defLowerLimitActualTranslationY = hasLowerLimitActualTranslationY; + if (defLowerLimitActualTranslationY) { + myLowerLimitActualTranslationY = theLowerLimitActualTranslationY; + } + else myLowerLimitActualTranslationY = 0; + + defUpperLimitActualTranslationY = hasUpperLimitActualTranslationY; + if (defUpperLimitActualTranslationY) { + myUpperLimitActualTranslationY = theUpperLimitActualTranslationY; + } + else myUpperLimitActualTranslationY = 0; +} + +//======================================================================= +//function : LowerLimitActualRotation +//purpose : +//======================================================================= +Standard_Real StepKinematics_PlanarPairWithRange::LowerLimitActualRotation () const +{ + return myLowerLimitActualRotation; +} + +//======================================================================= +//function : SetLowerLimitActualRotation +//purpose : +//======================================================================= +void StepKinematics_PlanarPairWithRange::SetLowerLimitActualRotation (const Standard_Real theLowerLimitActualRotation) +{ + myLowerLimitActualRotation = theLowerLimitActualRotation; +} + +//======================================================================= +//function : HasLowerLimitActualRotation +//purpose : +//======================================================================= +Standard_Boolean StepKinematics_PlanarPairWithRange::HasLowerLimitActualRotation () const +{ + return defLowerLimitActualRotation; +} + +//======================================================================= +//function : UpperLimitActualRotation +//purpose : +//======================================================================= +Standard_Real StepKinematics_PlanarPairWithRange::UpperLimitActualRotation () const +{ + return myUpperLimitActualRotation; +} + +//======================================================================= +//function : SetUpperLimitActualRotation +//purpose : +//======================================================================= +void StepKinematics_PlanarPairWithRange::SetUpperLimitActualRotation (const Standard_Real theUpperLimitActualRotation) +{ + myUpperLimitActualRotation = theUpperLimitActualRotation; +} + +//======================================================================= +//function : HasUpperLimitActualRotation +//purpose : +//======================================================================= +Standard_Boolean StepKinematics_PlanarPairWithRange::HasUpperLimitActualRotation () const +{ + return defUpperLimitActualRotation; +} + +//======================================================================= +//function : LowerLimitActualTranslationX +//purpose : +//======================================================================= +Standard_Real StepKinematics_PlanarPairWithRange::LowerLimitActualTranslationX () const +{ + return myLowerLimitActualTranslationX; +} + +//======================================================================= +//function : SetLowerLimitActualTranslationX +//purpose : +//======================================================================= +void StepKinematics_PlanarPairWithRange::SetLowerLimitActualTranslationX (const Standard_Real theLowerLimitActualTranslationX) +{ + myLowerLimitActualTranslationX = theLowerLimitActualTranslationX; +} + +//======================================================================= +//function : HasLowerLimitActualTranslationX +//purpose : +//======================================================================= +Standard_Boolean StepKinematics_PlanarPairWithRange::HasLowerLimitActualTranslationX () const +{ + return defLowerLimitActualTranslationX; +} + +//======================================================================= +//function : UpperLimitActualTranslationX +//purpose : +//======================================================================= +Standard_Real StepKinematics_PlanarPairWithRange::UpperLimitActualTranslationX () const +{ + return myUpperLimitActualTranslationX; +} + +//======================================================================= +//function : SetUpperLimitActualTranslationX +//purpose : +//======================================================================= +void StepKinematics_PlanarPairWithRange::SetUpperLimitActualTranslationX (const Standard_Real theUpperLimitActualTranslationX) +{ + myUpperLimitActualTranslationX = theUpperLimitActualTranslationX; +} + +//======================================================================= +//function : HasUpperLimitActualTranslationX +//purpose : +//======================================================================= +Standard_Boolean StepKinematics_PlanarPairWithRange::HasUpperLimitActualTranslationX () const +{ + return defUpperLimitActualTranslationX; +} + +//======================================================================= +//function : LowerLimitActualTranslationY +//purpose : +//======================================================================= +Standard_Real StepKinematics_PlanarPairWithRange::LowerLimitActualTranslationY () const +{ + return myLowerLimitActualTranslationY; +} + +//======================================================================= +//function : SetLowerLimitActualTranslationY +//purpose : +//======================================================================= +void StepKinematics_PlanarPairWithRange::SetLowerLimitActualTranslationY (const Standard_Real theLowerLimitActualTranslationY) +{ + myLowerLimitActualTranslationY = theLowerLimitActualTranslationY; +} + +//======================================================================= +//function : HasLowerLimitActualTranslationY +//purpose : +//======================================================================= +Standard_Boolean StepKinematics_PlanarPairWithRange::HasLowerLimitActualTranslationY () const +{ + return defLowerLimitActualTranslationY; +} + +//======================================================================= +//function : UpperLimitActualTranslationY +//purpose : +//======================================================================= +Standard_Real StepKinematics_PlanarPairWithRange::UpperLimitActualTranslationY () const +{ + return myUpperLimitActualTranslationY; +} + +//======================================================================= +//function : SetUpperLimitActualTranslationY +//purpose : +//======================================================================= +void StepKinematics_PlanarPairWithRange::SetUpperLimitActualTranslationY (const Standard_Real theUpperLimitActualTranslationY) +{ + myUpperLimitActualTranslationY = theUpperLimitActualTranslationY; +} + +//======================================================================= +//function : HasUpperLimitActualTranslationY +//purpose : +//======================================================================= +Standard_Boolean StepKinematics_PlanarPairWithRange::HasUpperLimitActualTranslationY () const +{ + return defUpperLimitActualTranslationY; +} diff --git a/src/StepKinematics/StepKinematics_PlanarPairWithRange.hxx b/src/StepKinematics/StepKinematics_PlanarPairWithRange.hxx new file mode 100644 index 0000000000..c7e9e9e0c7 --- /dev/null +++ b/src/StepKinematics/StepKinematics_PlanarPairWithRange.hxx @@ -0,0 +1,125 @@ +// Created on : Sat May 02 12:41:15 2020 +// Created by: Irina KRYLOVA +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V3.0 +// Copyright (c) Open CASCADE 2020 +// +// 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 _StepKinematics_PlanarPairWithRange_HeaderFile_ +#define _StepKinematics_PlanarPairWithRange_HeaderFile_ + +#include +#include +#include + +#include +#include +#include +#include + +DEFINE_STANDARD_HANDLE(StepKinematics_PlanarPairWithRange, StepKinematics_PlanarPair) + +//! Representation of STEP entity PlanarPairWithRange +class StepKinematics_PlanarPairWithRange : public StepKinematics_PlanarPair +{ +public : + + //! default constructor + Standard_EXPORT StepKinematics_PlanarPairWithRange(); + + //! Initialize all fields (own and inherited) + Standard_EXPORT void Init(const Handle(TCollection_HAsciiString)& theRepresentationItem_Name, + const Handle(TCollection_HAsciiString)& theItemDefinedTransformation_Name, + const Standard_Boolean hasItemDefinedTransformation_Description, + const Handle(TCollection_HAsciiString)& theItemDefinedTransformation_Description, + const Handle(StepRepr_RepresentationItem)& theItemDefinedTransformation_TransformItem1, + const Handle(StepRepr_RepresentationItem)& theItemDefinedTransformation_TransformItem2, + const Handle(StepKinematics_KinematicJoint)& theKinematicPair_Joint, + const Standard_Boolean theLowOrderKinematicPair_TX, + const Standard_Boolean theLowOrderKinematicPair_TY, + const Standard_Boolean theLowOrderKinematicPair_TZ, + const Standard_Boolean theLowOrderKinematicPair_RX, + const Standard_Boolean theLowOrderKinematicPair_RY, + const Standard_Boolean theLowOrderKinematicPair_RZ, + const Standard_Boolean hasLowerLimitActualRotation, + const Standard_Real theLowerLimitActualRotation, + const Standard_Boolean hasUpperLimitActualRotation, + const Standard_Real theUpperLimitActualRotation, + const Standard_Boolean hasLowerLimitActualTranslationX, + const Standard_Real theLowerLimitActualTranslationX, + const Standard_Boolean hasUpperLimitActualTranslationX, + const Standard_Real theUpperLimitActualTranslationX, + const Standard_Boolean hasLowerLimitActualTranslationY, + const Standard_Real theLowerLimitActualTranslationY, + const Standard_Boolean hasUpperLimitActualTranslationY, + const Standard_Real theUpperLimitActualTranslationY); + + //! Returns field LowerLimitActualRotation + Standard_EXPORT Standard_Real LowerLimitActualRotation() const; + //! Sets field LowerLimitActualRotation + Standard_EXPORT void SetLowerLimitActualRotation (const Standard_Real theLowerLimitActualRotation); + //! Returns True if optional field LowerLimitActualRotation is defined + Standard_EXPORT Standard_Boolean HasLowerLimitActualRotation() const; + + //! Returns field UpperLimitActualRotation + Standard_EXPORT Standard_Real UpperLimitActualRotation() const; + //! Sets field UpperLimitActualRotation + Standard_EXPORT void SetUpperLimitActualRotation (const Standard_Real theUpperLimitActualRotation); + //! Returns True if optional field UpperLimitActualRotation is defined + Standard_EXPORT Standard_Boolean HasUpperLimitActualRotation() const; + + //! Returns field LowerLimitActualTranslationX + Standard_EXPORT Standard_Real LowerLimitActualTranslationX() const; + //! Sets field LowerLimitActualTranslationX + Standard_EXPORT void SetLowerLimitActualTranslationX (const Standard_Real theLowerLimitActualTranslationX); + //! Returns True if optional field LowerLimitActualTranslationX is defined + Standard_EXPORT Standard_Boolean HasLowerLimitActualTranslationX() const; + + //! Returns field UpperLimitActualTranslationX + Standard_EXPORT Standard_Real UpperLimitActualTranslationX() const; + //! Sets field UpperLimitActualTranslationX + Standard_EXPORT void SetUpperLimitActualTranslationX (const Standard_Real theUpperLimitActualTranslationX); + //! Returns True if optional field UpperLimitActualTranslationX is defined + Standard_EXPORT Standard_Boolean HasUpperLimitActualTranslationX() const; + + //! Returns field LowerLimitActualTranslationY + Standard_EXPORT Standard_Real LowerLimitActualTranslationY() const; + //! Sets field LowerLimitActualTranslationY + Standard_EXPORT void SetLowerLimitActualTranslationY (const Standard_Real theLowerLimitActualTranslationY); + //! Returns True if optional field LowerLimitActualTranslationY is defined + Standard_EXPORT Standard_Boolean HasLowerLimitActualTranslationY() const; + + //! Returns field UpperLimitActualTranslationY + Standard_EXPORT Standard_Real UpperLimitActualTranslationY() const; + //! Sets field UpperLimitActualTranslationY + Standard_EXPORT void SetUpperLimitActualTranslationY (const Standard_Real theUpperLimitActualTranslationY); + //! Returns True if optional field UpperLimitActualTranslationY is defined + Standard_EXPORT Standard_Boolean HasUpperLimitActualTranslationY() const; + +DEFINE_STANDARD_RTTIEXT(StepKinematics_PlanarPairWithRange, StepKinematics_PlanarPair) + +private: + Standard_Real myLowerLimitActualRotation; //!< optional + Standard_Real myUpperLimitActualRotation; //!< optional + Standard_Real myLowerLimitActualTranslationX; //!< optional + Standard_Real myUpperLimitActualTranslationX; //!< optional + Standard_Real myLowerLimitActualTranslationY; //!< optional + Standard_Real myUpperLimitActualTranslationY; //!< optional + Standard_Boolean defLowerLimitActualRotation; //!< flag "is LowerLimitActualRotation defined" + Standard_Boolean defUpperLimitActualRotation; //!< flag "is UpperLimitActualRotation defined" + Standard_Boolean defLowerLimitActualTranslationX; //!< flag "is LowerLimitActualTranslationX defined" + Standard_Boolean defUpperLimitActualTranslationX; //!< flag "is UpperLimitActualTranslationX defined" + Standard_Boolean defLowerLimitActualTranslationY; //!< flag "is LowerLimitActualTranslationY defined" + Standard_Boolean defUpperLimitActualTranslationY; //!< flag "is UpperLimitActualTranslationY defined" + +}; +#endif // _StepKinematics_PlanarPairWithRange_HeaderFile_ diff --git a/src/StepKinematics/StepKinematics_PointOnPlanarCurvePair.cxx b/src/StepKinematics/StepKinematics_PointOnPlanarCurvePair.cxx new file mode 100644 index 0000000000..374a3e373c --- /dev/null +++ b/src/StepKinematics/StepKinematics_PointOnPlanarCurvePair.cxx @@ -0,0 +1,90 @@ +// Created on : Sat May 02 12:41:15 2020 +// Created by: Irina KRYLOVA +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V3.0 +// Copyright (c) Open CASCADE 2020 +// +// This file is part of Open CASCADE Technology software library. +// +// This library is free software; you can redistribute it and/or modify it under +// the terms of the GNU Lesser General Public License version 2.1 as published +// by the Free Software Foundation, with special exception defined in the file +// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT +// distribution for complete text of the license and disclaimer of any warranty. +// +// Alternatively, this file may be used under the terms of Open CASCADE +// commercial license or contractual agreement. + +#include + +IMPLEMENT_STANDARD_RTTIEXT(StepKinematics_PointOnPlanarCurvePair, StepKinematics_HighOrderKinematicPair) + +//======================================================================= +//function : StepKinematics_PointOnPlanarCurvePair +//purpose : +//======================================================================= +StepKinematics_PointOnPlanarCurvePair::StepKinematics_PointOnPlanarCurvePair () +{ +} + +//======================================================================= +//function : Init +//purpose : +//======================================================================= +void StepKinematics_PointOnPlanarCurvePair::Init (const Handle(TCollection_HAsciiString)& theRepresentationItem_Name, + const Handle(TCollection_HAsciiString)& theItemDefinedTransformation_Name, + const Standard_Boolean hasItemDefinedTransformation_Description, + const Handle(TCollection_HAsciiString)& theItemDefinedTransformation_Description, + const Handle(StepRepr_RepresentationItem)& theItemDefinedTransformation_TransformItem1, + const Handle(StepRepr_RepresentationItem)& theItemDefinedTransformation_TransformItem2, + const Handle(StepKinematics_KinematicJoint)& theKinematicPair_Joint, + const Handle(StepGeom_Curve)& thePairCurve, + const Standard_Boolean theOrientation) +{ + StepKinematics_HighOrderKinematicPair::Init(theRepresentationItem_Name, + theItemDefinedTransformation_Name, + hasItemDefinedTransformation_Description, + theItemDefinedTransformation_Description, + theItemDefinedTransformation_TransformItem1, + theItemDefinedTransformation_TransformItem2, + theKinematicPair_Joint); + + myPairCurve = thePairCurve; + + myOrientation = theOrientation; +} + +//======================================================================= +//function : PairCurve +//purpose : +//======================================================================= +Handle(StepGeom_Curve) StepKinematics_PointOnPlanarCurvePair::PairCurve () const +{ + return myPairCurve; +} + +//======================================================================= +//function : SetPairCurve +//purpose : +//======================================================================= +void StepKinematics_PointOnPlanarCurvePair::SetPairCurve (const Handle(StepGeom_Curve)& thePairCurve) +{ + myPairCurve = thePairCurve; +} + +//======================================================================= +//function : Orientation +//purpose : +//======================================================================= +Standard_Boolean StepKinematics_PointOnPlanarCurvePair::Orientation () const +{ + return myOrientation; +} + +//======================================================================= +//function : SetOrientation +//purpose : +//======================================================================= +void StepKinematics_PointOnPlanarCurvePair::SetOrientation (const Standard_Boolean theOrientation) +{ + myOrientation = theOrientation; +} diff --git a/src/StepKinematics/StepKinematics_PointOnPlanarCurvePair.hxx b/src/StepKinematics/StepKinematics_PointOnPlanarCurvePair.hxx new file mode 100644 index 0000000000..c01368abf2 --- /dev/null +++ b/src/StepKinematics/StepKinematics_PointOnPlanarCurvePair.hxx @@ -0,0 +1,68 @@ +// Created on : Sat May 02 12:41:15 2020 +// Created by: Irina KRYLOVA +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V3.0 +// Copyright (c) Open CASCADE 2020 +// +// 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 _StepKinematics_PointOnPlanarCurvePair_HeaderFile_ +#define _StepKinematics_PointOnPlanarCurvePair_HeaderFile_ + +#include +#include +#include + +#include +#include +#include +#include +#include + +DEFINE_STANDARD_HANDLE(StepKinematics_PointOnPlanarCurvePair, StepKinematics_HighOrderKinematicPair) + +//! Representation of STEP entity PointOnPlanarCurvePair +class StepKinematics_PointOnPlanarCurvePair : public StepKinematics_HighOrderKinematicPair +{ +public : + + //! default constructor + Standard_EXPORT StepKinematics_PointOnPlanarCurvePair(); + + //! Initialize all fields (own and inherited) + Standard_EXPORT void Init(const Handle(TCollection_HAsciiString)& theRepresentationItem_Name, + const Handle(TCollection_HAsciiString)& theItemDefinedTransformation_Name, + const Standard_Boolean hasItemDefinedTransformation_Description, + const Handle(TCollection_HAsciiString)& theItemDefinedTransformation_Description, + const Handle(StepRepr_RepresentationItem)& theItemDefinedTransformation_TransformItem1, + const Handle(StepRepr_RepresentationItem)& theItemDefinedTransformation_TransformItem2, + const Handle(StepKinematics_KinematicJoint)& theKinematicPair_Joint, + const Handle(StepGeom_Curve)& thePairCurve, + const Standard_Boolean theOrientation); + + //! Returns field PairCurve + Standard_EXPORT Handle(StepGeom_Curve) PairCurve() const; + //! Sets field PairCurve + Standard_EXPORT void SetPairCurve (const Handle(StepGeom_Curve)& thePairCurve); + + //! Returns field Orientation + Standard_EXPORT Standard_Boolean Orientation() const; + //! Sets field Orientation + Standard_EXPORT void SetOrientation (const Standard_Boolean theOrientation); + +DEFINE_STANDARD_RTTIEXT(StepKinematics_PointOnPlanarCurvePair, StepKinematics_HighOrderKinematicPair) + +private: + Handle(StepGeom_Curve) myPairCurve; + Standard_Boolean myOrientation; + +}; +#endif // _StepKinematics_PointOnPlanarCurvePair_HeaderFile_ diff --git a/src/StepKinematics/StepKinematics_PointOnPlanarCurvePairValue.cxx b/src/StepKinematics/StepKinematics_PointOnPlanarCurvePairValue.cxx new file mode 100644 index 0000000000..32732cf39b --- /dev/null +++ b/src/StepKinematics/StepKinematics_PointOnPlanarCurvePairValue.cxx @@ -0,0 +1,80 @@ +// Created on : Sat May 02 12:41:15 2020 +// Created by: Irina KRYLOVA +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V3.0 +// Copyright (c) Open CASCADE 2020 +// +// This file is part of Open CASCADE Technology software library. +// +// This library is free software; you can redistribute it and/or modify it under +// the terms of the GNU Lesser General Public License version 2.1 as published +// by the Free Software Foundation, with special exception defined in the file +// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT +// distribution for complete text of the license and disclaimer of any warranty. +// +// Alternatively, this file may be used under the terms of Open CASCADE +// commercial license or contractual agreement. + +#include + +IMPLEMENT_STANDARD_RTTIEXT(StepKinematics_PointOnPlanarCurvePairValue, StepKinematics_PairValue) + +//======================================================================= +//function : StepKinematics_PointOnPlanarCurvePairValue +//purpose : +//======================================================================= +StepKinematics_PointOnPlanarCurvePairValue::StepKinematics_PointOnPlanarCurvePairValue () +{ +} + +//======================================================================= +//function : Init +//purpose : +//======================================================================= +void StepKinematics_PointOnPlanarCurvePairValue::Init (const Handle(TCollection_HAsciiString)& theRepresentationItem_Name, + const Handle(StepKinematics_KinematicPair)& thePairValue_AppliesToPair, + const Handle(StepGeom_PointOnCurve)& theActualPointOnCurve, + const StepKinematics_SpatialRotation& theInputOrientation) +{ + StepKinematics_PairValue::Init(theRepresentationItem_Name, + thePairValue_AppliesToPair); + + myActualPointOnCurve = theActualPointOnCurve; + + myInputOrientation = theInputOrientation; +} + +//======================================================================= +//function : ActualPointOnCurve +//purpose : +//======================================================================= +Handle(StepGeom_PointOnCurve) StepKinematics_PointOnPlanarCurvePairValue::ActualPointOnCurve () const +{ + return myActualPointOnCurve; +} + +//======================================================================= +//function : SetActualPointOnCurve +//purpose : +//======================================================================= +void StepKinematics_PointOnPlanarCurvePairValue::SetActualPointOnCurve (const Handle(StepGeom_PointOnCurve)& theActualPointOnCurve) +{ + myActualPointOnCurve = theActualPointOnCurve; +} + +//======================================================================= +//function : InputOrientation +//purpose : +//======================================================================= +StepKinematics_SpatialRotation StepKinematics_PointOnPlanarCurvePairValue::InputOrientation () const +{ + return myInputOrientation; +} + +//======================================================================= +//function : SetInputOrientation +//purpose : +//======================================================================= +void StepKinematics_PointOnPlanarCurvePairValue::SetInputOrientation (const StepKinematics_SpatialRotation& theInputOrientation) +{ + myInputOrientation = theInputOrientation; +} diff --git a/src/StepKinematics/StepKinematics_PointOnPlanarCurvePairValue.hxx b/src/StepKinematics/StepKinematics_PointOnPlanarCurvePairValue.hxx new file mode 100644 index 0000000000..264620b623 --- /dev/null +++ b/src/StepKinematics/StepKinematics_PointOnPlanarCurvePairValue.hxx @@ -0,0 +1,62 @@ +// Created on : Sat May 02 12:41:15 2020 +// Created by: Irina KRYLOVA +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V3.0 +// Copyright (c) Open CASCADE 2020 +// +// 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 _StepKinematics_PointOnPlanarCurvePairValue_HeaderFile_ +#define _StepKinematics_PointOnPlanarCurvePairValue_HeaderFile_ + +#include +#include +#include + +#include +#include +#include +#include + +DEFINE_STANDARD_HANDLE(StepKinematics_PointOnPlanarCurvePairValue, StepKinematics_PairValue) + +//! Representation of STEP entity PointOnPlanarCurvePairValue +class StepKinematics_PointOnPlanarCurvePairValue : public StepKinematics_PairValue +{ +public : + + //! default constructor + Standard_EXPORT StepKinematics_PointOnPlanarCurvePairValue(); + + //! Initialize all fields (own and inherited) + Standard_EXPORT void Init(const Handle(TCollection_HAsciiString)& theRepresentationItem_Name, + const Handle(StepKinematics_KinematicPair)& thePairValue_AppliesToPair, + const Handle(StepGeom_PointOnCurve)& theActualPointOnCurve, + const StepKinematics_SpatialRotation& theInputOrientation); + + //! Returns field ActualPointOnCurve + Standard_EXPORT Handle(StepGeom_PointOnCurve) ActualPointOnCurve() const; + //! Sets field ActualPointOnCurve + Standard_EXPORT void SetActualPointOnCurve (const Handle(StepGeom_PointOnCurve)& theActualPointOnCurve); + + //! Returns field InputOrientation + Standard_EXPORT StepKinematics_SpatialRotation InputOrientation() const; + //! Sets field InputOrientation + Standard_EXPORT void SetInputOrientation (const StepKinematics_SpatialRotation& theInputOrientation); + +DEFINE_STANDARD_RTTIEXT(StepKinematics_PointOnPlanarCurvePairValue, StepKinematics_PairValue) + +private: + Handle(StepGeom_PointOnCurve) myActualPointOnCurve; + StepKinematics_SpatialRotation myInputOrientation; + +}; +#endif // _StepKinematics_PointOnPlanarCurvePairValue_HeaderFile_ diff --git a/src/StepKinematics/StepKinematics_PointOnPlanarCurvePairWithRange.cxx b/src/StepKinematics/StepKinematics_PointOnPlanarCurvePairWithRange.cxx new file mode 100644 index 0000000000..e6027ad144 --- /dev/null +++ b/src/StepKinematics/StepKinematics_PointOnPlanarCurvePairWithRange.cxx @@ -0,0 +1,289 @@ +// Created on : Sat May 02 12:41:15 2020 +// Created by: Irina KRYLOVA +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V3.0 +// Copyright (c) Open CASCADE 2020 +// +// This file is part of Open CASCADE Technology software library. +// +// This library is free software; you can redistribute it and/or modify it under +// the terms of the GNU Lesser General Public License version 2.1 as published +// by the Free Software Foundation, with special exception defined in the file +// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT +// distribution for complete text of the license and disclaimer of any warranty. +// +// Alternatively, this file may be used under the terms of Open CASCADE +// commercial license or contractual agreement. + +#include + +IMPLEMENT_STANDARD_RTTIEXT(StepKinematics_PointOnPlanarCurvePairWithRange, StepKinematics_PointOnPlanarCurvePair) + +//======================================================================= +//function : StepKinematics_PointOnPlanarCurvePairWithRange +//purpose : +//======================================================================= +StepKinematics_PointOnPlanarCurvePairWithRange::StepKinematics_PointOnPlanarCurvePairWithRange () +{ + defLowerLimitYaw = Standard_False; + defUpperLimitYaw = Standard_False; + defLowerLimitPitch = Standard_False; + defUpperLimitPitch = Standard_False; + defLowerLimitRoll = Standard_False; + defUpperLimitRoll = Standard_False; +} + +//======================================================================= +//function : Init +//purpose : +//======================================================================= +void StepKinematics_PointOnPlanarCurvePairWithRange::Init (const Handle(TCollection_HAsciiString)& theRepresentationItem_Name, + const Handle(TCollection_HAsciiString)& theItemDefinedTransformation_Name, + const Standard_Boolean hasItemDefinedTransformation_Description, + const Handle(TCollection_HAsciiString)& theItemDefinedTransformation_Description, + const Handle(StepRepr_RepresentationItem)& theItemDefinedTransformation_TransformItem1, + const Handle(StepRepr_RepresentationItem)& theItemDefinedTransformation_TransformItem2, + const Handle(StepKinematics_KinematicJoint)& theKinematicPair_Joint, + const Handle(StepGeom_Curve)& thePointOnPlanarCurvePair_PairCurve, + const Standard_Boolean thePointOnPlanarCurvePair_Orientation, + const Handle(StepGeom_TrimmedCurve)& theRangeOnPairCurve, + const Standard_Boolean hasLowerLimitYaw, + const Standard_Real theLowerLimitYaw, + const Standard_Boolean hasUpperLimitYaw, + const Standard_Real theUpperLimitYaw, + const Standard_Boolean hasLowerLimitPitch, + const Standard_Real theLowerLimitPitch, + const Standard_Boolean hasUpperLimitPitch, + const Standard_Real theUpperLimitPitch, + const Standard_Boolean hasLowerLimitRoll, + const Standard_Real theLowerLimitRoll, + const Standard_Boolean hasUpperLimitRoll, + const Standard_Real theUpperLimitRoll) +{ + StepKinematics_PointOnPlanarCurvePair::Init(theRepresentationItem_Name, + theItemDefinedTransformation_Name, + hasItemDefinedTransformation_Description, + theItemDefinedTransformation_Description, + theItemDefinedTransformation_TransformItem1, + theItemDefinedTransformation_TransformItem2, + theKinematicPair_Joint, + thePointOnPlanarCurvePair_PairCurve, + thePointOnPlanarCurvePair_Orientation); + + myRangeOnPairCurve = theRangeOnPairCurve; + + defLowerLimitYaw = hasLowerLimitYaw; + if (defLowerLimitYaw) { + myLowerLimitYaw = theLowerLimitYaw; + } + else myLowerLimitYaw = 0; + + defUpperLimitYaw = hasUpperLimitYaw; + if (defUpperLimitYaw) { + myUpperLimitYaw = theUpperLimitYaw; + } + else myUpperLimitYaw = 0; + + defLowerLimitPitch = hasLowerLimitPitch; + if (defLowerLimitPitch) { + myLowerLimitPitch = theLowerLimitPitch; + } + else myLowerLimitPitch = 0; + + defUpperLimitPitch = hasUpperLimitPitch; + if (defUpperLimitPitch) { + myUpperLimitPitch = theUpperLimitPitch; + } + else myUpperLimitPitch = 0; + + defLowerLimitRoll = hasLowerLimitRoll; + if (defLowerLimitRoll) { + myLowerLimitRoll = theLowerLimitRoll; + } + else myLowerLimitRoll = 0; + + defUpperLimitRoll = hasUpperLimitRoll; + if (defUpperLimitRoll) { + myUpperLimitRoll = theUpperLimitRoll; + } + else myUpperLimitRoll = 0; +} + +//======================================================================= +//function : RangeOnPairCurve +//purpose : +//======================================================================= +Handle(StepGeom_TrimmedCurve) StepKinematics_PointOnPlanarCurvePairWithRange::RangeOnPairCurve () const +{ + return myRangeOnPairCurve; +} + +//======================================================================= +//function : SetRangeOnPairCurve +//purpose : +//======================================================================= +void StepKinematics_PointOnPlanarCurvePairWithRange::SetRangeOnPairCurve (const Handle(StepGeom_TrimmedCurve)& theRangeOnPairCurve) +{ + myRangeOnPairCurve = theRangeOnPairCurve; +} + +//======================================================================= +//function : LowerLimitYaw +//purpose : +//======================================================================= +Standard_Real StepKinematics_PointOnPlanarCurvePairWithRange::LowerLimitYaw () const +{ + return myLowerLimitYaw; +} + +//======================================================================= +//function : SetLowerLimitYaw +//purpose : +//======================================================================= +void StepKinematics_PointOnPlanarCurvePairWithRange::SetLowerLimitYaw (const Standard_Real theLowerLimitYaw) +{ + myLowerLimitYaw = theLowerLimitYaw; +} + +//======================================================================= +//function : HasLowerLimitYaw +//purpose : +//======================================================================= +Standard_Boolean StepKinematics_PointOnPlanarCurvePairWithRange::HasLowerLimitYaw () const +{ + return defLowerLimitYaw; +} + +//======================================================================= +//function : UpperLimitYaw +//purpose : +//======================================================================= +Standard_Real StepKinematics_PointOnPlanarCurvePairWithRange::UpperLimitYaw () const +{ + return myUpperLimitYaw; +} + +//======================================================================= +//function : SetUpperLimitYaw +//purpose : +//======================================================================= +void StepKinematics_PointOnPlanarCurvePairWithRange::SetUpperLimitYaw (const Standard_Real theUpperLimitYaw) +{ + myUpperLimitYaw = theUpperLimitYaw; +} + +//======================================================================= +//function : HasUpperLimitYaw +//purpose : +//======================================================================= +Standard_Boolean StepKinematics_PointOnPlanarCurvePairWithRange::HasUpperLimitYaw () const +{ + return defUpperLimitYaw; +} + +//======================================================================= +//function : LowerLimitPitch +//purpose : +//======================================================================= +Standard_Real StepKinematics_PointOnPlanarCurvePairWithRange::LowerLimitPitch () const +{ + return myLowerLimitPitch; +} + +//======================================================================= +//function : SetLowerLimitPitch +//purpose : +//======================================================================= +void StepKinematics_PointOnPlanarCurvePairWithRange::SetLowerLimitPitch (const Standard_Real theLowerLimitPitch) +{ + myLowerLimitPitch = theLowerLimitPitch; +} + +//======================================================================= +//function : HasLowerLimitPitch +//purpose : +//======================================================================= +Standard_Boolean StepKinematics_PointOnPlanarCurvePairWithRange::HasLowerLimitPitch () const +{ + return defLowerLimitPitch; +} + +//======================================================================= +//function : UpperLimitPitch +//purpose : +//======================================================================= +Standard_Real StepKinematics_PointOnPlanarCurvePairWithRange::UpperLimitPitch () const +{ + return myUpperLimitPitch; +} + +//======================================================================= +//function : SetUpperLimitPitch +//purpose : +//======================================================================= +void StepKinematics_PointOnPlanarCurvePairWithRange::SetUpperLimitPitch (const Standard_Real theUpperLimitPitch) +{ + myUpperLimitPitch = theUpperLimitPitch; +} + +//======================================================================= +//function : HasUpperLimitPitch +//purpose : +//======================================================================= +Standard_Boolean StepKinematics_PointOnPlanarCurvePairWithRange::HasUpperLimitPitch () const +{ + return defUpperLimitPitch; +} + +//======================================================================= +//function : LowerLimitRoll +//purpose : +//======================================================================= +Standard_Real StepKinematics_PointOnPlanarCurvePairWithRange::LowerLimitRoll () const +{ + return myLowerLimitRoll; +} + +//======================================================================= +//function : SetLowerLimitRoll +//purpose : +//======================================================================= +void StepKinematics_PointOnPlanarCurvePairWithRange::SetLowerLimitRoll (const Standard_Real theLowerLimitRoll) +{ + myLowerLimitRoll = theLowerLimitRoll; +} + +//======================================================================= +//function : HasLowerLimitRoll +//purpose : +//======================================================================= +Standard_Boolean StepKinematics_PointOnPlanarCurvePairWithRange::HasLowerLimitRoll () const +{ + return defLowerLimitRoll; +} + +//======================================================================= +//function : UpperLimitRoll +//purpose : +//======================================================================= +Standard_Real StepKinematics_PointOnPlanarCurvePairWithRange::UpperLimitRoll () const +{ + return myUpperLimitRoll; +} + +//======================================================================= +//function : SetUpperLimitRoll +//purpose : +//======================================================================= +void StepKinematics_PointOnPlanarCurvePairWithRange::SetUpperLimitRoll (const Standard_Real theUpperLimitRoll) +{ + myUpperLimitRoll = theUpperLimitRoll; +} + +//======================================================================= +//function : HasUpperLimitRoll +//purpose : +//======================================================================= +Standard_Boolean StepKinematics_PointOnPlanarCurvePairWithRange::HasUpperLimitRoll () const +{ + return defUpperLimitRoll; +} diff --git a/src/StepKinematics/StepKinematics_PointOnPlanarCurvePairWithRange.hxx b/src/StepKinematics/StepKinematics_PointOnPlanarCurvePairWithRange.hxx new file mode 100644 index 0000000000..0289cfe040 --- /dev/null +++ b/src/StepKinematics/StepKinematics_PointOnPlanarCurvePairWithRange.hxx @@ -0,0 +1,130 @@ +// Created on : Sat May 02 12:41:15 2020 +// Created by: Irina KRYLOVA +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V3.0 +// Copyright (c) Open CASCADE 2020 +// +// 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 _StepKinematics_PointOnPlanarCurvePairWithRange_HeaderFile_ +#define _StepKinematics_PointOnPlanarCurvePairWithRange_HeaderFile_ + +#include +#include +#include + +#include +#include +#include +#include +#include +#include + +DEFINE_STANDARD_HANDLE(StepKinematics_PointOnPlanarCurvePairWithRange, StepKinematics_PointOnPlanarCurvePair) + +//! Representation of STEP entity PointOnPlanarCurvePairWithRange +class StepKinematics_PointOnPlanarCurvePairWithRange : public StepKinematics_PointOnPlanarCurvePair +{ +public : + + //! default constructor + Standard_EXPORT StepKinematics_PointOnPlanarCurvePairWithRange(); + + //! Initialize all fields (own and inherited) + Standard_EXPORT void Init(const Handle(TCollection_HAsciiString)& theRepresentationItem_Name, + const Handle(TCollection_HAsciiString)& theItemDefinedTransformation_Name, + const Standard_Boolean hasItemDefinedTransformation_Description, + const Handle(TCollection_HAsciiString)& theItemDefinedTransformation_Description, + const Handle(StepRepr_RepresentationItem)& theItemDefinedTransformation_TransformItem1, + const Handle(StepRepr_RepresentationItem)& theItemDefinedTransformation_TransformItem2, + const Handle(StepKinematics_KinematicJoint)& theKinematicPair_Joint, + const Handle(StepGeom_Curve)& thePointOnPlanarCurvePair_PairCurve, + const Standard_Boolean thePointOnPlanarCurvePair_Orientation, + const Handle(StepGeom_TrimmedCurve)& theRangeOnPairCurve, + const Standard_Boolean hasLowerLimitYaw, + const Standard_Real theLowerLimitYaw, + const Standard_Boolean hasUpperLimitYaw, + const Standard_Real theUpperLimitYaw, + const Standard_Boolean hasLowerLimitPitch, + const Standard_Real theLowerLimitPitch, + const Standard_Boolean hasUpperLimitPitch, + const Standard_Real theUpperLimitPitch, + const Standard_Boolean hasLowerLimitRoll, + const Standard_Real theLowerLimitRoll, + const Standard_Boolean hasUpperLimitRoll, + const Standard_Real theUpperLimitRoll); + + //! Returns field RangeOnPairCurve + Standard_EXPORT Handle(StepGeom_TrimmedCurve) RangeOnPairCurve() const; + //! Sets field RangeOnPairCurve + Standard_EXPORT void SetRangeOnPairCurve (const Handle(StepGeom_TrimmedCurve)& theRangeOnPairCurve); + + //! Returns field LowerLimitYaw + Standard_EXPORT Standard_Real LowerLimitYaw() const; + //! Sets field LowerLimitYaw + Standard_EXPORT void SetLowerLimitYaw (const Standard_Real theLowerLimitYaw); + //! Returns True if optional field LowerLimitYaw is defined + Standard_EXPORT Standard_Boolean HasLowerLimitYaw() const; + + //! Returns field UpperLimitYaw + Standard_EXPORT Standard_Real UpperLimitYaw() const; + //! Sets field UpperLimitYaw + Standard_EXPORT void SetUpperLimitYaw (const Standard_Real theUpperLimitYaw); + //! Returns True if optional field UpperLimitYaw is defined + Standard_EXPORT Standard_Boolean HasUpperLimitYaw() const; + + //! Returns field LowerLimitPitch + Standard_EXPORT Standard_Real LowerLimitPitch() const; + //! Sets field LowerLimitPitch + Standard_EXPORT void SetLowerLimitPitch (const Standard_Real theLowerLimitPitch); + //! Returns True if optional field LowerLimitPitch is defined + Standard_EXPORT Standard_Boolean HasLowerLimitPitch() const; + + //! Returns field UpperLimitPitch + Standard_EXPORT Standard_Real UpperLimitPitch() const; + //! Sets field UpperLimitPitch + Standard_EXPORT void SetUpperLimitPitch (const Standard_Real theUpperLimitPitch); + //! Returns True if optional field UpperLimitPitch is defined + Standard_EXPORT Standard_Boolean HasUpperLimitPitch() const; + + //! Returns field LowerLimitRoll + Standard_EXPORT Standard_Real LowerLimitRoll() const; + //! Sets field LowerLimitRoll + Standard_EXPORT void SetLowerLimitRoll (const Standard_Real theLowerLimitRoll); + //! Returns True if optional field LowerLimitRoll is defined + Standard_EXPORT Standard_Boolean HasLowerLimitRoll() const; + + //! Returns field UpperLimitRoll + Standard_EXPORT Standard_Real UpperLimitRoll() const; + //! Sets field UpperLimitRoll + Standard_EXPORT void SetUpperLimitRoll (const Standard_Real theUpperLimitRoll); + //! Returns True if optional field UpperLimitRoll is defined + Standard_EXPORT Standard_Boolean HasUpperLimitRoll() const; + +DEFINE_STANDARD_RTTIEXT(StepKinematics_PointOnPlanarCurvePairWithRange, StepKinematics_PointOnPlanarCurvePair) + +private: + Handle(StepGeom_TrimmedCurve) myRangeOnPairCurve; + Standard_Real myLowerLimitYaw; //!< optional + Standard_Real myUpperLimitYaw; //!< optional + Standard_Real myLowerLimitPitch; //!< optional + Standard_Real myUpperLimitPitch; //!< optional + Standard_Real myLowerLimitRoll; //!< optional + Standard_Real myUpperLimitRoll; //!< optional + Standard_Boolean defLowerLimitYaw; //!< flag "is LowerLimitYaw defined" + Standard_Boolean defUpperLimitYaw; //!< flag "is UpperLimitYaw defined" + Standard_Boolean defLowerLimitPitch; //!< flag "is LowerLimitPitch defined" + Standard_Boolean defUpperLimitPitch; //!< flag "is UpperLimitPitch defined" + Standard_Boolean defLowerLimitRoll; //!< flag "is LowerLimitRoll defined" + Standard_Boolean defUpperLimitRoll; //!< flag "is UpperLimitRoll defined" + +}; +#endif // _StepKinematics_PointOnPlanarCurvePairWithRange_HeaderFile_ diff --git a/src/StepKinematics/StepKinematics_PointOnSurfacePair.cxx b/src/StepKinematics/StepKinematics_PointOnSurfacePair.cxx new file mode 100644 index 0000000000..9809478aab --- /dev/null +++ b/src/StepKinematics/StepKinematics_PointOnSurfacePair.cxx @@ -0,0 +1,69 @@ +// Created on : Sat May 02 12:41:15 2020 +// Created by: Irina KRYLOVA +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V3.0 +// Copyright (c) Open CASCADE 2020 +// +// This file is part of Open CASCADE Technology software library. +// +// This library is free software; you can redistribute it and/or modify it under +// the terms of the GNU Lesser General Public License version 2.1 as published +// by the Free Software Foundation, with special exception defined in the file +// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT +// distribution for complete text of the license and disclaimer of any warranty. +// +// Alternatively, this file may be used under the terms of Open CASCADE +// commercial license or contractual agreement. + +#include + +IMPLEMENT_STANDARD_RTTIEXT(StepKinematics_PointOnSurfacePair, StepKinematics_HighOrderKinematicPair) + +//======================================================================= +//function : StepKinematics_PointOnSurfacePair +//purpose : +//======================================================================= +StepKinematics_PointOnSurfacePair::StepKinematics_PointOnSurfacePair () +{ +} + +//======================================================================= +//function : Init +//purpose : +//======================================================================= +void StepKinematics_PointOnSurfacePair::Init (const Handle(TCollection_HAsciiString)& theRepresentationItem_Name, + const Handle(TCollection_HAsciiString)& theItemDefinedTransformation_Name, + const Standard_Boolean hasItemDefinedTransformation_Description, + const Handle(TCollection_HAsciiString)& theItemDefinedTransformation_Description, + const Handle(StepRepr_RepresentationItem)& theItemDefinedTransformation_TransformItem1, + const Handle(StepRepr_RepresentationItem)& theItemDefinedTransformation_TransformItem2, + const Handle(StepKinematics_KinematicJoint)& theKinematicPair_Joint, + const Handle(StepGeom_Surface)& thePairSurface) +{ + StepKinematics_HighOrderKinematicPair::Init(theRepresentationItem_Name, + theItemDefinedTransformation_Name, + hasItemDefinedTransformation_Description, + theItemDefinedTransformation_Description, + theItemDefinedTransformation_TransformItem1, + theItemDefinedTransformation_TransformItem2, + theKinematicPair_Joint); + + myPairSurface = thePairSurface; +} + +//======================================================================= +//function : PairSurface +//purpose : +//======================================================================= +Handle(StepGeom_Surface) StepKinematics_PointOnSurfacePair::PairSurface () const +{ + return myPairSurface; +} + +//======================================================================= +//function : SetPairSurface +//purpose : +//======================================================================= +void StepKinematics_PointOnSurfacePair::SetPairSurface (const Handle(StepGeom_Surface)& thePairSurface) +{ + myPairSurface = thePairSurface; +} diff --git a/src/StepKinematics/StepKinematics_PointOnSurfacePair.hxx b/src/StepKinematics/StepKinematics_PointOnSurfacePair.hxx new file mode 100644 index 0000000000..b54396e3c8 --- /dev/null +++ b/src/StepKinematics/StepKinematics_PointOnSurfacePair.hxx @@ -0,0 +1,61 @@ +// Created on : Sat May 02 12:41:15 2020 +// Created by: Irina KRYLOVA +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V3.0 +// Copyright (c) Open CASCADE 2020 +// +// 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 _StepKinematics_PointOnSurfacePair_HeaderFile_ +#define _StepKinematics_PointOnSurfacePair_HeaderFile_ + +#include +#include +#include + +#include +#include +#include +#include +#include + +DEFINE_STANDARD_HANDLE(StepKinematics_PointOnSurfacePair, StepKinematics_HighOrderKinematicPair) + +//! Representation of STEP entity PointOnSurfacePair +class StepKinematics_PointOnSurfacePair : public StepKinematics_HighOrderKinematicPair +{ +public : + + //! default constructor + Standard_EXPORT StepKinematics_PointOnSurfacePair(); + + //! Initialize all fields (own and inherited) + Standard_EXPORT void Init(const Handle(TCollection_HAsciiString)& theRepresentationItem_Name, + const Handle(TCollection_HAsciiString)& theItemDefinedTransformation_Name, + const Standard_Boolean hasItemDefinedTransformation_Description, + const Handle(TCollection_HAsciiString)& theItemDefinedTransformation_Description, + const Handle(StepRepr_RepresentationItem)& theItemDefinedTransformation_TransformItem1, + const Handle(StepRepr_RepresentationItem)& theItemDefinedTransformation_TransformItem2, + const Handle(StepKinematics_KinematicJoint)& theKinematicPair_Joint, + const Handle(StepGeom_Surface)& thePairSurface); + + //! Returns field PairSurface + Standard_EXPORT Handle(StepGeom_Surface) PairSurface() const; + //! Sets field PairSurface + Standard_EXPORT void SetPairSurface (const Handle(StepGeom_Surface)& thePairSurface); + +DEFINE_STANDARD_RTTIEXT(StepKinematics_PointOnSurfacePair, StepKinematics_HighOrderKinematicPair) + +private: + Handle(StepGeom_Surface) myPairSurface; + +}; +#endif // _StepKinematics_PointOnSurfacePair_HeaderFile_ diff --git a/src/StepKinematics/StepKinematics_PointOnSurfacePairValue.cxx b/src/StepKinematics/StepKinematics_PointOnSurfacePairValue.cxx new file mode 100644 index 0000000000..81e7308a05 --- /dev/null +++ b/src/StepKinematics/StepKinematics_PointOnSurfacePairValue.cxx @@ -0,0 +1,80 @@ +// Created on : Sat May 02 12:41:15 2020 +// Created by: Irina KRYLOVA +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V3.0 +// Copyright (c) Open CASCADE 2020 +// +// This file is part of Open CASCADE Technology software library. +// +// This library is free software; you can redistribute it and/or modify it under +// the terms of the GNU Lesser General Public License version 2.1 as published +// by the Free Software Foundation, with special exception defined in the file +// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT +// distribution for complete text of the license and disclaimer of any warranty. +// +// Alternatively, this file may be used under the terms of Open CASCADE +// commercial license or contractual agreement. + +#include + +IMPLEMENT_STANDARD_RTTIEXT(StepKinematics_PointOnSurfacePairValue, StepKinematics_PairValue) + +//======================================================================= +//function : StepKinematics_PointOnSurfacePairValue +//purpose : +//======================================================================= +StepKinematics_PointOnSurfacePairValue::StepKinematics_PointOnSurfacePairValue () +{ +} + +//======================================================================= +//function : Init +//purpose : +//======================================================================= +void StepKinematics_PointOnSurfacePairValue::Init (const Handle(TCollection_HAsciiString)& theRepresentationItem_Name, + const Handle(StepKinematics_KinematicPair)& thePairValue_AppliesToPair, + const Handle(StepGeom_PointOnSurface)& theActualPointOnSurface, + const StepKinematics_SpatialRotation& theInputOrientation) +{ + StepKinematics_PairValue::Init(theRepresentationItem_Name, + thePairValue_AppliesToPair); + + myActualPointOnSurface = theActualPointOnSurface; + + myInputOrientation = theInputOrientation; +} + +//======================================================================= +//function : ActualPointOnSurface +//purpose : +//======================================================================= +Handle(StepGeom_PointOnSurface) StepKinematics_PointOnSurfacePairValue::ActualPointOnSurface () const +{ + return myActualPointOnSurface; +} + +//======================================================================= +//function : SetActualPointOnSurface +//purpose : +//======================================================================= +void StepKinematics_PointOnSurfacePairValue::SetActualPointOnSurface (const Handle(StepGeom_PointOnSurface)& theActualPointOnSurface) +{ + myActualPointOnSurface = theActualPointOnSurface; +} + +//======================================================================= +//function : InputOrientation +//purpose : +//======================================================================= +StepKinematics_SpatialRotation StepKinematics_PointOnSurfacePairValue::InputOrientation () const +{ + return myInputOrientation; +} + +//======================================================================= +//function : SetInputOrientation +//purpose : +//======================================================================= +void StepKinematics_PointOnSurfacePairValue::SetInputOrientation (const StepKinematics_SpatialRotation& theInputOrientation) +{ + myInputOrientation = theInputOrientation; +} diff --git a/src/StepKinematics/StepKinematics_PointOnSurfacePairValue.hxx b/src/StepKinematics/StepKinematics_PointOnSurfacePairValue.hxx new file mode 100644 index 0000000000..68a3396e1c --- /dev/null +++ b/src/StepKinematics/StepKinematics_PointOnSurfacePairValue.hxx @@ -0,0 +1,62 @@ +// Created on : Sat May 02 12:41:15 2020 +// Created by: Irina KRYLOVA +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V3.0 +// Copyright (c) Open CASCADE 2020 +// +// 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 _StepKinematics_PointOnSurfacePairValue_HeaderFile_ +#define _StepKinematics_PointOnSurfacePairValue_HeaderFile_ + +#include +#include +#include + +#include +#include +#include +#include + +DEFINE_STANDARD_HANDLE(StepKinematics_PointOnSurfacePairValue, StepKinematics_PairValue) + +//! Representation of STEP entity PointOnSurfacePairValue +class StepKinematics_PointOnSurfacePairValue : public StepKinematics_PairValue +{ +public : + + //! default constructor + Standard_EXPORT StepKinematics_PointOnSurfacePairValue(); + + //! Initialize all fields (own and inherited) + Standard_EXPORT void Init(const Handle(TCollection_HAsciiString)& theRepresentationItem_Name, + const Handle(StepKinematics_KinematicPair)& thePairValue_AppliesToPair, + const Handle(StepGeom_PointOnSurface)& theActualPointOnSurface, + const StepKinematics_SpatialRotation& theInputOrientation); + + //! Returns field ActualPointOnSurface + Standard_EXPORT Handle(StepGeom_PointOnSurface) ActualPointOnSurface() const; + //! Sets field ActualPointOnSurface + Standard_EXPORT void SetActualPointOnSurface (const Handle(StepGeom_PointOnSurface)& theActualPointOnSurface); + + //! Returns field InputOrientation + Standard_EXPORT StepKinematics_SpatialRotation InputOrientation() const; + //! Sets field InputOrientation + Standard_EXPORT void SetInputOrientation (const StepKinematics_SpatialRotation& theInputOrientation); + +DEFINE_STANDARD_RTTIEXT(StepKinematics_PointOnSurfacePairValue, StepKinematics_PairValue) + +private: + Handle(StepGeom_PointOnSurface) myActualPointOnSurface; + StepKinematics_SpatialRotation myInputOrientation; + +}; +#endif // _StepKinematics_PointOnSurfacePairValue_HeaderFile_ diff --git a/src/StepKinematics/StepKinematics_PointOnSurfacePairWithRange.cxx b/src/StepKinematics/StepKinematics_PointOnSurfacePairWithRange.cxx new file mode 100644 index 0000000000..74d76a7af2 --- /dev/null +++ b/src/StepKinematics/StepKinematics_PointOnSurfacePairWithRange.cxx @@ -0,0 +1,287 @@ +// Created on : Sat May 02 12:41:15 2020 +// Created by: Irina KRYLOVA +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V3.0 +// Copyright (c) Open CASCADE 2020 +// +// This file is part of Open CASCADE Technology software library. +// +// This library is free software; you can redistribute it and/or modify it under +// the terms of the GNU Lesser General Public License version 2.1 as published +// by the Free Software Foundation, with special exception defined in the file +// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT +// distribution for complete text of the license and disclaimer of any warranty. +// +// Alternatively, this file may be used under the terms of Open CASCADE +// commercial license or contractual agreement. + +#include + +IMPLEMENT_STANDARD_RTTIEXT(StepKinematics_PointOnSurfacePairWithRange, StepKinematics_PointOnSurfacePair) + +//======================================================================= +//function : StepKinematics_PointOnSurfacePairWithRange +//purpose : +//======================================================================= +StepKinematics_PointOnSurfacePairWithRange::StepKinematics_PointOnSurfacePairWithRange () +{ + defLowerLimitYaw = Standard_False; + defUpperLimitYaw = Standard_False; + defLowerLimitPitch = Standard_False; + defUpperLimitPitch = Standard_False; + defLowerLimitRoll = Standard_False; + defUpperLimitRoll = Standard_False; +} + +//======================================================================= +//function : Init +//purpose : +//======================================================================= +void StepKinematics_PointOnSurfacePairWithRange::Init (const Handle(TCollection_HAsciiString)& theRepresentationItem_Name, + const Handle(TCollection_HAsciiString)& theItemDefinedTransformation_Name, + const Standard_Boolean hasItemDefinedTransformation_Description, + const Handle(TCollection_HAsciiString)& theItemDefinedTransformation_Description, + const Handle(StepRepr_RepresentationItem)& theItemDefinedTransformation_TransformItem1, + const Handle(StepRepr_RepresentationItem)& theItemDefinedTransformation_TransformItem2, + const Handle(StepKinematics_KinematicJoint)& theKinematicPair_Joint, + const Handle(StepGeom_Surface)& thePointOnSurfacePair_PairSurface, + const Handle(StepGeom_RectangularTrimmedSurface)& theRangeOnPairSurface, + const Standard_Boolean hasLowerLimitYaw, + const Standard_Real theLowerLimitYaw, + const Standard_Boolean hasUpperLimitYaw, + const Standard_Real theUpperLimitYaw, + const Standard_Boolean hasLowerLimitPitch, + const Standard_Real theLowerLimitPitch, + const Standard_Boolean hasUpperLimitPitch, + const Standard_Real theUpperLimitPitch, + const Standard_Boolean hasLowerLimitRoll, + const Standard_Real theLowerLimitRoll, + const Standard_Boolean hasUpperLimitRoll, + const Standard_Real theUpperLimitRoll) +{ + StepKinematics_PointOnSurfacePair::Init(theRepresentationItem_Name, + theItemDefinedTransformation_Name, + hasItemDefinedTransformation_Description, + theItemDefinedTransformation_Description, + theItemDefinedTransformation_TransformItem1, + theItemDefinedTransformation_TransformItem2, + theKinematicPair_Joint, + thePointOnSurfacePair_PairSurface); + + myRangeOnPairSurface = theRangeOnPairSurface; + + defLowerLimitYaw = hasLowerLimitYaw; + if (defLowerLimitYaw) { + myLowerLimitYaw = theLowerLimitYaw; + } + else myLowerLimitYaw = 0; + + defUpperLimitYaw = hasUpperLimitYaw; + if (defUpperLimitYaw) { + myUpperLimitYaw = theUpperLimitYaw; + } + else myUpperLimitYaw = 0; + + defLowerLimitPitch = hasLowerLimitPitch; + if (defLowerLimitPitch) { + myLowerLimitPitch = theLowerLimitPitch; + } + else myLowerLimitPitch = 0; + + defUpperLimitPitch = hasUpperLimitPitch; + if (defUpperLimitPitch) { + myUpperLimitPitch = theUpperLimitPitch; + } + else myUpperLimitPitch = 0; + + defLowerLimitRoll = hasLowerLimitRoll; + if (defLowerLimitRoll) { + myLowerLimitRoll = theLowerLimitRoll; + } + else myLowerLimitRoll = 0; + + defUpperLimitRoll = hasUpperLimitRoll; + if (defUpperLimitRoll) { + myUpperLimitRoll = theUpperLimitRoll; + } + else myUpperLimitRoll = 0; +} + +//======================================================================= +//function : RangeOnPairSurface +//purpose : +//======================================================================= +Handle(StepGeom_RectangularTrimmedSurface) StepKinematics_PointOnSurfacePairWithRange::RangeOnPairSurface () const +{ + return myRangeOnPairSurface; +} + +//======================================================================= +//function : SetRangeOnPairSurface +//purpose : +//======================================================================= +void StepKinematics_PointOnSurfacePairWithRange::SetRangeOnPairSurface (const Handle(StepGeom_RectangularTrimmedSurface)& theRangeOnPairSurface) +{ + myRangeOnPairSurface = theRangeOnPairSurface; +} + +//======================================================================= +//function : LowerLimitYaw +//purpose : +//======================================================================= +Standard_Real StepKinematics_PointOnSurfacePairWithRange::LowerLimitYaw () const +{ + return myLowerLimitYaw; +} + +//======================================================================= +//function : SetLowerLimitYaw +//purpose : +//======================================================================= +void StepKinematics_PointOnSurfacePairWithRange::SetLowerLimitYaw (const Standard_Real theLowerLimitYaw) +{ + myLowerLimitYaw = theLowerLimitYaw; +} + +//======================================================================= +//function : HasLowerLimitYaw +//purpose : +//======================================================================= +Standard_Boolean StepKinematics_PointOnSurfacePairWithRange::HasLowerLimitYaw () const +{ + return defLowerLimitYaw; +} + +//======================================================================= +//function : UpperLimitYaw +//purpose : +//======================================================================= +Standard_Real StepKinematics_PointOnSurfacePairWithRange::UpperLimitYaw () const +{ + return myUpperLimitYaw; +} + +//======================================================================= +//function : SetUpperLimitYaw +//purpose : +//======================================================================= +void StepKinematics_PointOnSurfacePairWithRange::SetUpperLimitYaw (const Standard_Real theUpperLimitYaw) +{ + myUpperLimitYaw = theUpperLimitYaw; +} + +//======================================================================= +//function : HasUpperLimitYaw +//purpose : +//======================================================================= +Standard_Boolean StepKinematics_PointOnSurfacePairWithRange::HasUpperLimitYaw () const +{ + return defUpperLimitYaw; +} + +//======================================================================= +//function : LowerLimitPitch +//purpose : +//======================================================================= +Standard_Real StepKinematics_PointOnSurfacePairWithRange::LowerLimitPitch () const +{ + return myLowerLimitPitch; +} + +//======================================================================= +//function : SetLowerLimitPitch +//purpose : +//======================================================================= +void StepKinematics_PointOnSurfacePairWithRange::SetLowerLimitPitch (const Standard_Real theLowerLimitPitch) +{ + myLowerLimitPitch = theLowerLimitPitch; +} + +//======================================================================= +//function : HasLowerLimitPitch +//purpose : +//======================================================================= +Standard_Boolean StepKinematics_PointOnSurfacePairWithRange::HasLowerLimitPitch () const +{ + return defLowerLimitPitch; +} + +//======================================================================= +//function : UpperLimitPitch +//purpose : +//======================================================================= +Standard_Real StepKinematics_PointOnSurfacePairWithRange::UpperLimitPitch () const +{ + return myUpperLimitPitch; +} + +//======================================================================= +//function : SetUpperLimitPitch +//purpose : +//======================================================================= +void StepKinematics_PointOnSurfacePairWithRange::SetUpperLimitPitch (const Standard_Real theUpperLimitPitch) +{ + myUpperLimitPitch = theUpperLimitPitch; +} + +//======================================================================= +//function : HasUpperLimitPitch +//purpose : +//======================================================================= +Standard_Boolean StepKinematics_PointOnSurfacePairWithRange::HasUpperLimitPitch () const +{ + return defUpperLimitPitch; +} + +//======================================================================= +//function : LowerLimitRoll +//purpose : +//======================================================================= +Standard_Real StepKinematics_PointOnSurfacePairWithRange::LowerLimitRoll () const +{ + return myLowerLimitRoll; +} + +//======================================================================= +//function : SetLowerLimitRoll +//purpose : +//======================================================================= +void StepKinematics_PointOnSurfacePairWithRange::SetLowerLimitRoll (const Standard_Real theLowerLimitRoll) +{ + myLowerLimitRoll = theLowerLimitRoll; +} + +//======================================================================= +//function : HasLowerLimitRoll +//purpose : +//======================================================================= +Standard_Boolean StepKinematics_PointOnSurfacePairWithRange::HasLowerLimitRoll () const +{ + return defLowerLimitRoll; +} + +//======================================================================= +//function : UpperLimitRoll +//purpose : +//======================================================================= +Standard_Real StepKinematics_PointOnSurfacePairWithRange::UpperLimitRoll () const +{ + return myUpperLimitRoll; +} + +//======================================================================= +//function : SetUpperLimitRoll +//purpose : +//======================================================================= +void StepKinematics_PointOnSurfacePairWithRange::SetUpperLimitRoll (const Standard_Real theUpperLimitRoll) +{ + myUpperLimitRoll = theUpperLimitRoll; +} + +//======================================================================= +//function : HasUpperLimitRoll +//purpose : +//======================================================================= +Standard_Boolean StepKinematics_PointOnSurfacePairWithRange::HasUpperLimitRoll () const +{ + return defUpperLimitRoll; +} diff --git a/src/StepKinematics/StepKinematics_PointOnSurfacePairWithRange.hxx b/src/StepKinematics/StepKinematics_PointOnSurfacePairWithRange.hxx new file mode 100644 index 0000000000..390f0ba9f4 --- /dev/null +++ b/src/StepKinematics/StepKinematics_PointOnSurfacePairWithRange.hxx @@ -0,0 +1,129 @@ +// Created on : Sat May 02 12:41:15 2020 +// Created by: Irina KRYLOVA +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V3.0 +// Copyright (c) Open CASCADE 2020 +// +// 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 _StepKinematics_PointOnSurfacePairWithRange_HeaderFile_ +#define _StepKinematics_PointOnSurfacePairWithRange_HeaderFile_ + +#include +#include +#include + +#include +#include +#include +#include +#include +#include + +DEFINE_STANDARD_HANDLE(StepKinematics_PointOnSurfacePairWithRange, StepKinematics_PointOnSurfacePair) + +//! Representation of STEP entity PointOnSurfacePairWithRange +class StepKinematics_PointOnSurfacePairWithRange : public StepKinematics_PointOnSurfacePair +{ +public : + + //! default constructor + Standard_EXPORT StepKinematics_PointOnSurfacePairWithRange(); + + //! Initialize all fields (own and inherited) + Standard_EXPORT void Init(const Handle(TCollection_HAsciiString)& theRepresentationItem_Name, + const Handle(TCollection_HAsciiString)& theItemDefinedTransformation_Name, + const Standard_Boolean hasItemDefinedTransformation_Description, + const Handle(TCollection_HAsciiString)& theItemDefinedTransformation_Description, + const Handle(StepRepr_RepresentationItem)& theItemDefinedTransformation_TransformItem1, + const Handle(StepRepr_RepresentationItem)& theItemDefinedTransformation_TransformItem2, + const Handle(StepKinematics_KinematicJoint)& theKinematicPair_Joint, + const Handle(StepGeom_Surface)& thePointOnSurfacePair_PairSurface, + const Handle(StepGeom_RectangularTrimmedSurface)& theRangeOnPairSurface, + const Standard_Boolean hasLowerLimitYaw, + const Standard_Real theLowerLimitYaw, + const Standard_Boolean hasUpperLimitYaw, + const Standard_Real theUpperLimitYaw, + const Standard_Boolean hasLowerLimitPitch, + const Standard_Real theLowerLimitPitch, + const Standard_Boolean hasUpperLimitPitch, + const Standard_Real theUpperLimitPitch, + const Standard_Boolean hasLowerLimitRoll, + const Standard_Real theLowerLimitRoll, + const Standard_Boolean hasUpperLimitRoll, + const Standard_Real theUpperLimitRoll); + + //! Returns field RangeOnPairSurface + Standard_EXPORT Handle(StepGeom_RectangularTrimmedSurface) RangeOnPairSurface() const; + //! Sets field RangeOnPairSurface + Standard_EXPORT void SetRangeOnPairSurface (const Handle(StepGeom_RectangularTrimmedSurface)& theRangeOnPairSurface); + + //! Returns field LowerLimitYaw + Standard_EXPORT Standard_Real LowerLimitYaw() const; + //! Sets field LowerLimitYaw + Standard_EXPORT void SetLowerLimitYaw (const Standard_Real theLowerLimitYaw); + //! Returns True if optional field LowerLimitYaw is defined + Standard_EXPORT Standard_Boolean HasLowerLimitYaw() const; + + //! Returns field UpperLimitYaw + Standard_EXPORT Standard_Real UpperLimitYaw() const; + //! Sets field UpperLimitYaw + Standard_EXPORT void SetUpperLimitYaw (const Standard_Real theUpperLimitYaw); + //! Returns True if optional field UpperLimitYaw is defined + Standard_EXPORT Standard_Boolean HasUpperLimitYaw() const; + + //! Returns field LowerLimitPitch + Standard_EXPORT Standard_Real LowerLimitPitch() const; + //! Sets field LowerLimitPitch + Standard_EXPORT void SetLowerLimitPitch (const Standard_Real theLowerLimitPitch); + //! Returns True if optional field LowerLimitPitch is defined + Standard_EXPORT Standard_Boolean HasLowerLimitPitch() const; + + //! Returns field UpperLimitPitch + Standard_EXPORT Standard_Real UpperLimitPitch() const; + //! Sets field UpperLimitPitch + Standard_EXPORT void SetUpperLimitPitch (const Standard_Real theUpperLimitPitch); + //! Returns True if optional field UpperLimitPitch is defined + Standard_EXPORT Standard_Boolean HasUpperLimitPitch() const; + + //! Returns field LowerLimitRoll + Standard_EXPORT Standard_Real LowerLimitRoll() const; + //! Sets field LowerLimitRoll + Standard_EXPORT void SetLowerLimitRoll (const Standard_Real theLowerLimitRoll); + //! Returns True if optional field LowerLimitRoll is defined + Standard_EXPORT Standard_Boolean HasLowerLimitRoll() const; + + //! Returns field UpperLimitRoll + Standard_EXPORT Standard_Real UpperLimitRoll() const; + //! Sets field UpperLimitRoll + Standard_EXPORT void SetUpperLimitRoll (const Standard_Real theUpperLimitRoll); + //! Returns True if optional field UpperLimitRoll is defined + Standard_EXPORT Standard_Boolean HasUpperLimitRoll() const; + +DEFINE_STANDARD_RTTIEXT(StepKinematics_PointOnSurfacePairWithRange, StepKinematics_PointOnSurfacePair) + +private: + Handle(StepGeom_RectangularTrimmedSurface) myRangeOnPairSurface; + Standard_Real myLowerLimitYaw; //!< optional + Standard_Real myUpperLimitYaw; //!< optional + Standard_Real myLowerLimitPitch; //!< optional + Standard_Real myUpperLimitPitch; //!< optional + Standard_Real myLowerLimitRoll; //!< optional + Standard_Real myUpperLimitRoll; //!< optional + Standard_Boolean defLowerLimitYaw; //!< flag "is LowerLimitYaw defined" + Standard_Boolean defUpperLimitYaw; //!< flag "is UpperLimitYaw defined" + Standard_Boolean defLowerLimitPitch; //!< flag "is LowerLimitPitch defined" + Standard_Boolean defUpperLimitPitch; //!< flag "is UpperLimitPitch defined" + Standard_Boolean defLowerLimitRoll; //!< flag "is LowerLimitRoll defined" + Standard_Boolean defUpperLimitRoll; //!< flag "is UpperLimitRoll defined" + +}; +#endif // _StepKinematics_PointOnSurfacePairWithRange_HeaderFile_ diff --git a/src/StepKinematics/StepKinematics_PrismaticPair.cxx b/src/StepKinematics/StepKinematics_PrismaticPair.cxx new file mode 100644 index 0000000000..6f200884a2 --- /dev/null +++ b/src/StepKinematics/StepKinematics_PrismaticPair.cxx @@ -0,0 +1,27 @@ +// Created on : Sat May 02 12:41:15 2020 +// Created by: Irina KRYLOVA +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V3.0 +// Copyright (c) Open CASCADE 2020 +// +// This file is part of Open CASCADE Technology software library. +// +// This library is free software; you can redistribute it and/or modify it under +// the terms of the GNU Lesser General Public License version 2.1 as published +// by the Free Software Foundation, with special exception defined in the file +// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT +// distribution for complete text of the license and disclaimer of any warranty. +// +// Alternatively, this file may be used under the terms of Open CASCADE +// commercial license or contractual agreement. + +#include + +IMPLEMENT_STANDARD_RTTIEXT(StepKinematics_PrismaticPair, StepKinematics_LowOrderKinematicPair) + +//======================================================================= +//function : StepKinematics_PrismaticPair +//purpose : +//======================================================================= +StepKinematics_PrismaticPair::StepKinematics_PrismaticPair () +{ +} diff --git a/src/StepKinematics/StepKinematics_PrismaticPair.hxx b/src/StepKinematics/StepKinematics_PrismaticPair.hxx new file mode 100644 index 0000000000..5fd51446f3 --- /dev/null +++ b/src/StepKinematics/StepKinematics_PrismaticPair.hxx @@ -0,0 +1,42 @@ +// Created on : Sat May 02 12:41:15 2020 +// Created by: Irina KRYLOVA +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V3.0 +// Copyright (c) Open CASCADE 2020 +// +// 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 _StepKinematics_PrismaticPair_HeaderFile_ +#define _StepKinematics_PrismaticPair_HeaderFile_ + +#include +#include +#include + +#include +#include +#include +#include + +DEFINE_STANDARD_HANDLE(StepKinematics_PrismaticPair, StepKinematics_LowOrderKinematicPair) + +//! Representation of STEP entity PrismaticPair +class StepKinematics_PrismaticPair : public StepKinematics_LowOrderKinematicPair +{ +public : + + //! default constructor + Standard_EXPORT StepKinematics_PrismaticPair(); + +DEFINE_STANDARD_RTTIEXT(StepKinematics_PrismaticPair, StepKinematics_LowOrderKinematicPair) + +}; +#endif // _StepKinematics_PrismaticPair_HeaderFile_ diff --git a/src/StepKinematics/StepKinematics_PrismaticPairValue.cxx b/src/StepKinematics/StepKinematics_PrismaticPairValue.cxx new file mode 100644 index 0000000000..97aab12399 --- /dev/null +++ b/src/StepKinematics/StepKinematics_PrismaticPairValue.cxx @@ -0,0 +1,59 @@ +// Created on : Sat May 02 12:41:15 2020 +// Created by: Irina KRYLOVA +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V3.0 +// Copyright (c) Open CASCADE 2020 +// +// This file is part of Open CASCADE Technology software library. +// +// This library is free software; you can redistribute it and/or modify it under +// the terms of the GNU Lesser General Public License version 2.1 as published +// by the Free Software Foundation, with special exception defined in the file +// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT +// distribution for complete text of the license and disclaimer of any warranty. +// +// Alternatively, this file may be used under the terms of Open CASCADE +// commercial license or contractual agreement. + +#include + +IMPLEMENT_STANDARD_RTTIEXT(StepKinematics_PrismaticPairValue, StepKinematics_PairValue) + +//======================================================================= +//function : StepKinematics_PrismaticPairValue +//purpose : +//======================================================================= +StepKinematics_PrismaticPairValue::StepKinematics_PrismaticPairValue () +{ +} + +//======================================================================= +//function : Init +//purpose : +//======================================================================= +void StepKinematics_PrismaticPairValue::Init (const Handle(TCollection_HAsciiString)& theRepresentationItem_Name, + const Handle(StepKinematics_KinematicPair)& thePairValue_AppliesToPair, + const Standard_Real theActualTranslation) +{ + StepKinematics_PairValue::Init(theRepresentationItem_Name, + thePairValue_AppliesToPair); + + myActualTranslation = theActualTranslation; +} + +//======================================================================= +//function : ActualTranslation +//purpose : +//======================================================================= +Standard_Real StepKinematics_PrismaticPairValue::ActualTranslation () const +{ + return myActualTranslation; +} + +//======================================================================= +//function : SetActualTranslation +//purpose : +//======================================================================= +void StepKinematics_PrismaticPairValue::SetActualTranslation (const Standard_Real theActualTranslation) +{ + myActualTranslation = theActualTranslation; +} diff --git a/src/StepKinematics/StepKinematics_PrismaticPairValue.hxx b/src/StepKinematics/StepKinematics_PrismaticPairValue.hxx new file mode 100644 index 0000000000..758288a6ad --- /dev/null +++ b/src/StepKinematics/StepKinematics_PrismaticPairValue.hxx @@ -0,0 +1,53 @@ +// Created on : Sat May 02 12:41:15 2020 +// Created by: Irina KRYLOVA +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V3.0 +// Copyright (c) Open CASCADE 2020 +// +// 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 _StepKinematics_PrismaticPairValue_HeaderFile_ +#define _StepKinematics_PrismaticPairValue_HeaderFile_ + +#include +#include +#include + +#include +#include + +DEFINE_STANDARD_HANDLE(StepKinematics_PrismaticPairValue, StepKinematics_PairValue) + +//! Representation of STEP entity PrismaticPairValue +class StepKinematics_PrismaticPairValue : public StepKinematics_PairValue +{ +public : + + //! default constructor + Standard_EXPORT StepKinematics_PrismaticPairValue(); + + //! Initialize all fields (own and inherited) + Standard_EXPORT void Init(const Handle(TCollection_HAsciiString)& theRepresentationItem_Name, + const Handle(StepKinematics_KinematicPair)& thePairValue_AppliesToPair, + const Standard_Real theActualTranslation); + + //! Returns field ActualTranslation + Standard_EXPORT Standard_Real ActualTranslation() const; + //! Sets field ActualTranslation + Standard_EXPORT void SetActualTranslation (const Standard_Real theActualTranslation); + +DEFINE_STANDARD_RTTIEXT(StepKinematics_PrismaticPairValue, StepKinematics_PairValue) + +private: + Standard_Real myActualTranslation; + +}; +#endif // _StepKinematics_PrismaticPairValue_HeaderFile_ diff --git a/src/StepKinematics/StepKinematics_PrismaticPairWithRange.cxx b/src/StepKinematics/StepKinematics_PrismaticPairWithRange.cxx new file mode 100644 index 0000000000..84f058ae48 --- /dev/null +++ b/src/StepKinematics/StepKinematics_PrismaticPairWithRange.cxx @@ -0,0 +1,132 @@ +// Created on : Sat May 02 12:41:15 2020 +// Created by: Irina KRYLOVA +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V3.0 +// Copyright (c) Open CASCADE 2020 +// +// This file is part of Open CASCADE Technology software library. +// +// This library is free software; you can redistribute it and/or modify it under +// the terms of the GNU Lesser General Public License version 2.1 as published +// by the Free Software Foundation, with special exception defined in the file +// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT +// distribution for complete text of the license and disclaimer of any warranty. +// +// Alternatively, this file may be used under the terms of Open CASCADE +// commercial license or contractual agreement. + +#include + +IMPLEMENT_STANDARD_RTTIEXT(StepKinematics_PrismaticPairWithRange, StepKinematics_PrismaticPair) + +//======================================================================= +//function : StepKinematics_PrismaticPairWithRange +//purpose : +//======================================================================= +StepKinematics_PrismaticPairWithRange::StepKinematics_PrismaticPairWithRange () +{ + defLowerLimitActualTranslation = Standard_False; + defUpperLimitActualTranslation = Standard_False; +} + +//======================================================================= +//function : Init +//purpose : +//======================================================================= +void StepKinematics_PrismaticPairWithRange::Init (const Handle(TCollection_HAsciiString)& theRepresentationItem_Name, + const Handle(TCollection_HAsciiString)& theItemDefinedTransformation_Name, + const Standard_Boolean hasItemDefinedTransformation_Description, + const Handle(TCollection_HAsciiString)& theItemDefinedTransformation_Description, + const Handle(StepRepr_RepresentationItem)& theItemDefinedTransformation_TransformItem1, + const Handle(StepRepr_RepresentationItem)& theItemDefinedTransformation_TransformItem2, + const Handle(StepKinematics_KinematicJoint)& theKinematicPair_Joint, + const Standard_Boolean theLowOrderKinematicPair_TX, + const Standard_Boolean theLowOrderKinematicPair_TY, + const Standard_Boolean theLowOrderKinematicPair_TZ, + const Standard_Boolean theLowOrderKinematicPair_RX, + const Standard_Boolean theLowOrderKinematicPair_RY, + const Standard_Boolean theLowOrderKinematicPair_RZ, + const Standard_Boolean hasLowerLimitActualTranslation, + const Standard_Real theLowerLimitActualTranslation, + const Standard_Boolean hasUpperLimitActualTranslation, + const Standard_Real theUpperLimitActualTranslation) +{ + StepKinematics_PrismaticPair::Init(theRepresentationItem_Name, + theItemDefinedTransformation_Name, + hasItemDefinedTransformation_Description, + theItemDefinedTransformation_Description, + theItemDefinedTransformation_TransformItem1, + theItemDefinedTransformation_TransformItem2, + theKinematicPair_Joint, + theLowOrderKinematicPair_TX, + theLowOrderKinematicPair_TY, + theLowOrderKinematicPair_TZ, + theLowOrderKinematicPair_RX, + theLowOrderKinematicPair_RY, + theLowOrderKinematicPair_RZ); + + defLowerLimitActualTranslation = hasLowerLimitActualTranslation; + if (defLowerLimitActualTranslation) { + myLowerLimitActualTranslation = theLowerLimitActualTranslation; + } + else myLowerLimitActualTranslation = 0; + + defUpperLimitActualTranslation = hasUpperLimitActualTranslation; + if (defUpperLimitActualTranslation) { + myUpperLimitActualTranslation = theUpperLimitActualTranslation; + } + else myUpperLimitActualTranslation = 0; +} + +//======================================================================= +//function : LowerLimitActualTranslation +//purpose : +//======================================================================= +Standard_Real StepKinematics_PrismaticPairWithRange::LowerLimitActualTranslation () const +{ + return myLowerLimitActualTranslation; +} + +//======================================================================= +//function : SetLowerLimitActualTranslation +//purpose : +//======================================================================= +void StepKinematics_PrismaticPairWithRange::SetLowerLimitActualTranslation (const Standard_Real theLowerLimitActualTranslation) +{ + myLowerLimitActualTranslation = theLowerLimitActualTranslation; +} + +//======================================================================= +//function : HasLowerLimitActualTranslation +//purpose : +//======================================================================= +Standard_Boolean StepKinematics_PrismaticPairWithRange::HasLowerLimitActualTranslation () const +{ + return defLowerLimitActualTranslation; +} + +//======================================================================= +//function : UpperLimitActualTranslation +//purpose : +//======================================================================= +Standard_Real StepKinematics_PrismaticPairWithRange::UpperLimitActualTranslation () const +{ + return myUpperLimitActualTranslation; +} + +//======================================================================= +//function : SetUpperLimitActualTranslation +//purpose : +//======================================================================= +void StepKinematics_PrismaticPairWithRange::SetUpperLimitActualTranslation (const Standard_Real theUpperLimitActualTranslation) +{ + myUpperLimitActualTranslation = theUpperLimitActualTranslation; +} + +//======================================================================= +//function : HasUpperLimitActualTranslation +//purpose : +//======================================================================= +Standard_Boolean StepKinematics_PrismaticPairWithRange::HasUpperLimitActualTranslation () const +{ + return defUpperLimitActualTranslation; +} diff --git a/src/StepKinematics/StepKinematics_PrismaticPairWithRange.hxx b/src/StepKinematics/StepKinematics_PrismaticPairWithRange.hxx new file mode 100644 index 0000000000..11bb017f28 --- /dev/null +++ b/src/StepKinematics/StepKinematics_PrismaticPairWithRange.hxx @@ -0,0 +1,81 @@ +// Created on : Sat May 02 12:41:15 2020 +// Created by: Irina KRYLOVA +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V3.0 +// Copyright (c) Open CASCADE 2020 +// +// 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 _StepKinematics_PrismaticPairWithRange_HeaderFile_ +#define _StepKinematics_PrismaticPairWithRange_HeaderFile_ + +#include +#include +#include + +#include +#include +#include +#include + +DEFINE_STANDARD_HANDLE(StepKinematics_PrismaticPairWithRange, StepKinematics_PrismaticPair) + +//! Representation of STEP entity PrismaticPairWithRange +class StepKinematics_PrismaticPairWithRange : public StepKinematics_PrismaticPair +{ +public : + + //! default constructor + Standard_EXPORT StepKinematics_PrismaticPairWithRange(); + + //! Initialize all fields (own and inherited) + Standard_EXPORT void Init(const Handle(TCollection_HAsciiString)& theRepresentationItem_Name, + const Handle(TCollection_HAsciiString)& theItemDefinedTransformation_Name, + const Standard_Boolean hasItemDefinedTransformation_Description, + const Handle(TCollection_HAsciiString)& theItemDefinedTransformation_Description, + const Handle(StepRepr_RepresentationItem)& theItemDefinedTransformation_TransformItem1, + const Handle(StepRepr_RepresentationItem)& theItemDefinedTransformation_TransformItem2, + const Handle(StepKinematics_KinematicJoint)& theKinematicPair_Joint, + const Standard_Boolean theLowOrderKinematicPair_TX, + const Standard_Boolean theLowOrderKinematicPair_TY, + const Standard_Boolean theLowOrderKinematicPair_TZ, + const Standard_Boolean theLowOrderKinematicPair_RX, + const Standard_Boolean theLowOrderKinematicPair_RY, + const Standard_Boolean theLowOrderKinematicPair_RZ, + const Standard_Boolean hasLowerLimitActualTranslation, + const Standard_Real theLowerLimitActualTranslation, + const Standard_Boolean hasUpperLimitActualTranslation, + const Standard_Real theUpperLimitActualTranslation); + + //! Returns field LowerLimitActualTranslation + Standard_EXPORT Standard_Real LowerLimitActualTranslation() const; + //! Sets field LowerLimitActualTranslation + Standard_EXPORT void SetLowerLimitActualTranslation (const Standard_Real theLowerLimitActualTranslation); + //! Returns True if optional field LowerLimitActualTranslation is defined + Standard_EXPORT Standard_Boolean HasLowerLimitActualTranslation() const; + + //! Returns field UpperLimitActualTranslation + Standard_EXPORT Standard_Real UpperLimitActualTranslation() const; + //! Sets field UpperLimitActualTranslation + Standard_EXPORT void SetUpperLimitActualTranslation (const Standard_Real theUpperLimitActualTranslation); + //! Returns True if optional field UpperLimitActualTranslation is defined + Standard_EXPORT Standard_Boolean HasUpperLimitActualTranslation() const; + +DEFINE_STANDARD_RTTIEXT(StepKinematics_PrismaticPairWithRange, StepKinematics_PrismaticPair) + +private: + Standard_Real myLowerLimitActualTranslation; //!< optional + Standard_Real myUpperLimitActualTranslation; //!< optional + Standard_Boolean defLowerLimitActualTranslation; //!< flag "is LowerLimitActualTranslation defined" + Standard_Boolean defUpperLimitActualTranslation; //!< flag "is UpperLimitActualTranslation defined" + +}; +#endif // _StepKinematics_PrismaticPairWithRange_HeaderFile_ diff --git a/src/StepKinematics/StepKinematics_ProductDefinitionKinematics.cxx b/src/StepKinematics/StepKinematics_ProductDefinitionKinematics.cxx new file mode 100644 index 0000000000..1bbd6b23a5 --- /dev/null +++ b/src/StepKinematics/StepKinematics_ProductDefinitionKinematics.cxx @@ -0,0 +1,27 @@ +// Created on : Sat May 02 12:41:15 2020 +// Created by: Irina KRYLOVA +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V3.0 +// Copyright (c) Open CASCADE 2020 +// +// This file is part of Open CASCADE Technology software library. +// +// This library is free software; you can redistribute it and/or modify it under +// the terms of the GNU Lesser General Public License version 2.1 as published +// by the Free Software Foundation, with special exception defined in the file +// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT +// distribution for complete text of the license and disclaimer of any warranty. +// +// Alternatively, this file may be used under the terms of Open CASCADE +// commercial license or contractual agreement. + +#include + +IMPLEMENT_STANDARD_RTTIEXT(StepKinematics_ProductDefinitionKinematics, StepRepr_PropertyDefinition) + +//======================================================================= +//function : StepKinematics_ProductDefinitionKinematics +//purpose : +//======================================================================= +StepKinematics_ProductDefinitionKinematics::StepKinematics_ProductDefinitionKinematics () +{ +} diff --git a/src/StepKinematics/StepKinematics_ProductDefinitionKinematics.hxx b/src/StepKinematics/StepKinematics_ProductDefinitionKinematics.hxx new file mode 100644 index 0000000000..ed1078166f --- /dev/null +++ b/src/StepKinematics/StepKinematics_ProductDefinitionKinematics.hxx @@ -0,0 +1,40 @@ +// Created on : Sat May 02 12:41:15 2020 +// Created by: Irina KRYLOVA +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V3.0 +// Copyright (c) Open CASCADE 2020 +// +// 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 _StepKinematics_ProductDefinitionKinematics_HeaderFile_ +#define _StepKinematics_ProductDefinitionKinematics_HeaderFile_ + +#include +#include +#include + +#include +#include + +DEFINE_STANDARD_HANDLE(StepKinematics_ProductDefinitionKinematics, StepRepr_PropertyDefinition) + +//! Representation of STEP entity ProductDefinitionKinematics +class StepKinematics_ProductDefinitionKinematics : public StepRepr_PropertyDefinition +{ +public : + + //! default constructor + Standard_EXPORT StepKinematics_ProductDefinitionKinematics(); + +DEFINE_STANDARD_RTTIEXT(StepKinematics_ProductDefinitionKinematics, StepRepr_PropertyDefinition) + +}; +#endif // _StepKinematics_ProductDefinitionKinematics_HeaderFile_ diff --git a/src/StepKinematics/StepKinematics_ProductDefinitionRelationshipKinematics.cxx b/src/StepKinematics/StepKinematics_ProductDefinitionRelationshipKinematics.cxx new file mode 100644 index 0000000000..ffdae3daf0 --- /dev/null +++ b/src/StepKinematics/StepKinematics_ProductDefinitionRelationshipKinematics.cxx @@ -0,0 +1,27 @@ +// Created on : Sat May 02 12:41:15 2020 +// Created by: Irina KRYLOVA +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V3.0 +// Copyright (c) Open CASCADE 2020 +// +// This file is part of Open CASCADE Technology software library. +// +// This library is free software; you can redistribute it and/or modify it under +// the terms of the GNU Lesser General Public License version 2.1 as published +// by the Free Software Foundation, with special exception defined in the file +// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT +// distribution for complete text of the license and disclaimer of any warranty. +// +// Alternatively, this file may be used under the terms of Open CASCADE +// commercial license or contractual agreement. + +#include + +IMPLEMENT_STANDARD_RTTIEXT(StepKinematics_ProductDefinitionRelationshipKinematics, StepRepr_PropertyDefinition) + +//======================================================================= +//function : StepKinematics_ProductDefinitionRelationshipKinematics +//purpose : +//======================================================================= +StepKinematics_ProductDefinitionRelationshipKinematics::StepKinematics_ProductDefinitionRelationshipKinematics () +{ +} diff --git a/src/StepKinematics/StepKinematics_ProductDefinitionRelationshipKinematics.hxx b/src/StepKinematics/StepKinematics_ProductDefinitionRelationshipKinematics.hxx new file mode 100644 index 0000000000..1c4717e54c --- /dev/null +++ b/src/StepKinematics/StepKinematics_ProductDefinitionRelationshipKinematics.hxx @@ -0,0 +1,40 @@ +// Created on : Sat May 02 12:41:15 2020 +// Created by: Irina KRYLOVA +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V3.0 +// Copyright (c) Open CASCADE 2020 +// +// 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 _StepKinematics_ProductDefinitionRelationshipKinematics_HeaderFile_ +#define _StepKinematics_ProductDefinitionRelationshipKinematics_HeaderFile_ + +#include +#include +#include + +#include +#include + +DEFINE_STANDARD_HANDLE(StepKinematics_ProductDefinitionRelationshipKinematics, StepRepr_PropertyDefinition) + +//! Representation of STEP entity ProductDefinitionRelationshipKinematics +class StepKinematics_ProductDefinitionRelationshipKinematics : public StepRepr_PropertyDefinition +{ +public : + + //! default constructor + Standard_EXPORT StepKinematics_ProductDefinitionRelationshipKinematics(); + +DEFINE_STANDARD_RTTIEXT(StepKinematics_ProductDefinitionRelationshipKinematics, StepRepr_PropertyDefinition) + +}; +#endif // _StepKinematics_ProductDefinitionRelationshipKinematics_HeaderFile_ diff --git a/src/StepKinematics/StepKinematics_RackAndPinionPair.cxx b/src/StepKinematics/StepKinematics_RackAndPinionPair.cxx new file mode 100644 index 0000000000..3a1fccb407 --- /dev/null +++ b/src/StepKinematics/StepKinematics_RackAndPinionPair.cxx @@ -0,0 +1,69 @@ +// Created on : Sat May 02 12:41:15 2020 +// Created by: Irina KRYLOVA +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V3.0 +// Copyright (c) Open CASCADE 2020 +// +// This file is part of Open CASCADE Technology software library. +// +// This library is free software; you can redistribute it and/or modify it under +// the terms of the GNU Lesser General Public License version 2.1 as published +// by the Free Software Foundation, with special exception defined in the file +// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT +// distribution for complete text of the license and disclaimer of any warranty. +// +// Alternatively, this file may be used under the terms of Open CASCADE +// commercial license or contractual agreement. + +#include + +IMPLEMENT_STANDARD_RTTIEXT(StepKinematics_RackAndPinionPair, StepKinematics_LowOrderKinematicPairWithMotionCoupling) + +//======================================================================= +//function : StepKinematics_RackAndPinionPair +//purpose : +//======================================================================= +StepKinematics_RackAndPinionPair::StepKinematics_RackAndPinionPair () +{ +} + +//======================================================================= +//function : Init +//purpose : +//======================================================================= +void StepKinematics_RackAndPinionPair::Init (const Handle(TCollection_HAsciiString)& theRepresentationItem_Name, + const Handle(TCollection_HAsciiString)& theItemDefinedTransformation_Name, + const Standard_Boolean hasItemDefinedTransformation_Description, + const Handle(TCollection_HAsciiString)& theItemDefinedTransformation_Description, + const Handle(StepRepr_RepresentationItem)& theItemDefinedTransformation_TransformItem1, + const Handle(StepRepr_RepresentationItem)& theItemDefinedTransformation_TransformItem2, + const Handle(StepKinematics_KinematicJoint)& theKinematicPair_Joint, + const Standard_Real thePinionRadius) +{ + StepKinematics_LowOrderKinematicPairWithMotionCoupling::Init(theRepresentationItem_Name, + theItemDefinedTransformation_Name, + hasItemDefinedTransformation_Description, + theItemDefinedTransformation_Description, + theItemDefinedTransformation_TransformItem1, + theItemDefinedTransformation_TransformItem2, + theKinematicPair_Joint); + + myPinionRadius = thePinionRadius; +} + +//======================================================================= +//function : PinionRadius +//purpose : +//======================================================================= +Standard_Real StepKinematics_RackAndPinionPair::PinionRadius () const +{ + return myPinionRadius; +} + +//======================================================================= +//function : SetPinionRadius +//purpose : +//======================================================================= +void StepKinematics_RackAndPinionPair::SetPinionRadius (const Standard_Real thePinionRadius) +{ + myPinionRadius = thePinionRadius; +} diff --git a/src/StepKinematics/StepKinematics_RackAndPinionPair.hxx b/src/StepKinematics/StepKinematics_RackAndPinionPair.hxx new file mode 100644 index 0000000000..35e0996685 --- /dev/null +++ b/src/StepKinematics/StepKinematics_RackAndPinionPair.hxx @@ -0,0 +1,60 @@ +// Created on : Sat May 02 12:41:15 2020 +// Created by: Irina KRYLOVA +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V3.0 +// Copyright (c) Open CASCADE 2020 +// +// 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 _StepKinematics_RackAndPinionPair_HeaderFile_ +#define _StepKinematics_RackAndPinionPair_HeaderFile_ + +#include +#include +#include + +#include +#include +#include +#include + +DEFINE_STANDARD_HANDLE(StepKinematics_RackAndPinionPair, StepKinematics_LowOrderKinematicPairWithMotionCoupling) + +//! Representation of STEP entity RackAndPinionPair +class StepKinematics_RackAndPinionPair : public StepKinematics_LowOrderKinematicPairWithMotionCoupling +{ +public : + + //! default constructor + Standard_EXPORT StepKinematics_RackAndPinionPair(); + + //! Initialize all fields (own and inherited) + Standard_EXPORT void Init(const Handle(TCollection_HAsciiString)& theRepresentationItem_Name, + const Handle(TCollection_HAsciiString)& theItemDefinedTransformation_Name, + const Standard_Boolean hasItemDefinedTransformation_Description, + const Handle(TCollection_HAsciiString)& theItemDefinedTransformation_Description, + const Handle(StepRepr_RepresentationItem)& theItemDefinedTransformation_TransformItem1, + const Handle(StepRepr_RepresentationItem)& theItemDefinedTransformation_TransformItem2, + const Handle(StepKinematics_KinematicJoint)& theKinematicPair_Joint, + const Standard_Real thePinionRadius); + + //! Returns field PinionRadius + Standard_EXPORT Standard_Real PinionRadius() const; + //! Sets field PinionRadius + Standard_EXPORT void SetPinionRadius (const Standard_Real thePinionRadius); + +DEFINE_STANDARD_RTTIEXT(StepKinematics_RackAndPinionPair, StepKinematics_LowOrderKinematicPairWithMotionCoupling) + +private: + Standard_Real myPinionRadius; + +}; +#endif // _StepKinematics_RackAndPinionPair_HeaderFile_ diff --git a/src/StepKinematics/StepKinematics_RackAndPinionPairValue.cxx b/src/StepKinematics/StepKinematics_RackAndPinionPairValue.cxx new file mode 100644 index 0000000000..fb20fb523f --- /dev/null +++ b/src/StepKinematics/StepKinematics_RackAndPinionPairValue.cxx @@ -0,0 +1,59 @@ +// Created on : Sat May 02 12:41:15 2020 +// Created by: Irina KRYLOVA +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V3.0 +// Copyright (c) Open CASCADE 2020 +// +// This file is part of Open CASCADE Technology software library. +// +// This library is free software; you can redistribute it and/or modify it under +// the terms of the GNU Lesser General Public License version 2.1 as published +// by the Free Software Foundation, with special exception defined in the file +// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT +// distribution for complete text of the license and disclaimer of any warranty. +// +// Alternatively, this file may be used under the terms of Open CASCADE +// commercial license or contractual agreement. + +#include + +IMPLEMENT_STANDARD_RTTIEXT(StepKinematics_RackAndPinionPairValue, StepKinematics_PairValue) + +//======================================================================= +//function : StepKinematics_RackAndPinionPairValue +//purpose : +//======================================================================= +StepKinematics_RackAndPinionPairValue::StepKinematics_RackAndPinionPairValue () +{ +} + +//======================================================================= +//function : Init +//purpose : +//======================================================================= +void StepKinematics_RackAndPinionPairValue::Init (const Handle(TCollection_HAsciiString)& theRepresentationItem_Name, + const Handle(StepKinematics_KinematicPair)& thePairValue_AppliesToPair, + const Standard_Real theActualDisplacement) +{ + StepKinematics_PairValue::Init(theRepresentationItem_Name, + thePairValue_AppliesToPair); + + myActualDisplacement = theActualDisplacement; +} + +//======================================================================= +//function : ActualDisplacement +//purpose : +//======================================================================= +Standard_Real StepKinematics_RackAndPinionPairValue::ActualDisplacement () const +{ + return myActualDisplacement; +} + +//======================================================================= +//function : SetActualDisplacement +//purpose : +//======================================================================= +void StepKinematics_RackAndPinionPairValue::SetActualDisplacement (const Standard_Real theActualDisplacement) +{ + myActualDisplacement = theActualDisplacement; +} diff --git a/src/StepKinematics/StepKinematics_RackAndPinionPairValue.hxx b/src/StepKinematics/StepKinematics_RackAndPinionPairValue.hxx new file mode 100644 index 0000000000..695caceb5b --- /dev/null +++ b/src/StepKinematics/StepKinematics_RackAndPinionPairValue.hxx @@ -0,0 +1,53 @@ +// Created on : Sat May 02 12:41:15 2020 +// Created by: Irina KRYLOVA +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V3.0 +// Copyright (c) Open CASCADE 2020 +// +// 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 _StepKinematics_RackAndPinionPairValue_HeaderFile_ +#define _StepKinematics_RackAndPinionPairValue_HeaderFile_ + +#include +#include +#include + +#include +#include + +DEFINE_STANDARD_HANDLE(StepKinematics_RackAndPinionPairValue, StepKinematics_PairValue) + +//! Representation of STEP entity RackAndPinionPairValue +class StepKinematics_RackAndPinionPairValue : public StepKinematics_PairValue +{ +public : + + //! default constructor + Standard_EXPORT StepKinematics_RackAndPinionPairValue(); + + //! Initialize all fields (own and inherited) + Standard_EXPORT void Init(const Handle(TCollection_HAsciiString)& theRepresentationItem_Name, + const Handle(StepKinematics_KinematicPair)& thePairValue_AppliesToPair, + const Standard_Real theActualDisplacement); + + //! Returns field ActualDisplacement + Standard_EXPORT Standard_Real ActualDisplacement() const; + //! Sets field ActualDisplacement + Standard_EXPORT void SetActualDisplacement (const Standard_Real theActualDisplacement); + +DEFINE_STANDARD_RTTIEXT(StepKinematics_RackAndPinionPairValue, StepKinematics_PairValue) + +private: + Standard_Real myActualDisplacement; + +}; +#endif // _StepKinematics_RackAndPinionPairValue_HeaderFile_ diff --git a/src/StepKinematics/StepKinematics_RackAndPinionPairWithRange.cxx b/src/StepKinematics/StepKinematics_RackAndPinionPairWithRange.cxx new file mode 100644 index 0000000000..ddae649746 --- /dev/null +++ b/src/StepKinematics/StepKinematics_RackAndPinionPairWithRange.cxx @@ -0,0 +1,122 @@ +// Created on : Sat May 02 12:41:15 2020 +// Created by: Irina KRYLOVA +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V3.0 +// Copyright (c) Open CASCADE 2020 +// +// This file is part of Open CASCADE Technology software library. +// +// This library is free software; you can redistribute it and/or modify it under +// the terms of the GNU Lesser General Public License version 2.1 as published +// by the Free Software Foundation, with special exception defined in the file +// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT +// distribution for complete text of the license and disclaimer of any warranty. +// +// Alternatively, this file may be used under the terms of Open CASCADE +// commercial license or contractual agreement. + +#include + +IMPLEMENT_STANDARD_RTTIEXT(StepKinematics_RackAndPinionPairWithRange, StepKinematics_RackAndPinionPair) + +//======================================================================= +//function : StepKinematics_RackAndPinionPairWithRange +//purpose : +//======================================================================= +StepKinematics_RackAndPinionPairWithRange::StepKinematics_RackAndPinionPairWithRange () +{ + defLowerLimitRackDisplacement = Standard_False; + defUpperLimitRackDisplacement = Standard_False; +} + +//======================================================================= +//function : Init +//purpose : +//======================================================================= +void StepKinematics_RackAndPinionPairWithRange::Init (const Handle(TCollection_HAsciiString)& theRepresentationItem_Name, + const Handle(TCollection_HAsciiString)& theItemDefinedTransformation_Name, + const Standard_Boolean hasItemDefinedTransformation_Description, + const Handle(TCollection_HAsciiString)& theItemDefinedTransformation_Description, + const Handle(StepRepr_RepresentationItem)& theItemDefinedTransformation_TransformItem1, + const Handle(StepRepr_RepresentationItem)& theItemDefinedTransformation_TransformItem2, + const Handle(StepKinematics_KinematicJoint)& theKinematicPair_Joint, + const Standard_Real theRackAndPinionPair_PinionRadius, + const Standard_Boolean hasLowerLimitRackDisplacement, + const Standard_Real theLowerLimitRackDisplacement, + const Standard_Boolean hasUpperLimitRackDisplacement, + const Standard_Real theUpperLimitRackDisplacement) +{ + StepKinematics_RackAndPinionPair::Init(theRepresentationItem_Name, + theItemDefinedTransformation_Name, + hasItemDefinedTransformation_Description, + theItemDefinedTransformation_Description, + theItemDefinedTransformation_TransformItem1, + theItemDefinedTransformation_TransformItem2, + theKinematicPair_Joint, + theRackAndPinionPair_PinionRadius); + + defLowerLimitRackDisplacement = hasLowerLimitRackDisplacement; + if (defLowerLimitRackDisplacement) { + myLowerLimitRackDisplacement = theLowerLimitRackDisplacement; + } + else myLowerLimitRackDisplacement = 0; + + defUpperLimitRackDisplacement = hasUpperLimitRackDisplacement; + if (defUpperLimitRackDisplacement) { + myUpperLimitRackDisplacement = theUpperLimitRackDisplacement; + } + else myUpperLimitRackDisplacement = 0; +} + +//======================================================================= +//function : LowerLimitRackDisplacement +//purpose : +//======================================================================= +Standard_Real StepKinematics_RackAndPinionPairWithRange::LowerLimitRackDisplacement () const +{ + return myLowerLimitRackDisplacement; +} + +//======================================================================= +//function : SetLowerLimitRackDisplacement +//purpose : +//======================================================================= +void StepKinematics_RackAndPinionPairWithRange::SetLowerLimitRackDisplacement (const Standard_Real theLowerLimitRackDisplacement) +{ + myLowerLimitRackDisplacement = theLowerLimitRackDisplacement; +} + +//======================================================================= +//function : HasLowerLimitRackDisplacement +//purpose : +//======================================================================= +Standard_Boolean StepKinematics_RackAndPinionPairWithRange::HasLowerLimitRackDisplacement () const +{ + return defLowerLimitRackDisplacement; +} + +//======================================================================= +//function : UpperLimitRackDisplacement +//purpose : +//======================================================================= +Standard_Real StepKinematics_RackAndPinionPairWithRange::UpperLimitRackDisplacement () const +{ + return myUpperLimitRackDisplacement; +} + +//======================================================================= +//function : SetUpperLimitRackDisplacement +//purpose : +//======================================================================= +void StepKinematics_RackAndPinionPairWithRange::SetUpperLimitRackDisplacement (const Standard_Real theUpperLimitRackDisplacement) +{ + myUpperLimitRackDisplacement = theUpperLimitRackDisplacement; +} + +//======================================================================= +//function : HasUpperLimitRackDisplacement +//purpose : +//======================================================================= +Standard_Boolean StepKinematics_RackAndPinionPairWithRange::HasUpperLimitRackDisplacement () const +{ + return defUpperLimitRackDisplacement; +} diff --git a/src/StepKinematics/StepKinematics_RackAndPinionPairWithRange.hxx b/src/StepKinematics/StepKinematics_RackAndPinionPairWithRange.hxx new file mode 100644 index 0000000000..356a0ff038 --- /dev/null +++ b/src/StepKinematics/StepKinematics_RackAndPinionPairWithRange.hxx @@ -0,0 +1,76 @@ +// Created on : Sat May 02 12:41:15 2020 +// Created by: Irina KRYLOVA +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V3.0 +// Copyright (c) Open CASCADE 2020 +// +// 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 _StepKinematics_RackAndPinionPairWithRange_HeaderFile_ +#define _StepKinematics_RackAndPinionPairWithRange_HeaderFile_ + +#include +#include +#include + +#include +#include +#include +#include + +DEFINE_STANDARD_HANDLE(StepKinematics_RackAndPinionPairWithRange, StepKinematics_RackAndPinionPair) + +//! Representation of STEP entity RackAndPinionPairWithRange +class StepKinematics_RackAndPinionPairWithRange : public StepKinematics_RackAndPinionPair +{ +public : + + //! default constructor + Standard_EXPORT StepKinematics_RackAndPinionPairWithRange(); + + //! Initialize all fields (own and inherited) + Standard_EXPORT void Init(const Handle(TCollection_HAsciiString)& theRepresentationItem_Name, + const Handle(TCollection_HAsciiString)& theItemDefinedTransformation_Name, + const Standard_Boolean hasItemDefinedTransformation_Description, + const Handle(TCollection_HAsciiString)& theItemDefinedTransformation_Description, + const Handle(StepRepr_RepresentationItem)& theItemDefinedTransformation_TransformItem1, + const Handle(StepRepr_RepresentationItem)& theItemDefinedTransformation_TransformItem2, + const Handle(StepKinematics_KinematicJoint)& theKinematicPair_Joint, + const Standard_Real theRackAndPinionPair_PinionRadius, + const Standard_Boolean hasLowerLimitRackDisplacement, + const Standard_Real theLowerLimitRackDisplacement, + const Standard_Boolean hasUpperLimitRackDisplacement, + const Standard_Real theUpperLimitRackDisplacement); + + //! Returns field LowerLimitRackDisplacement + Standard_EXPORT Standard_Real LowerLimitRackDisplacement() const; + //! Sets field LowerLimitRackDisplacement + Standard_EXPORT void SetLowerLimitRackDisplacement (const Standard_Real theLowerLimitRackDisplacement); + //! Returns True if optional field LowerLimitRackDisplacement is defined + Standard_EXPORT Standard_Boolean HasLowerLimitRackDisplacement() const; + + //! Returns field UpperLimitRackDisplacement + Standard_EXPORT Standard_Real UpperLimitRackDisplacement() const; + //! Sets field UpperLimitRackDisplacement + Standard_EXPORT void SetUpperLimitRackDisplacement (const Standard_Real theUpperLimitRackDisplacement); + //! Returns True if optional field UpperLimitRackDisplacement is defined + Standard_EXPORT Standard_Boolean HasUpperLimitRackDisplacement() const; + +DEFINE_STANDARD_RTTIEXT(StepKinematics_RackAndPinionPairWithRange, StepKinematics_RackAndPinionPair) + +private: + Standard_Real myLowerLimitRackDisplacement; //!< optional + Standard_Real myUpperLimitRackDisplacement; //!< optional + Standard_Boolean defLowerLimitRackDisplacement; //!< flag "is LowerLimitRackDisplacement defined" + Standard_Boolean defUpperLimitRackDisplacement; //!< flag "is UpperLimitRackDisplacement defined" + +}; +#endif // _StepKinematics_RackAndPinionPairWithRange_HeaderFile_ diff --git a/src/StepKinematics/StepKinematics_RevolutePair.cxx b/src/StepKinematics/StepKinematics_RevolutePair.cxx new file mode 100644 index 0000000000..17b17b7730 --- /dev/null +++ b/src/StepKinematics/StepKinematics_RevolutePair.cxx @@ -0,0 +1,27 @@ +// Created on : Sat May 02 12:41:15 2020 +// Created by: Irina KRYLOVA +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V3.0 +// Copyright (c) Open CASCADE 2020 +// +// This file is part of Open CASCADE Technology software library. +// +// This library is free software; you can redistribute it and/or modify it under +// the terms of the GNU Lesser General Public License version 2.1 as published +// by the Free Software Foundation, with special exception defined in the file +// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT +// distribution for complete text of the license and disclaimer of any warranty. +// +// Alternatively, this file may be used under the terms of Open CASCADE +// commercial license or contractual agreement. + +#include + +IMPLEMENT_STANDARD_RTTIEXT(StepKinematics_RevolutePair, StepKinematics_LowOrderKinematicPair) + +//======================================================================= +//function : StepKinematics_RevolutePair +//purpose : +//======================================================================= +StepKinematics_RevolutePair::StepKinematics_RevolutePair () +{ +} diff --git a/src/StepKinematics/StepKinematics_RevolutePair.hxx b/src/StepKinematics/StepKinematics_RevolutePair.hxx new file mode 100644 index 0000000000..58da2eecbb --- /dev/null +++ b/src/StepKinematics/StepKinematics_RevolutePair.hxx @@ -0,0 +1,42 @@ +// Created on : Sat May 02 12:41:15 2020 +// Created by: Irina KRYLOVA +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V3.0 +// Copyright (c) Open CASCADE 2020 +// +// 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 _StepKinematics_RevolutePair_HeaderFile_ +#define _StepKinematics_RevolutePair_HeaderFile_ + +#include +#include +#include + +#include +#include +#include +#include + +DEFINE_STANDARD_HANDLE(StepKinematics_RevolutePair, StepKinematics_LowOrderKinematicPair) + +//! Representation of STEP entity RevolutePair +class StepKinematics_RevolutePair : public StepKinematics_LowOrderKinematicPair +{ +public : + + //! default constructor + Standard_EXPORT StepKinematics_RevolutePair(); + +DEFINE_STANDARD_RTTIEXT(StepKinematics_RevolutePair, StepKinematics_LowOrderKinematicPair) + +}; +#endif // _StepKinematics_RevolutePair_HeaderFile_ diff --git a/src/StepKinematics/StepKinematics_RevolutePairValue.cxx b/src/StepKinematics/StepKinematics_RevolutePairValue.cxx new file mode 100644 index 0000000000..b1c61fd8d4 --- /dev/null +++ b/src/StepKinematics/StepKinematics_RevolutePairValue.cxx @@ -0,0 +1,59 @@ +// Created on : Sat May 02 12:41:15 2020 +// Created by: Irina KRYLOVA +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V3.0 +// Copyright (c) Open CASCADE 2020 +// +// This file is part of Open CASCADE Technology software library. +// +// This library is free software; you can redistribute it and/or modify it under +// the terms of the GNU Lesser General Public License version 2.1 as published +// by the Free Software Foundation, with special exception defined in the file +// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT +// distribution for complete text of the license and disclaimer of any warranty. +// +// Alternatively, this file may be used under the terms of Open CASCADE +// commercial license or contractual agreement. + +#include + +IMPLEMENT_STANDARD_RTTIEXT(StepKinematics_RevolutePairValue, StepKinematics_PairValue) + +//======================================================================= +//function : StepKinematics_RevolutePairValue +//purpose : +//======================================================================= +StepKinematics_RevolutePairValue::StepKinematics_RevolutePairValue () +{ +} + +//======================================================================= +//function : Init +//purpose : +//======================================================================= +void StepKinematics_RevolutePairValue::Init (const Handle(TCollection_HAsciiString)& theRepresentationItem_Name, + const Handle(StepKinematics_KinematicPair)& thePairValue_AppliesToPair, + const Standard_Real theActualRotation) +{ + StepKinematics_PairValue::Init(theRepresentationItem_Name, + thePairValue_AppliesToPair); + + myActualRotation = theActualRotation; +} + +//======================================================================= +//function : ActualRotation +//purpose : +//======================================================================= +Standard_Real StepKinematics_RevolutePairValue::ActualRotation () const +{ + return myActualRotation; +} + +//======================================================================= +//function : SetActualRotation +//purpose : +//======================================================================= +void StepKinematics_RevolutePairValue::SetActualRotation (const Standard_Real theActualRotation) +{ + myActualRotation = theActualRotation; +} diff --git a/src/StepKinematics/StepKinematics_RevolutePairValue.hxx b/src/StepKinematics/StepKinematics_RevolutePairValue.hxx new file mode 100644 index 0000000000..eb261a1b96 --- /dev/null +++ b/src/StepKinematics/StepKinematics_RevolutePairValue.hxx @@ -0,0 +1,53 @@ +// Created on : Sat May 02 12:41:15 2020 +// Created by: Irina KRYLOVA +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V3.0 +// Copyright (c) Open CASCADE 2020 +// +// 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 _StepKinematics_RevolutePairValue_HeaderFile_ +#define _StepKinematics_RevolutePairValue_HeaderFile_ + +#include +#include +#include + +#include +#include + +DEFINE_STANDARD_HANDLE(StepKinematics_RevolutePairValue, StepKinematics_PairValue) + +//! Representation of STEP entity RevolutePairValue +class StepKinematics_RevolutePairValue : public StepKinematics_PairValue +{ +public : + + //! default constructor + Standard_EXPORT StepKinematics_RevolutePairValue(); + + //! Initialize all fields (own and inherited) + Standard_EXPORT void Init(const Handle(TCollection_HAsciiString)& theRepresentationItem_Name, + const Handle(StepKinematics_KinematicPair)& thePairValue_AppliesToPair, + const Standard_Real theActualRotation); + + //! Returns field ActualRotation + Standard_EXPORT Standard_Real ActualRotation() const; + //! Sets field ActualRotation + Standard_EXPORT void SetActualRotation (const Standard_Real theActualRotation); + +DEFINE_STANDARD_RTTIEXT(StepKinematics_RevolutePairValue, StepKinematics_PairValue) + +private: + Standard_Real myActualRotation; + +}; +#endif // _StepKinematics_RevolutePairValue_HeaderFile_ diff --git a/src/StepKinematics/StepKinematics_RevolutePairWithRange.cxx b/src/StepKinematics/StepKinematics_RevolutePairWithRange.cxx new file mode 100644 index 0000000000..db06b53bff --- /dev/null +++ b/src/StepKinematics/StepKinematics_RevolutePairWithRange.cxx @@ -0,0 +1,132 @@ +// Created on : Sat May 02 12:41:15 2020 +// Created by: Irina KRYLOVA +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V3.0 +// Copyright (c) Open CASCADE 2020 +// +// This file is part of Open CASCADE Technology software library. +// +// This library is free software; you can redistribute it and/or modify it under +// the terms of the GNU Lesser General Public License version 2.1 as published +// by the Free Software Foundation, with special exception defined in the file +// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT +// distribution for complete text of the license and disclaimer of any warranty. +// +// Alternatively, this file may be used under the terms of Open CASCADE +// commercial license or contractual agreement. + +#include + +IMPLEMENT_STANDARD_RTTIEXT(StepKinematics_RevolutePairWithRange, StepKinematics_RevolutePair) + +//======================================================================= +//function : StepKinematics_RevolutePairWithRange +//purpose : +//======================================================================= +StepKinematics_RevolutePairWithRange::StepKinematics_RevolutePairWithRange () +{ + defLowerLimitActualRotation = Standard_False; + defUpperLimitActualRotation = Standard_False; +} + +//======================================================================= +//function : Init +//purpose : +//======================================================================= +void StepKinematics_RevolutePairWithRange::Init (const Handle(TCollection_HAsciiString)& theRepresentationItem_Name, + const Handle(TCollection_HAsciiString)& theItemDefinedTransformation_Name, + const Standard_Boolean hasItemDefinedTransformation_Description, + const Handle(TCollection_HAsciiString)& theItemDefinedTransformation_Description, + const Handle(StepRepr_RepresentationItem)& theItemDefinedTransformation_TransformItem1, + const Handle(StepRepr_RepresentationItem)& theItemDefinedTransformation_TransformItem2, + const Handle(StepKinematics_KinematicJoint)& theKinematicPair_Joint, + const Standard_Boolean theLowOrderKinematicPair_TX, + const Standard_Boolean theLowOrderKinematicPair_TY, + const Standard_Boolean theLowOrderKinematicPair_TZ, + const Standard_Boolean theLowOrderKinematicPair_RX, + const Standard_Boolean theLowOrderKinematicPair_RY, + const Standard_Boolean theLowOrderKinematicPair_RZ, + const Standard_Boolean hasLowerLimitActualRotation, + const Standard_Real theLowerLimitActualRotation, + const Standard_Boolean hasUpperLimitActualRotation, + const Standard_Real theUpperLimitActualRotation) +{ + StepKinematics_RevolutePair::Init(theRepresentationItem_Name, + theItemDefinedTransformation_Name, + hasItemDefinedTransformation_Description, + theItemDefinedTransformation_Description, + theItemDefinedTransformation_TransformItem1, + theItemDefinedTransformation_TransformItem2, + theKinematicPair_Joint, + theLowOrderKinematicPair_TX, + theLowOrderKinematicPair_TY, + theLowOrderKinematicPair_TZ, + theLowOrderKinematicPair_RX, + theLowOrderKinematicPair_RY, + theLowOrderKinematicPair_RZ); + + defLowerLimitActualRotation = hasLowerLimitActualRotation; + if (defLowerLimitActualRotation) { + myLowerLimitActualRotation = theLowerLimitActualRotation; + } + else myLowerLimitActualRotation = 0; + + defUpperLimitActualRotation = hasUpperLimitActualRotation; + if (defUpperLimitActualRotation) { + myUpperLimitActualRotation = theUpperLimitActualRotation; + } + else myUpperLimitActualRotation = 0; +} + +//======================================================================= +//function : LowerLimitActualRotation +//purpose : +//======================================================================= +Standard_Real StepKinematics_RevolutePairWithRange::LowerLimitActualRotation () const +{ + return myLowerLimitActualRotation; +} + +//======================================================================= +//function : SetLowerLimitActualRotation +//purpose : +//======================================================================= +void StepKinematics_RevolutePairWithRange::SetLowerLimitActualRotation (const Standard_Real theLowerLimitActualRotation) +{ + myLowerLimitActualRotation = theLowerLimitActualRotation; +} + +//======================================================================= +//function : HasLowerLimitActualRotation +//purpose : +//======================================================================= +Standard_Boolean StepKinematics_RevolutePairWithRange::HasLowerLimitActualRotation () const +{ + return defLowerLimitActualRotation; +} + +//======================================================================= +//function : UpperLimitActualRotation +//purpose : +//======================================================================= +Standard_Real StepKinematics_RevolutePairWithRange::UpperLimitActualRotation () const +{ + return myUpperLimitActualRotation; +} + +//======================================================================= +//function : SetUpperLimitActualRotation +//purpose : +//======================================================================= +void StepKinematics_RevolutePairWithRange::SetUpperLimitActualRotation (const Standard_Real theUpperLimitActualRotation) +{ + myUpperLimitActualRotation = theUpperLimitActualRotation; +} + +//======================================================================= +//function : HasUpperLimitActualRotation +//purpose : +//======================================================================= +Standard_Boolean StepKinematics_RevolutePairWithRange::HasUpperLimitActualRotation () const +{ + return defUpperLimitActualRotation; +} diff --git a/src/StepKinematics/StepKinematics_RevolutePairWithRange.hxx b/src/StepKinematics/StepKinematics_RevolutePairWithRange.hxx new file mode 100644 index 0000000000..93a25592ab --- /dev/null +++ b/src/StepKinematics/StepKinematics_RevolutePairWithRange.hxx @@ -0,0 +1,81 @@ +// Created on : Sat May 02 12:41:15 2020 +// Created by: Irina KRYLOVA +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V3.0 +// Copyright (c) Open CASCADE 2020 +// +// 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 _StepKinematics_RevolutePairWithRange_HeaderFile_ +#define _StepKinematics_RevolutePairWithRange_HeaderFile_ + +#include +#include +#include + +#include +#include +#include +#include + +DEFINE_STANDARD_HANDLE(StepKinematics_RevolutePairWithRange, StepKinematics_RevolutePair) + +//! Representation of STEP entity RevolutePairWithRange +class StepKinematics_RevolutePairWithRange : public StepKinematics_RevolutePair +{ +public : + + //! default constructor + Standard_EXPORT StepKinematics_RevolutePairWithRange(); + + //! Initialize all fields (own and inherited) + Standard_EXPORT void Init(const Handle(TCollection_HAsciiString)& theRepresentationItem_Name, + const Handle(TCollection_HAsciiString)& theItemDefinedTransformation_Name, + const Standard_Boolean hasItemDefinedTransformation_Description, + const Handle(TCollection_HAsciiString)& theItemDefinedTransformation_Description, + const Handle(StepRepr_RepresentationItem)& theItemDefinedTransformation_TransformItem1, + const Handle(StepRepr_RepresentationItem)& theItemDefinedTransformation_TransformItem2, + const Handle(StepKinematics_KinematicJoint)& theKinematicPair_Joint, + const Standard_Boolean theLowOrderKinematicPair_TX, + const Standard_Boolean theLowOrderKinematicPair_TY, + const Standard_Boolean theLowOrderKinematicPair_TZ, + const Standard_Boolean theLowOrderKinematicPair_RX, + const Standard_Boolean theLowOrderKinematicPair_RY, + const Standard_Boolean theLowOrderKinematicPair_RZ, + const Standard_Boolean hasLowerLimitActualRotation, + const Standard_Real theLowerLimitActualRotation, + const Standard_Boolean hasUpperLimitActualRotation, + const Standard_Real theUpperLimitActualRotation); + + //! Returns field LowerLimitActualRotation + Standard_EXPORT Standard_Real LowerLimitActualRotation() const; + //! Sets field LowerLimitActualRotation + Standard_EXPORT void SetLowerLimitActualRotation (const Standard_Real theLowerLimitActualRotation); + //! Returns True if optional field LowerLimitActualRotation is defined + Standard_EXPORT Standard_Boolean HasLowerLimitActualRotation() const; + + //! Returns field UpperLimitActualRotation + Standard_EXPORT Standard_Real UpperLimitActualRotation() const; + //! Sets field UpperLimitActualRotation + Standard_EXPORT void SetUpperLimitActualRotation (const Standard_Real theUpperLimitActualRotation); + //! Returns True if optional field UpperLimitActualRotation is defined + Standard_EXPORT Standard_Boolean HasUpperLimitActualRotation() const; + +DEFINE_STANDARD_RTTIEXT(StepKinematics_RevolutePairWithRange, StepKinematics_RevolutePair) + +private: + Standard_Real myLowerLimitActualRotation; //!< optional + Standard_Real myUpperLimitActualRotation; //!< optional + Standard_Boolean defLowerLimitActualRotation; //!< flag "is LowerLimitActualRotation defined" + Standard_Boolean defUpperLimitActualRotation; //!< flag "is UpperLimitActualRotation defined" + +}; +#endif // _StepKinematics_RevolutePairWithRange_HeaderFile_ diff --git a/src/StepKinematics/StepKinematics_RigidLinkRepresentation.cxx b/src/StepKinematics/StepKinematics_RigidLinkRepresentation.cxx new file mode 100644 index 0000000000..654b26b4e3 --- /dev/null +++ b/src/StepKinematics/StepKinematics_RigidLinkRepresentation.cxx @@ -0,0 +1,27 @@ +// Created on : Sat May 02 12:41:15 2020 +// Created by: Irina KRYLOVA +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V3.0 +// Copyright (c) Open CASCADE 2020 +// +// This file is part of Open CASCADE Technology software library. +// +// This library is free software; you can redistribute it and/or modify it under +// the terms of the GNU Lesser General Public License version 2.1 as published +// by the Free Software Foundation, with special exception defined in the file +// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT +// distribution for complete text of the license and disclaimer of any warranty. +// +// Alternatively, this file may be used under the terms of Open CASCADE +// commercial license or contractual agreement. + +#include + +IMPLEMENT_STANDARD_RTTIEXT(StepKinematics_RigidLinkRepresentation, StepKinematics_KinematicLinkRepresentation) + +//======================================================================= +//function : StepKinematics_RigidLinkRepresentation +//purpose : +//======================================================================= +StepKinematics_RigidLinkRepresentation::StepKinematics_RigidLinkRepresentation () +{ +} diff --git a/src/StepKinematics/StepKinematics_RigidLinkRepresentation.hxx b/src/StepKinematics/StepKinematics_RigidLinkRepresentation.hxx new file mode 100644 index 0000000000..abae00ea4e --- /dev/null +++ b/src/StepKinematics/StepKinematics_RigidLinkRepresentation.hxx @@ -0,0 +1,42 @@ +// Created on : Sat May 02 12:41:15 2020 +// Created by: Irina KRYLOVA +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V3.0 +// Copyright (c) Open CASCADE 2020 +// +// 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 _StepKinematics_RigidLinkRepresentation_HeaderFile_ +#define _StepKinematics_RigidLinkRepresentation_HeaderFile_ + +#include +#include +#include + +#include +#include +#include +#include + +DEFINE_STANDARD_HANDLE(StepKinematics_RigidLinkRepresentation, StepKinematics_KinematicLinkRepresentation) + +//! Representation of STEP entity RigidLinkRepresentation +class StepKinematics_RigidLinkRepresentation : public StepKinematics_KinematicLinkRepresentation +{ +public : + + //! default constructor + Standard_EXPORT StepKinematics_RigidLinkRepresentation(); + +DEFINE_STANDARD_RTTIEXT(StepKinematics_RigidLinkRepresentation, StepKinematics_KinematicLinkRepresentation) + +}; +#endif // _StepKinematics_RigidLinkRepresentation_HeaderFile_ diff --git a/src/StepKinematics/StepKinematics_RigidPlacement.cxx b/src/StepKinematics/StepKinematics_RigidPlacement.cxx new file mode 100644 index 0000000000..b89f56d0f8 --- /dev/null +++ b/src/StepKinematics/StepKinematics_RigidPlacement.cxx @@ -0,0 +1,57 @@ +// Created on : Sat May 02 12:41:14 2020 +// Created by: Irina KRYLOVA +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V3.0 +// Copyright (c) Open CASCADE 2020 +// +// This file is part of Open CASCADE Technology software library. +// +// This library is free software; you can redistribute it and/or modify it under +// the terms of the GNU Lesser General Public License version 2.1 as published +// by the Free Software Foundation, with special exception defined in the file +// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT +// distribution for complete text of the license and disclaimer of any warranty. +// +// Alternatively, this file may be used under the terms of Open CASCADE +// commercial license or contractual agreement. + +#include +#include +#include + +//======================================================================= +//function : StepKinematics_RigidPlacement +//purpose : +//======================================================================= +StepKinematics_RigidPlacement::StepKinematics_RigidPlacement () +{ +} + +//======================================================================= +//function : CaseNum +//purpose : +//======================================================================= +Standard_Integer StepKinematics_RigidPlacement::CaseNum (const Handle(Standard_Transient)& ent) const +{ + if (ent.IsNull()) return 0; + if (ent->IsKind(STANDARD_TYPE(StepGeom_Axis2Placement3d))) return 1; + if (ent->IsKind(STANDARD_TYPE(StepGeom_SuParameters))) return 2; + return 0; +} + +//======================================================================= +//function : Axis2Placement3d +//purpose : +//======================================================================= +Handle(StepGeom_Axis2Placement3d) StepKinematics_RigidPlacement::Axis2Placement3d () const +{ + return Handle(StepGeom_Axis2Placement3d)::DownCast(Value()); +} + +//======================================================================= +//function : SuParameters +//purpose : +//======================================================================= +Handle(StepGeom_SuParameters) StepKinematics_RigidPlacement::SuParameters () const +{ + return Handle(StepGeom_SuParameters)::DownCast(Value()); +} diff --git a/src/StepKinematics/StepKinematics_RigidPlacement.hxx b/src/StepKinematics/StepKinematics_RigidPlacement.hxx new file mode 100644 index 0000000000..74a7a08a86 --- /dev/null +++ b/src/StepKinematics/StepKinematics_RigidPlacement.hxx @@ -0,0 +1,53 @@ +// Created on : Sat May 02 12:41:14 2020 +// Created by: Irina KRYLOVA +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V3.0 +// Copyright (c) Open CASCADE 2020 +// +// 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 _StepKinematics_RigidPlacement_HeaderFile +#define _StepKinematics_RigidPlacement_HeaderFile + +#include +#include +#include +#include +#include + +class Standard_Transient; +class StepGeom_Axis2Placement3d; +class StepGeom_SuParameters; + +//! Representation of STEP SELECT type RigidPlacement +class StepKinematics_RigidPlacement : public StepData_SelectType +{ + +public: + + DEFINE_STANDARD_ALLOC + + //! Empty constructor + Standard_EXPORT StepKinematics_RigidPlacement(); + + //! Recognizes a kind of RigidPlacement select type + //! -- 1 -> Axis2Placement3d + //! -- 2 -> SuParameters + Standard_EXPORT Standard_Integer CaseNum (const Handle(Standard_Transient)& ent) const Standard_OVERRIDE; + + //! Returns Value as Axis2Placement3d (or Null if another type) + Standard_EXPORT Handle(StepGeom_Axis2Placement3d) Axis2Placement3d() const; + + //! Returns Value as SuParameters (or Null if another type) + Standard_EXPORT Handle(StepGeom_SuParameters) SuParameters() const; + +}; +#endif // _StepKinematics_RigidPlacement_HeaderFile diff --git a/src/StepKinematics/StepKinematics_RollingCurvePair.cxx b/src/StepKinematics/StepKinematics_RollingCurvePair.cxx new file mode 100644 index 0000000000..9c6ea96239 --- /dev/null +++ b/src/StepKinematics/StepKinematics_RollingCurvePair.cxx @@ -0,0 +1,27 @@ +// Created on : Sat May 02 12:41:16 2020 +// Created by: Irina KRYLOVA +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V3.0 +// Copyright (c) Open CASCADE 2020 +// +// This file is part of Open CASCADE Technology software library. +// +// This library is free software; you can redistribute it and/or modify it under +// the terms of the GNU Lesser General Public License version 2.1 as published +// by the Free Software Foundation, with special exception defined in the file +// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT +// distribution for complete text of the license and disclaimer of any warranty. +// +// Alternatively, this file may be used under the terms of Open CASCADE +// commercial license or contractual agreement. + +#include + +IMPLEMENT_STANDARD_RTTIEXT(StepKinematics_RollingCurvePair, StepKinematics_PlanarCurvePair) + +//======================================================================= +//function : StepKinematics_RollingCurvePair +//purpose : +//======================================================================= +StepKinematics_RollingCurvePair::StepKinematics_RollingCurvePair () +{ +} diff --git a/src/StepKinematics/StepKinematics_RollingCurvePair.hxx b/src/StepKinematics/StepKinematics_RollingCurvePair.hxx new file mode 100644 index 0000000000..e839cfe602 --- /dev/null +++ b/src/StepKinematics/StepKinematics_RollingCurvePair.hxx @@ -0,0 +1,43 @@ +// Created on : Sat May 02 12:41:16 2020 +// Created by: Irina KRYLOVA +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V3.0 +// Copyright (c) Open CASCADE 2020 +// +// 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 _StepKinematics_RollingCurvePair_HeaderFile_ +#define _StepKinematics_RollingCurvePair_HeaderFile_ + +#include +#include +#include + +#include +#include +#include +#include +#include + +DEFINE_STANDARD_HANDLE(StepKinematics_RollingCurvePair, StepKinematics_PlanarCurvePair) + +//! Representation of STEP entity RollingCurvePair +class StepKinematics_RollingCurvePair : public StepKinematics_PlanarCurvePair +{ +public : + + //! default constructor + Standard_EXPORT StepKinematics_RollingCurvePair(); + +DEFINE_STANDARD_RTTIEXT(StepKinematics_RollingCurvePair, StepKinematics_PlanarCurvePair) + +}; +#endif // _StepKinematics_RollingCurvePair_HeaderFile_ diff --git a/src/StepKinematics/StepKinematics_RollingCurvePairValue.cxx b/src/StepKinematics/StepKinematics_RollingCurvePairValue.cxx new file mode 100644 index 0000000000..330bc77c92 --- /dev/null +++ b/src/StepKinematics/StepKinematics_RollingCurvePairValue.cxx @@ -0,0 +1,59 @@ +// Created on : Sat May 02 12:41:16 2020 +// Created by: Irina KRYLOVA +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V3.0 +// Copyright (c) Open CASCADE 2020 +// +// This file is part of Open CASCADE Technology software library. +// +// This library is free software; you can redistribute it and/or modify it under +// the terms of the GNU Lesser General Public License version 2.1 as published +// by the Free Software Foundation, with special exception defined in the file +// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT +// distribution for complete text of the license and disclaimer of any warranty. +// +// Alternatively, this file may be used under the terms of Open CASCADE +// commercial license or contractual agreement. + +#include + +IMPLEMENT_STANDARD_RTTIEXT(StepKinematics_RollingCurvePairValue, StepKinematics_PairValue) + +//======================================================================= +//function : StepKinematics_RollingCurvePairValue +//purpose : +//======================================================================= +StepKinematics_RollingCurvePairValue::StepKinematics_RollingCurvePairValue () +{ +} + +//======================================================================= +//function : Init +//purpose : +//======================================================================= +void StepKinematics_RollingCurvePairValue::Init (const Handle(TCollection_HAsciiString)& theRepresentationItem_Name, + const Handle(StepKinematics_KinematicPair)& thePairValue_AppliesToPair, + const Handle(StepGeom_PointOnCurve)& theActualPointOnCurve1) +{ + StepKinematics_PairValue::Init(theRepresentationItem_Name, + thePairValue_AppliesToPair); + + myActualPointOnCurve1 = theActualPointOnCurve1; +} + +//======================================================================= +//function : ActualPointOnCurve1 +//purpose : +//======================================================================= +Handle(StepGeom_PointOnCurve) StepKinematics_RollingCurvePairValue::ActualPointOnCurve1 () const +{ + return myActualPointOnCurve1; +} + +//======================================================================= +//function : SetActualPointOnCurve1 +//purpose : +//======================================================================= +void StepKinematics_RollingCurvePairValue::SetActualPointOnCurve1 (const Handle(StepGeom_PointOnCurve)& theActualPointOnCurve1) +{ + myActualPointOnCurve1 = theActualPointOnCurve1; +} diff --git a/src/StepKinematics/StepKinematics_RollingCurvePairValue.hxx b/src/StepKinematics/StepKinematics_RollingCurvePairValue.hxx new file mode 100644 index 0000000000..c00671da3b --- /dev/null +++ b/src/StepKinematics/StepKinematics_RollingCurvePairValue.hxx @@ -0,0 +1,54 @@ +// Created on : Sat May 02 12:41:16 2020 +// Created by: Irina KRYLOVA +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V3.0 +// Copyright (c) Open CASCADE 2020 +// +// 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 _StepKinematics_RollingCurvePairValue_HeaderFile_ +#define _StepKinematics_RollingCurvePairValue_HeaderFile_ + +#include +#include +#include + +#include +#include +#include + +DEFINE_STANDARD_HANDLE(StepKinematics_RollingCurvePairValue, StepKinematics_PairValue) + +//! Representation of STEP entity RollingCurvePairValue +class StepKinematics_RollingCurvePairValue : public StepKinematics_PairValue +{ +public : + + //! default constructor + Standard_EXPORT StepKinematics_RollingCurvePairValue(); + + //! Initialize all fields (own and inherited) + Standard_EXPORT void Init(const Handle(TCollection_HAsciiString)& theRepresentationItem_Name, + const Handle(StepKinematics_KinematicPair)& thePairValue_AppliesToPair, + const Handle(StepGeom_PointOnCurve)& theActualPointOnCurve1); + + //! Returns field ActualPointOnCurve1 + Standard_EXPORT Handle(StepGeom_PointOnCurve) ActualPointOnCurve1() const; + //! Sets field ActualPointOnCurve1 + Standard_EXPORT void SetActualPointOnCurve1 (const Handle(StepGeom_PointOnCurve)& theActualPointOnCurve1); + +DEFINE_STANDARD_RTTIEXT(StepKinematics_RollingCurvePairValue, StepKinematics_PairValue) + +private: + Handle(StepGeom_PointOnCurve) myActualPointOnCurve1; + +}; +#endif // _StepKinematics_RollingCurvePairValue_HeaderFile_ diff --git a/src/StepKinematics/StepKinematics_RollingSurfacePair.cxx b/src/StepKinematics/StepKinematics_RollingSurfacePair.cxx new file mode 100644 index 0000000000..373623ad68 --- /dev/null +++ b/src/StepKinematics/StepKinematics_RollingSurfacePair.cxx @@ -0,0 +1,27 @@ +// Created on : Sat May 02 12:41:16 2020 +// Created by: Irina KRYLOVA +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V3.0 +// Copyright (c) Open CASCADE 2020 +// +// This file is part of Open CASCADE Technology software library. +// +// This library is free software; you can redistribute it and/or modify it under +// the terms of the GNU Lesser General Public License version 2.1 as published +// by the Free Software Foundation, with special exception defined in the file +// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT +// distribution for complete text of the license and disclaimer of any warranty. +// +// Alternatively, this file may be used under the terms of Open CASCADE +// commercial license or contractual agreement. + +#include + +IMPLEMENT_STANDARD_RTTIEXT(StepKinematics_RollingSurfacePair, StepKinematics_SurfacePair) + +//======================================================================= +//function : StepKinematics_RollingSurfacePair +//purpose : +//======================================================================= +StepKinematics_RollingSurfacePair::StepKinematics_RollingSurfacePair () +{ +} diff --git a/src/StepKinematics/StepKinematics_RollingSurfacePair.hxx b/src/StepKinematics/StepKinematics_RollingSurfacePair.hxx new file mode 100644 index 0000000000..6a389c7ff1 --- /dev/null +++ b/src/StepKinematics/StepKinematics_RollingSurfacePair.hxx @@ -0,0 +1,43 @@ +// Created on : Sat May 02 12:41:16 2020 +// Created by: Irina KRYLOVA +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V3.0 +// Copyright (c) Open CASCADE 2020 +// +// 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 _StepKinematics_RollingSurfacePair_HeaderFile_ +#define _StepKinematics_RollingSurfacePair_HeaderFile_ + +#include +#include +#include + +#include +#include +#include +#include +#include + +DEFINE_STANDARD_HANDLE(StepKinematics_RollingSurfacePair, StepKinematics_SurfacePair) + +//! Representation of STEP entity RollingSurfacePair +class StepKinematics_RollingSurfacePair : public StepKinematics_SurfacePair +{ +public : + + //! default constructor + Standard_EXPORT StepKinematics_RollingSurfacePair(); + +DEFINE_STANDARD_RTTIEXT(StepKinematics_RollingSurfacePair, StepKinematics_SurfacePair) + +}; +#endif // _StepKinematics_RollingSurfacePair_HeaderFile_ diff --git a/src/StepKinematics/StepKinematics_RollingSurfacePairValue.cxx b/src/StepKinematics/StepKinematics_RollingSurfacePairValue.cxx new file mode 100644 index 0000000000..5a74cf0281 --- /dev/null +++ b/src/StepKinematics/StepKinematics_RollingSurfacePairValue.cxx @@ -0,0 +1,80 @@ +// Created on : Sat May 02 12:41:16 2020 +// Created by: Irina KRYLOVA +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V3.0 +// Copyright (c) Open CASCADE 2020 +// +// This file is part of Open CASCADE Technology software library. +// +// This library is free software; you can redistribute it and/or modify it under +// the terms of the GNU Lesser General Public License version 2.1 as published +// by the Free Software Foundation, with special exception defined in the file +// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT +// distribution for complete text of the license and disclaimer of any warranty. +// +// Alternatively, this file may be used under the terms of Open CASCADE +// commercial license or contractual agreement. + +#include + +IMPLEMENT_STANDARD_RTTIEXT(StepKinematics_RollingSurfacePairValue, StepKinematics_PairValue) + +//======================================================================= +//function : StepKinematics_RollingSurfacePairValue +//purpose : +//======================================================================= +StepKinematics_RollingSurfacePairValue::StepKinematics_RollingSurfacePairValue () +{ +} + +//======================================================================= +//function : Init +//purpose : +//======================================================================= +void StepKinematics_RollingSurfacePairValue::Init (const Handle(TCollection_HAsciiString)& theRepresentationItem_Name, + const Handle(StepKinematics_KinematicPair)& thePairValue_AppliesToPair, + const Handle(StepGeom_PointOnSurface)& theActualPointOnSurface, + const Standard_Real theActualRotation) +{ + StepKinematics_PairValue::Init(theRepresentationItem_Name, + thePairValue_AppliesToPair); + + myActualPointOnSurface = theActualPointOnSurface; + + myActualRotation = theActualRotation; +} + +//======================================================================= +//function : ActualPointOnSurface +//purpose : +//======================================================================= +Handle(StepGeom_PointOnSurface) StepKinematics_RollingSurfacePairValue::ActualPointOnSurface () const +{ + return myActualPointOnSurface; +} + +//======================================================================= +//function : SetActualPointOnSurface +//purpose : +//======================================================================= +void StepKinematics_RollingSurfacePairValue::SetActualPointOnSurface (const Handle(StepGeom_PointOnSurface)& theActualPointOnSurface) +{ + myActualPointOnSurface = theActualPointOnSurface; +} + +//======================================================================= +//function : ActualRotation +//purpose : +//======================================================================= +Standard_Real StepKinematics_RollingSurfacePairValue::ActualRotation () const +{ + return myActualRotation; +} + +//======================================================================= +//function : SetActualRotation +//purpose : +//======================================================================= +void StepKinematics_RollingSurfacePairValue::SetActualRotation (const Standard_Real theActualRotation) +{ + myActualRotation = theActualRotation; +} diff --git a/src/StepKinematics/StepKinematics_RollingSurfacePairValue.hxx b/src/StepKinematics/StepKinematics_RollingSurfacePairValue.hxx new file mode 100644 index 0000000000..ab7ef66bc4 --- /dev/null +++ b/src/StepKinematics/StepKinematics_RollingSurfacePairValue.hxx @@ -0,0 +1,61 @@ +// Created on : Sat May 02 12:41:16 2020 +// Created by: Irina KRYLOVA +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V3.0 +// Copyright (c) Open CASCADE 2020 +// +// 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 _StepKinematics_RollingSurfacePairValue_HeaderFile_ +#define _StepKinematics_RollingSurfacePairValue_HeaderFile_ + +#include +#include +#include + +#include +#include +#include + +DEFINE_STANDARD_HANDLE(StepKinematics_RollingSurfacePairValue, StepKinematics_PairValue) + +//! Representation of STEP entity RollingSurfacePairValue +class StepKinematics_RollingSurfacePairValue : public StepKinematics_PairValue +{ +public : + + //! default constructor + Standard_EXPORT StepKinematics_RollingSurfacePairValue(); + + //! Initialize all fields (own and inherited) + Standard_EXPORT void Init(const Handle(TCollection_HAsciiString)& theRepresentationItem_Name, + const Handle(StepKinematics_KinematicPair)& thePairValue_AppliesToPair, + const Handle(StepGeom_PointOnSurface)& theActualPointOnSurface, + const Standard_Real theActualRotation); + + //! Returns field ActualPointOnSurface + Standard_EXPORT Handle(StepGeom_PointOnSurface) ActualPointOnSurface() const; + //! Sets field ActualPointOnSurface + Standard_EXPORT void SetActualPointOnSurface (const Handle(StepGeom_PointOnSurface)& theActualPointOnSurface); + + //! Returns field ActualRotation + Standard_EXPORT Standard_Real ActualRotation() const; + //! Sets field ActualRotation + Standard_EXPORT void SetActualRotation (const Standard_Real theActualRotation); + +DEFINE_STANDARD_RTTIEXT(StepKinematics_RollingSurfacePairValue, StepKinematics_PairValue) + +private: + Handle(StepGeom_PointOnSurface) myActualPointOnSurface; + Standard_Real myActualRotation; + +}; +#endif // _StepKinematics_RollingSurfacePairValue_HeaderFile_ diff --git a/src/StepKinematics/StepKinematics_RotationAboutDirection.cxx b/src/StepKinematics/StepKinematics_RotationAboutDirection.cxx new file mode 100644 index 0000000000..5df13f9a9e --- /dev/null +++ b/src/StepKinematics/StepKinematics_RotationAboutDirection.cxx @@ -0,0 +1,78 @@ +// Created on : Sat May 02 12:41:14 2020 +// Created by: Irina KRYLOVA +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V3.0 +// Copyright (c) Open CASCADE 2020 +// +// This file is part of Open CASCADE Technology software library. +// +// This library is free software; you can redistribute it and/or modify it under +// the terms of the GNU Lesser General Public License version 2.1 as published +// by the Free Software Foundation, with special exception defined in the file +// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT +// distribution for complete text of the license and disclaimer of any warranty. +// +// Alternatively, this file may be used under the terms of Open CASCADE +// commercial license or contractual agreement. + +#include + +IMPLEMENT_STANDARD_RTTIEXT(StepKinematics_RotationAboutDirection, StepGeom_GeometricRepresentationItem) + +//======================================================================= +//function : StepKinematics_RotationAboutDirection +//purpose : +//======================================================================= +StepKinematics_RotationAboutDirection::StepKinematics_RotationAboutDirection () +{ +} + +//======================================================================= +//function : Init +//purpose : +//======================================================================= +void StepKinematics_RotationAboutDirection::Init (const Handle(TCollection_HAsciiString)& theRepresentationItem_Name, + const Handle(StepGeom_Direction)& theDirectionOfAxis, + const Standard_Real theRotationAngle) +{ + StepGeom_GeometricRepresentationItem::Init(theRepresentationItem_Name); + + myDirectionOfAxis = theDirectionOfAxis; + + myRotationAngle = theRotationAngle; +} + +//======================================================================= +//function : DirectionOfAxis +//purpose : +//======================================================================= +Handle(StepGeom_Direction) StepKinematics_RotationAboutDirection::DirectionOfAxis () const +{ + return myDirectionOfAxis; +} + +//======================================================================= +//function : SetDirectionOfAxis +//purpose : +//======================================================================= +void StepKinematics_RotationAboutDirection::SetDirectionOfAxis (const Handle(StepGeom_Direction)& theDirectionOfAxis) +{ + myDirectionOfAxis = theDirectionOfAxis; +} + +//======================================================================= +//function : RotationAngle +//purpose : +//======================================================================= +Standard_Real StepKinematics_RotationAboutDirection::RotationAngle () const +{ + return myRotationAngle; +} + +//======================================================================= +//function : SetRotationAngle +//purpose : +//======================================================================= +void StepKinematics_RotationAboutDirection::SetRotationAngle (const Standard_Real theRotationAngle) +{ + myRotationAngle = theRotationAngle; +} diff --git a/src/StepKinematics/StepKinematics_RotationAboutDirection.hxx b/src/StepKinematics/StepKinematics_RotationAboutDirection.hxx new file mode 100644 index 0000000000..54e82408fd --- /dev/null +++ b/src/StepKinematics/StepKinematics_RotationAboutDirection.hxx @@ -0,0 +1,59 @@ +// Created on : Sat May 02 12:41:14 2020 +// Created by: Irina KRYLOVA +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V3.0 +// Copyright (c) Open CASCADE 2020 +// +// 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 _StepKinematics_RotationAboutDirection_HeaderFile_ +#define _StepKinematics_RotationAboutDirection_HeaderFile_ + +#include +#include +#include + +#include +#include + +DEFINE_STANDARD_HANDLE(StepKinematics_RotationAboutDirection, StepGeom_GeometricRepresentationItem) + +//! Representation of STEP entity RotationAboutDirection +class StepKinematics_RotationAboutDirection : public StepGeom_GeometricRepresentationItem +{ +public : + + //! default constructor + Standard_EXPORT StepKinematics_RotationAboutDirection(); + + //! Initialize all fields (own and inherited) + Standard_EXPORT void Init(const Handle(TCollection_HAsciiString)& theRepresentationItem_Name, + const Handle(StepGeom_Direction)& theDirectionOfAxis, + const Standard_Real theRotationAngle); + + //! Returns field DirectionOfAxis + Standard_EXPORT Handle(StepGeom_Direction) DirectionOfAxis() const; + //! Sets field DirectionOfAxis + Standard_EXPORT void SetDirectionOfAxis (const Handle(StepGeom_Direction)& theDirectionOfAxis); + + //! Returns field RotationAngle + Standard_EXPORT Standard_Real RotationAngle() const; + //! Sets field RotationAngle + Standard_EXPORT void SetRotationAngle (const Standard_Real theRotationAngle); + +DEFINE_STANDARD_RTTIEXT(StepKinematics_RotationAboutDirection, StepGeom_GeometricRepresentationItem) + +private: + Handle(StepGeom_Direction) myDirectionOfAxis; + Standard_Real myRotationAngle; + +}; +#endif // _StepKinematics_RotationAboutDirection_HeaderFile_ diff --git a/src/StepKinematics/StepKinematics_ScrewPair.cxx b/src/StepKinematics/StepKinematics_ScrewPair.cxx new file mode 100644 index 0000000000..f666506988 --- /dev/null +++ b/src/StepKinematics/StepKinematics_ScrewPair.cxx @@ -0,0 +1,69 @@ +// Created on : Sat May 02 12:41:16 2020 +// Created by: Irina KRYLOVA +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V3.0 +// Copyright (c) Open CASCADE 2020 +// +// This file is part of Open CASCADE Technology software library. +// +// This library is free software; you can redistribute it and/or modify it under +// the terms of the GNU Lesser General Public License version 2.1 as published +// by the Free Software Foundation, with special exception defined in the file +// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT +// distribution for complete text of the license and disclaimer of any warranty. +// +// Alternatively, this file may be used under the terms of Open CASCADE +// commercial license or contractual agreement. + +#include + +IMPLEMENT_STANDARD_RTTIEXT(StepKinematics_ScrewPair, StepKinematics_LowOrderKinematicPairWithMotionCoupling) + +//======================================================================= +//function : StepKinematics_ScrewPair +//purpose : +//======================================================================= +StepKinematics_ScrewPair::StepKinematics_ScrewPair () +{ +} + +//======================================================================= +//function : Init +//purpose : +//======================================================================= +void StepKinematics_ScrewPair::Init (const Handle(TCollection_HAsciiString)& theRepresentationItem_Name, + const Handle(TCollection_HAsciiString)& theItemDefinedTransformation_Name, + const Standard_Boolean hasItemDefinedTransformation_Description, + const Handle(TCollection_HAsciiString)& theItemDefinedTransformation_Description, + const Handle(StepRepr_RepresentationItem)& theItemDefinedTransformation_TransformItem1, + const Handle(StepRepr_RepresentationItem)& theItemDefinedTransformation_TransformItem2, + const Handle(StepKinematics_KinematicJoint)& theKinematicPair_Joint, + const Standard_Real thePitch) +{ + StepKinematics_LowOrderKinematicPairWithMotionCoupling::Init(theRepresentationItem_Name, + theItemDefinedTransformation_Name, + hasItemDefinedTransformation_Description, + theItemDefinedTransformation_Description, + theItemDefinedTransformation_TransformItem1, + theItemDefinedTransformation_TransformItem2, + theKinematicPair_Joint); + + myPitch = thePitch; +} + +//======================================================================= +//function : Pitch +//purpose : +//======================================================================= +Standard_Real StepKinematics_ScrewPair::Pitch () const +{ + return myPitch; +} + +//======================================================================= +//function : SetPitch +//purpose : +//======================================================================= +void StepKinematics_ScrewPair::SetPitch (const Standard_Real thePitch) +{ + myPitch = thePitch; +} diff --git a/src/StepKinematics/StepKinematics_ScrewPair.hxx b/src/StepKinematics/StepKinematics_ScrewPair.hxx new file mode 100644 index 0000000000..ddc6be1e9c --- /dev/null +++ b/src/StepKinematics/StepKinematics_ScrewPair.hxx @@ -0,0 +1,60 @@ +// Created on : Sat May 02 12:41:16 2020 +// Created by: Irina KRYLOVA +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V3.0 +// Copyright (c) Open CASCADE 2020 +// +// 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 _StepKinematics_ScrewPair_HeaderFile_ +#define _StepKinematics_ScrewPair_HeaderFile_ + +#include +#include +#include + +#include +#include +#include +#include + +DEFINE_STANDARD_HANDLE(StepKinematics_ScrewPair, StepKinematics_LowOrderKinematicPairWithMotionCoupling) + +//! Representation of STEP entity ScrewPair +class StepKinematics_ScrewPair : public StepKinematics_LowOrderKinematicPairWithMotionCoupling +{ +public : + + //! default constructor + Standard_EXPORT StepKinematics_ScrewPair(); + + //! Initialize all fields (own and inherited) + Standard_EXPORT void Init(const Handle(TCollection_HAsciiString)& theRepresentationItem_Name, + const Handle(TCollection_HAsciiString)& theItemDefinedTransformation_Name, + const Standard_Boolean hasItemDefinedTransformation_Description, + const Handle(TCollection_HAsciiString)& theItemDefinedTransformation_Description, + const Handle(StepRepr_RepresentationItem)& theItemDefinedTransformation_TransformItem1, + const Handle(StepRepr_RepresentationItem)& theItemDefinedTransformation_TransformItem2, + const Handle(StepKinematics_KinematicJoint)& theKinematicPair_Joint, + const Standard_Real thePitch); + + //! Returns field Pitch + Standard_EXPORT Standard_Real Pitch() const; + //! Sets field Pitch + Standard_EXPORT void SetPitch (const Standard_Real thePitch); + +DEFINE_STANDARD_RTTIEXT(StepKinematics_ScrewPair, StepKinematics_LowOrderKinematicPairWithMotionCoupling) + +private: + Standard_Real myPitch; + +}; +#endif // _StepKinematics_ScrewPair_HeaderFile_ diff --git a/src/StepKinematics/StepKinematics_ScrewPairValue.cxx b/src/StepKinematics/StepKinematics_ScrewPairValue.cxx new file mode 100644 index 0000000000..58a3a8cea9 --- /dev/null +++ b/src/StepKinematics/StepKinematics_ScrewPairValue.cxx @@ -0,0 +1,59 @@ +// Created on : Sat May 02 12:41:16 2020 +// Created by: Irina KRYLOVA +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V3.0 +// Copyright (c) Open CASCADE 2020 +// +// This file is part of Open CASCADE Technology software library. +// +// This library is free software; you can redistribute it and/or modify it under +// the terms of the GNU Lesser General Public License version 2.1 as published +// by the Free Software Foundation, with special exception defined in the file +// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT +// distribution for complete text of the license and disclaimer of any warranty. +// +// Alternatively, this file may be used under the terms of Open CASCADE +// commercial license or contractual agreement. + +#include + +IMPLEMENT_STANDARD_RTTIEXT(StepKinematics_ScrewPairValue, StepKinematics_PairValue) + +//======================================================================= +//function : StepKinematics_ScrewPairValue +//purpose : +//======================================================================= +StepKinematics_ScrewPairValue::StepKinematics_ScrewPairValue () +{ +} + +//======================================================================= +//function : Init +//purpose : +//======================================================================= +void StepKinematics_ScrewPairValue::Init (const Handle(TCollection_HAsciiString)& theRepresentationItem_Name, + const Handle(StepKinematics_KinematicPair)& thePairValue_AppliesToPair, + const Standard_Real theActualRotation) +{ + StepKinematics_PairValue::Init(theRepresentationItem_Name, + thePairValue_AppliesToPair); + + myActualRotation = theActualRotation; +} + +//======================================================================= +//function : ActualRotation +//purpose : +//======================================================================= +Standard_Real StepKinematics_ScrewPairValue::ActualRotation () const +{ + return myActualRotation; +} + +//======================================================================= +//function : SetActualRotation +//purpose : +//======================================================================= +void StepKinematics_ScrewPairValue::SetActualRotation (const Standard_Real theActualRotation) +{ + myActualRotation = theActualRotation; +} diff --git a/src/StepKinematics/StepKinematics_ScrewPairValue.hxx b/src/StepKinematics/StepKinematics_ScrewPairValue.hxx new file mode 100644 index 0000000000..eb90500321 --- /dev/null +++ b/src/StepKinematics/StepKinematics_ScrewPairValue.hxx @@ -0,0 +1,53 @@ +// Created on : Sat May 02 12:41:16 2020 +// Created by: Irina KRYLOVA +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V3.0 +// Copyright (c) Open CASCADE 2020 +// +// 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 _StepKinematics_ScrewPairValue_HeaderFile_ +#define _StepKinematics_ScrewPairValue_HeaderFile_ + +#include +#include +#include + +#include +#include + +DEFINE_STANDARD_HANDLE(StepKinematics_ScrewPairValue, StepKinematics_PairValue) + +//! Representation of STEP entity ScrewPairValue +class StepKinematics_ScrewPairValue : public StepKinematics_PairValue +{ +public : + + //! default constructor + Standard_EXPORT StepKinematics_ScrewPairValue(); + + //! Initialize all fields (own and inherited) + Standard_EXPORT void Init(const Handle(TCollection_HAsciiString)& theRepresentationItem_Name, + const Handle(StepKinematics_KinematicPair)& thePairValue_AppliesToPair, + const Standard_Real theActualRotation); + + //! Returns field ActualRotation + Standard_EXPORT Standard_Real ActualRotation() const; + //! Sets field ActualRotation + Standard_EXPORT void SetActualRotation (const Standard_Real theActualRotation); + +DEFINE_STANDARD_RTTIEXT(StepKinematics_ScrewPairValue, StepKinematics_PairValue) + +private: + Standard_Real myActualRotation; + +}; +#endif // _StepKinematics_ScrewPairValue_HeaderFile_ diff --git a/src/StepKinematics/StepKinematics_ScrewPairWithRange.cxx b/src/StepKinematics/StepKinematics_ScrewPairWithRange.cxx new file mode 100644 index 0000000000..200d4b9fe2 --- /dev/null +++ b/src/StepKinematics/StepKinematics_ScrewPairWithRange.cxx @@ -0,0 +1,122 @@ +// Created on : Sat May 02 12:41:16 2020 +// Created by: Irina KRYLOVA +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V3.0 +// Copyright (c) Open CASCADE 2020 +// +// This file is part of Open CASCADE Technology software library. +// +// This library is free software; you can redistribute it and/or modify it under +// the terms of the GNU Lesser General Public License version 2.1 as published +// by the Free Software Foundation, with special exception defined in the file +// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT +// distribution for complete text of the license and disclaimer of any warranty. +// +// Alternatively, this file may be used under the terms of Open CASCADE +// commercial license or contractual agreement. + +#include + +IMPLEMENT_STANDARD_RTTIEXT(StepKinematics_ScrewPairWithRange, StepKinematics_ScrewPair) + +//======================================================================= +//function : StepKinematics_ScrewPairWithRange +//purpose : +//======================================================================= +StepKinematics_ScrewPairWithRange::StepKinematics_ScrewPairWithRange () +{ + defLowerLimitActualRotation = Standard_False; + defUpperLimitActualRotation = Standard_False; +} + +//======================================================================= +//function : Init +//purpose : +//======================================================================= +void StepKinematics_ScrewPairWithRange::Init (const Handle(TCollection_HAsciiString)& theRepresentationItem_Name, + const Handle(TCollection_HAsciiString)& theItemDefinedTransformation_Name, + const Standard_Boolean hasItemDefinedTransformation_Description, + const Handle(TCollection_HAsciiString)& theItemDefinedTransformation_Description, + const Handle(StepRepr_RepresentationItem)& theItemDefinedTransformation_TransformItem1, + const Handle(StepRepr_RepresentationItem)& theItemDefinedTransformation_TransformItem2, + const Handle(StepKinematics_KinematicJoint)& theKinematicPair_Joint, + const Standard_Real theScrewPair_Pitch, + const Standard_Boolean hasLowerLimitActualRotation, + const Standard_Real theLowerLimitActualRotation, + const Standard_Boolean hasUpperLimitActualRotation, + const Standard_Real theUpperLimitActualRotation) +{ + StepKinematics_ScrewPair::Init(theRepresentationItem_Name, + theItemDefinedTransformation_Name, + hasItemDefinedTransformation_Description, + theItemDefinedTransformation_Description, + theItemDefinedTransformation_TransformItem1, + theItemDefinedTransformation_TransformItem2, + theKinematicPair_Joint, + theScrewPair_Pitch); + + defLowerLimitActualRotation = hasLowerLimitActualRotation; + if (defLowerLimitActualRotation) { + myLowerLimitActualRotation = theLowerLimitActualRotation; + } + else myLowerLimitActualRotation = 0; + + defUpperLimitActualRotation = hasUpperLimitActualRotation; + if (defUpperLimitActualRotation) { + myUpperLimitActualRotation = theUpperLimitActualRotation; + } + else myUpperLimitActualRotation = 0; +} + +//======================================================================= +//function : LowerLimitActualRotation +//purpose : +//======================================================================= +Standard_Real StepKinematics_ScrewPairWithRange::LowerLimitActualRotation () const +{ + return myLowerLimitActualRotation; +} + +//======================================================================= +//function : SetLowerLimitActualRotation +//purpose : +//======================================================================= +void StepKinematics_ScrewPairWithRange::SetLowerLimitActualRotation (const Standard_Real theLowerLimitActualRotation) +{ + myLowerLimitActualRotation = theLowerLimitActualRotation; +} + +//======================================================================= +//function : HasLowerLimitActualRotation +//purpose : +//======================================================================= +Standard_Boolean StepKinematics_ScrewPairWithRange::HasLowerLimitActualRotation () const +{ + return defLowerLimitActualRotation; +} + +//======================================================================= +//function : UpperLimitActualRotation +//purpose : +//======================================================================= +Standard_Real StepKinematics_ScrewPairWithRange::UpperLimitActualRotation () const +{ + return myUpperLimitActualRotation; +} + +//======================================================================= +//function : SetUpperLimitActualRotation +//purpose : +//======================================================================= +void StepKinematics_ScrewPairWithRange::SetUpperLimitActualRotation (const Standard_Real theUpperLimitActualRotation) +{ + myUpperLimitActualRotation = theUpperLimitActualRotation; +} + +//======================================================================= +//function : HasUpperLimitActualRotation +//purpose : +//======================================================================= +Standard_Boolean StepKinematics_ScrewPairWithRange::HasUpperLimitActualRotation () const +{ + return defUpperLimitActualRotation; +} diff --git a/src/StepKinematics/StepKinematics_ScrewPairWithRange.hxx b/src/StepKinematics/StepKinematics_ScrewPairWithRange.hxx new file mode 100644 index 0000000000..da227fa427 --- /dev/null +++ b/src/StepKinematics/StepKinematics_ScrewPairWithRange.hxx @@ -0,0 +1,76 @@ +// Created on : Sat May 02 12:41:16 2020 +// Created by: Irina KRYLOVA +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V3.0 +// Copyright (c) Open CASCADE 2020 +// +// 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 _StepKinematics_ScrewPairWithRange_HeaderFile_ +#define _StepKinematics_ScrewPairWithRange_HeaderFile_ + +#include +#include +#include + +#include +#include +#include +#include + +DEFINE_STANDARD_HANDLE(StepKinematics_ScrewPairWithRange, StepKinematics_ScrewPair) + +//! Representation of STEP entity ScrewPairWithRange +class StepKinematics_ScrewPairWithRange : public StepKinematics_ScrewPair +{ +public : + + //! default constructor + Standard_EXPORT StepKinematics_ScrewPairWithRange(); + + //! Initialize all fields (own and inherited) + Standard_EXPORT void Init(const Handle(TCollection_HAsciiString)& theRepresentationItem_Name, + const Handle(TCollection_HAsciiString)& theItemDefinedTransformation_Name, + const Standard_Boolean hasItemDefinedTransformation_Description, + const Handle(TCollection_HAsciiString)& theItemDefinedTransformation_Description, + const Handle(StepRepr_RepresentationItem)& theItemDefinedTransformation_TransformItem1, + const Handle(StepRepr_RepresentationItem)& theItemDefinedTransformation_TransformItem2, + const Handle(StepKinematics_KinematicJoint)& theKinematicPair_Joint, + const Standard_Real theScrewPair_Pitch, + const Standard_Boolean hasLowerLimitActualRotation, + const Standard_Real theLowerLimitActualRotation, + const Standard_Boolean hasUpperLimitActualRotation, + const Standard_Real theUpperLimitActualRotation); + + //! Returns field LowerLimitActualRotation + Standard_EXPORT Standard_Real LowerLimitActualRotation() const; + //! Sets field LowerLimitActualRotation + Standard_EXPORT void SetLowerLimitActualRotation (const Standard_Real theLowerLimitActualRotation); + //! Returns True if optional field LowerLimitActualRotation is defined + Standard_EXPORT Standard_Boolean HasLowerLimitActualRotation() const; + + //! Returns field UpperLimitActualRotation + Standard_EXPORT Standard_Real UpperLimitActualRotation() const; + //! Sets field UpperLimitActualRotation + Standard_EXPORT void SetUpperLimitActualRotation (const Standard_Real theUpperLimitActualRotation); + //! Returns True if optional field UpperLimitActualRotation is defined + Standard_EXPORT Standard_Boolean HasUpperLimitActualRotation() const; + +DEFINE_STANDARD_RTTIEXT(StepKinematics_ScrewPairWithRange, StepKinematics_ScrewPair) + +private: + Standard_Real myLowerLimitActualRotation; //!< optional + Standard_Real myUpperLimitActualRotation; //!< optional + Standard_Boolean defLowerLimitActualRotation; //!< flag "is LowerLimitActualRotation defined" + Standard_Boolean defUpperLimitActualRotation; //!< flag "is UpperLimitActualRotation defined" + +}; +#endif // _StepKinematics_ScrewPairWithRange_HeaderFile_ diff --git a/src/StepKinematics/StepKinematics_SlidingCurvePair.cxx b/src/StepKinematics/StepKinematics_SlidingCurvePair.cxx new file mode 100644 index 0000000000..063f3eb0f7 --- /dev/null +++ b/src/StepKinematics/StepKinematics_SlidingCurvePair.cxx @@ -0,0 +1,27 @@ +// Created on : Sat May 02 12:41:16 2020 +// Created by: Irina KRYLOVA +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V3.0 +// Copyright (c) Open CASCADE 2020 +// +// This file is part of Open CASCADE Technology software library. +// +// This library is free software; you can redistribute it and/or modify it under +// the terms of the GNU Lesser General Public License version 2.1 as published +// by the Free Software Foundation, with special exception defined in the file +// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT +// distribution for complete text of the license and disclaimer of any warranty. +// +// Alternatively, this file may be used under the terms of Open CASCADE +// commercial license or contractual agreement. + +#include + +IMPLEMENT_STANDARD_RTTIEXT(StepKinematics_SlidingCurvePair, StepKinematics_PlanarCurvePair) + +//======================================================================= +//function : StepKinematics_SlidingCurvePair +//purpose : +//======================================================================= +StepKinematics_SlidingCurvePair::StepKinematics_SlidingCurvePair () +{ +} diff --git a/src/StepKinematics/StepKinematics_SlidingCurvePair.hxx b/src/StepKinematics/StepKinematics_SlidingCurvePair.hxx new file mode 100644 index 0000000000..93d6112e01 --- /dev/null +++ b/src/StepKinematics/StepKinematics_SlidingCurvePair.hxx @@ -0,0 +1,43 @@ +// Created on : Sat May 02 12:41:16 2020 +// Created by: Irina KRYLOVA +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V3.0 +// Copyright (c) Open CASCADE 2020 +// +// 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 _StepKinematics_SlidingCurvePair_HeaderFile_ +#define _StepKinematics_SlidingCurvePair_HeaderFile_ + +#include +#include +#include + +#include +#include +#include +#include +#include + +DEFINE_STANDARD_HANDLE(StepKinematics_SlidingCurvePair, StepKinematics_PlanarCurvePair) + +//! Representation of STEP entity SlidingCurvePair +class StepKinematics_SlidingCurvePair : public StepKinematics_PlanarCurvePair +{ +public : + + //! default constructor + Standard_EXPORT StepKinematics_SlidingCurvePair(); + +DEFINE_STANDARD_RTTIEXT(StepKinematics_SlidingCurvePair, StepKinematics_PlanarCurvePair) + +}; +#endif // _StepKinematics_SlidingCurvePair_HeaderFile_ diff --git a/src/StepKinematics/StepKinematics_SlidingCurvePairValue.cxx b/src/StepKinematics/StepKinematics_SlidingCurvePairValue.cxx new file mode 100644 index 0000000000..82599fd37d --- /dev/null +++ b/src/StepKinematics/StepKinematics_SlidingCurvePairValue.cxx @@ -0,0 +1,80 @@ +// Created on : Sat May 02 12:41:16 2020 +// Created by: Irina KRYLOVA +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V3.0 +// Copyright (c) Open CASCADE 2020 +// +// This file is part of Open CASCADE Technology software library. +// +// This library is free software; you can redistribute it and/or modify it under +// the terms of the GNU Lesser General Public License version 2.1 as published +// by the Free Software Foundation, with special exception defined in the file +// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT +// distribution for complete text of the license and disclaimer of any warranty. +// +// Alternatively, this file may be used under the terms of Open CASCADE +// commercial license or contractual agreement. + +#include + +IMPLEMENT_STANDARD_RTTIEXT(StepKinematics_SlidingCurvePairValue, StepKinematics_PairValue) + +//======================================================================= +//function : StepKinematics_SlidingCurvePairValue +//purpose : +//======================================================================= +StepKinematics_SlidingCurvePairValue::StepKinematics_SlidingCurvePairValue () +{ +} + +//======================================================================= +//function : Init +//purpose : +//======================================================================= +void StepKinematics_SlidingCurvePairValue::Init (const Handle(TCollection_HAsciiString)& theRepresentationItem_Name, + const Handle(StepKinematics_KinematicPair)& thePairValue_AppliesToPair, + const Handle(StepGeom_PointOnCurve)& theActualPointOnCurve1, + const Handle(StepGeom_PointOnCurve)& theActualPointOnCurve2) +{ + StepKinematics_PairValue::Init(theRepresentationItem_Name, + thePairValue_AppliesToPair); + + myActualPointOnCurve1 = theActualPointOnCurve1; + + myActualPointOnCurve2 = theActualPointOnCurve2; +} + +//======================================================================= +//function : ActualPointOnCurve1 +//purpose : +//======================================================================= +Handle(StepGeom_PointOnCurve) StepKinematics_SlidingCurvePairValue::ActualPointOnCurve1 () const +{ + return myActualPointOnCurve1; +} + +//======================================================================= +//function : SetActualPointOnCurve1 +//purpose : +//======================================================================= +void StepKinematics_SlidingCurvePairValue::SetActualPointOnCurve1 (const Handle(StepGeom_PointOnCurve)& theActualPointOnCurve1) +{ + myActualPointOnCurve1 = theActualPointOnCurve1; +} + +//======================================================================= +//function : ActualPointOnCurve2 +//purpose : +//======================================================================= +Handle(StepGeom_PointOnCurve) StepKinematics_SlidingCurvePairValue::ActualPointOnCurve2 () const +{ + return myActualPointOnCurve2; +} + +//======================================================================= +//function : SetActualPointOnCurve2 +//purpose : +//======================================================================= +void StepKinematics_SlidingCurvePairValue::SetActualPointOnCurve2 (const Handle(StepGeom_PointOnCurve)& theActualPointOnCurve2) +{ + myActualPointOnCurve2 = theActualPointOnCurve2; +} diff --git a/src/StepKinematics/StepKinematics_SlidingCurvePairValue.hxx b/src/StepKinematics/StepKinematics_SlidingCurvePairValue.hxx new file mode 100644 index 0000000000..1ef135609f --- /dev/null +++ b/src/StepKinematics/StepKinematics_SlidingCurvePairValue.hxx @@ -0,0 +1,61 @@ +// Created on : Sat May 02 12:41:16 2020 +// Created by: Irina KRYLOVA +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V3.0 +// Copyright (c) Open CASCADE 2020 +// +// 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 _StepKinematics_SlidingCurvePairValue_HeaderFile_ +#define _StepKinematics_SlidingCurvePairValue_HeaderFile_ + +#include +#include +#include + +#include +#include +#include + +DEFINE_STANDARD_HANDLE(StepKinematics_SlidingCurvePairValue, StepKinematics_PairValue) + +//! Representation of STEP entity SlidingCurvePairValue +class StepKinematics_SlidingCurvePairValue : public StepKinematics_PairValue +{ +public : + + //! default constructor + Standard_EXPORT StepKinematics_SlidingCurvePairValue(); + + //! Initialize all fields (own and inherited) + Standard_EXPORT void Init(const Handle(TCollection_HAsciiString)& theRepresentationItem_Name, + const Handle(StepKinematics_KinematicPair)& thePairValue_AppliesToPair, + const Handle(StepGeom_PointOnCurve)& theActualPointOnCurve1, + const Handle(StepGeom_PointOnCurve)& theActualPointOnCurve2); + + //! Returns field ActualPointOnCurve1 + Standard_EXPORT Handle(StepGeom_PointOnCurve) ActualPointOnCurve1() const; + //! Sets field ActualPointOnCurve1 + Standard_EXPORT void SetActualPointOnCurve1 (const Handle(StepGeom_PointOnCurve)& theActualPointOnCurve1); + + //! Returns field ActualPointOnCurve2 + Standard_EXPORT Handle(StepGeom_PointOnCurve) ActualPointOnCurve2() const; + //! Sets field ActualPointOnCurve2 + Standard_EXPORT void SetActualPointOnCurve2 (const Handle(StepGeom_PointOnCurve)& theActualPointOnCurve2); + +DEFINE_STANDARD_RTTIEXT(StepKinematics_SlidingCurvePairValue, StepKinematics_PairValue) + +private: + Handle(StepGeom_PointOnCurve) myActualPointOnCurve1; + Handle(StepGeom_PointOnCurve) myActualPointOnCurve2; + +}; +#endif // _StepKinematics_SlidingCurvePairValue_HeaderFile_ diff --git a/src/StepKinematics/StepKinematics_SlidingSurfacePair.cxx b/src/StepKinematics/StepKinematics_SlidingSurfacePair.cxx new file mode 100644 index 0000000000..81dc94f326 --- /dev/null +++ b/src/StepKinematics/StepKinematics_SlidingSurfacePair.cxx @@ -0,0 +1,27 @@ +// Created on : Sat May 02 12:41:16 2020 +// Created by: Irina KRYLOVA +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V3.0 +// Copyright (c) Open CASCADE 2020 +// +// This file is part of Open CASCADE Technology software library. +// +// This library is free software; you can redistribute it and/or modify it under +// the terms of the GNU Lesser General Public License version 2.1 as published +// by the Free Software Foundation, with special exception defined in the file +// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT +// distribution for complete text of the license and disclaimer of any warranty. +// +// Alternatively, this file may be used under the terms of Open CASCADE +// commercial license or contractual agreement. + +#include + +IMPLEMENT_STANDARD_RTTIEXT(StepKinematics_SlidingSurfacePair, StepKinematics_SurfacePair) + +//======================================================================= +//function : StepKinematics_SlidingSurfacePair +//purpose : +//======================================================================= +StepKinematics_SlidingSurfacePair::StepKinematics_SlidingSurfacePair () +{ +} diff --git a/src/StepKinematics/StepKinematics_SlidingSurfacePair.hxx b/src/StepKinematics/StepKinematics_SlidingSurfacePair.hxx new file mode 100644 index 0000000000..4130201aa5 --- /dev/null +++ b/src/StepKinematics/StepKinematics_SlidingSurfacePair.hxx @@ -0,0 +1,43 @@ +// Created on : Sat May 02 12:41:16 2020 +// Created by: Irina KRYLOVA +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V3.0 +// Copyright (c) Open CASCADE 2020 +// +// 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 _StepKinematics_SlidingSurfacePair_HeaderFile_ +#define _StepKinematics_SlidingSurfacePair_HeaderFile_ + +#include +#include +#include + +#include +#include +#include +#include +#include + +DEFINE_STANDARD_HANDLE(StepKinematics_SlidingSurfacePair, StepKinematics_SurfacePair) + +//! Representation of STEP entity SlidingSurfacePair +class StepKinematics_SlidingSurfacePair : public StepKinematics_SurfacePair +{ +public : + + //! default constructor + Standard_EXPORT StepKinematics_SlidingSurfacePair(); + +DEFINE_STANDARD_RTTIEXT(StepKinematics_SlidingSurfacePair, StepKinematics_SurfacePair) + +}; +#endif // _StepKinematics_SlidingSurfacePair_HeaderFile_ diff --git a/src/StepKinematics/StepKinematics_SlidingSurfacePairValue.cxx b/src/StepKinematics/StepKinematics_SlidingSurfacePairValue.cxx new file mode 100644 index 0000000000..ca418d08ea --- /dev/null +++ b/src/StepKinematics/StepKinematics_SlidingSurfacePairValue.cxx @@ -0,0 +1,101 @@ +// Created on : Sat May 02 12:41:16 2020 +// Created by: Irina KRYLOVA +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V3.0 +// Copyright (c) Open CASCADE 2020 +// +// This file is part of Open CASCADE Technology software library. +// +// This library is free software; you can redistribute it and/or modify it under +// the terms of the GNU Lesser General Public License version 2.1 as published +// by the Free Software Foundation, with special exception defined in the file +// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT +// distribution for complete text of the license and disclaimer of any warranty. +// +// Alternatively, this file may be used under the terms of Open CASCADE +// commercial license or contractual agreement. + +#include + +IMPLEMENT_STANDARD_RTTIEXT(StepKinematics_SlidingSurfacePairValue, StepKinematics_PairValue) + +//======================================================================= +//function : StepKinematics_SlidingSurfacePairValue +//purpose : +//======================================================================= +StepKinematics_SlidingSurfacePairValue::StepKinematics_SlidingSurfacePairValue () +{ +} + +//======================================================================= +//function : Init +//purpose : +//======================================================================= +void StepKinematics_SlidingSurfacePairValue::Init (const Handle(TCollection_HAsciiString)& theRepresentationItem_Name, + const Handle(StepKinematics_KinematicPair)& thePairValue_AppliesToPair, + const Handle(StepGeom_PointOnSurface)& theActualPointOnSurface1, + const Handle(StepGeom_PointOnSurface)& theActualPointOnSurface2, + const Standard_Real theActualRotation) +{ + StepKinematics_PairValue::Init(theRepresentationItem_Name, + thePairValue_AppliesToPair); + + myActualPointOnSurface1 = theActualPointOnSurface1; + + myActualPointOnSurface2 = theActualPointOnSurface2; + + myActualRotation = theActualRotation; +} + +//======================================================================= +//function : ActualPointOnSurface1 +//purpose : +//======================================================================= +Handle(StepGeom_PointOnSurface) StepKinematics_SlidingSurfacePairValue::ActualPointOnSurface1 () const +{ + return myActualPointOnSurface1; +} + +//======================================================================= +//function : SetActualPointOnSurface1 +//purpose : +//======================================================================= +void StepKinematics_SlidingSurfacePairValue::SetActualPointOnSurface1 (const Handle(StepGeom_PointOnSurface)& theActualPointOnSurface1) +{ + myActualPointOnSurface1 = theActualPointOnSurface1; +} + +//======================================================================= +//function : ActualPointOnSurface2 +//purpose : +//======================================================================= +Handle(StepGeom_PointOnSurface) StepKinematics_SlidingSurfacePairValue::ActualPointOnSurface2 () const +{ + return myActualPointOnSurface2; +} + +//======================================================================= +//function : SetActualPointOnSurface2 +//purpose : +//======================================================================= +void StepKinematics_SlidingSurfacePairValue::SetActualPointOnSurface2 (const Handle(StepGeom_PointOnSurface)& theActualPointOnSurface2) +{ + myActualPointOnSurface2 = theActualPointOnSurface2; +} + +//======================================================================= +//function : ActualRotation +//purpose : +//======================================================================= +Standard_Real StepKinematics_SlidingSurfacePairValue::ActualRotation () const +{ + return myActualRotation; +} + +//======================================================================= +//function : SetActualRotation +//purpose : +//======================================================================= +void StepKinematics_SlidingSurfacePairValue::SetActualRotation (const Standard_Real theActualRotation) +{ + myActualRotation = theActualRotation; +} diff --git a/src/StepKinematics/StepKinematics_SlidingSurfacePairValue.hxx b/src/StepKinematics/StepKinematics_SlidingSurfacePairValue.hxx new file mode 100644 index 0000000000..9c54281e33 --- /dev/null +++ b/src/StepKinematics/StepKinematics_SlidingSurfacePairValue.hxx @@ -0,0 +1,68 @@ +// Created on : Sat May 02 12:41:16 2020 +// Created by: Irina KRYLOVA +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V3.0 +// Copyright (c) Open CASCADE 2020 +// +// 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 _StepKinematics_SlidingSurfacePairValue_HeaderFile_ +#define _StepKinematics_SlidingSurfacePairValue_HeaderFile_ + +#include +#include +#include + +#include +#include +#include + +DEFINE_STANDARD_HANDLE(StepKinematics_SlidingSurfacePairValue, StepKinematics_PairValue) + +//! Representation of STEP entity SlidingSurfacePairValue +class StepKinematics_SlidingSurfacePairValue : public StepKinematics_PairValue +{ +public : + + //! default constructor + Standard_EXPORT StepKinematics_SlidingSurfacePairValue(); + + //! Initialize all fields (own and inherited) + Standard_EXPORT void Init(const Handle(TCollection_HAsciiString)& theRepresentationItem_Name, + const Handle(StepKinematics_KinematicPair)& thePairValue_AppliesToPair, + const Handle(StepGeom_PointOnSurface)& theActualPointOnSurface1, + const Handle(StepGeom_PointOnSurface)& theActualPointOnSurface2, + const Standard_Real theActualRotation); + + //! Returns field ActualPointOnSurface1 + Standard_EXPORT Handle(StepGeom_PointOnSurface) ActualPointOnSurface1() const; + //! Sets field ActualPointOnSurface1 + Standard_EXPORT void SetActualPointOnSurface1 (const Handle(StepGeom_PointOnSurface)& theActualPointOnSurface1); + + //! Returns field ActualPointOnSurface2 + Standard_EXPORT Handle(StepGeom_PointOnSurface) ActualPointOnSurface2() const; + //! Sets field ActualPointOnSurface2 + Standard_EXPORT void SetActualPointOnSurface2 (const Handle(StepGeom_PointOnSurface)& theActualPointOnSurface2); + + //! Returns field ActualRotation + Standard_EXPORT Standard_Real ActualRotation() const; + //! Sets field ActualRotation + Standard_EXPORT void SetActualRotation (const Standard_Real theActualRotation); + +DEFINE_STANDARD_RTTIEXT(StepKinematics_SlidingSurfacePairValue, StepKinematics_PairValue) + +private: + Handle(StepGeom_PointOnSurface) myActualPointOnSurface1; + Handle(StepGeom_PointOnSurface) myActualPointOnSurface2; + Standard_Real myActualRotation; + +}; +#endif // _StepKinematics_SlidingSurfacePairValue_HeaderFile_ diff --git a/src/StepKinematics/StepKinematics_SpatialRotation.cxx b/src/StepKinematics/StepKinematics_SpatialRotation.cxx new file mode 100644 index 0000000000..35c627afc7 --- /dev/null +++ b/src/StepKinematics/StepKinematics_SpatialRotation.cxx @@ -0,0 +1,57 @@ +// Created on : Sat May 02 12:41:14 2020 +// Created by: Irina KRYLOVA +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V3.0 +// Copyright (c) Open CASCADE 2020 +// +// This file is part of Open CASCADE Technology software library. +// +// This library is free software; you can redistribute it and/or modify it under +// the terms of the GNU Lesser General Public License version 2.1 as published +// by the Free Software Foundation, with special exception defined in the file +// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT +// distribution for complete text of the license and disclaimer of any warranty. +// +// Alternatively, this file may be used under the terms of Open CASCADE +// commercial license or contractual agreement. + +#include +#include +#include + +//======================================================================= +//function : StepKinematics_SpatialRotation +//purpose : +//======================================================================= +StepKinematics_SpatialRotation::StepKinematics_SpatialRotation () +{ +} + +//======================================================================= +//function : CaseNum +//purpose : +//======================================================================= +Standard_Integer StepKinematics_SpatialRotation::CaseNum (const Handle(Standard_Transient)& ent) const +{ + if (ent.IsNull()) return 0; + if (ent->IsKind(STANDARD_TYPE(StepKinematics_RotationAboutDirection))) return 1; + if (ent->IsKind(STANDARD_TYPE(TColStd_HArray1OfReal))) return 2; + return 0; +} + +//======================================================================= +//function : RotationAboutDirection +//purpose : +//======================================================================= +Handle(StepKinematics_RotationAboutDirection) StepKinematics_SpatialRotation::RotationAboutDirection () const +{ + return Handle(StepKinematics_RotationAboutDirection)::DownCast(Value()); +} + +//======================================================================= +//function : YprRotation +//purpose : +//======================================================================= +Handle(TColStd_HArray1OfReal) StepKinematics_SpatialRotation::YprRotation () const +{ + return Handle(TColStd_HArray1OfReal)::DownCast(Value()); +} diff --git a/src/StepKinematics/StepKinematics_SpatialRotation.hxx b/src/StepKinematics/StepKinematics_SpatialRotation.hxx new file mode 100644 index 0000000000..314268cc89 --- /dev/null +++ b/src/StepKinematics/StepKinematics_SpatialRotation.hxx @@ -0,0 +1,53 @@ +// Created on : Sat May 02 12:41:14 2020 +// Created by: Irina KRYLOVA +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V3.0 +// Copyright (c) Open CASCADE 2020 +// +// 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 _StepKinematics_SpatialRotation_HeaderFile +#define _StepKinematics_SpatialRotation_HeaderFile + +#include +#include +#include +#include +#include + +class Standard_Transient; +class StepKinematics_RotationAboutDirection; +class TColStd_HArray1OfReal; + +//! Representation of STEP SELECT type SpatialRotation +class StepKinematics_SpatialRotation : public StepData_SelectType +{ + +public: + + DEFINE_STANDARD_ALLOC + + //! Empty constructor + Standard_EXPORT StepKinematics_SpatialRotation(); + + //! Recognizes a kind of SpatialRotation select type + //! -- 1 -> RotationAboutDirection + //! -- 2 -> YprRotation + Standard_EXPORT Standard_Integer CaseNum (const Handle(Standard_Transient)& ent) const Standard_OVERRIDE; + + //! Returns Value as RotationAboutDirection (or Null if another type) + Standard_EXPORT Handle(StepKinematics_RotationAboutDirection) RotationAboutDirection() const; + + //! Returns Value as YprRotation (or Null if another type) + Standard_EXPORT Handle(TColStd_HArray1OfReal) YprRotation() const; + +}; +#endif // _StepKinematics_SpatialRotation_HeaderFile diff --git a/src/StepKinematics/StepKinematics_SphericalPair.cxx b/src/StepKinematics/StepKinematics_SphericalPair.cxx new file mode 100644 index 0000000000..0b3b8afa22 --- /dev/null +++ b/src/StepKinematics/StepKinematics_SphericalPair.cxx @@ -0,0 +1,27 @@ +// Created on : Sat May 02 12:41:16 2020 +// Created by: Irina KRYLOVA +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V3.0 +// Copyright (c) Open CASCADE 2020 +// +// This file is part of Open CASCADE Technology software library. +// +// This library is free software; you can redistribute it and/or modify it under +// the terms of the GNU Lesser General Public License version 2.1 as published +// by the Free Software Foundation, with special exception defined in the file +// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT +// distribution for complete text of the license and disclaimer of any warranty. +// +// Alternatively, this file may be used under the terms of Open CASCADE +// commercial license or contractual agreement. + +#include + +IMPLEMENT_STANDARD_RTTIEXT(StepKinematics_SphericalPair, StepKinematics_LowOrderKinematicPair) + +//======================================================================= +//function : StepKinematics_SphericalPair +//purpose : +//======================================================================= +StepKinematics_SphericalPair::StepKinematics_SphericalPair () +{ +} diff --git a/src/StepKinematics/StepKinematics_SphericalPair.hxx b/src/StepKinematics/StepKinematics_SphericalPair.hxx new file mode 100644 index 0000000000..37fa34d3a6 --- /dev/null +++ b/src/StepKinematics/StepKinematics_SphericalPair.hxx @@ -0,0 +1,42 @@ +// Created on : Sat May 02 12:41:16 2020 +// Created by: Irina KRYLOVA +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V3.0 +// Copyright (c) Open CASCADE 2020 +// +// 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 _StepKinematics_SphericalPair_HeaderFile_ +#define _StepKinematics_SphericalPair_HeaderFile_ + +#include +#include +#include + +#include +#include +#include +#include + +DEFINE_STANDARD_HANDLE(StepKinematics_SphericalPair, StepKinematics_LowOrderKinematicPair) + +//! Representation of STEP entity SphericalPair +class StepKinematics_SphericalPair : public StepKinematics_LowOrderKinematicPair +{ +public : + + //! default constructor + Standard_EXPORT StepKinematics_SphericalPair(); + +DEFINE_STANDARD_RTTIEXT(StepKinematics_SphericalPair, StepKinematics_LowOrderKinematicPair) + +}; +#endif // _StepKinematics_SphericalPair_HeaderFile_ diff --git a/src/StepKinematics/StepKinematics_SphericalPairSelect.cxx b/src/StepKinematics/StepKinematics_SphericalPairSelect.cxx new file mode 100644 index 0000000000..af203648dc --- /dev/null +++ b/src/StepKinematics/StepKinematics_SphericalPairSelect.cxx @@ -0,0 +1,57 @@ +// Created on : Sat May 02 12:41:14 2020 +// Created by: Irina KRYLOVA +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V3.0 +// Copyright (c) Open CASCADE 2020 +// +// This file is part of Open CASCADE Technology software library. +// +// This library is free software; you can redistribute it and/or modify it under +// the terms of the GNU Lesser General Public License version 2.1 as published +// by the Free Software Foundation, with special exception defined in the file +// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT +// distribution for complete text of the license and disclaimer of any warranty. +// +// Alternatively, this file may be used under the terms of Open CASCADE +// commercial license or contractual agreement. + +#include +#include +#include + +//======================================================================= +//function : StepKinematics_SphericalPairSelect +//purpose : +//======================================================================= +StepKinematics_SphericalPairSelect::StepKinematics_SphericalPairSelect () +{ +} + +//======================================================================= +//function : CaseNum +//purpose : +//======================================================================= +Standard_Integer StepKinematics_SphericalPairSelect::CaseNum (const Handle(Standard_Transient)& ent) const +{ + if (ent.IsNull()) return 0; + if (ent->IsKind(STANDARD_TYPE(StepKinematics_SphericalPair))) return 1; + if (ent->IsKind(STANDARD_TYPE(StepKinematics_SphericalPairWithPin))) return 2; + return 0; +} + +//======================================================================= +//function : SphericalPair +//purpose : +//======================================================================= +Handle(StepKinematics_SphericalPair) StepKinematics_SphericalPairSelect::SphericalPair () const +{ + return Handle(StepKinematics_SphericalPair)::DownCast(Value()); +} + +//======================================================================= +//function : SphericalPairWithPin +//purpose : +//======================================================================= +Handle(StepKinematics_SphericalPairWithPin) StepKinematics_SphericalPairSelect::SphericalPairWithPin () const +{ + return Handle(StepKinematics_SphericalPairWithPin)::DownCast(Value()); +} diff --git a/src/StepKinematics/StepKinematics_SphericalPairSelect.hxx b/src/StepKinematics/StepKinematics_SphericalPairSelect.hxx new file mode 100644 index 0000000000..f340701388 --- /dev/null +++ b/src/StepKinematics/StepKinematics_SphericalPairSelect.hxx @@ -0,0 +1,53 @@ +// Created on : Sat May 02 12:41:14 2020 +// Created by: Irina KRYLOVA +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V3.0 +// Copyright (c) Open CASCADE 2020 +// +// 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 _StepKinematics_SphericalPairSelect_HeaderFile +#define _StepKinematics_SphericalPairSelect_HeaderFile + +#include +#include +#include +#include +#include + +class Standard_Transient; +class StepKinematics_SphericalPair; +class StepKinematics_SphericalPairWithPin; + +//! Representation of STEP SELECT type SphericalPairSelect +class StepKinematics_SphericalPairSelect : public StepData_SelectType +{ + +public: + + DEFINE_STANDARD_ALLOC + + //! Empty constructor + Standard_EXPORT StepKinematics_SphericalPairSelect(); + + //! Recognizes a kind of SphericalPairSelect select type + //! -- 1 -> SphericalPair + //! -- 2 -> SphericalPairWithPin + Standard_EXPORT Standard_Integer CaseNum (const Handle(Standard_Transient)& ent) const Standard_OVERRIDE; + + //! Returns Value as SphericalPair (or Null if another type) + Standard_EXPORT Handle(StepKinematics_SphericalPair) SphericalPair() const; + + //! Returns Value as SphericalPairWithPin (or Null if another type) + Standard_EXPORT Handle(StepKinematics_SphericalPairWithPin) SphericalPairWithPin() const; + +}; +#endif // _StepKinematics_SphericalPairSelect_HeaderFile diff --git a/src/StepKinematics/StepKinematics_SphericalPairValue.cxx b/src/StepKinematics/StepKinematics_SphericalPairValue.cxx new file mode 100644 index 0000000000..12fdef9aa7 --- /dev/null +++ b/src/StepKinematics/StepKinematics_SphericalPairValue.cxx @@ -0,0 +1,59 @@ +// Created on : Sat May 02 12:41:16 2020 +// Created by: Irina KRYLOVA +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V3.0 +// Copyright (c) Open CASCADE 2020 +// +// This file is part of Open CASCADE Technology software library. +// +// This library is free software; you can redistribute it and/or modify it under +// the terms of the GNU Lesser General Public License version 2.1 as published +// by the Free Software Foundation, with special exception defined in the file +// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT +// distribution for complete text of the license and disclaimer of any warranty. +// +// Alternatively, this file may be used under the terms of Open CASCADE +// commercial license or contractual agreement. + +#include + +IMPLEMENT_STANDARD_RTTIEXT(StepKinematics_SphericalPairValue, StepKinematics_PairValue) + +//======================================================================= +//function : StepKinematics_SphericalPairValue +//purpose : +//======================================================================= +StepKinematics_SphericalPairValue::StepKinematics_SphericalPairValue () +{ +} + +//======================================================================= +//function : Init +//purpose : +//======================================================================= +void StepKinematics_SphericalPairValue::Init (const Handle(TCollection_HAsciiString)& theRepresentationItem_Name, + const Handle(StepKinematics_KinematicPair)& thePairValue_AppliesToPair, + const StepKinematics_SpatialRotation& theInputOrientation) +{ + StepKinematics_PairValue::Init(theRepresentationItem_Name, + thePairValue_AppliesToPair); + + myInputOrientation = theInputOrientation; +} + +//======================================================================= +//function : InputOrientation +//purpose : +//======================================================================= +StepKinematics_SpatialRotation StepKinematics_SphericalPairValue::InputOrientation () const +{ + return myInputOrientation; +} + +//======================================================================= +//function : SetInputOrientation +//purpose : +//======================================================================= +void StepKinematics_SphericalPairValue::SetInputOrientation (const StepKinematics_SpatialRotation& theInputOrientation) +{ + myInputOrientation = theInputOrientation; +} diff --git a/src/StepKinematics/StepKinematics_SphericalPairValue.hxx b/src/StepKinematics/StepKinematics_SphericalPairValue.hxx new file mode 100644 index 0000000000..4ebd832385 --- /dev/null +++ b/src/StepKinematics/StepKinematics_SphericalPairValue.hxx @@ -0,0 +1,54 @@ +// Created on : Sat May 02 12:41:16 2020 +// Created by: Irina KRYLOVA +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V3.0 +// Copyright (c) Open CASCADE 2020 +// +// 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 _StepKinematics_SphericalPairValue_HeaderFile_ +#define _StepKinematics_SphericalPairValue_HeaderFile_ + +#include +#include +#include + +#include +#include +#include + +DEFINE_STANDARD_HANDLE(StepKinematics_SphericalPairValue, StepKinematics_PairValue) + +//! Representation of STEP entity SphericalPairValue +class StepKinematics_SphericalPairValue : public StepKinematics_PairValue +{ +public : + + //! default constructor + Standard_EXPORT StepKinematics_SphericalPairValue(); + + //! Initialize all fields (own and inherited) + Standard_EXPORT void Init(const Handle(TCollection_HAsciiString)& theRepresentationItem_Name, + const Handle(StepKinematics_KinematicPair)& thePairValue_AppliesToPair, + const StepKinematics_SpatialRotation& theInputOrientation); + + //! Returns field InputOrientation + Standard_EXPORT StepKinematics_SpatialRotation InputOrientation() const; + //! Sets field InputOrientation + Standard_EXPORT void SetInputOrientation (const StepKinematics_SpatialRotation& theInputOrientation); + +DEFINE_STANDARD_RTTIEXT(StepKinematics_SphericalPairValue, StepKinematics_PairValue) + +private: + StepKinematics_SpatialRotation myInputOrientation; + +}; +#endif // _StepKinematics_SphericalPairValue_HeaderFile_ diff --git a/src/StepKinematics/StepKinematics_SphericalPairWithPin.cxx b/src/StepKinematics/StepKinematics_SphericalPairWithPin.cxx new file mode 100644 index 0000000000..d368c46d04 --- /dev/null +++ b/src/StepKinematics/StepKinematics_SphericalPairWithPin.cxx @@ -0,0 +1,27 @@ +// Created on : Sat May 02 12:41:16 2020 +// Created by: Irina KRYLOVA +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V3.0 +// Copyright (c) Open CASCADE 2020 +// +// This file is part of Open CASCADE Technology software library. +// +// This library is free software; you can redistribute it and/or modify it under +// the terms of the GNU Lesser General Public License version 2.1 as published +// by the Free Software Foundation, with special exception defined in the file +// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT +// distribution for complete text of the license and disclaimer of any warranty. +// +// Alternatively, this file may be used under the terms of Open CASCADE +// commercial license or contractual agreement. + +#include + +IMPLEMENT_STANDARD_RTTIEXT(StepKinematics_SphericalPairWithPin, StepKinematics_LowOrderKinematicPair) + +//======================================================================= +//function : StepKinematics_SphericalPairWithPin +//purpose : +//======================================================================= +StepKinematics_SphericalPairWithPin::StepKinematics_SphericalPairWithPin () +{ +} diff --git a/src/StepKinematics/StepKinematics_SphericalPairWithPin.hxx b/src/StepKinematics/StepKinematics_SphericalPairWithPin.hxx new file mode 100644 index 0000000000..f41db13212 --- /dev/null +++ b/src/StepKinematics/StepKinematics_SphericalPairWithPin.hxx @@ -0,0 +1,42 @@ +// Created on : Sat May 02 12:41:16 2020 +// Created by: Irina KRYLOVA +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V3.0 +// Copyright (c) Open CASCADE 2020 +// +// 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 _StepKinematics_SphericalPairWithPin_HeaderFile_ +#define _StepKinematics_SphericalPairWithPin_HeaderFile_ + +#include +#include +#include + +#include +#include +#include +#include + +DEFINE_STANDARD_HANDLE(StepKinematics_SphericalPairWithPin, StepKinematics_LowOrderKinematicPair) + +//! Representation of STEP entity SphericalPairWithPin +class StepKinematics_SphericalPairWithPin : public StepKinematics_LowOrderKinematicPair +{ +public : + + //! default constructor + Standard_EXPORT StepKinematics_SphericalPairWithPin(); + +DEFINE_STANDARD_RTTIEXT(StepKinematics_SphericalPairWithPin, StepKinematics_LowOrderKinematicPair) + +}; +#endif // _StepKinematics_SphericalPairWithPin_HeaderFile_ diff --git a/src/StepKinematics/StepKinematics_SphericalPairWithPinAndRange.cxx b/src/StepKinematics/StepKinematics_SphericalPairWithPinAndRange.cxx new file mode 100644 index 0000000000..0b876d5b27 --- /dev/null +++ b/src/StepKinematics/StepKinematics_SphericalPairWithPinAndRange.cxx @@ -0,0 +1,204 @@ +// Created on : Sat May 02 12:41:16 2020 +// Created by: Irina KRYLOVA +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V3.0 +// Copyright (c) Open CASCADE 2020 +// +// This file is part of Open CASCADE Technology software library. +// +// This library is free software; you can redistribute it and/or modify it under +// the terms of the GNU Lesser General Public License version 2.1 as published +// by the Free Software Foundation, with special exception defined in the file +// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT +// distribution for complete text of the license and disclaimer of any warranty. +// +// Alternatively, this file may be used under the terms of Open CASCADE +// commercial license or contractual agreement. + +#include + +IMPLEMENT_STANDARD_RTTIEXT(StepKinematics_SphericalPairWithPinAndRange, StepKinematics_SphericalPairWithPin) + +//======================================================================= +//function : StepKinematics_SphericalPairWithPinAndRange +//purpose : +//======================================================================= +StepKinematics_SphericalPairWithPinAndRange::StepKinematics_SphericalPairWithPinAndRange () +{ + defLowerLimitYaw = Standard_False; + defUpperLimitYaw = Standard_False; + defLowerLimitRoll = Standard_False; + defUpperLimitRoll = Standard_False; +} + +//======================================================================= +//function : Init +//purpose : +//======================================================================= +void StepKinematics_SphericalPairWithPinAndRange::Init (const Handle(TCollection_HAsciiString)& theRepresentationItem_Name, + const Handle(TCollection_HAsciiString)& theItemDefinedTransformation_Name, + const Standard_Boolean hasItemDefinedTransformation_Description, + const Handle(TCollection_HAsciiString)& theItemDefinedTransformation_Description, + const Handle(StepRepr_RepresentationItem)& theItemDefinedTransformation_TransformItem1, + const Handle(StepRepr_RepresentationItem)& theItemDefinedTransformation_TransformItem2, + const Handle(StepKinematics_KinematicJoint)& theKinematicPair_Joint, + const Standard_Boolean theLowOrderKinematicPair_TX, + const Standard_Boolean theLowOrderKinematicPair_TY, + const Standard_Boolean theLowOrderKinematicPair_TZ, + const Standard_Boolean theLowOrderKinematicPair_RX, + const Standard_Boolean theLowOrderKinematicPair_RY, + const Standard_Boolean theLowOrderKinematicPair_RZ, + const Standard_Boolean hasLowerLimitYaw, + const Standard_Real theLowerLimitYaw, + const Standard_Boolean hasUpperLimitYaw, + const Standard_Real theUpperLimitYaw, + const Standard_Boolean hasLowerLimitRoll, + const Standard_Real theLowerLimitRoll, + const Standard_Boolean hasUpperLimitRoll, + const Standard_Real theUpperLimitRoll) +{ + StepKinematics_SphericalPairWithPin::Init(theRepresentationItem_Name, + theItemDefinedTransformation_Name, + hasItemDefinedTransformation_Description, + theItemDefinedTransformation_Description, + theItemDefinedTransformation_TransformItem1, + theItemDefinedTransformation_TransformItem2, + theKinematicPair_Joint, + theLowOrderKinematicPair_TX, + theLowOrderKinematicPair_TY, + theLowOrderKinematicPair_TZ, + theLowOrderKinematicPair_RX, + theLowOrderKinematicPair_RY, + theLowOrderKinematicPair_RZ); + + defLowerLimitYaw = hasLowerLimitYaw; + if (defLowerLimitYaw) { + myLowerLimitYaw = theLowerLimitYaw; + } + else myLowerLimitYaw = 0; + + defUpperLimitYaw = hasUpperLimitYaw; + if (defUpperLimitYaw) { + myUpperLimitYaw = theUpperLimitYaw; + } + else myUpperLimitYaw = 0; + + defLowerLimitRoll = hasLowerLimitRoll; + if (defLowerLimitRoll) { + myLowerLimitRoll = theLowerLimitRoll; + } + else myLowerLimitRoll = 0; + + defUpperLimitRoll = hasUpperLimitRoll; + if (defUpperLimitRoll) { + myUpperLimitRoll = theUpperLimitRoll; + } + else myUpperLimitRoll = 0; +} + +//======================================================================= +//function : LowerLimitYaw +//purpose : +//======================================================================= +Standard_Real StepKinematics_SphericalPairWithPinAndRange::LowerLimitYaw () const +{ + return myLowerLimitYaw; +} + +//======================================================================= +//function : SetLowerLimitYaw +//purpose : +//======================================================================= +void StepKinematics_SphericalPairWithPinAndRange::SetLowerLimitYaw (const Standard_Real theLowerLimitYaw) +{ + myLowerLimitYaw = theLowerLimitYaw; +} + +//======================================================================= +//function : HasLowerLimitYaw +//purpose : +//======================================================================= +Standard_Boolean StepKinematics_SphericalPairWithPinAndRange::HasLowerLimitYaw () const +{ + return defLowerLimitYaw; +} + +//======================================================================= +//function : UpperLimitYaw +//purpose : +//======================================================================= +Standard_Real StepKinematics_SphericalPairWithPinAndRange::UpperLimitYaw () const +{ + return myUpperLimitYaw; +} + +//======================================================================= +//function : SetUpperLimitYaw +//purpose : +//======================================================================= +void StepKinematics_SphericalPairWithPinAndRange::SetUpperLimitYaw (const Standard_Real theUpperLimitYaw) +{ + myUpperLimitYaw = theUpperLimitYaw; +} + +//======================================================================= +//function : HasUpperLimitYaw +//purpose : +//======================================================================= +Standard_Boolean StepKinematics_SphericalPairWithPinAndRange::HasUpperLimitYaw () const +{ + return defUpperLimitYaw; +} + +//======================================================================= +//function : LowerLimitRoll +//purpose : +//======================================================================= +Standard_Real StepKinematics_SphericalPairWithPinAndRange::LowerLimitRoll () const +{ + return myLowerLimitRoll; +} + +//======================================================================= +//function : SetLowerLimitRoll +//purpose : +//======================================================================= +void StepKinematics_SphericalPairWithPinAndRange::SetLowerLimitRoll (const Standard_Real theLowerLimitRoll) +{ + myLowerLimitRoll = theLowerLimitRoll; +} + +//======================================================================= +//function : HasLowerLimitRoll +//purpose : +//======================================================================= +Standard_Boolean StepKinematics_SphericalPairWithPinAndRange::HasLowerLimitRoll () const +{ + return defLowerLimitRoll; +} + +//======================================================================= +//function : UpperLimitRoll +//purpose : +//======================================================================= +Standard_Real StepKinematics_SphericalPairWithPinAndRange::UpperLimitRoll () const +{ + return myUpperLimitRoll; +} + +//======================================================================= +//function : SetUpperLimitRoll +//purpose : +//======================================================================= +void StepKinematics_SphericalPairWithPinAndRange::SetUpperLimitRoll (const Standard_Real theUpperLimitRoll) +{ + myUpperLimitRoll = theUpperLimitRoll; +} + +//======================================================================= +//function : HasUpperLimitRoll +//purpose : +//======================================================================= +Standard_Boolean StepKinematics_SphericalPairWithPinAndRange::HasUpperLimitRoll () const +{ + return defUpperLimitRoll; +} diff --git a/src/StepKinematics/StepKinematics_SphericalPairWithPinAndRange.hxx b/src/StepKinematics/StepKinematics_SphericalPairWithPinAndRange.hxx new file mode 100644 index 0000000000..c10e089291 --- /dev/null +++ b/src/StepKinematics/StepKinematics_SphericalPairWithPinAndRange.hxx @@ -0,0 +1,103 @@ +// Created on : Sat May 02 12:41:16 2020 +// Created by: Irina KRYLOVA +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V3.0 +// Copyright (c) Open CASCADE 2020 +// +// 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 _StepKinematics_SphericalPairWithPinAndRange_HeaderFile_ +#define _StepKinematics_SphericalPairWithPinAndRange_HeaderFile_ + +#include +#include +#include + +#include +#include +#include +#include + +DEFINE_STANDARD_HANDLE(StepKinematics_SphericalPairWithPinAndRange, StepKinematics_SphericalPairWithPin) + +//! Representation of STEP entity SphericalPairWithPinAndRange +class StepKinematics_SphericalPairWithPinAndRange : public StepKinematics_SphericalPairWithPin +{ +public : + + //! default constructor + Standard_EXPORT StepKinematics_SphericalPairWithPinAndRange(); + + //! Initialize all fields (own and inherited) + Standard_EXPORT void Init(const Handle(TCollection_HAsciiString)& theRepresentationItem_Name, + const Handle(TCollection_HAsciiString)& theItemDefinedTransformation_Name, + const Standard_Boolean hasItemDefinedTransformation_Description, + const Handle(TCollection_HAsciiString)& theItemDefinedTransformation_Description, + const Handle(StepRepr_RepresentationItem)& theItemDefinedTransformation_TransformItem1, + const Handle(StepRepr_RepresentationItem)& theItemDefinedTransformation_TransformItem2, + const Handle(StepKinematics_KinematicJoint)& theKinematicPair_Joint, + const Standard_Boolean theLowOrderKinematicPair_TX, + const Standard_Boolean theLowOrderKinematicPair_TY, + const Standard_Boolean theLowOrderKinematicPair_TZ, + const Standard_Boolean theLowOrderKinematicPair_RX, + const Standard_Boolean theLowOrderKinematicPair_RY, + const Standard_Boolean theLowOrderKinematicPair_RZ, + const Standard_Boolean hasLowerLimitYaw, + const Standard_Real theLowerLimitYaw, + const Standard_Boolean hasUpperLimitYaw, + const Standard_Real theUpperLimitYaw, + const Standard_Boolean hasLowerLimitRoll, + const Standard_Real theLowerLimitRoll, + const Standard_Boolean hasUpperLimitRoll, + const Standard_Real theUpperLimitRoll); + + //! Returns field LowerLimitYaw + Standard_EXPORT Standard_Real LowerLimitYaw() const; + //! Sets field LowerLimitYaw + Standard_EXPORT void SetLowerLimitYaw (const Standard_Real theLowerLimitYaw); + //! Returns True if optional field LowerLimitYaw is defined + Standard_EXPORT Standard_Boolean HasLowerLimitYaw() const; + + //! Returns field UpperLimitYaw + Standard_EXPORT Standard_Real UpperLimitYaw() const; + //! Sets field UpperLimitYaw + Standard_EXPORT void SetUpperLimitYaw (const Standard_Real theUpperLimitYaw); + //! Returns True if optional field UpperLimitYaw is defined + Standard_EXPORT Standard_Boolean HasUpperLimitYaw() const; + + //! Returns field LowerLimitRoll + Standard_EXPORT Standard_Real LowerLimitRoll() const; + //! Sets field LowerLimitRoll + Standard_EXPORT void SetLowerLimitRoll (const Standard_Real theLowerLimitRoll); + //! Returns True if optional field LowerLimitRoll is defined + Standard_EXPORT Standard_Boolean HasLowerLimitRoll() const; + + //! Returns field UpperLimitRoll + Standard_EXPORT Standard_Real UpperLimitRoll() const; + //! Sets field UpperLimitRoll + Standard_EXPORT void SetUpperLimitRoll (const Standard_Real theUpperLimitRoll); + //! Returns True if optional field UpperLimitRoll is defined + Standard_EXPORT Standard_Boolean HasUpperLimitRoll() const; + +DEFINE_STANDARD_RTTIEXT(StepKinematics_SphericalPairWithPinAndRange, StepKinematics_SphericalPairWithPin) + +private: + Standard_Real myLowerLimitYaw; //!< optional + Standard_Real myUpperLimitYaw; //!< optional + Standard_Real myLowerLimitRoll; //!< optional + Standard_Real myUpperLimitRoll; //!< optional + Standard_Boolean defLowerLimitYaw; //!< flag "is LowerLimitYaw defined" + Standard_Boolean defUpperLimitYaw; //!< flag "is UpperLimitYaw defined" + Standard_Boolean defLowerLimitRoll; //!< flag "is LowerLimitRoll defined" + Standard_Boolean defUpperLimitRoll; //!< flag "is UpperLimitRoll defined" + +}; +#endif // _StepKinematics_SphericalPairWithPinAndRange_HeaderFile_ diff --git a/src/StepKinematics/StepKinematics_SphericalPairWithRange.cxx b/src/StepKinematics/StepKinematics_SphericalPairWithRange.cxx new file mode 100644 index 0000000000..b43479ba1d --- /dev/null +++ b/src/StepKinematics/StepKinematics_SphericalPairWithRange.cxx @@ -0,0 +1,276 @@ +// Created on : Sat May 02 12:41:16 2020 +// Created by: Irina KRYLOVA +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V3.0 +// Copyright (c) Open CASCADE 2020 +// +// This file is part of Open CASCADE Technology software library. +// +// This library is free software; you can redistribute it and/or modify it under +// the terms of the GNU Lesser General Public License version 2.1 as published +// by the Free Software Foundation, with special exception defined in the file +// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT +// distribution for complete text of the license and disclaimer of any warranty. +// +// Alternatively, this file may be used under the terms of Open CASCADE +// commercial license or contractual agreement. + +#include + +IMPLEMENT_STANDARD_RTTIEXT(StepKinematics_SphericalPairWithRange, StepKinematics_SphericalPair) + +//======================================================================= +//function : StepKinematics_SphericalPairWithRange +//purpose : +//======================================================================= +StepKinematics_SphericalPairWithRange::StepKinematics_SphericalPairWithRange () +{ + defLowerLimitYaw = Standard_False; + defUpperLimitYaw = Standard_False; + defLowerLimitPitch = Standard_False; + defUpperLimitPitch = Standard_False; + defLowerLimitRoll = Standard_False; + defUpperLimitRoll = Standard_False; +} + +//======================================================================= +//function : Init +//purpose : +//======================================================================= +void StepKinematics_SphericalPairWithRange::Init (const Handle(TCollection_HAsciiString)& theRepresentationItem_Name, + const Handle(TCollection_HAsciiString)& theItemDefinedTransformation_Name, + const Standard_Boolean hasItemDefinedTransformation_Description, + const Handle(TCollection_HAsciiString)& theItemDefinedTransformation_Description, + const Handle(StepRepr_RepresentationItem)& theItemDefinedTransformation_TransformItem1, + const Handle(StepRepr_RepresentationItem)& theItemDefinedTransformation_TransformItem2, + const Handle(StepKinematics_KinematicJoint)& theKinematicPair_Joint, + const Standard_Boolean theLowOrderKinematicPair_TX, + const Standard_Boolean theLowOrderKinematicPair_TY, + const Standard_Boolean theLowOrderKinematicPair_TZ, + const Standard_Boolean theLowOrderKinematicPair_RX, + const Standard_Boolean theLowOrderKinematicPair_RY, + const Standard_Boolean theLowOrderKinematicPair_RZ, + const Standard_Boolean hasLowerLimitYaw, + const Standard_Real theLowerLimitYaw, + const Standard_Boolean hasUpperLimitYaw, + const Standard_Real theUpperLimitYaw, + const Standard_Boolean hasLowerLimitPitch, + const Standard_Real theLowerLimitPitch, + const Standard_Boolean hasUpperLimitPitch, + const Standard_Real theUpperLimitPitch, + const Standard_Boolean hasLowerLimitRoll, + const Standard_Real theLowerLimitRoll, + const Standard_Boolean hasUpperLimitRoll, + const Standard_Real theUpperLimitRoll) +{ + StepKinematics_SphericalPair::Init(theRepresentationItem_Name, + theItemDefinedTransformation_Name, + hasItemDefinedTransformation_Description, + theItemDefinedTransformation_Description, + theItemDefinedTransformation_TransformItem1, + theItemDefinedTransformation_TransformItem2, + theKinematicPair_Joint, + theLowOrderKinematicPair_TX, + theLowOrderKinematicPair_TY, + theLowOrderKinematicPair_TZ, + theLowOrderKinematicPair_RX, + theLowOrderKinematicPair_RY, + theLowOrderKinematicPair_RZ); + + defLowerLimitYaw = hasLowerLimitYaw; + if (defLowerLimitYaw) { + myLowerLimitYaw = theLowerLimitYaw; + } + else myLowerLimitYaw = 0; + + defUpperLimitYaw = hasUpperLimitYaw; + if (defUpperLimitYaw) { + myUpperLimitYaw = theUpperLimitYaw; + } + else myUpperLimitYaw = 0; + + defLowerLimitPitch = hasLowerLimitPitch; + if (defLowerLimitPitch) { + myLowerLimitPitch = theLowerLimitPitch; + } + else myLowerLimitPitch = 0; + + defUpperLimitPitch = hasUpperLimitPitch; + if (defUpperLimitPitch) { + myUpperLimitPitch = theUpperLimitPitch; + } + else myUpperLimitPitch = 0; + + defLowerLimitRoll = hasLowerLimitRoll; + if (defLowerLimitRoll) { + myLowerLimitRoll = theLowerLimitRoll; + } + else myLowerLimitRoll = 0; + + defUpperLimitRoll = hasUpperLimitRoll; + if (defUpperLimitRoll) { + myUpperLimitRoll = theUpperLimitRoll; + } + else myUpperLimitRoll = 0; +} + +//======================================================================= +//function : LowerLimitYaw +//purpose : +//======================================================================= +Standard_Real StepKinematics_SphericalPairWithRange::LowerLimitYaw () const +{ + return myLowerLimitYaw; +} + +//======================================================================= +//function : SetLowerLimitYaw +//purpose : +//======================================================================= +void StepKinematics_SphericalPairWithRange::SetLowerLimitYaw (const Standard_Real theLowerLimitYaw) +{ + myLowerLimitYaw = theLowerLimitYaw; +} + +//======================================================================= +//function : HasLowerLimitYaw +//purpose : +//======================================================================= +Standard_Boolean StepKinematics_SphericalPairWithRange::HasLowerLimitYaw () const +{ + return defLowerLimitYaw; +} + +//======================================================================= +//function : UpperLimitYaw +//purpose : +//======================================================================= +Standard_Real StepKinematics_SphericalPairWithRange::UpperLimitYaw () const +{ + return myUpperLimitYaw; +} + +//======================================================================= +//function : SetUpperLimitYaw +//purpose : +//======================================================================= +void StepKinematics_SphericalPairWithRange::SetUpperLimitYaw (const Standard_Real theUpperLimitYaw) +{ + myUpperLimitYaw = theUpperLimitYaw; +} + +//======================================================================= +//function : HasUpperLimitYaw +//purpose : +//======================================================================= +Standard_Boolean StepKinematics_SphericalPairWithRange::HasUpperLimitYaw () const +{ + return defUpperLimitYaw; +} + +//======================================================================= +//function : LowerLimitPitch +//purpose : +//======================================================================= +Standard_Real StepKinematics_SphericalPairWithRange::LowerLimitPitch () const +{ + return myLowerLimitPitch; +} + +//======================================================================= +//function : SetLowerLimitPitch +//purpose : +//======================================================================= +void StepKinematics_SphericalPairWithRange::SetLowerLimitPitch (const Standard_Real theLowerLimitPitch) +{ + myLowerLimitPitch = theLowerLimitPitch; +} + +//======================================================================= +//function : HasLowerLimitPitch +//purpose : +//======================================================================= +Standard_Boolean StepKinematics_SphericalPairWithRange::HasLowerLimitPitch () const +{ + return defLowerLimitPitch; +} + +//======================================================================= +//function : UpperLimitPitch +//purpose : +//======================================================================= +Standard_Real StepKinematics_SphericalPairWithRange::UpperLimitPitch () const +{ + return myUpperLimitPitch; +} + +//======================================================================= +//function : SetUpperLimitPitch +//purpose : +//======================================================================= +void StepKinematics_SphericalPairWithRange::SetUpperLimitPitch (const Standard_Real theUpperLimitPitch) +{ + myUpperLimitPitch = theUpperLimitPitch; +} + +//======================================================================= +//function : HasUpperLimitPitch +//purpose : +//======================================================================= +Standard_Boolean StepKinematics_SphericalPairWithRange::HasUpperLimitPitch () const +{ + return defUpperLimitPitch; +} + +//======================================================================= +//function : LowerLimitRoll +//purpose : +//======================================================================= +Standard_Real StepKinematics_SphericalPairWithRange::LowerLimitRoll () const +{ + return myLowerLimitRoll; +} + +//======================================================================= +//function : SetLowerLimitRoll +//purpose : +//======================================================================= +void StepKinematics_SphericalPairWithRange::SetLowerLimitRoll (const Standard_Real theLowerLimitRoll) +{ + myLowerLimitRoll = theLowerLimitRoll; +} + +//======================================================================= +//function : HasLowerLimitRoll +//purpose : +//======================================================================= +Standard_Boolean StepKinematics_SphericalPairWithRange::HasLowerLimitRoll () const +{ + return defLowerLimitRoll; +} + +//======================================================================= +//function : UpperLimitRoll +//purpose : +//======================================================================= +Standard_Real StepKinematics_SphericalPairWithRange::UpperLimitRoll () const +{ + return myUpperLimitRoll; +} + +//======================================================================= +//function : SetUpperLimitRoll +//purpose : +//======================================================================= +void StepKinematics_SphericalPairWithRange::SetUpperLimitRoll (const Standard_Real theUpperLimitRoll) +{ + myUpperLimitRoll = theUpperLimitRoll; +} + +//======================================================================= +//function : HasUpperLimitRoll +//purpose : +//======================================================================= +Standard_Boolean StepKinematics_SphericalPairWithRange::HasUpperLimitRoll () const +{ + return defUpperLimitRoll; +} diff --git a/src/StepKinematics/StepKinematics_SphericalPairWithRange.hxx b/src/StepKinematics/StepKinematics_SphericalPairWithRange.hxx new file mode 100644 index 0000000000..9e771f913a --- /dev/null +++ b/src/StepKinematics/StepKinematics_SphericalPairWithRange.hxx @@ -0,0 +1,125 @@ +// Created on : Sat May 02 12:41:16 2020 +// Created by: Irina KRYLOVA +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V3.0 +// Copyright (c) Open CASCADE 2020 +// +// 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 _StepKinematics_SphericalPairWithRange_HeaderFile_ +#define _StepKinematics_SphericalPairWithRange_HeaderFile_ + +#include +#include +#include + +#include +#include +#include +#include + +DEFINE_STANDARD_HANDLE(StepKinematics_SphericalPairWithRange, StepKinematics_SphericalPair) + +//! Representation of STEP entity SphericalPairWithRange +class StepKinematics_SphericalPairWithRange : public StepKinematics_SphericalPair +{ +public : + + //! default constructor + Standard_EXPORT StepKinematics_SphericalPairWithRange(); + + //! Initialize all fields (own and inherited) + Standard_EXPORT void Init(const Handle(TCollection_HAsciiString)& theRepresentationItem_Name, + const Handle(TCollection_HAsciiString)& theItemDefinedTransformation_Name, + const Standard_Boolean hasItemDefinedTransformation_Description, + const Handle(TCollection_HAsciiString)& theItemDefinedTransformation_Description, + const Handle(StepRepr_RepresentationItem)& theItemDefinedTransformation_TransformItem1, + const Handle(StepRepr_RepresentationItem)& theItemDefinedTransformation_TransformItem2, + const Handle(StepKinematics_KinematicJoint)& theKinematicPair_Joint, + const Standard_Boolean theLowOrderKinematicPair_TX, + const Standard_Boolean theLowOrderKinematicPair_TY, + const Standard_Boolean theLowOrderKinematicPair_TZ, + const Standard_Boolean theLowOrderKinematicPair_RX, + const Standard_Boolean theLowOrderKinematicPair_RY, + const Standard_Boolean theLowOrderKinematicPair_RZ, + const Standard_Boolean hasLowerLimitYaw, + const Standard_Real theLowerLimitYaw, + const Standard_Boolean hasUpperLimitYaw, + const Standard_Real theUpperLimitYaw, + const Standard_Boolean hasLowerLimitPitch, + const Standard_Real theLowerLimitPitch, + const Standard_Boolean hasUpperLimitPitch, + const Standard_Real theUpperLimitPitch, + const Standard_Boolean hasLowerLimitRoll, + const Standard_Real theLowerLimitRoll, + const Standard_Boolean hasUpperLimitRoll, + const Standard_Real theUpperLimitRoll); + + //! Returns field LowerLimitYaw + Standard_EXPORT Standard_Real LowerLimitYaw() const; + //! Sets field LowerLimitYaw + Standard_EXPORT void SetLowerLimitYaw (const Standard_Real theLowerLimitYaw); + //! Returns True if optional field LowerLimitYaw is defined + Standard_EXPORT Standard_Boolean HasLowerLimitYaw() const; + + //! Returns field UpperLimitYaw + Standard_EXPORT Standard_Real UpperLimitYaw() const; + //! Sets field UpperLimitYaw + Standard_EXPORT void SetUpperLimitYaw (const Standard_Real theUpperLimitYaw); + //! Returns True if optional field UpperLimitYaw is defined + Standard_EXPORT Standard_Boolean HasUpperLimitYaw() const; + + //! Returns field LowerLimitPitch + Standard_EXPORT Standard_Real LowerLimitPitch() const; + //! Sets field LowerLimitPitch + Standard_EXPORT void SetLowerLimitPitch (const Standard_Real theLowerLimitPitch); + //! Returns True if optional field LowerLimitPitch is defined + Standard_EXPORT Standard_Boolean HasLowerLimitPitch() const; + + //! Returns field UpperLimitPitch + Standard_EXPORT Standard_Real UpperLimitPitch() const; + //! Sets field UpperLimitPitch + Standard_EXPORT void SetUpperLimitPitch (const Standard_Real theUpperLimitPitch); + //! Returns True if optional field UpperLimitPitch is defined + Standard_EXPORT Standard_Boolean HasUpperLimitPitch() const; + + //! Returns field LowerLimitRoll + Standard_EXPORT Standard_Real LowerLimitRoll() const; + //! Sets field LowerLimitRoll + Standard_EXPORT void SetLowerLimitRoll (const Standard_Real theLowerLimitRoll); + //! Returns True if optional field LowerLimitRoll is defined + Standard_EXPORT Standard_Boolean HasLowerLimitRoll() const; + + //! Returns field UpperLimitRoll + Standard_EXPORT Standard_Real UpperLimitRoll() const; + //! Sets field UpperLimitRoll + Standard_EXPORT void SetUpperLimitRoll (const Standard_Real theUpperLimitRoll); + //! Returns True if optional field UpperLimitRoll is defined + Standard_EXPORT Standard_Boolean HasUpperLimitRoll() const; + +DEFINE_STANDARD_RTTIEXT(StepKinematics_SphericalPairWithRange, StepKinematics_SphericalPair) + +private: + Standard_Real myLowerLimitYaw; //!< optional + Standard_Real myUpperLimitYaw; //!< optional + Standard_Real myLowerLimitPitch; //!< optional + Standard_Real myUpperLimitPitch; //!< optional + Standard_Real myLowerLimitRoll; //!< optional + Standard_Real myUpperLimitRoll; //!< optional + Standard_Boolean defLowerLimitYaw; //!< flag "is LowerLimitYaw defined" + Standard_Boolean defUpperLimitYaw; //!< flag "is UpperLimitYaw defined" + Standard_Boolean defLowerLimitPitch; //!< flag "is LowerLimitPitch defined" + Standard_Boolean defUpperLimitPitch; //!< flag "is UpperLimitPitch defined" + Standard_Boolean defLowerLimitRoll; //!< flag "is LowerLimitRoll defined" + Standard_Boolean defUpperLimitRoll; //!< flag "is UpperLimitRoll defined" + +}; +#endif // _StepKinematics_SphericalPairWithRange_HeaderFile_ diff --git a/src/StepKinematics/StepKinematics_SurfacePair.cxx b/src/StepKinematics/StepKinematics_SurfacePair.cxx new file mode 100644 index 0000000000..71c2d5b9cb --- /dev/null +++ b/src/StepKinematics/StepKinematics_SurfacePair.cxx @@ -0,0 +1,111 @@ +// Created on : Sat May 02 12:41:16 2020 +// Created by: Irina KRYLOVA +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V3.0 +// Copyright (c) Open CASCADE 2020 +// +// This file is part of Open CASCADE Technology software library. +// +// This library is free software; you can redistribute it and/or modify it under +// the terms of the GNU Lesser General Public License version 2.1 as published +// by the Free Software Foundation, with special exception defined in the file +// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT +// distribution for complete text of the license and disclaimer of any warranty. +// +// Alternatively, this file may be used under the terms of Open CASCADE +// commercial license or contractual agreement. + +#include + +IMPLEMENT_STANDARD_RTTIEXT(StepKinematics_SurfacePair, StepKinematics_HighOrderKinematicPair) + +//======================================================================= +//function : StepKinematics_SurfacePair +//purpose : +//======================================================================= +StepKinematics_SurfacePair::StepKinematics_SurfacePair () +{ +} + +//======================================================================= +//function : Init +//purpose : +//======================================================================= +void StepKinematics_SurfacePair::Init (const Handle(TCollection_HAsciiString)& theRepresentationItem_Name, + const Handle(TCollection_HAsciiString)& theItemDefinedTransformation_Name, + const Standard_Boolean hasItemDefinedTransformation_Description, + const Handle(TCollection_HAsciiString)& theItemDefinedTransformation_Description, + const Handle(StepRepr_RepresentationItem)& theItemDefinedTransformation_TransformItem1, + const Handle(StepRepr_RepresentationItem)& theItemDefinedTransformation_TransformItem2, + const Handle(StepKinematics_KinematicJoint)& theKinematicPair_Joint, + const Handle(StepGeom_Surface)& theSurface1, + const Handle(StepGeom_Surface)& theSurface2, + const Standard_Boolean theOrientation) +{ + StepKinematics_HighOrderKinematicPair::Init(theRepresentationItem_Name, + theItemDefinedTransformation_Name, + hasItemDefinedTransformation_Description, + theItemDefinedTransformation_Description, + theItemDefinedTransformation_TransformItem1, + theItemDefinedTransformation_TransformItem2, + theKinematicPair_Joint); + + mySurface1 = theSurface1; + + mySurface2 = theSurface2; + + myOrientation = theOrientation; +} + +//======================================================================= +//function : Surface1 +//purpose : +//======================================================================= +Handle(StepGeom_Surface) StepKinematics_SurfacePair::Surface1 () const +{ + return mySurface1; +} + +//======================================================================= +//function : SetSurface1 +//purpose : +//======================================================================= +void StepKinematics_SurfacePair::SetSurface1 (const Handle(StepGeom_Surface)& theSurface1) +{ + mySurface1 = theSurface1; +} + +//======================================================================= +//function : Surface2 +//purpose : +//======================================================================= +Handle(StepGeom_Surface) StepKinematics_SurfacePair::Surface2 () const +{ + return mySurface2; +} + +//======================================================================= +//function : SetSurface2 +//purpose : +//======================================================================= +void StepKinematics_SurfacePair::SetSurface2 (const Handle(StepGeom_Surface)& theSurface2) +{ + mySurface2 = theSurface2; +} + +//======================================================================= +//function : Orientation +//purpose : +//======================================================================= +Standard_Boolean StepKinematics_SurfacePair::Orientation () const +{ + return myOrientation; +} + +//======================================================================= +//function : SetOrientation +//purpose : +//======================================================================= +void StepKinematics_SurfacePair::SetOrientation (const Standard_Boolean theOrientation) +{ + myOrientation = theOrientation; +} diff --git a/src/StepKinematics/StepKinematics_SurfacePair.hxx b/src/StepKinematics/StepKinematics_SurfacePair.hxx new file mode 100644 index 0000000000..54b19045ef --- /dev/null +++ b/src/StepKinematics/StepKinematics_SurfacePair.hxx @@ -0,0 +1,75 @@ +// Created on : Sat May 02 12:41:16 2020 +// Created by: Irina KRYLOVA +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V3.0 +// Copyright (c) Open CASCADE 2020 +// +// 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 _StepKinematics_SurfacePair_HeaderFile_ +#define _StepKinematics_SurfacePair_HeaderFile_ + +#include +#include +#include + +#include +#include +#include +#include +#include + +DEFINE_STANDARD_HANDLE(StepKinematics_SurfacePair, StepKinematics_HighOrderKinematicPair) + +//! Representation of STEP entity SurfacePair +class StepKinematics_SurfacePair : public StepKinematics_HighOrderKinematicPair +{ +public : + + //! default constructor + Standard_EXPORT StepKinematics_SurfacePair(); + + //! Initialize all fields (own and inherited) + Standard_EXPORT void Init(const Handle(TCollection_HAsciiString)& theRepresentationItem_Name, + const Handle(TCollection_HAsciiString)& theItemDefinedTransformation_Name, + const Standard_Boolean hasItemDefinedTransformation_Description, + const Handle(TCollection_HAsciiString)& theItemDefinedTransformation_Description, + const Handle(StepRepr_RepresentationItem)& theItemDefinedTransformation_TransformItem1, + const Handle(StepRepr_RepresentationItem)& theItemDefinedTransformation_TransformItem2, + const Handle(StepKinematics_KinematicJoint)& theKinematicPair_Joint, + const Handle(StepGeom_Surface)& theSurface1, + const Handle(StepGeom_Surface)& theSurface2, + const Standard_Boolean theOrientation); + + //! Returns field Surface1 + Standard_EXPORT Handle(StepGeom_Surface) Surface1() const; + //! Sets field Surface1 + Standard_EXPORT void SetSurface1 (const Handle(StepGeom_Surface)& theSurface1); + + //! Returns field Surface2 + Standard_EXPORT Handle(StepGeom_Surface) Surface2() const; + //! Sets field Surface2 + Standard_EXPORT void SetSurface2 (const Handle(StepGeom_Surface)& theSurface2); + + //! Returns field Orientation + Standard_EXPORT Standard_Boolean Orientation() const; + //! Sets field Orientation + Standard_EXPORT void SetOrientation (const Standard_Boolean theOrientation); + +DEFINE_STANDARD_RTTIEXT(StepKinematics_SurfacePair, StepKinematics_HighOrderKinematicPair) + +private: + Handle(StepGeom_Surface) mySurface1; + Handle(StepGeom_Surface) mySurface2; + Standard_Boolean myOrientation; + +}; +#endif // _StepKinematics_SurfacePair_HeaderFile_ diff --git a/src/StepKinematics/StepKinematics_SurfacePairWithRange.cxx b/src/StepKinematics/StepKinematics_SurfacePairWithRange.cxx new file mode 100644 index 0000000000..7c36fd1b55 --- /dev/null +++ b/src/StepKinematics/StepKinematics_SurfacePairWithRange.cxx @@ -0,0 +1,168 @@ +// Created on : Sat May 02 12:41:16 2020 +// Created by: Irina KRYLOVA +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V3.0 +// Copyright (c) Open CASCADE 2020 +// +// This file is part of Open CASCADE Technology software library. +// +// This library is free software; you can redistribute it and/or modify it under +// the terms of the GNU Lesser General Public License version 2.1 as published +// by the Free Software Foundation, with special exception defined in the file +// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT +// distribution for complete text of the license and disclaimer of any warranty. +// +// Alternatively, this file may be used under the terms of Open CASCADE +// commercial license or contractual agreement. + +#include + +IMPLEMENT_STANDARD_RTTIEXT(StepKinematics_SurfacePairWithRange, StepKinematics_SurfacePair) + +//======================================================================= +//function : StepKinematics_SurfacePairWithRange +//purpose : +//======================================================================= +StepKinematics_SurfacePairWithRange::StepKinematics_SurfacePairWithRange () +{ + defLowerLimitActualRotation = Standard_False; + defUpperLimitActualRotation = Standard_False; +} + +//======================================================================= +//function : Init +//purpose : +//======================================================================= +void StepKinematics_SurfacePairWithRange::Init (const Handle(TCollection_HAsciiString)& theRepresentationItem_Name, + const Handle(TCollection_HAsciiString)& theItemDefinedTransformation_Name, + const Standard_Boolean hasItemDefinedTransformation_Description, + const Handle(TCollection_HAsciiString)& theItemDefinedTransformation_Description, + const Handle(StepRepr_RepresentationItem)& theItemDefinedTransformation_TransformItem1, + const Handle(StepRepr_RepresentationItem)& theItemDefinedTransformation_TransformItem2, + const Handle(StepKinematics_KinematicJoint)& theKinematicPair_Joint, + const Handle(StepGeom_Surface)& theSurfacePair_Surface1, + const Handle(StepGeom_Surface)& theSurfacePair_Surface2, + const Standard_Boolean theSurfacePair_Orientation, + const Handle(StepGeom_RectangularTrimmedSurface)& theRangeOnSurface1, + const Handle(StepGeom_RectangularTrimmedSurface)& theRangeOnSurface2, + const Standard_Boolean hasLowerLimitActualRotation, + const Standard_Real theLowerLimitActualRotation, + const Standard_Boolean hasUpperLimitActualRotation, + const Standard_Real theUpperLimitActualRotation) +{ + StepKinematics_SurfacePair::Init(theRepresentationItem_Name, + theItemDefinedTransformation_Name, + hasItemDefinedTransformation_Description, + theItemDefinedTransformation_Description, + theItemDefinedTransformation_TransformItem1, + theItemDefinedTransformation_TransformItem2, + theKinematicPair_Joint, + theSurfacePair_Surface1, + theSurfacePair_Surface2, + theSurfacePair_Orientation); + + myRangeOnSurface1 = theRangeOnSurface1; + + myRangeOnSurface2 = theRangeOnSurface2; + + defLowerLimitActualRotation = hasLowerLimitActualRotation; + if (defLowerLimitActualRotation) { + myLowerLimitActualRotation = theLowerLimitActualRotation; + } + else myLowerLimitActualRotation = 0; + + defUpperLimitActualRotation = hasUpperLimitActualRotation; + if (defUpperLimitActualRotation) { + myUpperLimitActualRotation = theUpperLimitActualRotation; + } + else myUpperLimitActualRotation = 0; +} + +//======================================================================= +//function : RangeOnSurface1 +//purpose : +//======================================================================= +Handle(StepGeom_RectangularTrimmedSurface) StepKinematics_SurfacePairWithRange::RangeOnSurface1 () const +{ + return myRangeOnSurface1; +} + +//======================================================================= +//function : SetRangeOnSurface1 +//purpose : +//======================================================================= +void StepKinematics_SurfacePairWithRange::SetRangeOnSurface1 (const Handle(StepGeom_RectangularTrimmedSurface)& theRangeOnSurface1) +{ + myRangeOnSurface1 = theRangeOnSurface1; +} + +//======================================================================= +//function : RangeOnSurface2 +//purpose : +//======================================================================= +Handle(StepGeom_RectangularTrimmedSurface) StepKinematics_SurfacePairWithRange::RangeOnSurface2 () const +{ + return myRangeOnSurface2; +} + +//======================================================================= +//function : SetRangeOnSurface2 +//purpose : +//======================================================================= +void StepKinematics_SurfacePairWithRange::SetRangeOnSurface2 (const Handle(StepGeom_RectangularTrimmedSurface)& theRangeOnSurface2) +{ + myRangeOnSurface2 = theRangeOnSurface2; +} + +//======================================================================= +//function : LowerLimitActualRotation +//purpose : +//======================================================================= +Standard_Real StepKinematics_SurfacePairWithRange::LowerLimitActualRotation () const +{ + return myLowerLimitActualRotation; +} + +//======================================================================= +//function : SetLowerLimitActualRotation +//purpose : +//======================================================================= +void StepKinematics_SurfacePairWithRange::SetLowerLimitActualRotation (const Standard_Real theLowerLimitActualRotation) +{ + myLowerLimitActualRotation = theLowerLimitActualRotation; +} + +//======================================================================= +//function : HasLowerLimitActualRotation +//purpose : +//======================================================================= +Standard_Boolean StepKinematics_SurfacePairWithRange::HasLowerLimitActualRotation () const +{ + return defLowerLimitActualRotation; +} + +//======================================================================= +//function : UpperLimitActualRotation +//purpose : +//======================================================================= +Standard_Real StepKinematics_SurfacePairWithRange::UpperLimitActualRotation () const +{ + return myUpperLimitActualRotation; +} + +//======================================================================= +//function : SetUpperLimitActualRotation +//purpose : +//======================================================================= +void StepKinematics_SurfacePairWithRange::SetUpperLimitActualRotation (const Standard_Real theUpperLimitActualRotation) +{ + myUpperLimitActualRotation = theUpperLimitActualRotation; +} + +//======================================================================= +//function : HasUpperLimitActualRotation +//purpose : +//======================================================================= +Standard_Boolean StepKinematics_SurfacePairWithRange::HasUpperLimitActualRotation () const +{ + return defUpperLimitActualRotation; +} diff --git a/src/StepKinematics/StepKinematics_SurfacePairWithRange.hxx b/src/StepKinematics/StepKinematics_SurfacePairWithRange.hxx new file mode 100644 index 0000000000..3c75f3f903 --- /dev/null +++ b/src/StepKinematics/StepKinematics_SurfacePairWithRange.hxx @@ -0,0 +1,94 @@ +// Created on : Sat May 02 12:41:16 2020 +// Created by: Irina KRYLOVA +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V3.0 +// Copyright (c) Open CASCADE 2020 +// +// 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 _StepKinematics_SurfacePairWithRange_HeaderFile_ +#define _StepKinematics_SurfacePairWithRange_HeaderFile_ + +#include +#include +#include + +#include +#include +#include +#include +#include +#include + +DEFINE_STANDARD_HANDLE(StepKinematics_SurfacePairWithRange, StepKinematics_SurfacePair) + +//! Representation of STEP entity SurfacePairWithRange +class StepKinematics_SurfacePairWithRange : public StepKinematics_SurfacePair +{ +public : + + //! default constructor + Standard_EXPORT StepKinematics_SurfacePairWithRange(); + + //! Initialize all fields (own and inherited) + Standard_EXPORT void Init(const Handle(TCollection_HAsciiString)& theRepresentationItem_Name, + const Handle(TCollection_HAsciiString)& theItemDefinedTransformation_Name, + const Standard_Boolean hasItemDefinedTransformation_Description, + const Handle(TCollection_HAsciiString)& theItemDefinedTransformation_Description, + const Handle(StepRepr_RepresentationItem)& theItemDefinedTransformation_TransformItem1, + const Handle(StepRepr_RepresentationItem)& theItemDefinedTransformation_TransformItem2, + const Handle(StepKinematics_KinematicJoint)& theKinematicPair_Joint, + const Handle(StepGeom_Surface)& theSurfacePair_Surface1, + const Handle(StepGeom_Surface)& theSurfacePair_Surface2, + const Standard_Boolean theSurfacePair_Orientation, + const Handle(StepGeom_RectangularTrimmedSurface)& theRangeOnSurface1, + const Handle(StepGeom_RectangularTrimmedSurface)& theRangeOnSurface2, + const Standard_Boolean hasLowerLimitActualRotation, + const Standard_Real theLowerLimitActualRotation, + const Standard_Boolean hasUpperLimitActualRotation, + const Standard_Real theUpperLimitActualRotation); + + //! Returns field RangeOnSurface1 + Standard_EXPORT Handle(StepGeom_RectangularTrimmedSurface) RangeOnSurface1() const; + //! Sets field RangeOnSurface1 + Standard_EXPORT void SetRangeOnSurface1 (const Handle(StepGeom_RectangularTrimmedSurface)& theRangeOnSurface1); + + //! Returns field RangeOnSurface2 + Standard_EXPORT Handle(StepGeom_RectangularTrimmedSurface) RangeOnSurface2() const; + //! Sets field RangeOnSurface2 + Standard_EXPORT void SetRangeOnSurface2 (const Handle(StepGeom_RectangularTrimmedSurface)& theRangeOnSurface2); + + //! Returns field LowerLimitActualRotation + Standard_EXPORT Standard_Real LowerLimitActualRotation() const; + //! Sets field LowerLimitActualRotation + Standard_EXPORT void SetLowerLimitActualRotation (const Standard_Real theLowerLimitActualRotation); + //! Returns True if optional field LowerLimitActualRotation is defined + Standard_EXPORT Standard_Boolean HasLowerLimitActualRotation() const; + + //! Returns field UpperLimitActualRotation + Standard_EXPORT Standard_Real UpperLimitActualRotation() const; + //! Sets field UpperLimitActualRotation + Standard_EXPORT void SetUpperLimitActualRotation (const Standard_Real theUpperLimitActualRotation); + //! Returns True if optional field UpperLimitActualRotation is defined + Standard_EXPORT Standard_Boolean HasUpperLimitActualRotation() const; + +DEFINE_STANDARD_RTTIEXT(StepKinematics_SurfacePairWithRange, StepKinematics_SurfacePair) + +private: + Handle(StepGeom_RectangularTrimmedSurface) myRangeOnSurface1; + Handle(StepGeom_RectangularTrimmedSurface) myRangeOnSurface2; + Standard_Real myLowerLimitActualRotation; //!< optional + Standard_Real myUpperLimitActualRotation; //!< optional + Standard_Boolean defLowerLimitActualRotation; //!< flag "is LowerLimitActualRotation defined" + Standard_Boolean defUpperLimitActualRotation; //!< flag "is UpperLimitActualRotation defined" + +}; +#endif // _StepKinematics_SurfacePairWithRange_HeaderFile_ diff --git a/src/StepKinematics/StepKinematics_UnconstrainedPair.cxx b/src/StepKinematics/StepKinematics_UnconstrainedPair.cxx new file mode 100644 index 0000000000..ad9720aaf8 --- /dev/null +++ b/src/StepKinematics/StepKinematics_UnconstrainedPair.cxx @@ -0,0 +1,27 @@ +// Created on : Sat May 02 12:41:16 2020 +// Created by: Irina KRYLOVA +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V3.0 +// Copyright (c) Open CASCADE 2020 +// +// This file is part of Open CASCADE Technology software library. +// +// This library is free software; you can redistribute it and/or modify it under +// the terms of the GNU Lesser General Public License version 2.1 as published +// by the Free Software Foundation, with special exception defined in the file +// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT +// distribution for complete text of the license and disclaimer of any warranty. +// +// Alternatively, this file may be used under the terms of Open CASCADE +// commercial license or contractual agreement. + +#include + +IMPLEMENT_STANDARD_RTTIEXT(StepKinematics_UnconstrainedPair, StepKinematics_LowOrderKinematicPair) + +//======================================================================= +//function : StepKinematics_UnconstrainedPair +//purpose : +//======================================================================= +StepKinematics_UnconstrainedPair::StepKinematics_UnconstrainedPair () +{ +} diff --git a/src/StepKinematics/StepKinematics_UnconstrainedPair.hxx b/src/StepKinematics/StepKinematics_UnconstrainedPair.hxx new file mode 100644 index 0000000000..f3b4f81904 --- /dev/null +++ b/src/StepKinematics/StepKinematics_UnconstrainedPair.hxx @@ -0,0 +1,42 @@ +// Created on : Sat May 02 12:41:16 2020 +// Created by: Irina KRYLOVA +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V3.0 +// Copyright (c) Open CASCADE 2020 +// +// 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 _StepKinematics_UnconstrainedPair_HeaderFile_ +#define _StepKinematics_UnconstrainedPair_HeaderFile_ + +#include +#include +#include + +#include +#include +#include +#include + +DEFINE_STANDARD_HANDLE(StepKinematics_UnconstrainedPair, StepKinematics_LowOrderKinematicPair) + +//! Representation of STEP entity UnconstrainedPair +class StepKinematics_UnconstrainedPair : public StepKinematics_LowOrderKinematicPair +{ +public : + + //! default constructor + Standard_EXPORT StepKinematics_UnconstrainedPair(); + +DEFINE_STANDARD_RTTIEXT(StepKinematics_UnconstrainedPair, StepKinematics_LowOrderKinematicPair) + +}; +#endif // _StepKinematics_UnconstrainedPair_HeaderFile_ diff --git a/src/StepKinematics/StepKinematics_UnconstrainedPairValue.cxx b/src/StepKinematics/StepKinematics_UnconstrainedPairValue.cxx new file mode 100644 index 0000000000..7d4095b3ac --- /dev/null +++ b/src/StepKinematics/StepKinematics_UnconstrainedPairValue.cxx @@ -0,0 +1,59 @@ +// Created on : Sat May 02 12:41:16 2020 +// Created by: Irina KRYLOVA +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V3.0 +// Copyright (c) Open CASCADE 2020 +// +// This file is part of Open CASCADE Technology software library. +// +// This library is free software; you can redistribute it and/or modify it under +// the terms of the GNU Lesser General Public License version 2.1 as published +// by the Free Software Foundation, with special exception defined in the file +// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT +// distribution for complete text of the license and disclaimer of any warranty. +// +// Alternatively, this file may be used under the terms of Open CASCADE +// commercial license or contractual agreement. + +#include + +IMPLEMENT_STANDARD_RTTIEXT(StepKinematics_UnconstrainedPairValue, StepKinematics_PairValue) + +//======================================================================= +//function : StepKinematics_UnconstrainedPairValue +//purpose : +//======================================================================= +StepKinematics_UnconstrainedPairValue::StepKinematics_UnconstrainedPairValue () +{ +} + +//======================================================================= +//function : Init +//purpose : +//======================================================================= +void StepKinematics_UnconstrainedPairValue::Init (const Handle(TCollection_HAsciiString)& theRepresentationItem_Name, + const Handle(StepKinematics_KinematicPair)& thePairValue_AppliesToPair, + const Handle(StepGeom_Axis2Placement3d)& theActualPlacement) +{ + StepKinematics_PairValue::Init(theRepresentationItem_Name, + thePairValue_AppliesToPair); + + myActualPlacement = theActualPlacement; +} + +//======================================================================= +//function : ActualPlacement +//purpose : +//======================================================================= +Handle(StepGeom_Axis2Placement3d) StepKinematics_UnconstrainedPairValue::ActualPlacement () const +{ + return myActualPlacement; +} + +//======================================================================= +//function : SetActualPlacement +//purpose : +//======================================================================= +void StepKinematics_UnconstrainedPairValue::SetActualPlacement (const Handle(StepGeom_Axis2Placement3d)& theActualPlacement) +{ + myActualPlacement = theActualPlacement; +} diff --git a/src/StepKinematics/StepKinematics_UnconstrainedPairValue.hxx b/src/StepKinematics/StepKinematics_UnconstrainedPairValue.hxx new file mode 100644 index 0000000000..359785270b --- /dev/null +++ b/src/StepKinematics/StepKinematics_UnconstrainedPairValue.hxx @@ -0,0 +1,54 @@ +// Created on : Sat May 02 12:41:16 2020 +// Created by: Irina KRYLOVA +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V3.0 +// Copyright (c) Open CASCADE 2020 +// +// 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 _StepKinematics_UnconstrainedPairValue_HeaderFile_ +#define _StepKinematics_UnconstrainedPairValue_HeaderFile_ + +#include +#include +#include + +#include +#include +#include + +DEFINE_STANDARD_HANDLE(StepKinematics_UnconstrainedPairValue, StepKinematics_PairValue) + +//! Representation of STEP entity UnconstrainedPairValue +class StepKinematics_UnconstrainedPairValue : public StepKinematics_PairValue +{ +public : + + //! default constructor + Standard_EXPORT StepKinematics_UnconstrainedPairValue(); + + //! Initialize all fields (own and inherited) + Standard_EXPORT void Init(const Handle(TCollection_HAsciiString)& theRepresentationItem_Name, + const Handle(StepKinematics_KinematicPair)& thePairValue_AppliesToPair, + const Handle(StepGeom_Axis2Placement3d)& theActualPlacement); + + //! Returns field ActualPlacement + Standard_EXPORT Handle(StepGeom_Axis2Placement3d) ActualPlacement() const; + //! Sets field ActualPlacement + Standard_EXPORT void SetActualPlacement (const Handle(StepGeom_Axis2Placement3d)& theActualPlacement); + +DEFINE_STANDARD_RTTIEXT(StepKinematics_UnconstrainedPairValue, StepKinematics_PairValue) + +private: + Handle(StepGeom_Axis2Placement3d) myActualPlacement; + +}; +#endif // _StepKinematics_UnconstrainedPairValue_HeaderFile_ diff --git a/src/StepKinematics/StepKinematics_UniversalPair.cxx b/src/StepKinematics/StepKinematics_UniversalPair.cxx new file mode 100644 index 0000000000..d9103609e9 --- /dev/null +++ b/src/StepKinematics/StepKinematics_UniversalPair.cxx @@ -0,0 +1,96 @@ +// Created on : Sat May 02 12:41:16 2020 +// Created by: Irina KRYLOVA +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V3.0 +// Copyright (c) Open CASCADE 2020 +// +// This file is part of Open CASCADE Technology software library. +// +// This library is free software; you can redistribute it and/or modify it under +// the terms of the GNU Lesser General Public License version 2.1 as published +// by the Free Software Foundation, with special exception defined in the file +// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT +// distribution for complete text of the license and disclaimer of any warranty. +// +// Alternatively, this file may be used under the terms of Open CASCADE +// commercial license or contractual agreement. + +#include + +IMPLEMENT_STANDARD_RTTIEXT(StepKinematics_UniversalPair, StepKinematics_LowOrderKinematicPair) + +//======================================================================= +//function : StepKinematics_UniversalPair +//purpose : +//======================================================================= +StepKinematics_UniversalPair::StepKinematics_UniversalPair () +{ + defInputSkewAngle = Standard_False; +} + +//======================================================================= +//function : Init +//purpose : +//======================================================================= +void StepKinematics_UniversalPair::Init (const Handle(TCollection_HAsciiString)& theRepresentationItem_Name, + const Handle(TCollection_HAsciiString)& theItemDefinedTransformation_Name, + const Standard_Boolean hasItemDefinedTransformation_Description, + const Handle(TCollection_HAsciiString)& theItemDefinedTransformation_Description, + const Handle(StepRepr_RepresentationItem)& theItemDefinedTransformation_TransformItem1, + const Handle(StepRepr_RepresentationItem)& theItemDefinedTransformation_TransformItem2, + const Handle(StepKinematics_KinematicJoint)& theKinematicPair_Joint, + const Standard_Boolean theLowOrderKinematicPair_TX, + const Standard_Boolean theLowOrderKinematicPair_TY, + const Standard_Boolean theLowOrderKinematicPair_TZ, + const Standard_Boolean theLowOrderKinematicPair_RX, + const Standard_Boolean theLowOrderKinematicPair_RY, + const Standard_Boolean theLowOrderKinematicPair_RZ, + const Standard_Boolean hasInputSkewAngle, + const Standard_Real theInputSkewAngle) +{ + StepKinematics_LowOrderKinematicPair::Init(theRepresentationItem_Name, + theItemDefinedTransformation_Name, + hasItemDefinedTransformation_Description, + theItemDefinedTransformation_Description, + theItemDefinedTransformation_TransformItem1, + theItemDefinedTransformation_TransformItem2, + theKinematicPair_Joint, + theLowOrderKinematicPair_TX, + theLowOrderKinematicPair_TY, + theLowOrderKinematicPair_TZ, + theLowOrderKinematicPair_RX, + theLowOrderKinematicPair_RY, + theLowOrderKinematicPair_RZ); + + defInputSkewAngle = hasInputSkewAngle; + if (defInputSkewAngle) { + myInputSkewAngle = theInputSkewAngle; + } + else myInputSkewAngle = 0; +} + +//======================================================================= +//function : InputSkewAngle +//purpose : +//======================================================================= +Standard_Real StepKinematics_UniversalPair::InputSkewAngle () const +{ + return myInputSkewAngle; +} + +//======================================================================= +//function : SetInputSkewAngle +//purpose : +//======================================================================= +void StepKinematics_UniversalPair::SetInputSkewAngle (const Standard_Real theInputSkewAngle) +{ + myInputSkewAngle = theInputSkewAngle; +} + +//======================================================================= +//function : HasInputSkewAngle +//purpose : +//======================================================================= +Standard_Boolean StepKinematics_UniversalPair::HasInputSkewAngle () const +{ + return defInputSkewAngle; +} diff --git a/src/StepKinematics/StepKinematics_UniversalPair.hxx b/src/StepKinematics/StepKinematics_UniversalPair.hxx new file mode 100644 index 0000000000..af35c66061 --- /dev/null +++ b/src/StepKinematics/StepKinematics_UniversalPair.hxx @@ -0,0 +1,70 @@ +// Created on : Sat May 02 12:41:16 2020 +// Created by: Irina KRYLOVA +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V3.0 +// Copyright (c) Open CASCADE 2020 +// +// 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 _StepKinematics_UniversalPair_HeaderFile_ +#define _StepKinematics_UniversalPair_HeaderFile_ + +#include +#include +#include + +#include +#include +#include +#include + +DEFINE_STANDARD_HANDLE(StepKinematics_UniversalPair, StepKinematics_LowOrderKinematicPair) + +//! Representation of STEP entity UniversalPair +class StepKinematics_UniversalPair : public StepKinematics_LowOrderKinematicPair +{ +public : + + //! default constructor + Standard_EXPORT StepKinematics_UniversalPair(); + + //! Initialize all fields (own and inherited) + Standard_EXPORT void Init(const Handle(TCollection_HAsciiString)& theRepresentationItem_Name, + const Handle(TCollection_HAsciiString)& theItemDefinedTransformation_Name, + const Standard_Boolean hasItemDefinedTransformation_Description, + const Handle(TCollection_HAsciiString)& theItemDefinedTransformation_Description, + const Handle(StepRepr_RepresentationItem)& theItemDefinedTransformation_TransformItem1, + const Handle(StepRepr_RepresentationItem)& theItemDefinedTransformation_TransformItem2, + const Handle(StepKinematics_KinematicJoint)& theKinematicPair_Joint, + const Standard_Boolean theLowOrderKinematicPair_TX, + const Standard_Boolean theLowOrderKinematicPair_TY, + const Standard_Boolean theLowOrderKinematicPair_TZ, + const Standard_Boolean theLowOrderKinematicPair_RX, + const Standard_Boolean theLowOrderKinematicPair_RY, + const Standard_Boolean theLowOrderKinematicPair_RZ, + const Standard_Boolean hasInputSkewAngle, + const Standard_Real theInputSkewAngle); + + //! Returns field InputSkewAngle + Standard_EXPORT Standard_Real InputSkewAngle() const; + //! Sets field InputSkewAngle + Standard_EXPORT void SetInputSkewAngle (const Standard_Real theInputSkewAngle); + //! Returns True if optional field InputSkewAngle is defined + Standard_EXPORT Standard_Boolean HasInputSkewAngle() const; + +DEFINE_STANDARD_RTTIEXT(StepKinematics_UniversalPair, StepKinematics_LowOrderKinematicPair) + +private: + Standard_Real myInputSkewAngle; //!< optional + Standard_Boolean defInputSkewAngle; //!< flag "is InputSkewAngle defined" + +}; +#endif // _StepKinematics_UniversalPair_HeaderFile_ diff --git a/src/StepKinematics/StepKinematics_UniversalPairValue.cxx b/src/StepKinematics/StepKinematics_UniversalPairValue.cxx new file mode 100644 index 0000000000..56d38f0737 --- /dev/null +++ b/src/StepKinematics/StepKinematics_UniversalPairValue.cxx @@ -0,0 +1,80 @@ +// Created on : Sat May 02 12:41:16 2020 +// Created by: Irina KRYLOVA +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V3.0 +// Copyright (c) Open CASCADE 2020 +// +// This file is part of Open CASCADE Technology software library. +// +// This library is free software; you can redistribute it and/or modify it under +// the terms of the GNU Lesser General Public License version 2.1 as published +// by the Free Software Foundation, with special exception defined in the file +// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT +// distribution for complete text of the license and disclaimer of any warranty. +// +// Alternatively, this file may be used under the terms of Open CASCADE +// commercial license or contractual agreement. + +#include + +IMPLEMENT_STANDARD_RTTIEXT(StepKinematics_UniversalPairValue, StepKinematics_PairValue) + +//======================================================================= +//function : StepKinematics_UniversalPairValue +//purpose : +//======================================================================= +StepKinematics_UniversalPairValue::StepKinematics_UniversalPairValue () +{ +} + +//======================================================================= +//function : Init +//purpose : +//======================================================================= +void StepKinematics_UniversalPairValue::Init (const Handle(TCollection_HAsciiString)& theRepresentationItem_Name, + const Handle(StepKinematics_KinematicPair)& thePairValue_AppliesToPair, + const Standard_Real theFirstRotationAngle, + const Standard_Real theSecondRotationAngle) +{ + StepKinematics_PairValue::Init(theRepresentationItem_Name, + thePairValue_AppliesToPair); + + myFirstRotationAngle = theFirstRotationAngle; + + mySecondRotationAngle = theSecondRotationAngle; +} + +//======================================================================= +//function : FirstRotationAngle +//purpose : +//======================================================================= +Standard_Real StepKinematics_UniversalPairValue::FirstRotationAngle () const +{ + return myFirstRotationAngle; +} + +//======================================================================= +//function : SetFirstRotationAngle +//purpose : +//======================================================================= +void StepKinematics_UniversalPairValue::SetFirstRotationAngle (const Standard_Real theFirstRotationAngle) +{ + myFirstRotationAngle = theFirstRotationAngle; +} + +//======================================================================= +//function : SecondRotationAngle +//purpose : +//======================================================================= +Standard_Real StepKinematics_UniversalPairValue::SecondRotationAngle () const +{ + return mySecondRotationAngle; +} + +//======================================================================= +//function : SetSecondRotationAngle +//purpose : +//======================================================================= +void StepKinematics_UniversalPairValue::SetSecondRotationAngle (const Standard_Real theSecondRotationAngle) +{ + mySecondRotationAngle = theSecondRotationAngle; +} diff --git a/src/StepKinematics/StepKinematics_UniversalPairValue.hxx b/src/StepKinematics/StepKinematics_UniversalPairValue.hxx new file mode 100644 index 0000000000..e132930be7 --- /dev/null +++ b/src/StepKinematics/StepKinematics_UniversalPairValue.hxx @@ -0,0 +1,60 @@ +// Created on : Sat May 02 12:41:16 2020 +// Created by: Irina KRYLOVA +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V3.0 +// Copyright (c) Open CASCADE 2020 +// +// 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 _StepKinematics_UniversalPairValue_HeaderFile_ +#define _StepKinematics_UniversalPairValue_HeaderFile_ + +#include +#include +#include + +#include +#include + +DEFINE_STANDARD_HANDLE(StepKinematics_UniversalPairValue, StepKinematics_PairValue) + +//! Representation of STEP entity UniversalPairValue +class StepKinematics_UniversalPairValue : public StepKinematics_PairValue +{ +public : + + //! default constructor + Standard_EXPORT StepKinematics_UniversalPairValue(); + + //! Initialize all fields (own and inherited) + Standard_EXPORT void Init(const Handle(TCollection_HAsciiString)& theRepresentationItem_Name, + const Handle(StepKinematics_KinematicPair)& thePairValue_AppliesToPair, + const Standard_Real theFirstRotationAngle, + const Standard_Real theSecondRotationAngle); + + //! Returns field FirstRotationAngle + Standard_EXPORT Standard_Real FirstRotationAngle() const; + //! Sets field FirstRotationAngle + Standard_EXPORT void SetFirstRotationAngle (const Standard_Real theFirstRotationAngle); + + //! Returns field SecondRotationAngle + Standard_EXPORT Standard_Real SecondRotationAngle() const; + //! Sets field SecondRotationAngle + Standard_EXPORT void SetSecondRotationAngle (const Standard_Real theSecondRotationAngle); + +DEFINE_STANDARD_RTTIEXT(StepKinematics_UniversalPairValue, StepKinematics_PairValue) + +private: + Standard_Real myFirstRotationAngle; + Standard_Real mySecondRotationAngle; + +}; +#endif // _StepKinematics_UniversalPairValue_HeaderFile_ diff --git a/src/StepKinematics/StepKinematics_UniversalPairWithRange.cxx b/src/StepKinematics/StepKinematics_UniversalPairWithRange.cxx new file mode 100644 index 0000000000..9fd98da7a8 --- /dev/null +++ b/src/StepKinematics/StepKinematics_UniversalPairWithRange.cxx @@ -0,0 +1,208 @@ +// Created on : Sat May 02 12:41:16 2020 +// Created by: Irina KRYLOVA +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V3.0 +// Copyright (c) Open CASCADE 2020 +// +// This file is part of Open CASCADE Technology software library. +// +// This library is free software; you can redistribute it and/or modify it under +// the terms of the GNU Lesser General Public License version 2.1 as published +// by the Free Software Foundation, with special exception defined in the file +// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT +// distribution for complete text of the license and disclaimer of any warranty. +// +// Alternatively, this file may be used under the terms of Open CASCADE +// commercial license or contractual agreement. + +#include + +IMPLEMENT_STANDARD_RTTIEXT(StepKinematics_UniversalPairWithRange, StepKinematics_UniversalPair) + +//======================================================================= +//function : StepKinematics_UniversalPairWithRange +//purpose : +//======================================================================= +StepKinematics_UniversalPairWithRange::StepKinematics_UniversalPairWithRange () +{ + defLowerLimitFirstRotation = Standard_False; + defUpperLimitFirstRotation = Standard_False; + defLowerLimitSecondRotation = Standard_False; + defUpperLimitSecondRotation = Standard_False; +} + +//======================================================================= +//function : Init +//purpose : +//======================================================================= +void StepKinematics_UniversalPairWithRange::Init (const Handle(TCollection_HAsciiString)& theRepresentationItem_Name, + const Handle(TCollection_HAsciiString)& theItemDefinedTransformation_Name, + const Standard_Boolean hasItemDefinedTransformation_Description, + const Handle(TCollection_HAsciiString)& theItemDefinedTransformation_Description, + const Handle(StepRepr_RepresentationItem)& theItemDefinedTransformation_TransformItem1, + const Handle(StepRepr_RepresentationItem)& theItemDefinedTransformation_TransformItem2, + const Handle(StepKinematics_KinematicJoint)& theKinematicPair_Joint, + const Standard_Boolean theLowOrderKinematicPair_TX, + const Standard_Boolean theLowOrderKinematicPair_TY, + const Standard_Boolean theLowOrderKinematicPair_TZ, + const Standard_Boolean theLowOrderKinematicPair_RX, + const Standard_Boolean theLowOrderKinematicPair_RY, + const Standard_Boolean theLowOrderKinematicPair_RZ, + const Standard_Boolean hasUniversalPair_InputSkewAngle, + const Standard_Real theUniversalPair_InputSkewAngle, + const Standard_Boolean hasLowerLimitFirstRotation, + const Standard_Real theLowerLimitFirstRotation, + const Standard_Boolean hasUpperLimitFirstRotation, + const Standard_Real theUpperLimitFirstRotation, + const Standard_Boolean hasLowerLimitSecondRotation, + const Standard_Real theLowerLimitSecondRotation, + const Standard_Boolean hasUpperLimitSecondRotation, + const Standard_Real theUpperLimitSecondRotation) +{ + StepKinematics_UniversalPair::Init(theRepresentationItem_Name, + theItemDefinedTransformation_Name, + hasItemDefinedTransformation_Description, + theItemDefinedTransformation_Description, + theItemDefinedTransformation_TransformItem1, + theItemDefinedTransformation_TransformItem2, + theKinematicPair_Joint, + theLowOrderKinematicPair_TX, + theLowOrderKinematicPair_TY, + theLowOrderKinematicPair_TZ, + theLowOrderKinematicPair_RX, + theLowOrderKinematicPair_RY, + theLowOrderKinematicPair_RZ, + hasUniversalPair_InputSkewAngle, + theUniversalPair_InputSkewAngle); + + defLowerLimitFirstRotation = hasLowerLimitFirstRotation; + if (defLowerLimitFirstRotation) { + myLowerLimitFirstRotation = theLowerLimitFirstRotation; + } + else myLowerLimitFirstRotation = 0; + + defUpperLimitFirstRotation = hasUpperLimitFirstRotation; + if (defUpperLimitFirstRotation) { + myUpperLimitFirstRotation = theUpperLimitFirstRotation; + } + else myUpperLimitFirstRotation = 0; + + defLowerLimitSecondRotation = hasLowerLimitSecondRotation; + if (defLowerLimitSecondRotation) { + myLowerLimitSecondRotation = theLowerLimitSecondRotation; + } + else myLowerLimitSecondRotation = 0; + + defUpperLimitSecondRotation = hasUpperLimitSecondRotation; + if (defUpperLimitSecondRotation) { + myUpperLimitSecondRotation = theUpperLimitSecondRotation; + } + else myUpperLimitSecondRotation = 0; +} + +//======================================================================= +//function : LowerLimitFirstRotation +//purpose : +//======================================================================= +Standard_Real StepKinematics_UniversalPairWithRange::LowerLimitFirstRotation () const +{ + return myLowerLimitFirstRotation; +} + +//======================================================================= +//function : SetLowerLimitFirstRotation +//purpose : +//======================================================================= +void StepKinematics_UniversalPairWithRange::SetLowerLimitFirstRotation (const Standard_Real theLowerLimitFirstRotation) +{ + myLowerLimitFirstRotation = theLowerLimitFirstRotation; +} + +//======================================================================= +//function : HasLowerLimitFirstRotation +//purpose : +//======================================================================= +Standard_Boolean StepKinematics_UniversalPairWithRange::HasLowerLimitFirstRotation () const +{ + return defLowerLimitFirstRotation; +} + +//======================================================================= +//function : UpperLimitFirstRotation +//purpose : +//======================================================================= +Standard_Real StepKinematics_UniversalPairWithRange::UpperLimitFirstRotation () const +{ + return myUpperLimitFirstRotation; +} + +//======================================================================= +//function : SetUpperLimitFirstRotation +//purpose : +//======================================================================= +void StepKinematics_UniversalPairWithRange::SetUpperLimitFirstRotation (const Standard_Real theUpperLimitFirstRotation) +{ + myUpperLimitFirstRotation = theUpperLimitFirstRotation; +} + +//======================================================================= +//function : HasUpperLimitFirstRotation +//purpose : +//======================================================================= +Standard_Boolean StepKinematics_UniversalPairWithRange::HasUpperLimitFirstRotation () const +{ + return defUpperLimitFirstRotation; +} + +//======================================================================= +//function : LowerLimitSecondRotation +//purpose : +//======================================================================= +Standard_Real StepKinematics_UniversalPairWithRange::LowerLimitSecondRotation () const +{ + return myLowerLimitSecondRotation; +} + +//======================================================================= +//function : SetLowerLimitSecondRotation +//purpose : +//======================================================================= +void StepKinematics_UniversalPairWithRange::SetLowerLimitSecondRotation (const Standard_Real theLowerLimitSecondRotation) +{ + myLowerLimitSecondRotation = theLowerLimitSecondRotation; +} + +//======================================================================= +//function : HasLowerLimitSecondRotation +//purpose : +//======================================================================= +Standard_Boolean StepKinematics_UniversalPairWithRange::HasLowerLimitSecondRotation () const +{ + return defLowerLimitSecondRotation; +} + +//======================================================================= +//function : UpperLimitSecondRotation +//purpose : +//======================================================================= +Standard_Real StepKinematics_UniversalPairWithRange::UpperLimitSecondRotation () const +{ + return myUpperLimitSecondRotation; +} + +//======================================================================= +//function : SetUpperLimitSecondRotation +//purpose : +//======================================================================= +void StepKinematics_UniversalPairWithRange::SetUpperLimitSecondRotation (const Standard_Real theUpperLimitSecondRotation) +{ + myUpperLimitSecondRotation = theUpperLimitSecondRotation; +} + +//======================================================================= +//function : HasUpperLimitSecondRotation +//purpose : +//======================================================================= +Standard_Boolean StepKinematics_UniversalPairWithRange::HasUpperLimitSecondRotation () const +{ + return defUpperLimitSecondRotation; +} diff --git a/src/StepKinematics/StepKinematics_UniversalPairWithRange.hxx b/src/StepKinematics/StepKinematics_UniversalPairWithRange.hxx new file mode 100644 index 0000000000..3aa2ee8c1a --- /dev/null +++ b/src/StepKinematics/StepKinematics_UniversalPairWithRange.hxx @@ -0,0 +1,105 @@ +// Created on : Sat May 02 12:41:16 2020 +// Created by: Irina KRYLOVA +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V3.0 +// Copyright (c) Open CASCADE 2020 +// +// 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 _StepKinematics_UniversalPairWithRange_HeaderFile_ +#define _StepKinematics_UniversalPairWithRange_HeaderFile_ + +#include +#include +#include + +#include +#include +#include +#include + +DEFINE_STANDARD_HANDLE(StepKinematics_UniversalPairWithRange, StepKinematics_UniversalPair) + +//! Representation of STEP entity UniversalPairWithRange +class StepKinematics_UniversalPairWithRange : public StepKinematics_UniversalPair +{ +public : + + //! default constructor + Standard_EXPORT StepKinematics_UniversalPairWithRange(); + + //! Initialize all fields (own and inherited) + Standard_EXPORT void Init(const Handle(TCollection_HAsciiString)& theRepresentationItem_Name, + const Handle(TCollection_HAsciiString)& theItemDefinedTransformation_Name, + const Standard_Boolean hasItemDefinedTransformation_Description, + const Handle(TCollection_HAsciiString)& theItemDefinedTransformation_Description, + const Handle(StepRepr_RepresentationItem)& theItemDefinedTransformation_TransformItem1, + const Handle(StepRepr_RepresentationItem)& theItemDefinedTransformation_TransformItem2, + const Handle(StepKinematics_KinematicJoint)& theKinematicPair_Joint, + const Standard_Boolean theLowOrderKinematicPair_TX, + const Standard_Boolean theLowOrderKinematicPair_TY, + const Standard_Boolean theLowOrderKinematicPair_TZ, + const Standard_Boolean theLowOrderKinematicPair_RX, + const Standard_Boolean theLowOrderKinematicPair_RY, + const Standard_Boolean theLowOrderKinematicPair_RZ, + const Standard_Boolean hasUniversalPair_InputSkewAngle, + const Standard_Real theUniversalPair_InputSkewAngle, + const Standard_Boolean hasLowerLimitFirstRotation, + const Standard_Real theLowerLimitFirstRotation, + const Standard_Boolean hasUpperLimitFirstRotation, + const Standard_Real theUpperLimitFirstRotation, + const Standard_Boolean hasLowerLimitSecondRotation, + const Standard_Real theLowerLimitSecondRotation, + const Standard_Boolean hasUpperLimitSecondRotation, + const Standard_Real theUpperLimitSecondRotation); + + //! Returns field LowerLimitFirstRotation + Standard_EXPORT Standard_Real LowerLimitFirstRotation() const; + //! Sets field LowerLimitFirstRotation + Standard_EXPORT void SetLowerLimitFirstRotation (const Standard_Real theLowerLimitFirstRotation); + //! Returns True if optional field LowerLimitFirstRotation is defined + Standard_EXPORT Standard_Boolean HasLowerLimitFirstRotation() const; + + //! Returns field UpperLimitFirstRotation + Standard_EXPORT Standard_Real UpperLimitFirstRotation() const; + //! Sets field UpperLimitFirstRotation + Standard_EXPORT void SetUpperLimitFirstRotation (const Standard_Real theUpperLimitFirstRotation); + //! Returns True if optional field UpperLimitFirstRotation is defined + Standard_EXPORT Standard_Boolean HasUpperLimitFirstRotation() const; + + //! Returns field LowerLimitSecondRotation + Standard_EXPORT Standard_Real LowerLimitSecondRotation() const; + //! Sets field LowerLimitSecondRotation + Standard_EXPORT void SetLowerLimitSecondRotation (const Standard_Real theLowerLimitSecondRotation); + //! Returns True if optional field LowerLimitSecondRotation is defined + Standard_EXPORT Standard_Boolean HasLowerLimitSecondRotation() const; + + //! Returns field UpperLimitSecondRotation + Standard_EXPORT Standard_Real UpperLimitSecondRotation() const; + //! Sets field UpperLimitSecondRotation + Standard_EXPORT void SetUpperLimitSecondRotation (const Standard_Real theUpperLimitSecondRotation); + //! Returns True if optional field UpperLimitSecondRotation is defined + Standard_EXPORT Standard_Boolean HasUpperLimitSecondRotation() const; + +DEFINE_STANDARD_RTTIEXT(StepKinematics_UniversalPairWithRange, StepKinematics_UniversalPair) + +private: + Standard_Real myLowerLimitFirstRotation; //!< optional + Standard_Real myUpperLimitFirstRotation; //!< optional + Standard_Real myLowerLimitSecondRotation; //!< optional + Standard_Real myUpperLimitSecondRotation; //!< optional + Standard_Boolean defLowerLimitFirstRotation; //!< flag "is LowerLimitFirstRotation defined" + Standard_Boolean defUpperLimitFirstRotation; //!< flag "is UpperLimitFirstRotation defined" + Standard_Boolean defLowerLimitSecondRotation; //!< flag "is LowerLimitSecondRotation defined" + Standard_Boolean defUpperLimitSecondRotation; //!< flag "is UpperLimitSecondRotation defined" + +}; +#endif // _StepKinematics_UniversalPairWithRange_HeaderFile_ diff --git a/src/StepRepr/FILES b/src/StepRepr/FILES index 39c589d91e..ab9522c9e3 100644 --- a/src/StepRepr/FILES +++ b/src/StepRepr/FILES @@ -114,10 +114,16 @@ StepRepr_Representation.cxx StepRepr_Representation.hxx StepRepr_RepresentationContext.cxx StepRepr_RepresentationContext.hxx +StepRepr_RepresentationContextReference.cxx +StepRepr_RepresentationContextReference.hxx StepRepr_RepresentationItem.cxx StepRepr_RepresentationItem.hxx StepRepr_RepresentationMap.cxx StepRepr_RepresentationMap.hxx +StepRepr_RepresentationOrRepresentationReference.cxx +StepRepr_RepresentationOrRepresentationReference.hxx +StepRepr_RepresentationReference.cxx +StepRepr_RepresentationReference.hxx StepRepr_RepresentationRelationship.cxx StepRepr_RepresentationRelationship.hxx StepRepr_RepresentationRelationshipWithTransformation.cxx diff --git a/src/StepRepr/StepRepr_ItemDefinedTransformation.hxx b/src/StepRepr/StepRepr_ItemDefinedTransformation.hxx index 71b35685c2..3891cad5f4 100644 --- a/src/StepRepr/StepRepr_ItemDefinedTransformation.hxx +++ b/src/StepRepr/StepRepr_ItemDefinedTransformation.hxx @@ -42,6 +42,8 @@ public: Standard_EXPORT void SetName (const Handle(TCollection_HAsciiString)& aName); Standard_EXPORT Handle(TCollection_HAsciiString) Name() const; + + Standard_Boolean HasDescription() const { return !theDescription.IsNull(); } Standard_EXPORT void SetDescription (const Handle(TCollection_HAsciiString)& aDescription); diff --git a/src/StepRepr/StepRepr_RepresentationContextReference.cxx b/src/StepRepr/StepRepr_RepresentationContextReference.cxx new file mode 100644 index 0000000000..6f1aa37ba5 --- /dev/null +++ b/src/StepRepr/StepRepr_RepresentationContextReference.cxx @@ -0,0 +1,59 @@ +// Created on : Sat May 02 12:41:14 2020 +// Created by: Irina KRYLOVA +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V3.0 +// Copyright (c) Open CASCADE 2020 +// +// This file is part of Open CASCADE Technology software library. +// +// This library is free software; you can redistribute it and/or modify it under +// the terms of the GNU Lesser General Public License version 2.1 as published +// by the Free Software Foundation, with special exception defined in the file +// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT +// distribution for complete text of the license and disclaimer of any warranty. +// +// Alternatively, this file may be used under the terms of Open CASCADE +// commercial license or contractual agreement. + +#include + +IMPLEMENT_STANDARD_RTTIEXT(StepRepr_RepresentationContextReference, Standard_Transient) + +//======================================================================= +//function : StepRepr_RepresentationContextReference +//purpose : +//======================================================================= + +StepRepr_RepresentationContextReference::StepRepr_RepresentationContextReference () +{ +} + +//======================================================================= +//function : Init +//purpose : +//======================================================================= + +void StepRepr_RepresentationContextReference::Init (const Handle(TCollection_HAsciiString)& theContextIdentifier) +{ + + myContextIdentifier = theContextIdentifier; +} + +//======================================================================= +//function : ContextIdentifier +//purpose : +//======================================================================= + +Handle(TCollection_HAsciiString) StepRepr_RepresentationContextReference::ContextIdentifier () const +{ + return myContextIdentifier; +} + +//======================================================================= +//function : SetContextIdentifier +//purpose : +//======================================================================= + +void StepRepr_RepresentationContextReference::SetContextIdentifier (const Handle(TCollection_HAsciiString)& theContextIdentifier) +{ + myContextIdentifier = theContextIdentifier; +} diff --git a/src/StepRepr/StepRepr_RepresentationContextReference.hxx b/src/StepRepr/StepRepr_RepresentationContextReference.hxx new file mode 100644 index 0000000000..757246542a --- /dev/null +++ b/src/StepRepr/StepRepr_RepresentationContextReference.hxx @@ -0,0 +1,50 @@ +// Created on : Sat May 02 12:41:14 2020 +// Created by: Irina KRYLOVA +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V3.0 +// Copyright (c) Open CASCADE 2020 +// +// 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 _StepRepr_RepresentationContextReference_HeaderFile_ +#define _StepRepr_RepresentationContextReference_HeaderFile_ + +#include +#include +#include + +#include + +DEFINE_STANDARD_HANDLE(StepRepr_RepresentationContextReference, Standard_Transient) + +//! Representation of STEP entity RepresentationContextReference +class StepRepr_RepresentationContextReference : public Standard_Transient +{ +public : + + //! default constructor + Standard_EXPORT StepRepr_RepresentationContextReference(); + + //! Initialize all fields (own and inherited) + Standard_EXPORT void Init(const Handle(TCollection_HAsciiString)& theContextIdentifier); + + //! Returns field ContextIdentifier + Standard_EXPORT Handle(TCollection_HAsciiString) ContextIdentifier() const; + //! Sets field ContextIdentifier + Standard_EXPORT void SetContextIdentifier (const Handle(TCollection_HAsciiString)& theContextIdentifier); + +DEFINE_STANDARD_RTTIEXT(StepRepr_RepresentationContextReference, Standard_Transient) + +private: + Handle(TCollection_HAsciiString) myContextIdentifier; + +}; +#endif // _StepRepr_RepresentationContextReference_HeaderFile_ diff --git a/src/StepRepr/StepRepr_RepresentationOrRepresentationReference.cxx b/src/StepRepr/StepRepr_RepresentationOrRepresentationReference.cxx new file mode 100644 index 0000000000..2232141c72 --- /dev/null +++ b/src/StepRepr/StepRepr_RepresentationOrRepresentationReference.cxx @@ -0,0 +1,61 @@ +// Created on : Sat May 02 12:41:14 2020 +// Created by: Irina KRYLOVA +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V3.0 +// Copyright (c) Open CASCADE 2020 +// +// This file is part of Open CASCADE Technology software library. +// +// This library is free software; you can redistribute it and/or modify it under +// the terms of the GNU Lesser General Public License version 2.1 as published +// by the Free Software Foundation, with special exception defined in the file +// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT +// distribution for complete text of the license and disclaimer of any warranty. +// +// Alternatively, this file may be used under the terms of Open CASCADE +// commercial license or contractual agreement. + +#include +#include +#include + +//======================================================================= +//function : StepRepr_RepresentationOrRepresentationReference +//purpose : +//======================================================================= + +StepRepr_RepresentationOrRepresentationReference::StepRepr_RepresentationOrRepresentationReference () +{ +} + +//======================================================================= +//function : CaseNum +//purpose : +//======================================================================= + +Standard_Integer StepRepr_RepresentationOrRepresentationReference::CaseNum (const Handle(Standard_Transient)& ent) const +{ + if (ent.IsNull()) return 0; + if (ent->IsKind(STANDARD_TYPE(StepRepr_Representation))) return 1; + if (ent->IsKind(STANDARD_TYPE(StepRepr_RepresentationReference))) return 2; + return 0; +} + +//======================================================================= +//function : Representation +//purpose : +//======================================================================= + +Handle(StepRepr_Representation) StepRepr_RepresentationOrRepresentationReference::Representation () const +{ + return Handle(StepRepr_Representation)::DownCast(Value()); +} + +//======================================================================= +//function : RepresentationReference +//purpose : +//======================================================================= + +Handle(StepRepr_RepresentationReference) StepRepr_RepresentationOrRepresentationReference::RepresentationReference () const +{ + return Handle(StepRepr_RepresentationReference)::DownCast(Value()); +} diff --git a/src/StepRepr/StepRepr_RepresentationOrRepresentationReference.hxx b/src/StepRepr/StepRepr_RepresentationOrRepresentationReference.hxx new file mode 100644 index 0000000000..bad4a602cd --- /dev/null +++ b/src/StepRepr/StepRepr_RepresentationOrRepresentationReference.hxx @@ -0,0 +1,53 @@ +// Created on : Sat May 02 12:41:14 2020 +// Created by: Irina KRYLOVA +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V3.0 +// Copyright (c) Open CASCADE 2020 +// +// 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 _StepRepr_RepresentationOrRepresentationReference_HeaderFile +#define _StepRepr_RepresentationOrRepresentationReference_HeaderFile + +#include +#include +#include +#include +#include + +class Standard_Transient; +class StepRepr_Representation; +class StepRepr_RepresentationReference; + +//! Representation of STEP SELECT type RepresentationOrRepresentationReference +class StepRepr_RepresentationOrRepresentationReference : public StepData_SelectType +{ + +public: + + DEFINE_STANDARD_ALLOC + + //! Empty constructor + Standard_EXPORT StepRepr_RepresentationOrRepresentationReference(); + + //! Recognizes a kind of RepresentationOrRepresentationReference select type + //! -- 1 -> Representation + //! -- 2 -> RepresentationReference + Standard_EXPORT Standard_Integer CaseNum (const Handle(Standard_Transient)& ent) const Standard_OVERRIDE; + + //! Returns Value as Representation (or Null if another type) + Standard_EXPORT Handle(StepRepr_Representation) Representation() const; + + //! Returns Value as RepresentationReference (or Null if another type) + Standard_EXPORT Handle(StepRepr_RepresentationReference) RepresentationReference() const; + +}; +#endif // _StepRepr_RepresentationOrRepresentationReference_HeaderFile diff --git a/src/StepRepr/StepRepr_RepresentationReference.cxx b/src/StepRepr/StepRepr_RepresentationReference.cxx new file mode 100644 index 0000000000..16d392bfe0 --- /dev/null +++ b/src/StepRepr/StepRepr_RepresentationReference.cxx @@ -0,0 +1,82 @@ +// Created on : Sat May 02 12:41:14 2020 +// Created by: Irina KRYLOVA +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V3.0 +// Copyright (c) Open CASCADE 2020 +// +// This file is part of Open CASCADE Technology software library. +// +// This library is free software; you can redistribute it and/or modify it under +// the terms of the GNU Lesser General Public License version 2.1 as published +// by the Free Software Foundation, with special exception defined in the file +// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT +// distribution for complete text of the license and disclaimer of any warranty. +// +// Alternatively, this file may be used under the terms of Open CASCADE +// commercial license or contractual agreement. + +#include + +IMPLEMENT_STANDARD_RTTIEXT(StepRepr_RepresentationReference, Standard_Transient) + +//======================================================================= +//function : StepRepr_RepresentationReference +//purpose : +//======================================================================= + +StepRepr_RepresentationReference::StepRepr_RepresentationReference () +{ +} + +//======================================================================= +//function : Init +//purpose : +//======================================================================= + +void StepRepr_RepresentationReference::Init (const Handle(TCollection_HAsciiString)& theId, + const Handle(StepRepr_RepresentationContextReference)& theContextOfItems) +{ + + myId = theId; + + myContextOfItems = theContextOfItems; +} + +//======================================================================= +//function : Id +//purpose : +//======================================================================= + +Handle(TCollection_HAsciiString) StepRepr_RepresentationReference::Id () const +{ + return myId; +} + +//======================================================================= +//function : SetId +//purpose : +//======================================================================= + +void StepRepr_RepresentationReference::SetId (const Handle(TCollection_HAsciiString)& theId) +{ + myId = theId; +} + +//======================================================================= +//function : ContextOfItems +//purpose : +//======================================================================= + +Handle(StepRepr_RepresentationContextReference) StepRepr_RepresentationReference::ContextOfItems () const +{ + return myContextOfItems; +} + +//======================================================================= +//function : SetContextOfItems +//purpose : +//======================================================================= + +void StepRepr_RepresentationReference::SetContextOfItems (const Handle(StepRepr_RepresentationContextReference)& theContextOfItems) +{ + myContextOfItems = theContextOfItems; +} diff --git a/src/StepRepr/StepRepr_RepresentationReference.hxx b/src/StepRepr/StepRepr_RepresentationReference.hxx new file mode 100644 index 0000000000..24088a235e --- /dev/null +++ b/src/StepRepr/StepRepr_RepresentationReference.hxx @@ -0,0 +1,58 @@ +// Created on : Sat May 02 12:41:14 2020 +// Created by: Irina KRYLOVA +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V3.0 +// Copyright (c) Open CASCADE 2020 +// +// 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 _StepRepr_RepresentationReference_HeaderFile_ +#define _StepRepr_RepresentationReference_HeaderFile_ + +#include +#include +#include + +#include +#include + +DEFINE_STANDARD_HANDLE(StepRepr_RepresentationReference, Standard_Transient) + +//! Representation of STEP entity RepresentationReference +class StepRepr_RepresentationReference : public Standard_Transient +{ +public : + + //! default constructor + Standard_EXPORT StepRepr_RepresentationReference(); + + //! Initialize all fields (own and inherited) + Standard_EXPORT void Init(const Handle(TCollection_HAsciiString)& theId, + const Handle(StepRepr_RepresentationContextReference)& theContextOfItems); + + //! Returns field Id + Standard_EXPORT Handle(TCollection_HAsciiString) Id() const; + //! Sets field Id + Standard_EXPORT void SetId (const Handle(TCollection_HAsciiString)& theId); + + //! Returns field ContextOfItems + Standard_EXPORT Handle(StepRepr_RepresentationContextReference) ContextOfItems() const; + //! Sets field ContextOfItems + Standard_EXPORT void SetContextOfItems (const Handle(StepRepr_RepresentationContextReference)& theContextOfItems); + +DEFINE_STANDARD_RTTIEXT(StepRepr_RepresentationReference, Standard_Transient) + +private: + Handle(TCollection_HAsciiString) myId; + Handle(StepRepr_RepresentationContextReference) myContextOfItems; + +}; +#endif // _StepRepr_RepresentationReference_HeaderFile_ diff --git a/src/StepRepr/StepRepr_RepresentationRelationship.hxx b/src/StepRepr/StepRepr_RepresentationRelationship.hxx index 3577e2784a..2e3c8382fd 100644 --- a/src/StepRepr/StepRepr_RepresentationRelationship.hxx +++ b/src/StepRepr/StepRepr_RepresentationRelationship.hxx @@ -43,6 +43,8 @@ public: Standard_EXPORT void SetName (const Handle(TCollection_HAsciiString)& aName); Standard_EXPORT Handle(TCollection_HAsciiString) Name() const; + + Standard_Boolean HasDescription() { return !description.IsNull(); } Standard_EXPORT void SetDescription (const Handle(TCollection_HAsciiString)& aDescription); diff --git a/src/StepRepr/StepRepr_Transformation.cxx b/src/StepRepr/StepRepr_Transformation.cxx index ea33444708..018648fa31 100644 --- a/src/StepRepr/StepRepr_Transformation.cxx +++ b/src/StepRepr/StepRepr_Transformation.cxx @@ -14,6 +14,7 @@ #include #include +#include #include #include #include @@ -25,6 +26,7 @@ Standard_Integer StepRepr_Transformation::CaseNum(const Handle(Standard_Transien if (ent.IsNull()) return 0; if (ent->IsKind(STANDARD_TYPE(StepRepr_ItemDefinedTransformation))) return 1; if (ent->IsKind(STANDARD_TYPE(StepRepr_FunctionallyDefinedTransformation))) return 2; + if (ent->IsKind(STANDARD_TYPE(StepGeom_GeometricRepresentationItem))) return 1; return 0; } diff --git a/src/StepRepr/StepRepr_Transformation.hxx b/src/StepRepr/StepRepr_Transformation.hxx index b4d59c045d..c1f17c818a 100644 --- a/src/StepRepr/StepRepr_Transformation.hxx +++ b/src/StepRepr/StepRepr_Transformation.hxx @@ -52,8 +52,6 @@ public: Standard_EXPORT Handle(StepRepr_FunctionallyDefinedTransformation) FunctionallyDefinedTransformation() const; - - protected: diff --git a/src/StepToGeom/StepToGeom.cxx b/src/StepToGeom/StepToGeom.cxx index dcbd145a99..bb28924127 100644 --- a/src/StepToGeom/StepToGeom.cxx +++ b/src/StepToGeom/StepToGeom.cxx @@ -131,11 +131,19 @@ #include #include #include +#include +#include +#include #include #include #include +#include +#include +#include +#include +#include //============================================================================= // Creation d' un Ax1Placement de Geom a partir d' un axis1_placement de Step @@ -202,6 +210,28 @@ Handle(Geom_Axis2Placement) StepToGeom::MakeAxis2Placement (const Handle(StepGeo return 0; } +//============================================================================= +// Creation of an AxisPlacement from a Kinematic SuParameters for Step +//============================================================================= + +Handle(Geom_Axis2Placement) StepToGeom::MakeAxis2Placement(const Handle(StepGeom_SuParameters)& theSP) +{ + Standard_Real aLocX = theSP->A() * cos(theSP->Gamma()) + theSP->B() * sin(theSP->Gamma()) * sin(theSP->Alpha()); + Standard_Real aLocY = theSP->A() * sin(theSP->Gamma()) - theSP->B() * cos(theSP->Gamma()) * sin(theSP->Alpha()); + Standard_Real aLocZ = theSP->C() + theSP->B() * cos(theSP->Alpha()); + Standard_Real anAsisX = sin(theSP->Gamma()) * sin(theSP->Alpha()); + Standard_Real anAxisY = -cos(theSP->Gamma()) * sin(theSP->Alpha()); + Standard_Real anAxisZ = cos(theSP->Alpha()); + Standard_Real aDirX = cos(theSP->Gamma()) * cos(theSP->Beta()) - sin(theSP->Gamma()) * cos(theSP->Alpha()) * sin(theSP->Beta()); + Standard_Real aDirY = sin(theSP->Gamma()) * cos(theSP->Beta()) + cos(theSP->Gamma()) * cos(theSP->Alpha()) * sin(theSP->Beta()); + Standard_Real aDirZ = sin(theSP->Alpha())*sin(theSP->Beta()); + const gp_Pnt Pgp (aLocX, aLocY, aLocZ); + const gp_Dir Ngp (anAsisX,anAxisY,anAxisZ); + const gp_Dir Vxgp(aDirX, aDirY, aDirZ); + gp_Ax2 gpAx2 = gp_Ax2(Pgp, Ngp, Vxgp); + return new Geom_Axis2Placement(gpAx2); +} + //============================================================================= // Creation d' un AxisPlacement de Geom2d a partir d' un axis2_placement_3d de Step //============================================================================= @@ -2179,3 +2209,222 @@ Handle(Geom2d_VectorWithMagnitude) StepToGeom::MakeVectorWithMagnitude2d (const } return 0; } + +//============================================================================= +// Creation of a YptRotation from a Kinematic SpatialRotation for Step +//============================================================================= + +Handle(TColStd_HArray1OfReal) StepToGeom::MakeYprRotation(const StepKinematics_SpatialRotation& SR, const Handle(StepRepr_GlobalUnitAssignedContext)& theCntxt) +{ + //If rotation is already a ypr_rotation, return it immediately + Handle(TColStd_HArray1OfReal) anYPRRotation; + if (!SR.YprRotation().IsNull() && + SR.YprRotation()->Length() == 3) + { + return SR.YprRotation(); + } + + if (SR.RotationAboutDirection().IsNull() || + SR.RotationAboutDirection()->DirectionOfAxis()->DirectionRatios()->Length() != 3 || + theCntxt.IsNull()) + { + return NULL; + } + //rotation is a rotation_about_direction + Handle(Geom_Direction) anAxis; + anAxis = new Geom_Direction(SR.RotationAboutDirection()->DirectionOfAxis()->DirectionRatiosValue(1), + SR.RotationAboutDirection()->DirectionOfAxis()->DirectionRatiosValue(2), + SR.RotationAboutDirection()->DirectionOfAxis()->DirectionRatiosValue(3)); + Standard_Real anAngle = SR.RotationAboutDirection()->RotationAngle(); + if (Abs(anAngle) < Precision::Angular()) + { + // a zero rotation is converted trivially + anYPRRotation = new TColStd_HArray1OfReal(1, 3); + anYPRRotation->SetValue(1, 0.); + anYPRRotation->SetValue(2, 0.); + anYPRRotation->SetValue(3, 0.); + return anYPRRotation; + } + Standard_Real dx = anAxis->X(); + Standard_Real dy = anAxis->Y(); + Standard_Real dz = anAxis->Z(); + NCollection_Sequence aPaUnits; + for (Standard_Integer anInd = 1; anInd <= theCntxt->Units()->Length(); ++anInd) + { + if (theCntxt->UnitsValue(anInd)->IsKind(STANDARD_TYPE(StepBasic_ConversionBasedUnitAndPlaneAngleUnit)) || + theCntxt->UnitsValue(anInd)->IsKind(STANDARD_TYPE(StepBasic_SiUnitAndPlaneAngleUnit))) + { + aPaUnits.Append(theCntxt->UnitsValue(anInd)); + } + } + if (aPaUnits.Length() != 1) + { + return anYPRRotation; + } + Handle(StepBasic_NamedUnit) aPau = aPaUnits.Value(1); + while (!aPau.IsNull() && aPau->IsKind((STANDARD_TYPE(StepBasic_ConversionBasedUnitAndPlaneAngleUnit)))) + { + Handle(StepBasic_ConversionBasedUnitAndPlaneAngleUnit) aConverUnit = Handle(StepBasic_ConversionBasedUnitAndPlaneAngleUnit)::DownCast(aPau); + anAngle = anAngle * aConverUnit->ConversionFactor()->ValueComponent(); + aPau = aConverUnit->ConversionFactor()->UnitComponent().NamedUnit(); + } + if (aPau.IsNull()) + { + return anYPRRotation; + } + Handle(StepBasic_SiUnitAndPlaneAngleUnit) aSiUnit = Handle(StepBasic_SiUnitAndPlaneAngleUnit)::DownCast(aPau); + if (aSiUnit.IsNull() || aSiUnit->Name() != StepBasic_sunRadian) + { + return anYPRRotation; + } + anAngle = (!aSiUnit->HasPrefix() ? + 1. : STEPConstruct_UnitContext::ConvertSiPrefix(aSiUnit->Prefix())) * anAngle; + Standard_Real anUcf = SR.RotationAboutDirection()->RotationAngle() / anAngle; + Standard_Real aSA = Sin(anAngle); + Standard_Real aCA = Cos(anAngle); + Standard_Real aYaw = 0, aPitch = 0, aRoll = 0; + + // axis parallel either to x-axis or to z-axis? + if (Abs(dy) < Precision::Confusion() && Abs(dx * dz) < Precision::SquareConfusion()) + { + while (anAngle <= -M_PI) + { + anAngle = anAngle + 2 * M_PI; + } + while (anAngle > M_PI) + { + anAngle = anAngle - 2 * M_PI; + } + + aYaw = anUcf * anAngle; + if (Abs(anAngle - M_PI) >= Precision::Angular()) + { + aRoll = -aYaw; + } + else + { + aRoll = aYaw; + } + anYPRRotation = new TColStd_HArray1OfReal(1, 3); + anYPRRotation->SetValue(1, 0.); + anYPRRotation->SetValue(2, 0.); + anYPRRotation->SetValue(3, 0.); + if (Abs(dx) >= Precision::Confusion()) + { + if (dx > 0.) + anYPRRotation->SetValue(3, aYaw); + else + anYPRRotation->SetValue(3, aRoll); + } + else + { + if (dz > 0.) + anYPRRotation->SetValue(1, aYaw); + else + anYPRRotation->SetValue(1, aRoll); + } + return anYPRRotation; + } + + // axis parallel to y-axis - use y-axis as pitch axis + if (Abs(dy) >= Precision::Confusion() && Abs(dx) < Precision::Confusion() && Abs(dz) < Precision::Confusion()) + { + if (aCA >= 0.) + { + aYaw = 0.0; + aRoll = 0.0; + } + else + { + aYaw = anUcf * M_PI; + aRoll = aYaw; + } + aPitch = anUcf * ATan2(aSA, Abs(aCA)); + if (dy < 0.) + { + aPitch = -aPitch; + } + anYPRRotation = new TColStd_HArray1OfReal(1, 3); + anYPRRotation->SetValue(1, aYaw); + anYPRRotation->SetValue(2, aPitch); + anYPRRotation->SetValue(3, aRoll); + return anYPRRotation; + } + // axis not parallel to any axis of coordinate system + // compute rotation matrix + Standard_Real aCm1 = 1 - aCA; + + Standard_Real aRotMat[3][3] = { { dx * dx * aCm1 + aCA ,dx * dy * aCm1 - dz * aSA, dx * dz * aCm1 + dy * aSA }, + { dx * dy * aCm1 + dz * aSA,dy * dy * aCm1 + aCA, dy * dz * aCm1 - dx * aSA }, + { dx * dz * aCm1 - dy * aSA, dy * dz * aCm1 + dx * aSA,dz * dz * aCm1 + aCA } }; + + // aRotMat[1][3] equals SIN(pitch_angle) + if (Abs(Abs(aRotMat[0][2] - 1.)) < Precision::Confusion()) + { + // |aPitch| = PI/2 + if (Abs(aRotMat[0][2] - 1.) < Precision::Confusion()) + aPitch = M_PI_2; + else + aPitch = -M_PI_2; + // In this case, only the sum or difference of roll and yaw angles + // is relevant and can be evaluated from the matrix. + // According to IP `rectangular pitch angle' for ypr_rotation, + // the roll angle is set to zero. + aRoll = 0.; + aYaw = ATan2(aRotMat[1][0], aRotMat[1][1]); + // result of ATAN is in the range[-PI / 2, PI / 2]. + // Here all four quadrants are needed. + + if (aRotMat[1][1] < 0.) + { + if (aYaw <= 0.) + aYaw = aYaw + M_PI; + else + aYaw = aYaw - M_PI; + } + } + else + { + // COS (pitch_angle) not equal to zero + aYaw = ATan2(-aRotMat[0][1], aRotMat[0][0]); + + if (aRotMat[0][0] < 0.) + { + if (aYaw < 0. || Abs(aYaw) < Precision::Angular()) + aYaw = aYaw + M_PI; + else + aYaw = aYaw - M_PI; + } + Standard_Real aSY = Sin(aYaw); + Standard_Real aCY = Cos(aYaw); + Standard_Real aSR = Sin(aRoll); + Standard_Real aCR = Cos(aRoll); + + if (Abs(aSY) > Abs(aCY) && + Abs(aSY) > Abs(aSR) && + Abs(aSY) > Abs(aCR)) + { + aCm1 = -aRotMat[0][1] / aSY; + } + else + { + if (Abs(aCY) > Abs(aSR) && Abs(aCY) > Abs(aCR)) + aCm1 = aRotMat[0][0] / aCY; + else + if (Abs(aSR) > Abs(aCR)) + aCm1 = -aRotMat[1][2] / aSR; + else + aCm1 = aRotMat[2][2] / aCR; + } + aPitch = ATan2(aRotMat[0][2], aCm1); + } + aYaw = aYaw * anUcf; + aPitch = aPitch * anUcf; + aRoll = aRoll * anUcf; + anYPRRotation = new TColStd_HArray1OfReal(1, 3); + anYPRRotation->SetValue(1, aYaw); + anYPRRotation->SetValue(2, aPitch); + anYPRRotation->SetValue(3, aRoll); + + return anYPRRotation; +} diff --git a/src/StepToGeom/StepToGeom.hxx b/src/StepToGeom/StepToGeom.hxx index d95d975597..b708d25951 100644 --- a/src/StepToGeom/StepToGeom.hxx +++ b/src/StepToGeom/StepToGeom.hxx @@ -100,6 +100,10 @@ class StepGeom_CartesianTransformationOperator2d; class StepGeom_CartesianTransformationOperator3d; class StepGeom_TrimmedCurve; class StepGeom_Vector; +class StepGeom_SuParameters; +class StepKinematics_SpatialRotation; +class StepRepr_GlobalUnitAssignedContext; +class TColStd_HArray1OfReal; //! This class provides static methods to convert STEP geometric entities to OCCT. //! The methods returning handles will return null handle in case of error. @@ -111,6 +115,7 @@ public: Standard_EXPORT static Handle(Geom_Axis1Placement) MakeAxis1Placement (const Handle(StepGeom_Axis1Placement)& SA); Standard_EXPORT static Handle(Geom_Axis2Placement) MakeAxis2Placement (const Handle(StepGeom_Axis2Placement3d)& SA); + Standard_EXPORT static Handle(Geom_Axis2Placement) MakeAxis2Placement (const Handle(StepGeom_SuParameters)& SP); Standard_EXPORT static Handle(Geom2d_AxisPlacement) MakeAxisPlacement (const Handle(StepGeom_Axis2Placement2d)& SA); Standard_EXPORT static Handle(Geom_BoundedCurve) MakeBoundedCurve (const Handle(StepGeom_BoundedCurve)& SC); Standard_EXPORT static Handle(Geom2d_BoundedCurve) MakeBoundedCurve2d (const Handle(StepGeom_BoundedCurve)& SC); @@ -155,6 +160,7 @@ public: Standard_EXPORT static Handle(Geom2d_BSplineCurve) MakeTrimmedCurve2d (const Handle(StepGeom_TrimmedCurve)& SC); Standard_EXPORT static Handle(Geom_VectorWithMagnitude) MakeVectorWithMagnitude (const Handle(StepGeom_Vector)& SV); Standard_EXPORT static Handle(Geom2d_VectorWithMagnitude) MakeVectorWithMagnitude2d (const Handle(StepGeom_Vector)& SV); + Standard_EXPORT static Handle(TColStd_HArray1OfReal) MakeYprRotation(const StepKinematics_SpatialRotation& SR, const Handle(StepRepr_GlobalUnitAssignedContext)& theCntxt); }; #endif // _StepToGeom_HeaderFile diff --git a/src/TKSTEPAttr/PACKAGES b/src/TKSTEPAttr/PACKAGES index fcd9709c45..b6bf50c60d 100755 --- a/src/TKSTEPAttr/PACKAGES +++ b/src/TKSTEPAttr/PACKAGES @@ -2,3 +2,5 @@ StepVisual RWStepVisual StepDimTol RWStepDimTol +StepKinematics +RWStepKinematics From 296dbe8cc8ddcd8c9768e3f1152af743d152ce89 Mon Sep 17 00:00:00 2001 From: abulyche Date: Thu, 16 Sep 2021 09:29:49 +0300 Subject: [PATCH 066/639] 0031631: Modeling Algorithms - Invalid result of Pipe builder Added the ability to operate the algorithm with different types of curves. --- .../GeomFill_SweepSectionGenerator.cxx | 29 +++++++++++++++---- .../GeometryTest_SurfaceCommands.cxx | 18 ++++++++++-- tests/pipe/bugs/bug31631 | 24 +++++++++++++++ 3 files changed, 63 insertions(+), 8 deletions(-) create mode 100644 tests/pipe/bugs/bug31631 diff --git a/src/GeomFill/GeomFill_SweepSectionGenerator.cxx b/src/GeomFill/GeomFill_SweepSectionGenerator.cxx index ba5535c1d8..e3514cdfb5 100644 --- a/src/GeomFill/GeomFill_SweepSectionGenerator.cxx +++ b/src/GeomFill/GeomFill_SweepSectionGenerator.cxx @@ -338,7 +338,7 @@ void GeomFill_SweepSectionGenerator::Perform(const Standard_Boolean Polynomial) myFirstSect = GeomConvert::CurveToBSplineCurve(Circ,Convert_QuasiAngular); } - + if (myType <= 3 && myType >=1 ) { for (Standard_Integer i = 2; i <= myNbSections; i++) { @@ -605,16 +605,33 @@ void GeomFill_SweepSectionGenerator::Section Standard_Real Alpha = U - myAdpPath->FirstParameter(); Alpha /= myAdpPath->LastParameter() - myAdpPath->FirstParameter(); - Standard_Real U1 = - ( 1- Alpha) * myAdpFirstSect->FirstParameter() + - Alpha * myAdpFirstSect->LastParameter(); - + Standard_Real U1 = ( 1- Alpha) * myAdpFirstSect->FirstParameter() + + Alpha * myAdpFirstSect->LastParameter(); + + if (myAdpFirstSect->GetType() == GeomAbs_Line) + { + if (Precision::IsInfinite(myAdpFirstSect->FirstParameter()) || + Precision::IsInfinite(myAdpFirstSect->LastParameter())) + { + gp_Lin aLine = myAdpFirstSect->Line(); + U1 = ElCLib::Parameter(aLine, PPath); + } + } gp_Pnt P1 = myAdpFirstSect->Value(U1); Standard_Real U2 = ( 1- Alpha) * myAdpLastSect->FirstParameter() + Alpha * myAdpLastSect->LastParameter(); - + + if (myAdpLastSect->GetType() == GeomAbs_Line) + { + if (Precision::IsInfinite(myAdpLastSect->FirstParameter()) || + Precision::IsInfinite(myAdpLastSect->LastParameter())) + { + gp_Lin aLine = myAdpLastSect->Line(); + U2 = ElCLib::Parameter(aLine, PPath); + } + } gp_Pnt P2 = myAdpLastSect->Value(U2); gp_Ax2 Axis; diff --git a/src/GeometryTest/GeometryTest_SurfaceCommands.cxx b/src/GeometryTest/GeometryTest_SurfaceCommands.cxx index 58a0a620ba..5415293acc 100644 --- a/src/GeometryTest/GeometryTest_SurfaceCommands.cxx +++ b/src/GeometryTest/GeometryTest_SurfaceCommands.cxx @@ -207,6 +207,20 @@ static Standard_Integer tuyau (Draw_Interpretor& di, Pipe.Init(path, firstS, lastS); } else { + if (narg == 6 && !Option_NS && Draw::Atof(a[5]) != 0) + { + Handle(Geom_Curve) lastS = DrawTrSurf::GetCurve(a[isect + 1]); + Cont = GeomAbs_C2; + Pipe = GeomFill_Pipe(path, firstS, lastS, Draw::Atof(a[5])); + Pipe.Perform(Standard_True); + Handle(Geom_Surface) aSurface; + if (Pipe.IsDone()) + { + aSurface = Pipe.Surface(); + } + DrawTrSurf::Set(a[1], aSurface); + return 0; + } // tuyau a N sections, N>=2 TColGeom_SequenceOfCurve Seq; Seq.Clear(); @@ -399,12 +413,12 @@ void GeometryTest::SurfaceCommands(Draw_Interpretor& theCommands) theCommands.Add("tuyau", - "tuyau [-NS] result Path Curve/Radius [Curve2] [Curve3] ... \n the option -NS is used only with 2 sections.\n With it, is going from the first section to the last section \n Without, is a pipe by evolutive section ", + "tuyau [-NS] result Path Curve/Radius [Curve2] [Curve3] ... [Radius]\n the option -NS is used only with 2 sections.\n With it, is going from the first section to the last section \n Without, is a pipe by evolutive section ", __FILE__, tuyau,g); theCommands.Add("partuyau", - "tuyau result Path Curve/Radius [Curve2]\n the parametrization of the surface in the V direction will be as the Path", + "tuyau result Path Curve/Radius [Curve2] [Radius]\n the parametrization of the surface in the V direction will be as the Path", __FILE__, tuyau,g); diff --git a/tests/pipe/bugs/bug31631 b/tests/pipe/bugs/bug31631 new file mode 100644 index 0000000000..1b7d832ecf --- /dev/null +++ b/tests/pipe/bugs/bug31631 @@ -0,0 +1,24 @@ +puts "============" +puts "0031631: Modeling Algorithms - Invalid result of Pipe builder" +puts "============" +puts "" + +pload ALL + +restore [locate_data_file bug31631_1.brep] path +restore [locate_data_file bug31631_2.brep] sup1 +restore [locate_data_file bug31631_3.brep] sup2 + +tuyau res1 path sup1 sup2 6.35001275 + +tuyau res2 path sup2 sup1 6.35001275 + +mkface face1 res1 +mkface face2 res2 + +checkprops face1 -s 352.49 +checkprops face2 -s 352.49 + +checkview -display face1 -3d -path ${imagedir}/${test_image}.png + +puts "TEST COMPLETED" \ No newline at end of file From 5dd92c395a9e318b22dec72938963ded423ad37b Mon Sep 17 00:00:00 2001 From: asemenov Date: Fri, 17 Sep 2021 18:46:43 +0300 Subject: [PATCH 067/639] 0029478: Crash because bSplineSurfaceWithKnots is NULL. Modified the method void RWStepGeom_RWBSplineSurfaceWithKnotsAndRationalBSplineSurface::ReadStep Added processing B spline surface with knots and rational B spline surface with empty data in the name field Added test --- ...SurfaceWithKnotsAndRationalBSplineSurface.cxx | 16 +++++++++++----- tests/bugs/step/bug29478 | 11 +++++++++++ 2 files changed, 22 insertions(+), 5 deletions(-) create mode 100644 tests/bugs/step/bug29478 diff --git a/src/RWStepGeom/RWStepGeom_RWBSplineSurfaceWithKnotsAndRationalBSplineSurface.cxx b/src/RWStepGeom/RWStepGeom_RWBSplineSurfaceWithKnotsAndRationalBSplineSurface.cxx index 670c034a72..adc7ba26b3 100644 --- a/src/RWStepGeom/RWStepGeom_RWBSplineSurfaceWithKnotsAndRationalBSplineSurface.cxx +++ b/src/RWStepGeom/RWStepGeom_RWBSplineSurfaceWithKnotsAndRationalBSplineSurface.cxx @@ -261,15 +261,21 @@ void RWStepGeom_RWBSplineSurfaceWithKnotsAndRationalBSplineSurface::ReadStep // --- Instance of plex component RepresentationItem --- - if (!data->CheckNbParams(num,1,ach,"representation_item")) return; - // --- field : name --- Handle(TCollection_HAsciiString) aName; - //szv#4:S4163:12Mar99 `Standard_Boolean stat14 =` not needed - data->ReadString (num,1,"name",ach,aName); -// num = data->NextForComplex(num); + if (!data->CheckNbParams(num, 1, ach, "representation_item")) + { + aName = new TCollection_HAsciiString(""); + } + else + { + //szv#4:S4163:12Mar99 `Standard_Boolean stat14 =` not needed + data->ReadString(num, 1, "name", ach, aName); + } + + // num = data->NextForComplex(num); data->NamedForComplex("SURFACE", "SRFC",num0,num,ach); //--- Initialisation of the red entity --- diff --git a/tests/bugs/step/bug29478 b/tests/bugs/step/bug29478 new file mode 100644 index 0000000000..7b17780629 --- /dev/null +++ b/tests/bugs/step/bug29478 @@ -0,0 +1,11 @@ +puts "============" +puts "OCC29478" +puts "============" +puts "" +##################################################### +# Crash because bSplineSurfaceWithKnots is NULL +##################################################### + +set aFilePath [locate_data_file bug29478.stp] +testreadstep "$aFilePath" orig +checkshape orig From c9831764060f4ef248cc2316cd5919bd424c33b0 Mon Sep 17 00:00:00 2001 From: kgv Date: Tue, 21 Sep 2021 11:56:09 +0300 Subject: [PATCH 068/639] 0032580: Data Exchange, STL - add option splitting nodes at sharp corners Added Poly_MergeNodesTool tool for merging nodes within triangulation. Added RWStl_Reader::MergeAngle() property managing merging behavior. --- src/MeshTest/MeshTest.cxx | 153 +++++++++ src/Poly/FILES | 2 + src/Poly/Poly_MergeNodesTool.cxx | 486 ++++++++++++++++++++++++++++ src/Poly/Poly_MergeNodesTool.hxx | 358 ++++++++++++++++++++ src/RWStl/RWStl.cxx | 4 +- src/RWStl/RWStl.hxx | 16 +- src/RWStl/RWStl_Reader.cxx | 104 +++--- src/RWStl/RWStl_Reader.hxx | 23 ++ src/XSDRAWSTLVRML/XSDRAWSTLVRML.cxx | 34 +- tests/de_mesh/stl_read/B11 | 2 +- tests/de_mesh/stl_read/B13 | 2 +- tests/de_mesh/stl_read/B14 | 2 +- tests/de_mesh/stl_read/B6 | 2 +- tests/de_mesh/stl_read/C5 | 2 +- tests/de_mesh/stl_read/D2 | 29 ++ tests/de_mesh/stl_read/D3 | 33 ++ 16 files changed, 1190 insertions(+), 62 deletions(-) create mode 100644 src/Poly/Poly_MergeNodesTool.cxx create mode 100644 src/Poly/Poly_MergeNodesTool.hxx create mode 100644 tests/de_mesh/stl_read/D2 create mode 100644 tests/de_mesh/stl_read/D3 diff --git a/src/MeshTest/MeshTest.cxx b/src/MeshTest/MeshTest.cxx index 9a30ab38e6..234081dad9 100644 --- a/src/MeshTest/MeshTest.cxx +++ b/src/MeshTest/MeshTest.cxx @@ -41,6 +41,7 @@ #include #include #include +#include #include #include #include @@ -1431,6 +1432,150 @@ static Standard_Integer triedgepoints(Draw_Interpretor& di, Standard_Integer nba return 0; } +//======================================================================= +//function : TrMergeNodes +//purpose : +//======================================================================= +static Standard_Integer TrMergeNodes (Draw_Interpretor& theDI, Standard_Integer theNbArgs, const char** theArgVec) +{ + if (theNbArgs < 2) + { + theDI << "Syntax error: not enough arguments"; + return 1; + } + + TopoDS_Shape aShape = DBRep::Get (theArgVec[1]); + if (aShape.IsNull()) + { + theDI << "Syntax error: '" << theArgVec[1] << "' is not a shape"; + return 1; + } + + Standard_Real aMergeAngle = M_PI / 4.0, aMergeToler = 0.0; + bool toForce = false; + TCollection_AsciiString aResFace; + for (Standard_Integer anArgIter = 2; anArgIter < theNbArgs; ++anArgIter) + { + TCollection_AsciiString anArgCase (theArgVec[anArgIter]); + anArgCase.LowerCase(); + if (anArgIter + 1 < theNbArgs + && (anArgCase == "-angle" + || anArgCase == "-smoothangle" + || anArgCase == "-mergeangle") + && Draw::ParseReal (theArgVec[anArgIter + 1], aMergeAngle)) + { + if (aMergeAngle < 0.0 || aMergeAngle > 90.0) + { + theDI << "Syntax error: angle should be within [0,90] range"; + return 1; + } + + ++anArgIter; + aMergeAngle = aMergeAngle * M_PI / 180.0; + } + else if (anArgIter + 1 < theNbArgs + && anArgCase == "-tolerance" + && Draw::ParseReal (theArgVec[anArgIter + 1], aMergeToler)) + { + if (aMergeToler < 0.0) + { + theDI << "Syntax error: tolerance should be within >=0"; + return 1; + } + + ++anArgIter; + } + else if (anArgCase == "-force") + { + toForce = Draw::ParseOnOffIterator (theNbArgs, theArgVec, anArgIter); + } + else if (anArgIter + 1 < theNbArgs + && anArgCase == "-oneface") + { + aResFace = theArgVec[++anArgIter]; + } + else + { + theDI << "Syntax error at '" << theArgVec[anArgIter] << "'"; + return 1; + } + } + + Standard_Integer aNbNodesOld = 0, aNbTrisOld = 0; + Standard_Integer aNbNodesNew = 0, aNbTrisNew = 0; + if (!aResFace.IsEmpty()) + { + TopLoc_Location aFaceLoc; + Poly_MergeNodesTool aMergeTool (aMergeAngle, aMergeToler); + for (TopExp_Explorer aFaceIter (aShape, TopAbs_FACE); aFaceIter.More(); aFaceIter.Next()) + { + const TopoDS_Face& aFace = TopoDS::Face (aFaceIter.Value()); + Handle(Poly_Triangulation) aTris = BRep_Tool::Triangulation (aFace, aFaceLoc); + if (aTris.IsNull() + || aTris->NbNodes() < 3 + || aTris->NbTriangles() < 1) + { + continue; + } + + aNbNodesOld += aTris->NbNodes(); + aNbTrisOld += aTris->NbTriangles(); + aMergeTool.AddTriangulation (aTris, aFaceLoc, aFace.Orientation() == TopAbs_REVERSED); + } + Handle(Poly_Triangulation) aNewTris = aMergeTool.Result(); + if (aNewTris.IsNull()) + { + theDI << "Error: empty result"; + return 0; + } + + aNbNodesNew += aNewTris->NbNodes(); + aNbTrisNew += aNewTris->NbTriangles(); + TopoDS_Face aFace; + BRep_Builder().MakeFace (aFace, aNewTris); + DBRep::Set (aResFace.ToCString(), aFace); + } + else + { + TopTools_MapOfShape aProcessedFaces; + TopLoc_Location aDummy; + for (TopExp_Explorer aFaceIter (aShape, TopAbs_FACE); aFaceIter.More(); aFaceIter.Next()) + { + const TopoDS_Face& aFace = TopoDS::Face (aFaceIter.Value()); + if (!aProcessedFaces.Add (aFace.Located (TopLoc_Location()))) + { + continue; + } + + Handle(Poly_Triangulation) aTris = BRep_Tool::Triangulation (aFace, aDummy); + if (aTris.IsNull() + || aTris->NbNodes() < 3 + || aTris->NbTriangles() < 1) + { + continue; + } + + aNbNodesOld += aTris->NbNodes(); + aNbTrisOld += aTris->NbTriangles(); + Poly_MergeNodesTool aMergeTool (aMergeAngle, aMergeToler, aTris->NbTriangles()); + aMergeTool.AddTriangulation (aTris); + if (toForce + || aMergeTool.NbNodes() != aTris->NbNodes() + || aMergeTool.NbElements() != aTris->NbTriangles()) + { + BRep_Builder().UpdateFace (aFace, aMergeTool.Result(), false); + } + + aTris = BRep_Tool::Triangulation (aFace, aDummy); + aNbNodesNew += aTris->NbNodes(); + aNbTrisNew += aTris->NbTriangles(); + } + } + theDI << "Old, Triangles: " << aNbTrisOld << ", Nodes: " << aNbNodesOld << "\n"; + theDI << "New, Triangles: " << aNbTrisNew << ", Nodes: " << aNbNodesNew << "\n"; + return 0; +} + //======================================================================= //function : correctnormals //purpose : Corrects normals in shape triangulation nodes (...) @@ -1499,5 +1644,13 @@ void MeshTest::Commands(Draw_Interpretor& theCommands) "\n\t\t: '-loadSingleExact' - make loaded and active ONLY exactly specified triangulation. All other triangulations" "\n\t\t: will be unloaded. If triangulation with such Index doesn't exist do nothing", __FILE__, TrLateLoad, g); + theCommands.Add("trmergenodes", + "trmergenodes shapeName" + "\n\t\t: [-angle Angle] [-tolerance Value] [-oneFace Result]" + "\n\t\t: Merging nodes within triangulation data." + "\n\t\t: -angle merge angle upper limit in degrees; 45 when unspecified" + "\n\t\t: -tolerance linear tolerance to merge nodes; 0.0 when unspecified" + "\n\t\t: -oneFace create a new single Face with specified name for the whole triangulation", + __FILE__, TrMergeNodes, g); theCommands.Add("correctnormals", "correctnormals shape",__FILE__, correctnormals, g); } diff --git a/src/Poly/FILES b/src/Poly/FILES index ca4cdf3de8..46d643c57a 100755 --- a/src/Poly/FILES +++ b/src/Poly/FILES @@ -22,6 +22,8 @@ Poly_ListOfTriangulation.hxx Poly_MakeLoops.cxx Poly_MakeLoops.hxx Poly_MeshPurpose.hxx +Poly_MergeNodesTool.cxx +Poly_MergeNodesTool.hxx Poly_Polygon2D.cxx Poly_Polygon2D.hxx Poly_Polygon3D.cxx diff --git a/src/Poly/Poly_MergeNodesTool.cxx b/src/Poly/Poly_MergeNodesTool.cxx new file mode 100644 index 0000000000..40778ad17f --- /dev/null +++ b/src/Poly/Poly_MergeNodesTool.cxx @@ -0,0 +1,486 @@ +// Copyright (c) 2015-2021 OPEN CASCADE SAS +// +// This file is part of Open CASCADE Technology software library. +// +// This library is free software; you can redistribute it and/or modify it under +// the terms of the GNU Lesser General Public License version 2.1 as published +// by the Free Software Foundation, with special exception defined in the file +// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT +// distribution for complete text of the license and disclaimer of any warranty. +// +// Alternatively, this file may be used under the terms of Open CASCADE +// commercial license or contractual agreement. + +#include + +#include + +#include + +namespace +{ + //! Returns initial number of buckets for the map. + static int initialNbBuckets (int theNbFacets) + { + return theNbFacets > 0 + ? theNbFacets * 2 // consider ratio 1:2 (NbTriangles:MergedNodes) as expected + : 995329; // default initial value for mesh of unknown size + } +} + +IMPLEMENT_STANDARD_RTTIEXT(Poly_MergeNodesTool, Standard_Transient) + +//! Map node. +class Poly_MergeNodesTool::MergedNodesMap::DataMapNode : public NCollection_TListNode +{ +public: + //! Constructor. + DataMapNode (const NCollection_Vec3& thePos, + const NCollection_Vec3& theNorm, + int theItem, NCollection_ListNode* theNext) + : NCollection_TListNode (theItem, theNext), myKey (thePos, theNorm) {} + + //! Key. + const Poly_MergeNodesTool::Vec3AndNormal& Key() const { return myKey; } + + //! Static deleter to be passed to BaseMap + static void delNode (NCollection_ListNode* theNode, Handle(NCollection_BaseAllocator)& theAl) + { + ((DataMapNode* )theNode)->~DataMapNode(); + theAl->Free (theNode); + } + +private: + Poly_MergeNodesTool::Vec3AndNormal myKey; +}; + +// ======================================================================= +// function : MergedNodesMap +// purpose : +// ======================================================================= +Poly_MergeNodesTool::MergedNodesMap::MergedNodesMap (const int theNbBuckets) +: NCollection_BaseMap (theNbBuckets, true, new NCollection_IncAllocator()), + myTolerance(0.0f), + myInvTol (0.0f), + myAngle (1.0f), + myAngleCos (0.0f), + myToMergeOpposite (false) +{ + // +} + +// ======================================================================= +// function : MergedNodesMap::SetMergeTolerance +// purpose : +// ======================================================================= +void Poly_MergeNodesTool::MergedNodesMap::SetMergeTolerance (double theTolerance) +{ + myTolerance = (float )theTolerance; + myInvTol = 0.0f; + if (myTolerance > 0.0f) + { + myInvTol = float(1.0 / theTolerance); + } +} + +// ======================================================================= +// function : MergedNodesMap::hashCode +// purpose : +// ======================================================================= +inline int Poly_MergeNodesTool::MergedNodesMap::vec3iHashCode (const Poly_MergeNodesTool::MergedNodesMap::CellVec3i& theVec, + const int theUpper) +{ + // copied from NCollection_CellFilter + const uint64_t aShiftBits = (BITS(int64_t)-1) / 3; + uint64_t aHashCode = 0; + aHashCode = (aHashCode << aShiftBits) ^ theVec[0]; + aHashCode = (aHashCode << aShiftBits) ^ theVec[1]; + aHashCode = (aHashCode << aShiftBits) ^ theVec[2]; + return IntegerHashCode(aHashCode, 0x7fffffffffffffff, theUpper); +} + +// ======================================================================= +// function : MergedNodesMap::hashCode +// purpose : +// ======================================================================= +inline int Poly_MergeNodesTool::MergedNodesMap::hashCode (const NCollection_Vec3& thePos, + const NCollection_Vec3& theNorm, + const int theUpper) const +{ + (void )theNorm; + if (myInvTol <= 0.0f) + { + return ::HashCode (::HashCodes ((Standard_CString )&thePos, sizeof(NCollection_Vec3)), theUpper); + } + + const CellVec3i anIndex = vec3ToCell (thePos); + return vec3iHashCode (anIndex, theUpper); +} + +// ======================================================================= +// function : MergedNodesMap::vec3AreEqual +// purpose : +// ======================================================================= +inline bool Poly_MergeNodesTool::MergedNodesMap::vec3AreEqual (const NCollection_Vec3& theKey1, + const NCollection_Vec3& theKey2) const +{ + if (myInvTol <= 0.0f) + { + return theKey1.IsEqual (theKey2); + } + + /// tolerance should be smaller than triangle size to avoid artifacts + //const CellVec3i anIndex1 = vec3ToCell (theKey1); + //const CellVec3i anIndex2 = vec3ToCell (theKey2); + //return anIndex1.IsEqual (anIndex2); + + float aVal = theKey1.x() - theKey2.x(); + if (aVal < 0) { aVal = -aVal; } + if (aVal > myTolerance) { return false; } + aVal = theKey1.y() - theKey2.y(); + if (aVal < 0) { aVal = -aVal; } + if (aVal > myTolerance) { return false; } + aVal = theKey1.z() - theKey2.z(); + if (aVal < 0) { aVal = -aVal; } + if (aVal > myTolerance) { return false; } + return true; +} + +// ======================================================================= +// function : MergedNodesMap::isEqual +// purpose : +// ======================================================================= +inline bool Poly_MergeNodesTool::MergedNodesMap::isEqual (const Vec3AndNormal& theKey1, + const NCollection_Vec3& thePos2, + const NCollection_Vec3& theNorm2, + bool& theIsOpposite) const +{ + if (!vec3AreEqual (theKey1.Pos, thePos2)) + { + return false; + } + + const float aCosinus = theKey1.Norm.Dot (theNorm2); + if (aCosinus >= myAngleCos) + { + //theIsOpposite = false; + return true; + } + else if (myToMergeOpposite + && aCosinus <= -myAngleCos) + { + theIsOpposite = true; + return true; + } + return false; +} + +// ======================================================================= +// function : MergedNodesMap::Bind +// purpose : +// ======================================================================= +inline bool Poly_MergeNodesTool::MergedNodesMap::Bind (int& theIndex, + bool& theIsOpposite, + const NCollection_Vec3& thePos, + const NCollection_Vec3& theNorm) +{ + if (Resizable()) + { + ReSize (Extent()); + } + + DataMapNode** aData = (DataMapNode** )myData1; + const int aHash = hashCode (thePos, theNorm, NbBuckets()); + for (DataMapNode* aNodeIter = aData[aHash]; aNodeIter != NULL; + aNodeIter = (DataMapNode* )aNodeIter->Next()) + { + if (isEqual (aNodeIter->Key(), thePos, theNorm, theIsOpposite)) + { + theIndex = aNodeIter->ChangeValue(); + return false; + } + } + if (myInvTol > 0.0f) + { + static const CellVec3i THE_NEIGHBRS[26] = + { + CellVec3i(-1, 0, 0),CellVec3i( 1, 0, 0),CellVec3i( 0,-1, 0),CellVec3i( 0, 1, 0),CellVec3i( 0, 0,-1),CellVec3i( 0, 0, 1), + CellVec3i(-1,-1, 0),CellVec3i( 1,-1, 0),CellVec3i( 1, 1, 0),CellVec3i(-1, 1, 0), + CellVec3i( 0,-1,-1),CellVec3i( 0, 1,-1),CellVec3i( 0, 1, 1),CellVec3i( 0,-1, 1), + CellVec3i(-1, 0,-1),CellVec3i( 1, 0,-1),CellVec3i( 1, 0, 1),CellVec3i(-1, 0, 1), + CellVec3i(-1,-1,-1),CellVec3i( 1,-1,-1),CellVec3i(-1, 1,-1),CellVec3i( 1, 1,-1),CellVec3i(-1,-1, 1),CellVec3i( 1,-1, 1),CellVec3i(-1, 1, 1),CellVec3i(1, 1, 1) + }; + const CellVec3i anIndexCnt = vec3ToCell (thePos); + for (int aNeigIter = 0; aNeigIter < 26; ++aNeigIter) + { + const CellVec3i anIndex = anIndexCnt + THE_NEIGHBRS[aNeigIter]; + const int aHashEx = vec3iHashCode (anIndex, NbBuckets()); + for (DataMapNode* aNodeIter = aData[aHashEx]; aNodeIter != NULL; + aNodeIter = (DataMapNode* )aNodeIter->Next()) + { + if (isEqual (aNodeIter->Key(), thePos, theNorm, theIsOpposite)) + { + theIndex = aNodeIter->ChangeValue(); + return false; + } + } + } + } + //theIsOpposite = false; + aData[aHash] = new (this->myAllocator) DataMapNode (thePos, theNorm, theIndex, aData[aHash]); + Increment(); + return true; +} + +// ======================================================================= +// function : MergedNodesMap::ReSize +// purpose : +// ======================================================================= +inline void Poly_MergeNodesTool::MergedNodesMap::ReSize (const int theSize) +{ + NCollection_ListNode** aNewData = NULL; + NCollection_ListNode** aDummy = NULL; + int aNbNewBuck = 0; + if (BeginResize (theSize, aNbNewBuck, aNewData, aDummy)) + { + if (DataMapNode** anOldData = (DataMapNode** )myData1) + { + for (int anOldBuckIter = 0; anOldBuckIter <= NbBuckets(); ++anOldBuckIter) + { + for (DataMapNode* anOldNodeIter = anOldData[anOldBuckIter]; anOldNodeIter != NULL; ) + { + const Standard_Integer aNewHash = hashCode (anOldNodeIter->Key(), aNbNewBuck); + DataMapNode* aNextNode = (DataMapNode* )anOldNodeIter->Next(); + anOldNodeIter->Next() = aNewData[aNewHash]; + aNewData[aNewHash] = anOldNodeIter; + anOldNodeIter = aNextNode; + } + } + } + EndResize (theSize, aNbNewBuck, aNewData, aDummy); + } +} + +// ======================================================================= +// function : Poly_MergeNodesTool +// purpose : +// ======================================================================= +Poly_MergeNodesTool::Poly_MergeNodesTool (const double theSmoothAngle, + const double theMergeTolerance, + const int theNbFacets) +: myPolyData (new Poly_Triangulation()), + myNodeIndexMap ((theSmoothAngle > 0.0 + || theMergeTolerance > 0.0) + ? initialNbBuckets (theNbFacets) + : 1), + myNodeInds (0, 0, 0, -1), + myTriNormal (0.0f, 0.0f, 1.0f), + myUnitFactor (1.0), + myNbNodes (0), + myNbElems (0), + myNbDegenElems (0), + myNbMergedElems (0), + myToDropDegenerative (true), + myToMergeElems (false) +{ + SetMergeAngle (theSmoothAngle); + SetMergeTolerance (theMergeTolerance); +} + +// ======================================================================= +// function : AddElement +// purpose : +// ======================================================================= +void Poly_MergeNodesTool::AddElement (const gp_XYZ* theElemNodes, + int theNbNodes) +{ + if (theNbNodes != 3 + && theNbNodes != 4) + { + throw Standard_ProgramError ("Poly_MergeNodesTool::AddElement() - Internal error"); + } + + myPlaces[0] = theElemNodes[0]; + myPlaces[1] = theElemNodes[1]; + myPlaces[2] = theElemNodes[2]; + if (theNbNodes == 4) + { + myPlaces[3] = theElemNodes[3]; + } + PushLastElement (theNbNodes); +} + +// ======================================================================= +// function : PushLastElement +// purpose : +// ======================================================================= +void Poly_MergeNodesTool::PushLastElement (int theNbNodes) +{ + if (theNbNodes != 3 + && theNbNodes != 4) + { + throw Standard_ProgramError ("Poly_MergeNodesTool::PushLastElement() - Internal error"); + } + + bool isOpposite = false; + myNodeInds[3] = -1; + if (myNodeIndexMap.HasMergeAngle() + || myNodeIndexMap.HasMergeTolerance()) + { + if (!myNodeIndexMap.ToMergeAnyAngle()) + { + myTriNormal = computeTriNormal(); + } + + pushNodeCheck (isOpposite, 0); + pushNodeCheck (isOpposite, 1); + pushNodeCheck (isOpposite, 2); + if (theNbNodes == 4) + { + pushNodeCheck (isOpposite, 3); + } + } + else + { + pushNodeNoMerge (0); + pushNodeNoMerge (1); + pushNodeNoMerge (2); + if (theNbNodes == 4) + { + pushNodeNoMerge (3); + } + } + + if (myToDropDegenerative) + { + // warning - removing degenerate elements may produce unused nodes + if (myNodeInds[0] == myNodeInds[1] + || myNodeInds[0] == myNodeInds[2] + || myNodeInds[1] == myNodeInds[2]) + { + if (theNbNodes == 4) + { + // + } + else + { + ++myNbDegenElems; + return; + } + } + } + + if (myToMergeElems) + { + NCollection_Vec4 aSorted = myNodeInds; + std::sort (aSorted.ChangeData(), aSorted.ChangeData() + theNbNodes); + if (!myElemMap.Add (aSorted)) + { + ++myNbMergedElems; + return; + } + } + + ++myNbElems; + if (!myPolyData.IsNull()) + { + if (myPolyData->NbTriangles() < myNbElems) + { + myPolyData->ResizeTriangles (myNbElems * 2, true); + } + myPolyData->SetTriangle (myNbElems, Poly_Triangle (myNodeInds[0] + 1, myNodeInds[1] + 1, myNodeInds[2] + 1)); + if (theNbNodes == 4) + { + ++myNbElems; + if (myPolyData->NbTriangles() < myNbElems) + { + myPolyData->ResizeTriangles (myNbElems * 2, true); + } + myPolyData->SetTriangle (myNbElems, Poly_Triangle (myNodeInds[0] + 1, myNodeInds[2] + 1, myNodeInds[3] + 1)); + } + } +} + +// ======================================================================= +// function : AddTriangulation +// purpose : +// ======================================================================= +void Poly_MergeNodesTool::AddTriangulation (const Handle(Poly_Triangulation)& theTris, + const gp_Trsf& theTrsf, + const Standard_Boolean theToReverse) +{ + if (theTris.IsNull()) + { + return; + } + + if (!myPolyData.IsNull() + && myPolyData->NbNodes() == 0) + { + // preallocate optimistically + myPolyData->SetDoublePrecision (theTris->IsDoublePrecision()); + myPolyData->ResizeNodes (theTris->NbNodes(), false); + myPolyData->ResizeTriangles (theTris->NbTriangles(), false); + } + + for (int anElemIter = 1; anElemIter <= theTris->NbTriangles(); ++anElemIter) + { + Poly_Triangle anElem = theTris->Triangle (anElemIter); + if (theToReverse) + { + anElem = Poly_Triangle (anElem.Value (1), anElem.Value (3), anElem.Value (2)); + } + for (int aTriNodeIter = 0; aTriNodeIter < 3; ++aTriNodeIter) + { + const gp_Pnt aNode = theTris->Node (anElem.Value (aTriNodeIter + 1)).Transformed (theTrsf); + myPlaces[aTriNodeIter] = aNode.XYZ(); + } + PushLastTriangle(); + } +} + +// ======================================================================= +// function : Result +// purpose : +// ======================================================================= +Handle(Poly_Triangulation) Poly_MergeNodesTool::Result() +{ + if (myPolyData.IsNull()) + { + return Handle(Poly_Triangulation)(); + } + + // compress data + myPolyData->ResizeNodes (myNbNodes, true); + myPolyData->ResizeTriangles(myNbElems, true); + return myPolyData; +} + +// ======================================================================= +// function : MergeNodes +// purpose : +// ======================================================================= +Handle(Poly_Triangulation) Poly_MergeNodesTool::MergeNodes (const Handle(Poly_Triangulation)& theTris, + const gp_Trsf& theTrsf, + const Standard_Boolean theToReverse, + const double theSmoothAngle, + const double theMergeTolerance, + const bool theToForce) +{ + if (theTris.IsNull() + || theTris->NbNodes() < 3 + || theTris->NbTriangles() < 1) + { + return Handle(Poly_Triangulation)(); + } + + Poly_MergeNodesTool aMergeTool (theSmoothAngle, theMergeTolerance, theTris->NbTriangles()); + aMergeTool.AddTriangulation (theTris, theTrsf, theToReverse); + if (!theToForce + && aMergeTool.NbNodes() == theTris->NbNodes() + && aMergeTool.NbElements() == theTris->NbTriangles()) + { + return Handle(Poly_Triangulation)(); + } + return aMergeTool.Result(); +} diff --git a/src/Poly/Poly_MergeNodesTool.hxx b/src/Poly/Poly_MergeNodesTool.hxx new file mode 100644 index 0000000000..6c3cae76ef --- /dev/null +++ b/src/Poly/Poly_MergeNodesTool.hxx @@ -0,0 +1,358 @@ +// Copyright (c) 2015-2021 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 _Poly_MergeNodesTool_HeaderFile +#define _Poly_MergeNodesTool_HeaderFile + +#include +#include +#include +#include + +//! Auxiliary tool for merging triangulation nodes for visualization purposes. +//! Tool tries to merge all nodes within input triangulation, but split the ones on sharp corners at specified angle. +class Poly_MergeNodesTool : public Standard_Transient +{ + DEFINE_STANDARD_RTTIEXT(Poly_MergeNodesTool, Standard_Transient) +public: + + //! Merge nodes of existing mesh and return the new mesh. + //! @param[in] theTris triangulation to add + //! @param[in] theTrsf transformation to apply + //! @param[in] theToReverse reverse triangle nodes order + //! @param[in] theSmoothAngle merge angle in radians + //! @param[in] theMergeTolerance linear merge tolerance + //! @param[in] theToForce return merged triangulation even if it's statistics is equal to input one + //! @return merged triangulation or NULL on no result + Standard_EXPORT static Handle(Poly_Triangulation) MergeNodes (const Handle(Poly_Triangulation)& theTris, + const gp_Trsf& theTrsf, + const Standard_Boolean theToReverse, + const double theSmoothAngle, + const double theMergeTolerance = 0.0, + const bool theToForce = true); + +public: + + //! Constructor + //! @param[in] theSmoothAngle smooth angle in radians or 0.0 to disable merging by angle + //! @param[in] theMergeTolerance node merging maximum distance + //! @param[in] theNbFacets estimated number of facets for map preallocation + Standard_EXPORT Poly_MergeNodesTool (const double theSmoothAngle, + const double theMergeTolerance = 0.0, + const int theNbFacets = -1); + + //! Return merge tolerance; 0.0 by default (only 3D points with exactly matching coordinates are merged). + double MergeTolerance() const { return myNodeIndexMap.MergeTolerance(); } + + //! Set merge tolerance. + void SetMergeTolerance (double theTolerance) { myNodeIndexMap.SetMergeTolerance (theTolerance); } + + //! Return merge angle in radians; 0.0 by default (normals with non-exact directions are not merged). + double MergeAngle() const { return myNodeIndexMap.MergeAngle(); } + + //! Set merge angle. + void SetMergeAngle (double theAngleRad) { myNodeIndexMap.SetMergeAngle (theAngleRad); } + + //! Return TRUE if nodes with opposite normals should be merged; FALSE by default. + bool ToMergeOpposite() const { return myNodeIndexMap.ToMergeOpposite(); } + + //! Set if nodes with opposite normals should be merged. + void SetMergeOpposite (bool theToMerge) { myNodeIndexMap.SetMergeOpposite (theToMerge); } + + //! Setup unit factor. + void SetUnitFactor (double theUnitFactor) { myUnitFactor = theUnitFactor; } + + //! Return TRUE if degenerate elements should be discarded; TRUE by default. + bool ToDropDegenerative() const { return myToDropDegenerative; } + + //! Set if degenerate elements should be discarded. + void SetDropDegenerative (bool theToDrop) { myToDropDegenerative = theToDrop; } + + //! Return TRUE if equal elements should be filtered; FALSE by default. + bool ToMergeElems() const { return myToMergeElems; } + + //! Set if equal elements should be filtered. + void SetMergeElems (bool theToMerge) { myToMergeElems = theToMerge; } + + //! Compute normal for the mesh element. + NCollection_Vec3 computeTriNormal() const + { + const gp_XYZ aVec01 = myPlaces[1] - myPlaces[0]; + const gp_XYZ aVec02 = myPlaces[2] - myPlaces[0]; + const gp_XYZ aCross = aVec01 ^ aVec02; + NCollection_Vec3 aNorm ((float )aCross.X(), (float )aCross.Y(), (float )aCross.Z()); + return aNorm.Normalized(); + } + +public: + + //! Add another triangulation to created one. + //! @param[in] theTris triangulation to add + //! @param[in] theTrsf transformation to apply + //! @param[in] theToReverse reverse triangle nodes order + Standard_EXPORT virtual void AddTriangulation (const Handle(Poly_Triangulation)& theTris, + const gp_Trsf& theTrsf = gp_Trsf(), + const Standard_Boolean theToReverse = false); + + //! Prepare and return result triangulation (temporary data will be truncated to result size). + Standard_EXPORT Handle(Poly_Triangulation) Result(); + +public: + + //! Add new triangle. + //! @param[in] theElemNodes 3 element nodes + void AddTriangle (const gp_XYZ theElemNodes[3]) + { + AddElement (theElemNodes, 3); + } + + //! Add new quad. + //! @param[in] theElemNodes 4 element nodes + void AddQuad (const gp_XYZ theElemNodes[4]) + { + AddElement (theElemNodes, 4); + } + + //! Add new triangle or quad. + //! @param[in] theElemNodes element nodes + //! @param[in] theNbNodes number of element nodes, should be 3 or 4 + Standard_EXPORT void AddElement (const gp_XYZ* theElemNodes, + int theNbNodes); + + //! Change node coordinates of element to be pushed. + //! @param[in] theIndex node index within current element, in 0..3 range + gp_XYZ& ChangeElementNode (int theIndex) { return myPlaces[theIndex]; } + + //! Add new triangle or quad with nodes specified by ChangeElementNode(). + Standard_EXPORT void PushLastElement (int theNbNodes); + + //! Add new triangle with nodes specified by ChangeElementNode(). + void PushLastTriangle() { PushLastElement (3); } + + //! Add new quad with nodes specified by ChangeElementNode(). + void PushLastQuad() { PushLastElement (4); } + + //! Return current element node index defined by PushLastElement(). + Standard_Integer ElementNodeIndex (int theIndex) const { return myNodeInds[theIndex]; } + + //! Return number of nodes. + int NbNodes() const { return myNbNodes; } + + //! Return number of elements. + int NbElements() const { return myNbElems; } + + //! Return number of discarded degenerate elements. + int NbDegenerativeElems() const { return myNbDegenElems; } + + //! Return number of merged equal elements. + int NbMergedElems() const { return myNbMergedElems; } + + //! Setup output triangulation for modifications. + //! When set to NULL, the tool could be used as a merge map for filling in external mesh structure. + Handle(Poly_Triangulation)& ChangeOutput() { return myPolyData; } + +private: + + //! Push triangle node with normal angle comparison. + void pushNodeCheck (bool& theIsOpposite, + const int theTriNode) + { + int aNodeIndex = myNbNodes; + const gp_XYZ& aPlace = myPlaces[theTriNode]; + const NCollection_Vec3 aVec3 ((float )aPlace.X(), (float )aPlace.Y(), (float )aPlace.Z()); + if (myNodeIndexMap.Bind (aNodeIndex, theIsOpposite, aVec3, myTriNormal)) + { + ++myNbNodes; + if (!myPolyData.IsNull()) + { + if (myPolyData->NbNodes() < myNbNodes) + { + myPolyData->ResizeNodes (myNbNodes * 2, true); + } + myPolyData->SetNode (myNbNodes, aPlace * myUnitFactor); + } + } + myNodeInds[theTriNode] = aNodeIndex; + } + + //! Push triangle node without merging vertices. + inline void pushNodeNoMerge (const int theTriNode) + { + int aNodeIndex = myNbNodes; + const gp_XYZ aPlace = myPlaces[theTriNode] * myUnitFactor; + + ++myNbNodes; + if (!myPolyData.IsNull()) + { + if (myPolyData->NbNodes() < myNbNodes) + { + myPolyData->ResizeNodes (myNbNodes * 2, true); + } + myPolyData->SetNode (myNbNodes, aPlace); + } + + myNodeInds[theTriNode] = aNodeIndex; + } + +private: + + //! Pair holding Vec3 and Normal to the triangle + struct Vec3AndNormal + { + NCollection_Vec3 Pos; //!< position + NCollection_Vec3 Norm; //!< normal to the element + + Vec3AndNormal (const NCollection_Vec3& thePos, + const NCollection_Vec3& theNorm) + : Pos (thePos), Norm (theNorm) {} + }; + + //! Custom map class with key as Node + element normal and value as Node index. + //! NCollection_DataMap is not used, as it requires Hasher to be defined as class template and not class field. + class MergedNodesMap : public NCollection_BaseMap + { + public: + typedef NCollection_Vec3 CellVec3i; + public: + //! Main constructor. + Standard_EXPORT MergedNodesMap (const int theNbBuckets); + + //! Return merge angle in radians; + double MergeAngle() const { return myAngle; } + + //! Set merge angle. + void SetMergeAngle (double theAngleRad) + { + myAngle = (float )theAngleRad; + myAngleCos = (float )Cos (theAngleRad); + } + + //! Return TRUE if merge angle is non-zero. + //! 0 angle means angles should much without a tolerance. + bool HasMergeAngle() const { return myAngle > 0.0f; } + + //! Return TRUE if merge angle comparison can be skipped (angle is close to 90 degrees). + bool ToMergeAnyAngle() const { return myAngleCos <= 0.01f; } + + //! Return TRUE if nodes with opposite normals should be merged; FALSE by default. + bool ToMergeOpposite() const { return myToMergeOpposite; } + + //! Set if nodes with opposite normals should be merged. + void SetMergeOpposite (bool theToMerge) { myToMergeOpposite = theToMerge; } + + //! Return merge tolerance. + double MergeTolerance() const { return myTolerance; } + + //! Set merge tolerance. + Standard_EXPORT void SetMergeTolerance (double theTolerance); + + //! Return TRUE if merge tolerance is non-zero. + bool HasMergeTolerance() const { return myTolerance > 0.0f; } + + //! Bind node to the map or find existing one. + //! @param theIndex [in,out] index of new key to add, or index of existing key, if already bound + //! @param theIsOpposite [out] flag indicating that existing (already bound) node has opposite direction + //! @param thePos [in] node position to add or find + //! @param theNorm [in] element normal for equality check + //! @return TRUE if node was not bound already + Standard_EXPORT bool Bind (int& theIndex, + bool& theIsOpposite, + const NCollection_Vec3& thePos, + const NCollection_Vec3& theNorm); + + //! ReSize the map. + Standard_EXPORT void ReSize (const int theSize); + + private: + + //! Return cell index for specified 3D point and inverted cell size. + CellVec3i vec3ToCell (const NCollection_Vec3& thePnt) const + { + return CellVec3i (thePnt * myInvTol); + } + + //! Hash code for integer vec3. + Standard_EXPORT static int vec3iHashCode (const Poly_MergeNodesTool::MergedNodesMap::CellVec3i& theVec, + const int theUpper); + + //! Compute hash code. + Standard_EXPORT int hashCode (const NCollection_Vec3& thePos, + const NCollection_Vec3& theNorm, + const int theUpper) const; + + //! Compute hash code. + int hashCode (const Vec3AndNormal& theKey, const int theUpper) const + { + return hashCode (theKey.Pos, theKey.Norm, theUpper); + } + + //! Compare two vectors with inversed tolerance. + Standard_EXPORT bool vec3AreEqual (const NCollection_Vec3& theKey1, + const NCollection_Vec3& theKey2) const; + + //! Compare two nodes. + Standard_EXPORT bool isEqual (const Vec3AndNormal& theKey1, + const NCollection_Vec3& thePos2, + const NCollection_Vec3& theNorm2, + bool& theIsOpposite) const; + private: + //! Map node. + class DataMapNode; + private: + float myTolerance; //!< linear tolerance for comparison + float myInvTol; //!< inversed linear tolerance for comparison + float myAngle; //!< angle for comparison + float myAngleCos; //!< angle cosine for comparison + bool myToMergeOpposite; //!< merge nodes with opposite normals + }; + + //! Hasher for merging equal elements (with pre-sorted indexes). + struct MergedElemHasher + { + static int HashCode (const NCollection_Vec4& theVec, const int theUpper) + { + unsigned int aHashCode = 0; + aHashCode = aHashCode ^ ::HashCode (theVec[0], theUpper); + aHashCode = aHashCode ^ ::HashCode (theVec[1], theUpper); + aHashCode = aHashCode ^ ::HashCode (theVec[2], theUpper); + aHashCode = aHashCode ^ ::HashCode (theVec[3], theUpper); + return ((aHashCode & 0x7fffffff) % theUpper) + 1; + } + + static bool IsEqual (const NCollection_Vec4& theKey1, const NCollection_Vec4& theKey2) + { + return theKey1.IsEqual (theKey2); + } + }; + +private: + + Handle(Poly_Triangulation) myPolyData; //!< output triangulation + MergedNodesMap myNodeIndexMap; //!< map of merged nodes + NCollection_Map, MergedElemHasher> + myElemMap; //!< map of elements + NCollection_Vec4 myNodeInds; //!< current element indexes + NCollection_Vec3 myTriNormal; //!< current triangle normal + gp_XYZ myPlaces[4]; //!< current triangle/quad coordinates to push + + Standard_Real myUnitFactor; //!< scale factor to apply + Standard_Integer myNbNodes; //!< number of output nodes + Standard_Integer myNbElems; //!< number of output elements + Standard_Integer myNbDegenElems; //!< number of degenerated elements + Standard_Integer myNbMergedElems; //!< number of merged elements + Standard_Boolean myToDropDegenerative; //!< flag to filter our degenerate elements + Standard_Boolean myToMergeElems; //!< flag to merge elements + +}; + +#endif // _Poly_MergeNodesTool_HeaderFile diff --git a/src/RWStl/RWStl.cxx b/src/RWStl/RWStl.cxx index c830d7715c..7febb29540 100644 --- a/src/RWStl/RWStl.cxx +++ b/src/RWStl/RWStl.cxx @@ -107,13 +107,15 @@ namespace } //============================================================================= -//function : Read +//function : ReadFile //purpose : //============================================================================= Handle(Poly_Triangulation) RWStl::ReadFile (const Standard_CString theFile, + const Standard_Real theMergeAngle, const Message_ProgressRange& theProgress) { Reader aReader; + aReader.SetMergeAngle (theMergeAngle); aReader.Read (theFile, theProgress); // note that returned bool value is ignored intentionally -- even if something went wrong, // but some data have been read, we at least will return these data diff --git a/src/RWStl/RWStl.hxx b/src/RWStl/RWStl.hxx index 3fc8043ebd..d513ce1a69 100644 --- a/src/RWStl/RWStl.hxx +++ b/src/RWStl/RWStl.hxx @@ -43,12 +43,24 @@ public: //! Read specified STL file and returns its content as triangulation. //! In case of error, returns Null handle. Standard_EXPORT static Handle(Poly_Triangulation) ReadFile (const OSD_Path& theFile, - const Message_ProgressRange& aProgInd = Message_ProgressRange()); + const Message_ProgressRange& theProgress = Message_ProgressRange()); //! Read specified STL file and returns its content as triangulation. //! In case of error, returns Null handle. + static Handle(Poly_Triangulation) ReadFile (const Standard_CString theFile, + const Message_ProgressRange& theProgress = Message_ProgressRange()) + { + return ReadFile (theFile, M_PI / 2.0, theProgress); + } + + //! Read specified STL file and returns its content as triangulation. + //! @param[in] theFile file path to read + //! @param[in] theMergeAngle maximum angle in radians between triangles to merge equal nodes; M_PI/2 means ignore angle + //! @param[in] theProgress progress indicator + //! @return result triangulation or NULL in case of error Standard_EXPORT static Handle(Poly_Triangulation) ReadFile (const Standard_CString theFile, - const Message_ProgressRange& aProgInd = Message_ProgressRange()); + const Standard_Real theMergeAngle, + const Message_ProgressRange& theProgress = Message_ProgressRange()); //! Read triangulation from a binary STL file //! In case of error, returns Null handle. diff --git a/src/RWStl/RWStl_Reader.cxx b/src/RWStl/RWStl_Reader.cxx index 69a70dcc3b..85dc4f7b4d 100644 --- a/src/RWStl/RWStl_Reader.cxx +++ b/src/RWStl/RWStl_Reader.cxx @@ -24,6 +24,7 @@ #include #include #include +#include #include #include @@ -43,53 +44,50 @@ namespace static const size_t THE_BUFFER_SIZE = 1024; //! Auxiliary tool for merging nodes during STL reading. - class MergeNodeTool + class MergeNodeTool : public Poly_MergeNodesTool { public: //! Constructor - MergeNodeTool (RWStl_Reader* theReader) - : myReader (theReader), - myMap (1024, new NCollection_IncAllocator (1024 * 1024)) + MergeNodeTool (RWStl_Reader* theReader, + const Standard_Integer theNbFacets = -1) + : Poly_MergeNodesTool (theReader->MergeAngle(), 0.0, theNbFacets), + myReader (theReader), + myNodeIndexMap (1024, new NCollection_IncAllocator (1024 * 1024)) { + // avoid redundant allocations as final triangulation is managed by RWStl_Reader subclass + ChangeOutput().Nullify(); } //! Add new triangle - int AddNode (double theX, double theY, double theZ) + void AddTriangle (const gp_XYZ theElemNodes[3]) { - // use existing node if found at the same point - gp_XYZ aPnt (theX, theY, theZ); + Poly_MergeNodesTool::AddTriangle (theElemNodes); - Standard_Integer anIndex = -1; - if (myMap.Find (aPnt, anIndex)) + // remap node indices returned by RWStl_Reader::AddNode(); + // this is a waste of time for most cases of sequential index adding, but preserved for keeping RWStl_Reader interface + int aNodesSrc[3] = { ElementNodeIndex (0), ElementNodeIndex (1), ElementNodeIndex (2) }; + int aNodesRes[3] = { -1, -1, -1 }; + for (int aNodeIter = 0; aNodeIter < 3; ++aNodeIter) { - return anIndex; + // use existing node if found at the same point + if (!myNodeIndexMap.Find (aNodesSrc[aNodeIter], aNodesRes[aNodeIter])) + { + aNodesRes[aNodeIter] = myReader->AddNode (theElemNodes[aNodeIter]); + myNodeIndexMap.Bind (aNodesSrc[aNodeIter], aNodesRes[aNodeIter]); + } + } + if (aNodesRes[0] != aNodesRes[1] + && aNodesRes[1] != aNodesRes[2] + && aNodesRes[2] != aNodesRes[0]) + { + myReader->AddTriangle (aNodesRes[0], aNodesRes[1], aNodesRes[2]); } - - anIndex = myReader->AddNode (aPnt); - myMap.Bind (aPnt, anIndex); - return anIndex; - } - - public: - - static Standard_Boolean IsEqual (const gp_XYZ& thePnt1, const gp_XYZ& thePnt2) - { - return (thePnt1 - thePnt2).SquareModulus() < Precision::SquareConfusion(); - } - - //! Computes a hash code for the point, in the range [1, theUpperBound] - //! @param thePoint the point which hash code is to be computed - //! @param theUpperBound the upper bound of the range a computing hash code must be within - //! @return a computed hash code, in the range [1, theUpperBound] - static Standard_Integer HashCode (const gp_XYZ& thePoint, const Standard_Integer theUpperBound) - { - return ::HashCode (thePoint.X() * M_LN10 + thePoint.Y() * M_PI + thePoint.Z() * M_E, theUpperBound); } private: RWStl_Reader* myReader; - NCollection_DataMap myMap; + NCollection_DataMap myNodeIndexMap; }; //! Read a Little Endian 32 bits float @@ -124,10 +122,20 @@ namespace } //============================================================================== -//function : Read +//function : RWStl_Reader //purpose : //============================================================================== +RWStl_Reader::RWStl_Reader() +: myMergeAngle (M_PI/2.0), + myMergeTolearance (0.0) +{ + // +} +//============================================================================== +//function : Read +//purpose : +//============================================================================== Standard_Boolean RWStl_Reader::Read (const char* theFile, const Message_ProgressRange& theProgress) { @@ -301,6 +309,9 @@ Standard_Boolean RWStl_Reader::ReadAscii (Standard_IStream& theStream, } MergeNodeTool aMergeTool (this); + aMergeTool.SetMergeAngle (myMergeAngle); + aMergeTool.SetMergeTolerance (myMergeTolearance); + Standard_CLocaleSentry::clocale_t aLocale = Standard_CLocaleSentry::GetCLocale(); (void)aLocale; // to avoid warning on GCC where it is actually not used SAVE_TL() // for GCC only, set C locale globally @@ -373,13 +384,7 @@ Standard_Boolean RWStl_Reader::ReadAscii (Standard_IStream& theStream, aNbLine += 5; // add triangle - int n1 = aMergeTool.AddNode (aVertex[0].X(), aVertex[0].Y(), aVertex[0].Z()); - int n2 = aMergeTool.AddNode (aVertex[1].X(), aVertex[1].Y(), aVertex[1].Z()); - int n3 = aMergeTool.AddNode (aVertex[2].X(), aVertex[2].Y(), aVertex[2].Z()); - if (n1 != n2 && n2 != n3 && n3 != n1) - { - AddTriangle (n1, n2, n3); - } + aMergeTool.AddTriangle (aVertex); theBuffer.ReadLine (theStream, aLineLen); // skip "endloop" theBuffer.ReadLine (theStream, aLineLen); // skip "endfacet" @@ -421,7 +426,9 @@ Standard_Boolean RWStl_Reader::ReadBinary (Standard_IStream& theStream, // number of facets is stored as 32-bit integer at position 80 const Standard_Integer aNbFacets = *(int32_t*)(aHeader + 80); - MergeNodeTool aMergeTool (this); + MergeNodeTool aMergeTool (this, aNbFacets); + aMergeTool.SetMergeAngle (myMergeAngle); + aMergeTool.SetMergeTolerance (myMergeTolearance); // don't trust the number of triangles which is coded in the file // sometimes it is wrong, and with this technique we don't need to swap endians for integer @@ -455,18 +462,13 @@ Standard_Boolean RWStl_Reader::ReadBinary (Standard_IStream& theStream, // get points from buffer // readStlFloatVec3 (aBufferPtr); // skip normal - gp_XYZ aP1 = readStlFloatVec3 (aBufferPtr + aVec3Size); - gp_XYZ aP2 = readStlFloatVec3 (aBufferPtr + aVec3Size * 2); - gp_XYZ aP3 = readStlFloatVec3 (aBufferPtr + aVec3Size * 3); - - // add triangle - int n1 = aMergeTool.AddNode (aP1.X(), aP1.Y(), aP1.Z()); - int n2 = aMergeTool.AddNode (aP2.X(), aP2.Y(), aP2.Z()); - int n3 = aMergeTool.AddNode (aP3.X(), aP3.Y(), aP3.Z()); - if (n1 != n2 && n2 != n3 && n3 != n1) + gp_XYZ aTriNodes[3] = { - AddTriangle (n1, n2, n3); - } + readStlFloatVec3 (aBufferPtr + aVec3Size), + readStlFloatVec3 (aBufferPtr + aVec3Size * 2), + readStlFloatVec3 (aBufferPtr + aVec3Size * 3) + }; + aMergeTool.AddTriangle (aTriNodes); } return aPS.More(); diff --git a/src/RWStl/RWStl_Reader.hxx b/src/RWStl/RWStl_Reader.hxx index 671f79d66f..0a6955b748 100644 --- a/src/RWStl/RWStl_Reader.hxx +++ b/src/RWStl/RWStl_Reader.hxx @@ -35,6 +35,9 @@ class RWStl_Reader : public Standard_Transient DEFINE_STANDARD_RTTIEXT(RWStl_Reader, Standard_Transient) public: + //! Default constructor. + Standard_EXPORT RWStl_Reader(); + //! Reads data from STL file (either binary or Ascii). //! This function supports reading multi-domain STL files formed by concatenation of several "plain" files. //! The mesh nodes are not merged between domains. @@ -81,6 +84,26 @@ public: //! Should create new triangle built on specified nodes in the target model. virtual void AddTriangle (Standard_Integer theN1, Standard_Integer theN2, Standard_Integer theN3) = 0; +public: + + //! Return merge tolerance; M_PI/2 by default - all nodes are merged regardless angle between triangles. + Standard_Real MergeAngle() const { return myMergeAngle; } + + //! Set merge angle in radians. + //! Specify something like M_PI/4 (45 degrees) to avoid merge nodes between triangles at sharp corners. + void SetMergeAngle (Standard_Real theAngleRad) { myMergeAngle = theAngleRad; } + + //! Return linear merge tolerance; 0.0 by default (only 3D points with exactly matching coordinates are merged). + double MergeTolerance() const { return myMergeTolearance; } + + //! Set linear merge tolerance. + void SetMergeTolerance (double theTolerance) { myMergeTolearance = theTolerance; } + +protected: + + Standard_Real myMergeAngle; + Standard_Real myMergeTolearance; + }; #endif diff --git a/src/XSDRAWSTLVRML/XSDRAWSTLVRML.cxx b/src/XSDRAWSTLVRML/XSDRAWSTLVRML.cxx index 2f96e14eb6..b73ec8fbe8 100644 --- a/src/XSDRAWSTLVRML/XSDRAWSTLVRML.cxx +++ b/src/XSDRAWSTLVRML/XSDRAWSTLVRML.cxx @@ -574,6 +574,7 @@ static Standard_Integer readstl(Draw_Interpretor& theDI, { TCollection_AsciiString aShapeName, aFilePath; bool toCreateCompOfTris = false; + double aMergeAngle = M_PI / 2.0; for (Standard_Integer anArgIter = 1; anArgIter < theArgc; ++anArgIter) { TCollection_AsciiString anArg (theArgv[anArgIter]); @@ -595,6 +596,32 @@ static Standard_Integer readstl(Draw_Interpretor& theDI, ++anArgIter; } } + else if (anArg == "-mergeangle" + || anArg == "-smoothangle" + || anArg == "-nomergeangle" + || anArg == "-nosmoothangle") + { + if (anArg.StartsWith ("-no")) + { + aMergeAngle = M_PI / 2.0; + } + else + { + aMergeAngle = M_PI / 4.0; + if (anArgIter + 1 < theArgc + && Draw::ParseReal (theArgv[anArgIter + 1], aMergeAngle)) + { + if (aMergeAngle < 0.0 || aMergeAngle > 90.0) + { + theDI << "Syntax error: angle should be within [0,90] range"; + return 1; + } + + ++anArgIter; + aMergeAngle = aMergeAngle * M_PI / 180.0; + } + } + } else { Message::SendFail() << "Syntax error: unknown argument '" << theArgv[anArgIter] << "'"; @@ -612,7 +639,7 @@ static Standard_Integer readstl(Draw_Interpretor& theDI, { // Read STL file to the triangulation. Handle(Draw_ProgressIndicator) aProgress = new Draw_ProgressIndicator (theDI, 1); - Handle(Poly_Triangulation) aTriangulation = RWStl::ReadFile (aFilePath.ToCString(), aProgress->Start()); + Handle(Poly_Triangulation) aTriangulation = RWStl::ReadFile (aFilePath.ToCString(), aMergeAngle, aProgress->Start()); TopoDS_Face aFace; BRep_Builder aB; @@ -2073,10 +2100,11 @@ void XSDRAWSTLVRML::InitCommands (Draw_Interpretor& theCommands) theCommands.Add ("writevrml", "shape file [version VRML#1.0/VRML#2.0 (1/2): 2 by default] [representation shaded/wireframe/both (0/1/2): 1 by default]",__FILE__,writevrml,g); theCommands.Add ("writestl", "shape file [ascii/binary (0/1) : 1 by default] [InParallel (0/1) : 0 by default]",__FILE__,writestl,g); theCommands.Add ("readstl", - "readstl shape file [-brep]" + "readstl shape file [-brep] [-mergeAngle Angle]" "\n\t\t: Reads STL file and creates a new shape with specified name." "\n\t\t: When -brep is specified, creates a Compound of per-triangle Faces." - "\n\t\t: Single triangulation-only Face is created otherwise (default).", + "\n\t\t: Single triangulation-only Face is created otherwise (default)." + "\n\t\t: -mergeAngle specifies maximum angle in degrees between triangles to merge equal nodes; disabled by default.", __FILE__, readstl, g); theCommands.Add ("loadvrml" , "shape file",__FILE__,loadvrml,g); theCommands.Add ("ReadObj", diff --git a/tests/de_mesh/stl_read/B11 b/tests/de_mesh/stl_read/B11 index 71a2ff477e..5f0764efa8 100644 --- a/tests/de_mesh/stl_read/B11 +++ b/tests/de_mesh/stl_read/B11 @@ -1,7 +1,7 @@ readstl m [locate_data_file model_stl_026.stl] # Number of triangles check -checktrinfo m -tri 41113 -nod 18457 +checktrinfo m -tri 41113 -nod 18459 # Visual check checkview -display m -2d -path ${imagedir}/${test_image}.png \ No newline at end of file diff --git a/tests/de_mesh/stl_read/B13 b/tests/de_mesh/stl_read/B13 index 32db62ffc2..301a7fc92c 100644 --- a/tests/de_mesh/stl_read/B13 +++ b/tests/de_mesh/stl_read/B13 @@ -1,7 +1,7 @@ readstl m [locate_data_file model_stl_028.stl] # Number of triangles check -checktrinfo m -tri 10956 -nod 5238 +checktrinfo m -tri 10956 -nod 5240 # Visual check checkview -display m -2d -path ${imagedir}/${test_image}.png \ No newline at end of file diff --git a/tests/de_mesh/stl_read/B14 b/tests/de_mesh/stl_read/B14 index f4f08fd3b4..c8d32d589d 100644 --- a/tests/de_mesh/stl_read/B14 +++ b/tests/de_mesh/stl_read/B14 @@ -1,7 +1,7 @@ readstl m [locate_data_file model_stl_029.stl] # Number of triangles check -checktrinfo m -tri 33313 -nod 15442 +checktrinfo m -tri 33313 -nod 15444 # Visual check checkview -display m -2d -path ${imagedir}/${test_image}.png \ No newline at end of file diff --git a/tests/de_mesh/stl_read/B6 b/tests/de_mesh/stl_read/B6 index 040e6a862c..86d2aefd0a 100644 --- a/tests/de_mesh/stl_read/B6 +++ b/tests/de_mesh/stl_read/B6 @@ -1,7 +1,7 @@ readstl m [locate_data_file model_stl_021.stl] # Number of triangles check -checktrinfo m -tri 63268 -nod 31445 +checktrinfo m -tri 63268 -nod 31448 # Visual check checkview -display m -2d -path ${imagedir}/${test_image}.png \ No newline at end of file diff --git a/tests/de_mesh/stl_read/C5 b/tests/de_mesh/stl_read/C5 index e9b284dd85..ff8c1d6fc4 100644 --- a/tests/de_mesh/stl_read/C5 +++ b/tests/de_mesh/stl_read/C5 @@ -1,7 +1,7 @@ readstl m [locate_data_file model_stl_035.stl] # Number of triangles check -checktrinfo m -tri 21778 -nod 10963 +checktrinfo m -tri 21779 -nod 10964 # Visual check checkview -display m -2d -path ${imagedir}/${test_image}.png \ No newline at end of file diff --git a/tests/de_mesh/stl_read/D2 b/tests/de_mesh/stl_read/D2 new file mode 100644 index 0000000000..bc6245018c --- /dev/null +++ b/tests/de_mesh/stl_read/D2 @@ -0,0 +1,29 @@ +puts "========" +puts "0032580: Data Exchange, STL - add option splitting nodes at sharp corners" +puts "Test readstl with various merge nodes parameters" +puts "========" + +pload XDE VISUALIZATION MODELING +readstl s1 [locate_data_file shape.stl] +checktrinfo s1 -tri 494 -nod 249 +readstl s2 [locate_data_file shape.stl] -mergeAngle 45 +checktrinfo s2 -tri 494 -nod 413 + +vinit View1 +vdisplay -dispMode 1 s1 +vaspects s1 -faceBoundaryDraw 1 +vfit +vdump ${imagedir}/${casename}_mergeall.png + +vclear +vdisplay -dispMode 1 s2 +vaspects s2 -faceBoundaryDraw 1 +vdump ${imagedir}/${casename}_merge45.png + +tcopy -mesh s1 s3 +trmergenodes s3 -angle 60 +vclear +vdisplay -dispMode 1 s3 +vaspects s3 -faceBoundaryDraw 1 +vdump ${imagedir}/${casename}_merge60.png +checktrinfo s3 -tri 494 -nod 411 diff --git a/tests/de_mesh/stl_read/D3 b/tests/de_mesh/stl_read/D3 new file mode 100644 index 0000000000..ffd5e0b707 --- /dev/null +++ b/tests/de_mesh/stl_read/D3 @@ -0,0 +1,33 @@ +puts "========" +puts "0032580: Data Exchange, STL - add option splitting nodes at sharp corners" +puts "Test trmergenodes with various parameters" +puts "========" + +pload XDE VISUALIZATION MODELING +testreadstep [locate_data_file as1-oc-214-mat.stp] ss +incmesh ss 1.0 + +vinit View1 +vdisplay -dispMode 1 ss +vaspects ss -faceBoundaryDraw 1 +vfit +vdump ${imagedir}/${casename}_stp.png + +trmergenodes ss -angle 0 -oneFace m0 +trmergenodes ss -angle 45 -oneFace m45 +trmergenodes ss -angle 90 -oneFace m90 + +vclear +vdisplay -dispMode 1 m0 +vaspects m0 -faceBoundaryDraw 1 +vdump ${imagedir}/${casename}_m0.png + +vclear +vdisplay -dispMode 1 m45 +vaspects m45 -faceBoundaryDraw 1 +vdump ${imagedir}/${casename}_m45.png + +vclear +vdisplay -dispMode 1 m90 +vaspects m90 -faceBoundaryDraw 1 +vdump ${imagedir}/${casename}_m90.png From c585f731eb76f2be2cefe8afd88f18631ea5f6e6 Mon Sep 17 00:00:00 2001 From: kgv Date: Wed, 22 Sep 2021 00:18:35 +0300 Subject: [PATCH 069/639] 0032579: Draw Harness, ViewerTest - extend vbackground -cubemap syntax to configure sRGB flag Command vbackground has been refactored to simplify logic and relax syntax. Added -srgb argument to vbackground and vtexture commands. --- src/ViewerTest/ViewerTest.cxx | 24 +- src/ViewerTest/ViewerTest_ViewerCommands.cxx | 1751 +++++------------- tests/opengl/data/background/srgb | 14 + tests/opengles2/grids.list | 2 +- 4 files changed, 484 insertions(+), 1307 deletions(-) create mode 100644 tests/opengl/data/background/srgb diff --git a/src/ViewerTest/ViewerTest.cxx b/src/ViewerTest/ViewerTest.cxx index 8331608257..523c99b903 100644 --- a/src/ViewerTest/ViewerTest.cxx +++ b/src/ViewerTest/ViewerTest.cxx @@ -4147,6 +4147,7 @@ Standard_Integer VTexture (Draw_Interpretor& theDi, Standard_Integer theArgsNb, } int toModulate = -1; + int toSetSRgb = -1; bool toSetFilter = false; bool toSetAniso = false; bool toSetTrsfAngle = false; @@ -4305,15 +4306,15 @@ Standard_Integer VTexture (Draw_Interpretor& theDi, Standard_Integer theArgsNb, Message::SendFail() << "Syntax error: unexpected argument '" << aName << "'"; return 1; } - else if (aNameCase == "-modulate") + else if (aNameCase == "-modulate" + || aNameCase == "-nomodulate") { - bool toModulateBool = true; - if (anArgIter + 1 < theArgsNb - && Draw::ParseOnOff (theArgVec[anArgIter + 1], toModulateBool)) - { - ++anArgIter; - } - toModulate = toModulateBool ? 1 : 0; + toModulate = Draw::ParseOnOffNoIterator (theArgsNb, theArgVec, anArgIter) ? 1 : 0; + } + else if (aNameCase == "-srgb" + || aNameCase == "-nosrgb") + { + toSetSRgb = Draw::ParseOnOffNoIterator (theArgsNb, theArgVec, anArgIter) ? 1 : 0; } else if ((aNameCase == "-setfilter" || aNameCase == "-filter") @@ -4637,6 +4638,10 @@ Standard_Integer VTexture (Draw_Interpretor& theDi, Standard_Integer theArgsNb, { aTexturedIO->Attributes()->ShadingAspect()->Aspect()->TextureMap()->GetParams()->SetModulate (toModulate == 1); } + if (toSetSRgb != -1) + { + aTexturedIO->Attributes()->ShadingAspect()->Aspect()->TextureMap()->SetColorMap (toSetSRgb == 1); + } if (toSetTrsfAngle) { aTexturedIO->Attributes()->ShadingAspect()->Aspect()->TextureMap()->GetParams()->SetRotation (aTrsfRotAngle); // takes degrees @@ -6818,7 +6823,7 @@ void ViewerTest::Commands(Draw_Interpretor& theCommands) "\n\t\t: [-tex0 Image0] [-tex1 Image1] [...]" "\n\t\t: [-origin {u v|off}] [-scale {u v|off}] [-repeat {u v|off}]" "\n\t\t: [-trsfTrans du dv] [-trsfScale su sv] [-trsfAngle Angle]" - "\n\t\t: [-modulate {on|off}]" + "\n\t\t: [-modulate {on|off}] [-srgb {on|off}]=on" "\n\t\t: [-setFilter {nearest|bilinear|trilinear}]" "\n\t\t: [-setAnisoFilter {off|low|middle|quality}]" "\n\t\t: [-default]" @@ -6829,6 +6834,7 @@ void ViewerTest::Commands(Draw_Interpretor& theCommands) "\n\t\t: -origin Setup texture origin for generating coordinates; (0, 0) by default" "\n\t\t: -repeat Setup texture repeat for generating coordinates; (1, 1) by default" "\n\t\t: -modulate Enable or disable texture color modulation" + "\n\t\t: -srgb Prefer sRGB texture format when applicable; TRUE by default" "\n\t\t: -trsfAngle Setup dynamic texture coordinates transformation - rotation angle" "\n\t\t: -trsfTrans Setup dynamic texture coordinates transformation - translation vector" "\n\t\t: -trsfScale Setup dynamic texture coordinates transformation - scale vector" diff --git a/src/ViewerTest/ViewerTest_ViewerCommands.cxx b/src/ViewerTest/ViewerTest_ViewerCommands.cxx index b225df725f..8200867aab 100644 --- a/src/ViewerTest/ViewerTest_ViewerCommands.cxx +++ b/src/ViewerTest/ViewerTest_ViewerCommands.cxx @@ -191,1226 +191,33 @@ static struct Quantity_Color GradientColor1; Quantity_Color GradientColor2; Aspect_GradientFillMethod FillMethod; -} ViewerTest_DefaultBackground = { Quantity_NOC_BLACK, Quantity_NOC_BLACK, Quantity_NOC_BLACK, Aspect_GFM_NONE }; - -//============================================================================== -// EVENT GLOBAL VARIABLES -//============================================================================== - -namespace -{ - - //! Checks if some set is a subset of other set - //! @tparam TheSuperSet the type of the superset - //! @tparam TheSubSet the type of the subset - //! @param theSuperSet the superset - //! @param theSubSet the subset to be checked - //! @return true if the superset includes subset, or false otherwise - template - static bool includes (const TheSuperSet& theSuperSet, const TheSubSet& theSubSet) - { - return std::includes (theSuperSet.begin(), theSuperSet.end(), theSubSet.begin(), theSubSet.end()); - } - - //! A variable set of keys for command-line options. - //! It includes a set of mandatory keys and a set of all possible keys. - class CommandOptionKeyVariableSet - { - public: - //! Default constructor - CommandOptionKeyVariableSet() - { - } - - //! Constructor - //! @param theMandatoryKeySet the set of the mandatory option keys - //! @param theAdditionalKeySet the set of additional options that could be omitted - CommandOptionKeyVariableSet ( - const ViewerTest_CommandOptionKeySet& theMandatoryKeySet, - const ViewerTest_CommandOptionKeySet& theAdditionalKeySet = ViewerTest_CommandOptionKeySet()) - : myMandatoryKeySet (theMandatoryKeySet) - { - std::set_union (theMandatoryKeySet.begin(), - theMandatoryKeySet.end(), - theAdditionalKeySet.begin(), - theAdditionalKeySet.end(), - std::inserter (myFullKeySet, myFullKeySet.begin())); - } - - //! Checks if the set of option keys fits to the current variable set (it must contain all mandatory keys - //! and be contained in the full key set) - //! @param theCheckedKeySet the set of option keys to be checked - bool IsInSet (const ViewerTest_CommandOptionKeySet& theCheckedKeySet) const - { - return includes (theCheckedKeySet, myMandatoryKeySet) && includes (myFullKeySet, theCheckedKeySet); - } - - private: - //! A set of mandatory command-line option keys - ViewerTest_CommandOptionKeySet myMandatoryKeySet; - - //! A full set of command-line option keys (includes mandatory and additional option keys) - ViewerTest_CommandOptionKeySet myFullKeySet; - }; - - //! Gets some code by its name - //! @tparam TheCode the type of a code to be found - //! @param theCodeNameMap the map from code names to codes - //! @param theCodeName the name of a code to be found - //! @param theCode the code to be found - //! @return true if a code is found, or false otherwise - template - static bool getSomeCodeByName (const std::map& theCodeNameMap, - TCollection_AsciiString theCodeName, - TheCode& theCode) - { - theCodeName.LowerCase(); - const typename std::map::const_iterator aCodeIterator = theCodeNameMap.find ( - theCodeName); - if (aCodeIterator == theCodeNameMap.end()) - { - return false; - } - theCode = aCodeIterator->second; - return true; - } - - // Defines possible commands related to background changing - enum BackgroundCommand - { - BackgroundCommand_Main, //!< The main command that manages other commands through options - BackgroundCommand_Image, //!< Sets an image as a background - BackgroundCommand_ImageMode, //!< Changes a background image mode - BackgroundCommand_Gradient, //!< Sets a gradient as a background - BackgroundCommand_GradientMode, //!< Changes a background gradient mode - BackgroundCommand_Color, //!< Fills background with a specified color - BackgroundCommand_Default //!< Sets the background default color or gradient - }; - - //! Map from background command names to its codes - typedef std::map BackgroundCommandNameMap; - - //! Creates a map from background command names to its codes - //! @return a map from background command names to its codes - static BackgroundCommandNameMap createBackgroundCommandNameMap() - { - BackgroundCommandNameMap aBackgroundCommandNameMap; - aBackgroundCommandNameMap["vbackground"] = BackgroundCommand_Main; - aBackgroundCommandNameMap["vsetbg"] = BackgroundCommand_Image; - aBackgroundCommandNameMap["vsetbgmode"] = BackgroundCommand_ImageMode; - aBackgroundCommandNameMap["vsetgradientbg"] = BackgroundCommand_Gradient; - aBackgroundCommandNameMap["vsetgrbgmode"] = BackgroundCommand_GradientMode; - aBackgroundCommandNameMap["vsetcolorbg"] = BackgroundCommand_Color; - aBackgroundCommandNameMap["vsetdefaultbg"] = BackgroundCommand_Default; - return aBackgroundCommandNameMap; - } - - //! Gets a background command by its name - //! @param theBackgroundCommandName the name of the background command - //! @param theBackgroundCommand the background command to be found - //! @return true if a background command is found, or false otherwise - static bool getBackgroundCommandByName (const TCollection_AsciiString& theBackgroundCommandName, - BackgroundCommand& theBackgroundCommand) - { - static const BackgroundCommandNameMap THE_BACKGROUND_COMMAND_NAME_MAP = createBackgroundCommandNameMap(); - return getSomeCodeByName (THE_BACKGROUND_COMMAND_NAME_MAP, theBackgroundCommandName, theBackgroundCommand); - } - - //! Map from background image fill method names to its codes - typedef std::map BackgroundImageFillMethodNameMap; - - //! Creates a map from background image fill method names to its codes - //! @return a map from background image fill method names to its codes - static BackgroundImageFillMethodNameMap createBackgroundImageFillMethodNameMap() - { - BackgroundImageFillMethodNameMap aBackgroundImageFillMethodNameMap; - aBackgroundImageFillMethodNameMap["none"] = Aspect_FM_NONE; - aBackgroundImageFillMethodNameMap["centered"] = Aspect_FM_CENTERED; - aBackgroundImageFillMethodNameMap["tiled"] = Aspect_FM_TILED; - aBackgroundImageFillMethodNameMap["stretch"] = Aspect_FM_STRETCH; - return aBackgroundImageFillMethodNameMap; - } - - //! Gets a background image fill method by its name - //! @param theBackgroundImageFillMethodName the name of the background image fill method - //! @param theBackgroundImageFillMethod the background image fill method to be found - //! @return true if a background image fill method is found, or false otherwise - static bool getBackgroundImageFillMethodByName (const TCollection_AsciiString& theBackgroundImageFillMethodName, - Aspect_FillMethod& theBackgroundImageFillMethod) - { - static const BackgroundImageFillMethodNameMap THE_BACKGROUND_IMAGE_FILL_METHOD_NAME_MAP = - createBackgroundImageFillMethodNameMap(); - return getSomeCodeByName (THE_BACKGROUND_IMAGE_FILL_METHOD_NAME_MAP, - theBackgroundImageFillMethodName, - theBackgroundImageFillMethod); - } - - //! Map from background gradient fill method names to its codes - typedef std::map BackgroundGradientFillMethodNameMap; - - //! Creates a map from background gradient fill method names to its codes - //! @return a map from background gradient fill method names to its codes - static BackgroundGradientFillMethodNameMap createBackgroundGradientFillMethodNameMap() - { - BackgroundGradientFillMethodNameMap aBackgroundGradientFillMethodNameMap; - aBackgroundGradientFillMethodNameMap["none"] = Aspect_GFM_NONE; - aBackgroundGradientFillMethodNameMap["hor"] = Aspect_GFM_HOR; - aBackgroundGradientFillMethodNameMap["horizontal"] = Aspect_GFM_HOR; - aBackgroundGradientFillMethodNameMap["ver"] = Aspect_GFM_VER; - aBackgroundGradientFillMethodNameMap["vertical"] = Aspect_GFM_VER; - aBackgroundGradientFillMethodNameMap["diag1"] = Aspect_GFM_DIAG1; - aBackgroundGradientFillMethodNameMap["diagonal1"] = Aspect_GFM_DIAG1; - aBackgroundGradientFillMethodNameMap["diag2"] = Aspect_GFM_DIAG2; - aBackgroundGradientFillMethodNameMap["diagonal2"] = Aspect_GFM_DIAG2; - aBackgroundGradientFillMethodNameMap["corner1"] = Aspect_GFM_CORNER1; - aBackgroundGradientFillMethodNameMap["corner2"] = Aspect_GFM_CORNER2; - aBackgroundGradientFillMethodNameMap["corner3"] = Aspect_GFM_CORNER3; - aBackgroundGradientFillMethodNameMap["corner4"] = Aspect_GFM_CORNER4; - return aBackgroundGradientFillMethodNameMap; - } - - //! Gets a gradient fill method by its name - //! @param theBackgroundGradientFillMethodName the name of the gradient fill method - //! @param theBackgroundGradientFillMethod the gradient fill method to be found - //! @return true if a gradient fill method is found, or false otherwise - static bool getBackgroundGradientFillMethodByName (const TCollection_AsciiString& theBackgroundGradientFillMethodName, - Aspect_GradientFillMethod& theBackgroundGradientFillMethod) - { - static const BackgroundGradientFillMethodNameMap THE_BACKGROUND_GRADIENT_FILL_METHOD_NAME_MAP = - createBackgroundGradientFillMethodNameMap(); - return getSomeCodeByName (THE_BACKGROUND_GRADIENT_FILL_METHOD_NAME_MAP, - theBackgroundGradientFillMethodName, - theBackgroundGradientFillMethod); - } - - //! Changes the background in accordance with passed command line options - class BackgroundChanger - { - public: - //! Constructor. Prepares the command parser - BackgroundChanger() - { - prepareCommandParser(); - } - - //! Processes the command line and changes the background - //! @param theDrawInterpretor the interpreter of the Draw Harness application - //! @param theNumberOfCommandLineArguments the number of passed command line arguments - //! @param theCommandLineArguments the array of command line arguments - bool ProcessCommandLine (Draw_Interpretor& theDrawInterpretor, - const Standard_Integer theNumberOfCommandLineArguments, - const char* const* const theCommandLineArguments) - { - const char* const aBackgroundCommandName = theCommandLineArguments[0]; - BackgroundCommand aBackgroundCommand = BackgroundCommand_Main; - if (!getBackgroundCommandByName (aBackgroundCommandName, aBackgroundCommand)) - { - return false; - } - addCommandDescription (aBackgroundCommand); - myCommandParser.Parse (theNumberOfCommandLineArguments, theCommandLineArguments); - return processCommandOptions (aBackgroundCommandName, aBackgroundCommand, theDrawInterpretor); - } - - private: - //! The type of functions that are able to set gradient background filling - typedef void SetGradientFunction (const Quantity_Color& /* theColor1 */, - const Quantity_Color& /* theColor2 */, - const Aspect_GradientFillMethod /* theGradientMode */); - - //! The type of functions that are able to fill a background with a specific color - typedef void SetColorFunction (const Quantity_Color& /* theColor */); - - //! the command parser used to parse command line options and its arguments - ViewerTest_CmdParser myCommandParser; - - //! the option key for the command that sets an image as a background - ViewerTest_CommandOptionKey myImageOptionKey; - - //! the option key for the command that sets a background image fill type - ViewerTest_CommandOptionKey myImageModeOptionKey; - - //! the option key for the command that sets a gradient filling for the background - ViewerTest_CommandOptionKey myGradientOptionKey; - - //! the option key for the command that sets a background gradient filling method - ViewerTest_CommandOptionKey myGradientModeOptionKey; - - //! the option key for the command that fills background with a specific color - ViewerTest_CommandOptionKey myColorOptionKey; - - //! the option key for the command that sets default background gradient or color - ViewerTest_CommandOptionKey myDefaultOptionKey; - - //! the option key for the command that sets an environment cubemap as a background - ViewerTest_CommandOptionKey myCubeMapOptionKey; - - //! the option key for the command that defines order of tiles in one image packed cubemap - ViewerTest_CommandOptionKey myCubeMapOrderOptionKey; - - //! the option key for the command that sets inversion of Z axis for background cubemap - ViewerTest_CommandOptionKey myCubeMapInvertedZOptionKey; - - //! the option key for the command that allows skip IBL map generation - ViewerTest_CommandOptionKey myCubeMapDoNotGenPBREnvOptionKey; - - //! the variable set of options that are allowed for the old scenario (without any option passed) - CommandOptionKeyVariableSet myUnnamedOptionVariableSet; - - //! the variable set of options that are allowed for setting an environment cubemap as background - CommandOptionKeyVariableSet myCubeMapOptionVariableSet; - - //! the variable set of options that are allowed for setting an image as a background - CommandOptionKeyVariableSet myImageOptionVariableSet; - - //! the variable set of options that are allowed for setting a background image fill type - CommandOptionKeyVariableSet myImageModeOptionVariableSet; - - //! the variable set of options that are allowed for setting a gradient filling for the background - CommandOptionKeyVariableSet myGradientOptionVariableSet; - - //! the variable set of options that are allowed for setting a background gradient filling method - CommandOptionKeyVariableSet myGradientModeOptionVariableSet; - - //! the variable set of options that are allowed for filling a background with a specific color - CommandOptionKeyVariableSet myColorOptionVariableSet; - - //! the variable set of options that are allowed for setting a default background gradient - CommandOptionKeyVariableSet myDefaultGradientOptionVariableSet; - - //! the variable set of options that are allowed for setting a default background color - CommandOptionKeyVariableSet myDefaultColorOptionVariableSet; - - //! the variable set of options that are allowed for printing help - CommandOptionKeyVariableSet myHelpOptionVariableSet; - - //! Adds options to command parser - void addOptionsToCommandParser() - { - myImageOptionKey = myCommandParser.AddOption ("imageFile|image|imgFile|img", - "filename of image used as background"); - myImageModeOptionKey = myCommandParser.AddOption ( - "imageMode|imgMode", "image fill type, should be one of CENTERED, TILED, STRETCH, NONE"); - myGradientOptionKey = myCommandParser.AddOption ("gradient|grad|gr", - "sets background gradient starting and ending colors"); - myGradientModeOptionKey = - myCommandParser.AddOption ("gradientMode|gradMode|gradMd|grMode|grMd", - "gradient fill method, should be one of NONE, HOR[IZONTAL], VER[TICAL], " - "DIAG[ONAL]1, DIAG[ONAL]2, CORNER1, CORNER2, CORNER3, CORNER4"); - myColorOptionKey = myCommandParser.AddOption ("color|col", "background color"); - myDefaultOptionKey = myCommandParser.AddOption ("default|def", "sets background default gradient or color"); - - myCubeMapOptionKey = myCommandParser.AddOption ("cubemap|cmap|cm", "background cubemap"); - myCubeMapOrderOptionKey = myCommandParser.AddOption ("order|o", "order of sides in one image packed cubemap"); - myCubeMapInvertedZOptionKey = myCommandParser.AddOption ( - "invertedz|invz|iz", "whether Z axis is inverted or not during background cubemap rendering"); - myCubeMapDoNotGenPBREnvOptionKey = myCommandParser.AddOption ("nopbrenv", "whether IBL map generation should be skipped"); - } - - //! Creates option sets used to determine if a passed option set is valid or not - void createOptionSets() - { - ViewerTest_CommandOptionKeySet anUnnamedOptionSet; - anUnnamedOptionSet.insert (ViewerTest_CmdParser::THE_UNNAMED_COMMAND_OPTION_KEY); - myUnnamedOptionVariableSet = CommandOptionKeyVariableSet (anUnnamedOptionSet); - - ViewerTest_CommandOptionKeySet aCubeMapOptionSet; - aCubeMapOptionSet.insert (myCubeMapOptionKey); - ViewerTest_CommandOptionKeySet aCubeMapAdditionalOptionKeySet; - aCubeMapAdditionalOptionKeySet.insert (myCubeMapInvertedZOptionKey); - aCubeMapAdditionalOptionKeySet.insert (myCubeMapDoNotGenPBREnvOptionKey); - aCubeMapAdditionalOptionKeySet.insert (myCubeMapOrderOptionKey); - myCubeMapOptionVariableSet = CommandOptionKeyVariableSet (aCubeMapOptionSet, aCubeMapAdditionalOptionKeySet); - - ViewerTest_CommandOptionKeySet anImageOptionSet; - anImageOptionSet.insert (myImageOptionKey); - ViewerTest_CommandOptionKeySet anImageModeOptionSet; - anImageModeOptionSet.insert (myImageModeOptionKey); - myImageOptionVariableSet = CommandOptionKeyVariableSet (anImageOptionSet, anImageModeOptionSet); - myImageModeOptionVariableSet = CommandOptionKeyVariableSet (anImageModeOptionSet); - - ViewerTest_CommandOptionKeySet aGradientOptionSet; - aGradientOptionSet.insert (myGradientOptionKey); - ViewerTest_CommandOptionKeySet aGradientModeOptionSet; - aGradientModeOptionSet.insert (myGradientModeOptionKey); - myGradientOptionVariableSet = CommandOptionKeyVariableSet (aGradientOptionSet, aGradientModeOptionSet); - myGradientModeOptionVariableSet = CommandOptionKeyVariableSet (aGradientModeOptionSet); - - ViewerTest_CommandOptionKeySet aColorOptionSet; - aColorOptionSet.insert (myColorOptionKey); - myColorOptionVariableSet = CommandOptionKeyVariableSet (aColorOptionSet); - - aGradientOptionSet.insert (myDefaultOptionKey); - myDefaultGradientOptionVariableSet = CommandOptionKeyVariableSet (aGradientOptionSet, aGradientModeOptionSet); - aColorOptionSet.insert (myDefaultOptionKey); - myDefaultColorOptionVariableSet = CommandOptionKeyVariableSet (aColorOptionSet); - - ViewerTest_CommandOptionKeySet aHelpOptionSet; - aHelpOptionSet.insert (ViewerTest_CmdParser::THE_HELP_COMMAND_OPTION_KEY); - myHelpOptionVariableSet = CommandOptionKeyVariableSet (aHelpOptionSet); - } - - //! Prepares the command parser. Adds options and creates option sets used to determine - //! if a passed option set is valid or not - void prepareCommandParser() - { - addOptionsToCommandParser(); - createOptionSets(); - } - - //! Adds a command description to the command parser - //! @param theBackgroundCommand the key of the command which description is added to the command parser - void addCommandDescription (const BackgroundCommand theBackgroundCommand) - { - std::string aDescription; - bool isMainCommand = false; - switch (theBackgroundCommand) - { - case BackgroundCommand_Main: - aDescription = "Command: vbackground (changes background or some background settings)"; - isMainCommand = true; - break; - case BackgroundCommand_Image: - aDescription = "Command: vsetbg (loads image as a background)"; - break; - case BackgroundCommand_ImageMode: - aDescription = "Command: vsetbgmode (changes background fill type)"; - break; - case BackgroundCommand_Gradient: - aDescription = "Command: vsetgradientbg (mounts gradient background)"; - break; - case BackgroundCommand_GradientMode: - aDescription = "Command: vsetgradientbgmode (changes gradient background fill method)"; - break; - case BackgroundCommand_Color: - aDescription = "Command: vsetcolorbg (sets color background)"; - break; - case BackgroundCommand_Default: - aDescription = "Command: vsetdefaultbg (sets default viewer background gradient or fill color)"; - break; - default: - return; - } - if (!isMainCommand) - { - aDescription += "\nThis command is obsolete. Use vbackground instead."; - } - myCommandParser.SetDescription (aDescription); - } - - //! Check if a viewer is needed to be initialized - //! @param theBackgroundCommand the key of the command that changes the background - //! @return true if processing was successful, or false otherwise - bool checkViewerIsNeeded (const BackgroundCommand theBackgroundCommand) const - { - const bool isMain = (theBackgroundCommand == BackgroundCommand_Main); - const ViewerTest_CommandOptionKeySet aUsedOptions = myCommandParser.GetUsedOptions(); - const bool aViewerIsNotNeeded = - (theBackgroundCommand == BackgroundCommand_Default) - || (myDefaultGradientOptionVariableSet.IsInSet (aUsedOptions) && isMain) - || (myDefaultColorOptionVariableSet.IsInSet (aUsedOptions) && isMain) - || myHelpOptionVariableSet.IsInSet (aUsedOptions); - return !aViewerIsNotNeeded; - } - - //! Check if a viewer is initialized - //! @param theBackgroundCommandName the name of the command that changes the background - //! @param theDrawInterpretor the interpreter of the Draw Harness application - //! @return true if a viewer is initialized, or false otherwise - static bool checkViewerIsInitialized (const char* const theBackgroundCommandName, - Draw_Interpretor& theDrawInterpretor) - { - const Handle (AIS_InteractiveContext)& anAISContext = ViewerTest::GetAISContext(); - if (anAISContext.IsNull()) - { - theDrawInterpretor << "Use 'vinit' command before executing '" << theBackgroundCommandName << "' command.\n"; - return false; - } - return true; - } - - //! Processes command options - //! @param theBackgroundCommandName the name of the command that changes the background - //! @param theBackgroundCommand the key of the command that changes the background - //! @param theDrawInterpretor the interpreter of the Draw Harness application - //! @return true if processing was successful, or false otherwise - bool processCommandOptions (const char* const theBackgroundCommandName, - const BackgroundCommand theBackgroundCommand, - Draw_Interpretor& theDrawInterpretor) const - { - if (myCommandParser.HasNoOption()) - { - return printHelp (theBackgroundCommandName, theDrawInterpretor); - } - if (checkViewerIsNeeded (theBackgroundCommand) - && !checkViewerIsInitialized (theBackgroundCommandName, theDrawInterpretor)) - { - return false; - } - if (myCommandParser.HasOnlyUnnamedOption()) - { - return processUnnamedOption (theBackgroundCommand); - } - return processNamedOptions (theBackgroundCommandName, theBackgroundCommand, theDrawInterpretor); - } - - //! Processes the unnamed option - //! @param theBackgroundCommand the key of the command that changes the background - //! @return true if processing was successful, or false otherwise - bool processUnnamedOption (const BackgroundCommand theBackgroundCommand) const - { - switch (theBackgroundCommand) - { - case BackgroundCommand_Main: - return false; - case BackgroundCommand_Image: - return processImageUnnamedOption(); - case BackgroundCommand_ImageMode: - return processImageModeUnnamedOption(); - case BackgroundCommand_Gradient: - return processGradientUnnamedOption(); - case BackgroundCommand_GradientMode: - return processGradientModeUnnamedOption(); - case BackgroundCommand_Color: - return processColorUnnamedOption(); - case BackgroundCommand_Default: - return processDefaultUnnamedOption(); - default: - return false; - } - } - - //! Processes the image unnamed option - //! @return true if processing was successful, or false otherwise - bool processImageUnnamedOption() const - { - const std::size_t aNumberOfImageUnnamedOptionArguments = myCommandParser.GetNumberOfOptionArguments ( - ViewerTest_CmdParser::THE_UNNAMED_COMMAND_OPTION_KEY); - if ((aNumberOfImageUnnamedOptionArguments != 1) && (aNumberOfImageUnnamedOptionArguments != 2)) - { - return false; - } - std::string anImageFileName; - if (!myCommandParser.Arg (ViewerTest_CmdParser::THE_UNNAMED_COMMAND_OPTION_KEY, 0, anImageFileName)) - { - return false; - } - Aspect_FillMethod anImageMode = Aspect_FM_CENTERED; - if (aNumberOfImageUnnamedOptionArguments == 2) - { - std::string anImageModeString; - if (!myCommandParser.Arg (ViewerTest_CmdParser::THE_UNNAMED_COMMAND_OPTION_KEY, 1, anImageModeString)) - { - return false; - } - if (!getBackgroundImageFillMethodByName (anImageModeString.c_str(), anImageMode)) - { - return false; - } - } - setImage (anImageFileName.c_str(), anImageMode); - return true; - } - - //! Processes the image mode unnamed option - //! @return true if processing was successful, or false otherwise - bool processImageModeUnnamedOption() const - { - return processImageModeOptionSet (ViewerTest_CmdParser::THE_UNNAMED_COMMAND_OPTION_KEY); - } - - //! Processes the gradient unnamed option - //! @param theSetGradient the function used to set a background gradient filling - //! @return true if processing was successful, or false otherwise - bool processGradientUnnamedOption (SetGradientFunction* const theSetGradient = setGradient) const - { - const Standard_Integer aNumberOfGradientUnnamedOptionArguments = myCommandParser.GetNumberOfOptionArguments ( - ViewerTest_CmdParser::THE_UNNAMED_COMMAND_OPTION_KEY); - if (aNumberOfGradientUnnamedOptionArguments < 2) - { - return false; - } - - Standard_Integer anArgumentIndex = 0; - Quantity_Color aColor1; - if (!myCommandParser.ArgColor (ViewerTest_CmdParser::THE_UNNAMED_COMMAND_OPTION_KEY, anArgumentIndex, aColor1)) - { - return false; - } - if (anArgumentIndex >= aNumberOfGradientUnnamedOptionArguments) - { - return false; - } - - Quantity_Color aColor2; - if (!myCommandParser.ArgColor (ViewerTest_CmdParser::THE_UNNAMED_COMMAND_OPTION_KEY, anArgumentIndex, aColor2)) - { - return false; - } - if (anArgumentIndex > aNumberOfGradientUnnamedOptionArguments) - { - return false; - } - - Aspect_GradientFillMethod aGradientMode = Aspect_GFM_HOR; - if (anArgumentIndex == aNumberOfGradientUnnamedOptionArguments - 1) - { - std::string anGradientModeString; - - if (!myCommandParser.Arg (ViewerTest_CmdParser::THE_UNNAMED_COMMAND_OPTION_KEY, - anArgumentIndex, - anGradientModeString)) - { - return false; - } - if (!getBackgroundGradientFillMethodByName (anGradientModeString.c_str(), aGradientMode)) - { - return false; - } - ++anArgumentIndex; - } - if (anArgumentIndex != aNumberOfGradientUnnamedOptionArguments) - { - return false; - } - theSetGradient (aColor1, aColor2, aGradientMode); - return true; - } - - //! Processes the gradient mode unnamed option - //! @return true if processing was successful, or false otherwise - bool processGradientModeUnnamedOption() const - { - return processGradientModeOptionSet (ViewerTest_CmdParser::THE_UNNAMED_COMMAND_OPTION_KEY); - } - - //! Processes the color unnamed option - //! @param theSetColor the function used to set a background color - //! @return true if processing was successful, or false otherwise - bool processColorUnnamedOption (SetColorFunction* const theSetColor = setColor) const - { - return processColorOptionSet (ViewerTest_CmdParser::THE_UNNAMED_COMMAND_OPTION_KEY, theSetColor); - } - - //! Processes the default back unnamed option - //! @return true if processing was successful, or false otherwise - bool processDefaultUnnamedOption() const - { - if (processGradientUnnamedOption (setDefaultGradient)) - { - return true; - } - return processColorUnnamedOption (setDefaultColor); - } - - //! Processes named options - //! @param theBackgroundCommandName the name of the command that changes the background - //! @param theBackgroundCommand the key of the command that changes the background - //! @param theDrawInterpretor the interpreter of the Draw Harness application - //! @return true if processing was successful, or false otherwise - bool processNamedOptions (const char* const theBackgroundCommandName, - const BackgroundCommand theBackgroundCommand, - Draw_Interpretor& theDrawInterpretor) const - { - const bool isMain = (theBackgroundCommand == BackgroundCommand_Main); - const ViewerTest_CommandOptionKeySet aUsedOptions = myCommandParser.GetUsedOptions(); - if (myCubeMapOptionVariableSet.IsInSet (aUsedOptions) && isMain) - { - return processCubeMapOptionSet(); - } - if (myImageOptionVariableSet.IsInSet (aUsedOptions) - && (isMain || (theBackgroundCommand == BackgroundCommand_Image))) - { - return processImageOptionSet(); - } - if (myImageModeOptionVariableSet.IsInSet (aUsedOptions) - && (isMain || (theBackgroundCommand == BackgroundCommand_ImageMode))) - { - return processImageModeOptionSet(); - } - if (myGradientOptionVariableSet.IsInSet (aUsedOptions) - && (isMain || (theBackgroundCommand == BackgroundCommand_Gradient))) - { - return processGradientOptionSet(); - } - if (myGradientModeOptionVariableSet.IsInSet (aUsedOptions) - && (isMain || (theBackgroundCommand == BackgroundCommand_GradientMode))) - { - return processGradientModeOptionSet(); - } - if (myColorOptionVariableSet.IsInSet (aUsedOptions) - && (isMain || (theBackgroundCommand == BackgroundCommand_Color))) - { - return processColorOptionSet(); - } - if ((myDefaultGradientOptionVariableSet.IsInSet (aUsedOptions) && isMain) - || (myGradientOptionVariableSet.IsInSet (aUsedOptions) - && (theBackgroundCommand == BackgroundCommand_Default))) - { - return processDefaultGradientOptionSet(); - } - if ((myDefaultColorOptionVariableSet.IsInSet (aUsedOptions) && isMain) - || (myColorOptionVariableSet.IsInSet (aUsedOptions) && (theBackgroundCommand == BackgroundCommand_Default))) - { - return processDefaultColorOptionSet(); - } - if (myHelpOptionVariableSet.IsInSet (aUsedOptions)) - { - return processHelpOptionSet (theBackgroundCommandName, theDrawInterpretor); - } - return false; - } - - //! Process the cubemap option set in named and unnamed case. - //! @return true if processing was successful, or false otherwise - bool processCubeMapOptionSet() const - { - NCollection_Array1 aFilePaths; - - if (!processCubeMapOptions (aFilePaths)) - { - return false; - } - - Graphic3d_CubeMapOrder anOrder = Graphic3d_CubeMapOrder::Default(); - - if (myCommandParser.HasOption (myCubeMapOrderOptionKey)) - { - if (!processCubeMapOrderOptions (anOrder)) - { - return false; - } - } - - bool aZIsInverted = false; - if (myCommandParser.HasOption (myCubeMapInvertedZOptionKey)) - { - if (!processCubeMapInvertedZOptionSet()) - { - return false; - } - aZIsInverted = true; - } - - bool aToGenPBREnv = true; - if (myCommandParser.HasOption (myCubeMapDoNotGenPBREnvOptionKey)) - { - if (!processCubeMapDoNotGenPBREnvOptionSet()) - { - return false; - } - aToGenPBREnv = false; - } - - setCubeMap (aFilePaths, anOrder.Validated(), aZIsInverted, aToGenPBREnv); - return true; - } - - //! Processes the image option set - //! @return true if processing was successful, or false otherwise - bool processImageOptionSet() const - { - std::string anImageFileName; - if (!processImageOption (anImageFileName)) - { - return false; - } - Aspect_FillMethod anImageMode = Aspect_FM_CENTERED; - if (myCommandParser.HasOption (myImageModeOptionKey) && !processImageModeOption (anImageMode)) - { - return false; - } - setImage (anImageFileName.c_str(), anImageMode); - return true; - } - - //! Processes the image mode option set - //! @return true if processing was successful, or false otherwise - bool processImageModeOptionSet() const - { - return processImageModeOptionSet (myImageModeOptionKey); - } - - //! Processes the image mode option set - //! @param theImageModeOptionKey the key of the option that is interpreted as an image mode option - //! @return true if processing was successful, or false otherwise - bool processImageModeOptionSet (const ViewerTest_CommandOptionKey theImageModeOptionKey) const - { - Aspect_FillMethod anImageMode = Aspect_FM_NONE; - if (!processImageModeOption (theImageModeOptionKey, anImageMode)) - { - return false; - } - setImageMode (anImageMode); - return true; - } - - //! Processes the gradient option set - //! @param theSetGradient the function used to set a background gradient filling - //! @return true if processing was successful, or false otherwise - bool processGradientOptionSet (SetGradientFunction* const theSetGradient = setGradient) const - { - Quantity_Color aColor1; - Quantity_Color aColor2; - if (!processGradientOption (aColor1, aColor2)) - { - return false; - } - Aspect_GradientFillMethod aGradientMode = Aspect_GFM_HOR; - if (myCommandParser.HasOption (myGradientModeOptionKey) && !processGradientModeOption (aGradientMode)) - { - return false; - } - theSetGradient (aColor1, aColor2, aGradientMode); - return true; - } - - //! Processes the gradient mode option set - //! @return true if processing was successful, or false otherwise - bool processGradientModeOptionSet() const - { - return processGradientModeOptionSet (myGradientModeOptionKey); - } - - //! Processes the gradient mode option set - //! @param theGradientModeOptionKey the key of the option that is interpreted as a gradient mode option - //! @return true if processing was successful, or false otherwise - bool processGradientModeOptionSet (const ViewerTest_CommandOptionKey theGradientModeOptionKey) const - { - Aspect_GradientFillMethod aGradientMode = Aspect_GFM_NONE; - if (!processGradientModeOption (theGradientModeOptionKey, aGradientMode)) - { - return false; - } - setGradientMode (aGradientMode); - return true; - } - - //! Processes the color option set - //! @param theSetColor the function used to set a background color - //! @return true if processing was successful, or false otherwise - bool processColorOptionSet (SetColorFunction* const theSetColor = setColor) const - { - return processColorOptionSet (myColorOptionKey, theSetColor); - } - - //! Processes the default color option set - //! @return true if processing was successful, or false otherwise - bool processDefaultGradientOptionSet() const - { - return processGradientOptionSet (setDefaultGradient); - } - - //! Processes the default gradient option set - //! @return true if processing was successful, or false otherwise - bool processDefaultColorOptionSet() const - { - return processColorOptionSet (setDefaultColor); - } - - //! Processes the color option set - //! @param theColorOptionKey the key of the option that is interpreted as a color option - //! @param theSetColor the function used to set a background color - //! @return true if processing was successful, or false otherwise - bool processColorOptionSet (const ViewerTest_CommandOptionKey theColorOptionKey, - SetColorFunction* const theSetColor = setColor) const - { - Quantity_Color aColor; - if (!processColorOption (theColorOptionKey, aColor)) - { - return false; - } - theSetColor (aColor); - return true; - } - - //! Processes the help option set - //! @param theBackgroundCommandName the name of the command that changes the background - //! @param theDrawInterpretor the interpreter of the Draw Harness application - //! @return true if processing was successful, or false otherwise - bool processHelpOptionSet (const char* const theBackgroundCommandName, Draw_Interpretor& theDrawInterpretor) const - { - const Standard_Integer aNumberOfHelpOptionArguments = myCommandParser.GetNumberOfOptionArguments ( - ViewerTest_CmdParser::THE_HELP_COMMAND_OPTION_KEY); - if (aNumberOfHelpOptionArguments != 0) - { - return false; - } - return printHelp (theBackgroundCommandName, theDrawInterpretor); - } - - //! Processes the cubemap option - //! @param theFilePaths the array of filenames of cubemap sides - //! @return true if processing was successful, or false otherwise - bool processCubeMapOptions (NCollection_Array1 &theFilePaths) const - { - const Standard_Integer aNumberOfCubeMapOptionArguments = myCommandParser.GetNumberOfOptionArguments (myCubeMapOptionKey); - - if (aNumberOfCubeMapOptionArguments != 1 - && aNumberOfCubeMapOptionArguments != 6) - { - return false; - } - - theFilePaths.Resize(0, aNumberOfCubeMapOptionArguments - 1, Standard_False); - - for (int i = 0; i < aNumberOfCubeMapOptionArguments; ++i) - { - std::string aCubeMapFileName; - if (!myCommandParser.Arg (myCubeMapOptionKey, i, aCubeMapFileName)) - { - return false; - } - theFilePaths[i] = aCubeMapFileName.c_str(); - } - - return true; - } - - //! Processes the inverted z cubemap option - //! @return true if processing was successful, or false otherwise - bool processCubeMapInvertedZOptionSet () const - { - const Standard_Integer aNumberOfCubeMapZInversionOptionArguments = - myCommandParser.GetNumberOfOptionArguments (myCubeMapInvertedZOptionKey); - - if (aNumberOfCubeMapZInversionOptionArguments != 0) - { - return false; - } - - return true; - } - - //! Processes the option allowing to skip IBM maps generation - //! @return true if processing was successful, or false otherwise - bool processCubeMapDoNotGenPBREnvOptionSet() const - { - const Standard_Integer aNumberOfCubeMapDoNotGenPBREnvOptionArguments = - myCommandParser.GetNumberOfOptionArguments(myCubeMapDoNotGenPBREnvOptionKey); - - if (aNumberOfCubeMapDoNotGenPBREnvOptionArguments != 0) - { - return false; - } - - return true; - } - - //! Processes the tiles order option - //! @param theOrder the array of indexes if cubemap sides in tile grid - //! @return true if processing was successful, or false otherwise - bool processCubeMapOrderOptions (Graphic3d_CubeMapOrder& theOrder) const - { - const Standard_Integer aNumberOfCubeMapOrderOptionArguments = myCommandParser.GetNumberOfOptionArguments( - myCubeMapOrderOptionKey); - - if (aNumberOfCubeMapOrderOptionArguments != 6) - { - return false; - } - - - for (unsigned int i = 0; i < 6; ++i) - { - std::string anOrderItem; - if (!myCommandParser.Arg (myCubeMapOrderOptionKey, i, anOrderItem)) - { - return false; - } - - theOrder.Set (Graphic3d_CubeMapSide (i), - static_cast (Draw::Atoi (anOrderItem.c_str()))); - } - - return theOrder.IsValid(); - } - - //! Processes the image option - //! @param theImageFileName the filename of the image to be used as a background - //! @return true if processing was successful, or false otherwise - bool processImageOption (std::string& theImageFileName) const - { - const Standard_Integer aNumberOfImageOptionArguments = myCommandParser.GetNumberOfOptionArguments ( - myImageOptionKey); - if (aNumberOfImageOptionArguments != 1) - { - return false; - } - std::string anImageFileName; - if (!myCommandParser.Arg (myImageOptionKey, 0, anImageFileName)) - { - return false; - } - theImageFileName = anImageFileName; - return true; - } - - //! Processes the image mode option - //! @param theImageMode the fill type used for a background image - //! @return true if processing was successful, or false otherwise - bool processImageModeOption (Aspect_FillMethod& theImageMode) const - { - return processImageModeOption (myImageModeOptionKey, theImageMode); - } - - //! Processes the image mode option - //! @param theImageModeOptionKey the key of the option that is interpreted as an image mode option - //! @param theImageMode the fill type used for a background image - //! @return true if processing was successful, or false otherwise - bool processImageModeOption (const ViewerTest_CommandOptionKey theImageModeOptionKey, - Aspect_FillMethod& theImageMode) const - { - return processModeOption (theImageModeOptionKey, getBackgroundImageFillMethodByName, theImageMode); - } - - //! Processes the gradient option - //! @param theColor1 the gradient starting color - //! @param theColor2 the gradient ending color - //! @return true if processing was successful, or false otherwise - bool processGradientOption (Quantity_Color& theColor1, Quantity_Color& theColor2) const - { - Standard_Integer anArgumentIndex = 0; - Quantity_Color aColor1; - if (!myCommandParser.ArgColor (myGradientOptionKey, anArgumentIndex, aColor1)) - { - return false; - } - Quantity_Color aColor2; - if (!myCommandParser.ArgColor (myGradientOptionKey, anArgumentIndex, aColor2)) - { - return false; - } - const Standard_Integer aNumberOfGradientOptionArguments = myCommandParser.GetNumberOfOptionArguments ( - myGradientOptionKey); - if (anArgumentIndex != aNumberOfGradientOptionArguments) - { - return false; - } - theColor1 = aColor1; - theColor2 = aColor2; - return true; - } - - //! Processes the gradient mode option - //! @param theGradientMode the fill method used for a background gradient filling - //! @return true if processing was successful, or false otherwise - bool processGradientModeOption (Aspect_GradientFillMethod& theGradientMode) const - { - return processGradientModeOption (myGradientModeOptionKey, theGradientMode); - } - - //! Processes the gradient mode option - //! @param theGradientModeOptionKey the key of the option that is interpreted as a gradient mode option - //! @param theGradientMode the fill method used for a background gradient filling - //! @return true if processing was successful, or false otherwise - bool processGradientModeOption (const ViewerTest_CommandOptionKey theGradientModeOptionKey, - Aspect_GradientFillMethod& theGradientMode) const - { - return processModeOption (theGradientModeOptionKey, getBackgroundGradientFillMethodByName, theGradientMode); - } - - //! Processes some mode option - //! @tparam TheMode the type of a mode to be processed - //! @param theModeOptionKey the key of the option that is interpreted as a mode option - //! @param theMode a mode to be processed - //! @return true if processing was successful, or false otherwise - template - bool processModeOption (const ViewerTest_CommandOptionKey theModeOptionKey, - bool (*const theGetModeByName) (const TCollection_AsciiString& /* theModeName */, - TheMode& /* theMode */), - TheMode& theMode) const - { - const Standard_Integer aNumberOfModeOptionArguments = myCommandParser.GetNumberOfOptionArguments ( - theModeOptionKey); - if (aNumberOfModeOptionArguments != 1) - { - return false; - } - std::string aModeString; - if (!myCommandParser.Arg (theModeOptionKey, 0, aModeString)) - { - return false; - } - TheMode aMode = TheMode(); - if (!theGetModeByName (aModeString.c_str(), aMode)) - { - return false; - } - theMode = aMode; - return true; - } - - //! Processes the color option - //! @param theColor a color used for filling a background - //! @return true if processing was successful, or false otherwise - bool processColorOption (Quantity_Color& theColor) const - { - return processColorOption (myColorOptionKey, theColor); - } - - //! Processes the color option - //! @param theColorOptionKey the key of the option that is interpreted as a color option - //! @param theColor a color used for filling a background - //! @return true if processing was successful, or false otherwise - bool processColorOption (const ViewerTest_CommandOptionKey theColorOptionKey, Quantity_Color& theColor) const - { - Standard_Integer anArgumentIndex = 0; - Quantity_Color aColor; - if (!myCommandParser.ArgColor (theColorOptionKey, anArgumentIndex, aColor)) - { - return false; - } - const Standard_Integer aNumberOfColorOptionArguments = myCommandParser.GetNumberOfOptionArguments ( - theColorOptionKey); - if (anArgumentIndex != aNumberOfColorOptionArguments) - { - return false; - } - theColor = aColor; - return true; - } - - //! Prints helping message - //! @param theBackgroundCommandName the name of the command that changes the background - //! @param theDrawInterpretor the interpreter of the Draw Harness application - //! @return true if printing was successful, or false otherwise - static bool printHelp (const char* const theBackgroundCommandName, Draw_Interpretor& theDrawInterpretor) - { - return theDrawInterpretor.PrintHelp (theBackgroundCommandName) == TCL_OK; - } - - //! Sets the cubemap as a background - //! @param theFileNames the array of filenames of packed or multifile cubemap - //! @param theOrder array of cubemap sides indexes mapping them from tiles in packed cubemap - static void setCubeMap (const NCollection_Array1& theFileNames, - const Graphic3d_ValidatedCubeMapOrder theOrder = Graphic3d_CubeMapOrder::Default(), - bool theZIsInverted = false, - bool theToGenPBREnv = true) - { - const Handle(V3d_View)& aCurrentView = ViewerTest::CurrentView(); - Handle(Graphic3d_CubeMap) aCubeMap; - - if (theFileNames.Size() == 1) - aCubeMap = new Graphic3d_CubeMapPacked(theFileNames[0], theOrder); - else - aCubeMap = new Graphic3d_CubeMapSeparate(theFileNames); - - aCubeMap->SetZInversion (theZIsInverted); - - aCubeMap->GetParams()->SetFilter(Graphic3d_TOTF_BILINEAR); - aCubeMap->GetParams()->SetRepeat(Standard_False); - aCubeMap->GetParams()->SetTextureUnit(Graphic3d_TextureUnit_EnvMap); - - aCurrentView->SetBackgroundCubeMap (aCubeMap, theToGenPBREnv, Standard_True); - } - - //! Sets the image as a background - //! @param theImageFileName the filename of the image to be used as a background - //! @param theImageMode the fill type used for a background image - static void setImage (const Standard_CString theImageFileName, const Aspect_FillMethod theImageMode) - { - const Handle (V3d_View)& aCurrentView = ViewerTest::CurrentView(); - aCurrentView->SetBackgroundImage (theImageFileName, theImageMode, Standard_True); - } - - //! Sets the fill type used for a background image - //! @param theImageMode the fill type used for a background image - static void setImageMode (const Aspect_FillMethod theImageMode) - { - const Handle (V3d_View)& aCurrentView = ViewerTest::CurrentView(); - aCurrentView->SetBgImageStyle (theImageMode, Standard_True); - } - - //! Sets the gradient filling for a background - //! @param theColor1 the gradient starting color - //! @param theColor2 the gradient ending color - //! @param theGradientMode the fill method used for a background gradient filling - static void setGradient (const Quantity_Color& theColor1, - const Quantity_Color& theColor2, - const Aspect_GradientFillMethod theGradientMode) - { - const Handle (V3d_View)& aCurrentView = ViewerTest::CurrentView(); - aCurrentView->SetBgGradientColors (theColor1, theColor2, theGradientMode, Standard_True); - } - - //! Sets the fill method used for a background gradient filling - //! @param theGradientMode the fill method used for a background gradient filling - static void setGradientMode (const Aspect_GradientFillMethod theGradientMode) - { - const Handle (V3d_View)& aCurrentView = ViewerTest::CurrentView(); - aCurrentView->SetBgGradientStyle (theGradientMode, Standard_True); - } - - //! Sets the color used for filling a background - //! @param theColor the color used for filling a background - static void setColor (const Quantity_Color& theColor) - { - const Handle (V3d_View)& aCurrentView = ViewerTest::CurrentView(); - aCurrentView->SetBgGradientStyle (Aspect_GFM_NONE); - aCurrentView->SetBackgroundColor (theColor); - aCurrentView->Update(); - } - - //! Sets the gradient filling for a background in a default viewer - //! @param theColor1 the gradient starting color - //! @param theColor2 the gradient ending color - //! @param theGradientMode the fill method used for a background gradient filling - static void setDefaultGradient (const Quantity_Color& theColor1, - const Quantity_Color& theColor2, - const Aspect_GradientFillMethod theGradientMode) - { - ViewerTest_DefaultBackground.GradientColor1 = theColor1; - ViewerTest_DefaultBackground.GradientColor2 = theColor2; - ViewerTest_DefaultBackground.FillMethod = theGradientMode; - setDefaultGradient(); - } - - //! Sets the color used for filling a background in a default viewer - //! @param theColor the color used for filling a background - static void setDefaultColor (const Quantity_Color& theColor) - { - ViewerTest_DefaultBackground.GradientColor1 = Quantity_Color(); - ViewerTest_DefaultBackground.GradientColor2 = Quantity_Color(); - ViewerTest_DefaultBackground.FillMethod = Aspect_GFM_NONE; - ViewerTest_DefaultBackground.FlatColor = theColor; - setDefaultGradient(); - setDefaultColor(); - } - //! Sets the gradient filling for a background in a default viewer. - //! Gradient settings are taken from ViewerTest_DefaultBackground structure - static void setDefaultGradient() + //! Sets the gradient filling for a background in a default viewer. + void SetDefaultGradient() + { + for (NCollection_DoubleMap::Iterator aCtxIter (ViewerTest_myContexts); + aCtxIter.More(); aCtxIter.Next()) { - for (NCollection_DoubleMap::Iterator - anInteractiveContextIterator (ViewerTest_myContexts); - anInteractiveContextIterator.More(); - anInteractiveContextIterator.Next()) - { - const Handle (V3d_Viewer)& aViewer = anInteractiveContextIterator.Value()->CurrentViewer(); - aViewer->SetDefaultBgGradientColors (ViewerTest_DefaultBackground.GradientColor1, - ViewerTest_DefaultBackground.GradientColor2, - ViewerTest_DefaultBackground.FillMethod); - } + const Handle (V3d_Viewer)& aViewer = aCtxIter.Value()->CurrentViewer(); + aViewer->SetDefaultBgGradientColors (GradientColor1, GradientColor2, FillMethod); } + } - //! Sets the color used for filling a background in a default viewer. - //! The color value is taken from ViewerTest_DefaultBackground structure - static void setDefaultColor() + //! Sets the color used for filling a background in a default viewer. + void SetDefaultColor() + { + for (NCollection_DoubleMap::Iterator aCtxIter (ViewerTest_myContexts); + aCtxIter.More(); aCtxIter.Next()) { - for (NCollection_DoubleMap::Iterator - anInteractiveContextIterator (ViewerTest_myContexts); - anInteractiveContextIterator.More(); - anInteractiveContextIterator.Next()) - { - const Handle (V3d_Viewer)& aViewer = anInteractiveContextIterator.Value()->CurrentViewer(); - aViewer->SetDefaultBackgroundColor (ViewerTest_DefaultBackground.FlatColor); - } + const Handle (V3d_Viewer)& aViewer = aCtxIter.Value()->CurrentViewer(); + aViewer->SetDefaultBackgroundColor (FlatColor); } - }; + } -} // namespace +} ViewerTest_DefaultBackground = { Quantity_NOC_BLACK, Quantity_NOC_BLACK, Quantity_NOC_BLACK, Aspect_GFM_NONE }; +//============================================================================== +// EVENT GLOBAL VARIABLES //============================================================================== #ifdef _WIN32 @@ -3769,36 +2576,421 @@ static int VPick (Draw_Interpretor& , return 0; } -namespace +//! Parse image fill method. +static bool parseImageMode (const TCollection_AsciiString& theName, + Aspect_FillMethod& theMode) +{ + TCollection_AsciiString aName = theName; + aName.LowerCase(); + if (aName == "none") + { + theMode = Aspect_FM_NONE; + } + else if (aName == "centered") + { + theMode = Aspect_FM_CENTERED; + } + else if (aName == "tiled") + { + theMode = Aspect_FM_TILED; + } + else if (aName == "stretch") + { + theMode = Aspect_FM_STRETCH; + } + else + { + return false; + } + return true; +} + +//! Parse gradient fill method. +static bool parseGradientMode (const TCollection_AsciiString& theName, + Aspect_GradientFillMethod& theMode) +{ + TCollection_AsciiString aName = theName; + aName.LowerCase(); + if (aName == "none") + { + theMode = Aspect_GFM_NONE; + } + else if (aName == "hor" + || aName == "horizontal") + { + theMode = Aspect_GFM_HOR; + } + else if (aName == "ver" + || aName == "vert" + || aName == "vertical") + { + theMode = Aspect_GFM_VER; + } + else if (aName == "diag" + || aName == "diagonal" + || aName == "diag1" + || aName == "diagonal1") + { + theMode = Aspect_GFM_DIAG1; + } + else if (aName == "diag2" + || aName == "diagonal2") + { + theMode = Aspect_GFM_DIAG2; + } + else if (aName == "corner1") + { + theMode = Aspect_GFM_CORNER1; + } + else if (aName == "corner2") + { + theMode = Aspect_GFM_CORNER2; + } + else if (aName == "corner3") + { + theMode = Aspect_GFM_CORNER3; + } + else if (aName == "corner4") + { + theMode = Aspect_GFM_CORNER4; + } + else + { + return false; + } + return true; +} + +//============================================================================== +//function : VBackground +//purpose : +//============================================================================== +static int VBackground (Draw_Interpretor& theDI, + Standard_Integer theNbArgs, + const char** theArgVec) { + if (theNbArgs < 2) + { + theDI << "Syntax error: wrong number of arguments"; + return 1; + } + + const TCollection_AsciiString aCmdName (theArgVec[0]); + bool isDefault = aCmdName == "vsetdefaultbg"; + Standard_Integer aNbColors = 0; + Quantity_ColorRGBA aColors[2]; + + Aspect_GradientFillMethod aGradientMode = Aspect_GFM_NONE; + bool hasGradientMode = false; + + TCollection_AsciiString anImagePath; + Aspect_FillMethod anImageMode = Aspect_FM_CENTERED; + bool hasImageMode = false; + + NCollection_Sequence aCubeMapSeq; + Graphic3d_CubeMapOrder aCubeOrder = Graphic3d_CubeMapOrder::Default(); + bool isCubeZInverted = false, isCubeGenPBREnv = true; + bool isSRgb = true; + + Handle(V3d_View) aView = ViewerTest::CurrentView(); + ViewerTest_AutoUpdater anUpdateTool (ViewerTest::GetAISContext(), aView); + for (Standard_Integer anArgIter = 1; anArgIter < theNbArgs; ++anArgIter) + { + TCollection_AsciiString anArg (theArgVec[anArgIter]); + anArg.LowerCase(); + if (anUpdateTool.parseRedrawMode (anArg)) + { + continue; + } + else if (anArg == "-default" + || anArg == "-def") + { + isDefault = true; + } + else if (anArgIter + 1 < theNbArgs + && (anArg == "-imagefile" + || anArg == "-imgfile" + || anArg == "-image" + || anArg == "-img")) + { + anImagePath = theArgVec[++anArgIter]; + } + else if (anArgIter + 1 < theNbArgs + && aCubeMapSeq.IsEmpty() + && (anArg == "-cubemap" + || anArg == "-cmap" + || anArg == "-cm")) + { + aCubeMapSeq.Append (theArgVec[++anArgIter]); + for (Standard_Integer aCubeSideIter = 1; anArgIter + aCubeSideIter < theNbArgs; ++aCubeSideIter) + { + TCollection_AsciiString aSideArg (theArgVec[anArgIter + aCubeSideIter]); + if (!aSideArg.IsEmpty() + && aSideArg.Value (1) == '-') + { + break; + } + + aCubeMapSeq.Append (aSideArg); + if (aCubeMapSeq.Size() == 6) + { + anArgIter += 5; + break; + } + } + + if (aCubeMapSeq.Size() > 1 + && aCubeMapSeq.Size() < 6) + { + aCubeMapSeq.Remove (2, aCubeMapSeq.Size()); + } + } + else if (anArgIter + 6 < theNbArgs + && anArg == "-order") + { + for (Standard_Integer aCubeSideIter = 0; aCubeSideIter < 6; ++aCubeSideIter) + { + Standard_Integer aSideArg = 0; + if (!Draw::ParseInteger (theArgVec[anArgIter + aCubeSideIter + 1], aSideArg) + || aSideArg < 0 + || aSideArg > 5) + { + theDI << "Syntax error at '" << theArgVec[anArgIter] << "'"; + return 1; + } + aCubeOrder.Set ((Graphic3d_CubeMapSide )aCubeSideIter, (unsigned char )aSideArg); + } + if (!aCubeOrder.IsValid()) + { + theDI << "Syntax error at '" << theArgVec[anArgIter] << "'"; + return 1; + } + anArgIter += 6; + } + else if (anArg == "-invertedz" + || anArg == "-noinvertedz" + || anArg == "-invz" + || anArg == "-noinvz") + { + isCubeZInverted = Draw::ParseOnOffNoIterator (theNbArgs, theArgVec, anArgIter); + } + else if (anArg == "-pbrenv" + || anArg == "-nopbrenv") + { + isCubeGenPBREnv = Draw::ParseOnOffNoIterator (theNbArgs, theArgVec, anArgIter); + } + else if (anArg == "-srgb" + || anArg == "-nosrgb") + { + isSRgb = Draw::ParseOnOffNoIterator (theNbArgs, theArgVec, anArgIter); + } + else if (aNbColors < 2 + && (anArg == "-color" + || anArg == "-col")) + { + Standard_Integer aNbParsed = Draw::ParseColor (theNbArgs - (anArgIter + 1), + theArgVec + (anArgIter + 1), + aColors[aNbColors].ChangeRGB()); + if (aNbParsed == 0) + { + theDI << "Syntax error at '" << theArgVec[anArgIter] << "'"; + return 1; + } + anArgIter += aNbParsed; + ++aNbColors; + } + else if (anArgIter + 1 < theNbArgs + && (anArg == "-gradientmode" + || anArg == "-gradmode" + || anArg == "-gradmd" + || anArg == "-grmode" + || anArg == "-grmd") + && parseGradientMode (theArgVec[anArgIter + 1], aGradientMode)) + { + ++anArgIter; + hasGradientMode = true; + } + else if (anArgIter + 1 < theNbArgs + && (anArg == "-imagemode" + || anArg == "-imgmode" + || anArg == "-imagemd" + || anArg == "-imgmd") + && parseImageMode (theArgVec[anArgIter + 1], anImageMode)) + { + ++anArgIter; + hasImageMode = true; + } + else if (aNbColors == 0 + && anArgIter + 2 < theNbArgs + && (anArg == "-gradient" + || anArg == "-grad" + || anArg == "-gr")) + { + Standard_Integer aNbParsed1 = Draw::ParseColor (theNbArgs - (anArgIter + 1), + theArgVec + (anArgIter + 1), + aColors[aNbColors].ChangeRGB()); + anArgIter += aNbParsed1; + ++aNbColors; + if (aNbParsed1 == 0) + { + theDI << "Syntax error at '" << theArgVec[anArgIter] << "'"; + return 1; + } + Standard_Integer aNbParsed2 = Draw::ParseColor (theNbArgs - (anArgIter + 1), + theArgVec + (anArgIter + 1), + aColors[aNbColors].ChangeRGB()); + anArgIter += aNbParsed2; + ++aNbColors; + if (aNbParsed2 == 0) + { + theDI << "Syntax error at '" << theArgVec[anArgIter] << "'"; + return 1; + } + } + else if (parseGradientMode (theArgVec[anArgIter], aGradientMode)) + { + hasGradientMode = true; + } + else if (aNbColors < 2 + && (Quantity_ColorRGBA::ColorFromName(theArgVec[anArgIter], aColors[aNbColors]) + || Quantity_ColorRGBA::ColorFromHex (theArgVec[anArgIter], aColors[aNbColors]))) + { + ++aNbColors; + } + else if (anImagePath.IsEmpty() + && aNbColors == 0 + && !hasGradientMode + && aCubeMapSeq.IsEmpty()) + { + anImagePath = theArgVec[anArgIter]; + } + else + { + theDI << "Syntax error at '" << theArgVec[anArgIter] << "'"; + return 1; + } + } + + if (!isDefault + && aView.IsNull()) + { + theDI << "Error: no active viewer"; + return 1; + } + else if (isDefault + && aNbColors == 0 + && !hasGradientMode) + { + theDI << "Syntax error at '-default'"; + return 1; + } + + if (aNbColors == 1) + { + if (isDefault) + { + ViewerTest_DefaultBackground.GradientColor1 = Quantity_Color(); + ViewerTest_DefaultBackground.GradientColor2 = Quantity_Color(); + ViewerTest_DefaultBackground.FillMethod = Aspect_GFM_NONE; + ViewerTest_DefaultBackground.FlatColor = aColors[0].GetRGB(); + ViewerTest_DefaultBackground.SetDefaultGradient(); + ViewerTest_DefaultBackground.SetDefaultColor(); + } + else + { + aView->SetBgGradientStyle (hasGradientMode ? aGradientMode : Aspect_GFM_NONE); + aView->SetBackgroundColor (aColors[0].GetRGB()); + } + } + else if (aNbColors == 2) + { + if (isDefault) + { + ViewerTest_DefaultBackground.GradientColor1 = aColors[0].GetRGB(); + ViewerTest_DefaultBackground.GradientColor2 = aColors[1].GetRGB(); + if (hasGradientMode) + { + ViewerTest_DefaultBackground.FillMethod = aGradientMode; + } + else if (ViewerTest_DefaultBackground.FillMethod == Aspect_GFM_NONE) + { + ViewerTest_DefaultBackground.FillMethod = Aspect_GFM_VER; + } + ViewerTest_DefaultBackground.SetDefaultGradient(); + } + else + { + if (!hasGradientMode) + { + aGradientMode = aView->GradientBackground().BgGradientFillMethod(); + if (aGradientMode == Aspect_GFM_NONE) + { + aGradientMode = Aspect_GFM_VER; + } + } + aView->SetBgGradientColors (aColors[0].GetRGB(), aColors[1].GetRGB(), aGradientMode); + } + } + else if (hasGradientMode) + { + if (isDefault) + { + ViewerTest_DefaultBackground.FillMethod = aGradientMode; + ViewerTest_DefaultBackground.SetDefaultGradient(); + } + else + { + aView->SetBgGradientStyle (aGradientMode); + } + } - //! Changes the background - //! @param theDrawInterpretor the interpreter of the Draw Harness application - //! @param theNumberOfCommandLineArguments the number of passed command line arguments - //! @param theCommandLineArguments the array of command line arguments - //! @return TCL_OK if changing was successful, or TCL_ERROR otherwise - static int vbackground (Draw_Interpretor& theDrawInterpretor, - const Standard_Integer theNumberOfCommandLineArguments, - const char** const theCommandLineArguments) + if (!anImagePath.IsEmpty()) { - if (theNumberOfCommandLineArguments < 1) + Handle(Graphic3d_Texture2D) aTextureMap = new Graphic3d_Texture2Dmanual (anImagePath); + aTextureMap->DisableModulate(); + aTextureMap->SetColorMap (isSRgb); + if (!aTextureMap->IsDone()) { - return TCL_ERROR; + theDI << "Syntax error at '" << anImagePath << "'"; + return 1; + } + aView->SetBackgroundImage (aTextureMap, anImageMode); + } + else if (hasImageMode) + { + aView->SetBgImageStyle (anImageMode); + } + + if (!aCubeMapSeq.IsEmpty()) + { + Handle(Graphic3d_CubeMap) aCubeMap; + if (aCubeMapSeq.Size() == 1) + { + aCubeMap = new Graphic3d_CubeMapPacked (aCubeMapSeq.First(), aCubeOrder.Validated()); } - BackgroundChanger aBackgroundChanger; - if (!aBackgroundChanger.ProcessCommandLine (theDrawInterpretor, - theNumberOfCommandLineArguments, - theCommandLineArguments)) + else { - theDrawInterpretor << "Wrong command arguments.\n" - "Type 'help " - << theCommandLineArguments[0] << "' for information about command options and its arguments.\n"; - return TCL_ERROR; + NCollection_Array1 aCubeMapArr (0, 5); + Standard_Integer aCubeSide = 0; + for (NCollection_Sequence::Iterator aFileIter (aCubeMapSeq); aFileIter.More(); aFileIter.Next(), ++aCubeSide) + { + aCubeMapArr[aCubeSide] = aFileIter.Value(); + } + aCubeMap = new Graphic3d_CubeMapSeparate (aCubeMapArr); } - return TCL_OK; + + aCubeMap->SetZInversion (isCubeZInverted); + aCubeMap->SetColorMap (isSRgb); + + aCubeMap->GetParams()->SetFilter (Graphic3d_TOTF_BILINEAR); + aCubeMap->GetParams()->SetRepeat (false); + aCubeMap->GetParams()->SetTextureUnit (Graphic3d_TextureUnit_EnvMap); + + aView->SetBackgroundCubeMap (aCubeMap, isCubeGenPBREnv); } -} // namespace + return 0; +} //============================================================================== //function : VScale @@ -14459,94 +13651,59 @@ void ViewerTest::ViewerCommands(Draw_Interpretor& theCommands) "vclear : vclear" "\n\t\t: remove all the object from the viewer", __FILE__,VClear,group); - theCommands.Add ( - "vbackground", - "Changes background or some background settings.\n" - "\n" - "Usage:\n" - " vbackground -imageFile ImageFile [-imageMode FillType]\n" - " vbackground -imageMode FillType\n" - " vbackground -gradient Color1 Color2 [-gradientMode FillMethod]\n" - " vbackground -gradientMode FillMethod\n" - " vbackground -cubemap CubemapFile1 [CubeMapFiles2-5] [-order TilesIndexes1-6] [-invertedz]\n" - " vbackground -color Color\n" - " vbackground -default -gradient Color1 Color2 [-gradientMode FillType]\n" - " vbackground -default -color Color\n" - " vbackground -help\n" - "\n" - "Options:\n" - " -imageFile (-imgFile, -image, -img): sets filename of image used as background\n" - " -imageMode (-imgMode, -imageMd, -imgMd): sets image fill type\n" - " -gradient (-grad, -gr): sets background gradient starting and ending colors\n" - " -gradientMode (-gradMode, -gradMd, -grMode, -grMd): sets gradient fill method\n" - " -cubemap (-cmap, -cm): sets environment cubemap as background\n" - " -invertedz (-invz, -iz): sets inversion of Z axis for background cubemap rendering\n" - " -order (-o): defines order of tiles in one image cubemap\n" - " (has no effect in case of multi image cubemaps)\n" - " -color (-col): sets background color\n" - " -default (-def): sets background default gradient or color\n" - " -help (-h): outputs short help message\n" - "\n" - "Arguments:\n" - " Color: Red Green Blue - where Red, Green, Blue must be integers within the range [0, 255]\n" - " or reals within the range [0.0, 1.0]\n" - " ColorName - one of WHITE, BLACK, RED, GREEN, BLUE, etc.\n" - " #HHH, [#]HHHHHH - where H is a hexadecimal digit (0 .. 9, a .. f, or A .. F)\n" - " FillMethod: one of NONE, HOR[IZONTAL], VER[TICAL], DIAG[ONAL]1, DIAG[ONAL]2, CORNER1, CORNER2, CORNER3, " - "CORNER4\n" - " FillType: one of CENTERED, TILED, STRETCH, NONE\n" - " ImageFile: a name of the file with the image used as a background\n" - " CubemapFilei: a name of the file with one image packed cubemap or names of separate files with every cubemap side\n" - " TileIndexi: a cubemap side index in range [0, 5] for i tile of one image packed cubemap\n", + theCommands.Add ("vbackground", + "vbackground [-color Color [-default]]" + "\n\t\t: [-gradient Color1 Color2 [-default]" + "\n\t\t: [-gradientMode {NONE|HORIZONTAL|VERTICAL|DIAG1|DIAG2|CORNER1|CORNER2|CORNER3}]=VERT]" + "\n\t\t: [-imageFile ImageFile [-imageMode {CENTERED|TILED|STRETCH|NONE}]=CENTERED [-srgb {0|1}]=1]" + "\n\t\t: [-cubemap CubemapFile1 [CubeMapFiles2-5] [-order TilesIndexes1-6] [-invertedz]=0 [-pbrEnv {0|1}]=1]" + "\n\t\t: Changes background or some background settings." + "\n\t\t: -color sets background color" + "\n\t\t: -gradient sets background gradient starting and ending colors" + "\n\t\t: -gradientMode sets gradient fill method" + "\n\t\t: -default sets background default gradient or color" + "\n\t\t: -imageFile sets filename of image used as background" + "\n\t\t: -imageMode sets image fill type" + "\n\t\t: -cubemap sets environment cubemap as background" + "\n\t\t: -invertedz sets inversion of Z axis for background cubemap rendering; FALSE when unspecified" + "\n\t\t: -pbrEnv sets PBR environment baking flag while updating cubemap; TRUE when unspecified" + "\n\t\t: -srgb prefer sRGB texture format when applicable; TRUE when unspecified" + "\n\t\t: -order defines order of tiles in one image cubemap" + "\n\t\t: TileIndexi defubes an index in range [0, 5] for i tile of one image packed cubemap" + "\n\t\t: (has no effect in case of multi-image cubemaps)", __FILE__, - vbackground, + VBackground, group); theCommands.Add ("vsetbg", - "Loads image as background." - "\n\t\t: vsetbg ImageFile [FillType]" - "\n\t\t: vsetbg -imageFile ImageFile [-imageMode FillType]" "\n\t\t: Alias for 'vbackground -imageFile ImageFile [-imageMode FillType]'.", __FILE__, - vbackground, + VBackground, group); theCommands.Add ("vsetbgmode", - "Changes background image fill type." - "\n\t\t: vsetbgmode [-imageMode] FillType" "\n\t\t: Alias for 'vbackground -imageMode FillType'.", __FILE__, - vbackground, + VBackground, group); theCommands.Add ("vsetgradientbg", - "Mounts gradient background." - "\n\t\t: vsetgradientbg Color1 Color2 [FillMethod]" - "\n\t\t: vsetgradientbg -gradient Color1 Color2 [-gradientMode FillMethod]" "\n\t\t: Alias for 'vbackground -gradient Color1 Color2 -gradientMode FillMethod'.", __FILE__, - vbackground, + VBackground, group); theCommands.Add ("vsetgrbgmode", - "Changes gradient background fill method." - "\n\t\t: vsetgrbgmode [-gradientMode] FillMethod" "\n\t\t: Alias for 'vbackground -gradientMode FillMethod'.", __FILE__, - vbackground, + VBackground, group); theCommands.Add ("vsetcolorbg", - "Sets background color." - "\n\t\t: vsetcolorbg [-color] Color." "\n\t\t: Alias for 'vbackground -color Color'.", __FILE__, - vbackground, + VBackground, group); theCommands.Add ("vsetdefaultbg", - "Sets default viewer background fill color (flat/gradient)." - "\n\t\t: vsetdefaultbg Color1 Color2 [FillMethod]" - "\n\t\t: vsetdefaultbg -gradient Color1 Color2 [-gradientMode FillMethod]" - "\n\t\t: Alias for 'vbackground -default -gradient Color1 Color2 [-gradientMode FillMethod]'." - "\n\t\t: vsetdefaultbg [-color] Color" - "\n\t\t: Alias for 'vbackground -default -color Color'.", + "\n\t\t: Alias for 'vbackground -default -gradient Color1 Color2 [-gradientMode FillMethod]'" + "\n\t\t: and for 'vbackground -default -color Color'.", __FILE__, - vbackground, + VBackground, group); theCommands.Add("vscale", "vscale : vscale X Y Z", diff --git a/tests/opengl/data/background/srgb b/tests/opengl/data/background/srgb new file mode 100644 index 0000000000..b2a7e823a5 --- /dev/null +++ b/tests/opengl/data/background/srgb @@ -0,0 +1,14 @@ +puts "================" +puts "0032579: Draw Harness, ViewerTest - extend vbackground -cubemap syntax to configure sRGB flag" +puts "================" +puts "" + +pload VISUALIZATION +vcaps -noExtensions +vinit View1 + +vbackground -image [locate_data_file carrelage1.gif] -srgb 0 +vdump $imagedir/${casename}_nosrgb.png + +vbackground -image [locate_data_file carrelage1.gif] -srgb 1 +vdump $imagedir/${casename}_srgb.png diff --git a/tests/opengles2/grids.list b/tests/opengles2/grids.list index 4ffa3b4af2..2c77980f19 100644 --- a/tests/opengles2/grids.list +++ b/tests/opengles2/grids.list @@ -1,5 +1,5 @@ #000 drivers -#001 background +001 background #002 clipping 004 general #005 geom From ea99d048d789776bbb0aa14eb483e06d7a84b783 Mon Sep 17 00:00:00 2001 From: kgv Date: Thu, 23 Sep 2021 00:50:20 +0300 Subject: [PATCH 070/639] 0032582: Configuration, genproj - make CSF_OPT_LIB64D configurable by genconf --- adm/genconf.tcl | 360 ++++++++++++++++++++++---------------------- adm/genconfdeps.tcl | 132 ++++++++++++++++ 2 files changed, 312 insertions(+), 180 deletions(-) diff --git a/adm/genconf.tcl b/adm/genconf.tcl index d866a74cd2..ff2444fa8c 100644 --- a/adm/genconf.tcl +++ b/adm/genconf.tcl @@ -56,6 +56,7 @@ lappend ::SYS_PRJNAME_LIST "Qt Creator (.pro)" set aPrjIndex [lsearch $::SYS_PRJFMT_LIST $::PRJFMT] set ::PRJNAME [lindex $::SYS_PRJNAME_LIST $aPrjIndex] +set ::CONFIG "Release" set SYS_VS_LIST {} set SYS_VC_LIST {} @@ -138,6 +139,13 @@ proc wokdep:gui:Close {} { exit } +proc wokdep:gui:configSuffix {} { + if { "$::CONFIG" == "Debug" } { + return "D" + } + return "" +} + proc wokdep:gui:SwitchConfig {} { set ::PRJFMT [lindex $::SYS_PRJFMT_LIST [.myFrame.myPrjFrame.myPrjCombo current]] set ::VCVER [lindex $::SYS_VC_LIST [.myFrame.myVsFrame.myVsCombo current]] @@ -148,16 +156,15 @@ proc wokdep:gui:SwitchConfig {} { set ::CSF_OPT_LIB64 {} set ::CSF_OPT_BIN32 {} set ::CSF_OPT_BIN64 {} + set ::CSF_OPT_LIB32D {} + set ::CSF_OPT_LIB64D {} + set ::CSF_OPT_BIN32D {} + set ::CSF_OPT_BIN64D {} wokdep:gui:UpdateList } proc wokdep:gui:SwitchArch {} { - if { "$::ARCH" == "32" } { - wokdep:gui:Show32Bitness ::aRowIter - } - if { "$::ARCH" == "64" } { - wokdep:gui:Show64Bitness ::aRowIter - } + wokdep:gui:Show3264Bitness ::aRowIter if { [llength [grid info .myFrame.mySave]] != 0 } { grid forget .myFrame.mySave .myFrame.myClose @@ -245,10 +252,25 @@ proc wokdep:gui:UpdateList {} { } .myFrame.myIncErrLbl configure -text [join $anIncErrs "\n"] - .myFrame.myLib32ErrLbl configure -text [join $anLib32Errs "\n"] - .myFrame.myLib64ErrLbl configure -text [join $anLib64Errs "\n"] - .myFrame.myBin32ErrLbl configure -text [join $anBin32Errs "\n"] - .myFrame.myBin64ErrLbl configure -text [join $anBin64Errs "\n"] + .myFrame.myLib32_ErrLbl configure -text [join $anLib32Errs "\n"] + .myFrame.myLib64_ErrLbl configure -text [join $anLib64Errs "\n"] + .myFrame.myBin32_ErrLbl configure -text [join $anBin32Errs "\n"] + .myFrame.myBin64_ErrLbl configure -text [join $anBin64Errs "\n"] + + .myFrame.myLib32D_ErrLbl configure -text [join $anLib32Errs "\n"] + .myFrame.myLib64D_ErrLbl configure -text [join $anLib64Errs "\n"] + .myFrame.myBin32D_ErrLbl configure -text [join $anBin32Errs "\n"] + .myFrame.myBin64D_ErrLbl configure -text [join $anBin64Errs "\n"] + + # merge duplicates + set ::CSF_OPT_LIB32 [lsort -unique $::CSF_OPT_LIB32] + set ::CSF_OPT_LIB64 [lsort -unique $::CSF_OPT_LIB64] + set ::CSF_OPT_BIN32 [lsort -unique $::CSF_OPT_BIN32] + set ::CSF_OPT_BIN64 [lsort -unique $::CSF_OPT_BIN64] + set ::CSF_OPT_LIB32D [lsort -unique $::CSF_OPT_LIB32D] + set ::CSF_OPT_LIB64D [lsort -unique $::CSF_OPT_LIB64D] + set ::CSF_OPT_BIN32D [lsort -unique $::CSF_OPT_BIN32D] + set ::CSF_OPT_BIN64D [lsort -unique $::CSF_OPT_BIN64D] } proc wokdep:gui:BrowseVcVars {} { @@ -274,34 +296,20 @@ proc wokdep:gui:AddIncPath {} { } } -proc wokdep:gui:AddLib32Path {} { - set aResult [tk_chooseDirectory -title "Choose a directory"] - if { "$aResult" != "" } { - lappend ::CSF_OPT_LIB32 "$aResult" - wokdep:gui:UpdateList - } -} - -proc wokdep:gui:AddLib64Path {} { - set aResult [tk_chooseDirectory -title "Choose a directory"] - if { "$aResult" != "" } { - lappend ::CSF_OPT_LIB64 "$aResult" - wokdep:gui:UpdateList - } -} - -proc wokdep:gui:AddBin32Path {} { +proc wokdep:gui:AddLibPath {} { + set aCfg [wokdep:gui:configSuffix] set aResult [tk_chooseDirectory -title "Choose a directory"] if { "$aResult" != "" } { - lappend ::CSF_OPT_BIN32 "$aResult" + lappend ::CSF_OPT_LIB${::ARCH}${aCfg} "$aResult" wokdep:gui:UpdateList } } -proc wokdep:gui:AddBin64Path {} { +proc wokdep:gui:AddBinPath {} { + set aCfg [wokdep:gui:configSuffix] set aResult [tk_chooseDirectory -title "Choose a directory"] if { "$aResult" != "" } { - lappend ::CSF_OPT_BIN64 "$aResult" + lappend ::CSF_OPT_BIN${::ARCH}${aCfg} "$aResult" wokdep:gui:UpdateList } } @@ -314,34 +322,20 @@ proc wokdep:gui:RemoveIncPath {} { wokdep:gui:UpdateList } -proc wokdep:gui:RemoveLib32Path {} { - set aSelIndices [.myFrame.myLib32List curselection] +proc wokdep:gui:RemoveLibPath {} { + set aCfg [wokdep:gui:configSuffix] + set aSelIndices [.myFrame.myLib${::ARCH}${aCfg}_List curselection] if { [llength $aSelIndices] != 0 } { - .myFrame.myLib32List delete [lindex $aSelIndices 0] + .myFrame.myLib${::ARCH}${aCfg}_List delete [lindex $aSelIndices 0] } wokdep:gui:UpdateList } -proc wokdep:gui:RemoveLib64Path {} { - set aSelIndices [.myFrame.myLib64List curselection] +proc wokdep:gui:RemoveBinPath {} { + set aCfg [wokdep:gui:configSuffix] + set aSelIndices [.myFrame.myBin${::ARCH}${aCfg}_List curselection] if { [llength $aSelIndices] != 0 } { - .myFrame.myLib64List delete [lindex $aSelIndices 0] - } - wokdep:gui:UpdateList -} - -proc wokdep:gui:RemoveBin32Path {} { - set aSelIndices [.myFrame.myBin32List curselection] - if { [llength $aSelIndices] != 0 } { - .myFrame.myBin32List delete [lindex $aSelIndices 0] - } - wokdep:gui:UpdateList -} - -proc wokdep:gui:RemoveBin64Path {} { - set aSelIndices [.myFrame.myBin64List curselection] - if { [llength $aSelIndices] != 0 } { - .myFrame.myBin64List delete [lindex $aSelIndices 0] + .myFrame.myBin${::ARCH}${aCfg}_List delete [lindex $aSelIndices 0] } wokdep:gui:UpdateList } @@ -351,109 +345,73 @@ proc wokdep:gui:ResetIncPath {} { wokdep:gui:UpdateList } -proc wokdep:gui:ResetLib32Path {} { - set ::CSF_OPT_LIB32 {} - wokdep:gui:UpdateList -} - -proc wokdep:gui:ResetLib64Path {} { - set ::CSF_OPT_LIB64 {} - wokdep:gui:UpdateList -} - -proc wokdep:gui:ResetBin32Path {} { - set ::CSF_OPT_BIN32 {} - wokdep:gui:UpdateList -} - -proc wokdep:gui:ResetBin64Path {} { - set ::CSF_OPT_BIN64 {} +proc wokdep:gui:ResetLibPath {} { + set ::CSF_OPT_LIB${::ARCH} {} + set ::CSF_OPT_LIB${::ARCH}D {} + set ::CSF_OPT_BIN${::ARCH} {} + set ::CSF_OPT_BIN${::ARCH}D {} wokdep:gui:UpdateList } -proc wokdep:gui:Show32Bitness { theRowIter } { - upvar $theRowIter aRowIter - - if { [llength [grid info .myFrame.myLib64Lbl]] != 0 } { - grid forget .myFrame.myLib64Lbl .myFrame.myLib64List .myFrame.myLib64Scrl - grid forget .myFrame.myLib64Add .myFrame.myLib64Remove .myFrame.myLib64Clear .myFrame.myLib64ErrLbl - grid forget .myFrame.myBin64Lbl .myFrame.myBin64List .myFrame.myBin64Scrl - grid forget .myFrame.myBin64Add .myFrame.myBin64Remove .myFrame.myBin64Clear .myFrame.myBin64ErrLbl - } - - # Additional libraries (32-bit) search paths - grid .myFrame.myLib32Lbl -row $aRowIter -column 0 -columnspan 10 -sticky w - incr aRowIter - grid .myFrame.myLib32List -row $aRowIter -column 0 -rowspan 4 -columnspan 5 - grid .myFrame.myLib32Scrl -row $aRowIter -column 5 -rowspan 4 - grid .myFrame.myLib32Add -row $aRowIter -column 6 - incr aRowIter - #grid .myFrame.myLib32Edit -row $aRowIter -column 6 - incr aRowIter - grid .myFrame.myLib32Remove -row $aRowIter -column 6 - incr aRowIter - grid .myFrame.myLib32Clear -row $aRowIter -column 6 - incr aRowIter - grid .myFrame.myLib32ErrLbl -row $aRowIter -column 0 -columnspan 10 -sticky w - incr aRowIter - - # Additional executables (32-bit) search paths - grid .myFrame.myBin32Lbl -row $aRowIter -column 0 -columnspan 10 -sticky w - incr aRowIter - grid .myFrame.myBin32List -row $aRowIter -column 0 -rowspan 4 -columnspan 5 - grid .myFrame.myBin32Scrl -row $aRowIter -column 5 -rowspan 4 - grid .myFrame.myBin32Add -row $aRowIter -column 6 - incr aRowIter - #grid .myFrame.myBin32Edit -row $aRowIter -column 6 - incr aRowIter - grid .myFrame.myBin32Remove -row $aRowIter -column 6 - incr aRowIter - grid .myFrame.myBin32Clear -row $aRowIter -column 6 - incr aRowIter - grid .myFrame.myBin32ErrLbl -row $aRowIter -column 0 -columnspan 10 -sticky w - incr aRowIter -} - -proc wokdep:gui:Show64Bitness { theRowIter } { +proc wokdep:gui:Show3264Bitness { theRowIter } { upvar $theRowIter aRowIter - if { [llength [grid info .myFrame.myLib32Lbl]] != 0 } { - grid forget .myFrame.myLib32Lbl .myFrame.myLib32List .myFrame.myLib32Scrl - grid forget .myFrame.myLib32Add .myFrame.myLib32Remove .myFrame.myLib32Clear .myFrame.myLib32ErrLbl - grid forget .myFrame.myBin32Lbl .myFrame.myBin32List .myFrame.myBin32Scrl - grid forget .myFrame.myBin32Add .myFrame.myBin32Remove .myFrame.myBin32Clear .myFrame.myBin32ErrLbl - } - - # Additional libraries (64-bit) search paths - grid .myFrame.myLib64Lbl -row $aRowIter -column 0 -columnspan 10 -sticky w + set aArchOld "" + set aCfg [wokdep:gui:configSuffix] + if { "$::ARCH" == "32" } { + set aArchOld "64" + } else { + set aArchOld "32" + } + + set aCfgOld "D" + if { "$::CONFIG" == "Debug" } { set aCfgOld "" } + set aDelArch ${aArchOld}${aCfg} + if { [llength [grid info .myFrame.myLib${aDelArch}_Lbl]] != 0 } { + grid forget .myFrame.myLib${aDelArch}_Lbl .myFrame.myLib${aDelArch}_List .myFrame.myLib${aDelArch}_Scrl + grid forget .myFrame.myLib${aDelArch}_Add .myFrame.myLib${aDelArch}_Remove .myFrame.myLib${aDelArch}_Clear .myFrame.myLib${aDelArch}_ErrLbl + grid forget .myFrame.myBin${aDelArch}_Lbl .myFrame.myBin${aDelArch}_List .myFrame.myBin${aDelArch}_Scrl + grid forget .myFrame.myBin${aDelArch}_Add .myFrame.myBin${aDelArch}_Remove .myFrame.myBin${aDelArch}_Clear .myFrame.myBin${aDelArch}_ErrLbl + } + set aDelCfg ${::ARCH}${aCfgOld} + if { [llength [grid info .myFrame.myLib${aDelCfg}_Lbl]] != 0 } { + grid forget .myFrame.myLib${aDelCfg}_Lbl .myFrame.myLib${aDelCfg}_List .myFrame.myLib${aDelCfg}_Scrl + grid forget .myFrame.myLib${aDelCfg}_Add .myFrame.myLib${aDelCfg}_Remove .myFrame.myLib${aDelCfg}_Clear .myFrame.myLib${aDelCfg}_ErrLbl + grid forget .myFrame.myBin${aDelCfg}_Lbl .myFrame.myBin${aDelCfg}_List .myFrame.myBin${aDelCfg}_Scrl + grid forget .myFrame.myBin${aDelCfg}_Add .myFrame.myBin${aDelCfg}_Remove .myFrame.myBin${aDelCfg}_Clear .myFrame.myBin${aDelCfg}_ErrLbl + } + + set aNewCfg ${::ARCH}${aCfg} + # Additional libraries search paths + grid .myFrame.myLib${aNewCfg}_Lbl -row $aRowIter -column 0 -columnspan 10 -sticky w incr aRowIter - grid .myFrame.myLib64List -row $aRowIter -column 0 -rowspan 4 -columnspan 5 - grid .myFrame.myLib64Scrl -row $aRowIter -column 5 -rowspan 4 - grid .myFrame.myLib64Add -row $aRowIter -column 6 + grid .myFrame.myLib${aNewCfg}_List -row $aRowIter -column 0 -rowspan 4 -columnspan 5 + grid .myFrame.myLib${aNewCfg}_Scrl -row $aRowIter -column 5 -rowspan 4 + grid .myFrame.myLib${aNewCfg}_Add -row $aRowIter -column 6 incr aRowIter - #grid .myFrame.myLib64Edit -row $aRowIter -column 6 + #grid .myFrame.myLib${aNewCfg}_Edit -row $aRowIter -column 6 incr aRowIter - grid .myFrame.myLib64Remove -row $aRowIter -column 6 + grid .myFrame.myLib${aNewCfg}_Remove -row $aRowIter -column 6 incr aRowIter - grid .myFrame.myLib64Clear -row $aRowIter -column 6 + grid .myFrame.myLib${aNewCfg}_Clear -row $aRowIter -column 6 incr aRowIter - grid .myFrame.myLib64ErrLbl -row $aRowIter -column 0 -columnspan 10 -sticky w + grid .myFrame.myLib${aNewCfg}_ErrLbl -row $aRowIter -column 0 -columnspan 10 -sticky w incr aRowIter - # Additional executables (64-bit) search paths - grid .myFrame.myBin64Lbl -row $aRowIter -column 0 -columnspan 10 -sticky w + # Additional executables search paths + grid .myFrame.myBin${aNewCfg}_Lbl -row $aRowIter -column 0 -columnspan 10 -sticky w incr aRowIter - grid .myFrame.myBin64List -row $aRowIter -column 0 -rowspan 4 -columnspan 5 - grid .myFrame.myBin64Scrl -row $aRowIter -column 5 -rowspan 4 - grid .myFrame.myBin64Add -row $aRowIter -column 6 + grid .myFrame.myBin${aNewCfg}_List -row $aRowIter -column 0 -rowspan 4 -columnspan 5 + grid .myFrame.myBin${aNewCfg}_Scrl -row $aRowIter -column 5 -rowspan 4 + grid .myFrame.myBin${aNewCfg}_Add -row $aRowIter -column 6 incr aRowIter - #grid .myFrame.myBin64Edit -row $aRowIter -column 6 + #grid .myFrame.myBin${aNewCfg}_Edit -row $aRowIter -column 6 incr aRowIter - grid .myFrame.myBin64Remove -row $aRowIter -column 6 + grid .myFrame.myBin${aNewCfg}_Remove -row $aRowIter -column 6 incr aRowIter - grid .myFrame.myBin64Clear -row $aRowIter -column 6 + grid .myFrame.myBin${aNewCfg}_Clear -row $aRowIter -column 6 incr aRowIter - grid .myFrame.myBin64ErrLbl -row $aRowIter -column 0 -columnspan 10 -sticky w + grid .myFrame.myBin${aNewCfg}_ErrLbl -row $aRowIter -column 0 -columnspan 10 -sticky w incr aRowIter } @@ -463,6 +421,7 @@ ttk::combobox .myFrame.myPrjFrame.myPrjCombo -values $SYS_PRJNAME_LIST -state ttk::label .myFrame.myVsFrame.myVsLbl -text "Visual Studio configuration:" -padding {5 5 20 5} ttk::combobox .myFrame.myVsFrame.myVsCombo -values $SYS_VS_LIST -state readonly -textvariable VSVER -width 40 ttk::combobox .myFrame.myVsFrame.myArchCombo -values { {32} {64} } -textvariable ARCH -state readonly -width 6 +ttk::combobox .myFrame.myVsFrame.myConfigCombo -values { {Release} {Debug} } -textvariable CONFIG -state readonly -width 6 entry .myFrame.myVcEntry -textvariable VCVER -width 10 entry .myFrame.myVcVarsEntry -textvariable VCVARS -width 70 ttk::button .myFrame.myVcBrowseBtn -text "Browse" -command wokdep:gui:BrowseVcVars @@ -535,44 +494,84 @@ ttk::button .myFrame.myIncClear -text "Reset" -command wokdep:gui:ResetIncP ttk::label .myFrame.myIncErrLbl -text "Error: " -foreground red -padding {5 5 5 5} # Additional libraries (32-bit) search paths -ttk::label .myFrame.myLib32Lbl -text "Additional libraries (32-bit) search paths:" -padding {5 5 80 5} -scrollbar .myFrame.myLib32Scrl -command ".myFrame.myLib32List yview" -listbox .myFrame.myLib32List -listvariable CSF_OPT_LIB32 -width 80 -height 5 -yscrollcommand ".myFrame.myLib32Scrl set" -ttk::button .myFrame.myLib32Add -text "Add" -command wokdep:gui:AddLib32Path -ttk::button .myFrame.myLib32Edit -text "Edit" -ttk::button .myFrame.myLib32Remove -text "Remove" -command wokdep:gui:RemoveLib32Path -ttk::button .myFrame.myLib32Clear -text "Reset" -command wokdep:gui:ResetLib32Path -ttk::label .myFrame.myLib32ErrLbl -text "Error: " -foreground red -padding {5 5 5 5} +ttk::label .myFrame.myLib32_Lbl -text "Additional libraries (32-bit) search paths:" -padding {5 5 80 5} +scrollbar .myFrame.myLib32_Scrl -command ".myFrame.myLib32_List yview" +listbox .myFrame.myLib32_List -listvariable CSF_OPT_LIB32 -width 80 -height 5 -yscrollcommand ".myFrame.myLib32_Scrl set" +ttk::button .myFrame.myLib32_Add -text "Add" -command wokdep:gui:AddLibPath +ttk::button .myFrame.myLib32_Edit -text "Edit" +ttk::button .myFrame.myLib32_Remove -text "Remove" -command wokdep:gui:RemoveLibPath +ttk::button .myFrame.myLib32_Clear -text "Reset" -command wokdep:gui:ResetLibPath +ttk::label .myFrame.myLib32_ErrLbl -text "Error: " -foreground red -padding {5 5 5 5} + +# Additional debug libraries (32-bit) search paths +ttk::label .myFrame.myLib32D_Lbl -text "Additional debug libraries (32-bit) search paths:" -padding {5 5 80 5} +scrollbar .myFrame.myLib32D_Scrl -command ".myFrame.myLib32D_List yview" +listbox .myFrame.myLib32D_List -listvariable CSF_OPT_LIB32D -width 80 -height 5 -yscrollcommand ".myFrame.myLib32D_Scrl set" +ttk::button .myFrame.myLib32D_Add -text "Add" -command wokdep:gui:AddLibPath +ttk::button .myFrame.myLib32D_Edit -text "Edit" +ttk::button .myFrame.myLib32D_Remove -text "Remove" -command wokdep:gui:RemoveLibPath +ttk::button .myFrame.myLib32D_Clear -text "Reset" -command wokdep:gui:ResetLibPath +ttk::label .myFrame.myLib32D_ErrLbl -text "Error: " -foreground red -padding {5 5 5 5} # Additional libraries (64-bit) search paths -ttk::label .myFrame.myLib64Lbl -text "Additional libraries (64-bit) search paths:" -padding {5 5 80 5} -scrollbar .myFrame.myLib64Scrl -command ".myFrame.myLib64List yview" -listbox .myFrame.myLib64List -listvariable CSF_OPT_LIB64 -width 80 -height 5 -yscrollcommand ".myFrame.myLib64Scrl set" -ttk::button .myFrame.myLib64Add -text "Add" -command wokdep:gui:AddLib64Path -ttk::button .myFrame.myLib64Edit -text "Edit" -ttk::button .myFrame.myLib64Remove -text "Remove" -command wokdep:gui:RemoveLib64Path -ttk::button .myFrame.myLib64Clear -text "Reset" -command wokdep:gui:ResetLib64Path -ttk::label .myFrame.myLib64ErrLbl -text "Error: " -foreground red -padding {5 5 5 5} +ttk::label .myFrame.myLib64_Lbl -text "Additional libraries (64-bit) search paths:" -padding {5 5 80 5} +scrollbar .myFrame.myLib64_Scrl -command ".myFrame.myLib64_List yview" +listbox .myFrame.myLib64_List -listvariable CSF_OPT_LIB64 -width 80 -height 5 -yscrollcommand ".myFrame.myLib64_Scrl set" +ttk::button .myFrame.myLib64_Add -text "Add" -command wokdep:gui:AddLibPath +ttk::button .myFrame.myLib64_Edit -text "Edit" +ttk::button .myFrame.myLib64_Remove -text "Remove" -command wokdep:gui:RemoveLibPath +ttk::button .myFrame.myLib64_Clear -text "Reset" -command wokdep:gui:ResetLibPath +ttk::label .myFrame.myLib64_ErrLbl -text "Error: " -foreground red -padding {5 5 5 5} + +# Additional debug libraries (64-bit) search paths +ttk::label .myFrame.myLib64D_Lbl -text "Additional debug libraries (64-bit) search paths:" -padding {5 5 80 5} +scrollbar .myFrame.myLib64D_Scrl -command ".myFrame.myLib64D_List yview" +listbox .myFrame.myLib64D_List -listvariable CSF_OPT_LIB64D -width 80 -height 5 -yscrollcommand ".myFrame.myLib64D_Scrl set" +ttk::button .myFrame.myLib64D_Add -text "Add" -command wokdep:gui:AddLibPath +ttk::button .myFrame.myLib64D_Edit -text "Edit" +ttk::button .myFrame.myLib64D_Remove -text "Remove" -command wokdep:gui:RemoveLibPath +ttk::button .myFrame.myLib64D_Clear -text "Reset" -command wokdep:gui:ResetLibPath +ttk::label .myFrame.myLib64D_ErrLbl -text "Error: " -foreground red -padding {5 5 5 5} # Additional executables (32-bit) search paths -ttk::label .myFrame.myBin32Lbl -text "Additional executables (32-bit) search paths:" -padding {5 5 80 5} -scrollbar .myFrame.myBin32Scrl -command ".myFrame.myBin32List yview" -listbox .myFrame.myBin32List -listvariable CSF_OPT_BIN32 -width 80 -height 5 -yscrollcommand ".myFrame.myBin32Scrl set" -ttk::button .myFrame.myBin32Add -text "Add" -command wokdep:gui:AddBin32Path -ttk::button .myFrame.myBin32Edit -text "Edit" -ttk::button .myFrame.myBin32Remove -text "Remove" -command wokdep:gui:RemoveBin32Path -ttk::button .myFrame.myBin32Clear -text "Reset" -command wokdep:gui:ResetBin32Path -ttk::label .myFrame.myBin32ErrLbl -text "Error: " -foreground red -padding {5 5 5 5} +ttk::label .myFrame.myBin32_Lbl -text "Additional executables (32-bit) search paths:" -padding {5 5 80 5} +scrollbar .myFrame.myBin32_Scrl -command ".myFrame.myBin32_List yview" +listbox .myFrame.myBin32_List -listvariable CSF_OPT_BIN32 -width 80 -height 5 -yscrollcommand ".myFrame.myBin32_Scrl set" +ttk::button .myFrame.myBin32_Add -text "Add" -command wokdep:gui:AddBinPath +ttk::button .myFrame.myBin32_Edit -text "Edit" +ttk::button .myFrame.myBin32_Remove -text "Remove" -command wokdep:gui:RemoveBinPath +ttk::button .myFrame.myBin32_Clear -text "Reset" -command wokdep:gui:ResetLibPath +ttk::label .myFrame.myBin32_ErrLbl -text "Error: " -foreground red -padding {5 5 5 5} + +# Additional debug executables (32-bit) search paths +ttk::label .myFrame.myBin32D_Lbl -text "Additional debug executables (32-bit) search paths:" -padding {5 5 80 5} +scrollbar .myFrame.myBin32D_Scrl -command ".myFrame.myBin32D_List yview" +listbox .myFrame.myBin32D_List -listvariable CSF_OPT_BIN32D -width 80 -height 5 -yscrollcommand ".myFrame.myBin32D_Scrl set" +ttk::button .myFrame.myBin32D_Add -text "Add" -command wokdep:gui:AddBinPath +ttk::button .myFrame.myBin32D_Edit -text "Edit" +ttk::button .myFrame.myBin32D_Remove -text "Remove" -command wokdep:gui:RemoveBinPath +ttk::button .myFrame.myBin32D_Clear -text "Reset" -command wokdep:gui:ResetLibPath +ttk::label .myFrame.myBin32D_ErrLbl -text "Error: " -foreground red -padding {5 5 5 5} # Additional executables (64-bit) search paths -ttk::label .myFrame.myBin64Lbl -text "Additional executables (64-bit) search paths:" -padding {5 5 80 5} -scrollbar .myFrame.myBin64Scrl -command ".myFrame.myBin64List yview" -listbox .myFrame.myBin64List -listvariable CSF_OPT_BIN64 -width 80 -height 5 -yscrollcommand ".myFrame.myBin64Scrl set" -ttk::button .myFrame.myBin64Add -text "Add" -command wokdep:gui:AddBin64Path -ttk::button .myFrame.myBin64Edit -text "Edit" -ttk::button .myFrame.myBin64Remove -text "Remove" -command wokdep:gui:RemoveBin64Path -ttk::button .myFrame.myBin64Clear -text "Reset" -command wokdep:gui:ResetBin64Path -ttk::label .myFrame.myBin64ErrLbl -text "Error: " -foreground red -padding {5 5 5 5} +ttk::label .myFrame.myBin64_Lbl -text "Additional executables (64-bit) search paths:" -padding {5 5 80 5} +scrollbar .myFrame.myBin64_Scrl -command ".myFrame.myBin64_List yview" +listbox .myFrame.myBin64_List -listvariable CSF_OPT_BIN64 -width 80 -height 5 -yscrollcommand ".myFrame.myBin64_Scrl set" +ttk::button .myFrame.myBin64_Add -text "Add" -command wokdep:gui:AddBinPath +ttk::button .myFrame.myBin64_Edit -text "Edit" +ttk::button .myFrame.myBin64_Remove -text "Remove" -command wokdep:gui:RemoveBinPath +ttk::button .myFrame.myBin64_Clear -text "Reset" -command wokdep:gui:ResetLibPath +ttk::label .myFrame.myBin64_ErrLbl -text "Error: " -foreground red -padding {5 5 5 5} + +# Additional debug executables (64-bit) search paths +ttk::label .myFrame.myBin64D_Lbl -text "Additional debug executables (64-bit) search paths:" -padding {5 5 80 5} +scrollbar .myFrame.myBin64D_Scrl -command ".myFrame.myBin64D_List yview" +listbox .myFrame.myBin64D_List -listvariable CSF_OPT_BIN64D -width 80 -height 5 -yscrollcommand ".myFrame.myBin64D_Scrl set" +ttk::button .myFrame.myBin64D_Add -text "Add" -command wokdep:gui:AddBinPath +ttk::button .myFrame.myBin64D_Edit -text "Edit" +ttk::button .myFrame.myBin64D_Remove -text "Remove" -command wokdep:gui:RemoveBinPath +ttk::button .myFrame.myBin64D_Clear -text "Reset" -command wokdep:gui:ResetLibPath +ttk::label .myFrame.myBin64D_ErrLbl -text "Error: " -foreground red -padding {5 5 5 5} # Bottom ttk::button .myFrame.mySave -text "Save" -command wokdep:SaveCustom @@ -583,17 +582,22 @@ ttk::button .myFrame.myClose -text "Close" -command wokdep:gui:Close grid .myFrame.myPrjFrame -row $aRowIter -column 0 -columnspan 10 -sticky w grid .myFrame.myPrjFrame.myPrjLbl -row 0 -column 0 grid .myFrame.myPrjFrame.myPrjCombo -row 0 -column 1 -incr aRowIter if { "$tcl_platform(platform)" == "windows" } { + incr aRowIter grid .myFrame.myVsFrame -row $aRowIter -column 0 -columnspan 10 -sticky w grid .myFrame.myVsFrame.myVsLbl -row 0 -column 0 grid .myFrame.myVsFrame.myVsCombo -row 0 -column 1 -padx 5 grid .myFrame.myVsFrame.myArchCombo -row 0 -column 2 + grid .myFrame.myVsFrame.myConfigCombo -row 0 -column 3 incr aRowIter grid .myFrame.myVcEntry -row $aRowIter -column 0 grid .myFrame.myVcVarsEntry -row $aRowIter -column 1 -columnspan 4 -sticky w grid .myFrame.myVcBrowseBtn -row $aRowIter -column 6 incr aRowIter +} else { + grid .myFrame.myVsFrame -row $aRowIter -column 4 -sticky w + grid .myFrame.myVsFrame.myConfigCombo -row 0 -column 0 + incr aRowIter } # @@ -686,15 +690,8 @@ incr aRowIter grid .myFrame.myIncErrLbl -row $aRowIter -column 0 -columnspan 10 -sticky w incr aRowIter -# Additional 32-bit search paths -if { "$ARCH" == "32" } { - wokdep:gui:Show32Bitness aRowIter -} - -# Additional 64-bit search paths -if { "$ARCH" == "64" } { - wokdep:gui:Show64Bitness aRowIter -} +# Additional search paths +wokdep:gui:Show3264Bitness aRowIter # Bottom section grid .myFrame.mySave -row $aRowIter -column 4 -columnspan 2 @@ -710,6 +707,9 @@ bind .myFrame.myVsFrame.myVsCombo <> { bind .myFrame.myVsFrame.myArchCombo <> { wokdep:gui:SwitchArch } +bind .myFrame.myVsFrame.myConfigCombo <> { + wokdep:gui:SwitchArch +} .myFrame.mySrchEntry configure -validate all -validatecommand { set ::PRODUCTS_PATH [file normalize "$::PRODUCTS_PATH_INPUT"] diff --git a/adm/genconfdeps.tcl b/adm/genconfdeps.tcl index 10ef1978cb..189613f170 100644 --- a/adm/genconfdeps.tcl +++ b/adm/genconfdeps.tcl @@ -52,6 +52,10 @@ set CSF_OPT_LIB32 [list] set CSF_OPT_LIB64 [list] set CSF_OPT_BIN32 [list] set CSF_OPT_BIN64 [list] +set CSF_OPT_LIB32D [list] +set CSF_OPT_LIB64D [list] +set CSF_OPT_BIN32D [list] +set CSF_OPT_BIN64D [list] if { "$tcl_platform(pointerSize)" == "4" } { set ARCH "32" @@ -116,6 +120,35 @@ if { [info exists ::env(CSF_OPT_BIN64)] } { set CSF_OPT_BIN64 [split "$::env(CSF_OPT_BIN64)" $::SYS_PATH_SPLITTER] } +if { [info exists ::env(CSF_OPT_LIB32D)] } { + set CSF_OPT_LIB32D [split "$::env(CSF_OPT_LIB32D)" $::SYS_PATH_SPLITTER] + foreach aLibIter $::CSF_OPT_LIB32 { + set aPos [lsearch -exact $::CSF_OPT_LIB32D $aLibIter] + set ::CSF_OPT_LIB32D [lreplace $::CSF_OPT_LIB32D $aPos $aPos] + } +} +if { [info exists ::env(CSF_OPT_LIB64D)] } { + set CSF_OPT_LIB64D [split "$::env(CSF_OPT_LIB64D)" $::SYS_PATH_SPLITTER] + foreach aLibIter $::CSF_OPT_LIB64 { + set aPos [lsearch -exact $::CSF_OPT_LIB64D $aLibIter] + set ::CSF_OPT_LIB64D [lreplace $::CSF_OPT_LIB64D $aPos $aPos] + } +} +if { [info exists ::env(CSF_OPT_BIN32D)] } { + set CSF_OPT_BIN32D [split "$::env(CSF_OPT_BIN32D)" $::SYS_PATH_SPLITTER] + foreach aLibIter $::CSF_OPT_BIN32 { + set aPos [lsearch -exact $::CSF_OPT_BIN32D $aLibIter] + set ::CSF_OPT_BIN32D [lreplace $::CSF_OPT_BIN32D $aPos $aPos] + } +} +if { [info exists ::env(CSF_OPT_BIN64D)] } { + set CSF_OPT_BIN64D [split "$::env(CSF_OPT_BIN64D)" $::SYS_PATH_SPLITTER] + foreach aLibIter $::CSF_OPT_BIN64 { + set aPos [lsearch -exact $::CSF_OPT_BIN64D $aLibIter] + set ::CSF_OPT_BIN64D [lreplace $::CSF_OPT_BIN64D $aPos $aPos] + } +} + # Search header file in $::CSF_OPT_INC and standard paths proc wokdep:SearchHeader {theHeader} { # search in custom paths @@ -316,6 +349,12 @@ proc wokdep:SearchStandardLibrary {theErrInc theErrLib32 theErrLib64 theErrBin32 lappend ::CSF_OPT_LIB$anArchIter "$aPath/lib" lappend ::CSF_OPT_BIN$anArchIter "$aPath/bin" set hasLib true + + set aLibDPath [wokdep:SearchLib "$theCheckLib" "$anArchIter" "$aPath/libd"] + if { "$aLibDPath" != "" } { + lappend ::CSF_OPT_LIB${anArchIter}D "$aPath/libd" + lappend ::CSF_OPT_BIN${anArchIter}D "$aPath/bind" + } break } } @@ -1287,6 +1326,18 @@ proc wokdep:SaveCustom {} { puts $aFile "rem Additional libraries (32-bit) search paths" puts $aFile "set \"CSF_OPT_LIB32=$aStringLib32\"" + set aStringLib32d [join $::CSF_OPT_LIB32D $::SYS_PATH_SPLITTER] + if { "$::PRODUCTS_PATH" != "" } { + set aStringLib32d [regsub -all "$::PRODUCTS_PATH" $aStringLib32d "%PRODUCTS_PATH%"] + } + puts $aFile "" + puts $aFile "rem Additional debug libraries (32-bit) search paths" + if { "$aStringLib32d" != "" && "$aStringLib32" != "" } { + puts $aFile "set \"CSF_OPT_LIB32D=$aStringLib32d;%CSF_OPT_LIB32%\"" + } else { + puts $aFile "set \"CSF_OPT_LIB32D=$aStringLib32d\"" + } + set aStringLib64 [join $::CSF_OPT_LIB64 $::SYS_PATH_SPLITTER] if { "$::PRODUCTS_PATH" != "" } { set aStringLib64 [regsub -all "$::PRODUCTS_PATH" $aStringLib64 "%PRODUCTS_PATH%"] @@ -1295,6 +1346,18 @@ proc wokdep:SaveCustom {} { puts $aFile "rem Additional libraries (64-bit) search paths" puts $aFile "set \"CSF_OPT_LIB64=$aStringLib64\"" + set aStringLib64d [join $::CSF_OPT_LIB64D $::SYS_PATH_SPLITTER] + if { "$::PRODUCTS_PATH" != "" } { + set aStringLib64d [regsub -all "$::PRODUCTS_PATH" $aStringLib64d "%PRODUCTS_PATH%"] + } + puts $aFile "" + puts $aFile "rem Additional debug libraries (64-bit) search paths" + if { "$aStringLib64d" != "" && "$aStringLib64" != "" } { + puts $aFile "set \"CSF_OPT_LIB64D=$aStringLib64d;%CSF_OPT_LIB64%\"" + } else { + puts $aFile "set \"CSF_OPT_LIB64D=$aStringLib64d\"" + } + set aStringBin32 [join $::CSF_OPT_BIN32 $::SYS_PATH_SPLITTER] if { "$::PRODUCTS_PATH" != "" } { set aStringBin32 [regsub -all "$::PRODUCTS_PATH" $aStringBin32 "%PRODUCTS_PATH%"] @@ -1303,6 +1366,18 @@ proc wokdep:SaveCustom {} { puts $aFile "rem Additional (32-bit) search paths" puts $aFile "set \"CSF_OPT_BIN32=$aStringBin32\"" + set aStringBin32d [join $::CSF_OPT_BIN32D $::SYS_PATH_SPLITTER] + if { "$::PRODUCTS_PATH" != "" } { + set aStringBin32d [regsub -all "$::PRODUCTS_PATH" $aStringBin32d "%PRODUCTS_PATH%"] + } + puts $aFile "" + puts $aFile "rem Additional debug (32-bit) search paths" + if { "$aStringBin32d" != "" && "$aStringBin32" != "" } { + puts $aFile "set \"CSF_OPT_BIN32D=$aStringBin32d;%CSF_OPT_BIN32%\"" + } else { + puts $aFile "set \"CSF_OPT_BIN32D=$aStringBin32d\"" + } + set aStringBin64 [join $::CSF_OPT_BIN64 $::SYS_PATH_SPLITTER] if { "$::PRODUCTS_PATH" != "" } { set aStringBin64 [regsub -all "$::PRODUCTS_PATH" $aStringBin64 "%PRODUCTS_PATH%"] @@ -1311,6 +1386,18 @@ proc wokdep:SaveCustom {} { puts $aFile "rem Additional (64-bit) search paths" puts $aFile "set \"CSF_OPT_BIN64=$aStringBin64\"" + set aStringBin64d [join $::CSF_OPT_BIN64D $::SYS_PATH_SPLITTER] + if { "$::PRODUCTS_PATH" != "" } { + set aStringBin64d [regsub -all "$::PRODUCTS_PATH" $aStringBin64d "%PRODUCTS_PATH%"] + } + puts $aFile "" + puts $aFile "rem Additional debug (64-bit) search paths" + if { "$aStringBin64d" != "" && "$aStringBin64" != "" } { + puts $aFile "set \"CSF_OPT_BIN64D=$aStringBin64d;%CSF_OPT_BIN64%\"" + } else { + puts $aFile "set \"CSF_OPT_BIN64D=$aStringBin64d\"" + } + close $aFile } else { set aCustomFilePath "./custom.sh" @@ -1352,6 +1439,18 @@ proc wokdep:SaveCustom {} { puts $aFile "# Additional libraries ($::ARCH-bit) search paths" puts $aFile "export CSF_OPT_LIB$::ARCH=\"[set aStringLib]\"" + set aStringLibD [join [set ::CSF_OPT_LIB${::ARCH}D] $::SYS_PATH_SPLITTER] + if { "$::PRODUCTS_PATH" != "" } { + set aStringLibD [regsub -all "$::PRODUCTS_PATH" $aStringLibD "\${PRODUCTS_PATH}"] + } + puts $aFile "" + puts $aFile "# Additional debug libraries ($::ARCH-bit) search paths" + if { "$aStringLibD" != "" && "$aStringLib" != "" } { + puts $aFile "export CSF_OPT_LIB${::ARCH}D=\"[set aStringLibD]:\$CSF_OPT_LIB${::ARCH}\"" + } else { + puts $aFile "export CSF_OPT_LIB${::ARCH}D=\"[set aStringLibD]\"" + } + set aStringBin [join [set ::CSF_OPT_BIN$::ARCH] $::SYS_PATH_SPLITTER] if { "$::PRODUCTS_PATH" != "" } { set aStringBin [regsub -all "$::PRODUCTS_PATH" $aStringBin "\${PRODUCTS_PATH}"] @@ -1360,6 +1459,18 @@ proc wokdep:SaveCustom {} { puts $aFile "# Additional ($::ARCH-bit) search paths" puts $aFile "export CSF_OPT_BIN$::ARCH=\"[set aStringBin]\"" + set aStringBinD [join [set ::CSF_OPT_BIN${::ARCH}D] $::SYS_PATH_SPLITTER] + if { "$::PRODUCTS_PATH" != "" } { + set aStringBinD [regsub -all "$::PRODUCTS_PATH" $aStringBinD "\${PRODUCTS_PATH}"] + } + puts $aFile "" + puts $aFile "# Additional debug ($::ARCH-bit) search paths" + if { "$aStringBinD" != "" && "$aStringBin" != "" } { + puts $aFile "export CSF_OPT_BIN${::ARCH}D=\"[set aStringBinD]:\$CSF_OPT_BIN${::ARCH}\"" + } else { + puts $aFile "export CSF_OPT_BIN${::ARCH}D=\"[set aStringBinD]\"" + } + close $aFile } puts "Configuration saved to file '$aCustomFilePath'" @@ -1397,6 +1508,27 @@ proc wokdep:SaveCustom {} { puts $aFile "INCLUDEPATH += \"${anIncPath}\"" } + puts $aFile "" + puts $aFile "CONFIG(debug, debug|release) {" + puts $aFile " # Additional debug libraries search paths" + foreach aLibPath [set ::CSF_OPT_LIB${::ARCH}D] { + if { "$::PRODUCTS_PATH" != "" } { + set aLibPath [regsub -all "$::PRODUCTS_PATH" $aLibPath "\$\$\{PRODUCTS_PATH\}"] + } + puts $aFile " LIBS += -L\"${aLibPath}\"" + } + if { "$::tcl_platform(platform)" == "windows" } { + puts $aFile "" + puts $aFile " # Additional debug DLLs search paths" + foreach aDllPath [set ::CSF_OPT_BIN${::ARCH}D] { + if { "$::PRODUCTS_PATH" != "" } { + set aDllPath [regsub -all "$::PRODUCTS_PATH" $aDllPath "\$\$\{PRODUCTS_PATH\}"] + } + puts $aFile " LIBS += -L\"${aDllPath}\"" + } + } + puts $aFile "}" + puts $aFile "" puts $aFile "# Additional libraries search paths" foreach aLibPath [set ::CSF_OPT_LIB$::ARCH] { From 3be25c11705b931ff623f372a24e3e1b2203899c Mon Sep 17 00:00:00 2001 From: kgv Date: Thu, 23 Sep 2021 23:52:42 +0300 Subject: [PATCH 071/639] 0032585: Data Exchange, RWGltf_CafWriter - include OCCT version --- src/RWGltf/RWGltf_CafWriter.cxx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/RWGltf/RWGltf_CafWriter.cxx b/src/RWGltf/RWGltf_CafWriter.cxx index b54198fba7..301c866674 100644 --- a/src/RWGltf/RWGltf_CafWriter.cxx +++ b/src/RWGltf/RWGltf_CafWriter.cxx @@ -31,6 +31,7 @@ #include #include #include +#include #include #include #include @@ -1207,7 +1208,7 @@ void RWGltf_CafWriter::writeAsset (const TColStd_IndexedDataMapOfStringString& t myWriter->Key (RWGltf_GltfRootElementName (RWGltf_GltfRootElement_Asset)); myWriter->StartObject(); myWriter->Key ("generator"); - myWriter->String ("Open CASCADE Technology [dev.opencascade.org]"); + myWriter->String ("Open CASCADE Technology " OCC_VERSION_STRING " [dev.opencascade.org]"); myWriter->Key ("version"); myWriter->String ("2.0"); // glTF format version From 9af0d66b849ddce139dad856da170ce53db7b1e2 Mon Sep 17 00:00:00 2001 From: achesnok Date: Tue, 21 Sep 2021 18:42:21 +0300 Subject: [PATCH 072/639] 0031039: Visualization - add elliptical gradient background style Added new elliptical gradient fill method and updated vbackground command. Renamed enum values of Aspect_GradientFillMethod and defined aliases for old ones. Changed draw mode in OpenGl_BackgroundArray from triangle-strip to GL_TRIANGLES. --- src/Aspect/Aspect_GradientBackground.cxx | 2 +- src/Aspect/Aspect_GradientBackground.hxx | 57 +++------ src/Aspect/Aspect_GradientFillMethod.hxx | 33 +++-- src/OpenGl/OpenGl_BackgroundArray.cxx | 125 +++++++++++++++---- src/OpenGl/OpenGl_View.cxx | 2 +- src/V3d/V3d_View.hxx | 4 +- src/V3d/V3d_Viewer.hxx | 2 +- src/ViewerTest/ViewerTest_OpenGlCommands.cxx | 2 +- src/ViewerTest/ViewerTest_ViewerCommands.cxx | 41 +++--- tests/opengl/data/background/bug25775 | 3 + tests/opengl/data/background/elliptical | 10 ++ 11 files changed, 181 insertions(+), 100 deletions(-) create mode 100644 tests/opengl/data/background/elliptical diff --git a/src/Aspect/Aspect_GradientBackground.cxx b/src/Aspect/Aspect_GradientBackground.cxx index 6bbfc67a34..ae3a2754c9 100644 --- a/src/Aspect/Aspect_GradientBackground.cxx +++ b/src/Aspect/Aspect_GradientBackground.cxx @@ -22,7 +22,7 @@ Aspect_GradientBackground::Aspect_GradientBackground () { SetColor( Black ); MyColor2 = Black; - MyGradientMethod = Aspect_GFM_NONE; + MyGradientMethod = Aspect_GradientFillMethod_None; } diff --git a/src/Aspect/Aspect_GradientBackground.hxx b/src/Aspect/Aspect_GradientBackground.hxx index 2bc111e731..c204ea32d2 100644 --- a/src/Aspect/Aspect_GradientBackground.hxx +++ b/src/Aspect/Aspect_GradientBackground.hxx @@ -16,68 +16,45 @@ #ifndef _Aspect_GradientBackground_HeaderFile #define _Aspect_GradientBackground_HeaderFile -#include -#include -#include - -#include #include #include -class Quantity_Color; - -//! This class allows the definition of -//! a window gradient background. +//! This class allows the definition of a window gradient background. class Aspect_GradientBackground : public Aspect_Background { public: DEFINE_STANDARD_ALLOC - //! Creates a window gradient background. - //! Default colors : Quantity_NOC_BLACK. - //! Default fill method : Aspect_GFM_NONE + //! Default color is Quantity_NOC_BLACK. + //! Default fill method is Aspect_GradientFillMethod_None. Standard_EXPORT Aspect_GradientBackground(); - - //! Creates a window gradient background with colours . - Standard_EXPORT Aspect_GradientBackground(const Quantity_Color& AColor1, const Quantity_Color& AColor2, const Aspect_GradientFillMethod AMethod = Aspect_GFM_HOR); - - //! Modifies the colours of the window gradient background . - Standard_EXPORT void SetColors (const Quantity_Color& AColor1, const Quantity_Color& AColor2, const Aspect_GradientFillMethod AMethod = Aspect_GFM_HOR); - - //! Returns colours of the window gradient background . - Standard_EXPORT void Colors (Quantity_Color& AColor1, Quantity_Color& AColor2) const; - - //! Returns the current gradient background fill mode. - Standard_EXPORT Aspect_GradientFillMethod BgGradientFillMethod() const; - - //! Dumps the content of me into the stream - Standard_EXPORT void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const; + //! Creates a window gradient background with two colours. + Standard_EXPORT Aspect_GradientBackground (const Quantity_Color& theColor1, + const Quantity_Color& theColor2, + const Aspect_GradientFillMethod theMethod = Aspect_GradientFillMethod_Horizontal); + //! Modifies the colours of the window gradient background. + Standard_EXPORT void SetColors (const Quantity_Color& theColor1, + const Quantity_Color& theColor2, + const Aspect_GradientFillMethod theMethod = Aspect_GradientFillMethod_Horizontal); + //! Returns colours of the window gradient background. + Standard_EXPORT void Colors (Quantity_Color& theColor1, Quantity_Color& theColor2) const; -protected: - - - + //! Returns the current gradient background fill mode. + Standard_EXPORT Aspect_GradientFillMethod BgGradientFillMethod() const; + //! Dumps the content of me into the stream + Standard_EXPORT void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const; private: - - Quantity_Color MyColor2; Aspect_GradientFillMethod MyGradientMethod; - }; - - - - - - #endif // _Aspect_GradientBackground_HeaderFile diff --git a/src/Aspect/Aspect_GradientFillMethod.hxx b/src/Aspect/Aspect_GradientFillMethod.hxx index cb6315defb..a3231c8898 100644 --- a/src/Aspect/Aspect_GradientFillMethod.hxx +++ b/src/Aspect/Aspect_GradientFillMethod.hxx @@ -16,19 +16,30 @@ #ifndef _Aspect_GradientFillMethod_HeaderFile #define _Aspect_GradientFillMethod_HeaderFile -//! Defines the fill methods to -//! write gradient background in a window. +//! Defines the fill methods to write gradient background in a window. enum Aspect_GradientFillMethod { -Aspect_GFM_NONE, -Aspect_GFM_HOR, -Aspect_GFM_VER, -Aspect_GFM_DIAG1, -Aspect_GFM_DIAG2, -Aspect_GFM_CORNER1, -Aspect_GFM_CORNER2, -Aspect_GFM_CORNER3, -Aspect_GFM_CORNER4 + Aspect_GradientFillMethod_None, //!< fill method not specified + Aspect_GradientFillMethod_Horizontal, //!< gradient directed from left (Color1) to right (Color2) + Aspect_GradientFillMethod_Vertical, //!< gradient directed from top (Color1) to bottom (Color2) + Aspect_GradientFillMethod_Diagonal1, //!< gradient directed from upper left corner (Color1) to lower right (Color2) + Aspect_GradientFillMethod_Diagonal2, //!< gradient directed from upper right corner (Color1) to lower left (Color2) + Aspect_GradientFillMethod_Corner1, //!< highlights upper left corner with Color1 + Aspect_GradientFillMethod_Corner2, //!< highlights upper right corner with Color1 + Aspect_GradientFillMethod_Corner3, //!< highlights lower right corner with Color1 + Aspect_GradientFillMethod_Corner4, //!< highlights lower left corner with Color1 + Aspect_GradientFillMethod_Elliptical, //!< gradient directed from center (Color1) in all directions forming an elliptic shape (Color2) + + // obsolete aliases + Aspect_GFM_NONE = Aspect_GradientFillMethod_None, + Aspect_GFM_HOR = Aspect_GradientFillMethod_Horizontal, + Aspect_GFM_VER = Aspect_GradientFillMethod_Vertical, + Aspect_GFM_DIAG1 = Aspect_GradientFillMethod_Diagonal1, + Aspect_GFM_DIAG2 = Aspect_GradientFillMethod_Diagonal2, + Aspect_GFM_CORNER1 = Aspect_GradientFillMethod_Corner1, + Aspect_GFM_CORNER2 = Aspect_GradientFillMethod_Corner2, + Aspect_GFM_CORNER3 = Aspect_GradientFillMethod_Corner3, + Aspect_GFM_CORNER4 = Aspect_GradientFillMethod_Corner4 }; #endif // _Aspect_GradientFillMethod_HeaderFile diff --git a/src/OpenGl/OpenGl_BackgroundArray.cxx b/src/OpenGl/OpenGl_BackgroundArray.cxx index 6bd9193068..cceff8f511 100644 --- a/src/OpenGl/OpenGl_BackgroundArray.cxx +++ b/src/OpenGl/OpenGl_BackgroundArray.cxx @@ -25,19 +25,19 @@ // purpose : // ======================================================================= OpenGl_BackgroundArray::OpenGl_BackgroundArray (const Graphic3d_TypeOfBackground theType) -: OpenGl_PrimitiveArray (NULL, Graphic3d_TOPA_TRIANGLESTRIPS, NULL, NULL, NULL), +: OpenGl_PrimitiveArray (NULL, Graphic3d_TOPA_TRIANGLES, NULL, NULL, NULL), myType (theType), myFillMethod (Aspect_FM_NONE), myViewWidth (0), myViewHeight (0), myToUpdate (Standard_False) { - myDrawMode = GL_TRIANGLE_STRIP; + myDrawMode = GL_TRIANGLES; myIsFillType = true; myGradientParams.color1 = OpenGl_Vec4 (0.0f, 0.0f, 0.0f, 1.0f); myGradientParams.color2 = OpenGl_Vec4 (0.0f, 0.0f, 0.0f, 1.0f); - myGradientParams.type = Aspect_GFM_NONE; + myGradientParams.type = Aspect_GradientFillMethod_None; } // ======================================================================= @@ -112,7 +112,7 @@ bool OpenGl_BackgroundArray::IsDefined() const { switch (myType) { - case Graphic3d_TOB_GRADIENT: return myGradientParams.type != Aspect_GFM_NONE; + case Graphic3d_TOB_GRADIENT: return myGradientParams.type != Aspect_GradientFillMethod_None; case Graphic3d_TOB_TEXTURE: return myFillMethod != Aspect_FM_NONE; case Graphic3d_TOB_CUBEMAP: return Standard_True; case Graphic3d_TOB_NONE: return Standard_False; @@ -136,6 +136,16 @@ void OpenGl_BackgroundArray::invalidateData() Standard_Boolean OpenGl_BackgroundArray::init (const Handle(OpenGl_Workspace)& theWorkspace) const { const Handle(OpenGl_Context)& aCtx = theWorkspace->GetGlContext(); + + if (myIndices.IsNull()) + { + myIndices = new Graphic3d_IndexBuffer (Graphic3d_Buffer::DefaultAllocator()); + } + if (myAttribs.IsNull()) + { + myAttribs = new Graphic3d_Buffer (Graphic3d_Buffer::DefaultAllocator()); + } + switch (myType) { case Graphic3d_TOB_GRADIENT: @@ -195,10 +205,6 @@ Standard_Boolean OpenGl_BackgroundArray::createGradientArray (const Handle(OpenG { Graphic3d_TOA_COLOR, Graphic3d_TOD_VEC3 } }; - if (myAttribs.IsNull()) - { - myAttribs = new Graphic3d_Buffer (Graphic3d_Buffer::DefaultAllocator()); - } if (!myAttribs->Init (4, aGragientAttribInfo, 2)) { return Standard_False; @@ -218,7 +224,7 @@ Standard_Boolean OpenGl_BackgroundArray::createGradientArray (const Handle(OpenG switch (myGradientParams.type) { - case Aspect_GFM_HOR: + case Aspect_GradientFillMethod_Horizontal: { aCorners[0] = myGradientParams.color2.ChangeData(); aCorners[1] = myGradientParams.color2.ChangeData(); @@ -226,7 +232,7 @@ Standard_Boolean OpenGl_BackgroundArray::createGradientArray (const Handle(OpenG aCorners[3] = myGradientParams.color1.ChangeData(); break; } - case Aspect_GFM_VER: + case Aspect_GradientFillMethod_Vertical: { aCorners[0] = myGradientParams.color2.ChangeData(); aCorners[1] = myGradientParams.color1.ChangeData(); @@ -234,7 +240,7 @@ Standard_Boolean OpenGl_BackgroundArray::createGradientArray (const Handle(OpenG aCorners[3] = myGradientParams.color1.ChangeData(); break; } - case Aspect_GFM_DIAG1: + case Aspect_GradientFillMethod_Diagonal1: { aCorners[0] = myGradientParams.color2.ChangeData(); aCorners[3] = myGradientParams.color1.ChangeData(); @@ -245,7 +251,7 @@ Standard_Boolean OpenGl_BackgroundArray::createGradientArray (const Handle(OpenG aCorners[2] = aDiagCorner2; break; } - case Aspect_GFM_DIAG2: + case Aspect_GradientFillMethod_Diagonal2: { aCorners[1] = myGradientParams.color1.ChangeData(); aCorners[2] = myGradientParams.color2.ChangeData(); @@ -256,7 +262,7 @@ Standard_Boolean OpenGl_BackgroundArray::createGradientArray (const Handle(OpenG aCorners[3] = aDiagCorner2; break; } - case Aspect_GFM_CORNER1: + case Aspect_GradientFillMethod_Corner1: { aVertices[0] = OpenGl_Vec2(float(myViewWidth), float(myViewHeight)); aVertices[1] = OpenGl_Vec2(0.0f, float(myViewHeight)); @@ -269,7 +275,7 @@ Standard_Boolean OpenGl_BackgroundArray::createGradientArray (const Handle(OpenG aCorners[3] = myGradientParams.color2.ChangeData(); break; } - case Aspect_GFM_CORNER2: + case Aspect_GradientFillMethod_Corner2: { aCorners[0] = myGradientParams.color2.ChangeData(); aCorners[1] = myGradientParams.color1.ChangeData(); @@ -277,7 +283,7 @@ Standard_Boolean OpenGl_BackgroundArray::createGradientArray (const Handle(OpenG aCorners[3] = myGradientParams.color2.ChangeData(); break; } - case Aspect_GFM_CORNER3: + case Aspect_GradientFillMethod_Corner3: { aVertices[0] = OpenGl_Vec2(float(myViewWidth), float(myViewHeight)); aVertices[1] = OpenGl_Vec2(0.0f, float(myViewHeight)); @@ -290,7 +296,7 @@ Standard_Boolean OpenGl_BackgroundArray::createGradientArray (const Handle(OpenG aCorners[3] = myGradientParams.color2.ChangeData(); break; } - case Aspect_GFM_CORNER4: + case Aspect_GradientFillMethod_Corner4: { aCorners[0] = myGradientParams.color2.ChangeData(); aCorners[1] = myGradientParams.color2.ChangeData(); @@ -298,7 +304,53 @@ Standard_Boolean OpenGl_BackgroundArray::createGradientArray (const Handle(OpenG aCorners[3] = myGradientParams.color2.ChangeData(); break; } - case Aspect_GFM_NONE: + case Aspect_GradientFillMethod_Elliptical: + { + // construction of a circle circumscribed about a view rectangle + // using parametric equation (scaled by aspect ratio and centered) + const Standard_Integer aSubdiv = 64; + if (!myAttribs->Init (aSubdiv + 2, aGragientAttribInfo, 2)) + { + return Standard_False; + } + + OpenGl_Vec2 anEllipVerts[aSubdiv + 2]; + anEllipVerts[0] = OpenGl_Vec2 (float (myViewWidth) / 2.0f, float (myViewHeight) / 2.0f); + Standard_Real aTetta = (M_PI * 2.0) / aSubdiv; + Standard_Real aParam = 0.0; + for (Standard_Integer anIt = 1; anIt < aSubdiv + 2; ++anIt) + { + anEllipVerts[anIt] = OpenGl_Vec2 (float (Cos (aParam) * Sqrt (2.0) * myViewWidth / 2.0 + myViewWidth / 2.0f), + float (Sin (aParam) * Sqrt (2.0) * myViewHeight / 2.0 + myViewHeight / 2.0f)); + + aParam += aTetta; + } + for (Standard_Integer anIt = 0; anIt < aSubdiv + 2; ++anIt) + { + OpenGl_Vec2* aVertData = reinterpret_cast(myAttribs->changeValue (anIt)); + *aVertData = anEllipVerts[anIt]; + + OpenGl_Vec3* aColorData = reinterpret_cast(myAttribs->changeValue (anIt) + myAttribs->AttributeOffset (1)); + *aColorData = myGradientParams.color2.rgb(); + } + // the central vertex is colored in different way + OpenGl_Vec3* aColorData = reinterpret_cast(myAttribs->changeValue (0) + myAttribs->AttributeOffset (1)); + *aColorData = myGradientParams.color1.rgb(); + + if (!myIndices->Init (3 * aSubdiv)) + { + return Standard_False; + } + for (Standard_Integer aCurTri = 0; aCurTri < aSubdiv; aCurTri++) + { + myIndices->SetIndex (aCurTri * 3 + 0, 0); + myIndices->SetIndex (aCurTri * 3 + 1, aCurTri + 1); + myIndices->SetIndex (aCurTri * 3 + 2, aCurTri + 2); + } + + return Standard_True; + } + case Aspect_GradientFillMethod_None: { break; } @@ -313,6 +365,15 @@ Standard_Boolean OpenGl_BackgroundArray::createGradientArray (const Handle(OpenG *aColorData = theCtx->Vec4FromQuantityColor (OpenGl_Vec4(aCorners[anIt][0], aCorners[anIt][1], aCorners[anIt][2], 1.0f)).rgb(); } + if (!myIndices->Init(6)) + { + return Standard_False; + } + const unsigned short THE_FS_QUAD_TRIS[6] = {0, 1, 2, 1, 3, 2}; + for (unsigned int aVertIter = 0; aVertIter < 6; ++aVertIter) + { + myIndices->SetIndex (aVertIter, THE_FS_QUAD_TRIS[aVertIter]); + } return Standard_True; } @@ -328,10 +389,6 @@ Standard_Boolean OpenGl_BackgroundArray::createTextureArray (const Handle(OpenGl { Graphic3d_TOA_UV, Graphic3d_TOD_VEC2 } }; - if (myAttribs.IsNull()) - { - myAttribs = new Graphic3d_Buffer (Graphic3d_Buffer::DefaultAllocator()); - } if (!myAttribs->Init (4, aTextureAttribInfo, 2)) { return Standard_False; @@ -386,6 +443,16 @@ Standard_Boolean OpenGl_BackgroundArray::createTextureArray (const Handle(OpenGl aData[0] = OpenGl_Vec2 (-anOffsetX, aCoef * anOffsetY); aData[1] = OpenGl_Vec2 (0.0f, aCoef * aTexRangeY); + if (!myIndices->Init(6)) + { + return Standard_False; + } + const unsigned short THE_FS_QUAD_TRIS[6] = {0, 1, 2, 1, 3, 2}; + for (unsigned int aVertIter = 0; aVertIter < 6; ++aVertIter) + { + myIndices->SetIndex (aVertIter, THE_FS_QUAD_TRIS[aVertIter]); + } + return Standard_True; } @@ -406,7 +473,7 @@ Standard_Boolean OpenGl_BackgroundArray::createCubeMapArray() const myIndices = new Graphic3d_IndexBuffer (Graphic3d_Buffer::DefaultAllocator()); } if (!myAttribs->Init (8, aCubeMapAttribInfo, 1) - || !myIndices->Init (14)) + || !myIndices->Init (6 * 3 * 2)) { return Standard_False; } @@ -423,10 +490,18 @@ Standard_Boolean OpenGl_BackgroundArray::createCubeMapArray() const aData[7].SetValues ( 1.0, 1.0, -1.0); } { - const unsigned short THE_BOX_TRISTRIP[14] = { 0, 1, 2, 3, 7, 1, 5, 4, 7, 6, 2, 4, 0, 1 }; - for (unsigned int aVertIter = 0; aVertIter < 14; ++aVertIter) + const unsigned short THE_BOX_TRIS[] = + { + 0, 1, 2, 2, 1, 3, // top face + 1, 5, 7, 1, 7, 3, // right face + 0, 6, 4, 0, 2, 6, // left face + 4, 6, 5, 6, 7, 5, // bottom face + 0, 5, 1, 0, 4, 5, // front face + 2, 7, 6, 2, 3, 7 // back face + }; + for (unsigned int aVertIter = 0; aVertIter < 6 * 3 * 2; ++aVertIter) { - myIndices->SetIndex (aVertIter, THE_BOX_TRISTRIP[aVertIter]); + myIndices->SetIndex (aVertIter, THE_BOX_TRIS[aVertIter]); } } diff --git a/src/OpenGl/OpenGl_View.cxx b/src/OpenGl/OpenGl_View.cxx index 0fd648c30c..ed411f2fc4 100644 --- a/src/OpenGl/OpenGl_View.cxx +++ b/src/OpenGl/OpenGl_View.cxx @@ -967,7 +967,7 @@ void OpenGl_View::drawBackground (const Handle(OpenGl_Workspace)& theWorkspace, || myBackgroundType == Graphic3d_TOB_TEXTURE) { // Drawing background gradient if: - // - gradient fill type is not Aspect_GFM_NONE and + // - gradient fill type is not Aspect_GradientFillMethod_None and // - either background texture is no specified or it is drawn in Aspect_FM_CENTERED mode if (myBackgrounds[Graphic3d_TOB_GRADIENT]->IsDefined() && (!myTextureParams->Aspect()->ToMapTexture() diff --git a/src/V3d/V3d_View.hxx b/src/V3d/V3d_View.hxx index 22beabcc7e..e48a255d26 100644 --- a/src/V3d/V3d_View.hxx +++ b/src/V3d/V3d_View.hxx @@ -188,11 +188,11 @@ public: //! and the fill method (horizontal by default). Standard_EXPORT void SetBgGradientColors (const Quantity_Color& theColor1, const Quantity_Color& theColor2, - const Aspect_GradientFillMethod theFillStyle = Aspect_GFM_HOR, + const Aspect_GradientFillMethod theFillStyle = Aspect_GradientFillMethod_Horizontal, const Standard_Boolean theToUpdate = Standard_False); //! Defines the gradient background fill method of the view. - Standard_EXPORT void SetBgGradientStyle (const Aspect_GradientFillMethod theMethod = Aspect_GFM_HOR, + Standard_EXPORT void SetBgGradientStyle (const Aspect_GradientFillMethod theMethod = Aspect_GradientFillMethod_Horizontal, const Standard_Boolean theToUpdate = Standard_False); //! Defines the background texture of the view by supplying the texture image file name diff --git a/src/V3d/V3d_Viewer.hxx b/src/V3d/V3d_Viewer.hxx index 2e368f82db..4e8aa7d8cd 100644 --- a/src/V3d/V3d_Viewer.hxx +++ b/src/V3d/V3d_Viewer.hxx @@ -130,7 +130,7 @@ public: //! attached to the viewer by supplying the colour objects void SetDefaultBgGradientColors (const Quantity_Color& theColor1, const Quantity_Color& theColor2, - const Aspect_GradientFillMethod theFillStyle = Aspect_GFM_HOR) + const Aspect_GradientFillMethod theFillStyle = Aspect_GradientFillMethod_Horizontal) { myGradientBackground.SetColors (theColor1, theColor2, theFillStyle); } diff --git a/src/ViewerTest/ViewerTest_OpenGlCommands.cxx b/src/ViewerTest/ViewerTest_OpenGlCommands.cxx index dd42d4a8f5..7f4af79439 100644 --- a/src/ViewerTest/ViewerTest_OpenGlCommands.cxx +++ b/src/ViewerTest/ViewerTest_OpenGlCommands.cxx @@ -926,7 +926,7 @@ static Standard_Integer VListColors (Draw_Interpretor& theDI, ViewerTest::ViewerInit (0, 0, anImgParams.Width, anImgParams.Height, "TmpDriver/TmpViewer/TmpView"); aView = ViewerTest::CurrentView(); aView->SetImmediateUpdate (false); - aView->SetBgGradientStyle (Aspect_GFM_NONE, false); + aView->SetBgGradientStyle (Aspect_GradientFillMethod_None, false); } if (!aDumpFile.IsEmpty()) diff --git a/src/ViewerTest/ViewerTest_ViewerCommands.cxx b/src/ViewerTest/ViewerTest_ViewerCommands.cxx index 8200867aab..6a3a1f74a9 100644 --- a/src/ViewerTest/ViewerTest_ViewerCommands.cxx +++ b/src/ViewerTest/ViewerTest_ViewerCommands.cxx @@ -214,7 +214,7 @@ static struct } } -} ViewerTest_DefaultBackground = { Quantity_NOC_BLACK, Quantity_NOC_BLACK, Quantity_NOC_BLACK, Aspect_GFM_NONE }; +} ViewerTest_DefaultBackground = { Quantity_NOC_BLACK, Quantity_NOC_BLACK, Quantity_NOC_BLACK, Aspect_GradientFillMethod_None }; //============================================================================== // EVENT GLOBAL VARIABLES @@ -2613,46 +2613,51 @@ static bool parseGradientMode (const TCollection_AsciiString& theName, aName.LowerCase(); if (aName == "none") { - theMode = Aspect_GFM_NONE; + theMode = Aspect_GradientFillMethod_None; } else if (aName == "hor" || aName == "horizontal") { - theMode = Aspect_GFM_HOR; + theMode = Aspect_GradientFillMethod_Horizontal; } else if (aName == "ver" || aName == "vert" || aName == "vertical") { - theMode = Aspect_GFM_VER; + theMode = Aspect_GradientFillMethod_Vertical; } else if (aName == "diag" || aName == "diagonal" || aName == "diag1" || aName == "diagonal1") { - theMode = Aspect_GFM_DIAG1; + theMode = Aspect_GradientFillMethod_Diagonal1; } else if (aName == "diag2" || aName == "diagonal2") { - theMode = Aspect_GFM_DIAG2; + theMode = Aspect_GradientFillMethod_Diagonal2; } else if (aName == "corner1") { - theMode = Aspect_GFM_CORNER1; + theMode = Aspect_GradientFillMethod_Corner1; } else if (aName == "corner2") { - theMode = Aspect_GFM_CORNER2; + theMode = Aspect_GradientFillMethod_Corner2; } else if (aName == "corner3") { - theMode = Aspect_GFM_CORNER3; + theMode = Aspect_GradientFillMethod_Corner3; } else if (aName == "corner4") { - theMode = Aspect_GFM_CORNER4; + theMode = Aspect_GradientFillMethod_Corner4; + } + else if (aName == "ellip" + || aName == "elliptical") + { + theMode = Aspect_GradientFillMethod_Elliptical; } else { @@ -2680,7 +2685,7 @@ static int VBackground (Draw_Interpretor& theDI, Standard_Integer aNbColors = 0; Quantity_ColorRGBA aColors[2]; - Aspect_GradientFillMethod aGradientMode = Aspect_GFM_NONE; + Aspect_GradientFillMethod aGradientMode = Aspect_GradientFillMethod_None; bool hasGradientMode = false; TCollection_AsciiString anImagePath; @@ -2891,14 +2896,14 @@ static int VBackground (Draw_Interpretor& theDI, { ViewerTest_DefaultBackground.GradientColor1 = Quantity_Color(); ViewerTest_DefaultBackground.GradientColor2 = Quantity_Color(); - ViewerTest_DefaultBackground.FillMethod = Aspect_GFM_NONE; + ViewerTest_DefaultBackground.FillMethod = Aspect_GradientFillMethod_None; ViewerTest_DefaultBackground.FlatColor = aColors[0].GetRGB(); ViewerTest_DefaultBackground.SetDefaultGradient(); ViewerTest_DefaultBackground.SetDefaultColor(); } else { - aView->SetBgGradientStyle (hasGradientMode ? aGradientMode : Aspect_GFM_NONE); + aView->SetBgGradientStyle (hasGradientMode ? aGradientMode : Aspect_GradientFillMethod_None); aView->SetBackgroundColor (aColors[0].GetRGB()); } } @@ -2912,9 +2917,9 @@ static int VBackground (Draw_Interpretor& theDI, { ViewerTest_DefaultBackground.FillMethod = aGradientMode; } - else if (ViewerTest_DefaultBackground.FillMethod == Aspect_GFM_NONE) + else if (ViewerTest_DefaultBackground.FillMethod == Aspect_GradientFillMethod_None) { - ViewerTest_DefaultBackground.FillMethod = Aspect_GFM_VER; + ViewerTest_DefaultBackground.FillMethod = Aspect_GradientFillMethod_Vertical; } ViewerTest_DefaultBackground.SetDefaultGradient(); } @@ -2923,9 +2928,9 @@ static int VBackground (Draw_Interpretor& theDI, if (!hasGradientMode) { aGradientMode = aView->GradientBackground().BgGradientFillMethod(); - if (aGradientMode == Aspect_GFM_NONE) + if (aGradientMode == Aspect_GradientFillMethod_None) { - aGradientMode = Aspect_GFM_VER; + aGradientMode = Aspect_GradientFillMethod_Vertical; } } aView->SetBgGradientColors (aColors[0].GetRGB(), aColors[1].GetRGB(), aGradientMode); @@ -13654,7 +13659,7 @@ void ViewerTest::ViewerCommands(Draw_Interpretor& theCommands) theCommands.Add ("vbackground", "vbackground [-color Color [-default]]" "\n\t\t: [-gradient Color1 Color2 [-default]" - "\n\t\t: [-gradientMode {NONE|HORIZONTAL|VERTICAL|DIAG1|DIAG2|CORNER1|CORNER2|CORNER3}]=VERT]" + "\n\t\t: [-gradientMode {NONE|HORIZONTAL|VERTICAL|DIAG1|DIAG2|CORNER1|CORNER2|CORNER3|ELLIPTICAL}]=VERT]" "\n\t\t: [-imageFile ImageFile [-imageMode {CENTERED|TILED|STRETCH|NONE}]=CENTERED [-srgb {0|1}]=1]" "\n\t\t: [-cubemap CubemapFile1 [CubeMapFiles2-5] [-order TilesIndexes1-6] [-invertedz]=0 [-pbrEnv {0|1}]=1]" "\n\t\t: Changes background or some background settings." diff --git a/tests/opengl/data/background/bug25775 b/tests/opengl/data/background/bug25775 index 66c0cea0c9..7e8828bdc8 100644 --- a/tests/opengl/data/background/bug25775 +++ b/tests/opengl/data/background/bug25775 @@ -7,10 +7,13 @@ pload VISUALIZATION vbackground -default -gradient BLACK GRAY25 -gradientMode HORIZONTAL vinit View1 w=400 h=400 if { [vreadpixel 399 100 -rgb -name] != "GRAY25" } { puts "Error: bug with default gradient color is reproduced." } +vdump $imagedir/${casename}_v1.png vinit View2 w=400 h=400 if { [vreadpixel 399 100 -rgb -name] != "GRAY25" } { puts "Error: bug with default gradient color is reproduced." } +vdump $imagedir/${casename}_v2.png vbackground -default -color GRAY50 vinit View3 if { [vreadpixel 100 100 -rgb -name] != "GRAY50" } { puts "Error: bug with default background color is reproduced." } +vdump $imagedir/${casename}_v3.png diff --git a/tests/opengl/data/background/elliptical b/tests/opengl/data/background/elliptical new file mode 100644 index 0000000000..771bf591b3 --- /dev/null +++ b/tests/opengl/data/background/elliptical @@ -0,0 +1,10 @@ +puts "============" +puts "0031039: Visualization - add elliptical gradient background style" +puts "============" +puts "" + +pload VISUALIZATION +vinit View1 + +vbackground -gradient WHITE BLACK -gradientMode ELLIPTICAL +vdump $imagedir/${casename}.png From 3e9cb8064479cfe776221f91820a10e995b20431 Mon Sep 17 00:00:00 2001 From: kgv Date: Sun, 26 Sep 2021 13:03:25 +0300 Subject: [PATCH 073/639] 0032590: Visualization, V3d_View - improve API for setting Image Based Lighting Added method V3d_View::SetImageBasedLighting() for managing IBL. OpenGl_View implementation has been revised to handle IBL updates in a more straightforward way, --- src/Graphic3d/Graphic3d_CView.cxx | 1 + src/Graphic3d/Graphic3d_CView.hxx | 46 +++-- src/OpenGl/OpenGl_View.cxx | 176 ++++++++++++------- src/OpenGl/OpenGl_View.hxx | 65 ++----- src/OpenGl/OpenGl_View_Raytrace.cxx | 6 +- src/V3d/V3d_View.cxx | 17 +- src/V3d/V3d_View.hxx | 32 ++-- src/ViewerTest/ViewerTest_ViewerCommands.cxx | 55 +++++- tests/opengl/data/textures/cubemap_ibl | 25 +++ 9 files changed, 255 insertions(+), 168 deletions(-) create mode 100644 tests/opengl/data/textures/cubemap_ibl diff --git a/src/Graphic3d/Graphic3d_CView.cxx b/src/Graphic3d/Graphic3d_CView.cxx index 4328c08d62..1461965552 100644 --- a/src/Graphic3d/Graphic3d_CView.cxx +++ b/src/Graphic3d/Graphic3d_CView.cxx @@ -26,6 +26,7 @@ IMPLEMENT_STANDARD_RTTIEXT(Graphic3d_CView,Graphic3d_DataStructureManager) //======================================================================= Graphic3d_CView::Graphic3d_CView (const Handle(Graphic3d_StructureManager)& theMgr) : myBgColor (Quantity_NOC_BLACK), + myBackgroundType (Graphic3d_TOB_NONE), myStructureManager (theMgr), myCamera (new Graphic3d_Camera()), myHiddenObjects (new Graphic3d_NMapOfTransient()), diff --git a/src/Graphic3d/Graphic3d_CView.hxx b/src/Graphic3d/Graphic3d_CView.hxx index 999b9b4a4e..78933d804a 100644 --- a/src/Graphic3d/Graphic3d_CView.hxx +++ b/src/Graphic3d/Graphic3d_CView.hxx @@ -35,6 +35,7 @@ #include #include #include +#include #include #include #include @@ -359,6 +360,8 @@ public: //! Returns reference to current rendering parameters and effect settings. Graphic3d_RenderingParams& ChangeRenderingParams() { return myRenderParams; } +public: + //! Returns background fill color. virtual Aspect_Background Background() const { return Aspect_Background (myBgColor.GetRGB()); } @@ -372,7 +375,13 @@ public: virtual void SetGradientBackground (const Aspect_GradientBackground& theBackground) = 0; //! Returns background image texture map. - virtual Handle(Graphic3d_TextureMap) BackgroundImage() = 0; + const Handle(Graphic3d_TextureMap)& BackgroundImage() { return myBackgroundImage; } + + //! Returns cubemap being set last time on background. + const Handle(Graphic3d_CubeMap)& BackgroundCubeMap() const { return myCubeMapBackground; } + + //! Returns cubemap being set last time on background. + const Handle(Graphic3d_CubeMap)& IBLCubeMap() const { return myCubeMapIBL; } //! Sets image texture or environment cubemap as background. //! @param theTextureMap [in] source to set a background; @@ -388,28 +397,26 @@ public: //! Sets background image fill style. virtual void SetBackgroundImageStyle (const Aspect_FillMethod theFillStyle) = 0; - //! Returns cubemap being set last time on background. - virtual Handle(Graphic3d_CubeMap) BackgroundCubeMap() const = 0; + //! Returns background type. + Graphic3d_TypeOfBackground BackgroundType() const { return myBackgroundType; } - //! Generates PBR specular probe and irradiance map - //! in order to provide environment indirect illumination in PBR shading model (Image Based Lighting). - //! The source of environment data is background cubemap. - //! If PBR is unavailable it does nothing. - //! If PBR is available but there is no cubemap being set to background it clears all IBL maps (see 'ClearPBREnvironment'). - virtual void GeneratePBREnvironment() = 0; + //! Sets background type. + void SetBackgroundType (Graphic3d_TypeOfBackground theType) { myBackgroundType = theType; } - //! Fills PBR specular probe and irradiance map with white color. - //! So that environment indirect illumination will be constant - //! and will be fully controlled by ambient light sources. - //! If PBR is unavailable it does nothing. - virtual void ClearPBREnvironment() = 0; + //! Enables or disables IBL (Image Based Lighting) from background cubemap. + //! Has no effect if PBR is not used. + //! @param[in] theToEnableIBL enable or disable IBL from background cubemap + //! @param[in] theToUpdate redraw the view + virtual void SetImageBasedLighting (Standard_Boolean theToEnableIBL) = 0; //! Returns environment texture set for the view. - virtual Handle(Graphic3d_TextureEnv) TextureEnv() const = 0; + const Handle(Graphic3d_TextureEnv)& TextureEnv() const { return myTextureEnvData; } //! Sets environment texture for the view. virtual void SetTextureEnv (const Handle(Graphic3d_TextureEnv)& theTextureEnv) = 0; +public: + //! Returns list of lights of the view. virtual const Handle(Graphic3d_LightSet)& Lights() const = 0; @@ -568,7 +575,14 @@ protected: Standard_Integer myId; Graphic3d_RenderingParams myRenderParams; - Quantity_ColorRGBA myBgColor; + + Quantity_ColorRGBA myBgColor; + Handle(Graphic3d_TextureMap) myBackgroundImage; + Handle(Graphic3d_CubeMap) myCubeMapBackground; //!< Cubemap displayed at background + Handle(Graphic3d_CubeMap) myCubeMapIBL; //!< Cubemap used for environment lighting + Handle(Graphic3d_TextureEnv) myTextureEnvData; + Graphic3d_TypeOfBackground myBackgroundType; //!< Current type of background + Handle(Graphic3d_StructureManager) myStructureManager; Handle(Graphic3d_Camera) myCamera; Graphic3d_SequenceOfStructure myStructsToCompute; diff --git a/src/OpenGl/OpenGl_View.cxx b/src/OpenGl/OpenGl_View.cxx index ed411f2fc4..2bca09c991 100644 --- a/src/OpenGl/OpenGl_View.cxx +++ b/src/OpenGl/OpenGl_View.cxx @@ -129,9 +129,8 @@ OpenGl_View::OpenGl_View (const Handle(Graphic3d_StructureManager)& theMgr, myIsImmediateDrawn (Standard_False), myTextureParams (new OpenGl_Aspects()), myCubeMapParams (new OpenGl_Aspects()), - myBackgroundType (Graphic3d_TOB_NONE), myPBREnvState (OpenGl_PBREnvState_NONEXISTENT), - myPBREnvRequest (OpenGl_PBREnvRequest_NONE), + myPBREnvRequest (Standard_False), // ray-tracing fields initialization myRaytraceInitStatus (OpenGl_RT_NONE), myIsRaytraceDataValid (Standard_False), @@ -553,49 +552,62 @@ void OpenGl_View::SetGradientBackground (const Aspect_GradientBackground& theBac void OpenGl_View::SetBackgroundImage (const Handle(Graphic3d_TextureMap)& theTextureMap, Standard_Boolean theToUpdatePBREnv) { + Handle(Graphic3d_TextureMap) aNewMap = theTextureMap; if (theTextureMap.IsNull() || !theTextureMap->IsDone()) + { + if (!theTextureMap.IsNull()) + { + Message::SendFail ("Error: unable to set image background"); + } + aNewMap.Nullify(); + } + + Handle(Graphic3d_CubeMap) aCubeMap = Handle(Graphic3d_CubeMap)::DownCast (aNewMap); + if (theToUpdatePBREnv) + { + // update PBR environment + const TCollection_AsciiString anIdOld = !myCubeMapIBL.IsNull() + ? myCubeMapIBL->GetId() + : TCollection_AsciiString(); + const TCollection_AsciiString anIdNew = !aCubeMap.IsNull() + ? aCubeMap->GetId() + : TCollection_AsciiString(); + if (anIdNew != anIdOld) + { + myPBREnvRequest = true; + } + myCubeMapIBL = aCubeMap; + } + + if (aNewMap.IsNull()) { if (myBackgroundType == Graphic3d_TOB_TEXTURE || myBackgroundType == Graphic3d_TOB_CUBEMAP) { myBackgroundType = Graphic3d_TOB_NONE; - if (theToUpdatePBREnv) - { - myPBREnvRequest = OpenGl_PBREnvRequest_CLEAR; - } } return; } Handle(Graphic3d_AspectFillArea3d) anAspect = new Graphic3d_AspectFillArea3d(); - Handle(Graphic3d_TextureSet) aTextureSet = new Graphic3d_TextureSet (theTextureMap); + Handle(Graphic3d_TextureSet) aTextureSet = new Graphic3d_TextureSet (aNewMap); anAspect->SetInteriorStyle (Aspect_IS_SOLID); anAspect->SetFaceCulling (Graphic3d_TypeOfBackfacingModel_DoubleSided); anAspect->SetShadingModel (Graphic3d_TypeOfShadingModel_Unlit); anAspect->SetTextureSet (aTextureSet); anAspect->SetTextureMapOn (true); - if (Handle(Graphic3d_Texture2D) aTextureMap = Handle(Graphic3d_Texture2D)::DownCast (theTextureMap)) + if (Handle(Graphic3d_Texture2D) aTextureMap = Handle(Graphic3d_Texture2D)::DownCast (aNewMap)) { - if (theToUpdatePBREnv && myBackgroundType == Graphic3d_TOB_CUBEMAP) - { - myPBREnvRequest = OpenGl_PBREnvRequest_CLEAR; - } - myTextureParams->SetAspect (anAspect); myBackgroundType = Graphic3d_TOB_TEXTURE; myBackgroundImage = aTextureMap; return; } - if (Handle(Graphic3d_CubeMap) aCubeMap = Handle(Graphic3d_CubeMap)::DownCast (theTextureMap)) + if (!aCubeMap.IsNull()) { - if (theToUpdatePBREnv) - { - myPBREnvRequest = OpenGl_PBREnvRequest_BAKE; - } - aCubeMap->SetMipmapsGeneration (Standard_True); if (const Handle(OpenGl_Context)& aCtx = myWorkspace->GetGlContext()) { @@ -610,7 +622,7 @@ void OpenGl_View::SetBackgroundImage (const Handle(Graphic3d_TextureMap)& theTex myWorkspace->ApplyAspects(); myBackgroundType = Graphic3d_TOB_CUBEMAP; - myBackgroundCubeMap = aCubeMap; + myCubeMapBackground = aCubeMap; return; } @@ -618,30 +630,51 @@ void OpenGl_View::SetBackgroundImage (const Handle(Graphic3d_TextureMap)& theTex } // ======================================================================= -// function : BackgroundImageStyle +// function : SetImageBasedLighting // purpose : // ======================================================================= -Aspect_FillMethod OpenGl_View::BackgroundImageStyle() const +void OpenGl_View::SetImageBasedLighting (Standard_Boolean theToEnableIBL) { - return myBackgrounds[Graphic3d_TOB_TEXTURE]->TextureFillMethod(); + if (!theToEnableIBL + || myBackgroundType != Graphic3d_TOB_CUBEMAP) + { + if (!myCubeMapIBL.IsNull()) + { + myPBREnvRequest = true; + myCubeMapIBL.Nullify(); + } + return; + } + + const TCollection_AsciiString anIdOld = !myCubeMapIBL.IsNull() + ? myCubeMapIBL->GetId() + : TCollection_AsciiString(); + const TCollection_AsciiString anIdNew = !myCubeMapBackground.IsNull() + ? myCubeMapBackground->GetId() + : TCollection_AsciiString(); + if (anIdNew != anIdOld) + { + myPBREnvRequest = true; + } + myCubeMapIBL = myCubeMapBackground; } // ======================================================================= -// function : SetBackgroundImageStyle +// function : BackgroundImageStyle // purpose : // ======================================================================= -void OpenGl_View::SetBackgroundImageStyle (const Aspect_FillMethod theFillStyle) +Aspect_FillMethod OpenGl_View::BackgroundImageStyle() const { - myBackgrounds[Graphic3d_TOB_TEXTURE]->SetTextureFillMethod (theFillStyle); + return myBackgrounds[Graphic3d_TOB_TEXTURE]->TextureFillMethod(); } // ======================================================================= -// function : BackgroundCubeMap +// function : SetBackgroundImageStyle // purpose : // ======================================================================= -Handle(Graphic3d_CubeMap) OpenGl_View::BackgroundCubeMap() const +void OpenGl_View::SetBackgroundImageStyle (const Aspect_FillMethod theFillStyle) { - return myBackgroundCubeMap; + myBackgrounds[Graphic3d_TOB_TEXTURE]->SetTextureFillMethod (theFillStyle); } // ======================================================================= @@ -955,8 +988,8 @@ void OpenGl_View::drawBackground (const Handle(OpenGl_Workspace)& theWorkspace, if (myBackgroundType == Graphic3d_TOB_CUBEMAP) { - myCubeMapParams->Aspect()->ShaderProgram()->PushVariableInt ("uZCoeff", myBackgroundCubeMap->ZIsInverted() ? -1 : 1); - myCubeMapParams->Aspect()->ShaderProgram()->PushVariableInt ("uYCoeff", myBackgroundCubeMap->IsTopDown() ? 1 : -1); + myCubeMapParams->Aspect()->ShaderProgram()->PushVariableInt ("uZCoeff", myCubeMapBackground->ZIsInverted() ? -1 : 1); + myCubeMapParams->Aspect()->ShaderProgram()->PushVariableInt ("uYCoeff", myCubeMapBackground->IsTopDown() ? 1 : -1); const OpenGl_Aspects* anOldAspectFace = theWorkspace->SetAspects (myCubeMapParams); myBackgrounds[Graphic3d_TOB_CUBEMAP]->Render (theWorkspace, theProjection); @@ -1203,7 +1236,7 @@ bool OpenGl_View::prepareFrameBuffers (Graphic3d_Camera::Projection& theProj) myPBREnvironment->Release (aCtx.get()); myPBREnvironment.Nullify(); myPBREnvState = OpenGl_PBREnvState_NONEXISTENT; - myPBREnvRequest = OpenGl_PBREnvRequest_BAKE; + myPBREnvRequest = true; ++myLightsRevision; } @@ -1297,7 +1330,7 @@ bool OpenGl_View::prepareFrameBuffers (Graphic3d_Camera::Projection& theProj) myWorkspace->ApplyAspects(); } } - processPBREnvRequest (aCtx); + updatePBREnvironment (aCtx); } // create color and coverage accumulation buffers required for OIT algorithm @@ -3042,19 +3075,51 @@ Standard_Boolean OpenGl_View::checkPBRAvailability() const } // ======================================================================= -// function : bakePBREnvironment +// function : updatePBREnvironment // purpose : // ======================================================================= -void OpenGl_View::bakePBREnvironment (const Handle(OpenGl_Context)& theCtx) +void OpenGl_View::updatePBREnvironment (const Handle(OpenGl_Context)& theCtx) { - const Handle(OpenGl_TextureSet)& aTextureSet = myCubeMapParams->TextureSet (theCtx); - if (!aTextureSet.IsNull() - && !aTextureSet->IsEmpty()) + if (myPBREnvState != OpenGl_PBREnvState_CREATED + || !myPBREnvRequest) + { + myPBREnvRequest = false; + return; + } + + myPBREnvRequest = false; + + Handle(OpenGl_TextureSet) aGlTextureSet; + OpenGl_Aspects* aTmpGlAspects = NULL; + if (!myCubeMapIBL.IsNull() + && myCubeMapIBL == myCubeMapBackground) + { + aGlTextureSet = myCubeMapParams->TextureSet (theCtx); + } + else if (!myCubeMapIBL.IsNull()) + { + myCubeMapIBL->SetMipmapsGeneration (Standard_True); + + Handle(Graphic3d_AspectFillArea3d) anAspect = new Graphic3d_AspectFillArea3d(); + { + Handle(Graphic3d_TextureSet) aTextureSet = new Graphic3d_TextureSet (myCubeMapIBL); + anAspect->SetInteriorStyle (Aspect_IS_SOLID); + anAspect->SetTextureSet (aTextureSet); + anAspect->SetTextureMapOn (true); + } + + aTmpGlAspects = new OpenGl_Aspects(); + aTmpGlAspects->SetAspect (anAspect); + aGlTextureSet = aTmpGlAspects->TextureSet (theCtx); + } + + if (!aGlTextureSet.IsNull() + && !aGlTextureSet->IsEmpty()) { myPBREnvironment->Bake (theCtx, - aTextureSet->First(), - myBackgroundCubeMap->ZIsInverted(), - myBackgroundCubeMap->IsTopDown(), + aGlTextureSet->First(), + myCubeMapIBL->ZIsInverted(), + myCubeMapIBL->IsTopDown(), myRenderParams.PbrEnvBakingDiffNbSamples, myRenderParams.PbrEnvBakingSpecNbSamples, myRenderParams.PbrEnvBakingProbability); @@ -3063,31 +3128,6 @@ void OpenGl_View::bakePBREnvironment (const Handle(OpenGl_Context)& theCtx) { myPBREnvironment->Clear (theCtx); } -} - -// ======================================================================= -// function : clearPBREnvironment -// purpose : -// ======================================================================= -void OpenGl_View::clearPBREnvironment (const Handle(OpenGl_Context)& theCtx) -{ - myPBREnvironment->Clear (theCtx); -} - -// ======================================================================= -// function : clearPBREnvironment -// purpose : -// ======================================================================= -void OpenGl_View::processPBREnvRequest (const Handle(OpenGl_Context)& theCtx) -{ - if (myPBREnvState == OpenGl_PBREnvState_CREATED) - { - switch (myPBREnvRequest) - { - case OpenGl_PBREnvRequest_NONE: return; - case OpenGl_PBREnvRequest_BAKE: bakePBREnvironment (theCtx); break; - case OpenGl_PBREnvRequest_CLEAR: clearPBREnvironment (theCtx); break; - } - } - myPBREnvRequest = OpenGl_PBREnvRequest_NONE; + aGlTextureSet.Nullify(); + OpenGl_Element::Destroy (theCtx.get(), aTmpGlAspects); } diff --git a/src/OpenGl/OpenGl_View.hxx b/src/OpenGl/OpenGl_View.hxx index fde391e89c..eec11de2c2 100644 --- a/src/OpenGl/OpenGl_View.hxx +++ b/src/OpenGl/OpenGl_View.hxx @@ -16,15 +16,11 @@ #ifndef _OpenGl_View_Header #define _OpenGl_View_Header -#include -#include #include #include #include #include #include -#include -#include #include #include #include @@ -41,7 +37,6 @@ #include #include -class Graphic3d_StructureManager; class OpenGl_BackgroundArray; class OpenGl_DepthPeeling; class OpenGl_GraphicDriver; @@ -206,9 +201,6 @@ public: //! Sets gradient background fill colors. Standard_EXPORT virtual void SetGradientBackground (const Aspect_GradientBackground& theBackground) Standard_OVERRIDE; - //! Returns background image texture map. - virtual Handle(Graphic3d_TextureMap) BackgroundImage() Standard_OVERRIDE { return myBackgroundImage; } - //! Sets image texture or environment cubemap as background. //! @param theTextureMap [in] source to set a background; //! should be either Graphic3d_Texture2D or Graphic3d_CubeMap @@ -217,38 +209,25 @@ public: Standard_EXPORT virtual void SetBackgroundImage (const Handle(Graphic3d_TextureMap)& theTextureMap, Standard_Boolean theToUpdatePBREnv = Standard_True) Standard_OVERRIDE; + //! Sets environment texture for the view. + Standard_EXPORT virtual void SetTextureEnv (const Handle(Graphic3d_TextureEnv)& theTextureEnv) Standard_OVERRIDE; + //! Returns background image fill style. Standard_EXPORT virtual Aspect_FillMethod BackgroundImageStyle() const Standard_OVERRIDE; //! Sets background image fill style. Standard_EXPORT virtual void SetBackgroundImageStyle (const Aspect_FillMethod theFillStyle) Standard_OVERRIDE; - //! Returns cubemap being set last time on background. - Standard_EXPORT Handle(Graphic3d_CubeMap) BackgroundCubeMap() const Standard_OVERRIDE; - - //! Generates PBR specular probe and irradiance map - //! in order to provide environment indirect illumination in PBR shading model (Image Based Lighting). - //! The source of environment data is background cubemap. - //! If PBR is unavailable it does nothing. - //! If PBR is available but there is no cubemap being set to background it clears all IBL maps (see 'ClearPBREnvironment'). - virtual void GeneratePBREnvironment() Standard_OVERRIDE { myPBREnvRequest = OpenGl_PBREnvRequest_BAKE; } - - //! Fills PBR specular probe and irradiance map with white color. - //! So that environment indirect illumination will be constant - //! and will be fully controlled by ambient light sources. - //! If PBR is unavailable it does nothing. - virtual void ClearPBREnvironment() Standard_OVERRIDE { myPBREnvRequest = OpenGl_PBREnvRequest_CLEAR; } + //! Enables or disables IBL (Image Based Lighting) from background cubemap. + //! Has no effect if PBR is not used. + //! @param[in] theToEnableIBL enable or disable IBL from background cubemap + //! @param[in] theToUpdate redraw the view + Standard_EXPORT virtual void SetImageBasedLighting (Standard_Boolean theToEnableIBL) Standard_OVERRIDE; //! Returns number of mipmap levels used in specular IBL map. //! 0 if PBR environment is not created. Standard_EXPORT unsigned int SpecIBLMapLevels() const; - //! Returns environment texture set for the view. - virtual Handle(Graphic3d_TextureEnv) TextureEnv() const Standard_OVERRIDE { return myTextureEnvData; } - - //! Sets environment texture for the view. - Standard_EXPORT virtual void SetTextureEnv (const Handle(Graphic3d_TextureEnv)& theTextureEnv) Standard_OVERRIDE; - //! Returns local camera origin currently set for rendering, might be modified during rendering. const gp_XYZ& LocalOrigin() const { return myLocalOrigin; } @@ -470,8 +449,6 @@ protected: gp_XYZ myLocalOrigin; Handle(OpenGl_FrameBuffer) myFBO; Standard_Boolean myToShowGradTrihedron; - Handle(Graphic3d_TextureMap) myBackgroundImage; - Handle(Graphic3d_TextureEnv) myTextureEnvData; Graphic3d_GraduatedTrihedron myGTrihedronData; Handle(Graphic3d_LightSet) myNoShadingLight; @@ -495,8 +472,6 @@ protected: OpenGl_GraduatedTrihedron myGraduatedTrihedron; OpenGl_FrameStatsPrs myFrameStatsPrs; - Handle(OpenGl_TextureSet) myTextureEnv; - //! Framebuffers for OpenGL output. Handle(OpenGl_FrameBuffer) myOpenGlFBO; Handle(OpenGl_FrameBuffer) myOpenGlFBO2; @@ -532,9 +507,8 @@ protected: //! @name Background parameters OpenGl_Aspects* myTextureParams; //!< Stores texture and its parameters for textured background OpenGl_Aspects* myCubeMapParams; //!< Stores cubemap and its parameters for cubemap background - Handle(Graphic3d_CubeMap) myBackgroundCubeMap; //!< Cubemap has been set as background - Graphic3d_TypeOfBackground myBackgroundType; //!< Current type of background OpenGl_BackgroundArray* myBackgrounds[Graphic3d_TypeOfBackground_NB]; //!< Array of primitive arrays of different background types + Handle(OpenGl_TextureSet) myTextureEnv; protected: //! @name methods related to PBR @@ -543,14 +517,7 @@ protected: //! @name methods related to PBR //! Generates IBL maps used in PBR pipeline. //! If background cubemap is not set clears all IBL maps. - Standard_EXPORT void bakePBREnvironment (const Handle(OpenGl_Context)& theCtx); - - //! Fills all IBL maps with white color. - //! So that environment lighting is considered to be constant and is completely controls by ambient light sources. - Standard_EXPORT void clearPBREnvironment (const Handle(OpenGl_Context)& theCtx); - - //! Process requests to generate or to clear PBR environment. - Standard_EXPORT void processPBREnvRequest (const Handle(OpenGl_Context)& theCtx); + Standard_EXPORT void updatePBREnvironment (const Handle(OpenGl_Context)& theCtx); protected: //! @name fields and types related to PBR @@ -562,17 +529,9 @@ protected: //! @name fields and types related to PBR OpenGl_PBREnvState_CREATED }; - //! Type of action which can be done with PBR environment. - enum PBREnvironmentRequest - { - OpenGl_PBREnvRequest_NONE, - OpenGl_PBREnvRequest_BAKE, - OpenGl_PBREnvRequest_CLEAR - }; - Handle(OpenGl_PBREnvironment) myPBREnvironment; //!< manager of IBL maps used in PBR pipeline PBREnvironmentState myPBREnvState; //!< state of PBR environment - PBREnvironmentRequest myPBREnvRequest; //!< type of action is requested to be done with PBR environment + Standard_Boolean myPBREnvRequest; //!< update PBR environment protected: //! @name data types related to ray-tracing @@ -761,7 +720,7 @@ protected: //! @name data types related to ray-tracing //! Enables/disables depth-of-field effect (path tracing, perspective camera). Standard_Boolean DepthOfField; - //! Enables/disables cubemap backgraund. + //! Enables/disables cubemap background. Standard_Boolean CubemapForBack; //! Tone mapping method for path tracing. diff --git a/src/OpenGl/OpenGl_View_Raytrace.cxx b/src/OpenGl/OpenGl_View_Raytrace.cxx index 6088506e74..7b3b171877 100644 --- a/src/OpenGl/OpenGl_View_Raytrace.cxx +++ b/src/OpenGl/OpenGl_View_Raytrace.cxx @@ -1422,7 +1422,7 @@ Standard_Boolean OpenGl_View::initRaytraceResources (const Standard_Integer theS } myTileSampler.SetSize (myRenderParams, myRaytraceParameters.AdaptiveScreenSampling ? Graphic3d_Vec2i (theSizeX, theSizeY) : Graphic3d_Vec2i (0, 0)); - const bool isCubemapForBack = !myBackgroundCubeMap.IsNull(); + const bool isCubemapForBack = !myCubeMapBackground.IsNull(); if (myRaytraceParameters.CubemapForBack != isCubemapForBack) { myRaytraceParameters.CubemapForBack = isCubemapForBack; @@ -2694,8 +2694,8 @@ Standard_Boolean OpenGl_View::setUniformState (const Standard_Integer the toDisableEnvironmentMap ? 0 : 1); if (myRaytraceParameters.CubemapForBack) { - theProgram->SetUniform (theGlContext, "uZCoeff", myBackgroundCubeMap->ZIsInverted() ? -1 : 1); - theProgram->SetUniform (theGlContext, "uYCoeff", myBackgroundCubeMap->IsTopDown() ? 1 : -1); + theProgram->SetUniform (theGlContext, "uZCoeff", myCubeMapBackground->ZIsInverted() ? -1 : 1); + theProgram->SetUniform (theGlContext, "uYCoeff", myCubeMapBackground->IsTopDown() ? 1 : -1); theProgram->SetUniform (theGlContext, myUniformLocations[theProgramId][OpenGl_RT_uEnvMapForBack], myBackgroundType == Graphic3d_TOB_CUBEMAP ? 1 : 0); } diff --git a/src/V3d/V3d_View.cxx b/src/V3d/V3d_View.cxx index 777b383369..c5e768b3df 100644 --- a/src/V3d/V3d_View.cxx +++ b/src/V3d/V3d_View.cxx @@ -530,25 +530,22 @@ void V3d_View::SetBackgroundCubeMap (const Handle(Graphic3d_CubeMap)& theCubeMap } //============================================================================= -//function : GeneratePBREnvironment +//function : IsImageBasedLighting //purpose : //============================================================================= -void V3d_View::GeneratePBREnvironment (Standard_Boolean theToUpdate) +Standard_Boolean V3d_View::IsImageBasedLighting() const { - myView->GeneratePBREnvironment(); - if (myImmediateUpdate || theToUpdate) - { - Redraw(); - } + return !myView->IBLCubeMap().IsNull(); } //============================================================================= -//function : ClearPBREnvironment +//function : SetImageBasedLighting //purpose : //============================================================================= -void V3d_View::ClearPBREnvironment (Standard_Boolean theToUpdate) +void V3d_View::SetImageBasedLighting (Standard_Boolean theToEnableIBL, + Standard_Boolean theToUpdate) { - myView->ClearPBREnvironment(); + myView->SetImageBasedLighting (theToEnableIBL); if (myImmediateUpdate || theToUpdate) { Redraw(); diff --git a/src/V3d/V3d_View.hxx b/src/V3d/V3d_View.hxx index e48a255d26..222fb18ef0 100644 --- a/src/V3d/V3d_View.hxx +++ b/src/V3d/V3d_View.hxx @@ -175,6 +175,8 @@ public: //! displayed objects. Standard_EXPORT void ZFitAll (const Standard_Real theScaleFactor = 1.0) const; +public: + //! Defines the background color of the view by the color definition type and the three corresponding values. Standard_EXPORT void SetBackgroundColor (const Quantity_TypeOfColor theType, const Standard_Real theV1, @@ -217,17 +219,24 @@ public: Standard_Boolean theToUpdatePBREnv = Standard_True, Standard_Boolean theToUpdate = Standard_False); - //! Generates PBR specular probe and irradiance map - //! in order to provide environment indirect illumination in PBR shading model (Image Based Lighting). - //! The source of environment data is background cubemap. - //! If PBR is unavailable it does nothing. - //! If PBR is available but there is no cubemap being set to background it clears all IBL maps (see 'ClearPBREnvironment'). - Standard_EXPORT void GeneratePBREnvironment (Standard_Boolean theToUpdate = Standard_False); + //! Returns TRUE if IBL (Image Based Lighting) from background cubemap is enabled. + Standard_EXPORT Standard_Boolean IsImageBasedLighting() const; + + //! Enables or disables IBL (Image Based Lighting) from background cubemap. + //! Has no effect if PBR is not used. + //! @param[in] theToEnableIBL enable or disable IBL from background cubemap + //! @param[in] theToUpdate redraw the view + Standard_EXPORT void SetImageBasedLighting (Standard_Boolean theToEnableIBL, + Standard_Boolean theToUpdate = Standard_False); + + //! Activates IBL from background cubemap. + void GeneratePBREnvironment (Standard_Boolean theToUpdate = Standard_False) { SetImageBasedLighting (Standard_True, theToUpdate); } + + //! Disables IBL from background cubemap; fills PBR specular probe and irradiance map with white color. + void ClearPBREnvironment (Standard_Boolean theToUpdate = Standard_False) { SetImageBasedLighting (Standard_True, theToUpdate); } - //! Fills PBR specular probe and irradiance map with white color. - //! So that environment indirect illumination will be constant and will be fully controlled by ambient light sources. - //! If PBR is unavailable it does nothing. - Standard_EXPORT void ClearPBREnvironment (Standard_Boolean theToUpdate = Standard_False); + //! Sets the environment texture to use. No environment texture by default. + Standard_EXPORT void SetTextureEnv (const Handle(Graphic3d_TextureEnv)& theTexture); //! Definition of an axis from its origin and //! its orientation . @@ -236,8 +245,7 @@ public: Standard_EXPORT void SetAxis (const Standard_Real X, const Standard_Real Y, const Standard_Real Z, const Standard_Real Vx, const Standard_Real Vy, const Standard_Real Vz); - //! Sets the environment texture to use. No environment texture by default. - Standard_EXPORT void SetTextureEnv (const Handle(Graphic3d_TextureEnv)& theTexture); +public: //! Defines the visualization type in the view. Standard_EXPORT void SetVisualization (const V3d_TypeOfVisualization theType); diff --git a/src/ViewerTest/ViewerTest_ViewerCommands.cxx b/src/ViewerTest/ViewerTest_ViewerCommands.cxx index 6a3a1f74a9..f839e8a4ff 100644 --- a/src/ViewerTest/ViewerTest_ViewerCommands.cxx +++ b/src/ViewerTest/ViewerTest_ViewerCommands.cxx @@ -2694,9 +2694,11 @@ static int VBackground (Draw_Interpretor& theDI, NCollection_Sequence aCubeMapSeq; Graphic3d_CubeMapOrder aCubeOrder = Graphic3d_CubeMapOrder::Default(); - bool isCubeZInverted = false, isCubeGenPBREnv = true; + bool isCubeZInverted = false; bool isSRgb = true; + int toUseIBL = 1; + Handle(V3d_View) aView = ViewerTest::CurrentView(); ViewerTest_AutoUpdater anUpdateTool (ViewerTest::GetAISContext(), aView); for (Standard_Integer anArgIter = 1; anArgIter < theNbArgs; ++anArgIter) @@ -2780,9 +2782,36 @@ static int VBackground (Draw_Interpretor& theDI, isCubeZInverted = Draw::ParseOnOffNoIterator (theNbArgs, theArgVec, anArgIter); } else if (anArg == "-pbrenv" - || anArg == "-nopbrenv") + || anArg == "-nopbrenv" + || anArg == "-ibl" + || anArg == "-noibl") { - isCubeGenPBREnv = Draw::ParseOnOffNoIterator (theNbArgs, theArgVec, anArgIter); + toUseIBL = !anArg.StartsWith ("-no") ? 1 : 0; + if (anArgIter + 1 < theNbArgs) + { + TCollection_AsciiString anIblArg (theArgVec[anArgIter + 1]); + anIblArg.LowerCase(); + if (anIblArg == "keep" + || anIblArg == "-1") + { + toUseIBL = -1; + ++anArgIter; + } + else if (anIblArg == "ibl" + || anIblArg == "1" + || anIblArg == "on") + { + toUseIBL = !anArg.StartsWith ("-no") ? 1 : 0; + ++anArgIter; + } + else if (anIblArg == "noibl" + || anIblArg == "0" + || anIblArg == "off") + { + toUseIBL = !anArg.StartsWith ("-no") ? 0 : 1; + ++anArgIter; + } + } } else if (anArg == "-srgb" || anArg == "-nosrgb") @@ -2905,6 +2934,10 @@ static int VBackground (Draw_Interpretor& theDI, { aView->SetBgGradientStyle (hasGradientMode ? aGradientMode : Aspect_GradientFillMethod_None); aView->SetBackgroundColor (aColors[0].GetRGB()); + if (toUseIBL != -1) + { + aView->SetBackgroundCubeMap (Handle(Graphic3d_CubeMap)(), true); + } } } else if (aNbColors == 2) @@ -2934,6 +2967,10 @@ static int VBackground (Draw_Interpretor& theDI, } } aView->SetBgGradientColors (aColors[0].GetRGB(), aColors[1].GetRGB(), aGradientMode); + if (toUseIBL != -1) + { + aView->SetBackgroundCubeMap (Handle(Graphic3d_CubeMap)(), true); + } } } else if (hasGradientMode) @@ -2991,7 +3028,12 @@ static int VBackground (Draw_Interpretor& theDI, aCubeMap->GetParams()->SetRepeat (false); aCubeMap->GetParams()->SetTextureUnit (Graphic3d_TextureUnit_EnvMap); - aView->SetBackgroundCubeMap (aCubeMap, isCubeGenPBREnv); + aView->SetBackgroundCubeMap (aCubeMap, toUseIBL != -1); + } + if (toUseIBL != -1 + && !aView.IsNull()) + { + aView->SetImageBasedLighting (toUseIBL == 1); } return 0; @@ -13661,7 +13703,8 @@ void ViewerTest::ViewerCommands(Draw_Interpretor& theCommands) "\n\t\t: [-gradient Color1 Color2 [-default]" "\n\t\t: [-gradientMode {NONE|HORIZONTAL|VERTICAL|DIAG1|DIAG2|CORNER1|CORNER2|CORNER3|ELLIPTICAL}]=VERT]" "\n\t\t: [-imageFile ImageFile [-imageMode {CENTERED|TILED|STRETCH|NONE}]=CENTERED [-srgb {0|1}]=1]" - "\n\t\t: [-cubemap CubemapFile1 [CubeMapFiles2-5] [-order TilesIndexes1-6] [-invertedz]=0 [-pbrEnv {0|1}]=1]" + "\n\t\t: [-cubemap CubemapFile1 [CubeMapFiles2-5] [-order TilesIndexes1-6] [-invertedz]=0]" + "\n\t\t: [-pbrEnv {ibl|noibl|keep}]" "\n\t\t: Changes background or some background settings." "\n\t\t: -color sets background color" "\n\t\t: -gradient sets background gradient starting and ending colors" @@ -13671,7 +13714,7 @@ void ViewerTest::ViewerCommands(Draw_Interpretor& theCommands) "\n\t\t: -imageMode sets image fill type" "\n\t\t: -cubemap sets environment cubemap as background" "\n\t\t: -invertedz sets inversion of Z axis for background cubemap rendering; FALSE when unspecified" - "\n\t\t: -pbrEnv sets PBR environment baking flag while updating cubemap; TRUE when unspecified" + "\n\t\t: -pbrEnv sets on/off Image Based Lighting (IBL) from background cubemap for PBR" "\n\t\t: -srgb prefer sRGB texture format when applicable; TRUE when unspecified" "\n\t\t: -order defines order of tiles in one image cubemap" "\n\t\t: TileIndexi defubes an index in range [0, 5] for i tile of one image packed cubemap" diff --git a/tests/opengl/data/textures/cubemap_ibl b/tests/opengl/data/textures/cubemap_ibl new file mode 100644 index 0000000000..0f283af232 --- /dev/null +++ b/tests/opengl/data/textures/cubemap_ibl @@ -0,0 +1,25 @@ +puts "============" +puts "0032590: Visualization, V3d_View - improve API for setting Image Based Lighting" +puts "============" +puts "" + +set aCubeMapLabs [locate_data_file cubemap_labels.png] + +pload MODELING VISUALIZATION + +# PBR doesn't work with Compatible Profile on macOS +if { $::tcl_platform(os) == "Darwin" } { vcaps -core } + +vclear +vclose ALL +source $env(CSF_OCCTSamplesPath)/tcl/vis_pbr_spheres.tcl +vcamera -fovy 100 + +vbackground -cubemap $aCubeMapLabs -pbrEnv noIBL +vdump $imagedir/${casename}_1.png + +vbackground -pbrEnv IBL +vdump $imagedir/${casename}_2.png + +vbackground BLACK -pbrEnv KEEP +vdump $imagedir/${casename}_3.png From f72c595119d65393ed6f2d9005958dc5395b2c2c Mon Sep 17 00:00:00 2001 From: emv Date: Mon, 20 Sep 2021 18:07:30 +0300 Subject: [PATCH 074/639] 0032578: Modeling Algorithms - Splitting face by set of edges fails Update information about ON/IN sub-shapes for all touched faces when intersection with shapes of lower types (edges and vertices) complete. Previously only the faces participating in the Face/Face intersection were updated. --- src/BOPAlgo/BOPAlgo_Builder_2.cxx | 1 + src/BOPAlgo/BOPAlgo_PaveFiller_11.cxx | 1 + src/BOPAlgo/BOPAlgo_PaveFiller_6.cxx | 52 +++++++++++++++++---------- src/BOPAlgo/BOPAlgo_PaveFiller_7.cxx | 1 + tests/bugs/modalg_7/bug32578 | 28 +++++++++++++++ 5 files changed, 64 insertions(+), 19 deletions(-) create mode 100644 tests/bugs/modalg_7/bug32578 diff --git a/src/BOPAlgo/BOPAlgo_Builder_2.cxx b/src/BOPAlgo/BOPAlgo_Builder_2.cxx index 186cd88399..07bbf9bbbf 100644 --- a/src/BOPAlgo/BOPAlgo_Builder_2.cxx +++ b/src/BOPAlgo/BOPAlgo_Builder_2.cxx @@ -471,6 +471,7 @@ void BOPAlgo_Builder::BuildSplitFaces(const Message_ProgressRange& theRange) for (j=1; j<=aNbPBIn; ++j) { const Handle(BOPDS_PaveBlock)& aPB=aMPBIn(j); nSp=aPB->Edge(); + Standard_ASSERT(nSp >= 0, "Face information is not up to date", continue); aSp=(*(TopoDS_Edge*)(&myDS->Shape(nSp))); // aSp.Orientation(TopAbs_FORWARD); diff --git a/src/BOPAlgo/BOPAlgo_PaveFiller_11.cxx b/src/BOPAlgo/BOPAlgo_PaveFiller_11.cxx index e60fa18540..7a3f312d18 100644 --- a/src/BOPAlgo/BOPAlgo_PaveFiller_11.cxx +++ b/src/BOPAlgo/BOPAlgo_PaveFiller_11.cxx @@ -152,6 +152,7 @@ void BOPAlgo_PaveFiller::CheckSelfInterference() Standard_Integer iPB, aNbPB = aMPBF.Extent(); for (iPB = 1; iPB <= aNbPB; ++iPB) { const Handle(BOPDS_PaveBlock)& aPB = aMPBF(iPB); + Standard_ASSERT(aPB->HasEdge(), "Face information is not up to date", continue); const TopoDS_Shape& aE = myDS->Shape(aPB->Edge()); // add connection TopTools_IndexedMapOfShape* pMSOr = aMCSI.ChangeSeek(aE); diff --git a/src/BOPAlgo/BOPAlgo_PaveFiller_6.cxx b/src/BOPAlgo/BOPAlgo_PaveFiller_6.cxx index 51558709ab..a0824caf24 100644 --- a/src/BOPAlgo/BOPAlgo_PaveFiller_6.cxx +++ b/src/BOPAlgo/BOPAlgo_PaveFiller_6.cxx @@ -237,13 +237,42 @@ typedef NCollection_Vector BOPAlgo_VectorOfFaceFace; //======================================================================= void BOPAlgo_PaveFiller::PerformFF(const Message_ProgressRange& theRange) { + // Update face info for all Face/Face intersection pairs + // and also for the rest of the faces with FaceInfo already initialized, + // i.e. anyhow touched faces. myIterator->Initialize(TopAbs_FACE, TopAbs_FACE); Standard_Integer iSize = myIterator->ExpectedLength(); - Message_ProgressScope aPSOuter(theRange, NULL, 1); - if (!iSize) { - return; + + // Collect faces from intersection pairs + TColStd_MapOfInteger aMIFence; + Standard_Integer nF1, nF2; + for (; myIterator->More(); myIterator->Next()) + { + myIterator->Value(nF1, nF2); + aMIFence.Add (nF1); + aMIFence.Add (nF2); } - // + // Collect the rest of the touched faces + for (Standard_Integer i = 0; i < myDS->NbSourceShapes(); ++i) + { + const BOPDS_ShapeInfo& aSI = myDS->ShapeInfo (i); + if (aSI.ShapeType() == TopAbs_FACE && aSI.HasReference()) + { + aMIFence.Add (i); + } + } + // Update face info + myDS->UpdateFaceInfoOn (aMIFence); + myDS->UpdateFaceInfoIn (aMIFence); + + if (!iSize) + { + // no intersection pairs found + return; + } + + Message_ProgressScope aPSOuter(theRange, NULL, 1); + BOPDS_VectorOfInterfFF& aFFs = myDS->InterfFF(); aFFs.SetIncrement(iSize); // @@ -255,23 +284,8 @@ void BOPAlgo_PaveFiller::PerformFF(const Message_ProgressRange& theRange) // Post-processing options Standard_Boolean bSplitCurve = Standard_False; // - // Fence map to store faces with updated FaceInfo structure - TColStd_MapOfInteger aMIFence; // Prepare the pairs of faces for intersection BOPAlgo_VectorOfFaceFace aVFaceFace; - Standard_Integer nF1, nF2; - // - for (; myIterator->More(); myIterator->Next()) { - myIterator->Value(nF1, nF2); - - aMIFence.Add (nF1); - aMIFence.Add (nF2); - } - // Update face info - myDS->UpdateFaceInfoOn (aMIFence); - myDS->UpdateFaceInfoIn (aMIFence); - - // Initialize interferences myIterator->Initialize(TopAbs_FACE, TopAbs_FACE); for (; myIterator->More(); myIterator->Next()) { if (UserBreak(aPSOuter)) diff --git a/src/BOPAlgo/BOPAlgo_PaveFiller_7.cxx b/src/BOPAlgo/BOPAlgo_PaveFiller_7.cxx index 1ba29aae8a..969d3e1b44 100644 --- a/src/BOPAlgo/BOPAlgo_PaveFiller_7.cxx +++ b/src/BOPAlgo/BOPAlgo_PaveFiller_7.cxx @@ -634,6 +634,7 @@ void BOPAlgo_PaveFiller::MakePCurves(const Message_ProgressRange& theRange) for (j = 1; j <= aNbPBIn; ++j) { const Handle(BOPDS_PaveBlock)& aPB = aMPBIn(j); nE=aPB->Edge(); + Standard_ASSERT(nE >= 0, "Face information is not up to date", continue); const TopoDS_Edge& aE=(*(TopoDS_Edge *)(&myDS->Shape(nE))); // BOPAlgo_MPC& aMPC=aVMPC.Appended(); diff --git a/tests/bugs/modalg_7/bug32578 b/tests/bugs/modalg_7/bug32578 new file mode 100644 index 0000000000..4e11206333 --- /dev/null +++ b/tests/bugs/modalg_7/bug32578 @@ -0,0 +1,28 @@ +puts "=================================================" +puts "OCC32578: Modeling Algorithms - Splitting face by set of edges fails" +puts "=================================================" +puts "" + +restore [locate_data_file bug32578_face.brep] f +restore [locate_data_file bug32578_edges.brep] ce + +bfuzzyvalue 0.01 + +bclearobjects +bcleartools +baddobjects f +eval baddtools [explode ce] +bfillds +bsplit result + +checkshape result +if {![regexp "This shape seems to be OK" [bopcheck result]]} { + puts "Error: result is a self-interferring shape" +} + +checknbshapes result -vertex 646 -edge 1234 -wire 589 -face 589 -t +checkprops result -s 351.033 + +checkview -display result -2d -path ${imagedir}/${test_image}.png + +boptions -default From af0cb166918ed558d7b9f503e2b92de021e12ac4 Mon Sep 17 00:00:00 2001 From: ifv Date: Tue, 14 Sep 2021 17:11:17 +0300 Subject: [PATCH 075/639] 0032569: Modeling Algorithm - Section not found IntPatch/IntPatch_WLineTool.cxx - adding control of maximal ratio of distances between 3 sequential points. tests/bugs/modalg_7/bug32569 - new test case added tests/lowalgos/intss/bug29972_1 test case is modified according new behavior of intersection algorithm --- src/IntPatch/IntPatch_WLineTool.cxx | 57 +++++++++++++++++++++++++---- tests/bugs/modalg_7/bug32569 | 16 ++++++++ tests/lowalgos/intss/bug29972_1 | 4 +- 3 files changed, 67 insertions(+), 10 deletions(-) create mode 100644 tests/bugs/modalg_7/bug32569 diff --git a/src/IntPatch/IntPatch_WLineTool.cxx b/src/IntPatch/IntPatch_WLineTool.cxx index 4ebe1e4136..5e9e0103cc 100644 --- a/src/IntPatch/IntPatch_WLineTool.cxx +++ b/src/IntPatch/IntPatch_WLineTool.cxx @@ -385,11 +385,34 @@ static Standard_Boolean IsInsideIn3d(const gp_Pnt& aBasePnt, static const Standard_Integer aMinNbBadDistr = 15; static const Standard_Integer aNbSingleBezier = 30; +//========================================================================= +// function : IsSurfPlaneLike +// purpose : Define is surface plane like or not. +// Static subfunction in DeleteByTube. +//========================================================================= +static Standard_Boolean IsSurfPlaneLike(const Handle(Adaptor3d_Surface) &theS) +{ + if (theS->GetType() == GeomAbs_Plane) + { + return Standard_True; + } + + if (theS->GetType() == GeomAbs_BSplineSurface) + { + if (theS->UDegree() == 1 && theS->VDegree() == 1) + { + return Standard_True; + } + } + + return Standard_False; +} //========================================================================= // function : DeleteByTube // purpose : Check and delete points using tube criteria. // Static subfunction in ComputePurgedWLine. //========================================================================= + static Handle(IntPatch_WLine) DeleteByTube(const Handle(IntPatch_WLine) &theWLine, const Handle(Adaptor3d_Surface) &theS1, @@ -419,6 +442,7 @@ static Handle(IntPatch_WLine) gp_Vec2d aBase2dVec2(UonS2[1] - UonS2[0], VonS2[1] - VonS2[0]); gp_Pnt aBase3dPnt = theWLine->Point(1).Value(); gp_Vec aBase3dVec(theWLine->Point(1).Value(), theWLine->Point(2).Value()); + Standard_Real aPrevStep = aBase3dVec.SquareMagnitude(); // Choose base tolerance and scale it to pipe algorithm. const Standard_Real aBaseTolerance = Precision::Approximation(); @@ -431,6 +455,8 @@ static Handle(IntPatch_WLine) Standard_Real aTol3d = aBaseTolerance * aBaseTolerance; const Standard_Real aLimitCoeff = 0.99 * 0.99; + const Standard_Real aMaxSqrRatio = 15. * 15.; + Standard_Boolean isPlanePlane = IsSurfPlaneLike(theS1) && IsSurfPlaneLike(theS2); for(i = 3; i <= theWLine->NbPnts(); i++) { Standard_Boolean isDeleteState = Standard_False; @@ -466,14 +492,27 @@ static Handle(IntPatch_WLine) if (Min(aStepOnS1, aStepOnS2) >= aLimitCoeff * Max(aStepOnS1, aStepOnS2)) { // Set hash flag to "Delete" state. - isDeleteState = Standard_True; - aNewPointsHash.SetValue(i - 1, 1); - - // Change middle point. - UonS1[1] = UonS1[2]; - UonS2[1] = UonS2[2]; - VonS1[1] = VonS1[2]; - VonS2[1] = VonS2[2]; + Standard_Real aCurrStep = aBase3dPnt.SquareDistance(aPnt3d); + Standard_Real aSqrRatio = 0.; + if (!isPlanePlane) + { + aSqrRatio = aPrevStep / aCurrStep; + if (aSqrRatio < 1.) + { + aSqrRatio = 1. / aSqrRatio; + } + } + if (aSqrRatio < aMaxSqrRatio) + { + isDeleteState = Standard_True; + aNewPointsHash.SetValue(i - 1, 1); + + // Change middle point. + UonS1[1] = UonS1[2]; + UonS2[1] = UonS2[2]; + VonS1[1] = VonS1[2]; + VonS2[1] = VonS2[2]; + } } } @@ -497,6 +536,8 @@ static Handle(IntPatch_WLine) aBase3dPnt = theWLine->Point(i - 1).Value(); aBase3dVec = gp_Vec(theWLine->Point(i - 1).Value(), theWLine->Point(i).Value()); + aPrevStep = aBase3dVec.SquareMagnitude(); + aNbPnt++; } } diff --git a/tests/bugs/modalg_7/bug32569 b/tests/bugs/modalg_7/bug32569 new file mode 100644 index 0000000000..4f3bfc6338 --- /dev/null +++ b/tests/bugs/modalg_7/bug32569 @@ -0,0 +1,16 @@ +puts "=================================================" +puts "0032569: Modeling Algorithm - Section not found" +puts "=================================================" +puts "" + +restore [locate_data_file bug32569.brep] s +explode s + +bop s_1 s_2 +bopsection result + +checknbshapes result -vertex 2 -edge 1 + +checkmaxtol result -min_tol 4.5e-4 + +checkprops result -l 5.5227 diff --git a/tests/lowalgos/intss/bug29972_1 b/tests/lowalgos/intss/bug29972_1 index 3e14357e2b..ffc0987898 100644 --- a/tests/lowalgos/intss/bug29972_1 +++ b/tests/lowalgos/intss/bug29972_1 @@ -37,8 +37,8 @@ while { $AllowRepeat != 0 } { puts "Error: Wrong curve's range!" } - xdistcs res_$ic s1 U1 U2 100 2.0e-6 - xdistcs res_$ic s2 U1 U2 100 2.0e-6 + xdistcs res_$ic s1 U1 U2 100 3.0e-6 + xdistcs res_$ic s2 U1 U2 100 3.0e-6 mkedge ee res_$ic baddobjects ee From f277dcbbc0b9b7461c886998c2c31ad8cd0a1ee7 Mon Sep 17 00:00:00 2001 From: ifv Date: Fri, 24 Sep 2021 16:24:34 +0300 Subject: [PATCH 076/639] 0032557: Modeling Data - Use of BRepBuilderAPI_NurbsConvert create 2d p-curves with errors BRepTools/BRepTools_NurbsConvertModification.cxx - Checking domain of 2dCurves if surfaces are periodic is improved tests/bugs/moddata_3/bug32557 - test case added --- .../BRepTools_NurbsConvertModification.cxx | 18 +++++++++++++++--- tests/bugs/mesh/bug30008_2 | 2 +- tests/bugs/moddata_3/bug32557 | 10 ++++++++++ 3 files changed, 26 insertions(+), 4 deletions(-) create mode 100644 tests/bugs/moddata_3/bug32557 diff --git a/src/BRepTools/BRepTools_NurbsConvertModification.cxx b/src/BRepTools/BRepTools_NurbsConvertModification.cxx index bd05b0378c..67565185c9 100644 --- a/src/BRepTools/BRepTools_NurbsConvertModification.cxx +++ b/src/BRepTools/BRepTools_NurbsConvertModification.cxx @@ -493,11 +493,23 @@ Standard_Boolean BRepTools_NurbsConvertModification::NewCurve2d { //Surface is periodic, checking curve2d domain //Old domain - gp_Pnt2d aPf = C2d->Value(f2d); + Standard_Real aMinDist = Precision::Infinite(); + if (S->IsUPeriodic()) + { + aMinDist = Min(0.5 * S->UPeriod(), aMinDist); + } + if (S->IsVPeriodic()) + { + aMinDist = Min(0.5 * S->VPeriod(), aMinDist); + } + aMinDist *= aMinDist; + //Old domain + Standard_Real t = 0.5 * (f2d + l2d); + gp_Pnt2d aPf = C2d->Value(t); //New domain - gp_Pnt2d aNewPf = Curve2d->Value(f2d); + gp_Pnt2d aNewPf = Curve2d->Value(t); gp_Vec2d aT(aNewPf, aPf); - if (aT.SquareMagnitude() > Precision::SquarePConfusion()) + if (aT.SquareMagnitude() > aMinDist) { Curve2d = Handle(Geom2d_Curve)::DownCast(Curve2d->Translated(aT)); } diff --git a/tests/bugs/mesh/bug30008_2 b/tests/bugs/mesh/bug30008_2 index 7a57ceff91..ffffa6b9d8 100644 --- a/tests/bugs/mesh/bug30008_2 +++ b/tests/bugs/mesh/bug30008_2 @@ -19,7 +19,7 @@ nurbsconvert result result incmesh result 0.15 -a 20 tricheck result -checktrinfo result -tri 191 -nod 146 -defl 0.052300780129031083 -tol_abs_defl 1.0e-6 +checktrinfo result -tri 193 -nod 147 -defl 0.052300780129031083 -tol_abs_defl 1.0e-6 vinit diff --git a/tests/bugs/moddata_3/bug32557 b/tests/bugs/moddata_3/bug32557 new file mode 100644 index 0000000000..374a129033 --- /dev/null +++ b/tests/bugs/moddata_3/bug32557 @@ -0,0 +1,10 @@ +puts "===========================================================" +puts "0032557: Modeling Data - Use of BRepBuilderAPI_NurbsConvert create 2d p-curves with gaps" +puts "===========================================================" +puts "" + +restore [locate_data_file bug32557.brep] f + +nurbsconvert bf f +checkmaxtol bf -ref 1.1e-7 + From 95c380d252543148c0e7a780f14c4fcf560b7afb Mon Sep 17 00:00:00 2001 From: abulyche Date: Wed, 22 Sep 2021 12:56:33 +0300 Subject: [PATCH 077/639] 0030148: Modeling Algorithms - exception in BRepOffestAPI_MakePipe for some periodic BSpline spines This problem was solved by fix for 0030597. Added the non-regression test for this problem. --- tests/pipe/bugs/bug30148 | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 tests/pipe/bugs/bug30148 diff --git a/tests/pipe/bugs/bug30148 b/tests/pipe/bugs/bug30148 new file mode 100644 index 0000000000..103e2fb0fe --- /dev/null +++ b/tests/pipe/bugs/bug30148 @@ -0,0 +1,13 @@ +puts "=============" +puts "OCC30148: Modeling Algorithms - exc-eption in BRepOffestAPI_MakePipe for some periodic BSpline spines" +puts "=============" +puts "" + +pload MODELING + +restore [locate_data_file bug30148_1.brep] profile +restore [locate_data_file bug30148_2.brep] spine + +pipe pipe spine profile + +puts "TEST COMPLETED" \ No newline at end of file From 307fef1dcdc49108b9fddfcfc8261fc9a9c8509e Mon Sep 17 00:00:00 2001 From: aml Date: Tue, 28 Sep 2021 13:59:56 +0300 Subject: [PATCH 078/639] 0032593: Documentation - get rid of unused file in the documentation. --- .../images/modeling_algos_image037.gif | Bin 499880 -> 0 bytes 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 dox/user_guides/modeling_algos/images/modeling_algos_image037.gif diff --git a/dox/user_guides/modeling_algos/images/modeling_algos_image037.gif b/dox/user_guides/modeling_algos/images/modeling_algos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/639] 0032597: Coding Rules, Wasm_Window - add missing setter for DevicePixelRatio property --- src/Wasm/Wasm_Window.hxx | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/Wasm/Wasm_Window.hxx b/src/Wasm/Wasm_Window.hxx index 5485d25d43..62b00b3752 100644 --- a/src/Wasm/Wasm_Window.hxx +++ b/src/Wasm/Wasm_Window.hxx @@ -119,6 +119,9 @@ public: //! Return device pixel ratio (logical to backing store scale factor). virtual Standard_Real DevicePixelRatio() const Standard_OVERRIDE { return myDevicePixelRatio; } + //! Sets device pixel ratio for a window with IsVirtual() flag. + void SetDevicePixelRatio (Standard_Real theDevicePixelRatio) { myDevicePixelRatio = theDevicePixelRatio; } + //! Invalidate entire window content through generation of Expose event. Standard_EXPORT virtual void InvalidateContent (const Handle(Aspect_DisplayConnection)& theDisp) Standard_OVERRIDE; From b4871a3b12c086ccfbd8a2362f2b3c6a4d1ca4dd Mon Sep 17 00:00:00 2001 From: kgv Date: Wed, 29 Sep 2021 12:24:26 +0300 Subject: [PATCH 080/639] 0032595: Documentation - revise "Build OCCT" structure to highlight CMake usage "Building with CMake tool" subsection has been moved out from "Windows" to a dedicated top-level section. genproj sections have been merged and restructured. Added description of some new CMake configuration options. Updated URL to 3rd-party components on Development Portal. --- dox/build/build_occt/building_occt.md | 608 +++++++------------- dox/build/build_occt/images/genconf_osx.png | Bin 199166 -> 0 bytes dox/upgrade/upgrade.md | 2 +- 3 files changed, 219 insertions(+), 391 deletions(-) delete mode 100644 dox/build/build_occt/images/genconf_osx.png diff --git a/dox/build/build_occt/building_occt.md b/dox/build/build_occt/building_occt.md index e921e9e99b..db2d9e4feb 100644 --- a/dox/build/build_occt/building_occt.md +++ b/dox/build/build_occt/building_occt.md @@ -3,29 +3,25 @@ Build OCCT {#build_upgrade__building_occt} @tableofcontents -@note Before building OCCT, make sure to have all required third-party libraries installed. +Before building OCCT, make sure to have all required third-party libraries installed. The list of required libraries depends on what OCCT modules will be used, and your preferences. -The typical minimum is **Freetype** (necessary for Visualization) and **Tcl/Tk** (for DRAW). +The typical minimum is **FreeType** (necessary for Visualization) and **Tcl/Tk** (for DRAW). See @ref intro_req "requirements on 3rdparty libraries" for a full list. -On OS X we recommend to use native libraries. -@section build_occt_windows Windows - -@subsection build_occt_win_cmake Building with CMake tool - -This article describes the **CMake**-based build process, which is now suggested as a standard way to produce the binaries of Open CASCADE Technology from sources. *OCCT requires CMake version 2.8.12 or later*. +The easiest way to install third-party libraries is to download archive with pre-built binaries, corresponding to your target configuration, +from [Development Portal](https://dev.opencascade.org/resources/download/3rd-party-components). +You can also build third-party libraries from their sources, see @ref build_upgrade_building_3rdparty for instructions. -Here we describe the build procedure on the example of Windows platform with Visual Studio 2010. -However, CMake is cross-platform and can be used to build OCCT on Linux and OS X in essentially the same way. +On Linux and macOS we recommend to use libraries maintained by distributive developers, when possible. -@note Before you start, make sure to have installed all 3-rd party products that you are going to use with OCCT; see @ref build_upgrade. +@section build_occt_win_cmake Building with CMake tool -@subsubsection build_cmake_start Start CMake +This chapter describes the [CMake](https://cmake.org/download/)-based build process, which is now suggested as a standard way to produce the binaries of Open CASCADE Technology from sources. +OCCT requires CMake version 2.8.12 or later. CMake is a tool that generates the actual project files for the selected target build system (e.g. Unix makefiles) or IDE (e.g. Visual Studio 2010). - -For unexperienced users we recommend to start with *cmake-gui* -- a cross-platform GUI tool provided by CMake on Windows, Mac and Linux. -A command-line alternative, *ccmake* can also be used. +Here we describe the build procedure on the example of Windows platform with Visual Studio 2010. +However, CMake is cross-platform and can be used to build OCCT on Linux and macOS in essentially the same way. CMake deals with three directories: source, build or binary and installation. @@ -36,272 +32,286 @@ CMake deals with three directories: source, build or binary and installation. The good practice is not to use the source directory as a build one. Different configurations should be built in different build directories to avoid conflicts. It is however possible to choose one installation directory for several configurations of OCCT (differentiated by platform, bitness, compiler and build type), for example: - - d:/occt/ -- the source directory - d:/tmp/occt-build-vc10-x64 -- the build directory with the generated - solution and other intermediate files created during a CMake tool working - d:/occt-install -- the installation directory that is - able to contain several OCCT configurations -@subsubsection build_cmake_conf Configuration process + d:/occt/ - the source directory + d:/tmp/occt-build-vc10-x64 - the build directory with the generated + solution and other intermediate files created during a CMake tool working + d:/occt-install - the installation directory that is + able to contain several OCCT configurations -If the command-line tool is used, run the tool from the build directory with a single argument indicating the source (relative or absolute path) directory: +@subsection build_cmake_conf Configuration process + +For unexperienced users we recommend to start with *cmake-gui* -- a cross-platform GUI tool provided by CMake on Windows, Mac and Linux. +A command-line alternative, *ccmake* can also be used. + +If the command-line tool is used, run the tool from the build directory with a single argument indicating the source (relative or absolute path) directory, and press *c* to configure: cd d:/tmp/occt-build-vc10-x64 ccmake d:/occt @figure{/build/build_occt/images/cmake_image000.png} -Press *c* to configure. - -All actions required in the configuration process with the GUI tool will be described below. - -If the GUI tool is used, run this tool without additional arguments and after that specify the source directory by clicking **Browse Source** and the build (binary) one by clicking **Browse Build**. +If the GUI tool is used, run this tool without additional arguments and after that specify the source directory by clicking **Browse Source** and the build (binary) one by clicking **Browse Build**: @figure{/build/build_occt/images/cmake_image001.png} -**Note**: Each configuration of the project should be built in its own directory. When building multiple configurations it is recommended to indicate in the name of build directories the system, bitness and compiler (e.g., d:/occt/build/win32-vc10 ). +@note Each configuration of the project should be built in its own directory. +When building multiple configurations it is suggested to indicate in the name of build directories the system, bitness and compiler (e.g., d:/occt/build/win32-vc10). -Once the source and build directories are selected, "Configure" button should be pressed in order to start manual configuration process. It begins with selection of a target configurator. It is "Visual Studio 10 2010 Win64" in our example. +Once the source and build directories are selected, "Configure" button should be pressed in order to start manual configuration process. +It begins with selection of a target configurator. It is "Visual Studio 10 2010 Win64" in our example. @figure{/build/build_occt/images/cmake_image002.png} -To build OCCT for **Universal Windows Platform (UWP)** specify the path to toolchain file for cross-compiling d:/occt/adm/templates/uwp.toolchain.config.cmake. - -Alternatively, if you are using CMake from the command line add options -DCMAKE_SYSTEM_NAME=WindowsStore -DCMAKE_SYSTEM_VERSION=10.0 . +@note To build OCCT for **Universal Windows Platform (UWP)** specify the path to toolchain file for cross-compiling d:/occt/adm/templates/uwp.toolchain.config.cmake. +Alternatively, if you are using CMake from the command line add options `-DCMAKE_SYSTEM_NAME=WindowsStore -DCMAKE_SYSTEM_VERSION=10.0`. +Universal Windows Platform (UWP) is supported only on "Visual Studio 14 2015". +File `CASROOT/samples/xaml/ReadMe.md` describes the building procedure of XAML (UWP) sample. -**Note**: Universal Windows Platform (UWP) is supported only on "Visual Studio 14 2015". File d:/occt/samples/xaml/ReadMe.md describes the building procedure of XAML (UWP) sample. - -Once "Finish" button is pressed, the first pass of the configuration process is executed. At the end of the process, CMake outputs the list of environment variables, which have to be properly specified for successful configuration. +Once "Finish" button is pressed, the first pass of the configuration process is executed. +At the end of the process, CMake outputs the list of environment variables, which have to be properly specified for successful configuration. @figure{/build/build_occt/images/cmake_image003.png} -The error message provides some information about these variables. This message will appear after each pass of the process until all required variables are specified correctly. +The error message provides some information about these variables. +This message will appear after each pass of the process until all required variables are specified correctly. -The change of the state of some variables can lead to the appearance of new variables. The new variables appeared after the pass of the configuration process are highlighted with red color by CMake GUI tool. +The change of the state of some variables can lead to the appearance of new variables. +The new variables appeared after the pass of the configuration process are highlighted with red color by CMake GUI tool. -Note: There is "grouped" option, which groups variables with a common prefix. +@note There is "grouped" option, which groups variables with a common prefix. The following table gives the full list of environment variables used at the configuration stage: | Variable | Type | Purpose | |----------|------|---------| -| CMAKE_BUILD_TYPE | String | Specifies the build type on single-configuration generators (such as make). Possible values are Debug, Release and RelWithDebInfo | -| USE_FREEIMAGE | Boolean flag | Indicates whether FreeImage product should be used in OCCT visualization module for support of popular graphics image formats (PNG, BMP, etc.) | -| USE_RAPIDJSON | Boolean flag | Indicates whether RapidJSON product should be used in OCCT Data Exchange module for support of glTF mesh file format | -| USE_TBB | Boolean flag | Indicates whether TBB 3rd party is used or not. TBB stands for Threading Building Blocks, the technology of Intel Corp, which comes with different mechanisms and patterns for injecting parallelism into your application. OCCT remains parallel even without TBB product | -| USE_VTK | Boolean flag | Indicates whether VTK 3rd party is used or not. VTK stands for Visualization ToolKit, the technology of Kitware Inc intended for general-purpose scientific visualization. OCCT comes with a bridge between CAD data representation and VTK by means of its dedicated VIS component (VTK Integration Services). You may skip this 3rd party unless you are planning to use VTK visualization for OCCT geometry. See the official documentation @ref occt_user_guides__vis for the details on VIS | +| CMAKE_BUILD_TYPE | String | Specifies the build type on single-configuration generators (such as make). Possible values are Debug, Release and RelWithDebInfo | +| USE_FREETYPE | Boolean | Indicates whether FreeType product should be used in OCCT for text rendering | +| USE_FREEIMAGE | Boolean | Indicates whether FreeImage product should be used in OCCT visualization module for support of popular graphics image formats (PNG, BMP, etc.) | +| USE_OPENVR | Boolean | Indicates whether OpenVR product should be used in OCCT visualization module for support of Virtual Reality | +| USE_OPENGL | Boolean | Indicates whether TKOpenGl graphic driver using OpenGL library (desktop) should be built within OCCT visualization module | +| USE_GLES2 | Boolean | Indicates whether TKOpenGles graphic driver using OpenGL ES library (embedded OpenGL) should be built within OCCT visualization module | +| USE_RAPIDJSON | Boolean | Indicates whether RapidJSON product should be used in OCCT Data Exchange module for support of glTF mesh file format | +| USE_DRACO | Boolean | Indicates whether Draco product should be used in OCCT Data Exchange module for support of Draco compression in glTF mesh file format | +| USE_TK | Boolean | Indicates whether Tcl/Tk product should be used in OCCT Draw Harness module for user interface (in addition to Tcl, which is mandatory for Draw Harness) | +| USE_TBB | Boolean | Indicates whether TBB (Threading Building Blocks) 3rd party is used or not. Note that OCCT remains parallel even without TBB product | +| USE_VTK | Boolean | Indicates whether VTK 3rd party is used or not. OCCT comes with a bridge between CAD data representation and VTK by means of its dedicated VIS component (VTK Integration Services). You may skip this 3rd party unless you are planning to use VTK visualization for OCCT geometry. See the official documentation @ref occt_user_guides__vis for the details on VIS | | 3RDPARTY_DIR | Path | Defines the root directory where all required 3rd party products will be searched. Once you define this path it is very convenient to click "Configure" button in order to let CMake automatically detect all necessary products| -| 3RDPARTY_FREETYPE_* | Path | Path to Freetype binaries | +| 3RDPARTY_FREETYPE_* | Path | Path to FreeType binaries | | 3RDPARTY_TCL_* 3RDPARTY_TK_* | Path | Path to Tcl/Tk binaries | -| 3RDPARTY_FREEIMAGE* | Path | Path to Freeimage binaries | -| 3RDPARTY_TBB* | Path | Path to TBB binaries | +| 3RDPARTY_FREEIMAGE* | Path | Path to FreeImage binaries | +| 3RDPARTY_TBB* | Path | Path to TBB binaries | | 3RDPARTY_VTK_* | Path | Path to VTK binaries | -| BUILD_MODULE_| Boolean flag | Indicates whether the corresponding OCCT module should be built or not. It should be noted that some toolkits of a module can be built even if this module is not checked (this happens if some other modules depend on these toolkits). The main modules and their descriptions can be found in @ref user_guides | +| BUILD_MODULE_| Boolean | Indicates whether the corresponding OCCT module should be built or not. It should be noted that some toolkits of a module can be built even if this module is not checked (this happens if some other modules depend on these toolkits). The main modules and their descriptions can be found in @ref user_guides | | BUILD_LIBRARY_TYPE | String | Specifies the type of library to be created. "Shared" libraries are linked dynamically and loaded at runtime. "Static" libraries are archives of object files used when linking other targets. Note that Draw Harness plugin system is incompatible with "Static" builds, and therefore it is disabled for these builds.| | BUILD_ADDITIONAL_TOOLKITS | String | Semicolon-separated individual toolkits to include into build process. If you want to build some particular libraries (toolkits) only, then you may uncheck all modules in the corresponding *BUILD_MODUE_\* options and provide the list of necessary libraries here. Of course, all dependencies will be resolved automatically | -| BUILD_YACCLEX | Boolean flag | Enables Flex/Bison lexical analyzers. OCCT source files relating to STEP reader and ExprIntrp functionality are generated automatically with Flex/Bison. Checking this option leads to automatic search of Flex/Bison binaries and regeneration of the mentioned files | -| BUILD_SAMPLES_MFC | Boolean flag | Indicates whether MFC samples should be built together with OCCT. This option is only relevant to Windows platforms | -| BUILD_SAMPLES_QT | Boolean flag | Indicates whether QT samples should be built together with OCCT. | -| BUILD_Inspector | Boolean flag | Indicates whether Inspector should be built together with OCCT. | -| BUILD_DOC_Overview | Boolean flag | Indicates whether OCCT overview documentation project should be created together with OCCT. It is not built together with OCCT. Checking this option leads to automatic search of Doxygen binaries. Its building calls Doxygen command to generate the documentation in HTML format | +| BUILD_YACCLEX | Boolean | Enables Flex/Bison lexical analyzers. OCCT source files relating to STEP reader and ExprIntrp functionality are generated automatically with Flex/Bison. Checking this option leads to automatic search of Flex/Bison binaries and regeneration of the mentioned files | +| BUILD_SAMPLES_MFC | Boolean | Indicates whether MFC samples should be built together with OCCT. This option is only relevant to Windows platforms | +| BUILD_SAMPLES_QT | Boolean | Indicates whether QT samples should be built together with OCCT. | +| BUILD_Inspector | Boolean | Indicates whether Inspector should be built together with OCCT. | +| BUILD_DOC_Overview | Boolean | Indicates whether OCCT overview documentation project should be created together with OCCT. It is not built together with OCCT. Checking this option leads to automatic search of Doxygen binaries. Its building calls Doxygen command to generate the documentation in HTML format | | BUILD_PATCH | Path | Points to the directory recognized as a "patch" for OCCT. If specified, the files from this directory take precedence over the corresponding native OCCT sources. This way you are able to introduce patches to Open CASCADE Technology not affecting the original source distribution | -| BUILD_WITH_DEBUG | Boolean flag | Enables extended messages of many OCCT algorithms, usually printed to cout. These include messages on internal errors and special cases encountered, timing, etc. | -| BUILD_ENABLE_FPE_SIGNAL_HANDLER | Boolean flag | Enable/Disable the floating point exceptions (FPE) during DRAW execution only. Corresponding environment variable (CSF_FPE) can be changed manually in custom.bat/sh scripts without regeneration by CMake. | +| BUILD_WITH_DEBUG | Boolean | Enables extended messages of many OCCT algorithms, usually printed to cout. These include messages on internal errors and special cases encountered, timing, etc. | +| BUILD_ENABLE_FPE_SIGNAL_HANDLER | Boolean | Enable/Disable the floating point exceptions (FPE) during DRAW execution only. Corresponding environment variable (CSF_FPE) can be changed manually in custom.bat/sh scripts without regeneration by CMake. | | CMAKE_CONFIGURATION_TYPES | String | Semicolon-separated CMake configurations | -| INSTALL_DIR | Path | Points to the installation directory. *INSTALL_DIR* is a synonym of *CMAKE_INSTALL_PREFIX*. The user can specify both *INSTALL_DIR* or *CMAKE_INSTALL_PREFIX* | -| INSTALL_DIR_BIN | Path | Relative path to the binaries installation directory (absolute path is ${INSTALL_DIR}/${INSTALL_DIR_BIN}) | -| INSTALL_DIR_SCRIPT | Path | Relative path to the scripts installation directory (absolute path is ${INSTALL_DIR}/${INSTALL_DIR_SCRIPT}) | -| INSTALL_DIR_LIB | Path | Relative path to the libraries installation directory (absolute path is ${INSTALL_DIR}/${INSTALL_DIR_LIB}) | -| INSTALL_DIR_INCLUDE | Path | Relative path to the includes installation directory (absolute path is ${INSTALL_DIR}/${INSTALL_DIR_INCLUDE}) | +| INSTALL_DIR | Path | Points to the installation directory. *INSTALL_DIR* is a synonym of *CMAKE_INSTALL_PREFIX*. The user can specify both *INSTALL_DIR* or *CMAKE_INSTALL_PREFIX* | +| INSTALL_DIR_BIN | Path | Relative path to the binaries installation directory (absolute path is ${INSTALL_DIR}/${INSTALL_DIR_BIN}) | +| INSTALL_DIR_SCRIPT | Path | Relative path to the scripts installation directory (absolute path is ${INSTALL_DIR}/${INSTALL_DIR_SCRIPT}) | +| INSTALL_DIR_LIB | Path | Relative path to the libraries installation directory (absolute path is ${INSTALL_DIR}/${INSTALL_DIR_LIB}) | +| INSTALL_DIR_INCLUDE | Path | Relative path to the includes installation directory (absolute path is ${INSTALL_DIR}/${INSTALL_DIR_INCLUDE}) | | INSTALL_DIR_RESOURCE | Path | Relative path to the resources installation directory (absolute path is ${INSTALL_DIR}/${INSTALL_DIR_RESOURCE}) | -| INSTALL_DIR_LAYOUT | String | Defines the structure of OCCT files (binaries, resources, headers, etc.) for the install directory. Two variants are predefined: for Windows (standard OCCT layout) and for Unix operating systems (standard Linux layout). If needed, the layout can be customized with INSTALL_DIR_* variables | -| INSTALL_DIR_DATA | Path | Relative path to the data files installation directory (absolute path is ${INSTALL_DIR}/${INSTALL_DIR_DATA}) | -| INSTALL_DIR_SAMPLES | Path | Relative path to the samples installation directory. Note that only "samples/tcl" folder will be installed. (absolute path is ${INSTALL_DIR}/${INSTALL_DIR_SAMPLES}) | -| INSTALL_DIR_TESTS | Path | Relative path to the tests installation directory (absolute path is ${INSTALL_DIR}/${INSTALL_DIR_TESTS}) | -| INSTALL_DIR_DOC | Path | Relative path to the documentation installation directory (absolute path is ${INSTALL_DIR}/${INSTALL_DIR_DOC}) | -| INSTALL_FREETYPE | Boolean flag | Indicates whether Freetype binaries should be installed into the installation directory | -| INSTALL_FREEIMAGE* | Boolean flag | Indicates whether Freeimage binaries should be installed into the installation directory | -| INSTALL_TBB | Boolean flag | Indicates whether TBB binaries should be installed into the installation directory | -| INSTALL_VTK | Boolean flag | Indicates whether VTK binaries should be installed into the installation directory | -| INSTALL_TCL | Boolean flag | Indicates whether TCL binaries should be installed into the installation directory | -| INSTALL_TEST_CASES | Boolean flag | Indicates whether non-regression OCCT test scripts should be installed into the installation directory | -| INSTALL_DOC_Overview | Boolean flag | Indicates whether OCCT overview documentation should be installed into the installation directory | - -**Note:** Only the forward slashes ("/") are acceptable in the CMake options defining paths. +| INSTALL_DIR_LAYOUT | String | Defines the structure of OCCT files (binaries, resources, headers, etc.) for the install directory. Two variants are predefined: for Windows (standard OCCT layout) and for Unix operating systems (standard Linux layout). If needed, the layout can be customized with INSTALL_DIR_* variables | +| INSTALL_DIR_DATA | Path | Relative path to the data files installation directory (absolute path is ${INSTALL_DIR}/${INSTALL_DIR_DATA}) | +| INSTALL_DIR_SAMPLES | Path | Relative path to the samples installation directory. Note that only "samples/tcl" folder will be installed. (absolute path is ${INSTALL_DIR}/${INSTALL_DIR_SAMPLES}) | +| INSTALL_DIR_TESTS | Path | Relative path to the tests installation directory (absolute path is ${INSTALL_DIR}/${INSTALL_DIR_TESTS}) | +| INSTALL_DIR_DOC | Path | Relative path to the documentation installation directory (absolute path is ${INSTALL_DIR}/${INSTALL_DIR_DOC}) | +| INSTALL_FREETYPE | Boolean | Indicates whether FreeType binaries should be installed into the installation directory | +| INSTALL_FREEIMAGE | Boolean | Indicates whether FreeImage binaries should be installed into the installation directory | +| INSTALL_TBB | Boolean | Indicates whether TBB binaries should be installed into the installation directory | +| INSTALL_VTK | Boolean | Indicates whether VTK binaries should be installed into the installation directory | +| INSTALL_TCL | Boolean | Indicates whether TCL binaries should be installed into the installation directory | +| INSTALL_TEST_CASES | Boolean | Indicates whether non-regression OCCT test scripts should be installed into the installation directory | +| INSTALL_DOC_Overview | Boolean | Indicates whether OCCT overview documentation should be installed into the installation directory | + +@note Only the forward slashes ("/") are acceptable in the CMake options defining paths. @subsubsection build_cmake_3rdparty 3rd party search mechanism -If *3RDPARTY_DIR* directory is defined, then required 3rd party binaries are sought in it, and default system folders are ignored. - +If `3RDPARTY_DIR` directory is defined, then required 3rd party binaries are sought in it, and default system folders are ignored. The procedure expects to find binary and header files of each 3rd party product in its own sub-directory: *bin*, *lib* and *include*. - The results of the search (achieved on the next pass of the configuration process) are recorded in the corresponding variables: -* *3RDPARTY_\_DIR* -- path to the 3rdparty directory (with directory name) (e.g. D:/3rdparty/tcltk-86-32) -* *3RDPARTY_\_LIBRARY_DIR* -- path to the directory containing a library (e.g. D:/3rdparty/tcltk-86-32/lib). -* *3RDPARTY_\_INCLUDE_DIR* -- path to the directory containing a header file (e.g., D:/3rdparty/tcltk-86-32/include) -* *3RDPARTY_\_DLL_DIR* -- path to the directory containing a shared library (e.g., D:/3rdparty/tcltk-86-32/bin) This variable is only relevant to Windows platforms. +* `3RDPARTY__DIR` -- path to the 3rdparty directory (with directory name) (e.g. D:/3rdparty/tcltk-86-32); +* `3RDPARTY__LIBRARY_DIR` -- path to the directory containing a library (e.g. D:/3rdparty/tcltk-86-32/lib); +* `3RDPARTY__INCLUDE_DIR` -- path to the directory containing a header file (e.g., D:/3rdparty/tcltk-86-32/include); +* `3RDPARTY__DLL_DIR` -- path to the directory containing a shared library (e.g., D:/3rdparty/tcltk-86-32/bin) This variable is only relevant to Windows platforms. -Note: each library and include directory should be children of the product directory if the last one is defined. +@note Each library and include directory should be children of the product directory if the last one is defined. The search process is as follows: -1. Common path: *3RDPARTY_DIR* -2. Path to a particular 3rd-party library: *3RDPARTY_\_DIR* +1. Common path: `3RDPARTY_DIR` +2. Path to a particular 3rd-party library: `3RDPARTY__DIR` 3. Paths to headers and binaries: - 1. *3RDPARTY_\_INCLUDE_DIR* - 2. *3RDPARTY_\_LIBRARY_DIR* - 3. *3RDPARTY_\_DLL_DIR* + 1. `3RDPARTY__INCLUDE_DIR` + 2. `3RDPARTY__LIBRARY_DIR` + 3. `3RDPARTY__DLL_DIR` -If a variable of any level is not defined (empty or \-NOTFOUND ) and the upper level variable is defined, the content of the non-defined variable will be sought at the next configuration step. If the search process at level 3 does not find the required files, it seeks in default places. +If a variable of any level is not defined (empty or `-NOTFOUND`) and the upper level variable is defined, the content of the non-defined variable will be sought at the next configuration step. +If the search process at level 3 does not find the required files, it seeks in default places. -If a search result (include path, or library path, or dll path) does not meet your expectations, you can change *3RDPARTY_\_*_DIR variable*, clear (if they are not empty) *3RDPARTY_\_DLL_DIR, 3RDPARTY_\_INCLUDE_DIR* and 3RDPARTY_\_LIBRARY_DIR variables (or clear one of them) and run the configuration process again. +If a search result (include path, or library path, or dll path) does not meet your expectations, you can change `3RDPARTY__*_DIR` variable, +clear (if they are not empty) `3RDPARTY__DLL_DIR`, `3RDPARTY__INCLUDE_DIR` and `3RDPARTY__LIBRARY_DIR` variables (or clear one of them) and run the configuration process again. -At this time the search will be performed in the newly identified directory -and the result will be recorded to corresponding variables (replace old value if it is necessary). - -For example, *3RDPARTY_FREETYPE_DIR* variable +At this time the search will be performed in the newly identified directory and the result will be recorded to corresponding variables (replace old value if it is necessary). +For example, `3RDPARTY_FREETYPE_DIR` variable d:/3rdparty/freetype-2.4.10 -can be changed to +can be changed to d:/3rdparty/freetype-2.5.3 -During the configuration process the related variables (*3RDPARTY_FREETYPE_DLL_DIR*, *3RDPARTY_FREETYPE_INCLUDE_DIR* and *3RDPARTY_FREETYPE_LIBRARY_DIR*) will be filled with new found values. +During the configuration process the related variables (`3RDPARTY_FREETYPE_DLL_DIR`, `3RDPARTY_FREETYPE_INCLUDE_DIR` and `3RDPARTY_FREETYPE_LIBRARY_DIR`) will be filled with new found values. -**Note**: The names of searched libraries and header files are hard-coded. If there is the need to change their names, change appropriate cmake variables (edit CMakeCache.txt file or edit in cmake-gui in advance mode) without reconfiguration: *3RDPARTY_\_INCLUDE* for include, *3RDPARTY_\_LIB* for library and *3RDPARTY_\_DLL* for shared library. +@note The names of searched libraries and header files are hard-coded. +If there is the need to change their names, change appropriate CMake variables (edit CMakeCache.txt file or edit in cmake-gui in advance mode) without reconfiguration: +`3RDPARTY__INCLUDE` for include, `3RDPARTY__LIB` for library and `3RDPARTY__DLL` for shared library. -@subsubsection build_cmake_gen Projects generation +@subsection build_cmake_gen Projects generation Once the configuration process is done, the "Generate" button is used to prepare project files for the target IDE. In our exercise the Visual Studio solution will be automatically created in the build directory. -@subsubsection build_cmake_build Building +@subsection build_cmake_build Building Go to the build folder, start the Visual Studio solution *OCCT.sln* and build it by clicking **Build -> Build Solution**. @figure{/build/build_occt/images/cmake_image004.png} -By default the build solution process skips the building of the INSTALL and Overview project. - +By default, the build solution process skips the building of the INSTALL and Overview projects. When the building process is finished build: -* Overview project to generate OCCT overview documentation (if BUILD_DOC_Overview variable is checked) -* the *INSTALL* project to run **the installation process** - -For this, right-click on the *Overview/INSTALL* project and select **Project Only -> Build Only** -> *Overview/INSTALL* in the solution explorer. +* *Overview* project to generate OCCT overview documentation (if `BUILD_DOC_Overview` variable is checked) +* the *INSTALL* project to run the **installation process** -@subsubsection build_cmake_install Installation +For this, right-click on the *Overview/INSTALL* project and select **Project Only -> Build Only** -> *Overview/INSTALL* in the solution explorer. -Installation is a process of extracting redistributable resources (binaries, include files etc) from the build directory into the installation one. The installation directory will be free of project files, intermediate object files and any other information related to the build routines. +@subsection build_cmake_install Installation -Normally you use the installation directory of OCCT to link against your specific application. +Installation is a process of extracting redistributable resources (binaries, include files etc) from the build directory into the installation one. +The installation directory will be free of project files, intermediate object files and any other information related to the build routines. +Normally you use the installation directory of OCCT to link against your specific application. The directory structure is as follows: - - data -- data files for OCCT (brep, iges, stp) - doc -- OCCT overview documentation in HTML format - inc -- header files - samples -- samples - src -- all required source files for OCCT - tests -- OCCT test suite - win32\vc10\bind -- binary files (installed 3rdparties and occt) - \libd -- libraries (installed 3rdparties and occt) - -**Note:** The above example is given for debug configuration. However, it is generally safe to use the same installation directory for the release build. In the latter case the contents of install directory will be enriched with subdirectories and files related to the release configuration. In particular, the binaries directory win64 will be expanded as -follows: + + data - data files for OCCT (brep, iges, stp) + doc - OCCT overview documentation in HTML format + inc - header files + samples - samples + src - all required source files for OCCT + tests - OCCT test suite + win32\vc10\bind - binary files (installed 3rdparties and occt) + \libd - libraries (installed 3rdparties and occt) + +@note The above example is given for debug configuration. +However, it is generally safe to use the same installation directory for the release build. +In the latter case the contents of install directory will be enriched with subdirectories and files related to the release configuration. +In particular, the binaries directory win64 will be expanded as follows: \win32\vc10\bind \libd \bin \lib -If CMake installation flags are enabled for the 3rd party products (e.g. INSTALL_FREETYPE), then the corresponding binaries will be copied to the same bin(d) and lib(d) directories together with the native binaries of OCCT. Such organization of libraries can be especially helpful if your OCCT-based software does not use itself the 3rd parties of Open CASCADE Technology (thus, there is no sense to pack them into dedicated directories). +If CMake installation flags are enabled for the 3rd party products (e.g. `INSTALL_FREETYPE`), then the corresponding binaries will be copied to the same bin(d) and lib(d) directories together with the native binaries of OCCT. +Such organization of libraries can be especially helpful if your OCCT-based software does not use itself the 3rd parties of Open CASCADE Technology (thus, there is no sense to pack them into dedicated directories). The installation folder contains the scripts to run *DRAWEXE* (*draw.bat* or *draw.sh*), samples (if they were installed) and overview.html (short-cut for installed OCCT overview documentation). -@subsection build_occt_win_codeblocks Building with Code::Blocks - -This file describes steps to build OCCT libraries from sources using **Code::Blocks**, a cross-platform IDE, using project files generated by OCCT legacy tool **genproj**. -It can be used as an alternative to CMake build system (see @ref build_occt_win_cmake) for all supported platforms. - -@subsubsection build_codeblocks_3rdparty Third-party libraries - -Before building OCCT, make sure to have all the needed third-party libraries installed, see @ref build_upgrade. +@subsection build_occt_crossplatform_cmake Cross-compiling (Android) -@subsubsection build_codeblocks_conf Configuration +This section describes the steps to build OCCT libraries for Android from a complete source package with GNU make (makefiles). +The steps on Windows 7 and Ubuntu 15.10 are similar. There is the only one difference: makefiles are built with mingw32-make on Windows and native GNU make on Ubuntu. -Before building it is necessary to set up build environment. - -The environment is defined in the file *custom.sh* (on Linux and OS X) or *custom.bat* (on Windows) which can be edited directly: - -* Add paths to includes of used third-party libraries in variable *CSF_OPT_INC*. -* Add paths to their binary libraries in variable *CSF_OPT_LIB64*. -* Set variable *SHORTCUT_HEADERS* to specify a method for population of folder *inc* by header files. Supported methods are: - * *Copy* - headers will be copied from *src*; - * *ShortCut* - short-cut header files will be created, redirecting to same-named header located in *src*; - * "HardLink* - hard links to headers located in *src* will be created. -* For optional third-party libraries, set corresponding environment variable HAVE_ to either *false*, e.g.: -~~~~ - export HAVE_FREEIMAGE=false -~~~~ +Required tools (download and install if it is required): + - CMake 3.0+ + - [Cross-compilation toolchain for CMake](https://github.com/taka-no-me/android-cmake) + - [Android NDK r12+](https://developer.android.com/ndk/downloads) + - GNU Make: MinGW v4.82+ for [Windows](https://www.mingw-w64.org/), GNU Make 4.0 for Ubuntu. -Alternatively, or when *custom.sh* or *custom.bat* does not exist, you can launch **genconf** tool to configure environment interactively: +Run GUI tool provided by CMake and: + - Specify the root folder of OCCT (`$CASROOT`, which contains *CMakelists.txt* file) by clicking **Browse Source**. + - Specify the location (build folder) for CMake generated project files by clicking **Browse Build**. -@figure{/build/build_occt/images/genconf_linux.png} +@figure{/build/build_occt/images/android_image001.png} -Click "Save" to store the specified configuration in *custom.sh* or *custom.bat* file. - -@subsubsection build_codeblocks_gen Projects generation +Click **Configure** button. It opens the window with a drop-down list of generators supported by CMake project. +Select "MinGW MakeFiles" item from the list + - Choose "Specify toolchain file for cross-compiling", and click "Next". +@figure{/build/build_occt/images/android_image002.png} -Launch **genproj** tool with option *cbp* to update content of *inc* folder and generate project files after changes in OCCT code affecting layout or composition of source files: + - Specify a toolchain file at the next dialog to `android.toolchain.cmake`, and click "Finish". +@figure{/build/build_occt/images/android_image003.png} -~~~~ - $ cd /dev/OCCT/opencascade-7.0.0 - $ ./genproj cbp -~~~~ +If `ANDROID_NDK` environment variable is not defined in current OS, add cache entry `ANDROID_NDK` (entry type is `PATH`) -- path to the NDK folder ("Add Entry" button): +@figure{/build/build_occt/images/android_image004.png} -The generated Code::Blocks project are placed into subfolder *adm/<OS>/cbp*. +If on Windows the message is appeared: + "CMake Error: CMake was unable to find a build program corresponding to "MinGW Makefiles" CMAKE_MAKE_PROGRAM is not set. You probably need to select a different build tool.", +specify `CMAKE_MAKE_PROGRAM` to mingw32-make executable. +@figure{/build/build_occt/images/android_image005.png} -@note To use **genproj** and **genconf** tools you need to have Tcl installed and accessible by PATH. +How to configure OCCT, see @ref build_cmake_conf "Configure" section taking into account the specific configuration variables for Android: + - `ANDROID_ABI` = `armeabi-v7a` + - `ANDROID_NATIVE_API_LEVEL` = `15` + - `ANDROID_NDK_LAYOUT` is equal to `CMAKE_BUILD_TYPE` variable + - `BUILD_MODULE_Draw` = `OFF` -@subsubsection build_codeblocks_build Building +@figure{/build/build_occt/images/android_image006.png} -To start **Code::Blocks**, launch script *codeblocks.sh*. +Click **Generate** button and wait until the generation process is finished. +Then makefiles will appear in the build folder (e.g. D:/tmp/occt-android ). -To build all toolkits, click **Build->Build workspace** in the menu bar. +Open console and go to the build folder. Type "mingw32-make" (Windows) or "make" (Ubuntu) to start build process: +> mingw32-make +or +> make -To start *DRAWEXE*, which has been built with **Code::Blocks** on Mac OS X, run the script -~~~~ - ./draw.sh cbp [d] -~~~~ -Option *d* is used if OCCT has been built in **Debug** mode. +Parallel building can be started with using `-jN` argument of "mingw32-make/make", where `N` is the number of building threads: +> mingw32-make -j4 +or +> make -j4 -@subsection build_occt_genproj Building with Genproj tool +Type "mingw32-make/make" with argument "install" to place the libraries to the install folder: +> mingw32-make install +or +> make install -This page describes steps to build OCCT libraries from a complete source archive on Windows with MS Visual C++ using projects generated by **genproj** tool. -It is an alternative to use of CMake build system (see @ref build_occt_win_cmake). +@section build_occt_genproj Building with Genproj tool -**genproj** is a legacy tool (originated from command "wgenproj" in WOK) for generation of Visual Studio, Code.Blocks, and XCode project files used for building Open CASCADE Technology. +**genproj** is a legacy tool (originated from command "wgenproj" in WOK) for generation of Visual Studio, Code::Blocks, Qt Creator (qmake), and XCode project files for building Open CASCADE Technology. These project files are placed inside OCCT directory (in *adm* subfolder) and use relative paths, thus can be moved together with sources. - The project files included in official distribution of OCCT are generated by this tool. -If you have official distribution with project files included, you can use them directly without a need to call **genproj**. - -@subsubsection build_msvc_3rdparty Third-party libraries -Before building OCCT, make sure to have all the required third-party libraries installed. +@note If you have official distribution with project files included, you can use them directly without a need to call **genproj**. -The easiest way to install third-party libraries is to download archive with pre-built binaries, corresponding to version of Visual Studio you are using, from https://opencascade.com/content/3rd-party-components. +**genproj** is a less flexible alternative to use of CMake build system (see @ref build_occt_win_cmake), but still has some small features useful for OCCT development. -You can also build third-party libraries from their sources, see @ref build_upgrade_building_3rdparty for instructions. - -@subsubsection build_msvc_conf Configuration +@subsection build_genproj Configuration process -If you have Visual Studio projects already available (pre-installed or generated), you can edit file *custom.bat* manually to adjust the environment: +The environment is defined in the file *custom.sh* (on Linux and macOS) or *custom.bat* (on Windows) which can be edited directly: -* *VCVER* -- specification of format of project files, defining also version of Visual Studio to be used, and default name of the sub-folder for binaries: +* `ARCH` -- architecture (32 or 64), affects only `PATH` variable for execution +* `HAVE_*` -- flags to enable or disable use of optional third-party products +* `CSF_OPT_*` -- paths to search for includes and binaries of all used third-party products +* `SHORTCUT_HEADERS` -- defines method for population of folder *inc* by header files. Supported methods are: + * *Copy* - headers will be copied from *src*; + * *ShortCut* - short-cut header files will be created, redirecting to same-named header located in *src*; + * *HardLink* - hard links to headers located in *src* will be created. +* `VCVER` -- specification of format of project files, defining also version of Visual Studio to be used, and default name of the sub-folder for binaries: +* Add paths to includes of used third-party libraries in variable `CSF_OPT_INC`. +* Add paths to their binary libraries in variable `CSF_OPT_LIB64`. +* For optional third-party libraries, set corresponding environment variable `HAVE_` to either *false*, e.g. `export HAVE_FREEIMAGE=false`. | VCVER | Visual Studio version | Windows Platform | Binaries folder name | |-----------|-----------------------|----------------------------------|----------------------| @@ -315,267 +325,85 @@ If you have Visual Studio projects already available (pre-installed or generated | vc142 | 2019 (16) | Desktop (Windows API) | vc14 | | vc142-uwp | 2019 (16) | UWP (Universal Windows Platform) | vc14-uwp | -* *ARCH* -- architecture (32 or 64), affects only *PATH* variable for execution -* HAVE_* -- flags to enable or disable use of optional third-party products -* CSF_OPT_* -- paths to search for includes and binaries of all used third-party products -* *SHORTCUT_HEADERS* -- defines method for population of folder *inc* by header files. Supported methods are: - * *Copy* - headers will be copied from *src*; - * *ShortCut* - short-cut header files will be created, redirecting to same-named header located in *src*; - * "HardLink* - hard links to headers located in *src* will be created. - Alternatively, you can launch **genconf**, a GUI tool allowing to configure build options interactively. That tool will analyze your environment and propose you to choose available options: -* Version of Visual Studio to be used (from the list of installed ones, detected by presence of environment variables like *VS100COMNTOOLS*). +* Type and version of project files to generate (from the list of installed ones, detected by presence of environment variables like `VS100COMNTOOLS` on Windows platform). * Method to populate folder *inc* (short-cuts by default). * Location of third-party libraries (usually downloaded from OCCT web site, see above). * Path to common directory where third-party libraries are located (optional). * Paths to headers and binaries of the third-party libraries (found automatically basing on previous options; click button "Reset" to update). * Generation of PDB files within Release build ("Release with Debug info", false by default). +Below are screenshots of **genconf** tool on various platforms (Windows and Linux): @figure{/build/build_occt/images/genconf_windows.png} +@figure{/build/build_occt/images/genconf_linux.png} -Click "Save" to store the specified configuration in *custom.bat* file. - -@subsubsection build_msvc_generate Projects generation +Click "Save" to store the specified configuration in *custom.bat* (Windows) or *custom.sh* (other systems) file. + +@subsection build_genproj_generate Projects generation Launch **genproj** to update content of *inc* folder and generate project files after changes in OCCT code affecting layout or composition of source files. -@note To use **genproj** and **genconf** tools you need to have Tcl installed and accessible by PATH. +@note To use **genproj** and **genconf** tools you need to have Tcl installed and accessible by `PATH`. If Tcl is not found, the tool may prompt you to enter the path to directory where Tcl can be found. - + ~~~~ $ genproj.bat ~~~~ Note that if *custom.bat* is not present, **genproj** will start **genconf** to configure environment. -@subsubsection build_msvc_build Building +@subsection build_genproj_build Building + +@subsubsection build_msvc_build Visual Studio Launch *msvc.bat* to start Visual Studio with all necessary environment variables defined, and build the whole solution or required toolkits. -Note: the MSVC project files are located in folders adm\\msvc\\vc.... +The MSVC project files are located in folders adm\\msvc\\vc.... Binaries are produced in *win32* or *win64* folders. To start DRAW, launch *draw.bat*. -@section build_occt_linux Linux +@subsubsection build_codeblocks_build Code::Blocks -You may choose one of the following ways to generate, configure and build OCCT sources on Linux just keeping in mind -this platform specific: - -* @ref build_occt_win_cmake "Configuration, generation and building OCCT on Windows using CMake tool" -* @ref build_occt_code_blocks "Building on Mac OS X with Code::Blocks IDE" - -@section build_occt_crossplatform_cmake Android (cross-compiling) - -This article describes the steps to build OCCT libraries for Android from a complete source package -with GNU make (makefiles). The steps on Windows 7 and Ubuntu 15.10 are similar. There is the only one difference: - makefiles are built with mingw32-make -on Windows and native GNU make on Ubuntu. - -Required tools (download and install if it is required): - - CMake v3.0+ http://www.cmake.org/cmake/resources/software.html - - Cross-compilation toolchain for CMake https://github.com/taka-no-me/android-cmake - - Android NDK rev.10+ https://developer.android.com/tools/sdk/ndk/index.html - - GNU Make: MinGW v4.82+ for Windows (http://sourceforge.net/projects/mingw/files/), GNU Make 4.0 for Ubuntu. - -Run GUI tool provided by CMake. - -@subsection build_occt_crossplatform_cmake_config Configuration - -**Configure Tools** - - Specify the root folder of OCCT ($CASROOT, which contains *CMakelists.txt* file) by clicking **Browse Source**. - - Specify the location (build folder) for Cmake generated project files by clicking **Browse Build**. - -@figure{/build/build_occt/images/android_image001.png} - -Click **Configure** button. It opens the window with a drop-down list of generators supported by CMake project. - -Select "MinGW MakeFiles" item from the list - - Choose "Specify toolchain file for cross-compiling" - - Click "Next" -@figure{/build/build_occt/images/android_image002.png} +Code::Blocks is a cross-platform IDE which can be used for building OCCT on Linux, macOS and Windows platforms. +The generated Code::Blocks project could be found within subfolder *adm/<OS>/cbp*. - - Specify a toolchain file at the next dialog by android.toolchain.cmake . It is contained by cross-compilation -toolchain for CMake - - Click "Finish" -@figure{/build/build_occt/images/android_image003.png} - -If ANDROID_NDK environment variable is not defined in current OS, add cache entry ANDROID_NDK (entry type is PATH) -- -path to the NDK folder ("Add Entry" button) -@figure{/build/build_occt/images/android_image004.png} - -If on Windows the message is appeared: "CMake Error: CMake was unable to find a build program corresponding -to "MinGW Makefiles" -CMAKE_MAKE_PROGRAM is not set. You probably need to select a different build tool.", -specify **CMAKE_MAKE_PROGRAM** to mingw32-make executable. -@figure{/build/build_occt/images/android_image005.png} - -**Configure OCCT** - -How to configure OCCT, see "OCCT Configuration" section of @ref build_occt_win_cmake -"Configure, Generate, Build using CMake tool" taking into account the specific configuration variables for android: - - ANDROID_ABI = armeabi-v7a - - ANDROID_NATIVE_API_LEVEL = 15 - - ANDROID_NDK_LAYOUT is equal to CMAKE_BUILD_TYPE variable - - **BUILD_MODULE_Draw = OFF** - -@figure{/build/build_occt/images/android_image006.png} - -@subsection build_occt_crossplatform_cmake_generation Generate Makefiles - -Click **Generate** button and wait until the generation process is finished. -Then makefiles will appear in the build folder (e.g. D:/tmp/occt-android ). - -@subsection build_occt_crossplatform_cmake_building Build Makefiles - -Open console and go to the build folder. Type "mingw32-make" (Windows) or "make" (Ubuntu) to start build process. - -> mingw32-make -or -> make - -Parallel building can be started with using **"-jN"** argument of "mingw32-make/make", where N is the number of - building threads. - -> mingw32-make -j4 -or -> make -j4 - -@subsection build_occt_crossplatform_cmake_install Install OCCT Libraries - -Type "mingw32-make/make" with argument "install" to place the libraries to the install folder - -> mingw32-make install -or -> make install - -@section build_occt_macos Mac OS X - -@subsection build_occt_macos_xcode Building with Xcode - -This file describes steps to build OCCT libraries from sources on Mac OS X with **Xcode** projects, generated by OCCT legacy tool **genproj**. - -

Configuration

- -Before building it is necessary to set up build environment. - -The environment is defined in the file *custom.sh* which can be edited directly: - -* Add paths to includes of used third-party libraries in variable *CSF_OPT_INC* (use colon ":" as path separator). -* Add paths to their binary libraries in variable *CSF_OPT_LIB64*. -* Set variable *SHORTCUT_HEADERS* to specify a method for population of folder *inc* by header files. Supported methods are: - * *Copy* - headers will be copied from *src*; - * *ShortCut* - short-cut header files will be created, redirecting to same-named header located in *src*; - * "HardLink* - hard links to headers located in *src* will be created. -* For optional third-party libraries, set corresponding environment variable HAVE_ to either *false*, e.g.: -~~~~ - export HAVE_FREEIMAGE=false -~~~~ - -Alternatively, or when *custom.sh* does not exist, you can launch *genconf.sh* to configure environment interactively: - -@figure{/build/build_occt/images/genconf_osx.png} - -Click "Save" to store the specified configuration in *custom.sh* file. - -

Projects generation

- -Launch **genproj** tool to update content of *inc* folder and generate project files after changes in OCCT code affecting layout or composition of source files. - -@note To use **genproj** and **genconf** tools you need to have Tcl installed and accessible by PATH. - -For instance, in Terminal application: +To start **Code::Blocks**, launch script *codeblocks.sh*. +To build all toolkits, click **Build->Build workspace** in the menu bar. +To start *DRAWEXE*, which has been built with **Code::Blocks** on Mac OS X, run the script ~~~~ - $ cd /dev/OCCT/opencascade-7.0.0 - $ ./genproj + ./draw.sh cbp [d] ~~~~ +Option *d* is used if OCCT has been built in **Debug** mode. -

Building

+@subsubsection build_occt_macos_xcode XCode -To start **Xcode**, launch script *xcode.sh*. +XCode is an IDE for development on macOS platform and targeting macOS and iOS platforms. +**genproj** tool comes with a legacy XCode project files generator, but CMake is a preferred way for building OCCT on macOS platform. -To build a certain toolkit, select it in **Scheme** drop-down list in Xcode toolbar, press **Product** in the menu and click **Build** button. +To start **XCode**, launch script *xcode.sh*. +To build a certain toolkit, select it in **Scheme** drop-down list in XCode toolbar, press **Product** in the menu and click **Build** button. To build the entire OCCT: * Create a new empty project (select **File -> New -> Project -> Empty project** in the menu; input the project name, e.g. *OCCT*; then click **Next** and **Create**). * Drag and drop the *OCCT* folder in the created *OCCT* project in the Project navigator. * Select **File -> New -> Target -> Aggregate** in the menu. -* Enter the project name (e.g. *OCCT*) and click **Finish**. The **Build Phases** tab will open. -* Click "+" button to add the necessary toolkits to the target project. It is possible to select all toolkits by pressing **Command+A** combination. +* Enter the project name (e.g. *OCCT*) and click **Finish**. The **Build Phases** tab will open. +* Click "+" button to add the necessary toolkits to the target project. It is possible to select all toolkits by pressing **Command+A** combination. -

Launching DRAW

- -To start *DRAWEXE*, which has been built with Xcode on Mac OS X, perform the following steps: +To start *DRAWEXE*, which has been built with XCode on Mac OS X, perform the following steps: 1.Open Terminal application - -2.Enter \: +2.Enter ``: ~~~~ cd \ ~~~~ - 3.Run the script ~~~~ - ./draw_cbp.sh xcd [d] -~~~~ - -Option *d* is used if OCCT has been built in **Debug** mode. - -@subsection build_occt_code_blocks Building with Code::Blocks - -This file describes steps to build OCCT libraries from sources using **Code::Blocks**, a cross-platform IDE, using -project files generated by OCCT legacy tool **genproj**. - -

Configure

- -Before building it is necessary to set up build environment. - -The environment is defined in the file *custom.sh* (on Linux and OS X) or *custom.bat* (on Windows) which can be edited -directly: - -* Add paths to includes of used third-party libraries in variable *CSF_OPT_INC*. -* Add paths to their binary libraries in variable *CSF_OPT_LIB64*. -* Set variable *SHORTCUT_HEADERS* to specify a method for population of folder *inc* by header files. Supported methods are: - * *Copy* - headers will be copied from *src*; - * *ShortCut* - short-cut header files will be created, redirecting to same-named header located in *src*; - * "HardLink* - hard links to headers located in *src* will be created. -* For optional third-party libraries, set corresponding environment variable HAVE_ to either *false*, e.g.: -~~~~ - export HAVE_FREEIMAGE=false -~~~~ - -Alternatively, or when *custom.sh* or *custom.bat* does not exist, you can launch **genconf** tool to configure - environment interactively: - -@figure{/build/build_occt/images/genconf_linux.png} - -Click "Save" to store the specified configuration in *custom.sh* or *custom.bat* file. - -

Generate Projects

- -Launch **genproj** tool with option *cbp* to update content of *inc* folder and generate project files after changes in -OCCT code affecting layout or composition of source files: - -~~~~ - $ cd /dev/OCCT/opencascade-7.0.0 - $ ./genproj cbp + ./draw.sh xcd [d] ~~~~ -The generated Code::Blocks project are placed into subfolder *adm/<OS>/cbp*. - -@note To use **genproj** and **genconf** tools you need to have Tcl installed and accessible by PATH. - -

Build

- -To start **Code::Blocks**, launch script *codeblocks.sh*. - -To build all toolkits, click **Build->Build workspace** in the menu bar. - -To start *DRAWEXE*, which has been built with **Code::Blocks** on Mac OS X, run the script -~~~~ - ./draw_cbp.sh cbp [d] -~~~~ Option *d* is used if OCCT has been built in **Debug** mode. diff --git a/dox/build/build_occt/images/genconf_osx.png b/dox/build/build_occt/images/genconf_osx.png deleted file mode 100644 index f7b53fd4c4c838d6400312855a504009a27ca522..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 199166 zcmX_n1yEFP)c2B7QqtWl-3ZbRi_(pNv~f`G)*-Q6YKh?Gd@(tP*-e)GO} zW``MI?mqWC=bY#K;zp{eD7?lX!vKLmuay*KH9#OlPvAq2h6w!T;G--n@B`ghQQr*& z!tVd?gOJLGO%4LlfRtpVw7gf2I&4xb7qyw1;iM;5d)_?O@{?H+^-K)pw6s|Bzr(G# z2ZL<7C6P`L%U;{n_(;hhMenlm5te7!VvvWt_6Enq)+BPXnp+q)q8cX6W@!pr%MRYs zZMYA)O>R7G%ZEyrrl`+I>;3V^v#Wxih`>7^CdJ@>UO3iHYfW$oTMo@+@4TOH4?}uB z3B_c`x+oZYV?s2?s?#PT!N^_liMNeiF!+!w5HeS2z=#noYG_h^9~BzSND%r-R_!*q zlE`OcxkssMOCeyM#N3r0*>(i{Q3I>Ks(vBO()iO>ilhm6YNu4^FM8S$VnSZR=boL) zKZ~<#1Ywp37Bs)SLZMP|Bg_eBqPV{<-$D=%nu+AY1mx7gQ%J#b>Oo1M-^d`)R-FbO zf6-}@=vx%bD^XS3-3$(4D^IjlUmnK*6yA>n8Tycs@j(*Mv;lpA8#dmS3DPo6<>H|_ z0izNx1vXo16mG%n0Y6zRW@AaOcOG*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iupUAE@JK;GK8&*^Uq6h;5^;u0e!??d|h*UGMDd z{N(I_Pw-z?yZG-6*{OExb)C=Wk!eZ@1ue_RaU9P(2n8J5Mu=QTuGm2cfe8zn3qlYf z#4rtApEgR)6Hh#m&1QL?hlzpP4-d+WgDnU?SZMJLPrF+zw|w4#HoQc^hrnwEE$R?Ll+t`Y zUnmryg%QVbilRV!JDBB~ni|*;L?RK`WXI!i_$|-#4Gj$($K`Ult0~Asm&S`lv!{DN z@QtKXS|+Pzr}cE^ieIiXtWs)H`|!gP$Bvw1*fDgI5(QxqAp#tDYe(C`h%i)fJbv_( zy86j%dfKu@%w$Y>Ng&7(2(DO?fNLFwp!$K$ut_i>m~cekNQn^Yb}MupDc-tvCn(mn z+kj5W{W%XMT-y{j+7*`TjF;~+tGfhykKzMIu`tDMqyPx@#;Gs2R?FSU-lRXcOPt%W zu6(&GpLe(1KbomdMR_dQJ&kfyPSi)$LNQm&MPrGQX{6IRUQ{UcQGwZ}r5oDxbcta{ zmi&qm(RBkMgc&0EmX64=XM8=A$?E1Lhl$@GV~DqH!qI?fIUL7dPp;PtS;i1@Fmf>B zF(H^>ggH!jj!^fGlrMAMQ+|8lK4ImH4*c^WzG~R6!8KNV Date: Mon, 27 Sep 2021 19:00:37 +0300 Subject: [PATCH 081/639] 0032581: Modelling Algorithms - UnifySameDomain produces invalid result 1. Correct local function TransformPCurves of ShapeUpgrade_UnifySameDomain: take into account the case of seam edge. 2. Correct local function ReconstructMissedSeam of ShapeUpgrade_UnifySameDomain: use previously stored seam edge in some cases. --- .../ShapeUpgrade_UnifySameDomain.cxx | 160 +++++++++++------- tests/bugs/heal/bug32581 | 20 +++ 2 files changed, 122 insertions(+), 58 deletions(-) create mode 100644 tests/bugs/heal/bug32581 diff --git a/src/ShapeUpgrade/ShapeUpgrade_UnifySameDomain.cxx b/src/ShapeUpgrade/ShapeUpgrade_UnifySameDomain.cxx index 6b883e3149..9f66be3890 100644 --- a/src/ShapeUpgrade/ShapeUpgrade_UnifySameDomain.cxx +++ b/src/ShapeUpgrade/ShapeUpgrade_UnifySameDomain.cxx @@ -689,43 +689,67 @@ static void ReconstructMissedSeam(const TopTools_SequenceOfShape& theEdges, } else { - TopoDS_Edge aSeam = aRemovedEdge; - aSeam.Orientation(TopAbs_FORWARD); - Handle(Geom2d_Curve) PC1 = BRep_Tool::CurveOnSurface(aSeam, theFrefFace, Param1, Param2); - aSeam.Reverse(); - Handle(Geom2d_Curve) PC2 = BRep_Tool::CurveOnSurface(aSeam, theFrefFace, Param1, Param2); - Standard_Boolean IsSeam = (PC1 != PC2); - if (!IsSeam) //it was not a seam - { - aCoord = theCurPoint.Coord(IndCoord); - gp_Pnt2d PointOnRemovedEdge = PC1->Value(Param1); - Standard_Real CoordOfRemovededge = PointOnRemovedEdge.Coord(IndCoord); - if (Abs(aCoord - CoordOfRemovededge) > thePeriod/2) - { - Standard_Real Sign = (aCoord > CoordOfRemovededge)? 1 : -1; - Offset *= Sign; - PC1 = Handle(Geom2d_Curve)::DownCast(PC2->Copy()); - PC1->Translate(Offset); - } + MissedSeam = aRemovedEdge; + MissedSeam.Orientation(TopAbs_FORWARD); + if (!theCurVertex.IsSame(V1)) + MissedSeam.Reverse(); + } + + if (!BRep_Tool::IsClosed (MissedSeam, theFrefFace)) + { + //make edge a real seam edge with 2 pcurves on ref face + Handle(Geom2d_Curve) aPC = BRep_Tool::CurveOnSurface (MissedSeam, theFrefFace, Param1, Param2); + gp_Pnt2d aP2d = aPC->Value(Param1); + if (Abs(aP2d.Coord(IndCoord) - theCurPoint.Coord(IndCoord)) > thePeriod/2) + { + Standard_Real anOffset = 0.; + if (aP2d.Coord(IndCoord) < theCurPoint.Coord(IndCoord)) + anOffset = thePeriod; else - { - if (SeamDir > 0) - Offset *= -1; - PC2 = Handle(Geom2d_Curve)::DownCast(PC1->Copy()); - PC2->Translate(Offset); - } + anOffset = -thePeriod; + + if (theIsU) + Offset.SetCoord (anOffset, 0.); + else + Offset.SetCoord (0., anOffset); + + aPC->Translate(Offset); + } + gp_Pnt2d aFirstP2d, aLastP2d; + if (MissedSeam.Orientation() == TopAbs_FORWARD) + { + aFirstP2d = aPC->Value(Param1); + aLastP2d = aPC->Value(Param2); } - if (theCurVertex.IsSame(V1)) - BB.UpdateEdge(MissedSeam, PC1, PC2, theFrefFace, 0.); else { - if (IsSeam) - BB.UpdateEdge(MissedSeam, PC1, PC2, theFrefFace, 0.); + aFirstP2d = aPC->Value(Param2); + aLastP2d = aPC->Value(Param1); + } + if (theIsU) + { + if (aFirstP2d.Y() < aLastP2d.Y()) + Offset.SetCoord (-thePeriod, 0.); else - BB.UpdateEdge(MissedSeam, PC2, PC1, theFrefFace, 0.); - - MissedSeam.Reverse(); + Offset.SetCoord (thePeriod, 0.); } + else + { + if (aFirstP2d.X() < aLastP2d.X()) + Offset.SetCoord (0., thePeriod); + else + Offset.SetCoord (0., -thePeriod); + } + Handle(Geom2d_Curve) AnotherPC = Handle(Geom2d_Curve)::DownCast(aPC->Copy()); + AnotherPC->Translate(Offset); + TopoDS_Edge F_MissedSeam = MissedSeam; + F_MissedSeam.Orientation (TopAbs_FORWARD); + Handle(Geom2d_Curve) NullPC; + BB.UpdateEdge (F_MissedSeam, NullPC, theFrefFace, 0.); + if (MissedSeam.Orientation() == TopAbs_FORWARD) + BB.UpdateEdge (F_MissedSeam, aPC, AnotherPC, theFrefFace, 0.); + else + BB.UpdateEdge (F_MissedSeam, AnotherPC, aPC, theFrefFace, 0.); } BB.Continuity(MissedSeam, theFrefFace, theFrefFace, aContinuity); @@ -957,12 +981,17 @@ static void TransformPCurves(const TopoDS_Face& theRefFace, BRep_Builder BB; TopExp_Explorer Explo(theFace, TopAbs_EDGE); + TopTools_MapOfShape aEmap; for (; Explo.More(); Explo.Next()) { - const TopoDS_Edge& anEdge = TopoDS::Edge(Explo.Current()); + TopoDS_Edge anEdge = TopoDS::Edge(Explo.Current()); if (BRep_Tool::Degenerated(anEdge) && ToModify) continue; - if (BRepTools::IsReallyClosed(anEdge, theFace)) + + if (ToProject && BRep_Tool::IsClosed(anEdge, theFace)) + continue; + + if (!aEmap.Add(anEdge)) continue; Standard_Real fpar, lpar; @@ -970,36 +999,51 @@ static void TransformPCurves(const TopoDS_Face& theRefFace, if (!PCurveOnRef.IsNull() && !(ToModify || ToProject)) continue; - Handle(Geom2d_Curve) aPCurve = BRep_Tool::CurveOnSurface(anEdge, theFace, fpar, lpar); - Handle(Geom2d_Curve) aNewPCurve; - if (ToProject) - { - Handle(Geom_Curve) aC3d = BRep_Tool::Curve(anEdge, fpar, lpar); - aC3d = new Geom_TrimmedCurve(aC3d, fpar, lpar); - Standard_Real tol = BRep_Tool::Tolerance(anEdge); - tol = Min(tol, Precision::Approximation()); - aNewPCurve = - GeomProjLib::Curve2d(aC3d, RefSurf); - } - else - { - aNewPCurve = Handle(Geom2d_Curve)::DownCast(aPCurve->Copy()); - } - if (ToTranslate) - aNewPCurve->Translate(gp_Vec2d(0., aTranslation)); - if (Y_Reverse) - aNewPCurve->Mirror(gp::OX2d()); - if (X_Reverse) + Handle(Geom2d_Curve) PCurves [2], NewPCurves [2]; + anEdge.Orientation (TopAbs_FORWARD); + PCurves[0] = BRep_Tool::CurveOnSurface(anEdge, theFace, fpar, lpar); + anEdge.Reverse(); + PCurves[1] = BRep_Tool::CurveOnSurface(anEdge, theFace, fpar, lpar); + + Standard_Integer NbPcurves = (PCurves[0] == PCurves[1])? 1 : 2; + + for (Standard_Integer ii = 0; ii < NbPcurves; ii++) { - aNewPCurve->Mirror(gp::OY2d()); - aNewPCurve->Translate(gp_Vec2d(2*M_PI, 0.)); + if (ToProject) + { + Handle(Geom_Curve) aC3d = BRep_Tool::Curve(anEdge, fpar, lpar); + aC3d = new Geom_TrimmedCurve(aC3d, fpar, lpar); + Standard_Real tol = BRep_Tool::Tolerance(anEdge); + tol = Min(tol, Precision::Approximation()); + NewPCurves[ii] = + GeomProjLib::Curve2d(aC3d, RefSurf); + } + else + { + NewPCurves[ii] = Handle(Geom2d_Curve)::DownCast(PCurves[ii]->Copy()); + } + if (ToTranslate) + NewPCurves[ii]->Translate(gp_Vec2d(0., aTranslation)); + if (Y_Reverse) + NewPCurves[ii]->Mirror(gp::OX2d()); + if (X_Reverse) + { + NewPCurves[ii]->Mirror(gp::OY2d()); + NewPCurves[ii]->Translate(gp_Vec2d(2*M_PI, 0.)); + } + if (ToRotate) + NewPCurves[ii]->Translate(gp_Vec2d(anAngle, 0.)); } - if (ToRotate) - aNewPCurve->Translate(gp_Vec2d(anAngle, 0.)); + anEdge.Orientation (TopAbs_FORWARD); + theMapEdgesWithTemporaryPCurves.Add(anEdge); + + if (NbPcurves == 1) + BB.UpdateEdge(anEdge, NewPCurves[0], theRefFace, 0.); + else + BB.UpdateEdge(anEdge, NewPCurves[0], NewPCurves[1], theRefFace, 0.); - BB.UpdateEdge(anEdge, aNewPCurve, theRefFace, 0.); BB.Range(anEdge, fpar, lpar); } } diff --git a/tests/bugs/heal/bug32581 b/tests/bugs/heal/bug32581 new file mode 100644 index 0000000000..547fb5fe78 --- /dev/null +++ b/tests/bugs/heal/bug32581 @@ -0,0 +1,20 @@ +puts "=================================================" +puts "OCC32581: UnifySameDomain produces invalid result" +puts "=================================================" +puts "" + +restore [locate_data_file bug32581.brep] a + +unifysamedom result a + +checkshape result + +checknbshapes result -t -solid 3 -shell 3 -face 14 -wire 16 -edge 31 -vertex 20 + +set tolres [checkmaxtol result] + +if { ${tolres} > 2.e-7} { + puts "Error: bad tolerance of result" +} + +checkprops result -s 63178.1 -v 1e+06 From 5c38397303f2869f4be9e19006e22a6766cde2c5 Mon Sep 17 00:00:00 2001 From: btokarev Date: Wed, 1 Sep 2021 16:29:33 +0300 Subject: [PATCH 082/639] 0032550: Documentation - Proofreading for "Tutorials and Samples -> Tutorial" New images added for better representation of solid model; Minor fixes for misprints and old classes; Proofreading done. --- dox/tutorial/images/tutorial_image001.png | Bin 3971 -> 44438 bytes dox/tutorial/images/tutorial_image002.png | Bin 4747 -> 36334 bytes dox/tutorial/images/tutorial_image007.png | Bin 3229 -> 13484 bytes dox/tutorial/images/tutorial_image008.png | Bin 3702 -> 25006 bytes dox/tutorial/images/tutorial_image009.png | Bin 4295 -> 58488 bytes dox/tutorial/images/tutorial_image010.png | Bin 4364 -> 43333 bytes dox/tutorial/images/tutorial_image019.png | Bin 42500 -> 51289 bytes dox/tutorial/tutorial.md | 47 +++++++++++----------- samples/qt/Tutorial/src/DocumentTut.cxx | 13 ++++++ 9 files changed, 36 insertions(+), 24 deletions(-) diff --git a/dox/tutorial/images/tutorial_image001.png b/dox/tutorial/images/tutorial_image001.png index 5fd0189eac770ab0a224441b28575fb47770aea3..7ae1b5410fa8c0eb24858688eac7d7b9a205dbb7 100644 GIT binary patch literal 44438 zcmeFYXIxX;w>GM%Akq{I(v=bfr1x$^S^%X;ZxTd6dM^PL1re#Cg{oBPz4syzT9n>v z0D({p5K2gL7rOU8`<(N?_kMjpydU^!lC|cVbBt#^;~8Vl74k$wiRu!=r88&FP^lz{a*+i1hGr)k3jA}{RZHo?nW6!vHQ>W}>-*~W&zvcZpg6I(0DLBQQZ{fs zbB5OK^zZEK3s$c)X9{^$9^KdRGTp=nCmD~x5Adl9Ka&rYJXiL|Q|UFG+QdPY zpF&7DIHK;;_DHE+6eLZ)4}rl14GbO_+#$<+re=E~<~_&P-6^|GLtK$>p-FyyT|Rbe zYYqw(Fw-(}(=B9{ugsS|3E*L(4sKs?atQ*vNCN+b$v~okkCMsLw_(43K~cj|PQWi* zp4}X$7fRMX1WBF#f?yU#03Vq&wjx#j3=#Z)hxk9x7FkI%u|043I~SZ1MFHR19G{

d39Zli^p|bhiqfom$$} z$CJh#LlO5GIF~GV93NEVCIW^jsG|w2?7S-6oB^x>zF;9iBKLbN>41*}MAT*9+$>~3p&vig!xOBnZcgw@YF9| zbj*$^nZY(0>jBSdLOcteBI$*!L}_Q8$IanfrVlB))t`GTNEoA2^YBB<6wd{x(v7sf>pnViVoBXBt!a#K+`<4hSxElrrNR8GSd%E1=ZMjSE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M?iwNSR%%kj*ry0nhau9f5fFujAF$4j^rp|is zWit>El;X%vZGi;gnak?@qjRImDq?~5 zbGlR;$KRr$Ime5t*_ayM4#HV;hrcH;EDC_R<_UPbMppx{iE{W)L!v7FFUV=?-tyfM S9mDg_2avY9zFL(kCj396_+cOb diff --git a/dox/tutorial/images/tutorial_image010.png b/dox/tutorial/images/tutorial_image010.png index 899e224749fdeb451c71fb2591190ffd687d622a..770ae6d0484ba1fa895a1093f0f3506752244b29 100644 GIT binary patch literal 43333 zcmdSAS5%W-*ER|&qJW}e1eBs6Afb0bngxV_l#l=-RhokIULzo&bb&}O3IP(D^bXRc z3mAHlCRKWG*(*Np_kYj(pX{?e#y)T`z&q=nYu0OCbLNAZ%F{~}Hz`O+NG>TVJb{yt zoMj*(Im3D34EReX2D<}(kUGGhJ|fBMW>^HjoHKv;>>&wBK{(~H5gGXXqOHPn2NIHN zj>LbY6K2e=BqUiQiccOQT=oB)?3FR%<5t7H2@yv#CsSb$T54uI4w+J<1Fg%(|CClG zeI51rWi2Lt;qIM_AMWwrwzqy&Ry8Vm-!LkzjfM5Y?Yq8r&t2eG90@W}e0%Ol8fk-n zVN-*&{8ItV(eucir%$;f%7srXGV3}RF0#O%*0IwE7|{h7#g2SN2v9ZhQ#A@-fkB8r z`IXQ9|Nl=y@Zk-@KFW6%1@0I?N4!}YjR4dg{OrF*{EhXRCF0TMxkmm@wMW>ObY|D5 z9bt;eW^@6sWul=0MrNLg3gVHpKr_V*#K(oCyT35B1%tzME@Og>V&fPy)i8JYOu_R) zf1kHal=L|b7Xr`I{(W9VCE*=s%1iM7oPYn{B2ma^_QU;E&IrkReyV$N*P|Gi^v zBBDAVZo@A5TqFmD9Uo2PJb3QrCE|0@O2|mBu<8eH^g@0!R2T26Zol^sP)IfeatKF5 z&6*+=@X|4(rr1ljR;2~)a*t^`LxTHRBP4spR(bvrqCyQ9dsPXGXs$R?(7`K*)3Dxg zv&NOX_{?4e-Vy+mCC^=h!R-ls52)gku}?7(p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U1i^k>|&GivHv$_A`;)l7{ND4#uPfs_#d*r{DYC1ZYmk00?NjuyRQ zL|DroCL!q>s!1PWzw`hxp4m_Gf13gqhN#DYn z@ep0N@pC&yu$&1oUX92u3kVGmI3D0i_ncGlm8Au7m~rkCt29|_Yq0@EU0_gMvjhd+ z$gb2qBb9uk(NR{Q=oD$s`;l)e=Fk8)8K~t;)r6-cFx)3LXqNp){dOSKX_^XL`Q%%b zIuW=+j}k1{_pwxm2wcB)G*1Ekd-U-*{Wf6{Zg&ZVeg04;M-YG#F6WMZgRE-c)5y2F zy=c6IRl#RC?ZQaki>CnKJd=vO=%o_e6*K9D1h+YaQE>I|XS}nNMJ!uveg}fl{?kW4 zIf1eP9jL+N`lw`)*oZFo#zEUm;H;Z3X^`P*sJ-aMCcW=i12g*F^ty>*ccMj_gY zm}%Y~vy(-4p{jNhxcp;?*TXh&P^lkH70llLicfdRl4(%l+FE<$+-Xw?`WZ$}&^XL9 z+m6^HxF1s8ZG+<(`h9kM@S61d6=d&9|I~zHssbDimk4IRu6@!|e^gpzp00rzxSf3i z8Ojf75YgJht}OL0^LIhThg(Fua9`D7fvNlX6tu-McsF!+gTj-PNA@0j%+Ua`Hw?9$`cq*4Jy{>m-{MGHzo&{zzI!H#*i!y6qu-4 zueq7aX|Xd)NQ06M{BX_U`t^5)xUK3Ipff@XzmsYEuMV_V^2;I{p|>>s)5QQZz)t?AUxza^zzT6pTgE{t4m)Y-hxlduE&0Ot@Id)PB7-5Y#zVQulOTbs9m!1{ zywC=s_EsGb4;)|+^0l|s%9|=oV0`&z-D7cg<^0@FCPz@d7vL2s!{u;1`?h_N^|{jR P2Lqs~rmI?|VjcN^lzrqU diff --git a/dox/tutorial/images/tutorial_image019.png b/dox/tutorial/images/tutorial_image019.png index c5e2eedf21f17265266692094f4f210f5bf7c922..abf23dcec418a8193efbff123d7b078948944706 100644 GIT binary patch literal 51289 zcmcG#cT|(>*EWd9f*wTdh)7YI3IqiK5dl%@0wO9>5|k=kS^`886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(_nZO zeJVcvys-VJas0G5ZgxIKy|fj#m~5`Fa00#s<>c7Ay1L@RKlc51p+SZqu#1FmWA0q& zN^okXpm~sh`AgSTC|^>60ECdgA4a@y%0lEh3@xGv?n#|~UO25K{V zQ6JR)6%7pq%J^>u*8Q0TFcrq46VRu0%urB)}Os=L7 zP-$Jup^X%F#~Ms0i)v#TT9T8KiAj=XCb}iK+MyqD|J^u|*L-PdTcX$-UJEulOjg^K tPk!Eb1(W?F7uT${uH_%PVMk_9C^kuTeD-UbnE!x}He64m^oB*?{{TG!AkhE- diff --git a/dox/tutorial/tutorial.md b/dox/tutorial/tutorial.md index 7858488bef..bb7fa66ea3 100644 --- a/dox/tutorial/tutorial.md +++ b/dox/tutorial/tutorial.md @@ -18,7 +18,7 @@ From a programming standpoint, Open CASCADE Technology is designed to enhance yo To illustrate the use of classes provided in the 3D geometric modeling toolkits, you will create a bottle as shown: -@figure{/tutorial/images/tutorial_image001.png,"",240} +@figure{/tutorial/images/tutorial_image001.png,"",240} height=350px In the tutorial we will create, step-by-step, a function that will model a bottle as shown above. You will find the complete source code of this tutorial, including the very function *MakeBottle* in the distribution of Open CASCADE Technology. The function body is provided in the file samples/qt/Tutorial/src/MakeBottle.cxx. @@ -34,7 +34,7 @@ We first define the bottle specifications as follows: In addition, we decide that the bottle's profile (base) will be centered on the origin of the global Cartesian coordinate system. -@figure{/tutorial/images/tutorial_image002.png,"",240} +@figure{/tutorial/images/tutorial_image002.png,"",240} height=350px This modeling requires four steps: @@ -145,16 +145,16 @@ However, the *TopoDS* package provides only the data structure of the topologica To create an edge, you use the BRepBuilderAPI_MakeEdge class with the previously computed curves: ~~~~{.cpp} - TopoDS_Edge aEdge1 = BRepBuilderAPI_MakeEdge(aSegment1); - TopoDS_Edge aEdge2 = BRepBuilderAPI_MakeEdge(aArcOfCircle); - TopoDS_Edge aEdge3 = BRepBuilderAPI_MakeEdge(aSegment2); + TopoDS_Edge anEdge1 = BRepBuilderAPI_MakeEdge(aSegment1); + TopoDS_Edge anEdge2 = BRepBuilderAPI_MakeEdge(aArcOfCircle); + TopoDS_Edge anEdge3 = BRepBuilderAPI_MakeEdge(aSegment2); ~~~~ -In Open CASCADE Technology, you can create edges in several ways. One possibility is to create an edge directly from two points, in which case the underlying geometry of this edge is a line, bounded by two vertices being automatically computed from the two input points. For example, aEdge1 and aEdge3 could have been computed in a simpler way: +In Open CASCADE Technology, you can create edges in several ways. One possibility is to create an edge directly from two points, in which case the underlying geometry of this edge is a line, bounded by two vertices being automatically computed from the two input points. For example, anEdge1 and anEdge3 could have been computed in a simpler way: ~~~~{.cpp} - TopoDS_Edge aEdge1 = BRepBuilderAPI_MakeEdge(aPnt1, aPnt3); - TopoDS_Edge aEdge2 = BRepBuilderAPI_MakeEdge(aPnt4, aPnt5); + TopoDS_Edge anEdge1 = BRepBuilderAPI_MakeEdge(aPnt1, aPnt3); + TopoDS_Edge anEdge2 = BRepBuilderAPI_MakeEdge(aPnt4, aPnt5); ~~~~ To connect the edges, you need to create a wire with the *BRepBuilderAPI_MakeWire* class. There are two ways of building a wire with this class: @@ -165,7 +165,7 @@ To connect the edges, you need to create a wire with the *BRepBuilderAPI_MakeWir When building a wire from less than four edges, as in the present case, you can use the constructor directly as follows: ~~~~{.cpp} - TopoDS_Wire aWire = BRepBuilderAPI_MakeWire(aEdge1, aEdge2, aEdge3); + TopoDS_Wire aWire = BRepBuilderAPI_MakeWire(anEdge1, anEdge2, anEdge3); ~~~~ @@ -250,7 +250,7 @@ The bottle's profile is almost finished. You have created two wires: *aWire* and @subsection OCCT_TUTORIAL_SUB3_1 Prism the Profile -To compute the main body of the bottle, you need to create a solid shape. The simplest way is to use the previously created profile and to sweep it along a direction. The *Prism* functionality of Open CASCADE Technology is the most appropriate for that task. It accepts a shape and a direction as input and generates a new shape according to the following rules: +To compute the main body of the bottle, you need to create a solid shape. The simplest way is to use the previously created profile and sweep it along a direction. The *Prism* functionality of Open CASCADE Technology is the most appropriate for that task. It accepts a shape and a direction as input and generates a new shape according to the following rules: | Shape | Generates | | :----- | :----------------- | @@ -260,7 +260,7 @@ To compute the main body of the bottle, you need to create a solid shape. The si | Face | Solid | | Shell | Compound of Solids | -@figure{/tutorial/images/tutorial_image007.png,"",240} +@figure{/tutorial/images/tutorial_image007.png,"",240} height=350px Your current profile is a wire. Referring to the Shape/Generates table, you need to compute a face out of its wire to generate a solid. To create a face, use the *BRepBuilderAPI_MakeFace* class. As previously explained, a face is a part of a surface bounded by a closed wire. Generally, *BRepBuilderAPI_MakeFace* computes a face out of a surface and one or more wires. @@ -297,7 +297,7 @@ For our purposes, we will specify that fillets must be: * applied on all edges of the shape * have a radius of *myThickness* / 12 -@figure{/tutorial/images/tutorial_image008.png,"",240} +@figure{/tutorial/images/tutorial_image008.png,"",240} height=350px To apply fillets on the edges of a shape, you use the *BRepFilletAPI_MakeFillet* class. This class is normally used as follows: @@ -353,7 +353,7 @@ Once this is done, you perform the last step of the procedure by asking for the To add a neck to the bottle, you will create a cylinder and fuse it to the body. The cylinder is to be positioned on the top face of the body with a radius of *myThickness* / 4. and a height of *myHeight* / 10. -@figure{/tutorial/images/tutorial_image009.png,"",240} +@figure{/tutorial/images/tutorial_image009.png,"",240} height=350px To position the cylinder, you need to define a coordinate system with the *gp_Ax2* class defining a right-handed coordinate system from a point and two directions - the main (Z) axis direction and the X direction (the Y direction is computed from these two). To align the neck with the center of the top face, being in the global coordinate system (0, 0, *myHeight*), with its normal on the global Z axis, your local coordinate system can be defined as follows: @@ -395,7 +395,7 @@ In Open CASCADE Technology, a hollowed solid is called a *Thick* *Solid* and is * Create a parallel wall W2 from W1 at a distance D. If D is positive, W2 will be outside the initial solid, otherwise it will be inside. * Compute a solid from the two walls W1 and W2. -@figure{/tutorial/images/tutorial_image010.png,"",240} +@figure{/tutorial/images/tutorial_image010.png,"",240} height=350px To compute a thick solid, you create an instance of the *BRepOffsetAPI_MakeThickSolid* class by giving the following information: @@ -438,7 +438,6 @@ To compare a given type with the type you seek, use the *STANDARD_TYPE* macro, w ~~~~{.cpp} if(aSurface->DynamicType() == STANDARD_TYPE(Geom_Plane)){ - // } ~~~~ @@ -478,9 +477,9 @@ The collection for shapes can be found in the *TopTools* package. As *BRepOffset All the necessary data are now available so you can create your hollowed solid by calling the *BRepOffsetAPI_MakeThickSolid* MakeThickSolidByJoin method: ~~~~{.cpp} - BRepOffsetAPI_MakeThickSolid BodyMaker; - BodyMaker.MakeThickSolidByJoin(myBody, facesToRemove, -myThickness / 50, 1.e-3); - myBody = BodyMaker.Shape(); + BRepOffsetAPI_MakeThickSolid aSolidMaker; + aSolidMaker.MakeThickSolidByJoin(myBody, facesToRemove, -myThickness / 50, 1.e-3); + myBody = aSolidMaker.Shape(); ~~~~ @@ -493,7 +492,7 @@ All the necessary data are now available so you can create your hollowed solid b Up to now, you have learned how to create edges out of 3D curves. You will now learn how to create an edge out of a 2D curve and a surface. To learn this aspect of Open CASCADE Technology, you will build helicoidal profiles out of 2D curves on cylindrical surfaces. The theory is more complex than in previous steps, but applying it is very simple. -As a first step, you compute these cylindrical surfaces. You are already familiar with curves of the *Geom* package. Now you can create a cylindrical surface (*Geom_CylindricalSurface*) using: +As a first step, you compute these cylindrical surfaces. You are already familiar with the curves of the *Geom* package. Now you can create a cylindrical surface (*Geom_CylindricalSurface*) using: * a coordinate system; * a radius. @@ -604,7 +603,7 @@ As the parametric equation of an ellipse is P(U) = O + (MajorRadius * cos(U) * X ~~~~ The last step consists in defining the segment, which is the same for the two profiles: a line limited by the first and the last point of one of the arcs. -To access the point corresponding to the parameter of a curve or a surface, you use the Value or D0 method (meaning 0th derivative), D1 method is for first derivative, D2 for the second one. +To access the point corresponding to the parameter of a curve or a surface, you use the Value or D0 method (meaning 0th derivative), D1 method is for the first derivative, D2 for the second one. ~~~~{.cpp} gp_Pnt2d anEllipsePnt1 = anEllipse1->Value(0); @@ -698,7 +697,7 @@ You are almost done building the bottle. Use the *TopoDS_Compound* and *BRep_Bui Congratulations! Your bottle is complete. Here is the result snapshot of the Tutorial application: -@figure{/tutorial/images/tutorial_image019.png,"",320} +@figure{/tutorial/images/tutorial_image019.png,"",320} height=450px We hope that this tutorial has provided you with a feel for the industrial strength power of Open CASCADE Technology. If you want to know more and develop major projects using Open CASCADE Technology, we invite you to study our training, support, and consulting services on our site at https://www.opencascade.com/content/technology-support. Our professional services can maximize the power of your Open CASCADE Technology applications. @@ -796,9 +795,9 @@ Complete definition of MakeBottle function (defined in the file src/MakeBottle.c TopTools_ListOfShape facesToRemove; facesToRemove.Append(faceToRemove); - BRepOffsetAPI_MakeThickSolid BodyMaker; - BodyMaker.MakeThickSolidByJoin(myBody, facesToRemove, -myThickness / 50, 1.e-3); - myBody = BodyMaker.Shape(); + BRepOffsetAPI_MakeThickSolid aSolidMaker; + aSolidMaker.MakeThickSolidByJoin(myBody, facesToRemove, -myThickness / 50, 1.e-3); + myBody = aSolidMaker.Shape(); // Threading : Create Surfaces Handle(Geom_CylindricalSurface) aCyl1 = new Geom_CylindricalSurface(neckAx2, myNeckRadius * 0.99); Handle(Geom_CylindricalSurface) aCyl2 = new Geom_CylindricalSurface(neckAx2, myNeckRadius * 1.05); diff --git a/samples/qt/Tutorial/src/DocumentTut.cxx b/samples/qt/Tutorial/src/DocumentTut.cxx index e8f7502565..62dbda7af8 100755 --- a/samples/qt/Tutorial/src/DocumentTut.cxx +++ b/samples/qt/Tutorial/src/DocumentTut.cxx @@ -8,6 +8,8 @@ #include #include +#include +#include TopoDS_Shape MakeBottle(const Standard_Real myWidth , const Standard_Real myHeight , const Standard_Real myThickness); @@ -23,6 +25,17 @@ DocumentTut::~DocumentTut() void DocumentTut::onMakeBottle() { + Handle(AIS_InteractiveContext) aCtx = getContext(); + for (V3d_ListOfView::Iterator aViewIter (aCtx->CurrentViewer()->ActiveViews()); aViewIter.More(); aViewIter.Next()) + { + const Handle(V3d_View)& aView = aViewIter.Value(); + Graphic3d_RenderingParams& aParams = aView->ChangeRenderingParams(); + aParams.RenderResolutionScale = 2.0f; + } + + const Handle(Prs3d_Drawer)& aDefDrawer = aCtx->DefaultDrawer(); + aDefDrawer->SetIsoOnTriangulation (true); + QApplication::setOverrideCursor( Qt::WaitCursor ); TopoDS_Shape aBottle=MakeBottle(50,70,30); Handle(AIS_Shape) AISBottle=new AIS_Shape(aBottle); From 7d5e26eb2e1a2ad231784931626665c6b3eea19d Mon Sep 17 00:00:00 2001 From: dpasukhi Date: Wed, 29 Sep 2021 22:03:26 +0300 Subject: [PATCH 083/639] 0032596: [REGRESSION] Data Exchange, STEP Reader - OCCT 7.6.0dev does not open file correctly Fixed typo in the StepToTopoDS_TranslateFace.cxx after #29564 issue --- .../StepToTopoDS_TranslateFace.cxx | 11 ++++++----- tests/bugs/step/bug32596 | 18 ++++++++++++++++++ tests/de/step_1/E6 | 7 +++++-- tests/de/step_2/A3 | 9 ++++++--- tests/de/step_2/A5 | 7 +++++-- tests/de/step_2/D2 | 7 +++++-- 6 files changed, 45 insertions(+), 14 deletions(-) create mode 100644 tests/bugs/step/bug32596 diff --git a/src/StepToTopoDS/StepToTopoDS_TranslateFace.cxx b/src/StepToTopoDS/StepToTopoDS_TranslateFace.cxx index bcb083956b..b31b6e5812 100644 --- a/src/StepToTopoDS/StepToTopoDS_TranslateFace.cxx +++ b/src/StepToTopoDS/StepToTopoDS_TranslateFace.cxx @@ -256,16 +256,17 @@ void StepToTopoDS_TranslateFace::Init // "If the face has only one bound and this is of type vertex_loop, then the interior of the face is the domain of the face_surface.face_geometry. // In such a case the underlying surface shall be closed (e.g. a spherical_surface.)" // - natural bounds are applied only in case if VertexLoop is only the one defined face bound. - if (NbBnd == 1) { + if (NbBnd == 1) + { BRepBuilderAPI_MakeFace mf(GeomSurf, Precision()); for (TopoDS_Iterator it(mf); it.More(); it.Next()) + { B.Add(F, it.Value()); - + } + continue; } - continue; - } - + if (GeomSurf->IsKind(STANDARD_TYPE(Geom_ToroidalSurface))) { continue; } diff --git a/tests/bugs/step/bug32596 b/tests/bugs/step/bug32596 new file mode 100644 index 0000000000..fd91cb4748 --- /dev/null +++ b/tests/bugs/step/bug32596 @@ -0,0 +1,18 @@ +puts "====================================" +puts "0032596: \[REGRESSION\] Data Exchange, STEP Reader - OCCT 7.6.0dev does not open file correctly" +puts "====================================" +puts "" + +# Read file +testreadstep [locate_data_file bug32596_abc_0_13.step] res + +checkshape res +checknbshapes res -face 99 -wire 118 -edge 232 -vertex 144 + +vinit View1 +vright +vdisplay -dispMode 1 res +vfit +if { [vreadpixel 200 200 -rgb -name] != "BLACK" } { + puts "Error: Incorrect shape" +} diff --git a/tests/de/step_1/E6 b/tests/de/step_1/E6 index 7cb558bba9..889d27bab5 100755 --- a/tests/de/step_1/E6 +++ b/tests/de/step_1/E6 @@ -1,13 +1,16 @@ # !!!! This file is generated automatically, do not edit manually! See end script +puts "TODO CR23096 ALL: TOLERANCE : Faulty" + + set filename trj4_s1-ai-214.stp set ref_data { DATA : Faulties = 0 ( 54 ) Warnings = 0 ( 0 ) Summary = 0 ( 54 ) -TPSTAT : Faulties = 0 ( 0 ) Warnings = 2 ( 51 ) Summary = 2 ( 51 ) +TPSTAT : Faulties = 0 ( 0 ) Warnings = 6 ( 53 ) Summary = 6 ( 53 ) CHECKSHAPE : Wires = 0 ( 0 ) Faces = 0 ( 0 ) Shells = 0 ( 0 ) Solids = 0 ( 0 ) NBSHAPES : Solid = 8 ( 8 ) Shell = 8 ( 8 ) Face = 104 ( 104 ) STATSHAPE : Solid = 8 ( 8 ) Shell = 8 ( 8 ) Face = 104 ( 104 ) FreeWire = 0 ( 0 ) -TOLERANCE : MaxTol = 0.0007308806138 ( 0.002238556699 ) AvgTol = 1.588300578e-005 ( 3.376756081e-005 ) +TOLERANCE : MaxTol = 0.949881784 ( 0.002238556699 ) AvgTol = 0.05811636349 ( 3.300213579e-005 ) LABELS : N0Labels = 9 ( 9 ) N1Labels = 8 ( 8 ) N2Labels = 0 ( 0 ) TotalLabels = 17 ( 17 ) NameLabels = 17 ( 17 ) ColorLabels = 0 ( 0 ) LayerLabels = 0 ( 0 ) PROPS : Centroid = 1 ( 1 ) Volume = 1 ( 1 ) Area = 1 ( 1 ) NCOLORS : NColors = 0 ( 0 ) diff --git a/tests/de/step_2/A3 b/tests/de/step_2/A3 index d3a584649a..45ea4486d3 100755 --- a/tests/de/step_2/A3 +++ b/tests/de/step_2/A3 @@ -1,16 +1,19 @@ # !!!! This file is generated automatically, do not edit manually! See end script +puts "TODO CR23096 ALL: TOLERANCE : Faulty" + + set filename tr9_r0501-ug.stp -# set in as local length unit +# set in as local lenght unit set lengthunit_start "in" set ref_data { DATA : Faulties = 0 ( 0 ) Warnings = 0 ( 0 ) Summary = 0 ( 0 ) -TPSTAT : Faulties = 0 ( 0 ) Warnings = 6 ( 403 ) Summary = 6 ( 403 ) +TPSTAT : Faulties = 0 ( 0 ) Warnings = 7 ( 403 ) Summary = 7 ( 403 ) CHECKSHAPE : Wires = 0 ( 0 ) Faces = 0 ( 0 ) Shells = 0 ( 0 ) Solids = 0 ( 0 ) NBSHAPES : Solid = 1 ( 1 ) Shell = 1 ( 1 ) Face = 532 ( 532 ) STATSHAPE : Solid = 1 ( 1 ) Shell = 1 ( 1 ) Face = 532 ( 532 ) FreeWire = 0 ( 0 ) -TOLERANCE : MaxTol = 1e-005 ( 1.238532849e-005 ) AvgTol = 2.427533179e-007 ( 6.244877739e-006 ) +TOLERANCE : MaxTol = 0.000282013979 ( 1.238532849e-005 ) AvgTol = 1.523260819e-006 ( 6.244877739e-006 ) LABELS : N0Labels = 1 ( 1 ) N1Labels = 0 ( 0 ) N2Labels = 0 ( 0 ) TotalLabels = 1 ( 1 ) NameLabels = 1 ( 1 ) ColorLabels = 1 ( 1 ) LayerLabels = 0 ( 0 ) PROPS : Centroid = 0 ( 0 ) Volume = 0 ( 0 ) Area = 0 ( 0 ) NCOLORS : NColors = 1 ( 1 ) diff --git a/tests/de/step_2/A5 b/tests/de/step_2/A5 index c89d6bcb6e..fdd8a3a5bd 100755 --- a/tests/de/step_2/A5 +++ b/tests/de/step_2/A5 @@ -1,13 +1,16 @@ # !!!! This file is generated automatically, do not edit manually! See end script +puts "TODO CR23096 ALL: TOLERANCE : Faulty" + + set filename r86ug.stp set ref_data { DATA : Faulties = 0 ( 0 ) Warnings = 0 ( 0 ) Summary = 0 ( 0 ) -TPSTAT : Faulties = 0 ( 0 ) Warnings = 4 ( 127 ) Summary = 4 ( 127 ) +TPSTAT : Faulties = 0 ( 0 ) Warnings = 7 ( 143 ) Summary = 7 ( 143 ) CHECKSHAPE : Wires = 0 ( 0 ) Faces = 0 ( 0 ) Shells = 0 ( 0 ) Solids = 0 ( 0 ) NBSHAPES : Solid = 25 ( 25 ) Shell = 25 ( 25 ) Face = 476 ( 476 ) STATSHAPE : Solid = 25 ( 25 ) Shell = 25 ( 25 ) Face = 476 ( 476 ) FreeWire = 0 ( 0 ) -TOLERANCE : MaxTol = 8.47188394e-006 ( 1.437435657e-005 ) AvgTol = 5.284196224e-007 ( 2.390274944e-006 ) +TOLERANCE : MaxTol = 0.01183950282 ( 1.437435657e-005 ) AvgTol = 4.445309917e-005 ( 2.420891776e-006 ) LABELS : N0Labels = 16 ( 16 ) N1Labels = 15 ( 15 ) N2Labels = 0 ( 0 ) TotalLabels = 31 ( 31 ) NameLabels = 31 ( 31 ) ColorLabels = 0 ( 0 ) LayerLabels = 0 ( 0 ) PROPS : Centroid = 0 ( 0 ) Volume = 0 ( 0 ) Area = 0 ( 0 ) NCOLORS : NColors = 0 ( 0 ) diff --git a/tests/de/step_2/D2 b/tests/de/step_2/D2 index 57c69ff184..f2c215d3d9 100755 --- a/tests/de/step_2/D2 +++ b/tests/de/step_2/D2 @@ -1,13 +1,16 @@ # !!!! This file is generated automatically, do not edit manually! See end script +puts "TODO CR23096 ALL: TOLERANCE : Faulty" + + set filename trj5_pm3-ug-203.stp set ref_data { DATA : Faulties = 0 ( 0 ) Warnings = 0 ( 0 ) Summary = 0 ( 0 ) -TPSTAT : Faulties = 0 ( 0 ) Warnings = 8 ( 82 ) Summary = 8 ( 82 ) +TPSTAT : Faulties = 0 ( 0 ) Warnings = 7 ( 83 ) Summary = 7 ( 83 ) CHECKSHAPE : Wires = 0 ( 0 ) Faces = 0 ( 0 ) Shells = 0 ( 0 ) Solids = 0 ( 0 ) NBSHAPES : Solid = 18 ( 18 ) Shell = 18 ( 18 ) Face = 369 ( 369 ) STATSHAPE : Solid = 18 ( 18 ) Shell = 18 ( 18 ) Face = 369 ( 369 ) FreeWire = 0 ( 0 ) -TOLERANCE : MaxTol = 0.005929066011 ( 0.01678530642 ) AvgTol = 9.716756634e-005 ( 0.0001556337239 ) +TOLERANCE : MaxTol = 0.07714530523 ( 0.01678530642 ) AvgTol = 0.0009065081658 ( 0.0001538088659 ) LABELS : N0Labels = 20 ( 20 ) N1Labels = 19 ( 19 ) N2Labels = 0 ( 0 ) TotalLabels = 39 ( 39 ) NameLabels = 39 ( 39 ) ColorLabels = 0 ( 0 ) LayerLabels = 0 ( 0 ) PROPS : Centroid = 20 ( 20 ) Volume = 20 ( 20 ) Area = 20 ( 20 ) NCOLORS : NColors = 0 ( 0 ) From 0f05f21194a6711251182a118643efc9eb6c322b Mon Sep 17 00:00:00 2001 From: asuraven Date: Wed, 18 Aug 2021 20:23:07 +0300 Subject: [PATCH 084/639] 0032539: Modeling Algorithms - Parallelize BRepExtrema_DistShapeShape algorithm --- .../BRepExtrema_DistShapeShape.cxx | 772 ++++++++++++++---- .../BRepExtrema_DistShapeShape.hxx | 82 +- src/BRepExtrema/BRepExtrema_DistanceSS.cxx | 25 +- src/BRepTest/BRepTest_ExtremaCommands.cxx | 39 +- tests/perf/modalg/bug32539_1 | 61 ++ tests/perf/modalg/bug32539_2 | 54 ++ 6 files changed, 850 insertions(+), 183 deletions(-) create mode 100644 tests/perf/modalg/bug32539_1 create mode 100644 tests/perf/modalg/bug32539_2 diff --git a/src/BRepExtrema/BRepExtrema_DistShapeShape.cxx b/src/BRepExtrema/BRepExtrema_DistShapeShape.cxx index dcd92f2fc2..1ef68ed9d6 100644 --- a/src/BRepExtrema/BRepExtrema_DistShapeShape.cxx +++ b/src/BRepExtrema/BRepExtrema_DistShapeShape.cxx @@ -36,6 +36,7 @@ #include #include #include +#include #include #include @@ -56,13 +57,13 @@ namespace } static void BoxCalculation(const TopTools_IndexedMapOfShape& Map, - Bnd_SeqOfBox& SBox) + Bnd_Array1OfBox& SBox) { for (Standard_Integer i = 1; i <= Map.Extent(); i++) { Bnd_Box box; BRepBndLib::Add(Map(i), box); - SBox.Append(box); + SBox[i] = box; } } @@ -105,157 +106,510 @@ namespace } //======================================================================= -//function : DistanceMapMap +//struct : IndexBand //purpose : //======================================================================= +struct IndexBand +{ + IndexBand(): + First(0), + Last(0) + { + } + + IndexBand(Standard_Integer theFirtsIndex, + Standard_Integer theLastIndex): + First(theFirtsIndex), + Last(theLastIndex) + { + } + Standard_Integer First; + Standard_Integer Last; +}; -Standard_Boolean BRepExtrema_DistShapeShape::DistanceMapMap (const TopTools_IndexedMapOfShape& theMap1, - const TopTools_IndexedMapOfShape& theMap2, - const Bnd_SeqOfBox& theLBox1, - const Bnd_SeqOfBox& theLBox2, - const Message_ProgressRange& theRange) +//======================================================================= +//struct : ThreadSolution +//purpose : +//======================================================================= +struct ThreadSolution { - NCollection_Vector aPairList; - const Standard_Integer aCount1 = theMap1.Extent(); - const Standard_Integer aCount2 = theMap2.Extent(); + ThreadSolution(Standard_Integer theTaskNum): + Shape1(0, theTaskNum-1), + Shape2(0, theTaskNum-1), + Dist(0, theTaskNum-1) + { + Dist.Init(DBL_MAX); + } - Message_ProgressScope aTwinScope(theRange, NULL, 1.0); - Message_ProgressRange aBoxRange(aTwinScope.Next(0.3)); - Message_ProgressScope aBoxScope(aBoxRange, NULL, aCount1); + NCollection_Array1 Shape1; + NCollection_Array1 Shape2; + NCollection_Array1 Dist; +}; - for (Standard_Integer anIdx1 = 1; anIdx1 <= aCount1; ++anIdx1) +//======================================================================= +//struct : VertexFunctor +//purpose : +//======================================================================= +struct VertexFunctor +{ + VertexFunctor(NCollection_Array1* theBandArray, + const Message_ProgressRange& theRange): + BandArray(theBandArray), + Solution(theBandArray->Size()), + Map1(NULL), + Map2(NULL), + Scope(theRange, "Vertices distances calculating", theBandArray->Size()), + Ranges(0, theBandArray->Size() - 1), + Eps(Precision::Confusion()), + StartDist(0.0) { - aBoxScope.Next(); - if (!aBoxScope.More()) + for (Standard_Integer i = 0; i < theBandArray->Size(); ++i) { - return Standard_False; + Ranges.SetValue(i, Scope.Next()); } - for (Standard_Integer anIdx2 = 1; anIdx2 <= aCount2; ++anIdx2) + } + + void operator() (const Standard_Integer theIndex) const + { + const Standard_Integer aCount2 = Map2->Extent(); + const Standard_Integer aFirst = BandArray->Value(theIndex).First; + const Standard_Integer aLast = BandArray->Value(theIndex).Last; + Solution.Dist[theIndex] = StartDist; + + Message_ProgressScope aScope(Ranges[theIndex], NULL, (double)aLast - aFirst); + + + for (Standard_Integer anIdx1 = aFirst; anIdx1 <= aLast; ++anIdx1) { - const Bnd_Box& aBox1 = theLBox1.Value (anIdx1); - const Bnd_Box& aBox2 = theLBox2.Value (anIdx2); - if (aBox1.IsVoid() - || aBox2.IsVoid()) + if (!aScope.More()) { - continue; + break; } + aScope.Next(); - const Standard_Real aDist = aBox1.Distance (aBox2); - if (aDist < myDistRef - myEps || fabs (aDist - myDistRef) < myEps) + const TopoDS_Vertex& aVertex1 = TopoDS::Vertex(Map1->FindKey(anIdx1)); + const gp_Pnt aPoint1 = BRep_Tool::Pnt(aVertex1); + for (Standard_Integer anIdx2 = 1; anIdx2 <= aCount2; ++anIdx2) { - aPairList.Append (BRepExtrema_CheckPair (anIdx1, anIdx2, aDist)); + const TopoDS_Vertex& aVertex2 = TopoDS::Vertex(Map2->FindKey(anIdx2)); + const gp_Pnt aPoint2 = BRep_Tool::Pnt(aVertex2); + const Standard_Real aDist = aPoint1.Distance(aPoint2); + { + if (aDist < Solution.Dist[theIndex] - Eps) + { + const BRepExtrema_SolutionElem Sol1(aDist, aPoint1, BRepExtrema_IsVertex, aVertex1); + const BRepExtrema_SolutionElem Sol2(aDist, aPoint2, BRepExtrema_IsVertex, aVertex2); + + Solution.Shape1[theIndex].Clear(); + Solution.Shape2[theIndex].Clear(); + Solution.Shape1[theIndex].Append(Sol1); + Solution.Shape2[theIndex].Append(Sol2); + + Solution.Dist[theIndex] = aDist; + } + else if (Abs(aDist - Solution.Dist[theIndex]) < Eps) + { + const BRepExtrema_SolutionElem Sol1(aDist, aPoint1, BRepExtrema_IsVertex, aVertex1); + const BRepExtrema_SolutionElem Sol2(aDist, aPoint2, BRepExtrema_IsVertex, aVertex2); + Solution.Shape1[theIndex].Append(Sol1); + Solution.Shape2[theIndex].Append(Sol2); + + if (Solution.Dist[theIndex] > aDist) + { + Solution.Dist[theIndex] = aDist; + } + } + } } } } - std::stable_sort(aPairList.begin(), aPairList.end(), BRepExtrema_CheckPair_Comparator); - Message_ProgressRange aDistRange(aTwinScope.Next(0.7)); - Message_ProgressScope aDistScope(aDistRange, NULL, aPairList.Size()); - for (NCollection_Vector::Iterator aPairIter (aPairList); - aPairIter.More(); aPairIter.Next()) + + NCollection_Array1* BandArray; + mutable ThreadSolution Solution; + const TopTools_IndexedMapOfShape* Map1; + const TopTools_IndexedMapOfShape* Map2; + Message_ProgressScope Scope; + NCollection_Array1 Ranges; + Standard_Real Eps; + Standard_Real StartDist; +}; + +//======================================================================= +//function : DistanceVertVert +//purpose : +//======================================================================= +Standard_Boolean BRepExtrema_DistShapeShape::DistanceVertVert(const TopTools_IndexedMapOfShape& theMap1, + const TopTools_IndexedMapOfShape& theMap2, + const Message_ProgressRange& theRange) +{ + const Standard_Integer aCount1 = theMap1.Extent(); + const Standard_Integer aMinTaskSize = aCount1 < 10 ? aCount1 : 10; + const Handle(OSD_ThreadPool)& aThreadPool = OSD_ThreadPool::DefaultPool(); + const Standard_Integer aNbThreads = aThreadPool->NbThreads(); + Standard_Integer aNbTasks = aNbThreads; + Standard_Integer aTaskSize = (Standard_Integer) Ceiling((double) aCount1 / aNbTasks); + if (aTaskSize < aMinTaskSize) { - aDistScope.Next(); - if (!aDistScope.More()) + aTaskSize = aMinTaskSize; + aNbTasks = (Standard_Integer) Ceiling((double) aCount1 / aTaskSize); + } + + Standard_Integer aFirstIndex(1); + NCollection_Array1 aBandArray(0, aNbTasks - 1); + Message_ProgressScope aDistScope(theRange, NULL, 1); + + for (Standard_Integer anI = 0; anI < aBandArray.Size(); ++anI) + { + if (aCount1 < aFirstIndex + aTaskSize - 1) { - return Standard_False; + aTaskSize = aCount1 - aFirstIndex + 1; } - const BRepExtrema_CheckPair& aPair = aPairIter.Value(); - if (aPair.Distance > myDistRef + myEps) + aBandArray.SetValue(anI, IndexBand(aFirstIndex, aFirstIndex + aTaskSize - 1)); + aFirstIndex += aTaskSize; + } + + VertexFunctor aFunctor(&aBandArray, aDistScope.Next()); + aFunctor.Map1 = &theMap1; + aFunctor.Map2 = &theMap2; + aFunctor.StartDist = myDistRef; + aFunctor.Eps = myEps; + + OSD_Parallel::For(0, aNbTasks, aFunctor, !myIsMultiThread); + if (!aDistScope.More()) + { + return Standard_False; + } + for (Standard_Integer anI = 0; anI < aFunctor.Solution.Dist.Size(); ++anI) + { + Standard_Real aDist = aFunctor.Solution.Dist[anI]; + if (aDist < myDistRef - myEps) { - break; // early search termination + mySolutionsShape1.Clear(); + mySolutionsShape2.Clear(); + mySolutionsShape1.Append(aFunctor.Solution.Shape1[anI]); + mySolutionsShape2.Append(aFunctor.Solution.Shape2[anI]); + myDistRef = aDist; } + else if (Abs(aDist - myDistRef) < myEps) + { + mySolutionsShape1.Append(aFunctor.Solution.Shape1[anI]); + mySolutionsShape2.Append(aFunctor.Solution.Shape2[anI]); + myDistRef = aDist; + } + } + return Standard_True; +} - const Bnd_Box& aBox1 = theLBox1.Value (aPair.Index1); - const Bnd_Box& aBox2 = theLBox2.Value (aPair.Index2); - - const TopoDS_Shape& aShape1 = theMap1 (aPair.Index1); - const TopoDS_Shape& aShape2 = theMap2 (aPair.Index2); +//======================================================================= +//struct : DistanceFunctor +//purpose : +//======================================================================= +struct DistanceFunctor +{ + DistanceFunctor(NCollection_Array1 >* theArrayOfArrays, + const Message_ProgressRange& theRange): + ArrayOfArrays(theArrayOfArrays), + Solution(ArrayOfArrays->Size()), + Map1(NULL), + Map2(NULL), + LBox1(NULL), + LBox2(NULL), + Scope(theRange, "Shapes distances calculating", theArrayOfArrays->Size()), + Ranges(0, theArrayOfArrays->Size() - 1), + Eps(Precision::Confusion()), + StartDist(0.0) + { + for (Standard_Integer i = 0; i < theArrayOfArrays->Size(); ++i) + { + Ranges.SetValue(i, Scope.Next()); + } + } - BRepExtrema_DistanceSS aDistTool (aShape1, aShape2, aBox1, aBox2, myDistRef, myEps); - if (aDistTool.IsDone()) + void operator() (const Standard_Integer theIndex) const + { + Message_ProgressScope aScope(Ranges[theIndex], NULL, ArrayOfArrays->Value(theIndex).Size()); + Solution.Dist[theIndex] = StartDist; + for (Standard_Integer i = 0; i < ArrayOfArrays->Value(theIndex).Size(); i++) { - if (aDistTool.DistValue() < myDistRef - myEps) + if (!aScope.More()) + { + return; + } + aScope.Next(); + const BRepExtrema_CheckPair& aPair = ArrayOfArrays->Value(theIndex).Value(i); + if (aPair.Distance > Solution.Dist[theIndex] + Eps) + { + break; // early search termination + } + const Bnd_Box& aBox1 = LBox1->Value(aPair.Index1); + const Bnd_Box& aBox2 = LBox2->Value(aPair.Index2); + const TopoDS_Shape& aShape1 = Map1->FindKey(aPair.Index1); + const TopoDS_Shape& aShape2 = Map2->FindKey(aPair.Index2); + BRepExtrema_DistanceSS aDistTool(aShape1, aShape2, aBox1, aBox2, Solution.Dist[theIndex], Eps); + const Standard_Real aDist = aDistTool.DistValue(); + if (aDistTool.IsDone()) { - mySolutionsShape1.Clear(); - mySolutionsShape2.Clear(); + if (aDist < Solution.Dist[theIndex] - Eps) + { + Solution.Shape1[theIndex].Clear(); + Solution.Shape2[theIndex].Clear(); - BRepExtrema_SeqOfSolution aSeq1 = aDistTool.Seq1Value(); - BRepExtrema_SeqOfSolution aSeq2 = aDistTool.Seq2Value(); + BRepExtrema_SeqOfSolution aSeq1 = aDistTool.Seq1Value(); + BRepExtrema_SeqOfSolution aSeq2 = aDistTool.Seq2Value(); - mySolutionsShape1.Append (aSeq1); - mySolutionsShape2.Append (aSeq2); + Solution.Shape1[theIndex].Append(aSeq1); + Solution.Shape2[theIndex].Append(aSeq2); - myDistRef = aDistTool.DistValue(); + Solution.Dist[theIndex] = aDistTool.DistValue(); + } + else if (Abs(aDist - Solution.Dist[theIndex]) < Eps) + { + BRepExtrema_SeqOfSolution aSeq1 = aDistTool.Seq1Value(); + BRepExtrema_SeqOfSolution aSeq2 = aDistTool.Seq2Value(); + + Solution.Shape1[theIndex].Append(aSeq1); + Solution.Shape2[theIndex].Append(aSeq2); + if (Solution.Dist[theIndex] > aDist) + { + Solution.Dist[theIndex] = aDist; + } + } } - else if (fabs (aDistTool.DistValue() - myDistRef) < myEps) + } + } + + NCollection_Array1 >* ArrayOfArrays; + mutable ThreadSolution Solution; + const TopTools_IndexedMapOfShape* Map1; + const TopTools_IndexedMapOfShape* Map2; + const Bnd_Array1OfBox* LBox1; + const Bnd_Array1OfBox* LBox2; + Message_ProgressScope Scope; + NCollection_Array1 Ranges; + Standard_Real Eps; + Standard_Real StartDist; +}; + + +//======================================================================= +//struct : DistancePairFunctor +//purpose : +//======================================================================= +struct DistancePairFunctor +{ + DistancePairFunctor(NCollection_Array1* theBandArray, + const Message_ProgressRange& theRange): + BandArray(theBandArray), + PairList(0, theBandArray->Size() - 1), + LBox1(NULL), + LBox2(NULL), + Scope(theRange, "Boxes distances calculating", theBandArray->Size()), + Ranges(0, theBandArray->Size() - 1), + DistRef(0), + Eps(Precision::Confusion()) + { + for (Standard_Integer i = 0; i < theBandArray->Size(); ++i) + { + Ranges.SetValue(i, Scope.Next()); + } + } + + void operator() (const Standard_Integer theIndex) const + { + const Standard_Integer aFirst = BandArray->Value(theIndex).First; + const Standard_Integer aLast = BandArray->Value(theIndex).Last; + + Message_ProgressScope aScope(Ranges[theIndex], NULL, (double) aLast - aFirst); + + for (Standard_Integer anIdx1 = aFirst; anIdx1 <= aLast; ++anIdx1) + { + if (!aScope.More()) { - BRepExtrema_SeqOfSolution aSeq1 = aDistTool.Seq1Value(); - BRepExtrema_SeqOfSolution aSeq2 = aDistTool.Seq2Value(); + break; + } + aScope.Next(); - mySolutionsShape1.Append (aSeq1); - mySolutionsShape2.Append (aSeq2); + for (Standard_Integer anIdx2 = 1; anIdx2 <= LBox2->Size(); ++anIdx2) + { + const Bnd_Box& aBox1 = LBox1->Value(anIdx1); + const Bnd_Box& aBox2 = LBox2->Value(anIdx2); + if (aBox1.IsVoid() || aBox2.IsVoid()) + { + continue; + } - if (myDistRef > aDistTool.DistValue()) + const Standard_Real aDist = aBox1.Distance(aBox2); + if (aDist - DistRef < Eps) { - myDistRef = aDistTool.DistValue(); + PairList[theIndex].Append(BRepExtrema_CheckPair(anIdx1, anIdx2, aDist)); } } } } - return Standard_True; -} + + Standard_Integer ListSize() + { + Standard_Integer aSize(0); + for (Standard_Integer anI = PairList.Lower(); anI <= PairList.Upper(); ++anI) + { + aSize += PairList[anI].Size(); + } + return aSize; + } + + NCollection_Array1* BandArray; + mutable NCollection_Array1 > PairList; + const Bnd_Array1OfBox* LBox1; + const Bnd_Array1OfBox* LBox2; + Message_ProgressScope Scope; + NCollection_Array1 Ranges; + Standard_Real DistRef; + Standard_Real Eps; +}; //======================================================================= -//function : DistanceVertVert +//function : DistanceMapMap //purpose : //======================================================================= -Standard_Boolean BRepExtrema_DistShapeShape::DistanceVertVert(const TopTools_IndexedMapOfShape& theMap1, - const TopTools_IndexedMapOfShape& theMap2, - const Message_ProgressRange& theRange) +Standard_Boolean BRepExtrema_DistShapeShape::DistanceMapMap (const TopTools_IndexedMapOfShape& theMap1, + const TopTools_IndexedMapOfShape& theMap2, + const Bnd_Array1OfBox& theLBox1, + const Bnd_Array1OfBox& theLBox2, + const Message_ProgressRange& theRange) { const Standard_Integer aCount1 = theMap1.Extent(); const Standard_Integer aCount2 = theMap2.Extent(); - Message_ProgressScope aScope(theRange, NULL, aCount1); + if (aCount1 == 0 || aCount2 == 0) + { + return Standard_True; + } + + Message_ProgressScope aTwinScope(theRange, NULL, 1.0); - for (Standard_Integer anIdx1 = 1; anIdx1 <= aCount1; ++anIdx1) + const Handle(OSD_ThreadPool)& aThreadPool = OSD_ThreadPool::DefaultPool(); + const Standard_Integer aNbThreads = aThreadPool->NbThreads(); + const Standard_Integer aMinPairTaskSize = aCount1 < 10 ? aCount1 : 10; + Standard_Integer aNbPairTasks = aNbThreads; + Standard_Integer aPairTaskSize = (Standard_Integer) Ceiling((double) aCount1 / aNbPairTasks); + if (aPairTaskSize < aMinPairTaskSize) { - aScope.Next(); - if (!aScope.More()) + aPairTaskSize = aMinPairTaskSize; + aNbPairTasks = (Standard_Integer) Ceiling((double) aCount1 / aPairTaskSize); + } + + Standard_Integer aFirstIndex(1); + NCollection_Array1 aBandArray(0, aNbPairTasks - 1); + + for (Standard_Integer anI = 0; anI < aBandArray.Size(); ++anI) + { + if (aCount1 < aFirstIndex + aPairTaskSize - 1) { - return Standard_False; + aPairTaskSize = aCount1 - aFirstIndex + 1; } - const TopoDS_Vertex& aVertex1 = TopoDS::Vertex(theMap1.FindKey(anIdx1)); - const gp_Pnt aPoint1 = BRep_Tool::Pnt(aVertex1); - for (Standard_Integer anIdx2 = 1; anIdx2 <= aCount2; ++anIdx2) - { - const TopoDS_Vertex& aVertex2 = TopoDS::Vertex(theMap2.FindKey(anIdx2)); - const gp_Pnt aPoint2 = BRep_Tool::Pnt(aVertex2); + aBandArray.SetValue(anI, IndexBand(aFirstIndex, aFirstIndex + aPairTaskSize - 1)); + aFirstIndex += aPairTaskSize; + } - const Standard_Real aDist = aPoint1.Distance(aPoint2); - if (aDist < myDistRef - myEps) - { - mySolutionsShape1.Clear(); - mySolutionsShape2.Clear(); + aTwinScope.Next(0.15); + DistancePairFunctor aPairFunctor(&aBandArray, aTwinScope.Next(0.15)); + aPairFunctor.LBox1 = &theLBox1; + aPairFunctor.LBox2 = &theLBox2; + aPairFunctor.DistRef = myDistRef; + aPairFunctor.Eps = myEps; - const BRepExtrema_SolutionElem Sol1(aDist, aPoint1, BRepExtrema_IsVertex, aVertex1); - const BRepExtrema_SolutionElem Sol2(aDist, aPoint2, BRepExtrema_IsVertex, aVertex2); - mySolutionsShape1.Append(Sol1); - mySolutionsShape2.Append(Sol2); + OSD_Parallel::For(0, aNbPairTasks, aPairFunctor, !myIsMultiThread); + if (!aTwinScope.More()) + { + return Standard_False; + } + Standard_Integer aListSize = aPairFunctor.ListSize(); + if(aListSize == 0) + { + return Standard_True; + } + NCollection_Array1 aPairList(0, aListSize-1); + Standard_Integer aListIndex(0); + for (Standard_Integer anI = 0; anI < aPairFunctor.PairList.Size(); ++anI) + { + for (Standard_Integer aJ = 0; aJ < aPairFunctor.PairList[anI].Size(); ++aJ) + { + aPairList[aListIndex] = aPairFunctor.PairList[anI][aJ]; + ++aListIndex; + } + } - myDistRef = aDist; - } - else if (fabs(aDist - myDistRef) < myEps) - { - const BRepExtrema_SolutionElem Sol1(aDist, aPoint1, BRepExtrema_IsVertex, aVertex1); - const BRepExtrema_SolutionElem Sol2(aDist, aPoint2, BRepExtrema_IsVertex, aVertex2); - mySolutionsShape1.Append(Sol1); - mySolutionsShape2.Append(Sol2); + std::stable_sort(aPairList.begin(), aPairList.end(), BRepExtrema_CheckPair_Comparator); - if (myDistRef > aDist) + const Standard_Integer aMapSize = aPairList.Size(); + Standard_Integer aNbTasks = aMapSize < aNbThreads ? aMapSize : aNbThreads; + Standard_Integer aTaskSize = (Standard_Integer) Ceiling((double) aMapSize / aNbTasks); + + NCollection_Array1 > anArrayOfArray(0, aNbTasks - 1); + // Since aPairList is sorted in ascending order of distances between Bnd_Boxes, + // BRepExtrema_CheckPair are distributed to tasks one by one from smallest to largest, + // and not ranges, as for DistancePairFunctor. + // Since aMapSize may not be divisible entirely by the number of tasks, + // some tasks should receive one BRepExtrema_CheckPair less than the rest. + // aLastRowLimit defines the task number from which to start tasks containing + // fewer BRepExtrema_CheckPair + Standard_Integer aLastRowLimit = ((aMapSize % aNbTasks) == 0) ? aNbTasks : (aMapSize % aNbTasks); + for (Standard_Integer anI = 0; anI < aTaskSize; ++anI) + { + for (Standard_Integer aJ = 0; aJ < aNbTasks; ++aJ) + { + if (anI == 0) + { + Standard_Integer aVectorSize = aTaskSize; + if (aJ >= aLastRowLimit) { - myDistRef = aDist; + aVectorSize--; } + anArrayOfArray[aJ].Resize(0, aVectorSize - 1, Standard_False); + } + if (anI < anArrayOfArray[aJ].Size()) + { + anArrayOfArray[aJ][anI] = aPairList(anI*aNbTasks + aJ); + } + else + { + break; + } + } + } + DistanceFunctor aFunctor(&anArrayOfArray, aTwinScope.Next(0.85)); + aFunctor.Map1 = &theMap1; + aFunctor.Map2 = &theMap2; + aFunctor.LBox1 = &theLBox1; + aFunctor.LBox2 = &theLBox2; + aFunctor.Eps = myEps; + aFunctor.StartDist = myDistRef; + + OSD_Parallel::For(0, aNbTasks, aFunctor, !myIsMultiThread); + if (!aTwinScope.More()) + { + return Standard_False; + } + + for (Standard_Integer anI = 0; anI < aFunctor.Solution.Dist.Size(); ++anI) + { + Standard_Real aDist = aFunctor.Solution.Dist[anI]; + if (aDist < myDistRef - myEps) + { + mySolutionsShape1.Clear(); + mySolutionsShape2.Clear(); + mySolutionsShape1.Append(aFunctor.Solution.Shape1[anI]); + mySolutionsShape2.Append(aFunctor.Solution.Shape2[anI]); + myDistRef = aDist; + } + else if (Abs(aDist - myDistRef) < myEps) + { + mySolutionsShape1.Append(aFunctor.Solution.Shape1[anI]); + mySolutionsShape2.Append(aFunctor.Solution.Shape2[anI]); + if (myDistRef > aDist) + { + myDistRef = aDist; } } } @@ -275,9 +629,9 @@ BRepExtrema_DistShapeShape::BRepExtrema_DistShapeShape() myIsInitS1 (Standard_False), myIsInitS2 (Standard_False), myFlag (Extrema_ExtFlag_MINMAX), - myAlgo (Extrema_ExtAlgo_Grad) + myAlgo (Extrema_ExtAlgo_Grad), + myIsMultiThread(Standard_False) { - // } //======================================================================= @@ -296,7 +650,8 @@ BRepExtrema_DistShapeShape::BRepExtrema_DistShapeShape(const TopoDS_Shape& Shape myIsInitS1 (Standard_False), myIsInitS2 (Standard_False), myFlag (F), - myAlgo (A) + myAlgo (A), + myIsMultiThread(Standard_False) { LoadS1(Shape1); LoadS2(Shape2); @@ -321,7 +676,8 @@ BRepExtrema_DistShapeShape::BRepExtrema_DistShapeShape(const TopoDS_Shape& Shape myIsInitS1 (Standard_False), myIsInitS2 (Standard_False), myFlag (F), - myAlgo (A) + myAlgo (A), + myIsMultiThread(Standard_False) { LoadS1(Shape1); LoadS2(Shape2); @@ -352,37 +708,133 @@ void BRepExtrema_DistShapeShape::LoadS2 (const TopoDS_Shape& Shape2) Decomposition (Shape2, myMapV2, myMapE2, myMapF2); } +//======================================================================= +//struct : TreatmentFunctor +//purpose : +//======================================================================= +struct TreatmentFunctor +{ + TreatmentFunctor(NCollection_Array1 >* theArrayOfArrays, + const Message_ProgressRange& theRange): + ArrayOfArrays(theArrayOfArrays), + SolutionsShape1(NULL), + SolutionsShape2(NULL), + Scope(theRange, "Search for the inner solid", theArrayOfArrays->Size()), + Ranges(0, theArrayOfArrays->Size() - 1), + DistRef(0), + InnerSol(NULL), + IsDone(NULL), + Mutex(NULL) + { + for (Standard_Integer i = 0; i < theArrayOfArrays->Size(); ++i) + { + Ranges.SetValue(i, Scope.Next()); + } + } + + void operator() (const Standard_Integer theIndex) const + { + const Standard_Real aTolerance = 0.001; + Message_ProgressScope aScope(Ranges[theIndex], NULL, ArrayOfArrays->Value(theIndex).Size()); + BRepClass3d_SolidClassifier aClassifier(Shape); + + for (Standard_Integer i = 0; i < ArrayOfArrays->Value(theIndex).Size(); i++) + { + if (!aScope.More()) + { + break; + } + aScope.Next(); + if (*IsDone) + { + break; + } + + const TopoDS_Vertex& aVertex = TopoDS::Vertex(ArrayOfArrays->Value(theIndex).Value(i)); + const gp_Pnt aPnt = BRep_Tool::Pnt(aVertex); + aClassifier.Perform(aPnt, aTolerance); + if (aClassifier.State() == TopAbs_IN) + { + Standard_Mutex::Sentry aLock(Mutex.get()); + *InnerSol = Standard_True; + *DistRef = 0.; + *IsDone = Standard_True; + BRepExtrema_SolutionElem aSolElem(0, aPnt, BRepExtrema_IsVertex, aVertex); + SolutionsShape1->Append(aSolElem); + SolutionsShape2->Append(aSolElem); + break; + } + } + } + + NCollection_Array1 >* ArrayOfArrays; + BRepExtrema_SeqOfSolution* SolutionsShape1; + BRepExtrema_SeqOfSolution* SolutionsShape2; + TopoDS_Shape Shape; + Message_ProgressScope Scope; + NCollection_Array1 Ranges; + Standard_Real* DistRef; + volatile Standard_Boolean* InnerSol; + volatile Standard_Boolean* IsDone; + Handle(Standard_HMutex) Mutex; +}; + //======================================================================= //function : SolidTreatment //purpose : //======================================================================= Standard_Boolean BRepExtrema_DistShapeShape::SolidTreatment(const TopoDS_Shape& theShape, - const TopTools_IndexedMapOfShape& theMap, + const TopTools_IndexedMapOfShape& theVertexMap, const Message_ProgressRange& theRange) { - BRepClass3d_SolidClassifier aClassifier(theShape); - const Standard_Real aTolerance = 0.001; - Message_ProgressScope aScope(theRange, NULL, theMap.Extent()); - for (Standard_Integer i = 1; i < theMap.Extent(); ++i) + const Standard_Integer aMapSize = theVertexMap.Extent(); + const Standard_Integer aMinTaskSize = 3; + const Handle(OSD_ThreadPool)& aThreadPool = OSD_ThreadPool::DefaultPool(); + const Standard_Integer aNbThreads = aThreadPool->NbThreads(); + Standard_Integer aNbTasks = aNbThreads * 10; + Standard_Integer aTaskSize = (Standard_Integer) Ceiling((double) aMapSize / aNbTasks); + if (aTaskSize < aMinTaskSize) { - aScope.Next(); - if (!aScope.More()) - { - return Standard_False; - } - const TopoDS_Vertex& aVertex = TopoDS::Vertex(theMap(i)); - const gp_Pnt& aPnt = BRep_Tool::Pnt(aVertex); - aClassifier.Perform(aPnt, aTolerance); - if (aClassifier.State() == TopAbs_IN) + aTaskSize = aMinTaskSize; + aNbTasks = (Standard_Integer) Ceiling((double) aMapSize / aTaskSize); + } + + NCollection_Array1< NCollection_Array1 > anArrayOfArray(0, aNbTasks - 1); + for (Standard_Integer anI = 1; anI <= aMapSize; ++anI) + { + Standard_Integer aVectIndex = (anI - 1) / aTaskSize; + Standard_Integer aShapeIndex = (anI - 1) % aTaskSize; + if (aShapeIndex == 0) { - myInnerSol = Standard_True; - myDistRef = 0.; - myIsDone = Standard_True; - BRepExtrema_SolutionElem Sol(0, aPnt, BRepExtrema_IsVertex, aVertex); - mySolutionsShape1.Append(Sol); - mySolutionsShape2.Append(Sol); - break; + Standard_Integer aVectorSize = aTaskSize; + Standard_Integer aTailSize = aMapSize - aVectIndex * aTaskSize; + if (aTailSize < aTaskSize) + { + aVectorSize = aTailSize; + } + anArrayOfArray[aVectIndex].Resize(0, aVectorSize - 1, Standard_False); } + anArrayOfArray[aVectIndex][aShapeIndex] = theVertexMap(anI); + } + + Message_ProgressScope aScope(theRange, "Solid treatment", aNbTasks); + TreatmentFunctor aFunctor(&anArrayOfArray, aScope.Next()); + aFunctor.SolutionsShape1 = &mySolutionsShape1; + aFunctor.SolutionsShape2 = &mySolutionsShape2; + aFunctor.Shape = theShape; + aFunctor.DistRef = &myDistRef; + aFunctor.InnerSol = &myInnerSol; + aFunctor.IsDone = &myIsDone; + if (myIsMultiThread) + { + aFunctor.Mutex.reset(new Standard_HMutex()); + } + + OSD_Parallel::For(0, aNbTasks, aFunctor, !myIsMultiThread); + + if (!aScope.More()) + { + return Standard_False; } return Standard_True; } @@ -394,22 +846,22 @@ Standard_Boolean BRepExtrema_DistShapeShape::SolidTreatment(const TopoDS_Shape& Standard_Boolean BRepExtrema_DistShapeShape::Perform(const Message_ProgressRange& theRange) { - myIsDone=Standard_False; - myInnerSol=Standard_False; + myIsDone = Standard_False; + myInnerSol = Standard_False; mySolutionsShape1.Clear(); mySolutionsShape2.Clear(); - if ( myShape1.IsNull() || myShape2.IsNull() ) + if (myShape1.IsNull() || myShape2.IsNull()) return Standard_False; // Treatment of solids Standard_Boolean anIsSolid1 = (myShape1.ShapeType() == TopAbs_SOLID) || - (myShape1.ShapeType() == TopAbs_COMPSOLID); + (myShape1.ShapeType() == TopAbs_COMPSOLID); Standard_Boolean anIsSolid2 = (myShape2.ShapeType() == TopAbs_SOLID) || - (myShape2.ShapeType() == TopAbs_COMPSOLID); + (myShape2.ShapeType() == TopAbs_COMPSOLID); Standard_Integer aRootStepsNum = 9; // By num of DistanceMapMap calls - aRootStepsNum = anIsSolid1 ? aRootStepsNum+1 : aRootStepsNum; - aRootStepsNum = anIsSolid2 ? aRootStepsNum+1 : aRootStepsNum; + aRootStepsNum = anIsSolid1 ? aRootStepsNum + 1 : aRootStepsNum; + aRootStepsNum = anIsSolid2 ? aRootStepsNum + 1 : aRootStepsNum; Message_ProgressScope aRootScope(theRange, "calculating distance", aRootStepsNum); if (anIsSolid1) @@ -419,10 +871,10 @@ Standard_Boolean BRepExtrema_DistShapeShape::Perform(const Message_ProgressRange return Standard_False; } } - + if (anIsSolid2 && (!myInnerSol)) { - if(!SolidTreatment(myShape2, myMapV1, aRootScope.Next())) + if (!SolidTreatment(myShape2, myMapV1, aRootScope.Next())) { return Standard_False; } @@ -432,9 +884,18 @@ Standard_Boolean BRepExtrema_DistShapeShape::Perform(const Message_ProgressRange { if (!myIsInitS1) // rebuild cached data for 1st shape { - myBV1.Clear(); - myBE1.Clear(); - myBF1.Clear(); + if (!myMapV1.IsEmpty()) + { + myBV1.Resize(1, myMapV1.Extent(), Standard_False); + } + if (!myMapE1.IsEmpty()) + { + myBE1.Resize(1, myMapE1.Extent(), Standard_False); + } + if (!myMapF1.IsEmpty()) + { + myBF1.Resize(1, myMapF1.Extent(), Standard_False); + } BoxCalculation (myMapV1, myBV1); BoxCalculation (myMapE1, myBE1); @@ -445,9 +906,18 @@ Standard_Boolean BRepExtrema_DistShapeShape::Perform(const Message_ProgressRange if (!myIsInitS2) // rebuild cached data for 2nd shape { - myBV2.Clear(); - myBE2.Clear(); - myBF2.Clear(); + if (!myMapV2.IsEmpty()) + { + myBV2.Resize(1, myMapV2.Extent(), Standard_False); + } + if (!myMapE2.IsEmpty()) + { + myBE2.Resize(1, myMapE2.Extent(), Standard_False); + } + if (!myMapF2.IsEmpty()) + { + myBF2.Resize(1, myMapF2.Extent(), Standard_False); + } BoxCalculation (myMapV2, myBV2); BoxCalculation (myMapE2, myBE2); @@ -458,54 +928,54 @@ Standard_Boolean BRepExtrema_DistShapeShape::Perform(const Message_ProgressRange if (myMapV1.Extent() && myMapV2.Extent()) { - TopoDS_Vertex V1 = TopoDS::Vertex(myMapV1(1)); - TopoDS_Vertex V2 = TopoDS::Vertex(myMapV2(1)); + const TopoDS_Vertex& V1 = TopoDS::Vertex(myMapV1(1)); + const TopoDS_Vertex& V2 = TopoDS::Vertex(myMapV2(1)); myDistRef = DistanceInitiale(V1, V2); } else - myDistRef= 1.e30; //szv:!!! + myDistRef = 1.e30; //szv:!!! - if(!DistanceVertVert(myMapV1, myMapV2, aRootScope.Next())) + if (!DistanceVertVert(myMapV1, myMapV2, aRootScope.Next())) { return Standard_False; } - if(!DistanceMapMap (myMapV1, myMapE2, myBV1, myBE2, aRootScope.Next())) + if (!DistanceMapMap(myMapV1, myMapE2, myBV1, myBE2, aRootScope.Next())) { return Standard_False; } - if(!DistanceMapMap (myMapE1, myMapV2, myBE1, myBV2, aRootScope.Next())) + if (!DistanceMapMap(myMapE1, myMapV2, myBE1, myBV2, aRootScope.Next())) { return Standard_False; } - if(!DistanceMapMap (myMapV1, myMapF2, myBV1, myBF2, aRootScope.Next())) + if (!DistanceMapMap(myMapV1, myMapF2, myBV1, myBF2, aRootScope.Next())) { return Standard_False; } - if(!DistanceMapMap (myMapF1, myMapV2, myBF1, myBV2, aRootScope.Next())) + if (!DistanceMapMap(myMapF1, myMapV2, myBF1, myBV2, aRootScope.Next())) { return Standard_False; } - if(!DistanceMapMap (myMapE1, myMapE2, myBE1, myBE2, aRootScope.Next())) + if (!DistanceMapMap(myMapE1, myMapE2, myBE1, myBE2, aRootScope.Next())) { return Standard_False; } - if(!DistanceMapMap (myMapE1, myMapF2, myBE1, myBF2, aRootScope.Next())) + if (!DistanceMapMap(myMapE1, myMapF2, myBE1, myBF2, aRootScope.Next())) { return Standard_False; } - if(!DistanceMapMap (myMapF1, myMapE2, myBF1, myBE2, aRootScope.Next())) + if (!DistanceMapMap(myMapF1, myMapE2, myBF1, myBE2, aRootScope.Next())) { return Standard_False; } - if (fabs (myDistRef) > myEps) + if (Abs(myDistRef) > myEps) { - if(!DistanceMapMap (myMapF1, myMapF2, myBF1, myBF2, aRootScope.Next())) + if (!DistanceMapMap(myMapF1, myMapF2, myBF1, myBF2, aRootScope.Next())) { return Standard_False; } } - + // Modified by Sergey KHROMOV - Tue Mar 6 11:55:03 2001 Begin Standard_Integer i = 1; for (; i <= mySolutionsShape1.Length(); i++) @@ -515,7 +985,7 @@ Standard_Boolean BRepExtrema_DistShapeShape::Perform(const Message_ProgressRange mySolutionsShape2.Remove(i); } // Modified by Sergey KHROMOV - Tue Mar 6 11:55:04 2001 End - myIsDone = ( mySolutionsShape1.Length() > 0 ); + myIsDone = (mySolutionsShape1.Length() > 0); } return myIsDone; diff --git a/src/BRepExtrema/BRepExtrema_DistShapeShape.hxx b/src/BRepExtrema/BRepExtrema_DistShapeShape.hxx index 8b3450e074..67269dbd62 100644 --- a/src/BRepExtrema/BRepExtrema_DistShapeShape.hxx +++ b/src/BRepExtrema/BRepExtrema_DistShapeShape.hxx @@ -14,7 +14,7 @@ #ifndef _BRepExtrema_DistShapeShape_HeaderFile #define _BRepExtrema_DistShapeShape_HeaderFile -#include +#include #include #include #include @@ -28,24 +28,37 @@ #include #include -//! This class provides tools to compute minimum distance
-//! between two Shapes (Compound,CompSolid, Solid, Shell, Face, Wire, Edge, Vertex).
+//! This class provides tools to compute minimum distance +//! between two Shapes (Compound,CompSolid, Solid, Shell, Face, Wire, Edge, Vertex). class BRepExtrema_DistShapeShape { public: DEFINE_STANDARD_ALLOC - //! create empty tool
+ //! create empty tool Standard_EXPORT BRepExtrema_DistShapeShape(); - //! computation of the minimum distance (value and pair of points) using default deflection
- //! Default value is Precision::Confusion().
+ + //! create tool and computation of the minimum distance (value and pair of points) + //! using default deflection in single thread mode.
+ //! Default deflection value is Precision::Confusion().
+ //! @param Shape1 - the first shape for distance computation + //! @param Shape2 - the second shape for distance computation + //! @param F and @param A are not used in computation and are obsolete. + //! @param theRange - the progress indicator of algorithm Standard_EXPORT BRepExtrema_DistShapeShape(const TopoDS_Shape& Shape1, const TopoDS_Shape& Shape2, const Extrema_ExtFlag F = Extrema_ExtFlag_MINMAX, const Extrema_ExtAlgo A = Extrema_ExtAlgo_Grad, const Message_ProgressRange& theRange = Message_ProgressRange()); - //! create tool and load both shapes into it
+ //! create tool and computation of the minimum distance + //! (value and pair of points) in single thread mode.
+ //! Default deflection value is Precision::Confusion().
+ //! @param Shape1 - the first shape for distance computation + //! @param Shape2 - the second shape for distance computation + //! @param theDeflection - the presition of distance computation + //! @param F and @param A are not used in computation and are obsolete. + //! @param theRange - the progress indicator of algorithm Standard_EXPORT BRepExtrema_DistShapeShape(const TopoDS_Shape& Shape1, const TopoDS_Shape& Shape2, const Standard_Real theDeflection, @@ -53,49 +66,60 @@ class BRepExtrema_DistShapeShape const Extrema_ExtAlgo A = Extrema_ExtAlgo_Grad, const Message_ProgressRange& theRange = Message_ProgressRange()); + //! Sets deflection to computation of the minimum distance
void SetDeflection(const Standard_Real theDeflection) { myEps = theDeflection; } + //! load first shape into extrema
Standard_EXPORT void LoadS1(const TopoDS_Shape& Shape1); + //! load second shape into extrema
Standard_EXPORT void LoadS2(const TopoDS_Shape& Shape1); + //! computation of the minimum distance (value and
//! couple of points). Parameter theDeflection is used
//! to specify a maximum deviation of extreme distances
//! from the minimum one.
//! Returns IsDone status.
- //! theProgress - progress indicator of algorithm + //! theRange - the progress indicator of algorithm Standard_EXPORT Standard_Boolean Perform(const Message_ProgressRange& theRange = Message_ProgressRange()); + //! True if the minimum distance is found.
Standard_Boolean IsDone() const { return myIsDone; } + //! Returns the number of solutions satisfying the minimum distance.
Standard_Integer NbSolution() const { return mySolutionsShape1.Length(); } + //! Returns the value of the minimum distance.
Standard_EXPORT Standard_Real Value() const; + //! True if one of the shapes is a solid and the other shape
//! is completely or partially inside the solid.
Standard_Boolean InnerSolution() const { return myInnerSol; } + //! Returns the Point corresponding to the th solution on the first Shape
const gp_Pnt & PointOnShape1(const Standard_Integer N) const { return mySolutionsShape1.Value(N).Point(); } + //! Returns the Point corresponding to the th solution on the second Shape
const gp_Pnt & PointOnShape2(const Standard_Integer N) const { return mySolutionsShape2.Value(N).Point(); } + //! gives the type of the support where the Nth solution on the first shape is situated:
//! IsVertex => the Nth solution on the first shape is a Vertex
//! IsOnEdge => the Nth soluion on the first shape is on a Edge
@@ -105,6 +129,7 @@ class BRepExtrema_DistShapeShape { return mySolutionsShape1.Value(N).SupportKind(); } + //! gives the type of the support where the Nth solution on the second shape is situated:
//! IsVertex => the Nth solution on the second shape is a Vertex
//! IsOnEdge => the Nth soluion on the secondt shape is on a Edge
@@ -114,44 +139,68 @@ class BRepExtrema_DistShapeShape { return mySolutionsShape2.Value(N).SupportKind(); } + //! gives the support where the Nth solution on the first shape is situated.
//! This support can be a Vertex, an Edge or a Face.
Standard_EXPORT TopoDS_Shape SupportOnShape1(const Standard_Integer N) const; + //! gives the support where the Nth solution on the second shape is situated.
//! This support can be a Vertex, an Edge or a Face.
Standard_EXPORT TopoDS_Shape SupportOnShape2(const Standard_Integer N) const; + //! gives the corresponding parameter t if the Nth solution
//! is situated on an Edge of the first shape
Standard_EXPORT void ParOnEdgeS1(const Standard_Integer N,Standard_Real& t) const; + //! gives the corresponding parameter t if the Nth solution
//! is situated on an Edge of the first shape
Standard_EXPORT void ParOnEdgeS2(const Standard_Integer N,Standard_Real& t) const; + //! gives the corresponding parameters (U,V) if the Nth solution
//! is situated on an face of the first shape
Standard_EXPORT void ParOnFaceS1(const Standard_Integer N,Standard_Real& u,Standard_Real& v) const; + //! gives the corresponding parameters (U,V) if the Nth solution
//! is situated on an Face of the second shape
Standard_EXPORT void ParOnFaceS2(const Standard_Integer N,Standard_Real& u,Standard_Real& v) const; + //! Prints on the stream o information on the current state of the object.
Standard_EXPORT void Dump(Standard_OStream& o) const; + //! Sets unused parameter + //! Obsolete void SetFlag(const Extrema_ExtFlag F) { myFlag = F; } + //! Sets unused parameter + //! Obsolete void SetAlgo(const Extrema_ExtAlgo A) { myAlgo = A; } + //! If isMultiThread == Standard_True then computation will be performed in parallel. + void SetMultiThread(Standard_Boolean theIsMultiThread) + { + myIsMultiThread = theIsMultiThread; + } + + //! Returns Standard_True then computation will be performed in parallel + //! Default value is Standard_False + Standard_Boolean IsMultiThread() const + { + return myIsMultiThread; + } + private: //! computes the minimum distance between two maps of shapes (Face,Edge,Vertex)
Standard_Boolean DistanceMapMap(const TopTools_IndexedMapOfShape& Map1, const TopTools_IndexedMapOfShape& Map2, - const Bnd_SeqOfBox& LBox1, - const Bnd_SeqOfBox& LBox2, + const Bnd_Array1OfBox& LBox1, + const Bnd_Array1OfBox& LBox2, const Message_ProgressRange& theRange); //! computes the minimum distance between two maps of vertices
@@ -183,12 +232,13 @@ private: Standard_Boolean myIsInitS2; Extrema_ExtFlag myFlag; Extrema_ExtAlgo myAlgo; - Bnd_SeqOfBox myBV1; - Bnd_SeqOfBox myBV2; - Bnd_SeqOfBox myBE1; - Bnd_SeqOfBox myBE2; - Bnd_SeqOfBox myBF1; - Bnd_SeqOfBox myBF2; + Bnd_Array1OfBox myBV1; + Bnd_Array1OfBox myBV2; + Bnd_Array1OfBox myBE1; + Bnd_Array1OfBox myBE2; + Bnd_Array1OfBox myBF1; + Bnd_Array1OfBox myBF2; + Standard_Boolean myIsMultiThread; }; #endif diff --git a/src/BRepExtrema/BRepExtrema_DistanceSS.cxx b/src/BRepExtrema/BRepExtrema_DistanceSS.cxx index 61773dd806..7cbd701f3b 100644 --- a/src/BRepExtrema/BRepExtrema_DistanceSS.cxx +++ b/src/BRepExtrema/BRepExtrema_DistanceSS.cxx @@ -64,11 +64,13 @@ //------------------------------------------------------------------------------ static Standard_Boolean TRI_SOLUTION (const BRepExtrema_SeqOfSolution& SeqSol, const gp_Pnt& Pt) { - const Standard_Integer Nbsol = SeqSol.Length(); - for (Standard_Integer i = 1; i <= Nbsol; i++) + for (BRepExtrema_SeqOfSolution::iterator anIt = SeqSol.begin(); anIt != SeqSol.end(); anIt++) { - const Standard_Real dst = SeqSol.Value(i).Point().Distance(Pt); - if (dst <= Precision::Confusion()) return Standard_False; + const Standard_Real dst = anIt->Point().Distance(Pt); + if (dst <= Precision::Confusion()) + { + return Standard_False; + } } return Standard_True; } @@ -83,15 +85,16 @@ static void MIN_SOLUTION (const BRepExtrema_SeqOfSolution& SeqSol1, BRepExtrema_SeqOfSolution& seqSol1, BRepExtrema_SeqOfSolution& seqSol2) { - const Standard_Integer nbSol = SeqSol1.Length(); - for (Standard_Integer i = 1; i <= nbSol; i++) + for (BRepExtrema_SeqOfSolution::iterator anIt1 = SeqSol1.begin(), anIt2 = SeqSol2.begin(); + anIt1 != SeqSol1.end(); + anIt1++, anIt2++) { - const Standard_Real dst1 = SeqSol1.Value(i).Dist(); + const Standard_Real dst1 = anIt1->Dist(); if (fabs(dst1 - DstRef) < Eps) - { - seqSol1.Append(SeqSol1.Value(i)); - seqSol2.Append(SeqSol2.Value(i)); - } + { + seqSol1.Append(*anIt1); + seqSol2.Append(*anIt2); + } } } diff --git a/src/BRepTest/BRepTest_ExtremaCommands.cxx b/src/BRepTest/BRepTest_ExtremaCommands.cxx index 0fa44321d1..3be19ae908 100644 --- a/src/BRepTest/BRepTest_ExtremaCommands.cxx +++ b/src/BRepTest/BRepTest_ExtremaCommands.cxx @@ -64,19 +64,45 @@ static Standard_Integer distance (Draw_Interpretor& di, static Standard_Integer distmini(Draw_Interpretor& di, Standard_Integer n, const char** a) { - if (n != 4 && n != 5 ) + if (n < 4 || n > 6) + { return 1; + } const char *ns1 = (a[2]), *ns2 = (a[3]), *ns0 = (a[1]); TopoDS_Shape S1(DBRep::Get(ns1)), S2(DBRep::Get(ns2)); Standard_Real aDeflection = Precision::Confusion(); - if (n == 5) + Standard_Integer anIndex = 4; + if (n >= 5 && a[4][0] != '-') + { aDeflection = Draw::Atof(a[4]); + anIndex++; + } + + Standard_Boolean isMultiThread = Standard_False; + for (Standard_Integer anI = anIndex; anI < n; anI++) + { + TCollection_AsciiString anArg(a[anI]); + anArg.LowerCase(); + if (anArg == "-parallel") + { + isMultiThread = Standard_True; + } + else + { + di << "Syntax error at '" << anArg << "'"; + return 1; + } + } Handle(Draw_ProgressIndicator) aProgress = new Draw_ProgressIndicator(di, 1); - BRepExtrema_DistShapeShape dst(S1 ,S2, aDeflection, Extrema_ExtFlag_MINMAX, - Extrema_ExtAlgo_Grad, aProgress->Start()); + BRepExtrema_DistShapeShape dst; + dst.LoadS1(S1); + dst.LoadS2(S2); + dst.SetDeflection(aDeflection); + dst.SetMultiThread(isMultiThread); + dst.Perform(aProgress->Start()); if (dst.IsDone()) { @@ -412,7 +438,10 @@ void BRepTest::ExtremaCommands (Draw_Interpretor& theCommands) aGroup); theCommands.Add ("distmini", - "distmini name Shape1 Shape2 [deflection]", + "distmini name Shape1 Shape2 [deflection] [-parallel]", + "\n\t\t: Searches minimal distance between two shapes." + "\n\t\t: The option is:" + "\n\t\t: -parallel : calculate distance in multithreaded mode" __FILE__, distmini, aGroup); diff --git a/tests/perf/modalg/bug32539_1 b/tests/perf/modalg/bug32539_1 new file mode 100644 index 0000000000..6c7a4333c3 --- /dev/null +++ b/tests/perf/modalg/bug32539_1 @@ -0,0 +1,61 @@ +puts "==========" +puts "0032539: Modeling Algorithms - Parallelize BRepExtrema_DistShapeShape algorithm" +puts "==========" +puts "" + +# prepare +pload XDE OCAF +XOpen [locate_data_file bug32539_1.xbf] XB +XGetShape s1 XB 0:1:1:2 +XGetShape s2 XB 0:1:1:4 +Close XB +btranslate s1 0 0 60 +brotate s2 0 0 0 0 0 1 90 + +# multi-thread +dchrono p reset; dchrono p start; +set pres [distmini res s1 s2 -parallel] +dchrono p stop; +regexp {Elapsed time: +([-0-9.+eE]+) Hours +([-0-9.+eE]+) Minutes +([-0-9.+eE]+) Seconds} [dchrono p show] full p_Hours p_Minutes p_Seconds +set p_Time [expr ${p_Hours}*60.*60. + ${p_Minutes}*60. + ${p_Seconds} ] +puts "multithreaded time: $p_Time" + +set pdist [dval res_val] + +vclear +vclose ALL +vinit v1/v1 +vdisplay -dispMode 1 s1 s2 res res2 res3 res4 +vfit +checkview -screenshot -3d -path ${imagedir}/${test_image}_multi.png + +#single-thread +dchrono s reset; dchrono s start; +set cres [distmini res s1 s2] +dchrono s stop; +regexp {Elapsed time: +([-0-9.+eE]+) Hours +([-0-9.+eE]+) Minutes +([-0-9.+eE]+) Seconds} [dchrono s show] full s_Hours s_Minutes s_Seconds +set s_Time [expr ${s_Hours}*60.*60. + ${s_Minutes}*60. + ${s_Seconds} ] +puts "single-threaded time: $s_Time" + +set sdist [dval res_val] + +vclear +vclose ALL +vinit v2/v2 +vdisplay -dispMode 1 s1 s2 res res2 res3 res4 +vfit +checkview -screenshot -3d -path ${imagedir}/${test_image}_single.png + +# compare +set ratio [expr ${s_Time}/${p_Time} ] +puts "acceleration in multi-threaded work: $ratio" + +if {[string compare $cres $pres] != 0} { + puts "Error: different result between single-thread and multi-thread mode" +} + +if {[expr abs(${sdist} - ${pdist})] > 1E-13} { + puts "Error: different distance between single-thread and multi-thread mode" +} + + diff --git a/tests/perf/modalg/bug32539_2 b/tests/perf/modalg/bug32539_2 new file mode 100644 index 0000000000..6d9edaf06d --- /dev/null +++ b/tests/perf/modalg/bug32539_2 @@ -0,0 +1,54 @@ +puts "==========" +puts "0032539: Modeling Algorithms - Parallelize BRepExtrema_DistShapeShape algorithm" +puts "==========" +puts "" + +# prepare +restore [locate_data_file 5000-12.brep] s1 +restore [locate_data_file BPLSEITLI.brep] s2 + +# multi-thread +dchrono p reset; dchrono p start; +set pres [distmini res s1 s2 -parallel] +dchrono p stop; +regexp {Elapsed time: +([-0-9.+eE]+) Hours +([-0-9.+eE]+) Minutes +([-0-9.+eE]+) Seconds} [dchrono p show] full p_Hours p_Minutes p_Seconds +set p_Time [expr ${p_Hours}*60.*60. + ${p_Minutes}*60. + ${p_Seconds} ] +puts "multithreaded time: $p_Time" + +set pdist [dval res_val] + +vclear +vclose ALL +vinit v1/v1 +vdisplay -dispMode 1 s1 s2 res +vzoom 2 +checkview -screenshot -3d -path ${imagedir}/${test_image}_multi.png + +#single-thread +dchrono s reset; dchrono s start; +set cres [distmini res s1 s2] +dchrono s stop; +regexp {Elapsed time: +([-0-9.+eE]+) Hours +([-0-9.+eE]+) Minutes +([-0-9.+eE]+) Seconds} [dchrono s show] full s_Hours s_Minutes s_Seconds +set s_Time [expr ${s_Hours}*60.*60. + ${s_Minutes}*60. + ${s_Seconds} ] +puts "single-threaded time: $s_Time" + +set sdist [dval res_val] + +vclear +vclose ALL +vinit v2/v2 +vdisplay -dispMode 1 s1 s2 res +vzoom 2 +checkview -screenshot -3d -path ${imagedir}/${test_image}_single.png + +# compare +set ratio [expr ${s_Time}/${p_Time} ] +puts "acceleration in multi-threaded work: $ratio" + +if {[string compare $cres $pres] != 0} { + puts "Error: different result between single-thread and multi-thread mode" +} + +if {[expr abs(${sdist} - ${pdist})] > 1E-13} { + puts "Error: different distance between single-thread and multi-thread mode" +} From 41fc11b0561b4f851bb9f35d50b0f3015461d6e8 Mon Sep 17 00:00:00 2001 From: msv Date: Fri, 1 Oct 2021 22:23:36 +0300 Subject: [PATCH 085/639] 0032601: Foundation Classes - Poly_Connect hangs on the given incorrect triangulation --- src/Poly/Poly_Connect.cxx | 40 ++++++++++++++++++++---------------- src/Poly/Poly_Connect.hxx | 2 ++ tests/bugs/fclasses/bug32601 | 13 ++++++++++++ 3 files changed, 37 insertions(+), 18 deletions(-) create mode 100644 tests/bugs/fclasses/bug32601 diff --git a/src/Poly/Poly_Connect.cxx b/src/Poly/Poly_Connect.cxx index 8c6c6bd7bf..15e0b2b6dd 100644 --- a/src/Poly/Poly_Connect.cxx +++ b/src/Poly/Poly_Connect.cxx @@ -223,6 +223,8 @@ void Poly_Connect::Initialize(const Standard_Integer N) mytr = myfirst; mysense = Standard_True; mymore = (myfirst != 0); + myPassedTr.Clear(); + myPassedTr.Add (mytr); if (mymore) { Standard_Integer i, no[3]; @@ -247,15 +249,16 @@ void Poly_Connect::Next() if (mysense) { for (i = 0; i < 3; i++) { if (t[i] != 0) { - myTriangulation->Triangle (t[i]).Get (n[0], n[1], n[2]); - for (j = 0; j < 3; j++) { - if ((n[j] == mynode) && (n[(j+1)%3] == myothernode)) { - mytr = t[i]; - myothernode = n[(j+2)%3]; - mymore = (mytr != myfirst); - return; - } - } + myTriangulation->Triangle (t[i]).Get (n[0], n[1], n[2]); + for (j = 0; j < 3; j++) { + if ((n[j] == mynode) && (n[(j+1)%3] == myothernode)) { + mytr = t[i]; + myothernode = n[(j+2)%3]; + mymore = !myPassedTr.Contains (mytr); + myPassedTr.Add (mytr); + return; + } + } } } // sinon, depart vers la gauche. @@ -270,15 +273,16 @@ void Poly_Connect::Next() if (!mysense) { for (i = 0; i < 3; i++) { if (t[i] != 0) { - myTriangulation->Triangle (t[i]).Get (n[0], n[1], n[2]); - for (j = 0; j < 3; j++) { - if ((n[j] == mynode) && (n[(j+2)%3] == myothernode)) { - mytr = t[i]; - myothernode = n[(j+1)%3]; - mymore = Standard_True; - return; - } - } + myTriangulation->Triangle (t[i]).Get (n[0], n[1], n[2]); + for (j = 0; j < 3; j++) { + if ((n[j] == mynode) && (n[(j+2)%3] == myothernode)) { + mytr = t[i]; + myothernode = n[(j+1)%3]; + mymore = !myPassedTr.Contains (mytr); + myPassedTr.Add (mytr); + return; + } + } } } } diff --git a/src/Poly/Poly_Connect.hxx b/src/Poly/Poly_Connect.hxx index 29fa2024a3..e2ad454e91 100644 --- a/src/Poly/Poly_Connect.hxx +++ b/src/Poly/Poly_Connect.hxx @@ -22,6 +22,7 @@ #include #include +#include #include #include class Poly_Triangulation; @@ -159,6 +160,7 @@ private: Standard_Integer myothernode; Standard_Boolean mysense; Standard_Boolean mymore; + TColStd_PackedMapOfInteger myPassedTr; }; diff --git a/tests/bugs/fclasses/bug32601 b/tests/bugs/fclasses/bug32601 new file mode 100644 index 0000000000..4b738db18b --- /dev/null +++ b/tests/bugs/fclasses/bug32601 @@ -0,0 +1,13 @@ +puts "============" +puts "0032601: Foundation Classes - Poly_Connect hangs on the given incorrect triangulation" +puts "============" +puts "" + +cpulimit 30 + +restore [locate_data_file cone_bad_tri.brep] a +vinit Viewer1/View1 +vdefaults -autotriang 0 +vdisplay a +vfit +vsetdispmode 1 From eba0379cdef41b927e71e7cad6b32291e594e5c7 Mon Sep 17 00:00:00 2001 From: kgv Date: Sat, 2 Oct 2021 00:17:17 +0300 Subject: [PATCH 086/639] 0032602: Configuration, genconf - reduce window height with empty error log Font height is reduced to 1 for empty error labels is empty to win some space. --- adm/genconf.tcl | 30 +++++++++++++++++++++--------- 1 file changed, 21 insertions(+), 9 deletions(-) diff --git a/adm/genconf.tcl b/adm/genconf.tcl index ff2444fa8c..a2ca8f6c3d 100644 --- a/adm/genconf.tcl +++ b/adm/genconf.tcl @@ -175,6 +175,16 @@ proc wokdep:gui:SwitchArch {} { grid .myFrame.myClose -row $::aRowIter -column 6 -columnspan 2 } +# update label text and visibility +font create wokdep:gui:EmptyFont -size -1 +proc wokdep:gui:SetLabelText {theLabel theText} { + set aFont TkDefaultFont + if { $theText == "" } { + set aFont wokdep:gui:EmptyFont + } + $theLabel configure -text $theText -font $aFont +} + proc wokdep:gui:UpdateList {} { set anIncErrs {} set anLib32Errs {} @@ -251,16 +261,18 @@ proc wokdep:gui:UpdateList {} { wokdep:SearchJDK anIncErrs anLib32Errs anLib64Errs anBin32Errs anBin64Errs } - .myFrame.myIncErrLbl configure -text [join $anIncErrs "\n"] - .myFrame.myLib32_ErrLbl configure -text [join $anLib32Errs "\n"] - .myFrame.myLib64_ErrLbl configure -text [join $anLib64Errs "\n"] - .myFrame.myBin32_ErrLbl configure -text [join $anBin32Errs "\n"] - .myFrame.myBin64_ErrLbl configure -text [join $anBin64Errs "\n"] + wokdep:gui:SetLabelText .myFrame.myIncErrLbl [join $anIncErrs "\n"] + + wokdep:gui:SetLabelText .myFrame.myIncErrLbl [join $anIncErrs "\n"] + wokdep:gui:SetLabelText .myFrame.myLib32_ErrLbl [join $anLib32Errs "\n"] + wokdep:gui:SetLabelText .myFrame.myLib64_ErrLbl [join $anLib64Errs "\n"] + wokdep:gui:SetLabelText .myFrame.myBin32_ErrLbl [join $anBin32Errs "\n"] + wokdep:gui:SetLabelText .myFrame.myBin64_ErrLbl [join $anBin64Errs "\n"] - .myFrame.myLib32D_ErrLbl configure -text [join $anLib32Errs "\n"] - .myFrame.myLib64D_ErrLbl configure -text [join $anLib64Errs "\n"] - .myFrame.myBin32D_ErrLbl configure -text [join $anBin32Errs "\n"] - .myFrame.myBin64D_ErrLbl configure -text [join $anBin64Errs "\n"] + wokdep:gui:SetLabelText .myFrame.myLib32D_ErrLbl [join $anLib32Errs "\n"] + wokdep:gui:SetLabelText .myFrame.myLib64D_ErrLbl [join $anLib64Errs "\n"] + wokdep:gui:SetLabelText .myFrame.myBin32D_ErrLbl [join $anBin32Errs "\n"] + wokdep:gui:SetLabelText .myFrame.myBin64D_ErrLbl [join $anBin64Errs "\n"] # merge duplicates set ::CSF_OPT_LIB32 [lsort -unique $::CSF_OPT_LIB32] From c2064b60e7b99dc93ecc1ba20bc677cae8b92d96 Mon Sep 17 00:00:00 2001 From: aml Date: Sat, 2 Oct 2021 09:38:32 +0300 Subject: [PATCH 087/639] 0032603: Coding - get rid of unsused forward declarations Packages from Adaptor2d to BRepMesh are processed. --- src/AIS/AIS_InteractiveContext.hxx | 1 - src/AIS/AIS_InteractiveObject.hxx | 2 -- src/AIS/AIS_LightSource.hxx | 1 - src/AIS/AIS_Plane.hxx | 1 - src/AIS/AIS_ViewController.hxx | 1 - src/BOPAlgo/BOPAlgo_ArgumentAnalyzer.hxx | 1 - src/BOPAlgo/BOPAlgo_BOP.hxx | 1 - src/BOPAlgo/BOPAlgo_Builder.hxx | 2 -- src/BOPAlgo/BOPAlgo_BuilderFace.hxx | 1 - src/BOPAlgo/BOPAlgo_CheckResult.hxx | 1 - src/BOPAlgo/BOPAlgo_MakerVolume.hxx | 1 - src/BOPAlgo/BOPAlgo_PaveFiller.hxx | 3 -- src/BOPAlgo/BOPAlgo_Section.hxx | 1 - src/BOPAlgo/BOPAlgo_WireSplitter.hxx | 1 - src/BOPDS/BOPDS_Iterator.hxx | 1 - src/BOPDS/BOPDS_PaveBlock.hxx | 2 -- src/BOPDS/BOPDS_SubIterator.hxx | 1 - src/BOPTest/BOPTest.hxx | 2 -- src/BOPTest/BOPTest_DrawableShape.hxx | 1 - src/BOPTools/BOPTools_AlgoTools2D.hxx | 1 - src/BOPTools/BOPTools_Set.hxx | 1 - src/BRepAlgo/BRepAlgo_AsDes.hxx | 1 - src/BRepAlgo/BRepAlgo_FaceRestrictor.hxx | 1 - src/BRepAlgo/BRepAlgo_Image.hxx | 1 - src/BRepAlgo/BRepAlgo_Loop.hxx | 1 - src/BRepAlgo/BRepAlgo_NormalProjection.hxx | 4 --- src/BRepBlend/BRepBlend_AppFunc.hxx | 1 - src/BRepBlend/BRepBlend_AppFuncRoot.hxx | 3 -- src/BRepBlend/BRepBlend_AppFuncRst.hxx | 1 - src/BRepBlend/BRepBlend_AppFuncRstRst.hxx | 1 - src/BRepBlend/BRepBlend_AppSurface.hxx | 3 -- src/BRepBlend/BRepBlend_CurvPointRadInv.hxx | 1 - src/BRepBlend/BRepBlend_Extremity.hxx | 4 --- src/BRepBlend/BRepBlend_Line.hxx | 2 -- src/BRepBlend/BRepBlend_PointOnRst.hxx | 2 -- src/BRepBlend/BRepBlend_RstRstLineBuilder.hxx | 1 - .../BRepBlend_SurfRstLineBuilder.hxx | 1 - src/BRepFeat/BRepFeat.hxx | 12 -------- src/BRepFeat/BRepFeat_Form.hxx | 1 - src/BRepFeat/BRepFeat_MakeDPrism.hxx | 2 -- src/BRepFeat/BRepFeat_MakeLinearForm.hxx | 2 -- src/BRepFeat/BRepFeat_MakePipe.hxx | 4 --- src/BRepFeat/BRepFeat_MakePrism.hxx | 3 -- src/BRepFeat/BRepFeat_MakeRevol.hxx | 3 -- src/BRepFeat/BRepFeat_MakeRevolutionForm.hxx | 2 -- src/BRepFeat/BRepFeat_RibSlot.hxx | 3 -- src/BRepFeat/BRepFeat_SplitShape.hxx | 3 -- src/BRepFill/BRepFill.hxx | 28 ------------------- src/BRepFill/BRepFill_ApproxSeewing.hxx | 1 - src/BRepFill/BRepFill_CompatibleWires.hxx | 2 -- src/BRepFill/BRepFill_CurveConstraint.hxx | 1 - src/BRepFill/BRepFill_Draft.hxx | 4 --- src/BRepFill/BRepFill_EdgeFaceAndOrder.hxx | 3 -- src/BRepFill/BRepFill_Evolved.hxx | 5 ---- src/BRepFill/BRepFill_FaceAndOrder.hxx | 2 -- src/BRepFill/BRepFill_Generator.hxx | 1 - src/BRepFill/BRepFill_LocationLaw.hxx | 2 -- src/BRepFill/BRepFill_MultiLine.hxx | 2 -- src/BRepFill/BRepFill_OffsetAncestors.hxx | 1 - src/BRepFill/BRepFill_OffsetWire.hxx | 6 ---- src/BRepFill/BRepFill_Pipe.hxx | 4 --- src/BRepFill/BRepFill_PipeShell.hxx | 5 ---- src/BRepFill/BRepFill_Section.hxx | 3 -- src/BRepFill/BRepFill_SectionPlacement.hxx | 2 -- src/BRepFill/BRepFill_ShapeLaw.hxx | 1 - src/BRepFill/BRepFill_Sweep.hxx | 5 ---- src/BRepFill/BRepFill_TrimEdgeTool.hxx | 2 -- src/BRepFill/BRepFill_TrimShellCorner.hxx | 4 --- src/BRepFill/BRepFill_TrimSurfaceTool.hxx | 3 -- .../BRepFilletAPI_MakeChamfer.hxx | 1 - .../BRepFilletAPI_MakeFillet.hxx | 2 -- src/BRepMesh/BRepMesh_BaseMeshAlgo.hxx | 1 - .../BRepMesh_ConstrainedBaseMeshAlgo.hxx | 1 - src/BRepMesh/BRepMesh_CurveTessellator.hxx | 1 - src/BRepMesh/BRepMesh_CustomBaseMeshAlgo.hxx | 1 - .../BRepMesh_DataStructureOfDelaun.hxx | 1 - src/BRepMesh/BRepMesh_Deflection.hxx | 3 -- .../BRepMesh_DelabellaBaseMeshAlgo.hxx | 2 -- .../BRepMesh_DelaunayBaseMeshAlgo.hxx | 2 -- src/BRepMesh/BRepMesh_GeomTool.hxx | 2 -- src/BRepMesh/BRepMesh_ShapeVisitor.hxx | 2 -- src/BRepMesh/BRepMesh_VertexTool.hxx | 1 - src/BiTgte/BiTgte_Blend.hxx | 3 -- src/BiTgte/BiTgte_CurveOnEdge.hxx | 5 ---- src/BiTgte/BiTgte_CurveOnVertex.hxx | 4 --- src/BinDrivers/BinDrivers.hxx | 3 -- src/BinMDataXtd/BinMDataXtd.hxx | 4 --- src/BinMNaming/BinMNaming.hxx | 2 -- src/BinMXCAFDoc/BinMXCAFDoc.hxx | 8 ------ src/Blend/Blend_AppFunction.hxx | 1 - src/Blend/Blend_CSFunction.hxx | 1 - src/Blend/Blend_Function.hxx | 2 -- src/Blend/Blend_Point.hxx | 3 -- src/Blend/Blend_RstRstFunction.hxx | 1 - src/Blend/Blend_SurfRstFunction.hxx | 1 - src/BlendFunc/BlendFunc.hxx | 14 ---------- src/BlendFunc/BlendFunc_ChAsym.hxx | 1 - src/BlendFunc/BlendFunc_Chamfer.hxx | 2 -- src/BlendFunc/BlendFunc_ConstRad.hxx | 1 - src/BlendFunc/BlendFunc_ConstThroat.hxx | 2 -- .../BlendFunc_ConstThroatWithPenetration.hxx | 2 -- src/BlendFunc/BlendFunc_EvolRad.hxx | 1 - src/BlendFunc/BlendFunc_Tensor.hxx | 2 -- 103 files changed, 260 deletions(-) diff --git a/src/AIS/AIS_InteractiveContext.hxx b/src/AIS/AIS_InteractiveContext.hxx index 34612ced44..76db018c6a 100644 --- a/src/AIS/AIS_InteractiveContext.hxx +++ b/src/AIS/AIS_InteractiveContext.hxx @@ -53,7 +53,6 @@ class TCollection_ExtendedString; class Prs3d_LineAspect; class Prs3d_BasicAspect; class TopoDS_Shape; -class SelectMgr_EntityOwner; class SelectMgr_Filter; //! The Interactive Context allows you to manage graphic behavior and selection of Interactive Objects in one or more viewers. diff --git a/src/AIS/AIS_InteractiveObject.hxx b/src/AIS/AIS_InteractiveObject.hxx index f73fc925b1..93534fb889 100644 --- a/src/AIS/AIS_InteractiveObject.hxx +++ b/src/AIS/AIS_InteractiveObject.hxx @@ -22,9 +22,7 @@ #include class AIS_InteractiveContext; -class Graphic3d_MaterialAspect; class Prs3d_BasicAspect; -class Bnd_Box; class V3d_View; //! Defines a class of objects with display and selection services. diff --git a/src/AIS/AIS_LightSource.hxx b/src/AIS/AIS_LightSource.hxx index 1d9a433ab7..0e6dbc6bfa 100644 --- a/src/AIS/AIS_LightSource.hxx +++ b/src/AIS/AIS_LightSource.hxx @@ -20,7 +20,6 @@ #include #include -class Prs3d_ShadingAspect; class Select3D_SensitiveSphere; //! Interactive object for a light source. diff --git a/src/AIS/AIS_Plane.hxx b/src/AIS/AIS_Plane.hxx index 999adb43d7..cf973058f9 100644 --- a/src/AIS/AIS_Plane.hxx +++ b/src/AIS/AIS_Plane.hxx @@ -24,7 +24,6 @@ class Geom_Plane; class Geom_Axis2Placement; -class gp_Pnt; //! Constructs plane datums to be used in construction of //! composite shapes. diff --git a/src/AIS/AIS_ViewController.hxx b/src/AIS/AIS_ViewController.hxx index f22c8bf8e7..1437b20fda 100644 --- a/src/AIS/AIS_ViewController.hxx +++ b/src/AIS/AIS_ViewController.hxx @@ -41,7 +41,6 @@ class AIS_InteractiveContext; class AIS_Point; class AIS_RubberBand; class AIS_XRTrackedDevice; -class Graphic3d_Camera; class SelectMgr_EntityOwner; class V3d_View; class WNT_HIDSpaceMouse; diff --git a/src/BOPAlgo/BOPAlgo_ArgumentAnalyzer.hxx b/src/BOPAlgo/BOPAlgo_ArgumentAnalyzer.hxx index 2c127cf55e..e8682ce789 100644 --- a/src/BOPAlgo/BOPAlgo_ArgumentAnalyzer.hxx +++ b/src/BOPAlgo/BOPAlgo_ArgumentAnalyzer.hxx @@ -27,7 +27,6 @@ #include #include #include -class TopoDS_Shape; //! check the validity of argument(s) for Boolean Operations diff --git a/src/BOPAlgo/BOPAlgo_BOP.hxx b/src/BOPAlgo/BOPAlgo_BOP.hxx index d91b86e851..7146fc8015 100644 --- a/src/BOPAlgo/BOPAlgo_BOP.hxx +++ b/src/BOPAlgo/BOPAlgo_BOP.hxx @@ -27,7 +27,6 @@ #include #include #include -class TopoDS_Shape; class BOPAlgo_PaveFiller; //! diff --git a/src/BOPAlgo/BOPAlgo_Builder.hxx b/src/BOPAlgo/BOPAlgo_Builder.hxx index 1d908c79bc..85b6a3e726 100644 --- a/src/BOPAlgo/BOPAlgo_Builder.hxx +++ b/src/BOPAlgo/BOPAlgo_Builder.hxx @@ -38,8 +38,6 @@ #include class IntTools_Context; class TopoDS_Shape; -class BOPAlgo_PaveFiller; -class TopoDS_Solid; //! //! The class is a General Fuse algorithm - base algorithm for the diff --git a/src/BOPAlgo/BOPAlgo_BuilderFace.hxx b/src/BOPAlgo/BOPAlgo_BuilderFace.hxx index 4823d587cf..9cbc032bed 100644 --- a/src/BOPAlgo/BOPAlgo_BuilderFace.hxx +++ b/src/BOPAlgo/BOPAlgo_BuilderFace.hxx @@ -26,7 +26,6 @@ #include #include #include -class TopoDS_Face; //! The algorithm to build new faces from the given faces and diff --git a/src/BOPAlgo/BOPAlgo_CheckResult.hxx b/src/BOPAlgo/BOPAlgo_CheckResult.hxx index 3e2a6d051b..ffe75bd02b 100644 --- a/src/BOPAlgo/BOPAlgo_CheckResult.hxx +++ b/src/BOPAlgo/BOPAlgo_CheckResult.hxx @@ -24,7 +24,6 @@ #include #include #include -class TopoDS_Shape; //! contains information about faulty shapes and faulty types diff --git a/src/BOPAlgo/BOPAlgo_MakerVolume.hxx b/src/BOPAlgo/BOPAlgo_MakerVolume.hxx index 5d116869dd..2a4dbbffb7 100644 --- a/src/BOPAlgo/BOPAlgo_MakerVolume.hxx +++ b/src/BOPAlgo/BOPAlgo_MakerVolume.hxx @@ -26,7 +26,6 @@ #include #include #include -class TopoDS_Solid; class BOPAlgo_PaveFiller; diff --git a/src/BOPAlgo/BOPAlgo_PaveFiller.hxx b/src/BOPAlgo/BOPAlgo_PaveFiller.hxx index 5906e81825..f5182858b3 100644 --- a/src/BOPAlgo/BOPAlgo_PaveFiller.hxx +++ b/src/BOPAlgo/BOPAlgo_PaveFiller.hxx @@ -53,10 +53,7 @@ #include #include class IntTools_Context; -class BOPDS_DS; -class BOPAlgo_SectionAttribute; class BOPDS_PaveBlock; -class BOPDS_CommonBlock; class gp_Pnt; class BOPDS_Curve; class TopoDS_Vertex; diff --git a/src/BOPAlgo/BOPAlgo_Section.hxx b/src/BOPAlgo/BOPAlgo_Section.hxx index fde4a020a1..613050a8bf 100644 --- a/src/BOPAlgo/BOPAlgo_Section.hxx +++ b/src/BOPAlgo/BOPAlgo_Section.hxx @@ -23,7 +23,6 @@ #include #include class BOPAlgo_PaveFiller; -class TopoDS_Shape; diff --git a/src/BOPAlgo/BOPAlgo_WireSplitter.hxx b/src/BOPAlgo/BOPAlgo_WireSplitter.hxx index 68408a1827..b0950eaed0 100644 --- a/src/BOPAlgo/BOPAlgo_WireSplitter.hxx +++ b/src/BOPAlgo/BOPAlgo_WireSplitter.hxx @@ -26,7 +26,6 @@ #include #include #include -class BOPAlgo_WireEdgeSet; class TopoDS_Wire; class TopoDS_Face; diff --git a/src/BOPDS/BOPDS_Iterator.hxx b/src/BOPDS/BOPDS_Iterator.hxx index cf9cb9d9b4..e14a47a360 100644 --- a/src/BOPDS/BOPDS_Iterator.hxx +++ b/src/BOPDS/BOPDS_Iterator.hxx @@ -31,7 +31,6 @@ #include #include #include -class BOPDS_DS; class IntTools_Context; //! The class BOPDS_Iterator is diff --git a/src/BOPDS/BOPDS_PaveBlock.hxx b/src/BOPDS/BOPDS_PaveBlock.hxx index 8e699b2150..695433752d 100644 --- a/src/BOPDS/BOPDS_PaveBlock.hxx +++ b/src/BOPDS/BOPDS_PaveBlock.hxx @@ -28,8 +28,6 @@ #include #include #include -class BOPDS_Pave; -class Bnd_Box; class BOPDS_PaveBlock; diff --git a/src/BOPDS/BOPDS_SubIterator.hxx b/src/BOPDS/BOPDS_SubIterator.hxx index cc28965692..44fcd42502 100644 --- a/src/BOPDS/BOPDS_SubIterator.hxx +++ b/src/BOPDS/BOPDS_SubIterator.hxx @@ -26,7 +26,6 @@ #include #include #include -class BOPDS_DS; //! The class BOPDS_SubIterator is used to compute intersections between diff --git a/src/BOPTest/BOPTest.hxx b/src/BOPTest/BOPTest.hxx index 5f0a999948..4d385f6030 100644 --- a/src/BOPTest/BOPTest.hxx +++ b/src/BOPTest/BOPTest.hxx @@ -22,8 +22,6 @@ #include #include -class BOPTest_Objects; -class BOPTest_DrawableShape; class Message_Report; class BOPTest diff --git a/src/BOPTest/BOPTest_DrawableShape.hxx b/src/BOPTest/BOPTest_DrawableShape.hxx index 0f19c74f92..f80ba693df 100644 --- a/src/BOPTest/BOPTest_DrawableShape.hxx +++ b/src/BOPTest/BOPTest_DrawableShape.hxx @@ -26,7 +26,6 @@ #include class Draw_Text3D; class TopoDS_Shape; -class Draw_Color; class gp_Pnt; class Draw_Display; diff --git a/src/BOPTools/BOPTools_AlgoTools2D.hxx b/src/BOPTools/BOPTools_AlgoTools2D.hxx index 73ac6c50d9..5e4e8f36f6 100644 --- a/src/BOPTools/BOPTools_AlgoTools2D.hxx +++ b/src/BOPTools/BOPTools_AlgoTools2D.hxx @@ -28,7 +28,6 @@ class gp_Vec; class Geom2d_Curve; class Geom_Curve; class BRepAdaptor_Surface; -class ProjLib_ProjectedCurve; class IntTools_Context; diff --git a/src/BOPTools/BOPTools_Set.hxx b/src/BOPTools/BOPTools_Set.hxx index d4b1381aae..10071a5888 100644 --- a/src/BOPTools/BOPTools_Set.hxx +++ b/src/BOPTools/BOPTools_Set.hxx @@ -25,7 +25,6 @@ #include #include #include -class TopoDS_Shape; diff --git a/src/BRepAlgo/BRepAlgo_AsDes.hxx b/src/BRepAlgo/BRepAlgo_AsDes.hxx index 9241dd18e8..b5721dc82c 100644 --- a/src/BRepAlgo/BRepAlgo_AsDes.hxx +++ b/src/BRepAlgo/BRepAlgo_AsDes.hxx @@ -24,7 +24,6 @@ #include #include #include -class Standard_ConstructionError; class TopoDS_Shape; diff --git a/src/BRepAlgo/BRepAlgo_FaceRestrictor.hxx b/src/BRepAlgo/BRepAlgo_FaceRestrictor.hxx index 5d95c34022..794ddf3593 100644 --- a/src/BRepAlgo/BRepAlgo_FaceRestrictor.hxx +++ b/src/BRepAlgo/BRepAlgo_FaceRestrictor.hxx @@ -25,7 +25,6 @@ #include #include #include -class TopoDS_Face; class TopoDS_Wire; diff --git a/src/BRepAlgo/BRepAlgo_Image.hxx b/src/BRepAlgo/BRepAlgo_Image.hxx index a605297a9c..10ddcb9bfd 100644 --- a/src/BRepAlgo/BRepAlgo_Image.hxx +++ b/src/BRepAlgo/BRepAlgo_Image.hxx @@ -26,7 +26,6 @@ #include #include #include -class Standard_ConstructionError; class TopoDS_Shape; diff --git a/src/BRepAlgo/BRepAlgo_Loop.hxx b/src/BRepAlgo/BRepAlgo_Loop.hxx index 316a9d7e64..f82a59b68b 100644 --- a/src/BRepAlgo/BRepAlgo_Loop.hxx +++ b/src/BRepAlgo/BRepAlgo_Loop.hxx @@ -27,7 +27,6 @@ #include #include #include -class TopoDS_Face; class TopoDS_Edge; diff --git a/src/BRepAlgo/BRepAlgo_NormalProjection.hxx b/src/BRepAlgo/BRepAlgo_NormalProjection.hxx index 54f880aa09..b1891ef272 100644 --- a/src/BRepAlgo/BRepAlgo_NormalProjection.hxx +++ b/src/BRepAlgo/BRepAlgo_NormalProjection.hxx @@ -29,10 +29,6 @@ #include #include #include -class Standard_ConstructionError; -class Standard_NoSuchObject; -class StdFail_NotDone; -class TopoDS_Shape; class TopoDS_Edge; class Adaptor3d_Curve; diff --git a/src/BRepBlend/BRepBlend_AppFunc.hxx b/src/BRepBlend/BRepBlend_AppFunc.hxx index 7e52e33456..7a20512b77 100644 --- a/src/BRepBlend/BRepBlend_AppFunc.hxx +++ b/src/BRepBlend/BRepBlend_AppFunc.hxx @@ -23,7 +23,6 @@ #include #include #include -class Standard_OutOfRange; class BRepBlend_Line; class Blend_Function; class Blend_AppFunction; diff --git a/src/BRepBlend/BRepBlend_AppFuncRoot.hxx b/src/BRepBlend/BRepBlend_AppFuncRoot.hxx index 1c3bce30d8..96010e168d 100644 --- a/src/BRepBlend/BRepBlend_AppFuncRoot.hxx +++ b/src/BRepBlend/BRepBlend_AppFuncRoot.hxx @@ -36,10 +36,7 @@ #include #include class BRepBlend_Line; -class Standard_OutOfRange; class Blend_AppFunction; -class gp_Pnt; -class Blend_Point; class BRepBlend_AppFuncRoot; diff --git a/src/BRepBlend/BRepBlend_AppFuncRst.hxx b/src/BRepBlend/BRepBlend_AppFuncRst.hxx index faf58742c1..13783263a9 100644 --- a/src/BRepBlend/BRepBlend_AppFuncRst.hxx +++ b/src/BRepBlend/BRepBlend_AppFuncRst.hxx @@ -23,7 +23,6 @@ #include #include #include -class Standard_OutOfRange; class BRepBlend_Line; class Blend_SurfRstFunction; class Blend_AppFunction; diff --git a/src/BRepBlend/BRepBlend_AppFuncRstRst.hxx b/src/BRepBlend/BRepBlend_AppFuncRstRst.hxx index 34b136d7a7..982cf7973c 100644 --- a/src/BRepBlend/BRepBlend_AppFuncRstRst.hxx +++ b/src/BRepBlend/BRepBlend_AppFuncRstRst.hxx @@ -23,7 +23,6 @@ #include #include #include -class Standard_OutOfRange; class BRepBlend_Line; class Blend_RstRstFunction; class Blend_AppFunction; diff --git a/src/BRepBlend/BRepBlend_AppSurface.hxx b/src/BRepBlend/BRepBlend_AppSurface.hxx index 8ae9866071..b3e6051331 100644 --- a/src/BRepBlend/BRepBlend_AppSurface.hxx +++ b/src/BRepBlend/BRepBlend_AppSurface.hxx @@ -33,9 +33,6 @@ #include #include #include -class StdFail_NotDone; -class Standard_DomainError; -class Standard_OutOfRange; class Approx_SweepFunction; diff --git a/src/BRepBlend/BRepBlend_CurvPointRadInv.hxx b/src/BRepBlend/BRepBlend_CurvPointRadInv.hxx index 0672178e8b..9e71c82d47 100644 --- a/src/BRepBlend/BRepBlend_CurvPointRadInv.hxx +++ b/src/BRepBlend/BRepBlend_CurvPointRadInv.hxx @@ -29,7 +29,6 @@ #include class math_Matrix; -class gp_Pnt; //! Function of reframing between a point and a curve. diff --git a/src/BRepBlend/BRepBlend_Extremity.hxx b/src/BRepBlend/BRepBlend_Extremity.hxx index 31de857649..c923ccc3b6 100644 --- a/src/BRepBlend/BRepBlend_Extremity.hxx +++ b/src/BRepBlend/BRepBlend_Extremity.hxx @@ -28,10 +28,6 @@ #include #include class Adaptor3d_HVertex; -class Standard_DomainError; -class Standard_OutOfRange; -class gp_Pnt; -class gp_Vec; class IntSurf_Transition; class BRepBlend_PointOnRst; diff --git a/src/BRepBlend/BRepBlend_Line.hxx b/src/BRepBlend/BRepBlend_Line.hxx index abaea98c2a..73737dbbea 100644 --- a/src/BRepBlend/BRepBlend_Line.hxx +++ b/src/BRepBlend/BRepBlend_Line.hxx @@ -26,9 +26,7 @@ #include #include #include -class Standard_OutOfRange; class Blend_Point; -class BRepBlend_Extremity; class BRepBlend_Line; diff --git a/src/BRepBlend/BRepBlend_PointOnRst.hxx b/src/BRepBlend/BRepBlend_PointOnRst.hxx index 61601a84e1..0fdc7ac6e2 100644 --- a/src/BRepBlend/BRepBlend_PointOnRst.hxx +++ b/src/BRepBlend/BRepBlend_PointOnRst.hxx @@ -20,8 +20,6 @@ #include #include -class Standard_DomainError; -class IntSurf_Transition; //! Definition of an intersection point between a line //! and a restriction on a surface. diff --git a/src/BRepBlend/BRepBlend_RstRstLineBuilder.hxx b/src/BRepBlend/BRepBlend_RstRstLineBuilder.hxx index 65f117b69d..e5be492fcb 100644 --- a/src/BRepBlend/BRepBlend_RstRstLineBuilder.hxx +++ b/src/BRepBlend/BRepBlend_RstRstLineBuilder.hxx @@ -32,7 +32,6 @@ class Blend_CurvPointFuncInv; class Adaptor3d_HVertex; class IntSurf_Transition; class BRepBlend_Extremity; -class Blend_Point; //! This class processes the data resulting from diff --git a/src/BRepBlend/BRepBlend_SurfRstLineBuilder.hxx b/src/BRepBlend/BRepBlend_SurfRstLineBuilder.hxx index 77b03dce45..a5834f1c63 100644 --- a/src/BRepBlend/BRepBlend_SurfRstLineBuilder.hxx +++ b/src/BRepBlend/BRepBlend_SurfRstLineBuilder.hxx @@ -33,7 +33,6 @@ class gp_Pnt2d; class Adaptor3d_HVertex; class IntSurf_Transition; class BRepBlend_Extremity; -class Blend_Point; //! This class processes data resulting from //! Blend_CSWalking taking in consideration the Surface diff --git a/src/BRepFeat/BRepFeat.hxx b/src/BRepFeat/BRepFeat.hxx index 968210f367..ad14560bf5 100644 --- a/src/BRepFeat/BRepFeat.hxx +++ b/src/BRepFeat/BRepFeat.hxx @@ -34,18 +34,6 @@ class TopoDS_Face; class BRepTopAdaptor_FClass2d; class Geom2dAdaptor_Curve; class TopoDS_Solid; -class BRepFeat_Builder; -class BRepFeat_MakeCylindricalHole; -class BRepFeat_SplitShape; -class BRepFeat_Form; -class BRepFeat_RibSlot; -class BRepFeat_MakePrism; -class BRepFeat_MakeRevol; -class BRepFeat_MakePipe; -class BRepFeat_Gluer; -class BRepFeat_MakeDPrism; -class BRepFeat_MakeLinearForm; -class BRepFeat_MakeRevolutionForm; //! BRepFeat is necessary for the diff --git a/src/BRepFeat/BRepFeat_Form.hxx b/src/BRepFeat/BRepFeat_Form.hxx index 0fd741d6e4..ef350db86a 100644 --- a/src/BRepFeat/BRepFeat_Form.hxx +++ b/src/BRepFeat/BRepFeat_Form.hxx @@ -32,7 +32,6 @@ #include #include #include -class TopoDS_Shape; class Geom_Curve; class LocOpe_Gluer; class BRepAlgoAPI_BooleanOperation; diff --git a/src/BRepFeat/BRepFeat_MakeDPrism.hxx b/src/BRepFeat/BRepFeat_MakeDPrism.hxx index 1298115a3c..a31e84b660 100644 --- a/src/BRepFeat/BRepFeat_MakeDPrism.hxx +++ b/src/BRepFeat/BRepFeat_MakeDPrism.hxx @@ -31,9 +31,7 @@ #include #include class Geom_Curve; -class Standard_ConstructionError; class TopoDS_Shape; -class TopoDS_Face; class TopoDS_Edge; diff --git a/src/BRepFeat/BRepFeat_MakeLinearForm.hxx b/src/BRepFeat/BRepFeat_MakeLinearForm.hxx index 3ce8361fc2..08c10bdbb5 100644 --- a/src/BRepFeat/BRepFeat_MakeLinearForm.hxx +++ b/src/BRepFeat/BRepFeat_MakeLinearForm.hxx @@ -30,10 +30,8 @@ #include class Geom_Curve; class Geom_Plane; -class Standard_ConstructionError; class TopoDS_Shape; class TopoDS_Wire; -class gp_Vec; class TopoDS_Edge; class TopoDS_Face; class gp_Pnt; diff --git a/src/BRepFeat/BRepFeat_MakePipe.hxx b/src/BRepFeat/BRepFeat_MakePipe.hxx index 7c0e7a4bf3..c5d10ffe1f 100644 --- a/src/BRepFeat/BRepFeat_MakePipe.hxx +++ b/src/BRepFeat/BRepFeat_MakePipe.hxx @@ -30,10 +30,6 @@ #include #include class Geom_Curve; -class Standard_ConstructionError; -class TopoDS_Shape; -class TopoDS_Face; -class TopoDS_Wire; class TopoDS_Edge; diff --git a/src/BRepFeat/BRepFeat_MakePrism.hxx b/src/BRepFeat/BRepFeat_MakePrism.hxx index c545b853a7..453927089c 100644 --- a/src/BRepFeat/BRepFeat_MakePrism.hxx +++ b/src/BRepFeat/BRepFeat_MakePrism.hxx @@ -31,10 +31,7 @@ #include #include class Geom_Curve; -class Standard_ConstructionError; -class TopoDS_Shape; class TopoDS_Face; -class gp_Dir; class TopoDS_Edge; diff --git a/src/BRepFeat/BRepFeat_MakeRevol.hxx b/src/BRepFeat/BRepFeat_MakeRevol.hxx index e4c5fa6af8..c807e66d38 100644 --- a/src/BRepFeat/BRepFeat_MakeRevol.hxx +++ b/src/BRepFeat/BRepFeat_MakeRevol.hxx @@ -31,10 +31,7 @@ #include #include class Geom_Curve; -class Standard_ConstructionError; -class TopoDS_Shape; class TopoDS_Face; -class gp_Ax1; class TopoDS_Edge; diff --git a/src/BRepFeat/BRepFeat_MakeRevolutionForm.hxx b/src/BRepFeat/BRepFeat_MakeRevolutionForm.hxx index 4b38785d3a..b653858708 100644 --- a/src/BRepFeat/BRepFeat_MakeRevolutionForm.hxx +++ b/src/BRepFeat/BRepFeat_MakeRevolutionForm.hxx @@ -29,10 +29,8 @@ #include #include class Geom_Plane; -class Standard_ConstructionError; class TopoDS_Shape; class TopoDS_Wire; -class gp_Ax1; class TopoDS_Edge; class TopoDS_Face; class gp_Pnt; diff --git a/src/BRepFeat/BRepFeat_RibSlot.hxx b/src/BRepFeat/BRepFeat_RibSlot.hxx index 33036ebb18..e8160baaef 100644 --- a/src/BRepFeat/BRepFeat_RibSlot.hxx +++ b/src/BRepFeat/BRepFeat_RibSlot.hxx @@ -34,12 +34,9 @@ #include #include #include -class TopoDS_Shape; -class gp_Pnt; class TopoDS_Edge; class Geom_Plane; class gp_Dir; -class TopoDS_Face; class Geom_Curve; class TopoDS_Vertex; class LocOpe_Gluer; diff --git a/src/BRepFeat/BRepFeat_SplitShape.hxx b/src/BRepFeat/BRepFeat_SplitShape.hxx index e38edf2d5e..406a7c4d25 100644 --- a/src/BRepFeat/BRepFeat_SplitShape.hxx +++ b/src/BRepFeat/BRepFeat_SplitShape.hxx @@ -28,9 +28,6 @@ #include class LocOpe_WiresOnShape; -class StdFail_NotDone; -class Standard_ConstructionError; -class Standard_NoSuchObject; class TopoDS_Shape; class TopoDS_Wire; class TopoDS_Face; diff --git a/src/BRepFill/BRepFill.hxx b/src/BRepFill/BRepFill.hxx index 1e4762947a..ad592c45e9 100644 --- a/src/BRepFill/BRepFill.hxx +++ b/src/BRepFill/BRepFill.hxx @@ -32,34 +32,6 @@ class TopoDS_Shape; class gp_Ax3; class gp_Pnt; class gp_Vec; -class BRepFill_Generator; -class BRepFill_SectionLaw; -class BRepFill_ShapeLaw; -class BRepFill_NSections; -class BRepFill_Draft; -class BRepFill_LocationLaw; -class BRepFill_DraftLaw; -class BRepFill_Edge3DLaw; -class BRepFill_EdgeOnSurfLaw; -class BRepFill_ACRLaw; -class BRepFill_Pipe; -class BRepFill_PipeShell; -class BRepFill_Evolved; -class BRepFill_Sweep; -class BRepFill_CompatibleWires; -class BRepFill_OffsetWire; -class BRepFill_OffsetAncestors; -class BRepFill_ApproxSeewing; -class BRepFill_ComputeCLine; -class BRepFill_TrimSurfaceTool; -class BRepFill_TrimEdgeTool; -class BRepFill_SectionPlacement; -class BRepFill_Section; -class BRepFill_TrimShellCorner; -class BRepFill_CurveConstraint; -class BRepFill_Filling; -class BRepFill_FaceAndOrder; -class BRepFill_EdgeFaceAndOrder; diff --git a/src/BRepFill/BRepFill_ApproxSeewing.hxx b/src/BRepFill/BRepFill_ApproxSeewing.hxx index feb7ce2405..89fe6fb864 100644 --- a/src/BRepFill/BRepFill_ApproxSeewing.hxx +++ b/src/BRepFill/BRepFill_ApproxSeewing.hxx @@ -25,7 +25,6 @@ #include class Geom_Curve; class Geom2d_Curve; -class StdFail_NotDone; //! Evaluate the 3dCurve and the PCurves described in a MultiLine from BRepFill. diff --git a/src/BRepFill/BRepFill_CompatibleWires.hxx b/src/BRepFill/BRepFill_CompatibleWires.hxx index 1369b11817..ace76b4fef 100644 --- a/src/BRepFill/BRepFill_CompatibleWires.hxx +++ b/src/BRepFill/BRepFill_CompatibleWires.hxx @@ -26,8 +26,6 @@ #include #include #include -class Standard_ConstructionError; -class Standard_NoSuchObject; class TopoDS_Edge; diff --git a/src/BRepFill/BRepFill_CurveConstraint.hxx b/src/BRepFill/BRepFill_CurveConstraint.hxx index acc2a087d9..d967011775 100644 --- a/src/BRepFill/BRepFill_CurveConstraint.hxx +++ b/src/BRepFill/BRepFill_CurveConstraint.hxx @@ -23,7 +23,6 @@ #include #include #include -class Standard_ConstructionError; class BRepFill_CurveConstraint; DEFINE_STANDARD_HANDLE(BRepFill_CurveConstraint, GeomPlate_CurveConstraint) diff --git a/src/BRepFill/BRepFill_Draft.hxx b/src/BRepFill/BRepFill_Draft.hxx index d7d7f15fdd..4ea1c49833 100644 --- a/src/BRepFill/BRepFill_Draft.hxx +++ b/src/BRepFill/BRepFill_Draft.hxx @@ -30,11 +30,7 @@ #include class BRepFill_DraftLaw; class BRepFill_SectionLaw; -class StdFail_NotDone; -class TopoDS_Shape; -class gp_Dir; class Geom_Surface; -class TopoDS_Shell; class Bnd_Box; diff --git a/src/BRepFill/BRepFill_EdgeFaceAndOrder.hxx b/src/BRepFill/BRepFill_EdgeFaceAndOrder.hxx index 0836750589..f01c94b1e7 100644 --- a/src/BRepFill/BRepFill_EdgeFaceAndOrder.hxx +++ b/src/BRepFill/BRepFill_EdgeFaceAndOrder.hxx @@ -24,9 +24,6 @@ #include #include #include -class BRepFill_Filling; -class TopoDS_Edge; -class TopoDS_Face; diff --git a/src/BRepFill/BRepFill_Evolved.hxx b/src/BRepFill/BRepFill_Evolved.hxx index d1cd99df49..a386af2a30 100644 --- a/src/BRepFill/BRepFill_Evolved.hxx +++ b/src/BRepFill/BRepFill_Evolved.hxx @@ -29,12 +29,7 @@ #include #include #include -class Standard_ConstructionError; -class Standard_NoSuchObject; -class TopoDS_Wire; class gp_Ax3; -class TopoDS_Face; -class TopoDS_Shape; class BRepMAT2d_BisectingLocus; class BRepMAT2d_LinkTopoBilo; class BRepTools_Quilt; diff --git a/src/BRepFill/BRepFill_FaceAndOrder.hxx b/src/BRepFill/BRepFill_FaceAndOrder.hxx index 876f468681..d592f04ae9 100644 --- a/src/BRepFill/BRepFill_FaceAndOrder.hxx +++ b/src/BRepFill/BRepFill_FaceAndOrder.hxx @@ -23,8 +23,6 @@ #include #include -class BRepFill_Filling; -class TopoDS_Face; //! A structure containing Face and Order of constraint diff --git a/src/BRepFill/BRepFill_Generator.hxx b/src/BRepFill/BRepFill_Generator.hxx index 331ea1d111..cb842869ab 100644 --- a/src/BRepFill/BRepFill_Generator.hxx +++ b/src/BRepFill/BRepFill_Generator.hxx @@ -26,7 +26,6 @@ #include #include class TopoDS_Wire; -class TopoDS_Shell; class TopoDS_Shape; diff --git a/src/BRepFill/BRepFill_LocationLaw.hxx b/src/BRepFill/BRepFill_LocationLaw.hxx index 9e4bb47d97..4f3effc644 100644 --- a/src/BRepFill/BRepFill_LocationLaw.hxx +++ b/src/BRepFill/BRepFill_LocationLaw.hxx @@ -31,8 +31,6 @@ #include #include #include -class Standard_OutOfRange; -class TopoDS_Wire; class GeomFill_LocationLaw; class TopoDS_Edge; class TopoDS_Vertex; diff --git a/src/BRepFill/BRepFill_MultiLine.hxx b/src/BRepFill/BRepFill_MultiLine.hxx index 8969b71936..cf7899fb2e 100644 --- a/src/BRepFill/BRepFill_MultiLine.hxx +++ b/src/BRepFill/BRepFill_MultiLine.hxx @@ -31,8 +31,6 @@ #include #include -class Standard_DomainError; -class TopoDS_Face; class TopoDS_Edge; class Geom2d_Curve; class Geom_Curve; diff --git a/src/BRepFill/BRepFill_OffsetAncestors.hxx b/src/BRepFill/BRepFill_OffsetAncestors.hxx index 188787d5a0..9155b80322 100644 --- a/src/BRepFill/BRepFill_OffsetAncestors.hxx +++ b/src/BRepFill/BRepFill_OffsetAncestors.hxx @@ -23,7 +23,6 @@ #include #include -class StdFail_NotDone; class BRepFill_OffsetWire; class TopoDS_Edge; class TopoDS_Shape; diff --git a/src/BRepFill/BRepFill_OffsetWire.hxx b/src/BRepFill/BRepFill_OffsetWire.hxx index 30f7d3fd68..a0c3865cb6 100644 --- a/src/BRepFill/BRepFill_OffsetWire.hxx +++ b/src/BRepFill/BRepFill_OffsetWire.hxx @@ -34,12 +34,6 @@ #include #include #include -class Standard_ConstructionError; -class Standard_NoSuchObject; -class TopoDS_Face; -class BRepMAT2d_BisectingLocus; -class BRepMAT2d_LinkTopoBilo; -class TopoDS_Shape; class Bisector_Bisec; class BRepFill_TrimEdgeTool; diff --git a/src/BRepFill/BRepFill_Pipe.hxx b/src/BRepFill/BRepFill_Pipe.hxx index 5bbd653a41..26717bcd51 100644 --- a/src/BRepFill/BRepFill_Pipe.hxx +++ b/src/BRepFill/BRepFill_Pipe.hxx @@ -34,10 +34,6 @@ #include #include class BRepFill_LocationLaw; -class Standard_DomainError; -class StdFail_NotDone; -class TopoDS_Wire; -class TopoDS_Shape; class TopoDS_Face; class TopoDS_Edge; class TopoDS_Vertex; diff --git a/src/BRepFill/BRepFill_PipeShell.hxx b/src/BRepFill/BRepFill_PipeShell.hxx index 454ba457b0..89b8b10c50 100644 --- a/src/BRepFill/BRepFill_PipeShell.hxx +++ b/src/BRepFill/BRepFill_PipeShell.hxx @@ -39,14 +39,9 @@ class Law_Function; class BRepFill_LocationLaw; class BRepFill_SectionLaw; -class Standard_DomainError; -class StdFail_NotDone; -class TopoDS_Wire; class gp_Ax2; class gp_Dir; -class TopoDS_Shape; class TopoDS_Vertex; -class BRepFill_Section; class gp_Trsf; class BRepFill_Sweep; diff --git a/src/BRepFill/BRepFill_Section.hxx b/src/BRepFill/BRepFill_Section.hxx index 10acf1decc..f9bf2892d2 100644 --- a/src/BRepFill/BRepFill_Section.hxx +++ b/src/BRepFill/BRepFill_Section.hxx @@ -24,9 +24,6 @@ #include #include #include -class TopoDS_Shape; -class TopoDS_Vertex; -class TopoDS_Wire; //! To store section definition diff --git a/src/BRepFill/BRepFill_SectionPlacement.hxx b/src/BRepFill/BRepFill_SectionPlacement.hxx index 5b1f891f02..d691ec9966 100644 --- a/src/BRepFill/BRepFill_SectionPlacement.hxx +++ b/src/BRepFill/BRepFill_SectionPlacement.hxx @@ -27,8 +27,6 @@ #include #include class BRepFill_LocationLaw; -class TopoDS_Shape; -class gp_Trsf; //! Place a shape in a local axis coordinate diff --git a/src/BRepFill/BRepFill_ShapeLaw.hxx b/src/BRepFill/BRepFill_ShapeLaw.hxx index 2b0a5e1b87..43adea9134 100644 --- a/src/BRepFill/BRepFill_ShapeLaw.hxx +++ b/src/BRepFill/BRepFill_ShapeLaw.hxx @@ -31,7 +31,6 @@ class Law_Function; class TopoDS_Vertex; class TopoDS_Wire; class GeomFill_SectionLaw; -class TopoDS_Shape; class TopoDS_Edge; diff --git a/src/BRepFill/BRepFill_Sweep.hxx b/src/BRepFill/BRepFill_Sweep.hxx index a7a18f8425..8f5fbec144 100644 --- a/src/BRepFill/BRepFill_Sweep.hxx +++ b/src/BRepFill/BRepFill_Sweep.hxx @@ -36,11 +36,6 @@ #include class BRepFill_LocationLaw; class BRepFill_SectionLaw; -class StdFail_NotDone; -class Standard_OutOfRange; -class Standard_ConstructionError; -class TopoDS_Wire; -class TopoDS_Shape; class TopoDS_Edge; diff --git a/src/BRepFill/BRepFill_TrimEdgeTool.hxx b/src/BRepFill/BRepFill_TrimEdgeTool.hxx index 3188feed15..b0979f165b 100644 --- a/src/BRepFill/BRepFill_TrimEdgeTool.hxx +++ b/src/BRepFill/BRepFill_TrimEdgeTool.hxx @@ -29,12 +29,10 @@ #include #include class Geom2d_Curve; -class Bisector_Bisec; class Geom2d_Geometry; class TopoDS_Edge; class TopoDS_Shape; class TopoDS_Vertex; -class gp_Pnt2d; //! Geometric Tool using to construct Offset Wires. diff --git a/src/BRepFill/BRepFill_TrimShellCorner.hxx b/src/BRepFill/BRepFill_TrimShellCorner.hxx index df78dfef0b..1d5e9a0fb6 100644 --- a/src/BRepFill/BRepFill_TrimShellCorner.hxx +++ b/src/BRepFill/BRepFill_TrimShellCorner.hxx @@ -31,10 +31,6 @@ #include #include #include -class gp_Ax2; -class TopoDS_Face; -class TopoDS_Wire; -class TopoDS_Shape; //! Trims sets of faces in the corner to make proper parts of pipe diff --git a/src/BRepFill/BRepFill_TrimSurfaceTool.hxx b/src/BRepFill/BRepFill_TrimSurfaceTool.hxx index aa96957629..9767e69a3b 100644 --- a/src/BRepFill/BRepFill_TrimSurfaceTool.hxx +++ b/src/BRepFill/BRepFill_TrimSurfaceTool.hxx @@ -28,9 +28,6 @@ #include #include class Geom2d_Curve; -class Standard_NoSuchObject; -class TopoDS_Face; -class TopoDS_Edge; class gp_Pnt2d; class Geom_Curve; diff --git a/src/BRepFilletAPI/BRepFilletAPI_MakeChamfer.hxx b/src/BRepFilletAPI/BRepFilletAPI_MakeChamfer.hxx index b13cc67e3c..5850a8d6cd 100644 --- a/src/BRepFilletAPI/BRepFilletAPI_MakeChamfer.hxx +++ b/src/BRepFilletAPI/BRepFilletAPI_MakeChamfer.hxx @@ -29,7 +29,6 @@ #include #include #include -class StdFail_NotDone; class TopoDS_Shape; class TopoDS_Edge; class TopoDS_Face; diff --git a/src/BRepFilletAPI/BRepFilletAPI_MakeFillet.hxx b/src/BRepFilletAPI/BRepFilletAPI_MakeFillet.hxx index 1d4dee1bab..36585fda23 100644 --- a/src/BRepFilletAPI/BRepFilletAPI_MakeFillet.hxx +++ b/src/BRepFilletAPI/BRepFilletAPI_MakeFillet.hxx @@ -33,8 +33,6 @@ #include #include #include -class StdFail_NotDone; -class Standard_NoSuchObject; class TopoDS_Shape; class TopoDS_Edge; class Law_Function; diff --git a/src/BRepMesh/BRepMesh_BaseMeshAlgo.hxx b/src/BRepMesh/BRepMesh_BaseMeshAlgo.hxx index c2d38eeaed..86fc25e91c 100644 --- a/src/BRepMesh/BRepMesh_BaseMeshAlgo.hxx +++ b/src/BRepMesh/BRepMesh_BaseMeshAlgo.hxx @@ -23,7 +23,6 @@ #include class BRepMesh_DataStructureOfDelaun; -class BRepMesh_Delaun; //! Class provides base functionality for algorithms building face triangulation. //! Performs initialization of BRepMesh_DataStructureOfDelaun and nodes map structures. diff --git a/src/BRepMesh/BRepMesh_ConstrainedBaseMeshAlgo.hxx b/src/BRepMesh/BRepMesh_ConstrainedBaseMeshAlgo.hxx index 87405592a6..ea21bdda16 100644 --- a/src/BRepMesh/BRepMesh_ConstrainedBaseMeshAlgo.hxx +++ b/src/BRepMesh/BRepMesh_ConstrainedBaseMeshAlgo.hxx @@ -20,7 +20,6 @@ #include #include -class BRepMesh_DataStructureOfDelaun; class BRepMesh_Delaun; //! Class provides base functionality to build face triangulation using Dealunay approach. diff --git a/src/BRepMesh/BRepMesh_CurveTessellator.hxx b/src/BRepMesh/BRepMesh_CurveTessellator.hxx index b4c043a103..ddf3bcfa52 100644 --- a/src/BRepMesh/BRepMesh_CurveTessellator.hxx +++ b/src/BRepMesh/BRepMesh_CurveTessellator.hxx @@ -22,7 +22,6 @@ #include #include -class TopoDS_Face; class Geom_Surface; class Geom2d_Curve; struct IMeshTools_Parameters; diff --git a/src/BRepMesh/BRepMesh_CustomBaseMeshAlgo.hxx b/src/BRepMesh/BRepMesh_CustomBaseMeshAlgo.hxx index 6282074d25..bfeba79de4 100644 --- a/src/BRepMesh/BRepMesh_CustomBaseMeshAlgo.hxx +++ b/src/BRepMesh/BRepMesh_CustomBaseMeshAlgo.hxx @@ -23,7 +23,6 @@ #include #include -class BRepMesh_DataStructureOfDelaun; //! Class provides base functionality to build face triangulation using custom triangulation algorithm. //! Performs generation of mesh using raw data from model. diff --git a/src/BRepMesh/BRepMesh_DataStructureOfDelaun.hxx b/src/BRepMesh/BRepMesh_DataStructureOfDelaun.hxx index 0a4a119185..86457a0f8f 100644 --- a/src/BRepMesh/BRepMesh_DataStructureOfDelaun.hxx +++ b/src/BRepMesh/BRepMesh_DataStructureOfDelaun.hxx @@ -21,7 +21,6 @@ #include #include -class BRepMesh_Vertex; class BRepMesh_Edge; //! Describes the data structure necessary for the mesh algorithms in diff --git a/src/BRepMesh/BRepMesh_Deflection.hxx b/src/BRepMesh/BRepMesh_Deflection.hxx index 9c15607673..015670603b 100644 --- a/src/BRepMesh/BRepMesh_Deflection.hxx +++ b/src/BRepMesh/BRepMesh_Deflection.hxx @@ -21,9 +21,6 @@ #include #include -class Bnd_Box; -class TopoDS_Face; -class TopoDS_Edge; struct IMeshTools_Parameters; //! Auxiliary tool encompassing methods to compute deflection of shapes. diff --git a/src/BRepMesh/BRepMesh_DelabellaBaseMeshAlgo.hxx b/src/BRepMesh/BRepMesh_DelabellaBaseMeshAlgo.hxx index 9d6f2e156a..0f4af0f2c7 100644 --- a/src/BRepMesh/BRepMesh_DelabellaBaseMeshAlgo.hxx +++ b/src/BRepMesh/BRepMesh_DelabellaBaseMeshAlgo.hxx @@ -20,8 +20,6 @@ #include #include -class BRepMesh_DataStructureOfDelaun; -class BRepMesh_Delaun; //! Class provides base functionality to build face triangulation using Delabella project. //! Performs generation of mesh using raw data from model. diff --git a/src/BRepMesh/BRepMesh_DelaunayBaseMeshAlgo.hxx b/src/BRepMesh/BRepMesh_DelaunayBaseMeshAlgo.hxx index 5cfdc31aaa..093d668758 100644 --- a/src/BRepMesh/BRepMesh_DelaunayBaseMeshAlgo.hxx +++ b/src/BRepMesh/BRepMesh_DelaunayBaseMeshAlgo.hxx @@ -20,8 +20,6 @@ #include #include -class BRepMesh_DataStructureOfDelaun; -class BRepMesh_Delaun; //! Class provides base functionality to build face triangulation using Dealunay approach. //! Performs generation of mesh using raw data from model. diff --git a/src/BRepMesh/BRepMesh_GeomTool.hxx b/src/BRepMesh/BRepMesh_GeomTool.hxx index 071e964850..9b185e9803 100644 --- a/src/BRepMesh/BRepMesh_GeomTool.hxx +++ b/src/BRepMesh/BRepMesh_GeomTool.hxx @@ -21,9 +21,7 @@ #include class BRepAdaptor_Curve; -class gp_Pnt; class gp_Pnt2d; -class gp_Dir; class BRepMesh_DefaultRangeSplitter; //! Tool class accumulating common geometrical functions as well as diff --git a/src/BRepMesh/BRepMesh_ShapeVisitor.hxx b/src/BRepMesh/BRepMesh_ShapeVisitor.hxx index 9a1e0c0ece..5e96aa1bea 100644 --- a/src/BRepMesh/BRepMesh_ShapeVisitor.hxx +++ b/src/BRepMesh/BRepMesh_ShapeVisitor.hxx @@ -26,8 +26,6 @@ class TopoDS_Face; class TopoDS_Edge; class TopoDS_Wire; -class IMeshTools_Context; -class IMeshData_Wire; //! Builds discrete model of a shape by adding faces and free edges. //! Computes deflection for corresponded shape and checks whether it diff --git a/src/BRepMesh/BRepMesh_VertexTool.hxx b/src/BRepMesh/BRepMesh_VertexTool.hxx index 094021e8e0..cdf10a6594 100644 --- a/src/BRepMesh/BRepMesh_VertexTool.hxx +++ b/src/BRepMesh/BRepMesh_VertexTool.hxx @@ -21,7 +21,6 @@ #include #include -class BRepMesh_Vertex; //! Describes data structure intended to keep mesh nodes //! defined in UV space and implements functionality diff --git a/src/BiTgte/BiTgte_Blend.hxx b/src/BiTgte/BiTgte_Blend.hxx index be9bacdbcd..39a07e83b7 100644 --- a/src/BiTgte/BiTgte_Blend.hxx +++ b/src/BiTgte/BiTgte_Blend.hxx @@ -38,9 +38,6 @@ #include #include class BRepAlgo_AsDes; -class StdFail_NotDone; -class Standard_OutOfRange; -class TopoDS_Shape; class TopoDS_Face; class TopoDS_Edge; class Geom_Surface; diff --git a/src/BiTgte/BiTgte_CurveOnEdge.hxx b/src/BiTgte/BiTgte_CurveOnEdge.hxx index d1b3142fc6..125f7e1b0b 100644 --- a/src/BiTgte/BiTgte_CurveOnEdge.hxx +++ b/src/BiTgte/BiTgte_CurveOnEdge.hxx @@ -31,14 +31,9 @@ #include #include class Geom_Curve; -class Standard_OutOfRange; -class Standard_NoSuchObject; -class Standard_DomainError; -class TopoDS_Edge; class gp_Pnt; class gp_Vec; class gp_Lin; -class gp_Circ; class gp_Elips; class gp_Hypr; class gp_Parab; diff --git a/src/BiTgte/BiTgte_CurveOnVertex.hxx b/src/BiTgte/BiTgte_CurveOnVertex.hxx index e72e2f6f1d..399287fb1f 100644 --- a/src/BiTgte/BiTgte_CurveOnVertex.hxx +++ b/src/BiTgte/BiTgte_CurveOnVertex.hxx @@ -29,12 +29,8 @@ #include #include #include -class Standard_OutOfRange; -class Standard_NoSuchObject; -class Standard_DomainError; class TopoDS_Edge; class TopoDS_Vertex; -class gp_Pnt; class gp_Vec; class gp_Lin; class gp_Circ; diff --git a/src/BinDrivers/BinDrivers.hxx b/src/BinDrivers/BinDrivers.hxx index 79413b560d..142b1d5b65 100644 --- a/src/BinDrivers/BinDrivers.hxx +++ b/src/BinDrivers/BinDrivers.hxx @@ -22,9 +22,6 @@ class Standard_Transient; class Standard_GUID; class BinMDF_ADriverTable; class Message_Messenger; -class TCollection_AsciiString; -class BinDrivers_DocumentStorageDriver; -class BinDrivers_DocumentRetrievalDriver; class TDocStd_Application; class BinDrivers diff --git a/src/BinMDataXtd/BinMDataXtd.hxx b/src/BinMDataXtd/BinMDataXtd.hxx index d2cb914cc0..f6ad616c46 100644 --- a/src/BinMDataXtd/BinMDataXtd.hxx +++ b/src/BinMDataXtd/BinMDataXtd.hxx @@ -23,10 +23,6 @@ #include class BinMDF_ADriverTable; class Message_Messenger; -class BinMDataXtd_GeometryDriver; -class BinMDataXtd_ConstraintDriver; -class BinMDataXtd_PatternStdDriver; -class BinMDataXtd_TriangulationDriver; //! Storage and Retrieval drivers for modelling attributes. class BinMDataXtd diff --git a/src/BinMNaming/BinMNaming.hxx b/src/BinMNaming/BinMNaming.hxx index efb2e7cf06..e3c8ab5be3 100644 --- a/src/BinMNaming/BinMNaming.hxx +++ b/src/BinMNaming/BinMNaming.hxx @@ -23,8 +23,6 @@ #include class BinMDF_ADriverTable; class Message_Messenger; -class BinMNaming_NamedShapeDriver; -class BinMNaming_NamingDriver; //! Storage/Retrieval drivers for TNaming attributes diff --git a/src/BinMXCAFDoc/BinMXCAFDoc.hxx b/src/BinMXCAFDoc/BinMXCAFDoc.hxx index c72f85330f..45652b2b8f 100644 --- a/src/BinMXCAFDoc/BinMXCAFDoc.hxx +++ b/src/BinMXCAFDoc/BinMXCAFDoc.hxx @@ -22,14 +22,6 @@ class BinMDF_ADriverTable; class Message_Messenger; -class BinMXCAFDoc_CentroidDriver; -class BinMXCAFDoc_ColorDriver; -class BinMXCAFDoc_GraphNodeDriver; -class BinMXCAFDoc_LengthUnitDriver; -class BinMXCAFDoc_LocationDriver; -class BinMXCAFDoc_DatumDriver; -class BinMXCAFDoc_DimTolDriver; -class BinMXCAFDoc_MaterialDriver; diff --git a/src/Blend/Blend_AppFunction.hxx b/src/Blend/Blend_AppFunction.hxx index 3a21f33719..9fe4641dc5 100644 --- a/src/Blend/Blend_AppFunction.hxx +++ b/src/Blend/Blend_AppFunction.hxx @@ -33,7 +33,6 @@ #include #include #include -class Standard_DomainError; class math_Matrix; class gp_Pnt; class Blend_Point; diff --git a/src/Blend/Blend_CSFunction.hxx b/src/Blend/Blend_CSFunction.hxx index 3cf7193960..b2d69af59b 100644 --- a/src/Blend/Blend_CSFunction.hxx +++ b/src/Blend/Blend_CSFunction.hxx @@ -32,7 +32,6 @@ #include #include #include -class Standard_DomainError; class math_Matrix; class gp_Pnt; class gp_Pnt2d; diff --git a/src/Blend/Blend_Function.hxx b/src/Blend/Blend_Function.hxx index 62d4d53e30..75ca69f7f1 100644 --- a/src/Blend/Blend_Function.hxx +++ b/src/Blend/Blend_Function.hxx @@ -32,8 +32,6 @@ #include #include #include -class Standard_DomainError; -class math_Matrix; class gp_Pnt; class gp_Vec; class gp_Vec2d; diff --git a/src/Blend/Blend_Point.hxx b/src/Blend/Blend_Point.hxx index 685d510d24..e84ddabee4 100644 --- a/src/Blend/Blend_Point.hxx +++ b/src/Blend/Blend_Point.hxx @@ -26,9 +26,6 @@ #include #include #include -class Standard_DomainError; -class gp_Pnt; -class gp_Vec; class gp_Vec2d; diff --git a/src/Blend/Blend_RstRstFunction.hxx b/src/Blend/Blend_RstRstFunction.hxx index f3512aabee..a100eb2355 100644 --- a/src/Blend/Blend_RstRstFunction.hxx +++ b/src/Blend/Blend_RstRstFunction.hxx @@ -33,7 +33,6 @@ #include #include #include -class Standard_DomainError; class math_Matrix; class gp_Pnt; class gp_Pnt2d; diff --git a/src/Blend/Blend_SurfRstFunction.hxx b/src/Blend/Blend_SurfRstFunction.hxx index a35a7ffaff..9c9ff6cec6 100644 --- a/src/Blend/Blend_SurfRstFunction.hxx +++ b/src/Blend/Blend_SurfRstFunction.hxx @@ -32,7 +32,6 @@ #include #include #include -class Standard_DomainError; class math_Matrix; class gp_Pnt; class gp_Pnt2d; diff --git a/src/BlendFunc/BlendFunc.hxx b/src/BlendFunc/BlendFunc.hxx index 7c3b2720d0..a4f32032f1 100644 --- a/src/BlendFunc/BlendFunc.hxx +++ b/src/BlendFunc/BlendFunc.hxx @@ -26,20 +26,6 @@ class gp_Pnt2d; class gp_Vec; -class BlendFunc_ConstRad; -class BlendFunc_ConstRadInv; -class BlendFunc_Ruled; -class BlendFunc_RuledInv; -class BlendFunc_EvolRad; -class BlendFunc_EvolRadInv; -class BlendFunc_CSConstRad; -class BlendFunc_CSCircular; -class BlendFunc_Corde; -class BlendFunc_Chamfer; -class BlendFunc_ChamfInv; -class BlendFunc_ChAsym; -class BlendFunc_ChAsymInv; -class BlendFunc_Tensor; //! This package provides a set of generic functions, that can diff --git a/src/BlendFunc/BlendFunc_ChAsym.hxx b/src/BlendFunc/BlendFunc_ChAsym.hxx index 701d8de768..96a82758bd 100644 --- a/src/BlendFunc/BlendFunc_ChAsym.hxx +++ b/src/BlendFunc/BlendFunc_ChAsym.hxx @@ -32,7 +32,6 @@ #include #include -class math_Matrix; class gp_Lin; class Blend_Point; diff --git a/src/BlendFunc/BlendFunc_Chamfer.hxx b/src/BlendFunc/BlendFunc_Chamfer.hxx index 13a1701564..050c9ad05d 100644 --- a/src/BlendFunc/BlendFunc_Chamfer.hxx +++ b/src/BlendFunc/BlendFunc_Chamfer.hxx @@ -33,8 +33,6 @@ class math_Matrix; class gp_Pnt; class gp_Vec; class gp_Vec2d; -class gp_Lin; -class Blend_Point; //! Class for a function used to compute a "ordinary" chamfer: //! when distances from spine to surfaces are constant diff --git a/src/BlendFunc/BlendFunc_ConstRad.hxx b/src/BlendFunc/BlendFunc_ConstRad.hxx index d374daa1c0..f69b58819e 100644 --- a/src/BlendFunc/BlendFunc_ConstRad.hxx +++ b/src/BlendFunc/BlendFunc_ConstRad.hxx @@ -35,7 +35,6 @@ #include #include -class math_Matrix; class gp_Circ; class Blend_Point; class gp_Ax1; diff --git a/src/BlendFunc/BlendFunc_ConstThroat.hxx b/src/BlendFunc/BlendFunc_ConstThroat.hxx index 2a278df399..5b5a032fa5 100644 --- a/src/BlendFunc/BlendFunc_ConstThroat.hxx +++ b/src/BlendFunc/BlendFunc_ConstThroat.hxx @@ -27,8 +27,6 @@ #include class math_Matrix; -class gp_Lin; -class Blend_Point; //! Class for a function used to compute a symmetric chamfer //! with constant throat that is the height of isosceles triangle in section diff --git a/src/BlendFunc/BlendFunc_ConstThroatWithPenetration.hxx b/src/BlendFunc/BlendFunc_ConstThroatWithPenetration.hxx index be3ef783cb..b2e8cc12d2 100644 --- a/src/BlendFunc/BlendFunc_ConstThroatWithPenetration.hxx +++ b/src/BlendFunc/BlendFunc_ConstThroatWithPenetration.hxx @@ -27,8 +27,6 @@ #include class math_Matrix; -class gp_Lin; -class Blend_Point; //! Class for a function used to compute a chamfer with constant throat: //! the section of chamfer is right-angled triangle, diff --git a/src/BlendFunc/BlendFunc_EvolRad.hxx b/src/BlendFunc/BlendFunc_EvolRad.hxx index c632bf7e76..779b6ec62d 100644 --- a/src/BlendFunc/BlendFunc_EvolRad.hxx +++ b/src/BlendFunc/BlendFunc_EvolRad.hxx @@ -36,7 +36,6 @@ #include class Law_Function; -class math_Matrix; class gp_Circ; class Blend_Point; diff --git a/src/BlendFunc/BlendFunc_Tensor.hxx b/src/BlendFunc/BlendFunc_Tensor.hxx index 136a97c69d..384112c405 100644 --- a/src/BlendFunc/BlendFunc_Tensor.hxx +++ b/src/BlendFunc/BlendFunc_Tensor.hxx @@ -25,8 +25,6 @@ #include #include #include -class Standard_DimensionError; -class Standard_RangeError; class math_Matrix; From 956d91571cedc6b86e335ed2849251f6064829c5 Mon Sep 17 00:00:00 2001 From: achesnok Date: Sat, 2 Oct 2021 16:33:48 +0300 Subject: [PATCH 088/639] 0032591: Visualization, V3d_View - improve corner gradient - Added new shader for correct Aspect_GradientFillMethod_Corner mode shading. --- src/Graphic3d/Graphic3d_ShaderManager.cxx | 34 +++++++ src/Graphic3d/Graphic3d_ShaderManager.hxx | 3 + src/OpenGl/OpenGl_BackgroundArray.cxx | 110 ++++++++++------------ src/OpenGl/OpenGl_ShaderManager.cxx | 13 +++ src/OpenGl/OpenGl_ShaderManager.hxx | 8 +- src/OpenGl/OpenGl_View.cxx | 35 +++++-- src/OpenGl/OpenGl_View.hxx | 1 + 7 files changed, 137 insertions(+), 67 deletions(-) diff --git a/src/Graphic3d/Graphic3d_ShaderManager.cxx b/src/Graphic3d/Graphic3d_ShaderManager.cxx index b9ee57ee38..d6dfb378b5 100644 --- a/src/Graphic3d/Graphic3d_ShaderManager.cxx +++ b/src/Graphic3d/Graphic3d_ShaderManager.cxx @@ -2093,3 +2093,37 @@ Handle(Graphic3d_ShaderProgram) Graphic3d_ShaderManager::getBgCubeMapProgram() c aProgSrc->AttachShader (Graphic3d_ShaderObject::CreateFromSource (aSrcFrag, Graphic3d_TOS_FRAGMENT, aUniforms, aStageInOuts)); return aProgSrc; } + +// ======================================================================= +// function : getColoredQuadProgram +// purpose : +// ======================================================================= +Handle(Graphic3d_ShaderProgram) Graphic3d_ShaderManager::getColoredQuadProgram() const +{ + Handle(Graphic3d_ShaderProgram) aProgSrc = new Graphic3d_ShaderProgram(); + + Graphic3d_ShaderObject::ShaderVariableList aUniforms, aStageInOuts; + aStageInOuts.Append (Graphic3d_ShaderObject::ShaderVariable ("vec2 TexCoord", Graphic3d_TOS_VERTEX | Graphic3d_TOS_FRAGMENT)); + aUniforms.Append (Graphic3d_ShaderObject::ShaderVariable ("vec3 uColor1", Graphic3d_TOS_FRAGMENT)); + aUniforms.Append (Graphic3d_ShaderObject::ShaderVariable ("vec3 uColor2", Graphic3d_TOS_FRAGMENT)); + + TCollection_AsciiString aSrcVert = TCollection_AsciiString() + + EOL"void main()" + EOL"{" + EOL" TexCoord = occTexCoord.st;" + EOL" gl_Position = occProjectionMatrix * occWorldViewMatrix * occModelWorldMatrix * occVertex;" + EOL"}"; + + TCollection_AsciiString aSrcFrag = TCollection_AsciiString() + + EOL"void main()" + EOL"{" + EOL" vec3 c1 = mix (uColor1, uColor2, TexCoord.x);" + EOL" occSetFragColor (vec4 (mix (uColor2, c1, TexCoord.y), 1.0));" + EOL"}"; + + defaultGlslVersion (aProgSrc, "colored_quad", 0); + aProgSrc->AttachShader (Graphic3d_ShaderObject::CreateFromSource (aSrcVert, Graphic3d_TOS_VERTEX, aUniforms, aStageInOuts)); + aProgSrc->AttachShader (Graphic3d_ShaderObject::CreateFromSource (aSrcFrag, Graphic3d_TOS_FRAGMENT, aUniforms, aStageInOuts)); + + return aProgSrc; +} diff --git a/src/Graphic3d/Graphic3d_ShaderManager.hxx b/src/Graphic3d/Graphic3d_ShaderManager.hxx index 5a4731acda..0619ea11e7 100644 --- a/src/Graphic3d/Graphic3d_ShaderManager.hxx +++ b/src/Graphic3d/Graphic3d_ShaderManager.hxx @@ -142,6 +142,9 @@ protected: //! Generates shader program to render environment cubemap as background. Standard_EXPORT Handle(Graphic3d_ShaderProgram) getBgCubeMapProgram() const; + //! Generates shader program to render correctly colored quad. + Standard_EXPORT Handle(Graphic3d_ShaderProgram) getColoredQuadProgram() const; + //! Prepare GLSL source for IBL generation used in PBR pipeline. Standard_EXPORT Handle(Graphic3d_ShaderProgram) getPBREnvBakingProgram (Standard_Integer theIndex) const; diff --git a/src/OpenGl/OpenGl_BackgroundArray.cxx b/src/OpenGl/OpenGl_BackgroundArray.cxx index cceff8f511..90dac5020d 100644 --- a/src/OpenGl/OpenGl_BackgroundArray.cxx +++ b/src/OpenGl/OpenGl_BackgroundArray.cxx @@ -209,13 +209,22 @@ Standard_Boolean OpenGl_BackgroundArray::createGradientArray (const Handle(OpenG { return Standard_False; } + if (!myIndices->Init(6)) + { + return Standard_False; + } + const unsigned short THE_FS_QUAD_TRIS[6] = {0, 1, 3, 1, 2, 3}; + for (unsigned int aVertIter = 0; aVertIter < 6; ++aVertIter) + { + myIndices->SetIndex (aVertIter, THE_FS_QUAD_TRIS[aVertIter]); + } OpenGl_Vec2 aVertices[4] = { OpenGl_Vec2(float(myViewWidth), 0.0f), OpenGl_Vec2(float(myViewWidth), float(myViewHeight)), - OpenGl_Vec2(0.0f, 0.0f), - OpenGl_Vec2(0.0f, float(myViewHeight)) + OpenGl_Vec2(0.0f, float(myViewHeight)), + OpenGl_Vec2(0.0f, 0.0f) }; float* aCorners[4] = {}; @@ -236,73 +245,65 @@ Standard_Boolean OpenGl_BackgroundArray::createGradientArray (const Handle(OpenG { aCorners[0] = myGradientParams.color2.ChangeData(); aCorners[1] = myGradientParams.color1.ChangeData(); - aCorners[2] = myGradientParams.color2.ChangeData(); - aCorners[3] = myGradientParams.color1.ChangeData(); + aCorners[2] = myGradientParams.color1.ChangeData(); + aCorners[3] = myGradientParams.color2.ChangeData(); break; } case Aspect_GradientFillMethod_Diagonal1: { aCorners[0] = myGradientParams.color2.ChangeData(); - aCorners[3] = myGradientParams.color1.ChangeData(); - aDiagCorner1[0] = aDiagCorner2[0] = 0.5f * (aCorners[0][0] + aCorners[3][0]); - aDiagCorner1[1] = aDiagCorner2[1] = 0.5f * (aCorners[0][1] + aCorners[3][1]); - aDiagCorner1[2] = aDiagCorner2[2] = 0.5f * (aCorners[0][2] + aCorners[3][2]); + aCorners[2] = myGradientParams.color1.ChangeData(); + aDiagCorner1[0] = aDiagCorner2[0] = 0.5f * (aCorners[0][0] + aCorners[2][0]); + aDiagCorner1[1] = aDiagCorner2[1] = 0.5f * (aCorners[0][1] + aCorners[2][1]); + aDiagCorner1[2] = aDiagCorner2[2] = 0.5f * (aCorners[0][2] + aCorners[2][2]); aCorners[1] = aDiagCorner1; - aCorners[2] = aDiagCorner2; + aCorners[3] = aDiagCorner2; break; } case Aspect_GradientFillMethod_Diagonal2: { aCorners[1] = myGradientParams.color1.ChangeData(); - aCorners[2] = myGradientParams.color2.ChangeData(); - aDiagCorner1[0] = aDiagCorner2[0] = 0.5f * (aCorners[1][0] + aCorners[2][0]); - aDiagCorner1[1] = aDiagCorner2[1] = 0.5f * (aCorners[1][1] + aCorners[2][1]); - aDiagCorner1[2] = aDiagCorner2[2] = 0.5f * (aCorners[1][2] + aCorners[2][2]); + aCorners[3] = myGradientParams.color2.ChangeData(); + aDiagCorner1[0] = aDiagCorner2[0] = 0.5f * (aCorners[1][0] + aCorners[3][0]); + aDiagCorner1[1] = aDiagCorner2[1] = 0.5f * (aCorners[1][1] + aCorners[3][1]); + aDiagCorner1[2] = aDiagCorner2[2] = 0.5f * (aCorners[1][2] + aCorners[3][2]); aCorners[0] = aDiagCorner1; - aCorners[3] = aDiagCorner2; + aCorners[2] = aDiagCorner2; break; } case Aspect_GradientFillMethod_Corner1: - { - aVertices[0] = OpenGl_Vec2(float(myViewWidth), float(myViewHeight)); - aVertices[1] = OpenGl_Vec2(0.0f, float(myViewHeight)); - aVertices[2] = OpenGl_Vec2(float(myViewWidth), 0.0f); - aVertices[3] = OpenGl_Vec2(0.0f, 0.0f); - - aCorners[0] = myGradientParams.color2.ChangeData(); - aCorners[1] = myGradientParams.color1.ChangeData(); - aCorners[2] = myGradientParams.color2.ChangeData(); - aCorners[3] = myGradientParams.color2.ChangeData(); - break; - } case Aspect_GradientFillMethod_Corner2: - { - aCorners[0] = myGradientParams.color2.ChangeData(); - aCorners[1] = myGradientParams.color1.ChangeData(); - aCorners[2] = myGradientParams.color2.ChangeData(); - aCorners[3] = myGradientParams.color2.ChangeData(); - break; - } case Aspect_GradientFillMethod_Corner3: - { - aVertices[0] = OpenGl_Vec2(float(myViewWidth), float(myViewHeight)); - aVertices[1] = OpenGl_Vec2(0.0f, float(myViewHeight)); - aVertices[2] = OpenGl_Vec2(float(myViewWidth), 0.0f); - aVertices[3] = OpenGl_Vec2(0.0f, 0.0f); - - aCorners[0] = myGradientParams.color2.ChangeData(); - aCorners[1] = myGradientParams.color2.ChangeData(); - aCorners[2] = myGradientParams.color1.ChangeData(); - aCorners[3] = myGradientParams.color2.ChangeData(); - break; - } case Aspect_GradientFillMethod_Corner4: { - aCorners[0] = myGradientParams.color2.ChangeData(); - aCorners[1] = myGradientParams.color2.ChangeData(); - aCorners[2] = myGradientParams.color1.ChangeData(); - aCorners[3] = myGradientParams.color2.ChangeData(); - break; + Graphic3d_Attribute aCornerAttribInfo[] = + { + { Graphic3d_TOA_POS, Graphic3d_TOD_VEC2 }, + { Graphic3d_TOA_UV, Graphic3d_TOD_VEC2 } + }; + + OpenGl_Vec2 anUVs[4] = + { + OpenGl_Vec2 (1.0f, 0.0f), + OpenGl_Vec2 (1.0f, 1.0f), + OpenGl_Vec2 (0.0f, 1.0f), + OpenGl_Vec2 (0.0f, 0.0f) + }; + + if (!myAttribs->Init (4, aCornerAttribInfo, 2)) + { + return Standard_False; + } + for (Standard_Integer anIt = 0; anIt < 4; ++anIt) + { + OpenGl_Vec2* aVertData = reinterpret_cast(myAttribs->changeValue (anIt)); + *aVertData = aVertices[anIt]; + + OpenGl_Vec2* anUvData = reinterpret_cast(myAttribs->changeValue (anIt) + myAttribs->AttributeOffset (1)); + // cyclically move highlighted corner depending on myGradientParams.type + *anUvData = anUVs[(anIt + myGradientParams.type - Aspect_GradientFillMethod_Corner1) % 4]; + } + return Standard_True; } case Aspect_GradientFillMethod_Elliptical: { @@ -365,15 +366,6 @@ Standard_Boolean OpenGl_BackgroundArray::createGradientArray (const Handle(OpenG *aColorData = theCtx->Vec4FromQuantityColor (OpenGl_Vec4(aCorners[anIt][0], aCorners[anIt][1], aCorners[anIt][2], 1.0f)).rgb(); } - if (!myIndices->Init(6)) - { - return Standard_False; - } - const unsigned short THE_FS_QUAD_TRIS[6] = {0, 1, 2, 1, 3, 2}; - for (unsigned int aVertIter = 0; aVertIter < 6; ++aVertIter) - { - myIndices->SetIndex (aVertIter, THE_FS_QUAD_TRIS[aVertIter]); - } return Standard_True; } diff --git a/src/OpenGl/OpenGl_ShaderManager.cxx b/src/OpenGl/OpenGl_ShaderManager.cxx index 4abc046bfe..04efdf9a1e 100644 --- a/src/OpenGl/OpenGl_ShaderManager.cxx +++ b/src/OpenGl/OpenGl_ShaderManager.cxx @@ -1397,6 +1397,19 @@ const Handle(Graphic3d_ShaderProgram)& OpenGl_ShaderManager::GetBgCubeMapProgram return myBgCubeMapProgram; } +// ======================================================================= +// function : GetColoredQuadProgram +// purpose : +// ======================================================================= +const Handle(Graphic3d_ShaderProgram)& OpenGl_ShaderManager::GetColoredQuadProgram () +{ + if (myColoredQuadProgram.IsNull()) + { + myColoredQuadProgram = getColoredQuadProgram(); + } + return myColoredQuadProgram; +} + // ======================================================================= // function : bindProgramWithState // purpose : diff --git a/src/OpenGl/OpenGl_ShaderManager.hxx b/src/OpenGl/OpenGl_ShaderManager.hxx index 464323e06e..44d07b4f2a 100644 --- a/src/OpenGl/OpenGl_ShaderManager.hxx +++ b/src/OpenGl/OpenGl_ShaderManager.hxx @@ -228,7 +228,10 @@ public: } //! Generates shader program to render environment cubemap as background. - Standard_EXPORT const Handle(Graphic3d_ShaderProgram)& GetBgCubeMapProgram (); + Standard_EXPORT const Handle(Graphic3d_ShaderProgram)& GetBgCubeMapProgram(); + + //! Generates shader program to render correctly colored quad. + Standard_EXPORT const Handle(Graphic3d_ShaderProgram)& GetColoredQuadProgram(); //! Resets PBR shading models to corresponding non-PBR ones if PBR is not allowed. static Graphic3d_TypeOfShadingModel PBRShadingModelFallback (Graphic3d_TypeOfShadingModel theShadingModel, @@ -769,7 +772,8 @@ protected: OpenGl_MapOfShaderPrograms myMapOfLightPrograms; //!< map of lighting programs depending on lights configuration Handle(OpenGl_ShaderProgram) myPBREnvBakingProgram[3]; //!< programs for IBL maps generation used in PBR pipeline (0 for Diffuse; 1 for Specular; 2 for fallback) - Handle(Graphic3d_ShaderProgram) myBgCubeMapProgram; //!< program for background cubemap rendering + Handle(Graphic3d_ShaderProgram) myBgCubeMapProgram; //!< program for background cubemap rendering + Handle(Graphic3d_ShaderProgram) myColoredQuadProgram; //!< program for correct quad rendering Handle(OpenGl_ShaderProgram) myStereoPrograms[Graphic3d_StereoMode_NB]; //!< standard stereo programs diff --git a/src/OpenGl/OpenGl_View.cxx b/src/OpenGl/OpenGl_View.cxx index 2bca09c991..a2d17ad6a5 100644 --- a/src/OpenGl/OpenGl_View.cxx +++ b/src/OpenGl/OpenGl_View.cxx @@ -127,10 +127,11 @@ OpenGl_View::OpenGl_View (const Handle(Graphic3d_StructureManager)& theMgr, myTransientDrawToFront (Standard_True), myBackBufferRestored (Standard_False), myIsImmediateDrawn (Standard_False), - myTextureParams (new OpenGl_Aspects()), - myCubeMapParams (new OpenGl_Aspects()), - myPBREnvState (OpenGl_PBREnvState_NONEXISTENT), - myPBREnvRequest (Standard_False), + myTextureParams (new OpenGl_Aspects()), + myCubeMapParams (new OpenGl_Aspects()), + myColoredQuadParams (new OpenGl_Aspects()), + myPBREnvState (OpenGl_PBREnvState_NONEXISTENT), + myPBREnvRequest (Standard_False), // ray-tracing fields initialization myRaytraceInitStatus (OpenGl_RT_NONE), myIsRaytraceDataValid (Standard_False), @@ -192,6 +193,7 @@ OpenGl_View::~OpenGl_View() OpenGl_Element::Destroy (NULL, myTextureParams); OpenGl_Element::Destroy (NULL, myCubeMapParams); + OpenGl_Element::Destroy (NULL, myColoredQuadParams); } // ======================================================================= @@ -541,7 +543,16 @@ void OpenGl_View::SetGradientBackground (const Aspect_GradientBackground& theBac Quantity_Color aColor1, aColor2; theBackground.Colors (aColor1, aColor2); myBackgrounds[Graphic3d_TOB_GRADIENT]->SetGradientParameters (aColor1, aColor2, theBackground.BgGradientFillMethod()); - + if (theBackground.BgGradientFillMethod() >= Aspect_GradientFillMethod_Corner1 + && theBackground.BgGradientFillMethod() <= Aspect_GradientFillMethod_Corner4) + { + if (const Handle(OpenGl_Context)& aCtx = myWorkspace->GetGlContext()) + { + myColoredQuadParams->Aspect()->SetShaderProgram(aCtx->ShaderManager()->GetColoredQuadProgram()); + myColoredQuadParams->Aspect()->ShaderProgram()->PushVariableVec3 ("uColor1", aColor1.Rgb()); + myColoredQuadParams->Aspect()->ShaderProgram()->PushVariableVec3 ("uColor2", aColor2.Rgb()); + } + } myBackgroundType = Graphic3d_TOB_GRADIENT; } @@ -1007,7 +1018,19 @@ void OpenGl_View::drawBackground (const Handle(OpenGl_Workspace)& theWorkspace, || myBackgrounds[Graphic3d_TOB_TEXTURE]->TextureFillMethod() == Aspect_FM_CENTERED || myBackgrounds[Graphic3d_TOB_TEXTURE]->TextureFillMethod() == Aspect_FM_NONE)) { - myBackgrounds[Graphic3d_TOB_GRADIENT]->Render(theWorkspace, theProjection); + if (myBackgrounds[Graphic3d_TOB_GRADIENT]->GradientFillMethod() >= Aspect_GradientFillMethod_Corner1 + && myBackgrounds[Graphic3d_TOB_GRADIENT]->GradientFillMethod() <= Aspect_GradientFillMethod_Corner4) + { + const OpenGl_Aspects* anOldAspectFace = theWorkspace->SetAspects (myColoredQuadParams); + + myBackgrounds[Graphic3d_TOB_GRADIENT]->Render (theWorkspace, theProjection); + + theWorkspace->SetAspects (anOldAspectFace); + } + else + { + myBackgrounds[Graphic3d_TOB_GRADIENT]->Render (theWorkspace, theProjection); + } } // Drawing background image if it is defined diff --git a/src/OpenGl/OpenGl_View.hxx b/src/OpenGl/OpenGl_View.hxx index eec11de2c2..e64fdc0587 100644 --- a/src/OpenGl/OpenGl_View.hxx +++ b/src/OpenGl/OpenGl_View.hxx @@ -507,6 +507,7 @@ protected: //! @name Background parameters OpenGl_Aspects* myTextureParams; //!< Stores texture and its parameters for textured background OpenGl_Aspects* myCubeMapParams; //!< Stores cubemap and its parameters for cubemap background + OpenGl_Aspects* myColoredQuadParams; //!< Stores parameters for gradient (corner mode) background OpenGl_BackgroundArray* myBackgrounds[Graphic3d_TypeOfBackground_NB]; //!< Array of primitive arrays of different background types Handle(OpenGl_TextureSet) myTextureEnv; From f9ae10ed21ab45c4c9eead10de6da9d6be2205e0 Mon Sep 17 00:00:00 2001 From: kgv Date: Mon, 4 Oct 2021 13:26:35 +0300 Subject: [PATCH 089/639] 0032604: Visualization, AIS_LightSource - improve dragging robustness --- src/AIS/AIS_LightSource.cxx | 18 ++++++++++-------- src/AIS/AIS_LightSource.hxx | 1 - src/Select3D/Select3D_SensitiveSphere.hxx | 6 ++++++ 3 files changed, 16 insertions(+), 9 deletions(-) diff --git a/src/AIS/AIS_LightSource.cxx b/src/AIS/AIS_LightSource.cxx index c48e80528f..91ae697643 100644 --- a/src/AIS/AIS_LightSource.cxx +++ b/src/AIS/AIS_LightSource.cxx @@ -257,27 +257,29 @@ Standard_Boolean AIS_LightSource::ProcessDragging (const Handle(AIS_InteractiveC { case AIS_DragAction_Start: { - myStartTransform = theDragFrom; myLocTrsfStart = LocalTransformation(); return Standard_True; } case AIS_DragAction_Update: { - theCtx->MainSelector()->Pick (myStartTransform.x(), myStartTransform.y(), theView); + mySensSphere->ResetLastDetectedPoint(); + SetLocalTransformation (myLocTrsfStart); + theCtx->MainSelector()->Pick (theDragFrom.x(), theDragFrom.y(), theView); gp_Pnt aStartPosition = mySensSphere->LastDetectedPoint(); + + mySensSphere->ResetLastDetectedPoint(); theCtx->MainSelector()->Pick (theDragTo.x(), theDragTo.y(), theView); gp_Pnt aCurrPosition = mySensSphere->LastDetectedPoint(); - if (aCurrPosition.X() != RealLast() && aStartPosition.Distance (aCurrPosition) > Precision::Confusion()) + if (aCurrPosition.X() != RealLast() + && aStartPosition.Distance (aCurrPosition) > Precision::Confusion()) { gp_Quaternion aQRot; aQRot.SetRotation (gp_Vec (gp_Pnt (0, 0, 0), aStartPosition), gp_Vec (gp_Pnt (0, 0, 0), aCurrPosition)); gp_Trsf aTrsf; aTrsf.SetRotation (aQRot); SetLocalTransformation (myLocTrsfStart * aTrsf); - myLocTrsfStart = LocalTransformation(); - myStartTransform = theDragTo; - theOwner->Selectable()->ClearDynamicHighlight (theCtx->MainPrsMgr()); - theCtx->HilightWithColor (this, Handle(Prs3d_Drawer)(), false); + const Standard_Integer aHiMod = HasHilightMode() ? HilightMode() : 0; + theOwner->UpdateHighlightTrsf (theCtx->CurrentViewer(), theCtx->MainPrsMgr(), aHiMod); } return Standard_True; } @@ -475,7 +477,7 @@ void AIS_LightSource::updateLightLocalTransformation() // ======================================================================= void AIS_LightSource::setLocalTransformation (const Handle(TopLoc_Datum3D)& theTrsf) { - const gp_Trsf aTrsf = theTrsf->Transformation(); + const gp_Trsf aTrsf = !theTrsf.IsNull() ? theTrsf->Transformation() : gp_Trsf(); switch (myLightSource->Type()) { case Graphic3d_TypeOfLightSource_Ambient: diff --git a/src/AIS/AIS_LightSource.hxx b/src/AIS/AIS_LightSource.hxx index 0e6dbc6bfa..c2da38840c 100644 --- a/src/AIS/AIS_LightSource.hxx +++ b/src/AIS/AIS_LightSource.hxx @@ -259,7 +259,6 @@ protected: Aspect_TypeOfMarker myCodirMarkerType; //!< icon of arrow co-directional to camera direction (look from) Aspect_TypeOfMarker myOpposMarkerType; //!< icon of arrow opposite to camera direction (look at) - Graphic3d_Vec2i myStartTransform; //!< position of starting transformation gp_Trsf myLocTrsfStart; //!< object transformation before transformation Standard_Real mySize; //!< presentation size Standard_Integer myNbArrows; //!< number of directional light arrows diff --git a/src/Select3D/Select3D_SensitiveSphere.hxx b/src/Select3D/Select3D_SensitiveSphere.hxx index 3202401b3c..765d6276e1 100644 --- a/src/Select3D/Select3D_SensitiveSphere.hxx +++ b/src/Select3D/Select3D_SensitiveSphere.hxx @@ -58,6 +58,12 @@ public: //! Returns the position of detected point on the sphere. const gp_Pnt& LastDetectedPoint() const { return myLastDetectedPoint; } + //! Invalidate the position of detected point on the sphere. + void ResetLastDetectedPoint() + { + myLastDetectedPoint = gp_Pnt (RealLast(), RealLast(), RealLast()); + } + protected: gp_Pnt myCenter; gp_Pnt myLastDetectedPoint; From f1c209dc77df73b3f34ef9385f8b86061a615e63 Mon Sep 17 00:00:00 2001 From: kgv Date: Wed, 6 Oct 2021 23:55:43 +0300 Subject: [PATCH 090/639] 0032609: Visualization, Wasm_Window - handle mouse movements outside canvas element Wasm_Window::ProcessMouseEvent() - removed redundant check on EMSCRIPTEN_EVENT_MOUSEUP event. ViewerTest and WebGL sample - mouse movements are now tracked on window element to allow tracking updates when mouse with clicked button is moved outside canvas element. --- samples/webgl/WasmOcctView.cpp | 36 ++++++++++++++++++++-- src/ViewerTest/ViewerTest_EventManager.cxx | 36 ++++++++++++++++++++-- src/Wasm/Wasm_Window.cxx | 9 ++++-- 3 files changed, 72 insertions(+), 9 deletions(-) diff --git a/samples/webgl/WasmOcctView.cpp b/samples/webgl/WasmOcctView.cpp index 65efdd3ab4..e47f395acb 100644 --- a/samples/webgl/WasmOcctView.cpp +++ b/samples/webgl/WasmOcctView.cpp @@ -185,12 +185,16 @@ void WasmOcctView::initWindow() emscripten_set_resize_callback (EMSCRIPTEN_EVENT_TARGET_WINDOW, this, toUseCapture, onResizeCallback); emscripten_set_mousedown_callback (aTargetId, this, toUseCapture, onMouseCallback); - emscripten_set_mouseup_callback (aTargetId, this, toUseCapture, onMouseCallback); - emscripten_set_mousemove_callback (aTargetId, this, toUseCapture, onMouseCallback); + // bind these events to window to track mouse movements outside of canvas + //emscripten_set_mouseup_callback (aTargetId, this, toUseCapture, onMouseCallback); + //emscripten_set_mousemove_callback (aTargetId, this, toUseCapture, onMouseCallback); + //emscripten_set_mouseleave_callback (aTargetId, this, toUseCapture, onMouseCallback); + emscripten_set_mouseup_callback (EMSCRIPTEN_EVENT_TARGET_WINDOW, this, toUseCapture, onMouseCallback); + emscripten_set_mousemove_callback (EMSCRIPTEN_EVENT_TARGET_WINDOW, this, toUseCapture, onMouseCallback); + emscripten_set_dblclick_callback (aTargetId, this, toUseCapture, onMouseCallback); emscripten_set_click_callback (aTargetId, this, toUseCapture, onMouseCallback); emscripten_set_mouseenter_callback (aTargetId, this, toUseCapture, onMouseCallback); - emscripten_set_mouseleave_callback (aTargetId, this, toUseCapture, onMouseCallback); emscripten_set_wheel_callback (aTargetId, this, toUseCapture, onWheelCallback); emscripten_set_touchstart_callback (aTargetId, this, toUseCapture, onTouchCallback); @@ -474,6 +478,21 @@ EM_BOOL WasmOcctView::onResizeEvent (int theEventType, const EmscriptenUiEvent* return EM_TRUE; } +//! Update canvas bounding rectangle. +EM_JS(void, jsUpdateBoundingClientRect, (), { + Module._myCanvasRect = Module.canvas.getBoundingClientRect(); +}); + +//! Get canvas bounding top. +EM_JS(int, jsGetBoundingClientTop, (), { + return Math.round(Module._myCanvasRect.top); +}); + +//! Get canvas bounding left. +EM_JS(int, jsGetBoundingClientLeft, (), { + return Math.round(Module._myCanvasRect.left); +}); + // ================================================================ // Function : onMouseEvent // Purpose : @@ -486,6 +505,17 @@ EM_BOOL WasmOcctView::onMouseEvent (int theEventType, const EmscriptenMouseEvent } Handle(Wasm_Window) aWindow = Handle(Wasm_Window)::DownCast (myView->Window()); + if (theEventType == EMSCRIPTEN_EVENT_MOUSEMOVE + || theEventType == EMSCRIPTEN_EVENT_MOUSEUP) + { + // these events are bound to EMSCRIPTEN_EVENT_TARGET_WINDOW, and coordinates should be converted + jsUpdateBoundingClientRect(); + EmscriptenMouseEvent anEvent = *theEvent; + anEvent.targetX -= jsGetBoundingClientLeft(); + anEvent.targetY -= jsGetBoundingClientTop(); + return aWindow->ProcessMouseEvent (*this, theEventType, &anEvent) ? EM_TRUE : EM_FALSE; + } + return aWindow->ProcessMouseEvent (*this, theEventType, theEvent) ? EM_TRUE : EM_FALSE; } diff --git a/src/ViewerTest/ViewerTest_EventManager.cxx b/src/ViewerTest/ViewerTest_EventManager.cxx index e22e72981b..7ae3a25c74 100644 --- a/src/ViewerTest/ViewerTest_EventManager.cxx +++ b/src/ViewerTest/ViewerTest_EventManager.cxx @@ -624,6 +624,21 @@ static EM_BOOL onResizeCallback (int theEventType, const EmscriptenUiEvent* theE return EM_FALSE; } +//! Update canvas bounding rectangle. +EM_JS(void, occJSUpdateBoundingClientRect, (), { + Module._myCanvasRect = Module.canvas.getBoundingClientRect(); +}); + +//! Get canvas bounding top. +EM_JS(int, occJSGetBoundingClientTop, (), { + return Math.round(Module._myCanvasRect.top); +}); + +//! Get canvas bounding left. +EM_JS(int, occJSGetBoundingClientLeft, (), { + return Math.round(Module._myCanvasRect.left); +}); + //! Handle mouse input event. static EM_BOOL onWasmMouseCallback (int theEventType, const EmscriptenMouseEvent* theEvent, void* ) { @@ -632,6 +647,17 @@ static EM_BOOL onWasmMouseCallback (int theEventType, const EmscriptenMouseEvent && !ViewerTest::CurrentView().IsNull()) { Handle(Wasm_Window) aWindow = Handle(Wasm_Window)::DownCast (ViewerTest::CurrentView()->Window()); + if (theEventType == EMSCRIPTEN_EVENT_MOUSEMOVE + || theEventType == EMSCRIPTEN_EVENT_MOUSEUP) + { + // these events are bound to EMSCRIPTEN_EVENT_TARGET_WINDOW, and coordinates should be converted + occJSUpdateBoundingClientRect(); + EmscriptenMouseEvent anEvent = *theEvent; + anEvent.targetX -= occJSGetBoundingClientLeft(); + anEvent.targetY -= occJSGetBoundingClientTop(); + return aWindow->ProcessMouseEvent (*aViewCtrl, theEventType, &anEvent) ? EM_TRUE : EM_FALSE; + } + return aWindow->ProcessMouseEvent (*aViewCtrl, theEventType, theEvent) ? EM_TRUE : EM_FALSE; } return EM_FALSE; @@ -730,13 +756,17 @@ void ViewerTest_EventManager::SetupWindowCallbacks (const Handle(Aspect_Window)& // so that if web application changes canvas size by other means it should use another way to tell OCCT about resize emscripten_set_resize_callback (EMSCRIPTEN_EVENT_TARGET_WINDOW, anOpaque, toUseCapture, onResizeCallback); + // bind these events to window to track mouse movements outside of canvas + //emscripten_set_mouseup_callback (aTargetId, anOpaque, toUseCapture, onWasmMouseCallback); + //emscripten_set_mousemove_callback (aTargetId, anOpaque, toUseCapture, onWasmMouseCallback); + //emscripten_set_mouseleave_callback (aTargetId, anOpaque, toUseCapture, onWasmMouseCallback); + emscripten_set_mouseup_callback (EMSCRIPTEN_EVENT_TARGET_WINDOW, anOpaque, toUseCapture, onWasmMouseCallback); + emscripten_set_mousemove_callback (EMSCRIPTEN_EVENT_TARGET_WINDOW, anOpaque, toUseCapture, onWasmMouseCallback); + emscripten_set_mousedown_callback (aTargetId, anOpaque, toUseCapture, onWasmMouseCallback); - emscripten_set_mouseup_callback (aTargetId, anOpaque, toUseCapture, onWasmMouseCallback); - emscripten_set_mousemove_callback (aTargetId, anOpaque, toUseCapture, onWasmMouseCallback); emscripten_set_dblclick_callback (aTargetId, anOpaque, toUseCapture, onWasmMouseCallback); emscripten_set_click_callback (aTargetId, anOpaque, toUseCapture, onWasmMouseCallback); emscripten_set_mouseenter_callback (aTargetId, anOpaque, toUseCapture, onWasmMouseCallback); - emscripten_set_mouseleave_callback (aTargetId, anOpaque, toUseCapture, onWasmMouseCallback); emscripten_set_wheel_callback (aTargetId, anOpaque, toUseCapture, onWasmWheelCallback); emscripten_set_touchstart_callback (aTargetId, anOpaque, toUseCapture, onWasmTouchCallback); diff --git a/src/Wasm/Wasm_Window.cxx b/src/Wasm/Wasm_Window.cxx index b2a81e3499..19100a4b7c 100644 --- a/src/Wasm/Wasm_Window.cxx +++ b/src/Wasm/Wasm_Window.cxx @@ -290,10 +290,13 @@ bool Wasm_Window::ProcessMouseEvent (Aspect_WindowInputListener& theListener, case EMSCRIPTEN_EVENT_MOUSEDOWN: case EMSCRIPTEN_EVENT_MOUSEUP: { - if (aNewPos2i.x() < 0 || aNewPos2i.x() > mySize.x() - || aNewPos2i.y() < 0 || aNewPos2i.y() > mySize.y()) + if (theEventType == EMSCRIPTEN_EVENT_MOUSEDOWN) { - return false; + if (aNewPos2i.x() < 0 || aNewPos2i.x() > mySize.x() + || aNewPos2i.y() < 0 || aNewPos2i.y() > mySize.y()) + { + return false; + } } if (theListener.UpdateMouseButtons (aNewPos2i, aButtons, aFlags, isEmulated)) { From 96b92906deea229ecdec90d1cc84ed2cd8e9bf1e Mon Sep 17 00:00:00 2001 From: vkuzin Date: Fri, 13 Aug 2021 14:43:22 +0300 Subject: [PATCH 091/639] 0029405: Modeling Algorithms - Check normal define status in HLRBRep_Data Fixed exception when trying to calculate line and edge normal in methods HLRBRep_Data::OrientOutLine and HLRBRep_Data::OrientOthEdge, added a check for the existence of the normal before subsequent calculations. A correct check for zero derivative, correction of floating point error and division by zero determinant directly in HLRBRep_EdgeFaceTool::CurvatureValue was set. --- src/HLRBRep/HLRBRep_Data.cxx | 90 +++++++++++++++------------- src/HLRBRep/HLRBRep_EdgeFaceTool.cxx | 20 +++---- tests/bugs/modalg_7/bug29405 | 9 +++ 3 files changed, 66 insertions(+), 53 deletions(-) create mode 100644 tests/bugs/modalg_7/bug29405 diff --git a/src/HLRBRep/HLRBRep_Data.cxx b/src/HLRBRep/HLRBRep_Data.cxx index 72b0fdf316..2cebfec692 100644 --- a/src/HLRBRep/HLRBRep_Data.cxx +++ b/src/HLRBRep/HLRBRep_Data.cxx @@ -1543,43 +1543,45 @@ Standard_Boolean HLRBRep_Data::OrientOutLine (const Standard_Integer I, HLRBRep_ V = gp_Dir(0,0,-1); } V.Transform(TI); - Standard_Real curv = HLRBRep_EdgeFaceTool::CurvatureValue - (iFaceGeom,pu,pv,V); - gp_Vec Nm = mySLProps.Normal(); - if (curv == 0) { + if (mySLProps.IsNormalDefined()) { + Standard_Real curv = HLRBRep_EdgeFaceTool::CurvatureValue + (iFaceGeom,pu,pv,V); + gp_Vec Nm = mySLProps.Normal(); + if (curv == 0) { #ifdef OCCT_DEBUG - std::cout << "HLRBRep_Data::OrientOutLine " << I; - std::cout << " Edge " << myFE << " : "; - std::cout << "CurvatureValue == 0." << std::endl; + std::cout << "HLRBRep_Data::OrientOutLine " << I; + std::cout << " Edge " << myFE << " : "; + std::cout << "CurvatureValue == 0." << std::endl; #endif - } - if (curv > 0) - Nm.Reverse(); - Tg.Transform(T); - Pt.Transform(T); - Nm.Transform(T); - Nm.Cross(Tg); - if (Tg.Magnitude() < gp::Resolution()) { + } + if (curv > 0) + Nm.Reverse(); + Tg.Transform(T); + Pt.Transform(T); + Nm.Transform(T); + Nm.Cross(Tg); + if (Tg.Magnitude() < gp::Resolution()) { #ifdef OCCT_DEBUG - std::cout << "HLRBRep_Data::OrientOutLine " << I; - std::cout << " Edge " << myFE << " : "; - std::cout << "Tg.Magnitude() == 0." << std::endl; + std::cout << "HLRBRep_Data::OrientOutLine " << I; + std::cout << " Edge " << myFE << " : "; + std::cout << "Tg.Magnitude() == 0." << std::endl; #endif - } - if (myProj.Perspective()) - r = Nm.Z() * myProj.Focus() - - ( Nm.X() * Pt.X() + Nm.Y() * Pt.Y() + Nm.Z() * Pt.Z() ); - else - r = Nm.Z(); - myFEOri = (r > 0) ? TopAbs_FORWARD : TopAbs_REVERSED; - if (!FD.Cut() && FD.Closed() && FirstInversion) { - if ((eb1->Orientation(ie1) == myFEOri) != + } + if (myProj.Perspective()) + r = Nm.Z() * myProj.Focus() - + (Nm.X() * Pt.X() + Nm.Y() * Pt.Y() + Nm.Z() * Pt.Z()); + else + r = Nm.Z(); + myFEOri = (r > 0) ? TopAbs_FORWARD : TopAbs_REVERSED; + if (!FD.Cut() && FD.Closed() && FirstInversion) { + if ((eb1->Orientation(ie1) == myFEOri) != (FD.Orientation() == TopAbs_FORWARD)) { - FirstInversion = Standard_False; - inverted = Standard_True; + FirstInversion = Standard_False; + inverted = Standard_True; + } } + eb1->Orientation(ie1, myFEOri); } - eb1->Orientation(ie1,myFEOri); } else { #ifdef OCCT_DEBUG @@ -1627,19 +1629,21 @@ void HLRBRep_Data::OrientOthEdge (const Standard_Integer I, if (HLRBRep_EdgeFaceTool::UVPoint(p,myFEGeom,iFaceGeom,pu,pv)) { gp_Pnt Pt = EC.Value3D(p); mySLProps.SetParameters(pu,pv); - gp_Vec Nm = mySLProps.Normal(); - Pt.Transform(T); - Nm.Transform(T); - if (myProj.Perspective()) { - r = Nm.Z() * myProj.Focus() - - ( Nm.X() * Pt.X() + Nm.Y() * Pt.Y() + Nm.Z() * Pt.Z() ); - } - else { - r = Nm.Z(); - } - if (r < 0) { - myFEOri = TopAbs::Reverse(myFEOri); - eb1->Orientation(ie1,myFEOri); + if (mySLProps.IsNormalDefined()) { + gp_Vec Nm = mySLProps.Normal(); + Pt.Transform(T); + Nm.Transform(T); + if (myProj.Perspective()) { + r = Nm.Z() * myProj.Focus() - + (Nm.X() * Pt.X() + Nm.Y() * Pt.Y() + Nm.Z() * Pt.Z()); + } + else { + r = Nm.Z(); + } + if (r < 0) { + myFEOri = TopAbs::Reverse(myFEOri); + eb1->Orientation(ie1, myFEOri); + } } } #ifdef OCCT_DEBUG diff --git a/src/HLRBRep/HLRBRep_EdgeFaceTool.cxx b/src/HLRBRep/HLRBRep_EdgeFaceTool.cxx index 5bbaf5fae7..f589eedd45 100644 --- a/src/HLRBRep/HLRBRep_EdgeFaceTool.cxx +++ b/src/HLRBRep/HLRBRep_EdgeFaceTool.cxx @@ -45,17 +45,17 @@ Standard_Real HLRBRep_EdgeFaceTool::CurvatureValue Standard_Real nmu2 = D1U*D1U; Standard_Real nmv2 = D1V*D1V; Standard_Real det = nmu2 * nmv2 - d1ud1v * d1ud1v; - Standard_Real alfa = ( d1ut * nmv2 - d1vt * d1ud1v ) / det; - Standard_Real beta = ( d1vt * nmu2 - d1ut * d1ud1v ) / det; - gp_Vec Nm = D1U ^ D1V; - if (Nm.Magnitude() > gp::Resolution()) { + if (det > gp::Resolution()) { + Standard_Real alfa = (d1ut * nmv2 - d1vt * d1ud1v) / det; + Standard_Real beta = (d1vt * nmu2 - d1ut * d1ud1v) / det; + Standard_Real alfa2 = alfa * alfa; + Standard_Real beta2 = beta * beta; + Standard_Real alfabeta = alfa * beta; + gp_Vec Nm = D1U ^ D1V; Nm.Normalize(); - Standard_Real alfa2 = alfa*alfa; - Standard_Real beta2 = beta*beta; - Standard_Real alfabeta = alfa*beta; - Standard_Real N = (Nm*D2U)*alfa2 + 2*(Nm*D2UV)*alfabeta + (Nm*D2V)*beta2; - Standard_Real D = nmu2 *alfa2 + 2*d1ud1v *alfabeta + nmv2 *beta2; - return N/D; + Standard_Real N = (Nm * D2U) * alfa2 + 2 * (Nm * D2UV) * alfabeta + (Nm * D2V) * beta2; + Standard_Real D = nmu2 * alfa2 + 2 * d1ud1v * alfabeta + nmv2 * beta2; + return N / D; } return 0.; } diff --git a/tests/bugs/modalg_7/bug29405 b/tests/bugs/modalg_7/bug29405 new file mode 100644 index 0000000000..0e6537b62b --- /dev/null +++ b/tests/bugs/modalg_7/bug29405 @@ -0,0 +1,9 @@ +puts "============================================" +puts "OCC29405: Modeling Algorithms - Check normal define status in HLRBRep_Data" +puts "============================================" +puts "" + +pload ALL +ptorus t 17.37 17.37 [dval 2.35*180/pi] +vdisplay t +vcomputehlr t t2 -algotype algo 0 50 0 0 -50 0 0 0 1 \ No newline at end of file From 56b495d93bc70a96c9f07a6025b83e2e5e70eef7 Mon Sep 17 00:00:00 2001 From: ifv Date: Mon, 4 Oct 2021 17:25:56 +0300 Subject: [PATCH 092/639] 0032607: Modeling Algorithms - BOPAlgo_BOP returns incomplete result IntPatch/IntPatch_ImpPrmIntersection.cxx - decreasing step for some conditions tests/lowalgos/intss/bug32607 - test case added --- src/IntPatch/IntPatch_ImpPrmIntersection.cxx | 113 ++++++++++++++----- tests/lowalgos/intss/bug32607 | 24 ++++ 2 files changed, 108 insertions(+), 29 deletions(-) create mode 100644 tests/lowalgos/intss/bug32607 diff --git a/src/IntPatch/IntPatch_ImpPrmIntersection.cxx b/src/IntPatch/IntPatch_ImpPrmIntersection.cxx index 320af323b3..483d1c2f34 100644 --- a/src/IntPatch/IntPatch_ImpPrmIntersection.cxx +++ b/src/IntPatch/IntPatch_ImpPrmIntersection.cxx @@ -81,6 +81,11 @@ static const Standard_Real theToler2D, const Standard_Real thePeriod); +static + Standard_Real GetLocalStep(const Handle(Adaptor3d_Surface)& theSurf, + const Standard_Real theStep); + + //======================================================================= //function : IsSeamOrPole //purpose : @@ -481,6 +486,81 @@ void Recadre(const Standard_Boolean , pt.SetParameters(U1,V1,U2,V2); } +//======================================================================= +//function : GetLocalStep +//purpose : +//======================================================================= +Standard_Real GetLocalStep(const Handle(Adaptor3d_Surface)& theSurf, + const Standard_Real theStep) +{ + Standard_Real aLocalStep = theStep; + if (theSurf->UContinuity() > GeomAbs_C0 && theSurf->VContinuity() > GeomAbs_C0) + { + GeomAbs_SurfaceType aSType = theSurf->GetType(); + + if (aSType == GeomAbs_BezierSurface || aSType == GeomAbs_BSplineSurface) + { + Standard_Real aMinRes = Precision::Infinite(); + Standard_Integer aMaxDeg = 0; + const Standard_Real aLimRes = 1.e-10; + + aMinRes = Min(theSurf->UResolution(Precision::Confusion()), + theSurf->VResolution(Precision::Confusion())); + aMaxDeg = Max(theSurf->UDegree(), theSurf->VDegree()); + if (aMinRes < aLimRes && aMaxDeg > 3) + { + aLocalStep = 0.0001; + } + } + } + if (theSurf->UContinuity() == GeomAbs_C0) + { + Standard_Integer aNbInt = theSurf->NbUIntervals(GeomAbs_C1); + if (aNbInt > 1) + { + TColStd_Array1OfReal anInts(1, aNbInt + 1); + theSurf->UIntervals(anInts, GeomAbs_C1); + Standard_Integer i; + Standard_Real aMinInt = Precision::Infinite(); + for (i = 1; i <= aNbInt; ++i) + { + aMinInt = Min(aMinInt, anInts(i + 1) - anInts(i)); + } + + aMinInt /= theSurf->LastUParameter() - theSurf->FirstUParameter(); + if (aMinInt < 0.002) + { + aLocalStep = 0.0001; + } + } + + } + + if (theSurf->VContinuity() == GeomAbs_C0) + { + Standard_Integer aNbInt = theSurf->NbVIntervals(GeomAbs_C1); + if (aNbInt > 1) + { + TColStd_Array1OfReal anInts(1, aNbInt + 1); + theSurf->VIntervals(anInts, GeomAbs_C1); + Standard_Integer i; + Standard_Real aMinInt = Precision::Infinite(); + for (i = 1; i <= aNbInt; ++i) + { + aMinInt = Min(aMinInt, anInts(i + 1) - anInts(i)); + } + + aMinInt /= theSurf->LastVParameter() - theSurf->FirstVParameter(); + if (aMinInt < 0.002) + { + aLocalStep = 0.0001; + } + } + } + + aLocalStep = Min(theStep, aLocalStep); + return aLocalStep; +} //======================================================================= //function : Perform //purpose : @@ -587,35 +667,10 @@ void IntPatch_ImpPrmIntersection::Perform (const Handle(Adaptor3d_Surface)& Surf } // Standard_Real aLocalPas = Pas; - GeomAbs_SurfaceType aSType = reversed ? Surf1->GetType() : Surf2->GetType(); - - if (aSType == GeomAbs_BezierSurface || aSType == GeomAbs_BSplineSurface) - { - Standard_Real aMinRes = Precision::Infinite(); - GeomAbs_Shape aCont = GeomAbs_C0; - Standard_Integer aMaxDeg = 0; - const Standard_Real aLimRes = 1.e-10; - - if (reversed) - { - aMinRes = Min(Surf1->UResolution(Precision::Confusion()), - Surf1->VResolution(Precision::Confusion())); - aCont = (GeomAbs_Shape)Min(Surf1->UContinuity(), Surf1->VContinuity()); - aMaxDeg = Max(Surf1->UDegree(), Surf1->VDegree()); - } - else - { - aMinRes = Min(Surf2->UResolution(Precision::Confusion()), - Surf2->VResolution(Precision::Confusion())); - aCont = (GeomAbs_Shape)Min(Surf2->UContinuity(), Surf2->VContinuity()); - aMaxDeg = Max(Surf2->UDegree(), Surf2->VDegree()); - } - - if (aMinRes < aLimRes && aCont > GeomAbs_C0 && aMaxDeg > 3) - { - aLocalPas = Min(Pas, 0.0001); - } - } + if (reversed) + aLocalPas = GetLocalStep(Surf1, Pas); + else + aLocalPas = GetLocalStep(Surf2, Pas); Func.SetImplicitSurface(Quad); Func.Set(IntSurf_QuadricTool::Tolerance(Quad)); diff --git a/tests/lowalgos/intss/bug32607 b/tests/lowalgos/intss/bug32607 new file mode 100644 index 0000000000..746f547d71 --- /dev/null +++ b/tests/lowalgos/intss/bug32607 @@ -0,0 +1,24 @@ +puts "========" +puts "0032607: Modeling Algorithms - BOPAlgo_BOP returns incomplete result" +puts "========" +puts "" + +restore [locate_data_file bug32607.brep] s +explode s + +regexp {Tolerance Reached=+([-0-9.+eE]+)\n+([-0-9.+eE]+)} [bopcurves s_1 s_2 -2d] full Toler NbCurv + +checkreal Tolerance $Toler 0.0011727990276470168 1.0e-7 0.0 +if {$NbCurv != 1} { + puts "Error: Please check NbCurves for intersector" +} else { + checklength c_1 -l 14.469397997508448 + CheckLoops c_1 +} + +smallview +don c_* +fit +disp s_1 s_2 + +checkview -screenshot -2d -path ${imagedir}/${test_image}.png From 34043fc845eb2eb7abf6993224a97aa6066f6701 Mon Sep 17 00:00:00 2001 From: kgv Date: Tue, 12 Oct 2021 09:36:40 +0300 Subject: [PATCH 093/639] 0032613: Samples - glfw compilation error on Linux GlfwOcctWindow - added cast to Aspect_XDisplay*. Added auxiliary OCCT searching script as alternative to CMake config files. --- samples/glfw/CMakeLists.txt | 17 +- samples/glfw/GlfwOcctWindow.cpp | 2 +- samples/glfw/adm/cmake/FindOpenCASCADE.cmake | 157 +++++++++++++++++++ 3 files changed, 167 insertions(+), 9 deletions(-) create mode 100644 samples/glfw/adm/cmake/FindOpenCASCADE.cmake diff --git a/samples/glfw/CMakeLists.txt b/samples/glfw/CMakeLists.txt index cc6cc3c380..d40add62ce 100644 --- a/samples/glfw/CMakeLists.txt +++ b/samples/glfw/CMakeLists.txt @@ -2,6 +2,8 @@ cmake_minimum_required(VERSION 3.2) project(glfw-occt-demo) +set (CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/adm/cmake" ${CMAKE_MODULE_PATH}) + set(CMAKE_CXX_STANDARD 11) set(APP_VERSION_MAJOR 1) set(APP_VERSION_MINOR 0) @@ -24,15 +26,14 @@ source_group ("Sources" FILES find_package(OpenGL REQUIRED) # Open CASCADE Technology -find_package(OpenCASCADE REQUIRED NO_DEFAULT_PATH) -if (OpenCASCADE_FOUND) - message (STATUS "Using OpenCASCADE from \"${OpenCASCADE_DIR}\"" ) - INCLUDE_DIRECTORIES(${OpenCASCADE_INCLUDE_DIR}) - LINK_DIRECTORIES(${OpenCASCADE_LIBRARY_DIR}) +find_package (OpenCASCADE REQUIRED) +if (NOT OpenCASCADE_FOUND) + message (FATAL_ERROR "coult not find OpenCASCADE, please set OpenCASCADE_DIR variable" ) else() - message (WARNING "Could not find OpenCASCADE, please set OpenCASCADE_DIR variable." ) - set (OCCT_LIBRARY_DIR) - set (OCCT_BIN_DIR) + message (STATUS "Using OpenCASCADE from \"${OpenCASCADE_INSTALL_PREFIX}\"" ) + message (STATUS "OpenCASCADE_INCLUDE_DIR=${OpenCASCADE_INCLUDE_DIR}") + message (STATUS "OpenCASCADE_LIBRARY_DIR=${OpenCASCADE_LIBRARY_DIR}") + INCLUDE_DIRECTORIES(${OpenCASCADE_INCLUDE_DIR}) endif() SET(OpenCASCADE_LIBS diff --git a/samples/glfw/GlfwOcctWindow.cpp b/samples/glfw/GlfwOcctWindow.cpp index 8cd9f6fe4b..8b34487b88 100644 --- a/samples/glfw/GlfwOcctWindow.cpp +++ b/samples/glfw/GlfwOcctWindow.cpp @@ -55,7 +55,7 @@ GlfwOcctWindow::GlfwOcctWindow (int theWidth, int theHeight, const TCollection_A myYBottom = myYTop + aHeight; #if !defined(_WIN32) && !defined(__APPLE__) - myDisplay = new Aspect_DisplayConnection (glfwGetX11Display()); + myDisplay = new Aspect_DisplayConnection ((Aspect_XDisplay* )glfwGetX11Display()); #endif } } diff --git a/samples/glfw/adm/cmake/FindOpenCASCADE.cmake b/samples/glfw/adm/cmake/FindOpenCASCADE.cmake new file mode 100644 index 0000000000..0b5a9eeeba --- /dev/null +++ b/samples/glfw/adm/cmake/FindOpenCASCADE.cmake @@ -0,0 +1,157 @@ +# This script finds OpenCASCADE Technology libraries. +# The script requires: +# OpenCASCADE_DIR - root OCCT folder or folder with CMake configuration files +# +# Script will define the following variables on success: +# OpenCASCADE_FOUND - package is successfully found +# OpenCASCADE_INCLUDE_DIR - directory with headers +# OpenCASCADE_LIBRARY_DIR - directory with libraries for linker +# OpenCASCADE_BINARY_DIR - directory with DLLs +include(FindPackageHandleStandardArgs) + +# MY_PLATFORM variable +math (EXPR MY_BITNESS "32 + 32*(${CMAKE_SIZEOF_VOID_P}/8)") +if (WIN32) + set (MY_PLATFORM "win${MY_BITNESS}") +elseif(APPLE) + set (MY_PLATFORM "mac") +else() + set (MY_PLATFORM "lin") +endif() + +# MY_PLATFORM_AND_COMPILER variable +if (MSVC) + if (MSVC90) + set (MY_COMPILER vc9) + elseif (MSVC10) + set (MY_COMPILER vc10) + elseif (MSVC11) + set (MY_COMPILER vc11) + elseif (MSVC12) + set (MY_COMPILER vc12) + elseif (MSVC14) + set (MY_COMPILER vc14) + else() + set (MY_COMPILER vc15) + message (WARNING "Unknown msvc version. $$MY_COMPILER is used") + endif() +elseif (DEFINED CMAKE_COMPILER_IS_GNUCC) + set (MY_COMPILER gcc) +elseif (DEFINED CMAKE_COMPILER_IS_GNUCXX) + set (MY_COMPILER gcc) +elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang") + set (MY_COMPILER clang) +elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Intel") + set (MY_COMPILER icc) +else() + set (MY_COMPILER ${CMAKE_GENERATOR}) + string (REGEX REPLACE " " "" COMPILER ${MY_COMPILER}) +endif() +set (MY_PLATFORM_AND_COMPILER "${MY_PLATFORM}/${MY_COMPILER}") + +set (OpenCASCADE_DIR "" CACHE PATH "Path to Open CASCADE libraries.") + +# default paths +set (OpenCASCADE_INCLUDE_DIR "${OpenCASCADE_DIR}/inc") +set (OpenCASCADE_LIBRARY_DIR "${OpenCASCADE_DIR}/${MY_PLATFORM_AND_COMPILER}/lib") +set (OpenCASCADE_BINARY_DIR "${OpenCASCADE_DIR}/${MY_PLATFORM_AND_COMPILER}/bin") + +# complete list of OCCT Toolkits (copy-paste from adm/UDLIST, since installed OCCT does not include UDLIST) +set (OpenCASCADE_TKLIST "") +set (OpenCASCADE_TKLIST ${OpenCASCADE_TKLIST} TKernel TKMath) # FoundationClasses +set (OpenCASCADE_TKLIST ${OpenCASCADE_TKLIST} TKG2d TKG3d TKGeomBase TKBRep) # ModelingData +set (OpenCASCADE_TKLIST ${OpenCASCADE_TKLIST} TKGeomAlgo TKTopAlgo TKPrim TKBO TKBool TKHLR TKFillet TKOffset TKFeat TKMesh TKXMesh TKShHealing) # ModelingAlgorithms +set (OpenCASCADE_TKLIST ${OpenCASCADE_TKLIST} TKService TKV3d TKOpenGl TKMeshVS TKIVtk TKD3DHost) # Visualization +set (OpenCASCADE_TKLIST ${OpenCASCADE_TKLIST} TKCDF TKLCAF TKCAF TKBinL TKXmlL TKBin TKXml TKStdL TKStd TKTObj TKBinTObj TKXmlTObj TKVCAF) # ApplicationFramework +set (OpenCASCADE_TKLIST ${OpenCASCADE_TKLIST} TKXSBase TKSTEPBase TKSTEPAttr TKSTEP209 TKSTEP TKIGES TKXCAF TKXDEIGES TKXDESTEP TKSTL TKVRML TKXmlXCAF TKBinXCAF TKRWMesh) # DataExchange +set (OpenCASCADE_TKLIST ${OpenCASCADE_TKLIST} TKDraw TKViewerTest) # Draw + +# validate location of OCCT libraries and headers +set (OpenCASCADE_INCLUDE_DIR_FOUND) +set (OpenCASCADE_LIBRARY_DIR_FOUND) +set (OpenCASCADE_LIBRARY_DEBUG_DIR_FOUND) +set (OpenCASCADE_IMPLIB_SUFFIX ${CMAKE_STATIC_LIBRARY_SUFFIX}) +set (OpenCASCADE_SHAREDLIB_RELEASE_FOUND) +set (OpenCASCADE_SHAREDLIB_DEBUG_FOUND) +if (EXISTS "${OpenCASCADE_INCLUDE_DIR}/Standard.hxx") + set (OpenCASCADE_INCLUDE_DIR_FOUND ON) +endif() + +if (EXISTS "${OpenCASCADE_LIBRARY_DIR}/${CMAKE_SHARED_LIBRARY_PREFIX}TKernel${CMAKE_STATIC_LIBRARY_SUFFIX}") + set (OpenCASCADE_LIBRARY_DIR_FOUND ON) +elseif (NOT WIN32 AND EXISTS "${OpenCASCADE_LIBRARY_DIR}/${CMAKE_SHARED_LIBRARY_PREFIX}TKernel${CMAKE_SHARED_LIBRARY_SUFFIX}") + set (OpenCASCADE_LIBRARY_DIR_FOUND ON) + set (OpenCASCADE_IMPLIB_SUFFIX ${CMAKE_SHARED_LIBRARY_SUFFIX}) +endif() + +if (EXISTS "${OpenCASCADE_LIBRARY_DIR}d/${CMAKE_SHARED_LIBRARY_PREFIX}TKernel${CMAKE_STATIC_LIBRARY_SUFFIX}") + set (OpenCASCADE_LIBRARY_DEBUG_DIR_FOUND ON) +elseif (NOT WIN32 AND EXISTS "${OpenCASCADE_LIBRARY_DIR}d/${CMAKE_SHARED_LIBRARY_PREFIX}TKernel${CMAKE_SHARED_LIBRARY_SUFFIX}") + set (OpenCASCADE_LIBRARY_DEBUG_DIR_FOUND ON) + set (OpenCASCADE_IMPLIB_SUFFIX ${CMAKE_SHARED_LIBRARY_SUFFIX}) +elseif (OpenCASCADE_LIBRARY_DIR_FOUND) + message (STATUS "Only release OpenCASCADE libraries have been found") +endif() + +if (NOT OpenCASCADE_LIBRARY_DIR_FOUND AND OpenCASCADE_LIBRARY_DEBUG_DIR_FOUND) + set (OpenCASCADE_LIBRARY_DIR_FOUND ON) + message (WARNING "Only debug OpenCASCADE libraries have been found") +endif() + +if (WIN32) + if (EXISTS "${OpenCASCADE_BINARY_DIR}/${CMAKE_SHARED_LIBRARY_PREFIX}TKernel${CMAKE_SHARED_LIBRARY_SUFFIX}") + set (OpenCASCADE_SHAREDLIB_RELEASE_FOUND ON) + endif() + if (EXISTS "${OpenCASCADE_BINARY_DIR}d/${CMAKE_SHARED_LIBRARY_PREFIX}TKernel${CMAKE_SHARED_LIBRARY_SUFFIX}") + set (OpenCASCADE_SHAREDLIB_DEBUG_FOUND ON) + endif() +else() + if (EXISTS "${OpenCASCADE_LIBRARY_DIR}/${CMAKE_SHARED_LIBRARY_PREFIX}TKernel${CMAKE_SHARED_LIBRARY_SUFFIX}") + set (OpenCASCADE_SHAREDLIB_RELEASE_FOUND ON) + endif() + if (EXISTS "${OpenCASCADE_LIBRARY_DIR}d/${CMAKE_SHARED_LIBRARY_PREFIX}TKernel${CMAKE_SHARED_LIBRARY_SUFFIX}") + set (OpenCASCADE_SHAREDLIB_DEBUG_FOUND ON) + endif() +endif() + +if (OpenCASCADE_INCLUDE_DIR_FOUND AND OpenCASCADE_LIBRARY_DIR_FOUND) + set (OpenCASCADE_FOUND ON) + set (OpenCASCADE_INSTALL_PREFIX ${OpenCASCADE_DIR}) + + # Define OCCT toolkits so that CMake can put absolute paths to linker; + # the library existance is not checked here, since modules can be disabled. + foreach (aLibIter ${OpenCASCADE_TKLIST}) + add_library (${aLibIter} SHARED IMPORTED) + + set_property (TARGET ${aLibIter} APPEND PROPERTY IMPORTED_CONFIGURATIONS RELEASE) + set_target_properties (${aLibIter} PROPERTIES IMPORTED_IMPLIB_RELEASE "${OpenCASCADE_LIBRARY_DIR}/${CMAKE_SHARED_LIBRARY_PREFIX}${aLibIter}${OpenCASCADE_IMPLIB_SUFFIX}") + if (OpenCASCADE_SHAREDLIB_RELEASE_FOUND) + if (WIN32) + set_target_properties (${aLibIter} PROPERTIES IMPORTED_LOCATION_RELEASE "${OpenCASCADE_BINARY_DIR}/${CMAKE_SHARED_LIBRARY_PREFIX}${aLibIter}${CMAKE_SHARED_LIBRARY_SUFFIX}") + else() + set_target_properties (${aLibIter} PROPERTIES IMPORTED_LOCATION_RELEASE "${OpenCASCADE_LIBRARY_DIR}/${CMAKE_SHARED_LIBRARY_PREFIX}${aLibIter}${CMAKE_SHARED_LIBRARY_SUFFIX}") + endif() + endif() + + if (OpenCASCADE_LIBRARY_DEBUG_DIR_FOUND) + set_property (TARGET ${aLibIter} APPEND PROPERTY IMPORTED_CONFIGURATIONS DEBUG) + set_target_properties (${aLibIter} PROPERTIES IMPORTED_IMPLIB_DEBUG "${OpenCASCADE_LIBRARY_DIR}d/${CMAKE_SHARED_LIBRARY_PREFIX}${aLibIter}${OpenCASCADE_IMPLIB_SUFFIX}") + if (OpenCASCADE_SHAREDLIB_DEBUG_FOUND) + if (WIN32) + set_target_properties (${aLibIter} PROPERTIES IMPORTED_LOCATION_DEBUG "${OpenCASCADE_BINARY_DIR}d/${CMAKE_SHARED_LIBRARY_PREFIX}${aLibIter}${CMAKE_SHARED_LIBRARY_SUFFIX}") + else() + set_target_properties (${aLibIter} PROPERTIES IMPORTED_LOCATION_DEBUG "${OpenCASCADE_LIBRARY_DIR}d/${CMAKE_SHARED_LIBRARY_PREFIX}${aLibIter}${CMAKE_SHARED_LIBRARY_SUFFIX}") + endif() + endif() + endif() + endforeach() +else() + # fallback searching for CMake configs + if (NOT "${OpenCASCADE_DIR}" STREQUAL "") + set (anOcctDirBak "${OpenCASCADE_DIR}") + find_package (OpenCASCADE CONFIG QUIET PATHS "${OpenCASCADE_DIR}" NO_DEFAULT_PATH) + set (OpenCASCADE_DIR "${anOcctDirBak}" CACHE PATH "Path to Open CASCADE libraries." FORCE) + else() + find_package (OpenCASCADE CONFIG QUIET) + endif() +endif() From 16f9b46dbb6420f531ae4005e8d846177217bf6c Mon Sep 17 00:00:00 2001 From: kgv Date: Mon, 11 Oct 2021 22:05:58 +0300 Subject: [PATCH 094/639] 0032612: Data Exchange, RWGltf_CafReader - lost hierarchy of two nested compounds RWGltf_GltfJsonParser::gltfParseSceneNode() - prevent flattering of Scene nodes (allow flattering only of Mesh nodes). Added command XAutoNaming managing XCAFDoc_ShapeTool::SetAutoNaming(). Added comparisons with reference Xdump data to glTF tests. --- src/RWGltf/RWGltf_GltfJsonParser.cxx | 3 +- src/XDEDRAW/XDEDRAW_Shapes.cxx | 39 +++ src/XSDRAWSTLVRML/XSDRAWSTLVRML.cxx | 3 + tests/de_mesh/begin | 17 ++ tests/de_mesh/gltf_read/boxinterleaved | 12 +- tests/de_mesh/gltf_read/brainstem | 72 ++++- tests/de_mesh/gltf_read/buggy | 398 +++++++++++++++++++++++++ tests/de_mesh/gltf_read/cubeemb | 9 + tests/de_mesh/gltf_read/engine | 132 ++++++++ tests/de_mesh/gltf_read/helmet | 9 + tests/de_mesh/gltf_read/lantern | 15 + tests/de_mesh/gltf_read/launchvehicle | 95 +++++- tests/de_mesh/gltf_read/orient | 45 +++ tests/de_mesh/gltf_write/as1 | 271 +++++++++++++++++ tests/de_mesh/gltf_write/ball | 18 +- tests/de_mesh/gltf_write/compound | 38 +++ tests/de_mesh/gltf_write/empty | 13 +- tests/de_mesh/gltf_write/helmet | 9 + tests/de_mesh/gltf_write/helmetglb | 9 + tests/de_mesh/gltf_write/lantern | 15 + tests/de_mesh/gltf_write/lanternglb | 15 + 21 files changed, 1229 insertions(+), 8 deletions(-) create mode 100644 tests/de_mesh/gltf_write/compound diff --git a/src/RWGltf/RWGltf_GltfJsonParser.cxx b/src/RWGltf/RWGltf_GltfJsonParser.cxx index a77903cc6c..3423ebaee1 100644 --- a/src/RWGltf/RWGltf_GltfJsonParser.cxx +++ b/src/RWGltf/RWGltf_GltfJsonParser.cxx @@ -1349,7 +1349,8 @@ bool RWGltf_GltfJsonParser::gltfParseSceneNode (TopoDS_Shape& theNodeShape, } } - if (aNbSubShapes == 1) + if (aChildShapes.IsEmpty() + && aNbSubShapes == 1) { theNodeShape = TopoDS_Iterator (aNodeShape).Value(); } diff --git a/src/XDEDRAW/XDEDRAW_Shapes.cxx b/src/XDEDRAW/XDEDRAW_Shapes.cxx index 4096d6b784..e8614d8765 100644 --- a/src/XDEDRAW/XDEDRAW_Shapes.cxx +++ b/src/XDEDRAW/XDEDRAW_Shapes.cxx @@ -998,6 +998,42 @@ static Standard_Integer XGetProperties(Draw_Interpretor& di, Standard_Integer ar return 0; } +static Standard_Integer XAutoNaming (Draw_Interpretor& theDI, + Standard_Integer theNbArgs, + const char** theArgVec) +{ + if (theNbArgs != 2 && theNbArgs != 3) + { + theDI << "Syntax error: wrong number of arguments"; + return 1; + } + + Handle(TDocStd_Document) aDoc; + DDocStd::GetDocument (theArgVec[1], aDoc); + if (aDoc.IsNull()) + { + theDI << "Syntax error: '" << theArgVec[1] << "' is not a document"; + return 1; + } + + Handle(XCAFDoc_ShapeTool) aShapeTool = XCAFDoc_DocumentTool::ShapeTool (aDoc->Main()); + if (theNbArgs == 2) + { + theDI << (aShapeTool->AutoNaming() ? "1" : "0"); + return 0; + } + + bool toEnable = true; + if (!Draw::ParseOnOff (theArgVec[2], toEnable)) + { + theDI << "Syntax error at '" << theArgVec[2] << "'"; + return 1; + } + + aShapeTool->SetAutoNaming (toEnable); + return 0; +} + //======================================================================= //function : InitCommands //purpose : @@ -1113,4 +1149,7 @@ void XDEDRAW_Shapes::InitCommands(Draw_Interpretor& di) di.Add("XGetProperties", "Doc Label \t: prints named properties assigned to the Label", __FILE__, XGetProperties, g); + + di.Add ("XAutoNaming","Doc [0|1]\t: Disable/enable autonaming to Document", + __FILE__, XAutoNaming, g); } diff --git a/src/XSDRAWSTLVRML/XSDRAWSTLVRML.cxx b/src/XSDRAWSTLVRML/XSDRAWSTLVRML.cxx index b73ec8fbe8..e1e85d3151 100644 --- a/src/XSDRAWSTLVRML/XSDRAWSTLVRML.cxx +++ b/src/XSDRAWSTLVRML/XSDRAWSTLVRML.cxx @@ -494,6 +494,9 @@ static Standard_Integer WriteGltf (Draw_Interpretor& theDI, anApp->NewDocument (TCollection_ExtendedString ("BinXCAF"), aDoc); Handle(XCAFDoc_ShapeTool) aShapeTool = XCAFDoc_DocumentTool::ShapeTool (aDoc->Main()); + // auto-naming doesn't generate meaningful instance names + //aShapeTool->SetAutoNaming (false); + aNodeNameFormat = RWMesh_NameFormat_Product; aShapeTool->AddShape (aShape); } } diff --git a/tests/de_mesh/begin b/tests/de_mesh/begin index 60847cd28b..9953ccecfa 100644 --- a/tests/de_mesh/begin +++ b/tests/de_mesh/begin @@ -1 +1,18 @@ cpulimit 1000 + +# Trims spaces and removed empty lines within multi-line string. +proc trimmedDump { theDump } { + set aDump {} + foreach aLineIter [split $theDump "\n"] { set aLine [string trimright $aLineIter]; if { $aLine != "" } { lappend aDump $aLine } } + return [join $aDump "\n"] +} + +# Check Xdump results with reference data. +proc checkXDump { theDoc theRefDump } { + puts "===== DUMP====" + set aDump [trimmedDump [uplevel #0 Xdump $theDoc]] + puts "==============" + if { $aDump != [trimmedDump $theRefDump] } { + puts "Error: unexpected document '$theDoc' structure\n===REF DUMP===\n$theRefDump\n==============" + } +} diff --git a/tests/de_mesh/gltf_read/boxinterleaved b/tests/de_mesh/gltf_read/boxinterleaved index d309473ba4..6d13c7f1ec 100644 --- a/tests/de_mesh/gltf_read/boxinterleaved +++ b/tests/de_mesh/gltf_read/boxinterleaved @@ -31,5 +31,15 @@ close $fd ReadGltf D ${imagedir}/${casename}.gltf XGetOneShape s D -checknbshapes s -face 1 -compound 0 +checknbshapes s -face 1 -compound 1 checktrinfo s -tri 12 -nod 24 + +set THE_REF_DUMP { +INSTANCE COMPOUND 0:1:1:1 (refers to 0:1:1:2) "Mesh" +PART COMPOUND 0:1:1:2 "Mesh" + FACE 0:1:1:2:1 + +Free Shapes: 1 +INSTANCE COMPOUND 0:1:1:1 (refers to 0:1:1:2) "Mesh" +} +checkXDump D $THE_REF_DUMP diff --git a/tests/de_mesh/gltf_read/brainstem b/tests/de_mesh/gltf_read/brainstem index b9722120ad..35c1ffce66 100644 --- a/tests/de_mesh/gltf_read/brainstem +++ b/tests/de_mesh/gltf_read/brainstem @@ -4,5 +4,75 @@ puts "========" ReadGltf D [locate_data_file bug30691_BrainStem.gltf] XGetOneShape s D -checknbshapes s -face 59 -compound 1 +checknbshapes s -face 59 -compound 2 checktrinfo s -tri 61666 -nod 34159 + +set THE_REF_DUMP { +INSTANCE COMPOUND 0:1:1:1 (refers to 0:1:1:2) "Figure_2_geometry" +ASSEMBLY COMPOUND 0:1:1:2 "Figure_2_geometry" + INSTANCE COMPOUND 0:1:1:2:1 (refers to 0:1:1:3) "Figure_2_geometry" +PART COMPOUND 0:1:1:3 "Figure_2_geometry" + FACE 0:1:1:3:1 + FACE 0:1:1:3:2 + FACE 0:1:1:3:3 + FACE 0:1:1:3:4 + FACE 0:1:1:3:5 + FACE 0:1:1:3:6 + FACE 0:1:1:3:7 + FACE 0:1:1:3:8 + FACE 0:1:1:3:9 + FACE 0:1:1:3:10 + FACE 0:1:1:3:11 + FACE 0:1:1:3:12 + FACE 0:1:1:3:13 + FACE 0:1:1:3:14 + FACE 0:1:1:3:15 + FACE 0:1:1:3:16 + FACE 0:1:1:3:17 + FACE 0:1:1:3:18 + FACE 0:1:1:3:19 + FACE 0:1:1:3:20 + FACE 0:1:1:3:21 + FACE 0:1:1:3:22 + FACE 0:1:1:3:23 + FACE 0:1:1:3:24 + FACE 0:1:1:3:25 + FACE 0:1:1:3:26 + FACE 0:1:1:3:27 + FACE 0:1:1:3:28 + FACE 0:1:1:3:29 + FACE 0:1:1:3:30 + FACE 0:1:1:3:31 + FACE 0:1:1:3:32 + FACE 0:1:1:3:33 + FACE 0:1:1:3:34 + FACE 0:1:1:3:35 + FACE 0:1:1:3:36 + FACE 0:1:1:3:37 + FACE 0:1:1:3:38 + FACE 0:1:1:3:39 + FACE 0:1:1:3:40 + FACE 0:1:1:3:41 + FACE 0:1:1:3:42 + FACE 0:1:1:3:43 + FACE 0:1:1:3:44 + FACE 0:1:1:3:45 + FACE 0:1:1:3:46 + FACE 0:1:1:3:47 + FACE 0:1:1:3:48 + FACE 0:1:1:3:49 + FACE 0:1:1:3:50 + FACE 0:1:1:3:51 + FACE 0:1:1:3:52 + FACE 0:1:1:3:53 + FACE 0:1:1:3:54 + FACE 0:1:1:3:55 + FACE 0:1:1:3:56 + FACE 0:1:1:3:57 + FACE 0:1:1:3:58 + FACE 0:1:1:3:59 + +Free Shapes: 1 +INSTANCE COMPOUND 0:1:1:1 (refers to 0:1:1:2) "Figure_2_geometry" +} +checkXDump D $THE_REF_DUMP diff --git a/tests/de_mesh/gltf_read/buggy b/tests/de_mesh/gltf_read/buggy index 3b7c76c6e7..625d4cf6a6 100644 --- a/tests/de_mesh/gltf_read/buggy +++ b/tests/de_mesh/gltf_read/buggy @@ -6,3 +6,401 @@ ReadGltf D [locate_data_file bug30691_Buggy.glb] XGetOneShape s D checknbshapes s -face 148 -compound 48 checktrinfo s -tri 531955 -nod 412855 + +set THE_REF_DUMP { +INSTANCE COMPOUND 0:1:1:1 (refers to 0:1:1:2) "bug30691_Buggy.glb" + +ASSEMBLY COMPOUND 0:1:1:2 "bug30691_Buggy.glb" + INSTANCE FACE 0:1:1:2:1 (refers to 0:1:1:3) "body_1" + INSTANCE FACE 0:1:1:2:2 (refers to 0:1:1:4) "body_3" + INSTANCE FACE 0:1:1:2:3 (refers to 0:1:1:5) "body_5" + INSTANCE FACE 0:1:1:2:4 (refers to 0:1:1:6) "body_7" + INSTANCE FACE 0:1:1:2:5 (refers to 0:1:1:7) "body_9" + INSTANCE FACE 0:1:1:2:6 (refers to 0:1:1:8) "body_11" + INSTANCE FACE 0:1:1:2:7 (refers to 0:1:1:9) "body_13" + INSTANCE FACE 0:1:1:2:8 (refers to 0:1:1:10) "body_15" + INSTANCE FACE 0:1:1:2:9 (refers to 0:1:1:11) "body_17" + INSTANCE FACE 0:1:1:2:10 (refers to 0:1:1:12) "body_19" + INSTANCE FACE 0:1:1:2:11 (refers to 0:1:1:13) "body_21" + INSTANCE FACE 0:1:1:2:12 (refers to 0:1:1:14) "body_23" + INSTANCE FACE 0:1:1:2:13 (refers to 0:1:1:15) "body_25" + INSTANCE FACE 0:1:1:2:14 (refers to 0:1:1:16) "body_27" + INSTANCE FACE 0:1:1:2:15 (refers to 0:1:1:17) "body_29" + INSTANCE FACE 0:1:1:2:16 (refers to 0:1:1:18) "body_31" + INSTANCE FACE 0:1:1:2:17 (refers to 0:1:1:19) "body_33" + INSTANCE FACE 0:1:1:2:18 (refers to 0:1:1:20) "body_35" + INSTANCE FACE 0:1:1:2:19 (refers to 0:1:1:21) "body_37" + INSTANCE FACE 0:1:1:2:20 (refers to 0:1:1:22) "body_39" + INSTANCE FACE 0:1:1:2:21 (refers to 0:1:1:23) "body_41" + INSTANCE FACE 0:1:1:2:22 (refers to 0:1:1:24) "body_43" + INSTANCE FACE 0:1:1:2:23 (refers to 0:1:1:25) "body_45" + INSTANCE FACE 0:1:1:2:24 (refers to 0:1:1:26) "body_47" + INSTANCE FACE 0:1:1:2:25 (refers to 0:1:1:27) "body_49" + INSTANCE FACE 0:1:1:2:26 (refers to 0:1:1:28) "body_51" + INSTANCE FACE 0:1:1:2:27 (refers to 0:1:1:29) "body_52" + INSTANCE FACE 0:1:1:2:28 (refers to 0:1:1:29) "body_52" + INSTANCE FACE 0:1:1:2:29 (refers to 0:1:1:29) "body_52" + INSTANCE FACE 0:1:1:2:30 (refers to 0:1:1:30) "body_53" + INSTANCE FACE 0:1:1:2:31 (refers to 0:1:1:30) "body_53" + INSTANCE COMPOUND 0:1:1:2:32 (refers to 0:1:1:31) "prt_1_12_SOLIDS_1" + INSTANCE COMPOUND 0:1:1:2:33 (refers to 0:1:1:32) "prt_1_12_SOLIDS_3" + INSTANCE COMPOUND 0:1:1:2:34 (refers to 0:1:1:33) "prt_1_16_SOLIDS_1" + INSTANCE COMPOUND 0:1:1:2:35 (refers to 0:1:1:34) "prt_1_16_SOLIDS_3" + INSTANCE FACE 0:1:1:2:36 (refers to 0:1:1:35) "body_54" + INSTANCE FACE 0:1:1:2:37 (refers to 0:1:1:35) "body_54" + INSTANCE FACE 0:1:1:2:38 (refers to 0:1:1:36) "body_55" + INSTANCE FACE 0:1:1:2:39 (refers to 0:1:1:36) "body_55" + INSTANCE FACE 0:1:1:2:40 (refers to 0:1:1:36) "body_55" + INSTANCE FACE 0:1:1:2:41 (refers to 0:1:1:36) "body_55" + INSTANCE FACE 0:1:1:2:42 (refers to 0:1:1:36) "body_55" + INSTANCE FACE 0:1:1:2:43 (refers to 0:1:1:36) "body_55" + INSTANCE FACE 0:1:1:2:44 (refers to 0:1:1:36) "body_55" + INSTANCE FACE 0:1:1:2:45 (refers to 0:1:1:36) "body_55" + INSTANCE FACE 0:1:1:2:46 (refers to 0:1:1:36) "body_55" + INSTANCE FACE 0:1:1:2:47 (refers to 0:1:1:36) "body_55" + INSTANCE FACE 0:1:1:2:48 (refers to 0:1:1:37) "body_56" + INSTANCE FACE 0:1:1:2:49 (refers to 0:1:1:38) "body_57" + INSTANCE FACE 0:1:1:2:50 (refers to 0:1:1:38) "body_57" + INSTANCE FACE 0:1:1:2:51 (refers to 0:1:1:38) "body_57" + INSTANCE FACE 0:1:1:2:52 (refers to 0:1:1:38) "body_57" + INSTANCE FACE 0:1:1:2:53 (refers to 0:1:1:39) "body_58" + INSTANCE FACE 0:1:1:2:54 (refers to 0:1:1:39) "body_58" + INSTANCE COMPOUND 0:1:1:2:55 (refers to 0:1:1:40) "prt_1_6_SOLIDS_1" + INSTANCE COMPOUND 0:1:1:2:56 (refers to 0:1:1:41) "prt_1_6_SOLIDS_3" + INSTANCE FACE 0:1:1:2:57 (refers to 0:1:1:42) "body_59" + INSTANCE FACE 0:1:1:2:58 (refers to 0:1:1:42) "body_59" + INSTANCE FACE 0:1:1:2:59 (refers to 0:1:1:42) "body_59" + INSTANCE FACE 0:1:1:2:60 (refers to 0:1:1:42) "body_59" + INSTANCE FACE 0:1:1:2:61 (refers to 0:1:1:43) "body_60" + INSTANCE FACE 0:1:1:2:62 (refers to 0:1:1:44) "body_61" + INSTANCE FACE 0:1:1:2:63 (refers to 0:1:1:45) "body_62" + INSTANCE FACE 0:1:1:2:64 (refers to 0:1:1:45) "body_62" + INSTANCE FACE 0:1:1:2:65 (refers to 0:1:1:45) "body_62" + INSTANCE COMPOUND 0:1:1:2:66 (refers to 0:1:1:46) "prt_2_8_t_SOLIDS_1" + INSTANCE COMPOUND 0:1:1:2:67 (refers to 0:1:1:46) "prt_2_8_t_SOLIDS_1" + INSTANCE COMPOUND 0:1:1:2:68 (refers to 0:1:1:47) "prt_2_8_t_SOLIDS_4" + INSTANCE FACE 0:1:1:2:69 (refers to 0:1:1:48) "body_63" + INSTANCE FACE 0:1:1:2:70 (refers to 0:1:1:49) "body_64" + INSTANCE FACE 0:1:1:2:71 (refers to 0:1:1:49) "body_64" + INSTANCE FACE 0:1:1:2:72 (refers to 0:1:1:49) "body_64" + INSTANCE FACE 0:1:1:2:73 (refers to 0:1:1:49) "body_64" + INSTANCE FACE 0:1:1:2:74 (refers to 0:1:1:49) "body_64" + INSTANCE FACE 0:1:1:2:75 (refers to 0:1:1:49) "body_64" + INSTANCE FACE 0:1:1:2:76 (refers to 0:1:1:49) "body_64" + INSTANCE FACE 0:1:1:2:77 (refers to 0:1:1:49) "body_64" + INSTANCE FACE 0:1:1:2:78 (refers to 0:1:1:50) "body_65" + INSTANCE FACE 0:1:1:2:79 (refers to 0:1:1:51) "body_66" + INSTANCE FACE 0:1:1:2:80 (refers to 0:1:1:51) "body_66" + INSTANCE FACE 0:1:1:2:81 (refers to 0:1:1:51) "body_66" + INSTANCE COMPOUND 0:1:1:2:82 (refers to 0:1:1:52) "technic_1_1_p_SOLIDS_1" + INSTANCE COMPOUND 0:1:1:2:83 (refers to 0:1:1:52) "technic_1_1_p_SOLIDS_1" + INSTANCE COMPOUND 0:1:1:2:84 (refers to 0:1:1:52) "technic_1_1_p_SOLIDS_1" + INSTANCE COMPOUND 0:1:1:2:85 (refers to 0:1:1:53) "technic_1_1_p_SOLIDS_5" + INSTANCE FACE 0:1:1:2:86 (refers to 0:1:1:54) "body_67" + INSTANCE COMPOUND 0:1:1:2:87 (refers to 0:1:1:55) "technic_1_2_side_p_SOLIDS_1" + INSTANCE COMPOUND 0:1:1:2:88 (refers to 0:1:1:56) "technic_1_2_side_p_SOLIDS_3" + INSTANCE FACE 0:1:1:2:89 (refers to 0:1:1:57) "body_68" + INSTANCE FACE 0:1:1:2:90 (refers to 0:1:1:58) "body_69" + INSTANCE COMPOUND 0:1:1:2:91 (refers to 0:1:1:59) "technic_bump_support_p_SOLIDS_1" + INSTANCE FACE 0:1:1:2:92 (refers to 0:1:1:60) "body_70" + INSTANCE FACE 0:1:1:2:93 (refers to 0:1:1:60) "body_70" + INSTANCE FACE 0:1:1:2:94 (refers to 0:1:1:60) "body_70" + INSTANCE COMPOUND 0:1:1:2:95 (refers to 0:1:1:61) "technic_shaft_x10_SOLIDS_1" + INSTANCE COMPOUND 0:1:1:2:96 (refers to 0:1:1:62) "technic_shaft_x4_SOLIDS_1" + INSTANCE COMPOUND 0:1:1:2:97 (refers to 0:1:1:62) "technic_shaft_x4_SOLIDS_1" + INSTANCE COMPOUND 0:1:1:2:98 (refers to 0:1:1:63) "technic_shaft_x4_SOLIDS_4" + INSTANCE COMPOUND 0:1:1:2:99 (refers to 0:1:1:64) "technic_shaft_x8_SOLIDS_1" + INSTANCE COMPOUND 0:1:1:2:100 (refers to 0:1:1:65) "technic_shaft_x8_SOLIDS_3" + INSTANCE FACE 0:1:1:2:101 (refers to 0:1:1:66) "body_71" + INSTANCE FACE 0:1:1:2:102 (refers to 0:1:1:67) "body_72" + INSTANCE FACE 0:1:1:2:103 (refers to 0:1:1:67) "body_72" + INSTANCE FACE 0:1:1:2:104 (refers to 0:1:1:67) "body_72" + INSTANCE FACE 0:1:1:2:105 (refers to 0:1:1:67) "body_72" + INSTANCE FACE 0:1:1:2:106 (refers to 0:1:1:67) "body_72" + INSTANCE FACE 0:1:1:2:107 (refers to 0:1:1:68) "body_73" + INSTANCE FACE 0:1:1:2:108 (refers to 0:1:1:68) "body_73" + INSTANCE FACE 0:1:1:2:109 (refers to 0:1:1:68) "body_73" + INSTANCE FACE 0:1:1:2:110 (refers to 0:1:1:68) "body_73" + INSTANCE FACE 0:1:1:2:111 (refers to 0:1:1:68) "body_73" + INSTANCE FACE 0:1:1:2:112 (refers to 0:1:1:69) "body_74" + INSTANCE FACE 0:1:1:2:113 (refers to 0:1:1:69) "body_74" + INSTANCE FACE 0:1:1:2:114 (refers to 0:1:1:69) "body_74" + INSTANCE COMPOUND 0:1:1:2:115 (refers to 0:1:1:70) "x_prt_1_2_a_u_SOLIDS_1" + INSTANCE COMPOUND 0:1:1:2:116 (refers to 0:1:1:71) "x_prt_1_2_a_u_SOLIDS_3" + INSTANCE COMPOUND 0:1:1:2:117 (refers to 0:1:1:72) "Compound" + INSTANCE COMPOUND 0:1:1:2:118 (refers to 0:1:1:75) "Compound" + INSTANCE COMPOUND 0:1:1:2:119 (refers to 0:1:1:78) "Compound" + INSTANCE COMPOUND 0:1:1:2:120 (refers to 0:1:1:82) "Compound" + INSTANCE COMPOUND 0:1:1:2:121 (refers to 0:1:1:86) "Compound" + INSTANCE COMPOUND 0:1:1:2:122 (refers to 0:1:1:107) "Compound" + INSTANCE COMPOUND 0:1:1:2:123 (refers to 0:1:1:108) "Compound" + INSTANCE COMPOUND 0:1:1:2:124 (refers to 0:1:1:109) "Compound" + INSTANCE COMPOUND 0:1:1:2:125 (refers to 0:1:1:110) "Compound" + INSTANCE COMPOUND 0:1:1:2:126 (refers to 0:1:1:111) "Compound" + INSTANCE COMPOUND 0:1:1:2:127 (refers to 0:1:1:112) "Compound" + INSTANCE COMPOUND 0:1:1:2:128 (refers to 0:1:1:113) "Compound" + INSTANCE COMPOUND 0:1:1:2:129 (refers to 0:1:1:114) "Compound" +PART FACE 0:1:1:3 "body_1" +PART FACE 0:1:1:4 "body_3" +PART FACE 0:1:1:5 "body_5" +PART FACE 0:1:1:6 "body_7" +PART FACE 0:1:1:7 "body_9" +PART FACE 0:1:1:8 "body_11" +PART FACE 0:1:1:9 "body_13" +PART FACE 0:1:1:10 "body_15" +PART FACE 0:1:1:11 "body_17" +PART FACE 0:1:1:12 "body_19" +PART FACE 0:1:1:13 "body_21" +PART FACE 0:1:1:14 "body_23" +PART FACE 0:1:1:15 "body_25" +PART FACE 0:1:1:16 "body_27" +PART FACE 0:1:1:17 "body_29" +PART FACE 0:1:1:18 "body_31" +PART FACE 0:1:1:19 "body_33" +PART FACE 0:1:1:20 "body_35" +PART FACE 0:1:1:21 "body_37" +PART FACE 0:1:1:22 "body_39" +PART FACE 0:1:1:23 "body_41" +PART FACE 0:1:1:24 "body_43" +PART FACE 0:1:1:25 "body_45" +PART FACE 0:1:1:26 "body_47" +PART FACE 0:1:1:27 "body_49" +PART FACE 0:1:1:28 "body_51" +PART FACE 0:1:1:29 "body_52" +PART FACE 0:1:1:30 "body_53" +PART COMPOUND 0:1:1:31 "prt_1_12_SOLIDS_1" + FACE 0:1:1:31:1 + FACE 0:1:1:31:2 + FACE 0:1:1:31:3 +PART COMPOUND 0:1:1:32 "prt_1_12_SOLIDS_3" + FACE 0:1:1:32:1 + FACE 0:1:1:32:2 + FACE 0:1:1:32:3 +PART COMPOUND 0:1:1:33 "prt_1_16_SOLIDS_1" + FACE 0:1:1:33:1 + FACE 0:1:1:33:2 + FACE 0:1:1:33:3 +PART COMPOUND 0:1:1:34 "prt_1_16_SOLIDS_3" + FACE 0:1:1:34:1 + FACE 0:1:1:34:2 + FACE 0:1:1:34:3 +PART FACE 0:1:1:35 "body_54" +PART FACE 0:1:1:36 "body_55" +PART FACE 0:1:1:37 "body_56" +PART FACE 0:1:1:38 "body_57" +PART FACE 0:1:1:39 "body_58" +PART COMPOUND 0:1:1:40 "prt_1_6_SOLIDS_1" + FACE 0:1:1:40:1 + FACE 0:1:1:40:2 +PART COMPOUND 0:1:1:41 "prt_1_6_SOLIDS_3" + FACE 0:1:1:41:1 + FACE 0:1:1:41:2 +PART FACE 0:1:1:42 "body_59" +PART FACE 0:1:1:43 "body_60" +PART FACE 0:1:1:44 "body_61" +PART FACE 0:1:1:45 "body_62" +PART COMPOUND 0:1:1:46 "prt_2_8_t_SOLIDS_1" + FACE 0:1:1:46:1 + FACE 0:1:1:46:2 +PART COMPOUND 0:1:1:47 "prt_2_8_t_SOLIDS_4" + FACE 0:1:1:47:1 + FACE 0:1:1:47:2 +PART FACE 0:1:1:48 "body_63" +PART FACE 0:1:1:49 "body_64" +PART FACE 0:1:1:50 "body_65" +PART FACE 0:1:1:51 "body_66" +PART COMPOUND 0:1:1:52 "technic_1_1_p_SOLIDS_1" + FACE 0:1:1:52:1 + FACE 0:1:1:52:2 +PART COMPOUND 0:1:1:53 "technic_1_1_p_SOLIDS_5" + FACE 0:1:1:53:1 + FACE 0:1:1:53:2 +PART FACE 0:1:1:54 "body_67" +PART COMPOUND 0:1:1:55 "technic_1_2_side_p_SOLIDS_1" + FACE 0:1:1:55:1 + FACE 0:1:1:55:2 +PART COMPOUND 0:1:1:56 "technic_1_2_side_p_SOLIDS_3" + FACE 0:1:1:56:1 + FACE 0:1:1:56:2 +PART FACE 0:1:1:57 "body_68" +PART FACE 0:1:1:58 "body_69" +PART COMPOUND 0:1:1:59 "technic_bump_support_p_SOLIDS_1" + FACE 0:1:1:59:1 + FACE 0:1:1:59:2 +PART FACE 0:1:1:60 "body_70" +PART COMPOUND 0:1:1:61 "technic_shaft_x10_SOLIDS_1" + FACE 0:1:1:61:1 + FACE 0:1:1:61:2 +PART COMPOUND 0:1:1:62 "technic_shaft_x4_SOLIDS_1" + FACE 0:1:1:62:1 + FACE 0:1:1:62:2 +PART COMPOUND 0:1:1:63 "technic_shaft_x4_SOLIDS_4" + FACE 0:1:1:63:1 + FACE 0:1:1:63:2 +PART COMPOUND 0:1:1:64 "technic_shaft_x8_SOLIDS_1" + FACE 0:1:1:64:1 + FACE 0:1:1:64:2 +PART COMPOUND 0:1:1:65 "technic_shaft_x8_SOLIDS_3" + FACE 0:1:1:65:1 + FACE 0:1:1:65:2 +PART FACE 0:1:1:66 "body_71" +PART FACE 0:1:1:67 "body_72" +PART FACE 0:1:1:68 "body_73" +PART FACE 0:1:1:69 "body_74" +PART COMPOUND 0:1:1:70 "x_prt_1_2_a_u_SOLIDS_1" + FACE 0:1:1:70:1 + FACE 0:1:1:70:2 +PART COMPOUND 0:1:1:71 "x_prt_1_2_a_u_SOLIDS_3" + FACE 0:1:1:71:1 + FACE 0:1:1:71:2 +ASSEMBLY COMPOUND 0:1:1:72 "Compound" + INSTANCE COMPOUND 0:1:1:72:1 (refers to 0:1:1:73) "tech_light_p_SOLIDS_1" + INSTANCE COMPOUND 0:1:1:72:2 (refers to 0:1:1:74) "technic_2_2_l_p_SOLIDS_1" +PART COMPOUND 0:1:1:73 "tech_light_p_SOLIDS_1" + FACE 0:1:1:73:1 + FACE 0:1:1:73:2 +PART COMPOUND 0:1:1:74 "technic_2_2_l_p_SOLIDS_1" + FACE 0:1:1:74:1 + FACE 0:1:1:74:2 +ASSEMBLY COMPOUND 0:1:1:75 "Compound" + INSTANCE COMPOUND 0:1:1:75:1 (refers to 0:1:1:76) "tech_light_p_SOLIDS_3" + INSTANCE COMPOUND 0:1:1:75:2 (refers to 0:1:1:77) "technic_2_2_l_p_SOLIDS_3" +PART COMPOUND 0:1:1:76 "tech_light_p_SOLIDS_3" + FACE 0:1:1:76:1 + FACE 0:1:1:76:2 +PART COMPOUND 0:1:1:77 "technic_2_2_l_p_SOLIDS_3" + FACE 0:1:1:77:1 + FACE 0:1:1:77:2 +ASSEMBLY COMPOUND 0:1:1:78 "Compound" + INSTANCE FACE 0:1:1:78:1 (refers to 0:1:1:79) "body_76" + INSTANCE FACE 0:1:1:78:2 (refers to 0:1:1:80) "body_78" + INSTANCE FACE 0:1:1:78:3 (refers to 0:1:1:81) "body_79" + INSTANCE COMPOUND 0:1:1:78:4 (refers to 0:1:1:64) "technic_shaft_x8_SOLIDS_1" +PART FACE 0:1:1:79 "body_76" +PART FACE 0:1:1:80 "body_78" +PART FACE 0:1:1:81 "body_79" +ASSEMBLY COMPOUND 0:1:1:82 "Compound" + INSTANCE FACE 0:1:1:82:1 (refers to 0:1:1:83) "body_81" + INSTANCE FACE 0:1:1:82:2 (refers to 0:1:1:84) "body_82" + INSTANCE COMPOUND 0:1:1:82:3 (refers to 0:1:1:85) "technic_shaft_x6_SOLIDS_1" + INSTANCE FACE 0:1:1:82:4 (refers to 0:1:1:66) "body_71" + INSTANCE FACE 0:1:1:82:5 (refers to 0:1:1:66) "body_71" + INSTANCE FACE 0:1:1:82:6 (refers to 0:1:1:66) "body_71" +PART FACE 0:1:1:83 "body_81" +PART FACE 0:1:1:84 "body_82" +PART COMPOUND 0:1:1:85 "technic_shaft_x6_SOLIDS_1" + FACE 0:1:1:85:1 + FACE 0:1:1:85:2 +ASSEMBLY COMPOUND 0:1:1:86 "Compound" + INSTANCE FACE 0:1:1:86:1 (refers to 0:1:1:87) "body_84" + INSTANCE FACE 0:1:1:86:2 (refers to 0:1:1:88) "body_86" + INSTANCE FACE 0:1:1:86:3 (refers to 0:1:1:89) "body_88" + INSTANCE FACE 0:1:1:86:4 (refers to 0:1:1:90) "body_90" + INSTANCE FACE 0:1:1:86:5 (refers to 0:1:1:91) "body_92" + INSTANCE FACE 0:1:1:86:6 (refers to 0:1:1:92) "body_94" + INSTANCE FACE 0:1:1:86:7 (refers to 0:1:1:93) "body_96" + INSTANCE COMPOUND 0:1:1:86:8 (refers to 0:1:1:94) "technic_driver_arm_joint_p_SOLIDS_1" + INSTANCE COMPOUND 0:1:1:86:9 (refers to 0:1:1:94) "technic_driver_arm_joint_p_SOLIDS_1" + INSTANCE COMPOUND 0:1:1:86:10 (refers to 0:1:1:94) "technic_driver_arm_joint_p_SOLIDS_1" + INSTANCE COMPOUND 0:1:1:86:11 (refers to 0:1:1:95) "technic_driver_arm_joint_p_SOLIDS_5" + INSTANCE FACE 0:1:1:86:12 (refers to 0:1:1:96) "body_97" + INSTANCE FACE 0:1:1:86:13 (refers to 0:1:1:96) "body_97" + INSTANCE FACE 0:1:1:86:14 (refers to 0:1:1:96) "body_97" + INSTANCE FACE 0:1:1:86:15 (refers to 0:1:1:97) "body_98" + INSTANCE FACE 0:1:1:86:16 (refers to 0:1:1:97) "body_98" + INSTANCE FACE 0:1:1:86:17 (refers to 0:1:1:97) "body_98" + INSTANCE FACE 0:1:1:86:18 (refers to 0:1:1:98) "body_99" + INSTANCE FACE 0:1:1:86:19 (refers to 0:1:1:99) "body_100" + INSTANCE COMPOUND 0:1:1:86:20 (refers to 0:1:1:100) "technic_driver_head_p_SOLIDS_1" + INSTANCE COMPOUND 0:1:1:86:21 (refers to 0:1:1:101) "technic_driver_helmet_p_SOLIDS_1" + INSTANCE COMPOUND 0:1:1:86:22 (refers to 0:1:1:102) "technic_driver_hip_joint_p_SOLIDS_1" + INSTANCE COMPOUND 0:1:1:86:23 (refers to 0:1:1:103) "technic_driver_shin_p_SOLIDS_1" + INSTANCE COMPOUND 0:1:1:86:24 (refers to 0:1:1:104) "technic_driver_shin_p_SOLIDS_3" + INSTANCE COMPOUND 0:1:1:86:25 (refers to 0:1:1:105) "technic_driver_thigh_l_p_SOLIDS_1" + INSTANCE COMPOUND 0:1:1:86:26 (refers to 0:1:1:106) "technic_driver_torso_p_SOLIDS_1" +PART FACE 0:1:1:87 "body_84" +PART FACE 0:1:1:88 "body_86" +PART FACE 0:1:1:89 "body_88" +PART FACE 0:1:1:90 "body_90" +PART FACE 0:1:1:91 "body_92" +PART FACE 0:1:1:92 "body_94" +PART FACE 0:1:1:93 "body_96" +PART COMPOUND 0:1:1:94 "technic_driver_arm_joint_p_SOLIDS_1" + FACE 0:1:1:94:1 + FACE 0:1:1:94:2 +PART COMPOUND 0:1:1:95 "technic_driver_arm_joint_p_SOLIDS_5" + FACE 0:1:1:95:1 + FACE 0:1:1:95:2 +PART FACE 0:1:1:96 "body_97" +PART FACE 0:1:1:97 "body_98" +PART FACE 0:1:1:98 "body_99" +PART FACE 0:1:1:99 "body_100" +PART COMPOUND 0:1:1:100 "technic_driver_head_p_SOLIDS_1" + FACE 0:1:1:100:1 + FACE 0:1:1:100:2 + FACE 0:1:1:100:3 +PART COMPOUND 0:1:1:101 "technic_driver_helmet_p_SOLIDS_1" + FACE 0:1:1:101:1 + FACE 0:1:1:101:2 +PART COMPOUND 0:1:1:102 "technic_driver_hip_joint_p_SOLIDS_1" + FACE 0:1:1:102:1 + FACE 0:1:1:102:2 +PART COMPOUND 0:1:1:103 "technic_driver_shin_p_SOLIDS_1" + FACE 0:1:1:103:1 + FACE 0:1:1:103:2 +PART COMPOUND 0:1:1:104 "technic_driver_shin_p_SOLIDS_3" + FACE 0:1:1:104:1 + FACE 0:1:1:104:2 +PART COMPOUND 0:1:1:105 "technic_driver_thigh_l_p_SOLIDS_1" + FACE 0:1:1:105:1 + FACE 0:1:1:105:2 +PART COMPOUND 0:1:1:106 "technic_driver_torso_p_SOLIDS_1" + FACE 0:1:1:106:1 + FACE 0:1:1:106:2 +PART COMPOUND 0:1:1:107 "Compound" + FACE 0:1:1:107:1 "body_102" + FACE 0:1:1:107:2 "body_104" + FACE 0:1:1:107:3 "body_106" + FACE 0:1:1:107:4 "body_107" + FACE 0:1:1:107:5 "body_107" + FACE 0:1:1:107:6 "body_108" + FACE 0:1:1:107:7 "body_72" + FACE 0:1:1:107:8 "body_72" +PART COMPOUND 0:1:1:108 "Compound" + FACE 0:1:1:108:1 "body_109" + FACE 0:1:1:108:2 "body_107" + FACE 0:1:1:108:3 "body_107" + FACE 0:1:1:108:4 "body_107" + FACE 0:1:1:108:5 "body_108" + FACE 0:1:1:108:6 "body_108" + FACE 0:1:1:108:7 "body_72" + FACE 0:1:1:108:8 "body_72" +PART COMPOUND 0:1:1:109 "Compound" + FACE 0:1:1:109:1 "body_111" + FACE 0:1:1:109:2 "body_113" + FACE 0:1:1:109:3 "body_72" +PART COMPOUND 0:1:1:110 "Compound" + FACE 0:1:1:110:1 "body_114" + FACE 0:1:1:110:2 "body_72" + FACE 0:1:1:110:3 "body_115" +PART COMPOUND 0:1:1:111 "Compound" + FACE 0:1:1:111:1 "body_114" + FACE 0:1:1:111:2 "body_72" + FACE 0:1:1:111:3 "body_115" +PART COMPOUND 0:1:1:112 "Compound" + FACE 0:1:1:112:1 "body_114" + FACE 0:1:1:112:2 "body_72" + FACE 0:1:1:112:3 "body_115" +PART COMPOUND 0:1:1:113 "Compound" + FACE 0:1:1:113:1 "body_114" + FACE 0:1:1:113:2 "body_72" + FACE 0:1:1:113:3 "body_115" +PART COMPOUND 0:1:1:114 "Compound" + FACE 0:1:1:114:1 "body_114" + FACE 0:1:1:114:2 "body_72" + FACE 0:1:1:114:3 "body_115" + +Free Shapes: 1 +INSTANCE COMPOUND 0:1:1:1 (refers to 0:1:1:2) "bug30691_Buggy.glb" +} +checkXDump D $THE_REF_DUMP diff --git a/tests/de_mesh/gltf_read/cubeemb b/tests/de_mesh/gltf_read/cubeemb index 67961d11cf..9a9cc0fe51 100644 --- a/tests/de_mesh/gltf_read/cubeemb +++ b/tests/de_mesh/gltf_read/cubeemb @@ -42,3 +42,12 @@ ReadGltf D ${imagedir}/${casename}.gltf XGetOneShape s D checknbshapes s -face 1 -compound 0 checktrinfo s -tri 12 -nod 24 + +set THE_REF_DUMP { +INSTANCE FACE 0:1:1:1 (refers to 0:1:1:2) "Cube" +PART FACE 0:1:1:2 "Cube" + +Free Shapes: 1 +INSTANCE FACE 0:1:1:1 (refers to 0:1:1:2) "Cube" +} +checkXDump D $THE_REF_DUMP diff --git a/tests/de_mesh/gltf_read/engine b/tests/de_mesh/gltf_read/engine index cd152b8e13..acd332ca20 100644 --- a/tests/de_mesh/gltf_read/engine +++ b/tests/de_mesh/gltf_read/engine @@ -6,3 +6,135 @@ ReadGltf D [locate_data_file bug30691_2CylinderEngine.glb] XGetOneShape s D checknbshapes s -face 34 -compound 18 checktrinfo s -tri 121496 -nod 84657 + +set THE_REF_DUMP { +ASSEMBLY COMPOUND 0:1:1:1 "bug30691_2CylinderEngine.glb" + INSTANCE FACE 0:1:1:1:1 (refers to 0:1:1:2) "body" + INSTANCE FACE 0:1:1:1:2 (refers to 0:1:1:2) "body" + INSTANCE COMPOUND 0:1:1:1:3 (refers to 0:1:1:3) "Lifter_123-923_0_Parts_1" + INSTANCE COMPOUND 0:1:1:1:4 (refers to 0:1:1:3) "Lifter_123-923_0_Parts_1" + INSTANCE COMPOUND 0:1:1:1:5 (refers to 0:1:1:3) "Lifter_123-923_0_Parts_1" + INSTANCE COMPOUND 0:1:1:1:6 (refers to 0:1:1:3) "Lifter_123-923_0_Parts_1" + INSTANCE COMPOUND 0:1:1:1:7 (refers to 0:1:1:4) "rod_123-699_0_Parts_1" + INSTANCE COMPOUND 0:1:1:1:8 (refers to 0:1:1:4) "rod_123-699_0_Parts_1" + INSTANCE COMPOUND 0:1:1:1:9 (refers to 0:1:1:5) "Compound" + INSTANCE COMPOUND 0:1:1:1:10 (refers to 0:1:1:31) "Compound" + INSTANCE COMPOUND 0:1:1:1:11 (refers to 0:1:1:32) "Compound" + INSTANCE COMPOUND 0:1:1:1:12 (refers to 0:1:1:33) "Compound" + INSTANCE COMPOUND 0:1:1:1:13 (refers to 0:1:1:36) "Compound" +PART FACE 0:1:1:2 "body" +PART COMPOUND 0:1:1:3 "Lifter_123-923_0_Parts_1" + FACE 0:1:1:3:1 + FACE 0:1:1:3:2 +PART COMPOUND 0:1:1:4 "rod_123-699_0_Parts_1" + FACE 0:1:1:4:1 + FACE 0:1:1:4:2 +ASSEMBLY COMPOUND 0:1:1:5 "Compound" + INSTANCE FACE 0:1:1:5:1 (refers to 0:1:1:6) "Face" + INSTANCE FACE 0:1:1:5:2 (refers to 0:1:1:7) "body_2" + INSTANCE FACE 0:1:1:5:3 (refers to 0:1:1:8) "body_3" + INSTANCE FACE 0:1:1:5:4 (refers to 0:1:1:2) "body" + INSTANCE FACE 0:1:1:5:5 (refers to 0:1:1:2) "body" + INSTANCE FACE 0:1:1:5:6 (refers to 0:1:1:9) "body_4" + INSTANCE FACE 0:1:1:5:7 (refers to 0:1:1:10) "body_5" + INSTANCE FACE 0:1:1:5:8 (refers to 0:1:1:11) "body_6" + INSTANCE COMPOUND 0:1:1:5:9 (refers to 0:1:1:12) "Compound" +PART FACE 0:1:1:6 "Face" +PART FACE 0:1:1:7 "body_2" +PART FACE 0:1:1:8 "body_3" +PART FACE 0:1:1:9 "body_4" +PART FACE 0:1:1:10 "body_5" +PART FACE 0:1:1:11 "body_6" +ASSEMBLY COMPOUND 0:1:1:12 "Compound" + INSTANCE FACE 0:1:1:12:1 (refers to 0:1:1:13) "body_7" + INSTANCE FACE 0:1:1:12:2 (refers to 0:1:1:13) "body_7" + INSTANCE FACE 0:1:1:12:3 (refers to 0:1:1:14) "body_8" + INSTANCE FACE 0:1:1:12:4 (refers to 0:1:1:15) "body_9" + INSTANCE FACE 0:1:1:12:5 (refers to 0:1:1:16) "body_10" + INSTANCE FACE 0:1:1:12:6 (refers to 0:1:1:17) "body_11" + INSTANCE FACE 0:1:1:12:7 (refers to 0:1:1:18) "body_12" + INSTANCE FACE 0:1:1:12:8 (refers to 0:1:1:19) "body_13" + INSTANCE FACE 0:1:1:12:9 (refers to 0:1:1:19) "body_13" + INSTANCE COMPOUND 0:1:1:12:10 (refers to 0:1:1:20) "Compound" + INSTANCE COMPOUND 0:1:1:12:11 (refers to 0:1:1:24) "Compound" + INSTANCE COMPOUND 0:1:1:12:12 (refers to 0:1:1:29) "Compound" +PART FACE 0:1:1:13 "body_7" +PART FACE 0:1:1:14 "body_8" +PART FACE 0:1:1:15 "body_9" +PART FACE 0:1:1:16 "body_10" +PART FACE 0:1:1:17 "body_11" +PART FACE 0:1:1:18 "body_12" +PART FACE 0:1:1:19 "body_13" +ASSEMBLY COMPOUND 0:1:1:20 "Compound" + INSTANCE FACE 0:1:1:20:1 (refers to 0:1:1:21) "body_14" + INSTANCE FACE 0:1:1:20:2 (refers to 0:1:1:21) "body_14" + INSTANCE COMPOUND 0:1:1:20:3 (refers to 0:1:1:22) "Compound" + INSTANCE COMPOUND 0:1:1:20:4 (refers to 0:1:1:23) "Compound" +PART FACE 0:1:1:21 "body_14" +PART COMPOUND 0:1:1:22 "Compound" + FACE 0:1:1:22:1 "body_15" + FACE 0:1:1:22:2 "body_15" + FACE 0:1:1:22:3 "body_16" + FACE 0:1:1:22:4 "body_17" +PART COMPOUND 0:1:1:23 "Compound" + FACE 0:1:1:23:1 "body_15" + FACE 0:1:1:23:2 "body_15" + FACE 0:1:1:23:3 "body_16" + FACE 0:1:1:23:4 "body_17" +ASSEMBLY COMPOUND 0:1:1:24 "Compound" + INSTANCE FACE 0:1:1:24:1 (refers to 0:1:1:25) "body_18" + INSTANCE FACE 0:1:1:24:2 (refers to 0:1:1:26) "body_19" + INSTANCE COMPOUND 0:1:1:24:3 (refers to 0:1:1:27) "Spring_Link__0_Parts_1" +PART FACE 0:1:1:25 "body_18" +PART FACE 0:1:1:26 "body_19" +ASSEMBLY COMPOUND 0:1:1:27 "Spring_Link__0_Parts_1" + INSTANCE COMPOUND 0:1:1:27:1 (refers to 0:1:1:28) "Spring_Link__0_Parts_1" + INSTANCE COMPOUND 0:1:1:27:2 (refers to 0:1:1:28) "Spring_Link__0_Parts_1" + INSTANCE COMPOUND 0:1:1:27:3 (refers to 0:1:1:28) "Spring_Link__0_Parts_1" + INSTANCE COMPOUND 0:1:1:27:4 (refers to 0:1:1:28) "Spring_Link__0_Parts_1" + INSTANCE COMPOUND 0:1:1:27:5 (refers to 0:1:1:28) "Spring_Link__0_Parts_1" + INSTANCE COMPOUND 0:1:1:27:6 (refers to 0:1:1:28) "Spring_Link__0_Parts_1" + INSTANCE COMPOUND 0:1:1:27:7 (refers to 0:1:1:28) "Spring_Link__0_Parts_1" + INSTANCE COMPOUND 0:1:1:27:8 (refers to 0:1:1:28) "Spring_Link__0_Parts_1" + INSTANCE COMPOUND 0:1:1:27:9 (refers to 0:1:1:28) "Spring_Link__0_Parts_1" + INSTANCE COMPOUND 0:1:1:27:10 (refers to 0:1:1:28) "Spring_Link__0_Parts_1" +PART COMPOUND 0:1:1:28 "Spring_Link__0_Parts_1" + FACE 0:1:1:28:1 + FACE 0:1:1:28:2 + FACE 0:1:1:28:3 +ASSEMBLY COMPOUND 0:1:1:29 "Compound" + INSTANCE FACE 0:1:1:29:1 (refers to 0:1:1:25) "body_18" + INSTANCE FACE 0:1:1:29:2 (refers to 0:1:1:26) "body_19" + INSTANCE COMPOUND 0:1:1:29:3 (refers to 0:1:1:30) "Spring_Link__0_Parts_1" +ASSEMBLY COMPOUND 0:1:1:30 "Spring_Link__0_Parts_1" + INSTANCE COMPOUND 0:1:1:30:1 (refers to 0:1:1:28) "Spring_Link__0_Parts_1" + INSTANCE COMPOUND 0:1:1:30:2 (refers to 0:1:1:28) "Spring_Link__0_Parts_1" + INSTANCE COMPOUND 0:1:1:30:3 (refers to 0:1:1:28) "Spring_Link__0_Parts_1" + INSTANCE COMPOUND 0:1:1:30:4 (refers to 0:1:1:28) "Spring_Link__0_Parts_1" + INSTANCE COMPOUND 0:1:1:30:5 (refers to 0:1:1:28) "Spring_Link__0_Parts_1" + INSTANCE COMPOUND 0:1:1:30:6 (refers to 0:1:1:28) "Spring_Link__0_Parts_1" + INSTANCE COMPOUND 0:1:1:30:7 (refers to 0:1:1:28) "Spring_Link__0_Parts_1" + INSTANCE COMPOUND 0:1:1:30:8 (refers to 0:1:1:28) "Spring_Link__0_Parts_1" + INSTANCE COMPOUND 0:1:1:30:9 (refers to 0:1:1:28) "Spring_Link__0_Parts_1" + INSTANCE COMPOUND 0:1:1:30:10 (refers to 0:1:1:28) "Spring_Link__0_Parts_1" +PART COMPOUND 0:1:1:31 "Compound" + FACE 0:1:1:31:1 "body_20" + FACE 0:1:1:31:2 "body_21" +PART COMPOUND 0:1:1:32 "Compound" + FACE 0:1:1:32:1 "body_22" + FACE 0:1:1:32:2 "body_23" +ASSEMBLY COMPOUND 0:1:1:33 "Compound" + INSTANCE FACE 0:1:1:33:1 (refers to 0:1:1:34) "body_24" + INSTANCE COMPOUND 0:1:1:33:2 (refers to 0:1:1:35) "Piston_123-844_0_Parts_1" +PART FACE 0:1:1:34 "body_24" +PART COMPOUND 0:1:1:35 "Piston_123-844_0_Parts_1" + FACE 0:1:1:35:1 + FACE 0:1:1:35:2 +ASSEMBLY COMPOUND 0:1:1:36 "Compound" + INSTANCE FACE 0:1:1:36:1 (refers to 0:1:1:34) "body_24" + INSTANCE COMPOUND 0:1:1:36:2 (refers to 0:1:1:35) "Piston_123-844_0_Parts_1" + +Free Shapes: 1 +ASSEMBLY COMPOUND 0:1:1:1 "bug30691_2CylinderEngine.glb" +} +checkXDump D $THE_REF_DUMP diff --git a/tests/de_mesh/gltf_read/helmet b/tests/de_mesh/gltf_read/helmet index e03aa51473..c54d675558 100644 --- a/tests/de_mesh/gltf_read/helmet +++ b/tests/de_mesh/gltf_read/helmet @@ -6,3 +6,12 @@ ReadGltf D [locate_data_file bug30691_DamagedHelmet.gltf] XGetOneShape s D checknbshapes s -face 1 -compound 0 checktrinfo s -tri 15452 -nod 14556 + +set THE_REF_DUMP { +INSTANCE FACE 0:1:1:1 (refers to 0:1:1:2) "node_damagedHelmet_-6514" +PART FACE 0:1:1:2 "mesh_helmet_LP_13930damagedHelmet" + +Free Shapes: 1 +INSTANCE FACE 0:1:1:1 (refers to 0:1:1:2) "node_damagedHelmet_-6514" +} +checkXDump D $THE_REF_DUMP diff --git a/tests/de_mesh/gltf_read/lantern b/tests/de_mesh/gltf_read/lantern index d9d1f791d2..e4f4158ded 100644 --- a/tests/de_mesh/gltf_read/lantern +++ b/tests/de_mesh/gltf_read/lantern @@ -6,3 +6,18 @@ ReadGltf D [locate_data_file bug30691_Lantern.glb] XGetOneShape s D checknbshapes s -face 3 -compound 1 checktrinfo s -tri 5394 -nod 4145 + +set THE_REF_DUMP { +INSTANCE COMPOUND 0:1:1:1 (refers to 0:1:1:2) "Lantern" +ASSEMBLY COMPOUND 0:1:1:2 "Lantern" + INSTANCE FACE 0:1:1:2:1 (refers to 0:1:1:3) "LanternPole_Body" + INSTANCE FACE 0:1:1:2:2 (refers to 0:1:1:4) "LanternPole_Chain" + INSTANCE FACE 0:1:1:2:3 (refers to 0:1:1:5) "LanternPole_Lantern" +PART FACE 0:1:1:3 "LanternPole_Body" +PART FACE 0:1:1:4 "LanternPole_Chain" +PART FACE 0:1:1:5 "LanternPole_Lantern" + +Free Shapes: 1 +INSTANCE COMPOUND 0:1:1:1 (refers to 0:1:1:2) "Lantern" +} +checkXDump D $THE_REF_DUMP diff --git a/tests/de_mesh/gltf_read/launchvehicle b/tests/de_mesh/gltf_read/launchvehicle index 26b108fa9c..f3590ade28 100644 --- a/tests/de_mesh/gltf_read/launchvehicle +++ b/tests/de_mesh/gltf_read/launchvehicle @@ -4,12 +4,101 @@ puts "========" ReadGltf D [locate_data_file bug31706_launchvehicle.glb] XGetOneShape s D -checknbshapes s -face 9 -compound 13 +checknbshapes s -face 9 -compound 22 checktrinfo s -tri 47640 -nod 35270 -if { [XDumpLocation D 0:1:1:15:5] != "Transformation (3 rows * 4 columns matrix): (1,0,0,0) (0,1,0,-3350) (0,0,1,-2700)" } { +if { [XDumpLocation D 0:1:1:22:5] != "Transformation (3 rows * 4 columns matrix): (1,0,0,0) (0,1,0,-3350) (0,0,1,-2700)" } { puts "Error: wrong location of D:Root/CentaurBody/Fairing1" } -if { [XDumpLocation D 0:1:1:15:6] != "Transformation (3 rows * 4 columns matrix): (-1,-0,-1.50996e-07,0.000407689) (0,1,0,-3350) (1.50996e-07,0,-1,2700)" } { +if { [XDumpLocation D 0:1:1:22:6] != "Transformation (3 rows * 4 columns matrix): (-1,-0,-1.50996e-07,0) (0,1,0,8000) (1.50996e-07,0,-1,0)" } { puts "Error: wrong location of D:Root/CentaurBody/FairingFlipper_180_Y" } +if { [XDumpLocation D 0:1:1:29:1] != "Transformation (3 rows * 4 columns matrix): (1,0,0,0) (0,1,0,-11350) (0,0,1,-2700)" } { + puts "Error: wrong location of D:Root/CentaurBody/FairingFlipper_180_Y/Fairing2" +} + +set THE_REF_DUMP { +ASSEMBLY COMPOUND 0:1:1:1 "Root" + INSTANCE COMPOUND 0:1:1:1:1 (refers to 0:1:1:2) "Booster" + INSTANCE COMPOUND 0:1:1:1:2 (refers to 0:1:1:22) "CentaurBody" + INSTANCE FACE 0:1:1:1:3 (refers to 0:1:1:31) "InterstageAdapter" +ASSEMBLY COMPOUND 0:1:1:2 "Booster" + INSTANCE COMPOUND 0:1:1:2:1 (refers to 0:1:1:3) "BoosterEng2_Parent" + INSTANCE COMPOUND 0:1:1:2:2 (refers to 0:1:1:7) "BoosterEngine1" + INSTANCE COMPOUND 0:1:1:2:3 (refers to 0:1:1:8) "SRB_1_Parent" + INSTANCE COMPOUND 0:1:1:2:4 (refers to 0:1:1:11) "SRB_2_Parent" + INSTANCE COMPOUND 0:1:1:2:5 (refers to 0:1:1:13) "SRB_3_Parent" + INSTANCE COMPOUND 0:1:1:2:6 (refers to 0:1:1:15) "SRB_4_Parent" + INSTANCE COMPOUND 0:1:1:2:7 (refers to 0:1:1:17) "SRB_5_Parent" + INSTANCE COMPOUND 0:1:1:2:8 (refers to 0:1:1:19) "SRB_6_Parent" + INSTANCE FACE 0:1:1:2:9 (refers to 0:1:1:21) "BoosterMesh" +ASSEMBLY COMPOUND 0:1:1:3 "BoosterEng2_Parent" + INSTANCE COMPOUND 0:1:1:3:1 (refers to 0:1:1:4) "BoosterEngine2" +ASSEMBLY COMPOUND 0:1:1:4 "BoosterEngine2" + INSTANCE FACE 0:1:1:4:1 (refers to 0:1:1:5) "Flame_Booster2" + INSTANCE FACE 0:1:1:4:2 (refers to 0:1:1:6) "BoosterEngineMesh" +PART FACE 0:1:1:5 "LongFlameMesh" +PART FACE 0:1:1:6 "BoosterEngineMesh" +ASSEMBLY COMPOUND 0:1:1:7 "BoosterEngine1" + INSTANCE FACE 0:1:1:7:1 (refers to 0:1:1:5) "Flame_Booster1" + INSTANCE FACE 0:1:1:7:2 (refers to 0:1:1:6) "BoosterEngineMesh" +ASSEMBLY COMPOUND 0:1:1:8 "SRB_1_Parent" + INSTANCE COMPOUND 0:1:1:8:1 (refers to 0:1:1:9) "SRB1" +ASSEMBLY COMPOUND 0:1:1:9 "SRB1" + INSTANCE FACE 0:1:1:9:1 (refers to 0:1:1:5) "SRB_Flame1" + INSTANCE FACE 0:1:1:9:2 (refers to 0:1:1:10) "SRBMesh" +PART FACE 0:1:1:10 "SRBMesh" +ASSEMBLY COMPOUND 0:1:1:11 "SRB_2_Parent" + INSTANCE COMPOUND 0:1:1:11:1 (refers to 0:1:1:12) "SRB2" +ASSEMBLY COMPOUND 0:1:1:12 "SRB2" + INSTANCE FACE 0:1:1:12:1 (refers to 0:1:1:5) "SRB_Flame2" + INSTANCE FACE 0:1:1:12:2 (refers to 0:1:1:10) "SRBMesh" +ASSEMBLY COMPOUND 0:1:1:13 "SRB_3_Parent" + INSTANCE COMPOUND 0:1:1:13:1 (refers to 0:1:1:14) "SRB3" +ASSEMBLY COMPOUND 0:1:1:14 "SRB3" + INSTANCE FACE 0:1:1:14:1 (refers to 0:1:1:5) "SRB_Flame3" + INSTANCE FACE 0:1:1:14:2 (refers to 0:1:1:10) "SRBMesh" +ASSEMBLY COMPOUND 0:1:1:15 "SRB_4_Parent" + INSTANCE COMPOUND 0:1:1:15:1 (refers to 0:1:1:16) "SRB4" +ASSEMBLY COMPOUND 0:1:1:16 "SRB4" + INSTANCE FACE 0:1:1:16:1 (refers to 0:1:1:5) "SRB_Flame4" + INSTANCE FACE 0:1:1:16:2 (refers to 0:1:1:10) "SRBMesh" +ASSEMBLY COMPOUND 0:1:1:17 "SRB_5_Parent" + INSTANCE COMPOUND 0:1:1:17:1 (refers to 0:1:1:18) "SRB5" +ASSEMBLY COMPOUND 0:1:1:18 "SRB5" + INSTANCE FACE 0:1:1:18:1 (refers to 0:1:1:5) "SRB_Flame5" + INSTANCE FACE 0:1:1:18:2 (refers to 0:1:1:10) "SRBMesh" +ASSEMBLY COMPOUND 0:1:1:19 "SRB_6_Parent" + INSTANCE COMPOUND 0:1:1:19:1 (refers to 0:1:1:20) "SRB6" +ASSEMBLY COMPOUND 0:1:1:20 "SRB6" + INSTANCE FACE 0:1:1:20:1 (refers to 0:1:1:5) "SRB_Flame6" + INSTANCE FACE 0:1:1:20:2 (refers to 0:1:1:10) "SRBMesh" +PART FACE 0:1:1:21 "BoosterMesh" +ASSEMBLY COMPOUND 0:1:1:22 "CentaurBody" + INSTANCE COMPOUND 0:1:1:22:1 (refers to 0:1:1:23) "CentaurEngine1" + INSTANCE COMPOUND 0:1:1:22:2 (refers to 0:1:1:25) "CentaurEngine2_Parent" + INSTANCE FACE 0:1:1:22:3 (refers to 0:1:1:27) "CentaurFuelPump1" + INSTANCE FACE 0:1:1:22:4 (refers to 0:1:1:27) "CentaurFuelPump2" + INSTANCE FACE 0:1:1:22:5 (refers to 0:1:1:28) "Fairing1" + INSTANCE COMPOUND 0:1:1:22:6 (refers to 0:1:1:29) "FairingFlipper_180_Y" + INSTANCE FACE 0:1:1:22:7 (refers to 0:1:1:30) "CentaurBodyMesh" +ASSEMBLY COMPOUND 0:1:1:23 "CentaurEngine1" + INSTANCE FACE 0:1:1:23:1 (refers to 0:1:1:5) "Centaur_Flame1" + INSTANCE FACE 0:1:1:23:2 (refers to 0:1:1:24) "CentaurEngineMesh" +PART FACE 0:1:1:24 "CentaurEngineMesh" +ASSEMBLY COMPOUND 0:1:1:25 "CentaurEngine2_Parent" + INSTANCE COMPOUND 0:1:1:25:1 (refers to 0:1:1:26) "CentaurEngine2" +ASSEMBLY COMPOUND 0:1:1:26 "CentaurEngine2" + INSTANCE FACE 0:1:1:26:1 (refers to 0:1:1:5) "Centaur_Flame2" + INSTANCE FACE 0:1:1:26:2 (refers to 0:1:1:24) "CentaurEngineMesh" +PART FACE 0:1:1:27 "CentuarFuelPumpMesh" +PART FACE 0:1:1:28 "FairingMesh" +ASSEMBLY COMPOUND 0:1:1:29 "FairingFlipper_180_Y" + INSTANCE FACE 0:1:1:29:1 (refers to 0:1:1:28) "Fairing2" +PART FACE 0:1:1:30 "CentaurBodyMesh" +PART FACE 0:1:1:31 "AdapterMesh" + +Free Shapes: 1 +ASSEMBLY COMPOUND 0:1:1:1 "Root" +} +checkXDump D $THE_REF_DUMP diff --git a/tests/de_mesh/gltf_read/orient b/tests/de_mesh/gltf_read/orient index 42cdf870e2..d44be4571d 100644 --- a/tests/de_mesh/gltf_read/orient +++ b/tests/de_mesh/gltf_read/orient @@ -6,3 +6,48 @@ ReadGltf D [locate_data_file bug30691_OrientationTest.glb] XGetOneShape s D checknbshapes s -face 13 -compound 1 checktrinfo s -tri 524 -nod 1048 + +set THE_REF_DUMP { +INSTANCE FACE 0:1:1:1 (refers to 0:1:1:2) "ArrowZ2" +PART FACE 0:1:1:2 "ArrowMeshZ2" +INSTANCE FACE 0:1:1:3 (refers to 0:1:1:4) "TargetZ2" +PART FACE 0:1:1:4 "TargetMeshZ2" +INSTANCE FACE 0:1:1:5 (refers to 0:1:1:6) "TargetY2" +PART FACE 0:1:1:6 "TargetMeshY2" +INSTANCE FACE 0:1:1:7 (refers to 0:1:1:8) "ArrowY2" +PART FACE 0:1:1:8 "ArrowMeshY2" +INSTANCE FACE 0:1:1:9 (refers to 0:1:1:10) "ArrowX2" +PART FACE 0:1:1:10 "ArrowMeshX2" +INSTANCE FACE 0:1:1:11 (refers to 0:1:1:12) "TargetX2" +PART FACE 0:1:1:12 "TargetMeshX2" +INSTANCE FACE 0:1:1:13 (refers to 0:1:1:14) "TargetZ1" +PART FACE 0:1:1:14 "TargetMeshZ1" +INSTANCE FACE 0:1:1:15 (refers to 0:1:1:16) "ArrowZ1" +PART FACE 0:1:1:16 "ArrowMeshZ1" +INSTANCE FACE 0:1:1:17 (refers to 0:1:1:18) "TargetX1" +PART FACE 0:1:1:18 "TargetMeshX1" +INSTANCE FACE 0:1:1:19 (refers to 0:1:1:20) "ArrowX1" +PART FACE 0:1:1:20 "ArrowMeshX1" +INSTANCE FACE 0:1:1:21 (refers to 0:1:1:22) "TargetY1" +PART FACE 0:1:1:22 "TargetMeshY1" +INSTANCE FACE 0:1:1:23 (refers to 0:1:1:24) "ArrowY1" +PART FACE 0:1:1:24 "ArrowMeshY1" +INSTANCE FACE 0:1:1:25 (refers to 0:1:1:26) "BaseCube" +PART FACE 0:1:1:26 "BaseCubeMesh" + +Free Shapes: 13 +INSTANCE FACE 0:1:1:1 (refers to 0:1:1:2) "ArrowZ2" +INSTANCE FACE 0:1:1:3 (refers to 0:1:1:4) "TargetZ2" +INSTANCE FACE 0:1:1:5 (refers to 0:1:1:6) "TargetY2" +INSTANCE FACE 0:1:1:7 (refers to 0:1:1:8) "ArrowY2" +INSTANCE FACE 0:1:1:9 (refers to 0:1:1:10) "ArrowX2" +INSTANCE FACE 0:1:1:11 (refers to 0:1:1:12) "TargetX2" +INSTANCE FACE 0:1:1:13 (refers to 0:1:1:14) "TargetZ1" +INSTANCE FACE 0:1:1:15 (refers to 0:1:1:16) "ArrowZ1" +INSTANCE FACE 0:1:1:17 (refers to 0:1:1:18) "TargetX1" +INSTANCE FACE 0:1:1:19 (refers to 0:1:1:20) "ArrowX1" +INSTANCE FACE 0:1:1:21 (refers to 0:1:1:22) "TargetY1" +INSTANCE FACE 0:1:1:23 (refers to 0:1:1:24) "ArrowY1" +INSTANCE FACE 0:1:1:25 (refers to 0:1:1:26) "BaseCube" +} +checkXDump D $THE_REF_DUMP diff --git a/tests/de_mesh/gltf_write/as1 b/tests/de_mesh/gltf_write/as1 index eda810ba4a..7abb91fae2 100644 --- a/tests/de_mesh/gltf_write/as1 +++ b/tests/de_mesh/gltf_write/as1 @@ -22,3 +22,274 @@ checknbshapes s1 -face 53 -compound 28 ReadGltf D "$aTmpGltf2" XGetOneShape s2 D checknbshapes s2 -face 5 -compound 10 + +set THE_REF_DUMP_D1 { +ASSEMBLY COMPOUND 0:1:1:1 "as1" + INSTANCE COMPOUND 0:1:1:1:1 (refers to 0:1:1:2) "rod-assembly_1" + INSTANCE COMPOUND 0:1:1:1:2 (refers to 0:1:1:6) "l-bracket-assembly_1" + INSTANCE COMPOUND 0:1:1:1:3 (refers to 0:1:1:17) "plate_1" + INSTANCE COMPOUND 0:1:1:1:4 (refers to 0:1:1:18) "l-bracket-assembly_2" +ASSEMBLY COMPOUND 0:1:1:2 "rod-assembly_1" + INSTANCE COMPOUND 0:1:1:2:1 (refers to 0:1:1:3) "nut_1" + INSTANCE COMPOUND 0:1:1:2:2 (refers to 0:1:1:4) "nut_2" + INSTANCE COMPOUND 0:1:1:2:3 (refers to 0:1:1:5) "rod_1" +PART COMPOUND 0:1:1:3 "nut" + FACE 0:1:1:3:1 + FACE 0:1:1:3:2 + FACE 0:1:1:3:3 + FACE 0:1:1:3:4 + FACE 0:1:1:3:5 + FACE 0:1:1:3:6 + FACE 0:1:1:3:7 + FACE 0:1:1:3:8 +PART COMPOUND 0:1:1:4 "nut" + FACE 0:1:1:4:1 + FACE 0:1:1:4:2 + FACE 0:1:1:4:3 + FACE 0:1:1:4:4 + FACE 0:1:1:4:5 + FACE 0:1:1:4:6 + FACE 0:1:1:4:7 + FACE 0:1:1:4:8 +PART COMPOUND 0:1:1:5 "rod" + FACE 0:1:1:5:1 + FACE 0:1:1:5:2 + FACE 0:1:1:5:3 + FACE 0:1:1:5:4 +ASSEMBLY COMPOUND 0:1:1:6 "l-bracket-assembly_1" + INSTANCE COMPOUND 0:1:1:6:1 (refers to 0:1:1:7) "nut-bolt-assembly_1" + INSTANCE COMPOUND 0:1:1:6:2 (refers to 0:1:1:10) "nut-bolt-assembly_2" + INSTANCE COMPOUND 0:1:1:6:3 (refers to 0:1:1:13) "nut-bolt-assembly_3" + INSTANCE COMPOUND 0:1:1:6:4 (refers to 0:1:1:16) "l-bracket_1" +ASSEMBLY COMPOUND 0:1:1:7 "nut-bolt-assembly_1" + INSTANCE COMPOUND 0:1:1:7:1 (refers to 0:1:1:8) "bolt_1" + INSTANCE COMPOUND 0:1:1:7:2 (refers to 0:1:1:9) "nut_3" +PART COMPOUND 0:1:1:8 "bolt" + FACE 0:1:1:8:1 + FACE 0:1:1:8:2 + FACE 0:1:1:8:3 + FACE 0:1:1:8:4 + FACE 0:1:1:8:5 + FACE 0:1:1:8:6 + FACE 0:1:1:8:7 +PART COMPOUND 0:1:1:9 "nut" + FACE 0:1:1:9:1 + FACE 0:1:1:9:2 + FACE 0:1:1:9:3 + FACE 0:1:1:9:4 + FACE 0:1:1:9:5 + FACE 0:1:1:9:6 + FACE 0:1:1:9:7 + FACE 0:1:1:9:8 +ASSEMBLY COMPOUND 0:1:1:10 "nut-bolt-assembly_2" + INSTANCE COMPOUND 0:1:1:10:1 (refers to 0:1:1:11) "bolt_1" + INSTANCE COMPOUND 0:1:1:10:2 (refers to 0:1:1:12) "nut_3" +PART COMPOUND 0:1:1:11 "bolt" + FACE 0:1:1:11:1 + FACE 0:1:1:11:2 + FACE 0:1:1:11:3 + FACE 0:1:1:11:4 + FACE 0:1:1:11:5 + FACE 0:1:1:11:6 + FACE 0:1:1:11:7 +PART COMPOUND 0:1:1:12 "nut" + FACE 0:1:1:12:1 + FACE 0:1:1:12:2 + FACE 0:1:1:12:3 + FACE 0:1:1:12:4 + FACE 0:1:1:12:5 + FACE 0:1:1:12:6 + FACE 0:1:1:12:7 + FACE 0:1:1:12:8 +ASSEMBLY COMPOUND 0:1:1:13 "nut-bolt-assembly_3" + INSTANCE COMPOUND 0:1:1:13:1 (refers to 0:1:1:14) "bolt_1" + INSTANCE COMPOUND 0:1:1:13:2 (refers to 0:1:1:15) "nut_3" +PART COMPOUND 0:1:1:14 "bolt" + FACE 0:1:1:14:1 + FACE 0:1:1:14:2 + FACE 0:1:1:14:3 + FACE 0:1:1:14:4 + FACE 0:1:1:14:5 + FACE 0:1:1:14:6 + FACE 0:1:1:14:7 +PART COMPOUND 0:1:1:15 "nut" + FACE 0:1:1:15:1 + FACE 0:1:1:15:2 + FACE 0:1:1:15:3 + FACE 0:1:1:15:4 + FACE 0:1:1:15:5 + FACE 0:1:1:15:6 + FACE 0:1:1:15:7 + FACE 0:1:1:15:8 +PART COMPOUND 0:1:1:16 "l-bracket" + FACE 0:1:1:16:1 + FACE 0:1:1:16:2 + FACE 0:1:1:16:3 + FACE 0:1:1:16:4 + FACE 0:1:1:16:5 + FACE 0:1:1:16:6 + FACE 0:1:1:16:7 + FACE 0:1:1:16:8 + FACE 0:1:1:16:9 + FACE 0:1:1:16:10 + FACE 0:1:1:16:11 + FACE 0:1:1:16:12 + FACE 0:1:1:16:13 + FACE 0:1:1:16:14 + FACE 0:1:1:16:15 + FACE 0:1:1:16:16 +PART COMPOUND 0:1:1:17 "plate" + FACE 0:1:1:17:1 + FACE 0:1:1:17:2 + FACE 0:1:1:17:3 + FACE 0:1:1:17:4 + FACE 0:1:1:17:5 + FACE 0:1:1:17:6 + FACE 0:1:1:17:7 + FACE 0:1:1:17:8 + FACE 0:1:1:17:9 + FACE 0:1:1:17:10 + FACE 0:1:1:17:11 + FACE 0:1:1:17:12 + FACE 0:1:1:17:13 + FACE 0:1:1:17:14 + FACE 0:1:1:17:15 + FACE 0:1:1:17:16 + FACE 0:1:1:17:17 + FACE 0:1:1:17:18 +ASSEMBLY COMPOUND 0:1:1:18 "l-bracket-assembly_2" + INSTANCE COMPOUND 0:1:1:18:1 (refers to 0:1:1:19) "nut-bolt-assembly_1" + INSTANCE COMPOUND 0:1:1:18:2 (refers to 0:1:1:22) "nut-bolt-assembly_2" + INSTANCE COMPOUND 0:1:1:18:3 (refers to 0:1:1:25) "nut-bolt-assembly_3" + INSTANCE COMPOUND 0:1:1:18:4 (refers to 0:1:1:28) "l-bracket_1" +ASSEMBLY COMPOUND 0:1:1:19 "nut-bolt-assembly_1" + INSTANCE COMPOUND 0:1:1:19:1 (refers to 0:1:1:20) "bolt_1" + INSTANCE COMPOUND 0:1:1:19:2 (refers to 0:1:1:21) "nut_3" +PART COMPOUND 0:1:1:20 "bolt" + FACE 0:1:1:20:1 + FACE 0:1:1:20:2 + FACE 0:1:1:20:3 + FACE 0:1:1:20:4 + FACE 0:1:1:20:5 + FACE 0:1:1:20:6 + FACE 0:1:1:20:7 +PART COMPOUND 0:1:1:21 "nut" + FACE 0:1:1:21:1 + FACE 0:1:1:21:2 + FACE 0:1:1:21:3 + FACE 0:1:1:21:4 + FACE 0:1:1:21:5 + FACE 0:1:1:21:6 + FACE 0:1:1:21:7 + FACE 0:1:1:21:8 +ASSEMBLY COMPOUND 0:1:1:22 "nut-bolt-assembly_2" + INSTANCE COMPOUND 0:1:1:22:1 (refers to 0:1:1:23) "bolt_1" + INSTANCE COMPOUND 0:1:1:22:2 (refers to 0:1:1:24) "nut_3" +PART COMPOUND 0:1:1:23 "bolt" + FACE 0:1:1:23:1 + FACE 0:1:1:23:2 + FACE 0:1:1:23:3 + FACE 0:1:1:23:4 + FACE 0:1:1:23:5 + FACE 0:1:1:23:6 + FACE 0:1:1:23:7 +PART COMPOUND 0:1:1:24 "nut" + FACE 0:1:1:24:1 + FACE 0:1:1:24:2 + FACE 0:1:1:24:3 + FACE 0:1:1:24:4 + FACE 0:1:1:24:5 + FACE 0:1:1:24:6 + FACE 0:1:1:24:7 + FACE 0:1:1:24:8 +ASSEMBLY COMPOUND 0:1:1:25 "nut-bolt-assembly_3" + INSTANCE COMPOUND 0:1:1:25:1 (refers to 0:1:1:26) "bolt_1" + INSTANCE COMPOUND 0:1:1:25:2 (refers to 0:1:1:27) "nut_3" +PART COMPOUND 0:1:1:26 "bolt" + FACE 0:1:1:26:1 + FACE 0:1:1:26:2 + FACE 0:1:1:26:3 + FACE 0:1:1:26:4 + FACE 0:1:1:26:5 + FACE 0:1:1:26:6 + FACE 0:1:1:26:7 +PART COMPOUND 0:1:1:27 "nut" + FACE 0:1:1:27:1 + FACE 0:1:1:27:2 + FACE 0:1:1:27:3 + FACE 0:1:1:27:4 + FACE 0:1:1:27:5 + FACE 0:1:1:27:6 + FACE 0:1:1:27:7 + FACE 0:1:1:27:8 +PART COMPOUND 0:1:1:28 "l-bracket" + FACE 0:1:1:28:1 + FACE 0:1:1:28:2 + FACE 0:1:1:28:3 + FACE 0:1:1:28:4 + FACE 0:1:1:28:5 + FACE 0:1:1:28:6 + FACE 0:1:1:28:7 + FACE 0:1:1:28:8 + FACE 0:1:1:28:9 + FACE 0:1:1:28:10 + FACE 0:1:1:28:11 + FACE 0:1:1:28:12 + FACE 0:1:1:28:13 + FACE 0:1:1:28:14 + FACE 0:1:1:28:15 + FACE 0:1:1:28:16 + +Free Shapes: 1 +ASSEMBLY COMPOUND 0:1:1:1 "as1" +} +checkXDump D1 $THE_REF_DUMP_D1 + +set THE_REF_DUMP_D { +ASSEMBLY COMPOUND 0:1:1:1 "as1" + INSTANCE COMPOUND 0:1:1:1:1 (refers to 0:1:1:2) "rod-assembly_1" + INSTANCE COMPOUND 0:1:1:1:2 (refers to 0:1:1:5) "l-bracket-assembly_1" + INSTANCE FACE 0:1:1:1:3 (refers to 0:1:1:11) "plate_1" + INSTANCE COMPOUND 0:1:1:1:4 (refers to 0:1:1:12) "l-bracket-assembly_2" +ASSEMBLY COMPOUND 0:1:1:2 "rod-assembly_1" + INSTANCE FACE 0:1:1:2:1 (refers to 0:1:1:3) "nut_1" + INSTANCE FACE 0:1:1:2:2 (refers to 0:1:1:3) "nut_2" + INSTANCE FACE 0:1:1:2:3 (refers to 0:1:1:4) "rod_1" +PART FACE 0:1:1:3 "nut" +PART FACE 0:1:1:4 "rod" +ASSEMBLY COMPOUND 0:1:1:5 "l-bracket-assembly_1" + INSTANCE COMPOUND 0:1:1:5:1 (refers to 0:1:1:6) "nut-bolt-assembly_1" + INSTANCE COMPOUND 0:1:1:5:2 (refers to 0:1:1:8) "nut-bolt-assembly_2" + INSTANCE COMPOUND 0:1:1:5:3 (refers to 0:1:1:9) "nut-bolt-assembly_3" + INSTANCE FACE 0:1:1:5:4 (refers to 0:1:1:10) "l-bracket_1" +ASSEMBLY COMPOUND 0:1:1:6 "nut-bolt-assembly_1" + INSTANCE FACE 0:1:1:6:1 (refers to 0:1:1:7) "bolt_1" + INSTANCE FACE 0:1:1:6:2 (refers to 0:1:1:3) "nut_3" +PART FACE 0:1:1:7 "bolt" +ASSEMBLY COMPOUND 0:1:1:8 "nut-bolt-assembly_2" + INSTANCE FACE 0:1:1:8:1 (refers to 0:1:1:7) "bolt_1" + INSTANCE FACE 0:1:1:8:2 (refers to 0:1:1:3) "nut_3" +ASSEMBLY COMPOUND 0:1:1:9 "nut-bolt-assembly_3" + INSTANCE FACE 0:1:1:9:1 (refers to 0:1:1:7) "bolt_1" + INSTANCE FACE 0:1:1:9:2 (refers to 0:1:1:3) "nut_3" +PART FACE 0:1:1:10 "l-bracket" +PART FACE 0:1:1:11 "plate" +ASSEMBLY COMPOUND 0:1:1:12 "l-bracket-assembly_2" + INSTANCE COMPOUND 0:1:1:12:1 (refers to 0:1:1:13) "nut-bolt-assembly_1" + INSTANCE COMPOUND 0:1:1:12:2 (refers to 0:1:1:14) "nut-bolt-assembly_2" + INSTANCE COMPOUND 0:1:1:12:3 (refers to 0:1:1:15) "nut-bolt-assembly_3" + INSTANCE FACE 0:1:1:12:4 (refers to 0:1:1:10) "l-bracket_1" +ASSEMBLY COMPOUND 0:1:1:13 "nut-bolt-assembly_1" + INSTANCE FACE 0:1:1:13:1 (refers to 0:1:1:7) "bolt_1" + INSTANCE FACE 0:1:1:13:2 (refers to 0:1:1:3) "nut_3" +ASSEMBLY COMPOUND 0:1:1:14 "nut-bolt-assembly_2" + INSTANCE FACE 0:1:1:14:1 (refers to 0:1:1:7) "bolt_1" + INSTANCE FACE 0:1:1:14:2 (refers to 0:1:1:3) "nut_3" +ASSEMBLY COMPOUND 0:1:1:15 "nut-bolt-assembly_3" + INSTANCE FACE 0:1:1:15:1 (refers to 0:1:1:7) "bolt_1" + INSTANCE FACE 0:1:1:15:2 (refers to 0:1:1:3) "nut_3" + +Free Shapes: 1 +ASSEMBLY COMPOUND 0:1:1:1 "as1" +} +checkXDump D $THE_REF_DUMP_D diff --git a/tests/de_mesh/gltf_write/ball b/tests/de_mesh/gltf_write/ball index 9439bc6268..6e61bf060f 100644 --- a/tests/de_mesh/gltf_write/ball +++ b/tests/de_mesh/gltf_write/ball @@ -10,4 +10,20 @@ writegltf b "$aTmpGltf" ReadGltf D "$aTmpGltf" XGetOneShape s D -checknbshapes s -face 17 -compound 3 +checknbshapes s -face 17 -compound 5 + +set THE_REF_DUMP { +ASSEMBLY COMPOUND 0:1:1:1 "ASSEMBLY" + INSTANCE COMPOUND 0:1:1:1:1 (refers to 0:1:1:2) "ASSEMBLY" + INSTANCE COMPOUND 0:1:1:1:2 (refers to 0:1:1:4) "ASSEMBLY" +ASSEMBLY COMPOUND 0:1:1:2 "ASSEMBLY" + INSTANCE COMPOUND 0:1:1:2:1 (refers to 0:1:1:3) "SOLID" +PART COMPOUND 0:1:1:3 "SOLID" +ASSEMBLY COMPOUND 0:1:1:4 "ASSEMBLY" + INSTANCE COMPOUND 0:1:1:4:1 (refers to 0:1:1:5) "SOLID" +PART COMPOUND 0:1:1:5 "SOLID" + +Free Shapes: 1 +ASSEMBLY COMPOUND 0:1:1:1 "ASSEMBLY" +} +checkXDump D $THE_REF_DUMP diff --git a/tests/de_mesh/gltf_write/compound b/tests/de_mesh/gltf_write/compound new file mode 100644 index 0000000000..dbe9b1d628 --- /dev/null +++ b/tests/de_mesh/gltf_write/compound @@ -0,0 +1,38 @@ +puts "========" +puts "0032612: Data Exchange, RWGltf_CafReader - lost hierarchy of two nested compounds" +puts "========" + +set aTmpGltf "${imagedir}/${casename}_tmp.glb" + +box b 1 2 3 +incmesh b 0.1 +compound b c +compound c cc + +Close * +XNewDoc D1 +XAddShape D1 cc +SetName D1 [XFindShape D1 b] "box" +SetName D1 [XFindShape D1 c] "comp1" +SetName D1 [XFindShape D1 c]:1 "box_inst" +SetName D1 [XFindShape D1 cc] "comp2" +SetName D1 [XFindShape D1 cc]:1 "comp1_inst" + +#XSave D1 "test.xbf" +WriteGltf D1 "$aTmpGltf" + +ReadGltf D "$aTmpGltf" +XGetOneShape s D +checknbshapes s -face 6 -compound 3 + +set THE_REF_DUMP { +ASSEMBLY COMPOUND 0:1:1:1 "comp2" + INSTANCE COMPOUND 0:1:1:1:1 (refers to 0:1:1:2) "comp1_inst" +ASSEMBLY COMPOUND 0:1:1:2 "comp1_inst" + INSTANCE COMPOUND 0:1:1:2:1 (refers to 0:1:1:3) "box_inst" +PART COMPOUND 0:1:1:3 "box" + +Free Shapes: 1 +ASSEMBLY COMPOUND 0:1:1:1 "comp2" +} +checkXDump D $THE_REF_DUMP diff --git a/tests/de_mesh/gltf_write/empty b/tests/de_mesh/gltf_write/empty index e10954505a..50daa2f2e6 100644 --- a/tests/de_mesh/gltf_write/empty +++ b/tests/de_mesh/gltf_write/empty @@ -12,10 +12,21 @@ compound ce compound b1 b2 ce cc incmesh b2 1 XNewDoc DD +XAutoNaming DD 0 XAddShape DD cc 1 WriteGltf DD "$aTmpGltf" Close DD ReadGltf D "$aTmpGltf" XGetOneShape s D -checknbshapes s -face 6 -compound 1 +checknbshapes s -face 6 -compound 2 + +set THE_REF_DUMP { +ASSEMBLY COMPOUND 0:1:1:1 "empty_tmp.glb" + INSTANCE COMPOUND 0:1:1:1:1 (refers to 0:1:1:2) "Compound" +PART COMPOUND 0:1:1:2 "Compound" + +Free Shapes: 1 +ASSEMBLY COMPOUND 0:1:1:1 "empty_tmp.glb" +} +checkXDump D $THE_REF_DUMP diff --git a/tests/de_mesh/gltf_write/helmet b/tests/de_mesh/gltf_write/helmet index 39d9854714..1c8508e929 100644 --- a/tests/de_mesh/gltf_write/helmet +++ b/tests/de_mesh/gltf_write/helmet @@ -32,3 +32,12 @@ regexp {Mass\s:\s*([0-9\.]+)} $aLProps2 dummy anArea2 if {abs($anArea1 - $anArea2) > 1e-8 * $anArea1} { puts "Error: invalid area $anArea1 instead of $anArea2" } + +set THE_REF_DUMP { +INSTANCE FACE 0:1:1:1 (refers to 0:1:1:2) "node_damagedHelmet_-6514" +PART FACE 0:1:1:2 "mesh_helmet_LP_13930damagedHelmet" + +Free Shapes: 1 +INSTANCE FACE 0:1:1:1 (refers to 0:1:1:2) "node_damagedHelmet_-6514" +} +checkXDump D $THE_REF_DUMP diff --git a/tests/de_mesh/gltf_write/helmetglb b/tests/de_mesh/gltf_write/helmetglb index eda6d7867a..e7ecde8cd2 100644 --- a/tests/de_mesh/gltf_write/helmetglb +++ b/tests/de_mesh/gltf_write/helmetglb @@ -18,3 +18,12 @@ ReadGltf D "$aTmpGltf" XGetOneShape s D checknbshapes s -face 1 -compound 0 checktrinfo s -tri 15452 -nod 14556 + +set THE_REF_DUMP { +INSTANCE FACE 0:1:1:1 (refers to 0:1:1:2) "node_damagedHelmet_-6514" +PART FACE 0:1:1:2 "mesh_helmet_LP_13930damagedHelmet" + +Free Shapes: 1 +INSTANCE FACE 0:1:1:1 (refers to 0:1:1:2) "node_damagedHelmet_-6514" +} +checkXDump D $THE_REF_DUMP diff --git a/tests/de_mesh/gltf_write/lantern b/tests/de_mesh/gltf_write/lantern index e1bd11f066..5aa6287b60 100644 --- a/tests/de_mesh/gltf_write/lantern +++ b/tests/de_mesh/gltf_write/lantern @@ -17,3 +17,18 @@ ReadGltf D "$aTmpGltf" XGetOneShape s D checknbshapes s -face 3 -compound 1 checktrinfo s -tri 5394 -nod 4145 + +set THE_REF_DUMP { +INSTANCE COMPOUND 0:1:1:1 (refers to 0:1:1:2) "Lantern" +ASSEMBLY COMPOUND 0:1:1:2 "Lantern" + INSTANCE FACE 0:1:1:2:1 (refers to 0:1:1:3) "LanternPole_Body" + INSTANCE FACE 0:1:1:2:2 (refers to 0:1:1:4) "LanternPole_Chain" + INSTANCE FACE 0:1:1:2:3 (refers to 0:1:1:5) "LanternPole_Lantern" +PART FACE 0:1:1:3 "LanternPole_Body" +PART FACE 0:1:1:4 "LanternPole_Chain" +PART FACE 0:1:1:5 "LanternPole_Lantern" + +Free Shapes: 1 +INSTANCE COMPOUND 0:1:1:1 (refers to 0:1:1:2) "Lantern" +} +checkXDump D $THE_REF_DUMP diff --git a/tests/de_mesh/gltf_write/lanternglb b/tests/de_mesh/gltf_write/lanternglb index 170fc3736e..ffaf419423 100644 --- a/tests/de_mesh/gltf_write/lanternglb +++ b/tests/de_mesh/gltf_write/lanternglb @@ -18,3 +18,18 @@ ReadGltf D "$aTmpGltf" XGetOneShape s D checknbshapes s -face 3 -compound 1 checktrinfo s -tri 5394 -nod 4145 + +set THE_REF_DUMP { +INSTANCE COMPOUND 0:1:1:1 (refers to 0:1:1:2) "Lantern" +ASSEMBLY COMPOUND 0:1:1:2 "Lantern" + INSTANCE FACE 0:1:1:2:1 (refers to 0:1:1:3) "LanternPole_Body" + INSTANCE FACE 0:1:1:2:2 (refers to 0:1:1:4) "LanternPole_Chain" + INSTANCE FACE 0:1:1:2:3 (refers to 0:1:1:5) "LanternPole_Lantern" +PART FACE 0:1:1:3 "LanternPole_Body" +PART FACE 0:1:1:4 "LanternPole_Chain" +PART FACE 0:1:1:5 "LanternPole_Lantern" + +Free Shapes: 1 +INSTANCE COMPOUND 0:1:1:1 (refers to 0:1:1:2) "Lantern" +} +checkXDump D $THE_REF_DUMP From 0c9c466e9d52c7c479f05b1e610af2e6045a7bab Mon Sep 17 00:00:00 2001 From: aml Date: Tue, 12 Oct 2021 07:44:06 +0300 Subject: [PATCH 095/639] CR32614 Coding - get rid of unsused forward declarations [Adaptor2d to GccAna] Packages from Adaptor2d to GccAna are processed. --- src/Adaptor2d/Adaptor2d_Curve2d.hxx | 3 -- src/Adaptor2d/Adaptor2d_Line2d.hxx | 3 -- src/Adaptor2d/Adaptor2d_OffsetCurve.hxx | 4 -- src/Adaptor3d/Adaptor3d_Curve.hxx | 3 -- src/Adaptor3d/Adaptor3d_HVertex.hxx | 1 - src/AdvApp2Var/AdvApp2Var_ApproxAFunc2Var.hxx | 2 - src/AdvApp2Var/AdvApp2Var_Framework.hxx | 1 - src/AdvApp2Var/AdvApp2Var_Network.hxx | 1 - src/AdvApprox/AdvApprox_ApproxAFunction.hxx | 2 - src/AdvApprox/AdvApprox_PrefAndRec.hxx | 1 - src/AdvApprox/AdvApprox_SimpleApprox.hxx | 2 - src/AppBlend/AppBlend_Approx.hxx | 3 -- src/AppDef/AppDef_LinearCriteria.hxx | 3 -- src/AppDef/AppDef_MultiLine.hxx | 3 -- src/AppDef/AppDef_MultiPointConstraint.hxx | 3 -- src/AppDef/AppDef_SmoothCriterion.hxx | 2 - src/AppDef/AppDef_Variational.hxx | 8 --- src/AppParCurves/AppParCurves.hxx | 17 ------- .../AppParCurves_MultiBSpCurve.hxx | 4 -- src/AppParCurves/AppParCurves_MultiCurve.hxx | 3 -- src/AppParCurves/AppParCurves_MultiPoint.hxx | 2 - src/Approx/Approx_MCurvesToBSpCurve.hxx | 1 - src/Approx/Approx_SweepApproximation.hxx | 3 -- src/Approx/Approx_SweepFunction.hxx | 2 - src/Aspect/Aspect_Background.hxx | 1 - src/Aspect/Aspect_CircularGrid.hxx | 3 -- src/Aspect/Aspect_GenId.hxx | 1 - src/Aspect/Aspect_RectangularGrid.hxx | 3 -- src/BRep/BRep_Builder.hxx | 2 - src/BRep/BRep_CurveOn2Surfaces.hxx | 3 -- src/BRep/BRep_CurveOnClosedSurface.hxx | 1 - src/BRep/BRep_CurveOnSurface.hxx | 1 - src/BRep/BRep_CurveRepresentation.hxx | 2 - src/BRep/BRep_PointRepresentation.hxx | 2 - src/BRep/BRep_Polygon3D.hxx | 2 - src/BRep/BRep_PolygonOnSurface.hxx | 2 - src/BRep/BRep_PolygonOnTriangulation.hxx | 1 - src/BRep/BRep_TFace.hxx | 1 - src/BRep/BRep_TVertex.hxx | 1 - src/BRepAdaptor/BRepAdaptor_CompCurve.hxx | 5 -- src/BRepAdaptor/BRepAdaptor_Curve.hxx | 7 --- src/BRepAdaptor/BRepAdaptor_Curve2d.hxx | 3 -- src/BRepAdaptor/BRepAdaptor_Surface.hxx | 4 -- src/BRepBuilderAPI/BRepBuilderAPI.hxx | 18 ------- src/BRepBuilderAPI/BRepBuilderAPI_Collect.hxx | 1 - src/BRepBuilderAPI/BRepBuilderAPI_Command.hxx | 1 - .../BRepBuilderAPI_FindPlane.hxx | 1 - .../BRepBuilderAPI_GTransform.hxx | 2 - .../BRepBuilderAPI_MakeEdge.hxx | 1 - .../BRepBuilderAPI_MakeEdge2d.hxx | 1 - .../BRepBuilderAPI_MakeFace.hxx | 1 - .../BRepBuilderAPI_MakePolygon.hxx | 1 - .../BRepBuilderAPI_MakeShape.hxx | 2 - .../BRepBuilderAPI_MakeShell.hxx | 1 - .../BRepBuilderAPI_MakeSolid.hxx | 1 - .../BRepBuilderAPI_MakeWire.hxx | 1 - .../BRepBuilderAPI_ModifyShape.hxx | 3 -- src/BRepBuilderAPI/BRepBuilderAPI_Sewing.hxx | 3 -- .../BRepBuilderAPI_Transform.hxx | 2 - src/BRepCheck/BRepCheck.hxx | 8 --- src/BRepCheck/BRepCheck_Analyzer.hxx | 3 -- src/BRepCheck/BRepCheck_Result.hxx | 3 -- src/BRepClass3d/BRepClass3d.hxx | 5 -- src/BRepClass3d/BRepClass3d_Intersector3d.hxx | 2 - src/BRepClass3d/BRepClass3d_SClassifier.hxx | 2 - .../BRepClass3d_SolidClassifier.hxx | 1 - src/BRepExtrema/BRepExtrema_ExtCF.hxx | 1 - src/BRepExtrema/BRepExtrema_ExtFF.hxx | 1 - src/BRepExtrema/BRepExtrema_ExtPC.hxx | 1 - src/BRepExtrema/BRepExtrema_ExtPF.hxx | 1 - src/BRepGProp/BRepGProp.hxx | 10 ---- src/BRepGProp/BRepGProp_EdgeTool.hxx | 1 - src/BRepGProp/BRepGProp_MeshProps.hxx | 1 - src/BRepGProp/BRepGProp_TFunction.hxx | 1 - src/BRepGProp/BRepGProp_UFunction.hxx | 2 - src/BRepGProp/BRepGProp_VinertGK.hxx | 1 - .../BRepIntCurveSurface_Inter.hxx | 1 - src/BRepLProp/BRepLProp.hxx | 4 -- src/BRepLib/BRepLib.hxx | 13 ----- src/BRepLib/BRepLib_Command.hxx | 1 - src/BRepLib/BRepLib_FindSurface.hxx | 2 - src/BRepLib/BRepLib_FuseEdges.hxx | 3 -- src/BRepLib/BRepLib_MakeEdge.hxx | 2 - src/BRepLib/BRepLib_MakeEdge2d.hxx | 2 - src/BRepLib/BRepLib_MakeFace.hxx | 1 - src/BRepLib/BRepLib_MakePolygon.hxx | 3 -- src/BRepLib/BRepLib_MakeShape.hxx | 2 - src/BRepLib/BRepLib_MakeShell.hxx | 1 - src/BRepLib/BRepLib_MakeSolid.hxx | 1 - src/BRepLib/BRepLib_MakeWire.hxx | 3 -- src/BRepMAT2d/BRepMAT2d_Explorer.hxx | 1 - src/BRepMAT2d/BRepMAT2d_LinkTopoBilo.hxx | 2 - src/BRepOffset/BRepOffset_Analyse.hxx | 1 - src/BRepOffset/BRepOffset_MakeOffset.hxx | 3 -- .../BRepOffsetAPI_FindContigousEdges.hxx | 2 - src/BRepOffsetAPI/BRepOffsetAPI_MakeDraft.hxx | 2 - .../BRepOffsetAPI_MakeEvolved.hxx | 2 - .../BRepOffsetAPI_MakeFilling.hxx | 3 -- .../BRepOffsetAPI_MakeOffset.hxx | 2 - .../BRepOffsetAPI_MakeOffsetShape.hxx | 1 - src/BRepOffsetAPI/BRepOffsetAPI_MakePipe.hxx | 1 - .../BRepOffsetAPI_MakePipeShell.hxx | 2 - .../BRepOffsetAPI_MiddlePath.hxx | 1 - .../BRepOffsetAPI_NormalProjection.hxx | 3 -- .../BRepOffsetAPI_ThruSections.hxx | 1 - src/BRepPrim/BRepPrim_Builder.hxx | 1 - src/BRepPrim/BRepPrim_Cone.hxx | 1 - src/BRepPrim/BRepPrim_Cylinder.hxx | 1 - src/BRepPrim/BRepPrim_FaceBuilder.hxx | 5 -- src/BRepPrim/BRepPrim_GWedge.hxx | 9 ---- src/BRepPrim/BRepPrim_OneAxis.hxx | 9 ---- src/BRepPrim/BRepPrim_Sphere.hxx | 1 - src/BRepPrim/BRepPrim_Torus.hxx | 1 - src/BRepPrim/BRepPrim_Wedge.hxx | 1 - src/BRepPrimAPI/BRepPrimAPI_MakeBox.hxx | 4 -- src/BRepPrimAPI/BRepPrimAPI_MakeCone.hxx | 2 - src/BRepPrimAPI/BRepPrimAPI_MakeCylinder.hxx | 2 - src/BRepPrimAPI/BRepPrimAPI_MakeHalfSpace.hxx | 2 - src/BRepPrimAPI/BRepPrimAPI_MakeOneAxis.hxx | 1 - src/BRepPrimAPI/BRepPrimAPI_MakePrism.hxx | 1 - src/BRepPrimAPI/BRepPrimAPI_MakeRevol.hxx | 1 - .../BRepPrimAPI_MakeRevolution.hxx | 2 - src/BRepPrimAPI/BRepPrimAPI_MakeSphere.hxx | 2 - src/BRepPrimAPI/BRepPrimAPI_MakeTorus.hxx | 2 - src/BRepPrimAPI/BRepPrimAPI_MakeWedge.hxx | 3 -- src/BRepProj/BRepProj_Projection.hxx | 4 -- src/BRepSweep/BRepSweep_Builder.hxx | 1 - src/BRepSweep/BRepSweep_Iterator.hxx | 2 - .../BRepSweep_NumLinearRegularSweep.hxx | 7 --- src/BRepSweep/BRepSweep_Prism.hxx | 1 - src/BRepSweep/BRepSweep_Revol.hxx | 1 - src/BRepSweep/BRepSweep_Rotation.hxx | 2 - src/BRepSweep/BRepSweep_Tool.hxx | 1 - src/BRepSweep/BRepSweep_Translation.hxx | 2 - src/BRepSweep/BRepSweep_Trsf.hxx | 1 - src/BRepToIGES/BRepToIGES_BRShell.hxx | 1 - src/BRepToIGES/BRepToIGES_BRSolid.hxx | 1 - src/BRepToIGES/BRepToIGES_BRWire.hxx | 1 - src/BRepTools/BRepTools.hxx | 10 ---- src/BRepTools/BRepTools_GTrsfModification.hxx | 1 - src/BRepTools/BRepTools_Modifier.hxx | 3 -- src/BRepTools/BRepTools_PurgeLocations.hxx | 2 - src/BRepTools/BRepTools_Quilt.hxx | 1 - src/BRepTools/BRepTools_ReShape.hxx | 1 - src/BRepTools/BRepTools_ShapeSet.hxx | 1 - src/BRepTools/BRepTools_Substitution.hxx | 1 - src/BRepTools/BRepTools_TrsfModification.hxx | 1 - src/BRepTools/BRepTools_WireExplorer.hxx | 6 --- .../BRepTopAdaptor_FClass2d.hxx | 1 - src/BRepTopAdaptor/BRepTopAdaptor_HVertex.hxx | 2 - .../BRepTopAdaptor_TopolTool.hxx | 1 - src/BinLDrivers/BinLDrivers.hxx | 4 -- .../BinLDrivers_DocumentRetrievalDriver.hxx | 3 -- .../BinLDrivers_DocumentSection.hxx | 1 - .../BinLDrivers_DocumentStorageDriver.hxx | 1 - src/BinMDocStd/BinMDocStd.hxx | 1 - src/BinMFunction/BinMFunction.hxx | 3 -- src/BinTools/BinTools.hxx | 5 -- src/BinTools/BinTools_Curve2dSet.hxx | 1 - src/BinTools/BinTools_CurveSet.hxx | 1 - src/BinTools/BinTools_LocationSet.hxx | 1 - src/BinTools/BinTools_ShapeWriter.hxx | 1 - src/BinTools/BinTools_SurfaceSet.hxx | 1 - src/BinXCAFDrivers/BinXCAFDrivers.hxx | 2 - src/Bisector/Bisector.hxx | 10 ---- src/Bisector/Bisector_BisecAna.hxx | 2 - src/Bisector/Bisector_BisecCC.hxx | 4 -- src/Bisector/Bisector_BisecPC.hxx | 3 -- src/Bisector/Bisector_FunctionH.hxx | 2 - src/Bisector/Bisector_Inter.hxx | 1 - src/Bisector/Bisector_PointOnBis.hxx | 1 - src/Bisector/Bisector_PolyBis.hxx | 1 - src/Bnd/Bnd_BoundSortBox.hxx | 3 -- src/Bnd/Bnd_BoundSortBox2d.hxx | 3 -- src/Bnd/Bnd_Box.hxx | 1 - src/Bnd/Bnd_Box2d.hxx | 1 - src/Bnd/Bnd_Sphere.hxx | 1 - src/BndLib/BndLib.hxx | 3 -- src/BndLib/BndLib_Add3dCurve.hxx | 2 - src/BndLib/BndLib_AddSurface.hxx | 3 -- src/CDF/CDF_Application.hxx | 2 - src/CDF/CDF_Directory.hxx | 2 - src/CDF/CDF_DirectoryIterator.hxx | 1 - src/CDF/CDF_MetaDataDriver.hxx | 1 - src/CDF/CDF_Store.hxx | 1 - src/CDF/CDF_StoreList.hxx | 1 - src/CDM/CDM_Application.hxx | 1 - src/CDM/CDM_Document.hxx | 5 -- src/CDM/CDM_MetaData.hxx | 5 -- src/CPnts/CPnts_AbscissaPoint.hxx | 2 - src/CPnts/CPnts_UniformDeflection.hxx | 3 -- src/CSLib/CSLib.hxx | 2 - src/ChFi2d/ChFi2d.hxx | 1 - src/ChFi3d/ChFi3d.hxx | 4 -- src/ChFi3d/ChFi3d_Builder.hxx | 3 -- src/ChFi3d/ChFi3d_ChBuilder.hxx | 2 - src/ChFiDS/ChFiDS_CircSection.hxx | 2 - src/ChFiDS/ChFiDS_CommonPoint.hxx | 6 --- src/ChFiDS/ChFiDS_ElSpine.hxx | 5 -- src/ChFiDS/ChFiDS_SurfData.hxx | 3 -- src/Contap/Contap_ContAna.hxx | 5 -- src/Contap/Contap_HCurve2dTool.hxx | 3 -- src/Contap/Contap_Line.hxx | 2 - src/Contap/Contap_Point.hxx | 3 -- src/Contap/Contap_SurfFunction.hxx | 4 -- src/Convert/Convert_CircleToBSplineCurve.hxx | 1 - ...ert_CompBezierCurves2dToBSplineCurve2d.hxx | 1 - ...Convert_CompBezierCurvesToBSplineCurve.hxx | 1 - src/Convert/Convert_CompPolynomialToPoles.hxx | 2 - src/Convert/Convert_ConeToBSplineSurface.hxx | 1 - src/Convert/Convert_ConicToBSplineCurve.hxx | 2 - .../Convert_CylinderToBSplineSurface.hxx | 1 - ...vert_ElementarySurfaceToBSplineSurface.hxx | 1 - src/Convert/Convert_EllipseToBSplineCurve.hxx | 1 - src/Convert/Convert_GridPolynomialToPoles.hxx | 2 - .../Convert_SphereToBSplineSurface.hxx | 1 - src/Convert/Convert_TorusToBSplineSurface.hxx | 1 - src/DBRep/DBRep_Edge.hxx | 2 - src/DBRep/DBRep_Face.hxx | 2 - src/DBRep/DBRep_HideData.hxx | 2 - src/DBRep/DBRep_IsoBuilder.hxx | 1 - src/DDF/DDF.hxx | 3 -- src/DDF/DDF_Browser.hxx | 1 - src/DDF/DDF_Data.hxx | 1 - src/DDF/DDF_Transaction.hxx | 2 - src/DDataStd/DDataStd.hxx | 3 -- src/DDataStd/DDataStd_DrawPresentation.hxx | 1 - src/DDataStd/DDataStd_TreeBrowser.hxx | 2 - src/DDocStd/DDocStd.hxx | 1 - src/DNaming/DNaming.hxx | 11 ---- src/Draft/Draft.hxx | 4 -- src/Draft/Draft_EdgeInfo.hxx | 3 -- src/Draft/Draft_FaceInfo.hxx | 2 - src/Draft/Draft_Modification.hxx | 5 -- src/Draft/Draft_VertexInfo.hxx | 3 -- src/Draw/Draw_Axis2D.hxx | 2 - src/Draw/Draw_Axis3D.hxx | 2 - src/Draw/Draw_Box.hxx | 1 - src/Draw/Draw_Chronometer.hxx | 2 - src/Draw/Draw_Circle2D.hxx | 2 - src/Draw/Draw_Circle3D.hxx | 2 - src/Draw/Draw_Marker2D.hxx | 2 - src/Draw/Draw_Marker3D.hxx | 2 - src/Draw/Draw_Segment2D.hxx | 2 - src/Draw/Draw_Segment3D.hxx | 2 - src/Draw/Draw_Text2D.hxx | 2 - src/Draw/Draw_Text3D.hxx | 2 - src/DrawDim/DrawDim.hxx | 9 ---- src/DrawDim/DrawDim_Angle.hxx | 1 - src/DrawDim/DrawDim_Dimension.hxx | 1 - src/DrawDim/DrawDim_Distance.hxx | 1 - src/DrawDim/DrawDim_PlanarAngle.hxx | 1 - src/DrawDim/DrawDim_PlanarDiameter.hxx | 1 - src/DrawDim/DrawDim_PlanarDimension.hxx | 1 - src/DrawDim/DrawDim_PlanarDistance.hxx | 1 - src/DrawDim/DrawDim_PlanarRadius.hxx | 1 - src/DrawDim/DrawDim_Radius.hxx | 1 - src/DrawTrSurf/DrawTrSurf_BSplineCurve.hxx | 1 - src/DrawTrSurf/DrawTrSurf_BSplineCurve2d.hxx | 1 - src/DrawTrSurf/DrawTrSurf_BSplineSurface.hxx | 1 - src/DrawTrSurf/DrawTrSurf_BezierCurve.hxx | 1 - src/DrawTrSurf/DrawTrSurf_BezierCurve2d.hxx | 1 - src/DrawTrSurf/DrawTrSurf_BezierSurface.hxx | 1 - src/DrawTrSurf/DrawTrSurf_Curve.hxx | 1 - src/DrawTrSurf/DrawTrSurf_Curve2d.hxx | 1 - src/DrawTrSurf/DrawTrSurf_Point.hxx | 2 - src/DrawTrSurf/DrawTrSurf_Surface.hxx | 1 - src/Expr/Expr.hxx | 51 ------------------- src/Expr/Expr_Absolute.hxx | 2 - src/Expr/Expr_ArcCosine.hxx | 2 - src/Expr/Expr_ArcSine.hxx | 2 - src/Expr/Expr_ArcTangent.hxx | 2 - src/Expr/Expr_ArgCosh.hxx | 2 - src/Expr/Expr_ArgSinh.hxx | 2 - src/Expr/Expr_ArgTanh.hxx | 2 - src/Expr/Expr_BinaryExpression.hxx | 4 -- src/Expr/Expr_BinaryFunction.hxx | 3 -- src/Expr/Expr_Cosh.hxx | 2 - src/Expr/Expr_Cosine.hxx | 2 - src/Expr/Expr_Difference.hxx | 3 -- src/Expr/Expr_Different.hxx | 1 - src/Expr/Expr_Division.hxx | 2 - src/Expr/Expr_Equal.hxx | 1 - src/Expr/Expr_Exponential.hxx | 2 - src/Expr/Expr_Exponentiate.hxx | 2 - src/Expr/Expr_FunctionDerivative.hxx | 6 --- src/Expr/Expr_GeneralExpression.hxx | 4 -- src/Expr/Expr_GeneralFunction.hxx | 4 -- src/Expr/Expr_GeneralRelation.hxx | 2 - src/Expr/Expr_GreaterThan.hxx | 1 - src/Expr/Expr_GreaterThanOrEqual.hxx | 1 - src/Expr/Expr_LessThan.hxx | 1 - src/Expr/Expr_LessThanOrEqual.hxx | 1 - src/Expr/Expr_LogOf10.hxx | 2 - src/Expr/Expr_LogOfe.hxx | 2 - src/Expr/Expr_NamedConstant.hxx | 1 - src/Expr/Expr_NamedExpression.hxx | 2 - src/Expr/Expr_NamedFunction.hxx | 6 --- src/Expr/Expr_NamedUnknown.hxx | 6 --- src/Expr/Expr_NumericValue.hxx | 2 - src/Expr/Expr_PolyExpression.hxx | 4 -- src/Expr/Expr_PolyFunction.hxx | 3 -- src/Expr/Expr_Product.hxx | 2 - src/Expr/Expr_RUIterator.hxx | 2 - src/Expr/Expr_RelationIterator.hxx | 2 - src/Expr/Expr_Sign.hxx | 2 - src/Expr/Expr_Sine.hxx | 2 - src/Expr/Expr_SingleRelation.hxx | 2 - src/Expr/Expr_Sinh.hxx | 2 - src/Expr/Expr_Square.hxx | 2 - src/Expr/Expr_SquareRoot.hxx | 2 - src/Expr/Expr_Sum.hxx | 3 -- src/Expr/Expr_SystemRelation.hxx | 5 -- src/Expr/Expr_Tangent.hxx | 2 - src/Expr/Expr_Tanh.hxx | 2 - src/Expr/Expr_UnaryExpression.hxx | 4 -- src/Expr/Expr_UnaryFunction.hxx | 3 -- src/Expr/Expr_UnaryMinus.hxx | 3 -- src/Expr/Expr_UnknownIterator.hxx | 2 - src/ExprIntrp/ExprIntrp.hxx | 5 -- src/ExprIntrp/ExprIntrp_GenExp.hxx | 1 - src/ExprIntrp/ExprIntrp_GenFct.hxx | 1 - src/ExprIntrp/ExprIntrp_GenRel.hxx | 1 - src/Extrema/Extrema_ExtCC.hxx | 2 - src/Extrema/Extrema_ExtCC2d.hxx | 1 - src/Extrema/Extrema_ExtElC.hxx | 1 - src/Extrema/Extrema_ExtElC2d.hxx | 1 - src/Extrema/Extrema_ExtPElC.hxx | 3 -- src/Extrema/Extrema_ExtPElC2d.hxx | 3 -- src/Extrema/Extrema_ExtPElS.hxx | 3 -- src/Extrema/Extrema_ExtPS.hxx | 4 -- src/Extrema/Extrema_ExtSS.hxx | 3 -- src/Extrema/Extrema_FuncExtCS.hxx | 1 - src/Extrema/Extrema_FuncExtSS.hxx | 1 - src/Extrema/Extrema_GenLocateExtCS.hxx | 4 -- src/Extrema/Extrema_GenLocateExtPS.hxx | 3 -- src/Extrema/Extrema_GenLocateExtSS.hxx | 3 -- src/Extrema/Extrema_LocateExtCC.hxx | 3 -- src/Extrema/Extrema_LocateExtCC2d.hxx | 3 -- src/FEmTool/FEmTool_Assembly.hxx | 3 -- src/FEmTool/FEmTool_Curve.hxx | 1 - src/FEmTool/FEmTool_ElementaryCriterion.hxx | 2 - src/FEmTool/FEmTool_ElementsOfRefMatrix.hxx | 1 - src/FEmTool/FEmTool_LinearFlexion.hxx | 3 -- src/FEmTool/FEmTool_LinearJerk.hxx | 3 -- src/FEmTool/FEmTool_LinearTension.hxx | 3 -- src/FEmTool/FEmTool_ProfileMatrix.hxx | 3 -- src/FEmTool/FEmTool_SparseMatrix.hxx | 1 - src/FSD/FSD_BinaryFile.hxx | 4 -- src/FSD/FSD_CmpFile.hxx | 1 - src/FSD/FSD_File.hxx | 5 -- src/FairCurve/FairCurve_Batten.hxx | 3 -- .../FairCurve_DistributionOfJerk.hxx | 1 - .../FairCurve_DistributionOfSagging.hxx | 1 - .../FairCurve_DistributionOfTension.hxx | 1 - src/FairCurve/FairCurve_MinimalVariation.hxx | 3 -- src/FilletSurf/FilletSurf_Builder.hxx | 2 - src/Font/Font_FontMgr.hxx | 1 - src/GC/GC_MakeArcOfEllipse.hxx | 1 - src/GC/GC_MakeArcOfHyperbola.hxx | 1 - src/GC/GC_MakeArcOfParabola.hxx | 1 - src/GC/GC_MakeCircle.hxx | 1 - src/GC/GC_MakeConicalSurface.hxx | 3 -- src/GC/GC_MakeCylindricalSurface.hxx | 1 - src/GC/GC_MakeEllipse.hxx | 1 - src/GC/GC_MakeHyperbola.hxx | 1 - src/GC/GC_MakeLine.hxx | 1 - src/GC/GC_MakePlane.hxx | 2 - src/GC/GC_MakeSegment.hxx | 1 - src/GC/GC_MakeTrimmedCone.hxx | 1 - src/GC/GC_MakeTrimmedCylinder.hxx | 2 - src/GccAna/GccAna_Circ2d2TanOn.hxx | 3 -- src/GccAna/GccAna_Circ2d2TanRad.hxx | 4 -- src/GccAna/GccAna_Circ2d3Tan.hxx | 3 -- src/GccAna/GccAna_Circ2dBisec.hxx | 3 -- src/GccAna/GccAna_Circ2dTanCen.hxx | 4 -- src/GccAna/GccAna_Circ2dTanOnRad.hxx | 4 -- src/GccAna/GccAna_CircLin2dBisec.hxx | 4 -- src/GccAna/GccAna_CircPnt2dBisec.hxx | 4 -- src/GccAna/GccAna_Lin2d2Tan.hxx | 3 -- src/GccAna/GccAna_Lin2dBisec.hxx | 2 - src/GccAna/GccAna_Lin2dTanObl.hxx | 3 -- src/GccAna/GccAna_Lin2dTanPar.hxx | 3 -- src/GccAna/GccAna_Lin2dTanPer.hxx | 4 -- src/GccAna/GccAna_LinPnt2dBisec.hxx | 2 - src/GccAna/GccAna_Pnt2dBisec.hxx | 2 - 386 files changed, 961 deletions(-) diff --git a/src/Adaptor2d/Adaptor2d_Curve2d.hxx b/src/Adaptor2d/Adaptor2d_Curve2d.hxx index 1da082692c..7f1d17cd8a 100644 --- a/src/Adaptor2d/Adaptor2d_Curve2d.hxx +++ b/src/Adaptor2d/Adaptor2d_Curve2d.hxx @@ -29,9 +29,6 @@ #include #include -class Standard_OutOfRange; -class Standard_NoSuchObject; -class Standard_DomainError; class gp_Pnt2d; class gp_Vec2d; class Geom2d_BezierCurve; diff --git a/src/Adaptor2d/Adaptor2d_Line2d.hxx b/src/Adaptor2d/Adaptor2d_Line2d.hxx index db8ee1a6c0..142263881e 100644 --- a/src/Adaptor2d/Adaptor2d_Line2d.hxx +++ b/src/Adaptor2d/Adaptor2d_Line2d.hxx @@ -29,9 +29,6 @@ #include #include #include -class Standard_OutOfRange; -class Standard_NoSuchObject; -class Standard_DomainError; class gp_Pnt2d; class gp_Dir2d; class gp_Lin2d; diff --git a/src/Adaptor2d/Adaptor2d_OffsetCurve.hxx b/src/Adaptor2d/Adaptor2d_OffsetCurve.hxx index 14c5bd838d..dae4124ec5 100644 --- a/src/Adaptor2d/Adaptor2d_OffsetCurve.hxx +++ b/src/Adaptor2d/Adaptor2d_OffsetCurve.hxx @@ -23,10 +23,6 @@ #include #include -class Standard_NoSuchObject; -class Standard_DomainError; -class Standard_OutOfRange; -class Standard_TypeMismatch; class gp_Pnt2d; class gp_Vec2d; class gp_Lin2d; diff --git a/src/Adaptor3d/Adaptor3d_Curve.hxx b/src/Adaptor3d/Adaptor3d_Curve.hxx index 78f062eafc..e797edea3d 100644 --- a/src/Adaptor3d/Adaptor3d_Curve.hxx +++ b/src/Adaptor3d/Adaptor3d_Curve.hxx @@ -29,9 +29,6 @@ #include #include -class Standard_OutOfRange; -class Standard_NoSuchObject; -class Standard_DomainError; class gp_Pnt; class gp_Vec; class Geom_BezierCurve; diff --git a/src/Adaptor3d/Adaptor3d_HVertex.hxx b/src/Adaptor3d/Adaptor3d_HVertex.hxx index 9a6b6838e3..a887fca9a1 100644 --- a/src/Adaptor3d/Adaptor3d_HVertex.hxx +++ b/src/Adaptor3d/Adaptor3d_HVertex.hxx @@ -21,7 +21,6 @@ #include #include -class gp_Pnt2d; class Adaptor3d_HVertex; DEFINE_STANDARD_HANDLE(Adaptor3d_HVertex, Standard_Transient) diff --git a/src/AdvApp2Var/AdvApp2Var_ApproxAFunc2Var.hxx b/src/AdvApp2Var/AdvApp2Var_ApproxAFunc2Var.hxx index 8a3dc0aa24..e9c79b607f 100644 --- a/src/AdvApp2Var/AdvApp2Var_ApproxAFunc2Var.hxx +++ b/src/AdvApp2Var/AdvApp2Var_ApproxAFunc2Var.hxx @@ -34,8 +34,6 @@ #include #include #include -class Standard_OutOfRange; -class Standard_ConstructionError; class AdvApprox_Cutting; class AdvApp2Var_Criterion; class Geom_BSplineSurface; diff --git a/src/AdvApp2Var/AdvApp2Var_Framework.hxx b/src/AdvApp2Var/AdvApp2Var_Framework.hxx index 6cddd6113a..0f78d3822a 100644 --- a/src/AdvApp2Var/AdvApp2Var_Framework.hxx +++ b/src/AdvApp2Var/AdvApp2Var_Framework.hxx @@ -28,7 +28,6 @@ #include #include #include -class Standard_NoSuchObject; class AdvApp2Var_Iso; class AdvApp2Var_Node; diff --git a/src/AdvApp2Var/AdvApp2Var_Network.hxx b/src/AdvApp2Var/AdvApp2Var_Network.hxx index e88610743e..8c5d95d198 100644 --- a/src/AdvApp2Var/AdvApp2Var_Network.hxx +++ b/src/AdvApp2Var/AdvApp2Var_Network.hxx @@ -26,7 +26,6 @@ #include #include #include -class Standard_NoSuchObject; class AdvApp2Var_Patch; diff --git a/src/AdvApprox/AdvApprox_ApproxAFunction.hxx b/src/AdvApprox/AdvApprox_ApproxAFunction.hxx index 035fe46d2b..74f58b76ca 100644 --- a/src/AdvApprox/AdvApprox_ApproxAFunction.hxx +++ b/src/AdvApprox/AdvApprox_ApproxAFunction.hxx @@ -37,8 +37,6 @@ #include #include #include -class Standard_OutOfRange; -class Standard_ConstructionError; class AdvApprox_Cutting; diff --git a/src/AdvApprox/AdvApprox_PrefAndRec.hxx b/src/AdvApprox/AdvApprox_PrefAndRec.hxx index 7ba2fe5f2c..4fcf49116e 100644 --- a/src/AdvApprox/AdvApprox_PrefAndRec.hxx +++ b/src/AdvApprox/AdvApprox_PrefAndRec.hxx @@ -25,7 +25,6 @@ #include #include #include -class Standard_DomainError; diff --git a/src/AdvApprox/AdvApprox_SimpleApprox.hxx b/src/AdvApprox/AdvApprox_SimpleApprox.hxx index 8c23d48a5c..629c1b7685 100644 --- a/src/AdvApprox/AdvApprox_SimpleApprox.hxx +++ b/src/AdvApprox/AdvApprox_SimpleApprox.hxx @@ -33,8 +33,6 @@ #include #include class PLib_JacobiPolynomial; -class Standard_OutOfRange; -class Standard_ConstructionError; //! Approximate a function on an intervall [First,Last] diff --git a/src/AppBlend/AppBlend_Approx.hxx b/src/AppBlend/AppBlend_Approx.hxx index be0502936f..098d269b42 100644 --- a/src/AppBlend/AppBlend_Approx.hxx +++ b/src/AppBlend/AppBlend_Approx.hxx @@ -29,9 +29,6 @@ #include #include #include -class StdFail_NotDone; -class Standard_DomainError; -class Standard_OutOfRange; //! Bspline approximation of a surface. diff --git a/src/AppDef/AppDef_LinearCriteria.hxx b/src/AppDef/AppDef_LinearCriteria.hxx index ca11ee53c8..d3e95ce033 100644 --- a/src/AppDef/AppDef_LinearCriteria.hxx +++ b/src/AppDef/AppDef_LinearCriteria.hxx @@ -31,9 +31,6 @@ #include class FEmTool_ElementaryCriterion; class FEmTool_Curve; -class Standard_NotImplemented; -class Standard_DomainError; -class AppDef_MultiLine; class math_Matrix; diff --git a/src/AppDef/AppDef_MultiLine.hxx b/src/AppDef/AppDef_MultiLine.hxx index 5ff98794c2..595fc6f9ce 100644 --- a/src/AppDef/AppDef_MultiLine.hxx +++ b/src/AppDef/AppDef_MultiLine.hxx @@ -28,9 +28,6 @@ #include #include #include -class Standard_ConstructionError; -class Standard_DimensionError; -class Standard_OutOfRange; class AppDef_MultiPointConstraint; diff --git a/src/AppDef/AppDef_MultiPointConstraint.hxx b/src/AppDef/AppDef_MultiPointConstraint.hxx index 838b98b104..70a91f929c 100644 --- a/src/AppDef/AppDef_MultiPointConstraint.hxx +++ b/src/AppDef/AppDef_MultiPointConstraint.hxx @@ -27,9 +27,6 @@ #include #include -class Standard_OutOfRange; -class Standard_ConstructionError; -class Standard_DimensionError; class gp_Vec; class gp_Vec2d; diff --git a/src/AppDef/AppDef_SmoothCriterion.hxx b/src/AppDef/AppDef_SmoothCriterion.hxx index 69d4e555e1..a1b2b60ea0 100644 --- a/src/AppDef/AppDef_SmoothCriterion.hxx +++ b/src/AppDef/AppDef_SmoothCriterion.hxx @@ -28,8 +28,6 @@ #include #include #include -class Standard_NotImplemented; -class Standard_DomainError; class FEmTool_Curve; class math_Matrix; diff --git a/src/AppDef/AppDef_Variational.hxx b/src/AppDef/AppDef_Variational.hxx index bb9b2c52d5..d9069f1e15 100644 --- a/src/AppDef/AppDef_Variational.hxx +++ b/src/AppDef/AppDef_Variational.hxx @@ -35,14 +35,6 @@ #include #include class AppDef_SmoothCriterion; -class Standard_OutOfRange; -class Standard_DimensionError; -class Standard_DomainError; -class Standard_ConstructionError; -class StdFail_NotDone; -class gp_VectorWithNullMagnitude; -class AppDef_MultiLine; -class AppParCurves_MultiBSpCurve; class math_Matrix; class FEmTool_Curve; class FEmTool_Assembly; diff --git a/src/AppParCurves/AppParCurves.hxx b/src/AppParCurves/AppParCurves.hxx index 5e8b5f0d3c..e7ae86624b 100644 --- a/src/AppParCurves/AppParCurves.hxx +++ b/src/AppParCurves/AppParCurves.hxx @@ -26,23 +26,6 @@ #include #include class math_Matrix; -class AppParCurves_MultiPoint; -class AppParCurves_MultiCurve; -class AppParCurves_MultiBSpCurve; -class AppParCurves_ConstraintCouple; -class AppParCurves_LeastSquare; -class AppParCurves_ResolConstraint; -class AppParCurves_Function; -class AppParCurves_BSpFunction; -class AppParCurves_Gradient; -class AppParCurves_Gradient_BFGS; -class AppParCurves_ParLeastSquare; -class AppParCurves_ResConstraint; -class AppParCurves_ParFunction; -class AppParCurves_BSpGradient; -class AppParCurves_BSpGradient_BFGS; -class AppParCurves_BSpParLeastSquare; -class AppParCurves_BSpParFunction; //! Parallel Approximation in n curves. diff --git a/src/AppParCurves/AppParCurves_MultiBSpCurve.hxx b/src/AppParCurves/AppParCurves_MultiBSpCurve.hxx index 456110252d..b1f5a8573a 100644 --- a/src/AppParCurves/AppParCurves_MultiBSpCurve.hxx +++ b/src/AppParCurves/AppParCurves_MultiBSpCurve.hxx @@ -30,10 +30,6 @@ #include #include #include -class Standard_OutOfRange; -class Standard_DimensionError; -class Standard_ConstructionError; -class AppParCurves_MultiCurve; class gp_Pnt; class gp_Pnt2d; class gp_Vec; diff --git a/src/AppParCurves/AppParCurves_MultiCurve.hxx b/src/AppParCurves/AppParCurves_MultiCurve.hxx index e7f6ca1252..9d81f0392e 100644 --- a/src/AppParCurves/AppParCurves_MultiCurve.hxx +++ b/src/AppParCurves/AppParCurves_MultiCurve.hxx @@ -28,9 +28,6 @@ #include #include #include -class Standard_OutOfRange; -class Standard_DimensionError; -class Standard_ConstructionError; class AppParCurves_MultiPoint; class gp_Pnt; class gp_Pnt2d; diff --git a/src/AppParCurves/AppParCurves_MultiPoint.hxx b/src/AppParCurves/AppParCurves_MultiPoint.hxx index d81305e0d0..f1194f1352 100644 --- a/src/AppParCurves/AppParCurves_MultiPoint.hxx +++ b/src/AppParCurves/AppParCurves_MultiPoint.hxx @@ -27,8 +27,6 @@ #include #include class Standard_Transient; -class Standard_OutOfRange; -class Standard_DimensionError; class gp_Pnt; class gp_Pnt2d; diff --git a/src/Approx/Approx_MCurvesToBSpCurve.hxx b/src/Approx/Approx_MCurvesToBSpCurve.hxx index e4f8df9ce2..a1875efadd 100644 --- a/src/Approx/Approx_MCurvesToBSpCurve.hxx +++ b/src/Approx/Approx_MCurvesToBSpCurve.hxx @@ -25,7 +25,6 @@ #include #include class AppParCurves_MultiCurve; -class AppParCurves_MultiBSpCurve; diff --git a/src/Approx/Approx_SweepApproximation.hxx b/src/Approx/Approx_SweepApproximation.hxx index d350f9d4f8..7b67b0380f 100644 --- a/src/Approx/Approx_SweepApproximation.hxx +++ b/src/Approx/Approx_SweepApproximation.hxx @@ -44,9 +44,6 @@ #include #include class Approx_SweepFunction; -class StdFail_NotDone; -class Standard_DomainError; -class Standard_OutOfRange; class AdvApprox_Cutting; diff --git a/src/Approx/Approx_SweepFunction.hxx b/src/Approx/Approx_SweepFunction.hxx index 206e158e4d..52eddb118b 100644 --- a/src/Approx/Approx_SweepFunction.hxx +++ b/src/Approx/Approx_SweepFunction.hxx @@ -31,8 +31,6 @@ #include #include #include -class Standard_NotImplemented; -class Standard_OutOfRange; class gp_Pnt; diff --git a/src/Aspect/Aspect_Background.hxx b/src/Aspect/Aspect_Background.hxx index 64630779f2..3b9b983277 100644 --- a/src/Aspect/Aspect_Background.hxx +++ b/src/Aspect/Aspect_Background.hxx @@ -22,7 +22,6 @@ #include #include -class Quantity_Color; //! This class allows the definition of diff --git a/src/Aspect/Aspect_CircularGrid.hxx b/src/Aspect/Aspect_CircularGrid.hxx index b8bb709ef9..917163ed5c 100644 --- a/src/Aspect/Aspect_CircularGrid.hxx +++ b/src/Aspect/Aspect_CircularGrid.hxx @@ -24,9 +24,6 @@ #include #include -class Standard_NegativeValue; -class Standard_NullValue; -class Standard_NumericError; class Aspect_CircularGrid : public Aspect_Grid { diff --git a/src/Aspect/Aspect_GenId.hxx b/src/Aspect/Aspect_GenId.hxx index 73d6702ce3..4b58fe758b 100644 --- a/src/Aspect/Aspect_GenId.hxx +++ b/src/Aspect/Aspect_GenId.hxx @@ -24,7 +24,6 @@ #include #include #include -class Aspect_IdentDefinitionError; //! This class permits the creation and control of integer identifiers. diff --git a/src/Aspect/Aspect_RectangularGrid.hxx b/src/Aspect/Aspect_RectangularGrid.hxx index 8e4146e95d..4cdcc08485 100644 --- a/src/Aspect/Aspect_RectangularGrid.hxx +++ b/src/Aspect/Aspect_RectangularGrid.hxx @@ -23,9 +23,6 @@ #include #include #include -class Standard_NegativeValue; -class Standard_NullValue; -class Standard_NumericError; class Aspect_RectangularGrid : public Aspect_Grid { diff --git a/src/BRep/BRep_Builder.hxx b/src/BRep/BRep_Builder.hxx index 37239a8512..ef3cbf4c72 100644 --- a/src/BRep/BRep_Builder.hxx +++ b/src/BRep/BRep_Builder.hxx @@ -30,8 +30,6 @@ #include #include -class Standard_NullObject; -class Standard_DomainError; class TopoDS_Face; class Geom_Surface; class TopLoc_Location; diff --git a/src/BRep/BRep_CurveOn2Surfaces.hxx b/src/BRep/BRep_CurveOn2Surfaces.hxx index 37356a92d2..2c487d656e 100644 --- a/src/BRep/BRep_CurveOn2Surfaces.hxx +++ b/src/BRep/BRep_CurveOn2Surfaces.hxx @@ -26,10 +26,7 @@ #include #include class Geom_Surface; -class Standard_NullObject; -class TopLoc_Location; class gp_Pnt; -class BRep_CurveRepresentation; class BRep_CurveOn2Surfaces; diff --git a/src/BRep/BRep_CurveOnClosedSurface.hxx b/src/BRep/BRep_CurveOnClosedSurface.hxx index e418f2fab4..1938304e90 100644 --- a/src/BRep/BRep_CurveOnClosedSurface.hxx +++ b/src/BRep/BRep_CurveOnClosedSurface.hxx @@ -27,7 +27,6 @@ class Geom2d_Curve; class Geom_Surface; class TopLoc_Location; -class gp_Pnt2d; class BRep_CurveRepresentation; diff --git a/src/BRep/BRep_CurveOnSurface.hxx b/src/BRep/BRep_CurveOnSurface.hxx index 6f6c49026e..b5ac334966 100644 --- a/src/BRep/BRep_CurveOnSurface.hxx +++ b/src/BRep/BRep_CurveOnSurface.hxx @@ -27,7 +27,6 @@ class Geom2d_Curve; class Geom_Surface; class TopLoc_Location; -class gp_Pnt2d; class gp_Pnt; class BRep_CurveRepresentation; diff --git a/src/BRep/BRep_CurveRepresentation.hxx b/src/BRep/BRep_CurveRepresentation.hxx index f1dcf6226c..5d2389c2ce 100644 --- a/src/BRep/BRep_CurveRepresentation.hxx +++ b/src/BRep/BRep_CurveRepresentation.hxx @@ -24,8 +24,6 @@ #include #include #include -class Standard_DomainError; -class TopLoc_Location; class Geom_Surface; class Poly_Triangulation; class Geom_Curve; diff --git a/src/BRep/BRep_PointRepresentation.hxx b/src/BRep/BRep_PointRepresentation.hxx index ed8ba9983d..8d90833e93 100644 --- a/src/BRep/BRep_PointRepresentation.hxx +++ b/src/BRep/BRep_PointRepresentation.hxx @@ -24,8 +24,6 @@ #include #include #include -class Standard_DomainError; -class TopLoc_Location; class Geom_Curve; class Geom2d_Curve; class Geom_Surface; diff --git a/src/BRep/BRep_Polygon3D.hxx b/src/BRep/BRep_Polygon3D.hxx index 4a4abfc932..4d19a503a8 100644 --- a/src/BRep/BRep_Polygon3D.hxx +++ b/src/BRep/BRep_Polygon3D.hxx @@ -23,9 +23,7 @@ #include #include class Poly_Polygon3D; -class Standard_DomainError; class TopLoc_Location; -class BRep_CurveRepresentation; class BRep_Polygon3D; diff --git a/src/BRep/BRep_PolygonOnSurface.hxx b/src/BRep/BRep_PolygonOnSurface.hxx index 38e8d7ec0a..62d05df2b8 100644 --- a/src/BRep/BRep_PolygonOnSurface.hxx +++ b/src/BRep/BRep_PolygonOnSurface.hxx @@ -24,9 +24,7 @@ #include class Poly_Polygon2D; class Geom_Surface; -class Standard_DomainError; class TopLoc_Location; -class BRep_CurveRepresentation; class BRep_PolygonOnSurface; diff --git a/src/BRep/BRep_PolygonOnTriangulation.hxx b/src/BRep/BRep_PolygonOnTriangulation.hxx index cf64767457..6a8cb5e9ce 100644 --- a/src/BRep/BRep_PolygonOnTriangulation.hxx +++ b/src/BRep/BRep_PolygonOnTriangulation.hxx @@ -25,7 +25,6 @@ class Poly_PolygonOnTriangulation; class Poly_Triangulation; class TopLoc_Location; -class BRep_CurveRepresentation; class BRep_PolygonOnTriangulation; diff --git a/src/BRep/BRep_TFace.hxx b/src/BRep/BRep_TFace.hxx index f1b589f26f..9d8edc974d 100644 --- a/src/BRep/BRep_TFace.hxx +++ b/src/BRep/BRep_TFace.hxx @@ -26,7 +26,6 @@ #include #include class Geom_Surface; -class TopLoc_Location; class TopoDS_TShape; class BRep_TFace; diff --git a/src/BRep/BRep_TVertex.hxx b/src/BRep/BRep_TVertex.hxx index edd9c10362..21292ef6f0 100644 --- a/src/BRep/BRep_TVertex.hxx +++ b/src/BRep/BRep_TVertex.hxx @@ -24,7 +24,6 @@ #include #include #include -class gp_Pnt; class TopoDS_TShape; diff --git a/src/BRepAdaptor/BRepAdaptor_CompCurve.hxx b/src/BRepAdaptor/BRepAdaptor_CompCurve.hxx index 9378600ea0..adacaf5825 100644 --- a/src/BRepAdaptor/BRepAdaptor_CompCurve.hxx +++ b/src/BRepAdaptor/BRepAdaptor_CompCurve.hxx @@ -32,11 +32,6 @@ #include #include -class Standard_NullObject; -class Standard_DomainError; -class Standard_OutOfRange; -class Standard_NoSuchObject; -class TopoDS_Wire; class TopoDS_Edge; class gp_Pnt; class gp_Vec; diff --git a/src/BRepAdaptor/BRepAdaptor_Curve.hxx b/src/BRepAdaptor/BRepAdaptor_Curve.hxx index b411124337..fe198ee6a3 100644 --- a/src/BRepAdaptor/BRepAdaptor_Curve.hxx +++ b/src/BRepAdaptor/BRepAdaptor_Curve.hxx @@ -29,14 +29,7 @@ #include #include -class Standard_NullObject; -class Standard_DomainError; -class Standard_OutOfRange; -class Standard_NoSuchObject; -class TopoDS_Edge; class TopoDS_Face; -class gp_Trsf; -class GeomAdaptor_Curve; class Adaptor3d_CurveOnSurface; class gp_Pnt; class gp_Vec; diff --git a/src/BRepAdaptor/BRepAdaptor_Curve2d.hxx b/src/BRepAdaptor/BRepAdaptor_Curve2d.hxx index a78e3c987a..28e75f7ace 100644 --- a/src/BRepAdaptor/BRepAdaptor_Curve2d.hxx +++ b/src/BRepAdaptor/BRepAdaptor_Curve2d.hxx @@ -24,9 +24,6 @@ #include #include #include -class Standard_NullObject; -class TopoDS_Edge; -class TopoDS_Face; //! The Curve2d from BRepAdaptor allows to use an Edge diff --git a/src/BRepAdaptor/BRepAdaptor_Surface.hxx b/src/BRepAdaptor/BRepAdaptor_Surface.hxx index ed067dc619..b1b6c4014f 100644 --- a/src/BRepAdaptor/BRepAdaptor_Surface.hxx +++ b/src/BRepAdaptor/BRepAdaptor_Surface.hxx @@ -25,10 +25,6 @@ #include #include -class Standard_OutOfRange; -class Standard_DomainError; -class Standard_NoSuchObject; -class gp_Trsf; class gp_Pnt; class gp_Vec; class gp_Pln; diff --git a/src/BRepBuilderAPI/BRepBuilderAPI.hxx b/src/BRepBuilderAPI/BRepBuilderAPI.hxx index f9c72e0fc5..2bc47ce761 100644 --- a/src/BRepBuilderAPI/BRepBuilderAPI.hxx +++ b/src/BRepBuilderAPI/BRepBuilderAPI.hxx @@ -23,24 +23,6 @@ #include class Geom_Plane; -class BRepBuilderAPI_Command; -class BRepBuilderAPI_MakeShape; -class BRepBuilderAPI_MakeVertex; -class BRepBuilderAPI_MakeEdge; -class BRepBuilderAPI_MakeEdge2d; -class BRepBuilderAPI_MakePolygon; -class BRepBuilderAPI_MakeFace; -class BRepBuilderAPI_FindPlane; -class BRepBuilderAPI_Sewing; -class BRepBuilderAPI_MakeWire; -class BRepBuilderAPI_MakeShell; -class BRepBuilderAPI_MakeSolid; -class BRepBuilderAPI_ModifyShape; -class BRepBuilderAPI_Transform; -class BRepBuilderAPI_NurbsConvert; -class BRepBuilderAPI_GTransform; -class BRepBuilderAPI_Copy; -class BRepBuilderAPI_Collect; //! The BRepBuilderAPI package provides an Application diff --git a/src/BRepBuilderAPI/BRepBuilderAPI_Collect.hxx b/src/BRepBuilderAPI/BRepBuilderAPI_Collect.hxx index 6164d1c005..9183e23b3c 100644 --- a/src/BRepBuilderAPI/BRepBuilderAPI_Collect.hxx +++ b/src/BRepBuilderAPI/BRepBuilderAPI_Collect.hxx @@ -24,7 +24,6 @@ #include #include #include -class TopoDS_Shape; class BRepBuilderAPI_MakeShape; diff --git a/src/BRepBuilderAPI/BRepBuilderAPI_Command.hxx b/src/BRepBuilderAPI/BRepBuilderAPI_Command.hxx index a64a8ec868..6af627cd8f 100644 --- a/src/BRepBuilderAPI/BRepBuilderAPI_Command.hxx +++ b/src/BRepBuilderAPI/BRepBuilderAPI_Command.hxx @@ -22,7 +22,6 @@ #include #include -class StdFail_NotDone; //! Root class for all commands in BRepBuilderAPI. diff --git a/src/BRepBuilderAPI/BRepBuilderAPI_FindPlane.hxx b/src/BRepBuilderAPI/BRepBuilderAPI_FindPlane.hxx index 522383afe0..a0695d5809 100644 --- a/src/BRepBuilderAPI/BRepBuilderAPI_FindPlane.hxx +++ b/src/BRepBuilderAPI/BRepBuilderAPI_FindPlane.hxx @@ -24,7 +24,6 @@ #include #include class Geom_Plane; -class Standard_NoSuchObject; class TopoDS_Shape; diff --git a/src/BRepBuilderAPI/BRepBuilderAPI_GTransform.hxx b/src/BRepBuilderAPI/BRepBuilderAPI_GTransform.hxx index 14ea2adb8f..3cc981de8e 100644 --- a/src/BRepBuilderAPI/BRepBuilderAPI_GTransform.hxx +++ b/src/BRepBuilderAPI/BRepBuilderAPI_GTransform.hxx @@ -26,8 +26,6 @@ #include #include #include -class Standard_NoSuchObject; -class gp_GTrsf; class TopoDS_Shape; diff --git a/src/BRepBuilderAPI/BRepBuilderAPI_MakeEdge.hxx b/src/BRepBuilderAPI/BRepBuilderAPI_MakeEdge.hxx index 20150a9702..e26dc8b06d 100644 --- a/src/BRepBuilderAPI/BRepBuilderAPI_MakeEdge.hxx +++ b/src/BRepBuilderAPI/BRepBuilderAPI_MakeEdge.hxx @@ -26,7 +26,6 @@ #include #include #include -class StdFail_NotDone; class TopoDS_Vertex; class gp_Pnt; class gp_Lin; diff --git a/src/BRepBuilderAPI/BRepBuilderAPI_MakeEdge2d.hxx b/src/BRepBuilderAPI/BRepBuilderAPI_MakeEdge2d.hxx index 44bac0067e..b44b213721 100644 --- a/src/BRepBuilderAPI/BRepBuilderAPI_MakeEdge2d.hxx +++ b/src/BRepBuilderAPI/BRepBuilderAPI_MakeEdge2d.hxx @@ -26,7 +26,6 @@ #include #include #include -class StdFail_NotDone; class TopoDS_Vertex; class gp_Pnt2d; class gp_Lin2d; diff --git a/src/BRepBuilderAPI/BRepBuilderAPI_MakeFace.hxx b/src/BRepBuilderAPI/BRepBuilderAPI_MakeFace.hxx index 051e5e49c6..75187545da 100644 --- a/src/BRepBuilderAPI/BRepBuilderAPI_MakeFace.hxx +++ b/src/BRepBuilderAPI/BRepBuilderAPI_MakeFace.hxx @@ -26,7 +26,6 @@ #include #include #include -class StdFail_NotDone; class TopoDS_Face; class gp_Pln; class gp_Cylinder; diff --git a/src/BRepBuilderAPI/BRepBuilderAPI_MakePolygon.hxx b/src/BRepBuilderAPI/BRepBuilderAPI_MakePolygon.hxx index 0753ed4901..a0fde05bc6 100644 --- a/src/BRepBuilderAPI/BRepBuilderAPI_MakePolygon.hxx +++ b/src/BRepBuilderAPI/BRepBuilderAPI_MakePolygon.hxx @@ -24,7 +24,6 @@ #include #include #include -class StdFail_NotDone; class gp_Pnt; class TopoDS_Vertex; class TopoDS_Edge; diff --git a/src/BRepBuilderAPI/BRepBuilderAPI_MakeShape.hxx b/src/BRepBuilderAPI/BRepBuilderAPI_MakeShape.hxx index d7d6b5ec91..80c06e107c 100644 --- a/src/BRepBuilderAPI/BRepBuilderAPI_MakeShape.hxx +++ b/src/BRepBuilderAPI/BRepBuilderAPI_MakeShape.hxx @@ -26,8 +26,6 @@ #include #include #include -class StdFail_NotDone; -class TopoDS_Shape; //! This is the root class for all shape diff --git a/src/BRepBuilderAPI/BRepBuilderAPI_MakeShell.hxx b/src/BRepBuilderAPI/BRepBuilderAPI_MakeShell.hxx index a6a1225a84..817a533725 100644 --- a/src/BRepBuilderAPI/BRepBuilderAPI_MakeShell.hxx +++ b/src/BRepBuilderAPI/BRepBuilderAPI_MakeShell.hxx @@ -26,7 +26,6 @@ #include #include #include -class StdFail_NotDone; class Geom_Surface; class TopoDS_Shell; diff --git a/src/BRepBuilderAPI/BRepBuilderAPI_MakeSolid.hxx b/src/BRepBuilderAPI/BRepBuilderAPI_MakeSolid.hxx index 6529416b06..1bb3b20aea 100644 --- a/src/BRepBuilderAPI/BRepBuilderAPI_MakeSolid.hxx +++ b/src/BRepBuilderAPI/BRepBuilderAPI_MakeSolid.hxx @@ -24,7 +24,6 @@ #include #include #include -class StdFail_NotDone; class TopoDS_CompSolid; class TopoDS_Shell; class TopoDS_Solid; diff --git a/src/BRepBuilderAPI/BRepBuilderAPI_MakeWire.hxx b/src/BRepBuilderAPI/BRepBuilderAPI_MakeWire.hxx index 242ae77f3f..3c83d7b021 100644 --- a/src/BRepBuilderAPI/BRepBuilderAPI_MakeWire.hxx +++ b/src/BRepBuilderAPI/BRepBuilderAPI_MakeWire.hxx @@ -26,7 +26,6 @@ #include #include #include -class StdFail_NotDone; class TopoDS_Edge; class TopoDS_Wire; class TopoDS_Vertex; diff --git a/src/BRepBuilderAPI/BRepBuilderAPI_ModifyShape.hxx b/src/BRepBuilderAPI/BRepBuilderAPI_ModifyShape.hxx index 87cb53d93f..63986cd03f 100644 --- a/src/BRepBuilderAPI/BRepBuilderAPI_ModifyShape.hxx +++ b/src/BRepBuilderAPI/BRepBuilderAPI_ModifyShape.hxx @@ -26,9 +26,6 @@ #include #include class BRepTools_Modification; -class Standard_NullObject; -class Standard_NoSuchObject; -class TopoDS_Shape; //! Implements the methods of MakeShape for the diff --git a/src/BRepBuilderAPI/BRepBuilderAPI_Sewing.hxx b/src/BRepBuilderAPI/BRepBuilderAPI_Sewing.hxx index ff67eae28f..217dc572cc 100644 --- a/src/BRepBuilderAPI/BRepBuilderAPI_Sewing.hxx +++ b/src/BRepBuilderAPI/BRepBuilderAPI_Sewing.hxx @@ -44,9 +44,6 @@ #include class BRepTools_ReShape; -class Standard_OutOfRange; -class Standard_NoSuchObject; -class TopoDS_Shape; class TopoDS_Edge; class TopoDS_Face; class Geom_Surface; diff --git a/src/BRepBuilderAPI/BRepBuilderAPI_Transform.hxx b/src/BRepBuilderAPI/BRepBuilderAPI_Transform.hxx index 17bb673553..c3945e20ec 100644 --- a/src/BRepBuilderAPI/BRepBuilderAPI_Transform.hxx +++ b/src/BRepBuilderAPI/BRepBuilderAPI_Transform.hxx @@ -26,8 +26,6 @@ #include #include #include -class Standard_NoSuchObject; -class gp_Trsf; class TopoDS_Shape; diff --git a/src/BRepCheck/BRepCheck.hxx b/src/BRepCheck/BRepCheck.hxx index 820adb65e5..2ceb463556 100644 --- a/src/BRepCheck/BRepCheck.hxx +++ b/src/BRepCheck/BRepCheck.hxx @@ -26,14 +26,6 @@ class TopoDS_Wire; class TopoDS_Face; class TopoDS_Edge; class Adaptor3d_Curve; -class BRepCheck_Result; -class BRepCheck_Vertex; -class BRepCheck_Edge; -class BRepCheck_Wire; -class BRepCheck_Face; -class BRepCheck_Shell; -class BRepCheck_Solid; -class BRepCheck_Analyzer; //! This package provides tools to check the validity diff --git a/src/BRepCheck/BRepCheck_Analyzer.hxx b/src/BRepCheck/BRepCheck_Analyzer.hxx index d921efdc64..f604214fa9 100644 --- a/src/BRepCheck/BRepCheck_Analyzer.hxx +++ b/src/BRepCheck/BRepCheck_Analyzer.hxx @@ -25,9 +25,6 @@ #include #include #include -class Standard_NullObject; -class Standard_NoSuchObject; -class TopoDS_Shape; class BRepCheck_Result; //! A framework to check the overall diff --git a/src/BRepCheck/BRepCheck_Result.hxx b/src/BRepCheck/BRepCheck_Result.hxx index f731ef6051..b993569099 100644 --- a/src/BRepCheck/BRepCheck_Result.hxx +++ b/src/BRepCheck/BRepCheck_Result.hxx @@ -27,9 +27,6 @@ #include #include -class BRepCheck_ParallelAnalyzer; -class Standard_NoSuchObject; -class TopoDS_Shape; DEFINE_STANDARD_HANDLE(BRepCheck_Result, Standard_Transient) diff --git a/src/BRepClass3d/BRepClass3d.hxx b/src/BRepClass3d/BRepClass3d.hxx index 45c8299d4c..333eea514f 100644 --- a/src/BRepClass3d/BRepClass3d.hxx +++ b/src/BRepClass3d/BRepClass3d.hxx @@ -23,11 +23,6 @@ class TopoDS_Shell; class TopoDS_Solid; -class BRepClass3d_Intersector3d; -class BRepClass3d_SolidExplorer; -class BRepClass3d_SolidPassiveClassifier; -class BRepClass3d_SClassifier; -class BRepClass3d_SolidClassifier; diff --git a/src/BRepClass3d/BRepClass3d_Intersector3d.hxx b/src/BRepClass3d/BRepClass3d_Intersector3d.hxx index 268eb0ccef..7b7c3c0916 100644 --- a/src/BRepClass3d/BRepClass3d_Intersector3d.hxx +++ b/src/BRepClass3d/BRepClass3d_Intersector3d.hxx @@ -28,8 +28,6 @@ #include #include class gp_Lin; -class TopoDS_Face; -class gp_Pnt; diff --git a/src/BRepClass3d/BRepClass3d_SClassifier.hxx b/src/BRepClass3d/BRepClass3d_SClassifier.hxx index be08d73de1..732cf5b3b2 100644 --- a/src/BRepClass3d/BRepClass3d_SClassifier.hxx +++ b/src/BRepClass3d/BRepClass3d_SClassifier.hxx @@ -26,10 +26,8 @@ #include #include #include -class Standard_DomainError; class BRepClass3d_SolidExplorer; class gp_Pnt; -class TopoDS_Face; //! Provides an algorithm to classify a point in a solid. diff --git a/src/BRepClass3d/BRepClass3d_SolidClassifier.hxx b/src/BRepClass3d/BRepClass3d_SolidClassifier.hxx index 6ec3d2449c..4e902600e5 100644 --- a/src/BRepClass3d/BRepClass3d_SolidClassifier.hxx +++ b/src/BRepClass3d/BRepClass3d_SolidClassifier.hxx @@ -25,7 +25,6 @@ #include #include #include -class Standard_DomainError; class TopoDS_Shape; class gp_Pnt; diff --git a/src/BRepExtrema/BRepExtrema_ExtCF.hxx b/src/BRepExtrema/BRepExtrema_ExtCF.hxx index 159bc8c165..b0ac4e077c 100644 --- a/src/BRepExtrema/BRepExtrema_ExtCF.hxx +++ b/src/BRepExtrema/BRepExtrema_ExtCF.hxx @@ -25,7 +25,6 @@ class TopoDS_Edge; class TopoDS_Face; -class gp_Pnt; class BRepExtrema_ExtCF { diff --git a/src/BRepExtrema/BRepExtrema_ExtFF.hxx b/src/BRepExtrema/BRepExtrema_ExtFF.hxx index 74bf88316a..2bafcee749 100644 --- a/src/BRepExtrema/BRepExtrema_ExtFF.hxx +++ b/src/BRepExtrema/BRepExtrema_ExtFF.hxx @@ -22,7 +22,6 @@ #include class TopoDS_Face; -class gp_Pnt; class BRepExtrema_ExtFF { diff --git a/src/BRepExtrema/BRepExtrema_ExtPC.hxx b/src/BRepExtrema/BRepExtrema_ExtPC.hxx index a4c3a765c5..2ab085fb26 100644 --- a/src/BRepExtrema/BRepExtrema_ExtPC.hxx +++ b/src/BRepExtrema/BRepExtrema_ExtPC.hxx @@ -20,7 +20,6 @@ class TopoDS_Vertex; class TopoDS_Edge; -class gp_Pnt; class BRepExtrema_ExtPC diff --git a/src/BRepExtrema/BRepExtrema_ExtPF.hxx b/src/BRepExtrema/BRepExtrema_ExtPF.hxx index 5a79f84579..1c90d570ab 100644 --- a/src/BRepExtrema/BRepExtrema_ExtPF.hxx +++ b/src/BRepExtrema/BRepExtrema_ExtPF.hxx @@ -25,7 +25,6 @@ class TopoDS_Vertex; class TopoDS_Face; -class gp_Pnt; class BRepExtrema_ExtPF diff --git a/src/BRepGProp/BRepGProp.hxx b/src/BRepGProp/BRepGProp.hxx index 0cbbdfe016..ea9f2cbf94 100644 --- a/src/BRepGProp/BRepGProp.hxx +++ b/src/BRepGProp/BRepGProp.hxx @@ -28,16 +28,6 @@ class TopoDS_Shape; class GProp_GProps; class gp_Pln; -class BRepGProp_EdgeTool; -class BRepGProp_Face; -class BRepGProp_Domain; -class BRepGProp_Cinert; -class BRepGProp_Sinert; -class BRepGProp_Vinert; -class BRepGProp_VinertGK; -class BRepGProp_UFunction; -class BRepGProp_TFunction; -class gp_XYZ; //! Provides global functions to compute a shape's global diff --git a/src/BRepGProp/BRepGProp_EdgeTool.hxx b/src/BRepGProp/BRepGProp_EdgeTool.hxx index 25a47f6f03..f697986b4a 100644 --- a/src/BRepGProp/BRepGProp_EdgeTool.hxx +++ b/src/BRepGProp/BRepGProp_EdgeTool.hxx @@ -25,7 +25,6 @@ #include #include #include -class Standard_OutOfRange; class BRepAdaptor_Curve; class gp_Pnt; class gp_Vec; diff --git a/src/BRepGProp/BRepGProp_MeshProps.hxx b/src/BRepGProp/BRepGProp_MeshProps.hxx index 5ec46cece6..57622d0d98 100644 --- a/src/BRepGProp/BRepGProp_MeshProps.hxx +++ b/src/BRepGProp/BRepGProp_MeshProps.hxx @@ -21,7 +21,6 @@ class Poly_Triangulation; class TopLoc_Location; -class gp_Pnt; //! Computes the global properties of a surface mesh. The mesh can be diff --git a/src/BRepGProp/BRepGProp_TFunction.hxx b/src/BRepGProp/BRepGProp_TFunction.hxx index baecc46400..6566403995 100644 --- a/src/BRepGProp/BRepGProp_TFunction.hxx +++ b/src/BRepGProp/BRepGProp_TFunction.hxx @@ -28,7 +28,6 @@ #include #include #include -class BRepGProp_Face; class gp_Pnt; diff --git a/src/BRepGProp/BRepGProp_UFunction.hxx b/src/BRepGProp/BRepGProp_UFunction.hxx index 1bc0da5e52..9a70a66381 100644 --- a/src/BRepGProp/BRepGProp_UFunction.hxx +++ b/src/BRepGProp/BRepGProp_UFunction.hxx @@ -27,8 +27,6 @@ #include #include #include -class BRepGProp_Face; -class gp_Pnt; class gp_XYZ; diff --git a/src/BRepGProp/BRepGProp_VinertGK.hxx b/src/BRepGProp/BRepGProp_VinertGK.hxx index 54ed1e98b5..7aaf3829c5 100644 --- a/src/BRepGProp/BRepGProp_VinertGK.hxx +++ b/src/BRepGProp/BRepGProp_VinertGK.hxx @@ -25,7 +25,6 @@ #include #include class BRepGProp_Face; -class gp_Pnt; class BRepGProp_Domain; class gp_Pln; diff --git a/src/BRepIntCurveSurface/BRepIntCurveSurface_Inter.hxx b/src/BRepIntCurveSurface/BRepIntCurveSurface_Inter.hxx index c86ba7625a..b3d555b04f 100644 --- a/src/BRepIntCurveSurface/BRepIntCurveSurface_Inter.hxx +++ b/src/BRepIntCurveSurface/BRepIntCurveSurface_Inter.hxx @@ -26,7 +26,6 @@ #include class BRepTopAdaptor_TopolTool; -class StdFail_NotDone; class TopoDS_Shape; class GeomAdaptor_Curve; class gp_Lin; diff --git a/src/BRepLProp/BRepLProp.hxx b/src/BRepLProp/BRepLProp.hxx index ecdec3dbb8..7d96d8e85b 100644 --- a/src/BRepLProp/BRepLProp.hxx +++ b/src/BRepLProp/BRepLProp.hxx @@ -24,10 +24,6 @@ #include #include class BRepAdaptor_Curve; -class BRepLProp_CurveTool; -class BRepLProp_SurfaceTool; -class BRepLProp_CLProps; -class BRepLProp_SLProps; //! These global functions compute the degree of diff --git a/src/BRepLib/BRepLib.hxx b/src/BRepLib/BRepLib.hxx index 6f8c0b7d2e..8a95ae2cc1 100644 --- a/src/BRepLib/BRepLib.hxx +++ b/src/BRepLib/BRepLib.hxx @@ -36,19 +36,6 @@ class Geom_Plane; class TopoDS_Shape; class TopoDS_Solid; class TopoDS_Face; -class BRepLib_Command; -class BRepLib_MakeShape; -class BRepLib_MakeVertex; -class BRepLib_MakeEdge; -class BRepLib_MakeEdge2d; -class BRepLib_MakePolygon; -class BRepLib_MakeFace; -class BRepLib_MakeWire; -class BRepLib_MakeShell; -class BRepLib_MakeSolid; -class BRepLib_FindSurface; -class BRepLib_FuseEdges; -class BRepLib_CheckCurveOnSurface; class BRepTools_ReShape; diff --git a/src/BRepLib/BRepLib_Command.hxx b/src/BRepLib/BRepLib_Command.hxx index bf2a5ce1d9..dd00a81cb1 100644 --- a/src/BRepLib/BRepLib_Command.hxx +++ b/src/BRepLib/BRepLib_Command.hxx @@ -22,7 +22,6 @@ #include #include -class StdFail_NotDone; //! Root class for all commands in BRepLib. diff --git a/src/BRepLib/BRepLib_FindSurface.hxx b/src/BRepLib/BRepLib_FindSurface.hxx index 0b89a67d91..d4300d66c6 100644 --- a/src/BRepLib/BRepLib_FindSurface.hxx +++ b/src/BRepLib/BRepLib_FindSurface.hxx @@ -25,9 +25,7 @@ #include #include class Geom_Surface; -class Standard_NoSuchObject; class TopoDS_Shape; -class TopLoc_Location; //! Provides an algorithm to find a Surface through a diff --git a/src/BRepLib/BRepLib_FuseEdges.hxx b/src/BRepLib/BRepLib_FuseEdges.hxx index df3649bd64..1dd9906f6f 100644 --- a/src/BRepLib/BRepLib_FuseEdges.hxx +++ b/src/BRepLib/BRepLib_FuseEdges.hxx @@ -31,9 +31,6 @@ #include #include #include -class Standard_ConstructionError; -class Standard_NullObject; -class TopoDS_Shape; class TopoDS_Vertex; class TopoDS_Edge; diff --git a/src/BRepLib/BRepLib_MakeEdge.hxx b/src/BRepLib/BRepLib_MakeEdge.hxx index 4b80180dc2..e4177c6179 100644 --- a/src/BRepLib/BRepLib_MakeEdge.hxx +++ b/src/BRepLib/BRepLib_MakeEdge.hxx @@ -25,8 +25,6 @@ #include #include #include -class StdFail_NotDone; -class TopoDS_Vertex; class gp_Pnt; class gp_Lin; class gp_Circ; diff --git a/src/BRepLib/BRepLib_MakeEdge2d.hxx b/src/BRepLib/BRepLib_MakeEdge2d.hxx index e6860368f2..7a10165fe3 100644 --- a/src/BRepLib/BRepLib_MakeEdge2d.hxx +++ b/src/BRepLib/BRepLib_MakeEdge2d.hxx @@ -25,8 +25,6 @@ #include #include #include -class StdFail_NotDone; -class TopoDS_Vertex; class gp_Pnt2d; class gp_Lin2d; class gp_Circ2d; diff --git a/src/BRepLib/BRepLib_MakeFace.hxx b/src/BRepLib/BRepLib_MakeFace.hxx index 20fb75af75..abd8fbae4a 100644 --- a/src/BRepLib/BRepLib_MakeFace.hxx +++ b/src/BRepLib/BRepLib_MakeFace.hxx @@ -25,7 +25,6 @@ #include #include #include -class StdFail_NotDone; class TopoDS_Face; class gp_Pln; class gp_Cylinder; diff --git a/src/BRepLib/BRepLib_MakePolygon.hxx b/src/BRepLib/BRepLib_MakePolygon.hxx index e0e26d3fb4..644bdabe3a 100644 --- a/src/BRepLib/BRepLib_MakePolygon.hxx +++ b/src/BRepLib/BRepLib_MakePolygon.hxx @@ -25,10 +25,7 @@ #include #include #include -class StdFail_NotDone; class gp_Pnt; -class TopoDS_Vertex; -class TopoDS_Edge; class TopoDS_Wire; diff --git a/src/BRepLib/BRepLib_MakeShape.hxx b/src/BRepLib/BRepLib_MakeShape.hxx index 64c151bc68..80bba52e00 100644 --- a/src/BRepLib/BRepLib_MakeShape.hxx +++ b/src/BRepLib/BRepLib_MakeShape.hxx @@ -27,8 +27,6 @@ #include #include #include -class StdFail_NotDone; -class TopoDS_Shape; class TopoDS_Face; class TopoDS_Edge; diff --git a/src/BRepLib/BRepLib_MakeShell.hxx b/src/BRepLib/BRepLib_MakeShell.hxx index 0983b99e42..75dd2c99fa 100644 --- a/src/BRepLib/BRepLib_MakeShell.hxx +++ b/src/BRepLib/BRepLib_MakeShell.hxx @@ -25,7 +25,6 @@ #include #include #include -class StdFail_NotDone; class Geom_Surface; class TopoDS_Shell; diff --git a/src/BRepLib/BRepLib_MakeSolid.hxx b/src/BRepLib/BRepLib_MakeSolid.hxx index e1eac5dad5..4546fd48d3 100644 --- a/src/BRepLib/BRepLib_MakeSolid.hxx +++ b/src/BRepLib/BRepLib_MakeSolid.hxx @@ -24,7 +24,6 @@ #include #include #include -class StdFail_NotDone; class TopoDS_CompSolid; class TopoDS_Shell; class TopoDS_Solid; diff --git a/src/BRepLib/BRepLib_MakeWire.hxx b/src/BRepLib/BRepLib_MakeWire.hxx index d047d1ab4d..d227ece0f1 100644 --- a/src/BRepLib/BRepLib_MakeWire.hxx +++ b/src/BRepLib/BRepLib_MakeWire.hxx @@ -31,10 +31,7 @@ #include #include -class StdFail_NotDone; -class TopoDS_Edge; class TopoDS_Wire; -class TopoDS_Vertex; //! Provides methods to build wires. //! diff --git a/src/BRepMAT2d/BRepMAT2d_Explorer.hxx b/src/BRepMAT2d/BRepMAT2d_Explorer.hxx index 9847cd640a..1866743b74 100644 --- a/src/BRepMAT2d/BRepMAT2d_Explorer.hxx +++ b/src/BRepMAT2d/BRepMAT2d_Explorer.hxx @@ -31,7 +31,6 @@ class TopoDS_Face; class TopoDS_Wire; class Geom2d_Curve; -class TopoDS_Shape; //! Construct an explorer from wires, face, set of curves diff --git a/src/BRepMAT2d/BRepMAT2d_LinkTopoBilo.hxx b/src/BRepMAT2d/BRepMAT2d_LinkTopoBilo.hxx index 0c935956a1..935ce27af9 100644 --- a/src/BRepMAT2d/BRepMAT2d_LinkTopoBilo.hxx +++ b/src/BRepMAT2d/BRepMAT2d_LinkTopoBilo.hxx @@ -26,10 +26,8 @@ #include #include #include -class Standard_ConstructionError; class BRepMAT2d_Explorer; class BRepMAT2d_BisectingLocus; -class TopoDS_Shape; class MAT_BasicElt; class TopoDS_Wire; diff --git a/src/BRepOffset/BRepOffset_Analyse.hxx b/src/BRepOffset/BRepOffset_Analyse.hxx index 3c079c6114..1b7eb83bf4 100644 --- a/src/BRepOffset/BRepOffset_Analyse.hxx +++ b/src/BRepOffset/BRepOffset_Analyse.hxx @@ -36,7 +36,6 @@ #include -class TopoDS_Shape; class TopoDS_Edge; class TopoDS_Vertex; class TopoDS_Face; diff --git a/src/BRepOffset/BRepOffset_MakeOffset.hxx b/src/BRepOffset/BRepOffset_MakeOffset.hxx index db5b95a4b4..dc19d393db 100644 --- a/src/BRepOffset/BRepOffset_MakeOffset.hxx +++ b/src/BRepOffset/BRepOffset_MakeOffset.hxx @@ -40,10 +40,7 @@ #include class BRepAlgo_AsDes; -class TopoDS_Shape; class TopoDS_Face; -class BRepOffset_Analyse; -class BRepAlgo_Image; class BRepOffset_Inter3d; diff --git a/src/BRepOffsetAPI/BRepOffsetAPI_FindContigousEdges.hxx b/src/BRepOffsetAPI/BRepOffsetAPI_FindContigousEdges.hxx index bf119d1871..487fc01afa 100644 --- a/src/BRepOffsetAPI/BRepOffsetAPI_FindContigousEdges.hxx +++ b/src/BRepOffsetAPI/BRepOffsetAPI_FindContigousEdges.hxx @@ -26,8 +26,6 @@ #include #include class BRepBuilderAPI_Sewing; -class Standard_OutOfRange; -class Standard_NoSuchObject; class TopoDS_Shape; class TopoDS_Edge; diff --git a/src/BRepOffsetAPI/BRepOffsetAPI_MakeDraft.hxx b/src/BRepOffsetAPI/BRepOffsetAPI_MakeDraft.hxx index f494debab8..a7865e360e 100644 --- a/src/BRepOffsetAPI/BRepOffsetAPI_MakeDraft.hxx +++ b/src/BRepOffsetAPI/BRepOffsetAPI_MakeDraft.hxx @@ -27,8 +27,6 @@ #include #include #include -class StdFail_NotDone; -class Standard_NoSuchObject; class TopoDS_Shape; class gp_Dir; class Geom_Surface; diff --git a/src/BRepOffsetAPI/BRepOffsetAPI_MakeEvolved.hxx b/src/BRepOffsetAPI/BRepOffsetAPI_MakeEvolved.hxx index f311f4c561..ae64f39ae4 100644 --- a/src/BRepOffsetAPI/BRepOffsetAPI_MakeEvolved.hxx +++ b/src/BRepOffsetAPI/BRepOffsetAPI_MakeEvolved.hxx @@ -29,8 +29,6 @@ #include #include class TopoDS_Wire; -class TopoDS_Face; -class BRepFill_Evolved; class TopoDS_Shape; diff --git a/src/BRepOffsetAPI/BRepOffsetAPI_MakeFilling.hxx b/src/BRepOffsetAPI/BRepOffsetAPI_MakeFilling.hxx index 641633c407..8bddfa045c 100644 --- a/src/BRepOffsetAPI/BRepOffsetAPI_MakeFilling.hxx +++ b/src/BRepOffsetAPI/BRepOffsetAPI_MakeFilling.hxx @@ -28,9 +28,6 @@ #include #include #include -class StdFail_NotDone; -class Standard_OutOfRange; -class Standard_ConstructionError; class TopoDS_Face; class TopoDS_Edge; class gp_Pnt; diff --git a/src/BRepOffsetAPI/BRepOffsetAPI_MakeOffset.hxx b/src/BRepOffsetAPI/BRepOffsetAPI_MakeOffset.hxx index 1ab16bb1fd..cc45358ff1 100644 --- a/src/BRepOffsetAPI/BRepOffsetAPI_MakeOffset.hxx +++ b/src/BRepOffsetAPI/BRepOffsetAPI_MakeOffset.hxx @@ -28,8 +28,6 @@ #include #include #include -class StdFail_NotDone; -class TopoDS_Face; class TopoDS_Wire; class TopoDS_Shape; diff --git a/src/BRepOffsetAPI/BRepOffsetAPI_MakeOffsetShape.hxx b/src/BRepOffsetAPI/BRepOffsetAPI_MakeOffsetShape.hxx index 4457cb1a4e..231fc0444e 100644 --- a/src/BRepOffsetAPI/BRepOffsetAPI_MakeOffsetShape.hxx +++ b/src/BRepOffsetAPI/BRepOffsetAPI_MakeOffsetShape.hxx @@ -30,7 +30,6 @@ #include #include class TopoDS_Shape; -class BRepOffset_MakeOffset; //! Describes functions to build a shell out of a shape. The diff --git a/src/BRepOffsetAPI/BRepOffsetAPI_MakePipe.hxx b/src/BRepOffsetAPI/BRepOffsetAPI_MakePipe.hxx index 7e2f30f8ec..22f58e90ec 100644 --- a/src/BRepOffsetAPI/BRepOffsetAPI_MakePipe.hxx +++ b/src/BRepOffsetAPI/BRepOffsetAPI_MakePipe.hxx @@ -28,7 +28,6 @@ #include class TopoDS_Wire; class TopoDS_Shape; -class BRepFill_Pipe; //! Describes functions to build pipes. diff --git a/src/BRepOffsetAPI/BRepOffsetAPI_MakePipeShell.hxx b/src/BRepOffsetAPI/BRepOffsetAPI_MakePipeShell.hxx index 401df7340d..4cde357186 100644 --- a/src/BRepOffsetAPI/BRepOffsetAPI_MakePipeShell.hxx +++ b/src/BRepOffsetAPI/BRepOffsetAPI_MakePipeShell.hxx @@ -30,8 +30,6 @@ #include #include #include -class Standard_DomainError; -class StdFail_NotDone; class TopoDS_Wire; class gp_Ax2; class gp_Dir; diff --git a/src/BRepOffsetAPI/BRepOffsetAPI_MiddlePath.hxx b/src/BRepOffsetAPI/BRepOffsetAPI_MiddlePath.hxx index 68e533ca43..5d9be2a4f8 100644 --- a/src/BRepOffsetAPI/BRepOffsetAPI_MiddlePath.hxx +++ b/src/BRepOffsetAPI/BRepOffsetAPI_MiddlePath.hxx @@ -26,7 +26,6 @@ #include #include #include -class TopoDS_Shape; //! Describes functions to build a middle path of a diff --git a/src/BRepOffsetAPI/BRepOffsetAPI_NormalProjection.hxx b/src/BRepOffsetAPI/BRepOffsetAPI_NormalProjection.hxx index 4b569019e0..09a56d0cb7 100644 --- a/src/BRepOffsetAPI/BRepOffsetAPI_NormalProjection.hxx +++ b/src/BRepOffsetAPI/BRepOffsetAPI_NormalProjection.hxx @@ -28,9 +28,6 @@ #include #include #include -class Standard_ConstructionError; -class Standard_NoSuchObject; -class StdFail_NotDone; class TopoDS_Shape; class TopoDS_Edge; diff --git a/src/BRepOffsetAPI/BRepOffsetAPI_ThruSections.hxx b/src/BRepOffsetAPI/BRepOffsetAPI_ThruSections.hxx index 705939443b..6211461380 100644 --- a/src/BRepOffsetAPI/BRepOffsetAPI_ThruSections.hxx +++ b/src/BRepOffsetAPI/BRepOffsetAPI_ThruSections.hxx @@ -33,7 +33,6 @@ #include #include #include -class Standard_DomainError; class TopoDS_Wire; class TopoDS_Vertex; class TopoDS_Shape; diff --git a/src/BRepPrim/BRepPrim_Builder.hxx b/src/BRepPrim/BRepPrim_Builder.hxx index 3a6071cbd8..20ce195b3e 100644 --- a/src/BRepPrim/BRepPrim_Builder.hxx +++ b/src/BRepPrim/BRepPrim_Builder.hxx @@ -24,7 +24,6 @@ #include #include #include -class BRep_Builder; class TopoDS_Shell; class TopoDS_Face; class gp_Pln; diff --git a/src/BRepPrim/BRepPrim_Cone.hxx b/src/BRepPrim/BRepPrim_Cone.hxx index faf1c83e06..f2bcc30ae8 100644 --- a/src/BRepPrim/BRepPrim_Cone.hxx +++ b/src/BRepPrim/BRepPrim_Cone.hxx @@ -23,7 +23,6 @@ #include #include -class Standard_DomainError; class gp_Ax2; class gp_Pnt; class TopoDS_Face; diff --git a/src/BRepPrim/BRepPrim_Cylinder.hxx b/src/BRepPrim/BRepPrim_Cylinder.hxx index 56bd2f66e1..1b53715953 100644 --- a/src/BRepPrim/BRepPrim_Cylinder.hxx +++ b/src/BRepPrim/BRepPrim_Cylinder.hxx @@ -23,7 +23,6 @@ #include #include -class Standard_DomainError; class gp_Ax2; class gp_Pnt; class TopoDS_Face; diff --git a/src/BRepPrim/BRepPrim_FaceBuilder.hxx b/src/BRepPrim/BRepPrim_FaceBuilder.hxx index dfc268acb6..a59082d3f0 100644 --- a/src/BRepPrim/BRepPrim_FaceBuilder.hxx +++ b/src/BRepPrim/BRepPrim_FaceBuilder.hxx @@ -26,13 +26,8 @@ #include #include #include -class Standard_ConstructionError; -class Standard_OutOfRange; class BRep_Builder; class Geom_Surface; -class TopoDS_Face; -class TopoDS_Edge; -class TopoDS_Vertex; //! The FaceBuilder is an algorithm to build a BRep diff --git a/src/BRepPrim/BRepPrim_GWedge.hxx b/src/BRepPrim/BRepPrim_GWedge.hxx index 8176368b82..58dc5e54d1 100644 --- a/src/BRepPrim/BRepPrim_GWedge.hxx +++ b/src/BRepPrim/BRepPrim_GWedge.hxx @@ -31,17 +31,8 @@ #include #include #include -class Standard_DomainError; -class Standard_OutOfRange; -class BRepPrim_Builder; -class gp_Ax2; -class TopoDS_Shell; -class TopoDS_Face; class gp_Pln; -class TopoDS_Wire; -class TopoDS_Edge; class gp_Lin; -class TopoDS_Vertex; class gp_Pnt; diff --git a/src/BRepPrim/BRepPrim_OneAxis.hxx b/src/BRepPrim/BRepPrim_OneAxis.hxx index e81d1fadf2..9cb99a347b 100644 --- a/src/BRepPrim/BRepPrim_OneAxis.hxx +++ b/src/BRepPrim/BRepPrim_OneAxis.hxx @@ -30,16 +30,7 @@ #include #include #include -class Standard_DomainError; -class Standard_OutOfRange; -class BRepPrim_Builder; -class gp_Ax2; -class TopoDS_Face; -class TopoDS_Edge; class gp_Pnt2d; -class TopoDS_Shell; -class TopoDS_Wire; -class TopoDS_Vertex; //! Algorithm to build primitives with one axis of diff --git a/src/BRepPrim/BRepPrim_Sphere.hxx b/src/BRepPrim/BRepPrim_Sphere.hxx index f3df9fe1f7..15aa5a9126 100644 --- a/src/BRepPrim/BRepPrim_Sphere.hxx +++ b/src/BRepPrim/BRepPrim_Sphere.hxx @@ -23,7 +23,6 @@ #include #include -class Standard_DomainError; class gp_Pnt; class gp_Ax2; class TopoDS_Face; diff --git a/src/BRepPrim/BRepPrim_Torus.hxx b/src/BRepPrim/BRepPrim_Torus.hxx index 900085c6ad..8b2910b695 100644 --- a/src/BRepPrim/BRepPrim_Torus.hxx +++ b/src/BRepPrim/BRepPrim_Torus.hxx @@ -23,7 +23,6 @@ #include #include -class Standard_DomainError; class gp_Ax2; class gp_Pnt; class TopoDS_Face; diff --git a/src/BRepPrim/BRepPrim_Wedge.hxx b/src/BRepPrim/BRepPrim_Wedge.hxx index 356f2f6dce..bdd822b465 100644 --- a/src/BRepPrim/BRepPrim_Wedge.hxx +++ b/src/BRepPrim/BRepPrim_Wedge.hxx @@ -23,7 +23,6 @@ #include #include -class Standard_DomainError; class gp_Ax2; diff --git a/src/BRepPrimAPI/BRepPrimAPI_MakeBox.hxx b/src/BRepPrimAPI/BRepPrimAPI_MakeBox.hxx index 26c2680cd7..4e9061d512 100644 --- a/src/BRepPrimAPI/BRepPrimAPI_MakeBox.hxx +++ b/src/BRepPrimAPI/BRepPrimAPI_MakeBox.hxx @@ -24,12 +24,8 @@ #include #include #include -class Standard_DomainError; -class Standard_OutOfRange; -class StdFail_NotDone; class gp_Pnt; class gp_Ax2; -class BRepPrim_Wedge; class TopoDS_Shell; class TopoDS_Solid; class TopoDS_Face; diff --git a/src/BRepPrimAPI/BRepPrimAPI_MakeCone.hxx b/src/BRepPrimAPI/BRepPrimAPI_MakeCone.hxx index 30d8094571..0b9da1eca7 100644 --- a/src/BRepPrimAPI/BRepPrimAPI_MakeCone.hxx +++ b/src/BRepPrimAPI/BRepPrimAPI_MakeCone.hxx @@ -25,9 +25,7 @@ #include #include #include -class Standard_DomainError; class gp_Ax2; -class BRepPrim_Cone; //! Describes functions to build cones or portions of cones. diff --git a/src/BRepPrimAPI/BRepPrimAPI_MakeCylinder.hxx b/src/BRepPrimAPI/BRepPrimAPI_MakeCylinder.hxx index beb2571300..316fea7a37 100644 --- a/src/BRepPrimAPI/BRepPrimAPI_MakeCylinder.hxx +++ b/src/BRepPrimAPI/BRepPrimAPI_MakeCylinder.hxx @@ -25,9 +25,7 @@ #include #include #include -class Standard_DomainError; class gp_Ax2; -class BRepPrim_Cylinder; //! Describes functions to build cylinders or portions of cylinders. diff --git a/src/BRepPrimAPI/BRepPrimAPI_MakeHalfSpace.hxx b/src/BRepPrimAPI/BRepPrimAPI_MakeHalfSpace.hxx index 41540e14ae..c4ab4ba7f0 100644 --- a/src/BRepPrimAPI/BRepPrimAPI_MakeHalfSpace.hxx +++ b/src/BRepPrimAPI/BRepPrimAPI_MakeHalfSpace.hxx @@ -23,11 +23,9 @@ #include #include -class StdFail_NotDone; class TopoDS_Face; class gp_Pnt; class TopoDS_Shell; -class TopoDS_Solid; //! Describes functions to build half-spaces. diff --git a/src/BRepPrimAPI/BRepPrimAPI_MakeOneAxis.hxx b/src/BRepPrimAPI/BRepPrimAPI_MakeOneAxis.hxx index 647300dde4..ce4eb1b293 100644 --- a/src/BRepPrimAPI/BRepPrimAPI_MakeOneAxis.hxx +++ b/src/BRepPrimAPI/BRepPrimAPI_MakeOneAxis.hxx @@ -23,7 +23,6 @@ #include #include -class StdFail_NotDone; class TopoDS_Face; class TopoDS_Shell; class TopoDS_Solid; diff --git a/src/BRepPrimAPI/BRepPrimAPI_MakePrism.hxx b/src/BRepPrimAPI/BRepPrimAPI_MakePrism.hxx index d069851b3f..7d7550cbd3 100644 --- a/src/BRepPrimAPI/BRepPrimAPI_MakePrism.hxx +++ b/src/BRepPrimAPI/BRepPrimAPI_MakePrism.hxx @@ -28,7 +28,6 @@ class TopoDS_Shape; class gp_Vec; class gp_Dir; -class BRepSweep_Prism; //! Describes functions to build linear swept topologies, called prisms. diff --git a/src/BRepPrimAPI/BRepPrimAPI_MakeRevol.hxx b/src/BRepPrimAPI/BRepPrimAPI_MakeRevol.hxx index 1132df39ca..82df13808f 100644 --- a/src/BRepPrimAPI/BRepPrimAPI_MakeRevol.hxx +++ b/src/BRepPrimAPI/BRepPrimAPI_MakeRevol.hxx @@ -29,7 +29,6 @@ #include class TopoDS_Shape; class gp_Ax1; -class BRepSweep_Revol; //! Class to make revolved sweep topologies. diff --git a/src/BRepPrimAPI/BRepPrimAPI_MakeRevolution.hxx b/src/BRepPrimAPI/BRepPrimAPI_MakeRevolution.hxx index 9c0a034050..bc2a048ede 100644 --- a/src/BRepPrimAPI/BRepPrimAPI_MakeRevolution.hxx +++ b/src/BRepPrimAPI/BRepPrimAPI_MakeRevolution.hxx @@ -25,10 +25,8 @@ #include #include #include -class Standard_DomainError; class Geom_Curve; class gp_Ax2; -class BRepPrim_Revolution; //! Describes functions to build revolved shapes. diff --git a/src/BRepPrimAPI/BRepPrimAPI_MakeSphere.hxx b/src/BRepPrimAPI/BRepPrimAPI_MakeSphere.hxx index 7ae7d7f416..f8dfcc2bfe 100644 --- a/src/BRepPrimAPI/BRepPrimAPI_MakeSphere.hxx +++ b/src/BRepPrimAPI/BRepPrimAPI_MakeSphere.hxx @@ -25,10 +25,8 @@ #include #include #include -class Standard_DomainError; class gp_Pnt; class gp_Ax2; -class BRepPrim_Sphere; //! Describes functions to build spheres or portions of spheres. diff --git a/src/BRepPrimAPI/BRepPrimAPI_MakeTorus.hxx b/src/BRepPrimAPI/BRepPrimAPI_MakeTorus.hxx index d4c0b23d00..c229971812 100644 --- a/src/BRepPrimAPI/BRepPrimAPI_MakeTorus.hxx +++ b/src/BRepPrimAPI/BRepPrimAPI_MakeTorus.hxx @@ -25,9 +25,7 @@ #include #include #include -class Standard_DomainError; class gp_Ax2; -class BRepPrim_Torus; //! Describes functions to build tori or portions of tori. diff --git a/src/BRepPrimAPI/BRepPrimAPI_MakeWedge.hxx b/src/BRepPrimAPI/BRepPrimAPI_MakeWedge.hxx index 5ade9348bb..ea643c0e41 100644 --- a/src/BRepPrimAPI/BRepPrimAPI_MakeWedge.hxx +++ b/src/BRepPrimAPI/BRepPrimAPI_MakeWedge.hxx @@ -24,10 +24,7 @@ #include #include #include -class Standard_DomainError; -class StdFail_NotDone; class gp_Ax2; -class BRepPrim_Wedge; class TopoDS_Shell; class TopoDS_Solid; diff --git a/src/BRepProj/BRepProj_Projection.hxx b/src/BRepProj/BRepProj_Projection.hxx index d746d095c6..1732247227 100644 --- a/src/BRepProj/BRepProj_Projection.hxx +++ b/src/BRepProj/BRepProj_Projection.hxx @@ -27,10 +27,6 @@ #include #include #include -class Standard_NoSuchObject; -class Standard_ConstructionError; -class Standard_NullObject; -class TopoDS_Shape; class gp_Dir; class gp_Pnt; diff --git a/src/BRepSweep/BRepSweep_Builder.hxx b/src/BRepSweep/BRepSweep_Builder.hxx index c12c43c007..d962ddf634 100644 --- a/src/BRepSweep/BRepSweep_Builder.hxx +++ b/src/BRepSweep/BRepSweep_Builder.hxx @@ -23,7 +23,6 @@ #include #include -class BRep_Builder; class TopoDS_Shape; diff --git a/src/BRepSweep/BRepSweep_Iterator.hxx b/src/BRepSweep/BRepSweep_Iterator.hxx index 1470c91143..822eef55e3 100644 --- a/src/BRepSweep/BRepSweep_Iterator.hxx +++ b/src/BRepSweep/BRepSweep_Iterator.hxx @@ -24,8 +24,6 @@ #include #include #include -class Standard_NoMoreObject; -class Standard_NoSuchObject; class TopoDS_Shape; diff --git a/src/BRepSweep/BRepSweep_NumLinearRegularSweep.hxx b/src/BRepSweep/BRepSweep_NumLinearRegularSweep.hxx index bf853d1da7..b105441f9b 100644 --- a/src/BRepSweep/BRepSweep_NumLinearRegularSweep.hxx +++ b/src/BRepSweep/BRepSweep_NumLinearRegularSweep.hxx @@ -30,13 +30,6 @@ #include #include #include -class Standard_NoMoreObject; -class Standard_NoSuchObject; -class Standard_RangeError; -class Standard_DomainError; -class BRepSweep_Builder; -class TopoDS_Shape; -class Sweep_NumShape; //! This a generic class is used to build Sweept diff --git a/src/BRepSweep/BRepSweep_Prism.hxx b/src/BRepSweep/BRepSweep_Prism.hxx index 69890b85ff..1ec53af5a1 100644 --- a/src/BRepSweep/BRepSweep_Prism.hxx +++ b/src/BRepSweep/BRepSweep_Prism.hxx @@ -23,7 +23,6 @@ #include #include -class Standard_ConstructionError; class TopoDS_Shape; class gp_Vec; class gp_Dir; diff --git a/src/BRepSweep/BRepSweep_Revol.hxx b/src/BRepSweep/BRepSweep_Revol.hxx index 6b9d31cc9a..043623bdbe 100644 --- a/src/BRepSweep/BRepSweep_Revol.hxx +++ b/src/BRepSweep/BRepSweep_Revol.hxx @@ -24,7 +24,6 @@ #include #include #include -class Standard_ConstructionError; class TopoDS_Shape; class gp_Ax1; class Sweep_NumShape; diff --git a/src/BRepSweep/BRepSweep_Rotation.hxx b/src/BRepSweep/BRepSweep_Rotation.hxx index 9ffb9c45e2..0e157e03aa 100644 --- a/src/BRepSweep/BRepSweep_Rotation.hxx +++ b/src/BRepSweep/BRepSweep_Rotation.hxx @@ -26,11 +26,9 @@ #include #include #include -class Standard_ConstructionError; class TopoDS_Shape; class Sweep_NumShape; class TopLoc_Location; -class gp_Ax1; //! Provides an algorithm to build object by diff --git a/src/BRepSweep/BRepSweep_Tool.hxx b/src/BRepSweep/BRepSweep_Tool.hxx index 192cb3d420..da74db3ad7 100644 --- a/src/BRepSweep/BRepSweep_Tool.hxx +++ b/src/BRepSweep/BRepSweep_Tool.hxx @@ -25,7 +25,6 @@ #include #include #include -class Standard_OutOfRange; class TopoDS_Shape; diff --git a/src/BRepSweep/BRepSweep_Translation.hxx b/src/BRepSweep/BRepSweep_Translation.hxx index 4ff7c96bb1..cd6707775d 100644 --- a/src/BRepSweep/BRepSweep_Translation.hxx +++ b/src/BRepSweep/BRepSweep_Translation.hxx @@ -25,11 +25,9 @@ #include #include #include -class Standard_ConstructionError; class TopoDS_Shape; class Sweep_NumShape; class TopLoc_Location; -class gp_Vec; //! Provides an algorithm to build object by diff --git a/src/BRepSweep/BRepSweep_Trsf.hxx b/src/BRepSweep/BRepSweep_Trsf.hxx index 0f2c4b245f..4d40d07650 100644 --- a/src/BRepSweep/BRepSweep_Trsf.hxx +++ b/src/BRepSweep/BRepSweep_Trsf.hxx @@ -28,7 +28,6 @@ class BRep_Builder; class TopoDS_Shape; class Sweep_NumShape; -class TopLoc_Location; //! This class is inherited from NumLinearRegularSweep diff --git a/src/BRepToIGES/BRepToIGES_BRShell.hxx b/src/BRepToIGES/BRepToIGES_BRShell.hxx index e4ca81ef8f..083eecad26 100644 --- a/src/BRepToIGES/BRepToIGES_BRShell.hxx +++ b/src/BRepToIGES/BRepToIGES_BRShell.hxx @@ -24,7 +24,6 @@ #include #include -class BRepToIGES_BREntity; class IGESData_IGESEntity; class TopoDS_Shape; class TopoDS_Shell; diff --git a/src/BRepToIGES/BRepToIGES_BRSolid.hxx b/src/BRepToIGES/BRepToIGES_BRSolid.hxx index cc8c96a1cc..733f92193d 100644 --- a/src/BRepToIGES/BRepToIGES_BRSolid.hxx +++ b/src/BRepToIGES/BRepToIGES_BRSolid.hxx @@ -22,7 +22,6 @@ #include #include -class BRepToIGES_BREntity; class IGESData_IGESEntity; class TopoDS_Shape; class TopoDS_Solid; diff --git a/src/BRepToIGES/BRepToIGES_BRWire.hxx b/src/BRepToIGES/BRepToIGES_BRWire.hxx index 92128c5a31..265aa826db 100644 --- a/src/BRepToIGES/BRepToIGES_BRWire.hxx +++ b/src/BRepToIGES/BRepToIGES_BRWire.hxx @@ -24,7 +24,6 @@ #include #include #include -class BRepToIGES_BREntity; class IGESData_IGESEntity; class TopoDS_Shape; class TopoDS_Vertex; diff --git a/src/BRepTools/BRepTools.hxx b/src/BRepTools/BRepTools.hxx index 968fd90dae..51dddda991 100644 --- a/src/BRepTools/BRepTools.hxx +++ b/src/BRepTools/BRepTools.hxx @@ -42,16 +42,6 @@ class TopoDS_CompSolid; class TopoDS_Compound; class TopoDS_Shape; class BRep_Builder; -class BRepTools_WireExplorer; -class BRepTools_Modification; -class BRepTools_Modifier; -class BRepTools_TrsfModification; -class BRepTools_NurbsConvertModification; -class BRepTools_GTrsfModification; -class BRepTools_Substitution; -class BRepTools_Quilt; -class BRepTools_ShapeSet; -class BRepTools_ReShape; class Geom_Curve; class Geom2d_Curve; class Geom_Surface; diff --git a/src/BRepTools/BRepTools_GTrsfModification.hxx b/src/BRepTools/BRepTools_GTrsfModification.hxx index 5640c1613b..b096fb428b 100644 --- a/src/BRepTools/BRepTools_GTrsfModification.hxx +++ b/src/BRepTools/BRepTools_GTrsfModification.hxx @@ -25,7 +25,6 @@ #include #include #include -class gp_GTrsf; class TopoDS_Face; class Geom_Surface; class TopLoc_Location; diff --git a/src/BRepTools/BRepTools_Modifier.hxx b/src/BRepTools/BRepTools_Modifier.hxx index 194aa47012..021cd4f6b2 100644 --- a/src/BRepTools/BRepTools_Modifier.hxx +++ b/src/BRepTools/BRepTools_Modifier.hxx @@ -35,9 +35,6 @@ #include #include -class Standard_NullObject; -class Standard_NoSuchObject; -class TopoDS_Shape; class BRepTools_Modification; class Geom_Curve; class Geom_Surface; diff --git a/src/BRepTools/BRepTools_PurgeLocations.hxx b/src/BRepTools/BRepTools_PurgeLocations.hxx index 4f63283be9..f25186a233 100644 --- a/src/BRepTools/BRepTools_PurgeLocations.hxx +++ b/src/BRepTools/BRepTools_PurgeLocations.hxx @@ -20,9 +20,7 @@ #include #include -class TopoDS_Shape; -class BRepTools_PurgeLocations; //! Removes location datums, which satisfy conditions: //! aTrsf.IsNegative() || (Abs(Abs(aTrsf.ScaleFactor()) - 1.) > TopLoc_Location::ScalePrec()) diff --git a/src/BRepTools/BRepTools_Quilt.hxx b/src/BRepTools/BRepTools_Quilt.hxx index 8bbf15b7cc..f12c7087eb 100644 --- a/src/BRepTools/BRepTools_Quilt.hxx +++ b/src/BRepTools/BRepTools_Quilt.hxx @@ -23,7 +23,6 @@ #include #include -class Standard_NoSuchObject; class TopoDS_Edge; class TopoDS_Vertex; class TopoDS_Shape; diff --git a/src/BRepTools/BRepTools_ReShape.hxx b/src/BRepTools/BRepTools_ReShape.hxx index 80e0ad8c87..9109072fdf 100644 --- a/src/BRepTools/BRepTools_ReShape.hxx +++ b/src/BRepTools/BRepTools_ReShape.hxx @@ -26,7 +26,6 @@ #include #include -class TopoDS_Shape; class TopoDS_Vertex; // resolve name collisions with X11 headers diff --git a/src/BRepTools/BRepTools_ShapeSet.hxx b/src/BRepTools/BRepTools_ShapeSet.hxx index 2d1bfe36eb..8fc31e52d1 100644 --- a/src/BRepTools/BRepTools_ShapeSet.hxx +++ b/src/BRepTools/BRepTools_ShapeSet.hxx @@ -32,7 +32,6 @@ #include #include -class BRep_Builder; class TopoDS_Shape; diff --git a/src/BRepTools/BRepTools_Substitution.hxx b/src/BRepTools/BRepTools_Substitution.hxx index 9e8e22cf8b..6421529eac 100644 --- a/src/BRepTools/BRepTools_Substitution.hxx +++ b/src/BRepTools/BRepTools_Substitution.hxx @@ -24,7 +24,6 @@ #include #include #include -class Standard_NoSuchObject; class TopoDS_Shape; diff --git a/src/BRepTools/BRepTools_TrsfModification.hxx b/src/BRepTools/BRepTools_TrsfModification.hxx index 04b1f88476..5675146b85 100644 --- a/src/BRepTools/BRepTools_TrsfModification.hxx +++ b/src/BRepTools/BRepTools_TrsfModification.hxx @@ -25,7 +25,6 @@ #include #include #include -class gp_Trsf; class TopoDS_Face; class Geom_Surface; class TopLoc_Location; diff --git a/src/BRepTools/BRepTools_WireExplorer.hxx b/src/BRepTools/BRepTools_WireExplorer.hxx index f04ff22d5a..09fb0e9d82 100644 --- a/src/BRepTools/BRepTools_WireExplorer.hxx +++ b/src/BRepTools/BRepTools_WireExplorer.hxx @@ -29,13 +29,7 @@ #include #include #include -class Standard_DomainError; -class Standard_NoSuchObject; -class Standard_NoMoreObject; class TopoDS_Wire; -class TopoDS_Face; -class TopoDS_Edge; -class TopoDS_Vertex; //! The WireExplorer is a tool to explore the edges of diff --git a/src/BRepTopAdaptor/BRepTopAdaptor_FClass2d.hxx b/src/BRepTopAdaptor/BRepTopAdaptor_FClass2d.hxx index 0dc6dce870..0288f53b3f 100644 --- a/src/BRepTopAdaptor/BRepTopAdaptor_FClass2d.hxx +++ b/src/BRepTopAdaptor/BRepTopAdaptor_FClass2d.hxx @@ -27,7 +27,6 @@ #include #include #include -class TopoDS_Face; class gp_Pnt2d; diff --git a/src/BRepTopAdaptor/BRepTopAdaptor_HVertex.hxx b/src/BRepTopAdaptor/BRepTopAdaptor_HVertex.hxx index 85ea45ccd5..82e8acba3c 100644 --- a/src/BRepTopAdaptor/BRepTopAdaptor_HVertex.hxx +++ b/src/BRepTopAdaptor/BRepTopAdaptor_HVertex.hxx @@ -26,9 +26,7 @@ #include #include -class TopoDS_Vertex; class gp_Pnt2d; -class Adaptor3d_HVertex; class BRepTopAdaptor_HVertex; diff --git a/src/BRepTopAdaptor/BRepTopAdaptor_TopolTool.hxx b/src/BRepTopAdaptor/BRepTopAdaptor_TopolTool.hxx index 64bd6f7797..1708c09567 100644 --- a/src/BRepTopAdaptor/BRepTopAdaptor_TopolTool.hxx +++ b/src/BRepTopAdaptor/BRepTopAdaptor_TopolTool.hxx @@ -28,7 +28,6 @@ #include #include -class Standard_DomainError; class Adaptor3d_HVertex; class gp_Pnt2d; class gp_Pnt; diff --git a/src/BinLDrivers/BinLDrivers.hxx b/src/BinLDrivers/BinLDrivers.hxx index 0a0251ba60..be04ae0a50 100644 --- a/src/BinLDrivers/BinLDrivers.hxx +++ b/src/BinLDrivers/BinLDrivers.hxx @@ -22,10 +22,6 @@ class Standard_Transient; class Standard_GUID; class BinMDF_ADriverTable; class Message_Messenger; -class TCollection_AsciiString; -class BinLDrivers_DocumentStorageDriver; -class BinLDrivers_DocumentRetrievalDriver; -class BinLDrivers_DocumentSection; class TDocStd_Application; class BinLDrivers diff --git a/src/BinLDrivers/BinLDrivers_DocumentRetrievalDriver.hxx b/src/BinLDrivers/BinLDrivers_DocumentRetrievalDriver.hxx index 33818f8afc..92ffda6a28 100644 --- a/src/BinLDrivers/BinLDrivers_DocumentRetrievalDriver.hxx +++ b/src/BinLDrivers/BinLDrivers_DocumentRetrievalDriver.hxx @@ -33,12 +33,9 @@ class BinMDF_ADriverTable; class Message_Messenger; class TCollection_ExtendedString; -class PCDM_Document; class CDM_Document; class CDM_Application; class TDF_Label; -class TCollection_AsciiString; -class Storage_HeaderData; class BinLDrivers_DocumentSection; diff --git a/src/BinLDrivers/BinLDrivers_DocumentSection.hxx b/src/BinLDrivers/BinLDrivers_DocumentSection.hxx index b20605739b..cbb435819b 100644 --- a/src/BinLDrivers/BinLDrivers_DocumentSection.hxx +++ b/src/BinLDrivers/BinLDrivers_DocumentSection.hxx @@ -27,7 +27,6 @@ #include #include -class TCollection_AsciiString; //! More or less independent part of the saved/restored document diff --git a/src/BinLDrivers/BinLDrivers_DocumentStorageDriver.hxx b/src/BinLDrivers/BinLDrivers_DocumentStorageDriver.hxx index 2ba79f2c8c..61109b1c3a 100644 --- a/src/BinLDrivers/BinLDrivers_DocumentStorageDriver.hxx +++ b/src/BinLDrivers/BinLDrivers_DocumentStorageDriver.hxx @@ -32,7 +32,6 @@ #include class BinMDF_ADriverTable; class Message_Messenger; -class TCollection_ExtendedString; class CDM_Document; class TDF_Label; class TCollection_AsciiString; diff --git a/src/BinMDocStd/BinMDocStd.hxx b/src/BinMDocStd/BinMDocStd.hxx index efba2c01cd..f802f6f36f 100644 --- a/src/BinMDocStd/BinMDocStd.hxx +++ b/src/BinMDocStd/BinMDocStd.hxx @@ -22,7 +22,6 @@ class BinMDF_ADriverTable; class Message_Messenger; -class BinMDocStd_XLinkDriver; //! Storage and Retrieval drivers for TDocStd modelling attributes. diff --git a/src/BinMFunction/BinMFunction.hxx b/src/BinMFunction/BinMFunction.hxx index 8d1c849883..1b28d69326 100644 --- a/src/BinMFunction/BinMFunction.hxx +++ b/src/BinMFunction/BinMFunction.hxx @@ -22,9 +22,6 @@ class BinMDF_ADriverTable; class Message_Messenger; -class BinMFunction_FunctionDriver; -class BinMFunction_GraphNodeDriver; -class BinMFunction_ScopeDriver; //! Storage and Retrieval drivers for TFunction modelling attributes. diff --git a/src/BinTools/BinTools.hxx b/src/BinTools/BinTools.hxx index e662232966..2f58ac6d16 100644 --- a/src/BinTools/BinTools.hxx +++ b/src/BinTools/BinTools.hxx @@ -30,11 +30,6 @@ #include class TopoDS_Shape; -class BinTools_ShapeSet; -class BinTools_Curve2dSet; -class BinTools_CurveSet; -class BinTools_SurfaceSet; -class BinTools_LocationSet; //! Tool to keep shapes in binary format diff --git a/src/BinTools/BinTools_Curve2dSet.hxx b/src/BinTools/BinTools_Curve2dSet.hxx index 4d99ffae4a..7c777ac8a9 100644 --- a/src/BinTools/BinTools_Curve2dSet.hxx +++ b/src/BinTools/BinTools_Curve2dSet.hxx @@ -28,7 +28,6 @@ #include #include -class Standard_OutOfRange; class Geom2d_Curve; diff --git a/src/BinTools/BinTools_CurveSet.hxx b/src/BinTools/BinTools_CurveSet.hxx index d825805738..10ce962870 100644 --- a/src/BinTools/BinTools_CurveSet.hxx +++ b/src/BinTools/BinTools_CurveSet.hxx @@ -28,7 +28,6 @@ #include #include -class Standard_OutOfRange; class Geom_Curve; diff --git a/src/BinTools/BinTools_LocationSet.hxx b/src/BinTools/BinTools_LocationSet.hxx index b00d598f05..ee989e7edf 100644 --- a/src/BinTools/BinTools_LocationSet.hxx +++ b/src/BinTools/BinTools_LocationSet.hxx @@ -24,7 +24,6 @@ #include #include #include -class Standard_OutOfRange; class TopLoc_Location; //! Operator for writing transformation into the stream diff --git a/src/BinTools/BinTools_ShapeWriter.hxx b/src/BinTools/BinTools_ShapeWriter.hxx index 88561da0fb..17eda44a34 100644 --- a/src/BinTools/BinTools_ShapeWriter.hxx +++ b/src/BinTools/BinTools_ShapeWriter.hxx @@ -20,7 +20,6 @@ #include #include -class TopLoc_Location; class Geom_Curve; class Geom2d_Curve; class Geom_Surface; diff --git a/src/BinTools/BinTools_SurfaceSet.hxx b/src/BinTools/BinTools_SurfaceSet.hxx index d595b862cb..c3909a104d 100644 --- a/src/BinTools/BinTools_SurfaceSet.hxx +++ b/src/BinTools/BinTools_SurfaceSet.hxx @@ -28,7 +28,6 @@ #include #include -class Standard_OutOfRange; class Geom_Surface; diff --git a/src/BinXCAFDrivers/BinXCAFDrivers.hxx b/src/BinXCAFDrivers/BinXCAFDrivers.hxx index dfc1cda7c8..b8863c6fc6 100644 --- a/src/BinXCAFDrivers/BinXCAFDrivers.hxx +++ b/src/BinXCAFDrivers/BinXCAFDrivers.hxx @@ -22,8 +22,6 @@ class Standard_Transient; class Standard_GUID; class BinMDF_ADriverTable; class Message_Messenger; -class BinXCAFDrivers_DocumentStorageDriver; -class BinXCAFDrivers_DocumentRetrievalDriver; class TDocStd_Application; class BinXCAFDrivers diff --git a/src/Bisector/Bisector.hxx b/src/Bisector/Bisector.hxx index 17f91ff946..6794613350 100644 --- a/src/Bisector/Bisector.hxx +++ b/src/Bisector/Bisector.hxx @@ -24,16 +24,6 @@ #include #include class Geom2d_Curve; -class Bisector_Curve; -class Bisector_BisecAna; -class Bisector_BisecPC; -class Bisector_BisecCC; -class Bisector_Bisec; -class Bisector_Inter; -class Bisector_PointOnBis; -class Bisector_PolyBis; -class Bisector_FunctionH; -class Bisector_FunctionInter; //! This package provides the bisecting line between two diff --git a/src/Bisector/Bisector_BisecAna.hxx b/src/Bisector/Bisector_BisecAna.hxx index fbc0b8a21d..e0b5d98d87 100644 --- a/src/Bisector/Bisector_BisecAna.hxx +++ b/src/Bisector/Bisector_BisecAna.hxx @@ -27,8 +27,6 @@ #include #include class Geom2d_TrimmedCurve; -class Standard_DomainError; -class Standard_RangeError; class Geom2d_Curve; class gp_Pnt2d; class gp_Vec2d; diff --git a/src/Bisector/Bisector_BisecCC.hxx b/src/Bisector/Bisector_BisecCC.hxx index 8340c0f76c..149c05b0ec 100644 --- a/src/Bisector/Bisector_BisecCC.hxx +++ b/src/Bisector/Bisector_BisecCC.hxx @@ -29,13 +29,9 @@ #include #include class Geom2d_Curve; -class Standard_DomainError; -class Standard_RangeError; -class gp_Pnt2d; class Geom2d_Geometry; class gp_Trsf2d; class gp_Vec2d; -class Bisector_PolyBis; class Bisector_BisecCC; diff --git a/src/Bisector/Bisector_BisecPC.hxx b/src/Bisector/Bisector_BisecPC.hxx index baccd1746d..d3006c4edb 100644 --- a/src/Bisector/Bisector_BisecPC.hxx +++ b/src/Bisector/Bisector_BisecPC.hxx @@ -28,9 +28,6 @@ #include #include class Geom2d_Curve; -class Standard_DomainError; -class Standard_RangeError; -class gp_Pnt2d; class Geom2d_Geometry; class gp_Trsf2d; class gp_Vec2d; diff --git a/src/Bisector/Bisector_FunctionH.hxx b/src/Bisector/Bisector_FunctionH.hxx index f41c7e0e6b..7c6b053854 100644 --- a/src/Bisector/Bisector_FunctionH.hxx +++ b/src/Bisector/Bisector_FunctionH.hxx @@ -27,8 +27,6 @@ #include #include class Geom2d_Curve; -class gp_Pnt2d; -class gp_Vec2d; //! H(v) = (T1 .P2(v) - P1) * ||T(v)|| - diff --git a/src/Bisector/Bisector_Inter.hxx b/src/Bisector/Bisector_Inter.hxx index 48b012c949..c5e724c3c2 100644 --- a/src/Bisector/Bisector_Inter.hxx +++ b/src/Bisector/Bisector_Inter.hxx @@ -24,7 +24,6 @@ #include #include #include -class Standard_ConstructionError; class Bisector_Bisec; class IntRes2d_Domain; class Geom2d_Curve; diff --git a/src/Bisector/Bisector_PointOnBis.hxx b/src/Bisector/Bisector_PointOnBis.hxx index 8aaca9de37..7ae90ebdf3 100644 --- a/src/Bisector/Bisector_PointOnBis.hxx +++ b/src/Bisector/Bisector_PointOnBis.hxx @@ -24,7 +24,6 @@ #include #include #include -class gp_Pnt2d; diff --git a/src/Bisector/Bisector_PolyBis.hxx b/src/Bisector/Bisector_PolyBis.hxx index 6b6b8e2c3e..5938ccbd0e 100644 --- a/src/Bisector/Bisector_PolyBis.hxx +++ b/src/Bisector/Bisector_PolyBis.hxx @@ -25,7 +25,6 @@ #include #include #include -class Bisector_PointOnBis; class gp_Trsf2d; diff --git a/src/Bnd/Bnd_BoundSortBox.hxx b/src/Bnd/Bnd_BoundSortBox.hxx index 384664b11e..18f26a8027 100644 --- a/src/Bnd/Bnd_BoundSortBox.hxx +++ b/src/Bnd/Bnd_BoundSortBox.hxx @@ -28,9 +28,6 @@ #include #include #include -class Standard_NullValue; -class Standard_MultiplyDefined; -class Bnd_Box; class gp_Pln; diff --git a/src/Bnd/Bnd_BoundSortBox2d.hxx b/src/Bnd/Bnd_BoundSortBox2d.hxx index 6a7eab550f..121aa1f1d5 100644 --- a/src/Bnd/Bnd_BoundSortBox2d.hxx +++ b/src/Bnd/Bnd_BoundSortBox2d.hxx @@ -28,9 +28,6 @@ #include #include #include -class Standard_NullValue; -class Standard_MultiplyDefined; -class Bnd_Box2d; //! A tool to compare a 2D bounding box with a set of 2D diff --git a/src/Bnd/Bnd_Box.hxx b/src/Bnd/Bnd_Box.hxx index 1cfb7c0fce..a260fd4ef2 100644 --- a/src/Bnd/Bnd_Box.hxx +++ b/src/Bnd/Bnd_Box.hxx @@ -25,7 +25,6 @@ #include #include #include -class Standard_ConstructionError; class gp_Pnt; class gp_Dir; class gp_Trsf; diff --git a/src/Bnd/Bnd_Box2d.hxx b/src/Bnd/Bnd_Box2d.hxx index 02dd79dc09..5f65932643 100644 --- a/src/Bnd/Bnd_Box2d.hxx +++ b/src/Bnd/Bnd_Box2d.hxx @@ -26,7 +26,6 @@ #include #include #include -class Standard_ConstructionError; class gp_Dir2d; class gp_Trsf2d; diff --git a/src/Bnd/Bnd_Sphere.hxx b/src/Bnd/Bnd_Sphere.hxx index 679ba0277f..da98f4a5e9 100644 --- a/src/Bnd/Bnd_Sphere.hxx +++ b/src/Bnd/Bnd_Sphere.hxx @@ -24,7 +24,6 @@ #include #include #include -class gp_XYZ; //! This class represents a bounding sphere of a geometric entity diff --git a/src/BndLib/BndLib.hxx b/src/BndLib/BndLib.hxx index ad207c7d5a..3ea0494d4d 100644 --- a/src/BndLib/BndLib.hxx +++ b/src/BndLib/BndLib.hxx @@ -38,9 +38,6 @@ class gp_Cylinder; class gp_Cone; class gp_Sphere; class gp_Torus; -class BndLib_Add3dCurve; -class BndLib_Add2dCurve; -class BndLib_AddSurface; //! The BndLib package provides functions to add a geometric primitive to a bounding box. diff --git a/src/BndLib/BndLib_Add3dCurve.hxx b/src/BndLib/BndLib_Add3dCurve.hxx index 4fdee15d1d..1e7372de68 100644 --- a/src/BndLib/BndLib_Add3dCurve.hxx +++ b/src/BndLib/BndLib_Add3dCurve.hxx @@ -25,8 +25,6 @@ // class Adaptor3d_Curve; class Bnd_Box; -class gp_Circ; -class gp_Elips; //! Computes the bounding box for a curve in 3d. diff --git a/src/BndLib/BndLib_AddSurface.hxx b/src/BndLib/BndLib_AddSurface.hxx index 66cc9acb4d..205010c8d1 100644 --- a/src/BndLib/BndLib_AddSurface.hxx +++ b/src/BndLib/BndLib_AddSurface.hxx @@ -24,9 +24,6 @@ #include class Adaptor3d_Surface; class Bnd_Box; -class gp_Cylinder; -class gp_Cone; -class gp_Sphere; //! computes the box from a surface //! Functions to add a surface to a bounding box. diff --git a/src/CDF/CDF_Application.hxx b/src/CDF/CDF_Application.hxx index b4ef68f2aa..9c218887bc 100644 --- a/src/CDF/CDF_Application.hxx +++ b/src/CDF/CDF_Application.hxx @@ -27,10 +27,8 @@ #include #include -class Standard_NoSuchObject; class Standard_GUID; class CDM_Document; -class TCollection_ExtendedString; class PCDM_Reader; class CDM_MetaData; class PCDM_RetrievalDriver; diff --git a/src/CDF/CDF_Directory.hxx b/src/CDF/CDF_Directory.hxx index 2a502a934e..27f2ff84fe 100644 --- a/src/CDF/CDF_Directory.hxx +++ b/src/CDF/CDF_Directory.hxx @@ -24,8 +24,6 @@ #include #include #include -class Standard_NoSuchObject; -class CDF_DirectoryIterator; class CDM_Document; diff --git a/src/CDF/CDF_DirectoryIterator.hxx b/src/CDF/CDF_DirectoryIterator.hxx index 29c13b94ab..4a163c697b 100644 --- a/src/CDF/CDF_DirectoryIterator.hxx +++ b/src/CDF/CDF_DirectoryIterator.hxx @@ -23,7 +23,6 @@ #include #include -class Standard_NoSuchObject; class CDF_Directory; class CDM_Document; diff --git a/src/CDF/CDF_MetaDataDriver.hxx b/src/CDF/CDF_MetaDataDriver.hxx index 3987b6f67c..5a3692dd9b 100644 --- a/src/CDF/CDF_MetaDataDriver.hxx +++ b/src/CDF/CDF_MetaDataDriver.hxx @@ -19,7 +19,6 @@ #include -class Standard_NotImplemented; class CDM_MetaData; class TCollection_ExtendedString; class CDM_Document; diff --git a/src/CDF/CDF_Store.hxx b/src/CDF/CDF_Store.hxx index a19f5f2fa8..9286300b75 100644 --- a/src/CDF/CDF_Store.hxx +++ b/src/CDF/CDF_Store.hxx @@ -34,7 +34,6 @@ class CDF_StoreList; class CDM_Document; -class TCollection_ExtendedString; diff --git a/src/CDF/CDF_StoreList.hxx b/src/CDF/CDF_StoreList.hxx index a695058d7a..1f79e21682 100644 --- a/src/CDF/CDF_StoreList.hxx +++ b/src/CDF/CDF_StoreList.hxx @@ -29,7 +29,6 @@ #include class CDM_Document; -class Standard_NoSuchObject; class CDM_MetaData; class TCollection_ExtendedString; diff --git a/src/CDM/CDM_Application.hxx b/src/CDM/CDM_Application.hxx index a55dc67e59..3e47f24987 100644 --- a/src/CDM/CDM_Application.hxx +++ b/src/CDM/CDM_Application.hxx @@ -29,7 +29,6 @@ #include #include -class CDM_Reference; class CDM_MetaData; class CDM_Document; class Resource_Manager; diff --git a/src/CDM/CDM_Document.hxx b/src/CDM/CDM_Document.hxx index 3b819486d8..ae0a611b84 100644 --- a/src/CDM/CDM_Document.hxx +++ b/src/CDM/CDM_Document.hxx @@ -29,12 +29,7 @@ class CDM_MetaData; class CDM_Application; -class Standard_NoSuchObject; -class Standard_Failure; -class Standard_DomainError; class CDM_Reference; -class CDM_ReferenceIterator; -class TCollection_ExtendedString; class Resource_Manager; class CDM_Document; diff --git a/src/CDM/CDM_MetaData.hxx b/src/CDM/CDM_MetaData.hxx index 9039ddce81..26af074bc7 100644 --- a/src/CDM/CDM_MetaData.hxx +++ b/src/CDM/CDM_MetaData.hxx @@ -29,11 +29,6 @@ #include #include #include -class Standard_NoSuchObject; -class CDM_Reference; -class CDM_Document; -class TCollection_ExtendedString; -class CDM_Application; class CDM_MetaData; diff --git a/src/CPnts/CPnts_AbscissaPoint.hxx b/src/CPnts/CPnts_AbscissaPoint.hxx index a39a1f9159..74deff54ff 100644 --- a/src/CPnts/CPnts_AbscissaPoint.hxx +++ b/src/CPnts/CPnts_AbscissaPoint.hxx @@ -24,8 +24,6 @@ #include #include #include -class StdFail_NotDone; -class Standard_ConstructionError; class Adaptor3d_Curve; class Adaptor2d_Curve2d; diff --git a/src/CPnts/CPnts_UniformDeflection.hxx b/src/CPnts/CPnts_UniformDeflection.hxx index d204e86979..11efcc63ed 100644 --- a/src/CPnts/CPnts_UniformDeflection.hxx +++ b/src/CPnts/CPnts_UniformDeflection.hxx @@ -26,9 +26,6 @@ #include #include #include -class Standard_DomainError; -class StdFail_NotDone; -class Standard_OutOfRange; class Adaptor3d_Curve; class Adaptor2d_Curve2d; diff --git a/src/CSLib/CSLib.hxx b/src/CSLib/CSLib.hxx index f2b6d670f1..1832609bd4 100644 --- a/src/CSLib/CSLib.hxx +++ b/src/CSLib/CSLib.hxx @@ -29,8 +29,6 @@ #include class gp_Vec; class gp_Dir; -class CSLib_Class2d; -class CSLib_NormalPolyDef; //! This package implements functions for basis geometric diff --git a/src/ChFi2d/ChFi2d.hxx b/src/ChFi2d/ChFi2d.hxx index a37b4b91be..7eb7156e4f 100644 --- a/src/ChFi2d/ChFi2d.hxx +++ b/src/ChFi2d/ChFi2d.hxx @@ -26,7 +26,6 @@ class TopoDS_Edge; class TopoDS_Vertex; class TopoDS_Face; -class ChFi2d_Builder; //! This package contains the algorithms used to build diff --git a/src/ChFi3d/ChFi3d.hxx b/src/ChFi3d/ChFi3d.hxx index 38c523ff47..eb218fba2a 100644 --- a/src/ChFi3d/ChFi3d.hxx +++ b/src/ChFi3d/ChFi3d.hxx @@ -29,10 +29,6 @@ class BRepAdaptor_Surface; class TopoDS_Edge; class TopoDS_Face; -class ChFi3d_Builder; -class ChFi3d_ChBuilder; -class ChFi3d_FilBuilder; -class ChFi3d_SearchSing; //! creation of spatial fillets on a solid. diff --git a/src/ChFi3d/ChFi3d_Builder.hxx b/src/ChFi3d/ChFi3d_Builder.hxx index 02b474a9cf..f24419fca6 100644 --- a/src/ChFi3d/ChFi3d_Builder.hxx +++ b/src/ChFi3d/ChFi3d_Builder.hxx @@ -37,9 +37,6 @@ class TopOpeBRepDS_HDataStructure; class TopOpeBRepBuild_HBuilder; -class Standard_OutOfRange; -class Standard_NoSuchObject; -class Standard_ConstructionError; class TopoDS_Edge; class ChFiDS_Spine; class TopoDS_Vertex; diff --git a/src/ChFi3d/ChFi3d_ChBuilder.hxx b/src/ChFi3d/ChFi3d_ChBuilder.hxx index fb64eebf35..2a708db296 100644 --- a/src/ChFi3d/ChFi3d_ChBuilder.hxx +++ b/src/ChFi3d/ChFi3d_ChBuilder.hxx @@ -30,8 +30,6 @@ #include #include -class Standard_ConstructionError; -class Standard_DomainError; class TopoDS_Shape; class TopoDS_Edge; class TopoDS_Face; diff --git a/src/ChFiDS/ChFiDS_CircSection.hxx b/src/ChFiDS/ChFiDS_CircSection.hxx index 19cb599a25..e5e5be4088 100644 --- a/src/ChFiDS/ChFiDS_CircSection.hxx +++ b/src/ChFiDS/ChFiDS_CircSection.hxx @@ -24,8 +24,6 @@ #include #include #include -class gp_Circ; -class gp_Lin; //! A Section of fillet. diff --git a/src/ChFiDS/ChFiDS_CommonPoint.hxx b/src/ChFiDS/ChFiDS_CommonPoint.hxx index b5bd41b345..15f725ecc1 100644 --- a/src/ChFiDS/ChFiDS_CommonPoint.hxx +++ b/src/ChFiDS/ChFiDS_CommonPoint.hxx @@ -28,12 +28,6 @@ #include #include #include -class Standard_DomainError; -class Standard_TypeMismatch; -class TopoDS_Vertex; -class TopoDS_Edge; -class gp_Pnt; -class gp_Vec; //! point start/end of fillet common to 2 adjacent filets diff --git a/src/ChFiDS/ChFiDS_ElSpine.hxx b/src/ChFiDS/ChFiDS_ElSpine.hxx index 374eeead39..451fda9ef5 100644 --- a/src/ChFiDS/ChFiDS_ElSpine.hxx +++ b/src/ChFiDS/ChFiDS_ElSpine.hxx @@ -33,11 +33,6 @@ #include #include class ChFiDS_SurfData; -class Standard_OutOfRange; -class Standard_NoSuchObject; -class Standard_DomainError; -class gp_Pnt; -class gp_Vec; class gp_Ax1; class Geom_Curve; class gp_Lin; diff --git a/src/ChFiDS/ChFiDS_SurfData.hxx b/src/ChFiDS/ChFiDS_SurfData.hxx index b307cf22bb..3113807f09 100644 --- a/src/ChFiDS/ChFiDS_SurfData.hxx +++ b/src/ChFiDS/ChFiDS_SurfData.hxx @@ -29,9 +29,6 @@ #include #include -class ChFiDS_FaceInterference; -class ChFiDS_CommonPoint; -class gp_Pnt2d; class ChFiDS_SurfData; diff --git a/src/Contap/Contap_ContAna.hxx b/src/Contap/Contap_ContAna.hxx index b0f5dcd8d0..f0384bdf0c 100644 --- a/src/Contap/Contap_ContAna.hxx +++ b/src/Contap/Contap_ContAna.hxx @@ -28,12 +28,7 @@ #include #include #include -class StdFail_NotDone; -class Standard_DomainError; -class Standard_OutOfRange; class gp_Sphere; -class gp_Dir; -class gp_Pnt; class gp_Cylinder; class gp_Cone; class gp_Lin; diff --git a/src/Contap/Contap_HCurve2dTool.hxx b/src/Contap/Contap_HCurve2dTool.hxx index 33c6069c5e..0d235caa6b 100644 --- a/src/Contap/Contap_HCurve2dTool.hxx +++ b/src/Contap/Contap_HCurve2dTool.hxx @@ -34,9 +34,6 @@ #include #include #include -class Standard_OutOfRange; -class Standard_NoSuchObject; -class Standard_DomainError; class gp_Pnt2d; class gp_Vec2d; class Geom2d_BezierCurve; diff --git a/src/Contap/Contap_Line.hxx b/src/Contap/Contap_Line.hxx index 9c6b12ec1f..8ac4aedb6a 100644 --- a/src/Contap/Contap_Line.hxx +++ b/src/Contap/Contap_Line.hxx @@ -31,8 +31,6 @@ #include #include class IntSurf_LineOn2S; -class Standard_DomainError; -class Standard_OutOfRange; class IntSurf_PntOn2S; class gp_Lin; class gp_Circ; diff --git a/src/Contap/Contap_Point.hxx b/src/Contap/Contap_Point.hxx index 82fbd08558..56a550f28e 100644 --- a/src/Contap/Contap_Point.hxx +++ b/src/Contap/Contap_Point.hxx @@ -27,9 +27,6 @@ #include class Adaptor3d_HVertex; -class Standard_DomainError; -class gp_Pnt; -class IntSurf_Transition; //! Definition of a vertex on the contour line. diff --git a/src/Contap/Contap_SurfFunction.hxx b/src/Contap/Contap_SurfFunction.hxx index 9539a3bfbe..8ebf3a85dc 100644 --- a/src/Contap/Contap_SurfFunction.hxx +++ b/src/Contap/Contap_SurfFunction.hxx @@ -26,11 +26,7 @@ #include #include -class gp_Pnt; -class gp_Dir; class math_Matrix; -class gp_Vec; -class gp_Dir2d; //! This class describes the function on a parametric surface. diff --git a/src/Convert/Convert_CircleToBSplineCurve.hxx b/src/Convert/Convert_CircleToBSplineCurve.hxx index 5fed368e54..528298f371 100644 --- a/src/Convert/Convert_CircleToBSplineCurve.hxx +++ b/src/Convert/Convert_CircleToBSplineCurve.hxx @@ -24,7 +24,6 @@ #include #include #include -class Standard_DomainError; class gp_Circ2d; diff --git a/src/Convert/Convert_CompBezierCurves2dToBSplineCurve2d.hxx b/src/Convert/Convert_CompBezierCurves2dToBSplineCurve2d.hxx index dbe1d8d8ee..44d102dce9 100644 --- a/src/Convert/Convert_CompBezierCurves2dToBSplineCurve2d.hxx +++ b/src/Convert/Convert_CompBezierCurves2dToBSplineCurve2d.hxx @@ -31,7 +31,6 @@ #include #include #include -class Standard_ConstructionError; //! Converts a list of connecting Bezier Curves 2d to a diff --git a/src/Convert/Convert_CompBezierCurvesToBSplineCurve.hxx b/src/Convert/Convert_CompBezierCurvesToBSplineCurve.hxx index d5b3b5772f..8a76451b8b 100644 --- a/src/Convert/Convert_CompBezierCurvesToBSplineCurve.hxx +++ b/src/Convert/Convert_CompBezierCurvesToBSplineCurve.hxx @@ -31,7 +31,6 @@ #include #include #include -class Standard_ConstructionError; //! An algorithm to convert a sequence of adjacent diff --git a/src/Convert/Convert_CompPolynomialToPoles.hxx b/src/Convert/Convert_CompPolynomialToPoles.hxx index 1f40ee1825..eb813f0cea 100644 --- a/src/Convert/Convert_CompPolynomialToPoles.hxx +++ b/src/Convert/Convert_CompPolynomialToPoles.hxx @@ -29,8 +29,6 @@ #include #include #include -class Standard_OutOfRange; -class Standard_ConstructionError; //! Convert a serie of Polynomial N-Dimensional Curves diff --git a/src/Convert/Convert_ConeToBSplineSurface.hxx b/src/Convert/Convert_ConeToBSplineSurface.hxx index a65cfa7561..9e382ce475 100644 --- a/src/Convert/Convert_ConeToBSplineSurface.hxx +++ b/src/Convert/Convert_ConeToBSplineSurface.hxx @@ -23,7 +23,6 @@ #include #include -class Standard_DomainError; class gp_Cone; diff --git a/src/Convert/Convert_ConicToBSplineCurve.hxx b/src/Convert/Convert_ConicToBSplineCurve.hxx index 33880a8bbb..1483e567cc 100644 --- a/src/Convert/Convert_ConicToBSplineCurve.hxx +++ b/src/Convert/Convert_ConicToBSplineCurve.hxx @@ -28,8 +28,6 @@ #include #include #include -class Standard_OutOfRange; -class Standard_ConstructionError; class gp_Pnt2d; diff --git a/src/Convert/Convert_CylinderToBSplineSurface.hxx b/src/Convert/Convert_CylinderToBSplineSurface.hxx index 20ec2bc9c7..590d93e5e1 100644 --- a/src/Convert/Convert_CylinderToBSplineSurface.hxx +++ b/src/Convert/Convert_CylinderToBSplineSurface.hxx @@ -23,7 +23,6 @@ #include #include -class Standard_DomainError; class gp_Cylinder; diff --git a/src/Convert/Convert_ElementarySurfaceToBSplineSurface.hxx b/src/Convert/Convert_ElementarySurfaceToBSplineSurface.hxx index 6b00adba8a..1259609b58 100644 --- a/src/Convert/Convert_ElementarySurfaceToBSplineSurface.hxx +++ b/src/Convert/Convert_ElementarySurfaceToBSplineSurface.hxx @@ -28,7 +28,6 @@ #include #include #include -class Standard_OutOfRange; class gp_Pnt; diff --git a/src/Convert/Convert_EllipseToBSplineCurve.hxx b/src/Convert/Convert_EllipseToBSplineCurve.hxx index 660af287da..4d038ba903 100644 --- a/src/Convert/Convert_EllipseToBSplineCurve.hxx +++ b/src/Convert/Convert_EllipseToBSplineCurve.hxx @@ -24,7 +24,6 @@ #include #include #include -class Standard_DomainError; class gp_Elips2d; diff --git a/src/Convert/Convert_GridPolynomialToPoles.hxx b/src/Convert/Convert_GridPolynomialToPoles.hxx index 485dcfae66..71e3a0a564 100644 --- a/src/Convert/Convert_GridPolynomialToPoles.hxx +++ b/src/Convert/Convert_GridPolynomialToPoles.hxx @@ -27,8 +27,6 @@ #include #include #include -class Standard_DomainError; -class StdFail_NotDone; //! Convert a grid of Polynomial Surfaces diff --git a/src/Convert/Convert_SphereToBSplineSurface.hxx b/src/Convert/Convert_SphereToBSplineSurface.hxx index ba2e541dd6..57b139f632 100644 --- a/src/Convert/Convert_SphereToBSplineSurface.hxx +++ b/src/Convert/Convert_SphereToBSplineSurface.hxx @@ -24,7 +24,6 @@ #include #include #include -class Standard_DomainError; class gp_Sphere; diff --git a/src/Convert/Convert_TorusToBSplineSurface.hxx b/src/Convert/Convert_TorusToBSplineSurface.hxx index e442454044..bbce8280a6 100644 --- a/src/Convert/Convert_TorusToBSplineSurface.hxx +++ b/src/Convert/Convert_TorusToBSplineSurface.hxx @@ -24,7 +24,6 @@ #include #include #include -class Standard_DomainError; class gp_Torus; diff --git a/src/DBRep/DBRep_Edge.hxx b/src/DBRep/DBRep_Edge.hxx index 4c69fb5652..44ce120627 100644 --- a/src/DBRep/DBRep_Edge.hxx +++ b/src/DBRep/DBRep_Edge.hxx @@ -23,8 +23,6 @@ #include #include #include -class TopoDS_Edge; -class Draw_Color; class DBRep_Edge; diff --git a/src/DBRep/DBRep_Face.hxx b/src/DBRep/DBRep_Face.hxx index ecade9a858..26f3fe766e 100644 --- a/src/DBRep/DBRep_Face.hxx +++ b/src/DBRep/DBRep_Face.hxx @@ -28,8 +28,6 @@ #include #include #include -class TopoDS_Face; -class Draw_Color; class DBRep_Face; diff --git a/src/DBRep/DBRep_HideData.hxx b/src/DBRep/DBRep_HideData.hxx index 8a8e1acdc3..c08f2b863c 100644 --- a/src/DBRep/DBRep_HideData.hxx +++ b/src/DBRep/DBRep_HideData.hxx @@ -27,8 +27,6 @@ #include #include #include -class gp_Trsf; -class TopoDS_Shape; class Draw_Display; class Draw_Color; diff --git a/src/DBRep/DBRep_IsoBuilder.hxx b/src/DBRep/DBRep_IsoBuilder.hxx index 7fa19c022e..153dd09c4f 100644 --- a/src/DBRep/DBRep_IsoBuilder.hxx +++ b/src/DBRep/DBRep_IsoBuilder.hxx @@ -29,7 +29,6 @@ #include class TopoDS_Face; class DBRep_Face; -class TopoDS_Shape; class TopTools_OrientedShapeMapHasher; //! Creation of isoparametric curves. diff --git a/src/DDF/DDF.hxx b/src/DDF/DDF.hxx index 71a22ea186..8ac9f0b9cb 100644 --- a/src/DDF/DDF.hxx +++ b/src/DDF/DDF.hxx @@ -27,9 +27,6 @@ class TDF_Data; class TDF_Label; class Standard_GUID; class TDF_Attribute; -class DDF_Data; -class DDF_Browser; -class DDF_Transaction; //! Provides facilities to manipulate data framework diff --git a/src/DDF/DDF_Browser.hxx b/src/DDF/DDF_Browser.hxx index 0b519a6f39..3f401ce109 100644 --- a/src/DDF/DDF_Browser.hxx +++ b/src/DDF/DDF_Browser.hxx @@ -26,7 +26,6 @@ #include class TDF_Data; class Draw_Display; -class Draw_Drawable3D; class TCollection_AsciiString; class TDF_Label; diff --git a/src/DDF/DDF_Data.hxx b/src/DDF/DDF_Data.hxx index 5c0a0edb0f..80fc9f0afa 100644 --- a/src/DDF/DDF_Data.hxx +++ b/src/DDF/DDF_Data.hxx @@ -24,7 +24,6 @@ #include class TDF_Data; class Draw_Display; -class Draw_Drawable3D; class DDF_Data; diff --git a/src/DDF/DDF_Transaction.hxx b/src/DDF/DDF_Transaction.hxx index bb72a1bd53..8a6a47629c 100644 --- a/src/DDF/DDF_Transaction.hxx +++ b/src/DDF/DDF_Transaction.hxx @@ -23,8 +23,6 @@ #include #include #include -class Standard_DomainError; -class Standard_NullObject; class TDF_Data; class TDF_Delta; diff --git a/src/DDataStd/DDataStd.hxx b/src/DDataStd/DDataStd.hxx index 8f9a9fb80f..0d9d5158d6 100644 --- a/src/DDataStd/DDataStd.hxx +++ b/src/DDataStd/DDataStd.hxx @@ -24,9 +24,6 @@ #include #include class TDataXtd_Constraint; -class DDataStd_DrawPresentation; -class DDataStd_DrawDriver; -class DDataStd_TreeBrowser; //! commands for Standard Attributes. diff --git a/src/DDataStd/DDataStd_DrawPresentation.hxx b/src/DDataStd/DDataStd_DrawPresentation.hxx index 694d264a11..3261fe45b8 100644 --- a/src/DDataStd/DDataStd_DrawPresentation.hxx +++ b/src/DDataStd/DDataStd_DrawPresentation.hxx @@ -25,7 +25,6 @@ class Draw_Drawable3D; class TDF_Label; class Standard_GUID; -class TDF_Attribute; class TDF_RelocationTable; class TDF_AttributeDelta; diff --git a/src/DDataStd/DDataStd_TreeBrowser.hxx b/src/DDataStd/DDataStd_TreeBrowser.hxx index 204df49f5a..7eea491287 100644 --- a/src/DDataStd/DDataStd_TreeBrowser.hxx +++ b/src/DDataStd/DDataStd_TreeBrowser.hxx @@ -23,9 +23,7 @@ #include #include #include -class TDF_Label; class Draw_Display; -class Draw_Drawable3D; class TCollection_AsciiString; class TDataStd_TreeNode; diff --git a/src/DDocStd/DDocStd.hxx b/src/DDocStd/DDocStd.hxx index f56038450d..aed7cb9d07 100644 --- a/src/DDocStd/DDocStd.hxx +++ b/src/DDocStd/DDocStd.hxx @@ -28,7 +28,6 @@ class TDocStd_Document; class TDF_Label; class Standard_GUID; class TDF_Attribute; -class DDocStd_DrawDocument; //! This package provides Draw services to test CAF diff --git a/src/DNaming/DNaming.hxx b/src/DNaming/DNaming.hxx index 73edfec3fc..cb02766df0 100644 --- a/src/DNaming/DNaming.hxx +++ b/src/DNaming/DNaming.hxx @@ -42,17 +42,6 @@ class TDF_Label; class BRepAlgoAPI_BooleanOperation; class TDF_Data; class TCollection_AsciiString; -class DNaming_BoxDriver; -class DNaming_CylinderDriver; -class DNaming_SphereDriver; -class DNaming_SelectionDriver; -class DNaming_BooleanOperationDriver; -class DNaming_FilletDriver; -class DNaming_TransformationDriver; -class DNaming_PrismDriver; -class DNaming_RevolutionDriver; -class DNaming_PointDriver; -class DNaming_Line3DDriver; diff --git a/src/Draft/Draft.hxx b/src/Draft/Draft.hxx index 3e20b1b4ac..daf5279317 100644 --- a/src/Draft/Draft.hxx +++ b/src/Draft/Draft.hxx @@ -24,10 +24,6 @@ #include class TopoDS_Face; class gp_Dir; -class Draft_Modification; -class Draft_FaceInfo; -class Draft_EdgeInfo; -class Draft_VertexInfo; diff --git a/src/Draft/Draft_EdgeInfo.hxx b/src/Draft/Draft_EdgeInfo.hxx index 3b5f243ce0..84d4ad7dea 100644 --- a/src/Draft/Draft_EdgeInfo.hxx +++ b/src/Draft/Draft_EdgeInfo.hxx @@ -27,9 +27,6 @@ #include class Geom_Curve; class Geom2d_Curve; -class Standard_DomainError; -class TopoDS_Face; -class gp_Pnt; diff --git a/src/Draft/Draft_FaceInfo.hxx b/src/Draft/Draft_FaceInfo.hxx index 97f3fc14b7..b6503d205a 100644 --- a/src/Draft/Draft_FaceInfo.hxx +++ b/src/Draft/Draft_FaceInfo.hxx @@ -25,8 +25,6 @@ #include class Geom_Surface; class Geom_Curve; -class Standard_DomainError; -class TopoDS_Face; diff --git a/src/Draft/Draft_Modification.hxx b/src/Draft/Draft_Modification.hxx index 4550da76dd..22503205b7 100644 --- a/src/Draft/Draft_Modification.hxx +++ b/src/Draft/Draft_Modification.hxx @@ -33,11 +33,6 @@ #include #include #include -class StdFail_NotDone; -class Standard_NoSuchObject; -class Standard_ConstructionError; -class TopoDS_Shape; -class TopoDS_Face; class gp_Dir; class gp_Pln; class Geom_Surface; diff --git a/src/Draft/Draft_VertexInfo.hxx b/src/Draft/Draft_VertexInfo.hxx index 89cc6ce14a..7f7348fd63 100644 --- a/src/Draft/Draft_VertexInfo.hxx +++ b/src/Draft/Draft_VertexInfo.hxx @@ -27,10 +27,7 @@ #include #include #include -class Standard_DomainError; -class Standard_NoMoreObject; class TopoDS_Edge; -class gp_Pnt; diff --git a/src/Draw/Draw_Axis2D.hxx b/src/Draw/Draw_Axis2D.hxx index 3bbc1c348f..1449c0199a 100644 --- a/src/Draw/Draw_Axis2D.hxx +++ b/src/Draw/Draw_Axis2D.hxx @@ -24,9 +24,7 @@ #include #include #include -class Draw_Color; class gp_Pnt2d; -class gp_Ax22d; class Draw_Display; diff --git a/src/Draw/Draw_Axis3D.hxx b/src/Draw/Draw_Axis3D.hxx index d594d338d6..59c5d7343f 100644 --- a/src/Draw/Draw_Axis3D.hxx +++ b/src/Draw/Draw_Axis3D.hxx @@ -24,9 +24,7 @@ #include #include #include -class Draw_Color; class gp_Pnt; -class gp_Ax3; class Draw_Display; diff --git a/src/Draw/Draw_Box.hxx b/src/Draw/Draw_Box.hxx index 25656faf56..2e010183c3 100644 --- a/src/Draw/Draw_Box.hxx +++ b/src/Draw/Draw_Box.hxx @@ -23,7 +23,6 @@ #include #include #include -class Draw_Color; class Draw_Display; diff --git a/src/Draw/Draw_Chronometer.hxx b/src/Draw/Draw_Chronometer.hxx index 03e8b1eb8e..6fffffcde7 100644 --- a/src/Draw/Draw_Chronometer.hxx +++ b/src/Draw/Draw_Chronometer.hxx @@ -24,9 +24,7 @@ #include #include #include -class OSD_Timer; class Draw_Display; -class Draw_Drawable3D; class Draw_Chronometer; diff --git a/src/Draw/Draw_Circle2D.hxx b/src/Draw/Draw_Circle2D.hxx index e68580a4d2..ae9ba4ce36 100644 --- a/src/Draw/Draw_Circle2D.hxx +++ b/src/Draw/Draw_Circle2D.hxx @@ -24,8 +24,6 @@ #include #include #include -class gp_Circ2d; -class Draw_Color; class Draw_Display; diff --git a/src/Draw/Draw_Circle3D.hxx b/src/Draw/Draw_Circle3D.hxx index 2df55a04d2..45c664793d 100644 --- a/src/Draw/Draw_Circle3D.hxx +++ b/src/Draw/Draw_Circle3D.hxx @@ -24,8 +24,6 @@ #include #include #include -class gp_Circ; -class Draw_Color; class Draw_Display; diff --git a/src/Draw/Draw_Marker2D.hxx b/src/Draw/Draw_Marker2D.hxx index 7b65901433..2aadeb5c94 100644 --- a/src/Draw/Draw_Marker2D.hxx +++ b/src/Draw/Draw_Marker2D.hxx @@ -27,8 +27,6 @@ #include #include #include -class gp_Pnt2d; -class Draw_Color; class Draw_Display; diff --git a/src/Draw/Draw_Marker3D.hxx b/src/Draw/Draw_Marker3D.hxx index 255609bc79..26ad1977bc 100644 --- a/src/Draw/Draw_Marker3D.hxx +++ b/src/Draw/Draw_Marker3D.hxx @@ -27,8 +27,6 @@ #include #include #include -class gp_Pnt; -class Draw_Color; class Draw_Display; diff --git a/src/Draw/Draw_Segment2D.hxx b/src/Draw/Draw_Segment2D.hxx index 15ca9408a8..38126a662c 100644 --- a/src/Draw/Draw_Segment2D.hxx +++ b/src/Draw/Draw_Segment2D.hxx @@ -25,8 +25,6 @@ #include #include #include -class gp_Pnt2d; -class Draw_Color; class Draw_Display; diff --git a/src/Draw/Draw_Segment3D.hxx b/src/Draw/Draw_Segment3D.hxx index de97ae3021..15ad8cd83b 100644 --- a/src/Draw/Draw_Segment3D.hxx +++ b/src/Draw/Draw_Segment3D.hxx @@ -23,8 +23,6 @@ #include #include #include -class gp_Pnt; -class Draw_Color; class Draw_Display; diff --git a/src/Draw/Draw_Text2D.hxx b/src/Draw/Draw_Text2D.hxx index 13751beb14..593ad5a2a0 100644 --- a/src/Draw/Draw_Text2D.hxx +++ b/src/Draw/Draw_Text2D.hxx @@ -26,8 +26,6 @@ #include #include #include -class gp_Pnt2d; -class Draw_Color; class Draw_Display; diff --git a/src/Draw/Draw_Text3D.hxx b/src/Draw/Draw_Text3D.hxx index 431441b5ba..430534df75 100644 --- a/src/Draw/Draw_Text3D.hxx +++ b/src/Draw/Draw_Text3D.hxx @@ -26,8 +26,6 @@ #include #include #include -class gp_Pnt; -class Draw_Color; class Draw_Display; diff --git a/src/DrawDim/DrawDim.hxx b/src/DrawDim/DrawDim.hxx index aac5cf276e..8c98265060 100644 --- a/src/DrawDim/DrawDim.hxx +++ b/src/DrawDim/DrawDim.hxx @@ -32,15 +32,6 @@ class gp_Lin; class gp_Circ; class TopoDS_Face; class gp_Pln; -class DrawDim_Dimension; -class DrawDim_Angle; -class DrawDim_Distance; -class DrawDim_Radius; -class DrawDim_PlanarDimension; -class DrawDim_PlanarAngle; -class DrawDim_PlanarDistance; -class DrawDim_PlanarRadius; -class DrawDim_PlanarDiameter; //! This package provides Drawable Dimensions. diff --git a/src/DrawDim/DrawDim_Angle.hxx b/src/DrawDim/DrawDim_Angle.hxx index 633fadb47f..f2c25950c9 100644 --- a/src/DrawDim/DrawDim_Angle.hxx +++ b/src/DrawDim/DrawDim_Angle.hxx @@ -22,7 +22,6 @@ #include #include -class TopoDS_Face; class Draw_Display; diff --git a/src/DrawDim/DrawDim_Dimension.hxx b/src/DrawDim/DrawDim_Dimension.hxx index 15f42a99e2..84c034448e 100644 --- a/src/DrawDim/DrawDim_Dimension.hxx +++ b/src/DrawDim/DrawDim_Dimension.hxx @@ -24,7 +24,6 @@ #include #include #include -class Draw_Color; class gp_Pnt; class Draw_Display; diff --git a/src/DrawDim/DrawDim_Distance.hxx b/src/DrawDim/DrawDim_Distance.hxx index 3e545f602a..fb2630d7fd 100644 --- a/src/DrawDim/DrawDim_Distance.hxx +++ b/src/DrawDim/DrawDim_Distance.hxx @@ -22,7 +22,6 @@ #include #include -class TopoDS_Face; class Draw_Display; diff --git a/src/DrawDim/DrawDim_PlanarAngle.hxx b/src/DrawDim/DrawDim_PlanarAngle.hxx index 8f4fe404ed..b03cafe6fd 100644 --- a/src/DrawDim/DrawDim_PlanarAngle.hxx +++ b/src/DrawDim/DrawDim_PlanarAngle.hxx @@ -25,7 +25,6 @@ #include #include class TopoDS_Face; -class TopoDS_Shape; class Draw_Display; diff --git a/src/DrawDim/DrawDim_PlanarDiameter.hxx b/src/DrawDim/DrawDim_PlanarDiameter.hxx index 7ceb415fc0..ad1e6d0cb5 100644 --- a/src/DrawDim/DrawDim_PlanarDiameter.hxx +++ b/src/DrawDim/DrawDim_PlanarDiameter.hxx @@ -23,7 +23,6 @@ #include #include class TopoDS_Face; -class TopoDS_Shape; class Draw_Display; diff --git a/src/DrawDim/DrawDim_PlanarDimension.hxx b/src/DrawDim/DrawDim_PlanarDimension.hxx index d270e96a00..9ec7aa3606 100644 --- a/src/DrawDim/DrawDim_PlanarDimension.hxx +++ b/src/DrawDim/DrawDim_PlanarDimension.hxx @@ -22,7 +22,6 @@ #include #include -class TopoDS_Face; class DrawDim_PlanarDimension; diff --git a/src/DrawDim/DrawDim_PlanarDistance.hxx b/src/DrawDim/DrawDim_PlanarDistance.hxx index 479bb1fc57..050495429b 100644 --- a/src/DrawDim/DrawDim_PlanarDistance.hxx +++ b/src/DrawDim/DrawDim_PlanarDistance.hxx @@ -23,7 +23,6 @@ #include #include class TopoDS_Face; -class TopoDS_Shape; class Draw_Display; class gp_Pnt; class TopoDS_Edge; diff --git a/src/DrawDim/DrawDim_PlanarRadius.hxx b/src/DrawDim/DrawDim_PlanarRadius.hxx index 1bea4b7163..f16d9b95ef 100644 --- a/src/DrawDim/DrawDim_PlanarRadius.hxx +++ b/src/DrawDim/DrawDim_PlanarRadius.hxx @@ -23,7 +23,6 @@ #include #include class TopoDS_Face; -class TopoDS_Shape; class Draw_Display; diff --git a/src/DrawDim/DrawDim_Radius.hxx b/src/DrawDim/DrawDim_Radius.hxx index 9b10fb0324..f4fc7a8627 100644 --- a/src/DrawDim/DrawDim_Radius.hxx +++ b/src/DrawDim/DrawDim_Radius.hxx @@ -22,7 +22,6 @@ #include #include -class TopoDS_Face; class Draw_Display; diff --git a/src/DrawTrSurf/DrawTrSurf_BSplineCurve.hxx b/src/DrawTrSurf/DrawTrSurf_BSplineCurve.hxx index f953228655..86d0cb4268 100644 --- a/src/DrawTrSurf/DrawTrSurf_BSplineCurve.hxx +++ b/src/DrawTrSurf/DrawTrSurf_BSplineCurve.hxx @@ -22,7 +22,6 @@ #include class Geom_BSplineCurve; -class Draw_Color; DEFINE_STANDARD_HANDLE(DrawTrSurf_BSplineCurve, DrawTrSurf_Curve) diff --git a/src/DrawTrSurf/DrawTrSurf_BSplineCurve2d.hxx b/src/DrawTrSurf/DrawTrSurf_BSplineCurve2d.hxx index b82f0a78ee..6f325ef004 100644 --- a/src/DrawTrSurf/DrawTrSurf_BSplineCurve2d.hxx +++ b/src/DrawTrSurf/DrawTrSurf_BSplineCurve2d.hxx @@ -22,7 +22,6 @@ #include class Geom2d_BSplineCurve; -class Draw_Color; DEFINE_STANDARD_HANDLE(DrawTrSurf_BSplineCurve2d, DrawTrSurf_Curve2d) diff --git a/src/DrawTrSurf/DrawTrSurf_BSplineSurface.hxx b/src/DrawTrSurf/DrawTrSurf_BSplineSurface.hxx index 4735295394..f4803c2278 100644 --- a/src/DrawTrSurf/DrawTrSurf_BSplineSurface.hxx +++ b/src/DrawTrSurf/DrawTrSurf_BSplineSurface.hxx @@ -22,7 +22,6 @@ #include class Geom_BSplineSurface; -class Draw_Color; DEFINE_STANDARD_HANDLE(DrawTrSurf_BSplineSurface, DrawTrSurf_Surface) diff --git a/src/DrawTrSurf/DrawTrSurf_BezierCurve.hxx b/src/DrawTrSurf/DrawTrSurf_BezierCurve.hxx index 47bc6f330d..772c664de5 100644 --- a/src/DrawTrSurf/DrawTrSurf_BezierCurve.hxx +++ b/src/DrawTrSurf/DrawTrSurf_BezierCurve.hxx @@ -21,7 +21,6 @@ #include class Geom_BezierCurve; -class Draw_Color; DEFINE_STANDARD_HANDLE(DrawTrSurf_BezierCurve, DrawTrSurf_Curve) diff --git a/src/DrawTrSurf/DrawTrSurf_BezierCurve2d.hxx b/src/DrawTrSurf/DrawTrSurf_BezierCurve2d.hxx index b41fb271de..f5e53d7a4e 100644 --- a/src/DrawTrSurf/DrawTrSurf_BezierCurve2d.hxx +++ b/src/DrawTrSurf/DrawTrSurf_BezierCurve2d.hxx @@ -21,7 +21,6 @@ #include class Geom2d_BezierCurve; -class Draw_Color; DEFINE_STANDARD_HANDLE(DrawTrSurf_BezierCurve2d, DrawTrSurf_Curve2d) diff --git a/src/DrawTrSurf/DrawTrSurf_BezierSurface.hxx b/src/DrawTrSurf/DrawTrSurf_BezierSurface.hxx index dd09de0ea3..758ab3ed32 100644 --- a/src/DrawTrSurf/DrawTrSurf_BezierSurface.hxx +++ b/src/DrawTrSurf/DrawTrSurf_BezierSurface.hxx @@ -21,7 +21,6 @@ #include class Geom_BezierSurface; -class Draw_Color; DEFINE_STANDARD_HANDLE(DrawTrSurf_BezierSurface, DrawTrSurf_Surface) diff --git a/src/DrawTrSurf/DrawTrSurf_Curve.hxx b/src/DrawTrSurf/DrawTrSurf_Curve.hxx index a858dd9957..36ed5889e6 100644 --- a/src/DrawTrSurf/DrawTrSurf_Curve.hxx +++ b/src/DrawTrSurf/DrawTrSurf_Curve.hxx @@ -22,7 +22,6 @@ #include class Geom_Curve; -class Draw_Color; class Draw_Display; DEFINE_STANDARD_HANDLE(DrawTrSurf_Curve, DrawTrSurf_Drawable) diff --git a/src/DrawTrSurf/DrawTrSurf_Curve2d.hxx b/src/DrawTrSurf/DrawTrSurf_Curve2d.hxx index 7de035ddef..ba56a765b5 100644 --- a/src/DrawTrSurf/DrawTrSurf_Curve2d.hxx +++ b/src/DrawTrSurf/DrawTrSurf_Curve2d.hxx @@ -22,7 +22,6 @@ #include class Geom2d_Curve; -class Draw_Color; DEFINE_STANDARD_HANDLE(DrawTrSurf_Curve2d, DrawTrSurf_Drawable) diff --git a/src/DrawTrSurf/DrawTrSurf_Point.hxx b/src/DrawTrSurf/DrawTrSurf_Point.hxx index 3cec825fd7..e6545f8fc6 100644 --- a/src/DrawTrSurf/DrawTrSurf_Point.hxx +++ b/src/DrawTrSurf/DrawTrSurf_Point.hxx @@ -23,8 +23,6 @@ #include #include -class Draw_Color; -class gp_Pnt2d; DEFINE_STANDARD_HANDLE(DrawTrSurf_Point, Draw_Drawable3D) diff --git a/src/DrawTrSurf/DrawTrSurf_Surface.hxx b/src/DrawTrSurf/DrawTrSurf_Surface.hxx index 8ef17cb2e0..6be800fb86 100644 --- a/src/DrawTrSurf/DrawTrSurf_Surface.hxx +++ b/src/DrawTrSurf/DrawTrSurf_Surface.hxx @@ -22,7 +22,6 @@ #include class Geom_Surface; -class Draw_Color; DEFINE_STANDARD_HANDLE(DrawTrSurf_Surface, DrawTrSurf_Drawable) diff --git a/src/Expr/Expr.hxx b/src/Expr/Expr.hxx index 74caa4012a..6b5eb68778 100644 --- a/src/Expr/Expr.hxx +++ b/src/Expr/Expr.hxx @@ -25,57 +25,6 @@ #include class Expr_GeneralExpression; class Expr_GeneralRelation; -class Expr_GeneralExpression; -class Expr_NumericValue; -class Expr_NamedExpression; -class Expr_NamedConstant; -class Expr_NamedUnknown; -class Expr_UnaryExpression; -class Expr_Absolute; -class Expr_ArcCosine; -class Expr_ArcSine; -class Expr_ArcTangent; -class Expr_ArgCosh; -class Expr_ArgSinh; -class Expr_ArgTanh; -class Expr_Cosh; -class Expr_Cosine; -class Expr_Exponential; -class Expr_LogOf10; -class Expr_LogOfe; -class Expr_Sign; -class Expr_Sine; -class Expr_Sinh; -class Expr_Square; -class Expr_SquareRoot; -class Expr_Tangent; -class Expr_Tanh; -class Expr_UnaryFunction; -class Expr_UnaryMinus; -class Expr_BinaryExpression; -class Expr_BinaryFunction; -class Expr_Difference; -class Expr_Division; -class Expr_Exponentiate; -class Expr_PolyExpression; -class Expr_PolyFunction; -class Expr_Product; -class Expr_Sum; -class Expr_UnknownIterator; -class Expr_GeneralRelation; -class Expr_SingleRelation; -class Expr_Different; -class Expr_Equal; -class Expr_GreaterThan; -class Expr_GreaterThanOrEqual; -class Expr_LessThan; -class Expr_LessThanOrEqual; -class Expr_SystemRelation; -class Expr_RelationIterator; -class Expr_RUIterator; -class Expr_GeneralFunction; -class Expr_NamedFunction; -class Expr_FunctionDerivative; //! This package describes the data structure of any diff --git a/src/Expr/Expr_Absolute.hxx b/src/Expr/Expr_Absolute.hxx index c5fe991013..37e02d5ccb 100644 --- a/src/Expr/Expr_Absolute.hxx +++ b/src/Expr/Expr_Absolute.hxx @@ -25,8 +25,6 @@ #include #include #include -class Standard_NumericError; -class Expr_NotEvaluable; class Expr_GeneralExpression; class Expr_NamedUnknown; class TCollection_AsciiString; diff --git a/src/Expr/Expr_ArcCosine.hxx b/src/Expr/Expr_ArcCosine.hxx index ac1a9957c8..66eaa81ca3 100644 --- a/src/Expr/Expr_ArcCosine.hxx +++ b/src/Expr/Expr_ArcCosine.hxx @@ -25,8 +25,6 @@ #include #include #include -class Standard_NumericError; -class Expr_NotEvaluable; class Expr_GeneralExpression; class Expr_NamedUnknown; class TCollection_AsciiString; diff --git a/src/Expr/Expr_ArcSine.hxx b/src/Expr/Expr_ArcSine.hxx index 5ba779c8a6..2c561b647e 100644 --- a/src/Expr/Expr_ArcSine.hxx +++ b/src/Expr/Expr_ArcSine.hxx @@ -25,8 +25,6 @@ #include #include #include -class Standard_NumericError; -class Expr_NotEvaluable; class Expr_GeneralExpression; class Expr_NamedUnknown; class TCollection_AsciiString; diff --git a/src/Expr/Expr_ArcTangent.hxx b/src/Expr/Expr_ArcTangent.hxx index 2698cf4de5..b0e3ec33a2 100644 --- a/src/Expr/Expr_ArcTangent.hxx +++ b/src/Expr/Expr_ArcTangent.hxx @@ -25,8 +25,6 @@ #include #include #include -class Standard_NumericError; -class Expr_NotEvaluable; class Expr_GeneralExpression; class Expr_NamedUnknown; class TCollection_AsciiString; diff --git a/src/Expr/Expr_ArgCosh.hxx b/src/Expr/Expr_ArgCosh.hxx index adf346a92d..a2b8d76e1c 100644 --- a/src/Expr/Expr_ArgCosh.hxx +++ b/src/Expr/Expr_ArgCosh.hxx @@ -25,8 +25,6 @@ #include #include #include -class Standard_NumericError; -class Expr_NotEvaluable; class Expr_GeneralExpression; class Expr_NamedUnknown; class TCollection_AsciiString; diff --git a/src/Expr/Expr_ArgSinh.hxx b/src/Expr/Expr_ArgSinh.hxx index 18e6207bd5..f97b081a99 100644 --- a/src/Expr/Expr_ArgSinh.hxx +++ b/src/Expr/Expr_ArgSinh.hxx @@ -25,8 +25,6 @@ #include #include #include -class Standard_NumericError; -class Expr_NotEvaluable; class Expr_GeneralExpression; class Expr_NamedUnknown; class TCollection_AsciiString; diff --git a/src/Expr/Expr_ArgTanh.hxx b/src/Expr/Expr_ArgTanh.hxx index f5b01c963c..490f2245da 100644 --- a/src/Expr/Expr_ArgTanh.hxx +++ b/src/Expr/Expr_ArgTanh.hxx @@ -25,8 +25,6 @@ #include #include #include -class Standard_NumericError; -class Expr_NotEvaluable; class Expr_GeneralExpression; class Expr_NamedUnknown; class TCollection_AsciiString; diff --git a/src/Expr/Expr_BinaryExpression.hxx b/src/Expr/Expr_BinaryExpression.hxx index 504a7135e0..017065d84a 100644 --- a/src/Expr/Expr_BinaryExpression.hxx +++ b/src/Expr/Expr_BinaryExpression.hxx @@ -23,10 +23,6 @@ #include #include #include -class Expr_GeneralExpression; -class Standard_OutOfRange; -class Standard_NumericError; -class Expr_InvalidOperand; class Expr_NamedUnknown; diff --git a/src/Expr/Expr_BinaryFunction.hxx b/src/Expr/Expr_BinaryFunction.hxx index 13c8624e9d..32ebf062be 100644 --- a/src/Expr/Expr_BinaryFunction.hxx +++ b/src/Expr/Expr_BinaryFunction.hxx @@ -26,9 +26,6 @@ #include #include class Expr_GeneralFunction; -class Expr_InvalidFunction; -class Standard_NumericError; -class Expr_NotEvaluable; class Expr_GeneralExpression; class Expr_NamedUnknown; class TCollection_AsciiString; diff --git a/src/Expr/Expr_Cosh.hxx b/src/Expr/Expr_Cosh.hxx index 4f7533d39a..aa0413e01e 100644 --- a/src/Expr/Expr_Cosh.hxx +++ b/src/Expr/Expr_Cosh.hxx @@ -25,8 +25,6 @@ #include #include #include -class Standard_NumericError; -class Expr_NotEvaluable; class Expr_GeneralExpression; class Expr_NamedUnknown; class TCollection_AsciiString; diff --git a/src/Expr/Expr_Cosine.hxx b/src/Expr/Expr_Cosine.hxx index 7062d5a635..63b8166535 100644 --- a/src/Expr/Expr_Cosine.hxx +++ b/src/Expr/Expr_Cosine.hxx @@ -25,8 +25,6 @@ #include #include #include -class Standard_NumericError; -class Expr_NotEvaluable; class Expr_GeneralExpression; class Expr_NamedUnknown; class TCollection_AsciiString; diff --git a/src/Expr/Expr_Difference.hxx b/src/Expr/Expr_Difference.hxx index 36f2823245..527ce3c4ed 100644 --- a/src/Expr/Expr_Difference.hxx +++ b/src/Expr/Expr_Difference.hxx @@ -26,9 +26,6 @@ #include #include #include -class Standard_OutOfRange; -class Standard_NumericError; -class Expr_NotEvaluable; class Expr_GeneralExpression; class Expr_NamedUnknown; class TCollection_AsciiString; diff --git a/src/Expr/Expr_Different.hxx b/src/Expr/Expr_Different.hxx index 123360642c..cb27fb4bd3 100644 --- a/src/Expr/Expr_Different.hxx +++ b/src/Expr/Expr_Different.hxx @@ -22,7 +22,6 @@ #include #include -class Standard_NumericError; class Expr_GeneralExpression; class Expr_GeneralRelation; class TCollection_AsciiString; diff --git a/src/Expr/Expr_Division.hxx b/src/Expr/Expr_Division.hxx index 8c03f79aa4..3604bc6d29 100644 --- a/src/Expr/Expr_Division.hxx +++ b/src/Expr/Expr_Division.hxx @@ -25,8 +25,6 @@ #include #include #include -class Standard_NumericError; -class Expr_NotEvaluable; class Expr_GeneralExpression; class Expr_NamedUnknown; class TCollection_AsciiString; diff --git a/src/Expr/Expr_Equal.hxx b/src/Expr/Expr_Equal.hxx index 1e2cf416a6..42b7f14531 100644 --- a/src/Expr/Expr_Equal.hxx +++ b/src/Expr/Expr_Equal.hxx @@ -22,7 +22,6 @@ #include #include -class Standard_NumericError; class Expr_GeneralExpression; class Expr_GeneralRelation; class TCollection_AsciiString; diff --git a/src/Expr/Expr_Exponential.hxx b/src/Expr/Expr_Exponential.hxx index f5a93fa6c4..2011b2f9c8 100644 --- a/src/Expr/Expr_Exponential.hxx +++ b/src/Expr/Expr_Exponential.hxx @@ -25,8 +25,6 @@ #include #include #include -class Standard_NumericError; -class Expr_NotEvaluable; class Expr_GeneralExpression; class Expr_NamedUnknown; class TCollection_AsciiString; diff --git a/src/Expr/Expr_Exponentiate.hxx b/src/Expr/Expr_Exponentiate.hxx index 131e5e8f92..ae29b4d937 100644 --- a/src/Expr/Expr_Exponentiate.hxx +++ b/src/Expr/Expr_Exponentiate.hxx @@ -25,8 +25,6 @@ #include #include #include -class Standard_NumericError; -class Expr_NotEvaluable; class Expr_GeneralExpression; class Expr_NamedUnknown; class TCollection_AsciiString; diff --git a/src/Expr/Expr_FunctionDerivative.hxx b/src/Expr/Expr_FunctionDerivative.hxx index 795c1e8777..9aaeb76f73 100644 --- a/src/Expr/Expr_FunctionDerivative.hxx +++ b/src/Expr/Expr_FunctionDerivative.hxx @@ -26,14 +26,8 @@ #include #include #include -class Expr_GeneralFunction; class Expr_GeneralExpression; class Expr_NamedUnknown; -class Standard_OutOfRange; -class Standard_DimensionMismatch; -class Standard_NumericError; -class Expr_NotEvaluable; -class Expr_NamedFunction; class TCollection_AsciiString; diff --git a/src/Expr/Expr_GeneralExpression.hxx b/src/Expr/Expr_GeneralExpression.hxx index 44895d9ef6..6858a41544 100644 --- a/src/Expr/Expr_GeneralExpression.hxx +++ b/src/Expr/Expr_GeneralExpression.hxx @@ -26,10 +26,6 @@ #include #include #include -class Standard_OutOfRange; -class Standard_NumericError; -class Expr_NotEvaluable; -class Expr_InvalidOperand; class Expr_NamedUnknown; class TCollection_AsciiString; diff --git a/src/Expr/Expr_GeneralFunction.hxx b/src/Expr/Expr_GeneralFunction.hxx index 2bd2d9b917..3b662fe838 100644 --- a/src/Expr/Expr_GeneralFunction.hxx +++ b/src/Expr/Expr_GeneralFunction.hxx @@ -26,10 +26,6 @@ #include #include #include -class Standard_OutOfRange; -class Standard_DimensionMismatch; -class Standard_NumericError; -class Expr_NotEvaluable; class Expr_NamedUnknown; class TCollection_AsciiString; diff --git a/src/Expr/Expr_GeneralRelation.hxx b/src/Expr/Expr_GeneralRelation.hxx index d75b9d6277..401e437e33 100644 --- a/src/Expr/Expr_GeneralRelation.hxx +++ b/src/Expr/Expr_GeneralRelation.hxx @@ -23,8 +23,6 @@ #include #include #include -class Standard_OutOfRange; -class Standard_NumericError; class Expr_GeneralExpression; class Expr_NamedUnknown; class TCollection_AsciiString; diff --git a/src/Expr/Expr_GreaterThan.hxx b/src/Expr/Expr_GreaterThan.hxx index 740c404655..43b3caf87f 100644 --- a/src/Expr/Expr_GreaterThan.hxx +++ b/src/Expr/Expr_GreaterThan.hxx @@ -22,7 +22,6 @@ #include #include -class Standard_NumericError; class Expr_GeneralExpression; class Expr_GeneralRelation; class TCollection_AsciiString; diff --git a/src/Expr/Expr_GreaterThanOrEqual.hxx b/src/Expr/Expr_GreaterThanOrEqual.hxx index 7c53748e6d..7744899afa 100644 --- a/src/Expr/Expr_GreaterThanOrEqual.hxx +++ b/src/Expr/Expr_GreaterThanOrEqual.hxx @@ -22,7 +22,6 @@ #include #include -class Standard_NumericError; class Expr_GeneralExpression; class Expr_GeneralRelation; class TCollection_AsciiString; diff --git a/src/Expr/Expr_LessThan.hxx b/src/Expr/Expr_LessThan.hxx index 93163d7a13..1ec66e6f6e 100644 --- a/src/Expr/Expr_LessThan.hxx +++ b/src/Expr/Expr_LessThan.hxx @@ -22,7 +22,6 @@ #include #include -class Standard_NumericError; class Expr_GeneralExpression; class Expr_GeneralRelation; class TCollection_AsciiString; diff --git a/src/Expr/Expr_LessThanOrEqual.hxx b/src/Expr/Expr_LessThanOrEqual.hxx index 2222cb0e2a..40aefff65c 100644 --- a/src/Expr/Expr_LessThanOrEqual.hxx +++ b/src/Expr/Expr_LessThanOrEqual.hxx @@ -22,7 +22,6 @@ #include #include -class Standard_NumericError; class Expr_GeneralExpression; class Expr_GeneralRelation; class TCollection_AsciiString; diff --git a/src/Expr/Expr_LogOf10.hxx b/src/Expr/Expr_LogOf10.hxx index 6c4f4067c2..8c743890be 100644 --- a/src/Expr/Expr_LogOf10.hxx +++ b/src/Expr/Expr_LogOf10.hxx @@ -25,8 +25,6 @@ #include #include #include -class Standard_NumericError; -class Expr_NotEvaluable; class Expr_GeneralExpression; class Expr_NamedUnknown; class TCollection_AsciiString; diff --git a/src/Expr/Expr_LogOfe.hxx b/src/Expr/Expr_LogOfe.hxx index d581141f10..b98e18defd 100644 --- a/src/Expr/Expr_LogOfe.hxx +++ b/src/Expr/Expr_LogOfe.hxx @@ -25,8 +25,6 @@ #include #include #include -class Standard_NumericError; -class Expr_NotEvaluable; class Expr_GeneralExpression; class Expr_NamedUnknown; class TCollection_AsciiString; diff --git a/src/Expr/Expr_NamedConstant.hxx b/src/Expr/Expr_NamedConstant.hxx index 53d44c92ba..f3d32a87cc 100644 --- a/src/Expr/Expr_NamedConstant.hxx +++ b/src/Expr/Expr_NamedConstant.hxx @@ -26,7 +26,6 @@ #include #include #include -class Standard_OutOfRange; class TCollection_AsciiString; class Expr_GeneralExpression; class Expr_NamedUnknown; diff --git a/src/Expr/Expr_NamedExpression.hxx b/src/Expr/Expr_NamedExpression.hxx index f94b724d57..b6beb67f03 100644 --- a/src/Expr/Expr_NamedExpression.hxx +++ b/src/Expr/Expr_NamedExpression.hxx @@ -23,8 +23,6 @@ #include #include #include -class TCollection_AsciiString; -class Expr_GeneralExpression; class Expr_NamedExpression; diff --git a/src/Expr/Expr_NamedFunction.hxx b/src/Expr/Expr_NamedFunction.hxx index ef0be055a4..9c5090ec74 100644 --- a/src/Expr/Expr_NamedFunction.hxx +++ b/src/Expr/Expr_NamedFunction.hxx @@ -28,13 +28,7 @@ #include #include class Expr_GeneralExpression; -class Standard_OutOfRange; -class Standard_DimensionMismatch; -class Standard_NumericError; -class Expr_NotEvaluable; -class TCollection_AsciiString; class Expr_NamedUnknown; -class Expr_GeneralFunction; class Expr_NamedFunction; diff --git a/src/Expr/Expr_NamedUnknown.hxx b/src/Expr/Expr_NamedUnknown.hxx index 78e656cd0a..b112b24e53 100644 --- a/src/Expr/Expr_NamedUnknown.hxx +++ b/src/Expr/Expr_NamedUnknown.hxx @@ -27,12 +27,6 @@ #include #include class Expr_GeneralExpression; -class Expr_NotAssigned; -class Standard_OutOfRange; -class Standard_NumericError; -class Expr_InvalidAssignment; -class Expr_InvalidOperand; -class Expr_NotEvaluable; class TCollection_AsciiString; diff --git a/src/Expr/Expr_NumericValue.hxx b/src/Expr/Expr_NumericValue.hxx index 2d9b4dfbca..fc987494ab 100644 --- a/src/Expr/Expr_NumericValue.hxx +++ b/src/Expr/Expr_NumericValue.hxx @@ -26,8 +26,6 @@ #include #include #include -class Standard_OutOfRange; -class Expr_GeneralExpression; class Expr_NamedUnknown; class TCollection_AsciiString; diff --git a/src/Expr/Expr_PolyExpression.hxx b/src/Expr/Expr_PolyExpression.hxx index cb70f40c1d..faeb02ce42 100644 --- a/src/Expr/Expr_PolyExpression.hxx +++ b/src/Expr/Expr_PolyExpression.hxx @@ -24,10 +24,6 @@ #include #include #include -class Standard_OutOfRange; -class Standard_NumericError; -class Expr_InvalidOperand; -class Expr_GeneralExpression; class Expr_NamedUnknown; diff --git a/src/Expr/Expr_PolyFunction.hxx b/src/Expr/Expr_PolyFunction.hxx index 98d24a8f10..294c43168c 100644 --- a/src/Expr/Expr_PolyFunction.hxx +++ b/src/Expr/Expr_PolyFunction.hxx @@ -27,9 +27,6 @@ #include #include class Expr_GeneralFunction; -class Standard_NumericError; -class Standard_OutOfRange; -class Expr_NotEvaluable; class Expr_GeneralExpression; class Expr_NamedUnknown; class TCollection_AsciiString; diff --git a/src/Expr/Expr_Product.hxx b/src/Expr/Expr_Product.hxx index c459f8d0c0..fea3645e4f 100644 --- a/src/Expr/Expr_Product.hxx +++ b/src/Expr/Expr_Product.hxx @@ -26,8 +26,6 @@ #include #include #include -class Standard_NumericError; -class Expr_NotEvaluable; class Expr_GeneralExpression; class Expr_NamedUnknown; class TCollection_AsciiString; diff --git a/src/Expr/Expr_RUIterator.hxx b/src/Expr/Expr_RUIterator.hxx index a3c2bdc3b5..def5eb7663 100644 --- a/src/Expr/Expr_RUIterator.hxx +++ b/src/Expr/Expr_RUIterator.hxx @@ -24,8 +24,6 @@ #include #include #include -class Standard_NoMoreObject; -class Standard_NoSuchObject; class Expr_GeneralRelation; class Expr_NamedUnknown; diff --git a/src/Expr/Expr_RelationIterator.hxx b/src/Expr/Expr_RelationIterator.hxx index 17b8e8ec90..b9ab256443 100644 --- a/src/Expr/Expr_RelationIterator.hxx +++ b/src/Expr/Expr_RelationIterator.hxx @@ -24,8 +24,6 @@ #include #include #include -class Standard_NoMoreObject; -class Standard_NoSuchObject; class Expr_GeneralRelation; class Expr_SingleRelation; diff --git a/src/Expr/Expr_Sign.hxx b/src/Expr/Expr_Sign.hxx index 378619a2a6..4e7bec12ff 100644 --- a/src/Expr/Expr_Sign.hxx +++ b/src/Expr/Expr_Sign.hxx @@ -25,8 +25,6 @@ #include #include #include -class Standard_NumericError; -class Expr_NotEvaluable; class Expr_GeneralExpression; class Expr_NamedUnknown; class TCollection_AsciiString; diff --git a/src/Expr/Expr_Sine.hxx b/src/Expr/Expr_Sine.hxx index 99e913ee7e..9d8dbe040a 100644 --- a/src/Expr/Expr_Sine.hxx +++ b/src/Expr/Expr_Sine.hxx @@ -25,8 +25,6 @@ #include #include #include -class Standard_NumericError; -class Expr_NotEvaluable; class Expr_GeneralExpression; class Expr_NamedUnknown; class TCollection_AsciiString; diff --git a/src/Expr/Expr_SingleRelation.hxx b/src/Expr/Expr_SingleRelation.hxx index 4a4147fd5f..4bd31cdf30 100644 --- a/src/Expr/Expr_SingleRelation.hxx +++ b/src/Expr/Expr_SingleRelation.hxx @@ -24,8 +24,6 @@ #include #include class Expr_GeneralExpression; -class Standard_OutOfRange; -class Expr_GeneralRelation; class Expr_NamedUnknown; diff --git a/src/Expr/Expr_Sinh.hxx b/src/Expr/Expr_Sinh.hxx index 62605d0cb7..b7ee9a4326 100644 --- a/src/Expr/Expr_Sinh.hxx +++ b/src/Expr/Expr_Sinh.hxx @@ -25,8 +25,6 @@ #include #include #include -class Standard_NumericError; -class Expr_NotEvaluable; class Expr_GeneralExpression; class Expr_NamedUnknown; class TCollection_AsciiString; diff --git a/src/Expr/Expr_Square.hxx b/src/Expr/Expr_Square.hxx index e8140110f5..eedd5d1ea0 100644 --- a/src/Expr/Expr_Square.hxx +++ b/src/Expr/Expr_Square.hxx @@ -25,8 +25,6 @@ #include #include #include -class Standard_NumericError; -class Expr_NotEvaluable; class Expr_GeneralExpression; class Expr_NamedUnknown; class TCollection_AsciiString; diff --git a/src/Expr/Expr_SquareRoot.hxx b/src/Expr/Expr_SquareRoot.hxx index 8883d9d899..6c3ad7f613 100644 --- a/src/Expr/Expr_SquareRoot.hxx +++ b/src/Expr/Expr_SquareRoot.hxx @@ -25,8 +25,6 @@ #include #include #include -class Standard_NumericError; -class Expr_NotEvaluable; class Expr_GeneralExpression; class Expr_NamedUnknown; class TCollection_AsciiString; diff --git a/src/Expr/Expr_Sum.hxx b/src/Expr/Expr_Sum.hxx index 4d793dcc0a..51f383d8f0 100644 --- a/src/Expr/Expr_Sum.hxx +++ b/src/Expr/Expr_Sum.hxx @@ -27,9 +27,6 @@ #include #include #include -class Standard_OutOfRange; -class Standard_NumericError; -class Expr_NotEvaluable; class Expr_GeneralExpression; class Expr_NamedUnknown; class TCollection_AsciiString; diff --git a/src/Expr/Expr_SystemRelation.hxx b/src/Expr/Expr_SystemRelation.hxx index f8d5055308..90e344d817 100644 --- a/src/Expr/Expr_SystemRelation.hxx +++ b/src/Expr/Expr_SystemRelation.hxx @@ -24,11 +24,6 @@ #include #include #include -class Standard_OutOfRange; -class Standard_NoSuchObject; -class Standard_DimensionMismatch; -class Standard_NumericError; -class Expr_GeneralRelation; class Expr_GeneralExpression; class Expr_NamedUnknown; class TCollection_AsciiString; diff --git a/src/Expr/Expr_Tangent.hxx b/src/Expr/Expr_Tangent.hxx index 665c8ca7a3..1aaae6933f 100644 --- a/src/Expr/Expr_Tangent.hxx +++ b/src/Expr/Expr_Tangent.hxx @@ -25,8 +25,6 @@ #include #include #include -class Standard_NumericError; -class Expr_NotEvaluable; class Expr_GeneralExpression; class Expr_NamedUnknown; class TCollection_AsciiString; diff --git a/src/Expr/Expr_Tanh.hxx b/src/Expr/Expr_Tanh.hxx index f0399d12e9..d4a41db63b 100644 --- a/src/Expr/Expr_Tanh.hxx +++ b/src/Expr/Expr_Tanh.hxx @@ -25,8 +25,6 @@ #include #include #include -class Standard_NumericError; -class Expr_NotEvaluable; class Expr_GeneralExpression; class Expr_NamedUnknown; class TCollection_AsciiString; diff --git a/src/Expr/Expr_UnaryExpression.hxx b/src/Expr/Expr_UnaryExpression.hxx index 0fd9796712..80aa97dd22 100644 --- a/src/Expr/Expr_UnaryExpression.hxx +++ b/src/Expr/Expr_UnaryExpression.hxx @@ -23,10 +23,6 @@ #include #include #include -class Expr_GeneralExpression; -class Standard_OutOfRange; -class Standard_NumericError; -class Expr_InvalidOperand; class Expr_NamedUnknown; diff --git a/src/Expr/Expr_UnaryFunction.hxx b/src/Expr/Expr_UnaryFunction.hxx index 031aafd820..9a310f7b43 100644 --- a/src/Expr/Expr_UnaryFunction.hxx +++ b/src/Expr/Expr_UnaryFunction.hxx @@ -26,9 +26,6 @@ #include #include class Expr_GeneralFunction; -class Expr_InvalidFunction; -class Standard_NumericError; -class Expr_NotEvaluable; class Expr_GeneralExpression; class Expr_NamedUnknown; class TCollection_AsciiString; diff --git a/src/Expr/Expr_UnaryMinus.hxx b/src/Expr/Expr_UnaryMinus.hxx index 0c07732585..f00155169e 100644 --- a/src/Expr/Expr_UnaryMinus.hxx +++ b/src/Expr/Expr_UnaryMinus.hxx @@ -26,9 +26,6 @@ #include #include #include -class Standard_NumericError; -class Standard_OutOfRange; -class Expr_NotEvaluable; class Expr_GeneralExpression; class Expr_NamedUnknown; class TCollection_AsciiString; diff --git a/src/Expr/Expr_UnknownIterator.hxx b/src/Expr/Expr_UnknownIterator.hxx index 4f5c370573..b08b230874 100644 --- a/src/Expr/Expr_UnknownIterator.hxx +++ b/src/Expr/Expr_UnknownIterator.hxx @@ -24,8 +24,6 @@ #include #include #include -class Standard_NoMoreObject; -class Standard_NoSuchObject; class Expr_GeneralExpression; class Expr_NamedUnknown; diff --git a/src/ExprIntrp/ExprIntrp.hxx b/src/ExprIntrp/ExprIntrp.hxx index efd7588543..f5244142f7 100644 --- a/src/ExprIntrp/ExprIntrp.hxx +++ b/src/ExprIntrp/ExprIntrp.hxx @@ -24,11 +24,6 @@ #include class ExprIntrp_Generator; class TCollection_AsciiString; -class ExprIntrp_Generator; -class ExprIntrp_GenExp; -class ExprIntrp_GenFct; -class ExprIntrp_GenRel; -class ExprIntrp_Analysis; //! Describes an interpreter for GeneralExpressions, diff --git a/src/ExprIntrp/ExprIntrp_GenExp.hxx b/src/ExprIntrp/ExprIntrp_GenExp.hxx index fc71d36736..55fa21345c 100644 --- a/src/ExprIntrp/ExprIntrp_GenExp.hxx +++ b/src/ExprIntrp/ExprIntrp_GenExp.hxx @@ -23,7 +23,6 @@ #include #include class Expr_GeneralExpression; -class Standard_NoSuchObject; class TCollection_AsciiString; diff --git a/src/ExprIntrp/ExprIntrp_GenFct.hxx b/src/ExprIntrp/ExprIntrp_GenFct.hxx index 358fabd8ea..b8c134a51f 100644 --- a/src/ExprIntrp/ExprIntrp_GenFct.hxx +++ b/src/ExprIntrp/ExprIntrp_GenFct.hxx @@ -22,7 +22,6 @@ #include #include -class Standard_NoSuchObject; class TCollection_AsciiString; diff --git a/src/ExprIntrp/ExprIntrp_GenRel.hxx b/src/ExprIntrp/ExprIntrp_GenRel.hxx index efe7bb62ef..8c27cd42e2 100644 --- a/src/ExprIntrp/ExprIntrp_GenRel.hxx +++ b/src/ExprIntrp/ExprIntrp_GenRel.hxx @@ -23,7 +23,6 @@ #include #include class Expr_GeneralRelation; -class Standard_NoSuchObject; class TCollection_AsciiString; diff --git a/src/Extrema/Extrema_ExtCC.hxx b/src/Extrema/Extrema_ExtCC.hxx index 0a8ff0228a..25877615bd 100644 --- a/src/Extrema/Extrema_ExtCC.hxx +++ b/src/Extrema/Extrema_ExtCC.hxx @@ -32,9 +32,7 @@ class Adaptor3d_Curve; class Extrema_POnCurv; -class gp_Pnt; class Extrema_ExtElC; -class Extrema_ECC; //! It calculates all the distance between two curves. diff --git a/src/Extrema/Extrema_ExtCC2d.hxx b/src/Extrema/Extrema_ExtCC2d.hxx index b41eaa5ba2..4a721ca8d0 100644 --- a/src/Extrema/Extrema_ExtCC2d.hxx +++ b/src/Extrema/Extrema_ExtCC2d.hxx @@ -31,7 +31,6 @@ class Adaptor2d_Curve2d; class Extrema_POnCurv2d; -class gp_Pnt2d; class Extrema_ExtElC2d; class Extrema_ECC2d; diff --git a/src/Extrema/Extrema_ExtElC.hxx b/src/Extrema/Extrema_ExtElC.hxx index 8c35429a5b..6c88f903be 100644 --- a/src/Extrema/Extrema_ExtElC.hxx +++ b/src/Extrema/Extrema_ExtElC.hxx @@ -31,7 +31,6 @@ class gp_Circ; class gp_Elips; class gp_Hypr; class gp_Parab; -class Extrema_POnCurv; //! It calculates all the distance between two elementary diff --git a/src/Extrema/Extrema_ExtElC2d.hxx b/src/Extrema/Extrema_ExtElC2d.hxx index d7b064ac08..4baf51d0ea 100644 --- a/src/Extrema/Extrema_ExtElC2d.hxx +++ b/src/Extrema/Extrema_ExtElC2d.hxx @@ -31,7 +31,6 @@ class gp_Circ2d; class gp_Elips2d; class gp_Hypr2d; class gp_Parab2d; -class Extrema_POnCurv2d; //! It calculates all the distance between two elementary diff --git a/src/Extrema/Extrema_ExtPElC.hxx b/src/Extrema/Extrema_ExtPElC.hxx index 19f2819160..7379d58282 100644 --- a/src/Extrema/Extrema_ExtPElC.hxx +++ b/src/Extrema/Extrema_ExtPElC.hxx @@ -25,15 +25,12 @@ #include #include #include -class StdFail_NotDone; -class Standard_OutOfRange; class gp_Pnt; class gp_Lin; class gp_Circ; class gp_Elips; class gp_Hypr; class gp_Parab; -class Extrema_POnCurv; //! It calculates all the distances between a point diff --git a/src/Extrema/Extrema_ExtPElC2d.hxx b/src/Extrema/Extrema_ExtPElC2d.hxx index 79cdc01a6b..dea8be5a2d 100644 --- a/src/Extrema/Extrema_ExtPElC2d.hxx +++ b/src/Extrema/Extrema_ExtPElC2d.hxx @@ -25,15 +25,12 @@ #include #include #include -class StdFail_NotDone; -class Standard_OutOfRange; class gp_Pnt2d; class gp_Lin2d; class gp_Circ2d; class gp_Elips2d; class gp_Hypr2d; class gp_Parab2d; -class Extrema_POnCurv2d; //! It calculates all the distances between a point diff --git a/src/Extrema/Extrema_ExtPElS.hxx b/src/Extrema/Extrema_ExtPElS.hxx index 188ab18048..ec00924a51 100644 --- a/src/Extrema/Extrema_ExtPElS.hxx +++ b/src/Extrema/Extrema_ExtPElS.hxx @@ -25,15 +25,12 @@ #include #include #include -class StdFail_NotDone; -class Standard_OutOfRange; class gp_Pnt; class gp_Cylinder; class gp_Pln; class gp_Cone; class gp_Torus; class gp_Sphere; -class Extrema_POnSurf; //! It calculates all the extremum distances diff --git a/src/Extrema/Extrema_ExtPS.hxx b/src/Extrema/Extrema_ExtPS.hxx index e207b95742..a149355dee 100644 --- a/src/Extrema/Extrema_ExtPS.hxx +++ b/src/Extrema/Extrema_ExtPS.hxx @@ -33,10 +33,6 @@ #include class Extrema_ExtPExtS; class Extrema_ExtPRevS; -class StdFail_NotDone; -class Standard_OutOfRange; -class Standard_TypeMismatch; -class gp_Pnt; class Adaptor3d_Surface; class Extrema_POnSurf; diff --git a/src/Extrema/Extrema_ExtSS.hxx b/src/Extrema/Extrema_ExtSS.hxx index da4785d671..b26bbcd865 100644 --- a/src/Extrema/Extrema_ExtSS.hxx +++ b/src/Extrema/Extrema_ExtSS.hxx @@ -27,9 +27,6 @@ #include #include #include -class StdFail_NotDone; -class Standard_OutOfRange; -class Standard_TypeMismatch; class Adaptor3d_Surface; class Extrema_POnSurf; diff --git a/src/Extrema/Extrema_FuncExtCS.hxx b/src/Extrema/Extrema_FuncExtCS.hxx index a97462df13..c94d729fd7 100644 --- a/src/Extrema/Extrema_FuncExtCS.hxx +++ b/src/Extrema/Extrema_FuncExtCS.hxx @@ -30,7 +30,6 @@ #include #include #include -class Standard_OutOfRange; class Adaptor3d_Curve; class Adaptor3d_Surface; class math_Matrix; diff --git a/src/Extrema/Extrema_FuncExtSS.hxx b/src/Extrema/Extrema_FuncExtSS.hxx index a432b3758c..587825ce4e 100644 --- a/src/Extrema/Extrema_FuncExtSS.hxx +++ b/src/Extrema/Extrema_FuncExtSS.hxx @@ -29,7 +29,6 @@ #include #include #include -class Standard_OutOfRange; class Adaptor3d_Surface; class math_Matrix; class Extrema_POnSurf; diff --git a/src/Extrema/Extrema_GenLocateExtCS.hxx b/src/Extrema/Extrema_GenLocateExtCS.hxx index 9f15955601..b3fbefbc92 100644 --- a/src/Extrema/Extrema_GenLocateExtCS.hxx +++ b/src/Extrema/Extrema_GenLocateExtCS.hxx @@ -25,12 +25,8 @@ #include #include #include -class Standard_DomainError; -class StdFail_NotDone; class Adaptor3d_Curve; class Adaptor3d_Surface; -class Extrema_POnCurv; -class Extrema_POnSurf; //! With two close points it calculates the distance diff --git a/src/Extrema/Extrema_GenLocateExtPS.hxx b/src/Extrema/Extrema_GenLocateExtPS.hxx index de0046a866..68af4751f8 100644 --- a/src/Extrema/Extrema_GenLocateExtPS.hxx +++ b/src/Extrema/Extrema_GenLocateExtPS.hxx @@ -23,11 +23,8 @@ #include #include #include -class Standard_DomainError; -class StdFail_NotDone; class gp_Pnt; class Adaptor3d_Surface; -class Extrema_POnSurf; //! With a close point, it calculates the distance diff --git a/src/Extrema/Extrema_GenLocateExtSS.hxx b/src/Extrema/Extrema_GenLocateExtSS.hxx index da45d81869..d757193b7f 100644 --- a/src/Extrema/Extrema_GenLocateExtSS.hxx +++ b/src/Extrema/Extrema_GenLocateExtSS.hxx @@ -24,10 +24,7 @@ #include #include #include -class Standard_DomainError; -class StdFail_NotDone; class Adaptor3d_Surface; -class Extrema_POnSurf; //! With two close points it calculates the distance diff --git a/src/Extrema/Extrema_LocateExtCC.hxx b/src/Extrema/Extrema_LocateExtCC.hxx index 8dc46b260a..f9e1a953eb 100644 --- a/src/Extrema/Extrema_LocateExtCC.hxx +++ b/src/Extrema/Extrema_LocateExtCC.hxx @@ -24,10 +24,7 @@ #include #include #include -class Standard_DomainError; -class StdFail_NotDone; class Adaptor3d_Curve; -class Extrema_POnCurv; //! It calculates the distance between two curves with diff --git a/src/Extrema/Extrema_LocateExtCC2d.hxx b/src/Extrema/Extrema_LocateExtCC2d.hxx index 13df143e07..52e6cae3f5 100644 --- a/src/Extrema/Extrema_LocateExtCC2d.hxx +++ b/src/Extrema/Extrema_LocateExtCC2d.hxx @@ -24,10 +24,7 @@ #include #include #include -class Standard_DomainError; -class StdFail_NotDone; class Adaptor2d_Curve2d; -class Extrema_POnCurv2d; //! It calculates the distance between two curves with diff --git a/src/FEmTool/FEmTool_Assembly.hxx b/src/FEmTool/FEmTool_Assembly.hxx index 611fbeaeab..4b995700ad 100644 --- a/src/FEmTool/FEmTool_Assembly.hxx +++ b/src/FEmTool/FEmTool_Assembly.hxx @@ -30,9 +30,6 @@ #include #include class FEmTool_ProfileMatrix; -class StdFail_NotDone; -class Standard_DimensionError; -class Standard_DomainError; class math_Matrix; diff --git a/src/FEmTool/FEmTool_Curve.hxx b/src/FEmTool/FEmTool_Curve.hxx index 3aef0161ce..ae2e8b50d7 100644 --- a/src/FEmTool/FEmTool_Curve.hxx +++ b/src/FEmTool/FEmTool_Curve.hxx @@ -28,7 +28,6 @@ #include #include class PLib_Base; -class Standard_DimensionError; class FEmTool_Curve; diff --git a/src/FEmTool/FEmTool_ElementaryCriterion.hxx b/src/FEmTool/FEmTool_ElementaryCriterion.hxx index afad005b47..84dac329ee 100644 --- a/src/FEmTool/FEmTool_ElementaryCriterion.hxx +++ b/src/FEmTool/FEmTool_ElementaryCriterion.hxx @@ -26,8 +26,6 @@ #include #include #include -class Standard_NotImplemented; -class Standard_DomainError; class math_Matrix; diff --git a/src/FEmTool/FEmTool_ElementsOfRefMatrix.hxx b/src/FEmTool/FEmTool_ElementsOfRefMatrix.hxx index d8fd2941fd..1c2ffb36a3 100644 --- a/src/FEmTool/FEmTool_ElementsOfRefMatrix.hxx +++ b/src/FEmTool/FEmTool_ElementsOfRefMatrix.hxx @@ -26,7 +26,6 @@ #include #include class PLib_Base; -class Standard_ConstructionError; //! this class describes the functions needed for diff --git a/src/FEmTool/FEmTool_LinearFlexion.hxx b/src/FEmTool/FEmTool_LinearFlexion.hxx index 7f5a4a01e0..2d75d5aee3 100644 --- a/src/FEmTool/FEmTool_LinearFlexion.hxx +++ b/src/FEmTool/FEmTool_LinearFlexion.hxx @@ -27,9 +27,6 @@ #include #include #include -class Standard_NotImplemented; -class Standard_DomainError; -class math_Matrix; class FEmTool_LinearFlexion; diff --git a/src/FEmTool/FEmTool_LinearJerk.hxx b/src/FEmTool/FEmTool_LinearJerk.hxx index ffc487cf29..f169800d1e 100644 --- a/src/FEmTool/FEmTool_LinearJerk.hxx +++ b/src/FEmTool/FEmTool_LinearJerk.hxx @@ -27,9 +27,6 @@ #include #include #include -class Standard_NotImplemented; -class Standard_DomainError; -class math_Matrix; class FEmTool_LinearJerk; diff --git a/src/FEmTool/FEmTool_LinearTension.hxx b/src/FEmTool/FEmTool_LinearTension.hxx index 7b64168785..04f4ac1529 100644 --- a/src/FEmTool/FEmTool_LinearTension.hxx +++ b/src/FEmTool/FEmTool_LinearTension.hxx @@ -27,9 +27,6 @@ #include #include #include -class Standard_NotImplemented; -class Standard_DomainError; -class math_Matrix; class FEmTool_LinearTension; diff --git a/src/FEmTool/FEmTool_ProfileMatrix.hxx b/src/FEmTool/FEmTool_ProfileMatrix.hxx index 6ab2cbb6d2..0ebb45b79e 100644 --- a/src/FEmTool/FEmTool_ProfileMatrix.hxx +++ b/src/FEmTool/FEmTool_ProfileMatrix.hxx @@ -29,9 +29,6 @@ #include #include #include -class StdFail_NotDone; -class Standard_NotImplemented; -class Standard_OutOfRange; class FEmTool_ProfileMatrix; diff --git a/src/FEmTool/FEmTool_SparseMatrix.hxx b/src/FEmTool/FEmTool_SparseMatrix.hxx index 1c87ab3325..0d87e3acc2 100644 --- a/src/FEmTool/FEmTool_SparseMatrix.hxx +++ b/src/FEmTool/FEmTool_SparseMatrix.hxx @@ -25,7 +25,6 @@ #include #include #include -class StdFail_NotDone; class FEmTool_SparseMatrix; diff --git a/src/FSD/FSD_BinaryFile.hxx b/src/FSD/FSD_BinaryFile.hxx index 564734a615..0d859369a8 100644 --- a/src/FSD/FSD_BinaryFile.hxx +++ b/src/FSD/FSD_BinaryFile.hxx @@ -29,10 +29,6 @@ #include #include -class Storage_StreamTypeMismatchError; -class Storage_StreamFormatError; -class Storage_StreamWriteError; -class Storage_StreamExtCharParityError; class TCollection_AsciiString; class TCollection_ExtendedString; class Storage_HeaderData; diff --git a/src/FSD/FSD_CmpFile.hxx b/src/FSD/FSD_CmpFile.hxx index 5576850328..4bdc87fcdf 100644 --- a/src/FSD/FSD_CmpFile.hxx +++ b/src/FSD/FSD_CmpFile.hxx @@ -24,7 +24,6 @@ class TCollection_AsciiString; class TCollection_ExtendedString; -class Storage_BaseDriver; DEFINE_STANDARD_HANDLE(FSD_CmpFile,FSD_File) diff --git a/src/FSD/FSD_File.hxx b/src/FSD/FSD_File.hxx index f50b32660e..44e10afaec 100644 --- a/src/FSD/FSD_File.hxx +++ b/src/FSD/FSD_File.hxx @@ -20,13 +20,8 @@ #include #include -class Storage_StreamTypeMismatchError; -class Storage_StreamFormatError; -class Storage_StreamWriteError; -class Storage_StreamExtCharParityError; class TCollection_AsciiString; class TCollection_ExtendedString; -class Storage_BaseDriver; DEFINE_STANDARD_HANDLE(FSD_File,Storage_BaseDriver) diff --git a/src/FairCurve/FairCurve_Batten.hxx b/src/FairCurve/FairCurve_Batten.hxx index c873073d29..df8a53dda5 100644 --- a/src/FairCurve/FairCurve_Batten.hxx +++ b/src/FairCurve/FairCurve_Batten.hxx @@ -30,9 +30,6 @@ #include #include #include -class Standard_NegativeValue; -class Standard_NullValue; -class gp_Pnt2d; class gp_Vec2d; class Geom2d_BSplineCurve; diff --git a/src/FairCurve/FairCurve_DistributionOfJerk.hxx b/src/FairCurve/FairCurve_DistributionOfJerk.hxx index dd89373249..448ca36465 100644 --- a/src/FairCurve/FairCurve_DistributionOfJerk.hxx +++ b/src/FairCurve/FairCurve_DistributionOfJerk.hxx @@ -28,7 +28,6 @@ #include #include #include -class FairCurve_BattenLaw; //! Compute the "Jerk" distribution. diff --git a/src/FairCurve/FairCurve_DistributionOfSagging.hxx b/src/FairCurve/FairCurve_DistributionOfSagging.hxx index 70c4b7267a..a379fc12f6 100644 --- a/src/FairCurve/FairCurve_DistributionOfSagging.hxx +++ b/src/FairCurve/FairCurve_DistributionOfSagging.hxx @@ -28,7 +28,6 @@ #include #include #include -class FairCurve_BattenLaw; //! Compute the Sagging Distribution diff --git a/src/FairCurve/FairCurve_DistributionOfTension.hxx b/src/FairCurve/FairCurve_DistributionOfTension.hxx index 7d50c4ec7a..b57e8be6c2 100644 --- a/src/FairCurve/FairCurve_DistributionOfTension.hxx +++ b/src/FairCurve/FairCurve_DistributionOfTension.hxx @@ -29,7 +29,6 @@ #include #include #include -class FairCurve_BattenLaw; //! Compute the Tension Distribution diff --git a/src/FairCurve/FairCurve_MinimalVariation.hxx b/src/FairCurve/FairCurve_MinimalVariation.hxx index 03f98eb6ed..40f9b8cc64 100644 --- a/src/FairCurve/FairCurve_MinimalVariation.hxx +++ b/src/FairCurve/FairCurve_MinimalVariation.hxx @@ -27,9 +27,6 @@ #include #include #include -class Standard_NegativeValue; -class Standard_NullValue; -class Standard_DomainError; class gp_Pnt2d; class gp_Vec2d; diff --git a/src/FilletSurf/FilletSurf_Builder.hxx b/src/FilletSurf/FilletSurf_Builder.hxx index 20799a47da..22a0ccc93d 100644 --- a/src/FilletSurf/FilletSurf_Builder.hxx +++ b/src/FilletSurf/FilletSurf_Builder.hxx @@ -28,8 +28,6 @@ #include #include #include -class StdFail_NotDone; -class Standard_OutOfRange; class TopoDS_Shape; class Geom_Surface; class TopoDS_Face; diff --git a/src/Font/Font_FontMgr.hxx b/src/Font/Font_FontMgr.hxx index dc53819e77..6d78fd6635 100644 --- a/src/Font/Font_FontMgr.hxx +++ b/src/Font/Font_FontMgr.hxx @@ -28,7 +28,6 @@ #include #include -class Font_SystemFont; class TCollection_HAsciiString; class NCollection_Buffer; diff --git a/src/GC/GC_MakeArcOfEllipse.hxx b/src/GC/GC_MakeArcOfEllipse.hxx index e9e93e76aa..2f21c8e2ba 100644 --- a/src/GC/GC_MakeArcOfEllipse.hxx +++ b/src/GC/GC_MakeArcOfEllipse.hxx @@ -24,7 +24,6 @@ #include #include -class StdFail_NotDone; class gp_Elips; class gp_Pnt; diff --git a/src/GC/GC_MakeArcOfHyperbola.hxx b/src/GC/GC_MakeArcOfHyperbola.hxx index 0eca295811..ac064453b4 100644 --- a/src/GC/GC_MakeArcOfHyperbola.hxx +++ b/src/GC/GC_MakeArcOfHyperbola.hxx @@ -24,7 +24,6 @@ #include #include -class StdFail_NotDone; class gp_Hypr; class gp_Pnt; diff --git a/src/GC/GC_MakeArcOfParabola.hxx b/src/GC/GC_MakeArcOfParabola.hxx index b4d0bb50d6..b4ce9fa902 100644 --- a/src/GC/GC_MakeArcOfParabola.hxx +++ b/src/GC/GC_MakeArcOfParabola.hxx @@ -24,7 +24,6 @@ #include #include -class StdFail_NotDone; class gp_Parab; class gp_Pnt; diff --git a/src/GC/GC_MakeCircle.hxx b/src/GC/GC_MakeCircle.hxx index 71419995af..77c08be2d1 100644 --- a/src/GC/GC_MakeCircle.hxx +++ b/src/GC/GC_MakeCircle.hxx @@ -24,7 +24,6 @@ #include #include -class StdFail_NotDone; class gp_Circ; class gp_Ax2; class gp_Pnt; diff --git a/src/GC/GC_MakeConicalSurface.hxx b/src/GC/GC_MakeConicalSurface.hxx index b028c20627..5d7775b172 100644 --- a/src/GC/GC_MakeConicalSurface.hxx +++ b/src/GC/GC_MakeConicalSurface.hxx @@ -24,12 +24,9 @@ #include #include -class StdFail_NotDone; class gp_Ax2; class gp_Cone; class gp_Pnt; -class gp_Ax1; -class gp_Lin; //! This class implements the following algorithms used diff --git a/src/GC/GC_MakeCylindricalSurface.hxx b/src/GC/GC_MakeCylindricalSurface.hxx index a29e75e60d..0ec8591b44 100644 --- a/src/GC/GC_MakeCylindricalSurface.hxx +++ b/src/GC/GC_MakeCylindricalSurface.hxx @@ -24,7 +24,6 @@ #include #include -class StdFail_NotDone; class gp_Ax2; class gp_Cylinder; class gp_Pnt; diff --git a/src/GC/GC_MakeEllipse.hxx b/src/GC/GC_MakeEllipse.hxx index 48c56985ec..0503ddcce7 100644 --- a/src/GC/GC_MakeEllipse.hxx +++ b/src/GC/GC_MakeEllipse.hxx @@ -24,7 +24,6 @@ #include #include -class StdFail_NotDone; class gp_Elips; class gp_Ax2; class gp_Pnt; diff --git a/src/GC/GC_MakeHyperbola.hxx b/src/GC/GC_MakeHyperbola.hxx index 7c0f8e2d7b..6cd5493c42 100644 --- a/src/GC/GC_MakeHyperbola.hxx +++ b/src/GC/GC_MakeHyperbola.hxx @@ -24,7 +24,6 @@ #include #include -class StdFail_NotDone; class gp_Hypr; class gp_Ax2; class gp_Pnt; diff --git a/src/GC/GC_MakeLine.hxx b/src/GC/GC_MakeLine.hxx index 44bd5b0190..2072a4abff 100644 --- a/src/GC/GC_MakeLine.hxx +++ b/src/GC/GC_MakeLine.hxx @@ -24,7 +24,6 @@ #include #include -class StdFail_NotDone; class gp_Ax1; class gp_Lin; class gp_Pnt; diff --git a/src/GC/GC_MakePlane.hxx b/src/GC/GC_MakePlane.hxx index 0cdfb035b1..3c465997d0 100644 --- a/src/GC/GC_MakePlane.hxx +++ b/src/GC/GC_MakePlane.hxx @@ -24,8 +24,6 @@ #include #include -class StdFail_NotDone; -class gp_Ax2; class gp_Pln; class gp_Pnt; class gp_Dir; diff --git a/src/GC/GC_MakeSegment.hxx b/src/GC/GC_MakeSegment.hxx index 82f23ea408..19b31245bd 100644 --- a/src/GC/GC_MakeSegment.hxx +++ b/src/GC/GC_MakeSegment.hxx @@ -24,7 +24,6 @@ #include #include -class StdFail_NotDone; class gp_Pnt; class gp_Lin; diff --git a/src/GC/GC_MakeTrimmedCone.hxx b/src/GC/GC_MakeTrimmedCone.hxx index db068b7457..91b53651c9 100644 --- a/src/GC/GC_MakeTrimmedCone.hxx +++ b/src/GC/GC_MakeTrimmedCone.hxx @@ -24,7 +24,6 @@ #include #include -class StdFail_NotDone; class gp_Pnt; diff --git a/src/GC/GC_MakeTrimmedCylinder.hxx b/src/GC/GC_MakeTrimmedCylinder.hxx index 18ffbd470d..f9f075d3d0 100644 --- a/src/GC/GC_MakeTrimmedCylinder.hxx +++ b/src/GC/GC_MakeTrimmedCylinder.hxx @@ -24,11 +24,9 @@ #include #include -class StdFail_NotDone; class gp_Pnt; class gp_Circ; class gp_Ax1; -class gp_Cylinder; //! Implements construction algorithms for a trimmed diff --git a/src/GccAna/GccAna_Circ2d2TanOn.hxx b/src/GccAna/GccAna_Circ2d2TanOn.hxx index 30a9012e18..42fb3b44c3 100644 --- a/src/GccAna/GccAna_Circ2d2TanOn.hxx +++ b/src/GccAna/GccAna_Circ2d2TanOn.hxx @@ -30,9 +30,6 @@ #include #include #include -class Standard_OutOfRange; -class StdFail_NotDone; -class GccEnt_BadQualifier; class GccEnt_QualifiedCirc; class gp_Lin2d; class GccEnt_QualifiedLin; diff --git a/src/GccAna/GccAna_Circ2d2TanRad.hxx b/src/GccAna/GccAna_Circ2d2TanRad.hxx index 524c12ada8..ca99acce75 100644 --- a/src/GccAna/GccAna_Circ2d2TanRad.hxx +++ b/src/GccAna/GccAna_Circ2d2TanRad.hxx @@ -30,10 +30,6 @@ #include #include #include -class Standard_NegativeValue; -class Standard_OutOfRange; -class GccEnt_BadQualifier; -class StdFail_NotDone; class GccEnt_QualifiedCirc; class GccEnt_QualifiedLin; class gp_Pnt2d; diff --git a/src/GccAna/GccAna_Circ2d3Tan.hxx b/src/GccAna/GccAna_Circ2d3Tan.hxx index 873d715507..b3a86d6e27 100644 --- a/src/GccAna/GccAna_Circ2d3Tan.hxx +++ b/src/GccAna/GccAna_Circ2d3Tan.hxx @@ -30,9 +30,6 @@ #include #include #include -class Standard_OutOfRange; -class StdFail_NotDone; -class GccEnt_BadQualifier; class GccEnt_QualifiedCirc; class GccEnt_QualifiedLin; class gp_Pnt2d; diff --git a/src/GccAna/GccAna_Circ2dBisec.hxx b/src/GccAna/GccAna_Circ2dBisec.hxx index 9a8e62b6b6..dd344f2a37 100644 --- a/src/GccAna/GccAna_Circ2dBisec.hxx +++ b/src/GccAna/GccAna_Circ2dBisec.hxx @@ -24,9 +24,6 @@ #include #include #include -class Standard_OutOfRange; -class StdFail_NotDone; -class gp_Circ2d; class GccInt_Bisec; diff --git a/src/GccAna/GccAna_Circ2dTanCen.hxx b/src/GccAna/GccAna_Circ2dTanCen.hxx index 7811f49d4e..f50fe4a698 100644 --- a/src/GccAna/GccAna_Circ2dTanCen.hxx +++ b/src/GccAna/GccAna_Circ2dTanCen.hxx @@ -30,10 +30,6 @@ #include #include #include -class Standard_NegativeValue; -class Standard_OutOfRange; -class StdFail_NotDone; -class GccEnt_BadQualifier; class GccEnt_QualifiedCirc; class gp_Pnt2d; class gp_Lin2d; diff --git a/src/GccAna/GccAna_Circ2dTanOnRad.hxx b/src/GccAna/GccAna_Circ2dTanOnRad.hxx index a60b904e66..98005feff4 100644 --- a/src/GccAna/GccAna_Circ2dTanOnRad.hxx +++ b/src/GccAna/GccAna_Circ2dTanOnRad.hxx @@ -30,10 +30,6 @@ #include #include #include -class Standard_NegativeValue; -class Standard_OutOfRange; -class StdFail_NotDone; -class GccEnt_BadQualifier; class GccEnt_QualifiedCirc; class gp_Lin2d; class GccEnt_QualifiedLin; diff --git a/src/GccAna/GccAna_CircLin2dBisec.hxx b/src/GccAna/GccAna_CircLin2dBisec.hxx index 89dd23ca10..6238b768ba 100644 --- a/src/GccAna/GccAna_CircLin2dBisec.hxx +++ b/src/GccAna/GccAna_CircLin2dBisec.hxx @@ -25,10 +25,6 @@ #include #include #include -class Standard_OutOfRange; -class StdFail_NotDone; -class gp_Circ2d; -class gp_Lin2d; class GccInt_Bisec; diff --git a/src/GccAna/GccAna_CircPnt2dBisec.hxx b/src/GccAna/GccAna_CircPnt2dBisec.hxx index 8c3df82213..e2a00d53bf 100644 --- a/src/GccAna/GccAna_CircPnt2dBisec.hxx +++ b/src/GccAna/GccAna_CircPnt2dBisec.hxx @@ -26,10 +26,6 @@ #include #include #include -class Standard_OutOfRange; -class StdFail_NotDone; -class gp_Circ2d; -class gp_Pnt2d; class GccInt_Bisec; diff --git a/src/GccAna/GccAna_Lin2d2Tan.hxx b/src/GccAna/GccAna_Lin2d2Tan.hxx index 8499da9921..152e355852 100644 --- a/src/GccAna/GccAna_Lin2d2Tan.hxx +++ b/src/GccAna/GccAna_Lin2d2Tan.hxx @@ -29,9 +29,6 @@ #include #include #include -class Standard_OutOfRange; -class GccEnt_BadQualifier; -class StdFail_NotDone; class gp_Pnt2d; class GccEnt_QualifiedCirc; class gp_Lin2d; diff --git a/src/GccAna/GccAna_Lin2dBisec.hxx b/src/GccAna/GccAna_Lin2dBisec.hxx index 8479715434..01272df343 100644 --- a/src/GccAna/GccAna_Lin2dBisec.hxx +++ b/src/GccAna/GccAna_Lin2dBisec.hxx @@ -27,8 +27,6 @@ #include #include #include -class Standard_OutOfRange; -class StdFail_NotDone; class gp_Lin2d; class gp_Pnt2d; diff --git a/src/GccAna/GccAna_Lin2dTanObl.hxx b/src/GccAna/GccAna_Lin2dTanObl.hxx index 7f6894697c..1ea203567e 100644 --- a/src/GccAna/GccAna_Lin2dTanObl.hxx +++ b/src/GccAna/GccAna_Lin2dTanObl.hxx @@ -29,9 +29,6 @@ #include #include #include -class Standard_OutOfRange; -class GccEnt_BadQualifier; -class StdFail_NotDone; class gp_Pnt2d; class gp_Lin2d; class GccEnt_QualifiedCirc; diff --git a/src/GccAna/GccAna_Lin2dTanPar.hxx b/src/GccAna/GccAna_Lin2dTanPar.hxx index 854d9b3eb9..c9df854f1e 100644 --- a/src/GccAna/GccAna_Lin2dTanPar.hxx +++ b/src/GccAna/GccAna_Lin2dTanPar.hxx @@ -29,9 +29,6 @@ #include #include #include -class Standard_OutOfRange; -class GccEnt_BadQualifier; -class StdFail_NotDone; class gp_Pnt2d; class gp_Lin2d; class GccEnt_QualifiedCirc; diff --git a/src/GccAna/GccAna_Lin2dTanPer.hxx b/src/GccAna/GccAna_Lin2dTanPer.hxx index cecd2baea8..c186713985 100644 --- a/src/GccAna/GccAna_Lin2dTanPer.hxx +++ b/src/GccAna/GccAna_Lin2dTanPer.hxx @@ -29,10 +29,6 @@ #include #include #include -class GccEnt_BadQualifier; -class Standard_OutOfRange; -class Standard_ConstructionError; -class StdFail_NotDone; class gp_Pnt2d; class gp_Lin2d; class gp_Circ2d; diff --git a/src/GccAna/GccAna_LinPnt2dBisec.hxx b/src/GccAna/GccAna_LinPnt2dBisec.hxx index 27f8e556a7..165d982277 100644 --- a/src/GccAna/GccAna_LinPnt2dBisec.hxx +++ b/src/GccAna/GccAna_LinPnt2dBisec.hxx @@ -23,8 +23,6 @@ #include class GccInt_Bisec; -class Standard_ConstructionError; -class StdFail_NotDone; class gp_Lin2d; class gp_Pnt2d; diff --git a/src/GccAna/GccAna_Pnt2dBisec.hxx b/src/GccAna/GccAna_Pnt2dBisec.hxx index 74f3faeb2d..28e5583b2c 100644 --- a/src/GccAna/GccAna_Pnt2dBisec.hxx +++ b/src/GccAna/GccAna_Pnt2dBisec.hxx @@ -23,9 +23,7 @@ #include #include -class StdFail_NotDone; class gp_Pnt2d; -class gp_Lin2d; //! This class implements the algorithms used to From c1638a8db84b6b259c9c264e581b03f6ab6cedb9 Mon Sep 17 00:00:00 2001 From: kgv Date: Wed, 13 Oct 2021 21:53:32 +0300 Subject: [PATCH 096/639] 0032622: Draw Harness - writebrep "-version 3" is unrecognized Fixed version range check. Added description of -normals argument. --- src/DBRep/DBRep.cxx | 51 +++++++------- src/DDocStd/DDocStd_ApplicationCommands.cxx | 74 ++++++++++++--------- 2 files changed, 66 insertions(+), 59 deletions(-) diff --git a/src/DBRep/DBRep.cxx b/src/DBRep/DBRep.cxx index a13d58683d..6e2662b850 100644 --- a/src/DBRep/DBRep.cxx +++ b/src/DBRep/DBRep.cxx @@ -1456,12 +1456,7 @@ static Standard_Integer writebrep (Draw_Interpretor& theDI, aParam.LowerCase(); if (aParam == "-binary") { - isBinaryFormat = Standard_True; - if (anArgIter + 1 < theNbArgs - && Draw::ParseOnOff (theArgVec[anArgIter + 1], isBinaryFormat)) - { - ++anArgIter; - } + isBinaryFormat = Draw::ParseOnOffNoIterator (theNbArgs, theArgVec, anArgIter); } else if (aParam == "-version" && anArgIter + 1 < theNbArgs) @@ -1476,26 +1471,12 @@ static Standard_Integer writebrep (Draw_Interpretor& theDI, else if (aParam == "-notriangles" || aParam == "-triangles") { - isWithTriangles = Standard_True; - if (anArgIter + 1 < theNbArgs - && Draw::ParseOnOff (theArgVec[anArgIter + 1], isWithTriangles)) - { - ++anArgIter; - } - if (aParam == "-notriangles") - { - isWithTriangles = !isWithTriangles; - } + isWithTriangles = Draw::ParseOnOffNoIterator (theNbArgs, theArgVec, anArgIter); } else if (aParam == "-nonormals" || aParam == "-normals") { - isWithNormals = Standard_True; - if (anArgIter + 1 < theNbArgs - && Draw::ParseOnOff (theArgVec[anArgIter + 1], isWithNormals)) - { - ++anArgIter; - } + isWithNormals = Draw::ParseOnOffIterator (theNbArgs, theArgVec, anArgIter); if (aParam == "-nonormals") { isWithNormals = !isWithNormals; @@ -1530,11 +1511,18 @@ static Standard_Integer writebrep (Draw_Interpretor& theDI, Handle(Draw_ProgressIndicator) aProgress = new Draw_ProgressIndicator (theDI); if (isBinaryFormat) { - if (aVersion > BinTools_FormatVersion_VERSION_3) + if (aVersion > BinTools_FormatVersion_UPPER) { theDI << "Syntax error: unknown format version"; return 1; } + if (isWithNormals + && aVersion > 0 + && aVersion < BinTools_FormatVersion_VERSION_4) + { + theDI << "Error: vertex normals require binary format version 4 or later"; + return 1; + } BinTools_FormatVersion aBinToolsVersion = aVersion > 0 ? static_cast (aVersion) @@ -1547,11 +1535,18 @@ static Standard_Integer writebrep (Draw_Interpretor& theDI, } else { - if (aVersion > TopTools_FormatVersion_VERSION_2) + if (aVersion > TopTools_FormatVersion_UPPER) { theDI << "Syntax error: unknown format version"; return 1; } + if (isWithNormals + && aVersion > 0 + && aVersion < TopTools_FormatVersion_VERSION_3) + { + theDI << "Error: vertex normals require ascii format version 3 or later"; + return 1; + } TopTools_FormatVersion aTopToolsVersion = aVersion > 0 ? static_cast (aVersion) @@ -1729,14 +1724,16 @@ void DBRep::BasicCommands(Draw_Interpretor& theCommands) "\n\t\t +|-g : switch on/off graphical mode of Progress Indicator", XProgress,"DE: General"); theCommands.Add("writebrep", - "writebrep shape filename [-binary=off] [-version Version=4] [-noTriangles=off]" + "writebrep shape filename [-binary {0|1}]=0 [-version Version]=4" + "\n\t\t: [-triangles {0|1}]=1 [-normals {0|1}]=0" "\n\t\t: Save the shape in the ASCII (default) or binary format file." "\n\t\t: -binary write into the binary format (ASCII when unspecified)" "\n\t\t: -version a number of format version to save;" "\n\t\t: ASCII versions: 1, 2 and 3 (3 for ASCII when unspecified);" "\n\t\t: Binary versions: 1, 2, 3 and 4 (4 for Binary when unspecified)." - "\n\t\t: -noTriangles skip triangulation data (OFF when unspecified)." - "\n\t\t: Ignored (always written) if face defines only triangulation (no surface).", + "\n\t\t: -triangles write triangulation data (TRUE when unspecified)." + "\n\t\t: Ignored (always written) if face defines only triangulation (no surface)." + "\n\t\t: -normals include vertex normals while writing triangulation data (FALSE when unspecified).", __FILE__, writebrep, g); theCommands.Add("readbrep", "readbrep filename shape" diff --git a/src/DDocStd/DDocStd_ApplicationCommands.cxx b/src/DDocStd/DDocStd_ApplicationCommands.cxx index f0c16d38b3..9f093fee64 100644 --- a/src/DDocStd/DDocStd_ApplicationCommands.cxx +++ b/src/DDocStd/DDocStd_ApplicationCommands.cxx @@ -551,39 +551,44 @@ static Standard_Integer DDocStd_PrintComments (Draw_Interpretor& di, } //======================================================================= -//function : SetStorageFormatVersion -//purpose : +//function : DDocStd_StorageFormatVersion +//purpose : //======================================================================= -static Standard_Integer DDocStd_SetStorageFormatVersion (Draw_Interpretor& , - Standard_Integer nb, - const char** a) +static Standard_Integer DDocStd_StorageFormatVersion (Draw_Interpretor& theDI, + Standard_Integer theNbArgs, + const char** theArgVec) { - if (nb == 3) + if (theNbArgs != 2 + && theNbArgs != 3) { - Handle(TDocStd_Document) D; - if (!DDocStd::GetDocument(a[1], D)) return 1; - const int version = atoi(a[2]); - D->ChangeStorageFormatVersion((TDocStd_FormatVersion) version); - return 0; + theDI << "Syntax error: wrong number of arguments"; + return 1; } - return 1; -} -//======================================================================= -//function : GetStorageFormatVersion -//purpose : -//======================================================================= -static Standard_Integer DDocStd_GetStorageFormatVersion (Draw_Interpretor& di, - Standard_Integer nb, - const char** a) -{ - if (nb == 2) { - Handle(TDocStd_Document) D; - if (!DDocStd::GetDocument(a[1], D)) return 1; - di << D->StorageFormatVersion() << "\n"; + Handle(TDocStd_Document) aDoc; + if (!DDocStd::GetDocument (theArgVec[1], aDoc)) + { + theDI << "Syntax error: " << theArgVec[1] << " is not a document"; + return 1; + } + + if (theNbArgs == 2) + { + theDI << aDoc->StorageFormatVersion() << "\n"; return 0; } - return 1; + + Standard_Integer aVerInt = 0; + if (!Draw::ParseInteger (theArgVec[2], aVerInt) + || aVerInt < TDocStd_FormatVersion_LOWER + || aVerInt > TDocStd_FormatVersion_UPPER) + { + theDI << "Syntax error: unknown version '" << theArgVec[2] << "' (valid range is " << TDocStd_FormatVersion_LOWER << ".." << TDocStd_FormatVersion_UPPER << ")"; + return 1; + } + + aDoc->ChangeStorageFormatVersion ((TDocStd_FormatVersion )aVerInt); + return 0; } //======================================================================= @@ -656,12 +661,17 @@ void DDocStd::ApplicationCommands(Draw_Interpretor& theCommands) "PrintComments Doc", __FILE__, DDocStd_PrintComments, g); + static const TCollection_AsciiString THE_SET_VER_HELP = TCollection_AsciiString() + + "StorageFormatVersion Doc [Version]" + "\n\t\t: Print or set storage format version within range " + int(TDocStd_FormatVersion_LOWER) + ".." + int(TDocStd_FormatVersion_UPPER) + + "\n\t\t: defined by TDocStd_FormatVersion enumeration."; + theCommands.Add("StorageFormatVersion", THE_SET_VER_HELP.ToCString(), + __FILE__, DDocStd_StorageFormatVersion, g); theCommands.Add("GetStorageFormatVersion", - "GetStorageFormatVersion Doc" - "\nStorage format versions are defined in TDocStd_FormatVersion.hxx file by an enumeration", - __FILE__, DDocStd_GetStorageFormatVersion, g); + "GetStorageFormatVersion Doc" + "\n\t\t: Alias to StorageFormatVersion", + __FILE__, DDocStd_StorageFormatVersion, g); theCommands.Add("SetStorageFormatVersion", - "SetStorageFormatVersion Doc Version" - "\nStorage format versions are defined in TDocStd_FormatVersion.hxx file by an enumeration", - __FILE__, DDocStd_SetStorageFormatVersion, g); + "\n\t\t: Alias to StorageFormatVersion", + __FILE__, DDocStd_StorageFormatVersion, g); } From eb78d737d480df969e0255845b0af18cef20507f Mon Sep 17 00:00:00 2001 From: abulyche Date: Mon, 4 Oct 2021 04:00:55 +0300 Subject: [PATCH 097/639] 0030747: Modeling Algorithms - 2d Curves concatenator doesn't properly process closed contours. Corrected Geom2dConvert_CompCurveToBSplineCurve::Add in Geom2dConvert_CompCurveToBSplineCurve.cxx; Added the test for this problem; Corrected "gluing" curves in ProjLib_ProjectedCurve.cxx. --- .../Geom2dConvert_CompCurveToBSplineCurve.cxx | 84 +++++++++---------- src/ProjLib/ProjLib_ProjectedCurve.cxx | 5 +- src/QABugs/QABugs_20.cxx | 48 +++++++++++ tests/bugs/modalg_7/bug30747 | 8 ++ 4 files changed, 98 insertions(+), 47 deletions(-) create mode 100644 tests/bugs/modalg_7/bug30747 diff --git a/src/Geom2dConvert/Geom2dConvert_CompCurveToBSplineCurve.cxx b/src/Geom2dConvert/Geom2dConvert_CompCurveToBSplineCurve.cxx index f68c1f4ddc..f70189dd0c 100644 --- a/src/Geom2dConvert/Geom2dConvert_CompCurveToBSplineCurve.cxx +++ b/src/Geom2dConvert/Geom2dConvert_CompCurveToBSplineCurve.cxx @@ -84,59 +84,53 @@ Add(const Handle(Geom2d_BoundedCurve)& NewCurve, } myTol = Tolerance; + const Standard_Real aSqTol = Tolerance * Tolerance; Standard_Integer LBs = Bs->NbPoles(), LCb = myCurve->NbPoles(); + Standard_Real d1 = myCurve->Pole(1).SquareDistance(Bs->Pole(1)); + Standard_Real d2 = myCurve->Pole(1).SquareDistance(Bs->Pole(LBs)); + + Standard_Boolean isBeforeReversed = (myCurve->Pole(1).SquareDistance(Bs->Pole(1)) < aSqTol) && (d1 < d2); + Standard_Boolean isBefore = (myCurve->Pole(1).SquareDistance(Bs->Pole(LBs)) < aSqTol) || isBeforeReversed; + + d1 = myCurve->Pole(LCb).SquareDistance(Bs->Pole(1)); + d2 = myCurve->Pole(LCb).SquareDistance(Bs->Pole(LBs)); + + Standard_Boolean isAfterReversed = (myCurve->Pole(LCb).SquareDistance(Bs->Pole(LBs)) < aSqTol) && (d2 < d1); + Standard_Boolean isAfter = (myCurve->Pole(LCb).SquareDistance(Bs->Pole(1)) < aSqTol) || isAfterReversed; - // myCurve est elle fermee ? - if (myCurve->Pole(LCb).Distance(myCurve->Pole(1)) < myTol){ - if(After){ - // Ajout Apres ? - Standard_Real d1 = myCurve->Pole(LCb).Distance(Bs->Pole(1)); - Standard_Real d2 = myCurve->Pole(LCb).Distance(Bs->Pole(LBs)); - if (d2 < d1) { - Bs->Reverse(); - d1 = d2; - } - if (d1 < myTol) { - Add(myCurve, Bs, Standard_True); - return Standard_True; - } + // myCurve and NewCurve together form a closed curve + if (isBefore && isAfter) + { + if (After) + { + isBefore = Standard_False; } - else{ - // Ajout avant ? - Standard_Real d1 = myCurve->Pole(1).Distance(Bs->Pole(1)); - Standard_Real d2 = myCurve->Pole(1).Distance(Bs->Pole(LBs)); - if (d1 < d2) { - Bs->Reverse(); - d2 = d1; - } - if (d2 < myTol) { - Add(Bs, myCurve, Standard_False); - return Standard_True; - } + else + { + isAfter = Standard_False; } } - // Ajout Apres ? - else { - - Standard_Real d1 = myCurve->Pole(LCb).Distance(Bs->Pole(1)); - Standard_Real d2 = myCurve->Pole(LCb).Distance(Bs->Pole(LBs)); - if (( d1 < myTol) || ( d2 < myTol)) { - if (d2 < d1) {Bs->Reverse();} - Add(myCurve, Bs, Standard_True); - return Standard_True; + if (isAfter) + { + if (isAfterReversed) + { + Bs->Reverse(); } - // Ajout avant ? - else { - d1 = myCurve->Pole(1).Distance(Bs->Pole(1)); - d2 = myCurve->Pole(1).Distance(Bs->Pole(LBs)); - if ( (d1 < myTol) || (d2 < myTol)) { - if (d1 < d2) {Bs->Reverse();} - Add(Bs, myCurve, Standard_False ); - return Standard_True; - } + Add(myCurve, Bs, Standard_True); + return Standard_True; + + } + else if (isBefore) + { + if (isBeforeReversed) + { + Bs->Reverse(); } - } + Add(Bs, myCurve, Standard_False); + return Standard_True; + } + return Standard_False; } diff --git a/src/ProjLib/ProjLib_ProjectedCurve.cxx b/src/ProjLib/ProjLib_ProjectedCurve.cxx index 875caf9e46..e21bda00e0 100644 --- a/src/ProjLib/ProjLib_ProjectedCurve.cxx +++ b/src/ProjLib/ProjLib_ProjectedCurve.cxx @@ -262,8 +262,9 @@ static void ExtendC2d (Handle(Geom2d_BSplineCurve)& aRes, aSegment = (FirstOrLast == 0)? new Geom2d_TrimmedCurve(aSegLine, ParOnLin, 0.) : new Geom2d_TrimmedCurve(aSegLine, 0., ParOnLin); - - aCompCurve.Add(aSegment, aTol); + + Standard_Boolean anAfter = FirstOrLast != 0; + aCompCurve.Add(aSegment, aTol, anAfter); aRes = aCompCurve.BSplineCurve(); } diff --git a/src/QABugs/QABugs_20.cxx b/src/QABugs/QABugs_20.cxx index d7098ec4bf..d6dfa3974a 100644 --- a/src/QABugs/QABugs_20.cxx +++ b/src/QABugs/QABugs_20.cxx @@ -3514,6 +3514,53 @@ static Standard_Integer OCC30708_2 (Draw_Interpretor& di, Standard_Integer, cons return 0; } +//======================================================================= +//function : OCC30747 +//purpose : +//======================================================================= +#include +#include +#include +#include +static Standard_Integer OCC30747(Draw_Interpretor& theDI, Standard_Integer theArgc, const char** theArgV) +{ + if (theArgc < 2) + { + return 1; + } + + const Handle(Geom2d_Circle) aCirc = GCE2d_MakeCircle(gp_Pnt2d(0, 0), 50); + + Standard_Real aF = aCirc->FirstParameter(); + Standard_Real aL = aCirc->LastParameter(); + Standard_Real aNb = 10; + Standard_Real aDelta = (aF + aL) / aNb; + Handle(Geom2d_TrimmedCurve) aFTrim = new Geom2d_TrimmedCurve(aCirc, aF, aDelta); + Geom2dConvert_CompCurveToBSplineCurve aRes(aFTrim); + for (Standard_Integer anId = 1; anId < aNb; anId++) + { + Handle(Geom2d_TrimmedCurve) aLTrim; + if (anId == (aNb - 1)) + { + aLTrim = new Geom2d_TrimmedCurve(aCirc, anId * aDelta, aF); + } + else + { + aLTrim = new Geom2d_TrimmedCurve(aCirc, anId * aDelta, (anId + 1) * aDelta); + } + aRes.Add(aLTrim, Precision::PConfusion()); + } + + if (!aRes.BSplineCurve()->IsClosed()) + { + theDI << "Error: curve isn't closed"; + return 1; + } + + DrawTrSurf::Set(theArgV[1], aRes.BSplineCurve()); + return 0; +} + //======================================================================= //function : OCC30869 //purpose : @@ -4042,6 +4089,7 @@ void QABugs::Commands_20(Draw_Interpretor& theCommands) { theCommands.Add("OCC30391", "OCC30391 result face LenBeforeUfirst LenAfterUlast LenBeforeVfirst LenAfterVlast", __FILE__, OCC30391, group); theCommands.Add("OCC29195", "OCC29195 [nbRep] doc1 [doc2 [doc3 [doc4]]]", __FILE__, OCC29195, group); theCommands.Add("OCC30435", "OCC30435 result curve inverse nbit", __FILE__, OCC30435, group); + theCommands.Add("OCC30747", "OCC30747: create a closed curve", __FILE__, OCC30747, group); theCommands.Add("OCC30990", "OCC30990 surface", __FILE__, OCC30990, group); theCommands.Add("QAStartsWith", diff --git a/tests/bugs/modalg_7/bug30747 b/tests/bugs/modalg_7/bug30747 new file mode 100644 index 0000000000..f2d76dd072 --- /dev/null +++ b/tests/bugs/modalg_7/bug30747 @@ -0,0 +1,8 @@ +puts "=================================================================" +puts "OCC30747: Modeling Algorithms - 2d Curves concatenator doesn't properly process closed contours." +puts "=================================================================" +puts "" + +pload QAcommands + +OCC30747 res \ No newline at end of file From 538700ffa225555034da64e3e2589d4829d496e2 Mon Sep 17 00:00:00 2001 From: jgv Date: Fri, 15 Oct 2021 07:53:48 +0300 Subject: [PATCH 098/639] 0032619: [Regression] Modelling Algorithms - UnifySameDomain ignores shared face Correct method ShapeUpgrade_UnifySameDomain::UnifyFaces: exclude free boundary edges from unification. --- .../ShapeUpgrade_UnifySameDomain.cxx | 32 ++++++++++++++++--- .../ShapeUpgrade_UnifySameDomain.hxx | 3 +- tests/bugs/heal/bug32619 | 20 ++++++++++++ 3 files changed, 49 insertions(+), 6 deletions(-) create mode 100644 tests/bugs/heal/bug32619 diff --git a/src/ShapeUpgrade/ShapeUpgrade_UnifySameDomain.cxx b/src/ShapeUpgrade/ShapeUpgrade_UnifySameDomain.cxx index 9f66be3890..8d0e45aedc 100644 --- a/src/ShapeUpgrade/ShapeUpgrade_UnifySameDomain.cxx +++ b/src/ShapeUpgrade/ShapeUpgrade_UnifySameDomain.cxx @@ -2622,11 +2622,29 @@ void ShapeUpgrade_UnifySameDomain::UnifyFaces() TopExp::MapShapes (myShape, TopAbs_FACE, aFaceMap); for (Standard_Integer i = 1; i <= aFaceMap.Extent(); i++) TopExp::MapShapesAndAncestors (aFaceMap(i), TopAbs_EDGE, TopAbs_FACE, aGMapEdgeFaces); + + // creating map of free boundaries + TopTools_MapOfShape aFreeBoundMap; + // look at only shells not belonging to solids + TopExp_Explorer anExplo (myShape, TopAbs_SHELL, TopAbs_SOLID); + for (; anExplo.More(); anExplo.Next()) + { + const TopoDS_Shape& aShell = anExplo.Current(); + TopTools_IndexedDataMapOfShapeListOfShape aEFmap; + TopExp::MapShapesAndAncestors (aShell, TopAbs_EDGE, TopAbs_FACE, aEFmap); + for (Standard_Integer ii = 1; ii <= aEFmap.Extent(); ii++) + { + const TopoDS_Edge& anEdge = TopoDS::Edge (aEFmap.FindKey(ii)); + const TopTools_ListOfShape& aFaceList = aEFmap(ii); + if (!BRep_Tool::Degenerated (anEdge) && aFaceList.Extent() == 1) + aFreeBoundMap.Add (anEdge); + } + } // unify faces in each shell separately TopExp_Explorer exps; for (exps.Init(myShape, TopAbs_SHELL); exps.More(); exps.Next()) - IntUnifyFaces(exps.Current(), aGMapEdgeFaces); + IntUnifyFaces(exps.Current(), aGMapEdgeFaces, aFreeBoundMap); // gather all faces out of shells in one compound and unify them at once BRep_Builder aBB; @@ -2637,7 +2655,7 @@ void ShapeUpgrade_UnifySameDomain::UnifyFaces() aBB.Add(aCmp, exps.Current()); if (nbf > 0) - IntUnifyFaces(aCmp, aGMapEdgeFaces); + IntUnifyFaces(aCmp, aGMapEdgeFaces, aFreeBoundMap); myShape = myContext->Apply(myShape); } @@ -2666,7 +2684,8 @@ static void SetFixWireModes(ShapeFix_Face& theSff) //======================================================================= void ShapeUpgrade_UnifySameDomain::IntUnifyFaces(const TopoDS_Shape& theInpShape, - TopTools_IndexedDataMapOfShapeListOfShape& theGMapEdgeFaces) + TopTools_IndexedDataMapOfShapeListOfShape& theGMapEdgeFaces, + const TopTools_MapOfShape& theFreeBoundMap) { // creating map of edge faces for the shape TopTools_IndexedDataMapOfShapeListOfShape aMapEdgeFaces; @@ -2723,7 +2742,9 @@ void ShapeUpgrade_UnifySameDomain::IntUnifyFaces(const TopoDS_Shape& theInpShape // get connectivity of the edge in the global shape const TopTools_ListOfShape& aGList = theGMapEdgeFaces.FindFromKey(edge); - if (!myAllowInternal && (aGList.Extent() != 2 || myKeepShapes.Contains(edge))) { + if (!myAllowInternal && + (aGList.Extent() != 2 || myKeepShapes.Contains(edge) || theFreeBoundMap.Contains(edge))) + { // non manifold case is not processed unless myAllowInternal continue; } @@ -2811,7 +2832,8 @@ void ShapeUpgrade_UnifySameDomain::IntUnifyFaces(const TopoDS_Shape& theInpShape if (aLF.Extent() == 2) { const TopoDS_Shape& aE = aMapEF.FindKey(i); const TopTools_ListOfShape& aGLF = theGMapEdgeFaces.FindFromKey(aE); - if (aGLF.Extent() > 2 || myKeepShapes.Contains(aE)) { + if (aGLF.Extent() > 2 || myKeepShapes.Contains(aE) || theFreeBoundMap.Contains(aE)) + { aKeepEdges.Append(aE); } } diff --git a/src/ShapeUpgrade/ShapeUpgrade_UnifySameDomain.hxx b/src/ShapeUpgrade/ShapeUpgrade_UnifySameDomain.hxx index cb2f6b7d12..d8b5a5a490 100644 --- a/src/ShapeUpgrade/ShapeUpgrade_UnifySameDomain.hxx +++ b/src/ShapeUpgrade/ShapeUpgrade_UnifySameDomain.hxx @@ -169,7 +169,8 @@ protected: Standard_EXPORT void UnifyEdges(); void IntUnifyFaces(const TopoDS_Shape& theInpShape, - TopTools_IndexedDataMapOfShapeListOfShape& theGMapEdgeFaces); + TopTools_IndexedDataMapOfShapeListOfShape& theGMapEdgeFaces, + const TopTools_MapOfShape& theFreeBoundMap); //! Splits the sequence of edges into the sequence of chains Standard_Boolean MergeEdges(TopTools_SequenceOfShape& SeqEdges, diff --git a/tests/bugs/heal/bug32619 b/tests/bugs/heal/bug32619 new file mode 100644 index 0000000000..3e4677e1bc --- /dev/null +++ b/tests/bugs/heal/bug32619 @@ -0,0 +1,20 @@ +puts "=============================================" +puts "OCC32619: UnifySameDomain ignores shared face" +puts "=============================================" +puts "" + +restore [locate_data_file bug32619.brep] a + +unifysamedom result a + +checkshape result + +checknbshapes result -t -shell 2 -face 3 -wire 3 -edge 12 -vertex 10 + +set tolres [checkmaxtol result] + +if { ${tolres} > 2.e-7} { + puts "Error: bad tolerance of result" +} + +checkview -display result -2d -path ${imagedir}/${test_image}.png \ No newline at end of file From 475da0f1352e60eebf1432cf136042444c7c5488 Mon Sep 17 00:00:00 2001 From: dpasukhi Date: Sun, 10 Oct 2021 15:33:15 +0300 Subject: [PATCH 099/639] 0032310: Data Exchange - Invalid STEP export/import of backslashes in names [Regression since OCCT 7.5.0] Fixed a problem with handling slashes and apostrophes Changed cleaning of the 'TEXT' fields of the step entity to direct order w/o removing operations Changed converting text locale to covert before cleaning directives and specials symbols (all directives and sp. symbols encoded in ASCII[0-125] and haven't any differ with any locals) Special case, when directives have two slashes before name changed to don't handle directives value and converts as is (combine two slashes as one and write, for example "\\X2\00C3" as "X2\00C3") --- src/StepData/StepData_StepReaderData.cxx | 347 ++++++++++++----------- tests/bugs/step/bug28454_2 | 2 +- tests/bugs/step/bug32310 | 28 ++ 3 files changed, 212 insertions(+), 165 deletions(-) create mode 100644 tests/bugs/step/bug32310 diff --git a/src/StepData/StepData_StepReaderData.cxx b/src/StepData/StepData_StepReaderData.cxx index 9cbda7914b..dfa0ff782e 100644 --- a/src/StepData/StepData_StepReaderData.cxx +++ b/src/StepData/StepData_StepReaderData.cxx @@ -74,7 +74,7 @@ static Standard_Integer acceptvoid = 0; //! Convert unsigned character to hexadecimal system, //! if character hasn't representation in this system, returns 0. -static Standard_Integer convertCharacterTo16bit(const unsigned char theCharacter) +static Standard_Integer convertCharacterTo16bit(const Standard_ExtCharacter theCharacter) { switch (theCharacter) { @@ -88,12 +88,12 @@ static Standard_Integer convertCharacterTo16bit(const unsigned char theCharacter case '7': return 7; case '8': return 8; case '9': return 9; - case 'A': return 10; - case 'B': return 11; - case 'C': return 12; - case 'D': return 13; - case 'E': return 14; - case 'F': return 15; + case 'A': case 'a': return 10; + case 'B': case 'b': return 11; + case 'C': case 'c': return 12; + case 'D': case 'd': return 13; + case 'E': case 'e': return 14; + case 'F': case 'f': return 15; default : return 0; } } @@ -102,202 +102,221 @@ static Standard_Integer convertCharacterTo16bit(const unsigned char theCharacter //function : cleanText //purpose : //======================================================================= - void StepData_StepReaderData::cleanText(const Handle(TCollection_HAsciiString)& theVal) const { - Standard_Integer n = theVal->Length(); // string size before reduction - theVal->Remove(n); - theVal->Remove(1); - // Don't forget to treat the special characters - for (Standard_Integer i = n - 2; i > 0; i--) { - char aChar = theVal->Value(i); - if (aChar == '\n') - { theVal->Remove(i); if (i < n-2) aChar = theVal->Value(i); } - if (aChar == '\'' && i < n - 2) { - if (theVal->Value(i + 1) == '\'') { theVal->Remove(i + 1); continue; } - } - if (aChar == '\\' && i < n - 3) { - if (theVal->Value(i + 2) == '\\') { - if (theVal->Value(i + 1) == 'N') - { theVal->SetValue(i,'\n'); theVal->Remove(i+1,2); continue; } - if (theVal->Value(i + 1) == 'T') - { theVal->SetValue(i,'\t'); theVal->Remove(i+1,2); continue; } - } - } - } - - // pass through without conversion the control directives - if (mySourceCodePage == Resource_FormatType_NoConversion) + if (theVal->Length() == 2) + { + theVal->Clear(); return; - - Standard_Integer aFirstCharInd = 1; // begin index of substring to conversion before the control directives - Standard_Integer aLastCharInd = 1; // end index of substring to conversion before the control directives + } + TCollection_ExtendedString aResString; + const Standard_Boolean toConversion = mySourceCodePage != Resource_FormatType_NoConversion; + Resource_Unicode::ConvertFormatToUnicode(mySourceCodePage, theVal->ToCString() + 1, aResString); + Standard_Integer aResStringSize = aResString.Length() - 1; // skip the last apostrophe TCollection_ExtendedString aTempExtString; // string for characters within control directives - TCollection_ExtendedString anOutputExtString; // string for conversion in UTF-8 + Standard_Integer aSetCharInd = 1; // index to set value to result string Resource_FormatType aLocalFormatType = Resource_FormatType_iso8859_1; // a code page for a "\S\" control directive - for (Standard_Integer i = 1; i <= theVal->Length(); ++i) + for (Standard_Integer aStringInd = 1; aStringInd <= aResStringSize; ++aStringInd) { - unsigned char aChar = theVal->Value(i); - if (aChar != '\\' || (theVal->Length() - i) < 3) // does not contain the control directive - { - continue; - } - Standard_Integer aLocalLastCharInd = i - 1; - Standard_Boolean isConverted = Standard_False; - // Encoding ISO 8859 characters within a string; - // ("\P{N}\") control directive; - // indicates code page for ("\S\") control directive; - // {N}: "A", "B", "C", "D", "E", "F", "G", "H", "I"; - // "A" identifies ISO 8859-1; "B" identifies ISO 8859-2, etc. - if (theVal->Value(i + 1) == 'P' && theVal->Length() - i > 3 && theVal->Value(i + 3) == '\\') - { - Standard_Character aPageId = UpperCase (theVal->Value(i + 2)); - if (aPageId >= 'A' && aPageId <= 'I') - { - aLocalFormatType = (Resource_FormatType)(Resource_FormatType_iso8859_1 + (aPageId - 'A')); - } - else - { - thecheck->AddWarning("String control directive \\P*\\ with an unsupported symbol in place of *"); - } - - isConverted = Standard_True; - i += 3; - } - // Encoding ISO 8859 characters within a string; - // ("\S\") control directive; - // converts followed a LATIN CODEPOINT character. - else if (theVal->Value(i + 1) == 'S' && theVal->Length() - i > 2 && theVal->Value(i + 2) == '\\') - { - Standard_Character aResChar = theVal->Value(i + 3) | 0x80; - const char aStrForCovert[2] = { aResChar, '\0' }; - Resource_Unicode::ConvertFormatToUnicode(aLocalFormatType, aStrForCovert, aTempExtString); - isConverted = Standard_True; - i += 3; - } - // Encoding U+0000 to U+00FF in a string - // ("\X\") control directive; - // converts followed two hexadecimal character. - else if (theVal->Value(i + 1) == 'X' && theVal->Length() - i > 3 && theVal->Value(i + 2) == '\\') - { - Standard_Character aResChar = (char)convertCharacterTo16bit(theVal->Value(i + 3)); - aResChar = (aResChar << 4) | (char)convertCharacterTo16bit(theVal->Value(i + 4)); - const char aStrForCovert[2] = { aResChar, '\0' }; - aTempExtString = TCollection_ExtendedString(aStrForCovert, Standard_False); // pass through without conversion - isConverted = Standard_True; - i += 4; - } - // Encoding ISO 10646 characters within a string - // ("\X{N}\") control directive; - // {N}: "0", "2", "4"; - // "\X2\" or "\X4\" converts followed a hexadecimal character sequence; - // "\X0\" indicate the end of the "\X2\" or "\X4\". - else if (theVal->Value(i + 1) == 'X' && theVal->Length() - i > 2 && theVal->Value(i + 3) == '\\') + const Standard_ExtCharacter aChar = aResString.Value(aStringInd); + aSetCharInd = aStringInd; + if (aChar == '\\' && aStringInd <= aResStringSize - 3) // can contains the control directive { - Standard_Integer aFirstInd = i + 3; - Standard_Integer aLastInd = i; - Standard_Boolean isClosed = Standard_False; - for (; i <= theVal->Length() && !isClosed; ++i) // find the end of the "\X2\" or "\X4\" by an external "i" + Standard_Boolean isConverted = Standard_False; + const Standard_ExtCharacter aDirChar = aResString.Value(aStringInd + 1); + const Standard_Boolean isSecSlash = aResString.Value(aStringInd + 2) == '\\'; + const Standard_Boolean isThirdSlash = aResString.Value(aStringInd + 3) == '\\'; + // Encoding ISO 8859 characters within a string; + // ("\P{N}\") control directive; + // indicates code page for ("\S\") control directive; + // {N}: "A", "B", "C", "D", "E", "F", "G", "H", "I"; + // "A" identifies ISO 8859-1; "B" identifies ISO 8859-2, etc. + if (aDirChar == 'P' && isThirdSlash) { - if (theVal->Length() - i > 2 && theVal->Value(i) == '\\' && theVal->Value(i + 1) == 'X' && theVal->Value(i + 2) == '0' && theVal->Value(i + 3) == '\\') + const Standard_Character aPageId = + UpperCase(static_cast(aResString.Value(aStringInd + 2) & 255)); + if (aPageId >= 'A' && aPageId <= 'I') { - aLastInd = i - 1; - i = i + 2; - isClosed = Standard_True; + aLocalFormatType = (Resource_FormatType)(Resource_FormatType_iso8859_1 + (aPageId - 'A')); } + else + { + thecheck->AddWarning("String control directive \\P*\\ with an unsupported symbol in place of *"); + } + isConverted = Standard_True; + aStringInd += 3; + } + // Encoding ISO 8859 characters within a string; + // ("\S\") control directive; + // converts followed a LATIN CODEPOINT character. + else if (aDirChar == 'S' && isSecSlash) + { + Standard_Character aResChar = static_cast(aResString.Value(aStringInd + 3) | 0x80); + const char aStrForCovert[2] = { aResChar, '\0' }; + Resource_Unicode::ConvertFormatToUnicode(aLocalFormatType, aStrForCovert, aTempExtString); + isConverted = Standard_True; + aStringInd += 3; } - if (!isClosed) // "\X0\" not exists + // Encoding U+0000 to U+00FF in a string + // ("\X\") control directive; + // converts followed two hexadecimal character. + else if (aDirChar == 'X' && aStringInd <= aResStringSize - 4 && isSecSlash) { - aLastInd = theVal->Length(); + Standard_Character aResChar = (char)convertCharacterTo16bit(aResString.Value(aStringInd + 3)); + aResChar = (aResChar << 4) | (char)convertCharacterTo16bit(aResString.Value(aStringInd + 4)); + const char aStrForConvert[2] = { aResChar, '\0' }; + aTempExtString = TCollection_ExtendedString(aStrForConvert, Standard_False); // pass through without conversion + isConverted = Standard_True; + aStringInd += 4; } - TCollection_AsciiString aBitString; - aBitString = TCollection_AsciiString(theVal->ToCString() + aFirstInd, aLastInd - aFirstInd); - aBitString.UpperCase(); // make valid for conversion into 16-bit - // "\X2\" control directive; - // followed by multiples of four or three hexadecimal characters. - // Encoding in UTF-16 - if (theVal->Value(aFirstInd - 1) == '2' && theVal->Length() - aFirstInd > 3) + // Encoding ISO 10646 characters within a string + // ("\X{N}\") control directive; + // {N}: "0", "2", "4"; + // "\X2\" or "\X4\" converts followed a hexadecimal character sequence; + // "\X0\" indicate the end of the "\X2\" or "\X4\". + else if (aDirChar == 'X' && isThirdSlash) { - Standard_Integer anIterStep = (aBitString.Length() % 4 == 0) ? 4 : 3; - if (aBitString.Length() % anIterStep) + Standard_Integer aFirstInd = aStringInd + 3; + Standard_Integer aLastInd = aStringInd; + Standard_Boolean isClosed = Standard_False; + // find the end of the "\X2\" or "\X4\" by an external "aStringInd" + for (; aStringInd <= aResStringSize && !isClosed; ++aStringInd) { - aTempExtString.AssignCat('?'); - thecheck->AddWarning("String control directive \\X2\\ is followed by number of digits not multiple of 4"); + if (aResStringSize - aStringInd > 2 && aResString.Value(aStringInd) == '\\' && + aResString.Value(aStringInd + 1) == 'X' && aResString.Value(aStringInd + 2) == '0' && + aResString.Value(aStringInd + 3) == '\\') + { + aLastInd = aStringInd - 1; + aStringInd = aStringInd + 2; + isClosed = Standard_True; + } } - else + if (!isClosed) // "\X0\" not exists { - Standard_Integer aStrLen = aBitString.Length() / anIterStep; - Standard_Utf16Char aUtfCharacter = '\0'; - for (Standard_Integer aCharInd = 1; aCharInd <= aStrLen * anIterStep; ++aCharInd) + aLastInd = aStringInd = aResStringSize; + } + const Standard_Integer aStrLen = aLastInd - aFirstInd; + // "\X2\" control directive; + // followed by multiples of four or three hexadecimal characters. + // Encoding in UTF-16 + if (aResString.Value(aFirstInd - 1) == '2' && aResStringSize - aFirstInd > 3) + { + Standard_Integer anIterStep = (aStrLen % 4 == 0) ? 4 : 3; + if (aStrLen % anIterStep) + { + aTempExtString.AssignCat('?'); + thecheck->AddWarning("String control directive \\X2\\ is followed by number of digits not multiple of 4"); + } + else { - aUtfCharacter |= convertCharacterTo16bit(aBitString.Value(aCharInd)); - if (aCharInd % anIterStep == 0) + Standard_Utf16Char aUtfCharacter = '\0'; + for (Standard_Integer aCharInd = 1; aCharInd <= aStrLen; ++aCharInd) { - aTempExtString.AssignCat(aUtfCharacter); - aUtfCharacter = '\0'; + aUtfCharacter |= convertCharacterTo16bit(aResString.Value(aCharInd + aFirstInd)); + if (aCharInd % anIterStep == 0) + { + aTempExtString.AssignCat(aUtfCharacter); + aUtfCharacter = '\0'; + } + aUtfCharacter = aUtfCharacter << 4; } - aUtfCharacter = aUtfCharacter << 4; } } - } - // "\X4\" control directive; - // followed by multiples of eight hexadecimal characters. - // Encoding in UTF-32 - else if (theVal->Value(aFirstInd - 1) == '4' && theVal->Length() - aFirstInd > 7) - { - if (aBitString.Length() % 8) - { - aTempExtString.AssignCat('?'); - thecheck->AddWarning("String control directive \\X4\\ is followed by number of digits not multiple of 8"); - } - else + // "\X4\" control directive; + // followed by multiples of eight hexadecimal characters. + // Encoding in UTF-32 + else if (aResString.Value(aFirstInd - 1) == '4' && aResStringSize - aFirstInd > 7) { - Standard_Integer aStrLen = aBitString.Length() / 8; - Standard_Utf32Char aUtfCharacter[2] = {'\0', '\0'}; - for (Standard_Integer aCharInd = 1; aCharInd <= aStrLen * 8; ++aCharInd) + if (aStrLen % 8) + { + aTempExtString.AssignCat('?'); + thecheck->AddWarning("String control directive \\X4\\ is followed by number of digits not multiple of 8"); + } + else { - aUtfCharacter[0] |= convertCharacterTo16bit(aBitString.Value(aCharInd)); - if (aCharInd % 8 == 0) + Standard_Utf32Char aUtfCharacter[2] = { '\0', '\0' }; + for (Standard_Integer aCharInd = 1; aCharInd <= aStrLen; ++aCharInd) { - NCollection_Utf32Iter aUtfIter(aUtfCharacter); - Standard_Utf16Char aStringBuffer[3]; - Standard_Utf16Char* aUtfPntr = aUtfIter.GetUtf16(aStringBuffer); - *aUtfPntr++ = '\0'; - TCollection_ExtendedString aUtfString(aStringBuffer); - aTempExtString.AssignCat(aUtfString); - aUtfCharacter[0] = '\0'; + aUtfCharacter[0] |= convertCharacterTo16bit(aResString.Value(aCharInd + aFirstInd)); + if (aCharInd % 8 == 0) + { + NCollection_Utf32Iter aUtfIter(aUtfCharacter); + Standard_Utf16Char aStringBuffer[3]; + Standard_Utf16Char* aUtfPntr = aUtfIter.GetUtf16(aStringBuffer); + *aUtfPntr++ = '\0'; + TCollection_ExtendedString aUtfString(aStringBuffer); + aTempExtString.AssignCat(aUtfString); + aUtfCharacter[0] = '\0'; + } + aUtfCharacter[0] = aUtfCharacter[0] << 4; } - aUtfCharacter[0] = aUtfCharacter[0] << 4; } } + isConverted = Standard_True; + } + if (isConverted) // find the control directive + { + if (toConversion) // else skip moving + { + aResStringSize -= aStringInd - aSetCharInd - aTempExtString.Length() + 1; // change the string size to remove unused symbols + aResString.SetValue(aSetCharInd, aTempExtString); + aSetCharInd += aTempExtString.Length(); // move to the new position + aResString.SetValue(aSetCharInd, aResString.ToExtString() + aStringInd); + aStringInd = aSetCharInd - 1; + aResString.Trunc(aResStringSize);; + } + aTempExtString.Clear(); + continue; } - isConverted = Standard_True; } - if (isConverted) // find the control directive + if (aStringInd <= aResStringSize - 1) { - TCollection_ExtendedString anExtString; - if (aFirstCharInd <= aLocalLastCharInd) + const Standard_ExtCharacter aCharNext = aResString.Value(aStringInd + 1); + if (aCharNext == aChar && (aChar == '\'' || aChar == '\\')) { - Resource_Unicode::ConvertFormatToUnicode(mySourceCodePage, theVal->SubString(aFirstCharInd, aLocalLastCharInd)->ToCString(), anExtString); + aResString.SetValue(aSetCharInd, aResString.ToExtString() + aStringInd); // move the string,removing one symbol + aResStringSize--; // change the string size to remove unused symbol + aResString.Trunc(aResStringSize); + } + else if (aChar == '\\') + { + const Standard_Boolean isDirective = + aStringInd <= aResStringSize - 2 && aResString.Value(aStringInd + 2) == '\\'; + if (isDirective) + { + if (aCharNext == 'N') + { + aResString.SetValue(aSetCharInd++, '\n'); + aResString.SetValue(aSetCharInd, aResString.ToExtString() + aStringInd + 2); // move the string,removing two symbols + aResStringSize-=2; // change the string size to remove unused symbols + aResString.Trunc(aResStringSize); + continue; + } + else if (aCharNext == 'T') + { + aResString.SetValue(aSetCharInd++, '\t'); + aResString.SetValue(aSetCharInd, aResString.ToExtString() + aStringInd + 2); // move the string,removing two symbols + aResStringSize-=2; // change the string size to remove unused symbols + aResString.Trunc(aResStringSize); + continue; + } + } } - anOutputExtString.AssignCat(anExtString); - anOutputExtString.AssignCat(aTempExtString); - aFirstCharInd = i + 1; - aLastCharInd = aFirstCharInd; - aTempExtString.Clear(); } - } - if (aLastCharInd <= theVal->Length()) - { - Resource_Unicode::ConvertFormatToUnicode(mySourceCodePage, theVal->ToCString() + aLastCharInd - 1, aTempExtString); - anOutputExtString.AssignCat(aTempExtString); + if (aChar == '\n') + { + aResString.SetValue(aSetCharInd, aResString.ToExtString() + aStringInd); + aResStringSize--; + aResString.Trunc(aResStringSize); + aStringInd--; + } } theVal->Clear(); - TCollection_AsciiString aTmpString(anOutputExtString, 0); + aResString.Trunc(aResStringSize); // trunc the last apostrophe + TCollection_AsciiString aTmpString(aResString, 0); theVal->AssignCat(aTmpString.ToCString()); } - // ------------- METHODES ------------- //======================================================================= diff --git a/tests/bugs/step/bug28454_2 b/tests/bugs/step/bug28454_2 index 746790313a..4020dffcd2 100644 --- a/tests/bugs/step/bug28454_2 +++ b/tests/bugs/step/bug28454_2 @@ -20,7 +20,7 @@ if { [GetName D 0:1:1:2] != "π" } { puts "Error: name has been lost on conversion \X2\ directive" } puts {# STEP string: 'Expression: \X2\03B103B2\X0\\\X2\03B3\X0\*\X2\03C0\X0\'} -if { [GetName D 0:1:1:3] != "Expression: αβ\\γ*π" } { +if { [GetName D 0:1:1:3] != "Expression: αβ\\X2\\03B3*π" } { puts "Error: name has been lost on conversion \X2\ directive" } puts {# STEP string: '\X4\0001F7CA\X0\'} diff --git a/tests/bugs/step/bug32310 b/tests/bugs/step/bug32310 new file mode 100644 index 0000000000..93dafda023 --- /dev/null +++ b/tests/bugs/step/bug32310 @@ -0,0 +1,28 @@ +puts "====================================" +puts "0032310: Data Exchange - Invalid STEP export/import of backslashes in names \[Regression since OCCT 7.5.0\]" +puts "====================================" +puts "" + +pload DCAF +Close D -silent + +XNewDoc D +box box 1 1 1 +XAddShape D box + +SetName D 0:1:1:1 "a'''\\b\n\t\\c\\\\\\\\" +set original_name [GetName D 0:1:1:1] + +WriteStep D "$imagedir/${casename}.stp" +Close D + +ReadStep D "$imagedir/${casename}.stp" +set imported_name [GetName D 0:1:1:1] + +file delete "$imagedir/${casename}.stp" + +if {$original_name != $imported_name} { + puts "Error: 'Incorrect exporting name: $original_name != $imported_name" +} + +Close D From 4e2151f654a334304747e15a05cd6f8231bab687 Mon Sep 17 00:00:00 2001 From: kgv Date: Fri, 15 Oct 2021 11:29:43 -0700 Subject: [PATCH 100/639] 0032624: Configuration, genproj - add support for VS 2022 / vc143 --- adm/genconf.tcl | 35 +++++++++++++++++++++++++---------- adm/genproj.tcl | 11 ++++++++--- adm/templates/env.bat | 16 +++++++++++++--- 3 files changed, 46 insertions(+), 16 deletions(-) diff --git a/adm/genconf.tcl b/adm/genconf.tcl index a2ca8f6c3d..6fa37c8469 100644 --- a/adm/genconf.tcl +++ b/adm/genconf.tcl @@ -63,30 +63,45 @@ set SYS_VC_LIST {} set SYS_VCVARS_LIST {} # detect installed Visual Studio 2017+ instances by running vswhere.exe -if { ! [catch {exec vswhere.exe -version "\[15.0,15.99\]" -latest -requires Microsoft.VisualStudio.Workload.NativeDesktop -property installationPath} res] } { +if { ! [catch {exec vswhere.exe -version "\[15.0,15.99\]" -latest -requires Microsoft.VisualStudio.Workload.NativeDesktop -property installationPath} res] && "$res" != "" } { lappend ::SYS_VS_LIST "Visual Studio 2017 (15, toolset v141)" lappend ::SYS_VC_LIST "vc141" - lappend ::SYS_VCVARS_LIST "$res\\VC\\vcvarsall.bat" + lappend ::SYS_VCVARS_LIST "$res\\VC\\Auxiliary\\Build\\vcvarsall.bat" } -if { ! [catch {exec vswhere.exe -version "\[15.0,15.99\]" -latest -requires Microsoft.VisualStudio.Workload.Universal -property installationPath} res] } { +if { ! [catch {exec vswhere.exe -version "\[15.0,15.99\]" -latest -requires Microsoft.VisualStudio.Workload.Universal -property installationPath} res] && "$res" != "" } { lappend ::SYS_VS_LIST "Visual Studio 2017 (15, toolset v141) UWP" lappend ::SYS_VC_LIST "vc141-uwp" - lappend ::SYS_VCVARS_LIST "$res\\VC\\vcvarsall.bat" + lappend ::SYS_VCVARS_LIST "$res\\VC\\Auxiliary\\Build\\vcvarsall.bat" } -if { ! [catch {exec vswhere.exe -version "\[16.0,16.99\]" -latest -requires Microsoft.VisualStudio.Workload.NativeDesktop -property installationPath} res] } { +if { ! [catch {exec vswhere.exe -version "\[16.0,16.99\]" -latest -requires Microsoft.VisualStudio.Workload.NativeDesktop -property installationPath} res] && "$res" != "" } { lappend ::SYS_VS_LIST "Visual Studio 2019 (16, toolset v142)" lappend ::SYS_VC_LIST "vc142" - lappend ::SYS_VCVARS_LIST "$res\\VC\\vcvarsall.bat" + lappend ::SYS_VCVARS_LIST "$res\\VC\\Auxiliary\\Build\\vcvarsall.bat" } -if { ! [catch {exec vswhere.exe -version "\[16.0,16.99\]" -latest -requires Microsoft.VisualStudio.Workload.Universal -property installationPath} res] } { +if { ! [catch {exec vswhere.exe -version "\[16.0,16.99\]" -latest -requires Microsoft.VisualStudio.Workload.Universal -property installationPath} res] && "$res" != "" } { lappend ::SYS_VS_LIST "Visual Studio 2019 (16, toolset v142) UWP" lappend ::SYS_VC_LIST "vc142-uwp" - lappend ::SYS_VCVARS_LIST "$res\\VC\\vcvarsall.bat" + lappend ::SYS_VCVARS_LIST "$res\\VC\\Auxiliary\\Build\\vcvarsall.bat" } -if { ! [catch {exec vswhere.exe -version "\[16.0,16.99\]" -latest -requires Microsoft.VisualStudio.Component.VC.ClangCL -property installationPath} res] } { +if { ! [catch {exec vswhere.exe -version "\[16.0,16.99\]" -latest -requires Microsoft.VisualStudio.Component.VC.ClangCL -property installationPath} res] && "$res" != "" } { lappend ::SYS_VS_LIST "Visual Studio 2019 (16, toolset ClangCL)" lappend ::SYS_VC_LIST "vclang" - lappend ::SYS_VCVARS_LIST "$res\\VC\\vcvarsall.bat" + lappend ::SYS_VCVARS_LIST "$res\\VC\Auxiliary\\Build\\vcvarsall.bat" +} +if { ! [catch {exec vswhere.exe -version "\[17.0,17.99\]" -latest -requires Microsoft.VisualStudio.Workload.NativeDesktop -property installationPath} res] && "$res" != "" } { + lappend ::SYS_VS_LIST "Visual Studio 2022 (17, toolset v143)" + lappend ::SYS_VC_LIST "vc143" + lappend ::SYS_VCVARS_LIST "$res\\VC\\Auxiliary\\Build\\vcvarsall.bat" +} +if { ! [catch {exec vswhere.exe -version "\[17.0,17.99\]" -latest -requires Microsoft.VisualStudio.Workload.Universal -property installationPath} res] && "$res" != "" } { + lappend ::SYS_VS_LIST "Visual Studio 2022 (17, toolset v143) UWP" + lappend ::SYS_VC_LIST "vc143-uwp" + lappend ::SYS_VCVARS_LIST "$res\\VC\\Auxiliary\\Build\\vcvarsall.bat" +} +if { ! [catch {exec vswhere.exe -version "\[17.0,17.99\]" -latest -requires Microsoft.VisualStudio.Component.VC.ClangCL -property installationPath} res] && "$res" != "" } { + lappend ::SYS_VS_LIST "Visual Studio 2022 (17, toolset ClangCL)" + lappend ::SYS_VC_LIST "vclang" + lappend ::SYS_VCVARS_LIST "$res\\VC\\Auxiliary\\Build\\vcvarsall.bat" } # detect installed Visual Studio instances from global environment diff --git a/adm/genproj.tcl b/adm/genproj.tcl index ce70ef7b4f..90ab8d16ae 100644 --- a/adm/genproj.tcl +++ b/adm/genproj.tcl @@ -260,7 +260,7 @@ proc genAllResources { theSrcDir } { # Wrapper-function to generate VS project files proc genproj {theFormat args} { - set aSupportedFormats { "vc7" "vc8" "vc9" "vc10" "vc11" "vc12" "vc14" "vc141" "vc142" "vclang" "cbp" "xcd" "pro"} + set aSupportedFormats { "vc7" "vc8" "vc9" "vc10" "vc11" "vc12" "vc14" "vc141" "vc142" "vc143" "vclang" "cbp" "xcd" "pro"} set aSupportedPlatforms { "wnt" "uwp" "lin" "mac" "ios" "qnx" } set isHelpRequire false @@ -324,6 +324,7 @@ proc genproj {theFormat args} { vc14 - Visual Studio 2015 vc141 - Visual Studio 2017 vc142 - Visual Studio 2019 + vc143 - Visual Studio 2022 vclang - Visual Studio with ClangCL toolset cbp - CodeBlocks xcd - XCode @@ -560,6 +561,7 @@ proc OS:MKPRC { theOutDir theFormat theLibType thePlatform theCmpl theSolution } "vc14" - "vc141" - "vc142" - + "vc143" - "vclang" { OS:MKVC $anOutDir $aModules $aTools $theSolution $theFormat $isUWP} "cbp" { OS:MKCBP $anOutDir $aModules $theSolution $thePlatform $theCmpl } "xcd" { @@ -1014,8 +1016,8 @@ proc osutils:vcsolution:header { vcversion } { append var \ "Microsoft Visual Studio Solution File, Format Version 12.00\n" \ "# Visual Studio 2013\n" - } elseif { "$vcversion" == "vc14" || "$vcversion" == "vc141" || - "$vcversion" == "vc142" || "$vcversion" == "vclang" } { + } elseif { "$vcversion" == "vc14" || "$vcversion" == "vc141" || + "$vcversion" == "vc142" || "$vcversion" == "vc143" || "$vcversion" == "vclang" } { append var \ "Microsoft Visual Studio Solution File, Format Version 12.00\n" \ "# Visual Studio 14\n" @@ -1290,6 +1292,9 @@ proc osutils:vcproj:readtemplate {theVcVer isUWP isExec} { } elseif { $theVcVer == "vc142" } { set aVCRTVer "vc14" set aToolset "v142" + } elseif { $theVcVer == "vc143" } { + set aVCRTVer "vc14" + set aToolset "v143" } elseif { $theVcVer == "vclang" } { set aVCRTVer "vc14" set aToolset "ClangCL" diff --git a/adm/templates/env.bat b/adm/templates/env.bat index a02bea526a..c2c2042432 100644 --- a/adm/templates/env.bat +++ b/adm/templates/env.bat @@ -121,8 +121,12 @@ if not "%DevEnvDir%" == "" ( for /f "usebackq delims=" %%i in (`vswhere.exe -version "[16.0,16.99]" -latest -requires Microsoft.VisualStudio.Workload.%VCPROP% -property installationPath`) do ( set "DevEnvDir=%%i\Common7\IDE\" ) +) else if /I "%VCFMT%" == "vc143" ( + for /f "usebackq delims=" %%i in (`vswhere.exe -version "[17.0,17.99]" -latest -requires Microsoft.VisualStudio.Workload.%VCPROP% -property installationPath`) do ( + set "DevEnvDir=%%i\Common7\IDE\" + ) ) else if /I "%VCFMT%" == "vclang" ( - for /f "usebackq delims=" %%i in (`vswhere.exe -version "[16.0,16.99]" -latest -requires Microsoft.VisualStudio.Workload.%VCPROP% -property installationPath`) do ( + for /f "usebackq delims=" %%i in (`vswhere.exe -version "[16.0,17.99]" -latest -requires Microsoft.VisualStudio.Workload.%VCPROP% -property installationPath`) do ( set "DevEnvDir=%%i\Common7\IDE\" ) ) else if /I "%VCFMT%" == "gcc" ( @@ -137,6 +141,7 @@ if not "%DevEnvDir%" == "" ( echo vc14 = VS 2015 echo vc141 = VS 2017 echo vc142 = VS 2019 + echo vc143 = VS 2022 echo vclang = VS 2019 with ClangCL toolset exit /B ) @@ -167,10 +172,15 @@ if /I "%VCFMT%" == "vc9" ( set "VCVARS=%%i\VC\Auxiliary\Build\vcvarsall.bat" ) set "VCPlatformToolSet=v142" -) else if /I "%VCFMT%" == "vclang" ( - for /f "usebackq delims=" %%i in (`vswhere.exe -version "[16.0,16.99]" -latest -requires Microsoft.VisualStudio.Workload.%VCPROP% -property installationPath`) do ( +) else if /I "%VCFMT%" == "vc143" ( + for /f "usebackq delims=" %%i in (`vswhere.exe -version "[17.0,17.99]" -latest -requires Microsoft.VisualStudio.Workload.%VCPROP% -property installationPath`) do ( set "VCVARS=%%i\VC\Auxiliary\Build\vcvarsall.bat" ) + set "VCPlatformToolSet=v143" +) else if /I "%VCFMT%" == "vclang" ( + for /f "usebackq delims=" %%i in (`vswhere.exe -version "[16.0,17.99]" -latest -requires Microsoft.VisualStudio.Workload.%VCPROP% -property installationPath`) do ( + set "VCVARS=%%i\VC\Auxiliary\Build\vcvarsall.bat" + ) set "VCPlatformToolSet=ClangCL" ) else if /I "%VCFMT%" == "gcc" ( rem MinGW From 4e61131a1c2b196c359a75ea3a57082b3b2c637c Mon Sep 17 00:00:00 2001 From: kgv Date: Sat, 16 Oct 2021 12:22:12 +0300 Subject: [PATCH 101/639] 0032626: Samples - add Qt::WA_NativeWindow attribute to Qt IESample --- samples/qt/Common/src/View.cxx | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/samples/qt/Common/src/View.cxx b/samples/qt/Common/src/View.cxx index 6d7641940b..60e11610db 100755 --- a/samples/qt/Common/src/View.cxx +++ b/samples/qt/Common/src/View.cxx @@ -95,6 +95,7 @@ View::View( Handle(AIS_InteractiveContext) theContext, QWidget* parent ) myCurZoom = 0; setAttribute(Qt::WA_PaintOnScreen); setAttribute(Qt::WA_NoSystemBackground); + setAttribute(Qt::WA_NativeWindow); myDefaultGestures = myMouseGestureMap; myCurrentMode = CurAction3d_Nothing; @@ -106,8 +107,6 @@ View::View( Handle(AIS_InteractiveContext) theContext, QWidget* parent ) setBackgroundRole( QPalette::NoRole );//NoBackground ); // set focus policy to threat QContextMenuEvent from keyboard setFocusPolicy( Qt::StrongFocus ); - setAttribute( Qt::WA_PaintOnScreen ); - setAttribute( Qt::WA_NoSystemBackground ); init(); } From f8d8c3f2bc1279d18212540dfa2588b6b1f97870 Mon Sep 17 00:00:00 2001 From: jgv Date: Mon, 18 Oct 2021 20:00:20 +0300 Subject: [PATCH 102/639] 0032623: [Regression] Modelling Algorithms - UnifySameDomain invalid result only in release mode Correct local function ReconstructMissedSeam: use copy of existing pcurve for seam edge reconstruction to prevent possible corruption of another edges. --- .../ShapeUpgrade_UnifySameDomain.cxx | 18 +++++++++-------- tests/bugs/heal/bug32623 | 20 +++++++++++++++++++ 2 files changed, 30 insertions(+), 8 deletions(-) create mode 100644 tests/bugs/heal/bug32623 diff --git a/src/ShapeUpgrade/ShapeUpgrade_UnifySameDomain.cxx b/src/ShapeUpgrade/ShapeUpgrade_UnifySameDomain.cxx index 8d0e45aedc..f9185088b2 100644 --- a/src/ShapeUpgrade/ShapeUpgrade_UnifySameDomain.cxx +++ b/src/ShapeUpgrade/ShapeUpgrade_UnifySameDomain.cxx @@ -699,6 +699,8 @@ static void ReconstructMissedSeam(const TopTools_SequenceOfShape& theEdges, { //make edge a real seam edge with 2 pcurves on ref face Handle(Geom2d_Curve) aPC = BRep_Tool::CurveOnSurface (MissedSeam, theFrefFace, Param1, Param2); + Handle(Geom2d_Curve) aCopyPC = Handle(Geom2d_Curve)::DownCast(aPC->Copy()); + gp_Pnt2d aP2d = aPC->Value(Param1); if (Abs(aP2d.Coord(IndCoord) - theCurPoint.Coord(IndCoord)) > thePeriod/2) { @@ -713,18 +715,18 @@ static void ReconstructMissedSeam(const TopTools_SequenceOfShape& theEdges, else Offset.SetCoord (0., anOffset); - aPC->Translate(Offset); + aCopyPC->Translate(Offset); } gp_Pnt2d aFirstP2d, aLastP2d; if (MissedSeam.Orientation() == TopAbs_FORWARD) { - aFirstP2d = aPC->Value(Param1); - aLastP2d = aPC->Value(Param2); + aFirstP2d = aCopyPC->Value(Param1); + aLastP2d = aCopyPC->Value(Param2); } else { - aFirstP2d = aPC->Value(Param2); - aLastP2d = aPC->Value(Param1); + aFirstP2d = aCopyPC->Value(Param2); + aLastP2d = aCopyPC->Value(Param1); } if (theIsU) { @@ -740,16 +742,16 @@ static void ReconstructMissedSeam(const TopTools_SequenceOfShape& theEdges, else Offset.SetCoord (0., -thePeriod); } - Handle(Geom2d_Curve) AnotherPC = Handle(Geom2d_Curve)::DownCast(aPC->Copy()); + Handle(Geom2d_Curve) AnotherPC = Handle(Geom2d_Curve)::DownCast(aCopyPC->Copy()); AnotherPC->Translate(Offset); TopoDS_Edge F_MissedSeam = MissedSeam; F_MissedSeam.Orientation (TopAbs_FORWARD); Handle(Geom2d_Curve) NullPC; BB.UpdateEdge (F_MissedSeam, NullPC, theFrefFace, 0.); if (MissedSeam.Orientation() == TopAbs_FORWARD) - BB.UpdateEdge (F_MissedSeam, aPC, AnotherPC, theFrefFace, 0.); + BB.UpdateEdge (F_MissedSeam, aCopyPC, AnotherPC, theFrefFace, 0.); else - BB.UpdateEdge (F_MissedSeam, AnotherPC, aPC, theFrefFace, 0.); + BB.UpdateEdge (F_MissedSeam, AnotherPC, aCopyPC, theFrefFace, 0.); } BB.Continuity(MissedSeam, theFrefFace, theFrefFace, aContinuity); diff --git a/tests/bugs/heal/bug32623 b/tests/bugs/heal/bug32623 new file mode 100644 index 0000000000..dfd097f64a --- /dev/null +++ b/tests/bugs/heal/bug32623 @@ -0,0 +1,20 @@ +puts "=============================================================" +puts "OCC32623: UnifySameDomain invalid result only in release mode" +puts "=============================================================" +puts "" + +restore [locate_data_file bug32623.brep] a + +unifysamedom result a + +checkshape result + +checknbshapes result -t -solid 1 -shell 1 -face 58 -wire 68 -edge 163 -vertex 107 + +set tolres [checkmaxtol result] + +if { ${tolres} > 2.e-5} { + puts "Error: bad tolerance of result" +} + +checkprops result -s 56934.4 -v 244645 From 7e63845c9e305355d3b2ecab4d8c854361a59cf4 Mon Sep 17 00:00:00 2001 From: mpv Date: Tue, 31 Aug 2021 14:46:23 +0300 Subject: [PATCH 103/639] =?UTF-8?q?0026981:=20Application=20Framework=20-?= =?UTF-8?q?=20read=20a=20BinOcaf=20document=20from=20=D0=A1++=20stream=20s?= =?UTF-8?q?equentially?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The current version of the document supports partial reading. So, as a result, the shapes section is dispersed into attributes and it becomes easy avoid any seekg call during the reading. But this will work only in case whole document is opened. For partial reading seekg functions could be naturally called. --- .../BinLDrivers_DocumentRetrievalDriver.cxx | 37 ++++++++++--------- 1 file changed, 20 insertions(+), 17 deletions(-) diff --git a/src/BinLDrivers/BinLDrivers_DocumentRetrievalDriver.cxx b/src/BinLDrivers/BinLDrivers_DocumentRetrievalDriver.cxx index b55f032ebc..9d35102059 100644 --- a/src/BinLDrivers/BinLDrivers_DocumentRetrievalDriver.cxx +++ b/src/BinLDrivers/BinLDrivers_DocumentRetrievalDriver.cxx @@ -226,7 +226,6 @@ void BinLDrivers_DocumentRetrievalDriver::Read (Standard_IStream& mySections.Clear(); myPAtt.Init(); Handle(TDF_Data) aData = (!theFilter.IsNull() && theFilter->IsAppendMode()) ? aDoc->GetData() : new TDF_Data(); - std::streampos aDocumentPos = -1; Message_ProgressScope aPS (theRange, "Reading data", 3); Standard_Boolean aQuickPart = IsQuickPart (aFileVer); @@ -246,29 +245,33 @@ void BinLDrivers_DocumentRetrievalDriver::Read (Standard_IStream& return; } - aDocumentPos = theIStream.tellg(); // position of root label BinLDrivers_VectorOfDocumentSection::Iterator anIterS (mySections); - for (; anIterS.More(); anIterS.Next()) { - BinLDrivers_DocumentSection& aCurSection = anIterS.ChangeValue(); - if (aCurSection.IsPostRead() == Standard_False) { - theIStream.seekg ((std::streampos) aCurSection.Offset()); - if (aCurSection.Name().IsEqual (SHAPESECTION_POS)) - { - ReadShapeSection (aCurSection, theIStream, false, aPS.Next()); - if (!aPS.More()) + // if there is only empty section, do not call tellg and seekg + if (!mySections.IsEmpty() && (mySections.Size() > 1 || !anIterS.Value().Name().IsEqual(ENDSECTION_POS))) + { + std::streampos aDocumentPos = theIStream.tellg(); // position of root label + for (; anIterS.More(); anIterS.Next()) { + BinLDrivers_DocumentSection& aCurSection = anIterS.ChangeValue(); + if (aCurSection.IsPostRead() == Standard_False) { + theIStream.seekg ((std::streampos) aCurSection.Offset()); + if (aCurSection.Name().IsEqual (SHAPESECTION_POS)) { - myReaderStatus = PCDM_RS_UserBreak; - return; + ReadShapeSection (aCurSection, theIStream, false, aPS.Next()); + if (!aPS.More()) + { + myReaderStatus = PCDM_RS_UserBreak; + return; + } } + else if (!aCurSection.Name().IsEqual (ENDSECTION_POS)) + ReadSection (aCurSection, theDoc, theIStream); } - else if (!aCurSection.Name().IsEqual (ENDSECTION_POS)) - ReadSection (aCurSection, theDoc, theIStream); } + theIStream.seekg(aDocumentPos); } } else { //aFileVer < 3 - aDocumentPos = theIStream.tellg(); // position of root label - + std::streampos aDocumentPos = theIStream.tellg(); // position of root label // retrieve SHAPESECTION_POS string char aShapeSecLabel[SIZEOFSHAPELABEL + 1]; aShapeSecLabel[SIZEOFSHAPELABEL] = 0x00; @@ -309,10 +312,10 @@ void BinLDrivers_DocumentRetrievalDriver::Read (Standard_IStream& } } } + theIStream.seekg(aDocumentPos); } // end of reading Sections or shape section // Return to read of the Document structure - theIStream.seekg(aDocumentPos); // read the header (tag) of the root label Standard_Integer aTag; From 2c8c4b8086cf23873f520210ccb39a8262ca53f0 Mon Sep 17 00:00:00 2001 From: kgv Date: Mon, 18 Oct 2021 16:26:59 +0300 Subject: [PATCH 104/639] 0032629: Configuration, scripts - add USE_PTHREADS building option to wasm_build.bat --- adm/scripts/wasm_build.bat | 10 ++++++++- adm/scripts/wasm_custom.bat.template | 3 ++- adm/scripts/wasm_sample_build.bat | 10 ++++++++- samples/webgl/CMakeLists.txt | 7 +++++-- src/DRAWEXE/CMakeLists.txt | 13 +++++++++--- src/OSD/OSD_Process.cxx | 2 ++ .../STEPConstruct_AP203Context.cxx | 21 ++++++++++++------- 7 files changed, 51 insertions(+), 15 deletions(-) diff --git a/adm/scripts/wasm_build.bat b/adm/scripts/wasm_build.bat index ba664da14f..4ef9a61f73 100644 --- a/adm/scripts/wasm_build.bat +++ b/adm/scripts/wasm_build.bat @@ -38,6 +38,7 @@ rem Optional 3rd-party libraries to enable set "USE_FREETYPE=ON" set "USE_RAPIDJSON=OFF" set "USE_DRACO=OFF" +set "USE_PTHREADS=OFF" rem Archive tool set "THE_7Z_PARAMS=-t7z -m0=lzma -mx=9 -mfb=64 -md=32m -ms=on" @@ -59,9 +60,14 @@ for /f %%i in ('git symbolic-ref --short HEAD') do ( set "aGitBranch=%%i" ) set "aBuildType=Release" set "aBuildTypePrefix=" +set "anExtraCxxFlags=" +if /I ["%USE_PTHREADS%"] == ["ON"] ( + set "anExtraCxxFlags=-pthread" + set "aBuildTypePrefix=%aBuildTypePrefix%-pthread" +) if ["%toDebug%"] == ["1"] ( set "aBuildType=Debug" - set "aBuildTypePrefix=-debug" + set "aBuildTypePrefix=%aBuildTypePrefix%-debug" ) call :cmakeGenerate @@ -159,6 +165,7 @@ if ["%toCMake%"] == ["1"] ( -D CMAKE_TOOLCHAIN_FILE:FILEPATH="%aToolchain%" ^ -D CMAKE_BUILD_TYPE:STRING="%aBuildType%" ^ -D BUILD_LIBRARY_TYPE:STRING="Static" ^ + -D CMAKE_CXX_FLAGS="%anExtraCxxFlags%" ^ -D INSTALL_DIR:PATH="%aDestDir%" ^ -D INSTALL_DIR_INCLUDE:STRING="inc" ^ -D INSTALL_DIR_RESOURCE:STRING="src" ^ @@ -256,6 +263,7 @@ if ["%toCMake%"] == ["1"] ( cmake -G "MinGW Makefiles" ^ -D CMAKE_TOOLCHAIN_FILE:FILEPATH="%aToolchain%" ^ -D CMAKE_BUILD_TYPE:STRING="%aBuildType%" ^ + -D CMAKE_CXX_FLAGS="%anExtraCxxFlags%" ^ -D CMAKE_INSTALL_PREFIX:PATH="%aDestDirSmpl%" ^ -D SOURCE_MAP_BASE:STRING="%sourceMapBase%" ^ -D OpenCASCADE_DIR:PATH="%aDestDir%/lib/cmake/opencascade" ^ diff --git a/adm/scripts/wasm_custom.bat.template b/adm/scripts/wasm_custom.bat.template index caeaf09938..0c52467a6a 100644 --- a/adm/scripts/wasm_custom.bat.template +++ b/adm/scripts/wasm_custom.bat.template @@ -24,5 +24,6 @@ rem set "BUILD_Visualization=ON" rem set "BUILD_ApplicationFramework=ON" rem set "BUILD_DataExchange=ON" -rem set "USE_RAPIDJSON=OFF" +rem set "USE_RAPIDJSON=ON" rem set "USE_DRACO=ON" +rem set "USE_PTHREADS=ON" diff --git a/adm/scripts/wasm_sample_build.bat b/adm/scripts/wasm_sample_build.bat index fd9a33b301..ca7b5a095e 100644 --- a/adm/scripts/wasm_sample_build.bat +++ b/adm/scripts/wasm_sample_build.bat @@ -21,6 +21,8 @@ set "toInstall=1" set "toDebug=0" set "sourceMapBase=" +set "USE_PTHREADS=OFF" + rem Configuration file if exist "%~dp0wasm_custom.bat" call "%~dp0wasm_custom.bat" @@ -30,9 +32,14 @@ if not ["%aCmakeBin%"] == [""] ( set "PATH=%aCmakeBin%;%PATH%" ) set "aBuildType=Release" set "aBuildTypePrefix=" +set "anExtraCxxFlags=" +if /I ["%USE_PTHREADS%"] == ["ON"] ( + set "anExtraCxxFlags=-pthread" + set "aBuildTypePrefix=%aBuildTypePrefix%-pthread" +) if ["%toDebug%"] == ["1"] ( set "aBuildType=Debug" - set "aBuildTypePrefix=-debug" + set "aBuildTypePrefix=%aBuildTypePrefix%-debug" ) call :cmakeGenerate @@ -64,6 +71,7 @@ if ["%toCMake%"] == ["1"] ( cmake -G "MinGW Makefiles" ^ -D CMAKE_TOOLCHAIN_FILE:FILEPATH="%aToolchain%" ^ -D CMAKE_BUILD_TYPE:STRING="%aBuildType%" ^ + -D CMAKE_CXX_FLAGS="%anExtraCxxFlags%" ^ -D CMAKE_INSTALL_PREFIX:PATH="%aDestDirSmpl%" ^ -D SOURCE_MAP_BASE:STRING="%sourceMapBase%" ^ -D OpenCASCADE_DIR:PATH="%aDestDirOcct%/lib/cmake/opencascade" ^ diff --git a/samples/webgl/CMakeLists.txt b/samples/webgl/CMakeLists.txt index 6243aca7b6..5a2a323aa9 100644 --- a/samples/webgl/CMakeLists.txt +++ b/samples/webgl/CMakeLists.txt @@ -77,5 +77,8 @@ if (NOT "${SOURCE_MAP_BASE}" STREQUAL "") endif() endif() install(FILES occt-webgl-sample.html DESTINATION ${CMAKE_INSTALL_PREFIX}) -install(FILES ${OpenCASCADE_RESOURCE_DIR}/DrawResources/OCC_logo.png DESTINATION ${CMAKE_INSTALL_PREFIX}) -install(FILES ${OpenCASCADE_RESOURCE_DIR}/DrawResources/lamp.ico DESTINATION ${CMAKE_INSTALL_PREFIX}) +install(FILES ${OpenCASCADE_RESOURCE_DIR}/DrawResources/OCC_logo.png DESTINATION ${CMAKE_INSTALL_PREFIX}) +install(FILES ${OpenCASCADE_RESOURCE_DIR}/DrawResources/lamp.ico DESTINATION ${CMAKE_INSTALL_PREFIX}) +if (CMAKE_CXX_FLAGS MATCHES "-pthread") + install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}.worker.js DESTINATION ${CMAKE_INSTALL_PREFIX}) +endif() diff --git a/src/DRAWEXE/CMakeLists.txt b/src/DRAWEXE/CMakeLists.txt index 4d93a4d690..c1d03299bd 100644 --- a/src/DRAWEXE/CMakeLists.txt +++ b/src/DRAWEXE/CMakeLists.txt @@ -62,7 +62,14 @@ if (EMSCRIPTEN) # In case of WebAssembly build $tcl_library looks like "tcl8.6.11/library" by default. set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} --preload-file ${3RDPARTY_TCL_LIBRARY_DIR}/tcl${TCL_MAJOR_VERSION}.${TCL_MINOR_VERSION}@/tcl${TCL_MAJOR_VERSION}.${TCL_MINOR_VERSION}.${TCL_RELEASE_SERIAL}/library") - install(FILES ${PROJECT_NAME}.html DESTINATION "${INSTALL_DIR_BIN}/${OCCT_INSTALL_BIN_LETTER}") - install(FILES ../DrawResources/lamp.ico DESTINATION "${INSTALL_DIR_BIN}/${OCCT_INSTALL_BIN_LETTER}") - install(FILES ${CMAKE_BINARY_DIR}/${OS_WITH_BIT}/${COMPILER}/bin\${OCCT_INSTALL_BIN_LETTER}/${PROJECT_NAME}.data DESTINATION "${INSTALL_DIR_BIN}/${OCCT_INSTALL_BIN_LETTER}") + install(FILES ${PROJECT_NAME}.html + DESTINATION "${INSTALL_DIR_BIN}/${OCCT_INSTALL_BIN_LETTER}") + install(FILES ../DrawResources/lamp.ico + DESTINATION "${INSTALL_DIR_BIN}/${OCCT_INSTALL_BIN_LETTER}") + install(FILES ${CMAKE_BINARY_DIR}/${OS_WITH_BIT}/${COMPILER}/bin\${OCCT_INSTALL_BIN_LETTER}/${PROJECT_NAME}.data + DESTINATION "${INSTALL_DIR_BIN}/${OCCT_INSTALL_BIN_LETTER}") + if (CMAKE_CXX_FLAGS MATCHES "-pthread") + install(FILES ${CMAKE_BINARY_DIR}/${OS_WITH_BIT}/${COMPILER}/bin\${OCCT_INSTALL_BIN_LETTER}/${PROJECT_NAME}.worker.js + DESTINATION "${INSTALL_DIR_BIN}/${OCCT_INSTALL_BIN_LETTER}") + endif() endif() diff --git a/src/OSD/OSD_Process.cxx b/src/OSD/OSD_Process.cxx index bb530e9b15..acd7f5ca21 100644 --- a/src/OSD/OSD_Process.cxx +++ b/src/OSD/OSD_Process.cxx @@ -41,7 +41,9 @@ #include #include #include + #if !defined(__EMSCRIPTEN__) #include // For command getpwuid + #endif #include #endif diff --git a/src/STEPConstruct/STEPConstruct_AP203Context.cxx b/src/STEPConstruct/STEPConstruct_AP203Context.cxx index a5cae628cd..bf25416ef9 100644 --- a/src/STEPConstruct/STEPConstruct_AP203Context.cxx +++ b/src/STEPConstruct/STEPConstruct_AP203Context.cxx @@ -60,8 +60,8 @@ #include #include -#ifndef _WIN32 -# include +#if !defined(_WIN32) && !defined(__ANDROID__) && !defined(__EMSCRIPTEN__) + #include #endif //======================================================================= @@ -180,12 +180,19 @@ Handle(StepBasic_PersonAndOrganization) STEPConstruct_AP203Context::DefaultPerso // construct person`s name OSD_Process sys; TCollection_AsciiString user (sys.UserName()); -#if !defined(_WIN32) && !defined(__ANDROID__) - if ( !user.IsEmpty() ) { - struct passwd *pwd = getpwnam ( user.ToCString() ); - if ( pwd ) user = pwd->pw_gecos; +#if !defined(_WIN32) && !defined(__ANDROID__) && !defined(__EMSCRIPTEN__) + if (!user.IsEmpty()) + { + struct passwd* aPwd = getpwnam (user.ToCString()); + if (aPwd != NULL) + { + user = aPwd->pw_gecos; + } + } + else + { + user = "Unknown"; } - else user = "Unknown"; #endif Handle(TCollection_HAsciiString) fname = new TCollection_HAsciiString (""); Handle(TCollection_HAsciiString) lname = new TCollection_HAsciiString (""); From 005caf39cf8d506525a6ffa02f4d69d0cc4f714d Mon Sep 17 00:00:00 2001 From: kgv Date: Tue, 19 Oct 2021 21:34:18 +0300 Subject: [PATCH 105/639] 0032633: Draw Harness - extend command incmesh to apply default visualization parameters incmesh - added -prs option to use StdPrs_ToolTriangulatedShape::GetDeflection() as meshing parameters. vdisplay, XDisplay - added -autoTriangulation option to manage meshing behavior before displaying a shape. trinfo - added output of meshing parameters. Fixed broken incmesh syntax usage in several test cases. --- src/DrawResources/CheckCommands.tcl | 2 +- src/MeshTest/MeshTest.cxx | 305 +++++++++++---------- src/ViewerTest/ViewerTest.cxx | 25 +- src/XDEDRAW/XDEDRAW.cxx | 43 ++- tests/bugs/mesh/bug25281 | 2 +- tests/hlr/poly_hlr/bug23625_1 | 2 +- tests/mesh/advanced_incmesh/begin | 2 +- tests/mesh/advanced_incmesh_parallel/begin | 2 +- tests/mesh/end | 10 +- tests/mesh/standard_incmesh/begin | 2 +- tests/mesh/standard_incmesh_parallel/begin | 2 +- tests/perf/mesh/bug26889_1 | 2 +- tests/perf/mesh/bug26889_2 | 2 +- tests/perf/mesh/bug26889_3 | 2 +- tests/v3d/bugs/bug23200_1 | 4 +- 15 files changed, 230 insertions(+), 177 deletions(-) diff --git a/src/DrawResources/CheckCommands.tcl b/src/DrawResources/CheckCommands.tcl index e0b5c33f46..e39a130e23 100644 --- a/src/DrawResources/CheckCommands.tcl +++ b/src/DrawResources/CheckCommands.tcl @@ -999,7 +999,7 @@ proc checktrinfo {shape args} { # get current number of faces, triangles and nodes, value of max deflection set tri_info [trinfo ${shape}] - set triinfo_pattern "(\[0-9\]+) +faces(.*\[^0-9]\(\[0-9\]+) +empty faces)?.*\[^0-9]\(\[0-9\]+) +triangles.*\[^0-9]\(\[0-9\]+) +nodes.*deflection +(\[-0-9.+eE\]+)" + set triinfo_pattern "(\[0-9\]+) +faces(.*\[^0-9]\(\[0-9\]+) +empty faces)?.*\[^0-9]\(\[0-9\]+) +triangles.*\[^0-9]\(\[0-9\]+) +nodes.*Maximal deflection +(\[-0-9.+eE\]+)" if {![regexp "${triinfo_pattern}" ${tri_info} dump cur_nb_faces tmp cur_nb_empty_faces cur_nb_triangles cur_nb_nodes cur_deflection]} { puts "Error: command trinfo prints empty info" } diff --git a/src/MeshTest/MeshTest.cxx b/src/MeshTest/MeshTest.cxx index 234081dad9..83da94bd47 100644 --- a/src/MeshTest/MeshTest.cxx +++ b/src/MeshTest/MeshTest.cxx @@ -42,6 +42,9 @@ #include #include #include +#include +#include +#include #include #include #include @@ -80,83 +83,71 @@ OSD_Chronometer chIsos, chPointsOnIsos; //function : incrementalmesh //purpose : //======================================================================= -static Standard_Integer incrementalmesh(Draw_Interpretor& di, Standard_Integer nbarg, const char** argv) +static Standard_Integer incrementalmesh (Draw_Interpretor& theDI, + Standard_Integer theNbArgs, + const char** theArgVec) { - if (nbarg < 3) + if (theNbArgs < 3) { - di << "\ -Builds triangular mesh for the shape\n\ -usage: incmesh Shape LinearDeflection [options]\n\ -options:\n\ - -a val angular deflection for edges in deg\n\ - (default ~28.64 deg = 0.5 rad)\n\n\ - -ai val angular deflection inside of faces in deg\n\ - (default ~57.29 deg = 1 rad)\n\n\ - -di val Linear deflection used to tessellate the face interior.\n\ - -min minimum size parameter limiting size of triangle's\n\ - edges to prevent sinking into amplification in case\n\ - of distorted curves and surfaces\n\n\ - -relative notifies that relative deflection is used\n\ - (switched off by default)\n\n\ - -int_vert_off disables insertion of internal vertices into mesh\n\ - (enabled by default)\n\ - -surf_def_off disables control of deflection of mesh from real\n\ - surface (enabled by default)\n\ - -parallel enables parallel execution (switched off by default)\n\ - -adjust_min enables local adjustment of min size depending on edge size (switched off by default)\n\ - -force_face_def disables usage of shape tolerances for computing face deflection (switched off by default)\n\ - -decrease enforces the meshing of the shape even if current mesh satisfies the new criteria\ - (switched off by default).\n\ - -algo {watson|delabella} changes core triangulation algorithm to one with specified id (watson is used by default)\n"; - return 0; + theDI << "Syntax error: wrong number of arguments"; + return 1; } + TopoDS_ListOfShape aListOfShapes; IMeshTools_Parameters aMeshParams; - Standard_Boolean isDeflectionInitialized = Standard_False; + bool hasDefl = false, hasAngDefl = false, isPrsDefl = false; - Handle (IMeshTools_Context) aContext = new BRepMesh_Context; - for (Standard_Integer anArgIter = 1; anArgIter < nbarg; ++anArgIter) + Handle(IMeshTools_Context) aContext = new BRepMesh_Context(); + for (Standard_Integer anArgIter = 1; anArgIter < theNbArgs; ++anArgIter) { - TCollection_AsciiString aName = argv[anArgIter]; - TCollection_AsciiString aNameCase = aName; + TCollection_AsciiString aNameCase (theArgVec[anArgIter]); aNameCase.LowerCase(); - - if (aNameCase == "") - continue; - else if (aNameCase == "-relative") - aMeshParams.Relative = Standard_True; - else if (aNameCase == "-parallel") - aMeshParams.InParallel = Standard_True; + if (aNameCase == "-relative" + || aNameCase == "-norelative") + { + aMeshParams.Relative = Draw::ParseOnOffNoIterator (theNbArgs, theArgVec, anArgIter); + } + else if (aNameCase == "-parallel" + || aNameCase == "-noparallel") + { + aMeshParams.InParallel = Draw::ParseOnOffNoIterator (theNbArgs, theArgVec, anArgIter); + } else if (aNameCase == "-int_vert_off") - aMeshParams.InternalVerticesMode = Standard_False; + { + aMeshParams.InternalVerticesMode = !Draw::ParseOnOffIterator (theNbArgs, theArgVec, anArgIter); + } else if (aNameCase == "-surf_def_off") - aMeshParams.ControlSurfaceDeflection = Standard_False; + { + aMeshParams.ControlSurfaceDeflection = !Draw::ParseOnOffIterator (theNbArgs, theArgVec, anArgIter); + } else if (aNameCase == "-adjust_min") - aMeshParams.AdjustMinSize = Standard_True; + { + aMeshParams.AdjustMinSize = Draw::ParseOnOffNoIterator (theNbArgs, theArgVec, anArgIter); + } else if (aNameCase == "-force_face_def") - aMeshParams.ForceFaceDeflection = Standard_True; + { + aMeshParams.ForceFaceDeflection = Draw::ParseOnOffNoIterator (theNbArgs, theArgVec, anArgIter); + } else if (aNameCase == "-decrease") - aMeshParams.AllowQualityDecrease = Standard_True; - else if (aNameCase == "-algo") { - if (++anArgIter >= nbarg) - { - di << "Error: wrong syntax at " << aNameCase; - return 1; - } - TCollection_AsciiString anAlgoStr (argv[anArgIter]); + aMeshParams.AllowQualityDecrease = Draw::ParseOnOffNoIterator (theNbArgs, theArgVec, anArgIter); + } + else if (aNameCase == "-algo" + && anArgIter + 1 < theNbArgs) + { + TCollection_AsciiString anAlgoStr (theArgVec[++anArgIter]); anAlgoStr.LowerCase(); if (anAlgoStr == "watson" || anAlgoStr == "0") { aMeshParams.MeshAlgo = IMeshTools_MeshAlgoType_Watson; - aContext->SetFaceDiscret (new BRepMesh_FaceDiscret (new BRepMesh_MeshAlgoFactory)); + aContext->SetFaceDiscret (new BRepMesh_FaceDiscret (new BRepMesh_MeshAlgoFactory())); } else if (anAlgoStr == "delabella" || anAlgoStr == "1") { aMeshParams.MeshAlgo = IMeshTools_MeshAlgoType_Delabella; - aContext->SetFaceDiscret (new BRepMesh_FaceDiscret (new BRepMesh_DelabellaMeshAlgoFactory)); + aContext->SetFaceDiscret (new BRepMesh_FaceDiscret (new BRepMesh_DelabellaMeshAlgoFactory())); } else if (anAlgoStr == "-1" || anAlgoStr == "default") @@ -166,89 +157,82 @@ options:\n\ } else { - di << "Syntax error at " << anAlgoStr; + theDI << "Syntax error at '" << anAlgoStr << "'"; return 1; } } - else if (aNameCase == "-a") + else if ((aNameCase == "-prs" + || aNameCase == "-presentation" + || aNameCase == "-vis" + || aNameCase == "-visualization") + && !isPrsDefl) { - if (++anArgIter >= nbarg) - { - di << "Error: wrong syntax at " << aNameCase; - return 1; - } - Standard_Real aVal = Draw::Atof (argv[anArgIter]) * M_PI / 180.; + isPrsDefl = true; + } + else if ((aNameCase == "-angular" + || aNameCase == "-angdefl" + || aNameCase == "-angulardeflection" + || aNameCase == "-a") + && anArgIter + 1 < theNbArgs) + { + Standard_Real aVal = Draw::Atof (theArgVec[++anArgIter]) * M_PI / 180.; if (aVal <= Precision::Angular()) { - di << "Syntax error: invalid input parameter '" << argv[anArgIter] << "'"; + theDI << "Syntax error: invalid input parameter '" << theArgVec[anArgIter] << "'"; return 1; } aMeshParams.Angle = aVal; + hasAngDefl = true; } - else if (aNameCase == "-ai") + else if (aNameCase == "-ai" + && anArgIter + 1 < theNbArgs) { - if (++anArgIter >= nbarg) - { - di << "Error: wrong syntax at " << aNameCase; - return 1; - } - Standard_Real aVal = Draw::Atof (argv[anArgIter]) * M_PI / 180.; + Standard_Real aVal = Draw::Atof (theArgVec[++anArgIter]) * M_PI / 180.; if (aVal <= Precision::Angular()) { - di << "Syntax error: invalid input parameter '" << argv[anArgIter] << "'"; + theDI << "Syntax error: invalid input parameter '" << theArgVec[anArgIter] << "'"; return 1; } aMeshParams.AngleInterior = aVal; } - else if (aNameCase == "-min") + else if (aNameCase == "-min" + && anArgIter + 1 < theNbArgs) { - if (++anArgIter >= nbarg) - { - di << "Error: wrong syntax at " << aNameCase; - return 1; - } - Standard_Real aVal = Draw::Atof (argv[anArgIter]); + Standard_Real aVal = Draw::Atof (theArgVec[++anArgIter]); if (aVal <= Precision::Confusion()) { - di << "Syntax error: invalid input parameter '" << argv[anArgIter] << "'"; + theDI << "Syntax error: invalid input parameter '" << theArgVec[anArgIter] << "'"; return 1; } aMeshParams.MinSize = aVal; } - else if (aNameCase == "-di") + else if (aNameCase == "-di" + && anArgIter + 1 < theNbArgs) { - if (++anArgIter >= nbarg) - { - di << "Error: wrong syntax at " << aNameCase; - return 1; - } - Standard_Real aVal = Draw::Atof (argv[anArgIter]); + Standard_Real aVal = Draw::Atof (theArgVec[++anArgIter]); if (aVal <= Precision::Confusion()) { - di << "Syntax error: invalid input parameter '" << argv[anArgIter] << "'"; + theDI << "Syntax error: invalid input parameter '" << theArgVec[anArgIter] << "'"; return 1; } aMeshParams.DeflectionInterior = aVal; } - else if (aNameCase.IsRealValue (Standard_True)) + else if (aNameCase.IsRealValue (true) + && !hasDefl) { - if (isDeflectionInitialized) - { - continue; - } - aMeshParams.Deflection = Max (Draw::Atof (argv[anArgIter]), Precision::Confusion()); + aMeshParams.Deflection = Max (Draw::Atof (theArgVec[anArgIter]), Precision::Confusion()); if (aMeshParams.DeflectionInterior < Precision::Confusion()) { aMeshParams.DeflectionInterior = aMeshParams.Deflection; } - isDeflectionInitialized = Standard_True; + hasDefl = true; } else { - TopoDS_Shape aShape = DBRep::Get (aName); + TopoDS_Shape aShape = DBRep::Get (theArgVec[anArgIter]); if (aShape.IsNull()) { - di << "Syntax error: null shapes are not allowed here - " << aName <<"\n"; + theDI << "Syntax error: null shapes are not allowed here '" << theArgVec[anArgIter] << "'\n"; return 1; } aListOfShapes.Append (aShape); @@ -261,8 +245,8 @@ options:\n\ return 1; } - di << "Incremental Mesh, multi-threading " - << (aMeshParams.InParallel ? "ON" : "OFF") << "\n"; + theDI << "Incremental Mesh, multi-threading " + << (aMeshParams.InParallel ? "ON" : "OFF") << "\n"; TopoDS_Shape aShape; if (aListOfShapes.Size() == 1) @@ -279,64 +263,55 @@ options:\n\ } aShape = aCompound; } - Handle(Draw_ProgressIndicator) aProgress = new Draw_ProgressIndicator (di, 1); + + if (isPrsDefl) + { + Handle(Prs3d_Drawer) aDrawer = new Prs3d_Drawer(); + if (hasDefl) + { + aDrawer->SetDeviationCoefficient (aMeshParams.Deflection); + } + aMeshParams.Deflection = StdPrs_ToolTriangulatedShape::GetDeflection (aShape, aDrawer); + if (!hasAngDefl) + { + aMeshParams.Angle = aDrawer->DeviationAngle(); + } + } + + Handle(Draw_ProgressIndicator) aProgress = new Draw_ProgressIndicator (theDI, 1); BRepMesh_IncrementalMesh aMesher; aMesher.SetShape (aShape); aMesher.ChangeParameters() = aMeshParams; - aMesher.Perform (aContext, aProgress->Start()); - di << "Meshing statuses: "; + theDI << "Meshing statuses: "; const Standard_Integer aStatus = aMesher.GetStatusFlags(); - if (!aStatus) + if (aStatus == 0) { - di << "NoError"; + theDI << "NoError"; + return 0; } - else + + for (Standard_Integer i = 0; i < 9; i++) { - Standard_Integer i; - for (i = 0; i < 9; i++) + Standard_Integer aFlag = aStatus & (1 << i); + if (aFlag) { - Standard_Integer aFlag = aStatus & (1 << i); - if (aFlag) + switch ((IMeshData_Status) aFlag) { - switch ((IMeshData_Status) aFlag) - { - case IMeshData_OpenWire: - di << "OpenWire "; - break; - case IMeshData_SelfIntersectingWire: - di << "SelfIntersectingWire "; - break; - case IMeshData_Failure: - di << "Failure "; - break; - case IMeshData_ReMesh: - di << "ReMesh "; - break; - case IMeshData_UnorientedWire: - di << "UnorientedWire "; - break; - case IMeshData_TooFewPoints: - di << "TooFewPoints "; - break; - case IMeshData_Outdated: - di << "Outdated "; - break; - case IMeshData_Reused: - di << "Reused "; - break; - case IMeshData_UserBreak: - di << "User break"; - break; - case IMeshData_NoError: - default: - break; - } + case IMeshData_OpenWire: theDI << "OpenWire "; break; + case IMeshData_SelfIntersectingWire: theDI << "SelfIntersectingWire "; break; + case IMeshData_Failure: theDI << "Failure "; break; + case IMeshData_ReMesh: theDI << "ReMesh "; break; + case IMeshData_UnorientedWire: theDI << "UnorientedWire "; break; + case IMeshData_TooFewPoints: theDI << "TooFewPoints "; break; + case IMeshData_Outdated: theDI << "Outdated "; break; + case IMeshData_Reused: theDI << "Reused "; break; + case IMeshData_UserBreak: theDI << "UserBreak "; break; + case IMeshData_NoError: break; } } } - return 0; } @@ -757,7 +732,7 @@ static Standard_Integer trianglesinfo (Draw_Interpretor& theDI, Standard_Integer TopExp_Explorer anExp; Handle(Poly_Triangulation) aTriangulation; TopLoc_Location aLoc; - Standard_Real aMaxDeflection = 0.0; + Standard_Real aMaxDeflection = 0.0, aMeshingDefl = -1.0, aMeshingAngDefl = -1.0, aMeshingMinSize = -1.0; Standard_Integer aNbFaces = 0, aNbEmptyFaces = 0, aNbTriangles = 0, aNbNodes = 0, aNbRepresentations = 0; NCollection_IndexedDataMap aLODsStat; NCollection_Vector aNbLODs; @@ -770,9 +745,12 @@ static Standard_Integer trianglesinfo (Draw_Interpretor& theDI, Standard_Integer { aNbTriangles += aTriangulation->NbTriangles(); aNbNodes += aTriangulation->NbNodes(); - if (aTriangulation->Deflection() > aMaxDeflection) + aMaxDeflection = Max (aMaxDeflection, aTriangulation->Deflection()); + if (!aTriangulation->Parameters().IsNull()) { - aMaxDeflection = aTriangulation->Deflection(); + aMeshingDefl = Max (aMeshingDefl, aTriangulation->Parameters()->Deflection()); + aMeshingAngDefl = Max (aMeshingAngDefl, aTriangulation->Parameters()->Angle()); + aMeshingMinSize = Max (aMeshingMinSize, aTriangulation->Parameters()->MinSize()); } } else @@ -868,6 +846,18 @@ static Standard_Integer trianglesinfo (Draw_Interpretor& theDI, Standard_Integer theDI << " " << aNbNodes << " nodes.\n"; theDI << " " << aNbRepresentations << " polygons on triangulation.\n"; theDI << "Maximal deflection " << aMaxDeflection << "\n"; + if (aMeshingDefl > 0.0) + { + theDI << "Meshing deflection " << aMeshingDefl << "\n"; + } + if (aMeshingAngDefl > 0.0) + { + theDI << "Meshing angular deflection " << (aMeshingAngDefl * 180.0 / M_PI) << "\n"; + } + if (aMeshingMinSize > 0.0) + { + theDI << "Meshing min size " << aMeshingMinSize << "\n"; + } if (aNbLODs.Size() > 0) { @@ -1613,7 +1603,32 @@ void MeshTest::Commands(Draw_Interpretor& theCommands) g = "Mesh Commands"; - theCommands.Add("incmesh","Builds triangular mesh for the shape, run w/o args for help",__FILE__, incrementalmesh, g); + theCommands.Add("incmesh", + "incmesh Shape LinDefl [-angular Angle]=28.64 [-prs]" + "\n\t\t: [-relative {0|1}]=0 [-parallel {0|1}]=0 [-min Size]" + "\n\t\t: [-algo {watson|delabella}]=watson" + "\n\t\t: [-di Value] [-ai Angle]=57.29" + "\n\t\t: [-int_vert_off {0|1}]=0 [-surf_def_off {0|1}]=0 [-adjust_min {0|1}]=0" + "\n\t\t: [-force_face_def {0|1}]=0 [-decrease {0|1}]=0" + "\n\t\t: Builds triangular mesh for the shape." + "\n\t\t: LinDefl linear deflection to control mesh quality;" + "\n\t\t: -angular angular deflection for edges in deg (~28.64 deg = 0.5 rad by default);" + "\n\t\t: -prs apply default meshing parameters for visualization purposes" + "\n\t\t: (20 deg angular deflection, 0.001 of bounding box linear deflection);" + "\n\t\t: -relative notifies that relative deflection is used (FALSE by default);" + "\n\t\t: -parallel enables parallel execution (FALSE by default);" + "\n\t\t: -algo changes core triangulation algorithm to one with specified id (watson by default);" + "\n\t\t: -min minimum size parameter limiting size of triangle's edges to prevent sinking" + "\n\t\t: into amplification in case of distorted curves and surfaces;" + "\n\t\t: -di linear deflection used to tessellate the face interior;" + "\n\t\t: -ai angular deflection inside of faces in deg (~57.29 deg = 1 rad by default);" + "\n\t\t: -int_vert_off disables insertion of internal vertices into mesh (enabled by default);" + "\n\t\t: -surf_def_off disables control of deflection of mesh from real surface (enabled by default);" + "\n\t\t: -adjust_min enables local adjustment of min size depending on edge size (FALSE by default);" + "\n\t\t: -force_face_def disables usage of shape tolerances for computing face deflection (FALSE by default);" + "\n\t\t: -decrease enforces the meshing of the shape even if current mesh satisfies the new criteria" + "\n\t\t: (FALSE by default).", + __FILE__, incrementalmesh, g); theCommands.Add("tessellate","Builds triangular mesh for the surface, run w/o args for help",__FILE__, tessellate, g); theCommands.Add("MemLeakTest","MemLeakTest",__FILE__, MemLeakTest, g); diff --git a/src/ViewerTest/ViewerTest.cxx b/src/ViewerTest/ViewerTest.cxx index 523c99b903..7ea98430f3 100644 --- a/src/ViewerTest/ViewerTest.cxx +++ b/src/ViewerTest/ViewerTest.cxx @@ -4847,6 +4847,7 @@ static int VDisplay2 (Draw_Interpretor& theDI, Standard_Integer anObjHighMode = -2; Standard_Boolean toSetTrsfPers = Standard_False; Standard_Boolean toEcho = Standard_True; + Standard_Integer isAutoTriang = -1; Handle(Graphic3d_TransformPers) aTrsfPers; TColStd_SequenceOfAsciiString aNamesOfDisplayIO; AIS_DisplayStatus aDispStatus = AIS_DS_None; @@ -5048,6 +5049,17 @@ static int VDisplay2 (Draw_Interpretor& theDI, { toReDisplay = Standard_True; } + else if (aNameCase == "-autotr" + || aNameCase == "-autotrian" + || aNameCase == "-autotriang" + || aNameCase == "-autotriangulation" + || aNameCase == "-noautotr" + || aNameCase == "-noautotrian" + || aNameCase == "-noautotriang" + || aNameCase == "-noautotriangulation") + { + isAutoTriang = Draw::ParseOnOffNoIterator (theArgNb, theArgVec, anArgIter) ? 1 : 0; + } else if (aNameCase == "-erased" || aNameCase == "-load") { @@ -5089,6 +5101,10 @@ static int VDisplay2 (Draw_Interpretor& theDI, { aShape->SetZLayer (aZLayer); } + if (isAutoTriang != -1) + { + aShape->Attributes()->SetAutoTriangulation (isAutoTriang == 1); + } if (toSetTrsfPers) { aCtx->SetTransformPersistence (aShape, aTrsfPers); @@ -5157,6 +5173,10 @@ static int VDisplay2 (Draw_Interpretor& theDI, { aShape->SetZLayer (aZLayer); } + if (isAutoTriang != -1) + { + aShape->Attributes()->SetAutoTriangulation (isAutoTriang == 1); + } if (toSetTrsfPers) { aCtx->SetTransformPersistence (aShape, aTrsfPers); @@ -6554,7 +6574,7 @@ void ViewerTest::Commands(Draw_Interpretor& theCommands) "\n\t\t: [-dispMode mode] [-highMode mode]" "\n\t\t: [-layer index] [-top|-topmost|-overlay|-underlay]" "\n\t\t: [-redisplay] [-erased]" - "\n\t\t: [-noecho]" + "\n\t\t: [-noecho] [-autoTriangulation {0|1}]" "\n\t\t: name1 [name2] ... [name n]" "\n\t\t: Displays named objects." "\n\t\t: Option -local enables displaying of objects in local" @@ -6583,7 +6603,8 @@ void ViewerTest::Commands(Draw_Interpretor& theCommands) "\n\t\t: -dispmode Sets display mode for objects." "\n\t\t: -highmode Sets hilight mode for objects." "\n\t\t: -redisplay Recomputes presentation of objects." - "\n\t\t: -noecho Avoid printing of command results.", + "\n\t\t: -noecho Avoid printing of command results." + "\n\t\t: -autoTriang Enable/disable auto-triangulation for displayed shape." __FILE__, VDisplay2, group); theCommands.Add ("vnbdisplayed", diff --git a/src/XDEDRAW/XDEDRAW.cxx b/src/XDEDRAW/XDEDRAW.cxx index a10b762eee..270b07483b 100644 --- a/src/XDEDRAW/XDEDRAW.cxx +++ b/src/XDEDRAW/XDEDRAW.cxx @@ -644,12 +644,14 @@ class XDEDRAW_XDisplayTool XDEDRAW_XDisplayTool() : myDispMode(-2), myHiMode (-2), + myIsAutoTriang (-1), myToPrefixDocName (Standard_True), myToGetNames (Standard_True), myToExplore (Standard_False) {} //! Display single label. - Standard_Integer displayLabel (const TDF_Label& theLabel, + Standard_Integer displayLabel (Draw_Interpretor& theDI, + const TDF_Label& theLabel, const TCollection_AsciiString& theNamePrefix, const TopLoc_Location& theLoc, TCollection_AsciiString& theOutDispList) @@ -701,7 +703,7 @@ class XDEDRAW_XDisplayTool const TopLoc_Location aLoc = theLoc * XCAFDoc_ShapeTool::GetLocation (theLabel); for (TDF_ChildIterator aChildIter (aRefLabel); aChildIter.More(); aChildIter.Next()) { - if (displayLabel (aChildIter.Value(), aName, aLoc, theOutDispList) == 1) + if (displayLabel (theDI, aChildIter.Value(), aName, aLoc, theOutDispList) == 1) { return 1; } @@ -723,7 +725,7 @@ class XDEDRAW_XDisplayTool } if (!aPrs->AcceptDisplayMode (myDispMode)) { - std::cout << "Syntax error: " << aPrs->DynamicType()->Name() << " rejects " << myDispMode << " display mode\n"; + theDI << "Syntax error: " << aPrs->DynamicType()->Name() << " rejects " << myDispMode << " display mode"; return 1; } else @@ -736,11 +738,15 @@ class XDEDRAW_XDisplayTool if (myHiMode != -1 && !aPrs->AcceptDisplayMode (myHiMode)) { - std::cout << "Syntax error: " << aPrs->DynamicType()->Name() << " rejects " << myHiMode << " display mode\n"; + theDI << "Syntax error: " << aPrs->DynamicType()->Name() << " rejects " << myHiMode << " display mode"; return 1; } aPrs->SetHilightMode (myHiMode); } + if (myIsAutoTriang != -1) + { + aPrs->Attributes()->SetAutoTriangulation (myIsAutoTriang == 1); + } ViewerTest::Display (aName, aPrs, false); theOutDispList += aName + " "; @@ -755,7 +761,7 @@ class XDEDRAW_XDisplayTool Handle(AIS_InteractiveContext) aContext = ViewerTest::GetAISContext(); if (aContext.IsNull()) { - std::cout << "Error: no active view!\n"; + theDI << "Error: no active viewer"; return 1; } @@ -785,6 +791,17 @@ class XDEDRAW_XDisplayTool { myHiMode = TCollection_AsciiString (theArgVec[++anArgIter]).IntegerValue(); } + else if (anArgCase == "-autotr" + || anArgCase == "-autotrian" + || anArgCase == "-autotriang" + || anArgCase == "-autotriangulation" + || anArgCase == "-noautotr" + || anArgCase == "-noautotrian" + || anArgCase == "-noautotriang" + || anArgCase == "-noautotriangulation") + { + myIsAutoTriang = Draw::ParseOnOffNoIterator (theNbArgs, theArgVec, anArgIter) ? 1 : 0; + } else if (anArgCase == "-docprefix" || anArgCase == "-nodocprefix") { @@ -857,7 +874,7 @@ class XDEDRAW_XDisplayTool if (!myDoc.IsNull() && myDoc != aDoc) { - std::cout << "Syntax error at '" << theArgVec[anArgIter] << "'\n"; + theDI << "Syntax error at '" << theArgVec[anArgIter] << "'"; return 1; } myDoc = aDoc; @@ -866,7 +883,7 @@ class XDEDRAW_XDisplayTool } if (myDoc.IsNull()) { - std::cout << "Syntax error at '" << theArgVec[anArgIter] << "'\n"; + theDI << "Syntax error at '" << theArgVec[anArgIter] << "'"; return 1; } @@ -875,7 +892,7 @@ class XDEDRAW_XDisplayTool if (aLabel.IsNull() || !XCAFDoc_ShapeTool::IsShape (aLabel)) { - std::cout << "Syntax error: " << aValue << " is not a valid shape label\n"; + theDI << "Syntax error: " << aValue << " is not a valid shape label"; return 1; } myLabels.Append (aLabel); @@ -883,7 +900,7 @@ class XDEDRAW_XDisplayTool } if (myDoc.IsNull()) { - std::cout << "Syntax error: not enough arguments\n"; + theDI << "Syntax error: not enough arguments"; return 1; } if (myLabels.IsEmpty()) @@ -894,7 +911,7 @@ class XDEDRAW_XDisplayTool for (TDF_LabelSequence::Iterator aLabIter (myLabels); aLabIter.More(); aLabIter.Next()) { const TDF_Label& aLabel = aLabIter.Value(); - if (displayLabel (aLabel, myToPrefixDocName ? myDocName + ":" : "", TopLoc_Location(), myOutDispList) == 1) + if (displayLabel (theDI, aLabel, myToPrefixDocName ? myDocName + ":" : "", TopLoc_Location(), myOutDispList) == 1) { return 1; } @@ -920,6 +937,7 @@ class XDEDRAW_XDisplayTool TDF_LabelSequence myLabels; //!< labels to display Standard_Integer myDispMode; //!< shape display mode Standard_Integer myHiMode; //!< shape highlight mode + Standard_Integer myIsAutoTriang; //!< auto-triangulation mode Standard_Boolean myToPrefixDocName; //!< flag to prefix objects with document name Standard_Boolean myToGetNames; //!< flag to use label names or tags Standard_Boolean myToExplore; //!< flag to explore assembles @@ -1394,7 +1412,7 @@ void XDEDRAW::Init(Draw_Interpretor& di) di.Add ("XDisplay", "XDisplay Doc [label1 [label2 [...]]] [-explore {on|off}] [-docPrefix {on|off}] [-names {on|off}]" - "\n\t\t: [-noupdate] [-dispMode Mode] [-highMode Mode]" + "\n\t\t: [-noupdate] [-dispMode Mode] [-highMode Mode] [-autoTriangulation {0|1}]" "\n\t\t: Displays document (parts) in 3D Viewer." "\n\t\t: -dispMode Presentation display mode." "\n\t\t: -highMode Presentation highlight mode." @@ -1402,7 +1420,8 @@ void XDEDRAW::Init(Draw_Interpretor& di) "\n\t\t: -names Use object names instead of label tag; TRUE by default." "\n\t\t: -explore Explode labels to leaves; FALSE by default." "\n\t\t: -outDispList Set the TCL variable to the list of displayed object names." - "\n\t\t: (instead of printing them to draw interpreter)", + "\n\t\t: (instead of printing them to draw interpreter)" + "\n\t\t: -autoTriang Enable/disable auto-triangulation for displayed shapes.", __FILE__, XDEDRAW_XDisplayTool::XDisplay, g); di.Add ("XWdump","Doc filename.{gif|xwd|bmp} \t: Dump contents of viewer window to XWD, GIF or BMP file", diff --git a/tests/bugs/mesh/bug25281 b/tests/bugs/mesh/bug25281 index 6a02314ed3..1ae651b465 100644 --- a/tests/bugs/mesh/bug25281 +++ b/tests/bugs/mesh/bug25281 @@ -10,7 +10,7 @@ pload XDE param xstep.cascade.unit M stepread [locate_data_file bug25281_tess_infloop_extract.step] a * -incmesh a_1 0.0002 1 +incmesh a_1 0.0002 -parallel checktrinfo a_1 -tri -nod diff --git a/tests/hlr/poly_hlr/bug23625_1 b/tests/hlr/poly_hlr/bug23625_1 index 27ea8b6e14..9484d87381 100644 --- a/tests/hlr/poly_hlr/bug23625_1 +++ b/tests/hlr/poly_hlr/bug23625_1 @@ -13,6 +13,6 @@ restore [locate_data_file bug23625_a1.brep] a # workaround bug 0031426 until fix vinit View1 vdefaults -autoTriang 0 -incmesh a 7.6 12 +incmesh a 7.6 COMPUTE_HLR $viewname $algotype diff --git a/tests/mesh/advanced_incmesh/begin b/tests/mesh/advanced_incmesh/begin index 807dcb2a59..8ed3003753 100644 --- a/tests/mesh/advanced_incmesh/begin +++ b/tests/mesh/advanced_incmesh/begin @@ -1,3 +1,3 @@ set command incmesh set group advanced -set parallel "" +set parallel 0 diff --git a/tests/mesh/advanced_incmesh_parallel/begin b/tests/mesh/advanced_incmesh_parallel/begin index 579f49fcc7..cdd1e76439 100644 --- a/tests/mesh/advanced_incmesh_parallel/begin +++ b/tests/mesh/advanced_incmesh_parallel/begin @@ -1,3 +1,3 @@ set command incmesh set group advanced -set parallel -parallel +set parallel 1 diff --git a/tests/mesh/end b/tests/mesh/end index 5a69d8b266..fbcc8b3c97 100644 --- a/tests/mesh/end +++ b/tests/mesh/end @@ -31,13 +31,13 @@ if { [string compare $command "shading"] == 0 } { } if { [string compare $command "incmesh"] == 0 } { - if { [string compare $parallel "-parallel"] != 0 || [info exists count_parallel] == 0 } { - set count_parallel 1 + if { [string compare $parallel "1"] != 0 || [info exists count_parallel] == 0 } { + set count_parallel 1 } for {set i 1} {$i <= $count_parallel} {incr i} { - tclean res - puts "i = $i" - incmesh res ${Deflection} ${parallel} + tclean res + puts "i = $i" + incmesh res ${Deflection} -parallel ${parallel} } } diff --git a/tests/mesh/standard_incmesh/begin b/tests/mesh/standard_incmesh/begin index 007b5372cb..be09a2056c 100644 --- a/tests/mesh/standard_incmesh/begin +++ b/tests/mesh/standard_incmesh/begin @@ -1,3 +1,3 @@ set command incmesh set group standard -set parallel "" +set parallel 0 diff --git a/tests/mesh/standard_incmesh_parallel/begin b/tests/mesh/standard_incmesh_parallel/begin index 378b383444..aefc3e6a8b 100644 --- a/tests/mesh/standard_incmesh_parallel/begin +++ b/tests/mesh/standard_incmesh_parallel/begin @@ -1,3 +1,3 @@ set command incmesh set group standard -set parallel -parallel +set parallel 1 diff --git a/tests/perf/mesh/bug26889_1 b/tests/perf/mesh/bug26889_1 index 6d358fdb49..f8f0192a3b 100644 --- a/tests/perf/mesh/bug26889_1 +++ b/tests/perf/mesh/bug26889_1 @@ -8,7 +8,7 @@ pload XDE stepread [locate_data_file bug26889_export.step] a * dchrono t restart -incmesh a_1 0.01 1 +incmesh a_1 0.01 -parallel dchrono t stop counter incmesh checktrinfo a_1 -tri 525271 -nod 263456 -defl 0.069482224632795617 -tol_abs_defl 1e-6 diff --git a/tests/perf/mesh/bug26889_2 b/tests/perf/mesh/bug26889_2 index d1ae16a345..893cd4f563 100644 --- a/tests/perf/mesh/bug26889_2 +++ b/tests/perf/mesh/bug26889_2 @@ -8,7 +8,7 @@ pload XDE stepread [locate_data_file bug26889_export.step] a * dchrono t restart -incmesh a_1 0.1 1 +incmesh a_1 0.1 -parallel dchrono t stop counter incmesh checktrinfo a_1 -tri 68779 -nod 34737 -defl 0.24900556935704937 -tol_abs_defl 1e-6 diff --git a/tests/perf/mesh/bug26889_3 b/tests/perf/mesh/bug26889_3 index e87d2483e9..c5e3a94f6b 100644 --- a/tests/perf/mesh/bug26889_3 +++ b/tests/perf/mesh/bug26889_3 @@ -8,7 +8,7 @@ pload XDE stepread [locate_data_file bug26889_export.step] a * dchrono t restart -incmesh a_1 1.0 1 +incmesh a_1 1.0 -parallel dchrono t stop counter incmesh checktrinfo a_1 -tri 12469 -nod 6503 -defl 1.2783003174746328 -tol_abs_defl 1e-6 diff --git a/tests/v3d/bugs/bug23200_1 b/tests/v3d/bugs/bug23200_1 index 45e593a483..62677d3f4c 100644 --- a/tests/v3d/bugs/bug23200_1 +++ b/tests/v3d/bugs/bug23200_1 @@ -10,10 +10,8 @@ pload MODELING VISUALIZATION vinit View1 vclear vaxo -vsetdispmode 1 -vdefaults -autoTriang off pcone c 0 5 10 -vdisplay c +vdisplay c -dispMode 1 -autoTriang off vfit set aColor [vreadpixel 200 77 rgb name] From bcb2a742a7a87882cef69476be1e86627bad60a8 Mon Sep 17 00:00:00 2001 From: kgv Date: Tue, 19 Oct 2021 01:56:18 +0300 Subject: [PATCH 106/639] 0032631: Draw Harness - add DRAWEXE.evalAsync() to WebAssembly --- src/DRAWEXE/DRAWEXE.cxx | 48 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) diff --git a/src/DRAWEXE/DRAWEXE.cxx b/src/DRAWEXE/DRAWEXE.cxx index f76eefd835..401e47d09d 100644 --- a/src/DRAWEXE/DRAWEXE.cxx +++ b/src/DRAWEXE/DRAWEXE.cxx @@ -20,6 +20,8 @@ #include #include #include +#include +#include #include #ifdef OCCT_NO_PLUGINS @@ -39,6 +41,16 @@ Standard_IMPORT Standard_Boolean Draw_Interprete (const char* theCommand); #if defined(__EMSCRIPTEN__) #include #include +#include + +//! Signal async command completion to Module.evalAsyncCompleted callback. +EM_JS(void, occJSEvalAsyncCompleted, (int theResult), { + if (Module.evalAsyncCompleted != undefined) { + Module.evalAsyncCompleted (theResult); + } else { + console.error ("Module.evalAsyncCompleted() is undefined"); + } +}); //! Draw Harness interface for JavaScript. class DRAWEXE @@ -66,6 +78,41 @@ class DRAWEXE { return Draw::GetInterpretor().Complete (theCommand.c_str()); } + + //! Evaluate Tcl command asynchronously. + static void evalAsync (const std::string& theCommand) + { + #if defined(__EMSCRIPTEN_PTHREADS__) + std::string* aCmdPtr = new std::string (theCommand); + OSD_Thread aThread (&evalAsyncEntry); + aThread.Run (aCmdPtr); + #else + // fallback synchronous implementation + int aRes = eval (theCommand); + occJSEvalAsyncCompleted (aRes); + #endif + } + +#if defined(__EMSCRIPTEN_PTHREADS__) +private: + //! Thread entry for async command execution. + static Standard_Address evalAsyncEntry (Standard_Address theData) + { + OSD::SetSignal (false); + std::string* aCmdPtr = (std::string* )theData; + const std::string aCmd = *aCmdPtr; + delete aCmdPtr; + int aRes = eval (aCmd); + emscripten_async_run_in_main_runtime_thread (EM_FUNC_SIG_VI, evalAsyncCompletedEntry, aRes); + return 0; + } + + //! Notify Module.evalAsyncCompleted about async cmd completion. + static void evalAsyncCompletedEntry (int theResult) + { + occJSEvalAsyncCompleted (theResult); + } +#endif }; //! Print message to Module.printMessage callback. @@ -109,6 +156,7 @@ class DRAWEXE_WasmModulePrinter : public Message_Printer EMSCRIPTEN_BINDINGS(DRAWEXE) { emscripten::function("eval", &DRAWEXE::eval); + emscripten::function("evalAsync", &DRAWEXE::evalAsync); emscripten::function("isComplete", &DRAWEXE::isComplete); } #endif From 19da974edcd715cf6ff0a11526f431f3ad890861 Mon Sep 17 00:00:00 2001 From: vro Date: Tue, 19 Oct 2021 18:57:23 +0300 Subject: [PATCH 107/639] 0032632: Visualization, AIS_ViewCube - the class AIS_ViewCubeSensitive is hidden inside CXX file --- src/AIS/AIS_ViewCube.cxx | 70 +++++++++++++++++++++------------------- src/AIS/AIS_ViewCube.hxx | 22 +++++++++++++ 2 files changed, 58 insertions(+), 34 deletions(-) diff --git a/src/AIS/AIS_ViewCube.cxx b/src/AIS/AIS_ViewCube.cxx index 756f6226a3..1e405cb44f 100644 --- a/src/AIS/AIS_ViewCube.cxx +++ b/src/AIS/AIS_ViewCube.cxx @@ -27,13 +27,13 @@ #include #include #include -#include #include #include #include IMPLEMENT_STANDARD_RTTIEXT(AIS_ViewCube, AIS_InteractiveObject) IMPLEMENT_STANDARD_RTTIEXT(AIS_ViewCubeOwner, SelectMgr_EntityOwner) +IMPLEMENT_STANDARD_RTTIEXT(AIS_ViewCubeSensitive, Select3D_SensitivePrimitiveArray) namespace { @@ -56,46 +56,48 @@ namespace } } -//! Simple sensitive element for picking by point only. -class AIS_ViewCubeSensitive : public Select3D_SensitivePrimitiveArray +//======================================================================= +//function : AIS_ViewCubeSensitive +//purpose : +//======================================================================= +AIS_ViewCubeSensitive::AIS_ViewCubeSensitive (const Handle(SelectMgr_EntityOwner)& theOwner, + const Handle(Graphic3d_ArrayOfTriangles)& theTris) +: Select3D_SensitivePrimitiveArray (theOwner) { - DEFINE_STANDARD_RTTI_INLINE(AIS_ViewCubeSensitive, Select3D_SensitivePrimitiveArray) -public: - //! Constructor. - AIS_ViewCubeSensitive (const Handle(SelectMgr_EntityOwner)& theOwner, - const Handle(Graphic3d_ArrayOfTriangles)& theTris) - : Select3D_SensitivePrimitiveArray (theOwner) - { - InitTriangulation (theTris->Attributes(), theTris->Indices(), TopLoc_Location()); - } + InitTriangulation (theTris->Attributes(), theTris->Indices(), TopLoc_Location()); +} + +//======================================================================= +//function : Matches +//purpose : +//======================================================================= +Standard_Boolean AIS_ViewCubeSensitive::Matches (SelectBasics_SelectingVolumeManager& theMgr, + SelectBasics_PickResult& thePickResult) +{ + return isValidRay (theMgr) && Select3D_SensitivePrimitiveArray::Matches (theMgr, thePickResult); +} - //! Checks whether element overlaps current selecting volume. - virtual Standard_Boolean Matches (SelectBasics_SelectingVolumeManager& theMgr, - SelectBasics_PickResult& thePickResult) Standard_OVERRIDE +//======================================================================= +//function : isValidRay +//purpose : +//======================================================================= +bool AIS_ViewCubeSensitive::isValidRay (const SelectBasics_SelectingVolumeManager& theMgr) const +{ + if (theMgr.GetActiveSelectionType() != SelectMgr_SelectionType_Point) { - return isValidRay (theMgr) - && Select3D_SensitivePrimitiveArray::Matches (theMgr, thePickResult); + // disallow rectangular selection + return false; } - //! Checks if picking ray can be used for detection. - bool isValidRay (const SelectBasics_SelectingVolumeManager& theMgr) const + if (AIS_ViewCubeOwner* anOwner = dynamic_cast(myOwnerId.get())) { - if (theMgr.GetActiveSelectionType() != SelectMgr_SelectionType_Point) - { - // disallow rectangular selection - return false; - } - - if (AIS_ViewCubeOwner* anOwner = dynamic_cast(myOwnerId.get())) - { - const Standard_Real anAngleToler = 10.0 * M_PI / 180.0; - const gp_Dir aRay = theMgr.GetViewRayDirection(); - const gp_Dir aDir = V3d::GetProjAxis (anOwner->MainOrientation()); - return !aRay.IsNormal (aDir, anAngleToler); - } - return true; + const Standard_Real anAngleToler = 10.0 * M_PI / 180.0; + const gp_Dir aRay = theMgr.GetViewRayDirection(); + const gp_Dir aDir = V3d::GetProjAxis (anOwner->MainOrientation()); + return !aRay.IsNormal (aDir, anAngleToler); } -}; + return true; +} //======================================================================= //function : IsBoxSide diff --git a/src/AIS/AIS_ViewCube.hxx b/src/AIS/AIS_ViewCube.hxx index 4da9de27f9..32428cf04f 100644 --- a/src/AIS/AIS_ViewCube.hxx +++ b/src/AIS/AIS_ViewCube.hxx @@ -24,6 +24,7 @@ #include #include #include +#include class AIS_AnimationCamera; class AIS_ViewCubeOwner; @@ -724,4 +725,25 @@ protected: }; +//! Simple sensitive element for picking by point only. +class AIS_ViewCubeSensitive : public Select3D_SensitivePrimitiveArray +{ + DEFINE_STANDARD_RTTIEXT(AIS_ViewCubeSensitive, Select3D_SensitivePrimitiveArray) +public: + + //! Constructor. + Standard_EXPORT AIS_ViewCubeSensitive (const Handle(SelectMgr_EntityOwner)& theOwner, + const Handle(Graphic3d_ArrayOfTriangles)& theTris); + + //! Checks whether element overlaps current selecting volume. + Standard_EXPORT virtual Standard_Boolean Matches (SelectBasics_SelectingVolumeManager& theMgr, + SelectBasics_PickResult& thePickResult) Standard_OVERRIDE; + +protected: + + //! Checks if picking ray can be used for detection. + Standard_EXPORT bool isValidRay (const SelectBasics_SelectingVolumeManager& theMgr) const; + +}; + #endif // _AIS_ViewCube_HeaderFile From 5f69cfa70c65f1120e963b54a216b8625268ba22 Mon Sep 17 00:00:00 2001 From: kgv Date: Fri, 22 Oct 2021 15:59:19 +0300 Subject: [PATCH 108/639] 0032638: Draw Harness, ViewerTest - HTML input range misbehavior in WebAssembly ViewerTest_EventManager - added tracking of EMSCRIPTEN_EVENT_FOCUSOUT event. onWasmMouseCallback() has been adjusted to return FALSE for EMSCRIPTEN_EVENT_TARGET_WINDOW target to avoid misbehavior of other HTML controls. WNT_Window::ProcessMessage() now handles WM_SETFOCUS/WM_KILLFOCUS instead of WM_ACTIVATE to track focus changes. AIS_ViewController::ProcessFocus() now redirects to AIS_ViewController::ResetViewInput() on focus loss. This fixes issues when key action (like WASD navigation) keep working even after releasing key if window has been switched. --- samples/webgl/WasmOcctView.cpp | 30 +++++++++++++++++++--- samples/webgl/WasmOcctView.h | 6 +++++ samples/webgl/occt-webgl-sample.html | 6 +++++ src/AIS/AIS_ViewController.hxx | 7 +++-- src/ViewerTest/ViewerTest_EventManager.cxx | 19 +++++++++++++- src/WNT/WNT_Window.cxx | 6 ++--- src/Wasm/Wasm_Window.cxx | 29 +++++++++++++++++++++ src/Wasm/Wasm_Window.hxx | 9 +++++++ 8 files changed, 102 insertions(+), 10 deletions(-) diff --git a/samples/webgl/WasmOcctView.cpp b/samples/webgl/WasmOcctView.cpp index e47f395acb..53e0096030 100644 --- a/samples/webgl/WasmOcctView.cpp +++ b/samples/webgl/WasmOcctView.cpp @@ -202,9 +202,12 @@ void WasmOcctView::initWindow() emscripten_set_touchmove_callback (aTargetId, this, toUseCapture, onTouchCallback); emscripten_set_touchcancel_callback(aTargetId, this, toUseCapture, onTouchCallback); - //emscripten_set_keypress_callback (EMSCRIPTEN_EVENT_TARGET_WINDOW, this, toUseCapture, onKeyCallback); - emscripten_set_keydown_callback (EMSCRIPTEN_EVENT_TARGET_WINDOW, this, toUseCapture, onKeyDownCallback); - emscripten_set_keyup_callback (EMSCRIPTEN_EVENT_TARGET_WINDOW, this, toUseCapture, onKeyUpCallback); + //emscripten_set_keypress_callback (aTargetId, this, toUseCapture, onKeyCallback); + emscripten_set_keydown_callback (aTargetId, this, toUseCapture, onKeyDownCallback); + emscripten_set_keyup_callback (aTargetId, this, toUseCapture, onKeyUpCallback); + //emscripten_set_focus_callback (aTargetId, this, toUseCapture, onFocusCallback); + //emscripten_set_focusin_callback (aTargetId, this, toUseCapture, onFocusCallback); + emscripten_set_focusout_callback (aTargetId, this, toUseCapture, onFocusCallback); } // ================================================================ @@ -513,7 +516,8 @@ EM_BOOL WasmOcctView::onMouseEvent (int theEventType, const EmscriptenMouseEvent EmscriptenMouseEvent anEvent = *theEvent; anEvent.targetX -= jsGetBoundingClientLeft(); anEvent.targetY -= jsGetBoundingClientTop(); - return aWindow->ProcessMouseEvent (*this, theEventType, &anEvent) ? EM_TRUE : EM_FALSE; + aWindow->ProcessMouseEvent (*this, theEventType, &anEvent); + return EM_FALSE; } return aWindow->ProcessMouseEvent (*this, theEventType, theEvent) ? EM_TRUE : EM_FALSE; @@ -587,6 +591,24 @@ bool WasmOcctView::navigationKeyModifierSwitch (unsigned int theModifOld, return hasActions; } +// ================================================================ +// Function : onFocusEvent +// Purpose : +// ================================================================ +EM_BOOL WasmOcctView::onFocusEvent (int theEventType, const EmscriptenFocusEvent* theEvent) +{ + if (myView.IsNull() + || (theEventType != EMSCRIPTEN_EVENT_FOCUS + && theEventType != EMSCRIPTEN_EVENT_FOCUSIN // about to receive focus + && theEventType != EMSCRIPTEN_EVENT_FOCUSOUT)) + { + return EM_FALSE; + } + + Handle(Wasm_Window) aWindow = Handle(Wasm_Window)::DownCast (myView->Window()); + return aWindow->ProcessFocusEvent (*this, theEventType, theEvent) ? EM_TRUE : EM_FALSE; +} + // ================================================================ // Function : onKeyDownEvent // Purpose : diff --git a/samples/webgl/WasmOcctView.h b/samples/webgl/WasmOcctView.h index 626ba00d8a..58921a6bed 100644 --- a/samples/webgl/WasmOcctView.h +++ b/samples/webgl/WasmOcctView.h @@ -181,6 +181,9 @@ class WasmOcctView : protected AIS_ViewController //! Key up event. EM_BOOL onKeyUpEvent (int theEventType, const EmscriptenKeyboardEvent* theEvent); + //! Focus change event. + EM_BOOL onFocusEvent (int theEventType, const EmscriptenFocusEvent* theEvent); + //! @name Emscripten callbacks (static functions) private: @@ -205,6 +208,9 @@ class WasmOcctView : protected AIS_ViewController static EM_BOOL onKeyUpCallback (int theEventType, const EmscriptenKeyboardEvent* theEvent, void* theView) { return ((WasmOcctView* )theView)->onKeyUpEvent (theEventType, theEvent); } + static EM_BOOL onFocusCallback (int theEventType, const EmscriptenFocusEvent* theEvent, void* theView) + { return ((WasmOcctView* )theView)->onFocusEvent (theEventType, theEvent); } + private: //! Register hot-keys for specified Action. diff --git a/samples/webgl/occt-webgl-sample.html b/samples/webgl/occt-webgl-sample.html index a831e3e1f0..7b48a41c23 100644 --- a/samples/webgl/occt-webgl-sample.html +++ b/samples/webgl/occt-webgl-sample.html @@ -42,6 +42,11 @@

Console output:

window.onresize = updateCanvasSize; updateCanvasSize(); +// capture keyboard input on mouse click +occViewerCanvas.tabIndex = -1; +occViewerCanvas.onclick = (theEvent) => { occViewerCanvas.focus() }; +occViewerCanvas.focus(); + //! Check browser support. function isWasmSupported() { @@ -78,6 +83,7 @@

Console output:

OccViewerModule.openFromMemory (aFile.name, aDataBuffer, aDataArray.length, true); //OccViewerModule._free (aDataBuffer); will be freed by called method OccViewerModule.displayGround (true); + occViewerCanvas.focus(); }; aReader.readAsArrayBuffer(aFile); }; diff --git a/src/AIS/AIS_ViewController.hxx b/src/AIS/AIS_ViewController.hxx index 1437b20fda..8ab8fd23a8 100644 --- a/src/AIS/AIS_ViewController.hxx +++ b/src/AIS/AIS_ViewController.hxx @@ -441,10 +441,13 @@ public: //! @name resize events virtual void ProcessInput() Standard_OVERRIDE {} //! Handle focus event. - //! Default implementation does nothing. + //! Default implementation resets cached input state (pressed keys). virtual void ProcessFocus (bool theIsActivated) Standard_OVERRIDE { - (void )theIsActivated; + if (!theIsActivated) + { + ResetViewInput(); + } } //! Handle window close event. diff --git a/src/ViewerTest/ViewerTest_EventManager.cxx b/src/ViewerTest/ViewerTest_EventManager.cxx index 7ae3a25c74..3335af811f 100644 --- a/src/ViewerTest/ViewerTest_EventManager.cxx +++ b/src/ViewerTest/ViewerTest_EventManager.cxx @@ -655,7 +655,8 @@ static EM_BOOL onWasmMouseCallback (int theEventType, const EmscriptenMouseEvent EmscriptenMouseEvent anEvent = *theEvent; anEvent.targetX -= occJSGetBoundingClientLeft(); anEvent.targetY -= occJSGetBoundingClientTop(); - return aWindow->ProcessMouseEvent (*aViewCtrl, theEventType, &anEvent) ? EM_TRUE : EM_FALSE; + aWindow->ProcessMouseEvent (*aViewCtrl, theEventType, &anEvent); + return EM_FALSE; } return aWindow->ProcessMouseEvent (*aViewCtrl, theEventType, theEvent) ? EM_TRUE : EM_FALSE; @@ -702,6 +703,19 @@ static EM_BOOL onWasmKeyCallback (int theEventType, const EmscriptenKeyboardEven } return EM_FALSE; } + +//! Handle focus change event. +static EM_BOOL onWasmFocusCallback (int theEventType, const EmscriptenFocusEvent* theEvent, void*) +{ + Handle(ViewerTest_EventManager) aViewCtrl = ViewerTest::CurrentEventManager(); + if (!aViewCtrl.IsNull() + && !ViewerTest::CurrentView().IsNull()) + { + Handle(Wasm_Window) aWindow = Handle(Wasm_Window)::DownCast (ViewerTest::CurrentView()->Window()); + return aWindow->ProcessFocusEvent (*aViewCtrl, theEventType, theEvent) ? EM_TRUE : EM_FALSE; + } + return EM_FALSE; +} #endif // ============================================================================== @@ -777,6 +791,9 @@ void ViewerTest_EventManager::SetupWindowCallbacks (const Handle(Aspect_Window)& // keyboard input requires a focusable element or EMSCRIPTEN_EVENT_TARGET_WINDOW emscripten_set_keydown_callback (aTargetId, anOpaque, toUseCapture, onWasmKeyCallback); emscripten_set_keyup_callback (aTargetId, anOpaque, toUseCapture, onWasmKeyCallback); + //emscripten_set_focus_callback (aTargetId, anOpaque, toUseCapture, onWasmFocusCallback); + //emscripten_set_focusin_callback (aTargetId, anOpaque, toUseCapture, onWasmFocusCallback); + emscripten_set_focusout_callback (aTargetId, anOpaque, toUseCapture, onWasmFocusCallback); #else (void )theWin; #endif diff --git a/src/WNT/WNT_Window.cxx b/src/WNT/WNT_Window.cxx index 73ebe522ef..10edc7a242 100644 --- a/src/WNT/WNT_Window.cxx +++ b/src/WNT/WNT_Window.cxx @@ -815,12 +815,12 @@ bool WNT_Window::ProcessMessage (Aspect_WindowInputListener& theListener, } return false; } - case WM_ACTIVATE: + case WM_SETFOCUS: + case WM_KILLFOCUS: { if (theMsg.hwnd == (HWND )myHWindow) { - theListener.ProcessFocus (LOWORD(theMsg.wParam) == WA_CLICKACTIVE - || LOWORD(theMsg.wParam) == WA_ACTIVE); + theListener.ProcessFocus (theMsg.message == WM_SETFOCUS); return true; } return false; diff --git a/src/Wasm/Wasm_Window.cxx b/src/Wasm/Wasm_Window.cxx index 19100a4b7c..985333b634 100644 --- a/src/Wasm/Wasm_Window.cxx +++ b/src/Wasm/Wasm_Window.cxx @@ -243,6 +243,12 @@ bool Wasm_Window::ProcessMessage (Aspect_WindowInputListener& theListener, { return ProcessUiEvent (theListener, theEventType, (const EmscriptenUiEvent* )theEvent); } + case EMSCRIPTEN_EVENT_FOCUS: + case EMSCRIPTEN_EVENT_FOCUSIN: + case EMSCRIPTEN_EVENT_FOCUSOUT: + { + return ProcessFocusEvent (theListener, theEventType, (const EmscriptenFocusEvent* )theEvent); + } } return false; #else @@ -536,6 +542,29 @@ bool Wasm_Window::ProcessUiEvent (Aspect_WindowInputListener& theListener, return true; } +// ======================================================================= +// function : ProcessFocusEvent +// purpose : +// ======================================================================= +bool Wasm_Window::ProcessFocusEvent (Aspect_WindowInputListener& theListener, + int theEventType, const EmscriptenFocusEvent* ) +{ + bool isActivated = false; +#if defined(__EMSCRIPTEN__) + if (theEventType != EMSCRIPTEN_EVENT_FOCUS + && theEventType != EMSCRIPTEN_EVENT_FOCUSIN // about to receive focus + && theEventType != EMSCRIPTEN_EVENT_FOCUSOUT) + { + return false; + } + isActivated = theEventType == EMSCRIPTEN_EVENT_FOCUS; +#else + (void )theEventType; +#endif + theListener.ProcessFocus (isActivated); + return true; +} + // ======================================================================= // function : MouseButtonsFromNative // purpose : diff --git a/src/Wasm/Wasm_Window.hxx b/src/Wasm/Wasm_Window.hxx index 62b00b3752..5043f83cdd 100644 --- a/src/Wasm/Wasm_Window.hxx +++ b/src/Wasm/Wasm_Window.hxx @@ -28,6 +28,7 @@ struct EmscriptenWheelEvent; struct EmscriptenTouchEvent; struct EmscriptenKeyboardEvent; struct EmscriptenUiEvent; +struct EmscriptenFocusEvent; //! This class defines WebAssembly window (HTML5 canvas) intended for creation of OpenGL (WebGL) context. //! @@ -175,6 +176,14 @@ public: Standard_EXPORT virtual bool ProcessUiEvent (Aspect_WindowInputListener& theListener, int theEventType, const EmscriptenUiEvent* theEvent); + //! Process a focus input change message. + //! @param[in,out] theListener listener to redirect message + //! @param[in] theEventType message type to process + //! @param[in] theEvent message to process + //! @return TRUE if message has been processed + Standard_EXPORT virtual bool ProcessFocusEvent (Aspect_WindowInputListener& theListener, + int theEventType, const EmscriptenFocusEvent* theEvent); + protected: TCollection_AsciiString myCanvasId; From 5b756182c269a3d4fc19b82fe8527f0fcabf5c57 Mon Sep 17 00:00:00 2001 From: aml Date: Mon, 18 Oct 2021 09:46:19 +0300 Subject: [PATCH 109/639] 0032630: Coding - get rid of unsused forward declarations [BinMDF to IFSelect] --- src/BinMDF/BinMDF.hxx | 4 - src/BinMDF/BinMDF_ADriver.hxx | 2 - src/GCE2d/GCE2d_MakeArcOfCircle.hxx | 1 - src/GCE2d/GCE2d_MakeArcOfEllipse.hxx | 1 - src/GCE2d/GCE2d_MakeArcOfHyperbola.hxx | 1 - src/GCE2d/GCE2d_MakeArcOfParabola.hxx | 1 - src/GCE2d/GCE2d_MakeCircle.hxx | 1 - src/GCE2d/GCE2d_MakeEllipse.hxx | 1 - src/GCE2d/GCE2d_MakeHyperbola.hxx | 1 - src/GCE2d/GCE2d_MakeLine.hxx | 1 - src/GCE2d/GCE2d_MakeParabola.hxx | 1 - src/GCE2d/GCE2d_MakeSegment.hxx | 1 - src/GCPnts/GCPnts_DistFunction.hxx | 1 - src/GCPnts/GCPnts_DistFunction2d.hxx | 1 - src/GProp/GProp.hxx | 7 -- src/GProp/GProp_GProps.hxx | 3 - src/GProp/GProp_PEquation.hxx | 3 - src/GProp/GProp_PGProps.hxx | 2 - src/GProp/GProp_PrincipalProps.hxx | 3 - src/GccEnt/GccEnt.hxx | 2 - src/GccEnt/GccEnt_QualifiedCirc.hxx | 1 - src/GccEnt/GccEnt_QualifiedLin.hxx | 1 - src/GccInt/GccInt_BCirc.hxx | 1 - src/GccInt/GccInt_BElips.hxx | 1 - src/GccInt/GccInt_BHyper.hxx | 1 - src/GccInt/GccInt_BLine.hxx | 1 - src/GccInt/GccInt_BParab.hxx | 1 - src/GccInt/GccInt_BPoint.hxx | 1 - src/GccInt/GccInt_Bisec.hxx | 1 - src/Geom/Geom_Axis2Placement.hxx | 2 - src/Geom/Geom_AxisPlacement.hxx | 2 - src/Geom/Geom_BSplineCurve.hxx | 7 -- src/Geom/Geom_BSplineSurface.hxx | 7 -- src/Geom/Geom_BezierCurve.hxx | 4 - src/Geom/Geom_BezierSurface.hxx | 4 - src/Geom/Geom_CartesianPoint.hxx | 1 - src/Geom/Geom_Circle.hxx | 2 - src/Geom/Geom_ConicalSurface.hxx | 2 - src/Geom/Geom_Curve.hxx | 4 - src/Geom/Geom_CylindricalSurface.hxx | 2 - src/Geom/Geom_Direction.hxx | 2 - src/Geom/Geom_Ellipse.hxx | 2 - src/Geom/Geom_Geometry.hxx | 1 - src/Geom/Geom_Hyperbola.hxx | 3 - src/Geom/Geom_Line.hxx | 2 - src/Geom/Geom_OffsetCurve.hxx | 7 -- src/Geom/Geom_OffsetSurface.hxx | 6 -- src/Geom/Geom_Parabola.hxx | 2 - src/Geom/Geom_Plane.hxx | 2 - src/Geom/Geom_RectangularTrimmedSurface.hxx | 5 -- src/Geom/Geom_SphericalSurface.hxx | 2 - src/Geom/Geom_SurfaceOfLinearExtrusion.hxx | 2 - src/Geom/Geom_SurfaceOfRevolution.hxx | 4 - src/Geom/Geom_SweptSurface.hxx | 1 - src/Geom/Geom_ToroidalSurface.hxx | 3 - src/Geom/Geom_TrimmedCurve.hxx | 5 -- src/Geom/Geom_Vector.hxx | 4 - src/Geom/Geom_VectorWithMagnitude.hxx | 2 - src/Geom2d/Geom2d_AxisPlacement.hxx | 2 - src/Geom2d/Geom2d_BSplineCurve.hxx | 7 -- src/Geom2d/Geom2d_BezierCurve.hxx | 4 - src/Geom2d/Geom2d_CartesianPoint.hxx | 1 - src/Geom2d/Geom2d_Circle.hxx | 2 - src/Geom2d/Geom2d_Curve.hxx | 4 - src/Geom2d/Geom2d_Direction.hxx | 2 - src/Geom2d/Geom2d_Ellipse.hxx | 2 - src/Geom2d/Geom2d_Geometry.hxx | 1 - src/Geom2d/Geom2d_Hyperbola.hxx | 3 - src/Geom2d/Geom2d_Line.hxx | 2 - src/Geom2d/Geom2d_OffsetCurve.hxx | 7 -- src/Geom2d/Geom2d_Parabola.hxx | 2 - src/Geom2d/Geom2d_Transformation.hxx | 3 - src/Geom2d/Geom2d_TrimmedCurve.hxx | 5 -- src/Geom2d/Geom2d_Vector.hxx | 3 - src/Geom2d/Geom2d_VectorWithMagnitude.hxx | 2 - src/Geom2dAPI/Geom2dAPI_ExtremaCurveCurve.hxx | 3 - src/Geom2dAPI/Geom2dAPI_InterCurveCurve.hxx | 3 - src/Geom2dAPI/Geom2dAPI_Interpolate.hxx | 2 - src/Geom2dAPI/Geom2dAPI_PointsToBSpline.hxx | 2 - .../Geom2dAPI_ProjectPointOnCurve.hxx | 3 - src/Geom2dAdaptor/Geom2dAdaptor_Curve.hxx | 2 - src/Geom2dConvert/Geom2dConvert.hxx | 4 - .../Geom2dConvert_ApproxCurve.hxx | 1 - ...eom2dConvert_BSplineCurveKnotSplitting.hxx | 2 - ...eom2dConvert_BSplineCurveToBezierCurve.hxx | 3 - src/Geom2dGcc/Geom2dGcc.hxx | 25 ------ src/Geom2dGcc/Geom2dGcc_Circ2d2TanOn.hxx | 3 - src/Geom2dGcc/Geom2dGcc_Circ2d2TanOnGeo.hxx | 3 - src/Geom2dGcc/Geom2dGcc_Circ2d2TanOnIter.hxx | 3 - src/Geom2dGcc/Geom2dGcc_Circ2d2TanRad.hxx | 4 - src/Geom2dGcc/Geom2dGcc_Circ2d2TanRadGeo.hxx | 4 - src/Geom2dGcc/Geom2dGcc_Circ2d3Tan.hxx | 2 - src/Geom2dGcc/Geom2dGcc_Circ2d3TanIter.hxx | 3 - src/Geom2dGcc/Geom2dGcc_Circ2dTanCen.hxx | 3 - src/Geom2dGcc/Geom2dGcc_Circ2dTanCenGeo.hxx | 3 - src/Geom2dGcc/Geom2dGcc_Circ2dTanOnRad.hxx | 4 - src/Geom2dGcc/Geom2dGcc_Circ2dTanOnRadGeo.hxx | 4 - src/Geom2dGcc/Geom2dGcc_FunctionTanCirCu.hxx | 2 - src/Geom2dGcc/Geom2dGcc_FunctionTanCuCu.hxx | 3 - src/Geom2dGcc/Geom2dGcc_FunctionTanCuCuCu.hxx | 4 - .../Geom2dGcc_FunctionTanCuCuOnCu.hxx | 5 -- src/Geom2dGcc/Geom2dGcc_FunctionTanCuPnt.hxx | 2 - src/Geom2dGcc/Geom2dGcc_FunctionTanObl.hxx | 2 - src/Geom2dGcc/Geom2dGcc_Lin2d2Tan.hxx | 3 - src/Geom2dGcc/Geom2dGcc_Lin2d2TanIter.hxx | 4 - src/Geom2dGcc/Geom2dGcc_Lin2dTanObl.hxx | 4 - src/Geom2dGcc/Geom2dGcc_Lin2dTanOblIter.hxx | 5 -- src/Geom2dGcc/Geom2dGcc_QCurve.hxx | 1 - src/Geom2dGcc/Geom2dGcc_QualifiedCurve.hxx | 1 - src/Geom2dHatch/Geom2dHatch_Element.hxx | 1 - src/Geom2dHatch/Geom2dHatch_Elements.hxx | 2 - src/Geom2dToIGES/Geom2dToIGES_Geom2dCurve.hxx | 1 - src/Geom2dToIGES/Geom2dToIGES_Geom2dPoint.hxx | 1 - .../Geom2dToIGES_Geom2dVector.hxx | 1 - src/GeomAPI/GeomAPI.hxx | 10 --- src/GeomAPI/GeomAPI_ExtremaCurveCurve.hxx | 4 - src/GeomAPI/GeomAPI_ExtremaCurveSurface.hxx | 3 - src/GeomAPI/GeomAPI_ExtremaSurfaceSurface.hxx | 3 - src/GeomAPI/GeomAPI_IntCS.hxx | 2 - src/GeomAPI/GeomAPI_PointsToBSpline.hxx | 2 - .../GeomAPI_PointsToBSplineSurface.hxx | 1 - src/GeomAPI/GeomAPI_ProjectPointOnCurve.hxx | 3 - src/GeomAPI/GeomAPI_ProjectPointOnSurf.hxx | 3 - .../GeomAdaptor_SurfaceOfLinearExtrusion.hxx | 6 -- .../GeomAdaptor_SurfaceOfRevolution.hxx | 6 -- src/GeomConvert/GeomConvert.hxx | 8 -- src/GeomConvert/GeomConvert_ApproxCurve.hxx | 2 - .../GeomConvert_BSplineCurveKnotSplitting.hxx | 2 - .../GeomConvert_BSplineCurveToBezierCurve.hxx | 3 - ...eomConvert_BSplineSurfaceKnotSplitting.hxx | 2 - ...mConvert_BSplineSurfaceToBezierSurface.hxx | 3 - ...ert_CompBezierSurfacesToBSplineSurface.hxx | 3 - src/GeomFill/GeomFill.hxx | 54 ------------- src/GeomFill/GeomFill_BSplineCurves.hxx | 1 - src/GeomFill/GeomFill_BezierCurves.hxx | 1 - src/GeomFill/GeomFill_BoundWithSurf.hxx | 1 - src/GeomFill/GeomFill_CircularBlendFunc.hxx | 2 - src/GeomFill/GeomFill_ConstantBiNormal.hxx | 4 - src/GeomFill/GeomFill_CoonsAlgPatch.hxx | 1 - src/GeomFill/GeomFill_CorrectedFrenet.hxx | 4 - src/GeomFill/GeomFill_CurveAndTrihedron.hxx | 5 -- src/GeomFill/GeomFill_Darboux.hxx | 3 - src/GeomFill/GeomFill_DegeneratedBound.hxx | 1 - src/GeomFill/GeomFill_DiscreteTrihedron.hxx | 3 - src/GeomFill/GeomFill_DraftTrihedron.hxx | 4 - src/GeomFill/GeomFill_EvolvedSection.hxx | 1 - src/GeomFill/GeomFill_Filling.hxx | 1 - src/GeomFill/GeomFill_Fixed.hxx | 4 - src/GeomFill/GeomFill_Frenet.hxx | 3 - src/GeomFill/GeomFill_FunctionGuide.hxx | 1 - src/GeomFill/GeomFill_Generator.hxx | 2 - src/GeomFill/GeomFill_GuideTrihedronAC.hxx | 2 - src/GeomFill/GeomFill_GuideTrihedronPlan.hxx | 2 - src/GeomFill/GeomFill_LocationDraft.hxx | 1 - src/GeomFill/GeomFill_LocationGuide.hxx | 5 -- src/GeomFill/GeomFill_LocationLaw.hxx | 2 - src/GeomFill/GeomFill_NSections.hxx | 1 - src/GeomFill/GeomFill_PlanFunc.hxx | 1 - src/GeomFill/GeomFill_PolynomialConvertor.hxx | 1 - src/GeomFill/GeomFill_Profiler.hxx | 2 - .../GeomFill_QuasiAngularConvertor.hxx | 1 - src/GeomFill/GeomFill_SectionLaw.hxx | 3 - src/GeomFill/GeomFill_SectionPlacement.hxx | 1 - src/GeomFill/GeomFill_SnglrFunc.hxx | 2 - src/GeomFill/GeomFill_Sweep.hxx | 3 - src/GeomFill/GeomFill_SweepFunction.hxx | 1 - .../GeomFill_SweepSectionGenerator.hxx | 1 - src/GeomFill/GeomFill_Tensor.hxx | 2 - src/GeomFill/GeomFill_TrihedronLaw.hxx | 2 - src/GeomFill/GeomFill_TrihedronWithGuide.hxx | 3 - src/GeomFill/GeomFill_UniformSection.hxx | 1 - src/GeomInt/GeomInt.hxx | 28 ------- src/GeomLProp/GeomLProp.hxx | 4 - src/GeomLib/GeomLib.hxx | 10 --- src/GeomLib/GeomLib_Check2dBSplineCurve.hxx | 2 - src/GeomLib/GeomLib_CheckBSplineCurve.hxx | 2 - src/GeomLib/GeomLib_DenominatorMultiplier.hxx | 2 - src/GeomLib/GeomLib_Interpolate.hxx | 2 - src/GeomLib/GeomLib_IsPlanarSurface.hxx | 2 - src/GeomLib/GeomLib_LogSample.hxx | 1 - src/GeomLib/GeomLib_MakeCurvefromApprox.hxx | 3 - src/GeomPlate/GeomPlate_Aij.hxx | 2 - src/GeomPlate/GeomPlate_BuildAveragePlane.hxx | 2 - src/GeomPlate/GeomPlate_BuildPlateSurface.hxx | 2 - src/GeomPlate/GeomPlate_CurveConstraint.hxx | 2 - src/GeomPlate/GeomPlate_PointConstraint.hxx | 5 -- src/GeomPlate/GeomPlate_Surface.hxx | 6 -- src/GeomToIGES/GeomToIGES_GeomCurve.hxx | 1 - src/GeomToIGES/GeomToIGES_GeomPoint.hxx | 1 - src/GeomToIGES/GeomToIGES_GeomSurface.hxx | 1 - src/GeomToIGES/GeomToIGES_GeomVector.hxx | 1 - .../GeomToStep_MakeAxis1Placement.hxx | 1 - .../GeomToStep_MakeAxis2Placement2d.hxx | 1 - .../GeomToStep_MakeAxis2Placement3d.hxx | 1 - .../GeomToStep_MakeBSplineCurveWithKnots.hxx | 1 - ...eCurveWithKnotsAndRationalBSplineCurve.hxx | 1 - ...GeomToStep_MakeBSplineSurfaceWithKnots.hxx | 1 - ...faceWithKnotsAndRationalBSplineSurface.hxx | 1 - .../GeomToStep_MakeBoundedCurve.hxx | 1 - .../GeomToStep_MakeBoundedSurface.hxx | 1 - .../GeomToStep_MakeCartesianPoint.hxx | 1 - src/GeomToStep/GeomToStep_MakeCircle.hxx | 1 - src/GeomToStep/GeomToStep_MakeConic.hxx | 1 - .../GeomToStep_MakeConicalSurface.hxx | 1 - src/GeomToStep/GeomToStep_MakeCurve.hxx | 1 - .../GeomToStep_MakeCylindricalSurface.hxx | 1 - src/GeomToStep/GeomToStep_MakeDirection.hxx | 1 - .../GeomToStep_MakeElementarySurface.hxx | 1 - src/GeomToStep/GeomToStep_MakeEllipse.hxx | 1 - src/GeomToStep/GeomToStep_MakeHyperbola.hxx | 1 - src/GeomToStep/GeomToStep_MakeLine.hxx | 1 - src/GeomToStep/GeomToStep_MakeParabola.hxx | 1 - src/GeomToStep/GeomToStep_MakePlane.hxx | 1 - src/GeomToStep/GeomToStep_MakePolyline.hxx | 1 - ...omToStep_MakeRectangularTrimmedSurface.hxx | 1 - .../GeomToStep_MakeSphericalSurface.hxx | 1 - src/GeomToStep/GeomToStep_MakeSurface.hxx | 1 - ...eomToStep_MakeSurfaceOfLinearExtrusion.hxx | 1 - .../GeomToStep_MakeSurfaceOfRevolution.hxx | 1 - .../GeomToStep_MakeSweptSurface.hxx | 1 - .../GeomToStep_MakeToroidalSurface.hxx | 1 - src/GeomToStep/GeomToStep_MakeVector.hxx | 1 - src/GeomTools/GeomTools.hxx | 4 - src/GeomTools/GeomTools_Curve2dSet.hxx | 1 - src/GeomTools/GeomTools_CurveSet.hxx | 1 - src/GeomTools/GeomTools_SurfaceSet.hxx | 1 - src/Graphic3d/Graphic3d_CView.hxx | 1 - src/Graphic3d/Graphic3d_Camera.hxx | 1 - src/Graphic3d/Graphic3d_Structure.hxx | 1 - src/Graphic3d/Graphic3d_Texture1D.hxx | 1 - src/Graphic3d/Graphic3d_TextureEnv.hxx | 1 - src/HLRAlgo/HLRAlgo_EdgeStatus.hxx | 1 - src/HLRAlgo/HLRAlgo_Projector.hxx | 3 - src/HLRAppli/HLRAppli_ReflectLines.hxx | 1 - src/HLRBRep/HLRBRep.hxx | 55 ------------- src/HLRBRep/HLRBRep_AreaLimit.hxx | 1 - src/HLRBRep/HLRBRep_BCurveTool.hxx | 3 - src/HLRBRep/HLRBRep_Curve.hxx | 5 -- src/HLRBRep/HLRBRep_CurveTool.hxx | 3 - src/HLRBRep/HLRBRep_Data.hxx | 3 - src/HLRBRep/HLRBRep_EdgeBuilder.hxx | 3 - src/HLRBRep/HLRBRep_EdgeInterferenceTool.hxx | 1 - src/HLRBRep/HLRBRep_FaceData.hxx | 1 - src/HLRBRep/HLRBRep_InternalAlgo.hxx | 2 - src/HLRBRep/HLRBRep_Intersector.hxx | 2 - src/HLRBRep/HLRBRep_PolyAlgo.hxx | 1 - src/HLRBRep/HLRBRep_ShapeBounds.hxx | 1 - src/HLRBRep/HLRBRep_Surface.hxx | 4 - src/HLRBRep/HLRBRep_VertexList.hxx | 1 - src/HLRTest/HLRTest.hxx | 5 -- src/HLRTest/HLRTest_OutLiner.hxx | 1 - src/HLRTest/HLRTest_ShapeData.hxx | 1 - src/HLRTopoBRep/HLRTopoBRep_OutLiner.hxx | 2 - src/HLRTopoBRep/HLRTopoBRep_VData.hxx | 1 - src/Hatch/Hatch_Hatcher.hxx | 1 - src/Hatch/Hatch_Line.hxx | 2 - src/Hatch/Hatch_Parameter.hxx | 2 - src/HatchGen/HatchGen_Domain.hxx | 2 - src/HatchGen/HatchGen_PointOnHatching.hxx | 1 - src/HeaderSection/HeaderSection.hxx | 5 -- src/IFGraph/IFGraph_AllConnected.hxx | 1 - src/IFGraph/IFGraph_AllShared.hxx | 1 - src/IFGraph/IFGraph_Articulations.hxx | 1 - src/IFGraph/IFGraph_Compare.hxx | 1 - src/IFGraph/IFGraph_Cumulate.hxx | 1 - src/IFGraph/IFGraph_ExternalSources.hxx | 1 - src/IFGraph/IFGraph_SCRoots.hxx | 1 - src/IFGraph/IFGraph_SubPartsIterator.hxx | 4 - src/IFSelect/IFSelect.hxx | 78 ------------------- src/IFSelect/IFSelect_Act.hxx | 1 - src/IFSelect/IFSelect_Activator.hxx | 2 - src/IFSelect/IFSelect_ContextModif.hxx | 3 - src/IFSelect/IFSelect_ContextWrite.hxx | 2 - src/IFSelect/IFSelect_DispPerCount.hxx | 1 - src/IFSelect/IFSelect_DispPerFiles.hxx | 1 - src/IFSelect/IFSelect_DispPerSignature.hxx | 1 - src/IFSelect/IFSelect_Dispatch.hxx | 1 - src/IFSelect/IFSelect_EditForm.hxx | 1 - src/IFSelect/IFSelect_Editor.hxx | 2 - src/IFSelect/IFSelect_PacketList.hxx | 2 - src/IFSelect/IFSelect_ParamEditor.hxx | 1 - src/IFSelect/IFSelect_SelectAnyList.hxx | 2 - src/IFSelect/IFSelect_SelectCombine.hxx | 1 - src/IFSelect/IFSelect_SelectControl.hxx | 1 - src/IFSelect/IFSelect_SelectDeduct.hxx | 2 - src/IFSelect/IFSelect_SelectFlag.hxx | 1 - src/IFSelect/IFSelect_SelectInList.hxx | 1 - src/IFSelect/IFSelect_SelectPointed.hxx | 1 - src/IFSelect/IFSelect_SelectRange.hxx | 1 - src/IFSelect/IFSelect_SelectSignature.hxx | 1 - src/IFSelect/IFSelect_SelectSignedShared.hxx | 1 - src/IFSelect/IFSelect_SelectSignedSharing.hxx | 1 - src/IFSelect/IFSelect_SelectSuite.hxx | 3 - src/IFSelect/IFSelect_Selection.hxx | 1 - src/IFSelect/IFSelect_SelectionIterator.hxx | 1 - src/IFSelect/IFSelect_SessionDumper.hxx | 1 - src/IFSelect/IFSelect_SessionFile.hxx | 1 - src/IFSelect/IFSelect_SessionPilot.hxx | 2 - src/IFSelect/IFSelect_ShareOut.hxx | 3 - src/IFSelect/IFSelect_ShareOutResult.hxx | 3 - src/IFSelect/IFSelect_SignMultiple.hxx | 1 - src/IFSelect/IFSelect_Signature.hxx | 1 - src/IFSelect/IFSelect_Transformer.hxx | 1 - src/IFSelect/IFSelect_WorkLibrary.hxx | 1 - src/IFSelect/IFSelect_WorkSession.hxx | 2 - 305 files changed, 895 deletions(-) diff --git a/src/BinMDF/BinMDF.hxx b/src/BinMDF/BinMDF.hxx index eeb43b5226..0259876417 100644 --- a/src/BinMDF/BinMDF.hxx +++ b/src/BinMDF/BinMDF.hxx @@ -22,10 +22,6 @@ class BinMDF_ADriverTable; class Message_Messenger; -class BinMDF_ADriver; -class BinMDF_ReferenceDriver; -class BinMDF_TagSourceDriver; -class BinMDF_ADriverTable; //! This package provides classes and methods to diff --git a/src/BinMDF/BinMDF_ADriver.hxx b/src/BinMDF/BinMDF_ADriver.hxx index 9033635e14..608d2e81ea 100644 --- a/src/BinMDF/BinMDF_ADriver.hxx +++ b/src/BinMDF/BinMDF_ADriver.hxx @@ -28,9 +28,7 @@ #include class Message_Messenger; class TDF_Attribute; -class TCollection_AsciiString; class BinObjMgt_Persistent; -class TCollection_ExtendedString; class BinMDF_ADriver; diff --git a/src/GCE2d/GCE2d_MakeArcOfCircle.hxx b/src/GCE2d/GCE2d_MakeArcOfCircle.hxx index 77471e52f0..0136879aa3 100644 --- a/src/GCE2d/GCE2d_MakeArcOfCircle.hxx +++ b/src/GCE2d/GCE2d_MakeArcOfCircle.hxx @@ -24,7 +24,6 @@ #include #include -class StdFail_NotDone; class gp_Circ2d; class gp_Pnt2d; class gp_Vec2d; diff --git a/src/GCE2d/GCE2d_MakeArcOfEllipse.hxx b/src/GCE2d/GCE2d_MakeArcOfEllipse.hxx index bf63890e06..eb5b4c279b 100644 --- a/src/GCE2d/GCE2d_MakeArcOfEllipse.hxx +++ b/src/GCE2d/GCE2d_MakeArcOfEllipse.hxx @@ -24,7 +24,6 @@ #include #include -class StdFail_NotDone; class gp_Elips2d; class gp_Pnt2d; diff --git a/src/GCE2d/GCE2d_MakeArcOfHyperbola.hxx b/src/GCE2d/GCE2d_MakeArcOfHyperbola.hxx index 155bac5ead..c74f391123 100644 --- a/src/GCE2d/GCE2d_MakeArcOfHyperbola.hxx +++ b/src/GCE2d/GCE2d_MakeArcOfHyperbola.hxx @@ -24,7 +24,6 @@ #include #include -class StdFail_NotDone; class gp_Hypr2d; class gp_Pnt2d; diff --git a/src/GCE2d/GCE2d_MakeArcOfParabola.hxx b/src/GCE2d/GCE2d_MakeArcOfParabola.hxx index 0f0613de31..0c1cf2be62 100644 --- a/src/GCE2d/GCE2d_MakeArcOfParabola.hxx +++ b/src/GCE2d/GCE2d_MakeArcOfParabola.hxx @@ -24,7 +24,6 @@ #include #include -class StdFail_NotDone; class gp_Parab2d; class gp_Pnt2d; diff --git a/src/GCE2d/GCE2d_MakeCircle.hxx b/src/GCE2d/GCE2d_MakeCircle.hxx index ce073285a5..a7d0364781 100644 --- a/src/GCE2d/GCE2d_MakeCircle.hxx +++ b/src/GCE2d/GCE2d_MakeCircle.hxx @@ -24,7 +24,6 @@ #include #include -class StdFail_NotDone; class gp_Circ2d; class gp_Ax2d; class gp_Ax22d; diff --git a/src/GCE2d/GCE2d_MakeEllipse.hxx b/src/GCE2d/GCE2d_MakeEllipse.hxx index 350bb0b3dd..5d14998d8a 100644 --- a/src/GCE2d/GCE2d_MakeEllipse.hxx +++ b/src/GCE2d/GCE2d_MakeEllipse.hxx @@ -24,7 +24,6 @@ #include #include -class StdFail_NotDone; class gp_Elips2d; class gp_Ax2d; class gp_Ax22d; diff --git a/src/GCE2d/GCE2d_MakeHyperbola.hxx b/src/GCE2d/GCE2d_MakeHyperbola.hxx index 74485c7812..437a68ddd4 100644 --- a/src/GCE2d/GCE2d_MakeHyperbola.hxx +++ b/src/GCE2d/GCE2d_MakeHyperbola.hxx @@ -24,7 +24,6 @@ #include #include -class StdFail_NotDone; class gp_Hypr2d; class gp_Ax2d; class gp_Ax22d; diff --git a/src/GCE2d/GCE2d_MakeLine.hxx b/src/GCE2d/GCE2d_MakeLine.hxx index 68c88902c1..80c611ec2b 100644 --- a/src/GCE2d/GCE2d_MakeLine.hxx +++ b/src/GCE2d/GCE2d_MakeLine.hxx @@ -24,7 +24,6 @@ #include #include -class StdFail_NotDone; class gp_Ax2d; class gp_Lin2d; class gp_Pnt2d; diff --git a/src/GCE2d/GCE2d_MakeParabola.hxx b/src/GCE2d/GCE2d_MakeParabola.hxx index 55266a649f..e31a014d63 100644 --- a/src/GCE2d/GCE2d_MakeParabola.hxx +++ b/src/GCE2d/GCE2d_MakeParabola.hxx @@ -24,7 +24,6 @@ #include #include -class StdFail_NotDone; class gp_Parab2d; class gp_Ax22d; class gp_Ax2d; diff --git a/src/GCE2d/GCE2d_MakeSegment.hxx b/src/GCE2d/GCE2d_MakeSegment.hxx index f3d373f039..86b3d417f4 100644 --- a/src/GCE2d/GCE2d_MakeSegment.hxx +++ b/src/GCE2d/GCE2d_MakeSegment.hxx @@ -24,7 +24,6 @@ #include #include -class StdFail_NotDone; class gp_Pnt2d; class gp_Dir2d; class gp_Lin2d; diff --git a/src/GCPnts/GCPnts_DistFunction.hxx b/src/GCPnts/GCPnts_DistFunction.hxx index fc010e29fb..2206c4bff1 100644 --- a/src/GCPnts/GCPnts_DistFunction.hxx +++ b/src/GCPnts/GCPnts_DistFunction.hxx @@ -19,7 +19,6 @@ #include #include -class gp_Pnt; //! Class to define function, which calculates square distance between point on curve //! C(u), U1 <= u <= U2 and line passing through points C(U1) and C(U2) diff --git a/src/GCPnts/GCPnts_DistFunction2d.hxx b/src/GCPnts/GCPnts_DistFunction2d.hxx index d9d5bd4f36..87a43e0aa8 100644 --- a/src/GCPnts/GCPnts_DistFunction2d.hxx +++ b/src/GCPnts/GCPnts_DistFunction2d.hxx @@ -19,7 +19,6 @@ #include #include -class gp_Pnt2d; //! Class to define function, which calculates square distance between point on curve //! C(u), U1 <= u <= U2 and line passing through points C(U1) and C(U2) diff --git a/src/GProp/GProp.hxx b/src/GProp/GProp.hxx index 794232d54b..d3f62243bd 100644 --- a/src/GProp/GProp.hxx +++ b/src/GProp/GProp.hxx @@ -24,13 +24,6 @@ #include class gp_Pnt; class gp_Mat; -class GProp_GProps; -class GProp_PGProps; -class GProp_CelGProps; -class GProp_SelGProps; -class GProp_VelGProps; -class GProp_PrincipalProps; -class GProp_PEquation; diff --git a/src/GProp/GProp_GProps.hxx b/src/GProp/GProp_GProps.hxx index 617a825e07..8071319d4c 100644 --- a/src/GProp/GProp_GProps.hxx +++ b/src/GProp/GProp_GProps.hxx @@ -24,9 +24,6 @@ #include #include #include -class Standard_DomainError; -class gp_Pnt; -class gp_Mat; class gp_Ax1; class GProp_PrincipalProps; diff --git a/src/GProp/GProp_PEquation.hxx b/src/GProp/GProp_PEquation.hxx index dfabee2d53..c2570937a2 100644 --- a/src/GProp/GProp_PEquation.hxx +++ b/src/GProp/GProp_PEquation.hxx @@ -27,11 +27,8 @@ #include #include #include -class Standard_NoSuchObject; class gp_Pln; class gp_Lin; -class gp_Pnt; -class gp_Vec; //! A framework to analyze a collection - or cloud diff --git a/src/GProp/GProp_PGProps.hxx b/src/GProp/GProp_PGProps.hxx index 2800ed04ea..b6a794191f 100644 --- a/src/GProp/GProp_PGProps.hxx +++ b/src/GProp/GProp_PGProps.hxx @@ -27,8 +27,6 @@ #include #include #include -class Standard_DimensionError; -class Standard_DomainError; class gp_Pnt; diff --git a/src/GProp/GProp_PrincipalProps.hxx b/src/GProp/GProp_PrincipalProps.hxx index fecae24883..1eaa64cf7e 100644 --- a/src/GProp/GProp_PrincipalProps.hxx +++ b/src/GProp/GProp_PrincipalProps.hxx @@ -26,9 +26,6 @@ #include #include #include -class GProp_UndefinedAxis; -class gp_Vec; -class gp_Pnt; diff --git a/src/GccEnt/GccEnt.hxx b/src/GccEnt/GccEnt.hxx index 67ba510d4a..8e8e574d99 100644 --- a/src/GccEnt/GccEnt.hxx +++ b/src/GccEnt/GccEnt.hxx @@ -27,8 +27,6 @@ class GccEnt_QualifiedLin; class gp_Lin2d; class GccEnt_QualifiedCirc; class gp_Circ2d; -class GccEnt_QualifiedLin; -class GccEnt_QualifiedCirc; //! This package provides an implementation of the qualified diff --git a/src/GccEnt/GccEnt_QualifiedCirc.hxx b/src/GccEnt/GccEnt_QualifiedCirc.hxx index 6149694c0a..2798392164 100644 --- a/src/GccEnt/GccEnt_QualifiedCirc.hxx +++ b/src/GccEnt/GccEnt_QualifiedCirc.hxx @@ -24,7 +24,6 @@ #include #include #include -class gp_Circ2d; //! Creates a qualified 2d Circle. diff --git a/src/GccEnt/GccEnt_QualifiedLin.hxx b/src/GccEnt/GccEnt_QualifiedLin.hxx index 9740be3632..ea4df1b219 100644 --- a/src/GccEnt/GccEnt_QualifiedLin.hxx +++ b/src/GccEnt/GccEnt_QualifiedLin.hxx @@ -24,7 +24,6 @@ #include #include #include -class gp_Lin2d; //! Describes a qualified 2D line. diff --git a/src/GccInt/GccInt_BCirc.hxx b/src/GccInt/GccInt_BCirc.hxx index 77ee34fcf4..bb113c00fb 100644 --- a/src/GccInt/GccInt_BCirc.hxx +++ b/src/GccInt/GccInt_BCirc.hxx @@ -23,7 +23,6 @@ #include #include #include -class gp_Circ2d; class GccInt_BCirc; diff --git a/src/GccInt/GccInt_BElips.hxx b/src/GccInt/GccInt_BElips.hxx index 6c024160bc..9f856dd6bd 100644 --- a/src/GccInt/GccInt_BElips.hxx +++ b/src/GccInt/GccInt_BElips.hxx @@ -23,7 +23,6 @@ #include #include #include -class gp_Elips2d; class GccInt_BElips; diff --git a/src/GccInt/GccInt_BHyper.hxx b/src/GccInt/GccInt_BHyper.hxx index 7d55e3c1fb..06e3f62f0a 100644 --- a/src/GccInt/GccInt_BHyper.hxx +++ b/src/GccInt/GccInt_BHyper.hxx @@ -23,7 +23,6 @@ #include #include #include -class gp_Hypr2d; class GccInt_BHyper; diff --git a/src/GccInt/GccInt_BLine.hxx b/src/GccInt/GccInt_BLine.hxx index 3e30595fd2..dcdaef676d 100644 --- a/src/GccInt/GccInt_BLine.hxx +++ b/src/GccInt/GccInt_BLine.hxx @@ -23,7 +23,6 @@ #include #include #include -class gp_Lin2d; class GccInt_BLine; diff --git a/src/GccInt/GccInt_BParab.hxx b/src/GccInt/GccInt_BParab.hxx index 1411af3b40..4e26bf5b4c 100644 --- a/src/GccInt/GccInt_BParab.hxx +++ b/src/GccInt/GccInt_BParab.hxx @@ -23,7 +23,6 @@ #include #include #include -class gp_Parab2d; class GccInt_BParab; diff --git a/src/GccInt/GccInt_BPoint.hxx b/src/GccInt/GccInt_BPoint.hxx index f376254fc1..7d28748e62 100644 --- a/src/GccInt/GccInt_BPoint.hxx +++ b/src/GccInt/GccInt_BPoint.hxx @@ -23,7 +23,6 @@ #include #include #include -class gp_Pnt2d; class GccInt_BPoint; diff --git a/src/GccInt/GccInt_Bisec.hxx b/src/GccInt/GccInt_Bisec.hxx index ee5ea11507..59fde09754 100644 --- a/src/GccInt/GccInt_Bisec.hxx +++ b/src/GccInt/GccInt_Bisec.hxx @@ -22,7 +22,6 @@ #include #include -class Standard_DomainError; class gp_Pnt2d; class gp_Lin2d; class gp_Circ2d; diff --git a/src/Geom/Geom_Axis2Placement.hxx b/src/Geom/Geom_Axis2Placement.hxx index 813e904f07..06048cc038 100644 --- a/src/Geom/Geom_Axis2Placement.hxx +++ b/src/Geom/Geom_Axis2Placement.hxx @@ -22,10 +22,8 @@ #include #include -class Standard_ConstructionError; class gp_Ax2; class gp_Pnt; -class gp_Dir; class gp_Trsf; class Geom_Geometry; diff --git a/src/Geom/Geom_AxisPlacement.hxx b/src/Geom/Geom_AxisPlacement.hxx index f5b4407189..e889bd6567 100644 --- a/src/Geom/Geom_AxisPlacement.hxx +++ b/src/Geom/Geom_AxisPlacement.hxx @@ -23,8 +23,6 @@ #include #include #include -class Standard_ConstructionError; -class gp_Ax1; class gp_Dir; class gp_Pnt; diff --git a/src/Geom/Geom_BSplineCurve.hxx b/src/Geom/Geom_BSplineCurve.hxx index 7c97f2e626..83a8a73297 100644 --- a/src/Geom/Geom_BSplineCurve.hxx +++ b/src/Geom/Geom_BSplineCurve.hxx @@ -33,13 +33,6 @@ #include #include #include -class Standard_ConstructionError; -class Standard_DimensionError; -class Standard_DomainError; -class Standard_OutOfRange; -class Standard_RangeError; -class Standard_NoSuchObject; -class Geom_UndefinedDerivative; class gp_Pnt; class gp_Vec; class gp_Trsf; diff --git a/src/Geom/Geom_BSplineSurface.hxx b/src/Geom/Geom_BSplineSurface.hxx index 23245f3298..5f6dd3b467 100644 --- a/src/Geom/Geom_BSplineSurface.hxx +++ b/src/Geom/Geom_BSplineSurface.hxx @@ -36,13 +36,6 @@ #include #include #include -class Standard_ConstructionError; -class Standard_DimensionError; -class Standard_DomainError; -class Standard_OutOfRange; -class Standard_NoSuchObject; -class Standard_RangeError; -class Geom_UndefinedDerivative; class gp_Pnt; class gp_Vec; class Geom_Curve; diff --git a/src/Geom/Geom_BezierCurve.hxx b/src/Geom/Geom_BezierCurve.hxx index 6d2c8c197e..9989ce0977 100644 --- a/src/Geom/Geom_BezierCurve.hxx +++ b/src/Geom/Geom_BezierCurve.hxx @@ -31,10 +31,6 @@ #include #include -class Standard_ConstructionError; -class Standard_DimensionError; -class Standard_RangeError; -class Standard_OutOfRange; class gp_Pnt; class gp_Vec; class gp_Trsf; diff --git a/src/Geom/Geom_BezierSurface.hxx b/src/Geom/Geom_BezierSurface.hxx index ac78de5c5a..be548dbe5a 100644 --- a/src/Geom/Geom_BezierSurface.hxx +++ b/src/Geom/Geom_BezierSurface.hxx @@ -33,10 +33,6 @@ #include #include -class Standard_ConstructionError; -class Standard_DimensionError; -class Standard_RangeError; -class Standard_OutOfRange; class gp_Pnt; class gp_Vec; class Geom_Curve; diff --git a/src/Geom/Geom_CartesianPoint.hxx b/src/Geom/Geom_CartesianPoint.hxx index 417e6b2cd4..50f234df4a 100644 --- a/src/Geom/Geom_CartesianPoint.hxx +++ b/src/Geom/Geom_CartesianPoint.hxx @@ -23,7 +23,6 @@ #include #include #include -class gp_Pnt; class gp_Trsf; class Geom_Geometry; diff --git a/src/Geom/Geom_Circle.hxx b/src/Geom/Geom_Circle.hxx index b7736dd39d..0de456a877 100644 --- a/src/Geom/Geom_Circle.hxx +++ b/src/Geom/Geom_Circle.hxx @@ -24,8 +24,6 @@ #include #include #include -class Standard_ConstructionError; -class Standard_RangeError; class gp_Circ; class gp_Ax2; class gp_Pnt; diff --git a/src/Geom/Geom_ConicalSurface.hxx b/src/Geom/Geom_ConicalSurface.hxx index 50da8c3a60..bb53ad9bb6 100644 --- a/src/Geom/Geom_ConicalSurface.hxx +++ b/src/Geom/Geom_ConicalSurface.hxx @@ -24,8 +24,6 @@ #include #include #include -class Standard_ConstructionError; -class Standard_RangeError; class gp_Ax3; class gp_Cone; class gp_Trsf; diff --git a/src/Geom/Geom_Curve.hxx b/src/Geom/Geom_Curve.hxx index 2a72409d07..352a37f1cc 100644 --- a/src/Geom/Geom_Curve.hxx +++ b/src/Geom/Geom_Curve.hxx @@ -25,10 +25,6 @@ #include #include #include -class Standard_RangeError; -class Standard_NoSuchObject; -class Geom_UndefinedDerivative; -class Geom_UndefinedValue; class gp_Trsf; class gp_Pnt; class gp_Vec; diff --git a/src/Geom/Geom_CylindricalSurface.hxx b/src/Geom/Geom_CylindricalSurface.hxx index bcf432207a..dc4a79969e 100644 --- a/src/Geom/Geom_CylindricalSurface.hxx +++ b/src/Geom/Geom_CylindricalSurface.hxx @@ -24,8 +24,6 @@ #include #include #include -class Standard_ConstructionError; -class Standard_RangeError; class gp_Ax3; class gp_Cylinder; class gp_Trsf; diff --git a/src/Geom/Geom_Direction.hxx b/src/Geom/Geom_Direction.hxx index a06579e96d..8528220026 100644 --- a/src/Geom/Geom_Direction.hxx +++ b/src/Geom/Geom_Direction.hxx @@ -22,9 +22,7 @@ #include #include -class Standard_ConstructionError; class gp_Dir; -class Geom_Vector; class gp_Trsf; class Geom_Geometry; diff --git a/src/Geom/Geom_Ellipse.hxx b/src/Geom/Geom_Ellipse.hxx index 6a946331c9..c5232a5f31 100644 --- a/src/Geom/Geom_Ellipse.hxx +++ b/src/Geom/Geom_Ellipse.hxx @@ -24,8 +24,6 @@ #include #include #include -class Standard_ConstructionError; -class Standard_RangeError; class gp_Elips; class gp_Ax2; class gp_Ax1; diff --git a/src/Geom/Geom_Geometry.hxx b/src/Geom/Geom_Geometry.hxx index 77c982865a..85a24c1ffc 100644 --- a/src/Geom/Geom_Geometry.hxx +++ b/src/Geom/Geom_Geometry.hxx @@ -22,7 +22,6 @@ #include #include -class Standard_ConstructionError; class gp_Pnt; class gp_Ax1; class gp_Ax2; diff --git a/src/Geom/Geom_Hyperbola.hxx b/src/Geom/Geom_Hyperbola.hxx index 630b97db1c..46a6225959 100644 --- a/src/Geom/Geom_Hyperbola.hxx +++ b/src/Geom/Geom_Hyperbola.hxx @@ -24,9 +24,6 @@ #include #include #include -class Standard_ConstructionError; -class Standard_DomainError; -class Standard_RangeError; class gp_Hypr; class gp_Ax2; class gp_Ax1; diff --git a/src/Geom/Geom_Line.hxx b/src/Geom/Geom_Line.hxx index ab0b638a39..39023ca541 100644 --- a/src/Geom/Geom_Line.hxx +++ b/src/Geom/Geom_Line.hxx @@ -26,8 +26,6 @@ #include #include #include -class Standard_RangeError; -class gp_Ax1; class gp_Lin; class gp_Pnt; class gp_Dir; diff --git a/src/Geom/Geom_OffsetCurve.hxx b/src/Geom/Geom_OffsetCurve.hxx index 8eb0219de9..9647a29723 100644 --- a/src/Geom/Geom_OffsetCurve.hxx +++ b/src/Geom/Geom_OffsetCurve.hxx @@ -28,13 +28,6 @@ #include #include -class Geom_Curve; -class Standard_ConstructionError; -class Standard_RangeError; -class Standard_NoSuchObject; -class Geom_UndefinedDerivative; -class Geom_UndefinedValue; -class gp_Dir; class gp_Pnt; class gp_Vec; class gp_Trsf; diff --git a/src/Geom/Geom_OffsetSurface.hxx b/src/Geom/Geom_OffsetSurface.hxx index 71cdeb9096..4e63f80053 100644 --- a/src/Geom/Geom_OffsetSurface.hxx +++ b/src/Geom/Geom_OffsetSurface.hxx @@ -27,12 +27,6 @@ #include #include #include -class Geom_Surface; -class Standard_ConstructionError; -class Standard_RangeError; -class Standard_NoSuchObject; -class Geom_UndefinedDerivative; -class Geom_UndefinedValue; class Geom_Curve; class gp_Pnt; class gp_Vec; diff --git a/src/Geom/Geom_Parabola.hxx b/src/Geom/Geom_Parabola.hxx index 78defeea20..0d36ece8f2 100644 --- a/src/Geom/Geom_Parabola.hxx +++ b/src/Geom/Geom_Parabola.hxx @@ -24,8 +24,6 @@ #include #include #include -class Standard_ConstructionError; -class Standard_RangeError; class gp_Parab; class gp_Ax2; class gp_Ax1; diff --git a/src/Geom/Geom_Plane.hxx b/src/Geom/Geom_Plane.hxx index 544d5c49a1..fb2ccd198e 100644 --- a/src/Geom/Geom_Plane.hxx +++ b/src/Geom/Geom_Plane.hxx @@ -24,8 +24,6 @@ #include #include #include -class Standard_ConstructionError; -class Standard_RangeError; class gp_Ax3; class gp_Pln; class gp_Pnt; diff --git a/src/Geom/Geom_RectangularTrimmedSurface.hxx b/src/Geom/Geom_RectangularTrimmedSurface.hxx index 2e06fdee78..8c8a693cfe 100644 --- a/src/Geom/Geom_RectangularTrimmedSurface.hxx +++ b/src/Geom/Geom_RectangularTrimmedSurface.hxx @@ -26,11 +26,6 @@ #include #include class Geom_Surface; -class Standard_ConstructionError; -class Standard_RangeError; -class Standard_NoSuchObject; -class Geom_UndefinedDerivative; -class Geom_UndefinedValue; class Geom_Curve; class gp_Pnt; class gp_Vec; diff --git a/src/Geom/Geom_SphericalSurface.hxx b/src/Geom/Geom_SphericalSurface.hxx index 9baab5a731..2297ea176a 100644 --- a/src/Geom/Geom_SphericalSurface.hxx +++ b/src/Geom/Geom_SphericalSurface.hxx @@ -24,8 +24,6 @@ #include #include #include -class Standard_ConstructionError; -class Standard_RangeError; class gp_Ax3; class gp_Sphere; class Geom_Curve; diff --git a/src/Geom/Geom_SurfaceOfLinearExtrusion.hxx b/src/Geom/Geom_SurfaceOfLinearExtrusion.hxx index 3d975f4e2b..3c94122077 100644 --- a/src/Geom/Geom_SurfaceOfLinearExtrusion.hxx +++ b/src/Geom/Geom_SurfaceOfLinearExtrusion.hxx @@ -25,8 +25,6 @@ #include #include #include -class Standard_RangeError; -class Geom_UndefinedDerivative; class Geom_Curve; class gp_Dir; class gp_Pnt; diff --git a/src/Geom/Geom_SurfaceOfRevolution.hxx b/src/Geom/Geom_SurfaceOfRevolution.hxx index 306e6b7eda..0cd518e2c1 100644 --- a/src/Geom/Geom_SurfaceOfRevolution.hxx +++ b/src/Geom/Geom_SurfaceOfRevolution.hxx @@ -26,13 +26,9 @@ #include #include #include -class Standard_ConstructionError; -class Standard_RangeError; -class Geom_UndefinedDerivative; class Geom_Curve; class gp_Ax1; class gp_Dir; -class gp_Pnt; class gp_Ax2; class gp_Trsf; class gp_GTrsf2d; diff --git a/src/Geom/Geom_SweptSurface.hxx b/src/Geom/Geom_SweptSurface.hxx index 2a06e9810d..d39c7d3f5b 100644 --- a/src/Geom/Geom_SweptSurface.hxx +++ b/src/Geom/Geom_SweptSurface.hxx @@ -24,7 +24,6 @@ #include #include class Geom_Curve; -class gp_Dir; class Geom_SweptSurface; diff --git a/src/Geom/Geom_ToroidalSurface.hxx b/src/Geom/Geom_ToroidalSurface.hxx index f199d57034..496d07a9f9 100644 --- a/src/Geom/Geom_ToroidalSurface.hxx +++ b/src/Geom/Geom_ToroidalSurface.hxx @@ -25,9 +25,6 @@ #include #include #include -class Standard_ConstructionError; -class Standard_DimensionError; -class Standard_RangeError; class gp_Ax3; class gp_Torus; class Geom_Curve; diff --git a/src/Geom/Geom_TrimmedCurve.hxx b/src/Geom/Geom_TrimmedCurve.hxx index 55cc621eb0..5de8f516a1 100644 --- a/src/Geom/Geom_TrimmedCurve.hxx +++ b/src/Geom/Geom_TrimmedCurve.hxx @@ -26,11 +26,6 @@ #include #include class Geom_Curve; -class Standard_ConstructionError; -class Standard_RangeError; -class Standard_NoSuchObject; -class Geom_UndefinedDerivative; -class Geom_UndefinedValue; class gp_Pnt; class gp_Vec; class gp_Trsf; diff --git a/src/Geom/Geom_Vector.hxx b/src/Geom/Geom_Vector.hxx index f060d26627..8a1b97001f 100644 --- a/src/Geom/Geom_Vector.hxx +++ b/src/Geom/Geom_Vector.hxx @@ -23,10 +23,6 @@ #include #include #include -class Standard_ConstructionError; -class Standard_DomainError; -class gp_VectorWithNullMagnitude; -class gp_Vec; class Geom_Vector; diff --git a/src/Geom/Geom_VectorWithMagnitude.hxx b/src/Geom/Geom_VectorWithMagnitude.hxx index 32a4db422a..171f685883 100644 --- a/src/Geom/Geom_VectorWithMagnitude.hxx +++ b/src/Geom/Geom_VectorWithMagnitude.hxx @@ -22,10 +22,8 @@ #include #include -class Standard_ConstructionError; class gp_Vec; class gp_Pnt; -class Geom_Vector; class gp_Trsf; class Geom_Geometry; diff --git a/src/Geom2d/Geom2d_AxisPlacement.hxx b/src/Geom2d/Geom2d_AxisPlacement.hxx index eb68666931..2712b78a15 100644 --- a/src/Geom2d/Geom2d_AxisPlacement.hxx +++ b/src/Geom2d/Geom2d_AxisPlacement.hxx @@ -23,11 +23,9 @@ #include #include #include -class gp_Ax2d; class gp_Pnt2d; class gp_Dir2d; class gp_Trsf2d; -class Geom2d_Geometry; class Geom2d_AxisPlacement; diff --git a/src/Geom2d/Geom2d_BSplineCurve.hxx b/src/Geom2d/Geom2d_BSplineCurve.hxx index 235325672d..6b99369f65 100644 --- a/src/Geom2d/Geom2d_BSplineCurve.hxx +++ b/src/Geom2d/Geom2d_BSplineCurve.hxx @@ -33,13 +33,6 @@ #include #include #include -class Standard_ConstructionError; -class Standard_DimensionError; -class Standard_DomainError; -class Standard_OutOfRange; -class Standard_RangeError; -class Standard_NoSuchObject; -class Geom2d_UndefinedDerivative; class gp_Pnt2d; class gp_Vec2d; class gp_Trsf2d; diff --git a/src/Geom2d/Geom2d_BezierCurve.hxx b/src/Geom2d/Geom2d_BezierCurve.hxx index 97f830c81d..3b25e5eee3 100644 --- a/src/Geom2d/Geom2d_BezierCurve.hxx +++ b/src/Geom2d/Geom2d_BezierCurve.hxx @@ -31,10 +31,6 @@ #include #include -class Standard_ConstructionError; -class Standard_DimensionError; -class Standard_RangeError; -class Standard_OutOfRange; class gp_Pnt2d; class gp_Vec2d; class gp_Trsf2d; diff --git a/src/Geom2d/Geom2d_CartesianPoint.hxx b/src/Geom2d/Geom2d_CartesianPoint.hxx index e06e880ee8..5cabc66ff8 100644 --- a/src/Geom2d/Geom2d_CartesianPoint.hxx +++ b/src/Geom2d/Geom2d_CartesianPoint.hxx @@ -23,7 +23,6 @@ #include #include #include -class gp_Pnt2d; class gp_Trsf2d; class Geom2d_Geometry; diff --git a/src/Geom2d/Geom2d_Circle.hxx b/src/Geom2d/Geom2d_Circle.hxx index b5f4ba165c..3555ea44dd 100644 --- a/src/Geom2d/Geom2d_Circle.hxx +++ b/src/Geom2d/Geom2d_Circle.hxx @@ -24,8 +24,6 @@ #include #include #include -class Standard_ConstructionError; -class Standard_RangeError; class gp_Circ2d; class gp_Ax2d; class gp_Ax22d; diff --git a/src/Geom2d/Geom2d_Curve.hxx b/src/Geom2d/Geom2d_Curve.hxx index 613fe7df54..5f753ee59f 100644 --- a/src/Geom2d/Geom2d_Curve.hxx +++ b/src/Geom2d/Geom2d_Curve.hxx @@ -25,10 +25,6 @@ #include #include #include -class Standard_RangeError; -class Standard_NoSuchObject; -class Geom2d_UndefinedDerivative; -class Geom2d_UndefinedValue; class gp_Trsf2d; class gp_Pnt2d; class gp_Vec2d; diff --git a/src/Geom2d/Geom2d_Direction.hxx b/src/Geom2d/Geom2d_Direction.hxx index 316ec1a36e..e5677ecb81 100644 --- a/src/Geom2d/Geom2d_Direction.hxx +++ b/src/Geom2d/Geom2d_Direction.hxx @@ -22,9 +22,7 @@ #include #include -class Standard_ConstructionError; class gp_Dir2d; -class Geom2d_Vector; class gp_Trsf2d; class Geom2d_Geometry; diff --git a/src/Geom2d/Geom2d_Ellipse.hxx b/src/Geom2d/Geom2d_Ellipse.hxx index 3216bf88d6..77119ecb2c 100644 --- a/src/Geom2d/Geom2d_Ellipse.hxx +++ b/src/Geom2d/Geom2d_Ellipse.hxx @@ -24,8 +24,6 @@ #include #include #include -class Standard_ConstructionError; -class Standard_RangeError; class gp_Elips2d; class gp_Ax2d; class gp_Ax22d; diff --git a/src/Geom2d/Geom2d_Geometry.hxx b/src/Geom2d/Geom2d_Geometry.hxx index d90790d86c..4d3a30d688 100644 --- a/src/Geom2d/Geom2d_Geometry.hxx +++ b/src/Geom2d/Geom2d_Geometry.hxx @@ -22,7 +22,6 @@ #include #include -class Standard_ConstructionError; class gp_Pnt2d; class gp_Ax2d; class gp_Vec2d; diff --git a/src/Geom2d/Geom2d_Hyperbola.hxx b/src/Geom2d/Geom2d_Hyperbola.hxx index d23bb0856d..be65633829 100644 --- a/src/Geom2d/Geom2d_Hyperbola.hxx +++ b/src/Geom2d/Geom2d_Hyperbola.hxx @@ -24,9 +24,6 @@ #include #include #include -class Standard_ConstructionError; -class Standard_DomainError; -class Standard_RangeError; class gp_Hypr2d; class gp_Ax2d; class gp_Ax22d; diff --git a/src/Geom2d/Geom2d_Line.hxx b/src/Geom2d/Geom2d_Line.hxx index 75346f57bf..3ede3c2244 100644 --- a/src/Geom2d/Geom2d_Line.hxx +++ b/src/Geom2d/Geom2d_Line.hxx @@ -26,8 +26,6 @@ #include #include #include -class Standard_RangeError; -class gp_Ax2d; class gp_Lin2d; class gp_Pnt2d; class gp_Dir2d; diff --git a/src/Geom2d/Geom2d_OffsetCurve.hxx b/src/Geom2d/Geom2d_OffsetCurve.hxx index 3cc51d2af5..5bf41d7686 100644 --- a/src/Geom2d/Geom2d_OffsetCurve.hxx +++ b/src/Geom2d/Geom2d_OffsetCurve.hxx @@ -27,13 +27,6 @@ #include #include -class Geom2d_Curve; -class Standard_ConstructionError; -class Standard_RangeError; -class Standard_NoSuchObject; -class Geom2d_UndefinedDerivative; -class Geom2d_UndefinedValue; -class Standard_NotImplemented; class gp_Pnt2d; class gp_Vec2d; class gp_Trsf2d; diff --git a/src/Geom2d/Geom2d_Parabola.hxx b/src/Geom2d/Geom2d_Parabola.hxx index 4d05db7212..8d5d99c477 100644 --- a/src/Geom2d/Geom2d_Parabola.hxx +++ b/src/Geom2d/Geom2d_Parabola.hxx @@ -24,8 +24,6 @@ #include #include #include -class Standard_ConstructionError; -class Standard_RangeError; class gp_Parab2d; class gp_Ax2d; class gp_Ax22d; diff --git a/src/Geom2d/Geom2d_Transformation.hxx b/src/Geom2d/Geom2d_Transformation.hxx index 7085b89827..78634612d9 100644 --- a/src/Geom2d/Geom2d_Transformation.hxx +++ b/src/Geom2d/Geom2d_Transformation.hxx @@ -26,9 +26,6 @@ #include #include #include -class Standard_ConstructionError; -class Standard_OutOfRange; -class gp_Trsf2d; class gp_Pnt2d; class gp_Ax2d; class gp_Vec2d; diff --git a/src/Geom2d/Geom2d_TrimmedCurve.hxx b/src/Geom2d/Geom2d_TrimmedCurve.hxx index 096c615bf8..28165b8a1f 100644 --- a/src/Geom2d/Geom2d_TrimmedCurve.hxx +++ b/src/Geom2d/Geom2d_TrimmedCurve.hxx @@ -26,11 +26,6 @@ #include #include class Geom2d_Curve; -class Standard_ConstructionError; -class Standard_RangeError; -class Standard_NoSuchObject; -class Geom2d_UndefinedDerivative; -class Geom2d_UndefinedValue; class gp_Pnt2d; class gp_Vec2d; class gp_Trsf2d; diff --git a/src/Geom2d/Geom2d_Vector.hxx b/src/Geom2d/Geom2d_Vector.hxx index c106b30c16..8df9b7709a 100644 --- a/src/Geom2d/Geom2d_Vector.hxx +++ b/src/Geom2d/Geom2d_Vector.hxx @@ -23,9 +23,6 @@ #include #include #include -class Standard_DomainError; -class gp_VectorWithNullMagnitude; -class gp_Vec2d; class Geom2d_Vector; diff --git a/src/Geom2d/Geom2d_VectorWithMagnitude.hxx b/src/Geom2d/Geom2d_VectorWithMagnitude.hxx index 2a40681c68..5b0b2dc6aa 100644 --- a/src/Geom2d/Geom2d_VectorWithMagnitude.hxx +++ b/src/Geom2d/Geom2d_VectorWithMagnitude.hxx @@ -22,10 +22,8 @@ #include #include -class Standard_ConstructionError; class gp_Vec2d; class gp_Pnt2d; -class Geom2d_Vector; class gp_Trsf2d; class Geom2d_Geometry; diff --git a/src/Geom2dAPI/Geom2dAPI_ExtremaCurveCurve.hxx b/src/Geom2dAPI/Geom2dAPI_ExtremaCurveCurve.hxx index 6e49db3278..d583cce0ec 100644 --- a/src/Geom2dAPI/Geom2dAPI_ExtremaCurveCurve.hxx +++ b/src/Geom2dAPI/Geom2dAPI_ExtremaCurveCurve.hxx @@ -25,11 +25,8 @@ #include #include #include -class Standard_OutOfRange; -class StdFail_NotDone; class Geom2d_Curve; class gp_Pnt2d; -class Extrema_ExtCC2d; //! Describes functions for computing all the extrema diff --git a/src/Geom2dAPI/Geom2dAPI_InterCurveCurve.hxx b/src/Geom2dAPI/Geom2dAPI_InterCurveCurve.hxx index bb0adebb3e..02913838e7 100644 --- a/src/Geom2dAPI/Geom2dAPI_InterCurveCurve.hxx +++ b/src/Geom2dAPI/Geom2dAPI_InterCurveCurve.hxx @@ -26,10 +26,7 @@ #include #include class Geom2d_Curve; -class Standard_OutOfRange; -class Standard_NullObject; class gp_Pnt2d; -class Geom2dInt_GInter; //! This class implements methods for computing diff --git a/src/Geom2dAPI/Geom2dAPI_Interpolate.hxx b/src/Geom2dAPI/Geom2dAPI_Interpolate.hxx index c98ecf167c..fc9730d03e 100644 --- a/src/Geom2dAPI/Geom2dAPI_Interpolate.hxx +++ b/src/Geom2dAPI/Geom2dAPI_Interpolate.hxx @@ -29,8 +29,6 @@ #include #include class Geom2d_BSplineCurve; -class StdFail_NotDone; -class Standard_ConstructionError; class gp_Vec2d; diff --git a/src/Geom2dAPI/Geom2dAPI_PointsToBSpline.hxx b/src/Geom2dAPI/Geom2dAPI_PointsToBSpline.hxx index 3e2c3c495e..3a260c8bdf 100644 --- a/src/Geom2dAPI/Geom2dAPI_PointsToBSpline.hxx +++ b/src/Geom2dAPI/Geom2dAPI_PointsToBSpline.hxx @@ -29,8 +29,6 @@ #include #include class Geom2d_BSplineCurve; -class StdFail_NotDone; -class Standard_OutOfRange; //! This class is used to approximate a BsplineCurve diff --git a/src/Geom2dAPI/Geom2dAPI_ProjectPointOnCurve.hxx b/src/Geom2dAPI/Geom2dAPI_ProjectPointOnCurve.hxx index 260e1e94dd..31672e2b9e 100644 --- a/src/Geom2dAPI/Geom2dAPI_ProjectPointOnCurve.hxx +++ b/src/Geom2dAPI/Geom2dAPI_ProjectPointOnCurve.hxx @@ -25,11 +25,8 @@ #include #include #include -class Standard_OutOfRange; -class StdFail_NotDone; class gp_Pnt2d; class Geom2d_Curve; -class Extrema_ExtPC2d; diff --git a/src/Geom2dAdaptor/Geom2dAdaptor_Curve.hxx b/src/Geom2dAdaptor/Geom2dAdaptor_Curve.hxx index accca173af..14ec6b5e9b 100644 --- a/src/Geom2dAdaptor/Geom2dAdaptor_Curve.hxx +++ b/src/Geom2dAdaptor/Geom2dAdaptor_Curve.hxx @@ -28,8 +28,6 @@ #include #include -class Standard_OutOfRange; -class Standard_DomainError; class gp_Vec2d; class gp_Lin2d; class gp_Circ2d; diff --git a/src/Geom2dConvert/Geom2dConvert.hxx b/src/Geom2dConvert/Geom2dConvert.hxx index 67763ec223..3141832898 100644 --- a/src/Geom2dConvert/Geom2dConvert.hxx +++ b/src/Geom2dConvert/Geom2dConvert.hxx @@ -31,10 +31,6 @@ #include class Geom2d_BSplineCurve; class Geom2d_Curve; -class Geom2dConvert_BSplineCurveKnotSplitting; -class Geom2dConvert_BSplineCurveToBezierCurve; -class Geom2dConvert_CompCurveToBSplineCurve; -class Geom2dConvert_ApproxCurve; diff --git a/src/Geom2dConvert/Geom2dConvert_ApproxCurve.hxx b/src/Geom2dConvert/Geom2dConvert_ApproxCurve.hxx index 41f23678bd..7d51b860ae 100644 --- a/src/Geom2dConvert/Geom2dConvert_ApproxCurve.hxx +++ b/src/Geom2dConvert/Geom2dConvert_ApproxCurve.hxx @@ -22,7 +22,6 @@ #include class Geom2d_BSplineCurve; -class Standard_OutOfRange; class Geom2d_Curve; //! A framework to convert a 2D curve to a BSpline. diff --git a/src/Geom2dConvert/Geom2dConvert_BSplineCurveKnotSplitting.hxx b/src/Geom2dConvert/Geom2dConvert_BSplineCurveKnotSplitting.hxx index 123acff90e..3ee6b2c629 100644 --- a/src/Geom2dConvert/Geom2dConvert_BSplineCurveKnotSplitting.hxx +++ b/src/Geom2dConvert/Geom2dConvert_BSplineCurveKnotSplitting.hxx @@ -23,8 +23,6 @@ #include #include #include -class Standard_DimensionError; -class Standard_RangeError; class Geom2d_BSplineCurve; diff --git a/src/Geom2dConvert/Geom2dConvert_BSplineCurveToBezierCurve.hxx b/src/Geom2dConvert/Geom2dConvert_BSplineCurveToBezierCurve.hxx index 5b494a3d4d..456c336257 100644 --- a/src/Geom2dConvert/Geom2dConvert_BSplineCurveToBezierCurve.hxx +++ b/src/Geom2dConvert/Geom2dConvert_BSplineCurveToBezierCurve.hxx @@ -26,9 +26,6 @@ #include #include class Geom2d_BSplineCurve; -class Standard_DimensionError; -class Standard_DomainError; -class Standard_OutOfRange; class Geom2d_BezierCurve; diff --git a/src/Geom2dGcc/Geom2dGcc.hxx b/src/Geom2dGcc/Geom2dGcc.hxx index 4b4b129c48..3062f8df6b 100644 --- a/src/Geom2dGcc/Geom2dGcc.hxx +++ b/src/Geom2dGcc/Geom2dGcc.hxx @@ -23,31 +23,6 @@ class Geom2dGcc_QualifiedCurve; class Geom2dAdaptor_Curve; -class Geom2dGcc_CurveTool; -class Geom2dGcc_QualifiedCurve; -class Geom2dGcc_Circ2d3Tan; -class Geom2dGcc_Circ2d2TanRad; -class Geom2dGcc_Circ2d2TanOn; -class Geom2dGcc_Circ2dTanOnRad; -class Geom2dGcc_Circ2dTanCen; -class Geom2dGcc_Lin2d2Tan; -class Geom2dGcc_Lin2dTanObl; -class Geom2dGcc_QCurve; -class Geom2dGcc_CurveToolGeo; -class Geom2dGcc_Circ2d2TanOnGeo; -class Geom2dGcc_Circ2d2TanRadGeo; -class Geom2dGcc_Circ2dTanCenGeo; -class Geom2dGcc_Circ2dTanOnRadGeo; -class Geom2dGcc_Circ2d3TanIter; -class Geom2dGcc_FunctionTanCuCuCu; -class Geom2dGcc_Circ2d2TanOnIter; -class Geom2dGcc_FunctionTanCuCuOnCu; -class Geom2dGcc_Lin2dTanOblIter; -class Geom2dGcc_FunctionTanObl; -class Geom2dGcc_Lin2d2TanIter; -class Geom2dGcc_FunctionTanCuCu; -class Geom2dGcc_FunctionTanCuPnt; -class Geom2dGcc_FunctionTanCirCu; //! The Geom2dGcc package describes qualified 2D diff --git a/src/Geom2dGcc/Geom2dGcc_Circ2d2TanOn.hxx b/src/Geom2dGcc/Geom2dGcc_Circ2d2TanOn.hxx index 80cae3dc57..0dd0847022 100644 --- a/src/Geom2dGcc/Geom2dGcc_Circ2d2TanOn.hxx +++ b/src/Geom2dGcc/Geom2dGcc_Circ2d2TanOn.hxx @@ -30,9 +30,6 @@ #include #include #include -class StdFail_NotDone; -class GccEnt_BadQualifier; -class Standard_OutOfRange; class Geom2dGcc_QualifiedCurve; class Geom2dAdaptor_Curve; class Geom2d_Point; diff --git a/src/Geom2dGcc/Geom2dGcc_Circ2d2TanOnGeo.hxx b/src/Geom2dGcc/Geom2dGcc_Circ2d2TanOnGeo.hxx index 18ba12836a..c137355797 100644 --- a/src/Geom2dGcc/Geom2dGcc_Circ2d2TanOnGeo.hxx +++ b/src/Geom2dGcc/Geom2dGcc_Circ2d2TanOnGeo.hxx @@ -30,9 +30,6 @@ #include #include #include -class StdFail_NotDone; -class GccEnt_BadQualifier; -class Standard_OutOfRange; class GccEnt_QualifiedCirc; class Geom2dAdaptor_Curve; class GccEnt_QualifiedLin; diff --git a/src/Geom2dGcc/Geom2dGcc_Circ2d2TanOnIter.hxx b/src/Geom2dGcc/Geom2dGcc_Circ2d2TanOnIter.hxx index 125300b6d3..d68f91755f 100644 --- a/src/Geom2dGcc/Geom2dGcc_Circ2d2TanOnIter.hxx +++ b/src/Geom2dGcc/Geom2dGcc_Circ2d2TanOnIter.hxx @@ -26,13 +26,10 @@ #include #include #include -class StdFail_NotDone; class GccEnt_QualifiedCirc; class Geom2dGcc_QCurve; class gp_Lin2d; class GccEnt_QualifiedLin; -class gp_Pnt2d; -class gp_Circ2d; class Geom2dAdaptor_Curve; diff --git a/src/Geom2dGcc/Geom2dGcc_Circ2d2TanRad.hxx b/src/Geom2dGcc/Geom2dGcc_Circ2d2TanRad.hxx index cb1cbf1a86..bec9d8da4c 100644 --- a/src/Geom2dGcc/Geom2dGcc_Circ2d2TanRad.hxx +++ b/src/Geom2dGcc/Geom2dGcc_Circ2d2TanRad.hxx @@ -30,10 +30,6 @@ #include #include #include -class Standard_OutOfRange; -class GccEnt_BadQualifier; -class StdFail_NotDone; -class Standard_NegativeValue; class Geom2dGcc_QualifiedCurve; class Geom2d_Point; class GccAna_Circ2d2TanRad; diff --git a/src/Geom2dGcc/Geom2dGcc_Circ2d2TanRadGeo.hxx b/src/Geom2dGcc/Geom2dGcc_Circ2d2TanRadGeo.hxx index 8d95970ff9..b1c74894b1 100644 --- a/src/Geom2dGcc/Geom2dGcc_Circ2d2TanRadGeo.hxx +++ b/src/Geom2dGcc/Geom2dGcc_Circ2d2TanRadGeo.hxx @@ -30,10 +30,6 @@ #include #include #include -class Standard_OutOfRange; -class GccEnt_BadQualifier; -class StdFail_NotDone; -class Standard_NegativeValue; class GccEnt_QualifiedCirc; class Geom2dGcc_QCurve; class GccEnt_QualifiedLin; diff --git a/src/Geom2dGcc/Geom2dGcc_Circ2d3Tan.hxx b/src/Geom2dGcc/Geom2dGcc_Circ2d3Tan.hxx index f0eae4f05c..9f43634de9 100644 --- a/src/Geom2dGcc/Geom2dGcc_Circ2d3Tan.hxx +++ b/src/Geom2dGcc/Geom2dGcc_Circ2d3Tan.hxx @@ -30,8 +30,6 @@ #include #include #include -class StdFail_NotDone; -class Standard_OutOfRange; class Geom2dGcc_QualifiedCurve; class Geom2d_Point; class GccAna_Circ2d3Tan; diff --git a/src/Geom2dGcc/Geom2dGcc_Circ2d3TanIter.hxx b/src/Geom2dGcc/Geom2dGcc_Circ2d3TanIter.hxx index 9a7c6c0123..6ebb8caef8 100644 --- a/src/Geom2dGcc/Geom2dGcc_Circ2d3TanIter.hxx +++ b/src/Geom2dGcc/Geom2dGcc_Circ2d3TanIter.hxx @@ -26,12 +26,9 @@ #include #include #include -class StdFail_NotDone; class GccEnt_QualifiedCirc; class Geom2dGcc_QCurve; class GccEnt_QualifiedLin; -class gp_Pnt2d; -class gp_Circ2d; //! This class implements the algorithms used to diff --git a/src/Geom2dGcc/Geom2dGcc_Circ2dTanCen.hxx b/src/Geom2dGcc/Geom2dGcc_Circ2dTanCen.hxx index e6531240b4..691ed0877f 100644 --- a/src/Geom2dGcc/Geom2dGcc_Circ2dTanCen.hxx +++ b/src/Geom2dGcc/Geom2dGcc_Circ2dTanCen.hxx @@ -30,9 +30,6 @@ #include #include #include -class Standard_OutOfRange; -class GccEnt_BadQualifier; -class StdFail_NotDone; class Geom2dGcc_QualifiedCurve; class Geom2d_Point; class gp_Circ2d; diff --git a/src/Geom2dGcc/Geom2dGcc_Circ2dTanCenGeo.hxx b/src/Geom2dGcc/Geom2dGcc_Circ2dTanCenGeo.hxx index ed14635baa..6da68a6017 100644 --- a/src/Geom2dGcc/Geom2dGcc_Circ2dTanCenGeo.hxx +++ b/src/Geom2dGcc/Geom2dGcc_Circ2dTanCenGeo.hxx @@ -29,9 +29,6 @@ #include #include #include -class Standard_OutOfRange; -class GccEnt_BadQualifier; -class StdFail_NotDone; class Geom2dGcc_QCurve; class gp_Pnt2d; class gp_Circ2d; diff --git a/src/Geom2dGcc/Geom2dGcc_Circ2dTanOnRad.hxx b/src/Geom2dGcc/Geom2dGcc_Circ2dTanOnRad.hxx index 4199bd7017..940c25090e 100644 --- a/src/Geom2dGcc/Geom2dGcc_Circ2dTanOnRad.hxx +++ b/src/Geom2dGcc/Geom2dGcc_Circ2dTanOnRad.hxx @@ -30,10 +30,6 @@ #include #include #include -class Standard_NegativeValue; -class Standard_OutOfRange; -class GccEnt_BadQualifier; -class StdFail_NotDone; class Geom2dGcc_QualifiedCurve; class Geom2dAdaptor_Curve; class Geom2d_Point; diff --git a/src/Geom2dGcc/Geom2dGcc_Circ2dTanOnRadGeo.hxx b/src/Geom2dGcc/Geom2dGcc_Circ2dTanOnRadGeo.hxx index 3da3d44a55..da11c57749 100644 --- a/src/Geom2dGcc/Geom2dGcc_Circ2dTanOnRadGeo.hxx +++ b/src/Geom2dGcc/Geom2dGcc_Circ2dTanOnRadGeo.hxx @@ -30,10 +30,6 @@ #include #include #include -class Standard_NegativeValue; -class Standard_OutOfRange; -class GccEnt_BadQualifier; -class StdFail_NotDone; class Geom2dGcc_QCurve; class gp_Lin2d; class gp_Circ2d; diff --git a/src/Geom2dGcc/Geom2dGcc_FunctionTanCirCu.hxx b/src/Geom2dGcc/Geom2dGcc_FunctionTanCirCu.hxx index dd0d1cb819..6bc9206af0 100644 --- a/src/Geom2dGcc/Geom2dGcc_FunctionTanCirCu.hxx +++ b/src/Geom2dGcc/Geom2dGcc_FunctionTanCirCu.hxx @@ -26,8 +26,6 @@ #include #include #include -class gp_Circ2d; -class Geom2dAdaptor_Curve; //! This abstract class describes a Function of 1 Variable diff --git a/src/Geom2dGcc/Geom2dGcc_FunctionTanCuCu.hxx b/src/Geom2dGcc/Geom2dGcc_FunctionTanCuCu.hxx index 815ec0730d..99334ed89d 100644 --- a/src/Geom2dGcc/Geom2dGcc_FunctionTanCuCu.hxx +++ b/src/Geom2dGcc/Geom2dGcc_FunctionTanCuCu.hxx @@ -28,9 +28,6 @@ #include #include #include -class Standard_ConstructionError; -class Geom2dAdaptor_Curve; -class gp_Circ2d; class gp_Pnt2d; class gp_Vec2d; class math_Matrix; diff --git a/src/Geom2dGcc/Geom2dGcc_FunctionTanCuCuCu.hxx b/src/Geom2dGcc/Geom2dGcc_FunctionTanCuCuCu.hxx index 9c7ab70bf4..a643f76ac9 100644 --- a/src/Geom2dGcc/Geom2dGcc_FunctionTanCuCuCu.hxx +++ b/src/Geom2dGcc/Geom2dGcc_FunctionTanCuCuCu.hxx @@ -29,10 +29,6 @@ #include #include #include -class Standard_ConstructionError; -class Geom2dAdaptor_Curve; -class gp_Circ2d; -class gp_Lin2d; class gp_Pnt2d; class gp_Vec2d; class math_Matrix; diff --git a/src/Geom2dGcc/Geom2dGcc_FunctionTanCuCuOnCu.hxx b/src/Geom2dGcc/Geom2dGcc_FunctionTanCuCuOnCu.hxx index 55e5d97694..4ce527c7fd 100644 --- a/src/Geom2dGcc/Geom2dGcc_FunctionTanCuCuOnCu.hxx +++ b/src/Geom2dGcc/Geom2dGcc_FunctionTanCuCuOnCu.hxx @@ -31,11 +31,6 @@ #include #include #include -class Standard_ConstructionError; -class Geom2dAdaptor_Curve; -class gp_Circ2d; -class gp_Lin2d; -class gp_Pnt2d; class gp_Vec2d; class math_Matrix; diff --git a/src/Geom2dGcc/Geom2dGcc_FunctionTanCuPnt.hxx b/src/Geom2dGcc/Geom2dGcc_FunctionTanCuPnt.hxx index b66881af8a..48a30e77ef 100644 --- a/src/Geom2dGcc/Geom2dGcc_FunctionTanCuPnt.hxx +++ b/src/Geom2dGcc/Geom2dGcc_FunctionTanCuPnt.hxx @@ -26,8 +26,6 @@ #include #include #include -class Geom2dAdaptor_Curve; -class gp_Pnt2d; //! This abstract class describes a Function of 1 Variable diff --git a/src/Geom2dGcc/Geom2dGcc_FunctionTanObl.hxx b/src/Geom2dGcc/Geom2dGcc_FunctionTanObl.hxx index 44ae56693d..0b232b713a 100644 --- a/src/Geom2dGcc/Geom2dGcc_FunctionTanObl.hxx +++ b/src/Geom2dGcc/Geom2dGcc_FunctionTanObl.hxx @@ -26,8 +26,6 @@ #include #include #include -class Geom2dAdaptor_Curve; -class gp_Dir2d; //! This class describe a function of a single variable. diff --git a/src/Geom2dGcc/Geom2dGcc_Lin2d2Tan.hxx b/src/Geom2dGcc/Geom2dGcc_Lin2d2Tan.hxx index 59e41dd6aa..df623aea3c 100644 --- a/src/Geom2dGcc/Geom2dGcc_Lin2d2Tan.hxx +++ b/src/Geom2dGcc/Geom2dGcc_Lin2d2Tan.hxx @@ -29,9 +29,6 @@ #include #include #include -class StdFail_NotDone; -class GccEnt_BadQualifier; -class Standard_OutOfRange; class Geom2dGcc_QualifiedCurve; class gp_Pnt2d; class gp_Lin2d; diff --git a/src/Geom2dGcc/Geom2dGcc_Lin2d2TanIter.hxx b/src/Geom2dGcc/Geom2dGcc_Lin2d2TanIter.hxx index 5dfb420336..066f4bd82c 100644 --- a/src/Geom2dGcc/Geom2dGcc_Lin2d2TanIter.hxx +++ b/src/Geom2dGcc/Geom2dGcc_Lin2d2TanIter.hxx @@ -26,12 +26,8 @@ #include #include #include -class GccEnt_BadQualifier; -class StdFail_NotDone; class Geom2dGcc_QCurve; -class gp_Pnt2d; class GccEnt_QualifiedCirc; -class gp_Lin2d; //! This class implements the algorithms used to diff --git a/src/Geom2dGcc/Geom2dGcc_Lin2dTanObl.hxx b/src/Geom2dGcc/Geom2dGcc_Lin2dTanObl.hxx index 4027fa980f..b970733cd1 100644 --- a/src/Geom2dGcc/Geom2dGcc_Lin2dTanObl.hxx +++ b/src/Geom2dGcc/Geom2dGcc_Lin2dTanObl.hxx @@ -29,10 +29,6 @@ #include #include #include -class GccEnt_BadQualifier; -class StdFail_NotDone; -class Geom2dGcc_IsParallel; -class Standard_OutOfRange; class Geom2dGcc_QualifiedCurve; class gp_Lin2d; class gp_Pnt2d; diff --git a/src/Geom2dGcc/Geom2dGcc_Lin2dTanOblIter.hxx b/src/Geom2dGcc/Geom2dGcc_Lin2dTanOblIter.hxx index 22109e3eef..0f05b663b8 100644 --- a/src/Geom2dGcc/Geom2dGcc_Lin2dTanOblIter.hxx +++ b/src/Geom2dGcc/Geom2dGcc_Lin2dTanOblIter.hxx @@ -26,12 +26,7 @@ #include #include #include -class GccEnt_BadQualifier; -class StdFail_NotDone; -class Geom2dGcc_IsParallel; class Geom2dGcc_QCurve; -class gp_Lin2d; -class gp_Pnt2d; //! This class implements the algorithms used to diff --git a/src/Geom2dGcc/Geom2dGcc_QCurve.hxx b/src/Geom2dGcc/Geom2dGcc_QCurve.hxx index 00cda2d2cd..1b7b2b9ff9 100644 --- a/src/Geom2dGcc/Geom2dGcc_QCurve.hxx +++ b/src/Geom2dGcc/Geom2dGcc_QCurve.hxx @@ -24,7 +24,6 @@ #include #include #include -class Geom2dAdaptor_Curve; //! Creates a qualified 2d line. diff --git a/src/Geom2dGcc/Geom2dGcc_QualifiedCurve.hxx b/src/Geom2dGcc/Geom2dGcc_QualifiedCurve.hxx index c16453838b..dba04b693d 100644 --- a/src/Geom2dGcc/Geom2dGcc_QualifiedCurve.hxx +++ b/src/Geom2dGcc/Geom2dGcc_QualifiedCurve.hxx @@ -24,7 +24,6 @@ #include #include #include -class Geom2dAdaptor_Curve; //! Describes functions for building a qualified 2D curve. diff --git a/src/Geom2dHatch/Geom2dHatch_Element.hxx b/src/Geom2dHatch/Geom2dHatch_Element.hxx index 4ab038ce29..554b5ba95a 100644 --- a/src/Geom2dHatch/Geom2dHatch_Element.hxx +++ b/src/Geom2dHatch/Geom2dHatch_Element.hxx @@ -23,7 +23,6 @@ #include #include -class Geom2dAdaptor_Curve; diff --git a/src/Geom2dHatch/Geom2dHatch_Elements.hxx b/src/Geom2dHatch/Geom2dHatch_Elements.hxx index 3b7f486ecb..38253f4316 100644 --- a/src/Geom2dHatch/Geom2dHatch_Elements.hxx +++ b/src/Geom2dHatch/Geom2dHatch_Elements.hxx @@ -27,8 +27,6 @@ #include #include #include -class Standard_DomainError; -class Standard_NoSuchObject; class Geom2dHatch_Element; class gp_Pnt2d; class gp_Lin2d; diff --git a/src/Geom2dToIGES/Geom2dToIGES_Geom2dCurve.hxx b/src/Geom2dToIGES/Geom2dToIGES_Geom2dCurve.hxx index 8b72d0daec..7ae9bb524c 100644 --- a/src/Geom2dToIGES/Geom2dToIGES_Geom2dCurve.hxx +++ b/src/Geom2dToIGES/Geom2dToIGES_Geom2dCurve.hxx @@ -23,7 +23,6 @@ #include #include -class Geom2dToIGES_Geom2dEntity; class IGESData_IGESEntity; class Geom2d_Curve; diff --git a/src/Geom2dToIGES/Geom2dToIGES_Geom2dPoint.hxx b/src/Geom2dToIGES/Geom2dToIGES_Geom2dPoint.hxx index 390e80559a..7b173668b4 100644 --- a/src/Geom2dToIGES/Geom2dToIGES_Geom2dPoint.hxx +++ b/src/Geom2dToIGES/Geom2dToIGES_Geom2dPoint.hxx @@ -22,7 +22,6 @@ #include #include -class Geom2dToIGES_Geom2dEntity; class IGESGeom_Point; class Geom2d_Point; class Geom2d_CartesianPoint; diff --git a/src/Geom2dToIGES/Geom2dToIGES_Geom2dVector.hxx b/src/Geom2dToIGES/Geom2dToIGES_Geom2dVector.hxx index a10bd91cea..b690945ae0 100644 --- a/src/Geom2dToIGES/Geom2dToIGES_Geom2dVector.hxx +++ b/src/Geom2dToIGES/Geom2dToIGES_Geom2dVector.hxx @@ -22,7 +22,6 @@ #include #include -class Geom2dToIGES_Geom2dEntity; class IGESGeom_Direction; class Geom2d_Vector; class Geom2d_VectorWithMagnitude; diff --git a/src/GeomAPI/GeomAPI.hxx b/src/GeomAPI/GeomAPI.hxx index 0f5ebe1cdd..341dce5e0a 100644 --- a/src/GeomAPI/GeomAPI.hxx +++ b/src/GeomAPI/GeomAPI.hxx @@ -25,16 +25,6 @@ #include class gp_Pln; -class GeomAPI_ProjectPointOnCurve; -class GeomAPI_ProjectPointOnSurf; -class GeomAPI_ExtremaCurveCurve; -class GeomAPI_ExtremaCurveSurface; -class GeomAPI_ExtremaSurfaceSurface; -class GeomAPI_PointsToBSpline; -class GeomAPI_PointsToBSplineSurface; -class GeomAPI_Interpolate; -class GeomAPI_IntSS; -class GeomAPI_IntCS; //! The GeomAPI package provides an Application diff --git a/src/GeomAPI/GeomAPI_ExtremaCurveCurve.hxx b/src/GeomAPI/GeomAPI_ExtremaCurveCurve.hxx index 20c3d6d601..fc6f80df04 100644 --- a/src/GeomAPI/GeomAPI_ExtremaCurveCurve.hxx +++ b/src/GeomAPI/GeomAPI_ExtremaCurveCurve.hxx @@ -27,11 +27,7 @@ #include #include #include -class Standard_OutOfRange; -class StdFail_NotDone; class Geom_Curve; -class gp_Pnt; -class Extrema_ExtCC; //! Describes functions for computing all the extrema diff --git a/src/GeomAPI/GeomAPI_ExtremaCurveSurface.hxx b/src/GeomAPI/GeomAPI_ExtremaCurveSurface.hxx index 8841367ee7..f510428f00 100644 --- a/src/GeomAPI/GeomAPI_ExtremaCurveSurface.hxx +++ b/src/GeomAPI/GeomAPI_ExtremaCurveSurface.hxx @@ -24,12 +24,9 @@ #include #include #include -class Standard_OutOfRange; -class StdFail_NotDone; class Geom_Curve; class Geom_Surface; class gp_Pnt; -class Extrema_ExtCS; //! Describes functions for computing all the extrema diff --git a/src/GeomAPI/GeomAPI_ExtremaSurfaceSurface.hxx b/src/GeomAPI/GeomAPI_ExtremaSurfaceSurface.hxx index 86e9f90af0..9758318b6c 100644 --- a/src/GeomAPI/GeomAPI_ExtremaSurfaceSurface.hxx +++ b/src/GeomAPI/GeomAPI_ExtremaSurfaceSurface.hxx @@ -24,11 +24,8 @@ #include #include #include -class Standard_OutOfRange; -class StdFail_NotDone; class Geom_Surface; class gp_Pnt; -class Extrema_ExtSS; //! Describes functions for computing all the extrema diff --git a/src/GeomAPI/GeomAPI_IntCS.hxx b/src/GeomAPI/GeomAPI_IntCS.hxx index a4134d7a6f..b665740d39 100644 --- a/src/GeomAPI/GeomAPI_IntCS.hxx +++ b/src/GeomAPI/GeomAPI_IntCS.hxx @@ -25,8 +25,6 @@ #include #include class Geom_Curve; -class StdFail_NotDone; -class Standard_OutOfRange; class Geom_Surface; class gp_Pnt; diff --git a/src/GeomAPI/GeomAPI_PointsToBSpline.hxx b/src/GeomAPI/GeomAPI_PointsToBSpline.hxx index 575d7fe4eb..43c9fe691c 100644 --- a/src/GeomAPI/GeomAPI_PointsToBSpline.hxx +++ b/src/GeomAPI/GeomAPI_PointsToBSpline.hxx @@ -29,8 +29,6 @@ #include #include class Geom_BSplineCurve; -class StdFail_NotDone; -class Standard_OutOfRange; //! This class is used to approximate a BsplineCurve diff --git a/src/GeomAPI/GeomAPI_PointsToBSplineSurface.hxx b/src/GeomAPI/GeomAPI_PointsToBSplineSurface.hxx index 534e9cc5bf..27710066d3 100644 --- a/src/GeomAPI/GeomAPI_PointsToBSplineSurface.hxx +++ b/src/GeomAPI/GeomAPI_PointsToBSplineSurface.hxx @@ -29,7 +29,6 @@ #include #include class Geom_BSplineSurface; -class StdFail_NotDone; //! This class is used to approximate or interpolate diff --git a/src/GeomAPI/GeomAPI_ProjectPointOnCurve.hxx b/src/GeomAPI/GeomAPI_ProjectPointOnCurve.hxx index f1939067b2..5a03eaa0cc 100644 --- a/src/GeomAPI/GeomAPI_ProjectPointOnCurve.hxx +++ b/src/GeomAPI/GeomAPI_ProjectPointOnCurve.hxx @@ -25,11 +25,8 @@ #include #include #include -class Standard_OutOfRange; -class StdFail_NotDone; class gp_Pnt; class Geom_Curve; -class Extrema_ExtPC; diff --git a/src/GeomAPI/GeomAPI_ProjectPointOnSurf.hxx b/src/GeomAPI/GeomAPI_ProjectPointOnSurf.hxx index 0d1ad5acda..1101d02511 100644 --- a/src/GeomAPI/GeomAPI_ProjectPointOnSurf.hxx +++ b/src/GeomAPI/GeomAPI_ProjectPointOnSurf.hxx @@ -28,11 +28,8 @@ #include #include #include -class Standard_OutOfRange; -class StdFail_NotDone; class gp_Pnt; class Geom_Surface; -class Extrema_ExtPS; diff --git a/src/GeomAdaptor/GeomAdaptor_SurfaceOfLinearExtrusion.hxx b/src/GeomAdaptor/GeomAdaptor_SurfaceOfLinearExtrusion.hxx index c9b3179e9e..be44b0205e 100644 --- a/src/GeomAdaptor/GeomAdaptor_SurfaceOfLinearExtrusion.hxx +++ b/src/GeomAdaptor/GeomAdaptor_SurfaceOfLinearExtrusion.hxx @@ -20,12 +20,6 @@ #include #include -class Standard_OutOfRange; -class Standard_NoSuchObject; -class Standard_DomainError; -class gp_Dir; -class gp_Pnt; -class gp_Vec; class gp_Pln; class gp_Cylinder; class gp_Cone; diff --git a/src/GeomAdaptor/GeomAdaptor_SurfaceOfRevolution.hxx b/src/GeomAdaptor/GeomAdaptor_SurfaceOfRevolution.hxx index 35485e9fb5..5df18d9164 100644 --- a/src/GeomAdaptor/GeomAdaptor_SurfaceOfRevolution.hxx +++ b/src/GeomAdaptor/GeomAdaptor_SurfaceOfRevolution.hxx @@ -21,11 +21,6 @@ #include #include -class Standard_OutOfRange; -class Standard_NoSuchObject; -class Standard_DomainError; -class gp_Pnt; -class gp_Vec; class gp_Pln; class gp_Cylinder; class gp_Cone; @@ -33,7 +28,6 @@ class gp_Sphere; class gp_Torus; class Geom_BezierSurface; class Geom_BSplineSurface; -class gp_Dir; DEFINE_STANDARD_HANDLE(GeomAdaptor_SurfaceOfRevolution, GeomAdaptor_Surface) diff --git a/src/GeomConvert/GeomConvert.hxx b/src/GeomConvert/GeomConvert.hxx index 931ec034ec..b0bc0ea726 100644 --- a/src/GeomConvert/GeomConvert.hxx +++ b/src/GeomConvert/GeomConvert.hxx @@ -33,14 +33,6 @@ class Geom_BSplineCurve; class Geom_BSplineSurface; class Geom_Curve; class Geom_Surface; -class GeomConvert_BSplineCurveKnotSplitting; -class GeomConvert_BSplineSurfaceKnotSplitting; -class GeomConvert_BSplineCurveToBezierCurve; -class GeomConvert_CompCurveToBSplineCurve; -class GeomConvert_BSplineSurfaceToBezierSurface; -class GeomConvert_CompBezierSurfacesToBSplineSurface; -class GeomConvert_ApproxSurface; -class GeomConvert_ApproxCurve; //! The GeomConvert package provides some global functions as follows diff --git a/src/GeomConvert/GeomConvert_ApproxCurve.hxx b/src/GeomConvert/GeomConvert_ApproxCurve.hxx index da6079a2eb..a18c4164ab 100644 --- a/src/GeomConvert/GeomConvert_ApproxCurve.hxx +++ b/src/GeomConvert/GeomConvert_ApproxCurve.hxx @@ -22,8 +22,6 @@ #include class Geom_BSplineCurve; -class Standard_OutOfRange; -class Standard_ConstructionError; class Geom_Curve; //! A framework to convert a 3D curve to a 3D BSpline. diff --git a/src/GeomConvert/GeomConvert_BSplineCurveKnotSplitting.hxx b/src/GeomConvert/GeomConvert_BSplineCurveKnotSplitting.hxx index 6960cf1d7b..f92e24289e 100644 --- a/src/GeomConvert/GeomConvert_BSplineCurveKnotSplitting.hxx +++ b/src/GeomConvert/GeomConvert_BSplineCurveKnotSplitting.hxx @@ -23,8 +23,6 @@ #include #include #include -class Standard_DimensionError; -class Standard_RangeError; class Geom_BSplineCurve; diff --git a/src/GeomConvert/GeomConvert_BSplineCurveToBezierCurve.hxx b/src/GeomConvert/GeomConvert_BSplineCurveToBezierCurve.hxx index 78d991b47d..f29a7f14cb 100644 --- a/src/GeomConvert/GeomConvert_BSplineCurveToBezierCurve.hxx +++ b/src/GeomConvert/GeomConvert_BSplineCurveToBezierCurve.hxx @@ -26,9 +26,6 @@ #include #include class Geom_BSplineCurve; -class Standard_DimensionError; -class Standard_DomainError; -class Standard_OutOfRange; class Geom_BezierCurve; diff --git a/src/GeomConvert/GeomConvert_BSplineSurfaceKnotSplitting.hxx b/src/GeomConvert/GeomConvert_BSplineSurfaceKnotSplitting.hxx index bdf20aa883..d947131f6d 100644 --- a/src/GeomConvert/GeomConvert_BSplineSurfaceKnotSplitting.hxx +++ b/src/GeomConvert/GeomConvert_BSplineSurfaceKnotSplitting.hxx @@ -23,8 +23,6 @@ #include #include #include -class Standard_DimensionError; -class Standard_RangeError; class Geom_BSplineSurface; diff --git a/src/GeomConvert/GeomConvert_BSplineSurfaceToBezierSurface.hxx b/src/GeomConvert/GeomConvert_BSplineSurfaceToBezierSurface.hxx index 641a3dd836..f27d73f4ff 100644 --- a/src/GeomConvert/GeomConvert_BSplineSurfaceToBezierSurface.hxx +++ b/src/GeomConvert/GeomConvert_BSplineSurfaceToBezierSurface.hxx @@ -26,9 +26,6 @@ #include #include class Geom_BSplineSurface; -class Standard_DimensionError; -class Standard_DomainError; -class Standard_OutOfRange; class Geom_BezierSurface; diff --git a/src/GeomConvert/GeomConvert_CompBezierSurfacesToBSplineSurface.hxx b/src/GeomConvert/GeomConvert_CompBezierSurfacesToBSplineSurface.hxx index 6059b64a8b..431f58af36 100644 --- a/src/GeomConvert/GeomConvert_CompBezierSurfacesToBSplineSurface.hxx +++ b/src/GeomConvert/GeomConvert_CompBezierSurfacesToBSplineSurface.hxx @@ -30,9 +30,6 @@ #include #include #include -class Standard_DimensionError; -class Standard_NotImplemented; -class Standard_ConstructionError; //! An algorithm to convert a grid of adjacent diff --git a/src/GeomFill/GeomFill.hxx b/src/GeomFill/GeomFill.hxx index f15290a518..d0d7bd4836 100644 --- a/src/GeomFill/GeomFill.hxx +++ b/src/GeomFill/GeomFill.hxx @@ -33,60 +33,6 @@ class Geom_Surface; class Geom_Curve; class gp_Vec; class gp_Pnt; -class GeomFill_Filling; -class GeomFill_Stretch; -class GeomFill_Coons; -class GeomFill_Curved; -class GeomFill_BezierCurves; -class GeomFill_BSplineCurves; -class GeomFill_Profiler; -class GeomFill_SectionGenerator; -class GeomFill_Line; -class GeomFill_AppSurf; -class GeomFill_SweepSectionGenerator; -class GeomFill_AppSweep; -class GeomFill_Generator; -class GeomFill_Pipe; -class GeomFill_Tensor; -class GeomFill_ConstrainedFilling; -class GeomFill_Boundary; -class GeomFill_DegeneratedBound; -class GeomFill_SimpleBound; -class GeomFill_BoundWithSurf; -class GeomFill_CoonsAlgPatch; -class GeomFill_TgtField; -class GeomFill_TgtOnCoons; -class GeomFill_CornerState; -class GeomFill_CircularBlendFunc; -class GeomFill_SweepFunction; -class GeomFill_LocFunction; -class GeomFill_PolynomialConvertor; -class GeomFill_QuasiAngularConvertor; -class GeomFill_SnglrFunc; -class GeomFill_FunctionDraft; -class GeomFill_PlanFunc; -class GeomFill_FunctionGuide; -class GeomFill_SectionLaw; -class GeomFill_UniformSection; -class GeomFill_EvolvedSection; -class GeomFill_NSections; -class GeomFill_LocationLaw; -class GeomFill_CurveAndTrihedron; -class GeomFill_LocationDraft; -class GeomFill_LocationGuide; -class GeomFill_TrihedronLaw; -class GeomFill_Fixed; -class GeomFill_Frenet; -class GeomFill_CorrectedFrenet; -class GeomFill_DiscreteTrihedron; -class GeomFill_ConstantBiNormal; -class GeomFill_Darboux; -class GeomFill_DraftTrihedron; -class GeomFill_TrihedronWithGuide; -class GeomFill_GuideTrihedronAC; -class GeomFill_GuideTrihedronPlan; -class GeomFill_Sweep; -class GeomFill_SectionPlacement; //! Tools and Data to filling Surface and Sweep Surfaces diff --git a/src/GeomFill/GeomFill_BSplineCurves.hxx b/src/GeomFill/GeomFill_BSplineCurves.hxx index e839213e5a..079e22fc13 100644 --- a/src/GeomFill/GeomFill_BSplineCurves.hxx +++ b/src/GeomFill/GeomFill_BSplineCurves.hxx @@ -23,7 +23,6 @@ #include class Geom_BSplineSurface; -class Standard_ConstructionError; class Geom_BSplineCurve; diff --git a/src/GeomFill/GeomFill_BezierCurves.hxx b/src/GeomFill/GeomFill_BezierCurves.hxx index 3dfebba9e9..ca06c98de8 100644 --- a/src/GeomFill/GeomFill_BezierCurves.hxx +++ b/src/GeomFill/GeomFill_BezierCurves.hxx @@ -23,7 +23,6 @@ #include class Geom_BezierSurface; -class Standard_ConstructionError; class Geom_BezierCurve; diff --git a/src/GeomFill/GeomFill_BoundWithSurf.hxx b/src/GeomFill/GeomFill_BoundWithSurf.hxx index 0f627fb33a..cfe9112757 100644 --- a/src/GeomFill/GeomFill_BoundWithSurf.hxx +++ b/src/GeomFill/GeomFill_BoundWithSurf.hxx @@ -25,7 +25,6 @@ #include #include class Law_Function; -class Adaptor3d_CurveOnSurface; class gp_Pnt; class gp_Vec; diff --git a/src/GeomFill/GeomFill_CircularBlendFunc.hxx b/src/GeomFill/GeomFill_CircularBlendFunc.hxx index c1a6e07851..52dde69ccc 100644 --- a/src/GeomFill/GeomFill_CircularBlendFunc.hxx +++ b/src/GeomFill/GeomFill_CircularBlendFunc.hxx @@ -34,8 +34,6 @@ #include #include -class Standard_OutOfRange; -class gp_Pnt; class GeomFill_CircularBlendFunc; diff --git a/src/GeomFill/GeomFill_ConstantBiNormal.hxx b/src/GeomFill/GeomFill_ConstantBiNormal.hxx index 1802b64c30..eae75c66cf 100644 --- a/src/GeomFill/GeomFill_ConstantBiNormal.hxx +++ b/src/GeomFill/GeomFill_ConstantBiNormal.hxx @@ -28,11 +28,7 @@ #include #include class GeomFill_Frenet; -class Standard_OutOfRange; -class Standard_ConstructionError; class gp_Dir; -class GeomFill_TrihedronLaw; -class gp_Vec; class GeomFill_ConstantBiNormal; diff --git a/src/GeomFill/GeomFill_CoonsAlgPatch.hxx b/src/GeomFill/GeomFill_CoonsAlgPatch.hxx index 21e43c62b3..304571416d 100644 --- a/src/GeomFill/GeomFill_CoonsAlgPatch.hxx +++ b/src/GeomFill/GeomFill_CoonsAlgPatch.hxx @@ -26,7 +26,6 @@ #include class GeomFill_Boundary; class Law_Function; -class gp_Pnt; class gp_Vec; diff --git a/src/GeomFill/GeomFill_CorrectedFrenet.hxx b/src/GeomFill/GeomFill_CorrectedFrenet.hxx index aa75164496..eccd1595a1 100644 --- a/src/GeomFill/GeomFill_CorrectedFrenet.hxx +++ b/src/GeomFill/GeomFill_CorrectedFrenet.hxx @@ -34,10 +34,6 @@ #include class GeomFill_Frenet; class Law_Function; -class Standard_OutOfRange; -class Standard_ConstructionError; -class GeomFill_TrihedronLaw; -class gp_Vec; class GeomFill_CorrectedFrenet; DEFINE_STANDARD_HANDLE(GeomFill_CorrectedFrenet, GeomFill_TrihedronLaw) diff --git a/src/GeomFill/GeomFill_CurveAndTrihedron.hxx b/src/GeomFill/GeomFill_CurveAndTrihedron.hxx index 592c1f74df..c035a47b6a 100644 --- a/src/GeomFill/GeomFill_CurveAndTrihedron.hxx +++ b/src/GeomFill/GeomFill_CurveAndTrihedron.hxx @@ -32,11 +32,6 @@ #include #include class GeomFill_TrihedronLaw; -class Standard_OutOfRange; -class gp_Mat; -class GeomFill_LocationLaw; -class gp_Vec; -class gp_Pnt; class GeomFill_CurveAndTrihedron; diff --git a/src/GeomFill/GeomFill_Darboux.hxx b/src/GeomFill/GeomFill_Darboux.hxx index 0a36c5b7f8..dc02c8e676 100644 --- a/src/GeomFill/GeomFill_Darboux.hxx +++ b/src/GeomFill/GeomFill_Darboux.hxx @@ -26,9 +26,6 @@ #include #include #include -class Standard_OutOfRange; -class Standard_ConstructionError; -class GeomFill_TrihedronLaw; class gp_Vec; diff --git a/src/GeomFill/GeomFill_DegeneratedBound.hxx b/src/GeomFill/GeomFill_DegeneratedBound.hxx index 5b944a7914..4df63c8caa 100644 --- a/src/GeomFill/GeomFill_DegeneratedBound.hxx +++ b/src/GeomFill/GeomFill_DegeneratedBound.hxx @@ -24,7 +24,6 @@ #include #include #include -class gp_Pnt; class gp_Vec; diff --git a/src/GeomFill/GeomFill_DiscreteTrihedron.hxx b/src/GeomFill/GeomFill_DiscreteTrihedron.hxx index 8153357870..2c19b64260 100644 --- a/src/GeomFill/GeomFill_DiscreteTrihedron.hxx +++ b/src/GeomFill/GeomFill_DiscreteTrihedron.hxx @@ -29,9 +29,6 @@ #include #include class GeomFill_Frenet; -class Standard_OutOfRange; -class Standard_ConstructionError; -class GeomFill_TrihedronLaw; class gp_Vec; diff --git a/src/GeomFill/GeomFill_DraftTrihedron.hxx b/src/GeomFill/GeomFill_DraftTrihedron.hxx index eb9cf33eb2..972064131b 100644 --- a/src/GeomFill/GeomFill_DraftTrihedron.hxx +++ b/src/GeomFill/GeomFill_DraftTrihedron.hxx @@ -27,10 +27,6 @@ #include #include #include -class Standard_OutOfRange; -class Standard_ConstructionError; -class gp_Vec; -class GeomFill_TrihedronLaw; class GeomFill_DraftTrihedron; diff --git a/src/GeomFill/GeomFill_EvolvedSection.hxx b/src/GeomFill/GeomFill_EvolvedSection.hxx index 08bad4c107..b8451d2819 100644 --- a/src/GeomFill/GeomFill_EvolvedSection.hxx +++ b/src/GeomFill/GeomFill_EvolvedSection.hxx @@ -32,7 +32,6 @@ class Geom_Curve; class Law_Function; class Geom_BSplineCurve; -class Standard_OutOfRange; class Geom_BSplineSurface; class gp_Pnt; diff --git a/src/GeomFill/GeomFill_Filling.hxx b/src/GeomFill/GeomFill_Filling.hxx index cd828f1583..2696cd84f9 100644 --- a/src/GeomFill/GeomFill_Filling.hxx +++ b/src/GeomFill/GeomFill_Filling.hxx @@ -27,7 +27,6 @@ #include #include #include -class Standard_NoSuchObject; //! Root class for Filling; diff --git a/src/GeomFill/GeomFill_Fixed.hxx b/src/GeomFill/GeomFill_Fixed.hxx index f0a0982eeb..d69972269d 100644 --- a/src/GeomFill/GeomFill_Fixed.hxx +++ b/src/GeomFill/GeomFill_Fixed.hxx @@ -27,10 +27,6 @@ #include #include #include -class Standard_OutOfRange; -class Standard_ConstructionError; -class gp_Vec; -class GeomFill_TrihedronLaw; class GeomFill_Fixed; diff --git a/src/GeomFill/GeomFill_Frenet.hxx b/src/GeomFill/GeomFill_Frenet.hxx index e689ef4e21..45560697b7 100644 --- a/src/GeomFill/GeomFill_Frenet.hxx +++ b/src/GeomFill/GeomFill_Frenet.hxx @@ -28,9 +28,6 @@ #include #include #include -class Standard_OutOfRange; -class Standard_ConstructionError; -class GeomFill_TrihedronLaw; class gp_Vec; diff --git a/src/GeomFill/GeomFill_FunctionGuide.hxx b/src/GeomFill/GeomFill_FunctionGuide.hxx index 0904c69587..16cb4a8e3b 100644 --- a/src/GeomFill/GeomFill_FunctionGuide.hxx +++ b/src/GeomFill/GeomFill_FunctionGuide.hxx @@ -33,7 +33,6 @@ class GeomFill_SectionLaw; class Geom_Curve; class Geom_Surface; class gp_Pnt; -class gp_XYZ; class math_Matrix; class gp_Vec; diff --git a/src/GeomFill/GeomFill_Generator.hxx b/src/GeomFill/GeomFill_Generator.hxx index bc9e5e158a..19fd5d1e0f 100644 --- a/src/GeomFill/GeomFill_Generator.hxx +++ b/src/GeomFill/GeomFill_Generator.hxx @@ -24,8 +24,6 @@ #include #include class Geom_Surface; -class StdFail_NotDone; -class Standard_DomainError; //! Create a surface using generating lines. Inherits diff --git a/src/GeomFill/GeomFill_GuideTrihedronAC.hxx b/src/GeomFill/GeomFill_GuideTrihedronAC.hxx index 0642cbcc30..b9a66f6e05 100644 --- a/src/GeomFill/GeomFill_GuideTrihedronAC.hxx +++ b/src/GeomFill/GeomFill_GuideTrihedronAC.hxx @@ -27,8 +27,6 @@ #include #include class Approx_CurvlinFunc; -class Standard_OutOfRange; -class Standard_ConstructionError; class GeomFill_TrihedronLaw; class gp_Vec; diff --git a/src/GeomFill/GeomFill_GuideTrihedronPlan.hxx b/src/GeomFill/GeomFill_GuideTrihedronPlan.hxx index acd01c5814..7d3577dcba 100644 --- a/src/GeomFill/GeomFill_GuideTrihedronPlan.hxx +++ b/src/GeomFill/GeomFill_GuideTrihedronPlan.hxx @@ -31,8 +31,6 @@ #include class GeomFill_Frenet; -class Standard_OutOfRange; -class Standard_ConstructionError; class GeomFill_TrihedronLaw; class gp_Vec; diff --git a/src/GeomFill/GeomFill_LocationDraft.hxx b/src/GeomFill/GeomFill_LocationDraft.hxx index c5e07f8d5a..7a1afa8439 100644 --- a/src/GeomFill/GeomFill_LocationDraft.hxx +++ b/src/GeomFill/GeomFill_LocationDraft.hxx @@ -31,7 +31,6 @@ #include class GeomFill_DraftTrihedron; -class GeomFill_LocationLaw; DEFINE_STANDARD_HANDLE(GeomFill_LocationDraft, GeomFill_LocationLaw) diff --git a/src/GeomFill/GeomFill_LocationGuide.hxx b/src/GeomFill/GeomFill_LocationGuide.hxx index b02c77ab60..12a7a47850 100644 --- a/src/GeomFill/GeomFill_LocationGuide.hxx +++ b/src/GeomFill/GeomFill_LocationGuide.hxx @@ -35,11 +35,6 @@ #include class GeomFill_TrihedronWithGuide; class GeomFill_SectionLaw; -class Standard_NotImplemented; -class Standard_ConstructionError; -class Standard_OutOfRange; -class gp_Mat; -class GeomFill_LocationLaw; class gp_Vec; class gp_Pnt; class Geom_Curve; diff --git a/src/GeomFill/GeomFill_LocationLaw.hxx b/src/GeomFill/GeomFill_LocationLaw.hxx index 4807b99fe5..38f020a9cd 100644 --- a/src/GeomFill/GeomFill_LocationLaw.hxx +++ b/src/GeomFill/GeomFill_LocationLaw.hxx @@ -24,8 +24,6 @@ #include #include -class Standard_NotImplemented; -class Standard_OutOfRange; class gp_Mat; class gp_Vec; class gp_Pnt; diff --git a/src/GeomFill/GeomFill_NSections.hxx b/src/GeomFill/GeomFill_NSections.hxx index 920d905b22..72fd35130f 100644 --- a/src/GeomFill/GeomFill_NSections.hxx +++ b/src/GeomFill/GeomFill_NSections.hxx @@ -33,7 +33,6 @@ #include #include class Geom_BSplineSurface; -class Standard_OutOfRange; class gp_Pnt; class Geom_Curve; diff --git a/src/GeomFill/GeomFill_PlanFunc.hxx b/src/GeomFill/GeomFill_PlanFunc.hxx index f0cc19ef03..34aca13cb0 100644 --- a/src/GeomFill/GeomFill_PlanFunc.hxx +++ b/src/GeomFill/GeomFill_PlanFunc.hxx @@ -27,7 +27,6 @@ #include #include -class gp_Pnt; class gp_Vec; diff --git a/src/GeomFill/GeomFill_PolynomialConvertor.hxx b/src/GeomFill/GeomFill_PolynomialConvertor.hxx index 8f1cc4e651..20995e413e 100644 --- a/src/GeomFill/GeomFill_PolynomialConvertor.hxx +++ b/src/GeomFill/GeomFill_PolynomialConvertor.hxx @@ -27,7 +27,6 @@ #include #include #include -class StdFail_NotDone; class gp_Pnt; class gp_Vec; diff --git a/src/GeomFill/GeomFill_Profiler.hxx b/src/GeomFill/GeomFill_Profiler.hxx index a8afdd9f4b..4739858774 100644 --- a/src/GeomFill/GeomFill_Profiler.hxx +++ b/src/GeomFill/GeomFill_Profiler.hxx @@ -28,8 +28,6 @@ #include #include #include -class StdFail_NotDone; -class Standard_DomainError; class Geom_Curve; diff --git a/src/GeomFill/GeomFill_QuasiAngularConvertor.hxx b/src/GeomFill/GeomFill_QuasiAngularConvertor.hxx index 9ae7cb36cd..e185e17fcb 100644 --- a/src/GeomFill/GeomFill_QuasiAngularConvertor.hxx +++ b/src/GeomFill/GeomFill_QuasiAngularConvertor.hxx @@ -28,7 +28,6 @@ #include #include #include -class StdFail_NotDone; class gp_Pnt; class gp_Vec; diff --git a/src/GeomFill/GeomFill_SectionLaw.hxx b/src/GeomFill/GeomFill_SectionLaw.hxx index 9f45519b03..5df2d6f07c 100644 --- a/src/GeomFill/GeomFill_SectionLaw.hxx +++ b/src/GeomFill/GeomFill_SectionLaw.hxx @@ -29,9 +29,6 @@ #include #include #include -class Standard_NotImplemented; -class Standard_DomainError; -class Standard_OutOfRange; class Geom_BSplineSurface; class gp_Pnt; class Geom_Curve; diff --git a/src/GeomFill/GeomFill_SectionPlacement.hxx b/src/GeomFill/GeomFill_SectionPlacement.hxx index 0845552894..b7b6e6fe32 100644 --- a/src/GeomFill/GeomFill_SectionPlacement.hxx +++ b/src/GeomFill/GeomFill_SectionPlacement.hxx @@ -29,7 +29,6 @@ #include class GeomFill_LocationLaw; class Geom_Curve; -class StdFail_NotDone; class Geom_Geometry; class gp_Trsf; class gp_Mat; diff --git a/src/GeomFill/GeomFill_SnglrFunc.hxx b/src/GeomFill/GeomFill_SnglrFunc.hxx index 8cbfc726e6..168416c520 100644 --- a/src/GeomFill/GeomFill_SnglrFunc.hxx +++ b/src/GeomFill/GeomFill_SnglrFunc.hxx @@ -29,8 +29,6 @@ #include #include -class Standard_OutOfRange; -class Standard_DomainError; class gp_Pnt; class gp_Vec; diff --git a/src/GeomFill/GeomFill_Sweep.hxx b/src/GeomFill/GeomFill_Sweep.hxx index 2a7b506d17..00a313a648 100644 --- a/src/GeomFill/GeomFill_Sweep.hxx +++ b/src/GeomFill/GeomFill_Sweep.hxx @@ -31,9 +31,6 @@ class GeomFill_LocationLaw; class GeomFill_SectionLaw; class Geom_Surface; -class StdFail_NotDone; -class Standard_OutOfRange; -class Standard_ConstructionError; class Geom2d_Curve; diff --git a/src/GeomFill/GeomFill_SweepFunction.hxx b/src/GeomFill/GeomFill_SweepFunction.hxx index 6ca004037d..99cf37ff09 100644 --- a/src/GeomFill/GeomFill_SweepFunction.hxx +++ b/src/GeomFill/GeomFill_SweepFunction.hxx @@ -35,7 +35,6 @@ #include class GeomFill_LocationLaw; class GeomFill_SectionLaw; -class Standard_OutOfRange; class gp_Pnt; diff --git a/src/GeomFill/GeomFill_SweepSectionGenerator.hxx b/src/GeomFill/GeomFill_SweepSectionGenerator.hxx index 991a828440..adeba24882 100644 --- a/src/GeomFill/GeomFill_SweepSectionGenerator.hxx +++ b/src/GeomFill/GeomFill_SweepSectionGenerator.hxx @@ -28,7 +28,6 @@ #include class Geom_BSplineCurve; -class Standard_RangeError; class Geom_Curve; class gp_Trsf; diff --git a/src/GeomFill/GeomFill_Tensor.hxx b/src/GeomFill/GeomFill_Tensor.hxx index e5646cf89b..97d9e47a85 100644 --- a/src/GeomFill/GeomFill_Tensor.hxx +++ b/src/GeomFill/GeomFill_Tensor.hxx @@ -25,8 +25,6 @@ #include #include #include -class Standard_DimensionError; -class Standard_RangeError; class math_Matrix; diff --git a/src/GeomFill/GeomFill_TrihedronLaw.hxx b/src/GeomFill/GeomFill_TrihedronLaw.hxx index 4cba026728..2e9972743a 100644 --- a/src/GeomFill/GeomFill_TrihedronLaw.hxx +++ b/src/GeomFill/GeomFill_TrihedronLaw.hxx @@ -22,8 +22,6 @@ #include #include -class Standard_OutOfRange; -class Standard_NotImplemented; class gp_Vec; diff --git a/src/GeomFill/GeomFill_TrihedronWithGuide.hxx b/src/GeomFill/GeomFill_TrihedronWithGuide.hxx index ad10e7f09a..7ce3d68f0f 100644 --- a/src/GeomFill/GeomFill_TrihedronWithGuide.hxx +++ b/src/GeomFill/GeomFill_TrihedronWithGuide.hxx @@ -24,9 +24,6 @@ #include #include -class Standard_OutOfRange; -class Standard_NotImplemented; -class gp_Pnt; class GeomFill_TrihedronWithGuide; diff --git a/src/GeomFill/GeomFill_UniformSection.hxx b/src/GeomFill/GeomFill_UniformSection.hxx index 83ae7f5dfb..c486b19f4c 100644 --- a/src/GeomFill/GeomFill_UniformSection.hxx +++ b/src/GeomFill/GeomFill_UniformSection.hxx @@ -31,7 +31,6 @@ #include class Geom_Curve; class Geom_BSplineCurve; -class Standard_OutOfRange; class Geom_BSplineSurface; class gp_Pnt; diff --git a/src/GeomInt/GeomInt.hxx b/src/GeomInt/GeomInt.hxx index b7e36e8347..d8654d3884 100644 --- a/src/GeomInt/GeomInt.hxx +++ b/src/GeomInt/GeomInt.hxx @@ -23,34 +23,6 @@ #include #include -class GeomInt_IntSS; -class GeomInt_LineConstructor; -class GeomInt_LineTool; -class GeomInt_WLApprox; -class GeomInt_ParameterAndOrientation; -class GeomInt_TheFunctionOfTheInt2SOfThePrmPrmSvSurfacesOfWLApprox; -class GeomInt_TheInt2SOfThePrmPrmSvSurfacesOfWLApprox; -class GeomInt_ThePrmPrmSvSurfacesOfWLApprox; -class GeomInt_TheZerImpFuncOfTheImpPrmSvSurfacesOfWLApprox; -class GeomInt_TheImpPrmSvSurfacesOfWLApprox; -class GeomInt_TheMultiLineOfWLApprox; -class GeomInt_TheMultiLineToolOfWLApprox; -class GeomInt_BSpParLeastSquareOfMyBSplGradientOfTheComputeLineOfWLApprox; -class GeomInt_BSpParFunctionOfMyBSplGradientOfTheComputeLineOfWLApprox; -class GeomInt_BSpGradient_BFGSOfMyBSplGradientOfTheComputeLineOfWLApprox; -class GeomInt_MyBSplGradientOfTheComputeLineOfWLApprox; -class GeomInt_ParLeastSquareOfMyGradientbisOfTheComputeLineOfWLApprox; -class GeomInt_ResConstraintOfMyGradientbisOfTheComputeLineOfWLApprox; -class GeomInt_ParFunctionOfMyGradientbisOfTheComputeLineOfWLApprox; -class GeomInt_Gradient_BFGSOfMyGradientbisOfTheComputeLineOfWLApprox; -class GeomInt_MyGradientbisOfTheComputeLineOfWLApprox; -class GeomInt_TheComputeLineOfWLApprox; -class GeomInt_ParLeastSquareOfMyGradientOfTheComputeLineBezierOfWLApprox; -class GeomInt_ResConstraintOfMyGradientOfTheComputeLineBezierOfWLApprox; -class GeomInt_ParFunctionOfMyGradientOfTheComputeLineBezierOfWLApprox; -class GeomInt_Gradient_BFGSOfMyGradientOfTheComputeLineBezierOfWLApprox; -class GeomInt_MyGradientOfTheComputeLineBezierOfWLApprox; -class GeomInt_TheComputeLineBezierOfWLApprox; //! Provides intersections on between two surfaces of Geom. diff --git a/src/GeomLProp/GeomLProp.hxx b/src/GeomLProp/GeomLProp.hxx index 14f00913e0..aa1e1d3147 100644 --- a/src/GeomLProp/GeomLProp.hxx +++ b/src/GeomLProp/GeomLProp.hxx @@ -25,10 +25,6 @@ #include #include class Geom_Curve; -class GeomLProp_CurveTool; -class GeomLProp_SurfaceTool; -class GeomLProp_CLProps; -class GeomLProp_SLProps; //! These global functions compute the degree of diff --git a/src/GeomLib/GeomLib.hxx b/src/GeomLib/GeomLib.hxx index d83e4ef08a..e14506695f 100644 --- a/src/GeomLib/GeomLib.hxx +++ b/src/GeomLib/GeomLib.hxx @@ -38,16 +38,6 @@ class Adaptor3d_Curve; class Geom_BSplineSurface; class Geom_BezierSurface; class Geom_Surface; -class gp_Pnt2d; -class GeomLib_MakeCurvefromApprox; -class GeomLib_Interpolate; -class GeomLib_DenominatorMultiplier; -class GeomLib_CheckBSplineCurve; -class GeomLib_Check2dBSplineCurve; -class GeomLib_IsPlanarSurface; -class GeomLib_Tool; -class GeomLib_PolyFunc; -class GeomLib_LogSample; typedef class Adaptor2d_Curve2d Adaptor2d_Curve2d; diff --git a/src/GeomLib/GeomLib_Check2dBSplineCurve.hxx b/src/GeomLib/GeomLib_Check2dBSplineCurve.hxx index fe2b781e59..38d77cda7a 100644 --- a/src/GeomLib/GeomLib_Check2dBSplineCurve.hxx +++ b/src/GeomLib/GeomLib_Check2dBSplineCurve.hxx @@ -25,8 +25,6 @@ #include #include class Geom2d_BSplineCurve; -class StdFail_NotDone; -class Standard_OutOfRange; //! Checks for the end tangents : whether or not those diff --git a/src/GeomLib/GeomLib_CheckBSplineCurve.hxx b/src/GeomLib/GeomLib_CheckBSplineCurve.hxx index 979a73cf33..95019151d8 100644 --- a/src/GeomLib/GeomLib_CheckBSplineCurve.hxx +++ b/src/GeomLib/GeomLib_CheckBSplineCurve.hxx @@ -25,8 +25,6 @@ #include #include class Geom_BSplineCurve; -class StdFail_NotDone; -class Standard_OutOfRange; //! Checks for the end tangents : whether or not those diff --git a/src/GeomLib/GeomLib_DenominatorMultiplier.hxx b/src/GeomLib/GeomLib_DenominatorMultiplier.hxx index 5ab62a3ee1..b1dbd92424 100644 --- a/src/GeomLib/GeomLib_DenominatorMultiplier.hxx +++ b/src/GeomLib/GeomLib_DenominatorMultiplier.hxx @@ -24,8 +24,6 @@ #include #include class Geom_BSplineSurface; -class Standard_OutOfRange; -class Standard_ConstructionError; //! this defines an evaluator for a function of 2 variables diff --git a/src/GeomLib/GeomLib_Interpolate.hxx b/src/GeomLib/GeomLib_Interpolate.hxx index dcdb2ef180..f5f86ab477 100644 --- a/src/GeomLib/GeomLib_Interpolate.hxx +++ b/src/GeomLib/GeomLib_Interpolate.hxx @@ -27,8 +27,6 @@ #include #include class Geom_BSplineCurve; -class StdFail_NotDone; -class Standard_OutOfRange; //! this class is used to construct a BSpline curve by diff --git a/src/GeomLib/GeomLib_IsPlanarSurface.hxx b/src/GeomLib/GeomLib_IsPlanarSurface.hxx index 879203820b..0eb71a42bb 100644 --- a/src/GeomLib/GeomLib_IsPlanarSurface.hxx +++ b/src/GeomLib/GeomLib_IsPlanarSurface.hxx @@ -24,9 +24,7 @@ #include #include #include -class StdFail_NotDone; class Geom_Surface; -class gp_Pln; //! Find if a surface is a planar surface. diff --git a/src/GeomLib/GeomLib_LogSample.hxx b/src/GeomLib/GeomLib_LogSample.hxx index 6c868f816a..cbf26f458f 100644 --- a/src/GeomLib/GeomLib_LogSample.hxx +++ b/src/GeomLib/GeomLib_LogSample.hxx @@ -24,7 +24,6 @@ #include #include #include -class Standard_OutOfRange; diff --git a/src/GeomLib/GeomLib_MakeCurvefromApprox.hxx b/src/GeomLib/GeomLib_MakeCurvefromApprox.hxx index 90dd002b67..76e0f42c07 100644 --- a/src/GeomLib/GeomLib_MakeCurvefromApprox.hxx +++ b/src/GeomLib/GeomLib_MakeCurvefromApprox.hxx @@ -24,9 +24,6 @@ #include #include #include -class StdFail_NotDone; -class Standard_OutOfRange; -class AdvApprox_ApproxAFunction; class Geom2d_BSplineCurve; class Geom_BSplineCurve; diff --git a/src/GeomPlate/GeomPlate_Aij.hxx b/src/GeomPlate/GeomPlate_Aij.hxx index 3ee9678d67..b9fc196ed4 100644 --- a/src/GeomPlate/GeomPlate_Aij.hxx +++ b/src/GeomPlate/GeomPlate_Aij.hxx @@ -23,8 +23,6 @@ #include #include -class GeomPlate_BuildAveragePlane; -class gp_Vec; //! A structure containing indexes of two normals and its cross product diff --git a/src/GeomPlate/GeomPlate_BuildAveragePlane.hxx b/src/GeomPlate/GeomPlate_BuildAveragePlane.hxx index 32e1d4f709..b8fd059f58 100644 --- a/src/GeomPlate/GeomPlate_BuildAveragePlane.hxx +++ b/src/GeomPlate/GeomPlate_BuildAveragePlane.hxx @@ -31,8 +31,6 @@ #include class Geom_Plane; class Geom_Line; -class Standard_NoSuchObject; -class gp_Vec; //! This class computes an average inertial plane with an diff --git a/src/GeomPlate/GeomPlate_BuildPlateSurface.hxx b/src/GeomPlate/GeomPlate_BuildPlateSurface.hxx index 72c9d4e837..1335089838 100644 --- a/src/GeomPlate/GeomPlate_BuildPlateSurface.hxx +++ b/src/GeomPlate/GeomPlate_BuildPlateSurface.hxx @@ -37,8 +37,6 @@ #include class Geom_Surface; class GeomPlate_Surface; -class Standard_ConstructionError; -class Standard_RangeError; class GeomPlate_CurveConstraint; class GeomPlate_PointConstraint; class gp_Pnt2d; diff --git a/src/GeomPlate/GeomPlate_CurveConstraint.hxx b/src/GeomPlate/GeomPlate_CurveConstraint.hxx index b8438c0493..81d6f2e72d 100644 --- a/src/GeomPlate/GeomPlate_CurveConstraint.hxx +++ b/src/GeomPlate/GeomPlate_CurveConstraint.hxx @@ -22,8 +22,6 @@ class Geom2d_Curve; class Law_Function; -class Standard_ConstructionError; -class GeomLProp_SLProps; class gp_Pnt; class gp_Vec; diff --git a/src/GeomPlate/GeomPlate_PointConstraint.hxx b/src/GeomPlate/GeomPlate_PointConstraint.hxx index add068f3ec..3f4d4bccfa 100644 --- a/src/GeomPlate/GeomPlate_PointConstraint.hxx +++ b/src/GeomPlate/GeomPlate_PointConstraint.hxx @@ -29,11 +29,6 @@ #include #include class Geom_Surface; -class Standard_ConstructionError; -class gp_Pnt; -class gp_Vec; -class gp_Pnt2d; -class GeomLProp_SLProps; class GeomPlate_PointConstraint; diff --git a/src/GeomPlate/GeomPlate_Surface.hxx b/src/GeomPlate/GeomPlate_Surface.hxx index 944198aadd..6f7e283b83 100644 --- a/src/GeomPlate/GeomPlate_Surface.hxx +++ b/src/GeomPlate/GeomPlate_Surface.hxx @@ -27,12 +27,6 @@ #include #include #include -class Geom_Surface; -class Standard_RangeError; -class Standard_NoSuchObject; -class Geom_UndefinedDerivative; -class Geom_UndefinedValue; -class Plate_Plate; class gp_Trsf; class gp_GTrsf2d; class Geom_Curve; diff --git a/src/GeomToIGES/GeomToIGES_GeomCurve.hxx b/src/GeomToIGES/GeomToIGES_GeomCurve.hxx index 18c92a43da..6eebea1dab 100644 --- a/src/GeomToIGES/GeomToIGES_GeomCurve.hxx +++ b/src/GeomToIGES/GeomToIGES_GeomCurve.hxx @@ -23,7 +23,6 @@ #include #include -class GeomToIGES_GeomEntity; class IGESData_IGESEntity; class Geom_Curve; class Geom_BoundedCurve; diff --git a/src/GeomToIGES/GeomToIGES_GeomPoint.hxx b/src/GeomToIGES/GeomToIGES_GeomPoint.hxx index 08d02c36a8..987bebd406 100644 --- a/src/GeomToIGES/GeomToIGES_GeomPoint.hxx +++ b/src/GeomToIGES/GeomToIGES_GeomPoint.hxx @@ -22,7 +22,6 @@ #include #include -class GeomToIGES_GeomEntity; class IGESGeom_Point; class Geom_Point; class Geom_CartesianPoint; diff --git a/src/GeomToIGES/GeomToIGES_GeomSurface.hxx b/src/GeomToIGES/GeomToIGES_GeomSurface.hxx index 7a5169e518..28e7da67dc 100644 --- a/src/GeomToIGES/GeomToIGES_GeomSurface.hxx +++ b/src/GeomToIGES/GeomToIGES_GeomSurface.hxx @@ -24,7 +24,6 @@ #include #include #include -class GeomToIGES_GeomEntity; class IGESData_IGESEntity; class Geom_Surface; class Geom_BoundedSurface; diff --git a/src/GeomToIGES/GeomToIGES_GeomVector.hxx b/src/GeomToIGES/GeomToIGES_GeomVector.hxx index 8f61ca5056..b3a6931190 100644 --- a/src/GeomToIGES/GeomToIGES_GeomVector.hxx +++ b/src/GeomToIGES/GeomToIGES_GeomVector.hxx @@ -22,7 +22,6 @@ #include #include -class GeomToIGES_GeomEntity; class IGESGeom_Direction; class Geom_Vector; class Geom_VectorWithMagnitude; diff --git a/src/GeomToStep/GeomToStep_MakeAxis1Placement.hxx b/src/GeomToStep/GeomToStep_MakeAxis1Placement.hxx index 06ad8f45ea..08ecc30f3a 100644 --- a/src/GeomToStep/GeomToStep_MakeAxis1Placement.hxx +++ b/src/GeomToStep/GeomToStep_MakeAxis1Placement.hxx @@ -23,7 +23,6 @@ #include class StepGeom_Axis1Placement; -class StdFail_NotDone; class gp_Ax1; class gp_Ax2d; class Geom_Axis1Placement; diff --git a/src/GeomToStep/GeomToStep_MakeAxis2Placement2d.hxx b/src/GeomToStep/GeomToStep_MakeAxis2Placement2d.hxx index f4c9881a6c..13e7a9f37a 100644 --- a/src/GeomToStep/GeomToStep_MakeAxis2Placement2d.hxx +++ b/src/GeomToStep/GeomToStep_MakeAxis2Placement2d.hxx @@ -23,7 +23,6 @@ #include class StepGeom_Axis2Placement2d; -class StdFail_NotDone; class gp_Ax2; class gp_Ax22d; diff --git a/src/GeomToStep/GeomToStep_MakeAxis2Placement3d.hxx b/src/GeomToStep/GeomToStep_MakeAxis2Placement3d.hxx index 48faec06b9..89c0c3b1de 100644 --- a/src/GeomToStep/GeomToStep_MakeAxis2Placement3d.hxx +++ b/src/GeomToStep/GeomToStep_MakeAxis2Placement3d.hxx @@ -23,7 +23,6 @@ #include class StepGeom_Axis2Placement3d; -class StdFail_NotDone; class gp_Ax2; class gp_Ax3; class gp_Trsf; diff --git a/src/GeomToStep/GeomToStep_MakeBSplineCurveWithKnots.hxx b/src/GeomToStep/GeomToStep_MakeBSplineCurveWithKnots.hxx index 125237e348..3d56eb9046 100644 --- a/src/GeomToStep/GeomToStep_MakeBSplineCurveWithKnots.hxx +++ b/src/GeomToStep/GeomToStep_MakeBSplineCurveWithKnots.hxx @@ -23,7 +23,6 @@ #include class StepGeom_BSplineCurveWithKnots; -class StdFail_NotDone; class Geom_BSplineCurve; class Geom2d_BSplineCurve; diff --git a/src/GeomToStep/GeomToStep_MakeBSplineCurveWithKnotsAndRationalBSplineCurve.hxx b/src/GeomToStep/GeomToStep_MakeBSplineCurveWithKnotsAndRationalBSplineCurve.hxx index 1ed1d4bd51..c427afd6fe 100644 --- a/src/GeomToStep/GeomToStep_MakeBSplineCurveWithKnotsAndRationalBSplineCurve.hxx +++ b/src/GeomToStep/GeomToStep_MakeBSplineCurveWithKnotsAndRationalBSplineCurve.hxx @@ -23,7 +23,6 @@ #include class StepGeom_BSplineCurveWithKnotsAndRationalBSplineCurve; -class StdFail_NotDone; class Geom_BSplineCurve; class Geom2d_BSplineCurve; diff --git a/src/GeomToStep/GeomToStep_MakeBSplineSurfaceWithKnots.hxx b/src/GeomToStep/GeomToStep_MakeBSplineSurfaceWithKnots.hxx index 0562b5de3c..3fe4b7895e 100644 --- a/src/GeomToStep/GeomToStep_MakeBSplineSurfaceWithKnots.hxx +++ b/src/GeomToStep/GeomToStep_MakeBSplineSurfaceWithKnots.hxx @@ -23,7 +23,6 @@ #include class StepGeom_BSplineSurfaceWithKnots; -class StdFail_NotDone; class Geom_BSplineSurface; diff --git a/src/GeomToStep/GeomToStep_MakeBSplineSurfaceWithKnotsAndRationalBSplineSurface.hxx b/src/GeomToStep/GeomToStep_MakeBSplineSurfaceWithKnotsAndRationalBSplineSurface.hxx index f4e936aad7..e049fbdab2 100644 --- a/src/GeomToStep/GeomToStep_MakeBSplineSurfaceWithKnotsAndRationalBSplineSurface.hxx +++ b/src/GeomToStep/GeomToStep_MakeBSplineSurfaceWithKnotsAndRationalBSplineSurface.hxx @@ -23,7 +23,6 @@ #include class StepGeom_BSplineSurfaceWithKnotsAndRationalBSplineSurface; -class StdFail_NotDone; class Geom_BSplineSurface; diff --git a/src/GeomToStep/GeomToStep_MakeBoundedCurve.hxx b/src/GeomToStep/GeomToStep_MakeBoundedCurve.hxx index 7d79b69b39..d712a46948 100644 --- a/src/GeomToStep/GeomToStep_MakeBoundedCurve.hxx +++ b/src/GeomToStep/GeomToStep_MakeBoundedCurve.hxx @@ -23,7 +23,6 @@ #include class StepGeom_BoundedCurve; -class StdFail_NotDone; class Geom_BoundedCurve; class Geom2d_BoundedCurve; diff --git a/src/GeomToStep/GeomToStep_MakeBoundedSurface.hxx b/src/GeomToStep/GeomToStep_MakeBoundedSurface.hxx index 01e958a356..6d299d7e76 100644 --- a/src/GeomToStep/GeomToStep_MakeBoundedSurface.hxx +++ b/src/GeomToStep/GeomToStep_MakeBoundedSurface.hxx @@ -23,7 +23,6 @@ #include class StepGeom_BoundedSurface; -class StdFail_NotDone; class Geom_BoundedSurface; diff --git a/src/GeomToStep/GeomToStep_MakeCartesianPoint.hxx b/src/GeomToStep/GeomToStep_MakeCartesianPoint.hxx index c8f148e46e..a7387e0fc7 100644 --- a/src/GeomToStep/GeomToStep_MakeCartesianPoint.hxx +++ b/src/GeomToStep/GeomToStep_MakeCartesianPoint.hxx @@ -23,7 +23,6 @@ #include class StepGeom_CartesianPoint; -class StdFail_NotDone; class gp_Pnt; class gp_Pnt2d; class Geom_CartesianPoint; diff --git a/src/GeomToStep/GeomToStep_MakeCircle.hxx b/src/GeomToStep/GeomToStep_MakeCircle.hxx index 2c0ed53b86..38890848d3 100644 --- a/src/GeomToStep/GeomToStep_MakeCircle.hxx +++ b/src/GeomToStep/GeomToStep_MakeCircle.hxx @@ -23,7 +23,6 @@ #include class StepGeom_Circle; -class StdFail_NotDone; class gp_Circ; class Geom_Circle; class Geom2d_Circle; diff --git a/src/GeomToStep/GeomToStep_MakeConic.hxx b/src/GeomToStep/GeomToStep_MakeConic.hxx index b22a452086..b2ff81ab0b 100644 --- a/src/GeomToStep/GeomToStep_MakeConic.hxx +++ b/src/GeomToStep/GeomToStep_MakeConic.hxx @@ -23,7 +23,6 @@ #include class StepGeom_Conic; -class StdFail_NotDone; class Geom_Conic; class Geom2d_Conic; diff --git a/src/GeomToStep/GeomToStep_MakeConicalSurface.hxx b/src/GeomToStep/GeomToStep_MakeConicalSurface.hxx index 67caaf3217..b8c8839c43 100644 --- a/src/GeomToStep/GeomToStep_MakeConicalSurface.hxx +++ b/src/GeomToStep/GeomToStep_MakeConicalSurface.hxx @@ -23,7 +23,6 @@ #include class StepGeom_ConicalSurface; -class StdFail_NotDone; class Geom_ConicalSurface; diff --git a/src/GeomToStep/GeomToStep_MakeCurve.hxx b/src/GeomToStep/GeomToStep_MakeCurve.hxx index 7a56d00ed5..a907c8fd68 100644 --- a/src/GeomToStep/GeomToStep_MakeCurve.hxx +++ b/src/GeomToStep/GeomToStep_MakeCurve.hxx @@ -23,7 +23,6 @@ #include class StepGeom_Curve; -class StdFail_NotDone; class Geom_Curve; class Geom2d_Curve; diff --git a/src/GeomToStep/GeomToStep_MakeCylindricalSurface.hxx b/src/GeomToStep/GeomToStep_MakeCylindricalSurface.hxx index 467886db72..77d46e666d 100644 --- a/src/GeomToStep/GeomToStep_MakeCylindricalSurface.hxx +++ b/src/GeomToStep/GeomToStep_MakeCylindricalSurface.hxx @@ -23,7 +23,6 @@ #include class StepGeom_CylindricalSurface; -class StdFail_NotDone; class Geom_CylindricalSurface; diff --git a/src/GeomToStep/GeomToStep_MakeDirection.hxx b/src/GeomToStep/GeomToStep_MakeDirection.hxx index a13eec1ebc..a224105272 100644 --- a/src/GeomToStep/GeomToStep_MakeDirection.hxx +++ b/src/GeomToStep/GeomToStep_MakeDirection.hxx @@ -23,7 +23,6 @@ #include class StepGeom_Direction; -class StdFail_NotDone; class gp_Dir; class gp_Dir2d; class Geom_Direction; diff --git a/src/GeomToStep/GeomToStep_MakeElementarySurface.hxx b/src/GeomToStep/GeomToStep_MakeElementarySurface.hxx index cdebf405ab..80f4a09c30 100644 --- a/src/GeomToStep/GeomToStep_MakeElementarySurface.hxx +++ b/src/GeomToStep/GeomToStep_MakeElementarySurface.hxx @@ -23,7 +23,6 @@ #include class StepGeom_ElementarySurface; -class StdFail_NotDone; class Geom_ElementarySurface; diff --git a/src/GeomToStep/GeomToStep_MakeEllipse.hxx b/src/GeomToStep/GeomToStep_MakeEllipse.hxx index 7b1bb3907a..9fe86d8ce7 100644 --- a/src/GeomToStep/GeomToStep_MakeEllipse.hxx +++ b/src/GeomToStep/GeomToStep_MakeEllipse.hxx @@ -23,7 +23,6 @@ #include class StepGeom_Ellipse; -class StdFail_NotDone; class gp_Elips; class Geom_Ellipse; class Geom2d_Ellipse; diff --git a/src/GeomToStep/GeomToStep_MakeHyperbola.hxx b/src/GeomToStep/GeomToStep_MakeHyperbola.hxx index e284ca242f..74bc53766d 100644 --- a/src/GeomToStep/GeomToStep_MakeHyperbola.hxx +++ b/src/GeomToStep/GeomToStep_MakeHyperbola.hxx @@ -23,7 +23,6 @@ #include class StepGeom_Hyperbola; -class StdFail_NotDone; class Geom2d_Hyperbola; class Geom_Hyperbola; diff --git a/src/GeomToStep/GeomToStep_MakeLine.hxx b/src/GeomToStep/GeomToStep_MakeLine.hxx index fa90bb7b7e..4d22c04c62 100644 --- a/src/GeomToStep/GeomToStep_MakeLine.hxx +++ b/src/GeomToStep/GeomToStep_MakeLine.hxx @@ -23,7 +23,6 @@ #include class StepGeom_Line; -class StdFail_NotDone; class gp_Lin; class gp_Lin2d; class Geom_Line; diff --git a/src/GeomToStep/GeomToStep_MakeParabola.hxx b/src/GeomToStep/GeomToStep_MakeParabola.hxx index 75271a944f..d45e44adf8 100644 --- a/src/GeomToStep/GeomToStep_MakeParabola.hxx +++ b/src/GeomToStep/GeomToStep_MakeParabola.hxx @@ -23,7 +23,6 @@ #include class StepGeom_Parabola; -class StdFail_NotDone; class Geom2d_Parabola; class Geom_Parabola; diff --git a/src/GeomToStep/GeomToStep_MakePlane.hxx b/src/GeomToStep/GeomToStep_MakePlane.hxx index 8c28b15778..ef42f84646 100644 --- a/src/GeomToStep/GeomToStep_MakePlane.hxx +++ b/src/GeomToStep/GeomToStep_MakePlane.hxx @@ -23,7 +23,6 @@ #include class StepGeom_Plane; -class StdFail_NotDone; class gp_Pln; class Geom_Plane; diff --git a/src/GeomToStep/GeomToStep_MakePolyline.hxx b/src/GeomToStep/GeomToStep_MakePolyline.hxx index 9dff3827c4..594c75720b 100644 --- a/src/GeomToStep/GeomToStep_MakePolyline.hxx +++ b/src/GeomToStep/GeomToStep_MakePolyline.hxx @@ -25,7 +25,6 @@ #include #include class StepGeom_Polyline; -class StdFail_NotDone; //! This class implements the mapping between an Array1 of points diff --git a/src/GeomToStep/GeomToStep_MakeRectangularTrimmedSurface.hxx b/src/GeomToStep/GeomToStep_MakeRectangularTrimmedSurface.hxx index 76b47305f1..646023c5ca 100644 --- a/src/GeomToStep/GeomToStep_MakeRectangularTrimmedSurface.hxx +++ b/src/GeomToStep/GeomToStep_MakeRectangularTrimmedSurface.hxx @@ -23,7 +23,6 @@ #include class StepGeom_RectangularTrimmedSurface; -class StdFail_NotDone; class Geom_RectangularTrimmedSurface; diff --git a/src/GeomToStep/GeomToStep_MakeSphericalSurface.hxx b/src/GeomToStep/GeomToStep_MakeSphericalSurface.hxx index 8ae9508f17..ed534d4b4a 100644 --- a/src/GeomToStep/GeomToStep_MakeSphericalSurface.hxx +++ b/src/GeomToStep/GeomToStep_MakeSphericalSurface.hxx @@ -23,7 +23,6 @@ #include class StepGeom_SphericalSurface; -class StdFail_NotDone; class Geom_SphericalSurface; diff --git a/src/GeomToStep/GeomToStep_MakeSurface.hxx b/src/GeomToStep/GeomToStep_MakeSurface.hxx index 9d149b3a89..52b36eee6d 100644 --- a/src/GeomToStep/GeomToStep_MakeSurface.hxx +++ b/src/GeomToStep/GeomToStep_MakeSurface.hxx @@ -23,7 +23,6 @@ #include class StepGeom_Surface; -class StdFail_NotDone; class Geom_Surface; diff --git a/src/GeomToStep/GeomToStep_MakeSurfaceOfLinearExtrusion.hxx b/src/GeomToStep/GeomToStep_MakeSurfaceOfLinearExtrusion.hxx index 885443f3fd..c2a7c9e8f7 100644 --- a/src/GeomToStep/GeomToStep_MakeSurfaceOfLinearExtrusion.hxx +++ b/src/GeomToStep/GeomToStep_MakeSurfaceOfLinearExtrusion.hxx @@ -23,7 +23,6 @@ #include class StepGeom_SurfaceOfLinearExtrusion; -class StdFail_NotDone; class Geom_SurfaceOfLinearExtrusion; diff --git a/src/GeomToStep/GeomToStep_MakeSurfaceOfRevolution.hxx b/src/GeomToStep/GeomToStep_MakeSurfaceOfRevolution.hxx index 0cf724705f..4790ef0eb7 100644 --- a/src/GeomToStep/GeomToStep_MakeSurfaceOfRevolution.hxx +++ b/src/GeomToStep/GeomToStep_MakeSurfaceOfRevolution.hxx @@ -23,7 +23,6 @@ #include class StepGeom_SurfaceOfRevolution; -class StdFail_NotDone; class Geom_SurfaceOfRevolution; diff --git a/src/GeomToStep/GeomToStep_MakeSweptSurface.hxx b/src/GeomToStep/GeomToStep_MakeSweptSurface.hxx index 4828c3fdea..c00d636f18 100644 --- a/src/GeomToStep/GeomToStep_MakeSweptSurface.hxx +++ b/src/GeomToStep/GeomToStep_MakeSweptSurface.hxx @@ -23,7 +23,6 @@ #include class StepGeom_SweptSurface; -class StdFail_NotDone; class Geom_SweptSurface; diff --git a/src/GeomToStep/GeomToStep_MakeToroidalSurface.hxx b/src/GeomToStep/GeomToStep_MakeToroidalSurface.hxx index 6319d047e0..ff77f4315e 100644 --- a/src/GeomToStep/GeomToStep_MakeToroidalSurface.hxx +++ b/src/GeomToStep/GeomToStep_MakeToroidalSurface.hxx @@ -23,7 +23,6 @@ #include class StepGeom_ToroidalSurface; -class StdFail_NotDone; class Geom_ToroidalSurface; diff --git a/src/GeomToStep/GeomToStep_MakeVector.hxx b/src/GeomToStep/GeomToStep_MakeVector.hxx index ae7bee1847..52f09ad3f2 100644 --- a/src/GeomToStep/GeomToStep_MakeVector.hxx +++ b/src/GeomToStep/GeomToStep_MakeVector.hxx @@ -23,7 +23,6 @@ #include class StepGeom_Vector; -class StdFail_NotDone; class gp_Vec; class gp_Vec2d; class Geom_Vector; diff --git a/src/GeomTools/GeomTools.hxx b/src/GeomTools/GeomTools.hxx index a0dca3bbff..1acc4b41ec 100644 --- a/src/GeomTools/GeomTools.hxx +++ b/src/GeomTools/GeomTools.hxx @@ -28,10 +28,6 @@ class Geom_Surface; class Geom_Curve; class Geom2d_Curve; class GeomTools_UndefinedTypeHandler; -class GeomTools_UndefinedTypeHandler; -class GeomTools_SurfaceSet; -class GeomTools_CurveSet; -class GeomTools_Curve2dSet; //! The GeomTools package provides utilities for Geometry. diff --git a/src/GeomTools/GeomTools_Curve2dSet.hxx b/src/GeomTools/GeomTools_Curve2dSet.hxx index 0fb0ede1e7..bcaf670194 100644 --- a/src/GeomTools/GeomTools_Curve2dSet.hxx +++ b/src/GeomTools/GeomTools_Curve2dSet.hxx @@ -28,7 +28,6 @@ #include #include -class Standard_OutOfRange; class Geom2d_Curve; diff --git a/src/GeomTools/GeomTools_CurveSet.hxx b/src/GeomTools/GeomTools_CurveSet.hxx index ff881d348f..a87af4bce4 100644 --- a/src/GeomTools/GeomTools_CurveSet.hxx +++ b/src/GeomTools/GeomTools_CurveSet.hxx @@ -28,7 +28,6 @@ #include #include -class Standard_OutOfRange; class Geom_Curve; diff --git a/src/GeomTools/GeomTools_SurfaceSet.hxx b/src/GeomTools/GeomTools_SurfaceSet.hxx index 127668738b..c77ae388e1 100644 --- a/src/GeomTools/GeomTools_SurfaceSet.hxx +++ b/src/GeomTools/GeomTools_SurfaceSet.hxx @@ -28,7 +28,6 @@ #include #include -class Standard_OutOfRange; class Geom_Surface; diff --git a/src/Graphic3d/Graphic3d_CView.hxx b/src/Graphic3d/Graphic3d_CView.hxx index 78933d804a..6373a8dfb5 100644 --- a/src/Graphic3d/Graphic3d_CView.hxx +++ b/src/Graphic3d/Graphic3d_CView.hxx @@ -49,7 +49,6 @@ class Aspect_XRSession; class Graphic3d_CView; -class Graphic3d_GraphicDriver; class Graphic3d_Layer; class Graphic3d_StructureManager; diff --git a/src/Graphic3d/Graphic3d_Camera.hxx b/src/Graphic3d/Graphic3d_Camera.hxx index 9d5d7f28f5..4415701d64 100644 --- a/src/Graphic3d/Graphic3d_Camera.hxx +++ b/src/Graphic3d/Graphic3d_Camera.hxx @@ -35,7 +35,6 @@ #include //! Forward declaration -class Graphic3d_WorldViewProjState; //! Camera class provides object-oriented approach to setting up projection //! and orientation properties of 3D view. diff --git a/src/Graphic3d/Graphic3d_Structure.hxx b/src/Graphic3d/Graphic3d_Structure.hxx index 148bb21d69..04fa9348e5 100644 --- a/src/Graphic3d/Graphic3d_Structure.hxx +++ b/src/Graphic3d/Graphic3d_Structure.hxx @@ -33,7 +33,6 @@ class Graphic3d_StructureManager; class Graphic3d_DataStructureManager; class Bnd_Box; -class gp_Pnt; DEFINE_STANDARD_HANDLE(Graphic3d_Structure, Standard_Transient) diff --git a/src/Graphic3d/Graphic3d_Texture1D.hxx b/src/Graphic3d/Graphic3d_Texture1D.hxx index 344be9384c..fb95a81bcf 100644 --- a/src/Graphic3d/Graphic3d_Texture1D.hxx +++ b/src/Graphic3d/Graphic3d_Texture1D.hxx @@ -25,7 +25,6 @@ #include #include #include -class Standard_OutOfRange; class TCollection_AsciiString; diff --git a/src/Graphic3d/Graphic3d_TextureEnv.hxx b/src/Graphic3d/Graphic3d_TextureEnv.hxx index bd8f902ecd..b55e320f23 100644 --- a/src/Graphic3d/Graphic3d_TextureEnv.hxx +++ b/src/Graphic3d/Graphic3d_TextureEnv.hxx @@ -23,7 +23,6 @@ #include #include #include -class Standard_OutOfRange; class TCollection_AsciiString; diff --git a/src/HLRAlgo/HLRAlgo_EdgeStatus.hxx b/src/HLRAlgo/HLRAlgo_EdgeStatus.hxx index d4cf56ab12..b3b725f158 100644 --- a/src/HLRAlgo/HLRAlgo_EdgeStatus.hxx +++ b/src/HLRAlgo/HLRAlgo_EdgeStatus.hxx @@ -26,7 +26,6 @@ #include #include #include -class Standard_OutOfRange; //! This class describes the Hidden Line status of an diff --git a/src/HLRAlgo/HLRAlgo_Projector.hxx b/src/HLRAlgo/HLRAlgo_Projector.hxx index 13cf6e16e3..20a3d96a81 100644 --- a/src/HLRAlgo/HLRAlgo_Projector.hxx +++ b/src/HLRAlgo/HLRAlgo_Projector.hxx @@ -26,10 +26,7 @@ #include #include #include -class Standard_NoSuchObject; class gp_Ax2; -class gp_Trsf; -class gp_Vec2d; class gp_Vec; class gp_Pnt; class gp_Pnt2d; diff --git a/src/HLRAppli/HLRAppli_ReflectLines.hxx b/src/HLRAppli/HLRAppli_ReflectLines.hxx index 0ae15dc548..52dae4b80f 100644 --- a/src/HLRAppli/HLRAppli_ReflectLines.hxx +++ b/src/HLRAppli/HLRAppli_ReflectLines.hxx @@ -26,7 +26,6 @@ #include #include #include -class TopoDS_Shape; //! This class builds reflect lines on a shape diff --git a/src/HLRBRep/HLRBRep.hxx b/src/HLRBRep/HLRBRep.hxx index 9bf5860c4a..1c3473f32a 100644 --- a/src/HLRBRep/HLRBRep.hxx +++ b/src/HLRBRep/HLRBRep.hxx @@ -24,61 +24,6 @@ #include class TopoDS_Edge; class HLRBRep_Curve; -class HLRBRep_CurveTool; -class HLRBRep_BCurveTool; -class HLRBRep_Curve; -class HLRBRep_SurfaceTool; -class HLRBRep_BSurfaceTool; -class HLRBRep_Surface; -class HLRBRep_CLPropsATool; -class HLRBRep_CLProps; -class HLRBRep_SLPropsATool; -class HLRBRep_SLProps; -class HLRBRep_CInter; -class HLRBRep_LineTool; -class HLRBRep_InterCSurf; -class HLRBRep_EdgeFaceTool; -class HLRBRep_Intersector; -class HLRBRep_EdgeData; -class HLRBRep_FaceData; -class HLRBRep_FaceIterator; -class HLRBRep_Data; -class HLRBRep_ShapeToHLR; -class HLRBRep_HLRToShape; -class HLRBRep_ShapeBounds; -class HLRBRep_EdgeInterferenceTool; -class HLRBRep_VertexList; -class HLRBRep_EdgeIList; -class HLRBRep_AreaLimit; -class HLRBRep_EdgeBuilder; -class HLRBRep_Hider; -class HLRBRep_InternalAlgo; -class HLRBRep_Algo; -class HLRBRep_PolyAlgo; -class HLRBRep_BiPoint; -class HLRBRep_BiPnt2D; -class HLRBRep_PolyHLRToShape; -class HLRBRep_TheCurveLocatorOfTheProjPCurOfCInter; -class HLRBRep_PCLocFOfTheLocateExtPCOfTheProjPCurOfCInter; -class HLRBRep_TheLocateExtPCOfTheProjPCurOfCInter; -class HLRBRep_TheProjPCurOfCInter; -class HLRBRep_MyImpParToolOfTheIntersectorOfTheIntConicCurveOfCInter; -class HLRBRep_TheIntersectorOfTheIntConicCurveOfCInter; -class HLRBRep_TheIntConicCurveOfCInter; -class HLRBRep_IntConicCurveOfCInter; -class HLRBRep_ThePolygon2dOfTheIntPCurvePCurveOfCInter; -class HLRBRep_TheDistBetweenPCurvesOfTheIntPCurvePCurveOfCInter; -class HLRBRep_ExactIntersectionPointOfTheIntPCurvePCurveOfCInter; -class HLRBRep_TheIntPCurvePCurveOfCInter; -class HLRBRep_ThePolygonOfInterCSurf; -class HLRBRep_ThePolygonToolOfInterCSurf; -class HLRBRep_ThePolyhedronOfInterCSurf; -class HLRBRep_ThePolyhedronToolOfInterCSurf; -class HLRBRep_TheInterferenceOfInterCSurf; -class HLRBRep_TheCSFunctionOfInterCSurf; -class HLRBRep_TheExactInterCSurf; -class HLRBRep_TheQuadCurvFuncOfTheQuadCurvExactInterCSurf; -class HLRBRep_TheQuadCurvExactInterCSurf; //! Hidden Lines Removal diff --git a/src/HLRBRep/HLRBRep_AreaLimit.hxx b/src/HLRBRep/HLRBRep_AreaLimit.hxx index 550db560a6..b4f73e0038 100644 --- a/src/HLRBRep/HLRBRep_AreaLimit.hxx +++ b/src/HLRBRep/HLRBRep_AreaLimit.hxx @@ -24,7 +24,6 @@ #include #include #include -class HLRAlgo_Intersection; class HLRBRep_AreaLimit; diff --git a/src/HLRBRep/HLRBRep_BCurveTool.hxx b/src/HLRBRep/HLRBRep_BCurveTool.hxx index b251e29fda..a0302c1c62 100644 --- a/src/HLRBRep/HLRBRep_BCurveTool.hxx +++ b/src/HLRBRep/HLRBRep_BCurveTool.hxx @@ -35,9 +35,6 @@ #include #include #include -class Standard_OutOfRange; -class Standard_NoSuchObject; -class Standard_DomainError; class BRepAdaptor_Curve; class gp_Pnt; class gp_Vec; diff --git a/src/HLRBRep/HLRBRep_Curve.hxx b/src/HLRBRep/HLRBRep_Curve.hxx index f2c5f6620c..e347b50f4b 100644 --- a/src/HLRBRep/HLRBRep_Curve.hxx +++ b/src/HLRBRep/HLRBRep_Curve.hxx @@ -32,11 +32,6 @@ #include #include #include -class Standard_NoSuchObject; -class Standard_DomainError; -class Standard_OutOfRange; -class StdFail_UndefinedDerivative; -class BRepAdaptor_Curve; class TopoDS_Edge; class gp_Pnt; class gp_Vec; diff --git a/src/HLRBRep/HLRBRep_CurveTool.hxx b/src/HLRBRep/HLRBRep_CurveTool.hxx index 493aee11ed..b39d051658 100644 --- a/src/HLRBRep/HLRBRep_CurveTool.hxx +++ b/src/HLRBRep/HLRBRep_CurveTool.hxx @@ -35,9 +35,6 @@ #include #include #include -class Standard_OutOfRange; -class Standard_NoSuchObject; -class Standard_DomainError; class gp_Pnt2d; class gp_Vec2d; class Geom2d_BezierCurve; diff --git a/src/HLRBRep/HLRBRep_Data.hxx b/src/HLRBRep/HLRBRep_Data.hxx index 464b899de9..121ec30824 100644 --- a/src/HLRBRep/HLRBRep_Data.hxx +++ b/src/HLRBRep/HLRBRep_Data.hxx @@ -43,9 +43,6 @@ #include #include class BRepTopAdaptor_TopolTool; -class StdFail_UndefinedDerivative; -class HLRAlgo_Projector; -class HLRAlgo_Interference; class gp_Dir2d; class HLRBRep_EdgeData; class HLRBRep_FaceData; diff --git a/src/HLRBRep/HLRBRep_EdgeBuilder.hxx b/src/HLRBRep/HLRBRep_EdgeBuilder.hxx index 471d840c7d..d9463dae4a 100644 --- a/src/HLRBRep/HLRBRep_EdgeBuilder.hxx +++ b/src/HLRBRep/HLRBRep_EdgeBuilder.hxx @@ -26,9 +26,6 @@ #include #include class HLRBRep_AreaLimit; -class Standard_NoMoreObject; -class Standard_NoSuchObject; -class Standard_DomainError; class HLRBRep_VertexList; class HLRAlgo_Intersection; diff --git a/src/HLRBRep/HLRBRep_EdgeInterferenceTool.hxx b/src/HLRBRep/HLRBRep_EdgeInterferenceTool.hxx index de160b3f51..8fd7a962b6 100644 --- a/src/HLRBRep/HLRBRep_EdgeInterferenceTool.hxx +++ b/src/HLRBRep/HLRBRep_EdgeInterferenceTool.hxx @@ -27,7 +27,6 @@ #include #include class HLRBRep_Data; -class HLRAlgo_Intersection; class gp_Dir; class HLRAlgo_Interference; diff --git a/src/HLRBRep/HLRBRep_FaceData.hxx b/src/HLRBRep/HLRBRep_FaceData.hxx index 89acfd2c30..da2ce8f9f7 100644 --- a/src/HLRBRep/HLRBRep_FaceData.hxx +++ b/src/HLRBRep/HLRBRep_FaceData.hxx @@ -29,7 +29,6 @@ #include class HLRAlgo_WiresBlock; class TopoDS_Face; -class HLRBRep_Surface; diff --git a/src/HLRBRep/HLRBRep_InternalAlgo.hxx b/src/HLRBRep/HLRBRep_InternalAlgo.hxx index 1791c5a4bc..3a1822d582 100644 --- a/src/HLRBRep/HLRBRep_InternalAlgo.hxx +++ b/src/HLRBRep/HLRBRep_InternalAlgo.hxx @@ -27,8 +27,6 @@ #include #include class HLRBRep_Data; -class Standard_OutOfRange; -class HLRAlgo_Projector; class HLRTopoBRep_OutLiner; class HLRBRep_ShapeBounds; diff --git a/src/HLRBRep/HLRBRep_Intersector.hxx b/src/HLRBRep/HLRBRep_Intersector.hxx index f8109cfaed..2731ca69e2 100644 --- a/src/HLRBRep/HLRBRep_Intersector.hxx +++ b/src/HLRBRep/HLRBRep_Intersector.hxx @@ -28,9 +28,7 @@ #include #include #include -class StdFail_UndefinedDerivative; class gp_Lin; -class IntRes2d_IntersectionPoint; class IntCurveSurface_IntersectionPoint; class IntRes2d_IntersectionSegment; class IntCurveSurface_IntersectionSegment; diff --git a/src/HLRBRep/HLRBRep_PolyAlgo.hxx b/src/HLRBRep/HLRBRep_PolyAlgo.hxx index 6dc19e9817..dfa696e161 100644 --- a/src/HLRBRep/HLRBRep_PolyAlgo.hxx +++ b/src/HLRBRep/HLRBRep_PolyAlgo.hxx @@ -35,7 +35,6 @@ #include class Geom_Surface; -class HLRAlgo_Projector; class TopoDS_Edge; class HLRAlgo_PolyInternalData; class HLRAlgo_EdgeStatus; diff --git a/src/HLRBRep/HLRBRep_ShapeBounds.hxx b/src/HLRBRep/HLRBRep_ShapeBounds.hxx index ce2b5f2afb..bcea069641 100644 --- a/src/HLRBRep/HLRBRep_ShapeBounds.hxx +++ b/src/HLRBRep/HLRBRep_ShapeBounds.hxx @@ -25,7 +25,6 @@ #include class HLRTopoBRep_OutLiner; -class Standard_Transient; //! Contains a Shape and the bounds of its vertices, diff --git a/src/HLRBRep/HLRBRep_Surface.hxx b/src/HLRBRep/HLRBRep_Surface.hxx index 5aa2933854..e8b49933d5 100644 --- a/src/HLRBRep/HLRBRep_Surface.hxx +++ b/src/HLRBRep/HLRBRep_Surface.hxx @@ -36,10 +36,6 @@ #include #include #include -class Standard_OutOfRange; -class Standard_NoSuchObject; -class Standard_DomainError; -class BRepAdaptor_Surface; class TopoDS_Face; class gp_Pnt; class gp_Vec; diff --git a/src/HLRBRep/HLRBRep_VertexList.hxx b/src/HLRBRep/HLRBRep_VertexList.hxx index 5fd4205afc..8103ebd498 100644 --- a/src/HLRBRep/HLRBRep_VertexList.hxx +++ b/src/HLRBRep/HLRBRep_VertexList.hxx @@ -25,7 +25,6 @@ #include #include #include -class HLRBRep_EdgeInterferenceTool; class HLRAlgo_Intersection; diff --git a/src/HLRTest/HLRTest.hxx b/src/HLRTest/HLRTest.hxx index 836abb600b..b12bdcd865 100644 --- a/src/HLRTest/HLRTest.hxx +++ b/src/HLRTest/HLRTest.hxx @@ -27,11 +27,6 @@ class HLRAlgo_Projector; class TopoDS_Shape; class HLRTopoBRep_OutLiner; -class HLRTest_ShapeData; -class HLRTest_DrawableEdgeTool; -class HLRTest_DrawablePolyEdgeTool; -class HLRTest_Projector; -class HLRTest_OutLiner; //! This package is a test of the Hidden Lines diff --git a/src/HLRTest/HLRTest_OutLiner.hxx b/src/HLRTest/HLRTest_OutLiner.hxx index ffec6f5114..638694b32d 100644 --- a/src/HLRTest/HLRTest_OutLiner.hxx +++ b/src/HLRTest/HLRTest_OutLiner.hxx @@ -26,7 +26,6 @@ class HLRTopoBRep_OutLiner; class TopoDS_Shape; class Draw_Display; -class Draw_Drawable3D; class HLRTest_OutLiner; diff --git a/src/HLRTest/HLRTest_ShapeData.hxx b/src/HLRTest/HLRTest_ShapeData.hxx index 8c5fee459e..b4521fbe29 100644 --- a/src/HLRTest/HLRTest_ShapeData.hxx +++ b/src/HLRTest/HLRTest_ShapeData.hxx @@ -22,7 +22,6 @@ #include #include -class Draw_Color; class HLRTest_ShapeData; diff --git a/src/HLRTopoBRep/HLRTopoBRep_OutLiner.hxx b/src/HLRTopoBRep/HLRTopoBRep_OutLiner.hxx index 47bdce31e9..2bbf29d7d6 100644 --- a/src/HLRTopoBRep/HLRTopoBRep_OutLiner.hxx +++ b/src/HLRTopoBRep/HLRTopoBRep_OutLiner.hxx @@ -25,8 +25,6 @@ #include #include #include -class TopoDS_Shape; -class HLRTopoBRep_Data; class HLRAlgo_Projector; class TopoDS_Face; diff --git a/src/HLRTopoBRep/HLRTopoBRep_VData.hxx b/src/HLRTopoBRep/HLRTopoBRep_VData.hxx index 96eff94f66..0a604f5132 100644 --- a/src/HLRTopoBRep/HLRTopoBRep_VData.hxx +++ b/src/HLRTopoBRep/HLRTopoBRep_VData.hxx @@ -23,7 +23,6 @@ #include #include -class TopoDS_Shape; diff --git a/src/Hatch/Hatch_Hatcher.hxx b/src/Hatch/Hatch_Hatcher.hxx index a3ec712a91..708a8c3020 100644 --- a/src/Hatch/Hatch_Hatcher.hxx +++ b/src/Hatch/Hatch_Hatcher.hxx @@ -26,7 +26,6 @@ #include #include #include -class Standard_OutOfRange; class gp_Lin2d; class gp_Dir2d; class gp_Pnt2d; diff --git a/src/Hatch/Hatch_Line.hxx b/src/Hatch/Hatch_Line.hxx index 62d4ea3c2d..1e2c184dfc 100644 --- a/src/Hatch/Hatch_Line.hxx +++ b/src/Hatch/Hatch_Line.hxx @@ -27,8 +27,6 @@ #include #include #include -class Hatch_Hatcher; -class gp_Lin2d; //! Stores a Line in the Hatcher. Represented by : diff --git a/src/Hatch/Hatch_Parameter.hxx b/src/Hatch/Hatch_Parameter.hxx index 7f3f0b7475..8e74c0fc1a 100644 --- a/src/Hatch/Hatch_Parameter.hxx +++ b/src/Hatch/Hatch_Parameter.hxx @@ -24,8 +24,6 @@ #include #include #include -class Hatch_Line; -class Hatch_Hatcher; //! Stores an intersection on a line represented by : diff --git a/src/HatchGen/HatchGen_Domain.hxx b/src/HatchGen/HatchGen_Domain.hxx index 988628cd43..6d55a2a249 100644 --- a/src/HatchGen/HatchGen_Domain.hxx +++ b/src/HatchGen/HatchGen_Domain.hxx @@ -24,8 +24,6 @@ #include #include #include -class Standard_DomainError; -class HatchGen_PointOnHatching; diff --git a/src/HatchGen/HatchGen_PointOnHatching.hxx b/src/HatchGen/HatchGen_PointOnHatching.hxx index ad5f1ddc82..e3ec0458df 100644 --- a/src/HatchGen/HatchGen_PointOnHatching.hxx +++ b/src/HatchGen/HatchGen_PointOnHatching.hxx @@ -26,7 +26,6 @@ #include #include #include -class Standard_OutOfRange; class IntRes2d_IntersectionPoint; class HatchGen_PointOnElement; diff --git a/src/HeaderSection/HeaderSection.hxx b/src/HeaderSection/HeaderSection.hxx index ac2cf18f05..2fbf112d7c 100644 --- a/src/HeaderSection/HeaderSection.hxx +++ b/src/HeaderSection/HeaderSection.hxx @@ -22,11 +22,6 @@ #include class HeaderSection_Protocol; -class HeaderSection_Protocol; -class HeaderSection_FileName; -class HeaderSection_FileDescription; -class HeaderSection_FileSchema; -class HeaderSection_HeaderRecognizer; diff --git a/src/IFGraph/IFGraph_AllConnected.hxx b/src/IFGraph/IFGraph_AllConnected.hxx index cbc1285676..a691700032 100644 --- a/src/IFGraph/IFGraph_AllConnected.hxx +++ b/src/IFGraph/IFGraph_AllConnected.hxx @@ -23,7 +23,6 @@ #include #include -class Interface_Graph; class Standard_Transient; diff --git a/src/IFGraph/IFGraph_AllShared.hxx b/src/IFGraph/IFGraph_AllShared.hxx index 8c10dd07a8..496b6976a6 100644 --- a/src/IFGraph/IFGraph_AllShared.hxx +++ b/src/IFGraph/IFGraph_AllShared.hxx @@ -23,7 +23,6 @@ #include #include -class Interface_Graph; class Standard_Transient; class Interface_EntityIterator; diff --git a/src/IFGraph/IFGraph_Articulations.hxx b/src/IFGraph/IFGraph_Articulations.hxx index 7f7fcccd69..94480c158e 100644 --- a/src/IFGraph/IFGraph_Articulations.hxx +++ b/src/IFGraph/IFGraph_Articulations.hxx @@ -26,7 +26,6 @@ #include #include #include -class Interface_Graph; class Standard_Transient; class Interface_EntityIterator; diff --git a/src/IFGraph/IFGraph_Compare.hxx b/src/IFGraph/IFGraph_Compare.hxx index 3cfd311a80..d6440959e9 100644 --- a/src/IFGraph/IFGraph_Compare.hxx +++ b/src/IFGraph/IFGraph_Compare.hxx @@ -24,7 +24,6 @@ #include #include #include -class Interface_Graph; class Standard_Transient; class Interface_EntityIterator; diff --git a/src/IFGraph/IFGraph_Cumulate.hxx b/src/IFGraph/IFGraph_Cumulate.hxx index 1a78885ac5..328cc62ed4 100644 --- a/src/IFGraph/IFGraph_Cumulate.hxx +++ b/src/IFGraph/IFGraph_Cumulate.hxx @@ -24,7 +24,6 @@ #include #include #include -class Interface_Graph; class Standard_Transient; class Interface_EntityIterator; diff --git a/src/IFGraph/IFGraph_ExternalSources.hxx b/src/IFGraph/IFGraph_ExternalSources.hxx index 2afc5b5809..e8f379921e 100644 --- a/src/IFGraph/IFGraph_ExternalSources.hxx +++ b/src/IFGraph/IFGraph_ExternalSources.hxx @@ -24,7 +24,6 @@ #include #include #include -class Interface_Graph; class Standard_Transient; class Interface_EntityIterator; diff --git a/src/IFGraph/IFGraph_SCRoots.hxx b/src/IFGraph/IFGraph_SCRoots.hxx index 84dfae9b53..1b217eb64a 100644 --- a/src/IFGraph/IFGraph_SCRoots.hxx +++ b/src/IFGraph/IFGraph_SCRoots.hxx @@ -24,7 +24,6 @@ #include #include class Interface_Graph; -class IFGraph_StrongComponants; //! determines strong components in a graph which are Roots diff --git a/src/IFGraph/IFGraph_SubPartsIterator.hxx b/src/IFGraph/IFGraph_SubPartsIterator.hxx index cc4f243045..d5f26972f0 100644 --- a/src/IFGraph/IFGraph_SubPartsIterator.hxx +++ b/src/IFGraph/IFGraph_SubPartsIterator.hxx @@ -25,10 +25,6 @@ #include #include #include -class Standard_OutOfRange; -class Standard_NoSuchObject; -class Interface_InterfaceError; -class Interface_Graph; class Interface_InterfaceModel; class Standard_Transient; class Interface_EntityIterator; diff --git a/src/IFSelect/IFSelect.hxx b/src/IFSelect/IFSelect.hxx index 81f916622d..3bdcf76690 100644 --- a/src/IFSelect/IFSelect.hxx +++ b/src/IFSelect/IFSelect.hxx @@ -24,84 +24,6 @@ #include #include class IFSelect_WorkSession; -class IFSelect_Signature; -class IFSelect_SignMultiple; -class IFSelect_SignType; -class IFSelect_SignCategory; -class IFSelect_SignValidity; -class IFSelect_SignAncestor; -class IFSelect_ShareOut; -class IFSelect_AppliedModifiers; -class IFSelect_ShareOutResult; -class IFSelect_PacketList; -class IFSelect_Dispatch; -class IFSelect_DispGlobal; -class IFSelect_DispPerOne; -class IFSelect_DispPerCount; -class IFSelect_DispPerSignature; -class IFSelect_DispPerFiles; -class IFSelect_SelectionIterator; -class IFSelect_Selection; -class IFSelect_SelectBase; -class IFSelect_SelectModelRoots; -class IFSelect_SelectModelEntities; -class IFSelect_SelectEntityNumber; -class IFSelect_SelectPointed; -class IFSelect_SelectCombine; -class IFSelect_SelectUnion; -class IFSelect_SelectIntersection; -class IFSelect_SelectControl; -class IFSelect_SelectDiff; -class IFSelect_SelectDeduct; -class IFSelect_SelectShared; -class IFSelect_SelectSharing; -class IFSelect_SelectAnyList; -class IFSelect_SelectInList; -class IFSelect_SelectSuite; -class IFSelect_SelectExtract; -class IFSelect_SelectUnknownEntities; -class IFSelect_SelectErrorEntities; -class IFSelect_SelectIncorrectEntities; -class IFSelect_SelectRoots; -class IFSelect_SelectRootComps; -class IFSelect_SelectRange; -class IFSelect_SelectAnyType; -class IFSelect_SelectType; -class IFSelect_SelectSignature; -class IFSelect_SelectFlag; -class IFSelect_SelectSent; -class IFSelect_SelectExplore; -class IFSelect_SelectSignedShared; -class IFSelect_SelectSignedSharing; -class IFSelect_IntParam; -class IFSelect_SignatureList; -class IFSelect_CheckCounter; -class IFSelect_SignCounter; -class IFSelect_GraphCounter; -class IFSelect_Editor; -class IFSelect_ParamEditor; -class IFSelect_EditForm; -class IFSelect_ListEditor; -class IFSelect_ContextModif; -class IFSelect_ContextWrite; -class IFSelect_Transformer; -class IFSelect_TransformStandard; -class IFSelect_ModelCopier; -class IFSelect_GeneralModifier; -class IFSelect_Modifier; -class IFSelect_ModifReorder; -class IFSelect_ModifEditForm; -class IFSelect_FileModifier; -class IFSelect_ModelModifier; -class IFSelect_WorkSession; -class IFSelect_WorkLibrary; -class IFSelect_SessionFile; -class IFSelect_SessionDumper; -class IFSelect_BasicDumper; -class IFSelect_Activator; -class IFSelect_SessionPilot; -class IFSelect_Act; -class IFSelect_Functions; //! Gives tools to manage Selecting a group of Entities diff --git a/src/IFSelect/IFSelect_Act.hxx b/src/IFSelect/IFSelect_Act.hxx index af2705c2d9..2dd391fc74 100644 --- a/src/IFSelect/IFSelect_Act.hxx +++ b/src/IFSelect/IFSelect_Act.hxx @@ -26,7 +26,6 @@ #include #include #include -class Standard_DomainError; class IFSelect_SessionPilot; diff --git a/src/IFSelect/IFSelect_Activator.hxx b/src/IFSelect/IFSelect_Activator.hxx index c3c785070a..aa576abd60 100644 --- a/src/IFSelect/IFSelect_Activator.hxx +++ b/src/IFSelect/IFSelect_Activator.hxx @@ -27,8 +27,6 @@ #include #include #include -class Standard_DomainError; -class TCollection_AsciiString; class IFSelect_SessionPilot; diff --git a/src/IFSelect/IFSelect_ContextModif.hxx b/src/IFSelect/IFSelect_ContextModif.hxx index 45e864f76f..06a98bf776 100644 --- a/src/IFSelect/IFSelect_ContextModif.hxx +++ b/src/IFSelect/IFSelect_ContextModif.hxx @@ -29,15 +29,12 @@ #include class Interface_Protocol; class Interface_CopyControl; -class Standard_NoSuchObject; -class Interface_Graph; class Interface_CopyTool; class Interface_EntityIterator; class Interface_InterfaceModel; class Standard_Transient; class IFSelect_GeneralModifier; class Interface_Check; -class Interface_CheckIterator; //! This class gathers various information used by Model Modifiers diff --git a/src/IFSelect/IFSelect_ContextWrite.hxx b/src/IFSelect/IFSelect_ContextWrite.hxx index 17391c6a1f..287c66ab61 100644 --- a/src/IFSelect/IFSelect_ContextWrite.hxx +++ b/src/IFSelect/IFSelect_ContextWrite.hxx @@ -31,11 +31,9 @@ class Interface_Protocol; class IFSelect_AppliedModifiers; class Interface_HGraph; class IFSelect_GeneralModifier; -class Standard_NoSuchObject; class Interface_Graph; class Standard_Transient; class Interface_Check; -class Interface_CheckIterator; //! This class gathers various information used by File Modifiers diff --git a/src/IFSelect/IFSelect_DispPerCount.hxx b/src/IFSelect/IFSelect_DispPerCount.hxx index 9b9d7a6c5c..82e78e87ad 100644 --- a/src/IFSelect/IFSelect_DispPerCount.hxx +++ b/src/IFSelect/IFSelect_DispPerCount.hxx @@ -24,7 +24,6 @@ #include #include class IFSelect_IntParam; -class Interface_InterfaceError; class TCollection_AsciiString; class Interface_Graph; class IFGraph_SubPartsIterator; diff --git a/src/IFSelect/IFSelect_DispPerFiles.hxx b/src/IFSelect/IFSelect_DispPerFiles.hxx index ad815130de..efe1755911 100644 --- a/src/IFSelect/IFSelect_DispPerFiles.hxx +++ b/src/IFSelect/IFSelect_DispPerFiles.hxx @@ -24,7 +24,6 @@ #include #include class IFSelect_IntParam; -class Interface_InterfaceError; class TCollection_AsciiString; class Interface_Graph; class IFGraph_SubPartsIterator; diff --git a/src/IFSelect/IFSelect_DispPerSignature.hxx b/src/IFSelect/IFSelect_DispPerSignature.hxx index 0601a540c8..ff37907d7d 100644 --- a/src/IFSelect/IFSelect_DispPerSignature.hxx +++ b/src/IFSelect/IFSelect_DispPerSignature.hxx @@ -25,7 +25,6 @@ #include #include class IFSelect_SignCounter; -class Interface_InterfaceError; class TCollection_AsciiString; class Interface_Graph; class IFGraph_SubPartsIterator; diff --git a/src/IFSelect/IFSelect_Dispatch.hxx b/src/IFSelect/IFSelect_Dispatch.hxx index 2ca7ee63b8..82b0b7d4ab 100644 --- a/src/IFSelect/IFSelect_Dispatch.hxx +++ b/src/IFSelect/IFSelect_Dispatch.hxx @@ -25,7 +25,6 @@ #include class TCollection_HAsciiString; class IFSelect_Selection; -class Interface_InterfaceError; class IFSelect_SelectionIterator; class TCollection_AsciiString; class Interface_EntityIterator; diff --git a/src/IFSelect/IFSelect_EditForm.hxx b/src/IFSelect/IFSelect_EditForm.hxx index d6440c037a..5d4469ea4b 100644 --- a/src/IFSelect/IFSelect_EditForm.hxx +++ b/src/IFSelect/IFSelect_EditForm.hxx @@ -30,7 +30,6 @@ #include #include class IFSelect_Editor; -class Standard_Transient; class Interface_InterfaceModel; class IFSelect_ListEditor; class TCollection_HAsciiString; diff --git a/src/IFSelect/IFSelect_Editor.hxx b/src/IFSelect/IFSelect_Editor.hxx index 8258741ec6..b85ed01d42 100644 --- a/src/IFSelect/IFSelect_Editor.hxx +++ b/src/IFSelect/IFSelect_Editor.hxx @@ -31,12 +31,10 @@ #include #include #include -class Standard_OutOfRange; class Interface_TypedValue; class IFSelect_EditForm; class TCollection_HAsciiString; class IFSelect_ListEditor; -class Standard_Transient; class Interface_InterfaceModel; diff --git a/src/IFSelect/IFSelect_PacketList.hxx b/src/IFSelect/IFSelect_PacketList.hxx index 1732d0b6a3..0f7759c9a9 100644 --- a/src/IFSelect/IFSelect_PacketList.hxx +++ b/src/IFSelect/IFSelect_PacketList.hxx @@ -29,8 +29,6 @@ #include #include class Interface_InterfaceModel; -class Interface_InterfaceError; -class Standard_Transient; class Interface_EntityIterator; diff --git a/src/IFSelect/IFSelect_ParamEditor.hxx b/src/IFSelect/IFSelect_ParamEditor.hxx index e9b645cd8e..2e207e1fc4 100644 --- a/src/IFSelect/IFSelect_ParamEditor.hxx +++ b/src/IFSelect/IFSelect_ParamEditor.hxx @@ -27,7 +27,6 @@ #include #include class Interface_TypedValue; -class TCollection_AsciiString; class IFSelect_EditForm; class TCollection_HAsciiString; class Standard_Transient; diff --git a/src/IFSelect/IFSelect_SelectAnyList.hxx b/src/IFSelect/IFSelect_SelectAnyList.hxx index 16997fb14b..debe894608 100644 --- a/src/IFSelect/IFSelect_SelectAnyList.hxx +++ b/src/IFSelect/IFSelect_SelectAnyList.hxx @@ -24,8 +24,6 @@ #include #include class IFSelect_IntParam; -class Standard_OutOfRange; -class Interface_InterfaceError; class Interface_EntityIterator; class Standard_Transient; class Interface_Graph; diff --git a/src/IFSelect/IFSelect_SelectCombine.hxx b/src/IFSelect/IFSelect_SelectCombine.hxx index 6ccb254d96..794383dccc 100644 --- a/src/IFSelect/IFSelect_SelectCombine.hxx +++ b/src/IFSelect/IFSelect_SelectCombine.hxx @@ -24,7 +24,6 @@ #include #include #include -class IFSelect_Selection; class IFSelect_SelectionIterator; diff --git a/src/IFSelect/IFSelect_SelectControl.hxx b/src/IFSelect/IFSelect_SelectControl.hxx index 581d736cc2..2eeaac20ab 100644 --- a/src/IFSelect/IFSelect_SelectControl.hxx +++ b/src/IFSelect/IFSelect_SelectControl.hxx @@ -22,7 +22,6 @@ #include #include -class IFSelect_Selection; class IFSelect_SelectionIterator; diff --git a/src/IFSelect/IFSelect_SelectDeduct.hxx b/src/IFSelect/IFSelect_SelectDeduct.hxx index 793a0418f1..e5f8dbb955 100644 --- a/src/IFSelect/IFSelect_SelectDeduct.hxx +++ b/src/IFSelect/IFSelect_SelectDeduct.hxx @@ -22,9 +22,7 @@ #include #include -class IFSelect_Selection; class IFSelect_SelectPointed; -class Interface_InterfaceError; class Interface_EntityIterator; class Interface_Graph; class IFSelect_SelectionIterator; diff --git a/src/IFSelect/IFSelect_SelectFlag.hxx b/src/IFSelect/IFSelect_SelectFlag.hxx index 584f874626..719123af87 100644 --- a/src/IFSelect/IFSelect_SelectFlag.hxx +++ b/src/IFSelect/IFSelect_SelectFlag.hxx @@ -29,7 +29,6 @@ class Interface_EntityIterator; class Interface_Graph; class Standard_Transient; class Interface_InterfaceModel; -class TCollection_AsciiString; class IFSelect_SelectFlag; diff --git a/src/IFSelect/IFSelect_SelectInList.hxx b/src/IFSelect/IFSelect_SelectInList.hxx index 9d1fcb5321..774451f9d9 100644 --- a/src/IFSelect/IFSelect_SelectInList.hxx +++ b/src/IFSelect/IFSelect_SelectInList.hxx @@ -22,7 +22,6 @@ #include #include -class Standard_OutOfRange; class Standard_Transient; class Interface_EntityIterator; diff --git a/src/IFSelect/IFSelect_SelectPointed.hxx b/src/IFSelect/IFSelect_SelectPointed.hxx index 2daaf83758..6757980de0 100644 --- a/src/IFSelect/IFSelect_SelectPointed.hxx +++ b/src/IFSelect/IFSelect_SelectPointed.hxx @@ -25,7 +25,6 @@ #include #include #include -class Interface_InterfaceError; class Standard_Transient; class Interface_CopyControl; class IFSelect_Transformer; diff --git a/src/IFSelect/IFSelect_SelectRange.hxx b/src/IFSelect/IFSelect_SelectRange.hxx index 2e4f8e6e2d..bc594b6b22 100644 --- a/src/IFSelect/IFSelect_SelectRange.hxx +++ b/src/IFSelect/IFSelect_SelectRange.hxx @@ -24,7 +24,6 @@ #include #include class IFSelect_IntParam; -class Standard_DomainError; class Standard_Transient; class Interface_InterfaceModel; class TCollection_AsciiString; diff --git a/src/IFSelect/IFSelect_SelectSignature.hxx b/src/IFSelect/IFSelect_SelectSignature.hxx index 8e8bb90776..99afaae66e 100644 --- a/src/IFSelect/IFSelect_SelectSignature.hxx +++ b/src/IFSelect/IFSelect_SelectSignature.hxx @@ -29,7 +29,6 @@ #include class IFSelect_Signature; class IFSelect_SignCounter; -class TCollection_AsciiString; class Standard_Transient; class Interface_Graph; class Interface_InterfaceModel; diff --git a/src/IFSelect/IFSelect_SelectSignedShared.hxx b/src/IFSelect/IFSelect_SelectSignedShared.hxx index 4171289b5c..60f0980699 100644 --- a/src/IFSelect/IFSelect_SelectSignedShared.hxx +++ b/src/IFSelect/IFSelect_SelectSignedShared.hxx @@ -26,7 +26,6 @@ #include #include class IFSelect_Signature; -class TCollection_AsciiString; class Standard_Transient; class Interface_Graph; class Interface_EntityIterator; diff --git a/src/IFSelect/IFSelect_SelectSignedSharing.hxx b/src/IFSelect/IFSelect_SelectSignedSharing.hxx index 984b508642..4a55fedd39 100644 --- a/src/IFSelect/IFSelect_SelectSignedSharing.hxx +++ b/src/IFSelect/IFSelect_SelectSignedSharing.hxx @@ -26,7 +26,6 @@ #include #include class IFSelect_Signature; -class TCollection_AsciiString; class Standard_Transient; class Interface_Graph; class Interface_EntityIterator; diff --git a/src/IFSelect/IFSelect_SelectSuite.hxx b/src/IFSelect/IFSelect_SelectSuite.hxx index 1080b57dda..72008b83d8 100644 --- a/src/IFSelect/IFSelect_SelectSuite.hxx +++ b/src/IFSelect/IFSelect_SelectSuite.hxx @@ -26,12 +26,9 @@ #include #include #include -class Interface_InterfaceError; class IFSelect_Selection; -class IFSelect_SelectDeduct; class Interface_EntityIterator; class Interface_Graph; -class TCollection_AsciiString; class IFSelect_SelectSuite; diff --git a/src/IFSelect/IFSelect_Selection.hxx b/src/IFSelect/IFSelect_Selection.hxx index 4cda578515..14cb0d2fcf 100644 --- a/src/IFSelect/IFSelect_Selection.hxx +++ b/src/IFSelect/IFSelect_Selection.hxx @@ -22,7 +22,6 @@ #include #include -class Interface_InterfaceError; class Interface_EntityIterator; class Interface_Graph; class IFSelect_SelectionIterator; diff --git a/src/IFSelect/IFSelect_SelectionIterator.hxx b/src/IFSelect/IFSelect_SelectionIterator.hxx index bf09ddf218..05f59dfd9c 100644 --- a/src/IFSelect/IFSelect_SelectionIterator.hxx +++ b/src/IFSelect/IFSelect_SelectionIterator.hxx @@ -25,7 +25,6 @@ #include #include #include -class Standard_NoSuchObject; class IFSelect_Selection; //! Defines an Iterator on a list of Selections diff --git a/src/IFSelect/IFSelect_SessionDumper.hxx b/src/IFSelect/IFSelect_SessionDumper.hxx index 85ff5caeb2..84ccb4dd46 100644 --- a/src/IFSelect/IFSelect_SessionDumper.hxx +++ b/src/IFSelect/IFSelect_SessionDumper.hxx @@ -23,7 +23,6 @@ #include #include class IFSelect_SessionFile; -class Standard_Transient; class TCollection_AsciiString; diff --git a/src/IFSelect/IFSelect_SessionFile.hxx b/src/IFSelect/IFSelect_SessionFile.hxx index 6e40a07f05..9c6236dfc7 100644 --- a/src/IFSelect/IFSelect_SessionFile.hxx +++ b/src/IFSelect/IFSelect_SessionFile.hxx @@ -31,7 +31,6 @@ #include class IFSelect_WorkSession; -class TCollection_AsciiString; class Standard_Transient; //! A SessionFile is intended to manage access between a diff --git a/src/IFSelect/IFSelect_SessionPilot.hxx b/src/IFSelect/IFSelect_SessionPilot.hxx index e6a16ad441..7b62f8d405 100644 --- a/src/IFSelect/IFSelect_SessionPilot.hxx +++ b/src/IFSelect/IFSelect_SessionPilot.hxx @@ -31,9 +31,7 @@ #include #include class IFSelect_WorkSession; -class Standard_Transient; class IFSelect_WorkLibrary; -class TCollection_AsciiString; class IFSelect_SignCounter; class IFSelect_SessionPilot; diff --git a/src/IFSelect/IFSelect_ShareOut.hxx b/src/IFSelect/IFSelect_ShareOut.hxx index ff0732170f..e27a7183f6 100644 --- a/src/IFSelect/IFSelect_ShareOut.hxx +++ b/src/IFSelect/IFSelect_ShareOut.hxx @@ -26,9 +26,6 @@ #include #include class TCollection_HAsciiString; -class Interface_InterfaceError; -class Standard_OutOfRange; -class Standard_Transient; class IFSelect_Dispatch; class IFSelect_GeneralModifier; class IFSelect_Modifier; diff --git a/src/IFSelect/IFSelect_ShareOutResult.hxx b/src/IFSelect/IFSelect_ShareOutResult.hxx index 5ff1848b60..06a4ae4396 100644 --- a/src/IFSelect/IFSelect_ShareOutResult.hxx +++ b/src/IFSelect/IFSelect_ShareOutResult.hxx @@ -28,10 +28,7 @@ #include class IFSelect_ShareOut; class IFSelect_Dispatch; -class Standard_NoSuchObject; -class Interface_InterfaceError; class Interface_InterfaceModel; -class Interface_Graph; class IFSelect_PacketList; class Interface_EntityIterator; class TCollection_AsciiString; diff --git a/src/IFSelect/IFSelect_SignMultiple.hxx b/src/IFSelect/IFSelect_SignMultiple.hxx index 9a0d9310b8..0b1dbe4a27 100644 --- a/src/IFSelect/IFSelect_SignMultiple.hxx +++ b/src/IFSelect/IFSelect_SignMultiple.hxx @@ -26,7 +26,6 @@ #include #include #include -class IFSelect_Signature; class Standard_Transient; class Interface_InterfaceModel; class TCollection_AsciiString; diff --git a/src/IFSelect/IFSelect_Signature.hxx b/src/IFSelect/IFSelect_Signature.hxx index c80c9d41a5..3e4d35c263 100644 --- a/src/IFSelect/IFSelect_Signature.hxx +++ b/src/IFSelect/IFSelect_Signature.hxx @@ -26,7 +26,6 @@ #include #include #include -class TCollection_AsciiString; class Standard_Transient; class Interface_InterfaceModel; diff --git a/src/IFSelect/IFSelect_Transformer.hxx b/src/IFSelect/IFSelect_Transformer.hxx index 207f21af4e..fe812d8ae0 100644 --- a/src/IFSelect/IFSelect_Transformer.hxx +++ b/src/IFSelect/IFSelect_Transformer.hxx @@ -26,7 +26,6 @@ class Interface_Graph; class Interface_Protocol; class Interface_CheckIterator; class Interface_InterfaceModel; -class Standard_Transient; class TCollection_AsciiString; class IFSelect_Transformer; diff --git a/src/IFSelect/IFSelect_WorkLibrary.hxx b/src/IFSelect/IFSelect_WorkLibrary.hxx index 33f9ca4b37..b129d6871d 100644 --- a/src/IFSelect/IFSelect_WorkLibrary.hxx +++ b/src/IFSelect/IFSelect_WorkLibrary.hxx @@ -30,7 +30,6 @@ class Interface_Protocol; class IFSelect_ContextWrite; class Interface_EntityIterator; class Interface_CopyTool; -class Standard_Transient; class IFSelect_WorkLibrary; DEFINE_STANDARD_HANDLE(IFSelect_WorkLibrary, Standard_Transient) diff --git a/src/IFSelect/IFSelect_WorkSession.hxx b/src/IFSelect/IFSelect_WorkSession.hxx index e1da442570..14f2f0b08b 100644 --- a/src/IFSelect/IFSelect_WorkSession.hxx +++ b/src/IFSelect/IFSelect_WorkSession.hxx @@ -48,11 +48,9 @@ class Interface_HGraph; class Interface_GTool; class IFSelect_ModelCopier; -class Standard_DomainError; class IFSelect_Signature; class TCollection_HAsciiString; class Interface_Graph; -class Interface_CheckIterator; class IFSelect_IntParam; class IFSelect_Selection; class Interface_EntityIterator; From 9923f0870387be558e462998f98172b172a659a4 Mon Sep 17 00:00:00 2001 From: ifv Date: Mon, 4 Oct 2021 14:48:03 +0300 Subject: [PATCH 110/639] 0032557: Modeling Data - Use of BRepBuilderAPI_NurbsConvert create 2d p-curves with gaps GeomConvert/GeomConvert_1.cxx - method CheckAndSegment is added to adjust surface periodic boundaries bug32557 - test is updated by new cases --- .../BRepTools_NurbsConvertModification.cxx | 5 ++-- src/GeomConvert/GeomConvert_1.cxx | 27 ++++++++++++++++++- tests/bugs/moddata_3/bug32557 | 8 +++++- 3 files changed, 35 insertions(+), 5 deletions(-) diff --git a/src/BRepTools/BRepTools_NurbsConvertModification.cxx b/src/BRepTools/BRepTools_NurbsConvertModification.cxx index 67565185c9..f3941f0174 100644 --- a/src/BRepTools/BRepTools_NurbsConvertModification.cxx +++ b/src/BRepTools/BRepTools_NurbsConvertModification.cxx @@ -504,10 +504,9 @@ Standard_Boolean BRepTools_NurbsConvertModification::NewCurve2d } aMinDist *= aMinDist; //Old domain - Standard_Real t = 0.5 * (f2d + l2d); - gp_Pnt2d aPf = C2d->Value(t); + gp_Pnt2d aPf = C2d->Value(f2d); //New domain - gp_Pnt2d aNewPf = Curve2d->Value(t); + gp_Pnt2d aNewPf = Curve2d->Value(f2d); gp_Vec2d aT(aNewPf, aPf); if (aT.SquareMagnitude() > aMinDist) { diff --git a/src/GeomConvert/GeomConvert_1.cxx b/src/GeomConvert/GeomConvert_1.cxx index da4229b424..0f619b5534 100644 --- a/src/GeomConvert/GeomConvert_1.cxx +++ b/src/GeomConvert/GeomConvert_1.cxx @@ -383,6 +383,7 @@ Handle(Geom_BSplineSurface) GeomConvert::SurfaceToBSplineSurface // //For cylinders, cones, spheres, toruses const Standard_Boolean isUClosed = Abs((ULast - UFirst) - 2. * M_PI) <= Precision::PConfusion(); + const Standard_Real eps = 100. * Epsilon(2. * M_PI); // if (Surf->IsKind(STANDARD_TYPE(Geom_Plane))) { TColgp_Array2OfPnt Poles (1, 2, 1, 2); @@ -415,6 +416,11 @@ Handle(Geom_BSplineSurface) GeomConvert::SurfaceToBSplineSurface if (isUClosed) { Convert_CylinderToBSplineSurface Convert (Cyl, VFirst, VLast); TheSurface = BSplineSurfaceBuilder (Convert); + Standard_Integer aNbK = TheSurface->NbUKnots(); + if (Abs(TheSurface->UKnot(1) - UFirst) > eps || Abs(TheSurface->UKnot(aNbK) - ULast) > eps) + { + TheSurface->CheckAndSegment(UFirst, ULast, VFirst, VLast); + } } else { Convert_CylinderToBSplineSurface @@ -431,6 +437,11 @@ Handle(Geom_BSplineSurface) GeomConvert::SurfaceToBSplineSurface if (isUClosed) { Convert_ConeToBSplineSurface Convert (Co, VFirst, VLast); TheSurface = BSplineSurfaceBuilder (Convert); + Standard_Integer aNbK = TheSurface->NbUKnots(); + if (Abs(TheSurface->UKnot(1) - UFirst) > eps || Abs(TheSurface->UKnot(aNbK) - ULast) > eps) + { + TheSurface->CheckAndSegment(UFirst, ULast, VFirst, VLast); + } } else { Convert_ConeToBSplineSurface @@ -450,6 +461,11 @@ Handle(Geom_BSplineSurface) GeomConvert::SurfaceToBSplineSurface //Convert_SphereToBSplineSurface Convert (Sph, UFirst, ULast); Convert_SphereToBSplineSurface Convert (Sph, VFirst, VLast, Standard_False); TheSurface = BSplineSurfaceBuilder (Convert); + Standard_Integer aNbK = TheSurface->NbUKnots(); + if (Abs(TheSurface->UKnot(1) - UFirst) > eps || Abs(TheSurface->UKnot(aNbK) - ULast) > eps) + { + TheSurface->CheckAndSegment(UFirst, ULast, VFirst, VLast); + } } else { Convert_SphereToBSplineSurface @@ -468,10 +484,20 @@ Handle(Geom_BSplineSurface) GeomConvert::SurfaceToBSplineSurface Convert_TorusToBSplineSurface Convert (Tr, VFirst, VLast, Standard_False); TheSurface = BSplineSurfaceBuilder (Convert); + Standard_Integer aNbK = TheSurface->NbUKnots(); + if (Abs(TheSurface->UKnot(1) - UFirst) > eps || Abs(TheSurface->UKnot(aNbK) - ULast) > eps) + { + TheSurface->CheckAndSegment(UFirst, ULast, VFirst, VLast); + } } else if (Strim->IsVClosed()) { Convert_TorusToBSplineSurface Convert (Tr, UFirst, ULast); TheSurface = BSplineSurfaceBuilder (Convert); + Standard_Integer aNbK = TheSurface->NbVKnots(); + if (Abs(TheSurface->VKnot(1) - VFirst) > eps || Abs(TheSurface->VKnot(aNbK) - VLast) > eps) + { + TheSurface->CheckAndSegment(UFirst, ULast, VFirst, VLast); + } } else { Convert_TorusToBSplineSurface @@ -575,7 +601,6 @@ Handle(Geom_BSplineSurface) GeomConvert::SurfaceToBSplineSurface 2 , C->Degree(), periodic, C->IsPeriodic()); - } diff --git a/tests/bugs/moddata_3/bug32557 b/tests/bugs/moddata_3/bug32557 index 374a129033..721b4c0612 100644 --- a/tests/bugs/moddata_3/bug32557 +++ b/tests/bugs/moddata_3/bug32557 @@ -4,7 +4,13 @@ puts "===========================================================" puts "" restore [locate_data_file bug32557.brep] f - nurbsconvert bf f checkmaxtol bf -ref 1.1e-7 +restore [locate_data_file bug32557_1.brep] f +nurbsconvert bf f +checkmaxtol bf -ref 1.1e-5 + +restore [locate_data_file bug32557_2.brep] f +nurbsconvert bf f +checkmaxtol bf -ref 0.0002570 \ No newline at end of file From 81f57d1135087aa825e57829e72fb1c518a1ef92 Mon Sep 17 00:00:00 2001 From: knosulko Date: Fri, 20 Aug 2021 12:39:26 +0300 Subject: [PATCH 111/639] 0030046: Modeling Algorithms - Cannot find necessary projection of the curve move algorithm of obtaining results from function gproject to method ProjLib_CompProjectedCurve::Perform; fix tolerances in ProjLib_PrjResolve::ProjLib_PrjResolve; new treatment of myMaxDist; use extend bounds in approximation; add test; test case "bugs modalg_5 bug25980", "bugs modalg_7 bug24185" have been changed according to new behavior. --- src/BRepAlgo/BRepAlgo_NormalProjection.cxx | 4 + .../GeometryTest_CurveCommands.cxx | 231 +++++----- src/ProjLib/ProjLib_CompProjectedCurve.cxx | 422 +++++++++++++++++- src/ProjLib/ProjLib_CompProjectedCurve.hxx | 102 ++++- src/ProjLib/ProjLib_PrjResolve.cxx | 10 +- tests/bugs/modalg_5/bug25980 | 5 +- tests/bugs/modalg_7/bug24185 | 4 +- tests/bugs/moddata_3/bug30046 | 65 +++ 8 files changed, 695 insertions(+), 148 deletions(-) create mode 100644 tests/bugs/moddata_3/bug30046 diff --git a/src/BRepAlgo/BRepAlgo_NormalProjection.cxx b/src/BRepAlgo/BRepAlgo_NormalProjection.cxx index 2a289ebab0..f94dab3b00 100644 --- a/src/BRepAlgo/BRepAlgo_NormalProjection.cxx +++ b/src/BRepAlgo/BRepAlgo_NormalProjection.cxx @@ -355,6 +355,10 @@ void BRepAlgo_NormalProjection::SetDefaultParams() #endif Approx_CurveOnSurface appr(HPCur, hsur, Udeb, Ufin, myTol3d); appr.Perform(myMaxSeg, myMaxDegree, myContinuity, Only3d, Only2d); + + if (appr.MaxError3d() > 1.e3 * myTol3d) + continue; + #ifdef OCCT_DEBUG_CHRONO ResultChron(chr_approx,t_approx); approx_count++; diff --git a/src/GeometryTest/GeometryTest_CurveCommands.cxx b/src/GeometryTest/GeometryTest_CurveCommands.cxx index 1692201516..fc26d2d158 100644 --- a/src/GeometryTest/GeometryTest_CurveCommands.cxx +++ b/src/GeometryTest/GeometryTest_CurveCommands.cxx @@ -261,134 +261,135 @@ static Standard_Integer to3d (Draw_Interpretor& , Standard_Integer n, const char static Standard_Integer gproject(Draw_Interpretor& di, Standard_Integer n, const char** a) { - - char newname[1024]; - char* temp = newname; - char newname1[10]; - char* temp1 = newname1; - char name[100]; - Standard_Integer ONE = 1; - - if (n == 3) - Sprintf(name,"p"); - else if (n == 4) { - Sprintf(name,"%s",a[1]); - ONE = 2; + TCollection_AsciiString newname; + TCollection_AsciiString newname1; + + if (n < 4) + { + di << "gproject waits 3 or more arguments\n"; + return 1; } - else { - di << "gproject wait 2 or 3 arguments\n"; - return 1; - } - Handle(Geom_Curve) Cur = DrawTrSurf::GetCurve(a[ONE]); - Handle(Geom_Surface) Sur = DrawTrSurf::GetSurface(a[ONE+1]); + TCollection_AsciiString name = a[1]; + + Handle(Geom_Curve) Cur = DrawTrSurf::GetCurve(a[2]); + Handle(Geom_Surface) Sur = DrawTrSurf::GetSurface(a[3]); if (Cur.IsNull() || Sur.IsNull()) return 1; Handle(GeomAdaptor_Curve) hcur = new GeomAdaptor_Curve(Cur); Handle(GeomAdaptor_Surface) hsur = new GeomAdaptor_Surface(Sur); + Standard_Integer index = 4; + Standard_Real aTol3d = 1.e-6; + Standard_Real aMaxDist = -1.0; - Standard_Real myTol3d = 1.e-6; - GeomAbs_Shape myContinuity = GeomAbs_C2; - Standard_Integer myMaxDegree = 14, myMaxSeg = 16; + if (n > 4 && a[4][0] != '-') + { + aTol3d = Draw::Atof(a[4]); + index = 5; + if (n > 5 && a[5][0] != '-') + { + aMaxDist = Draw::Atof(a[5]); + index = 6; + } + } - Handle(ProjLib_HCompProjectedCurve) HProjector = new ProjLib_HCompProjectedCurve (hsur, hcur, myTol3d/10, myTol3d/10); + Handle(ProjLib_HCompProjectedCurve) HProjector = new ProjLib_HCompProjectedCurve(aTol3d, hsur, hcur, aMaxDist); ProjLib_CompProjectedCurve& Projector = *HProjector; - Standard_Integer k; - Standard_Real Udeb, Ufin, UIso, VIso; - Standard_Boolean Only2d, Only3d; - gp_Pnt2d P2d, Pdeb, Pfin; - gp_Pnt P; - Handle(Adaptor2d_Curve2d) HPCur; - Handle(Geom2d_Curve) PCur2d; // Only for isoparametric projection - - for(k = 1; k <= Projector.NbCurves(); k++){ - Sprintf(newname,"%s_%d",name,k); - Sprintf(newname1,"%s2d_%d",name,k); - if(Projector.IsSinglePnt(k, P2d)){ -// std::cout<<"Part "<D0(P2d.X(), P2d.Y(), P); - DrawTrSurf::Set(temp, P); - DrawTrSurf::Set(temp1, P2d); - di< Ufin) { - Dir = gp_Dir2d(0, -1); - Udeb = - Udeb; - Ufin = - Ufin; - } - else Dir = gp_Dir2d(0, 1); - PCur2d = new Geom2d_TrimmedCurve(new Geom2d_Line(gp_Pnt2d(UIso, 0), Dir), Udeb, Ufin); - HPCur = new Geom2dAdaptor_Curve(PCur2d); - Only3d = Standard_True; + else if (a[index][1] == 'd') + { + aMaxDegree = Draw::Atoi(a[index + 1]); + aMaxDegree = aMaxDegree > 25 ? 25 : aMaxDegree; + Projector.SetMaxDegree(aMaxDegree); + } + else if (a[index][1] == 's') + { + aMaxSeg = Draw::Atoi(a[index + 1]); + Projector.SetMaxSeg(aMaxSeg); + } + else if (!strcmp(a[index], "-2d")) + { + aProj2d = Draw::Atoi(a[index + 1]) > 0 ? Standard_True : Standard_False; + Projector.SetProj2d(aProj2d); + } + else if (!strcmp(a[index], "-3d")) + { + aProj3d = Draw::Atoi(a[index + 1]) > 0 ? Standard_True : Standard_False; + Projector.SetProj3d(aProj3d); + } + + index += 2; + } + + Projector.Perform(); + + for (Standard_Integer k = 1; k <= Projector.NbCurves(); k++) { + newname = name + "_" + TCollection_AsciiString(k); + newname1 = name + "2d_" + TCollection_AsciiString(k); + + if (Projector.ResultIsPoint(k)) + { + if (Projector.GetProj2d()) + { + DrawTrSurf::Set(newname1.ToCString(), Projector.GetResult2dP(k)); + di << newname1 << " is pcurve\n"; } - else if(Projector.IsVIso(k, VIso)) { -// std::cout<<"Part "< Ufin) { - Dir = gp_Dir2d(-1, 0); - Udeb = - Udeb; - Ufin = - Ufin; - } - else Dir = gp_Dir2d(1, 0); - PCur2d = new Geom2d_TrimmedCurve(new Geom2d_Line(gp_Pnt2d(0, VIso), Dir), Udeb, Ufin); - HPCur = new Geom2dAdaptor_Curve(PCur2d); - Only3d = Standard_True; + if (Projector.GetProj3d()) + { + DrawTrSurf::Set(newname.ToCString(), Projector.GetResult3dP(k)); + di << newname << " is 3d projected curve\n"; } - else HPCur = HProjector; - - if(Projector.MaxDistance(k) <= myTol3d) - Only2d = Standard_True; - - if(Only2d && Only3d) { - Handle(Geom_Curve) OutCur = new Geom_TrimmedCurve (GeomAdaptor::MakeCurve (*hcur), Ufin, Udeb); - DrawTrSurf::Set(temp, OutCur); - DrawTrSurf::Set(temp1, PCur2d); - di< #include #include +#include #include #include #include #include #include #include +#include #include #include #include @@ -39,13 +41,21 @@ #include #include #include +#include #include #include +#include +#include +#include #include +#include #include +#include #include #include +#include + #define FuncTol 1.e-10 IMPLEMENT_STANDARD_RTTIEXT(ProjLib_CompProjectedCurve, Adaptor2d_Curve2d) @@ -537,7 +547,8 @@ static Standard_Boolean InitialPoint(const gp_Pnt& Point, const Standard_Real TolU, const Standard_Real TolV, Standard_Real& U, - Standard_Real& V) + Standard_Real& V, + Standard_Real theMaxDist) { ProjLib_PrjResolve aPrjPS (*C, *S, 1); @@ -549,6 +560,11 @@ static Standard_Boolean InitialPoint(const gp_Pnt& Point, aExtPS.Perform(Point); Standard_Integer argmin = 0; + Standard_Real aMaxDist = theMaxDist; + if (aMaxDist > 0.) + { + aMaxDist *= aMaxDist; + } if (aExtPS.IsDone() && aExtPS.NbExt()) { Standard_Integer i, Nend; @@ -556,6 +572,10 @@ static Standard_Boolean InitialPoint(const gp_Pnt& Point, Nend = aExtPS.NbExt(); for(i = 1; i <= Nend; i++) { + if (aMaxDist > 0. && aMaxDist < aExtPS.SquareDistance(i)) + { + continue; + } Extrema_POnSurf POnS = aExtPS.Point(i); POnS.Parameter(ParU, ParV); aPrjPS.Perform(t, ParU, ParV, gp_Pnt2d(TolU, TolV), @@ -582,9 +602,9 @@ static Standard_Boolean InitialPoint(const gp_Pnt& Point, ProjLib_CompProjectedCurve::ProjLib_CompProjectedCurve() : myNbCurves(0), + myMaxDist (0.0), myTolU (0.0), - myTolV (0.0), - myMaxDist (0.0) + myTolV (0.0) { } @@ -598,13 +618,19 @@ ProjLib_CompProjectedCurve::ProjLib_CompProjectedCurve const Handle(Adaptor3d_Curve)& theCurve, const Standard_Real theTolU, const Standard_Real theTolV) -: mySurface (theSurface), - myCurve (theCurve), - myNbCurves(0), - mySequence(new ProjLib_HSequenceOfHSequenceOfPnt()), - myTolU (theTolU), - myTolV (theTolV), - myMaxDist (-1.0) +: mySurface (theSurface), + myCurve (theCurve), + myNbCurves (0), + mySequence (new ProjLib_HSequenceOfHSequenceOfPnt()), + myTol3d (1.e-6), + myContinuity(GeomAbs_C2), + myMaxDegree (14), + myMaxSeg (16), + myProj2d (Standard_True), + myProj3d (Standard_False), + myMaxDist (-1.0), + myTolU (theTolU), + myTolV (theTolV) { Init(); } @@ -620,17 +646,51 @@ ProjLib_CompProjectedCurve::ProjLib_CompProjectedCurve const Standard_Real theTolU, const Standard_Real theTolV, const Standard_Real theMaxDist) -: mySurface (theSurface), - myCurve (theCurve), - myNbCurves(0), - mySequence(new ProjLib_HSequenceOfHSequenceOfPnt()), - myTolU (theTolU), - myTolV (theTolV), - myMaxDist (theMaxDist) +: mySurface (theSurface), + myCurve (theCurve), + myNbCurves (0), + mySequence (new ProjLib_HSequenceOfHSequenceOfPnt()), + myTol3d (1.e-6), + myContinuity(GeomAbs_C2), + myMaxDegree (14), + myMaxSeg (16), + myProj2d (Standard_True), + myProj3d (Standard_False), + myMaxDist (theMaxDist), + myTolU (theTolU), + myTolV (theTolV) { Init(); } +//======================================================================= +//function : ProjLib_CompProjectedCurve +//purpose : +//======================================================================= + +ProjLib_CompProjectedCurve::ProjLib_CompProjectedCurve + (const Standard_Real theTol3d, + const Handle(Adaptor3d_Surface)& theSurface, + const Handle(Adaptor3d_Curve)& theCurve, + const Standard_Real theMaxDist) +: mySurface (theSurface), + myCurve (theCurve), + myNbCurves (0), + mySequence (new ProjLib_HSequenceOfHSequenceOfPnt()), + myTol3d (theTol3d), + myContinuity(GeomAbs_C2), + myMaxDegree (14), + myMaxSeg (16), + myProj2d (Standard_True), + myProj3d (Standard_False), + myMaxDist (theMaxDist) +{ + myTolU = Max(Precision::PConfusion(), mySurface->UResolution(theTol3d)); + myTolV = Max(Precision::PConfusion(), mySurface->VResolution(theTol3d)); + + Init(); +} + //======================================================================= //function : ShallowCopy //purpose : @@ -774,7 +834,7 @@ void ProjLib_CompProjectedCurve::Init() InitChron(chr_init_point); #endif // PConfusion - use geometric tolerances in extrema / optimization. - initpoint=InitialPoint(CPoint, t,myCurve,mySurface, Precision::PConfusion(), Precision::PConfusion(), U, V); + initpoint=InitialPoint(CPoint, t, myCurve, mySurface, myTolU, myTolV, U, V, myMaxDist); #ifdef OCCT_DEBUG_CHRONO ResultChron(chr_init_point,t_init_point); init_point_count++; @@ -1164,6 +1224,239 @@ void ProjLib_CompProjectedCurve::Init() } } } + +//======================================================================= +//function : Perform +//purpose : +//======================================================================= +void ProjLib_CompProjectedCurve::Perform() +{ + if (myNbCurves == 0) + return; + + Standard_Boolean approx2d = myProj2d; + Standard_Boolean approx3d = myProj3d; + Standard_Real Udeb, Ufin, UIso, VIso; + gp_Pnt2d P2d, Pdeb, Pfin; + gp_Pnt P; + Handle(Adaptor2d_Curve2d) HPCur; + Handle(Adaptor3d_Surface) HS = mySurface->ShallowCopy(); // For expand bounds of surface + Handle(Geom2d_Curve) PCur2d; // Only for isoparametric projection + Handle(Geom_Curve) PCur3d; + + if (myProj2d == Standard_True) + { + myResult2dPoint = new TColgp_HArray1OfPnt2d(1, myNbCurves); + myResult2dCurve = new TColGeom2d_HArray1OfCurve(1, myNbCurves); + } + + if (myProj3d == Standard_True) + { + myResult3dPoint = new TColgp_HArray1OfPnt(1, myNbCurves); + myResult3dCurve = new TColGeom_HArray1OfCurve(1, myNbCurves); + } + + myResultIsPoint = new TColStd_HArray1OfBoolean(1, myNbCurves); + myResultIsPoint->Init(Standard_False); + + myResult3dApproxError = new TColStd_HArray1OfReal(1, myNbCurves); + myResult3dApproxError->Init(0.0); + + myResult2dUApproxError = new TColStd_HArray1OfReal(1, myNbCurves); + myResult2dUApproxError->Init(0.0); + + myResult2dVApproxError = new TColStd_HArray1OfReal(1, myNbCurves); + myResult2dVApproxError->Init(0.0); + + for (Standard_Integer k = 1; k <= myNbCurves; k++) + { + if (IsSinglePnt(k, P2d)) // Part k of the projection is punctual + { + GetSurface()->D0(P2d.X(), P2d.Y(), P); + if (myProj2d == Standard_True) + { + myResult2dPoint->SetValue(k, P2d); + } + if (myProj3d == Standard_True) + { + myResult3dPoint->SetValue(k, P); + } + myResultIsPoint->SetValue(k, Standard_True); + } + else + { + Bounds(k, Udeb, Ufin); + gp_Dir2d Dir; // Only for isoparametric projection + + if (IsUIso(k, UIso)) // Part k of the projection is U-isoparametric curve + { + approx2d = Standard_False; + + D0(Udeb, Pdeb); + D0(Ufin, Pfin); + Udeb = Pdeb.Y(); + Ufin = Pfin.Y(); + if (Udeb > Ufin) + { + Dir = gp_Dir2d(0, -1); + Udeb = -Udeb; + Ufin = -Ufin; + } + else Dir = gp_Dir2d(0, 1); + PCur2d = new Geom2d_TrimmedCurve(new Geom2d_Line(gp_Pnt2d(UIso, 0), Dir), Udeb, Ufin); + HPCur = new Geom2dAdaptor_Curve(PCur2d); + } + else if (IsVIso(k, VIso)) // Part k of the projection is V-isoparametric curve + { + approx2d = Standard_False; + + D0(Udeb, Pdeb); + D0(Ufin, Pfin); + Udeb = Pdeb.X(); + Ufin = Pfin.X(); + if (Udeb > Ufin) + { + Dir = gp_Dir2d(-1, 0); + Udeb = -Udeb; + Ufin = -Ufin; + } + else Dir = gp_Dir2d(1, 0); + PCur2d = new Geom2d_TrimmedCurve(new Geom2d_Line(gp_Pnt2d(0, VIso), Dir), Udeb, Ufin); + HPCur = new Geom2dAdaptor_Curve(PCur2d); + } + else + { + if (!mySurface->IsUPeriodic()) + { + Standard_Real U1, U2; + Standard_Real dU = 10. * myTolU; + + U1 = mySurface->FirstUParameter(); + U2 = mySurface->LastUParameter(); + U1 -= dU; + U2 += dU; + + HS = HS->UTrim(U1, U2, 0.0); + } + + if (!mySurface->IsVPeriodic()) + { + Standard_Real V1, V2; + Standard_Real dV = 10. * myTolV; + + V1 = mySurface->FirstVParameter(); + V2 = mySurface->LastVParameter(); + V1 -= dV; + V2 += dV; + + HS = HS->VTrim(V1, V2, 0.0); + } + + Handle(ProjLib_CompProjectedCurve) HP = Handle(ProjLib_CompProjectedCurve)::DownCast(this->ShallowCopy()); + HP->Load(HS); + HPCur = HP; + } + + if (approx2d || approx3d) + { + Standard_Boolean only2d, only3d; + if (approx2d && approx3d) + { + only2d = !approx2d; + only3d = !approx3d; + } + else + { + only2d = approx2d; + only3d = approx3d; + } + + Approx_CurveOnSurface appr(HPCur, HS, Udeb, Ufin, myTol3d); + appr.Perform(myMaxSeg, myMaxDegree, myContinuity, only3d, only2d); + + if (approx2d) + { + PCur2d = appr.Curve2d(); + myResult2dUApproxError->SetValue(k, appr.MaxError2dU()); + myResult2dVApproxError->SetValue(k, appr.MaxError2dV()); + } + + if (approx3d) + { + PCur3d = appr.Curve3d(); + myResult3dApproxError->SetValue(k, appr.MaxError3d()); + } + } + + if (myProj2d == Standard_True) + { + myResult2dCurve->SetValue(k, PCur2d); + } + + if (myProj3d == Standard_True) + { + myResult3dCurve->SetValue(k, PCur3d); + } + } + } +} + +//======================================================================= +//function : SetTol3d +//purpose : +//======================================================================= +void ProjLib_CompProjectedCurve::SetTol3d(const Standard_Real theTol3d) +{ + myTol3d = theTol3d; +} + +//======================================================================= +//function : SetContinuity +//purpose : +//======================================================================= +void ProjLib_CompProjectedCurve::SetContinuity(const GeomAbs_Shape theContinuity) +{ + myContinuity = theContinuity; +} + +//======================================================================= +//function : SetMaxDegree +//purpose : +//======================================================================= +void ProjLib_CompProjectedCurve::SetMaxDegree(const Standard_Integer theMaxDegree) +{ + if (theMaxDegree < 1) return; + myMaxDegree = theMaxDegree; +} + +//======================================================================= +//function : SetMaxSeg +//purpose : +//======================================================================= +void ProjLib_CompProjectedCurve::SetMaxSeg(const Standard_Integer theMaxSeg) +{ + if (theMaxSeg < 1) return; + myMaxSeg = theMaxSeg; +} + +//======================================================================= +//function : SetProj3d +//purpose : +//======================================================================= +void ProjLib_CompProjectedCurve::SetProj3d(const Standard_Boolean theProj3d) +{ + myProj3d = theProj3d; +} + +//======================================================================= +//function : SetProj2d +//purpose : +//======================================================================= +void ProjLib_CompProjectedCurve::SetProj2d(const Standard_Boolean theProj2d) +{ + myProj2d = theProj2d; +} + //======================================================================= //function : Load //purpose : @@ -1379,7 +1672,7 @@ void ProjLib_CompProjectedCurve::D0(const Standard_Real U,gp_Pnt2d& P) const ProjLib_PrjResolve aPrjPS (*myCurve, *mySurface, 1); aPrjPS.Perform(U, U0, V0, gp_Pnt2d(myTolU, myTolV), gp_Pnt2d(mySurface->FirstUParameter(), mySurface->FirstVParameter()), - gp_Pnt2d(mySurface->LastUParameter(), mySurface->LastVParameter())); + gp_Pnt2d(mySurface->LastUParameter(), mySurface->LastVParameter()), FuncTol); if (aPrjPS.IsDone()) P = aPrjPS.Solution(); else @@ -1627,7 +1920,7 @@ void ProjLib_CompProjectedCurve::BuildIntervals(const GeomAbs_Shape S) const Solver.Perform((Tl + Tr)/2, CutPntsU(k), V, gp_Pnt2d(Tol, myTolV), gp_Pnt2d(Tl, mySurface->FirstVParameter()), - gp_Pnt2d(Tr, mySurface->LastVParameter())); + gp_Pnt2d(Tr, mySurface->LastVParameter()), FuncTol); // if(Solver.IsDone()) { @@ -1693,7 +1986,7 @@ void ProjLib_CompProjectedCurve::BuildIntervals(const GeomAbs_Shape S) const Solver.Perform((Tl + Tr)/2, U, CutPntsV(k), gp_Pnt2d(Tol, myTolV), gp_Pnt2d(Tl, mySurface->FirstUParameter()), - gp_Pnt2d(Tr, mySurface->LastUParameter())); + gp_Pnt2d(Tr, mySurface->LastUParameter()), FuncTol); // if(Solver.IsDone()) { @@ -1795,6 +2088,91 @@ GeomAbs_CurveType ProjLib_CompProjectedCurve::GetType() const return GeomAbs_OtherCurve; } +//======================================================================= +//function : ResultIsPoint +//purpose : +//======================================================================= + +Standard_Boolean ProjLib_CompProjectedCurve::ResultIsPoint(const Standard_Integer theIndex) const +{ + return myResultIsPoint->Value(theIndex); +} + +//======================================================================= +//function : GetResult2dUApproxError +//purpose : +//======================================================================= + +Standard_Real ProjLib_CompProjectedCurve::GetResult2dUApproxError(const Standard_Integer theIndex) const +{ + return myResult2dUApproxError->Value(theIndex); +} + +//======================================================================= +//function : GetResult2dVApproxError +//purpose : +//======================================================================= + +Standard_Real ProjLib_CompProjectedCurve::GetResult2dVApproxError(const Standard_Integer theIndex) const +{ + return myResult2dVApproxError->Value(theIndex); +} + +//======================================================================= +//function : GetResult3dApproxError +//purpose : +//======================================================================= + +Standard_Real ProjLib_CompProjectedCurve::GetResult3dApproxError(const Standard_Integer theIndex) const +{ + return myResult3dApproxError->Value(theIndex); +} + +//======================================================================= +//function : GetResult2dC +//purpose : +//======================================================================= + +Handle(Geom2d_Curve) ProjLib_CompProjectedCurve::GetResult2dC(const Standard_Integer theIndex) const +{ + return myResult2dCurve->Value(theIndex); +} + +//======================================================================= +//function : GetResult3dC +//purpose : +//======================================================================= + +Handle(Geom_Curve) ProjLib_CompProjectedCurve::GetResult3dC(const Standard_Integer theIndex) const +{ + return myResult3dCurve->Value(theIndex); +} + + +//======================================================================= +//function : GetResult2dP +//purpose : +//======================================================================= + +gp_Pnt2d ProjLib_CompProjectedCurve::GetResult2dP(const Standard_Integer theIndex) const +{ + Standard_TypeMismatch_Raise_if(!myResultIsPoint->Value(theIndex), + "ProjLib_CompProjectedCurve : result is not a point 2d"); + return myResult2dPoint->Value(theIndex); +} + +//======================================================================= +//function : GetResult3dP +//purpose : +//======================================================================= + +gp_Pnt ProjLib_CompProjectedCurve::GetResult3dP(const Standard_Integer theIndex) const +{ + Standard_TypeMismatch_Raise_if(!myResultIsPoint->Value(theIndex), + "ProjLib_CompProjectedCurve : result is not a point 3d"); + return myResult3dPoint->Value(theIndex); +} + //======================================================================= //function : UpdateTripleByTrapCriteria //purpose : @@ -1834,7 +2212,7 @@ void ProjLib_CompProjectedCurve::UpdateTripleByTrapCriteria(gp_Pnt &thePoint) co Standard_Real U,V; Standard_Boolean isDone = InitialPoint(myCurve->Value(thePoint.X()), thePoint.X(), myCurve, mySurface, - Precision::PConfusion(), Precision::PConfusion(), U, V); + Precision::PConfusion(), Precision::PConfusion(), U, V, myMaxDist); if (!isDone) return; diff --git a/src/ProjLib/ProjLib_CompProjectedCurve.hxx b/src/ProjLib/ProjLib_CompProjectedCurve.hxx index 0838670521..8c5fa21640 100644 --- a/src/ProjLib/ProjLib_CompProjectedCurve.hxx +++ b/src/ProjLib/ProjLib_CompProjectedCurve.hxx @@ -20,8 +20,15 @@ #include #include #include +#include +#include +#include +#include +#include #include #include +#include +#include #include #include #include @@ -44,6 +51,13 @@ public: //! equal then MaxDist. //! if MaxDist < 0 then algorithm works as above. Standard_EXPORT ProjLib_CompProjectedCurve(const Handle(Adaptor3d_Surface)& S, const Handle(Adaptor3d_Curve)& C, const Standard_Real TolU, const Standard_Real TolV, const Standard_Real MaxDist); + + //! this constructor tries to optimize the search using the + //! assumption that maximum distance between surface and curve less or + //! equal then MaxDist. + //! if MaxDist < 0 then algorithm try to find all solutions + //! Tolerances of parameters are calculated automatically. + Standard_EXPORT ProjLib_CompProjectedCurve(const Standard_Real Tol3d, const Handle(Adaptor3d_Surface)& S, const Handle(Adaptor3d_Curve)& C, const Standard_Real MaxDist = -1.0); //! Shallow copy of adaptor Standard_EXPORT virtual Handle(Adaptor2d_Curve2d) ShallowCopy() const Standard_OVERRIDE; @@ -54,6 +68,35 @@ public: //! included in this set of points. Standard_EXPORT void Init(); + //! Performs projecting for given curve. + //! If projecting uses approximation, + //! approximation parameters can be set before by corresponding methods + //! SetTol3d(...), SeContinuity(...), SetMaxDegree(...), SetMaxSeg(...) + Standard_EXPORT void Perform(); + + //! Set the parameter, which defines 3d tolerance of approximation. + Standard_EXPORT void SetTol3d(const Standard_Real theTol3d); + + //! Set the parameter, which defines curve continuity. + //! Default value is GeomAbs_C2; + Standard_EXPORT void SetContinuity(const GeomAbs_Shape theContinuity); + + //! Set max possible degree of result BSpline curve2d, which is got by approximation. + //! If MaxDegree < 0, algorithm uses values that are chosen depending of types curve 3d + //! and surface. + Standard_EXPORT void SetMaxDegree(const Standard_Integer theMaxDegree); + + //! Set the parameter, which defines maximal value of parametric intervals the projected + //! curve can be cut for approximation. If MaxSeg < 0, algorithm uses default + //! value = 16. + Standard_EXPORT void SetMaxSeg(const Standard_Integer theMaxSeg); + + //! Set the parameter, which defines necessity of 2d results. + Standard_EXPORT void SetProj2d(const Standard_Boolean theProj2d); + + //! Set the parameter, which defines necessity of 3d results. + Standard_EXPORT void SetProj3d(const Standard_Boolean theProj3d); + //! Changes the surface. Standard_EXPORT void Load (const Handle(Adaptor3d_Surface)& S); @@ -143,6 +186,44 @@ public: //! Parabola, BezierCurve, BSplineCurve, OtherCurve. Standard_EXPORT GeomAbs_CurveType GetType() const Standard_OVERRIDE; + //! Returns true if result of projecting of the curve interval + //! with number Index is point. + Standard_EXPORT Standard_Boolean ResultIsPoint(const Standard_Integer theIndex) const; + + //! Returns the error of approximation of U parameter 2d-curve as a result + //! projecting of the curve interval with number Index. + Standard_EXPORT Standard_Real GetResult2dUApproxError(const Standard_Integer theIndex) const; + + //! Returns the error of approximation of V parameter 2d-curve as a result + //! projecting of the curve interval with number Index. + Standard_EXPORT Standard_Real GetResult2dVApproxError(const Standard_Integer theIndex) const; + + //! Returns the error of approximation of 3d-curve as a result + //! projecting of the curve interval with number Index. + Standard_EXPORT Standard_Real GetResult3dApproxError(const Standard_Integer theIndex) const; + + //! Returns the resulting 2d-curve of projecting + //! of the curve interval with number Index. + Standard_EXPORT Handle(Geom2d_Curve) GetResult2dC(const Standard_Integer theIndex) const; + + //! Returns the resulting 3d-curve of projecting + //! of the curve interval with number Index. + Standard_EXPORT Handle(Geom_Curve) GetResult3dC(const Standard_Integer theIndex) const; + + //! Returns the resulting 2d-point of projecting + //! of the curve interval with number Index. + Standard_EXPORT gp_Pnt2d GetResult2dP(const Standard_Integer theIndex) const; + + //! Returns the resulting 3d-point of projecting + //! of the curve interval with number Index. + Standard_EXPORT gp_Pnt GetResult3dP(const Standard_Integer theIndex) const; + + //! Returns the parameter, which defines necessity of only 2d results. + Standard_Boolean GetProj2d() const { return myProj2d; } + + //! Returns the parameter, which defines necessity of only 3d results. + Standard_Boolean GetProj3d() const { return myProj3d; } + private: //! This method performs check possibility of optimization traps and tries to go out from them. @@ -157,14 +238,29 @@ private: Handle(Adaptor3d_Curve) myCurve; Standard_Integer myNbCurves; Handle(ProjLib_HSequenceOfHSequenceOfPnt) mySequence; - Standard_Real myTolU; - Standard_Real myTolV; - Standard_Real myMaxDist; Handle(TColStd_HArray1OfBoolean) myUIso; Handle(TColStd_HArray1OfBoolean) myVIso; Handle(TColStd_HArray1OfBoolean) mySnglPnts; Handle(TColStd_HArray1OfReal) myMaxDistance; Handle(TColStd_HArray1OfReal) myTabInt; + Standard_Real myTol3d; + GeomAbs_Shape myContinuity; + Standard_Integer myMaxDegree; + Standard_Integer myMaxSeg; + Standard_Boolean myProj2d; + Standard_Boolean myProj3d; + Standard_Real myMaxDist; + Standard_Real myTolU; + Standard_Real myTolV; + + Handle(TColStd_HArray1OfBoolean) myResultIsPoint; + Handle(TColStd_HArray1OfReal) myResult2dUApproxError; + Handle(TColStd_HArray1OfReal) myResult2dVApproxError; + Handle(TColStd_HArray1OfReal) myResult3dApproxError; + Handle(TColgp_HArray1OfPnt) myResult3dPoint; + Handle(TColgp_HArray1OfPnt2d) myResult2dPoint; + Handle(TColGeom_HArray1OfCurve) myResult3dCurve; + Handle(TColGeom2d_HArray1OfCurve) myResult2dCurve; }; DEFINE_STANDARD_HANDLE(ProjLib_CompProjectedCurve, Adaptor2d_Curve2d) diff --git a/src/ProjLib/ProjLib_PrjResolve.cxx b/src/ProjLib/ProjLib_PrjResolve.cxx index abd0f3ea8d..2ab6b58fd7 100644 --- a/src/ProjLib/ProjLib_PrjResolve.cxx +++ b/src/ProjLib/ProjLib_PrjResolve.cxx @@ -81,7 +81,7 @@ ProjLib_PrjResolve::ProjLib_PrjResolve(const Adaptor3d_Curve& C,const Adaptor3d_ // if (!S1.IsDone()) { return; } // } // else { - math_NewtonFunctionSetRoot SR (F, Tol, 1.e-10); + math_NewtonFunctionSetRoot SR (F, Tol, FuncTol); SR.Perform(F, Start, BInf, BSup); // if (!SR.IsDone()) { return; } if (!SR.IsDone()) @@ -100,8 +100,8 @@ ProjLib_PrjResolve::ProjLib_PrjResolve(const Adaptor3d_Curve& C,const Adaptor3d_ Standard_Real ExtraU , ExtraV; // if(!StrictInside) { - ExtraU = Tol2d.X(); - ExtraV = Tol2d.Y(); + ExtraU = 2. * Tol2d.X(); + ExtraV = 2. * Tol2d.Y(); // } if (mySolution.X() > Inf.X() - Tol2d.X() && mySolution.X() < Inf.X()) mySolution.SetX(Inf.X()); if (mySolution.X() > Sup.X() && mySolution.X() < Sup.X() + Tol2d.X()) mySolution.SetX(Sup.X()); @@ -119,7 +119,9 @@ ProjLib_PrjResolve::ProjLib_PrjResolve(const Adaptor3d_Curve& C,const Adaptor3d_ F.Value(X, FVal); - if ((FVal(1)*FVal(1) + FVal(2)*FVal(2)) > FuncTol) myDone = Standard_False; + if (!SR.IsDone()) { + if ((FVal(1)*FVal(1) + FVal(2)*FVal(2)) > FuncTol) myDone = Standard_False; + } } diff --git a/tests/bugs/modalg_5/bug25980 b/tests/bugs/modalg_5/bug25980 index 30ea9566af..1d711a815b 100644 --- a/tests/bugs/modalg_5/bug25980 +++ b/tests/bugs/modalg_5/bug25980 @@ -1,5 +1,3 @@ -puts "REQUIRED All: Projection Failed" - puts "========" puts "OCC25980" puts "========" @@ -13,7 +11,6 @@ restore [locate_data_file s1t.draw] s set bug_info [catch {project x c s}] -# Projection should fail due to big distance of projection at curve beginning -if {$bug_info == 0} { +if {$bug_info == 1} { puts "ERROR: OCC25980 is reproduced." } diff --git a/tests/bugs/modalg_7/bug24185 b/tests/bugs/modalg_7/bug24185 index 671537ef6d..6868c32de6 100644 --- a/tests/bugs/modalg_7/bug24185 +++ b/tests/bugs/modalg_7/bug24185 @@ -1,5 +1,3 @@ -puts "TODO OCC24185 ALL: Error : The length of result shape is" - puts "========" puts "OCC24185" puts "========" @@ -11,7 +9,7 @@ puts "" restore [locate_data_file bug24185_face.brep] f restore [locate_data_file bug24185_wire.brep] w -nproject result w f +nproject result w f 1.e-4 1 checkshape result checkprops result -l 11.06 diff --git a/tests/bugs/moddata_3/bug30046 b/tests/bugs/moddata_3/bug30046 new file mode 100644 index 0000000000..3e422bbafd --- /dev/null +++ b/tests/bugs/moddata_3/bug30046 @@ -0,0 +1,65 @@ +puts "================" +puts "0030046: Modeling Data - Cannot find necessary projection of the curve" +puts "================" +puts "" + +set BugNumber OCC30046 + +restore [locate_data_file bug30046_cur.brep] c +restore [locate_data_file bug30046_sur.brep] s + +gproject result c s 1.e-3 -2d 1 -3d 1 +gproject result_maxdist c s 1.e-7 2. -2d 1 -3d 1 + +regexp {is ([-0-9.+eE]+)} [length result2d_1] full ll +set len_result2d $ll + +regexp {is ([-0-9.+eE]+)} [length result_maxdist2d_1] full ll +set len_result_maxdist2d $ll + +if {$len_result2d < $len_result_maxdist2d} { + puts "Faulty ${BugNumber}: length of a 2d projection, built with a smaller tolerance, must be less"; +} + +regexp {is ([-0-9.+eE]+)} [length result_1] full ll +set len_result $ll + +regexp {is ([-0-9.+eE]+)} [length result_maxdist_1] full ll +set len_result_maxdist $ll + +if {$len_result < $len_result_maxdist} { + puts "Faulty ${BugNumber}: length of a 3d projection, built with a smaller tolerance, must be less"; +} + +set tol_abs 1.0e-4 +set tol_rel 0.0001 + +set bounds_result2d_1 [gbounding result2d_1] +regexp { *([-0-9.+eE]+) +([-0-9.+eE]+) +([-0-9.+eE]+) +([-0-9.+eE]+)} $bounds_result2d_1 full v1_x v1_y v2_x v2_y + +set expected_v1_x 0.050141663706179646 +checkreal "v1_x" ${v1_x} ${expected_v1_x} ${tol_abs} ${tol_rel} + +set expected_v1_y 0.00039517687539122789 +checkreal "v1_y" ${v1_y} ${expected_v1_y} ${tol_abs} ${tol_rel} + +set expected_v2_x 0.24709337491832356 +checkreal "v2_x" ${v2_x} ${expected_v2_x} ${tol_abs} ${tol_rel} + +set expected_v2_y 0.00044697332650299172 +checkreal "v2_y" ${v2_y} ${expected_v2_y} ${tol_abs} ${tol_rel} + +set bounds_result_maxdist_1 [gbounding result_maxdist2d_1] +regexp { *([-0-9.+eE]+) +([-0-9.+eE]+) +([-0-9.+eE]+) +([-0-9.+eE]+)} $bounds_result_maxdist_1 full v1_x v1_y v2_x v2_y + +set expected_v1_x 0.050141663706179958 +checkreal "v1_x" ${v1_x} ${expected_v1_x} ${tol_abs} ${tol_rel} + +set expected_v1_y 0.00039517687539122805 +checkreal "v1_y" ${v1_y} ${expected_v1_y} ${tol_abs} ${tol_rel} + +set expected_v2_x 0.24708119728076677 +checkreal "v2_x" ${v2_x} ${expected_v2_x} ${tol_abs} ${tol_rel} + +set expected_v2_y 0.00044696841766235214 +checkreal "v2_y" ${v2_y} ${expected_v2_y} ${tol_abs} ${tol_rel} \ No newline at end of file From 209ae313a50ad351c8b11e39596ba5e04ed2d0b4 Mon Sep 17 00:00:00 2001 From: asuraven Date: Fri, 29 Jan 2021 11:31:33 +0300 Subject: [PATCH 112/639] 0032031: Analyze Precise HLR behaviour in Draw/AIS - Set "Algo" as default HLR algorithm in MFC HLR sample --- samples/mfc/standard/08_HLR/src/SelectionDialog.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/samples/mfc/standard/08_HLR/src/SelectionDialog.cpp b/samples/mfc/standard/08_HLR/src/SelectionDialog.cpp index b0f275ec18..d7a44fc4ca 100644 --- a/samples/mfc/standard/08_HLR/src/SelectionDialog.cpp +++ b/samples/mfc/standard/08_HLR/src/SelectionDialog.cpp @@ -27,7 +27,7 @@ CSelectionDialog::CSelectionDialog (CHLRDoc* aDoc,CWnd* pParent /*=NULL*/) myDoc = aDoc; myIsDisplayed = false; //{{AFX_DATA_INIT(CSelectionDialog) - m_Algo = 0; + m_Algo = 1; m_DisplayMode = 0; m_NbIsos = 2; m_DrawHiddenLine = TRUE; From f706c128c25b356bfa41ed235620a539321c3b70 Mon Sep 17 00:00:00 2001 From: aml Date: Mon, 25 Oct 2021 07:50:25 +0300 Subject: [PATCH 113/639] 0032641: Coding - get rid of unused forward declarations [IGESAppli to LDOM] --- src/IGESAppli/IGESAppli.hxx | 42 --------------- src/IGESAppli/IGESAppli_ElementResults.hxx | 2 - src/IGESAppli/IGESAppli_FiniteElement.hxx | 1 - src/IGESAppli/IGESAppli_Flow.hxx | 2 - src/IGESAppli/IGESAppli_FlowLineSpec.hxx | 1 - .../IGESAppli_LevelToPWBLayerMap.hxx | 2 - src/IGESAppli/IGESAppli_NodalConstraint.hxx | 1 - src/IGESAppli/IGESAppli_NodalDisplAndRot.hxx | 2 - src/IGESAppli/IGESAppli_NodalResults.hxx | 2 - src/IGESAppli/IGESAppli_Node.hxx | 1 - src/IGESAppli/IGESAppli_PWBArtworkStackup.hxx | 1 - src/IGESAppli/IGESAppli_PipingFlow.hxx | 2 - src/IGESAppli/IGESAppli_ReadWriteModule.hxx | 1 - src/IGESAppli/IGESAppli_ToolDrilledHole.hxx | 1 - .../IGESAppli_ToolElementResults.hxx | 1 - src/IGESAppli/IGESAppli_ToolFiniteElement.hxx | 1 - src/IGESAppli/IGESAppli_ToolFlow.hxx | 1 - src/IGESAppli/IGESAppli_ToolFlowLineSpec.hxx | 1 - src/IGESAppli/IGESAppli_ToolLevelFunction.hxx | 1 - .../IGESAppli_ToolLevelToPWBLayerMap.hxx | 1 - src/IGESAppli/IGESAppli_ToolLineWidening.hxx | 1 - .../IGESAppli_ToolNodalConstraint.hxx | 1 - .../IGESAppli_ToolNodalDisplAndRot.hxx | 1 - src/IGESAppli/IGESAppli_ToolNodalResults.hxx | 1 - src/IGESAppli/IGESAppli_ToolNode.hxx | 1 - .../IGESAppli_ToolPWBArtworkStackup.hxx | 1 - .../IGESAppli_ToolPWBDrilledHole.hxx | 1 - src/IGESAppli/IGESAppli_ToolPartNumber.hxx | 1 - src/IGESAppli/IGESAppli_ToolPinNumber.hxx | 1 - src/IGESAppli/IGESAppli_ToolPipingFlow.hxx | 1 - .../IGESAppli_ToolReferenceDesignator.hxx | 1 - .../IGESAppli_ToolRegionRestriction.hxx | 1 - src/IGESBasic/IGESBasic.hxx | 41 -------------- .../IGESBasic_ExternalRefFileIndex.hxx | 3 -- .../IGESBasic_ExternalReferenceFile.hxx | 1 - src/IGESBasic/IGESBasic_Group.hxx | 2 - src/IGESBasic/IGESBasic_GroupWithoutBackP.hxx | 1 - src/IGESBasic/IGESBasic_OrderedGroup.hxx | 1 - .../IGESBasic_OrderedGroupWithoutBackP.hxx | 1 - src/IGESBasic/IGESBasic_ReadWriteModule.hxx | 1 - src/IGESBasic/IGESBasic_SingleParent.hxx | 1 - src/IGESBasic/IGESBasic_SingularSubfigure.hxx | 1 - src/IGESBasic/IGESBasic_SubfigureDef.hxx | 2 - .../IGESBasic_ToolAssocGroupType.hxx | 1 - .../IGESBasic_ToolExternalRefFile.hxx | 1 - .../IGESBasic_ToolExternalRefFileIndex.hxx | 1 - .../IGESBasic_ToolExternalRefFileName.hxx | 1 - .../IGESBasic_ToolExternalRefLibName.hxx | 1 - .../IGESBasic_ToolExternalRefName.hxx | 1 - .../IGESBasic_ToolExternalReferenceFile.hxx | 1 - src/IGESBasic/IGESBasic_ToolGroup.hxx | 2 - .../IGESBasic_ToolGroupWithoutBackP.hxx | 1 - src/IGESBasic/IGESBasic_ToolHierarchy.hxx | 1 - src/IGESBasic/IGESBasic_ToolName.hxx | 1 - src/IGESBasic/IGESBasic_ToolOrderedGroup.hxx | 1 - ...IGESBasic_ToolOrderedGroupWithoutBackP.hxx | 1 - src/IGESBasic/IGESBasic_ToolSingleParent.hxx | 1 - .../IGESBasic_ToolSingularSubfigure.hxx | 1 - src/IGESBasic/IGESBasic_ToolSubfigureDef.hxx | 1 - src/IGESCAFControl/IGESCAFControl.hxx | 2 - src/IGESConvGeom/IGESConvGeom.hxx | 1 - src/IGESConvGeom/IGESConvGeom_GeomBuilder.hxx | 2 - src/IGESData/IGESData.hxx | 39 -------------- src/IGESData/IGESData_FileProtocol.hxx | 1 - src/IGESData/IGESData_FreeFormatEntity.hxx | 2 - src/IGESData/IGESData_IGESDumper.hxx | 1 - src/IGESData/IGESData_IGESEntity.hxx | 6 --- src/IGESData/IGESData_IGESModel.hxx | 3 -- src/IGESData/IGESData_IGESReaderData.hxx | 2 - src/IGESData/IGESData_IGESWriter.hxx | 2 - src/IGESData/IGESData_LevelListEntity.hxx | 1 - src/IGESData/IGESData_ParamCursor.hxx | 1 - src/IGESData/IGESData_ParamReader.hxx | 1 - src/IGESData/IGESData_Protocol.hxx | 1 - src/IGESData/IGESData_ReadWriteModule.hxx | 1 - src/IGESData/IGESData_SingleParentEntity.hxx | 2 - src/IGESData/IGESData_ToolLocation.hxx | 1 - src/IGESData/IGESData_ViewKindEntity.hxx | 1 - src/IGESDefs/IGESDefs.hxx | 19 ------- src/IGESDefs/IGESDefs_AssociativityDef.hxx | 2 - src/IGESDefs/IGESDefs_AttributeDef.hxx | 4 -- src/IGESDefs/IGESDefs_AttributeTable.hxx | 3 -- src/IGESDefs/IGESDefs_GenericData.hxx | 4 -- src/IGESDefs/IGESDefs_MacroDef.hxx | 1 - src/IGESDefs/IGESDefs_ReadWriteModule.hxx | 1 - src/IGESDefs/IGESDefs_TabularData.hxx | 2 - .../IGESDefs_ToolAssociativityDef.hxx | 1 - src/IGESDefs/IGESDefs_ToolAttributeDef.hxx | 1 - src/IGESDefs/IGESDefs_ToolAttributeTable.hxx | 1 - src/IGESDefs/IGESDefs_ToolGenericData.hxx | 1 - src/IGESDefs/IGESDefs_ToolMacroDef.hxx | 1 - src/IGESDefs/IGESDefs_ToolTabularData.hxx | 1 - src/IGESDefs/IGESDefs_ToolUnitsData.hxx | 1 - src/IGESDefs/IGESDefs_UnitsData.hxx | 2 - src/IGESDimen/IGESDimen.hxx | 50 ----------------- src/IGESDimen/IGESDimen_AngularDimension.hxx | 1 - src/IGESDimen/IGESDimen_BasicDimension.hxx | 1 - src/IGESDimen/IGESDimen_CenterLine.hxx | 1 - src/IGESDimen/IGESDimen_CurveDimension.hxx | 1 - src/IGESDimen/IGESDimen_DiameterDimension.hxx | 1 - .../IGESDimen_DimensionDisplayData.hxx | 2 - .../IGESDimen_DimensionedGeometry.hxx | 2 - src/IGESDimen/IGESDimen_FlagNote.hxx | 2 - src/IGESDimen/IGESDimen_GeneralLabel.hxx | 1 - src/IGESDimen/IGESDimen_GeneralNote.hxx | 2 - src/IGESDimen/IGESDimen_GeneralSymbol.hxx | 2 - src/IGESDimen/IGESDimen_LeaderArrow.hxx | 2 - src/IGESDimen/IGESDimen_LinearDimension.hxx | 1 - .../IGESDimen_NewDimensionedGeometry.hxx | 3 -- src/IGESDimen/IGESDimen_NewGeneralNote.hxx | 4 -- src/IGESDimen/IGESDimen_PointDimension.hxx | 1 - src/IGESDimen/IGESDimen_RadiusDimension.hxx | 1 - src/IGESDimen/IGESDimen_ReadWriteModule.hxx | 1 - src/IGESDimen/IGESDimen_Section.hxx | 1 - src/IGESDimen/IGESDimen_SectionedArea.hxx | 3 -- .../IGESDimen_ToolAngularDimension.hxx | 1 - .../IGESDimen_ToolBasicDimension.hxx | 1 - src/IGESDimen/IGESDimen_ToolCenterLine.hxx | 1 - .../IGESDimen_ToolCurveDimension.hxx | 1 - .../IGESDimen_ToolDiameterDimension.hxx | 1 - .../IGESDimen_ToolDimensionDisplayData.hxx | 1 - .../IGESDimen_ToolDimensionTolerance.hxx | 1 - .../IGESDimen_ToolDimensionUnits.hxx | 1 - .../IGESDimen_ToolDimensionedGeometry.hxx | 1 - src/IGESDimen/IGESDimen_ToolFlagNote.hxx | 1 - src/IGESDimen/IGESDimen_ToolGeneralLabel.hxx | 1 - src/IGESDimen/IGESDimen_ToolGeneralNote.hxx | 1 - src/IGESDimen/IGESDimen_ToolGeneralSymbol.hxx | 1 - src/IGESDimen/IGESDimen_ToolLeaderArrow.hxx | 1 - .../IGESDimen_ToolLinearDimension.hxx | 1 - .../IGESDimen_ToolNewDimensionedGeometry.hxx | 1 - .../IGESDimen_ToolNewGeneralNote.hxx | 1 - .../IGESDimen_ToolOrdinateDimension.hxx | 1 - .../IGESDimen_ToolPointDimension.hxx | 1 - .../IGESDimen_ToolRadiusDimension.hxx | 1 - src/IGESDimen/IGESDimen_ToolSection.hxx | 1 - src/IGESDimen/IGESDimen_ToolSectionedArea.hxx | 1 - src/IGESDimen/IGESDimen_ToolWitnessLine.hxx | 1 - src/IGESDimen/IGESDimen_WitnessLine.hxx | 1 - src/IGESDraw/IGESDraw.hxx | 32 ----------- src/IGESDraw/IGESDraw_CircArraySubfigure.hxx | 3 -- src/IGESDraw/IGESDraw_ConnectPoint.hxx | 2 - src/IGESDraw/IGESDraw_Drawing.hxx | 3 -- src/IGESDraw/IGESDraw_DrawingWithRotation.hxx | 3 -- src/IGESDraw/IGESDraw_LabelDisplay.hxx | 2 - src/IGESDraw/IGESDraw_NetworkSubfigure.hxx | 2 - src/IGESDraw/IGESDraw_NetworkSubfigureDef.hxx | 2 - src/IGESDraw/IGESDraw_PerspectiveView.hxx | 4 -- src/IGESDraw/IGESDraw_Planar.hxx | 2 - src/IGESDraw/IGESDraw_ReadWriteModule.hxx | 1 - src/IGESDraw/IGESDraw_RectArraySubfigure.hxx | 3 -- .../IGESDraw_SegmentedViewsVisible.hxx | 3 -- .../IGESDraw_ToolCircArraySubfigure.hxx | 1 - src/IGESDraw/IGESDraw_ToolConnectPoint.hxx | 1 - src/IGESDraw/IGESDraw_ToolDrawing.hxx | 1 - .../IGESDraw_ToolDrawingWithRotation.hxx | 1 - src/IGESDraw/IGESDraw_ToolLabelDisplay.hxx | 1 - .../IGESDraw_ToolNetworkSubfigure.hxx | 1 - .../IGESDraw_ToolNetworkSubfigureDef.hxx | 1 - src/IGESDraw/IGESDraw_ToolPerspectiveView.hxx | 1 - src/IGESDraw/IGESDraw_ToolPlanar.hxx | 1 - .../IGESDraw_ToolRectArraySubfigure.hxx | 1 - .../IGESDraw_ToolSegmentedViewsVisible.hxx | 1 - src/IGESDraw/IGESDraw_ToolView.hxx | 1 - src/IGESDraw/IGESDraw_ToolViewsVisible.hxx | 1 - .../IGESDraw_ToolViewsVisibleWithAttr.hxx | 1 - src/IGESDraw/IGESDraw_View.hxx | 2 - src/IGESDraw/IGESDraw_ViewsVisible.hxx | 2 - .../IGESDraw_ViewsVisibleWithAttr.hxx | 3 -- src/IGESGeom/IGESGeom.hxx | 50 ----------------- src/IGESGeom/IGESGeom_BSplineCurve.hxx | 3 -- src/IGESGeom/IGESGeom_BSplineSurface.hxx | 2 - src/IGESGeom/IGESGeom_Boundary.hxx | 3 -- src/IGESGeom/IGESGeom_BoundedSurface.hxx | 2 - src/IGESGeom/IGESGeom_CircularArc.hxx | 1 - src/IGESGeom/IGESGeom_CompositeCurve.hxx | 2 - src/IGESGeom/IGESGeom_ConicArc.hxx | 1 - src/IGESGeom/IGESGeom_CopiousData.hxx | 1 - src/IGESGeom/IGESGeom_CurveOnSurface.hxx | 1 - src/IGESGeom/IGESGeom_Direction.hxx | 1 - src/IGESGeom/IGESGeom_Flash.hxx | 3 -- src/IGESGeom/IGESGeom_Line.hxx | 1 - src/IGESGeom/IGESGeom_OffsetCurve.hxx | 2 - src/IGESGeom/IGESGeom_OffsetSurface.hxx | 2 - src/IGESGeom/IGESGeom_Plane.hxx | 2 - src/IGESGeom/IGESGeom_Point.hxx | 1 - src/IGESGeom/IGESGeom_ReadWriteModule.hxx | 1 - src/IGESGeom/IGESGeom_RuledSurface.hxx | 1 - src/IGESGeom/IGESGeom_SplineCurve.hxx | 2 - src/IGESGeom/IGESGeom_SplineSurface.hxx | 2 - src/IGESGeom/IGESGeom_SurfaceOfRevolution.hxx | 1 - src/IGESGeom/IGESGeom_TabulatedCylinder.hxx | 2 - src/IGESGeom/IGESGeom_ToolBSplineCurve.hxx | 1 - src/IGESGeom/IGESGeom_ToolBSplineSurface.hxx | 1 - src/IGESGeom/IGESGeom_ToolBoundary.hxx | 1 - src/IGESGeom/IGESGeom_ToolBoundedSurface.hxx | 1 - src/IGESGeom/IGESGeom_ToolCircularArc.hxx | 1 - src/IGESGeom/IGESGeom_ToolCompositeCurve.hxx | 1 - src/IGESGeom/IGESGeom_ToolConicArc.hxx | 1 - src/IGESGeom/IGESGeom_ToolCopiousData.hxx | 1 - src/IGESGeom/IGESGeom_ToolCurveOnSurface.hxx | 1 - src/IGESGeom/IGESGeom_ToolDirection.hxx | 1 - src/IGESGeom/IGESGeom_ToolFlash.hxx | 1 - src/IGESGeom/IGESGeom_ToolLine.hxx | 1 - src/IGESGeom/IGESGeom_ToolOffsetCurve.hxx | 1 - src/IGESGeom/IGESGeom_ToolOffsetSurface.hxx | 1 - src/IGESGeom/IGESGeom_ToolPlane.hxx | 1 - src/IGESGeom/IGESGeom_ToolPoint.hxx | 1 - src/IGESGeom/IGESGeom_ToolRuledSurface.hxx | 1 - src/IGESGeom/IGESGeom_ToolSplineCurve.hxx | 1 - src/IGESGeom/IGESGeom_ToolSplineSurface.hxx | 1 - .../IGESGeom_ToolSurfaceOfRevolution.hxx | 1 - .../IGESGeom_ToolTabulatedCylinder.hxx | 1 - .../IGESGeom_ToolTransformationMatrix.hxx | 1 - src/IGESGeom/IGESGeom_ToolTrimmedSurface.hxx | 1 - .../IGESGeom_TransformationMatrix.hxx | 2 - src/IGESGeom/IGESGeom_TrimmedSurface.hxx | 2 - src/IGESGraph/IGESGraph.hxx | 32 ----------- src/IGESGraph/IGESGraph_DefinitionLevel.hxx | 1 - .../IGESGraph_LineFontDefPattern.hxx | 1 - src/IGESGraph/IGESGraph_ReadWriteModule.hxx | 1 - .../IGESGraph_TextDisplayTemplate.hxx | 1 - src/IGESGraph/IGESGraph_TextFontDef.hxx | 2 - src/IGESGraph/IGESGraph_ToolColor.hxx | 1 - .../IGESGraph_ToolDefinitionLevel.hxx | 1 - src/IGESGraph/IGESGraph_ToolDrawingSize.hxx | 1 - src/IGESGraph/IGESGraph_ToolDrawingUnits.hxx | 1 - src/IGESGraph/IGESGraph_ToolHighLight.hxx | 1 - .../IGESGraph_ToolIntercharacterSpacing.hxx | 1 - .../IGESGraph_ToolLineFontDefPattern.hxx | 1 - .../IGESGraph_ToolLineFontDefTemplate.hxx | 1 - .../IGESGraph_ToolLineFontPredefined.hxx | 1 - src/IGESGraph/IGESGraph_ToolNominalSize.hxx | 1 - src/IGESGraph/IGESGraph_ToolPick.hxx | 1 - .../IGESGraph_ToolTextDisplayTemplate.hxx | 1 - src/IGESGraph/IGESGraph_ToolTextFontDef.hxx | 1 - .../IGESGraph_ToolUniformRectGrid.hxx | 1 - src/IGESGraph/IGESGraph_UniformRectGrid.hxx | 1 - src/IGESSelect/IGESSelect.hxx | 46 ---------------- src/IGESSelect/IGESSelect_FloatFormat.hxx | 1 - .../IGESSelect_SelectBypassGroup.hxx | 1 - .../IGESSelect_SelectBypassSubfigure.hxx | 1 - .../IGESSelect_SelectDrawingFrom.hxx | 1 - .../IGESSelect_SelectFromDrawing.hxx | 1 - .../IGESSelect_SelectFromSingleView.hxx | 1 - .../IGESSelect_SelectSingleViewFrom.hxx | 1 - src/IGESSelect/IGESSelect_ViewSorter.hxx | 1 - src/IGESSolid/IGESSolid.hxx | 53 ------------------- src/IGESSolid/IGESSolid_Block.hxx | 1 - src/IGESSolid/IGESSolid_BooleanTree.hxx | 2 - src/IGESSolid/IGESSolid_ConeFrustum.hxx | 1 - src/IGESSolid/IGESSolid_Cylinder.hxx | 1 - src/IGESSolid/IGESSolid_EdgeList.hxx | 3 -- src/IGESSolid/IGESSolid_Ellipsoid.hxx | 1 - src/IGESSolid/IGESSolid_Face.hxx | 2 - src/IGESSolid/IGESSolid_Loop.hxx | 3 -- src/IGESSolid/IGESSolid_ManifoldSolid.hxx | 2 - src/IGESSolid/IGESSolid_ReadWriteModule.hxx | 1 - src/IGESSolid/IGESSolid_RightAngularWedge.hxx | 1 - src/IGESSolid/IGESSolid_SelectedComponent.hxx | 1 - src/IGESSolid/IGESSolid_Shell.hxx | 2 - src/IGESSolid/IGESSolid_SolidAssembly.hxx | 3 -- src/IGESSolid/IGESSolid_SolidInstance.hxx | 1 - .../IGESSolid_SolidOfLinearExtrusion.hxx | 2 - src/IGESSolid/IGESSolid_SolidOfRevolution.hxx | 2 - src/IGESSolid/IGESSolid_Sphere.hxx | 1 - src/IGESSolid/IGESSolid_ToolBlock.hxx | 1 - src/IGESSolid/IGESSolid_ToolBooleanTree.hxx | 1 - src/IGESSolid/IGESSolid_ToolConeFrustum.hxx | 1 - .../IGESSolid_ToolConicalSurface.hxx | 1 - src/IGESSolid/IGESSolid_ToolCylinder.hxx | 1 - .../IGESSolid_ToolCylindricalSurface.hxx | 1 - src/IGESSolid/IGESSolid_ToolEdgeList.hxx | 1 - src/IGESSolid/IGESSolid_ToolEllipsoid.hxx | 1 - src/IGESSolid/IGESSolid_ToolFace.hxx | 1 - src/IGESSolid/IGESSolid_ToolLoop.hxx | 1 - src/IGESSolid/IGESSolid_ToolManifoldSolid.hxx | 1 - src/IGESSolid/IGESSolid_ToolPlaneSurface.hxx | 1 - .../IGESSolid_ToolRightAngularWedge.hxx | 1 - .../IGESSolid_ToolSelectedComponent.hxx | 1 - src/IGESSolid/IGESSolid_ToolShell.hxx | 1 - src/IGESSolid/IGESSolid_ToolSolidAssembly.hxx | 1 - src/IGESSolid/IGESSolid_ToolSolidInstance.hxx | 1 - .../IGESSolid_ToolSolidOfLinearExtrusion.hxx | 1 - .../IGESSolid_ToolSolidOfRevolution.hxx | 1 - src/IGESSolid/IGESSolid_ToolSphere.hxx | 1 - .../IGESSolid_ToolSphericalSurface.hxx | 1 - .../IGESSolid_ToolToroidalSurface.hxx | 1 - src/IGESSolid/IGESSolid_ToolTorus.hxx | 1 - src/IGESSolid/IGESSolid_ToolVertexList.hxx | 1 - src/IGESSolid/IGESSolid_TopoBuilder.hxx | 1 - src/IGESSolid/IGESSolid_Torus.hxx | 1 - src/IGESSolid/IGESSolid_VertexList.hxx | 1 - src/IGESToBRep/IGESToBRep.hxx | 12 ----- src/IGESToBRep/IGESToBRep_BRepEntity.hxx | 1 - src/IGESToBRep/IGESToBRep_BasicCurve.hxx | 1 - src/IGESToBRep/IGESToBRep_BasicSurface.hxx | 1 - src/IGESToBRep/IGESToBRep_IGESBoundary.hxx | 3 -- src/IGESToBRep/IGESToBRep_TopoCurve.hxx | 1 - src/IGESToBRep/IGESToBRep_TopoSurface.hxx | 1 - src/IMeshData/IMeshData_Edge.hxx | 1 - src/IMeshData/IMeshData_Face.hxx | 1 - src/IMeshData/IMeshData_Model.hxx | 2 - src/IMeshData/IMeshData_Wire.hxx | 1 - src/IntAna/IntAna_Int3Pln.hxx | 3 -- src/IntAna/IntAna_IntConicQuad.hxx | 4 -- src/IntAna/IntAna_IntLinTorus.hxx | 3 -- src/IntAna/IntAna_IntQuadQuad.hxx | 5 -- src/IntAna/IntAna_QuadQuadGeo.hxx | 4 -- src/IntAna2d/IntAna2d_AnaIntersection.hxx | 3 -- src/IntAna2d/IntAna2d_IntPoint.hxx | 2 - src/IntCurve/IntCurve_IntConicConic.hxx | 1 - src/IntCurve/IntCurve_PConic.hxx | 1 - .../IntCurveSurface_Intersection.hxx | 2 - .../IntCurveSurface_IntersectionPoint.hxx | 1 - .../IntCurveSurface_IntersectionSegment.hxx | 1 - .../IntCurvesFace_Intersector.hxx | 1 - src/IntImpParGen/IntImpParGen.hxx | 4 -- src/IntPatch/IntPatch_ALine.hxx | 1 - src/IntPatch/IntPatch_GLine.hxx | 2 - src/IntPatch/IntPatch_HCurve2dTool.hxx | 3 -- src/IntPatch/IntPatch_Line.hxx | 2 - src/IntPatch/IntPatch_Point.hxx | 3 -- src/IntPatch/IntPatch_PolyArc.hxx | 1 - src/IntPatch/IntPatch_PolyLine.hxx | 1 - src/IntPatch/IntPatch_Polygo.hxx | 1 - src/IntPatch/IntPatch_RLine.hxx | 2 - src/IntPatch/IntPatch_RstInt.hxx | 1 - src/IntPatch/IntPatch_WLine.hxx | 2 - src/IntPolyh/IntPolyh_MaillageAffinage.hxx | 1 - src/IntPolyh/IntPolyh_Triangle.hxx | 1 - src/IntRes2d/IntRes2d_Domain.hxx | 2 - src/IntRes2d/IntRes2d_Intersection.hxx | 2 - src/IntRes2d/IntRes2d_IntersectionPoint.hxx | 2 - src/IntRes2d/IntRes2d_IntersectionSegment.hxx | 2 - src/IntRes2d/IntRes2d_Transition.hxx | 1 - src/IntSurf/IntSurf_InteriorPoint.hxx | 3 -- src/IntSurf/IntSurf_LineOn2S.hxx | 1 - src/IntSurf/IntSurf_PathPoint.hxx | 5 -- src/IntSurf/IntSurf_PntOn2S.hxx | 1 - src/IntSurf/IntSurf_Transition.hxx | 1 - src/IntTools/IntTools_BeanFaceIntersector.hxx | 2 - src/IntTools/IntTools_CommonPrt.hxx | 3 -- src/IntTools/IntTools_Context.hxx | 1 - src/IntTools/IntTools_EdgeEdge.hxx | 3 -- src/IntTools/IntTools_EdgeFace.hxx | 4 -- src/IntTools/IntTools_FClass2d.hxx | 1 - src/IntTools/IntTools_PntOn2Faces.hxx | 1 - src/IntTools/IntTools_PntOnFace.hxx | 2 - src/IntTools/IntTools_ShrunkRange.hxx | 3 -- src/IntTools/IntTools_SurfaceRangeSample.hxx | 1 - src/IntTools/IntTools_WLineTool.hxx | 1 - src/IntWalk/IntWalk_PWalking.hxx | 1 - src/Interface/Interface_Check.hxx | 2 - src/Interface/Interface_CheckIterator.hxx | 1 - src/Interface/Interface_CheckTool.hxx | 2 - src/Interface/Interface_CopyControl.hxx | 2 - src/Interface/Interface_CopyMap.hxx | 1 - src/Interface/Interface_CopyTool.hxx | 2 - src/Interface/Interface_EntityCluster.hxx | 4 -- src/Interface/Interface_EntityIterator.hxx | 2 - src/Interface/Interface_EntityList.hxx | 4 -- src/Interface/Interface_FileReaderData.hxx | 2 - src/Interface/Interface_FileReaderTool.hxx | 2 - src/Interface/Interface_GTool.hxx | 2 - src/Interface/Interface_GeneralModule.hxx | 1 - src/Interface/Interface_Graph.hxx | 1 - src/Interface/Interface_GraphContent.hxx | 1 - src/Interface/Interface_HGraph.hxx | 2 - src/Interface/Interface_InterfaceModel.hxx | 4 -- src/Interface/Interface_MSG.hxx | 1 - src/Interface/Interface_ParamList.hxx | 3 -- src/Interface/Interface_ParamSet.hxx | 1 - src/Interface/Interface_Protocol.hxx | 2 - src/Interface/Interface_ReaderModule.hxx | 2 - src/Interface/Interface_ReportEntity.hxx | 1 - src/Interface/Interface_ShareFlags.hxx | 2 - src/Interface/Interface_ShareTool.hxx | 2 - src/Interface/Interface_Static.hxx | 2 - src/Interface/Interface_TypedValue.hxx | 2 - src/Interface/Interface_UndefinedContent.hxx | 6 --- src/Intf/Intf.hxx | 8 --- src/Intf/Intf_Interference.hxx | 1 - src/Intf/Intf_InterferencePolygon2d.hxx | 1 - src/Intf/Intf_Polygon2d.hxx | 2 - src/Intf/Intf_SectionLine.hxx | 1 - src/Intf/Intf_SectionPoint.hxx | 1 - src/Intf/Intf_TangentZone.hxx | 1 - src/Intf/Intf_Tool.hxx | 1 - src/Intrv/Intrv_Intervals.hxx | 1 - src/LDOM/LDOM_Attr.hxx | 1 - src/LDOM/LDOM_BasicAttribute.hxx | 3 -- src/LDOM/LDOM_BasicElement.hxx | 3 -- src/LDOM/LDOM_BasicNode.hxx | 2 - src/LDOM/LDOM_BasicText.hxx | 3 -- src/LDOM/LDOM_Document.hxx | 1 - src/LDOM/LDOM_Element.hxx | 1 - src/LDOM/LDOM_MemManager.hxx | 1 - 398 files changed, 1002 deletions(-) diff --git a/src/IGESAppli/IGESAppli.hxx b/src/IGESAppli/IGESAppli.hxx index 1f544e9645..a908a0b797 100644 --- a/src/IGESAppli/IGESAppli.hxx +++ b/src/IGESAppli/IGESAppli.hxx @@ -22,48 +22,6 @@ #include class IGESAppli_Protocol; -class IGESAppli_Node; -class IGESAppli_FiniteElement; -class IGESAppli_NodalDisplAndRot; -class IGESAppli_NodalResults; -class IGESAppli_ElementResults; -class IGESAppli_Flow; -class IGESAppli_PipingFlow; -class IGESAppli_RegionRestriction; -class IGESAppli_LevelFunction; -class IGESAppli_LineWidening; -class IGESAppli_DrilledHole; -class IGESAppli_ReferenceDesignator; -class IGESAppli_PinNumber; -class IGESAppli_PartNumber; -class IGESAppli_FlowLineSpec; -class IGESAppli_LevelToPWBLayerMap; -class IGESAppli_PWBArtworkStackup; -class IGESAppli_PWBDrilledHole; -class IGESAppli_NodalConstraint; -class IGESAppli_ToolNode; -class IGESAppli_ToolFiniteElement; -class IGESAppli_ToolNodalDisplAndRot; -class IGESAppli_ToolNodalResults; -class IGESAppli_ToolElementResults; -class IGESAppli_ToolFlow; -class IGESAppli_ToolPipingFlow; -class IGESAppli_ToolRegionRestriction; -class IGESAppli_ToolLevelFunction; -class IGESAppli_ToolLineWidening; -class IGESAppli_ToolDrilledHole; -class IGESAppli_ToolReferenceDesignator; -class IGESAppli_ToolPinNumber; -class IGESAppli_ToolPartNumber; -class IGESAppli_ToolFlowLineSpec; -class IGESAppli_ToolLevelToPWBLayerMap; -class IGESAppli_ToolPWBArtworkStackup; -class IGESAppli_ToolPWBDrilledHole; -class IGESAppli_ToolNodalConstraint; -class IGESAppli_Protocol; -class IGESAppli_ReadWriteModule; -class IGESAppli_GeneralModule; -class IGESAppli_SpecificModule; //! This package represents collection of miscellaneous diff --git a/src/IGESAppli/IGESAppli_ElementResults.hxx b/src/IGESAppli/IGESAppli_ElementResults.hxx index f265002969..030c1cf391 100644 --- a/src/IGESAppli/IGESAppli_ElementResults.hxx +++ b/src/IGESAppli/IGESAppli_ElementResults.hxx @@ -29,8 +29,6 @@ class IGESDimen_GeneralNote; class IGESBasic_HArray1OfHArray1OfInteger; class IGESBasic_HArray1OfHArray1OfReal; -class Standard_DimensionMismatch; -class Standard_OutOfRange; class IGESAppli_FiniteElement; diff --git a/src/IGESAppli/IGESAppli_FiniteElement.hxx b/src/IGESAppli/IGESAppli_FiniteElement.hxx index 77d59a4ed4..4782f02abb 100644 --- a/src/IGESAppli/IGESAppli_FiniteElement.hxx +++ b/src/IGESAppli/IGESAppli_FiniteElement.hxx @@ -24,7 +24,6 @@ #include #include class TCollection_HAsciiString; -class Standard_OutOfRange; class IGESAppli_Node; diff --git a/src/IGESAppli/IGESAppli_Flow.hxx b/src/IGESAppli/IGESAppli_Flow.hxx index 6d24843dd3..3d479f8852 100644 --- a/src/IGESAppli/IGESAppli_Flow.hxx +++ b/src/IGESAppli/IGESAppli_Flow.hxx @@ -27,8 +27,6 @@ #include #include #include -class Standard_OutOfRange; -class IGESData_IGESEntity; class IGESDraw_ConnectPoint; class TCollection_HAsciiString; class IGESGraph_TextDisplayTemplate; diff --git a/src/IGESAppli/IGESAppli_FlowLineSpec.hxx b/src/IGESAppli/IGESAppli_FlowLineSpec.hxx index 13f1b6bdd1..97050df9e4 100644 --- a/src/IGESAppli/IGESAppli_FlowLineSpec.hxx +++ b/src/IGESAppli/IGESAppli_FlowLineSpec.hxx @@ -23,7 +23,6 @@ #include #include #include -class Standard_OutOfRange; class TCollection_HAsciiString; diff --git a/src/IGESAppli/IGESAppli_LevelToPWBLayerMap.hxx b/src/IGESAppli/IGESAppli_LevelToPWBLayerMap.hxx index 66aaddd1a1..2604d9c991 100644 --- a/src/IGESAppli/IGESAppli_LevelToPWBLayerMap.hxx +++ b/src/IGESAppli/IGESAppli_LevelToPWBLayerMap.hxx @@ -24,8 +24,6 @@ #include #include #include -class Standard_DimensionMismatch; -class Standard_OutOfRange; class TCollection_HAsciiString; diff --git a/src/IGESAppli/IGESAppli_NodalConstraint.hxx b/src/IGESAppli/IGESAppli_NodalConstraint.hxx index db54f948e7..e67a3b567d 100644 --- a/src/IGESAppli/IGESAppli_NodalConstraint.hxx +++ b/src/IGESAppli/IGESAppli_NodalConstraint.hxx @@ -24,7 +24,6 @@ #include #include class IGESAppli_Node; -class Standard_OutOfRange; class IGESDefs_TabularData; diff --git a/src/IGESAppli/IGESAppli_NodalDisplAndRot.hxx b/src/IGESAppli/IGESAppli_NodalDisplAndRot.hxx index 7e9f7e064b..66748c696a 100644 --- a/src/IGESAppli/IGESAppli_NodalDisplAndRot.hxx +++ b/src/IGESAppli/IGESAppli_NodalDisplAndRot.hxx @@ -26,8 +26,6 @@ #include #include class IGESBasic_HArray1OfHArray1OfXYZ; -class Standard_DimensionMismatch; -class Standard_OutOfRange; class IGESDimen_GeneralNote; class IGESAppli_Node; class gp_XYZ; diff --git a/src/IGESAppli/IGESAppli_NodalResults.hxx b/src/IGESAppli/IGESAppli_NodalResults.hxx index 43315cc724..728a9b50ec 100644 --- a/src/IGESAppli/IGESAppli_NodalResults.hxx +++ b/src/IGESAppli/IGESAppli_NodalResults.hxx @@ -27,8 +27,6 @@ #include #include class IGESDimen_GeneralNote; -class Standard_DimensionMismatch; -class Standard_OutOfRange; class IGESAppli_Node; diff --git a/src/IGESAppli/IGESAppli_Node.hxx b/src/IGESAppli/IGESAppli_Node.hxx index 5cfd9a16af..38d9a348d3 100644 --- a/src/IGESAppli/IGESAppli_Node.hxx +++ b/src/IGESAppli/IGESAppli_Node.hxx @@ -24,7 +24,6 @@ #include #include class IGESGeom_TransformationMatrix; -class gp_XYZ; class gp_Pnt; class IGESData_TransfEntity; diff --git a/src/IGESAppli/IGESAppli_PWBArtworkStackup.hxx b/src/IGESAppli/IGESAppli_PWBArtworkStackup.hxx index bc97bc7f35..62083d959c 100644 --- a/src/IGESAppli/IGESAppli_PWBArtworkStackup.hxx +++ b/src/IGESAppli/IGESAppli_PWBArtworkStackup.hxx @@ -24,7 +24,6 @@ #include #include class TCollection_HAsciiString; -class Standard_OutOfRange; class IGESAppli_PWBArtworkStackup; diff --git a/src/IGESAppli/IGESAppli_PipingFlow.hxx b/src/IGESAppli/IGESAppli_PipingFlow.hxx index 46f1f52886..8905e7e0fe 100644 --- a/src/IGESAppli/IGESAppli_PipingFlow.hxx +++ b/src/IGESAppli/IGESAppli_PipingFlow.hxx @@ -27,8 +27,6 @@ #include #include #include -class Standard_OutOfRange; -class IGESData_IGESEntity; class IGESDraw_ConnectPoint; class TCollection_HAsciiString; class IGESGraph_TextDisplayTemplate; diff --git a/src/IGESAppli/IGESAppli_ReadWriteModule.hxx b/src/IGESAppli/IGESAppli_ReadWriteModule.hxx index 31a31bdd77..62f7076cc2 100644 --- a/src/IGESAppli/IGESAppli_ReadWriteModule.hxx +++ b/src/IGESAppli/IGESAppli_ReadWriteModule.hxx @@ -22,7 +22,6 @@ #include #include -class Standard_DomainError; class IGESData_IGESEntity; class IGESData_IGESReaderData; class IGESData_ParamReader; diff --git a/src/IGESAppli/IGESAppli_ToolDrilledHole.hxx b/src/IGESAppli/IGESAppli_ToolDrilledHole.hxx index 473dfd3056..1150564106 100644 --- a/src/IGESAppli/IGESAppli_ToolDrilledHole.hxx +++ b/src/IGESAppli/IGESAppli_ToolDrilledHole.hxx @@ -23,7 +23,6 @@ #include #include -class Standard_DomainError; class IGESAppli_DrilledHole; class IGESData_IGESReaderData; class IGESData_ParamReader; diff --git a/src/IGESAppli/IGESAppli_ToolElementResults.hxx b/src/IGESAppli/IGESAppli_ToolElementResults.hxx index e996ebbed9..3029743d52 100644 --- a/src/IGESAppli/IGESAppli_ToolElementResults.hxx +++ b/src/IGESAppli/IGESAppli_ToolElementResults.hxx @@ -22,7 +22,6 @@ #include #include -class Standard_DomainError; class IGESAppli_ElementResults; class IGESData_IGESReaderData; class IGESData_ParamReader; diff --git a/src/IGESAppli/IGESAppli_ToolFiniteElement.hxx b/src/IGESAppli/IGESAppli_ToolFiniteElement.hxx index 978ac7ca35..277ba8a2cb 100644 --- a/src/IGESAppli/IGESAppli_ToolFiniteElement.hxx +++ b/src/IGESAppli/IGESAppli_ToolFiniteElement.hxx @@ -22,7 +22,6 @@ #include #include -class Standard_DomainError; class IGESAppli_FiniteElement; class IGESData_IGESReaderData; class IGESData_ParamReader; diff --git a/src/IGESAppli/IGESAppli_ToolFlow.hxx b/src/IGESAppli/IGESAppli_ToolFlow.hxx index fc35b3984e..c66bf98329 100644 --- a/src/IGESAppli/IGESAppli_ToolFlow.hxx +++ b/src/IGESAppli/IGESAppli_ToolFlow.hxx @@ -23,7 +23,6 @@ #include #include -class Standard_DomainError; class IGESAppli_Flow; class IGESData_IGESReaderData; class IGESData_ParamReader; diff --git a/src/IGESAppli/IGESAppli_ToolFlowLineSpec.hxx b/src/IGESAppli/IGESAppli_ToolFlowLineSpec.hxx index c28a1031d7..97ff631faa 100644 --- a/src/IGESAppli/IGESAppli_ToolFlowLineSpec.hxx +++ b/src/IGESAppli/IGESAppli_ToolFlowLineSpec.hxx @@ -22,7 +22,6 @@ #include #include -class Standard_DomainError; class IGESAppli_FlowLineSpec; class IGESData_IGESReaderData; class IGESData_ParamReader; diff --git a/src/IGESAppli/IGESAppli_ToolLevelFunction.hxx b/src/IGESAppli/IGESAppli_ToolLevelFunction.hxx index 7dae8c9608..89ef3a8e82 100644 --- a/src/IGESAppli/IGESAppli_ToolLevelFunction.hxx +++ b/src/IGESAppli/IGESAppli_ToolLevelFunction.hxx @@ -23,7 +23,6 @@ #include #include -class Standard_DomainError; class IGESAppli_LevelFunction; class IGESData_IGESReaderData; class IGESData_ParamReader; diff --git a/src/IGESAppli/IGESAppli_ToolLevelToPWBLayerMap.hxx b/src/IGESAppli/IGESAppli_ToolLevelToPWBLayerMap.hxx index 4b0993b044..9ada97b73f 100644 --- a/src/IGESAppli/IGESAppli_ToolLevelToPWBLayerMap.hxx +++ b/src/IGESAppli/IGESAppli_ToolLevelToPWBLayerMap.hxx @@ -22,7 +22,6 @@ #include #include -class Standard_DomainError; class IGESAppli_LevelToPWBLayerMap; class IGESData_IGESReaderData; class IGESData_ParamReader; diff --git a/src/IGESAppli/IGESAppli_ToolLineWidening.hxx b/src/IGESAppli/IGESAppli_ToolLineWidening.hxx index d636db929c..f5b2c2893d 100644 --- a/src/IGESAppli/IGESAppli_ToolLineWidening.hxx +++ b/src/IGESAppli/IGESAppli_ToolLineWidening.hxx @@ -23,7 +23,6 @@ #include #include -class Standard_DomainError; class IGESAppli_LineWidening; class IGESData_IGESReaderData; class IGESData_ParamReader; diff --git a/src/IGESAppli/IGESAppli_ToolNodalConstraint.hxx b/src/IGESAppli/IGESAppli_ToolNodalConstraint.hxx index d863240d3e..1f4d5764ac 100644 --- a/src/IGESAppli/IGESAppli_ToolNodalConstraint.hxx +++ b/src/IGESAppli/IGESAppli_ToolNodalConstraint.hxx @@ -22,7 +22,6 @@ #include #include -class Standard_DomainError; class IGESAppli_NodalConstraint; class IGESData_IGESReaderData; class IGESData_ParamReader; diff --git a/src/IGESAppli/IGESAppli_ToolNodalDisplAndRot.hxx b/src/IGESAppli/IGESAppli_ToolNodalDisplAndRot.hxx index e5caf713a2..9d07f5ea9d 100644 --- a/src/IGESAppli/IGESAppli_ToolNodalDisplAndRot.hxx +++ b/src/IGESAppli/IGESAppli_ToolNodalDisplAndRot.hxx @@ -22,7 +22,6 @@ #include #include -class Standard_DomainError; class IGESAppli_NodalDisplAndRot; class IGESData_IGESReaderData; class IGESData_ParamReader; diff --git a/src/IGESAppli/IGESAppli_ToolNodalResults.hxx b/src/IGESAppli/IGESAppli_ToolNodalResults.hxx index 791c425033..f6a9ab4825 100644 --- a/src/IGESAppli/IGESAppli_ToolNodalResults.hxx +++ b/src/IGESAppli/IGESAppli_ToolNodalResults.hxx @@ -22,7 +22,6 @@ #include #include -class Standard_DomainError; class IGESAppli_NodalResults; class IGESData_IGESReaderData; class IGESData_ParamReader; diff --git a/src/IGESAppli/IGESAppli_ToolNode.hxx b/src/IGESAppli/IGESAppli_ToolNode.hxx index 1248c827eb..2e0fd6ba9f 100644 --- a/src/IGESAppli/IGESAppli_ToolNode.hxx +++ b/src/IGESAppli/IGESAppli_ToolNode.hxx @@ -22,7 +22,6 @@ #include #include -class Standard_DomainError; class IGESAppli_Node; class IGESData_IGESReaderData; class IGESData_ParamReader; diff --git a/src/IGESAppli/IGESAppli_ToolPWBArtworkStackup.hxx b/src/IGESAppli/IGESAppli_ToolPWBArtworkStackup.hxx index d0cb039ff3..269745271f 100644 --- a/src/IGESAppli/IGESAppli_ToolPWBArtworkStackup.hxx +++ b/src/IGESAppli/IGESAppli_ToolPWBArtworkStackup.hxx @@ -22,7 +22,6 @@ #include #include -class Standard_DomainError; class IGESAppli_PWBArtworkStackup; class IGESData_IGESReaderData; class IGESData_ParamReader; diff --git a/src/IGESAppli/IGESAppli_ToolPWBDrilledHole.hxx b/src/IGESAppli/IGESAppli_ToolPWBDrilledHole.hxx index b15c9cecf7..8cc2f9fffb 100644 --- a/src/IGESAppli/IGESAppli_ToolPWBDrilledHole.hxx +++ b/src/IGESAppli/IGESAppli_ToolPWBDrilledHole.hxx @@ -23,7 +23,6 @@ #include #include -class Standard_DomainError; class IGESAppli_PWBDrilledHole; class IGESData_IGESReaderData; class IGESData_ParamReader; diff --git a/src/IGESAppli/IGESAppli_ToolPartNumber.hxx b/src/IGESAppli/IGESAppli_ToolPartNumber.hxx index 748f671e83..47f45ee310 100644 --- a/src/IGESAppli/IGESAppli_ToolPartNumber.hxx +++ b/src/IGESAppli/IGESAppli_ToolPartNumber.hxx @@ -23,7 +23,6 @@ #include #include -class Standard_DomainError; class IGESAppli_PartNumber; class IGESData_IGESReaderData; class IGESData_ParamReader; diff --git a/src/IGESAppli/IGESAppli_ToolPinNumber.hxx b/src/IGESAppli/IGESAppli_ToolPinNumber.hxx index f5476a7df6..ab82b96de2 100644 --- a/src/IGESAppli/IGESAppli_ToolPinNumber.hxx +++ b/src/IGESAppli/IGESAppli_ToolPinNumber.hxx @@ -23,7 +23,6 @@ #include #include -class Standard_DomainError; class IGESAppli_PinNumber; class IGESData_IGESReaderData; class IGESData_ParamReader; diff --git a/src/IGESAppli/IGESAppli_ToolPipingFlow.hxx b/src/IGESAppli/IGESAppli_ToolPipingFlow.hxx index 7d0c1bf87c..cc0c7ed747 100644 --- a/src/IGESAppli/IGESAppli_ToolPipingFlow.hxx +++ b/src/IGESAppli/IGESAppli_ToolPipingFlow.hxx @@ -23,7 +23,6 @@ #include #include -class Standard_DomainError; class IGESAppli_PipingFlow; class IGESData_IGESReaderData; class IGESData_ParamReader; diff --git a/src/IGESAppli/IGESAppli_ToolReferenceDesignator.hxx b/src/IGESAppli/IGESAppli_ToolReferenceDesignator.hxx index 1e8b5767f8..21f6ac20fe 100644 --- a/src/IGESAppli/IGESAppli_ToolReferenceDesignator.hxx +++ b/src/IGESAppli/IGESAppli_ToolReferenceDesignator.hxx @@ -23,7 +23,6 @@ #include #include -class Standard_DomainError; class IGESAppli_ReferenceDesignator; class IGESData_IGESReaderData; class IGESData_ParamReader; diff --git a/src/IGESAppli/IGESAppli_ToolRegionRestriction.hxx b/src/IGESAppli/IGESAppli_ToolRegionRestriction.hxx index cc949d47bf..b9d9d42342 100644 --- a/src/IGESAppli/IGESAppli_ToolRegionRestriction.hxx +++ b/src/IGESAppli/IGESAppli_ToolRegionRestriction.hxx @@ -23,7 +23,6 @@ #include #include -class Standard_DomainError; class IGESAppli_RegionRestriction; class IGESData_IGESReaderData; class IGESData_ParamReader; diff --git a/src/IGESBasic/IGESBasic.hxx b/src/IGESBasic/IGESBasic.hxx index 349d64f326..b510441f10 100644 --- a/src/IGESBasic/IGESBasic.hxx +++ b/src/IGESBasic/IGESBasic.hxx @@ -22,47 +22,6 @@ #include class IGESBasic_Protocol; -class IGESBasic_SubfigureDef; -class IGESBasic_Group; -class IGESBasic_GroupWithoutBackP; -class IGESBasic_SingleParent; -class IGESBasic_ExternalRefFileIndex; -class IGESBasic_OrderedGroup; -class IGESBasic_OrderedGroupWithoutBackP; -class IGESBasic_Hierarchy; -class IGESBasic_ExternalReferenceFile; -class IGESBasic_Name; -class IGESBasic_AssocGroupType; -class IGESBasic_SingularSubfigure; -class IGESBasic_ExternalRefFileName; -class IGESBasic_ExternalRefFile; -class IGESBasic_ExternalRefName; -class IGESBasic_ExternalRefLibName; -class IGESBasic_ToolSubfigureDef; -class IGESBasic_ToolGroup; -class IGESBasic_ToolGroupWithoutBackP; -class IGESBasic_ToolSingleParent; -class IGESBasic_ToolExternalRefFileIndex; -class IGESBasic_ToolOrderedGroup; -class IGESBasic_ToolOrderedGroupWithoutBackP; -class IGESBasic_ToolHierarchy; -class IGESBasic_ToolExternalReferenceFile; -class IGESBasic_ToolName; -class IGESBasic_ToolAssocGroupType; -class IGESBasic_ToolSingularSubfigure; -class IGESBasic_ToolExternalRefFileName; -class IGESBasic_ToolExternalRefFile; -class IGESBasic_ToolExternalRefName; -class IGESBasic_ToolExternalRefLibName; -class IGESBasic_Protocol; -class IGESBasic_ReadWriteModule; -class IGESBasic_GeneralModule; -class IGESBasic_SpecificModule; -class IGESBasic_HArray1OfHArray1OfInteger; -class IGESBasic_HArray1OfHArray1OfReal; -class IGESBasic_HArray1OfHArray1OfXY; -class IGESBasic_HArray1OfHArray1OfXYZ; -class IGESBasic_HArray1OfHArray1OfIGESEntity; //! This package represents basic entities from IGES diff --git a/src/IGESBasic/IGESBasic_ExternalRefFileIndex.hxx b/src/IGESBasic/IGESBasic_ExternalRefFileIndex.hxx index c024dbe606..33b2eeef48 100644 --- a/src/IGESBasic/IGESBasic_ExternalRefFileIndex.hxx +++ b/src/IGESBasic/IGESBasic_ExternalRefFileIndex.hxx @@ -24,10 +24,7 @@ #include #include #include -class Standard_DimensionMismatch; -class Standard_OutOfRange; class TCollection_HAsciiString; -class IGESData_IGESEntity; class IGESBasic_ExternalRefFileIndex; diff --git a/src/IGESBasic/IGESBasic_ExternalReferenceFile.hxx b/src/IGESBasic/IGESBasic_ExternalReferenceFile.hxx index 8cd328719e..6f91ca8d05 100644 --- a/src/IGESBasic/IGESBasic_ExternalReferenceFile.hxx +++ b/src/IGESBasic/IGESBasic_ExternalReferenceFile.hxx @@ -23,7 +23,6 @@ #include #include #include -class Standard_OutOfRange; class TCollection_HAsciiString; diff --git a/src/IGESBasic/IGESBasic_Group.hxx b/src/IGESBasic/IGESBasic_Group.hxx index fbcd4f3a6a..fe8bb6fb9c 100644 --- a/src/IGESBasic/IGESBasic_Group.hxx +++ b/src/IGESBasic/IGESBasic_Group.hxx @@ -24,8 +24,6 @@ #include #include #include -class Standard_OutOfRange; -class IGESData_IGESEntity; class Standard_Transient; diff --git a/src/IGESBasic/IGESBasic_GroupWithoutBackP.hxx b/src/IGESBasic/IGESBasic_GroupWithoutBackP.hxx index b5c792ada2..3e6c8a6220 100644 --- a/src/IGESBasic/IGESBasic_GroupWithoutBackP.hxx +++ b/src/IGESBasic/IGESBasic_GroupWithoutBackP.hxx @@ -21,7 +21,6 @@ #include #include -class Standard_OutOfRange; class IGESBasic_GroupWithoutBackP; diff --git a/src/IGESBasic/IGESBasic_OrderedGroup.hxx b/src/IGESBasic/IGESBasic_OrderedGroup.hxx index fb34b2f636..0f7202dff4 100644 --- a/src/IGESBasic/IGESBasic_OrderedGroup.hxx +++ b/src/IGESBasic/IGESBasic_OrderedGroup.hxx @@ -21,7 +21,6 @@ #include #include -class Standard_OutOfRange; class IGESBasic_OrderedGroup; diff --git a/src/IGESBasic/IGESBasic_OrderedGroupWithoutBackP.hxx b/src/IGESBasic/IGESBasic_OrderedGroupWithoutBackP.hxx index 7945ab1267..c7f65e7a76 100644 --- a/src/IGESBasic/IGESBasic_OrderedGroupWithoutBackP.hxx +++ b/src/IGESBasic/IGESBasic_OrderedGroupWithoutBackP.hxx @@ -21,7 +21,6 @@ #include #include -class Standard_OutOfRange; class IGESBasic_OrderedGroupWithoutBackP; diff --git a/src/IGESBasic/IGESBasic_ReadWriteModule.hxx b/src/IGESBasic/IGESBasic_ReadWriteModule.hxx index 8075ff2e24..5230add9f8 100644 --- a/src/IGESBasic/IGESBasic_ReadWriteModule.hxx +++ b/src/IGESBasic/IGESBasic_ReadWriteModule.hxx @@ -22,7 +22,6 @@ #include #include -class Standard_DomainError; class IGESData_IGESEntity; class IGESData_IGESReaderData; class IGESData_ParamReader; diff --git a/src/IGESBasic/IGESBasic_SingleParent.hxx b/src/IGESBasic/IGESBasic_SingleParent.hxx index a1e3f6bed8..40b24c9022 100644 --- a/src/IGESBasic/IGESBasic_SingleParent.hxx +++ b/src/IGESBasic/IGESBasic_SingleParent.hxx @@ -24,7 +24,6 @@ #include #include class IGESData_IGESEntity; -class Standard_OutOfRange; class IGESBasic_SingleParent; diff --git a/src/IGESBasic/IGESBasic_SingularSubfigure.hxx b/src/IGESBasic/IGESBasic_SingularSubfigure.hxx index e08f576496..0873c80aef 100644 --- a/src/IGESBasic/IGESBasic_SingularSubfigure.hxx +++ b/src/IGESBasic/IGESBasic_SingularSubfigure.hxx @@ -25,7 +25,6 @@ #include #include class IGESBasic_SubfigureDef; -class gp_XYZ; class IGESBasic_SingularSubfigure; diff --git a/src/IGESBasic/IGESBasic_SubfigureDef.hxx b/src/IGESBasic/IGESBasic_SubfigureDef.hxx index 8446f7a1ac..7a649d076d 100644 --- a/src/IGESBasic/IGESBasic_SubfigureDef.hxx +++ b/src/IGESBasic/IGESBasic_SubfigureDef.hxx @@ -24,8 +24,6 @@ #include #include class TCollection_HAsciiString; -class Standard_OutOfRange; -class IGESData_IGESEntity; class Standard_Transient; diff --git a/src/IGESBasic/IGESBasic_ToolAssocGroupType.hxx b/src/IGESBasic/IGESBasic_ToolAssocGroupType.hxx index 0e94b2d3c1..d15030a897 100644 --- a/src/IGESBasic/IGESBasic_ToolAssocGroupType.hxx +++ b/src/IGESBasic/IGESBasic_ToolAssocGroupType.hxx @@ -23,7 +23,6 @@ #include #include -class Standard_DomainError; class IGESBasic_AssocGroupType; class IGESData_IGESReaderData; class IGESData_ParamReader; diff --git a/src/IGESBasic/IGESBasic_ToolExternalRefFile.hxx b/src/IGESBasic/IGESBasic_ToolExternalRefFile.hxx index c8f39e3668..3880c28145 100644 --- a/src/IGESBasic/IGESBasic_ToolExternalRefFile.hxx +++ b/src/IGESBasic/IGESBasic_ToolExternalRefFile.hxx @@ -22,7 +22,6 @@ #include #include -class Standard_DomainError; class IGESBasic_ExternalRefFile; class IGESData_IGESReaderData; class IGESData_ParamReader; diff --git a/src/IGESBasic/IGESBasic_ToolExternalRefFileIndex.hxx b/src/IGESBasic/IGESBasic_ToolExternalRefFileIndex.hxx index 637b90448b..bf3ea4a328 100644 --- a/src/IGESBasic/IGESBasic_ToolExternalRefFileIndex.hxx +++ b/src/IGESBasic/IGESBasic_ToolExternalRefFileIndex.hxx @@ -22,7 +22,6 @@ #include #include -class Standard_DomainError; class IGESBasic_ExternalRefFileIndex; class IGESData_IGESReaderData; class IGESData_ParamReader; diff --git a/src/IGESBasic/IGESBasic_ToolExternalRefFileName.hxx b/src/IGESBasic/IGESBasic_ToolExternalRefFileName.hxx index e74c8f38c4..430e5fe853 100644 --- a/src/IGESBasic/IGESBasic_ToolExternalRefFileName.hxx +++ b/src/IGESBasic/IGESBasic_ToolExternalRefFileName.hxx @@ -22,7 +22,6 @@ #include #include -class Standard_DomainError; class IGESBasic_ExternalRefFileName; class IGESData_IGESReaderData; class IGESData_ParamReader; diff --git a/src/IGESBasic/IGESBasic_ToolExternalRefLibName.hxx b/src/IGESBasic/IGESBasic_ToolExternalRefLibName.hxx index cf6a1007ec..6309292124 100644 --- a/src/IGESBasic/IGESBasic_ToolExternalRefLibName.hxx +++ b/src/IGESBasic/IGESBasic_ToolExternalRefLibName.hxx @@ -22,7 +22,6 @@ #include #include -class Standard_DomainError; class IGESBasic_ExternalRefLibName; class IGESData_IGESReaderData; class IGESData_ParamReader; diff --git a/src/IGESBasic/IGESBasic_ToolExternalRefName.hxx b/src/IGESBasic/IGESBasic_ToolExternalRefName.hxx index 3afda60316..4dc4140add 100644 --- a/src/IGESBasic/IGESBasic_ToolExternalRefName.hxx +++ b/src/IGESBasic/IGESBasic_ToolExternalRefName.hxx @@ -22,7 +22,6 @@ #include #include -class Standard_DomainError; class IGESBasic_ExternalRefName; class IGESData_IGESReaderData; class IGESData_ParamReader; diff --git a/src/IGESBasic/IGESBasic_ToolExternalReferenceFile.hxx b/src/IGESBasic/IGESBasic_ToolExternalReferenceFile.hxx index a9fae5b3c5..5d104d0df1 100644 --- a/src/IGESBasic/IGESBasic_ToolExternalReferenceFile.hxx +++ b/src/IGESBasic/IGESBasic_ToolExternalReferenceFile.hxx @@ -22,7 +22,6 @@ #include #include -class Standard_DomainError; class IGESBasic_ExternalReferenceFile; class IGESData_IGESReaderData; class IGESData_ParamReader; diff --git a/src/IGESBasic/IGESBasic_ToolGroup.hxx b/src/IGESBasic/IGESBasic_ToolGroup.hxx index 9e0654e8d3..6f9c763823 100644 --- a/src/IGESBasic/IGESBasic_ToolGroup.hxx +++ b/src/IGESBasic/IGESBasic_ToolGroup.hxx @@ -23,7 +23,6 @@ #include #include -class Standard_DomainError; class IGESBasic_Group; class IGESData_IGESReaderData; class IGESData_ParamReader; @@ -34,7 +33,6 @@ class Interface_ShareTool; class Interface_Check; class Interface_CopyTool; class IGESData_IGESDumper; -class Message_Messenger; //! Tool to work on a Group. Called by various Modules diff --git a/src/IGESBasic/IGESBasic_ToolGroupWithoutBackP.hxx b/src/IGESBasic/IGESBasic_ToolGroupWithoutBackP.hxx index bb60ec712d..a9851b5841 100644 --- a/src/IGESBasic/IGESBasic_ToolGroupWithoutBackP.hxx +++ b/src/IGESBasic/IGESBasic_ToolGroupWithoutBackP.hxx @@ -23,7 +23,6 @@ #include #include -class Standard_DomainError; class IGESBasic_GroupWithoutBackP; class IGESData_IGESReaderData; class IGESData_ParamReader; diff --git a/src/IGESBasic/IGESBasic_ToolHierarchy.hxx b/src/IGESBasic/IGESBasic_ToolHierarchy.hxx index bb45ef6439..cf353edc4a 100644 --- a/src/IGESBasic/IGESBasic_ToolHierarchy.hxx +++ b/src/IGESBasic/IGESBasic_ToolHierarchy.hxx @@ -23,7 +23,6 @@ #include #include -class Standard_DomainError; class IGESBasic_Hierarchy; class IGESData_IGESReaderData; class IGESData_ParamReader; diff --git a/src/IGESBasic/IGESBasic_ToolName.hxx b/src/IGESBasic/IGESBasic_ToolName.hxx index 75e22583a0..9ab40e0ba3 100644 --- a/src/IGESBasic/IGESBasic_ToolName.hxx +++ b/src/IGESBasic/IGESBasic_ToolName.hxx @@ -23,7 +23,6 @@ #include #include -class Standard_DomainError; class IGESBasic_Name; class IGESData_IGESReaderData; class IGESData_ParamReader; diff --git a/src/IGESBasic/IGESBasic_ToolOrderedGroup.hxx b/src/IGESBasic/IGESBasic_ToolOrderedGroup.hxx index 1e688686c2..0a63ce4678 100644 --- a/src/IGESBasic/IGESBasic_ToolOrderedGroup.hxx +++ b/src/IGESBasic/IGESBasic_ToolOrderedGroup.hxx @@ -23,7 +23,6 @@ #include #include -class Standard_DomainError; class IGESBasic_OrderedGroup; class IGESData_IGESReaderData; class IGESData_ParamReader; diff --git a/src/IGESBasic/IGESBasic_ToolOrderedGroupWithoutBackP.hxx b/src/IGESBasic/IGESBasic_ToolOrderedGroupWithoutBackP.hxx index b5e4c94d7b..540302f5ea 100644 --- a/src/IGESBasic/IGESBasic_ToolOrderedGroupWithoutBackP.hxx +++ b/src/IGESBasic/IGESBasic_ToolOrderedGroupWithoutBackP.hxx @@ -23,7 +23,6 @@ #include #include -class Standard_DomainError; class IGESBasic_OrderedGroupWithoutBackP; class IGESData_IGESReaderData; class IGESData_ParamReader; diff --git a/src/IGESBasic/IGESBasic_ToolSingleParent.hxx b/src/IGESBasic/IGESBasic_ToolSingleParent.hxx index 7c41f36de1..485b3e523e 100644 --- a/src/IGESBasic/IGESBasic_ToolSingleParent.hxx +++ b/src/IGESBasic/IGESBasic_ToolSingleParent.hxx @@ -23,7 +23,6 @@ #include #include -class Standard_DomainError; class IGESBasic_SingleParent; class IGESData_IGESReaderData; class IGESData_ParamReader; diff --git a/src/IGESBasic/IGESBasic_ToolSingularSubfigure.hxx b/src/IGESBasic/IGESBasic_ToolSingularSubfigure.hxx index 6c4c764e56..73cdba3c13 100644 --- a/src/IGESBasic/IGESBasic_ToolSingularSubfigure.hxx +++ b/src/IGESBasic/IGESBasic_ToolSingularSubfigure.hxx @@ -22,7 +22,6 @@ #include #include -class Standard_DomainError; class IGESBasic_SingularSubfigure; class IGESData_IGESReaderData; class IGESData_ParamReader; diff --git a/src/IGESBasic/IGESBasic_ToolSubfigureDef.hxx b/src/IGESBasic/IGESBasic_ToolSubfigureDef.hxx index 9cf6b87818..1a56bd4a2d 100644 --- a/src/IGESBasic/IGESBasic_ToolSubfigureDef.hxx +++ b/src/IGESBasic/IGESBasic_ToolSubfigureDef.hxx @@ -22,7 +22,6 @@ #include #include -class Standard_DomainError; class IGESBasic_SubfigureDef; class IGESData_IGESReaderData; class IGESData_ParamReader; diff --git a/src/IGESCAFControl/IGESCAFControl.hxx b/src/IGESCAFControl/IGESCAFControl.hxx index 7fc3072155..a4f2ba1537 100644 --- a/src/IGESCAFControl/IGESCAFControl.hxx +++ b/src/IGESCAFControl/IGESCAFControl.hxx @@ -22,8 +22,6 @@ #include class Quantity_Color; -class IGESCAFControl_Reader; -class IGESCAFControl_Writer; //! Provides high-level API to translate IGES file diff --git a/src/IGESConvGeom/IGESConvGeom.hxx b/src/IGESConvGeom/IGESConvGeom.hxx index 98e1f64969..1aaf695398 100644 --- a/src/IGESConvGeom/IGESConvGeom.hxx +++ b/src/IGESConvGeom/IGESConvGeom.hxx @@ -28,7 +28,6 @@ class Geom_BSplineCurve; class Geom2d_BSplineCurve; class IGESGeom_SplineSurface; class Geom_BSplineSurface; -class IGESConvGeom_GeomBuilder; //! This package is intended to gather geometric conversion which diff --git a/src/IGESConvGeom/IGESConvGeom_GeomBuilder.hxx b/src/IGESConvGeom/IGESConvGeom_GeomBuilder.hxx index 04535256d3..57f67d80fc 100644 --- a/src/IGESConvGeom/IGESConvGeom_GeomBuilder.hxx +++ b/src/IGESConvGeom/IGESConvGeom_GeomBuilder.hxx @@ -26,11 +26,9 @@ #include #include #include -class Standard_DomainError; class gp_XY; class gp_XYZ; class IGESGeom_CopiousData; -class gp_Trsf; class gp_Ax3; class gp_Ax2; class gp_Ax1; diff --git a/src/IGESData/IGESData.hxx b/src/IGESData/IGESData.hxx index 51466e4541..a8bc86e407 100644 --- a/src/IGESData/IGESData.hxx +++ b/src/IGESData/IGESData.hxx @@ -22,45 +22,6 @@ #include class IGESData_Protocol; -class IGESData_Protocol; -class IGESData_IGESModel; -class IGESData_IGESEntity; -class IGESData_LineFontEntity; -class IGESData_LevelListEntity; -class IGESData_TransfEntity; -class IGESData_ViewKindEntity; -class IGESData_LabelDisplayEntity; -class IGESData_ColorEntity; -class IGESData_NameEntity; -class IGESData_SingleParentEntity; -class IGESData_UndefinedEntity; -class IGESData_FreeFormatEntity; -class IGESData_GlobalSection; -class IGESData_DefSwitch; -class IGESData_DirChecker; -class IGESData_IGESReaderData; -class IGESData_IGESReaderTool; -class IGESData_ParamReader; -class IGESData_ParamCursor; -class IGESData_DirPart; -class IGESData_IGESType; -class IGESData_FileRecognizer; -class IGESData_IGESWriter; -class IGESData_IGESDumper; -class IGESData_BasicEditor; -class IGESData_ToolLocation; -class IGESData_GeneralModule; -class IGESData_DefaultGeneral; -class IGESData_ReadWriteModule; -class IGESData_SpecificModule; -class IGESData_DefaultSpecific; -class IGESData_FileProtocol; -class IGESData_WriterLib; -class IGESData_SpecificLib; -class IGESData_GlobalNodeOfWriterLib; -class IGESData_NodeOfWriterLib; -class IGESData_GlobalNodeOfSpecificLib; -class IGESData_NodeOfSpecificLib; //! basic description of an IGES Interface diff --git a/src/IGESData/IGESData_FileProtocol.hxx b/src/IGESData/IGESData_FileProtocol.hxx index dfe7726808..bff334a142 100644 --- a/src/IGESData/IGESData_FileProtocol.hxx +++ b/src/IGESData/IGESData_FileProtocol.hxx @@ -22,7 +22,6 @@ #include #include -class IGESData_Protocol; class Interface_Protocol; class IGESData_FileProtocol; diff --git a/src/IGESData/IGESData_FreeFormatEntity.hxx b/src/IGESData/IGESData_FreeFormatEntity.hxx index 6436688a17..9f5410431b 100644 --- a/src/IGESData/IGESData_FreeFormatEntity.hxx +++ b/src/IGESData/IGESData_FreeFormatEntity.hxx @@ -27,8 +27,6 @@ #include #include #include -class Standard_OutOfRange; -class Interface_InterfaceError; class IGESData_IGESEntity; class TCollection_HAsciiString; class IGESData_IGESWriter; diff --git a/src/IGESData/IGESData_IGESDumper.hxx b/src/IGESData/IGESData_IGESDumper.hxx index 074b809c19..9709e9effe 100644 --- a/src/IGESData/IGESData_IGESDumper.hxx +++ b/src/IGESData/IGESData_IGESDumper.hxx @@ -26,7 +26,6 @@ #include class IGESData_IGESModel; -class Interface_InterfaceError; class IGESData_Protocol; class IGESData_IGESEntity; diff --git a/src/IGESData/IGESData_IGESEntity.hxx b/src/IGESData/IGESData_IGESEntity.hxx index 55d222f025..c754186caf 100644 --- a/src/IGESData/IGESData_IGESEntity.hxx +++ b/src/IGESData/IGESData_IGESEntity.hxx @@ -32,11 +32,6 @@ #include #include class TCollection_HAsciiString; -class Interface_InterfaceError; -class IGESData_ReadWriteModule; -class IGESData_GeneralModule; -class IGESData_IGESReaderTool; -class IGESData_DirChecker; class IGESData_IGESType; class IGESData_LineFontEntity; class IGESData_LevelListEntity; @@ -46,7 +41,6 @@ class IGESData_LabelDisplayEntity; class IGESData_ColorEntity; class gp_GTrsf; class Interface_EntityIterator; -class Interface_EntityList; class IGESData_IGESEntity; diff --git a/src/IGESData/IGESData_IGESModel.hxx b/src/IGESData/IGESData_IGESModel.hxx index bd893b9d8d..c3224269cb 100644 --- a/src/IGESData/IGESData_IGESModel.hxx +++ b/src/IGESData/IGESData_IGESModel.hxx @@ -21,10 +21,7 @@ #include #include -class Interface_InterfaceError; -class IGESData_GlobalSection; class IGESData_IGESEntity; -class Interface_InterfaceModel; class Interface_Check; class Standard_Transient; class TCollection_HAsciiString; diff --git a/src/IGESData/IGESData_IGESReaderData.hxx b/src/IGESData/IGESData_IGESReaderData.hxx index 4e99fdbd06..84275d955c 100644 --- a/src/IGESData/IGESData_IGESReaderData.hxx +++ b/src/IGESData/IGESData_IGESReaderData.hxx @@ -32,9 +32,7 @@ #include class Interface_ParamSet; class Interface_Check; -class IGESData_GlobalSection; class IGESData_DirPart; -class IGESData_IGESType; class IGESData_IGESReaderData; diff --git a/src/IGESData/IGESData_IGESWriter.hxx b/src/IGESData/IGESData_IGESWriter.hxx index 16518d2253..7cc2107742 100644 --- a/src/IGESData/IGESData_IGESWriter.hxx +++ b/src/IGESData/IGESData_IGESWriter.hxx @@ -35,8 +35,6 @@ #include class IGESData_IGESModel; -class Interface_InterfaceMismatch; -class Interface_FloatWriter; class IGESData_Protocol; class IGESData_GlobalSection; class IGESData_IGESEntity; diff --git a/src/IGESData/IGESData_LevelListEntity.hxx b/src/IGESData/IGESData_LevelListEntity.hxx index 8994e3b19a..8dd88188c5 100644 --- a/src/IGESData/IGESData_LevelListEntity.hxx +++ b/src/IGESData/IGESData_LevelListEntity.hxx @@ -23,7 +23,6 @@ #include #include #include -class Standard_OutOfRange; class IGESData_LevelListEntity; diff --git a/src/IGESData/IGESData_ParamCursor.hxx b/src/IGESData/IGESData_ParamCursor.hxx index a14e16f8fe..ae4b0e9ff7 100644 --- a/src/IGESData/IGESData_ParamCursor.hxx +++ b/src/IGESData/IGESData_ParamCursor.hxx @@ -23,7 +23,6 @@ #include #include -class Interface_InterfaceError; //! Auxiliary class for ParamReader. diff --git a/src/IGESData/IGESData_ParamReader.hxx b/src/IGESData/IGESData_ParamReader.hxx index 1787347d27..16f84c791a 100644 --- a/src/IGESData/IGESData_ParamReader.hxx +++ b/src/IGESData/IGESData_ParamReader.hxx @@ -35,7 +35,6 @@ #include class Interface_ParamList; class Interface_Check; -class Interface_InterfaceError; class IGESData_IGESEntity; class IGESData_IGESReaderData; class IGESData_ParamCursor; diff --git a/src/IGESData/IGESData_Protocol.hxx b/src/IGESData/IGESData_Protocol.hxx index f37de80536..82a9ab1493 100644 --- a/src/IGESData/IGESData_Protocol.hxx +++ b/src/IGESData/IGESData_Protocol.hxx @@ -24,7 +24,6 @@ #include #include #include -class Interface_Protocol; class Interface_InterfaceModel; class Standard_Transient; diff --git a/src/IGESData/IGESData_ReadWriteModule.hxx b/src/IGESData/IGESData_ReadWriteModule.hxx index 0cee336436..61afa3c083 100644 --- a/src/IGESData/IGESData_ReadWriteModule.hxx +++ b/src/IGESData/IGESData_ReadWriteModule.hxx @@ -22,7 +22,6 @@ #include #include -class Standard_DomainError; class Interface_FileReaderData; class Interface_Check; class Standard_Transient; diff --git a/src/IGESData/IGESData_SingleParentEntity.hxx b/src/IGESData/IGESData_SingleParentEntity.hxx index 262b58c567..fb881dcdfb 100644 --- a/src/IGESData/IGESData_SingleParentEntity.hxx +++ b/src/IGESData/IGESData_SingleParentEntity.hxx @@ -22,8 +22,6 @@ #include #include -class Standard_OutOfRange; -class IGESData_IGESEntity; class IGESData_SingleParentEntity; diff --git a/src/IGESData/IGESData_ToolLocation.hxx b/src/IGESData/IGESData_ToolLocation.hxx index 4192eb2293..e7f4900ee8 100644 --- a/src/IGESData/IGESData_ToolLocation.hxx +++ b/src/IGESData/IGESData_ToolLocation.hxx @@ -26,7 +26,6 @@ #include #include class IGESData_IGESModel; -class Standard_DomainError; class IGESData_Protocol; class IGESData_IGESEntity; class gp_GTrsf; diff --git a/src/IGESData/IGESData_ViewKindEntity.hxx b/src/IGESData/IGESData_ViewKindEntity.hxx index 06b33521e6..8be4c5c8e9 100644 --- a/src/IGESData/IGESData_ViewKindEntity.hxx +++ b/src/IGESData/IGESData_ViewKindEntity.hxx @@ -23,7 +23,6 @@ #include #include #include -class Standard_OutOfRange; class IGESData_ViewKindEntity; diff --git a/src/IGESDefs/IGESDefs.hxx b/src/IGESDefs/IGESDefs.hxx index 6490014167..1e648f9e0d 100644 --- a/src/IGESDefs/IGESDefs.hxx +++ b/src/IGESDefs/IGESDefs.hxx @@ -22,25 +22,6 @@ #include class IGESDefs_Protocol; -class IGESDefs_AssociativityDef; -class IGESDefs_MacroDef; -class IGESDefs_UnitsData; -class IGESDefs_AttributeDef; -class IGESDefs_TabularData; -class IGESDefs_GenericData; -class IGESDefs_AttributeTable; -class IGESDefs_ToolAssociativityDef; -class IGESDefs_ToolMacroDef; -class IGESDefs_ToolUnitsData; -class IGESDefs_ToolAttributeDef; -class IGESDefs_ToolTabularData; -class IGESDefs_ToolGenericData; -class IGESDefs_ToolAttributeTable; -class IGESDefs_Protocol; -class IGESDefs_ReadWriteModule; -class IGESDefs_GeneralModule; -class IGESDefs_SpecificModule; -class IGESDefs_HArray1OfHArray1OfTextDisplayTemplate; //! To embody general definitions of Entities diff --git a/src/IGESDefs/IGESDefs_AssociativityDef.hxx b/src/IGESDefs/IGESDefs_AssociativityDef.hxx index 905eda05b6..2235919094 100644 --- a/src/IGESDefs/IGESDefs_AssociativityDef.hxx +++ b/src/IGESDefs/IGESDefs_AssociativityDef.hxx @@ -25,8 +25,6 @@ #include #include class IGESBasic_HArray1OfHArray1OfInteger; -class Standard_DimensionMismatch; -class Standard_OutOfRange; class IGESDefs_AssociativityDef; diff --git a/src/IGESDefs/IGESDefs_AttributeDef.hxx b/src/IGESDefs/IGESDefs_AttributeDef.hxx index 0dafcae8ad..5b7468199b 100644 --- a/src/IGESDefs/IGESDefs_AttributeDef.hxx +++ b/src/IGESDefs/IGESDefs_AttributeDef.hxx @@ -28,12 +28,8 @@ #include class TCollection_HAsciiString; class IGESDefs_HArray1OfHArray1OfTextDisplayTemplate; -class Standard_DimensionMismatch; -class Standard_OutOfRange; -class Standard_NullObject; class IGESGraph_TextDisplayTemplate; class Standard_Transient; -class IGESData_IGESEntity; class IGESDefs_AttributeDef; diff --git a/src/IGESDefs/IGESDefs_AttributeTable.hxx b/src/IGESDefs/IGESDefs_AttributeTable.hxx index 2ae71a9aae..5c0554ef30 100644 --- a/src/IGESDefs/IGESDefs_AttributeTable.hxx +++ b/src/IGESDefs/IGESDefs_AttributeTable.hxx @@ -25,12 +25,9 @@ #include #include #include -class Standard_OutOfRange; -class Standard_NullObject; class IGESDefs_AttributeDef; class Standard_Transient; class TCollection_HAsciiString; -class IGESData_IGESEntity; class IGESDefs_AttributeTable; diff --git a/src/IGESDefs/IGESDefs_GenericData.hxx b/src/IGESDefs/IGESDefs_GenericData.hxx index a42b6f91d4..b004b7fdd1 100644 --- a/src/IGESDefs/IGESDefs_GenericData.hxx +++ b/src/IGESDefs/IGESDefs_GenericData.hxx @@ -27,11 +27,7 @@ #include #include class TCollection_HAsciiString; -class Standard_DimensionMismatch; -class Standard_OutOfRange; -class Standard_NullObject; class Standard_Transient; -class IGESData_IGESEntity; class IGESDefs_GenericData; diff --git a/src/IGESDefs/IGESDefs_MacroDef.hxx b/src/IGESDefs/IGESDefs_MacroDef.hxx index afaecc4197..321550aa94 100644 --- a/src/IGESDefs/IGESDefs_MacroDef.hxx +++ b/src/IGESDefs/IGESDefs_MacroDef.hxx @@ -24,7 +24,6 @@ #include #include class TCollection_HAsciiString; -class Standard_OutOfRange; class IGESDefs_MacroDef; diff --git a/src/IGESDefs/IGESDefs_ReadWriteModule.hxx b/src/IGESDefs/IGESDefs_ReadWriteModule.hxx index 6e1617e5a8..3ed668dc2b 100644 --- a/src/IGESDefs/IGESDefs_ReadWriteModule.hxx +++ b/src/IGESDefs/IGESDefs_ReadWriteModule.hxx @@ -22,7 +22,6 @@ #include #include -class Standard_DomainError; class IGESData_IGESEntity; class IGESData_IGESReaderData; class IGESData_ParamReader; diff --git a/src/IGESDefs/IGESDefs_TabularData.hxx b/src/IGESDefs/IGESDefs_TabularData.hxx index 577988943c..083971b4f3 100644 --- a/src/IGESDefs/IGESDefs_TabularData.hxx +++ b/src/IGESDefs/IGESDefs_TabularData.hxx @@ -27,8 +27,6 @@ #include #include class IGESBasic_HArray1OfHArray1OfReal; -class Standard_DimensionMismatch; -class Standard_OutOfRange; class IGESDefs_TabularData; diff --git a/src/IGESDefs/IGESDefs_ToolAssociativityDef.hxx b/src/IGESDefs/IGESDefs_ToolAssociativityDef.hxx index e00d6fd252..617780e6e5 100644 --- a/src/IGESDefs/IGESDefs_ToolAssociativityDef.hxx +++ b/src/IGESDefs/IGESDefs_ToolAssociativityDef.hxx @@ -22,7 +22,6 @@ #include #include -class Standard_DomainError; class IGESDefs_AssociativityDef; class IGESData_IGESReaderData; class IGESData_ParamReader; diff --git a/src/IGESDefs/IGESDefs_ToolAttributeDef.hxx b/src/IGESDefs/IGESDefs_ToolAttributeDef.hxx index 05ea914b44..a5152c9c10 100644 --- a/src/IGESDefs/IGESDefs_ToolAttributeDef.hxx +++ b/src/IGESDefs/IGESDefs_ToolAttributeDef.hxx @@ -22,7 +22,6 @@ #include #include -class Standard_DomainError; class IGESDefs_AttributeDef; class IGESData_IGESReaderData; class IGESData_ParamReader; diff --git a/src/IGESDefs/IGESDefs_ToolAttributeTable.hxx b/src/IGESDefs/IGESDefs_ToolAttributeTable.hxx index 53c1a547cf..132bfd05d1 100644 --- a/src/IGESDefs/IGESDefs_ToolAttributeTable.hxx +++ b/src/IGESDefs/IGESDefs_ToolAttributeTable.hxx @@ -22,7 +22,6 @@ #include #include -class Standard_DomainError; class IGESDefs_AttributeTable; class IGESData_IGESReaderData; class IGESData_ParamReader; diff --git a/src/IGESDefs/IGESDefs_ToolGenericData.hxx b/src/IGESDefs/IGESDefs_ToolGenericData.hxx index 4f54ec8b3f..809cd0ca5e 100644 --- a/src/IGESDefs/IGESDefs_ToolGenericData.hxx +++ b/src/IGESDefs/IGESDefs_ToolGenericData.hxx @@ -22,7 +22,6 @@ #include #include -class Standard_DomainError; class IGESDefs_GenericData; class IGESData_IGESReaderData; class IGESData_ParamReader; diff --git a/src/IGESDefs/IGESDefs_ToolMacroDef.hxx b/src/IGESDefs/IGESDefs_ToolMacroDef.hxx index ef9a327c51..3567d23fea 100644 --- a/src/IGESDefs/IGESDefs_ToolMacroDef.hxx +++ b/src/IGESDefs/IGESDefs_ToolMacroDef.hxx @@ -22,7 +22,6 @@ #include #include -class Standard_DomainError; class IGESDefs_MacroDef; class IGESData_IGESReaderData; class IGESData_ParamReader; diff --git a/src/IGESDefs/IGESDefs_ToolTabularData.hxx b/src/IGESDefs/IGESDefs_ToolTabularData.hxx index 206de7a6c6..bf82166c19 100644 --- a/src/IGESDefs/IGESDefs_ToolTabularData.hxx +++ b/src/IGESDefs/IGESDefs_ToolTabularData.hxx @@ -22,7 +22,6 @@ #include #include -class Standard_DomainError; class IGESDefs_TabularData; class IGESData_IGESReaderData; class IGESData_ParamReader; diff --git a/src/IGESDefs/IGESDefs_ToolUnitsData.hxx b/src/IGESDefs/IGESDefs_ToolUnitsData.hxx index 7a6c5e9260..3ce44e7af0 100644 --- a/src/IGESDefs/IGESDefs_ToolUnitsData.hxx +++ b/src/IGESDefs/IGESDefs_ToolUnitsData.hxx @@ -22,7 +22,6 @@ #include #include -class Standard_DomainError; class IGESDefs_UnitsData; class IGESData_IGESReaderData; class IGESData_ParamReader; diff --git a/src/IGESDefs/IGESDefs_UnitsData.hxx b/src/IGESDefs/IGESDefs_UnitsData.hxx index 11300d2a23..9e54babe13 100644 --- a/src/IGESDefs/IGESDefs_UnitsData.hxx +++ b/src/IGESDefs/IGESDefs_UnitsData.hxx @@ -25,8 +25,6 @@ #include #include #include -class Standard_DimensionMismatch; -class Standard_OutOfRange; class TCollection_HAsciiString; diff --git a/src/IGESDimen/IGESDimen.hxx b/src/IGESDimen/IGESDimen.hxx index e53069100a..6dfc7787b1 100644 --- a/src/IGESDimen/IGESDimen.hxx +++ b/src/IGESDimen/IGESDimen.hxx @@ -22,56 +22,6 @@ #include class IGESDimen_Protocol; -class IGESDimen_CenterLine; -class IGESDimen_Section; -class IGESDimen_WitnessLine; -class IGESDimen_AngularDimension; -class IGESDimen_CurveDimension; -class IGESDimen_DiameterDimension; -class IGESDimen_FlagNote; -class IGESDimen_GeneralLabel; -class IGESDimen_GeneralNote; -class IGESDimen_NewGeneralNote; -class IGESDimen_LeaderArrow; -class IGESDimen_LinearDimension; -class IGESDimen_OrdinateDimension; -class IGESDimen_PointDimension; -class IGESDimen_RadiusDimension; -class IGESDimen_GeneralSymbol; -class IGESDimen_SectionedArea; -class IGESDimen_DimensionedGeometry; -class IGESDimen_NewDimensionedGeometry; -class IGESDimen_DimensionUnits; -class IGESDimen_DimensionTolerance; -class IGESDimen_DimensionDisplayData; -class IGESDimen_BasicDimension; -class IGESDimen_ToolCenterLine; -class IGESDimen_ToolSection; -class IGESDimen_ToolWitnessLine; -class IGESDimen_ToolAngularDimension; -class IGESDimen_ToolCurveDimension; -class IGESDimen_ToolDiameterDimension; -class IGESDimen_ToolFlagNote; -class IGESDimen_ToolGeneralLabel; -class IGESDimen_ToolGeneralNote; -class IGESDimen_ToolNewGeneralNote; -class IGESDimen_ToolLeaderArrow; -class IGESDimen_ToolLinearDimension; -class IGESDimen_ToolOrdinateDimension; -class IGESDimen_ToolPointDimension; -class IGESDimen_ToolRadiusDimension; -class IGESDimen_ToolGeneralSymbol; -class IGESDimen_ToolSectionedArea; -class IGESDimen_ToolDimensionedGeometry; -class IGESDimen_ToolNewDimensionedGeometry; -class IGESDimen_ToolDimensionUnits; -class IGESDimen_ToolDimensionTolerance; -class IGESDimen_ToolDimensionDisplayData; -class IGESDimen_ToolBasicDimension; -class IGESDimen_Protocol; -class IGESDimen_ReadWriteModule; -class IGESDimen_GeneralModule; -class IGESDimen_SpecificModule; //! This package represents Entities applied to Dimensions diff --git a/src/IGESDimen/IGESDimen_AngularDimension.hxx b/src/IGESDimen/IGESDimen_AngularDimension.hxx index 7f12af97c2..345d459e7c 100644 --- a/src/IGESDimen/IGESDimen_AngularDimension.hxx +++ b/src/IGESDimen/IGESDimen_AngularDimension.hxx @@ -27,7 +27,6 @@ class IGESDimen_GeneralNote; class IGESDimen_WitnessLine; class IGESDimen_LeaderArrow; -class gp_XY; class gp_Pnt2d; diff --git a/src/IGESDimen/IGESDimen_BasicDimension.hxx b/src/IGESDimen/IGESDimen_BasicDimension.hxx index 02142e8e89..d9d85498ab 100644 --- a/src/IGESDimen/IGESDimen_BasicDimension.hxx +++ b/src/IGESDimen/IGESDimen_BasicDimension.hxx @@ -23,7 +23,6 @@ #include #include #include -class gp_XY; class gp_Pnt2d; diff --git a/src/IGESDimen/IGESDimen_CenterLine.hxx b/src/IGESDimen/IGESDimen_CenterLine.hxx index 5610e906ee..b59b6a5e45 100644 --- a/src/IGESDimen/IGESDimen_CenterLine.hxx +++ b/src/IGESDimen/IGESDimen_CenterLine.hxx @@ -25,7 +25,6 @@ #include #include #include -class Standard_OutOfRange; class gp_Pnt; diff --git a/src/IGESDimen/IGESDimen_CurveDimension.hxx b/src/IGESDimen/IGESDimen_CurveDimension.hxx index 12f841e8b7..5e53b29fff 100644 --- a/src/IGESDimen/IGESDimen_CurveDimension.hxx +++ b/src/IGESDimen/IGESDimen_CurveDimension.hxx @@ -23,7 +23,6 @@ #include #include class IGESDimen_GeneralNote; -class IGESData_IGESEntity; class IGESDimen_LeaderArrow; class IGESDimen_WitnessLine; diff --git a/src/IGESDimen/IGESDimen_DiameterDimension.hxx b/src/IGESDimen/IGESDimen_DiameterDimension.hxx index 1fd75ec44b..06d7d0226c 100644 --- a/src/IGESDimen/IGESDimen_DiameterDimension.hxx +++ b/src/IGESDimen/IGESDimen_DiameterDimension.hxx @@ -25,7 +25,6 @@ #include class IGESDimen_GeneralNote; class IGESDimen_LeaderArrow; -class gp_XY; class gp_Pnt2d; diff --git a/src/IGESDimen/IGESDimen_DimensionDisplayData.hxx b/src/IGESDimen/IGESDimen_DimensionDisplayData.hxx index 3a15b46482..0a78f38997 100644 --- a/src/IGESDimen/IGESDimen_DimensionDisplayData.hxx +++ b/src/IGESDimen/IGESDimen_DimensionDisplayData.hxx @@ -25,8 +25,6 @@ #include #include class TCollection_HAsciiString; -class Standard_DimensionMismatch; -class Standard_OutOfRange; class IGESDimen_DimensionDisplayData; diff --git a/src/IGESDimen/IGESDimen_DimensionedGeometry.hxx b/src/IGESDimen/IGESDimen_DimensionedGeometry.hxx index 6a73318c96..f88721c77e 100644 --- a/src/IGESDimen/IGESDimen_DimensionedGeometry.hxx +++ b/src/IGESDimen/IGESDimen_DimensionedGeometry.hxx @@ -23,8 +23,6 @@ #include #include #include -class IGESData_IGESEntity; -class Standard_OutOfRange; class IGESDimen_DimensionedGeometry; diff --git a/src/IGESDimen/IGESDimen_FlagNote.hxx b/src/IGESDimen/IGESDimen_FlagNote.hxx index 1ccff311aa..d79b31ef77 100644 --- a/src/IGESDimen/IGESDimen_FlagNote.hxx +++ b/src/IGESDimen/IGESDimen_FlagNote.hxx @@ -26,8 +26,6 @@ #include #include class IGESDimen_GeneralNote; -class Standard_OutOfRange; -class gp_XYZ; class gp_Pnt; class IGESDimen_LeaderArrow; diff --git a/src/IGESDimen/IGESDimen_GeneralLabel.hxx b/src/IGESDimen/IGESDimen_GeneralLabel.hxx index 1888d5a6ff..bd33117742 100644 --- a/src/IGESDimen/IGESDimen_GeneralLabel.hxx +++ b/src/IGESDimen/IGESDimen_GeneralLabel.hxx @@ -24,7 +24,6 @@ #include #include class IGESDimen_GeneralNote; -class Standard_OutOfRange; class IGESDimen_LeaderArrow; diff --git a/src/IGESDimen/IGESDimen_GeneralNote.hxx b/src/IGESDimen/IGESDimen_GeneralNote.hxx index f0b130a0f5..28e50ecb8f 100644 --- a/src/IGESDimen/IGESDimen_GeneralNote.hxx +++ b/src/IGESDimen/IGESDimen_GeneralNote.hxx @@ -29,8 +29,6 @@ #include #include #include -class Standard_DimensionMismatch; -class Standard_OutOfRange; class IGESGraph_TextFontDef; class gp_Pnt; class TCollection_HAsciiString; diff --git a/src/IGESDimen/IGESDimen_GeneralSymbol.hxx b/src/IGESDimen/IGESDimen_GeneralSymbol.hxx index 03af3f0054..5a1fbf57c0 100644 --- a/src/IGESDimen/IGESDimen_GeneralSymbol.hxx +++ b/src/IGESDimen/IGESDimen_GeneralSymbol.hxx @@ -26,8 +26,6 @@ #include #include class IGESDimen_GeneralNote; -class Standard_OutOfRange; -class IGESData_IGESEntity; class IGESDimen_LeaderArrow; diff --git a/src/IGESDimen/IGESDimen_LeaderArrow.hxx b/src/IGESDimen/IGESDimen_LeaderArrow.hxx index 8b1fe24a0d..0551cf04d4 100644 --- a/src/IGESDimen/IGESDimen_LeaderArrow.hxx +++ b/src/IGESDimen/IGESDimen_LeaderArrow.hxx @@ -25,8 +25,6 @@ #include #include #include -class Standard_OutOfRange; -class gp_XY; class gp_Pnt2d; class gp_Pnt; diff --git a/src/IGESDimen/IGESDimen_LinearDimension.hxx b/src/IGESDimen/IGESDimen_LinearDimension.hxx index 51a081da6a..2ae46e72ae 100644 --- a/src/IGESDimen/IGESDimen_LinearDimension.hxx +++ b/src/IGESDimen/IGESDimen_LinearDimension.hxx @@ -26,7 +26,6 @@ class IGESDimen_GeneralNote; class IGESDimen_LeaderArrow; class IGESDimen_WitnessLine; -class Standard_OutOfRange; class IGESDimen_LinearDimension; diff --git a/src/IGESDimen/IGESDimen_NewDimensionedGeometry.hxx b/src/IGESDimen/IGESDimen_NewDimensionedGeometry.hxx index 3cb4d4a335..962bc828ca 100644 --- a/src/IGESDimen/IGESDimen_NewDimensionedGeometry.hxx +++ b/src/IGESDimen/IGESDimen_NewDimensionedGeometry.hxx @@ -26,9 +26,6 @@ #include #include #include -class IGESData_IGESEntity; -class Standard_DimensionMismatch; -class Standard_OutOfRange; class gp_Pnt; diff --git a/src/IGESDimen/IGESDimen_NewGeneralNote.hxx b/src/IGESDimen/IGESDimen_NewGeneralNote.hxx index e1e9bd7217..8ed4c7bcaa 100644 --- a/src/IGESDimen/IGESDimen_NewGeneralNote.hxx +++ b/src/IGESDimen/IGESDimen_NewGeneralNote.hxx @@ -30,12 +30,8 @@ #include #include #include -class Standard_DimensionMismatch; -class Standard_OutOfRange; -class gp_XYZ; class gp_Pnt; class TCollection_HAsciiString; -class IGESData_IGESEntity; class IGESDimen_NewGeneralNote; diff --git a/src/IGESDimen/IGESDimen_PointDimension.hxx b/src/IGESDimen/IGESDimen_PointDimension.hxx index 6d8617ccf1..69435177d3 100644 --- a/src/IGESDimen/IGESDimen_PointDimension.hxx +++ b/src/IGESDimen/IGESDimen_PointDimension.hxx @@ -24,7 +24,6 @@ #include class IGESDimen_GeneralNote; class IGESDimen_LeaderArrow; -class IGESData_IGESEntity; class IGESGeom_CircularArc; class IGESGeom_CompositeCurve; diff --git a/src/IGESDimen/IGESDimen_RadiusDimension.hxx b/src/IGESDimen/IGESDimen_RadiusDimension.hxx index 2fd0eb5ca5..11be872653 100644 --- a/src/IGESDimen/IGESDimen_RadiusDimension.hxx +++ b/src/IGESDimen/IGESDimen_RadiusDimension.hxx @@ -26,7 +26,6 @@ #include class IGESDimen_GeneralNote; class IGESDimen_LeaderArrow; -class gp_XY; class gp_Pnt2d; class gp_Pnt; diff --git a/src/IGESDimen/IGESDimen_ReadWriteModule.hxx b/src/IGESDimen/IGESDimen_ReadWriteModule.hxx index 3d27774cac..5c35ef2424 100644 --- a/src/IGESDimen/IGESDimen_ReadWriteModule.hxx +++ b/src/IGESDimen/IGESDimen_ReadWriteModule.hxx @@ -22,7 +22,6 @@ #include #include -class Standard_DomainError; class IGESData_IGESEntity; class IGESData_IGESReaderData; class IGESData_ParamReader; diff --git a/src/IGESDimen/IGESDimen_Section.hxx b/src/IGESDimen/IGESDimen_Section.hxx index a56ac36146..a62d5e00cd 100644 --- a/src/IGESDimen/IGESDimen_Section.hxx +++ b/src/IGESDimen/IGESDimen_Section.hxx @@ -24,7 +24,6 @@ #include #include #include -class Standard_OutOfRange; class gp_Pnt; diff --git a/src/IGESDimen/IGESDimen_SectionedArea.hxx b/src/IGESDimen/IGESDimen_SectionedArea.hxx index d1e18b9057..116c4da430 100644 --- a/src/IGESDimen/IGESDimen_SectionedArea.hxx +++ b/src/IGESDimen/IGESDimen_SectionedArea.hxx @@ -26,9 +26,6 @@ #include #include #include -class IGESData_IGESEntity; -class Standard_OutOfRange; -class gp_XYZ; class gp_Pnt; diff --git a/src/IGESDimen/IGESDimen_ToolAngularDimension.hxx b/src/IGESDimen/IGESDimen_ToolAngularDimension.hxx index c36a577c77..4c7fb29f29 100644 --- a/src/IGESDimen/IGESDimen_ToolAngularDimension.hxx +++ b/src/IGESDimen/IGESDimen_ToolAngularDimension.hxx @@ -22,7 +22,6 @@ #include #include -class Standard_DomainError; class IGESDimen_AngularDimension; class IGESData_IGESReaderData; class IGESData_ParamReader; diff --git a/src/IGESDimen/IGESDimen_ToolBasicDimension.hxx b/src/IGESDimen/IGESDimen_ToolBasicDimension.hxx index 98d9529021..980dca08b3 100644 --- a/src/IGESDimen/IGESDimen_ToolBasicDimension.hxx +++ b/src/IGESDimen/IGESDimen_ToolBasicDimension.hxx @@ -23,7 +23,6 @@ #include #include -class Standard_DomainError; class IGESDimen_BasicDimension; class IGESData_IGESReaderData; class IGESData_ParamReader; diff --git a/src/IGESDimen/IGESDimen_ToolCenterLine.hxx b/src/IGESDimen/IGESDimen_ToolCenterLine.hxx index 04badadcc6..87221e0bae 100644 --- a/src/IGESDimen/IGESDimen_ToolCenterLine.hxx +++ b/src/IGESDimen/IGESDimen_ToolCenterLine.hxx @@ -23,7 +23,6 @@ #include #include -class Standard_DomainError; class IGESDimen_CenterLine; class IGESData_IGESReaderData; class IGESData_ParamReader; diff --git a/src/IGESDimen/IGESDimen_ToolCurveDimension.hxx b/src/IGESDimen/IGESDimen_ToolCurveDimension.hxx index 32c4d14139..55f40ad630 100644 --- a/src/IGESDimen/IGESDimen_ToolCurveDimension.hxx +++ b/src/IGESDimen/IGESDimen_ToolCurveDimension.hxx @@ -22,7 +22,6 @@ #include #include -class Standard_DomainError; class IGESDimen_CurveDimension; class IGESData_IGESReaderData; class IGESData_ParamReader; diff --git a/src/IGESDimen/IGESDimen_ToolDiameterDimension.hxx b/src/IGESDimen/IGESDimen_ToolDiameterDimension.hxx index 681f73d09e..dd5c546754 100644 --- a/src/IGESDimen/IGESDimen_ToolDiameterDimension.hxx +++ b/src/IGESDimen/IGESDimen_ToolDiameterDimension.hxx @@ -22,7 +22,6 @@ #include #include -class Standard_DomainError; class IGESDimen_DiameterDimension; class IGESData_IGESReaderData; class IGESData_ParamReader; diff --git a/src/IGESDimen/IGESDimen_ToolDimensionDisplayData.hxx b/src/IGESDimen/IGESDimen_ToolDimensionDisplayData.hxx index 7d6cdb2b06..8c303d369b 100644 --- a/src/IGESDimen/IGESDimen_ToolDimensionDisplayData.hxx +++ b/src/IGESDimen/IGESDimen_ToolDimensionDisplayData.hxx @@ -23,7 +23,6 @@ #include #include -class Standard_DomainError; class IGESDimen_DimensionDisplayData; class IGESData_IGESReaderData; class IGESData_ParamReader; diff --git a/src/IGESDimen/IGESDimen_ToolDimensionTolerance.hxx b/src/IGESDimen/IGESDimen_ToolDimensionTolerance.hxx index b7f675e4e7..f83cfff28f 100644 --- a/src/IGESDimen/IGESDimen_ToolDimensionTolerance.hxx +++ b/src/IGESDimen/IGESDimen_ToolDimensionTolerance.hxx @@ -23,7 +23,6 @@ #include #include -class Standard_DomainError; class IGESDimen_DimensionTolerance; class IGESData_IGESReaderData; class IGESData_ParamReader; diff --git a/src/IGESDimen/IGESDimen_ToolDimensionUnits.hxx b/src/IGESDimen/IGESDimen_ToolDimensionUnits.hxx index da61ff6d5e..355315afc7 100644 --- a/src/IGESDimen/IGESDimen_ToolDimensionUnits.hxx +++ b/src/IGESDimen/IGESDimen_ToolDimensionUnits.hxx @@ -23,7 +23,6 @@ #include #include -class Standard_DomainError; class IGESDimen_DimensionUnits; class IGESData_IGESReaderData; class IGESData_ParamReader; diff --git a/src/IGESDimen/IGESDimen_ToolDimensionedGeometry.hxx b/src/IGESDimen/IGESDimen_ToolDimensionedGeometry.hxx index 62703d8cab..27ddaa9412 100644 --- a/src/IGESDimen/IGESDimen_ToolDimensionedGeometry.hxx +++ b/src/IGESDimen/IGESDimen_ToolDimensionedGeometry.hxx @@ -23,7 +23,6 @@ #include #include -class Standard_DomainError; class IGESDimen_DimensionedGeometry; class IGESData_IGESReaderData; class IGESData_ParamReader; diff --git a/src/IGESDimen/IGESDimen_ToolFlagNote.hxx b/src/IGESDimen/IGESDimen_ToolFlagNote.hxx index 83ce5b0be8..ef1531f536 100644 --- a/src/IGESDimen/IGESDimen_ToolFlagNote.hxx +++ b/src/IGESDimen/IGESDimen_ToolFlagNote.hxx @@ -22,7 +22,6 @@ #include #include -class Standard_DomainError; class IGESDimen_FlagNote; class IGESData_IGESReaderData; class IGESData_ParamReader; diff --git a/src/IGESDimen/IGESDimen_ToolGeneralLabel.hxx b/src/IGESDimen/IGESDimen_ToolGeneralLabel.hxx index 990e3ef547..5c51d83df0 100644 --- a/src/IGESDimen/IGESDimen_ToolGeneralLabel.hxx +++ b/src/IGESDimen/IGESDimen_ToolGeneralLabel.hxx @@ -22,7 +22,6 @@ #include #include -class Standard_DomainError; class IGESDimen_GeneralLabel; class IGESData_IGESReaderData; class IGESData_ParamReader; diff --git a/src/IGESDimen/IGESDimen_ToolGeneralNote.hxx b/src/IGESDimen/IGESDimen_ToolGeneralNote.hxx index 712c4745a0..db5106e218 100644 --- a/src/IGESDimen/IGESDimen_ToolGeneralNote.hxx +++ b/src/IGESDimen/IGESDimen_ToolGeneralNote.hxx @@ -22,7 +22,6 @@ #include #include -class Standard_DomainError; class IGESDimen_GeneralNote; class IGESData_IGESReaderData; class IGESData_ParamReader; diff --git a/src/IGESDimen/IGESDimen_ToolGeneralSymbol.hxx b/src/IGESDimen/IGESDimen_ToolGeneralSymbol.hxx index 1e32272e7c..2a77f8da1f 100644 --- a/src/IGESDimen/IGESDimen_ToolGeneralSymbol.hxx +++ b/src/IGESDimen/IGESDimen_ToolGeneralSymbol.hxx @@ -22,7 +22,6 @@ #include #include -class Standard_DomainError; class IGESDimen_GeneralSymbol; class IGESData_IGESReaderData; class IGESData_ParamReader; diff --git a/src/IGESDimen/IGESDimen_ToolLeaderArrow.hxx b/src/IGESDimen/IGESDimen_ToolLeaderArrow.hxx index 842e37525b..0f898e8eb8 100644 --- a/src/IGESDimen/IGESDimen_ToolLeaderArrow.hxx +++ b/src/IGESDimen/IGESDimen_ToolLeaderArrow.hxx @@ -22,7 +22,6 @@ #include #include -class Standard_DomainError; class IGESDimen_LeaderArrow; class IGESData_IGESReaderData; class IGESData_ParamReader; diff --git a/src/IGESDimen/IGESDimen_ToolLinearDimension.hxx b/src/IGESDimen/IGESDimen_ToolLinearDimension.hxx index d9b631d597..9ee45b4b61 100644 --- a/src/IGESDimen/IGESDimen_ToolLinearDimension.hxx +++ b/src/IGESDimen/IGESDimen_ToolLinearDimension.hxx @@ -22,7 +22,6 @@ #include #include -class Standard_DomainError; class IGESDimen_LinearDimension; class IGESData_IGESReaderData; class IGESData_ParamReader; diff --git a/src/IGESDimen/IGESDimen_ToolNewDimensionedGeometry.hxx b/src/IGESDimen/IGESDimen_ToolNewDimensionedGeometry.hxx index dc09685bcc..91966cad68 100644 --- a/src/IGESDimen/IGESDimen_ToolNewDimensionedGeometry.hxx +++ b/src/IGESDimen/IGESDimen_ToolNewDimensionedGeometry.hxx @@ -23,7 +23,6 @@ #include #include -class Standard_DomainError; class IGESDimen_NewDimensionedGeometry; class IGESData_IGESReaderData; class IGESData_ParamReader; diff --git a/src/IGESDimen/IGESDimen_ToolNewGeneralNote.hxx b/src/IGESDimen/IGESDimen_ToolNewGeneralNote.hxx index d6588ddd6f..b69ebc243b 100644 --- a/src/IGESDimen/IGESDimen_ToolNewGeneralNote.hxx +++ b/src/IGESDimen/IGESDimen_ToolNewGeneralNote.hxx @@ -22,7 +22,6 @@ #include #include -class Standard_DomainError; class IGESDimen_NewGeneralNote; class IGESData_IGESReaderData; class IGESData_ParamReader; diff --git a/src/IGESDimen/IGESDimen_ToolOrdinateDimension.hxx b/src/IGESDimen/IGESDimen_ToolOrdinateDimension.hxx index 770358a62e..3448d12368 100644 --- a/src/IGESDimen/IGESDimen_ToolOrdinateDimension.hxx +++ b/src/IGESDimen/IGESDimen_ToolOrdinateDimension.hxx @@ -22,7 +22,6 @@ #include #include -class Standard_DomainError; class IGESDimen_OrdinateDimension; class IGESData_IGESReaderData; class IGESData_ParamReader; diff --git a/src/IGESDimen/IGESDimen_ToolPointDimension.hxx b/src/IGESDimen/IGESDimen_ToolPointDimension.hxx index 02a2d512ac..b6d01ab93b 100644 --- a/src/IGESDimen/IGESDimen_ToolPointDimension.hxx +++ b/src/IGESDimen/IGESDimen_ToolPointDimension.hxx @@ -22,7 +22,6 @@ #include #include -class Standard_DomainError; class IGESDimen_PointDimension; class IGESData_IGESReaderData; class IGESData_ParamReader; diff --git a/src/IGESDimen/IGESDimen_ToolRadiusDimension.hxx b/src/IGESDimen/IGESDimen_ToolRadiusDimension.hxx index ecb0ed26b7..e6397d02d7 100644 --- a/src/IGESDimen/IGESDimen_ToolRadiusDimension.hxx +++ b/src/IGESDimen/IGESDimen_ToolRadiusDimension.hxx @@ -22,7 +22,6 @@ #include #include -class Standard_DomainError; class IGESDimen_RadiusDimension; class IGESData_IGESReaderData; class IGESData_ParamReader; diff --git a/src/IGESDimen/IGESDimen_ToolSection.hxx b/src/IGESDimen/IGESDimen_ToolSection.hxx index 726dbd369c..4cbd876025 100644 --- a/src/IGESDimen/IGESDimen_ToolSection.hxx +++ b/src/IGESDimen/IGESDimen_ToolSection.hxx @@ -23,7 +23,6 @@ #include #include -class Standard_DomainError; class IGESDimen_Section; class IGESData_IGESReaderData; class IGESData_ParamReader; diff --git a/src/IGESDimen/IGESDimen_ToolSectionedArea.hxx b/src/IGESDimen/IGESDimen_ToolSectionedArea.hxx index 98b826fce9..ff796b5853 100644 --- a/src/IGESDimen/IGESDimen_ToolSectionedArea.hxx +++ b/src/IGESDimen/IGESDimen_ToolSectionedArea.hxx @@ -22,7 +22,6 @@ #include #include -class Standard_DomainError; class IGESDimen_SectionedArea; class IGESData_IGESReaderData; class IGESData_ParamReader; diff --git a/src/IGESDimen/IGESDimen_ToolWitnessLine.hxx b/src/IGESDimen/IGESDimen_ToolWitnessLine.hxx index 09a4b34be2..87542f1eba 100644 --- a/src/IGESDimen/IGESDimen_ToolWitnessLine.hxx +++ b/src/IGESDimen/IGESDimen_ToolWitnessLine.hxx @@ -23,7 +23,6 @@ #include #include -class Standard_DomainError; class IGESDimen_WitnessLine; class IGESData_IGESReaderData; class IGESData_ParamReader; diff --git a/src/IGESDimen/IGESDimen_WitnessLine.hxx b/src/IGESDimen/IGESDimen_WitnessLine.hxx index 92407ce024..136f2f4845 100644 --- a/src/IGESDimen/IGESDimen_WitnessLine.hxx +++ b/src/IGESDimen/IGESDimen_WitnessLine.hxx @@ -24,7 +24,6 @@ #include #include #include -class Standard_OutOfRange; class gp_Pnt; diff --git a/src/IGESDraw/IGESDraw.hxx b/src/IGESDraw/IGESDraw.hxx index ad94d2fccf..273a9763e9 100644 --- a/src/IGESDraw/IGESDraw.hxx +++ b/src/IGESDraw/IGESDraw.hxx @@ -22,38 +22,6 @@ #include class IGESDraw_Protocol; -class IGESDraw_ConnectPoint; -class IGESDraw_NetworkSubfigureDef; -class IGESDraw_ViewsVisible; -class IGESDraw_ViewsVisibleWithAttr; -class IGESDraw_LabelDisplay; -class IGESDraw_Planar; -class IGESDraw_SegmentedViewsVisible; -class IGESDraw_Drawing; -class IGESDraw_DrawingWithRotation; -class IGESDraw_View; -class IGESDraw_RectArraySubfigure; -class IGESDraw_CircArraySubfigure; -class IGESDraw_NetworkSubfigure; -class IGESDraw_PerspectiveView; -class IGESDraw_ToolConnectPoint; -class IGESDraw_ToolNetworkSubfigureDef; -class IGESDraw_ToolViewsVisible; -class IGESDraw_ToolViewsVisibleWithAttr; -class IGESDraw_ToolLabelDisplay; -class IGESDraw_ToolPlanar; -class IGESDraw_ToolSegmentedViewsVisible; -class IGESDraw_ToolDrawing; -class IGESDraw_ToolDrawingWithRotation; -class IGESDraw_ToolView; -class IGESDraw_ToolRectArraySubfigure; -class IGESDraw_ToolCircArraySubfigure; -class IGESDraw_ToolNetworkSubfigure; -class IGESDraw_ToolPerspectiveView; -class IGESDraw_Protocol; -class IGESDraw_ReadWriteModule; -class IGESDraw_GeneralModule; -class IGESDraw_SpecificModule; //! This package contains the group of classes necessary for diff --git a/src/IGESDraw/IGESDraw_CircArraySubfigure.hxx b/src/IGESDraw/IGESDraw_CircArraySubfigure.hxx index 80cf0a2d58..ffb8e1ae29 100644 --- a/src/IGESDraw/IGESDraw_CircArraySubfigure.hxx +++ b/src/IGESDraw/IGESDraw_CircArraySubfigure.hxx @@ -26,9 +26,6 @@ #include #include #include -class IGESData_IGESEntity; -class Standard_OutOfRange; -class gp_XYZ; class gp_Pnt; diff --git a/src/IGESDraw/IGESDraw_ConnectPoint.hxx b/src/IGESDraw/IGESDraw_ConnectPoint.hxx index f28547f4f3..5c05bda0a1 100644 --- a/src/IGESDraw/IGESDraw_ConnectPoint.hxx +++ b/src/IGESDraw/IGESDraw_ConnectPoint.hxx @@ -24,10 +24,8 @@ #include #include #include -class IGESData_IGESEntity; class TCollection_HAsciiString; class IGESGraph_TextDisplayTemplate; -class gp_XYZ; class gp_Pnt; diff --git a/src/IGESDraw/IGESDraw_Drawing.hxx b/src/IGESDraw/IGESDraw_Drawing.hxx index d51a4313d5..b80f6d8b4e 100644 --- a/src/IGESDraw/IGESDraw_Drawing.hxx +++ b/src/IGESDraw/IGESDraw_Drawing.hxx @@ -27,11 +27,8 @@ #include #include #include -class Standard_DimensionMismatch; -class Standard_OutOfRange; class IGESData_ViewKindEntity; class gp_Pnt2d; -class IGESData_IGESEntity; class gp_XY; class gp_XYZ; diff --git a/src/IGESDraw/IGESDraw_DrawingWithRotation.hxx b/src/IGESDraw/IGESDraw_DrawingWithRotation.hxx index 7faac4c0fb..2a9fc5dc12 100644 --- a/src/IGESDraw/IGESDraw_DrawingWithRotation.hxx +++ b/src/IGESDraw/IGESDraw_DrawingWithRotation.hxx @@ -28,11 +28,8 @@ #include #include #include -class Standard_DimensionMismatch; -class Standard_OutOfRange; class IGESData_ViewKindEntity; class gp_Pnt2d; -class IGESData_IGESEntity; class gp_XY; class gp_XYZ; diff --git a/src/IGESDraw/IGESDraw_LabelDisplay.hxx b/src/IGESDraw/IGESDraw_LabelDisplay.hxx index 6f3c2bca83..9204334a52 100644 --- a/src/IGESDraw/IGESDraw_LabelDisplay.hxx +++ b/src/IGESDraw/IGESDraw_LabelDisplay.hxx @@ -27,8 +27,6 @@ #include #include #include -class Standard_DimensionMismatch; -class Standard_OutOfRange; class IGESData_ViewKindEntity; class gp_Pnt; class IGESDimen_LeaderArrow; diff --git a/src/IGESDraw/IGESDraw_NetworkSubfigure.hxx b/src/IGESDraw/IGESDraw_NetworkSubfigure.hxx index 388ab51e9a..8292582a8d 100644 --- a/src/IGESDraw/IGESDraw_NetworkSubfigure.hxx +++ b/src/IGESDraw/IGESDraw_NetworkSubfigure.hxx @@ -28,8 +28,6 @@ class IGESDraw_NetworkSubfigureDef; class TCollection_HAsciiString; class IGESGraph_TextDisplayTemplate; -class Standard_OutOfRange; -class gp_XYZ; class IGESDraw_ConnectPoint; diff --git a/src/IGESDraw/IGESDraw_NetworkSubfigureDef.hxx b/src/IGESDraw/IGESDraw_NetworkSubfigureDef.hxx index 503370f64b..497fd7cf19 100644 --- a/src/IGESDraw/IGESDraw_NetworkSubfigureDef.hxx +++ b/src/IGESDraw/IGESDraw_NetworkSubfigureDef.hxx @@ -27,8 +27,6 @@ #include class TCollection_HAsciiString; class IGESGraph_TextDisplayTemplate; -class Standard_OutOfRange; -class IGESData_IGESEntity; class IGESDraw_ConnectPoint; diff --git a/src/IGESDraw/IGESDraw_PerspectiveView.hxx b/src/IGESDraw/IGESDraw_PerspectiveView.hxx index b6f2ed66e0..ad6e354f3f 100644 --- a/src/IGESDraw/IGESDraw_PerspectiveView.hxx +++ b/src/IGESDraw/IGESDraw_PerspectiveView.hxx @@ -26,10 +26,6 @@ #include #include #include -class Standard_OutOfRange; -class gp_XYZ; -class gp_XY; -class IGESData_ViewKindEntity; class gp_Vec; class gp_Pnt; class gp_Pnt2d; diff --git a/src/IGESDraw/IGESDraw_Planar.hxx b/src/IGESDraw/IGESDraw_Planar.hxx index c77a7996cb..415d4d7205 100644 --- a/src/IGESDraw/IGESDraw_Planar.hxx +++ b/src/IGESDraw/IGESDraw_Planar.hxx @@ -25,8 +25,6 @@ #include #include class IGESGeom_TransformationMatrix; -class Standard_OutOfRange; -class IGESData_IGESEntity; class IGESDraw_Planar; diff --git a/src/IGESDraw/IGESDraw_ReadWriteModule.hxx b/src/IGESDraw/IGESDraw_ReadWriteModule.hxx index 38a1c6034d..9bf432eda0 100644 --- a/src/IGESDraw/IGESDraw_ReadWriteModule.hxx +++ b/src/IGESDraw/IGESDraw_ReadWriteModule.hxx @@ -22,7 +22,6 @@ #include #include -class Standard_DomainError; class IGESData_IGESEntity; class IGESData_IGESReaderData; class IGESData_ParamReader; diff --git a/src/IGESDraw/IGESDraw_RectArraySubfigure.hxx b/src/IGESDraw/IGESDraw_RectArraySubfigure.hxx index ca3e087888..9e7fa008c0 100644 --- a/src/IGESDraw/IGESDraw_RectArraySubfigure.hxx +++ b/src/IGESDraw/IGESDraw_RectArraySubfigure.hxx @@ -26,9 +26,6 @@ #include #include #include -class IGESData_IGESEntity; -class Standard_OutOfRange; -class gp_XYZ; class gp_Pnt; diff --git a/src/IGESDraw/IGESDraw_SegmentedViewsVisible.hxx b/src/IGESDraw/IGESDraw_SegmentedViewsVisible.hxx index 5b7010d24b..f55a6ffbc1 100644 --- a/src/IGESDraw/IGESDraw_SegmentedViewsVisible.hxx +++ b/src/IGESDraw/IGESDraw_SegmentedViewsVisible.hxx @@ -29,9 +29,6 @@ #include #include #include -class Standard_DimensionMismatch; -class Standard_OutOfRange; -class IGESData_ViewKindEntity; class IGESGraph_Color; class IGESData_LineFontEntity; diff --git a/src/IGESDraw/IGESDraw_ToolCircArraySubfigure.hxx b/src/IGESDraw/IGESDraw_ToolCircArraySubfigure.hxx index f9a0ff744b..65f73a06e5 100644 --- a/src/IGESDraw/IGESDraw_ToolCircArraySubfigure.hxx +++ b/src/IGESDraw/IGESDraw_ToolCircArraySubfigure.hxx @@ -22,7 +22,6 @@ #include #include -class Standard_DomainError; class IGESDraw_CircArraySubfigure; class IGESData_IGESReaderData; class IGESData_ParamReader; diff --git a/src/IGESDraw/IGESDraw_ToolConnectPoint.hxx b/src/IGESDraw/IGESDraw_ToolConnectPoint.hxx index f11c7f4735..a26baab6b6 100644 --- a/src/IGESDraw/IGESDraw_ToolConnectPoint.hxx +++ b/src/IGESDraw/IGESDraw_ToolConnectPoint.hxx @@ -22,7 +22,6 @@ #include #include -class Standard_DomainError; class IGESDraw_ConnectPoint; class IGESData_IGESReaderData; class IGESData_ParamReader; diff --git a/src/IGESDraw/IGESDraw_ToolDrawing.hxx b/src/IGESDraw/IGESDraw_ToolDrawing.hxx index 1110df7264..7a045226ce 100644 --- a/src/IGESDraw/IGESDraw_ToolDrawing.hxx +++ b/src/IGESDraw/IGESDraw_ToolDrawing.hxx @@ -23,7 +23,6 @@ #include #include -class Standard_DomainError; class IGESDraw_Drawing; class IGESData_IGESReaderData; class IGESData_ParamReader; diff --git a/src/IGESDraw/IGESDraw_ToolDrawingWithRotation.hxx b/src/IGESDraw/IGESDraw_ToolDrawingWithRotation.hxx index 4dab1a66c7..260f6e72a7 100644 --- a/src/IGESDraw/IGESDraw_ToolDrawingWithRotation.hxx +++ b/src/IGESDraw/IGESDraw_ToolDrawingWithRotation.hxx @@ -23,7 +23,6 @@ #include #include -class Standard_DomainError; class IGESDraw_DrawingWithRotation; class IGESData_IGESReaderData; class IGESData_ParamReader; diff --git a/src/IGESDraw/IGESDraw_ToolLabelDisplay.hxx b/src/IGESDraw/IGESDraw_ToolLabelDisplay.hxx index 1660e7e98c..e7897b7ef2 100644 --- a/src/IGESDraw/IGESDraw_ToolLabelDisplay.hxx +++ b/src/IGESDraw/IGESDraw_ToolLabelDisplay.hxx @@ -22,7 +22,6 @@ #include #include -class Standard_DomainError; class IGESDraw_LabelDisplay; class IGESData_IGESReaderData; class IGESData_ParamReader; diff --git a/src/IGESDraw/IGESDraw_ToolNetworkSubfigure.hxx b/src/IGESDraw/IGESDraw_ToolNetworkSubfigure.hxx index 0c014bdda0..69dfe5e5f4 100644 --- a/src/IGESDraw/IGESDraw_ToolNetworkSubfigure.hxx +++ b/src/IGESDraw/IGESDraw_ToolNetworkSubfigure.hxx @@ -22,7 +22,6 @@ #include #include -class Standard_DomainError; class IGESDraw_NetworkSubfigure; class IGESData_IGESReaderData; class IGESData_ParamReader; diff --git a/src/IGESDraw/IGESDraw_ToolNetworkSubfigureDef.hxx b/src/IGESDraw/IGESDraw_ToolNetworkSubfigureDef.hxx index 761f56b9a5..4c5a69d008 100644 --- a/src/IGESDraw/IGESDraw_ToolNetworkSubfigureDef.hxx +++ b/src/IGESDraw/IGESDraw_ToolNetworkSubfigureDef.hxx @@ -22,7 +22,6 @@ #include #include -class Standard_DomainError; class IGESDraw_NetworkSubfigureDef; class IGESData_IGESReaderData; class IGESData_ParamReader; diff --git a/src/IGESDraw/IGESDraw_ToolPerspectiveView.hxx b/src/IGESDraw/IGESDraw_ToolPerspectiveView.hxx index 8814f36d66..4063b8dfae 100644 --- a/src/IGESDraw/IGESDraw_ToolPerspectiveView.hxx +++ b/src/IGESDraw/IGESDraw_ToolPerspectiveView.hxx @@ -22,7 +22,6 @@ #include #include -class Standard_DomainError; class IGESDraw_PerspectiveView; class IGESData_IGESReaderData; class IGESData_ParamReader; diff --git a/src/IGESDraw/IGESDraw_ToolPlanar.hxx b/src/IGESDraw/IGESDraw_ToolPlanar.hxx index 90c4dcd922..e340ddc38f 100644 --- a/src/IGESDraw/IGESDraw_ToolPlanar.hxx +++ b/src/IGESDraw/IGESDraw_ToolPlanar.hxx @@ -23,7 +23,6 @@ #include #include -class Standard_DomainError; class IGESDraw_Planar; class IGESData_IGESReaderData; class IGESData_ParamReader; diff --git a/src/IGESDraw/IGESDraw_ToolRectArraySubfigure.hxx b/src/IGESDraw/IGESDraw_ToolRectArraySubfigure.hxx index cbf48c8303..4b0cf3b669 100644 --- a/src/IGESDraw/IGESDraw_ToolRectArraySubfigure.hxx +++ b/src/IGESDraw/IGESDraw_ToolRectArraySubfigure.hxx @@ -22,7 +22,6 @@ #include #include -class Standard_DomainError; class IGESDraw_RectArraySubfigure; class IGESData_IGESReaderData; class IGESData_ParamReader; diff --git a/src/IGESDraw/IGESDraw_ToolSegmentedViewsVisible.hxx b/src/IGESDraw/IGESDraw_ToolSegmentedViewsVisible.hxx index e835cbf03e..d641a11461 100644 --- a/src/IGESDraw/IGESDraw_ToolSegmentedViewsVisible.hxx +++ b/src/IGESDraw/IGESDraw_ToolSegmentedViewsVisible.hxx @@ -22,7 +22,6 @@ #include #include -class Standard_DomainError; class IGESDraw_SegmentedViewsVisible; class IGESData_IGESReaderData; class IGESData_ParamReader; diff --git a/src/IGESDraw/IGESDraw_ToolView.hxx b/src/IGESDraw/IGESDraw_ToolView.hxx index e53c9f427d..7a02bb2e7d 100644 --- a/src/IGESDraw/IGESDraw_ToolView.hxx +++ b/src/IGESDraw/IGESDraw_ToolView.hxx @@ -22,7 +22,6 @@ #include #include -class Standard_DomainError; class IGESDraw_View; class IGESData_IGESReaderData; class IGESData_ParamReader; diff --git a/src/IGESDraw/IGESDraw_ToolViewsVisible.hxx b/src/IGESDraw/IGESDraw_ToolViewsVisible.hxx index f3099cbab8..f84f87b965 100644 --- a/src/IGESDraw/IGESDraw_ToolViewsVisible.hxx +++ b/src/IGESDraw/IGESDraw_ToolViewsVisible.hxx @@ -23,7 +23,6 @@ #include #include -class Standard_DomainError; class IGESDraw_ViewsVisible; class IGESData_IGESReaderData; class IGESData_ParamReader; diff --git a/src/IGESDraw/IGESDraw_ToolViewsVisibleWithAttr.hxx b/src/IGESDraw/IGESDraw_ToolViewsVisibleWithAttr.hxx index 15ef55e16e..265e5a482d 100644 --- a/src/IGESDraw/IGESDraw_ToolViewsVisibleWithAttr.hxx +++ b/src/IGESDraw/IGESDraw_ToolViewsVisibleWithAttr.hxx @@ -23,7 +23,6 @@ #include #include -class Standard_DomainError; class IGESDraw_ViewsVisibleWithAttr; class IGESData_IGESReaderData; class IGESData_ParamReader; diff --git a/src/IGESDraw/IGESDraw_View.hxx b/src/IGESDraw/IGESDraw_View.hxx index 615221d3dc..8c22a9ebaf 100644 --- a/src/IGESDraw/IGESDraw_View.hxx +++ b/src/IGESDraw/IGESDraw_View.hxx @@ -25,8 +25,6 @@ #include #include class IGESGeom_Plane; -class Standard_OutOfRange; -class IGESData_ViewKindEntity; class IGESData_TransfEntity; class gp_XYZ; diff --git a/src/IGESDraw/IGESDraw_ViewsVisible.hxx b/src/IGESDraw/IGESDraw_ViewsVisible.hxx index 8dbeb365d9..b6a7df117e 100644 --- a/src/IGESDraw/IGESDraw_ViewsVisible.hxx +++ b/src/IGESDraw/IGESDraw_ViewsVisible.hxx @@ -25,8 +25,6 @@ #include #include #include -class Standard_OutOfRange; -class IGESData_ViewKindEntity; class IGESData_IGESEntity; diff --git a/src/IGESDraw/IGESDraw_ViewsVisibleWithAttr.hxx b/src/IGESDraw/IGESDraw_ViewsVisibleWithAttr.hxx index da8ee9f513..142f868416 100644 --- a/src/IGESDraw/IGESDraw_ViewsVisibleWithAttr.hxx +++ b/src/IGESDraw/IGESDraw_ViewsVisibleWithAttr.hxx @@ -28,9 +28,6 @@ #include #include #include -class Standard_DimensionMismatch; -class Standard_OutOfRange; -class IGESData_ViewKindEntity; class IGESData_LineFontEntity; class IGESGraph_Color; class IGESData_IGESEntity; diff --git a/src/IGESGeom/IGESGeom.hxx b/src/IGESGeom/IGESGeom.hxx index 22c060b272..86340551cf 100644 --- a/src/IGESGeom/IGESGeom.hxx +++ b/src/IGESGeom/IGESGeom.hxx @@ -22,56 +22,6 @@ #include class IGESGeom_Protocol; -class IGESGeom_CircularArc; -class IGESGeom_CompositeCurve; -class IGESGeom_ConicArc; -class IGESGeom_CopiousData; -class IGESGeom_Plane; -class IGESGeom_Line; -class IGESGeom_SplineCurve; -class IGESGeom_SplineSurface; -class IGESGeom_Point; -class IGESGeom_RuledSurface; -class IGESGeom_SurfaceOfRevolution; -class IGESGeom_TabulatedCylinder; -class IGESGeom_Direction; -class IGESGeom_TransformationMatrix; -class IGESGeom_Flash; -class IGESGeom_BSplineCurve; -class IGESGeom_BSplineSurface; -class IGESGeom_OffsetCurve; -class IGESGeom_OffsetSurface; -class IGESGeom_Boundary; -class IGESGeom_CurveOnSurface; -class IGESGeom_BoundedSurface; -class IGESGeom_TrimmedSurface; -class IGESGeom_ToolCircularArc; -class IGESGeom_ToolCompositeCurve; -class IGESGeom_ToolConicArc; -class IGESGeom_ToolCopiousData; -class IGESGeom_ToolPlane; -class IGESGeom_ToolLine; -class IGESGeom_ToolSplineCurve; -class IGESGeom_ToolSplineSurface; -class IGESGeom_ToolPoint; -class IGESGeom_ToolRuledSurface; -class IGESGeom_ToolSurfaceOfRevolution; -class IGESGeom_ToolTabulatedCylinder; -class IGESGeom_ToolDirection; -class IGESGeom_ToolTransformationMatrix; -class IGESGeom_ToolFlash; -class IGESGeom_ToolBSplineCurve; -class IGESGeom_ToolBSplineSurface; -class IGESGeom_ToolOffsetCurve; -class IGESGeom_ToolOffsetSurface; -class IGESGeom_ToolBoundary; -class IGESGeom_ToolCurveOnSurface; -class IGESGeom_ToolBoundedSurface; -class IGESGeom_ToolTrimmedSurface; -class IGESGeom_Protocol; -class IGESGeom_ReadWriteModule; -class IGESGeom_GeneralModule; -class IGESGeom_SpecificModule; //! This package consists of B-Rep and CSG Solid entities diff --git a/src/IGESGeom/IGESGeom_BSplineCurve.hxx b/src/IGESGeom/IGESGeom_BSplineCurve.hxx index 4349b52d77..fb4eca6147 100644 --- a/src/IGESGeom/IGESGeom_BSplineCurve.hxx +++ b/src/IGESGeom/IGESGeom_BSplineCurve.hxx @@ -27,9 +27,6 @@ #include #include #include -class Standard_DimensionMismatch; -class Standard_OutOfRange; -class gp_XYZ; class gp_Pnt; diff --git a/src/IGESGeom/IGESGeom_BSplineSurface.hxx b/src/IGESGeom/IGESGeom_BSplineSurface.hxx index 92fd496d21..b1c9917e71 100644 --- a/src/IGESGeom/IGESGeom_BSplineSurface.hxx +++ b/src/IGESGeom/IGESGeom_BSplineSurface.hxx @@ -27,8 +27,6 @@ #include #include #include -class Standard_DimensionMismatch; -class Standard_OutOfRange; class gp_Pnt; diff --git a/src/IGESGeom/IGESGeom_Boundary.hxx b/src/IGESGeom/IGESGeom_Boundary.hxx index f2e5bc3d39..528dfaac33 100644 --- a/src/IGESGeom/IGESGeom_Boundary.hxx +++ b/src/IGESGeom/IGESGeom_Boundary.hxx @@ -24,10 +24,7 @@ #include #include #include -class IGESData_IGESEntity; class IGESBasic_HArray1OfHArray1OfIGESEntity; -class Standard_DimensionMismatch; -class Standard_OutOfRange; class IGESGeom_Boundary; diff --git a/src/IGESGeom/IGESGeom_BoundedSurface.hxx b/src/IGESGeom/IGESGeom_BoundedSurface.hxx index bf0b45c2f2..c132e4e9e2 100644 --- a/src/IGESGeom/IGESGeom_BoundedSurface.hxx +++ b/src/IGESGeom/IGESGeom_BoundedSurface.hxx @@ -23,8 +23,6 @@ #include #include #include -class IGESData_IGESEntity; -class Standard_OutOfRange; class IGESGeom_Boundary; diff --git a/src/IGESGeom/IGESGeom_CircularArc.hxx b/src/IGESGeom/IGESGeom_CircularArc.hxx index c9066303c6..fad40fd94a 100644 --- a/src/IGESGeom/IGESGeom_CircularArc.hxx +++ b/src/IGESGeom/IGESGeom_CircularArc.hxx @@ -24,7 +24,6 @@ #include #include #include -class gp_XY; class gp_Pnt2d; class gp_Pnt; class gp_Dir; diff --git a/src/IGESGeom/IGESGeom_CompositeCurve.hxx b/src/IGESGeom/IGESGeom_CompositeCurve.hxx index 9d8f0321a1..334ecc768b 100644 --- a/src/IGESGeom/IGESGeom_CompositeCurve.hxx +++ b/src/IGESGeom/IGESGeom_CompositeCurve.hxx @@ -23,8 +23,6 @@ #include #include #include -class Standard_OutOfRange; -class IGESData_IGESEntity; class IGESGeom_CompositeCurve; diff --git a/src/IGESGeom/IGESGeom_ConicArc.hxx b/src/IGESGeom/IGESGeom_ConicArc.hxx index df39068343..9f6161f4c2 100644 --- a/src/IGESGeom/IGESGeom_ConicArc.hxx +++ b/src/IGESGeom/IGESGeom_ConicArc.hxx @@ -25,7 +25,6 @@ #include #include #include -class gp_XY; class gp_Pnt2d; class gp_Pnt; class gp_Dir; diff --git a/src/IGESGeom/IGESGeom_CopiousData.hxx b/src/IGESGeom/IGESGeom_CopiousData.hxx index d05b97ffb2..e928ea9b42 100644 --- a/src/IGESGeom/IGESGeom_CopiousData.hxx +++ b/src/IGESGeom/IGESGeom_CopiousData.hxx @@ -25,7 +25,6 @@ #include #include #include -class Standard_OutOfRange; class gp_Pnt; class gp_Vec; diff --git a/src/IGESGeom/IGESGeom_CurveOnSurface.hxx b/src/IGESGeom/IGESGeom_CurveOnSurface.hxx index 444dcefa63..db8faaca9b 100644 --- a/src/IGESGeom/IGESGeom_CurveOnSurface.hxx +++ b/src/IGESGeom/IGESGeom_CurveOnSurface.hxx @@ -22,7 +22,6 @@ #include #include -class IGESData_IGESEntity; class IGESGeom_CurveOnSurface; diff --git a/src/IGESGeom/IGESGeom_Direction.hxx b/src/IGESGeom/IGESGeom_Direction.hxx index f4687bc6f3..9321418e33 100644 --- a/src/IGESGeom/IGESGeom_Direction.hxx +++ b/src/IGESGeom/IGESGeom_Direction.hxx @@ -22,7 +22,6 @@ #include #include -class gp_XYZ; class gp_Vec; diff --git a/src/IGESGeom/IGESGeom_Flash.hxx b/src/IGESGeom/IGESGeom_Flash.hxx index e8f1534101..3d18bb58eb 100644 --- a/src/IGESGeom/IGESGeom_Flash.hxx +++ b/src/IGESGeom/IGESGeom_Flash.hxx @@ -25,9 +25,6 @@ #include #include #include -class IGESData_IGESEntity; -class Standard_OutOfRange; -class gp_XY; class gp_Pnt2d; class gp_Pnt; diff --git a/src/IGESGeom/IGESGeom_Line.hxx b/src/IGESGeom/IGESGeom_Line.hxx index 9a47cd7018..246be02f3b 100644 --- a/src/IGESGeom/IGESGeom_Line.hxx +++ b/src/IGESGeom/IGESGeom_Line.hxx @@ -23,7 +23,6 @@ #include #include #include -class gp_XYZ; class gp_Pnt; diff --git a/src/IGESGeom/IGESGeom_OffsetCurve.hxx b/src/IGESGeom/IGESGeom_OffsetCurve.hxx index 74647cc76a..a7cec247b0 100644 --- a/src/IGESGeom/IGESGeom_OffsetCurve.hxx +++ b/src/IGESGeom/IGESGeom_OffsetCurve.hxx @@ -25,8 +25,6 @@ #include #include #include -class IGESData_IGESEntity; -class gp_XYZ; class gp_Vec; diff --git a/src/IGESGeom/IGESGeom_OffsetSurface.hxx b/src/IGESGeom/IGESGeom_OffsetSurface.hxx index 9cff6b7801..5fcd133450 100644 --- a/src/IGESGeom/IGESGeom_OffsetSurface.hxx +++ b/src/IGESGeom/IGESGeom_OffsetSurface.hxx @@ -23,8 +23,6 @@ #include #include #include -class IGESData_IGESEntity; -class gp_XYZ; class gp_Vec; diff --git a/src/IGESGeom/IGESGeom_Plane.hxx b/src/IGESGeom/IGESGeom_Plane.hxx index b294d031fa..dcae18b167 100644 --- a/src/IGESGeom/IGESGeom_Plane.hxx +++ b/src/IGESGeom/IGESGeom_Plane.hxx @@ -25,8 +25,6 @@ #include #include #include -class IGESData_IGESEntity; -class gp_XYZ; class gp_Pnt; diff --git a/src/IGESGeom/IGESGeom_Point.hxx b/src/IGESGeom/IGESGeom_Point.hxx index a8ea847c89..5bc47425d1 100644 --- a/src/IGESGeom/IGESGeom_Point.hxx +++ b/src/IGESGeom/IGESGeom_Point.hxx @@ -24,7 +24,6 @@ #include #include class IGESBasic_SubfigureDef; -class gp_XYZ; class gp_Pnt; diff --git a/src/IGESGeom/IGESGeom_ReadWriteModule.hxx b/src/IGESGeom/IGESGeom_ReadWriteModule.hxx index 2e03a7158a..380ff8781a 100644 --- a/src/IGESGeom/IGESGeom_ReadWriteModule.hxx +++ b/src/IGESGeom/IGESGeom_ReadWriteModule.hxx @@ -22,7 +22,6 @@ #include #include -class Standard_DomainError; class IGESData_IGESEntity; class IGESData_IGESReaderData; class IGESData_ParamReader; diff --git a/src/IGESGeom/IGESGeom_RuledSurface.hxx b/src/IGESGeom/IGESGeom_RuledSurface.hxx index 21b468edc9..0f86ca1b51 100644 --- a/src/IGESGeom/IGESGeom_RuledSurface.hxx +++ b/src/IGESGeom/IGESGeom_RuledSurface.hxx @@ -23,7 +23,6 @@ #include #include #include -class IGESData_IGESEntity; class IGESGeom_RuledSurface; diff --git a/src/IGESGeom/IGESGeom_SplineCurve.hxx b/src/IGESGeom/IGESGeom_SplineCurve.hxx index daec4c37fd..db7d0d94ea 100644 --- a/src/IGESGeom/IGESGeom_SplineCurve.hxx +++ b/src/IGESGeom/IGESGeom_SplineCurve.hxx @@ -25,8 +25,6 @@ #include #include #include -class Standard_DimensionMismatch; -class Standard_OutOfRange; class IGESGeom_SplineCurve; diff --git a/src/IGESGeom/IGESGeom_SplineSurface.hxx b/src/IGESGeom/IGESGeom_SplineSurface.hxx index 3df76ae517..4b7953a08d 100644 --- a/src/IGESGeom/IGESGeom_SplineSurface.hxx +++ b/src/IGESGeom/IGESGeom_SplineSurface.hxx @@ -25,8 +25,6 @@ #include #include #include -class Standard_DimensionMismatch; -class Standard_OutOfRange; class IGESGeom_SplineSurface; diff --git a/src/IGESGeom/IGESGeom_SurfaceOfRevolution.hxx b/src/IGESGeom/IGESGeom_SurfaceOfRevolution.hxx index b67e3a572e..08d2bc84f8 100644 --- a/src/IGESGeom/IGESGeom_SurfaceOfRevolution.hxx +++ b/src/IGESGeom/IGESGeom_SurfaceOfRevolution.hxx @@ -23,7 +23,6 @@ #include #include class IGESGeom_Line; -class IGESData_IGESEntity; class IGESGeom_SurfaceOfRevolution; diff --git a/src/IGESGeom/IGESGeom_TabulatedCylinder.hxx b/src/IGESGeom/IGESGeom_TabulatedCylinder.hxx index a9a75f9eef..b11d192736 100644 --- a/src/IGESGeom/IGESGeom_TabulatedCylinder.hxx +++ b/src/IGESGeom/IGESGeom_TabulatedCylinder.hxx @@ -22,8 +22,6 @@ #include #include -class IGESData_IGESEntity; -class gp_XYZ; class gp_Pnt; diff --git a/src/IGESGeom/IGESGeom_ToolBSplineCurve.hxx b/src/IGESGeom/IGESGeom_ToolBSplineCurve.hxx index 5c0e0d8065..dbf35e452c 100644 --- a/src/IGESGeom/IGESGeom_ToolBSplineCurve.hxx +++ b/src/IGESGeom/IGESGeom_ToolBSplineCurve.hxx @@ -22,7 +22,6 @@ #include #include -class Standard_DomainError; class IGESGeom_BSplineCurve; class IGESData_IGESReaderData; class IGESData_ParamReader; diff --git a/src/IGESGeom/IGESGeom_ToolBSplineSurface.hxx b/src/IGESGeom/IGESGeom_ToolBSplineSurface.hxx index a515656cb8..4ebae5d262 100644 --- a/src/IGESGeom/IGESGeom_ToolBSplineSurface.hxx +++ b/src/IGESGeom/IGESGeom_ToolBSplineSurface.hxx @@ -22,7 +22,6 @@ #include #include -class Standard_DomainError; class IGESGeom_BSplineSurface; class IGESData_IGESReaderData; class IGESData_ParamReader; diff --git a/src/IGESGeom/IGESGeom_ToolBoundary.hxx b/src/IGESGeom/IGESGeom_ToolBoundary.hxx index d5b4d78dbf..3aef54a881 100644 --- a/src/IGESGeom/IGESGeom_ToolBoundary.hxx +++ b/src/IGESGeom/IGESGeom_ToolBoundary.hxx @@ -23,7 +23,6 @@ #include #include -class Standard_DomainError; class IGESGeom_Boundary; class IGESData_IGESReaderData; class IGESData_ParamReader; diff --git a/src/IGESGeom/IGESGeom_ToolBoundedSurface.hxx b/src/IGESGeom/IGESGeom_ToolBoundedSurface.hxx index 96444b19d7..6db0f5b8cd 100644 --- a/src/IGESGeom/IGESGeom_ToolBoundedSurface.hxx +++ b/src/IGESGeom/IGESGeom_ToolBoundedSurface.hxx @@ -22,7 +22,6 @@ #include #include -class Standard_DomainError; class IGESGeom_BoundedSurface; class IGESData_IGESReaderData; class IGESData_ParamReader; diff --git a/src/IGESGeom/IGESGeom_ToolCircularArc.hxx b/src/IGESGeom/IGESGeom_ToolCircularArc.hxx index 03392da7da..1ad9306134 100644 --- a/src/IGESGeom/IGESGeom_ToolCircularArc.hxx +++ b/src/IGESGeom/IGESGeom_ToolCircularArc.hxx @@ -22,7 +22,6 @@ #include #include -class Standard_DomainError; class IGESGeom_CircularArc; class IGESData_IGESReaderData; class IGESData_ParamReader; diff --git a/src/IGESGeom/IGESGeom_ToolCompositeCurve.hxx b/src/IGESGeom/IGESGeom_ToolCompositeCurve.hxx index 5f4b819f9e..20488f7971 100644 --- a/src/IGESGeom/IGESGeom_ToolCompositeCurve.hxx +++ b/src/IGESGeom/IGESGeom_ToolCompositeCurve.hxx @@ -22,7 +22,6 @@ #include #include -class Standard_DomainError; class IGESGeom_CompositeCurve; class IGESData_IGESReaderData; class IGESData_ParamReader; diff --git a/src/IGESGeom/IGESGeom_ToolConicArc.hxx b/src/IGESGeom/IGESGeom_ToolConicArc.hxx index 362e89a6d3..d86bdef9ca 100644 --- a/src/IGESGeom/IGESGeom_ToolConicArc.hxx +++ b/src/IGESGeom/IGESGeom_ToolConicArc.hxx @@ -23,7 +23,6 @@ #include #include -class Standard_DomainError; class IGESGeom_ConicArc; class IGESData_IGESReaderData; class IGESData_ParamReader; diff --git a/src/IGESGeom/IGESGeom_ToolCopiousData.hxx b/src/IGESGeom/IGESGeom_ToolCopiousData.hxx index b043f1f413..e4038b4e15 100644 --- a/src/IGESGeom/IGESGeom_ToolCopiousData.hxx +++ b/src/IGESGeom/IGESGeom_ToolCopiousData.hxx @@ -22,7 +22,6 @@ #include #include -class Standard_DomainError; class IGESGeom_CopiousData; class IGESData_IGESReaderData; class IGESData_ParamReader; diff --git a/src/IGESGeom/IGESGeom_ToolCurveOnSurface.hxx b/src/IGESGeom/IGESGeom_ToolCurveOnSurface.hxx index c794925dfb..f90709b055 100644 --- a/src/IGESGeom/IGESGeom_ToolCurveOnSurface.hxx +++ b/src/IGESGeom/IGESGeom_ToolCurveOnSurface.hxx @@ -23,7 +23,6 @@ #include #include -class Standard_DomainError; class IGESGeom_CurveOnSurface; class IGESData_IGESReaderData; class IGESData_ParamReader; diff --git a/src/IGESGeom/IGESGeom_ToolDirection.hxx b/src/IGESGeom/IGESGeom_ToolDirection.hxx index f0aacec8c8..1329a962c0 100644 --- a/src/IGESGeom/IGESGeom_ToolDirection.hxx +++ b/src/IGESGeom/IGESGeom_ToolDirection.hxx @@ -22,7 +22,6 @@ #include #include -class Standard_DomainError; class IGESGeom_Direction; class IGESData_IGESReaderData; class IGESData_ParamReader; diff --git a/src/IGESGeom/IGESGeom_ToolFlash.hxx b/src/IGESGeom/IGESGeom_ToolFlash.hxx index 27b4ea82ef..b99fea440c 100644 --- a/src/IGESGeom/IGESGeom_ToolFlash.hxx +++ b/src/IGESGeom/IGESGeom_ToolFlash.hxx @@ -23,7 +23,6 @@ #include #include -class Standard_DomainError; class IGESGeom_Flash; class IGESData_IGESReaderData; class IGESData_ParamReader; diff --git a/src/IGESGeom/IGESGeom_ToolLine.hxx b/src/IGESGeom/IGESGeom_ToolLine.hxx index 9f34451580..ce9fad6359 100644 --- a/src/IGESGeom/IGESGeom_ToolLine.hxx +++ b/src/IGESGeom/IGESGeom_ToolLine.hxx @@ -22,7 +22,6 @@ #include #include -class Standard_DomainError; class IGESGeom_Line; class IGESData_IGESReaderData; class IGESData_ParamReader; diff --git a/src/IGESGeom/IGESGeom_ToolOffsetCurve.hxx b/src/IGESGeom/IGESGeom_ToolOffsetCurve.hxx index 3302b15d2e..183c98d8cd 100644 --- a/src/IGESGeom/IGESGeom_ToolOffsetCurve.hxx +++ b/src/IGESGeom/IGESGeom_ToolOffsetCurve.hxx @@ -23,7 +23,6 @@ #include #include -class Standard_DomainError; class IGESGeom_OffsetCurve; class IGESData_IGESReaderData; class IGESData_ParamReader; diff --git a/src/IGESGeom/IGESGeom_ToolOffsetSurface.hxx b/src/IGESGeom/IGESGeom_ToolOffsetSurface.hxx index c93ebdd43a..920ebae129 100644 --- a/src/IGESGeom/IGESGeom_ToolOffsetSurface.hxx +++ b/src/IGESGeom/IGESGeom_ToolOffsetSurface.hxx @@ -22,7 +22,6 @@ #include #include -class Standard_DomainError; class IGESGeom_OffsetSurface; class IGESData_IGESReaderData; class IGESData_ParamReader; diff --git a/src/IGESGeom/IGESGeom_ToolPlane.hxx b/src/IGESGeom/IGESGeom_ToolPlane.hxx index 29bf270f13..855a954111 100644 --- a/src/IGESGeom/IGESGeom_ToolPlane.hxx +++ b/src/IGESGeom/IGESGeom_ToolPlane.hxx @@ -22,7 +22,6 @@ #include #include -class Standard_DomainError; class IGESGeom_Plane; class IGESData_IGESReaderData; class IGESData_ParamReader; diff --git a/src/IGESGeom/IGESGeom_ToolPoint.hxx b/src/IGESGeom/IGESGeom_ToolPoint.hxx index d8e3c43c2b..5773297ec5 100644 --- a/src/IGESGeom/IGESGeom_ToolPoint.hxx +++ b/src/IGESGeom/IGESGeom_ToolPoint.hxx @@ -22,7 +22,6 @@ #include #include -class Standard_DomainError; class IGESGeom_Point; class IGESData_IGESReaderData; class IGESData_ParamReader; diff --git a/src/IGESGeom/IGESGeom_ToolRuledSurface.hxx b/src/IGESGeom/IGESGeom_ToolRuledSurface.hxx index 13e4fd1e12..a5262630af 100644 --- a/src/IGESGeom/IGESGeom_ToolRuledSurface.hxx +++ b/src/IGESGeom/IGESGeom_ToolRuledSurface.hxx @@ -22,7 +22,6 @@ #include #include -class Standard_DomainError; class IGESGeom_RuledSurface; class IGESData_IGESReaderData; class IGESData_ParamReader; diff --git a/src/IGESGeom/IGESGeom_ToolSplineCurve.hxx b/src/IGESGeom/IGESGeom_ToolSplineCurve.hxx index 6868faad3e..7ead055e67 100644 --- a/src/IGESGeom/IGESGeom_ToolSplineCurve.hxx +++ b/src/IGESGeom/IGESGeom_ToolSplineCurve.hxx @@ -22,7 +22,6 @@ #include #include -class Standard_DomainError; class IGESGeom_SplineCurve; class IGESData_IGESReaderData; class IGESData_ParamReader; diff --git a/src/IGESGeom/IGESGeom_ToolSplineSurface.hxx b/src/IGESGeom/IGESGeom_ToolSplineSurface.hxx index ba3eb4a38b..d3f8060eb2 100644 --- a/src/IGESGeom/IGESGeom_ToolSplineSurface.hxx +++ b/src/IGESGeom/IGESGeom_ToolSplineSurface.hxx @@ -22,7 +22,6 @@ #include #include -class Standard_DomainError; class IGESGeom_SplineSurface; class IGESData_IGESReaderData; class IGESData_ParamReader; diff --git a/src/IGESGeom/IGESGeom_ToolSurfaceOfRevolution.hxx b/src/IGESGeom/IGESGeom_ToolSurfaceOfRevolution.hxx index dbd8cd95bd..03e46f682b 100644 --- a/src/IGESGeom/IGESGeom_ToolSurfaceOfRevolution.hxx +++ b/src/IGESGeom/IGESGeom_ToolSurfaceOfRevolution.hxx @@ -22,7 +22,6 @@ #include #include -class Standard_DomainError; class IGESGeom_SurfaceOfRevolution; class IGESData_IGESReaderData; class IGESData_ParamReader; diff --git a/src/IGESGeom/IGESGeom_ToolTabulatedCylinder.hxx b/src/IGESGeom/IGESGeom_ToolTabulatedCylinder.hxx index 746e5f52c0..f0e4050f14 100644 --- a/src/IGESGeom/IGESGeom_ToolTabulatedCylinder.hxx +++ b/src/IGESGeom/IGESGeom_ToolTabulatedCylinder.hxx @@ -22,7 +22,6 @@ #include #include -class Standard_DomainError; class IGESGeom_TabulatedCylinder; class IGESData_IGESReaderData; class IGESData_ParamReader; diff --git a/src/IGESGeom/IGESGeom_ToolTransformationMatrix.hxx b/src/IGESGeom/IGESGeom_ToolTransformationMatrix.hxx index 811d7d8d4e..2de678f61d 100644 --- a/src/IGESGeom/IGESGeom_ToolTransformationMatrix.hxx +++ b/src/IGESGeom/IGESGeom_ToolTransformationMatrix.hxx @@ -23,7 +23,6 @@ #include #include -class Standard_DomainError; class IGESGeom_TransformationMatrix; class IGESData_IGESReaderData; class IGESData_ParamReader; diff --git a/src/IGESGeom/IGESGeom_ToolTrimmedSurface.hxx b/src/IGESGeom/IGESGeom_ToolTrimmedSurface.hxx index 87eeb9a3cc..264a72f364 100644 --- a/src/IGESGeom/IGESGeom_ToolTrimmedSurface.hxx +++ b/src/IGESGeom/IGESGeom_ToolTrimmedSurface.hxx @@ -22,7 +22,6 @@ #include #include -class Standard_DomainError; class IGESGeom_TrimmedSurface; class IGESData_IGESReaderData; class IGESData_ParamReader; diff --git a/src/IGESGeom/IGESGeom_TransformationMatrix.hxx b/src/IGESGeom/IGESGeom_TransformationMatrix.hxx index f52684d266..291c2c5124 100644 --- a/src/IGESGeom/IGESGeom_TransformationMatrix.hxx +++ b/src/IGESGeom/IGESGeom_TransformationMatrix.hxx @@ -24,8 +24,6 @@ #include #include #include -class Standard_DimensionMismatch; -class Standard_OutOfRange; class gp_GTrsf; diff --git a/src/IGESGeom/IGESGeom_TrimmedSurface.hxx b/src/IGESGeom/IGESGeom_TrimmedSurface.hxx index 0400436c92..37fdd9cf5b 100644 --- a/src/IGESGeom/IGESGeom_TrimmedSurface.hxx +++ b/src/IGESGeom/IGESGeom_TrimmedSurface.hxx @@ -24,9 +24,7 @@ #include #include #include -class IGESData_IGESEntity; class IGESGeom_CurveOnSurface; -class Standard_OutOfRange; class IGESGeom_TrimmedSurface; diff --git a/src/IGESGraph/IGESGraph.hxx b/src/IGESGraph/IGESGraph.hxx index c3276ab989..50971606cd 100644 --- a/src/IGESGraph/IGESGraph.hxx +++ b/src/IGESGraph/IGESGraph.hxx @@ -22,38 +22,6 @@ #include class IGESGraph_Protocol; -class IGESGraph_LineFontDefTemplate; -class IGESGraph_LineFontDefPattern; -class IGESGraph_TextFontDef; -class IGESGraph_TextDisplayTemplate; -class IGESGraph_Color; -class IGESGraph_DefinitionLevel; -class IGESGraph_NominalSize; -class IGESGraph_DrawingSize; -class IGESGraph_DrawingUnits; -class IGESGraph_IntercharacterSpacing; -class IGESGraph_LineFontPredefined; -class IGESGraph_HighLight; -class IGESGraph_Pick; -class IGESGraph_UniformRectGrid; -class IGESGraph_ToolLineFontDefTemplate; -class IGESGraph_ToolLineFontDefPattern; -class IGESGraph_ToolTextFontDef; -class IGESGraph_ToolTextDisplayTemplate; -class IGESGraph_ToolColor; -class IGESGraph_ToolDefinitionLevel; -class IGESGraph_ToolNominalSize; -class IGESGraph_ToolDrawingSize; -class IGESGraph_ToolDrawingUnits; -class IGESGraph_ToolIntercharacterSpacing; -class IGESGraph_ToolLineFontPredefined; -class IGESGraph_ToolHighLight; -class IGESGraph_ToolPick; -class IGESGraph_ToolUniformRectGrid; -class IGESGraph_Protocol; -class IGESGraph_ReadWriteModule; -class IGESGraph_GeneralModule; -class IGESGraph_SpecificModule; //! This package contains the group of classes necessary diff --git a/src/IGESGraph/IGESGraph_DefinitionLevel.hxx b/src/IGESGraph/IGESGraph_DefinitionLevel.hxx index 3e9702f1d6..96ad8bec40 100644 --- a/src/IGESGraph/IGESGraph_DefinitionLevel.hxx +++ b/src/IGESGraph/IGESGraph_DefinitionLevel.hxx @@ -23,7 +23,6 @@ #include #include #include -class Standard_OutOfRange; class IGESGraph_DefinitionLevel; diff --git a/src/IGESGraph/IGESGraph_LineFontDefPattern.hxx b/src/IGESGraph/IGESGraph_LineFontDefPattern.hxx index 59c2d2424f..d73be07995 100644 --- a/src/IGESGraph/IGESGraph_LineFontDefPattern.hxx +++ b/src/IGESGraph/IGESGraph_LineFontDefPattern.hxx @@ -26,7 +26,6 @@ #include #include class TCollection_HAsciiString; -class Standard_OutOfRange; class IGESGraph_LineFontDefPattern; diff --git a/src/IGESGraph/IGESGraph_ReadWriteModule.hxx b/src/IGESGraph/IGESGraph_ReadWriteModule.hxx index 2839759638..f05c10fad5 100644 --- a/src/IGESGraph/IGESGraph_ReadWriteModule.hxx +++ b/src/IGESGraph/IGESGraph_ReadWriteModule.hxx @@ -22,7 +22,6 @@ #include #include -class Standard_DomainError; class IGESData_IGESEntity; class IGESData_IGESReaderData; class IGESData_ParamReader; diff --git a/src/IGESGraph/IGESGraph_TextDisplayTemplate.hxx b/src/IGESGraph/IGESGraph_TextDisplayTemplate.hxx index 133048e7d8..835df461a6 100644 --- a/src/IGESGraph/IGESGraph_TextDisplayTemplate.hxx +++ b/src/IGESGraph/IGESGraph_TextDisplayTemplate.hxx @@ -26,7 +26,6 @@ #include #include class IGESGraph_TextFontDef; -class gp_XYZ; class gp_Pnt; diff --git a/src/IGESGraph/IGESGraph_TextFontDef.hxx b/src/IGESGraph/IGESGraph_TextFontDef.hxx index 04777acfe8..366451b282 100644 --- a/src/IGESGraph/IGESGraph_TextFontDef.hxx +++ b/src/IGESGraph/IGESGraph_TextFontDef.hxx @@ -26,8 +26,6 @@ #include class TCollection_HAsciiString; class IGESBasic_HArray1OfHArray1OfInteger; -class Standard_DimensionMismatch; -class Standard_OutOfRange; class IGESGraph_TextFontDef; diff --git a/src/IGESGraph/IGESGraph_ToolColor.hxx b/src/IGESGraph/IGESGraph_ToolColor.hxx index 8d1bb88195..f9ac09d7c7 100644 --- a/src/IGESGraph/IGESGraph_ToolColor.hxx +++ b/src/IGESGraph/IGESGraph_ToolColor.hxx @@ -22,7 +22,6 @@ #include #include -class Standard_DomainError; class IGESGraph_Color; class IGESData_IGESReaderData; class IGESData_ParamReader; diff --git a/src/IGESGraph/IGESGraph_ToolDefinitionLevel.hxx b/src/IGESGraph/IGESGraph_ToolDefinitionLevel.hxx index a373d6afbf..1f21bc81bb 100644 --- a/src/IGESGraph/IGESGraph_ToolDefinitionLevel.hxx +++ b/src/IGESGraph/IGESGraph_ToolDefinitionLevel.hxx @@ -22,7 +22,6 @@ #include #include -class Standard_DomainError; class IGESGraph_DefinitionLevel; class IGESData_IGESReaderData; class IGESData_ParamReader; diff --git a/src/IGESGraph/IGESGraph_ToolDrawingSize.hxx b/src/IGESGraph/IGESGraph_ToolDrawingSize.hxx index d5437bbcbe..f29e14d865 100644 --- a/src/IGESGraph/IGESGraph_ToolDrawingSize.hxx +++ b/src/IGESGraph/IGESGraph_ToolDrawingSize.hxx @@ -23,7 +23,6 @@ #include #include -class Standard_DomainError; class IGESGraph_DrawingSize; class IGESData_IGESReaderData; class IGESData_ParamReader; diff --git a/src/IGESGraph/IGESGraph_ToolDrawingUnits.hxx b/src/IGESGraph/IGESGraph_ToolDrawingUnits.hxx index 414cd6bfb3..3b2345ac2a 100644 --- a/src/IGESGraph/IGESGraph_ToolDrawingUnits.hxx +++ b/src/IGESGraph/IGESGraph_ToolDrawingUnits.hxx @@ -23,7 +23,6 @@ #include #include -class Standard_DomainError; class IGESGraph_DrawingUnits; class IGESData_IGESReaderData; class IGESData_ParamReader; diff --git a/src/IGESGraph/IGESGraph_ToolHighLight.hxx b/src/IGESGraph/IGESGraph_ToolHighLight.hxx index 4c8828d170..4667727b17 100644 --- a/src/IGESGraph/IGESGraph_ToolHighLight.hxx +++ b/src/IGESGraph/IGESGraph_ToolHighLight.hxx @@ -23,7 +23,6 @@ #include #include -class Standard_DomainError; class IGESGraph_HighLight; class IGESData_IGESReaderData; class IGESData_ParamReader; diff --git a/src/IGESGraph/IGESGraph_ToolIntercharacterSpacing.hxx b/src/IGESGraph/IGESGraph_ToolIntercharacterSpacing.hxx index 27884ecddf..4f3ca236b9 100644 --- a/src/IGESGraph/IGESGraph_ToolIntercharacterSpacing.hxx +++ b/src/IGESGraph/IGESGraph_ToolIntercharacterSpacing.hxx @@ -23,7 +23,6 @@ #include #include -class Standard_DomainError; class IGESGraph_IntercharacterSpacing; class IGESData_IGESReaderData; class IGESData_ParamReader; diff --git a/src/IGESGraph/IGESGraph_ToolLineFontDefPattern.hxx b/src/IGESGraph/IGESGraph_ToolLineFontDefPattern.hxx index 074ceac938..1a73919180 100644 --- a/src/IGESGraph/IGESGraph_ToolLineFontDefPattern.hxx +++ b/src/IGESGraph/IGESGraph_ToolLineFontDefPattern.hxx @@ -22,7 +22,6 @@ #include #include -class Standard_DomainError; class IGESGraph_LineFontDefPattern; class IGESData_IGESReaderData; class IGESData_ParamReader; diff --git a/src/IGESGraph/IGESGraph_ToolLineFontDefTemplate.hxx b/src/IGESGraph/IGESGraph_ToolLineFontDefTemplate.hxx index 0efe63a97f..3d607847e7 100644 --- a/src/IGESGraph/IGESGraph_ToolLineFontDefTemplate.hxx +++ b/src/IGESGraph/IGESGraph_ToolLineFontDefTemplate.hxx @@ -22,7 +22,6 @@ #include #include -class Standard_DomainError; class IGESGraph_LineFontDefTemplate; class IGESData_IGESReaderData; class IGESData_ParamReader; diff --git a/src/IGESGraph/IGESGraph_ToolLineFontPredefined.hxx b/src/IGESGraph/IGESGraph_ToolLineFontPredefined.hxx index 92ea8df41f..ab55e97c1d 100644 --- a/src/IGESGraph/IGESGraph_ToolLineFontPredefined.hxx +++ b/src/IGESGraph/IGESGraph_ToolLineFontPredefined.hxx @@ -23,7 +23,6 @@ #include #include -class Standard_DomainError; class IGESGraph_LineFontPredefined; class IGESData_IGESReaderData; class IGESData_ParamReader; diff --git a/src/IGESGraph/IGESGraph_ToolNominalSize.hxx b/src/IGESGraph/IGESGraph_ToolNominalSize.hxx index 388c84ebaa..6de74471b7 100644 --- a/src/IGESGraph/IGESGraph_ToolNominalSize.hxx +++ b/src/IGESGraph/IGESGraph_ToolNominalSize.hxx @@ -23,7 +23,6 @@ #include #include -class Standard_DomainError; class IGESGraph_NominalSize; class IGESData_IGESReaderData; class IGESData_ParamReader; diff --git a/src/IGESGraph/IGESGraph_ToolPick.hxx b/src/IGESGraph/IGESGraph_ToolPick.hxx index 37d299bfc0..8620ef8161 100644 --- a/src/IGESGraph/IGESGraph_ToolPick.hxx +++ b/src/IGESGraph/IGESGraph_ToolPick.hxx @@ -23,7 +23,6 @@ #include #include -class Standard_DomainError; class IGESGraph_Pick; class IGESData_IGESReaderData; class IGESData_ParamReader; diff --git a/src/IGESGraph/IGESGraph_ToolTextDisplayTemplate.hxx b/src/IGESGraph/IGESGraph_ToolTextDisplayTemplate.hxx index 67843cd458..d80a196ea5 100644 --- a/src/IGESGraph/IGESGraph_ToolTextDisplayTemplate.hxx +++ b/src/IGESGraph/IGESGraph_ToolTextDisplayTemplate.hxx @@ -22,7 +22,6 @@ #include #include -class Standard_DomainError; class IGESGraph_TextDisplayTemplate; class IGESData_IGESReaderData; class IGESData_ParamReader; diff --git a/src/IGESGraph/IGESGraph_ToolTextFontDef.hxx b/src/IGESGraph/IGESGraph_ToolTextFontDef.hxx index 2eec869d8d..11becc3fb5 100644 --- a/src/IGESGraph/IGESGraph_ToolTextFontDef.hxx +++ b/src/IGESGraph/IGESGraph_ToolTextFontDef.hxx @@ -22,7 +22,6 @@ #include #include -class Standard_DomainError; class IGESGraph_TextFontDef; class IGESData_IGESReaderData; class IGESData_ParamReader; diff --git a/src/IGESGraph/IGESGraph_ToolUniformRectGrid.hxx b/src/IGESGraph/IGESGraph_ToolUniformRectGrid.hxx index ca642abfb8..3217b47bc5 100644 --- a/src/IGESGraph/IGESGraph_ToolUniformRectGrid.hxx +++ b/src/IGESGraph/IGESGraph_ToolUniformRectGrid.hxx @@ -23,7 +23,6 @@ #include #include -class Standard_DomainError; class IGESGraph_UniformRectGrid; class IGESData_IGESReaderData; class IGESData_ParamReader; diff --git a/src/IGESGraph/IGESGraph_UniformRectGrid.hxx b/src/IGESGraph/IGESGraph_UniformRectGrid.hxx index 999405fdc1..a543ad8921 100644 --- a/src/IGESGraph/IGESGraph_UniformRectGrid.hxx +++ b/src/IGESGraph/IGESGraph_UniformRectGrid.hxx @@ -24,7 +24,6 @@ #include #include #include -class gp_XY; class gp_Pnt2d; class gp_Vec2d; diff --git a/src/IGESSelect/IGESSelect.hxx b/src/IGESSelect/IGESSelect.hxx index b62c5fbf7c..1752b12ecc 100644 --- a/src/IGESSelect/IGESSelect.hxx +++ b/src/IGESSelect/IGESSelect.hxx @@ -24,52 +24,6 @@ #include class IGESData_IGESEntity; class Interface_Graph; -class IGESSelect_EditHeader; -class IGESSelect_EditDirPart; -class IGESSelect_IGESTypeForm; -class IGESSelect_IGESName; -class IGESSelect_SignStatus; -class IGESSelect_SignLevelNumber; -class IGESSelect_SignColor; -class IGESSelect_CounterOfLevelNumber; -class IGESSelect_ViewSorter; -class IGESSelect_DispPerSingleView; -class IGESSelect_DispPerDrawing; -class IGESSelect_SelectVisibleStatus; -class IGESSelect_SelectSubordinate; -class IGESSelect_SelectLevelNumber; -class IGESSelect_SelectName; -class IGESSelect_SelectFromSingleView; -class IGESSelect_SelectFromDrawing; -class IGESSelect_SelectSingleViewFrom; -class IGESSelect_SelectDrawingFrom; -class IGESSelect_SelectBypassGroup; -class IGESSelect_SelectBypassSubfigure; -class IGESSelect_SelectBasicGeom; -class IGESSelect_SelectFaces; -class IGESSelect_SelectPCurves; -class IGESSelect_ModelModifier; -class IGESSelect_FileModifier; -class IGESSelect_FloatFormat; -class IGESSelect_AddFileComment; -class IGESSelect_UpdateFileName; -class IGESSelect_UpdateCreationDate; -class IGESSelect_UpdateLastChange; -class IGESSelect_SetVersion5; -class IGESSelect_SetGlobalParameter; -class IGESSelect_AutoCorrect; -class IGESSelect_ComputeStatus; -class IGESSelect_RebuildDrawings; -class IGESSelect_RebuildGroups; -class IGESSelect_AddGroup; -class IGESSelect_ChangeLevelNumber; -class IGESSelect_ChangeLevelList; -class IGESSelect_SplineToBSpline; -class IGESSelect_RemoveCurves; -class IGESSelect_SetLabel; -class IGESSelect_WorkLibrary; -class IGESSelect_Activator; -class IGESSelect_Dumper; //! This package defines the library of the most used tools for diff --git a/src/IGESSelect/IGESSelect_FloatFormat.hxx b/src/IGESSelect/IGESSelect_FloatFormat.hxx index ba702ab101..d913ce2039 100644 --- a/src/IGESSelect/IGESSelect_FloatFormat.hxx +++ b/src/IGESSelect/IGESSelect_FloatFormat.hxx @@ -26,7 +26,6 @@ #include #include #include -class TCollection_AsciiString; class IFSelect_ContextWrite; class IGESData_IGESWriter; diff --git a/src/IGESSelect/IGESSelect_SelectBypassGroup.hxx b/src/IGESSelect/IGESSelect_SelectBypassGroup.hxx index 007b6e5120..169a57ec12 100644 --- a/src/IGESSelect/IGESSelect_SelectBypassGroup.hxx +++ b/src/IGESSelect/IGESSelect_SelectBypassGroup.hxx @@ -23,7 +23,6 @@ #include #include #include -class Interface_InterfaceError; class Standard_Transient; class Interface_Graph; class Interface_EntityIterator; diff --git a/src/IGESSelect/IGESSelect_SelectBypassSubfigure.hxx b/src/IGESSelect/IGESSelect_SelectBypassSubfigure.hxx index bb86f99a8a..244d7b0b53 100644 --- a/src/IGESSelect/IGESSelect_SelectBypassSubfigure.hxx +++ b/src/IGESSelect/IGESSelect_SelectBypassSubfigure.hxx @@ -23,7 +23,6 @@ #include #include #include -class Interface_InterfaceError; class Standard_Transient; class Interface_Graph; class Interface_EntityIterator; diff --git a/src/IGESSelect/IGESSelect_SelectDrawingFrom.hxx b/src/IGESSelect/IGESSelect_SelectDrawingFrom.hxx index 0881bfeaf7..b7e9accca7 100644 --- a/src/IGESSelect/IGESSelect_SelectDrawingFrom.hxx +++ b/src/IGESSelect/IGESSelect_SelectDrawingFrom.hxx @@ -22,7 +22,6 @@ #include #include -class Interface_InterfaceError; class Interface_EntityIterator; class Interface_Graph; class TCollection_AsciiString; diff --git a/src/IGESSelect/IGESSelect_SelectFromDrawing.hxx b/src/IGESSelect/IGESSelect_SelectFromDrawing.hxx index 7bbb8600e0..5c76129c78 100644 --- a/src/IGESSelect/IGESSelect_SelectFromDrawing.hxx +++ b/src/IGESSelect/IGESSelect_SelectFromDrawing.hxx @@ -21,7 +21,6 @@ #include #include -class Interface_InterfaceError; class Interface_EntityIterator; class Interface_Graph; class TCollection_AsciiString; diff --git a/src/IGESSelect/IGESSelect_SelectFromSingleView.hxx b/src/IGESSelect/IGESSelect_SelectFromSingleView.hxx index ed6c03d437..cee785e050 100644 --- a/src/IGESSelect/IGESSelect_SelectFromSingleView.hxx +++ b/src/IGESSelect/IGESSelect_SelectFromSingleView.hxx @@ -21,7 +21,6 @@ #include #include -class Interface_InterfaceError; class Interface_EntityIterator; class Interface_Graph; class TCollection_AsciiString; diff --git a/src/IGESSelect/IGESSelect_SelectSingleViewFrom.hxx b/src/IGESSelect/IGESSelect_SelectSingleViewFrom.hxx index a03fe34bd1..fa98053a9a 100644 --- a/src/IGESSelect/IGESSelect_SelectSingleViewFrom.hxx +++ b/src/IGESSelect/IGESSelect_SelectSingleViewFrom.hxx @@ -22,7 +22,6 @@ #include #include -class Interface_InterfaceError; class Interface_EntityIterator; class Interface_Graph; class TCollection_AsciiString; diff --git a/src/IGESSelect/IGESSelect_ViewSorter.hxx b/src/IGESSelect/IGESSelect_ViewSorter.hxx index 001d2affea..093959b764 100644 --- a/src/IGESSelect/IGESSelect_ViewSorter.hxx +++ b/src/IGESSelect/IGESSelect_ViewSorter.hxx @@ -27,7 +27,6 @@ #include #include class IGESData_IGESModel; -class Standard_Transient; class IGESData_IGESEntity; class Interface_InterfaceModel; class Interface_Graph; diff --git a/src/IGESSolid/IGESSolid.hxx b/src/IGESSolid/IGESSolid.hxx index b503d20a48..bea960eeac 100644 --- a/src/IGESSolid/IGESSolid.hxx +++ b/src/IGESSolid/IGESSolid.hxx @@ -22,59 +22,6 @@ #include class IGESSolid_Protocol; -class IGESSolid_Block; -class IGESSolid_RightAngularWedge; -class IGESSolid_Cylinder; -class IGESSolid_ConeFrustum; -class IGESSolid_Sphere; -class IGESSolid_Torus; -class IGESSolid_SolidOfRevolution; -class IGESSolid_SolidOfLinearExtrusion; -class IGESSolid_Ellipsoid; -class IGESSolid_BooleanTree; -class IGESSolid_SelectedComponent; -class IGESSolid_SolidAssembly; -class IGESSolid_ManifoldSolid; -class IGESSolid_PlaneSurface; -class IGESSolid_CylindricalSurface; -class IGESSolid_ConicalSurface; -class IGESSolid_SphericalSurface; -class IGESSolid_ToroidalSurface; -class IGESSolid_SolidInstance; -class IGESSolid_VertexList; -class IGESSolid_EdgeList; -class IGESSolid_Loop; -class IGESSolid_Face; -class IGESSolid_Shell; -class IGESSolid_ToolBlock; -class IGESSolid_ToolRightAngularWedge; -class IGESSolid_ToolCylinder; -class IGESSolid_ToolConeFrustum; -class IGESSolid_ToolSphere; -class IGESSolid_ToolTorus; -class IGESSolid_ToolSolidOfRevolution; -class IGESSolid_ToolSolidOfLinearExtrusion; -class IGESSolid_ToolEllipsoid; -class IGESSolid_ToolBooleanTree; -class IGESSolid_ToolSelectedComponent; -class IGESSolid_ToolSolidAssembly; -class IGESSolid_ToolManifoldSolid; -class IGESSolid_ToolPlaneSurface; -class IGESSolid_ToolCylindricalSurface; -class IGESSolid_ToolConicalSurface; -class IGESSolid_ToolSphericalSurface; -class IGESSolid_ToolToroidalSurface; -class IGESSolid_ToolSolidInstance; -class IGESSolid_ToolVertexList; -class IGESSolid_ToolEdgeList; -class IGESSolid_ToolLoop; -class IGESSolid_ToolFace; -class IGESSolid_ToolShell; -class IGESSolid_Protocol; -class IGESSolid_ReadWriteModule; -class IGESSolid_GeneralModule; -class IGESSolid_SpecificModule; -class IGESSolid_TopoBuilder; //! This package consists of B-Rep and CSG Solid entities diff --git a/src/IGESSolid/IGESSolid_Block.hxx b/src/IGESSolid/IGESSolid_Block.hxx index 492ad07f91..9c842f0f08 100644 --- a/src/IGESSolid/IGESSolid_Block.hxx +++ b/src/IGESSolid/IGESSolid_Block.hxx @@ -23,7 +23,6 @@ #include #include #include -class gp_XYZ; class gp_Pnt; class gp_Dir; diff --git a/src/IGESSolid/IGESSolid_BooleanTree.hxx b/src/IGESSolid/IGESSolid_BooleanTree.hxx index 470f9aba2a..a489028222 100644 --- a/src/IGESSolid/IGESSolid_BooleanTree.hxx +++ b/src/IGESSolid/IGESSolid_BooleanTree.hxx @@ -25,8 +25,6 @@ #include #include #include -class Standard_OutOfRange; -class IGESData_IGESEntity; class IGESSolid_BooleanTree; diff --git a/src/IGESSolid/IGESSolid_ConeFrustum.hxx b/src/IGESSolid/IGESSolid_ConeFrustum.hxx index ee9e6c19ff..5603a509cc 100644 --- a/src/IGESSolid/IGESSolid_ConeFrustum.hxx +++ b/src/IGESSolid/IGESSolid_ConeFrustum.hxx @@ -23,7 +23,6 @@ #include #include #include -class gp_XYZ; class gp_Pnt; class gp_Dir; diff --git a/src/IGESSolid/IGESSolid_Cylinder.hxx b/src/IGESSolid/IGESSolid_Cylinder.hxx index 7b4190dd46..fcd3b920dd 100644 --- a/src/IGESSolid/IGESSolid_Cylinder.hxx +++ b/src/IGESSolid/IGESSolid_Cylinder.hxx @@ -23,7 +23,6 @@ #include #include #include -class gp_XYZ; class gp_Pnt; class gp_Dir; diff --git a/src/IGESSolid/IGESSolid_EdgeList.hxx b/src/IGESSolid/IGESSolid_EdgeList.hxx index bfb1e130ea..aabf38acb6 100644 --- a/src/IGESSolid/IGESSolid_EdgeList.hxx +++ b/src/IGESSolid/IGESSolid_EdgeList.hxx @@ -25,9 +25,6 @@ #include #include #include -class Standard_DimensionMismatch; -class Standard_OutOfRange; -class IGESData_IGESEntity; class IGESSolid_VertexList; diff --git a/src/IGESSolid/IGESSolid_Ellipsoid.hxx b/src/IGESSolid/IGESSolid_Ellipsoid.hxx index f5a4881641..5cb1632152 100644 --- a/src/IGESSolid/IGESSolid_Ellipsoid.hxx +++ b/src/IGESSolid/IGESSolid_Ellipsoid.hxx @@ -23,7 +23,6 @@ #include #include #include -class gp_XYZ; class gp_Pnt; class gp_Dir; diff --git a/src/IGESSolid/IGESSolid_Face.hxx b/src/IGESSolid/IGESSolid_Face.hxx index 9d0e6e86ac..c13252e48f 100644 --- a/src/IGESSolid/IGESSolid_Face.hxx +++ b/src/IGESSolid/IGESSolid_Face.hxx @@ -24,8 +24,6 @@ #include #include #include -class IGESData_IGESEntity; -class Standard_OutOfRange; class IGESSolid_Loop; diff --git a/src/IGESSolid/IGESSolid_Loop.hxx b/src/IGESSolid/IGESSolid_Loop.hxx index 5c23329f79..730665e06a 100644 --- a/src/IGESSolid/IGESSolid_Loop.hxx +++ b/src/IGESSolid/IGESSolid_Loop.hxx @@ -27,9 +27,6 @@ #include class IGESBasic_HArray1OfHArray1OfInteger; class IGESBasic_HArray1OfHArray1OfIGESEntity; -class Standard_DimensionMismatch; -class Standard_OutOfRange; -class IGESData_IGESEntity; class IGESSolid_Loop; diff --git a/src/IGESSolid/IGESSolid_ManifoldSolid.hxx b/src/IGESSolid/IGESSolid_ManifoldSolid.hxx index a27cb984e7..28bab7fd18 100644 --- a/src/IGESSolid/IGESSolid_ManifoldSolid.hxx +++ b/src/IGESSolid/IGESSolid_ManifoldSolid.hxx @@ -26,8 +26,6 @@ #include #include class IGESSolid_Shell; -class Standard_DimensionMismatch; -class Standard_OutOfRange; class IGESSolid_ManifoldSolid; diff --git a/src/IGESSolid/IGESSolid_ReadWriteModule.hxx b/src/IGESSolid/IGESSolid_ReadWriteModule.hxx index 0eb551d841..ec0bc376fe 100644 --- a/src/IGESSolid/IGESSolid_ReadWriteModule.hxx +++ b/src/IGESSolid/IGESSolid_ReadWriteModule.hxx @@ -22,7 +22,6 @@ #include #include -class Standard_DomainError; class IGESData_IGESEntity; class IGESData_IGESReaderData; class IGESData_ParamReader; diff --git a/src/IGESSolid/IGESSolid_RightAngularWedge.hxx b/src/IGESSolid/IGESSolid_RightAngularWedge.hxx index 60c28679c7..c56fc59835 100644 --- a/src/IGESSolid/IGESSolid_RightAngularWedge.hxx +++ b/src/IGESSolid/IGESSolid_RightAngularWedge.hxx @@ -23,7 +23,6 @@ #include #include #include -class gp_XYZ; class gp_Pnt; class gp_Dir; diff --git a/src/IGESSolid/IGESSolid_SelectedComponent.hxx b/src/IGESSolid/IGESSolid_SelectedComponent.hxx index 71352a0367..c23184f261 100644 --- a/src/IGESSolid/IGESSolid_SelectedComponent.hxx +++ b/src/IGESSolid/IGESSolid_SelectedComponent.hxx @@ -23,7 +23,6 @@ #include #include class IGESSolid_BooleanTree; -class gp_XYZ; class gp_Pnt; diff --git a/src/IGESSolid/IGESSolid_Shell.hxx b/src/IGESSolid/IGESSolid_Shell.hxx index b296c18ae2..9351f6284f 100644 --- a/src/IGESSolid/IGESSolid_Shell.hxx +++ b/src/IGESSolid/IGESSolid_Shell.hxx @@ -25,8 +25,6 @@ #include #include #include -class Standard_DimensionMismatch; -class Standard_OutOfRange; class IGESSolid_Face; diff --git a/src/IGESSolid/IGESSolid_SolidAssembly.hxx b/src/IGESSolid/IGESSolid_SolidAssembly.hxx index a5fa1266ab..da6d00caa4 100644 --- a/src/IGESSolid/IGESSolid_SolidAssembly.hxx +++ b/src/IGESSolid/IGESSolid_SolidAssembly.hxx @@ -25,9 +25,6 @@ #include #include #include -class Standard_DimensionMismatch; -class Standard_OutOfRange; -class IGESData_IGESEntity; class IGESGeom_TransformationMatrix; diff --git a/src/IGESSolid/IGESSolid_SolidInstance.hxx b/src/IGESSolid/IGESSolid_SolidInstance.hxx index b7901a39ed..fad9db1a33 100644 --- a/src/IGESSolid/IGESSolid_SolidInstance.hxx +++ b/src/IGESSolid/IGESSolid_SolidInstance.hxx @@ -22,7 +22,6 @@ #include #include -class IGESData_IGESEntity; class IGESSolid_SolidInstance; diff --git a/src/IGESSolid/IGESSolid_SolidOfLinearExtrusion.hxx b/src/IGESSolid/IGESSolid_SolidOfLinearExtrusion.hxx index 00aa5af357..d645739a29 100644 --- a/src/IGESSolid/IGESSolid_SolidOfLinearExtrusion.hxx +++ b/src/IGESSolid/IGESSolid_SolidOfLinearExtrusion.hxx @@ -23,8 +23,6 @@ #include #include #include -class IGESData_IGESEntity; -class gp_XYZ; class gp_Dir; diff --git a/src/IGESSolid/IGESSolid_SolidOfRevolution.hxx b/src/IGESSolid/IGESSolid_SolidOfRevolution.hxx index d24e6113ab..c0ca8a7234 100644 --- a/src/IGESSolid/IGESSolid_SolidOfRevolution.hxx +++ b/src/IGESSolid/IGESSolid_SolidOfRevolution.hxx @@ -24,8 +24,6 @@ #include #include #include -class IGESData_IGESEntity; -class gp_XYZ; class gp_Pnt; class gp_Dir; diff --git a/src/IGESSolid/IGESSolid_Sphere.hxx b/src/IGESSolid/IGESSolid_Sphere.hxx index ae5cedf13f..ee49e4b347 100644 --- a/src/IGESSolid/IGESSolid_Sphere.hxx +++ b/src/IGESSolid/IGESSolid_Sphere.hxx @@ -23,7 +23,6 @@ #include #include #include -class gp_XYZ; class gp_Pnt; diff --git a/src/IGESSolid/IGESSolid_ToolBlock.hxx b/src/IGESSolid/IGESSolid_ToolBlock.hxx index 2dd4a0849e..7819da50bb 100644 --- a/src/IGESSolid/IGESSolid_ToolBlock.hxx +++ b/src/IGESSolid/IGESSolid_ToolBlock.hxx @@ -22,7 +22,6 @@ #include #include -class Standard_DomainError; class IGESSolid_Block; class IGESData_IGESReaderData; class IGESData_ParamReader; diff --git a/src/IGESSolid/IGESSolid_ToolBooleanTree.hxx b/src/IGESSolid/IGESSolid_ToolBooleanTree.hxx index 01d609becd..93d536db87 100644 --- a/src/IGESSolid/IGESSolid_ToolBooleanTree.hxx +++ b/src/IGESSolid/IGESSolid_ToolBooleanTree.hxx @@ -22,7 +22,6 @@ #include #include -class Standard_DomainError; class IGESSolid_BooleanTree; class IGESData_IGESReaderData; class IGESData_ParamReader; diff --git a/src/IGESSolid/IGESSolid_ToolConeFrustum.hxx b/src/IGESSolid/IGESSolid_ToolConeFrustum.hxx index a3b8b8a164..f69d9257e2 100644 --- a/src/IGESSolid/IGESSolid_ToolConeFrustum.hxx +++ b/src/IGESSolid/IGESSolid_ToolConeFrustum.hxx @@ -22,7 +22,6 @@ #include #include -class Standard_DomainError; class IGESSolid_ConeFrustum; class IGESData_IGESReaderData; class IGESData_ParamReader; diff --git a/src/IGESSolid/IGESSolid_ToolConicalSurface.hxx b/src/IGESSolid/IGESSolid_ToolConicalSurface.hxx index 38dd430405..55056c356d 100644 --- a/src/IGESSolid/IGESSolid_ToolConicalSurface.hxx +++ b/src/IGESSolid/IGESSolid_ToolConicalSurface.hxx @@ -22,7 +22,6 @@ #include #include -class Standard_DomainError; class IGESSolid_ConicalSurface; class IGESData_IGESReaderData; class IGESData_ParamReader; diff --git a/src/IGESSolid/IGESSolid_ToolCylinder.hxx b/src/IGESSolid/IGESSolid_ToolCylinder.hxx index 951c031277..3bf970f65e 100644 --- a/src/IGESSolid/IGESSolid_ToolCylinder.hxx +++ b/src/IGESSolid/IGESSolid_ToolCylinder.hxx @@ -22,7 +22,6 @@ #include #include -class Standard_DomainError; class IGESSolid_Cylinder; class IGESData_IGESReaderData; class IGESData_ParamReader; diff --git a/src/IGESSolid/IGESSolid_ToolCylindricalSurface.hxx b/src/IGESSolid/IGESSolid_ToolCylindricalSurface.hxx index 29024dd09f..ab57ed37d6 100644 --- a/src/IGESSolid/IGESSolid_ToolCylindricalSurface.hxx +++ b/src/IGESSolid/IGESSolid_ToolCylindricalSurface.hxx @@ -22,7 +22,6 @@ #include #include -class Standard_DomainError; class IGESSolid_CylindricalSurface; class IGESData_IGESReaderData; class IGESData_ParamReader; diff --git a/src/IGESSolid/IGESSolid_ToolEdgeList.hxx b/src/IGESSolid/IGESSolid_ToolEdgeList.hxx index 4e3c837c59..c93468af33 100644 --- a/src/IGESSolid/IGESSolid_ToolEdgeList.hxx +++ b/src/IGESSolid/IGESSolid_ToolEdgeList.hxx @@ -22,7 +22,6 @@ #include #include -class Standard_DomainError; class IGESSolid_EdgeList; class IGESData_IGESReaderData; class IGESData_ParamReader; diff --git a/src/IGESSolid/IGESSolid_ToolEllipsoid.hxx b/src/IGESSolid/IGESSolid_ToolEllipsoid.hxx index f246fed084..ddc56cef45 100644 --- a/src/IGESSolid/IGESSolid_ToolEllipsoid.hxx +++ b/src/IGESSolid/IGESSolid_ToolEllipsoid.hxx @@ -22,7 +22,6 @@ #include #include -class Standard_DomainError; class IGESSolid_Ellipsoid; class IGESData_IGESReaderData; class IGESData_ParamReader; diff --git a/src/IGESSolid/IGESSolid_ToolFace.hxx b/src/IGESSolid/IGESSolid_ToolFace.hxx index b588c1ec62..6dd23b1040 100644 --- a/src/IGESSolid/IGESSolid_ToolFace.hxx +++ b/src/IGESSolid/IGESSolid_ToolFace.hxx @@ -22,7 +22,6 @@ #include #include -class Standard_DomainError; class IGESSolid_Face; class IGESData_IGESReaderData; class IGESData_ParamReader; diff --git a/src/IGESSolid/IGESSolid_ToolLoop.hxx b/src/IGESSolid/IGESSolid_ToolLoop.hxx index 89054688c7..9ffbeba8c9 100644 --- a/src/IGESSolid/IGESSolid_ToolLoop.hxx +++ b/src/IGESSolid/IGESSolid_ToolLoop.hxx @@ -22,7 +22,6 @@ #include #include -class Standard_DomainError; class IGESSolid_Loop; class IGESData_IGESReaderData; class IGESData_ParamReader; diff --git a/src/IGESSolid/IGESSolid_ToolManifoldSolid.hxx b/src/IGESSolid/IGESSolid_ToolManifoldSolid.hxx index e2419eefa5..829a18a366 100644 --- a/src/IGESSolid/IGESSolid_ToolManifoldSolid.hxx +++ b/src/IGESSolid/IGESSolid_ToolManifoldSolid.hxx @@ -22,7 +22,6 @@ #include #include -class Standard_DomainError; class IGESSolid_ManifoldSolid; class IGESData_IGESReaderData; class IGESData_ParamReader; diff --git a/src/IGESSolid/IGESSolid_ToolPlaneSurface.hxx b/src/IGESSolid/IGESSolid_ToolPlaneSurface.hxx index dc5bf05c37..827e585088 100644 --- a/src/IGESSolid/IGESSolid_ToolPlaneSurface.hxx +++ b/src/IGESSolid/IGESSolid_ToolPlaneSurface.hxx @@ -22,7 +22,6 @@ #include #include -class Standard_DomainError; class IGESSolid_PlaneSurface; class IGESData_IGESReaderData; class IGESData_ParamReader; diff --git a/src/IGESSolid/IGESSolid_ToolRightAngularWedge.hxx b/src/IGESSolid/IGESSolid_ToolRightAngularWedge.hxx index 84015a3227..a674a7e6f4 100644 --- a/src/IGESSolid/IGESSolid_ToolRightAngularWedge.hxx +++ b/src/IGESSolid/IGESSolid_ToolRightAngularWedge.hxx @@ -22,7 +22,6 @@ #include #include -class Standard_DomainError; class IGESSolid_RightAngularWedge; class IGESData_IGESReaderData; class IGESData_ParamReader; diff --git a/src/IGESSolid/IGESSolid_ToolSelectedComponent.hxx b/src/IGESSolid/IGESSolid_ToolSelectedComponent.hxx index 2ecc4e2b15..3b858115b6 100644 --- a/src/IGESSolid/IGESSolid_ToolSelectedComponent.hxx +++ b/src/IGESSolid/IGESSolid_ToolSelectedComponent.hxx @@ -22,7 +22,6 @@ #include #include -class Standard_DomainError; class IGESSolid_SelectedComponent; class IGESData_IGESReaderData; class IGESData_ParamReader; diff --git a/src/IGESSolid/IGESSolid_ToolShell.hxx b/src/IGESSolid/IGESSolid_ToolShell.hxx index 3ff3dca816..49ebdaed9d 100644 --- a/src/IGESSolid/IGESSolid_ToolShell.hxx +++ b/src/IGESSolid/IGESSolid_ToolShell.hxx @@ -22,7 +22,6 @@ #include #include -class Standard_DomainError; class IGESSolid_Shell; class IGESData_IGESReaderData; class IGESData_ParamReader; diff --git a/src/IGESSolid/IGESSolid_ToolSolidAssembly.hxx b/src/IGESSolid/IGESSolid_ToolSolidAssembly.hxx index 791c81b486..5b92b30d57 100644 --- a/src/IGESSolid/IGESSolid_ToolSolidAssembly.hxx +++ b/src/IGESSolid/IGESSolid_ToolSolidAssembly.hxx @@ -22,7 +22,6 @@ #include #include -class Standard_DomainError; class IGESSolid_SolidAssembly; class IGESData_IGESReaderData; class IGESData_ParamReader; diff --git a/src/IGESSolid/IGESSolid_ToolSolidInstance.hxx b/src/IGESSolid/IGESSolid_ToolSolidInstance.hxx index a137cedcfb..90963fcc0c 100644 --- a/src/IGESSolid/IGESSolid_ToolSolidInstance.hxx +++ b/src/IGESSolid/IGESSolid_ToolSolidInstance.hxx @@ -22,7 +22,6 @@ #include #include -class Standard_DomainError; class IGESSolid_SolidInstance; class IGESData_IGESReaderData; class IGESData_ParamReader; diff --git a/src/IGESSolid/IGESSolid_ToolSolidOfLinearExtrusion.hxx b/src/IGESSolid/IGESSolid_ToolSolidOfLinearExtrusion.hxx index 341838fcd3..306914169a 100644 --- a/src/IGESSolid/IGESSolid_ToolSolidOfLinearExtrusion.hxx +++ b/src/IGESSolid/IGESSolid_ToolSolidOfLinearExtrusion.hxx @@ -22,7 +22,6 @@ #include #include -class Standard_DomainError; class IGESSolid_SolidOfLinearExtrusion; class IGESData_IGESReaderData; class IGESData_ParamReader; diff --git a/src/IGESSolid/IGESSolid_ToolSolidOfRevolution.hxx b/src/IGESSolid/IGESSolid_ToolSolidOfRevolution.hxx index e559b335dc..930a95759b 100644 --- a/src/IGESSolid/IGESSolid_ToolSolidOfRevolution.hxx +++ b/src/IGESSolid/IGESSolid_ToolSolidOfRevolution.hxx @@ -22,7 +22,6 @@ #include #include -class Standard_DomainError; class IGESSolid_SolidOfRevolution; class IGESData_IGESReaderData; class IGESData_ParamReader; diff --git a/src/IGESSolid/IGESSolid_ToolSphere.hxx b/src/IGESSolid/IGESSolid_ToolSphere.hxx index 03f445b062..33d2cbd794 100644 --- a/src/IGESSolid/IGESSolid_ToolSphere.hxx +++ b/src/IGESSolid/IGESSolid_ToolSphere.hxx @@ -22,7 +22,6 @@ #include #include -class Standard_DomainError; class IGESSolid_Sphere; class IGESData_IGESReaderData; class IGESData_ParamReader; diff --git a/src/IGESSolid/IGESSolid_ToolSphericalSurface.hxx b/src/IGESSolid/IGESSolid_ToolSphericalSurface.hxx index 7700f51784..8addfac02e 100644 --- a/src/IGESSolid/IGESSolid_ToolSphericalSurface.hxx +++ b/src/IGESSolid/IGESSolid_ToolSphericalSurface.hxx @@ -22,7 +22,6 @@ #include #include -class Standard_DomainError; class IGESSolid_SphericalSurface; class IGESData_IGESReaderData; class IGESData_ParamReader; diff --git a/src/IGESSolid/IGESSolid_ToolToroidalSurface.hxx b/src/IGESSolid/IGESSolid_ToolToroidalSurface.hxx index f0ea4411ef..24b2939dbb 100644 --- a/src/IGESSolid/IGESSolid_ToolToroidalSurface.hxx +++ b/src/IGESSolid/IGESSolid_ToolToroidalSurface.hxx @@ -22,7 +22,6 @@ #include #include -class Standard_DomainError; class IGESSolid_ToroidalSurface; class IGESData_IGESReaderData; class IGESData_ParamReader; diff --git a/src/IGESSolid/IGESSolid_ToolTorus.hxx b/src/IGESSolid/IGESSolid_ToolTorus.hxx index e698dad6eb..eda1694d37 100644 --- a/src/IGESSolid/IGESSolid_ToolTorus.hxx +++ b/src/IGESSolid/IGESSolid_ToolTorus.hxx @@ -22,7 +22,6 @@ #include #include -class Standard_DomainError; class IGESSolid_Torus; class IGESData_IGESReaderData; class IGESData_ParamReader; diff --git a/src/IGESSolid/IGESSolid_ToolVertexList.hxx b/src/IGESSolid/IGESSolid_ToolVertexList.hxx index eff89aa166..1142a0cb6e 100644 --- a/src/IGESSolid/IGESSolid_ToolVertexList.hxx +++ b/src/IGESSolid/IGESSolid_ToolVertexList.hxx @@ -22,7 +22,6 @@ #include #include -class Standard_DomainError; class IGESSolid_VertexList; class IGESData_IGESReaderData; class IGESData_ParamReader; diff --git a/src/IGESSolid/IGESSolid_TopoBuilder.hxx b/src/IGESSolid/IGESSolid_TopoBuilder.hxx index 50456dafbc..0ea7c59983 100644 --- a/src/IGESSolid/IGESSolid_TopoBuilder.hxx +++ b/src/IGESSolid/IGESSolid_TopoBuilder.hxx @@ -32,7 +32,6 @@ class IGESData_IGESEntity; class IGESSolid_Loop; class IGESSolid_EdgeList; class IGESSolid_VertexList; -class Standard_DomainError; class gp_XYZ; diff --git a/src/IGESSolid/IGESSolid_Torus.hxx b/src/IGESSolid/IGESSolid_Torus.hxx index a43e359c1a..aed4f63f00 100644 --- a/src/IGESSolid/IGESSolid_Torus.hxx +++ b/src/IGESSolid/IGESSolid_Torus.hxx @@ -23,7 +23,6 @@ #include #include #include -class gp_XYZ; class gp_Pnt; class gp_Dir; diff --git a/src/IGESSolid/IGESSolid_VertexList.hxx b/src/IGESSolid/IGESSolid_VertexList.hxx index d8f0ed8d94..9a1c82a5e4 100644 --- a/src/IGESSolid/IGESSolid_VertexList.hxx +++ b/src/IGESSolid/IGESSolid_VertexList.hxx @@ -23,7 +23,6 @@ #include #include #include -class Standard_OutOfRange; class gp_Pnt; diff --git a/src/IGESToBRep/IGESToBRep.hxx b/src/IGESToBRep/IGESToBRep.hxx index b96970c24c..b9dd61e190 100644 --- a/src/IGESToBRep/IGESToBRep.hxx +++ b/src/IGESToBRep/IGESToBRep.hxx @@ -26,20 +26,8 @@ #include class IGESToBRep_AlgoContainer; class IGESData_IGESEntity; -class TopoDS_Shape; class TopoDS_Edge; class TopoDS_Face; -class IGESToBRep_CurveAndSurface; -class IGESToBRep_BasicSurface; -class IGESToBRep_BasicCurve; -class IGESToBRep_TopoSurface; -class IGESToBRep_TopoCurve; -class IGESToBRep_BRepEntity; -class IGESToBRep_IGESBoundary; -class IGESToBRep_Reader; -class IGESToBRep_Actor; -class IGESToBRep_AlgoContainer; -class IGESToBRep_ToolContainer; //! Provides tools in order to transfer IGES entities diff --git a/src/IGESToBRep/IGESToBRep_BRepEntity.hxx b/src/IGESToBRep/IGESToBRep_BRepEntity.hxx index 3ddc784319..e88fa23199 100644 --- a/src/IGESToBRep/IGESToBRep_BRepEntity.hxx +++ b/src/IGESToBRep/IGESToBRep_BRepEntity.hxx @@ -27,7 +27,6 @@ #include #include -class IGESToBRep_CurveAndSurface; class TopoDS_Shape; class IGESData_IGESEntity; class TopoDS_Vertex; diff --git a/src/IGESToBRep/IGESToBRep_BasicCurve.hxx b/src/IGESToBRep/IGESToBRep_BasicCurve.hxx index 7b9d06dbcf..9ec2fa46e3 100644 --- a/src/IGESToBRep/IGESToBRep_BasicCurve.hxx +++ b/src/IGESToBRep/IGESToBRep_BasicCurve.hxx @@ -24,7 +24,6 @@ #include #include #include -class IGESToBRep_CurveAndSurface; class Geom_Curve; class IGESData_IGESEntity; class Geom2d_Curve; diff --git a/src/IGESToBRep/IGESToBRep_BasicSurface.hxx b/src/IGESToBRep/IGESToBRep_BasicSurface.hxx index ada221b011..95226c1b43 100644 --- a/src/IGESToBRep/IGESToBRep_BasicSurface.hxx +++ b/src/IGESToBRep/IGESToBRep_BasicSurface.hxx @@ -24,7 +24,6 @@ #include #include #include -class IGESToBRep_CurveAndSurface; class Geom_Surface; class IGESData_IGESEntity; class Geom_Plane; diff --git a/src/IGESToBRep/IGESToBRep_IGESBoundary.hxx b/src/IGESToBRep/IGESToBRep_IGESBoundary.hxx index c80fbebc34..d4d3c285fc 100644 --- a/src/IGESToBRep/IGESToBRep_IGESBoundary.hxx +++ b/src/IGESToBRep/IGESToBRep_IGESBoundary.hxx @@ -30,9 +30,6 @@ #include class IGESData_IGESEntity; class ShapeExtend_WireData; -class IGESToBRep_CurveAndSurface; -class TopoDS_Face; -class gp_Trsf2d; class IGESToBRep_IGESBoundary; diff --git a/src/IGESToBRep/IGESToBRep_TopoCurve.hxx b/src/IGESToBRep/IGESToBRep_TopoCurve.hxx index b7cfea0bb8..1bbe6128ca 100644 --- a/src/IGESToBRep/IGESToBRep_TopoCurve.hxx +++ b/src/IGESToBRep/IGESToBRep_TopoCurve.hxx @@ -27,7 +27,6 @@ #include #include #include -class IGESToBRep_CurveAndSurface; class TopoDS_Shape; class IGESData_IGESEntity; class TopoDS_Face; diff --git a/src/IGESToBRep/IGESToBRep_TopoSurface.hxx b/src/IGESToBRep/IGESToBRep_TopoSurface.hxx index 3f19a4ad0b..a1d172c88e 100644 --- a/src/IGESToBRep/IGESToBRep_TopoSurface.hxx +++ b/src/IGESToBRep/IGESToBRep_TopoSurface.hxx @@ -24,7 +24,6 @@ #include #include #include -class IGESToBRep_CurveAndSurface; class TopoDS_Shape; class IGESData_IGESEntity; class IGESGeom_RuledSurface; diff --git a/src/IMeshData/IMeshData_Edge.hxx b/src/IMeshData/IMeshData_Edge.hxx index 21212fbb21..2d4230d181 100644 --- a/src/IMeshData/IMeshData_Edge.hxx +++ b/src/IMeshData/IMeshData_Edge.hxx @@ -26,7 +26,6 @@ #include #include -class IMeshData_Face; //! Interface class representing discrete model of an edge. class IMeshData_Edge : public IMeshData_TessellatedShape, public IMeshData_StatusOwner diff --git a/src/IMeshData/IMeshData_Face.hxx b/src/IMeshData/IMeshData_Face.hxx index 711da8344d..7ae82c0859 100644 --- a/src/IMeshData/IMeshData_Face.hxx +++ b/src/IMeshData/IMeshData_Face.hxx @@ -25,7 +25,6 @@ #include #include -class IMeshData_Wire; class TopoDS_Wire; //! Interface class representing discrete model of a face. diff --git a/src/IMeshData/IMeshData_Model.hxx b/src/IMeshData/IMeshData_Model.hxx index f87ffc6fb9..422d4cb769 100644 --- a/src/IMeshData/IMeshData_Model.hxx +++ b/src/IMeshData/IMeshData_Model.hxx @@ -23,8 +23,6 @@ class TopoDS_Face; class TopoDS_Edge; -class IMeshData_Face; -class IMeshData_Edge; //! Interface class representing discrete model of a shape. class IMeshData_Model : public IMeshData_Shape diff --git a/src/IMeshData/IMeshData_Wire.hxx b/src/IMeshData/IMeshData_Wire.hxx index 6e71e24abc..65e8ba90d4 100644 --- a/src/IMeshData/IMeshData_Wire.hxx +++ b/src/IMeshData/IMeshData_Wire.hxx @@ -23,7 +23,6 @@ #include #include -class IMeshData_Edge; //! Interface class representing discrete model of a wire. //! Wire should represent an ordered set of edges. diff --git a/src/IntAna/IntAna_Int3Pln.hxx b/src/IntAna/IntAna_Int3Pln.hxx index aed74af64e..ed5273aa2e 100644 --- a/src/IntAna/IntAna_Int3Pln.hxx +++ b/src/IntAna/IntAna_Int3Pln.hxx @@ -23,10 +23,7 @@ #include #include -class StdFail_NotDone; -class Standard_DomainError; class gp_Pln; -class gp_Pnt; //! Intersection between 3 planes. The algorithm searches diff --git a/src/IntAna/IntAna_IntConicQuad.hxx b/src/IntAna/IntAna_IntConicQuad.hxx index 4c7f2a1988..9af3a88091 100644 --- a/src/IntAna/IntAna_IntConicQuad.hxx +++ b/src/IntAna/IntAna_IntConicQuad.hxx @@ -25,9 +25,6 @@ #include #include #include -class StdFail_NotDone; -class Standard_OutOfRange; -class Standard_DomainError; class gp_Lin; class IntAna_Quadric; class gp_Circ; @@ -35,7 +32,6 @@ class gp_Elips; class gp_Parab; class gp_Hypr; class gp_Pln; -class gp_Pnt; //! This class provides the analytic intersection between diff --git a/src/IntAna/IntAna_IntLinTorus.hxx b/src/IntAna/IntAna_IntLinTorus.hxx index 95fb3c5bdf..145517d4a3 100644 --- a/src/IntAna/IntAna_IntLinTorus.hxx +++ b/src/IntAna/IntAna_IntLinTorus.hxx @@ -25,11 +25,8 @@ #include #include #include -class StdFail_NotDone; -class Standard_OutOfRange; class gp_Lin; class gp_Torus; -class gp_Pnt; //! Intersection between a line and a torus. diff --git a/src/IntAna/IntAna_IntQuadQuad.hxx b/src/IntAna/IntAna_IntQuadQuad.hxx index 5c3dc74116..85e4e83ebf 100644 --- a/src/IntAna/IntAna_IntQuadQuad.hxx +++ b/src/IntAna/IntAna_IntQuadQuad.hxx @@ -26,14 +26,9 @@ #include #include #include -class Standard_OutOfRange; -class StdFail_NotDone; -class Standard_DomainError; class gp_Cylinder; class IntAna_Quadric; class gp_Cone; -class IntAna_Curve; -class gp_Pnt; //! This class provides the analytic intersection between a diff --git a/src/IntAna/IntAna_QuadQuadGeo.hxx b/src/IntAna/IntAna_QuadQuadGeo.hxx index a784e7276b..70da587c17 100644 --- a/src/IntAna/IntAna_QuadQuadGeo.hxx +++ b/src/IntAna/IntAna_QuadQuadGeo.hxx @@ -27,15 +27,11 @@ #include #include #include -class StdFail_NotDone; -class Standard_DomainError; -class Standard_OutOfRange; class gp_Pln; class gp_Cylinder; class gp_Sphere; class gp_Cone; class gp_Torus; -class gp_Pnt; class gp_Lin; class gp_Circ; class gp_Elips; diff --git a/src/IntAna2d/IntAna2d_AnaIntersection.hxx b/src/IntAna2d/IntAna2d_AnaIntersection.hxx index 102aebc264..d35d9c974a 100644 --- a/src/IntAna2d/IntAna2d_AnaIntersection.hxx +++ b/src/IntAna2d/IntAna2d_AnaIntersection.hxx @@ -24,15 +24,12 @@ #include #include #include -class StdFail_NotDone; -class Standard_OutOfRange; class gp_Lin2d; class gp_Circ2d; class IntAna2d_Conic; class gp_Elips2d; class gp_Parab2d; class gp_Hypr2d; -class IntAna2d_IntPoint; //! Implementation of the analytical intersection between: diff --git a/src/IntAna2d/IntAna2d_IntPoint.hxx b/src/IntAna2d/IntAna2d_IntPoint.hxx index b61bb3a4db..216514c3e7 100644 --- a/src/IntAna2d/IntAna2d_IntPoint.hxx +++ b/src/IntAna2d/IntAna2d_IntPoint.hxx @@ -24,8 +24,6 @@ #include #include #include -class Standard_DomainError; -class gp_Pnt2d; //! Geometrical intersection between two 2d elements. diff --git a/src/IntCurve/IntCurve_IntConicConic.hxx b/src/IntCurve/IntCurve_IntConicConic.hxx index 00f3fe99cf..a7483c68e0 100644 --- a/src/IntCurve/IntCurve_IntConicConic.hxx +++ b/src/IntCurve/IntCurve_IntConicConic.hxx @@ -24,7 +24,6 @@ #include #include #include -class Standard_ConstructionError; class gp_Lin2d; class IntRes2d_Domain; class gp_Circ2d; diff --git a/src/IntCurve/IntCurve_PConic.hxx b/src/IntCurve/IntCurve_PConic.hxx index 17d7910c98..ed3d793ca5 100644 --- a/src/IntCurve/IntCurve_PConic.hxx +++ b/src/IntCurve/IntCurve_PConic.hxx @@ -30,7 +30,6 @@ class gp_Circ2d; class gp_Parab2d; class gp_Hypr2d; class gp_Lin2d; -class gp_Ax22d; //! This class represents a conic from gp as a diff --git a/src/IntCurveSurface/IntCurveSurface_Intersection.hxx b/src/IntCurveSurface/IntCurveSurface_Intersection.hxx index 7b9f3064f0..2153ae9bce 100644 --- a/src/IntCurveSurface/IntCurveSurface_Intersection.hxx +++ b/src/IntCurveSurface/IntCurveSurface_Intersection.hxx @@ -26,8 +26,6 @@ #include #include #include -class StdFail_NotDone; -class Standard_OutOfRange; class IntCurveSurface_IntersectionPoint; class IntCurveSurface_IntersectionSegment; diff --git a/src/IntCurveSurface/IntCurveSurface_IntersectionPoint.hxx b/src/IntCurveSurface/IntCurveSurface_IntersectionPoint.hxx index 4156141f80..3521acfe95 100644 --- a/src/IntCurveSurface/IntCurveSurface_IntersectionPoint.hxx +++ b/src/IntCurveSurface/IntCurveSurface_IntersectionPoint.hxx @@ -24,7 +24,6 @@ #include #include #include -class gp_Pnt; //! Definition of an interserction point between a diff --git a/src/IntCurveSurface/IntCurveSurface_IntersectionSegment.hxx b/src/IntCurveSurface/IntCurveSurface_IntersectionSegment.hxx index d3fef38588..d1feb2cf68 100644 --- a/src/IntCurveSurface/IntCurveSurface_IntersectionSegment.hxx +++ b/src/IntCurveSurface/IntCurveSurface_IntersectionSegment.hxx @@ -22,7 +22,6 @@ #include #include -class IntCurveSurface_IntersectionPoint; //! A IntersectionSegment describes a segment of curve diff --git a/src/IntCurvesFace/IntCurvesFace_Intersector.hxx b/src/IntCurvesFace/IntCurvesFace_Intersector.hxx index b3b74dd59e..c1af3ff4ea 100644 --- a/src/IntCurvesFace/IntCurvesFace_Intersector.hxx +++ b/src/IntCurvesFace/IntCurvesFace_Intersector.hxx @@ -27,7 +27,6 @@ #include class BRepTopAdaptor_TopolTool; -class TopoDS_Face; class gp_Lin; class gp_Pnt; class IntCurveSurface_HInter; diff --git a/src/IntImpParGen/IntImpParGen.hxx b/src/IntImpParGen/IntImpParGen.hxx index f12845da23..d36b28b0e9 100644 --- a/src/IntImpParGen/IntImpParGen.hxx +++ b/src/IntImpParGen/IntImpParGen.hxx @@ -28,10 +28,6 @@ class gp_Vec2d; class IntRes2d_Transition; class IntRes2d_Domain; class gp_Pnt2d; -class IntImpParGen_ImpTool; -class IntImpParGen_ImpParTool; -class IntImpParGen_Intersector; -class IntImpParGen_MyImpParTool; //! Gives a generic algorithm to intersect Implicit Curves diff --git a/src/IntPatch/IntPatch_ALine.hxx b/src/IntPatch/IntPatch_ALine.hxx index 5f012306e0..caf51646f8 100644 --- a/src/IntPatch/IntPatch_ALine.hxx +++ b/src/IntPatch/IntPatch_ALine.hxx @@ -24,7 +24,6 @@ #include #include -class IntAna_Curve; class IntPatch_Point; class IntPatch_ALine; diff --git a/src/IntPatch/IntPatch_GLine.hxx b/src/IntPatch/IntPatch_GLine.hxx index 2eb3c92f84..61cc529bbd 100644 --- a/src/IntPatch/IntPatch_GLine.hxx +++ b/src/IntPatch/IntPatch_GLine.hxx @@ -33,8 +33,6 @@ #include #include #include -class Standard_DomainError; -class Standard_OutOfRange; class gp_Lin; class gp_Circ; class gp_Elips; diff --git a/src/IntPatch/IntPatch_HCurve2dTool.hxx b/src/IntPatch/IntPatch_HCurve2dTool.hxx index 496636389c..86f9899b55 100644 --- a/src/IntPatch/IntPatch_HCurve2dTool.hxx +++ b/src/IntPatch/IntPatch_HCurve2dTool.hxx @@ -34,9 +34,6 @@ #include #include #include -class Standard_OutOfRange; -class Standard_NoSuchObject; -class Standard_DomainError; class gp_Pnt2d; class gp_Vec2d; class Geom2d_BezierCurve; diff --git a/src/IntPatch/IntPatch_Line.hxx b/src/IntPatch/IntPatch_Line.hxx index 8b5c4e8e0a..e92369f5cd 100644 --- a/src/IntPatch/IntPatch_Line.hxx +++ b/src/IntPatch/IntPatch_Line.hxx @@ -25,8 +25,6 @@ #include #include #include -class Standard_DomainError; -class Standard_OutOfRange; class IntPatch_Line; diff --git a/src/IntPatch/IntPatch_Point.hxx b/src/IntPatch/IntPatch_Point.hxx index fcf06f2bcf..b44a1d6c48 100644 --- a/src/IntPatch/IntPatch_Point.hxx +++ b/src/IntPatch/IntPatch_Point.hxx @@ -28,10 +28,7 @@ #include class Adaptor3d_HVertex; -class Standard_DomainError; class gp_Pnt; -class IntSurf_Transition; -class IntSurf_PntOn2S; //! Definition of an intersection point between two surfaces. diff --git a/src/IntPatch/IntPatch_PolyArc.hxx b/src/IntPatch/IntPatch_PolyArc.hxx index e4add5697c..920dc8507b 100644 --- a/src/IntPatch/IntPatch_PolyArc.hxx +++ b/src/IntPatch/IntPatch_PolyArc.hxx @@ -27,7 +27,6 @@ #include #include #include -class Standard_ConstructionError; class Bnd_Box2d; class gp_Pnt2d; diff --git a/src/IntPatch/IntPatch_PolyLine.hxx b/src/IntPatch/IntPatch_PolyLine.hxx index f14f8a456e..01faed224a 100644 --- a/src/IntPatch/IntPatch_PolyLine.hxx +++ b/src/IntPatch/IntPatch_PolyLine.hxx @@ -29,7 +29,6 @@ #include class IntPatch_WLine; class IntPatch_RLine; -class gp_Pnt2d; diff --git a/src/IntPatch/IntPatch_Polygo.hxx b/src/IntPatch/IntPatch_Polygo.hxx index bb7765905c..cf218b17cb 100644 --- a/src/IntPatch/IntPatch_Polygo.hxx +++ b/src/IntPatch/IntPatch_Polygo.hxx @@ -24,7 +24,6 @@ #include #include #include -class Standard_OutOfRange; class gp_Pnt2d; diff --git a/src/IntPatch/IntPatch_RLine.hxx b/src/IntPatch/IntPatch_RLine.hxx index 690fc8bff7..b98bda1c86 100644 --- a/src/IntPatch/IntPatch_RLine.hxx +++ b/src/IntPatch/IntPatch_RLine.hxx @@ -29,8 +29,6 @@ #include #include -class Standard_DomainError; -class Standard_OutOfRange; class IntPatch_Point; class IntSurf_PntOn2S; diff --git a/src/IntPatch/IntPatch_RstInt.hxx b/src/IntPatch/IntPatch_RstInt.hxx index 7f3c4ab52a..66a9d8819d 100644 --- a/src/IntPatch/IntPatch_RstInt.hxx +++ b/src/IntPatch/IntPatch_RstInt.hxx @@ -19,7 +19,6 @@ #include -class Standard_DomainError; class IntPatch_Line; class Adaptor3d_TopolTool; diff --git a/src/IntPatch/IntPatch_WLine.hxx b/src/IntPatch/IntPatch_WLine.hxx index 4f26b91ecf..2f68baaff8 100644 --- a/src/IntPatch/IntPatch_WLine.hxx +++ b/src/IntPatch/IntPatch_WLine.hxx @@ -29,8 +29,6 @@ #include #include -class Standard_OutOfRange; -class Standard_DomainError; class IntPatch_Point; class IntSurf_PntOn2S; class gp_Pnt2d; diff --git a/src/IntPolyh/IntPolyh_MaillageAffinage.hxx b/src/IntPolyh/IntPolyh_MaillageAffinage.hxx index ee78cc2fd4..0ed38877a6 100644 --- a/src/IntPolyh/IntPolyh_MaillageAffinage.hxx +++ b/src/IntPolyh/IntPolyh_MaillageAffinage.hxx @@ -28,7 +28,6 @@ #include #include -class Bnd_Box; class IntPolyh_StartPoint; //! Low-level algorithm to compute intersection of the surfaces diff --git a/src/IntPolyh/IntPolyh_Triangle.hxx b/src/IntPolyh/IntPolyh_Triangle.hxx index 1c046104a8..f3cee2b80a 100644 --- a/src/IntPolyh/IntPolyh_Triangle.hxx +++ b/src/IntPolyh/IntPolyh_Triangle.hxx @@ -23,7 +23,6 @@ #include #include -class IntPolyh_StartPoint; //! The class represents the triangle built from three IntPolyh points //! and three IntPolyh edges. diff --git a/src/IntRes2d/IntRes2d_Domain.hxx b/src/IntRes2d/IntRes2d_Domain.hxx index 3470804b9f..0799227aae 100644 --- a/src/IntRes2d/IntRes2d_Domain.hxx +++ b/src/IntRes2d/IntRes2d_Domain.hxx @@ -25,8 +25,6 @@ #include #include #include -class Standard_DomainError; -class gp_Pnt2d; //! Definition of the domain of parameter on a 2d-curve. diff --git a/src/IntRes2d/IntRes2d_Intersection.hxx b/src/IntRes2d/IntRes2d_Intersection.hxx index 3553054a87..2b28f65c8b 100644 --- a/src/IntRes2d/IntRes2d_Intersection.hxx +++ b/src/IntRes2d/IntRes2d_Intersection.hxx @@ -26,8 +26,6 @@ #include #include #include -class StdFail_NotDone; -class Standard_OutOfRange; class IntRes2d_IntersectionPoint; class IntRes2d_IntersectionSegment; diff --git a/src/IntRes2d/IntRes2d_IntersectionPoint.hxx b/src/IntRes2d/IntRes2d_IntersectionPoint.hxx index cd7b4b39a5..a78fff7547 100644 --- a/src/IntRes2d/IntRes2d_IntersectionPoint.hxx +++ b/src/IntRes2d/IntRes2d_IntersectionPoint.hxx @@ -25,8 +25,6 @@ #include #include #include -class gp_Pnt2d; -class IntRes2d_Transition; //! Definition of an intersection point between two diff --git a/src/IntRes2d/IntRes2d_IntersectionSegment.hxx b/src/IntRes2d/IntRes2d_IntersectionSegment.hxx index fe4b506aa0..79f2cdb730 100644 --- a/src/IntRes2d/IntRes2d_IntersectionSegment.hxx +++ b/src/IntRes2d/IntRes2d_IntersectionSegment.hxx @@ -23,8 +23,6 @@ #include #include -class Standard_DomainError; -class IntRes2d_IntersectionPoint; //! Definition of an intersection curve between diff --git a/src/IntRes2d/IntRes2d_Transition.hxx b/src/IntRes2d/IntRes2d_Transition.hxx index 89b7c863b1..86ba7f411e 100644 --- a/src/IntRes2d/IntRes2d_Transition.hxx +++ b/src/IntRes2d/IntRes2d_Transition.hxx @@ -25,7 +25,6 @@ #include #include #include -class Standard_DomainError; //! Definition of the type of transition near an diff --git a/src/IntSurf/IntSurf_InteriorPoint.hxx b/src/IntSurf/IntSurf_InteriorPoint.hxx index 418948e3f5..63334c7bee 100644 --- a/src/IntSurf/IntSurf_InteriorPoint.hxx +++ b/src/IntSurf/IntSurf_InteriorPoint.hxx @@ -25,9 +25,6 @@ #include #include #include -class gp_Pnt; -class gp_Vec; -class gp_Vec2d; //! Definition of a point solution of the diff --git a/src/IntSurf/IntSurf_LineOn2S.hxx b/src/IntSurf/IntSurf_LineOn2S.hxx index 1d78429ab4..d9575557e6 100644 --- a/src/IntSurf/IntSurf_LineOn2S.hxx +++ b/src/IntSurf/IntSurf_LineOn2S.hxx @@ -28,7 +28,6 @@ #include #include #include -class Standard_OutOfRange; class IntSurf_PntOn2S; diff --git a/src/IntSurf/IntSurf_PathPoint.hxx b/src/IntSurf/IntSurf_PathPoint.hxx index e4ac09c051..d8617163ec 100644 --- a/src/IntSurf/IntSurf_PathPoint.hxx +++ b/src/IntSurf/IntSurf_PathPoint.hxx @@ -28,11 +28,6 @@ #include #include #include -class StdFail_UndefinedDerivative; -class Standard_OutOfRange; -class gp_Pnt; -class gp_Vec; -class gp_Dir2d; diff --git a/src/IntSurf/IntSurf_PntOn2S.hxx b/src/IntSurf/IntSurf_PntOn2S.hxx index 6239fe454a..d9e4bcfeeb 100644 --- a/src/IntSurf/IntSurf_PntOn2S.hxx +++ b/src/IntSurf/IntSurf_PntOn2S.hxx @@ -24,7 +24,6 @@ #include #include #include -class gp_Pnt; class gp_Pnt2d; diff --git a/src/IntSurf/IntSurf_Transition.hxx b/src/IntSurf/IntSurf_Transition.hxx index b0b462489b..831d47e060 100644 --- a/src/IntSurf/IntSurf_Transition.hxx +++ b/src/IntSurf/IntSurf_Transition.hxx @@ -24,7 +24,6 @@ #include #include #include -class Standard_DomainError; //! Definition of the transition at the intersection diff --git a/src/IntTools/IntTools_BeanFaceIntersector.hxx b/src/IntTools/IntTools_BeanFaceIntersector.hxx index 7ee7b6e069..6004773923 100644 --- a/src/IntTools/IntTools_BeanFaceIntersector.hxx +++ b/src/IntTools/IntTools_BeanFaceIntersector.hxx @@ -35,8 +35,6 @@ class Geom_Surface; class IntTools_Context; class TopoDS_Edge; class TopoDS_Face; -class BRepAdaptor_Curve; -class BRepAdaptor_Surface; class IntTools_CurveRangeSample; class Bnd_Box; class IntTools_SurfaceRangeSample; diff --git a/src/IntTools/IntTools_CommonPrt.hxx b/src/IntTools/IntTools_CommonPrt.hxx index ab3a1635ec..3de0603475 100644 --- a/src/IntTools/IntTools_CommonPrt.hxx +++ b/src/IntTools/IntTools_CommonPrt.hxx @@ -27,9 +27,6 @@ #include #include #include -class TopoDS_Edge; -class IntTools_Range; -class gp_Pnt; //! The class is to describe a common part diff --git a/src/IntTools/IntTools_Context.hxx b/src/IntTools/IntTools_Context.hxx index 2d29989439..d09e6266db 100644 --- a/src/IntTools/IntTools_Context.hxx +++ b/src/IntTools/IntTools_Context.hxx @@ -44,7 +44,6 @@ class TopoDS_Vertex; class gp_Pnt2d; class IntTools_Curve; class Bnd_Box; -class TopoDS_Shape; class Bnd_OBB; //! The intersection Context contains geometrical diff --git a/src/IntTools/IntTools_EdgeEdge.hxx b/src/IntTools/IntTools_EdgeEdge.hxx index 9f6086e52c..d7e619e2e5 100644 --- a/src/IntTools/IntTools_EdgeEdge.hxx +++ b/src/IntTools/IntTools_EdgeEdge.hxx @@ -29,10 +29,7 @@ #include #include class Geom_Curve; -class TopoDS_Edge; -class IntTools_Range; class Bnd_Box; -class BRepAdaptor_Curve; diff --git a/src/IntTools/IntTools_EdgeFace.hxx b/src/IntTools/IntTools_EdgeFace.hxx index 8acc5c190e..a48500cfd4 100644 --- a/src/IntTools/IntTools_EdgeFace.hxx +++ b/src/IntTools/IntTools_EdgeFace.hxx @@ -31,11 +31,7 @@ #include #include class IntTools_Context; -class TopoDS_Edge; -class TopoDS_Face; -class IntTools_Range; class gp_Pnt; -class BRepAdaptor_Surface; class IntTools_CommonPrt; //! The class provides Edge/Face intersection algorithm to determine diff --git a/src/IntTools/IntTools_FClass2d.hxx b/src/IntTools/IntTools_FClass2d.hxx index bc838fd7fb..c1fe685123 100644 --- a/src/IntTools/IntTools_FClass2d.hxx +++ b/src/IntTools/IntTools_FClass2d.hxx @@ -30,7 +30,6 @@ #include #include -class TopoDS_Face; class gp_Pnt2d; //! Class provides an algorithm to classify a 2d Point diff --git a/src/IntTools/IntTools_PntOn2Faces.hxx b/src/IntTools/IntTools_PntOn2Faces.hxx index 5827209520..798923222d 100644 --- a/src/IntTools/IntTools_PntOn2Faces.hxx +++ b/src/IntTools/IntTools_PntOn2Faces.hxx @@ -22,7 +22,6 @@ #include #include -class IntTools_PntOnFace; //! Contains two points PntOnFace from IntTools and a flag diff --git a/src/IntTools/IntTools_PntOnFace.hxx b/src/IntTools/IntTools_PntOnFace.hxx index ad05737cd4..5298a58d1c 100644 --- a/src/IntTools/IntTools_PntOnFace.hxx +++ b/src/IntTools/IntTools_PntOnFace.hxx @@ -24,8 +24,6 @@ #include #include #include -class TopoDS_Face; -class gp_Pnt; //! Contains a Face, a 3d point, corresponded UV parameters and a flag diff --git a/src/IntTools/IntTools_ShrunkRange.hxx b/src/IntTools/IntTools_ShrunkRange.hxx index cf3a02c650..90b4ca1d02 100644 --- a/src/IntTools/IntTools_ShrunkRange.hxx +++ b/src/IntTools/IntTools_ShrunkRange.hxx @@ -25,9 +25,6 @@ #include #include class IntTools_Context; -class TopoDS_Edge; -class TopoDS_Vertex; -class Bnd_Box; diff --git a/src/IntTools/IntTools_SurfaceRangeSample.hxx b/src/IntTools/IntTools_SurfaceRangeSample.hxx index b59ac38b44..68c698f06f 100644 --- a/src/IntTools/IntTools_SurfaceRangeSample.hxx +++ b/src/IntTools/IntTools_SurfaceRangeSample.hxx @@ -24,7 +24,6 @@ #include #include #include -class IntTools_CurveRangeSample; class IntTools_Range; diff --git a/src/IntTools/IntTools_WLineTool.hxx b/src/IntTools/IntTools_WLineTool.hxx index e31207bb1a..89bb5a446a 100644 --- a/src/IntTools/IntTools_WLineTool.hxx +++ b/src/IntTools/IntTools_WLineTool.hxx @@ -21,7 +21,6 @@ class TopoDS_Face; class GeomInt_LineConstructor; class IntTools_Context; -class Adaptor3d_TopolTool; //! IntTools_WLineTool provides set of static methods related to walking lines. class IntTools_WLineTool diff --git a/src/IntWalk/IntWalk_PWalking.hxx b/src/IntWalk/IntWalk_PWalking.hxx index ccd492f986..d2442ad0ff 100644 --- a/src/IntWalk/IntWalk_PWalking.hxx +++ b/src/IntWalk/IntWalk_PWalking.hxx @@ -26,7 +26,6 @@ #include #include -class IntSurf_LineOn2S; class gp_Pnt; //! This class implements an algorithm to determine the diff --git a/src/Interface/Interface_Check.hxx b/src/Interface/Interface_Check.hxx index e5f5d21d50..5b8d1b4112 100644 --- a/src/Interface/Interface_Check.hxx +++ b/src/Interface/Interface_Check.hxx @@ -26,8 +26,6 @@ #include #include #include -class Standard_Transient; -class Standard_OutOfRange; class Message_Msg; class TCollection_HAsciiString; diff --git a/src/Interface/Interface_CheckIterator.hxx b/src/Interface/Interface_CheckIterator.hxx index 021aa25370..a4f46f7172 100644 --- a/src/Interface/Interface_CheckIterator.hxx +++ b/src/Interface/Interface_CheckIterator.hxx @@ -31,7 +31,6 @@ #include class Interface_InterfaceModel; class Interface_IntVal; -class Standard_NoSuchObject; class Interface_Check; class Standard_Transient; diff --git a/src/Interface/Interface_CheckTool.hxx b/src/Interface/Interface_CheckTool.hxx index 98408c0c80..bf999bc913 100644 --- a/src/Interface/Interface_CheckTool.hxx +++ b/src/Interface/Interface_CheckTool.hxx @@ -25,13 +25,11 @@ #include #include class Interface_GTool; -class Interface_CheckFailure; class Interface_InterfaceModel; class Interface_Protocol; class Interface_Graph; class Interface_HGraph; class Standard_Transient; -class Interface_ShareTool; class Interface_Check; class Interface_CheckIterator; class Interface_EntityIterator; diff --git a/src/Interface/Interface_CopyControl.hxx b/src/Interface/Interface_CopyControl.hxx index 9d22f5e705..8d505c2ed9 100644 --- a/src/Interface/Interface_CopyControl.hxx +++ b/src/Interface/Interface_CopyControl.hxx @@ -22,8 +22,6 @@ #include #include -class Interface_InterfaceError; -class Standard_Transient; class Interface_CopyControl; diff --git a/src/Interface/Interface_CopyMap.hxx b/src/Interface/Interface_CopyMap.hxx index a3b838f34a..02c3664002 100644 --- a/src/Interface/Interface_CopyMap.hxx +++ b/src/Interface/Interface_CopyMap.hxx @@ -24,7 +24,6 @@ #include #include class Interface_InterfaceModel; -class Interface_InterfaceError; class Standard_Transient; diff --git a/src/Interface/Interface_CopyTool.hxx b/src/Interface/Interface_CopyTool.hxx index 1f5ddf4225..a17758bb25 100644 --- a/src/Interface/Interface_CopyTool.hxx +++ b/src/Interface/Interface_CopyTool.hxx @@ -31,8 +31,6 @@ class Interface_CopyControl; class Interface_CopyMap; class Standard_Transient; class Interface_GeneralModule; -class Interface_InterfaceError; -class Interface_GeneralLib; class Interface_Protocol; class Interface_EntityIterator; diff --git a/src/Interface/Interface_EntityCluster.hxx b/src/Interface/Interface_EntityCluster.hxx index 15bc444311..6b16440423 100644 --- a/src/Interface/Interface_EntityCluster.hxx +++ b/src/Interface/Interface_EntityCluster.hxx @@ -23,10 +23,6 @@ #include #include #include -class Standard_Transient; -class Standard_OutOfRange; -class Standard_NullObject; -class Interface_EntityList; class Interface_EntityIterator; diff --git a/src/Interface/Interface_EntityIterator.hxx b/src/Interface/Interface_EntityIterator.hxx index 48beaf7ad3..7937688f46 100644 --- a/src/Interface/Interface_EntityIterator.hxx +++ b/src/Interface/Interface_EntityIterator.hxx @@ -26,8 +26,6 @@ #include #include class Interface_IntVal; -class Standard_NoMoreObject; -class Standard_NoSuchObject; class Standard_Transient; diff --git a/src/Interface/Interface_EntityList.hxx b/src/Interface/Interface_EntityList.hxx index 1ba4a3ce9c..ef2c037fdc 100644 --- a/src/Interface/Interface_EntityList.hxx +++ b/src/Interface/Interface_EntityList.hxx @@ -24,10 +24,6 @@ #include #include #include -class Standard_Transient; -class Standard_OutOfRange; -class Interface_InterfaceError; -class Standard_NullObject; class Interface_EntityIterator; diff --git a/src/Interface/Interface_FileReaderData.hxx b/src/Interface/Interface_FileReaderData.hxx index c8caeaffc8..2cd9e2f741 100644 --- a/src/Interface/Interface_FileReaderData.hxx +++ b/src/Interface/Interface_FileReaderData.hxx @@ -29,11 +29,9 @@ #include #include class Interface_ParamSet; -class Standard_NoSuchObject; class TCollection_AsciiString; class Interface_FileParameter; class Interface_ParamList; -class Standard_Transient; class Interface_FileReaderData; diff --git a/src/Interface/Interface_FileReaderTool.hxx b/src/Interface/Interface_FileReaderTool.hxx index 3f78edab8b..d870332370 100644 --- a/src/Interface/Interface_FileReaderTool.hxx +++ b/src/Interface/Interface_FileReaderTool.hxx @@ -28,8 +28,6 @@ class Interface_Protocol; class Interface_FileReaderData; class Interface_InterfaceModel; class Message_Messenger; -class Standard_DomainError; -class Standard_NoSuchObject; class Interface_Check; class Standard_Transient; class Interface_GeneralLib; diff --git a/src/Interface/Interface_GTool.hxx b/src/Interface/Interface_GTool.hxx index fe61cddff8..4e63498dcf 100644 --- a/src/Interface/Interface_GTool.hxx +++ b/src/Interface/Interface_GTool.hxx @@ -29,9 +29,7 @@ #include class Interface_Protocol; class Interface_SignType; -class Standard_Transient; class Interface_InterfaceModel; -class Interface_GeneralLib; class Interface_GeneralModule; diff --git a/src/Interface/Interface_GeneralModule.hxx b/src/Interface/Interface_GeneralModule.hxx index ba69bba5b0..cc37b6b997 100644 --- a/src/Interface/Interface_GeneralModule.hxx +++ b/src/Interface/Interface_GeneralModule.hxx @@ -24,7 +24,6 @@ #include #include class Interface_InterfaceModel; -class Standard_Transient; class Interface_EntityIterator; class Interface_ShareTool; class Interface_Check; diff --git a/src/Interface/Interface_Graph.hxx b/src/Interface/Interface_Graph.hxx index b7e6d8d3f1..b4115aa0ee 100644 --- a/src/Interface/Interface_Graph.hxx +++ b/src/Interface/Interface_Graph.hxx @@ -29,7 +29,6 @@ #include #include -class Standard_DomainError; class Interface_GeneralLib; class Interface_Protocol; class Interface_GTool; diff --git a/src/Interface/Interface_GraphContent.hxx b/src/Interface/Interface_GraphContent.hxx index f50a280dcc..e15fa1f272 100644 --- a/src/Interface/Interface_GraphContent.hxx +++ b/src/Interface/Interface_GraphContent.hxx @@ -25,7 +25,6 @@ #include class Interface_Graph; class Standard_Transient; -class Interface_EntityIterator; //! Defines general form for classes of graph algorithms on diff --git a/src/Interface/Interface_HGraph.hxx b/src/Interface/Interface_HGraph.hxx index 7f88b46f93..b4c9fd14bc 100644 --- a/src/Interface/Interface_HGraph.hxx +++ b/src/Interface/Interface_HGraph.hxx @@ -23,8 +23,6 @@ #include #include #include -class Standard_DomainError; -class Interface_Graph; class Interface_InterfaceModel; class Interface_GeneralLib; class Interface_Protocol; diff --git a/src/Interface/Interface_InterfaceModel.hxx b/src/Interface/Interface_InterfaceModel.hxx index 583fbbf46c..9f01c67464 100644 --- a/src/Interface/Interface_InterfaceModel.hxx +++ b/src/Interface/Interface_InterfaceModel.hxx @@ -31,11 +31,7 @@ class Interface_Check; class TCollection_HAsciiString; class Interface_GTool; -class Standard_OutOfRange; -class Standard_NoSuchObject; -class Interface_InterfaceMismatch; class Interface_Protocol; -class Standard_Transient; class Interface_ReportEntity; class Interface_CheckIterator; class Interface_GeneralLib; diff --git a/src/Interface/Interface_MSG.hxx b/src/Interface/Interface_MSG.hxx index 6d6032b735..d78b81f1fe 100644 --- a/src/Interface/Interface_MSG.hxx +++ b/src/Interface/Interface_MSG.hxx @@ -28,7 +28,6 @@ #include #include #include -class Standard_DomainError; //! This class gives a set of functions to manage and use a list diff --git a/src/Interface/Interface_ParamList.hxx b/src/Interface/Interface_ParamList.hxx index 8f1bd6441e..47d15f2ad3 100644 --- a/src/Interface/Interface_ParamList.hxx +++ b/src/Interface/Interface_ParamList.hxx @@ -22,9 +22,6 @@ #include #include #include -class Standard_RangeError; -class Standard_OutOfRange; -class Standard_OutOfMemory; class Interface_FileParameter; diff --git a/src/Interface/Interface_ParamSet.hxx b/src/Interface/Interface_ParamSet.hxx index ae12e83d34..f31aade24c 100644 --- a/src/Interface/Interface_ParamSet.hxx +++ b/src/Interface/Interface_ParamSet.hxx @@ -26,7 +26,6 @@ #include #include class Interface_ParamList; -class Standard_OutOfRange; class Interface_FileParameter; diff --git a/src/Interface/Interface_Protocol.hxx b/src/Interface/Interface_Protocol.hxx index 6e7d0d9612..f12a73ea2a 100644 --- a/src/Interface/Interface_Protocol.hxx +++ b/src/Interface/Interface_Protocol.hxx @@ -24,8 +24,6 @@ #include #include #include -class Interface_InterfaceError; -class Standard_Transient; class Interface_Graph; class Interface_Check; class Interface_InterfaceModel; diff --git a/src/Interface/Interface_ReaderModule.hxx b/src/Interface/Interface_ReaderModule.hxx index f322d7e683..73d15e706d 100644 --- a/src/Interface/Interface_ReaderModule.hxx +++ b/src/Interface/Interface_ReaderModule.hxx @@ -23,10 +23,8 @@ #include #include #include -class Standard_DomainError; class Interface_FileReaderData; class Interface_Check; -class Standard_Transient; class Interface_ReaderModule; diff --git a/src/Interface/Interface_ReportEntity.hxx b/src/Interface/Interface_ReportEntity.hxx index 9b4d520a9a..dac7ceda16 100644 --- a/src/Interface/Interface_ReportEntity.hxx +++ b/src/Interface/Interface_ReportEntity.hxx @@ -23,7 +23,6 @@ #include #include class Interface_Check; -class Standard_Transient; class Interface_ReportEntity; diff --git a/src/Interface/Interface_ShareFlags.hxx b/src/Interface/Interface_ShareFlags.hxx index e7993be3b5..288a314b1f 100644 --- a/src/Interface/Interface_ShareFlags.hxx +++ b/src/Interface/Interface_ShareFlags.hxx @@ -26,8 +26,6 @@ #include #include class Interface_InterfaceModel; -class Standard_DomainError; -class Standard_OutOfRange; class Interface_GeneralLib; class Interface_GTool; class Interface_Protocol; diff --git a/src/Interface/Interface_ShareTool.hxx b/src/Interface/Interface_ShareTool.hxx index 5664cefbfb..97190f2b4f 100644 --- a/src/Interface/Interface_ShareTool.hxx +++ b/src/Interface/Interface_ShareTool.hxx @@ -20,8 +20,6 @@ #include class Interface_HGraph; -class Standard_DomainError; -class Interface_InterfaceError; class Interface_InterfaceModel; class Interface_GeneralLib; class Interface_GTool; diff --git a/src/Interface/Interface_Static.hxx b/src/Interface/Interface_Static.hxx index 32df5b64b2..6a325a0014 100644 --- a/src/Interface/Interface_Static.hxx +++ b/src/Interface/Interface_Static.hxx @@ -33,8 +33,6 @@ #include #include class TCollection_HAsciiString; -class Standard_Transient; -class Interface_InterfaceError; class Interface_Static; DEFINE_STANDARD_HANDLE(Interface_Static, Interface_TypedValue) diff --git a/src/Interface/Interface_TypedValue.hxx b/src/Interface/Interface_TypedValue.hxx index 153d4cfd78..8f86e4840b 100644 --- a/src/Interface/Interface_TypedValue.hxx +++ b/src/Interface/Interface_TypedValue.hxx @@ -28,8 +28,6 @@ #include #include class TCollection_HAsciiString; -class Standard_Transient; -class Interface_InterfaceError; class Interface_TypedValue; diff --git a/src/Interface/Interface_UndefinedContent.hxx b/src/Interface/Interface_UndefinedContent.hxx index d2f69418da..f3b578df3d 100644 --- a/src/Interface/Interface_UndefinedContent.hxx +++ b/src/Interface/Interface_UndefinedContent.hxx @@ -27,13 +27,7 @@ #include #include #include -class Standard_OutOfRange; -class Standard_NoSuchObject; -class Interface_InterfaceMismatch; -class Interface_InterfaceError; -class Standard_Transient; class TCollection_HAsciiString; -class Interface_EntityList; class Interface_CopyTool; diff --git a/src/Intf/Intf.hxx b/src/Intf/Intf.hxx index dc7e5b7991..f52e7db24d 100644 --- a/src/Intf/Intf.hxx +++ b/src/Intf/Intf.hxx @@ -25,14 +25,6 @@ #include class gp_Pnt; class gp_XYZ; -class Intf_Polygon2d; -class Intf_SectionPoint; -class Intf_SectionLine; -class Intf_TangentZone; -class Intf_Interference; -class Intf_Tool; -class Intf_InterferencePolygon2d; -class Intf_InterferencePolygonPolyhedron; //! Interference computation between polygons, lines and diff --git a/src/Intf/Intf_Interference.hxx b/src/Intf/Intf_Interference.hxx index 5231de61d0..bd1eddaa49 100644 --- a/src/Intf/Intf_Interference.hxx +++ b/src/Intf/Intf_Interference.hxx @@ -27,7 +27,6 @@ #include #include #include -class Standard_OutOfRange; class Intf_SectionPoint; class Intf_SectionLine; class Intf_TangentZone; diff --git a/src/Intf/Intf_InterferencePolygon2d.hxx b/src/Intf/Intf_InterferencePolygon2d.hxx index 064b8ad347..52bfcd5ebe 100644 --- a/src/Intf/Intf_InterferencePolygon2d.hxx +++ b/src/Intf/Intf_InterferencePolygon2d.hxx @@ -24,7 +24,6 @@ #include #include #include -class Standard_OutOfRange; class Intf_Polygon2d; class gp_Pnt2d; diff --git a/src/Intf/Intf_Polygon2d.hxx b/src/Intf/Intf_Polygon2d.hxx index dcfcc11149..7f36ae5cae 100644 --- a/src/Intf/Intf_Polygon2d.hxx +++ b/src/Intf/Intf_Polygon2d.hxx @@ -24,8 +24,6 @@ #include #include #include -class Standard_OutOfRange; -class Bnd_Box2d; class gp_Pnt2d; diff --git a/src/Intf/Intf_SectionLine.hxx b/src/Intf/Intf_SectionLine.hxx index c6a182a447..1cf90641ae 100644 --- a/src/Intf/Intf_SectionLine.hxx +++ b/src/Intf/Intf_SectionLine.hxx @@ -24,7 +24,6 @@ #include #include #include -class Standard_OutOfRange; class Intf_SectionPoint; diff --git a/src/Intf/Intf_SectionPoint.hxx b/src/Intf/Intf_SectionPoint.hxx index d0164c109e..85e09626a5 100644 --- a/src/Intf/Intf_SectionPoint.hxx +++ b/src/Intf/Intf_SectionPoint.hxx @@ -26,7 +26,6 @@ #include #include #include -class gp_Pnt; class gp_Pnt2d; diff --git a/src/Intf/Intf_TangentZone.hxx b/src/Intf/Intf_TangentZone.hxx index 204aaa118d..df01486988 100644 --- a/src/Intf/Intf_TangentZone.hxx +++ b/src/Intf/Intf_TangentZone.hxx @@ -25,7 +25,6 @@ #include #include #include -class Standard_OutOfRange; class Intf_SectionPoint; diff --git a/src/Intf/Intf_Tool.hxx b/src/Intf/Intf_Tool.hxx index 5742298802..e8179a3f64 100644 --- a/src/Intf/Intf_Tool.hxx +++ b/src/Intf/Intf_Tool.hxx @@ -23,7 +23,6 @@ #include #include -class Standard_OutOfRange; class gp_Lin2d; class Bnd_Box2d; class gp_Hypr2d; diff --git a/src/Intrv/Intrv_Intervals.hxx b/src/Intrv/Intrv_Intervals.hxx index 9841ccead9..640f0dce6c 100644 --- a/src/Intrv/Intrv_Intervals.hxx +++ b/src/Intrv/Intrv_Intervals.hxx @@ -23,7 +23,6 @@ #include #include -class Standard_OutOfRange; class Intrv_Interval; diff --git a/src/LDOM/LDOM_Attr.hxx b/src/LDOM/LDOM_Attr.hxx index 00495f30ca..fe247b1b97 100644 --- a/src/LDOM/LDOM_Attr.hxx +++ b/src/LDOM/LDOM_Attr.hxx @@ -19,7 +19,6 @@ #include class LDOM_BasicAttribute; -class LDOM_Element; // Class LDOM_Attr // diff --git a/src/LDOM/LDOM_BasicAttribute.hxx b/src/LDOM/LDOM_BasicAttribute.hxx index 07f592b5e6..28d69c451b 100644 --- a/src/LDOM/LDOM_BasicAttribute.hxx +++ b/src/LDOM/LDOM_BasicAttribute.hxx @@ -19,10 +19,7 @@ #include #include -class LDOM_XmlReader; -class LDOM_Element; class LDOM_Attr; -class LDOM_Node; // Class LDOM_BasicAttribute // diff --git a/src/LDOM/LDOM_BasicElement.hxx b/src/LDOM/LDOM_BasicElement.hxx index 274b91344a..f6254d2461 100644 --- a/src/LDOM/LDOM_BasicElement.hxx +++ b/src/LDOM/LDOM_BasicElement.hxx @@ -22,10 +22,7 @@ #include #include -class LDOM_XmlReader; -class LDOMParser; class LDOM_NodeList; -class LDOM_Element; class LDOM_BasicAttribute; // Class LDOM_BasicElement diff --git a/src/LDOM/LDOM_BasicNode.hxx b/src/LDOM/LDOM_BasicNode.hxx index d41cf08a12..e4b928e8a2 100644 --- a/src/LDOM/LDOM_BasicNode.hxx +++ b/src/LDOM/LDOM_BasicNode.hxx @@ -18,9 +18,7 @@ #include -class LDOM_BasicElement; class LDOM_NullPtr; -class LDOMParser; // Block of comments describing class LDOM_BasicNode // diff --git a/src/LDOM/LDOM_BasicText.hxx b/src/LDOM/LDOM_BasicText.hxx index 29d152ee19..bb900accec 100644 --- a/src/LDOM/LDOM_BasicText.hxx +++ b/src/LDOM/LDOM_BasicText.hxx @@ -19,10 +19,7 @@ #include #include -class LDOM_Node; class LDOM_CharacterData; -class LDOMParser; -class LDOM_BasicElement; // Class LDOM_BasicText // diff --git a/src/LDOM/LDOM_Document.hxx b/src/LDOM/LDOM_Document.hxx index fbe48a9f49..ae7a920ece 100644 --- a/src/LDOM/LDOM_Document.hxx +++ b/src/LDOM/LDOM_Document.hxx @@ -21,7 +21,6 @@ #include #include -class LDOM_MemManager; // Class LDOM_Document diff --git a/src/LDOM/LDOM_Element.hxx b/src/LDOM/LDOM_Element.hxx index 790feb3840..2e385565de 100644 --- a/src/LDOM/LDOM_Element.hxx +++ b/src/LDOM/LDOM_Element.hxx @@ -19,7 +19,6 @@ #include #include -class LDOMParser; class LDOM_BasicElement; // Class LDOM_Element diff --git a/src/LDOM/LDOM_MemManager.hxx b/src/LDOM/LDOM_MemManager.hxx index 2c4640e557..273e62f937 100644 --- a/src/LDOM/LDOM_MemManager.hxx +++ b/src/LDOM/LDOM_MemManager.hxx @@ -19,7 +19,6 @@ #include #include -class LDOM_Document; class LDOM_BasicElement; class LDOM_MemManager; class LDOMBasicString; From 4f7ad5fb76ff1c90f47f0a88e7c0d8beee460775 Mon Sep 17 00:00:00 2001 From: kgv Date: Sun, 24 Oct 2021 12:09:02 +0300 Subject: [PATCH 114/639] 0032640: Coding Rules - fix misprints in GeomliteTest_API2dCommands.cxx --- .../GeomliteTest_API2dCommands.cxx | 286 +++++++++--------- src/ViewerTest/ViewerTest_ViewerCommands.cxx | 5 + 2 files changed, 151 insertions(+), 140 deletions(-) diff --git a/src/GeomliteTest/GeomliteTest_API2dCommands.cxx b/src/GeomliteTest/GeomliteTest_API2dCommands.cxx index de4a62da60..d1c27dc5e0 100644 --- a/src/GeomliteTest/GeomliteTest_API2dCommands.cxx +++ b/src/GeomliteTest/GeomliteTest_API2dCommands.cxx @@ -46,6 +46,7 @@ #include #include #include +#include #include #include @@ -60,38 +61,38 @@ Standard_IMPORT Draw_Viewer dout; static Standard_Integer proj (Draw_Interpretor& di, Standard_Integer n, const char** a) { - if ( n < 4) return 1; - - gp_Pnt2d P(Draw::Atof(a[2]),Draw::Atof(a[3])); - - char name[100]; + if (n != 4) + { + di << "Syntax error: wrong number of arguments"; + return 1; + } Handle(Geom2d_Curve) GC = DrawTrSurf::GetCurve2d(a[1]); - if (GC.IsNull()) + { + di << "Syntax error: '" << a[1] << "' is NULL"; return 1; + } - Geom2dAPI_ProjectPointOnCurve proj(P,GC,GC->FirstParameter(), - GC->LastParameter()); - + const gp_Pnt2d P (Draw::Atof (a[2]), Draw::Atof (a[3])); + Geom2dAPI_ProjectPointOnCurve proj(P,GC,GC->FirstParameter(), GC->LastParameter()); for (Standard_Integer i = 1; i <= proj.NbPoints(); i++) { gp_Pnt2d aP1 = proj.Point(i); const Standard_Real aDist = P.Distance(aP1); - Sprintf(name, "%s%d", "ext_", i); - + const TCollection_AsciiString aName = TCollection_AsciiString ("ext_") + i; if (aDist > Precision::PConfusion()) { Handle(Geom2d_Line) L = new Geom2d_Line(P, gp_Dir2d(aP1.XY() - P.XY())); Handle(Geom2d_TrimmedCurve) CT = new Geom2d_TrimmedCurve(L, 0., aDist); - DrawTrSurf::Set(name, CT); + DrawTrSurf::Set (aName.ToCString(), CT); } else { - DrawTrSurf::Set(name, aP1); + DrawTrSurf::Set (aName.ToCString(), aP1); } - di << name << " "; + di << aName << " "; } return 0; @@ -119,18 +120,18 @@ static Standard_Integer appro(Draw_Interpretor& di, Standard_Integer n, const ch // 2dappro result nbpoint x1 dx y1 y2 .. // - tableau de points (x1,y1) (x1+dx,y2) ... avec x = t - static Standard_Real Tol2d = 1.e-6; - - if (n < 3) { - if (n == 2) + if (n < 3) + { + if (n == 2) + { Tol2d = Draw::Atof(a[1]); - + } + di << "Tolerance for 2d approx : "<< Tol2d << "\n"; return 0; } - Standard_Integer i, Nb = Draw::Atoi(a[2]); Standard_Boolean hasPoints = Standard_True; @@ -257,9 +258,7 @@ static Standard_Integer appro(Draw_Interpretor& di, Standard_Integer n, const ch DrawTrSurf::Set(a[1], TheCurve); di << a[1]; - return 0; - } //======================================================================= @@ -269,25 +268,29 @@ static Standard_Integer appro(Draw_Interpretor& di, Standard_Integer n, const ch static Standard_Integer extrema(Draw_Interpretor& di, Standard_Integer n, const char** a) { - if ( n<3) return 1; - - Handle(Geom2d_Curve) GC1, GC2; - - Standard_Real U1f,U1l,U2f,U2l; - - GC1 = DrawTrSurf::GetCurve2d(a[1]); - if ( GC1.IsNull()) + if (n != 3) + { + di << "Syntax error: wrong number of arguments"; return 1; - U1f = GC1->FirstParameter(); - U1l = GC1->LastParameter(); + } - GC2 = DrawTrSurf::GetCurve2d(a[2]); - if ( GC2.IsNull()) + Handle(Geom2d_Curve) GC1 = DrawTrSurf::GetCurve2d (a[1]); + Handle(Geom2d_Curve) GC2 = DrawTrSurf::GetCurve2d (a[2]); + if (GC1.IsNull()) + { + di << "Syntax error: '" << a[1] << "' is NULL"; return 1; - U2f = GC2->FirstParameter(); - U2l = GC2->LastParameter(); + } + if (GC2.IsNull()) + { + di << "Syntax error: '" << a[2] << "' is NULL"; + return 1; + } - char name[100]; + const Standard_Real U1f = GC1->FirstParameter(); + const Standard_Real U1l = GC1->LastParameter(); + const Standard_Real U2f = GC2->FirstParameter(); + const Standard_Real U2l = GC2->LastParameter(); Geom2dAPI_ExtremaCurveCurve Ex(GC1,GC2,U1f,U1l,U2f,U2l); Standard_Boolean isInfinitySolutions = Ex.Extrema().IsParallel(); @@ -308,25 +311,23 @@ static Standard_Integer extrema(Draw_Interpretor& di, Standard_Integer n, const gp_Pnt2d P1,P2; Ex.Points(i,P1,P2); di << "dist " << i << ": " << Ex.Distance(i) << " "; + const TCollection_AsciiString aName = TCollection_AsciiString("ext_") + i; if (Ex.Distance(i) <= Precision::PConfusion()) { Handle(Draw_Marker2D) mark = new Draw_Marker2D( P1, Draw_X, Draw_vert); dout << mark; dout.Flush(); - Sprintf(name,"%s%d","ext_",i); - char* temp = name; + const char* temp = aName.ToCString(); DrawTrSurf::Set(temp, P1); - di << name << "\n"; } else { Handle(Geom2d_Line) L = new Geom2d_Line(P1,gp_Vec2d(P1,P2)); Handle(Geom2d_TrimmedCurve) CT = new Geom2d_TrimmedCurve(L, 0., P1.Distance(P2)); - Sprintf(name,"%s%d","ext_",i); - char* temp = name; // portage WNT + const char* temp = aName.ToCString(); DrawTrSurf::Set(temp, CT); - di << name << "\n"; } + di << aName << "\n"; } return 0; @@ -338,25 +339,12 @@ static Standard_Integer extrema(Draw_Interpretor& di, Standard_Integer n, const //======================================================================= static Standard_Integer intersect(Draw_Interpretor& di, Standard_Integer n, const char** a) { - if (n < 2) - { - di.PrintHelp(a[0]); - return 1; - } - - Handle(Geom2d_Curve) C1 = DrawTrSurf::GetCurve2d(a[1]); - if (C1.IsNull()) - { - di << "Curve " << a[1] << " is null\n"; - return 1; - } - - Handle(Geom2d_Curve) C2; + Handle(Geom2d_Curve) C1, C2; Standard_Real Tol = 0.001; Standard_Boolean bPrintState = Standard_False; // Retrieve other parameters if any - for (Standard_Integer i = 2; i < n; ++i) + for (Standard_Integer i = 1; i < n; ++i) { if (!strcmp(a[i], "-tol")) { @@ -366,25 +354,47 @@ static Standard_Integer intersect(Draw_Interpretor& di, Standard_Integer n, cons { bPrintState = Standard_True; } - else + else if (C1.IsNull()) + { + C1 = DrawTrSurf::GetCurve2d (a[i]); + if (C1.IsNull()) + { + di << "Syntax error: curve '" << a[i] << "' is null"; + return 1; + } + } + else if (C2.IsNull()) { C2 = DrawTrSurf::GetCurve2d(a[i]); if (C2.IsNull()) { - di << "Curve " << a[i] << " is null\n"; + di << "Syntax error: curve '" << a[i] << "' is null"; return 1; } } + else + { + di << "Syntax error at '" << a[i] << "'"; + return 1; + } + } + if (C1.IsNull()) + { + di << "Syntax error: wrong number of arguments"; + return 1; } Geom2dAPI_InterCurveCurve Intersector; - if (!C2.IsNull()) + { // Curves intersection Intersector.Init(C1, C2, Tol); + } else + { // Self-intersection of the curve Intersector.Init(C1, Tol); + } const Geom2dInt_GInter& anIntTool = Intersector.Intersector(); if (!anIntTool.IsDone()) @@ -394,7 +404,9 @@ static Standard_Integer intersect(Draw_Interpretor& di, Standard_Integer n, cons } if (anIntTool.IsEmpty()) + { return 0; + } Standard_Integer aNbPoints = Intersector.NbPoints(); for (Standard_Integer i = 1; i <= aNbPoints; i++) @@ -428,9 +440,8 @@ static Standard_Integer intersect(Draw_Interpretor& di, Standard_Integer n, cons CD = new DrawTrSurf_Curve2d(S2, Draw_violet, 30); dout << CD; } - - dout.Flush(); + dout.Flush(); return 0; } @@ -441,28 +452,25 @@ static Standard_Integer intersect(Draw_Interpretor& di, Standard_Integer n, cons static Standard_Integer intersect_ana(Draw_Interpretor& di, Standard_Integer n, const char** a) { - if (n < 2) + if (n != 3) { - Message::SendFail() << "2dintana circle circle"; + di << "Syntax error: wrong number of arguments"; return 1; } Handle(Geom2d_Curve) C1 = DrawTrSurf::GetCurve2d(a[1]); - if (C1.IsNull() && !C1->IsKind(STANDARD_TYPE(Geom2d_Circle))) - return 1; - Handle(Geom2d_Curve) C2 = DrawTrSurf::GetCurve2d(a[2]); - if (C2.IsNull() && !C2->IsKind(STANDARD_TYPE(Geom2d_Circle))) - return 1; - Handle(Geom2d_Circle) aCir1 = Handle(Geom2d_Circle)::DownCast(C1); Handle(Geom2d_Circle) aCir2 = Handle(Geom2d_Circle)::DownCast(C2); + if (aCir1.IsNull() || aCir2.IsNull()) + { + di << "Syntax error: '" << a[aCir1.IsNull() ? 1 : 2] << "' is not a circle"; + return 1; + } IntAna2d_AnaIntersection Intersector(aCir1->Circ2d(), aCir2->Circ2d()); - - Standard_Integer i; - - for (i = 1; i <= Intersector.NbPoints(); i++) { + for (Standard_Integer i = 1; i <= Intersector.NbPoints(); i++) + { gp_Pnt2d P = Intersector.Point(i).Value(); di << "Intersection point " << i << " : " << P.X() << " " << P.Y() << "\n"; di << "parameter on the fist: " << Intersector.Point(i).ParamOnFirst(); @@ -471,7 +479,6 @@ static Standard_Integer intersect_ana(Draw_Interpretor& di, Standard_Integer n, dout << mark; } dout.Flush(); - return 0; } @@ -482,90 +489,88 @@ static Standard_Integer intersect_ana(Draw_Interpretor& di, Standard_Integer n, static Standard_Integer intconcon(Draw_Interpretor& di, Standard_Integer n, const char** a) { - if( n < 2) + if (n != 3) { - Message::SendFail() << "intconcon con1 con2"; + di << "Syntax error: wrong number of arguments"; return 1; } Handle(Geom2d_Curve) C1 = DrawTrSurf::GetCurve2d(a[1]); if (C1.IsNull()) { - Message::SendFail() << a[1] << " is Null"; + di << "Syntax error: '" << a[1] << "' is Null"; return 1; } Handle(Geom2d_Curve) C2 = DrawTrSurf::GetCurve2d(a[2]); if (C2.IsNull()) { - Message::SendFail() << a[2] << " is Null"; + di << "Syntax error: '" << a[2] << "' is Null"; return 1; } Geom2dAdaptor_Curve AC1(C1), AC2(C2); GeomAbs_CurveType T1 = AC1.GetType(), T2 = AC2.GetType(); -#if (defined(_MSC_VER) && (_MSC_VER < 1600)) - std::auto_ptr pCon; -#else - std::unique_ptr pCon; -#endif + Handle(NCollection_Shared) pCon; switch (T2) { - case GeomAbs_Line: - { - pCon.reset(new IntAna2d_Conic(AC2.Line())); - break; - } - case GeomAbs_Circle: - { - pCon.reset(new IntAna2d_Conic(AC2.Circle())); - break; - } - case GeomAbs_Ellipse: - { - pCon.reset(new IntAna2d_Conic(AC2.Ellipse())); - break; - } - case GeomAbs_Hyperbola: - { - pCon.reset(new IntAna2d_Conic(AC2.Hyperbola())); - break; - } - case GeomAbs_Parabola: - { - pCon.reset(new IntAna2d_Conic(AC2.Parabola())); - break; - } - default: - Message::SendFail() << a[2] << " is not conic"; - return 1; + case GeomAbs_Line: + { + pCon.reset (new NCollection_Shared(AC2.Line())); + break; + } + case GeomAbs_Circle: + { + pCon.reset (new NCollection_Shared(AC2.Circle())); + break; + } + case GeomAbs_Ellipse: + { + pCon.reset (new NCollection_Shared(AC2.Ellipse())); + break; + } + case GeomAbs_Hyperbola: + { + pCon.reset (new NCollection_Shared(AC2.Hyperbola())); + break; + } + case GeomAbs_Parabola: + { + pCon.reset (new NCollection_Shared(AC2.Parabola())); + break; + } + default: + { + di << "Syntax error: '" << a[2] << "' is not conic"; + return 1; + } } IntAna2d_AnaIntersection Intersector; switch (T1) { - case GeomAbs_Line: - Intersector.Perform(AC1.Line(), *pCon); - break; - case GeomAbs_Circle: - Intersector.Perform(AC1.Circle(), *pCon); - break; - case GeomAbs_Ellipse: - Intersector.Perform(AC1.Ellipse(), *pCon); - break; - case GeomAbs_Hyperbola: - Intersector.Perform(AC1.Hyperbola(), *pCon); - break; - case GeomAbs_Parabola: - Intersector.Perform(AC1.Parabola(), *pCon); - break; - default: - Message::SendFail() << a[1] << " is not conic"; - return 1; + case GeomAbs_Line: + Intersector.Perform(AC1.Line(), *pCon); + break; + case GeomAbs_Circle: + Intersector.Perform(AC1.Circle(), *pCon); + break; + case GeomAbs_Ellipse: + Intersector.Perform(AC1.Ellipse(), *pCon); + break; + case GeomAbs_Hyperbola: + Intersector.Perform(AC1.Hyperbola(), *pCon); + break; + case GeomAbs_Parabola: + Intersector.Perform(AC1.Parabola(), *pCon); + break; + default: + di << "Syntax error: '" << a[1] << "' is not conic"; + return 1; } - Standard_Integer i; - for ( i = 1; i <= Intersector.NbPoints(); i++) { + for (Standard_Integer i = 1; i <= Intersector.NbPoints(); i++) + { gp_Pnt2d P = Intersector.Point(i).Value(); di<<"Intersection point "<= theArgNb) { From 5bd54bef323f55c3c5b9c5a8834235084d913155 Mon Sep 17 00:00:00 2001 From: ski Date: Mon, 18 Oct 2021 11:52:10 +0300 Subject: [PATCH 115/639] 0024975: Improve of preprocessor directives in header files to be equal to the file name Preprocessor directives were changed or created by function "check_headers" from script adm/upgrade.tcl (CR24816) --- src/AdvApp2Var/AdvApp2Var_ApproxF2var.hxx | 4 ++-- src/AdvApp2Var/AdvApp2Var_Data_f2c.hxx | 4 ++-- src/AppCont/AppCont_ContMatrices.hxx | 4 ++-- src/Aspect/Aspect_DisplayConnection.hxx | 4 ++-- src/Aspect/Aspect_PolygonOffsetMode.hxx | 4 ++-- src/BOPDS/BOPDS_VectorOfPoint.hxx | 4 ++-- src/BOPTools/BOPTools_MapOfSet.hxx | 4 ++-- src/BRepBuilderAPI/BRepBuilderAPI_BndBoxTreeSelector.hxx | 4 ++-- src/BRepBuilderAPI/BRepBuilderAPI_VertexInspector.hxx | 4 ++-- src/BRepMesh/BRepMesh_CircleInspector.hxx | 4 ++-- src/BVH/BVH_BinnedBuilder.hxx | 4 ++-- src/BVH/BVH_Box.hxx | 4 ++-- src/BVH/BVH_Builder.hxx | 4 ++-- src/BVH/BVH_Geometry.hxx | 4 ++-- src/BVH/BVH_Object.hxx | 4 ++-- src/BVH/BVH_ObjectSet.hxx | 4 ++-- src/BVH/BVH_PrimitiveSet.hxx | 4 ++-- src/BVH/BVH_Properties.hxx | 4 ++-- src/BVH/BVH_Set.hxx | 4 ++-- src/BVH/BVH_Sorter.hxx | 4 ++-- src/BVH/BVH_SpatialMedianBuilder.hxx | 4 ++-- src/BVH/BVH_SweepPlaneBuilder.hxx | 4 ++-- src/BVH/BVH_Triangulation.hxx | 4 ++-- src/BVH/BVH_Types.hxx | 4 ++-- src/BinLDrivers/BinLDrivers_VectorOfDocumentSection.hxx | 4 ++-- src/ChFi2d/ChFi2d_AnaFilletAlgo.hxx | 4 ++-- src/ChFi2d/ChFi2d_ChamferAPI.hxx | 4 ++-- src/ChFi2d/ChFi2d_FilletAPI.hxx | 4 ++-- src/ChFi2d/ChFi2d_FilletAlgo.hxx | 4 ++-- src/ChFiKPart/ChFiKPart_ComputeData_CS.hxx | 7 +++---- src/ChFiKPart/ChFiKPart_ComputeData_FilPlnCon.hxx | 4 ++-- src/ChFiKPart/ChFiKPart_ComputeData_FilPlnCyl.hxx | 4 ++-- src/ChFiKPart/ChFiKPart_ComputeData_FilPlnPln.hxx | 4 ++-- src/Cocoa/Cocoa_LocalPool.hxx | 4 ++-- src/Cocoa/Cocoa_Window.hxx | 4 ++-- src/Convert/Convert_CosAndSinEvalFunction.hxx | 6 +++--- src/Convert/Convert_PolynomialCosAndSin.hxx | 6 +++--- src/DsgPrs/DsgPrs_DatumPrs.hxx | 4 ++-- src/Font/Font_BRepFont.hxx | 4 ++-- src/Font/Font_FTFont.hxx | 4 ++-- src/Font/Font_FTLibrary.hxx | 4 ++-- src/Graphic3d/Graphic3d_BufferType.hxx | 4 ++-- src/Graphic3d/Graphic3d_MarkerImage.hxx | 4 ++-- src/Graphic3d/Graphic3d_TransModeFlags.hxx | 4 ++-- src/Graphic3d/Graphic3d_Vec.hxx | 4 ++-- src/IGESData/IGESData_Dump.hxx | 5 +++++ src/Image/Image_AlienPixMap.hxx | 4 ++-- src/Image/Image_Color.hxx | 4 ++-- src/Image/Image_Diff.hxx | 4 ++-- src/Image/Image_PixMap.hxx | 4 ++-- src/Image/Image_PixMapData.hxx | 4 ++-- src/IntAna2d/IntAna2d_Outils.hxx | 4 ++-- src/IntImp/IntImp_ComputeTangence.hxx | 5 +++++ src/Interface/Interface_Statics.hxx | 5 +++++ src/Interface/Interface_Translates.hxx | 5 +++++ src/LDOM/LDOM_DeclareSequence.hxx | 4 ++-- src/MeshVS/MeshVS_BuilderPriority.hxx | 4 ++-- src/MeshVS/MeshVS_DisplayModeFlags.hxx | 4 ++-- src/MeshVS/MeshVS_EntityType.hxx | 4 ++-- src/MeshVS/MeshVS_SelectionModeFlags.hxx | 4 ++-- src/MeshVS/MeshVS_TwoNodes.hxx | 4 ++-- src/NCollection/NCollection_String.hxx | 4 ++-- src/NCollection/NCollection_UtfIterator.hxx | 4 ++-- src/NCollection/NCollection_UtfString.hxx | 4 ++-- src/NCollection/NCollection_Vec2.hxx | 4 ++-- src/NCollection/NCollection_Vec3.hxx | 4 ++-- src/NCollection/NCollection_Vec4.hxx | 4 ++-- src/OSD/OSD_ErrorList.hxx | 4 ++-- src/OSD/OSD_MemInfo.hxx | 4 ++-- src/OSD/OSD_WNT.hxx | 6 +++--- src/OpenGl/OpenGl_ArbDbg.hxx | 4 ++-- src/OpenGl/OpenGl_ArbFBO.hxx | 4 ++-- src/OpenGl/OpenGl_ArbIns.hxx | 4 ++-- src/OpenGl/OpenGl_ArbTBO.hxx | 4 ++-- src/OpenGl/OpenGl_CappingAlgo.hxx | 4 ++-- src/OpenGl/OpenGl_CappingPlaneResource.hxx | 4 ++-- src/OpenGl/OpenGl_Caps.hxx | 4 ++-- src/OpenGl/OpenGl_Clipping.hxx | 4 ++-- src/OpenGl/OpenGl_Context.hxx | 4 ++-- src/OpenGl/OpenGl_Element.hxx | 4 ++-- src/OpenGl/OpenGl_ExtGS.hxx | 4 ++-- src/OpenGl/OpenGl_Flipper.hxx | 4 ++-- src/OpenGl/OpenGl_Font.hxx | 4 ++-- src/OpenGl/OpenGl_FrameBuffer.hxx | 4 ++-- src/OpenGl/OpenGl_GlCore11.hxx | 4 ++-- src/OpenGl/OpenGl_GlCore11Fwd.hxx | 4 ++-- src/OpenGl/OpenGl_GlCore12.hxx | 4 ++-- src/OpenGl/OpenGl_GlCore13.hxx | 4 ++-- src/OpenGl/OpenGl_GlCore14.hxx | 4 ++-- src/OpenGl/OpenGl_GlCore15.hxx | 4 ++-- src/OpenGl/OpenGl_GlCore20.hxx | 4 ++-- src/OpenGl/OpenGl_GlCore21.hxx | 4 ++-- src/OpenGl/OpenGl_GlCore30.hxx | 4 ++-- src/OpenGl/OpenGl_GlCore31.hxx | 4 ++-- src/OpenGl/OpenGl_GlCore32.hxx | 4 ++-- src/OpenGl/OpenGl_GlCore33.hxx | 4 ++-- src/OpenGl/OpenGl_GlCore40.hxx | 4 ++-- src/OpenGl/OpenGl_GlCore41.hxx | 4 ++-- src/OpenGl/OpenGl_GlCore42.hxx | 4 ++-- src/OpenGl/OpenGl_GlCore43.hxx | 4 ++-- src/OpenGl/OpenGl_GlCore44.hxx | 4 ++-- src/OpenGl/OpenGl_GlFunctions.hxx | 4 ++-- src/OpenGl/OpenGl_GraduatedTrihedron.hxx | 4 ++-- src/OpenGl/OpenGl_Group.hxx | 4 ++-- src/OpenGl/OpenGl_IndexBuffer.hxx | 4 ++-- src/OpenGl/OpenGl_Layer.hxx | 4 ++-- src/OpenGl/OpenGl_LayerList.hxx | 4 ++-- src/OpenGl/OpenGl_LineAttributes.hxx | 4 ++-- src/OpenGl/OpenGl_PointSprite.hxx | 4 ++-- src/OpenGl/OpenGl_PrimitiveArray.hxx | 4 ++-- src/OpenGl/OpenGl_RenderFilter.hxx | 4 ++-- src/OpenGl/OpenGl_Resource.hxx | 4 ++-- src/OpenGl/OpenGl_SceneGeometry.hxx | 4 ++-- src/OpenGl/OpenGl_ShaderObject.hxx | 4 ++-- src/OpenGl/OpenGl_ShaderProgram.hxx | 4 ++-- src/OpenGl/OpenGl_ShaderStates.hxx | 4 ++-- src/OpenGl/OpenGl_StencilTest.hxx | 4 ++-- src/OpenGl/OpenGl_Structure.hxx | 4 ++-- src/OpenGl/OpenGl_Text.hxx | 4 ++-- src/OpenGl/OpenGl_Texture.hxx | 4 ++-- src/OpenGl/OpenGl_TextureBufferArb.hxx | 4 ++-- src/OpenGl/OpenGl_Vec.hxx | 4 ++-- src/OpenGl/OpenGl_VertexBuffer.hxx | 4 ++-- src/OpenGl/OpenGl_VertexBufferEditor.hxx | 4 ++-- src/OpenGl/OpenGl_View.hxx | 4 ++-- src/OpenGl/OpenGl_Window.hxx | 4 ++-- src/OpenGl/OpenGl_Workspace.hxx | 4 ++-- src/Prs3d/Prs3d_DimensionUnits.hxx | 4 ++-- src/Prs3d/Prs3d_Point.hxx | 4 ++-- src/PrsMgr/PrsMgr_ListOfPresentations.hxx | 4 ++-- src/Standard/Standard_CLocaleSentry.hxx | 4 ++-- src/Standard/Standard_PrimitiveTypes.hxx | 4 ++-- src/Standard/Standard_math.hxx | 5 +++++ src/StdPrs/StdPrs_HLRShape.hxx | 4 ++-- src/StdPrs/StdPrs_Point.hxx | 4 ++-- src/StdPrs/StdPrs_Vertex.hxx | 4 ++-- src/StdPrs/StdPrs_WFRestrictedFace.hxx | 4 ++-- src/StdPrs/StdPrs_WFShape.hxx | 4 ++-- src/TopOpeBRepDS/TopOpeBRepDS_repvg.hxx | 4 ++-- src/V3d/V3d_Plane.hxx | 4 ++-- src/WNT/WNT_Dword.hxx | 4 ++-- src/Xw/Xw_Window.hxx | 4 ++-- 142 files changed, 303 insertions(+), 279 deletions(-) diff --git a/src/AdvApp2Var/AdvApp2Var_ApproxF2var.hxx b/src/AdvApp2Var/AdvApp2Var_ApproxF2var.hxx index c40dcc0a48..1b810ec3f5 100644 --- a/src/AdvApp2Var/AdvApp2Var_ApproxF2var.hxx +++ b/src/AdvApp2Var/AdvApp2Var_ApproxF2var.hxx @@ -17,8 +17,8 @@ | de l'approximation a deux variables | a utiliser dans AdvApp2Var |--------------------------------------------------------------*/ -#ifndef ApproxF2var_HeaderFile -#define ApproxF2var_HeaderFile +#ifndef AdvApp2Var_ApproxF2var_HeaderFile +#define AdvApp2Var_ApproxF2var_HeaderFile #include #include diff --git a/src/AdvApp2Var/AdvApp2Var_Data_f2c.hxx b/src/AdvApp2Var/AdvApp2Var_Data_f2c.hxx index 8ebd731de5..f9976b95b1 100644 --- a/src/AdvApp2Var/AdvApp2Var_Data_f2c.hxx +++ b/src/AdvApp2Var/AdvApp2Var_Data_f2c.hxx @@ -12,8 +12,8 @@ // commercial license or contractual agreement. // AdvApp2Var_Data_f2c.hxx -#ifndef Data_f2c_HeaderFile -#define Data_f2c_HeaderFile +#ifndef AdvApp2Var_Data_f2c_HeaderFile +#define AdvApp2Var_Data_f2c_HeaderFile #ifndef F2CTYPE_DEFINED typedef int integer; diff --git a/src/AppCont/AppCont_ContMatrices.hxx b/src/AppCont/AppCont_ContMatrices.hxx index 460896e3a0..b4a51a1138 100644 --- a/src/AppCont/AppCont_ContMatrices.hxx +++ b/src/AppCont/AppCont_ContMatrices.hxx @@ -12,8 +12,8 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -#ifndef math_ContMatrices_HeaderFile -#define math_ContMatrices_HeaderFile +#ifndef AppCont_ContMatrices_HeaderFile +#define AppCont_ContMatrices_HeaderFile #include #include diff --git a/src/Aspect/Aspect_DisplayConnection.hxx b/src/Aspect/Aspect_DisplayConnection.hxx index 5bde7a4b90..5c1ca79843 100755 --- a/src/Aspect/Aspect_DisplayConnection.hxx +++ b/src/Aspect/Aspect_DisplayConnection.hxx @@ -11,8 +11,8 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -#ifndef _Aspect_DisplayConnection_H__ -#define _Aspect_DisplayConnection_H__ +#ifndef Aspect_DisplayConnection_HeaderFile +#define Aspect_DisplayConnection_HeaderFile #include #include diff --git a/src/Aspect/Aspect_PolygonOffsetMode.hxx b/src/Aspect/Aspect_PolygonOffsetMode.hxx index 643ecc3e47..e9647c2f64 100644 --- a/src/Aspect/Aspect_PolygonOffsetMode.hxx +++ b/src/Aspect/Aspect_PolygonOffsetMode.hxx @@ -13,8 +13,8 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -#ifndef ASPECT_POLYGONOFFSETMODE_HEADER -#define ASPECT_POLYGONOFFSETMODE_HEADER +#ifndef Aspect_PolygonOffsetMode_HeaderFile +#define Aspect_PolygonOffsetMode_HeaderFile // Enumeration for polygon offset modes diff --git a/src/BOPDS/BOPDS_VectorOfPoint.hxx b/src/BOPDS/BOPDS_VectorOfPoint.hxx index d684935f47..8be9e92718 100644 --- a/src/BOPDS/BOPDS_VectorOfPoint.hxx +++ b/src/BOPDS/BOPDS_VectorOfPoint.hxx @@ -12,8 +12,8 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -#ifndef BOPDS_VectorOfPnt_HeaderFile -#define BOPDS_VectorOfPnt_HeaderFile +#ifndef BOPDS_VectorOfPoint_HeaderFile +#define BOPDS_VectorOfPoint_HeaderFile #include #include diff --git a/src/BOPTools/BOPTools_MapOfSet.hxx b/src/BOPTools/BOPTools_MapOfSet.hxx index b9a1ea2347..bea5786138 100644 --- a/src/BOPTools/BOPTools_MapOfSet.hxx +++ b/src/BOPTools/BOPTools_MapOfSet.hxx @@ -12,8 +12,8 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -#ifndef BOPTest_MapOfShapeSet_HeaderFile -#define BOPTest_MapOfShapeSet_HeaderFile +#ifndef BOPTools_MapOfSet_HeaderFile +#define BOPTools_MapOfSet_HeaderFile #include #include diff --git a/src/BRepBuilderAPI/BRepBuilderAPI_BndBoxTreeSelector.hxx b/src/BRepBuilderAPI/BRepBuilderAPI_BndBoxTreeSelector.hxx index 9413ec673c..901e17a7e5 100644 --- a/src/BRepBuilderAPI/BRepBuilderAPI_BndBoxTreeSelector.hxx +++ b/src/BRepBuilderAPI/BRepBuilderAPI_BndBoxTreeSelector.hxx @@ -13,8 +13,8 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -#ifndef _BRepBuilderAPI_BndBoxTreeSelector_Header -#define _BRepBuilderAPI_BndBoxTreeSelector_Header +#ifndef BRepBuilderAPI_BndBoxTreeSelector_HeaderFile +#define BRepBuilderAPI_BndBoxTreeSelector_HeaderFile #include #include diff --git a/src/BRepBuilderAPI/BRepBuilderAPI_VertexInspector.hxx b/src/BRepBuilderAPI/BRepBuilderAPI_VertexInspector.hxx index 486d913e50..1eb76061f8 100644 --- a/src/BRepBuilderAPI/BRepBuilderAPI_VertexInspector.hxx +++ b/src/BRepBuilderAPI/BRepBuilderAPI_VertexInspector.hxx @@ -13,8 +13,8 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -#ifndef _BRepBuilderAPI_VertexInspector_Header -#define _BRepBuilderAPI_VertexInspector_Header +#ifndef BRepBuilderAPI_VertexInspector_HeaderFile +#define BRepBuilderAPI_VertexInspector_HeaderFile #include #include diff --git a/src/BRepMesh/BRepMesh_CircleInspector.hxx b/src/BRepMesh/BRepMesh_CircleInspector.hxx index a8acaca831..f185f50849 100644 --- a/src/BRepMesh/BRepMesh_CircleInspector.hxx +++ b/src/BRepMesh/BRepMesh_CircleInspector.hxx @@ -13,8 +13,8 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -#ifndef BRepMesh_CircleInspector_Header -#define BRepMesh_CircleInspector_Header +#ifndef BRepMesh_CircleInspector_HeaderFile +#define BRepMesh_CircleInspector_HeaderFile #include #include diff --git a/src/BVH/BVH_BinnedBuilder.hxx b/src/BVH/BVH_BinnedBuilder.hxx index e8cf2fe552..1a831aca9b 100644 --- a/src/BVH/BVH_BinnedBuilder.hxx +++ b/src/BVH/BVH_BinnedBuilder.hxx @@ -13,8 +13,8 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -#ifndef _BVH_BinnedBuilder_Header -#define _BVH_BinnedBuilder_Header +#ifndef BVH_BinnedBuilder_HeaderFile +#define BVH_BinnedBuilder_HeaderFile #include diff --git a/src/BVH/BVH_Box.hxx b/src/BVH/BVH_Box.hxx index 311cec1183..6d2d01b0c8 100644 --- a/src/BVH/BVH_Box.hxx +++ b/src/BVH/BVH_Box.hxx @@ -13,8 +13,8 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -#ifndef _BVH_Box_Header -#define _BVH_Box_Header +#ifndef BVH_Box_HeaderFile +#define BVH_Box_HeaderFile #include #include diff --git a/src/BVH/BVH_Builder.hxx b/src/BVH/BVH_Builder.hxx index 715c1298f2..d88dab7465 100644 --- a/src/BVH/BVH_Builder.hxx +++ b/src/BVH/BVH_Builder.hxx @@ -13,8 +13,8 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -#ifndef _BVH_Builder_Header -#define _BVH_Builder_Header +#ifndef BVH_Builder_HeaderFile +#define BVH_Builder_HeaderFile #include #include diff --git a/src/BVH/BVH_Geometry.hxx b/src/BVH/BVH_Geometry.hxx index f84a8be2a7..57147eb68b 100644 --- a/src/BVH/BVH_Geometry.hxx +++ b/src/BVH/BVH_Geometry.hxx @@ -13,8 +13,8 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -#ifndef _BVH_Geometry_Header -#define _BVH_Geometry_Header +#ifndef BVH_Geometry_HeaderFile +#define BVH_Geometry_HeaderFile #include #include diff --git a/src/BVH/BVH_Object.hxx b/src/BVH/BVH_Object.hxx index 609169dd32..a6d4eac1d0 100644 --- a/src/BVH/BVH_Object.hxx +++ b/src/BVH/BVH_Object.hxx @@ -13,8 +13,8 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -#ifndef _BVH_Object_Header -#define _BVH_Object_Header +#ifndef BVH_Object_HeaderFile +#define BVH_Object_HeaderFile #include #include diff --git a/src/BVH/BVH_ObjectSet.hxx b/src/BVH/BVH_ObjectSet.hxx index 9a89fcf1e5..d06ad2d6f5 100644 --- a/src/BVH/BVH_ObjectSet.hxx +++ b/src/BVH/BVH_ObjectSet.hxx @@ -13,8 +13,8 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -#ifndef _BVH_ObjectSet_Header -#define _BVH_ObjectSet_Header +#ifndef BVH_ObjectSet_HeaderFile +#define BVH_ObjectSet_HeaderFile #include #include diff --git a/src/BVH/BVH_PrimitiveSet.hxx b/src/BVH/BVH_PrimitiveSet.hxx index 728d94647d..9345afa44d 100644 --- a/src/BVH/BVH_PrimitiveSet.hxx +++ b/src/BVH/BVH_PrimitiveSet.hxx @@ -13,8 +13,8 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -#ifndef _BVH_PrimitiveSet_Header -#define _BVH_PrimitiveSet_Header +#ifndef BVH_PrimitiveSet_HeaderFile +#define BVH_PrimitiveSet_HeaderFile #include #include diff --git a/src/BVH/BVH_Properties.hxx b/src/BVH/BVH_Properties.hxx index 2c09d976a0..b6b62e8c69 100644 --- a/src/BVH/BVH_Properties.hxx +++ b/src/BVH/BVH_Properties.hxx @@ -13,8 +13,8 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -#ifndef _BVH_Properties_Header -#define _BVH_Properties_Header +#ifndef BVH_Properties_HeaderFile +#define BVH_Properties_HeaderFile #include diff --git a/src/BVH/BVH_Set.hxx b/src/BVH/BVH_Set.hxx index aaec3f3272..5ec02e028b 100644 --- a/src/BVH/BVH_Set.hxx +++ b/src/BVH/BVH_Set.hxx @@ -13,8 +13,8 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -#ifndef _BVH_Set_Header -#define _BVH_Set_Header +#ifndef BVH_Set_HeaderFile +#define BVH_Set_HeaderFile #include diff --git a/src/BVH/BVH_Sorter.hxx b/src/BVH/BVH_Sorter.hxx index 30a0aa64f6..491bd5f75c 100644 --- a/src/BVH/BVH_Sorter.hxx +++ b/src/BVH/BVH_Sorter.hxx @@ -13,8 +13,8 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -#ifndef _BVH_Sorter_Header -#define _BVH_Sorter_Header +#ifndef BVH_Sorter_HeaderFile +#define BVH_Sorter_HeaderFile #include diff --git a/src/BVH/BVH_SpatialMedianBuilder.hxx b/src/BVH/BVH_SpatialMedianBuilder.hxx index 57b3f54eac..75599e8419 100644 --- a/src/BVH/BVH_SpatialMedianBuilder.hxx +++ b/src/BVH/BVH_SpatialMedianBuilder.hxx @@ -13,8 +13,8 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -#ifndef _BVH_SpatialMedianBuilder_Header -#define _BVH_SpatialMedianBuilder_Header +#ifndef BVH_SpatialMedianBuilder_HeaderFile +#define BVH_SpatialMedianBuilder_HeaderFile #include #include diff --git a/src/BVH/BVH_SweepPlaneBuilder.hxx b/src/BVH/BVH_SweepPlaneBuilder.hxx index 4b4f3a0a92..b8220e9423 100644 --- a/src/BVH/BVH_SweepPlaneBuilder.hxx +++ b/src/BVH/BVH_SweepPlaneBuilder.hxx @@ -13,8 +13,8 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -#ifndef _BVH_SweepPlaneBuilder_Header -#define _BVH_SweepPlaneBuilder_Header +#ifndef BVH_SweepPlaneBuilder_HeaderFile +#define BVH_SweepPlaneBuilder_HeaderFile #include #include diff --git a/src/BVH/BVH_Triangulation.hxx b/src/BVH/BVH_Triangulation.hxx index d4e3dc3d20..1851d7b7cb 100644 --- a/src/BVH/BVH_Triangulation.hxx +++ b/src/BVH/BVH_Triangulation.hxx @@ -13,8 +13,8 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -#ifndef _BVH_Triangulation_Header -#define _BVH_Triangulation_Header +#ifndef BVH_Triangulation_HeaderFile +#define BVH_Triangulation_HeaderFile #include diff --git a/src/BVH/BVH_Types.hxx b/src/BVH/BVH_Types.hxx index 1776f1681b..10dc849169 100644 --- a/src/BVH/BVH_Types.hxx +++ b/src/BVH/BVH_Types.hxx @@ -13,8 +13,8 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -#ifndef _BVH_Types_Header -#define _BVH_Types_Header +#ifndef BVH_Types_HeaderFile +#define BVH_Types_HeaderFile // Use this macro to switch between STL and OCCT vector types #define _BVH_USE_STD_VECTOR_ diff --git a/src/BinLDrivers/BinLDrivers_VectorOfDocumentSection.hxx b/src/BinLDrivers/BinLDrivers_VectorOfDocumentSection.hxx index d9d2c9e14d..36e3896ed9 100644 --- a/src/BinLDrivers/BinLDrivers_VectorOfDocumentSection.hxx +++ b/src/BinLDrivers/BinLDrivers_VectorOfDocumentSection.hxx @@ -13,8 +13,8 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -#ifndef BinLDrivers_VectorOfDocumentSection_H -#define BinLDrivers_VectorOfDocumentSection_H +#ifndef BinLDrivers_VectorOfDocumentSection_HeaderFile +#define BinLDrivers_VectorOfDocumentSection_HeaderFile #include #include diff --git a/src/ChFi2d/ChFi2d_AnaFilletAlgo.hxx b/src/ChFi2d/ChFi2d_AnaFilletAlgo.hxx index 8b9ce3ba27..f8071b2048 100644 --- a/src/ChFi2d/ChFi2d_AnaFilletAlgo.hxx +++ b/src/ChFi2d/ChFi2d_AnaFilletAlgo.hxx @@ -13,8 +13,8 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -#ifndef _ANAFILLETALGO_H_ -#define _ANAFILLETALGO_H_ +#ifndef ChFi2d_AnaFilletAlgo_HeaderFile +#define ChFi2d_AnaFilletAlgo_HeaderFile #include #include diff --git a/src/ChFi2d/ChFi2d_ChamferAPI.hxx b/src/ChFi2d/ChFi2d_ChamferAPI.hxx index c1ccdc17c8..f67c4a499c 100644 --- a/src/ChFi2d/ChFi2d_ChamferAPI.hxx +++ b/src/ChFi2d/ChFi2d_ChamferAPI.hxx @@ -13,8 +13,8 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -#ifndef _CHAMFERAPI_H_ -#define _CHAMFERAPI_H_ +#ifndef ChFi2d_ChamferAPI_HeaderFile +#define ChFi2d_ChamferAPI_HeaderFile #include #include diff --git a/src/ChFi2d/ChFi2d_FilletAPI.hxx b/src/ChFi2d/ChFi2d_FilletAPI.hxx index e0b7dfd6b4..49c3467a23 100644 --- a/src/ChFi2d/ChFi2d_FilletAPI.hxx +++ b/src/ChFi2d/ChFi2d_FilletAPI.hxx @@ -13,8 +13,8 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -#ifndef _CHFI2D_FILLETAPI_H_ -#define _CHFI2D_FILLETAPI_H_ +#ifndef ChFi2d_FilletAPI_HeaderFile +#define ChFi2d_FilletAPI_HeaderFile #include #include diff --git a/src/ChFi2d/ChFi2d_FilletAlgo.hxx b/src/ChFi2d/ChFi2d_FilletAlgo.hxx index f4b8867b43..fdd396f57b 100644 --- a/src/ChFi2d/ChFi2d_FilletAlgo.hxx +++ b/src/ChFi2d/ChFi2d_FilletAlgo.hxx @@ -13,8 +13,8 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -#ifndef _FILLETALGO_H_ -#define _FILLETALGO_H_ +#ifndef ChFi2d_FilletAlgo_HeaderFile +#define ChFi2d_FilletAlgo_HeaderFile #include #include diff --git a/src/ChFiKPart/ChFiKPart_ComputeData_CS.hxx b/src/ChFiKPart/ChFiKPart_ComputeData_CS.hxx index 6f1c1dd1bb..4eb71729c3 100644 --- a/src/ChFiKPart/ChFiKPart_ComputeData_CS.hxx +++ b/src/ChFiKPart/ChFiKPart_ComputeData_CS.hxx @@ -14,15 +14,14 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. +#ifndef ChFiKPart_ComputeData_CS_HeaderFile +#define ChFiKPart_ComputeData_CS_HeaderFile + #include #include #include #include -#ifndef ChFiKPart_ComputeData_CS_HeaderFile -#define ChFiKPart_ComputeData_CS_HeaderFile - - void ChFiKPart_CornerSpine(const Handle(Adaptor3d_Surface)& S1, const Handle(Adaptor3d_Surface)& S2, const gp_Pnt2d& P1S1, diff --git a/src/ChFiKPart/ChFiKPart_ComputeData_FilPlnCon.hxx b/src/ChFiKPart/ChFiKPart_ComputeData_FilPlnCon.hxx index c501f4fa75..c2a47d7e76 100644 --- a/src/ChFiKPart/ChFiKPart_ComputeData_FilPlnCon.hxx +++ b/src/ChFiKPart/ChFiKPart_ComputeData_FilPlnCon.hxx @@ -14,8 +14,8 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -#ifndef ChFiKPart_ComputeData_PlnCon_HeaderFile -#define ChFiKPart_ComputeData_PlnCon_HeaderFile +#ifndef ChFiKPart_ComputeData_FilPlnCon_HeaderFile +#define ChFiKPart_ComputeData_FilPlnCon_HeaderFile Standard_Boolean ChFiKPart_MakeFillet(TopOpeBRepDS_DataStructure& DStr, const Handle(ChFiDS_SurfData)& Data, diff --git a/src/ChFiKPart/ChFiKPart_ComputeData_FilPlnCyl.hxx b/src/ChFiKPart/ChFiKPart_ComputeData_FilPlnCyl.hxx index d60d5e00c3..85259f2cc3 100644 --- a/src/ChFiKPart/ChFiKPart_ComputeData_FilPlnCyl.hxx +++ b/src/ChFiKPart/ChFiKPart_ComputeData_FilPlnCyl.hxx @@ -14,8 +14,8 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -#ifndef ChFiKPart_ComputeData_PlnCyl_HeaderFile -#define ChFiKPart_ComputeData_PlnCyl_HeaderFile +#ifndef ChFiKPart_ComputeData_FilPlnCyl_HeaderFile +#define ChFiKPart_ComputeData_FilPlnCyl_HeaderFile Standard_Boolean ChFiKPart_MakeFillet(TopOpeBRepDS_DataStructure& DStr, const Handle(ChFiDS_SurfData)& Data, diff --git a/src/ChFiKPart/ChFiKPart_ComputeData_FilPlnPln.hxx b/src/ChFiKPart/ChFiKPart_ComputeData_FilPlnPln.hxx index 1b5d087c08..e19ec599e1 100644 --- a/src/ChFiKPart/ChFiKPart_ComputeData_FilPlnPln.hxx +++ b/src/ChFiKPart/ChFiKPart_ComputeData_FilPlnPln.hxx @@ -14,8 +14,8 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -#ifndef ChFiKPart_ComputeData_PlnPln_HeaderFile -#define ChFiKPart_ComputeData_PlnPln_HeaderFile +#ifndef ChFiKPart_ComputeData_FilPlnPln_HeaderFile +#define ChFiKPart_ComputeData_FilPlnPln_HeaderFile Standard_Boolean ChFiKPart_MakeFillet(TopOpeBRepDS_DataStructure& DStr, const Handle(ChFiDS_SurfData)& Data, diff --git a/src/Cocoa/Cocoa_LocalPool.hxx b/src/Cocoa/Cocoa_LocalPool.hxx index 7cafbae4a1..6592fd8409 100644 --- a/src/Cocoa/Cocoa_LocalPool.hxx +++ b/src/Cocoa/Cocoa_LocalPool.hxx @@ -11,8 +11,8 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -#ifndef __Cocoa_LocalPool_h_ -#define __Cocoa_LocalPool_h_ +#ifndef Cocoa_LocalPool_HeaderFile +#define Cocoa_LocalPool_HeaderFile #if defined(__clang__) && (__clang_major__ >= 4) #if __has_feature(objc_arc) diff --git a/src/Cocoa/Cocoa_Window.hxx b/src/Cocoa/Cocoa_Window.hxx index f0e8387e20..9a60920066 100644 --- a/src/Cocoa/Cocoa_Window.hxx +++ b/src/Cocoa/Cocoa_Window.hxx @@ -13,8 +13,8 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -#ifndef _Cocoa_Window_H__ -#define _Cocoa_Window_H__ +#ifndef Cocoa_Window_HeaderFile +#define Cocoa_Window_HeaderFile #if defined(__APPLE__) #import diff --git a/src/Convert/Convert_CosAndSinEvalFunction.hxx b/src/Convert/Convert_CosAndSinEvalFunction.hxx index 340995f0b4..5074faa162 100644 --- a/src/Convert/Convert_CosAndSinEvalFunction.hxx +++ b/src/Convert/Convert_CosAndSinEvalFunction.hxx @@ -14,13 +14,13 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. +#ifndef Convert_CosAndSinEvalFunction_HeaderFile +#define Convert_CosAndSinEvalFunction_HeaderFile + #include #include #include -#ifndef _Convert_CosAnSinEvalFunction_HeaderFile -#define _Convert_CosAnSinEvalFunction_HeaderFile - typedef void Convert_CosAndSinEvalFunction(Standard_Real, const Standard_Integer, const TColgp_Array1OfPnt2d&, diff --git a/src/Convert/Convert_PolynomialCosAndSin.hxx b/src/Convert/Convert_PolynomialCosAndSin.hxx index ba32850567..4b864ed029 100644 --- a/src/Convert/Convert_PolynomialCosAndSin.hxx +++ b/src/Convert/Convert_PolynomialCosAndSin.hxx @@ -14,12 +14,12 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. +#ifndef Convert_PolynomialCosAndSin_HeaderFile +#define Convert_PolynomialCosAndSin_HeaderFile + #include #include -#ifndef _Convert_PolynomialCosAnSin_HeaderFile -#define _Convert_PolynomialCosAnSin_HeaderFile - void BuildPolynomialCosAndSin (const Standard_Real, const Standard_Real, diff --git a/src/DsgPrs/DsgPrs_DatumPrs.hxx b/src/DsgPrs/DsgPrs_DatumPrs.hxx index 23da441058..d5c154ce69 100644 --- a/src/DsgPrs/DsgPrs_DatumPrs.hxx +++ b/src/DsgPrs/DsgPrs_DatumPrs.hxx @@ -11,8 +11,8 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -#ifndef _DsgPrs_DatumPrs_H__ -#define _DsgPrs_DatumPrs_H__ +#ifndef DsgPrs_DatumPrs_HeaderFile +#define DsgPrs_DatumPrs_HeaderFile #include #include diff --git a/src/Font/Font_BRepFont.hxx b/src/Font/Font_BRepFont.hxx index f6673f9c90..9e80e11847 100755 --- a/src/Font/Font_BRepFont.hxx +++ b/src/Font/Font_BRepFont.hxx @@ -12,8 +12,8 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -#ifndef _Font_BRepFont_H__ -#define _Font_BRepFont_H__ +#ifndef Font_BRepFont_HeaderFile +#define Font_BRepFont_HeaderFile #include diff --git a/src/Font/Font_FTFont.hxx b/src/Font/Font_FTFont.hxx index 751dfaba40..9eb86ff4c1 100755 --- a/src/Font/Font_FTFont.hxx +++ b/src/Font/Font_FTFont.hxx @@ -13,8 +13,8 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -#ifndef _Font_FTFont_H__ -#define _Font_FTFont_H__ +#ifndef Font_FTFont_HeaderFile +#define Font_FTFont_HeaderFile #include #include diff --git a/src/Font/Font_FTLibrary.hxx b/src/Font/Font_FTLibrary.hxx index 48eb411975..fa1329b34f 100755 --- a/src/Font/Font_FTLibrary.hxx +++ b/src/Font/Font_FTLibrary.hxx @@ -13,8 +13,8 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -#ifndef _Font_FTLibrary_H__ -#define _Font_FTLibrary_H__ +#ifndef Font_FTLibrary_HeaderFile +#define Font_FTLibrary_HeaderFile #include #include diff --git a/src/Graphic3d/Graphic3d_BufferType.hxx b/src/Graphic3d/Graphic3d_BufferType.hxx index 8abedb9d17..99e449bca2 100644 --- a/src/Graphic3d/Graphic3d_BufferType.hxx +++ b/src/Graphic3d/Graphic3d_BufferType.hxx @@ -11,8 +11,8 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -#ifndef _Graphic3d_BufferType_H__ -#define _Graphic3d_BufferType_H__ +#ifndef Graphic3d_BufferType_HeaderFile +#define Graphic3d_BufferType_HeaderFile //! Define buffers available for dump enum Graphic3d_BufferType diff --git a/src/Graphic3d/Graphic3d_MarkerImage.hxx b/src/Graphic3d/Graphic3d_MarkerImage.hxx index eb69696618..62c1884303 100755 --- a/src/Graphic3d/Graphic3d_MarkerImage.hxx +++ b/src/Graphic3d/Graphic3d_MarkerImage.hxx @@ -13,8 +13,8 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -#ifndef _Graphic3d_MarkerImage_H__ -#define _Graphic3d_MarkerImage_H__ +#ifndef Graphic3d_MarkerImage_HeaderFile +#define Graphic3d_MarkerImage_HeaderFile #include #include diff --git a/src/Graphic3d/Graphic3d_TransModeFlags.hxx b/src/Graphic3d/Graphic3d_TransModeFlags.hxx index ae5f8f8019..2246541d8f 100644 --- a/src/Graphic3d/Graphic3d_TransModeFlags.hxx +++ b/src/Graphic3d/Graphic3d_TransModeFlags.hxx @@ -13,8 +13,8 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -#ifndef Graphic3d_TRANS_MODE_FLAGS_HXX -#define Graphic3d_TRANS_MODE_FLAGS_HXX +#ifndef Graphic3d_TransModeFlags_HeaderFile +#define Graphic3d_TransModeFlags_HeaderFile //! Transform Persistence Mode defining whether to lock in object position, rotation and / or zooming relative to camera position. enum Graphic3d_TransModeFlags diff --git a/src/Graphic3d/Graphic3d_Vec.hxx b/src/Graphic3d/Graphic3d_Vec.hxx index a2608d9610..598bbf52a5 100755 --- a/src/Graphic3d/Graphic3d_Vec.hxx +++ b/src/Graphic3d/Graphic3d_Vec.hxx @@ -13,8 +13,8 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -#ifndef _Graphic3d_Vec_H__ -#define _Graphic3d_Vec_H__ +#ifndef Graphic3d_Vec_HeaderFile +#define Graphic3d_Vec_HeaderFile #include #include diff --git a/src/IGESData/IGESData_Dump.hxx b/src/IGESData/IGESData_Dump.hxx index fbbacbf0a4..d8030e8a55 100644 --- a/src/IGESData/IGESData_Dump.hxx +++ b/src/IGESData/IGESData_Dump.hxx @@ -11,6 +11,9 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. +#ifndef IGESData_Dump_HeaderFile +#define IGESData_Dump_HeaderFile + // -------------------------- // IGESData_Dump.hxx // -------------------------- @@ -307,3 +310,5 @@ if (str.IsNull()) S << "(undefined)";\ }\ }\ } + +#endif diff --git a/src/Image/Image_AlienPixMap.hxx b/src/Image/Image_AlienPixMap.hxx index 368f1039d8..9c61d08ef7 100644 --- a/src/Image/Image_AlienPixMap.hxx +++ b/src/Image/Image_AlienPixMap.hxx @@ -13,8 +13,8 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -#ifndef _Image_AlienPixMap_H__ -#define _Image_AlienPixMap_H__ +#ifndef Image_AlienPixMap_HeaderFile +#define Image_AlienPixMap_HeaderFile #include diff --git a/src/Image/Image_Color.hxx b/src/Image/Image_Color.hxx index fa2184fedd..3b65930943 100644 --- a/src/Image/Image_Color.hxx +++ b/src/Image/Image_Color.hxx @@ -13,8 +13,8 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -#ifndef _Image_Color_H__ -#define _Image_Color_H__ +#ifndef Image_Color_HeaderFile +#define Image_Color_HeaderFile #include diff --git a/src/Image/Image_Diff.hxx b/src/Image/Image_Diff.hxx index 3641a0e8bd..6ce4b8f03b 100644 --- a/src/Image/Image_Diff.hxx +++ b/src/Image/Image_Diff.hxx @@ -13,8 +13,8 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -#ifndef _Image_Diff_H__ -#define _Image_Diff_H__ +#ifndef Image_Diff_HeaderFile +#define Image_Diff_HeaderFile #include #include diff --git a/src/Image/Image_PixMap.hxx b/src/Image/Image_PixMap.hxx index 35e263ad54..f155a660ab 100644 --- a/src/Image/Image_PixMap.hxx +++ b/src/Image/Image_PixMap.hxx @@ -13,8 +13,8 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -#ifndef _Image_PixMap_H__ -#define _Image_PixMap_H__ +#ifndef Image_PixMap_HeaderFile +#define Image_PixMap_HeaderFile #include #include diff --git a/src/Image/Image_PixMapData.hxx b/src/Image/Image_PixMapData.hxx index 046bc1bc76..b9050be1ed 100644 --- a/src/Image/Image_PixMapData.hxx +++ b/src/Image/Image_PixMapData.hxx @@ -13,8 +13,8 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -#ifndef _Image_PixMapData_H__ -#define _Image_PixMapData_H__ +#ifndef Image_PixMapData_HeaderFile +#define Image_PixMapData_HeaderFile #include #include diff --git a/src/IntAna2d/IntAna2d_Outils.hxx b/src/IntAna2d/IntAna2d_Outils.hxx index 48d173b594..43ef3cef2d 100644 --- a/src/IntAna2d/IntAna2d_Outils.hxx +++ b/src/IntAna2d/IntAna2d_Outils.hxx @@ -15,8 +15,8 @@ //============================================================================ //======================================================= IntAna2d_Outils.hxx //============================================================================ -#ifndef IntAna2d_Outil_HeaderFile -#define IntAna2d_Outil_HeaderFile +#ifndef IntAna2d_Outils_HeaderFile +#define IntAna2d_Outils_HeaderFile #include #include diff --git a/src/IntImp/IntImp_ComputeTangence.hxx b/src/IntImp/IntImp_ComputeTangence.hxx index 51f3c8bc78..0049522ee1 100644 --- a/src/IntImp/IntImp_ComputeTangence.hxx +++ b/src/IntImp/IntImp_ComputeTangence.hxx @@ -12,6 +12,9 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. +#ifndef IntImp_ComputeTangence_HeaderFile +#define IntImp_ComputeTangence_HeaderFile + #include #include @@ -21,3 +24,5 @@ Standard_EXPORT Standard_Boolean IntImp_ComputeTangence(const gp_Vec DPuv[], const Standard_Real EpsUV[], Standard_Real Tgduv[], IntImp_ConstIsoparametric TabIso[]); + +#endif diff --git a/src/Interface/Interface_Statics.hxx b/src/Interface/Interface_Statics.hxx index 91e432685f..1aad08d4a2 100644 --- a/src/Interface/Interface_Statics.hxx +++ b/src/Interface/Interface_Statics.hxx @@ -11,6 +11,9 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. +#ifndef Interface_Statics_HeaderFile +#define Interface_Statics_HeaderFile + // Macros to help static Handles not to be "constructed" before main run // In order to avoid it, the Handle to be statically reserved is encapsulated // in a structure itself designated through a Null Pointer : @@ -90,3 +93,5 @@ Handle(type)& var = var##_s->H; #define InitHandleVal(type,var,value) \ if(!var##_s) { var##_s=new type##_struc; var##_s->H=value; }\ Handle(type)& var = var##_s->H; + +#endif diff --git a/src/Interface/Interface_Translates.hxx b/src/Interface/Interface_Translates.hxx index 8d28c8593c..6e481a0427 100644 --- a/src/Interface/Interface_Translates.hxx +++ b/src/Interface/Interface_Translates.hxx @@ -11,6 +11,9 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. +#ifndef Interface_Translates_HeaderFile +#define Interface_Translates_HeaderFile + // Interface_Translates.hxx // This set of macros provides some simple translation formula, i.e. @@ -81,3 +84,5 @@ if (!seq.IsNull()) {\ for (nument = numlow; nument <= numup; nument ++)\ seq->Append(arr->Value(nument));\ } + +#endif diff --git a/src/LDOM/LDOM_DeclareSequence.hxx b/src/LDOM/LDOM_DeclareSequence.hxx index 51a857d176..ba2365af80 100644 --- a/src/LDOM/LDOM_DeclareSequence.hxx +++ b/src/LDOM/LDOM_DeclareSequence.hxx @@ -13,8 +13,8 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -#ifndef _Sequence_Declare_HeaderFile -#define _Sequence_Declare_HeaderFile +#ifndef LDOM_DeclareSequence_HeaderFile +#define LDOM_DeclareSequence_HeaderFile #ifndef _Standard_Macro_HeaderFile #include diff --git a/src/MeshVS/MeshVS_BuilderPriority.hxx b/src/MeshVS/MeshVS_BuilderPriority.hxx index 3be9a3e0d2..834630eec5 100644 --- a/src/MeshVS/MeshVS_BuilderPriority.hxx +++ b/src/MeshVS/MeshVS_BuilderPriority.hxx @@ -13,8 +13,8 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -#ifndef MeshVS_BUILDERPRIORITY_HXX -#define MeshVS_BUILDERPRIORITY_HXX +#ifndef MeshVS_BuilderPriority_HeaderFile +#define MeshVS_BuilderPriority_HeaderFile typedef Standard_Integer MeshVS_BuilderPriority; diff --git a/src/MeshVS/MeshVS_DisplayModeFlags.hxx b/src/MeshVS/MeshVS_DisplayModeFlags.hxx index 604773ba72..c68ed0f838 100644 --- a/src/MeshVS/MeshVS_DisplayModeFlags.hxx +++ b/src/MeshVS/MeshVS_DisplayModeFlags.hxx @@ -13,8 +13,8 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -#ifndef MeshVS_DISPLAY_MODE_FLAGS_HXX -#define MeshVS_DISPLAY_MODE_FLAGS_HXX +#ifndef MeshVS_DisplayModeFlags_HeaderFile +#define MeshVS_DisplayModeFlags_HeaderFile typedef Standard_Integer MeshVS_DisplayModeFlags; diff --git a/src/MeshVS/MeshVS_EntityType.hxx b/src/MeshVS/MeshVS_EntityType.hxx index 90bc9e7f4a..ef5849bc90 100644 --- a/src/MeshVS/MeshVS_EntityType.hxx +++ b/src/MeshVS/MeshVS_EntityType.hxx @@ -13,8 +13,8 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -#ifndef MeshVS_ENTITYTYPEHXX -#define MeshVS_ENTITYTYPEHXX +#ifndef MeshVS_EntityType_HeaderFile +#define MeshVS_EntityType_HeaderFile typedef enum { diff --git a/src/MeshVS/MeshVS_SelectionModeFlags.hxx b/src/MeshVS/MeshVS_SelectionModeFlags.hxx index 4d5b74e49c..4b4560f765 100644 --- a/src/MeshVS/MeshVS_SelectionModeFlags.hxx +++ b/src/MeshVS/MeshVS_SelectionModeFlags.hxx @@ -13,8 +13,8 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -#ifndef MeshVS_SELECTION_MODE_FLAGS_HXX -#define MeshVS_SELECTION_MODE_FLAGS_HXX +#ifndef MeshVS_SelectionModeFlags_HeaderFile +#define MeshVS_SelectionModeFlags_HeaderFile typedef enum { diff --git a/src/MeshVS/MeshVS_TwoNodes.hxx b/src/MeshVS/MeshVS_TwoNodes.hxx index a9b06cf2fa..d581d901f3 100644 --- a/src/MeshVS/MeshVS_TwoNodes.hxx +++ b/src/MeshVS/MeshVS_TwoNodes.hxx @@ -11,8 +11,8 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -#ifndef __TWO_NODES_STRUCT_HEADER__ -#define __TWO_NODES_STRUCT_HEADER__ +#ifndef MeshVS_TwoNodes_HeaderFile +#define MeshVS_TwoNodes_HeaderFile #ifndef _Standard_HeaderFile #include diff --git a/src/NCollection/NCollection_String.hxx b/src/NCollection/NCollection_String.hxx index 63e951d214..bed6772e11 100755 --- a/src/NCollection/NCollection_String.hxx +++ b/src/NCollection/NCollection_String.hxx @@ -13,8 +13,8 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -#ifndef _NCollection_String_H__ -#define _NCollection_String_H__ +#ifndef NCollection_String_HeaderFile +#define NCollection_String_HeaderFile #include "NCollection_UtfString.hxx" diff --git a/src/NCollection/NCollection_UtfIterator.hxx b/src/NCollection/NCollection_UtfIterator.hxx index 2b91ad508e..ec033a2492 100755 --- a/src/NCollection/NCollection_UtfIterator.hxx +++ b/src/NCollection/NCollection_UtfIterator.hxx @@ -13,8 +13,8 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -#ifndef _NCollection_UtfIterator_H__ -#define _NCollection_UtfIterator_H__ +#ifndef NCollection_UtfIterator_HeaderFile +#define NCollection_UtfIterator_HeaderFile #include diff --git a/src/NCollection/NCollection_UtfString.hxx b/src/NCollection/NCollection_UtfString.hxx index 66cf39ae8b..ad180e1ff1 100755 --- a/src/NCollection/NCollection_UtfString.hxx +++ b/src/NCollection/NCollection_UtfString.hxx @@ -13,8 +13,8 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -#ifndef _NCollection_UtfString_H__ -#define _NCollection_UtfString_H__ +#ifndef NCollection_UtfString_HeaderFile +#define NCollection_UtfString_HeaderFile #include diff --git a/src/NCollection/NCollection_Vec2.hxx b/src/NCollection/NCollection_Vec2.hxx index 46206d9750..3405f076b5 100644 --- a/src/NCollection/NCollection_Vec2.hxx +++ b/src/NCollection/NCollection_Vec2.hxx @@ -12,8 +12,8 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -#ifndef _NCollection_Vec2_H__ -#define _NCollection_Vec2_H__ +#ifndef NCollection_Vec2_HeaderFile +#define NCollection_Vec2_HeaderFile #include // std::sqrt() diff --git a/src/NCollection/NCollection_Vec3.hxx b/src/NCollection/NCollection_Vec3.hxx index bc74018685..a13e343886 100644 --- a/src/NCollection/NCollection_Vec3.hxx +++ b/src/NCollection/NCollection_Vec3.hxx @@ -12,8 +12,8 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -#ifndef _NCollection_Vec3_H__ -#define _NCollection_Vec3_H__ +#ifndef NCollection_Vec3_HeaderFile +#define NCollection_Vec3_HeaderFile #include #include diff --git a/src/NCollection/NCollection_Vec4.hxx b/src/NCollection/NCollection_Vec4.hxx index d00d84bfc1..934a7970a3 100644 --- a/src/NCollection/NCollection_Vec4.hxx +++ b/src/NCollection/NCollection_Vec4.hxx @@ -12,8 +12,8 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -#ifndef _NCollection_Vec4_H__ -#define _NCollection_Vec4_H__ +#ifndef NCollection_Vec4_HeaderFile +#define NCollection_Vec4_HeaderFile #include diff --git a/src/OSD/OSD_ErrorList.hxx b/src/OSD/OSD_ErrorList.hxx index 6da92dafaa..a62a9a5c7c 100755 --- a/src/OSD/OSD_ErrorList.hxx +++ b/src/OSD/OSD_ErrorList.hxx @@ -12,8 +12,8 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -#ifndef List_Of_Errors -#define List_Of_Errors +#ifndef OSD_ErrorList_HeaderFile +#define OSD_ErrorList_HeaderFile #include #include diff --git a/src/OSD/OSD_MemInfo.hxx b/src/OSD/OSD_MemInfo.hxx index 0e59c57d9c..6545ade300 100644 --- a/src/OSD/OSD_MemInfo.hxx +++ b/src/OSD/OSD_MemInfo.hxx @@ -13,8 +13,8 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -#ifndef _OSD_MemInfo_H__ -#define _OSD_MemInfo_H__ +#ifndef OSD_MemInfo_HeaderFile +#define OSD_MemInfo_HeaderFile #include #include diff --git a/src/OSD/OSD_WNT.hxx b/src/OSD/OSD_WNT.hxx index d112791279..4ad8417dd8 100644 --- a/src/OSD/OSD_WNT.hxx +++ b/src/OSD/OSD_WNT.hxx @@ -12,8 +12,8 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -#ifndef __OSD_WNT_H -# define __OSD_WNT_H +#ifndef OSD_WNT_HeaderFile +#define OSD_WNT_HeaderFile # ifndef STRICT # define STRICT @@ -110,4 +110,4 @@ void SetResponseDirectoryProc ( RESPONSE_DIR_PROC ); } # endif /* __cplusplus */ -#endif /* __OSD_WNT_H */ +#endif diff --git a/src/OpenGl/OpenGl_ArbDbg.hxx b/src/OpenGl/OpenGl_ArbDbg.hxx index e68e4bf2ef..410b87b9dc 100755 --- a/src/OpenGl/OpenGl_ArbDbg.hxx +++ b/src/OpenGl/OpenGl_ArbDbg.hxx @@ -13,8 +13,8 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -#ifndef _OpenGl_ArbDbg_H__ -#define _OpenGl_ArbDbg_H__ +#ifndef OpenGl_ArbDbg_HeaderFile +#define OpenGl_ArbDbg_HeaderFile #include diff --git a/src/OpenGl/OpenGl_ArbFBO.hxx b/src/OpenGl/OpenGl_ArbFBO.hxx index bfac84aa27..9875982242 100644 --- a/src/OpenGl/OpenGl_ArbFBO.hxx +++ b/src/OpenGl/OpenGl_ArbFBO.hxx @@ -13,8 +13,8 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -#ifndef _OpenGl_ArbFBO_H__ -#define _OpenGl_ArbFBO_H__ +#ifndef OpenGl_ArbFBO_HeaderFile +#define OpenGl_ArbFBO_HeaderFile #include diff --git a/src/OpenGl/OpenGl_ArbIns.hxx b/src/OpenGl/OpenGl_ArbIns.hxx index d554f6c0cb..2d8af5f6c3 100644 --- a/src/OpenGl/OpenGl_ArbIns.hxx +++ b/src/OpenGl/OpenGl_ArbIns.hxx @@ -13,8 +13,8 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -#ifndef _OpenGl_ArbIns_H__ -#define _OpenGl_ArbIns_H__ +#ifndef OpenGl_ArbIns_HeaderFile +#define OpenGl_ArbIns_HeaderFile #include diff --git a/src/OpenGl/OpenGl_ArbTBO.hxx b/src/OpenGl/OpenGl_ArbTBO.hxx index 12b3deb1d9..f85cff52ef 100644 --- a/src/OpenGl/OpenGl_ArbTBO.hxx +++ b/src/OpenGl/OpenGl_ArbTBO.hxx @@ -13,8 +13,8 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -#ifndef _OpenGl_ArbTBO_H__ -#define _OpenGl_ArbTBO_H__ +#ifndef OpenGl_ArbTBO_HeaderFile +#define OpenGl_ArbTBO_HeaderFile #include diff --git a/src/OpenGl/OpenGl_CappingAlgo.hxx b/src/OpenGl/OpenGl_CappingAlgo.hxx index 9ad192da13..bc885a1bd1 100755 --- a/src/OpenGl/OpenGl_CappingAlgo.hxx +++ b/src/OpenGl/OpenGl_CappingAlgo.hxx @@ -13,8 +13,8 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -#ifndef _OpenGl_CappingAlgo_H__ -#define _OpenGl_CappingAlgo_H__ +#ifndef OpenGl_CappingAlgo_HeaderFile +#define OpenGl_CappingAlgo_HeaderFile #include diff --git a/src/OpenGl/OpenGl_CappingPlaneResource.hxx b/src/OpenGl/OpenGl_CappingPlaneResource.hxx index a3486d08b2..5a60a59c18 100755 --- a/src/OpenGl/OpenGl_CappingPlaneResource.hxx +++ b/src/OpenGl/OpenGl_CappingPlaneResource.hxx @@ -13,8 +13,8 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -#ifndef _OpenGl_CappingPlaneResource_H__ -#define _OpenGl_CappingPlaneResource_H__ +#ifndef OpenGl_CappingPlaneResource_HeaderFile +#define OpenGl_CappingPlaneResource_HeaderFile #include #include diff --git a/src/OpenGl/OpenGl_Caps.hxx b/src/OpenGl/OpenGl_Caps.hxx index 1f62243c4c..67d0eba38f 100755 --- a/src/OpenGl/OpenGl_Caps.hxx +++ b/src/OpenGl/OpenGl_Caps.hxx @@ -13,8 +13,8 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -#ifndef _OpenGl_Caps_H__ -#define _OpenGl_Caps_H__ +#ifndef OpenGl_Caps_HeaderFile +#define OpenGl_Caps_HeaderFile #include #include diff --git a/src/OpenGl/OpenGl_Clipping.hxx b/src/OpenGl/OpenGl_Clipping.hxx index b2fe1f31a4..bfcc289ad3 100755 --- a/src/OpenGl/OpenGl_Clipping.hxx +++ b/src/OpenGl/OpenGl_Clipping.hxx @@ -13,8 +13,8 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -#ifndef _OpenGl_Clipping_H__ -#define _OpenGl_Clipping_H__ +#ifndef OpenGl_Clipping_HeaderFile +#define OpenGl_Clipping_HeaderFile #include #include diff --git a/src/OpenGl/OpenGl_Context.hxx b/src/OpenGl/OpenGl_Context.hxx index f2a205fa31..27849d3169 100644 --- a/src/OpenGl/OpenGl_Context.hxx +++ b/src/OpenGl/OpenGl_Context.hxx @@ -13,8 +13,8 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -#ifndef _OpenGl_Context_H__ -#define _OpenGl_Context_H__ +#ifndef OpenGl_Context_HeaderFile +#define OpenGl_Context_HeaderFile #include #include diff --git a/src/OpenGl/OpenGl_Element.hxx b/src/OpenGl/OpenGl_Element.hxx index f4c67692e4..b16c835b26 100644 --- a/src/OpenGl/OpenGl_Element.hxx +++ b/src/OpenGl/OpenGl_Element.hxx @@ -13,8 +13,8 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -#ifndef OpenGl_Element_Header -#define OpenGl_Element_Header +#ifndef OpenGl_Element_HeaderFile +#define OpenGl_Element_HeaderFile #include #include diff --git a/src/OpenGl/OpenGl_ExtGS.hxx b/src/OpenGl/OpenGl_ExtGS.hxx index 5c8c2f6037..cd9ee7da8c 100644 --- a/src/OpenGl/OpenGl_ExtGS.hxx +++ b/src/OpenGl/OpenGl_ExtGS.hxx @@ -13,8 +13,8 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -#ifndef _OpenGl_ExtGS_H__ -#define _OpenGl_ExtGS_H__ +#ifndef OpenGl_ExtGS_HeaderFile +#define OpenGl_ExtGS_HeaderFile #include diff --git a/src/OpenGl/OpenGl_Flipper.hxx b/src/OpenGl/OpenGl_Flipper.hxx index 17de26e7c4..5818b0ba12 100755 --- a/src/OpenGl/OpenGl_Flipper.hxx +++ b/src/OpenGl/OpenGl_Flipper.hxx @@ -11,8 +11,8 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -#ifndef OpenGl_Flipper_Header -#define OpenGl_Flipper_Header +#ifndef OpenGl_Flipper_HeaderFile +#define OpenGl_Flipper_HeaderFile #include #include diff --git a/src/OpenGl/OpenGl_Font.hxx b/src/OpenGl/OpenGl_Font.hxx index 7797674824..44cc485861 100755 --- a/src/OpenGl/OpenGl_Font.hxx +++ b/src/OpenGl/OpenGl_Font.hxx @@ -13,8 +13,8 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -#ifndef _OpenGl_Font_H__ -#define _OpenGl_Font_H__ +#ifndef OpenGl_Font_HeaderFile +#define OpenGl_Font_HeaderFile #include #include diff --git a/src/OpenGl/OpenGl_FrameBuffer.hxx b/src/OpenGl/OpenGl_FrameBuffer.hxx index 6e8a813ba5..ca34f1a7a6 100644 --- a/src/OpenGl/OpenGl_FrameBuffer.hxx +++ b/src/OpenGl/OpenGl_FrameBuffer.hxx @@ -12,8 +12,8 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -#ifndef OPENGL_FRAME_BUFFER_H -#define OPENGL_FRAME_BUFFER_H +#ifndef OpenGl_FrameBuffer_HeaderFile +#define OpenGl_FrameBuffer_HeaderFile #include diff --git a/src/OpenGl/OpenGl_GlCore11.hxx b/src/OpenGl/OpenGl_GlCore11.hxx index 40245b7ade..e1495f1cd7 100644 --- a/src/OpenGl/OpenGl_GlCore11.hxx +++ b/src/OpenGl/OpenGl_GlCore11.hxx @@ -13,8 +13,8 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -#ifndef _OpenGl_GlCore11_Header -#define _OpenGl_GlCore11_Header +#ifndef OpenGl_GlCore11_HeaderFile +#define OpenGl_GlCore11_HeaderFile #include diff --git a/src/OpenGl/OpenGl_GlCore11Fwd.hxx b/src/OpenGl/OpenGl_GlCore11Fwd.hxx index af26e5e859..07fef6806c 100644 --- a/src/OpenGl/OpenGl_GlCore11Fwd.hxx +++ b/src/OpenGl/OpenGl_GlCore11Fwd.hxx @@ -13,8 +13,8 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -#ifndef _OpenGl_GlCore11Fwd_Header -#define _OpenGl_GlCore11Fwd_Header +#ifndef OpenGl_GlCore11Fwd_HeaderFile +#define OpenGl_GlCore11Fwd_HeaderFile #include diff --git a/src/OpenGl/OpenGl_GlCore12.hxx b/src/OpenGl/OpenGl_GlCore12.hxx index fd2fc999f7..c3a659e40d 100644 --- a/src/OpenGl/OpenGl_GlCore12.hxx +++ b/src/OpenGl/OpenGl_GlCore12.hxx @@ -13,8 +13,8 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -#ifndef _OpenGl_GlCore12_Header -#define _OpenGl_GlCore12_Header +#ifndef OpenGl_GlCore12_HeaderFile +#define OpenGl_GlCore12_HeaderFile #include diff --git a/src/OpenGl/OpenGl_GlCore13.hxx b/src/OpenGl/OpenGl_GlCore13.hxx index ee1775ac13..ea70227fe3 100644 --- a/src/OpenGl/OpenGl_GlCore13.hxx +++ b/src/OpenGl/OpenGl_GlCore13.hxx @@ -13,8 +13,8 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -#ifndef _OpenGl_GlCore13_Header -#define _OpenGl_GlCore13_Header +#ifndef OpenGl_GlCore13_HeaderFile +#define OpenGl_GlCore13_HeaderFile #include diff --git a/src/OpenGl/OpenGl_GlCore14.hxx b/src/OpenGl/OpenGl_GlCore14.hxx index 25cf04211d..5eb0662abd 100644 --- a/src/OpenGl/OpenGl_GlCore14.hxx +++ b/src/OpenGl/OpenGl_GlCore14.hxx @@ -13,8 +13,8 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -#ifndef _OpenGl_GlCore14_Header -#define _OpenGl_GlCore14_Header +#ifndef OpenGl_GlCore14_HeaderFile +#define OpenGl_GlCore14_HeaderFile #include diff --git a/src/OpenGl/OpenGl_GlCore15.hxx b/src/OpenGl/OpenGl_GlCore15.hxx index 4c7b4ac866..7c7b3ee0b6 100644 --- a/src/OpenGl/OpenGl_GlCore15.hxx +++ b/src/OpenGl/OpenGl_GlCore15.hxx @@ -13,8 +13,8 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -#ifndef _OpenGl_GlCore15_Header -#define _OpenGl_GlCore15_Header +#ifndef OpenGl_GlCore15_HeaderFile +#define OpenGl_GlCore15_HeaderFile #include diff --git a/src/OpenGl/OpenGl_GlCore20.hxx b/src/OpenGl/OpenGl_GlCore20.hxx index c1ab819ad2..187db62c08 100644 --- a/src/OpenGl/OpenGl_GlCore20.hxx +++ b/src/OpenGl/OpenGl_GlCore20.hxx @@ -13,8 +13,8 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -#ifndef _OpenGl_GlCore20_Header -#define _OpenGl_GlCore20_Header +#ifndef OpenGl_GlCore20_HeaderFile +#define OpenGl_GlCore20_HeaderFile #include diff --git a/src/OpenGl/OpenGl_GlCore21.hxx b/src/OpenGl/OpenGl_GlCore21.hxx index 74ee21a0fc..4ce03d7311 100644 --- a/src/OpenGl/OpenGl_GlCore21.hxx +++ b/src/OpenGl/OpenGl_GlCore21.hxx @@ -13,8 +13,8 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -#ifndef _OpenGl_GlCore21_Header -#define _OpenGl_GlCore21_Header +#ifndef OpenGl_GlCore21_HeaderFile +#define OpenGl_GlCore21_HeaderFile #include diff --git a/src/OpenGl/OpenGl_GlCore30.hxx b/src/OpenGl/OpenGl_GlCore30.hxx index 63b66e4677..c428ade5ad 100644 --- a/src/OpenGl/OpenGl_GlCore30.hxx +++ b/src/OpenGl/OpenGl_GlCore30.hxx @@ -13,8 +13,8 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -#ifndef _OpenGl_GlCore30_Header -#define _OpenGl_GlCore30_Header +#ifndef OpenGl_GlCore30_HeaderFile +#define OpenGl_GlCore30_HeaderFile #include diff --git a/src/OpenGl/OpenGl_GlCore31.hxx b/src/OpenGl/OpenGl_GlCore31.hxx index 4c102a2765..aea365f8b9 100644 --- a/src/OpenGl/OpenGl_GlCore31.hxx +++ b/src/OpenGl/OpenGl_GlCore31.hxx @@ -13,8 +13,8 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -#ifndef _OpenGl_GlCore31_Header -#define _OpenGl_GlCore31_Header +#ifndef OpenGl_GlCore31_HeaderFile +#define OpenGl_GlCore31_HeaderFile #include diff --git a/src/OpenGl/OpenGl_GlCore32.hxx b/src/OpenGl/OpenGl_GlCore32.hxx index 7ad6cd2ba1..1a42ee80a0 100644 --- a/src/OpenGl/OpenGl_GlCore32.hxx +++ b/src/OpenGl/OpenGl_GlCore32.hxx @@ -13,8 +13,8 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -#ifndef _OpenGl_GlCore32_Header -#define _OpenGl_GlCore32_Header +#ifndef OpenGl_GlCore32_HeaderFile +#define OpenGl_GlCore32_HeaderFile #include diff --git a/src/OpenGl/OpenGl_GlCore33.hxx b/src/OpenGl/OpenGl_GlCore33.hxx index 9605d67e56..a2e95f4a3c 100644 --- a/src/OpenGl/OpenGl_GlCore33.hxx +++ b/src/OpenGl/OpenGl_GlCore33.hxx @@ -13,8 +13,8 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -#ifndef _OpenGl_GlCore33_Header -#define _OpenGl_GlCore33_Header +#ifndef OpenGl_GlCore33_HeaderFile +#define OpenGl_GlCore33_HeaderFile #include diff --git a/src/OpenGl/OpenGl_GlCore40.hxx b/src/OpenGl/OpenGl_GlCore40.hxx index c59af42c11..1f69f80c6d 100644 --- a/src/OpenGl/OpenGl_GlCore40.hxx +++ b/src/OpenGl/OpenGl_GlCore40.hxx @@ -13,8 +13,8 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -#ifndef _OpenGl_GlCore40_Header -#define _OpenGl_GlCore40_Header +#ifndef OpenGl_GlCore40_HeaderFile +#define OpenGl_GlCore40_HeaderFile #include diff --git a/src/OpenGl/OpenGl_GlCore41.hxx b/src/OpenGl/OpenGl_GlCore41.hxx index 0379ff5b59..cdf82b403c 100644 --- a/src/OpenGl/OpenGl_GlCore41.hxx +++ b/src/OpenGl/OpenGl_GlCore41.hxx @@ -13,8 +13,8 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -#ifndef _OpenGl_GlCore41_Header -#define _OpenGl_GlCore41_Header +#ifndef OpenGl_GlCore41_HeaderFile +#define OpenGl_GlCore41_HeaderFile #include diff --git a/src/OpenGl/OpenGl_GlCore42.hxx b/src/OpenGl/OpenGl_GlCore42.hxx index 73175a0a96..7746b2f738 100644 --- a/src/OpenGl/OpenGl_GlCore42.hxx +++ b/src/OpenGl/OpenGl_GlCore42.hxx @@ -13,8 +13,8 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -#ifndef _OpenGl_GlCore42_Header -#define _OpenGl_GlCore42_Header +#ifndef OpenGl_GlCore42_HeaderFile +#define OpenGl_GlCore42_HeaderFile #include diff --git a/src/OpenGl/OpenGl_GlCore43.hxx b/src/OpenGl/OpenGl_GlCore43.hxx index 7849a6d4a0..9971877c9f 100644 --- a/src/OpenGl/OpenGl_GlCore43.hxx +++ b/src/OpenGl/OpenGl_GlCore43.hxx @@ -13,8 +13,8 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -#ifndef _OpenGl_GlCore43_Header -#define _OpenGl_GlCore43_Header +#ifndef OpenGl_GlCore43_HeaderFile +#define OpenGl_GlCore43_HeaderFile #include diff --git a/src/OpenGl/OpenGl_GlCore44.hxx b/src/OpenGl/OpenGl_GlCore44.hxx index f8c0b170f3..e8c8e5997a 100644 --- a/src/OpenGl/OpenGl_GlCore44.hxx +++ b/src/OpenGl/OpenGl_GlCore44.hxx @@ -13,8 +13,8 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -#ifndef _OpenGl_GlCore44_Header -#define _OpenGl_GlCore44_Header +#ifndef OpenGl_GlCore44_HeaderFile +#define OpenGl_GlCore44_HeaderFile #include diff --git a/src/OpenGl/OpenGl_GlFunctions.hxx b/src/OpenGl/OpenGl_GlFunctions.hxx index adbe897e14..3e2f6b64d2 100644 --- a/src/OpenGl/OpenGl_GlFunctions.hxx +++ b/src/OpenGl/OpenGl_GlFunctions.hxx @@ -13,8 +13,8 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -#ifndef _OpenGl_GlFunctions_Header -#define _OpenGl_GlFunctions_Header +#ifndef OpenGl_GlFunctions_HeaderFile +#define OpenGl_GlFunctions_HeaderFile // required for correct APIENTRY definition #if defined(_WIN32) && !defined(APIENTRY) && !defined(__CYGWIN__) && !defined(__SCITECH_SNAP__) diff --git a/src/OpenGl/OpenGl_GraduatedTrihedron.hxx b/src/OpenGl/OpenGl_GraduatedTrihedron.hxx index 68dad06789..25605af30f 100755 --- a/src/OpenGl/OpenGl_GraduatedTrihedron.hxx +++ b/src/OpenGl/OpenGl_GraduatedTrihedron.hxx @@ -13,8 +13,8 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -#ifndef _OpenGl_GraduatedTrihedron_Header -#define _OpenGl_GraduatedTrihedron_Header +#ifndef OpenGl_GraduatedTrihedron_HeaderFile +#define OpenGl_GraduatedTrihedron_HeaderFile #include #include diff --git a/src/OpenGl/OpenGl_Group.hxx b/src/OpenGl/OpenGl_Group.hxx index 905567165d..92fe762321 100644 --- a/src/OpenGl/OpenGl_Group.hxx +++ b/src/OpenGl/OpenGl_Group.hxx @@ -13,8 +13,8 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -#ifndef _OpenGl_Group_Header -#define _OpenGl_Group_Header +#ifndef OpenGl_Group_HeaderFile +#define OpenGl_Group_HeaderFile #include #include diff --git a/src/OpenGl/OpenGl_IndexBuffer.hxx b/src/OpenGl/OpenGl_IndexBuffer.hxx index 15882a70cd..7a2bf37b94 100644 --- a/src/OpenGl/OpenGl_IndexBuffer.hxx +++ b/src/OpenGl/OpenGl_IndexBuffer.hxx @@ -12,8 +12,8 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -#ifndef _OpenGl_IndexBuffer_H__ -#define _OpenGl_IndexBuffer_H__ +#ifndef OpenGl_IndexBuffer_HeaderFile +#define OpenGl_IndexBuffer_HeaderFile #include diff --git a/src/OpenGl/OpenGl_Layer.hxx b/src/OpenGl/OpenGl_Layer.hxx index 09a2e91538..ef335173c8 100644 --- a/src/OpenGl/OpenGl_Layer.hxx +++ b/src/OpenGl/OpenGl_Layer.hxx @@ -13,8 +13,8 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -#ifndef _OpenGl_Layer_Header -#define _OpenGl_Layer_Header +#ifndef OpenGl_Layer_HeaderFile +#define OpenGl_Layer_HeaderFile #include diff --git a/src/OpenGl/OpenGl_LayerList.hxx b/src/OpenGl/OpenGl_LayerList.hxx index c2fc8cf66c..ad28b63526 100644 --- a/src/OpenGl/OpenGl_LayerList.hxx +++ b/src/OpenGl/OpenGl_LayerList.hxx @@ -13,8 +13,8 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -#ifndef _OpenGl_LayerList_Header -#define _OpenGl_LayerList_Header +#ifndef OpenGl_LayerList_HeaderFile +#define OpenGl_LayerList_HeaderFile #include #include diff --git a/src/OpenGl/OpenGl_LineAttributes.hxx b/src/OpenGl/OpenGl_LineAttributes.hxx index deefbf0675..971771a019 100644 --- a/src/OpenGl/OpenGl_LineAttributes.hxx +++ b/src/OpenGl/OpenGl_LineAttributes.hxx @@ -13,8 +13,8 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -#ifndef _OpenGl_LineAttributes_Header -#define _OpenGl_LineAttributes_Header +#ifndef OpenGl_LineAttributes_HeaderFile +#define OpenGl_LineAttributes_HeaderFile #include diff --git a/src/OpenGl/OpenGl_PointSprite.hxx b/src/OpenGl/OpenGl_PointSprite.hxx index 6cdaa1b739..e1f2608179 100755 --- a/src/OpenGl/OpenGl_PointSprite.hxx +++ b/src/OpenGl/OpenGl_PointSprite.hxx @@ -12,8 +12,8 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -#ifndef _OpenGl_PointSprite_H__ -#define _OpenGl_PointSprite_H__ +#ifndef OpenGl_PointSprite_HeaderFile +#define OpenGl_PointSprite_HeaderFile #include diff --git a/src/OpenGl/OpenGl_PrimitiveArray.hxx b/src/OpenGl/OpenGl_PrimitiveArray.hxx index 8cdd676ad4..43781792eb 100644 --- a/src/OpenGl/OpenGl_PrimitiveArray.hxx +++ b/src/OpenGl/OpenGl_PrimitiveArray.hxx @@ -13,8 +13,8 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -#ifndef OpenGl_PrimitiveArray_Header -#define OpenGl_PrimitiveArray_Header +#ifndef OpenGl_PrimitiveArray_HeaderFile +#define OpenGl_PrimitiveArray_HeaderFile #include #include diff --git a/src/OpenGl/OpenGl_RenderFilter.hxx b/src/OpenGl/OpenGl_RenderFilter.hxx index 69344d0086..1abb0d5e24 100755 --- a/src/OpenGl/OpenGl_RenderFilter.hxx +++ b/src/OpenGl/OpenGl_RenderFilter.hxx @@ -13,8 +13,8 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -#ifndef _OpenGl_RenderFilter_H__ -#define _OpenGl_RenderFilter_H__ +#ifndef OpenGl_RenderFilter_HeaderFile +#define OpenGl_RenderFilter_HeaderFile //! Filter for rendering elements. enum OpenGl_RenderFilter diff --git a/src/OpenGl/OpenGl_Resource.hxx b/src/OpenGl/OpenGl_Resource.hxx index cb664f5d87..97c4e5bafd 100644 --- a/src/OpenGl/OpenGl_Resource.hxx +++ b/src/OpenGl/OpenGl_Resource.hxx @@ -13,8 +13,8 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -#ifndef _OpenGl_Resource_H__ -#define _OpenGl_Resource_H__ +#ifndef OpenGl_Resource_HeaderFile +#define OpenGl_Resource_HeaderFile #include diff --git a/src/OpenGl/OpenGl_SceneGeometry.hxx b/src/OpenGl/OpenGl_SceneGeometry.hxx index f5192be53a..fe48c89760 100644 --- a/src/OpenGl/OpenGl_SceneGeometry.hxx +++ b/src/OpenGl/OpenGl_SceneGeometry.hxx @@ -13,8 +13,8 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -#ifndef _OpenGl_SceneGeometry_Header -#define _OpenGl_SceneGeometry_Header +#ifndef OpenGl_SceneGeometry_HeaderFile +#define OpenGl_SceneGeometry_HeaderFile #include #include diff --git a/src/OpenGl/OpenGl_ShaderObject.hxx b/src/OpenGl/OpenGl_ShaderObject.hxx index 4e4b5965b8..59a5667e88 100755 --- a/src/OpenGl/OpenGl_ShaderObject.hxx +++ b/src/OpenGl/OpenGl_ShaderObject.hxx @@ -13,8 +13,8 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -#ifndef _OpenGl_ShaderObject_Header -#define _OpenGl_ShaderObject_Header +#ifndef OpenGl_ShaderObject_HeaderFile +#define OpenGl_ShaderObject_HeaderFile #include #include diff --git a/src/OpenGl/OpenGl_ShaderProgram.hxx b/src/OpenGl/OpenGl_ShaderProgram.hxx index 736ecaaafe..a77488622e 100755 --- a/src/OpenGl/OpenGl_ShaderProgram.hxx +++ b/src/OpenGl/OpenGl_ShaderProgram.hxx @@ -13,8 +13,8 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -#ifndef _OpenGl_ShaderProgram_Header -#define _OpenGl_ShaderProgram_Header +#ifndef OpenGl_ShaderProgram_HeaderFile +#define OpenGl_ShaderProgram_HeaderFile #include #include diff --git a/src/OpenGl/OpenGl_ShaderStates.hxx b/src/OpenGl/OpenGl_ShaderStates.hxx index b7cb484a7d..157e3a4f0b 100755 --- a/src/OpenGl/OpenGl_ShaderStates.hxx +++ b/src/OpenGl/OpenGl_ShaderStates.hxx @@ -13,8 +13,8 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -#ifndef _OpenGl_State_HeaderFile -#define _OpenGl_State_HeaderFile +#ifndef OpenGl_ShaderStates_HeaderFile +#define OpenGl_ShaderStates_HeaderFile #include #include diff --git a/src/OpenGl/OpenGl_StencilTest.hxx b/src/OpenGl/OpenGl_StencilTest.hxx index 3eef405db1..304cf4ce45 100755 --- a/src/OpenGl/OpenGl_StencilTest.hxx +++ b/src/OpenGl/OpenGl_StencilTest.hxx @@ -13,8 +13,8 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -#ifndef OpenGl_StencilTest_Header -#define OpenGl_StencilTest_Header +#ifndef OpenGl_StencilTest_HeaderFile +#define OpenGl_StencilTest_HeaderFile #include diff --git a/src/OpenGl/OpenGl_Structure.hxx b/src/OpenGl/OpenGl_Structure.hxx index 64f1c3e547..bf5b19566e 100644 --- a/src/OpenGl/OpenGl_Structure.hxx +++ b/src/OpenGl/OpenGl_Structure.hxx @@ -13,8 +13,8 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -#ifndef OpenGl_Structure_Header -#define OpenGl_Structure_Header +#ifndef OpenGl_Structure_HeaderFile +#define OpenGl_Structure_HeaderFile #include #include diff --git a/src/OpenGl/OpenGl_Text.hxx b/src/OpenGl/OpenGl_Text.hxx index 29741ed4dd..d9396ff45d 100755 --- a/src/OpenGl/OpenGl_Text.hxx +++ b/src/OpenGl/OpenGl_Text.hxx @@ -13,8 +13,8 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -#ifndef OpenGl_Text_Header -#define OpenGl_Text_Header +#ifndef OpenGl_Text_HeaderFile +#define OpenGl_Text_HeaderFile #include diff --git a/src/OpenGl/OpenGl_Texture.hxx b/src/OpenGl/OpenGl_Texture.hxx index 468ce13581..4a5630db5a 100644 --- a/src/OpenGl/OpenGl_Texture.hxx +++ b/src/OpenGl/OpenGl_Texture.hxx @@ -12,8 +12,8 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -#ifndef _OpenGl_Texture_H__ -#define _OpenGl_Texture_H__ +#ifndef OpenGl_Texture_HeaderFile +#define OpenGl_Texture_HeaderFile #include #include diff --git a/src/OpenGl/OpenGl_TextureBufferArb.hxx b/src/OpenGl/OpenGl_TextureBufferArb.hxx index ba15e21ab9..928a2c322f 100644 --- a/src/OpenGl/OpenGl_TextureBufferArb.hxx +++ b/src/OpenGl/OpenGl_TextureBufferArb.hxx @@ -12,8 +12,8 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -#ifndef _OpenGl_TextureBufferArb_H__ -#define _OpenGl_TextureBufferArb_H__ +#ifndef OpenGl_TextureBufferArb_HeaderFile +#define OpenGl_TextureBufferArb_HeaderFile #include diff --git a/src/OpenGl/OpenGl_Vec.hxx b/src/OpenGl/OpenGl_Vec.hxx index cb4cf962c4..c48c6203e0 100755 --- a/src/OpenGl/OpenGl_Vec.hxx +++ b/src/OpenGl/OpenGl_Vec.hxx @@ -13,8 +13,8 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -#ifndef _OpenGl_Vec_H__ -#define _OpenGl_Vec_H__ +#ifndef OpenGl_Vec_HeaderFile +#define OpenGl_Vec_HeaderFile #include diff --git a/src/OpenGl/OpenGl_VertexBuffer.hxx b/src/OpenGl/OpenGl_VertexBuffer.hxx index 4d3b7b7fe4..e423d05988 100644 --- a/src/OpenGl/OpenGl_VertexBuffer.hxx +++ b/src/OpenGl/OpenGl_VertexBuffer.hxx @@ -12,8 +12,8 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -#ifndef _OpenGl_VertexBuffer_H__ -#define _OpenGl_VertexBuffer_H__ +#ifndef OpenGl_VertexBuffer_HeaderFile +#define OpenGl_VertexBuffer_HeaderFile #include #include diff --git a/src/OpenGl/OpenGl_VertexBufferEditor.hxx b/src/OpenGl/OpenGl_VertexBufferEditor.hxx index e46fba30d5..844e2cd9fd 100644 --- a/src/OpenGl/OpenGl_VertexBufferEditor.hxx +++ b/src/OpenGl/OpenGl_VertexBufferEditor.hxx @@ -12,8 +12,8 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -#ifndef _OpenGl_VertexBufferEditor_H__ -#define _OpenGl_VertexBufferEditor_H__ +#ifndef OpenGl_VertexBufferEditor_HeaderFile +#define OpenGl_VertexBufferEditor_HeaderFile #include #include diff --git a/src/OpenGl/OpenGl_View.hxx b/src/OpenGl/OpenGl_View.hxx index e64fdc0587..ae01da4996 100644 --- a/src/OpenGl/OpenGl_View.hxx +++ b/src/OpenGl/OpenGl_View.hxx @@ -13,8 +13,8 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -#ifndef _OpenGl_View_Header -#define _OpenGl_View_Header +#ifndef OpenGl_View_HeaderFile +#define OpenGl_View_HeaderFile #include #include diff --git a/src/OpenGl/OpenGl_Window.hxx b/src/OpenGl/OpenGl_Window.hxx index c165ffd257..a9c85ac210 100644 --- a/src/OpenGl/OpenGl_Window.hxx +++ b/src/OpenGl/OpenGl_Window.hxx @@ -13,8 +13,8 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -#ifndef _OpenGl_Window_Header -#define _OpenGl_Window_Header +#ifndef OpenGl_Window_HeaderFile +#define OpenGl_Window_HeaderFile #include #include diff --git a/src/OpenGl/OpenGl_Workspace.hxx b/src/OpenGl/OpenGl_Workspace.hxx index 8151e46165..166261ee34 100644 --- a/src/OpenGl/OpenGl_Workspace.hxx +++ b/src/OpenGl/OpenGl_Workspace.hxx @@ -13,8 +13,8 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -#ifndef _OpenGl_Workspace_Header -#define _OpenGl_Workspace_Header +#ifndef OpenGl_Workspace_HeaderFile +#define OpenGl_Workspace_HeaderFile #include #include diff --git a/src/Prs3d/Prs3d_DimensionUnits.hxx b/src/Prs3d/Prs3d_DimensionUnits.hxx index dd519a129e..003416770a 100644 --- a/src/Prs3d/Prs3d_DimensionUnits.hxx +++ b/src/Prs3d/Prs3d_DimensionUnits.hxx @@ -13,8 +13,8 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -#ifndef _Prs3d_DimensionUnits_Header -#define _Prs3d_DimensionUnits_Header +#ifndef Prs3d_DimensionUnits_HeaderFile +#define Prs3d_DimensionUnits_HeaderFile #include diff --git a/src/Prs3d/Prs3d_Point.hxx b/src/Prs3d/Prs3d_Point.hxx index c324f27f0c..e0741df14b 100755 --- a/src/Prs3d/Prs3d_Point.hxx +++ b/src/Prs3d/Prs3d_Point.hxx @@ -11,8 +11,8 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -#ifndef _Prs3d_Point_H__ -#define _Prs3d_Point_H__ +#ifndef Prs3d_Point_HeaderFile +#define Prs3d_Point_HeaderFile #include #include diff --git a/src/PrsMgr/PrsMgr_ListOfPresentations.hxx b/src/PrsMgr/PrsMgr_ListOfPresentations.hxx index f0d76de598..f38cae6491 100644 --- a/src/PrsMgr/PrsMgr_ListOfPresentations.hxx +++ b/src/PrsMgr/PrsMgr_ListOfPresentations.hxx @@ -13,8 +13,8 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -#ifndef _PrsMgr_ListOfPresentations_H__ -#define _PrsMgr_ListOfPresentations_H__ +#ifndef PrsMgr_ListOfPresentations_HeaderFile +#define PrsMgr_ListOfPresentations_HeaderFile #include #include diff --git a/src/Standard/Standard_CLocaleSentry.hxx b/src/Standard/Standard_CLocaleSentry.hxx index 004785382a..c0cbebad6d 100755 --- a/src/Standard/Standard_CLocaleSentry.hxx +++ b/src/Standard/Standard_CLocaleSentry.hxx @@ -13,8 +13,8 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -#ifndef _Standard_CLocaleSentry_H__ -#define _Standard_CLocaleSentry_H__ +#ifndef Standard_CLocaleSentry_HeaderFile +#define Standard_CLocaleSentry_HeaderFile #include diff --git a/src/Standard/Standard_PrimitiveTypes.hxx b/src/Standard/Standard_PrimitiveTypes.hxx index 9a5b19c6c0..96393da3b2 100644 --- a/src/Standard/Standard_PrimitiveTypes.hxx +++ b/src/Standard/Standard_PrimitiveTypes.hxx @@ -12,8 +12,8 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -#ifndef _Standard_PrimitiveTypes_HeaderFile -#define _Standard_PrimitiveTypes_HeaderFile +#ifndef Standard_PrimitiveTypes_HeaderFile +#define Standard_PrimitiveTypes_HeaderFile #include #include diff --git a/src/Standard/Standard_math.hxx b/src/Standard/Standard_math.hxx index 0c1b938787..a2eb9790a3 100644 --- a/src/Standard/Standard_math.hxx +++ b/src/Standard/Standard_math.hxx @@ -12,6 +12,9 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. +#ifndef Standard_math_HeaderFile +#define Standard_math_HeaderFile + #ifndef _Standard_Macro_HeaderFile #include #endif @@ -33,3 +36,5 @@ Standard_EXPORT double __cdecl atanh ( double ); #endif /* _MSC_VER */ + +#endif diff --git a/src/StdPrs/StdPrs_HLRShape.hxx b/src/StdPrs/StdPrs_HLRShape.hxx index 6c73a44ca5..8c85f6f7a7 100755 --- a/src/StdPrs/StdPrs_HLRShape.hxx +++ b/src/StdPrs/StdPrs_HLRShape.hxx @@ -11,8 +11,8 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -#ifndef _StdPrs_HLRFace_H__ -#define _StdPrs_HLRFace_H__ +#ifndef StdPrs_HLRShape_HeaderFile +#define StdPrs_HLRShape_HeaderFile #include diff --git a/src/StdPrs/StdPrs_Point.hxx b/src/StdPrs/StdPrs_Point.hxx index 37de4bb4eb..a6270d1af1 100755 --- a/src/StdPrs/StdPrs_Point.hxx +++ b/src/StdPrs/StdPrs_Point.hxx @@ -11,8 +11,8 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -#ifndef _StdPrs_Point_H__ -#define _StdPrs_Point_H__ +#ifndef StdPrs_Point_HeaderFile +#define StdPrs_Point_HeaderFile #include #include diff --git a/src/StdPrs/StdPrs_Vertex.hxx b/src/StdPrs/StdPrs_Vertex.hxx index fc429de004..33eb4b3f49 100755 --- a/src/StdPrs/StdPrs_Vertex.hxx +++ b/src/StdPrs/StdPrs_Vertex.hxx @@ -11,8 +11,8 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -#ifndef _StdPrs_Vertex_H__ -#define _StdPrs_Vertex_H__ +#ifndef StdPrs_Vertex_HeaderFile +#define StdPrs_Vertex_HeaderFile #include #include diff --git a/src/StdPrs/StdPrs_WFRestrictedFace.hxx b/src/StdPrs/StdPrs_WFRestrictedFace.hxx index 7ac81082ae..9e19a9291e 100755 --- a/src/StdPrs/StdPrs_WFRestrictedFace.hxx +++ b/src/StdPrs/StdPrs_WFRestrictedFace.hxx @@ -11,8 +11,8 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -#ifndef _StdPrs_WFRestrictedFace_H__ -#define _StdPrs_WFRestrictedFace_H__ +#ifndef StdPrs_WFRestrictedFace_HeaderFile +#define StdPrs_WFRestrictedFace_HeaderFile #include #include diff --git a/src/StdPrs/StdPrs_WFShape.hxx b/src/StdPrs/StdPrs_WFShape.hxx index f2ff76db9f..aba08bcae7 100755 --- a/src/StdPrs/StdPrs_WFShape.hxx +++ b/src/StdPrs/StdPrs_WFShape.hxx @@ -11,8 +11,8 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -#ifndef _StdPrs_WFShape_H__ -#define _StdPrs_WFShape_H__ +#ifndef StdPrs_WFShape_HeaderFile +#define StdPrs_WFShape_HeaderFile #include #include diff --git a/src/TopOpeBRepDS/TopOpeBRepDS_repvg.hxx b/src/TopOpeBRepDS/TopOpeBRepDS_repvg.hxx index 756c660877..d170e3693c 100644 --- a/src/TopOpeBRepDS/TopOpeBRepDS_repvg.hxx +++ b/src/TopOpeBRepDS/TopOpeBRepDS_repvg.hxx @@ -14,8 +14,8 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -#ifndef _TopOpeBRepDS_regpv_HeaderFile -#define _TopOpeBRepDS_regpv_HeaderFile +#ifndef TopOpeBRepDS_repvg_HeaderFile +#define TopOpeBRepDS_repvg_HeaderFile #include Standard_EXPORT void FDS_repvg diff --git a/src/V3d/V3d_Plane.hxx b/src/V3d/V3d_Plane.hxx index 13739ef917..36cddc3737 100755 --- a/src/V3d/V3d_Plane.hxx +++ b/src/V3d/V3d_Plane.hxx @@ -13,8 +13,8 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -#ifndef _V3d_Plane_H__ -#define _V3d_Plane_H__ +#ifndef V3d_Plane_HeaderFile +#define V3d_Plane_HeaderFile #include #include diff --git a/src/WNT/WNT_Dword.hxx b/src/WNT/WNT_Dword.hxx index 8249a12af6..0e8edc321d 100644 --- a/src/WNT/WNT_Dword.hxx +++ b/src/WNT/WNT_Dword.hxx @@ -12,8 +12,8 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -#ifndef __WNT_Dword_HeaderFile -# define __WNT_Dword_HeaderFile +#ifndef WNT_Dword_HeaderFile +#define WNT_Dword_HeaderFile // Purpose: Defines a Windows NT DWORD type. diff --git a/src/Xw/Xw_Window.hxx b/src/Xw/Xw_Window.hxx index b7d4c4f69f..49b6440d5a 100644 --- a/src/Xw/Xw_Window.hxx +++ b/src/Xw/Xw_Window.hxx @@ -13,8 +13,8 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -#ifndef _Xw_Window_H__ -#define _Xw_Window_H__ +#ifndef Xw_Window_HeaderFile +#define Xw_Window_HeaderFile #include From 510d099d154986fa0d1d31f2b9dddb493eaf3929 Mon Sep 17 00:00:00 2001 From: dpasukhi Date: Tue, 26 Oct 2021 23:45:42 +0300 Subject: [PATCH 116/639] 0028104: Data Exchange - Extract sub-assembly (XDE) - Added getting and setting Material, VisMaterial and Props to XCAFDoc_Editor::Expand. - Added XCAFDoc_Editor::Extract to transfer part to a new location - XCAFDoc_Editor::Extract allows to extract a part as a component or simply extract to an empty label with attached colors, layers, materials, vismaterials and props - Added XCAFDoc_Editor::CloneMetaData to clone shape's attributes to new location - Added XCAFDoc_Editor::CloneShapeLabel to clone shape to new document - Added XCAFDoc_DocumentTool::Check*Tool methods to check an existing of an any tool - Protected against creating a new label for non-existent tools via extract or expand process --- src/XCAFDoc/XCAFDoc_DocumentTool.cxx | 126 +++++++- src/XCAFDoc/XCAFDoc_DocumentTool.hxx | 36 +++ src/XCAFDoc/XCAFDoc_Editor.cxx | 460 ++++++++++++++++++++------- src/XCAFDoc/XCAFDoc_Editor.hxx | 109 ++++--- src/XDEDRAW/XDEDRAW_Common.cxx | 69 ++++ tests/bugs/xde/bug28104 | 154 +++++++++ tests/bugs/xde/bug28104_1 | 81 +++++ 7 files changed, 886 insertions(+), 149 deletions(-) create mode 100644 tests/bugs/xde/bug28104 create mode 100644 tests/bugs/xde/bug28104_1 diff --git a/src/XCAFDoc/XCAFDoc_DocumentTool.cxx b/src/XCAFDoc/XCAFDoc_DocumentTool.cxx index 02c6fb0f31..cc4eba53b0 100644 --- a/src/XCAFDoc/XCAFDoc_DocumentTool.cxx +++ b/src/XCAFDoc/XCAFDoc_DocumentTool.cxx @@ -249,6 +249,19 @@ TDF_Label XCAFDoc_DocumentTool::VisMaterialLabel (const TDF_Label& theLabel) return XCAFDoc_ShapeTool::Set(ShapesLabel(acces)); } + //======================================================================= +//function : CheckShapeTool +//purpose : +//======================================================================= +Standard_Boolean XCAFDoc_DocumentTool::CheckShapeTool(const TDF_Label& theAcces) +{ + TDF_Label aLabel = DocLabel(theAcces).FindChild(1, Standard_False); + if (aLabel.IsNull()) + { + return Standard_False; + } + return aLabel.IsAttribute(XCAFDoc_ShapeTool::GetID()); +} //======================================================================= //function : ColorTool @@ -260,6 +273,20 @@ Handle(XCAFDoc_ColorTool) XCAFDoc_DocumentTool::ColorTool (const TDF_Label& acce return XCAFDoc_ColorTool::Set(ColorsLabel(acces)); } + //======================================================================= + //function : CheckColorTool + //purpose : + //======================================================================= +Standard_Boolean XCAFDoc_DocumentTool::CheckColorTool(const TDF_Label& theAcces) +{ + TDF_Label aLabel = DocLabel(theAcces).FindChild(2, Standard_False); + if (aLabel.IsNull()) + { + return Standard_False; + } + return aLabel.IsAttribute(XCAFDoc_ColorTool::GetID()); +} + //======================================================================= //function : VisMaterialTool //purpose : @@ -269,6 +296,20 @@ Handle(XCAFDoc_VisMaterialTool) XCAFDoc_DocumentTool::VisMaterialTool (const TDF return XCAFDoc_VisMaterialTool::Set (VisMaterialLabel (theLabel)); } +//======================================================================= +//function : CheckVisMaterialTool +//purpose : +//======================================================================= +Standard_Boolean XCAFDoc_DocumentTool::CheckVisMaterialTool(const TDF_Label& theAcces) +{ + TDF_Label aLabel = DocLabel(theAcces).FindChild(10, Standard_False); + if (aLabel.IsNull()) + { + return Standard_False; + } + return aLabel.IsAttribute(XCAFDoc_VisMaterialTool::GetID()); +} + //======================================================================= //function : LayerTool //purpose : @@ -279,6 +320,19 @@ Handle(XCAFDoc_LayerTool) XCAFDoc_DocumentTool::LayerTool (const TDF_Label& acce return XCAFDoc_LayerTool::Set(LayersLabel(acces)); } +//======================================================================= +//function : CheckLayerTool +//purpose : +//======================================================================= +Standard_Boolean XCAFDoc_DocumentTool::CheckLayerTool(const TDF_Label& theAcces) +{ + TDF_Label aLabel = DocLabel(theAcces).FindChild(3, Standard_False); + if (aLabel.IsNull()) + { + return Standard_False; + } + return aLabel.IsAttribute(XCAFDoc_LayerTool::GetID()); +} //======================================================================= //function : DimTolTool @@ -290,6 +344,19 @@ Handle(XCAFDoc_DimTolTool) XCAFDoc_DocumentTool::DimTolTool(const TDF_Label& acc return XCAFDoc_DimTolTool::Set(DGTsLabel(acces)); } +//======================================================================= +//function : CheckDimTolTool +//purpose : +//======================================================================= +Standard_Boolean XCAFDoc_DocumentTool::CheckDimTolTool(const TDF_Label& theAcces) +{ + TDF_Label aLabel = DocLabel(theAcces).FindChild(4, Standard_False); + if (aLabel.IsNull()) + { + return Standard_False; + } + return aLabel.IsAttribute(XCAFDoc_DimTolTool::GetID()); +} //======================================================================= //function : MaterialTool @@ -301,6 +368,20 @@ Handle(XCAFDoc_MaterialTool) XCAFDoc_DocumentTool::MaterialTool(const TDF_Label& return XCAFDoc_MaterialTool::Set(MaterialsLabel(acces)); } +//======================================================================= +//function : CheckMaterialTool +//purpose : +//======================================================================= +Standard_Boolean XCAFDoc_DocumentTool::CheckMaterialTool(const TDF_Label& theAcces) +{ + TDF_Label aLabel = DocLabel(theAcces).FindChild(5, Standard_False); + if (aLabel.IsNull()) + { + return Standard_False; + } + return aLabel.IsAttribute(XCAFDoc_MaterialTool::GetID()); +} + //======================================================================= //function : ViewTool //purpose : @@ -311,6 +392,20 @@ Handle(XCAFDoc_ViewTool) XCAFDoc_DocumentTool::ViewTool(const TDF_Label& acces) return XCAFDoc_ViewTool::Set(ViewsLabel(acces)); } +//======================================================================= +//function : CheckViewTool +//purpose : +//======================================================================= +Standard_Boolean XCAFDoc_DocumentTool::CheckViewTool(const TDF_Label& theAcces) +{ + TDF_Label aLabel = DocLabel(theAcces).FindChild(7, Standard_False); + if (aLabel.IsNull()) + { + return Standard_False; + } + return aLabel.IsAttribute(XCAFDoc_ViewTool::GetID()); +} + //======================================================================= //function : ClippingPlaneTool //purpose : @@ -322,15 +417,42 @@ Handle(XCAFDoc_ClippingPlaneTool) XCAFDoc_DocumentTool::ClippingPlaneTool(const } //======================================================================= -//function : ClippingPlaneTool -//purpose : +//function : CheckClippingPlaneTool +//purpose : //======================================================================= +Standard_Boolean XCAFDoc_DocumentTool::CheckClippingPlaneTool(const TDF_Label& theAcces) +{ + TDF_Label aLabel = DocLabel(theAcces).FindChild(8, Standard_False); + if (aLabel.IsNull()) + { + return Standard_False; + } + return aLabel.IsAttribute(XCAFDoc_ClippingPlaneTool::GetID()); +} +//======================================================================= +//function : NotesTool +//purpose : +//======================================================================= Handle(XCAFDoc_NotesTool) XCAFDoc_DocumentTool::NotesTool(const TDF_Label& acces) { return XCAFDoc_NotesTool::Set(NotesLabel(acces)); } +//======================================================================= +//function : CheckNotesTool +//purpose : +//======================================================================= +Standard_Boolean XCAFDoc_DocumentTool::CheckNotesTool(const TDF_Label& theAcces) +{ + TDF_Label aLabel = DocLabel(theAcces).FindChild(9, Standard_False); + if (aLabel.IsNull()) + { + return Standard_False; + } + return aLabel.IsAttribute(XCAFDoc_NotesTool::GetID()); +} + //======================================================================= //function : GetLengthUnit //purpose : diff --git a/src/XCAFDoc/XCAFDoc_DocumentTool.hxx b/src/XCAFDoc/XCAFDoc_DocumentTool.hxx index ac9fe2b110..cc9551364c 100644 --- a/src/XCAFDoc/XCAFDoc_DocumentTool.hxx +++ b/src/XCAFDoc/XCAFDoc_DocumentTool.hxx @@ -96,32 +96,68 @@ public: //! Creates (if it does not exist) ShapeTool attribute on ShapesLabel(). Standard_EXPORT static Handle(XCAFDoc_ShapeTool) ShapeTool (const TDF_Label& acces); + + //! Checks for the ShapeTool attribute on the label's document + //! Returns TRUE if Tool exists, ELSE if it has not been created + Standard_EXPORT static Standard_Boolean CheckShapeTool(const TDF_Label& theAcces); //! Creates (if it does not exist) ColorTool attribute on ColorsLabel(). Standard_EXPORT static Handle(XCAFDoc_ColorTool) ColorTool (const TDF_Label& acces); + //! Checks for the ColorTool attribute on the label's document + //! Returns TRUE if Tool exists, ELSE if it has not been created + Standard_EXPORT static Standard_Boolean CheckColorTool(const TDF_Label& theAcces); + //! Creates (if it does not exist) XCAFDoc_VisMaterialTool attribute on VisMaterialLabel(). //! Should not be confused with MaterialTool() defining physical/manufacturing materials. Standard_EXPORT static Handle(XCAFDoc_VisMaterialTool) VisMaterialTool (const TDF_Label& theLabel); + //! Checks for the VisMaterialTool attribute on the label's document + //! Returns TRUE if Tool exists, ELSE if it has not been created + Standard_EXPORT static Standard_Boolean CheckVisMaterialTool(const TDF_Label& theAcces); + //! Creates (if it does not exist) LayerTool attribute on LayersLabel(). Standard_EXPORT static Handle(XCAFDoc_LayerTool) LayerTool (const TDF_Label& acces); + //! Checks for the LayerTool attribute on the label's document + //! Returns TRUE if Tool exists, ELSE if it has not been created + Standard_EXPORT static Standard_Boolean CheckLayerTool(const TDF_Label& theAcces); + //! Creates (if it does not exist) DimTolTool attribute on DGTsLabel(). Standard_EXPORT static Handle(XCAFDoc_DimTolTool) DimTolTool (const TDF_Label& acces); + + //! Checks for the DimTolTool attribute on the label's document + //! Returns TRUE if Tool exists, ELSE if it has not been created + Standard_EXPORT static Standard_Boolean CheckDimTolTool(const TDF_Label& theAcces); //! Creates (if it does not exist) DimTolTool attribute on DGTsLabel(). Standard_EXPORT static Handle(XCAFDoc_MaterialTool) MaterialTool (const TDF_Label& acces); + //! Checks for the MaterialTool attribute on the label's document + //! Returns TRUE if Tool exists, ELSE if it has not been created + Standard_EXPORT static Standard_Boolean CheckMaterialTool(const TDF_Label& theAcces); + //! Creates (if it does not exist) ViewTool attribute on ViewsLabel(). Standard_EXPORT static Handle(XCAFDoc_ViewTool) ViewTool(const TDF_Label& acces); + + //! Checks for the ViewTool attribute on the label's document + //! Returns TRUE if Tool exists, ELSE if it has not been created + Standard_EXPORT static Standard_Boolean CheckViewTool(const TDF_Label& theAcces); //! Creates (if it does not exist) ClippingPlaneTool attribute on ClippingPlanesLabel(). Standard_EXPORT static Handle(XCAFDoc_ClippingPlaneTool) ClippingPlaneTool(const TDF_Label& acces); + //! Checks for the ClippingPlaneTool attribute on the label's document + //! Returns TRUE if Tool exists, ELSE if it has not been created + Standard_EXPORT static Standard_Boolean CheckClippingPlaneTool(const TDF_Label& theAcces); + //! Creates (if it does not exist) NotesTool attribute on NotesLabel(). Standard_EXPORT static Handle(XCAFDoc_NotesTool) NotesTool(const TDF_Label& acces); + //! Checks for the NotesTool attribute on the label's document + //! Returns TRUE if Tool exists, ELSE if it has not been created + Standard_EXPORT static Standard_Boolean CheckNotesTool(const TDF_Label& theAcces); + //! Returns value of current internal unit for the document //! converted to base unit type. Standard_EXPORT static Standard_Boolean GetLengthUnit(const Handle(TDocStd_Document)& theDoc, diff --git a/src/XCAFDoc/XCAFDoc_Editor.cxx b/src/XCAFDoc/XCAFDoc_Editor.cxx index 37f07e0f27..dd92a88cfe 100644 --- a/src/XCAFDoc/XCAFDoc_Editor.cxx +++ b/src/XCAFDoc/XCAFDoc_Editor.cxx @@ -14,67 +14,65 @@ // commercial license or contractual agreement. #include -#include - -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include #include +#include +#include +#include #include -#include +#include #include -#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include //======================================================================= //function : Expand //purpose : Convert Shape to assembly //======================================================================= - -Standard_Boolean XCAFDoc_Editor::Expand (const TDF_Label& Doc, const TDF_Label& Shape, - const Standard_Boolean recursively) +Standard_Boolean XCAFDoc_Editor::Expand (const TDF_Label& theDoc, + const TDF_Label& theShape, + const Standard_Boolean theRecursively) { - if(Doc.IsNull() || Shape.IsNull()) + if (theDoc.IsNull() || theShape.IsNull()) + { return Standard_False; - - Handle(XCAFDoc_ColorTool) aColorTool = XCAFDoc_DocumentTool::ColorTool(Doc); - Handle(XCAFDoc_LayerTool) aLayerTool = XCAFDoc_DocumentTool::LayerTool(Doc); - Handle(XCAFDoc_ShapeTool) aShapeTool = XCAFDoc_DocumentTool::ShapeTool(Doc); + } + Handle(XCAFDoc_ShapeTool) aShapeTool = XCAFDoc_DocumentTool::ShapeTool(theDoc); Standard_Boolean isAutoNaming = aShapeTool->AutoNaming(); aShapeTool->SetAutoNaming(Standard_False); - TDF_Label aCompoundPartL = Shape; - if (aShapeTool->IsReference(Shape)) + TDF_Label aCompoundPartL = theShape; + if (aShapeTool->IsReference(theShape)) aShapeTool->GetReferredShape(aCompoundPartL, aCompoundPartL); TopoDS_Shape aS = aShapeTool->GetShape(aCompoundPartL); if (aShapeTool->Expand(aCompoundPartL)) { //move attributes - TDF_ChildIterator anIter(aCompoundPartL, Standard_True); - for(; anIter.More(); anIter.Next()) + for(TDF_ChildIterator aPartIter(aCompoundPartL, Standard_True); + aPartIter.More(); aPartIter.Next()) { - TDF_Label aChild = anIter.Value(); - TDF_LabelSequence aLayers; - TDF_LabelSequence aColors; - Handle(TDataStd_Name) aName; - getParams(Doc, aChild, aColors, aLayers, aName); + TDF_Label aChild = aPartIter.Value(); //get part TDF_Label aPart; if(aShapeTool->GetReferredShape(aChild, aPart)) { - setParams(Doc, aPart, aColors, aLayers, aName); + CloneMetaData(aChild, aPart, NULL); //remove unnecessary links TopoDS_Shape aShape = aShapeTool->GetShape(aChild); if(!aShapeTool->GetShape(aPart.Father()).IsNull()) { - TopLoc_Location nulloc; aPart.ForgetAttribute(XCAFDoc::ShapeRefGUID()); if (aShapeTool->GetShape(aPart.Father()).ShapeType() == TopAbs_COMPOUND) { @@ -93,31 +91,30 @@ Standard_Boolean XCAFDoc_Editor::Expand (const TDF_Label& Doc, const TDF_Label& TDF_LabelSequence aUsers; if (aShapeTool->GetUsers(aChild, aUsers) > 0) { - for (Standard_Integer i = 1; i <= aUsers.Length(); i++) + for (TDF_LabelSequence::Iterator anIter(aUsers); + anIter.More(); anIter.Next()) { - TDF_Label aSubLabel = aUsers.Value(i); + TDF_Label aSubLabel = anIter.Value(); //remove unnecessary links aSubLabel.ForgetAttribute(XCAFDoc::ShapeRefGUID()); aSubLabel.ForgetAttribute(XCAFDoc_ShapeMapTool::GetID()); - setParams(Doc, aSubLabel, aColors, aLayers, aName); + CloneMetaData(aChild, aSubLabel, NULL); } aChild.ForgetAllAttributes(Standard_False); } } } - //if assembly contains compound, expand it recursively(if flag recursively is true) - if(recursively) + //if assembly contains compound, expand it recursively(if flag theRecursively is true) + if(theRecursively) { - anIter.Initialize(aCompoundPartL); - for(; anIter.More(); anIter.Next()) + for(TDF_ChildIterator aPartIter(aCompoundPartL); aPartIter.More(); aPartIter.Next()) { - TDF_Label aChild = anIter.Value(); - TDF_Label aPart; - if(aShapeTool->GetReferredShape(aChild, aPart)) + TDF_Label aPart = aPartIter.Value(); + if(aShapeTool->GetReferredShape(aPart, aPart)) { TopoDS_Shape aPartShape = aShapeTool->GetShape(aPart); if (!aPartShape.IsNull() && aPartShape.ShapeType() == TopAbs_COMPOUND) - Expand(Doc, aPart, recursively); + Expand(theDoc, aPart, theRecursively); } } } @@ -132,108 +129,357 @@ Standard_Boolean XCAFDoc_Editor::Expand (const TDF_Label& Doc, const TDF_Label& //function : Expand //purpose : Convert all compounds in Doc to assembly //======================================================================= - -Standard_Boolean XCAFDoc_Editor::Expand (const TDF_Label& Doc, const Standard_Boolean recursively) +Standard_Boolean XCAFDoc_Editor::Expand (const TDF_Label& theDoc, + const Standard_Boolean theRecursively) { - Standard_Boolean result = Standard_False; + if (theDoc.IsNull()) + { + return Standard_False; + } + Standard_Boolean aResult = Standard_False; TDF_LabelSequence aLabels; - Handle(XCAFDoc_ShapeTool) aShapeTool = XCAFDoc_DocumentTool::ShapeTool(Doc); + Handle(XCAFDoc_ShapeTool) aShapeTool = XCAFDoc_DocumentTool::ShapeTool(theDoc); aShapeTool->GetFreeShapes(aLabels); - for(Standard_Integer i = 1; i <= aLabels.Length(); i++) + for(TDF_LabelSequence::Iterator anIter(aLabels); anIter.More(); anIter.Next()) { - TopoDS_Shape aS = aShapeTool->GetShape(aLabels(i)); - if (!aS.IsNull() && aS.ShapeType() == TopAbs_COMPOUND && !aShapeTool->IsAssembly(aLabels(i))) - if (Expand(Doc, aLabels(i), recursively)) + const TDF_Label aLabel = anIter.Value(); + const TopoDS_Shape aS = aShapeTool->GetShape(aLabel); + if (!aS.IsNull() && aS.ShapeType() == TopAbs_COMPOUND && !aShapeTool->IsAssembly(aLabel)) + { + if (Expand(theDoc, aLabel, theRecursively)) { - result = Standard_True; + aResult = Standard_True; } + } } - return result; + return aResult; } //======================================================================= -//function : getParams -//purpose : Get colors layers and name +//function : Extract +//purpose : //======================================================================= - -Standard_Boolean XCAFDoc_Editor::getParams (const TDF_Label& Doc, const TDF_Label& Label, - TDF_LabelSequence& Colors, TDF_LabelSequence& Layers, - Handle(TDataStd_Name)& Name) +Standard_Boolean XCAFDoc_Editor::Extract(const TDF_LabelSequence& theSrcLabels, + const TDF_Label& theDstLabel, + const Standard_Boolean theIsNoVisMat) { - if(Doc.IsNull() || Label.IsNull()) + if (theDstLabel.IsNull()) + { return Standard_False; + } - Handle(XCAFDoc_ColorTool) aColorTool = XCAFDoc_DocumentTool::ColorTool(Doc); - Handle(XCAFDoc_LayerTool) aLayerTool = XCAFDoc_DocumentTool::LayerTool(Doc); - - //get colors - XCAFDoc_ColorType aTypeColor = XCAFDoc_ColorGen; - for(;;) + Handle(XCAFDoc_ShapeTool) aDstShapeTool = XCAFDoc_DocumentTool::ShapeTool(theDstLabel); + NCollection_DataMap aVisMatMap; + for (TDF_LabelSequence::Iterator aNewRootIter(theSrcLabels); + aNewRootIter.More(); aNewRootIter.Next()) { - TDF_Label aColor; - aColorTool->GetColor(Label, aTypeColor, aColor); - Colors.Append(aColor); - if(aTypeColor == XCAFDoc_ColorCurv) - break; - aTypeColor = (XCAFDoc_ColorType)(aTypeColor + 1); + // Shape + TopLoc_Location aLoc; + TDF_LabelDataMap aMap; + const TDF_Label aSrcLabel = aNewRootIter.Value(); + Handle(XCAFDoc_ShapeTool) aSrcShapeTool = XCAFDoc_DocumentTool::ShapeTool(aSrcLabel); + Handle(XCAFDoc_Location) aLocationAttr; + if (aSrcLabel.FindAttribute(XCAFDoc_Location::GetID(), aLocationAttr)) + { + aLoc = aLocationAttr->Get(); + } + TDF_Label aCompLabel = aSrcLabel; + aSrcShapeTool->GetReferredShape(aSrcLabel, aCompLabel); + TDF_Label aResLabel = CloneShapeLabel(aCompLabel, aSrcShapeTool, aDstShapeTool, aMap); + TDF_Label aNewCompLabel = aDstShapeTool->AddComponent(theDstLabel, aResLabel, aLoc); + if (aNewCompLabel.IsNull()) + { + TopoDS_Shape aNewShape = aDstShapeTool->GetShape(aResLabel); + aNewShape.Move(aLoc); + aNewCompLabel = aDstShapeTool->AddShape(aNewShape, false); + } + aMap.Bind(aSrcLabel, aNewCompLabel); + aMap.Bind(aCompLabel, aResLabel); + aDstShapeTool->UpdateAssemblies(); + // Attributes + for (TDF_LabelDataMap::Iterator aLabelIter(aMap); aLabelIter.More(); aLabelIter.Next()) + { + CloneMetaData(aLabelIter.Key(), aLabelIter.Value(), &aVisMatMap, true, true, true, !theIsNoVisMat); + } } - - //get layers - aLayerTool->GetLayers(Label, Layers); - - //get name - Label.FindAttribute(TDataStd_Name::GetID(), Name); return Standard_True; } //======================================================================= -//function : setParams -//purpose : set colors layers and name +//function : Extract +//purpose : //======================================================================= +Standard_Boolean XCAFDoc_Editor::Extract(const TDF_Label& theSrcLabel, + const TDF_Label& theDstLabel, + const Standard_Boolean theIsNoVisMat) +{ + TDF_LabelSequence aSeq; + aSeq.Append(theSrcLabel); + return Extract(aSeq, theDstLabel, theIsNoVisMat); +} -Standard_Boolean XCAFDoc_Editor::setParams (const TDF_Label& Doc, const TDF_Label& Label, - const TDF_LabelSequence& Colors, const TDF_LabelSequence& Layers, - const Handle(TDataStd_Name)& Name) +// ======================================================================= +// function : CloneShapeLebel +// purpose : +// ======================================================================= +TDF_Label XCAFDoc_Editor::CloneShapeLabel(const TDF_Label& theSrcLabel, + const Handle(XCAFDoc_ShapeTool)& theSrcShapeTool, + const Handle(XCAFDoc_ShapeTool)& theDstShapeTool, + TDF_LabelDataMap& theMap) { - if(Doc.IsNull() || Label.IsNull()) - return Standard_False; + TDF_Label aNewShL; + if (theMap.Find(theSrcLabel, aNewShL)) + { + return aNewShL; + } - Handle(XCAFDoc_ColorTool) aColorTool = XCAFDoc_DocumentTool::ColorTool(Doc); - Handle(XCAFDoc_LayerTool) aLayerTool = XCAFDoc_DocumentTool::LayerTool(Doc); - Handle(XCAFDoc_ShapeTool) aShapeTool = XCAFDoc_DocumentTool::ShapeTool(Doc); + // Location for main assembly + if (theSrcShapeTool->IsAssembly(theSrcLabel)) + { + // add assembly and iterate all its components + TopoDS_Compound aComp; + BRep_Builder().MakeCompound(aComp); + aNewShL = theDstShapeTool->AddShape(aComp); + theMap.Bind(theSrcLabel, aNewShL); - //set layers - if(!Layers.IsEmpty()) + TDF_LabelSequence aComponents; + theSrcShapeTool->GetComponents(theSrcLabel, aComponents); + for (TDF_LabelSequence::Iterator aCompIter(aComponents); aCompIter.More(); aCompIter.Next()) + { + TDF_Label aCompL = aCompIter.Value(); + TDF_Label aRefL; + theSrcShapeTool->GetReferredShape(aCompL, aRefL); + TDF_Label aCompOriginalL = CloneShapeLabel(aRefL, theSrcShapeTool, theDstShapeTool, theMap); + Handle(XCAFDoc_Location) aLocationAttr; + aCompL.FindAttribute(XCAFDoc_Location::GetID(), aLocationAttr); + TDF_Label aNewCompL = theDstShapeTool->AddComponent(aNewShL, aCompOriginalL, aLocationAttr->Get()); + theMap.Bind(aCompIter.Value(), aNewCompL); + } + return aNewShL; + } + + // add part + TopoDS_Shape aShape = theSrcShapeTool->GetShape(theSrcLabel); + aNewShL = theDstShapeTool->AddShape(aShape, false); + theMap.Bind(theSrcLabel, aNewShL); + + // get original instead of auxiliary instance + TDF_Label anOldOriginalL = theSrcLabel; + if (theSrcShapeTool->IsReference(theSrcLabel)) + { + theSrcShapeTool->GetReferredShape(theSrcLabel, anOldOriginalL); + theDstShapeTool->GetReferredShape(aNewShL, aNewShL); + theMap.Bind(anOldOriginalL, aNewShL); + } + // copy subshapes + TDF_LabelSequence anOldSubShapes; + theSrcShapeTool->GetSubShapes(anOldOriginalL, anOldSubShapes); + for (TDF_LabelSequence::Iterator aSubIter(anOldSubShapes); aSubIter.More(); aSubIter.Next()) + { + TopoDS_Shape aSubShape = theSrcShapeTool->GetShape(aSubIter.Value()); + TDF_Label aNewSubShapeL = theDstShapeTool->AddSubShape(aNewShL, aSubShape); + theMap.Bind(aSubIter.Value(), aNewSubShapeL); + } + return aNewShL; +} + +//======================================================================= +//function : CloneMetaData +//purpose : +//======================================================================= +void XCAFDoc_Editor::CloneMetaData(const TDF_Label& theSrcLabel, + const TDF_Label& theDstLabel, + NCollection_DataMap* theVisMatMap, + const Standard_Boolean theToCopyColor, + const Standard_Boolean theToCopyLayer, + const Standard_Boolean theToCopyMaterial, + const Standard_Boolean theToCopyVisMaterial, + const Standard_Boolean theToCopyAttribute) +{ + if (theSrcLabel == theDstLabel || theSrcLabel.IsNull() || theDstLabel.IsNull()) { - for(Standard_Integer i = 1; i <= Layers.Length(); i++) + return; + } + const Standard_Boolean toCopyColor = theToCopyColor & XCAFDoc_DocumentTool::CheckColorTool(theSrcLabel); + const Standard_Boolean toCopyLayer = theToCopyLayer & XCAFDoc_DocumentTool::CheckLayerTool(theSrcLabel); + const Standard_Boolean toCopyMaterial = theToCopyMaterial & XCAFDoc_DocumentTool::CheckMaterialTool(theSrcLabel); + const Standard_Boolean toCopyVisMaterial = XCAFDoc_DocumentTool::CheckVisMaterialTool(theSrcLabel); + // Colors + if (toCopyColor) + { + Handle(XCAFDoc_ColorTool) aSrcColorTool = XCAFDoc_DocumentTool::ColorTool(theSrcLabel); + Handle(XCAFDoc_ColorTool) aDstColorTool = XCAFDoc_DocumentTool::ColorTool(theDstLabel); + const XCAFDoc_ColorType aTypes[] = { XCAFDoc_ColorGen , XCAFDoc_ColorSurf , XCAFDoc_ColorCurv }; + for (int anInd = 0; anInd < 3; anInd++) + { + TDF_Label aColorL; + aSrcColorTool->GetColor(theSrcLabel, aTypes[anInd], aColorL); + if (!aColorL.IsNull()) + { + Quantity_ColorRGBA aColor; + aSrcColorTool->GetColor(aColorL, aColor); + aDstColorTool->SetColor(theDstLabel, aColor, aTypes[anInd]); + } + } + aDstColorTool->SetVisibility(theDstLabel, aSrcColorTool->IsVisible(theSrcLabel)); + } + // Layers + if (toCopyLayer) + { + Handle(XCAFDoc_LayerTool) aSrcLayerTool = XCAFDoc_DocumentTool::LayerTool(theSrcLabel); + Handle(XCAFDoc_LayerTool) aDstLayerTool = XCAFDoc_DocumentTool::LayerTool(theDstLabel); + TDF_LabelSequence aLayers; + aSrcLayerTool->GetLayers(theSrcLabel, aLayers); + for (TDF_LabelSequence::Iterator aLayerIter(aLayers); aLayerIter.More(); aLayerIter.Next()) { - aLayerTool->SetLayer(Label, Layers.Value(i)); + TCollection_ExtendedString aLayerName; + aSrcLayerTool->GetLayer(aLayerIter.Value(), aLayerName); + aDstLayerTool->SetLayer(theDstLabel, aLayerName); + } + } + // Materials + if (toCopyMaterial) + { + Handle(TDataStd_TreeNode) aMatNode; + if (theSrcLabel.FindAttribute(XCAFDoc::MaterialRefGUID(), aMatNode) && aMatNode->HasFather()) + { + TDF_Label aMaterialL = aMatNode->Father()->Label(); + if (!aMaterialL.IsNull()) + { + Handle(XCAFDoc_MaterialTool) aSrcMaterialTool = XCAFDoc_DocumentTool::MaterialTool(theSrcLabel); + Handle(XCAFDoc_MaterialTool) aDstMaterialTool = XCAFDoc_DocumentTool::MaterialTool(theDstLabel); + double aDensity = 0.0; + Handle(TCollection_HAsciiString) aName, aDescription, aDensName, aDensValType; + if (aSrcMaterialTool->GetMaterial(aMaterialL, aName, aDescription, aDensity, aDensName, aDensValType) + && !aName.IsNull() + && aName->Length() != 0) + { + aDstMaterialTool->SetMaterial(theDstLabel, aName, aDescription, aDensity, aDensName, aDensValType); + } + } + } + } + // Visual Materials + if (toCopyVisMaterial && (theToCopyVisMaterial || toCopyColor)) + { + Handle(XCAFDoc_VisMaterialTool) aSrcVisMatTool = XCAFDoc_DocumentTool::VisMaterialTool(theSrcLabel); + TDF_Label aVisMaterialL; + aSrcVisMatTool->GetShapeMaterial(theSrcLabel, aVisMaterialL); + if (!aVisMaterialL.IsNull()) + { + Handle(XCAFDoc_VisMaterialTool) aDstVisMatTool; + Handle(XCAFDoc_ColorTool) aDstColorTool; + if (theToCopyVisMaterial) + { + aDstVisMatTool = XCAFDoc_DocumentTool::VisMaterialTool(theDstLabel); + } + else + { + aDstColorTool = XCAFDoc_DocumentTool::ColorTool(theDstLabel); + } + Handle(XCAFDoc_VisMaterial) aVisMatSrc = aSrcVisMatTool->GetMaterial(aVisMaterialL); + if(theToCopyVisMaterial) + { + Handle(XCAFDoc_VisMaterial) aVisMatDst; + if (theVisMatMap != NULL) + { + if (!theVisMatMap->Find(aVisMatSrc, aVisMatDst)) + { + aVisMatDst = new XCAFDoc_VisMaterial(); + aVisMatDst->SetCommonMaterial(aVisMatSrc->CommonMaterial()); + aVisMatDst->SetPbrMaterial(aVisMatSrc->PbrMaterial()); + aVisMatDst->SetAlphaMode(aVisMatSrc->AlphaMode(), aVisMatSrc->AlphaCutOff()); + aVisMatDst->SetFaceCulling(aVisMatSrc->FaceCulling()); + TCollection_AsciiString aName; + Handle(TDataStd_Name) aNodeName; + if (aVisMatSrc->Label().FindAttribute(TDataStd_Name::GetID(), aNodeName)) + { + aName = aNodeName->Get(); + } + aDstVisMatTool->AddMaterial(aVisMatDst, aName); + theVisMatMap->Bind(aVisMatSrc, aVisMatDst); + } + } + else + { + aVisMatDst = aVisMatSrc; // consider the same document + } + aDstVisMatTool->SetShapeMaterial(theDstLabel, aVisMatDst->Label()); + } + else + { + aDstColorTool->SetColor(theDstLabel, aVisMatSrc->BaseColor(), XCAFDoc_ColorGen); + } } } - //set colors - if(!Colors.IsEmpty()) + // Other attributes + if (theToCopyAttribute) { - XCAFDoc_ColorType aTypeColor = XCAFDoc_ColorGen; - for(Standard_Integer i = 1; i <= Colors.Length(); i++) + // Finds the target attributes or creates them empty + for (TDF_AttributeIterator anAttIter(theSrcLabel); anAttIter.More(); anAttIter.Next()) { - if(!Colors.Value(i).IsNull()) - aColorTool->SetColor(Label, Colors.Value(i), aTypeColor); - aTypeColor = (XCAFDoc_ColorType)(aTypeColor + 1); + const Handle(TDF_Attribute) anAttSrc = anAttIter.Value(); + // protect against color and layer coping without link to colors and layers + if (const TDataStd_TreeNode* aTreeNode = dynamic_cast (anAttSrc.get())) + { + (void)aTreeNode; + continue; + } + else if (const XCAFDoc_GraphNode* aGraphNode = dynamic_cast (anAttSrc.get())) + { + (void)aGraphNode; + continue; + } + else if (const TNaming_NamedShape* aShapeAttr = dynamic_cast (anAttSrc.get())) + { + (void)aShapeAttr; + continue; + } + else if (const XCAFDoc_ShapeMapTool* aShMapTool = dynamic_cast (anAttSrc.get())) + { + (void)aShMapTool; + continue; + } + else if (const XCAFDoc_Location* aLocAttr = dynamic_cast (anAttSrc.get())) + { + (void)aLocAttr; + continue; + } + Handle(TDF_Attribute) anAttDst; + if (!theDstLabel.FindAttribute(anAttSrc->ID(), anAttDst)) + { + anAttDst = anAttSrc->NewEmpty(); + theDstLabel.AddAttribute(anAttDst); + } + Handle(TDF_RelocationTable) aRT = new TDF_RelocationTable(); + anAttSrc->Paste(anAttDst, aRT); } } - //set name - if(!Name.IsNull()) + // Name + Handle(TDataStd_Name) aNameAttr; + theSrcLabel.FindAttribute(TDataStd_Name::GetID(), aNameAttr); + Handle(XCAFDoc_ShapeTool) aDstShapeTool = XCAFDoc_DocumentTool::ShapeTool(theDstLabel); + if (!aNameAttr.IsNull()) { - if(Name->Get().Search("=>") < 0) - TDataStd_Name::Set(Label, Name->Get()); + TDF_Label aRefLabel; + if (aNameAttr->Get().Search("=>") < 0) + { + TDataStd_Name::Set(theDstLabel, aNameAttr->Get()); + } + else if (aDstShapeTool->GetReferredShape(theDstLabel, aRefLabel)) + { + TCollection_AsciiString aRefName; + TDF_Tool::Entry(aRefLabel, aRefName); + aRefName.Insert(1, "=>"); + TDataStd_Name::Set(theDstLabel, aRefName); + } } else { Standard_SStream Stream; - TopoDS_Shape aShape = aShapeTool->GetShape(Label); + TopoDS_Shape aShape = aDstShapeTool->GetShape(theDstLabel); TopAbs::Print(aShape.ShapeType(), Stream); - TCollection_AsciiString aName (Stream.str().c_str()); - TDataStd_Name::Set(Label, TCollection_ExtendedString(aName)); + TCollection_AsciiString aName(Stream.str().c_str()); + TDataStd_Name::Set(theDstLabel, TCollection_ExtendedString(aName)); } - return Standard_True; -} \ No newline at end of file +} diff --git a/src/XCAFDoc/XCAFDoc_Editor.hxx b/src/XCAFDoc/XCAFDoc_Editor.hxx index 2f9c78df2c..89ac8ac7cf 100644 --- a/src/XCAFDoc/XCAFDoc_Editor.hxx +++ b/src/XCAFDoc/XCAFDoc_Editor.hxx @@ -16,59 +16,88 @@ #ifndef _XCAFDoc_Editor_HeaderFile #define _XCAFDoc_Editor_HeaderFile -#include #include -#include - -#include #include +#include #include +#include #include - +class XCAFDoc_VisMaterial; +class XCAFDoc_ShapeTool; //! Tool for edit structure of document. -class XCAFDoc_Editor +class XCAFDoc_Editor { public: DEFINE_STANDARD_ALLOC - - //! Convert Shape (compound/compsolid/shell/wire) to assembly. - //! Only compounds expanded recursively - Standard_EXPORT static Standard_Boolean Expand (const TDF_Label& Doc, const TDF_Label& Shape, const Standard_Boolean recursively = Standard_True) ; - - //! Convert all compounds in Doc to assembly - Standard_EXPORT static Standard_Boolean Expand (const TDF_Label& Doc, const Standard_Boolean recursively = Standard_True) ; - - - - -protected: - - - - - -private: - - - //! Get colors, layers and name from Label - Standard_EXPORT static Standard_Boolean getParams (const TDF_Label& Doc, const TDF_Label& Label, TDF_LabelSequence& Colors, TDF_LabelSequence& Layers, Handle(TDataStd_Name)& Name) ; - - //! Set colors, layers and name from Label - Standard_EXPORT static Standard_Boolean setParams (const TDF_Label& Doc, const TDF_Label& Label, const TDF_LabelSequence& Colors, const TDF_LabelSequence& Layers, const Handle(TDataStd_Name)& Name) ; - - - + //! Converts shape (compound/compsolid/shell/wire) to assembly. + //! @param[in] theDoc input document + //! @param[in] theShape input shape label + //! @param[in] theRecursively recursively expand a compound subshape + //! @return True if shape successfully expanded + Standard_EXPORT static Standard_Boolean Expand(const TDF_Label& theDoc, + const TDF_Label& theShape, + const Standard_Boolean theRecursively = Standard_True); + + //! Converts all compounds shapes in the document to assembly + //! @param[in] theDoc input document + //! @param[in] theShape input shape label + //! @param[in] theRecursively recursively expand a compound subshape + //! @return True if shape successfully expanded + Standard_EXPORT static Standard_Boolean Expand(const TDF_Label& theDoc, + const Standard_Boolean theRecursively = Standard_True); + + //! Clones all labels to a new position, keeping the structure with all the attributes + //! @param[in] theSrcLabels original labels to copy from + //! @param[in] theDstLabel label to set result as a component of or a main document's label to simply set new shape + //! @param[in] theIsNoVisMat get a VisMaterial attributes as is or convert to color + //! @return True if shape successfully extracted + Standard_EXPORT static Standard_Boolean Extract(const TDF_LabelSequence& theSrcLabels, + const TDF_Label& theDstLabel, + const Standard_Boolean theIsNoVisMat = Standard_False); + + //! Clones the label to a new position, keeping the structure with all the attributes + //! @param[in] theSrcLabel original label to copy from + //! @param[in] theDstLabel label to set result as a component of or a main document's label to simply set new shape + //! @param[in] theIsNoVisMat get a VisMaterial attributes as is or convert to color + //! @return True if shape successfully extracted + Standard_EXPORT static Standard_Boolean Extract(const TDF_Label& theSrcLabel, + const TDF_Label& theDstLabel, + const Standard_Boolean theIsNoVisMat = Standard_False); + + //! Copies shapes label with keeping of shape structure (recursively) + //! @param[in] theSrcLabel original label to copy from + //! @param[in] theSrcShapeTool shape tool to get + //! @param[in] theDstShapeTool shape tool to set + //! @param[out] theMap relating map of the original shapes label and labels created from them + //! @return result shape label + Standard_EXPORT static TDF_Label CloneShapeLabel(const TDF_Label& theSrcLabel, + const Handle(XCAFDoc_ShapeTool)& theSrcShapeTool, + const Handle(XCAFDoc_ShapeTool)& theDstShapeTool, + TDF_LabelDataMap& theMap); + + //! Copies metadata contains from the source label to the destination label. + //! Protected against creating a new label for non-existent tools + //! @param[in] theSrcLabel original label to copy from + //! @param[in] theDstLabel destination shape label to set attributes + //! @param[in] theVisMatMap relating map of the original VisMaterial and created. Can be NULL for the same document + //! @param[in] theToCopyColor copying visible value and shape color (handled all color type) + //! @param[in] theToCopyLayer copying layer + //! @param[in] theToCopyMaterial copying material + //! @param[in] theToCopyVisMaterial copying visual material + //! @param[in] theToCopyAttributes copying of other node attributes, for example, a shape's property + Standard_EXPORT static void CloneMetaData(const TDF_Label& theSrcLabel, + const TDF_Label& theDstLabel, + NCollection_DataMap* theVisMatMap, + const Standard_Boolean theToCopyColor = Standard_True, + const Standard_Boolean theToCopyLayer = Standard_True, + const Standard_Boolean theToCopyMaterial = Standard_True, + const Standard_Boolean theToCopyVisMaterial = Standard_True, + const Standard_Boolean theToCopyAttributes = Standard_True); }; - - - - - - #endif // _XCAFDoc_Editor_HeaderFile diff --git a/src/XDEDRAW/XDEDRAW_Common.cxx b/src/XDEDRAW/XDEDRAW_Common.cxx index 55a900499a..a0697110e3 100644 --- a/src/XDEDRAW/XDEDRAW_Common.cxx +++ b/src/XDEDRAW/XDEDRAW_Common.cxx @@ -579,6 +579,10 @@ static Standard_Integer WriteStep (Draw_Interpretor& di, Standard_Integer argc, return 0; } +//======================================================================= +//function : Expand +//purpose : +//======================================================================= static Standard_Integer Expand (Draw_Interpretor& di, Standard_Integer argc, const char** argv) { if (argc < 3) { @@ -626,6 +630,68 @@ static Standard_Integer Expand (Draw_Interpretor& di, Standard_Integer argc, con return 0; } +//======================================================================= +//function : Extract +//purpose : +//======================================================================= +static Standard_Integer Extract(Draw_Interpretor& di, + Standard_Integer argc, + const char** argv) +{ + if (argc < 4) + { + di << "Use: " << argv[0] << "dstDoc [dstAssmblSh] srcDoc srcLabel1 srcLabel2 ...\n"; + return 1; + } + + Handle(TDocStd_Document) aSrcDoc, aDstDoc; + DDocStd::GetDocument(argv[1], aDstDoc); + if (aDstDoc.IsNull()) + { + di << "Error " << argv[1] << " is not a document\n"; + return 1; + } + TDF_Label aDstLabel; + Standard_Integer anArgInd = 3; + TDF_Tool::Label(aDstDoc->GetData(), argv[2], aDstLabel); + Handle(XCAFDoc_ShapeTool) aDstShapeTool = XCAFDoc_DocumentTool::ShapeTool(aDstDoc->Main()); + if (aDstLabel.IsNull()) + { + aDstLabel = aDstShapeTool->Label(); + anArgInd = 2; // to get Src Doc + } + DDocStd::GetDocument(argv[anArgInd++], aSrcDoc); + if (aSrcDoc.IsNull()) + { + di << "Error " << argv[anArgInd] << " is not a document\n"; + return 1; + } + + TDF_LabelSequence aSrcShapes; + for (; anArgInd < argc; anArgInd++) + { + TDF_Label aSrcLabel; + TDF_Tool::Label(aSrcDoc->GetData(), argv[anArgInd], aSrcLabel); + if (aSrcLabel.IsNull()) + { + di << "[" << argv[anArgInd] << "] is not valid Src label\n"; + return 1; + } + aSrcShapes.Append(aSrcLabel); + } + if (aSrcShapes.IsEmpty()) + { + di << "Error: No Shapes to extract\n"; + return 1; + } + + if (!XCAFDoc_Editor::Extract(aSrcShapes, aDstLabel)) + { + di << "Error: Cannot extract labels\n"; + return 1; + } + return 0; +} //======================================================================= //function : WriteVrml @@ -695,6 +761,9 @@ void XDEDRAW_Common::InitCommands(Draw_Interpretor& di) di.Add("XExpand", "XExpand Doc recursively(0/1) or XExpand Doc recursively(0/1) label1 label2 ..." "or XExpand Doc recursively(0/1) shape1 shape2 ...",__FILE__, Expand, g); + di.Add("XExtract", "XExtract dstDoc [dstAssmblSh] srcDoc srcLabel1 srcLabel2 ...\t" + "Extracts given srcLabel1 srcLabel2 ... from srcDoc into given Doc or assembly shape", + __FILE__, Extract, g); di.Add("WriteVrml", "Doc filename [version VRML#1.0/VRML#2.0 (1/2): 2 by default] [representation shaded/wireframe/both (0/1/2): 0 by default]", __FILE__, WriteVrml, g); diff --git a/tests/bugs/xde/bug28104 b/tests/bugs/xde/bug28104 new file mode 100644 index 0000000000..fc1d42321c --- /dev/null +++ b/tests/bugs/xde/bug28104 @@ -0,0 +1,154 @@ +puts "============================================================================" +puts "0028104: Data Exchange - Extract sub-assembly (XDE)" +puts "============================================================================" +puts "" + +pload DCAF + +Close D0 -silent +Close D1 -silent +Close D2 -silent +Close D3 -silent +Close D4 -silent +Close D5 -silent +Close D6 -silent + +box b1 0 0 0 10 10 10 +box b2 0 0 0 10 10 10 +box b3 0 0 0 10 10 10 +compound b1 b2 b3 c + +XOpen [locate_data_file bug30189.xbf] D0 + +XNewDoc D2 +XAddShape D2 c +XNewDoc D3 +XAddShape D3 c +XNewDoc D4 +XAddShape D4 c +XNewDoc D5 +XAddShape D5 c +XNewDoc D6 +XAddShape D6 c + +# All copy +XNewDoc D1 +XExtract D1 D0 0:1:1:1 +# Exctact part +XExtract D2 D0 0:1:1:3 +# Exctact component +XExtract D3 D0 0:1:1:2:1 +# Exctact part as a component +XExtract D4 0:1:1:1 D0 0:1:1:3 +# Exctact compontnt as a component +XExtract D5 0:1:1:1 D0 0:1:1:2:1 +# Exctact compontnt as a component +XExtract D6 0:1:1:1 D0 0:1:1:2:1 0:1:1:2:2 0:1:1:2:3 0:1:1:3 + +# checking labels structure and number of colors and shape +set err_compare_ref "" +set statD0 [XStat D0] +set statD1 [XStat D1] +set cur_list [split $statD0 \n] +set ref_list [split $statD1 \n] +set nb_ref [llength $ref_list] +set nb_cur [llength $cur_list] +set ref_Compare 0 +set isNextLayer 0; set isNextColor 0 +for { set i 0 } { $i < $nb_cur } { incr i } { + set refstr [lindex $ref_list $i] + set curstr [lindex $cur_list $i] + set isOK 1 + if {[regexp "Number of colors" $refstr]} { + set isNextColor 1 + } elseif {[regexp "Number of layers" $refstr]} { + set isNextLayer 1 + } elseif {$isNextLayer || $isNextColor} { + set refProp [split $refstr " "] + set curProp [split $curstr " "] + if {[llength $refProp] != [llength $curProp]} { + set isOK 0 + } else { + for { set j 0 } { $j < [llength $refProp] && $isOK} { incr j } { + set isFind 0 + for { set k 0 } { $k < [llength $refProp] && $isOK} { incr k } { + if {[lindex $refProp $j] == [lindex $curProp $k]} { + set isFind 1 + break + } + } + set isOK $isFind + } + } + set isNextLayer 0; set isNextColor 0 + } elseif {$refstr != $curstr} { + set isOK 0 + } + if {!$isOK} { + incr ref_Compare + append err_compare_ref " Reference data - $refstr\n" + append err_compare_ref " Current data - $curstr\n" + append err_compare_ref "----------------------------------------------\n" + } +} + +if { $ref_Compare > 0} { + puts "Error : $ref_Compare differences with reference data found :\n$err_compare_ref" +} else { + puts "Comparison of current result with reference data - OK\n" +} + +XGetOneShape res0 D0 +XGetOneShape res1 D1 +compare res0 res1 + +set propsD2 [XCheckProps D2] +if { ![regexp "0:1:1:5 +\"nut" $propsD2] } { + puts "Error: Incorrectly extracted shapes from D0 0:1:1:3 to D2" +} +if { ![regexp "RED" [XGetAllColors D2]] } { + puts "Error: Incorrectly extracted attributes from D0 0:1:1:3 to D2" +} + +set propsD3 [XCheckProps D3] +if { ![regexp "0:1:1:5 +\"nut" $propsD3] && ![regexp "0:1:1:6 +\"nut_1" $propsD3] } { + puts "Error: Incorrectly extracted shapes from D0 0:1:1:2:1 to D3" +} +if { ![regexp "RED" [XGetAllColors D3]] } { + puts "Error: Incorrectly extracted attributes from D0 0:1:1:2:1 to D3" +} + +set dumpD4 [Xdump D4] +if { ![regexp "PART SOLID 0:1:1:5 +\"nut" $dumpD4] && ![regexp "refers to 0:1:1:5" $dumpD4] } { + puts "Error: Incorrectly extracted shapes from D0 0:1:1:3 to D4 0:1:1:1" +} +if { ![regexp "RED" [XGetAllColors D4]] } { + puts "Error: Incorrectly extracted attributes from D0 0:1:1:3 to D4 0:1:1:1" +} + +set dumpD5 [Xdump D5] +if { ![regexp "PART SOLID 0:1:1:5 \"nut" $dumpD5] && ![regexp "refers to 0:1:1:5')' \"nut_1" $dumpD5] } { + puts "Error: Incorrectly extracted shapes from D0 0:1:1:2:1 to D5 0:1:1:1" +} +if { ![regexp "RED" [XGetAllColors D5]] } { + puts "Error: Incorrect XExtract D0 0:1:1:2:1 D5 0:1:1:1" +} + +set dumpD6 [Xdump D6] +if { ![regexp "nut_1" $dumpD6] && ![regexp "nut_2" $dumpD6] && ![regexp "rod_1'" $dumpD6] && ![regexp "refers to 0:1:1:5" $dumpD6]} { + puts "Error: Incorrectly extracted shapes from D0 0:1:1:2:1 0:1:1:2:2 0:1:1:2:3 0:1:1:3 to D6 0:1:1:1" +} +set colorD6 [XGetAllColors D6] +if { ![regexp "RED" $colorD6] && ![regexp "DARKGOLDENROD1" $colorD6]} { + puts "Error: Incorrectly extracted attributes from D0 0:1:1:2:1 0:1:1:2:2 0:1:1:2:3 0:1:1:3 to D6 0:1:1:1" +} + +checkprops res0 -equal res1 + +Close D0 -silent +Close D1 -silent +Close D2 -silent +Close D3 -silent +Close D4 -silent +Close D5 -silent +Close D6 -silent diff --git a/tests/bugs/xde/bug28104_1 b/tests/bugs/xde/bug28104_1 new file mode 100644 index 0000000000..b6f524778d --- /dev/null +++ b/tests/bugs/xde/bug28104_1 @@ -0,0 +1,81 @@ +puts "============================================================================" +puts "0028104: Data Exchange - Extract sub-assembly (XDE)" +puts "============================================================================" +puts "" + +pload DCAF + +Close D0 -silent +Close D1 -silent + +# Reading step file +ReadStep D0 [locate_data_file as1-oc-214-mat.stp] + +# All copy +XNewDoc D1 +XExtract D1 D0 0:1:1:1 + +# checking Props, labels structure and number of colors and shape +set err_compare_ref "" +set statD0 [XStat D0] +set statD1 [XStat D1] +set cur_list [split $statD0 \n] +set ref_list [split $statD1 \n] +set nb_ref [llength $ref_list] +set nb_cur [llength $cur_list] +set ref_Compare 0 +set isNextLayer 0; set isNextColor 0 +for { set i 0 } { $i < $nb_cur } { incr i } { + set refstr [lindex $ref_list $i] + set curstr [lindex $cur_list $i] + set isOK 1 + if {[regexp "Number of colors" $refstr]} { + set isNextColor 1 + } elseif {[regexp "Number of layers" $refstr]} { + set isNextLayer 1 + } elseif {$isNextLayer || $isNextColor} { + set refProp [split $refstr " "] + set curProp [split $curstr " "] + if {[llength $refProp] != [llength $curProp]} { + set isOK 0 + } else { + for { set j 0 } { $j < [llength $refProp] && $isOK} { incr j } { + set isFind 0 + for { set k 0 } { $k < [llength $refProp] && $isOK} { incr k } { + if {[lindex $refProp $j] == [lindex $curProp $k]} { + set isFind 1 + break + } + } + set isOK $isFind + } + } + set isNextLayer 0; set isNextColor 0 + } elseif {$refstr != $curstr} { + set isOK 0 + } + if {!$isOK} { + incr ref_Compare + append err_compare_ref " Reference data - $refstr\n" + append err_compare_ref " Current data - $curstr\n" + append err_compare_ref "----------------------------------------------\n" + } +} + +if { $ref_Compare > 0} { + puts "Error : $ref_Compare differences with reference data found :\n$err_compare_ref" +} else { + puts "Comparison of current result with reference data - OK\n" +} + +XGetOneShape res0 D0 +XGetOneShape res1 D1 +set propsD0 [XCheckProps D0] +set propsD1 [XCheckProps D1] +if { $propsD0 != $propsD1 } { + puts "Error: Incorrect extraction of shape properties" +} +checkprops res0 -equal res1 + +Close D0 -silent +Close D1 -silent From 3ea347e562048f6a6bdf73b00b66c685f83df0fe Mon Sep 17 00:00:00 2001 From: btokarev Date: Tue, 26 Oct 2021 14:18:56 +0300 Subject: [PATCH 117/639] 0032551: Documentation - Novice user guide for OCCT Documentation Added novice guide. Improved structure of Tutorials & Samples. --- dox/FILES_HTML.txt | 3 + dox/FILES_PDF.txt | 2 + dox/samples/draw_scripts.md | 2 +- .../images/sample_overview_qt_geometry.png | Bin 0 -> 48604 bytes .../images/sample_overview_qt_ocaf.png | Bin 0 -> 44553 bytes .../images/sample_overview_qt_topology.png | Bin 0 -> 41538 bytes .../sample_overview_qt_triangulation.png | Bin 0 -> 41924 bytes .../images/sample_overview_qt_viewers.png | Bin 0 -> 37228 bytes dox/samples/images/sample_overview_qt_xde.png | Bin 0 -> 28402 bytes dox/samples/novice_guide.md | 115 +++++++++ dox/samples/ocaf.md | 2 +- dox/samples/ocaf_func.md | 2 +- dox/samples/samples.md | 226 ++++-------------- dox/tutorial/tutorial.md | 2 +- samples/CSharp/ReadMe.md | 5 +- samples/CSharp/ReadMe_D3D.md | 5 +- .../CSharp}/images/samples_c__ie.png | Bin samples/OCCTOverview/code/OcafSamples.cxx | 4 +- samples/ios/UIKitSample/ReadMe.md | 5 +- .../UIKitSample}/images/sample_ios_uikit.png | Bin samples/java/jniviewer/ReadMe.md | 5 +- .../images/samples_java_android_occt.jpg | Bin samples/mfc/standard/ReadMe.md | 17 +- .../mfc/standard}/images/samples_mvc.png | Bin samples/qt/AndroidQt/ReadMe.md | 5 +- .../images/samples_qml_android_occt.jpg | Bin samples/qt/IESample/ReadMe.md | 10 + .../qt/IESample}/images/samples_qt.png | Bin samples/qt/OCCTOverview/ReadMe.md | 18 +- .../images/sample_overview_qt.png | Bin samples/qt/Tutorial/ReadMe.md | 11 + samples/webgl/ReadMe.md | 5 +- .../webgl}/images/sample_webgl.png | Bin 33 files changed, 256 insertions(+), 188 deletions(-) create mode 100644 dox/samples/images/sample_overview_qt_geometry.png create mode 100644 dox/samples/images/sample_overview_qt_ocaf.png create mode 100644 dox/samples/images/sample_overview_qt_topology.png create mode 100644 dox/samples/images/sample_overview_qt_triangulation.png create mode 100644 dox/samples/images/sample_overview_qt_viewers.png create mode 100644 dox/samples/images/sample_overview_qt_xde.png create mode 100644 dox/samples/novice_guide.md rename {dox/samples => samples/CSharp}/images/samples_c__ie.png (100%) rename {dox/samples => samples/ios/UIKitSample}/images/sample_ios_uikit.png (100%) rename {dox/samples => samples/java/jniviewer}/images/samples_java_android_occt.jpg (100%) rename {dox/samples => samples/mfc/standard}/images/samples_mvc.png (100%) rename {dox/samples => samples/qt/AndroidQt}/images/samples_qml_android_occt.jpg (100%) create mode 100644 samples/qt/IESample/ReadMe.md rename {dox/samples => samples/qt/IESample}/images/samples_qt.png (100%) rename {dox/samples => samples/qt/OCCTOverview}/images/sample_overview_qt.png (100%) create mode 100644 samples/qt/Tutorial/ReadMe.md rename {dox/samples => samples/webgl}/images/sample_webgl.png (100%) diff --git a/dox/FILES_HTML.txt b/dox/FILES_HTML.txt index b71332f5a7..76f5ea1614 100644 --- a/dox/FILES_HTML.txt +++ b/dox/FILES_HTML.txt @@ -12,7 +12,9 @@ samples/samples.md ../samples/CSharp/ReadMe.md ../samples/CSharp/ReadMe_D3D.md ../samples/qt/AndroidQt/ReadMe.md +../samples/qt/IESample/ReadMe.md ../samples/qt/OCCTOverview/ReadMe.md +../samples/qt/Tutorial/ReadMe.md ../samples/java/jniviewer/ReadMe.md ../samples/ios/UIKitSample/ReadMe.md ../samples/webgl/ReadMe.md @@ -20,6 +22,7 @@ samples/ocaf.md samples/ocaf_func.md samples/draw_scripts.md +samples/novice_guide.md tutorial/tutorial.md build/build_upgrade.md diff --git a/dox/FILES_PDF.txt b/dox/FILES_PDF.txt index c7850a7006..75e3674f9e 100644 --- a/dox/FILES_PDF.txt +++ b/dox/FILES_PDF.txt @@ -6,6 +6,8 @@ tutorial/tutorial.md +samples/novice_guide.md + upgrade/upgrade.md user_guides/foundation_classes/foundation_classes.md diff --git a/dox/samples/draw_scripts.md b/dox/samples/draw_scripts.md index fa17a3364f..786e8962c6 100644 --- a/dox/samples/draw_scripts.md +++ b/dox/samples/draw_scripts.md @@ -1,4 +1,4 @@ -Draw Demo Scripts {#samples__draw_scripts} +Draw: Demo Scripts {#samples__draw_scripts} ================ All demo scripts are provided with OCCT sources and locate in CASROOT/samples/tcl. To play around them please diff --git a/dox/samples/images/sample_overview_qt_geometry.png b/dox/samples/images/sample_overview_qt_geometry.png new file mode 100644 index 0000000000000000000000000000000000000000..946e4d65d820cc823352c102f10dc418b0285482 GIT binary patch literal 48604 zcmd3NX&_YZ+y9w~5<*2PTPhW@q{vRG6d^^{L0Q9Cvm2&wg(#G*LZf6~#yWPRtR;rT zFk{~)24l$##?1VW>ihhD&x_~%|GXIH+~=J8KG%IMpX+m7^X!(P?mo_=oB#mqyK()> zZ2({g|Am@z><0fl0?akQKWxsI3@!mcX&l$~J#e%k;l`CqCV_-S#@-Tji}bO`SuW|% z`#IGdbnD~a+13k+6OH7AS7U;bWms^DRr9d>(=RW4M-E0jdcf=%849`BW!QHiWxXt+ zr}@XRllwZaLp{1a178Mq>6AV!XS}y?J^Tv)2)dg?%8pMd5cz0I{d9_I&}!PZ1PcpO z3saQm@&vUg^W8m7mTphUJ(H7VnTJlq=&x+bg&K!0 zt=aO?!k5-2%W2_;D{pY4w&$>~V^TfpjkhPnnC~~fr!=0_-1x+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8?ZB0oYZK? z{`>R+MCkO&fjSOu=QpslV%}BlYy99}&=9yQz5my<*tEU9aNlDIw$V1t%${y)>)$BU HvJU?rjk305 literal 0 HcmV?d00001 diff --git a/dox/samples/images/sample_overview_qt_topology.png b/dox/samples/images/sample_overview_qt_topology.png new file mode 100644 index 0000000000000000000000000000000000000000..fbefb8fcad08236c1f84d39a32c92d60edf500dc GIT binary patch literal 41538 zcmbTdcUY6%*CmWyQS5ZE15yLh`(ptF1f+%n!!IzxpV5?YpuQaIUioCD$r0fQBzS-(I`HDra?t@dXI|g zq{jJ^z$X%NU?1SW)7Fnw9#c^jgPZV=ct+a?OQK9!1|lJ!bbG@?uM0 zMa>$#--_0Uj-duu9T5%JwhXGL+?MV(wqSg|o^5`9KAGX+CsW5lQ$Cq@MCY~_-xwj|DdCFt^EWrJm4?%S{VDES5!#)zb}ZuP$_@k5Pu)yhy3~AKacz`A5i`O zfAcwOSe(C{+J7xFMaV%#1f?Burwk)cDhR)n! zsws*%wPWh@EiWU{)-QM{q;V)%cuCV>f-1(B*h!xN&h0zhCR3hwJQSxEoa8EvH@k;^ z!G^vF$^`4b-{ij!Q>tAJ1WE1Ar8QqMK3JGuU&oVtNrJZ!zv^}-=|TQ81AKMB2g)Kf zMAlgUO)#wL=b2149_S3wn)n*M<{*LIm&9+Cw0lV{e zd5EkJYwj-;5)emoVKUpv+xzr&hl~DxHHU)6yWJ_i`()W81^*4}!{1>*ngX>QQY zTCD7*cb!MmZJ$H6y4?)_g_Qk*y4CR`MiP#>W^YAuZ^fg|d%ey76fx;1f|a>Mgs_q2 zD|!KUkuuj;GilPn}egu zrjFj1CGWD@WkZ&^#US-3bqp-GIr&hWa1w&&nPFE7j43n7&rt4Xdn+e)qtkn53hn*h-~oh$UG5F#YV1YfqY74$Kd(6F0n*^=CY~p-=g2c(bRO zU~I?3+H29SJLr5maL{>WY~T1Ga3p0;`ascthXz!;dF5#JisS{;`zj9=KM4ryC1~Oy z(<1nhUX}Wyw<^AG!FrX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sample_overview_qt_triangulation.png new file mode 100644 index 0000000000000000000000000000000000000000..39afb1ed11770800e95d89f04684fd116a7ba48d GIT binary patch literal 41924 zcmbTdbyQSs)HggcGzf^4k}9_#B`DpYfRfS;gLHRD41*}Bl!%11AUTwD&Ws|Uboao} z-QDj2z3=Dw*88pXt@ZKG9L_n{zV;RSw|{$I`@DOusz6FiM+^diNS{4@q5%To0hbVU zLJ05^yA$CL{NP&4sK|go-=auP&48zwe$SrBX!(q;H4yCnqZ_a=woxz9Qm2ahjE}D4 zE%tP^;$Y2?r|!Y3O68CUH2C4o*U}p7N_?3Gw<6Bz-t;`pR99;3CMKK{j(C*y_Mh_` zPw(FWJMq40@cFjIv`1$#xJqZf=#6k1C^W2c!sK@@?TAe7NJ$tQe?c_%=L8DzM~bai zGXYuwf9Q-pX*l@LH5mWT?|(P0L;u_W;okgv@&EY>^cjCKewi1#OX|XZMB|%{7J+y* zC~yy9im5xOpFT4^8686IX7L0ph)q6RC-)!IKfoDlBtD2F{U%m?Yrn1)H}XTDwm3zk zaj1&gP88E(TY<$0@P_LC#k z@*{1O{&pYr;qvdg&eyEyo{r>eLM`W`chHx;!a-4uK??S$0m$h=;6)Yzlb+v@aj|U` z>H=YU_FdOBpkwml?BJqNiXVA`xj3;m6nsku1VxHuU)KRgf; zbaGf7Dce@N*i}msx)7HS1*xrSSwI*tiMxn5Ae_tYAmVNWOf_fw%ltv-t-8qVpOk9; ztL7&UP^Y=(Fz*ZU$!?$HrRFNsSt9DRO$-=ytg3ZeoaKSBh+IpNy8*4<8KcO z&BTrs-z->4{kl`&oTnE5EpI!Rr^n*tC_0I>ztjf9d%zR0F>=G5WN_gv?O$!*;zTvV z{Lc2l=i^E|XUEPL)6N$w%@Z^9QIf}xg(mB_w%YyLUvi;7;>MJc9ofkuVF z3?}gSU5`1nCr95Gs$zFcPrxnqY~*U=+84U(W_D%s8RPEljKl4pHZJ!wR5&X+(=2OV z7an`1V=(Efy&rsC3>OGg?MsY(6|!L~$h+QlW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ZP|ZE z&%E%@|4H74J$*Ic@CRyf))f;w$3u97!KdpL88DiN(bSY|_2IYe;Ydpk-pG5?n{vRw zO4yV|B(p-i?yNNS#0wh+B{uU{i35!GCZ?jrprAf0a`rwO4@$N#&J_v=-VpzHvax$$ zJf$(g!s1Ia2M%U&Z2M@+rK;g|EzJQ=>tbG8r13HW6`WV7F9!#v^w|e=UiDEI+t0_Ay= zC7j{WDYBr8ZXn5xX7K_>vT@$#*V}(WO0nd(8~RqyWW~ixkOiak&A~AGM_Z`JD=j|z;XuE$~JTlFF2JZPHNGZy?&+{*Rgc8GyOl7+jU-YnTx}#8-Dr_Z^dChjQ^!a8g zy9s%sxN6ws^+ZDddKOp8uM%eV{!=kS78H{8uQ14;-06)v8ec^w3$pbC3okv5#0=rj1fiZG@84qUuF@OzVp6rEuXt3*U^ zf$6k)$@CZIFeMz%Jfe;m6gP0&9N<4JVu8O#XbtqBog`d$8Pg;S?@a$L3FRgS(`xXE zy(ojUGV&3b0pwu$i|t4Ok&npWA_xEf5@fdyawP)D{I9!x4-9>Z61hWgnO?O3Rt|)I zbE?5WZU=-0mJDnWWw(P9-?d|~4g&dF^uuoD6HCV)au7`{y~tN*Y;M1Z^BsO-7{4|A na<9&q*-6ZMP*3FJff15J`gR_BUto6}Ip5{rva`U>_qYE7V|JKM literal 0 HcmV?d00001 diff --git a/dox/samples/images/sample_overview_qt_viewers.png b/dox/samples/images/sample_overview_qt_viewers.png new file mode 100644 index 0000000000000000000000000000000000000000..a7f13f9781d23f285d717e205435fecc4cc5f908 GIT binary patch literal 37228 zcmb4qcRW>p{QqsBh(2XywPfUyvaXp@D65cr&3mbAy12HCLP{uc$=<@nwYPhXD0^g! zOSWrsUG6o0NA>x9e~;hyuiyRW=5+4+y!Pw)8t2_(EmcN(PI?ds#Q5;ReH{?!7!PuxeA6X=q;%`5Tvn6Zce=Z{QJ z@18t%7nusnPk(Uk;|=&p)_)33E3^JlJAe5!->ZLEYLf+fU%zG5{>XXx+C0sf;08i7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J_x|wZ}YaTRS)!F9h{j z=lw1@^m&P={L`6@S*D;2?NACl+?}0aLEHOymU!UV5C*6CK<$u_h5OzX1cPj3VgP2h z3p?sX&gU)JH>rRbE>vs;%!a^yV4zeuSN-r0U@8Y5K?6$cb_faE$A`g&IJ9R2i=7J= z%Y0@Y0yeK147lzWES+Kl>LUWdg}XO^_YQ#p$U-mxZY6+#-1Gn0`K~5R-Os+b2PER@ L>gTe~DWM4fS4+!4 literal 0 HcmV?d00001 diff --git a/dox/samples/images/sample_overview_qt_xde.png b/dox/samples/images/sample_overview_qt_xde.png new file mode 100644 index 0000000000000000000000000000000000000000..643560ea16b133e1dd054da4b37e3689e38cec90 GIT binary patch literal 28402 zcmb4qby$;a{4c1lD5)YKt&$R=bfY3&N(~q#%@8Ktp(scz2uLg4qX&ZxM0#|M8k6pZ z(QuymzUQ2O&h@*l^VhTOx#L^+H$LBcVXrimC`cJdiHL|ORFq$86A@jzAR@Y=d*cf5 z3#mvT2k^LN`&{EW5m9*z+1Z+;Hh>KQ-=mvXmt^y_(wKejpquf5<^yP0@p#^(9`oSZv_uO1_Er*AbIHQdd)?HMQs z0ab#FH(kxqO;Z#Ldjin55I0`8i)+obUdcM#hls998yBBfNHk1(5qkTX31_@$pAy zCo@#6m(z!(6XkP4xYOw#Ejgs@Ijw;Apl5T2bk=cI&JHi~wbJ z*~K`ujLEpxdtyCYPgcISU)T}&49A#V9+>56H116Cf;zgQuUH~)MO`ci1bScg_rKz! z^**dWc-0|(Jg55&BrB&u2T>50}J&+lV>e?XD>a8#?&KTly!9pbqZneMTyT zVIR^WwGgT|Vh{C3!_0~A_E9Vcbof7^b*oliGio(2lu=?i~3eTOv7Jb6)!MFzR% zP`(Xo=1OP3*moGfVh22acLg4WYT4ARwSuPH!n~Gm!nfC;&TBMR^~lDkWY_}=NL!pf ziDMy_i;t?E8p=}lyBq1vRwPhk@RfaEHwNWAFb?+b?VCmygUqKPnQu8aQBcWgn!J9KDNstqF^@U}D`DANSGPa-&5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a=EKH7`abAE@QE=^xqchP!;_V7SQeCA1>Fo%neU`u#q>_6 zjU!PL4d0+s;1#l&H#9cTlYt#Uy`EDIw|^IqeEzCyd>|{2=6B8qif1dTa=w4_TcgG9 z3PfC=^fv+wd}EpZ^bln0tGgZZg51>swk` z`6H1kJdp93VB&_7W@SG?Rt3Q^UL{{6umJh~c|7C8i?~P8FSN%=t`ewlnBJADGf`Cl zzC-%Useh;Wppm;FWT;&*<1c;H`T3!qyI>7o7bd|Lss-czL$aYYkfUb21|0qa_{IMO z==p;eNv=yx75ohWd6n!*7%H`jV8DkS-Rj0X{`1>3-@7r8YUA(HjK9<*VSnFpyaz*K zh?Bw&`7Iy*$G?c>ymDyCg1!3eDHHfx-A^ymf8mcUh~tuQIz4H8pI0;$`2)J|lAhs( JG9A0e{{?n=`v(93 literal 0 HcmV?d00001 diff --git a/dox/samples/novice_guide.md b/dox/samples/novice_guide.md new file mode 100644 index 0000000000..09568ee2e4 --- /dev/null +++ b/dox/samples/novice_guide.md @@ -0,0 +1,115 @@ +Novice Guide {#samples__novice_guide} +======= + +@tableofcontents + +@section diffs Modeling with OCCT: Key differences + +Open CASCADE Technology (OCCT) is an object-oriented C++ framework designed for rapid production of sophisticated CAD/CAM/CAE applications. +In other words, it provides endless possibilities for raw 2D and 3D modeling in C++ environment. +Unlike end-user software, it is used by the application developers and therefore strongly differs from the most popular CAD/CAM/CAE software packages. +OCCT provides building blocks enough for modeling, editing, visualization, and data interoperability of 2D and 3D objects. + +By using OCCT, users can create the objects of their desire (or edit already existing ones) using raw code commands. +It is a more complicated process than using GUI-based software, but it provides much more flexibility than even script-based manipulations that are available within existing CAD/CAM/CAE applications. +However, to fully grasp the possibilities of OCCT it is best for the user to have previous experience in C++ at least at a basic level. + +@section basics Understanding the principles + +If you don't have any programming skills, grasping the full magnitude of OCCT workflow is still an option. +The documentation for OCCT contains several entry points for new users. +It will not explain all OCCT classes but will help to comprehend the workflow and help start thinking in terms of Open CASCADE Technology. + +The most basic workflow is described in the @ref occt__tutorial "OCCT Tutorial" - this is an excellent starting point for new users. +In this tutorial you will create a solid model step-by-step using different classes and methods. +Each step of the tutorial contains code snippets and images. + +The basics involved in the modeling process are explained. +When the basics of OCCT are clear, the next logical step is to check out @ref samples "sample applications" and examine those that suit your needs. +For these, the best starting point is **OCCTOverview** located in /samples/qt subfolder of OCCT installation. + +This sample provides code examples for several actions as well as visualization of these code snippets output. +The Overview interface is dynamically changing based on selected **Category** at the menu. +Additional menu buttons will appear, providing users with subcategories and relevant commands to select one of the actions. +The result will appear in the viewer window, the code will appear at the top right, and in several cases the output will be produced at the bottom right window. + +@figure{sample_overview_qt_viewers.png,"Comparison of 3D and 2D viewer windows",240} height=420px + +The 3D viewer window has a row of preset interface buttons to customize the visual output. + +Those buttons can be grouped into three types, left to right: + +- View controls: **Fit all** and **Isometric**, will center the view and reset the camera angles respectively; +- Display mode customization: **HLR,** e.g. "Hidden line removal" (works only when shading is disabled) can be turned on and off; +solid models may be displayed either in **Shading** or **Wireframe** modes. **Transparency** level may be set for models in shading mode; +- The last four buttons in a row are beautifiers enabling Ray-tracing engine and configuring it's parameters. + +At the bottom left of the screen the orientation cube (trihedron) is located. +The trihedron interactively shows the position of the camera in relation to the XYZ axis of the displayed data. +The sides of the trihedron are labeled to help with orientation. +Click on a side of the box to orient the camera view along the preferred axis. + +The 2D viewer window lacks most of these elements and only have **Fit all** button. + +The **Geometry** category of the Overview focuses on primitive objects like dots, lines (including vectors) or planes. +These objects will appear in the viewer after the subcategory is selected. +This section will demonstrate these entities both in 2D and 3D view mode and provide basic examples of parametric creation and data analysis. + +@figure{sample_overview_qt_geometry.png,"",240} height=440px + +The usage of the functions shown in the Overview is described more thoroughly at the @ref occt_user_guides__modeling_data "Modeling data" section of the documentation. +Additionally, @ref occt_user_guides__modeling_algos "Modeling Algorithms" are used in more complex cases. + +The **Topology** section of the Overview demonstrates the functions used in 3D operations. +Multiple use cases are provided, including different object intersections, modifying and calculations. +Some of these use cases are described in the documentation, such as @ref occt_user_guides__inspector "Inspector" usage. + +@figure{sample_overview_qt_topology.png,"",240} height=440px + +The subsections are grouped as shown on the screenshot before. +Most shapes and primitive objects are introduced and then followed by a set of operations and interactions. + +The **Triangulation** segment allows computing the number of triangles on a shape. + +This may be inspected via [Poly_Triangulation Class Reference](https://dev.opencascade.org/doc/refman/html/class_poly___triangulation.html) - +a part of the [Reference manual](https://dev.opencascade.org/doc/refman/html/index.html), +an overall Open CASCADE code guide that may be used to inspect the key points in classes and their connections. + +@figure{sample_overview_qt_triangulation.png,"",240} height=440px + +The triangulation uses some of Mesh-related classes - see full description at @ref occt_user_guides__mesh "Mesh" documentation section. + +The **Data exchange** section provides examples of how to export and import files of several different formats. + +@figure{sample_overview_qt_xde.png,"",240} height=440px + +The **OCAF** section gives an introduction for the @ref intro_overview_ocaf "Open CASCADE Application Framework" functionality. +To test these functions, create an object first (box or cylinder). +After that, the object may be modified and saved. Actions are recorded and may be undone or redone. + +@figure{sample_overview_qt_ocaf.png,"",240} height=440px + +**Viewers** section demonstrates examples of the 2D and 3D visualization outputs. +Check @ref occt_user_guides__visualization "Visualization" section of the documentation for a detailed description. +In addition to these two samples, there are much more that might be of use to a new user based on their particular use case. + +Check Readme files in the sample directories to learn more about samples compilation. + +**Note:** source code for OCCTOverview is stored at 'samples/qt/OCCTOverview/src' folder in your OCCT root, +and the source code files for examples presented in subsections are stored at 'samples/OCCTOverview/code folder'. +Several utility classes that are not presented in the example window may be found in example source code files. + +The overall classes introduction may be found in the @ref occt_user_guides__foundation_classes "Foundation Classes" section of the documentation. +The "Introduction" section contains short descriptions of the most massive entries in the documentation. + +@section helps Additional assistance + +There are several places that may be of use for new users. +The first one is [Training & E-learning](https://dev.opencascade.org/resources/trainings) page that lists available trainings and describes their specifics. + +The second one is the Overview documentation (this document is a part of it) - here you can find information that suits most of the use cases. +This may seem overwhelming at first, but if you have the clear understanding of what do you seek, you will most likely find the required information. + +Aside from the Overview documentation itself, the [Reference manual](https://dev.opencascade.org/doc/refman/html/index.html) is present. +Use it to check classes descriptions, dependencies and examples. +Additionally, there is a [Forum](https://dev.opencascade.org/forums) where you can contact the OCCT community and developers. diff --git a/dox/samples/ocaf.md b/dox/samples/ocaf.md index 57cf5fb8ac..b839a2b7bb 100644 --- a/dox/samples/ocaf.md +++ b/dox/samples/ocaf.md @@ -1,4 +1,4 @@ -OCAF Usage {#samples__ocaf} +OCAF: Usage Tutorial {#samples__ocaf} ======== ## Getting Started diff --git a/dox/samples/ocaf_func.md b/dox/samples/ocaf_func.md index dec2b81bec..7f782a2e56 100644 --- a/dox/samples/ocaf_func.md +++ b/dox/samples/ocaf_func.md @@ -1,4 +1,4 @@ -Function Mechanism Usage {#samples__ocaf_func} +OCAF: Function Mechanism {#samples__ocaf_func} ======================== Let us describe the usage of the "Function Mechanism" of Open CASCADE Application Framework on a simple example. diff --git a/dox/samples/samples.md b/dox/samples/samples.md index 943db58e57..bc0a40e1e1 100644 --- a/dox/samples/samples.md +++ b/dox/samples/samples.md @@ -1,176 +1,56 @@ Tutorials and Samples {#samples} ===================== -Tutorial: Modelling a Bottle ----------------------------- -The Qt programming tutorial teaches how to use Open CASCADE Technology services to model a 3D object. -The purpose of the tutorial is not to explain all OCCT classes but -to help start thinking in terms of the Open CASCADE Technology. - -This tutorial assumes that the user has experience in using and setting up C++. -From the viewpoint of programming, Open CASCADE Technology is designed -to enhance user's C++ tools with high performance modeling classes, methods and functions. -The combination of these resources allows creating substantial applications. - -Read more about @subpage occt__tutorial - -MFC ---------- - -Visual C++ programming samples containing 10 Visual C++ projects -illustrating how to use a particular module or functionality. - -The list of MFC samples: - - * Geometry - * Modeling - * Viewer2d - * Viewer3d - * ImportExport - * Ocaf - * Triangulation - * HLR - * Animation - * Convert - -@figure{/samples/images/samples_mvc.png} - -**Remarks:** - - * MFC samples are available only on Windows platform; - * To start a sample use Open CASCADE Technology\\Samples\\Mfc\\ item of the Start\\Programs menu; - * Read carefully readme.txt to learn about launching and compilation options. - -See @subpage samples_mfc_standard "Readme" for details. - -Qt ---- - - OCCT includes several samples based on Qt application framework. -These samples are available on all supported desktop platforms. - -To start a sample on Windows use Open CASCADE Technology\\Samples\\Qt\\ item of the Start\\Programs menu. - - Import Export -------------- - - Import Export programming sample contains 3D Viewer and Import / Export functionality. - -@figure{/samples/images/samples_qt.png} - - Tutorial ---------- - -The Qt programming tutorial teaches how to use Open CASCADE Technology services to model a 3D object. -The purpose of the tutorial is not to explain all OCCT classes but -to help start thinking in terms of the Open CASCADE Technology. - -This tutorial assumes that the user has experience in using and setting up C++. -From the viewpoint of programming, Open CASCADE Technology is designed -to enhance user's C++ tools with high performance modeling classes, methods and functions. -The combination of these resources allows creating substantial applications. - -**See also:** @ref occt__tutorial "OCCT Tutorial" - -Overview ---------- - -The Qt application providing samples for basic usage of C++ API of various OCCT functionality. - -The samples are organized in several categories according to relevant module of OCCT: - - * Geometry - * Topology, - * Triangulation - * DataExchange - * OCAF - * Viewer 2d - * Viewer 3d - -Each sample presents geometry view, C++ code fragment and sample output window. - -@figure{/samples/images/sample_overview_qt.png} - -See \subpage samples_qt_overview "Readme" for details. - -C# ---- - -C# sample demonstrates integration of OCCT 3D Viewer and Import / Export functionality into .NET applications (using Windows Forms and WPF front ends). - -@figure{/samples/images/samples_c__ie.png} - -Import: - - * BRep - * Iges - * Step - -Export: - - * Brep - * Iges - * Step - * Stl - * Vrml - -See @subpage samples_csharp_occt "C# sample Readme" for details. - -There is also another C# example with the same functionality, which demonstrates the integration of Direct3D Viewer into .NET applications using WPF front end. - -See @subpage samples_csharp_direct3d "Direct3D C# sample Readme" for details. - -Android ---------- - -There are two samples are representing usage OCCT framework on Android mobile platform. They represent an OCCT-based 3D-viewer with CAD import support in formats BREP, STEP and IGES: jniviewer (java) and AndroidQt (qt+qml) - -jniviewer -@figure{/samples/images/samples_java_android_occt.jpg} -Java -- See @subpage samples_java_android_occt "Android Java sample Readme" for details. - -AndroidQt -@figure{/samples/images/samples_qml_android_occt.jpg} -Qt -- See \subpage samples_qml_android_occt "Android Qt sample Readme" for details. - -iOS ---- - -There is a sample demonstrating usage of OCCT on iOS with Apple UIKit framework. - -@figure{/samples/images/sample_ios_uikit.png} - -See @subpage occt_samples_ios_uikit "iOS sample Readme" for details. - -Web ---------- - -WebGL Viewer sample demonstrating usage of OCCT 3D Viewer in Web browser with Emscripten SDK can be found in `samples/webgl`. - -@figure{/samples/images/sample_webgl.png} - -See @subpage occt_samples_webgl "WebGL sample Readme" for details. - -OCAF Usage Sample ------------------- - -The provided set of samples dedicates to get initial knowledge about typical actions with OCAF services. It may be -useful for newcomers. - -Read more about @subpage samples__ocaf - -OCAF Function Mechanism Usage ------------------------------ - -This simple example dedicates to the usage of "Function Mechanism" of OCCT Application Framework. It represents a "nail" -composed by a cone and two cylinders of different radius and height. - -Read more about @subpage samples__ocaf_func - -Draw Demo Scripts ------------------- - -A set of demo scripts demonsrates using OCCT functionality from DRAW. These scripts can be also considered as a -tutorials on tcl usage within Draw. - -Read more about @subpage samples__draw_scripts +- @subpage samples__tutorials + * @ref samples__novice_guide +
A document providing an introductory information to newcomers. + * @ref samples__draw_scripts +
A set of demo scripts demonstrating OCCT functionality from DRAW. + These scripts can be also considered as a tutorials on **Tcl** usage within @ref occt_user_guides__test_harness "Draw Harness". + * @ref occt__tutorial +
A programming tutorial teaching how to use OCCT services to model a 3D object. + See also @ref samples_qt_tutorial + * @ref samples__ocaf +
A set of code snippets performing typical actions with @ref occt_user_guides__ocaf "OCAF" services for newcomers. + * @ref samples__ocaf_func +
A simple example dedicated to the usage of "Function Mechanism" of @ref occt_user_guides__ocaf "OCCT Application Framework". +- @subpage samples__projects + * @ref samples_qt_iesample +
A cross-platform multi-document 3D Viewer sample with CAD import / export functionality based on **Qt Widgets** framework. + * @ref samples_qml_android_occt +
A cross-platform 3D Viewer sample with CAD import based on **QtQuick** framework. + * @ref samples_qt_tutorial +
A cross-platform sample application based on **Qt Widgets** framework and implementing @ref occt__tutorial. + * @ref samples_qt_overview +
A sample application interactively demonstrating OCCT C++ usage with code snippets for newcomers. + * @ref samples_mfc_standard +
A set of projects for Windows platform demonstrating OCCT usage based on **Microsoft Foundation Class** (**MFC**) library. + * @ref samples_csharp_occt +
A Multi-document 3D Viewer sample with CAD import / export functionality based on .NET and **Windows Forms** or **WPF**. + * @ref samples_csharp_direct3d +
3D Viewer sample wrapped into Direct3D context based on .NET and **Windows Presentation Foundation** (**WPF**). + * @ref occt_samples_webgl +
3D Viewer sample based on **Emscripten SDK** representing a static HTML page to be opened in Web Browser. + * @ref samples_java_android_occt +
3D Viewer sample with CAD import for Android mobile platform based on Android SDK and JNI layer. + * @ref occt_samples_ios_uikit +
3D Viewer sample for iOS platform based on Apple **UIKit** framework. + +@page samples__tutorials Tutorials and Demos +- @subpage samples__novice_guide +- @subpage samples__draw_scripts +- @subpage occt__tutorial +- @subpage samples__ocaf +- @subpage samples__ocaf_func + +@page samples__projects Sample Projects +- @subpage samples_qt_iesample +- @subpage samples_qml_android_occt +- @subpage samples_qt_tutorial +- @subpage samples_qt_overview +- @subpage samples_mfc_standard +- @subpage samples_csharp_occt +- @subpage samples_csharp_direct3d +- @subpage occt_samples_webgl +- @subpage samples_java_android_occt +- @subpage occt_samples_ios_uikit diff --git a/dox/tutorial/tutorial.md b/dox/tutorial/tutorial.md index bb7fa66ea3..0825c9b464 100644 --- a/dox/tutorial/tutorial.md +++ b/dox/tutorial/tutorial.md @@ -1,4 +1,4 @@ - Tutorial {#occt__tutorial} +Modeling: Bottle Tutorial {#occt__tutorial} ======= @tableofcontents diff --git a/samples/CSharp/ReadMe.md b/samples/CSharp/ReadMe.md index 49a9444543..a64ca6bc35 100644 --- a/samples/CSharp/ReadMe.md +++ b/samples/CSharp/ReadMe.md @@ -1,8 +1,9 @@ -OCCT CSharp sample {#samples_csharp_occt} +.NET: Import/Export (C#|C++/CLI|WinForms|WPF) {#samples_csharp_occt} ================== This sample demonstrates how to use OCCT libraries in .Net application written using **CSharp** and **Windows Forms** or **Windows Presentation Foundation** (WPF). +The sample could be found within OCCT repository in folder `/samples/CSharp/`. The connection between .Net and OCCT (C++) level is provided by proxy library **OCCProxy**, written in C++/CLI. The proxy library contains a single *ref* class @@ -14,6 +15,8 @@ Both applications provide the same functionality as the standard OCCT Import/Exp The first project is called *IE_WinForms* and uses Windows Forms for GUI. The second application is called *IE_WPF_WinForms* and uses Windows Presentation Foundation. +@figure{samples_c__ie.png} + Note a few important details: - OCCT template class *NCollection_Haft* is used to encapsulate C++ class into a field of *ref* class; diff --git a/samples/CSharp/ReadMe_D3D.md b/samples/CSharp/ReadMe_D3D.md index ca229890c1..7c1649d348 100644 --- a/samples/CSharp/ReadMe_D3D.md +++ b/samples/CSharp/ReadMe_D3D.md @@ -1,8 +1,9 @@ -Direct3D CSharp sample {#samples_csharp_direct3d} -================== +.NET: D3D/OpenGL Viewer (C#|C++/CLI|WPF) {#samples_csharp_direct3d} +================== This sample demonstrates how to use OCCT and DirectX libraries in .Net application written using **CSharp** and **Windows Presentation Foundation** (WPF). +The sample could be found within OCCT repository in folder `/samples/CSharp/`. The connection between .Net, OCCT (C++) and DirectX level is provided by proxy libraries, **OCCProxy** and **D3DProxy**, written in C++/CLI. The proxy library **OCCProxy** contains a single diff --git a/dox/samples/images/samples_c__ie.png b/samples/CSharp/images/samples_c__ie.png similarity index 100% rename from dox/samples/images/samples_c__ie.png rename to samples/CSharp/images/samples_c__ie.png diff --git a/samples/OCCTOverview/code/OcafSamples.cxx b/samples/OCCTOverview/code/OcafSamples.cxx index 5999086643..0154f48d35 100644 --- a/samples/OCCTOverview/code/OcafSamples.cxx +++ b/samples/OCCTOverview/code/OcafSamples.cxx @@ -311,7 +311,7 @@ void OcafSamples::ModifyBoxOcafSample() Handle(TFunction_Function) aFunction; if (!aLabel.FindAttribute(TFunction_Function::GetID(), aFunction)) { - myResult << "Object cannot be modify."; + myResult << "Object cannot be modified."; return; } // Get the Standard_GUID of the TFunction_FunctionDriver of the selected object TFunction_Function attribute @@ -413,7 +413,7 @@ void OcafSamples::ModifyCylinderOcafSample() Handle(TFunction_Function) aFunction; if (!aLabel.FindAttribute(TFunction_Function::GetID(), aFunction)) { - myResult << "Object cannot be modify."; + myResult << "Object cannot be modified."; return; } // Get the Standard_GUID of the TFunction_FunctionDriver of the selected object TFunction_Function attribute diff --git a/samples/ios/UIKitSample/ReadMe.md b/samples/ios/UIKitSample/ReadMe.md index 44d688c79f..7e4de5d60e 100644 --- a/samples/ios/UIKitSample/ReadMe.md +++ b/samples/ios/UIKitSample/ReadMe.md @@ -1,12 +1,15 @@ -OCCT sample for iOS {#occt_samples_ios_uikit} +iOS: 3D Viewer (Objective-C++|UIKit) {#occt_samples_ios_uikit} ================== UIKitSample consists of the Open CASCADE 3D Viewer which provides import of STEP files and toolbar with three buttons. +The sample could be found within OCCT repository in folder `/samples/ios/UIKitSample/`. The first and second buttons serve for import hardcoded STEP files. The third button displays "About" dialog. The viewer supports zoom, pan and rotate actions. The viewer supports selection of solids as well. +@figure{sample_ios_uikit.png} + Installation and configuration: 1. Make sure you are running Mac OS version 10.12.1 or above and properly installed XCode version 8.1 or above. 2. Install Open CASCADE Technology (OCCT) and build static libraries for desired device or/and simulator on your workstation. diff --git a/dox/samples/images/sample_ios_uikit.png b/samples/ios/UIKitSample/images/sample_ios_uikit.png similarity index 100% rename from dox/samples/images/sample_ios_uikit.png rename to samples/ios/UIKitSample/images/sample_ios_uikit.png diff --git a/samples/java/jniviewer/ReadMe.md b/samples/java/jniviewer/ReadMe.md index 4019016a6e..d74dd7c4af 100644 --- a/samples/java/jniviewer/ReadMe.md +++ b/samples/java/jniviewer/ReadMe.md @@ -1,7 +1,8 @@ -OCCT JniViewer sample for Android {#samples_java_android_occt} +Android: 3D Viewer (Java|C++|Android SDK|JNI) {#samples_java_android_occt} ================== This sample demonstrates simple way of using OCCT libraries in Android application written using Java. +The sample could be found within OCCT repository in folder `/samples/java/jniviewer/`. The connection between Java and OCCT (C++) level is provided by proxy library, libTKJniSample.so, written in C++ with exported JNI methods of Java class OcctJniRenderer. The proxy library contains single C++ class OcctJni_Viewer encapsulating OCCT viewer and providing functionality to manipulate this viewer @@ -13,6 +14,8 @@ and the code can be programmed on Java level similarly to C++ one. See description of OCCT Java Wrapper in Advanced Samples and Tools on OCCT web site at https://www.opencascade.com/content/advanced-samples-and-tools +@figure{samples_java_android_occt.jpg} + Install Android Studio 4.0+ and install building tools (check Tools -> SDK Manager): - Android SDK (API level 21 or higher). - Android SDK build tools. diff --git a/dox/samples/images/samples_java_android_occt.jpg b/samples/java/jniviewer/images/samples_java_android_occt.jpg similarity index 100% rename from dox/samples/images/samples_java_android_occt.jpg rename to samples/java/jniviewer/images/samples_java_android_occt.jpg diff --git a/samples/mfc/standard/ReadMe.md b/samples/mfc/standard/ReadMe.md index af88216435..4ab75edf4f 100644 --- a/samples/mfc/standard/ReadMe.md +++ b/samples/mfc/standard/ReadMe.md @@ -1,6 +1,21 @@ -MFC samples {#samples_mfc_standard} +MFC: OCCT Samples (C++|MFC) {#samples_mfc_standard} ========== +Visual C++ programming samples for Windows platform containing illustrating how to use a particular module or functionality, including the following MFC samples: + + * Geometry + * Modeling + * Viewer2d + * Viewer3d + * ImportExport + * Ocaf + * Triangulation + * HLR + * Animation + * Convert + +@figure{samples_mvc.png} + 1. Contents ----------------------- diff --git a/dox/samples/images/samples_mvc.png b/samples/mfc/standard/images/samples_mvc.png similarity index 100% rename from dox/samples/images/samples_mvc.png rename to samples/mfc/standard/images/samples_mvc.png diff --git a/samples/qt/AndroidQt/ReadMe.md b/samples/qt/AndroidQt/ReadMe.md index bfdafc5806..732d5dceda 100644 --- a/samples/qt/AndroidQt/ReadMe.md +++ b/samples/qt/AndroidQt/ReadMe.md @@ -1,12 +1,15 @@ -OCCT AndroidQt sample for Android {#samples_qml_android_occt} +Qt: 3D Viewer (C++|QtQuick|QML) {#samples_qml_android_occt} ================== This sample demonstrates a simple way of using OCCT libraries in Android application written using Qt/Qml. +The sample could be found within OCCT repository in folder `/samples/qt/AndroidQt/`. The connection between Qt/Qml and OCCT (C++) level is provided by proxy library, libAndroidQt.so, written in C++. The proxy library contains single C++ class AndroidQt encapsulating OCCT viewer and providing functionality to manipulate this viewer and to import OCCT shapes from supported format of CAD file (BREP). +@figure{samples_qml_android_occt.jpg} + Requirements for building sample: * Java Development Kit 1.7 or higher * Qt 5.3 or higher diff --git a/dox/samples/images/samples_qml_android_occt.jpg b/samples/qt/AndroidQt/images/samples_qml_android_occt.jpg similarity index 100% rename from dox/samples/images/samples_qml_android_occt.jpg rename to samples/qt/AndroidQt/images/samples_qml_android_occt.jpg diff --git a/samples/qt/IESample/ReadMe.md b/samples/qt/IESample/ReadMe.md new file mode 100644 index 0000000000..214050fb4b --- /dev/null +++ b/samples/qt/IESample/ReadMe.md @@ -0,0 +1,10 @@ +Qt: Import/Export (C++|Qt Widgets) {#samples_qt_iesample} +========== + +OCCT includes several samples based on Qt application framework. +These samples are available on all supported desktop platforms. + +This Import Export programming sample contains 3D Viewer and Import / Export functionality. +The sample could be found within OCCT repository in folder `/samples/qt/IESample/`. + +@figure{samples_qt.png} diff --git a/dox/samples/images/samples_qt.png b/samples/qt/IESample/images/samples_qt.png similarity index 100% rename from dox/samples/images/samples_qt.png rename to samples/qt/IESample/images/samples_qt.png diff --git a/samples/qt/OCCTOverview/ReadMe.md b/samples/qt/OCCTOverview/ReadMe.md index 55f7f0a958..faa5fb5a8e 100644 --- a/samples/qt/OCCTOverview/ReadMe.md +++ b/samples/qt/OCCTOverview/ReadMe.md @@ -1,6 +1,22 @@ -Qt OCCT Overview samples {#samples_qt_overview} +Qt: OCCT Overview (C++|Qt Widgets) {#samples_qt_overview} ========== +The Overview Qt application provides code snippets for basic usage of C++ API of various OCCT functionality. +The samples are organized in several categories according to relevant module of OCCT: + + * Geometry + * Topology + * Triangulation + * DataExchange + * OCAF + * Viewer 2d + * Viewer 3d + +Each sample presents geometry view, C++ code fragment and sample output window. +This sample is described in the @ref samples__novice_guide "Novice guide" for new users. + +@figure{sample_overview_qt.png} + 1. Contents ----------------------- diff --git a/dox/samples/images/sample_overview_qt.png b/samples/qt/OCCTOverview/images/sample_overview_qt.png similarity index 100% rename from dox/samples/images/sample_overview_qt.png rename to samples/qt/OCCTOverview/images/sample_overview_qt.png diff --git a/samples/qt/Tutorial/ReadMe.md b/samples/qt/Tutorial/ReadMe.md new file mode 100644 index 0000000000..7cbdd42668 --- /dev/null +++ b/samples/qt/Tutorial/ReadMe.md @@ -0,0 +1,11 @@ +Qt: Bottle Tutorial (C++|Qt Widgets) {#samples_qt_tutorial} +========== + +The Qt programming tutorial teaches how to use Open CASCADE Technology services to model a 3D object. +The purpose of the tutorial is not to explain all OCCT classes but to help start thinking in terms of the Open CASCADE Technology. + +This tutorial assumes that the user has experience in using and setting up C++. +From the viewpoint of programming, Open CASCADE Technology is designed to enhance user's C++ tools with high performance modeling classes, methods and functions. +The combination of these resources allows creating substantial applications. + +**See also:** @ref occt__tutorial "OCCT Tutorial" diff --git a/samples/webgl/ReadMe.md b/samples/webgl/ReadMe.md index 7e748eb026..d7f1150e07 100644 --- a/samples/webgl/ReadMe.md +++ b/samples/webgl/ReadMe.md @@ -1,4 +1,4 @@ -OCCT WebGL Viewer sample {#occt_samples_webgl} +WebGL: 3D Viewer (JavaScript|C++|WebAssembly) {#occt_samples_webgl} ================== This sample demonstrates simple way of using OCCT libraries in Web application written in C++ and translated into WebAssembly module using Emscripten SDK (emsdk): @@ -6,6 +6,9 @@ https://emscripten.org/ Sample consists of the Open CASCADE 3D Viewer with a button for opening a model in BREP format. The sample requires a WebGL 2.0 capable browser supporting WebAssembly 1.0 (Wasm). +The sample could be found within OCCT repository in folder `/samples/webgl/`. + +@figure{sample_webgl.png,"",240} height=408px Installation and configuration: 1. Install Emscripten SDK and activate minimal configuration (Python, Java and CLang) following *emsdk* documentation. Activate also MinGW when building sample on Windows host. diff --git a/dox/samples/images/sample_webgl.png b/samples/webgl/images/sample_webgl.png similarity index 100% rename from dox/samples/images/sample_webgl.png rename to samples/webgl/images/sample_webgl.png From 0c4931e8737cc1e3f40fe516dcecf3bfe3095db1 Mon Sep 17 00:00:00 2001 From: akaftasev Date: Wed, 20 Oct 2021 13:02:09 +0300 Subject: [PATCH 118/639] 0032444: Modeling Algorithm - BRepOffsetAPI_MakePipeShell crash when using -DT mode and DT_ShapeDivide on the spine Added checking for null edges in BRepFill_TrimShellCorner::ChooseSection() --- src/BRepFill/BRepFill_TrimShellCorner.cxx | 5 +++++ tests/bugs/modalg_7/bug32444 | 25 +++++++++++++++++++++++ 2 files changed, 30 insertions(+) create mode 100644 tests/bugs/modalg_7/bug32444 diff --git a/src/BRepFill/BRepFill_TrimShellCorner.cxx b/src/BRepFill/BRepFill_TrimShellCorner.cxx index 78a232e75d..65ce9a96f6 100644 --- a/src/BRepFill/BRepFill_TrimShellCorner.cxx +++ b/src/BRepFill/BRepFill_TrimShellCorner.cxx @@ -890,6 +890,11 @@ Standard_Boolean BRepFill_TrimShellCorner::ChooseSection(const TopoDS_Shape& Com if (LastEdge.IsNull()) return Standard_False; + if (FirstEdge.IsNull() || LastEdge.IsNull()) + { + return Standard_False; + } + BB.Add(NewWire, FirstEdge); if (!FirstEdge.IsSame(LastEdge)) diff --git a/tests/bugs/modalg_7/bug32444 b/tests/bugs/modalg_7/bug32444 new file mode 100644 index 0000000000..6ff8240f78 --- /dev/null +++ b/tests/bugs/modalg_7/bug32444 @@ -0,0 +1,25 @@ +puts "============================================" +puts "0032444: BRepOffsetAPI_MakePipeShell crash when using -DT mode and DT_ShapeDivide on the spine" +puts "============================================" +puts "" + +restore [locate_data_file bug32444.brep] s +restore [locate_data_file bug32444_1.brep] p1 +restore [locate_data_file bug32444_2.brep] p2 +restore [locate_data_file bug32444_3.brep] p3 +restore [locate_data_file bug32444_4.brep] p4 +restore [locate_data_file bug32444_5.brep] p5 +restore [locate_data_file bug32444_6.brep] p6 + +DT_ShapeDivide s s 0.001 + +mksweep s +setsweep -DT +addsweep p1 +addsweep p2 +addsweep p3 +addsweep p4 +addsweep p5 +addsweep p6 + +buildsweep r -C -S From d1069cad4b1c133be1a4c876608c6ec6d7801447 Mon Sep 17 00:00:00 2001 From: kgv Date: Mon, 1 Nov 2021 09:53:12 +0300 Subject: [PATCH 119/639] 0032156: Documentation, gendoc.tcl - wrong processing of 'mathjax' option Fixed handling of -s= option. Fixed handling of -mathjax= option. --- adm/gendoc.tcl | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/adm/gendoc.tcl b/adm/gendoc.tcl index d8999ec4cb..ef47455783 100644 --- a/adm/gendoc.tcl +++ b/adm/gendoc.tcl @@ -236,9 +236,11 @@ proc gendoc {args} { return -1 } } elseif {$arg_n == "s"} { - if { [ lsearch $args_names "pdf" ] == -1 } { + if { [ lsearch $args_names "pdf" ] != -1 } { + puts "Warning: search is not used with PDF and will be ignored." continue } + if {$args_values(s) != "NULL"} { set SEARCH_MODE $args_values(s) } else { @@ -247,16 +249,16 @@ proc gendoc {args} { } } elseif {$arg_n == "mathjax"} { if { [ lsearch $args_names "pdf" ] != -1 } { - set possible_mathjax_loc $args_values(mathjax) - if {[file exist [file join $possible_mathjax_loc $mathjax_js_name]]} { - set MATHJAX_LOCATION $args_values(mathjax) - puts "$MATHJAX_LOCATION" - } else { - puts "Warning: $mathjax_js_name is not found in $possible_mathjax_loc." - puts " MathJax will be used from $MATHJAX_LOCATION" - } + puts "Warning: MathJax is not used with PDF and will be ignored." + } + + set possible_mathjax_loc $args_values(mathjax) + if {[file exist [file join $possible_mathjax_loc $mathjax_js_name]]} { + set MATHJAX_LOCATION $args_values(mathjax) + puts "$MATHJAX_LOCATION" } else { - puts "Warning: MathJax is not used with pdf and will be ignored." + puts "Warning: $mathjax_js_name is not found in $possible_mathjax_loc." + puts " MathJax will be used from $MATHJAX_LOCATION" } } else { puts "\nWrong argument: $arg_n" From 80ffc5f84dae96de6ed093d3e5d2466a9e368b27 Mon Sep 17 00:00:00 2001 From: inv Date: Fri, 29 Oct 2021 17:31:15 +0300 Subject: [PATCH 120/639] Update version up to 7.6.0 --- src/Standard/Standard_Version.hxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Standard/Standard_Version.hxx b/src/Standard/Standard_Version.hxx index 6a8361080b..6373bf549b 100644 --- a/src/Standard/Standard_Version.hxx +++ b/src/Standard/Standard_Version.hxx @@ -42,7 +42,7 @@ //! - "dev" for development version between releases //! - "beta..." or "rc..." for beta releases or release candidates //! - "project..." for version containing project-specific fixes -#define OCC_VERSION_DEVELOPMENT "dev" +//#define OCC_VERSION_DEVELOPMENT "dev" // Derived (manually): version as real and string (major.minor) #define OCC_VERSION 7.6 From d4edeaed312ca68cbdd3a59919a91c1c580b9a15 Mon Sep 17 00:00:00 2001 From: inv Date: Wed, 17 Nov 2021 16:41:35 +0300 Subject: [PATCH 121/639] Increment OCCT version up to 7.7.0dev --- src/Standard/Standard_Version.hxx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/Standard/Standard_Version.hxx b/src/Standard/Standard_Version.hxx index 6373bf549b..752c060ad2 100644 --- a/src/Standard/Standard_Version.hxx +++ b/src/Standard/Standard_Version.hxx @@ -34,7 +34,7 @@ // Primary definitions #define OCC_VERSION_MAJOR 7 -#define OCC_VERSION_MINOR 6 +#define OCC_VERSION_MINOR 7 #define OCC_VERSION_MAINTENANCE 0 //! This macro must be commented in official release, and set to non-empty @@ -42,12 +42,12 @@ //! - "dev" for development version between releases //! - "beta..." or "rc..." for beta releases or release candidates //! - "project..." for version containing project-specific fixes -//#define OCC_VERSION_DEVELOPMENT "dev" +#define OCC_VERSION_DEVELOPMENT "dev" // Derived (manually): version as real and string (major.minor) -#define OCC_VERSION 7.6 -#define OCC_VERSION_STRING "7.6" -#define OCC_VERSION_COMPLETE "7.6.0" +#define OCC_VERSION 7.7 +#define OCC_VERSION_STRING "7.7" +#define OCC_VERSION_COMPLETE "7.7.0" //! Derived: extended version as string ("major.minor.maintenance.dev") #ifdef OCC_VERSION_DEVELOPMENT From e77bcb6b5726d3e6d23402a087f48e19915ea06b Mon Sep 17 00:00:00 2001 From: kgv Date: Wed, 10 Nov 2021 14:21:02 +0300 Subject: [PATCH 122/639] 0032655: Configuration, qmake - add missing CSF_Draco Added CSF_Draco to OccToolkit.pri. Removed libXmu.so search from genconf. --- adm/genconfdeps.tcl | 10 +++++----- adm/qmake/OccToolkit.pri | 1 + dox/build/build_3rdparty/building_3rdparty.md | 3 ++- 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/adm/genconfdeps.tcl b/adm/genconfdeps.tcl index 189613f170..1ffb65afdb 100644 --- a/adm/genconfdeps.tcl +++ b/adm/genconfdeps.tcl @@ -1251,13 +1251,13 @@ proc wokdep:SearchX11 {theErrInc theErrLib32 theErrLib64 theErrBin32 theErrBin64 return "$isFound" } - set aXmuLibPath [wokdep:SearchLib "Xmu" "$::ARCH"] - if { "$aXmuLibPath" == "" } { - set aXmuLibPath [wokdep:SearchLib "Xmu" "$::ARCH" "/usr/X11/lib"] - if { "$aXmuLibPath" != "" } { + set aX11LibPath [wokdep:SearchLib "X11" "$::ARCH"] + if { "$aX11LibPath" == "" } { + set aX11LibPath [wokdep:SearchLib "X11" "$::ARCH" "/usr/X11/lib"] + if { "$aX11LibPath" != "" } { #lappend ::CSF_OPT_LIB$::ARCH "/usr/X11/lib" } else { - lappend anErrLib$::ARCH "Error: '${::SYS_LIB_PREFIX}Xmu.${::SYS_LIB_SUFFIX}' not found (X11)" + lappend anErrLib$::ARCH "Error: '${::SYS_LIB_PREFIX}X11.${::SYS_LIB_SUFFIX}' not found (X11)" set isFound "false" } } diff --git a/adm/qmake/OccToolkit.pri b/adm/qmake/OccToolkit.pri index ca33ca051f..9bc54d1cdb 100644 --- a/adm/qmake/OccToolkit.pri +++ b/adm/qmake/OccToolkit.pri @@ -26,6 +26,7 @@ HAVE_FFMPEG { CSF_FFmpeg = -lavcodec -lavformat -lswscale -lavutil } HAVE_TBB { CSF_TBB = -ltbb -ltbbmalloc } HAVE_ZLIB { CSF_ZLIB = -lzlib } HAVE_LIBLZMA { CSF_LIBLZMA = -lliblzma } +HAVE_DRACO { CSF_Draco = -ldraco } win32 { CSF_kernel32 = -lkernel32 CSF_advapi32 = -ladvapi32 diff --git a/dox/build/build_3rdparty/building_3rdparty.md b/dox/build/build_3rdparty/building_3rdparty.md index 8bc15f6c5b..eaf038b7a6 100644 --- a/dox/build/build_3rdparty/building_3rdparty.md +++ b/dox/build/build_3rdparty/building_3rdparty.md @@ -272,7 +272,8 @@ There are two types of third-party products, which are necessary to build OCCT: All 3rd-party products required for building of OCCT could be installed from official repositories. You may install them from console using apt-get utility: - sudo apt-get install tcllib tklib tcl-dev tk-dev libfreetype-dev libx11-dev libgl1-mesa-dev libfreeimage-dev rapidjson-dev + sudo apt-get install tcllib tklib tcl-dev tk-dev libfreetype-dev libx11-dev libgl1-mesa-dev libfreeimage-dev + sudo apt-get install rapidjson-dev libdraco-dev Building is possible with C++ compliant compiler: From 62874fa199ad90328a74c6398f8f28a1c49e7df6 Mon Sep 17 00:00:00 2001 From: ichesnok Date: Thu, 28 Oct 2021 11:22:12 +0300 Subject: [PATCH 123/639] 0032096: Data Exchange - Extension for XCAFDimTolObjects_DimensionQualifier Added XCAFDimTolObjects_AngularQualifier for angles. And added field and methods for dimensions. --- src/STEPCAFControl/STEPCAFControl_Reader.cxx | 12 ++++---- src/STEPCAFControl/STEPCAFControl_Writer.cxx | 12 ++++---- src/XCAFDimTolObjects/FILES | 1 + .../XCAFDimTolObjects_AngularQualifier.hxx | 29 +++++++++++++++++++ .../XCAFDimTolObjects_DimensionObject.cxx | 28 ++++++++++++++++++ .../XCAFDimTolObjects_DimensionObject.hxx | 11 +++++++ src/XCAFDoc/XCAFDoc_Dimension.cxx | 9 ++++++ src/XDEDRAW/XDEDRAW_GDTs.cxx | 2 ++ tests/gdt/import/A1 | 4 +-- tests/gdt/import/A4 | 4 +-- 10 files changed, 96 insertions(+), 16 deletions(-) create mode 100644 src/XCAFDimTolObjects/XCAFDimTolObjects_AngularQualifier.hxx diff --git a/src/STEPCAFControl/STEPCAFControl_Reader.cxx b/src/STEPCAFControl/STEPCAFControl_Reader.cxx index 93a952e404..fedf03721b 100644 --- a/src/STEPCAFControl/STEPCAFControl_Reader.cxx +++ b/src/STEPCAFControl/STEPCAFControl_Reader.cxx @@ -3541,11 +3541,11 @@ static void setDimObjectToXCAF(const Handle(Standard_Transient)& theEnt, //get qualifier for angular value aType = XCAFDimTolObjects_DimensionType_Size_Angular; if (anAngSize->AngleSelection() == StepShape_Equal) - aDimObj->SetQualifier(XCAFDimTolObjects_DimensionQualifier_Avg); + aDimObj->SetAngularQualifier(XCAFDimTolObjects_AngularQualifier_Equal); else if (anAngSize->AngleSelection() == StepShape_Large) - aDimObj->SetQualifier(XCAFDimTolObjects_DimensionQualifier_Max); + aDimObj->SetAngularQualifier(XCAFDimTolObjects_AngularQualifier_Large); else if (anAngSize->AngleSelection() == StepShape_Small) - aDimObj->SetQualifier(XCAFDimTolObjects_DimensionQualifier_Min); + aDimObj->SetAngularQualifier(XCAFDimTolObjects_AngularQualifier_Small); } } else @@ -3557,11 +3557,11 @@ static void setDimObjectToXCAF(const Handle(Standard_Transient)& theEnt, //get qualifier for angular value aType = XCAFDimTolObjects_DimensionType_Location_Angular; if (anAngLoc->AngleSelection() == StepShape_Equal) - aDimObj->SetQualifier(XCAFDimTolObjects_DimensionQualifier_Avg); + aDimObj->SetAngularQualifier(XCAFDimTolObjects_AngularQualifier_Equal); else if (anAngLoc->AngleSelection() == StepShape_Large) - aDimObj->SetQualifier(XCAFDimTolObjects_DimensionQualifier_Max); + aDimObj->SetAngularQualifier(XCAFDimTolObjects_AngularQualifier_Large); else if (anAngLoc->AngleSelection() == StepShape_Small) - aDimObj->SetQualifier(XCAFDimTolObjects_DimensionQualifier_Min); + aDimObj->SetAngularQualifier(XCAFDimTolObjects_AngularQualifier_Small); } } if (aType == XCAFDimTolObjects_DimensionType_Location_None) diff --git a/src/STEPCAFControl/STEPCAFControl_Writer.cxx b/src/STEPCAFControl/STEPCAFControl_Writer.cxx index 22d46ca905..fa9b2069d9 100644 --- a/src/STEPCAFControl/STEPCAFControl_Writer.cxx +++ b/src/STEPCAFControl/STEPCAFControl_Writer.cxx @@ -3939,11 +3939,11 @@ Standard_Boolean STEPCAFControl_Writer::WriteDGTsAP242 (const Handle(XSControl_W Handle(StepShape_AngularLocation) aDim = new StepShape_AngularLocation(); StepShape_AngleRelator aRelator = StepShape_Equal; if (anObject->HasQualifier()) { - XCAFDimTolObjects_DimensionQualifier aQualifier = anObject->GetQualifier(); + XCAFDimTolObjects_AngularQualifier aQualifier = anObject->GetAngularQualifier(); switch (aQualifier) { - case XCAFDimTolObjects_DimensionQualifier_Min: aRelator = StepShape_Small; + case XCAFDimTolObjects_AngularQualifier_Small : aRelator = StepShape_Small; break; - case XCAFDimTolObjects_DimensionQualifier_Max: aRelator = StepShape_Large; + case XCAFDimTolObjects_AngularQualifier_Large : aRelator = StepShape_Large; break; default: aRelator = StepShape_Equal; } @@ -3969,11 +3969,11 @@ Standard_Boolean STEPCAFControl_Writer::WriteDGTsAP242 (const Handle(XSControl_W Handle(StepShape_AngularSize) aDim = new StepShape_AngularSize(); StepShape_AngleRelator aRelator = StepShape_Equal; if (anObject->HasQualifier()) { - XCAFDimTolObjects_DimensionQualifier aQualifier = anObject->GetQualifier(); + XCAFDimTolObjects_AngularQualifier aQualifier = anObject->GetAngularQualifier(); switch (aQualifier) { - case XCAFDimTolObjects_DimensionQualifier_Min: aRelator = StepShape_Small; + case XCAFDimTolObjects_AngularQualifier_Small: aRelator = StepShape_Small; break; - case XCAFDimTolObjects_DimensionQualifier_Max: aRelator = StepShape_Large; + case XCAFDimTolObjects_AngularQualifier_Large: aRelator = StepShape_Large; break; default: aRelator = StepShape_Equal; } diff --git a/src/XCAFDimTolObjects/FILES b/src/XCAFDimTolObjects/FILES index 69ceaa34e6..0bbce85f4a 100644 --- a/src/XCAFDimTolObjects/FILES +++ b/src/XCAFDimTolObjects/FILES @@ -28,5 +28,6 @@ XCAFDimTolObjects_DimensionObjectSequence.hxx XCAFDimTolObjects_GeomToleranceObjectSequence.hxx XCAFDimTolObjects_DataMapOfToleranceDatum.hxx XCAFDimTolObjects_ToleranceZoneAffectedPlane.hxx +XCAFDimTolObjects_AngularQualifier.hxx diff --git a/src/XCAFDimTolObjects/XCAFDimTolObjects_AngularQualifier.hxx b/src/XCAFDimTolObjects/XCAFDimTolObjects_AngularQualifier.hxx new file mode 100644 index 0000000000..a9aaec7409 --- /dev/null +++ b/src/XCAFDimTolObjects/XCAFDimTolObjects_AngularQualifier.hxx @@ -0,0 +1,29 @@ +// Created on: 2021-10-25 +// Created by: Irina Chesnokova +// Copyright (c) 2021 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 _XCAFDimTolObjects_AngularQualifier_HeaderFile +#define _XCAFDimTolObjects_AngularQualifier_HeaderFile + +//! Defines types of qualifier for angular dimensions +enum XCAFDimTolObjects_AngularQualifier +{ +XCAFDimTolObjects_AngularQualifier_None, +XCAFDimTolObjects_AngularQualifier_Small, +XCAFDimTolObjects_AngularQualifier_Large, +XCAFDimTolObjects_AngularQualifier_Equal +}; + +#endif // _XCAFDimTolObjects_AngularQualifier_HeaderFile diff --git a/src/XCAFDimTolObjects/XCAFDimTolObjects_DimensionObject.cxx b/src/XCAFDimTolObjects/XCAFDimTolObjects_DimensionObject.cxx index bcbc8d6d68..9de6d4acd6 100644 --- a/src/XCAFDimTolObjects/XCAFDimTolObjects_DimensionObject.cxx +++ b/src/XCAFDimTolObjects/XCAFDimTolObjects_DimensionObject.cxx @@ -41,6 +41,7 @@ XCAFDimTolObjects_DimensionObject::XCAFDimTolObjects_DimensionObject(const Handl myType = theObj->myType; myVal = theObj->myVal; myQualifier = theObj->myQualifier; + myAngularQualifier = theObj->myAngularQualifier; myIsHole = theObj->myIsHole; myFormVariance = theObj->myFormVariance; myGrade = theObj->myGrade; @@ -117,6 +118,33 @@ Standard_Boolean XCAFDimTolObjects_DimensionObject::HasQualifier() const return (myQualifier != XCAFDimTolObjects_DimensionQualifier_None); } +//======================================================================= +//function : SetAngularQualifier +//purpose : +//======================================================================= +void XCAFDimTolObjects_DimensionObject::SetAngularQualifier(const XCAFDimTolObjects_AngularQualifier theAngularQualifier) +{ + myAngularQualifier = theAngularQualifier; +} + +//======================================================================= +//function : GetAngularQualifier +//purpose : +//======================================================================= +XCAFDimTolObjects_AngularQualifier XCAFDimTolObjects_DimensionObject::GetAngularQualifier() const +{ + return myAngularQualifier; +} + +//======================================================================= +//function : HasAngularQualifier +//purpose : +//======================================================================= +Standard_Boolean XCAFDimTolObjects_DimensionObject::HasAngularQualifier() const +{ + return (myAngularQualifier != XCAFDimTolObjects_AngularQualifier_None); +} + //======================================================================= //function : SetType //purpose : diff --git a/src/XCAFDimTolObjects/XCAFDimTolObjects_DimensionObject.hxx b/src/XCAFDimTolObjects/XCAFDimTolObjects_DimensionObject.hxx index 58e1806df8..e9783f7b05 100644 --- a/src/XCAFDimTolObjects/XCAFDimTolObjects_DimensionObject.hxx +++ b/src/XCAFDimTolObjects/XCAFDimTolObjects_DimensionObject.hxx @@ -40,6 +40,7 @@ #include #include #include +#include class XCAFDimTolObjects_DimensionObject; DEFINE_STANDARD_HANDLE(XCAFDimTolObjects_DimensionObject, Standard_Transient) @@ -68,6 +69,15 @@ public: //! Returns True if the object has dimension qualifier. Standard_EXPORT Standard_Boolean HasQualifier() const; + + //! Sets angular qualifier as small, large or equal. + Standard_EXPORT void SetAngularQualifier(const XCAFDimTolObjects_AngularQualifier theAngularQualifier); + + //! Returns angular qualifier. + Standard_EXPORT XCAFDimTolObjects_AngularQualifier GetAngularQualifier() const; + + //! Returns True if the object has angular qualifier. + Standard_EXPORT Standard_Boolean HasAngularQualifier() const; //! Sets a specific type of dimension. Standard_EXPORT void SetType (const XCAFDimTolObjects_DimensionType theTyupe); @@ -302,6 +312,7 @@ private: XCAFDimTolObjects_DimensionType myType; Handle(TColStd_HArray1OfReal) myVal; XCAFDimTolObjects_DimensionQualifier myQualifier; + XCAFDimTolObjects_AngularQualifier myAngularQualifier; Standard_Boolean myIsHole; XCAFDimTolObjects_DimensionFormVariance myFormVariance; XCAFDimTolObjects_DimensionGrade myGrade; diff --git a/src/XCAFDoc/XCAFDoc_Dimension.cxx b/src/XCAFDoc/XCAFDoc_Dimension.cxx index 664b99242f..2f73076a6e 100644 --- a/src/XCAFDoc/XCAFDoc_Dimension.cxx +++ b/src/XCAFDoc/XCAFDoc_Dimension.cxx @@ -38,6 +38,7 @@ enum ChildLab ChildLab_Type = 1, ChildLab_Value, ChildLab_Qualifier, + ChildLab_AngularQualifier, ChildLab_Class, ChildLab_Dec, ChildLab_Modifiers, @@ -121,6 +122,8 @@ void XCAFDoc_Dimension::SetObject (const Handle(XCAFDimTolObjects_DimensionObjec } Handle(TDataStd_Integer) aQualifier = TDataStd_Integer::Set(Label().FindChild(ChildLab_Qualifier), theObject->GetQualifier()); + + Handle(TDataStd_Integer) anAngularQualifier = TDataStd_Integer::Set(Label().FindChild(ChildLab_AngularQualifier), theObject->GetAngularQualifier()); Standard_Boolean aH; XCAFDimTolObjects_DimensionFormVariance aF; @@ -314,6 +317,12 @@ Handle(XCAFDimTolObjects_DimensionObject) XCAFDoc_Dimension::GetObject() const { anObj->SetQualifier((XCAFDimTolObjects_DimensionQualifier)aQualifier->Get()); } + + Handle(TDataStd_Integer) anAngularQualifier; + if (Label().FindChild(ChildLab_AngularQualifier).FindAttribute(TDataStd_Integer::GetID(), anAngularQualifier)) + { + anObj->SetAngularQualifier((XCAFDimTolObjects_AngularQualifier)anAngularQualifier->Get()); + } Handle(TDataStd_IntegerArray) aClass; if(Label().FindChild(ChildLab_Class).FindAttribute(TDataStd_IntegerArray::GetID(), aClass) diff --git a/src/XDEDRAW/XDEDRAW_GDTs.cxx b/src/XDEDRAW/XDEDRAW_GDTs.cxx index 4a55a65400..ccb5cdf64c 100644 --- a/src/XDEDRAW/XDEDRAW_GDTs.cxx +++ b/src/XDEDRAW/XDEDRAW_GDTs.cxx @@ -168,6 +168,8 @@ static Standard_Integer DumpDGTs (Draw_Interpretor& di, Standard_Integer argc, c } if (aDimTolObj->HasQualifier()) di << ", Q " << aDimTolObj->GetQualifier(); + if (aDimTolObj->HasAngularQualifier()) + di << ", AQ " << aDimTolObj->GetAngularQualifier(); if (aDimTolObj->GetType() == XCAFDimTolObjects_DimensionType_Location_Oriented) { gp_Dir aD; diff --git a/tests/gdt/import/A1 b/tests/gdt/import/A1 index 61dc23cb14..41cf870dd5 100644 --- a/tests/gdt/import/A1 +++ b/tests/gdt/import/A1 @@ -79,9 +79,9 @@ set ref_data { 0:1:1:1:22 Shape.23 0:1:4:21 Dimension.23.1 ( N "diameter" T 15, V 20, VL 0.050000000000000003, VU 0.10000000000000001, P 0 ) 0:1:1:1:23 Shape.24 - 0:1:4:22 Dimension.24.1 ( N "angle" T 11, V 60, VL 0.5, VU 0.5, Q 3, P 0 ) + 0:1:4:22 Dimension.24.1 ( N "angle" T 11, V 60, VL 0.5, VU 0.5, AQ 3, P 0 ) 0:1:1:1:24 Shape.25 - 0:1:4:22 Dimension.25.1 ( N "angle" T 11, V 60, VL 0.5, VU 0.5, Q 3, P 0 ) + 0:1:4:22 Dimension.25.1 ( N "angle" T 11, V 60, VL 0.5, VU 0.5, AQ 3, P 0 ) 0:1:1:1:25 Shape.26 0:1:4:23 Dimension.26.1 ( N "diameter" T 15, LB 34.799999999999997, UB 35.200000000000003, P 0 ) 0:1:1:1:26 Shape.27 diff --git a/tests/gdt/import/A4 b/tests/gdt/import/A4 index 8dff90ed4f..d40802f95c 100644 --- a/tests/gdt/import/A4 +++ b/tests/gdt/import/A4 @@ -414,9 +414,9 @@ set ref_data { 0:1:1:2:157 Shape.160 0:1:4:32 Dimension.160.1 ( N "diameter" T 15, V 20, VL 0.29999999999999999, VU 0.29999999999999999, P 0 ) 0:1:1:2:158 Shape.161 - 0:1:4:33 Dimension.161.1 ( N "angle" T 11, V 90, VL 1, VU 1, Q 3, P 0 ) + 0:1:4:33 Dimension.161.1 ( N "angle" T 11, V 90, VL 1, VU 1, AQ 3, P 0 ) 0:1:1:2:159 Shape.162 - 0:1:4:33 Dimension.162.1 ( N "angle" T 11, V 90, VL 1, VU 1, Q 3, P 0 ) + 0:1:4:33 Dimension.162.1 ( N "angle" T 11, V 90, VL 1, VU 1, AQ 3, P 0 ) 0:1:1:3:1 Shape.163 0:1:4:19 GeomTolerance.163.1 ( N "Position surface profile.4" T 12 TV 0, V 0.5 ) 0:1:4:20 Datum.163.1.1 ( N "Position surface profile.4" ) From 2b40ee81d1c5161cbfa79eb06421bdaa8499142c Mon Sep 17 00:00:00 2001 From: kgv Date: Wed, 10 Nov 2021 12:38:56 +0300 Subject: [PATCH 124/639] 0032654: Data Exchange - fix misprint in RWGltf_TriangulationReader::readDracoBuffer() Added missing break. Fixes reading of glTF files with Normal attributes preceding Position (and eliminates redundant / erroneous copy when Position attributes precede Normal). --- src/RWGltf/RWGltf_TriangulationReader.cxx | 1 + 1 file changed, 1 insertion(+) diff --git a/src/RWGltf/RWGltf_TriangulationReader.cxx b/src/RWGltf/RWGltf_TriangulationReader.cxx index 7d57656680..44dba18774 100644 --- a/src/RWGltf/RWGltf_TriangulationReader.cxx +++ b/src/RWGltf/RWGltf_TriangulationReader.cxx @@ -297,6 +297,7 @@ bool RWGltf_TriangulationReader::readDracoBuffer (const Handle(RWGltf_GltfLatePr myCoordSysConverter.TransformPosition (anXYZ.ChangeCoord()); setNodePosition (theDestMesh, THE_LOWER_NODE_INDEX + aVertIter, anXYZ); } + break; } case RWGltf_GltfArrayType_Normal: { From 57c5e9e8957bbcbaa2bd1ea5f8d489d17e3b3eca Mon Sep 17 00:00:00 2001 From: rkv Date: Thu, 11 Nov 2021 00:06:46 +0300 Subject: [PATCH 125/639] 0026171: Coding rules - eliminate -Wshorten-64-to-32 CLang warnings --- adm/cmake/occt_defs_flags.cmake | 3 ++ adm/qmake/OccCppConfig.pri | 4 ++ src/Bnd/Bnd_BoundSortBox.cxx | 36 ++++++------- src/Draw/Draw_Interpretor.cxx | 2 +- src/Draw/Draw_Viewer.cxx | 2 +- src/Draw/Draw_Window.cxx | 2 +- src/Draw/Draw_Window.hxx | 4 +- src/Draw/Draw_Window_1.mm | 4 +- src/FSD/FSD_BinaryFile.cxx | 34 +++++------- src/Font/Font_FTFont.cxx | 2 +- src/IntPatch/FILES | 1 - src/IntPatch/IntPatch_PrmPrmIntersection.cxx | 4 +- .../IntPatch_PrmPrmIntersection_T3Bits.cxx | 11 ++-- .../IntPatch_PrmPrmIntersection_T3Bits.hxx | 51 ++++++------------ .../IntPatch_PrmPrmIntersection_T3Bits.lxx | 30 ----------- src/NCollection/NCollection_CellFilter.hxx | 52 +++++++++++++------ src/NCollection/NCollection_UBTreeFiller.hxx | 14 +++-- src/NCollection/NCollection_UtfIterator.hxx | 28 +++++----- src/NCollection/NCollection_UtfIterator.lxx | 24 ++++----- src/OSD/OSD_Disk.cxx | 16 +++--- src/OSD/OSD_File.cxx | 6 +-- src/OSD/OSD_FileNode.cxx | 10 ++-- src/QABugs/QABugs_19.cxx | 2 +- src/QABugs/QABugs_20.cxx | 30 ++--------- src/RWObj/RWObj_Reader.cxx | 6 +-- src/Standard/Standard_Strtod.cxx | 22 ++++---- src/Standard/Standard_UUID.hxx | 21 +++----- src/StepSelect/StepSelect_WorkLibrary.cxx | 10 ++-- 28 files changed, 187 insertions(+), 244 deletions(-) delete mode 100644 src/IntPatch/IntPatch_PrmPrmIntersection_T3Bits.lxx diff --git a/adm/cmake/occt_defs_flags.cmake b/adm/cmake/occt_defs_flags.cmake index 200790c048..d1c8172bdd 100644 --- a/adm/cmake/occt_defs_flags.cmake +++ b/adm/cmake/occt_defs_flags.cmake @@ -115,6 +115,9 @@ if (MSVC) endif() elseif (CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX OR "${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra") + if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wshorten-64-to-32") + endif() if (BUILD_SHARED_LIBS) if (APPLE) set (CMAKE_SHARED_LINKER_FLAGS "-lm ${CMAKE_SHARED_LINKER_FLAGS}") diff --git a/adm/qmake/OccCppConfig.pri b/adm/qmake/OccCppConfig.pri index 07f0fdd00a..c9af8da42d 100644 --- a/adm/qmake/OccCppConfig.pri +++ b/adm/qmake/OccCppConfig.pri @@ -39,6 +39,10 @@ win32 { DEFINES += _SCL_SECURE_NO_WARNINGS } else { CONFIG += c++11 + clang { + QMAKE_CFLAGS_WARN_ON += -Wshorten-64-to-32 + QMAKE_CXXFLAGS_WARN_ON += -Wshorten-64-to-32 + } QMAKE_CFLAGS += -fexceptions QMAKE_CXXFLAGS += -fexceptions QMAKE_CXXFLAGS += -fvisibility=default diff --git a/src/Bnd/Bnd_BoundSortBox.cxx b/src/Bnd/Bnd_BoundSortBox.cxx index 497ab1dfed..a9f1fd8ffe 100644 --- a/src/Bnd/Bnd_BoundSortBox.cxx +++ b/src/Bnd/Bnd_BoundSortBox.cxx @@ -97,12 +97,12 @@ #define DIMAXIS 20 #if DEBUG -static long unsigned APPELREJECTION=0L; -static long unsigned REJECTNIV0=0L; -static long unsigned REJECTNIV1=0L; -static long unsigned NBCOMPARE=0L; -static long unsigned NBBOITES=0L; -static long unsigned NBBOITESATESTER=0L; +static unsigned int APPELREJECTION=0L; +static unsigned int REJECTNIV0=0L; +static unsigned int REJECTNIV1=0L; +static unsigned int NBCOMPARE=0L; +static unsigned int NBBOITES=0L; +static unsigned int NBBOITESATESTER=0L; #endif //======================================================================= static Standard_Integer ComputeSize(const Standard_Integer n) { @@ -113,7 +113,7 @@ static Standard_Integer ComputeSize(const Standard_Integer n) { return(8); } //======================================================================= -static long unsigned _P2[32] = { 1,2,4,8, 16,32,64,128, 256,512,1024,2048, +static unsigned int _P2[32] = { 1,2,4,8, 16,32,64,128, 256,512,1024,2048, 4096,8192,16384,32768, 65536,131072,262144,524288, 1048576,2097152,4194304,8388608, @@ -130,12 +130,12 @@ class BSB_T3Bits Standard_Integer _BASE; Standard_Integer _BASEM1; - long unsigned ind; - long unsigned Isize; + unsigned int ind; + unsigned int Isize; Standard_Integer ssize; Standard_Real Xmin,Xmax,Ymin,Ymax,Zmin,Zmax; - long unsigned *p; + unsigned int* p; Standard_Integer **axisX; Standard_Integer **axisY; Standard_Integer **axisZ; @@ -152,9 +152,9 @@ class BSB_T3Bits void AppendAxisY(const Standard_Integer i,const Standard_Integer v); void AppendAxisZ(const Standard_Integer i,const Standard_Integer v); - void Add(long unsigned t) { int o=t&31; int k=t>>5; p[k]|=_P2[o]; } - int Val(long unsigned t) { int o=t&31; int k=t>>5; return(p[k]&_P2[o]); } - void Raz(long unsigned t) { int o=t&31; int k=t>>5; p[k]&= ~(_P2[o]); } + void Add (unsigned int t) { int o=t&31; int k=t>>5; p[k]|=_P2[o]; } + int Val (unsigned int t) { int o=t&31; int k=t>>5; return(p[k]&_P2[o]); } + void Raz (unsigned int t) { int o=t&31; int k=t>>5; p[k]&= ~(_P2[o]); } Standard_Integer NbAxisX(const Standard_Integer i) { return(axisX[0][i]); } Standard_Integer NbAxisY(const Standard_Integer i) { return(axisY[0][i]); } @@ -220,10 +220,10 @@ BSB_T3Bits::BSB_T3Bits(int size) default : { _DECAL=3; _DECAL2= 6; _BASE= 8; _BASEM1= 7; break; } } Standard_Integer i ; - long unsigned nb = (size*size*size)>>5; + unsigned int nb = (size*size*size)>>5; Isize = nb; ssize = size; - p = new long unsigned [nb]; + p = new unsigned int[nb]; do { p[--nb]=0; } while(nb); axisX = (Standard_Integer **) malloc((size+1)*sizeof(Standard_Integer *)); @@ -457,7 +457,7 @@ void Bnd_BoundSortBox::SortBoxes() for (lacaseX=firstcaseX; lacaseX<=lastcaseX; lacaseX++) { for (lacaseY=firstcaseY; lacaseY<=lastcaseY; lacaseY++) { for (lacaseZ=firstcaseZ; lacaseZ<=lastcaseZ; lacaseZ++) { - long unsigned t=Map->GrilleInteger(lacaseX-1,lacaseY-1,lacaseZ-1); + unsigned int t = Map->GrilleInteger(lacaseX-1,lacaseY-1,lacaseZ-1); Map->Add(t); } } @@ -578,7 +578,7 @@ void Bnd_BoundSortBox::Add(const Bnd_Box& theBox, for (theGapX=firstGapX; theGapX<=lastGapX; theGapX++) { for (theGapY=firstGapY; theGapY<=lastGapY; theGapY++) { for (theGapZ=firstGapZ; theGapZ<=lastGapZ; theGapZ++) { - long unsigned t=Map->GrilleInteger(theGapX-1,theGapY-1,theGapZ-1); + unsigned int t = Map->GrilleInteger(theGapX-1,theGapY-1,theGapZ-1); Map->Add(t); } } @@ -668,7 +668,7 @@ const TColStd_ListOfInteger& Bnd_BoundSortBox::Compare (const Bnd_Box& theBox) for(Standard_Integer i=i0; touch==Standard_False && i<=i1;i++) { for(Standard_Integer j=j0; touch==Standard_False && j<=j1;j++) { for(Standard_Integer k=k0; touch==Standard_False && k<=k1;k++) { - long unsigned t=Map->GrilleInteger(i,j,k); + unsigned int t = Map->GrilleInteger(i,j,k); if(Map->Val(t)) { touch = Standard_True; } diff --git a/src/Draw/Draw_Interpretor.cxx b/src/Draw/Draw_Interpretor.cxx index a1aa0bf8d0..04f8370815 100644 --- a/src/Draw/Draw_Interpretor.cxx +++ b/src/Draw/Draw_Interpretor.cxx @@ -690,7 +690,7 @@ TCollection_AsciiString Draw_Interpretor::GetLog () char buffer[BUFSIZE + 1]; for (;;) { - int nbRead = read (myFDLog, buffer, BUFSIZE); + int nbRead = (int )read (myFDLog, buffer, BUFSIZE); if (nbRead <= 0) { break; diff --git a/src/Draw/Draw_Viewer.cxx b/src/Draw/Draw_Viewer.cxx index ac13ec60db..578729cc8b 100644 --- a/src/Draw/Draw_Viewer.cxx +++ b/src/Draw/Draw_Viewer.cxx @@ -1084,7 +1084,7 @@ void Draw_Viewer::Select (Standard_Integer& theId, theId = MAXVIEW; while (theId >= MAXVIEW) { - Standard_Integer aWindowNumber = 0; + long aWindowNumber = 0; Draw_Window::GetNextEvent (theToWait, aWindowNumber, theX, theY, theButton); if (theY < 0) { diff --git a/src/Draw/Draw_Window.cxx b/src/Draw/Draw_Window.cxx index 5b111edfe7..090fa69b5e 100644 --- a/src/Draw/Draw_Window.cxx +++ b/src/Draw/Draw_Window.cxx @@ -853,7 +853,7 @@ void Draw_Window::DrawString (Standard_Integer theX, Standard_Integer theY, } ReleaseDC (myWindow, hDC); #elif defined(HAVE_XLIB) - XDrawString (Draw_WindowDisplay, GetDrawable(), myBase->gc, theX, theY, (char* )theText, strlen(theText)); + XDrawString (Draw_WindowDisplay, GetDrawable(), myBase->gc, theX, theY, (char* )theText, (int )strlen(theText)); #else (void )theX; (void )theY; diff --git a/src/Draw/Draw_Window.hxx b/src/Draw/Draw_Window.hxx index 27eced584b..a7c767f04e 100644 --- a/src/Draw/Draw_Window.hxx +++ b/src/Draw/Draw_Window.hxx @@ -249,10 +249,10 @@ public: void Wait (Standard_Boolean theToWait = Standard_True); #elif defined(__APPLE__) - Standard_Boolean IsEqualWindows (const Standard_Integer& theWindowNumber); + Standard_Boolean IsEqualWindows (const long theWindowNumber); static void GetNextEvent (Standard_Boolean theWait, - Standard_Integer& theWindowNumber, + long& theWindowNumber, Standard_Integer& theX, Standard_Integer& theY, Standard_Integer& theButton); diff --git a/src/Draw/Draw_Window_1.mm b/src/Draw/Draw_Window_1.mm index 4758412470..b2a194ac2f 100644 --- a/src/Draw/Draw_Window_1.mm +++ b/src/Draw/Draw_Window_1.mm @@ -552,13 +552,13 @@ static Standard_Integer getScreenBottom() return isSuccess; } -Standard_Boolean Draw_Window::IsEqualWindows (const Standard_Integer& theWindowNumber) +Standard_Boolean Draw_Window::IsEqualWindows (const long theWindowNumber) { return ([myWindow windowNumber] == theWindowNumber); } void Draw_Window::GetNextEvent (Standard_Boolean theWait, - Standard_Integer& theWindowNumber, + long& theWindowNumber, Standard_Integer& theX, Standard_Integer& theY, Standard_Integer& theButton) diff --git a/src/FSD/FSD_BinaryFile.cxx b/src/FSD/FSD_BinaryFile.cxx index e28344ade0..d266956e4f 100644 --- a/src/FSD/FSD_BinaryFile.cxx +++ b/src/FSD/FSD_BinaryFile.cxx @@ -507,7 +507,7 @@ Storage_Error FSD_BinaryFile::BeginWriteInfoSection() myStream)) throw Storage_StreamWriteError(); - myHeader.binfo = ftell(myStream); + myHeader.binfo = (Standard_Integer )ftell(myStream); WriteHeader(); return Storage_VSOk; @@ -590,8 +590,7 @@ Standard_Integer FSD_BinaryFile::WriteInfo (Standard_OStream& Storage_Error FSD_BinaryFile::EndWriteInfoSection() { - myHeader.einfo = ftell(myStream); - + myHeader.einfo = (Standard_Integer )ftell(myStream); return Storage_VSOk; } @@ -602,7 +601,6 @@ Storage_Error FSD_BinaryFile::EndWriteInfoSection() Storage_Error FSD_BinaryFile::EndWriteInfoSection(Standard_OStream& theOStream) { myHeader.einfo = (Standard_Integer)theOStream.tellp(); - return Storage_VSOk; } @@ -795,7 +793,7 @@ Storage_Error FSD_BinaryFile::EndReadInfoSection() Storage_Error FSD_BinaryFile::BeginWriteCommentSection() { - myHeader.bcomment = ftell(myStream); + myHeader.bcomment = (Standard_Integer )ftell(myStream); return Storage_VSOk; } @@ -852,8 +850,7 @@ Standard_Integer FSD_BinaryFile::WriteComment (Standard_OStream& Storage_Error FSD_BinaryFile::EndWriteCommentSection() { - myHeader.ecomment = ftell(myStream); - + myHeader.ecomment = (Standard_Integer )ftell(myStream); return Storage_VSOk; } @@ -931,8 +928,7 @@ Storage_Error FSD_BinaryFile::EndReadCommentSection() Storage_Error FSD_BinaryFile::BeginWriteTypeSection() { - myHeader.btype = ftell(myStream); - + myHeader.btype = (Standard_Integer )ftell(myStream); return Storage_VSOk; } @@ -965,8 +961,7 @@ void FSD_BinaryFile::WriteTypeInformations(const Standard_Integer typeNum, Storage_Error FSD_BinaryFile::EndWriteTypeSection() { - myHeader.etype = ftell(myStream); - + myHeader.etype = (Standard_Integer )ftell(myStream); return Storage_VSOk; } @@ -1046,8 +1041,7 @@ Storage_Error FSD_BinaryFile::EndReadTypeSection() Storage_Error FSD_BinaryFile::BeginWriteRootSection() { - myHeader.broot = ftell(myStream); - + myHeader.broot = (Standard_Integer )ftell(myStream); return Storage_VSOk; } @@ -1080,8 +1074,7 @@ void FSD_BinaryFile::WriteRoot(const TCollection_AsciiString& rootName, const St Storage_Error FSD_BinaryFile::EndWriteRootSection() { - myHeader.eroot = ftell(myStream); - + myHeader.eroot = (Standard_Integer )ftell(myStream); return Storage_VSOk; } @@ -1163,8 +1156,7 @@ Storage_Error FSD_BinaryFile::EndReadRootSection() Storage_Error FSD_BinaryFile::BeginWriteRefSection() { - myHeader.bref = ftell(myStream); - + myHeader.bref = (Standard_Integer )ftell(myStream); return Storage_VSOk; } @@ -1196,8 +1188,7 @@ void FSD_BinaryFile::WriteReferenceType(const Standard_Integer reference,const S Storage_Error FSD_BinaryFile::EndWriteRefSection() { - myHeader.eref = ftell(myStream); - + myHeader.eref = (Standard_Integer )ftell(myStream); return Storage_VSOk; } @@ -1278,8 +1269,7 @@ Storage_Error FSD_BinaryFile::EndReadRefSection() Storage_Error FSD_BinaryFile::BeginWriteDataSection() { - myHeader.bdata = ftell(myStream); - + myHeader.bdata = (Standard_Integer )ftell(myStream); return Storage_VSOk; } @@ -1338,7 +1328,7 @@ void FSD_BinaryFile::EndWritePersistentObjectData() Storage_Error FSD_BinaryFile::EndWriteDataSection() { - myHeader.edata = ftell(myStream); + myHeader.edata = (Standard_Integer )ftell(myStream); fseek(myStream,myHeader.binfo,SEEK_SET); WriteHeader(); diff --git a/src/Font/Font_FTFont.cxx b/src/Font/Font_FTFont.cxx index 5ae9899f0a..bdd4f572f7 100755 --- a/src/Font/Font_FTFont.cxx +++ b/src/Font/Font_FTFont.cxx @@ -653,7 +653,7 @@ float Font_FTFont::AdvanceY (Standard_Utf32Char theUCharNext) const Standard_Integer Font_FTFont::GlyphsNumber (bool theToIncludeFallback) const { #ifdef HAVE_FREETYPE - Standard_Integer aNbGlyphs = myFTFace->num_glyphs; + Standard_Integer aNbGlyphs = (Standard_Integer )myFTFace->num_glyphs; if (theToIncludeFallback) { for (Standard_Integer aFontIter = 0; aFontIter < Font_UnicodeSubset_NB; ++aFontIter) diff --git a/src/IntPatch/FILES b/src/IntPatch/FILES index 1791573e82..725ea816b8 100755 --- a/src/IntPatch/FILES +++ b/src/IntPatch/FILES @@ -64,7 +64,6 @@ IntPatch_PrmPrmIntersection.hxx IntPatch_PrmPrmIntersection.lxx IntPatch_PrmPrmIntersection_T3Bits.cxx IntPatch_PrmPrmIntersection_T3Bits.hxx -IntPatch_PrmPrmIntersection_T3Bits.lxx IntPatch_RLine.cxx IntPatch_RLine.hxx IntPatch_RLine.lxx diff --git a/src/IntPatch/IntPatch_PrmPrmIntersection.cxx b/src/IntPatch/IntPatch_PrmPrmIntersection.cxx index 5a81a59c4c..3b328c07e6 100644 --- a/src/IntPatch/IntPatch_PrmPrmIntersection.cxx +++ b/src/IntPatch/IntPatch_PrmPrmIntersection.cxx @@ -3308,7 +3308,7 @@ void IntPatch_PrmPrmIntersection::PointDepart(Handle(IntSurf_LineOn2S)& LineOn2S for(si=-1; si<= 1 && nb IntPatch_PrmPrmIntersection_T3Bits::IntPatch_PrmPrmIntersection_T3Bits(const Standard_Integer size) @@ -23,12 +22,12 @@ IntPatch_PrmPrmIntersection_T3Bits::IntPatch_PrmPrmIntersection_T3Bits(const Sta Standard_Integer nb = (size*size*size)>>5; Isize = nb; p = new Standard_Integer [nb]; - do { ((Standard_Integer *) p)[--nb]=0; } while(nb); + do { p[--nb] = 0; } while(nb); } -void IntPatch_PrmPrmIntersection_T3Bits::Destroy() +IntPatch_PrmPrmIntersection_T3Bits::~IntPatch_PrmPrmIntersection_T3Bits() { - if(p) { delete[] ((Standard_Integer*)p); p=NULL; } + if (p) { delete[] p; p = NULL; } } void IntPatch_PrmPrmIntersection_T3Bits::ResetAnd() @@ -42,10 +41,10 @@ Standard_Integer IntPatch_PrmPrmIntersection_T3Bits::And(IntPatch_PrmPrmIntersec int k=indice>>5; while(k #include - - class IntPatch_PrmPrmIntersection_T3Bits { public: DEFINE_STANDARD_ALLOC - Standard_EXPORT IntPatch_PrmPrmIntersection_T3Bits(const Standard_Integer size); - - Standard_EXPORT void Destroy(); -~IntPatch_PrmPrmIntersection_T3Bits() -{ - Destroy(); -} - - void Add (const Standard_Integer t); - - Standard_Integer Val (const Standard_Integer t) const; - - void Raz (const Standard_Integer t); - - Standard_EXPORT void ResetAnd(); - - Standard_EXPORT Standard_Integer And (IntPatch_PrmPrmIntersection_T3Bits& Oth, Standard_Integer& indiceprecedent); - - + Standard_EXPORT ~IntPatch_PrmPrmIntersection_T3Bits(); -protected: - + void Add (const Standard_Integer t) + { + p[t>>5] |= (1<<(((unsigned int)t)&31)); + } + Standard_Integer Val (const Standard_Integer t) const + { + return (p[t>>5] & (1<<(((unsigned int)t)&31))); + } + void Raz (const Standard_Integer t) + { + p[t>>5] &= ~(1<<(((unsigned int)t)&31)); + } + Standard_EXPORT void ResetAnd(); + + Standard_EXPORT Standard_Integer And (IntPatch_PrmPrmIntersection_T3Bits& Oth, Standard_Integer& indiceprecedent); private: - - - Standard_Address p; + Standard_Integer* p; Standard_Integer Isize; - }; - -#include - - - - - #endif // _IntPatch_PrmPrmIntersection_T3Bits_HeaderFile diff --git a/src/IntPatch/IntPatch_PrmPrmIntersection_T3Bits.lxx b/src/IntPatch/IntPatch_PrmPrmIntersection_T3Bits.lxx deleted file mode 100644 index 75ab832e39..0000000000 --- a/src/IntPatch/IntPatch_PrmPrmIntersection_T3Bits.lxx +++ /dev/null @@ -1,30 +0,0 @@ -// Created on: 1999-12-16 -// Created by: Atelier CAS2000 -// Copyright (c) 1999-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. - -inline void IntPatch_PrmPrmIntersection_T3Bits::Add(const Standard_Integer t) -{ - ((Standard_Integer *) p)[t>>5] |= (1<<(((unsigned int)t)&31)); -} - -inline Standard_Integer IntPatch_PrmPrmIntersection_T3Bits::Val(const Standard_Integer t) const -{ - return (((Standard_Integer *) p)[t>>5] & (1<<(((unsigned int)t)&31))); -} - -inline void IntPatch_PrmPrmIntersection_T3Bits::Raz(const Standard_Integer t) -{ - ((Standard_Integer *) p)[t>>5] &= ~(1<<(((unsigned int)t)&31)); -} diff --git a/src/NCollection/NCollection_CellFilter.hxx b/src/NCollection/NCollection_CellFilter.hxx index 63d98d8e2c..856cccb91f 100644 --- a/src/NCollection/NCollection_CellFilter.hxx +++ b/src/NCollection/NCollection_CellFilter.hxx @@ -253,6 +253,9 @@ protected: ListNode *Next; }; + //! Cell index type. + typedef Standard_Integer Cell_IndexType; + /** * Auxiliary structure representing a cell in the space. * Cells are stored in the map, each cell contains list of objects @@ -270,14 +273,14 @@ protected: { for (int i = 0; i < theCellSize.Size(); i++) { - Standard_Real val = (Standard_Real)(Inspector::Coord(i, thePnt) / theCellSize(theCellSize.Lower() + i)); + Standard_Real aVal = (Standard_Real)(Inspector::Coord(i, thePnt) / theCellSize(theCellSize.Lower() + i)); //If the value of index is greater than //INT_MAX it is decreased correspondingly for the value of INT_MAX. If the value //of index is less than INT_MIN it is increased correspondingly for the absolute //value of INT_MIN. - index[i] = long((val > INT_MAX - 1) ? fmod(val, (Standard_Real) INT_MAX) - : (val < INT_MIN + 1) ? fmod(val, (Standard_Real) INT_MIN) - : val); + index[i] = Cell_IndexType((aVal > INT_MAX - 1) ? fmod(aVal, (Standard_Real) INT_MAX) + : (aVal < INT_MIN + 1) ? fmod(aVal, (Standard_Real) INT_MIN) + : aVal); } } @@ -324,19 +327,19 @@ protected: { // number of bits per each dimension in the hash code const std::size_t aDim = index.Size(); - const std::size_t aShiftBits = (BITS (long) - 1) / aDim; - unsigned int aCode = 0; + const std::size_t aShiftBits = (BITS (Cell_IndexType) - 1) / aDim; + std::size_t aCode = 0; for (std::size_t i = 0; i < aDim; ++i) { - aCode = (aCode << aShiftBits) ^ index[i]; + aCode = (aCode << aShiftBits) ^ std::size_t(index[i]); } return ::HashCode(aCode, theUpperBound); } public: - NCollection_LocalArray index; + NCollection_LocalArray index; ListNode *Objects; }; @@ -383,14 +386,19 @@ protected: const Cell& theCellMin, const Cell& theCellMax, const Target& theTarget) { - int start = theCellMin.index[idim]; - int end = theCellMax.index[idim]; - for (int i=start; i <= end; i++) { + const Cell_IndexType aStart = theCellMin.index[idim]; + const Cell_IndexType anEnd = theCellMax.index[idim]; + for (Cell_IndexType i = aStart; i <= anEnd; ++i) + { theCell.index[idim] = i; if ( idim ) // recurse + { iterateAdd (idim-1, theCell, theCellMin, theCellMax, theTarget); + } else // add to this cell + { add (theCell, theTarget); + } } } @@ -426,14 +434,19 @@ protected: const Cell& theCellMin, const Cell& theCellMax, const Target& theTarget) { - int start = theCellMin.index[idim]; - int end = theCellMax.index[idim]; - for (int i=start; i <= end; i++) { + const Cell_IndexType aStart = theCellMin.index[idim]; + const Cell_IndexType anEnd = theCellMax.index[idim]; + for (Cell_IndexType i = aStart; i <= anEnd; ++i) + { theCell.index[idim] = i; if ( idim ) // recurse + { iterateRemove (idim-1, theCell, theCellMin, theCellMax, theTarget); + } else // remove from this cell + { remove (theCell, theTarget); + } } } @@ -469,14 +482,19 @@ protected: const Cell& theCellMin, const Cell& theCellMax, Inspector& theInspector) { - int start = theCellMin.index[idim]; - int end = theCellMax.index[idim]; - for (int i=start; i <= end; i++) { + const Cell_IndexType aStart = theCellMin.index[idim]; + const Cell_IndexType anEnd = theCellMax.index[idim]; + for (Cell_IndexType i = aStart; i <= anEnd; ++i) + { theCell.index[idim] = i; if ( idim ) // recurse + { iterateInspect (idim-1, theCell, theCellMin, theCellMax, theInspector); + } else // inspect this cell + { inspect (theCell, theInspector); + } } } diff --git a/src/NCollection/NCollection_UBTreeFiller.hxx b/src/NCollection/NCollection_UBTreeFiller.hxx index 401d666f8f..2b616bc54d 100644 --- a/src/NCollection/NCollection_UBTreeFiller.hxx +++ b/src/NCollection/NCollection_UBTreeFiller.hxx @@ -145,21 +145,27 @@ Standard_Integer NCollection_UBTreeFiller::Fill () Standard_Integer i, nbAdd = mySeqPtr.Length(); // Fisher-Yates randomization if (myIsFullRandom) - for (i = nbAdd; i > 0; i--) { - unsigned int ind = myRandGen(); + { + for (i = nbAdd; i > 0; i--) + { + unsigned int ind = (unsigned int )myRandGen(); ind = ind % i; const ObjBnd& aObjBnd = mySeqPtr(ind); myTree.Add (aObjBnd.myObj, aObjBnd.myBnd); mySeqPtr(ind) = mySeqPtr(i-1); } + } else - for (i = nbAdd; i > 0; i--) { - unsigned int ind = myRandGen(); + { + for (i = nbAdd; i > 0; i--) + { + unsigned int ind = (unsigned int )myRandGen(); ind = i - (ind % i) - 1; const ObjBnd& aObjBnd = mySeqPtr(ind); myTree.Add (aObjBnd.myObj, aObjBnd.myBnd); mySeqPtr(ind) = mySeqPtr(i-1); } + } mySeqPtr.Clear(); return nbAdd; } diff --git a/src/NCollection/NCollection_UtfIterator.hxx b/src/NCollection/NCollection_UtfIterator.hxx index ec033a2492..3543639846 100755 --- a/src/NCollection/NCollection_UtfIterator.hxx +++ b/src/NCollection/NCollection_UtfIterator.hxx @@ -216,20 +216,20 @@ private: private: //! @name unicode magic numbers - static const unsigned char UTF8_BYTES_MINUS_ONE[256]; - static const unsigned long offsetsFromUTF8[6]; - static const unsigned char UTF8_FIRST_BYTE_MARK[7]; - static const unsigned long UTF8_BYTE_MASK; - static const unsigned long UTF8_BYTE_MARK; - static const unsigned long UTF16_SURROGATE_HIGH_START; - static const unsigned long UTF16_SURROGATE_HIGH_END; - static const unsigned long UTF16_SURROGATE_LOW_START; - static const unsigned long UTF16_SURROGATE_LOW_END; - static const unsigned long UTF16_SURROGATE_HIGH_SHIFT; - static const unsigned long UTF16_SURROGATE_LOW_BASE; - static const unsigned long UTF16_SURROGATE_LOW_MASK; - static const unsigned long UTF32_MAX_BMP; - static const unsigned long UTF32_MAX_LEGAL; + static const unsigned char UTF8_BYTES_MINUS_ONE[256]; + static const Standard_Utf32Char offsetsFromUTF8[6]; + static const unsigned char UTF8_FIRST_BYTE_MARK[7]; + static const Standard_Utf32Char UTF8_BYTE_MASK; + static const Standard_Utf32Char UTF8_BYTE_MARK; + static const Standard_Utf32Char UTF16_SURROGATE_HIGH_START; + static const Standard_Utf32Char UTF16_SURROGATE_HIGH_END; + static const Standard_Utf32Char UTF16_SURROGATE_LOW_START; + static const Standard_Utf32Char UTF16_SURROGATE_LOW_END; + static const Standard_Utf32Char UTF16_SURROGATE_HIGH_SHIFT; + static const Standard_Utf32Char UTF16_SURROGATE_LOW_BASE; + static const Standard_Utf32Char UTF16_SURROGATE_LOW_MASK; + static const Standard_Utf32Char UTF32_MAX_BMP; + static const Standard_Utf32Char UTF32_MAX_LEGAL; private: //! @name private fields diff --git a/src/NCollection/NCollection_UtfIterator.lxx b/src/NCollection/NCollection_UtfIterator.lxx index a3a2254768..3bee669fcc 100755 --- a/src/NCollection/NCollection_UtfIterator.lxx +++ b/src/NCollection/NCollection_UtfIterator.lxx @@ -54,7 +54,7 @@ const unsigned char NCollection_UtfIterator::UTF8_BYTES_MINUS_ONE[256] = //! This table contains as many values as there might be trailing bytes //! in a UTF-8 sequence. template -const unsigned long NCollection_UtfIterator::offsetsFromUTF8[6] = +const Standard_Utf32Char NCollection_UtfIterator::offsetsFromUTF8[6] = { 0x00000000UL, 0x00003080UL, 0x000E2080UL, 0x03C82080UL, 0xFA082080UL, 0x82082080UL @@ -95,17 +95,17 @@ inline void NCollection_UtfIterator::readUTF8() } // magic numbers -template const unsigned long NCollection_UtfIterator::UTF8_BYTE_MASK = 0xBF; -template const unsigned long NCollection_UtfIterator::UTF8_BYTE_MARK = 0x80; -template const unsigned long NCollection_UtfIterator::UTF16_SURROGATE_HIGH_START = 0xD800; -template const unsigned long NCollection_UtfIterator::UTF16_SURROGATE_HIGH_END = 0xDBFF; -template const unsigned long NCollection_UtfIterator::UTF16_SURROGATE_LOW_START = 0xDC00; -template const unsigned long NCollection_UtfIterator::UTF16_SURROGATE_LOW_END = 0xDFFF; -template const unsigned long NCollection_UtfIterator::UTF16_SURROGATE_HIGH_SHIFT = 10; -template const unsigned long NCollection_UtfIterator::UTF16_SURROGATE_LOW_BASE = 0x0010000UL; -template const unsigned long NCollection_UtfIterator::UTF16_SURROGATE_LOW_MASK = 0x3FFUL; -template const unsigned long NCollection_UtfIterator::UTF32_MAX_BMP = 0x0000FFFFUL; -template const unsigned long NCollection_UtfIterator::UTF32_MAX_LEGAL = 0x0010FFFFUL; +template const Standard_Utf32Char NCollection_UtfIterator::UTF8_BYTE_MASK = 0xBF; +template const Standard_Utf32Char NCollection_UtfIterator::UTF8_BYTE_MARK = 0x80; +template const Standard_Utf32Char NCollection_UtfIterator::UTF16_SURROGATE_HIGH_START = 0xD800; +template const Standard_Utf32Char NCollection_UtfIterator::UTF16_SURROGATE_HIGH_END = 0xDBFF; +template const Standard_Utf32Char NCollection_UtfIterator::UTF16_SURROGATE_LOW_START = 0xDC00; +template const Standard_Utf32Char NCollection_UtfIterator::UTF16_SURROGATE_LOW_END = 0xDFFF; +template const Standard_Utf32Char NCollection_UtfIterator::UTF16_SURROGATE_HIGH_SHIFT = 10; +template const Standard_Utf32Char NCollection_UtfIterator::UTF16_SURROGATE_LOW_BASE = 0x0010000UL; +template const Standard_Utf32Char NCollection_UtfIterator::UTF16_SURROGATE_LOW_MASK = 0x3FFUL; +template const Standard_Utf32Char NCollection_UtfIterator::UTF32_MAX_BMP = 0x0000FFFFUL; +template const Standard_Utf32Char NCollection_UtfIterator::UTF32_MAX_LEGAL = 0x0010FFFFUL; // ======================================================================= // function : readUTF16 diff --git a/src/OSD/OSD_Disk.cxx b/src/OSD/OSD_Disk.cxx index ef37014bf8..ab779b9e59 100644 --- a/src/OSD/OSD_Disk.cxx +++ b/src/OSD/OSD_Disk.cxx @@ -187,11 +187,11 @@ Standard_Integer OSD_Disk::DiskSize() ULONGLONG aSize = aNbTotalBytes.QuadPart / 512; return (Standard_Integer )aSize; // may be an overflow #else - struct statvfs buffer; - if (statvfs (myDiskName.ToCString(), &buffer) == 0) + struct statvfs aBuffer; + if (statvfs (myDiskName.ToCString(), &aBuffer) == 0) { - int BSize512 = buffer.f_frsize / 512; - return buffer.f_blocks * BSize512; + unsigned long aBSize512 = aBuffer.f_frsize / 512; + return Standard_Integer(aBuffer.f_blocks * aBSize512); } myError.SetValue (errno, Iam, "OSD_Disk: statvfs failed."); return 0; @@ -219,11 +219,11 @@ Standard_Integer OSD_Disk::DiskFree() ULONGLONG aSize = aNbFreeAvailableBytes.QuadPart / 512; return (Standard_Integer )aSize; // may be an overflow #else - struct statvfs buffer; - if (statvfs (myDiskName.ToCString(), &buffer) == 0) + struct statvfs aBuffer; + if (statvfs (myDiskName.ToCString(), &aBuffer) == 0) { - int BSize512 = buffer.f_frsize / 512; - return buffer.f_bavail * BSize512; + unsigned long aBSize512 = aBuffer.f_frsize / 512; + return Standard_Integer(aBuffer.f_bavail * aBSize512); } myError.SetValue (errno, Iam, "OSD_Disk: statvfs failed."); return 0; diff --git a/src/OSD/OSD_File.cxx b/src/OSD/OSD_File.cxx index b8c0abc43b..967a7c7e7d 100644 --- a/src/OSD/OSD_File.cxx +++ b/src/OSD/OSD_File.cxx @@ -782,7 +782,7 @@ void OSD_File::Read (TCollection_AsciiString& theBuffer, #ifdef _WIN32 Read (&aBuffer.ChangeFirst(), theNbBytes, aNbBytesRead); #else - aNbBytesRead = read (myFileChannel, &aBuffer.ChangeFirst(), theNbBytes); + aNbBytesRead = (Standard_Integer )read (myFileChannel, &aBuffer.ChangeFirst(), theNbBytes); if (aNbBytesRead == -1) { aNbBytesRead = 0; @@ -1078,7 +1078,7 @@ void OSD_File::Read (const Standard_Address theBuffer, theNbReadBytes = (Standard_Integer )aNbReadBytes; #else theNbReadBytes = 0; - int aNbReadBytes = read (myFileChannel, (char* )theBuffer, theNbBytes); + int aNbReadBytes = (Standard_Integer )read (myFileChannel, (char* )theBuffer, theNbBytes); if (aNbReadBytes == -1) { myError.SetValue (errno, Iam, "Read"); @@ -1131,7 +1131,7 @@ void OSD_File::Write (const Standard_Address theBuffer, _osd_wnt_set_error (myError, OSD_WFile); } #else - const int aNbWritten = write (myFileChannel, (const char* )theBuffer, theNbBytes); + const int aNbWritten = (Standard_Integer )write (myFileChannel, (const char* )theBuffer, theNbBytes); if (aNbWritten == -1) { myError.SetValue (errno, Iam, "Write"); diff --git a/src/OSD/OSD_FileNode.cxx b/src/OSD/OSD_FileNode.cxx index 352d24e606..66ff85a1ac 100644 --- a/src/OSD/OSD_FileNode.cxx +++ b/src/OSD/OSD_FileNode.cxx @@ -183,11 +183,15 @@ int static copy_file( const char* src, const char* trg ) const int BUFSIZE=4096; char buf[BUFSIZE]; int n=0; - while ( ( n = read ( fds, buf, BUFSIZE )) >0 ) + while ((n = (int )read (fds, buf, BUFSIZE)) > 0) { - if ( write ( fdo, buf, n ) != n ) { // writing error - if ( ! errno ) + if ( write ( fdo, buf, n ) != n ) + { + // writing error + if (!errno) + { errno = ENOSPC; + } break; } } diff --git a/src/QABugs/QABugs_19.cxx b/src/QABugs/QABugs_19.cxx index cf168485bd..5a7648de1e 100644 --- a/src/QABugs/QABugs_19.cxx +++ b/src/QABugs/QABugs_19.cxx @@ -1368,7 +1368,7 @@ static Standard_Integer OCC24137 (Draw_Interpretor& theDI, Standard_Integer theN const TopoDS_Shape aShapeV = DBRep::Get (aVertName); const Standard_Real aUFrom = Atof (theArgv[anArgIter++]); const Standard_Real aVFrom = Atof (theArgv[anArgIter++]); - const Standard_Integer aNbIts = (anArgIter < theNArg) ? atol (theArgv[anArgIter++]) : 100; + const Standard_Integer aNbIts = (anArgIter < theNArg) ? Draw::Atoi (theArgv[anArgIter++]) : 100; if (aShapeF.IsNull() || aShapeF.ShapeType() != TopAbs_FACE) { std::cout << "Error: " << aFaceName << " shape is null / not a face" << std::endl; diff --git a/src/QABugs/QABugs_20.cxx b/src/QABugs/QABugs_20.cxx index d6dfa3974a..227b295fe2 100644 --- a/src/QABugs/QABugs_20.cxx +++ b/src/QABugs/QABugs_20.cxx @@ -3104,6 +3104,7 @@ static Standard_Integer OCC30391(Draw_Interpretor& theDI, #include #include #include +#include #include #include typedef NCollection_Sequence SequenceOfDocNames; @@ -3193,31 +3194,6 @@ void* threadFunction(void* theArgs) return args->res; } -int getNumCores() -{ -#ifdef WIN32 - SYSTEM_INFO sysinfo; - GetSystemInfo(&sysinfo); - return sysinfo.dwNumberOfProcessors; -#elif MACOS - int nm[2]; - size_t len = 4; - uint32_t count; - - nm[0] = CTL_HW; nm[1] = HW_AVAILCPU; - sysctl(nm, 2, &count, &len, NULL, 0); - - if (count < 1) { - nm[1] = HW_NCPU; - sysctl(nm, 2, &count, &len, NULL, 0); - if (count < 1) { count = 1; } - } - return count; -#else - return sysconf(_SC_NPROCESSORS_ONLN); -#endif -} - //======================================================================= //function : OCC29195 //purpose : @@ -3231,7 +3207,7 @@ static Standard_Integer OCC29195(Draw_Interpretor&, Standard_Integer theArgC, co std::cout << "\ndocN - names (5 in each group) of OCAF documents names (3 input files, 2 output)\n" << std::endl; return 1; } - int iThread(0), nbThreads(0), off(0); + int iThread(0), off(0); if (TCollection_AsciiString(theArgV[1]).IsIntegerValue()) { nbREP = TCollection_AsciiString(theArgV[1]).IntegerValue(); @@ -3243,7 +3219,7 @@ static Standard_Integer OCC29195(Draw_Interpretor&, Standard_Integer theArgC, co return 0; } Standard_Integer aNbFiles = (theArgC - off - 1) / 5; - nbThreads = getNumCores(); + int nbThreads = OSD_Parallel::NbLogicalProcessors(); if (aNbFiles < nbThreads) { nbThreads = aNbFiles; diff --git a/src/RWObj/RWObj_Reader.cxx b/src/RWObj/RWObj_Reader.cxx index 1b7c61f201..331e100598 100644 --- a/src/RWObj/RWObj_Reader.cxx +++ b/src/RWObj/RWObj_Reader.cxx @@ -329,7 +329,7 @@ void RWObj_Reader::pushIndices (const char* thePos) for (Standard_Integer aNode = 0;; ++aNode) { Graphic3d_Vec3i a3Indices (-1, -1, -1); - a3Indices[0] = strtol (thePos, &aNext, 10) - 1; + a3Indices[0] = int(strtol (thePos, &aNext, 10) - 1); if (aNext == thePos) { break; @@ -340,14 +340,14 @@ void RWObj_Reader::pushIndices (const char* thePos) if (*thePos == '/') { ++thePos; - a3Indices[1] = strtol (thePos, &aNext, 10) - 1; + a3Indices[1] = int(strtol (thePos, &aNext, 10) - 1); thePos = aNext; // parse Normal index if (*thePos == '/') { ++thePos; - a3Indices[2] = strtol (thePos, &aNext, 10) - 1; + a3Indices[2] = int(strtol (thePos, &aNext, 10) - 1); thePos = aNext; } } diff --git a/src/Standard/Standard_Strtod.cxx b/src/Standard/Standard_Strtod.cxx index 002ee6826f..0189619256 100644 --- a/src/Standard/Standard_Strtod.cxx +++ b/src/Standard/Standard_Strtod.cxx @@ -1720,7 +1720,7 @@ multadd(Bigint *b, int m, int a MTd) /* multiply by m and add a */ Bfree(b MTa); b = b1; } - b->x[wds++] = carry; + b->x[wds++] = (ULong )carry; b->wds = wds; } return b; @@ -1889,7 +1889,7 @@ mult(Bigint *a, Bigint *b MTd) *xc++ = z & FFFFFFFF; } while(x < xae); - *xc = carry; + *xc = (ULong )carry; } } #else @@ -2704,7 +2704,7 @@ rshift(Bigint *b, int k) while(x < xe) *x1++ = *x++; } - if ((b->wds = x1 - b->x) == 0) + if ((b->wds = int(x1 - b->x)) == 0) b->x[0] = 0; } @@ -2913,7 +2913,7 @@ gethex( const char **sp, U *rvp, int rounding, int sign MTd) word1(rvp) = Big1; return; } - n = s1 - s0 - 1; + n = int(s1 - s0 - 1); for(k = 0; n > (1 << (kshift-2)) - 1; n >>= 1) k++; b = Balloc(k MTa); @@ -2942,7 +2942,7 @@ gethex( const char **sp, U *rvp, int rounding, int sign MTd) n += 4; } *x++ = L; - b->wds = n = x - b->x; + b->wds = n = int(x - b->x); n = ULbits*n - hi0bits(L); nbits = Nbits; lostbits = 0; @@ -3559,7 +3559,7 @@ Strtod(const char *s00, char **se) z = 10*z + c - '0'; #endif nd0 = nd; - bc.dp0 = bc.dp1 = s - s0; + bc.dp0 = bc.dp1 = int(s - s0); for(s1 = s; s1 > s0 && *--s1 == '0'; ) ++nz1; #ifdef USE_LOCALE @@ -3583,13 +3583,13 @@ Strtod(const char *s00, char **se) #endif if (c == '.') { c = *++s; - bc.dp1 = s - s0; + bc.dp1 = int(s - s0); bc.dplen = bc.dp1 - bc.dp0; if (!nd) { for(; c == '0'; c = *++s) nz++; if (c > '0' && c <= '9') { - bc.dp0 = s0 - s; + bc.dp0 = int(s0 - s); bc.dp1 = bc.dp0 + bc.dplen; s0 = s; nf += nz; @@ -4126,14 +4126,14 @@ Strtod(const char *s00, char **se) yz /= 10; e1 += 1; } - y = yz / 100000000; + y = ULong(yz / 100000000); } else if (nd > 9) { i = nd - 9; - y = (yz >> i) / pfive[i-1]; + y = ULong((yz >> i) / pfive[i-1]); } else - y = yz; + y = ULong(yz); dval(&rv) = yz; #endif /*}*/ diff --git a/src/Standard/Standard_UUID.hxx b/src/Standard/Standard_UUID.hxx index 9a863ec4c7..56212480d9 100644 --- a/src/Standard/Standard_UUID.hxx +++ b/src/Standard/Standard_UUID.hxx @@ -17,19 +17,12 @@ #include -#ifdef _WIN32 -#include -#else -typedef struct { - unsigned long Data1 ; - unsigned short Data2 ; - unsigned short Data3 ; - unsigned char Data4[8] ; -} GUID ; -#endif - -typedef GUID Standard_UUID ; +struct Standard_UUID +{ + uint32_t Data1; + uint16_t Data2; + uint16_t Data3; + uint8_t Data4[8]; +}; #endif - - diff --git a/src/StepSelect/StepSelect_WorkLibrary.cxx b/src/StepSelect/StepSelect_WorkLibrary.cxx index 4d9f58934a..a7a99ded57 100644 --- a/src/StepSelect/StepSelect_WorkLibrary.cxx +++ b/src/StepSelect/StepSelect_WorkLibrary.cxx @@ -67,13 +67,12 @@ Standard_Integer StepSelect_WorkLibrary::ReadFile Handle(Interface_InterfaceModel)& model, const Handle(Interface_Protocol)& protocol) const { - long status = 1; DeclareAndCast(StepData_Protocol,stepro,protocol); if (stepro.IsNull()) return 1; Handle(StepData_StepModel) stepmodel = new StepData_StepModel; model = stepmodel; - status = StepFile_Read(name, 0, stepmodel, stepro); - return status; + Standard_Integer aStatus = StepFile_Read(name, 0, stepmodel, stepro); + return aStatus; } Standard_Integer StepSelect_WorkLibrary::ReadStream (const Standard_CString theName, @@ -81,13 +80,12 @@ Standard_Integer StepSelect_WorkLibrary::ReadStream (const Standard_CString the Handle(Interface_InterfaceModel)& model, const Handle(Interface_Protocol)& protocol) const { - long status = 1; DeclareAndCast(StepData_Protocol, stepro, protocol); if (stepro.IsNull()) return 1; Handle(StepData_StepModel) stepmodel = new StepData_StepModel; model = stepmodel; - status = StepFile_Read(theName, &theIStream, stepmodel, stepro); - return status; + Standard_Integer aStatus = StepFile_Read(theName, &theIStream, stepmodel, stepro); + return aStatus; } From 97e80b8c3060e8bfc62b714c66b0ad9390996d74 Mon Sep 17 00:00:00 2001 From: Xu Zhongxing Date: Thu, 4 Nov 2021 13:15:49 +0800 Subject: [PATCH 126/639] 0032649: Bug in BRepLib::EnsureNormalConsistency() Fix a typo in variable name. --- src/BRepLib/BRepLib.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/BRepLib/BRepLib.cxx b/src/BRepLib/BRepLib.cxx index 18733f8563..d89ecb4c1f 100644 --- a/src/BRepLib/BRepLib.cxx +++ b/src/BRepLib/BRepLib.cxx @@ -2423,7 +2423,7 @@ Standard_Boolean BRepLib:: gp_Vec3f aNorm1f, aNorm2f; aPT1->Normal (aFNodF1, aNorm1f); - aPT1->Normal (aFNodF2, aNorm2f); + aPT2->Normal (aFNodF2, aNorm2f); const gp_XYZ aNorm1 (aNorm1f.x(), aNorm1f.y(), aNorm1f.z()); const gp_XYZ aNorm2 (aNorm2f.x(), aNorm2f.y(), aNorm2f.z()); const Standard_Real aDot = aNorm1 * aNorm2; From 6eddc284105acd7be7741d4b3259f54b15537399 Mon Sep 17 00:00:00 2001 From: kgv Date: Fri, 12 Nov 2021 10:59:18 +0300 Subject: [PATCH 127/639] 0032658: Documentation - add missing GLFW sample to dox/samples/samples.md --- dox/FILES_HTML.txt | 1 + dox/samples/samples.md | 3 +++ samples/glfw/readme.md | 6 ++++++ 3 files changed, 10 insertions(+) diff --git a/dox/FILES_HTML.txt b/dox/FILES_HTML.txt index 76f5ea1614..d8c8a633a8 100644 --- a/dox/FILES_HTML.txt +++ b/dox/FILES_HTML.txt @@ -18,6 +18,7 @@ samples/samples.md ../samples/java/jniviewer/ReadMe.md ../samples/ios/UIKitSample/ReadMe.md ../samples/webgl/ReadMe.md +../samples/glfw/readme.md samples/ocaf.md samples/ocaf_func.md samples/draw_scripts.md diff --git a/dox/samples/samples.md b/dox/samples/samples.md index bc0a40e1e1..bdd0a80e5e 100644 --- a/dox/samples/samples.md +++ b/dox/samples/samples.md @@ -35,6 +35,8 @@
3D Viewer sample with CAD import for Android mobile platform based on Android SDK and JNI layer. * @ref occt_samples_ios_uikit
3D Viewer sample for iOS platform based on Apple **UIKit** framework. + * @ref occt_samples_glfw +
A cross-platform 3D Viewer sample using **GLFW** library. @page samples__tutorials Tutorials and Demos - @subpage samples__novice_guide @@ -54,3 +56,4 @@ - @subpage occt_samples_webgl - @subpage samples_java_android_occt - @subpage occt_samples_ios_uikit +- @subpage occt_samples_glfw diff --git a/samples/glfw/readme.md b/samples/glfw/readme.md index 39c1cef651..bb656cd417 100644 --- a/samples/glfw/readme.md +++ b/samples/glfw/readme.md @@ -1,4 +1,10 @@ +GLFW: 3D Viewer (C++|GLFW) {#occt_samples_glfw} +================== + A sample demonstrating usage of OCCT 3D Viewer within a window created using GLFW. +Use CMake to build the sample. + Platforms: Windows, macOS, Linux + Required: glfw From 0ffecc2fc71775bdeec5c70fc931906dce82328b Mon Sep 17 00:00:00 2001 From: akaftasev Date: Thu, 28 Oct 2021 19:23:37 +0300 Subject: [PATCH 128/639] 0032448: Modeling Algorithms - Provide exact validating (as option) using GeomLib_CheckCurveOnSurface Add '-exact' option to checkshape command to use exact method to validate edges using BRepLib_ValidateEdge class. Default mode is calculating in finite number of points. --- dox/upgrade/upgrade.md | 19 +++++++ .../draw_test_harness/draw_test_harness.md | 3 +- src/BRepCheck/BRepCheck_Analyzer.cxx | 19 +++---- src/BRepCheck/BRepCheck_Analyzer.hxx | 45 ++++++++++++--- src/BRepCheck/BRepCheck_Edge.cxx | 8 +++ src/BRepCheck/BRepCheck_Edge.hxx | 18 +++++- src/BRepLib/BRepLib_CheckCurveOnSurface.cxx | 13 +++-- src/BRepLib/BRepLib_CheckCurveOnSurface.hxx | 25 +++++++-- src/BRepLib/BRepLib_ValidateEdge.cxx | 38 ++++++++++++- src/BRepLib/BRepLib_ValidateEdge.hxx | 56 ++++++++++++++++--- src/BRepTest/BRepTest_CheckCommands.cxx | 22 +++++--- src/GeomLib/GeomLib_CheckCurveOnSurface.cxx | 11 ++-- src/GeomLib/GeomLib_CheckCurveOnSurface.hxx | 16 +++++- src/IntTools/IntTools_Tools.cxx | 3 +- tests/heal/begin | 4 +- tests/heal/checkshape/bug27814_10 | 4 +- tests/heal/checkshape/bug27814_11 | 4 +- tests/heal/checkshape/bug32448_1 | 8 +++ tests/heal/checkshape/bug32448_10 | 8 +++ tests/heal/checkshape/bug32448_2 | 7 +++ tests/heal/checkshape/bug32448_3 | 8 +++ tests/heal/checkshape/bug32448_4 | 7 +++ tests/heal/checkshape/bug32448_5 | 8 +++ tests/heal/checkshape/bug32448_6 | 8 +++ tests/heal/checkshape/bug32448_7 | 8 +++ tests/heal/checkshape/bug32448_8 | 8 +++ tests/heal/checkshape/bug32448_9 | 8 +++ 27 files changed, 324 insertions(+), 62 deletions(-) create mode 100644 tests/heal/checkshape/bug32448_1 create mode 100644 tests/heal/checkshape/bug32448_10 create mode 100644 tests/heal/checkshape/bug32448_2 create mode 100644 tests/heal/checkshape/bug32448_3 create mode 100644 tests/heal/checkshape/bug32448_4 create mode 100644 tests/heal/checkshape/bug32448_5 create mode 100644 tests/heal/checkshape/bug32448_6 create mode 100644 tests/heal/checkshape/bug32448_7 create mode 100644 tests/heal/checkshape/bug32448_8 create mode 100644 tests/heal/checkshape/bug32448_9 diff --git a/dox/upgrade/upgrade.md b/dox/upgrade/upgrade.md index 96765a2015..ffa19e9390 100644 --- a/dox/upgrade/upgrade.md +++ b/dox/upgrade/upgrade.md @@ -2293,3 +2293,22 @@ void Perform(const Handle(Adaptor3d_CurveOnSurface)& theCurveOnSurface, - *BRepAlgo_Cut* - *BRepAlgo_Section* The corresponding classes from the *BRepAlgoAPI* package have to be used instead. + +@section upgrade_occt770 Upgrade to OCCT 7.7.0 + +@subsection upgrade_occt770_parallel_flag_removed Removed parameter theIsParallel from Put/Compute/Perform + +theIsParallel parameter has been removed from Put/Compute/Perform from the next classes: + - BRepCheck_Analyzer + - BRepCheck_Edge + - BRepLib_ValidateEdge + - GeomLib_CheckCurveOnSurface + - BRepLib_CheckCurveOnSurface + +Now, to set this flag, it is necessary to use method SetParallel() +For example: +~~~~{.cpp} +BRepLib_ValidateEdge aValidateEdge(myHCurve, ACS, SameParameter); +aValidateEdge.SetParallel(toRunParallel); +aValidateEdge.Process(); +~~~~ \ No newline at end of file diff --git a/dox/user_guides/draw_test_harness/draw_test_harness.md b/dox/user_guides/draw_test_harness/draw_test_harness.md index 33ca38fc0b..bac7316783 100644 --- a/dox/user_guides/draw_test_harness/draw_test_harness.md +++ b/dox/user_guides/draw_test_harness/draw_test_harness.md @@ -7545,7 +7545,7 @@ xdistc2dc2dss c2d1_1 c2d2_1 s1 s2 0 1 1000 Syntax: ~~~~{.php} -checkshape [-top] shape [result] [-short] [-parallel] +checkshape [-top] shape [result] [-short] [-parallel] [-exact] ~~~~ Where: @@ -7554,6 +7554,7 @@ Where: * *result* -- optional parameter, defines custom prefix for the output shape names. * *short* -- a short description of the check. * *parallel* -- run check in multithread mode. +* *exact* -- run check using exact method. **checkshape** examines the selected object for topological and geometric coherence. The object should be a three dimensional shape. diff --git a/src/BRepCheck/BRepCheck_Analyzer.cxx b/src/BRepCheck/BRepCheck_Analyzer.cxx index 1e777665ce..67ca44e664 100644 --- a/src/BRepCheck/BRepCheck_Analyzer.cxx +++ b/src/BRepCheck/BRepCheck_Analyzer.cxx @@ -346,8 +346,7 @@ class BRepCheck_ParallelAnalyzer //purpose : //======================================================================= void BRepCheck_Analyzer::Init (const TopoDS_Shape& theShape, - const Standard_Boolean B, - const Standard_Boolean theIsParallel) + const Standard_Boolean B) { if (theShape.IsNull()) { @@ -356,8 +355,8 @@ void BRepCheck_Analyzer::Init (const TopoDS_Shape& theShape, myShape = theShape; myMap.Clear(); - Put (theShape, B, theIsParallel); - Perform (theIsParallel); + Put (theShape, B); + Perform(); } //======================================================================= @@ -365,8 +364,7 @@ void BRepCheck_Analyzer::Init (const TopoDS_Shape& theShape, //purpose : //======================================================================= void BRepCheck_Analyzer::Put (const TopoDS_Shape& theShape, - const Standard_Boolean B, - const Standard_Boolean theIsParallel) + const Standard_Boolean B) { if (myMap.Contains (theShape)) { @@ -382,6 +380,7 @@ void BRepCheck_Analyzer::Put (const TopoDS_Shape& theShape, case TopAbs_EDGE: HR = new BRepCheck_Edge (TopoDS::Edge (theShape)); Handle(BRepCheck_Edge)::DownCast(HR)->GeometricControls (B); + Handle(BRepCheck_Edge)::DownCast(HR)->SetExactMethod(myIsExact); break; case TopAbs_WIRE: HR = new BRepCheck_Wire (TopoDS::Wire (theShape)); @@ -406,13 +405,13 @@ void BRepCheck_Analyzer::Put (const TopoDS_Shape& theShape, if (!HR.IsNull()) { - HR->SetParallel (theIsParallel); + HR->SetParallel (myIsParallel); } myMap.Add (theShape, HR); for (TopoDS_Iterator theIterator (theShape); theIterator.More(); theIterator.Next()) { - Put (theIterator.Value(), B, theIsParallel); // performs minimum on each shape + Put (theIterator.Value(), B); // performs minimum on each shape } } @@ -420,7 +419,7 @@ void BRepCheck_Analyzer::Put (const TopoDS_Shape& theShape, //function : Perform //purpose : //======================================================================= -void BRepCheck_Analyzer::Perform (Standard_Boolean theIsParallel) +void BRepCheck_Analyzer::Perform() { const Standard_Integer aMapSize = myMap.Size(); const Standard_Integer aMinTaskSize = 10; @@ -453,7 +452,7 @@ void BRepCheck_Analyzer::Perform (Standard_Boolean theIsParallel) } BRepCheck_ParallelAnalyzer aParallelAnalyzer (aArrayOfArray, myMap); - OSD_Parallel::For (0, aArrayOfArray.Size(), aParallelAnalyzer, !theIsParallel); + OSD_Parallel::For (0, aArrayOfArray.Size(), aParallelAnalyzer, !myIsParallel); } //======================================================================= diff --git a/src/BRepCheck/BRepCheck_Analyzer.hxx b/src/BRepCheck/BRepCheck_Analyzer.hxx index f604214fa9..1f549fab5d 100644 --- a/src/BRepCheck/BRepCheck_Analyzer.hxx +++ b/src/BRepCheck/BRepCheck_Analyzer.hxx @@ -59,9 +59,12 @@ public: //! BRepCheck_SelfIntersectingWire BRepCheck_Analyzer (const TopoDS_Shape& S, const Standard_Boolean GeomControls = Standard_True, - const Standard_Boolean theIsParallel = Standard_False) + const Standard_Boolean theIsParallel = Standard_False, + const Standard_Boolean theIsExact = Standard_False) + : myIsParallel(theIsParallel), + myIsExact(theIsExact) { - Init (S, GeomControls, theIsParallel); + Init (S, GeomControls); } //! is the shape to control. If @@ -81,8 +84,35 @@ public: //! For a wire : //! BRepCheck_SelfIntersectingWire Standard_EXPORT void Init (const TopoDS_Shape& S, - const Standard_Boolean GeomControls = Standard_True, - const Standard_Boolean theIsParallel = Standard_False); + const Standard_Boolean GeomControls = Standard_True); + + //! Sets method to calculate distance: Calculating in finite number of points (if theIsExact + //! is false, faster, but possible not correct result) or exact calculating by using + //! BRepLib_CheckCurveOnSurface class (if theIsExact is true, slowly, but more correctly). + //! Exact method is used only when edge is SameParameter. + //! Default method is calculating in finite number of points + void SetExactMethod(const Standard_Boolean theIsExact) + { + myIsExact = theIsExact; + } + + //! Returns true if exact method selected + Standard_Boolean IsExactMethod() + { + return myIsExact; + } + + //! Sets parallel flag + void SetParallel(const Standard_Boolean theIsParallel) + { + myIsParallel = theIsParallel; + } + + //! Returns true if parallel flag is set + Standard_Boolean IsParallel() + { + return myIsParallel; + } //! is a subshape of the original shape. Returns //! if no default has been detected on @@ -141,10 +171,9 @@ public: private: Standard_EXPORT void Put (const TopoDS_Shape& S, - const Standard_Boolean Gctrl, - const Standard_Boolean theIsParallel); + const Standard_Boolean Gctrl); - Standard_EXPORT void Perform (Standard_Boolean theIsParallel); + Standard_EXPORT void Perform(); Standard_EXPORT Standard_Boolean ValidSub (const TopoDS_Shape& S, const TopAbs_ShapeEnum SubType) const; @@ -152,6 +181,8 @@ private: TopoDS_Shape myShape; BRepCheck_IndexedDataMapOfShapeResult myMap; + Standard_Boolean myIsParallel; + Standard_Boolean myIsExact; }; diff --git a/src/BRepCheck/BRepCheck_Edge.cxx b/src/BRepCheck/BRepCheck_Edge.cxx index 48c3b8c56e..4e5cd6ca22 100644 --- a/src/BRepCheck/BRepCheck_Edge.cxx +++ b/src/BRepCheck/BRepCheck_Edge.cxx @@ -75,6 +75,7 @@ BRepCheck_Edge::BRepCheck_Edge(const TopoDS_Edge& E) { Init(E); myGctrl = Standard_True; + myIsExactMethod = Standard_False; } //======================================================================= @@ -321,6 +322,7 @@ void BRepCheck_Edge::InContext(const TopoDS_Shape& S) BRep_ListIteratorOfListOfCurveRepresentation itcr(TE->Curves()); Standard_Real eps = Precision::PConfusion(); + Standard_Boolean toRunParallel = !myMutex.IsNull(); while (itcr.More()) { const Handle(BRep_CurveRepresentation)& cr = itcr.Value(); if (cr != myCref && cr->IsCurveOnSurface(Su,L)) { @@ -385,6 +387,8 @@ void BRepCheck_Edge::InContext(const TopoDS_Shape& S) BRepLib_ValidateEdge aValidateEdge(myHCurve, ACS, SameParameter); aValidateEdge.SetExitIfToleranceExceeded(Tol); + aValidateEdge.SetExactMethod(myIsExactMethod); + aValidateEdge.SetParallel(toRunParallel); aValidateEdge.Process(); if (!aValidateEdge.IsDone() || !aValidateEdge.CheckTolerance(Tol)) { @@ -407,6 +411,8 @@ void BRepCheck_Edge::InContext(const TopoDS_Shape& S) BRepLib_ValidateEdge aValidateEdgeOnClosedSurf(myHCurve, ACS, SameParameter); aValidateEdgeOnClosedSurf.SetExitIfToleranceExceeded(Tol); + aValidateEdgeOnClosedSurf.SetExactMethod(myIsExactMethod); + aValidateEdgeOnClosedSurf.SetParallel(toRunParallel); aValidateEdgeOnClosedSurf.Process(); if (!aValidateEdgeOnClosedSurf.IsDone() || !aValidateEdgeOnClosedSurf.CheckTolerance(Tol)) { @@ -466,6 +472,8 @@ void BRepCheck_Edge::InContext(const TopoDS_Shape& S) BRepLib_ValidateEdge aValidateEdgeProj(myHCurve, ACS, SameParameter); aValidateEdgeProj.SetExitIfToleranceExceeded(Tol); + aValidateEdgeProj.SetExactMethod(myIsExactMethod); + aValidateEdgeProj.SetParallel(toRunParallel); aValidateEdgeProj.Process(); if (!aValidateEdgeProj.IsDone() || !aValidateEdgeProj.CheckTolerance(Tol)) { diff --git a/src/BRepCheck/BRepCheck_Edge.hxx b/src/BRepCheck/BRepCheck_Edge.hxx index 3051c17673..3a8ef877c8 100644 --- a/src/BRepCheck/BRepCheck_Edge.hxx +++ b/src/BRepCheck/BRepCheck_Edge.hxx @@ -51,7 +51,23 @@ public: //! Sets status of Edge; Standard_EXPORT void SetStatus (const BRepCheck_Status theStatus); + + //! Sets method to calculate distance: Calculating in finite number of points (if theIsExact + //! is false, faster, but possible not correct result) or exact calculating by using + //! BRepLib_CheckCurveOnSurface class (if theIsExact is true, slowly, but more correctly). + //! Exact method is used only when edge is SameParameter. + //! Default method is calculating in finite number of points + void SetExactMethod(Standard_Boolean theIsExact) + { + myIsExactMethod = theIsExact; + } + //! Returns true if exact method selected + Standard_Boolean IsExactMethod() + { + return myIsExactMethod; + } + //! Checks, if polygon on triangulation of heEdge //! is out of 3D-curve of this edge. Standard_EXPORT BRepCheck_Status CheckPolygonOnTriangulation (const TopoDS_Edge& theEdge); @@ -64,7 +80,7 @@ private: Handle(BRep_CurveRepresentation) myCref; Handle(Adaptor3d_Curve) myHCurve; Standard_Boolean myGctrl; - + Standard_Boolean myIsExactMethod; }; #endif // _BRepCheck_Edge_HeaderFile diff --git a/src/BRepLib/BRepLib_CheckCurveOnSurface.cxx b/src/BRepLib/BRepLib_CheckCurveOnSurface.cxx index 8f656f81d4..29d5d42f39 100644 --- a/src/BRepLib/BRepLib_CheckCurveOnSurface.cxx +++ b/src/BRepLib/BRepLib_CheckCurveOnSurface.cxx @@ -32,6 +32,7 @@ BRepLib_CheckCurveOnSurface::BRepLib_CheckCurveOnSurface ( const TopoDS_Edge& theEdge, const TopoDS_Face& theFace) + : myIsParallel(Standard_False) { Init(theEdge, theFace); } @@ -89,10 +90,10 @@ void BRepLib_CheckCurveOnSurface::Init(const TopoDS_Edge& theEdge, const TopoDS_ //function : Perform //purpose : if isTheMTDisabled == TRUE parallelization is not used //======================================================================= -void BRepLib_CheckCurveOnSurface::Perform(const Standard_Boolean isMultiThread) +void BRepLib_CheckCurveOnSurface::Perform() { // Compute the max distance - Compute(myAdaptorCurveOnSurface, isMultiThread); + Compute(myAdaptorCurveOnSurface); if (ErrorStatus()) { return; @@ -102,7 +103,7 @@ void BRepLib_CheckCurveOnSurface::Perform(const Standard_Boolean isMultiThread) { // compute max distance for myAdaptorCurveOnSurface2 // (for the second curve on closed surface) - Compute(myAdaptorCurveOnSurface2, isMultiThread); + Compute(myAdaptorCurveOnSurface2); } } @@ -110,8 +111,8 @@ void BRepLib_CheckCurveOnSurface::Perform(const Standard_Boolean isMultiThread) //function : Compute //purpose : if isTheMTDisabled == TRUE parallelization is not used //======================================================================= -void BRepLib_CheckCurveOnSurface::Compute(const Handle(Adaptor3d_CurveOnSurface)& theCurveOnSurface, - const Standard_Boolean isMultiThread) +void BRepLib_CheckCurveOnSurface::Compute(const Handle(Adaptor3d_CurveOnSurface)& theCurveOnSurface) { - myCOnSurfGeom.Perform(theCurveOnSurface, isMultiThread); + myCOnSurfGeom.SetParallel(myIsParallel); + myCOnSurfGeom.Perform(theCurveOnSurface); } diff --git a/src/BRepLib/BRepLib_CheckCurveOnSurface.hxx b/src/BRepLib/BRepLib_CheckCurveOnSurface.hxx index 328493b48a..84e4a5fb30 100644 --- a/src/BRepLib/BRepLib_CheckCurveOnSurface.hxx +++ b/src/BRepLib/BRepLib_CheckCurveOnSurface.hxx @@ -27,7 +27,10 @@ public: DEFINE_STANDARD_ALLOC //! Default constructor - BRepLib_CheckCurveOnSurface() {} + BRepLib_CheckCurveOnSurface() + : myIsParallel(Standard_False) + { + } //! Constructor Standard_EXPORT BRepLib_CheckCurveOnSurface(const TopoDS_Edge& theEdge, @@ -37,8 +40,8 @@ public: Standard_EXPORT void Init (const TopoDS_Edge& theEdge, const TopoDS_Face& theFace); //! Performs the calculation - //! If isMultiThread == Standard_True then computation will be performed in parallel. - Standard_EXPORT void Perform(const Standard_Boolean isMultiThread = Standard_False); + //! If myIsParallel == Standard_True then computation will be performed in parallel. + Standard_EXPORT void Perform(); //! Returns true if the max distance has been found Standard_Boolean IsDone() const @@ -46,6 +49,18 @@ public: return myCOnSurfGeom.ErrorStatus() == 0; } + //! Sets parallel flag + void SetParallel(const Standard_Boolean theIsParallel) + { + myIsParallel = theIsParallel; + } + + //! Returns true if parallel flag is set + Standard_Boolean IsParallel() + { + return myIsParallel; + } + //! Returns error status //! The possible values are: //! 0 - OK; @@ -74,14 +89,14 @@ protected: //! Computes the max distance for the 3d curve of //! and 2d curve //! If isMultiThread == Standard_True then computation will be performed in parallel. - Standard_EXPORT void Compute (const Handle(Adaptor3d_CurveOnSurface)& theCurveOnSurface, - const Standard_Boolean isMultiThread); + Standard_EXPORT void Compute (const Handle(Adaptor3d_CurveOnSurface)& theCurveOnSurface); private: GeomLib_CheckCurveOnSurface myCOnSurfGeom; Handle(Adaptor3d_CurveOnSurface) myAdaptorCurveOnSurface; Handle(Adaptor3d_CurveOnSurface) myAdaptorCurveOnSurface2; + Standard_Boolean myIsParallel; }; #endif // _BRepLib_CheckCurveOnSurface_HeaderFile diff --git a/src/BRepLib/BRepLib_ValidateEdge.cxx b/src/BRepLib/BRepLib_ValidateEdge.cxx index f97a13640e..ba34e4faa1 100644 --- a/src/BRepLib/BRepLib_ValidateEdge.cxx +++ b/src/BRepLib/BRepLib_ValidateEdge.cxx @@ -17,6 +17,7 @@ #include #include #include +#include //============================================================================= //function : BRepLib_ValidateEdge @@ -32,7 +33,9 @@ BRepLib_ValidateEdge::BRepLib_ValidateEdge(Handle(Adaptor3d_Curve) theReferenceC myToleranceForChecking(0), myCalculatedDistance(0), myExitIfToleranceExceeded(Standard_False), - myIsDone(Standard_False) + myIsDone(Standard_False), + myIsExactMethod(Standard_False), + myIsMultiThread(Standard_False) { } //============================================================================= @@ -96,6 +99,22 @@ void BRepLib_ValidateEdge::SetExitIfToleranceExceeded(Standard_Real theTolerance //purpose : //============================================================================= void BRepLib_ValidateEdge::Process() +{ + if (myIsExactMethod && mySameParameter) + { + processExact(); + } + else + { + processApprox(); + } +} + +//============================================================================= +//function : processApprox +//purpose : +//============================================================================= +void BRepLib_ValidateEdge::processApprox() { myIsDone = Standard_True; Standard_Real aSquareToleranceForChecking = myToleranceForChecking * myToleranceForChecking; @@ -212,3 +231,20 @@ void BRepLib_ValidateEdge::Process() } myCalculatedDistance = Sqrt(aMaxSquareDistance); } + +//============================================================================= +//function : processExact +//purpose : +//============================================================================= +void BRepLib_ValidateEdge::processExact() +{ + GeomLib_CheckCurveOnSurface aCheckCurveOnSurface(myReferenceCurve); + aCheckCurveOnSurface.SetParallel(myIsMultiThread); + aCheckCurveOnSurface.Perform(myOtherCurve); + myIsDone = aCheckCurveOnSurface.IsDone(); + if (myIsDone) + { + myCalculatedDistance = aCheckCurveOnSurface.MaxDistance(); + } +} + diff --git a/src/BRepLib/BRepLib_ValidateEdge.hxx b/src/BRepLib/BRepLib_ValidateEdge.hxx index 48fc25c7f2..e5698dcb63 100644 --- a/src/BRepLib/BRepLib_ValidateEdge.hxx +++ b/src/BRepLib/BRepLib_ValidateEdge.hxx @@ -21,8 +21,9 @@ class Adaptor3d_Curve; class Adaptor3d_CurveOnSurface; -//! Computes the max distance between 3D-curve and curve on -//! surface in fixed points number +//! Computes the max distance between 3D-curve and curve on surface. +//! This class uses 2 methods: approximate using finite +//! number of points (default) and exact class BRepLib_ValidateEdge { public: @@ -31,25 +32,54 @@ public: const Handle(Adaptor3d_CurveOnSurface) theOtherCurve, Standard_Boolean theSameParameter); + //! Sets method to calculate distance: Calculating in finite number of points (if theIsExact + //! is false, faster, but possible not correct result) or exact calculating by using + //! BRepLib_CheckCurveOnSurface class (if theIsExact is true, slowly, but more correctly). + //! Exact method is used only when edge is SameParameter. + //! Default method is calculating in finite number of points + void SetExactMethod(Standard_Boolean theIsExact) + { + myIsExactMethod = theIsExact; + } + + //! Returns true if exact method selected + Standard_Boolean IsExactMethod() + { + return myIsExactMethod; + } + + //! Sets parallel flag + void SetParallel(Standard_Boolean theIsMultiThread) + { + myIsMultiThread = theIsMultiThread; + } + + //! Returns true if parallel flag is set + Standard_Boolean IsParallel() + { + return myIsMultiThread; + } + //! Set control points number (if you need a value other than 22) void SetControlPointsNumber(Standard_Integer theControlPointsNumber) { myControlPointsNumber = theControlPointsNumber; } - //! Sets the maximal allowed distance in the Process() function. If the distance greater than - //! theToleranceForChecking the Process() function stops. Use this for best performance - //! in case of checking of tolerance. - Standard_EXPORT void SetExitIfToleranceExceeded(Standard_Real theToleranceForChecking); + //! Sets limit to compute a distance in the Process() function. If the distance greater than + //! theToleranceForChecking the Process() function stopped. Use this in case checking of + //! tolerance for best performcnce. Has no effect in case using exact method. + void SetExitIfToleranceExceeded(Standard_Real theToleranceForChecking); //! Computes the max distance for the 3d curve //! and curve on surface . If the SetExitIfToleranceExceeded() //! function was called before contains first - //! greater than SetExitIfToleranceExceeded() parameter value + //! greater than SetExitIfToleranceExceeded() parameter value. In case + //! using exact method always computes real max distance. Standard_EXPORT void Process(); //! Returns true if the distance has been found for all points - Standard_Boolean IsDone() + Standard_Boolean IsDone() const { return myIsDone; } @@ -67,6 +97,12 @@ private: //! Adds some margin for distance checking Standard_Real correctTolerance(Standard_Real theTolerance); + //! Calculating in finite number of points + void processApprox(); + + //! Calculating by using BRepLib_CheckCurveOnSurface class + void processExact(); + private: Handle(Adaptor3d_Curve) myReferenceCurve; Handle(Adaptor3d_CurveOnSurface) myOtherCurve; @@ -76,6 +112,8 @@ private: Standard_Real myCalculatedDistance; Standard_Boolean myExitIfToleranceExceeded; Standard_Boolean myIsDone; + Standard_Boolean myIsExactMethod; + Standard_Boolean myIsMultiThread; }; -#endif // _BRepLib_ValidateEdge_HeaderFile \ No newline at end of file +#endif // _BRepLib_ValidateEdge_HeaderFile diff --git a/src/BRepTest/BRepTest_CheckCommands.cxx b/src/BRepTest/BRepTest_CheckCommands.cxx index 5f52c7a267..35b1c10a5c 100644 --- a/src/BRepTest/BRepTest_CheckCommands.cxx +++ b/src/BRepTest/BRepTest_CheckCommands.cxx @@ -855,19 +855,20 @@ static Standard_Integer checkshape (Draw_Interpretor& theCommands, if (narg == 1) { theCommands << "\n"; - theCommands << "Usage : checkshape [-top] shape [result] [-short] [-parallel]\n"; + theCommands << "Usage : checkshape [-top] shape [result] [-short] [-parallel] [-exact]\n"; theCommands << "\n"; theCommands << "Where :\n"; - theCommands << " -top - check topology only.\n"; - theCommands << " shape - the name of the shape to test.\n"; - theCommands << " result - the prefix of the output shape names. If it is used, structural\n"; - theCommands << " output style will be used. Otherwise - contextual one.\n"; - theCommands << " -short - short description of check.\n"; + theCommands << " -top - check topology only.\n"; + theCommands << " shape - the name of the shape to test.\n"; + theCommands << " result - the prefix of the output shape names. If it is used, structural\n"; + theCommands << " output style will be used. Otherwise - contextual one.\n"; + theCommands << " -short - short description of check.\n"; theCommands << " -parallel - run check in parallel.\n"; + theCommands << " -exact - run check using exact method.\n"; return 0; } - if (narg > 6) + if (narg > 7) { theCommands << "Invalid number of args!!!\n"; theCommands << "No args to have help.\n"; @@ -901,6 +902,7 @@ static Standard_Integer checkshape (Draw_Interpretor& theCommands, Standard_Boolean IsShortDump = Standard_False; Standard_Boolean IsContextDump = Standard_True; Standard_Boolean IsParallel = Standard_False; + Standard_Boolean IsExact = Standard_False; Standard_CString aPref(NULL); if (aCurInd < narg && strncmp(a[aCurInd], "-", 1)) { @@ -921,6 +923,10 @@ static Standard_Integer checkshape (Draw_Interpretor& theCommands, { IsParallel = Standard_True; } + else if (anArg == "-exact") + { + IsExact = Standard_True; + } else { theCommands << "Syntax error at '" << anArg << "'"; @@ -931,7 +937,7 @@ static Standard_Integer checkshape (Draw_Interpretor& theCommands, try { OCC_CATCH_SIGNALS - BRepCheck_Analyzer anAna (aShape, aGeomCtrl, IsParallel); + BRepCheck_Analyzer anAna (aShape, aGeomCtrl, IsParallel, IsExact); Standard_Boolean isValid = anAna.IsValid(); if (isValid) diff --git a/src/GeomLib/GeomLib_CheckCurveOnSurface.cxx b/src/GeomLib/GeomLib_CheckCurveOnSurface.cxx index c736d458d8..6f68afd05f 100644 --- a/src/GeomLib/GeomLib_CheckCurveOnSurface.cxx +++ b/src/GeomLib/GeomLib_CheckCurveOnSurface.cxx @@ -319,7 +319,8 @@ GeomLib_CheckCurveOnSurface::GeomLib_CheckCurveOnSurface() myErrorStatus(0), myMaxDistance(RealLast()), myMaxParameter(0.), - myTolRange(Precision::PConfusion()) + myTolRange(Precision::PConfusion()), + myIsParallel(Standard_False) { } @@ -334,7 +335,8 @@ GeomLib_CheckCurveOnSurface:: myErrorStatus(0), myMaxDistance(RealLast()), myMaxParameter(0.), - myTolRange(theTolRange) + myTolRange(theTolRange), + myIsParallel(Standard_False) { } @@ -369,8 +371,7 @@ void GeomLib_CheckCurveOnSurface::Init( const Handle(Adaptor3d_Curve)& theCurve, //function : Perform //purpose : //======================================================================= -void GeomLib_CheckCurveOnSurface::Perform(const Handle(Adaptor3d_CurveOnSurface)& theCurveOnSurface, - const Standard_Boolean isMultiThread) +void GeomLib_CheckCurveOnSurface::Perform(const Handle(Adaptor3d_CurveOnSurface)& theCurveOnSurface) { if( myCurve.IsNull() || theCurveOnSurface.IsNull()) @@ -415,7 +416,7 @@ void GeomLib_CheckCurveOnSurface::Perform(const Handle(Adaptor3d_CurveOnSurface) FillSubIntervals(myCurve, theCurveOnSurface->GetCurve(), myCurve->FirstParameter(), myCurve->LastParameter(), aNbParticles, &anIntervals); - const Standard_Integer aNbThreads = isMultiThread ? Min(anIntervals.Size(), OSD_ThreadPool::DefaultPool()->NbDefaultThreadsToLaunch()) : 1; + const Standard_Integer aNbThreads = myIsParallel ? Min(anIntervals.Size(), OSD_ThreadPool::DefaultPool()->NbDefaultThreadsToLaunch()) : 1; Array1OfHCurve aCurveArray(0, aNbThreads - 1); Array1OfHCurve aCurveOnSurfaceArray(0, aNbThreads - 1); for (Standard_Integer anI = 0; anI < aNbThreads; ++anI) diff --git a/src/GeomLib/GeomLib_CheckCurveOnSurface.hxx b/src/GeomLib/GeomLib_CheckCurveOnSurface.hxx index bc68342407..98cb7b631c 100644 --- a/src/GeomLib/GeomLib_CheckCurveOnSurface.hxx +++ b/src/GeomLib/GeomLib_CheckCurveOnSurface.hxx @@ -48,8 +48,19 @@ public: //! Computes the max distance for the 3d curve //! and 2d curve //! If isMultiThread == Standard_True then computation will be performed in parallel. - Standard_EXPORT void Perform(const Handle(Adaptor3d_CurveOnSurface)& theCurveOnSurface, - const Standard_Boolean isMultiThread = Standard_False); + Standard_EXPORT void Perform(const Handle(Adaptor3d_CurveOnSurface)& theCurveOnSurface); + + //! Sets parallel flag + void SetParallel(const Standard_Boolean theIsParallel) + { + myIsParallel = theIsParallel; + } + + //! Returns true if parallel flag is set + Standard_Boolean IsParallel() + { + return myIsParallel; + } //! Returns true if the max distance has been found Standard_Boolean IsDone() const @@ -87,6 +98,7 @@ private: Standard_Real myMaxDistance; Standard_Real myMaxParameter; Standard_Real myTolRange; + Standard_Boolean myIsParallel; }; #endif // _BRepLib_CheckCurveOnSurface_HeaderFile diff --git a/src/IntTools/IntTools_Tools.cxx b/src/IntTools/IntTools_Tools.cxx index bf7b91e634..8ea8e0cf74 100644 --- a/src/IntTools/IntTools_Tools.cxx +++ b/src/IntTools/IntTools_Tools.cxx @@ -807,7 +807,8 @@ Standard_Boolean IntTools_Tools::ComputeTolerance new Adaptor3d_CurveOnSurface(aGeom2dAdaptorCurve, aGeomAdaptorSurface); aCS.Init(aGeomAdaptorCurve, theTolRange); - aCS.Perform(anAdaptor3dCurveOnSurface, theToRunParallel); + aCS.SetParallel(theToRunParallel); + aCS.Perform(anAdaptor3dCurveOnSurface); if (!aCS.IsDone()) { return Standard_False; } diff --git a/tests/heal/begin b/tests/heal/begin index 4fb705ac10..b1f35eccf0 100755 --- a/tests/heal/begin +++ b/tests/heal/begin @@ -1,7 +1,7 @@ pload TOPTEST -# To prevent loops limit to 5 minutes -cpulimit 300 +# Execution time limit to prevent loops +cpulimit 1000 if { [info exists imagedir] == 0 } { set imagedir . diff --git a/tests/heal/checkshape/bug27814_10 b/tests/heal/checkshape/bug27814_10 index c1862aa347..7137456311 100644 --- a/tests/heal/checkshape/bug27814_10 +++ b/tests/heal/checkshape/bug27814_10 @@ -1,7 +1,7 @@ -puts "REQUIRED All: Faulty shapes in variables faulty_1 to faulty_51" +puts "REQUIRED All: Faulty shapes in variables faulty_1 to faulty_31" puts "==========" puts "0027814: Parallelize BRepCheck_Analyzer" puts "==========" puts "" -CheckPerform [locate_data_file OCC394.brep] \ No newline at end of file +CheckPerform [locate_data_file OCC396.brep] \ No newline at end of file diff --git a/tests/heal/checkshape/bug27814_11 b/tests/heal/checkshape/bug27814_11 index 7137456311..09fdb8611f 100644 --- a/tests/heal/checkshape/bug27814_11 +++ b/tests/heal/checkshape/bug27814_11 @@ -1,7 +1,7 @@ -puts "REQUIRED All: Faulty shapes in variables faulty_1 to faulty_31" +puts "REQUIRED All: Faulty shapes in variables faulty_1 to faulty_287" puts "==========" puts "0027814: Parallelize BRepCheck_Analyzer" puts "==========" puts "" -CheckPerform [locate_data_file OCC396.brep] \ No newline at end of file +CheckPerform [locate_data_file OCC54.brep] \ No newline at end of file diff --git a/tests/heal/checkshape/bug32448_1 b/tests/heal/checkshape/bug32448_1 new file mode 100644 index 0000000000..a6f8cd3eef --- /dev/null +++ b/tests/heal/checkshape/bug32448_1 @@ -0,0 +1,8 @@ +puts "REQUIRED All: Faulty shapes in variables faulty_1 to faulty_88" +puts "==========" +puts "0032448: Provide exact validating (as option) using GeomLib_CheckCurveOnSurface" +puts "==========" +puts "" + +restore [locate_data_file bug27814.brep] b +checkshape b -exact -parallel diff --git a/tests/heal/checkshape/bug32448_10 b/tests/heal/checkshape/bug32448_10 new file mode 100644 index 0000000000..0984113b23 --- /dev/null +++ b/tests/heal/checkshape/bug32448_10 @@ -0,0 +1,8 @@ +puts "REQUIRED All: Faulty shapes in variables faulty_1 to faulty_6101" +puts "==========" +puts "0032448: Provide exact validating (as option) using GeomLib_CheckCurveOnSurface" +puts "==========" +puts "" + +restore [locate_data_file OCC54.brep] b +checkshape b -exact -parallel diff --git a/tests/heal/checkshape/bug32448_2 b/tests/heal/checkshape/bug32448_2 new file mode 100644 index 0000000000..6e59a840b7 --- /dev/null +++ b/tests/heal/checkshape/bug32448_2 @@ -0,0 +1,7 @@ +puts "==========" +puts "0032448: Provide exact validating (as option) using GeomLib_CheckCurveOnSurface" +puts "==========" +puts "" + +restore [locate_data_file 5000-12.brep] b +checkshape b -exact -parallel diff --git a/tests/heal/checkshape/bug32448_3 b/tests/heal/checkshape/bug32448_3 new file mode 100644 index 0000000000..713da3b007 --- /dev/null +++ b/tests/heal/checkshape/bug32448_3 @@ -0,0 +1,8 @@ +puts "REQUIRED All: Faulty shapes in variables faulty_1 to faulty_3675" +puts "==========" +puts "0032448: Provide exact validating (as option) using GeomLib_CheckCurveOnSurface" +puts "==========" +puts "" + +restore [locate_data_file BPLSEITLI.brep] b +checkshape b -exact -parallel diff --git a/tests/heal/checkshape/bug32448_4 b/tests/heal/checkshape/bug32448_4 new file mode 100644 index 0000000000..7308858430 --- /dev/null +++ b/tests/heal/checkshape/bug32448_4 @@ -0,0 +1,7 @@ +puts "==========" +puts "0032448: Provide exact validating (as option) using GeomLib_CheckCurveOnSurface" +puts "==========" +puts "" + +restore [locate_data_file bug24525_License.brep] b +checkshape b -exact -parallel diff --git a/tests/heal/checkshape/bug32448_5 b/tests/heal/checkshape/bug32448_5 new file mode 100644 index 0000000000..dc6652c617 --- /dev/null +++ b/tests/heal/checkshape/bug32448_5 @@ -0,0 +1,8 @@ +puts "REQUIRED All: Faulty shapes in variables faulty_1 to faulty_8234" +puts "==========" +puts "0032448: Provide exact validating (as option) using GeomLib_CheckCurveOnSurface" +puts "==========" +puts "" + +restore [locate_data_file bug26278_E01754_000000_P00_01_0_VS3_1_20070102_sewed_fixed.brep] b +checkshape b -exact -parallel diff --git a/tests/heal/checkshape/bug32448_6 b/tests/heal/checkshape/bug32448_6 new file mode 100644 index 0000000000..a1599c0531 --- /dev/null +++ b/tests/heal/checkshape/bug32448_6 @@ -0,0 +1,8 @@ +puts "REQUIRED All: Faulty shapes in variables faulty_1 to faulty_7656" +puts "==========" +puts "0032448: Provide exact validating (as option) using GeomLib_CheckCurveOnSurface" +puts "==========" +puts "" + +restore [locate_data_file bug30360_GES-13500-000.brep] b +checkshape b -exact -parallel diff --git a/tests/heal/checkshape/bug32448_7 b/tests/heal/checkshape/bug32448_7 new file mode 100644 index 0000000000..954d6bd252 --- /dev/null +++ b/tests/heal/checkshape/bug32448_7 @@ -0,0 +1,8 @@ +puts "REQUIRED All: Faulty shapes in variables faulty_1 to faulty_1943" +puts "==========" +puts "0032448: Provide exact validating (as option) using GeomLib_CheckCurveOnSurface" +puts "==========" +puts "" + +restore [locate_data_file OCC187_from_bug_description.brep] b +checkshape b -exact -parallel diff --git a/tests/heal/checkshape/bug32448_8 b/tests/heal/checkshape/bug32448_8 new file mode 100644 index 0000000000..b5befa2698 --- /dev/null +++ b/tests/heal/checkshape/bug32448_8 @@ -0,0 +1,8 @@ +puts "REQUIRED All: Faulty shapes in variables faulty_1 to faulty_502" +puts "==========" +puts "0032448: Provide exact validating (as option) using GeomLib_CheckCurveOnSurface" +puts "==========" +puts "" + +restore [locate_data_file OCC394.brep] b +checkshape b -exact -parallel diff --git a/tests/heal/checkshape/bug32448_9 b/tests/heal/checkshape/bug32448_9 new file mode 100644 index 0000000000..a3b978bcb6 --- /dev/null +++ b/tests/heal/checkshape/bug32448_9 @@ -0,0 +1,8 @@ +puts "REQUIRED All: Faulty shapes in variables faulty_1 to faulty_467" +puts "==========" +puts "0032448: Provide exact validating (as option) using GeomLib_CheckCurveOnSurface" +puts "==========" +puts "" + +restore [locate_data_file OCC396.brep] b +checkshape b -exact -parallel From 9eab1511b0de5d4f0bf4be1ecb167267597adc0e Mon Sep 17 00:00:00 2001 From: dipts Date: Sat, 13 Nov 2021 12:49:17 +0100 Subject: [PATCH 129/639] 0032661: Coding - Forward class declaration in ProjLib collides with typeref Removed redundant forward declarations from ProjLib.hxx. --- src/ProjLib/ProjLib.cxx | 18 +++--- src/ProjLib/ProjLib.hxx | 128 ++++++++++------------------------------ 2 files changed, 41 insertions(+), 105 deletions(-) diff --git a/src/ProjLib/ProjLib.cxx b/src/ProjLib/ProjLib.cxx index 23ca6495ad..5da06356cf 100644 --- a/src/ProjLib/ProjLib.cxx +++ b/src/ProjLib/ProjLib.cxx @@ -14,8 +14,17 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. +#include +#include #include +#include +#include +#include +#include +#include +#include +#include #include #include #include @@ -33,22 +42,13 @@ #include #include #include -#include #include #include #include #include #include #include -#include -#include -#include -#include -#include -#include -#include #include -#include //======================================================================= //function : Project diff --git a/src/ProjLib/ProjLib.hxx b/src/ProjLib/ProjLib.hxx index 3601b5a66b..2751ddf93a 100644 --- a/src/ProjLib/ProjLib.hxx +++ b/src/ProjLib/ProjLib.hxx @@ -37,141 +37,77 @@ class gp_Cylinder; class gp_Cone; class gp_Sphere; class gp_Torus; -class ProjLib_ProjectOnPlane; -class ProjLib_ProjectOnSurface; -class ProjLib_ComputeApprox; -class ProjLib_ComputeApproxOnPolarSurface; class ProjLib_ProjectedCurve; -class ProjLib_HProjectedCurve; -class ProjLib_CompProjectedCurve; -class ProjLib_HCompProjectedCurve; -class ProjLib_PrjResolve; -class ProjLib_PrjFunc; -class ProjLib_Projector; -class ProjLib_Plane; -class ProjLib_Cylinder; -class ProjLib_Cone; -class ProjLib_Sphere; -class ProjLib_Torus; - -//! The projLib package first provides projection of -//! curves on a plane along a given Direction. The -//! result will be a 3D curve. -//! The ProjLib package provides projection of curves -//! on surfaces to compute the curve in the parametric -//! space. + +//! The ProjLib package first provides projection of curves on a plane along a given Direction. +//! The result will be a 3D curve. //! +//! The ProjLib package provides projection of curves on surfaces to compute the curve in the parametric space. //! It is assumed that the curve is on the surface. //! -//! It provides : -//! -//! * Package methods to handle the easiest cases : -//! -//! - Line, Circle, Ellipse, Parabola, Hyperbola on plane. -//! -//! - Line, Circle on cylinder. -//! -//! - Line, Circle on cone. -//! -//! * Classes to handle the general cases : -//! -//! - Plane. -//! -//! - Cylinder. +//! It provides: //! -//! - Cone. +//! * Package methods to handle the easiest cases: +//! - Line, Circle, Ellipse, Parabola, Hyperbola on plane. +//! - Line, Circle on cylinder. +//! - Line, Circle on cone. //! -//! - Sphere. +//! * Classes to handle the general cases: +//! - Plane. +//! - Cylinder. +//! - Cone. +//! - Sphere. +//! - Torus. //! -//! - Torus. -//! -//! * A generic class to handle a Curve from Adaptor3d -//! on a Surface from Adaptor3d. +//! * A generic class to handle a Adaptor3d_Curve on a Adaptor3d_Surface. class ProjLib { public: DEFINE_STANDARD_ALLOC - Standard_EXPORT static gp_Pnt2d Project (const gp_Pln& Pl, const gp_Pnt& P); - + Standard_EXPORT static gp_Lin2d Project (const gp_Pln& Pl, const gp_Lin& L); - + Standard_EXPORT static gp_Circ2d Project (const gp_Pln& Pl, const gp_Circ& C); - + Standard_EXPORT static gp_Elips2d Project (const gp_Pln& Pl, const gp_Elips& E); - + Standard_EXPORT static gp_Parab2d Project (const gp_Pln& Pl, const gp_Parab& P); - + Standard_EXPORT static gp_Hypr2d Project (const gp_Pln& Pl, const gp_Hypr& H); - + Standard_EXPORT static gp_Pnt2d Project (const gp_Cylinder& Cy, const gp_Pnt& P); - + Standard_EXPORT static gp_Lin2d Project (const gp_Cylinder& Cy, const gp_Lin& L); - + Standard_EXPORT static gp_Lin2d Project (const gp_Cylinder& Cy, const gp_Circ& Ci); - + Standard_EXPORT static gp_Pnt2d Project (const gp_Cone& Co, const gp_Pnt& P); - + Standard_EXPORT static gp_Lin2d Project (const gp_Cone& Co, const gp_Lin& L); - + Standard_EXPORT static gp_Lin2d Project (const gp_Cone& Co, const gp_Circ& Ci); - + Standard_EXPORT static gp_Pnt2d Project (const gp_Sphere& Sp, const gp_Pnt& P); - + Standard_EXPORT static gp_Lin2d Project (const gp_Sphere& Sp, const gp_Circ& Ci); - + Standard_EXPORT static gp_Pnt2d Project (const gp_Torus& To, const gp_Pnt& P); - + Standard_EXPORT static gp_Lin2d Project (const gp_Torus& To, const gp_Circ& Ci); //! Make empty P-Curve of relevant to type Standard_EXPORT static void MakePCurveOfType (const ProjLib_ProjectedCurve& PC, Handle(Geom2d_Curve)& aC); + //! Returns "true" if surface is analytical, that is it can be //! Plane, Cylinder, Cone, Sphere, Torus. //! For all other types of surface method returns "false". Standard_EXPORT static Standard_Boolean IsAnaSurf (const Handle(Adaptor3d_Surface)& theAS); - - - -protected: - - - - - -private: - - - - -friend class ProjLib_ProjectOnPlane; -friend class ProjLib_ProjectOnSurface; -friend class ProjLib_ComputeApprox; -friend class ProjLib_ComputeApproxOnPolarSurface; -friend class ProjLib_ProjectedCurve; -friend class ProjLib_HProjectedCurve; -friend class ProjLib_CompProjectedCurve; -friend class ProjLib_HCompProjectedCurve; -friend class ProjLib_PrjResolve; -friend class ProjLib_PrjFunc; -friend class ProjLib_Projector; -friend class ProjLib_Plane; -friend class ProjLib_Cylinder; -friend class ProjLib_Cone; -friend class ProjLib_Sphere; -friend class ProjLib_Torus; - }; - - - - - - #endif // _ProjLib_HeaderFile From 45143b7a24a45a6bb0879f996514fe0890491285 Mon Sep 17 00:00:00 2001 From: dipts Date: Sat, 13 Nov 2021 13:30:39 +0100 Subject: [PATCH 130/639] 0032662: Coding - Missing header file in AIS_DataMapOfSelStat.hxx Removed obsolete header files AIS_DataMapOfSelStat.hxx and AIS_DataMapIteratorOfDataMapOfSelStat.hxx. Removed obsolete types AIS_DataMapofIntegerListOfinteractive, AIS_ClearMode, AIS_ConnectStatus, AIS_IndexedDataMapOfOwnerPrs, AIS_MapOfInteractive. --- samples/mfc/standard/06_Ocaf/src/OcafDoc.cpp | 20 +++++----- samples/mfc/standard/06_Ocaf/src/StdAfx.h | 3 -- src/AIS/AIS_ClearMode.hxx | 35 ----------------- src/AIS/AIS_ConnectStatus.hxx | 38 ------------------- .../AIS_DataMapIteratorOfDataMapOfSelStat.hxx | 20 ---------- ...torOfDataMapofIntegerListOfinteractive.hxx | 20 ---------- src/AIS/AIS_DataMapOfSelStat.hxx | 29 -------------- .../AIS_DataMapofIntegerListOfinteractive.hxx | 29 -------------- src/AIS/AIS_IndexedDataMapOfOwnerPrs.hxx | 28 -------------- src/AIS/AIS_InteractiveContext.hxx | 1 - src/AIS/AIS_MapIteratorOfMapOfInteractive.hxx | 20 ---------- src/AIS/AIS_MapOfInteractive.hxx | 28 -------------- src/AIS/FILES | 9 ----- src/ViewerTest/ViewerTest.cxx | 1 - src/ViewerTest/ViewerTest_ObjectCommands.cxx | 1 - .../ViewerTest_RelationCommands.cxx | 3 -- 16 files changed, 10 insertions(+), 275 deletions(-) delete mode 100644 src/AIS/AIS_ClearMode.hxx delete mode 100644 src/AIS/AIS_ConnectStatus.hxx delete mode 100644 src/AIS/AIS_DataMapIteratorOfDataMapOfSelStat.hxx delete mode 100644 src/AIS/AIS_DataMapIteratorOfDataMapofIntegerListOfinteractive.hxx delete mode 100644 src/AIS/AIS_DataMapOfSelStat.hxx delete mode 100644 src/AIS/AIS_DataMapofIntegerListOfinteractive.hxx delete mode 100644 src/AIS/AIS_IndexedDataMapOfOwnerPrs.hxx delete mode 100644 src/AIS/AIS_MapIteratorOfMapOfInteractive.hxx delete mode 100644 src/AIS/AIS_MapOfInteractive.hxx diff --git a/samples/mfc/standard/06_Ocaf/src/OcafDoc.cpp b/samples/mfc/standard/06_Ocaf/src/OcafDoc.cpp index a5d6824b57..f82218600a 100755 --- a/samples/mfc/standard/06_Ocaf/src/OcafDoc.cpp +++ b/samples/mfc/standard/06_Ocaf/src/OcafDoc.cpp @@ -814,18 +814,18 @@ void COcafDoc::OnObjectDelete() D->NewCommand(); - AIS_SequenceOfInteractive aSequence; - for(myAISContext->InitSelected(); - myAISContext->MoreSelected(); - myAISContext->NextSelected()) - aSequence.Append(myAISContext->SelectedInteractive()); - - for(int iter=1;iter <=aSequence.Length();iter++) + AIS_ListOfInteractive aList; + for (myAISContext->InitSelected(); myAISContext->MoreSelected(); myAISContext->NextSelected()) + { + aList.Append(myAISContext->SelectedInteractive()); + } + + for (AIS_ListOfInteractive::Iterator anIter (aList); anIter.More(); anIter.Next()) { - if (myAISContext->DisplayStatus(aSequence(iter)) == AIS_DS_Displayed) + Handle(AIS_InteractiveObject) aPrs = anIter.Value(); + if (myAISContext->DisplayStatus (aPrs) == AIS_DS_Displayed) { - Handle(TPrsStd_AISPresentation) CurrentPrs - = Handle(TPrsStd_AISPresentation)::DownCast(aSequence(iter)->GetOwner()); + Handle(TPrsStd_AISPresentation) CurrentPrs = Handle(TPrsStd_AISPresentation)::DownCast(aPrs->GetOwner()); TDataStd_Integer::Set(CurrentPrs->Label(), 0); CurrentPrs->Erase(1); } diff --git a/samples/mfc/standard/06_Ocaf/src/StdAfx.h b/samples/mfc/standard/06_Ocaf/src/StdAfx.h index b11842af8e..a4fad16a3a 100755 --- a/samples/mfc/standard/06_Ocaf/src/StdAfx.h +++ b/samples/mfc/standard/06_Ocaf/src/StdAfx.h @@ -28,14 +28,11 @@ # define true TRUE #endif -#pragma warning( disable : 4244 ) // Issue warning 4244 #include -#pragma warning( default : 4244 ) // Issue warning 4244 #include #include #include -#include #include #include diff --git a/src/AIS/AIS_ClearMode.hxx b/src/AIS/AIS_ClearMode.hxx deleted file mode 100644 index a94a7540f1..0000000000 --- a/src/AIS/AIS_ClearMode.hxx +++ /dev/null @@ -1,35 +0,0 @@ -// Created on: 1996-12-11 -// Created by: Robert COUBLANC -// Copyright (c) 1996-1999 Matra Datavision -// Copyright (c) 1999-2014 OPEN CASCADE SAS -// -// This file is part of Open CASCADE Technology software library. -// -// This library is free software; you can redistribute it and/or modify it under -// the terms of the GNU Lesser General Public License version 2.1 as published -// by the Free Software Foundation, with special exception defined in the file -// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT -// distribution for complete text of the license and disclaimer of any warranty. -// -// Alternatively, this file may be used under the terms of Open CASCADE -// commercial license or contractual agreement. - -#ifndef _AIS_ClearMode_HeaderFile -#define _AIS_ClearMode_HeaderFile - -//! Declares which entities in an opened local context -//! are to be cleared of mode settings. Temporary -//! graphic presentations such as those for sub-shapes, -//! for example, are only created for the selection -//! process. By means of these enumerations, they can -//! be cleared from local context. -enum AIS_ClearMode -{ -AIS_CM_All, -AIS_CM_Interactive, -AIS_CM_Filters, -AIS_CM_StandardModes, -AIS_CM_TemporaryShapePrs -}; - -#endif // _AIS_ClearMode_HeaderFile diff --git a/src/AIS/AIS_ConnectStatus.hxx b/src/AIS/AIS_ConnectStatus.hxx deleted file mode 100644 index 2e8cd59c5d..0000000000 --- a/src/AIS/AIS_ConnectStatus.hxx +++ /dev/null @@ -1,38 +0,0 @@ -// Created on: 1996-12-11 -// Created by: Robert COUBLANC -// Copyright (c) 1996-1999 Matra Datavision -// Copyright (c) 1999-2014 OPEN CASCADE SAS -// -// This file is part of Open CASCADE Technology software library. -// -// This library is free software; you can redistribute it and/or modify it under -// the terms of the GNU Lesser General Public License version 2.1 as published -// by the Free Software Foundation, with special exception defined in the file -// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT -// distribution for complete text of the license and disclaimer of any warranty. -// -// Alternatively, this file may be used under the terms of Open CASCADE -// commercial license or contractual agreement. - -#ifndef _AIS_ConnectStatus_HeaderFile -#define _AIS_ConnectStatus_HeaderFile - -//! Gives the status of connection of an Interactive -//! Object. This will be one of the following: -//! - No connection -//! - Connection -//! - Transformation -//! - Both connection and transformation -//! This enumeration is used in -//! AIS_ConnectedInteractive. Transform indicates -//! that the Interactive Object reference geometry has -//! changed location relative to the reference geometry. -enum AIS_ConnectStatus -{ -AIS_CS_None, -AIS_CS_Connection, -AIS_CS_Transform, -AIS_CS_Both -}; - -#endif // _AIS_ConnectStatus_HeaderFile diff --git a/src/AIS/AIS_DataMapIteratorOfDataMapOfSelStat.hxx b/src/AIS/AIS_DataMapIteratorOfDataMapOfSelStat.hxx deleted file mode 100644 index a4be8b9198..0000000000 --- a/src/AIS/AIS_DataMapIteratorOfDataMapOfSelStat.hxx +++ /dev/null @@ -1,20 +0,0 @@ -// Copyright (c) 2015 OPEN CASCADE SAS -// -// This file is part of Open CASCADE Technology software library. -// -// This library is free software; you can redistribute it and/or modify it under -// the terms of the GNU Lesser General Public License version 2.1 as published -// by the Free Software Foundation, with special exception defined in the file -// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT -// distribution for complete text of the license and disclaimer of any warranty. -// -// Alternatively, this file may be used under the terms of Open CASCADE -// commercial license or contractual agreement. - - -#ifndef AIS_DataMapIteratorOfDataMapOfSelStat_HeaderFile -#define AIS_DataMapIteratorOfDataMapOfSelStat_HeaderFile - -#include - -#endif diff --git a/src/AIS/AIS_DataMapIteratorOfDataMapofIntegerListOfinteractive.hxx b/src/AIS/AIS_DataMapIteratorOfDataMapofIntegerListOfinteractive.hxx deleted file mode 100644 index 75744807fc..0000000000 --- a/src/AIS/AIS_DataMapIteratorOfDataMapofIntegerListOfinteractive.hxx +++ /dev/null @@ -1,20 +0,0 @@ -// Copyright (c) 2015 OPEN CASCADE SAS -// -// This file is part of Open CASCADE Technology software library. -// -// This library is free software; you can redistribute it and/or modify it under -// the terms of the GNU Lesser General Public License version 2.1 as published -// by the Free Software Foundation, with special exception defined in the file -// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT -// distribution for complete text of the license and disclaimer of any warranty. -// -// Alternatively, this file may be used under the terms of Open CASCADE -// commercial license or contractual agreement. - - -#ifndef AIS_DataMapIteratorOfDataMapofIntegerListOfinteractive_HeaderFile -#define AIS_DataMapIteratorOfDataMapofIntegerListOfinteractive_HeaderFile - -#include - -#endif diff --git a/src/AIS/AIS_DataMapOfSelStat.hxx b/src/AIS/AIS_DataMapOfSelStat.hxx deleted file mode 100644 index df82bc33ab..0000000000 --- a/src/AIS/AIS_DataMapOfSelStat.hxx +++ /dev/null @@ -1,29 +0,0 @@ -// Created on: 1996-12-11 -// Created by: Robert COUBLANC -// Copyright (c) 1996-1999 Matra Datavision -// Copyright (c) 1999-2014 OPEN CASCADE SAS -// -// This file is part of Open CASCADE Technology software library. -// -// This library is free software; you can redistribute it and/or modify it under -// the terms of the GNU Lesser General Public License version 2.1 as published -// by the Free Software Foundation, with special exception defined in the file -// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT -// distribution for complete text of the license and disclaimer of any warranty. -// -// Alternatively, this file may be used under the terms of Open CASCADE -// commercial license or contractual agreement. - -#ifndef AIS_DataMapOfSelStat_HeaderFile -#define AIS_DataMapOfSelStat_HeaderFile - -#include -#include -#include -#include - -typedef NCollection_DataMap AIS_DataMapOfSelStat; -typedef NCollection_DataMap::Iterator AIS_DataMapIteratorOfDataMapOfSelStat; - - -#endif diff --git a/src/AIS/AIS_DataMapofIntegerListOfinteractive.hxx b/src/AIS/AIS_DataMapofIntegerListOfinteractive.hxx deleted file mode 100644 index 6aa2f0ecfb..0000000000 --- a/src/AIS/AIS_DataMapofIntegerListOfinteractive.hxx +++ /dev/null @@ -1,29 +0,0 @@ -// Created on: 1996-12-11 -// Created by: Robert COUBLANC -// Copyright (c) 1996-1999 Matra Datavision -// Copyright (c) 1999-2014 OPEN CASCADE SAS -// -// This file is part of Open CASCADE Technology software library. -// -// This library is free software; you can redistribute it and/or modify it under -// the terms of the GNU Lesser General Public License version 2.1 as published -// by the Free Software Foundation, with special exception defined in the file -// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT -// distribution for complete text of the license and disclaimer of any warranty. -// -// Alternatively, this file may be used under the terms of Open CASCADE -// commercial license or contractual agreement. - -#ifndef AIS_DataMapofIntegerListOfinteractive_HeaderFile -#define AIS_DataMapofIntegerListOfinteractive_HeaderFile - -#include -#include -#include -#include - -typedef NCollection_DataMap AIS_DataMapofIntegerListOfinteractive; -typedef NCollection_DataMap::Iterator AIS_DataMapIteratorOfDataMapofIntegerListOfinteractive; - - -#endif diff --git a/src/AIS/AIS_IndexedDataMapOfOwnerPrs.hxx b/src/AIS/AIS_IndexedDataMapOfOwnerPrs.hxx deleted file mode 100644 index 72753bf595..0000000000 --- a/src/AIS/AIS_IndexedDataMapOfOwnerPrs.hxx +++ /dev/null @@ -1,28 +0,0 @@ -// Created on: 1996-12-11 -// Created by: Robert COUBLANC -// Copyright (c) 1996-1999 Matra Datavision -// Copyright (c) 1999-2014 OPEN CASCADE SAS -// -// This file is part of Open CASCADE Technology software library. -// -// This library is free software; you can redistribute it and/or modify it under -// the terms of the GNU Lesser General Public License version 2.1 as published -// by the Free Software Foundation, with special exception defined in the file -// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT -// distribution for complete text of the license and disclaimer of any warranty. -// -// Alternatively, this file may be used under the terms of Open CASCADE -// commercial license or contractual agreement. - -#ifndef AIS_IndexedDataMapOfOwnerPrs_HeaderFile -#define AIS_IndexedDataMapOfOwnerPrs_HeaderFile - -#include -#include -#include -#include - -typedef NCollection_IndexedDataMap AIS_IndexedDataMapOfOwnerPrs; - - -#endif diff --git a/src/AIS/AIS_InteractiveContext.hxx b/src/AIS/AIS_InteractiveContext.hxx index 76db018c6a..fe47b0c889 100644 --- a/src/AIS/AIS_InteractiveContext.hxx +++ b/src/AIS/AIS_InteractiveContext.hxx @@ -20,7 +20,6 @@ #include #include #include -#include #include #include #include diff --git a/src/AIS/AIS_MapIteratorOfMapOfInteractive.hxx b/src/AIS/AIS_MapIteratorOfMapOfInteractive.hxx deleted file mode 100644 index 3db7fe6911..0000000000 --- a/src/AIS/AIS_MapIteratorOfMapOfInteractive.hxx +++ /dev/null @@ -1,20 +0,0 @@ -// Copyright (c) 2015 OPEN CASCADE SAS -// -// This file is part of Open CASCADE Technology software library. -// -// This library is free software; you can redistribute it and/or modify it under -// the terms of the GNU Lesser General Public License version 2.1 as published -// by the Free Software Foundation, with special exception defined in the file -// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT -// distribution for complete text of the license and disclaimer of any warranty. -// -// Alternatively, this file may be used under the terms of Open CASCADE -// commercial license or contractual agreement. - - -#ifndef AIS_MapIteratorOfMapOfInteractive_HeaderFile -#define AIS_MapIteratorOfMapOfInteractive_HeaderFile - -#include - -#endif diff --git a/src/AIS/AIS_MapOfInteractive.hxx b/src/AIS/AIS_MapOfInteractive.hxx deleted file mode 100644 index b03767fe07..0000000000 --- a/src/AIS/AIS_MapOfInteractive.hxx +++ /dev/null @@ -1,28 +0,0 @@ -// Created on: 1996-12-11 -// Created by: Robert COUBLANC -// Copyright (c) 1996-1999 Matra Datavision -// Copyright (c) 1999-2014 OPEN CASCADE SAS -// -// This file is part of Open CASCADE Technology software library. -// -// This library is free software; you can redistribute it and/or modify it under -// the terms of the GNU Lesser General Public License version 2.1 as published -// by the Free Software Foundation, with special exception defined in the file -// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT -// distribution for complete text of the license and disclaimer of any warranty. -// -// Alternatively, this file may be used under the terms of Open CASCADE -// commercial license or contractual agreement. - -#ifndef AIS_MapOfInteractive_HeaderFile -#define AIS_MapOfInteractive_HeaderFile - -#include -#include -#include - -typedef NCollection_Map AIS_MapOfInteractive; -typedef NCollection_Map::Iterator AIS_MapIteratorOfMapOfInteractive; - - -#endif diff --git a/src/AIS/FILES b/src/AIS/FILES index c9998c9945..8b670407e5 100644 --- a/src/AIS/FILES +++ b/src/AIS/FILES @@ -18,7 +18,6 @@ AIS_CameraFrustum.cxx AIS_CameraFrustum.hxx AIS_Circle.cxx AIS_Circle.hxx -AIS_ClearMode.hxx AIS_ColoredDrawer.hxx AIS_ColoredShape.cxx AIS_ColoredShape.hxx @@ -27,13 +26,8 @@ AIS_ColorScale.cxx AIS_ColorScale.hxx AIS_ConnectedInteractive.cxx AIS_ConnectedInteractive.hxx -AIS_ConnectStatus.hxx -AIS_DataMapIteratorOfDataMapofIntegerListOfinteractive.hxx AIS_DataMapIteratorOfDataMapOfIOStatus.hxx -AIS_DataMapIteratorOfDataMapOfSelStat.hxx -AIS_DataMapofIntegerListOfinteractive.hxx AIS_DataMapOfIOStatus.hxx -AIS_DataMapOfSelStat.hxx AIS_DisplayMode.hxx AIS_DisplayStatus.hxx AIS_DragAction.hxx @@ -43,7 +37,6 @@ AIS_GlobalStatus.cxx AIS_GlobalStatus.hxx AIS_GraphicTool.cxx AIS_GraphicTool.hxx -AIS_IndexedDataMapOfOwnerPrs.hxx AIS_InteractiveContext.cxx AIS_InteractiveContext.hxx AIS_InteractiveObject.cxx @@ -60,8 +53,6 @@ AIS_Manipulator.cxx AIS_ManipulatorMode.hxx AIS_ManipulatorOwner.hxx AIS_ManipulatorOwner.cxx -AIS_MapIteratorOfMapOfInteractive.hxx -AIS_MapOfInteractive.hxx AIS_MediaPlayer.cxx AIS_MediaPlayer.hxx AIS_MouseGesture.hxx diff --git a/src/ViewerTest/ViewerTest.cxx b/src/ViewerTest/ViewerTest.cxx index 7ea98430f3..1497516ff0 100644 --- a/src/ViewerTest/ViewerTest.cxx +++ b/src/ViewerTest/ViewerTest.cxx @@ -535,7 +535,6 @@ static void GetTypeAndSignfromString (const char* theName, #include #include #include -#include #include #include #include diff --git a/src/ViewerTest/ViewerTest_ObjectCommands.cxx b/src/ViewerTest/ViewerTest_ObjectCommands.cxx index b907983190..67b894bfeb 100644 --- a/src/ViewerTest/ViewerTest_ObjectCommands.cxx +++ b/src/ViewerTest/ViewerTest_ObjectCommands.cxx @@ -41,7 +41,6 @@ #include #include #include -#include #include #include #include diff --git a/src/ViewerTest/ViewerTest_RelationCommands.cxx b/src/ViewerTest/ViewerTest_RelationCommands.cxx index 86f7b557e9..1b5f656785 100644 --- a/src/ViewerTest/ViewerTest_RelationCommands.cxx +++ b/src/ViewerTest/ViewerTest_RelationCommands.cxx @@ -19,9 +19,6 @@ #include #include #include -#include -#include -#include #include #include #include From c8365a1c280fcbed1a89a6b6027a26e9f81f49ff Mon Sep 17 00:00:00 2001 From: kgv Date: Tue, 2 Nov 2021 16:23:25 +0300 Subject: [PATCH 131/639] 0032648: Visualization, TKOpenGles - support MSAA anti-aliasing within WebGL 2.0 OpenGl_FrameBuffer::Init() now creates MSAA render buffer in case if MSAA textures are unsupported. In this case OpenGl_View::prepareFrameBuffers() creates MSAA render buffer for main content and non-MSAA FBO for immediate content as blitting of MSAA render buffers into MSAA targets is unsupported by OpenGL ES 3.0. env.bat.in has been corrected to include path to custom ANGLE (GLES2_DIR) in front of Qt which might include its own older ANGLE build. --- adm/templates/env.bat.in | 8 +-- src/OpenGl/OpenGl_Context.cxx | 52 ++++++++++++-- src/OpenGl/OpenGl_Context.hxx | 47 +++++-------- src/OpenGl/OpenGl_FrameBuffer.cxx | 113 +++++++++++++++++++++++++++--- src/OpenGl/OpenGl_FrameBuffer.hxx | 46 ++++++++++-- src/OpenGl/OpenGl_Texture.cxx | 35 ++++++--- src/OpenGl/OpenGl_View.cxx | 32 +++++++-- src/OpenGl/OpenGl_Window.cxx | 4 +- 8 files changed, 268 insertions(+), 69 deletions(-) diff --git a/adm/templates/env.bat.in b/adm/templates/env.bat.in index 94e8db5cea..538ad7cc67 100644 --- a/adm/templates/env.bat.in +++ b/adm/templates/env.bat.in @@ -131,6 +131,10 @@ if exist "%CASROOT%\custom.bat" ( call "%CASROOT%\custom.bat" %VCVER% %ARCH% %CASDEB% ) +if not ["%QTDIR%"] == [""] ( + set "PATH=%QTDIR%/bin;%PATH%" + set "QT_PLUGIN_PATH=%QTDIR%/plugins" +) if not ["%TCL_DIR%"] == [""] set "PATH=%TCL_DIR%;%PATH%" if not ["%TK_DIR%"] == [""] set "PATH=%TK_DIR%;%PATH%" if not ["%FREETYPE_DIR%"] == [""] set "PATH=%FREETYPE_DIR%;%PATH%" @@ -141,10 +145,6 @@ if not ["%TBB_DIR%"] == [""] set "PATH=%TBB_DIR%;%PATH%" if not ["%VTK_DIR%"] == [""] set "PATH=%VTK_DIR%;%PATH%" if not ["%FFMPEG_DIR%"] == [""] set "PATH=%FFMPEG_DIR%;%PATH%" if not ["%OPENVR_DIR%"] == [""] set "PATH=%OPENVR_DIR%;%PATH%" -if not ["%QTDIR%"] == [""] ( - set "PATH=%QTDIR%/bin;%PATH%" - set "QT_PLUGIN_PATH=%QTDIR%/plugins" -) rem ----- Set path to 3rd party and OCCT libraries ----- if not "%CSF_OCCTBinPath%" == "" ( diff --git a/src/OpenGl/OpenGl_Context.cxx b/src/OpenGl/OpenGl_Context.cxx index 38c27c2015..da868a036c 100644 --- a/src/OpenGl/OpenGl_Context.cxx +++ b/src/OpenGl/OpenGl_Context.cxx @@ -184,6 +184,13 @@ OpenGl_Context::OpenGl_Context (const Handle(OpenGl_Caps)& theCaps) myClippingState (), myGlLibHandle (NULL), myFuncs (new OpenGl_GlFunctions()), + myGapi ( +#if defined(GL_ES_VERSION_2_0) + Aspect_GraphicsLibrary_OpenGLES +#else + Aspect_GraphicsLibrary_OpenGL +#endif + ), mySupportedFormats (new Image_SupportedFormats()), myAnisoMax (1), myTexClamp (GL_CLAMP_TO_EDGE), @@ -200,6 +207,7 @@ OpenGl_Context::OpenGl_Context (const Handle(OpenGl_Caps)& theCaps) myGlVerMinor (0), myIsInitialized (Standard_False), myIsStereoBuffers (Standard_False), + myHasMsaaTextures (Standard_False), myIsGlNormalizeEnabled (Standard_False), mySpriteTexUnit (Graphic3d_TextureUnit_PointSprite), myHasRayTracing (Standard_False), @@ -1386,6 +1394,7 @@ void OpenGl_Context::init (const Standard_Boolean theIsCoreProfile) // read version myGlVerMajor = 0; myGlVerMinor = 0; + myHasMsaaTextures = false; myMaxMsaaSamples = 0; myMaxDrawBuffers = 1; myMaxColorAttachments = 1; @@ -1573,25 +1582,26 @@ void OpenGl_Context::init (const Standard_Boolean theIsCoreProfile) myClippingState.Init(); #if defined(GL_ES_VERSION_2_0) - if (IsGlGreaterEqual (3, 1) - && myFuncs->glTexStorage2DMultisample != NULL) + if (IsGlGreaterEqual (3, 0)) { - // MSAA RenderBuffers have been defined in OpenGL ES 3.0, - // but MSAA Textures - only in OpenGL ES 3.1+ + // MSAA RenderBuffers have been defined in OpenGL ES 3.0, but MSAA Textures - only in OpenGL ES 3.1+ + myHasMsaaTextures = IsGlGreaterEqual (3, 1) + && myFuncs->glTexStorage2DMultisample != NULL; ::glGetIntegerv (GL_MAX_SAMPLES, &myMaxMsaaSamples); } #else if (core30 != NULL) { - // MSAA RenderBuffers have been defined in OpenGL 3.0, - // but MSAA Textures - only in OpenGL 3.2+ + // MSAA RenderBuffers have been defined in OpenGL 3.0, but MSAA Textures - only in OpenGL 3.2+ if (core32 != NULL) { + myHasMsaaTextures = true; ::glGetIntegerv (GL_MAX_SAMPLES, &myMaxMsaaSamples); } else if (CheckExtension ("GL_ARB_texture_multisample") && myFuncs->glTexImage2DMultisample != NULL) { + myHasMsaaTextures = true; GLint aNbColorSamples = 0, aNbDepthSamples = 0; ::glGetIntegerv (GL_MAX_COLOR_TEXTURE_SAMPLES, &aNbColorSamples); ::glGetIntegerv (GL_MAX_DEPTH_TEXTURE_SAMPLES, &aNbDepthSamples); @@ -1599,6 +1609,10 @@ void OpenGl_Context::init (const Standard_Boolean theIsCoreProfile) } } #endif + if (myMaxMsaaSamples <= 1) + { + myHasMsaaTextures = false; + } #if !defined(GL_ES_VERSION_2_0) if (core32 != NULL && isCoreProfile) @@ -2370,6 +2384,32 @@ Handle(OpenGl_FrameBuffer) OpenGl_Context::SetDefaultFrameBuffer (const Handle(O return aFbo; } +// ======================================================================= +// function : IsRender +// purpose : +// ======================================================================= +Standard_Boolean OpenGl_Context::IsRender() const +{ +#if !defined(GL_ES_VERSION_2_0) + return myRenderMode == GL_RENDER; +#else + return Standard_True; +#endif +} + +// ======================================================================= +// function : IsFeedback +// purpose : +// ======================================================================= +Standard_Boolean OpenGl_Context::IsFeedback() const +{ +#if !defined(GL_ES_VERSION_2_0) + return myRenderMode == GL_FEEDBACK; +#else + return Standard_False; +#endif +} + // ======================================================================= // function : SetShadingMaterial // purpose : diff --git a/src/OpenGl/OpenGl_Context.hxx b/src/OpenGl/OpenGl_Context.hxx index 27849d3169..e0cf8cdf1e 100644 --- a/src/OpenGl/OpenGl_Context.hxx +++ b/src/OpenGl/OpenGl_Context.hxx @@ -20,6 +20,7 @@ #include #include #include +#include #include #include #include @@ -330,6 +331,9 @@ public: return (theFuncPtr != NULL); } + //! Return active graphics library. + Aspect_GraphicsLibrary GraphicsLibrary() const { return myGapi; } + //! @return true if detected GL version is greater or equal to requested one. inline Standard_Boolean IsGlGreaterEqual (const Standard_Integer theVerMajor, const Standard_Integer theVerMinor) const @@ -367,24 +371,10 @@ public: Standard_EXPORT Standard_Boolean SetSwapInterval (const Standard_Integer theInterval); //! Return true if active mode is GL_RENDER (cached state) - Standard_Boolean IsRender() const - { - #if !defined(GL_ES_VERSION_2_0) - return myRenderMode == GL_RENDER; - #else - return Standard_True; - #endif - } + Standard_EXPORT Standard_Boolean IsRender() const; //! Return true if active mode is GL_FEEDBACK (cached state) - Standard_Boolean IsFeedback() const - { - #if !defined(GL_ES_VERSION_2_0) - return myRenderMode == GL_FEEDBACK; - #else - return Standard_False; - #endif - } + Standard_EXPORT Standard_Boolean IsFeedback() const; //! This function retrieves information from GL about free GPU memory that is: //! - OS-dependent. On some OS it is per-process and on others - for entire system. @@ -480,11 +470,9 @@ public: //! @return true if texture parameters GL_TEXTURE_BASE_LEVEL/GL_TEXTURE_MAX_LEVEL are supported. Standard_Boolean HasTextureBaseLevel() const { - #if !defined(GL_ES_VERSION_2_0) - return IsGlGreaterEqual (1, 2); - #else - return IsGlGreaterEqual (3, 0); - #endif + return myGapi == Aspect_GraphicsLibrary_OpenGLES + ? IsGlGreaterEqual (3, 0) + : IsGlGreaterEqual (1, 2); } //! Return map of supported texture formats. @@ -507,6 +495,9 @@ public: //! Return texture unit to be used for sprites (Graphic3d_TextureUnit_PointSprite by default). Graphic3d_TextureUnit SpriteTextureUnit() const { return mySpriteTexUnit; } + //! @return true if MSAA textures are supported. + Standard_Boolean HasTextureMultisampling() const { return myHasMsaaTextures; } + //! @return value for GL_MAX_SAMPLES Standard_Integer MaxMsaaSamples() const { return myMaxMsaaSamples; } @@ -721,16 +712,8 @@ public: Standard_EXPORT Standard_Boolean IncludeMessage (const unsigned int theSource, const unsigned int theId); - //! @return true if OpenGl context supports left and - //! right rendering buffers. - Standard_Boolean HasStereoBuffers() const - { - #if !defined(GL_ES_VERSION_2_0) - return myIsStereoBuffers; - #else - return Standard_False; - #endif - } + //! @return true if OpenGl context supports left and right rendering buffers. + Standard_Boolean HasStereoBuffers() const { return myIsStereoBuffers; } public: //! @name methods to alter or retrieve current state @@ -1110,6 +1093,7 @@ private: // context info void* myGlLibHandle; //!< optional handle to GL library NCollection_Handle myFuncs; //!< mega structure for all GL functions + Aspect_GraphicsLibrary myGapi; //!< GAPI name Handle(Image_SupportedFormats) mySupportedFormats; //!< map of supported texture formats Standard_Integer myAnisoMax; //!< maximum level of anisotropy texture filter @@ -1127,6 +1111,7 @@ private: // context info Standard_Integer myGlVerMinor; //!< cached GL version minor number Standard_Boolean myIsInitialized; //!< flag indicates initialization state Standard_Boolean myIsStereoBuffers; //!< context supports stereo buffering + Standard_Boolean myHasMsaaTextures; //!< context supports MSAA textures Standard_Boolean myIsGlNormalizeEnabled; //!< GL_NORMALIZE flag //!< Used to tell OpenGl that normals should be normalized Graphic3d_TextureUnit mySpriteTexUnit; //!< sampler2D occSamplerPointSprite, texture unit for point sprite texture diff --git a/src/OpenGl/OpenGl_FrameBuffer.cxx b/src/OpenGl/OpenGl_FrameBuffer.cxx index 1864da9a4f..6ee169946a 100644 --- a/src/OpenGl/OpenGl_FrameBuffer.cxx +++ b/src/OpenGl/OpenGl_FrameBuffer.cxx @@ -19,6 +19,7 @@ #include #include +#include #include IMPLEMENT_STANDARD_RTTIEXT(OpenGl_FrameBuffer,OpenGl_Resource) @@ -363,6 +364,13 @@ Standard_Boolean OpenGl_FrameBuffer::Init (const Handle(OpenGl_Context)& theGlCo return Standard_False; } + if (theNbSamples != 0 + && !theGlContext->HasTextureMultisampling() + && theGlContext->MaxMsaaSamples() > 1) + { + return InitRenderBuffer (theGlContext, theSize, theColorFormats, theDepthFormat, theNbSamples); + } + myIsOwnColor = true; myIsOwnBuffer = true; myIsOwnDepth = true; @@ -429,6 +437,16 @@ Standard_Boolean OpenGl_FrameBuffer::Init (const Handle(OpenGl_Context)& theGlCo theGlContext->arbFBO->glBindRenderbuffer (GL_RENDERBUFFER, myGlDepthRBufferId); theGlContext->arbFBO->glRenderbufferStorage (GL_RENDERBUFFER, aDepthStencilFormat, aSizeX, aSizeY); theGlContext->arbFBO->glBindRenderbuffer (GL_RENDERBUFFER, NO_RENDERBUFFER); + const GLenum aRendImgErr = theGlContext->core11fwd->glGetError(); + if (aRendImgErr != GL_NO_ERROR) + { + theGlContext->PushMessage (GL_DEBUG_SOURCE_APPLICATION, GL_DEBUG_TYPE_ERROR, 0, GL_DEBUG_SEVERITY_HIGH, + TCollection_AsciiString ("Error: FBO depth render buffer ") + aSizeX + "x" + aSizeY + + " IF: " + OpenGl_TextureFormat::FormatFormat (aDepthStencilFormat) + + " can not be created with error " + OpenGl_Context::FormatGlError (aRendImgErr) + "."); + Release (theGlContext.get()); + return Standard_False; + } } } @@ -535,8 +553,26 @@ Standard_Boolean OpenGl_FrameBuffer::InitWithRB (const Handle(OpenGl_Context)& t const Standard_Integer theDepthFormat, const unsigned int theColorRBufferFromWindow) { - myColorFormats.Clear(); - myColorFormats.Append (theColorFormat); + OpenGl_ColorFormats aColorFormats; + if (theColorFormat != 0) + { + aColorFormats.Append (theColorFormat); + } + return initRenderBuffer (theGlCtx, theSize, aColorFormats, theDepthFormat, 0, theColorRBufferFromWindow); +} + +// ======================================================================= +// function : initRenderBuffer +// purpose : +// ======================================================================= +Standard_Boolean OpenGl_FrameBuffer::initRenderBuffer (const Handle(OpenGl_Context)& theGlCtx, + const Graphic3d_Vec2i& theSize, + const OpenGl_ColorFormats& theColorFormats, + const Standard_Integer theDepthFormat, + const Standard_Integer theNbSamples, + const unsigned int theColorRBufferFromWindow) +{ + myColorFormats = theColorFormats; if (!myColorTextures.IsEmpty()) { Handle(OpenGl_Texture) aTexutre = myColorTextures.First(); @@ -549,7 +585,7 @@ Standard_Boolean OpenGl_FrameBuffer::InitWithRB (const Handle(OpenGl_Context)& t } myDepthFormat = theDepthFormat; - myNbSamples = 0; + myNbSamples = theNbSamples; myInitVPSizeX = theSize.x(); myInitVPSizeY = theSize.y(); if (theGlCtx->arbFBO == NULL) @@ -559,6 +595,14 @@ Standard_Boolean OpenGl_FrameBuffer::InitWithRB (const Handle(OpenGl_Context)& t // clean up previous state Release (theGlCtx.operator->()); + if (theNbSamples > theGlCtx->MaxMsaaSamples() + || theNbSamples < 0) + { + theGlCtx->PushMessage (GL_DEBUG_SOURCE_APPLICATION, GL_DEBUG_TYPE_ERROR, 0, GL_DEBUG_SEVERITY_HIGH, + TCollection_AsciiString ("Error: FBO creation failed - MSAA") + theNbSamples + + " render buffer exceeds samples limit: " + theGlCtx->MaxMsaaSamples() + ")."); + return Standard_False; + } myIsOwnColor = true; myIsOwnBuffer = true; @@ -575,11 +619,43 @@ Standard_Boolean OpenGl_FrameBuffer::InitWithRB (const Handle(OpenGl_Context)& t { myGlColorRBufferId = theColorRBufferFromWindow; } - else if (theColorFormat != 0) + else if (!theColorFormats.IsEmpty()) { + if (theColorFormats.Size() != 1) + { + throw Standard_NotImplemented ("Multiple color attachments as FBO render buffers are not implemented"); + } + + const GLint aColorFormat = theColorFormats.First(); + const OpenGl_TextureFormat aFormat = OpenGl_TextureFormat::FindSizedFormat (theGlCtx, aColorFormat); + if (!aFormat.IsValid()) + { + Release (theGlCtx.operator->()); + return Standard_False; + } + theGlCtx->arbFBO->glGenRenderbuffers (1, &myGlColorRBufferId); theGlCtx->arbFBO->glBindRenderbuffer (GL_RENDERBUFFER, myGlColorRBufferId); - theGlCtx->arbFBO->glRenderbufferStorage (GL_RENDERBUFFER, theColorFormat, aSizeX, aSizeY); + if (theNbSamples != 0) + { + theGlCtx->Functions()->glRenderbufferStorageMultisample (GL_RENDERBUFFER, theNbSamples, aFormat.InternalFormat(), aSizeX, aSizeY); + } + else + { + theGlCtx->arbFBO->glRenderbufferStorage (GL_RENDERBUFFER, aFormat.InternalFormat(), aSizeX, aSizeY); + } + theGlCtx->arbFBO->glBindRenderbuffer (GL_RENDERBUFFER, NO_RENDERBUFFER); + + const GLenum aRendImgErr = theGlCtx->core11fwd->glGetError(); + if (aRendImgErr != GL_NO_ERROR) + { + theGlCtx->PushMessage (GL_DEBUG_SOURCE_APPLICATION, GL_DEBUG_TYPE_ERROR, 0, GL_DEBUG_SEVERITY_HIGH, + TCollection_AsciiString ("Error: FBO color render buffer ") + aSizeX + "x" + aSizeY + "@" + theNbSamples + + " IF: " + OpenGl_TextureFormat::FormatFormat (aFormat.InternalFormat()) + + " can not be created with error " + OpenGl_Context::FormatGlError (aRendImgErr) + "."); + Release (theGlCtx.get()); + return Standard_False; + } } bool hasStencilRB = false; @@ -590,15 +666,36 @@ Standard_Boolean OpenGl_FrameBuffer::InitWithRB (const Handle(OpenGl_Context)& t theGlCtx->arbFBO->glGenRenderbuffers (1, &myGlDepthRBufferId); theGlCtx->arbFBO->glBindRenderbuffer (GL_RENDERBUFFER, myGlDepthRBufferId); - theGlCtx->arbFBO->glRenderbufferStorage (GL_RENDERBUFFER, myDepthFormat, aSizeX, aSizeY); + if (theNbSamples != 0) + { + theGlCtx->Functions()->glRenderbufferStorageMultisample (GL_RENDERBUFFER, theNbSamples, myDepthFormat, aSizeX, aSizeY); + } + else + { + theGlCtx->arbFBO->glRenderbufferStorage (GL_RENDERBUFFER, myDepthFormat, aSizeX, aSizeY); + } theGlCtx->arbFBO->glBindRenderbuffer (GL_RENDERBUFFER, NO_RENDERBUFFER); + + const GLenum aRendImgErr = theGlCtx->core11fwd->glGetError(); + if (aRendImgErr != GL_NO_ERROR) + { + theGlCtx->PushMessage (GL_DEBUG_SOURCE_APPLICATION, GL_DEBUG_TYPE_ERROR, 0, GL_DEBUG_SEVERITY_HIGH, + TCollection_AsciiString ("Error: FBO depth render buffer ") + aSizeX + "x" + aSizeY + "@" + theNbSamples + + " IF: " + OpenGl_TextureFormat::FormatFormat (myDepthFormat) + + " can not be created with error " + OpenGl_Context::FormatGlError (aRendImgErr) + "."); + Release (theGlCtx.get()); + return Standard_False; + } } // create FBO theGlCtx->arbFBO->glGenFramebuffers (1, &myGlFBufferId); theGlCtx->arbFBO->glBindFramebuffer (GL_FRAMEBUFFER, myGlFBufferId); - theGlCtx->arbFBO->glFramebufferRenderbuffer (GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, - GL_RENDERBUFFER, myGlColorRBufferId); + if (myGlColorRBufferId != NO_RENDERBUFFER) + { + theGlCtx->arbFBO->glFramebufferRenderbuffer (GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, + GL_RENDERBUFFER, myGlColorRBufferId); + } if (myGlDepthRBufferId != NO_RENDERBUFFER) { if (hasDepthStencilAttach (theGlCtx) && hasStencilRB) diff --git a/src/OpenGl/OpenGl_FrameBuffer.hxx b/src/OpenGl/OpenGl_FrameBuffer.hxx index ca34f1a7a6..3071c04cdc 100644 --- a/src/OpenGl/OpenGl_FrameBuffer.hxx +++ b/src/OpenGl/OpenGl_FrameBuffer.hxx @@ -165,9 +165,26 @@ public: //! (Re-)initialize FBO with properties taken from another FBO. Standard_Boolean InitLazy (const Handle(OpenGl_Context)& theGlCtx, - const OpenGl_FrameBuffer& theFbo) + const OpenGl_FrameBuffer& theFbo, + const Standard_Boolean theToKeepMsaa = true) { - return InitLazy (theGlCtx, Graphic3d_Vec2i (theFbo.myVPSizeX, theFbo.myVPSizeY), theFbo.myColorFormats, theFbo.myDepthFormat, theFbo.myNbSamples); + return InitLazy (theGlCtx, Graphic3d_Vec2i (theFbo.myVPSizeX, theFbo.myVPSizeY), theFbo.myColorFormats, theFbo.myDepthFormat, theToKeepMsaa ? theFbo.myNbSamples : 0); + } + + //! (Re-)initialize FBO with specified dimensions. + //! The Render Buffer Objects will be used for Color, Depth and Stencil attachments (as opposite to textures). + //! @param theGlCtx currently bound OpenGL context + //! @param theSize render buffer width x height + //! @param theColorFormats list of color render buffer sized format, e.g. GL_RGBA8; list should define only one element + //! @param theDepthFormat depth-stencil render buffer sized format, e.g. GL_DEPTH24_STENCIL8 + //! @param theNbSamples MSAA number of samples (0 means normal render buffer) + Standard_Boolean InitRenderBuffer (const Handle(OpenGl_Context)& theGlCtx, + const Graphic3d_Vec2i& theSize, + const OpenGl_ColorFormats& theColorFormats, + const Standard_Integer theDepthFormat, + const Standard_Integer theNbSamples = 0) + { + return initRenderBuffer (theGlCtx, theSize, theColorFormats, theDepthFormat, theNbSamples, 0); } //! (Re-)initialize FBO with specified dimensions. @@ -176,12 +193,12 @@ public: //! @param theSize render buffer width x height //! @param theColorFormat color render buffer sized format, e.g. GL_RGBA8 //! @param theDepthFormat depth-stencil render buffer sized format, e.g. GL_DEPTH24_STENCIL8 - //! @param theColorRBufferFromWindow when specified - should be ID of already initialized RB object, which will be released within this class + //! @param theColorRBufferFromWindow should be ID of already initialized RB object, which will be released within this class Standard_EXPORT Standard_Boolean InitWithRB (const Handle(OpenGl_Context)& theGlCtx, const Graphic3d_Vec2i& theSize, const Standard_Integer theColorFormat, const Standard_Integer theDepthFormat, - const unsigned int theColorRBufferFromWindow = 0); + const unsigned int theColorRBufferFromWindow); //! Initialize class from currently bound FBO. //! Retrieved OpenGL objects will not be destroyed on Release. @@ -220,9 +237,15 @@ public: //! Returns the depth-stencil texture. const Handle(OpenGl_Texture)& DepthStencilTexture() const { return myDepthStencilTexture; } + //! Returns TRUE if color Render Buffer is defined. + bool IsColorRenderBuffer() const { return myGlColorRBufferId != NO_RENDERBUFFER; } + //! Returns the color Render Buffer. unsigned int ColorRenderBuffer() const { return myGlColorRBufferId; } + //! Returns TRUE if depth Render Buffer is defined. + bool IsDepthStencilRenderBuffer() const { return myGlDepthRBufferId != NO_RENDERBUFFER; } + //! Returns the depth Render Buffer. unsigned int DepthStencilRenderBuffer() const { return myGlDepthRBufferId; } @@ -231,6 +254,21 @@ public: public: + //! (Re-)initialize FBO with specified dimensions. + //! The Render Buffer Objects will be used for Color, Depth and Stencil attachments (as opposite to textures). + //! @param theGlCtx currently bound OpenGL context + //! @param theSize render buffer width x height + //! @param theColorFormats list of color render buffer sized format, e.g. GL_RGBA8 + //! @param theDepthFormat depth-stencil render buffer sized format, e.g. GL_DEPTH24_STENCIL8 + //! @param theNbSamples MSAA number of samples (0 means normal render buffer) + //! @param theColorRBufferFromWindow when specified - should be ID of already initialized RB object, which will be released within this class + Standard_EXPORT Standard_Boolean initRenderBuffer (const Handle(OpenGl_Context)& theGlCtx, + const Graphic3d_Vec2i& theSize, + const OpenGl_ColorFormats& theColorFormats, + const Standard_Integer theDepthFormat, + const Standard_Integer theNbSamples, + const unsigned int theColorRBufferFromWindow); + //! Initialize FBO for rendering into single/multiple color buffer and depth textures. Standard_DEPRECATED("Obsolete method, use Init() taking Graphic3d_Vec2i") bool Init (const Handle(OpenGl_Context)& theGlCtx, diff --git a/src/OpenGl/OpenGl_Texture.cxx b/src/OpenGl/OpenGl_Texture.cxx index 759a12fe3f..1d1933ff23 100644 --- a/src/OpenGl/OpenGl_Texture.cxx +++ b/src/OpenGl/OpenGl_Texture.cxx @@ -712,9 +712,12 @@ bool OpenGl_Texture::Init2DMultisample (const Handle(OpenGl_Context)& theCtx, const Standard_Integer theSizeY) { if (!Create (theCtx) - || theNbSamples > theCtx->MaxMsaaSamples() - || theNbSamples < 1) + || theNbSamples > theCtx->MaxMsaaSamples() + || theNbSamples < 1) { + theCtx->PushMessage (GL_DEBUG_SOURCE_APPLICATION, GL_DEBUG_TYPE_ERROR, 0, GL_DEBUG_SEVERITY_HIGH, + TCollection_AsciiString ("Error: MSAA texture ") + theSizeX + "x" + theSizeY + "@" + myNbSamples + + " exceeds samples limit: " + theCtx->MaxMsaaSamples() + "."); return false; } @@ -724,26 +727,42 @@ bool OpenGl_Texture::Init2DMultisample (const Handle(OpenGl_Context)& theCtx, if(theSizeX > theCtx->MaxTextureSize() || theSizeY > theCtx->MaxTextureSize()) { + theCtx->PushMessage (GL_DEBUG_SOURCE_APPLICATION, GL_DEBUG_TYPE_ERROR, 0, GL_DEBUG_SEVERITY_HIGH, + TCollection_AsciiString ("Error: MSAA texture ") + theSizeX + "x" + theSizeY + "@" + myNbSamples + + " exceeds size limit: " + theCtx->MaxTextureSize() + "x" + theCtx->MaxTextureSize() + "."); return false; } Bind (theCtx); //myTextFormat = theTextFormat; mySizedFormat = theTextFormat; -#if !defined(GL_ES_VERSION_2_0) - if (theCtx->Functions()->glTexStorage2DMultisample != NULL) + if (theCtx->HasTextureMultisampling() + && theCtx->Functions()->glTexStorage2DMultisample != NULL) { theCtx->Functions()->glTexStorage2DMultisample (myTarget, myNbSamples, theTextFormat, theSizeX, theSizeY, GL_FALSE); } - else +#if !defined(GL_ES_VERSION_2_0) + else if (theCtx->HasTextureMultisampling() + && theCtx->Functions()->glTexImage2DMultisample != NULL) { theCtx->Functions()->glTexImage2DMultisample (myTarget, myNbSamples, theTextFormat, theSizeX, theSizeY, GL_FALSE); } -#else - theCtx->Functions() ->glTexStorage2DMultisample (myTarget, myNbSamples, theTextFormat, theSizeX, theSizeY, GL_FALSE); #endif - if (theCtx->core11fwd->glGetError() != GL_NO_ERROR) + else { + theCtx->PushMessage (GL_DEBUG_SOURCE_APPLICATION, GL_DEBUG_TYPE_ERROR, 0, GL_DEBUG_SEVERITY_HIGH, + "Error: MSAA textures are not supported by hardware."); + Unbind (theCtx); + return false; + } + + const GLenum aTexImgErr = theCtx->core11fwd->glGetError(); + if (aTexImgErr != GL_NO_ERROR) + { + theCtx->PushMessage (GL_DEBUG_SOURCE_APPLICATION, GL_DEBUG_TYPE_ERROR, 0, GL_DEBUG_SEVERITY_HIGH, + TCollection_AsciiString ("Error: MSAA texture ") + theSizeX + "x" + theSizeY + "@" + myNbSamples + + " IF: " + OpenGl_TextureFormat::FormatFormat (theTextFormat) + + " cannot be created with error " + OpenGl_Context::FormatGlError (aTexImgErr) + "."); Unbind (theCtx); return false; } diff --git a/src/OpenGl/OpenGl_View.cxx b/src/OpenGl/OpenGl_View.cxx index a2d17ad6a5..c636f9252b 100644 --- a/src/OpenGl/OpenGl_View.cxx +++ b/src/OpenGl/OpenGl_View.cxx @@ -1106,6 +1106,11 @@ bool OpenGl_View::prepareFrameBuffers (Graphic3d_Camera::Projection& theProj) { aNbSamples = OpenGl_Context::GetPowerOfTwo (aNbSamples, aCtx->MaxMsaaSamples()); } + // Only MSAA textures can be blit into MSAA target, + // while render buffers could be resolved only into non-MSAA targets. + // As result, within obsolete OpenGL ES 3.0 context, we may create only one MSAA render buffer for main scene content + // and blit it into non-MSAA immediate FBO. + const bool hasTextureMsaa = aCtx->HasTextureMultisampling(); bool toUseOit = myRenderParams.TransparencyMethod != Graphic3d_RTM_BLEND_UNORDERED && checkOitCompatibility (aCtx, aNbSamples > 0); @@ -1156,7 +1161,7 @@ bool OpenGl_View::prepareFrameBuffers (Graphic3d_Camera::Projection& theProj) if (myMainSceneFbos[0]->IsValid() && (toInitImmediateFbo || myImmediateSceneFbos[0]->IsValid())) { const bool wasFailedImm0 = checkWasFailedFbo (myImmediateSceneFbos[0], myMainSceneFbos[0]); - if (!myImmediateSceneFbos[0]->InitLazy (aCtx, *myMainSceneFbos[0]) + if (!myImmediateSceneFbos[0]->InitLazy (aCtx, *myMainSceneFbos[0], hasTextureMsaa) && !wasFailedImm0) { TCollection_ExtendedString aMsg = TCollection_ExtendedString() + "Error! Immediate FBO " @@ -1200,7 +1205,7 @@ bool OpenGl_View::prepareFrameBuffers (Graphic3d_Camera::Projection& theProj) && myMainSceneFbos[0]->IsValid()) { const bool wasFailedMain1 = checkWasFailedFbo (myMainSceneFbos[1], myMainSceneFbos[0]); - if (!myMainSceneFbos[1]->InitLazy (aCtx, *myMainSceneFbos[0]) + if (!myMainSceneFbos[1]->InitLazy (aCtx, *myMainSceneFbos[0], true) && !wasFailedMain1) { TCollection_ExtendedString aMsg = TCollection_ExtendedString() + "Error! Main FBO (second) " @@ -1221,14 +1226,14 @@ bool OpenGl_View::prepareFrameBuffers (Graphic3d_Camera::Projection& theProj) { const bool wasFailedImm0 = checkWasFailedFbo (myImmediateSceneFbos[0], myMainSceneFbos[0]); const bool wasFailedImm1 = checkWasFailedFbo (myImmediateSceneFbos[1], myMainSceneFbos[0]); - if (!myImmediateSceneFbos[0]->InitLazy (aCtx, *myMainSceneFbos[0]) + if (!myImmediateSceneFbos[0]->InitLazy (aCtx, *myMainSceneFbos[0], hasTextureMsaa) && !wasFailedImm0) { TCollection_ExtendedString aMsg = TCollection_ExtendedString() + "Error! Immediate FBO (first) " + printFboFormat (myImmediateSceneFbos[0]) + " initialization has failed"; aCtx->PushMessage (GL_DEBUG_SOURCE_APPLICATION, GL_DEBUG_TYPE_ERROR, 0, GL_DEBUG_SEVERITY_HIGH, aMsg); } - if (!myImmediateSceneFbos[1]->InitLazy (aCtx, *myMainSceneFbos[0]) + if (!myImmediateSceneFbos[1]->InitLazy (aCtx, *myMainSceneFbos[0], hasTextureMsaa) && !wasFailedImm1) { TCollection_ExtendedString aMsg = TCollection_ExtendedString() + "Error! Immediate FBO (first) " @@ -2649,9 +2654,22 @@ bool OpenGl_View::blitBuffers (OpenGl_FrameBuffer* theReadFbo, aCtx->SetColorMask (true); // restore default alpha component write state const bool toApplyGamma = aCtx->ToRenderSRGB() != aCtx->IsFrameBufferSRGB(); - if (aCtx->arbFBOBlit != NULL - && !toApplyGamma - && theReadFbo->NbSamples() != 0) + bool toDrawTexture = true; + if (aCtx->arbFBOBlit != NULL) + { + if (!toApplyGamma + && theReadFbo->NbSamples() != 0) + { + toDrawTexture = false; + } + if (theReadFbo->IsColorRenderBuffer()) + { + // render buffers could be resolved only via glBlitFramebuffer() + toDrawTexture = false; + } + } + + if (!toDrawTexture) { GLbitfield aCopyMask = 0; theReadFbo->BindReadBuffer (aCtx); diff --git a/src/OpenGl/OpenGl_Window.cxx b/src/OpenGl/OpenGl_Window.cxx index f722dfdc53..89140cdea7 100644 --- a/src/OpenGl/OpenGl_Window.cxx +++ b/src/OpenGl/OpenGl_Window.cxx @@ -785,7 +785,9 @@ void OpenGl_Window::Init() aDefFbo = new OpenGl_FrameBuffer(); } - if (!aDefFbo->InitWithRB (myGlContext, Graphic3d_Vec2i (myWidth, myHeight), GL_RGBA8, GL_DEPTH24_STENCIL8)) + OpenGl_ColorFormats aColorFormats; + aColorFormats.Append (GL_RGBA8); + if (!aDefFbo->InitRenderBuffer (myGlContext, Graphic3d_Vec2i (myWidth, myHeight), aColorFormats, GL_DEPTH24_STENCIL8)) { TCollection_AsciiString aMsg ("OpenGl_Window::CreateWindow: default FBO creation failed"); throw Aspect_GraphicDeviceDefinitionError(aMsg.ToCString()); From 794b3d89365744983166c7fab8e8d17814c5a3f2 Mon Sep 17 00:00:00 2001 From: kgv Date: Tue, 9 Nov 2021 15:17:43 +0300 Subject: [PATCH 132/639] 0032652: Visualization - Select3D_SensitiveCylinder returns wrong 3D point on transformed shape SelectMgr_RectangularFrustum::OverlapsCylinder() - added missing 3D point transformation. StdSelect_BRepSelectionTool::ComputeSensitive() - fixed cylinder height computation on TopoDS_Shape with scale transformation. SelectMgr_AxisIntersector::OverlapsCylinder(),::OverlapsSphere() - added missing computations of surface normal. --- src/SelectMgr/SelectMgr_AxisIntersector.cxx | 19 ++++++++ .../SelectMgr_RectangularFrustum.cxx | 16 ++++--- src/StdSelect/StdSelect_BRepSelectionTool.cxx | 26 ++++++----- tests/vselect/cone_cylinder/begin | 2 - tests/vselect/cone_cylinder/check_depth | 3 ++ tests/vselect/cone_cylinder/detecting | 3 ++ tests/vselect/cone_cylinder/generate_images | 3 ++ tests/vselect/cone_cylinder/polygon_selection | 3 ++ .../vselect/cone_cylinder/rectangle_selection | 3 ++ .../cone_cylinder/single_click_selection_cone | 3 ++ .../single_click_selection_cylinder | 3 ++ .../single_click_selection_trunc_cone | 3 ++ tests/vselect/cone_cylinder/trsf_cone | 40 +++++++++++++++++ tests/vselect/cone_cylinder/trsf_cyl | 40 +++++++++++++++++ tests/vselect/sphere/begin | 2 - tests/vselect/sphere/check_depth | 3 ++ tests/vselect/sphere/detecting | 3 ++ tests/vselect/sphere/generate_images | 3 ++ tests/vselect/sphere/polygon_selection | 3 ++ tests/vselect/sphere/rectangle_selection | 3 ++ tests/vselect/sphere/single_click_selection | 3 ++ tests/vselect/sphere/trsf | 43 +++++++++++++++++++ 22 files changed, 209 insertions(+), 21 deletions(-) delete mode 100644 tests/vselect/cone_cylinder/begin create mode 100644 tests/vselect/cone_cylinder/trsf_cone create mode 100644 tests/vselect/cone_cylinder/trsf_cyl delete mode 100644 tests/vselect/sphere/begin create mode 100644 tests/vselect/sphere/trsf diff --git a/src/SelectMgr/SelectMgr_AxisIntersector.cxx b/src/SelectMgr/SelectMgr_AxisIntersector.cxx index ec27694381..f6660a035d 100644 --- a/src/SelectMgr/SelectMgr_AxisIntersector.cxx +++ b/src/SelectMgr/SelectMgr_AxisIntersector.cxx @@ -543,7 +543,11 @@ Standard_Boolean SelectMgr_AxisIntersector::OverlapsSphere (const gp_Pnt& theCen return Standard_False; } + const gp_Pnt aPntOnSphere (myAxis.Location().XYZ() + myAxis.Direction().XYZ() * aDepth); + const gp_Vec aNormal (aPntOnSphere.XYZ() - theCenter.XYZ()); thePickResult.SetDepth (aDepth); + thePickResult.SetPickedPoint (aPntOnSphere); + thePickResult.SetSurfaceNormal (aNormal); return Standard_True; } @@ -576,7 +580,22 @@ Standard_Boolean SelectMgr_AxisIntersector::OverlapsCylinder (const Standard_Rea { return false; } + + const gp_Pnt aPntOnCylinder = aLoc.XYZ() + aRayDir.XYZ() * aDepth; thePickResult.SetDepth (aDepth); + thePickResult.SetPickedPoint (aPntOnCylinder.Transformed (theTrsf)); + if (Abs (aPntOnCylinder.Z()) < Precision::Confusion()) + { + thePickResult.SetSurfaceNormal (-gp::DZ().Transformed (theTrsf)); + } + else if (Abs (aPntOnCylinder.Z() - theHeight) < Precision::Confusion()) + { + thePickResult.SetSurfaceNormal (gp::DZ().Transformed (theTrsf)); + } + else + { + thePickResult.SetSurfaceNormal (gp_Vec (aPntOnCylinder.X(), aPntOnCylinder.Y(), 0.0).Transformed (theTrsf)); + } return true; } diff --git a/src/SelectMgr/SelectMgr_RectangularFrustum.cxx b/src/SelectMgr/SelectMgr_RectangularFrustum.cxx index 44354f1f84..12f45aac66 100644 --- a/src/SelectMgr/SelectMgr_RectangularFrustum.cxx +++ b/src/SelectMgr/SelectMgr_RectangularFrustum.cxx @@ -753,20 +753,24 @@ Standard_Boolean SelectMgr_RectangularFrustum::OverlapsCylinder (const Standard_ { Standard_ASSERT_RAISE (mySelectionType == SelectMgr_SelectionType_Point || mySelectionType == SelectMgr_SelectionType_Box, "Error! SelectMgr_RectangularFrustum::Overlaps() should be called after selection frustum initialization"); - Standard_Real aTimeEnter = 0.0, aTimeLeave = 0.0; + Standard_Real aTimes[2] = { 0.0, 0.0 }; const gp_Trsf aTrsfInv = theTrsf.Inverted(); const gp_Pnt aLoc = myNearPickedPnt.Transformed (aTrsfInv); const gp_Dir aRayDir = myViewRayDir .Transformed (aTrsfInv); - if (!RayCylinderIntersection (theBottomRad, theTopRad, theHeight, aLoc, aRayDir, aTimeEnter, aTimeLeave)) + if (!RayCylinderIntersection (theBottomRad, theTopRad, theHeight, aLoc, aRayDir, aTimes[0], aTimes[1])) { return Standard_False; } - thePickResult.SetDepth (aTimeEnter * myScale); + + Standard_Integer aResTime = 0; + thePickResult.SetDepth (aTimes[aResTime] * myScale); if (theClipRange.IsClipped (thePickResult.Depth())) { - thePickResult.SetDepth (aTimeLeave * myScale); + aResTime = 1; + thePickResult.SetDepth (aTimes[aResTime] * myScale); } - const gp_Pnt aPntOnCylinder (aLoc.XYZ() + aRayDir.XYZ() * thePickResult.Depth()); + + const gp_Pnt aPntOnCylinder = aLoc.XYZ() + aRayDir.XYZ() * aTimes[aResTime]; if (Abs (aPntOnCylinder.Z()) < Precision::Confusion()) { thePickResult.SetSurfaceNormal (-gp::DZ().Transformed (theTrsf)); @@ -779,7 +783,7 @@ Standard_Boolean SelectMgr_RectangularFrustum::OverlapsCylinder (const Standard_ { thePickResult.SetSurfaceNormal (gp_Vec (aPntOnCylinder.X(), aPntOnCylinder.Y(), 0.0).Transformed (theTrsf)); } - thePickResult.SetPickedPoint (aPntOnCylinder); + thePickResult.SetPickedPoint (aPntOnCylinder.Transformed (theTrsf)); return !theClipRange.IsClipped (thePickResult.Depth()); } diff --git a/src/StdSelect/StdSelect_BRepSelectionTool.cxx b/src/StdSelect/StdSelect_BRepSelectionTool.cxx index ce3ecbf5be..c62dc54462 100644 --- a/src/StdSelect/StdSelect_BRepSelectionTool.cxx +++ b/src/StdSelect/StdSelect_BRepSelectionTool.cxx @@ -280,11 +280,11 @@ void StdSelect_BRepSelectionTool::ComputeSensitive (const TopoDS_Shape& theShape &TopoDS::Face (aSubfacesMap.FindKey (2)) }; - TopLoc_Location aLocSurf; + TopLoc_Location aLocSurf[2]; const Handle(Geom_Surface)* aSurfaces[2] = { - &BRep_Tool::Surface (*aFaces[0], aLocSurf), - &BRep_Tool::Surface (*aFaces[1], aLocSurf) + &BRep_Tool::Surface (*aFaces[0], aLocSurf[0]), + &BRep_Tool::Surface (*aFaces[1], aLocSurf[1]) }; Standard_Integer aConIndex = 0; @@ -308,7 +308,7 @@ void StdSelect_BRepSelectionTool::ComputeSensitive (const TopoDS_Shape& theShape const Standard_Real aRad1 = aCone.RefRadius(); const Standard_Real aHeight = (aRad1 != 0.0) ? aRad1 / Abs (Tan (aCone.SemiAngle())) - : aCone.Location().Distance (aGeomPln->Location()); + : aCone.Location().Distance (aGeomPln->Location().Transformed (aLocSurf[aConIndex == 0 ? 1 : 0])); const Standard_Real aRad2 = (aRad1 != 0.0) ? 0.0 : Tan (aCone.SemiAngle()) * aHeight; gp_Trsf aTrsf; aTrsf.SetTransformation (aCone.Position(), gp_Ax3()); @@ -326,18 +326,19 @@ void StdSelect_BRepSelectionTool::ComputeSensitive (const TopoDS_Shape& theShape &TopoDS::Face (aSubfacesMap.FindKey (3)) }; - TopLoc_Location aLocSurf; + TopLoc_Location aLocSurf[3]; const Handle(Geom_Surface)* aSurfaces[3] = { - &BRep_Tool::Surface (*aFaces[0], aLocSurf), - &BRep_Tool::Surface (*aFaces[1], aLocSurf), - &BRep_Tool::Surface (*aFaces[2], aLocSurf) + &BRep_Tool::Surface (*aFaces[0], aLocSurf[0]), + &BRep_Tool::Surface (*aFaces[1], aLocSurf[1]), + &BRep_Tool::Surface (*aFaces[2], aLocSurf[2]) }; Standard_Integer aConIndex = -1, aNbPlanes = 0; Handle(Geom_ConicalSurface) aGeomCone; Handle(Geom_CylindricalSurface) aGeomCyl; Handle(Geom_Plane) aGeomPlanes[2]; + const TopLoc_Location* aGeomPlanesLoc[2]; for (Standard_Integer aSurfIter = 0; aSurfIter < 3; ++aSurfIter) { const Handle(Geom_Surface)& aSurf = *aSurfaces[aSurfIter]; @@ -361,6 +362,7 @@ void StdSelect_BRepSelectionTool::ComputeSensitive (const TopoDS_Shape& theShape aGeomPlanes[aNbPlanes] = Handle(Geom_Plane)::DownCast (aSurf); if (!aGeomPlanes[aNbPlanes].IsNull()) { + aGeomPlanesLoc[aNbPlanes] = &aLocSurf[aSurfIter]; ++aNbPlanes; } } @@ -375,7 +377,8 @@ void StdSelect_BRepSelectionTool::ComputeSensitive (const TopoDS_Shape& theShape { const gp_Cone aCone = BRepAdaptor_Surface (*aFaces[aConIndex]).Cone(); const Standard_Real aRad1 = aCone.RefRadius(); - const Standard_Real aHeight = aGeomPlanes[0]->Location().Distance (aGeomPlanes[1]->Location()); + const Standard_Real aHeight = aGeomPlanes[0]->Location().Transformed (*aGeomPlanesLoc[0]) + .Distance (aGeomPlanes[1]->Location().Transformed (*aGeomPlanesLoc[1])); gp_Trsf aTrsf; aTrsf.SetTransformation (aCone.Position(), gp_Ax3()); const Standard_Real aTriangleHeight = (aCone.SemiAngle() > 0.0) @@ -398,7 +401,8 @@ void StdSelect_BRepSelectionTool::ComputeSensitive (const TopoDS_Shape& theShape { const gp_Cylinder aCyl = BRepAdaptor_Surface (*aFaces[aConIndex]).Cylinder(); const Standard_Real aRad = aCyl.Radius(); - const Standard_Real aHeight = aGeomPlanes[0]->Location().Distance (aGeomPlanes[1]->Location()); + const Standard_Real aHeight = aGeomPlanes[0]->Location().Transformed (*aGeomPlanesLoc[0]) + .Distance (aGeomPlanes[1]->Location().Transformed (*aGeomPlanesLoc[1])); gp_Trsf aTrsf; aTrsf.SetTransformation (aCyl.Position(), gp_Ax3()); Handle(Select3D_SensitiveCylinder) aSensSCyl = new Select3D_SensitiveCylinder (theOwner, aRad, aRad, aHeight, aTrsf); @@ -410,7 +414,7 @@ void StdSelect_BRepSelectionTool::ComputeSensitive (const TopoDS_Shape& theShape for (Standard_Integer aShIndex = 1; aShIndex <= aSubfacesMap.Extent(); ++aShIndex) { - ComputeSensitive (aSubfacesMap (aShIndex), theOwner, + ComputeSensitive (aSubfacesMap.FindKey (aShIndex), theOwner, theSelection, theDeflection, theDeviationAngle, theNbPOnEdge, theMaxParam, isAutoTriangulation); } diff --git a/tests/vselect/cone_cylinder/begin b/tests/vselect/cone_cylinder/begin deleted file mode 100644 index 26ce00044f..0000000000 --- a/tests/vselect/cone_cylinder/begin +++ /dev/null @@ -1,2 +0,0 @@ -vinit View1 -height 400 -width 600 -set subgroup "cone_cylinder" diff --git a/tests/vselect/cone_cylinder/check_depth b/tests/vselect/cone_cylinder/check_depth index f4ba540ad1..d3d8df71f3 100644 --- a/tests/vselect/cone_cylinder/check_depth +++ b/tests/vselect/cone_cylinder/check_depth @@ -3,6 +3,9 @@ puts "0032281: Visualization - add Select3D_SensitiveCylinder" puts "Tests depth value returned by Select3D_SensitiveCylinder" puts "=================================" +pload MODELING VISUALIZATION +vinit View1 -height 400 -width 600 + pcylinder cyl 10 20 vdisplay cyl -dispmode 1 vfit diff --git a/tests/vselect/cone_cylinder/detecting b/tests/vselect/cone_cylinder/detecting index 0608ca670c..8372576033 100644 --- a/tests/vselect/cone_cylinder/detecting +++ b/tests/vselect/cone_cylinder/detecting @@ -3,6 +3,9 @@ puts "0032281: Visualization - add Select3D_SensitiveCylinder" puts "Tests detecting Select3D_SensitiveCylinder" puts "=================================" +pload MODELING VISUALIZATION +vinit View1 -height 400 -width 600 + pcylinder cyl 10 20 vdisplay cyl -dispmode 1 vfit diff --git a/tests/vselect/cone_cylinder/generate_images b/tests/vselect/cone_cylinder/generate_images index 5bc5d10b1d..787fb07c6e 100644 --- a/tests/vselect/cone_cylinder/generate_images +++ b/tests/vselect/cone_cylinder/generate_images @@ -3,6 +3,9 @@ puts "0032281: Visualization - add Select3D_SensitiveCylinder" puts "Generating images based on detection of Select3D_SensitiveCylinder" puts "=================================" +pload MODELING VISUALIZATION +vinit View1 -height 400 -width 600 + pcylinder cyl 10 20 vdisplay cyl -dispmode 1 vfit diff --git a/tests/vselect/cone_cylinder/polygon_selection b/tests/vselect/cone_cylinder/polygon_selection index 1f5ae6a65d..56e26fdbbf 100644 --- a/tests/vselect/cone_cylinder/polygon_selection +++ b/tests/vselect/cone_cylinder/polygon_selection @@ -3,6 +3,9 @@ puts "0032281: Visualization - add Select3D_SensitiveCylinder" puts "Tests polygon selection of Select3D_SensitiveCylinder" puts "=================================" +pload MODELING VISUALIZATION +vinit View1 -height 400 -width 600 + pcylinder c1 10 20 pcone c2 10 0 20 pcone c3 10 5 10 diff --git a/tests/vselect/cone_cylinder/rectangle_selection b/tests/vselect/cone_cylinder/rectangle_selection index 6fa39a7877..3667a81d4f 100644 --- a/tests/vselect/cone_cylinder/rectangle_selection +++ b/tests/vselect/cone_cylinder/rectangle_selection @@ -3,6 +3,9 @@ puts "0032281: Visualization - add Select3D_SensitiveCylinder" puts "Tests rectangular selection of Select3D_SensitiveCylinder" puts "=================================" +pload MODELING VISUALIZATION +vinit View1 -height 400 -width 600 + pcylinder c1 10 20 pcone c2 10 0 20 pcone c3 10 5 10 diff --git a/tests/vselect/cone_cylinder/single_click_selection_cone b/tests/vselect/cone_cylinder/single_click_selection_cone index 9dc996baed..bd30de6825 100644 --- a/tests/vselect/cone_cylinder/single_click_selection_cone +++ b/tests/vselect/cone_cylinder/single_click_selection_cone @@ -3,6 +3,9 @@ puts "0032281: Visualization - add Select3D_SensitiveCylinder" puts "Tests selection of Select3D_SensitiveCylinder" puts "=================================" +pload MODELING VISUALIZATION +vinit View1 -height 400 -width 600 + pcone cone 10 0 20 vdisplay cone -dispmode 1 vfit diff --git a/tests/vselect/cone_cylinder/single_click_selection_cylinder b/tests/vselect/cone_cylinder/single_click_selection_cylinder index 15148b8a30..f391802dad 100644 --- a/tests/vselect/cone_cylinder/single_click_selection_cylinder +++ b/tests/vselect/cone_cylinder/single_click_selection_cylinder @@ -3,6 +3,9 @@ puts "0032281: Visualization - add Select3D_SensitiveCylinder" puts "Tests selection of Select3D_SensitiveCylinder" puts "=================================" +pload MODELING VISUALIZATION +vinit View1 -height 400 -width 600 + pcylinder cyl 10 20 vdisplay cyl -dispmode 1 vfit diff --git a/tests/vselect/cone_cylinder/single_click_selection_trunc_cone b/tests/vselect/cone_cylinder/single_click_selection_trunc_cone index 315910e8b1..6ce8decb5b 100644 --- a/tests/vselect/cone_cylinder/single_click_selection_trunc_cone +++ b/tests/vselect/cone_cylinder/single_click_selection_trunc_cone @@ -3,6 +3,9 @@ puts "0032281: Visualization - add Select3D_SensitiveCylinder" puts "Tests selection of Select3D_SensitiveCylinder" puts "=================================" +pload MODELING VISUALIZATION +vinit View1 -height 400 -width 600 + pcone tr_cone 10 5 10 vdisplay tr_cone -dispmode 1 vfit diff --git a/tests/vselect/cone_cylinder/trsf_cone b/tests/vselect/cone_cylinder/trsf_cone new file mode 100644 index 0000000000..a87ecd58d4 --- /dev/null +++ b/tests/vselect/cone_cylinder/trsf_cone @@ -0,0 +1,40 @@ +puts "=================================" +puts "0032652: Visualization - Select3D_SensitiveCylinder returns wrong 3D point on transformed shape" +puts "Check picking of transformed cone" +puts "=================================" + +pload MODELING VISUALIZATION +pcone c 10 5 10 +fscale c 0 0 0 0.1 +trotate c 0 0 0 1 1 0 25 +ttranslate c 2500 3500 1000 + +vinit View1 + +# check Select3D_SensitiveTriangulation +vclear +vaxo +compound {*}[explode c Sh] cc +vdisplay -dispmode 1 cc +vfit +vselaxis 2500 3498 1001 0 1 0 -display a -showNormal +set aPntTris [vmoveto 200 200] +vpoint pp {*}$aPntTris +checkpoint aPntTris_p $aPntTris {2500.42 3499.54 1000.81} 0.1 +if { ![string match "*Select3D_SensitiveTriangulation*" [vstate -entities]] } { puts "Error: triangulation should be detected" } +vfit +vdump $imagedir/${casename}_prs_tris.png +vseldump $imagedir/${casename}_selnorm_tris.png -type surfNormal + +# check Select3D_SensitiveCylinder +vclear +vdisplay -dispmode 1 c +vfit +vselaxis 2500 3498 1001 0 1 0 -display a -showNormal +set aPntCone [vmoveto 200 200] +vpoint pp {*}$aPntCone +checkpoint aPntCone_p $aPntCone {2500.42 3499.54 1000.81} 0.1 +if { ![string match "*Select3D_SensitiveCylinder*" [vstate -entities]] } { puts "Error: cylinder should be detected" } +vfit +vdump $imagedir/${casename}_prs_cyl.png +vseldump $imagedir/${casename}_selnorm_cyl.png -type surfNormal diff --git a/tests/vselect/cone_cylinder/trsf_cyl b/tests/vselect/cone_cylinder/trsf_cyl new file mode 100644 index 0000000000..6711eb2609 --- /dev/null +++ b/tests/vselect/cone_cylinder/trsf_cyl @@ -0,0 +1,40 @@ +puts "=================================" +puts "0032652: Visualization - Select3D_SensitiveCylinder returns wrong 3D point on transformed shape" +puts "Check picking of transformed cylinder" +puts "=================================" + +pload MODELING VISUALIZATION +pcylinder c 10 20 +fscale c 0 0 0 0.1 +trotate c 0 0 0 1 1 0 25 +ttranslate c 2500 3500 1000 + +vinit View1 + +# check Select3D_SensitiveTriangulation +vclear +vaxo +compound {*}[explode c Sh] cc +vdisplay -dispmode 1 cc +vfit +vselaxis 2500 3498 1001 0 1 0 -display a -showNormal +set aPntTris [vmoveto 200 200] +vpoint pp {*}$aPntTris +checkpoint aPntTris_p $aPntTris {2500.9 3499.0 1001.6} 0.1 +if { ![string match "*Select3D_SensitiveTriangulation*" [vstate -entities]] } { puts "Error: triangulation should be detected" } +vfit +vdump $imagedir/${casename}_prs_tris.png +vseldump $imagedir/${casename}_selnorm_tris.png -type surfNormal + +# check Select3D_SensitiveCylinder +vclear +vdisplay -dispmode 1 c +vfit +vselaxis 2500 3498 1001 0 1 0 -display a -showNormal +set aPntCyl [vmoveto 200 200] +vpoint pp {*}$aPntCyl +checkpoint aPntCyl_p $aPntCyl {2500.9 3499.0 1001.6} 0.1 +if { ![string match "*Select3D_SensitiveCylinder*" [vstate -entities]] } { puts "Error: cylinder should be detected" } +vfit +vdump $imagedir/${casename}_prs_cyl.png +vseldump $imagedir/${casename}_selnorm_cyl.png -type surfNormal diff --git a/tests/vselect/sphere/begin b/tests/vselect/sphere/begin deleted file mode 100644 index 0442e42a99..0000000000 --- a/tests/vselect/sphere/begin +++ /dev/null @@ -1,2 +0,0 @@ -vinit View1 -height 400 -width 600 -set subgroup "sphere" diff --git a/tests/vselect/sphere/check_depth b/tests/vselect/sphere/check_depth index 6d38a5b922..4a4c0a38d3 100644 --- a/tests/vselect/sphere/check_depth +++ b/tests/vselect/sphere/check_depth @@ -3,6 +3,9 @@ puts "0032182: Visualization - add Select3D_SensitiveSphere" puts "Tests depth value returned by Select3D_SenstiveSphere" puts "=================================" +pload MODELING VISUALIZATION +vinit View1 -height 400 -width 600 + psphere s 1 vdisplay -dispMode 1 s vfit diff --git a/tests/vselect/sphere/detecting b/tests/vselect/sphere/detecting index a42120b842..885b94734d 100644 --- a/tests/vselect/sphere/detecting +++ b/tests/vselect/sphere/detecting @@ -3,6 +3,9 @@ puts "0032182: Visualization - add Select3D_SensitiveSphere" puts "Tests detecting Select3D_SenstiveSphere" puts "=================================" +pload MODELING VISUALIZATION +vinit View1 -height 400 -width 600 + psphere s 1 vdisplay -dispMode 1 s vfit diff --git a/tests/vselect/sphere/generate_images b/tests/vselect/sphere/generate_images index 929fbff633..407f7f09d6 100644 --- a/tests/vselect/sphere/generate_images +++ b/tests/vselect/sphere/generate_images @@ -3,6 +3,9 @@ puts "000032366: Visualization, SelectMgr_ViewerSelector3d::ToPixMap() - add opt puts "Generating images based on detection of Select3D_SenstiveSphere" puts "=================================" +pload MODELING VISUALIZATION +vinit View1 -height 400 -width 600 + psphere s 1 vdisplay -dispMode 1 s vfit diff --git a/tests/vselect/sphere/polygon_selection b/tests/vselect/sphere/polygon_selection index c1cc47fe1c..733e3ce541 100644 --- a/tests/vselect/sphere/polygon_selection +++ b/tests/vselect/sphere/polygon_selection @@ -3,6 +3,9 @@ puts "0032182: Visualization - add Select3D_SensitiveSphere" puts "Tests polygon selection of Select3D_SenstiveSphere" puts "=================================" +pload MODELING VISUALIZATION +vinit View1 -height 400 -width 600 + psphere s1 1 psphere s2 1 psphere s3 1 diff --git a/tests/vselect/sphere/rectangle_selection b/tests/vselect/sphere/rectangle_selection index 87d7555d4e..f62b221edf 100644 --- a/tests/vselect/sphere/rectangle_selection +++ b/tests/vselect/sphere/rectangle_selection @@ -3,6 +3,9 @@ puts "0032182: Visualization - add Select3D_SensitiveSphere" puts "Tests rectangular selection of Select3D_SenstiveSphere" puts "=================================" +pload MODELING VISUALIZATION +vinit View1 -height 400 -width 600 + psphere s1 1 psphere s2 1 psphere s3 1 diff --git a/tests/vselect/sphere/single_click_selection b/tests/vselect/sphere/single_click_selection index d65469b7a1..cc216ccfb6 100644 --- a/tests/vselect/sphere/single_click_selection +++ b/tests/vselect/sphere/single_click_selection @@ -3,6 +3,9 @@ puts "0032182: Visualization - add Select3D_SensitiveSphere" puts "Tests selection of Select3D_SenstiveSphere" puts "=================================" +pload MODELING VISUALIZATION +vinit View1 -height 400 -width 600 + psphere s 1 vdisplay -dispMode 1 s vfit diff --git a/tests/vselect/sphere/trsf b/tests/vselect/sphere/trsf new file mode 100644 index 0000000000..ceefc1fd79 --- /dev/null +++ b/tests/vselect/sphere/trsf @@ -0,0 +1,43 @@ +puts "=================================" +puts "0032652: Visualization - Select3D_SensitiveCylinder returns wrong 3D point on transformed shape" +puts "Check picking of transformed sphere" +puts "=================================" + +pload MODELING VISUALIZATION +psphere s 10 +fscale s 0 0 0 0.1 +trotate s 0 0 0 1 1 0 25 +ttranslate s 2500 3500 1000 + +vinit View1 +vlight headlight -head 0 + +# check Select3D_SensitiveTriangulation +vclear +vaxo +tcopy s ss +incmesh ss 1.0 +tclean ss -geom +vdisplay -dispmode 1 ss +vfit +vselaxis 2500 3498 1000 0 1 0 -display a -showNormal +set aPntTris [vmoveto 200 200] +vpoint pp {*}$aPntTris +checkpoint aPntTris_p $aPntTris {2500.54 3499.41 1000.6} 0.1 +if { ![string match "*Select3D_SensitiveTriangulation*" [vstate -entities]] } { puts "Error: triangulation should be detected" } +vfit +vdump $imagedir/${casename}_prs_tris.png +vseldump $imagedir/${casename}_selnorm_tris.png -type surfNormal + +# check Select3D_SensitiveSphere +vclear +vdisplay -dispmode 1 s +vfit +vselaxis 2500 3498 1000 0 1 0 -display a -showNormal +set aPntSph [vmoveto 200 200] +vpoint pp {*}$aPntSph +checkpoint aPntSph_p $aPntSph {2500.54 3499.41 1000.6} 0.1 +if { ![string match "*Select3D_SensitiveSphere*" [vstate -entities]] } { puts "Error: sphere should be detected" } +vfit +vdump $imagedir/${casename}_prs_sph.png +vseldump $imagedir/${casename}_selnorm_sph.png -type surfNormal From 519c84b43e7f597f7ef4b1fc97520a84b6314c85 Mon Sep 17 00:00:00 2001 From: msv Date: Sat, 13 Nov 2021 23:53:33 +0300 Subject: [PATCH 133/639] 0030054: BRepOffset_MakeOffset fails to build joints in intersection mode Test case has been added. --- tests/bugs/modalg_7/bug30054 | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 tests/bugs/modalg_7/bug30054 diff --git a/tests/bugs/modalg_7/bug30054 b/tests/bugs/modalg_7/bug30054 new file mode 100644 index 0000000000..b187154b5a --- /dev/null +++ b/tests/bugs/modalg_7/bug30054 @@ -0,0 +1,19 @@ +puts "=================================================" +puts "0030054: BRepOffset_MakeOffset fails to build joints in intersection mode" +puts "=================================================" +puts "" + +restore [locate_data_file bug30054.brep] a + +thickshell result a 1 i + +checkshape result + +checknbshapes result -vertex 16 -edge 28 -wire 14 -face 14 -t +checkprops result -s 1361.56 + +vdisplay result +vsetdispmode 1 +vviewparams -scale 33.8198 -proj -0.185982 0.955207 0.230198 -up 0.223301 -0.187064 0.956631 -at 0.279032 2.94652 11.8154 + +checkview -screenshot -3d -path ${imagedir}/${test_image}.png From c1e15aa5385ac4d534656a3c7dc0668408611925 Mon Sep 17 00:00:00 2001 From: kgv Date: Wed, 17 Nov 2021 11:54:05 +0300 Subject: [PATCH 134/639] 0023398: Documentation, Shape Healing User's Guide - example does not compile Fixed some misprints in the documentation. Removed description of non-existing Message_TraceFile. --- .../images/shape_healing_image009.svg | 481 +-- .../shape_healing/shape_healing.md | 2825 +++++++++-------- 2 files changed, 1810 insertions(+), 1496 deletions(-) diff --git a/dox/user_guides/shape_healing/images/shape_healing_image009.svg b/dox/user_guides/shape_healing/images/shape_healing_image009.svg index 4b27b062c0..7da851ee35 100644 --- a/dox/user_guides/shape_healing/images/shape_healing_image009.svg +++ b/dox/user_guides/shape_healing/images/shape_healing_image009.svg @@ -2,41 +2,21 @@ + inkscape:version="1.1.1 (3bf5ae0d25, 2021-09-20)" + sodipodi:docname="shape_healing_image009.svg" + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" + xmlns="http://www.w3.org/2000/svg" + xmlns:svg="http://www.w3.org/2000/svg" + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns:cc="http://creativecommons.org/ns#" + xmlns:dc="http://purl.org/dc/elements/1.1/"> - - - - - - @@ -115,9 +95,9 @@ borderopacity="1.0" inkscape:pageopacity="0.0" inkscape:pageshadow="2" - inkscape:zoom="1" - inkscape:cx="346.95854" - inkscape:cy="41.972723" + inkscape:zoom="2.8284271" + inkscape:cx="260.39207" + inkscape:cy="156.2706" inkscape:document-units="px" inkscape:current-layer="layer1" showgrid="false" @@ -129,7 +109,9 @@ fit-margin-top="0" fit-margin-left="0" fit-margin-right="0" - fit-margin-bottom="0" /> + fit-margin-bottom="0" + inkscape:pagecheckerboard="0" + width="500px" /> @@ -138,7 +120,6 @@ image/svg+xml - @@ -159,240 +140,324 @@ id="g3033" /> - - - - - - ShapeFix + transform="translate(32.519633,-72.118896)" /> + + + ShapeFix + - - ShapeUpgrade + + + ShapeUpgrade + - - ShapeCustom + + + ShapeCustom + - - ShapeExtend + + + ShapeExtend + - - ShapeAnalysis + + + ShapeAnalysis + - - - - - - - - + + + Message + Message - - - + id="path2302"> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + id="path958" + style="color:#000000;fill:#000000;fill-rule:evenodd;-inkscape-stroke:none" + d="M 424.63867 35.234375 L 424.63867 88.695312 L 321.84375 88.695312 L 321.84375 89.695312 L 425.64453 89.695312 L 425.64453 88.695312 L 425.63867 88.695312 L 425.63867 35.234375 L 424.63867 35.234375 z " + transform="translate(28.041461,50.336628)" /> + + + + + + diff --git a/dox/user_guides/shape_healing/shape_healing.md b/dox/user_guides/shape_healing/shape_healing.md index cce5db574e..0f811679ed 100644 --- a/dox/user_guides/shape_healing/shape_healing.md +++ b/dox/user_guides/shape_healing/shape_healing.md @@ -7,83 +7,105 @@ Shape Healing {#occt_user_guides__shape_healing} @subsection occt_shg_1_1 Introduction -This manual explains how to use Shape Healing. It provides basic documentation on its operation. For advanced information on Shape Healing and its applications, see our
E-learning & Training offerings. +This manual explains how to use Shape Healing. It provides basic documentation on its operation. +For advanced information on Shape Healing and its applications, see our E-learning & Training offerings. -The **Shape Healing** toolkit provides a set of tools to work on the geometry and topology of Open CASCADE Technology (**OCCT**) shapes. Shape Healing adapts shapes so as to make them as appropriate for use by Open CASCADE Technology as possible. +The **Shape Healing** toolkit provides a set of tools to work on the geometry and topology of Open CASCADE Technology (**OCCT**) shapes. +Shape Healing adapts shapes so as to make them as appropriate for use by Open CASCADE Technology as possible. @subsection occt_shg_1_2 Examples of use Here are a few examples of typical problems with illustrations of how Shape Healing deals with them: -#### Face with missing seam edge - -The problem: Face on a periodical surface is limited by wires which make a full trip around the surface. These wires are closed in 3d but not closed in parametric space of the surface. This is not valid in Open CASCADE. -The solution: Shape Healing fixes this face by inserting seam edge which combines two open wires and thus closes the parametric space. Note that internal wires are processed correctly. - -#### Wrong orientation of wires -The problem: Wires on face have incorrect orientation, so that interior and outer parts of the face are mixed. -The solution: Shape Healing recovers correct orientation of wires. - -#### Self-intersecting wire -The problem: Face is invalid because its boundary wire has self-intersection (on two adjacent edges) -The solution: Shape Healing cuts intersecting edges at intersection points thus making boundary valid. - -#### Lacking edge -The problem: There is a gap between two edges in the wire, so that wire is not closed -The solution: Shape Healing closes a gap by inserting lacking edge. +* **Face with missing seam edge** + + **problem:** + face on a periodical surface is limited by wires which make a full trip around the surface. + These wires are closed in 3d but not closed in parametric space of the surface. + This is not valid in Open CASCADE. + + **solution:** + Shape Healing fixes this face by inserting seam edge which combines two open wires and thus closes the parametric space. Note that internal wires are processed correctly. +* **Wrong orientation of wires** + + **problem:** + wires on face have incorrect orientation, so that interior and outer parts of the face are mixed. + + **solution:** + Shape Healing recovers correct orientation of wires. +* **Self-intersecting wire** + + **problem:** + face is invalid because its boundary wire has self-intersection (on two adjacent edges). + + **solution:** + shape Healing cuts intersecting edges at intersection points thus making boundary valid. +* **Lacking edge** + + **problem:** + there is a gap between two edges in the wire, so that wire is not closed. + + **solution:** + Shape Healing closes a gap by inserting lacking edge. @subsection occt_shg_1_3 Toolkit Structure -**Shape Healing** currently includes several packages that are designed to help you to: - * analyze shape characteristics and, in particular, identify shapes that do not comply with Open CASCADE Technology validity rules - * fix some of the problems shapes may have - * upgrade shape characteristics for users needs, for example a C0 supporting surface can be upgraded so that it becomes C1 continuous. - -The following diagram shows dependencies of API packages: +**Shape Healing** currently includes several packages that are designed to help you to: + * analyze shape characteristics and, in particular, identify shapes that do not comply with Open CASCADE Technology validity rules; + * fix some of the problems shapes may have; + * upgrade shape characteristics for users needs, for example a C0 supporting surface can be upgraded so that it becomes C1 continuous. + +The following diagram shows dependencies of API packages: @figure{/user_guides/shape_healing/images/shape_healing_image009.svg,"Shape Healing packages",420} -Each sub-domain has its own scope of functionality: +Each sub-domain has its own scope of functionality: * analysis -- exploring shape properties, computing shape features, detecting violation of OCCT requirements (shape itself is not modified); -* fixing -- fixing shape to meet the OCCT requirements (the shape may change its original form: modifying, removing, constructing sub-shapes, etc.); -* upgrade -- shape improvement for better usability in Open CASCADE Technology or other algorithms (the shape is replaced with a new one, but geometrically they are the same); -* customization -- modifying shape representation to fit specific needs (shape is not modified, only the form of its representation is modified); -* processing -- mechanism of managing shape modification via a user-editable resource file. +* fixing -- fixing shape to meet the OCCT requirements (the shape may change its original form: modifying, removing, constructing sub-shapes, etc.); +* upgrade -- shape improvement for better usability in Open CASCADE Technology or other algorithms (the shape is replaced with a new one, but geometrically they are the same); +* customization -- modifying shape representation to fit specific needs (shape is not modified, only the form of its representation is modified); +* processing -- mechanism of managing shape modification via a user-editable resource file. -Message management is used for creating messages, filling them with various parameters and storing them in the trace file. This tool provides functionality for attaching messages to the shapes for deferred analysis of various run-time events. In this document only general principles of using Shape Healing will be described. For more detailed information, see the corresponding header files. +Message management is used for creating messages, filling them with various parameters and storing them in the trace file. +This tool provides functionality for attaching messages to the shapes for deferred analysis of various run-time events. +In this document only general principles of using Shape Healing will be described. +For more detailed information, see the corresponding header files. -Tools responsible for analysis, fixing and upgrading of shapes can give the information about how these operations were performed. This information can be obtained by the user with the help of mechanism of status querying. +Tools responsible for analysis, fixing and upgrading of shapes can give the information about how these operations were performed. +This information can be obtained by the user with the help of mechanism of status querying. @subsection occt_shg_1_4 Querying the statuses -Each fixing and upgrading tool has its own status, which is reset when their methods are called. The status can contain several flags, which give the information about how the method was performed. For exploring the statuses, a set of methods named *Status...()* is provided. These methods accept enumeration *ShapeExtend_Status* and return True if the status has the corresponding flag set. The meaning of flags for each method is described below. +Each fixing and upgrading tool has its own status, which is reset when their methods are called. +The status can contain several flags, which give the information about how the method was performed. +For exploring the statuses, a set of methods named *StatusXXX()* is provided (`ShapeFix_Wire::StatusReorder()` for instance). +These methods accept enumeration *ShapeExtend_Status* and return True if the status has the corresponding flag set. +The meaning of flags for each method is described below. -The status may contain a set of Boolean flags (internally represented by bits). Flags are coded by enumeration ShapeExtend_Status. This enumeration provides the following families of statuses: -* *ShapeExtend_OK* -- The situation is OK, no operation is necessary and has not been performed. -* *ShapeExtend_DONE* -- The operation has been successfully performed. -* *ShapeExtend_FAIL* -- An error has occurred during operation. +The status may contain a set of Boolean flags (internally represented by bits). Flags are coded by enumeration ShapeExtend_Status. +This enumeration provides the following families of statuses: +* *ShapeExtend_OK* -- The situation is OK, no operation is necessary and has not been performed. +* *ShapeExtend_DONE* -- The operation has been successfully performed. +* *ShapeExtend_FAIL* -- An error has occurred during operation. -It is possible to test the status for the presence of some flag(s), using Status...() method(s) provided by the class: +It is possible to test the status for the presence of some flag(s), using StatusXXX() method(s) provided by the class: ~~~~{.cpp} -if ( object.Status.. ( ShapeExtend_DONE ) ) {// something was done -} +if (object.StatusXXX (ShapeExtend_DONE)) +{ + // something was done +} ~~~~ -8 'DONE' and 8 'FAIL' flags, named ShapeExtend_DONE1 ... ShapeExtend_FAIL8, are defined for a detailed analysis of the encountered situation. Each method assigns its own meaning to each flag, documented in the header for that method. There are also three enumerative values used for testing several flags at a time: -* *ShapeExtend_OK* -- if no flags have been set; -* *ShapeExtend_DONE* -- if at least one ShapeExtend_DONEi has been set; -* *ShapeExtend_FAIL* -- if at least one ShapeExtend_FAILi has been set. +8 'DONE' and 8 'FAIL' flags, named ShapeExtend_DONE1 ... ShapeExtend_FAIL8, are defined for a detailed analysis of the encountered situation. +Each method assigns its own meaning to each flag, documented in the header for that method. +There are also three enumerative values used for testing several flags at a time: +* *ShapeExtend_OK* -- if no flags have been set; +* *ShapeExtend_DONE* -- if at least one ShapeExtend_DONEi has been set; +* *ShapeExtend_FAIL* -- if at least one ShapeExtend_FAILi has been set. @section occt_shg_2 Repair -Algorithms for fixing problematic (violating the OCCT requirements) shapes are placed in package *ShapeFix*. +Algorithms for fixing problematic (violating the OCCT requirements) shapes are placed in package *ShapeFix*. -Each class of package *ShapeFix* deals with one certain type of shapes or with some family of problems. +Each class of package *ShapeFix* deals with one certain type of shapes or with some family of problems. -There is no necessity for you to detect problems before using *ShapeFix* because all components of package *ShapeFix* make an analysis of existing problems before fixing them by a corresponding tool from package of *ShapeAnalysis* and then fix the discovered problems. +There is no necessity for you to detect problems before using *ShapeFix* because all components of package *ShapeFix* make an analysis of existing problems +before fixing them by a corresponding tool from package of *ShapeAnalysis* and then fix the discovered problems. -The *ShapeFix* package currently includes functions that: +The *ShapeFix* package currently includes functions that: * add a 2D curve or a 3D curve where one is missing, * correct a deviation of a 2D curve from a 3D curve when it exceeds a given tolerance value, * limit the tolerance value of shapes within a given range, @@ -97,349 +119,405 @@ The *ShapeFix* package currently includes functions that: @subsection occt_shg_2_1 Basic Shape Repair -The simplest way for fixing shapes is to use classes *ShapeFix_Shape* and *ShapeFix_Wireframe* on a whole shape with default parameters. A combination of these tools can fix most of the problems that shapes may have. -The sequence of actions is as follows : +The simplest way for fixing shapes is to use classes *ShapeFix_Shape* and *ShapeFix_Wireframe* on a whole shape with default parameters. +A combination of these tools can fix most of the problems that shapes may have. +The sequence of actions is as follows: -1. Create tool *ShapeFix_Shape* and initialize it by shape: - - Handle(ShapeFix_Shape) sfs = new ShapeFix_Shape; - sfs->Init ( shape ); +1. Create tool *ShapeFix_Shape* and initialize it by shape: +~~~~{.cpp} + Handle(ShapeFix_Shape) aFixShape = new ShapeFix_Shape(); + aFixShape->Init (theShape); +~~~~ 2. Set the basic precision, the maximum allowed tolerance, the minimal allowed tolerance: - - sfs->SetPrecision ( Prec ); - sfs->SetMaxTolerance ( maxTol ); - sfs->SetMinTolerance ( mintol ); - +~~~~{.cpp} + aFixShape->SetPrecision (thePrec); + aFixShape->SetMaxTolerance (theMaxTol); + aFixShape->SetMinTolerance (theMintol); +~~~~ where: - * *Prec* -- basic precision. - * *maxTol* -- maximum allowed tolerance. All problems will be detected for cases when a dimension of invalidity is larger than the basic precision or a tolerance of sub-shape on that problem is detected. - The maximum tolerance value limits the increasing tolerance for fixing a problem such as fix of not connected and self-intersected wires. If a value larger than the maximum allowed tolerance is necessary for correcting a detected problem the problem can not be fixed. - The maximal tolerance is not taking into account during computation of tolerance of edges in *ShapeFix_SameParameter()* method and *ShapeFix_Edge::FixVertexTolerance()* method. - See @ref occt_shg_2_3_8 for details. - * *minTol* -- minimal allowed tolerance. It defines the minimal allowed length of edges. Detected edges having length less than the specified minimal tolerance will be removed if *ModifyTopologyMode* in Repairing tool for wires is set to true. - See @ref occt_shg_2_3_7 for details. + * *thePrec* -- basic precision. + * *theMaxTol* -- maximum allowed tolerance. + All problems will be detected for cases when a dimension of invalidity is larger than the basic precision or a tolerance of sub-shape on that problem is detected. + The maximum tolerance value limits the increasing tolerance for fixing a problem such as fix of not connected and self-intersected wires. + If a value larger than the maximum allowed tolerance is necessary for correcting a detected problem the problem can not be fixed. + The maximal tolerance is not taking into account during computation of tolerance of edges in *ShapeFix_SameParameter()* method and *ShapeFix_Edge::FixVertexTolerance()* method. + See @ref occt_shg_2_3_8 for details. + * *theMintol* -- minimal allowed tolerance. + It defines the minimal allowed length of edges. Detected edges having length less than the specified minimal tolerance will be removed if *ModifyTopologyMode* in Repairing tool for wires is set to true. + See @ref occt_shg_2_3_7 for details. 3. Launch fixing: - - sfs->Perform(); +~~~~{.cpp} + aFixShape->Perform(); +~~~~ 4. Get the result: - - TopoDS_Shape aResult = sfs->Shape(); - - In some cases using only *ShapeFix_Shape* can be insufficient. It is possible to use tools for merging and removing small edges and fixing gaps between 2D and 3D curves. +~~~~{.cpp} + TopoDS_Shape aResult = aFixShape->Shape(); +~~~~ + In some cases using only *ShapeFix_Shape* can be insufficient. + It is possible to use tools for merging and removing small edges and fixing gaps between 2D and 3D curves. 5. Create *ShapeFix_Wireframe* tool and initialize it by shape: ~~~~{.cpp} -Handle(ShapeFix_Wirefarme) SFWF = new ShapeFix_Wirefarme(shape); -Or -Handle(ShapeFix_Wirefarme) SFWF = new ShapeFix_Wirefarme; -SFWF->Load(shape); + Handle(ShapeFix_Wireframe) aFixWire = new ShapeFix_Wireframe (theShape); +~~~~ + or: +~~~~{.cpp} + Handle(ShapeFix_Wireframe) aFixWire = new ShapeFix_Wireframe(); + aFixWire->Load (theShape); ~~~~ 6. Set the basic precision and the maximum allowed tolerance: ~~~~{.cpp} -sfs->SetPrecision ( Prec ); -sfs->SetMaxTolerance ( maxTol ); + aFixWire->SetPrecision (thePrec); + aFixWire->SetMaxTolerance (theMaxTol); ~~~~ -See the description for *Prec* and *maxTol* above. +See the description for *thePrec* and *theMaxTol* above. 7. Merge and remove small edges: ~~~~{.cpp} -SFWF->DropSmallEdgesMode() = Standard_True; -SFWF->FixSmallEdges(); + aFixWire->DropSmallEdgesMode() = true; + aFixWire->FixSmallEdges(); ~~~~ -**Note:** Small edges are not removed with the default mode, but in many cases removing small edges is very useful for fixing a shape. +**Note:** Small edges are not removed with the default mode, but in many cases removing small edges is very useful for fixing a shape. 8. Fix gaps for 2D and 3D curves ~~~~{.cpp} -SFWF->FixWireGaps(); + aFixWire->FixWireGaps(); ~~~~ 9. Get the result ~~~~{.cpp} -TopoDS_Shape Result = SFWF->Shape(); + TopoDS_Shape aResult = aFixWire->Shape(); ~~~~ +@subsection occt_shg_2_2 Shape Correction -@subsection occt_shg_2_2 Shape Correction. - -If you do not want to make fixes on the whole shape or make a definite set of fixes you can set flags for separate fix cases (marking them ON or OFF) and you can also use classes for fixing specific types of sub-shapes such as solids, shells, faces, wires, etc. +If you do not want to make fixes on the whole shape or make a definite set of fixes you can set flags for separate fix cases (marking them ON or OFF) +and you can also use classes for fixing specific types of sub-shapes such as solids, shells, faces, wires, etc. For each type of sub-shapes there are specific types of fixing tools such as *ShapeFix_Solid, ShapeFix_Shell, ShapeFix_Face, ShapeFix_Wire,* etc. @subsubsection occt_shg_2_2_1 Fixing sub-shapes -If you want to make a fix on one sub-shape of a certain shape it is possible to take the following steps: +If you want to make a fix on one sub-shape of a certain shape it is possible to take the following steps: * create a tool for a specified sub-shape type and initialize this tool by the sub-shape; * create a tool for rebuilding the shape and initialize it by the whole shape (section 5.1); * set a tool for rebuilding the shape in the tool for fixing the sub-shape; * fix the sub-shape; * get the resulting whole shape containing a new corrected sub-shape. -For example, in the following way it is possible to fix face *Face1* of shape *Shape1*: +For example, in the following way it is possible to fix face *theFace1* of shape *theShape1*: ~~~~{.cpp} -//create tools for fixing a face -Handle(ShapeFix_Face) SFF= new ShapeFix_Face; +// create tools for fixing a face +Handle(ShapeFix_Face) aFixFace = new ShapeFix_Face(); + +// create tool for rebuilding a shape and initialize it by shape +Handle(ShapeBuild_ReShape) aReshapeContext = new ShapeBuild_ReShape(); +aReshapeContext->Apply (theShape1); -// create tool for rebuilding a shape and initialize it by shape -Handle(ShapeBuild_ReShape) Context = new ShapeBuild_ReShape; -Context->Apply(Shape1); +// set a tool for rebuilding a shape in the tool for fixing +aFixFace->SetContext (aReshapeContext); -//set a tool for rebuilding a shape in the tool for fixing -SFF->SetContext(Context); - -//initialize the fixing tool by one face -SFF->Init(Face1); +// initialize the fixing tool by one face +aFixFace->Init (theFace1); -//fix the set face -SFF->Perform(); - -//get the result -TopoDS_Shape NewShape = Context->Apply(Shape1); -//Resulting shape contains the fixed face. +// fix the set face +aFixFace->Perform(); + +// get the result; resulting shape contains the fixed face +TopoDS_Shape aNewShape = aReshapeContext->Apply (theShape1); ~~~~ -A set of required fixes and invalid sub-shapes can be obtained with the help of tools responsible for the analysis of shape validity (section 3.2). +A set of required fixes and invalid sub-shapes can be obtained with the help of tools responsible for the analysis of shape validity (section 3.2). @subsection occt_shg_2_3 Repairing tools -Each class of package ShapeFix deals with one certain type of shapes or with a family of problems. Each repairing tool makes fixes for the specified shape and its sub-shapes with the help of method *Perform()* containing an optimal set of fixes. The execution of these fixes in the method Perform can be managed with help of a set of control flags (fixes can be either forced or forbidden). +Each class of package ShapeFix deals with one certain type of shapes or with a family of problems. +Each repairing tool makes fixes for the specified shape and its sub-shapes with the help of method *Perform()* containing an optimal set of fixes. +The execution of these fixes in the method Perform can be managed with help of a set of control flags (fixes can be either forced or forbidden). -@subsubsection occt_shg_2_3_1 General Workflow +@subsubsection occt_shg_2_3_1 General Workflow The following sequence of actions should be applied to perform fixes: -1. Create a tool. -2. Set the following values: - + the working precision by method *SetPrecision()* (default 1.e-7) - + set the maximum allowed tolerance by method *SetMaxTolerance()* (by default it is equal to the working precision). - + set the minimum tolerance by method *SetMinTolerance()* (by default it is equal to the working precision). - + set a tool for rebuilding shapes after the modification (tool *ShapeBuild_ReShape*) by method *SetContext()*. For separate faces, wires and edges this tool is set optionally. - + to force or forbid some of fixes, set the corresponding flag to 0 or 1. -3. Initialize the tool by the shape with the help of methods Init or Load -4. Use method *Perform()* or create a custom set of fixes. -5. Check the statuses of fixes by the general method *Status* or specialized methods *Status_*(for example *StatusSelfIntersection* (*ShapeExtentd_DONE*)). See the description of statuses below. -6. Get the result in two ways : - - with help of a special method *Shape(),Face(),Wire().Edge()*. - - from the rebuilding tool by method *Apply* (for access to rebuilding tool use method *Context()*): +1. Create a tool. +2. Set the following values: + + the working precision by method *SetPrecision()* (default 1.e-7); + + set the maximum allowed tolerance by method *SetMaxTolerance()* (by default it is equal to the working precision); + + set the minimum tolerance by method *SetMinTolerance()* (by default it is equal to the working precision); + + set a tool for rebuilding shapes after the modification (tool *ShapeBuild_ReShape*) by method *SetContext()*; + for separate faces, wires and edges this tool is set optionally; + + to force or forbid some of fixes, set the corresponding flag to 0 or 1. +3. Initialize the tool by the shape with the help of methods `Init()` or `Load()`. +4. Use method *Perform()* or create a custom set of fixes. +5. Check the statuses of fixes by the general method *Status* or specialized methods *Status_* (for example *StatusSelfIntersection* (*ShapeExtentd_DONE*)). + See the description of statuses below. +6. Get the result in two ways: + - with help of a special method *Shape(), Face(), Wire(), Edge()*. + - from the rebuilding tool by method *Apply()* (for access to rebuilding tool use method *Context()*): ~~~~{.cpp} - TopoDS_Shape resultShape = fixtool->Context()->Apply(initialShape); + TopoDS_Shape aResultShape = aFixTool->Context()->Apply (theInitialShape); ~~~~ -Modification fistory for the shape and its sub-shapes can be obtained from the tool for shape re-building (*ShapeBuild_ReShape*). +Modification history for the shape and its sub-shapes can be obtained from the tool for shape re-building (*ShapeBuild_ReShape*). ~~~~{.cpp} -TopoDS_Shape modifsubshape = fixtool->Context() -> Apply(initsubshape); + TopoDS_Shape aModifSubshape = aFixTool->Context()->Apply (theInitSubShape); ~~~~ - @subsubsection occt_shg_2_3_2 Flags Management -The flags *Fix...Mode()* are used to control the execution of fixing procedures from the API fixing methods. By default, these flags have values equal to -1, this means that the corresponding procedure will either be called or not called, depending on the situation. If the flag is set to 1, the procedure is executed anyway; if the flag is 0, the procedure is not executed. The name of the flag corresponds to the fixing procedure that is controlled. For each fixing tool there exists its own set of flags. To set a flag to the desired value, get a tool containing this flag and set the flag to the required value. - -For example, it is possible to forbid performing fixes to remove small edges - *FixSmall* +The flags *Fix...Mode()* are used to control the execution of fixing procedures from the API fixing methods. +By default, these flags have values equal to -1, this means that the corresponding procedure will either be called or not called, depending on the situation. +If the flag is set to 1, the procedure is executed anyway; if the flag is 0, the procedure is not executed. +The name of the flag corresponds to the fixing procedure that is controlled. For each fixing tool there exists its own set of flags. +To set a flag to the desired value, get a tool containing this flag and set the flag to the required value. +For example, it is possible to forbid performing fixes to remove small edges - *FixSmall*: ~~~~{.cpp} -Handle(ShapeFix_Shape) Sfs = new ShapeFix_Shape(shape); -Sfs-> FixWireTool ()->FixSmallMode () =0; -if(Sfs->Perform()) - TopoDS_Shape resShape = Sfs->Shape(); +Handle(ShapeFix_Shape) aFixShape = new ShapeFix_Shape (theShape); +aFixShape->FixWireTool()->FixSmallMode() = 0; +if (aFixShape->Perform()) +{ + TopoDS_Shape aResShape = aFixShape->Shape(); +} ~~~~ - @subsubsection occt_shg_2_3_3 Repairing tool for shapes -Class *ShapeFix_Shape* allows using repairing tools for all sub-shapes of a shape. It provides access to all repairing tools for fixing sub-shapes of the specified shape and to all control flags from these tools. - -For example, it is possible to force the removal of invalid 2D curves from a face. - -~~~~{.cpp} -TopoDS_Face face … // face with invalid 2D curves. -//creation of tool and its initialization by shape. -Handle(ShapeFix_Shape) sfs = new ShapeFix_Shape(face); -//set work precision and max allowed tolerance. -sfs->SetPrecision(prec); -sfs->SetMaxTolerance(maxTol); -//set the value of flag for forcing the removal of 2D curves -sfs->FixWireTool()->FixRemovePCurveMode() =1; -//reform fixes -sfs->Perform(); -//getting the result -if(sfs->Status(ShapeExtend_DONE) ) { - cout << "Shape was fixed" << endl; - TopoDS_Shape resFace = sfs->Shape(); -} -else if(sfs->Status(ShapeExtend_FAIL)) { -cout<< "Shape could not be fixed" << endl; -} -else if(sfs->Status(ShapeExtent_OK)) { -cout<< "Initial face is valid with specified precision ="<< precendl; -} +Class *ShapeFix_Shape* allows using repairing tools for all sub-shapes of a shape. +It provides access to all repairing tools for fixing sub-shapes of the specified shape and to all control flags from these tools. + +For example, it is possible to force the removal of invalid 2D curves from a face: +~~~~{.cpp} +TopoDS_Face theFace = ...; // face with invalid 2D curves. +// creation of tool and its initialization by shape +Handle(ShapeFix_Shape) aFixShape = new ShapeFix_Shape (theFace); +// set work precision and max allowed tolerance +aFixShape->SetPrecision (thePrec); +aFixShape->SetMaxTolerance (theMaxTol); +//set the value of flag for forcing the removal of 2D curves +aFixShape->FixWireTool()->FixRemovePCurveMode() = 1; +// reform fixes +aFixShape->Perform(); +// getting the result +if (aFixShape->Status (ShapeExtend_DONE)) +{ + std::cout << "Shape was fixed\n"; + TopoDS_Shape aResFace = aFixShape->Shape(); +} +else if (aFixShape->Status (ShapeExtend_FAIL)) +{ + std::cout << "Shape could not be fixed\n"; +} +else if (aFixShape->Status (ShapeExtent_OK)) +{ + std::cout << "Initial face is valid with specified precision =" << thePrec << std::endl; +} ~~~~ @subsubsection occt_shg_2_3_4 Repairing tool for solids -Class *ShapeFix_Solid* allows fixing solids and building a solid from a shell to obtain a valid solid with a finite volume. The tool *ShapeFix_Shell* is used for correction of shells belonging to a solid. +Class *ShapeFix_Solid* allows fixing solids and building a solid from a shell to obtain a valid solid with a finite volume. +The tool *ShapeFix_Shell* is used for correction of shells belonging to a solid. This tool has the following control flags: -* *FixShellMode* -- Mode for applying fixes of ShapeFix_Shell, True by default. -* *CreateOpenShellMode* -- If it is equal to true solids are created from open shells, else solids are created from closed shells only, False by default. +* *FixShellMode* -- Mode for applying fixes of ShapeFix_Shell, True by default. +* *CreateOpenShellMode* -- If it is equal to true solids are created from open shells, else solids are created from closed shells only, False by default. + +@subsubsection occt_shg_2_3_5 Repairing tool for shells -@subsubsection occt_shg_2_3_5 Repairing tool for shells -Class *ShapeFix_Shell* allows fixing wrong orientation of faces in a shell. It changes the orientation of faces in the shell so that all faces in the shell have coherent orientations. If it is impossible to orient all faces in the shell (like in case of Mebious tape), then a few manifold or non-manifold shells will be created depending on the specified Non-manifold mode. The *ShapeFix_Face* tool is used to correct faces in the shell. +Class *ShapeFix_Shell* allows fixing wrong orientation of faces in a shell. +It changes the orientation of faces in the shell so that all faces in the shell have coherent orientations. +If it is impossible to orient all faces in the shell (like in case of Möbius strip), then a few manifold or non-manifold shells will be created depending on the specified Non-manifold mode. +The *ShapeFix_Face* tool is used to correct faces in the shell. This tool has the following control flags: -* *FixFaceMode* -- mode for applying the fixes of *ShapeFix_Face*, *True* by default. -* *FixOrientationMode* -- mode for applying a fix for the orientation of faces in the shell. - -@subsubsection occt_shg_2_3_6 Repairing tool for faces - -Class *ShapeFix_Face* allows fixing the problems connected with wires of a face. It allows controlling the creation of a face (adding wires), and fixing wires by means of tool *ShapeFix_Wire*. -When a wire is added to a face, it can be reordered and degenerated edges can be fixed. This is performed or not depending on the user-defined flags (by default, False). -The following fixes are available: - * fixing of wires orientation on the face. If the face has no wire, the natural bounds are computed. If the face is on a spherical surface and has two or more wires on it describing holes, the natural bounds are added. In case of a single wire, it is made to be an outer one. If the face has several wires, they are oriented to lay one outside another (if possible). If the supporting surface is periodic, 2D curves of internal wires can be shifted on integer number of periods to put them inside the outer wire. - * fixing the case when the face on the closed surface is defined by a set of closed wires, and the seam is missing (this is not valid in OCCT). In that case, these wires are connected by means of seam edges into the same wire. - -This tool has the following control flags: -* *FixWireMode* -- mode for applying fixes of a wire, True by default. -* *FixOrientationMode* -- mode for orienting a wire to border a limited square, True by default. -* *FixAddNaturalBoundMode* -- mode for adding natural bounds to a face, False by default. -* *FixMissingSeamMode* -- mode to fix a missing seam, True by default. If True, tries to insert a seam. -* *FixSmallAreaWireMode* -- mode to fix a small-area wire, False by default. If True, drops wires bounding small areas. - -~~~~{.cpp} - -TopoDS_Face face = ...; -TopoDS_Wire wire = ...; - -//Creates a tool and adds a wire to the face -ShapeFix_Face sff (face); -sff.Add (wire); - -//use method Perform to fix the wire and the face -sff.Perfom(); - -//or make a separate fix for the orientation of wire on the face -sff.FixOrientation(); - -//Get the resulting face -TopoDS_Face newface = sff.Face(); -~~~~ - -@subsubsection occt_shg_2_3_7 Repairing tool for wires - -Class *ShapeFix_Wire* allows fixing a wire. Its method *Perform()* performs all the available fixes in addition to the geometrical filling of gaps. The geometrical filling of gaps can be made with the help of the tool for fixing the wireframe of shape *ShapeFix_Wireframe*. - -The fixing order and the default behavior of *Perform()* is as follows: - * Edges in the wire are reordered by *FixReorder*. Most of fixing methods expect edges in a wire to be ordered, so it is necessary to make call to *FixReorder()* before making any other fixes. Even if it is forbidden, the analysis of whether the wire is ordered or not is performed anyway. - * Small edges are removed by *FixSmall* . - * Edges in the wire are connected (topologically) by *FixConnected* (if the wire is ordered). - * Edges (3Dcurves and 2D curves) are fixed by *FixEdgeCurves* (without *FixShifted* if the wire is not ordered). - * Degenerated edges are added by *FixDegenerated*(if the wire is ordered). - * Self-intersection is fixed by *FixSelfIntersection* (if the wire is ordered and *ClosedMode* is True). - * Lacking edges are fixed by *FixLacking* (if the wire is ordered). - - The flag *ClosedWireMode* specifies whether the wire is (or should be) closed or not. If that flag is True (by default), fixes that require or force connection between edges are also executed for the last and the first edges. - -The fixing methods can be turned on/off by using their corresponding control flags: -* *FixReorderMode,* -* *FixSmallMode,* -* *FixConnectedMode,* -* *FixEdgeCurvesMode,* -* *FixDegeneratedMode,* -* *FixSelfIntersectionMode* - -Some fixes can be made in three ways: - * Increasing the tolerance of an edge or a vertex. - * Changing topology (adding/removing/replacing an edge in the wire and/or replacing the vertex in the edge, copying the edge etc.). - * Changing geometry (shifting a vertex or adjusting ends of an edge curve to vertices, or recomputing a 3D curve or 2D curves of the edge). - -When it is possible to make a fix in more than one way (e.g., either by increasing the tolerance or shifting a vertex), it is chosen according to the user-defined flags: -* *ModifyTopologyMode* -- allows modifying topology, False by default. -* *ModifyGeometryMode* -- allows modifying geometry. Now this flag is used only in fixing self-intersecting edges (allows to modify 2D curves) and is True by default. - +* *FixFaceMode* -- mode for applying the fixes of *ShapeFix_Face*, *True* by default. +* *FixOrientationMode* -- mode for applying a fix for the orientation of faces in the shell. + +@subsubsection occt_shg_2_3_6 Repairing tool for faces + +Class *ShapeFix_Face* allows fixing the problems connected with wires of a face. +It allows controlling the creation of a face (adding wires), and fixing wires by means of tool *ShapeFix_Wire*. +When a wire is added to a face, it can be reordered and degenerated edges can be fixed. +This is performed or not depending on the user-defined flags (by default, False). +The following fixes are available: + * Fixing of wires orientation on the face. + If the face has no wire, the natural bounds are computed. + If the face is on a spherical surface and has two or more wires on it describing holes, the natural bounds are added. + In case of a single wire, it is made to be an outer one. + If the face has several wires, they are oriented to lay one outside another (if possible). + If the supporting surface is periodic, 2D curves of internal wires can be shifted on integer number of periods to put them inside the outer wire. + * fixing the case when the face on the closed surface is defined by a set of closed wires, and the seam is missing (this is not valid in OCCT). + In that case, these wires are connected by means of seam edges into the same wire. + +This tool has the following control flags: +* *FixWireMode* -- mode for applying fixes of a wire, True by default. +* *FixOrientationMode* -- mode for orienting a wire to border a limited square, True by default. +* *FixAddNaturalBoundMode* -- mode for adding natural bounds to a face, False by default. +* *FixMissingSeamMode* -- mode to fix a missing seam, True by default. If True, tries to insert a seam. +* *FixSmallAreaWireMode* -- mode to fix a small-area wire, False by default. If True, drops wires bounding small areas. + +~~~~{.cpp} +TopoDS_Face theFace = ...; +TopoDS_Wire theWire = ...; + +// Create a tool and adds a wire to the face +ShapeFix_Face aFixShape (theFace); +aFixShape.Add (theWire); + +// use method Perform to fix the wire and the face +aFixShape.Perform(); + +// or make a separate fix for the orientation of wire on the face +aFixShape.FixOrientation(); + +// Get the resulting face +TopoDS_Face aNewFace = aFixShape.Face(); +~~~~ + +@subsubsection occt_shg_2_3_7 Repairing tool for wires + +Class *ShapeFix_Wire* allows fixing a wire. Its method *Perform()* performs all the available fixes in addition to the geometric filling of gaps. +The geometric filling of gaps can be made with the help of the tool for fixing the wireframe of shape *ShapeFix_Wireframe*. + +The fixing order and the default behavior of *Perform()* is as follows: + * Edges in the wire are reordered by *FixReorder*. + Most of fixing methods expect edges in a wire to be ordered, so it is necessary to make call to *FixReorder()* before making any other fixes. + Even if it is forbidden, the analysis of whether the wire is ordered or not is performed anyway. + * Small edges are removed by *FixSmall*. + * Edges in the wire are connected (topologically) by *FixConnected* (if the wire is ordered). + * Edges (3Dcurves and 2D curves) are fixed by *FixEdgeCurves* (without *FixShifted* if the wire is not ordered). + * Degenerated edges are added by *FixDegenerated* (if the wire is ordered). + * Self-intersection is fixed by *FixSelfIntersection* (if the wire is ordered and *ClosedMode* is True). + * Lacking edges are fixed by *FixLacking* (if the wire is ordered). + +The flag *ClosedWireMode* specifies whether the wire is (or should be) closed or not. +If that flag is True (by default), fixes that require or force connection between edges are also executed for the last and the first edges. + +The fixing methods can be turned on/off by using their corresponding control flags: +* *FixReorderMode,* +* *FixSmallMode,* +* *FixConnectedMode,* +* *FixEdgeCurvesMode,* +* *FixDegeneratedMode,* +* *FixSelfIntersectionMode* + +Some fixes can be made in three ways: + * Increasing the tolerance of an edge or a vertex. + * Changing topology (adding/removing/replacing an edge in the wire and/or replacing the vertex in the edge, copying the edge etc.). + * Changing geometry (shifting a vertex or adjusting ends of an edge curve to vertices, or recomputing a 3D curve or 2D curves of the edge). + +When it is possible to make a fix in more than one way (e.g., either by increasing the tolerance or shifting a vertex), it is chosen according to the user-defined flags: +* *ModifyTopologyMode* -- allows modifying topology. + False by default. +* *ModifyGeometryMode* -- allows modifying geometry. + Now this flag is used only in fixing self-intersecting edges (allows to modify 2D curves) and is True by default. + #### Fixing disordered edges -*FixReorder* is necessary for most other fixes (but is not necessary for Open CASCADE Technology). It checks whether edges in the wire go in a sequential order (the end of a preceding edge is the start of a following one). If it is not so, an attempt to reorder the edges is made. +*FixReorder* is necessary for most other fixes (but is not necessary for Open CASCADE Technology). +It checks whether edges in the wire go in a sequential order (the end of a preceding edge is the start of a following one). +If it is not so, an attempt to reorder the edges is made. #### Fixing small edges -*FixSmall* method searches for the edges, which have a length less than the given value (degenerated edges are ignored). If such an edge is found, it is removed provided that one of the following conditions is satisfied: - * both end vertices of that edge are one and the same vertex, - * end vertices of the edge are different, but the flag *ModifyTopologyMode* is True. In the latter case, method *FixConnected* is applied to the preceding and the following edges to ensure their connection. - +*FixSmall* method searches for the edges, which have a length less than the given value (degenerated edges are ignored). +If such an edge is found, it is removed provided that one of the following conditions is satisfied: + * both end vertices of that edge are one and the same vertex, + * end vertices of the edge are different, but the flag *ModifyTopologyMode* is True; + in the latter case, method *FixConnected* is applied to the preceding and the following edges to ensure their connection. + #### Fixing disconnected edges -*FixConnected* method forces two adjacent edges to share the same common vertex (if they do not have a common one). It checks whether the end vertex of the preceding edge coincides with the start vertex of the following edge with the given precision, and then creates a new vertex and sets it as a common vertex for the fixed edges. At that point, edges are copied, hence the wire topology is changed (regardless of the *ModifyTopologyMode* flag). If the vertices do not coincide, this method fails. +*FixConnected* method forces two adjacent edges to share the same common vertex (if they do not have a common one). +It checks whether the end vertex of the preceding edge coincides with the start vertex of the following edge with the given precision, and then creates a new vertex and sets it as a common vertex for the fixed edges. +At that point, edges are copied, hence the wire topology is changed (regardless of the *ModifyTopologyMode* flag). +If the vertices do not coincide, this method fails. #### Fixing the consistency of edge curves -*FixEdgeCurves* method performs a set of fixes dealing with 3D curves and 2D curves of edges in a wire. +*FixEdgeCurves* method performs a set of fixes dealing with 3D curves and 2D curves of edges in a wire. -These fixes will be activated with the help of a set of fixes from the repairing tool for edges called *ShapeFix_Edge*. Each of these fixes can be forced or forbidden by means of setting the corresponding flag to either True or False. +These fixes will be activated with the help of a set of fixes from the repairing tool for edges called *ShapeFix_Edge*. +Each of these fixes can be forced or forbidden by means of setting the corresponding flag to either True or False. -The mentioned fixes and the conditions of their execution are: +The mentioned fixes and the conditions of their execution are: * fixing a disoriented 2D curve by call to *ShapeFix_Edge::FixReversed2d* -- if not forbidden by flag *FixReversed2dMode*; * removing a wrong 2D curve by call to *ShapeFix_Edge::FixRemovePCurve* -- only if forced by flag *FixRemovePCurveMode*; - * fixing a missing 2D curve by call to *ShapeFix_Edge::FixAddPCurve* -- if not forbidden by flag *FixAddPCurveMode*; - * removing a wrong 3D curve by call to *ShapeFix_Edge::FixRemoveCurve3d* -- only if forced by flag *FixRemoveCurve3dMode*; + * fixing a missing 2D curve by call to *ShapeFix_Edge::FixAddPCurve* -- if not forbidden by flag *FixAddPCurveMode*; + * removing a wrong 3D curve by call to *ShapeFix_Edge::FixRemoveCurve3d* -- only if forced by flag *FixRemoveCurve3dMode*; * fixing a missing 3D curve by call to *ShapeFix_Edge::FixAddCurve3d* -- if not forbidden by flag *FixAddCurve3dMode*; * fixing 2D curves of seam edges -- if not forbidden by flag *FixSeamMode*; - * fixing 2D curves which can be shifted at an integer number of periods on the closed surface by call to *ShapeFix_Edge::FixShifted* -- if not forbidden by flag *FixShiftedMode*. - -This fix is required if 2D curves of some edges in a wire lying on a closed surface were recomputed from 3D curves. In that case, the 2D curve for the edge, which goes along the seam of the surface, can be incorrectly shifted at an integer number of periods. The method *FixShifted* detects such cases and shifts wrong 2D curves back, ensuring that the 2D curves of the edges in the wire are connected. + * fixing 2D curves which can be shifted at an integer number of periods on the closed surface by call to *ShapeFix_Edge::FixShifted* -- if not forbidden by flag *FixShiftedMode*. + +This fix is required if 2D curves of some edges in a wire lying on a closed surface were recomputed from 3D curves. +In that case, the 2D curve for the edge, which goes along the seam of the surface, can be incorrectly shifted at an integer number of periods. +The method *FixShifted* detects such cases and shifts wrong 2D curves back, ensuring that the 2D curves of the edges in the wire are connected. * fixing the SameParameter problem by call to *ShapeFix_Edge::FixSameParameter* -- if not forbidden by flag *FixSameParameterMode*. - - + #### Fixing degenerated edges -*FixDegenerated* method checks whether an edge in a wire lies on a degenerated point of the supporting surface, or whether there is a degenerated point between the edges. If one of these cases is detected for any edge, a new degenerated edge is created and it replaces the current edge in the first case or is added to the wire in the second case. The newly created degenerated edge has a straight 2D curve, which goes from the end of the 2D curve of the preceding edge to the start of the following one. +*FixDegenerated* method checks whether an edge in a wire lies on a degenerated point of the supporting surface, or whether there is a degenerated point between the edges. +If one of these cases is detected for any edge, a new degenerated edge is created and it replaces the current edge in the first case or is added to the wire in the second case. +The newly created degenerated edge has a straight 2D curve, which goes from the end of the 2D curve of the preceding edge to the start of the following one. #### Fixing intersections of 2D curves of the edges -*FixSelfIntersection* method detects and fixes the following problems: - * self-intersection of 2D curves of individual edges. If the flag *ModifyGeometryMode()* is False this fix will be performed by increasing the tolerance of one of end vertices to a value less then *MaxTolerance()*. - * intersection of 2D curves of each of the two adjacent edges (except the first and the last edges if the flag ClosedWireMode is False). If such intersection is found, the common vertex is modified in order to comprise the intersection point. If the flag *ModifyTopologyMode* is False this fix will be performed by increasing the tolerance of the vertex to a value less then *MaxTolerance()*. - * intersection of 2D curves of non-adjacent edges. If such intersection is found the tolerance of the nearest vertex is increased to comprise the intersection point. If such increase cannot be done with a tolerance less than *MaxTolerance* this fix will not be performed. +*FixSelfIntersection* method detects and fixes the following problems: + * Self-intersection of 2D curves of individual edges. If the flag *ModifyGeometryMode()* is False this fix will be performed by increasing the tolerance of one of end vertices to a value less then *MaxTolerance()*. + * Intersection of 2D curves of each of the two adjacent edges (except the first and the last edges if the flag ClosedWireMode is False). + If such intersection is found, the common vertex is modified in order to comprise the intersection point. + If the flag *ModifyTopologyMode* is False this fix will be performed by increasing the tolerance of the vertex to a value less then *MaxTolerance()*. + * Intersection of 2D curves of non-adjacent edges. + If such intersection is found the tolerance of the nearest vertex is increased to comprise the intersection point. + If such increase cannot be done with a tolerance less than *MaxTolerance* this fix will not be performed. #### Fixing a lacking edge -*FixLacking* method checks whether a wire is not closed in the parametric space of the surface (while it can be closed in 3D). This is done by checking whether the gap between 2D curves of each of the two adjacent edges in the wire is smaller than the tolerance of the corresponding vertex. The algorithm computes the gap between the edges, analyses positional relationship of the ends of these edges and (if possible) tries to insert a new edge into the gap or increases the tolerance. +*FixLacking* method checks whether a wire is not closed in the parametric space of the surface (while it can be closed in 3D). +This is done by checking whether the gap between 2D curves of each of the two adjacent edges in the wire is smaller than the tolerance of the corresponding vertex. +The algorithm computes the gap between the edges, analyses positional relationship of the ends of these edges and (if possible) tries to insert a new edge into the gap or increases the tolerance. -#### Fixing gaps in 2D and 3D wire by geometrical filling +#### Fixing gaps in 2D and 3D wire by geometric filling The following methods check gaps between the ends of 2D or 3D curves of adjacent edges: -* Method *FixGap2d* moves the ends of 2D curves to the middle point. -* Method *FixGaps3d* moves the ends of 3D curves to a common vertex. - -Boolean flag *FixGapsByRanges* is used to activate an additional mode applied before converting to B-Splines. When this mode is on, methods try to find the most precise intersection of curves, or the most precise projection of a target point, or an extremity point between two curves (to modify their parametric range accordingly). This mode is off by default. Independently of the additional mode described above, if gaps remain, these methods convert curves to B-Spline form and shift their ends if a gap is detected. +* Method *FixGap2d* moves the ends of 2D curves to the middle point. +* Method *FixGaps3d* moves the ends of 3D curves to a common vertex. -#### Example: A custom set of fixes +Boolean flag *FixGapsByRanges* is used to activate an additional mode applied before converting to B-Splines. +When this mode is on, methods try to find the most precise intersection of curves, or the most precise projection of a target point, or an extremity point between two curves (to modify their parametric range accordingly). +This mode is off by default. Independently of the additional mode described above, if gaps remain, these methods convert curves to B-Spline form and shift their ends if a gap is detected. +#### Example: A custom set of fixes -Let us create a custom set of fixes as an example. +Let us create a custom set of fixes as an example: ~~~~{.cpp} -TopoDS_Face face = ...; -TopoDS_Wire wire = ...; -Standard_Real precision = 1e-04; -ShapeFix_Wire sfw (wire, face, precision); -//Creates a tool and loads objects into it -sfw.FixReorder(); -//Orders edges in the wire so that each edge starts at the end of the one before it. -sfw.FixConnected(); -//Forces all adjacent edges to share -//the same vertex -Standard_Boolean LockVertex = Standard_True; - if (sfw.FixSmall (LockVertex, precision)) { - //Removes all edges which are shorter than the given precision and have the same vertex at both ends. +TopoDS_Face theFace = ...; +TopoDS_Wire theWire = ...; +Standard_Real aPrecision = 1e-04; +ShapeFix_Wire aFixWire (theWire, theFace, aPrecision); +// create a tool and loads objects into it +aFixWire.FixReorder(); +// order edges in the wire so that each edge starts at the end of the one before it +aFixWire.FixConnected(); +// force all adjacent edges to share the same vertex +bool toLockVertex = true; +if (aFixWire.FixSmall (toLockVertex, aPrecision)) +{ + // removed all edges which are shorter than the given precision and have the same vertex at both ends } - if (sfw.FixSelfIntersection()) { - //Fixes self-intersecting edges and intersecting adjacent edges. - cout <<"Wire was slightly self-intersecting. Repaired"<SetPrecision(prec); -sfwf->SetMaxTolerance(maxTol); -//fixing of gaps -sfwf->FixWireGaps(); -//fixing of small edges -//setting of the drop mode for the fixing of small edges and max possible angle between merged edges. -sfwf->ModeDropSmallEdges = Standard_True; -sfwf->SetLimliteAngle(angle); -//performing the fix -sfwf->FixSmallEdges(); -//getting the result -TopoDS_Shape resShape = sfwf->Shape(); -~~~~ - -It is desirable that a shape is topologically correct before applying the methods of this class. - -@subsubsection occt_shg_2_3_10 Tool for removing small faces from a shape - -Class ShapeFix_FixSmallFaceThis tool is intended for dropping small faces from the shape. The following cases are processed: -* Spot face: if the size of the face is less than the given precision; -* Strip face: if the size of the face in one dimension is less then the given precision. -The sequence of actions for performing the fix is the same as for the fixes described above: +~~~~{.cpp} +// creation of a tool +Handle(ShapeFix_Wireframe) aFixWireframe = new ShapeFix_Wireframe (theShape); +// set the working precision problems will be detected with and the maximum allowed tolerance +aFixWireframe->SetPrecision (thePrec); +aFixWireframe->SetMaxTolerance (theMaxTol); +// fixing of gaps +aFixWireframe->FixWireGaps(); +// fixing of small edges +// setting of the drop mode for the fixing of small edges and max possible angle between merged edges +aFixWireframe->ModeDropSmallEdges = true; +aFixWireframe->SetLimliteAngle (theAngle); +// performing the fix +aFixWireframe->FixSmallEdges(); +// getting the result +TopoDS_Shape aResShape = aFixWireframe->Shape(); +~~~~ +It is desirable that a shape is topologically correct before applying the methods of this class. + +@subsubsection occt_shg_2_3_10 Tool for removing small faces from a shape + +Class ShapeFix_FixSmallFaceThis tool is intended for dropping small faces from the shape. The following cases are processed: +* Spot face: if the size of the face is less than the given precision; +* Strip face: if the size of the face in one dimension is less then the given precision. + +The sequence of actions for performing the fix is the same as for the fixes described above: ~~~~{.cpp} -//creation of a tool -Handle(ShapeFix_FixSmallFace) sff = new ShapeFix_FixSmallFace(shape); -//setting of tolerances -sff->SetPrecision(prec); -sff->SetMaxTolerance(maxTol); -//performing fixes -sff.Perform(); -//getting the result -TopoDS_Shape resShape = sff.FixShape(); +// creation of a tool +Handle(ShapeFix_FixSmallFace) aFixSmallFace = new ShapeFix_FixSmallFace (theShape); +// setting of tolerances +aFixSmallFace->SetPrecision (thePrec); +aFixSmallFace->SetMaxTolerance (theMaxTol); +// performing fixes +aFixSmallFace.Perform(); +// getting the result +TopoDS_Shape aResShape = aFixSmallFace.FixShape(); ~~~~ -@subsubsection occt_shg_2_3_11 Tool to modify tolerances of shapes (Class ShapeFix_ShapeTolerance). +@subsubsection occt_shg_2_3_11 Tool to modify tolerances of shapes (Class ShapeFix_ShapeTolerance) -This tool provides a functionality to set tolerances of a shape and its sub-shapes. -In Open CASCADE Technology only vertices, edges and faces have tolerances. +This tool provides a functionality to set tolerances of a shape and its sub-shapes. +In Open CASCADE Technology only vertices, edges and faces have tolerances. -This tool allows processing each concrete type of sub-shapes or all types at a time. -You set the tolerance functionality as follows: +This tool allows processing each concrete type of sub-shapes or all types at a time. +You set the tolerance functionality as follows: * set a tolerance for sub-shapes, by method SetTolerance, * limit tolerances with given ranges, by method LimitTolerance. - + ~~~~{.cpp} -//creation of a tool -ShapeFix_ShapeTolerance Sft; -//setting a specified tolerance on shape and all of its sub-shapes. -Sft.SetTolerance(shape,toler); -//setting a specified tolerance for vertices only -Sft.SetTolerance(shape,toler,TopAbs_VERTEX); -//limiting the tolerance on the shape and its sub-shapes between minimum and maximum tolerances -Sft.LimitTolerance(shape,tolermin,tolermax); +// creation of a tool +ShapeFix_ShapeTolerance aFixToler; +// setting a specified tolerance on shape and all of its sub-shapes +aFixToler.SetTolerance (theShape, theToler); +// setting a specified tolerance for vertices only +aFixToler.SetTolerance (theShape, theToler, TopAbs_VERTEX); +// limiting the tolerance on the shape and its sub-shapes between minimum and maximum tolerances +aFixToler.LimitTolerance (theShape, theTolerMin, theTolerMax); ~~~~ - @section occt_shg_3 Analysis @subsection occt_shg_3_1 Analysis of shape validity -The *ShapeAnalysis* package provides tools for the analysis of topological shapes. -It is not necessary to check a shape by these tools before the execution of repairing tools because these tools are used for the analysis before performing fixes inside the repairing tools. -However, if you want, these tools can be used for detecting some of shape problems independently from the repairing tools. +The *ShapeAnalysis* package provides tools for the analysis of topological shapes. +It is not necessary to check a shape by these tools before the execution of repairing tools because these tools are used for the analysis before performing fixes inside the repairing tools. +However, if you want, these tools can be used for detecting some of shape problems independently from the repairing tools. - It can be done in the following way: - * create an analysis tool. - * initialize it by shape and set a tolerance problems will be detected with if it is necessary. +It can be done in the following way: + * create an analysis tool; + * initialize it by shape and set a tolerance problems will be detected with if it is necessary; * check the problem that interests you. - -~~~~{.cpp} -TopoDS_Face face = ...; -ShapeAnalysis_Edge sae; -//Creates a tool for analyzing an edge -for(TopExp_Explorer Exp(face,TopAbs_EDGE);Exp.More();Exp.Next()) { - TopoDS_Edge edge = TopoDS::Edge (Exp.Current()); - if (!sae.HasCurve3d (edge)) { - cout <<"Edge has no 3D curve"<< endl; } -} + +~~~~{.cpp} +TopoDS_Face theFace = ...; +// create a tool for analyzing an edge +ShapeAnalysis_Edge aCheckEdge; +for (TopExp_Explorer anExp (theFace, TopAbs_EDGE); anExp.More(); anExp.Next()) +{ + TopoDS_Edge anEdge = TopoDS::Edge (anExp.Current()); + if (!aCheckEdge.HasCurve3d (anEdge)) + { + std::cout << "Edge has no 3D curve\n"; + } +} ~~~~ -@subsubsection occt_shg_3_1_1 Analysis of orientation of wires on a face. +@subsubsection occt_shg_3_1_1 Analysis of orientation of wires on a face -It is possible to check whether a face has an outer boundary with the help of method *ShapeAnalysis::IsOuterBound*. +It is possible to check whether a face has an outer boundary with the help of method *ShapeAnalysis::IsOuterBound*. ~~~~{.cpp} -TopoDS_Face face … //analyzed face -if(!ShapeAnalysis::IsOuterBound(face)) { -cout<<"Face has not outer boundary"< MaxAllowed) { - cout<<"Maximum tolerance of the vertices exceeds maximum allowed"< theMaxAllowed) +{ + std::cout << "Maximum tolerance of the vertices exceeds maximum allowed\n"; } ~~~~ -@subsubsection occt_shg_3_2_2 Analysis of free boundaries. +@subsubsection occt_shg_3_2_2 Analysis of free boundaries -Class ShapeAnalysis_FreeBounds is intended to analyze and output the free bounds of a shape. Free bounds are wires consisting of edges referenced only once by only one face in the shape. -This class works on two distinct types of shapes when analyzing their free bounds: -* Analysis of possible free bounds taking the specified tolerance into account. This analysis can be applied to a compound of faces. The analyzer of the sewing algorithm is used to forecast what free bounds would be obtained after the sewing of these faces is performed. The following method should be used for this analysis: +Class ShapeAnalysis_FreeBounds is intended to analyze and output the free bounds of a shape. +Free bounds are wires consisting of edges referenced only once by only one face in the shape. +This class works on two distinct types of shapes when analyzing their free bounds: +* Analysis of possible free bounds taking the specified tolerance into account. + This analysis can be applied to a compound of faces. + The analyzer of the sewing algorithm is used to forecast what free bounds would be obtained after the sewing of these faces is performed. + The following method should be used for this analysis: ~~~~{.cpp} -ShapeAnalysis_FreeBounds safb(shape,toler); + ShapeAnalysis_FreeBounds aCheckFreeBnd (theShape, theToler); ~~~~ -* Analysis of already existing free bounds. Actual free bounds (edges shared by the only face in the shell) are output in this case. *ShapeAnalysis_Shell* is used for that. +* Analysis of already existing free bounds. + Actual free bounds (edges shared by the only face in the shell) are output in this case. + *ShapeAnalysis_Shell* is used for that. ~~~~{.cpp} -ShapeAnalysis_FreeBounds safb(shape); + ShapeAnalysis_FreeBounds aCheckFreeBnd (theShape); ~~~~ -When connecting edges into wires this algorithm tries to build wires of maximum length. Two options are provided for the user to extract closed sub-contours out of closed and/or open contours. Free bounds are returned as two compounds, one for closed and one for open wires. To obtain a result it is necessary to use methods: +When connecting edges into wires this algorithm tries to build wires of maximum length. +Two options are provided for the user to extract closed sub-contours out of closed and/or open contours. +Free bounds are returned as two compounds, one for closed and one for open wires. +To obtain a result it is necessary to use methods: ~~~~{.cpp} -TopoDS_Compound ClosedWires = safb.GetClosedWires(); -TopoDS_Compound OpenWires = safb.GetOpenWires(); +TopoDS_Compound aClosedWires = aCheckFreeBnd.GetClosedWires(); +TopoDS_Compound anOpenWires = aCheckFreeBnd.GetOpenWires(); ~~~~ -This class also provides some static methods for advanced use: connecting edges/wires to wires, extracting closed sub-wires from wires, distributing wires into compounds for closed and open wires. +This class also provides some static methods for advanced use: connecting edges/wires to wires, extracting closed sub-wires from wires, distributing wires into compounds for closed and open wires. ~~~~{.cpp} -TopoDS_Shape shape = ...; -Standard_Real SewTolerance = 1.e-03; -//Tolerance for sewing -Standard_Boolean SplitClosed = Standard_False; -Standard_Boolean SplitOpen = Standard_True; -//in case of analysis of possible free boundaries -ShapeAnalysis_FreeBounds safb (shape, SewTolerance, -SplitClosed, SplitOpen); -//in case of analysis of existing free bounds -ShapeAnalysis_FreeBounds safb (shape, SplitClosed, SplitOpen); -//getting the results -TopoDS_Compound ClosedWires = safb.GetClosedWires(); -//Returns a compound of closed free bounds -TopoDS_Compound OpenWires = safb.GetClosedWires(); -//Returns a compound of open free bounds +TopoDS_Shape theShape = ...; +// tolerance for sewing +Standard_Real theSewTolerance = 1.e-03; +bool theToSplitClosed = false; +bool theToSplitOpen = true; +// in case of analysis of possible free boundaries +ShapeAnalysis_FreeBounds aCheckFreeBnd (theShape, theSewTolerance, theToSplitClosed, theToSplitOpen); +// in case of analysis of existing free bounds +ShapeAnalysis_FreeBounds aCheckFreeBnd (theShape, theToSplitClosed, theToSplitOpen); +// getting the results +TopoDS_Compound aClosedWires = aCheckFreeBnd.GetClosedWires(); +// return a compound of closed free bounds +TopoDS_Compound anOpenWires = aCheckFreeBnd.GetClosedWires(); +// return a compound of open free bounds ~~~~ @subsubsection occt_shg_3_2_3 Analysis of shape contents -Class *ShapeAnalysis_ShapeContents* provides tools counting the number of sub-shapes and selecting a sub-shape by the following criteria: +Class *ShapeAnalysis_ShapeContents* provides tools counting the number of sub-shapes and selecting a sub-shape by the following criteria: -Methods for getting the number of sub-shapes: +Methods for getting the number of sub-shapes: * number of solids, * number of shells, * number of faces, * number of edges, * number of vertices. - -Methods for calculating the number of geometrical objects or sub-shapes with a specified type: + +Methods for calculating the number of geometric objects or sub-shapes with a specified type: * number of free faces, * number of free wires, * number of free edges, * number of C0 surfaces, * number of C0 curves, - * number of BSpline surfaces,… etc - -and selecting sub-shapes by various criteria. + * number of BSpline surfaces, etc. + +and selecting sub-shapes by various criteria. -The corresponding flags should be set to True for storing a shape by a specified criteria: - * faces based on indirect surfaces -- *safc.MofifyIndirectMode() = Standard_True*; - * faces based on offset surfaces -- *safc.ModifyOffsetSurfaceMode() = Standard_True*; - * edges if their 3D curves are trimmed -- *safc.ModifyTrimmed3dMode() = Standard_True*; - * edges if their 3D curves and 2D curves are offset curves -- *safc.ModifyOffsetCurveMode() = Standard_True*; - * edges if their 2D curves are trimmed -- *safc.ModifyTrimmed2dMode() = Standard_True*; +The corresponding flags should be set to True for storing a shape by a specified criteria: + * faces based on indirect surfaces -- *aCheckContents.MofifyIndirectMode() = Standard_True*; + * faces based on offset surfaces -- *aCheckContents.ModifyOffsetSurfaceMode() = Standard_True*; + * edges if their 3D curves are trimmed -- *aCheckContents.ModifyTrimmed3dMode() = Standard_True*; + * edges if their 3D curves and 2D curves are offset curves -- *aCheckContents.ModifyOffsetCurveMode() = Standard_True*; + * edges if their 2D curves are trimmed -- *aCheckContents.ModifyTrimmed2dMode() = Standard_True*; Let us, for example, select faces based on offset surfaces. ~~~~{.cpp} -ShapeAnalysis_ShapeContents safc; -//set a corresponding flag for storing faces based on the offset surfaces -safc.ModifyOffsetSurfaceMode() = Standard_True; -safc.Perform(shape); -//getting the number of offset surfaces in the shape -Standard_Integer NbOffsetSurfaces = safc.NbOffsetSurf(); -//getting the sequence of faces based on offset surfaces. -Handle(TopTools_HSequenceOfShape) seqFaces = safc.OffsetSurfaceSec(); +ShapeAnalysis_ShapeContents aCheckContents; +// set a corresponding flag for storing faces based on the offset surfaces +aCheckContents.ModifyOffsetSurfaceMode() = true; +aCheckContents.Perform (theShape); +// getting the number of offset surfaces in the shape +Standard_Integer aNbOffsetSurfaces = aCheckContents.NbOffsetSurf(); +// getting the sequence of faces based on offset surfaces +Handle(TopTools_HSequenceOfShape) aSeqFaces = aCheckContents.OffsetSurfaceSec(); ~~~~ @section occt_shg_4 Upgrading -Upgrading tools are intended for adaptation of shapes for better use by Open CASCADE Technology or for customization to particular needs, i.e. for export to another system. This means that not only it corrects and upgrades but also changes the definition of a shape with regard to its geometry, size and other aspects. Convenient API allows you to create your own tools to perform specific upgrading. Additional tools for particular cases provide an ability to divide shapes and surfaces according to certain criteria. +Upgrading tools are intended for adaptation of shapes for better use by Open CASCADE Technology or for customization to particular needs, i.e. for export to another system. +This means that not only it corrects and upgrades but also changes the definition of a shape with regard to its geometry, size and other aspects. +Convenient API allows you to create your own tools to perform specific upgrading. +Additional tools for particular cases provide an ability to divide shapes and surfaces according to certain criteria. @subsection occt_shg_4_1 Tools for splitting a shape according to a specified criterion @subsubsection occt_shg_4_1_1 Overview -These tools provide such modifications when one topological object can be divided or converted to several ones according to specified criteria. Besides, there are high level API tools for particular cases which: - * Convert the geometry of shapes up to a given continuity, - * split revolutions by U to segments less than the given value, - * convert to Bezier surfaces and Bezier curves, +These tools provide such modifications when one topological object can be divided or converted to several ones according to specified criteria. +Besides, there are high level API tools for particular cases which: + * convert the geometry of shapes up to a given continuity, + * split revolutions by U to segments less than the given value, + * convert to Bezier surfaces and Bezier curves, * split closed faces, - * convert C0 BSpline curve to a sequence of C1 BSpline curves. - -All tools for particular cases are based on general tools for shape splitting but each of them has its own tools for splitting or converting geometry in accordance with the specified criteria. + * convert C0 BSpline curve to a sequence of C1 BSpline curves. + +All tools for particular cases are based on general tools for shape splitting but each of them has its own tools for splitting or converting geometry in accordance with the specified criteria. -General tools for shape splitting are: +General tools for shape splitting are: * tool for splitting the whole shape, * tool for splitting a face, * tool for splitting wires. - -Tools for shape splitting use tools for geometry splitting: + +Tools for shape splitting use tools for geometry splitting: * tool for splitting surfaces, * tool for splitting 3D curves, * tool for splitting 2D curves. - -@subsubsection occt_shg_4_1_2 Using tools available for shape splitting. -If it is necessary to split a shape by a specified continuity, split closed faces in the shape, split surfaces of revolution in the shape by angle or to convert all surfaces, all 3D curves, all 2D curves in the shape to Bezier, it is possible to use the existing/available tools. - -The usual way to use these tools exception for the tool of converting a C0 BSpline curve is the following: - * a tool is created and initialized by shape. - * work precision for splitting and the maximum allowed tolerance are set - * the value of splitting criterion Is set (if necessary) - * splitting is performed. - * splitting statuses are obtained. - * result is obtained - * the history of modification of the initial shape and its sub-shapes is output (this step is optional). -Let us, for example, split all surfaces and all 3D and 2D curves having a continuity of less the C2. - -~~~~{.cpp} -//create a tool and initializes it by shape. -ShapeUpgrade_ShapeDivideContinuity ShapeDivedeCont(initShape); +@subsubsection occt_shg_4_1_2 Using tools available for shape splitting -//set the working 3D and 2D precision and the maximum allowed //tolerance -ShapeDivideCont.SetTolerance(prec); -ShapeDivideCont.SetTolerance2D(prec2d); -ShapeDivideCont.SetMaxTolerance(maxTol); +If it is necessary to split a shape by a specified continuity, split closed faces in the shape, split surfaces of revolution in the shape by angle or to convert all surfaces, +all 3D curves, all 2D curves in the shape to Bezier, it is possible to use the existing/available tools. -//set the values of criteria for surfaces, 3D curves and 2D curves. -ShapeDivideCont.SetBoundaryCriterion(GeomAbs_C2); -ShapeDivideCont.SetPCurveCriterion(GeomAbs_C2); -ShapeDivideCont.SetSurfaceCriterion(GeomAbs_C2); - -//perform the splitting. -ShapeDivideCont.Perform(); +The usual way to use these tools exception for the tool of converting a C0 BSpline curve is the following: + * a tool is created and initialized by shape; + * work precision for splitting and the maximum allowed tolerance are set; + * the value of splitting criterion Is set (if necessary); + * splitting is performed; + * splitting statuses are obtained; + * result is obtained; + * the history of modification of the initial shape and its sub-shapes is output (this step is optional). -//check the status and gets the result -if(ShapeDivideCont.Status(ShapeExtend_DONE) - TopoDS_Shape result = ShapeDivideCont.GetResult(); -//get the history of modifications made to faces -for(TopExp_Explorer aExp(initShape,TopAbs_FACE); aExp.More(0; aExp.Next()) { - TopoDS_Shape modifShape = ShapeDivideCont.GetContext()-> Apply(aExp.Current()); -} +Let us, for example, split all surfaces and all 3D and 2D curves having a continuity of less the C2: +~~~~{.cpp} +// create a tool and initializes it by shape +ShapeUpgrade_ShapeDivideContinuity aShDivCont (theInitShape); + +// set the working 3D and 2D precision and the maximum allowed tolerance +aShDivCont.SetTolerance (thePrec); +aShDivCont.SetTolerance2D (thePrec2d); +aShDivCont.SetMaxTolerance (theMaxTol); + +//set the values of criteria for surfaces, 3D curves and 2D curves +aShDivCont.SetBoundaryCriterion(GeomAbs_C2); +aShDivCont.SetPCurveCriterion(GeomAbs_C2); +aShDivCont.SetSurfaceCriterion(GeomAbs_C2); + +// perform the splitting +aShDivCont.Perform(); + +// check the status and gets the result +if (aShDivCont.Status (ShapeExtend_DONE) +{ + TopoDS_Shape aResult = aShDivCont.GetResult(); +} +// get the history of modifications made to faces +for (TopExp_Explorer anExp (theInitShape, TopAbs_FACE); anExp.More(); anExp.Next()) +{ + TopoDS_Shape aModifShape = aShDivCont.GetContext()->Apply (anExp.Current()); +} ~~~~ -@subsubsection occt_shg_4_1_3 Creation of a new tool for splitting a shape. -To create a new splitting tool it is necessary to create tools for geometry splitting according to a desirable criterion. The new tools should be inherited from basic tools for geometry splitting. Then the new tools should be set into corresponding tools for shape splitting. - * a new tool for surface splitting should be set into the tool for face splitting - * new tools for splitting of 3D and 2D curves should be set into the splitting tool for wires. - -To change the value of criterion of shape splitting it is necessary to create a new tool for shape splitting that should be inherited from the general splitting tool for shapes. - -Let us split a shape according to a specified criterion. - -~~~~{.cpp} -//creation of new tools for geometry splitting by a specified criterion. -Handle(MyTools_SplitSurfaceTool) MySplitSurfaceTool = new MyTools_SplitSurfaceTool; -Handle(MyTools_SplitCurve3DTool) MySplitCurve3Dtool = new MyTools_SplitCurve3DTool; -Handle(MyTools_SplitCurve2DTool) MySplitCurve2Dtool = new MyTools_SplitCurve2DTool; +@subsubsection occt_shg_4_1_3 Creation of a new tool for splitting a shape -//creation of a tool for splitting the shape and initialization of that tool by shape. -TopoDS_Shape initShape -MyTools_ShapeDivideTool ShapeDivide (initShape); +To create a new splitting tool it is necessary to create tools for geometry splitting according to a desirable criterion. +The new tools should be inherited from basic tools for geometry splitting. +Then the new tools should be set into corresponding tools for shape splitting. + * a new tool for surface splitting should be set into the tool for face splitting; + * new tools for splitting of 3D and 2D curves should be set into the splitting tool for wires. -//setting of work precision for splitting and maximum allowed tolerance. -ShapeDivide.SetPrecision(prec); -ShapeDivide.SetMaxTolerance(MaxTol); +To change the value of criterion of shape splitting it is necessary to create a new tool for shape splitting that should be inherited from the general splitting tool for shapes. -//setting of new splitting geometry tools in the shape splitting tools -Handle(ShapeUpgrade_FaceDivide) FaceDivide = ShapeDivide->GetSplitFaceTool(); -Handle(ShapeUpgrade_WireDivide) WireDivide = FaceDivide->GetWireDivideTool(); -FaceDivide->SetSplitSurfaceTool(MySplitSurfaceTool); -WireDivide->SetSplitCurve3dTool(MySplitCurve3DTool); -WireDivide->SetSplitCurve2dTool(MySplitCurve2DTool); +Let us split a shape according to a specified criterion. -//setting of the value criterion. - ShapeDivide.SetValCriterion(val); +~~~~{.cpp} +// creation of new tools for geometry splitting by a specified criterion +Handle(MyTools_SplitSurfaceTool) MySplitSurfaceTool = new MyTools_SplitSurfaceTool(); +Handle(MyTools_SplitCurve3DTool) MySplitCurve3Dtool = new MyTools_SplitCurve3DTool(); +Handle(MyTools_SplitCurve2DTool) MySplitCurve2Dtool = new MyTools_SplitCurve2DTool(); + +// creation of a tool for splitting the shape and initialization of that tool by shape +TopoDS_Shape theInitShape = ...; +MyTools_ShapeDivideTool aShapeDivide (theInitShape); + +// setting of work precision for splitting and maximum allowed tolerance +aShapeDivide.SetPrecision (prec); +aShapeDivide.SetMaxTolerance (MaxTol); + +// setting of new splitting geometry tools in the shape splitting tools +Handle(ShapeUpgrade_FaceDivide) aFaceDivide = aShapeDivide->GetSplitFaceTool(); +Handle(ShapeUpgrade_WireDivide) aWireDivide = aFaceDivide->GetWireDivideTool(); +aFaceDivide->SetSplitSurfaceTool (MySplitSurfaceTool); +aWireDivide->SetSplitCurve3dTool (MySplitCurve3DTool); +aWireDivide->SetSplitCurve2dTool (MySplitCurve2DTool); + +// setting of the value criterion +aShapeDivide.SetValCriterion (val); -//shape splitting -ShapeDivide.Perform(); +// shape splitting +aShapeDivide.Perform(); -//getting the result -TopoDS_Shape splitShape = ShapeDivide.GetResult(); +// getting the result +TopoDS_Shape aSplitShape = aShapeDivide.GetResult(); -//getting the history of modifications of faces -for(TopExp_Explorer aExp(initShape,TopAbs_FACE); aExp.More(0; aExp.Next()) { -TopoDS_Shape modifShape = ShapeDivide.GetContext()-> Apply(aExp.Current()); +// getting the history of modifications of faces +for (TopExp_Explorer anExp (theInitShape, TopAbs_FACE); anExp.More(0; anExp.Next()) +{ + TopoDS_Shape aModifShape = aShapeDivide.GetContext()->Apply (anExp.Current()); } ~~~~ -@subsection occt_shg_4_2 General splitting tools. - -@subsubsection occt_shg_4_2_1 General tool for shape splitting +@subsection occt_shg_4_2 General splitting tools -Class *ShapeUpgrade_ShapeDivide* provides shape splitting and converting according to the given criteria. It performs these operations for each face with the given tool for face splitting (*ShapeUpgrade_FaceDivide* by default). +@subsubsection occt_shg_4_2_1 General tool for shape splitting -This tool provides access to the tool for dividing faces with the help of the methods *SetSplitFaceTool* and *GetSpliFaceTool.* +Class *ShapeUpgrade_ShapeDivide* provides shape splitting and converting according to the given criteria. +It performs these operations for each face with the given tool for face splitting (*ShapeUpgrade_FaceDivide* by default). + +This tool provides access to the tool for dividing faces with the help of the methods *SetSplitFaceTool* and *GetSpliFaceTool.* @subsubsection occt_shg_4_2_2 General tool for face splitting -Class *ShapeUpgrade_FaceDivide* divides a Face (edges in the wires, by splitting 3D and 2D curves, as well as the face itself, by splitting the supporting surface) according to the given criteria. +Class *ShapeUpgrade_FaceDivide* divides a Face (edges in the wires, by splitting 3D and 2D curves, as well as the face itself, by splitting the supporting surface) according to the given criteria. -The area of the face intended for division is defined by 2D curves of the wires on the Face. -All 2D curves are supposed to be defined (in the parametric space of the supporting surface). -The result is available after the call to the *Perform* method. It is a Shell containing all resulting Faces. All modifications made during the splitting operation are recorded in the external context (*ShapeBuild_ReShape*). +The area of the face intended for division is defined by 2D curves of the wires on the Face. +All 2D curves are supposed to be defined (in the parametric space of the supporting surface). +The result is available after the call to the *Perform* method. It is a Shell containing all resulting Faces. +All modifications made during the splitting operation are recorded in the external context (*ShapeBuild_ReShape*). -This tool provides access to the tool for wire division and surface splitting by means of the following methods: -* *SetWireDivideTool,* -* *GetWireDivideTool,* -* *SetSurfaceSplitTool,* -* *GetSurfaceSplitTool*. +This tool provides access to the tool for wire division and surface splitting by means of the following methods: +* *SetWireDivideTool*, +* *GetWireDivideTool*, +* *SetSurfaceSplitTool*, +* *GetSurfaceSplitTool*. @subsubsection occt_shg_4_2_3 General tool for wire splitting -Class *ShapeUpgrade_WireDivide* divides edges in the wire lying on the face or free wires or free edges with a given criterion. It splits the 3D curve and 2D curve(s) of the edge on the face. Other 2D curves, which may be associated with the edge, are simply copied. If the 3D curve is split then the 2D curve on the face is split as well, and vice-versa. The original shape is not modified. Modifications made are recorded in the context (*ShapeBuild_ReShape*). -This tool provides access to the tool for dividing and splitting 3D and 2D curves by means of the following methods: -* *SetEdgeDivdeTool,* -* *GetEdgeDivideTool,* -* *SetSplitCurve3dTool,* -* *GetSplitCurve3dTool,* -* *SetSplitCurve2dTool,* -* *GetSplitCurve2dTool* +Class *ShapeUpgrade_WireDivide* divides edges in the wire lying on the face or free wires or free edges with a given criterion. +It splits the 3D curve and 2D curve(s) of the edge on the face. +Other 2D curves, which may be associated with the edge, are simply copied. +If the 3D curve is split then the 2D curve on the face is split as well, and vice-versa. +The original shape is not modified. Modifications made are recorded in the context (*ShapeBuild_ReShape*). + +This tool provides access to the tool for dividing and splitting 3D and 2D curves by means of the following methods: +* *SetEdgeDivdeTool*, +* *GetEdgeDivideTool*, +* *SetSplitCurve3dTool*, +* *GetSplitCurve3dTool*, +* *SetSplitCurve2dTool*, +* *GetSplitCurve2dTool*. and it also provides access to the mode for splitting edges by methods *SetEdgeMode* and *GetEdgeMode*. - + This mode sets whether only free edges, only shared edges or all edges are split. @subsubsection occt_shg_4_2_4 General tool for edge splitting -Class *ShapeUpgrade_EdgeDivide* divides edges and their geometry according to the specified criteria. It is used in the wire-dividing tool. +Class *ShapeUpgrade_EdgeDivide* divides edges and their geometry according to the specified criteria. +It is used in the wire-dividing tool. -This tool provides access to the tool for dividing and splitting 3D and 2D curves by the following methods: -* *SetSplitCurve3dTool,* -* *GetSplitCurve3dTool,* -* *SetSplitCurve2dTool,* +This tool provides access to the tool for dividing and splitting 3D and 2D curves by the following methods: +* *SetSplitCurve3dTool*, +* *GetSplitCurve3dTool*, +* *SetSplitCurve2dTool*, * *GetSplitCurve2dTool*. @subsubsection occt_shg_4_2_5 General tools for geometry splitting -There are three general tools for geometry splitting. - * General tool for surface splitting.(*ShapeUpgrade_SplitSurface*) - * General tool for splitting 3D curves.(*ShapeUpgrade_SplitCurve3d*) - * General tool for splitting 2D curves.(*ShapeUpgrade_SplitCurve2d*) - -All these tools are constructed the same way: -They have methods: - * for initializing by geometry (method *Init*) - * for splitting (method *Perform*) +There are three general tools for geometry splitting. + * General tool for surface splitting (*ShapeUpgrade_SplitSurface*). + * General tool for splitting 3D curves (*ShapeUpgrade_SplitCurve3d*). + * General tool for splitting 2D curves (*ShapeUpgrade_SplitCurve2d*). + +All these tools are constructed the same way: +They have methods: + * for initializing by geometry (method *Init*); + * for splitting (method *Perform*); * for getting the status after splitting and the results: - + *Status* -- for getting the result status; - + *ResSurface* -- for splitting surfaces; - + *GetCurves* -- for splitting 3D and 2D curves. -During the process of splitting in the method *Perform* : - * splitting values in the parametric space are computed according to a specified criterion (method *Compute*) + + *Status* -- for getting the result status; + + *ResSurface* -- for splitting surfaces; + + *GetCurves* -- for splitting 3D and 2D curves. +During the process of splitting in the method *Perform*: + * splitting values in the parametric space are computed according to a specified criterion (method *Compute*); * splitting is made in accordance with the values computed for splitting (method *Build*). -To create new tools for geometry splitting it is enough to inherit a new tool from the general tool for splitting a corresponding type of geometry and to redefine the method for computation of splitting values according to the specified criterion in them. (method *Compute*). - -Header file for the tool for surface splitting by continuity: +To create new tools for geometry splitting it is enough to inherit a new tool from the general tool for splitting a corresponding type of geometry and to redefine the method for computation of splitting values +according to the specified criterion in them (method *Compute*). +Header file for the tool for surface splitting by continuity: ~~~~{.cpp} -class ShapeUpgrade_SplitSurfaceContinuity : public ShapeUpgrade_SplitSurface { -Standard_EXPORT ShapeUpgrade_SplitSurfaceContinuity(); - -//methods to set the criterion and the tolerance into the splitting tool -Standard_EXPORT void SetCriterion(const GeomAbs_Shape Criterion) ; -Standard_EXPORT void SetTolerance(const Standard_Real Tol) ; - -//redefinition of method Compute -Standard_EXPORT virtual void Compute(const Standard_Boolean Segment) ; -Standard_EXPORT ~ShapeUpgrade_SplitSurfaceContinuity(); -private: -GeomAbs_Shape myCriterion; -Standard_Real myTolerance; -Standard_Integer myCont; +class ShapeUpgrade_SplitSurfaceContinuity : public ShapeUpgrade_SplitSurface +{ + ShapeUpgrade_SplitSurfaceContinuity(); + virtual ~ShapeUpgrade_SplitSurfaceContinuity(); + + // methods to set the criterion and the tolerance into the splitting tool + void SetCriterion (GeomAbs_Shape theCriterion); + void SetTolerance (Standard_Real theTol); + + // redefinition of method Compute + virtual void Compute (const bool theSegment) override; + +private: + GeomAbs_Shape myCriterion; + Standard_Real myTolerance; + Standard_Integer myCont; }; ~~~~ -@subsection occt_shg_4_3 Specific splitting tools. +@subsection occt_shg_4_3 Specific splitting tools @subsubsection occt_shg_4_3_1 Conversion of shape geometry to the target continuity -Class *ShapeUpgrade_ShapeDivideContinuity* allows converting geometry with continuity less than the specified continuity to geometry with target continuity. If converting is not possible than geometrical object is split into several ones, which satisfy the given criteria. A topological object based on this geometry is replaced by several objects based on the new geometry. + +Class *ShapeUpgrade_ShapeDivideContinuity* allows converting geometry with continuity less than the specified continuity to geometry with target continuity. +If converting is not possible than geometric object is split into several ones, which satisfy the given criteria. +A topological object based on this geometry is replaced by several objects based on the new geometry. ~~~~{.cpp} -ShapeUpgrade_ShapeDivideContinuity sdc (shape); -sdc.SetTolerance (tol3d); -sdc.SetTolerance3d (tol2d); // if known, else 1.e-09 is taken -sdc.SetBoundaryCriterion (GeomAbs_C2); // for Curves 3D -sdc.SetPCurveCriterion (GeomAbs_C2); // for Curves 2D -sdc.SetSurfaceCriterion (GeomAbs_C2); // for Surfaces -sdc.Perform (); -TopoDS_Shape bshape = sdc.Result(); +ShapeUpgrade_ShapeDivideContinuity aShapeDivide (theShape); +aShapeDivide.SetTolerance (theTol3d); +aShapeDivide.SetTolerance3d (theTol2d); // if known, else 1.e-09 is taken +aShapeDivide.SetBoundaryCriterion(GeomAbs_C2); // for Curves 3D +aShapeDivide.SetPCurveCriterion (GeomAbs_C2); // for Curves 2D +aShapeDivide.SetSurfaceCriterion (GeomAbs_C2); // for Surfaces +aShapeDivide.Perform(); +TopoDS_Shape aResShape = aShapeDivide.Result(); //.. to also get the correspondences before/after -Handle(ShapeBuild_ReShape) ctx = sdc.Context(); -//.. on a given shape -if (ctx.IsRecorded (sh)) { - TopoDS_Shape newsh = ctx->Value (sh); -// if there are several results, they are recorded inside a Compound. -// .. process as needed -} +Handle(ShapeBuild_ReShape) aCtx = aShapeDivide.Context(); +//.. on a given shape +if (aCtx.IsRecorded (theSh)) +{ + TopoDS_Shape aNewSh = aCtx->Value (theSh); + // if there are several results, they are recorded inside a Compound + // .. process as needed +} ~~~~ @subsubsection occt_shg_4_3_2 Splitting by angle -Class *ShapeUpgrade_ShapeDivideAngle* allows splitting all surfaces of revolution, cylindrical, toroidal, conical, spherical surfaces in the given shape so that each resulting segment covers not more than the defined angle (in radians). + +Class *ShapeUpgrade_ShapeDivideAngle* allows splitting all surfaces of revolution, cylindrical, toroidal, conical, spherical surfaces in the given shape +so that each resulting segment covers not more than the defined angle (in radians). @subsubsection occt_shg_4_3_3 Conversion of 2D, 3D curves and surfaces to Bezier -Class *ShapeUpgrade_ShapeConvertToBezier* is an API tool for performing a conversion of 3D, 2D curves to Bezier curves and surfaces to Bezier based surfaces (Bezier surface, surface of revolution based on Bezier curve, offset surface based on any of previous types). - -This tool provides access to various flags for conversion of different types of curves and surfaces to Bezier by methods: -* For 3D curves: - * *Set3dConversion,* - * *Get3dConversion,* - * *Set3dLineConversion,* - * *Get3dLineConversion,* - * *Set3dCircleConversion,* - * *Get3dCircleConversion,* - * *Set3dConicConversion,* - * *Get3dConicConversion* -* For 2D curves: - * *Set2dConversion,* - * *Get2dConversion* -* For surfaces : - * *GetSurfaceConversion,* - * *SetPlaneMode,* - * *GetPlaneMode,* - * *SetRevolutionMode,* - * *GetRevolutionMode,* - * *SetExtrusionMode,* - * *GetExtrusionMode,* - * *SetBSplineMode,* - * *GetBSplineMode,* - -Let us attempt to produce a conversion of planes to Bezier surfaces. -~~~~{.cpp} -//Creation and initialization of a tool. -ShapeUpgrade_ShapeConvertToBezier SCB (Shape); -//setting tolerances +Class *ShapeUpgrade_ShapeConvertToBezier* is an API tool for performing a conversion of 3D, 2D curves to Bezier curves and surfaces to Bezier based surfaces +(Bezier surface, surface of revolution based on Bezier curve, offset surface based on any of previous types). + +This tool provides access to various flags for conversion of different types of curves and surfaces to Bezier by methods: +* For 3D curves: + * *Set3dConversion*, + * *Get3dConversion*, + * *Set3dLineConversion*, + * *Get3dLineConversion*, + * *Set3dCircleConversion*, + * *Get3dCircleConversion*, + * *Set3dConicConversion*, + * *Get3dConicConversion*. +* For 2D curves: + * *Set2dConversion*, + * *Get2dConversion*. +* For surfaces: + * *GetSurfaceConversion*, + * *SetPlaneMode*, + * *GetPlaneMode*, + * *SetRevolutionMode*, + * *GetRevolutionMode*, + * *SetExtrusionMode*, + * *GetExtrusionMode*, + * *SetBSplineMode*, + * *GetBSplineMode*. + +Let us attempt to produce a conversion of planes to Bezier surfaces. +~~~~{.cpp} +// creation and initialization of a tool +ShapeUpgrade_ShapeConvertToBezier aConvToBez (theShape); +// setting tolerances ... -//setting mode for conversion of planes -SCB.SetSurfaceConversion (Standard_True); -SCB.SetPlaneMode(Standard_True); -SCB.Perform(); -If(SCB.Status(ShapeExtend_DONE) - TopoDS_Shape result = SCB.GetResult(); +//setting mode for conversion of planes +aConvToBez.SetSurfaceConversion (true); +aConvToBez.SetPlaneMode (true); +aConvToBez.Perform(); +if (aConvToBez.Status(ShapeExtend_DONE) +{ + TopoDS_Shape aResult = aConvToBez.GetResult(); +} ~~~~ @subsubsection occt_shg_4_3_4 Tool for splitting closed faces -Class *ShapeUpgrade_ShapeDivideClosed* provides splitting of closed faces in the shape to a defined number of components by the U and V parameters. It topologically and (partially) geometrically processes closed faces and performs splitting with the help of class *ShapeUpgrade_ClosedFaceDivide*. +Class *ShapeUpgrade_ShapeDivideClosed* provides splitting of closed faces in the shape to a defined number of components by the U and V parameters. +It topologically and (partially) geometrically processes closed faces and performs splitting with the help of class *ShapeUpgrade_ClosedFaceDivide*. ~~~~{.cpp} -TopoDS_Shape aShape = …; -ShapeUpgrade_ShapeDivideClosed tool (aShape ); -Standard_Real closeTol = …; -tool.SetPrecision(closeTol); -Standard_Real maxTol = …; -tool.SetMaxTolerance(maxTol); -Standard_Integer NbSplitPoints = …; -tool.SetNbSplitPoints(num); -if ( ! tool.Perform() && tool.Status (ShapeExtend_FAIL) ) { - cout<<"Splitting of closed faces failed"<MinArea() = aMinArea; -aTool->RemoveFaceMode() = aModeRemoveFaces; - -//when method Perform is carried out on separate shapes. -aTool->Perform(aSeqShapes); - -//when method Perform is carried out on whole shape. -aTool->Perform(); -//check status set after method Perform -if(aTool->Status(ShapeExtend_FAIL) { - cout<<"Operation failed"<< <<"\n"; - return; -} - -if(aTool->Status(ShapeExtend_DONE1)) { - const TopTools_SequenceOfShape& aRemovedWires =aTool->RemovedWires(); - cout<MinArea() = theMinArea; +aTool->RemoveFaceMode() = theModeRemoveFaces; + +// when method Perform is carried out on separate shapes +aTool->Perform (theSeqShapes); + +// when method Perform is carried out on whole shape +aTool->Perform(); +// check status set after method Perform +if (aTool->Status (ShapeExtend_FAIL) +{ + std::cout << "Operation failed\n"; + return; +} - if(aTool->Status(ShapeExtend_DONE2)) { - const TopTools_SequenceOfShape& aRemovedFaces =aTool->RemovedFaces(); - cout<GetResult(); +if (aTool->Status (ShapeExtend_DONE1)) +{ + const TopTools_SequenceOfShape& aRemovedWires = aTool->RemovedWires(); + std::cout << aRemovedWires.Length() << " internal wires were removed\n"; +} +if (aTool->Status (ShapeExtend_DONE2)) +{ + const TopTools_SequenceOfShape& aRemovedFaces =aTool->RemovedFaces(); + std::cout << aRemovedFaces.Length() << " small faces were removed\n"; +} +// getting result shape +TopoDS_Shape aRes = aTool->GetResult(); ~~~~ -@subsubsection occt_shg_4_4_8 Conversion of surfaces +@subsubsection occt_shg_4_4_8 Conversion of surfaces Class ShapeCustom_Surface allows: - * converting BSpline and Bezier surfaces to the analytical form (using method *ConvertToAnalytical())* - * converting closed B-Spline surfaces to periodic ones.(using method *ConvertToPeriodic*) - -To convert surfaces to analytical form this class analyzes the form and the closure of the source surface and defines whether it can be approximated by analytical surface of one of the following types: -* *Geom_Plane,* -* *Geom_SphericalSurface,* -* *Geom_CylindricalSurface,* -* *Geom_ConicalSurface,* -* *Geom_ToroidalSurface*. - -The conversion is done only if the new (analytical) surface does not deviate from the source one more than by the given precision. + * converting BSpline and Bezier surfaces to the analytical form (using method *ConvertToAnalytical())*; + * converting closed B-Spline surfaces to periodic ones.(using method *ConvertToPeriodic*). + +To convert surfaces to analytical form this class analyzes the form and the closure of the source surface and defines whether it can be approximated by analytical surface of one of the following types: + * *Geom_Plane*, + * *Geom_SphericalSurface*, + * *Geom_CylindricalSurface*, + * *Geom_ConicalSurface*, + * *Geom_ToroidalSurface*. + +The conversion is done only if the new (analytical) surface does not deviate from the source one more than by the given precision. ~~~~{.cpp} -Handle(Geom_Surface) initSurf; -ShapeCustom_Surface ConvSurf(initSurf); -//conversion to analytical form -Handle(Geom_Surface) newSurf = ConvSurf.ConvertToAnalytical(allowedtol,Standard_False); -//or conversion to a periodic surface -Handle(Geom_Surface) newSurf = ConvSurf.ConvertToPeriodic(Standard_False); -//getting the maximum deviation of the new surface from the initial surface -Standard_Real maxdist = ConvSurf.Gap(); +Handle(Geom_Surface) theInitSurf; +ShapeCustom_Surface aConvSurf (theInitSurf); +// conversion to analytical form +Handle(Geom_Surface) aNewSurf = aConvSurf.ConvertToAnalytical (theAllowedTol, false); +// or conversion to a periodic surface +Handle(Geom_Surface) aNewSurf = aConvSurf.ConvertToPeriodic (false); +// getting the maximum deviation of the new surface from the initial surface +Standard_Real aMaxDist = aConvSurf.Gap(); ~~~~ @subsubsection occt_shg_4_4_9 Unify Same Domain -*ShapeUpgrade_UnifySameDomain* tool allows unifying all possible faces and edges of a shape, which lies on the same geometry. Faces/edges are considered as 'same-domain' if the neighboring faces/edges lie on coincident surfaces/curves. Such faces/edges can be unified into one face/edge. -This tool takes an input shape and returns a new one. All modifications of the initial shape are recorded during the operation. +*ShapeUpgrade_UnifySameDomain* tool allows unifying all possible faces and edges of a shape, which lie on the same geometry. +Faces/edges are considered as 'same-domain' if the neighboring faces/edges lie on coincident surfaces/curves. +Such faces/edges can be unified into one face/edge. +This tool takes an input shape and returns a new one. +All modifications of the initial shape are recorded during the operation. The following options are available: - * If the flag *UnifyFaces* is set to TRUE, *UnifySameDomain* tries to unify all possible faces; * If the flag *UnifyEdges* is set to TRUE, *UnifySameDomain* tries to unify all possible edges; - * if the flag *ConcatBSplines* is set to TRUE, all neighboring edges, which lie on the BSpline or Bezier curves with C1 continuity on their common vertices will be merged into one common edge. + * if the flag *ConcatBSplines* is set to TRUE, all neighboring edges, which lie on the BSpline or Bezier curves with C1 continuity on their common vertices will be merged into one common edge. By default, *UnifyFaces* and *UnifyEdges* are set to TRUE; *ConcatBSplines* is set to FALSE. The common methods of this tool are as follows: - * Method *Build()* is used to unify. * Method *Shape()* is used to get the resulting shape. - * Method *Generated()* is used to get a new common shape from the old shape. If a group of edges has been unified into one common edge then method *Generated()* called on any edge from this group will return the common edge. The same goes for the faces. + * Method *Generated()* is used to get a new common shape from the old shape. + If a group of edges has been unified into one common edge then method *Generated()* called on any edge from this group will return the common edge. + The same goes for the faces. The example of the usage is given below: ~~~~{.cpp} - // 'Sh' is the initial shape - ShapeUpgrade_UnifySameDomain USD(Sh, true, true, true); // UnifyFaces mode on, UnifyEdges mode on, ConcatBSplines mode on. - USD.Build(); - //get the result - TopoDS_Shape Result = USD.Shape(); - //Let Sh1 as a part of Sh - //get the new (probably unified) shape form the Sh1 - TopoDS_Shape ResSh1 = USD.Generated(Sh1); + // 'theSh' is the initial shape + // UnifyFaces mode on, UnifyEdges mode on, ConcatBSplines mode on + ShapeUpgrade_UnifySameDomain aTool (theSh, true, true, true); + aTool.Build(); + // get the result + TopoDS_Shape aResult = aTool.Shape(); + // Let theSh1 as a part of theSh + // get the new (probably unified) shape form the theSh1 + TopoDS_Shape aResSh1 = aTool.Generated (theSh1); ~~~~ @section occt_shg_5_ Auxiliary tools for repairing, analysis and upgrading @subsection occt_shg_5_1 Tool for rebuilding shapes - Class *ShapeBuild_ReShape* rebuilds a shape by making predefined substitutions on some of its components. During the first phase, it records requests to replace or remove some individual shapes. For each shape, the last given request is recorded. Requests may be applied as *Oriented* (i.e. only to an item with the same orientation) or not (the orientation of the replacing shape corresponds to that of the original one). Then these requests may be applied to any shape, which may contain one or more of these individual shapes. +Class *ShapeBuild_ReShape* rebuilds a shape by making predefined substitutions on some of its components. +During the first phase, it records requests to replace or remove some individual shapes. +For each shape, the last given request is recorded. +Requests may be applied as *Oriented* (i.e. only to an item with the same orientation) or not (the orientation of the replacing shape corresponds to that of the original one). +Then these requests may be applied to any shape, which may contain one or more of these individual shapes. -This tool has a flag for taking the location of shapes into account (for keeping the structure of assemblies) (*ModeConsiderLocation*). If this mode is equal to Standard_True, the shared shapes with locations will be kept. If this mode is equal to Standard_False, some different shapes will be produced from one shape with different locations after rebuilding. By default, this mode is equal to Standard_False. +This tool has a flag for taking the location of shapes into account (for keeping the structure of assemblies) (*ModeConsiderLocation*). +If this mode is equal to Standard_True, the shared shapes with locations will be kept. +If this mode is equal to Standard_False, some different shapes will be produced from one shape with different locations after rebuilding. +By default, this mode is equal to Standard_False. To use this tool for the reconstruction of shapes it is necessary to take the following steps: -1. Create this tool and use method *Apply()* for its initialization by the initial shape. Parameter *until* sets the level of shape type and requests are taken into account up to this level only. Sub-shapes of the type standing beyond the *line* set by parameter until will not be rebuilt and no further exploration will be done -2. Replace or remove sub-shapes of the initial shape. Each sub-shape can be replaced by a shape of the same type or by shape containing shapes of that type only (for example, *TopoDS_Edge* can be replaced by *TopoDS_Edge, TopoDS_Wire* or *TopoDS_Compound* containing *TopoDS_Edges*). If an incompatible shape type is encountered, it is ignored and flag FAIL1 is set in Status. -For a sub-shape it is recommended to use method *Apply* before methods *Replace* and *Remove*, because the sub-shape has already been changed for the moment by its previous modifications or modification of its sub-shape (for example *TopoDS_Edge* can be changed by a modification of its *TopoDS_Vertex*, etc.). +1. Create this tool and use method *Apply()* for its initialization by the initial shape. + Parameter *until* sets the level of shape type and requests are taken into account up to this level only. + Sub-shapes of the type standing beyond the *line* set by parameter until will not be rebuilt and no further exploration will be done. +2. Replace or remove sub-shapes of the initial shape. + Each sub-shape can be replaced by a shape of the same type or by shape containing shapes of that type only + (for example, *TopoDS_Edge* can be replaced by *TopoDS_Edge, TopoDS_Wire* or *TopoDS_Compound* containing *TopoDS_Edges*). + If an incompatible shape type is encountered, it is ignored and flag FAIL1 is set in Status. + For a sub-shape it is recommended to use method *Apply* before methods *Replace* and *Remove*, + because the sub-shape has already been changed for the moment by its previous modifications or modification of its sub-shape (for example *TopoDS_Edge* can be changed by a modification of its *TopoDS_Vertex*, etc.). 3. Use method *Apply* for the initial shape again to get the resulting shape after all modifications have been made. 4. Use method *Apply* to obtain the history of sub-shape modification. Additional method *IsNewShape* can be used to check if the shape has been recorded by *BRepTools_ReShape* tool as a value. -**Note** that in fact class *ShapeBuild_ReShape* is an alias for class *BRepTools_ReShape*. They differ only in queries of statuses in the *ShapeBuild_ReShape* class. +**Note** that in fact class *ShapeBuild_ReShape* is an alias for class *BRepTools_ReShape*. +They differ only in queries of statuses in the *ShapeBuild_ReShape* class. Let us use the tool to get the result shape after modification of sub-shapes of the initial shape: ~~~~{.cpp} -TopoDS_Shape initialShape… -//creation of a rebuilding tool -Handle(ShapeBuild_ReShape) Context = new ShapeBuild_ReShape. +TopoDS_Shape theInitialShape = ...; +// creation of a rebuilding tool +Handle(ShapeBuild_ReShape) aContext = new ShapeBuild_ReShape(); -//next step is optional. It can be used for keeping the assembly structure. -Context-> ModeConsiderLocation = Standard_True; +// next step is optional; it can be used for keeping the assembly structure +aContext->ModeConsiderLocation = true; -//initialization of this tool by the initial shape -Context->Apply(initialShape); -… -//getting the intermediate result for replacing subshape1 with the modified subshape1. -TopoDS_Shape tempshape1 = Context->Apply(subshape1); +// initialization of this tool by the initial shape +aContext->Apply (theInitialShape); +... +// getting the intermediate result for replacing theSubshape1 with the modified theNewSubshape1 +TopoDS_Shape aTempSubshape1 = aContext->Apply (theSubshape1); -//replacing the intermediate shape obtained from subshape1 with the newsubshape1. -Context->Replace(tempsubshape1,newsubshape1); -… -//for removing the sub-shape -TopoDS_Shape tempshape2 = Context->Apply(subshape2); -Context->Remove(tempsubshape2); +// replacing the intermediate shape obtained from theSubshape1 with the theNewSubshape1 +aContext->Replace (aTempSubshape1, theNewSubshape1); +... +// for removing the sub-shape +TopoDS_Shape aTempSubshape2 = aContext->Apply (theSubshape2); +aContext->Remove (aTempSubshape2); -//getting the result and the history of modification -TopoDS_Shape resultShape = Context->Apply(initialShape); +// getting the result and the history of modification +TopoDS_Shape aResultShape = aContext->Apply (theInitialShape); -//getting the resulting sub-shape from the subshape1 of the initial shape. -TopoDS_Shape result_subshape1 = Context->Apply(subshape1); +// getting the resulting sub-shape from the theSubshape1 of the initial shape +TopoDS_Shape aResultSubshape1 = aContext->Apply (theSubshape1); ~~~~ @subsection occt_shg_5_2 Status definition -*ShapExtend_Status* is used to report the status after executing some methods that can either fail, do something, or do nothing. The status is a set of flags *DONEi* and *FAILi*. Any combination of them can be set at the same time. For exploring the status, enumeration is used. +*ShapExtend_Status* is used to report the status after executing some methods that can either fail, do something, or do nothing. +The status is a set of flags *DONEi* and *FAILi*. +Any combination of them can be set at the same time. For exploring the status, enumeration is used. The values have the following meaning: @@ -1534,66 +1737,74 @@ The values have the following meaning: | *FAIL8*, | The method failed, case 8 | | *FAIL* | The method failed (any of FAIL# occurred) | +@subsection occt_shg_5_3 Tool representing a wire -@subsection occt_shg_5_3 Tool representing a wire -Class *ShapeExtend_WireData* provides a data structure necessary to work with the wire as with an ordered list of edges, and that is required for many algorithms. The advantage of this class is that it allows to work with incorrect wires. - -The object of the class *ShapeExtend_WireData* can be initialized by *TopoDS_Wire* and converted back to *TopoDS_Wire*. +Class *ShapeExtend_WireData* provides a data structure necessary to work with the wire as with an ordered list of edges, and that is required for many algorithms. +The advantage of this class is that it allows to work with incorrect wires. -An edge in the wire is defined by its rank number. Operations of accessing, adding and removing an edge at/to the given rank number are provided. Operations of circular permutation and reversing (both orientations of all edges and the order of edges) are provided on the whole wire as well. +The object of the class *ShapeExtend_WireData* can be initialized by *TopoDS_Wire* and converted back to *TopoDS_Wire*. -This class also provides a method to check if the edge in the wire is a seam (if the wire lies on a face). +An edge in the wire is defined by its rank number. Operations of accessing, adding and removing an edge at/to the given rank number are provided. +Operations of circular permutation and reversing (both orientations of all edges and the order of edges) are provided on the whole wire as well. -Let us remove edges from the wire and define whether it is seam edge +This class also provides a method to check if the edge in the wire is a seam (if the wire lies on a face). +Let us remove edges from the wire and define whether it is seam edge: ~~~~{.cpp} -TopoDS_Wire ini = .. -Handle(ShapeExtend_Wire) asewd = new ShapeExtend_Wire(initwire); -//Removing edge Edge1 from the wire. - -Standard_Integer index_edge1 = asewd->Index(Edge1); -asewd.Remove(index_edge1); -//Definition of whether Edge2 is a seam edge -Standard_Integer index_edge2 = asewd->Index(Edge2); -asewd->IsSeam(index_edge2); +TopoDS_Wire theInitWire = ...; +Handle(ShapeExtend_Wire) anExtendWire = new ShapeExtend_Wire (theInitWire); + +// Removing edge theEdge1 from the wire +Standard_Integer anEdge1Index = anExtendWire->Index (theEdge1); +anExtendWire.Remove (anEdge1Index); +// Definition of whether theEdge2 is a seam edge +Standard_Integer anEdge2Index = anExtendWire->Index (theEdge2); +anExtendWire->IsSeam (anEdge2Index); ~~~~ +@subsection occt_shg_5_4 Tool for exploring shapes -@subsection occt_shg_5_4 Tool for exploring shapes -Class *ShapeExtend_Explorer* is intended to explore shapes and convert different representations (list, sequence, compound) of complex shapes. It provides tools for: - * obtaining the type of the shapes in the context of *TopoDS_Compound*, - * exploring shapes in the context of *TopoDS_Compound*, - * converting different representations of shapes (list, sequence, compound). - -@subsection occt_shg_5_5 Tool for attaching messages to objects -Class *ShapeExtend_MsgRegistrator* attaches messages to objects (generic Transient or shape). The objects of this class are transmitted to the Shape Healing algorithms so that they could collect messages occurred during shape processing. Messages are added to the Maps (stored as a field) that can be used, for instance, by Data Exchange processors to attach those messages to initial file entities. +Class *ShapeExtend_Explorer* is intended to explore shapes and convert different representations (list, sequence, compound) of complex shapes. +It provides tools for: + * obtaining the type of the shapes in the context of *TopoDS_Compound*, + * exploring shapes in the context of *TopoDS_Compound*, + * converting different representations of shapes (list, sequence, compound). + +@subsection occt_shg_5_5 Tool for attaching messages to objects + +Class *ShapeExtend_MsgRegistrator* attaches messages to objects (generic Transient or shape). +The objects of this class are transmitted to the Shape Healing algorithms so that they could collect messages occurred during shape processing. +Messages are added to the Maps (stored as a field) that can be used, for instance, by Data Exchange processors to attach those messages to initial file entities. Let us send and get a message attached to object: ~~~~{.cpp} -Handle(ShapeExtend_MsgRegistrator) MessageReg = new ShapeExtend_MsgRegistrator; -//attaches messages to an object (shape or entity) -Message_Msg msg.. -TopoDS_Shape Shape1… -MessageReg->Send(Shape1,msg,Message_WARNING); -Handle(Standard_Transient) ent .. -MessageReg->Send(ent,msg,Message_WARNING); -//gets messages attached to shape -const ShapeExtend_DataMapOfShapeListOfMsg& msgmap = MessageReg->MapShape(); -if (msgmap.IsBound (Shape1)) { - const Message_ListOfMsg &msglist = msgmap.Find (Shape1); - for (Message_ListIteratorOfListOfMsg iter (msglist); -iter.More(); iter.Next()) { - Message_Msg msg = iter.Value(); - } - } +Handle(ShapeExtend_MsgRegistrator) aMsgReg = new ShapeExtend_MsgRegistrator(); +// attaches messages to an object (shape or entity) +Message_Msg theMsg = ...; +TopoDS_Shape theShape1 = ...; +aMsgReg->Send (theShape1, theMsg, Message_WARNING); +Handle(Standard_Transient) theEnt = ...; +aMsgReg->Send (theEnt, theMsg, Message_WARNING); + +// get messages attached to shape +const ShapeExtend_DataMapOfShapeListOfMsg& aMsgMap = aMsgReg->MapShape(); +if (aMsgMap.IsBound (theShape1)) +{ + const Message_ListOfMsg& aMsgList = aMsgMap.Find (theShape1); + for (Message_ListIteratorOfListOfMsg aMsgIter (aMsgList); aMsgIter.More(); aMsgIter.Next()) + { + Message_Msg aMsg = aMsgIter.Value(); + } +} ~~~~ @subsection occt_shg_5_6 Tools for performance measurement -Classes *MoniTool_Timer* and *MoniTool_TimerSentry* are used for measuring the performance of a current operation or any part of code, and provide the necessary API. Timers are used for debugging and performance optimizing purposes. +Classes *MoniTool_Timer* and *MoniTool_TimerSentry* are used for measuring the performance of a current operation or any part of code, and provide the necessary API. +Timers are used for debugging and performance optimizing purposes. -Let us try to use timers in *XSDRAWIGES.cxx* and *IGESBRep_Reader.cxx* to analyse the performance of command *igesbrep*: +Let us try to use timers in *XSDRAWIGES.cxx* and *IGESBRep_Reader.cxx* to analyze the performance of command *igesbrep*: ~~~~{.cpp} XSDRAWIGES.cxx @@ -1603,249 +1814,287 @@ XSDRAWIGES.cxx ... MoniTool_Timer::ClearTimers(); ... - MoniTool_TimerSentry MTS("IGES_LoadFile"); - Standard_Integer status = Reader.LoadFile(fnom.ToCString()); - MTS.Stop(); + MoniTool_TimerSentry aTimeSentry ("IGES_LoadFile"); + Standard_Integer aStatus = aReader.LoadFile (theFilePath.ToCString()); + aTimeSentry.Stop(); ... - MoniTool_Timer::DumpTimers(cout); + MoniTool_Timer::DumpTimers (std::cout); return; - - + IGESBRep_Reader.cxx ... #include ... - Standard_Integer nb = theModel->NbEntities(); + Standard_Integer aNbEntries = theModel->NbEntities(); ... - for (Standard_Integer i=1; i<=nb; i++) { - MoniTool_TimerSentry MTS("IGESToBRep_Transfer"); + for (Standard_Integer i = 1; i<= aNbEntries; ++i) + { + MoniTool_TimerSentry aTimeSentry ("IGESToBRep_Transfer"); ... - try { - TP.Transfer(ent); - shape = TransferBRep::ShapeResult (theProc,ent); + try + { + TP.Transfer (anEntry); + shape = TransferBRep::ShapeResult (theProc, anEntry); } ... } ~~~~ -The result of *DumpTimer()* after file translation is as follows: +The result of *DumpTimer()* after file translation is as follows: | TIMER | Elapsed | CPU User | CPU Sys | Hits | | :--- | :---- | :----- | :---- | :---- | -| *IGES_LoadFile* | 1.0 sec | 0.9 sec | 0.0 sec | 1 | +| *IGES_LoadFile* | 1.0 sec | 0.9 sec | 0.0 sec | 1 | | *IGESToBRep_Transfer* | 14.5 sec | 4.4 sec | 0.1 sec | 1311 | - @section occt_shg_6 Shape Processing @subsection occt_shg_6_1 Usage Workflow -The Shape Processing module allows defining and applying the general Shape Processing as a customizable sequence of Shape Healing operators. The customization is implemented via the user-editable resource file, which defines the sequence of operators to be executed and their parameters. +The Shape Processing module allows defining and applying the general Shape Processing as a customizable sequence of Shape Healing operators. +The customization is implemented via the user-editable resource file, which defines the sequence of operators to be executed and their parameters. -The Shape Processing functionality is implemented with the help of the *XSAlgo* interface. The main function *XSAlgo_AlgoContainer::ProcessShape()* does shape processing with specified tolerances and returns the resulting shape and associated information in the form of *Transient*. +The Shape Processing functionality is implemented with the help of the *XSAlgo* interface. +The main function *XSAlgo_AlgoContainer::ProcessShape()* does shape processing with specified tolerances and returns the resulting shape and associated information in the form of *Transient*. This function is used in the following way: ~~~~{.cpp} -TopoDS_Shape aShape = …; -Standard_Real Prec = …, -Standard_Real MaxTol = …; -TopoDS_Shape aResult; -Handle(Standard_Transient) info; -TopoDS_Shape aResult = XSAlgo::AlgoContainer()->ProcessShape(aShape, Prec, MaxTol., "Name of ResourceFile", "NameSequence", info ); +TopoDS_Shape theShape = ...; +Standard_Real thePrec = ...; +Standard_Real theMaxTol = ...; + +Handle(Standard_Transient) anInfo; +TopoDS_Shape aResult = XSAlgo::AlgoContainer()->ProcessShape (theShape, thePrec, theMaxTol, + "Name of ResourceFile", "NameSequence", anInfo); ~~~~ -Let us create a custom sequence of operations: +Let us create a custom sequence of operations: -1. Create a resource file with the name *ResourceFile*, which includes the following string: +1. Create a resource file with the name *ResourceFile*, which includes the following string: ~~~~{.cpp} -NameSequence.exec.op: MyOper + NameSequence.exec.op: MyOper ~~~~ -where *MyOper* is the name of operation. -2. Input a custom parameter for this operation in the resource file, for example: + where *MyOper* is the name of operation. +2. Input a custom parameter for this operation in the resource file, for example: ~~~~{.cpp} -NameSequence.MyOper.Tolerance: 0.01 + NameSequence.MyOper.Tolerance: 0.01 ~~~~ -where *Tolerance* is the name of the parameter and 0.01 is its value. -3. Add the following string into *void ShapeProcess_OperLibrary::Init()*: + where *Tolerance* is the name of the parameter and 0.01 is its value. +3. Add the following string into *void ShapeProcess_OperLibrary::Init()*: ~~~~{.cpp} -ShapeProcess::RegisterOperator(;MyOper;, -new ShapeProcess_UOperator(myfunction)); + ShapeProcess::RegisterOperator (MyOper, new ShapeProcess_UOperator (myFunction)); ~~~~ -where *myfunction* is a function which implements the operation. + where *myFunction* is a function which implements the operation. 4. Create this function in *ShapeProcess_OperLibrary* as follows: ~~~~{.cpp} -static Standard_Boolean myfunction (const - Handle(ShapeProcess_Context)& context) -{ - Handle(ShapeProcess_ShapeContext) ctx = Handle(ShapeProcess_ShapeContext)::DownCast(context); - if(ctx.IsNull()) return Standard_False; - TopoDS_Shape aShape = ctx->Result(); - //receive our parameter: - Standard_Real toler; - ctx->GetReal(;Tolerance;, toler); +static bool myFunction (const Handle(ShapeProcess_Context)& theContext) +{ + Handle(ShapeProcess_ShapeContext) aCtx = Handle(ShapeProcess_ShapeContext)::DownCast (theContext); + if (aCtx.IsNull()) { return false; } + TopoDS_Shape aShape = aCtx->Result(); + // receive our parameter: + Standard_Real aToler = 0.0; + aCtx->GetReal (Tolerance, aToler); ~~~~ -5. Make the necessary operations with *aShape* using the received value of parameter *Tolerance* from the resource file. +5. Make the necessary operations with *aShape* using the received value of parameter *Tolerance* from the resource file. ~~~~{.cpp} - return Standard_True; -} + return true; +} ~~~~ -6. Define some operations (with their parameters) *MyOper1, MyOper2, MyOper3*, etc. and describe the corresponding functions in *ShapeProcess_OperLibrary*. -7. Perform the required sequence using the specified name of operations and values of parameters in the resource file. +6. Define some operations (with their parameters) *MyOper1, MyOper2, MyOper3*, etc. and describe the corresponding functions in *ShapeProcess_OperLibrary*. +7. Perform the required sequence using the specified name of operations and values of parameters in the resource file. For example: input of the following string: ~~~~{.cpp} -NameSequence.exec.op: MyOper1,MyOper3 +NameSequence.exec.op: MyOper1,MyOper3 ~~~~ -means that the corresponding functions from *ShapeProcess_OperLibrary* will be performed with the original shape *aShape* using parameters defined for *MyOper1* and *MyOper3* in the resource file. +means that the corresponding functions from *ShapeProcess_OperLibrary* will be performed with the original shape *aShape* using parameters defined for *MyOper1* and *MyOper3* in the resource file. -It is necessary to note that these operations will be performed step by step and the result obtained after performing the first operation will be used as the initial shape for the second operation. +It is necessary to note that these operations will be performed step by step and the result obtained after performing the first operation will be used as the initial shape for the second operation. @subsection occt_shg_6_2 Operators -### DirectFaces -This operator sets all faces based on indirect surfaces, defined with left-handed coordinate systems as direct faces. This concerns surfaces defined by Axis Placement (Cylinders, etc). Such Axis Placement may be indirect, which is allowed in Cascade, but not allowed in some other systems. This operator reverses indirect placements and recomputes PCurves accordingly. +### DirectFaces +This operator sets all faces based on indirect surfaces, defined with left-handed coordinate systems as direct faces. +This concerns surfaces defined by Axis Placement (Cylinders, etc). +Such Axis Placement may be indirect, which is allowed in Cascade, but not allowed in some other systems. +This operator reverses indirect placements and recomputes PCurves accordingly. ### SameParameter -This operator is required after calling some other operators, according to the computations they do. Its call is explicit, so each call can be removed according to the operators, which are either called or not afterwards. This mainly concerns splitting operators that can split edges. - -The operator applies the computation *SameParameter* which ensures that various representations of each edge (its 3d curve, the pcurve on each of the faces on which it lies) give the same 3D point for the same parameter, within a given tolerance. -* For each edge coded as *same parameter*, deviation of curve representation is computed and if the edge tolerance is less than that deviation, the tolerance is increased so that it satisfies the deviation. No geometry modification, only an increase of tolerance is possible. -* For each edge coded as *not same parameter* the deviation is computed as in the first case. Then an attempt is made to achieve the edge equality to *same parameter* by means of modification of 2d curves. If the deviation of this modified edge is less than the original deviation then this edge is returned, otherwise the original edge (with non-modified 2d curves) is returned with an increased (if necessary) tolerance. Computation is done by call to the standard algorithm *BRepLib::SameParameter*. +This operator is required after calling some other operators, according to the computations they do. +Its call is explicit, so each call can be removed according to the operators, which are either called or not afterwards. +This mainly concerns splitting operators that can split edges. + +The operator applies the computation *SameParameter* which ensures that various representations of each edge +(its 3d curve, the pcurve on each of the faces on which it lies) give the same 3D point for the same parameter, within a given tolerance. +* For each edge coded as *same parameter*, deviation of curve representation is computed and if the edge tolerance is less than that deviation, the tolerance is increased so that it satisfies the deviation. + No geometry modification, only an increase of tolerance is possible. +* For each edge coded as *not same parameter* the deviation is computed as in the first case. + Then an attempt is made to achieve the edge equality to *same parameter* by means of modification of 2d curves. + If the deviation of this modified edge is less than the original deviation then this edge is returned, + otherwise the original edge (with non-modified 2d curves) is returned with an increased (if necessary) tolerance. + Computation is done by call to the standard algorithm *BRepLib::SameParameter*. + +This operator can be called with the following parameters: + * *Boolean : Force* (optional) -- if True, encodes all edges as *not same parameter* then runs the computation. + Else, the computation is done only for those edges already coded as *not same parameter*. + * *Real : Tolerance3d* (optional) -- if not defined, the local tolerance of each edge is taken for its own computation. + Else, this parameter gives the global tolerance for the whole shape. -This operator can be called with the following parameters: - * *Boolean : Force* (optional) -- if True, encodes all edges as *not same parameter* then runs the computation. Else, the computation is done only for those edges already coded as *not same parameter*. - * *Real : Tolerance3d* (optional) -- if not defined, the local tolerance of each edge is taken for its own computation. Else, this parameter gives the global tolerance for the whole shape. - ### BSplineRestriction -This operator is used for conversion of surfaces, curves 2d curves to BSpline surfaces with a specified degree and a specified number of spans. It performs approximations on surfaces, curves and 2d curves with a specified degree, maximum number of segments, 2d tolerance, 3d tolerance. The specified continuity can be reduced if the approximation with a specified continuity was not done successfully. - -This operator can be called with the following parameters: -* *Boolean : SurfaceMode* allows considering the surfaces; -* *Boolean : Curve3dMode* allows considering the 3d curves; -* *Boolean : Curve2dMode* allows considering the 2d curves; -* *Real : Tolerance3d* defines 3d tolerance to be used in computation; -* *Real : Tolerance2d* defines 2d tolerance to be used when computing 2d curves; -* *GeomAbs_Shape (C0 G1 C1 G2 C2 CN) : Continuity3d* is the continuity required in 2d; -* *GeomAbs_Shape (C0 G1 C1 G2 C2 CN) : Continuity2d* is the continuity required in 3d; +This operator is used for conversion of surfaces, curves 2d curves to BSpline surfaces with a specified degree and a specified number of spans. +It performs approximations on surfaces, curves and 2d curves with a specified degree, maximum number of segments, 2d tolerance, 3d tolerance. +The specified continuity can be reduced if the approximation with a specified continuity was not done successfully. + +This operator can be called with the following parameters: +* *Boolean : SurfaceMode* allows considering the surfaces; +* *Boolean : Curve3dMode* allows considering the 3d curves; +* *Boolean : Curve2dMode* allows considering the 2d curves; +* *Real : Tolerance3d* defines 3d tolerance to be used in computation; +* *Real : Tolerance2d* defines 2d tolerance to be used when computing 2d curves; +* *GeomAbs_Shape (C0 G1 C1 G2 C2 CN) : Continuity3d* is the continuity required in 2d; +* *GeomAbs_Shape (C0 G1 C1 G2 C2 CN) : Continuity2d* is the continuity required in 3d; * *Integer : RequiredDegree* gives the required degree; * *Integer : RequiredNbSegments* gives the required number of segments; * *Boolean : PreferDegree* if true, *RequiredDegree* has a priority, else *RequiredNbSegments* has a priority; -* *Boolean : RationalToPolynomial* serves for conversion of BSplines to polynomial form; -* *Integer : MaxDegree* gives the maximum allowed Degree, if *RequiredDegree* cannot be reached; +* *Boolean : RationalToPolynomial* serves for conversion of BSplines to polynomial form; +* *Integer : MaxDegree* gives the maximum allowed Degree, if *RequiredDegree* cannot be reached; * *Integer : MaxNbSegments* gives the maximum allowed NbSegments, if *RequiredNbSegments* cannot be reached. - -The following flags allow managing the conversion of special types of curves or surfaces, in addition to BSpline. They are controlled by *SurfaceMode, Curve3dMode* or *Curve2dMode* respectively; by default, only BSplines and Bezier Geometries are considered: -* *Boolean : OffsetSurfaceMode* -* *Boolean : LinearExtrusionMode* -* *Boolean : RevolutionMode* -* *Boolean : OffsetCurve3dMode* -* *Boolean : OffsetCurve2dMode* -* *Boolean : PlaneMode* -* *Boolean : BezierMode* -* *Boolean : ConvCurve3dMode* -* *Boolean : ConvCurve2dMode* -For each of the Mode parameters listed above, if it is True, the specified geometry is converted to BSpline, otherwise only its basic geometry is checked and converted (if necessary) keeping the original type of geometry (revolution, offset, etc). +The following flags allow managing the conversion of special types of curves or surfaces, in addition to BSpline. +They are controlled by *SurfaceMode, Curve3dMode* or *Curve2dMode* respectively; by default, only BSplines and Bezier Geometries are considered: +* *Boolean : OffsetSurfaceMode* +* *Boolean : LinearExtrusionMode* +* *Boolean : RevolutionMode* +* *Boolean : OffsetCurve3dMode* +* *Boolean : OffsetCurve2dMode* +* *Boolean : PlaneMode* +* *Boolean : BezierMode* +* *Boolean : ConvCurve3dMode* +* *Boolean : ConvCurve2dMode* + +For each of the Mode parameters listed above, if it is True, the specified geometry is converted to BSpline, +otherwise only its basic geometry is checked and converted (if necessary) keeping the original type of geometry (revolution, offset, etc). -* *Boolean :SegmentSurfaceMode* has effect only for Bsplines and Bezier surfaces. When False a surface will be replaced by a Trimmed Surface, else new geometry will be created by splitting the original Bspline or Bezier surface. +* *Boolean :SegmentSurfaceMode* has effect only for Bsplines and Bezier surfaces. + When False a surface will be replaced by a Trimmed Surface, else new geometry will be created by splitting the original Bspline or Bezier surface. ### ElementaryToRevolution -This operator converts elementary periodic surfaces to SurfaceOfRevolution. +This operator converts elementary periodic surfaces to SurfaceOfRevolution. ### SplitAngle -This operator splits surfaces of revolution, cylindrical, toroidal, conical, spherical surfaces in the given shape so that each resulting segment covers not more than the defined number of degrees. +This operator splits surfaces of revolution, cylindrical, toroidal, conical, spherical surfaces in the given shape so that each resulting segment covers not more than the defined number of degrees. + +It can be called with the following parameters: +* *Real : Angle* -- the maximum allowed angle for resulting faces; +* *Real : MaxTolerance* -- the maximum tolerance used in computations. -It can be called with the following parameters: -* *Real : Angle* -- the maximum allowed angle for resulting faces; -* *Real : MaxTolerance* -- the maximum tolerance used in computations. - ### SurfaceToBSpline -This operator converts some specific types of Surfaces, to BSpline (according to parameters). -It can be called with the following parameters: -* *Boolean : LinearExtrusionMode* allows converting surfaces of Linear Extrusion; -* *Boolean : RevolutionMode* allows converting surfaces of Revolution; -* *Boolean : OffsetMode* allows converting Offset Surfaces + +This operator converts some specific types of Surfaces, to BSpline (according to parameters). +It can be called with the following parameters: +* *Boolean : LinearExtrusionMode* allows converting surfaces of Linear Extrusion; +* *Boolean : RevolutionMode* allows converting surfaces of Revolution; +* *Boolean : OffsetMode* allows converting Offset Surfaces. ### ToBezier -This operator is used for data supported as Bezier only and converts various types of geometries to Bezier. It can be called with the following parameters used in computation of conversion : -* *Boolean : SurfaceMode* -* *Boolean : Curve3dMode* -* *Boolean : Curve2dMode* -* *Real : MaxTolerance* -* *Boolean : SegmentSurfaceMode* (default is True) has effect only for Bsplines and Bezier surfaces. When False a surface will be replaced by a Trimmed Surface, else new geometry will be created by splitting the original Bspline or Bezier surface. - -The following parameters are controlled by *SurfaceMode, Curve3dMode* or *Curve2dMode* (according to the case): -* *Boolean : Line3dMode* -* *Boolean : Circle3dMode* -* *Boolean : Conic3dMode* -* *Boolean : PlaneMode* -* *Boolean : RevolutionMode* -* *Boolean : ExtrusionMode* -* *Boolean : BSplineMode* +This operator is used for data supported as Bezier only and converts various types of geometries to Bezier. +It can be called with the following parameters used in computation of conversion: +* *Boolean : SurfaceMode* +* *Boolean : Curve3dMode* +* *Boolean : Curve2dMode* +* *Real : MaxTolerance* +* *Boolean : SegmentSurfaceMode* (default is True) has effect only for Bsplines and Bezier surfaces. + When False a surface will be replaced by a Trimmed Surface, else new geometry will be created by splitting the original Bspline or Bezier surface. + +The following parameters are controlled by *SurfaceMode, Curve3dMode* or *Curve2dMode* (according to the case): +* *Boolean : Line3dMode* +* *Boolean : Circle3dMode* +* *Boolean : Conic3dMode* +* *Boolean : PlaneMode* +* *Boolean : RevolutionMode* +* *Boolean : ExtrusionMode* +* *Boolean : BSplineMode* ### SplitContinuity -This operator splits a shape in order to have each geometry (surface, curve 3d, curve 2d) correspond the given criterion of continuity. It can be called with the following parameters: -* *Real : Tolerance3d* -* *Integer (GeomAbs_Shape ) : CurveContinuity* -* *Integer (GeomAbs_Shape ) : SurfaceContinuity* -* *Real : MaxTolerance* -Because of algorithmic limitations in the operator *BSplineRestriction* (in some particular cases, this operator can produce unexpected C0 geometry), if *SplitContinuity* is called, it is recommended to call it after *BSplineRestriction*. -Continuity Values will be set as *GeomAbs_Shape* (i.e. C0 G1 C1 G2 C2 CN) besides direct integer values (resp. 0 1 2 3 4 5). +This operator splits a shape in order to have each geometry (surface, curve 3d, curve 2d) correspond the given criterion of continuity. +It can be called with the following parameters: +* *Real : Tolerance3d* +* *Integer (GeomAbs_Shape ) : CurveContinuity* +* *Integer (GeomAbs_Shape ) : SurfaceContinuity* +* *Real : MaxTolerance* + +Because of algorithmic limitations in the operator *BSplineRestriction* (in some particular cases, this operator can produce unexpected C0 geometry), +if *SplitContinuity* is called, it is recommended to call it after *BSplineRestriction*. +Continuity Values will be set as *GeomAbs_Shape* (i.e. C0 G1 C1 G2 C2 CN) besides direct integer values (resp. 0 1 2 3 4 5). ### SplitClosedFaces -This operator splits faces, which are closed even if they are not revolutionary or cylindrical, conical, spherical, toroidal. This corresponds to BSpline or Bezier surfaces which can be closed (whether periodic or not), hence they have a seam edge. As a result, no more seam edges remain. The number of points allows to control the minimum count of faces to be produced per input closed face. -This operator can be called with the following parameters: -* *Integer : NbSplitPoints* gives the number of points to use for splitting (the number of intervals produced is *NbSplitPoints+1*); -* *Real : CloseTolerance* tolerance used to determine if a face is closed; +This operator splits faces, which are closed even if they are not revolutionary or cylindrical, conical, spherical, toroidal. +This corresponds to BSpline or Bezier surfaces which can be closed (whether periodic or not), hence they have a seam edge. +As a result, no more seam edges remain. The number of points allows to control the minimum count of faces to be produced per input closed face. + +This operator can be called with the following parameters: +* *Integer : NbSplitPoints* gives the number of points to use for splitting (the number of intervals produced is *NbSplitPoints+1*); +* *Real : CloseTolerance* tolerance used to determine if a face is closed; * *Real : MaxTolerance* is used in the computation of splitting. - -### FixGaps -This operator must be called when *FixFaceSize* and/or *DropSmallEdges* are called. Using Surface Healing may require an additional call to *BSplineRestriction* to ensure that modified geometries meet the requirements for BSpline. -This operators repairs geometries which contain gaps between edges in wires (always performed) or gaps on faces, controlled by parameter *SurfaceMode*, Gaps on Faces are fixed by using algorithms of Surface Healing -This operator can be called with the following parameters: -* *Real : Tolerance3d* sets the tolerance to reach in 3d. If a gap is less than this value, it is not fixed. -* *Boolean : SurfaceMode* sets the mode of fixing gaps between edges and faces (yes/no) ; -* *Integer : SurfaceAddSpans* sets the number of spans to add to the surface in order to fix gaps ; -* *GeomAbs_Shape (C0 G1 C1 G2 C2 CN) : SurfaceContinuity* sets the minimal continuity of a resulting surface ; -* *Integer : NbIterations* sets the number of iterations -* *Real : Beta* sets the elasticity coefficient for modifying a surface [1-1000] ; -* *Reals : Coeff1 to Coeff6* sets energy coefficients for modifying a surface [0-10000] ; -* *Real : MaxDeflection* sets maximal deflection of surface from an old position. +### FixGaps -This operator may change the original geometry. In addition, it is CPU consuming, and it may fail in some cases. Also **FixGaps** can help only when there are gaps obtained as a result of removal of small edges that can be removed by **DropSmallEdges** or **FixFaceSize**. +This operator must be called when *FixFaceSize* and/or *DropSmallEdges* are called. +Using Surface Healing may require an additional call to *BSplineRestriction* to ensure that modified geometries meet the requirements for BSpline. +This operators repairs geometries which contain gaps between edges in wires (always performed) or gaps on faces, controlled by parameter *SurfaceMode*, Gaps on Faces are fixed by using algorithms of Surface Healing. +This operator can be called with the following parameters: +* *Real : Tolerance3d* sets the tolerance to reach in 3d. If a gap is less than this value, it is not fixed; +* *Boolean : SurfaceMode* sets the mode of fixing gaps between edges and faces (yes/no); +* *Integer : SurfaceAddSpans* sets the number of spans to add to the surface in order to fix gaps; +* *GeomAbs_Shape (C0 G1 C1 G2 C2 CN) : SurfaceContinuity* sets the minimal continuity of a resulting surface; +* *Integer : NbIterations* sets the number of iterations; +* *Real : Beta* sets the elasticity coefficient for modifying a surface [1-1000]; +* *Reals : Coeff1 to Coeff6* sets energy coefficients for modifying a surface [0-10000]; +* *Real : MaxDeflection* sets maximal deflection of surface from an old position. + +This operator may change the original geometry. +In addition, it is CPU consuming, and it may fail in some cases. +Also **FixGaps** can help only when there are gaps obtained as a result of removal of small edges that can be removed by **DropSmallEdges** or **FixFaceSize**. ### FixFaceSize -This operator removes faces, which are small in all directions (spot face) or small in one direction (strip face). It can be called with the parameter *Real : Tolerance*, which sets the minimal dimension, which is used to consider a face, is small enough to be removed. + +This operator removes faces, which are small in all directions (spot face) or small in one direction (strip face). +It can be called with the parameter *Real : Tolerance*, which sets the minimal dimension, which is used to consider a face, is small enough to be removed. ### DropSmallEdges -This operator drops edges in a wire, and merges them with adjacent edges, when they are smaller than the given value (*Tolerance3d*) and when the topology allows such merging (i.e. same adjacent faces for each of the merged edges). Free (non-shared by adjacent faces) small edges can be also removed in case if they share the same vertex Parameters. -It can be called with the parameter *Real : Tolerance3d*, which sets the dimension used to determine if an edge is small. +This operator drops edges in a wire, and merges them with adjacent edges, when they are smaller than the given value (*Tolerance3d*) +and when the topology allows such merging (i.e. same adjacent faces for each of the merged edges). +Free (non-shared by adjacent faces) small edges can be also removed in case if they share the same vertex Parameters. + +It can be called with the parameter *Real : Tolerance3d*, which sets the dimension used to determine if an edge is small. ### FixShape -This operator may be added for fixing invalid shapes. It performs various checks and fixes, according to the modes listed hereafter. Management of a set of fixes can be performed by flags as follows: +This operator may be added for fixing invalid shapes. +It performs various checks and fixes, according to the modes listed hereafter. +Management of a set of fixes can be performed by flags as follows: * if the flag for a fixing tool is set to 0 , it is not performed; * if set to 1 , it is performed in any case; * if not set, or set to -1 , for each shape to be applied on, a check is done to evaluate whether a fix is needed. The fix is performed if the check is positive. - -By default, the flags are not set, the checks are carried out each individual shape. -This operator can be called with the following parameters: -* *Real : Tolerance3d* sets basic tolerance used for fixing; -* *Real : MaxTolerance3d* sets maximum allowed value for the resulting tolerance; -* *Real : MinTolerance3d* sets minimum allowed value for the resulting tolerance. +By default, the flags are not set, the checks are carried out each individual shape. + +This operator can be called with the following parameters: +* *Real : Tolerance3d* sets basic tolerance used for fixing; +* *Real : MaxTolerance3d* sets maximum allowed value for the resulting tolerance; +* *Real : MinTolerance3d* sets minimum allowed value for the resulting tolerance. * *Boolean : FixFreeShellMode* -* *Boolean : FixFreeFaceMode* -* *Boolean : FixFreeWireMode* +* *Boolean : FixFreeFaceMode* +* *Boolean : FixFreeWireMode* * *Boolean : FixSameParameterMode* * *Boolean : FixSolidMode* * *Boolean : FixShellMode* @@ -1853,118 +2102,118 @@ This operator can be called with the following parameters: * *Boolean : FixWireMode* * *Boolean : FixOrientationMode* * *Boolean : FixMissingSeamMode* -* *Boolean : FixSmallAreaWireMode* -* *Boolean (not checked) : ModifyTopologyMode* specifies the mode for modifying topology. Should be False (default) for shapes with shells and can be True for free faces. -* *Boolean (not checked) : ModifyGeometryMode* specifies the mode for modifying geometry. Should be False if geometry is to be kept and True if it can be modified. -* *Boolean (not checked) : ClosedWireMode* specifies the mode for wires. Should be True for wires on faces and False for free wires. -* *Boolean (not checked) : PreferencePCurveMode (not used)* specifies the preference of 3d or 2d representations for an edge -* *Boolean : FixReorderMode* -* *Boolean : FixSmallMode* -* *Boolean : FixConnectedMode* -* *Boolean : FixEdgeCurvesMode* -* *Boolean : FixDegeneratedMode* -* *Boolean : FixLackingMode* -* *Boolean : FixSelfIntersectionMode* -* *Boolean : FixGaps3dMode* -* *Boolean : FixGaps2dMode* -* *Boolean : FixReversed2dMode* -* *Boolean : FixRemovePCurveMode* -* *Boolean : FixRemoveCurve3dMode* -* *Boolean : FixAddPCurveMode* -* *Boolean : FixAddCurve3dMode* -* *Boolean : FixSeamMode* -* *Boolean : FixShiftedMode* +* *Boolean : FixSmallAreaWireMode* +* *Boolean (not checked) : ModifyTopologyMode* specifies the mode for modifying topology. + Should be False (default) for shapes with shells and can be True for free faces. +* *Boolean (not checked) : ModifyGeometryMode* specifies the mode for modifying geometry. + Should be False if geometry is to be kept and True if it can be modified. +* *Boolean (not checked) : ClosedWireMode* specifies the mode for wires. + Should be True for wires on faces and False for free wires. +* *Boolean (not checked) : PreferencePCurveMode (not used)* specifies the preference of 3d or 2d representations for an edge +* *Boolean : FixReorderMode* +* *Boolean : FixSmallMode* +* *Boolean : FixConnectedMode* +* *Boolean : FixEdgeCurvesMode* +* *Boolean : FixDegeneratedMode* +* *Boolean : FixLackingMode* +* *Boolean : FixSelfIntersectionMode* +* *Boolean : FixGaps3dMode* +* *Boolean : FixGaps2dMode* +* *Boolean : FixReversed2dMode* +* *Boolean : FixRemovePCurveMode* +* *Boolean : FixRemoveCurve3dMode* +* *Boolean : FixAddPCurveMode* +* *Boolean : FixAddCurve3dMode* +* *Boolean : FixSeamMode* +* *Boolean : FixShiftedMode* * *Boolean : FixEdgeSameParameterMode* -* *Boolean : FixSelfIntersectingEdgeMode* -* *Boolean : FixIntersectingEdgesMode* -* *Boolean : FixNonAdjacentIntersectingEdgesMode* +* *Boolean : FixSelfIntersectingEdgeMode* +* *Boolean : FixIntersectingEdgesMode* +* *Boolean : FixNonAdjacentIntersectingEdgesMode* ### SplitClosedEdges -This operator handles closed edges i.e. edges with one vertex. Such edges are not supported in some receiving systems. This operator splits topologically closed edges (i.e. edges having one vertex) into two edges. Degenerated edges and edges with a size of less than Tolerance are not processed. + +This operator handles closed edges i.e. edges with one vertex. +Such edges are not supported in some receiving systems. +This operator splits topologically closed edges (i.e. edges having one vertex) into two edges. +Degenerated edges and edges with a size of less than Tolerance are not processed. @section occt_shg_7 Messaging mechanism -Various messages about modification, warnings and fails can be generated in the process of shape fixing or upgrade. The messaging mechanism allows generating messages, which will be sent to the chosen target medium a file or the screen. The messages may report failures and/or warnings or provide information on events such as analysis, fixing or upgrade of shapes. +Various messages about modification, warnings and fails can be generated in the process of shape fixing or upgrade. +The messaging mechanism allows generating messages, which will be sent to the chosen target medium a file or the screen. +The messages may report failures and/or warnings or provide information on events such as analysis, fixing or upgrade of shapes. @subsection occt_shg_7_1 Message Gravity -Enumeration *Message_Gravity* is used for defining message gravity. -It provides the following message statuses: + +Enumeration *Message_Gravity* is used for defining message gravity. +It provides the following message statuses: * *Message_FAIL* -- the message reports a fail; -* *Message_WARNING* -- the message reports a warning; -* *Message_INFO* -- the message supplies information. +* *Message_WARNING* -- the message reports a warning; +* *Message_INFO* -- the message supplies information. @subsection occt_shg_7_2 Tool for loading a message file into memory -Class *Message_MsgFile* allows defining messages by loading a custom message file into memory. It is necessary to create a custom message file before loading it into memory, as its path will be used as the argument to load it. Each message in the message file is identified by a key. The user can get the text content of the message by specifying the message key. + +Class *Message_MsgFile* allows defining messages by loading a custom message file into memory. +It is necessary to create a custom message file before loading it into memory, as its path will be used as the argument to load it. +Each message in the message file is identified by a key. +The user can get the text content of the message by specifying the message key. ### Format of the message file -The message file is an ASCII file, which defines a set of messages. Each line of the file must have a length of less than 255 characters. -All lines in the file starting with the exclamation sign (perhaps preceded by spaces and/or tabs) are considered as comments and are ignored. -A message file may contain several messages. Each message is identified by its key (string). -Each line in the file starting with the *dot* character (perhaps preceded by spaces and/or tabs) defines the key. The key is a string starting with a symbol placed after the dot and ending with the symbol preceding the ending of the newline character \\n. -All lines in the file after the key and before the next keyword (and which are not comments) define the message for that key. If the message consists of several lines, the message string will contain newline symbols \\n between each line (but not at the end). +The message file is an ASCII file, which defines a set of messages. +Each line of the file must have a length of less than 255 characters. +All lines in the file starting with the exclamation sign (perhaps preceded by spaces and/or tabs) are considered as comments and are ignored. +A message file may contain several messages. Each message is identified by its key (string). +Each line in the file starting with the *dot* character (perhaps preceded by spaces and/or tabs) defines the key. +The key is a string starting with a symbol placed after the dot and ending with the symbol preceding the ending of the newline character \\n. +All lines in the file after the key and before the next keyword (and which are not comments) define the message for that key. +If the message consists of several lines, the message string will contain newline symbols \\n between each line (but not at the end). -The following example illustrates the structure of a message file: +The following example illustrates the structure of a message file: ~~~~{.cpp} -!This is a sample message file -!------------------------------ -!Messages for ShapeAnalysis package -! -.SampleKeyword -Your message string goes here -! -!... -! -!End of the message file +!This is a sample message file +!------------------------------ +!Messages for ShapeAnalysis package +! +.SampleKeyword +Your message string goes here +! +!... +! +!End of the message file ~~~~ ### Loading the message file -A custom file can be loaded into memory using the method *Message_MsgFile::LoadFile*, taking as an argument the path to your file as in the example below: +A custom file can be loaded into memory using the method *Message_MsgFile::LoadFile*, taking as an argument the path to your file as in the example below: ~~~~{.cpp} -Standard_CString MsgFilePath = ;(path)/sample.file;; -Message_MsgFile::LoadFile (MsgFilePath); +Standard_CString aMsgFilePath = "(path)/sample.file"; +Message_MsgFile::LoadFile (aMsgFilePath); ~~~~ -@subsection occt_shg_7_3 Tool for managing filling messages +@subsection occt_shg_7_3 Tool for managing filling messages -The class *Message_Msg* allows using the message file loaded as a template. This class provides a tool for preparing the message, filling it with parameters, storing and outputting to the default trace file. -A message is created from a key: this key identifies the message to be created in the message file. The text of the message is taken from the loaded message file (class *Message_MsgFile* is used). -The text of the message can contain places for parameters, which are to be filled by the proper values when the message is prepared. These parameters can be of the following types: -* string -- coded in the text as \%s, -* integer -- coded in the text as \%d, -* real -- coded in the text as \%f. -The parameter fields are filled by the message text by calling the corresponding methods *AddInteger, AddReal* and *AddString*. Both the original text of the message and the input text with substituted parameters are stored in the object. The prepared and filled message can be output to the default trace file. The text of the message (either original or filled) can be also obtained. -~~~~{.cpp} -Message_Msg msg01 (;SampleKeyword;); -//Creates the message msg01, identified in the file by the keyword SampleKeyword -msg1.AddInteger (73); -msg1.AddString (;SampleFile;); -//fills out the code areas -~~~~ +The class *Message_Msg* allows using the message file loaded as a template. +This class provides a tool for preparing the message, filling it with parameters, storing and outputting to the default trace file. +A message is created from a key: this key identifies the message to be created in the message file. +The text of the message is taken from the loaded message file (class *Message_MsgFile* is used). +The text of the message can contain places for parameters, which are to be filled by the proper values when the message is prepared. +These parameters can be of the following types: +* string -- coded in the text as \%s, +* integer -- coded in the text as \%d, +* real -- coded in the text as \%f. -@subsection occt_shg_7_4 Tool for managing trace files +The parameter fields are filled by the message text by calling the corresponding methods *AddInteger, AddReal* and *AddString*. +Both the original text of the message and the input text with substituted parameters are stored in the object. +The prepared and filled message can be output to the default trace file. +The text of the message (either original or filled) can be also obtained. -Class *Message_TraceFile* is intended to manage the trace file (or stream) for outputting messages and the current trace level. Trace level is an integer number, which is used when messages are sent. Generally, 0 means minimum, \> 0 various levels. If the current trace level is lower than the level of the message it is not output to the trace file. The trace level is to be managed and used by the users. -There are two ways of using trace files: -* define an object of *Message_TraceFile*, with its own definition (file name or cout, trace level), and use it where it is defined, -* use the default trace file (file name or cout, trace level), usable from anywhere. -Use the constructor method to define the target file and the level of the messages as in the example below: ~~~~{.cpp} -Message_TraceFile myTF - (tracelevel, "tracefile.log", Standard_False); +Message_Msg aMsg01 ("SampleKeyword"); +// create the message aMsg01, identified in the file by the keyword SampleKeyword +aMsg01.AddInteger (73); +aMsg01.AddString ("SampleFile"); +// fill out the code areas ~~~~ -The parameters are as follows: -* *tracelevel* is a Standard_Integer and modifies the level of messages. It has the following values and semantics: - + 0: gives general information such as the start and end of process; - + 1: gives exceptions raised and fail messages; - + 2: gives the same information as 1 plus warning messages. -* *filename* is the string containing the path to the log file. -The Boolean set to False will rewrite the existing file. When set to True, new messages will be appended to the existing file. - -A new default log file can be added using method *SetDefault* with the same arguments as in the constructor. -The default trace level can be changed by using method *SetDefLevel*. In this way, the information received in the log file is modified. -It is possible to close the log file and set the default trace output to the screen display instead of the log file using the method *SetDefault* without any arguments. - - From a81bd74a38ff55568108031a6d110d26950cae67 Mon Sep 17 00:00:00 2001 From: aml Date: Tue, 16 Nov 2021 17:00:04 +0300 Subject: [PATCH 135/639] 0032667: Coding - get rid of unused forward declarations [LibCtl to StepRepr] --- src/LProp/LProp_CurAndInf.hxx | 1 - src/LocOpe/LocOpe.hxx | 21 --------- src/LocOpe/LocOpe_BuildShape.hxx | 1 - src/LocOpe/LocOpe_BuildWires.hxx | 1 - src/LocOpe/LocOpe_CSIntersector.hxx | 3 -- src/LocOpe/LocOpe_CurveShapeIntersector.hxx | 2 - src/LocOpe/LocOpe_DPrism.hxx | 5 --- src/LocOpe/LocOpe_FindEdges.hxx | 4 -- src/LocOpe/LocOpe_FindEdgesInFace.hxx | 5 --- src/LocOpe/LocOpe_Generator.hxx | 4 -- src/LocOpe/LocOpe_GluedShape.hxx | 1 - src/LocOpe/LocOpe_Gluer.hxx | 4 -- src/LocOpe/LocOpe_LinearForm.hxx | 5 --- src/LocOpe/LocOpe_Pipe.hxx | 3 -- src/LocOpe/LocOpe_Prism.hxx | 4 -- src/LocOpe/LocOpe_Revol.hxx | 4 -- src/LocOpe/LocOpe_RevolutionForm.hxx | 4 -- src/LocOpe/LocOpe_SplitShape.hxx | 4 -- src/LocOpe/LocOpe_Spliter.hxx | 4 -- src/LocOpe/LocOpe_WiresOnShape.hxx | 1 - src/LocalAnalysis/LocalAnalysis.hxx | 2 - .../LocalAnalysis_CurveContinuity.hxx | 1 - .../LocalAnalysis_SurfaceContinuity.hxx | 1 - src/MAT/MAT_Arc.hxx | 1 - src/MAT2d/MAT2d_Connexion.hxx | 1 - src/MAT2d/MAT2d_CutCurve.hxx | 1 - src/MeshVS/MeshVS_DeformedDataSource.hxx | 1 - src/MeshVS/MeshVS_NodalColorPrsBuilder.hxx | 1 - src/MeshVS/MeshVS_SensitiveMesh.hxx | 1 - src/MeshVS/MeshVS_SensitivePolyhedron.hxx | 5 --- src/Message/Message_AttributeMeter.hxx | 1 - src/Message/Message_AttributeObject.hxx | 1 - src/Message/Message_Msg.hxx | 1 - src/MoniTool/MoniTool_CaseData.hxx | 2 - src/MoniTool/MoniTool_Element.hxx | 1 - src/MoniTool/MoniTool_SignText.hxx | 1 - src/MoniTool/MoniTool_Timer.hxx | 1 - src/MoniTool/MoniTool_TransientElem.hxx | 2 - src/MoniTool/MoniTool_TypedValue.hxx | 3 -- src/NLPlate/NLPlate_HGPPConstraint.hxx | 1 - src/NLPlate/NLPlate_HPG0Constraint.hxx | 1 - src/NLPlate/NLPlate_HPG0G1Constraint.hxx | 1 - src/NLPlate/NLPlate_HPG0G2Constraint.hxx | 1 - src/NLPlate/NLPlate_HPG0G3Constraint.hxx | 1 - src/NLPlate/NLPlate_HPG1Constraint.hxx | 1 - src/NLPlate/NLPlate_HPG2Constraint.hxx | 1 - src/NLPlate/NLPlate_HPG3Constraint.hxx | 1 - src/OSD/OSD_DirectoryIterator.hxx | 3 -- src/OSD/OSD_Environment.hxx | 4 -- src/OSD/OSD_Error.hxx | 2 - src/OSD/OSD_File.hxx | 1 - src/OSD/OSD_FileIterator.hxx | 2 - src/OSD/OSD_FileNode.hxx | 2 - src/OSD/OSD_Host.hxx | 4 -- src/OSD/OSD_Process.hxx | 1 - src/OSD/OSD_Protection.hxx | 3 -- src/OpenGl/OpenGl_CappingAlgo.hxx | 1 - src/OpenGl/OpenGl_Context.hxx | 1 - src/OpenGl/OpenGl_GraduatedTrihedron.hxx | 1 - src/OpenGl/OpenGl_GraphicDriver.hxx | 1 - src/OpenGl/OpenGl_Group.hxx | 1 - src/OpenGl/OpenGl_Resource.hxx | 1 - src/OpenGl/OpenGl_SceneGeometry.hxx | 2 - src/OpenGl/OpenGl_ShaderManager.hxx | 1 - src/OpenGl/OpenGl_Structure.hxx | 1 - src/OpenGl/OpenGl_Texture.hxx | 2 - src/OpenGl/OpenGl_View.hxx | 3 -- src/PCDM/PCDM.hxx | 2 - src/PCDM/PCDM_Reader.hxx | 1 - src/PCDM/PCDM_Reference.hxx | 1 - src/PCDM/PCDM_RetrievalDriver.hxx | 2 - src/PCDM/PCDM_StorageDriver.hxx | 4 -- src/PCDM/PCDM_Writer.hxx | 1 - src/PLib/PLib.hxx | 4 -- src/PLib/PLib_HermitJacobi.hxx | 1 - src/PLib/PLib_JacobiPolynomial.hxx | 1 - src/Plate/Plate_D1.hxx | 3 -- src/Plate/Plate_D2.hxx | 3 -- src/Plate/Plate_D3.hxx | 3 -- src/Plate/Plate_FreeGtoCConstraint.hxx | 3 -- .../Plate_GlobalTranslationConstraint.hxx | 1 - src/Plate/Plate_GtoCConstraint.hxx | 3 -- src/Plate/Plate_LineConstraint.hxx | 1 - src/Plate/Plate_LinearScalarConstraint.hxx | 2 - src/Plate/Plate_LinearXYZConstraint.hxx | 2 - src/Plate/Plate_PinpointConstraint.hxx | 2 - src/Plate/Plate_PlaneConstraint.hxx | 1 - src/Plate/Plate_SampledCurveConstraint.hxx | 2 - src/Plugin/Plugin.hxx | 1 - src/Poly/Poly.hxx | 6 --- src/Poly/Poly_CoherentLink.hxx | 1 - src/Poly/Poly_CoherentTriangle.hxx | 1 - src/Poly/Poly_CoherentTriangulation.hxx | 1 - src/ProjLib/ProjLib_Cone.hxx | 2 - src/ProjLib/ProjLib_Cylinder.hxx | 2 - src/ProjLib/ProjLib_Plane.hxx | 2 - src/ProjLib/ProjLib_ProjectOnPlane.hxx | 7 --- src/ProjLib/ProjLib_Projector.hxx | 7 --- src/ProjLib/ProjLib_Sphere.hxx | 2 - src/ProjLib/ProjLib_Torus.hxx | 2 - src/PrsDim/PrsDim_IdenticRelation.hxx | 1 - src/PrsDim/PrsDim_MidPointRelation.hxx | 1 - src/PrsMgr/PrsMgr_Presentation.hxx | 3 -- src/QABugs/QABugs.hxx | 2 - src/Quantity/Quantity_Date.hxx | 2 - src/Quantity/Quantity_Period.hxx | 1 - src/RWGltf/RWGltf_GltfJsonParser.hxx | 1 - src/RWHeaderSection/RWHeaderSection.hxx | 5 --- src/RWStepAP214/RWStepAP214.hxx | 28 ------------ ...mTol_RWDatumReferenceModifierWithValue.hxx | 1 - .../RWStepVisual_RWCoordinatesList.hxx | 1 - ...RWStepVisual_RWSurfaceStyleTransparent.hxx | 1 - .../RWStepVisual_RWTessellatedItem.hxx | 1 - src/Resource/Resource_Manager.hxx | 4 -- .../STEPCAFControl_ExternFile.hxx | 1 - src/STEPCAFControl/STEPCAFControl_Reader.hxx | 3 -- src/STEPCAFControl/STEPCAFControl_Writer.hxx | 1 - src/STEPConstruct/STEPConstruct.hxx | 10 ----- src/STEPConstruct/STEPConstruct_Assembly.hxx | 2 - .../STEPConstruct_ContextTool.hxx | 1 - src/STEPControl/STEPControl_Controller.hxx | 1 - src/STEPEdit/STEPEdit.hxx | 2 - .../Select3D_InteriorSensitivePointSet.hxx | 1 - src/Select3D/Select3D_SensitiveCurve.hxx | 2 - src/Select3D/Select3D_SensitiveFace.hxx | 2 - src/Select3D/Select3D_SensitivePoly.hxx | 2 - src/Select3D/Select3D_SensitiveTriangle.hxx | 2 - .../SelectBasics_SelectingVolumeManager.hxx | 1 - src/SelectMgr/SelectMgr_SelectableObject.hxx | 2 - src/SelectMgr/SelectMgr_ViewerSelector.hxx | 3 -- src/ShapeAlgo/ShapeAlgo.hxx | 2 - src/ShapeAnalysis/ShapeAnalysis.hxx | 16 ------- src/ShapeAnalysis/ShapeAnalysis_Edge.hxx | 1 - .../ShapeAnalysis_FreeBoundData.hxx | 1 - .../ShapeAnalysis_FreeBounds.hxx | 1 - .../ShapeAnalysis_FreeBoundsProperties.hxx | 1 - src/ShapeAnalysis/ShapeAnalysis_Geom.hxx | 1 - .../ShapeAnalysis_TransferParameters.hxx | 2 - src/ShapeAnalysis/ShapeAnalysis_WireOrder.hxx | 1 - src/ShapeBuild/ShapeBuild.hxx | 3 -- src/ShapeConstruct/ShapeConstruct.hxx | 4 -- .../ShapeConstruct_MakeTriangulation.hxx | 1 - src/ShapeCustom/ShapeCustom.hxx | 11 ----- src/ShapeExtend/ShapeExtend.hxx | 6 --- .../ShapeExtend_BasicMsgRegistrator.hxx | 1 - src/ShapeExtend/ShapeExtend_ComplexCurve.hxx | 1 - .../ShapeExtend_CompositeSurface.hxx | 1 - src/ShapeExtend/ShapeExtend_Explorer.hxx | 1 - src/ShapeFix/ShapeFix.hxx | 21 --------- src/ShapeFix/ShapeFix_EdgeProjAux.hxx | 2 - src/ShapeFix/ShapeFix_FixSmallFace.hxx | 1 - src/ShapeFix/ShapeFix_FreeBounds.hxx | 2 - src/ShapeFix/ShapeFix_Root.hxx | 1 - src/ShapeFix/ShapeFix_Solid.hxx | 1 - src/ShapeFix/ShapeFix_SplitCommonVertex.hxx | 1 - src/ShapeFix/ShapeFix_WireSegment.hxx | 1 - src/ShapeFix/ShapeFix_WireVertex.hxx | 1 - src/ShapeFix/ShapeFix_Wireframe.hxx | 1 - .../ShapePersistent_Geom_Curve.hxx | 1 - .../ShapePersistent_Geom_Surface.hxx | 2 - src/ShapeProcess/ShapeProcess.hxx | 5 --- .../ShapeProcess_ShapeContext.hxx | 1 - src/ShapeUpgrade/ShapeUpgrade.hxx | 32 ------------- src/ShapeUpgrade/ShapeUpgrade_EdgeDivide.hxx | 1 - .../ShapeUpgrade_RemoveLocations.hxx | 1 - .../ShapeUpgrade_UnifySameDomain.hxx | 1 - src/Standard/Standard.hxx | 4 -- src/StdLPersistent/StdLPersistent_HArray1.hxx | 3 -- src/StdPrs/StdPrs_Isolines.hxx | 2 - src/StdPrs/StdPrs_ShadedShape.hxx | 1 - src/StdPrs/StdPrs_ToolTriangulatedShape.hxx | 2 - .../StdPrs_WFDeflectionRestrictedFace.hxx | 1 - src/StdSelect/StdSelect_BRepOwner.hxx | 1 - src/StdSelect/StdSelect_BRepSelectionTool.hxx | 2 - src/StdSelect/StdSelect_Shape.hxx | 1 - .../StdStorage_BacketOfPersistent.hxx | 2 - src/StdStorage/StdStorage_HeaderData.hxx | 2 - src/StdStorage/StdStorage_Root.hxx | 3 -- src/StdStorage/StdStorage_RootData.hxx | 4 -- src/StdStorage/StdStorage_TypeData.hxx | 2 - src/StepAP214/StepAP214.hxx | 45 ------------------- src/StepAP242/StepAP242_IdAttribute.hxx | 1 - ...P242_ItemIdentifiedRepresentationUsage.hxx | 1 - src/StepBasic/StepBasic_ApprovalDateTime.hxx | 1 - .../StepBasic_ApprovalPersonOrganization.hxx | 1 - .../StepBasic_DocumentProductAssociation.hxx | 1 - src/StepBasic/StepBasic_ExternalSource.hxx | 1 - .../StepBasic_ExternallyDefinedItem.hxx | 1 - src/StepBasic/StepBasic_MeasureWithUnit.hxx | 1 - ...nitionReferenceWithLocalRepresentation.hxx | 1 - src/StepBasic/StepBasic_RoleAssociation.hxx | 1 - src/StepBasic/StepBasic_SiUnitAndAreaUnit.hxx | 1 - .../StepBasic_SiUnitAndLengthUnit.hxx | 1 - src/StepBasic/StepBasic_SiUnitAndMassUnit.hxx | 1 - .../StepBasic_SiUnitAndPlaneAngleUnit.hxx | 1 - .../StepBasic_SiUnitAndRatioUnit.hxx | 1 - .../StepBasic_SiUnitAndSolidAngleUnit.hxx | 1 - ..._SiUnitAndThermodynamicTemperatureUnit.hxx | 1 - src/StepBasic/StepBasic_SiUnitAndTimeUnit.hxx | 1 - .../StepBasic_SiUnitAndVolumeUnit.hxx | 1 - src/StepData/StepData.hxx | 39 ---------------- src/StepData/StepData_Described.hxx | 1 - src/StepData/StepData_Field.hxx | 1 - src/StepData/StepData_FieldList.hxx | 1 - src/StepData/StepData_FieldList1.hxx | 2 - src/StepData/StepData_FieldListD.hxx | 1 - src/StepData/StepData_FieldListN.hxx | 1 - src/StepData/StepData_FileProtocol.hxx | 1 - src/StepData/StepData_Plex.hxx | 1 - src/StepData/StepData_Protocol.hxx | 2 - src/StepData/StepData_ReadWriteModule.hxx | 1 - src/StepData/StepData_SelectNamed.hxx | 1 - src/StepData/StepData_SelectType.hxx | 1 - src/StepData/StepData_Simple.hxx | 2 - src/StepData/StepData_StepDumper.hxx | 2 - src/StepData/StepData_StepModel.hxx | 2 - src/StepData/StepData_StepWriter.hxx | 3 -- .../StepDimTol_GeometricTolerance.hxx | 1 - ...DimTol_GeometricToleranceWithModifiers.hxx | 1 - src/StepDimTol/StepDimTol_ToleranceZone.hxx | 2 - .../StepDimTol_ToleranceZoneDefinition.hxx | 1 - ...epElement_CurveElementEndReleasePacket.hxx | 1 - ..._CurveElementSectionDerivedDefinitions.hxx | 1 - .../StepElement_SurfaceSection.hxx | 1 - .../StepElement_UniformSurfaceSection.hxx | 1 - src/StepFEA/StepFEA_CurveElementEndOffset.hxx | 1 - .../StepFEA_CurveElementEndRelease.hxx | 1 - .../StepFEA_ElementGeometricRelationship.hxx | 2 - src/StepFEA/StepFEA_FeaLinearElasticity.hxx | 1 - src/StepFEA/StepFEA_FeaMoistureAbsorption.hxx | 1 - ...antCoefficientOfLinearThermalExpansion.hxx | 1 - .../StepFEA_FeaShellBendingStiffness.hxx | 1 - ...aShellMembraneBendingCouplingStiffness.hxx | 1 - .../StepFEA_FeaShellMembraneStiffness.hxx | 1 - .../StepFEA_FeaShellShearStiffness.hxx | 1 - ...ialCoefficientOfLinearThermalExpansion.hxx | 1 - src/StepFEA/StepFEA_FreedomAndCoefficient.hxx | 2 - src/StepGeom/StepGeom_Conic.hxx | 1 - src/StepGeom/StepGeom_CurveReplica.hxx | 1 - src/StepGeom/StepGeom_OffsetCurve3d.hxx | 1 - src/StepGeom/StepGeom_OffsetSurface.hxx | 1 - src/StepGeom/StepGeom_PointReplica.hxx | 1 - src/StepGeom/StepGeom_SurfaceCurve.hxx | 1 - src/StepGeom/StepGeom_SurfaceReplica.hxx | 1 - .../StepRepr_CharacterizedRepresentation.hxx | 1 - .../StepRepr_CompoundRepresentationItem.hxx | 1 - src/StepRepr/StepRepr_ConfigurationDesign.hxx | 1 - src/StepRepr/StepRepr_MappedItem.hxx | 1 - src/StepRepr/StepRepr_MaterialDesignation.hxx | 1 - src/StepRepr/StepRepr_PropertyDefinition.hxx | 1 - ...pRepr_PropertyDefinitionRepresentation.hxx | 1 - .../StepRepr_ReprItemAndMeasureWithUnit.hxx | 1 - ...entationRelationshipWithTransformation.hxx | 1 - ...tepRepr_SpecifiedHigherUsageOccurrence.hxx | 1 - src/math/math.hxx | 40 ----------------- src/math/math_BFGS.hxx | 2 - src/math/math_BissecNewton.hxx | 1 - src/math/math_BracketMinimum.hxx | 1 - src/math/math_BracketedRoot.hxx | 1 - src/math/math_BrentMinimum.hxx | 1 - src/math/math_Crout.hxx | 4 -- src/math/math_DirectPolynomialRoots.hxx | 2 - src/math/math_EigenValuesSearcher.hxx | 1 - src/math/math_FRPR.hxx | 2 - src/math/math_FunctionAllRoots.hxx | 3 -- src/math/math_FunctionRoot.hxx | 1 - src/math/math_FunctionRoots.hxx | 2 - src/math/math_FunctionSample.hxx | 1 - src/math/math_FunctionSetRoot.hxx | 3 -- src/math/math_Gauss.hxx | 4 -- src/math/math_GaussLeastSquare.hxx | 3 -- src/math/math_GaussMultipleIntegration.hxx | 1 - src/math/math_GaussSetIntegration.hxx | 2 - src/math/math_GaussSingleIntegration.hxx | 1 - src/math/math_Householder.hxx | 5 --- src/math/math_Jacobi.hxx | 2 - src/math/math_KronrodSingleIntegration.hxx | 1 - src/math/math_NewtonFunctionRoot.hxx | 1 - src/math/math_NewtonFunctionSetRoot.hxx | 3 -- src/math/math_NewtonMinimum.hxx | 2 - src/math/math_Powell.hxx | 3 -- src/math/math_SVD.hxx | 3 -- src/math/math_TrigonometricFunctionRoots.hxx | 3 -- src/math/math_Uzawa.hxx | 3 -- 284 files changed, 748 deletions(-) diff --git a/src/LProp/LProp_CurAndInf.hxx b/src/LProp/LProp_CurAndInf.hxx index 87616cd5b7..95892b9dfd 100644 --- a/src/LProp/LProp_CurAndInf.hxx +++ b/src/LProp/LProp_CurAndInf.hxx @@ -27,7 +27,6 @@ #include #include #include -class Standard_OutOfRange; //! Stores the parameters of a curve 2d or 3d corresponding diff --git a/src/LocOpe/LocOpe.hxx b/src/LocOpe/LocOpe.hxx index 64fbd146fb..904757df86 100644 --- a/src/LocOpe/LocOpe.hxx +++ b/src/LocOpe/LocOpe.hxx @@ -27,27 +27,6 @@ class TopoDS_Wire; class TopoDS_Face; class TopoDS_Edge; class TopoDS_Shape; -class LocOpe_SplitShape; -class LocOpe_WiresOnShape; -class LocOpe_Spliter; -class LocOpe_Generator; -class LocOpe_GeneratedShape; -class LocOpe_GluedShape; -class LocOpe_Prism; -class LocOpe_Revol; -class LocOpe_Pipe; -class LocOpe_DPrism; -class LocOpe_LinearForm; -class LocOpe_RevolutionForm; -class LocOpe_Gluer; -class LocOpe_FindEdges; -class LocOpe_FindEdgesInFace; -class LocOpe_PntFace; -class LocOpe_CurveShapeIntersector; -class LocOpe_CSIntersector; -class LocOpe_BuildShape; -class LocOpe_SplitDrafts; -class LocOpe_BuildWires; //! Provides tools to implement local topological diff --git a/src/LocOpe/LocOpe_BuildShape.hxx b/src/LocOpe/LocOpe_BuildShape.hxx index deb2c4aa88..f61645da47 100644 --- a/src/LocOpe/LocOpe_BuildShape.hxx +++ b/src/LocOpe/LocOpe_BuildShape.hxx @@ -23,7 +23,6 @@ #include #include -class TopoDS_Shape; diff --git a/src/LocOpe/LocOpe_BuildWires.hxx b/src/LocOpe/LocOpe_BuildWires.hxx index d33fffa641..fd572f6061 100644 --- a/src/LocOpe/LocOpe_BuildWires.hxx +++ b/src/LocOpe/LocOpe_BuildWires.hxx @@ -23,7 +23,6 @@ #include #include -class StdFail_NotDone; class LocOpe_WiresOnShape; diff --git a/src/LocOpe/LocOpe_CSIntersector.hxx b/src/LocOpe/LocOpe_CSIntersector.hxx index 249e01ffc9..cb5dcf0ec4 100644 --- a/src/LocOpe/LocOpe_CSIntersector.hxx +++ b/src/LocOpe/LocOpe_CSIntersector.hxx @@ -30,9 +30,6 @@ #include #include #include -class StdFail_NotDone; -class Standard_OutOfRange; -class TopoDS_Shape; class LocOpe_PntFace; diff --git a/src/LocOpe/LocOpe_CurveShapeIntersector.hxx b/src/LocOpe/LocOpe_CurveShapeIntersector.hxx index ffdf37dae8..10b9c94f81 100644 --- a/src/LocOpe/LocOpe_CurveShapeIntersector.hxx +++ b/src/LocOpe/LocOpe_CurveShapeIntersector.hxx @@ -26,8 +26,6 @@ #include #include #include -class StdFail_NotDone; -class Standard_OutOfRange; class gp_Ax1; class TopoDS_Shape; class gp_Circ; diff --git a/src/LocOpe/LocOpe_DPrism.hxx b/src/LocOpe/LocOpe_DPrism.hxx index 4da252d811..02a1091bdb 100644 --- a/src/LocOpe/LocOpe_DPrism.hxx +++ b/src/LocOpe/LocOpe_DPrism.hxx @@ -31,11 +31,6 @@ #include #include #include -class Standard_NoSuchObject; -class Standard_DomainError; -class StdFail_NotDone; -class TopoDS_Face; -class TopoDS_Shape; class Geom_Curve; diff --git a/src/LocOpe/LocOpe_FindEdges.hxx b/src/LocOpe/LocOpe_FindEdges.hxx index 3f417d8ac0..c0b8cfd21c 100644 --- a/src/LocOpe/LocOpe_FindEdges.hxx +++ b/src/LocOpe/LocOpe_FindEdges.hxx @@ -25,10 +25,6 @@ #include #include #include -class Standard_ConstructionError; -class Standard_NoSuchObject; -class Standard_NoMoreObject; -class TopoDS_Shape; class TopoDS_Edge; diff --git a/src/LocOpe/LocOpe_FindEdgesInFace.hxx b/src/LocOpe/LocOpe_FindEdgesInFace.hxx index fba4fa924d..bbf1c8a470 100644 --- a/src/LocOpe/LocOpe_FindEdgesInFace.hxx +++ b/src/LocOpe/LocOpe_FindEdgesInFace.hxx @@ -26,11 +26,6 @@ #include #include #include -class Standard_ConstructionError; -class Standard_NoSuchObject; -class Standard_NoMoreObject; -class TopoDS_Shape; -class TopoDS_Face; class TopoDS_Edge; diff --git a/src/LocOpe/LocOpe_Generator.hxx b/src/LocOpe/LocOpe_Generator.hxx index 28dd117d29..cc66ec6644 100644 --- a/src/LocOpe/LocOpe_Generator.hxx +++ b/src/LocOpe/LocOpe_Generator.hxx @@ -26,10 +26,6 @@ #include #include class LocOpe_GeneratedShape; -class StdFail_NotDone; -class Standard_NullObject; -class Standard_NoSuchObject; -class TopoDS_Shape; class TopoDS_Face; diff --git a/src/LocOpe/LocOpe_GluedShape.hxx b/src/LocOpe/LocOpe_GluedShape.hxx index ae17b7aef3..4aa978dc7b 100644 --- a/src/LocOpe/LocOpe_GluedShape.hxx +++ b/src/LocOpe/LocOpe_GluedShape.hxx @@ -25,7 +25,6 @@ #include #include #include -class TopoDS_Shape; class TopoDS_Face; class TopoDS_Edge; class TopoDS_Vertex; diff --git a/src/LocOpe/LocOpe_Gluer.hxx b/src/LocOpe/LocOpe_Gluer.hxx index 802d039c3c..df6afd2be4 100644 --- a/src/LocOpe/LocOpe_Gluer.hxx +++ b/src/LocOpe/LocOpe_Gluer.hxx @@ -29,10 +29,6 @@ #include #include #include -class StdFail_NotDone; -class Standard_NoSuchObject; -class Standard_ConstructionError; -class TopoDS_Shape; class TopoDS_Face; class TopoDS_Edge; diff --git a/src/LocOpe/LocOpe_LinearForm.hxx b/src/LocOpe/LocOpe_LinearForm.hxx index c3875ad6f4..6660b709bd 100644 --- a/src/LocOpe/LocOpe_LinearForm.hxx +++ b/src/LocOpe/LocOpe_LinearForm.hxx @@ -27,11 +27,6 @@ #include #include #include -class Standard_NoSuchObject; -class StdFail_NotDone; -class TopoDS_Shape; -class gp_Vec; -class gp_Pnt; //! Defines a linear form (using Prism from BRepSweep) diff --git a/src/LocOpe/LocOpe_Pipe.hxx b/src/LocOpe/LocOpe_Pipe.hxx index 7c9f6ccf32..1d9176b5cb 100644 --- a/src/LocOpe/LocOpe_Pipe.hxx +++ b/src/LocOpe/LocOpe_Pipe.hxx @@ -27,10 +27,7 @@ #include #include #include -class Standard_NoSuchObject; -class Standard_DomainError; class TopoDS_Wire; -class TopoDS_Shape; class Geom_Curve; diff --git a/src/LocOpe/LocOpe_Prism.hxx b/src/LocOpe/LocOpe_Prism.hxx index faf146323a..044084b0f2 100644 --- a/src/LocOpe/LocOpe_Prism.hxx +++ b/src/LocOpe/LocOpe_Prism.hxx @@ -27,10 +27,6 @@ #include #include #include -class Standard_NoSuchObject; -class StdFail_NotDone; -class TopoDS_Shape; -class gp_Vec; class Geom_Curve; diff --git a/src/LocOpe/LocOpe_Revol.hxx b/src/LocOpe/LocOpe_Revol.hxx index 05aa958e38..48b17ae596 100644 --- a/src/LocOpe/LocOpe_Revol.hxx +++ b/src/LocOpe/LocOpe_Revol.hxx @@ -28,10 +28,6 @@ #include #include #include -class Standard_NoSuchObject; -class StdFail_NotDone; -class TopoDS_Shape; -class gp_Ax1; class Geom_Curve; diff --git a/src/LocOpe/LocOpe_RevolutionForm.hxx b/src/LocOpe/LocOpe_RevolutionForm.hxx index c6f6851f4d..b135ba664b 100644 --- a/src/LocOpe/LocOpe_RevolutionForm.hxx +++ b/src/LocOpe/LocOpe_RevolutionForm.hxx @@ -29,10 +29,6 @@ #include #include #include -class Standard_NoSuchObject; -class StdFail_NotDone; -class TopoDS_Shape; -class gp_Ax1; //! Defines a revolution form (using Revol from BRepSweep) diff --git a/src/LocOpe/LocOpe_SplitShape.hxx b/src/LocOpe/LocOpe_SplitShape.hxx index df6a6e32fc..11a2c4a05f 100644 --- a/src/LocOpe/LocOpe_SplitShape.hxx +++ b/src/LocOpe/LocOpe_SplitShape.hxx @@ -27,10 +27,6 @@ #include #include #include -class StdFail_NotDone; -class Standard_ConstructionError; -class Standard_NoSuchObject; -class TopoDS_Shape; class TopoDS_Edge; class TopoDS_Vertex; class TopoDS_Wire; diff --git a/src/LocOpe/LocOpe_Spliter.hxx b/src/LocOpe/LocOpe_Spliter.hxx index fcbbdf164c..2d7371c971 100644 --- a/src/LocOpe/LocOpe_Spliter.hxx +++ b/src/LocOpe/LocOpe_Spliter.hxx @@ -25,10 +25,6 @@ #include #include #include -class StdFail_NotDone; -class Standard_NullObject; -class Standard_NoSuchObject; -class TopoDS_Shape; class LocOpe_WiresOnShape; diff --git a/src/LocOpe/LocOpe_WiresOnShape.hxx b/src/LocOpe/LocOpe_WiresOnShape.hxx index 9a51b4e964..576aa67d9f 100644 --- a/src/LocOpe/LocOpe_WiresOnShape.hxx +++ b/src/LocOpe/LocOpe_WiresOnShape.hxx @@ -30,7 +30,6 @@ #include #include -class TopoDS_Shape; class TopoDS_Wire; class TopoDS_Face; class TopoDS_Compound; diff --git a/src/LocalAnalysis/LocalAnalysis.hxx b/src/LocalAnalysis/LocalAnalysis.hxx index bee3542421..1bdcf1ef42 100644 --- a/src/LocalAnalysis/LocalAnalysis.hxx +++ b/src/LocalAnalysis/LocalAnalysis.hxx @@ -22,8 +22,6 @@ #include #include -class LocalAnalysis_SurfaceContinuity; -class LocalAnalysis_CurveContinuity; class LocalAnalysis_SurfaceContinuity; class LocalAnalysis_CurveContinuity; diff --git a/src/LocalAnalysis/LocalAnalysis_CurveContinuity.hxx b/src/LocalAnalysis/LocalAnalysis_CurveContinuity.hxx index 7f06ef7cbb..468cadd413 100644 --- a/src/LocalAnalysis/LocalAnalysis_CurveContinuity.hxx +++ b/src/LocalAnalysis/LocalAnalysis_CurveContinuity.hxx @@ -25,7 +25,6 @@ #include #include #include -class StdFail_NotDone; class Geom_Curve; class GeomLProp_CLProps; diff --git a/src/LocalAnalysis/LocalAnalysis_SurfaceContinuity.hxx b/src/LocalAnalysis/LocalAnalysis_SurfaceContinuity.hxx index 86dbef4351..6f1474b6bb 100644 --- a/src/LocalAnalysis/LocalAnalysis_SurfaceContinuity.hxx +++ b/src/LocalAnalysis/LocalAnalysis_SurfaceContinuity.hxx @@ -25,7 +25,6 @@ #include #include #include -class StdFail_NotDone; class Geom_Surface; class Geom2d_Curve; class GeomLProp_SLProps; diff --git a/src/MAT/MAT_Arc.hxx b/src/MAT/MAT_Arc.hxx index 7ad55270af..3d2413690f 100644 --- a/src/MAT/MAT_Arc.hxx +++ b/src/MAT/MAT_Arc.hxx @@ -27,7 +27,6 @@ #include class MAT_BasicElt; class MAT_Node; -class Standard_DomainError; class MAT_Arc; diff --git a/src/MAT2d/MAT2d_Connexion.hxx b/src/MAT2d/MAT2d_Connexion.hxx index f2a86c552e..c52249811b 100644 --- a/src/MAT2d/MAT2d_Connexion.hxx +++ b/src/MAT2d/MAT2d_Connexion.hxx @@ -25,7 +25,6 @@ #include #include #include -class gp_Pnt2d; class MAT2d_Connexion; diff --git a/src/MAT2d/MAT2d_CutCurve.hxx b/src/MAT2d/MAT2d_CutCurve.hxx index 0447ced025..a60d8b4d70 100644 --- a/src/MAT2d/MAT2d_CutCurve.hxx +++ b/src/MAT2d/MAT2d_CutCurve.hxx @@ -25,7 +25,6 @@ #include #include #include -class Standard_OutOfRange; class Geom2d_Curve; class Geom2d_TrimmedCurve; diff --git a/src/MeshVS/MeshVS_DeformedDataSource.hxx b/src/MeshVS/MeshVS_DeformedDataSource.hxx index c82c732723..0d30dca282 100644 --- a/src/MeshVS/MeshVS_DeformedDataSource.hxx +++ b/src/MeshVS/MeshVS_DeformedDataSource.hxx @@ -30,7 +30,6 @@ #include #include #include -class MeshVS_DataSource; class gp_Vec; diff --git a/src/MeshVS/MeshVS_NodalColorPrsBuilder.hxx b/src/MeshVS/MeshVS_NodalColorPrsBuilder.hxx index 259f2ad85a..211828db23 100644 --- a/src/MeshVS/MeshVS_NodalColorPrsBuilder.hxx +++ b/src/MeshVS/MeshVS_NodalColorPrsBuilder.hxx @@ -30,7 +30,6 @@ class MeshVS_Mesh; class MeshVS_DataSource; -class Quantity_Color; class Graphic3d_Texture2D; class Graphic3d_ArrayOfPrimitives; diff --git a/src/MeshVS/MeshVS_SensitiveMesh.hxx b/src/MeshVS/MeshVS_SensitiveMesh.hxx index 3bedd05570..a0dd113183 100644 --- a/src/MeshVS/MeshVS_SensitiveMesh.hxx +++ b/src/MeshVS/MeshVS_SensitiveMesh.hxx @@ -24,7 +24,6 @@ #include #include -class Select3D_SensitiveEntity; //! This class provides custom mesh sensitive entity used in advanced mesh selection. class MeshVS_SensitiveMesh : public Select3D_SensitiveEntity diff --git a/src/MeshVS/MeshVS_SensitivePolyhedron.hxx b/src/MeshVS/MeshVS_SensitivePolyhedron.hxx index 2283b6d1eb..91b408e7e8 100644 --- a/src/MeshVS/MeshVS_SensitivePolyhedron.hxx +++ b/src/MeshVS/MeshVS_SensitivePolyhedron.hxx @@ -28,11 +28,6 @@ #include #include -class Select3D_SensitiveEntity; -class TopLoc_Location; -class Bnd_Box2d; -class gp_Lin; -class SelectBasics_ListOfBox2d; typedef NCollection_List MeshVS_PolyhedronVerts; typedef NCollection_List::Iterator MeshVS_PolyhedronVertsIter; diff --git a/src/Message/Message_AttributeMeter.hxx b/src/Message/Message_AttributeMeter.hxx index 504a7a4eeb..a5c7d50f1a 100644 --- a/src/Message/Message_AttributeMeter.hxx +++ b/src/Message/Message_AttributeMeter.hxx @@ -19,7 +19,6 @@ #include -class Message_Alert; class Message_AlertExtended; //! Alert object storing alert metrics values. diff --git a/src/Message/Message_AttributeObject.hxx b/src/Message/Message_AttributeObject.hxx index 1201d9e5e7..86c94b6e41 100644 --- a/src/Message/Message_AttributeObject.hxx +++ b/src/Message/Message_AttributeObject.hxx @@ -16,7 +16,6 @@ #include -class Standard_Transient; //! Alert object storing a transient object class Message_AttributeObject : public Message_Attribute diff --git a/src/Message/Message_Msg.hxx b/src/Message/Message_Msg.hxx index 821793932e..cdeb16195f 100644 --- a/src/Message/Message_Msg.hxx +++ b/src/Message/Message_Msg.hxx @@ -24,7 +24,6 @@ #include #include -class TCollection_ExtendedString; class TCollection_AsciiString; class TCollection_HAsciiString; class TCollection_HExtendedString; diff --git a/src/MoniTool/MoniTool_CaseData.hxx b/src/MoniTool/MoniTool_CaseData.hxx index 70b9591c81..1618e7c947 100644 --- a/src/MoniTool/MoniTool_CaseData.hxx +++ b/src/MoniTool/MoniTool_CaseData.hxx @@ -30,11 +30,9 @@ #include #include #include -class Standard_Transient; class TopoDS_Shape; class gp_XYZ; class gp_XY; -class TCollection_AsciiString; class Message_Msg; diff --git a/src/MoniTool/MoniTool_Element.hxx b/src/MoniTool/MoniTool_Element.hxx index b2e1346acb..fc7c589616 100644 --- a/src/MoniTool/MoniTool_Element.hxx +++ b/src/MoniTool/MoniTool_Element.hxx @@ -26,7 +26,6 @@ #include #include #include -class MoniTool_AttrList; class MoniTool_Element; diff --git a/src/MoniTool/MoniTool_SignText.hxx b/src/MoniTool/MoniTool_SignText.hxx index c09aa7e184..6703d71c66 100644 --- a/src/MoniTool/MoniTool_SignText.hxx +++ b/src/MoniTool/MoniTool_SignText.hxx @@ -23,7 +23,6 @@ #include #include class TCollection_AsciiString; -class Standard_Transient; class MoniTool_SignText; diff --git a/src/MoniTool/MoniTool_Timer.hxx b/src/MoniTool/MoniTool_Timer.hxx index 4a8d12f88a..e5821e67df 100644 --- a/src/MoniTool/MoniTool_Timer.hxx +++ b/src/MoniTool/MoniTool_Timer.hxx @@ -26,7 +26,6 @@ #include #include #include -class OSD_Timer; class MoniTool_Timer; diff --git a/src/MoniTool/MoniTool_TransientElem.hxx b/src/MoniTool/MoniTool_TransientElem.hxx index 6af5923661..0d486539a5 100644 --- a/src/MoniTool/MoniTool_TransientElem.hxx +++ b/src/MoniTool/MoniTool_TransientElem.hxx @@ -24,8 +24,6 @@ #include #include #include -class Standard_Transient; -class MoniTool_Element; class MoniTool_TransientElem; diff --git a/src/MoniTool/MoniTool_TypedValue.hxx b/src/MoniTool/MoniTool_TypedValue.hxx index c23fbfc515..3cf608bb7b 100644 --- a/src/MoniTool/MoniTool_TypedValue.hxx +++ b/src/MoniTool/MoniTool_TypedValue.hxx @@ -34,9 +34,6 @@ #include #include class TCollection_HAsciiString; -class Standard_Transient; -class Standard_ConstructionError; -class TCollection_AsciiString; class MoniTool_TypedValue; DEFINE_STANDARD_HANDLE(MoniTool_TypedValue, Standard_Transient) diff --git a/src/NLPlate/NLPlate_HGPPConstraint.hxx b/src/NLPlate/NLPlate_HGPPConstraint.hxx index 09861516f2..655a54aedf 100644 --- a/src/NLPlate/NLPlate_HGPPConstraint.hxx +++ b/src/NLPlate/NLPlate_HGPPConstraint.hxx @@ -25,7 +25,6 @@ #include #include #include -class gp_XY; class gp_XYZ; class Plate_D1; class Plate_D2; diff --git a/src/NLPlate/NLPlate_HPG0Constraint.hxx b/src/NLPlate/NLPlate_HPG0Constraint.hxx index 0959d886d2..38981680af 100644 --- a/src/NLPlate/NLPlate_HPG0Constraint.hxx +++ b/src/NLPlate/NLPlate_HPG0Constraint.hxx @@ -25,7 +25,6 @@ #include #include class gp_XY; -class gp_XYZ; class NLPlate_HPG0Constraint; diff --git a/src/NLPlate/NLPlate_HPG0G1Constraint.hxx b/src/NLPlate/NLPlate_HPG0G1Constraint.hxx index ba84013ae5..2631e0c4e2 100644 --- a/src/NLPlate/NLPlate_HPG0G1Constraint.hxx +++ b/src/NLPlate/NLPlate_HPG0G1Constraint.hxx @@ -25,7 +25,6 @@ #include class gp_XY; class gp_XYZ; -class Plate_D1; class NLPlate_HPG0G1Constraint; diff --git a/src/NLPlate/NLPlate_HPG0G2Constraint.hxx b/src/NLPlate/NLPlate_HPG0G2Constraint.hxx index 164c182500..9ac998444c 100644 --- a/src/NLPlate/NLPlate_HPG0G2Constraint.hxx +++ b/src/NLPlate/NLPlate_HPG0G2Constraint.hxx @@ -26,7 +26,6 @@ class gp_XY; class gp_XYZ; class Plate_D1; -class Plate_D2; class NLPlate_HPG0G2Constraint; diff --git a/src/NLPlate/NLPlate_HPG0G3Constraint.hxx b/src/NLPlate/NLPlate_HPG0G3Constraint.hxx index 0893467e53..b4345a7451 100644 --- a/src/NLPlate/NLPlate_HPG0G3Constraint.hxx +++ b/src/NLPlate/NLPlate_HPG0G3Constraint.hxx @@ -27,7 +27,6 @@ class gp_XY; class gp_XYZ; class Plate_D1; class Plate_D2; -class Plate_D3; class NLPlate_HPG0G3Constraint; diff --git a/src/NLPlate/NLPlate_HPG1Constraint.hxx b/src/NLPlate/NLPlate_HPG1Constraint.hxx index c815bfd715..6303188900 100644 --- a/src/NLPlate/NLPlate_HPG1Constraint.hxx +++ b/src/NLPlate/NLPlate_HPG1Constraint.hxx @@ -25,7 +25,6 @@ #include #include class gp_XY; -class Plate_D1; class NLPlate_HPG1Constraint; diff --git a/src/NLPlate/NLPlate_HPG2Constraint.hxx b/src/NLPlate/NLPlate_HPG2Constraint.hxx index 04c76d54e6..56695f22a0 100644 --- a/src/NLPlate/NLPlate_HPG2Constraint.hxx +++ b/src/NLPlate/NLPlate_HPG2Constraint.hxx @@ -25,7 +25,6 @@ #include class gp_XY; class Plate_D1; -class Plate_D2; class NLPlate_HPG2Constraint; diff --git a/src/NLPlate/NLPlate_HPG3Constraint.hxx b/src/NLPlate/NLPlate_HPG3Constraint.hxx index 20bd228278..023d3e57fb 100644 --- a/src/NLPlate/NLPlate_HPG3Constraint.hxx +++ b/src/NLPlate/NLPlate_HPG3Constraint.hxx @@ -26,7 +26,6 @@ class gp_XY; class Plate_D1; class Plate_D2; -class Plate_D3; class NLPlate_HPG3Constraint; diff --git a/src/OSD/OSD_DirectoryIterator.hxx b/src/OSD/OSD_DirectoryIterator.hxx index 722645f7a2..8a6dd14410 100644 --- a/src/OSD/OSD_DirectoryIterator.hxx +++ b/src/OSD/OSD_DirectoryIterator.hxx @@ -27,10 +27,7 @@ #include #include #include -class OSD_OSDError; class OSD_Path; -class TCollection_AsciiString; -class OSD_Directory; //! Manages a breadth-only search for sub-directories in the specified diff --git a/src/OSD/OSD_Environment.hxx b/src/OSD/OSD_Environment.hxx index a7d05ec52e..adcff00d4d 100644 --- a/src/OSD/OSD_Environment.hxx +++ b/src/OSD/OSD_Environment.hxx @@ -25,10 +25,6 @@ #include #include #include -class Standard_ConstructionError; -class Standard_NullObject; -class OSD_OSDError; -class TCollection_AsciiString; //! Management of system environment variables diff --git a/src/OSD/OSD_Error.hxx b/src/OSD/OSD_Error.hxx index 71d6c12dd5..accd66e392 100644 --- a/src/OSD/OSD_Error.hxx +++ b/src/OSD/OSD_Error.hxx @@ -25,8 +25,6 @@ #include #include #include -class OSD_OSDError; -class TCollection_AsciiString; //! Accurate management of OSD specific errors. diff --git a/src/OSD/OSD_File.hxx b/src/OSD/OSD_File.hxx index 122aa3c48f..7f73d0e2fd 100644 --- a/src/OSD/OSD_File.hxx +++ b/src/OSD/OSD_File.hxx @@ -23,7 +23,6 @@ #include #include -class Standard_ProgramError; class OSD_Path; class OSD_Protection; diff --git a/src/OSD/OSD_FileIterator.hxx b/src/OSD/OSD_FileIterator.hxx index ae98b10f17..aa9bc78a3c 100644 --- a/src/OSD/OSD_FileIterator.hxx +++ b/src/OSD/OSD_FileIterator.hxx @@ -21,9 +21,7 @@ #include #include -class OSD_OSDError; class OSD_Path; -class OSD_File; //! Manages a breadth-only search for files in the specified Path. //! There is no specific order of results. diff --git a/src/OSD/OSD_FileNode.hxx b/src/OSD/OSD_FileNode.hxx index f04055e6fa..b87c765f8d 100644 --- a/src/OSD/OSD_FileNode.hxx +++ b/src/OSD/OSD_FileNode.hxx @@ -22,8 +22,6 @@ #include #include -class OSD_OSDError; -class Standard_ProgramError; class OSD_Protection; class Quantity_Date; diff --git a/src/OSD/OSD_Host.hxx b/src/OSD/OSD_Host.hxx index c243fafcd0..385fb809ab 100644 --- a/src/OSD/OSD_Host.hxx +++ b/src/OSD/OSD_Host.hxx @@ -27,10 +27,6 @@ #include #include #include -class Standard_ConstructionError; -class Standard_NullObject; -class OSD_OSDError; -class TCollection_AsciiString; //! Carries information about a Host diff --git a/src/OSD/OSD_Process.hxx b/src/OSD/OSD_Process.hxx index 70707fdeec..65fca9e39e 100644 --- a/src/OSD/OSD_Process.hxx +++ b/src/OSD/OSD_Process.hxx @@ -24,7 +24,6 @@ #include #include -class OSD_OSDError; class Quantity_Date; class OSD_Path; diff --git a/src/OSD/OSD_Protection.hxx b/src/OSD/OSD_Protection.hxx index 103f0e0c39..db88d0f6d2 100644 --- a/src/OSD/OSD_Protection.hxx +++ b/src/OSD/OSD_Protection.hxx @@ -23,9 +23,6 @@ #include #include -class OSD_FileNode; -class OSD_File; -class OSD_Directory; //! This class provides data to manage file protection diff --git a/src/OpenGl/OpenGl_CappingAlgo.hxx b/src/OpenGl/OpenGl_CappingAlgo.hxx index bc885a1bd1..122ef1d535 100755 --- a/src/OpenGl/OpenGl_CappingAlgo.hxx +++ b/src/OpenGl/OpenGl_CappingAlgo.hxx @@ -19,7 +19,6 @@ #include // Forward declaration -class OpenGl_CappingPlaneResource; class OpenGl_Structure; //! Capping surface rendering algorithm. diff --git a/src/OpenGl/OpenGl_Context.hxx b/src/OpenGl/OpenGl_Context.hxx index e0cf8cdf1e..82d1891942 100644 --- a/src/OpenGl/OpenGl_Context.hxx +++ b/src/OpenGl/OpenGl_Context.hxx @@ -96,7 +96,6 @@ class Graphic3d_Camera; class Graphic3d_PresentationAttributes; class OpenGl_Aspects; class OpenGl_FrameBuffer; -class OpenGl_Sampler; class OpenGl_ShaderProgram; class OpenGl_ShaderManager; class OpenGl_FrameStats; diff --git a/src/OpenGl/OpenGl_GraduatedTrihedron.hxx b/src/OpenGl/OpenGl_GraduatedTrihedron.hxx index 25605af30f..85528615ca 100755 --- a/src/OpenGl/OpenGl_GraduatedTrihedron.hxx +++ b/src/OpenGl/OpenGl_GraduatedTrihedron.hxx @@ -26,7 +26,6 @@ #include #include -class OpenGl_View; //! This class allows to render Graduated Trihedron, i.e. trihedron with grid. //! it is based on Graphic3d_GraduatedTrihedron parameters and support its customization diff --git a/src/OpenGl/OpenGl_GraphicDriver.hxx b/src/OpenGl/OpenGl_GraphicDriver.hxx index b8ceb33c9f..3cdbe91fe4 100644 --- a/src/OpenGl/OpenGl_GraphicDriver.hxx +++ b/src/OpenGl/OpenGl_GraphicDriver.hxx @@ -27,7 +27,6 @@ #include class Aspect_Window; -class Quantity_Color; class OpenGl_Structure; class OpenGl_View; class OpenGl_Window; diff --git a/src/OpenGl/OpenGl_Group.hxx b/src/OpenGl/OpenGl_Group.hxx index 92fe762321..8f04a6ae3a 100644 --- a/src/OpenGl/OpenGl_Group.hxx +++ b/src/OpenGl/OpenGl_Group.hxx @@ -23,7 +23,6 @@ #include #include -class OpenGl_Group; class OpenGl_Structure; struct OpenGl_ElementNode diff --git a/src/OpenGl/OpenGl_Resource.hxx b/src/OpenGl/OpenGl_Resource.hxx index 97c4e5bafd..eea4afdc26 100644 --- a/src/OpenGl/OpenGl_Resource.hxx +++ b/src/OpenGl/OpenGl_Resource.hxx @@ -18,7 +18,6 @@ #include -class Standard_Transient; class OpenGl_Context; //! Interface for OpenGl resource with following meaning: diff --git a/src/OpenGl/OpenGl_SceneGeometry.hxx b/src/OpenGl/OpenGl_SceneGeometry.hxx index fe48c89760..05705962f5 100644 --- a/src/OpenGl/OpenGl_SceneGeometry.hxx +++ b/src/OpenGl/OpenGl_SceneGeometry.hxx @@ -26,8 +26,6 @@ class OpenGl_Element; struct OpenGl_ElementNode; class OpenGl_Group; -class OpenGl_Structure; -class OpenGl_PrimitiveArray; namespace OpenGl_Raytrace { diff --git a/src/OpenGl/OpenGl_ShaderManager.hxx b/src/OpenGl/OpenGl_ShaderManager.hxx index 44d07b4f2a..22cc1b339a 100644 --- a/src/OpenGl/OpenGl_ShaderManager.hxx +++ b/src/OpenGl/OpenGl_ShaderManager.hxx @@ -28,7 +28,6 @@ #include #include -class OpenGl_View; class OpenGl_VertexBuffer; //! List of shader programs. diff --git a/src/OpenGl/OpenGl_Structure.hxx b/src/OpenGl/OpenGl_Structure.hxx index bf5b19566e..4fb5d988a0 100644 --- a/src/OpenGl/OpenGl_Structure.hxx +++ b/src/OpenGl/OpenGl_Structure.hxx @@ -28,7 +28,6 @@ #include -class OpenGl_GraphicDriver; DEFINE_STANDARD_HANDLE(OpenGl_Structure, Graphic3d_CStructure) typedef NCollection_List OpenGl_ListOfStructure; diff --git a/src/OpenGl/OpenGl_Texture.hxx b/src/OpenGl/OpenGl_Texture.hxx index 4a5630db5a..17aa05ab22 100644 --- a/src/OpenGl/OpenGl_Texture.hxx +++ b/src/OpenGl/OpenGl_Texture.hxx @@ -23,8 +23,6 @@ #include #include -class Graphic3d_TextureParams; -class Image_PixMap; //! Texture resource. class OpenGl_Texture : public OpenGl_NamedResource diff --git a/src/OpenGl/OpenGl_View.hxx b/src/OpenGl/OpenGl_View.hxx index ae01da4996..32b1f8043b 100644 --- a/src/OpenGl/OpenGl_View.hxx +++ b/src/OpenGl/OpenGl_View.hxx @@ -39,15 +39,12 @@ class OpenGl_BackgroundArray; class OpenGl_DepthPeeling; -class OpenGl_GraphicDriver; class OpenGl_PBREnvironment; struct OpenGl_RaytraceMaterial; -class OpenGl_StateCounter; class OpenGl_ShadowMap; class OpenGl_ShadowMapArray; class OpenGl_ShaderObject; class OpenGl_TextureBuffer; -class OpenGl_TriangleSet; class OpenGl_Workspace; DEFINE_STANDARD_HANDLE(OpenGl_View,Graphic3d_CView) diff --git a/src/PCDM/PCDM.hxx b/src/PCDM/PCDM.hxx index 30bf4fc7d3..2c433da98d 100644 --- a/src/PCDM/PCDM.hxx +++ b/src/PCDM/PCDM.hxx @@ -20,8 +20,6 @@ #include #include -class CDM_Document; -class PCDM_StorageDriver; class TCollection_AsciiString; class PCDM diff --git a/src/PCDM/PCDM_Reader.hxx b/src/PCDM/PCDM_Reader.hxx index 7621070936..4c5b11e23f 100644 --- a/src/PCDM/PCDM_Reader.hxx +++ b/src/PCDM/PCDM_Reader.hxx @@ -26,7 +26,6 @@ #include #include -class PCDM_DriverError; class CDM_Document; class TCollection_ExtendedString; class CDM_Application; diff --git a/src/PCDM/PCDM_Reference.hxx b/src/PCDM/PCDM_Reference.hxx index 8a53bcc9ae..cfd9ceec99 100644 --- a/src/PCDM/PCDM_Reference.hxx +++ b/src/PCDM/PCDM_Reference.hxx @@ -23,7 +23,6 @@ #include #include -class TCollection_ExtendedString; diff --git a/src/PCDM/PCDM_RetrievalDriver.hxx b/src/PCDM/PCDM_RetrievalDriver.hxx index 060e9cd0d3..8976ffc075 100644 --- a/src/PCDM/PCDM_RetrievalDriver.hxx +++ b/src/PCDM/PCDM_RetrievalDriver.hxx @@ -26,8 +26,6 @@ class CDM_MetaData; class Message_Messenger; -class TCollection_AsciiString; -class TCollection_ExtendedString; class PCDM_RetrievalDriver; DEFINE_STANDARD_HANDLE(PCDM_RetrievalDriver, PCDM_Reader) diff --git a/src/PCDM/PCDM_StorageDriver.hxx b/src/PCDM/PCDM_StorageDriver.hxx index 711a8c21c0..03852b2b92 100644 --- a/src/PCDM/PCDM_StorageDriver.hxx +++ b/src/PCDM/PCDM_StorageDriver.hxx @@ -26,12 +26,8 @@ #include #include #include -class Standard_NoSuchObject; -class PCDM_DriverError; class PCDM_Document; class CDM_Document; -class TCollection_ExtendedString; -class Storage_Schema; class PCDM_StorageDriver; diff --git a/src/PCDM/PCDM_Writer.hxx b/src/PCDM/PCDM_Writer.hxx index 2fd3e2d98a..cf57027f88 100644 --- a/src/PCDM/PCDM_Writer.hxx +++ b/src/PCDM/PCDM_Writer.hxx @@ -24,7 +24,6 @@ #include -class PCDM_DriverError; class CDM_Document; class TCollection_ExtendedString; diff --git a/src/PLib/PLib.hxx b/src/PLib/PLib.hxx index bc51ce9ce6..4f2a27a08d 100644 --- a/src/PLib/PLib.hxx +++ b/src/PLib/PLib.hxx @@ -31,10 +31,6 @@ #include #include class math_Matrix; -class PLib_Base; -class PLib_JacobiPolynomial; -class PLib_HermitJacobi; -class PLib_DoubleJacobiPolynomial; //! PLib means Polynomial functions library. This pk diff --git a/src/PLib/PLib_HermitJacobi.hxx b/src/PLib/PLib_HermitJacobi.hxx index b06acbe8c4..1cf119dfbd 100644 --- a/src/PLib/PLib_HermitJacobi.hxx +++ b/src/PLib/PLib_HermitJacobi.hxx @@ -27,7 +27,6 @@ #include #include class PLib_JacobiPolynomial; -class Standard_ConstructionError; class PLib_HermitJacobi; diff --git a/src/PLib/PLib_JacobiPolynomial.hxx b/src/PLib/PLib_JacobiPolynomial.hxx index 95acc2f63b..84f5e522f3 100644 --- a/src/PLib/PLib_JacobiPolynomial.hxx +++ b/src/PLib/PLib_JacobiPolynomial.hxx @@ -27,7 +27,6 @@ #include #include #include -class Standard_ConstructionError; class PLib_JacobiPolynomial; diff --git a/src/Plate/Plate_D1.hxx b/src/Plate/Plate_D1.hxx index f0c277b4d2..151dea3ab7 100644 --- a/src/Plate/Plate_D1.hxx +++ b/src/Plate/Plate_D1.hxx @@ -22,9 +22,6 @@ #include #include -class Plate_GtoCConstraint; -class Plate_FreeGtoCConstraint; -class gp_XYZ; //! define an order 1 derivatives of a 3d valued diff --git a/src/Plate/Plate_D2.hxx b/src/Plate/Plate_D2.hxx index 0934500ec0..4b618d06f2 100644 --- a/src/Plate/Plate_D2.hxx +++ b/src/Plate/Plate_D2.hxx @@ -22,9 +22,6 @@ #include #include -class Plate_GtoCConstraint; -class Plate_FreeGtoCConstraint; -class gp_XYZ; //! define an order 2 derivatives of a 3d valued diff --git a/src/Plate/Plate_D3.hxx b/src/Plate/Plate_D3.hxx index e74fb36fbb..c2b496776b 100644 --- a/src/Plate/Plate_D3.hxx +++ b/src/Plate/Plate_D3.hxx @@ -22,9 +22,6 @@ #include #include -class Plate_GtoCConstraint; -class Plate_FreeGtoCConstraint; -class gp_XYZ; //! define an order 3 derivatives of a 3d valued diff --git a/src/Plate/Plate_FreeGtoCConstraint.hxx b/src/Plate/Plate_FreeGtoCConstraint.hxx index 06112cde6f..b4f3f1dfbe 100644 --- a/src/Plate/Plate_FreeGtoCConstraint.hxx +++ b/src/Plate/Plate_FreeGtoCConstraint.hxx @@ -26,12 +26,9 @@ #include #include #include -class gp_XY; class Plate_D1; class Plate_D2; class Plate_D3; -class Plate_PinpointConstraint; -class Plate_LinearScalarConstraint; //! define a G1, G2 or G3 constraint on the Plate using weaker diff --git a/src/Plate/Plate_GlobalTranslationConstraint.hxx b/src/Plate/Plate_GlobalTranslationConstraint.hxx index 62abbf08fd..d46b4820ca 100644 --- a/src/Plate/Plate_GlobalTranslationConstraint.hxx +++ b/src/Plate/Plate_GlobalTranslationConstraint.hxx @@ -23,7 +23,6 @@ #include #include -class Plate_LinearXYZConstraint; //! force a set of UV points to translate without deformation diff --git a/src/Plate/Plate_GtoCConstraint.hxx b/src/Plate/Plate_GtoCConstraint.hxx index 4340630844..01924b3c32 100644 --- a/src/Plate/Plate_GtoCConstraint.hxx +++ b/src/Plate/Plate_GtoCConstraint.hxx @@ -25,12 +25,9 @@ #include #include #include -class gp_XY; -class Plate_D1; class gp_XYZ; class Plate_D2; class Plate_D3; -class Plate_PinpointConstraint; //! define a G1, G2 or G3 constraint on the Plate diff --git a/src/Plate/Plate_LineConstraint.hxx b/src/Plate/Plate_LineConstraint.hxx index f854c480a2..651a126f1b 100644 --- a/src/Plate/Plate_LineConstraint.hxx +++ b/src/Plate/Plate_LineConstraint.hxx @@ -25,7 +25,6 @@ #include class gp_XY; class gp_Lin; -class Plate_LinearScalarConstraint; //! constraint a point to belong to a straight line diff --git a/src/Plate/Plate_LinearScalarConstraint.hxx b/src/Plate/Plate_LinearScalarConstraint.hxx index c64239ba64..6b58e4bf08 100644 --- a/src/Plate/Plate_LinearScalarConstraint.hxx +++ b/src/Plate/Plate_LinearScalarConstraint.hxx @@ -27,8 +27,6 @@ #include #include #include -class Standard_DimensionMismatch; -class Standard_OutOfRange; class Plate_PinpointConstraint; class gp_XYZ; diff --git a/src/Plate/Plate_LinearXYZConstraint.hxx b/src/Plate/Plate_LinearXYZConstraint.hxx index c6e16700c1..6f6d0badc6 100644 --- a/src/Plate/Plate_LinearXYZConstraint.hxx +++ b/src/Plate/Plate_LinearXYZConstraint.hxx @@ -28,8 +28,6 @@ #include #include #include -class Standard_DimensionMismatch; -class Standard_OutOfRange; class Plate_PinpointConstraint; diff --git a/src/Plate/Plate_PinpointConstraint.hxx b/src/Plate/Plate_PinpointConstraint.hxx index 37442ee20c..9be2003e9e 100644 --- a/src/Plate/Plate_PinpointConstraint.hxx +++ b/src/Plate/Plate_PinpointConstraint.hxx @@ -24,8 +24,6 @@ #include #include #include -class gp_XY; -class gp_XYZ; //! define a constraint on the Plate diff --git a/src/Plate/Plate_PlaneConstraint.hxx b/src/Plate/Plate_PlaneConstraint.hxx index 65f894bb4f..ccb8a2b681 100644 --- a/src/Plate/Plate_PlaneConstraint.hxx +++ b/src/Plate/Plate_PlaneConstraint.hxx @@ -25,7 +25,6 @@ #include class gp_XY; class gp_Pln; -class Plate_LinearScalarConstraint; //! constraint a point to belong to a Plane diff --git a/src/Plate/Plate_SampledCurveConstraint.hxx b/src/Plate/Plate_SampledCurveConstraint.hxx index e1d74add4f..e4c5c61101 100644 --- a/src/Plate/Plate_SampledCurveConstraint.hxx +++ b/src/Plate/Plate_SampledCurveConstraint.hxx @@ -24,8 +24,6 @@ #include #include #include -class Standard_DimensionMismatch; -class Plate_LinearXYZConstraint; //! define m PinPointConstraint driven by m unknown diff --git a/src/Plugin/Plugin.hxx b/src/Plugin/Plugin.hxx index 4d6294c02a..b8cafae45f 100644 --- a/src/Plugin/Plugin.hxx +++ b/src/Plugin/Plugin.hxx @@ -24,7 +24,6 @@ #include class Standard_Transient; class Standard_GUID; -class Resource_Manager; class Plugin { diff --git a/src/Poly/Poly.hxx b/src/Poly/Poly.hxx index e9d4a6a00f..9c9b95cd7b 100644 --- a/src/Poly/Poly.hxx +++ b/src/Poly/Poly.hxx @@ -30,13 +30,7 @@ class Poly_Triangulation; class Poly_Polygon3D; class Poly_Polygon2D; -class gp_XY; class Poly_Triangle; -class Poly_Triangulation; -class Poly_Polygon3D; -class Poly_Polygon2D; -class Poly_PolygonOnTriangulation; -class Poly_Connect; //! This package provides classes and services to diff --git a/src/Poly/Poly_CoherentLink.hxx b/src/Poly/Poly_CoherentLink.hxx index 4ac047149d..0aa88538f6 100644 --- a/src/Poly/Poly_CoherentLink.hxx +++ b/src/Poly/Poly_CoherentLink.hxx @@ -19,7 +19,6 @@ #include class Poly_CoherentTriangle; -class Poly_CoherentTriangulation; /** * Link between two mesh nodes that is created by existing triangle(s). diff --git a/src/Poly/Poly_CoherentTriangle.hxx b/src/Poly/Poly_CoherentTriangle.hxx index 90e48c81a9..bb973544d9 100644 --- a/src/Poly/Poly_CoherentTriangle.hxx +++ b/src/Poly/Poly_CoherentTriangle.hxx @@ -18,7 +18,6 @@ #include -class Poly_CoherentTrianguation; class Poly_CoherentLink; /** diff --git a/src/Poly/Poly_CoherentTriangulation.hxx b/src/Poly/Poly_CoherentTriangulation.hxx index dfda4b5ebb..d45736f956 100644 --- a/src/Poly/Poly_CoherentTriangulation.hxx +++ b/src/Poly/Poly_CoherentTriangulation.hxx @@ -34,7 +34,6 @@ typedef NCollection_Vector::Iterator //! Definition of HANDLE object using Standard_DefineHandle.hxx #include -class Poly_CoherentTriangulation; DEFINE_STANDARD_HANDLE (Poly_CoherentTriangulation, Standard_Transient) /** diff --git a/src/ProjLib/ProjLib_Cone.hxx b/src/ProjLib/ProjLib_Cone.hxx index 6186abf688..291db56b83 100644 --- a/src/ProjLib/ProjLib_Cone.hxx +++ b/src/ProjLib/ProjLib_Cone.hxx @@ -23,8 +23,6 @@ #include #include -class Standard_NoSuchObject; -class gp_Cone; class gp_Lin; class gp_Circ; class gp_Elips; diff --git a/src/ProjLib/ProjLib_Cylinder.hxx b/src/ProjLib/ProjLib_Cylinder.hxx index 1fb88e8f41..8cbe35e961 100644 --- a/src/ProjLib/ProjLib_Cylinder.hxx +++ b/src/ProjLib/ProjLib_Cylinder.hxx @@ -23,8 +23,6 @@ #include #include -class Standard_NoSuchObject; -class gp_Cylinder; class gp_Lin; class gp_Circ; class gp_Elips; diff --git a/src/ProjLib/ProjLib_Plane.hxx b/src/ProjLib/ProjLib_Plane.hxx index 85c283b6b7..c5e6cacd8c 100644 --- a/src/ProjLib/ProjLib_Plane.hxx +++ b/src/ProjLib/ProjLib_Plane.hxx @@ -23,8 +23,6 @@ #include #include -class Standard_NoSuchObject; -class gp_Pln; class gp_Lin; class gp_Circ; class gp_Elips; diff --git a/src/ProjLib/ProjLib_ProjectOnPlane.hxx b/src/ProjLib/ProjLib_ProjectOnPlane.hxx index 1fc5e228dc..d885bb5ee8 100644 --- a/src/ProjLib/ProjLib_ProjectOnPlane.hxx +++ b/src/ProjLib/ProjLib_ProjectOnPlane.hxx @@ -26,13 +26,6 @@ #include #include -class Standard_OutOfRange; -class Standard_NoSuchObject; -class Standard_DomainError; -class Standard_ConstructionError; -class Standard_NotImplemented; -class gp_Ax3; -class gp_Dir; class gp_Pnt; class gp_Vec; class gp_Lin; diff --git a/src/ProjLib/ProjLib_Projector.hxx b/src/ProjLib/ProjLib_Projector.hxx index 36a92b76ba..13f24aec36 100644 --- a/src/ProjLib/ProjLib_Projector.hxx +++ b/src/ProjLib/ProjLib_Projector.hxx @@ -31,13 +31,6 @@ #include class Geom2d_BSplineCurve; class Geom2d_BezierCurve; -class Standard_NoSuchObject; -class Standard_NotImplemented; -class gp_Lin2d; -class gp_Circ2d; -class gp_Elips2d; -class gp_Hypr2d; -class gp_Parab2d; class gp_Lin; class gp_Circ; class gp_Elips; diff --git a/src/ProjLib/ProjLib_Sphere.hxx b/src/ProjLib/ProjLib_Sphere.hxx index f30ccf8b13..f0e4006215 100644 --- a/src/ProjLib/ProjLib_Sphere.hxx +++ b/src/ProjLib/ProjLib_Sphere.hxx @@ -24,8 +24,6 @@ #include #include #include -class Standard_NoSuchObject; -class gp_Sphere; class gp_Circ; class gp_Lin; class gp_Elips; diff --git a/src/ProjLib/ProjLib_Torus.hxx b/src/ProjLib/ProjLib_Torus.hxx index 95635639ae..d103dc1599 100644 --- a/src/ProjLib/ProjLib_Torus.hxx +++ b/src/ProjLib/ProjLib_Torus.hxx @@ -23,8 +23,6 @@ #include #include -class Standard_NoSuchObject; -class gp_Torus; class gp_Circ; class gp_Lin; class gp_Elips; diff --git a/src/PrsDim/PrsDim_IdenticRelation.hxx b/src/PrsDim/PrsDim_IdenticRelation.hxx index 1ae3167a15..d315cb8dba 100644 --- a/src/PrsDim/PrsDim_IdenticRelation.hxx +++ b/src/PrsDim/PrsDim_IdenticRelation.hxx @@ -26,7 +26,6 @@ class TopoDS_Shape; class Geom_Plane; class Geom_Line; -class gp_Pnt; class Geom_Circle; class Geom_Ellipse; class TopoDS_Wire; diff --git a/src/PrsDim/PrsDim_MidPointRelation.hxx b/src/PrsDim/PrsDim_MidPointRelation.hxx index cc3ed5b027..f2ae39d7a4 100644 --- a/src/PrsDim/PrsDim_MidPointRelation.hxx +++ b/src/PrsDim/PrsDim_MidPointRelation.hxx @@ -20,7 +20,6 @@ class Geom_Plane; class gp_Lin; -class gp_Pnt; class gp_Circ; class gp_Elips; diff --git a/src/PrsMgr/PrsMgr_Presentation.hxx b/src/PrsMgr/PrsMgr_Presentation.hxx index f2295b02ca..e9013924ff 100644 --- a/src/PrsMgr/PrsMgr_Presentation.hxx +++ b/src/PrsMgr/PrsMgr_Presentation.hxx @@ -22,11 +22,8 @@ class PrsMgr_PresentationManager; class PrsMgr_PresentableObject; -class Quantity_Color; class Graphic3d_Camera; class Prs3d_Drawer; -class Graphic3d_Structure; -class Graphic3d_DataStructureManager; DEFINE_STANDARD_HANDLE(PrsMgr_Presentation, Graphic3d_Structure) diff --git a/src/QABugs/QABugs.hxx b/src/QABugs/QABugs.hxx index a04340e6aa..d4439d63ae 100644 --- a/src/QABugs/QABugs.hxx +++ b/src/QABugs/QABugs.hxx @@ -21,8 +21,6 @@ #include #include -class QABugs_MyText; -class QABugs_PresentableObject; diff --git a/src/Quantity/Quantity_Date.hxx b/src/Quantity/Quantity_Date.hxx index 7767d7b3c3..b00a6698ef 100644 --- a/src/Quantity/Quantity_Date.hxx +++ b/src/Quantity/Quantity_Date.hxx @@ -23,8 +23,6 @@ #include #include -class Quantity_DateDefinitionError; -class Standard_OutOfRange; class Quantity_Period; //! This class provides services to manage date information. diff --git a/src/Quantity/Quantity_Period.hxx b/src/Quantity/Quantity_Period.hxx index 81c126b45b..1b3f8a5bed 100644 --- a/src/Quantity/Quantity_Period.hxx +++ b/src/Quantity/Quantity_Period.hxx @@ -23,7 +23,6 @@ #include #include -class Quantity_PeriodDefinitionError; //! Manages date intervals. For example, a Period object //! gives the interval between two dates. diff --git a/src/RWGltf/RWGltf_GltfJsonParser.hxx b/src/RWGltf/RWGltf_GltfJsonParser.hxx index 7fcb5bce51..234f4bf661 100644 --- a/src/RWGltf/RWGltf_GltfJsonParser.hxx +++ b/src/RWGltf/RWGltf_GltfJsonParser.hxx @@ -52,7 +52,6 @@ typedef rapidjson::Document::ValueType RWGltf_JsonValue; #endif -class Message_ProgressIndicator; //! INTERNAL tool for parsing glTF document (JSON structure). class RWGltf_GltfJsonParser diff --git a/src/RWHeaderSection/RWHeaderSection.hxx b/src/RWHeaderSection/RWHeaderSection.hxx index 2e92eeb9ab..5d8204cc11 100644 --- a/src/RWHeaderSection/RWHeaderSection.hxx +++ b/src/RWHeaderSection/RWHeaderSection.hxx @@ -21,11 +21,6 @@ #include #include -class RWHeaderSection_ReadWriteModule; -class RWHeaderSection_GeneralModule; -class RWHeaderSection_RWFileName; -class RWHeaderSection_RWFileDescription; -class RWHeaderSection_RWFileSchema; diff --git a/src/RWStepAP214/RWStepAP214.hxx b/src/RWStepAP214/RWStepAP214.hxx index af59444314..9ad95d3db8 100644 --- a/src/RWStepAP214/RWStepAP214.hxx +++ b/src/RWStepAP214/RWStepAP214.hxx @@ -21,34 +21,6 @@ #include #include -class RWStepAP214_ReadWriteModule; -class RWStepAP214_GeneralModule; -class RWStepAP214_RWAutoDesignActualDateAndTimeAssignment; -class RWStepAP214_RWAutoDesignActualDateAssignment; -class RWStepAP214_RWAutoDesignApprovalAssignment; -class RWStepAP214_RWAutoDesignDateAndPersonAssignment; -class RWStepAP214_RWAutoDesignGroupAssignment; -class RWStepAP214_RWAutoDesignNominalDateAndTimeAssignment; -class RWStepAP214_RWAutoDesignNominalDateAssignment; -class RWStepAP214_RWAutoDesignOrganizationAssignment; -class RWStepAP214_RWAutoDesignPersonAndOrganizationAssignment; -class RWStepAP214_RWAutoDesignPresentedItem; -class RWStepAP214_RWAutoDesignSecurityClassificationAssignment; -class RWStepAP214_RWAutoDesignDocumentReference; -class RWStepAP214_RWAppliedDateAndTimeAssignment; -class RWStepAP214_RWAppliedDateAssignment; -class RWStepAP214_RWAppliedApprovalAssignment; -class RWStepAP214_RWAppliedGroupAssignment; -class RWStepAP214_RWAppliedOrganizationAssignment; -class RWStepAP214_RWAppliedPersonAndOrganizationAssignment; -class RWStepAP214_RWAppliedPresentedItem; -class RWStepAP214_RWAppliedSecurityClassificationAssignment; -class RWStepAP214_RWAppliedDocumentReference; -class RWStepAP214_RWAppliedExternalIdentificationAssignment; -class RWStepAP214_RWClass; -class RWStepAP214_RWExternallyDefinedClass; -class RWStepAP214_RWExternallyDefinedGeneralProperty; -class RWStepAP214_RWRepItemGroup; diff --git a/src/RWStepDimTol/RWStepDimTol_RWDatumReferenceModifierWithValue.hxx b/src/RWStepDimTol/RWStepDimTol_RWDatumReferenceModifierWithValue.hxx index d4ed3fb93e..1a15910e49 100644 --- a/src/RWStepDimTol/RWStepDimTol_RWDatumReferenceModifierWithValue.hxx +++ b/src/RWStepDimTol/RWStepDimTol_RWDatumReferenceModifierWithValue.hxx @@ -26,7 +26,6 @@ class StepData_StepReaderData; class Interface_Check; class StepDimTol_DatumReferenceModifierWithValue; class StepData_StepWriter; -class Interface_EntityIterator; //! Read & Write tool for DatumReferenceModifierWithValue diff --git a/src/RWStepVisual/RWStepVisual_RWCoordinatesList.hxx b/src/RWStepVisual/RWStepVisual_RWCoordinatesList.hxx index 1d122062f4..791a4facfd 100644 --- a/src/RWStepVisual/RWStepVisual_RWCoordinatesList.hxx +++ b/src/RWStepVisual/RWStepVisual_RWCoordinatesList.hxx @@ -25,7 +25,6 @@ class Interface_Check; class StepVisual_CoordinatesList; class StepData_StepWriter; -class Interface_EntityIterator; //! Read & Write Module for AnnotationOccurrence class RWStepVisual_RWCoordinatesList diff --git a/src/RWStepVisual/RWStepVisual_RWSurfaceStyleTransparent.hxx b/src/RWStepVisual/RWStepVisual_RWSurfaceStyleTransparent.hxx index c5386fdef7..1f2069b79d 100644 --- a/src/RWStepVisual/RWStepVisual_RWSurfaceStyleTransparent.hxx +++ b/src/RWStepVisual/RWStepVisual_RWSurfaceStyleTransparent.hxx @@ -27,7 +27,6 @@ class Interface_Check; class StepData_StepWriter; class Interface_EntityIterator; class StepVisual_SurfaceStyleTransparent; -class Interface_EntityIterator; //! Read & Write tool for SurfaceStyleTransparent class RWStepVisual_RWSurfaceStyleTransparent diff --git a/src/RWStepVisual/RWStepVisual_RWTessellatedItem.hxx b/src/RWStepVisual/RWStepVisual_RWTessellatedItem.hxx index 800eb25551..c037f73eb2 100644 --- a/src/RWStepVisual/RWStepVisual_RWTessellatedItem.hxx +++ b/src/RWStepVisual/RWStepVisual_RWTessellatedItem.hxx @@ -25,7 +25,6 @@ class StepData_StepReaderData; class Interface_Check; class StepVisual_TessellatedItem; class StepData_StepWriter; -class Interface_EntityIterator; //! Read & Write Module for AnnotationOccurrence class RWStepVisual_RWTessellatedItem diff --git a/src/Resource/Resource_Manager.hxx b/src/Resource/Resource_Manager.hxx index a0d965a6c2..7697ad29bd 100644 --- a/src/Resource/Resource_Manager.hxx +++ b/src/Resource/Resource_Manager.hxx @@ -29,10 +29,6 @@ #include #include #include -class Standard_TypeMismatch; -class Resource_NoSuchResource; -class Standard_OutOfRange; -class TCollection_AsciiString; class Resource_Manager; diff --git a/src/STEPCAFControl/STEPCAFControl_ExternFile.hxx b/src/STEPCAFControl/STEPCAFControl_ExternFile.hxx index 8edd1a9d0a..33c89d8e79 100644 --- a/src/STEPCAFControl/STEPCAFControl_ExternFile.hxx +++ b/src/STEPCAFControl/STEPCAFControl_ExternFile.hxx @@ -25,7 +25,6 @@ #include class XSControl_WorkSession; class TCollection_HAsciiString; -class TDF_Label; class STEPCAFControl_ExternFile; diff --git a/src/STEPCAFControl/STEPCAFControl_Reader.hxx b/src/STEPCAFControl/STEPCAFControl_Reader.hxx index 355acdd57f..139df9cdab 100644 --- a/src/STEPCAFControl/STEPCAFControl_Reader.hxx +++ b/src/STEPCAFControl/STEPCAFControl_Reader.hxx @@ -30,10 +30,7 @@ class XSControl_WorkSession; class TDocStd_Document; -class TCollection_AsciiString; class STEPCAFControl_ExternFile; -class STEPControl_Reader; -class TDF_Label; class TopoDS_Shape; class XCAFDoc_ShapeTool; class StepRepr_RepresentationItem; diff --git a/src/STEPCAFControl/STEPCAFControl_Writer.hxx b/src/STEPCAFControl/STEPCAFControl_Writer.hxx index f571852976..b021e05af1 100644 --- a/src/STEPCAFControl/STEPCAFControl_Writer.hxx +++ b/src/STEPCAFControl/STEPCAFControl_Writer.hxx @@ -37,7 +37,6 @@ class XSControl_WorkSession; class TDocStd_Document; -class TCollection_AsciiString; class STEPCAFControl_ExternFile; class TopoDS_Shape; diff --git a/src/STEPConstruct/STEPConstruct.hxx b/src/STEPConstruct/STEPConstruct.hxx index 77fd7ff935..a178a3985b 100644 --- a/src/STEPConstruct/STEPConstruct.hxx +++ b/src/STEPConstruct/STEPConstruct.hxx @@ -30,16 +30,6 @@ class Transfer_TransientProcess; class Transfer_Binder; class StepShape_ShapeDefinitionRepresentation; class StepShape_ContextDependentShapeRepresentation; -class STEPConstruct_Tool; -class STEPConstruct_UnitContext; -class STEPConstruct_Part; -class STEPConstruct_Assembly; -class STEPConstruct_Styles; -class STEPConstruct_ValidationProps; -class STEPConstruct_ExternRefs; -class STEPConstruct_AP203Context; -class STEPConstruct_ContextTool; -class STEPConstruct_PointHasher; //! Defines tools for creation and investigation STEP constructs diff --git a/src/STEPConstruct/STEPConstruct_Assembly.hxx b/src/STEPConstruct/STEPConstruct_Assembly.hxx index 5bee240a49..30e35922f9 100644 --- a/src/STEPConstruct/STEPConstruct_Assembly.hxx +++ b/src/STEPConstruct/STEPConstruct_Assembly.hxx @@ -24,10 +24,8 @@ #include class StepShape_ShapeDefinitionRepresentation; class StepShape_ShapeRepresentation; -class Standard_Transient; class StepGeom_Axis2Placement3d; class StepRepr_NextAssemblyUsageOccurrence; -class Interface_InterfaceModel; class StepShape_ContextDependentShapeRepresentation; class Interface_Graph; diff --git a/src/STEPConstruct/STEPConstruct_ContextTool.hxx b/src/STEPConstruct/STEPConstruct_ContextTool.hxx index ed024587ac..3f5da89e97 100644 --- a/src/STEPConstruct/STEPConstruct_ContextTool.hxx +++ b/src/STEPConstruct/STEPConstruct_ContextTool.hxx @@ -30,7 +30,6 @@ class StepBasic_ApplicationProtocolDefinition; class StepGeom_Axis2Placement3d; class StepData_StepModel; class TCollection_HAsciiString; -class STEPConstruct_AP203Context; class STEPConstruct_Part; class STEPConstruct_Assembly; diff --git a/src/STEPControl/STEPControl_Controller.hxx b/src/STEPControl/STEPControl_Controller.hxx index 648ac51ee2..4a8e050fc2 100644 --- a/src/STEPControl/STEPControl_Controller.hxx +++ b/src/STEPControl/STEPControl_Controller.hxx @@ -25,7 +25,6 @@ #include #include class Interface_InterfaceModel; -class Transfer_ActorOfTransientProcess; class XSControl_WorkSession; class TopoDS_Shape; class Transfer_FinderProcess; diff --git a/src/STEPEdit/STEPEdit.hxx b/src/STEPEdit/STEPEdit.hxx index 5e323a6ba6..89e7b09830 100644 --- a/src/STEPEdit/STEPEdit.hxx +++ b/src/STEPEdit/STEPEdit.hxx @@ -25,8 +25,6 @@ class Interface_Protocol; class StepData_StepModel; class IFSelect_Signature; class IFSelect_SelectSignature; -class STEPEdit_EditContext; -class STEPEdit_EditSDR; //! Provides tools to exploit and edit a set of STEP data : diff --git a/src/Select3D/Select3D_InteriorSensitivePointSet.hxx b/src/Select3D/Select3D_InteriorSensitivePointSet.hxx index a43040509d..a256a662f1 100644 --- a/src/Select3D/Select3D_InteriorSensitivePointSet.hxx +++ b/src/Select3D/Select3D_InteriorSensitivePointSet.hxx @@ -24,7 +24,6 @@ #include #include -class gp_Pnt; class SelectMgr_EntityOwner; typedef NCollection_Vector Select3D_VectorOfHPoly; diff --git a/src/Select3D/Select3D_SensitiveCurve.hxx b/src/Select3D/Select3D_SensitiveCurve.hxx index 225aca2204..37181522f6 100644 --- a/src/Select3D/Select3D_SensitiveCurve.hxx +++ b/src/Select3D/Select3D_SensitiveCurve.hxx @@ -22,8 +22,6 @@ #include #include -class Standard_ConstructionError; -class Standard_OutOfRange; //! A framework to define a sensitive 3D curve. //! In some cases this class can raise Standard_ConstructionError and diff --git a/src/Select3D/Select3D_SensitiveFace.hxx b/src/Select3D/Select3D_SensitiveFace.hxx index d8d7d95986..bf63663ac3 100644 --- a/src/Select3D/Select3D_SensitiveFace.hxx +++ b/src/Select3D/Select3D_SensitiveFace.hxx @@ -22,8 +22,6 @@ #include #include -class Standard_ConstructionError; -class Standard_OutOfRange; //! Sensitive Entity to make a face selectable. //! In some cases this class can raise Standard_ConstructionError and diff --git a/src/Select3D/Select3D_SensitivePoly.hxx b/src/Select3D/Select3D_SensitivePoly.hxx index 833b637332..fa96f412bd 100644 --- a/src/Select3D/Select3D_SensitivePoly.hxx +++ b/src/Select3D/Select3D_SensitivePoly.hxx @@ -20,8 +20,6 @@ #include #include -class Standard_ConstructionError; -class Standard_OutOfRange; //! Sensitive Entity to make a face selectable. //! In some cases this class can raise Standard_ConstructionError and diff --git a/src/Select3D/Select3D_SensitiveTriangle.hxx b/src/Select3D/Select3D_SensitiveTriangle.hxx index 8d605e1a62..490def3d93 100644 --- a/src/Select3D/Select3D_SensitiveTriangle.hxx +++ b/src/Select3D/Select3D_SensitiveTriangle.hxx @@ -21,8 +21,6 @@ #include #include -class Standard_ConstructionError; -class Standard_OutOfRange; //! A framework to define selection of triangles in a view. //! This comes into play in the detection of meshing and triangulation in surfaces. diff --git a/src/SelectBasics/SelectBasics_SelectingVolumeManager.hxx b/src/SelectBasics/SelectBasics_SelectingVolumeManager.hxx index 60dbadb698..9d40b27dab 100644 --- a/src/SelectBasics/SelectBasics_SelectingVolumeManager.hxx +++ b/src/SelectBasics/SelectBasics_SelectingVolumeManager.hxx @@ -23,7 +23,6 @@ #include #include -class Bnd_Box; class gp_Pnt; //! This class provides an interface for selecting volume manager, diff --git a/src/SelectMgr/SelectMgr_SelectableObject.hxx b/src/SelectMgr/SelectMgr_SelectableObject.hxx index b1cc11be5b..1a1dc37c7d 100644 --- a/src/SelectMgr/SelectMgr_SelectableObject.hxx +++ b/src/SelectMgr/SelectMgr_SelectableObject.hxx @@ -24,8 +24,6 @@ #include class SelectMgr_EntityOwner; -class Standard_NotImplemented; -class SelectMgr_SelectionManager; //! A framework to supply the structure of the object to be selected. //! At the first pick, this structure is created by calling the appropriate algorithm and retaining this framework for further picking. diff --git a/src/SelectMgr/SelectMgr_ViewerSelector.hxx b/src/SelectMgr/SelectMgr_ViewerSelector.hxx index 23271d948e..e46d76a06d 100644 --- a/src/SelectMgr/SelectMgr_ViewerSelector.hxx +++ b/src/SelectMgr/SelectMgr_ViewerSelector.hxx @@ -37,9 +37,6 @@ #include #include -class Graphic3d_Structure; -class Graphic3d_TransformPers; -class SelectMgr_SelectionManager; class SelectMgr_SensitiveEntitySet; class SelectMgr_EntityOwner; class Select3D_SensitiveEntity; diff --git a/src/ShapeAlgo/ShapeAlgo.hxx b/src/ShapeAlgo/ShapeAlgo.hxx index 03fab1354e..8369162e89 100644 --- a/src/ShapeAlgo/ShapeAlgo.hxx +++ b/src/ShapeAlgo/ShapeAlgo.hxx @@ -21,8 +21,6 @@ #include class ShapeAlgo_AlgoContainer; -class ShapeAlgo_ToolContainer; -class ShapeAlgo_AlgoContainer; diff --git a/src/ShapeAnalysis/ShapeAnalysis.hxx b/src/ShapeAnalysis/ShapeAnalysis.hxx index 0223f57256..1ac0e19f31 100644 --- a/src/ShapeAnalysis/ShapeAnalysis.hxx +++ b/src/ShapeAnalysis/ShapeAnalysis.hxx @@ -28,22 +28,6 @@ class TopoDS_Face; class ShapeExtend_WireData; class TopoDS_Shape; class TopoDS_Vertex; -class ShapeAnalysis_Geom; -class ShapeAnalysis_Curve; -class ShapeAnalysis_Surface; -class ShapeAnalysis_Edge; -class ShapeAnalysis_Wire; -class ShapeAnalysis_WireOrder; -class ShapeAnalysis_WireVertex; -class ShapeAnalysis_CheckSmallFace; -class ShapeAnalysis_Shell; -class ShapeAnalysis_ShapeTolerance; -class ShapeAnalysis_ShapeContents; -class ShapeAnalysis_FreeBounds; -class ShapeAnalysis_FreeBoundData; -class ShapeAnalysis_FreeBoundsProperties; -class ShapeAnalysis_TransferParameters; -class ShapeAnalysis_TransferParametersProj; //! This package is intended to analyze geometrical objects diff --git a/src/ShapeAnalysis/ShapeAnalysis_Edge.hxx b/src/ShapeAnalysis/ShapeAnalysis_Edge.hxx index 392fc8ffc8..67fa1e2879 100644 --- a/src/ShapeAnalysis/ShapeAnalysis_Edge.hxx +++ b/src/ShapeAnalysis/ShapeAnalysis_Edge.hxx @@ -35,7 +35,6 @@ class gp_Pnt2d; class TopoDS_Vertex; class gp_Vec2d; class gp_Pnt; -class Adaptor3d_Curve; // resolve name collisions with X11 headers #ifdef Status diff --git a/src/ShapeAnalysis/ShapeAnalysis_FreeBoundData.hxx b/src/ShapeAnalysis/ShapeAnalysis_FreeBoundData.hxx index adb6a0560c..bd74979f22 100644 --- a/src/ShapeAnalysis/ShapeAnalysis_FreeBoundData.hxx +++ b/src/ShapeAnalysis/ShapeAnalysis_FreeBoundData.hxx @@ -26,7 +26,6 @@ #include #include #include -class TopoDS_Wire; class ShapeAnalysis_FreeBoundData; diff --git a/src/ShapeAnalysis/ShapeAnalysis_FreeBounds.hxx b/src/ShapeAnalysis/ShapeAnalysis_FreeBounds.hxx index 770aa9a641..d6bf85ebb9 100644 --- a/src/ShapeAnalysis/ShapeAnalysis_FreeBounds.hxx +++ b/src/ShapeAnalysis/ShapeAnalysis_FreeBounds.hxx @@ -27,7 +27,6 @@ #include #include class TopoDS_Shape; -class TopoDS_Compound; //! This class is intended to output free bounds of the shape. diff --git a/src/ShapeAnalysis/ShapeAnalysis_FreeBoundsProperties.hxx b/src/ShapeAnalysis/ShapeAnalysis_FreeBoundsProperties.hxx index b575e7f205..d6b5e607e0 100644 --- a/src/ShapeAnalysis/ShapeAnalysis_FreeBoundsProperties.hxx +++ b/src/ShapeAnalysis/ShapeAnalysis_FreeBoundsProperties.hxx @@ -26,7 +26,6 @@ #include #include #include -class TopoDS_Shape; class ShapeAnalysis_FreeBoundData; class TopoDS_Wire; diff --git a/src/ShapeAnalysis/ShapeAnalysis_Geom.hxx b/src/ShapeAnalysis/ShapeAnalysis_Geom.hxx index 2ba7d39d8a..7d9d1dd64b 100644 --- a/src/ShapeAnalysis/ShapeAnalysis_Geom.hxx +++ b/src/ShapeAnalysis/ShapeAnalysis_Geom.hxx @@ -25,7 +25,6 @@ #include #include #include -class Standard_OutOfRange; class gp_Pln; class gp_Trsf; diff --git a/src/ShapeAnalysis/ShapeAnalysis_TransferParameters.hxx b/src/ShapeAnalysis/ShapeAnalysis_TransferParameters.hxx index 34ea68ff3e..ae45fd0d64 100644 --- a/src/ShapeAnalysis/ShapeAnalysis_TransferParameters.hxx +++ b/src/ShapeAnalysis/ShapeAnalysis_TransferParameters.hxx @@ -26,8 +26,6 @@ #include #include #include -class TopoDS_Edge; -class TopoDS_Face; class ShapeAnalysis_TransferParameters; diff --git a/src/ShapeAnalysis/ShapeAnalysis_WireOrder.hxx b/src/ShapeAnalysis/ShapeAnalysis_WireOrder.hxx index 551f80dfc6..8e2d9cf084 100644 --- a/src/ShapeAnalysis/ShapeAnalysis_WireOrder.hxx +++ b/src/ShapeAnalysis/ShapeAnalysis_WireOrder.hxx @@ -26,7 +26,6 @@ #include #include #include -class Standard_TypeMismatch; class gp_XYZ; class gp_XY; diff --git a/src/ShapeBuild/ShapeBuild.hxx b/src/ShapeBuild/ShapeBuild.hxx index fbca81b7aa..31e7decef4 100644 --- a/src/ShapeBuild/ShapeBuild.hxx +++ b/src/ShapeBuild/ShapeBuild.hxx @@ -22,9 +22,6 @@ #include class Geom_Plane; -class ShapeBuild_Vertex; -class ShapeBuild_Edge; -class ShapeBuild_ReShape; //! This package provides basic building tools for other packages in ShapeHealing. diff --git a/src/ShapeConstruct/ShapeConstruct.hxx b/src/ShapeConstruct/ShapeConstruct.hxx index d6c943aaf8..ed085b68ac 100644 --- a/src/ShapeConstruct/ShapeConstruct.hxx +++ b/src/ShapeConstruct/ShapeConstruct.hxx @@ -35,10 +35,6 @@ class Geom_BSplineSurface; class Geom_Surface; class TopoDS_Face; class TopoDS_Edge; -class ShapeConstruct_Curve; -class ShapeConstruct_ProjectCurveOnSurface; -class ShapeConstruct_CompBezierCurvesToBSplineCurve; -class ShapeConstruct_MakeTriangulation; //! This package provides new algorithms for constructing diff --git a/src/ShapeConstruct/ShapeConstruct_MakeTriangulation.hxx b/src/ShapeConstruct/ShapeConstruct_MakeTriangulation.hxx index 10ed234cc7..a8cbc5454e 100644 --- a/src/ShapeConstruct/ShapeConstruct_MakeTriangulation.hxx +++ b/src/ShapeConstruct/ShapeConstruct_MakeTriangulation.hxx @@ -26,7 +26,6 @@ #include #include #include -class TopoDS_Wire; diff --git a/src/ShapeCustom/ShapeCustom.hxx b/src/ShapeCustom/ShapeCustom.hxx index 0f66873ac2..b5fdd9a91d 100644 --- a/src/ShapeCustom/ShapeCustom.hxx +++ b/src/ShapeCustom/ShapeCustom.hxx @@ -33,17 +33,6 @@ class BRepTools_Modification; class BRepTools_Modifier; class ShapeBuild_ReShape; class ShapeCustom_RestrictionParameters; -class ShapeCustom_Surface; -class ShapeCustom_Curve; -class ShapeCustom_Curve2d; -class ShapeCustom_RestrictionParameters; -class ShapeCustom_Modification; -class ShapeCustom_DirectModification; -class ShapeCustom_TrsfModification; -class ShapeCustom_BSplineRestriction; -class ShapeCustom_ConvertToRevolution; -class ShapeCustom_SweptToElementary; -class ShapeCustom_ConvertToBSpline; //! This package is intended to diff --git a/src/ShapeExtend/ShapeExtend.hxx b/src/ShapeExtend/ShapeExtend.hxx index 88c3ca0a48..acb9e4bc63 100644 --- a/src/ShapeExtend/ShapeExtend.hxx +++ b/src/ShapeExtend/ShapeExtend.hxx @@ -24,12 +24,6 @@ #include #include #include -class ShapeExtend_ComplexCurve; -class ShapeExtend_CompositeSurface; -class ShapeExtend_WireData; -class ShapeExtend_BasicMsgRegistrator; -class ShapeExtend_MsgRegistrator; -class ShapeExtend_Explorer; //! This package provides general tools and data structures common diff --git a/src/ShapeExtend/ShapeExtend_BasicMsgRegistrator.hxx b/src/ShapeExtend/ShapeExtend_BasicMsgRegistrator.hxx index bef7321e46..6bdcd5a616 100644 --- a/src/ShapeExtend/ShapeExtend_BasicMsgRegistrator.hxx +++ b/src/ShapeExtend/ShapeExtend_BasicMsgRegistrator.hxx @@ -21,7 +21,6 @@ #include #include -class Standard_Transient; class Message_Msg; class TopoDS_Shape; diff --git a/src/ShapeExtend/ShapeExtend_ComplexCurve.hxx b/src/ShapeExtend/ShapeExtend_ComplexCurve.hxx index 434057035b..7843c920ed 100644 --- a/src/ShapeExtend/ShapeExtend_ComplexCurve.hxx +++ b/src/ShapeExtend/ShapeExtend_ComplexCurve.hxx @@ -25,7 +25,6 @@ #include #include #include -class Geom_Curve; class gp_Trsf; class gp_Pnt; class gp_Vec; diff --git a/src/ShapeExtend/ShapeExtend_CompositeSurface.hxx b/src/ShapeExtend/ShapeExtend_CompositeSurface.hxx index f30d083ccf..e3f36a385a 100644 --- a/src/ShapeExtend/ShapeExtend_CompositeSurface.hxx +++ b/src/ShapeExtend/ShapeExtend_CompositeSurface.hxx @@ -29,7 +29,6 @@ #include #include #include -class Geom_Surface; class gp_Pnt2d; class gp_Trsf2d; class gp_Trsf; diff --git a/src/ShapeExtend/ShapeExtend_Explorer.hxx b/src/ShapeExtend/ShapeExtend_Explorer.hxx index 095ca940c1..b86ec48949 100644 --- a/src/ShapeExtend/ShapeExtend_Explorer.hxx +++ b/src/ShapeExtend/ShapeExtend_Explorer.hxx @@ -25,7 +25,6 @@ #include #include #include -class Standard_TypeMismatch; class TopoDS_Shape; diff --git a/src/ShapeFix/ShapeFix.hxx b/src/ShapeFix/ShapeFix.hxx index 5e41db050e..a1e30c6396 100644 --- a/src/ShapeFix/ShapeFix.hxx +++ b/src/ShapeFix/ShapeFix.hxx @@ -30,27 +30,6 @@ class TopoDS_Shape; class ShapeExtend_BasicMsgRegistrator; class ShapeBuild_ReShape; -class ShapeFix_Root; -class ShapeFix_EdgeProjAux; -class ShapeFix_Edge; -class ShapeFix_Wire; -class ShapeFix_Face; -class ShapeFix_FixSmallFace; -class ShapeFix_FixSmallSolid; -class ShapeFix_WireVertex; -class ShapeFix_Wireframe; -class ShapeFix_FreeBounds; -class ShapeFix_FaceConnect; -class ShapeFix_Shell; -class ShapeFix_Solid; -class ShapeFix_ShapeTolerance; -class ShapeFix_Shape; -class ShapeFix_EdgeConnect; -class ShapeFix_ComposeShell; -class ShapeFix_SplitCommonVertex; -class ShapeFix_WireSegment; -class ShapeFix_IntersectionTool; -class ShapeFix_SplitTool; //! This package provides algorithms for fixing diff --git a/src/ShapeFix/ShapeFix_EdgeProjAux.hxx b/src/ShapeFix/ShapeFix_EdgeProjAux.hxx index c4455fd6ab..875be3e1cf 100644 --- a/src/ShapeFix/ShapeFix_EdgeProjAux.hxx +++ b/src/ShapeFix/ShapeFix_EdgeProjAux.hxx @@ -25,8 +25,6 @@ #include #include #include -class TopoDS_Face; -class TopoDS_Edge; class Geom2d_Curve; diff --git a/src/ShapeFix/ShapeFix_FixSmallFace.hxx b/src/ShapeFix/ShapeFix_FixSmallFace.hxx index 5f7074f77e..b9d2ee466a 100644 --- a/src/ShapeFix/ShapeFix_FixSmallFace.hxx +++ b/src/ShapeFix/ShapeFix_FixSmallFace.hxx @@ -26,7 +26,6 @@ #include #include #include -class TopoDS_Shape; class TopoDS_Face; class TopoDS_Edge; class TopoDS_Compound; diff --git a/src/ShapeFix/ShapeFix_FreeBounds.hxx b/src/ShapeFix/ShapeFix_FreeBounds.hxx index e2899f0c27..aedf3c47d5 100644 --- a/src/ShapeFix/ShapeFix_FreeBounds.hxx +++ b/src/ShapeFix/ShapeFix_FreeBounds.hxx @@ -25,8 +25,6 @@ #include #include #include -class TopoDS_Shape; -class TopoDS_Compound; //! This class is intended to output free bounds of the shape diff --git a/src/ShapeFix/ShapeFix_Root.hxx b/src/ShapeFix/ShapeFix_Root.hxx index fe60f3e92b..d0a584424e 100644 --- a/src/ShapeFix/ShapeFix_Root.hxx +++ b/src/ShapeFix/ShapeFix_Root.hxx @@ -31,7 +31,6 @@ class ShapeBuild_ReShape; class ShapeExtend_BasicMsgRegistrator; -class TopoDS_Shape; class Message_Msg; diff --git a/src/ShapeFix/ShapeFix_Solid.hxx b/src/ShapeFix/ShapeFix_Solid.hxx index e11c1c6a4f..05afd5fb71 100644 --- a/src/ShapeFix/ShapeFix_Solid.hxx +++ b/src/ShapeFix/ShapeFix_Solid.hxx @@ -28,7 +28,6 @@ #include class ShapeFix_Shell; class TopoDS_Solid; -class Message_ProgressScope; class TopoDS_Shell; class ShapeExtend_BasicMsgRegistrator; diff --git a/src/ShapeFix/ShapeFix_SplitCommonVertex.hxx b/src/ShapeFix/ShapeFix_SplitCommonVertex.hxx index 0364b7be8e..8c2b8dba17 100644 --- a/src/ShapeFix/ShapeFix_SplitCommonVertex.hxx +++ b/src/ShapeFix/ShapeFix_SplitCommonVertex.hxx @@ -22,7 +22,6 @@ #include #include #include -class TopoDS_Shape; class ShapeFix_SplitCommonVertex; diff --git a/src/ShapeFix/ShapeFix_WireSegment.hxx b/src/ShapeFix/ShapeFix_WireSegment.hxx index c73cb65b94..7664c650c2 100644 --- a/src/ShapeFix/ShapeFix_WireSegment.hxx +++ b/src/ShapeFix/ShapeFix_WireSegment.hxx @@ -28,7 +28,6 @@ #include class ShapeExtend_WireData; class TopoDS_Wire; -class TopoDS_Vertex; class TopoDS_Edge; diff --git a/src/ShapeFix/ShapeFix_WireVertex.hxx b/src/ShapeFix/ShapeFix_WireVertex.hxx index 45df8e263e..b7d05c2dc7 100644 --- a/src/ShapeFix/ShapeFix_WireVertex.hxx +++ b/src/ShapeFix/ShapeFix_WireVertex.hxx @@ -26,7 +26,6 @@ #include class TopoDS_Wire; class ShapeExtend_WireData; -class ShapeAnalysis_WireVertex; //! Fixing disconnected edges in the wire diff --git a/src/ShapeFix/ShapeFix_Wireframe.hxx b/src/ShapeFix/ShapeFix_Wireframe.hxx index b8681c3fbf..197e28a064 100644 --- a/src/ShapeFix/ShapeFix_Wireframe.hxx +++ b/src/ShapeFix/ShapeFix_Wireframe.hxx @@ -28,7 +28,6 @@ #include #include #include -class TopoDS_Shape; class ShapeFix_Wireframe; diff --git a/src/ShapePersistent/ShapePersistent_Geom_Curve.hxx b/src/ShapePersistent/ShapePersistent_Geom_Curve.hxx index 4ba79319e6..17a385ec1a 100644 --- a/src/ShapePersistent/ShapePersistent_Geom_Curve.hxx +++ b/src/ShapePersistent/ShapePersistent_Geom_Curve.hxx @@ -36,7 +36,6 @@ #include #include -class gp_Dir; class ShapePersistent_Geom_Curve : private ShapePersistent_Geom { diff --git a/src/ShapePersistent/ShapePersistent_Geom_Surface.hxx b/src/ShapePersistent/ShapePersistent_Geom_Surface.hxx index 8ff57d66d0..42dda13db2 100644 --- a/src/ShapePersistent/ShapePersistent_Geom_Surface.hxx +++ b/src/ShapePersistent/ShapePersistent_Geom_Surface.hxx @@ -40,8 +40,6 @@ #include #include -class gp_Dir; -class gp_Pnt; class ShapePersistent_Geom_Surface : private ShapePersistent_Geom diff --git a/src/ShapeProcess/ShapeProcess.hxx b/src/ShapeProcess/ShapeProcess.hxx index 250935c10a..27322a37aa 100644 --- a/src/ShapeProcess/ShapeProcess.hxx +++ b/src/ShapeProcess/ShapeProcess.hxx @@ -26,11 +26,6 @@ class ShapeProcess_Operator; class ShapeProcess_Context; -class ShapeProcess_Context; -class ShapeProcess_ShapeContext; -class ShapeProcess_Operator; -class ShapeProcess_UOperator; -class ShapeProcess_OperLibrary; //! Shape Processing module //! allows to define and apply general Shape Processing as a diff --git a/src/ShapeProcess/ShapeProcess_ShapeContext.hxx b/src/ShapeProcess/ShapeProcess_ShapeContext.hxx index a4ebd2903f..e2ccf74015 100644 --- a/src/ShapeProcess/ShapeProcess_ShapeContext.hxx +++ b/src/ShapeProcess/ShapeProcess_ShapeContext.hxx @@ -28,7 +28,6 @@ #include #include class ShapeExtend_MsgRegistrator; -class TopoDS_Shape; class ShapeBuild_ReShape; class BRepTools_Modifier; class Message_Msg; diff --git a/src/ShapeUpgrade/ShapeUpgrade.hxx b/src/ShapeUpgrade/ShapeUpgrade.hxx index 71bb627b9c..2bdb74feae 100644 --- a/src/ShapeUpgrade/ShapeUpgrade.hxx +++ b/src/ShapeUpgrade/ShapeUpgrade.hxx @@ -26,38 +26,6 @@ #include class Geom_BSplineCurve; class Geom2d_BSplineCurve; -class ShapeUpgrade_Tool; -class ShapeUpgrade_EdgeDivide; -class ShapeUpgrade_ClosedEdgeDivide; -class ShapeUpgrade_WireDivide; -class ShapeUpgrade_FaceDivide; -class ShapeUpgrade_ClosedFaceDivide; -class ShapeUpgrade_FaceDivideArea; -class ShapeUpgrade_ShapeDivide; -class ShapeUpgrade_ShapeDivideArea; -class ShapeUpgrade_ShapeDivideContinuity; -class ShapeUpgrade_ShapeDivideAngle; -class ShapeUpgrade_ShapeConvertToBezier; -class ShapeUpgrade_ShapeDivideClosed; -class ShapeUpgrade_ShapeDivideClosedEdges; -class ShapeUpgrade_SplitCurve; -class ShapeUpgrade_SplitCurve2d; -class ShapeUpgrade_SplitCurve2dContinuity; -class ShapeUpgrade_ConvertCurve2dToBezier; -class ShapeUpgrade_SplitCurve3d; -class ShapeUpgrade_SplitCurve3dContinuity; -class ShapeUpgrade_ConvertCurve3dToBezier; -class ShapeUpgrade_SplitSurface; -class ShapeUpgrade_SplitSurfaceContinuity; -class ShapeUpgrade_SplitSurfaceAngle; -class ShapeUpgrade_ConvertSurfaceToBezierBasis; -class ShapeUpgrade_SplitSurfaceArea; -class ShapeUpgrade_ShellSewing; -class ShapeUpgrade_FixSmallCurves; -class ShapeUpgrade_FixSmallBezierCurves; -class ShapeUpgrade_RemoveLocations; -class ShapeUpgrade_RemoveInternalWires; -class ShapeUpgrade_UnifySameDomain; //! This package provides tools for splitting and converting shapes by some criteria. diff --git a/src/ShapeUpgrade/ShapeUpgrade_EdgeDivide.hxx b/src/ShapeUpgrade/ShapeUpgrade_EdgeDivide.hxx index 11fb17fb05..a4853de025 100644 --- a/src/ShapeUpgrade/ShapeUpgrade_EdgeDivide.hxx +++ b/src/ShapeUpgrade/ShapeUpgrade_EdgeDivide.hxx @@ -25,7 +25,6 @@ #include class ShapeUpgrade_SplitCurve3d; class ShapeUpgrade_SplitCurve2d; -class TopoDS_Face; class TopoDS_Edge; diff --git a/src/ShapeUpgrade/ShapeUpgrade_RemoveLocations.hxx b/src/ShapeUpgrade/ShapeUpgrade_RemoveLocations.hxx index 5a75b6a03e..85a41306bb 100644 --- a/src/ShapeUpgrade/ShapeUpgrade_RemoveLocations.hxx +++ b/src/ShapeUpgrade/ShapeUpgrade_RemoveLocations.hxx @@ -24,7 +24,6 @@ #include #include #include -class TopoDS_Shape; class ShapeUpgrade_RemoveLocations; diff --git a/src/ShapeUpgrade/ShapeUpgrade_UnifySameDomain.hxx b/src/ShapeUpgrade/ShapeUpgrade_UnifySameDomain.hxx index d8b5a5a490..a068959276 100644 --- a/src/ShapeUpgrade/ShapeUpgrade_UnifySameDomain.hxx +++ b/src/ShapeUpgrade/ShapeUpgrade_UnifySameDomain.hxx @@ -31,7 +31,6 @@ #include #include class ShapeBuild_ReShape; -class TopoDS_Shape; class ShapeUpgrade_UnifySameDomain; diff --git a/src/Standard/Standard.hxx b/src/Standard/Standard.hxx index 3b0b1aea67..8d0fb3a1a6 100644 --- a/src/Standard/Standard.hxx +++ b/src/Standard/Standard.hxx @@ -22,10 +22,6 @@ #include #include -class Standard_ErrorHandler; -class Standard_Persistent; -class Standard_Transient; -class Standard_Failure; //! The package Standard provides global memory allocator and other basic //! services used by other OCCT components. diff --git a/src/StdLPersistent/StdLPersistent_HArray1.hxx b/src/StdLPersistent/StdLPersistent_HArray1.hxx index 20be0e851c..ed88bf6ea5 100644 --- a/src/StdLPersistent/StdLPersistent_HArray1.hxx +++ b/src/StdLPersistent/StdLPersistent_HArray1.hxx @@ -28,9 +28,6 @@ #include #include -class TCollection_HExtendedString; -class TDF_Label; -class TDF_Data; DEFINE_HARRAY1 (StdLPersistent_HArray1OfPersistent, diff --git a/src/StdPrs/StdPrs_Isolines.hxx b/src/StdPrs/StdPrs_Isolines.hxx index ab3f5f538c..d3e2cd01fc 100644 --- a/src/StdPrs/StdPrs_Isolines.hxx +++ b/src/StdPrs/StdPrs_Isolines.hxx @@ -31,8 +31,6 @@ #include #include -class Poly_Triangle; -class TopoDS_Face; class TopLoc_Location; //! Tool for computing isoline representation for a face or surface. diff --git a/src/StdPrs/StdPrs_ShadedShape.hxx b/src/StdPrs/StdPrs_ShadedShape.hxx index f65e762ce2..8ee3103279 100644 --- a/src/StdPrs/StdPrs_ShadedShape.hxx +++ b/src/StdPrs/StdPrs_ShadedShape.hxx @@ -25,7 +25,6 @@ class Graphic3d_ArrayOfSegments; class Graphic3d_ArrayOfTriangles; class TopoDS_Shape; -class gp_Pnt2d; class BRep_Builder; class TopoDS_Compound; diff --git a/src/StdPrs/StdPrs_ToolTriangulatedShape.hxx b/src/StdPrs/StdPrs_ToolTriangulatedShape.hxx index 81372a2a3e..44f65328a0 100644 --- a/src/StdPrs/StdPrs_ToolTriangulatedShape.hxx +++ b/src/StdPrs/StdPrs_ToolTriangulatedShape.hxx @@ -22,11 +22,9 @@ #include class TopoDS_Face; -class TopLoc_Location; class TopoDS_Shape; class Prs3d_Drawer; class Poly_Triangulation; -class Poly_Connect; class StdPrs_ToolTriangulatedShape { diff --git a/src/StdPrs/StdPrs_WFDeflectionRestrictedFace.hxx b/src/StdPrs/StdPrs_WFDeflectionRestrictedFace.hxx index 3fb1f58f03..11d1f034dd 100644 --- a/src/StdPrs/StdPrs_WFDeflectionRestrictedFace.hxx +++ b/src/StdPrs/StdPrs_WFDeflectionRestrictedFace.hxx @@ -22,7 +22,6 @@ #include #include -class Bnd_Box; //! A framework to provide display of U and V //! isoparameters of faces, while allowing you to impose diff --git a/src/StdSelect/StdSelect_BRepOwner.hxx b/src/StdSelect/StdSelect_BRepOwner.hxx index 0d8492d9f7..6030d37c10 100644 --- a/src/StdSelect/StdSelect_BRepOwner.hxx +++ b/src/StdSelect/StdSelect_BRepOwner.hxx @@ -28,7 +28,6 @@ #include #include class StdSelect_Shape; -class TopoDS_Shape; class SelectMgr_SelectableObject; class PrsMgr_PresentationManager; class TopLoc_Location; diff --git a/src/StdSelect/StdSelect_BRepSelectionTool.hxx b/src/StdSelect/StdSelect_BRepSelectionTool.hxx index 8072ee92d8..7a762318af 100644 --- a/src/StdSelect/StdSelect_BRepSelectionTool.hxx +++ b/src/StdSelect/StdSelect_BRepSelectionTool.hxx @@ -29,9 +29,7 @@ #include #include #include -class TopoDS_Shape; class SelectMgr_SelectableObject; -class StdSelect_BRepOwner; class TopoDS_Face; diff --git a/src/StdSelect/StdSelect_Shape.hxx b/src/StdSelect/StdSelect_Shape.hxx index d14fc358b5..74ba6c6e15 100644 --- a/src/StdSelect/StdSelect_Shape.hxx +++ b/src/StdSelect/StdSelect_Shape.hxx @@ -21,7 +21,6 @@ #include #include -class TopoDS_Shape; //! Presentable shape only for purpose of display for BRepOwner... class StdSelect_Shape : public PrsMgr_PresentableObject diff --git a/src/StdStorage/StdStorage_BacketOfPersistent.hxx b/src/StdStorage/StdStorage_BacketOfPersistent.hxx index 585b8ae232..ecb745f8f5 100644 --- a/src/StdStorage/StdStorage_BacketOfPersistent.hxx +++ b/src/StdStorage/StdStorage_BacketOfPersistent.hxx @@ -18,8 +18,6 @@ #include #include -class StdStorage_BucketOfPersistent; -class StdStorage_BucketIterator; class StdObjMgt_Persistent; class StdStorage_Bucket diff --git a/src/StdStorage/StdStorage_HeaderData.hxx b/src/StdStorage/StdStorage_HeaderData.hxx index 891722df27..48c3b74e6f 100644 --- a/src/StdStorage/StdStorage_HeaderData.hxx +++ b/src/StdStorage/StdStorage_HeaderData.hxx @@ -25,8 +25,6 @@ #include #include class Storage_BaseDriver; -class TCollection_AsciiString; -class TCollection_ExtendedString; class StdStorage_HeaderData; DEFINE_STANDARD_HANDLE(StdStorage_HeaderData, Standard_Transient) diff --git a/src/StdStorage/StdStorage_Root.hxx b/src/StdStorage/StdStorage_Root.hxx index 9a4fafbc8f..3a67902681 100644 --- a/src/StdStorage/StdStorage_Root.hxx +++ b/src/StdStorage/StdStorage_Root.hxx @@ -21,10 +21,7 @@ #include #include class StdObjMgt_Persistent; -class Storage_Schema; -class TCollection_AsciiString; -class Storage_Root; DEFINE_STANDARD_HANDLE(StdStorage_Root, Standard_Transient) //! Describes a named persistent root diff --git a/src/StdStorage/StdStorage_RootData.hxx b/src/StdStorage/StdStorage_RootData.hxx index 380d504644..2813f9b9ba 100644 --- a/src/StdStorage/StdStorage_RootData.hxx +++ b/src/StdStorage/StdStorage_RootData.hxx @@ -24,12 +24,8 @@ #include #include #include -class Standard_NoSuchObject; -class Storage_Schema; class Storage_BaseDriver; class StdStorage_Root; -class TCollection_AsciiString; -class StdObjMgt_Persistent; class StdStorage_RootData; DEFINE_STANDARD_HANDLE(StdStorage_RootData, Standard_Transient) diff --git a/src/StdStorage/StdStorage_TypeData.hxx b/src/StdStorage/StdStorage_TypeData.hxx index 11dc25fc56..0d73a271de 100644 --- a/src/StdStorage/StdStorage_TypeData.hxx +++ b/src/StdStorage/StdStorage_TypeData.hxx @@ -25,9 +25,7 @@ #include #include #include -class Standard_NoSuchObject; class Storage_BaseDriver; -class TCollection_AsciiString; class StdStorage_TypeData; DEFINE_STANDARD_HANDLE(StdStorage_TypeData, Standard_Transient) diff --git a/src/StepAP214/StepAP214.hxx b/src/StepAP214/StepAP214.hxx index c603454984..32647cd1bf 100644 --- a/src/StepAP214/StepAP214.hxx +++ b/src/StepAP214/StepAP214.hxx @@ -22,51 +22,6 @@ #include class StepAP214_Protocol; -class StepAP214_AutoDesignDateAndPersonItem; -class StepAP214_AutoDesignDateAndTimeItem; -class StepAP214_AutoDesignDatedItem; -class StepAP214_AutoDesignGeneralOrgItem; -class StepAP214_AutoDesignOrganizationItem; -class StepAP214_AutoDesignGroupedItem; -class StepAP214_AutoDesignPresentedItemSelect; -class StepAP214_AutoDesignReferencingItem; -class StepAP214_DateAndTimeItem; -class StepAP214_DateItem; -class StepAP214_ApprovalItem; -class StepAP214_OrganizationItem; -class StepAP214_DocumentReferenceItem; -class StepAP214_GroupItem; -class StepAP214_PersonAndOrganizationItem; -class StepAP214_PresentedItemSelect; -class StepAP214_SecurityClassificationItem; -class StepAP214_Protocol; -class StepAP214_AutoDesignApprovalAssignment; -class StepAP214_AutoDesignActualDateAndTimeAssignment; -class StepAP214_AutoDesignNominalDateAndTimeAssignment; -class StepAP214_AutoDesignActualDateAssignment; -class StepAP214_AutoDesignNominalDateAssignment; -class StepAP214_AutoDesignGroupAssignment; -class StepAP214_AutoDesignOrganizationAssignment; -class StepAP214_AutoDesignDateAndPersonAssignment; -class StepAP214_AutoDesignPersonAndOrganizationAssignment; -class StepAP214_AutoDesignPresentedItem; -class StepAP214_AutoDesignSecurityClassificationAssignment; -class StepAP214_AutoDesignDocumentReference; -class StepAP214_AppliedApprovalAssignment; -class StepAP214_AppliedDateAndTimeAssignment; -class StepAP214_AppliedDateAssignment; -class StepAP214_AppliedGroupAssignment; -class StepAP214_AppliedOrganizationAssignment; -class StepAP214_AppliedPersonAndOrganizationAssignment; -class StepAP214_AppliedPresentedItem; -class StepAP214_AppliedSecurityClassificationAssignment; -class StepAP214_AppliedDocumentReference; -class StepAP214_AppliedExternalIdentificationAssignment; -class StepAP214_Class; -class StepAP214_ExternalIdentificationItem; -class StepAP214_ExternallyDefinedClass; -class StepAP214_ExternallyDefinedGeneralProperty; -class StepAP214_RepItemGroup; //! Complete AP214 CC1 , Revision 4 diff --git a/src/StepAP242/StepAP242_IdAttribute.hxx b/src/StepAP242/StepAP242_IdAttribute.hxx index ad52b5d141..34732f1f41 100644 --- a/src/StepAP242/StepAP242_IdAttribute.hxx +++ b/src/StepAP242/StepAP242_IdAttribute.hxx @@ -22,7 +22,6 @@ #include #include class TCollection_HAsciiString; -class StepAP242_IdAttributeSelect; class StepAP242_IdAttribute; DEFINE_STANDARD_HANDLE(StepAP242_IdAttribute, Standard_Transient) diff --git a/src/StepAP242/StepAP242_ItemIdentifiedRepresentationUsage.hxx b/src/StepAP242/StepAP242_ItemIdentifiedRepresentationUsage.hxx index 03c32fb4c2..d6e8d48edd 100644 --- a/src/StepAP242/StepAP242_ItemIdentifiedRepresentationUsage.hxx +++ b/src/StepAP242/StepAP242_ItemIdentifiedRepresentationUsage.hxx @@ -26,7 +26,6 @@ class TCollection_HAsciiString; class StepRepr_Representation; -class StepAP242_ItemIdentifiedRepresentationUsageDefinition; class StepRepr_RepresentationItem; class StepAP242_ItemIdentifiedRepresentationUsage; diff --git a/src/StepBasic/StepBasic_ApprovalDateTime.hxx b/src/StepBasic/StepBasic_ApprovalDateTime.hxx index 7b634767b9..c465ebe791 100644 --- a/src/StepBasic/StepBasic_ApprovalDateTime.hxx +++ b/src/StepBasic/StepBasic_ApprovalDateTime.hxx @@ -23,7 +23,6 @@ #include #include class StepBasic_Approval; -class StepBasic_DateTimeSelect; class StepBasic_ApprovalDateTime; diff --git a/src/StepBasic/StepBasic_ApprovalPersonOrganization.hxx b/src/StepBasic/StepBasic_ApprovalPersonOrganization.hxx index 6684397ab2..50eabfdea7 100644 --- a/src/StepBasic/StepBasic_ApprovalPersonOrganization.hxx +++ b/src/StepBasic/StepBasic_ApprovalPersonOrganization.hxx @@ -24,7 +24,6 @@ #include class StepBasic_Approval; class StepBasic_ApprovalRole; -class StepBasic_PersonOrganizationSelect; class StepBasic_ApprovalPersonOrganization; diff --git a/src/StepBasic/StepBasic_DocumentProductAssociation.hxx b/src/StepBasic/StepBasic_DocumentProductAssociation.hxx index 03b6dc23c8..d81248ddca 100644 --- a/src/StepBasic/StepBasic_DocumentProductAssociation.hxx +++ b/src/StepBasic/StepBasic_DocumentProductAssociation.hxx @@ -24,7 +24,6 @@ #include class TCollection_HAsciiString; class StepBasic_Document; -class StepBasic_ProductOrFormationOrDefinition; class StepBasic_DocumentProductAssociation; diff --git a/src/StepBasic/StepBasic_ExternalSource.hxx b/src/StepBasic/StepBasic_ExternalSource.hxx index 70343d3d7b..044f19985b 100644 --- a/src/StepBasic/StepBasic_ExternalSource.hxx +++ b/src/StepBasic/StepBasic_ExternalSource.hxx @@ -21,7 +21,6 @@ #include #include -class StepBasic_SourceItem; class StepBasic_ExternalSource; diff --git a/src/StepBasic/StepBasic_ExternallyDefinedItem.hxx b/src/StepBasic/StepBasic_ExternallyDefinedItem.hxx index a1ac91f9ac..03fe80a5da 100644 --- a/src/StepBasic/StepBasic_ExternallyDefinedItem.hxx +++ b/src/StepBasic/StepBasic_ExternallyDefinedItem.hxx @@ -22,7 +22,6 @@ #include #include class StepBasic_ExternalSource; -class StepBasic_SourceItem; class StepBasic_ExternallyDefinedItem; diff --git a/src/StepBasic/StepBasic_MeasureWithUnit.hxx b/src/StepBasic/StepBasic_MeasureWithUnit.hxx index abc5fdddd2..41b7153ee1 100644 --- a/src/StepBasic/StepBasic_MeasureWithUnit.hxx +++ b/src/StepBasic/StepBasic_MeasureWithUnit.hxx @@ -24,7 +24,6 @@ #include #include class StepBasic_MeasureValueMember; -class StepBasic_Unit; class StepBasic_MeasureWithUnit; diff --git a/src/StepBasic/StepBasic_ProductDefinitionReferenceWithLocalRepresentation.hxx b/src/StepBasic/StepBasic_ProductDefinitionReferenceWithLocalRepresentation.hxx index 8afb85b1d9..d161df9e35 100644 --- a/src/StepBasic/StepBasic_ProductDefinitionReferenceWithLocalRepresentation.hxx +++ b/src/StepBasic/StepBasic_ProductDefinitionReferenceWithLocalRepresentation.hxx @@ -23,7 +23,6 @@ class StepBasic_ExternalSource; -class StepBasic_ProductDefinition; DEFINE_STANDARD_HANDLE(StepBasic_ProductDefinitionReferenceWithLocalRepresentation, StepBasic_ProductDefinition) diff --git a/src/StepBasic/StepBasic_RoleAssociation.hxx b/src/StepBasic/StepBasic_RoleAssociation.hxx index 29c4d51cb6..ab0a4fd006 100644 --- a/src/StepBasic/StepBasic_RoleAssociation.hxx +++ b/src/StepBasic/StepBasic_RoleAssociation.hxx @@ -22,7 +22,6 @@ #include #include class StepBasic_ObjectRole; -class StepBasic_RoleSelect; class StepBasic_RoleAssociation; diff --git a/src/StepBasic/StepBasic_SiUnitAndAreaUnit.hxx b/src/StepBasic/StepBasic_SiUnitAndAreaUnit.hxx index 8580b0fca9..0a730fc5c9 100644 --- a/src/StepBasic/StepBasic_SiUnitAndAreaUnit.hxx +++ b/src/StepBasic/StepBasic_SiUnitAndAreaUnit.hxx @@ -22,7 +22,6 @@ #include class StepBasic_AreaUnit; -class StepBasic_DimensionalExponents; class StepBasic_SiUnitAndAreaUnit; diff --git a/src/StepBasic/StepBasic_SiUnitAndLengthUnit.hxx b/src/StepBasic/StepBasic_SiUnitAndLengthUnit.hxx index f3e904e694..d0409186fa 100644 --- a/src/StepBasic/StepBasic_SiUnitAndLengthUnit.hxx +++ b/src/StepBasic/StepBasic_SiUnitAndLengthUnit.hxx @@ -25,7 +25,6 @@ #include #include class StepBasic_LengthUnit; -class StepBasic_DimensionalExponents; class StepBasic_SiUnitAndLengthUnit; diff --git a/src/StepBasic/StepBasic_SiUnitAndMassUnit.hxx b/src/StepBasic/StepBasic_SiUnitAndMassUnit.hxx index fb90850032..ea2343cbc1 100644 --- a/src/StepBasic/StepBasic_SiUnitAndMassUnit.hxx +++ b/src/StepBasic/StepBasic_SiUnitAndMassUnit.hxx @@ -24,7 +24,6 @@ #include #include class StepBasic_MassUnit; -class StepBasic_DimensionalExponents; class StepBasic_SiUnitAndMassUnit; diff --git a/src/StepBasic/StepBasic_SiUnitAndPlaneAngleUnit.hxx b/src/StepBasic/StepBasic_SiUnitAndPlaneAngleUnit.hxx index 1807bc8101..8bb80a5ea6 100644 --- a/src/StepBasic/StepBasic_SiUnitAndPlaneAngleUnit.hxx +++ b/src/StepBasic/StepBasic_SiUnitAndPlaneAngleUnit.hxx @@ -25,7 +25,6 @@ #include #include class StepBasic_PlaneAngleUnit; -class StepBasic_DimensionalExponents; class StepBasic_SiUnitAndPlaneAngleUnit; diff --git a/src/StepBasic/StepBasic_SiUnitAndRatioUnit.hxx b/src/StepBasic/StepBasic_SiUnitAndRatioUnit.hxx index da44f5202b..a6fce9cf3c 100644 --- a/src/StepBasic/StepBasic_SiUnitAndRatioUnit.hxx +++ b/src/StepBasic/StepBasic_SiUnitAndRatioUnit.hxx @@ -25,7 +25,6 @@ #include #include class StepBasic_RatioUnit; -class StepBasic_DimensionalExponents; class StepBasic_SiUnitAndRatioUnit; diff --git a/src/StepBasic/StepBasic_SiUnitAndSolidAngleUnit.hxx b/src/StepBasic/StepBasic_SiUnitAndSolidAngleUnit.hxx index a4086daddc..4722d4c3ef 100644 --- a/src/StepBasic/StepBasic_SiUnitAndSolidAngleUnit.hxx +++ b/src/StepBasic/StepBasic_SiUnitAndSolidAngleUnit.hxx @@ -25,7 +25,6 @@ #include #include class StepBasic_SolidAngleUnit; -class StepBasic_DimensionalExponents; class StepBasic_SiUnitAndSolidAngleUnit; diff --git a/src/StepBasic/StepBasic_SiUnitAndThermodynamicTemperatureUnit.hxx b/src/StepBasic/StepBasic_SiUnitAndThermodynamicTemperatureUnit.hxx index e52aa6963e..5ae21a871a 100644 --- a/src/StepBasic/StepBasic_SiUnitAndThermodynamicTemperatureUnit.hxx +++ b/src/StepBasic/StepBasic_SiUnitAndThermodynamicTemperatureUnit.hxx @@ -24,7 +24,6 @@ #include #include class StepBasic_ThermodynamicTemperatureUnit; -class StepBasic_DimensionalExponents; class StepBasic_SiUnitAndThermodynamicTemperatureUnit; diff --git a/src/StepBasic/StepBasic_SiUnitAndTimeUnit.hxx b/src/StepBasic/StepBasic_SiUnitAndTimeUnit.hxx index f27bc790a3..d3e7db5230 100644 --- a/src/StepBasic/StepBasic_SiUnitAndTimeUnit.hxx +++ b/src/StepBasic/StepBasic_SiUnitAndTimeUnit.hxx @@ -25,7 +25,6 @@ #include #include class StepBasic_TimeUnit; -class StepBasic_DimensionalExponents; class StepBasic_SiUnitAndTimeUnit; diff --git a/src/StepBasic/StepBasic_SiUnitAndVolumeUnit.hxx b/src/StepBasic/StepBasic_SiUnitAndVolumeUnit.hxx index 84b1fdb4aa..3d8490acdf 100644 --- a/src/StepBasic/StepBasic_SiUnitAndVolumeUnit.hxx +++ b/src/StepBasic/StepBasic_SiUnitAndVolumeUnit.hxx @@ -22,7 +22,6 @@ #include class StepBasic_VolumeUnit; -class StepBasic_DimensionalExponents; class StepBasic_SiUnitAndVolumeUnit; diff --git a/src/StepData/StepData.hxx b/src/StepData/StepData.hxx index 0fdb5211ca..3285f3f1ce 100644 --- a/src/StepData/StepData.hxx +++ b/src/StepData/StepData.hxx @@ -22,45 +22,6 @@ #include class StepData_Protocol; -class StepData_StepModel; -class StepData_UndefinedEntity; -class StepData_SelectType; -class StepData_Field; -class StepData_SelectMember; -class StepData_SelectInt; -class StepData_SelectReal; -class StepData_SelectNamed; -class StepData_SelectArrReal; -class StepData_PDescr; -class StepData_FieldList; -class StepData_FieldList1; -class StepData_FieldListN; -class StepData_FieldListD; -class StepData_EDescr; -class StepData_ESDescr; -class StepData_ECDescr; -class StepData_Described; -class StepData_Simple; -class StepData_Plex; -class StepData_FreeFormEntity; -class StepData_Protocol; -class StepData_GeneralModule; -class StepData_FileRecognizer; -class StepData_FileProtocol; -class StepData_HeaderTool; -class StepData_EnumTool; -class StepData_DescrProtocol; -class StepData_DescrGeneral; -class StepData_DescrReadWrite; -class StepData_StepReaderData; -class StepData_StepReaderTool; -class StepData_ReadWriteModule; -class StepData_StepWriter; -class StepData_StepDumper; -class StepData_WriterLib; -class StepData_DefaultGeneral; -class StepData_GlobalNodeOfWriterLib; -class StepData_NodeOfWriterLib; //! Gives basic data definition for Step Interface. diff --git a/src/StepData/StepData_Described.hxx b/src/StepData/StepData_Described.hxx index 8f43f6f6fc..7e5c5c35cc 100644 --- a/src/StepData/StepData_Described.hxx +++ b/src/StepData/StepData_Described.hxx @@ -24,7 +24,6 @@ #include #include class StepData_EDescr; -class Interface_InterfaceMismatch; class StepData_Simple; class StepData_Field; class Interface_Check; diff --git a/src/StepData/StepData_Field.hxx b/src/StepData/StepData_Field.hxx index 3ea2d54435..25fb7e5278 100644 --- a/src/StepData/StepData_Field.hxx +++ b/src/StepData/StepData_Field.hxx @@ -26,7 +26,6 @@ #include #include #include -class Standard_Transient; class StepData_SelectMember; diff --git a/src/StepData/StepData_FieldList.hxx b/src/StepData/StepData_FieldList.hxx index 3371e87f75..9d9329ed15 100644 --- a/src/StepData/StepData_FieldList.hxx +++ b/src/StepData/StepData_FieldList.hxx @@ -22,7 +22,6 @@ #include #include -class Standard_OutOfRange; class StepData_Field; class Interface_EntityIterator; diff --git a/src/StepData/StepData_FieldList1.hxx b/src/StepData/StepData_FieldList1.hxx index 9b88156f09..c779fb23bf 100644 --- a/src/StepData/StepData_FieldList1.hxx +++ b/src/StepData/StepData_FieldList1.hxx @@ -24,8 +24,6 @@ #include #include #include -class Standard_OutOfRange; -class StepData_Field; //! Describes a list of ONE field diff --git a/src/StepData/StepData_FieldListD.hxx b/src/StepData/StepData_FieldListD.hxx index eda422fe38..79e57a153a 100644 --- a/src/StepData/StepData_FieldListD.hxx +++ b/src/StepData/StepData_FieldListD.hxx @@ -24,7 +24,6 @@ #include #include #include -class Standard_OutOfRange; class StepData_Field; diff --git a/src/StepData/StepData_FieldListN.hxx b/src/StepData/StepData_FieldListN.hxx index 691f75db3d..f3d41cf075 100644 --- a/src/StepData/StepData_FieldListN.hxx +++ b/src/StepData/StepData_FieldListN.hxx @@ -24,7 +24,6 @@ #include #include #include -class Standard_OutOfRange; class StepData_Field; diff --git a/src/StepData/StepData_FileProtocol.hxx b/src/StepData/StepData_FileProtocol.hxx index c4f8dfa083..2b120d695f 100644 --- a/src/StepData/StepData_FileProtocol.hxx +++ b/src/StepData/StepData_FileProtocol.hxx @@ -26,7 +26,6 @@ #include #include #include -class StepData_Protocol; class Interface_Protocol; class Interface_Graph; class Interface_Check; diff --git a/src/StepData/StepData_Plex.hxx b/src/StepData/StepData_Plex.hxx index 921b94d203..cd42a70fab 100644 --- a/src/StepData/StepData_Plex.hxx +++ b/src/StepData/StepData_Plex.hxx @@ -26,7 +26,6 @@ #include #include #include -class Interface_InterfaceMismatch; class StepData_ECDescr; class StepData_Simple; class StepData_Field; diff --git a/src/StepData/StepData_Protocol.hxx b/src/StepData/StepData_Protocol.hxx index c6bba9699c..c617cbb47f 100644 --- a/src/StepData/StepData_Protocol.hxx +++ b/src/StepData/StepData_Protocol.hxx @@ -27,8 +27,6 @@ #include #include #include -class Interface_Protocol; -class Standard_Transient; class Interface_InterfaceModel; class StepData_EDescr; class StepData_ESDescr; diff --git a/src/StepData/StepData_ReadWriteModule.hxx b/src/StepData/StepData_ReadWriteModule.hxx index 2de7f06139..fd24b44b68 100644 --- a/src/StepData/StepData_ReadWriteModule.hxx +++ b/src/StepData/StepData_ReadWriteModule.hxx @@ -24,7 +24,6 @@ #include #include #include -class Standard_DomainError; class Interface_FileReaderData; class TCollection_AsciiString; class Interface_Check; diff --git a/src/StepData/StepData_SelectNamed.hxx b/src/StepData/StepData_SelectNamed.hxx index 262d4c3d11..0bb8ff5232 100644 --- a/src/StepData/StepData_SelectNamed.hxx +++ b/src/StepData/StepData_SelectNamed.hxx @@ -27,7 +27,6 @@ #include #include #include -class StepData_Field; class StepData_SelectNamed; diff --git a/src/StepData/StepData_SelectType.hxx b/src/StepData/StepData_SelectType.hxx index c146699f10..fefd20a3e6 100644 --- a/src/StepData/StepData_SelectType.hxx +++ b/src/StepData/StepData_SelectType.hxx @@ -28,7 +28,6 @@ #include #include class Standard_Transient; -class Standard_TypeMismatch; class StepData_PDescr; class StepData_SelectMember; diff --git a/src/StepData/StepData_Simple.hxx b/src/StepData/StepData_Simple.hxx index dbe30d2269..a0a84bc053 100644 --- a/src/StepData/StepData_Simple.hxx +++ b/src/StepData/StepData_Simple.hxx @@ -25,10 +25,8 @@ #include #include #include -class Interface_InterfaceMismatch; class StepData_ESDescr; class StepData_Field; -class StepData_FieldListN; class Interface_Check; class Interface_EntityIterator; diff --git a/src/StepData/StepData_StepDumper.hxx b/src/StepData/StepData_StepDumper.hxx index 77625a90b1..4a4d261f64 100644 --- a/src/StepData/StepData_StepDumper.hxx +++ b/src/StepData/StepData_StepDumper.hxx @@ -27,9 +27,7 @@ #include #include class StepData_StepModel; -class Interface_InterfaceMismatch; class StepData_Protocol; -class StepData_StepWriter; //! Provides a way to dump entities processed through STEP, with //! these features : diff --git a/src/StepData/StepData_StepModel.hxx b/src/StepData/StepData_StepModel.hxx index b7a9ec9344..dce1d5beb0 100644 --- a/src/StepData/StepData_StepModel.hxx +++ b/src/StepData/StepData_StepModel.hxx @@ -22,9 +22,7 @@ #include #include -class Standard_NoSuchObject; class Standard_Transient; -class Interface_InterfaceModel; class Interface_EntityIterator; class Interface_Check; class TCollection_HAsciiString; diff --git a/src/StepData/StepData_StepWriter.hxx b/src/StepData/StepData_StepWriter.hxx index 2202946e2b..4aa91b3432 100644 --- a/src/StepData/StepData_StepWriter.hxx +++ b/src/StepData/StepData_StepWriter.hxx @@ -34,8 +34,6 @@ #include #include class StepData_StepModel; -class Interface_InterfaceMismatch; -class Interface_FloatWriter; class StepData_Protocol; class StepData_WriterLib; class TCollection_AsciiString; @@ -46,7 +44,6 @@ class StepData_SelectMember; class StepData_FieldList; class StepData_ESDescr; class Standard_Transient; -class Interface_CheckIterator; //! manages atomic file writing, under control of StepModel (for diff --git a/src/StepDimTol/StepDimTol_GeometricTolerance.hxx b/src/StepDimTol/StepDimTol_GeometricTolerance.hxx index e333d964ce..845003aea1 100644 --- a/src/StepDimTol/StepDimTol_GeometricTolerance.hxx +++ b/src/StepDimTol/StepDimTol_GeometricTolerance.hxx @@ -23,7 +23,6 @@ #include class TCollection_HAsciiString; class StepBasic_MeasureWithUnit; -class StepDimTol_GeometricToleranceTarget; class StepRepr_ShapeAspect; diff --git a/src/StepDimTol/StepDimTol_GeometricToleranceWithModifiers.hxx b/src/StepDimTol/StepDimTol_GeometricToleranceWithModifiers.hxx index f66d662807..1d7a3396a4 100644 --- a/src/StepDimTol/StepDimTol_GeometricToleranceWithModifiers.hxx +++ b/src/StepDimTol/StepDimTol_GeometricToleranceWithModifiers.hxx @@ -24,7 +24,6 @@ #include #include -class StepDimTol_HArray1OfGeometricToleranceModifier; class TCollection_HAsciiString; class StepBasic_MeasureWithUnit; class StepDimTol_GeometricToleranceTarget; diff --git a/src/StepDimTol/StepDimTol_ToleranceZone.hxx b/src/StepDimTol/StepDimTol_ToleranceZone.hxx index e9bba9cd2a..7768873585 100644 --- a/src/StepDimTol/StepDimTol_ToleranceZone.hxx +++ b/src/StepDimTol/StepDimTol_ToleranceZone.hxx @@ -25,9 +25,7 @@ #include #include -class StepDimTol_HArray1OfToleranceZoneTarget; class TCollection_HAsciiString; -class StepBasic_MeasureWithUnit; // Avoid possible conflict with SetForm macro defined by windows.h #ifdef SetForm diff --git a/src/StepDimTol/StepDimTol_ToleranceZoneDefinition.hxx b/src/StepDimTol/StepDimTol_ToleranceZoneDefinition.hxx index 4ab2b76ec8..d65bda3d1c 100644 --- a/src/StepDimTol/StepDimTol_ToleranceZoneDefinition.hxx +++ b/src/StepDimTol/StepDimTol_ToleranceZoneDefinition.hxx @@ -25,7 +25,6 @@ #include #include -class StepRepr_HArray1OfShapeAspect; class StepDimTol_ToleranceZoneDefinition; DEFINE_STANDARD_HANDLE(StepDimTol_ToleranceZoneDefinition, Standard_Transient) diff --git a/src/StepElement/StepElement_CurveElementEndReleasePacket.hxx b/src/StepElement/StepElement_CurveElementEndReleasePacket.hxx index 28aaf1b3ab..f7017146f3 100644 --- a/src/StepElement/StepElement_CurveElementEndReleasePacket.hxx +++ b/src/StepElement/StepElement_CurveElementEndReleasePacket.hxx @@ -22,7 +22,6 @@ #include #include #include -class StepElement_CurveElementFreedom; class StepElement_CurveElementEndReleasePacket; diff --git a/src/StepElement/StepElement_CurveElementSectionDerivedDefinitions.hxx b/src/StepElement/StepElement_CurveElementSectionDerivedDefinitions.hxx index 41dd6f4fd8..564ae8ff6f 100644 --- a/src/StepElement/StepElement_CurveElementSectionDerivedDefinitions.hxx +++ b/src/StepElement/StepElement_CurveElementSectionDerivedDefinitions.hxx @@ -25,7 +25,6 @@ #include #include class TCollection_HAsciiString; -class StepElement_MeasureOrUnspecifiedValue; class StepElement_CurveElementSectionDerivedDefinitions; diff --git a/src/StepElement/StepElement_SurfaceSection.hxx b/src/StepElement/StepElement_SurfaceSection.hxx index 75243813d8..3be5255e9e 100644 --- a/src/StepElement/StepElement_SurfaceSection.hxx +++ b/src/StepElement/StepElement_SurfaceSection.hxx @@ -21,7 +21,6 @@ #include #include -class StepElement_MeasureOrUnspecifiedValue; class StepElement_SurfaceSection; diff --git a/src/StepElement/StepElement_UniformSurfaceSection.hxx b/src/StepElement/StepElement_UniformSurfaceSection.hxx index 7eb573bdf0..253bbc8f20 100644 --- a/src/StepElement/StepElement_UniformSurfaceSection.hxx +++ b/src/StepElement/StepElement_UniformSurfaceSection.hxx @@ -22,7 +22,6 @@ #include #include #include -class StepElement_MeasureOrUnspecifiedValue; class StepElement_UniformSurfaceSection; diff --git a/src/StepFEA/StepFEA_CurveElementEndOffset.hxx b/src/StepFEA/StepFEA_CurveElementEndOffset.hxx index 19b6e0eea2..4f3fcf77be 100644 --- a/src/StepFEA/StepFEA_CurveElementEndOffset.hxx +++ b/src/StepFEA/StepFEA_CurveElementEndOffset.hxx @@ -22,7 +22,6 @@ #include #include #include -class StepFEA_CurveElementEndCoordinateSystem; class StepFEA_CurveElementEndOffset; diff --git a/src/StepFEA/StepFEA_CurveElementEndRelease.hxx b/src/StepFEA/StepFEA_CurveElementEndRelease.hxx index d612e1a91b..3b55dd7634 100644 --- a/src/StepFEA/StepFEA_CurveElementEndRelease.hxx +++ b/src/StepFEA/StepFEA_CurveElementEndRelease.hxx @@ -22,7 +22,6 @@ #include #include #include -class StepFEA_CurveElementEndCoordinateSystem; class StepFEA_CurveElementEndRelease; diff --git a/src/StepFEA/StepFEA_ElementGeometricRelationship.hxx b/src/StepFEA/StepFEA_ElementGeometricRelationship.hxx index b20f5cdbba..776b8457c1 100644 --- a/src/StepFEA/StepFEA_ElementGeometricRelationship.hxx +++ b/src/StepFEA/StepFEA_ElementGeometricRelationship.hxx @@ -23,8 +23,6 @@ #include #include class StepElement_AnalysisItemWithinRepresentation; -class StepFEA_ElementOrElementGroup; -class StepElement_ElementAspect; class StepFEA_ElementGeometricRelationship; diff --git a/src/StepFEA/StepFEA_FeaLinearElasticity.hxx b/src/StepFEA/StepFEA_FeaLinearElasticity.hxx index 91b9176c35..98f749b802 100644 --- a/src/StepFEA/StepFEA_FeaLinearElasticity.hxx +++ b/src/StepFEA/StepFEA_FeaLinearElasticity.hxx @@ -22,7 +22,6 @@ #include #include class TCollection_HAsciiString; -class StepFEA_SymmetricTensor43d; class StepFEA_FeaLinearElasticity; diff --git a/src/StepFEA/StepFEA_FeaMoistureAbsorption.hxx b/src/StepFEA/StepFEA_FeaMoistureAbsorption.hxx index 7e192a3faa..97f312a765 100644 --- a/src/StepFEA/StepFEA_FeaMoistureAbsorption.hxx +++ b/src/StepFEA/StepFEA_FeaMoistureAbsorption.hxx @@ -22,7 +22,6 @@ #include #include class TCollection_HAsciiString; -class StepFEA_SymmetricTensor23d; class StepFEA_FeaMoistureAbsorption; diff --git a/src/StepFEA/StepFEA_FeaSecantCoefficientOfLinearThermalExpansion.hxx b/src/StepFEA/StepFEA_FeaSecantCoefficientOfLinearThermalExpansion.hxx index 1aa5111bb1..8640cbe5c5 100644 --- a/src/StepFEA/StepFEA_FeaSecantCoefficientOfLinearThermalExpansion.hxx +++ b/src/StepFEA/StepFEA_FeaSecantCoefficientOfLinearThermalExpansion.hxx @@ -23,7 +23,6 @@ #include #include class TCollection_HAsciiString; -class StepFEA_SymmetricTensor23d; class StepFEA_FeaSecantCoefficientOfLinearThermalExpansion; diff --git a/src/StepFEA/StepFEA_FeaShellBendingStiffness.hxx b/src/StepFEA/StepFEA_FeaShellBendingStiffness.hxx index 2aba0ad712..85efc64568 100644 --- a/src/StepFEA/StepFEA_FeaShellBendingStiffness.hxx +++ b/src/StepFEA/StepFEA_FeaShellBendingStiffness.hxx @@ -22,7 +22,6 @@ #include #include class TCollection_HAsciiString; -class StepFEA_SymmetricTensor42d; class StepFEA_FeaShellBendingStiffness; diff --git a/src/StepFEA/StepFEA_FeaShellMembraneBendingCouplingStiffness.hxx b/src/StepFEA/StepFEA_FeaShellMembraneBendingCouplingStiffness.hxx index d52354d6b1..56372e12a5 100644 --- a/src/StepFEA/StepFEA_FeaShellMembraneBendingCouplingStiffness.hxx +++ b/src/StepFEA/StepFEA_FeaShellMembraneBendingCouplingStiffness.hxx @@ -22,7 +22,6 @@ #include #include class TCollection_HAsciiString; -class StepFEA_SymmetricTensor42d; class StepFEA_FeaShellMembraneBendingCouplingStiffness; diff --git a/src/StepFEA/StepFEA_FeaShellMembraneStiffness.hxx b/src/StepFEA/StepFEA_FeaShellMembraneStiffness.hxx index b66a4da1ea..77a67a25f6 100644 --- a/src/StepFEA/StepFEA_FeaShellMembraneStiffness.hxx +++ b/src/StepFEA/StepFEA_FeaShellMembraneStiffness.hxx @@ -22,7 +22,6 @@ #include #include class TCollection_HAsciiString; -class StepFEA_SymmetricTensor42d; class StepFEA_FeaShellMembraneStiffness; diff --git a/src/StepFEA/StepFEA_FeaShellShearStiffness.hxx b/src/StepFEA/StepFEA_FeaShellShearStiffness.hxx index 80be3ab24d..ecd0d7e05c 100644 --- a/src/StepFEA/StepFEA_FeaShellShearStiffness.hxx +++ b/src/StepFEA/StepFEA_FeaShellShearStiffness.hxx @@ -22,7 +22,6 @@ #include #include class TCollection_HAsciiString; -class StepFEA_SymmetricTensor22d; class StepFEA_FeaShellShearStiffness; diff --git a/src/StepFEA/StepFEA_FeaTangentialCoefficientOfLinearThermalExpansion.hxx b/src/StepFEA/StepFEA_FeaTangentialCoefficientOfLinearThermalExpansion.hxx index f8a9d4212b..c71d6c278d 100644 --- a/src/StepFEA/StepFEA_FeaTangentialCoefficientOfLinearThermalExpansion.hxx +++ b/src/StepFEA/StepFEA_FeaTangentialCoefficientOfLinearThermalExpansion.hxx @@ -22,7 +22,6 @@ #include #include class TCollection_HAsciiString; -class StepFEA_SymmetricTensor23d; class StepFEA_FeaTangentialCoefficientOfLinearThermalExpansion; diff --git a/src/StepFEA/StepFEA_FreedomAndCoefficient.hxx b/src/StepFEA/StepFEA_FreedomAndCoefficient.hxx index 2adae09dde..ab90ddb78e 100644 --- a/src/StepFEA/StepFEA_FreedomAndCoefficient.hxx +++ b/src/StepFEA/StepFEA_FreedomAndCoefficient.hxx @@ -22,8 +22,6 @@ #include #include #include -class StepFEA_DegreeOfFreedom; -class StepElement_MeasureOrUnspecifiedValue; class StepFEA_FreedomAndCoefficient; diff --git a/src/StepGeom/StepGeom_Conic.hxx b/src/StepGeom/StepGeom_Conic.hxx index aabde6b265..818d93f102 100644 --- a/src/StepGeom/StepGeom_Conic.hxx +++ b/src/StepGeom/StepGeom_Conic.hxx @@ -23,7 +23,6 @@ #include #include class TCollection_HAsciiString; -class StepGeom_Axis2Placement; class StepGeom_Conic; diff --git a/src/StepGeom/StepGeom_CurveReplica.hxx b/src/StepGeom/StepGeom_CurveReplica.hxx index 96e6701f75..8958c75e2f 100644 --- a/src/StepGeom/StepGeom_CurveReplica.hxx +++ b/src/StepGeom/StepGeom_CurveReplica.hxx @@ -21,7 +21,6 @@ #include #include -class StepGeom_Curve; class StepGeom_CartesianTransformationOperator; class TCollection_HAsciiString; diff --git a/src/StepGeom/StepGeom_OffsetCurve3d.hxx b/src/StepGeom/StepGeom_OffsetCurve3d.hxx index 57efbba1cf..e2af524e55 100644 --- a/src/StepGeom/StepGeom_OffsetCurve3d.hxx +++ b/src/StepGeom/StepGeom_OffsetCurve3d.hxx @@ -23,7 +23,6 @@ #include #include #include -class StepGeom_Curve; class StepGeom_Direction; class TCollection_HAsciiString; diff --git a/src/StepGeom/StepGeom_OffsetSurface.hxx b/src/StepGeom/StepGeom_OffsetSurface.hxx index 3d65a9f0cc..4bf545f8bd 100644 --- a/src/StepGeom/StepGeom_OffsetSurface.hxx +++ b/src/StepGeom/StepGeom_OffsetSurface.hxx @@ -23,7 +23,6 @@ #include #include #include -class StepGeom_Surface; class TCollection_HAsciiString; diff --git a/src/StepGeom/StepGeom_PointReplica.hxx b/src/StepGeom/StepGeom_PointReplica.hxx index de9f7696fa..23fecda6ed 100644 --- a/src/StepGeom/StepGeom_PointReplica.hxx +++ b/src/StepGeom/StepGeom_PointReplica.hxx @@ -21,7 +21,6 @@ #include #include -class StepGeom_Point; class StepGeom_CartesianTransformationOperator; class TCollection_HAsciiString; diff --git a/src/StepGeom/StepGeom_SurfaceCurve.hxx b/src/StepGeom/StepGeom_SurfaceCurve.hxx index 4e789153ac..cd72cc246c 100644 --- a/src/StepGeom/StepGeom_SurfaceCurve.hxx +++ b/src/StepGeom/StepGeom_SurfaceCurve.hxx @@ -24,7 +24,6 @@ #include #include #include -class StepGeom_Curve; class TCollection_HAsciiString; class StepGeom_PcurveOrSurface; diff --git a/src/StepGeom/StepGeom_SurfaceReplica.hxx b/src/StepGeom/StepGeom_SurfaceReplica.hxx index b2e5f402fe..aebff8338b 100644 --- a/src/StepGeom/StepGeom_SurfaceReplica.hxx +++ b/src/StepGeom/StepGeom_SurfaceReplica.hxx @@ -21,7 +21,6 @@ #include #include -class StepGeom_Surface; class StepGeom_CartesianTransformationOperator3d; class TCollection_HAsciiString; diff --git a/src/StepRepr/StepRepr_CharacterizedRepresentation.hxx b/src/StepRepr/StepRepr_CharacterizedRepresentation.hxx index 66fb01aa87..f72b4ab403 100644 --- a/src/StepRepr/StepRepr_CharacterizedRepresentation.hxx +++ b/src/StepRepr/StepRepr_CharacterizedRepresentation.hxx @@ -22,7 +22,6 @@ #include class TCollection_HAsciiString; class StepRepr_RepresentationContext; -class StepRepr_RepresentationItem; class StepRepr_CharacterizedRepresentation; diff --git a/src/StepRepr/StepRepr_CompoundRepresentationItem.hxx b/src/StepRepr/StepRepr_CompoundRepresentationItem.hxx index acd2e6bdfb..b826082cd6 100644 --- a/src/StepRepr/StepRepr_CompoundRepresentationItem.hxx +++ b/src/StepRepr/StepRepr_CompoundRepresentationItem.hxx @@ -23,7 +23,6 @@ #include #include class TCollection_HAsciiString; -class StepRepr_RepresentationItem; class StepRepr_CompoundRepresentationItem; diff --git a/src/StepRepr/StepRepr_ConfigurationDesign.hxx b/src/StepRepr/StepRepr_ConfigurationDesign.hxx index 099b1b01fe..d760b1c613 100644 --- a/src/StepRepr/StepRepr_ConfigurationDesign.hxx +++ b/src/StepRepr/StepRepr_ConfigurationDesign.hxx @@ -23,7 +23,6 @@ #include #include class StepRepr_ConfigurationItem; -class StepRepr_ConfigurationDesignItem; class StepRepr_ConfigurationDesign; diff --git a/src/StepRepr/StepRepr_MappedItem.hxx b/src/StepRepr/StepRepr_MappedItem.hxx index 6b81a71de8..83e09b0185 100644 --- a/src/StepRepr/StepRepr_MappedItem.hxx +++ b/src/StepRepr/StepRepr_MappedItem.hxx @@ -22,7 +22,6 @@ #include class StepRepr_RepresentationMap; -class StepRepr_RepresentationItem; class TCollection_HAsciiString; diff --git a/src/StepRepr/StepRepr_MaterialDesignation.hxx b/src/StepRepr/StepRepr_MaterialDesignation.hxx index fdbc86f2b3..f9d3122006 100644 --- a/src/StepRepr/StepRepr_MaterialDesignation.hxx +++ b/src/StepRepr/StepRepr_MaterialDesignation.hxx @@ -23,7 +23,6 @@ #include #include class TCollection_HAsciiString; -class StepRepr_CharacterizedDefinition; class StepRepr_MaterialDesignation; diff --git a/src/StepRepr/StepRepr_PropertyDefinition.hxx b/src/StepRepr/StepRepr_PropertyDefinition.hxx index 4a51749643..6d8f800b40 100644 --- a/src/StepRepr/StepRepr_PropertyDefinition.hxx +++ b/src/StepRepr/StepRepr_PropertyDefinition.hxx @@ -23,7 +23,6 @@ #include #include class TCollection_HAsciiString; -class StepRepr_CharacterizedDefinition; class StepRepr_PropertyDefinition; diff --git a/src/StepRepr/StepRepr_PropertyDefinitionRepresentation.hxx b/src/StepRepr/StepRepr_PropertyDefinitionRepresentation.hxx index 2cdeaf025e..8b5f91b827 100644 --- a/src/StepRepr/StepRepr_PropertyDefinitionRepresentation.hxx +++ b/src/StepRepr/StepRepr_PropertyDefinitionRepresentation.hxx @@ -22,7 +22,6 @@ #include #include class StepRepr_Representation; -class StepRepr_RepresentedDefinition; class StepRepr_PropertyDefinitionRepresentation; diff --git a/src/StepRepr/StepRepr_ReprItemAndMeasureWithUnit.hxx b/src/StepRepr/StepRepr_ReprItemAndMeasureWithUnit.hxx index ed8641cf6d..170bf5ff8e 100644 --- a/src/StepRepr/StepRepr_ReprItemAndMeasureWithUnit.hxx +++ b/src/StepRepr/StepRepr_ReprItemAndMeasureWithUnit.hxx @@ -22,7 +22,6 @@ #include class StepRepr_MeasureRepresentationItem; class StepBasic_MeasureWithUnit; -class StepRepr_RepresentationItem; class StepRepr_ReprItemAndMeasureWithUnit; diff --git a/src/StepRepr/StepRepr_RepresentationRelationshipWithTransformation.hxx b/src/StepRepr/StepRepr_RepresentationRelationshipWithTransformation.hxx index 8113478305..ff1f5877a7 100644 --- a/src/StepRepr/StepRepr_RepresentationRelationshipWithTransformation.hxx +++ b/src/StepRepr/StepRepr_RepresentationRelationshipWithTransformation.hxx @@ -24,7 +24,6 @@ #include class TCollection_HAsciiString; class StepRepr_Representation; -class StepRepr_Transformation; class StepRepr_RepresentationRelationshipWithTransformation; diff --git a/src/StepRepr/StepRepr_SpecifiedHigherUsageOccurrence.hxx b/src/StepRepr/StepRepr_SpecifiedHigherUsageOccurrence.hxx index 244f3bec0b..3bc3754502 100644 --- a/src/StepRepr/StepRepr_SpecifiedHigherUsageOccurrence.hxx +++ b/src/StepRepr/StepRepr_SpecifiedHigherUsageOccurrence.hxx @@ -21,7 +21,6 @@ #include #include -class StepRepr_AssemblyComponentUsage; class StepRepr_NextAssemblyUsageOccurrence; class TCollection_HAsciiString; class StepBasic_ProductDefinition; diff --git a/src/math/math.hxx b/src/math/math.hxx index 561b465891..f44e215ff4 100644 --- a/src/math/math.hxx +++ b/src/math/math.hxx @@ -24,46 +24,6 @@ #include #include #include -class math_Matrix; -class math_Function; -class math_FunctionWithDerivative; -class math_MultipleVarFunction; -class math_MultipleVarFunctionWithGradient; -class math_MultipleVarFunctionWithHessian; -class math_FunctionSet; -class math_FunctionSetWithDerivatives; -class math_Gauss; -class math_GaussLeastSquare; -class math_SVD; -class math_DirectPolynomialRoots; -class math_FunctionRoots; -class math_BissecNewton; -class math_FunctionRoot; -class math_NewtonFunctionRoot; -class math_BracketedRoot; -class math_FunctionSetRoot; -class math_NewtonFunctionSetRoot; -class math_BracketMinimum; -class math_BrentMinimum; -class math_Powell; -class math_FRPR; -class math_BFGS; -class math_NewtonMinimum; -class math_Jacobi; -class math_GaussSingleIntegration; -class math_GaussMultipleIntegration; -class math_GaussSetIntegration; -class math_FunctionSample; -class math_FunctionAllRoots; -class math_Householder; -class math_Crout; -class math_Uzawa; -class math_TrigonometricFunctionRoots; -class math_KronrodSingleIntegration; -class math_EigenValuesSearcher; -class math_ComputeGaussPointsAndWeights; -class math_ComputeKronrodPointsAndWeights; -class math_DoubleTab; diff --git a/src/math/math_BFGS.hxx b/src/math/math_BFGS.hxx index 553e7c907f..4a5c18d88c 100644 --- a/src/math/math_BFGS.hxx +++ b/src/math/math_BFGS.hxx @@ -27,8 +27,6 @@ #include #include #include -class StdFail_NotDone; -class Standard_DimensionError; class math_MultipleVarFunctionWithGradient; diff --git a/src/math/math_BissecNewton.hxx b/src/math/math_BissecNewton.hxx index 9da3447717..77add80024 100644 --- a/src/math/math_BissecNewton.hxx +++ b/src/math/math_BissecNewton.hxx @@ -26,7 +26,6 @@ #include #include #include -class StdFail_NotDone; class math_FunctionWithDerivative; diff --git a/src/math/math_BracketMinimum.hxx b/src/math/math_BracketMinimum.hxx index 09d2affe53..9faa02b487 100644 --- a/src/math/math_BracketMinimum.hxx +++ b/src/math/math_BracketMinimum.hxx @@ -24,7 +24,6 @@ #include #include #include -class StdFail_NotDone; class math_Function; diff --git a/src/math/math_BracketedRoot.hxx b/src/math/math_BracketedRoot.hxx index 3082982bb6..5208a5be6e 100644 --- a/src/math/math_BracketedRoot.hxx +++ b/src/math/math_BracketedRoot.hxx @@ -25,7 +25,6 @@ #include #include #include -class StdFail_NotDone; class math_Function; diff --git a/src/math/math_BrentMinimum.hxx b/src/math/math_BrentMinimum.hxx index 057e8ab8b7..e9c17fe376 100644 --- a/src/math/math_BrentMinimum.hxx +++ b/src/math/math_BrentMinimum.hxx @@ -25,7 +25,6 @@ #include #include #include -class StdFail_NotDone; class math_Function; diff --git a/src/math/math_Crout.hxx b/src/math/math_Crout.hxx index 09963d3c0b..e60169c0cf 100644 --- a/src/math/math_Crout.hxx +++ b/src/math/math_Crout.hxx @@ -26,10 +26,6 @@ #include #include #include -class StdFail_NotDone; -class math_NotSquare; -class Standard_DimensionError; -class math_Matrix; //! This class implements the Crout algorithm used to solve a diff --git a/src/math/math_DirectPolynomialRoots.hxx b/src/math/math_DirectPolynomialRoots.hxx index cd49e1ab20..cfae700df8 100644 --- a/src/math/math_DirectPolynomialRoots.hxx +++ b/src/math/math_DirectPolynomialRoots.hxx @@ -25,8 +25,6 @@ #include #include #include -class Standard_RangeError; -class StdFail_InfiniteSolutions; diff --git a/src/math/math_EigenValuesSearcher.hxx b/src/math/math_EigenValuesSearcher.hxx index f687d8a92c..56d0001f93 100644 --- a/src/math/math_EigenValuesSearcher.hxx +++ b/src/math/math_EigenValuesSearcher.hxx @@ -27,7 +27,6 @@ #include #include #include -class StdFail_NotDone; //! This class finds eigen values and vectors of diff --git a/src/math/math_FRPR.hxx b/src/math/math_FRPR.hxx index 3730ebe4fc..0a2c9eb23d 100644 --- a/src/math/math_FRPR.hxx +++ b/src/math/math_FRPR.hxx @@ -27,8 +27,6 @@ #include #include #include -class Standard_DimensionError; -class StdFail_NotDone; class math_MultipleVarFunctionWithGradient; diff --git a/src/math/math_FunctionAllRoots.hxx b/src/math/math_FunctionAllRoots.hxx index f4e2246fde..676bb2359a 100644 --- a/src/math/math_FunctionAllRoots.hxx +++ b/src/math/math_FunctionAllRoots.hxx @@ -27,9 +27,6 @@ #include #include #include -class Standard_OutOfRange; -class StdFail_NotDone; -class Standard_NumericError; class math_FunctionWithDerivative; class math_FunctionSample; diff --git a/src/math/math_FunctionRoot.hxx b/src/math/math_FunctionRoot.hxx index bc3e99fe57..f7dbdaad65 100644 --- a/src/math/math_FunctionRoot.hxx +++ b/src/math/math_FunctionRoot.hxx @@ -25,7 +25,6 @@ #include #include #include -class StdFail_NotDone; class math_FunctionWithDerivative; diff --git a/src/math/math_FunctionRoots.hxx b/src/math/math_FunctionRoots.hxx index 570ff84d00..ffce1dde53 100644 --- a/src/math/math_FunctionRoots.hxx +++ b/src/math/math_FunctionRoots.hxx @@ -27,8 +27,6 @@ #include #include #include -class Standard_RangeError; -class StdFail_NotDone; class math_FunctionWithDerivative; diff --git a/src/math/math_FunctionSample.hxx b/src/math/math_FunctionSample.hxx index 63cc5544d6..0b5cf71af9 100644 --- a/src/math/math_FunctionSample.hxx +++ b/src/math/math_FunctionSample.hxx @@ -23,7 +23,6 @@ #include #include -class Standard_OutOfRange; //! This class gives a default sample (constant difference diff --git a/src/math/math_FunctionSetRoot.hxx b/src/math/math_FunctionSetRoot.hxx index ae4a5eb4f4..60995f12a5 100644 --- a/src/math/math_FunctionSetRoot.hxx +++ b/src/math/math_FunctionSetRoot.hxx @@ -27,10 +27,7 @@ #include #include #include -class StdFail_NotDone; -class Standard_DimensionError; class math_FunctionSetWithDerivatives; -class math_Matrix; //! The math_FunctionSetRoot class calculates the root diff --git a/src/math/math_Gauss.hxx b/src/math/math_Gauss.hxx index 820bc8f055..6e53712c44 100644 --- a/src/math/math_Gauss.hxx +++ b/src/math/math_Gauss.hxx @@ -29,10 +29,6 @@ #include #include -class math_NotSquare; -class Standard_DimensionError; -class StdFail_NotDone; -class math_Matrix; //! This class implements the Gauss LU decomposition (Crout algorithm) //! with partial pivoting (rows interchange) of a square matrix and diff --git a/src/math/math_GaussLeastSquare.hxx b/src/math/math_GaussLeastSquare.hxx index 86d5008563..b80bc1fb66 100644 --- a/src/math/math_GaussLeastSquare.hxx +++ b/src/math/math_GaussLeastSquare.hxx @@ -27,9 +27,6 @@ #include #include #include -class StdFail_NotDone; -class Standard_DimensionError; -class math_Matrix; diff --git a/src/math/math_GaussMultipleIntegration.hxx b/src/math/math_GaussMultipleIntegration.hxx index c57f308831..29104e83fe 100644 --- a/src/math/math_GaussMultipleIntegration.hxx +++ b/src/math/math_GaussMultipleIntegration.hxx @@ -26,7 +26,6 @@ #include #include #include -class StdFail_NotDone; class math_MultipleVarFunction; diff --git a/src/math/math_GaussSetIntegration.hxx b/src/math/math_GaussSetIntegration.hxx index 1d5c8d8522..b485145bf4 100644 --- a/src/math/math_GaussSetIntegration.hxx +++ b/src/math/math_GaussSetIntegration.hxx @@ -25,8 +25,6 @@ #include #include #include -class StdFail_NotDone; -class Standard_NotImplemented; class math_FunctionSet; diff --git a/src/math/math_GaussSingleIntegration.hxx b/src/math/math_GaussSingleIntegration.hxx index 03dc91d02d..70046d27ed 100644 --- a/src/math/math_GaussSingleIntegration.hxx +++ b/src/math/math_GaussSingleIntegration.hxx @@ -25,7 +25,6 @@ #include #include #include -class StdFail_NotDone; class math_Function; diff --git a/src/math/math_Householder.hxx b/src/math/math_Householder.hxx index e9263f4dff..422a895140 100644 --- a/src/math/math_Householder.hxx +++ b/src/math/math_Householder.hxx @@ -27,11 +27,6 @@ #include #include #include -class StdFail_NotDone; -class Standard_OutOfRange; -class Standard_DimensionError; -class Standard_ConstructionError; -class math_Matrix; //! This class implements the least square solution of a set of diff --git a/src/math/math_Jacobi.hxx b/src/math/math_Jacobi.hxx index a1f8e0a66a..1016a41ade 100644 --- a/src/math/math_Jacobi.hxx +++ b/src/math/math_Jacobi.hxx @@ -27,8 +27,6 @@ #include #include #include -class StdFail_NotDone; -class math_Matrix; diff --git a/src/math/math_KronrodSingleIntegration.hxx b/src/math/math_KronrodSingleIntegration.hxx index 7cb3e949ce..20ca0304ca 100644 --- a/src/math/math_KronrodSingleIntegration.hxx +++ b/src/math/math_KronrodSingleIntegration.hxx @@ -24,7 +24,6 @@ #include #include #include -class StdFail_NotDone; class math_Function; diff --git a/src/math/math_NewtonFunctionRoot.hxx b/src/math/math_NewtonFunctionRoot.hxx index 8b0577c850..e2265f8951 100644 --- a/src/math/math_NewtonFunctionRoot.hxx +++ b/src/math/math_NewtonFunctionRoot.hxx @@ -25,7 +25,6 @@ #include #include #include -class StdFail_NotDone; class math_FunctionWithDerivative; diff --git a/src/math/math_NewtonFunctionSetRoot.hxx b/src/math/math_NewtonFunctionSetRoot.hxx index 026663161c..7debe41724 100644 --- a/src/math/math_NewtonFunctionSetRoot.hxx +++ b/src/math/math_NewtonFunctionSetRoot.hxx @@ -28,10 +28,7 @@ #include #include #include -class StdFail_NotDone; -class Standard_DimensionError; class math_FunctionSetWithDerivatives; -class math_Matrix; diff --git a/src/math/math_NewtonMinimum.hxx b/src/math/math_NewtonMinimum.hxx index 506b4ebcac..a46bf09c0c 100644 --- a/src/math/math_NewtonMinimum.hxx +++ b/src/math/math_NewtonMinimum.hxx @@ -29,8 +29,6 @@ #include #include #include -class StdFail_NotDone; -class Standard_DimensionError; class math_MultipleVarFunctionWithHessian; diff --git a/src/math/math_Powell.hxx b/src/math/math_Powell.hxx index 080cc2d2aa..79a2198ac0 100644 --- a/src/math/math_Powell.hxx +++ b/src/math/math_Powell.hxx @@ -28,10 +28,7 @@ #include #include #include -class StdFail_NotDone; -class Standard_DimensionError; class math_MultipleVarFunction; -class math_Matrix; diff --git a/src/math/math_SVD.hxx b/src/math/math_SVD.hxx index 6a729d2a77..9c55803e8c 100644 --- a/src/math/math_SVD.hxx +++ b/src/math/math_SVD.hxx @@ -27,9 +27,6 @@ #include #include #include -class StdFail_NotDone; -class Standard_DimensionError; -class math_Matrix; //! SVD implements the solution of a set of N linear equations diff --git a/src/math/math_TrigonometricFunctionRoots.hxx b/src/math/math_TrigonometricFunctionRoots.hxx index 7bb0d99b88..062d954978 100644 --- a/src/math/math_TrigonometricFunctionRoots.hxx +++ b/src/math/math_TrigonometricFunctionRoots.hxx @@ -26,9 +26,6 @@ #include #include #include -class StdFail_NotDone; -class Standard_OutOfRange; -class Standard_RangeError; //! This class implements the solutions of the equation diff --git a/src/math/math_Uzawa.hxx b/src/math/math_Uzawa.hxx index 025ed74f97..927a96c08f 100644 --- a/src/math/math_Uzawa.hxx +++ b/src/math/math_Uzawa.hxx @@ -27,9 +27,6 @@ #include #include #include -class StdFail_NotDone; -class Standard_ConstructionError; -class math_Matrix; //! This class implements a system resolution C*X = B with From 7c3daf20d143f36de88627c6969a56de0bee7c0e Mon Sep 17 00:00:00 2001 From: kgv Date: Mon, 22 Nov 2021 01:38:11 +0300 Subject: [PATCH 136/639] 0032676: Draw Harness, ViewerTest - fix NULL dereference on vanim -remove --- src/ViewerTest/ViewerTest_ViewerCommands.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ViewerTest/ViewerTest_ViewerCommands.cxx b/src/ViewerTest/ViewerTest_ViewerCommands.cxx index 19f691e34b..5fb556b6bd 100644 --- a/src/ViewerTest/ViewerTest_ViewerCommands.cxx +++ b/src/ViewerTest/ViewerTest_ViewerCommands.cxx @@ -7184,7 +7184,7 @@ static Standard_Integer VAnimation (Draw_Interpretor& theDI, || anArg == "-del" || anArg == "-delete") { - if (!aParentAnimation.IsNull()) + if (aParentAnimation.IsNull()) { ViewerTest_AnimationTimelineMap.UnBind (anAnimation->Name()); } From 7ac3f543c749b93a2ed523c060f03390cc348b91 Mon Sep 17 00:00:00 2001 From: kgv Date: Mon, 22 Nov 2021 00:25:01 +0300 Subject: [PATCH 137/639] 0032675: Draw Harness, ViewerTest - remove command vr Removed unused commands vr and Draft. --- .../draw_test_harness/draw_test_harness.md | 15 -- src/ViewerTest/ViewerTest.cxx | 173 ------------------ src/ViewerTest/ViewerTest.hxx | 2 - 3 files changed, 190 deletions(-) diff --git a/dox/user_guides/draw_test_harness/draw_test_harness.md b/dox/user_guides/draw_test_harness/draw_test_harness.md index bac7316783..91a15e4952 100644 --- a/dox/user_guides/draw_test_harness/draw_test_harness.md +++ b/dox/user_guides/draw_test_harness/draw_test_harness.md @@ -1967,21 +1967,6 @@ vsensera ~~~~ Erases active entities. - -@subsubsection occt_draw_4_3_23 vr - -Syntax: -~~~~{.php} -vr filename -~~~~ - -Reads shape from BREP-format file and displays it in the viewer. - -**Example:** -~~~~{.php} -vinit -vr myshape.brep -~~~~ @subsubsection occt_draw_4_3_24 vstate diff --git a/src/ViewerTest/ViewerTest.cxx b/src/ViewerTest/ViewerTest.cxx index 1497516ff0..cbaed8bacd 100644 --- a/src/ViewerTest/ViewerTest.cxx +++ b/src/ViewerTest/ViewerTest.cxx @@ -6193,19 +6193,6 @@ static int VDisplayType(Draw_Interpretor& , Standard_Integer argc, const char** return 0; } -static Standard_Integer vr(Draw_Interpretor& , Standard_Integer , const char** a) -{ - std::ifstream s(a[1]); - BRep_Builder builder; - TopoDS_Shape shape; - BRepTools::Read(shape, s, builder); - DBRep::Set(a[1], shape); - Handle(AIS_InteractiveContext) Ctx = ViewerTest::GetAISContext(); - Handle(AIS_Shape) ais = new AIS_Shape(shape); - Ctx->Display (ais, Standard_True); - return 0; -} - //=============================================================================================== //function : VBsdf //purpose : @@ -6900,11 +6887,6 @@ void ViewerTest::Commands(Draw_Interpretor& theCommands) "vtypes : list of known types and signatures in AIS - To be Used in vpickobject command for selection with filters", VIOTypes,group); - theCommands.Add("vr", - "vr filename" - "\n\t\t: Reads shape from BREP-format file and displays it in the viewer. ", - __FILE__,vr, group); - theCommands.Add("vselfilter", "vselfilter [-contextfilter {AND|OR}]" "\n [-type {VERTEX|EDGE|WIRE|FACE|SHAPE|SHELL|SOLID}]" @@ -6944,147 +6926,6 @@ void ViewerTest::Commands(Draw_Interpretor& theCommands) } -//===================================================================== -//========================= for testing Draft and Rib ================= -//===================================================================== -#include -#include -#include -#include -#include -#include -#include -#include -#include - -//======================================================================= -//function : IsValid -//purpose : -//======================================================================= -static Standard_Boolean IsValid(const TopTools_ListOfShape& theArgs, - const TopoDS_Shape& theResult, - const Standard_Boolean closedSolid, - const Standard_Boolean GeomCtrl) -{ - OSD_Environment check ("DONT_SWITCH_IS_VALID") ; - TCollection_AsciiString checkValid = check.Value(); - Standard_Boolean ToCheck = Standard_True; - if (!checkValid.IsEmpty()) { -#ifdef OCCT_DEBUG - std::cout <<"DONT_SWITCH_IS_VALID positionnee a :"< 4) { // == 5 - rev = Draw::Atoi(argv[5]); - Rev = (rev)? Standard_True : Standard_False; - } - - TopoDS_Face face2 = TopoDS::Face(Plane); - if(!PrsDim::GetPlaneFromFace(face2, aPln, aSurf, aSurfType, Offset)) - { - di << "TEST : Can't find plane\n"; - return 1; - } - - aDir = aPln.Axis().Direction(); - if (!aPln.Direct()) - aDir.Reverse(); - if (Plane.Orientation() == TopAbs_REVERSED) - aDir.Reverse(); - di << "TEST : gp::Resolution() = " << gp::Resolution() << "\n"; - - BRepOffsetAPI_DraftAngle Draft (Solid); - - if(Abs(anAngle)< Precision::Angular()) { - di << "TEST : NULL angle\n"; - return 1;} - - if(Rev) anAngle = - anAngle; - Draft.Add (Face, aDir, anAngle, aPln); - Draft.Build (); - if (!Draft.IsDone()) { - di << "TEST : Draft Not DONE \n"; - return 1; - } - TopTools_ListOfShape Larg; - Larg.Append(Solid); - if (!IsValid(Larg,Draft.Shape(),Standard_True,Standard_False)) { - di << "TEST : DesignAlgo returns Not valid\n"; - return 1; - } - - Handle(AIS_InteractiveContext) Ctx = ViewerTest::GetAISContext(); - Handle(AIS_Shape) ais = new AIS_Shape(Draft.Shape()); - - if ( !ais.IsNull() ) { - ais->SetColor(DEFAULT_COLOR); - ais->SetMaterial(DEFAULT_MATERIAL); - // Display the AIS_Shape without redraw - Ctx->Display(ais, Standard_False); - - const char *Name = "draft1"; - Handle(AIS_InteractiveObject) an_object; - if (GetMapOfAIS().Find2(Name, an_object)) - { - if (!an_object.IsNull()) - { - Ctx->Remove (an_object, Standard_True); - } - GetMapOfAIS().UnBind2 (Name); - } - GetMapOfAIS().Bind(ais, Name); -// DBRep::Set("draft", ais->Shape()); - } - Ctx->Display(ais, Standard_True); - return 0; -} - //============================================================================== //function : splitParameter //purpose : Split parameter string to parameter name and parameter value @@ -7111,20 +6952,6 @@ Standard_Boolean ViewerTest::SplitParameter (const TCollection_AsciiString& theS return Standard_True; } -//============================================================================ -// MyCommands -//============================================================================ -void ViewerTest::MyCommands( Draw_Interpretor& theCommands) -{ - - DrawTrSurf::BasicCommands(theCommands); - const char* group = "Check Features Operations commands"; - - theCommands.Add("Draft","Draft Solid Face Plane Angle Reverse", - __FILE__, - &TDraft,group); //Draft_Modification -} - //============================================================================== // ViewerTest::Factory //============================================================================== diff --git a/src/ViewerTest/ViewerTest.hxx b/src/ViewerTest/ViewerTest.hxx index 0b84c9775c..7f0804cbc7 100644 --- a/src/ViewerTest/ViewerTest.hxx +++ b/src/ViewerTest/ViewerTest.hxx @@ -110,8 +110,6 @@ public: Standard_EXPORT static void ViewerCommands (Draw_Interpretor& theCommands); - Standard_EXPORT static void MyCommands (Draw_Interpretor& theCommands); - Standard_EXPORT static void RelationCommands (Draw_Interpretor& theCommands); Standard_EXPORT static void ObjectCommands (Draw_Interpretor& theCommands); From d62df471b262ab4163625ab99ba653e1c0b15f17 Mon Sep 17 00:00:00 2001 From: kgv Date: Mon, 22 Nov 2021 01:54:20 +0300 Subject: [PATCH 138/639] 0032677: Coding Rules, Geom_BezierSurface - eliminate GCC warning -Wmaybe-uninitialized -fsanitize=undefined Fixed initialization of TColStd_Array1OfReal for weights. --- src/Geom/Geom_BezierSurface.cxx | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/src/Geom/Geom_BezierSurface.cxx b/src/Geom/Geom_BezierSurface.cxx index d0416d48b9..976c141e68 100644 --- a/src/Geom/Geom_BezierSurface.cxx +++ b/src/Geom/Geom_BezierSurface.cxx @@ -739,14 +739,12 @@ void Geom_BezierSurface::InsertPoleRowAfter (const Standard_Integer UIndex, Handle(TColStd_HArray2OfReal) nweights; - if (urational || vrational) { - nweights = - new TColStd_HArray2OfReal(1,poles->ColLength()+1,1,poles->RowLength()); + if (urational || vrational) + { + nweights = new TColStd_HArray2OfReal(1,poles->ColLength()+1,1,poles->RowLength()); -// TColStd_Array1OfReal CWeights(nweights->LowerCol(),nweights->UpperCol(), -// 1.0); ??????????? - TColStd_Array1OfReal CWeights(1.0, - nweights->LowerCol(),nweights->UpperCol()); + TColStd_Array1OfReal CWeights (nweights->LowerCol(), nweights->UpperCol()); + CWeights.Init (1.0); AddRatPoleRow (poles->Array2(), weights->Array2(), CPoles, CWeights, UIndex, From 3bbcf114f029bf861cc52461bbe8b76734f8d47e Mon Sep 17 00:00:00 2001 From: kgv Date: Mon, 22 Nov 2021 11:01:37 +0300 Subject: [PATCH 139/639] 0032680: Visualization, AIS_TextLabel - Bold FontAspect doesn't work Prs3d_TextAspect now sets Font_NOF_SERIF as default font instead of confusig Font_NOF_ASCII_TRIPLEX (Times-Bold). Therefore, default font now uses regular aspect, not bold. Command vdrawtext does no more set "Courier" font by default. --- src/Prs3d/Prs3d_TextAspect.cxx | 2 +- src/ViewerTest/ViewerTest_ObjectCommands.cxx | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/src/Prs3d/Prs3d_TextAspect.cxx b/src/Prs3d/Prs3d_TextAspect.cxx index 3ff268d0bf..e1a65bda40 100644 --- a/src/Prs3d/Prs3d_TextAspect.cxx +++ b/src/Prs3d/Prs3d_TextAspect.cxx @@ -26,7 +26,7 @@ IMPLEMENT_STANDARD_RTTIEXT(Prs3d_TextAspect, Prs3d_BasicAspect) // purpose : // ======================================================================= Prs3d_TextAspect::Prs3d_TextAspect() -: myTextAspect (new Graphic3d_AspectText3d (Quantity_Color (Quantity_NOC_YELLOW), Font_NOF_ASCII_TRIPLEX, 1.0, 0.0)), +: myTextAspect (new Graphic3d_AspectText3d (Quantity_Color (Quantity_NOC_YELLOW), Font_NOF_SERIF, 1.0, 0.0)), myHeight(16.0), myHorizontalJustification (Graphic3d_HTA_LEFT), myVerticalJustification (Graphic3d_VTA_BOTTOM), diff --git a/src/ViewerTest/ViewerTest_ObjectCommands.cxx b/src/ViewerTest/ViewerTest_ObjectCommands.cxx index 67b894bfeb..6fb51fff2d 100644 --- a/src/ViewerTest/ViewerTest_ObjectCommands.cxx +++ b/src/ViewerTest/ViewerTest_ObjectCommands.cxx @@ -2355,7 +2355,6 @@ static int VDrawText (Draw_Interpretor& theDI, { isNewPrs = Standard_True; aTextPrs = new AIS_TextLabel(); - aTextPrs->SetFont ("Courier"); } aTextPrs->SetText (aText); From 120dec9fb3172b87e3a1b65cd42dbcf03cdef217 Mon Sep 17 00:00:00 2001 From: kgv Date: Sun, 21 Nov 2021 23:13:41 +0300 Subject: [PATCH 140/639] 0032672: Coding Rules - eliminate GCC9 compiler warnings -Warray-bounds -fsantizize=undefined --- src/AdvApp2Var/AdvApp2Var_ApproxF2var.cxx | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/src/AdvApp2Var/AdvApp2Var_ApproxF2var.cxx b/src/AdvApp2Var/AdvApp2Var_ApproxF2var.cxx index 86f8b910de..648f5300b4 100644 --- a/src/AdvApp2Var/AdvApp2Var_ApproxF2var.cxx +++ b/src/AdvApp2Var/AdvApp2Var_ApproxF2var.cxx @@ -732,7 +732,6 @@ int mma1fdi_(integer *ndimen, /* Parameter adjustments */ - uvfonc -= 3; diftab_dim1 = *nbroot / 2 + 1; diftab_offset = diftab_dim1; diftab -= diftab_offset; @@ -778,13 +777,13 @@ int mma1fdi_(integer *ndimen, if (*isofav == 1) { ideru = *ideriv; iderv = 0; - d__1 = (uvfonc[4] - uvfonc[3]) / 2.; + d__1 = (uvfonc[1] - uvfonc[0]) / 2.; renor = AdvApp2Var_MathBase::pow__di(&d__1, ideriv); /* if Iso-V, derive by V of order IDERIV */ } else { ideru = 0; iderv = *ideriv; - d__1 = (uvfonc[6] - uvfonc[5]) / 2.; + d__1 = (uvfonc[3] - uvfonc[2]) / 2.; renor = AdvApp2Var_MathBase::pow__di(&d__1, ideriv); } @@ -794,8 +793,8 @@ int mma1fdi_(integer *ndimen, */ (*const_cast (&foncnp)).Evaluate (ndimen, - &uvfonc[3], - &uvfonc[5], + &uvfonc[0], + &uvfonc[2], isofav, tconst, &nbp, @@ -862,11 +861,11 @@ int mma1fdi_(integer *ndimen, /* If Iso-U, derive by V till order IORDRE */ if (*isofav == 1) { /* --> Factor of normalisation 1st derivative. */ - bid1 = (uvfonc[6] - uvfonc[5]) / 2.; + bid1 = (uvfonc[3] - uvfonc[2]) / 2.; i__1 = *iordre; for (iderv = 1; iderv <= i__1; ++iderv) { (*const_cast (&foncnp)).Evaluate ( - ndimen, &uvfonc[3], &uvfonc[5], isofav, tconst, & + ndimen, &uvfonc[0], &uvfonc[2], isofav, tconst, & nbp, ttable, &ideru, &iderv, &contr1[(iderv + 1) * contr1_dim1 + 1], iercod); if (*iercod > 0) { @@ -877,7 +876,7 @@ int mma1fdi_(integer *ndimen, i__1 = *iordre; for (iderv = 1; iderv <= i__1; ++iderv) { (*const_cast (&foncnp)).Evaluate ( - ndimen, &uvfonc[3], &uvfonc[5], isofav, tconst, & + ndimen, &uvfonc[0], &uvfonc[2], isofav, tconst, & nbp, &ttable[*nbroot + 1], &ideru, &iderv, &contr2[( iderv + 1) * contr2_dim1 + 1], iercod); if (*iercod > 0) { @@ -888,11 +887,11 @@ int mma1fdi_(integer *ndimen, /* If Iso-V, derive by U till order IORDRE */ } else { /* --> Factor of normalization 1st derivative. */ - bid1 = (uvfonc[4] - uvfonc[3]) / 2.; + bid1 = (uvfonc[1] - uvfonc[0]) / 2.; i__1 = *iordre; for (ideru = 1; ideru <= i__1; ++ideru) { (*const_cast (&foncnp)).Evaluate ( - ndimen, &uvfonc[3], &uvfonc[5], isofav, tconst, & + ndimen, &uvfonc[0], &uvfonc[2], isofav, tconst, & nbp, ttable, &ideru, &iderv, &contr1[(ideru + 1) * contr1_dim1 + 1], iercod); if (*iercod > 0) { @@ -903,7 +902,7 @@ int mma1fdi_(integer *ndimen, i__1 = *iordre; for (ideru = 1; ideru <= i__1; ++ideru) { (*const_cast (&foncnp)).Evaluate ( - ndimen, &uvfonc[3], &uvfonc[5], isofav, tconst, & + ndimen, &uvfonc[0], &uvfonc[2], isofav, tconst, & nbp, &ttable[*nbroot + 1], &ideru, &iderv, &contr2[( ideru + 1) * contr2_dim1 + 1], iercod); if (*iercod > 0) { From e1aa4ee31fbebd2a43a7755899bd7300761beb13 Mon Sep 17 00:00:00 2001 From: kgv Date: Mon, 22 Nov 2021 23:08:19 +0300 Subject: [PATCH 141/639] 0032682: Draw Harness, ViewerTest - add -rotationMode and -navigationMode to vcamera --- src/ViewerTest/ViewerTest_ViewerCommands.cxx | 83 ++++++++++++++++++++ 1 file changed, 83 insertions(+) diff --git a/src/ViewerTest/ViewerTest_ViewerCommands.cxx b/src/ViewerTest/ViewerTest_ViewerCommands.cxx index 5fb556b6bd..3851a1b211 100644 --- a/src/ViewerTest/ViewerTest_ViewerCommands.cxx +++ b/src/ViewerTest/ViewerTest_ViewerCommands.cxx @@ -9007,6 +9007,85 @@ static int VCamera (Draw_Interpretor& theDI, } ViewerTest::CurrentEventManager()->SetLockOrbitZUp (toLockUp); } + else if (anArgCase == "-rotationmode" + || anArgCase == "-rotmode") + { + AIS_RotationMode aRotMode = AIS_RotationMode_BndBoxActive; + TCollection_AsciiString aRotStr ((anArgIter + 1 < theArgsNb) ? theArgVec[anArgIter + 1] : ""); + aRotStr.LowerCase(); + if (aRotStr == "bndboxactive" + || aRotStr == "active") + { + aRotMode = AIS_RotationMode_BndBoxActive; + } + else if (aRotStr == "picklast" + || aRotStr == "pick") + { + aRotMode = AIS_RotationMode_PickLast; + } + else if (aRotStr == "pickcenter") + { + aRotMode = AIS_RotationMode_PickCenter; + } + else if (aRotStr == "cameraat" + || aRotStr == "cameracenter") + { + aRotMode = AIS_RotationMode_CameraAt; + } + else if (aRotStr == "bndboxscene" + || aRotStr == "boxscene") + { + aRotMode = AIS_RotationMode_BndBoxScene; + } + else + { + Message::SendFail() << "Syntax error at '" << theArgVec[anArgIter] << "'"; + return 1; + } + + ViewerTest::CurrentEventManager()->SetRotationMode (aRotMode); + ++anArgIter; + } + else if (anArgCase == "-navigationmode" + || anArgCase == "-navmode") + { + AIS_NavigationMode aNavMode = AIS_NavigationMode_Orbit; + TCollection_AsciiString aNavStr ((anArgIter + 1 < theArgsNb) ? theArgVec[anArgIter + 1] : ""); + aNavStr.LowerCase(); + if (aNavStr == "orbit") + { + aNavMode = AIS_NavigationMode_Orbit; + } + else if (aNavStr == "flight" + || aNavStr == "fly" + || aNavStr == "copter" + || aNavStr == "helicopter") + { + aNavMode = AIS_NavigationMode_FirstPersonFlight; + } + else if (aNavStr == "walk" + || aNavStr == "shooter") + { + aNavMode = AIS_NavigationMode_FirstPersonWalk; + } + else + { + Message::SendFail() << "Syntax error at '" << theArgVec[anArgIter] << "'"; + return 1; + } + + Handle(ViewerTest_EventManager) aViewMgr = ViewerTest::CurrentEventManager(); + aViewMgr->SetNavigationMode (aNavMode); + if (aNavMode == AIS_NavigationMode_Orbit) + { + aViewMgr->ChangeMouseGestureMap().Bind (Aspect_VKeyMouse_LeftButton, AIS_MouseGesture_RotateOrbit); + } + else + { + aViewMgr->ChangeMouseGestureMap().Bind (Aspect_VKeyMouse_LeftButton, AIS_MouseGesture_RotateView); + } + ++anArgIter; + } else if (anArgCase == "-fov" || anArgCase == "-fovy" || anArgCase == "-fovx" @@ -14066,6 +14145,8 @@ void ViewerTest::ViewerCommands(Draw_Interpretor& theCommands) "\n\t\t: [-iod [Distance]] [-iodType [absolute|relative]]" "\n\t\t: [-zfocus [Value]] [-zfocusType [absolute|relative]]" "\n\t\t: [-fov2d [Angle]] [-lockZup {0|1}]" + "\n\t\t: [-rotationMode {active|pick|pickCenter|cameraAt|scene}]" + "\n\t\t: [-navigationMode {orbit|walk|flight}]" "\n\t\t: [-xrPose base|head=base]" "\n\t\t: Manages camera parameters." "\n\t\t: Displays frustum when presentation name PrsName is specified." @@ -14078,6 +14159,8 @@ void ViewerTest::ViewerCommands(Draw_Interpretor& theCommands) "\n\t\t: -fov2d field of view limit for 2d on-screen elements" "\n\t\t: -distance distance of eye from camera center" "\n\t\t: -lockZup lock Z up (tunrtable mode)" + "\n\t\t: -rotationMode rotation mode (gravity point)" + "\n\t\t: -navigationMode navigation mode" "\n\t\t: Stereoscopic camera:" "\n\t\t: -stereo perspective projection (stereo)" "\n\t\t: -leftEye perspective projection (left eye)" From 87b7b496ec8a60356ebc498a55b9c40ab1a76f9a Mon Sep 17 00:00:00 2001 From: msv Date: Mon, 22 Nov 2021 03:28:24 +0300 Subject: [PATCH 142/639] 0032679: Data Exchange - STEP writer loses assembly instance name In STEPCAFControl_Writer::WriteNames, write the names of components even if the name of the assembly is absent. In STEPControl_ActorWrite::TransferSubShape, move assembly structure information to the beginning of the list of results, so that CDSR information of this assembly became preceding CDSR of any sub shapes. --- src/STEPCAFControl/STEPCAFControl_Writer.cxx | 49 +++++++++----------- src/STEPControl/STEPControl_ActorWrite.cxx | 28 +++++++---- tests/bugs/step/bug32679 | 36 ++++++++++++++ 3 files changed, 76 insertions(+), 37 deletions(-) create mode 100644 tests/bugs/step/bug32679 diff --git a/src/STEPCAFControl/STEPCAFControl_Writer.cxx b/src/STEPCAFControl/STEPCAFControl_Writer.cxx index fa9b2069d9..aadce19df2 100644 --- a/src/STEPCAFControl/STEPCAFControl_Writer.cxx +++ b/src/STEPCAFControl/STEPCAFControl_Writer.cxx @@ -1411,36 +1411,31 @@ Standard_Boolean STEPCAFControl_Writer::WriteNames (const Handle(XSControl_WorkS // get name Handle(TCollection_HAsciiString) hName = new TCollection_HAsciiString; - if ( ! GetLabelName (L, hName) ) continue; -// Handle(TDataStd_Name) N; -// if ( ! L.FindAttribute ( TDataStd_Name::GetID(), N ) ) continue; -// TCollection_ExtendedString name = N->Get(); -// if ( name.Length() <=0 ) continue; - - // find target STEP entity for the current shape -// TopoDS_Shape S; -// if ( ! XCAFDoc_ShapeTool::GetShape ( L, S ) ) continue; - if ( ! myLabels.IsBound ( L ) ) continue; // not recorded as translated, skip - TopoDS_Shape S = myLabels.Find ( L ); + if (GetLabelName (L, hName)) + { + // find target STEP entity for the current shape + if ( ! myLabels.IsBound ( L ) ) continue; // not recorded as translated, skip + TopoDS_Shape S = myLabels.Find ( L ); - Handle(StepShape_ShapeDefinitionRepresentation) SDR; - Handle(TransferBRep_ShapeMapper) mapper = TransferBRep::ShapeMapper ( FP, S ); - if ( ! FP->FindTypedTransient ( mapper, STANDARD_TYPE(StepShape_ShapeDefinitionRepresentation), SDR ) ) { + Handle(StepShape_ShapeDefinitionRepresentation) SDR; + Handle(TransferBRep_ShapeMapper) mapper = TransferBRep::ShapeMapper ( FP, S ); + if ( ! FP->FindTypedTransient ( mapper, STANDARD_TYPE(StepShape_ShapeDefinitionRepresentation), SDR ) ) { #ifdef OCCT_DEBUG - std::cout << "Warning: Cannot find SDR for " << S.TShape()->DynamicType()->Name() << std::endl; + std::cout << "Warning: Cannot find SDR for " << S.TShape()->DynamicType()->Name() << std::endl; #endif - continue; - } + continue; + } - // set the name to the PRODUCT - Handle(StepRepr_PropertyDefinition) PropD = SDR->Definition().PropertyDefinition(); - if ( PropD.IsNull() ) continue; - Handle(StepBasic_ProductDefinition) PD = PropD->Definition().ProductDefinition(); - if ( PD.IsNull() ) continue; - Handle(StepBasic_Product) Prod = PD->Formation()->OfProduct(); + // set the name to the PRODUCT + Handle(StepRepr_PropertyDefinition) PropD = SDR->Definition().PropertyDefinition(); + if ( PropD.IsNull() ) continue; + Handle(StepBasic_ProductDefinition) PD = PropD->Definition().ProductDefinition(); + if ( PD.IsNull() ) continue; + Handle(StepBasic_Product) Prod = PD->Formation()->OfProduct(); - Prod->SetId ( hName ); - Prod->SetName ( hName ); + Prod->SetId ( hName ); + Prod->SetName ( hName ); + } // write names for components of assemblies if ( XCAFDoc_ShapeTool::IsAssembly ( L ) ) { @@ -1453,14 +1448,14 @@ Standard_Boolean STEPCAFControl_Writer::WriteNames (const Handle(XSControl_WorkS TDF_Label Lref; if ( ! XCAFDoc_ShapeTool::GetReferredShape ( lab, Lref ) || ! myLabels.IsBound ( Lref ) ) continue; - S = myLabels.Find ( Lref ); + TopoDS_Shape S = myLabels.Find ( Lref ); S.Move ( XCAFDoc_ShapeTool::GetLocation ( lab ) ); hName = new TCollection_HAsciiString; if ( ! GetLabelName (lab, hName) ) continue; // find the target CDSR corresponding to a shape - mapper = TransferBRep::ShapeMapper ( FP, S ); + Handle(TransferBRep_ShapeMapper) mapper = TransferBRep::ShapeMapper ( FP, S ); Handle(Transfer_Binder) binder = FP->Find ( mapper ); Handle(StepShape_ContextDependentShapeRepresentation) CDSR; if ( ! FP->FindTypedTransient (mapper,STANDARD_TYPE(StepShape_ContextDependentShapeRepresentation), CDSR) ) diff --git a/src/STEPControl/STEPControl_ActorWrite.cxx b/src/STEPControl/STEPControl_ActorWrite.cxx index 43092ac3a7..e83fd17279 100644 --- a/src/STEPControl/STEPControl_ActorWrite.cxx +++ b/src/STEPControl/STEPControl_ActorWrite.cxx @@ -1466,15 +1466,15 @@ Handle(Transfer_Binder) STEPControl_ActorWrite::TransferSubShape // if shape itself not yet translated, do it now //:abv 20.05.02: see comment in TransferShape(): added "! iasdr ||" Handle(Transfer_Binder) resprod = TransientResult(sdr); //KA - OCC7141(skl 10.11.2004) + bool isJustTransferred = false; if ( ! iasdr || resbind.IsNull() ) { resbind = TransferShape(mapper, sdr, FP, shapeGroup, isManifold, theProgress); + if (resbind.IsNull()) + return resbind; Handle(Transfer_Binder) oldbind = FP->Find ( mapper ); if ( ! oldbind.IsNull() && !resbind.IsNull()) resbind->AddResult ( oldbind ); - FP->Bind (mapper,resbind); - resprod=resbind; //KA - OCC7141(skl 10.11.2004) + isJustTransferred = true; } - if (resprod.IsNull()) - return resprod; // A new resbind may have been produced // DeclareAndCast(Transfer_SimpleBinderOfTransient,restrans,resbind); @@ -1498,20 +1498,28 @@ Handle(Transfer_Binder) STEPControl_ActorWrite::TransferSubShape //KA: we need only the current subshape in resprod, since the binder is copied // in Transfershape which calls Transfersubshape [ OCC7141(skl 10.11.2004) ] if ( ! iasdr ) { - resprod->AddResult ( TransientResult ( SDRTool.SDRValue() ) ); - resbind->AddResult ( TransientResult ( SDRTool.SDRValue() ) ); //KA - OCC7141(skl 10.11.2004) + resprod->AddResult (TransientResult (sdr)); + if (resprod != resbind) + resbind->AddResult (TransientResult (sdr)); //KA - OCC7141(skl 10.11.2004) roots->Append ( myContext.GetRootsForPart ( SDRTool ) ); } for ( Standard_Integer i=1; i <= roots->Length(); i++ ) { resprod->AddResult ( TransientResult ( roots->Value(i) ) ); - resbind->AddResult ( TransientResult ( roots->Value(i) ) ); //KA - OCC7141(skl 10.11.2004) + if (resprod != resbind) + resbind->AddResult (TransientResult (roots->Value(i))); //KA - OCC7141(skl 10.11.2004) + } + if (isJustTransferred) + { + // We make CDSR of the current shape preceding CDSR of any subshapes, + // therefore add resbind at the end. + resprod->AddResult (resbind); + FP->Bind (mapper, resprod); } - myContext.NextIndex(); - //FP->Bind (mapper,resprod); //KA - OCC7141(skl 10.11.2004) + myContext.NextIndex(); // abv 16.10.00: bind CDSR (et al) to located shape in order to be able to track instances - if ( mapper != start ) { + if (mapper != start && aLoc.Form() != gp_Identity) { Handle(Transfer_Binder) bnd = FP->Find ( start ); for ( Standard_Integer j=1; j <= roots->Length(); j++ ) if ( bnd.IsNull() ) bnd = TransientResult ( roots->Value(j) ); diff --git a/tests/bugs/step/bug32679 b/tests/bugs/step/bug32679 new file mode 100644 index 0000000000..55eb8310e7 --- /dev/null +++ b/tests/bugs/step/bug32679 @@ -0,0 +1,36 @@ +puts "====================================" +puts "0032679: Data Exchange - STEP writer loses assembly instance name" +puts "====================================" +puts "" + +pload OCAF + +proc CheckName {doc1 doc2 lab} { + upvar $doc1 d1 $doc2 d2 + puts "Checking name [set name1 [GetName d1 $lab]]" + if [catch {set name2 [GetName d2 $lab]}] { + puts "Error: name at label $lab is not found" + } + if {$name1 != $name2} { + puts "Error: at label $lab expected name $name1 but found $name2" + } +} + +proc RunTestWithFile {file} { + global imagedir + puts "Testing file $file" + XOpen [locate_data_file $file] d1 + WriteStep d1 ${imagedir}/${file}.step + ReadStep d2 ${imagedir}/${file}.step + + CheckName d1 d2 0:1:1:1:1 + CheckName d1 d2 0:1:1:2:1 + CheckName d1 d2 0:1:1:3:1 + + Close d1 + Close d2 + file delete ${imagedir}/${file}.step +} + +RunTestWithFile as1-no-ass-name.xbf +RunTestWithFile as1-with-ass-name.xbf From b6b55c3d96ed10d4fccac8873827f76203b9d087 Mon Sep 17 00:00:00 2001 From: kgv Date: Wed, 24 Nov 2021 00:08:21 +0300 Subject: [PATCH 143/639] 0032686: Visualization, Wasm_Window - filter out unexpected pressed buttons state within mouse move / up events Wasm_Window::ProcessMouseEvent() now ignores not previously pressed mouse buttons within mouse move / up events. Fixed -Wshorten-64-to-32 compiler warning within cpulimit command on 32-bit Linux. --- src/Draw/Draw_BasicCommands.cxx | 16 +++++++++++----- src/Wasm/Wasm_Window.cxx | 9 +++++++-- 2 files changed, 18 insertions(+), 7 deletions(-) diff --git a/src/Draw/Draw_BasicCommands.cxx b/src/Draw/Draw_BasicCommands.cxx index 0f8dd40da0..d8d0bb0c69 100644 --- a/src/Draw/Draw_BasicCommands.cxx +++ b/src/Draw/Draw_BasicCommands.cxx @@ -636,15 +636,21 @@ static Standard_Integer cpulimit(Draw_Interpretor& di, Standard_Integer n, const rlimit rlp; rlp.rlim_max = RLIM_INFINITY; if (n <= 1) + { rlp.rlim_cur = RLIM_INFINITY; + } else + { rlp.rlim_cur = GetCpuLimit (a[1]); - CPU_LIMIT = rlp.rlim_cur; + } - int status; - status=setrlimit(RLIMIT_CPU,&rlp); - if (status !=0) - di << "status cpulimit setrlimit : " << status << "\n"; + CPU_LIMIT = (clock_t )rlp.rlim_cur; + + int aStatus = setrlimit (RLIMIT_CPU, &rlp); + if (aStatus != 0) + { + di << "status cpulimit setrlimit : " << aStatus << "\n"; + } // set signal handler to print a message before death struct sigaction act, oact; diff --git a/src/Wasm/Wasm_Window.cxx b/src/Wasm/Wasm_Window.cxx index 985333b634..71e44783d7 100644 --- a/src/Wasm/Wasm_Window.cxx +++ b/src/Wasm/Wasm_Window.cxx @@ -276,14 +276,19 @@ bool Wasm_Window::ProcessMouseEvent (Aspect_WindowInputListener& theListener, if (theEvent->metaKey == EM_TRUE) { aFlags |= Aspect_VKeyFlags_META; } const bool isEmulated = false; - const Aspect_VKeyMouse aButtons = Wasm_Window::MouseButtonsFromNative (theEvent->buttons); + const Aspect_VKeyMouse aButtonsOld = theListener.PressedMouseButtons(); + Aspect_VKeyMouse aButtons = Wasm_Window::MouseButtonsFromNative (theEvent->buttons); + if (theEventType != EMSCRIPTEN_EVENT_MOUSEDOWN) + { + aButtons &= aButtonsOld; // filter out unexpected buttons + } switch (theEventType) { case EMSCRIPTEN_EVENT_MOUSEMOVE: { if ((aNewPos2i.x() < 0 || aNewPos2i.x() > mySize.x() || aNewPos2i.y() < 0 || aNewPos2i.y() > mySize.y()) - && theListener.PressedMouseButtons() == Aspect_VKeyMouse_NONE) + && aButtonsOld == Aspect_VKeyMouse_NONE) { return false; } From 4e69a6ac051953c6b67205f24797cd1a6b9e385c Mon Sep 17 00:00:00 2001 From: kgv Date: Thu, 25 Nov 2021 00:05:19 +0300 Subject: [PATCH 144/639] 0032685: Draw Harness - help output smashes command names without delimiter "help" procedure now ensures to put space between listed commands. --- src/DrawResources/StandardCommands.tcl | 51 ++++++++++++++------------ 1 file changed, 28 insertions(+), 23 deletions(-) diff --git a/src/DrawResources/StandardCommands.tcl b/src/DrawResources/StandardCommands.tcl index bcebbde545..bfeab27295 100644 --- a/src/DrawResources/StandardCommands.tcl +++ b/src/DrawResources/StandardCommands.tcl @@ -30,51 +30,56 @@ set tcl_prompt2 {puts -nonewline "> "} ################################################# # the help command in TCL ################################################# -proc help {{command ""} {helpstring ""} {group "Procedures"}} { +proc help {{theCommand ""} {theHelpString ""} {theGroup "Procedures"}} { global Draw_Helps Draw_Groups - if {$command == ""} { + if {$theCommand == ""} { # help general - foreach h [lsort [array names Draw_Groups]] { - dputs -intense "\n\n$h" - set i 0 - foreach f [lsort $Draw_Groups($h)] { - if {$i == 0} { - puts "" - puts -nonewline " " + set aCmdWidth 15 + foreach aGrpIter [lsort [array names Draw_Groups]] { + dputs -intense "\n\n$aGrpIter" + set i 1 + set aLine "" + foreach aCmdIter [lsort $Draw_Groups($aGrpIter)] { + if {$i == 1} { + puts -nonewline "$aLine\n" + set aLine " " } - puts -nonewline $f - for {set j [string length $f]} {$j < 15} {incr j} { - puts -nonewline " " + + append aLine $aCmdIter + set aLineLen [string length $aLine] + for {set j [expr $aLineLen + 1]} {$j < [expr $aCmdWidth * $i + 2]} {incr j} { + append aLine " " } + append aLine " " incr i - if {$i == 4} {set i 0} + if {$i == 5} {set i 1} } - puts "" + puts "$aLine" } - } elseif {$helpstring == ""} { + } elseif {$theHelpString == ""} { # help function - set isfound 0 + set isFound 0 foreach f [lsort [array names Draw_Helps]] { - if {[string match $command $f]} { + if {[string match $theCommand $f]} { dputs -nonewline -intense $f for {set j [string length $f]} {$j < 15} {incr j} { puts -nonewline " " } puts " : $Draw_Helps($f)" - set isfound 1 + set isFound 1 } } - if {!$isfound} { - if {[string first * $command] != -1} { + if {!$isFound} { + if {[string first * $theCommand] != -1} { puts "No matching commands found!" } else { - puts "No help found for '$command'! Please try 'help $command*' to find matching commands." + puts "No help found for '$theCommand'! Please try 'help $theCommand*' to find matching commands." } } } else { # set help - lappend Draw_Groups($group) $command - set Draw_Helps($command) $helpstring + lappend Draw_Groups($theGroup) $theCommand + set Draw_Helps($theCommand) $theHelpString } flush stdout } From d0cf7e8f3c23c4518d75d4f3f635382c8db411aa Mon Sep 17 00:00:00 2001 From: kgv Date: Tue, 23 Nov 2021 20:35:58 +0300 Subject: [PATCH 145/639] 0032684: Draw Harness - fix Draw_Interpretor::Add() misuse due to overloaded syntax --- src/BRepTest/BRepTest_CurveCommands.cxx | 8 ++-- src/BRepTest/BRepTest_FeatureCommands.cxx | 28 ++++++------ src/BRepTest/BRepTest_FilletCommands.cxx | 6 +-- src/DBRep/DBRep.cxx | 4 +- src/Draw/Draw_Interpretor.cxx | 13 +++--- .../GeometryTest_CurveCommands.cxx | 3 +- src/QABugs/QABugs_3.cxx | 2 +- src/ViewerTest/ViewerTest.cxx | 8 ++-- src/ViewerTest/ViewerTest_ViewerCommands.cxx | 4 +- src/XDEDRAW/XDEDRAW_GDTs.cxx | 2 +- src/XSDRAW/XSDRAW.cxx | 43 ++++++++++++------- 11 files changed, 65 insertions(+), 56 deletions(-) diff --git a/src/BRepTest/BRepTest_CurveCommands.cxx b/src/BRepTest/BRepTest_CurveCommands.cxx index 3bc29731b6..3039254739 100644 --- a/src/BRepTest/BRepTest_CurveCommands.cxx +++ b/src/BRepTest/BRepTest_CurveCommands.cxx @@ -1915,11 +1915,11 @@ void BRepTest::CurveCommands(Draw_Interpretor& theCommands) theCommands.Add("mkoffset", "mkoffset result face/compound of wires nboffset stepoffset [jointype(a/i) [alt]]",__FILE__, - mkoffset); + mkoffset,g); theCommands.Add("openoffset", "openoffset result face/wire nboffset stepoffset [jointype(a/i)]",__FILE__, - openoffset); + openoffset,g); theCommands.Add("mkedge", "mkedge edge curve [surface] [pfirst plast] [vfirst [pfirst] vlast [plast]] ",__FILE__, @@ -1967,11 +1967,11 @@ void BRepTest::CurveCommands(Draw_Interpretor& theCommands) edgeintersector,g); theCommands.Add("build3d", - "build3d S [tol]", + "build3d S [tol]",__FILE__, build3d, g); theCommands.Add("reducepcurves", - "reducepcurves shape1 shape2 ...", + "reducepcurves shape1 shape2 ...",__FILE__, reducepcurves, g); theCommands.Add("concatC0wire", diff --git a/src/BRepTest/BRepTest_FeatureCommands.cxx b/src/BRepTest/BRepTest_FeatureCommands.cxx index ccccc457f6..c3ebfcc734 100644 --- a/src/BRepTest/BRepTest_FeatureCommands.cxx +++ b/src/BRepTest/BRepTest_FeatureCommands.cxx @@ -2502,7 +2502,7 @@ void BRepTest::FeatureCommands(Draw_Interpretor& theCommands) theCommands.Add("offsetparameter", "offsetparameter Tol Inter(c/p) JoinType(a/i/t) [RemoveInternalEdges(r/k)]", - __FILE__, offsetparameter); + __FILE__, offsetparameter, g); theCommands.Add("offsetload", "offsetload shape offset bouchon1 bouchon2 ...", @@ -2523,53 +2523,53 @@ void BRepTest::FeatureCommands(Draw_Interpretor& theCommands) theCommands.Add("featprism", "Defines the arguments for a prism : featprism shape element skface Dirx Diry Dirz Fuse(0/1/2) Modify(0/1)", - __FILE__, DEFIN); + __FILE__, DEFIN, g); theCommands.Add("featrevol", "Defines the arguments for a revol : featrevol shape element skface Ox Oy Oz Dx Dy Dz Fuse(0/1/2) Modify(0/1)", - __FILE__, DEFIN); + __FILE__, DEFIN, g); theCommands.Add("featpipe", "Defines the arguments for a pipe : featpipe shape element skface spine Fuse(0/1/2) Modify(0/1)", - __FILE__, DEFIN); + __FILE__, DEFIN, g); theCommands.Add("featdprism", "Defines the arguments for a drafted prism : featdprism shape face skface angle Fuse(0/1/2) Modify(0/1)", - __FILE__, DEFIN); + __FILE__, DEFIN, g); theCommands.Add("featlf", "Defines the arguments for a linear rib or slot : featlf shape wire plane DirX DirY DirZ DirX DirY DirZ Fuse(0/1/2) Modify(0/1)", - __FILE__, DEFIN); + __FILE__, DEFIN, g); theCommands.Add("featrf", "Defines the arguments for a rib or slot of revolution : featrf shape wire plane X Y Z DirX DirY DirZ Size Size Fuse(0/1/2) Modify(0/1)", - __FILE__, DEFIN); + __FILE__, DEFIN, g); theCommands.Add("addslide", " Adds sliding elements : addslide prism/revol/pipe edge face [edge face...]", - __FILE__, ADD); + __FILE__, ADD, g); theCommands.Add("featperform", " Performs the prism revol dprism linform or pipe :featperform prism/revol/pipe/dprism/lf result [[Ffrom] Funtil]", - __FILE__, PERF); + __FILE__, PERF, g); theCommands.Add("featperformval", " Performs the prism revol dprism or linform with a value :featperformval prism/revol/dprism/lf result value", - __FILE__, PERF); + __FILE__, PERF, g); theCommands.Add("endedges", " Return top and bottom edges of dprism :endedges dprism shapetop shapebottom First/LastShape (1/2)", - __FILE__, BOSS); + __FILE__, BOSS, g); theCommands.Add("fillet", " Perform fillet on compounds of edges :fillet result object rad1 comp1 rad2 comp2 ...", - __FILE__, BOSS); + __FILE__, BOSS, g); theCommands.Add("bossage", " Perform fillet on top and bottom edges of dprism :bossage dprism result radtop radbottom First/LastShape (1/2)", - __FILE__, BOSS); + __FILE__, BOSS, g); theCommands.Add("offsetshapesimple", "offsetshapesimple result shape offsetvalue [solid] [tolerance=1e-7]", - __FILE__, ComputeSimpleOffset); + __FILE__, ComputeSimpleOffset, g); } diff --git a/src/BRepTest/BRepTest_FilletCommands.cxx b/src/BRepTest/BRepTest_FilletCommands.cxx index 18d39c1800..281f58e566 100644 --- a/src/BRepTest/BRepTest_FilletCommands.cxx +++ b/src/BRepTest/BRepTest_FilletCommands.cxx @@ -757,15 +757,15 @@ void BRepTest::FilletCommands(Draw_Interpretor& theCommands) theCommands.Add("rollingball", "rollingball r S radius [stopf1 ..] @ [f1 f2 ..] @ [e1 ..]", __FILE__, - rollingball); + rollingball, g); theCommands.Add("brollingball", "brollingball r S radius [stopf1 ..] @ [f1 f2 ..] @ [e1 ..]", __FILE__, - rollingball); + rollingball, g); theCommands.Add("trollingball", "trollingball r S radius [stopf1 ..] @ [f1 f2 ..] @ [e1 ..]", __FILE__, - rollingball); + rollingball, g); } diff --git a/src/DBRep/DBRep.cxx b/src/DBRep/DBRep.cxx index 6e2662b850..e2e03fff0d 100644 --- a/src/DBRep/DBRep.cxx +++ b/src/DBRep/DBRep.cxx @@ -1709,8 +1709,6 @@ void DBRep::BasicCommands(Draw_Interpretor& theCommands) "setflags shape_name flag1[flag2...]\n sets flags for shape(free, modified, checked, orientable, closed, infinite, convex, locked), for example or if necessary unflag ", __FILE__,setFlags,g); -// theCommands.Add("dumpmmgt", -// "dump le contenu du gestionnaire de memoire",__FILE__,dumpmmgt,g); theCommands.Add("purgemmgt", "returns the free memory from the system to the memory manager", __FILE__,purgemmgt,g); @@ -1722,7 +1720,7 @@ void DBRep::BasicCommands(Draw_Interpretor& theCommands) "\n\t\t +|-t : switch on/off output to tcl of Progress Indicator" "\n\t\t +|-c : switch on/off output to cout of Progress Indicator" "\n\t\t +|-g : switch on/off graphical mode of Progress Indicator", - XProgress,"DE: General"); + __FILE__, XProgress,"DE: General"); theCommands.Add("writebrep", "writebrep shape filename [-binary {0|1}]=0 [-version Version]=4" "\n\t\t: [-triangles {0|1}]=1 [-normals {0|1}]=0" diff --git a/src/Draw/Draw_Interpretor.cxx b/src/Draw/Draw_Interpretor.cxx index 04f8370815..c797aa471e 100644 --- a/src/Draw/Draw_Interpretor.cxx +++ b/src/Draw/Draw_Interpretor.cxx @@ -316,14 +316,11 @@ void Draw_Interpretor::add (const Standard_CString theCommandName, { Standard_ASSERT_RAISE (myInterp != NULL, "Attempt to add command to Null interpretor"); - Standard_PCharacter aName = (Standard_PCharacter )theCommandName; - Standard_PCharacter aHelp = (Standard_PCharacter )theHelp; - Standard_PCharacter aGroup = (Standard_PCharacter )theGroup; - Tcl_CreateCommand (myInterp, aName, CommandCmd, (ClientData )theCallback, CommandDelete); + Tcl_CreateCommand (myInterp, theCommandName, CommandCmd, (ClientData )theCallback, CommandDelete); // add the help - Tcl_SetVar2 (myInterp, "Draw_Helps", aName, aHelp, TCL_GLOBAL_ONLY); - Tcl_SetVar2 (myInterp, "Draw_Groups", aGroup, aName, + Tcl_SetVar2 (myInterp, "Draw_Helps", theCommandName, theHelp, TCL_GLOBAL_ONLY); + Tcl_SetVar2 (myInterp, "Draw_Groups", theGroup, theCommandName, TCL_GLOBAL_ONLY | TCL_APPEND_VALUE | TCL_LIST_ELEMENT); // add path to source file (keep not more than two last subdirectories) @@ -344,8 +341,10 @@ void Draw_Interpretor::add (const Standard_CString theCommandName, TCollection_AsciiString aSrcPath; aPath.SystemName (aSrcPath); if (aSrcPath.Value(1) == '/') + { aSrcPath.Remove(1); - Tcl_SetVar2 (myInterp, "Draw_Files", aName, aSrcPath.ToCString(), TCL_GLOBAL_ONLY); + } + Tcl_SetVar2 (myInterp, "Draw_Files", theCommandName, aSrcPath.ToCString(), TCL_GLOBAL_ONLY); } //======================================================================= diff --git a/src/GeometryTest/GeometryTest_CurveCommands.cxx b/src/GeometryTest/GeometryTest_CurveCommands.cxx index fc26d2d158..cfc04e62b1 100644 --- a/src/GeometryTest/GeometryTest_CurveCommands.cxx +++ b/src/GeometryTest/GeometryTest_CurveCommands.cxx @@ -1819,7 +1819,8 @@ void GeometryTest::CurveCommands(Draw_Interpretor& theCommands) theCommands.Add("projonplane", "projonplane r C3d Plane [dx dy dz] [0/1]", - projonplane); + __FILE__, + projonplane, g); theCommands.Add("bisec", "bisec result line/circle/point line/circle/point", diff --git a/src/QABugs/QABugs_3.cxx b/src/QABugs/QABugs_3.cxx index 9250364b10..4ade954498 100644 --- a/src/QABugs/QABugs_3.cxx +++ b/src/QABugs/QABugs_3.cxx @@ -1267,7 +1267,7 @@ void QABugs::Commands_3(Draw_Interpretor& theCommands) { theCommands.Add("BUC60856","BUC60856",__FILE__,BUC60856,group); - theCommands.Add("coordload","load coord from file",__FILE__,coordload); + theCommands.Add("coordload","load coord from file",__FILE__,coordload,group); theCommands.Add("TestMem","TestMem",__FILE__,TestMem,group); theCommands.Add("BUC60945","BUC60945",__FILE__,TestMem,group); diff --git a/src/ViewerTest/ViewerTest.cxx b/src/ViewerTest/ViewerTest.cxx index cbaed8bacd..acfb950601 100644 --- a/src/ViewerTest/ViewerTest.cxx +++ b/src/ViewerTest/ViewerTest.cxx @@ -6590,7 +6590,7 @@ void ViewerTest::Commands(Draw_Interpretor& theCommands) "\n\t\t: -highmode Sets hilight mode for objects." "\n\t\t: -redisplay Recomputes presentation of objects." "\n\t\t: -noecho Avoid printing of command results." - "\n\t\t: -autoTriang Enable/disable auto-triangulation for displayed shape." + "\n\t\t: -autoTriang Enable/disable auto-triangulation for displayed shape.", __FILE__, VDisplay2, group); theCommands.Add ("vnbdisplayed", @@ -6863,12 +6863,12 @@ void ViewerTest::Commands(Draw_Interpretor& theCommands) theCommands.Add("vtexrepeat", "vtexrepeat name RepeatU RepeatV" "\n\t\t: Alias for vtexture name -setRepeat RepeatU RepeatV.", - VTexture,group); + __FILE__, VTexture, group); theCommands.Add("vtexdefault", "vtexdefault name" "\n\t\t: Alias for vtexture name -default.", - VTexture,group); + __FILE__, VTexture, group); theCommands.Add("vstate", "vstate [-entities] [-hasSelected] [name1] ... [nameN]" @@ -6885,7 +6885,7 @@ void ViewerTest::Commands(Draw_Interpretor& theCommands) theCommands.Add("vtypes", "vtypes : list of known types and signatures in AIS - To be Used in vpickobject command for selection with filters", - VIOTypes,group); + __FILE__, VIOTypes, group); theCommands.Add("vselfilter", "vselfilter [-contextfilter {AND|OR}]" diff --git a/src/ViewerTest/ViewerTest_ViewerCommands.cxx b/src/ViewerTest/ViewerTest_ViewerCommands.cxx index 3851a1b211..9c5194ac71 100644 --- a/src/ViewerTest/ViewerTest_ViewerCommands.cxx +++ b/src/ViewerTest/ViewerTest_ViewerCommands.cxx @@ -13729,7 +13729,7 @@ void ViewerTest::ViewerCommands(Draw_Interpretor& theCommands) "\n\t\t: for example '+Z' will show front of the model," "\n\t\t: '-X-Y+Z' will define left axonometrical view." "\n\t\t: -frame define camera Up and Right directions (regardless Up convention);" - "\n\t\t: for example '+X+Z' will show front of the model with Z-up." + "\n\t\t: for example '+X+Z' will show front of the model with Z-up.", __FILE__,VViewProj,group); theCommands.Add("vtop" , "vtop or : Top view. Orientation +X+Y" , @@ -13754,7 +13754,7 @@ void ViewerTest::ViewerCommands(Draw_Interpretor& theCommands) __FILE__,VViewProj,group); theCommands.Add("vpick" , "vpick : vpick X Y Z [shape subshape] ( all variables as string )", - VPick,group); + __FILE__, VPick, group); theCommands.Add("vfit", "vfit or [-selected] [-noupdate]" "\n\t\t: [-selected] fits the scene according to bounding box of currently selected objects", diff --git a/src/XDEDRAW/XDEDRAW_GDTs.cxx b/src/XDEDRAW/XDEDRAW_GDTs.cxx index ccb5cdf64c..e338b354f7 100644 --- a/src/XDEDRAW/XDEDRAW_GDTs.cxx +++ b/src/XDEDRAW/XDEDRAW_GDTs.cxx @@ -3075,7 +3075,7 @@ void XDEDRAW_GDTs::InitCommands(Draw_Interpretor& di) di.Add("XGetGDTAffectedPlane", "XGetGDTAffectedPlane Doc GDT_Label Plane" "Returns affected plane into Plane", __FILE__, getGDTAffectedPlane, g); - di.Add("XGetGDTSemanticName", "XGetGDTSemanticName Doc GDT_Label" + di.Add("XGetGDTSemanticName", "XGetGDTSemanticName Doc GDT_Label", __FILE__, getGDTSemanticName, g); di.Add("XSetGDTSemanticName", "XSetGDTSemanticName Doc GDT_Label Name" diff --git a/src/XSDRAW/XSDRAW.cxx b/src/XSDRAW/XSDRAW.cxx index da26af4e59..27f24e5b65 100644 --- a/src/XSDRAW/XSDRAW.cxx +++ b/src/XSDRAW/XSDRAW.cxx @@ -123,23 +123,34 @@ void XSDRAW::LoadDraw (Draw_Interpretor& theCommands) XSDRAW::RemoveCommand("exit"); // if (!getenv("WBHOSTTOP")) XSDRAW::RemoveCommand("xsnew"); - Handle(TColStd_HSequenceOfAsciiString) list = - IFSelect_Activator::Commands(0); - TCollection_AsciiString com; - Standard_Integer i, nb = list->Length(); - for (i = 1; i <= nb; i ++) { - Handle(IFSelect_Activator) act; - Standard_Integer nact, num = -1; - char help[200]; - com = list->Value(i); + Handle(TColStd_HSequenceOfAsciiString) list = IFSelect_Activator::Commands (0); + for (TColStd_HSequenceOfAsciiString::Iterator aCmdIter (*list); aCmdIter.More(); aCmdIter.Next()) + { + Standard_Integer num = -1; + const TCollection_AsciiString& aCmd = aCmdIter.Value(); if (!theolds.IsEmpty()) - theolds.Find(com, num); - if (num == 0) continue; - if (!IFSelect_Activator::Select(com.ToCString(),nact,act)) - Sprintf (help,"type : xhelp %s for help",com.ToCString()); - else if (!act.IsNull()) strcpy(help,act->Help(nact)); - if (num < 0) theCommands.Add (com.ToCString(),help,XSTEPDRAWRUN,act->Group()); - else theCommands.Add (thenews->Value(num).ToCString(),help,XSTEPDRAWRUN,act->Group()); + { + theolds.Find (aCmd, num); + } + if (num == 0) + { + continue; + } + + Standard_Integer nact = 0; + Handle(IFSelect_Activator) anAct; + TCollection_AsciiString aHelp; + if (!IFSelect_Activator::Select (aCmd.ToCString(), nact, anAct)) + { + aHelp = TCollection_AsciiString("type : xhelp ") + aCmd + " for help"; + } + else if (!anAct.IsNull()) + { + aHelp = anAct->Help (nact); + } + + const TCollection_AsciiString& aCmdName = num < 0 ? aCmd : thenews->Value (num); + theCommands.Add (aCmdName.ToCString(), aHelp.ToCString(), "", XSTEPDRAWRUN, anAct->Group()); } } From 323e88ada79a3d1b75818d2dd863ccc919409e55 Mon Sep 17 00:00:00 2001 From: nbv Date: Mon, 12 Nov 2018 17:00:06 +0300 Subject: [PATCH 146/639] 0030365: Modeling Algorithms - Create tool to compute deviation between any 2D-curve and some its segment Adds two new overloaded 'ComputeDeviation()' function (approx & exact) to GeomLib_Tool class to calculates the parameter in the curve where the maximum deviation is obtained between the curve and the line segment connecting its points with the specified parameters Adds new '2ddeviation' DRAW command for 'ComputeDeviation()' functional testing --- src/GeomLib/GeomLib_Tool.cxx | 341 +++++++++++++++--- src/GeomLib/GeomLib_Tool.hxx | 106 ++++-- .../GeomliteTest_API2dCommands.cxx | 200 ++++++++-- tests/lowalgos/2ddeviation/A1 | 24 ++ tests/lowalgos/2ddeviation/A2 | 24 ++ tests/lowalgos/2ddeviation/A3 | 22 ++ tests/lowalgos/grids.list | 2 +- 7 files changed, 588 insertions(+), 131 deletions(-) create mode 100644 tests/lowalgos/2ddeviation/A1 create mode 100644 tests/lowalgos/2ddeviation/A2 create mode 100644 tests/lowalgos/2ddeviation/A3 diff --git a/src/GeomLib/GeomLib_Tool.cxx b/src/GeomLib/GeomLib_Tool.cxx index 4996027d3e..03e7cff0aa 100644 --- a/src/GeomLib/GeomLib_Tool.cxx +++ b/src/GeomLib/GeomLib_Tool.cxx @@ -13,66 +13,17 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. +#include #include -#include #include #include #include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include #include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include #include #include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include // The functions Parameter(s) are used to compute parameter(s) of point // on curves and surfaces. The main rule is that tested point must lied @@ -92,7 +43,7 @@ static const Standard_Real PARTOLERANCE = 1.e-9; Standard_Boolean GeomLib_Tool::Parameter(const Handle(Geom_Curve)& Curve, const gp_Pnt& Point, const Standard_Real MaxDist, - Standard_Real& U) + Standard_Real& U) { if( Curve.IsNull() ) return Standard_False; // @@ -140,8 +91,8 @@ Standard_Boolean GeomLib_Tool::Parameter(const Handle(Geom_Curve)& Curve, Standard_Boolean GeomLib_Tool::Parameters(const Handle(Geom_Surface)& Surface, const gp_Pnt& Point, const Standard_Real MaxDist, - Standard_Real& U, - Standard_Real& V) + Standard_Real& U, + Standard_Real& V) { if( Surface.IsNull() ) return Standard_False; // @@ -192,7 +143,7 @@ Standard_Boolean GeomLib_Tool::Parameters(const Handle(Geom_Surface)& Surface, Standard_Boolean GeomLib_Tool::Parameter(const Handle(Geom2d_Curve)& Curve, const gp_Pnt2d& Point, const Standard_Real MaxDist, - Standard_Real& U) + Standard_Real& U) { if( Curve.IsNull() ) return Standard_False; // @@ -225,3 +176,281 @@ Standard_Boolean GeomLib_Tool::Parameter(const Handle(Geom2d_Curve)& Curve, return Standard_True; } + +namespace +{ +//! Target function to compute deviation of the source 2D-curve. +//! It is one-variate function. Its parameter is a parameter +//! on the curve. Deviation is a maximal distance between +//! any point in the curve and the given line. +class FuncSolveDeviation: public math_MultipleVarFunction +{ +public: + + //! Constructor. Initializes the curve and the line + //! going through two given points. + FuncSolveDeviation(const Geom2dAdaptor_Curve& theCurve, + const gp_XY& thePf, + const gp_XY& thePl): + myCurve(theCurve), + myPRef(thePf) + { + myDirRef = thePl - thePf; + mySqMod = myDirRef.SquareModulus(); + myIsValid = (mySqMod > Precision::SquarePConfusion()); + } + + //! Compute additional parameters depending on the argument + //! of *this + void UpdateFields(const Standard_Real theParam) + { + myCurve.D0(theParam, myPointOnCurve); + const gp_XY aVt = myPointOnCurve.XY() - myPRef; + myVecCurvLine = aVt.Dot(myDirRef) * myDirRef / mySqMod - aVt; + } + + //! Returns value of *this (square deviation) and its 1st and 2nd derivative. + void ValueAndDerives(const Standard_Real theParam, Standard_Real& theVal, + Standard_Real& theD1, Standard_Real& theD2) + { + gp_Vec2d aD1; + gp_Vec2d aD2; + myCurve.D2(theParam, myPointOnCurve, aD1, aD2); + + const gp_XY aVt = myPointOnCurve.XY() - myPRef; + theVal = aVt.Crossed(myDirRef); + theD1 = aD1.Crossed(myDirRef); + theD2 = 2.0 * (theD1 * theD1 + theVal * aD2.Crossed(myDirRef)); + theD1 *= 2.0 * theVal; + theVal *= theVal / mySqMod; + } + + //! Returns TRUE if the function has been initializes correctly. + Standard_Boolean IsValid() const + { + return myIsValid; + } + + //! Returns number of variables + virtual Standard_Integer NbVariables() const Standard_OVERRIDE + { + return 1; + } + + //! Returns last computed Point in the given curve. + //! Its value will be recomputed after calling UpdateFields(...) method, + //! which sets this point correspond to the input parameter. + const gp_Pnt2d& PointOnCurve() const + { + return myPointOnCurve; + } + + //! Returns last computed vector directed from some point on the curve + //! to the given line. This vector is correspond to the found deviation. + //! Its value will be recomputed after calling UpdateFields(...) method, + //! which set this vector correspond to the input parameter. + const gp_Vec2d& VecCurveLine() const + { + return myVecCurvLine; + } + + //! Returns the given line + void GetLine(gp_Lin2d* const theLine) const + { + if (theLine == nullptr) + { + return; + } + theLine->SetDirection(myDirRef); + theLine->SetLocation(myPRef); + } + + //! Returns value of *this (square deviation) + virtual Standard_Boolean Value(const math_Vector& thePrm, + Standard_Real& theVal) Standard_OVERRIDE + { + Standard_Real aD1; + Standard_Real aD2; + ValueAndDerives(thePrm.Value(thePrm.Lower()), theVal, aD1, aD2); + theVal = -theVal; + return Standard_True; + } + + //! Always returns 0. It is used for compatibility with the parent class. + virtual Standard_Integer GetStateNumber() Standard_OVERRIDE + { + return 0; + } + +private: + + //! The curve + Geom2dAdaptor_Curve myCurve; + + //! Square modulus of myDirRef (it is constant) + Standard_Real mySqMod; + + //! TRUE if *this is initialized correctly + Standard_Boolean myIsValid; + + //! Sets the given line + gp_XY myPRef, myDirRef; + + //! Last computed point in the curve + gp_Pnt2d myPointOnCurve; + + //! Always directed from myPointOnCurve to the line + gp_Vec2d myVecCurvLine; +}; +} //nameless namespace + +//======================================================================= +//function : ComputeDeviation +//purpose : Computes parameter on curve (*thePrmOnCurve) where maximal deviation +// (maximal value of correspond function FuncSolveDeviation) is obtained. +// ALGORITHM! +// The point is looked for where 1st derivative of the function +// FuncSolveDeviation is equal to 0. It is made by iterative formula: +// +// U(n+1)=U(n) - D1/D2, +// +// where D1 and D2 are 1st and 2nd derivative of the function, computed in +// the point U(n). U(0) = theStartParameter. +//======================================================================= +Standard_Real GeomLib_Tool::ComputeDeviation(const Geom2dAdaptor_Curve& theCurve, + const Standard_Real theFPar, + const Standard_Real theLPar, + const Standard_Real theStartParameter, + const Standard_Integer theNbIters, + Standard_Real* const thePrmOnCurve, + gp_Pnt2d* const thePtOnCurve, + gp_Vec2d* const theVecCurvLine, + gp_Lin2d* const theLine) +{ + // Computed maximal deflection + if ((theStartParameter < theFPar) || (theStartParameter > theLPar)) + { + return -1.0; + } + + const gp_Pnt2d aPf(theCurve.Value(theFPar)); + const gp_Pnt2d aPl(theCurve.Value(theLPar)); + + FuncSolveDeviation aFunc(theCurve, aPf.XY(), aPl.XY()); + + if (!aFunc.IsValid()) + { + return -1.0; + } + + aFunc.GetLine(theLine); + + const Standard_Real aTolDefl = Precision::PConfusion(); + + Standard_Real aD1 = 0.0; + Standard_Real aD2 = 0.0; + Standard_Real aU0 = theStartParameter; + Standard_Real aUmax = theStartParameter; + Standard_Real aSqDefl; + aFunc.ValueAndDerives(aU0, aSqDefl, aD1, aD2); + for (Standard_Integer anItr = 1; anItr <= theNbIters; anItr++) + { + if (Abs(aD2) < Precision::PConfusion()) + { + break; + } + const Standard_Real aDelta = aD1 / aD2; + const Standard_Real aU1 = aU0 - aDelta; + + if ((aU1 < theFPar) || (aU1 > theLPar)) + { + break; + } + Standard_Real aSqD = aSqDefl; + aFunc.ValueAndDerives(aU1, aSqD, aD1, aD2); + if (aSqD > aSqDefl) + { + aUmax = aU1; + const Standard_Real aDD = aSqDefl > 0.0 ? + Abs(Sqrt(aSqD) - Sqrt(aSqDefl)) : Sqrt(aSqD); + aSqDefl = aSqD; + if (aDD < aTolDefl) + { + break; + } + } + + if (Abs(aU0 - aU1) < Precision::PConfusion()) + { + break; + } + aU0 = aU1; + } + if (aSqDefl < 0.0) + { + return aSqDefl; + } + if (thePrmOnCurve) + { + *thePrmOnCurve = aUmax; + } + if ((thePtOnCurve != nullptr) || (theVecCurvLine != nullptr)) + { + aFunc.UpdateFields(aUmax); + + if (thePtOnCurve != nullptr) + { + thePtOnCurve->SetXY(aFunc.PointOnCurve().XY()); + } + + if (theVecCurvLine != nullptr) + { + theVecCurvLine->SetXY(aFunc.VecCurveLine().XY()); + } + } + return Sqrt(aSqDefl); +} + +//======================================================================= +//function : ComputeDeviation +//purpose : Computes parameter on curve (*thePrmOnCurve) where maximal deviation +// (maximal value of correspond function FuncSolveDeviation) is obtained +// (fast but not precisely). +// math_PSO Algorithm is used. +//======================================================================= +Standard_Real GeomLib_Tool::ComputeDeviation(const Geom2dAdaptor_Curve& theCurve, + const Standard_Real theFPar, + const Standard_Real theLPar, + const Standard_Integer theNbSubIntervals, + const Standard_Integer theNbIters, + Standard_Real* const thePrmOnCurve) +{ + // Computed maximal deflection + const gp_Pnt2d aPf(theCurve.Value(theFPar)); + const gp_Pnt2d aPl(theCurve.Value(theLPar)); + + FuncSolveDeviation aFunc(theCurve, aPf.XY(), aPl.XY()); + + if (!aFunc.IsValid()) + { + return -1.0; + } + const math_Vector aFPar(1, 1, theFPar); + const math_Vector aLPar(1, 1, theLPar); + const math_Vector aStep(1, 1, (theLPar - theFPar) / (10.0*theNbSubIntervals)); + math_Vector anOutputPnt(1, 1, theFPar); + math_PSO aMPSO(&aFunc, aFPar, aLPar, aStep, theNbSubIntervals, theNbIters); + + Standard_Real aSqDefl = RealLast(); + aMPSO.Perform(aStep, aSqDefl, anOutputPnt, theNbIters); + + if (aSqDefl == RealLast()) + { + return -1.0; + } + if (thePrmOnCurve) + { + *thePrmOnCurve = anOutputPnt(1); + } + return Sqrt(Abs(aSqDefl)); +} \ No newline at end of file diff --git a/src/GeomLib/GeomLib_Tool.hxx b/src/GeomLib/GeomLib_Tool.hxx index 5746a6d155..cbaa02c9c7 100644 --- a/src/GeomLib/GeomLib_Tool.hxx +++ b/src/GeomLib/GeomLib_Tool.hxx @@ -22,63 +22,97 @@ #include #include + class Geom_Curve; -class gp_Pnt; class Geom_Surface; class Geom2d_Curve; +class Geom2dAdaptor_Curve; +class gp_Lin2d; +class gp_Pnt; class gp_Pnt2d; - +class gp_Vec2d; //! Provides various methods with Geom2d and Geom curves and surfaces. //! The methods of this class compute the parameter(s) of a given point on a -//! curve or a surface. To get the valid result the point must be located rather close +//! curve or a surface. To get the valid result the point must be located rather close //! to the curve (surface) or at least to allow getting unambiguous result //! (do not put point at center of circle...), -//! but choice of "trust" distance between curve/surface and point is -//! responcibility of user (parameter MaxDist). +//! but choice of "trust" distance between curve/surface and point is +//! responsibility of user (parameter MaxDist). //! Return FALSE if the point is beyond the MaxDist //! limit or if computation fails. -class GeomLib_Tool +class GeomLib_Tool { public: DEFINE_STANDARD_ALLOC - + //! Extracts the parameter of a 3D point lying on a 3D curve + //! or at a distance less than the MaxDist value. + Standard_EXPORT static Standard_Boolean Parameter(const Handle(Geom_Curve)& Curve, const gp_Pnt& Point, const Standard_Real MaxDist, Standard_Real& U); - //! Extracts the parameter of a 3D point lying on a 3D curve - //! or at a distance less than the MaxDist value. - Standard_EXPORT static Standard_Boolean Parameter (const Handle(Geom_Curve)& Curve, const gp_Pnt& Point, const Standard_Real MaxDist, Standard_Real& U); - //! Extracts the parameter of a 3D point lying on a surface //! or at a distance less than the MaxDist value. - Standard_EXPORT static Standard_Boolean Parameters (const Handle(Geom_Surface)& Surface, const gp_Pnt& Point, const Standard_Real MaxDist, Standard_Real& U, Standard_Real& V); - + Standard_EXPORT static Standard_Boolean Parameters(const Handle(Geom_Surface)& Surface, const gp_Pnt& Point, const Standard_Real MaxDist, Standard_Real& U, Standard_Real& V); + //! Extracts the parameter of a 2D point lying on a 2D curve //! or at a distance less than the MaxDist value. - Standard_EXPORT static Standard_Boolean Parameter (const Handle(Geom2d_Curve)& Curve, const gp_Pnt2d& Point, const Standard_Real MaxDist, Standard_Real& U); - - - - -protected: - - - - - -private: - - - - + Standard_EXPORT static Standard_Boolean Parameter(const Handle(Geom2d_Curve)& Curve, const gp_Pnt2d& Point, const Standard_Real MaxDist, Standard_Real& U); + + //! Computes parameter in theCurve (*thePrmOnCurve) where maximal deviation + //! between theCurve and the linear segment joining its points with + //! the parameters theFPar and theLPar is obtained. + //! Returns the (positive) value of deviation. Returns negative value if + //! the deviation cannot be computed. + //! The returned parameter (in case of successful) will always be in + //! the range [theFPar, theLPar]. + //! Iterative method is used for computation. So, theStartParameter is + //! needed to be set. Recommend value of theStartParameter can be found with + //! the overloaded method. + //! Additionally, following values can be returned (optionally): + //! @param thePtOnCurve - the point on curve where maximal deviation is achieved; + //! @param thePrmOnCurve - the parameter of thePtOnCurve; + //! @param theVecCurvLine - the vector along which is computed (this vector is always + //! perpendicular theLine); + //! @param theLine - the linear segment joining the point of theCurve having parameters + //! theFPar and theLPar. + Standard_EXPORT static + Standard_Real ComputeDeviation(const Geom2dAdaptor_Curve& theCurve, + const Standard_Real theFPar, + const Standard_Real theLPar, + const Standard_Real theStartParameter, + const Standard_Integer theNbIters = 100, + Standard_Real* const thePrmOnCurve = NULL, + gp_Pnt2d* const thePtOnCurve = NULL, + gp_Vec2d* const theVecCurvLine = NULL, + gp_Lin2d* const theLine = NULL); + + //! Computes parameter in theCurve (*thePrmOnCurve) where maximal deviation + //! between theCurve and the linear segment joining its points with + //! the parameters theFPar and theLPar is obtained. + //! Returns the (positive) value of deviation. Returns negative value if + //! the deviation cannot be computed. + //! The returned parameter (in case of successful) will always be in + //! the range [theFPar, theLPar]. + //! theNbSubIntervals defines discretization of the given interval [theFPar, theLPar] + //! to provide better search condition. This value should be chosen taking into + //! account complexity of the curve in considered interval. E.g. if there are many + //! oscillations of the curve in the interval then theNbSubIntervals mus be + //! great number. However, the greater value of theNbSubIntervals the slower the + //! algorithm will compute. + //! theNbIters sets number of iterations. + //! ATTENTION!!! + //! This algorithm cannot compute deviation precisely (so, there is no point in + //! setting big value of theNbIters). But it can give some start point for + //! the overloaded method. + Standard_EXPORT static + Standard_Real ComputeDeviation(const Geom2dAdaptor_Curve& theCurve, + const Standard_Real theFPar, + const Standard_Real theLPar, + const Standard_Integer theNbSubIntervals, + const Standard_Integer theNbIters = 10, + Standard_Real * const thePrmOnCurve = NULL); }; - - - - - - -#endif // _GeomLib_Tool_HeaderFile +#endif // _GeomLib_Tool_HeaderFile \ No newline at end of file diff --git a/src/GeomliteTest/GeomliteTest_API2dCommands.cxx b/src/GeomliteTest/GeomliteTest_API2dCommands.cxx index d1c27dc5e0..70799afc2f 100644 --- a/src/GeomliteTest/GeomliteTest_API2dCommands.cxx +++ b/src/GeomliteTest/GeomliteTest_API2dCommands.cxx @@ -31,6 +31,7 @@ #include #include #include +#include #include #include #include @@ -127,7 +128,7 @@ static Standard_Integer appro(Draw_Interpretor& di, Standard_Integer n, const ch { Tol2d = Draw::Atof(a[1]); } - + di << "Tolerance for 2d approx : "<< Tol2d << "\n"; return 0; } @@ -229,7 +230,7 @@ static Standard_Integer appro(Draw_Interpretor& di, Standard_Integer n, const ch } TheCurve = anInterpol.Curve(); } - else + else { Geom2dAPI_PointsToBSpline anApprox (Points, Dmin, Dmax, GeomAbs_C2, Tol2d); if (!anApprox.IsDone()) @@ -276,12 +277,12 @@ static Standard_Integer extrema(Draw_Interpretor& di, Standard_Integer n, const Handle(Geom2d_Curve) GC1 = DrawTrSurf::GetCurve2d (a[1]); Handle(Geom2d_Curve) GC2 = DrawTrSurf::GetCurve2d (a[2]); - if (GC1.IsNull()) + if ( GC1.IsNull()) { di << "Syntax error: '" << a[1] << "' is NULL"; return 1; } - if (GC2.IsNull()) + if ( GC2.IsNull()) { di << "Syntax error: '" << a[2] << "' is NULL"; return 1; @@ -376,7 +377,7 @@ static Standard_Integer intersect(Draw_Interpretor& di, Standard_Integer n, cons { di << "Syntax error at '" << a[i] << "'"; return 1; - } + } } if (C1.IsNull()) { @@ -440,7 +441,7 @@ static Standard_Integer intersect(Draw_Interpretor& di, Standard_Integer n, cons CD = new DrawTrSurf_Curve2d(S2, Draw_violet, 30); dout << CD; } - + dout.Flush(); return 0; } @@ -516,32 +517,32 @@ static Standard_Integer intconcon(Draw_Interpretor& di, Standard_Integer n, cons { case GeomAbs_Line: { - pCon.reset (new NCollection_Shared(AC2.Line())); + pCon.reset (new NCollection_Shared(AC2.Line())); break; } case GeomAbs_Circle: { - pCon.reset (new NCollection_Shared(AC2.Circle())); + pCon.reset (new NCollection_Shared(AC2.Circle())); break; } case GeomAbs_Ellipse: { - pCon.reset (new NCollection_Shared(AC2.Ellipse())); + pCon.reset (new NCollection_Shared(AC2.Ellipse())); break; } case GeomAbs_Hyperbola: { - pCon.reset (new NCollection_Shared(AC2.Hyperbola())); + pCon.reset (new NCollection_Shared(AC2.Hyperbola())); break; } case GeomAbs_Parabola: { - pCon.reset (new NCollection_Shared(AC2.Parabola())); + pCon.reset (new NCollection_Shared(AC2.Parabola())); break; } default: - { - di << "Syntax error: '" << a[2] << "' is not conic"; + { + di << "Syntax error: '" << a[2] << "' is not conic"; return 1; } } @@ -549,24 +550,24 @@ static Standard_Integer intconcon(Draw_Interpretor& di, Standard_Integer n, cons IntAna2d_AnaIntersection Intersector; switch (T1) { - case GeomAbs_Line: - Intersector.Perform(AC1.Line(), *pCon); - break; - case GeomAbs_Circle: - Intersector.Perform(AC1.Circle(), *pCon); - break; - case GeomAbs_Ellipse: - Intersector.Perform(AC1.Ellipse(), *pCon); - break; - case GeomAbs_Hyperbola: - Intersector.Perform(AC1.Hyperbola(), *pCon); - break; - case GeomAbs_Parabola: - Intersector.Perform(AC1.Parabola(), *pCon); - break; - default: + case GeomAbs_Line: + Intersector.Perform(AC1.Line(), *pCon); + break; + case GeomAbs_Circle: + Intersector.Perform(AC1.Circle(), *pCon); + break; + case GeomAbs_Ellipse: + Intersector.Perform(AC1.Ellipse(), *pCon); + break; + case GeomAbs_Hyperbola: + Intersector.Perform(AC1.Hyperbola(), *pCon); + break; + case GeomAbs_Parabola: + Intersector.Perform(AC1.Parabola(), *pCon); + break; + default: di << "Syntax error: '" << a[1] << "' is not conic"; - return 1; + return 1; } for (Standard_Integer i = 1; i <= Intersector.NbPoints(); i++) @@ -589,6 +590,119 @@ static Standard_Integer intconcon(Draw_Interpretor& di, Standard_Integer n, cons return 0; } +//======================================================================= +//function : deviation +//purpose : +//======================================================================= +static Standard_Integer deviation(Draw_Interpretor& theDI, Standard_Integer theNArg, const char** theArgv) +{ + if (theNArg < 3) + { + theDI << "Syntax error: wrong number of arguments"; + return 1; + } + + const Handle(Geom2d_Curve) aC = DrawTrSurf::GetCurve2d(theArgv[2]); + + if (aC.IsNull()) + { + theDI << "Error: " << theArgv[2] << " is not a 2D-curve.\n"; + return 1; + } + + Geom2dAdaptor_Curve anAC(aC); + + Standard_Integer aNbInterv = 2; + Standard_Real aU0 = RealLast(); + Standard_Integer aNbApprox = 10; + Standard_Integer aNbExact = 100; + Standard_Boolean anIsApproxOnly = Standard_False; + + + for (Standard_Integer aCurrArg = 3; aCurrArg < theNArg; aCurrArg++) + { + TCollection_AsciiString anArg(theArgv[aCurrArg]); + anArg.LowerCase(); + if (anArg == "-i") + { + aU0 = Draw::Atof(theArgv[++aCurrArg]); + } + else if (anArg == "-d") + { + aNbInterv = Draw::Atoi(theArgv[++aCurrArg]); + } + else if (anArg == "-napprox") + { + aNbApprox = Draw::Atoi(theArgv[++aCurrArg]); + } + else if (anArg == "-nexact") + { + aNbExact = Draw::Atoi(theArgv[++aCurrArg]); + } + else if (anArg == "-approxonly") + { + anIsApproxOnly = Standard_True; + ++aCurrArg; + } + else + { + theDI << "Error: Wrong option " << theArgv[aCurrArg] << "\n"; + return 1; + } + } + + const Standard_Real aU1 = anAC.FirstParameter(); + const Standard_Real aU2 = anAC.LastParameter(); + + Standard_Real aRetCurvParam = aU0; + gp_Pnt2d aPtOnCurv; + gp_Vec2d aRetVec; + gp_Lin2d aLinSegm; + + Standard_Real aDefl = RealLast(); + + if (aU0 == RealLast() || anIsApproxOnly) + { + aDefl = GeomLib_Tool::ComputeDeviation(anAC, aU1, aU2, + aNbInterv, aNbApprox, &aU0); + + if (aDefl < 0.0) + { + theDI << "Error: Cannot compute deviation on interval.\n"; + return 0; + } + } + if (!anIsApproxOnly) + { + aDefl = GeomLib_Tool::ComputeDeviation(anAC, aU1, aU2, aU0, aNbExact, + &aRetCurvParam, &aPtOnCurv, + &aRetVec, &aLinSegm); + } + if (aDefl < 0.0) + { + theDI << "Error: Cannot compute a deviation!\n"; + return 0; + } + theDI << "Computed value is: " << aDefl << "\n"; + TCollection_AsciiString anArgString = theArgv[1]; + TCollection_AsciiString aPntString = anArgString + "_pnt"; + DrawTrSurf::Set(aPntString.ToCString(), aPtOnCurv); + theDI << "From point " << aPntString << " (with parameter " << aRetCurvParam << ") to "; + + Handle(Geom2d_Curve) aLine = new Geom2d_Line(aLinSegm); + TCollection_AsciiString aLinString = anArgString + "_lin"; + DrawTrSurf::Set(aLinString.ToCString(), aLine); + theDI << "the line " << aLinString << ".\n"; + + aLine = new Geom2d_Line(aPtOnCurv, aRetVec); + aLine = new Geom2d_TrimmedCurve(aLine, 0.0, aDefl); + TCollection_AsciiString aNormString = anArgString + "_norm"; + DrawTrSurf::Set(aNormString.ToCString(), aLine); + theDI << "The deflection is measured along the line " << aNormString << ".\n"; + + return 0; +} + void GeomliteTest::API2dCommands(Draw_Interpretor& theCommands) { static Standard_Boolean done = Standard_False; @@ -623,12 +737,22 @@ void GeomliteTest::API2dCommands(Draw_Interpretor& theCommands) " -state - allows printing the intersection state for each point.", __FILE__, intersect, g); - theCommands.Add("2dintanalytical", - "2dintanalytical circle1 circle2" - "Intersect circle1 and circle2 using IntAna2d_AnaIntersection.", - __FILE__, intersect_ana, g); - theCommands.Add("intconcon", - "intconcon curve1 curve2" - "Intersect conic curve1 and conic curve2 using IntAna2d_AnaIntersection", - __FILE__, intconcon, g); + theCommands.Add("2dintanalytical", "2dintanalytical circle1 circle2" + "Intersect circle1 and circle2 using IntAna2d_AnaIntersection.", + __FILE__, intersect_ana, g); + theCommands.Add("intconcon", "intconcon curve1 curve2" + "Intersect conic curve1 and conic curve2 using IntAna2d_AnaIntersection", + __FILE__, intconcon, g); + + theCommands.Add("2ddeviation", "2ddeviation result curve [-i U0] [-d N] [-Napprox N] [-Nexact N] [-approxOnly]\n" + "-i - sets an initial parameter for computation by iterative method;\n" + "-d - sets number of sub-intervals for searching. Default value is 2.\n" + "-Napprox - sets number of iteration for approx deviation computing,\n" + " defauilt value is 10" + "-Nexact - sets number of iteration for exact deviation computing,\n" + " defauilt value is 100" + "-approxOnly - to find deviation with approx method only,\n" + " the exact method is used if this parameter is not specified", + __FILE__, deviation, g); + } diff --git a/tests/lowalgos/2ddeviation/A1 b/tests/lowalgos/2ddeviation/A1 new file mode 100644 index 0000000000..b0c66cc8e5 --- /dev/null +++ b/tests/lowalgos/2ddeviation/A1 @@ -0,0 +1,24 @@ +set ExpectDeviation 0.36597801294402493 + +restore [locate_data_file OCC538.brep] r +smallview -2D- +pcurve r + +trim cc r_3 1.5704826035188950 3.1409652070377900 +don cc +2dfit + +set log_result1 [2ddeviation res cc -d 8] +regexp {Computed value is: +([-0-9.+eE]+)} $log_result1 full aDev1 +checkreal FoundDeviation $aDev1 $ExpectDeviation 1.0e-9 0.0 +checkview -screenshot -2d -path ${imagedir}/${test_image}_1.png + +reverse cc +don cc +2dfit + +set log_result2 [2ddeviation res cc -d 8] +regexp {Computed value is: +([-0-9.+eE]+)} $log_result2 full aDev2 +checkview -screenshot -2d -path ${imagedir}/${test_image}_2.png +checkreal FoundDeviation $aDev2 $ExpectDeviation 1.0e-9 0.0 + diff --git a/tests/lowalgos/2ddeviation/A2 b/tests/lowalgos/2ddeviation/A2 new file mode 100644 index 0000000000..48b9a1b55e --- /dev/null +++ b/tests/lowalgos/2ddeviation/A2 @@ -0,0 +1,24 @@ +set ExpectDeviation 0.019156616993488952 + +restore [locate_data_file bug28211_cface7.brep] r +smallview -2D- +pcurve r + +trim cc r_4 0 0.970848497621606 +don cc +2dfit + +set log_result1 [2ddeviation res cc -d 8] +regexp {Computed value is: +([-0-9.+eE]+)} $log_result1 full aDev1 +checkreal FoundDeviation $aDev1 $ExpectDeviation 1.0e-9 0.0 +checkview -screenshot -2d -path ${imagedir}/${test_image}_1.png + +reverse cc +don cc +2dfit + +set log_result2 [2ddeviation res cc -d 8] +regexp {Computed value is: +([-0-9.+eE]+)} $log_result2 full aDev2 +checkview -screenshot -2d -path ${imagedir}/${test_image}_2.png +checkreal FoundDeviation $aDev2 $ExpectDeviation 1.0e-9 0.0 + diff --git a/tests/lowalgos/2ddeviation/A3 b/tests/lowalgos/2ddeviation/A3 new file mode 100644 index 0000000000..e678f899a3 --- /dev/null +++ b/tests/lowalgos/2ddeviation/A3 @@ -0,0 +1,22 @@ +set ExpectDeviation 199.9999995 + +circle cc 0 0 100 +trim cc cc 0.0001 2*pi-0.0001 + +smallview -2D- +don cc +2dfit + +set log_result1 [2ddeviation res cc] +regexp {Computed value is: +([-0-9.+eE]+)} $log_result1 full aDev1 +checkreal FoundDeviation $aDev1 $ExpectDeviation 1.0e-9 0.0 +checkview -screenshot -2d -path ${imagedir}/${test_image}_1.png + +reverse cc +don cc +2dfit + +set log_result2 [2ddeviation res cc] +regexp {Computed value is: +([-0-9.+eE]+)} $log_result2 full aDev2 +checkreal FoundDeviation $aDev2 $ExpectDeviation 1.0e-9 0.0 +checkview -screenshot -2d -path ${imagedir}/${test_image}_2.png diff --git a/tests/lowalgos/grids.list b/tests/lowalgos/grids.list index 0ebc6f8e35..cb983a9781 100644 --- a/tests/lowalgos/grids.list +++ b/tests/lowalgos/grids.list @@ -8,4 +8,4 @@ 008 classifier 009 bvh 010 progress - +011 2ddeviation From 58c0958b5005beb81268afbc58cbb8116d84227b Mon Sep 17 00:00:00 2001 From: isn Date: Thu, 11 Jan 2018 19:03:03 +0300 Subject: [PATCH 147/639] 0029406: Foundation Classes - gp_Ax3 fails setting direction Avoid exception in gp_Ax3::SetDirection(), SetAxis(): check if XDir of Ax3 is parallel to newly given direction. --- src/QABugs/QABugs_20.cxx | 127 +++++++++++++++++++++++++++++++++++ src/gp/gp_Ax3.hxx | 102 +++++++++++++++++++--------- tests/bugs/fclasses/bug29406 | 7 ++ 3 files changed, 206 insertions(+), 30 deletions(-) create mode 100644 tests/bugs/fclasses/bug29406 diff --git a/src/QABugs/QABugs_20.cxx b/src/QABugs/QABugs_20.cxx index 227b295fe2..ece17e6ebe 100644 --- a/src/QABugs/QABugs_20.cxx +++ b/src/QABugs/QABugs_20.cxx @@ -4025,6 +4025,130 @@ static Standard_Integer QANullifyShape(Draw_Interpretor& di, return 0; } +static void CheckAx3Dir(gp_Ax3& theAxis, const gp_Dir& theDir) +{ + Standard_Boolean bDirect = theAxis.Direct(); + theAxis.SetDirection (theDir); + if (bDirect != theAxis.Direct()) + { + std::cout << "Error: coordinate system is reversed\n"; + } + if (!theDir.IsEqual(theAxis.Direction(), Precision::Angular())) + { + std::cout << "Error: main dir was not set properly\n"; + } +} + +static void CheckAx3DirX(gp_Ax3& theAxis, const gp_Dir& theDir) +{ + Standard_Boolean bDirect = theAxis.Direct(); + theAxis.SetXDirection (theDir); + if (bDirect != theAxis.Direct()) + { + std::cout << "Error: coordinate system is reversed\n"; + } + gp_Dir aGoodY = theAxis.Direction().Crossed(theDir); + if (theAxis.Direct()) + { + if (!aGoodY.IsEqual(theAxis.YDirection(), Precision::Angular())) + { + std::cout << "Error: X dir was not set properly\n"; + } + } + else + { + if (!aGoodY.IsOpposite(theAxis.YDirection(), Precision::Angular())) + { + std::cout << "Error: X dir was not set properly\n"; + } + } +} + +static void CheckAx3DirY(gp_Ax3& theAxis, const gp_Dir& theDir) +{ + Standard_Boolean bDirect = theAxis.Direct(); + theAxis.SetYDirection (theDir); + if (bDirect != theAxis.Direct()) + { + std::cout << "Error: coordinate system is reversed\n"; + } + gp_Dir aGoodX = theAxis.Direction().Crossed(theDir); + if (theAxis.Direct()) + { + if (!aGoodX.IsOpposite(theAxis.XDirection(), Precision::Angular())) + { + std::cout << "Error: Y dir was not set properly\n"; + } + } + else + { + if (!aGoodX.IsEqual(theAxis.XDirection(), Precision::Angular())) + { + std::cout << "Error: Y dir was not set properly\n"; + } + } +} + +static void CheckAx3Ax1(gp_Ax3& theAx, const gp_Ax1& theAx0) +{ + Standard_Boolean bDirect = theAx.Direct(); + theAx.SetAxis (theAx0); + if (bDirect != theAx.Direct()) + { + std::cout << "Error: coordinate system is reversed\n"; + } + if (!theAx0.Direction().IsEqual(theAx.Direction(), Precision::Angular())) + { + std::cout << "Error: main dir was not set properly\n"; + } +} + + +static Standard_Integer OCC29406 (Draw_Interpretor&, Standard_Integer, const char**) +{ + // Main (Z) direction + { + // gp_Ax3::SetDirection() test + gp_Ax3 anAx1, anAx2, anAx3, anAx4, anAx5, anAx6; + anAx3.ZReverse(); + anAx4.ZReverse(); + CheckAx3Dir(anAx1, gp::DX()); + CheckAx3Dir(anAx2, -gp::DX()); + CheckAx3Dir(anAx3, gp::DX()); + CheckAx3Dir(anAx4, -gp::DX()); + // gp_Ax3::SetAxis() test + gp_Ax1 anAx0_1 (gp::Origin(), gp::DX()); + gp_Ax1 anAx0_2 (gp::Origin(), -gp::DX()); + CheckAx3Ax1(anAx5, anAx0_1); + CheckAx3Ax1(anAx6, anAx0_2); + } + // X direction + { + // gp_Ax3::SetXDirection() test + gp_Ax3 anAx1, anAx2, anAx3, anAx4; + anAx3.XReverse(); + anAx4.XReverse(); + CheckAx3DirX(anAx1, gp::DZ()); + CheckAx3DirX(anAx2, -gp::DZ()); + CheckAx3DirX(anAx3, gp::DZ()); + CheckAx3DirX(anAx4, -gp::DZ()); + } + // Y direction + { + // gp_Ax3::SetYDirection() test + gp_Ax3 anAx1, anAx2, anAx3, anAx4; + anAx3.YReverse(); + anAx4.YReverse(); + CheckAx3DirY(anAx1, gp::DZ()); + CheckAx3DirY(anAx2, -gp::DZ()); + CheckAx3DirY(anAx3, gp::DZ()); + CheckAx3DirY(anAx4, -gp::DZ()); + } + + return 0; +} + + void QABugs::Commands_20(Draw_Interpretor& theCommands) { const char *group = "QABugs"; @@ -4107,5 +4231,8 @@ void QABugs::Commands_20(Draw_Interpretor& theCommands) { "Nullify shape. Usage: QANullifyShape shape", __FILE__, QANullifyShape, group); + theCommands.Add ("OCC29406", + "Tests the case when newly set axis for gp_Ax3 is parallel to one of current axis", + __FILE__, OCC29406, group); return; } diff --git a/src/gp/gp_Ax3.hxx b/src/gp/gp_Ax3.hxx index d7f69a0831..5398e5483c 100644 --- a/src/gp/gp_Ax3.hxx +++ b/src/gp/gp_Ax3.hxx @@ -348,37 +348,45 @@ inline gp_Ax2 gp_Ax3::Ax2()const // function : SetAxis // purpose : // ======================================================================= -inline void gp_Ax3::SetAxis (const gp_Ax1& theA1) +inline void gp_Ax3::SetAxis(const gp_Ax1& theA1) { - Standard_Boolean isDirect = Direct(); - axis = theA1; - vxdir = axis.Direction().CrossCrossed (vxdir, axis.Direction()); - if (isDirect) - { - vydir = axis.Direction().Crossed (vxdir); - } - else - { - vydir = vxdir.Crossed (axis.Direction()); - } + axis.SetLocation(theA1.Location()); + SetDirection(theA1.Direction()); } // ======================================================================= // function : SetDirection // purpose : // ======================================================================= -inline void gp_Ax3::SetDirection (const gp_Dir& theV) +inline void gp_Ax3::SetDirection(const gp_Dir& theV) { - Standard_Boolean isDirect = Direct(); - axis.SetDirection (theV); - vxdir = theV.CrossCrossed (vxdir, theV); - if (isDirect) + Standard_Real aDot = theV.Dot(vxdir); + if(1. - Abs(aDot) <= Precision::Angular()) { - vydir = theV.Crossed (vxdir); + if(aDot > 0) + { + vxdir = vydir; + vydir = axis.Direction(); + } + else + { + vxdir = axis.Direction(); + } + axis.SetDirection(theV); } else - { - vydir = vxdir.Crossed (theV); + { + Standard_Boolean direct = Direct(); + axis.SetDirection (theV); + vxdir = theV.CrossCrossed (vxdir, theV); + if (direct) + { + vydir = theV.Crossed (vxdir); + } + else + { + vydir = vxdir.Crossed (theV); + } } } @@ -388,15 +396,32 @@ inline void gp_Ax3::SetDirection (const gp_Dir& theV) // ======================================================================= inline void gp_Ax3::SetXDirection (const gp_Dir& theVx) { - Standard_Boolean isDirect = Direct(); - vxdir = axis.Direction().CrossCrossed (theVx, axis.Direction()); - if (isDirect) + Standard_Real aDot = theVx.Dot(axis.Direction()); + if (1. - Abs(aDot) <= Precision::Angular()) { - vydir = axis.Direction().Crossed (vxdir); + if (aDot > 0) + { + axis.SetDirection(vxdir); + vydir = -vydir; + } + else + { + axis.SetDirection(vxdir); + } + vxdir = theVx; } else { - vydir = vxdir.Crossed (axis.Direction()); + Standard_Boolean direct = Direct(); + vxdir = axis.Direction().CrossCrossed(theVx, axis.Direction()); + if (direct) + { + vydir = axis.Direction().Crossed(vxdir); + } + else + { + vydir = vxdir.Crossed(axis.Direction()); + } } } @@ -406,12 +431,29 @@ inline void gp_Ax3::SetXDirection (const gp_Dir& theVx) // ======================================================================= inline void gp_Ax3::SetYDirection (const gp_Dir& theVy) { - Standard_Boolean isDirect = Direct(); - vxdir = theVy.Crossed (axis.Direction()); - vydir = (axis.Direction()).Crossed (vxdir); - if (!isDirect) + Standard_Real aDot = theVy.Dot(axis.Direction()); + if (1. - Abs(aDot) <= Precision::Angular()) { - vxdir.Reverse(); + if (aDot > 0) + { + axis.SetDirection(vydir); + vxdir = -vxdir; + } + else + { + axis.SetDirection(vydir); + } + vydir = theVy; + } + else + { + Standard_Boolean isDirect = Direct(); + vxdir = theVy.Crossed(axis.Direction()); + vydir = (axis.Direction()).Crossed(vxdir); + if (!isDirect) + { + vxdir.Reverse(); + } } } diff --git a/tests/bugs/fclasses/bug29406 b/tests/bugs/fclasses/bug29406 new file mode 100644 index 0000000000..950c8d4c3c --- /dev/null +++ b/tests/bugs/fclasses/bug29406 @@ -0,0 +1,7 @@ +puts "============" +puts "0029406: Foundation Classes - gp_Ax3 fails setting direction" +puts "============" +puts "" + +pload QAcommands +OCC29406 From 4a837ecec21bfe24d9c224c4b59aa9779156f297 Mon Sep 17 00:00:00 2001 From: Dzmitry Razmyslovich Date: Thu, 25 Nov 2021 17:46:56 +0100 Subject: [PATCH 148/639] 0031087: Configuration - make FreeType dependency optional [part 2] --- src/Font/Font_FTFont.cxx | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/Font/Font_FTFont.cxx b/src/Font/Font_FTFont.cxx index bdd4f572f7..aeecf5c74a 100755 --- a/src/Font/Font_FTFont.cxx +++ b/src/Font/Font_FTFont.cxx @@ -103,9 +103,11 @@ bool Font_FTFont::Init (const Handle(NCollection_Buffer)& theData, { throw Standard_ProgramError ("Font_FTFont, Light and Normal hinting styles are mutually exclusive"); } +#ifdef HAVE_FREETYPE setLoadFlag (FT_LOAD_TARGET_LIGHT, (theParams.FontHinting & Font_Hinting_Light) != 0); setLoadFlag (FT_LOAD_NO_HINTING, (theParams.FontHinting & Font_Hinting_Normal) == 0 && (theParams.FontHinting & Font_Hinting_Light) == 0); +#endif // manage native / autohinting if ((theParams.FontHinting & Font_Hinting_ForceAutohint) != 0 @@ -113,8 +115,10 @@ bool Font_FTFont::Init (const Handle(NCollection_Buffer)& theData, { throw Standard_ProgramError ("Font_FTFont, ForceAutohint and NoAutohint are mutually exclusive"); } +#ifdef HAVE_FREETYPE setLoadFlag (FT_LOAD_FORCE_AUTOHINT, (theParams.FontHinting & Font_Hinting_ForceAutohint) != 0); setLoadFlag (FT_LOAD_NO_AUTOHINT, (theParams.FontHinting & Font_Hinting_NoAutohint) != 0); +#endif if (!myFTLib->IsValid()) { From 250ad34d902663a5592ed722cbc1b701ce09d7e0 Mon Sep 17 00:00:00 2001 From: dpasukhi Date: Fri, 26 Nov 2021 01:26:49 +0300 Subject: [PATCH 149/639] 0032683: Coding Rules, XCAFDoc_Editor::CloneMetaData() - unexpected bitwise operations Fixed problem with incorrect bitwise operators. Removed forced naming via cloning metadata --- src/XCAFDoc/XCAFDoc_Editor.cxx | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/src/XCAFDoc/XCAFDoc_Editor.cxx b/src/XCAFDoc/XCAFDoc_Editor.cxx index dd92a88cfe..11cff3dc44 100644 --- a/src/XCAFDoc/XCAFDoc_Editor.cxx +++ b/src/XCAFDoc/XCAFDoc_Editor.cxx @@ -300,9 +300,9 @@ void XCAFDoc_Editor::CloneMetaData(const TDF_Label& theSrcLabel, { return; } - const Standard_Boolean toCopyColor = theToCopyColor & XCAFDoc_DocumentTool::CheckColorTool(theSrcLabel); - const Standard_Boolean toCopyLayer = theToCopyLayer & XCAFDoc_DocumentTool::CheckLayerTool(theSrcLabel); - const Standard_Boolean toCopyMaterial = theToCopyMaterial & XCAFDoc_DocumentTool::CheckMaterialTool(theSrcLabel); + const Standard_Boolean toCopyColor = theToCopyColor && XCAFDoc_DocumentTool::CheckColorTool(theSrcLabel); + const Standard_Boolean toCopyLayer = theToCopyLayer && XCAFDoc_DocumentTool::CheckLayerTool(theSrcLabel); + const Standard_Boolean toCopyMaterial = theToCopyMaterial && XCAFDoc_DocumentTool::CheckMaterialTool(theSrcLabel); const Standard_Boolean toCopyVisMaterial = XCAFDoc_DocumentTool::CheckVisMaterialTool(theSrcLabel); // Colors if (toCopyColor) @@ -474,12 +474,4 @@ void XCAFDoc_Editor::CloneMetaData(const TDF_Label& theSrcLabel, TDataStd_Name::Set(theDstLabel, aRefName); } } - else - { - Standard_SStream Stream; - TopoDS_Shape aShape = aDstShapeTool->GetShape(theDstLabel); - TopAbs::Print(aShape.ShapeType(), Stream); - TCollection_AsciiString aName(Stream.str().c_str()); - TDataStd_Name::Set(theDstLabel, TCollection_ExtendedString(aName)); - } } From 20095306111bc6e035c001e719231a894bdd6882 Mon Sep 17 00:00:00 2001 From: aml Date: Mon, 29 Nov 2021 11:18:12 +0300 Subject: [PATCH 150/639] 0032696: Coding - get rid of unused forward declarations [StepSelect to Xw] Packages starting with lower-case (gp and gce) are also processed. --- src/StepSelect/StepSelect_FloatFormat.hxx | 1 - src/StepSelect/StepSelect_StepType.hxx | 1 - src/StepShape/StepShape_BooleanOperand.hxx | 1 - src/StepShape/StepShape_BooleanResult.hxx | 1 - .../StepShape_ConnectedFaceSubSet.hxx | 1 - src/StepShape/StepShape_CsgSelect.hxx | 1 - src/StepShape/StepShape_CsgSolid.hxx | 1 - ...imensionalCharacteristicRepresentation.hxx | 1 - .../StepShape_OrientedClosedShell.hxx | 1 - src/StepShape/StepShape_OrientedEdge.hxx | 1 - src/StepShape/StepShape_OrientedFace.hxx | 1 - src/StepShape/StepShape_OrientedOpenShell.hxx | 1 - .../StepShape_PlusMinusTolerance.hxx | 2 - src/StepShape/StepShape_SolidReplica.hxx | 1 - src/StepShape/StepShape_Subedge.hxx | 1 - src/StepShape/StepShape_Subface.hxx | 1 - src/StepShape/StepShape_ToleranceValue.hxx | 1 - src/StepToTopoDS/StepToTopoDS.hxx | 18 -------- src/StepToTopoDS/StepToTopoDS_Builder.hxx | 2 - .../StepToTopoDS_MakeTransformed.hxx | 1 - src/StepToTopoDS/StepToTopoDS_PointPair.hxx | 1 - .../StepToTopoDS_TranslateCompositeCurve.hxx | 1 - ...pToTopoDS_TranslateCurveBoundedSurface.hxx | 1 - .../StepToTopoDS_TranslateEdge.hxx | 2 - .../StepToTopoDS_TranslateEdgeLoop.hxx | 2 - .../StepToTopoDS_TranslateFace.hxx | 2 - .../StepToTopoDS_TranslatePolyLoop.hxx | 2 - .../StepToTopoDS_TranslateShell.hxx | 2 - .../StepToTopoDS_TranslateVertex.hxx | 2 - .../StepToTopoDS_TranslateVertexLoop.hxx | 2 - .../StepVisual_AnnotationFillArea.hxx | 1 - .../StepVisual_BackgroundColour.hxx | 1 - .../StepVisual_CameraModelD3MultiClipping.hxx | 1 - ...CameraModelD3MultiClippingIntersection.hxx | 1 - ...Visual_CameraModelD3MultiClippingUnion.hxx | 1 - ...tepVisual_ContextDependentInvisibility.hxx | 1 - ...l_ContextDependentOverRidingStyledItem.hxx | 1 - src/StepVisual/StepVisual_CoordinatesList.hxx | 1 - src/StepVisual/StepVisual_CurveStyle.hxx | 2 - .../StepVisual_OverRidingStyledItem.hxx | 2 - src/StepVisual/StepVisual_PlanarBox.hxx | 1 - src/StepVisual/StepVisual_PointStyle.hxx | 2 - .../StepVisual_PresentationSize.hxx | 1 - .../StepVisual_PresentationStyleByContext.hxx | 1 - ...StepVisual_PresentedItemRepresentation.hxx | 1 - src/StepVisual/StepVisual_StyledItem.hxx | 1 - .../StepVisual_TessellatedCurveSet.hxx | 1 - .../StepVisual_TessellatedGeometricSet.hxx | 1 - src/StepVisual/StepVisual_TessellatedItem.hxx | 1 - src/StepVisual/StepVisual_TextLiteral.hxx | 2 - src/StlAPI/StlAPI.hxx | 2 - src/Storage/Storage.hxx | 12 ----- src/Storage/Storage_BaseDriver.hxx | 5 -- src/Storage/Storage_Data.hxx | 2 - src/Storage/Storage_HeaderData.hxx | 3 -- src/Storage/Storage_InternalData.hxx | 1 - src/Storage/Storage_Root.hxx | 2 - src/Storage/Storage_RootData.hxx | 3 -- src/Storage/Storage_Schema.hxx | 8 ---- src/Storage/Storage_TypeData.hxx | 3 -- src/Storage/Storage_TypedCallBack.hxx | 1 - src/Sweep/Sweep_NumShapeIterator.hxx | 3 -- src/Sweep/Sweep_NumShapeTool.hxx | 2 - src/TCollection/TCollection_AsciiString.hxx | 5 -- .../TCollection_ExtendedString.hxx | 4 -- src/TCollection/TCollection_HAsciiString.hxx | 5 -- .../TCollection_HExtendedString.hxx | 5 -- src/TDF/TDF.hxx | 27 ----------- src/TDF/TDF_Attribute.hxx | 4 -- src/TDF/TDF_AttributeDelta.hxx | 1 - src/TDF/TDF_ChildIDIterator.hxx | 1 - src/TDF/TDF_CopyLabel.hxx | 2 - src/TDF/TDF_Data.hxx | 3 -- src/TDF/TDF_Delta.hxx | 3 -- src/TDF/TDF_Label.hxx | 6 --- src/TDF/TDF_LabelNode.hxx | 3 -- src/TDF/TDF_Reference.hxx | 2 - src/TDF/TDF_RelocationTable.hxx | 1 - src/TDF/TDF_TagSource.hxx | 1 - src/TDF/TDF_Transaction.hxx | 3 -- src/TDataStd/TDataStd.hxx | 39 ---------------- src/TDataStd/TDataStd_AsciiString.hxx | 2 - src/TDataStd/TDataStd_BooleanArray.hxx | 2 - src/TDataStd/TDataStd_BooleanList.hxx | 2 - src/TDataStd/TDataStd_ByteArray.hxx | 3 -- src/TDataStd/TDataStd_Current.hxx | 2 - src/TDataStd/TDataStd_Directory.hxx | 3 -- src/TDataStd/TDataStd_Expression.hxx | 2 - src/TDataStd/TDataStd_ExtStringArray.hxx | 3 -- src/TDataStd/TDataStd_ExtStringList.hxx | 2 - src/TDataStd/TDataStd_GenericEmpty.hxx | 3 -- src/TDataStd/TDataStd_GenericExtString.hxx | 2 - src/TDataStd/TDataStd_IntPackedMap.hxx | 2 - src/TDataStd/TDataStd_Integer.hxx | 2 - src/TDataStd/TDataStd_IntegerArray.hxx | 3 -- src/TDataStd/TDataStd_IntegerList.hxx | 2 - src/TDataStd/TDataStd_Name.hxx | 3 -- src/TDataStd/TDataStd_NoteBook.hxx | 2 - src/TDataStd/TDataStd_Real.hxx | 1 - src/TDataStd/TDataStd_RealArray.hxx | 3 -- src/TDataStd/TDataStd_RealList.hxx | 2 - src/TDataStd/TDataStd_ReferenceArray.hxx | 3 -- src/TDataStd/TDataStd_ReferenceList.hxx | 2 - src/TDataStd/TDataStd_Tick.hxx | 2 - src/TDataStd/TDataStd_TreeNode.hxx | 3 -- src/TDataStd/TDataStd_UAttribute.hxx | 2 - src/TDataStd/TDataStd_Variable.hxx | 2 - src/TDataXtd/TDataXtd.hxx | 11 ----- src/TDataXtd/TDataXtd_Constraint.hxx | 1 - src/TDataXtd/TDataXtd_Geometry.hxx | 1 - src/TDataXtd/TDataXtd_Position.hxx | 2 - src/TDataXtd/TDataXtd_Presentation.hxx | 3 -- src/TDataXtd/TDataXtd_Triangulation.hxx | 1 - src/TDocStd/TDocStd.hxx | 13 ------ src/TDocStd/TDocStd_Application.hxx | 1 - src/TDocStd/TDocStd_ApplicationDelta.hxx | 1 - src/TDocStd/TDocStd_CompoundDelta.hxx | 1 - src/TDocStd/TDocStd_Document.hxx | 2 - src/TDocStd/TDocStd_Modified.hxx | 1 - src/TDocStd/TDocStd_Owner.hxx | 1 - src/TDocStd/TDocStd_PathParser.hxx | 1 - src/TDocStd/TDocStd_XLink.hxx | 4 -- src/TDocStd/TDocStd_XLinkIterator.hxx | 1 - src/TDocStd/TDocStd_XLinkRoot.hxx | 2 - src/TFunction/TFunction_Driver.hxx | 1 - src/TFunction/TFunction_Function.hxx | 2 - src/TFunction/TFunction_GraphNode.hxx | 1 - src/TFunction/TFunction_IFunction.hxx | 1 - src/TFunction/TFunction_Logbook.hxx | 2 - src/TFunction/TFunction_Scope.hxx | 1 - src/TNaming/TNaming.hxx | 23 ---------- src/TNaming/TNaming_Identifier.hxx | 2 - src/TNaming/TNaming_Name.hxx | 2 - src/TNaming/TNaming_NamedShape.hxx | 5 -- src/TNaming/TNaming_Naming.hxx | 2 - src/TNaming/TNaming_Selector.hxx | 1 - src/TNaming/TNaming_Tool.hxx | 1 - src/TNaming/TNaming_TranslateTool.hxx | 1 - src/TNaming/TNaming_UsedShapes.hxx | 2 - src/TObj/TObj_Model.hxx | 1 - src/TObj/TObj_TModel.hxx | 1 - src/TObj/TObj_TNameContainer.hxx | 1 - src/TPrsStd/TPrsStd_AISPresentation.hxx | 1 - src/TPrsStd/TPrsStd_AISViewer.hxx | 1 - src/TopExp/TopExp.hxx | 1 - src/TopLoc/TopLoc_ItemLocation.hxx | 2 - src/TopLoc/TopLoc_Location.hxx | 2 - src/TopLoc/TopLoc_SListNodeOfItemLocation.hxx | 2 - src/TopLoc/TopLoc_SListOfItemLocation.hxx | 1 - src/TopOpeBRep/TopOpeBRep.hxx | 25 ---------- src/TopOpeBRep/TopOpeBRep_DSFiller.hxx | 5 -- src/TopOpeBRep/TopOpeBRep_EdgesFiller.hxx | 2 - .../TopOpeBRep_EdgesIntersector.hxx | 1 - .../TopOpeBRep_FaceEdgeIntersector.hxx | 2 - src/TopOpeBRep/TopOpeBRep_FacesFiller.hxx | 6 --- src/TopOpeBRep/TopOpeBRep_Hctxee2d.hxx | 3 -- src/TopOpeBRep/TopOpeBRep_LineInter.hxx | 4 -- src/TopOpeBRep/TopOpeBRep_Point2d.hxx | 1 - .../TopOpeBRep_ShapeIntersector.hxx | 5 -- .../TopOpeBRep_ShapeIntersector2d.hxx | 2 - src/TopOpeBRep/TopOpeBRep_ShapeScanner.hxx | 1 - src/TopOpeBRep/TopOpeBRep_VPointInter.hxx | 3 -- .../TopOpeBRep_VPointInterClassifier.hxx | 1 - .../TopOpeBRep_VPointInterIterator.hxx | 1 - src/TopOpeBRep/TopOpeBRep_WPointInter.hxx | 1 - .../TopOpeBRep_WPointInterIterator.hxx | 1 - .../TopOpeBRepBuild_BlockIterator.hxx | 1 - .../TopOpeBRepBuild_Builder.hxx | 2 - .../TopOpeBRepBuild_Builder1.hxx | 2 - .../TopOpeBRepBuild_BuilderON.hxx | 1 - .../TopOpeBRepBuild_CorrectFace2d.hxx | 2 - .../TopOpeBRepBuild_HBuilder.hxx | 2 - src/TopOpeBRepBuild/TopOpeBRepBuild_Loop.hxx | 2 - src/TopOpeBRepBuild/TopOpeBRepBuild_Pave.hxx | 1 - .../TopOpeBRepBuild_PaveSet.hxx | 1 - .../TopOpeBRepBuild_ShapeListOfShape.hxx | 1 - .../TopOpeBRepBuild_ShapeSet.hxx | 2 - .../TopOpeBRepBuild_ShellFaceClassifier.hxx | 1 - .../TopOpeBRepBuild_ShellFaceSet.hxx | 1 - .../TopOpeBRepBuild_VertexInfo.hxx | 2 - .../TopOpeBRepBuild_WireEdgeClassifier.hxx | 1 - .../TopOpeBRepBuild_WireEdgeSet.hxx | 1 - src/TopOpeBRepDS/TopOpeBRepDS.hxx | 46 ------------------- src/TopOpeBRepDS/TopOpeBRepDS_Curve.hxx | 1 - src/TopOpeBRepDS/TopOpeBRepDS_CurveData.hxx | 2 - .../TopOpeBRepDS_DataStructure.hxx | 7 --- src/TopOpeBRepDS/TopOpeBRepDS_Dumper.hxx | 7 --- .../TopOpeBRepDS_Edge3dInterferenceTool.hxx | 1 - src/TopOpeBRepDS/TopOpeBRepDS_Explorer.hxx | 2 - .../TopOpeBRepDS_FaceInterferenceTool.hxx | 2 - .../TopOpeBRepDS_HDataStructure.hxx | 1 - .../TopOpeBRepDS_Interference.hxx | 2 - src/TopOpeBRepDS/TopOpeBRepDS_Point.hxx | 1 - src/TopOpeBRepDS/TopOpeBRepDS_PointData.hxx | 2 - .../TopOpeBRepDS_PointExplorer.hxx | 1 - src/TopOpeBRepDS/TopOpeBRepDS_ShapeData.hxx | 1 - .../TopOpeBRepDS_SurfaceCurveInterference.hxx | 1 - src/TopOpeBRepDS/TopOpeBRepDS_SurfaceData.hxx | 2 - .../TopOpeBRepDS_SurfaceExplorer.hxx | 1 - src/TopOpeBRepTool/TopOpeBRepTool.hxx | 21 --------- src/TopOpeBRepTool/TopOpeBRepTool_BoxSort.hxx | 2 - src/TopOpeBRepTool/TopOpeBRepTool_C2DF.hxx | 1 - src/TopOpeBRepTool/TopOpeBRepTool_CLASSI.hxx | 1 - src/TopOpeBRepTool/TopOpeBRepTool_CORRISO.hxx | 3 -- .../TopOpeBRepTool_CurveTool.hxx | 1 - .../TopOpeBRepTool_FuseEdges.hxx | 3 -- .../TopOpeBRepTool_PurgeInternalEdges.hxx | 3 -- src/TopOpeBRepTool/TopOpeBRepTool_REGUS.hxx | 1 - src/TopOpeBRepTool/TopOpeBRepTool_REGUW.hxx | 3 -- .../TopOpeBRepTool_ShapeClassifier.hxx | 4 -- .../TopOpeBRepTool_SolidClassifier.hxx | 2 - .../TopOpeBRepTool_connexity.hxx | 1 - src/TopOpeBRepTool/TopOpeBRepTool_face.hxx | 2 - .../TopOpeBRepTool_makeTransition.hxx | 3 -- .../TopOpeBRepTool_mkTondgE.hxx | 3 -- src/TopTools/TopTools.hxx | 4 -- src/TopTools/TopTools_LocationSet.hxx | 1 - src/TopTools/TopTools_ShapeSet.hxx | 1 - src/TopTrans/TopTrans_CurveTransition.hxx | 1 - src/TopTrans/TopTrans_SurfaceTransition.hxx | 1 - src/TopoDS/TopoDS_Builder.hxx | 3 -- src/TopoDS/TopoDS_HShape.hxx | 1 - src/TopoDS/TopoDS_TCompSolid.hxx | 1 - src/TopoDS/TopoDS_TCompound.hxx | 1 - src/TopoDS/TopoDS_TFace.hxx | 1 - src/TopoDS/TopoDS_TShape.hxx | 2 - src/TopoDS/TopoDS_TShell.hxx | 1 - src/TopoDS/TopoDS_TSolid.hxx | 1 - src/TopoDS/TopoDS_TWire.hxx | 1 - src/TopoDSToStep/TopoDSToStep.hxx | 15 ------ src/TopoDSToStep/TopoDSToStep_Builder.hxx | 1 - .../TopoDSToStep_MakeBrepWithVoids.hxx | 1 - .../TopoDSToStep_MakeFacetedBrep.hxx | 1 - ...ToStep_MakeFacetedBrepAndBrepWithVoids.hxx | 1 - .../TopoDSToStep_MakeGeometricCurveSet.hxx | 1 - .../TopoDSToStep_MakeManifoldSolidBrep.hxx | 1 - ...opoDSToStep_MakeShellBasedSurfaceModel.hxx | 1 - .../TopoDSToStep_MakeStepEdge.hxx | 1 - .../TopoDSToStep_MakeStepFace.hxx | 1 - .../TopoDSToStep_MakeStepVertex.hxx | 1 - .../TopoDSToStep_MakeStepWire.hxx | 1 - src/TopoDSToStep/TopoDSToStep_Tool.hxx | 5 -- .../TopoDSToStep_WireframeBuilder.hxx | 1 - src/Transfer/Transfer_ActorDispatch.hxx | 3 -- .../Transfer_ActorOfTransientProcess.hxx | 1 - src/Transfer/Transfer_Binder.hxx | 1 - src/Transfer/Transfer_DispatchControl.hxx | 1 - src/Transfer/Transfer_MultipleBinder.hxx | 2 - src/Transfer/Transfer_ResultFromModel.hxx | 1 - src/Transfer/Transfer_ResultFromTransient.hxx | 1 - .../Transfer_SimpleBinderOfTransient.hxx | 3 -- src/Transfer/Transfer_TransferDispatch.hxx | 1 - src/Transfer/Transfer_TransferInput.hxx | 1 - src/Transfer/Transfer_TransferIterator.hxx | 1 - src/Transfer/Transfer_TransferOutput.hxx | 2 - src/Transfer/Transfer_TransientListBinder.hxx | 2 - src/TransferBRep/TransferBRep.hxx | 8 ---- .../TransferBRep_BinderOfShape.hxx | 2 - src/TransferBRep/TransferBRep_Reader.hxx | 1 - src/TransferBRep/TransferBRep_ShapeBinder.hxx | 1 - .../TransferBRep_ShapeListBinder.hxx | 2 - src/Units/Units.hxx | 15 ------ src/Units/Units_Lexicon.hxx | 2 - src/Units/Units_ShiftedToken.hxx | 1 - src/Units/Units_UnitsDictionary.hxx | 1 - src/Units/Units_UnitsLexicon.hxx | 2 - src/Units/Units_UnitsSystem.hxx | 2 - src/V3d/V3d_AmbientLight.hxx | 1 - src/V3d/V3d_Viewer.hxx | 2 - src/ViewerTest/ViewerTest_CmdParser.hxx | 2 - .../ViewerTest_ContinuousRedrawer.hxx | 1 - src/Vrml/Vrml.hxx | 39 ---------------- src/Vrml/Vrml_DirectionalLight.hxx | 2 - src/Vrml/Vrml_Info.hxx | 1 - src/Vrml/Vrml_Instancing.hxx | 1 - src/Vrml/Vrml_LOD.hxx | 1 - src/Vrml/Vrml_MatrixTransform.hxx | 1 - src/Vrml/Vrml_OrthographicCamera.hxx | 2 - src/Vrml/Vrml_PerspectiveCamera.hxx | 2 - src/Vrml/Vrml_PointLight.hxx | 2 - src/Vrml/Vrml_Rotation.hxx | 1 - src/Vrml/Vrml_Scale.hxx | 1 - src/Vrml/Vrml_SpotLight.hxx | 2 - src/Vrml/Vrml_Texture2.hxx | 1 - src/Vrml/Vrml_Texture2Transform.hxx | 1 - src/Vrml/Vrml_Transform.hxx | 2 - src/Vrml/Vrml_Translation.hxx | 1 - src/Vrml/Vrml_WWWAnchor.hxx | 1 - src/Vrml/Vrml_WWWInline.hxx | 2 - src/VrmlAPI/VrmlAPI.hxx | 1 - src/VrmlConverter/VrmlConverter_Projector.hxx | 1 - .../VrmlConverter_ShadingAspect.hxx | 1 - src/VrmlData/VrmlData_Node.hxx | 2 - src/XCAFApp/XCAFApp_Application.hxx | 1 - src/XCAFDoc/XCAFDoc.hxx | 21 --------- src/XCAFDoc/XCAFDoc_Area.hxx | 2 - src/XCAFDoc/XCAFDoc_AssemblyItemRef.hxx | 1 - src/XCAFDoc/XCAFDoc_Centroid.hxx | 2 - src/XCAFDoc/XCAFDoc_ClippingPlaneTool.hxx | 1 + src/XCAFDoc/XCAFDoc_Color.hxx | 2 - src/XCAFDoc/XCAFDoc_ColorTool.hxx | 2 - src/XCAFDoc/XCAFDoc_Datum.hxx | 1 - src/XCAFDoc/XCAFDoc_DimTol.hxx | 1 - src/XCAFDoc/XCAFDoc_DimTolTool.hxx | 3 +- src/XCAFDoc/XCAFDoc_Dimension.hxx | 2 - src/XCAFDoc/XCAFDoc_DocumentTool.hxx | 2 - src/XCAFDoc/XCAFDoc_GeomTolerance.hxx | 2 - src/XCAFDoc/XCAFDoc_GraphNode.hxx | 2 - src/XCAFDoc/XCAFDoc_LayerTool.hxx | 2 - src/XCAFDoc/XCAFDoc_LengthUnit.hxx | 2 - src/XCAFDoc/XCAFDoc_Location.hxx | 2 - src/XCAFDoc/XCAFDoc_Material.hxx | 1 - src/XCAFDoc/XCAFDoc_MaterialTool.hxx | 2 - src/XCAFDoc/XCAFDoc_Note.hxx | 1 - src/XCAFDoc/XCAFDoc_NotesTool.hxx | 1 - src/XCAFDoc/XCAFDoc_ShapeMapTool.hxx | 1 - src/XCAFDoc/XCAFDoc_ShapeTool.hxx | 2 - src/XCAFDoc/XCAFDoc_View.hxx | 2 - src/XCAFDoc/XCAFDoc_ViewTool.hxx | 3 -- src/XCAFDoc/XCAFDoc_VisMaterial.hxx | 1 + src/XCAFDoc/XCAFDoc_VisMaterialTool.hxx | 1 - src/XCAFDoc/XCAFDoc_Volume.hxx | 2 - src/XCAFPrs/XCAFPrs.hxx | 2 - src/XCAFPrs/XCAFPrs_DocumentExplorer.hxx | 1 - src/XDEDRAW/XDEDRAW.hxx | 7 --- src/XSAlgo/XSAlgo.hxx | 2 - src/XSAlgo/XSAlgo_AlgoContainer.hxx | 1 - src/XSControl/XSControl.hxx | 13 ------ src/XSControl/XSControl_Controller.hxx | 3 -- src/XSControl/XSControl_TransferReader.hxx | 1 - src/XSControl/XSControl_TransferWriter.hxx | 1 - src/XSControl/XSControl_Utils.hxx | 1 - src/XSControl/XSControl_WorkSession.hxx | 2 - src/XSDRAW/XSDRAW.hxx | 2 - src/XSDRAWSTLVRML/XSDRAWSTLVRML.hxx | 3 -- src/XmlDrivers/XmlDrivers.hxx | 2 - src/XmlLDrivers/XmlLDrivers.hxx | 3 -- .../XmlLDrivers_DocumentRetrievalDriver.hxx | 2 - .../XmlLDrivers_DocumentStorageDriver.hxx | 1 - src/XmlLDrivers/XmlLDrivers_NamespaceDef.hxx | 1 - src/XmlMDF/XmlMDF.hxx | 4 -- src/XmlMDF/XmlMDF_ADriver.hxx | 2 - src/XmlMDataStd/XmlMDataStd.hxx | 23 ---------- .../XmlMDataStd_GenericExtStringDriver.hxx | 1 - src/XmlMDataXtd/XmlMDataXtd.hxx | 4 -- src/XmlMDocStd/XmlMDocStd.hxx | 1 - src/XmlMFunction/XmlMFunction.hxx | 3 -- src/XmlMNaming/XmlMNaming.hxx | 3 -- src/XmlMXCAFDoc/XmlMXCAFDoc.hxx | 11 ----- src/XmlObjMgt/XmlObjMgt.hxx | 3 -- src/XmlXCAFDrivers/XmlXCAFDrivers.hxx | 2 - src/Xw/Xw_Window.hxx | 5 -- src/gce/gce_MakeCirc.hxx | 2 - src/gce/gce_MakeCirc2d.hxx | 2 - src/gce/gce_MakeCone.hxx | 2 - src/gce/gce_MakeCylinder.hxx | 2 - src/gce/gce_MakeDir.hxx | 2 - src/gce/gce_MakeDir2d.hxx | 2 - src/gce/gce_MakeElips.hxx | 2 - src/gce/gce_MakeElips2d.hxx | 2 - src/gce/gce_MakeHypr.hxx | 2 - src/gce/gce_MakeHypr2d.hxx | 2 - src/gce/gce_MakeLin.hxx | 2 - src/gce/gce_MakeLin2d.hxx | 2 - src/gce/gce_MakeMirror.hxx | 1 - src/gce/gce_MakeMirror2d.hxx | 1 - src/gce/gce_MakeParab.hxx | 2 - src/gce/gce_MakeParab2d.hxx | 2 - src/gce/gce_MakePln.hxx | 2 - src/gce/gce_MakeRotation.hxx | 1 - src/gce/gce_MakeRotation2d.hxx | 1 - src/gce/gce_MakeScale.hxx | 1 - src/gce/gce_MakeScale2d.hxx | 1 - src/gce/gce_MakeTranslation.hxx | 1 - src/gce/gce_MakeTranslation2d.hxx | 1 - src/gp/gp_Ax2.hxx | 2 - src/gp/gp_Dir2d.hxx | 1 - src/gp/gp_GTrsf.hxx | 2 - src/gp/gp_GTrsf2d.hxx | 2 - src/gp/gp_Mat2d.hxx | 2 - src/gp/gp_Pnt.hxx | 2 - src/gp/gp_Pnt2d.hxx | 2 - src/gp/gp_Trsf2d.hxx | 3 -- 383 files changed, 3 insertions(+), 1042 deletions(-) diff --git a/src/StepSelect/StepSelect_FloatFormat.hxx b/src/StepSelect/StepSelect_FloatFormat.hxx index 4d25926959..e25a188792 100644 --- a/src/StepSelect/StepSelect_FloatFormat.hxx +++ b/src/StepSelect/StepSelect_FloatFormat.hxx @@ -26,7 +26,6 @@ #include #include #include -class TCollection_AsciiString; class IFSelect_ContextWrite; class StepData_StepWriter; diff --git a/src/StepSelect/StepSelect_StepType.hxx b/src/StepSelect/StepSelect_StepType.hxx index e0e98f55c6..26668d5b52 100644 --- a/src/StepSelect/StepSelect_StepType.hxx +++ b/src/StepSelect/StepSelect_StepType.hxx @@ -24,7 +24,6 @@ #include #include class StepData_Protocol; -class Interface_InterfaceError; class Interface_Protocol; class Standard_Transient; class Interface_InterfaceModel; diff --git a/src/StepShape/StepShape_BooleanOperand.hxx b/src/StepShape/StepShape_BooleanOperand.hxx index bca5e192be..689b8075fb 100644 --- a/src/StepShape/StepShape_BooleanOperand.hxx +++ b/src/StepShape/StepShape_BooleanOperand.hxx @@ -26,7 +26,6 @@ class StepShape_SolidModel; class StepShape_HalfSpaceSolid; class StepShape_BooleanResult; -class StepShape_CsgPrimitive; diff --git a/src/StepShape/StepShape_BooleanResult.hxx b/src/StepShape/StepShape_BooleanResult.hxx index 7ac650f9db..7addf227cc 100644 --- a/src/StepShape/StepShape_BooleanResult.hxx +++ b/src/StepShape/StepShape_BooleanResult.hxx @@ -24,7 +24,6 @@ #include #include class TCollection_HAsciiString; -class StepShape_BooleanOperand; class StepShape_BooleanResult; diff --git a/src/StepShape/StepShape_ConnectedFaceSubSet.hxx b/src/StepShape/StepShape_ConnectedFaceSubSet.hxx index 01f421543f..f667cc30ab 100644 --- a/src/StepShape/StepShape_ConnectedFaceSubSet.hxx +++ b/src/StepShape/StepShape_ConnectedFaceSubSet.hxx @@ -21,7 +21,6 @@ #include #include -class StepShape_ConnectedFaceSet; class TCollection_HAsciiString; diff --git a/src/StepShape/StepShape_CsgSelect.hxx b/src/StepShape/StepShape_CsgSelect.hxx index 20e5bdc86f..ffd9e75860 100644 --- a/src/StepShape/StepShape_CsgSelect.hxx +++ b/src/StepShape/StepShape_CsgSelect.hxx @@ -24,7 +24,6 @@ #include #include class StepShape_BooleanResult; -class StepShape_CsgPrimitive; diff --git a/src/StepShape/StepShape_CsgSolid.hxx b/src/StepShape/StepShape_CsgSolid.hxx index 367881e78e..5bfd8b334c 100644 --- a/src/StepShape/StepShape_CsgSolid.hxx +++ b/src/StepShape/StepShape_CsgSolid.hxx @@ -23,7 +23,6 @@ #include #include class TCollection_HAsciiString; -class StepShape_CsgSelect; class StepShape_CsgSolid; diff --git a/src/StepShape/StepShape_DimensionalCharacteristicRepresentation.hxx b/src/StepShape/StepShape_DimensionalCharacteristicRepresentation.hxx index e7dfd0f6d4..e7f1e41e58 100644 --- a/src/StepShape/StepShape_DimensionalCharacteristicRepresentation.hxx +++ b/src/StepShape/StepShape_DimensionalCharacteristicRepresentation.hxx @@ -22,7 +22,6 @@ #include #include class StepShape_ShapeDimensionRepresentation; -class StepShape_DimensionalCharacteristic; class StepShape_DimensionalCharacteristicRepresentation; diff --git a/src/StepShape/StepShape_OrientedClosedShell.hxx b/src/StepShape/StepShape_OrientedClosedShell.hxx index 3f9754523f..90082e01d3 100644 --- a/src/StepShape/StepShape_OrientedClosedShell.hxx +++ b/src/StepShape/StepShape_OrientedClosedShell.hxx @@ -24,7 +24,6 @@ #include #include #include -class StepShape_ClosedShell; class TCollection_HAsciiString; class StepShape_Face; diff --git a/src/StepShape/StepShape_OrientedEdge.hxx b/src/StepShape/StepShape_OrientedEdge.hxx index 52b7d528af..3f80561a9b 100644 --- a/src/StepShape/StepShape_OrientedEdge.hxx +++ b/src/StepShape/StepShape_OrientedEdge.hxx @@ -22,7 +22,6 @@ #include #include -class StepShape_Edge; class TCollection_HAsciiString; class StepShape_Vertex; diff --git a/src/StepShape/StepShape_OrientedFace.hxx b/src/StepShape/StepShape_OrientedFace.hxx index 45130031b6..3458ac4b8e 100644 --- a/src/StepShape/StepShape_OrientedFace.hxx +++ b/src/StepShape/StepShape_OrientedFace.hxx @@ -24,7 +24,6 @@ #include #include #include -class StepShape_Face; class TCollection_HAsciiString; class StepShape_FaceBound; diff --git a/src/StepShape/StepShape_OrientedOpenShell.hxx b/src/StepShape/StepShape_OrientedOpenShell.hxx index 0ec4fd0e69..c44889c932 100644 --- a/src/StepShape/StepShape_OrientedOpenShell.hxx +++ b/src/StepShape/StepShape_OrientedOpenShell.hxx @@ -24,7 +24,6 @@ #include #include #include -class StepShape_OpenShell; class TCollection_HAsciiString; class StepShape_Face; diff --git a/src/StepShape/StepShape_PlusMinusTolerance.hxx b/src/StepShape/StepShape_PlusMinusTolerance.hxx index e151485d7a..f45118588d 100644 --- a/src/StepShape/StepShape_PlusMinusTolerance.hxx +++ b/src/StepShape/StepShape_PlusMinusTolerance.hxx @@ -22,8 +22,6 @@ #include #include #include -class StepShape_ToleranceMethodDefinition; -class StepShape_DimensionalCharacteristic; class StepShape_PlusMinusTolerance; diff --git a/src/StepShape/StepShape_SolidReplica.hxx b/src/StepShape/StepShape_SolidReplica.hxx index 93a05e3358..b0c61ca9d4 100644 --- a/src/StepShape/StepShape_SolidReplica.hxx +++ b/src/StepShape/StepShape_SolidReplica.hxx @@ -21,7 +21,6 @@ #include #include -class StepShape_SolidModel; class StepGeom_CartesianTransformationOperator3d; class TCollection_HAsciiString; diff --git a/src/StepShape/StepShape_Subedge.hxx b/src/StepShape/StepShape_Subedge.hxx index 24f571f2ad..ea36a06763 100644 --- a/src/StepShape/StepShape_Subedge.hxx +++ b/src/StepShape/StepShape_Subedge.hxx @@ -20,7 +20,6 @@ #include #include -class StepShape_Edge; class TCollection_HAsciiString; class StepShape_Vertex; diff --git a/src/StepShape/StepShape_Subface.hxx b/src/StepShape/StepShape_Subface.hxx index dc26d37f5b..753f11f94d 100644 --- a/src/StepShape/StepShape_Subface.hxx +++ b/src/StepShape/StepShape_Subface.hxx @@ -21,7 +21,6 @@ #include #include -class StepShape_Face; class TCollection_HAsciiString; diff --git a/src/StepShape/StepShape_ToleranceValue.hxx b/src/StepShape/StepShape_ToleranceValue.hxx index b9118384e2..463fc9227e 100644 --- a/src/StepShape/StepShape_ToleranceValue.hxx +++ b/src/StepShape/StepShape_ToleranceValue.hxx @@ -20,7 +20,6 @@ #include #include -class StepBasic_MeasureWithUnit; class StepShape_ToleranceValue; diff --git a/src/StepToTopoDS/StepToTopoDS.hxx b/src/StepToTopoDS/StepToTopoDS.hxx index 1ef002e4a8..4aae8313de 100644 --- a/src/StepToTopoDS/StepToTopoDS.hxx +++ b/src/StepToTopoDS/StepToTopoDS.hxx @@ -31,24 +31,6 @@ #include #include class TCollection_HAsciiString; -class StepToTopoDS_Root; -class StepToTopoDS_TranslateShell; -class StepToTopoDS_TranslateFace; -class StepToTopoDS_TranslateEdgeLoop; -class StepToTopoDS_TranslateEdge; -class StepToTopoDS_TranslateVertex; -class StepToTopoDS_TranslatePolyLoop; -class StepToTopoDS_TranslateVertexLoop; -class StepToTopoDS_TranslateCompositeCurve; -class StepToTopoDS_TranslateCurveBoundedSurface; -class StepToTopoDS_Builder; -class StepToTopoDS_MakeTransformed; -class StepToTopoDS_GeometricTool; -class StepToTopoDS_Tool; -class StepToTopoDS_CartesianPointHasher; -class StepToTopoDS_PointPair; -class StepToTopoDS_PointPairHasher; -class StepToTopoDS_NMTool; //! This package implements the mapping between AP214 diff --git a/src/StepToTopoDS/StepToTopoDS_Builder.hxx b/src/StepToTopoDS/StepToTopoDS_Builder.hxx index 0481052920..76f8af52d6 100644 --- a/src/StepToTopoDS/StepToTopoDS_Builder.hxx +++ b/src/StepToTopoDS/StepToTopoDS_Builder.hxx @@ -27,7 +27,6 @@ #include #include -class StdFail_NotDone; class StepShape_ManifoldSolidBrep; class Transfer_TransientProcess; class StepShape_BrepWithVoids; @@ -39,7 +38,6 @@ class StepShape_GeometricSet; class StepShape_EdgeBasedWireframeModel; class StepShape_FaceBasedSurfaceModel; class Transfer_ActorOfTransientProcess; -class TopoDS_Shape; diff --git a/src/StepToTopoDS/StepToTopoDS_MakeTransformed.hxx b/src/StepToTopoDS/StepToTopoDS_MakeTransformed.hxx index 826e665421..e787b8c48f 100644 --- a/src/StepToTopoDS/StepToTopoDS_MakeTransformed.hxx +++ b/src/StepToTopoDS/StepToTopoDS_MakeTransformed.hxx @@ -28,7 +28,6 @@ class StepGeom_Axis2Placement3d; class StepGeom_CartesianTransformationOperator3d; -class gp_Trsf; class TopoDS_Shape; class StepRepr_MappedItem; class Transfer_TransientProcess; diff --git a/src/StepToTopoDS/StepToTopoDS_PointPair.hxx b/src/StepToTopoDS/StepToTopoDS_PointPair.hxx index 10167d720c..ecbbc0bd91 100644 --- a/src/StepToTopoDS/StepToTopoDS_PointPair.hxx +++ b/src/StepToTopoDS/StepToTopoDS_PointPair.hxx @@ -22,7 +22,6 @@ #include class StepGeom_CartesianPoint; -class StepToTopoDS_PointPairHasher; //! Stores a pair of Points from step diff --git a/src/StepToTopoDS/StepToTopoDS_TranslateCompositeCurve.hxx b/src/StepToTopoDS/StepToTopoDS_TranslateCompositeCurve.hxx index 3817541154..36d4d6c062 100644 --- a/src/StepToTopoDS/StepToTopoDS_TranslateCompositeCurve.hxx +++ b/src/StepToTopoDS/StepToTopoDS_TranslateCompositeCurve.hxx @@ -28,7 +28,6 @@ class StepGeom_CompositeCurve; class Transfer_TransientProcess; class StepGeom_Surface; class Geom_Surface; -class TopoDS_Wire; //! Translate STEP entity composite_curve to TopoDS_Wire diff --git a/src/StepToTopoDS/StepToTopoDS_TranslateCurveBoundedSurface.hxx b/src/StepToTopoDS/StepToTopoDS_TranslateCurveBoundedSurface.hxx index 43c41f0df0..b7d2183bc6 100644 --- a/src/StepToTopoDS/StepToTopoDS_TranslateCurveBoundedSurface.hxx +++ b/src/StepToTopoDS/StepToTopoDS_TranslateCurveBoundedSurface.hxx @@ -26,7 +26,6 @@ #include class StepGeom_CurveBoundedSurface; class Transfer_TransientProcess; -class TopoDS_Face; //! Translate curve_bounded_surface into TopoDS_Face diff --git a/src/StepToTopoDS/StepToTopoDS_TranslateEdge.hxx b/src/StepToTopoDS/StepToTopoDS_TranslateEdge.hxx index 60ae276254..3a8117a8b8 100644 --- a/src/StepToTopoDS/StepToTopoDS_TranslateEdge.hxx +++ b/src/StepToTopoDS/StepToTopoDS_TranslateEdge.hxx @@ -25,7 +25,6 @@ #include #include #include -class StdFail_NotDone; class StepShape_Edge; class StepToTopoDS_Tool; class StepToTopoDS_NMTool; @@ -37,7 +36,6 @@ class TopoDS_Vertex; class Geom2d_Curve; class StepGeom_Pcurve; class Geom_Surface; -class TopoDS_Shape; diff --git a/src/StepToTopoDS/StepToTopoDS_TranslateEdgeLoop.hxx b/src/StepToTopoDS/StepToTopoDS_TranslateEdgeLoop.hxx index d29a74a2bd..878a065f58 100644 --- a/src/StepToTopoDS/StepToTopoDS_TranslateEdgeLoop.hxx +++ b/src/StepToTopoDS/StepToTopoDS_TranslateEdgeLoop.hxx @@ -25,14 +25,12 @@ #include #include #include -class StdFail_NotDone; class StepShape_FaceBound; class TopoDS_Face; class Geom_Surface; class StepGeom_Surface; class StepToTopoDS_Tool; class StepToTopoDS_NMTool; -class TopoDS_Shape; diff --git a/src/StepToTopoDS/StepToTopoDS_TranslateFace.hxx b/src/StepToTopoDS/StepToTopoDS_TranslateFace.hxx index 3ce19fc207..219b07bc8f 100644 --- a/src/StepToTopoDS/StepToTopoDS_TranslateFace.hxx +++ b/src/StepToTopoDS/StepToTopoDS_TranslateFace.hxx @@ -24,11 +24,9 @@ #include #include #include -class StdFail_NotDone; class StepShape_FaceSurface; class StepToTopoDS_Tool; class StepToTopoDS_NMTool; -class TopoDS_Shape; diff --git a/src/StepToTopoDS/StepToTopoDS_TranslatePolyLoop.hxx b/src/StepToTopoDS/StepToTopoDS_TranslatePolyLoop.hxx index fca5fac4a7..779525c6ff 100644 --- a/src/StepToTopoDS/StepToTopoDS_TranslatePolyLoop.hxx +++ b/src/StepToTopoDS/StepToTopoDS_TranslatePolyLoop.hxx @@ -24,12 +24,10 @@ #include #include #include -class StdFail_NotDone; class StepShape_PolyLoop; class StepToTopoDS_Tool; class Geom_Surface; class TopoDS_Face; -class TopoDS_Shape; diff --git a/src/StepToTopoDS/StepToTopoDS_TranslateShell.hxx b/src/StepToTopoDS/StepToTopoDS_TranslateShell.hxx index dcaa3b61f4..27cf332a02 100644 --- a/src/StepToTopoDS/StepToTopoDS_TranslateShell.hxx +++ b/src/StepToTopoDS/StepToTopoDS_TranslateShell.hxx @@ -26,11 +26,9 @@ #include #include -class StdFail_NotDone; class StepShape_ConnectedFaceSet; class StepToTopoDS_Tool; class StepToTopoDS_NMTool; -class TopoDS_Shape; diff --git a/src/StepToTopoDS/StepToTopoDS_TranslateVertex.hxx b/src/StepToTopoDS/StepToTopoDS_TranslateVertex.hxx index e39e7f7b29..46b16b6254 100644 --- a/src/StepToTopoDS/StepToTopoDS_TranslateVertex.hxx +++ b/src/StepToTopoDS/StepToTopoDS_TranslateVertex.hxx @@ -24,11 +24,9 @@ #include #include #include -class StdFail_NotDone; class StepShape_Vertex; class StepToTopoDS_Tool; class StepToTopoDS_NMTool; -class TopoDS_Shape; diff --git a/src/StepToTopoDS/StepToTopoDS_TranslateVertexLoop.hxx b/src/StepToTopoDS/StepToTopoDS_TranslateVertexLoop.hxx index d0bc5cbbd0..d630c33b5a 100644 --- a/src/StepToTopoDS/StepToTopoDS_TranslateVertexLoop.hxx +++ b/src/StepToTopoDS/StepToTopoDS_TranslateVertexLoop.hxx @@ -24,11 +24,9 @@ #include #include #include -class StdFail_NotDone; class StepShape_VertexLoop; class StepToTopoDS_Tool; class StepToTopoDS_NMTool; -class TopoDS_Shape; diff --git a/src/StepVisual/StepVisual_AnnotationFillArea.hxx b/src/StepVisual/StepVisual_AnnotationFillArea.hxx index 2b770da19f..c98ed883f3 100644 --- a/src/StepVisual/StepVisual_AnnotationFillArea.hxx +++ b/src/StepVisual/StepVisual_AnnotationFillArea.hxx @@ -22,7 +22,6 @@ #include #include #include -class TCollection_HAsciiString; class StepVisual_AnnotationFillArea; DEFINE_STANDARD_HANDLE(StepVisual_AnnotationFillArea, StepShape_GeometricCurveSet) diff --git a/src/StepVisual/StepVisual_BackgroundColour.hxx b/src/StepVisual/StepVisual_BackgroundColour.hxx index 7ecbf79522..0bdc13bd96 100644 --- a/src/StepVisual/StepVisual_BackgroundColour.hxx +++ b/src/StepVisual/StepVisual_BackgroundColour.hxx @@ -22,7 +22,6 @@ #include #include -class StepVisual_AreaOrView; class StepVisual_BackgroundColour; diff --git a/src/StepVisual/StepVisual_CameraModelD3MultiClipping.hxx b/src/StepVisual/StepVisual_CameraModelD3MultiClipping.hxx index e645f682b1..1e48df24ad 100644 --- a/src/StepVisual/StepVisual_CameraModelD3MultiClipping.hxx +++ b/src/StepVisual/StepVisual_CameraModelD3MultiClipping.hxx @@ -25,7 +25,6 @@ class StepVisual_HArray1OfCameraModelD3MultiClippingInterectionSelect; class StepVisual_ViewVolume; class TCollection_HAsciiString; -class StepVisual_CameraModelD3; DEFINE_STANDARD_HANDLE(StepVisual_CameraModelD3MultiClipping, StepVisual_CameraModelD3) class StepVisual_CameraModelD3MultiClipping : public StepVisual_CameraModelD3 diff --git a/src/StepVisual/StepVisual_CameraModelD3MultiClippingIntersection.hxx b/src/StepVisual/StepVisual_CameraModelD3MultiClippingIntersection.hxx index 9fe8d223d9..f340cf88d6 100644 --- a/src/StepVisual/StepVisual_CameraModelD3MultiClippingIntersection.hxx +++ b/src/StepVisual/StepVisual_CameraModelD3MultiClippingIntersection.hxx @@ -23,7 +23,6 @@ class StepVisual_HArray1OfCameraModelD3MultiClippingInterectionSelect; class TCollection_HAsciiString; -class StepGeom_GeometricRepresentationItem; DEFINE_STANDARD_HANDLE(StepVisual_CameraModelD3MultiClippingIntersection, StepGeom_GeometricRepresentationItem) class StepVisual_CameraModelD3MultiClippingIntersection : public StepGeom_GeometricRepresentationItem diff --git a/src/StepVisual/StepVisual_CameraModelD3MultiClippingUnion.hxx b/src/StepVisual/StepVisual_CameraModelD3MultiClippingUnion.hxx index 64f8a84c63..7e2c15d799 100644 --- a/src/StepVisual/StepVisual_CameraModelD3MultiClippingUnion.hxx +++ b/src/StepVisual/StepVisual_CameraModelD3MultiClippingUnion.hxx @@ -23,7 +23,6 @@ class StepVisual_HArray1OfCameraModelD3MultiClippingUnionSelect; class TCollection_HAsciiString; -class StepGeom_GeometricRepresentationItem; DEFINE_STANDARD_HANDLE(StepVisual_CameraModelD3MultiClippingUnion, StepGeom_GeometricRepresentationItem) class StepVisual_CameraModelD3MultiClippingUnion : public StepGeom_GeometricRepresentationItem diff --git a/src/StepVisual/StepVisual_ContextDependentInvisibility.hxx b/src/StepVisual/StepVisual_ContextDependentInvisibility.hxx index 629b6a8e76..eeb582eb3f 100644 --- a/src/StepVisual/StepVisual_ContextDependentInvisibility.hxx +++ b/src/StepVisual/StepVisual_ContextDependentInvisibility.hxx @@ -23,7 +23,6 @@ #include #include #include -class StepVisual_InvisibilityContext; class StepVisual_ContextDependentInvisibility; diff --git a/src/StepVisual/StepVisual_ContextDependentOverRidingStyledItem.hxx b/src/StepVisual/StepVisual_ContextDependentOverRidingStyledItem.hxx index d5e1d92a45..591ae6ad41 100644 --- a/src/StepVisual/StepVisual_ContextDependentOverRidingStyledItem.hxx +++ b/src/StepVisual/StepVisual_ContextDependentOverRidingStyledItem.hxx @@ -25,7 +25,6 @@ #include #include class TCollection_HAsciiString; -class StepRepr_RepresentationItem; class StepVisual_StyledItem; class StepVisual_StyleContextSelect; diff --git a/src/StepVisual/StepVisual_CoordinatesList.hxx b/src/StepVisual/StepVisual_CoordinatesList.hxx index fa2a50584c..7daad8ae71 100644 --- a/src/StepVisual/StepVisual_CoordinatesList.hxx +++ b/src/StepVisual/StepVisual_CoordinatesList.hxx @@ -20,7 +20,6 @@ #include #include #include -class Standard_Transient; DEFINE_STANDARD_HANDLE(StepVisual_CoordinatesList,StepVisual_TessellatedItem) class StepVisual_CoordinatesList : public StepVisual_TessellatedItem diff --git a/src/StepVisual/StepVisual_CurveStyle.hxx b/src/StepVisual/StepVisual_CurveStyle.hxx index 9654397fbd..8e66903de2 100644 --- a/src/StepVisual/StepVisual_CurveStyle.hxx +++ b/src/StepVisual/StepVisual_CurveStyle.hxx @@ -25,8 +25,6 @@ #include class TCollection_HAsciiString; class StepVisual_Colour; -class StepVisual_CurveStyleFontSelect; -class StepBasic_SizeSelect; class StepVisual_CurveStyle; diff --git a/src/StepVisual/StepVisual_OverRidingStyledItem.hxx b/src/StepVisual/StepVisual_OverRidingStyledItem.hxx index 9dce3ba690..87657c926d 100644 --- a/src/StepVisual/StepVisual_OverRidingStyledItem.hxx +++ b/src/StepVisual/StepVisual_OverRidingStyledItem.hxx @@ -22,9 +22,7 @@ #include #include -class StepVisual_StyledItem; class TCollection_HAsciiString; -class StepRepr_RepresentationItem; class StepVisual_OverRidingStyledItem; diff --git a/src/StepVisual/StepVisual_PlanarBox.hxx b/src/StepVisual/StepVisual_PlanarBox.hxx index 8acff7b434..1f0b5bdee6 100644 --- a/src/StepVisual/StepVisual_PlanarBox.hxx +++ b/src/StepVisual/StepVisual_PlanarBox.hxx @@ -24,7 +24,6 @@ #include #include class TCollection_HAsciiString; -class StepGeom_Axis2Placement; class StepVisual_PlanarBox; diff --git a/src/StepVisual/StepVisual_PointStyle.hxx b/src/StepVisual/StepVisual_PointStyle.hxx index a19cd30822..21b1c4275c 100644 --- a/src/StepVisual/StepVisual_PointStyle.hxx +++ b/src/StepVisual/StepVisual_PointStyle.hxx @@ -25,8 +25,6 @@ #include class TCollection_HAsciiString; class StepVisual_Colour; -class StepVisual_MarkerSelect; -class StepBasic_SizeSelect; class StepVisual_PointStyle; diff --git a/src/StepVisual/StepVisual_PresentationSize.hxx b/src/StepVisual/StepVisual_PresentationSize.hxx index 33c9bf66bc..3e4c00e80a 100644 --- a/src/StepVisual/StepVisual_PresentationSize.hxx +++ b/src/StepVisual/StepVisual_PresentationSize.hxx @@ -23,7 +23,6 @@ #include #include class StepVisual_PlanarBox; -class StepVisual_PresentationSizeAssignmentSelect; class StepVisual_PresentationSize; diff --git a/src/StepVisual/StepVisual_PresentationStyleByContext.hxx b/src/StepVisual/StepVisual_PresentationStyleByContext.hxx index 84c9969a23..84ad0f4a3b 100644 --- a/src/StepVisual/StepVisual_PresentationStyleByContext.hxx +++ b/src/StepVisual/StepVisual_PresentationStyleByContext.hxx @@ -23,7 +23,6 @@ #include #include #include -class StepVisual_StyleContextSelect; class StepVisual_PresentationStyleByContext; diff --git a/src/StepVisual/StepVisual_PresentedItemRepresentation.hxx b/src/StepVisual/StepVisual_PresentedItemRepresentation.hxx index c2faa19f5a..213d1761ae 100644 --- a/src/StepVisual/StepVisual_PresentedItemRepresentation.hxx +++ b/src/StepVisual/StepVisual_PresentedItemRepresentation.hxx @@ -23,7 +23,6 @@ #include #include class StepVisual_PresentedItem; -class StepVisual_PresentationRepresentationSelect; class StepVisual_PresentedItemRepresentation; diff --git a/src/StepVisual/StepVisual_StyledItem.hxx b/src/StepVisual/StepVisual_StyledItem.hxx index 94d0f9fd34..dac69fc50c 100644 --- a/src/StepVisual/StepVisual_StyledItem.hxx +++ b/src/StepVisual/StepVisual_StyledItem.hxx @@ -24,7 +24,6 @@ #include #include #include -class StepRepr_RepresentationItem; class TCollection_HAsciiString; class StepVisual_PresentationStyleAssignment; diff --git a/src/StepVisual/StepVisual_TessellatedCurveSet.hxx b/src/StepVisual/StepVisual_TessellatedCurveSet.hxx index 0158a01091..7df53d8161 100644 --- a/src/StepVisual/StepVisual_TessellatedCurveSet.hxx +++ b/src/StepVisual/StepVisual_TessellatedCurveSet.hxx @@ -25,7 +25,6 @@ #include #include #include -class Standard_Transient; typedef NCollection_Vector StepVisual_VectorOfHSequenceOfInteger; diff --git a/src/StepVisual/StepVisual_TessellatedGeometricSet.hxx b/src/StepVisual/StepVisual_TessellatedGeometricSet.hxx index bc3e373336..fac8985c0c 100644 --- a/src/StepVisual/StepVisual_TessellatedGeometricSet.hxx +++ b/src/StepVisual/StepVisual_TessellatedGeometricSet.hxx @@ -24,7 +24,6 @@ //#include #include -class Standard_Transient; typedef NCollection_Array1 StepVisual_Array1OfTessellatedItem; diff --git a/src/StepVisual/StepVisual_TessellatedItem.hxx b/src/StepVisual/StepVisual_TessellatedItem.hxx index 72ea067a76..376a20e207 100644 --- a/src/StepVisual/StepVisual_TessellatedItem.hxx +++ b/src/StepVisual/StepVisual_TessellatedItem.hxx @@ -20,7 +20,6 @@ #include #include -class Standard_Transient; DEFINE_STANDARD_HANDLE(StepVisual_TessellatedItem, StepGeom_GeometricRepresentationItem) class StepVisual_TessellatedItem : public StepGeom_GeometricRepresentationItem diff --git a/src/StepVisual/StepVisual_TextLiteral.hxx b/src/StepVisual/StepVisual_TextLiteral.hxx index c60783f7b4..5084dd0eb1 100644 --- a/src/StepVisual/StepVisual_TextLiteral.hxx +++ b/src/StepVisual/StepVisual_TextLiteral.hxx @@ -25,8 +25,6 @@ #include #include class TCollection_HAsciiString; -class StepGeom_Axis2Placement; -class StepVisual_FontSelect; class StepVisual_TextLiteral; diff --git a/src/StlAPI/StlAPI.hxx b/src/StlAPI/StlAPI.hxx index fa26856703..cdf33f1087 100644 --- a/src/StlAPI/StlAPI.hxx +++ b/src/StlAPI/StlAPI.hxx @@ -24,8 +24,6 @@ #include #include class TopoDS_Shape; -class StlAPI_Writer; -class StlAPI_Reader; //! Offers the API for STL data manipulation. class StlAPI diff --git a/src/Storage/Storage.hxx b/src/Storage/Storage.hxx index ea90aca491..638d1a0964 100644 --- a/src/Storage/Storage.hxx +++ b/src/Storage/Storage.hxx @@ -22,18 +22,6 @@ #include class TCollection_AsciiString; -class Storage_BaseDriver; -class Storage_CallBack; -class Storage_DefaultCallBack; -class Storage_HeaderData; -class Storage_Data; -class Storage_TypeData; -class Storage_RootData; -class Storage_Root; -class Storage_Schema; -class Storage_InternalData; -class Storage_stCONSTclCOM; -class Storage_TypedCallBack; //! Storage package is used to write and read persistent objects. diff --git a/src/Storage/Storage_BaseDriver.hxx b/src/Storage/Storage_BaseDriver.hxx index a955d90082..31206f3d1c 100644 --- a/src/Storage/Storage_BaseDriver.hxx +++ b/src/Storage/Storage_BaseDriver.hxx @@ -27,11 +27,6 @@ #include #include -class Storage_StreamTypeMismatchError; -class Storage_StreamFormatError; -class Storage_StreamWriteError; -class Storage_StreamExtCharParityError; -class TCollection_AsciiString; class TCollection_ExtendedString; DEFINE_STANDARD_HANDLE(Storage_BaseDriver,Standard_Transient) diff --git a/src/Storage/Storage_Data.hxx b/src/Storage/Storage_Data.hxx index 8bec85e82e..f898b680e4 100644 --- a/src/Storage/Storage_Data.hxx +++ b/src/Storage/Storage_Data.hxx @@ -33,8 +33,6 @@ class Storage_HeaderData; class Storage_RootData; class Storage_TypeData; class Storage_InternalData; -class Storage_Schema; -class TCollection_AsciiString; class TCollection_ExtendedString; class Standard_Persistent; class Storage_Root; diff --git a/src/Storage/Storage_HeaderData.hxx b/src/Storage/Storage_HeaderData.hxx index f3e820d45f..ac5a48cef0 100644 --- a/src/Storage/Storage_HeaderData.hxx +++ b/src/Storage/Storage_HeaderData.hxx @@ -27,10 +27,7 @@ #include #include #include -class Storage_Schema; class Storage_BaseDriver; -class TCollection_AsciiString; -class TCollection_ExtendedString; class Storage_HeaderData; diff --git a/src/Storage/Storage_InternalData.hxx b/src/Storage/Storage_InternalData.hxx index 51fb2f6999..81a25d3aa8 100644 --- a/src/Storage/Storage_InternalData.hxx +++ b/src/Storage/Storage_InternalData.hxx @@ -25,7 +25,6 @@ #include #include #include -class Storage_Schema; class Storage_InternalData; diff --git a/src/Storage/Storage_Root.hxx b/src/Storage/Storage_Root.hxx index ccecfd0e3e..26178a24fd 100644 --- a/src/Storage/Storage_Root.hxx +++ b/src/Storage/Storage_Root.hxx @@ -24,8 +24,6 @@ #include #include class Standard_Persistent; -class Storage_Schema; -class TCollection_AsciiString; class Storage_Root; diff --git a/src/Storage/Storage_RootData.hxx b/src/Storage/Storage_RootData.hxx index 55fdf02513..17f8ae1dac 100644 --- a/src/Storage/Storage_RootData.hxx +++ b/src/Storage/Storage_RootData.hxx @@ -27,11 +27,8 @@ #include #include #include -class Standard_NoSuchObject; -class Storage_Schema; class Storage_BaseDriver; class Storage_Root; -class TCollection_AsciiString; class Standard_Persistent; diff --git a/src/Storage/Storage_Schema.hxx b/src/Storage/Storage_Schema.hxx index b564412b74..7e83c38a5d 100644 --- a/src/Storage/Storage_Schema.hxx +++ b/src/Storage/Storage_Schema.hxx @@ -27,14 +27,6 @@ #include class Storage_CallBack; -class Storage_StreamFormatError; -class TCollection_AsciiString; -class Storage_BaseDriver; -class Storage_Data; -class Storage_HeaderData; -class Storage_TypeData; -class Storage_RootData; -class Standard_Persistent; class Storage_Schema; diff --git a/src/Storage/Storage_TypeData.hxx b/src/Storage/Storage_TypeData.hxx index 61b4781143..24e345a141 100644 --- a/src/Storage/Storage_TypeData.hxx +++ b/src/Storage/Storage_TypeData.hxx @@ -27,10 +27,7 @@ #include #include #include -class Standard_NoSuchObject; -class Storage_Schema; class Storage_BaseDriver; -class TCollection_AsciiString; class Storage_TypeData; diff --git a/src/Storage/Storage_TypedCallBack.hxx b/src/Storage/Storage_TypedCallBack.hxx index a2af1d207c..dfee9e4ef9 100644 --- a/src/Storage/Storage_TypedCallBack.hxx +++ b/src/Storage/Storage_TypedCallBack.hxx @@ -24,7 +24,6 @@ #include #include class Storage_CallBack; -class TCollection_AsciiString; class Storage_TypedCallBack; diff --git a/src/Sweep/Sweep_NumShapeIterator.hxx b/src/Sweep/Sweep_NumShapeIterator.hxx index 1e37cd83cb..e97850e63a 100644 --- a/src/Sweep/Sweep_NumShapeIterator.hxx +++ b/src/Sweep/Sweep_NumShapeIterator.hxx @@ -25,9 +25,6 @@ #include #include #include -class Standard_NoMoreObject; -class Standard_NoSuchObject; -class Sweep_NumShape; //! This class provides iteration services required by diff --git a/src/Sweep/Sweep_NumShapeTool.hxx b/src/Sweep/Sweep_NumShapeTool.hxx index 4133dbbe5e..b475eb68a5 100644 --- a/src/Sweep/Sweep_NumShapeTool.hxx +++ b/src/Sweep/Sweep_NumShapeTool.hxx @@ -26,8 +26,6 @@ #include #include #include -class Standard_OutOfRange; -class Sweep_NumShape; //! This class provides the indexation and type analysis diff --git a/src/TCollection/TCollection_AsciiString.hxx b/src/TCollection/TCollection_AsciiString.hxx index cbc0f46e22..e839451ecd 100644 --- a/src/TCollection/TCollection_AsciiString.hxx +++ b/src/TCollection/TCollection_AsciiString.hxx @@ -29,11 +29,6 @@ #include #include #include -class Standard_NullObject; -class Standard_OutOfRange; -class Standard_NumericError; -class Standard_NegativeValue; -class TCollection_HAsciiString; class TCollection_ExtendedString; //! Class defines a variable-length sequence of 8-bit characters. diff --git a/src/TCollection/TCollection_ExtendedString.hxx b/src/TCollection/TCollection_ExtendedString.hxx index 6fc7536acd..0bd0ed4351 100644 --- a/src/TCollection/TCollection_ExtendedString.hxx +++ b/src/TCollection/TCollection_ExtendedString.hxx @@ -31,10 +31,6 @@ #include #include #include -class Standard_NullObject; -class Standard_OutOfRange; -class Standard_NumericError; -class Standard_NegativeValue; class TCollection_AsciiString; diff --git a/src/TCollection/TCollection_HAsciiString.hxx b/src/TCollection/TCollection_HAsciiString.hxx index 58cfc73c2a..466d4b2937 100644 --- a/src/TCollection/TCollection_HAsciiString.hxx +++ b/src/TCollection/TCollection_HAsciiString.hxx @@ -28,11 +28,6 @@ #include #include #include -class Standard_NullObject; -class Standard_OutOfRange; -class Standard_NumericError; -class Standard_NegativeValue; -class TCollection_AsciiString; class TCollection_HExtendedString; diff --git a/src/TCollection/TCollection_HExtendedString.hxx b/src/TCollection/TCollection_HExtendedString.hxx index 80820d32d1..c84196d8bb 100644 --- a/src/TCollection/TCollection_HExtendedString.hxx +++ b/src/TCollection/TCollection_HExtendedString.hxx @@ -28,11 +28,6 @@ #include #include #include -class Standard_NullObject; -class Standard_OutOfRange; -class Standard_NumericError; -class Standard_NegativeValue; -class TCollection_ExtendedString; class TCollection_HAsciiString; diff --git a/src/TDF/TDF.hxx b/src/TDF/TDF.hxx index 45c525502a..c9bc52c274 100644 --- a/src/TDF/TDF.hxx +++ b/src/TDF/TDF.hxx @@ -23,33 +23,6 @@ #include class Standard_GUID; class TCollection_ExtendedString; -class TDF_Data; -class TDF_Label; -class TDF_Attribute; -class TDF_TagSource; -class TDF_Reference; -class TDF_ClosureMode; -class TDF_ClosureTool; -class TDF_CopyTool; -class TDF_CopyLabel; -class TDF_ComparisonTool; -class TDF_Transaction; -class TDF_Delta; -class TDF_AttributeDelta; -class TDF_DeltaOnAddition; -class TDF_DeltaOnForget; -class TDF_DeltaOnResume; -class TDF_DeltaOnRemoval; -class TDF_DeltaOnModification; -class TDF_DefaultDeltaOnRemoval; -class TDF_DefaultDeltaOnModification; -class TDF_ChildIterator; -class TDF_ChildIDIterator; -class TDF_DataSet; -class TDF_RelocationTable; -class TDF_Tool; -class TDF_LabelMapHasher; -class TDF_IDFilter; //! This package provides data framework for binding diff --git a/src/TDF/TDF_Attribute.hxx b/src/TDF/TDF_Attribute.hxx index a6159829a6..6ea9a836b5 100644 --- a/src/TDF/TDF_Attribute.hxx +++ b/src/TDF/TDF_Attribute.hxx @@ -25,11 +25,7 @@ #include #include #include -class Standard_DomainError; -class TDF_Data; class TDF_Label; -class TDF_LabelNode; -class TDF_AttributeIterator; class TDF_DeltaOnForget; class Standard_GUID; class TDF_AttributeDelta; diff --git a/src/TDF/TDF_AttributeDelta.hxx b/src/TDF/TDF_AttributeDelta.hxx index 35460289b4..218dff3080 100644 --- a/src/TDF/TDF_AttributeDelta.hxx +++ b/src/TDF/TDF_AttributeDelta.hxx @@ -23,7 +23,6 @@ #include #include class TDF_Attribute; -class TDF_Label; class Standard_GUID; diff --git a/src/TDF/TDF_ChildIDIterator.hxx b/src/TDF/TDF_ChildIDIterator.hxx index 03dc4753eb..a1ef304caf 100644 --- a/src/TDF/TDF_ChildIDIterator.hxx +++ b/src/TDF/TDF_ChildIDIterator.hxx @@ -25,7 +25,6 @@ #include class TDF_Attribute; class TDF_Label; -class Standard_GUID; //! Iterates on the children of a label, to find diff --git a/src/TDF/TDF_CopyLabel.hxx b/src/TDF/TDF_CopyLabel.hxx index d64a63be03..33bd46ef35 100644 --- a/src/TDF/TDF_CopyLabel.hxx +++ b/src/TDF/TDF_CopyLabel.hxx @@ -26,8 +26,6 @@ #include #include class TDF_RelocationTable; -class TDF_Label; -class TDF_IDFilter; class TDF_DataSet; diff --git a/src/TDF/TDF_Data.hxx b/src/TDF/TDF_Data.hxx index 990deb2e78..f1c8cf1e01 100644 --- a/src/TDF/TDF_Data.hxx +++ b/src/TDF/TDF_Data.hxx @@ -28,9 +28,6 @@ #include #include #include -class Standard_NoMoreObject; -class TDF_Transaction; -class TDF_LabelNode; class TDF_Delta; class TDF_Label; diff --git a/src/TDF/TDF_Delta.hxx b/src/TDF/TDF_Delta.hxx index cea8dee1c8..f65bb86f3d 100644 --- a/src/TDF/TDF_Delta.hxx +++ b/src/TDF/TDF_Delta.hxx @@ -26,10 +26,7 @@ #include #include #include -class Standard_OutOfRange; -class TDF_Data; class TDF_AttributeDelta; -class TCollection_ExtendedString; class TDF_Delta; diff --git a/src/TDF/TDF_Label.hxx b/src/TDF/TDF_Label.hxx index b048e372c5..66517c5be0 100644 --- a/src/TDF/TDF_Label.hxx +++ b/src/TDF/TDF_Label.hxx @@ -26,14 +26,8 @@ #include #include #include -class Standard_DomainError; -class Standard_OutOfRange; -class Standard_NullObject; -class TDF_ChildIterator; class TDF_Attribute; -class TDF_AttributeIterator; class TDF_Data; -class TDF_LabelMapHasher; class Standard_GUID; class TDF_IDFilter; diff --git a/src/TDF/TDF_LabelNode.hxx b/src/TDF/TDF_LabelNode.hxx index 244ff7b937..6f7fabb115 100644 --- a/src/TDF/TDF_LabelNode.hxx +++ b/src/TDF/TDF_LabelNode.hxx @@ -27,10 +27,7 @@ #endif class TDF_Attribute; -class TDF_AttributeIterator; -class TDF_ChildIterator; class TDF_Data; -class TDF_Label; #define KEEP_LOCAL_ROOT diff --git a/src/TDF/TDF_Reference.hxx b/src/TDF/TDF_Reference.hxx index 4cd2b13b88..7a6540b6b3 100644 --- a/src/TDF/TDF_Reference.hxx +++ b/src/TDF/TDF_Reference.hxx @@ -23,8 +23,6 @@ #include #include class Standard_GUID; -class TDF_Label; -class TDF_Attribute; class TDF_RelocationTable; class TDF_DataSet; diff --git a/src/TDF/TDF_RelocationTable.hxx b/src/TDF/TDF_RelocationTable.hxx index bbc112e2a9..b17509e2ed 100644 --- a/src/TDF/TDF_RelocationTable.hxx +++ b/src/TDF/TDF_RelocationTable.hxx @@ -29,7 +29,6 @@ #include class TDF_Label; class TDF_Attribute; -class Standard_Transient; class TDF_RelocationTable; diff --git a/src/TDF/TDF_TagSource.hxx b/src/TDF/TDF_TagSource.hxx index 8959d6df7d..6539c8a031 100644 --- a/src/TDF/TDF_TagSource.hxx +++ b/src/TDF/TDF_TagSource.hxx @@ -24,7 +24,6 @@ #include class Standard_GUID; class TDF_Label; -class TDF_Attribute; class TDF_RelocationTable; diff --git a/src/TDF/TDF_Transaction.hxx b/src/TDF/TDF_Transaction.hxx index 6e01ef8a14..c3fd291ca0 100644 --- a/src/TDF/TDF_Transaction.hxx +++ b/src/TDF/TDF_Transaction.hxx @@ -24,10 +24,7 @@ #include #include class TDF_Data; -class Standard_DomainError; -class Standard_NullObject; class TDF_Delta; -class TCollection_AsciiString; //! This class offers services to open, commit or diff --git a/src/TDataStd/TDataStd.hxx b/src/TDataStd/TDataStd.hxx index e91c6e5605..c501edfb7f 100644 --- a/src/TDataStd/TDataStd.hxx +++ b/src/TDataStd/TDataStd.hxx @@ -24,45 +24,6 @@ #include #include #include -class TDataStd_Current; -class TDataStd_Name; -class TDataStd_Comment; -class TDataStd_Integer; -class TDataStd_IntegerArray; -class TDataStd_Real; -class TDataStd_RealArray; -class TDataStd_ExtStringArray; -class TDataStd_UAttribute; -class TDataStd_TreeNode; -class TDataStd_ChildNodeIterator; -class TDataStd_Directory; -class TDataStd_NoteBook; -class TDataStd_Expression; -class TDataStd_Relation; -class TDataStd_Variable; -class TDataStd_DeltaOnModificationOfIntArray; -class TDataStd_DeltaOnModificationOfRealArray; -class TDataStd_DeltaOnModificationOfExtStringArray; -class TDataStd_DeltaOnModificationOfIntPackedMap; -class TDataStd_DeltaOnModificationOfByteArray; -class TDataStd_Tick; -class TDataStd_AsciiString; -class TDataStd_IntPackedMap; -class TDataStd_IntegerList; -class TDataStd_RealList; -class TDataStd_ExtStringList; -class TDataStd_BooleanList; -class TDataStd_ReferenceList; -class TDataStd_BooleanArray; -class TDataStd_ReferenceArray; -class TDataStd_ByteArray; -class TDataStd_NamedData; -class TDataStd_HDataMapOfStringInteger; -class TDataStd_HDataMapOfStringReal; -class TDataStd_HDataMapOfStringString; -class TDataStd_HDataMapOfStringByte; -class TDataStd_HDataMapOfStringHArray1OfInteger; -class TDataStd_HDataMapOfStringHArray1OfReal; //! This package defines standard attributes for diff --git a/src/TDataStd/TDataStd_AsciiString.hxx b/src/TDataStd/TDataStd_AsciiString.hxx index 4af0f81383..424b810f76 100644 --- a/src/TDataStd/TDataStd_AsciiString.hxx +++ b/src/TDataStd/TDataStd_AsciiString.hxx @@ -26,8 +26,6 @@ #include class TDF_Label; -class TCollection_AsciiString; -class TDF_Attribute; class TDF_RelocationTable; diff --git a/src/TDataStd/TDataStd_BooleanArray.hxx b/src/TDataStd/TDataStd_BooleanArray.hxx index 2bd1eee205..45772f3369 100644 --- a/src/TDataStd/TDataStd_BooleanArray.hxx +++ b/src/TDataStd/TDataStd_BooleanArray.hxx @@ -25,9 +25,7 @@ #include #include #include -class Standard_GUID; class TDF_Label; -class TDF_Attribute; class TDF_RelocationTable; diff --git a/src/TDataStd/TDataStd_BooleanList.hxx b/src/TDataStd/TDataStd_BooleanList.hxx index 4aa9f699bd..b78051c666 100644 --- a/src/TDataStd/TDataStd_BooleanList.hxx +++ b/src/TDataStd/TDataStd_BooleanList.hxx @@ -26,9 +26,7 @@ #include #include -class Standard_GUID; class TDF_Label; -class TDF_Attribute; class TDF_RelocationTable; diff --git a/src/TDataStd/TDataStd_ByteArray.hxx b/src/TDataStd/TDataStd_ByteArray.hxx index ec74d4a419..213c672360 100644 --- a/src/TDataStd/TDataStd_ByteArray.hxx +++ b/src/TDataStd/TDataStd_ByteArray.hxx @@ -27,10 +27,7 @@ #include #include -class TDataStd_DeltaOnModificationOfByteArray; -class Standard_GUID; class TDF_Label; -class TDF_Attribute; class TDF_RelocationTable; class TDF_DeltaOnModification; diff --git a/src/TDataStd/TDataStd_Current.hxx b/src/TDataStd/TDataStd_Current.hxx index ebad9ea0ba..6b63979c3c 100644 --- a/src/TDataStd/TDataStd_Current.hxx +++ b/src/TDataStd/TDataStd_Current.hxx @@ -25,8 +25,6 @@ #include #include class Standard_GUID; -class TDF_Label; -class TDF_Attribute; class TDF_RelocationTable; diff --git a/src/TDataStd/TDataStd_Directory.hxx b/src/TDataStd/TDataStd_Directory.hxx index 82523c301b..56e8c796f2 100644 --- a/src/TDataStd/TDataStd_Directory.hxx +++ b/src/TDataStd/TDataStd_Directory.hxx @@ -25,9 +25,6 @@ #include class TDF_Label; class Standard_GUID; -class TDF_Attribute; -class TDF_RelocationTable; -class TDF_DataSet; class TDataStd_Directory; diff --git a/src/TDataStd/TDataStd_Expression.hxx b/src/TDataStd/TDataStd_Expression.hxx index e84b01204c..71b21e7a7c 100644 --- a/src/TDataStd/TDataStd_Expression.hxx +++ b/src/TDataStd/TDataStd_Expression.hxx @@ -26,8 +26,6 @@ #include class Standard_GUID; class TDF_Label; -class TCollection_ExtendedString; -class TDF_Attribute; class TDF_RelocationTable; diff --git a/src/TDataStd/TDataStd_ExtStringArray.hxx b/src/TDataStd/TDataStd_ExtStringArray.hxx index 0b4e5f9c21..dc46b012ab 100644 --- a/src/TDataStd/TDataStd_ExtStringArray.hxx +++ b/src/TDataStd/TDataStd_ExtStringArray.hxx @@ -26,11 +26,8 @@ #include #include -class TDataStd_DeltaOnModificationOfExtStringArray; -class Standard_GUID; class TDF_Label; class TCollection_ExtendedString; -class TDF_Attribute; class TDF_RelocationTable; class TDF_DeltaOnModification; diff --git a/src/TDataStd/TDataStd_ExtStringList.hxx b/src/TDataStd/TDataStd_ExtStringList.hxx index d5c0c7f49d..6d99cf6120 100644 --- a/src/TDataStd/TDataStd_ExtStringList.hxx +++ b/src/TDataStd/TDataStd_ExtStringList.hxx @@ -26,10 +26,8 @@ #include #include -class Standard_GUID; class TDF_Label; class TCollection_ExtendedString; -class TDF_Attribute; class TDF_RelocationTable; diff --git a/src/TDataStd/TDataStd_GenericEmpty.hxx b/src/TDataStd/TDataStd_GenericEmpty.hxx index 412eed8d57..ecdde4713c 100644 --- a/src/TDataStd/TDataStd_GenericEmpty.hxx +++ b/src/TDataStd/TDataStd_GenericEmpty.hxx @@ -19,9 +19,6 @@ #include -class Standard_GUID; -class TDF_Label; -class TDF_Attribute; class TDF_RelocationTable; class TDataStd_GenericEmpty; diff --git a/src/TDataStd/TDataStd_GenericExtString.hxx b/src/TDataStd/TDataStd_GenericExtString.hxx index ed0eb1c529..8765eef95f 100644 --- a/src/TDataStd/TDataStd_GenericExtString.hxx +++ b/src/TDataStd/TDataStd_GenericExtString.hxx @@ -18,8 +18,6 @@ #include #include -class Standard_GUID; -class TDF_Label; class TDF_RelocationTable; class TDataStd_GenericExtString; diff --git a/src/TDataStd/TDataStd_IntPackedMap.hxx b/src/TDataStd/TDataStd_IntPackedMap.hxx index c6967625ea..2a13cb118f 100644 --- a/src/TDataStd/TDataStd_IntPackedMap.hxx +++ b/src/TDataStd/TDataStd_IntPackedMap.hxx @@ -25,10 +25,8 @@ #include #include -class TDataStd_DeltaOnModificationOfIntPackedMap; class Standard_GUID; class TDF_Label; -class TDF_Attribute; class TDF_RelocationTable; class TDF_DeltaOnModification; diff --git a/src/TDataStd/TDataStd_Integer.hxx b/src/TDataStd/TDataStd_Integer.hxx index 453b701b25..299f2dd88c 100644 --- a/src/TDataStd/TDataStd_Integer.hxx +++ b/src/TDataStd/TDataStd_Integer.hxx @@ -26,9 +26,7 @@ #include #include -class Standard_GUID; class TDF_Label; -class TDF_Attribute; class TDF_RelocationTable; diff --git a/src/TDataStd/TDataStd_IntegerArray.hxx b/src/TDataStd/TDataStd_IntegerArray.hxx index 346d6c1c5f..514587927a 100644 --- a/src/TDataStd/TDataStd_IntegerArray.hxx +++ b/src/TDataStd/TDataStd_IntegerArray.hxx @@ -27,10 +27,7 @@ #include #include -class TDataStd_DeltaOnModificationOfIntArray; -class Standard_GUID; class TDF_Label; -class TDF_Attribute; class TDF_RelocationTable; class TDF_DeltaOnModification; diff --git a/src/TDataStd/TDataStd_IntegerList.hxx b/src/TDataStd/TDataStd_IntegerList.hxx index beb7404302..883cb33a8d 100644 --- a/src/TDataStd/TDataStd_IntegerList.hxx +++ b/src/TDataStd/TDataStd_IntegerList.hxx @@ -26,9 +26,7 @@ #include #include -class Standard_GUID; class TDF_Label; -class TDF_Attribute; class TDF_RelocationTable; diff --git a/src/TDataStd/TDataStd_Name.hxx b/src/TDataStd/TDataStd_Name.hxx index 3513be598a..b7845a3561 100644 --- a/src/TDataStd/TDataStd_Name.hxx +++ b/src/TDataStd/TDataStd_Name.hxx @@ -20,11 +20,8 @@ #include #include -class Standard_DomainError; class TDF_Label; class TCollection_ExtendedString; -class TDF_Attribute; -class TDF_RelocationTable; class TDataStd_Name; diff --git a/src/TDataStd/TDataStd_NoteBook.hxx b/src/TDataStd/TDataStd_NoteBook.hxx index d0ae1cf09d..537572ce72 100644 --- a/src/TDataStd/TDataStd_NoteBook.hxx +++ b/src/TDataStd/TDataStd_NoteBook.hxx @@ -29,8 +29,6 @@ class TDF_Label; class Standard_GUID; class TDataStd_Real; class TDataStd_Integer; -class TDF_Attribute; -class TDF_RelocationTable; class TDataStd_NoteBook; diff --git a/src/TDataStd/TDataStd_Real.hxx b/src/TDataStd/TDataStd_Real.hxx index bb7105efc0..b390b6749d 100644 --- a/src/TDataStd/TDataStd_Real.hxx +++ b/src/TDataStd/TDataStd_Real.hxx @@ -28,7 +28,6 @@ #include class TDF_Label; -class TDF_Attribute; class TDF_RelocationTable; diff --git a/src/TDataStd/TDataStd_RealArray.hxx b/src/TDataStd/TDataStd_RealArray.hxx index 38a7ab7d1f..0fe5f3937e 100644 --- a/src/TDataStd/TDataStd_RealArray.hxx +++ b/src/TDataStd/TDataStd_RealArray.hxx @@ -28,10 +28,7 @@ #include #include -class TDataStd_DeltaOnModificationOfRealArray; -class Standard_GUID; class TDF_Label; -class TDF_Attribute; class TDF_RelocationTable; class TDF_DeltaOnModification; diff --git a/src/TDataStd/TDataStd_RealList.hxx b/src/TDataStd/TDataStd_RealList.hxx index 3da451d089..f78cdd4c23 100644 --- a/src/TDataStd/TDataStd_RealList.hxx +++ b/src/TDataStd/TDataStd_RealList.hxx @@ -27,9 +27,7 @@ #include #include -class Standard_GUID; class TDF_Label; -class TDF_Attribute; class TDF_RelocationTable; diff --git a/src/TDataStd/TDataStd_ReferenceArray.hxx b/src/TDataStd/TDataStd_ReferenceArray.hxx index 36333eb35d..b832db2594 100644 --- a/src/TDataStd/TDataStd_ReferenceArray.hxx +++ b/src/TDataStd/TDataStd_ReferenceArray.hxx @@ -27,9 +27,6 @@ #include #include -class Standard_GUID; -class TDF_Label; -class TDF_Attribute; class TDF_RelocationTable; class TDF_DataSet; diff --git a/src/TDataStd/TDataStd_ReferenceList.hxx b/src/TDataStd/TDataStd_ReferenceList.hxx index 54beb0b335..d2ff32c66c 100644 --- a/src/TDataStd/TDataStd_ReferenceList.hxx +++ b/src/TDataStd/TDataStd_ReferenceList.hxx @@ -26,9 +26,7 @@ #include #include -class Standard_GUID; class TDF_Label; -class TDF_Attribute; class TDF_RelocationTable; class TDF_DataSet; diff --git a/src/TDataStd/TDataStd_Tick.hxx b/src/TDataStd/TDataStd_Tick.hxx index b09047bf64..93e43e87fe 100644 --- a/src/TDataStd/TDataStd_Tick.hxx +++ b/src/TDataStd/TDataStd_Tick.hxx @@ -20,8 +20,6 @@ #include class Standard_GUID; class TDF_Label; -class TDF_Attribute; -class TDF_RelocationTable; class TDataStd_Tick; diff --git a/src/TDataStd/TDataStd_TreeNode.hxx b/src/TDataStd/TDataStd_TreeNode.hxx index 30288e20e9..8fe4d02979 100644 --- a/src/TDataStd/TDataStd_TreeNode.hxx +++ b/src/TDataStd/TDataStd_TreeNode.hxx @@ -26,11 +26,8 @@ #include #include #include -class TDataStd_ChildNodeIterator; class TDF_Label; -class Standard_GUID; class TDF_AttributeDelta; -class TDF_Attribute; class TDF_RelocationTable; class TDF_DataSet; diff --git a/src/TDataStd/TDataStd_UAttribute.hxx b/src/TDataStd/TDataStd_UAttribute.hxx index 17e9891f42..7d9bcccbc7 100644 --- a/src/TDataStd/TDataStd_UAttribute.hxx +++ b/src/TDataStd/TDataStd_UAttribute.hxx @@ -24,8 +24,6 @@ #include #include class TDF_Label; -class Standard_GUID; -class TDF_Attribute; class TDF_RelocationTable; class TDF_DataSet; diff --git a/src/TDataStd/TDataStd_Variable.hxx b/src/TDataStd/TDataStd_Variable.hxx index 4b782a4bb0..ec8022eaa5 100644 --- a/src/TDataStd/TDataStd_Variable.hxx +++ b/src/TDataStd/TDataStd_Variable.hxx @@ -31,8 +31,6 @@ class TDF_Label; class TCollection_ExtendedString; class TDataStd_Real; class TDataStd_Expression; -class TCollection_AsciiString; -class TDF_Attribute; class TDF_RelocationTable; class TDF_DataSet; diff --git a/src/TDataXtd/TDataXtd.hxx b/src/TDataXtd/TDataXtd.hxx index 1be8efb767..1571341ff3 100644 --- a/src/TDataXtd/TDataXtd.hxx +++ b/src/TDataXtd/TDataXtd.hxx @@ -24,17 +24,6 @@ #include #include #include -class TDataXtd_Position; -class TDataXtd_Constraint; -class TDataXtd_Placement; -class TDataXtd_Geometry; -class TDataXtd_Point; -class TDataXtd_Axis; -class TDataXtd_Plane; -class TDataXtd_Pattern; -class TDataXtd_PatternStd; -class TDataXtd_Shape; -class TDataXtd_Triangulation; //! This package defines extension of standard attributes for //! modelling (mainly for work with geometry). diff --git a/src/TDataXtd/TDataXtd_Constraint.hxx b/src/TDataXtd/TDataXtd_Constraint.hxx index 6c3005cdbf..a9a79897f5 100644 --- a/src/TDataXtd/TDataXtd_Constraint.hxx +++ b/src/TDataXtd/TDataXtd_Constraint.hxx @@ -27,7 +27,6 @@ #include class TDataStd_Real; -class TDF_Attribute; class Standard_GUID; class TDF_Label; class TNaming_NamedShape; diff --git a/src/TDataXtd/TDataXtd_Geometry.hxx b/src/TDataXtd/TDataXtd_Geometry.hxx index 29c7bf92d1..836d7533b2 100644 --- a/src/TDataXtd/TDataXtd_Geometry.hxx +++ b/src/TDataXtd/TDataXtd_Geometry.hxx @@ -33,7 +33,6 @@ class gp_Elips; class gp_Pln; class gp_Cylinder; class Standard_GUID; -class TDF_Attribute; class TDF_RelocationTable; diff --git a/src/TDataXtd/TDataXtd_Position.hxx b/src/TDataXtd/TDataXtd_Position.hxx index 405f9cabe7..62097520ec 100644 --- a/src/TDataXtd/TDataXtd_Position.hxx +++ b/src/TDataXtd/TDataXtd_Position.hxx @@ -23,9 +23,7 @@ #include #include class TDF_Label; -class gp_Pnt; class Standard_GUID; -class TDF_Attribute; class TDF_RelocationTable; diff --git a/src/TDataXtd/TDataXtd_Presentation.hxx b/src/TDataXtd/TDataXtd_Presentation.hxx index 1423ce6d43..23f47b3d0c 100644 --- a/src/TDataXtd/TDataXtd_Presentation.hxx +++ b/src/TDataXtd/TDataXtd_Presentation.hxx @@ -26,9 +26,6 @@ #include class TDF_Label; -class gp_Pnt; -class Standard_GUID; -class TDF_Attribute; class TDF_RelocationTable; diff --git a/src/TDataXtd/TDataXtd_Triangulation.hxx b/src/TDataXtd/TDataXtd_Triangulation.hxx index 29df2f4578..11ed2b767c 100644 --- a/src/TDataXtd/TDataXtd_Triangulation.hxx +++ b/src/TDataXtd/TDataXtd_Triangulation.hxx @@ -26,7 +26,6 @@ #include class Standard_GUID; class TDF_Label; -class TDF_Attribute; class TDF_RelocationTable; class TDataXtd_Triangulation; diff --git a/src/TDocStd/TDocStd.hxx b/src/TDocStd/TDocStd.hxx index 5241dfa126..f7c7ac7b27 100644 --- a/src/TDocStd/TDocStd.hxx +++ b/src/TDocStd/TDocStd.hxx @@ -22,19 +22,6 @@ #include #include -class TDocStd_Application; -class TDocStd_Document; -class TDocStd_Context; -class TDocStd_XLink; -class TDocStd_XLinkIterator; -class TDocStd_XLinkTool; -class TDocStd_Owner; -class TDocStd_Modified; -class TDocStd_XLinkRoot; -class TDocStd_PathParser; -class TDocStd_CompoundDelta; -class TDocStd_ApplicationDelta; -class TDocStd_MultiTransactionManager; //! This package define CAF main classes. diff --git a/src/TDocStd/TDocStd_Application.hxx b/src/TDocStd/TDocStd_Application.hxx index 1ab19d634d..80f0c94de3 100644 --- a/src/TDocStd/TDocStd_Application.hxx +++ b/src/TDocStd/TDocStd_Application.hxx @@ -32,7 +32,6 @@ #include class Resource_Manager; -class Standard_NoSuchObject; class CDM_Document; class TCollection_ExtendedString; diff --git a/src/TDocStd/TDocStd_ApplicationDelta.hxx b/src/TDocStd/TDocStd_ApplicationDelta.hxx index e70f1a7168..f95d0281e9 100644 --- a/src/TDocStd/TDocStd_ApplicationDelta.hxx +++ b/src/TDocStd/TDocStd_ApplicationDelta.hxx @@ -23,7 +23,6 @@ #include #include #include -class TCollection_ExtendedString; class TDocStd_ApplicationDelta; diff --git a/src/TDocStd/TDocStd_CompoundDelta.hxx b/src/TDocStd/TDocStd_CompoundDelta.hxx index 6495fb6063..f28731c916 100644 --- a/src/TDocStd/TDocStd_CompoundDelta.hxx +++ b/src/TDocStd/TDocStd_CompoundDelta.hxx @@ -19,7 +19,6 @@ #include #include -class TDocStd_Document; class TDocStd_CompoundDelta; diff --git a/src/TDocStd/TDocStd_Document.hxx b/src/TDocStd/TDocStd_Document.hxx index 7737e0ec84..2980a7e10c 100644 --- a/src/TDocStd/TDocStd_Document.hxx +++ b/src/TDocStd/TDocStd_Document.hxx @@ -32,9 +32,7 @@ class TDF_Data; class TDF_Delta; class TDF_Label; -class TCollection_ExtendedString; class TCollection_AsciiString; -class CDM_Document; class TDocStd_CompoundDelta; diff --git a/src/TDocStd/TDocStd_Modified.hxx b/src/TDocStd/TDocStd_Modified.hxx index 25b05c6e9a..e3d7697ef9 100644 --- a/src/TDocStd/TDocStd_Modified.hxx +++ b/src/TDocStd/TDocStd_Modified.hxx @@ -26,7 +26,6 @@ #include class TDF_Label; class Standard_GUID; -class TDF_Attribute; class TDF_RelocationTable; diff --git a/src/TDocStd/TDocStd_Owner.hxx b/src/TDocStd/TDocStd_Owner.hxx index 8b23fc32d3..5e3b62346e 100644 --- a/src/TDocStd/TDocStd_Owner.hxx +++ b/src/TDocStd/TDocStd_Owner.hxx @@ -25,7 +25,6 @@ class TDocStd_Document; class Standard_GUID; class TDF_Data; -class TDF_Attribute; class TDF_RelocationTable; diff --git a/src/TDocStd/TDocStd_PathParser.hxx b/src/TDocStd/TDocStd_PathParser.hxx index de2743291f..d39d21e42c 100644 --- a/src/TDocStd/TDocStd_PathParser.hxx +++ b/src/TDocStd/TDocStd_PathParser.hxx @@ -23,7 +23,6 @@ #include #include -class TCollection_ExtendedString; //! parse an OS path diff --git a/src/TDocStd/TDocStd_XLink.hxx b/src/TDocStd/TDocStd_XLink.hxx index a455218f10..fb70716913 100644 --- a/src/TDocStd/TDocStd_XLink.hxx +++ b/src/TDocStd/TDocStd_XLink.hxx @@ -24,14 +24,10 @@ #include #include #include -class TDocStd_XLinkRoot; -class TDocStd_XLinkIterator; class TDF_Label; class TDF_Reference; class Standard_GUID; -class TCollection_AsciiString; class TDF_AttributeDelta; -class TDF_Attribute; class TDF_RelocationTable; diff --git a/src/TDocStd/TDocStd_XLinkIterator.hxx b/src/TDocStd/TDocStd_XLinkIterator.hxx index 01b721402d..f7064b2e5d 100644 --- a/src/TDocStd/TDocStd_XLinkIterator.hxx +++ b/src/TDocStd/TDocStd_XLinkIterator.hxx @@ -22,7 +22,6 @@ #include #include -class Standard_NoMoreObject; class TDocStd_Document; diff --git a/src/TDocStd/TDocStd_XLinkRoot.hxx b/src/TDocStd/TDocStd_XLinkRoot.hxx index de6778e1fb..5a7674af04 100644 --- a/src/TDocStd/TDocStd_XLinkRoot.hxx +++ b/src/TDocStd/TDocStd_XLinkRoot.hxx @@ -22,10 +22,8 @@ #include #include #include -class TDocStd_XLinkIterator; class Standard_GUID; class TDF_Data; -class TDF_Attribute; class TDF_RelocationTable; diff --git a/src/TFunction/TFunction_Driver.hxx b/src/TFunction/TFunction_Driver.hxx index 3bdc4fcfd4..c82dc7baf4 100644 --- a/src/TFunction/TFunction_Driver.hxx +++ b/src/TFunction/TFunction_Driver.hxx @@ -25,7 +25,6 @@ #include #include #include -class TDF_Label; class TFunction_Logbook; diff --git a/src/TFunction/TFunction_Function.hxx b/src/TFunction/TFunction_Function.hxx index f2a27a944b..d191a56931 100644 --- a/src/TFunction/TFunction_Function.hxx +++ b/src/TFunction/TFunction_Function.hxx @@ -26,8 +26,6 @@ #include #include class TDF_Label; -class Standard_GUID; -class TDF_Attribute; class TDF_RelocationTable; class TDF_DataSet; diff --git a/src/TFunction/TFunction_GraphNode.hxx b/src/TFunction/TFunction_GraphNode.hxx index ba925cba41..7d00f1ed7b 100644 --- a/src/TFunction/TFunction_GraphNode.hxx +++ b/src/TFunction/TFunction_GraphNode.hxx @@ -27,7 +27,6 @@ #include class TDF_Label; class Standard_GUID; -class TDF_Attribute; class TDF_RelocationTable; class TDF_DataSet; diff --git a/src/TFunction/TFunction_IFunction.hxx b/src/TFunction/TFunction_IFunction.hxx index b469a68d20..b8c8f51426 100644 --- a/src/TFunction/TFunction_IFunction.hxx +++ b/src/TFunction/TFunction_IFunction.hxx @@ -26,7 +26,6 @@ #include #include #include -class TDF_Label; class Standard_GUID; class TFunction_Logbook; class TFunction_Driver; diff --git a/src/TFunction/TFunction_Logbook.hxx b/src/TFunction/TFunction_Logbook.hxx index 3900f9975a..76fa46dca4 100644 --- a/src/TFunction/TFunction_Logbook.hxx +++ b/src/TFunction/TFunction_Logbook.hxx @@ -28,10 +28,8 @@ class TDF_Label; class Standard_GUID; class TFunction_Logbook; -class TDF_Attribute; class TDF_RelocationTable; -class TFunction_Logbook; DEFINE_STANDARD_HANDLE(TFunction_Logbook, TDF_Attribute) //! This class contains information which is written and diff --git a/src/TFunction/TFunction_Scope.hxx b/src/TFunction/TFunction_Scope.hxx index a47175359e..68e470d429 100644 --- a/src/TFunction/TFunction_Scope.hxx +++ b/src/TFunction/TFunction_Scope.hxx @@ -28,7 +28,6 @@ class TDF_Label; class Standard_GUID; class TFunction_Logbook; -class TDF_Attribute; class TDF_RelocationTable; diff --git a/src/TNaming/TNaming.hxx b/src/TNaming/TNaming.hxx index 47de03ebf2..91f709a26b 100644 --- a/src/TNaming/TNaming.hxx +++ b/src/TNaming/TNaming.hxx @@ -38,29 +38,6 @@ class TopoDS_Face; class TopoDS_Wire; class TopoDS_Solid; class TopoDS_Shell; -class TNaming_CopyShape; -class TNaming_TranslateTool; -class TNaming_Translator; -class TNaming_NamedShape; -class TNaming_UsedShapes; -class TNaming_Builder; -class TNaming_Tool; -class TNaming_Iterator; -class TNaming_NewShapeIterator; -class TNaming_OldShapeIterator; -class TNaming_SameShapeIterator; -class TNaming_Name; -class TNaming_Naming; -class TNaming_Selector; -class TNaming_DeltaOnRemoval; -class TNaming_DeltaOnModification; -class TNaming_RefShape; -class TNaming_Scope; -class TNaming_Identifier; -class TNaming_Localizer; -class TNaming_ShapesSet; -class TNaming_IteratorOnShapesSet; -class TNaming_NamingTool; //! A topological attribute can be seen as a hook diff --git a/src/TNaming/TNaming_Identifier.hxx b/src/TNaming/TNaming_Identifier.hxx index f2536d3b44..9c65f60027 100644 --- a/src/TNaming/TNaming_Identifier.hxx +++ b/src/TNaming/TNaming_Identifier.hxx @@ -28,8 +28,6 @@ #include #include class TNaming_NamedShape; -class TDF_Label; -class TopoDS_Shape; class TNaming_Localizer; diff --git a/src/TNaming/TNaming_Name.hxx b/src/TNaming/TNaming_Name.hxx index 6b8fe206ae..873a4050ba 100644 --- a/src/TNaming/TNaming_Name.hxx +++ b/src/TNaming/TNaming_Name.hxx @@ -31,8 +31,6 @@ #include #include class TNaming_NamedShape; -class TopoDS_Shape; -class TDF_Label; class TDF_RelocationTable; diff --git a/src/TNaming/TNaming_NamedShape.hxx b/src/TNaming/TNaming_NamedShape.hxx index 1533423443..b3189c0d65 100644 --- a/src/TNaming/TNaming_NamedShape.hxx +++ b/src/TNaming/TNaming_NamedShape.hxx @@ -26,13 +26,8 @@ #include #include #include -class TNaming_Builder; -class TNaming_Iterator; -class TNaming_NewShapeIterator; -class TNaming_OldShapeIterator; class Standard_GUID; class TopoDS_Shape; -class TDF_Attribute; class TDF_DeltaOnModification; class TDF_DeltaOnRemoval; class TDF_RelocationTable; diff --git a/src/TNaming/TNaming_Naming.hxx b/src/TNaming/TNaming_Naming.hxx index d853734869..6951044fa2 100644 --- a/src/TNaming/TNaming_Naming.hxx +++ b/src/TNaming/TNaming_Naming.hxx @@ -30,8 +30,6 @@ class Standard_GUID; class TDF_Label; class TNaming_NamedShape; class TopoDS_Shape; -class TNaming_Name; -class TDF_Attribute; class TDF_RelocationTable; class TDF_DataSet; class TDF_IDFilter; diff --git a/src/TNaming/TNaming_Selector.hxx b/src/TNaming/TNaming_Selector.hxx index 6f0b73b1cf..fe8f3fd205 100644 --- a/src/TNaming/TNaming_Selector.hxx +++ b/src/TNaming/TNaming_Selector.hxx @@ -25,7 +25,6 @@ #include #include #include -class TDF_Label; class TopoDS_Shape; class TNaming_NamedShape; diff --git a/src/TNaming/TNaming_Tool.hxx b/src/TNaming/TNaming_Tool.hxx index 2e2eeb20ce..25d587fde7 100644 --- a/src/TNaming/TNaming_Tool.hxx +++ b/src/TNaming/TNaming_Tool.hxx @@ -27,7 +27,6 @@ #include #include #include -class TNaming_Localizer; class TNaming_NamedShape; class TNaming_OldShapeIterator; class TopoDS_Shape; diff --git a/src/TNaming/TNaming_TranslateTool.hxx b/src/TNaming/TNaming_TranslateTool.hxx index 05a5411b88..c31305102a 100644 --- a/src/TNaming/TNaming_TranslateTool.hxx +++ b/src/TNaming/TNaming_TranslateTool.hxx @@ -22,7 +22,6 @@ #include #include -class Standard_TypeMismatch; class TopoDS_Shape; diff --git a/src/TNaming/TNaming_UsedShapes.hxx b/src/TNaming/TNaming_UsedShapes.hxx index 935828874e..ac349cafba 100644 --- a/src/TNaming/TNaming_UsedShapes.hxx +++ b/src/TNaming/TNaming_UsedShapes.hxx @@ -24,9 +24,7 @@ #include #include #include -class TNaming_Builder; class Standard_GUID; -class TDF_Attribute; class TDF_AttributeDelta; class TDF_DeltaOnAddition; class TDF_DeltaOnRemoval; diff --git a/src/TObj/TObj_Model.hxx b/src/TObj/TObj_Model.hxx index ebcc13f8a9..6f4b6b0ba5 100644 --- a/src/TObj/TObj_Model.hxx +++ b/src/TObj/TObj_Model.hxx @@ -24,7 +24,6 @@ #include class TObj_TNameContainer; -class TObj_Partition; class TCollection_HExtendedString; class TDocStd_Document; class TObj_CheckModel; diff --git a/src/TObj/TObj_TModel.hxx b/src/TObj/TObj_TModel.hxx index 8257ce5b08..d052c6f69e 100644 --- a/src/TObj/TObj_TModel.hxx +++ b/src/TObj/TObj_TModel.hxx @@ -21,7 +21,6 @@ #include class TObj_Model; -class TObj_TModel; /** * Attribute to store OCAF-based models in OCAF tree diff --git a/src/TObj/TObj_TNameContainer.hxx b/src/TObj/TObj_TNameContainer.hxx index 9726e6dac9..5a83017d2a 100644 --- a/src/TObj/TObj_TNameContainer.hxx +++ b/src/TObj/TObj_TNameContainer.hxx @@ -22,7 +22,6 @@ #include #include -class TObj_TNameContainer; /** * This class provides OCAF Attribute to storing the unique names of object in diff --git a/src/TPrsStd/TPrsStd_AISPresentation.hxx b/src/TPrsStd/TPrsStd_AISPresentation.hxx index ba5527323f..ff1d046e95 100644 --- a/src/TPrsStd/TPrsStd_AISPresentation.hxx +++ b/src/TPrsStd/TPrsStd_AISPresentation.hxx @@ -33,7 +33,6 @@ class AIS_InteractiveObject; class Standard_GUID; class TDF_Label; -class TDF_Attribute; class TDF_RelocationTable; class TDF_AttributeDelta; diff --git a/src/TPrsStd/TPrsStd_AISViewer.hxx b/src/TPrsStd/TPrsStd_AISViewer.hxx index 0140c05e30..b7e56dcada 100644 --- a/src/TPrsStd/TPrsStd_AISViewer.hxx +++ b/src/TPrsStd/TPrsStd_AISViewer.hxx @@ -26,7 +26,6 @@ class AIS_InteractiveContext; class Standard_GUID; class TDF_Label; class V3d_Viewer; -class TDF_Attribute; class TDF_RelocationTable; diff --git a/src/TopExp/TopExp.hxx b/src/TopExp/TopExp.hxx index c2961ed738..b33b8b2d8b 100644 --- a/src/TopExp/TopExp.hxx +++ b/src/TopExp/TopExp.hxx @@ -30,7 +30,6 @@ class TopoDS_Shape; class TopoDS_Vertex; class TopoDS_Edge; class TopoDS_Wire; -class TopExp_Explorer; //! This package provides basic tools to explore the diff --git a/src/TopLoc/TopLoc_ItemLocation.hxx b/src/TopLoc/TopLoc_ItemLocation.hxx index c70f34319e..96841f4a47 100644 --- a/src/TopLoc/TopLoc_ItemLocation.hxx +++ b/src/TopLoc/TopLoc_ItemLocation.hxx @@ -25,8 +25,6 @@ #include #include class TopLoc_Datum3D; -class TopLoc_Location; -class TopLoc_SListOfItemLocation; //! An ItemLocation is an elementary coordinate system diff --git a/src/TopLoc/TopLoc_Location.hxx b/src/TopLoc/TopLoc_Location.hxx index cc953d7f46..c5361d1cc8 100644 --- a/src/TopLoc/TopLoc_Location.hxx +++ b/src/TopLoc/TopLoc_Location.hxx @@ -26,8 +26,6 @@ #include #include -class Standard_NoSuchObject; -class Standard_ConstructionError; class gp_Trsf; class TopLoc_Datum3D; diff --git a/src/TopLoc/TopLoc_SListNodeOfItemLocation.hxx b/src/TopLoc/TopLoc_SListNodeOfItemLocation.hxx index 73f2e03f43..cf6aff6dd0 100644 --- a/src/TopLoc/TopLoc_SListNodeOfItemLocation.hxx +++ b/src/TopLoc/TopLoc_SListNodeOfItemLocation.hxx @@ -23,8 +23,6 @@ #include #include #include -class TopLoc_ItemLocation; -class TopLoc_SListOfItemLocation; class TopLoc_SListNodeOfItemLocation; diff --git a/src/TopLoc/TopLoc_SListOfItemLocation.hxx b/src/TopLoc/TopLoc_SListOfItemLocation.hxx index dcec2b7a1b..a8c136c774 100644 --- a/src/TopLoc/TopLoc_SListOfItemLocation.hxx +++ b/src/TopLoc/TopLoc_SListOfItemLocation.hxx @@ -23,7 +23,6 @@ #include class TopLoc_SListNodeOfItemLocation; -class Standard_NoSuchObject; class TopLoc_ItemLocation; diff --git a/src/TopOpeBRep/TopOpeBRep.hxx b/src/TopOpeBRep/TopOpeBRep.hxx index e8aa966b5f..4a64bf6f7b 100644 --- a/src/TopOpeBRep/TopOpeBRep.hxx +++ b/src/TopOpeBRep/TopOpeBRep.hxx @@ -23,31 +23,6 @@ #include #include -class TopOpeBRep_VPointInter; -class TopOpeBRep_VPointInterIterator; -class TopOpeBRep_WPointInter; -class TopOpeBRep_WPointInterIterator; -class TopOpeBRep_LineInter; -class TopOpeBRep_Hctxff2d; -class TopOpeBRep_Hctxee2d; -class TopOpeBRep_Point2d; -class TopOpeBRep_PointClassifier; -class TopOpeBRep_VPointInterClassifier; -class TopOpeBRep_GeomTool; -class TopOpeBRep_FacesIntersector; -class TopOpeBRep_EdgesIntersector; -class TopOpeBRep_FaceEdgeIntersector; -class TopOpeBRep_ShapeScanner; -class TopOpeBRep_ShapeIntersector; -class TopOpeBRep_ShapeIntersector2d; -class TopOpeBRep_PointGeomTool; -class TopOpeBRep_FFTransitionTool; -class TopOpeBRep_Bipoint; -class TopOpeBRep_FacesFiller; -class TopOpeBRep_FFDumper; -class TopOpeBRep_EdgesFiller; -class TopOpeBRep_FaceEdgeFiller; -class TopOpeBRep_DSFiller; //! This package provides the topological operations diff --git a/src/TopOpeBRep/TopOpeBRep_DSFiller.hxx b/src/TopOpeBRep/TopOpeBRep_DSFiller.hxx index f91759857e..2579c3882a 100644 --- a/src/TopOpeBRep/TopOpeBRep_DSFiller.hxx +++ b/src/TopOpeBRep/TopOpeBRep_DSFiller.hxx @@ -31,11 +31,6 @@ class TopoDS_Shape; class TopOpeBRepDS_HDataStructure; class TopoDS_Face; -class TopOpeBRep_ShapeIntersector; -class TopOpeBRep_ShapeIntersector2d; -class TopOpeBRep_FacesFiller; -class TopOpeBRep_EdgesFiller; -class TopOpeBRep_FaceEdgeFiller; //! Provides class methods to fill a datastructure diff --git a/src/TopOpeBRep/TopOpeBRep_EdgesFiller.hxx b/src/TopOpeBRep/TopOpeBRep_EdgesFiller.hxx index 50881c263b..68a64ff4eb 100644 --- a/src/TopOpeBRep/TopOpeBRep_EdgesFiller.hxx +++ b/src/TopOpeBRep/TopOpeBRep_EdgesFiller.hxx @@ -34,11 +34,9 @@ #include class TopOpeBRepDS_HDataStructure; class TopoDS_Shape; -class TopOpeBRep_EdgesIntersector; class TopOpeBRep_Point2d; class TopOpeBRepDS_Transition; class TopOpeBRepDS_Interference; -class TopoDS_Edge; //! Fills a TopOpeBRepDS_DataStructure with Edge/Edge diff --git a/src/TopOpeBRep/TopOpeBRep_EdgesIntersector.hxx b/src/TopOpeBRep/TopOpeBRep_EdgesIntersector.hxx index 053c4aa548..9fa0d458ee 100644 --- a/src/TopOpeBRep/TopOpeBRep_EdgesIntersector.hxx +++ b/src/TopOpeBRep/TopOpeBRep_EdgesIntersector.hxx @@ -33,7 +33,6 @@ #include class Bnd_Box; -class Geom2dAdaptor_Curve; class BRepAdaptor_Surface; class TCollection_AsciiString; class TopOpeBRep_Point2d; diff --git a/src/TopOpeBRep/TopOpeBRep_FaceEdgeIntersector.hxx b/src/TopOpeBRep/TopOpeBRep_FaceEdgeIntersector.hxx index 9f54a11dae..014b122ee2 100644 --- a/src/TopOpeBRep/TopOpeBRep_FaceEdgeIntersector.hxx +++ b/src/TopOpeBRep/TopOpeBRep_FaceEdgeIntersector.hxx @@ -35,11 +35,9 @@ #include #include #include -class TopoDS_Shape; class gp_Pnt; class gp_Pnt2d; class TopOpeBRepDS_Transition; -class TopoDS_Vertex; //! Describes the intersection of a face and an edge. diff --git a/src/TopOpeBRep/TopOpeBRep_FacesFiller.hxx b/src/TopOpeBRep/TopOpeBRep_FacesFiller.hxx index acd3f3e34e..7d2b03a0f5 100644 --- a/src/TopOpeBRep/TopOpeBRep_FacesFiller.hxx +++ b/src/TopOpeBRep/TopOpeBRep_FacesFiller.hxx @@ -41,18 +41,12 @@ class TopOpeBRepDS_HDataStructure; class TopOpeBRep_FFDumper; class TopoDS_Shape; -class TopOpeBRep_FacesIntersector; -class TopOpeBRep_PointClassifier; -class TopOpeBRep_LineInter; class TopOpeBRep_VPointInter; class TopOpeBRep_VPointInterClassifier; class TopOpeBRep_VPointInterIterator; -class TopOpeBRepDS_Transition; class TopOpeBRepDS_Interference; class TopOpeBRepDS_Point; -class TopoDS_Face; class gp_Pnt; -class TopOpeBRepDS_DataStructure; //! Fills a DataStructure from TopOpeBRepDS with the result diff --git a/src/TopOpeBRep/TopOpeBRep_Hctxee2d.hxx b/src/TopOpeBRep/TopOpeBRep_Hctxee2d.hxx index 66472f3c7b..5cb663fa04 100644 --- a/src/TopOpeBRep/TopOpeBRep_Hctxee2d.hxx +++ b/src/TopOpeBRep/TopOpeBRep_Hctxee2d.hxx @@ -25,11 +25,8 @@ #include #include #include -class TopoDS_Edge; class BRepAdaptor_Surface; class TopoDS_Shape; -class Geom2dAdaptor_Curve; -class IntRes2d_Domain; class TopOpeBRep_Hctxee2d; diff --git a/src/TopOpeBRep/TopOpeBRep_LineInter.hxx b/src/TopOpeBRep/TopOpeBRep_LineInter.hxx index f48d7caa73..701105af7f 100644 --- a/src/TopOpeBRep/TopOpeBRep_LineInter.hxx +++ b/src/TopOpeBRep/TopOpeBRep_LineInter.hxx @@ -39,12 +39,8 @@ class IntPatch_RLine; class IntPatch_WLine; class IntPatch_GLine; class BRepAdaptor_Surface; -class TopoDS_Face; class TopOpeBRep_VPointInter; -class TopOpeBRep_WPointInter; class Geom_Curve; -class TopoDS_Shape; -class TopOpeBRepDS_Transition; class TCollection_AsciiString; class TopOpeBRep_Bipoint; diff --git a/src/TopOpeBRep/TopOpeBRep_Point2d.hxx b/src/TopOpeBRep/TopOpeBRep_Point2d.hxx index 2866f153f4..ba7dec3705 100644 --- a/src/TopOpeBRep/TopOpeBRep_Point2d.hxx +++ b/src/TopOpeBRep/TopOpeBRep_Point2d.hxx @@ -33,7 +33,6 @@ #include class TopOpeBRep_Hctxff2d; class TopOpeBRep_Hctxee2d; -class TopOpeBRep_EdgesIntersector; // resolve name collisions with X11 headers #ifdef Status diff --git a/src/TopOpeBRep/TopOpeBRep_ShapeIntersector.hxx b/src/TopOpeBRep/TopOpeBRep_ShapeIntersector.hxx index d0a3e94eb2..51c90beabc 100644 --- a/src/TopOpeBRep/TopOpeBRep_ShapeIntersector.hxx +++ b/src/TopOpeBRep/TopOpeBRep_ShapeIntersector.hxx @@ -33,11 +33,6 @@ #include #include class TopOpeBRepTool_HBoxTool; -class TopoDS_Shape; -class TopoDS_Face; -class TopOpeBRep_FacesIntersector; -class TopOpeBRep_EdgesIntersector; -class TopOpeBRep_FaceEdgeIntersector; //! Intersect two shapes. diff --git a/src/TopOpeBRep/TopOpeBRep_ShapeIntersector2d.hxx b/src/TopOpeBRep/TopOpeBRep_ShapeIntersector2d.hxx index c3347e4c58..2b0ec13150 100644 --- a/src/TopOpeBRep/TopOpeBRep_ShapeIntersector2d.hxx +++ b/src/TopOpeBRep/TopOpeBRep_ShapeIntersector2d.hxx @@ -28,8 +28,6 @@ #include #include class TopOpeBRepTool_HBoxTool; -class TopoDS_Shape; -class TopOpeBRep_EdgesIntersector; //! Intersect two shapes. diff --git a/src/TopOpeBRep/TopOpeBRep_ShapeScanner.hxx b/src/TopOpeBRep/TopOpeBRep_ShapeScanner.hxx index 2451ed12be..6ebfb8c30f 100644 --- a/src/TopOpeBRep/TopOpeBRep_ShapeScanner.hxx +++ b/src/TopOpeBRep/TopOpeBRep_ShapeScanner.hxx @@ -29,7 +29,6 @@ #include class TopoDS_Shape; class TopOpeBRepTool_ShapeExplorer; -class TopOpeBRepTool_BoxSort; //! Find, among the subshapes SS of a reference shape diff --git a/src/TopOpeBRep/TopOpeBRep_VPointInter.hxx b/src/TopOpeBRep/TopOpeBRep_VPointInter.hxx index b819fa2134..c4a01095f4 100644 --- a/src/TopOpeBRep/TopOpeBRep_VPointInter.hxx +++ b/src/TopOpeBRep/TopOpeBRep_VPointInter.hxx @@ -29,10 +29,7 @@ #include #include #include -class Standard_DomainError; -class IntPatch_Point; class gp_Pnt; -class TopoDS_Shape; class gp_Pnt2d; class TopoDS_Edge; class TopoDS_Face; diff --git a/src/TopOpeBRep/TopOpeBRep_VPointInterClassifier.hxx b/src/TopOpeBRep/TopOpeBRep_VPointInterClassifier.hxx index 9b1046a566..6cbcebde1b 100644 --- a/src/TopOpeBRep/TopOpeBRep_VPointInterClassifier.hxx +++ b/src/TopOpeBRep/TopOpeBRep_VPointInterClassifier.hxx @@ -27,7 +27,6 @@ #include #include #include -class TopoDS_Shape; class TopOpeBRep_VPointInter; class TopOpeBRep_PointClassifier; diff --git a/src/TopOpeBRep/TopOpeBRep_VPointInterIterator.hxx b/src/TopOpeBRep/TopOpeBRep_VPointInterIterator.hxx index ac74b6b5f4..229f6f297c 100644 --- a/src/TopOpeBRep/TopOpeBRep_VPointInterIterator.hxx +++ b/src/TopOpeBRep/TopOpeBRep_VPointInterIterator.hxx @@ -24,7 +24,6 @@ #include #include #include -class TopOpeBRep_LineInter; class TopOpeBRep_VPointInter; diff --git a/src/TopOpeBRep/TopOpeBRep_WPointInter.hxx b/src/TopOpeBRep/TopOpeBRep_WPointInter.hxx index 18e2ba5b4b..e6ab6f40e1 100644 --- a/src/TopOpeBRep/TopOpeBRep_WPointInter.hxx +++ b/src/TopOpeBRep/TopOpeBRep_WPointInter.hxx @@ -23,7 +23,6 @@ #include #include -class IntSurf_PntOn2S; class gp_Pnt2d; class gp_Pnt; diff --git a/src/TopOpeBRep/TopOpeBRep_WPointInterIterator.hxx b/src/TopOpeBRep/TopOpeBRep_WPointInterIterator.hxx index ca446dcddc..c3073d88c7 100644 --- a/src/TopOpeBRep/TopOpeBRep_WPointInterIterator.hxx +++ b/src/TopOpeBRep/TopOpeBRep_WPointInterIterator.hxx @@ -24,7 +24,6 @@ #include #include #include -class TopOpeBRep_LineInter; class TopOpeBRep_WPointInter; diff --git a/src/TopOpeBRepBuild/TopOpeBRepBuild_BlockIterator.hxx b/src/TopOpeBRepBuild/TopOpeBRepBuild_BlockIterator.hxx index f315284b44..cc4300b624 100644 --- a/src/TopOpeBRepBuild/TopOpeBRepBuild_BlockIterator.hxx +++ b/src/TopOpeBRepBuild/TopOpeBRepBuild_BlockIterator.hxx @@ -23,7 +23,6 @@ #include #include -class Standard_NoMoreObject; //! Iterator on the elements of a block. diff --git a/src/TopOpeBRepBuild/TopOpeBRepBuild_Builder.hxx b/src/TopOpeBRepBuild/TopOpeBRepBuild_Builder.hxx index c9807ee38e..c64f2111ae 100644 --- a/src/TopOpeBRepBuild/TopOpeBRepBuild_Builder.hxx +++ b/src/TopOpeBRepBuild/TopOpeBRepBuild_Builder.hxx @@ -50,8 +50,6 @@ #include #include class TopOpeBRepDS_HDataStructure; -class Standard_NoSuchObject; -class TopOpeBRepBuild_HBuilder; class TopOpeBRepTool_ShapeExplorer; class TopOpeBRepBuild_ShapeSet; class TopOpeBRepBuild_EdgeBuilder; diff --git a/src/TopOpeBRepBuild/TopOpeBRepBuild_Builder1.hxx b/src/TopOpeBRepBuild/TopOpeBRepBuild_Builder1.hxx index 1f9e1f7afc..bfa0246b1c 100644 --- a/src/TopOpeBRepBuild/TopOpeBRepBuild_Builder1.hxx +++ b/src/TopOpeBRepBuild/TopOpeBRepBuild_Builder1.hxx @@ -35,10 +35,8 @@ #include #include #include -class TopOpeBRepBuild_HBuilder; class TopOpeBRepDS_BuildTool; class TopOpeBRepDS_HDataStructure; -class TopoDS_Shape; class TopOpeBRepBuild_GTopo; class TopOpeBRepBuild_ShellFaceSet; class TopOpeBRepBuild_WireEdgeSet; diff --git a/src/TopOpeBRepBuild/TopOpeBRepBuild_BuilderON.hxx b/src/TopOpeBRepBuild/TopOpeBRepBuild_BuilderON.hxx index 8260638730..99b4edfe32 100644 --- a/src/TopOpeBRepBuild/TopOpeBRepBuild_BuilderON.hxx +++ b/src/TopOpeBRepBuild/TopOpeBRepBuild_BuilderON.hxx @@ -28,7 +28,6 @@ #include #include #include -class TopoDS_Shape; class TopOpeBRepDS_Interference; diff --git a/src/TopOpeBRepBuild/TopOpeBRepBuild_CorrectFace2d.hxx b/src/TopOpeBRepBuild/TopOpeBRepBuild_CorrectFace2d.hxx index 96bf451bfa..5127dd865b 100644 --- a/src/TopOpeBRepBuild/TopOpeBRepBuild_CorrectFace2d.hxx +++ b/src/TopOpeBRepBuild/TopOpeBRepBuild_CorrectFace2d.hxx @@ -29,13 +29,11 @@ #include #include #include -class TopoDS_Face; class TopoDS_Edge; class gp_Pnt2d; class TopoDS_Shape; class gp_Vec2d; class Geom2d_Curve; -class TopoDS_Wire; class Bnd_Box2d; diff --git a/src/TopOpeBRepBuild/TopOpeBRepBuild_HBuilder.hxx b/src/TopOpeBRepBuild/TopOpeBRepBuild_HBuilder.hxx index 3119631181..14b04058e2 100644 --- a/src/TopOpeBRepBuild/TopOpeBRepBuild_HBuilder.hxx +++ b/src/TopOpeBRepBuild/TopOpeBRepBuild_HBuilder.hxx @@ -30,10 +30,8 @@ #include #include #include -class Standard_NoSuchObject; class TopOpeBRepDS_BuildTool; class TopOpeBRepDS_HDataStructure; -class TopoDS_Shape; class TopOpeBRepBuild_Builder; diff --git a/src/TopOpeBRepBuild/TopOpeBRepBuild_Loop.hxx b/src/TopOpeBRepBuild/TopOpeBRepBuild_Loop.hxx index d076faf2a5..bc166c52e7 100644 --- a/src/TopOpeBRepBuild/TopOpeBRepBuild_Loop.hxx +++ b/src/TopOpeBRepBuild/TopOpeBRepBuild_Loop.hxx @@ -24,8 +24,6 @@ #include #include #include -class TopoDS_Shape; -class TopOpeBRepBuild_BlockIterator; class TopOpeBRepBuild_Loop; diff --git a/src/TopOpeBRepBuild/TopOpeBRepBuild_Pave.hxx b/src/TopOpeBRepBuild/TopOpeBRepBuild_Pave.hxx index 1eef485802..117b0912e2 100644 --- a/src/TopOpeBRepBuild/TopOpeBRepBuild_Pave.hxx +++ b/src/TopOpeBRepBuild/TopOpeBRepBuild_Pave.hxx @@ -25,7 +25,6 @@ #include #include #include -class TopoDS_Shape; class TopOpeBRepBuild_Pave; diff --git a/src/TopOpeBRepBuild/TopOpeBRepBuild_PaveSet.hxx b/src/TopOpeBRepBuild/TopOpeBRepBuild_PaveSet.hxx index 8915cd1df7..3c8b4cf259 100644 --- a/src/TopOpeBRepBuild/TopOpeBRepBuild_PaveSet.hxx +++ b/src/TopOpeBRepBuild/TopOpeBRepBuild_PaveSet.hxx @@ -30,7 +30,6 @@ class TopoDS_Shape; class TopOpeBRepBuild_Pave; class TopOpeBRepBuild_Loop; -class TopoDS_Edge; diff --git a/src/TopOpeBRepBuild/TopOpeBRepBuild_ShapeListOfShape.hxx b/src/TopOpeBRepBuild/TopOpeBRepBuild_ShapeListOfShape.hxx index e7163d5dea..886a457b48 100644 --- a/src/TopOpeBRepBuild/TopOpeBRepBuild_ShapeListOfShape.hxx +++ b/src/TopOpeBRepBuild/TopOpeBRepBuild_ShapeListOfShape.hxx @@ -23,7 +23,6 @@ #include #include -class TopoDS_Shape; //! represent shape + a list of shape diff --git a/src/TopOpeBRepBuild/TopOpeBRepBuild_ShapeSet.hxx b/src/TopOpeBRepBuild/TopOpeBRepBuild_ShapeSet.hxx index 331563b6fd..80d4ee043b 100644 --- a/src/TopOpeBRepBuild/TopOpeBRepBuild_ShapeSet.hxx +++ b/src/TopOpeBRepBuild/TopOpeBRepBuild_ShapeSet.hxx @@ -32,8 +32,6 @@ #include #include #include -class TopoDS_Shape; -class TCollection_AsciiString; diff --git a/src/TopOpeBRepBuild/TopOpeBRepBuild_ShellFaceClassifier.hxx b/src/TopOpeBRepBuild/TopOpeBRepBuild_ShellFaceClassifier.hxx index 7442b53d68..26fd01964b 100644 --- a/src/TopOpeBRepBuild/TopOpeBRepBuild_ShellFaceClassifier.hxx +++ b/src/TopOpeBRepBuild/TopOpeBRepBuild_ShellFaceClassifier.hxx @@ -31,7 +31,6 @@ #include #include class TopOpeBRepBuild_BlockBuilder; -class TopoDS_Shape; diff --git a/src/TopOpeBRepBuild/TopOpeBRepBuild_ShellFaceSet.hxx b/src/TopOpeBRepBuild/TopOpeBRepBuild_ShellFaceSet.hxx index 45faa8f543..a54103fbf0 100644 --- a/src/TopOpeBRepBuild/TopOpeBRepBuild_ShellFaceSet.hxx +++ b/src/TopOpeBRepBuild/TopOpeBRepBuild_ShellFaceSet.hxx @@ -27,7 +27,6 @@ #include #include class TopoDS_Shape; -class TopoDS_Solid; class TCollection_AsciiString; diff --git a/src/TopOpeBRepBuild/TopOpeBRepBuild_VertexInfo.hxx b/src/TopOpeBRepBuild/TopOpeBRepBuild_VertexInfo.hxx index 933b388fa9..4debef8a24 100644 --- a/src/TopOpeBRepBuild/TopOpeBRepBuild_VertexInfo.hxx +++ b/src/TopOpeBRepBuild/TopOpeBRepBuild_VertexInfo.hxx @@ -27,8 +27,6 @@ #include #include #include -class TopoDS_Vertex; -class TopoDS_Edge; diff --git a/src/TopOpeBRepBuild/TopOpeBRepBuild_WireEdgeClassifier.hxx b/src/TopOpeBRepBuild/TopOpeBRepBuild_WireEdgeClassifier.hxx index feb7b313b8..46b2665398 100644 --- a/src/TopOpeBRepBuild/TopOpeBRepBuild_WireEdgeClassifier.hxx +++ b/src/TopOpeBRepBuild/TopOpeBRepBuild_WireEdgeClassifier.hxx @@ -28,7 +28,6 @@ #include #include #include -class TopoDS_Shape; class TopOpeBRepBuild_BlockBuilder; class TopOpeBRepBuild_Loop; diff --git a/src/TopOpeBRepBuild/TopOpeBRepBuild_WireEdgeSet.hxx b/src/TopOpeBRepBuild/TopOpeBRepBuild_WireEdgeSet.hxx index 14e3e448fc..a601585452 100644 --- a/src/TopOpeBRepBuild/TopOpeBRepBuild_WireEdgeSet.hxx +++ b/src/TopOpeBRepBuild/TopOpeBRepBuild_WireEdgeSet.hxx @@ -30,7 +30,6 @@ #include #include class TopoDS_Shape; -class TopoDS_Face; class gp_Pnt2d; class gp_Vec2d; class TopoDS_Edge; diff --git a/src/TopOpeBRepDS/TopOpeBRepDS.hxx b/src/TopOpeBRepDS/TopOpeBRepDS.hxx index ee4e14ef48..c86171a76e 100644 --- a/src/TopOpeBRepDS/TopOpeBRepDS.hxx +++ b/src/TopOpeBRepDS/TopOpeBRepDS.hxx @@ -31,52 +31,6 @@ #include #include class TCollection_AsciiString; -class TopOpeBRepDS_Interference; -class TopOpeBRepDS_InterferenceIterator; -class TopOpeBRepDS_TKI; -class TopOpeBRepDS_Transition; -class TopOpeBRepDS_CurvePointInterference; -class TopOpeBRepDS_SurfaceCurveInterference; -class TopOpeBRepDS_SolidSurfaceInterference; -class TopOpeBRepDS_ShapeShapeInterference; -class TopOpeBRepDS_EdgeVertexInterference; -class TopOpeBRepDS_FaceEdgeInterference; -class TopOpeBRepDS_Surface; -class TopOpeBRepDS_Curve; -class TopOpeBRepDS_Point; -class TopOpeBRepDS_GeometryData; -class TopOpeBRepDS_SurfaceData; -class TopOpeBRepDS_CurveData; -class TopOpeBRepDS_PointData; -class TopOpeBRepDS_ShapeData; -class TopOpeBRepDS_DSS; -class TopOpeBRepDS_DataStructure; -class TopOpeBRepDS_SurfaceIterator; -class TopOpeBRepDS_CurveIterator; -class TopOpeBRepDS_PointIterator; -class TopOpeBRepDS_SurfaceExplorer; -class TopOpeBRepDS_CurveExplorer; -class TopOpeBRepDS_PointExplorer; -class TopOpeBRepDS_InterferenceTool; -class TopOpeBRepDS_BuildTool; -class TopOpeBRepDS_Dumper; -class TopOpeBRepDS_Marker; -class TopOpeBRepDS_HDataStructure; -class TopOpeBRepDS_EdgeInterferenceTool; -class TopOpeBRepDS_Edge3dInterferenceTool; -class TopOpeBRepDS_FaceInterferenceTool; -class TopOpeBRepDS_Filter; -class TopOpeBRepDS_Reducer; -class TopOpeBRepDS_TOOL; -class TopOpeBRepDS_FIR; -class TopOpeBRepDS_EIR; -class TopOpeBRepDS_Check; -class TopOpeBRepDS_GapFiller; -class TopOpeBRepDS_GapTool; -class TopOpeBRepDS_Association; -class TopOpeBRepDS_ListOfShapeOn1State; -class TopOpeBRepDS_Explorer; -class TopOpeBRepDS_ShapeWithState; //! This package provides services used by the TopOpeBRepBuild diff --git a/src/TopOpeBRepDS/TopOpeBRepDS_Curve.hxx b/src/TopOpeBRepDS/TopOpeBRepDS_Curve.hxx index 372c8a96cb..5aa3ee871d 100644 --- a/src/TopOpeBRepDS/TopOpeBRepDS_Curve.hxx +++ b/src/TopOpeBRepDS/TopOpeBRepDS_Curve.hxx @@ -28,7 +28,6 @@ #include class Geom_Curve; class TopOpeBRepDS_Interference; -class TopoDS_Shape; class Geom2d_Curve; diff --git a/src/TopOpeBRepDS/TopOpeBRepDS_CurveData.hxx b/src/TopOpeBRepDS/TopOpeBRepDS_CurveData.hxx index 1a4ea509a2..f84e8ff802 100644 --- a/src/TopOpeBRepDS/TopOpeBRepDS_CurveData.hxx +++ b/src/TopOpeBRepDS/TopOpeBRepDS_CurveData.hxx @@ -23,8 +23,6 @@ #include #include -class TopOpeBRepDS_DataStructure; -class TopOpeBRepDS_Curve; diff --git a/src/TopOpeBRepDS/TopOpeBRepDS_DataStructure.hxx b/src/TopOpeBRepDS/TopOpeBRepDS_DataStructure.hxx index 9721f26134..7162356c28 100644 --- a/src/TopOpeBRepDS/TopOpeBRepDS_DataStructure.hxx +++ b/src/TopOpeBRepDS/TopOpeBRepDS_DataStructure.hxx @@ -39,13 +39,6 @@ #include #include class Geom_Surface; -class TopOpeBRepDS_SurfaceExplorer; -class TopOpeBRepDS_CurveExplorer; -class TopOpeBRepDS_PointExplorer; -class TopOpeBRepDS_Surface; -class TopOpeBRepDS_Curve; -class TopOpeBRepDS_Point; -class TopoDS_Shape; class TopoDS_Edge; class TopOpeBRepDS_Interference; class TopOpeBRepDS_ShapeWithState; diff --git a/src/TopOpeBRepDS/TopOpeBRepDS_Dumper.hxx b/src/TopOpeBRepDS/TopOpeBRepDS_Dumper.hxx index 98c7f7a85c..26aca5d4db 100644 --- a/src/TopOpeBRepDS/TopOpeBRepDS_Dumper.hxx +++ b/src/TopOpeBRepDS/TopOpeBRepDS_Dumper.hxx @@ -30,15 +30,8 @@ #include #include class TopOpeBRepDS_HDataStructure; -class Geom_Curve; -class Geom2d_Curve; -class gp_Pnt; -class gp_Pnt2d; -class Geom_BSplineCurve; -class Geom2d_BSplineCurve; class TCollection_AsciiString; class TopoDS_Shape; -class TopOpeBRepDS_Interference; diff --git a/src/TopOpeBRepDS/TopOpeBRepDS_Edge3dInterferenceTool.hxx b/src/TopOpeBRepDS/TopOpeBRepDS_Edge3dInterferenceTool.hxx index 5822c6c909..e5e7793113 100644 --- a/src/TopOpeBRepDS/TopOpeBRepDS_Edge3dInterferenceTool.hxx +++ b/src/TopOpeBRepDS/TopOpeBRepDS_Edge3dInterferenceTool.hxx @@ -28,7 +28,6 @@ #include #include #include -class TopoDS_Shape; class TopOpeBRepDS_Interference; diff --git a/src/TopOpeBRepDS/TopOpeBRepDS_Explorer.hxx b/src/TopOpeBRepDS/TopOpeBRepDS_Explorer.hxx index 9198bb2327..1cc33caee8 100644 --- a/src/TopOpeBRepDS/TopOpeBRepDS_Explorer.hxx +++ b/src/TopOpeBRepDS/TopOpeBRepDS_Explorer.hxx @@ -25,8 +25,6 @@ #include #include class TopOpeBRepDS_HDataStructure; -class Standard_NoMoreObject; -class Standard_NoSuchObject; class TopoDS_Shape; class TopoDS_Face; class TopoDS_Edge; diff --git a/src/TopOpeBRepDS/TopOpeBRepDS_FaceInterferenceTool.hxx b/src/TopOpeBRepDS/TopOpeBRepDS_FaceInterferenceTool.hxx index b3c02164d6..7b55297ad2 100644 --- a/src/TopOpeBRepDS/TopOpeBRepDS_FaceInterferenceTool.hxx +++ b/src/TopOpeBRepDS/TopOpeBRepDS_FaceInterferenceTool.hxx @@ -29,10 +29,8 @@ #include #include #include -class TopoDS_Shape; class TopOpeBRepDS_Interference; class TopOpeBRepDS_Curve; -class gp_Pnt; //! a tool computing complex transition on Face. diff --git a/src/TopOpeBRepDS/TopOpeBRepDS_HDataStructure.hxx b/src/TopOpeBRepDS/TopOpeBRepDS_HDataStructure.hxx index 501d246a80..8757e82cc4 100644 --- a/src/TopOpeBRepDS/TopOpeBRepDS_HDataStructure.hxx +++ b/src/TopOpeBRepDS/TopOpeBRepDS_HDataStructure.hxx @@ -33,7 +33,6 @@ #include #include class TopoDS_Shape; -class TopOpeBRepDS_DataStructure; class TopOpeBRepDS_Surface; class TopOpeBRepDS_CurveIterator; class TopOpeBRepDS_Curve; diff --git a/src/TopOpeBRepDS/TopOpeBRepDS_Interference.hxx b/src/TopOpeBRepDS/TopOpeBRepDS_Interference.hxx index 99f567a92e..19f47308e4 100644 --- a/src/TopOpeBRepDS/TopOpeBRepDS_Interference.hxx +++ b/src/TopOpeBRepDS/TopOpeBRepDS_Interference.hxx @@ -26,8 +26,6 @@ #include #include #include -class TopOpeBRepDS_Transition; -class TCollection_AsciiString; class TopOpeBRepDS_Interference; diff --git a/src/TopOpeBRepDS/TopOpeBRepDS_Point.hxx b/src/TopOpeBRepDS/TopOpeBRepDS_Point.hxx index f406cda3fd..1b2fbc0edf 100644 --- a/src/TopOpeBRepDS/TopOpeBRepDS_Point.hxx +++ b/src/TopOpeBRepDS/TopOpeBRepDS_Point.hxx @@ -24,7 +24,6 @@ #include #include #include -class gp_Pnt; class TopoDS_Shape; diff --git a/src/TopOpeBRepDS/TopOpeBRepDS_PointData.hxx b/src/TopOpeBRepDS/TopOpeBRepDS_PointData.hxx index ee17f5e811..8cc69e2d33 100644 --- a/src/TopOpeBRepDS/TopOpeBRepDS_PointData.hxx +++ b/src/TopOpeBRepDS/TopOpeBRepDS_PointData.hxx @@ -24,8 +24,6 @@ #include #include #include -class TopOpeBRepDS_DataStructure; -class TopOpeBRepDS_Point; diff --git a/src/TopOpeBRepDS/TopOpeBRepDS_PointExplorer.hxx b/src/TopOpeBRepDS/TopOpeBRepDS_PointExplorer.hxx index dfb4d16fe3..9e653e1876 100644 --- a/src/TopOpeBRepDS/TopOpeBRepDS_PointExplorer.hxx +++ b/src/TopOpeBRepDS/TopOpeBRepDS_PointExplorer.hxx @@ -26,7 +26,6 @@ #include #include class TopOpeBRepDS_DataStructure; -class TopOpeBRepDS_Point; diff --git a/src/TopOpeBRepDS/TopOpeBRepDS_ShapeData.hxx b/src/TopOpeBRepDS/TopOpeBRepDS_ShapeData.hxx index 404114b76a..1337a8abde 100644 --- a/src/TopOpeBRepDS/TopOpeBRepDS_ShapeData.hxx +++ b/src/TopOpeBRepDS/TopOpeBRepDS_ShapeData.hxx @@ -27,7 +27,6 @@ #include #include #include -class TopOpeBRepDS_DataStructure; diff --git a/src/TopOpeBRepDS/TopOpeBRepDS_SurfaceCurveInterference.hxx b/src/TopOpeBRepDS/TopOpeBRepDS_SurfaceCurveInterference.hxx index 7f5f384fbf..3b9d965cb8 100644 --- a/src/TopOpeBRepDS/TopOpeBRepDS_SurfaceCurveInterference.hxx +++ b/src/TopOpeBRepDS/TopOpeBRepDS_SurfaceCurveInterference.hxx @@ -27,7 +27,6 @@ #include class Geom2d_Curve; class TopOpeBRepDS_Transition; -class TopOpeBRepDS_Interference; class TopOpeBRepDS_SurfaceCurveInterference; diff --git a/src/TopOpeBRepDS/TopOpeBRepDS_SurfaceData.hxx b/src/TopOpeBRepDS/TopOpeBRepDS_SurfaceData.hxx index 6183427664..909be7b22e 100644 --- a/src/TopOpeBRepDS/TopOpeBRepDS_SurfaceData.hxx +++ b/src/TopOpeBRepDS/TopOpeBRepDS_SurfaceData.hxx @@ -23,8 +23,6 @@ #include #include -class TopOpeBRepDS_DataStructure; -class TopOpeBRepDS_Surface; diff --git a/src/TopOpeBRepDS/TopOpeBRepDS_SurfaceExplorer.hxx b/src/TopOpeBRepDS/TopOpeBRepDS_SurfaceExplorer.hxx index 0ad4baecde..aac2c3b393 100644 --- a/src/TopOpeBRepDS/TopOpeBRepDS_SurfaceExplorer.hxx +++ b/src/TopOpeBRepDS/TopOpeBRepDS_SurfaceExplorer.hxx @@ -26,7 +26,6 @@ #include #include class TopOpeBRepDS_DataStructure; -class TopOpeBRepDS_Surface; diff --git a/src/TopOpeBRepTool/TopOpeBRepTool.hxx b/src/TopOpeBRepTool/TopOpeBRepTool.hxx index 04887f6726..04f3d7da60 100644 --- a/src/TopOpeBRepTool/TopOpeBRepTool.hxx +++ b/src/TopOpeBRepTool/TopOpeBRepTool.hxx @@ -30,27 +30,6 @@ #include class TopoDS_Face; class TopoDS_Solid; -class TopOpeBRepTool_GeomTool; -class TopOpeBRepTool_AncestorsTool; -class TopOpeBRepTool_C2DF; -class TopOpeBRepTool_SolidClassifier; -class TopOpeBRepTool_CurveTool; -class TopOpeBRepTool_HBoxTool; -class TopOpeBRepTool_BoxSort; -class TopOpeBRepTool_ShapeExplorer; -class TopOpeBRepTool_ShapeTool; -class TopOpeBRepTool_ShapeClassifier; -class TopOpeBRepTool_connexity; -class TopOpeBRepTool_face; -class TopOpeBRepTool_CLASSI; -class TopOpeBRepTool_TOOL; -class TopOpeBRepTool_CORRISO; -class TopOpeBRepTool_REGUW; -class TopOpeBRepTool_REGUS; -class TopOpeBRepTool_makeTransition; -class TopOpeBRepTool_mkTondgE; -class TopOpeBRepTool_PurgeInternalEdges; -class TopOpeBRepTool_FuseEdges; //! This package provides services used by the TopOpeBRep diff --git a/src/TopOpeBRepTool/TopOpeBRepTool_BoxSort.hxx b/src/TopOpeBRepTool/TopOpeBRepTool_BoxSort.hxx index 043cb7995a..964fd2db30 100644 --- a/src/TopOpeBRepTool/TopOpeBRepTool_BoxSort.hxx +++ b/src/TopOpeBRepTool/TopOpeBRepTool_BoxSort.hxx @@ -30,8 +30,6 @@ #include #include class TopOpeBRepTool_HBoxTool; -class TopoDS_Shape; -class Bnd_Box; diff --git a/src/TopOpeBRepTool/TopOpeBRepTool_C2DF.hxx b/src/TopOpeBRepTool/TopOpeBRepTool_C2DF.hxx index e0d1b8de84..f411bb6a12 100644 --- a/src/TopOpeBRepTool/TopOpeBRepTool_C2DF.hxx +++ b/src/TopOpeBRepTool/TopOpeBRepTool_C2DF.hxx @@ -25,7 +25,6 @@ #include #include class Geom2d_Curve; -class TopoDS_Face; diff --git a/src/TopOpeBRepTool/TopOpeBRepTool_CLASSI.hxx b/src/TopOpeBRepTool/TopOpeBRepTool_CLASSI.hxx index bf7a6b1672..b33704b15f 100644 --- a/src/TopOpeBRepTool/TopOpeBRepTool_CLASSI.hxx +++ b/src/TopOpeBRepTool/TopOpeBRepTool_CLASSI.hxx @@ -29,7 +29,6 @@ #include #include #include -class TopoDS_Face; class TopoDS_Shape; class Bnd_Box2d; class TopOpeBRepTool_face; diff --git a/src/TopOpeBRepTool/TopOpeBRepTool_CORRISO.hxx b/src/TopOpeBRepTool/TopOpeBRepTool_CORRISO.hxx index 70dbbb22fe..b5896f6588 100644 --- a/src/TopOpeBRepTool/TopOpeBRepTool_CORRISO.hxx +++ b/src/TopOpeBRepTool/TopOpeBRepTool_CORRISO.hxx @@ -31,9 +31,6 @@ #include #include #include -class TopoDS_Face; -class GeomAdaptor_Surface; -class TopoDS_Shape; class TopoDS_Edge; class TopOpeBRepTool_C2DF; class TopoDS_Vertex; diff --git a/src/TopOpeBRepTool/TopOpeBRepTool_CurveTool.hxx b/src/TopOpeBRepTool/TopOpeBRepTool_CurveTool.hxx index 3276e0e93c..6c0fb650f2 100644 --- a/src/TopOpeBRepTool/TopOpeBRepTool_CurveTool.hxx +++ b/src/TopOpeBRepTool/TopOpeBRepTool_CurveTool.hxx @@ -27,7 +27,6 @@ #include #include #include -class TopOpeBRepTool_GeomTool; class Geom_Curve; class Geom2d_Curve; class TopoDS_Shape; diff --git a/src/TopOpeBRepTool/TopOpeBRepTool_FuseEdges.hxx b/src/TopOpeBRepTool/TopOpeBRepTool_FuseEdges.hxx index 45adbdfd07..df5fde710d 100644 --- a/src/TopOpeBRepTool/TopOpeBRepTool_FuseEdges.hxx +++ b/src/TopOpeBRepTool/TopOpeBRepTool_FuseEdges.hxx @@ -32,9 +32,6 @@ #include #include #include -class Standard_ConstructionError; -class Standard_NullObject; -class TopoDS_Shape; class TopoDS_Vertex; class TopoDS_Edge; diff --git a/src/TopOpeBRepTool/TopOpeBRepTool_PurgeInternalEdges.hxx b/src/TopOpeBRepTool/TopOpeBRepTool_PurgeInternalEdges.hxx index 1c34646119..bf292f6df9 100644 --- a/src/TopOpeBRepTool/TopOpeBRepTool_PurgeInternalEdges.hxx +++ b/src/TopOpeBRepTool/TopOpeBRepTool_PurgeInternalEdges.hxx @@ -26,9 +26,6 @@ #include #include #include -class Standard_ConstructionError; -class Standard_NullObject; -class TopoDS_Shape; //! remove from a shape, the internal edges that are diff --git a/src/TopOpeBRepTool/TopOpeBRepTool_REGUS.hxx b/src/TopOpeBRepTool/TopOpeBRepTool_REGUS.hxx index a77c386e53..68469bc188 100644 --- a/src/TopOpeBRepTool/TopOpeBRepTool_REGUS.hxx +++ b/src/TopOpeBRepTool/TopOpeBRepTool_REGUS.hxx @@ -28,7 +28,6 @@ #include #include #include -class TopoDS_Shape; class TopoDS_Face; class TopoDS_Edge; diff --git a/src/TopOpeBRepTool/TopOpeBRepTool_REGUW.hxx b/src/TopOpeBRepTool/TopOpeBRepTool_REGUW.hxx index a15dbe135f..c20aa52c97 100644 --- a/src/TopOpeBRepTool/TopOpeBRepTool_REGUW.hxx +++ b/src/TopOpeBRepTool/TopOpeBRepTool_REGUW.hxx @@ -35,9 +35,6 @@ #include #include class TopoDS_Face; -class TopoDS_Shape; -class TopoDS_Edge; -class TopoDS_Vertex; class TopOpeBRepTool_connexity; diff --git a/src/TopOpeBRepTool/TopOpeBRepTool_ShapeClassifier.hxx b/src/TopOpeBRepTool/TopOpeBRepTool_ShapeClassifier.hxx index 4dd062a4a8..72cf5a09e4 100644 --- a/src/TopOpeBRepTool/TopOpeBRepTool_ShapeClassifier.hxx +++ b/src/TopOpeBRepTool/TopOpeBRepTool_ShapeClassifier.hxx @@ -33,10 +33,6 @@ #include #include #include -class TopoDS_Shape; -class TopOpeBRepTool_SolidClassifier; -class gp_Pnt2d; -class gp_Pnt; diff --git a/src/TopOpeBRepTool/TopOpeBRepTool_SolidClassifier.hxx b/src/TopOpeBRepTool/TopOpeBRepTool_SolidClassifier.hxx index cdf82a5b87..3c9bfb5683 100644 --- a/src/TopOpeBRepTool/TopOpeBRepTool_SolidClassifier.hxx +++ b/src/TopOpeBRepTool/TopOpeBRepTool_SolidClassifier.hxx @@ -28,9 +28,7 @@ #include #include #include -class TopoDS_Solid; class gp_Pnt; -class TopoDS_Shell; diff --git a/src/TopOpeBRepTool/TopOpeBRepTool_connexity.hxx b/src/TopOpeBRepTool/TopOpeBRepTool_connexity.hxx index 645ad977db..54613756e9 100644 --- a/src/TopOpeBRepTool/TopOpeBRepTool_connexity.hxx +++ b/src/TopOpeBRepTool/TopOpeBRepTool_connexity.hxx @@ -26,7 +26,6 @@ #include #include #include -class TopoDS_Shape; diff --git a/src/TopOpeBRepTool/TopOpeBRepTool_face.hxx b/src/TopOpeBRepTool/TopOpeBRepTool_face.hxx index 79825d9e8c..dc2877145e 100644 --- a/src/TopOpeBRepTool/TopOpeBRepTool_face.hxx +++ b/src/TopOpeBRepTool/TopOpeBRepTool_face.hxx @@ -24,8 +24,6 @@ #include #include #include -class TopoDS_Wire; -class TopoDS_Face; diff --git a/src/TopOpeBRepTool/TopOpeBRepTool_makeTransition.hxx b/src/TopOpeBRepTool/TopOpeBRepTool_makeTransition.hxx index 9d5f9907b1..892e56dd93 100644 --- a/src/TopOpeBRepTool/TopOpeBRepTool_makeTransition.hxx +++ b/src/TopOpeBRepTool/TopOpeBRepTool_makeTransition.hxx @@ -27,9 +27,6 @@ #include #include #include -class TopoDS_Edge; -class TopoDS_Face; -class gp_Pnt2d; diff --git a/src/TopOpeBRepTool/TopOpeBRepTool_mkTondgE.hxx b/src/TopOpeBRepTool/TopOpeBRepTool_mkTondgE.hxx index 40a5ef86d3..762fcef528 100644 --- a/src/TopOpeBRepTool/TopOpeBRepTool_mkTondgE.hxx +++ b/src/TopOpeBRepTool/TopOpeBRepTool_mkTondgE.hxx @@ -30,9 +30,6 @@ #include #include #include -class TopoDS_Edge; -class TopoDS_Face; -class gp_Pnt2d; diff --git a/src/TopTools/TopTools.hxx b/src/TopTools/TopTools.hxx index bbe34b30a9..2374518da8 100644 --- a/src/TopTools/TopTools.hxx +++ b/src/TopTools/TopTools.hxx @@ -24,10 +24,6 @@ #include #include class TopoDS_Shape; -class TopTools_ShapeMapHasher; -class TopTools_OrientedShapeMapHasher; -class TopTools_LocationSet; -class TopTools_ShapeSet; //! The TopTools package provides utilities for the diff --git a/src/TopTools/TopTools_LocationSet.hxx b/src/TopTools/TopTools_LocationSet.hxx index 392c48166d..7b983e1bfd 100644 --- a/src/TopTools/TopTools_LocationSet.hxx +++ b/src/TopTools/TopTools_LocationSet.hxx @@ -27,7 +27,6 @@ #include #include -class Standard_OutOfRange; class TopLoc_Location; diff --git a/src/TopTools/TopTools_ShapeSet.hxx b/src/TopTools/TopTools_ShapeSet.hxx index 1668a9dcad..5eb9e95ec6 100644 --- a/src/TopTools/TopTools_ShapeSet.hxx +++ b/src/TopTools/TopTools_ShapeSet.hxx @@ -30,7 +30,6 @@ #include class TopoDS_Shape; -class TopTools_LocationSet; class TCollection_AsciiString; diff --git a/src/TopTrans/TopTrans_CurveTransition.hxx b/src/TopTrans/TopTrans_CurveTransition.hxx index 39d62a93a7..5d2993a06a 100644 --- a/src/TopTrans/TopTrans_CurveTransition.hxx +++ b/src/TopTrans/TopTrans_CurveTransition.hxx @@ -27,7 +27,6 @@ #include #include #include -class gp_Dir; //! This algorithm is used to compute the transition diff --git a/src/TopTrans/TopTrans_SurfaceTransition.hxx b/src/TopTrans/TopTrans_SurfaceTransition.hxx index c9b1b58108..36c26e5523 100644 --- a/src/TopTrans/TopTrans_SurfaceTransition.hxx +++ b/src/TopTrans/TopTrans_SurfaceTransition.hxx @@ -28,7 +28,6 @@ #include #include #include -class gp_Dir; //! This algorithm is used to compute the transition diff --git a/src/TopoDS/TopoDS_Builder.hxx b/src/TopoDS/TopoDS_Builder.hxx index 6aa8f95e5f..bedb9bec7b 100644 --- a/src/TopoDS/TopoDS_Builder.hxx +++ b/src/TopoDS/TopoDS_Builder.hxx @@ -21,9 +21,6 @@ #include #include -class Standard_NullObject; -class TopoDS_FrozenShape; -class TopoDS_UnCompatibleShapes; class TopoDS_Shape; class TopoDS_TShape; class TopoDS_Wire; diff --git a/src/TopoDS/TopoDS_HShape.hxx b/src/TopoDS/TopoDS_HShape.hxx index 0a8bf5eafb..0fe5303aa4 100644 --- a/src/TopoDS/TopoDS_HShape.hxx +++ b/src/TopoDS/TopoDS_HShape.hxx @@ -22,7 +22,6 @@ #include #include -class TopoDS_Shape; class TopoDS_HShape; diff --git a/src/TopoDS/TopoDS_TCompSolid.hxx b/src/TopoDS/TopoDS_TCompSolid.hxx index 89e6df4d3c..d627a01685 100644 --- a/src/TopoDS/TopoDS_TCompSolid.hxx +++ b/src/TopoDS/TopoDS_TCompSolid.hxx @@ -22,7 +22,6 @@ #include #include -class TopoDS_TShape; class TopoDS_TCompSolid; diff --git a/src/TopoDS/TopoDS_TCompound.hxx b/src/TopoDS/TopoDS_TCompound.hxx index 873f91d8d7..0aa85b6c3f 100644 --- a/src/TopoDS/TopoDS_TCompound.hxx +++ b/src/TopoDS/TopoDS_TCompound.hxx @@ -22,7 +22,6 @@ #include #include -class TopoDS_TShape; class TopoDS_TCompound; diff --git a/src/TopoDS/TopoDS_TFace.hxx b/src/TopoDS/TopoDS_TFace.hxx index 9fffc33af8..48f6c17af1 100644 --- a/src/TopoDS/TopoDS_TFace.hxx +++ b/src/TopoDS/TopoDS_TFace.hxx @@ -22,7 +22,6 @@ #include #include -class TopoDS_TShape; class TopoDS_TFace; diff --git a/src/TopoDS/TopoDS_TShape.hxx b/src/TopoDS/TopoDS_TShape.hxx index 1efe412fab..90581e958b 100644 --- a/src/TopoDS/TopoDS_TShape.hxx +++ b/src/TopoDS/TopoDS_TShape.hxx @@ -22,8 +22,6 @@ #include #include -class TopoDS_Iterator; -class TopoDS_Builder; // resolve name collisions with X11 headers #ifdef Convex diff --git a/src/TopoDS/TopoDS_TShell.hxx b/src/TopoDS/TopoDS_TShell.hxx index b7f9f8b604..ce78c1b881 100644 --- a/src/TopoDS/TopoDS_TShell.hxx +++ b/src/TopoDS/TopoDS_TShell.hxx @@ -22,7 +22,6 @@ #include #include -class TopoDS_TShape; class TopoDS_TShell; diff --git a/src/TopoDS/TopoDS_TSolid.hxx b/src/TopoDS/TopoDS_TSolid.hxx index fe64c4faca..c9c020f005 100644 --- a/src/TopoDS/TopoDS_TSolid.hxx +++ b/src/TopoDS/TopoDS_TSolid.hxx @@ -22,7 +22,6 @@ #include #include -class TopoDS_TShape; class TopoDS_TSolid; diff --git a/src/TopoDS/TopoDS_TWire.hxx b/src/TopoDS/TopoDS_TWire.hxx index d3eb03fc21..a4fa87a69f 100644 --- a/src/TopoDS/TopoDS_TWire.hxx +++ b/src/TopoDS/TopoDS_TWire.hxx @@ -22,7 +22,6 @@ #include #include -class TopoDS_TShape; class TopoDS_TWire; diff --git a/src/TopoDSToStep/TopoDSToStep.hxx b/src/TopoDSToStep/TopoDSToStep.hxx index cfd41589c5..4dba01af05 100644 --- a/src/TopoDSToStep/TopoDSToStep.hxx +++ b/src/TopoDSToStep/TopoDSToStep.hxx @@ -31,21 +31,6 @@ class Transfer_FinderProcess; class TopoDS_Shape; class Standard_Transient; class TopoDSToStep_Tool; -class TopoDSToStep_Root; -class TopoDSToStep_MakeManifoldSolidBrep; -class TopoDSToStep_MakeBrepWithVoids; -class TopoDSToStep_MakeFacetedBrep; -class TopoDSToStep_MakeFacetedBrepAndBrepWithVoids; -class TopoDSToStep_MakeShellBasedSurfaceModel; -class TopoDSToStep_MakeGeometricCurveSet; -class TopoDSToStep_Builder; -class TopoDSToStep_WireframeBuilder; -class TopoDSToStep_Tool; -class TopoDSToStep_FacetedTool; -class TopoDSToStep_MakeStepFace; -class TopoDSToStep_MakeStepWire; -class TopoDSToStep_MakeStepEdge; -class TopoDSToStep_MakeStepVertex; //! This package implements the mapping between CAS.CAD diff --git a/src/TopoDSToStep/TopoDSToStep_Builder.hxx b/src/TopoDSToStep/TopoDSToStep_Builder.hxx index 9c2b23ba75..1ca6ecc598 100644 --- a/src/TopoDSToStep/TopoDSToStep_Builder.hxx +++ b/src/TopoDSToStep/TopoDSToStep_Builder.hxx @@ -26,7 +26,6 @@ #include class StepShape_TopologicalRepresentationItem; -class StdFail_NotDone; class TopoDS_Shape; class TopoDSToStep_Tool; class Transfer_FinderProcess; diff --git a/src/TopoDSToStep/TopoDSToStep_MakeBrepWithVoids.hxx b/src/TopoDSToStep/TopoDSToStep_MakeBrepWithVoids.hxx index 97d86dc7b0..379b6e9dec 100644 --- a/src/TopoDSToStep/TopoDSToStep_MakeBrepWithVoids.hxx +++ b/src/TopoDSToStep/TopoDSToStep_MakeBrepWithVoids.hxx @@ -25,7 +25,6 @@ #include class StepShape_BrepWithVoids; -class StdFail_NotDone; class TopoDS_Solid; class Transfer_FinderProcess; diff --git a/src/TopoDSToStep/TopoDSToStep_MakeFacetedBrep.hxx b/src/TopoDSToStep/TopoDSToStep_MakeFacetedBrep.hxx index a86cc2bc70..7b5706b6c5 100644 --- a/src/TopoDSToStep/TopoDSToStep_MakeFacetedBrep.hxx +++ b/src/TopoDSToStep/TopoDSToStep_MakeFacetedBrep.hxx @@ -25,7 +25,6 @@ #include class StepShape_FacetedBrep; -class StdFail_NotDone; class TopoDS_Shell; class Transfer_FinderProcess; class TopoDS_Solid; diff --git a/src/TopoDSToStep/TopoDSToStep_MakeFacetedBrepAndBrepWithVoids.hxx b/src/TopoDSToStep/TopoDSToStep_MakeFacetedBrepAndBrepWithVoids.hxx index 3cffbd719a..81e1449f55 100644 --- a/src/TopoDSToStep/TopoDSToStep_MakeFacetedBrepAndBrepWithVoids.hxx +++ b/src/TopoDSToStep/TopoDSToStep_MakeFacetedBrepAndBrepWithVoids.hxx @@ -25,7 +25,6 @@ #include class StepShape_FacetedBrepAndBrepWithVoids; -class StdFail_NotDone; class TopoDS_Solid; class Transfer_FinderProcess; diff --git a/src/TopoDSToStep/TopoDSToStep_MakeGeometricCurveSet.hxx b/src/TopoDSToStep/TopoDSToStep_MakeGeometricCurveSet.hxx index a9e11fa404..cb52372f9e 100644 --- a/src/TopoDSToStep/TopoDSToStep_MakeGeometricCurveSet.hxx +++ b/src/TopoDSToStep/TopoDSToStep_MakeGeometricCurveSet.hxx @@ -23,7 +23,6 @@ #include class StepShape_GeometricCurveSet; -class StdFail_NotDone; class TopoDS_Shape; class Transfer_FinderProcess; diff --git a/src/TopoDSToStep/TopoDSToStep_MakeManifoldSolidBrep.hxx b/src/TopoDSToStep/TopoDSToStep_MakeManifoldSolidBrep.hxx index 0bf9e3ff77..78c35f628e 100644 --- a/src/TopoDSToStep/TopoDSToStep_MakeManifoldSolidBrep.hxx +++ b/src/TopoDSToStep/TopoDSToStep_MakeManifoldSolidBrep.hxx @@ -25,7 +25,6 @@ #include class StepShape_ManifoldSolidBrep; -class StdFail_NotDone; class TopoDS_Shell; class Transfer_FinderProcess; class TopoDS_Solid; diff --git a/src/TopoDSToStep/TopoDSToStep_MakeShellBasedSurfaceModel.hxx b/src/TopoDSToStep/TopoDSToStep_MakeShellBasedSurfaceModel.hxx index 098622a986..b3abbc7794 100644 --- a/src/TopoDSToStep/TopoDSToStep_MakeShellBasedSurfaceModel.hxx +++ b/src/TopoDSToStep/TopoDSToStep_MakeShellBasedSurfaceModel.hxx @@ -25,7 +25,6 @@ #include class StepShape_ShellBasedSurfaceModel; -class StdFail_NotDone; class TopoDS_Face; class Transfer_FinderProcess; class TopoDS_Shell; diff --git a/src/TopoDSToStep/TopoDSToStep_MakeStepEdge.hxx b/src/TopoDSToStep/TopoDSToStep_MakeStepEdge.hxx index f68714b5fc..a9a30f25d7 100644 --- a/src/TopoDSToStep/TopoDSToStep_MakeStepEdge.hxx +++ b/src/TopoDSToStep/TopoDSToStep_MakeStepEdge.hxx @@ -24,7 +24,6 @@ #include #include class StepShape_TopologicalRepresentationItem; -class StdFail_NotDone; class TopoDS_Edge; class TopoDSToStep_Tool; class Transfer_FinderProcess; diff --git a/src/TopoDSToStep/TopoDSToStep_MakeStepFace.hxx b/src/TopoDSToStep/TopoDSToStep_MakeStepFace.hxx index de8cbebb57..a0612f329b 100644 --- a/src/TopoDSToStep/TopoDSToStep_MakeStepFace.hxx +++ b/src/TopoDSToStep/TopoDSToStep_MakeStepFace.hxx @@ -24,7 +24,6 @@ #include #include class StepShape_TopologicalRepresentationItem; -class StdFail_NotDone; class TopoDS_Face; class TopoDSToStep_Tool; class Transfer_FinderProcess; diff --git a/src/TopoDSToStep/TopoDSToStep_MakeStepVertex.hxx b/src/TopoDSToStep/TopoDSToStep_MakeStepVertex.hxx index 42806da052..1105da6309 100644 --- a/src/TopoDSToStep/TopoDSToStep_MakeStepVertex.hxx +++ b/src/TopoDSToStep/TopoDSToStep_MakeStepVertex.hxx @@ -24,7 +24,6 @@ #include #include class StepShape_TopologicalRepresentationItem; -class StdFail_NotDone; class TopoDS_Vertex; class TopoDSToStep_Tool; class Transfer_FinderProcess; diff --git a/src/TopoDSToStep/TopoDSToStep_MakeStepWire.hxx b/src/TopoDSToStep/TopoDSToStep_MakeStepWire.hxx index 1ed25e9675..1f33cbaee7 100644 --- a/src/TopoDSToStep/TopoDSToStep_MakeStepWire.hxx +++ b/src/TopoDSToStep/TopoDSToStep_MakeStepWire.hxx @@ -24,7 +24,6 @@ #include #include class StepShape_TopologicalRepresentationItem; -class StdFail_NotDone; class TopoDS_Wire; class TopoDSToStep_Tool; class Transfer_FinderProcess; diff --git a/src/TopoDSToStep/TopoDSToStep_Tool.hxx b/src/TopoDSToStep/TopoDSToStep_Tool.hxx index 1b8d82a65d..2ea4c294a6 100644 --- a/src/TopoDSToStep/TopoDSToStep_Tool.hxx +++ b/src/TopoDSToStep/TopoDSToStep_Tool.hxx @@ -32,11 +32,6 @@ #include class TopoDS_Shape; class StepShape_TopologicalRepresentationItem; -class TopoDS_Shell; -class TopoDS_Face; -class TopoDS_Wire; -class TopoDS_Edge; -class TopoDS_Vertex; //! This Tool Class provides Information to build diff --git a/src/TopoDSToStep/TopoDSToStep_WireframeBuilder.hxx b/src/TopoDSToStep/TopoDSToStep_WireframeBuilder.hxx index 64b856ccd5..3772320519 100644 --- a/src/TopoDSToStep/TopoDSToStep_WireframeBuilder.hxx +++ b/src/TopoDSToStep/TopoDSToStep_WireframeBuilder.hxx @@ -26,7 +26,6 @@ #include #include #include -class StdFail_NotDone; class TopoDS_Shape; class TopoDSToStep_Tool; class Transfer_FinderProcess; diff --git a/src/Transfer/Transfer_ActorDispatch.hxx b/src/Transfer/Transfer_ActorDispatch.hxx index 478f45e6e2..fb49871fde 100644 --- a/src/Transfer/Transfer_ActorDispatch.hxx +++ b/src/Transfer/Transfer_ActorDispatch.hxx @@ -22,12 +22,9 @@ #include #include -class Interface_InterfaceError; class Interface_InterfaceModel; class Interface_GeneralLib; class Interface_Protocol; -class Transfer_ActorOfTransientProcess; -class Transfer_TransferDispatch; class Transfer_Binder; class Standard_Transient; class Transfer_TransientProcess; diff --git a/src/Transfer/Transfer_ActorOfTransientProcess.hxx b/src/Transfer/Transfer_ActorOfTransientProcess.hxx index 224b5b20c4..197f04a701 100644 --- a/src/Transfer/Transfer_ActorOfTransientProcess.hxx +++ b/src/Transfer/Transfer_ActorOfTransientProcess.hxx @@ -25,7 +25,6 @@ class Transfer_Binder; class Standard_Transient; class Transfer_ProcessForTransient; class Transfer_TransientProcess; -class Message_ProgressScope; class Transfer_ActorOfTransientProcess; DEFINE_STANDARD_HANDLE(Transfer_ActorOfTransientProcess, Transfer_ActorOfProcessForTransient) diff --git a/src/Transfer/Transfer_Binder.hxx b/src/Transfer/Transfer_Binder.hxx index 9b8d291380..d131f2d02d 100644 --- a/src/Transfer/Transfer_Binder.hxx +++ b/src/Transfer/Transfer_Binder.hxx @@ -27,7 +27,6 @@ #include #include class Interface_Check; -class Transfer_TransferFailure; // resolve name collisions with X11 headers #ifdef Status diff --git a/src/Transfer/Transfer_DispatchControl.hxx b/src/Transfer/Transfer_DispatchControl.hxx index 2d426fe3e0..dda6faedd7 100644 --- a/src/Transfer/Transfer_DispatchControl.hxx +++ b/src/Transfer/Transfer_DispatchControl.hxx @@ -24,7 +24,6 @@ #include class Transfer_TransientProcess; class Interface_InterfaceModel; -class Interface_InterfaceError; class Standard_Transient; diff --git a/src/Transfer/Transfer_MultipleBinder.hxx b/src/Transfer/Transfer_MultipleBinder.hxx index 77af715296..ca965a13b4 100644 --- a/src/Transfer/Transfer_MultipleBinder.hxx +++ b/src/Transfer/Transfer_MultipleBinder.hxx @@ -26,8 +26,6 @@ #include #include #include -class Transfer_TransferFailure; -class Standard_OutOfRange; class Standard_Transient; diff --git a/src/Transfer/Transfer_ResultFromModel.hxx b/src/Transfer/Transfer_ResultFromModel.hxx index 375aa07188..8883e0510a 100644 --- a/src/Transfer/Transfer_ResultFromModel.hxx +++ b/src/Transfer/Transfer_ResultFromModel.hxx @@ -30,7 +30,6 @@ class Interface_InterfaceModel; class Transfer_ResultFromTransient; class Transfer_TransientProcess; -class Standard_Transient; class Interface_CheckIterator; diff --git a/src/Transfer/Transfer_ResultFromTransient.hxx b/src/Transfer/Transfer_ResultFromTransient.hxx index c571f53f49..df9f757b57 100644 --- a/src/Transfer/Transfer_ResultFromTransient.hxx +++ b/src/Transfer/Transfer_ResultFromTransient.hxx @@ -26,7 +26,6 @@ #include #include #include -class Standard_Transient; class Transfer_Binder; class Interface_Check; class Transfer_TransientProcess; diff --git a/src/Transfer/Transfer_SimpleBinderOfTransient.hxx b/src/Transfer/Transfer_SimpleBinderOfTransient.hxx index 54ef19aeba..37a15dad0e 100644 --- a/src/Transfer/Transfer_SimpleBinderOfTransient.hxx +++ b/src/Transfer/Transfer_SimpleBinderOfTransient.hxx @@ -24,9 +24,6 @@ #include #include #include -class Standard_Transient; -class Transfer_TransferFailure; -class Transfer_Binder; class Transfer_SimpleBinderOfTransient; diff --git a/src/Transfer/Transfer_TransferDispatch.hxx b/src/Transfer/Transfer_TransferDispatch.hxx index 441c0b45c4..a312b5e393 100644 --- a/src/Transfer/Transfer_TransferDispatch.hxx +++ b/src/Transfer/Transfer_TransferDispatch.hxx @@ -23,7 +23,6 @@ #include #include -class Interface_InterfaceError; class Interface_InterfaceModel; class Interface_GeneralLib; class Interface_Protocol; diff --git a/src/Transfer/Transfer_TransferInput.hxx b/src/Transfer/Transfer_TransferInput.hxx index e3e49df5a5..b11f588cbf 100644 --- a/src/Transfer/Transfer_TransferInput.hxx +++ b/src/Transfer/Transfer_TransferInput.hxx @@ -22,7 +22,6 @@ #include #include -class Transfer_TransferFailure; class Interface_EntityIterator; class Transfer_TransferIterator; class Transfer_TransientProcess; diff --git a/src/Transfer/Transfer_TransferIterator.hxx b/src/Transfer/Transfer_TransferIterator.hxx index 472b547ba8..26ec00ba89 100644 --- a/src/Transfer/Transfer_TransferIterator.hxx +++ b/src/Transfer/Transfer_TransferIterator.hxx @@ -27,7 +27,6 @@ #include #include #include -class Standard_NoSuchObject; class Transfer_Binder; class Standard_Transient; class Interface_Check; diff --git a/src/Transfer/Transfer_TransferOutput.hxx b/src/Transfer/Transfer_TransferOutput.hxx index 85090b5963..08ff2ac805 100644 --- a/src/Transfer/Transfer_TransferOutput.hxx +++ b/src/Transfer/Transfer_TransferOutput.hxx @@ -25,8 +25,6 @@ class Transfer_TransientProcess; class Interface_InterfaceModel; -class Standard_NoSuchObject; -class Transfer_TransferFailure; class Transfer_ActorOfTransientProcess; class Standard_Transient; class Interface_Protocol; diff --git a/src/Transfer/Transfer_TransientListBinder.hxx b/src/Transfer/Transfer_TransientListBinder.hxx index fe64179347..353991e19c 100644 --- a/src/Transfer/Transfer_TransientListBinder.hxx +++ b/src/Transfer/Transfer_TransientListBinder.hxx @@ -26,8 +26,6 @@ #include #include #include -class Standard_TypeMismatch; -class Standard_OutOfRange; class Standard_Transient; diff --git a/src/TransferBRep/TransferBRep.hxx b/src/TransferBRep/TransferBRep.hxx index 9cff48c644..44ea2417ab 100644 --- a/src/TransferBRep/TransferBRep.hxx +++ b/src/TransferBRep/TransferBRep.hxx @@ -39,14 +39,6 @@ class Message_Msg; class TransferBRep_TransferResultInfo; class Interface_CheckIterator; class Interface_InterfaceModel; -class TransferBRep_Reader; -class TransferBRep_ShapeInfo; -class TransferBRep_BinderOfShape; -class TransferBRep_ShapeBinder; -class TransferBRep_ShapeListBinder; -class TransferBRep_ShapeMapper; -class TransferBRep_OrientedShapeMapper; -class TransferBRep_TransferResultInfo; //! This package gathers services to simply read files and convert diff --git a/src/TransferBRep/TransferBRep_BinderOfShape.hxx b/src/TransferBRep/TransferBRep_BinderOfShape.hxx index b009857256..4320b1d5ad 100644 --- a/src/TransferBRep/TransferBRep_BinderOfShape.hxx +++ b/src/TransferBRep/TransferBRep_BinderOfShape.hxx @@ -24,8 +24,6 @@ #include #include #include -class Transfer_TransferFailure; -class TopoDS_Shape; class TransferBRep_BinderOfShape; diff --git a/src/TransferBRep/TransferBRep_Reader.hxx b/src/TransferBRep/TransferBRep_Reader.hxx index 6193b91bc9..214bcc8fb4 100644 --- a/src/TransferBRep/TransferBRep_Reader.hxx +++ b/src/TransferBRep/TransferBRep_Reader.hxx @@ -31,7 +31,6 @@ class Interface_Protocol; class Transfer_ActorOfTransientProcess; class Interface_InterfaceModel; class Transfer_TransientProcess; -class Standard_OutOfRange; class Interface_CheckIterator; class TopoDS_Shape; class Standard_Transient; diff --git a/src/TransferBRep/TransferBRep_ShapeBinder.hxx b/src/TransferBRep/TransferBRep_ShapeBinder.hxx index bdec1e6a59..ccc1f7a78d 100644 --- a/src/TransferBRep/TransferBRep_ShapeBinder.hxx +++ b/src/TransferBRep/TransferBRep_ShapeBinder.hxx @@ -22,7 +22,6 @@ #include #include -class Standard_TypeMismatch; class TopoDS_Shape; class TopoDS_Vertex; class TopoDS_Edge; diff --git a/src/TransferBRep/TransferBRep_ShapeListBinder.hxx b/src/TransferBRep/TransferBRep_ShapeListBinder.hxx index b786e2c295..808cdd5f1b 100644 --- a/src/TransferBRep/TransferBRep_ShapeListBinder.hxx +++ b/src/TransferBRep/TransferBRep_ShapeListBinder.hxx @@ -27,8 +27,6 @@ #include #include #include -class Standard_TypeMismatch; -class Standard_OutOfRange; class TopoDS_Shape; class TopoDS_Vertex; class TopoDS_Edge; diff --git a/src/Units/Units.hxx b/src/Units/Units.hxx index 4e9ac2e78e..4a9ab0427e 100644 --- a/src/Units/Units.hxx +++ b/src/Units/Units.hxx @@ -28,21 +28,6 @@ class Units_UnitsDictionary; class Units_Quantity; class Units_Lexicon; class Units_Dimensions; -class Units_Dimensions; -class Units_Unit; -class Units_ShiftedUnit; -class Units_Token; -class Units_ShiftedToken; -class Units_Quantity; -class Units_UnitsDictionary; -class Units_UnitsSystem; -class Units_Explorer; -class Units_Sentence; -class Units_MathSentence; -class Units_UnitSentence; -class Units_Lexicon; -class Units_UnitsLexicon; -class Units_Measurement; //! This package provides all the facilities to create diff --git a/src/Units/Units_Lexicon.hxx b/src/Units/Units_Lexicon.hxx index 7495e36e08..d05c8c01e6 100644 --- a/src/Units/Units_Lexicon.hxx +++ b/src/Units/Units_Lexicon.hxx @@ -26,8 +26,6 @@ #include #include #include -class TCollection_HAsciiString; -class TCollection_AsciiString; class Units_Lexicon; diff --git a/src/Units/Units_ShiftedToken.hxx b/src/Units/Units_ShiftedToken.hxx index 5f38fbd394..386522dc2b 100644 --- a/src/Units/Units_ShiftedToken.hxx +++ b/src/Units/Units_ShiftedToken.hxx @@ -25,7 +25,6 @@ #include #include class Units_Dimensions; -class Units_Token; class Units_ShiftedToken; diff --git a/src/Units/Units_UnitsDictionary.hxx b/src/Units/Units_UnitsDictionary.hxx index d83d2174d8..0e63966bcc 100644 --- a/src/Units/Units_UnitsDictionary.hxx +++ b/src/Units/Units_UnitsDictionary.hxx @@ -26,7 +26,6 @@ #include #include #include -class TCollection_HAsciiString; class TCollection_AsciiString; class Units_Dimensions; diff --git a/src/Units/Units_UnitsLexicon.hxx b/src/Units/Units_UnitsLexicon.hxx index fefa4576f3..bc84591b6b 100644 --- a/src/Units/Units_UnitsLexicon.hxx +++ b/src/Units/Units_UnitsLexicon.hxx @@ -24,8 +24,6 @@ #include #include #include -class TCollection_HAsciiString; -class TCollection_AsciiString; class Units_UnitsLexicon; diff --git a/src/Units/Units_UnitsSystem.hxx b/src/Units/Units_UnitsSystem.hxx index 6f39995b2a..414a10b367 100644 --- a/src/Units/Units_UnitsSystem.hxx +++ b/src/Units/Units_UnitsSystem.hxx @@ -26,8 +26,6 @@ #include #include #include -class Units_NoSuchUnit; -class Units_NoSuchType; class TCollection_AsciiString; diff --git a/src/V3d/V3d_AmbientLight.hxx b/src/V3d/V3d_AmbientLight.hxx index 8a19d9df20..7fca9c4f80 100644 --- a/src/V3d/V3d_AmbientLight.hxx +++ b/src/V3d/V3d_AmbientLight.hxx @@ -19,7 +19,6 @@ #include -class V3d_Viewer; //! Creation of an ambient light source in a viewer. class V3d_AmbientLight : public Graphic3d_CLight diff --git a/src/V3d/V3d_Viewer.hxx b/src/V3d/V3d_Viewer.hxx index 4e8aa7d8cd..de405d822a 100644 --- a/src/V3d/V3d_Viewer.hxx +++ b/src/V3d/V3d_Viewer.hxx @@ -44,11 +44,9 @@ class Graphic3d_AspectMarker3d; class Graphic3d_GraphicDriver; class Graphic3d_Group; class Graphic3d_Structure; -class V3d_BadValue; class V3d_CircularGrid; class V3d_RectangularGrid; class V3d_View; -class Quantity_Color; //! Defines services on Viewer type objects. //! The methods of this class allow editing and diff --git a/src/ViewerTest/ViewerTest_CmdParser.hxx b/src/ViewerTest/ViewerTest_CmdParser.hxx index 995504b69f..b42e4682be 100644 --- a/src/ViewerTest/ViewerTest_CmdParser.hxx +++ b/src/ViewerTest/ViewerTest_CmdParser.hxx @@ -24,8 +24,6 @@ #include #include -class Quantity_Color; -class Quantity_ColorRGBA; class gp_Vec; class gp_Pnt; diff --git a/src/ViewerTest/ViewerTest_ContinuousRedrawer.hxx b/src/ViewerTest/ViewerTest_ContinuousRedrawer.hxx index 4b2d2b7479..9c8758c02c 100644 --- a/src/ViewerTest/ViewerTest_ContinuousRedrawer.hxx +++ b/src/ViewerTest/ViewerTest_ContinuousRedrawer.hxx @@ -19,7 +19,6 @@ #include #include -class Aspect_Window; class V3d_View; //! Auxiliary tool performing continuous redraws of specified window. diff --git a/src/Vrml/Vrml.hxx b/src/Vrml/Vrml.hxx index 9e450e5cf0..e3a7994a5f 100644 --- a/src/Vrml/Vrml.hxx +++ b/src/Vrml/Vrml.hxx @@ -23,45 +23,6 @@ #include #include -class Vrml_SFImage; -class Vrml_SFRotation; -class Vrml_AsciiText; -class Vrml_Cone; -class Vrml_Cube; -class Vrml_Cylinder; -class Vrml_IndexedFaceSet; -class Vrml_IndexedLineSet; -class Vrml_PointSet; -class Vrml_Sphere; -class Vrml_Coordinate3; -class Vrml_FontStyle; -class Vrml_Info; -class Vrml_LOD; -class Vrml_Material; -class Vrml_MaterialBinding; -class Vrml_Normal; -class Vrml_NormalBinding; -class Vrml_Texture2; -class Vrml_Texture2Transform; -class Vrml_TextureCoordinate2; -class Vrml_ShapeHints; -class Vrml_MatrixTransform; -class Vrml_Rotation; -class Vrml_Scale; -class Vrml_Transform; -class Vrml_Translation; -class Vrml_OrthographicCamera; -class Vrml_PerspectiveCamera; -class Vrml_DirectionalLight; -class Vrml_PointLight; -class Vrml_SpotLight; -class Vrml_Group; -class Vrml_Separator; -class Vrml_Switch; -class Vrml_TransformSeparator; -class Vrml_WWWAnchor; -class Vrml_WWWInline; -class Vrml_Instancing; //! Vrml package implements the specification of the diff --git a/src/Vrml/Vrml_DirectionalLight.hxx b/src/Vrml/Vrml_DirectionalLight.hxx index 54f1b41eb2..ce55977bbb 100644 --- a/src/Vrml/Vrml_DirectionalLight.hxx +++ b/src/Vrml/Vrml_DirectionalLight.hxx @@ -26,8 +26,6 @@ #include #include #include -class Quantity_Color; -class gp_Vec; //! defines a directional light node of VRML specifying diff --git a/src/Vrml/Vrml_Info.hxx b/src/Vrml/Vrml_Info.hxx index 2772bfa261..df8dbc6073 100644 --- a/src/Vrml/Vrml_Info.hxx +++ b/src/Vrml/Vrml_Info.hxx @@ -23,7 +23,6 @@ #include #include -class TCollection_AsciiString; //! defines a Info node of VRML specifying properties of geometry diff --git a/src/Vrml/Vrml_Instancing.hxx b/src/Vrml/Vrml_Instancing.hxx index d9dfb3a029..a554cdeb2e 100644 --- a/src/Vrml/Vrml_Instancing.hxx +++ b/src/Vrml/Vrml_Instancing.hxx @@ -23,7 +23,6 @@ #include #include -class TCollection_AsciiString; //! defines "instancing" - using the same instance of a node diff --git a/src/Vrml/Vrml_LOD.hxx b/src/Vrml/Vrml_LOD.hxx index 8038cc87a3..b73ca294a4 100644 --- a/src/Vrml/Vrml_LOD.hxx +++ b/src/Vrml/Vrml_LOD.hxx @@ -25,7 +25,6 @@ #include #include #include -class gp_Vec; class Vrml_LOD; diff --git a/src/Vrml/Vrml_MatrixTransform.hxx b/src/Vrml/Vrml_MatrixTransform.hxx index f61f568b7c..ea01a2ab08 100644 --- a/src/Vrml/Vrml_MatrixTransform.hxx +++ b/src/Vrml/Vrml_MatrixTransform.hxx @@ -23,7 +23,6 @@ #include #include -class gp_Trsf; //! defines a MatrixTransform node of VRML specifying matrix and transform diff --git a/src/Vrml/Vrml_OrthographicCamera.hxx b/src/Vrml/Vrml_OrthographicCamera.hxx index bb5194bbdd..df9c0f8e71 100644 --- a/src/Vrml/Vrml_OrthographicCamera.hxx +++ b/src/Vrml/Vrml_OrthographicCamera.hxx @@ -25,8 +25,6 @@ #include #include #include -class gp_Vec; -class Vrml_SFRotation; //! specifies a OrthographicCamera node of VRML specifying properties of cameras. diff --git a/src/Vrml/Vrml_PerspectiveCamera.hxx b/src/Vrml/Vrml_PerspectiveCamera.hxx index 0c19bf135c..05c202a35e 100644 --- a/src/Vrml/Vrml_PerspectiveCamera.hxx +++ b/src/Vrml/Vrml_PerspectiveCamera.hxx @@ -25,8 +25,6 @@ #include #include #include -class gp_Vec; -class Vrml_SFRotation; //! specifies a PerspectiveCamera node of VRML specifying properties of cameras. diff --git a/src/Vrml/Vrml_PointLight.hxx b/src/Vrml/Vrml_PointLight.hxx index ea895b83de..b382b848e7 100644 --- a/src/Vrml/Vrml_PointLight.hxx +++ b/src/Vrml/Vrml_PointLight.hxx @@ -26,8 +26,6 @@ #include #include #include -class Quantity_Color; -class gp_Vec; //! defines a point light node of VRML specifying diff --git a/src/Vrml/Vrml_Rotation.hxx b/src/Vrml/Vrml_Rotation.hxx index a19fe91772..6fda2baa18 100644 --- a/src/Vrml/Vrml_Rotation.hxx +++ b/src/Vrml/Vrml_Rotation.hxx @@ -23,7 +23,6 @@ #include #include -class Vrml_SFRotation; //! defines a Rotation node of VRML specifying matrix and transform properties. diff --git a/src/Vrml/Vrml_Scale.hxx b/src/Vrml/Vrml_Scale.hxx index 9d7198113a..0e4a45b812 100644 --- a/src/Vrml/Vrml_Scale.hxx +++ b/src/Vrml/Vrml_Scale.hxx @@ -23,7 +23,6 @@ #include #include -class gp_Vec; //! defines a Scale node of VRML specifying transform diff --git a/src/Vrml/Vrml_SpotLight.hxx b/src/Vrml/Vrml_SpotLight.hxx index 0d9184890c..91ba29de4c 100644 --- a/src/Vrml/Vrml_SpotLight.hxx +++ b/src/Vrml/Vrml_SpotLight.hxx @@ -26,8 +26,6 @@ #include #include #include -class Quantity_Color; -class gp_Vec; //! specifies a spot light node of VRML nodes specifying diff --git a/src/Vrml/Vrml_Texture2.hxx b/src/Vrml/Vrml_Texture2.hxx index f86480c939..dccceba746 100644 --- a/src/Vrml/Vrml_Texture2.hxx +++ b/src/Vrml/Vrml_Texture2.hxx @@ -25,7 +25,6 @@ #include #include class Vrml_SFImage; -class TCollection_AsciiString; //! defines a Texture2 node of VRML specifying properties of geometry diff --git a/src/Vrml/Vrml_Texture2Transform.hxx b/src/Vrml/Vrml_Texture2Transform.hxx index e34176ff90..827a094502 100644 --- a/src/Vrml/Vrml_Texture2Transform.hxx +++ b/src/Vrml/Vrml_Texture2Transform.hxx @@ -24,7 +24,6 @@ #include #include #include -class gp_Vec2d; //! defines a Texture2Transform node of VRML specifying properties of geometry diff --git a/src/Vrml/Vrml_Transform.hxx b/src/Vrml/Vrml_Transform.hxx index 640a44a57d..a5f77c1371 100644 --- a/src/Vrml/Vrml_Transform.hxx +++ b/src/Vrml/Vrml_Transform.hxx @@ -24,8 +24,6 @@ #include #include #include -class gp_Vec; -class Vrml_SFRotation; //! defines a Transform of VRML specifying transform diff --git a/src/Vrml/Vrml_Translation.hxx b/src/Vrml/Vrml_Translation.hxx index ca456c8858..ce8b0bae7c 100644 --- a/src/Vrml/Vrml_Translation.hxx +++ b/src/Vrml/Vrml_Translation.hxx @@ -23,7 +23,6 @@ #include #include -class gp_Vec; //! defines a Translation of VRML specifying transform diff --git a/src/Vrml/Vrml_WWWAnchor.hxx b/src/Vrml/Vrml_WWWAnchor.hxx index e8e6e9bbe8..b4d41a99e8 100644 --- a/src/Vrml/Vrml_WWWAnchor.hxx +++ b/src/Vrml/Vrml_WWWAnchor.hxx @@ -24,7 +24,6 @@ #include #include #include -class TCollection_AsciiString; //! defines a WWWAnchor node of VRML specifying group properties. diff --git a/src/Vrml/Vrml_WWWInline.hxx b/src/Vrml/Vrml_WWWInline.hxx index d88d4c7d97..8d762a69b5 100644 --- a/src/Vrml/Vrml_WWWInline.hxx +++ b/src/Vrml/Vrml_WWWInline.hxx @@ -24,8 +24,6 @@ #include #include #include -class TCollection_AsciiString; -class gp_Vec; //! defines a WWWInline node of VRML specifying group properties. diff --git a/src/VrmlAPI/VrmlAPI.hxx b/src/VrmlAPI/VrmlAPI.hxx index ec12058926..ee977716b6 100644 --- a/src/VrmlAPI/VrmlAPI.hxx +++ b/src/VrmlAPI/VrmlAPI.hxx @@ -23,7 +23,6 @@ #include #include class TopoDS_Shape; -class VrmlAPI_Writer; //! API for writing to VRML 1.0 diff --git a/src/VrmlConverter/VrmlConverter_Projector.hxx b/src/VrmlConverter/VrmlConverter_Projector.hxx index be4eee896b..c62be08606 100644 --- a/src/VrmlConverter/VrmlConverter_Projector.hxx +++ b/src/VrmlConverter/VrmlConverter_Projector.hxx @@ -32,7 +32,6 @@ #include #include #include -class HLRAlgo_Projector; class VrmlConverter_Projector; diff --git a/src/VrmlConverter/VrmlConverter_ShadingAspect.hxx b/src/VrmlConverter/VrmlConverter_ShadingAspect.hxx index 672c0750e0..c76f152606 100644 --- a/src/VrmlConverter/VrmlConverter_ShadingAspect.hxx +++ b/src/VrmlConverter/VrmlConverter_ShadingAspect.hxx @@ -24,7 +24,6 @@ #include #include class Vrml_Material; -class Vrml_ShapeHints; class VrmlConverter_ShadingAspect; diff --git a/src/VrmlData/VrmlData_Node.hxx b/src/VrmlData/VrmlData_Node.hxx index d289d96fd5..ef516a3ca5 100644 --- a/src/VrmlData/VrmlData_Node.hxx +++ b/src/VrmlData/VrmlData_Node.hxx @@ -28,8 +28,6 @@ struct VrmlData_InBuffer; class VrmlData_Scene; -class gp_XY; -class gp_XYZ; class TCollection_AsciiString; /** diff --git a/src/XCAFApp/XCAFApp_Application.hxx b/src/XCAFApp/XCAFApp_Application.hxx index 18522711c6..6f1d3bcc02 100644 --- a/src/XCAFApp/XCAFApp_Application.hxx +++ b/src/XCAFApp/XCAFApp_Application.hxx @@ -22,7 +22,6 @@ #include #include #include -class TDocStd_Document; class XCAFApp_Application; diff --git a/src/XCAFDoc/XCAFDoc.hxx b/src/XCAFDoc/XCAFDoc.hxx index a533ee437b..442c060ac0 100644 --- a/src/XCAFDoc/XCAFDoc.hxx +++ b/src/XCAFDoc/XCAFDoc.hxx @@ -24,27 +24,6 @@ #include class TDF_Attribute; class Standard_GUID; -class XCAFDoc_DocumentTool; -class XCAFDoc_Location; -class XCAFDoc_Color; -class XCAFDoc_DimTol; -class XCAFDoc_Dimension; -class XCAFDoc_GeomTolerance; -class XCAFDoc_Datum; -class XCAFDoc_Material; -class XCAFDoc_Volume; -class XCAFDoc_Area; -class XCAFDoc_Centroid; -class XCAFDoc_ClippingPlaneTool; -class XCAFDoc_ShapeTool; -class XCAFDoc_ShapeMapTool; -class XCAFDoc_ColorTool; -class XCAFDoc_DimTolTool; -class XCAFDoc_LayerTool; -class XCAFDoc_MaterialTool; -class XCAFDoc_GraphNode; -class XCAFDoc_Editor; -class XCAFDoc_ViewTool; //! Definition of general structure of DECAF document diff --git a/src/XCAFDoc/XCAFDoc_Area.hxx b/src/XCAFDoc/XCAFDoc_Area.hxx index c97cea810b..8227e539ab 100644 --- a/src/XCAFDoc/XCAFDoc_Area.hxx +++ b/src/XCAFDoc/XCAFDoc_Area.hxx @@ -25,8 +25,6 @@ #include class Standard_GUID; class TDF_Label; -class TDF_Attribute; -class TDF_RelocationTable; class XCAFDoc_Area; diff --git a/src/XCAFDoc/XCAFDoc_AssemblyItemRef.hxx b/src/XCAFDoc/XCAFDoc_AssemblyItemRef.hxx index 62586bf0b9..2c90f97b16 100644 --- a/src/XCAFDoc/XCAFDoc_AssemblyItemRef.hxx +++ b/src/XCAFDoc/XCAFDoc_AssemblyItemRef.hxx @@ -22,7 +22,6 @@ #include #include -class TDF_Data; class TDF_RelocationTable; class XCAFDoc_AssemblyItemRef; diff --git a/src/XCAFDoc/XCAFDoc_Centroid.hxx b/src/XCAFDoc/XCAFDoc_Centroid.hxx index 90ac9a58e1..b7d522f989 100644 --- a/src/XCAFDoc/XCAFDoc_Centroid.hxx +++ b/src/XCAFDoc/XCAFDoc_Centroid.hxx @@ -25,8 +25,6 @@ #include class Standard_GUID; class TDF_Label; -class gp_Pnt; -class TDF_Attribute; class TDF_RelocationTable; diff --git a/src/XCAFDoc/XCAFDoc_ClippingPlaneTool.hxx b/src/XCAFDoc/XCAFDoc_ClippingPlaneTool.hxx index 81e95c5186..c4d19dfe88 100644 --- a/src/XCAFDoc/XCAFDoc_ClippingPlaneTool.hxx +++ b/src/XCAFDoc/XCAFDoc_ClippingPlaneTool.hxx @@ -17,6 +17,7 @@ #define _XCAFDoc_ClippingPlaneTool_HeaderFile #include +#include #include #include diff --git a/src/XCAFDoc/XCAFDoc_Color.hxx b/src/XCAFDoc/XCAFDoc_Color.hxx index 63af4b7bef..5009b5121c 100644 --- a/src/XCAFDoc/XCAFDoc_Color.hxx +++ b/src/XCAFDoc/XCAFDoc_Color.hxx @@ -27,8 +27,6 @@ class Standard_GUID; class TDF_Label; class Quantity_Color; -class Quantity_ColorRGBA; -class TDF_Attribute; class TDF_RelocationTable; diff --git a/src/XCAFDoc/XCAFDoc_ColorTool.hxx b/src/XCAFDoc/XCAFDoc_ColorTool.hxx index d8486ef96d..b5222d912d 100644 --- a/src/XCAFDoc/XCAFDoc_ColorTool.hxx +++ b/src/XCAFDoc/XCAFDoc_ColorTool.hxx @@ -29,8 +29,6 @@ class Standard_GUID; class Quantity_Color; class Quantity_ColorRGBA; class TopoDS_Shape; -class TDF_Attribute; -class TDF_RelocationTable; class XCAFDoc_ColorTool; diff --git a/src/XCAFDoc/XCAFDoc_Datum.hxx b/src/XCAFDoc/XCAFDoc_Datum.hxx index 1afe973824..544ed0e29a 100644 --- a/src/XCAFDoc/XCAFDoc_Datum.hxx +++ b/src/XCAFDoc/XCAFDoc_Datum.hxx @@ -23,7 +23,6 @@ class TCollection_HAsciiString; class Standard_GUID; class TDF_Label; -class TDF_Attribute; class TDF_RelocationTable; class XCAFDimTolObjects_DatumObject; diff --git a/src/XCAFDoc/XCAFDoc_DimTol.hxx b/src/XCAFDoc/XCAFDoc_DimTol.hxx index 52833582e6..b907284586 100644 --- a/src/XCAFDoc/XCAFDoc_DimTol.hxx +++ b/src/XCAFDoc/XCAFDoc_DimTol.hxx @@ -25,7 +25,6 @@ class TCollection_HAsciiString; class Standard_GUID; class TDF_Label; -class TDF_Attribute; class TDF_RelocationTable; diff --git a/src/XCAFDoc/XCAFDoc_DimTolTool.hxx b/src/XCAFDoc/XCAFDoc_DimTolTool.hxx index e7a1f489f4..d43085c7f4 100644 --- a/src/XCAFDoc/XCAFDoc_DimTolTool.hxx +++ b/src/XCAFDoc/XCAFDoc_DimTolTool.hxx @@ -27,13 +27,12 @@ #include #include #include +#include class XCAFDoc_ShapeTool; class TDF_Label; class Standard_GUID; class TCollection_HAsciiString; -class TDF_Attribute; -class TDF_RelocationTable; class XCAFDoc_DimTolTool; diff --git a/src/XCAFDoc/XCAFDoc_Dimension.hxx b/src/XCAFDoc/XCAFDoc_Dimension.hxx index 36d4875996..51764487f2 100644 --- a/src/XCAFDoc/XCAFDoc_Dimension.hxx +++ b/src/XCAFDoc/XCAFDoc_Dimension.hxx @@ -22,8 +22,6 @@ #include class Standard_GUID; class TDF_Label; -class TDF_Attribute; -class TDF_RelocationTable; class XCAFDimTolObjects_DimensionObject; // resolve name collisions with WinAPI headers diff --git a/src/XCAFDoc/XCAFDoc_DocumentTool.hxx b/src/XCAFDoc/XCAFDoc_DocumentTool.hxx index cc9551364c..6993815937 100644 --- a/src/XCAFDoc/XCAFDoc_DocumentTool.hxx +++ b/src/XCAFDoc/XCAFDoc_DocumentTool.hxx @@ -35,8 +35,6 @@ class XCAFDoc_MaterialTool; class XCAFDoc_NotesTool; class XCAFDoc_ViewTool; class XCAFDoc_VisMaterialTool; -class TDF_Attribute; -class TDF_RelocationTable; class XCAFDoc_DocumentTool; diff --git a/src/XCAFDoc/XCAFDoc_GeomTolerance.hxx b/src/XCAFDoc/XCAFDoc_GeomTolerance.hxx index 0a000efe7a..bf3129c0c6 100644 --- a/src/XCAFDoc/XCAFDoc_GeomTolerance.hxx +++ b/src/XCAFDoc/XCAFDoc_GeomTolerance.hxx @@ -22,8 +22,6 @@ #include class Standard_GUID; class TDF_Label; -class TDF_Attribute; -class TDF_RelocationTable; class XCAFDimTolObjects_GeomToleranceObject; // resolve name collisions with WinAPI headers diff --git a/src/XCAFDoc/XCAFDoc_GraphNode.hxx b/src/XCAFDoc/XCAFDoc_GraphNode.hxx index f0be0868e7..ca21030adf 100644 --- a/src/XCAFDoc/XCAFDoc_GraphNode.hxx +++ b/src/XCAFDoc/XCAFDoc_GraphNode.hxx @@ -26,8 +26,6 @@ #include #include class TDF_Label; -class Standard_GUID; -class TDF_Attribute; class TDF_RelocationTable; class TDF_DataSet; diff --git a/src/XCAFDoc/XCAFDoc_LayerTool.hxx b/src/XCAFDoc/XCAFDoc_LayerTool.hxx index 32e868cab5..8b7235d4a3 100644 --- a/src/XCAFDoc/XCAFDoc_LayerTool.hxx +++ b/src/XCAFDoc/XCAFDoc_LayerTool.hxx @@ -28,8 +28,6 @@ class TDF_Label; class Standard_GUID; class TCollection_ExtendedString; class TopoDS_Shape; -class TDF_Attribute; -class TDF_RelocationTable; class XCAFDoc_LayerTool; diff --git a/src/XCAFDoc/XCAFDoc_LengthUnit.hxx b/src/XCAFDoc/XCAFDoc_LengthUnit.hxx index 17e612ce02..4eb82ac6d5 100644 --- a/src/XCAFDoc/XCAFDoc_LengthUnit.hxx +++ b/src/XCAFDoc/XCAFDoc_LengthUnit.hxx @@ -25,8 +25,6 @@ #include class TDF_Label; -class TCollection_AsciiString; -class TDF_Attribute; class TDF_RelocationTable; diff --git a/src/XCAFDoc/XCAFDoc_Location.hxx b/src/XCAFDoc/XCAFDoc_Location.hxx index 60497f1d56..be49b6ea85 100644 --- a/src/XCAFDoc/XCAFDoc_Location.hxx +++ b/src/XCAFDoc/XCAFDoc_Location.hxx @@ -23,8 +23,6 @@ #include class Standard_GUID; class TDF_Label; -class TopLoc_Location; -class TDF_Attribute; class TDF_RelocationTable; diff --git a/src/XCAFDoc/XCAFDoc_Material.hxx b/src/XCAFDoc/XCAFDoc_Material.hxx index 936f38600a..d17fd092a4 100644 --- a/src/XCAFDoc/XCAFDoc_Material.hxx +++ b/src/XCAFDoc/XCAFDoc_Material.hxx @@ -24,7 +24,6 @@ class TCollection_HAsciiString; class Standard_GUID; class TDF_Label; -class TDF_Attribute; class TDF_RelocationTable; diff --git a/src/XCAFDoc/XCAFDoc_MaterialTool.hxx b/src/XCAFDoc/XCAFDoc_MaterialTool.hxx index f283d7c300..d9e12b9aff 100644 --- a/src/XCAFDoc/XCAFDoc_MaterialTool.hxx +++ b/src/XCAFDoc/XCAFDoc_MaterialTool.hxx @@ -27,8 +27,6 @@ class XCAFDoc_ShapeTool; class TDF_Label; class Standard_GUID; class TCollection_HAsciiString; -class TDF_Attribute; -class TDF_RelocationTable; class XCAFDoc_MaterialTool; diff --git a/src/XCAFDoc/XCAFDoc_Note.hxx b/src/XCAFDoc/XCAFDoc_Note.hxx index a48c99cf77..d488d64bb1 100644 --- a/src/XCAFDoc/XCAFDoc_Note.hxx +++ b/src/XCAFDoc/XCAFDoc_Note.hxx @@ -22,7 +22,6 @@ #include #include -class Standard_GUID; class TDF_RelocationTable; //! A base note attribute. diff --git a/src/XCAFDoc/XCAFDoc_NotesTool.hxx b/src/XCAFDoc/XCAFDoc_NotesTool.hxx index 77a03834a1..6f56721c2b 100644 --- a/src/XCAFDoc/XCAFDoc_NotesTool.hxx +++ b/src/XCAFDoc/XCAFDoc_NotesTool.hxx @@ -24,7 +24,6 @@ class Standard_GUID; class TCollection_AsciiString; class TCollection_ExtendedString; #include -class TDF_RelocationTable; class XCAFDoc_Note; class XCAFDoc_AssemblyItemId; class XCAFDoc_AssemblyItemRef; diff --git a/src/XCAFDoc/XCAFDoc_ShapeMapTool.hxx b/src/XCAFDoc/XCAFDoc_ShapeMapTool.hxx index 72fdee8057..cd559ded77 100644 --- a/src/XCAFDoc/XCAFDoc_ShapeMapTool.hxx +++ b/src/XCAFDoc/XCAFDoc_ShapeMapTool.hxx @@ -25,7 +25,6 @@ class Standard_GUID; class TDF_Label; class TopoDS_Shape; -class TDF_Attribute; class TDF_RelocationTable; diff --git a/src/XCAFDoc/XCAFDoc_ShapeTool.hxx b/src/XCAFDoc/XCAFDoc_ShapeTool.hxx index b20cc35547..281641efcb 100644 --- a/src/XCAFDoc/XCAFDoc_ShapeTool.hxx +++ b/src/XCAFDoc/XCAFDoc_ShapeTool.hxx @@ -34,8 +34,6 @@ class Standard_GUID; class TDF_Label; class TopoDS_Shape; class TopLoc_Location; -class TDF_Attribute; -class TDF_RelocationTable; class XCAFDoc_GraphNode; diff --git a/src/XCAFDoc/XCAFDoc_View.hxx b/src/XCAFDoc/XCAFDoc_View.hxx index ca2aad912a..f8a4cda182 100644 --- a/src/XCAFDoc/XCAFDoc_View.hxx +++ b/src/XCAFDoc/XCAFDoc_View.hxx @@ -22,8 +22,6 @@ #include class Standard_GUID; class TDF_Label; -class TDF_Attribute; -class TDF_RelocationTable; class XCAFView_Object; // resolve name collisions with WinAPI headers diff --git a/src/XCAFDoc/XCAFDoc_ViewTool.hxx b/src/XCAFDoc/XCAFDoc_ViewTool.hxx index 61908e5791..f28ffbeffa 100644 --- a/src/XCAFDoc/XCAFDoc_ViewTool.hxx +++ b/src/XCAFDoc/XCAFDoc_ViewTool.hxx @@ -24,11 +24,8 @@ #include #include -class XCAFDoc_ShapeTool; -class XCAFDoc_DimTolTool; class TDF_Label; class Standard_GUID; -class TDF_Attribute; class XCAFDoc_ViewTool; diff --git a/src/XCAFDoc/XCAFDoc_VisMaterial.hxx b/src/XCAFDoc/XCAFDoc_VisMaterial.hxx index 92456cf631..cd3e2755f3 100644 --- a/src/XCAFDoc/XCAFDoc_VisMaterial.hxx +++ b/src/XCAFDoc/XCAFDoc_VisMaterial.hxx @@ -16,6 +16,7 @@ #include #include +#include #include #include #include diff --git a/src/XCAFDoc/XCAFDoc_VisMaterialTool.hxx b/src/XCAFDoc/XCAFDoc_VisMaterialTool.hxx index 2ab97132f0..bd88971cc3 100644 --- a/src/XCAFDoc/XCAFDoc_VisMaterialTool.hxx +++ b/src/XCAFDoc/XCAFDoc_VisMaterialTool.hxx @@ -19,7 +19,6 @@ #include class TopoDS_Shape; -class Quantity_ColorRGBA; class XCAFDoc_ShapeTool; class XCAFDoc_VisMaterial; diff --git a/src/XCAFDoc/XCAFDoc_Volume.hxx b/src/XCAFDoc/XCAFDoc_Volume.hxx index d98ea0e3c0..feaab230bd 100644 --- a/src/XCAFDoc/XCAFDoc_Volume.hxx +++ b/src/XCAFDoc/XCAFDoc_Volume.hxx @@ -24,8 +24,6 @@ #include class Standard_GUID; class TDF_Label; -class TDF_Attribute; -class TDF_RelocationTable; class XCAFDoc_Volume; diff --git a/src/XCAFPrs/XCAFPrs.hxx b/src/XCAFPrs/XCAFPrs.hxx index e349689193..b416fa2381 100644 --- a/src/XCAFPrs/XCAFPrs.hxx +++ b/src/XCAFPrs/XCAFPrs.hxx @@ -24,8 +24,6 @@ #include class TDF_Label; class TopLoc_Location; -class XCAFPrs_Driver; -class XCAFPrs_Style; //! Presentation (visualiation, selection etc.) tools for diff --git a/src/XCAFPrs/XCAFPrs_DocumentExplorer.hxx b/src/XCAFPrs/XCAFPrs_DocumentExplorer.hxx index fca18f4dd1..c5afb8a823 100644 --- a/src/XCAFPrs/XCAFPrs_DocumentExplorer.hxx +++ b/src/XCAFPrs/XCAFPrs_DocumentExplorer.hxx @@ -22,7 +22,6 @@ #include class TDocStd_Document; -class XCAFDoc_ShapeTool; class XCAFDoc_ColorTool; class XCAFDoc_VisMaterialTool; diff --git a/src/XDEDRAW/XDEDRAW.hxx b/src/XDEDRAW/XDEDRAW.hxx index 253ee54a24..0eb76f7ec4 100644 --- a/src/XDEDRAW/XDEDRAW.hxx +++ b/src/XDEDRAW/XDEDRAW.hxx @@ -21,13 +21,6 @@ #include #include -class XDEDRAW_Shapes; -class XDEDRAW_GDTs; -class XDEDRAW_Colors; -class XDEDRAW_Layers; -class XDEDRAW_Props; -class XDEDRAW_Common; -class XDEDRAW_Views; //! Provides DRAW commands for work with DECAF data structures diff --git a/src/XSAlgo/XSAlgo.hxx b/src/XSAlgo/XSAlgo.hxx index 62ce731c25..ea29c2db24 100644 --- a/src/XSAlgo/XSAlgo.hxx +++ b/src/XSAlgo/XSAlgo.hxx @@ -21,8 +21,6 @@ #include class XSAlgo_AlgoContainer; -class XSAlgo_ToolContainer; -class XSAlgo_AlgoContainer; diff --git a/src/XSAlgo/XSAlgo_AlgoContainer.hxx b/src/XSAlgo/XSAlgo_AlgoContainer.hxx index 314b2b2a7e..c83dbae22f 100644 --- a/src/XSAlgo/XSAlgo_AlgoContainer.hxx +++ b/src/XSAlgo/XSAlgo_AlgoContainer.hxx @@ -28,7 +28,6 @@ class XSAlgo_ToolContainer; class TopoDS_Shape; -class Standard_Transient; class TopoDS_Edge; class TopoDS_Face; class Transfer_TransientProcess; diff --git a/src/XSControl/XSControl.hxx b/src/XSControl/XSControl.hxx index c3fc14187a..67df55c8b8 100644 --- a/src/XSControl/XSControl.hxx +++ b/src/XSControl/XSControl.hxx @@ -24,19 +24,6 @@ class XSControl_WorkSession; class IFSelect_SessionPilot; class XSControl_Vars; -class XSControl_Controller; -class XSControl_TransferReader; -class XSControl_TransferWriter; -class XSControl_WorkSession; -class XSControl_SelectForTransfer; -class XSControl_SignTransferStatus; -class XSControl_ConnectedShapes; -class XSControl_Reader; -class XSControl_Writer; -class XSControl_Functions; -class XSControl_FuncShape; -class XSControl_Utils; -class XSControl_Vars; //! This package provides complements to IFSelect & Co for diff --git a/src/XSControl/XSControl_Controller.hxx b/src/XSControl/XSControl_Controller.hxx index 7db5fcc974..6d6172337a 100644 --- a/src/XSControl/XSControl_Controller.hxx +++ b/src/XSControl/XSControl_Controller.hxx @@ -35,15 +35,12 @@ class IFSelect_WorkLibrary; class Interface_Protocol; -class IFSelect_Signature; class Transfer_ActorOfTransientProcess; class Transfer_ActorOfFinderProcess; -class Standard_DomainError; class XSControl_WorkSession; class Interface_InterfaceModel; class Transfer_FinderProcess; class TopoDS_Shape; -class Interface_CheckIterator; class XSControl_Controller; DEFINE_STANDARD_HANDLE(XSControl_Controller, Standard_Transient) diff --git a/src/XSControl/XSControl_TransferReader.hxx b/src/XSControl/XSControl_TransferReader.hxx index 4ccf1f91be..9cebdeb5d1 100644 --- a/src/XSControl/XSControl_TransferReader.hxx +++ b/src/XSControl/XSControl_TransferReader.hxx @@ -33,7 +33,6 @@ class Interface_InterfaceModel; class Interface_HGraph; class Transfer_ActorOfTransientProcess; class Transfer_TransientProcess; -class Standard_Transient; class Transfer_ResultFromModel; class TopoDS_Shape; class Interface_CheckIterator; diff --git a/src/XSControl/XSControl_TransferWriter.hxx b/src/XSControl/XSControl_TransferWriter.hxx index 56cccb3b9f..ba1394e112 100644 --- a/src/XSControl/XSControl_TransferWriter.hxx +++ b/src/XSControl/XSControl_TransferWriter.hxx @@ -24,7 +24,6 @@ #include #include class XSControl_Controller; -class Standard_Transient; class Interface_InterfaceModel; class TopoDS_Shape; class Interface_CheckIterator; diff --git a/src/XSControl/XSControl_Utils.hxx b/src/XSControl/XSControl_Utils.hxx index 82626dd859..ca461c473c 100644 --- a/src/XSControl/XSControl_Utils.hxx +++ b/src/XSControl/XSControl_Utils.hxx @@ -32,7 +32,6 @@ #include #include #include -class Standard_TypeMismatch; class Standard_Transient; class TCollection_HAsciiString; class TCollection_AsciiString; diff --git a/src/XSControl/XSControl_WorkSession.hxx b/src/XSControl/XSControl_WorkSession.hxx index 0bdf5d5e71..c94fe0bdf8 100644 --- a/src/XSControl/XSControl_WorkSession.hxx +++ b/src/XSControl/XSControl_WorkSession.hxx @@ -26,9 +26,7 @@ class XSControl_Controller; class XSControl_TransferReader; class XSControl_Vars; -class Message_Messenger; class Transfer_TransientProcess; -class Standard_Transient; class Interface_InterfaceModel; class Transfer_FinderProcess; class TopoDS_Shape; diff --git a/src/XSDRAW/XSDRAW.hxx b/src/XSDRAW/XSDRAW.hxx index 956b428785..70da6cbb7b 100644 --- a/src/XSDRAW/XSDRAW.hxx +++ b/src/XSDRAW/XSDRAW.hxx @@ -33,8 +33,6 @@ class Transfer_TransientProcess; class Transfer_FinderProcess; class XSControl_TransferReader; class TCollection_AsciiString; -class XSDRAW_Functions; -class XSDRAW_Vars; //! Basic package to work functions of X-STEP (IFSelect & Co) diff --git a/src/XSDRAWSTLVRML/XSDRAWSTLVRML.hxx b/src/XSDRAWSTLVRML/XSDRAWSTLVRML.hxx index 53099d9ee1..21388296fc 100644 --- a/src/XSDRAWSTLVRML/XSDRAWSTLVRML.hxx +++ b/src/XSDRAWSTLVRML/XSDRAWSTLVRML.hxx @@ -21,9 +21,6 @@ #include #include -class XSDRAWSTLVRML_DataSource; -class XSDRAWSTLVRML_DataSource3D; -class XSDRAWSTLVRML_DrawableMesh; diff --git a/src/XmlDrivers/XmlDrivers.hxx b/src/XmlDrivers/XmlDrivers.hxx index f5d998326d..05b4dc5da1 100644 --- a/src/XmlDrivers/XmlDrivers.hxx +++ b/src/XmlDrivers/XmlDrivers.hxx @@ -22,8 +22,6 @@ class Standard_Transient; class Standard_GUID; class XmlMDF_ADriverTable; class Message_Messenger; -class XmlDrivers_DocumentStorageDriver; -class XmlDrivers_DocumentRetrievalDriver; class TDocStd_Application; class XmlDrivers diff --git a/src/XmlLDrivers/XmlLDrivers.hxx b/src/XmlLDrivers/XmlLDrivers.hxx index 72c1dcc0ae..bf38e769e0 100644 --- a/src/XmlLDrivers/XmlLDrivers.hxx +++ b/src/XmlLDrivers/XmlLDrivers.hxx @@ -23,9 +23,6 @@ class Standard_GUID; class TCollection_AsciiString; class XmlMDF_ADriverTable; class Message_Messenger; -class XmlLDrivers_DocumentStorageDriver; -class XmlLDrivers_DocumentRetrievalDriver; -class XmlLDrivers_NamespaceDef; class TDocStd_Application; class XmlLDrivers diff --git a/src/XmlLDrivers/XmlLDrivers_DocumentRetrievalDriver.hxx b/src/XmlLDrivers/XmlLDrivers_DocumentRetrievalDriver.hxx index 5e2edc9f1a..429cc8d3e8 100644 --- a/src/XmlLDrivers/XmlLDrivers_DocumentRetrievalDriver.hxx +++ b/src/XmlLDrivers/XmlLDrivers_DocumentRetrievalDriver.hxx @@ -27,8 +27,6 @@ #include #include class XmlMDF_ADriverTable; -class TCollection_ExtendedString; -class PCDM_Document; class CDM_Document; class CDM_Application; class Message_Messenger; diff --git a/src/XmlLDrivers/XmlLDrivers_DocumentStorageDriver.hxx b/src/XmlLDrivers/XmlLDrivers_DocumentStorageDriver.hxx index 944ac31305..b62c16e204 100644 --- a/src/XmlLDrivers/XmlLDrivers_DocumentStorageDriver.hxx +++ b/src/XmlLDrivers/XmlLDrivers_DocumentStorageDriver.hxx @@ -29,7 +29,6 @@ #include class XmlMDF_ADriverTable; -class TCollection_ExtendedString; class CDM_Document; class TCollection_AsciiString; class Message_Messenger; diff --git a/src/XmlLDrivers/XmlLDrivers_NamespaceDef.hxx b/src/XmlLDrivers/XmlLDrivers_NamespaceDef.hxx index d554f8e044..a863275015 100644 --- a/src/XmlLDrivers/XmlLDrivers_NamespaceDef.hxx +++ b/src/XmlLDrivers/XmlLDrivers_NamespaceDef.hxx @@ -21,7 +21,6 @@ #include #include -class TCollection_AsciiString; diff --git a/src/XmlMDF/XmlMDF.hxx b/src/XmlMDF/XmlMDF.hxx index b3c8c58b82..10c8f59d51 100644 --- a/src/XmlMDF/XmlMDF.hxx +++ b/src/XmlMDF/XmlMDF.hxx @@ -33,10 +33,6 @@ class TDF_Data; class XmlMDF_ADriverTable; class TDF_Label; class Message_Messenger; -class XmlMDF_ADriver; -class XmlMDF_TagSourceDriver; -class XmlMDF_ReferenceDriver; -class XmlMDF_ADriverTable; //! This package provides classes and methods to diff --git a/src/XmlMDF/XmlMDF_ADriver.hxx b/src/XmlMDF/XmlMDF_ADriver.hxx index c19475ce51..4b8120a008 100644 --- a/src/XmlMDF/XmlMDF_ADriver.hxx +++ b/src/XmlMDF/XmlMDF_ADriver.hxx @@ -29,9 +29,7 @@ #include class Message_Messenger; class TDF_Attribute; -class TCollection_AsciiString; class XmlObjMgt_Persistent; -class TCollection_ExtendedString; class XmlMDF_ADriver; diff --git a/src/XmlMDataStd/XmlMDataStd.hxx b/src/XmlMDataStd/XmlMDataStd.hxx index a2dac42313..5ce3539d4f 100644 --- a/src/XmlMDataStd/XmlMDataStd.hxx +++ b/src/XmlMDataStd/XmlMDataStd.hxx @@ -21,29 +21,6 @@ #include class XmlMDF_ADriverTable; class Message_Messenger; -class XmlMDataStd_GenericExtStringDriver; -class XmlMDataStd_IntegerDriver; -class XmlMDataStd_RealDriver; -class XmlMDataStd_IntegerArrayDriver; -class XmlMDataStd_RealArrayDriver; -class XmlMDataStd_ExtStringArrayDriver; -class XmlMDataStd_UAttributeDriver; -class XmlMDataStd_VariableDriver; -class XmlMDataStd_ExpressionDriver; -class XmlMDataStd_RelationDriver; -class XmlMDataStd_TreeNodeDriver; -class XmlMDataStd_GenericEmptyDriver; -class XmlMDataStd_IntegerListDriver; -class XmlMDataStd_RealListDriver; -class XmlMDataStd_ExtStringListDriver; -class XmlMDataStd_BooleanListDriver; -class XmlMDataStd_ReferenceListDriver; -class XmlMDataStd_BooleanArrayDriver; -class XmlMDataStd_ReferenceArrayDriver; -class XmlMDataStd_ByteArrayDriver; -class XmlMDataStd_NamedDataDriver; -class XmlMDataStd_AsciiStringDriver; -class XmlMDataStd_IntPackedMapDriver; //! Storage and Retrieval drivers for modelling attributes. diff --git a/src/XmlMDataStd/XmlMDataStd_GenericExtStringDriver.hxx b/src/XmlMDataStd/XmlMDataStd_GenericExtStringDriver.hxx index 8e42709b20..d1afb7b6e7 100644 --- a/src/XmlMDataStd/XmlMDataStd_GenericExtStringDriver.hxx +++ b/src/XmlMDataStd/XmlMDataStd_GenericExtStringDriver.hxx @@ -26,7 +26,6 @@ class TDF_Attribute; class XmlObjMgt_Persistent; -class XmlMDataStd_NameDriver; DEFINE_STANDARD_HANDLE(XmlMDataStd_GenericExtStringDriver, XmlMDF_ADriver) //! Attribute Driver. diff --git a/src/XmlMDataXtd/XmlMDataXtd.hxx b/src/XmlMDataXtd/XmlMDataXtd.hxx index e7b0734785..2c6b3a7128 100644 --- a/src/XmlMDataXtd/XmlMDataXtd.hxx +++ b/src/XmlMDataXtd/XmlMDataXtd.hxx @@ -21,10 +21,6 @@ #include class XmlMDF_ADriverTable; class Message_Messenger; -class XmlMDataXtd_GeometryDriver; -class XmlMDataXtd_ConstraintDriver; -class XmlMDataXtd_PatternStdDriver; -class XmlMDataXtd_TriangulationDriver; //! Storage and Retrieval drivers for modelling attributes. //! Transient attributes are defined in package TDataXtd. diff --git a/src/XmlMDocStd/XmlMDocStd.hxx b/src/XmlMDocStd/XmlMDocStd.hxx index da4c95d4f2..46eb4a0575 100644 --- a/src/XmlMDocStd/XmlMDocStd.hxx +++ b/src/XmlMDocStd/XmlMDocStd.hxx @@ -22,7 +22,6 @@ class XmlMDF_ADriverTable; class Message_Messenger; -class XmlMDocStd_XLinkDriver; //! Driver for TDocStd_XLink diff --git a/src/XmlMFunction/XmlMFunction.hxx b/src/XmlMFunction/XmlMFunction.hxx index 3d132054be..594e122af9 100644 --- a/src/XmlMFunction/XmlMFunction.hxx +++ b/src/XmlMFunction/XmlMFunction.hxx @@ -22,9 +22,6 @@ class XmlMDF_ADriverTable; class Message_Messenger; -class XmlMFunction_FunctionDriver; -class XmlMFunction_ScopeDriver; -class XmlMFunction_GraphNodeDriver; diff --git a/src/XmlMNaming/XmlMNaming.hxx b/src/XmlMNaming/XmlMNaming.hxx index 2f697ab390..41b574e23d 100644 --- a/src/XmlMNaming/XmlMNaming.hxx +++ b/src/XmlMNaming/XmlMNaming.hxx @@ -23,9 +23,6 @@ #include class XmlMDF_ADriverTable; class Message_Messenger; -class XmlMNaming_NamedShapeDriver; -class XmlMNaming_NamingDriver; -class XmlMNaming_Shape1; diff --git a/src/XmlMXCAFDoc/XmlMXCAFDoc.hxx b/src/XmlMXCAFDoc/XmlMXCAFDoc.hxx index 7da0f4edec..66f73c07e9 100644 --- a/src/XmlMXCAFDoc/XmlMXCAFDoc.hxx +++ b/src/XmlMXCAFDoc/XmlMXCAFDoc.hxx @@ -22,17 +22,6 @@ class XmlMDF_ADriverTable; class Message_Messenger; -class XmlMXCAFDoc_CentroidDriver; -class XmlMXCAFDoc_ColorDriver; -class XmlMXCAFDoc_GraphNodeDriver; -class XmlMXCAFDoc_LengthUnitDriver; -class XmlMXCAFDoc_LocationDriver; -class XmlMXCAFDoc_DatumDriver; -class XmlMXCAFDoc_DimTolDriver; -class XmlMXCAFDoc_MaterialDriver; -class XmlMXCAFDoc_NoteDriver; -class XmlMXCAFDoc_NoteCommentDriver; -class XmlMXCAFDoc_NoteBinDataDriver; //! Storage and Retrieval drivers for modelling attributes. diff --git a/src/XmlObjMgt/XmlObjMgt.hxx b/src/XmlObjMgt/XmlObjMgt.hxx index ae8924bbe9..218653f18d 100644 --- a/src/XmlObjMgt/XmlObjMgt.hxx +++ b/src/XmlObjMgt/XmlObjMgt.hxx @@ -28,9 +28,6 @@ #include class TCollection_ExtendedString; class TCollection_AsciiString; -class XmlObjMgt_Persistent; -class XmlObjMgt_GP; -class XmlObjMgt_Array1; //! This package defines services to manage the storage diff --git a/src/XmlXCAFDrivers/XmlXCAFDrivers.hxx b/src/XmlXCAFDrivers/XmlXCAFDrivers.hxx index 75c1110c41..06a05ec038 100644 --- a/src/XmlXCAFDrivers/XmlXCAFDrivers.hxx +++ b/src/XmlXCAFDrivers/XmlXCAFDrivers.hxx @@ -20,8 +20,6 @@ class Standard_Transient; class Standard_GUID; -class XmlXCAFDrivers_DocumentRetrievalDriver; -class XmlXCAFDrivers_DocumentStorageDriver; class TDocStd_Application; class XmlXCAFDrivers diff --git a/src/Xw/Xw_Window.hxx b/src/Xw/Xw_Window.hxx index 49b6440d5a..1df71351a2 100644 --- a/src/Xw/Xw_Window.hxx +++ b/src/Xw/Xw_Window.hxx @@ -22,12 +22,7 @@ #include class Aspect_DisplayConnection; -class Aspect_WindowDefinitionError; -class Aspect_WindowError; class Aspect_WindowInputListener; -class Aspect_Background; -class Quantity_Color; -class Aspect_GradientBackground; typedef union _XEvent XEvent; diff --git a/src/gce/gce_MakeCirc.hxx b/src/gce/gce_MakeCirc.hxx index 00b48a0649..f679deaab6 100644 --- a/src/gce/gce_MakeCirc.hxx +++ b/src/gce/gce_MakeCirc.hxx @@ -24,9 +24,7 @@ #include #include #include -class StdFail_NotDone; class gp_Ax2; -class gp_Circ; class gp_Pnt; class gp_Dir; class gp_Pln; diff --git a/src/gce/gce_MakeCirc2d.hxx b/src/gce/gce_MakeCirc2d.hxx index 6f0b8e2327..c3d9649309 100644 --- a/src/gce/gce_MakeCirc2d.hxx +++ b/src/gce/gce_MakeCirc2d.hxx @@ -25,10 +25,8 @@ #include #include #include -class StdFail_NotDone; class gp_Ax2d; class gp_Ax22d; -class gp_Circ2d; class gp_Pnt2d; diff --git a/src/gce/gce_MakeCone.hxx b/src/gce/gce_MakeCone.hxx index b0c246a12b..f4fe0d18d3 100644 --- a/src/gce/gce_MakeCone.hxx +++ b/src/gce/gce_MakeCone.hxx @@ -24,9 +24,7 @@ #include #include #include -class StdFail_NotDone; class gp_Ax2; -class gp_Cone; class gp_Pnt; class gp_Ax1; class gp_Lin; diff --git a/src/gce/gce_MakeCylinder.hxx b/src/gce/gce_MakeCylinder.hxx index a66170c470..4fcfb65494 100644 --- a/src/gce/gce_MakeCylinder.hxx +++ b/src/gce/gce_MakeCylinder.hxx @@ -24,9 +24,7 @@ #include #include #include -class StdFail_NotDone; class gp_Ax2; -class gp_Cylinder; class gp_Pnt; class gp_Ax1; class gp_Circ; diff --git a/src/gce/gce_MakeDir.hxx b/src/gce/gce_MakeDir.hxx index 4cd400671e..a90b37879e 100644 --- a/src/gce/gce_MakeDir.hxx +++ b/src/gce/gce_MakeDir.hxx @@ -24,11 +24,9 @@ #include #include #include -class StdFail_NotDone; class gp_Vec; class gp_XYZ; class gp_Pnt; -class gp_Dir; //! This class implements the following algorithms used diff --git a/src/gce/gce_MakeDir2d.hxx b/src/gce/gce_MakeDir2d.hxx index 232fc829f0..577b90910e 100644 --- a/src/gce/gce_MakeDir2d.hxx +++ b/src/gce/gce_MakeDir2d.hxx @@ -24,11 +24,9 @@ #include #include #include -class StdFail_NotDone; class gp_Vec2d; class gp_XY; class gp_Pnt2d; -class gp_Dir2d; //! This class implements the following algorithms used diff --git a/src/gce/gce_MakeElips.hxx b/src/gce/gce_MakeElips.hxx index 0e7ba4f30d..a7fa27a8bf 100644 --- a/src/gce/gce_MakeElips.hxx +++ b/src/gce/gce_MakeElips.hxx @@ -24,10 +24,8 @@ #include #include #include -class StdFail_NotDone; class gp_Ax2; class gp_Pnt; -class gp_Elips; //! This class implements the following algorithms used to diff --git a/src/gce/gce_MakeElips2d.hxx b/src/gce/gce_MakeElips2d.hxx index e107bbb1db..27248b780f 100644 --- a/src/gce/gce_MakeElips2d.hxx +++ b/src/gce/gce_MakeElips2d.hxx @@ -25,11 +25,9 @@ #include #include #include -class StdFail_NotDone; class gp_Ax2d; class gp_Ax22d; class gp_Pnt2d; -class gp_Elips2d; //! This class implements the following algorithms used to diff --git a/src/gce/gce_MakeHypr.hxx b/src/gce/gce_MakeHypr.hxx index 966d1dc093..fa4676eb15 100644 --- a/src/gce/gce_MakeHypr.hxx +++ b/src/gce/gce_MakeHypr.hxx @@ -24,10 +24,8 @@ #include #include #include -class StdFail_NotDone; class gp_Ax2; class gp_Pnt; -class gp_Hypr; //! This class implements the following algorithms used to diff --git a/src/gce/gce_MakeHypr2d.hxx b/src/gce/gce_MakeHypr2d.hxx index f63f715286..b9e57e89d7 100644 --- a/src/gce/gce_MakeHypr2d.hxx +++ b/src/gce/gce_MakeHypr2d.hxx @@ -25,11 +25,9 @@ #include #include #include -class StdFail_NotDone; class gp_Pnt2d; class gp_Ax2d; class gp_Ax22d; -class gp_Hypr2d; //! This class implements the following algorithms used to diff --git a/src/gce/gce_MakeLin.hxx b/src/gce/gce_MakeLin.hxx index 7408d78c25..de6b06560a 100644 --- a/src/gce/gce_MakeLin.hxx +++ b/src/gce/gce_MakeLin.hxx @@ -23,11 +23,9 @@ #include #include -class StdFail_NotDone; class gp_Ax1; class gp_Pnt; class gp_Dir; -class gp_Lin; //! This class implements the following algorithms used diff --git a/src/gce/gce_MakeLin2d.hxx b/src/gce/gce_MakeLin2d.hxx index b49cf5d1c2..725f5323a7 100644 --- a/src/gce/gce_MakeLin2d.hxx +++ b/src/gce/gce_MakeLin2d.hxx @@ -24,11 +24,9 @@ #include #include #include -class StdFail_NotDone; class gp_Ax2d; class gp_Pnt2d; class gp_Dir2d; -class gp_Lin2d; //! This class implements the following algorithms used diff --git a/src/gce/gce_MakeMirror.hxx b/src/gce/gce_MakeMirror.hxx index 19d9bf81fa..b1fcd2909e 100644 --- a/src/gce/gce_MakeMirror.hxx +++ b/src/gce/gce_MakeMirror.hxx @@ -28,7 +28,6 @@ class gp_Lin; class gp_Dir; class gp_Pln; class gp_Ax2; -class gp_Trsf; //! This class mplements elementary construction algorithms for a diff --git a/src/gce/gce_MakeMirror2d.hxx b/src/gce/gce_MakeMirror2d.hxx index 36ca006550..1b6b8407b4 100644 --- a/src/gce/gce_MakeMirror2d.hxx +++ b/src/gce/gce_MakeMirror2d.hxx @@ -26,7 +26,6 @@ class gp_Pnt2d; class gp_Ax2d; class gp_Lin2d; class gp_Dir2d; -class gp_Trsf2d; //! This class implements elementary construction algorithms for a diff --git a/src/gce/gce_MakeParab.hxx b/src/gce/gce_MakeParab.hxx index aee0f0b695..3ddddb5783 100644 --- a/src/gce/gce_MakeParab.hxx +++ b/src/gce/gce_MakeParab.hxx @@ -24,11 +24,9 @@ #include #include #include -class StdFail_NotDone; class gp_Ax2; class gp_Ax1; class gp_Pnt; -class gp_Parab; //! This class implements the following algorithms used to diff --git a/src/gce/gce_MakeParab2d.hxx b/src/gce/gce_MakeParab2d.hxx index edc2e81cc5..662ccc8bf8 100644 --- a/src/gce/gce_MakeParab2d.hxx +++ b/src/gce/gce_MakeParab2d.hxx @@ -25,11 +25,9 @@ #include #include #include -class StdFail_NotDone; class gp_Ax2d; class gp_Ax22d; class gp_Pnt2d; -class gp_Parab2d; //! This class implements the following algorithms used to diff --git a/src/gce/gce_MakePln.hxx b/src/gce/gce_MakePln.hxx index d59ab56498..2dccea06f7 100644 --- a/src/gce/gce_MakePln.hxx +++ b/src/gce/gce_MakePln.hxx @@ -24,11 +24,9 @@ #include #include #include -class StdFail_NotDone; class gp_Ax2; class gp_Pnt; class gp_Dir; -class gp_Pln; class gp_Ax1; diff --git a/src/gce/gce_MakeRotation.hxx b/src/gce/gce_MakeRotation.hxx index 2fe1cef5d6..46624a9f08 100644 --- a/src/gce/gce_MakeRotation.hxx +++ b/src/gce/gce_MakeRotation.hxx @@ -27,7 +27,6 @@ class gp_Lin; class gp_Ax1; class gp_Pnt; class gp_Dir; -class gp_Trsf; //! This class implements elementary construction algorithms for a diff --git a/src/gce/gce_MakeRotation2d.hxx b/src/gce/gce_MakeRotation2d.hxx index 948c8e49f4..53a679ba8a 100644 --- a/src/gce/gce_MakeRotation2d.hxx +++ b/src/gce/gce_MakeRotation2d.hxx @@ -24,7 +24,6 @@ #include #include class gp_Pnt2d; -class gp_Trsf2d; //! Implements an elementary construction algorithm for diff --git a/src/gce/gce_MakeScale.hxx b/src/gce/gce_MakeScale.hxx index 1d177e982b..23600230eb 100644 --- a/src/gce/gce_MakeScale.hxx +++ b/src/gce/gce_MakeScale.hxx @@ -24,7 +24,6 @@ #include #include class gp_Pnt; -class gp_Trsf; //! Implements an elementary construction algorithm for diff --git a/src/gce/gce_MakeScale2d.hxx b/src/gce/gce_MakeScale2d.hxx index 4bd8aeee28..44f9878efa 100644 --- a/src/gce/gce_MakeScale2d.hxx +++ b/src/gce/gce_MakeScale2d.hxx @@ -24,7 +24,6 @@ #include #include class gp_Pnt2d; -class gp_Trsf2d; //! This class implements an elementary construction algorithm for diff --git a/src/gce/gce_MakeTranslation.hxx b/src/gce/gce_MakeTranslation.hxx index 3410f4b823..7ae8180c16 100644 --- a/src/gce/gce_MakeTranslation.hxx +++ b/src/gce/gce_MakeTranslation.hxx @@ -24,7 +24,6 @@ #include class gp_Vec; class gp_Pnt; -class gp_Trsf; //! This class implements elementary construction algorithms for a diff --git a/src/gce/gce_MakeTranslation2d.hxx b/src/gce/gce_MakeTranslation2d.hxx index f5bac379a1..d0152be619 100644 --- a/src/gce/gce_MakeTranslation2d.hxx +++ b/src/gce/gce_MakeTranslation2d.hxx @@ -24,7 +24,6 @@ #include class gp_Vec2d; class gp_Pnt2d; -class gp_Trsf2d; //! This class implements elementary construction algorithms for a diff --git a/src/gp/gp_Ax2.hxx b/src/gp/gp_Ax2.hxx index d768bda507..d513d440ab 100644 --- a/src/gp/gp_Ax2.hxx +++ b/src/gp/gp_Ax2.hxx @@ -19,8 +19,6 @@ #include #include -class Standard_ConstructionError; -class gp_Pnt; class gp_Trsf; class gp_Vec; diff --git a/src/gp/gp_Dir2d.hxx b/src/gp/gp_Dir2d.hxx index c14cff294f..8ffab7ff6d 100644 --- a/src/gp/gp_Dir2d.hxx +++ b/src/gp/gp_Dir2d.hxx @@ -21,7 +21,6 @@ #include class gp_Vec2d; -class gp_XY; class gp_Ax2d; class gp_Trsf2d; diff --git a/src/gp/gp_GTrsf.hxx b/src/gp/gp_GTrsf.hxx index 1363b84d29..c30726337d 100644 --- a/src/gp/gp_GTrsf.hxx +++ b/src/gp/gp_GTrsf.hxx @@ -24,8 +24,6 @@ #include #include -class gp_Trsf; -class gp_Mat; // Avoid possible conflict with SetForm macro defined by windows.h #ifdef SetForm diff --git a/src/gp/gp_GTrsf2d.hxx b/src/gp/gp_GTrsf2d.hxx index 1e64f7ad1d..423c8fdb73 100644 --- a/src/gp/gp_GTrsf2d.hxx +++ b/src/gp/gp_GTrsf2d.hxx @@ -22,8 +22,6 @@ #include #include -class gp_Trsf2d; -class gp_Mat2d; //! Defines a non persistent transformation in 2D space. //! This transformation is a general transformation. diff --git a/src/gp/gp_Mat2d.hxx b/src/gp/gp_Mat2d.hxx index 63d0f52031..56fac29554 100644 --- a/src/gp/gp_Mat2d.hxx +++ b/src/gp/gp_Mat2d.hxx @@ -19,8 +19,6 @@ #include #include -class gp_Trsf2d; -class gp_GTrsf2d; class gp_XY; //! Describes a two column, two row matrix. diff --git a/src/gp/gp_Pnt.hxx b/src/gp/gp_Pnt.hxx index a80f5db62f..fb73a06663 100644 --- a/src/gp/gp_Pnt.hxx +++ b/src/gp/gp_Pnt.hxx @@ -23,8 +23,6 @@ #include #include -class gp_XYZ; -class Standard_OutOfRange; class gp_Ax1; class gp_Ax2; class gp_Trsf; diff --git a/src/gp/gp_Pnt2d.hxx b/src/gp/gp_Pnt2d.hxx index 377e39d55f..c68c77b262 100644 --- a/src/gp/gp_Pnt2d.hxx +++ b/src/gp/gp_Pnt2d.hxx @@ -24,8 +24,6 @@ #include #include -class Standard_OutOfRange; -class gp_XY; class gp_Ax2d; class gp_Trsf2d; class gp_Vec2d; diff --git a/src/gp/gp_Trsf2d.hxx b/src/gp/gp_Trsf2d.hxx index 143877ae9b..6448d82fa0 100644 --- a/src/gp/gp_Trsf2d.hxx +++ b/src/gp/gp_Trsf2d.hxx @@ -21,13 +21,10 @@ #include #include -class gp_GTrsf2d; class gp_Trsf; class gp_Pnt2d; class gp_Ax2d; class gp_Vec2d; -class gp_XY; -class gp_Mat2d; //! Defines a non-persistent transformation in 2D space. //! The following transformations are implemented : From 740833a6a88e481f474783c426b6f6311ed586d3 Mon Sep 17 00:00:00 2001 From: kgv Date: Mon, 29 Nov 2021 21:26:45 +0300 Subject: [PATCH 151/639] 0032697: Configuration - fix compilation errors with oneTBB 2021 Removed usage of no more existing tbb::task_scheduler_init and tbb::captured_exception. --- src/OSD/OSD_Parallel_TBB.cxx | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/src/OSD/OSD_Parallel_TBB.cxx b/src/OSD/OSD_Parallel_TBB.cxx index 2344a6ca2d..0b9022b576 100644 --- a/src/OSD/OSD_Parallel_TBB.cxx +++ b/src/OSD/OSD_Parallel_TBB.cxx @@ -25,7 +25,9 @@ Standard_DISABLE_DEPRECATION_WARNINGS #include #include #include -#include +#if TBB_VERSION_MAJOR < 2021 + #include +#endif Standard_ENABLE_DEPRECATION_WARNINGS //======================================================================= @@ -38,12 +40,16 @@ void OSD_Parallel::forEachExternal (UniversalIterator& theBegin, const FunctorInterface& theFunctor, Standard_Integer theNbItems) { +#if TBB_VERSION_MAJOR >= 2021 + // task_scheduler_init is removed, + // exceptions are captured without proxy tbb::captured_exception object + (void )theNbItems; + tbb::parallel_for_each (theBegin, theEnd, theFunctor); +#else try { const Handle(OSD_ThreadPool)& aThreadPool = OSD_ThreadPool::DefaultPool(); - const Standard_Integer aNbThreads = theNbItems > 0 ? - aThreadPool->NbDefaultThreadsToLaunch() : -1; - + const Standard_Integer aNbThreads = theNbItems > 0 ? aThreadPool->NbDefaultThreadsToLaunch() : -1; tbb::task_scheduler_init aScheduler (aNbThreads); tbb::parallel_for_each (theBegin, theEnd, theFunctor); } @@ -51,6 +57,7 @@ void OSD_Parallel::forEachExternal (UniversalIterator& theBegin, { throw Standard_ProgramError (anException.what()); } +#endif } #endif /* HAVE_TBB */ From 30fa5f6713a2c2b321e4937217ac9066d7ed0caa Mon Sep 17 00:00:00 2001 From: kgv Date: Wed, 1 Dec 2021 21:50:48 +0300 Subject: [PATCH 152/639] 0032705: Test - name clashes within temporary files within bugs/caf/bug23766_X Several test cases writing temporary files have been corrected. --- tests/bugs/caf/buc60756 | 10 ++++------ tests/bugs/caf/buc60756_std | 11 +++++------ tests/bugs/caf/bug158 | 9 +++------ tests/bugs/caf/bug170_3 | 5 ++--- tests/bugs/caf/bug1919 | 11 ++++++----- tests/bugs/caf/bug23306 | 18 ++++++------------ tests/bugs/caf/bug23766_4 | 9 +++++---- tests/bugs/caf/bug23766_5 | 9 ++++++--- tests/bugs/caf/bug23766_6 | 9 ++++++--- tests/bugs/caf/bug24164_1 | 8 +++++--- tests/bugs/caf/bug24164_2 | 7 ++++--- tests/bugs/caf/bug24852 | 12 ++++-------- tests/bugs/caf/bug25394_1 | 6 ++++-- tests/bugs/caf/bug25394_2 | 6 ++++-- tests/bugs/caf/bug25394_3 | 6 ++++-- tests/bugs/caf/bug25536 | 13 +++++-------- tests/bugs/caf/bug25537 | 11 +++++------ tests/bugs/caf/bug26290_newattribute_1 | 7 +++++-- tests/bugs/caf/bug26290_newattribute_2 | 13 +++++++++---- tests/bugs/caf/bug267_1 | 5 ++--- tests/bugs/caf/bug27433 | 12 ++++++------ tests/bugs/caf/bug27604 | 8 +++++--- tests/bugs/caf/bug28428 | 11 +++++------ tests/bugs/caf/bug28691 | 7 +++++-- tests/bugs/caf/bug29217 | 7 +++++-- tests/bugs/caf/bug381_1 | 7 ++----- tests/bugs/caf/bug381_2 | 7 ++----- tests/bugs/caf/bug425 | 5 ++--- tests/bugs/caf/bug9746 | 5 ++--- tests/bugs/iges/bug23822 | 12 ++++-------- tests/bugs/iges/bug25518 | 13 ++++++------- tests/bugs/iges/bug25632_1 | 15 +++++++-------- tests/bugs/iges/bug25632_2 | 15 +++++++-------- tests/bugs/iges/bug25747 | 13 +++++-------- tests/bugs/iges/bug26138 | 13 +++++++------ tests/bugs/iges/bug26419_1 | 9 ++++----- tests/bugs/iges/bug26419_2 | 9 ++++----- tests/bugs/iges/bug26931 | 8 +++++--- tests/bugs/iges/bug26989 | 9 ++++++--- tests/bugs/iges/bug28589 | 10 +++++++--- tests/bugs/step/bug26657 | 23 ++++++++++------------- tests/bugs/step/bug29403 | 13 +++++-------- tests/bugs/step/bug31550 | 5 +++-- tests/bugs/step/bug32679 | 8 ++++---- tests/bugs/xde/bug21802 | 13 ++++++------- tests/bugs/xde/bug23384 | 8 +++++--- tests/bugs/xde/bug25910 | 14 ++++++-------- tests/bugs/xde/bug26174 | 5 ++--- tests/bugs/xde/bug27447 | 12 +++++------- tests/bugs/xde/bug27701 | 12 +++++------- tests/bugs/xde/bug28044 | 11 +++++------ tests/bugs/xde/bug28641 | 6 ++++-- tests/bugs/xde/bug29338 | 13 ++++++------- tests/bugs/xde/bug533 | 15 ++++++--------- tests/caf/bugs/A1 | 2 +- tests/caf/bugs/A2 | 2 +- tests/caf/bugs/A3 | 2 +- tests/caf/bugs/A4 | 2 +- tests/caf/bugs/A5 | 2 +- tests/caf/bugs/A6 | 2 +- tests/caf/bugs/A7 | 2 +- tests/caf/bugs/A8 | 2 +- tests/caf/bugs/A9 | 2 +- tests/caf/bugs/B1 | 2 +- tests/caf/bugs/B2 | 2 +- tests/caf/bugs/B3 | 2 +- tests/caf/bugs/B4 | 2 +- tests/caf/bugs/B5 | 2 +- tests/caf/bugs/B6 | 2 +- tests/caf/bugs/B7 | 2 +- tests/caf/bugs/B8 | 2 +- tests/caf/bugs/B9 | 2 +- tests/caf/presentation/M1 | 2 +- tests/caf/progress/A1 | 2 +- tests/caf/progress/A2 | 2 +- tests/perf/caf/bug2793 | 6 +++--- tests/perf/de/bug29830_3 | 5 ++++- tests/perf/de/bug29830_dir/script | 7 +++++-- 78 files changed, 295 insertions(+), 303 deletions(-) diff --git a/tests/bugs/caf/buc60756 b/tests/bugs/caf/buc60756 index 1efc4a5430..197bcf650d 100755 --- a/tests/bugs/caf/buc60756 +++ b/tests/bugs/caf/buc60756 @@ -7,10 +7,8 @@ puts "===========" Open [locate_data_file BUC60756_Doc.cbf] D -###################################################################### -catch {file delete ${imagedir}/Doc2.cbf} - -SaveAs D ${imagedir}/Doc2.cbf +set aTmpFile ${imagedir}/${casename}.cbf +SaveAs D $aTmpFile Close D -Open ${imagedir}/Doc2.cbf D - +Open $aTmpFile D +file delete -force $aTmpFile diff --git a/tests/bugs/caf/buc60756_std b/tests/bugs/caf/buc60756_std index 3091dc365c..a7e8f7eec7 100644 --- a/tests/bugs/caf/buc60756_std +++ b/tests/bugs/caf/buc60756_std @@ -7,11 +7,10 @@ puts "===========" Open [locate_data_file BUC60756_Doc.std] D -###################################################################### -catch {file delete ${imagedir}/Doc2.cbf} - Format D BinOcaf -SaveAs D ${imagedir}/Doc2.cbf -Close D -Open ${imagedir}/Doc2.cbf D +set aTmpFile ${imagedir}/${casename}.cbf +SaveAs D $aTmpFile +Close D +Open $aTmpFile D +file delete -force $aTmpFile diff --git a/tests/bugs/caf/bug158 b/tests/bugs/caf/bug158 index e18fb1db38..8959479d14 100755 --- a/tests/bugs/caf/bug158 +++ b/tests/bugs/caf/bug158 @@ -4,12 +4,9 @@ puts "==============" NewDocument D BinOcaf -################################################################## -if { [catch {set res [SaveAs D ${imagedir}/OCC158.cbf]}] != 0 } { +set aTmpFile ${imagedir}/${casename}.cbf +if { [catch {set res [SaveAs D ${aTmpFile}] }] != 0 } { puts "OCC158: Error" -} else { - file delete ${imagedir}/OCC158.cbf } - - +file delete -force $aTmpFile diff --git a/tests/bugs/caf/bug170_3 b/tests/bugs/caf/bug170_3 index 690c53debf..d0a9bc14f4 100755 --- a/tests/bugs/caf/bug170_3 +++ b/tests/bugs/caf/bug170_3 @@ -3,8 +3,8 @@ puts "OCC170" puts "(case 3)" puts "========================" -set docName OCC170 -set newDocName OCC170_2 +set docName ${casename} +set newDocName ${casename}_2 set str1 "~!@#$%^&*():;'{}\|?/.>,<~!@#$%^&*():;'{}\|?/.>,<#$%#$%$%^&*():;'{}\|$%^&*(@#$%^&*():;'{}\|�/" NewDocument $docName XmlOcaf @@ -31,4 +31,3 @@ if {$str1 == $str2} {puts "OCC170 OK"} else { puts "str2=${str2}" puts "OCC170 Error" } - diff --git a/tests/bugs/caf/bug1919 b/tests/bugs/caf/bug1919 index 5be00c76d9..ed57219fc2 100644 --- a/tests/bugs/caf/bug1919 +++ b/tests/bugs/caf/bug1919 @@ -73,13 +73,13 @@ if { ${USA_IsDone} != 0 || ${new_USA_Real}!=${Italian_Real} } { } # Store the document -file delete ${imagedir}/OCC1919-M6.xml -SaveAs D ${imagedir}/OCC1919-M6.xml -if { ![file exists ${imagedir}/OCC1919-M6.xml] } { +set aTmpFile ${imagedir}/${casename}.xml +file delete $aTmpFile +SaveAs D $aTmpFile +if { ![file exists $aTmpFile] } { puts "OCC1919 Error : There is not file" set IsGood 0 } -catch {exec chmod 777 ${imagedir}/OCC1919-M6.xml} Close D # Set en_US locale @@ -91,7 +91,8 @@ if { ${en_US_local} != "en_US" } { } # Restore the document -Open ${imagedir}/OCC1919-M6.xml DD +Open $aTmpFile DD +file delete -force $aTmpFile # Get a value of the attribute set USA_IsDone [catch {set new_USA_Real [GetReal DD ${USA_Label}]} message] diff --git a/tests/bugs/caf/bug23306 b/tests/bugs/caf/bug23306 index e39b07a9c7..f627bf0d2e 100755 --- a/tests/bugs/caf/bug23306 +++ b/tests/bugs/caf/bug23306 @@ -1,28 +1,22 @@ puts "============" -puts "OCC23306" +puts "OCC23306: F a i l u r e s reading some attributes of BinOcaf document" puts "============" puts "" -#################################################################################### -# Failures reading some attributes of BinOcaf document -#################################################################################### set BugNumber OCC23306 NewDocument D1 BinOcaf SetExtStringArray D1 0:1:1 0 1 3 String1 String2 String3 -SaveAs D1 ${imagedir}/ocaf1.cbf + +set aTmpFile ${imagedir}/${casename}.cbf +SaveAs D1 $aTmpFile Close D1 -set warn [Open ${imagedir}/ocaf1.cbf D2] +set warn [Open $aTmpFile D2] set info [lsearch $warn "warning:"] +file delete -force ${aTmpFile} if { $info == -1 } { puts "OK ${BugNumber}" } else { puts "Faulty ${BugNumber}" } - - - - - - diff --git a/tests/bugs/caf/bug23766_4 b/tests/bugs/caf/bug23766_4 index e1513390e7..e98baa46f7 100755 --- a/tests/bugs/caf/bug23766_4 +++ b/tests/bugs/caf/bug23766_4 @@ -51,12 +51,14 @@ if { [regexp "REVERSED" $info2] != 1 } { } #4 - test persistence: check orientation after retrieving (to be the same as before) -file delete -force ${imagedir}/bug23766_ttt1.cbf NewCommand D -SaveAs D ${imagedir}/bug23766_ttt1.cbf +set aTmpFile ${imagedir}/${casename}.cbf +SaveAs D $aTmpFile Close D ##unset D -Open ${imagedir}/bug23766_ttt1.cbf D +Open $aTmpFile D +file delete -force $aTmpFile + GetShape D 0:1:2:1:2 E1 set info3 [whatis E1] ## to be: E1 is a shape EDGE FORWARD Modified Orientable @@ -74,4 +76,3 @@ if { [regexp "REVERSED" $info4] != 1 } { } else { puts "OK: orientation of E2 is correct" } - diff --git a/tests/bugs/caf/bug23766_5 b/tests/bugs/caf/bug23766_5 index 4e5f38e3a7..ff2838665f 100755 --- a/tests/bugs/caf/bug23766_5 +++ b/tests/bugs/caf/bug23766_5 @@ -50,12 +50,15 @@ if { [regexp "REVERSED" $info2] != 1 } { } #4 - test persistence: check orientation after retrieving (to be the same as before) -file delete -force ${imagedir}/bug23766_ttt1.cbf NewCommand D -SaveAs D ${imagedir}/bug23766_ttt1.cbf + +set aTmpFile ${imagedir}/${casename}.cbf +SaveAs D $aTmpFile Close D ##unset D -Open ${imagedir}/bug23766_ttt1.cbf D +Open $aTmpFile D +file delete -force $aTmpFile + GetShape D 0:1:2:1:2 E1 set info3 [whatis E1] ## to be: E1 is a shape EDGE FORWARD Modified Orientable diff --git a/tests/bugs/caf/bug23766_6 b/tests/bugs/caf/bug23766_6 index 638e0af0b3..923d49933a 100755 --- a/tests/bugs/caf/bug23766_6 +++ b/tests/bugs/caf/bug23766_6 @@ -53,12 +53,15 @@ if { [regexp "REVERSED" $info2] != 1 } { } #4 - test persistence: check orientation after retrieving (to be the same as before) -file delete -force ${imagedir}/bug23766_ttt1.xml NewCommand D -SaveAs D ${imagedir}/bug23766_ttt1.xml + +set aTmpFile ${imagedir}/${casename}.xml +SaveAs D $aTmpFile Close D ##unset D -Open ${imagedir}/bug23766_ttt1.xml D +Open $aTmpFile D +file delete -force $aTmpFile + GetShape D 0:1:2:1:2 E1 set info3 [whatis E1] ## to be: E1 is a shape EDGE FORWARD Modified Orientable diff --git a/tests/bugs/caf/bug24164_1 b/tests/bugs/caf/bug24164_1 index dc3f32519b..cbd09f97dc 100644 --- a/tests/bugs/caf/bug24164_1 +++ b/tests/bugs/caf/bug24164_1 @@ -23,7 +23,8 @@ GetShape D $F2:2 Box2 NewCommand D #3 save shape in the document -SaveAs D ${imagedir}/testDoc1.cbf +set aTmpFile ${imagedir}/${casename}.cbf +SaveAs D $aTmpFile #4 close document set catch_status 0 @@ -37,7 +38,8 @@ if { ${catch_status} != 0 } { } #5 reopen just saved document with the same name -Open ${imagedir}/testDoc1.cbf D +Open $aTmpFile D +file delete -force $aTmpFile set catch_status 0 #6 close the document @@ -49,4 +51,4 @@ if { ${catch_status} != 0 } { puts "Faulty ${BugNumber}" } else { puts "OK ${BugNumber}" -} \ No newline at end of file +} diff --git a/tests/bugs/caf/bug24164_2 b/tests/bugs/caf/bug24164_2 index 6c423efd78..f56a05e21b 100644 --- a/tests/bugs/caf/bug24164_2 +++ b/tests/bugs/caf/bug24164_2 @@ -40,7 +40,8 @@ GetRefArray D $Lab5 GetRefArray D $Lab6 #6 save the document -SaveAs D ${imagedir}/testDoc2.cbf +set aTmpFile ${imagedir}/${casename}.cbf +SaveAs D $aTmpFile #7 close the document set catch_status 0 @@ -54,7 +55,8 @@ if { ${catch_status} != 0 } { } #8 reopen just saved document with the same name -Open ${imagedir}/testDoc2.cbf D +Open $aTmpFile D +file delete -force $aTmpFile #9 close the document if { [catch {Close D} catch_result] } { @@ -66,4 +68,3 @@ if { ${catch_status} != 0 } { } else { puts "OK ${BugNumber}" } - diff --git a/tests/bugs/caf/bug24852 b/tests/bugs/caf/bug24852 index 06b7fd864f..984e85a88b 100755 --- a/tests/bugs/caf/bug24852 +++ b/tests/bugs/caf/bug24852 @@ -1,18 +1,14 @@ puts "==========" -puts "OCC24852" +puts "OCC24852: C r a s h on storage of an Ocaf document in XML file format" puts "==========" puts "" -######################################################## -# Crash on storage of an Ocaf document in XML file format -######################################################## NewDocument D XmlOcaf -set File ${imagedir}/bug24852_test.xml - -if { [catch {set res [SaveAs D ${File}]}] != 0 } { +set aTmpFile ${imagedir}/${casename}.xml +if { [catch {set res [SaveAs D $aTmpFile]}] != 0 } { puts "Error : Crash on storage of an Ocaf document in XML file format" } else { puts "OK : Storage of an Ocaf document in XML file format is good" - file delete ${File} } +file delete -force $aTmpFile diff --git a/tests/bugs/caf/bug25394_1 b/tests/bugs/caf/bug25394_1 index 6e5a1a8543..81318cc489 100755 --- a/tests/bugs/caf/bug25394_1 +++ b/tests/bugs/caf/bug25394_1 @@ -50,11 +50,13 @@ set info5 [GetReferenceList D $Lab5] # output => "List is empty" # 6. save the Document in external file -SaveAs D ${imagedir}/bug26014_test1.cbf +set aTmpFile ${imagedir}/${casename}.cbf +SaveAs D $aTmpFile Close D # 7. reopen the Document -Open ${imagedir}/bug26014_test1.cbf D +Open $aTmpFile D +file delete -force $aTmpFile # 8. Check the restored attributes at the specified labels set info8 [GetBooleanList D $Lab1] diff --git a/tests/bugs/caf/bug25394_2 b/tests/bugs/caf/bug25394_2 index d7c46fcdfd..9d1632a036 100755 --- a/tests/bugs/caf/bug25394_2 +++ b/tests/bugs/caf/bug25394_2 @@ -50,11 +50,13 @@ set info5 [GetReferenceList D $Lab5] # output => "List is empty" # 6. save the Document in external file -SaveAs D ${imagedir}/bug26014_test2.cbf +set aTmpFile ${imagedir}/${casename}.cbf +SaveAs D $aTmpFile Close D # 7. reopen the Document -Open ${imagedir}/bug26014_test2.cbf D +Open $aTmpFile D +file delete -force $aTmpFile # 8. Check the restored attributes at the specified labels set info8 [GetBooleanList D $Lab1] diff --git a/tests/bugs/caf/bug25394_3 b/tests/bugs/caf/bug25394_3 index d36c25e9c0..74d7114eb7 100755 --- a/tests/bugs/caf/bug25394_3 +++ b/tests/bugs/caf/bug25394_3 @@ -50,11 +50,13 @@ set info5 [GetReferenceList D $Lab5] # output => "List is empty" # 6. save the Document in external file -SaveAs D ${imagedir}/bug26014_test3.xml +set aTmpFile ${imagedir}/${casename}.xml +SaveAs D $aTmpFile Close D # 7. reopen the Document -Open ${imagedir}/bug26014_test3.xml D +Open $aTmpFile D +file delete -force $aTmpFile # 8. Check the restored attributes at the specified labels set info8 [GetBooleanList D $Lab1] diff --git a/tests/bugs/caf/bug25536 b/tests/bugs/caf/bug25536 index 3c182ef8e2..830883b0c5 100644 --- a/tests/bugs/caf/bug25536 +++ b/tests/bugs/caf/bug25536 @@ -1,10 +1,7 @@ puts "============" -puts "OCC25536" +puts "OCC25536: XmlMDataXtd_GeometryDriver doesn't support TDataXtd_SPLINE, TDataXtd_PLANE and TDataXtd_CYLINDER." puts "============" puts "" -####################################################################### -# XmlMDataXtd_GeometryDriver doesn't support TDataXtd_SPLINE, TDataXtd_PLANE and TDataXtd_CYLINDER. -####################################################################### NewDocument Doc XmlOcaf @@ -16,12 +13,13 @@ SetGeometry Doc 0:2:2 pln Label Doc 0:2:3 SetGeometry Doc 0:2:3 cyl -set aFile ${imagedir}/bug25536_test.xml -SaveAs Doc ${aFile} +set aTmpFile ${imagedir}/${casename}.xml +SaveAs Doc ${aTmpFile} Close Doc # check attributes are correctly restored -Open ${aFile} Doc2 +Open ${aTmpFile} Doc2 +file delete -force $aTmpFile set aType [GetGeometryType Doc2 0:2:1] if {${aType} != "spl"} { @@ -37,4 +35,3 @@ if {${aType} != "cyl"} { } Close Doc2 - diff --git a/tests/bugs/caf/bug25537 b/tests/bugs/caf/bug25537 index 1da77c16a2..26a6d46d6f 100644 --- a/tests/bugs/caf/bug25537 +++ b/tests/bugs/caf/bug25537 @@ -1,10 +1,8 @@ puts "============" -puts "OCC25537" +puts "OCC25537: XmlMPrsStd_PositionDriver::Paste runtime check c r a s h." puts "============" puts "" -####################################################################### -# XmlMPrsStd_PositionDriver::Paste runtime check crash. -####################################################################### + pload XDEDRAW NewDocument Doc XmlXCAF @@ -22,8 +20,9 @@ for {set i 1} {$i < 100} {incr i} { XSetCentroid Doc $aLab2 $aBigNum $aBigNum $aBigNum } -set aFile ${imagedir}/bug25537_test.xml -SaveAs Doc ${aFile} +set aTmpFile ${imagedir}/${casename}.xml +SaveAs Doc ${aTmpFile} ## ==> No exception Close Doc +file delete -force $aTmpFile diff --git a/tests/bugs/caf/bug26290_newattribute_1 b/tests/bugs/caf/bug26290_newattribute_1 index 77ff9e439a..f2a7ef8ae7 100644 --- a/tests/bugs/caf/bug26290_newattribute_1 +++ b/tests/bugs/caf/bug26290_newattribute_1 @@ -25,7 +25,9 @@ Undo D 1 Redo D 1 AISColor D $Lab1 AQUAMARINE4 NewCommand D -SaveAs D $imagedir/bug26290_new_1.cbf + +set aTmpFile ${imagedir}/${casename}.cbf +SaveAs D $aTmpFile AISErase D $Lab1 ## DFBrowse D # - for debug purpose only @@ -36,7 +38,8 @@ Redo D 1 Close D ## reopen just kept file -Open $imagedir/bug26290_new_1.cbf D +Open $aTmpFile D +file delete -force $aTmpFile ## DFBrowse D AISInitViewer D diff --git a/tests/bugs/caf/bug26290_newattribute_2 b/tests/bugs/caf/bug26290_newattribute_2 index a79a631821..cb1e42cc9c 100644 --- a/tests/bugs/caf/bug26290_newattribute_2 +++ b/tests/bugs/caf/bug26290_newattribute_2 @@ -27,11 +27,14 @@ Undo D 1 Redo D 1 AISColor D $Lab1 AQUAMARINE4 NewCommand D -SaveAs D $imagedir/bug26290_new_1.cbf + +set aTmpFile1 ${imagedir}/${casename}_1.cbf +SaveAs D $aTmpFile1 Close D # test -Open $imagedir/bug26290_new_1.cbf D +Open $aTmpFile1 D +file delete -force $aTmpFile1 UndoLimit D 100 NewCommand D @@ -53,14 +56,16 @@ NewCommand D Undo D 1 Redo D 1 -SaveAs D $imagedir/bug26290_new_2.cbf +set aTmpFile2 ${imagedir}/${casename}_2.cbf +SaveAs D $aTmpFile2 AISErase D $Lab2 set Lab1 [Label D 0:1:1] AISErase D $Lab1 NewCommand D Close D -Open $imagedir/bug26290_new_2.cbf D +Open $aTmpFile2 D +file delete -force $aTmpFile1 ## DFBrowse D AISInitViewer D diff --git a/tests/bugs/caf/bug267_1 b/tests/bugs/caf/bug267_1 index b204b05223..0ab50ac161 100644 --- a/tests/bugs/caf/bug267_1 +++ b/tests/bugs/caf/bug267_1 @@ -6,6 +6,5 @@ NewDocument D BinOcaf ###################################################################### -file delete ${imagedir}/OCC267.cbf -SaveAs D ${imagedir}/OCC267.cbf - +SaveAs D ${imagedir}/${casename}.cbf +file delete -force ${imagedir}/${casename}.cbf diff --git a/tests/bugs/caf/bug27433 b/tests/bugs/caf/bug27433 index 72c21eb0ed..b3d72fe3f2 100755 --- a/tests/bugs/caf/bug27433 +++ b/tests/bugs/caf/bug27433 @@ -10,12 +10,12 @@ NewDocument Doc BinOcaf SetInteger Doc 0:2 100 # Save the document -set aFile ${imagedir}/OCC27433-[file tail [info script]].cbf -file delete ${aFile} -puts ${aFile} -catch {SaveAs Doc ${aFile}} -if { ![file exists ${aFile}] } { - puts "Error: Can not save the file with path to plugins ended with slash" +set aTmpFile ${imagedir}/${casename}.cbf +puts ${aTmpFile} +catch {SaveAs Doc ${aTmpFile}} +if { ![file exists ${aTmpFile}] } { + puts "Error: Can not save the file with path to plugins ended with slash" } Close Doc +file delete -force $aTmpFile diff --git a/tests/bugs/caf/bug27604 b/tests/bugs/caf/bug27604 index 5f5c9d5137..52389b7d45 100644 --- a/tests/bugs/caf/bug27604 +++ b/tests/bugs/caf/bug27604 @@ -11,18 +11,18 @@ pload OCAF MODELING # just a big shape to fit in memory restore [locate_data_file $aBigShape] s -file delete ${imagedir}/test.cbf +set aTmpFile ${imagedir}/${casename}.cbf # store it in the document NewDocument D BinOcaf SetShape D "0:2" s -SaveAs D ${imagedir}/test.cbf +SaveAs D $aTmpFile Close D # store the memory used before opening a document set aBefore [meminfo h] -Open ${imagedir}/test.cbf DD +Open $aTmpFile DD set aDocLoaded [meminfo h] set aBigDelta [expr $aDocLoaded - $aBefore] Close DD @@ -39,3 +39,5 @@ puts "After close: $anAfter" if {[expr $aBigDelta / 20. - $aDelta] < 0} { puts "Error: the memory is not freed after Open/Close" } + +file delete -force $aTmpFile diff --git a/tests/bugs/caf/bug28428 b/tests/bugs/caf/bug28428 index 25aee4e89c..bd7ca182c1 100644 --- a/tests/bugs/caf/bug28428 +++ b/tests/bugs/caf/bug28428 @@ -1,19 +1,18 @@ puts "===========" -puts "OCC28428" +puts "OCC28428: BinMNaming_NamedShapeDriver f a i l s if there are no nodes in NamedShape" puts "===========" puts "" -######################################################################## -# BinMNaming_NamedShapeDriver fails if there are no nodes in NamedShape -######################################################################## pload QAcommands NewDocument D1 BinOcaf # Create TNaming_Builder on a label without putthing shapes BuildNamedShape D1 0:1 P -SaveAs D1 $imagedir/bug28428_new.cbf +set aTmpFile ${imagedir}/${casename}.cbf +SaveAs D1 $aTmpFile Close D1 # This produced a NamedShape driver failure with catching by general driver # and output a failure message (caught by parse.rules) -Open $imagedir/bug28428_new.cbf D2 +Open $aTmpFile D2 Close D2 +file delete -force $aTmpFile diff --git a/tests/bugs/caf/bug28691 b/tests/bugs/caf/bug28691 index d0e6d2c153..c9ffe83509 100644 --- a/tests/bugs/caf/bug28691 +++ b/tests/bugs/caf/bug28691 @@ -6,8 +6,8 @@ puts "" NewDocument D XmlOcaf SetExtStringArray D 0:1 0 1 3 Hello hallo Bonjour -set FileV7 ${imagedir}/bug28691_doc7.xml -set FileV9 ${imagedir}/bug28691_doc9.xml +set FileV7 ${imagedir}/${casename}_doc7.xml +set FileV9 ${imagedir}/${casename}_doc9.xml SetNode D 0:1 AISSet D 0:1 NS @@ -90,3 +90,6 @@ if { [regexp "Bonjour" ${info}] != 1 } { } else { puts "OK : there is \"Bonjour\" word in TDataStd_ExtStringArray attribute in old version document" } + +file delete -force ${FileV7} +file delete -force ${FileV9} diff --git a/tests/bugs/caf/bug29217 b/tests/bugs/caf/bug29217 index d4b214b15c..3d89f00b39 100644 --- a/tests/bugs/caf/bug29217 +++ b/tests/bugs/caf/bug29217 @@ -6,8 +6,8 @@ puts "" NewDocument D BinOcaf SetExtStringArray D 0:1 0 1 3 Hello hallo Bonjour -set FileV7 ${imagedir}/bug29217_doc7.cbf -set FileV10 ${imagedir}/bug29217_doc10.cbf +set FileV7 ${imagedir}/${casename}_doc7.cbf +set FileV10 ${imagedir}/${casename}_doc10.cbf SetNode D 0:1 AISSet D 0:1 NS @@ -90,3 +90,6 @@ if { [regexp "Bonjour" ${info}] != 1 } { } else { puts "OK : there is \"Bonjour\" word in TDataStd_ExtStringArray attribute in old version document" } + +file delete -force ${FileV7} +file delete -force ${FileV10} diff --git a/tests/bugs/caf/bug381_1 b/tests/bugs/caf/bug381_1 index 854526ece5..6aa60ed6c8 100755 --- a/tests/bugs/caf/bug381_1 +++ b/tests/bugs/caf/bug381_1 @@ -8,11 +8,8 @@ pload QAcommands NewDocument D BinOcaf ###################################################### -catch { SaveAs D ${imagedir}/OCC381_1.cbf } - +catch { SaveAs D ${imagedir}/${casename}.cbf } if { [catch { OCC381_Save D } ] } { puts "OCC381: Error" -} else { - catch { exec chmod 777 ${imagedir}/OCC381_1.cbf } - file delete -force ${imagedir}/OCC381_1.cbf } +file delete -force ${imagedir}/${casename}.cbf diff --git a/tests/bugs/caf/bug381_2 b/tests/bugs/caf/bug381_2 index 3574afa08d..d08f873212 100755 --- a/tests/bugs/caf/bug381_2 +++ b/tests/bugs/caf/bug381_2 @@ -8,10 +8,7 @@ pload QAcommands NewDocument D BinOcaf ###################################################### -if { [catch { OCC381_SaveAs D ${imagedir}/OCC381_2.cbf}] } { +if { [catch { OCC381_SaveAs D ${imagedir}/${casename}.cbf}] } { puts "OCC381: Error" -} else { - catch {exec chmod 777 ${imagedir}/OCC381_2.cbf} - file delete -force ${imagedir}/OCC381_2.cbf } - +file delete -force ${imagedir}/${casename}.cbf diff --git a/tests/bugs/caf/bug425 b/tests/bugs/caf/bug425 index af926014e3..3cfbd8f2d1 100755 --- a/tests/bugs/caf/bug425 +++ b/tests/bugs/caf/bug425 @@ -23,18 +23,17 @@ SetName D ${aLabel} ${aSetAttr1} NewCommand D # Save the document -set aFile ${imagedir}/OCC425.cbf -catch {file delete ${aFile}} +set aFile ${imagedir}/${casename}.cbf SaveAs D ${aFile} if { ![file exists ${aFile}] } { puts "There is not ${aFile} file; SaveAs command: Error" set IsGood 0 } -catch {exec chmod 777 ${aFile}} # Restore the document Close D Open ${aFile} DD +file delete -force ${aFile} # Get a value of the attribute set aGetAttr3 "" diff --git a/tests/bugs/caf/bug9746 b/tests/bugs/caf/bug9746 index ddf7d7ffc5..ab0679529e 100755 --- a/tests/bugs/caf/bug9746 +++ b/tests/bugs/caf/bug9746 @@ -57,19 +57,18 @@ SelectShape D $CylNamLab:11 C_2 C SelectShape D $CylNamLab:12 C_3 C # Save the document -set aFile ${imagedir}/OCC9746-Z3.cbf -file delete ${aFile} +set aFile ${imagedir}/${casename}.cbf SaveAs D ${aFile} if { ![file exists ${aFile}] } { puts "There is not ${aFile} file; SaveAs command: Error" puts "${BugNumber}: ERROR (case 1)" } -catch {exec chmod 777 ${aFile}} Close D # Restore the document catch {Open ${aFile} DDoc} +file delete -force ${aFile} # set BoxNamLab [Label DDoc 0:4] diff --git a/tests/bugs/iges/bug23822 b/tests/bugs/iges/bug23822 index 6e8d27d851..7e422ebc23 100755 --- a/tests/bugs/iges/bug23822 +++ b/tests/bugs/iges/bug23822 @@ -1,14 +1,10 @@ puts "========" -puts "CR23822" +puts "CR23822: S I G S E G V 'segmentation v i o l a t i o n' during writing IGES" puts "========" puts "" -######################################################### -## SIGSEGV 'segmentation violation' during writing IGES -######################################################### ReadIges D [locate_data_file ball_bearing.igs] -set aFile ${imagedir}/bug23822_new_file.igs -file delete -force ${aFile} - -WriteIges D ${aFile} +set aTmpFile ${imagedir}/${casename}.igs +WriteIges D $aTmpFile +file delete -force $aTmpFile diff --git a/tests/bugs/iges/bug25518 b/tests/bugs/iges/bug25518 index f7db17c538..98755c3ea1 100644 --- a/tests/bugs/iges/bug25518 +++ b/tests/bugs/iges/bug25518 @@ -1,19 +1,18 @@ puts "========" -puts "OCC25518" +puts "OCC25518: Colors are not written to IGES 5.3" puts "========" puts "" -###################################### -# Colors are not written to IGES 5.3 -###################################### -catch {exec rm ${imagedir}/OCC25518.igs} psphere s 10 XNewDoc D XAddShape D s XSetColor D s 0 0 1 param write.iges.brep.mode 1 -WriteIges D ${imagedir}/OCC25518.igs -ReadIges T ${imagedir}/OCC25518.igs + +set aTmpFile ${imagedir}/${casename}.igs +WriteIges D $aTmpFile +ReadIges T $aTmpFile +file delete -force ${aTmpFile} if {[string trim [XGetAllColors T]] != "BLUE"} { puts "ERROR: OCC25518 is reproduced. Color is lost." } diff --git a/tests/bugs/iges/bug25632_1 b/tests/bugs/iges/bug25632_1 index b42a1f84bc..325891e1c8 100644 --- a/tests/bugs/iges/bug25632_1 +++ b/tests/bugs/iges/bug25632_1 @@ -1,10 +1,7 @@ puts "============" -puts "OCC25632" +puts "OCC25632: IGES writer looses face orientation" puts "============" puts "" -####################################################################### -# IGES writer looses face orientation -####################################################################### plane p 0 0 0 0 0 1 1 0 0 mkface f p 0 100 0 100 @@ -17,13 +14,15 @@ normals f 100 treverse f normals f 100 -xwd ${imagedir}/${test_image}_1.png +xwd ${imagedir}/${casename}_1.png -testwriteiges ${imagedir}/bug25632_f.igs f -testreadiges ${imagedir}/bug25632_f.igs ff +set aTmpFile ${imagedir}/${casename}.igs +testwriteiges $aTmpFile f +testreadiges $aTmpFile ff +file delete -force ${aTmpFile} donly ff normals ff 100 -xwd ${imagedir}/${test_image}_2.png +xwd ${imagedir}/${casename}_2.png diff --git a/tests/bugs/iges/bug25632_2 b/tests/bugs/iges/bug25632_2 index d2a1a50c4d..17dd981047 100644 --- a/tests/bugs/iges/bug25632_2 +++ b/tests/bugs/iges/bug25632_2 @@ -1,10 +1,7 @@ puts "============" -puts "OCC25632" +puts "OCC25632: IGES writer looses face orientation" puts "============" puts "" -####################################################################### -# IGES writer looses face orientation -####################################################################### plane p 0 0 0 0 0 1 1 0 0 mkface face p 0 100 0 100 @@ -21,13 +18,15 @@ mkface f s 10 20 30 40 treverse f normals f 100 -xwd ${imagedir}/${test_image}_1.png +xwd ${imagedir}/${casename}_1.png -testwriteiges ${imagedir}/f_2.igs f -testreadiges ${imagedir}/f_2.igs ff +set aTmpFile ${imagedir}/${casename}.igs +testwriteiges $aTmpFile f +testreadiges $aTmpFile ff +file delete -force ${aTmpFile} donly ff normals ff 100 -xwd ${imagedir}/${test_image}_2.png +xwd ${imagedir}/${casename}_2.png diff --git a/tests/bugs/iges/bug25747 b/tests/bugs/iges/bug25747 index e04258846f..39cf6904b2 100644 --- a/tests/bugs/iges/bug25747 +++ b/tests/bugs/iges/bug25747 @@ -1,12 +1,7 @@ puts "========" -puts "OCC25747" +puts "OCC25747: Bad IGES file after import and export with different units" puts "========" puts "" -###################################### -# Bad IGES file after import and export with different units -###################################### - -catch {exec rm ${imagedir}/OCC25747.igs} # default OCCT unit for reading param xstep.cascade.unit MM @@ -23,10 +18,12 @@ vfit vsetdispmode 1 vdump ${imagedir}/${casename}_1.png -WriteIges D ${imagedir}/OCC25747.igs +set aTmpFile ${imagedir}/${casename}.igs +WriteIges D $aTmpFile # bad IGES file after export -ReadIges T ${imagedir}/OCC25747.igs +ReadIges T $aTmpFile +file delete -force ${aTmpFile} XShow T vtop diff --git a/tests/bugs/iges/bug26138 b/tests/bugs/iges/bug26138 index 389f09538c..10c229459a 100644 --- a/tests/bugs/iges/bug26138 +++ b/tests/bugs/iges/bug26138 @@ -1,12 +1,13 @@ puts "========" -puts "OCC26138" +puts "OCC26138: Problems with writing periodic BSplines into IGES" puts "========" puts "" -##################################################### -# Problems with writing periodic BSplines into IGES -##################################################### igesbrep [locate_data_file OCC26138_Torus.igs] a * -brepiges a ${imagedir}/bug26138.igs -igesbrep ${imagedir}/bug26138.igs b * + +set aTmpFile ${imagedir}/${casename}.igs +brepiges a $aTmpFile +igesbrep $aTmpFile b * +file delete -force ${aTmpFile} + checkprops a -s -equal b diff --git a/tests/bugs/iges/bug26419_1 b/tests/bugs/iges/bug26419_1 index 0b8ac60c56..3ea113af7d 100644 --- a/tests/bugs/iges/bug26419_1 +++ b/tests/bugs/iges/bug26419_1 @@ -1,11 +1,10 @@ puts "========" -puts "OCC26419" +puts "OCC26419: Export of a reversed face leads to c r a s h in 6.9.0 although proceeded in 6.8.0" puts "========" puts "" -##################################################### -# [Regression?] Export of a reversed face leads to crash in 6.9.0 although proceeded in 6.8.0 -##################################################### restore [locate_data_file bug26419_a-fwd.brep] af -brepiges af ${imagedir}/bug26419_1.igs +set aTmpFile ${imagedir}/${casename}.igs +brepiges af $aTmpFile +file delete -force ${aTmpFile} diff --git a/tests/bugs/iges/bug26419_2 b/tests/bugs/iges/bug26419_2 index 5c6b21b8dc..24aaf9b430 100644 --- a/tests/bugs/iges/bug26419_2 +++ b/tests/bugs/iges/bug26419_2 @@ -1,11 +1,10 @@ puts "========" -puts "OCC26419" +puts "OCC26419: Export of a reversed face leads to c r a s h in 6.9.0 although proceeded in 6.8.0" puts "========" puts "" -##################################################### -# [Regression?] Export of a reversed face leads to crash in 6.9.0 although proceeded in 6.8.0 -##################################################### restore [locate_data_file bug26419_a-rev.brep] ar -brepiges ar ${imagedir}/bug26419_2.igs +set aTmpFile ${imagedir}/${casename}.igs +brepiges ar $aTmpFile +file delete -force ${aTmpFile} diff --git a/tests/bugs/iges/bug26931 b/tests/bugs/iges/bug26931 index f7172bf849..93b0dbef87 100644 --- a/tests/bugs/iges/bug26931 +++ b/tests/bugs/iges/bug26931 @@ -1,11 +1,13 @@ ####################################################################### -# OCC26931: [Regression in 6.9.0] Exporting a face throws an exception +puts "OCC26931: Exporting a face throws an e x c e p t i o n" ####################################################################### # restore initial face restore [locate_data_file bug26931.brep] face set square 6416.6 # export face to IGES -brepiges face ${imagedir}/${casename}.igs +set aTmpFile ${imagedir}/${casename}.igs +brepiges face $aTmpFile # import back to check similarity -igesbrep ${imagedir}/${casename}.igs result * +igesbrep $aTmpFile result * +file delete -force ${aTmpFile} diff --git a/tests/bugs/iges/bug26989 b/tests/bugs/iges/bug26989 index 615e1f42a4..f3960d0dda 100644 --- a/tests/bugs/iges/bug26989 +++ b/tests/bugs/iges/bug26989 @@ -1,9 +1,12 @@ ######################################################################################### -# OCC26989: [Regression in 6.9.0] Export of a reversed face leads to wrong data in 6.9.0 +puts "OCC26989: Export of a reversed face leads to wrong data in 6.9.0" ######################################################################################### restore [locate_data_file bug26989.brep] a newmodel -brepiges a ${imagedir}/bug26989.igs -igesbrep ${imagedir}/bug26989.igs result * +set aTmpFile ${imagedir}/${casename}.igs +brepiges a $aTmpFile +igesbrep $aTmpFile result * +file delete -force ${aTmpFile} + checkprops result -s 56.5487 diff --git a/tests/bugs/iges/bug28589 b/tests/bugs/iges/bug28589 index 8c1d5cf528..047e064958 100644 --- a/tests/bugs/iges/bug28589 +++ b/tests/bugs/iges/bug28589 @@ -1,8 +1,12 @@ ####################################################################### -# Data Exchange - Writing face with NaturalRestriction flag to IGES +puts "Data Exchange - Writing face with NaturalRestriction flag to IGES" ####################################################################### restore [locate_data_file bug28589.brep] face -brepiges face ${imagedir}/${casename}.igs -igesbrep ${imagedir}/${casename}.igs result * + +set aTmpFile ${imagedir}/${casename}.igs +brepiges face $aTmpFile +igesbrep $aTmpFile result * +file delete -force ${aTmpFile} + checknbshapes result -shape 10 diff --git a/tests/bugs/step/bug26657 b/tests/bugs/step/bug26657 index 380a5f8be6..3c2cca6b33 100644 --- a/tests/bugs/step/bug26657 +++ b/tests/bugs/step/bug26657 @@ -1,21 +1,19 @@ -pload DCAF -pload TOPTEST -pload XDE puts "========" -puts "OCC26657" +puts "OCC26657: STEP OCAF writers should keep hierarchy and colors when saving non-root elements" puts "========" puts "" -########################################################################## -# STEP OCAF writers should keep hierarchy and colors when saving non-root elements -########################################################################## -pload XDEDRAW + +pload DCAF TOPTEST XDE XDEDRAW ReadStep D1 [locate_data_file bug26657.stp] -WriteStep D1 $imagedir/bug26657_temp.stp a 0:1:1:1:2 + +set aTmpFile ${imagedir}/${casename}_temp.stp +WriteStep D1 $aTmpFile a 0:1:1:1:2 if { [catch { Close D11 } catch_result] } { - puts "Document D11 is not exist" + puts "Document D11 is not exist" } +ReadStep D11 $aTmpFile +file delete -force $aTmpFile -ReadStep D11 $imagedir/bug26657_temp.stp XGetOneShape result D11 checkshape result f @@ -24,5 +22,4 @@ checknbshapes result -solid 3 XShow D11 vfit vsetdispmode 1 -vdump $imagedir/${test_image}.png - +vdump $imagedir/${casename}.png diff --git a/tests/bugs/step/bug29403 b/tests/bugs/step/bug29403 index 40794d8d68..856c31d145 100644 --- a/tests/bugs/step/bug29403 +++ b/tests/bugs/step/bug29403 @@ -1,10 +1,7 @@ puts "==========" -puts "OCC29403" +puts "OCC29403: Subshapes names are not imported from step" puts "==========" puts "" -######################################################### -# Subshapes names are not imported from step -######################################################### param read.stepcaf.subshapes.name 1 param write.stepcaf.subshapes.name 1 @@ -18,9 +15,10 @@ regexp {level N 1 +: +([-0-9.+eE]+)} $info1 full l1 regexp {Total number of labels for shapes in the document += +([-0-9.+eE]+)} $info1 full nb regexp {Number of labels with name += +([-0-9.+eE]+)} $info1 full nbname -WriteStep doc $imagedir/doc_subshapes.stp - -ReadStep after_doc $imagedir/doc_subshapes.stp +set aTmpFile ${imagedir}/${casename}_subshapes.stp +WriteStep doc $aTmpFile +ReadStep after_doc $aTmpFile +file delete -force $aTmpFile set info2 [XStat after_doc] regexp {level N 0 +: +([-0-9.+eE]+)} $info2 full l0_1 @@ -41,7 +39,6 @@ if { ${l0} != ${l0_1} || Close doc Close after_doc -file delete -force $imagedir/doc_subshapes.stp param read.stepcaf.subshapes.name 0 param write.stepcaf.subshapes.name 0 diff --git a/tests/bugs/step/bug31550 b/tests/bugs/step/bug31550 index 2d8c8aaad2..51780be1bd 100644 --- a/tests/bugs/step/bug31550 +++ b/tests/bugs/step/bug31550 @@ -12,7 +12,7 @@ if { [catch { ReadStep D ${filename} } result] } { # Static data set Transparency 0.5 -set TempFilename ${imagedir}/bug31550_temp.stp +set TempFilename ${imagedir}/${casename}_temp.stp # Get colors set Colors [XGetAllColors D] @@ -29,9 +29,10 @@ if { [catch { WriteStep D ${TempFilename} } result] } { if { [catch { ReadStep D1 ${TempFilename} } result] } { puts "ERROR: Couldn't read ${TempFilename} file" } +file delete -force $TempFilename # Get colors set Colors [XGetAllColors D1] if { [string first ${Transparency} ${Colors}] == -1 } { puts "ERROR: OCC31550 is reproduced while STEP export." -} \ No newline at end of file +} diff --git a/tests/bugs/step/bug32679 b/tests/bugs/step/bug32679 index 55eb8310e7..5c1c2d11e3 100644 --- a/tests/bugs/step/bug32679 +++ b/tests/bugs/step/bug32679 @@ -17,11 +17,11 @@ proc CheckName {doc1 doc2 lab} { } proc RunTestWithFile {file} { - global imagedir puts "Testing file $file" XOpen [locate_data_file $file] d1 - WriteStep d1 ${imagedir}/${file}.step - ReadStep d2 ${imagedir}/${file}.step + set aTmpFile ${::imagedir}/${::casename}_${file}.step + WriteStep d1 $aTmpFile + ReadStep d2 $aTmpFile CheckName d1 d2 0:1:1:1:1 CheckName d1 d2 0:1:1:2:1 @@ -29,7 +29,7 @@ proc RunTestWithFile {file} { Close d1 Close d2 - file delete ${imagedir}/${file}.step + file delete -force $aTmpFile } RunTestWithFile as1-no-ass-name.xbf diff --git a/tests/bugs/xde/bug21802 b/tests/bugs/xde/bug21802 index c94af3a8ec..183148f842 100644 --- a/tests/bugs/xde/bug21802 +++ b/tests/bugs/xde/bug21802 @@ -1,17 +1,15 @@ puts "==========" -puts "OCC21802" +puts "OCC21802: Not all names are transferred from STEP to IGES via XDE" puts "==========" puts "" -########################################################### -# Not all names are transferred from STEP to IGES via XDE -########################################################### ReadStep d [locate_data_file bug21802_as1-oc-214.stp] -catch {exec rm ${imagedir}/bug21802_as1-oc-214.igs} -WriteIges d ${imagedir}/bug21802_as1-oc-214.igs + +set aTmpFile ${imagedir}/${casename}.igs +WriteIges d $aTmpFile set is21802fixed "FALSE" -set file21802 [open ${imagedir}/bug21802_as1-oc-214.igs RDONLY] +set file21802 [open $aTmpFile RDONLY] while {[eof $file21802] == 0} { set file21802line [string trim [gets $file21802]] if {[string first "l-bracke" $file21802line] != -1} { @@ -19,6 +17,7 @@ while {[eof $file21802] == 0} { } } close $file21802 +file delete -force ${aTmpFile} if {[string compare $is21802fixed "FALSE"] == 0} { puts "ERROR: OCC21802 is reproduced" diff --git a/tests/bugs/xde/bug23384 b/tests/bugs/xde/bug23384 index f4815e0996..e59641b9e6 100755 --- a/tests/bugs/xde/bug23384 +++ b/tests/bugs/xde/bug23384 @@ -8,13 +8,16 @@ regexp {level N 1 +: +([-0-9.+eE]+)} $info1 full l1 regexp {Total number of labels for shapes in the document += +([-0-9.+eE]+)} $info1 full nb regexp {Number of labels with name += +([-0-9.+eE]+)} $info1 full nbname +set aTmpFile ${imagedir}/${casename}_temp.stp param write.stepcaf.subshapes.name 1 - WriteStep doc $imagedir/doc_subshapes.stp + WriteStep doc $aTmpFile param read.stepcaf.subshapes.name 1 - ReadStep after_doc $imagedir/doc_subshapes.stp + ReadStep after_doc $aTmpFile + +file delete -force $aTmpFile set info2 [XStat after_doc] regexp {level N 0 +: +([-0-9.+eE]+)} $info2 full l0_1 @@ -35,4 +38,3 @@ if { ${l0} != ${l0_1} || Close doc Close after_doc -file delete -force $imagedir/doc_subshapes.stp diff --git a/tests/bugs/xde/bug25910 b/tests/bugs/xde/bug25910 index 710cd28dc4..8511cb2106 100644 --- a/tests/bugs/xde/bug25910 +++ b/tests/bugs/xde/bug25910 @@ -1,18 +1,16 @@ puts "========" -puts "OCC25910" +puts "OCC25910: The material with 0-density causes e r r o r s during writing STEP files" puts "========" puts "" -####################################################################### -# The material with 0-density causes errors during writing STEP files -####################################################################### pload DCAF NewDocument D box b 10 10 10 XSetMaterial D [XAddShape D b] Vacuum 0. -set bug_info [catch {WriteStep D $imagedir/OCC25910.stp}] -if {$bug_info != 0} { - puts "ERROR: OCC25910 is reproduced." -} +set aTmpFile ${imagedir}/${casename}_tmp.stp +set bug_info [catch {WriteStep D $aTmpFile}] +file delete -force $aTmpFile + +if {$bug_info != 0} { puts "ERROR: OCC25910 is reproduced." } diff --git a/tests/bugs/xde/bug26174 b/tests/bugs/xde/bug26174 index 006fe976e5..8575727753 100644 --- a/tests/bugs/xde/bug26174 +++ b/tests/bugs/xde/bug26174 @@ -17,9 +17,6 @@ set anImageD $imagedir/${casename}_D.png set anImageD1 $imagedir/${casename}_D1.png set anImageD2 $imagedir/${casename}_D2.png -catch {exec rm ${aFileD1}} -catch {exec rm ${aFileD2}} - box b 0 0 0 10 10 10 compound b c NewDocument D @@ -36,6 +33,8 @@ WriteIges D ${aFileD2} ReadIges D1 ${aFileD1} ReadIges D2 ${aFileD2} +file delete -force ${aFileD1} +file delete -force ${aFileD2} XShow D1 vfit diff --git a/tests/bugs/xde/bug27447 b/tests/bugs/xde/bug27447 index b8d0a5c5ac..5014ec11db 100644 --- a/tests/bugs/xde/bug27447 +++ b/tests/bugs/xde/bug27447 @@ -1,10 +1,7 @@ puts "========" -puts "OCC27447" +puts "OCC27447: Add support for long IGES entity names" puts "========" puts "" -########################################## -# Add support for long IGES entity names -########################################## pload OCAF @@ -27,12 +24,12 @@ SetName D [XFindShape D link]:2 "Nut instance 1" SetName D [XFindShape D link]:3 "Nut instance 2" # Write IGES file -catch {exec rm ${imagedir}/bug27447_link.igs} -WriteIges D ${imagedir}/bug27447_link.igs +set aTmpFile ${imagedir}/${casename}.igs +WriteIges D $aTmpFile # Processing of IGES file set is_bug27447_fixed "FALSE" -set file_27447 [open ${imagedir}/bug27447_link.igs RDONLY] +set file_27447 [open $aTmpFile RDONLY] while {[eof $file_27447] == 0} { set file_27447_line [string trim [gets $file_27447]] if {[string first "Very long link name" $file_27447_line] != -1} { @@ -40,6 +37,7 @@ while {[eof $file_27447] == 0} { } } close $file_27447 +file delete -force $aTmpFile # Results validation if {[string compare $is_bug27447_fixed "FALSE"] == 0} { diff --git a/tests/bugs/xde/bug27701 b/tests/bugs/xde/bug27701 index 4b8a3281da..0a6fe5176d 100644 --- a/tests/bugs/xde/bug27701 +++ b/tests/bugs/xde/bug27701 @@ -1,18 +1,16 @@ puts "========" -puts "OCC27701" +puts "OCC27701: C r a s h when export empty solid to STEP" puts "========" puts "" -######################################### -# Crash when export empty solid to STEP -######################################### pload DCAF -catch {exec rm ${imagedir}/bug27701.stp} - restore [locate_data_file bug27701.brep] s NewDocument D XAddShape D s XSetColor D 0:1:1:1 1 0 0 s -WriteStep D ${imagedir}/bug27701.stp + +set aTmpFile ${imagedir}/${casename}_tmp.stp +WriteStep D $aTmpFile +file delete -force $aTmpFile diff --git a/tests/bugs/xde/bug28044 b/tests/bugs/xde/bug28044 index 1d3c907fa3..dc75ab78c0 100644 --- a/tests/bugs/xde/bug28044 +++ b/tests/bugs/xde/bug28044 @@ -1,10 +1,7 @@ puts "========" -puts "OCC28044" +puts "OCC28044: Implement data structures in OCAF for Saved Views." puts "========" puts "" -#################################################### -# Implement data structures in OCAF for Saved Views. -#################################################### pload OCAF @@ -35,10 +32,12 @@ XSetViewFrontPlaneDistance D_First 0:1:7:1 10 XSetViewVolumeSidesClipping D_First 0:1:7:1 1 set first_view [XDumpView D_First 0:1:7:1] # Write file -SaveAs D_First ${imagedir}/bug28044.xbf +set aTmpFile ${imagedir}/${casename}.xbf +SaveAs D_First $aTmpFile Close D_First # Read document -XOpen ${imagedir}/bug28044.xbf D_Second +XOpen $aTmpFile D_Second +file delete -force $aTmpFile set second_view [XDumpView D_Second 0:1:7:1] Close D_Second diff --git a/tests/bugs/xde/bug28641 b/tests/bugs/xde/bug28641 index c22e933e11..02f31f3622 100644 --- a/tests/bugs/xde/bug28641 +++ b/tests/bugs/xde/bug28641 @@ -24,10 +24,12 @@ vdump $::imagedir/${::casename}_first.png if { [vreadpixel 300 200 rgb name] != "GRAY63" } { puts "Error: wrong color in 3D Viewer" } # Write file -SaveAs D_First ${imagedir}/bug28521.xbf +set aTmpFile ${imagedir}/${casename}.xbf +SaveAs D_First $aTmpFile Close D_First # Read document -XOpen ${imagedir}/bug28521.xbf D_Second +XOpen $aTmpFile D_Second +file delete -force $aTmpFile # Results validation set isOK 1 diff --git a/tests/bugs/xde/bug29338 b/tests/bugs/xde/bug29338 index 7a31f9d441..64f826e77b 100644 --- a/tests/bugs/xde/bug29338 +++ b/tests/bugs/xde/bug29338 @@ -1,10 +1,8 @@ puts "==========" -puts "OCC29338" +puts "OCC29338: Add Planes for Tolerance zones in Geometric tolerances" puts "==========" puts "" -######################################################### -# Add Planes for Tolerance zones in Geometric tolerances -######################################################### + pload ALL box b 1 1 1 @@ -14,9 +12,10 @@ explode b f XAddGeomTolerance D b_1 plane p 1 2 3 0 1 0 XSetGDTAffectedPlane D 0:1:4:1 p 2 -SaveAs D ${imagedir}/bug29338.xbf +set aTmpFile ${imagedir}/${casename}.xbf +SaveAs D $aTmpFile Close D -XOpen ${imagedir}/bug29338.xbf DD +XOpen $aTmpFile DD set type [XGetGDTAffectedPlane DD 0:1:4:1 plane] if {[lindex $type 0] != "orientation"} { puts "Error: wrong affected plane type" @@ -43,4 +42,4 @@ if {[lindex $check 23] != 0} { puts "Error: wrong affected plane" } Close DD -file delete ${imagedir}/bug29338.xbf +file delete -force $aTmpFile diff --git a/tests/bugs/xde/bug533 b/tests/bugs/xde/bug533 index a370b06293..443118d6c4 100755 --- a/tests/bugs/xde/bug533 +++ b/tests/bugs/xde/bug533 @@ -1,19 +1,16 @@ puts "=========" -puts "OCC533" +puts "OCC533: XmlOcaf-Document is not stored in XDEDRAWEXE although stored in TCAF" puts "=========" puts "" -####################################################### -## XmlOcaf-Document is not stored in XDEDRAWEXE although stored in TCAF -####################################################### - -file delete ${imagedir}/A.xml +set aTmpFile ${imagedir}/${casename}.xml set res 0 catch { NewDocument A XmlOcaf } -if [catch {SaveAs A ${imagedir}/A.xml}] { - puts "OCC533 FAULTY" +if [catch {SaveAs A $aTmpFile}] { + puts "OCC533 FAULTY" } else { - puts "OCC533 OK" + puts "OCC533 OK" } +file delete -force $aTmpFile diff --git a/tests/caf/bugs/A1 b/tests/caf/bugs/A1 index 2e8c20431e..bf0ae15a1a 100755 --- a/tests/caf/bugs/A1 +++ b/tests/caf/bugs/A1 @@ -30,7 +30,7 @@ SetInteger Doc ${aLabel} ${aSetAttr1} NewCommand Doc # Save the document -set aFile ${imagedir}/OCC1228-[file tail [info script]].cbf +set aFile ${imagedir}/OCC1228-${casename}.cbf file delete ${aFile} catch {SaveAs Doc ${aFile}} if { ![file exists ${aFile}] } { diff --git a/tests/caf/bugs/A2 b/tests/caf/bugs/A2 index cf7e6cd961..173e237352 100755 --- a/tests/caf/bugs/A2 +++ b/tests/caf/bugs/A2 @@ -30,7 +30,7 @@ SetReal Doc ${aLabel} ${aSetAttr1} NewCommand Doc # Save the document -set aFile ${imagedir}/OCC1228-[file tail [info script]].cbf +set aFile ${imagedir}/OCC1228-${casename}.cbf file delete ${aFile} catch {SaveAs Doc ${aFile} } if { ![file exists ${aFile}] } { diff --git a/tests/caf/bugs/A3 b/tests/caf/bugs/A3 index 6328ad9500..3ff9eec160 100755 --- a/tests/caf/bugs/A3 +++ b/tests/caf/bugs/A3 @@ -35,7 +35,7 @@ SetRealArray Doc ${aLabel} ${isDelta} ${aFrom1} ${aTo1} ${aSetAttr11} ${aSetAttr NewCommand Doc # Save the document -set aFile ${imagedir}/OCC1228-[file tail [info script]].cbf +set aFile ${imagedir}/OCC1228-${casename}.cbf file delete ${aFile} catch {SaveAs Doc ${aFile}} if { ![file exists ${aFile}] } { diff --git a/tests/caf/bugs/A4 b/tests/caf/bugs/A4 index 4bd46cb684..ea313d8129 100755 --- a/tests/caf/bugs/A4 +++ b/tests/caf/bugs/A4 @@ -35,7 +35,7 @@ SetIntArray Doc ${aLabel} ${isDelta} ${aFrom1} ${aTo1} ${aSetAttr11} ${aSetAttr1 NewCommand Doc # Save the document -set aFile ${imagedir}/OCC1228-[file tail [info script]].cbf +set aFile ${imagedir}/OCC1228-${casename}.cbf file delete ${aFile} catch {SaveAs Doc ${aFile}} if { ![file exists ${aFile}] } { diff --git a/tests/caf/bugs/A5 b/tests/caf/bugs/A5 index fa12895dc1..f5c5d7dd96 100755 --- a/tests/caf/bugs/A5 +++ b/tests/caf/bugs/A5 @@ -31,7 +31,7 @@ SetName Doc ${aLabel} ${aSetAttr1} NewCommand Doc # Save the document -set aFile ${imagedir}/OCC1228-[file tail [info script]].cbf +set aFile ${imagedir}/OCC1228-${casename}.cbf file delete ${aFile} catch {SaveAs Doc ${aFile}} if { ![file exists ${aFile}] } { diff --git a/tests/caf/bugs/A6 b/tests/caf/bugs/A6 index c1a8472e4a..4011bc1c1c 100755 --- a/tests/caf/bugs/A6 +++ b/tests/caf/bugs/A6 @@ -31,7 +31,7 @@ SetComment Doc ${aLabel} ${aSetAttr1} NewCommand Doc # Save the document -set aFile ${imagedir}/OCC1228-[file tail [info script]].cbf +set aFile ${imagedir}/OCC1228-${casename}.cbf file delete ${aFile} catch {SaveAs Doc ${aFile}} if { ![file exists ${aFile}] } { diff --git a/tests/caf/bugs/A7 b/tests/caf/bugs/A7 index 0412d4836f..f5738d0de1 100755 --- a/tests/caf/bugs/A7 +++ b/tests/caf/bugs/A7 @@ -47,7 +47,7 @@ SetPoint Doc ${aLabel} aPoint1 NewCommand Doc # Save the document -set aFile ${imagedir}/OCC1228-[file tail [info script]].cbf +set aFile ${imagedir}/OCC1228-${casename}.cbf file delete ${aFile} catch {SaveAs Doc ${aFile}} if { ![file exists ${aFile}] } { diff --git a/tests/caf/bugs/A8 b/tests/caf/bugs/A8 index 914fc020e1..3296db16c0 100755 --- a/tests/caf/bugs/A8 +++ b/tests/caf/bugs/A8 @@ -55,7 +55,7 @@ SetAxis Doc ${aLabel} aLine1 NewCommand Doc # Save the document -set aFile ${imagedir}/OCC1228-[file tail [info script]].cbf +set aFile ${imagedir}/OCC1228-${casename}.cbf file delete ${aFile} catch {SaveAs Doc ${aFile}} if { ![file exists ${aFile}] } { diff --git a/tests/caf/bugs/A9 b/tests/caf/bugs/A9 index 8566a73e78..9564f88d80 100755 --- a/tests/caf/bugs/A9 +++ b/tests/caf/bugs/A9 @@ -58,7 +58,7 @@ SetPlane Doc ${aLabel} aPlane1 NewCommand Doc # Save the document -set aFile ${imagedir}/OCC1228-[file tail [info script]].cbf +set aFile ${imagedir}/OCC1228-${casename}.cbf file delete ${aFile} catch {SaveAs Doc ${aFile}} if { ![file exists ${aFile}] } { diff --git a/tests/caf/bugs/B1 b/tests/caf/bugs/B1 index 87d277bef0..7a39b83aed 100755 --- a/tests/caf/bugs/B1 +++ b/tests/caf/bugs/B1 @@ -30,7 +30,7 @@ SetUAttribute Doc ${aLabel} ${aSetAttr1} NewCommand Doc # Save the document -set aFile ${imagedir}/OCC1228-[file tail [info script]].cbf +set aFile ${imagedir}/OCC1228-${casename}.cbf file delete ${aFile} catch {SaveAs Doc ${aFile}} if { ![file exists ${aFile}] } { diff --git a/tests/caf/bugs/B2 b/tests/caf/bugs/B2 index 68f032365a..2c59ec5f57 100755 --- a/tests/caf/bugs/B2 +++ b/tests/caf/bugs/B2 @@ -34,7 +34,7 @@ SetUAttribute Doc ${aLabel} ${aSetAttr2} NewCommand Doc # Save the document -set aFile ${imagedir}/OCC1228-[file tail [info script]].cbf +set aFile ${imagedir}/OCC1228-${casename}.cbf file delete ${aFile} catch {SaveAs Doc ${aFile}} if { ![file exists ${aFile}] } { diff --git a/tests/caf/bugs/B3 b/tests/caf/bugs/B3 index 845e26d482..ae4bb4168c 100755 --- a/tests/caf/bugs/B3 +++ b/tests/caf/bugs/B3 @@ -40,7 +40,7 @@ SetShape Doc ${aLabel} aBox1 NewCommand Doc # Save the document -set aFile ${imagedir}/OCC1228-[file tail [info script]].cbf +set aFile ${imagedir}/OCC1228-${casename}.cbf file delete ${aFile} catch {SaveAs Doc ${aFile}} if { ![file exists ${aFile}] } { diff --git a/tests/caf/bugs/B4 b/tests/caf/bugs/B4 index 91cd1c407c..c30e718e26 100755 --- a/tests/caf/bugs/B4 +++ b/tests/caf/bugs/B4 @@ -40,7 +40,7 @@ SetReference Doc ${aLabel4} ${aReference1} NewCommand Doc # Save the document -set aFile ${imagedir}/OCC1228-[file tail [info script]].cbf +set aFile ${imagedir}/OCC1228-${casename}.cbf file delete ${aFile} catch {SaveAs Doc ${aFile}} if { ![file exists ${aFile}] } { diff --git a/tests/caf/bugs/B5 b/tests/caf/bugs/B5 index 38c797c12e..a76c0393b7 100755 --- a/tests/caf/bugs/B5 +++ b/tests/caf/bugs/B5 @@ -46,7 +46,7 @@ SetShape Doc ${aLabel} aBox1 NewCommand Doc # Save the document -set aFile ${imagedir}/OCC1228-[file tail [info script]].cbf +set aFile ${imagedir}/OCC1228-${casename}.cbf file delete ${aFile} catch {SaveAs Doc ${aFile}} #catch {exec chmod 777 ${aFile}} diff --git a/tests/caf/bugs/B6 b/tests/caf/bugs/B6 index 9ca4500988..12e9b16340 100755 --- a/tests/caf/bugs/B6 +++ b/tests/caf/bugs/B6 @@ -40,7 +40,7 @@ AISSet Doc ${aLabel} NS AISDisplay Doc ${aLabel} # Save the document -set aFile ${imagedir}/OCC1228-[file tail [info script]].cbf +set aFile ${imagedir}/OCC1228-${casename}.cbf file delete ${aFile} catch {SaveAs Doc ${aFile}} if { ![file exists ${aFile}] } { diff --git a/tests/caf/bugs/B7 b/tests/caf/bugs/B7 index 16db31dcb0..65973d458b 100755 --- a/tests/caf/bugs/B7 +++ b/tests/caf/bugs/B7 @@ -54,7 +54,7 @@ CopyWithLink Doc1 ${aLabel2} Doc1 ${aLabel1} NewCommand Doc1 # Save the document -set aFile ${imagedir}/OCC1228-[file tail [info script]].cbf +set aFile ${imagedir}/OCC1228-${casename}.cbf file delete ${aFile} catch {SaveAs Doc1 ${aFile}} if { ![file exists ${aFile}] } { diff --git a/tests/caf/bugs/B8 b/tests/caf/bugs/B8 index 4f3b0804fd..5deaf69870 100755 --- a/tests/caf/bugs/B8 +++ b/tests/caf/bugs/B8 @@ -37,7 +37,7 @@ SetName Doc ${aChild1} ${aName11} NewCommand Doc # Save the document -set aFile ${imagedir}/OCC1228-[file tail [info script]].cbf +set aFile ${imagedir}/OCC1228-${casename}.cbf file delete ${aFile} catch {SaveAs Doc ${aFile}} if { ![file exists ${aFile}] } { diff --git a/tests/caf/bugs/B9 b/tests/caf/bugs/B9 index 2a01fe17ff..e086e357d5 100755 --- a/tests/caf/bugs/B9 +++ b/tests/caf/bugs/B9 @@ -30,7 +30,7 @@ SetName Doc ${aLabel1} ${aName1} NewCommand Doc # Save the document -set aFile ${imagedir}/OCC1228-[file tail [info script]].cbf +set aFile ${imagedir}/OCC1228-${casename}.cbf file delete ${aFile} catch {SaveAs Doc ${aFile}} if { ![file exists ${aFile}] } { diff --git a/tests/caf/presentation/M1 b/tests/caf/presentation/M1 index 9723450c65..fb0ec08681 100644 --- a/tests/caf/presentation/M1 +++ b/tests/caf/presentation/M1 @@ -14,7 +14,7 @@ AISSet D1 0:1 NS AISDisplay D1 0:1 AISMode D1 0:1 1 -set aFile ${imagedir}/testmode.xml +set aFile ${imagedir}/${casename}.xml file delete ${aFile} SaveAs D1 ${aFile} if { ![file exists ${aFile}] } { diff --git a/tests/caf/progress/A1 b/tests/caf/progress/A1 index ad79274857..ce69578ef5 100644 --- a/tests/caf/progress/A1 +++ b/tests/caf/progress/A1 @@ -19,7 +19,7 @@ box b 1 1 1 SetShape Doc 0:1 b # SaveAs -set output [SaveAs Doc ${imagedir}/testA1.cbf] +set output [SaveAs Doc ${imagedir}/${casename}_tmp.cbf] # Close the document Close Doc diff --git a/tests/caf/progress/A2 b/tests/caf/progress/A2 index 9ee66649c9..527672c8b5 100644 --- a/tests/caf/progress/A2 +++ b/tests/caf/progress/A2 @@ -20,7 +20,7 @@ box b 1 1 1 SetShape Doc 0:1 b # SaveAs -set output [SaveAs Doc ${imagedir}/testA2.xml] +set output [SaveAs Doc ${imagedir}/${casename}_tmp.xml] # Close the document Close Doc diff --git a/tests/perf/caf/bug2793 b/tests/perf/caf/bug2793 index cb0f55134d..6b0c15b5a6 100644 --- a/tests/perf/caf/bug2793 +++ b/tests/perf/caf/bug2793 @@ -39,8 +39,8 @@ NewShape D ${lab7} shape7 NewShape D ${lab8} shape8 # Save document -file delete -force ${imagedir}/2793.cbf dchrono h restart -SaveAs D ${imagedir}/2793.cbf +SaveAs D ${imagedir}/${casename}.cbf dchrono h stop counter SaveAs -Close D \ No newline at end of file +Close D +file delete -force ${imagedir}/${casename}.cbf diff --git a/tests/perf/de/bug29830_3 b/tests/perf/de/bug29830_3 index 99d721b3de..fff4e1f659 100644 --- a/tests/perf/de/bug29830_3 +++ b/tests/perf/de/bug29830_3 @@ -16,9 +16,12 @@ XNewDoc D XAddShape D co puts "Writing STEP model" -WriteStep D . +set aTmpFile ${imagedir}/${casename}_tmp.stp +WriteStep D $aTmpFile Close D puts "Destructing model" #crash newmodel + +file delete -force $aTmpFile diff --git a/tests/perf/de/bug29830_dir/script b/tests/perf/de/bug29830_dir/script index c98714f758..a94165cd7c 100644 --- a/tests/perf/de/bug29830_dir/script +++ b/tests/perf/de/bug29830_dir/script @@ -19,6 +19,8 @@ set nz 10 if [info exists D] {Close D} if [info exists D1] {Close D1} +set aTmpFile ${imagedir}/${casename}_tmp.stp + for {set npass 1} {$npass <= 2} {incr npass} { set nx [expr $nx0 * $npass] @@ -64,13 +66,13 @@ for {set npass 1} {$npass <= 2} {incr npass} { puts "Writing STEP model" chrono cr1 restart - WriteStep D . + WriteStep D $aTmpFile chrono cr1 stop Close D puts "Reading STEP model" chrono cr2 restart - ReadStep D1 . + ReadStep D1 $aTmpFile chrono cr2 stop # check one solid with different locations @@ -93,6 +95,7 @@ for {set npass 1} {$npass <= 2} {incr npass} { set time_write_$npass [lindex [dchrono cr1 counter "WriteStep_$npass"] end] set time_read_$npass [lindex [dchrono cr2 counter "ReadStep_$npass"] end] + file delete -force $aTmpFile } puts "time_write_1=$time_write_1" From 65acdce54ce83d04ca15d15def24440f55ed9017 Mon Sep 17 00:00:00 2001 From: kgv Date: Thu, 2 Dec 2021 15:51:11 +0300 Subject: [PATCH 153/639] 0032352: Coding Rules - clean up code from compatibility hacks with pre-C++11 compilers Removed usage of std::auto_ptr. opencascade::std workarounds for VS2008 have been dropped, when possible. OCCT_NO_RVALUE_REFERENCE workaround for VS2008 has been removed. --- src/BRepFill/BRepFill_Filling.hxx | 2 +- src/BRepTools/BRepTools.cxx | 4 +- src/BVH/BVH_BinaryTree.hxx | 18 ++++---- src/BVH/BVH_Types.hxx | 7 --- .../BinLDrivers_DocumentRetrievalDriver.cxx | 2 +- .../BinLDrivers_DocumentStorageDriver.cxx | 2 +- src/BinTools/BinTools.cxx | 4 +- src/ChFi3d/ChFi3d_ChBuilder.cxx | 28 ------------ src/DBRep/DBRep.cxx | 2 +- src/DDocStd/DDocStd_ApplicationCommands.cxx | 4 +- src/Draw/Draw_VariableCommands.cxx | 4 +- src/IGESControl/IGESControl_Writer.cxx | 2 +- src/IGESSelect/IGESSelect_WorkLibrary.cxx | 2 +- src/Image/Image_DDSParser.cxx | 2 +- src/Image/Image_Texture.cxx | 8 ++-- src/IntStart/IntStart_SearchOnBoundaries.gxx | 4 -- src/IntTools/IntTools_FClass2d.cxx | 19 ++++---- src/IntTools/IntTools_FClass2d.hxx | 43 ++----------------- src/LDOM/LDOMParser.cxx | 2 +- src/NCollection/NCollection_AliasedArray.hxx | 4 -- src/NCollection/NCollection_Array1.hxx | 4 -- src/NCollection/NCollection_Array2.hxx | 4 -- src/NCollection/NCollection_StlIterator.hxx | 8 ++-- src/NCollection/NCollection_UBTreeFiller.hxx | 8 ++-- src/NCollection/NCollection_UtfIterator.hxx | 6 +-- src/NCollection/NCollection_UtfString.hxx | 4 -- src/NCollection/NCollection_UtfString.lxx | 2 - src/OSD/OSD_CachedFileSystem.cxx | 24 +++++------ src/OSD/OSD_CachedFileSystem.hxx | 20 ++++----- src/OSD/OSD_FileSystem.cxx | 26 +++++------ src/OSD/OSD_FileSystem.hxx | 20 ++++----- src/OSD/OSD_FileSystemSelector.cxx | 40 ++++++++--------- src/OSD/OSD_FileSystemSelector.hxx | 14 +++--- src/OSD/OSD_LocalFileSystem.cxx | 24 +++++------ src/OSD/OSD_LocalFileSystem.hxx | 6 +-- src/OSD/OSD_Parallel.hxx | 4 -- src/OSD/OSD_StreamBuffer.hxx | 6 +-- src/Poly/Poly_ArrayOfNodes.hxx | 2 - src/Poly/Poly_ArrayOfUVNodes.hxx | 2 - src/QABugs/QABugs_1.cxx | 2 +- src/QABugs/QABugs_19.cxx | 2 +- src/QABugs/QABugs_20.cxx | 2 +- src/QANCollection/QANCollection_Handle.cxx | 4 +- src/RWGltf/RWGltf_CafReader.cxx | 2 +- src/RWGltf/RWGltf_CafWriter.cxx | 6 +-- src/RWGltf/RWGltf_CafWriter.hxx | 3 +- src/RWGltf/RWGltf_TriangulationReader.cxx | 4 +- src/RWStl/RWStl.cxx | 2 +- src/RWStl/RWStl_Reader.cxx | 2 +- src/Standard/Standard_Handle.hxx | 8 ---- src/Standard/Standard_Macro.hxx | 13 +++--- src/Standard/Standard_Std.hxx | 31 ------------- src/Standard/Standard_Type.hxx | 5 --- src/Standard/Standard_TypeDef.hxx | 16 +------ src/StepSelect/StepSelect_WorkLibrary.cxx | 2 +- src/TCollection/TCollection_AsciiString.hxx | 4 -- .../TCollection_ExtendedString.hxx | 4 -- src/TObjDRAW/TObjDRAW.cxx | 4 +- src/TopLoc/TopLoc_SListOfItemLocation.hxx | 4 -- src/TopoDS/TopoDS_Shape.hxx | 4 -- src/ViewerTest/ViewerTest_OpenGlCommands.cxx | 6 +-- src/VrmlAPI/VrmlAPI_Writer.cxx | 6 +-- .../XmlLDrivers_DocumentRetrievalDriver.cxx | 2 +- .../XmlLDrivers_DocumentStorageDriver.cxx | 3 +- 64 files changed, 174 insertions(+), 354 deletions(-) diff --git a/src/BRepFill/BRepFill_Filling.hxx b/src/BRepFill/BRepFill_Filling.hxx index 558cdc3a18..74a4b31a4b 100644 --- a/src/BRepFill/BRepFill_Filling.hxx +++ b/src/BRepFill/BRepFill_Filling.hxx @@ -183,7 +183,7 @@ private: private: - opencascade::std::shared_ptr myBuilder; + std::shared_ptr myBuilder; BRepFill_SequenceOfEdgeFaceAndOrder myBoundary; BRepFill_SequenceOfEdgeFaceAndOrder myConstraints; BRepFill_SequenceOfFaceAndOrder myFreeConstraints; diff --git a/src/BRepTools/BRepTools.cxx b/src/BRepTools/BRepTools.cxx index 7b75cc325b..a6ad77c8f8 100644 --- a/src/BRepTools/BRepTools.cxx +++ b/src/BRepTools/BRepTools.cxx @@ -712,7 +712,7 @@ Standard_Boolean BRepTools::Write (const TopoDS_Shape& theShape, const Message_ProgressRange& theProgress) { const Handle(OSD_FileSystem)& aFileSystem = OSD_FileSystem::DefaultFileSystem(); - opencascade::std::shared_ptr aStream = aFileSystem->OpenOStream (theFile, std::ios::out); + std::shared_ptr aStream = aFileSystem->OpenOStream (theFile, std::ios::out); if (aStream.get() == NULL || !aStream->good()) { return Standard_False; @@ -754,7 +754,7 @@ Standard_Boolean BRepTools::Read(TopoDS_Shape& Sh, const Message_ProgressRange& theProgress) { const Handle(OSD_FileSystem)& aFileSystem = OSD_FileSystem::DefaultFileSystem(); - opencascade::std::shared_ptr aStream = aFileSystem->OpenIStream (File, std::ios::in); + std::shared_ptr aStream = aFileSystem->OpenIStream (File, std::ios::in); if (aStream.get() == NULL) { return Standard_False; diff --git a/src/BVH/BVH_BinaryTree.hxx b/src/BVH/BVH_BinaryTree.hxx index c9db4cad40..80d36aca17 100644 --- a/src/BVH/BVH_BinaryTree.hxx +++ b/src/BVH/BVH_BinaryTree.hxx @@ -215,21 +215,21 @@ BVH_Tree* BVH_Tree::CollapseToQuadTree { const std::pair aNode = aQueue.front(); - BVH::Array::Append (aQBVH->myMinPointBuffer, BVH::Array::Value (this->myMinPointBuffer, opencascade::std::get<0> (aNode))); - BVH::Array::Append (aQBVH->myMaxPointBuffer, BVH::Array::Value (this->myMaxPointBuffer, opencascade::std::get<0> (aNode))); + BVH::Array::Append (aQBVH->myMinPointBuffer, BVH::Array::Value (this->myMinPointBuffer, std::get<0> (aNode))); + BVH::Array::Append (aQBVH->myMaxPointBuffer, BVH::Array::Value (this->myMaxPointBuffer, std::get<0> (aNode))); BVH_Vec4i aNodeInfo; - if (this->IsOuter (opencascade::std::get<0> (aNode))) // is leaf node + if (this->IsOuter (std::get<0> (aNode))) // is leaf node { aNodeInfo = BVH_Vec4i (1 /* leaf flag */, - this->BegPrimitive (opencascade::std::get<0> (aNode)), this->EndPrimitive (opencascade::std::get<0> (aNode)), opencascade::std::get<1> (aNode) /* level */); + this->BegPrimitive (std::get<0> (aNode)), this->EndPrimitive (std::get<0> (aNode)), std::get<1> (aNode) /* level */); } else { NCollection_Vector aGrandChildNodes; - const int aLftChild = Child<0> (opencascade::std::get<0> (aNode)); - const int aRghChild = Child<1> (opencascade::std::get<0> (aNode)); + const int aLftChild = Child<0> (std::get<0> (aNode)); + const int aRghChild = Child<1> (std::get<0> (aNode)); if (this->IsOuter (aLftChild)) // is leaf node { aGrandChildNodes.Append (aLftChild); @@ -252,13 +252,13 @@ BVH_Tree* BVH_Tree::CollapseToQuadTree for (int aNodeIdx = 0; aNodeIdx < aGrandChildNodes.Size(); ++aNodeIdx) { - aQueue.push_back (std::make_pair (aGrandChildNodes (aNodeIdx), opencascade::std::get<1> (aNode) + 1)); + aQueue.push_back (std::make_pair (aGrandChildNodes (aNodeIdx), std::get<1> (aNode) + 1)); } aNodeInfo = BVH_Vec4i (0 /* inner flag */, - aNbNodes, aGrandChildNodes.Size() - 1, opencascade::std::get<1> (aNode) /* level */); + aNbNodes, aGrandChildNodes.Size() - 1, std::get<1> (aNode) /* level */); - aQBVH->myDepth = Max (aQBVH->myDepth, opencascade::std::get<1> (aNode) + 1); + aQBVH->myDepth = Max (aQBVH->myDepth, std::get<1> (aNode) + 1); aNbNodes += aGrandChildNodes.Size(); } diff --git a/src/BVH/BVH_Types.hxx b/src/BVH/BVH_Types.hxx index 10dc849169..12e7260412 100644 --- a/src/BVH/BVH_Types.hxx +++ b/src/BVH/BVH_Types.hxx @@ -275,14 +275,7 @@ namespace BVH if (Size (theArray) == theCount) { #ifdef _STD_VECTOR_SHRINK - -#if(defined(_MSC_VER) && (_MSC_VER < 1600)) - BVH_ArrayNt aTmpArray(theArray); - theArray.swap(aTmpArray); -#else theArray.shrink_to_fit(); -#endif - #endif } else diff --git a/src/BinLDrivers/BinLDrivers_DocumentRetrievalDriver.cxx b/src/BinLDrivers/BinLDrivers_DocumentRetrievalDriver.cxx index 9d35102059..0c75fcfefa 100644 --- a/src/BinLDrivers/BinLDrivers_DocumentRetrievalDriver.cxx +++ b/src/BinLDrivers/BinLDrivers_DocumentRetrievalDriver.cxx @@ -78,7 +78,7 @@ void BinLDrivers_DocumentRetrievalDriver::Read const Message_ProgressRange& theRange) { const Handle(OSD_FileSystem)& aFileSystem = OSD_FileSystem::DefaultFileSystem(); - opencascade::std::shared_ptr aFileStream = aFileSystem->OpenIStream (theFileName, std::ios::in | std::ios::binary); + std::shared_ptr aFileStream = aFileSystem->OpenIStream (theFileName, std::ios::in | std::ios::binary); if (aFileStream.get() != NULL && aFileStream->good()) { diff --git a/src/BinLDrivers/BinLDrivers_DocumentStorageDriver.cxx b/src/BinLDrivers/BinLDrivers_DocumentStorageDriver.cxx index 2dd4bacd8b..0a5ec15f77 100644 --- a/src/BinLDrivers/BinLDrivers_DocumentStorageDriver.cxx +++ b/src/BinLDrivers/BinLDrivers_DocumentStorageDriver.cxx @@ -75,7 +75,7 @@ void BinLDrivers_DocumentStorageDriver::Write myFileName = theFileName; const Handle(OSD_FileSystem)& aFileSystem = OSD_FileSystem::DefaultFileSystem(); - opencascade::std::shared_ptr aFileStream = aFileSystem->OpenOStream (theFileName, std::ios::out | std::ios::binary); + std::shared_ptr aFileStream = aFileSystem->OpenOStream (theFileName, std::ios::out | std::ios::binary); if (aFileStream.get() != NULL && aFileStream->good()) { diff --git a/src/BinTools/BinTools.cxx b/src/BinTools/BinTools.cxx index 686a0c600d..6fde4f9dd6 100644 --- a/src/BinTools/BinTools.cxx +++ b/src/BinTools/BinTools.cxx @@ -215,7 +215,7 @@ Standard_Boolean BinTools::Write (const TopoDS_Shape& theShape, const Message_ProgressRange& theRange) { const Handle(OSD_FileSystem)& aFileSystem = OSD_FileSystem::DefaultFileSystem(); - opencascade::std::shared_ptr aStream = aFileSystem->OpenOStream (theFile, std::ios::out | std::ios::binary); + std::shared_ptr aStream = aFileSystem->OpenOStream (theFile, std::ios::out | std::ios::binary); aStream->precision (15); if (aStream.get() == NULL || !aStream->good()) return Standard_False; @@ -234,7 +234,7 @@ Standard_Boolean BinTools::Read (TopoDS_Shape& theShape, const Standard_CString const Message_ProgressRange& theRange) { const Handle(OSD_FileSystem)& aFileSystem = OSD_FileSystem::DefaultFileSystem(); - opencascade::std::shared_ptr aStream = aFileSystem->OpenIStream (theFile, std::ios::in | std::ios::binary); + std::shared_ptr aStream = aFileSystem->OpenIStream (theFile, std::ios::in | std::ios::binary); if (aStream.get() == NULL) { return Standard_False; diff --git a/src/ChFi3d/ChFi3d_ChBuilder.cxx b/src/ChFi3d/ChFi3d_ChBuilder.cxx index 29bdbac19d..dfef8e25d1 100644 --- a/src/ChFi3d/ChFi3d_ChBuilder.cxx +++ b/src/ChFi3d/ChFi3d_ChBuilder.cxx @@ -789,13 +789,8 @@ ChFi3d_ChBuilder::SimulSurf(Handle(ChFiDS_SurfData)& Data, radius = Max(dis, radiusspine); locfleche = radius*1.e-2; //graphic criterion -#if (defined(_MSC_VER) && (_MSC_VER < 1600)) - std::auto_ptr pFunc; - std::auto_ptr pFInv; -#else std::unique_ptr pFunc; std::unique_ptr pFInv; -#endif if (chsp->Mode() == ChFiDS_ClassicChamfer) { pFunc.reset(new BRepBlend_Chamfer(S1,S2,HGuide)); @@ -886,13 +881,8 @@ ChFi3d_ChBuilder::SimulSurf(Handle(ChFiDS_SurfData)& Data, radius = Max(radius, radiusspine); locfleche = radius*1.e-2; //graphic criterion -#if (defined(_MSC_VER) && (_MSC_VER < 1600)) - std::auto_ptr pFunc; - std::auto_ptr pFInv; -#else std::unique_ptr pFunc; std::unique_ptr pFInv; -#endif if (chsp->Mode() == ChFiDS_ClassicChamfer) { pFunc.reset(new BRepBlend_Chamfer(S1,S2,HGuide)); @@ -1202,11 +1192,7 @@ Standard_Boolean ChFi3d_ChBuilder::PerformFirstSection Standard_Real dis; chsp->GetDist(dis); -#if (defined(_MSC_VER) && (_MSC_VER < 1600)) - std::auto_ptr pFunc; -#else std::unique_ptr pFunc; -#endif if (chsp->Mode() == ChFiDS_ClassicChamfer) { pFunc.reset(new BRepBlend_Chamfer(S1,S2,HGuide)); @@ -1274,11 +1260,7 @@ Standard_Boolean ChFi3d_ChBuilder::PerformFirstSection Standard_Real dis1, dis2; chsp->Dists(dis1, dis2); -#if (defined(_MSC_VER) && (_MSC_VER < 1600)) - std::auto_ptr pFunc; -#else std::unique_ptr pFunc; -#endif if (chsp->Mode() == ChFiDS_ClassicChamfer) { pFunc.reset(new BRepBlend_Chamfer(S1,S2,HGuide)); @@ -1493,13 +1475,8 @@ ChFi3d_ChBuilder::PerformSurf(ChFiDS_SequenceOfSurfData& SeqData, if (chsp->IsChamfer() == ChFiDS_Sym) { -#if (defined(_MSC_VER) && (_MSC_VER < 1600)) - std::auto_ptr pFunc; - std::auto_ptr pFInv; -#else std::unique_ptr pFunc; std::unique_ptr pFInv; -#endif if (chsp->Mode() == ChFiDS_ClassicChamfer) { pFunc.reset(new BRepBlend_Chamfer(S1,S2,HGuide)); @@ -1527,13 +1504,8 @@ ChFi3d_ChBuilder::PerformSurf(ChFiDS_SequenceOfSurfData& SeqData, Standard_Real d1, d2; chsp->Dists(d1,d2); -#if (defined(_MSC_VER) && (_MSC_VER < 1600)) - std::auto_ptr pFunc; - std::auto_ptr pFInv; -#else std::unique_ptr pFunc; std::unique_ptr pFInv; -#endif if (chsp->Mode() == ChFiDS_ClassicChamfer) { pFunc.reset(new BRepBlend_Chamfer(S1,S2,HGuide)); diff --git a/src/DBRep/DBRep.cxx b/src/DBRep/DBRep.cxx index e2e03fff0d..9633b081c9 100644 --- a/src/DBRep/DBRep.cxx +++ b/src/DBRep/DBRep.cxx @@ -1580,7 +1580,7 @@ static Standard_Integer readbrep (Draw_Interpretor& theDI, { // probe file header to recognize format const Handle(OSD_FileSystem)& aFileSystem = OSD_FileSystem::DefaultFileSystem(); - opencascade::std::shared_ptr aFile = aFileSystem->OpenIStream (aFileName, std::ios::in | std::ios::binary); + std::shared_ptr aFile = aFileSystem->OpenIStream (aFileName, std::ios::in | std::ios::binary); if (aFile.get() == NULL) { theDI << "Error: cannot read the file '" << aFileName << "'"; diff --git a/src/DDocStd/DDocStd_ApplicationCommands.cxx b/src/DDocStd/DDocStd_ApplicationCommands.cxx index 9f093fee64..35be9fd189 100644 --- a/src/DDocStd/DDocStd_ApplicationCommands.cxx +++ b/src/DDocStd/DDocStd_ApplicationCommands.cxx @@ -180,7 +180,7 @@ static Standard_Integer DDocStd_Open (Draw_Interpretor& di, if (anUseStream) { const Handle(OSD_FileSystem)& aFileSystem = OSD_FileSystem::DefaultFileSystem(); - opencascade::std::shared_ptr aFileStream = aFileSystem->OpenIStream (path, std::ios::in | std::ios::binary); + std::shared_ptr aFileStream = aFileSystem->OpenIStream (path, std::ios::in | std::ios::binary); theStatus = A->Open (*aFileStream, D, aFilter, aProgress->Start()); } @@ -298,7 +298,7 @@ static Standard_Integer DDocStd_SaveAs (Draw_Interpretor& di, if (anUseStream) { const Handle(OSD_FileSystem)& aFileSystem = OSD_FileSystem::DefaultFileSystem(); - opencascade::std::shared_ptr aFileStream = aFileSystem->OpenOStream (path, std::ios::out | std::ios::binary); + std::shared_ptr aFileStream = aFileSystem->OpenOStream (path, std::ios::out | std::ios::binary); theStatus = A->SaveAs (D, *aFileStream, aProgress->Start()); } else diff --git a/src/Draw/Draw_VariableCommands.cxx b/src/Draw/Draw_VariableCommands.cxx index 7368c92ad5..8f0b4f68ec 100644 --- a/src/Draw/Draw_VariableCommands.cxx +++ b/src/Draw/Draw_VariableCommands.cxx @@ -92,7 +92,7 @@ static Standard_Integer save (Draw_Interpretor& theDI, const char* aName = theArgVec[2]; const Handle(OSD_FileSystem)& aFileSystem = OSD_FileSystem::DefaultFileSystem(); - opencascade::std::shared_ptr aStream = aFileSystem->OpenOStream (aName, std::ios::out); + std::shared_ptr aStream = aFileSystem->OpenOStream (aName, std::ios::out); aStream->precision (15); if (aStream.get() == NULL || !aStream->good()) { @@ -145,7 +145,7 @@ static Standard_Integer restore (Draw_Interpretor& theDI, const char* aVarName = theArgVec[2]; const Handle(OSD_FileSystem)& aFileSystem = OSD_FileSystem::DefaultFileSystem(); - opencascade::std::shared_ptr aStream = aFileSystem->OpenIStream (aFileName, std::ios::in); + std::shared_ptr aStream = aFileSystem->OpenIStream (aFileName, std::ios::in); if (aStream.get() == NULL) { theDI << "Error: cannot open file for reading: '" << aFileName << "'"; diff --git a/src/IGESControl/IGESControl_Writer.cxx b/src/IGESControl/IGESControl_Writer.cxx index 565c1c216b..735f49ac06 100644 --- a/src/IGESControl/IGESControl_Writer.cxx +++ b/src/IGESControl/IGESControl_Writer.cxx @@ -254,7 +254,7 @@ Standard_Boolean IGESControl_Writer::Write (const Standard_CString file, const Standard_Boolean fnes) { const Handle(OSD_FileSystem)& aFileSystem = OSD_FileSystem::DefaultFileSystem(); - opencascade::std::shared_ptr aStream = aFileSystem->OpenOStream (file, std::ios::out); + std::shared_ptr aStream = aFileSystem->OpenOStream (file, std::ios::out); if (aStream.get() == NULL) { return Standard_False; diff --git a/src/IGESSelect/IGESSelect_WorkLibrary.cxx b/src/IGESSelect/IGESSelect_WorkLibrary.cxx index ddb43057b0..50f583078c 100644 --- a/src/IGESSelect/IGESSelect_WorkLibrary.cxx +++ b/src/IGESSelect/IGESSelect_WorkLibrary.cxx @@ -102,7 +102,7 @@ static Handle(IGESData_FileProtocol) IGESProto; if (igesmod.IsNull() || prot.IsNull()) return Standard_False; const Handle(OSD_FileSystem)& aFileSystem = OSD_FileSystem::DefaultFileSystem(); - opencascade::std::shared_ptr aStream = aFileSystem->OpenOStream (ctx.FileName(), std::ios::out); + std::shared_ptr aStream = aFileSystem->OpenOStream (ctx.FileName(), std::ios::out); if (aStream.get() == NULL) { ctx.CCheck(0)->AddFail("IGES File could not be created"); diff --git a/src/Image/Image_DDSParser.cxx b/src/Image/Image_DDSParser.cxx index c2716f4eb0..3dac22947c 100644 --- a/src/Image/Image_DDSParser.cxx +++ b/src/Image/Image_DDSParser.cxx @@ -68,7 +68,7 @@ Handle(Image_CompressedPixMap) Image_DDSParser::Load (const Handle(Image_Support const int64_t theFileOffset) { const Handle(OSD_FileSystem)& aFileSystem = OSD_FileSystem::DefaultFileSystem(); - opencascade::std::shared_ptr aFile = aFileSystem->OpenIStream (theFile, std::ios::in | std::ios::binary); + std::shared_ptr aFile = aFileSystem->OpenIStream (theFile, std::ios::in | std::ios::binary); char aHeader[128] = {}; if (aFile.get() == NULL || !aFile->good()) { diff --git a/src/Image/Image_Texture.cxx b/src/Image/Image_Texture.cxx index 9892b63e76..34948c016a 100644 --- a/src/Image/Image_Texture.cxx +++ b/src/Image/Image_Texture.cxx @@ -186,7 +186,7 @@ Handle(Image_PixMap) Image_Texture::loadImageOffset (const TCollection_AsciiStri } const Handle(OSD_FileSystem)& aFileSystem = OSD_FileSystem::DefaultFileSystem(); - opencascade::std::shared_ptr aFile = aFileSystem->OpenIStream (thePath, std::ios::in | std::ios::binary); + std::shared_ptr aFile = aFileSystem->OpenIStream (thePath, std::ios::in | std::ios::binary); if (aFile.get() == NULL) { Message::SendFail (TCollection_AsciiString ("Error: Image file '") + thePath + "' cannot be opened"); @@ -252,7 +252,7 @@ TCollection_AsciiString Image_Texture::ProbeImageFileFormat() const else { const Handle(OSD_FileSystem)& aFileSystem = OSD_FileSystem::DefaultFileSystem(); - opencascade::std::shared_ptr aFileIn = aFileSystem->OpenIStream (myImagePath, std::ios::in | std::ios::binary); + std::shared_ptr aFileIn = aFileSystem->OpenIStream (myImagePath, std::ios::in | std::ios::binary); if (aFileIn.get() == NULL) { Message::SendFail (TCollection_AsciiString ("Error: Unable to open file '") + myImagePath + "'"); @@ -316,7 +316,7 @@ TCollection_AsciiString Image_Texture::ProbeImageFileFormat() const Standard_Boolean Image_Texture::WriteImage (const TCollection_AsciiString& theFile) { const Handle(OSD_FileSystem)& aFileSystem = OSD_FileSystem::DefaultFileSystem(); - opencascade::std::shared_ptr aFileOut = aFileSystem->OpenOStream (theFile, std::ios::out | std::ios::binary | std::ios::trunc); + std::shared_ptr aFileOut = aFileSystem->OpenOStream (theFile, std::ios::out | std::ios::binary | std::ios::trunc); if (aFileOut.get() == NULL) { Message::SendFail (TCollection_AsciiString ("Error: Unable to create file '") + theFile + "'"); @@ -357,7 +357,7 @@ Standard_Boolean Image_Texture::WriteImage (std::ostream& theStream, } const Handle(OSD_FileSystem)& aFileSystem = OSD_FileSystem::DefaultFileSystem(); - opencascade::std::shared_ptr aFileIn = aFileSystem->OpenIStream (myImagePath, std::ios::in | std::ios::binary); + std::shared_ptr aFileIn = aFileSystem->OpenIStream (myImagePath, std::ios::in | std::ios::binary); if (aFileIn.get() == NULL) { Message::SendFail (TCollection_AsciiString ("Error: Unable to open file ") + myImagePath + "!"); diff --git a/src/IntStart/IntStart_SearchOnBoundaries.gxx b/src/IntStart/IntStart_SearchOnBoundaries.gxx index bb075d5e95..8c013fbce1 100644 --- a/src/IntStart/IntStart_SearchOnBoundaries.gxx +++ b/src/IntStart/IntStart_SearchOnBoundaries.gxx @@ -359,11 +359,7 @@ void BoundedArc (const TheArc& A, Standard_Boolean IsIntCSdone = Standard_False; TColStd_SequenceOfReal Params; -#if (defined(_MSC_VER) && (_MSC_VER < 1600)) - std::auto_ptr pSol; -#else std::unique_ptr pSol; -#endif math_FunctionSample Echant(Pdeb,Pfin,NbEchant); diff --git a/src/IntTools/IntTools_FClass2d.cxx b/src/IntTools/IntTools_FClass2d.cxx index 0f24cb8e1d..75634f66d0 100644 --- a/src/IntTools/IntTools_FClass2d.cxx +++ b/src/IntTools/IntTools_FClass2d.cxx @@ -823,19 +823,20 @@ TopAbs_State IntTools_FClass2d::TestOnRestriction } } //for (;;) } + //======================================================================= -//function : Destroy -//purpose : +//function : ~IntTools_FClass2d +//purpose : //======================================================================= -void IntTools_FClass2d::Destroy() -{ - Standard_Integer nbtabclass = TabClass.Length(); - for(Standard_Integer d=1; d<=nbtabclass;d++) { - if(TabClass(d)) { +IntTools_FClass2d::~IntTools_FClass2d() +{ + Standard_Integer nbtabclass = TabClass.Length(); + for (Standard_Integer d = 1; d <= nbtabclass; d++) + { + if (TabClass(d)) + { delete ((CSLib_Class2d *)TabClass(d)); TabClass(d)=NULL; } } } - - diff --git a/src/IntTools/IntTools_FClass2d.hxx b/src/IntTools/IntTools_FClass2d.hxx index c1fe685123..aff1593d22 100644 --- a/src/IntTools/IntTools_FClass2d.hxx +++ b/src/IntTools/IntTools_FClass2d.hxx @@ -40,61 +40,38 @@ public: DEFINE_STANDARD_ALLOC - - //! Empty constructor Standard_EXPORT IntTools_FClass2d(); - //! Initializes algorithm by the face F //! and tolerance Tol Standard_EXPORT IntTools_FClass2d(const TopoDS_Face& F, const Standard_Real Tol); - //! Initializes algorithm by the face F //! and tolerance Tol Standard_EXPORT void Init (const TopoDS_Face& F, const Standard_Real Tol); - //! Returns state of infinite 2d point relatively to (0, 0) Standard_EXPORT TopAbs_State PerformInfinitePoint() const; - //! Returns state of the 2d point Puv. - //! If RecadreOnPeriodic is true (defalut value), + //! If RecadreOnPeriodic is true (default value), //! for the periodic surface 2d point, adjusted to period, is //! classified. Standard_EXPORT TopAbs_State Perform (const gp_Pnt2d& Puv, const Standard_Boolean RecadreOnPeriodic = Standard_True) const; - //! Destructor - Standard_EXPORT void Destroy(); -~IntTools_FClass2d() -{ - Destroy(); -} - + Standard_EXPORT ~IntTools_FClass2d(); //! Test a point with +- an offset (Tol) and returns //! On if some points are OUT an some are IN //! (Caution: Internal use . see the code for more details) Standard_EXPORT TopAbs_State TestOnRestriction (const gp_Pnt2d& Puv, const Standard_Real Tol, const Standard_Boolean RecadreOnPeriodic = Standard_True) const; - - Standard_EXPORT Standard_Boolean IsHole() const; - - - - -protected: - - - + Standard_EXPORT Standard_Boolean IsHole() const; private: - - BRepTopAdaptor_SeqOfPtr TabClass; TColStd_SequenceOfInteger TabOrien; Standard_Real Toluv; @@ -109,22 +86,8 @@ private: Standard_Real Vmax; Standard_Boolean myIsHole; -#ifdef _MSC_VER -#if _MSC_VER < 1600 - mutable std::auto_ptr myFExplorer; -#else mutable std::unique_ptr myFExplorer; -#endif -#else - mutable std::unique_ptr myFExplorer; -#endif }; - - - - - - #endif // _IntTools_FClass2d_HeaderFile diff --git a/src/LDOM/LDOMParser.cxx b/src/LDOM/LDOMParser.cxx index 6ee1ecfe7a..e34712e852 100644 --- a/src/LDOM/LDOMParser.cxx +++ b/src/LDOM/LDOMParser.cxx @@ -148,7 +148,7 @@ Standard_Boolean LDOMParser::parse (std::istream& anInput, Standard_Boolean LDOMParser::parse (const char * const aFileName) { const Handle(OSD_FileSystem)& aFileSystem = OSD_FileSystem::DefaultFileSystem(); - opencascade::std::shared_ptr aFileStream = aFileSystem->OpenIStream (aFileName, std::ios::in); + std::shared_ptr aFileStream = aFileSystem->OpenIStream (aFileName, std::ios::in); if (aFileStream.get() != NULL && aFileStream->good()) { diff --git a/src/NCollection/NCollection_AliasedArray.hxx b/src/NCollection/NCollection_AliasedArray.hxx index fa5efeb7f2..a13a000861 100644 --- a/src/NCollection/NCollection_AliasedArray.hxx +++ b/src/NCollection/NCollection_AliasedArray.hxx @@ -64,14 +64,12 @@ public: } } -#ifndef OCCT_NO_RVALUE_REFERENCE //! Move constructor NCollection_AliasedArray (NCollection_AliasedArray&& theOther) : myData (theOther.myData), myStride (theOther.myStride), mySize (theOther.mySize), myDeletable (theOther.myDeletable) { theOther.myDeletable = false; } -#endif //! Constructor wrapping pre-allocated C-array of values without copying them. template @@ -155,13 +153,11 @@ public: return Assign (theOther); } -#ifndef OCCT_NO_RVALUE_REFERENCE //! Move assignment operator; @sa Move() NCollection_AliasedArray& operator= (NCollection_AliasedArray&& theOther) { return Move (theOther); } -#endif //! Resizes the array to specified bounds. //! No re-allocation will be done if length of array does not change, diff --git a/src/NCollection/NCollection_Array1.hxx b/src/NCollection/NCollection_Array1.hxx index 97718aedb2..473f050b64 100644 --- a/src/NCollection/NCollection_Array1.hxx +++ b/src/NCollection/NCollection_Array1.hxx @@ -176,7 +176,6 @@ public: Assign (theOther); } -#ifndef OCCT_NO_RVALUE_REFERENCE //! Move constructor NCollection_Array1 (NCollection_Array1&& theOther) : myLowerBound (theOther.myLowerBound), @@ -186,7 +185,6 @@ public: { theOther.myDeletable = false; } -#endif //! C array-based constructor. //! @@ -311,13 +309,11 @@ public: return Assign (theOther); } -#ifndef OCCT_NO_RVALUE_REFERENCE //! Move assignment operator; @sa Move() NCollection_Array1& operator= (NCollection_Array1&& theOther) { return Move (theOther); } -#endif //! @return first element const TheItemType& First() const diff --git a/src/NCollection/NCollection_Array2.hxx b/src/NCollection/NCollection_Array2.hxx index 65115eab35..a06d435c74 100644 --- a/src/NCollection/NCollection_Array2.hxx +++ b/src/NCollection/NCollection_Array2.hxx @@ -126,7 +126,6 @@ public: *this = theOther; } -#ifndef OCCT_NO_RVALUE_REFERENCE //! Move constructor NCollection_Array2 (NCollection_Array2&& theOther) : myLowerRow (theOther.myLowerRow), @@ -141,7 +140,6 @@ public: theOther.myData = NULL; theOther.myDeletable = false; } -#endif //! C array-based constructor NCollection_Array2(const TheItemType& theBegin, @@ -256,13 +254,11 @@ public: return Assign (theOther); } -#ifndef OCCT_NO_RVALUE_REFERENCE //! Move assignment operator; @sa Move() NCollection_Array2& operator= (NCollection_Array2&& theOther) { return Move (theOther); } -#endif //! Constant value access const TheItemType& Value (const Standard_Integer theRow, diff --git a/src/NCollection/NCollection_StlIterator.hxx b/src/NCollection/NCollection_StlIterator.hxx index 6789f4ab62..78fa3cf150 100644 --- a/src/NCollection/NCollection_StlIterator.hxx +++ b/src/NCollection/NCollection_StlIterator.hxx @@ -28,8 +28,8 @@ template class NCollection_StlIterator : public std::iterator::type, - typename opencascade::std::conditional::type> + typename std::conditional::type, + typename std::conditional::type> { public: @@ -71,13 +71,13 @@ protected: //! @name methods related to forward STL iterator // an appropriate method based on template arguments (at instantiation time). template - typename opencascade::std::enable_if::type Reference() const + typename std::enable_if::type Reference() const { return myIterator.ChangeValue(); } template - typename opencascade::std::enable_if::type Reference() const + typename std::enable_if::type Reference() const { return myIterator.Value(); } diff --git a/src/NCollection/NCollection_UBTreeFiller.hxx b/src/NCollection/NCollection_UBTreeFiller.hxx index 2b616bc54d..04e7b39c15 100644 --- a/src/NCollection/NCollection_UBTreeFiller.hxx +++ b/src/NCollection/NCollection_UBTreeFiller.hxx @@ -128,10 +128,10 @@ template class NCollection_UBTreeFiller private: // ---------- PRIVATE FIELDS ---------- - UBTree& myTree; - NCollection_Vector mySeqPtr; - opencascade::std::mt19937 myRandGen; //!< random number generator - Standard_Boolean myIsFullRandom; + UBTree& myTree; + NCollection_Vector mySeqPtr; + std::mt19937 myRandGen; //!< random number generator + Standard_Boolean myIsFullRandom; }; //======================================================================= diff --git a/src/NCollection/NCollection_UtfIterator.hxx b/src/NCollection/NCollection_UtfIterator.hxx index 3543639846..812376a59b 100755 --- a/src/NCollection/NCollection_UtfIterator.hxx +++ b/src/NCollection/NCollection_UtfIterator.hxx @@ -185,9 +185,9 @@ private: //! Standard_Utf16Char on Windows and to Standard_Utf32Char on Linux. template class CharTypeChooser : - public opencascade::std::conditional< sizeof(TypeChar) == 1, Standard_Utf8Char, - typename opencascade::std::conditional< sizeof(TypeChar) == 2, Standard_Utf16Char, - typename opencascade::std::conditional< sizeof(TypeChar) == 4, Standard_Utf32Char, void >::type >::type > + public std::conditional< sizeof(TypeChar) == 1, Standard_Utf8Char, + typename std::conditional< sizeof(TypeChar) == 2, Standard_Utf16Char, + typename std::conditional< sizeof(TypeChar) == 4, Standard_Utf32Char, void >::type >::type > { }; diff --git a/src/NCollection/NCollection_UtfString.hxx b/src/NCollection/NCollection_UtfString.hxx index ad180e1ff1..58792a5dea 100755 --- a/src/NCollection/NCollection_UtfString.hxx +++ b/src/NCollection/NCollection_UtfString.hxx @@ -80,10 +80,8 @@ public: //! @param theCopy string to copy. NCollection_UtfString (const NCollection_UtfString& theCopy); -#ifndef OCCT_NO_RVALUE_REFERENCE //! Move constructor NCollection_UtfString (NCollection_UtfString&& theOther); -#endif //! Copy constructor from UTF-8 string. //! @param theCopyUtf8 UTF-8 string to copy @@ -209,10 +207,8 @@ public: //! @name assign operators //! Copy from another string. const NCollection_UtfString& operator= (const NCollection_UtfString& theOther) { return Assign (theOther); } -#ifndef OCCT_NO_RVALUE_REFERENCE //! Move assignment operator. NCollection_UtfString& operator= (NCollection_UtfString&& theOther) { Swap (theOther); return *this; } -#endif //! Copy from UTF-8 NULL-terminated string. const NCollection_UtfString& operator= (const char* theStringUtf8); diff --git a/src/NCollection/NCollection_UtfString.lxx b/src/NCollection/NCollection_UtfString.lxx index a80a2bb409..839b86bc78 100755 --- a/src/NCollection/NCollection_UtfString.lxx +++ b/src/NCollection/NCollection_UtfString.lxx @@ -90,7 +90,6 @@ NCollection_UtfString::NCollection_UtfString (const NCollection_UtfString& strCopy ((Standard_Byte* )myString, (const Standard_Byte* )theCopy.myString, mySize); } -#ifndef OCCT_NO_RVALUE_REFERENCE // ======================================================================= // function : NCollection_UtfString // purpose : @@ -105,7 +104,6 @@ NCollection_UtfString::NCollection_UtfString (NCollection_UtfString&& theO theOther.mySize = 0; theOther.myLength = 0; } -#endif // ======================================================================= // function : NCollection_UtfString diff --git a/src/OSD/OSD_CachedFileSystem.cxx b/src/OSD/OSD_CachedFileSystem.cxx index 123e54ec85..9768407f98 100644 --- a/src/OSD/OSD_CachedFileSystem.cxx +++ b/src/OSD/OSD_CachedFileSystem.cxx @@ -39,7 +39,7 @@ Standard_Boolean OSD_CachedFileSystem::IsSupportedPath (const TCollection_AsciiS // function : IsOpenIStream // purpose : //======================================================================= -Standard_Boolean OSD_CachedFileSystem::IsOpenIStream (const opencascade::std::shared_ptr& theStream) const +Standard_Boolean OSD_CachedFileSystem::IsOpenIStream (const std::shared_ptr& theStream) const { return myLinkedFS->IsOpenIStream (theStream); } @@ -48,7 +48,7 @@ Standard_Boolean OSD_CachedFileSystem::IsOpenIStream (const opencascade::std::sh // function : IsOpenOStream // purpose : //======================================================================= -Standard_Boolean OSD_CachedFileSystem::IsOpenOStream (const opencascade::std::shared_ptr& theStream) const +Standard_Boolean OSD_CachedFileSystem::IsOpenOStream (const std::shared_ptr& theStream) const { return myLinkedFS->IsOpenOStream (theStream); } @@ -57,10 +57,10 @@ Standard_Boolean OSD_CachedFileSystem::IsOpenOStream (const opencascade::std::sh // function : OpenIStream // purpose : //======================================================================= -opencascade::std::shared_ptr OSD_CachedFileSystem::OpenIStream (const TCollection_AsciiString& theUrl, - const std::ios_base::openmode theParams, - const int64_t theOffset, - const opencascade::std::shared_ptr& /*theOldStream*/) +std::shared_ptr OSD_CachedFileSystem::OpenIStream (const TCollection_AsciiString& theUrl, + const std::ios_base::openmode theParams, + const int64_t theOffset, + const std::shared_ptr& /*theOldStream*/) { if (myStream.Url != theUrl) { @@ -75,8 +75,8 @@ opencascade::std::shared_ptr OSD_CachedFileSystem::OpenIStream (co // function : OpenOStream // purpose : //======================================================================= -opencascade::std::shared_ptr OSD_CachedFileSystem::OpenOStream (const TCollection_AsciiString& theUrl, - const std::ios_base::openmode theMode) +std::shared_ptr OSD_CachedFileSystem::OpenOStream (const TCollection_AsciiString& theUrl, + const std::ios_base::openmode theMode) { return myLinkedFS->OpenOStream (theUrl, theMode); } @@ -85,10 +85,10 @@ opencascade::std::shared_ptr OSD_CachedFileSystem::OpenOStream (co // function : OpenStreamBuffer // purpose : //======================================================================= -opencascade::std::shared_ptr OSD_CachedFileSystem::OpenStreamBuffer (const TCollection_AsciiString& theUrl, - const std::ios_base::openmode theMode, - const int64_t theOffset, - int64_t* theOutBufSize) +std::shared_ptr OSD_CachedFileSystem::OpenStreamBuffer (const TCollection_AsciiString& theUrl, + const std::ios_base::openmode theMode, + const int64_t theOffset, + int64_t* theOutBufSize) { if ((theMode & std::ios::out) == std::ios::out) { diff --git a/src/OSD/OSD_CachedFileSystem.hxx b/src/OSD/OSD_CachedFileSystem.hxx index 170edcf7a9..278f762183 100644 --- a/src/OSD/OSD_CachedFileSystem.hxx +++ b/src/OSD/OSD_CachedFileSystem.hxx @@ -38,24 +38,24 @@ public: Standard_EXPORT virtual Standard_Boolean IsSupportedPath (const TCollection_AsciiString& theUrl) const Standard_OVERRIDE; //! Returns TRUE if current input stream is opened for reading operations. - Standard_EXPORT virtual Standard_Boolean IsOpenIStream (const opencascade::std::shared_ptr& theStream) const Standard_OVERRIDE; + Standard_EXPORT virtual Standard_Boolean IsOpenIStream (const std::shared_ptr& theStream) const Standard_OVERRIDE; //! Returns TRUE if current output stream is opened for writing operations. - Standard_EXPORT virtual Standard_Boolean IsOpenOStream (const opencascade::std::shared_ptr& theStream) const Standard_OVERRIDE; + Standard_EXPORT virtual Standard_Boolean IsOpenOStream (const std::shared_ptr& theStream) const Standard_OVERRIDE; //! Opens stream for specified file URL for reading operations or returns previously created stream pointing to the same URL. - Standard_EXPORT virtual opencascade::std::shared_ptr OpenIStream + Standard_EXPORT virtual std::shared_ptr OpenIStream (const TCollection_AsciiString& theUrl, const std::ios_base::openmode theParams, const int64_t theOffset, - const opencascade::std::shared_ptr& theOldStream) Standard_OVERRIDE; + const std::shared_ptr& theOldStream) Standard_OVERRIDE; //! Opens stream for specified file URL for writing operations (std::ostream) by calling parent's method. - Standard_EXPORT virtual opencascade::std::shared_ptr OpenOStream (const TCollection_AsciiString& theUrl, - const std::ios_base::openmode theMode) Standard_OVERRIDE; + Standard_EXPORT virtual std::shared_ptr OpenOStream (const TCollection_AsciiString& theUrl, + const std::ios_base::openmode theMode) Standard_OVERRIDE; //! Opens stream buffer for specified file URL. - Standard_EXPORT virtual opencascade::std::shared_ptr OpenStreamBuffer + Standard_EXPORT virtual std::shared_ptr OpenStreamBuffer (const TCollection_AsciiString& theUrl, const std::ios_base::openmode theMode, const int64_t theOffset = 0, @@ -66,9 +66,9 @@ protected: // Auxiliary structure to save shared stream with path to it. struct OSD_CachedStream { - TCollection_AsciiString Url; - opencascade::std::shared_ptr Stream; - opencascade::std::shared_ptr StreamBuf; + TCollection_AsciiString Url; + std::shared_ptr Stream; + std::shared_ptr StreamBuf; void Reset() { diff --git a/src/OSD/OSD_FileSystem.cxx b/src/OSD/OSD_FileSystem.cxx index ccb0a25c48..6c2b67237d 100644 --- a/src/OSD/OSD_FileSystem.cxx +++ b/src/OSD/OSD_FileSystem.cxx @@ -78,15 +78,15 @@ void OSD_FileSystem::RemoveDefaultProtocol (const Handle(OSD_FileSystem)& theFil // function : openIStream // purpose : //======================================================================= -opencascade::std::shared_ptr OSD_FileSystem::OpenIStream (const TCollection_AsciiString& theUrl, - const std::ios_base::openmode theMode, - const int64_t theOffset, - const opencascade::std::shared_ptr& theOldStream) +std::shared_ptr OSD_FileSystem::OpenIStream (const TCollection_AsciiString& theUrl, + const std::ios_base::openmode theMode, + const int64_t theOffset, + const std::shared_ptr& theOldStream) { Standard_ASSERT_RAISE (theOffset >= -1, "Incorrect negative stream position during stream opening"); - opencascade::std::shared_ptr aNewStream; - opencascade::std::shared_ptr anOldStream = opencascade::std::dynamic_pointer_cast (theOldStream); + std::shared_ptr aNewStream; + std::shared_ptr anOldStream = std::dynamic_pointer_cast (theOldStream); if (anOldStream.get() != NULL && theUrl.IsEqual (anOldStream->Url().c_str()) && IsOpenIStream (anOldStream)) @@ -104,10 +104,10 @@ opencascade::std::shared_ptr OSD_FileSystem::OpenIStream (const TC } if (aNewStream.get() == NULL) { - opencascade::std::shared_ptr aFileBuf = OpenStreamBuffer (theUrl, theMode | std::ios_base::in); + std::shared_ptr aFileBuf = OpenStreamBuffer (theUrl, theMode | std::ios_base::in); if (aFileBuf.get() == NULL) { - return opencascade::std::shared_ptr(); + return std::shared_ptr(); } aNewStream.reset (new OSD_IStreamBuffer (theUrl.ToCString(), aFileBuf)); @@ -123,14 +123,14 @@ opencascade::std::shared_ptr OSD_FileSystem::OpenIStream (const TC // function : OpenOStream // purpose : //======================================================================= -opencascade::std::shared_ptr OSD_FileSystem::OpenOStream (const TCollection_AsciiString& theUrl, - const std::ios_base::openmode theMode) +std::shared_ptr OSD_FileSystem::OpenOStream (const TCollection_AsciiString& theUrl, + const std::ios_base::openmode theMode) { - opencascade::std::shared_ptr aNewStream; - opencascade::std::shared_ptr aFileBuf = OpenStreamBuffer (theUrl, theMode | std::ios_base::out); + std::shared_ptr aNewStream; + std::shared_ptr aFileBuf = OpenStreamBuffer (theUrl, theMode | std::ios_base::out); if (aFileBuf.get() == NULL) { - return opencascade::std::shared_ptr(); + return std::shared_ptr(); } aNewStream.reset(new OSD_OStreamBuffer (theUrl.ToCString(), aFileBuf)); diff --git a/src/OSD/OSD_FileSystem.hxx b/src/OSD/OSD_FileSystem.hxx index f741dc09a9..d88f91f74d 100644 --- a/src/OSD/OSD_FileSystem.hxx +++ b/src/OSD/OSD_FileSystem.hxx @@ -42,10 +42,10 @@ public: virtual Standard_Boolean IsSupportedPath (const TCollection_AsciiString& theUrl) const = 0; //! Returns TRUE if current input stream is opened for reading operations. - virtual Standard_Boolean IsOpenIStream (const opencascade::std::shared_ptr& theStream) const = 0; + virtual Standard_Boolean IsOpenIStream (const std::shared_ptr& theStream) const = 0; //! Returns TRUE if current output stream is opened for writing operations. - virtual Standard_Boolean IsOpenOStream(const opencascade::std::shared_ptr& theStream) const = 0; + virtual Standard_Boolean IsOpenOStream(const std::shared_ptr& theStream) const = 0; //! Opens stream for specified file URL for reading operations (std::istream). //! Default implementation create a stream from file buffer returned by OSD_FileSystem::OpenFileBuffer(). @@ -55,19 +55,19 @@ public: //! -1 would keep seek position undefined (in case of re-using theOldStream) //! @param theOldStream [in] a pointer to existing stream pointing to theUrl to be reused (without re-opening) //! @return pointer to newly created opened stream, to theOldStream if it can be reused or NULL in case of failure. - Standard_EXPORT virtual opencascade::std::shared_ptr OpenIStream + Standard_EXPORT virtual std::shared_ptr OpenIStream (const TCollection_AsciiString& theUrl, const std::ios_base::openmode theMode, const int64_t theOffset = 0, - const opencascade::std::shared_ptr& theOldStream = opencascade::std::shared_ptr()); + const std::shared_ptr& theOldStream = std::shared_ptr()); //! Opens stream for specified file URL for writing operations (std::ostream). //! Default implementation create a stream from file buffer returned by OSD_FileSystem::OpenFileBuffer(). //! @param theUrl [in] path to open //! @param theMode [in] flags describing the requested output mode for the stream (std::ios_base::out will be implicitly added) //! @return pointer to newly created opened stream or NULL in case of failure. - Standard_EXPORT virtual opencascade::std::shared_ptr OpenOStream (const TCollection_AsciiString& theUrl, - const std::ios_base::openmode theMode); + Standard_EXPORT virtual std::shared_ptr OpenOStream (const TCollection_AsciiString& theUrl, + const std::ios_base::openmode theMode); //! Opens stream buffer for specified file URL. //! @param theUrl [in] path to open @@ -75,10 +75,10 @@ public: //! @param theOffset [in] expected stream position from the beginning of the buffer (beginning of the stream buffer by default) //! @param theOutBufSize [out] total buffer size (only if buffer is opened for read) //! @return pointer to newly created opened stream buffer or NULL in case of failure. - virtual opencascade::std::shared_ptr OpenStreamBuffer (const TCollection_AsciiString& theUrl, - const std::ios_base::openmode theMode, - const int64_t theOffset = 0, - int64_t* theOutBufSize = NULL) = 0; + virtual std::shared_ptr OpenStreamBuffer (const TCollection_AsciiString& theUrl, + const std::ios_base::openmode theMode, + const int64_t theOffset = 0, + int64_t* theOutBufSize = NULL) = 0; //! Constructor. Standard_EXPORT OSD_FileSystem(); diff --git a/src/OSD/OSD_FileSystemSelector.cxx b/src/OSD/OSD_FileSystemSelector.cxx index 0733ecb276..8c7be8c1e3 100644 --- a/src/OSD/OSD_FileSystemSelector.cxx +++ b/src/OSD/OSD_FileSystemSelector.cxx @@ -61,9 +61,9 @@ Standard_Boolean OSD_FileSystemSelector::IsSupportedPath (const TCollection_Asci // function : IsOpenIStream // purpose : //======================================================================= -Standard_Boolean OSD_FileSystemSelector::IsOpenIStream (const opencascade::std::shared_ptr& theStream) const +Standard_Boolean OSD_FileSystemSelector::IsOpenIStream (const std::shared_ptr& theStream) const { - opencascade::std::shared_ptr aFileStream = opencascade::std::dynamic_pointer_cast (theStream); + std::shared_ptr aFileStream = std::dynamic_pointer_cast (theStream); if (aFileStream.get() == NULL) { return false; @@ -86,9 +86,9 @@ Standard_Boolean OSD_FileSystemSelector::IsOpenIStream (const opencascade::std:: // function : IsOpenOStream // purpose : //======================================================================= -Standard_Boolean OSD_FileSystemSelector::IsOpenOStream (const opencascade::std::shared_ptr& theStream) const +Standard_Boolean OSD_FileSystemSelector::IsOpenOStream (const std::shared_ptr& theStream) const { - opencascade::std::shared_ptr aFileStream = opencascade::std::dynamic_pointer_cast (theStream); + std::shared_ptr aFileStream = std::dynamic_pointer_cast (theStream); if (aFileStream.get() == NULL) { return false; @@ -111,68 +111,68 @@ Standard_Boolean OSD_FileSystemSelector::IsOpenOStream (const opencascade::std:: // function : OpenIStream // purpose : //======================================================================= -opencascade::std::shared_ptr OSD_FileSystemSelector::OpenIStream (const TCollection_AsciiString& theUrl, - const std::ios_base::openmode theMode, - const int64_t theOffset, - const opencascade::std::shared_ptr& theOldStream) +std::shared_ptr OSD_FileSystemSelector::OpenIStream (const TCollection_AsciiString& theUrl, + const std::ios_base::openmode theMode, + const int64_t theOffset, + const std::shared_ptr& theOldStream) { for (NCollection_List::Iterator aProtIter (myProtocols); aProtIter.More(); aProtIter.Next()) { const Handle(OSD_FileSystem)& aFileSystem = aProtIter.Value(); if (aFileSystem->IsSupportedPath (theUrl)) { - opencascade::std::shared_ptr aStream = aFileSystem->OpenIStream (theUrl, theMode, theOffset, theOldStream); + std::shared_ptr aStream = aFileSystem->OpenIStream (theUrl, theMode, theOffset, theOldStream); if (aStream.get() != NULL) { return aStream; } } } - return opencascade::std::shared_ptr(); + return std::shared_ptr(); } //======================================================================= // function : OpenOStream // purpose : //======================================================================= -opencascade::std::shared_ptr OSD_FileSystemSelector::OpenOStream (const TCollection_AsciiString& theUrl, - const std::ios_base::openmode theMode) +std::shared_ptr OSD_FileSystemSelector::OpenOStream (const TCollection_AsciiString& theUrl, + const std::ios_base::openmode theMode) { for (NCollection_List::Iterator aProtIter (myProtocols); aProtIter.More(); aProtIter.Next()) { const Handle(OSD_FileSystem)& aFileSystem = aProtIter.Value(); if (aFileSystem->IsSupportedPath (theUrl)) { - opencascade::std::shared_ptr aStream = aFileSystem->OpenOStream (theUrl, theMode); + std::shared_ptr aStream = aFileSystem->OpenOStream (theUrl, theMode); if (aStream.get() != NULL) { return aStream; } } } - return opencascade::std::shared_ptr(); + return std::shared_ptr(); } //======================================================================= // function : OpenStreamBuffer // purpose : //======================================================================= -opencascade::std::shared_ptr OSD_FileSystemSelector::OpenStreamBuffer (const TCollection_AsciiString& theUrl, - const std::ios_base::openmode theMode, - const int64_t theOffset, - int64_t* theOutBufSize) +std::shared_ptr OSD_FileSystemSelector::OpenStreamBuffer (const TCollection_AsciiString& theUrl, + const std::ios_base::openmode theMode, + const int64_t theOffset, + int64_t* theOutBufSize) { for (NCollection_List::Iterator aProtIter (myProtocols); aProtIter.More(); aProtIter.Next()) { const Handle(OSD_FileSystem)& aFileSystem = aProtIter.Value(); if (aFileSystem->IsSupportedPath (theUrl)) { - opencascade::std::shared_ptr aBuf = aFileSystem->OpenStreamBuffer (theUrl, theMode, theOffset, theOutBufSize); + std::shared_ptr aBuf = aFileSystem->OpenStreamBuffer (theUrl, theMode, theOffset, theOutBufSize); if (aBuf.get() != NULL) { return aBuf; } } } - return opencascade::std::shared_ptr(); + return std::shared_ptr(); } diff --git a/src/OSD/OSD_FileSystemSelector.hxx b/src/OSD/OSD_FileSystemSelector.hxx index 89777f4175..7ccaf949fc 100644 --- a/src/OSD/OSD_FileSystemSelector.hxx +++ b/src/OSD/OSD_FileSystemSelector.hxx @@ -41,24 +41,24 @@ public: Standard_EXPORT virtual bool IsSupportedPath (const TCollection_AsciiString& theUrl) const Standard_OVERRIDE; //! Returns TRUE if current input stream is opened for reading operations. - Standard_EXPORT virtual Standard_Boolean IsOpenIStream (const opencascade::std::shared_ptr& theStream) const Standard_OVERRIDE; + Standard_EXPORT virtual Standard_Boolean IsOpenIStream (const std::shared_ptr& theStream) const Standard_OVERRIDE; //! Returns TRUE if current output stream is opened for writing operations. - Standard_EXPORT virtual Standard_Boolean IsOpenOStream (const opencascade::std::shared_ptr& theStream) const Standard_OVERRIDE; + Standard_EXPORT virtual Standard_Boolean IsOpenOStream (const std::shared_ptr& theStream) const Standard_OVERRIDE; //! Opens input stream using one of registered protocols. - Standard_EXPORT virtual opencascade::std::shared_ptr OpenIStream + Standard_EXPORT virtual std::shared_ptr OpenIStream (const TCollection_AsciiString& theUrl, const std::ios_base::openmode theMode, const int64_t theOffset = 0, - const opencascade::std::shared_ptr& theOldStream = opencascade::std::shared_ptr()) Standard_OVERRIDE; + const std::shared_ptr& theOldStream = std::shared_ptr()) Standard_OVERRIDE; //! Opens output stream using one of registered protocols. - Standard_EXPORT virtual opencascade::std::shared_ptr OpenOStream (const TCollection_AsciiString& theUrl, - const std::ios_base::openmode theMode) Standard_OVERRIDE; + Standard_EXPORT virtual std::shared_ptr OpenOStream (const TCollection_AsciiString& theUrl, + const std::ios_base::openmode theMode) Standard_OVERRIDE; //! Opens stream buffer using one of registered protocols. - Standard_EXPORT virtual opencascade::std::shared_ptr OpenStreamBuffer + Standard_EXPORT virtual std::shared_ptr OpenStreamBuffer (const TCollection_AsciiString& theUrl, const std::ios_base::openmode theMode, const int64_t theOffset = 0, diff --git a/src/OSD/OSD_LocalFileSystem.cxx b/src/OSD/OSD_LocalFileSystem.cxx index 2666bc1d13..68fa6aded6 100644 --- a/src/OSD/OSD_LocalFileSystem.cxx +++ b/src/OSD/OSD_LocalFileSystem.cxx @@ -31,9 +31,9 @@ Standard_Boolean OSD_LocalFileSystem::IsSupportedPath (const TCollection_AsciiSt // function : IsOpenIStream // purpose : //======================================================================= -Standard_Boolean OSD_LocalFileSystem::IsOpenIStream (const opencascade::std::shared_ptr& theStream) const +Standard_Boolean OSD_LocalFileSystem::IsOpenIStream (const std::shared_ptr& theStream) const { - opencascade::std::shared_ptr aFileStream = opencascade::std::dynamic_pointer_cast (theStream); + std::shared_ptr aFileStream = std::dynamic_pointer_cast (theStream); if (aFileStream.get() == NULL) { return false; @@ -46,9 +46,9 @@ Standard_Boolean OSD_LocalFileSystem::IsOpenIStream (const opencascade::std::sha // function : IsOpenOStream // purpose : //======================================================================= -Standard_Boolean OSD_LocalFileSystem::IsOpenOStream (const opencascade::std::shared_ptr& theStream) const +Standard_Boolean OSD_LocalFileSystem::IsOpenOStream (const std::shared_ptr& theStream) const { - opencascade::std::shared_ptr aFileStream = opencascade::std::dynamic_pointer_cast (theStream); + std::shared_ptr aFileStream = std::dynamic_pointer_cast (theStream); if (aFileStream.get() == NULL) { return false; @@ -61,16 +61,16 @@ Standard_Boolean OSD_LocalFileSystem::IsOpenOStream (const opencascade::std::sha // function : OpenStreamBuffer // purpose : //======================================================================= -opencascade::std::shared_ptr OSD_LocalFileSystem::OpenStreamBuffer (const TCollection_AsciiString& theUrl, - const std::ios_base::openmode theMode, - const int64_t theOffset, - int64_t* theOutBufSize) +std::shared_ptr OSD_LocalFileSystem::OpenStreamBuffer (const TCollection_AsciiString& theUrl, + const std::ios_base::openmode theMode, + const int64_t theOffset, + int64_t* theOutBufSize) { Standard_ASSERT_RAISE (theOffset >= 0, "Incorrect negative stream position during stream buffer opening"); - opencascade::std::shared_ptr aNewBuf(new std::filebuf()); + std::shared_ptr aNewBuf(new std::filebuf()); if (!OSD_OpenStream (*aNewBuf, TCollection_ExtendedString(theUrl), theMode)) { - return opencascade::std::shared_ptr(); + return std::shared_ptr(); } // if buffer is opened for read, find the file size if (theOutBufSize && ((theMode & std::ios::in) != 0)) @@ -79,13 +79,13 @@ opencascade::std::shared_ptr OSD_LocalFileSystem::OpenStreamBuff if (aNewBuf->pubseekoff ((std::streamoff )theOffset, std::ios_base::beg, std::ios_base::in) < 0) { *theOutBufSize = 0; - return opencascade::std::shared_ptr(); + return std::shared_ptr(); } } else if (theOffset > 0 && aNewBuf->pubseekoff ((std::streamoff )theOffset, std::ios_base::beg, (theMode & std::ios::in) != 0 ? std::ios_base::in : std::ios_base::out) < 0) { - return opencascade::std::shared_ptr(); + return std::shared_ptr(); } return aNewBuf; } diff --git a/src/OSD/OSD_LocalFileSystem.hxx b/src/OSD/OSD_LocalFileSystem.hxx index fbe2db9545..2589f9978c 100644 --- a/src/OSD/OSD_LocalFileSystem.hxx +++ b/src/OSD/OSD_LocalFileSystem.hxx @@ -29,13 +29,13 @@ public: Standard_EXPORT virtual Standard_Boolean IsSupportedPath (const TCollection_AsciiString& theUrl) const Standard_OVERRIDE; //! Returns TRUE if current input stream is opened for reading operations. - Standard_EXPORT virtual Standard_Boolean IsOpenIStream (const opencascade::std::shared_ptr& theStream) const Standard_OVERRIDE; + Standard_EXPORT virtual Standard_Boolean IsOpenIStream (const std::shared_ptr& theStream) const Standard_OVERRIDE; //! Returns TRUE if current output stream is opened for writing operations. - Standard_EXPORT virtual Standard_Boolean IsOpenOStream (const opencascade::std::shared_ptr& theStream) const Standard_OVERRIDE; + Standard_EXPORT virtual Standard_Boolean IsOpenOStream (const std::shared_ptr& theStream) const Standard_OVERRIDE; //! Opens stream buffer for specified file URL. - Standard_EXPORT virtual opencascade::std::shared_ptr OpenStreamBuffer + Standard_EXPORT virtual std::shared_ptr OpenStreamBuffer (const TCollection_AsciiString& theUrl, const std::ios_base::openmode theMode, const int64_t theOffset = 0, diff --git a/src/OSD/OSD_Parallel.hxx b/src/OSD/OSD_Parallel.hxx index 0900cd4dff..b3dd8d0d47 100644 --- a/src/OSD/OSD_Parallel.hxx +++ b/src/OSD/OSD_Parallel.hxx @@ -179,11 +179,7 @@ protected: } private: -#if (defined(_MSC_VER) && (_MSC_VER < 1600)) - std::auto_ptr myPtr; -#else std::unique_ptr myPtr; -#endif }; //! Interface class representing functor object. diff --git a/src/OSD/OSD_StreamBuffer.hxx b/src/OSD/OSD_StreamBuffer.hxx index 59836e68ac..97915a67f5 100644 --- a/src/OSD/OSD_StreamBuffer.hxx +++ b/src/OSD/OSD_StreamBuffer.hxx @@ -29,7 +29,7 @@ public: //! Main constructor. OSD_StreamBuffer (const std::string& theUrl, - const opencascade::std::shared_ptr& theBuffer) + const std::shared_ptr& theBuffer) : T (theBuffer.get()), myUrl (theUrl), myBuffer (theBuffer) {} //! Return an opened URL. @@ -37,8 +37,8 @@ public: protected: - std::string myUrl; - opencascade::std::shared_ptr myBuffer; + std::string myUrl; + std::shared_ptr myBuffer; }; typedef OSD_StreamBuffer OSD_IStreamBuffer; diff --git a/src/Poly/Poly_ArrayOfNodes.hxx b/src/Poly/Poly_ArrayOfNodes.hxx index fda60578b7..c65b8842c9 100644 --- a/src/Poly/Poly_ArrayOfNodes.hxx +++ b/src/Poly/Poly_ArrayOfNodes.hxx @@ -84,7 +84,6 @@ public: //! Assignment operator; @sa Assign() Poly_ArrayOfNodes& operator= (const Poly_ArrayOfNodes& theOther) { return Assign (theOther); } -#ifndef OCCT_NO_RVALUE_REFERENCE //! Move constructor Poly_ArrayOfNodes (Poly_ArrayOfNodes&& theOther) : NCollection_AliasedArray (std::move (theOther)) @@ -97,7 +96,6 @@ public: { return Move (theOther); } -#endif public: diff --git a/src/Poly/Poly_ArrayOfUVNodes.hxx b/src/Poly/Poly_ArrayOfUVNodes.hxx index 7ce3a10d18..8ec30bc466 100644 --- a/src/Poly/Poly_ArrayOfUVNodes.hxx +++ b/src/Poly/Poly_ArrayOfUVNodes.hxx @@ -84,7 +84,6 @@ public: //! Assignment operator; @sa Assign() Poly_ArrayOfUVNodes& operator= (const Poly_ArrayOfUVNodes& theOther) { return Assign (theOther); } -#ifndef OCCT_NO_RVALUE_REFERENCE //! Move constructor Poly_ArrayOfUVNodes (Poly_ArrayOfUVNodes&& theOther) : NCollection_AliasedArray (std::move (theOther)) @@ -97,7 +96,6 @@ public: { return Move (theOther); } -#endif public: diff --git a/src/QABugs/QABugs_1.cxx b/src/QABugs/QABugs_1.cxx index 670bb8e401..b15836c6f4 100644 --- a/src/QABugs/QABugs_1.cxx +++ b/src/QABugs/QABugs_1.cxx @@ -460,7 +460,7 @@ static Standard_Integer OCC30182 (Draw_Interpretor& , Standard_Integer theNbArgs else { const Handle(OSD_FileSystem)& aFileSystem = OSD_FileSystem::DefaultFileSystem(); - opencascade::std::shared_ptr aFile = aFileSystem->OpenIStream (anImgPath, std::ios::in | std::ios::binary); + std::shared_ptr aFile = aFileSystem->OpenIStream (anImgPath, std::ios::in | std::ios::binary); if (aFile.get() == NULL) { std::cout << "Syntax error: image file '" << anImgPath << "' cannot be found\n"; diff --git a/src/QABugs/QABugs_19.cxx b/src/QABugs/QABugs_19.cxx index 5a7648de1e..46df73de95 100644 --- a/src/QABugs/QABugs_19.cxx +++ b/src/QABugs/QABugs_19.cxx @@ -2758,7 +2758,7 @@ static Standard_Integer OCC29935(Draw_Interpretor& , // Generate data; Standard_Integer aSize = Draw::Atoi (theArgv[1]); - opencascade::std::mt19937 aGen (42); + std::mt19937 aGen (42); NCollection_Array2 aMat1 (0, aSize - 1, 0, aSize - 1); NCollection_Array2 aMat2 (0, aSize - 1, 0, aSize - 1); NCollection_Array2 aMatResRef(0, aSize - 1, 0, aSize - 1); diff --git a/src/QABugs/QABugs_20.cxx b/src/QABugs/QABugs_20.cxx index ece17e6ebe..4647e76614 100644 --- a/src/QABugs/QABugs_20.cxx +++ b/src/QABugs/QABugs_20.cxx @@ -2408,7 +2408,7 @@ static Standard_Integer OCC28887 (Draw_Interpretor&, Standard_Integer theNbArgs, Handle(NCollection_Buffer) aBuffer; { const Handle(OSD_FileSystem)& aFileSystem = OSD_FileSystem::DefaultFileSystem(); - opencascade::std::shared_ptr aFile = aFileSystem->OpenIStream (aFilePath, std::ios::binary | std::ios::in); + std::shared_ptr aFile = aFileSystem->OpenIStream (aFilePath, std::ios::binary | std::ios::in); if (aFile.get() == NULL) { std::cout << "Error: input file '" << aFilePath << "' cannot be read\n"; diff --git a/src/QANCollection/QANCollection_Handle.cxx b/src/QANCollection/QANCollection_Handle.cxx index 829e3b0418..7be8ef597b 100644 --- a/src/QANCollection/QANCollection_Handle.cxx +++ b/src/QANCollection/QANCollection_Handle.cxx @@ -463,7 +463,7 @@ static Standard_Integer QAHandleInc (Draw_Interpretor& theDI, } Handle(Standard_Transient) aHandle = new Standard_Transient(); - opencascade::std::shared_ptr aSharePtr (new Standard_Transient()); + std::shared_ptr aSharePtr (new Standard_Transient()); theDI << "Time of creating and destroying " << aNbIters << " smart pointers to the same object, per item, ns:"; { { @@ -479,7 +479,7 @@ static Standard_Integer QAHandleInc (Draw_Interpretor& theDI, { QATimer aTimer (theDI, "\nC++ shared_ptr: ", QATimer::ns, aNbIters); { - std::vector< opencascade::std::shared_ptr > aSharePointers (aNbIters); + std::vector< std::shared_ptr > aSharePointers (aNbIters); for (Standard_Integer anIter = 0; anIter < aNbIters; ++anIter) { aSharePointers[anIter] = aSharePtr; diff --git a/src/RWGltf/RWGltf_CafReader.cxx b/src/RWGltf/RWGltf_CafReader.cxx index c53b59b11a..af23af338e 100644 --- a/src/RWGltf/RWGltf_CafReader.cxx +++ b/src/RWGltf/RWGltf_CafReader.cxx @@ -191,7 +191,7 @@ Standard_Boolean RWGltf_CafReader::performMesh (const TCollection_AsciiString& t aPSentry.Show(); const Handle(OSD_FileSystem)& aFileSystem = OSD_FileSystem::DefaultFileSystem(); - opencascade::std::shared_ptr aFile = aFileSystem->OpenIStream (theFile, std::ios::in | std::ios::binary); + std::shared_ptr aFile = aFileSystem->OpenIStream (theFile, std::ios::in | std::ios::binary); if (aFile.get() == NULL || !aFile->good()) { Message::SendFail (TCollection_AsciiString ("File '") + theFile + "' is not found"); diff --git a/src/RWGltf/RWGltf_CafWriter.cxx b/src/RWGltf/RWGltf_CafWriter.cxx index 301c866674..5e0c8cf0ba 100644 --- a/src/RWGltf/RWGltf_CafWriter.cxx +++ b/src/RWGltf/RWGltf_CafWriter.cxx @@ -400,7 +400,7 @@ bool RWGltf_CafWriter::writeBinData (const Handle(TDocStd_Document)& theDocument myBinDataLen64 = 0; const Handle(OSD_FileSystem)& aFileSystem = OSD_FileSystem::DefaultFileSystem(); - opencascade::std::shared_ptr aBinFile = aFileSystem->OpenOStream (myBinFileNameFull, std::ios::out | std::ios::binary); + std::shared_ptr aBinFile = aFileSystem->OpenOStream (myBinFileNameFull, std::ios::out | std::ios::binary); if (aBinFile.get() == NULL || !aBinFile->good()) { @@ -707,7 +707,7 @@ bool RWGltf_CafWriter::writeJson (const Handle(TDocStd_Document)& theDocument, const TCollection_AsciiString aFileNameGltf = myFile; const Handle(OSD_FileSystem)& aFileSystem = OSD_FileSystem::DefaultFileSystem(); - opencascade::std::shared_ptr aGltfContentFile = aFileSystem->OpenOStream (aFileNameGltf, std::ios::out | std::ios::binary); + std::shared_ptr aGltfContentFile = aFileSystem->OpenOStream (aFileNameGltf, std::ios::out | std::ios::binary); if (aGltfContentFile.get() == NULL || !aGltfContentFile->good()) { @@ -827,7 +827,7 @@ bool RWGltf_CafWriter::writeJson (const Handle(TDocStd_Document)& theDocument, if (aFullLen64 < std::numeric_limits::max()) { { - opencascade::std::shared_ptr aBinFile = aFileSystem->OpenIStream (myBinFileNameFull, std::ios::in | std::ios::binary); + std::shared_ptr aBinFile = aFileSystem->OpenIStream (myBinFileNameFull, std::ios::in | std::ios::binary); if (aBinFile.get() == NULL || !aBinFile->good()) { Message::SendFail (TCollection_AsciiString ("File '") + myBinFileNameFull + "' cannot be opened"); diff --git a/src/RWGltf/RWGltf_CafWriter.hxx b/src/RWGltf/RWGltf_CafWriter.hxx index 328c1b7a94..6e8b976733 100644 --- a/src/RWGltf/RWGltf_CafWriter.hxx +++ b/src/RWGltf/RWGltf_CafWriter.hxx @@ -360,8 +360,7 @@ protected: RWMesh_CoordinateSystemConverter myCSTrsf; //!< transformation from OCCT to glTF coordinate system XCAFPrs_Style myDefaultStyle; //!< default material definition to be used for nodes with only color defined - opencascade::std::shared_ptr - myWriter; //!< JSON writer + std::shared_ptr myWriter; //!< JSON writer Handle(RWGltf_GltfMaterialMap) myMaterialMap; //!< map of defined materials RWGltf_GltfBufferView myBuffViewPos; //!< current buffer view with nodes positions RWGltf_GltfBufferView myBuffViewNorm; //!< current buffer view with nodes normals diff --git a/src/RWGltf/RWGltf_TriangulationReader.cxx b/src/RWGltf/RWGltf_TriangulationReader.cxx index 44dba18774..16ad9b9fa6 100644 --- a/src/RWGltf/RWGltf_TriangulationReader.cxx +++ b/src/RWGltf/RWGltf_TriangulationReader.cxx @@ -154,7 +154,7 @@ bool RWGltf_TriangulationReader::readFileData (const Handle(RWGltf_GltfLatePrimi const Handle(OSD_FileSystem)& theFileSystem) const { const Handle(OSD_FileSystem)& aFileSystem = !theFileSystem.IsNull() ? theFileSystem : OSD_FileSystem::DefaultFileSystem(); - opencascade::std::shared_ptr aSharedStream = aFileSystem->OpenIStream + std::shared_ptr aSharedStream = aFileSystem->OpenIStream (theGltfData.StreamUri, std::ios::in | std::ios::binary, theGltfData.StreamOffset); if (aSharedStream.get() == NULL) { @@ -215,7 +215,7 @@ bool RWGltf_TriangulationReader::readDracoBuffer (const Handle(RWGltf_GltfLatePr { const TCollection_AsciiString& aName = theSourceGltfMesh->Id(); const Handle(OSD_FileSystem)& aFileSystem = !theFileSystem.IsNull() ? theFileSystem : OSD_FileSystem::DefaultFileSystem(); - opencascade::std::shared_ptr aSharedStream = aFileSystem->OpenIStream (theGltfData.StreamUri, std::ios::in | std::ios::binary, theGltfData.StreamOffset); + std::shared_ptr aSharedStream = aFileSystem->OpenIStream (theGltfData.StreamUri, std::ios::in | std::ios::binary, theGltfData.StreamOffset); if (aSharedStream.get() == NULL) { reportError (TCollection_AsciiString("Buffer '") + aName + "' refers to invalid file '" + theGltfData.StreamUri + "'."); diff --git a/src/RWStl/RWStl.cxx b/src/RWStl/RWStl.cxx index 7febb29540..8b703f443e 100644 --- a/src/RWStl/RWStl.cxx +++ b/src/RWStl/RWStl.cxx @@ -157,7 +157,7 @@ Handle(Poly_Triangulation) RWStl::ReadBinary (const OSD_Path& theFile, theFile.SystemName (aPath); const Handle(OSD_FileSystem)& aFileSystem = OSD_FileSystem::DefaultFileSystem(); - opencascade::std::shared_ptr aStream = aFileSystem->OpenIStream (aPath, std::ios::in | std::ios::binary); + std::shared_ptr aStream = aFileSystem->OpenIStream (aPath, std::ios::in | std::ios::binary); if (aStream.get() == NULL) { return Handle(Poly_Triangulation)(); diff --git a/src/RWStl/RWStl_Reader.cxx b/src/RWStl/RWStl_Reader.cxx index 85dc4f7b4d..eb6ad7c1c7 100644 --- a/src/RWStl/RWStl_Reader.cxx +++ b/src/RWStl/RWStl_Reader.cxx @@ -140,7 +140,7 @@ Standard_Boolean RWStl_Reader::Read (const char* theFile, const Message_ProgressRange& theProgress) { const Handle(OSD_FileSystem)& aFileSystem = OSD_FileSystem::DefaultFileSystem(); - opencascade::std::shared_ptr aStream = aFileSystem->OpenIStream (theFile, std::ios::in | std::ios::binary); + std::shared_ptr aStream = aFileSystem->OpenIStream (theFile, std::ios::in | std::ios::binary); if (aStream.get() == NULL) { Message::SendFail (TCollection_AsciiString("Error: file '") + theFile + "' is not found"); diff --git a/src/Standard/Standard_Handle.hxx b/src/Standard/Standard_Handle.hxx index 8b6694e66c..763f83a997 100644 --- a/src/Standard/Standard_Handle.hxx +++ b/src/Standard/Standard_Handle.hxx @@ -70,13 +70,11 @@ namespace opencascade { BeginScope(); } -#ifndef OCCT_NO_RVALUE_REFERENCE //! Move constructor handle (handle&& theHandle) : entity(theHandle.entity) { theHandle.entity = 0; } -#endif //! Destructor ~handle () @@ -113,14 +111,12 @@ namespace opencascade { return *this; } -#ifndef OCCT_NO_RVALUE_REFERENCE //! Move operator handle& operator= (handle&& theHandle) { std::swap (this->entity, theHandle.entity); return *this; } -#endif //! STL-like cast to pointer to referred object (note non-const). //! @sa std::shared_ptr::get() @@ -307,7 +303,6 @@ namespace opencascade { BeginScope(); } -#ifndef OCCT_NO_RVALUE_REFERENCE //! Generalized move constructor template handle (handle&& theHandle, typename std::enable_if ::value>::type* = nullptr) @@ -315,7 +310,6 @@ namespace opencascade { { theHandle.entity = 0; } -#endif //! Generalized assignment operator. template @@ -327,7 +321,6 @@ namespace opencascade { return *this; } -#ifndef OCCT_NO_RVALUE_REFERENCE //! Generalized move operator template handle& operator= (handle&& theHandle) @@ -337,7 +330,6 @@ namespace opencascade { std::swap (this->entity, theHandle.entity); return *this; } -#endif #else diff --git a/src/Standard/Standard_Macro.hxx b/src/Standard/Standard_Macro.hxx index b634410eb3..a2f949d357 100644 --- a/src/Standard/Standard_Macro.hxx +++ b/src/Standard/Standard_Macro.hxx @@ -20,13 +20,17 @@ #ifndef _Standard_Macro_HeaderFile # define _Standard_Macro_HeaderFile +#if defined(_MSC_VER) && (_MSC_VER < 1600) + #error C++11 compatible compiler is required (Visual Studio 2010 or newer) +#endif + //! @def Standard_OVERRIDE //! Should be used in declarations of virtual methods overridden in the //! derived classes, to cause compilation error in the case if that virtual //! function disappears or changes its signature in the base class. //! //! Expands to C++11 keyword "override" on compilers that are known to -//! suppot it; empty in other cases. +//! support it; empty in other cases. #if defined(__cplusplus) && (__cplusplus >= 201100L) // part of C++11 standard #define Standard_OVERRIDE override @@ -183,13 +187,6 @@ #define Standard_ENABLE_DEPRECATION_WARNINGS #endif -//! @def OCCT_NO_RVALUE_REFERENCE -//! Disables methods and constructors that use rvalue references -//! (C++11 move semantics) not supported by obsolete compilers. -#if (defined(_MSC_VER) && (_MSC_VER < 1600)) - #define OCCT_NO_RVALUE_REFERENCE -#endif - # ifdef _WIN32 // We must be careful including windows.h: it is really poisonous stuff! diff --git a/src/Standard/Standard_Std.hxx b/src/Standard/Standard_Std.hxx index db925b0c20..4a8d9921da 100644 --- a/src/Standard/Standard_Std.hxx +++ b/src/Standard/Standard_Std.hxx @@ -33,37 +33,6 @@ namespace opencascade // import all available standard stuff from std namespace using namespace ::std; -// for old MSVC compiler, some standard templates are defined in std::tr1 namespace, -// and some missing ones are implemented here -#if (defined(_MSC_VER) && (_MSC_VER < 1600)) - using namespace ::std::tr1; - - // C++11 template class enable_if - template - struct enable_if - { // type is undefined for assumed !_Test - }; - - template - struct enable_if - { // type is _Type for _Test - typedef _Type type; - }; - - template - struct conditional - { - typedef TypeTrue type; - }; - - template - struct conditional - { - typedef TypeFalse type; - }; - -#endif - } // namespace std //! Trait yielding true if class T1 is base of T2 but not the same diff --git a/src/Standard/Standard_Type.hxx b/src/Standard/Standard_Type.hxx index 9fcdf55426..65b6826a81 100644 --- a/src/Standard/Standard_Type.hxx +++ b/src/Standard/Standard_Type.hxx @@ -63,11 +63,6 @@ namespace opencascade static_assert(opencascade::has_type::type::value, "OCCT RTTI definition is incorrect: " #Base " is not direct base class of " #Class); \ static_assert(&get_type_name == &Class::get_type_name, "OCCT RTTI definition is misplaced: current class is not " #Class); -#elif (defined(_MSC_VER) && (_MSC_VER < 1600)) - -// VC9 does not support static_assert and decltype at all -#define OCCT_CHECK_BASE_CLASS(Class,Base) - #elif (defined(_MSC_VER) && (_MSC_VER >= 1900)) // VC14+ allow using address of member functions in static checks, diff --git a/src/Standard/Standard_TypeDef.hxx b/src/Standard/Standard_TypeDef.hxx index 5d452394cf..81d6e5f1e1 100755 --- a/src/Standard/Standard_TypeDef.hxx +++ b/src/Standard/Standard_TypeDef.hxx @@ -18,21 +18,7 @@ #include #include -// VC9 does not have stdint.h -#if(defined(_MSC_VER) && (_MSC_VER < 1600)) - // old MSVC - hasn't stdint header - typedef unsigned __int8 uint8_t; - typedef unsigned __int16 uint16_t; - typedef unsigned __int32 uint32_t; - typedef unsigned __int64 uint64_t; - - typedef signed __int8 int8_t; - typedef signed __int16 int16_t; - typedef signed __int32 int32_t; - typedef signed __int64 int64_t; -#else - #include -#endif +#include #if(defined(_MSC_VER) && (_MSC_VER < 1800)) // only Visual Studio 2013 (vc12) provides header diff --git a/src/StepSelect/StepSelect_WorkLibrary.cxx b/src/StepSelect/StepSelect_WorkLibrary.cxx index a7a99ded57..6f672e13e3 100644 --- a/src/StepSelect/StepSelect_WorkLibrary.cxx +++ b/src/StepSelect/StepSelect_WorkLibrary.cxx @@ -99,7 +99,7 @@ Standard_Boolean StepSelect_WorkLibrary::WriteFile if (stepmodel.IsNull() || stepro.IsNull()) return Standard_False; const Handle(OSD_FileSystem)& aFileSystem = OSD_FileSystem::DefaultFileSystem(); - opencascade::std::shared_ptr aStream = aFileSystem->OpenOStream (ctx.FileName(), std::ios::out | std::ios::trunc); + std::shared_ptr aStream = aFileSystem->OpenOStream (ctx.FileName(), std::ios::out | std::ios::trunc); if (aStream.get() == NULL) { ctx.CCheck(0)->AddFail("Step File could not be created"); diff --git a/src/TCollection/TCollection_AsciiString.hxx b/src/TCollection/TCollection_AsciiString.hxx index e839451ecd..8f277b1221 100644 --- a/src/TCollection/TCollection_AsciiString.hxx +++ b/src/TCollection/TCollection_AsciiString.hxx @@ -76,7 +76,6 @@ public: //! Initializes a AsciiString with another AsciiString. Standard_EXPORT TCollection_AsciiString(const TCollection_AsciiString& astring); -#ifndef OCCT_NO_RVALUE_REFERENCE //! Move constructor TCollection_AsciiString (TCollection_AsciiString&& theOther) : mystring (theOther.mystring), @@ -85,7 +84,6 @@ public: theOther.mystring = NULL; theOther.mylength = 0; } -#endif //! Initializes a AsciiString with copy of another AsciiString //! concatenated with the message character. @@ -280,10 +278,8 @@ void operator = (const TCollection_AsciiString& fromwhere) //! Exchange the data of two strings (without reallocating memory). Standard_EXPORT void Swap (TCollection_AsciiString& theOther); -#ifndef OCCT_NO_RVALUE_REFERENCE //! Move assignment operator TCollection_AsciiString& operator= (TCollection_AsciiString&& theOther) { Swap (theOther); return *this; } -#endif //! Frees memory allocated by AsciiString. Standard_EXPORT ~TCollection_AsciiString(); diff --git a/src/TCollection/TCollection_ExtendedString.hxx b/src/TCollection/TCollection_ExtendedString.hxx index 0bd0ed4351..899eecd7f9 100644 --- a/src/TCollection/TCollection_ExtendedString.hxx +++ b/src/TCollection/TCollection_ExtendedString.hxx @@ -97,7 +97,6 @@ public: //! Initializes a ExtendedString with another ExtendedString. Standard_EXPORT TCollection_ExtendedString(const TCollection_ExtendedString& astring); -#ifndef OCCT_NO_RVALUE_REFERENCE //! Move constructor TCollection_ExtendedString (TCollection_ExtendedString&& theOther) : mystring (theOther.mystring), @@ -106,7 +105,6 @@ public: theOther.mystring = NULL; theOther.mylength = 0; } -#endif //! Creation by converting an Ascii string to an extended //! string. The string is treated as having UTF-8 coding. @@ -154,10 +152,8 @@ void operator = (const TCollection_ExtendedString& fromwhere) //! Exchange the data of two strings (without reallocating memory). Standard_EXPORT void Swap (TCollection_ExtendedString& theOther); -#ifndef OCCT_NO_RVALUE_REFERENCE //! Move assignment operator TCollection_ExtendedString& operator= (TCollection_ExtendedString&& theOther) { Swap (theOther); return *this; } -#endif //! Frees memory allocated by ExtendedString. Standard_EXPORT ~TCollection_ExtendedString(); diff --git a/src/TObjDRAW/TObjDRAW.cxx b/src/TObjDRAW/TObjDRAW.cxx index af3e257146..e26c991474 100644 --- a/src/TObjDRAW/TObjDRAW.cxx +++ b/src/TObjDRAW/TObjDRAW.cxx @@ -208,7 +208,7 @@ static Standard_Integer saveModel (Draw_Interpretor& di, Standard_Integer argc, if (anUseStream) { const Handle(OSD_FileSystem)& aFileSystem = OSD_FileSystem::DefaultFileSystem(); - opencascade::std::shared_ptr aFileStream = aFileSystem->OpenOStream (argv[2], std::ios::out | std::ios::binary); + std::shared_ptr aFileStream = aFileSystem->OpenOStream (argv[2], std::ios::out | std::ios::binary); isSaved = aModel->SaveAs (*aFileStream); } else @@ -252,7 +252,7 @@ static Standard_Integer loadModel (Draw_Interpretor& di, Standard_Integer argc, if (anUseStream) { const Handle(OSD_FileSystem)& aFileSystem = OSD_FileSystem::DefaultFileSystem(); - opencascade::std::shared_ptr aFileStream = aFileSystem->OpenIStream (aPath, std::ios::in | std::ios::binary); + std::shared_ptr aFileStream = aFileSystem->OpenIStream (aPath, std::ios::in | std::ios::binary); isLoaded = aModel->Load (*aFileStream); } else diff --git a/src/TopLoc/TopLoc_SListOfItemLocation.hxx b/src/TopLoc/TopLoc_SListOfItemLocation.hxx index a8c136c774..ce6b3d356d 100644 --- a/src/TopLoc/TopLoc_SListOfItemLocation.hxx +++ b/src/TopLoc/TopLoc_SListOfItemLocation.hxx @@ -69,8 +69,6 @@ public: return Assign(Other); } -#ifndef OCCT_NO_RVALUE_REFERENCE - //! Move constructor TopLoc_SListOfItemLocation (TopLoc_SListOfItemLocation&& theOther) : myNode(std::move (theOther.myNode)) @@ -84,8 +82,6 @@ public: return *this; } -#endif - //! Returne true if this list is empty Standard_Boolean IsEmpty() const { diff --git a/src/TopoDS/TopoDS_Shape.hxx b/src/TopoDS/TopoDS_Shape.hxx index be92f62837..4106967b07 100644 --- a/src/TopoDS/TopoDS_Shape.hxx +++ b/src/TopoDS/TopoDS_Shape.hxx @@ -48,8 +48,6 @@ public: //! Creates a NULL Shape referring to nothing. TopoDS_Shape() : myOrient (TopAbs_EXTERNAL) {} -#ifndef OCCT_NO_RVALUE_REFERENCE - //! Generalized move constructor, accepting also sub-classes //! (TopoDS_Shape hierarchy declares only fake sub-classes with no extra fields). template @@ -71,8 +69,6 @@ public: return *this; } -#endif - //! Returns true if this shape is null. In other words, it //! references no underlying shape with the potential to //! be given a location and an orientation. diff --git a/src/ViewerTest/ViewerTest_OpenGlCommands.cxx b/src/ViewerTest/ViewerTest_OpenGlCommands.cxx index 7f4af79439..8fbd807047 100644 --- a/src/ViewerTest/ViewerTest_OpenGlCommands.cxx +++ b/src/ViewerTest/ViewerTest_OpenGlCommands.cxx @@ -638,7 +638,7 @@ static Standard_Integer VListMaterials (Draw_Interpretor& theDI, }; const Handle(OSD_FileSystem)& aFileSystem = OSD_FileSystem::DefaultFileSystem(); - opencascade::std::shared_ptr aMatFile, anObjFile, aHtmlFile; + std::shared_ptr aMatFile, anObjFile, aHtmlFile; if (aDumpFile.EndsWith (".obj") || aDumpFile.EndsWith (".mtl")) { @@ -894,7 +894,7 @@ static Standard_Integer VListColors (Draw_Interpretor& theDI, } const Handle(OSD_FileSystem)& aFileSystem = OSD_FileSystem::DefaultFileSystem(); - opencascade::std::shared_ptr aHtmlFile; + std::shared_ptr aHtmlFile; TCollection_AsciiString aFileNameBase, aFolder; if (aDumpFile.EndsWith (".htm") || aDumpFile.EndsWith (".html")) @@ -1088,7 +1088,7 @@ static Standard_Integer VGenEnvLUT (Draw_Interpretor&, } const Handle(OSD_FileSystem)& aFileSystem = OSD_FileSystem::DefaultFileSystem(); - opencascade::std::shared_ptr aFile = aFileSystem->OpenOStream (aFilePath, std::ios::out | std::ios::trunc); + std::shared_ptr aFile = aFileSystem->OpenOStream (aFilePath, std::ios::out | std::ios::trunc); if (aFile.get() == NULL || !aFile->good()) { diff --git a/src/VrmlAPI/VrmlAPI_Writer.cxx b/src/VrmlAPI/VrmlAPI_Writer.cxx index 9b884a0d38..0275a949de 100644 --- a/src/VrmlAPI/VrmlAPI_Writer.cxx +++ b/src/VrmlAPI/VrmlAPI_Writer.cxx @@ -226,7 +226,7 @@ Standard_Boolean VrmlAPI_Writer::write_v1(const TopoDS_Shape& aShape,const Stand OSD_Path thePath(aFile); TCollection_AsciiString theFile;thePath.SystemName(theFile); const Handle(OSD_FileSystem)& aFileSystem = OSD_FileSystem::DefaultFileSystem(); - opencascade::std::shared_ptr anOutFile = aFileSystem->OpenOStream (theFile, std::ios::out); + std::shared_ptr anOutFile = aFileSystem->OpenOStream (theFile, std::ios::out); if (anOutFile.get() == NULL) { return Standard_False; @@ -370,7 +370,7 @@ Standard_Boolean VrmlAPI_Writer::write_v2(const TopoDS_Shape& aShape,const Stand aConv.Convert(anExtFace, anExtEdge); const Handle(OSD_FileSystem)& aFileSystem = OSD_FileSystem::DefaultFileSystem(); - opencascade::std::shared_ptr anOutStream = aFileSystem->OpenOStream (aFile, std::ios::out); + std::shared_ptr anOutStream = aFileSystem->OpenOStream (aFile, std::ios::out); if (anOutStream.get() != NULL) { *anOutStream << aScene; @@ -395,7 +395,7 @@ Standard_Boolean VrmlAPI_Writer::WriteDoc( aConv.ConvertDocument(theDoc); const Handle(OSD_FileSystem)& aFileSystem = OSD_FileSystem::DefaultFileSystem(); - opencascade::std::shared_ptr anOutStream = aFileSystem->OpenOStream (theFile, std::ios::out); + std::shared_ptr anOutStream = aFileSystem->OpenOStream (theFile, std::ios::out); if (anOutStream.get() != NULL) { *anOutStream << aScene; diff --git a/src/XmlLDrivers/XmlLDrivers_DocumentRetrievalDriver.cxx b/src/XmlLDrivers/XmlLDrivers_DocumentRetrievalDriver.cxx index b931737026..96f4bad242 100644 --- a/src/XmlLDrivers/XmlLDrivers_DocumentRetrievalDriver.cxx +++ b/src/XmlLDrivers/XmlLDrivers_DocumentRetrievalDriver.cxx @@ -176,7 +176,7 @@ void XmlLDrivers_DocumentRetrievalDriver::Read myFileName = theFileName; const Handle(OSD_FileSystem)& aFileSystem = OSD_FileSystem::DefaultFileSystem(); - opencascade::std::shared_ptr aFileStream = aFileSystem->OpenIStream (myFileName, std::ios::in); + std::shared_ptr aFileStream = aFileSystem->OpenIStream (myFileName, std::ios::in); if (aFileStream.get() != NULL && aFileStream->good()) { diff --git a/src/XmlLDrivers/XmlLDrivers_DocumentStorageDriver.cxx b/src/XmlLDrivers/XmlLDrivers_DocumentStorageDriver.cxx index f1176e6929..271d4dcdd7 100644 --- a/src/XmlLDrivers/XmlLDrivers_DocumentStorageDriver.cxx +++ b/src/XmlLDrivers/XmlLDrivers_DocumentStorageDriver.cxx @@ -99,8 +99,7 @@ void XmlLDrivers_DocumentStorageDriver::Write (const Handle(CDM_Document)& myFileName = theFileName; const Handle(OSD_FileSystem)& aFileSystem = OSD_FileSystem::DefaultFileSystem(); - opencascade::std::shared_ptr aFileStream = aFileSystem->OpenOStream (theFileName, std::ios::out); - + std::shared_ptr aFileStream = aFileSystem->OpenOStream (theFileName, std::ios::out); if (aFileStream.get() != NULL && aFileStream->good()) { Write (theDocument, *aFileStream, theRange); From 4f5e9344456e27bf26daaca24a68870e66390048 Mon Sep 17 00:00:00 2001 From: kgv Date: Wed, 1 Dec 2021 11:58:39 +0300 Subject: [PATCH 154/639] 0032704: Visualization, Prs3d_Drawer - do not implicitly create aspects within getters Prs3d_Drawer getters now return NULL instead of implicitly creating "default" aspects. Added missing initialization of default properties in AIS_InteractiveContext. AIS_InteractiveContext::setContextToObject() - added missing propagation of Context to child presentations. --- dox/upgrade/upgrade.md | 10 +- .../standard/01_Geometry/src/GeomSources.cpp | 1 + .../src/ISession2D/ISession_Direction.cpp | 4 +- .../src/ISession2D/ISession_Surface.cpp | 1 + src/AIS/AIS_InteractiveContext.cxx | 34 + src/AIS/AIS_InteractiveContext.hxx | 15 +- src/AIS/AIS_Shape.cxx | 27 +- src/IVtkDraw/IVtkDraw.cxx | 1 + src/IVtkOCC/IVtkOCC_Shape.cxx | 1 + src/Prs3d/Prs3d_Drawer.cxx | 799 +++++------------- src/Prs3d/Prs3d_Drawer.hxx | 408 +++++---- src/QABugs/QABugs_17.cxx | 114 --- src/ViewerTest/ViewerTest_ObjectCommands.cxx | 2 +- tests/v3d/bugs/bug1174 | 68 -- 14 files changed, 455 insertions(+), 1030 deletions(-) delete mode 100644 tests/v3d/bugs/bug1174 diff --git a/dox/upgrade/upgrade.md b/dox/upgrade/upgrade.md index ffa19e9390..6e4a60b47e 100644 --- a/dox/upgrade/upgrade.md +++ b/dox/upgrade/upgrade.md @@ -2297,7 +2297,7 @@ void Perform(const Handle(Adaptor3d_CurveOnSurface)& theCurveOnSurface, @section upgrade_occt770 Upgrade to OCCT 7.7.0 @subsection upgrade_occt770_parallel_flag_removed Removed parameter theIsParallel from Put/Compute/Perform - + theIsParallel parameter has been removed from Put/Compute/Perform from the next classes: - BRepCheck_Analyzer - BRepCheck_Edge @@ -2311,4 +2311,10 @@ For example: BRepLib_ValidateEdge aValidateEdge(myHCurve, ACS, SameParameter); aValidateEdge.SetParallel(toRunParallel); aValidateEdge.Process(); -~~~~ \ No newline at end of file +~~~~ + +@subsection upgrade_occt770_drawer_aspects Prs3d_Drawer aspects + +`Prs3d_Drawer` getters no more implicitly create "default" aspects. +If specific property has not been set before to this drawer instance nor to linked drawer instance, then NULL property will be returned. +Make sure to set property beforehand or to call `SetOwn*` / `SetupOwn*` methods to derive from defaults. diff --git a/samples/mfc/standard/01_Geometry/src/GeomSources.cpp b/samples/mfc/standard/01_Geometry/src/GeomSources.cpp index c59e5bd156..eab054b3a9 100755 --- a/samples/mfc/standard/01_Geometry/src/GeomSources.cpp +++ b/samples/mfc/standard/01_Geometry/src/GeomSources.cpp @@ -983,6 +983,7 @@ if(NbResults>0){ \n\ Handle(ISession_Surface) aSurface = new ISession_Surface(SP); Handle(Prs3d_Drawer) CurDrawer = aSurface->Attributes(); + CurDrawer->SetOwnLineAspects(); CurDrawer->UIsoAspect()->SetNumber(10); CurDrawer->VIsoAspect()->SetNumber(10); aDoc->GetAISContext()->SetLocalAttributes(aSurface, CurDrawer, Standard_False); diff --git a/samples/mfc/standard/01_Geometry/src/ISession2D/ISession_Direction.cpp b/samples/mfc/standard/01_Geometry/src/ISession2D/ISession_Direction.cpp index 042576946b..fa7bea1218 100755 --- a/samples/mfc/standard/01_Geometry/src/ISession2D/ISession_Direction.cpp +++ b/samples/mfc/standard/01_Geometry/src/ISession2D/ISession_Direction.cpp @@ -51,7 +51,7 @@ ISession_Direction::ISession_Direction (const gp_Pnt2d& aPnt2d, myDir (gp_Dir(aDir2d.X(),aDir2d.Y(),0.0)), myLength (aLength) { - myArrowLength = myDrawer->ArrowAspect()->Length(); + myArrowLength = 1.0; } ISession_Direction::ISession_Direction (const gp_Pnt2d& aPnt2d, @@ -60,7 +60,7 @@ ISession_Direction::ISession_Direction (const gp_Pnt2d& aPnt2d, myDir (gp_Dir(aVec2d.X(), aVec2d.Y(), 0.0)) { myLength = aVec2d.Magnitude(); - myArrowLength = myDrawer->ArrowAspect()->Length(); + myArrowLength = 1.0; } diff --git a/samples/mfc/standard/01_Geometry/src/ISession2D/ISession_Surface.cpp b/samples/mfc/standard/01_Geometry/src/ISession2D/ISession_Surface.cpp index 81868ae0b0..ecf15e5373 100755 --- a/samples/mfc/standard/01_Geometry/src/ISession2D/ISession_Surface.cpp +++ b/samples/mfc/standard/01_Geometry/src/ISession2D/ISession_Surface.cpp @@ -26,6 +26,7 @@ void ISession_Surface::Compute (const Handle(PrsMgr_PresentationManager)& , Handle(GeomAdaptor_Surface) anAdaptorHSurface = new GeomAdaptor_Surface (mySurface); Handle(Prs3d_Drawer) aPoleDrawer = new Prs3d_Drawer(); + aPoleDrawer->SetOwnLineAspects(); aPoleDrawer->SetLineAspect (new Prs3d_LineAspect (Quantity_NOC_YELLOW3, Aspect_TOL_SOLID, 1.0)); switch (theMode) { diff --git a/src/AIS/AIS_InteractiveContext.cxx b/src/AIS/AIS_InteractiveContext.cxx index 0f712b50e2..ae54206b16 100644 --- a/src/AIS/AIS_InteractiveContext.cxx +++ b/src/AIS/AIS_InteractiveContext.cxx @@ -128,6 +128,7 @@ myIsAutoActivateSelMode(Standard_True) myStyles[Prs3d_TypeOfHighlight_LocalDynamic] = new Prs3d_Drawer(); myStyles[Prs3d_TypeOfHighlight_SubIntensity] = new Prs3d_Drawer(); + myDefaultDrawer->SetupOwnDefaults(); myDefaultDrawer->SetZLayer(Graphic3d_ZLayerId_Default); myDefaultDrawer->SetDisplayMode(0); { @@ -704,11 +705,15 @@ void AIS_InteractiveContext::HilightWithColor(const Handle(AIS_InteractiveObject const Standard_Boolean theIsToUpdate) { if (theObj.IsNull()) + { return; + } setContextToObject (theObj); if (!myObjects.IsBound (theObj)) + { return; + } const Handle(AIS_GlobalStatus)& aStatus = myObjects (theObj); aStatus->SetHilightStatus (Standard_True); @@ -720,7 +725,9 @@ void AIS_InteractiveContext::HilightWithColor(const Handle(AIS_InteractiveObject } if (theIsToUpdate) + { myMainVwr->Update(); + } } //======================================================================= @@ -2300,6 +2307,33 @@ gp_Pnt AIS_InteractiveContext::GravityPoint (const Handle(V3d_View)& theView) co return theView->GravityPoint(); } +//======================================================================= +//function : setContextToObject +//purpose : +//======================================================================= +void AIS_InteractiveContext::setContextToObject (const Handle(AIS_InteractiveObject)& theObj) +{ + if (theObj->HasInteractiveContext()) + { + if (theObj->myCTXPtr != this) + { + throw Standard_ProgramError("AIS_InteractiveContext - object has been already displayed in another context!"); + } + } + else + { + theObj->SetContext (this); + } + + for (PrsMgr_ListOfPresentableObjectsIter aPrsIter (theObj->Children()); aPrsIter.More(); aPrsIter.Next()) + { + if (Handle(AIS_InteractiveObject) aChild = Handle(AIS_InteractiveObject)::DownCast (aPrsIter.Value())) + { + setContextToObject (aChild); + } + } +} + //======================================================================= //function : setObjectStatus //purpose : diff --git a/src/AIS/AIS_InteractiveContext.hxx b/src/AIS/AIS_InteractiveContext.hxx index fe47b0c889..8faa035d4f 100644 --- a/src/AIS/AIS_InteractiveContext.hxx +++ b/src/AIS/AIS_InteractiveContext.hxx @@ -1395,20 +1395,7 @@ protected: //! @name internal methods } //! Assign the context to the object or throw exception if object was already assigned to another context. - void setContextToObject (const Handle(AIS_InteractiveObject)& theObj) - { - if (theObj->HasInteractiveContext()) - { - if (theObj->myCTXPtr != this) - { - throw Standard_ProgramError("AIS_InteractiveContext - object has been already displayed in another context!"); - } - } - else - { - theObj->SetContext (this); - } - } + Standard_EXPORT void setContextToObject (const Handle(AIS_InteractiveObject)& theObj); //! Return display mode for highlighting. Standard_Integer getHilightMode (const Handle(AIS_InteractiveObject)& theObj, diff --git a/src/AIS/AIS_Shape.cxx b/src/AIS/AIS_Shape.cxx index 076a888710..746db59025 100644 --- a/src/AIS/AIS_Shape.cxx +++ b/src/AIS/AIS_Shape.cxx @@ -355,16 +355,28 @@ void AIS_Shape::ComputeSelection(const Handle(SelectMgr_Selection)& aSelection, StdSelect::SetDrawerForBRepOwner(aSelection,myDrawer); } -void AIS_Shape::Color( Quantity_Color& aColor ) const { - aColor = myDrawer->ShadingAspect()->Color(myCurrentFacingModel); +void AIS_Shape::Color (Quantity_Color& theColor) const +{ + if (const Handle(Prs3d_ShadingAspect)& aShading = myDrawer->ShadingAspect()) + { + theColor = myDrawer->ShadingAspect()->Color(myCurrentFacingModel); + } } -Graphic3d_NameOfMaterial AIS_Shape::Material() const { - return (myDrawer->ShadingAspect()->Material(myCurrentFacingModel)).Name(); +Graphic3d_NameOfMaterial AIS_Shape::Material() const +{ + const Handle(Prs3d_ShadingAspect)& aShading = myDrawer->ShadingAspect(); + return !aShading.IsNull() + ? aShading->Material(myCurrentFacingModel).Name() + : Graphic3d_NameOfMaterial_DEFAULT; } -Standard_Real AIS_Shape::Transparency() const { - return myDrawer->ShadingAspect()->Transparency(myCurrentFacingModel); +Standard_Real AIS_Shape::Transparency() const +{ + const Handle(Prs3d_ShadingAspect)& aShading = myDrawer->ShadingAspect(); + return !aShading.IsNull() + ? aShading->Transparency(myCurrentFacingModel) + : 0.0; } //======================================================================= @@ -639,9 +651,10 @@ void AIS_Shape::setMaterial (const Handle(Prs3d_Drawer)& theDrawer, const Standard_Boolean theToKeepColor, const Standard_Boolean theToKeepTransp) const { + theDrawer->SetupOwnShadingAspect(); + const Quantity_Color aColor = theDrawer->ShadingAspect()->Color (myCurrentFacingModel); const Standard_Real aTransp = theDrawer->ShadingAspect()->Transparency (myCurrentFacingModel); - theDrawer->SetupOwnShadingAspect(); theDrawer->ShadingAspect()->SetMaterial (theMaterial, myCurrentFacingModel); if (theToKeepColor) diff --git a/src/IVtkDraw/IVtkDraw.cxx b/src/IVtkDraw/IVtkDraw.cxx index 4f54a59762..a81e03b64b 100644 --- a/src/IVtkDraw/IVtkDraw.cxx +++ b/src/IVtkDraw/IVtkDraw.cxx @@ -171,6 +171,7 @@ static Handle(PipelinePtr) PipelineByActorName (const TCollection_AsciiString& t static Handle(Prs3d_Drawer) createDefaultDrawer() { Handle(Prs3d_Drawer) aGlobalDrawer = new Prs3d_Drawer(); + aGlobalDrawer->SetupOwnDefaults(); aGlobalDrawer->SetTypeOfDeflection (Aspect_TOD_RELATIVE); aGlobalDrawer->SetDeviationCoefficient (0.0001); return aGlobalDrawer; diff --git a/src/IVtkOCC/IVtkOCC_Shape.cxx b/src/IVtkOCC/IVtkOCC_Shape.cxx index 1d9a065fdb..60fd4bcb06 100644 --- a/src/IVtkOCC/IVtkOCC_Shape.cxx +++ b/src/IVtkOCC/IVtkOCC_Shape.cxx @@ -36,6 +36,7 @@ IVtkOCC_Shape::IVtkOCC_Shape (const TopoDS_Shape& theShape, { // these old defaults have been moved from IVtkOCC_ShapeMesher constructor myOCCTDrawer->SetDeviationCoefficient (0.0001); // Aspect_TOD_RELATIVE + myOCCTDrawer->SetupOwnDefaults(); } buildSubShapeIdMap(); } diff --git a/src/Prs3d/Prs3d_Drawer.cxx b/src/Prs3d/Prs3d_Drawer.cxx index d8b54cf2f6..7b9b926096 100644 --- a/src/Prs3d/Prs3d_Drawer.cxx +++ b/src/Prs3d/Prs3d_Drawer.cxx @@ -48,19 +48,14 @@ namespace // purpose : // ======================================================================= Prs3d_Drawer::Prs3d_Drawer() -: myNbPoints (30), - myHasOwnNbPoints (Standard_False), - myMaximalParameterValue (500000.), - myHasOwnMaximalParameterValue (Standard_False), - myChordialDeviation (0.0001), - myHasOwnChordialDeviation (Standard_False), +: myNbPoints (-1), + myMaximalParameterValue (-1.0), + myChordialDeviation (-1.0), myTypeOfDeflection (Aspect_TOD_RELATIVE), myHasOwnTypeOfDeflection (Standard_False), myTypeOfHLR (Prs3d_TOH_NotSet), - myDeviationCoefficient (0.001), - myHasOwnDeviationCoefficient (Standard_False), - myDeviationAngle (20.0 * M_PI / 180.0), - myHasOwnDeviationAngle (Standard_False), + myDeviationCoefficient (-1.0), + myDeviationAngle (-1.0), myIsoOnPlane (Standard_False), myHasOwnIsoOnPlane (Standard_False), myIsoOnTriangulation (Standard_False), @@ -68,40 +63,22 @@ Prs3d_Drawer::Prs3d_Drawer() myIsAutoTriangulated (Standard_True), myHasOwnIsAutoTriangulated (Standard_False), - myHasOwnUIsoAspect (Standard_False), - myHasOwnVIsoAspect (Standard_False), - myHasOwnWireAspect (Standard_False), myWireDraw (Standard_True), myHasOwnWireDraw (Standard_False), - myHasOwnPointAspect (Standard_False), - myHasOwnLineAspect (Standard_False), - myHasOwnTextAspect (Standard_False), - myHasOwnShadingAspect (Standard_False), - myHasOwnPlaneAspect (Standard_False), - myHasOwnSeenLineAspect (Standard_False), - myHasOwnArrowAspect (Standard_False), myLineArrowDraw (Standard_False), myHasOwnLineArrowDraw (Standard_False), - myHasOwnHiddenLineAspect (Standard_False), myDrawHiddenLine (Standard_False), myHasOwnDrawHiddenLine (Standard_False), - myHasOwnVectorAspect (Standard_False), myVertexDrawMode (Prs3d_VDM_Inherited), - myHasOwnDatumAspect (Standard_False), - myHasOwnSectionAspect (Standard_False), - myHasOwnFreeBoundaryAspect (Standard_False), myFreeBoundaryDraw (Standard_True), myHasOwnFreeBoundaryDraw (Standard_False), - myHasOwnUnFreeBoundaryAspect (Standard_False), myUnFreeBoundaryDraw (Standard_True), myHasOwnUnFreeBoundaryDraw (Standard_False), myFaceBoundaryUpperContinuity(-1), - myHasOwnFaceBoundaryAspect (Standard_False), myFaceBoundaryDraw (Standard_False), myHasOwnFaceBoundaryDraw (Standard_False), - myHasOwnDimensionAspect (Standard_False), myHasOwnDimLengthModelUnits (Standard_False), myHasOwnDimAngleModelUnits (Standard_False), myHasOwnDimLengthDisplayUnits (Standard_False), @@ -114,25 +91,33 @@ Prs3d_Drawer::Prs3d_Drawer() } // ======================================================================= -// function : SetTypeOfDeflection +// function : SetupOwnDefaults // purpose : // ======================================================================= - -void Prs3d_Drawer::SetTypeOfDeflection (const Aspect_TypeOfDeflection theTypeOfDeflection) +void Prs3d_Drawer::SetupOwnDefaults() { - myHasOwnTypeOfDeflection = Standard_True; - myTypeOfDeflection = theTypeOfDeflection; + myNbPoints = 30; + myMaximalParameterValue = 500000.0; + myChordialDeviation = 0.0001; + myDeviationCoefficient = 0.001; + myDeviationAngle = 20.0 * M_PI / 180.0; + SetupOwnShadingAspect(); + SetupOwnPointAspect(); + SetOwnDatumAspects(); + SetOwnLineAspects(); + SetTextAspect (new Prs3d_TextAspect()); + SetDimensionAspect (new Prs3d_DimensionAspect()); } // ======================================================================= -// function : SetMaximalChordialDeviation +// function : SetTypeOfDeflection // purpose : // ======================================================================= -void Prs3d_Drawer::SetMaximalChordialDeviation (const Standard_Real theChordialDeviation) +void Prs3d_Drawer::SetTypeOfDeflection (const Aspect_TypeOfDeflection theTypeOfDeflection) { - myHasOwnChordialDeviation = Standard_True; - myChordialDeviation = theChordialDeviation; + myHasOwnTypeOfDeflection = Standard_True; + myTypeOfDeflection = theTypeOfDeflection; } // ======================================================================= @@ -150,18 +135,17 @@ void Prs3d_Drawer::SetTypeOfHLR (const Prs3d_TypeOfHLR theTypeOfHLR) // purpose : gets type of HLR algorithm // ======================================================================= -Prs3d_TypeOfHLR Prs3d_Drawer::TypeOfHLR() +Prs3d_TypeOfHLR Prs3d_Drawer::TypeOfHLR() const { - if (!HasOwnTypeOfHLR()) + if (HasOwnTypeOfHLR()) { - if (!myLink.IsNull()) - { - return myLink->TypeOfHLR(); - } - // Prs3d_TOH_PolyAlgo is default value for this setting. - myTypeOfHLR = Prs3d_TOH_PolyAlgo; + return myTypeOfHLR; + } + else if (!myLink.IsNull()) + { + return myLink->TypeOfHLR(); } - return myTypeOfHLR; + return Prs3d_TOH_PolyAlgo; } // ======================================================================= @@ -174,17 +158,6 @@ void Prs3d_Drawer::SetIsoOnTriangulation (const Standard_Boolean theToEnable) myIsoOnTriangulation = theToEnable; } -// ======================================================================= -// function : SetMaximalParameterValue -// purpose : -// ======================================================================= - -void Prs3d_Drawer::SetMaximalParameterValue (const Standard_Real theValue) -{ - myHasOwnMaximalParameterValue = Standard_True; - myMaximalParameterValue = theValue; -} - // ======================================================================= // function : SetIsoOnPlane // purpose : @@ -196,17 +169,6 @@ void Prs3d_Drawer::SetIsoOnPlane (const Standard_Boolean theIsEnabled) myIsoOnPlane = theIsEnabled; } -// ======================================================================= -// function : SetDiscretisation -// purpose : -// ======================================================================= - -void Prs3d_Drawer::SetDiscretisation (const Standard_Integer theValue) -{ - myHasOwnNbPoints = Standard_True; - myNbPoints = theValue; -} - //======================================================================= //function : SetDeviationCoefficient //purpose : @@ -216,7 +178,6 @@ void Prs3d_Drawer::SetDeviationCoefficient (const Standard_Real theCoefficient) { myPreviousDeviationCoefficient = DeviationCoefficient(); myDeviationCoefficient = theCoefficient; - myHasOwnDeviationCoefficient = Standard_True; } //======================================================================= @@ -228,7 +189,6 @@ void Prs3d_Drawer::SetDeviationAngle (const Standard_Real theAngle) { myPreviousDeviationAngle = DeviationAngle(); myDeviationAngle = theAngle; - myHasOwnDeviationAngle = Standard_True; } // ======================================================================= @@ -247,33 +207,16 @@ void Prs3d_Drawer::SetAutoTriangulation (const Standard_Boolean theIsEnabled) // purpose : // ======================================================================= -const Handle(Prs3d_LineAspect)& Prs3d_Drawer::FreeBoundaryAspect() +const Handle(Prs3d_LineAspect)& Prs3d_Drawer::FreeBoundaryAspect() const { - if (!HasOwnFreeBoundaryAspect()) + if (myFreeBoundaryAspect.IsNull() + && !myLink.IsNull()) { - if (!myLink.IsNull()) - { - return myLink->FreeBoundaryAspect(); - } - if (myFreeBoundaryAspect.IsNull()) - { - myFreeBoundaryAspect = new Prs3d_LineAspect (THE_DEF_COLOR_FreeBoundary, Aspect_TOL_SOLID, 1.0); - } + return myLink->FreeBoundaryAspect(); } return myFreeBoundaryAspect; } -// ======================================================================= -// function : FreeBoundaryAspect -// purpose : -// ======================================================================= - -void Prs3d_Drawer::SetFreeBoundaryAspect (const Handle(Prs3d_LineAspect)& theAspect) -{ - myFreeBoundaryAspect = theAspect; - myHasOwnFreeBoundaryAspect = !myFreeBoundaryAspect.IsNull(); -} - // ======================================================================= // function : SetFreeBoundaryDraw // purpose : @@ -290,33 +233,16 @@ void Prs3d_Drawer::SetFreeBoundaryDraw (const Standard_Boolean theIsEnabled) // purpose : // ======================================================================= -const Handle(Prs3d_LineAspect)& Prs3d_Drawer::UnFreeBoundaryAspect() +const Handle(Prs3d_LineAspect)& Prs3d_Drawer::UnFreeBoundaryAspect() const { - if (!HasOwnUnFreeBoundaryAspect()) + if (myUnFreeBoundaryAspect.IsNull() + && !myLink.IsNull()) { - if (!myLink.IsNull()) - { - return myLink->UnFreeBoundaryAspect(); - } - if (myUnFreeBoundaryAspect.IsNull()) - { - myUnFreeBoundaryAspect = new Prs3d_LineAspect (THE_DEF_COLOR_UnFreeBoundary, Aspect_TOL_SOLID, 1.0); - } + return myLink->UnFreeBoundaryAspect(); } return myUnFreeBoundaryAspect; } -// ======================================================================= -// function : SetUnFreeBoundaryAspect -// purpose : -// ======================================================================= - -void Prs3d_Drawer::SetUnFreeBoundaryAspect (const Handle(Prs3d_LineAspect)& theAspect) -{ - myUnFreeBoundaryAspect = theAspect; - myHasOwnUnFreeBoundaryAspect = !myUnFreeBoundaryAspect.IsNull(); -} - // ======================================================================= // function : SetUnFreeBoundaryDraw // purpose : @@ -333,33 +259,16 @@ void Prs3d_Drawer::SetUnFreeBoundaryDraw (const Standard_Boolean theIsEnabled) // purpose : // ======================================================================= -const Handle(Prs3d_LineAspect)& Prs3d_Drawer::FaceBoundaryAspect() +const Handle(Prs3d_LineAspect)& Prs3d_Drawer::FaceBoundaryAspect() const { - if (!HasOwnFaceBoundaryAspect()) + if (myFaceBoundaryAspect.IsNull() + && !myLink.IsNull()) { - if (!myLink.IsNull()) - { - return myLink->FaceBoundaryAspect(); - } - if (myFaceBoundaryAspect.IsNull()) - { - myFaceBoundaryAspect = new Prs3d_LineAspect (THE_DEF_COLOR_FaceBoundary, Aspect_TOL_SOLID, 1.0); - } + return myLink->FaceBoundaryAspect(); } return myFaceBoundaryAspect; } -// ======================================================================= -// function : SetFaceBoundaryAspect -// purpose : -// ======================================================================= - -void Prs3d_Drawer::SetFaceBoundaryAspect (const Handle(Prs3d_LineAspect)& theAspect) -{ - myFaceBoundaryAspect = theAspect; - myHasOwnFaceBoundaryAspect = !myFaceBoundaryAspect.IsNull(); -} - // ======================================================================= // function : SetFaceBoundaryDraw // purpose : @@ -376,33 +285,16 @@ void Prs3d_Drawer::SetFaceBoundaryDraw (const Standard_Boolean theIsEnabled) // purpose : // ======================================================================= -const Handle(Prs3d_DimensionAspect)& Prs3d_Drawer::DimensionAspect() +const Handle(Prs3d_DimensionAspect)& Prs3d_Drawer::DimensionAspect() const { - if (!HasOwnDimensionAspect()) + if (myDimensionAspect.IsNull() + && !myLink.IsNull()) { - if (!myLink.IsNull()) - { - return myLink->DimensionAspect(); - } - if (myDimensionAspect.IsNull()) - { - myDimensionAspect = new Prs3d_DimensionAspect; - } + return myLink->DimensionAspect(); } return myDimensionAspect; } -// ======================================================================= -// function : SetDimensionAspect -// purpose : -// ======================================================================= - -void Prs3d_Drawer::SetDimensionAspect (const Handle(Prs3d_DimensionAspect)& theAspect) -{ - myDimensionAspect = theAspect; - myHasOwnDimensionAspect = !myDimensionAspect.IsNull(); -} - // ======================================================================= // function : SetDimLengthModelUnits // purpose : @@ -452,97 +344,46 @@ void Prs3d_Drawer::SetDimAngleDisplayUnits (const TCollection_AsciiString& theUn // purpose : // ======================================================================= -const Handle(Prs3d_IsoAspect)& Prs3d_Drawer::UIsoAspect() +const Handle(Prs3d_IsoAspect)& Prs3d_Drawer::UIsoAspect() const { - if (!HasOwnUIsoAspect()) + if (myUIsoAspect.IsNull() + && !myLink.IsNull()) { - if (!myLink.IsNull()) - { - return myLink->UIsoAspect(); - } - if (myUIsoAspect.IsNull()) - { - myUIsoAspect = new Prs3d_IsoAspect (Quantity_NOC_GRAY75, Aspect_TOL_SOLID, 1.0, 1); - } + return myLink->UIsoAspect(); } return myUIsoAspect; } -// ======================================================================= -// function : SetUIsoAspect -// purpose : -// ======================================================================= - -void Prs3d_Drawer::SetUIsoAspect (const Handle(Prs3d_IsoAspect)& theAspect) -{ - myUIsoAspect = theAspect; - myHasOwnUIsoAspect = !myUIsoAspect.IsNull(); -} - // ======================================================================= // function : VIsoAspect // purpose : // ======================================================================= -const Handle(Prs3d_IsoAspect)& Prs3d_Drawer::VIsoAspect() +const Handle(Prs3d_IsoAspect)& Prs3d_Drawer::VIsoAspect() const { - if (!HasOwnVIsoAspect()) + if (myVIsoAspect.IsNull() + && !myLink.IsNull()) { - if (!myLink.IsNull()) - { - return myLink->VIsoAspect(); - } - if (myVIsoAspect.IsNull()) - { - myVIsoAspect = new Prs3d_IsoAspect (Quantity_NOC_GRAY75, Aspect_TOL_SOLID, 1.0, 1); - } + return myLink->VIsoAspect(); } return myVIsoAspect; } -// ======================================================================= -// function : SetVIsoAspect -// purpose : -// ======================================================================= - -void Prs3d_Drawer::SetVIsoAspect (const Handle(Prs3d_IsoAspect)& theAspect) -{ - myVIsoAspect = theAspect; - myHasOwnVIsoAspect= !myVIsoAspect.IsNull(); -} - // ======================================================================= // function : WireAspect // purpose : // ======================================================================= -const Handle(Prs3d_LineAspect)& Prs3d_Drawer::WireAspect() +const Handle(Prs3d_LineAspect)& Prs3d_Drawer::WireAspect() const { - if (!HasOwnWireAspect()) + if (myWireAspect.IsNull() + && !myLink.IsNull()) { - if (!myLink.IsNull()) - { - return myLink->WireAspect(); - } - if (myWireAspect.IsNull()) - { - myWireAspect = new Prs3d_LineAspect (THE_DEF_COLOR_Wire, Aspect_TOL_SOLID, 1.0); - } + return myLink->WireAspect(); } return myWireAspect; } -// ======================================================================= -// function : SetWireAspect -// purpose : -// ======================================================================= - -void Prs3d_Drawer::SetWireAspect (const Handle(Prs3d_LineAspect)& theAspect) -{ - myWireAspect = theAspect; - myHasOwnWireAspect = !myWireAspect.IsNull(); -} - // ======================================================================= // function : SetWireDraw // purpose : @@ -559,18 +400,12 @@ void Prs3d_Drawer::SetWireDraw (const Standard_Boolean theIsEnabled) // purpose : // ======================================================================= -const Handle(Prs3d_PointAspect)& Prs3d_Drawer::PointAspect() +const Handle(Prs3d_PointAspect)& Prs3d_Drawer::PointAspect() const { - if (!HasOwnPointAspect()) + if (myPointAspect.IsNull() + && !myLink.IsNull()) { - if (!myLink.IsNull()) - { - return myLink->PointAspect(); - } - if (myPointAspect.IsNull()) - { - myPointAspect = new Prs3d_PointAspect (Aspect_TOM_PLUS, Quantity_NOC_YELLOW, 1.0); - } + return myLink->PointAspect(); } return myPointAspect; } @@ -581,33 +416,19 @@ const Handle(Prs3d_PointAspect)& Prs3d_Drawer::PointAspect() // ======================================================================= Standard_Boolean Prs3d_Drawer::SetupOwnPointAspect (const Handle(Prs3d_Drawer)& theDefaults) { - if (myHasOwnPointAspect) + if (!myPointAspect.IsNull()) { return Standard_False; } myPointAspect = new Prs3d_PointAspect (Aspect_TOM_PLUS, Quantity_NOC_YELLOW, 1.0); - if (!theDefaults.IsNull() && theDefaults != this) - { - *myPointAspect->Aspect() = *theDefaults->PointAspect()->Aspect(); - } - else if (!myLink.IsNull()) + const Handle(Prs3d_Drawer)& aLink = (!theDefaults.IsNull() && theDefaults != this) ? theDefaults : myLink; + if (const Prs3d_PointAspect* aLinked = !aLink.IsNull() ? aLink->PointAspect().get() : NULL) { - *myPointAspect->Aspect() = *myLink->PointAspect()->Aspect(); + *myPointAspect->Aspect() = *aLinked->Aspect(); } - myHasOwnPointAspect = Standard_True; - return Standard_True; -} - -// ======================================================================= -// function : SetPointAspect -// purpose : -// ======================================================================= -void Prs3d_Drawer::SetPointAspect (const Handle(Prs3d_PointAspect)& theAspect) -{ - myPointAspect = theAspect; - myHasOwnPointAspect = !myPointAspect.IsNull(); + return Standard_True; } // ======================================================================= @@ -615,82 +436,42 @@ void Prs3d_Drawer::SetPointAspect (const Handle(Prs3d_PointAspect)& theAspect) // purpose : // ======================================================================= -const Handle(Prs3d_LineAspect)& Prs3d_Drawer::LineAspect() +const Handle(Prs3d_LineAspect)& Prs3d_Drawer::LineAspect() const { - if (!HasOwnLineAspect()) + if (myLineAspect.IsNull() + && !myLink.IsNull()) { - if (!myLink.IsNull()) - { - return myLink->LineAspect(); - } - if (myLineAspect.IsNull()) - { - myLineAspect = new Prs3d_LineAspect (THE_DEF_COLOR_Line, Aspect_TOL_SOLID, 1.0); - } + return myLink->LineAspect(); } return myLineAspect; } -// ======================================================================= -// function : SetLineAspect -// purpose : -// ======================================================================= - -void Prs3d_Drawer::SetLineAspect (const Handle(Prs3d_LineAspect)& theAspect) -{ - myLineAspect = theAspect; - myHasOwnLineAspect = !myLineAspect.IsNull(); -} - // ======================================================================= // function : TextAspect // purpose : // ======================================================================= -const Handle(Prs3d_TextAspect)& Prs3d_Drawer::TextAspect() +const Handle(Prs3d_TextAspect)& Prs3d_Drawer::TextAspect() const { - if (!HasOwnTextAspect()) + if (myTextAspect.IsNull() + && !myLink.IsNull()) { - if (!myLink.IsNull()) - { - return myLink->TextAspect(); - } - if (myTextAspect.IsNull()) - { - myTextAspect = new Prs3d_TextAspect(); - } + return myLink->TextAspect(); } return myTextAspect; } -// ======================================================================= -// function : SetTextAspect -// purpose : -// ======================================================================= - -void Prs3d_Drawer::SetTextAspect (const Handle(Prs3d_TextAspect)& theAspect) -{ - myTextAspect = theAspect; - myHasOwnTextAspect = !myTextAspect.IsNull(); -} - // ======================================================================= // function : ShadingAspect // purpose : // ======================================================================= -const Handle(Prs3d_ShadingAspect)& Prs3d_Drawer::ShadingAspect() +const Handle(Prs3d_ShadingAspect)& Prs3d_Drawer::ShadingAspect() const { - if (!HasOwnShadingAspect()) + if (myShadingAspect.IsNull() + && !myLink.IsNull()) { - if (!myLink.IsNull()) - { - return myLink->ShadingAspect(); - } - if (myShadingAspect.IsNull()) - { - myShadingAspect = new Prs3d_ShadingAspect(); - } + return myLink->ShadingAspect(); } return myShadingAspect; } @@ -701,131 +482,65 @@ const Handle(Prs3d_ShadingAspect)& Prs3d_Drawer::ShadingAspect() // ======================================================================= Standard_Boolean Prs3d_Drawer::SetupOwnShadingAspect (const Handle(Prs3d_Drawer)& theDefaults) { - if (myHasOwnShadingAspect) + if (!myShadingAspect.IsNull()) { return Standard_False; } myShadingAspect = new Prs3d_ShadingAspect(); - if (!theDefaults.IsNull() && theDefaults != this) - { - *myShadingAspect->Aspect() = *theDefaults->ShadingAspect()->Aspect(); - } - else if (!myLink.IsNull()) + const Handle(Prs3d_Drawer)& aLink = (!theDefaults.IsNull() && theDefaults != this) ? theDefaults : myLink; + if (const Prs3d_ShadingAspect* aLinked = !aLink.IsNull() ? aLink->ShadingAspect().get() : NULL) { - *myShadingAspect->Aspect() = *myLink->ShadingAspect()->Aspect(); + *myShadingAspect->Aspect() = *aLinked->Aspect(); } - myHasOwnShadingAspect = Standard_True; return Standard_True; } -// ======================================================================= -// function : SetShadingAspect -// purpose : -// ======================================================================= - -void Prs3d_Drawer::SetShadingAspect (const Handle(Prs3d_ShadingAspect)& theAspect) -{ - myShadingAspect = theAspect; - myHasOwnShadingAspect = !myShadingAspect.IsNull(); -} - // ======================================================================= // function : PlaneAspect // purpose : // ======================================================================= -const Handle(Prs3d_PlaneAspect)& Prs3d_Drawer::PlaneAspect() +const Handle(Prs3d_PlaneAspect)& Prs3d_Drawer::PlaneAspect() const { - if (!HasOwnPlaneAspect()) + if (myPlaneAspect.IsNull() + && !myLink.IsNull()) { - if (!myLink.IsNull()) - { - return myLink->PlaneAspect(); - } - if (myPlaneAspect.IsNull()) - { - myPlaneAspect = new Prs3d_PlaneAspect(); - } + return myLink->PlaneAspect(); } return myPlaneAspect; } -// ======================================================================= -// function : SetPlaneAspect -// purpose : -// ======================================================================= - -void Prs3d_Drawer::SetPlaneAspect (const Handle(Prs3d_PlaneAspect)& theAspect) -{ - myPlaneAspect = theAspect; - myHasOwnPlaneAspect = !myPlaneAspect.IsNull(); -} - // ======================================================================= // function : SeenLineAspect // purpose : // ======================================================================= -const Handle(Prs3d_LineAspect)& Prs3d_Drawer::SeenLineAspect() +const Handle(Prs3d_LineAspect)& Prs3d_Drawer::SeenLineAspect() const { - if (!HasOwnSeenLineAspect()) + if (mySeenLineAspect.IsNull() + && !myLink.IsNull()) { - if (!myLink.IsNull()) - { - return myLink->SeenLineAspect(); - } - if (mySeenLineAspect.IsNull()) - { - mySeenLineAspect = new Prs3d_LineAspect (THE_DEF_COLOR_SeenLine, Aspect_TOL_SOLID, 1.0); - } + return myLink->SeenLineAspect(); } return mySeenLineAspect; } -// ======================================================================= -// function : SetSeenLineAspect -// purpose : -// ======================================================================= - -void Prs3d_Drawer::SetSeenLineAspect (const Handle(Prs3d_LineAspect)& theAspect) -{ - mySeenLineAspect = theAspect; - myHasOwnSeenLineAspect = !mySeenLineAspect.IsNull(); -} - // ======================================================================= // function : ArrowAspect // purpose : // ======================================================================= -const Handle(Prs3d_ArrowAspect)& Prs3d_Drawer::ArrowAspect() +const Handle(Prs3d_ArrowAspect)& Prs3d_Drawer::ArrowAspect() const { - if (!HasOwnArrowAspect()) + if (myArrowAspect.IsNull() + && !myLink.IsNull()) { - if (!myLink.IsNull()) - { - return myLink->ArrowAspect(); - } - if (myArrowAspect.IsNull()) - { - myArrowAspect = new Prs3d_ArrowAspect(); - } + return myLink->ArrowAspect(); } return myArrowAspect; } -// ======================================================================= -// function : SetArrowAspect -// purpose : -// ======================================================================= - -void Prs3d_Drawer::SetArrowAspect (const Handle(Prs3d_ArrowAspect)& theAspect) -{ - myArrowAspect = theAspect; - myHasOwnArrowAspect = !myArrowAspect.IsNull(); -} - // ======================================================================= // function : SetLineArrowDraw // purpose : @@ -842,33 +557,16 @@ void Prs3d_Drawer::SetLineArrowDraw (const Standard_Boolean theIsEnabled) // purpose : // ======================================================================= -const Handle(Prs3d_LineAspect)& Prs3d_Drawer::HiddenLineAspect() +const Handle(Prs3d_LineAspect)& Prs3d_Drawer::HiddenLineAspect() const { - if (!HasOwnHiddenLineAspect()) + if (myHiddenLineAspect.IsNull() + && !myLink.IsNull()) { - if (!myLink.IsNull()) - { - return myLink->HiddenLineAspect(); - } - if (myHiddenLineAspect.IsNull()) - { - myHiddenLineAspect = new Prs3d_LineAspect (THE_DEF_COLOR_HiddenLine, Aspect_TOL_DASH, 1.0); - } + return myLink->HiddenLineAspect(); } return myHiddenLineAspect; } -// ======================================================================= -// function : SetHiddenLineAspect -// purpose : -// ======================================================================= - -void Prs3d_Drawer::SetHiddenLineAspect (const Handle(Prs3d_LineAspect)& theAspect) -{ - myHiddenLineAspect = theAspect; - myHasOwnHiddenLineAspect = !myHiddenLineAspect.IsNull(); -} - // ======================================================================= // function : EnableDrawHiddenLineDraw // purpose : @@ -896,33 +594,16 @@ void Prs3d_Drawer::DisableDrawHiddenLine() // purpose : // ======================================================================= -const Handle(Prs3d_LineAspect)& Prs3d_Drawer::VectorAspect() +const Handle(Prs3d_LineAspect)& Prs3d_Drawer::VectorAspect() const { - if (!HasOwnVectorAspect()) + if (myVectorAspect.IsNull() + && !myLink.IsNull()) { - if (!myLink.IsNull()) - { - return myLink->VectorAspect(); - } - if (myVectorAspect.IsNull()) - { - myVectorAspect = new Prs3d_LineAspect (THE_DEF_COLOR_Vector, Aspect_TOL_SOLID, 1.0); - } + return myLink->VectorAspect(); } return myVectorAspect; } -// ======================================================================= -// function : SetVectorAspect -// purpose : -// ======================================================================= - -void Prs3d_Drawer::SetVectorAspect (const Handle(Prs3d_LineAspect)& theAspect) -{ - myVectorAspect = theAspect; - myHasOwnVectorAspect = !myVectorAspect.IsNull(); -} - // ======================================================================= // function : SetVertexDrawMode // purpose : @@ -940,18 +621,17 @@ void Prs3d_Drawer::SetVertexDrawMode (const Prs3d_VertexDrawMode theMode) // purpose : // ======================================================================= -Prs3d_VertexDrawMode Prs3d_Drawer::VertexDrawMode() +Prs3d_VertexDrawMode Prs3d_Drawer::VertexDrawMode() const { - if (!HasOwnVertexDrawMode()) + if (HasOwnVertexDrawMode()) { - if (!myLink.IsNull()) - { - return myLink->VertexDrawMode(); - } - // Prs3d_VDM_Isolated is default value for this setting. - myVertexDrawMode = Prs3d_VDM_Isolated; + return myVertexDrawMode; + } + else if (!myLink.IsNull()) + { + return myLink->VertexDrawMode(); } - return myVertexDrawMode; + return Prs3d_VDM_Isolated; } // ======================================================================= @@ -959,50 +639,27 @@ Prs3d_VertexDrawMode Prs3d_Drawer::VertexDrawMode() // purpose : // ======================================================================= -const Handle(Prs3d_DatumAspect)& Prs3d_Drawer::DatumAspect() +const Handle(Prs3d_DatumAspect)& Prs3d_Drawer::DatumAspect() const { - if (!HasOwnDatumAspect()) + if (myDatumAspect.IsNull() + && !myLink.IsNull()) { - if (!myLink.IsNull()) - { - return myLink->DatumAspect(); - } - if (myDatumAspect.IsNull()) - { - myDatumAspect = new Prs3d_DatumAspect(); - } + return myLink->DatumAspect(); } return myDatumAspect; } -// ======================================================================= -// function : SetDatumAspect -// purpose : -// ======================================================================= - -void Prs3d_Drawer::SetDatumAspect (const Handle(Prs3d_DatumAspect)& theAspect) -{ - myDatumAspect = theAspect; - myHasOwnDatumAspect = !myDatumAspect.IsNull(); -} - // ======================================================================= // function : SectionAspect // purpose : // ======================================================================= -const Handle(Prs3d_LineAspect)& Prs3d_Drawer::SectionAspect() +const Handle(Prs3d_LineAspect)& Prs3d_Drawer::SectionAspect() const { - if (!HasOwnSectionAspect()) + if (mySectionAspect.IsNull() + && !myLink.IsNull()) { - if (!myLink.IsNull()) - { - return myLink->SectionAspect(); - } - if (mySectionAspect.IsNull()) - { - mySectionAspect = new Prs3d_LineAspect (THE_DEF_COLOR_Section, Aspect_TOL_SOLID, 1.0); - } + return myLink->SectionAspect(); } return mySectionAspect; } @@ -1012,17 +669,6 @@ const Handle(Prs3d_LineAspect)& Prs3d_Drawer::SectionAspect() // purpose : // ======================================================================= -void Prs3d_Drawer::SetSectionAspect (const Handle(Prs3d_LineAspect)& theAspect) -{ - mySectionAspect = theAspect; - myHasOwnSectionAspect = !mySectionAspect.IsNull(); -} - -// ======================================================================= -// function : SetSectionAspect -// purpose : -// ======================================================================= - void Prs3d_Drawer::ClearLocalAttributes() { if (myLink.IsNull()) @@ -1049,25 +695,6 @@ void Prs3d_Drawer::ClearLocalAttributes() myDimensionAspect.Nullify(); mySectionAspect.Nullify(); - myHasOwnUIsoAspect = Standard_False; - myHasOwnVIsoAspect = Standard_False; - myHasOwnWireAspect = Standard_False; - myHasOwnPointAspect = Standard_False; - myHasOwnLineAspect = Standard_False; - myHasOwnTextAspect = Standard_False; - myHasOwnShadingAspect = Standard_False; - myHasOwnPlaneAspect = Standard_False; - myHasOwnSeenLineAspect = Standard_False; - myHasOwnArrowAspect = Standard_False; - myHasOwnHiddenLineAspect = Standard_False; - myHasOwnVectorAspect = Standard_False; - myHasOwnDatumAspect = Standard_False; - myHasOwnSectionAspect = Standard_False; - myHasOwnFreeBoundaryAspect = Standard_False; - myHasOwnUnFreeBoundaryAspect = Standard_False; - myHasOwnFaceBoundaryAspect = Standard_False; - myHasOwnDimensionAspect = Standard_False; - UnsetOwnDiscretisation(); UnsetOwnMaximalParameterValue(); UnsetOwnTypeOfDeflection(); @@ -1098,18 +725,17 @@ void Prs3d_Drawer::ClearLocalAttributes() // ======================================================================= Standard_Boolean Prs3d_Drawer::SetupOwnFaceBoundaryAspect (const Handle(Prs3d_Drawer)& theDefaults) { - if (myHasOwnFaceBoundaryAspect) + if (!myFaceBoundaryAspect.IsNull()) { return false; } myFaceBoundaryAspect = new Prs3d_LineAspect (THE_DEF_COLOR_FaceBoundary, Aspect_TOL_SOLID, 1.0); - myHasOwnFaceBoundaryAspect = true; const Handle(Prs3d_Drawer)& aLink = (!theDefaults.IsNull() && theDefaults != this) ? theDefaults : myLink; - if (!aLink.IsNull()) + if (const Prs3d_LineAspect* aLinked = !aLink.IsNull() ? aLink->FaceBoundaryAspect().get() : NULL) { - *myFaceBoundaryAspect->Aspect() = *aLink->FaceBoundaryAspect()->Aspect(); + *myFaceBoundaryAspect->Aspect() = *aLinked->Aspect(); } return true; } @@ -1122,86 +748,78 @@ Standard_Boolean Prs3d_Drawer::SetOwnLineAspects (const Handle(Prs3d_Drawer)& th { bool isUpdateNeeded = false; const Handle(Prs3d_Drawer)& aLink = (!theDefaults.IsNull() && theDefaults != this) ? theDefaults : myLink; - if (!myHasOwnUIsoAspect) + if (myUIsoAspect.IsNull()) { isUpdateNeeded = true; myUIsoAspect = new Prs3d_IsoAspect (Quantity_NOC_GRAY75, Aspect_TOL_SOLID, 1.0, 1); - if (!aLink.IsNull()) + if (const Prs3d_IsoAspect* aLinked = !aLink.IsNull() ? aLink->UIsoAspect().get() : NULL) { - *myUIsoAspect->Aspect() = *aLink->UIsoAspect()->Aspect(); - myUIsoAspect->SetNumber (aLink->UIsoAspect()->Number()); + *myUIsoAspect->Aspect() = *aLinked->Aspect(); + myUIsoAspect->SetNumber (aLinked->Number()); } - myHasOwnUIsoAspect = true; } - if (!myHasOwnVIsoAspect) + if (myVIsoAspect.IsNull()) { isUpdateNeeded = true; myVIsoAspect = new Prs3d_IsoAspect (Quantity_NOC_GRAY75, Aspect_TOL_SOLID, 1.0, 1); - if (!aLink.IsNull()) + if (const Prs3d_IsoAspect* aLinked = !aLink.IsNull() ? aLink->VIsoAspect().get() : NULL) { - *myVIsoAspect->Aspect() = *aLink->VIsoAspect()->Aspect(); - myVIsoAspect->SetNumber (aLink->VIsoAspect()->Number()); + *myVIsoAspect->Aspect() = *aLinked->Aspect(); + myVIsoAspect->SetNumber (aLinked->Number()); } - myHasOwnVIsoAspect = true; } - if (!myHasOwnWireAspect) + if (myWireAspect.IsNull()) { isUpdateNeeded = true; myWireAspect = new Prs3d_LineAspect (THE_DEF_COLOR_Wire, Aspect_TOL_SOLID, 1.0); - myHasOwnWireAspect = true; - if (!aLink.IsNull()) + if (const Prs3d_LineAspect* aLinked = !aLink.IsNull() ? aLink->WireAspect().get() : NULL) { - *myWireAspect->Aspect() = *aLink->WireAspect()->Aspect(); + *myWireAspect->Aspect() = *aLinked->Aspect(); } } - if (!myHasOwnLineAspect) + if (myLineAspect.IsNull()) { isUpdateNeeded = true; myLineAspect = new Prs3d_LineAspect (THE_DEF_COLOR_Line, Aspect_TOL_SOLID, 1.0); - myHasOwnLineAspect = true; - if (!aLink.IsNull()) + if (const Prs3d_LineAspect* aLinked = !aLink.IsNull() ? aLink->LineAspect().get() : NULL) { - *myLineAspect->Aspect() = *aLink->LineAspect()->Aspect(); + *myLineAspect->Aspect() = *aLinked->Aspect(); } } - if (!myHasOwnSeenLineAspect) + if (mySeenLineAspect.IsNull()) { isUpdateNeeded = true; mySeenLineAspect = new Prs3d_LineAspect (THE_DEF_COLOR_SeenLine, Aspect_TOL_SOLID, 1.0); - myHasOwnSeenLineAspect = true; - if (!aLink.IsNull()) + if (const Prs3d_LineAspect* aLinked = !aLink.IsNull() ? aLink->SeenLineAspect().get() : NULL) { - *mySeenLineAspect->Aspect() = *aLink->SeenLineAspect()->Aspect(); + *mySeenLineAspect->Aspect() = *aLinked->Aspect(); } } - if (!myHasOwnHiddenLineAspect) + if (myHiddenLineAspect.IsNull()) { isUpdateNeeded = true; myHiddenLineAspect = new Prs3d_LineAspect (THE_DEF_COLOR_HiddenLine, Aspect_TOL_DASH, 1.0); - myHasOwnHiddenLineAspect = true; - if (!aLink.IsNull()) + if (const Prs3d_LineAspect* aLinked = !aLink.IsNull() ? aLink->HiddenLineAspect().get() : NULL) { - *myHiddenLineAspect->Aspect() = *aLink->HiddenLineAspect()->Aspect(); + *myHiddenLineAspect->Aspect() = *aLinked->Aspect(); } } - if (!myHasOwnFreeBoundaryAspect) + if (myFreeBoundaryAspect.IsNull()) { isUpdateNeeded = true; myFreeBoundaryAspect = new Prs3d_LineAspect (THE_DEF_COLOR_FreeBoundary, Aspect_TOL_SOLID, 1.0); - myHasOwnFreeBoundaryAspect = true; - if (!aLink.IsNull()) + if (const Prs3d_LineAspect* aLinked = !aLink.IsNull() ? aLink->FreeBoundaryAspect().get() : NULL) { - *myFreeBoundaryAspect->Aspect() = *aLink->FreeBoundaryAspect()->Aspect(); + *myFreeBoundaryAspect->Aspect() = *aLinked->Aspect(); } } - if (!myHasOwnUnFreeBoundaryAspect) + if (myUnFreeBoundaryAspect.IsNull()) { isUpdateNeeded = true; myUnFreeBoundaryAspect = new Prs3d_LineAspect (THE_DEF_COLOR_UnFreeBoundary, Aspect_TOL_SOLID, 1.0); - myHasOwnUnFreeBoundaryAspect = true; - if (!aLink.IsNull()) + if (const Prs3d_LineAspect* aLinked = !aLink.IsNull() ? aLink->UnFreeBoundaryAspect().get() : NULL) { - *myUnFreeBoundaryAspect->Aspect() = *aLink->UnFreeBoundaryAspect()->Aspect(); + *myUnFreeBoundaryAspect->Aspect() = *aLinked->Aspect(); } } isUpdateNeeded = SetupOwnFaceBoundaryAspect (theDefaults) || isUpdateNeeded; @@ -1216,48 +834,42 @@ Standard_Boolean Prs3d_Drawer::SetOwnDatumAspects (const Handle(Prs3d_Drawer)& t { bool isUpdateNeeded = false; const Handle(Prs3d_Drawer)& aLink = (!theDefaults.IsNull() && theDefaults != this) ? theDefaults : myLink; - if (!myHasOwnVectorAspect) + if (myVectorAspect.IsNull()) { isUpdateNeeded = true; myVectorAspect = new Prs3d_LineAspect (THE_DEF_COLOR_Vector, Aspect_TOL_SOLID, 1.0); - myHasOwnVectorAspect = true; - if (!aLink.IsNull()) + if (const Prs3d_LineAspect* aLinked = !aLink.IsNull() ? aLink->VectorAspect().get() : NULL) { - *myVectorAspect->Aspect() = *aLink->VectorAspect()->Aspect(); + *myVectorAspect->Aspect() = *aLinked->Aspect(); } } - if (!myHasOwnSectionAspect) + if (mySectionAspect.IsNull()) { isUpdateNeeded = true; mySectionAspect = new Prs3d_LineAspect (THE_DEF_COLOR_Section, Aspect_TOL_SOLID, 1.0); - myHasOwnSectionAspect = true; - if (!aLink.IsNull()) + if (const Prs3d_LineAspect* aLinked = !aLink.IsNull() ? aLink->SectionAspect().get() : NULL) { - *mySectionAspect->Aspect() = *aLink->SectionAspect()->Aspect(); + *mySectionAspect->Aspect() = *aLinked->Aspect(); } } - if (!myHasOwnPlaneAspect) + if (myPlaneAspect.IsNull()) { isUpdateNeeded = true; myPlaneAspect = new Prs3d_PlaneAspect(); - myHasOwnPlaneAspect = true; } - if (!myHasOwnArrowAspect) + if (myArrowAspect.IsNull()) { isUpdateNeeded = true; myArrowAspect = new Prs3d_ArrowAspect(); - myHasOwnArrowAspect = true; } - if (!myHasOwnDatumAspect) + if (myDatumAspect.IsNull()) { isUpdateNeeded = true; myDatumAspect = new Prs3d_DatumAspect(); - if (!aLink.IsNull() - && aLink->HasOwnDatumAspect()) + if (const Prs3d_DatumAspect* aLinked = !aLink.IsNull() ? aLink->DatumAspect().get() : NULL) { - myDatumAspect->CopyAspectsFrom (aLink->DatumAspect()); + myDatumAspect->CopyAspectsFrom (aLinked); } - myHasOwnDatumAspect = true; } return isUpdateNeeded; } @@ -1265,11 +877,9 @@ Standard_Boolean Prs3d_Drawer::SetOwnDatumAspects (const Handle(Prs3d_Drawer)& t //! Assign the shader program. template inline void setAspectProgram (const Handle(Graphic3d_ShaderProgram)& theProgram, - bool theHasAspect, T thePrsAspect) { - if (!thePrsAspect.IsNull() - && theHasAspect) + if (!thePrsAspect.IsNull()) { thePrsAspect->Aspect()->SetShaderProgram (theProgram); } @@ -1294,47 +904,46 @@ bool Prs3d_Drawer::SetShaderProgram (const Handle(Graphic3d_ShaderProgram)& theP isUpdateNeeded = SetOwnDatumAspects() || isUpdateNeeded; } - setAspectProgram (theProgram, myHasOwnUIsoAspect, myUIsoAspect); - setAspectProgram (theProgram, myHasOwnVIsoAspect, myVIsoAspect); - setAspectProgram (theProgram, myHasOwnWireAspect, myWireAspect); - setAspectProgram (theProgram, myHasOwnLineAspect, myLineAspect); - setAspectProgram (theProgram, myHasOwnSeenLineAspect, mySeenLineAspect); - setAspectProgram (theProgram, myHasOwnHiddenLineAspect, myHiddenLineAspect); - setAspectProgram (theProgram, myHasOwnVectorAspect, myVectorAspect); - setAspectProgram (theProgram, myHasOwnSectionAspect, mySectionAspect); - setAspectProgram (theProgram, myHasOwnFreeBoundaryAspect, myFreeBoundaryAspect); - setAspectProgram (theProgram, myHasOwnUnFreeBoundaryAspect, myUnFreeBoundaryAspect); - setAspectProgram (theProgram, myHasOwnFaceBoundaryAspect, myFaceBoundaryAspect); - if (myHasOwnPlaneAspect) + setAspectProgram (theProgram, myUIsoAspect); + setAspectProgram (theProgram, myVIsoAspect); + setAspectProgram (theProgram, myWireAspect); + setAspectProgram (theProgram, myLineAspect); + setAspectProgram (theProgram, mySeenLineAspect); + setAspectProgram (theProgram, myHiddenLineAspect); + setAspectProgram (theProgram, myVectorAspect); + setAspectProgram (theProgram, mySectionAspect); + setAspectProgram (theProgram, myFreeBoundaryAspect); + setAspectProgram (theProgram, myUnFreeBoundaryAspect); + setAspectProgram (theProgram, myFaceBoundaryAspect); + if (!myPlaneAspect.IsNull()) { - setAspectProgram (theProgram, true, myPlaneAspect->EdgesAspect()); - setAspectProgram (theProgram, true, myPlaneAspect->IsoAspect()); - setAspectProgram (theProgram, true, myPlaneAspect->ArrowAspect()); + setAspectProgram (theProgram, myPlaneAspect->EdgesAspect()); + setAspectProgram (theProgram, myPlaneAspect->IsoAspect()); + setAspectProgram (theProgram, myPlaneAspect->ArrowAspect()); } - if (myHasOwnDatumAspect) + if (!myDatumAspect.IsNull()) { - setAspectProgram (theProgram, true, myDatumAspect->LineAspect(Prs3d_DatumParts_XAxis)); - setAspectProgram (theProgram, true, myDatumAspect->LineAspect(Prs3d_DatumParts_YAxis)); - setAspectProgram (theProgram, true, myDatumAspect->LineAspect(Prs3d_DatumParts_ZAxis)); + setAspectProgram (theProgram, myDatumAspect->LineAspect (Prs3d_DatumParts_XAxis)); + setAspectProgram (theProgram, myDatumAspect->LineAspect (Prs3d_DatumParts_YAxis)); + setAspectProgram (theProgram, myDatumAspect->LineAspect (Prs3d_DatumParts_ZAxis)); } - setAspectProgram (theProgram, myHasOwnArrowAspect, myArrowAspect); + setAspectProgram (theProgram, myArrowAspect); return isUpdateNeeded; } case Graphic3d_ASPECT_TEXT: { if (theToOverrideDefaults - && !myHasOwnTextAspect) + && myTextAspect.IsNull()) { isUpdateNeeded = true; myTextAspect = new Prs3d_TextAspect(); - myHasOwnTextAspect = true; - if (!myLink.IsNull()) + if (const Prs3d_TextAspect* aLinked = !myLink.IsNull() ? myLink->TextAspect().get() : NULL) { - *myTextAspect->Aspect() = *myLink->TextAspect()->Aspect(); + *myTextAspect->Aspect() = *aLinked->Aspect(); } } - setAspectProgram (theProgram, myHasOwnTextAspect, myTextAspect); + setAspectProgram (theProgram, myTextAspect); return isUpdateNeeded; } case Graphic3d_ASPECT_MARKER: @@ -1345,7 +954,7 @@ bool Prs3d_Drawer::SetShaderProgram (const Handle(Graphic3d_ShaderProgram)& theP isUpdateNeeded = true; } - setAspectProgram (theProgram, myHasOwnPointAspect, myPointAspect); + setAspectProgram (theProgram, myPointAspect); return isUpdateNeeded; } case Graphic3d_ASPECT_FILL_AREA: @@ -1355,7 +964,7 @@ bool Prs3d_Drawer::SetShaderProgram (const Handle(Graphic3d_ShaderProgram)& theP { isUpdateNeeded = true; } - setAspectProgram (theProgram, myHasOwnShadingAspect, myShadingAspect); + setAspectProgram (theProgram, myShadingAspect); return isUpdateNeeded; } } @@ -1377,8 +986,7 @@ bool Prs3d_Drawer::SetShadingModel (Graphic3d_TypeOfShadingModel theModel, isUpdateNeeded = true; } - if (!myShadingAspect.IsNull() - && myHasOwnShadingAspect) + if (!myShadingAspect.IsNull()) { myShadingAspect->Aspect()->SetShadingModel (theModel); } @@ -1396,19 +1004,14 @@ void Prs3d_Drawer::DumpJson (Standard_OStream& theOStream, Standard_Integer theD OCCT_DUMP_FIELD_VALUE_POINTER (theOStream, myLink.get()) - OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myHasOwnNbPoints) OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myMaximalParameterValue) - OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myHasOwnMaximalParameterValue) OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myChordialDeviation) - OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myHasOwnChordialDeviation) OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myTypeOfDeflection) OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myHasOwnTypeOfDeflection) OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myTypeOfHLR) OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myDeviationCoefficient) OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myPreviousDeviationCoefficient) - OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myHasOwnDeviationCoefficient) OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myDeviationAngle) - OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myHasOwnDeviationAngle) OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myPreviousDeviationAngle) OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myIsoOnPlane) OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myHasOwnIsoOnPlane) @@ -1417,56 +1020,30 @@ void Prs3d_Drawer::DumpJson (Standard_OStream& theOStream, Standard_Integer theD OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myIsAutoTriangulated) OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myHasOwnIsAutoTriangulated) - OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myHasOwnUIsoAspect) - - OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myHasOwnVIsoAspect) - - OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myHasOwnWireAspect) OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myWireDraw) OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myHasOwnWireDraw) - OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myHasOwnPointAspect) - - OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myHasOwnLineAspect) - - OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, myTextAspect.get()) - OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, myShadingAspect.get()) - OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myHasOwnShadingAspect) - - OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myHasOwnPlaneAspect) - - OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myHasOwnSeenLineAspect) + OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, myTextAspect.get()) - OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myHasOwnArrowAspect) OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myLineArrowDraw) OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myHasOwnLineArrowDraw) - OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myHasOwnHiddenLineAspect) OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myDrawHiddenLine) OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myHasOwnDrawHiddenLine) - OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myHasOwnVectorAspect) OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myVertexDrawMode) - OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myHasOwnDatumAspect) - - OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myHasOwnSectionAspect) - - OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myHasOwnFreeBoundaryAspect) OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myFreeBoundaryDraw) OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myHasOwnFreeBoundaryDraw) - OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myHasOwnUnFreeBoundaryAspect) OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myUnFreeBoundaryDraw) OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myHasOwnUnFreeBoundaryDraw) OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myFaceBoundaryUpperContinuity) - OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myHasOwnFaceBoundaryAspect) OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myFaceBoundaryDraw) OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myHasOwnFaceBoundaryDraw) - OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myHasOwnDimensionAspect) OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myHasOwnDimLengthModelUnits) OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myHasOwnDimAngleModelUnits) OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myHasOwnDimLengthDisplayUnits) diff --git a/src/Prs3d/Prs3d_Drawer.hxx b/src/Prs3d/Prs3d_Drawer.hxx index e5b383e71f..2ed3fc3ba9 100644 --- a/src/Prs3d/Prs3d_Drawer.hxx +++ b/src/Prs3d/Prs3d_Drawer.hxx @@ -55,6 +55,9 @@ public: //! Default constructor. Standard_EXPORT Prs3d_Drawer(); + //! Setup all own aspects with default values. + Standard_EXPORT void SetupOwnDefaults(); + //! Sets the type of chordal deflection. //! This indicates whether the deflection value is absolute or relative to the size of the object. Standard_EXPORT void SetTypeOfDeflection (const Aspect_TypeOfDeflection theTypeOfDeflection); @@ -83,58 +86,66 @@ public: //! Prs3d_DeflectionCurve //! Prs3d_WFDeflectionSurface //! Prs3d_WFDeflectionRestrictedFace - Standard_EXPORT void SetMaximalChordialDeviation (const Standard_Real theChordialDeviation); + void SetMaximalChordialDeviation (const Standard_Real theChordialDeviation) + { + myChordialDeviation = theChordialDeviation; + } - //! Returns the maximal chordal deviation. The default value is 0.1. + //! Returns the maximal chordal deviation. The default value is 0.0001. //! Drawings of curves or patches are made with respect to an absolute maximal chordal deviation. Standard_Real MaximalChordialDeviation() const { - return myHasOwnChordialDeviation || myLink.IsNull() + return myChordialDeviation > 0.0 ? myChordialDeviation - : myLink->MaximalChordialDeviation(); + : (!myLink.IsNull() + ? myLink->MaximalChordialDeviation() + : 0.0001); } //! Returns true if the drawer has a maximal chordial deviation setting active. - Standard_Boolean HasOwnMaximalChordialDeviation() const { return myHasOwnChordialDeviation; } + Standard_Boolean HasOwnMaximalChordialDeviation() const { return myChordialDeviation > 0.0; } //! Resets HasOwnMaximalChordialDeviation() flag, e.g. undoes SetMaximalChordialDeviation(). void UnsetOwnMaximalChordialDeviation() { - myHasOwnChordialDeviation = false; - myChordialDeviation = 0.0001; + myChordialDeviation = -1.0; } //! Sets the type of HLR algorithm used by drawer's interactive objects Standard_EXPORT void SetTypeOfHLR (const Prs3d_TypeOfHLR theTypeOfHLR); //! Returns the type of HLR algorithm currently in use. - Standard_EXPORT Prs3d_TypeOfHLR TypeOfHLR(); + Standard_EXPORT Prs3d_TypeOfHLR TypeOfHLR() const; //! Returns true if the type of HLR is not equal to Prs3d_TOH_NotSet. Standard_Boolean HasOwnTypeOfHLR() const { return (myTypeOfHLR != Prs3d_TOH_NotSet); } //! Defines the maximum value allowed for the first and last //! parameters of an infinite curve. - Standard_EXPORT void SetMaximalParameterValue (const Standard_Real theValue); + void SetMaximalParameterValue (const Standard_Real theValue) + { + myMaximalParameterValue = theValue; + } - //! Sets the maximum value allowed for the first and last - //! parameters of an infinite curve. By default, this value is 500000. + //! Sets the maximum value allowed for the first and last parameters of an infinite curve. + //! By default, this value is 500000. Standard_Real MaximalParameterValue() const { - return myHasOwnMaximalParameterValue || myLink.IsNull() + return myMaximalParameterValue > 0.0 ? myMaximalParameterValue - : myLink->MaximalParameterValue(); + : (!myLink.IsNull() + ? myLink->MaximalParameterValue() + : 500000.0); } //! Returns true if the drawer has a maximum value allowed for the first and last //! parameters of an infinite curve setting active. - Standard_Boolean HasOwnMaximalParameterValue() const { return myHasOwnMaximalParameterValue; } + Standard_Boolean HasOwnMaximalParameterValue() const { return myMaximalParameterValue > 0.0; } //! Resets HasOwnMaximalParameterValue() flag, e.g. undoes SetMaximalParameterValue(). void UnsetOwnMaximalParameterValue() { - myHasOwnMaximalParameterValue = false; - myMaximalParameterValue = 500000.0; + myMaximalParameterValue = -1.0; } //! Sets IsoOnPlane on or off by setting the parameter theIsEnabled to true or false. @@ -180,24 +191,28 @@ public: Standard_EXPORT void SetIsoOnTriangulation (const Standard_Boolean theToEnable); //! Sets the discretisation parameter theValue. - Standard_EXPORT void SetDiscretisation (const Standard_Integer theValue); + void SetDiscretisation (const Standard_Integer theValue) + { + myNbPoints = theValue; + } //! Returns the discretisation setting. Standard_Integer Discretisation() const { - return myHasOwnNbPoints || myLink.IsNull() + return myNbPoints != -1 ? myNbPoints - : myLink->Discretisation(); + : (!myLink.IsNull() + ? myLink->Discretisation() + : 30); } //! Returns true if the drawer has discretisation setting active. - Standard_Boolean HasOwnDiscretisation() const { return myHasOwnNbPoints; } + Standard_Boolean HasOwnDiscretisation() const { return myNbPoints != -1; } //! Resets HasOwnDiscretisation() flag, e.g. undoes SetDiscretisation(). void UnsetOwnDiscretisation() { - myHasOwnNbPoints = false; - myNbPoints = 30; + myNbPoints = -1; } //! Sets the deviation coefficient theCoefficient. @@ -222,27 +237,28 @@ public: //! SizeOfObject * DeviationCoefficient. Standard_Real DeviationCoefficient() const { - return HasOwnDeviationCoefficient() || myLink.IsNull() + return myDeviationCoefficient > 0.0 ? myDeviationCoefficient - : myLink->DeviationCoefficient(); + : (!myLink.IsNull() + ? myLink->DeviationCoefficient() + : 0.001); } //! Resets HasOwnDeviationCoefficient() flag, e.g. undoes previous SetDeviationCoefficient(). void SetDeviationCoefficient() { - myHasOwnDeviationCoefficient = Standard_False; - myDeviationCoefficient = 0.001; + myDeviationCoefficient = -1.0; } //! Returns true if there is a local setting for deviation //! coefficient in this framework for a specific interactive object. - Standard_Boolean HasOwnDeviationCoefficient() const { return myHasOwnDeviationCoefficient; } + Standard_Boolean HasOwnDeviationCoefficient() const { return myDeviationCoefficient > 0.0; } //! Saves the previous value used for the chordal //! deviation coefficient. Standard_Real PreviousDeviationCoefficient() const { - return myHasOwnDeviationCoefficient + return HasOwnDeviationCoefficient() ? myPreviousDeviationCoefficient : 0.0; } @@ -250,7 +266,7 @@ public: //! Updates the previous value used for the chordal deviation coefficient to the current state. void UpdatePreviousDeviationCoefficient() { - if (myHasOwnDeviationCoefficient) + if (HasOwnDeviationCoefficient()) { myPreviousDeviationCoefficient = DeviationCoefficient(); } @@ -263,26 +279,27 @@ public: //! Returns the value for deviation angle in radians, 20 * M_PI / 180 by default. Standard_Real DeviationAngle() const { - return HasOwnDeviationAngle() || myLink.IsNull() + return myDeviationAngle > 0.0 ? myDeviationAngle - : myLink->DeviationAngle(); + : (!myLink.IsNull() + ? myLink->DeviationAngle() + : 20.0 * M_PI / 180.0); } //! Resets HasOwnDeviationAngle() flag, e.g. undoes previous SetDeviationAngle(). void SetDeviationAngle() { - myHasOwnDeviationAngle = Standard_False; - myDeviationAngle = 20.0 * M_PI / 180.0; + myDeviationAngle = -1.0; } //! Returns true if there is a local setting for deviation //! angle in this framework for a specific interactive object. - Standard_Boolean HasOwnDeviationAngle() const { return myHasOwnDeviationAngle; } + Standard_Boolean HasOwnDeviationAngle() const { return myDeviationAngle > 0.0; } //! Returns the previous deviation angle Standard_Real PreviousDeviationAngle() const { - return myHasOwnDeviationAngle + return HasOwnDeviationAngle() ? myPreviousDeviationAngle : 0.0; } @@ -290,7 +307,7 @@ public: //! Updates the previous deviation angle to the current value void UpdatePreviousDeviationAngle() { - if (myHasOwnDeviationAngle) + if (HasOwnDeviationAngle()) { myPreviousDeviationAngle = DeviationAngle(); } @@ -320,64 +337,54 @@ public: myIsAutoTriangulated = true; } - //! Defines the attributes which are used when drawing an - //! U isoparametric curve of a face. Defines the number - //! of U isoparametric curves to be drawn for a single face. - //! The LineAspect for U isoparametric lines can be edited - //! (methods SetColor, SetTypeOfLine, SetWidth, SetNumber) - //! The default values are: - //! COLOR : Quantity_NOC_GRAY75 - //! TYPE OF LINE: Aspect_TOL_SOLID - //! WIDTH : 0.5 + //! Defines own attributes for drawing an U isoparametric curve of a face, + //! settings from linked Drawer or NULL if neither was set. //! //! These attributes are used by the following algorithms: //! Prs3d_WFDeflectionSurface //! Prs3d_WFDeflectionRestrictedFace - Standard_EXPORT const Handle(Prs3d_IsoAspect)& UIsoAspect(); + Standard_EXPORT const Handle(Prs3d_IsoAspect)& UIsoAspect() const; - Standard_EXPORT void SetUIsoAspect (const Handle(Prs3d_IsoAspect)& theAspect); + void SetUIsoAspect (const Handle(Prs3d_IsoAspect)& theAspect) + { + myUIsoAspect = theAspect; + } //! Returns true if the drawer has its own attribute for //! UIso aspect that overrides the one in the link. - Standard_Boolean HasOwnUIsoAspect() const { return myHasOwnUIsoAspect; } - - //! Defines the attributes which are used when drawing an - //! V isoparametric curve of a face. Defines the number - //! of V isoparametric curves to be drawn for a single face. - //! The LineAspect for V isoparametric lines can be edited - //! (methods SetColor, SetTypeOfLine, SetWidth, SetNumber) - //! The default values are: - //! COLOR : Quantity_NOC_GRAY82 - //! TYPE OF LINE: Aspect_TOL_SOLID - //! WIDTH : 0.5 + Standard_Boolean HasOwnUIsoAspect() const { return !myUIsoAspect.IsNull(); } + + //! Defines own attributes for drawing an V isoparametric curve of a face, + //! settings from linked Drawer or NULL if neither was set. //! //! These attributes are used by the following algorithms: //! Prs3d_WFDeflectionSurface //! Prs3d_WFDeflectionRestrictedFace - Standard_EXPORT const Handle(Prs3d_IsoAspect)& VIsoAspect(); + Standard_EXPORT const Handle(Prs3d_IsoAspect)& VIsoAspect() const; //! Sets the appearance of V isoparameters - theAspect. - Standard_EXPORT void SetVIsoAspect (const Handle(Prs3d_IsoAspect)& theAspect); + void SetVIsoAspect (const Handle(Prs3d_IsoAspect)& theAspect) + { + myVIsoAspect = theAspect; + } //! Returns true if the drawer has its own attribute for //! VIso aspect that overrides the one in the link. - Standard_Boolean HasOwnVIsoAspect() const { return myHasOwnVIsoAspect; } - - //! Returns wire aspect settings. - //! The LineAspect for the free boundaries can be edited. - //! The default values are: - //! Color: Quantity_NOC_GREEN - //! Type of line: Aspect_TOL_SOLID - //! Width: 1.0 + Standard_Boolean HasOwnVIsoAspect() const { return !myVIsoAspect.IsNull(); } + + //! Returns own wire aspect settings, settings from linked Drawer or NULL if neither was set. //! These attributes are used by the algorithm Prs3d_WFShape. - Standard_EXPORT const Handle(Prs3d_LineAspect)& WireAspect(); + Standard_EXPORT const Handle(Prs3d_LineAspect)& WireAspect() const; //! Sets the parameter theAspect for display of wires. - Standard_EXPORT void SetWireAspect (const Handle(Prs3d_LineAspect)& theAspect); + void SetWireAspect (const Handle(Prs3d_LineAspect)& theAspect) + { + myWireAspect = theAspect; + } //! Returns true if the drawer has its own attribute for //! wire aspect that overrides the one in the link. - Standard_Boolean HasOwnWireAspect() const { return myHasOwnWireAspect; } + Standard_Boolean HasOwnWireAspect() const { return !myWireAspect.IsNull(); } //! Sets WireDraw on or off by setting the parameter theIsEnabled to true or false. Standard_EXPORT void SetWireDraw(const Standard_Boolean theIsEnabled); @@ -401,43 +408,46 @@ public: myWireDraw = true; } - //! Returns the point aspect setting. The default values are - //! Color: Quantity_NOC_YELLOW - //! Type of marker: Aspect_TOM_PLUS - //! Scale: 1.0 + //! Returns own point aspect setting, settings from linked Drawer or NULL if neither was set. //! These attributes are used by the algorithms Prs3d_Point. - Standard_EXPORT const Handle(Prs3d_PointAspect)& PointAspect(); + Standard_EXPORT const Handle(Prs3d_PointAspect)& PointAspect() const; //! Sets the parameter theAspect for display attributes of points - Standard_EXPORT void SetPointAspect (const Handle(Prs3d_PointAspect)& theAspect); + void SetPointAspect (const Handle(Prs3d_PointAspect)& theAspect) + { + myPointAspect = theAspect; + } //! Returns true if the drawer has its own attribute for //! point aspect that overrides the one in the link. - Standard_Boolean HasOwnPointAspect() const { return myHasOwnPointAspect; } + Standard_Boolean HasOwnPointAspect() const { return !myPointAspect.IsNull(); } - //! Sets own point aspect. + //! Sets own point aspect, which is a yellow Aspect_TOM_PLUS marker by default. //! Returns FALSE if the drawer already has its own attribute for point aspect. Standard_EXPORT Standard_Boolean SetupOwnPointAspect (const Handle(Prs3d_Drawer)& theDefaults = Handle(Prs3d_Drawer)()); - //! Returns settings for line aspects. - //! These settings can be edited. The default values are: - //! Color: Quantity_NOC_YELLOW - //! Type of line: Aspect_TOL_SOLID - //! Width: 1.0 + //! Returns own settings for line aspects, settings from linked Drawer or NULL if neither was set. //! These attributes are used by the following algorithms: //! Prs3d_Curve //! Prs3d_Line //! Prs3d_HLRShape - Standard_EXPORT const Handle(Prs3d_LineAspect)& LineAspect(); + Standard_EXPORT const Handle(Prs3d_LineAspect)& LineAspect() const; //! Sets the parameter theAspect for display attributes of lines. - Standard_EXPORT void SetLineAspect (const Handle(Prs3d_LineAspect)& theAspect); + void SetLineAspect (const Handle(Prs3d_LineAspect)& theAspect) + { + myLineAspect = theAspect; + } //! Returns true if the drawer has its own attribute for //! line aspect that overrides the one in the link. - Standard_Boolean HasOwnLineAspect() const { return myHasOwnLineAspect; } + Standard_Boolean HasOwnLineAspect() const { return !myLineAspect.IsNull(); } - //! Sets own line aspects. + //! Sets own line aspects, which are + //! single U and single V gray75 solid isolines (::UIsoAspect(), ::VIsoAspect()), + //! red wire (::WireAspect()), yellow line (::LineAspect()), + //! yellow seen line (::SeenLineAspect()), dashed yellow hidden line (::HiddenLineAspect()), + //! green free boundary (::FreeBoundaryAspect()), yellow unfree boundary (::UnFreeBoundaryAspect()). //! Returns FALSE if own line aspect are already set. Standard_EXPORT Standard_Boolean SetOwnLineAspects (const Handle(Prs3d_Drawer)& theDefaults = Handle(Prs3d_Drawer)()); @@ -445,73 +455,74 @@ public: //! Returns FALSE if own line for datums are already set. Standard_EXPORT Standard_Boolean SetOwnDatumAspects (const Handle(Prs3d_Drawer)& theDefaults = Handle(Prs3d_Drawer)()); - //! Returns settings for text aspect. - //! These settings can be edited. The default value is: - //! - Color: Quantity_NOC_YELLOW - Standard_EXPORT const Handle(Prs3d_TextAspect)& TextAspect(); + //! Returns own settings for text aspect, settings from linked Drawer or NULL if neither was set. + Standard_EXPORT const Handle(Prs3d_TextAspect)& TextAspect() const; //! Sets the parameter theAspect for display attributes of text. - Standard_EXPORT void SetTextAspect (const Handle(Prs3d_TextAspect)& theAspect); + void SetTextAspect (const Handle(Prs3d_TextAspect)& theAspect) + { + myTextAspect = theAspect; + } //! Returns true if the drawer has its own attribute for //! text aspect that overrides the one in the link. - Standard_Boolean HasOwnTextAspect() const { return myHasOwnTextAspect; } - - //! Returns settings for shading aspects. - //! These settings can be edited. The default values are: - //! - Color: Quantity_NOC_YELLOW - //! - Material: Graphic3d_NameOfMaterial_Brass - //! Shading aspect is obtained through decomposition of - //! 3d faces into triangles, each side of each triangle - //! being a chord of the corresponding curved edge in the face. - //! Reflection of light in each projector perspective is then calculated for each of the - //! resultant triangular planes. - Standard_EXPORT const Handle(Prs3d_ShadingAspect)& ShadingAspect(); + Standard_Boolean HasOwnTextAspect() const { return !myTextAspect.IsNull(); } + + //! Returns own settings for shading aspects, settings from linked Drawer or NULL if neither was set. + Standard_EXPORT const Handle(Prs3d_ShadingAspect)& ShadingAspect() const; //! Sets the parameter theAspect for display attributes of shading. - Standard_EXPORT void SetShadingAspect (const Handle(Prs3d_ShadingAspect)& theAspect); + void SetShadingAspect (const Handle(Prs3d_ShadingAspect)& theAspect) + { + myShadingAspect = theAspect; + } //! Returns true if the drawer has its own attribute for //! shading aspect that overrides the one in the link. - Standard_Boolean HasOwnShadingAspect() const { return myHasOwnShadingAspect; } + Standard_Boolean HasOwnShadingAspect() const { return !myShadingAspect.IsNull(); } - //! Sets own shading aspect. + //! Sets own shading aspect, which is Graphic3d_NameOfMaterial_Brass material by default. //! Returns FALSE if the drawer already has its own attribute for shading aspect. Standard_EXPORT Standard_Boolean SetupOwnShadingAspect (const Handle(Prs3d_Drawer)& theDefaults = Handle(Prs3d_Drawer)()); - //! Returns settings for seen line aspects. - //! These settings can be edited. The default values are: - //! Color: Quantity_NOC_YELLOW - //! Type of line: Aspect_TOL_SOLID - //! Width: 1.0 - Standard_EXPORT const Handle(Prs3d_LineAspect)& SeenLineAspect(); + //! Returns own settings for seen line aspects, settings of linked Drawer or NULL if neither was set. + Standard_EXPORT const Handle(Prs3d_LineAspect)& SeenLineAspect() const; //! Sets the parameter theAspect for the display of seen lines in hidden line removal mode. - Standard_EXPORT void SetSeenLineAspect (const Handle(Prs3d_LineAspect)& theAspect); + void SetSeenLineAspect (const Handle(Prs3d_LineAspect)& theAspect) + { + mySeenLineAspect = theAspect; + } //! Returns true if the drawer has its own attribute for //! seen line aspect that overrides the one in the link. - Standard_Boolean HasOwnSeenLineAspect() const { return myHasOwnSeenLineAspect; } + Standard_Boolean HasOwnSeenLineAspect() const { return !mySeenLineAspect.IsNull(); } - //! Returns settings for the appearance of planes. - Standard_EXPORT const Handle(Prs3d_PlaneAspect)& PlaneAspect(); + //! Returns own settings for the appearance of planes, settings from linked Drawer or NULL if neither was set. + Standard_EXPORT const Handle(Prs3d_PlaneAspect)& PlaneAspect() const; //! Sets the parameter theAspect for the display of planes. - Standard_EXPORT void SetPlaneAspect (const Handle(Prs3d_PlaneAspect)& theAspect); + void SetPlaneAspect (const Handle(Prs3d_PlaneAspect)& theAspect) + { + myPlaneAspect = theAspect; + } //! Returns true if the drawer has its own attribute for //! plane aspect that overrides the one in the link. - Standard_Boolean HasOwnPlaneAspect() const { return myHasOwnPlaneAspect; } + Standard_Boolean HasOwnPlaneAspect() const { return !myPlaneAspect.IsNull(); } - //! Returns the attributes for display of arrows. - Standard_EXPORT const Handle(Prs3d_ArrowAspect)& ArrowAspect(); + //! Returns own attributes for display of arrows, settings from linked Drawer or NULL if neither was set. + Standard_EXPORT const Handle(Prs3d_ArrowAspect)& ArrowAspect() const; //! Sets the parameter theAspect for display attributes of arrows. - Standard_EXPORT void SetArrowAspect (const Handle(Prs3d_ArrowAspect)& theAspect); + void SetArrowAspect (const Handle(Prs3d_ArrowAspect)& theAspect) + { + myArrowAspect = theAspect; + } //! Returns true if the drawer has its own attribute for //! arrow aspect that overrides the one in the link. - Standard_Boolean HasOwnArrowAspect() const { return myHasOwnArrowAspect; } + Standard_Boolean HasOwnArrowAspect() const { return !myArrowAspect.IsNull(); } //! Enables the drawing of an arrow at the end of each line. //! By default the arrows are not drawn. @@ -537,19 +548,18 @@ public: myLineArrowDraw = false; } - //! Returns settings for hidden line aspects. - //! These settings can be edited. The default values are: - //! Color: Quantity_NOC_YELLOW - //! Type of line: Aspect_TOL_DASH - //! Width: 1.0 - Standard_EXPORT const Handle(Prs3d_LineAspect)& HiddenLineAspect(); + //! Returns own settings for hidden line aspects, settings from linked Drawer or NULL if neither was set. + Standard_EXPORT const Handle(Prs3d_LineAspect)& HiddenLineAspect() const; //! Sets the parameter theAspect for the display of hidden lines in hidden line removal mode. - Standard_EXPORT void SetHiddenLineAspect (const Handle(Prs3d_LineAspect)& theAspect); + void SetHiddenLineAspect (const Handle(Prs3d_LineAspect)& theAspect) + { + myHiddenLineAspect = theAspect; + } //! Returns true if the drawer has its own attribute for //! hidden lines aspect that overrides the one in the link. - Standard_Boolean HasOwnHiddenLineAspect() const { return myHasOwnHiddenLineAspect; } + Standard_Boolean HasOwnHiddenLineAspect() const { return !myHiddenLineAspect.IsNull(); } //! Returns Standard_True if the hidden lines are to be drawn. //! By default the hidden lines are not drawn. @@ -577,19 +587,18 @@ public: myDrawHiddenLine = false; } - //! Returns settings for the appearance of vectors. - //! These settings can be edited. The default values are: - //! Color: Quantity_NOC_SKYBLUE - //! Type of line: Aspect_TOL_SOLID - //! Width: 1.0 - Standard_EXPORT const Handle(Prs3d_LineAspect)& VectorAspect(); + //! Returns own settings for the appearance of vectors, settings from linked Drawer or NULL if neither was set. + Standard_EXPORT const Handle(Prs3d_LineAspect)& VectorAspect() const; //! Sets the modality theAspect for the display of vectors. - Standard_EXPORT void SetVectorAspect (const Handle(Prs3d_LineAspect)& theAspect); + void SetVectorAspect (const Handle(Prs3d_LineAspect)& theAspect) + { + myVectorAspect = theAspect; + } //! Returns true if the drawer has its own attribute for //! vector aspect that overrides the one in the link. - Standard_Boolean HasOwnVectorAspect() const { return myHasOwnVectorAspect; } + Standard_Boolean HasOwnVectorAspect() const { return !myVectorAspect.IsNull(); } //! Sets the mode of visualization of vertices of a TopoDS_Shape instance. //! By default, only stand-alone vertices (not belonging topologically to an edge) are drawn, @@ -600,60 +609,56 @@ public: Standard_EXPORT void SetVertexDrawMode (const Prs3d_VertexDrawMode theMode); //! Returns the current mode of visualization of vertices of a TopoDS_Shape instance. - Standard_EXPORT Prs3d_VertexDrawMode VertexDrawMode(); + Standard_EXPORT Prs3d_VertexDrawMode VertexDrawMode() const; //! Returns true if the vertex draw mode is not equal to Prs3d_VDM_Inherited. //! This means that individual vertex draw mode value (i.e. not inherited from the global //! drawer) is used for a specific interactive object. Standard_Boolean HasOwnVertexDrawMode() const { return (myVertexDrawMode != Prs3d_VDM_Inherited); } - //! Returns settings for the appearance of datums. - //! These settings can be edited. The default values for the three axes are: - //! Color: Quantity_NOC_PEACHPUFF - //! Type of line: Aspect_TOL_SOLID - //! Width: 1.0 - Standard_EXPORT const Handle(Prs3d_DatumAspect)& DatumAspect(); + //! Returns own settings for the appearance of datums, settings from linked Drawer or NULL if neither was set. + Standard_EXPORT const Handle(Prs3d_DatumAspect)& DatumAspect() const; //! Sets the modality theAspect for the display of datums. - Standard_EXPORT void SetDatumAspect (const Handle(Prs3d_DatumAspect)& theAspect); + void SetDatumAspect (const Handle(Prs3d_DatumAspect)& theAspect) + { + myDatumAspect = theAspect; + } //! Returns true if the drawer has its own attribute for //! datum aspect that overrides the one in the link. - Standard_Boolean HasOwnDatumAspect() const { return myHasOwnDatumAspect; } + Standard_Boolean HasOwnDatumAspect() const { return !myDatumAspect.IsNull(); } - //! The LineAspect for the wire can be edited. - //! The default values are: - //! Color: Quantity_NOC_ORANGE - //! Type of line: Aspect_TOL_SOLID - //! Width: 1.0 + //! Returns own LineAspect for section wire, settings from linked Drawer or NULL if neither was set. //! These attributes are used by the algorithm Prs3d_WFShape. - Standard_EXPORT const Handle(Prs3d_LineAspect)& SectionAspect(); + Standard_EXPORT const Handle(Prs3d_LineAspect)& SectionAspect() const; //! Sets the parameter theAspect for display attributes of sections. - Standard_EXPORT void SetSectionAspect (const Handle(Prs3d_LineAspect)& theAspect); + void SetSectionAspect (const Handle(Prs3d_LineAspect)& theAspect) + { + mySectionAspect = theAspect; + } //! Returns true if the drawer has its own attribute for //! section aspect that overrides the one in the link. - Standard_Boolean HasOwnSectionAspect() const { return myHasOwnSectionAspect; } + Standard_Boolean HasOwnSectionAspect() const { return !mySectionAspect.IsNull(); } //! Sets the parameter theAspect for the display of free boundaries. //! The method sets aspect owned by the drawer that will be used during //! visualization instead of the one set in link. - Standard_EXPORT void SetFreeBoundaryAspect (const Handle(Prs3d_LineAspect)& theAspect); - - //! Returns the values for presentation of free boundaries, - //! in other words, boundaries which are not shared. - //! The LineAspect for the free boundaries can be edited. - //! The default values are: - //! Color: Quantity_NOC_GREEN - //! Type of line: Aspect_TOL_SOLID - //! Width: 1.0 + void SetFreeBoundaryAspect (const Handle(Prs3d_LineAspect)& theAspect) + { + myFreeBoundaryAspect = theAspect; + } + + //! Returns own settings for presentation of free boundaries, settings from linked Drawer or NULL if neither was set. + //! In other words, this settings affect boundaries which are not shared. //! These attributes are used by the algorithm Prs3d_WFShape - Standard_EXPORT const Handle(Prs3d_LineAspect)& FreeBoundaryAspect(); + Standard_EXPORT const Handle(Prs3d_LineAspect)& FreeBoundaryAspect() const; //! Returns true if the drawer has its own attribute for //! free boundaries aspect that overrides the one in the link. - Standard_Boolean HasOwnFreeBoundaryAspect() const { return myHasOwnFreeBoundaryAspect; } + Standard_Boolean HasOwnFreeBoundaryAspect() const { return !myFreeBoundaryAspect.IsNull(); } //! Enables or disables drawing of free boundaries for shading presentations. //! The method sets drawing flag owned by the drawer that will be used during @@ -685,20 +690,18 @@ public: //! Sets the parameter theAspect for the display of shared boundaries. //! The method sets aspect owned by the drawer that will be used during //! visualization instead of the one set in link. - Standard_EXPORT void SetUnFreeBoundaryAspect (const Handle(Prs3d_LineAspect)& theAspect); - - //! Returns settings for shared boundary line aspects. - //! The LineAspect for the unfree boundaries can be edited. - //! The default values are: - //! Color: Quantity_NOC_YELLOW - //! Type of line: Aspect_TOL_SOLID - //! Width: 1. + void SetUnFreeBoundaryAspect (const Handle(Prs3d_LineAspect)& theAspect) + { + myUnFreeBoundaryAspect = theAspect; + } + + //! Returns own settings for shared boundary line aspects, settings from linked Drawer or NULL if neither was set. //! These attributes are used by the algorithm Prs3d_WFShape - Standard_EXPORT const Handle(Prs3d_LineAspect)& UnFreeBoundaryAspect(); + Standard_EXPORT const Handle(Prs3d_LineAspect)& UnFreeBoundaryAspect() const; //! Returns true if the drawer has its own attribute for //! unfree boundaries aspect that overrides the one in the link. - Standard_Boolean HasOwnUnFreeBoundaryAspect() const { return myHasOwnUnFreeBoundaryAspect; } + Standard_Boolean HasOwnUnFreeBoundaryAspect() const { return !myUnFreeBoundaryAspect.IsNull(); } //! Enables or disables drawing of shared boundaries for shading presentations. //! The method sets drawing flag owned by the drawer that will be used during @@ -730,16 +733,19 @@ public: //! The method sets line aspect owned by the drawer that will be used during //! visualization instead of the one set in link. //! theAspect is the line aspect that determines the look of the face boundaries. - Standard_EXPORT void SetFaceBoundaryAspect (const Handle(Prs3d_LineAspect)& theAspect); + void SetFaceBoundaryAspect (const Handle(Prs3d_LineAspect)& theAspect) + { + myFaceBoundaryAspect = theAspect; + } - //! Returns line aspect of face boundaries. - Standard_EXPORT const Handle(Prs3d_LineAspect)& FaceBoundaryAspect(); + //! Returns own line aspect of face boundaries, settings from linked Drawer or NULL if neither was set. + Standard_EXPORT const Handle(Prs3d_LineAspect)& FaceBoundaryAspect() const; //! Returns true if the drawer has its own attribute for //! face boundaries aspect that overrides the one in the link. - Standard_Boolean HasOwnFaceBoundaryAspect() const { return myHasOwnFaceBoundaryAspect; } + Standard_Boolean HasOwnFaceBoundaryAspect() const { return !myFaceBoundaryAspect.IsNull(); } - //! Sets own face boundary aspect. + //! Sets own face boundary aspect, which is a black solid line by default. //! Returns FALSE if the drawer already has its own attribute for face boundary aspect. Standard_EXPORT Standard_Boolean SetupOwnFaceBoundaryAspect (const Handle(Prs3d_Drawer)& theDefaults = Handle(Prs3d_Drawer)()); @@ -787,17 +793,20 @@ public: //! Unset the most edge continuity class for face boundaries. void UnsetFaceBoundaryUpperContinuity() { myFaceBoundaryUpperContinuity = -1; } - //! Returns settings for the appearance of dimensions. - Standard_EXPORT const Handle(Prs3d_DimensionAspect)& DimensionAspect(); + //! Returns own settings for the appearance of dimensions, settings from linked Drawer or NULL if neither was set. + Standard_EXPORT const Handle(Prs3d_DimensionAspect)& DimensionAspect() const; //! Sets the settings for the appearance of dimensions. //! The method sets aspect owned by the drawer that will be used during //! visualization instead of the one set in link. - Standard_EXPORT void SetDimensionAspect (const Handle(Prs3d_DimensionAspect)& theAspect); + void SetDimensionAspect (const Handle(Prs3d_DimensionAspect)& theAspect) + { + myDimensionAspect = theAspect; + } //! Returns true if the drawer has its own attribute for //! the appearance of dimensions that overrides the one in the link. - Standard_Boolean HasOwnDimensionAspect() const { return myHasOwnDimensionAspect; } + Standard_Boolean HasOwnDimensionAspect() const { return !myDimensionAspect.IsNull(); } //! Sets dimension length model units for computing of dimension presentation. //! The method sets value owned by the drawer that will be used during @@ -900,7 +909,7 @@ public: public: //! Returns the drawer to which the current object references. - const Handle(Prs3d_Drawer)& Link() { return myLink; } + const Handle(Prs3d_Drawer)& Link() const { return myLink; } //! Returns true if the current object has a link on the other drawer. Standard_Boolean HasLink() const { return !myLink.IsNull(); } @@ -953,19 +962,14 @@ protected: Handle(Prs3d_Drawer) myLink; Standard_Integer myNbPoints; - Standard_Boolean myHasOwnNbPoints; Standard_Real myMaximalParameterValue; - Standard_Boolean myHasOwnMaximalParameterValue; Standard_Real myChordialDeviation; - Standard_Boolean myHasOwnChordialDeviation; Aspect_TypeOfDeflection myTypeOfDeflection; Standard_Boolean myHasOwnTypeOfDeflection; Prs3d_TypeOfHLR myTypeOfHLR; Standard_Real myDeviationCoefficient; Standard_Real myPreviousDeviationCoefficient; - Standard_Boolean myHasOwnDeviationCoefficient; Standard_Real myDeviationAngle; - Standard_Boolean myHasOwnDeviationAngle; Standard_Real myPreviousDeviationAngle; Standard_Boolean myIsoOnPlane; Standard_Boolean myHasOwnIsoOnPlane; @@ -975,57 +979,39 @@ protected: Standard_Boolean myHasOwnIsAutoTriangulated; Handle(Prs3d_IsoAspect) myUIsoAspect; - Standard_Boolean myHasOwnUIsoAspect; Handle(Prs3d_IsoAspect) myVIsoAspect; - Standard_Boolean myHasOwnVIsoAspect; Handle(Prs3d_LineAspect) myWireAspect; - Standard_Boolean myHasOwnWireAspect; Standard_Boolean myWireDraw; Standard_Boolean myHasOwnWireDraw; Handle(Prs3d_PointAspect) myPointAspect; - Standard_Boolean myHasOwnPointAspect; Handle(Prs3d_LineAspect) myLineAspect; - Standard_Boolean myHasOwnLineAspect; Handle(Prs3d_TextAspect) myTextAspect; - Standard_Boolean myHasOwnTextAspect; Handle(Prs3d_ShadingAspect) myShadingAspect; - Standard_Boolean myHasOwnShadingAspect; Handle(Prs3d_PlaneAspect) myPlaneAspect; - Standard_Boolean myHasOwnPlaneAspect; Handle(Prs3d_LineAspect) mySeenLineAspect; - Standard_Boolean myHasOwnSeenLineAspect; Handle(Prs3d_ArrowAspect) myArrowAspect; - Standard_Boolean myHasOwnArrowAspect; Standard_Boolean myLineArrowDraw; Standard_Boolean myHasOwnLineArrowDraw; Handle(Prs3d_LineAspect) myHiddenLineAspect; - Standard_Boolean myHasOwnHiddenLineAspect; Standard_Boolean myDrawHiddenLine; Standard_Boolean myHasOwnDrawHiddenLine; Handle(Prs3d_LineAspect) myVectorAspect; - Standard_Boolean myHasOwnVectorAspect; Prs3d_VertexDrawMode myVertexDrawMode; Handle(Prs3d_DatumAspect) myDatumAspect; - Standard_Boolean myHasOwnDatumAspect; Handle(Prs3d_LineAspect) mySectionAspect; - Standard_Boolean myHasOwnSectionAspect; Handle(Prs3d_LineAspect) myFreeBoundaryAspect; - Standard_Boolean myHasOwnFreeBoundaryAspect; Standard_Boolean myFreeBoundaryDraw; Standard_Boolean myHasOwnFreeBoundaryDraw; Handle(Prs3d_LineAspect) myUnFreeBoundaryAspect; - Standard_Boolean myHasOwnUnFreeBoundaryAspect; Standard_Boolean myUnFreeBoundaryDraw; Standard_Boolean myHasOwnUnFreeBoundaryDraw; Handle(Prs3d_LineAspect) myFaceBoundaryAspect; Standard_Integer myFaceBoundaryUpperContinuity; //!< the most edge continuity class (GeomAbs_Shape) to be included to face boundaries presentation, or -1 if undefined - Standard_Boolean myHasOwnFaceBoundaryAspect; Standard_Boolean myFaceBoundaryDraw; Standard_Boolean myHasOwnFaceBoundaryDraw; Handle(Prs3d_DimensionAspect) myDimensionAspect; - Standard_Boolean myHasOwnDimensionAspect; Prs3d_DimensionUnits myDimensionModelUnits; Standard_Boolean myHasOwnDimLengthModelUnits; Standard_Boolean myHasOwnDimAngleModelUnits; diff --git a/src/QABugs/QABugs_17.cxx b/src/QABugs/QABugs_17.cxx index a3b0ec8648..9b406467de 100644 --- a/src/QABugs/QABugs_17.cxx +++ b/src/QABugs/QABugs_17.cxx @@ -1033,117 +1033,6 @@ static Standard_Integer OCC884 (Draw_Interpretor& di, Standard_Integer argc, con return 0; } -#include -#include -#include -//======================================================================= -//function : OCC1174_1 -//purpose : -//======================================================================= -static Standard_Integer OCC1174_1 (Draw_Interpretor& di, Standard_Integer argc, const char ** argv) -{ - if (argc != 2) - { - di << "Usage : " << argv[0] << " shape\n"; - return 1; - } - - Handle(AIS_InteractiveContext) anAISContext = ViewerTest::GetAISContext(); - if(anAISContext.IsNull()) - { - di << "use 'vinit' command before " << argv[0] << "\n"; - return 1; - } - - TopoDS_Shape aShape = DBRep::Get(argv[1]); - - Handle(AIS_Shape) anAisIO = new AIS_Shape(aShape); - - Quantity_Color aColF(0.0, 0.4, 0.0, Quantity_TOC_sRGB); - Quantity_Color aColB(0.0, 0.0, 0.6, Quantity_TOC_sRGB); - - Handle(Prs3d_Drawer) aDrawer = anAisIO->Attributes(); - Handle(Prs3d_ShadingAspect) aShadingAspect = aDrawer->ShadingAspect(); - - Graphic3d_MaterialAspect aFront = aShadingAspect->Material(Aspect_TOFM_FRONT_SIDE); - aFront.SetAmbientColor(aColF); - aFront.SetDiffuseColor(aColF); - aFront.SetSpecularColor(aColF); - aFront.SetEmissiveColor(Quantity_NOC_BLACK); - aFront.SetTransparency(0.0); - aShadingAspect->SetMaterial(aFront,Aspect_TOFM_FRONT_SIDE); - - Graphic3d_MaterialAspect aBack = aShadingAspect->Material(Aspect_TOFM_BACK_SIDE); - aBack.SetAmbientColor(aColB); - aBack.SetDiffuseColor(aColB); - aBack.SetSpecularColor(aColB); - aBack.SetEmissiveColor(Quantity_NOC_BLACK); - aBack.SetTransparency(0.0); - aShadingAspect->SetMaterial(aBack,Aspect_TOFM_BACK_SIDE); - - aDrawer->SetShadingAspect (aShadingAspect); - - anAISContext->Display (anAisIO, 1, 0, Standard_True); - - Standard_Real r, g, b; - aShadingAspect->Color(Aspect_TOFM_FRONT_SIDE).Values(r,g,b, Quantity_TOC_sRGB); - di << "Info: color on front side (" << r << "," << g << "," << b << ")\n"; - aShadingAspect->Color(Aspect_TOFM_BACK_SIDE).Values(r,g,b, Quantity_TOC_sRGB); - di << "Info: color on back side (" << r << "," << g << "," << b << ")\n"; - - return 0; -} - -//======================================================================= -//function : OCC1174_2 -//purpose : -//======================================================================= -static Standard_Integer OCC1174_2 (Draw_Interpretor& di, Standard_Integer argc, const char ** argv) -{ - if (argc != 2) - { - di << "Usage : " << argv[0] << " shape\n"; - return 1; - } - - Handle(AIS_InteractiveContext) AISContext = ViewerTest::GetAISContext(); - if(AISContext.IsNull()) - { - di << "use 'vinit' command before " << argv[0] << "\n"; - return 1; - } - - TopoDS_Shape sh = DBRep::Get(argv[1]); - - Handle(AIS_Shape) ais = new AIS_Shape(sh); - AISContext->Display (ais, 1, 0, Standard_False); - AISContext->SetMaterial (ais, Graphic3d_NameOfMaterial_ShinyPlastified, Standard_False); - - Quantity_Color colf(0.0, 0.4, 0.0, Quantity_TOC_sRGB); - Quantity_Color colb(0.0, 0.0, 0.6, Quantity_TOC_sRGB); - Handle(Prs3d_ShadingAspect) sa = ais->Attributes()->ShadingAspect(); - - Graphic3d_MaterialAspect front = sa->Material(Aspect_TOFM_FRONT_SIDE); - front.SetAmbientColor(colf); - front.SetDiffuseColor(colf); - front.SetSpecularColor(colf); - front.SetEmissiveColor(Quantity_NOC_BLACK); - front.SetTransparency (0.4f); - sa->SetMaterial(front,Aspect_TOFM_FRONT_SIDE); - - Graphic3d_MaterialAspect back = sa->Material(Aspect_TOFM_BACK_SIDE); - back.SetAmbientColor(colb); - back.SetDiffuseColor(colb); - back.SetSpecularColor(colb); - back.SetEmissiveColor(Quantity_NOC_BLACK); - back.SetTransparency (0.2f); - sa->SetMaterial(back,Aspect_TOFM_BACK_SIDE); - - AISContext->Redisplay (ais, 1, 0); - - return 0; -} - #include #include //======================================================================= @@ -1503,9 +1392,6 @@ void QABugs::Commands_17(Draw_Interpretor& theCommands) { theCommands.Add ("OCC814", "OCC814", __FILE__, OCC814, group); theCommands.Add ("OCC884", "OCC884 result shape [toler [maxtoler]]", __FILE__, OCC884, group); - theCommands.Add ("OCC1174_1", "OCC1174_1 shape", __FILE__, OCC1174_1, group); - theCommands.Add ("OCC1174_2", "OCC1174_2 shape", __FILE__, OCC1174_2, group); - theCommands.Add ("OCCN1", "OCCN1 angle fuse(1 for boss / 0 for slot) length", __FILE__, OCCN1, group); theCommands.Add ("OCCN2", "OCCN2", __FILE__, OCCN2, group); diff --git a/src/ViewerTest/ViewerTest_ObjectCommands.cxx b/src/ViewerTest/ViewerTest_ObjectCommands.cxx index 6fb51fff2d..7e38bbf50b 100644 --- a/src/ViewerTest/ViewerTest_ObjectCommands.cxx +++ b/src/ViewerTest/ViewerTest_ObjectCommands.cxx @@ -5026,7 +5026,7 @@ static Standard_Integer VTriangle (Draw_Interpretor& /*di*/, if (!isTri) { aPrs->Attributes()->SetupOwnShadingAspect(); - aPrs->Attributes()->ShadingAspect()->Aspect()->SetColor (aPrs->Attributes()->LineAspect()->Aspect()->Color()); + aPrs->Attributes()->ShadingAspect()->Aspect()->SetColor (Quantity_NOC_YELLOW); } ViewerTest::Display (argv[1], aPrs); return 0; diff --git a/tests/v3d/bugs/bug1174 b/tests/v3d/bugs/bug1174 deleted file mode 100644 index 8d47754270..0000000000 --- a/tests/v3d/bugs/bug1174 +++ /dev/null @@ -1,68 +0,0 @@ -puts "================" -puts "OCC1174: Impossible to set different properties for different sides of a (sur)face" -puts "================" -puts "" - -pload MODELING VISUALIZATION QAcommands - -set x 200 -set y 200 - -set Black_R 0 -set Black_G 0 -set Black_B 0 - -restore [locate_data_file OCC1174.brep] a -vinit View1 -OCC1174_1 a -vdisplay a -vfit - -set scale 2.50501 -set proj_X 0.672033 -set proj_Y -0.721033 -set proj_Z 0.168771 -set up_X -0.131494 -set up_Y 0.108095 -set up_Z 0.985406 -set at_X 102.061817325836 -set at_Y 169.436979868935 -set at_Z 70.7572056943368 - -vviewparams -scale ${scale} -proj ${proj_X} ${proj_Y} ${proj_Z} -up ${up_X} ${up_Y} ${up_Z} -at ${at_X} ${at_Y} ${at_Z} - -set x_GREEN 300 -set y_GREEN 180 - -set x_BLUE 180 -set y_BLUE 250 - -set ColorList1 [vreadpixel ${x_GREEN} ${y_GREEN} rgb] -set RED_1 [lindex $ColorList1 0] -set GREEN_1 [lindex $ColorList1 1] -set BLUE_1 [lindex $ColorList1 2] - -set ColorList2 [vreadpixel ${x_BLUE} ${y_BLUE} rgb] -set RED_2 [lindex $ColorList2 0] -set GREEN_2 [lindex $ColorList2 1] -set BLUE_2 [lindex $ColorList2 2] - -if {${RED_1} == 0 && ${GREEN_1} > 0 && ${BLUE_1} == 0} { - set IsGreen 1 -} else { - set IsGreen 0 -} - -if {${RED_2} == 0 && ${GREEN_2} == 0 && ${BLUE_2} > 0} { - set IsBlue 1 -} else { - set IsBlue 0 -} - -if {${IsGreen} == 1 && ${IsBlue} == 1} { - puts "OCC1174: OK" -} else { - puts "OCC1174: Error" -} - -vdump $imagedir/${casename}.png From 44f6e8d5e8cdfc407fcbdde86ebb8a18e845c298 Mon Sep 17 00:00:00 2001 From: kgv Date: Sat, 27 Nov 2021 15:18:53 +0300 Subject: [PATCH 155/639] 0032694: Documentation, Draw Harness Guide - update ViewerTest commands Draw Harness Guide now refers to ViewerTest commands description via @snippet pointing to C++ source code instead of duplicating it. "help" command now tries to beautify output of command's description. --- adm/gendoc.tcl | 1 + dox/CMakeLists.txt | 1 + .../draw_test_harness/draw_test_harness.md | 1035 ++------- src/DrawResources/StandardCommands.tcl | 27 +- src/ViewerTest/ViewerTest.cxx | 749 ++++--- src/ViewerTest/ViewerTest_ObjectCommands.cxx | 775 +++---- src/ViewerTest/ViewerTest_OpenGlCommands.cxx | 101 +- .../ViewerTest_RelationCommands.cxx | 167 +- src/ViewerTest/ViewerTest_ViewerCommands.cxx | 1853 +++++++++-------- 9 files changed, 2109 insertions(+), 2600 deletions(-) diff --git a/adm/gendoc.tcl b/adm/gendoc.tcl index ef47455783..8f0bb692b5 100644 --- a/adm/gendoc.tcl +++ b/adm/gendoc.tcl @@ -835,6 +835,7 @@ proc OCCDoc_MakeDoxyfile {docType outDir tagFileDir {doxyFileName} {generatorMod puts $doxyFile "PROJECT_NUMBER = $occt_version" puts $doxyFile "OUTPUT_DIRECTORY = $outDir/." puts $doxyFile "PROJECT_LOGO = [OCCDoc_GetDoxDir]/resources/occ_logo.png" + puts $doxyFile "EXAMPLE_PATH = [OCCDoc_GetSourceDir $productsPath]" set PARAM_INPUT "INPUT =" set PARAM_IMAGEPATH "IMAGE_PATH = [OCCDoc_GetDoxDir]/resources/ " diff --git a/dox/CMakeLists.txt b/dox/CMakeLists.txt index 48a955241b..9af54a91e1 100644 --- a/dox/CMakeLists.txt +++ b/dox/CMakeLists.txt @@ -43,6 +43,7 @@ configure_file ("${OCCT_OVERVIEW_RESOURCE_DIR}/occt_ug_html.doxyfile" "${OCCT_CO file (APPEND ${OCCT_CONFIG_FOR_DOXYGEN} "\nPROJECT_NUMBER = ${OCC_VERSION_STRING_EXT}") file (APPEND ${OCCT_CONFIG_FOR_DOXYGEN} "\nOUTPUT_DIRECTORY = ${OCCT_GENERATED_OVERVIEW_DIR}/.") file (APPEND ${OCCT_CONFIG_FOR_DOXYGEN} "\nPROJECT_LOGO = ${OCCT_OVERVIEW_DIR}/resources/occ_logo.png") +file (APPEND ${OCCT_CONFIG_FOR_DOXYGEN} "\nEXAMPLE_PATH = ${CMAKE_SOURCE_DIR}/src") set (OCCT_ARTICLE_PARAM_INPUT "INPUT =") set (OCCT_ARTICLE_PARAM_IMAGEPATH "IMAGE_PATH = ${OCCT_OVERVIEW_DIR}/resources/ ") diff --git a/dox/user_guides/draw_test_harness/draw_test_harness.md b/dox/user_guides/draw_test_harness/draw_test_harness.md index 91a15e4952..99c79f8550 100644 --- a/dox/user_guides/draw_test_harness/draw_test_harness.md +++ b/dox/user_guides/draw_test_harness/draw_test_harness.md @@ -1302,232 +1302,110 @@ See also: @ref occt_draw_4_1_11 "pick" command. @subsubsection occt_draw_4_2_1 vinit Syntax: -~~~~{.php} -vinit -~~~~ -Creates a new View window with the specified *view_name*. -By default the view is created in the viewer and in the graphic driver shared with the active view. - -~~~~{.php} -name = {driverName/viewerName/viewName | viewerName/viewName | viewName} -~~~~ - -If *driverName* is not specified the driver will be shared with the active view. -If *viewerName* is not specified the viewer will be shared with the active view. +@snippet ViewerTest_ViewerCommands.cxx vinit @subsubsection occt_draw_4_2_2 vhelp Syntax: -~~~~{.php} -vhelp -~~~~ -Displays help in the 3D viewer window. The help consists in a list of hotkeys and their functionalities. +@snippet ViewerTest_ViewerCommands.cxx vhelp @subsubsection occt_draw_4_2_3 vtop Syntax: -~~~~{.php} -vtop -~~~~ - -Displays top view in the 3D viewer window. Orientation +X+Y. +@snippet ViewerTest_ViewerCommands.cxx vtop -**Example:** +**Example:** ~~~~{.php} -vinit -box b 10 10 10 -vdisplay b -vfit -vtop +vinit +box b 10 10 10 +vdisplay b +vfit +vtop ~~~~ @subsubsection occt_draw_4_2_4 vaxo Syntax: -~~~~{.php} -vaxo -~~~~ - -Displays axonometric view in the 3D viewer window. Orientation +X-Y+Z. +@snippet ViewerTest_ViewerCommands.cxx vaxo -**Example:** +**Example:** ~~~~{.php} -vinit -box b 10 10 10 -vdisplay b -vfit -vaxo +vinit +box b 10 10 10 +vdisplay b +vfit +vaxo ~~~~ -@subsubsection occt_draw_4_2_5 vsetbg +@subsubsection occt_draw_4_2_5 vbackground Syntax: -~~~~{.php} -vsetbg imagefile [filltype] -~~~~ - -Loads image file as background. *filltype* must be NONE, CENTERED, TILED or STRETCH. - -**Example:** -~~~~{.php} -vinit -vsetbg myimage.brep CENTERED -~~~~ +@snippet ViewerTest_ViewerCommands.cxx vbackground @subsubsection occt_draw_4_2_6 vclear Syntax: -~~~~{.php} -vclear -~~~~ -Removes all objects from the viewer. +@snippet ViewerTest_ViewerCommands.cxx vclear @subsubsection occt_draw_4_2_7 vrepaint Syntax: -~~~~{.php} -vrepaint -~~~~ -Forcibly redisplays the shape in the 3D viewer window. +@snippet ViewerTest_ViewerCommands.cxx vrepaint @subsubsection occt_draw_4_2_8 vfit Syntax: -~~~~{.php} -vfit -~~~~ -Automatic zoom/panning. Objects in the view are visualized to occupy the maximum surface. +@snippet ViewerTest_ViewerCommands.cxx vfit @subsubsection occt_draw_4_2_9 vzfit Syntax: -~~~~{.php} -vzfit -~~~~ - -Automatic depth panning. Objects in the view are visualized to occupy the maximum 3d space. +@snippet ViewerTest_ViewerCommands.cxx vzfit @subsubsection occt_draw_4_2_10 vreadpixel Syntax: -~~~~{.php} -vreadpixel xPixel yPixel [{rgb|rgba|depth|hls|rgbf|rgbaf}=rgba] [name] -~~~~ -Read pixel value for active view. - +@snippet ViewerTest_ViewerCommands.cxx vreadpixel @subsubsection occt_draw_4_2_11 vselect Syntax: -~~~~{.php} -vselect x1 y1 [x2 y2 [x3 y3 ... xn yn]] [-allowoverlap 0|1] [shift_selection = 0|1] -~~~~ - -Emulates different types of selection: - - * single mouse click selection - * selection with a rectangle having the upper left and bottom right corners in (x1,y1) and (x2,y2) respectively - * selection with a polygon having the corners in pixel positions (x1,y1), (x2,y2),…, (xn,yn) - * -allowoverlap manages overlap and inclusion detection in rectangular selection. If the flag is set to 1, both sensitives that were included completely and overlapped partially by defined rectangle will be detected, otherwise algorithm will chose only fully included sensitives. Default behavior is to detect only full inclusion. - * any of these selections if shift_selection is set to 1. +@snippet ViewerTest_ViewerCommands.cxx vselect @subsubsection occt_draw_4_2_12 vmoveto Syntax: - -~~~~{.php} -vmoveto x y -~~~~ -Emulates cursor movement to pixel position (x,y). +@snippet ViewerTest_ViewerCommands.cxx vmoveto @subsubsection occt_draw_4_2_13 vviewparams Syntax: -~~~~{.php} -vviewparams [-scale [s]] [-eye [x y z]] [-at [x y z]] [-up [x y z]] [-proj [x y z]] [-center x y] [-size sx] -~~~~ -Gets or sets the current view parameters. -* If called without arguments, all view parameters are printed. -* The options are: -* -scale [s] : prints or sets the relative scale of viewport. -* -eye [x y z] : prints or sets the eye location. -* -at [x y z] : prints or sets the view center. -* -up [x y z] : prints or sets the up vector direction. -* -proj [x y z] : prints or sets the view direction. -* -center x y : sets the screen center location in pixels. -* -size [sx] : prints viewport projection width and height sizes or changes the size of its maximum dimension. +@snippet ViewerTest_ViewerCommands.cxx vviewparams @subsubsection occt_draw_4_2_14 vchangeselected Syntax: -~~~~{.php} -vchangeselected shape -~~~~ -Adds a shape to selection or removes one from it. +@snippet ViewerTest_ViewerCommands.cxx vchangeselected @subsubsection occt_draw_4_2_16 vnbselected Syntax: -~~~~{.php} -vnbselected -~~~~ -Returns the number of selected objects in the interactive context. +@snippet ViewerTest_ViewerCommands.cxx vnbselected @subsubsection occt_draw_4_2_19 vhlr Syntax: -~~~~{.php} -vhlr is_enabled={on|off} [show_hidden={1|0}] -~~~~ -Hidden line removal algorithm: - * is_enabled applies HLR algorithm. - * show_hidden if equals to 1, hidden lines are drawn as dotted ones. +@snippet ViewerTest_ViewerCommands.cxx vhlr @subsubsection occt_draw_4_2_20 vhlrtype Syntax: -~~~~{.php} -vhlrtype algo_type={algo|polyalgo} [shape_1 ... shape_n] -~~~~ - -Changes the type of HLR algorithm used for shapes. -If the algo_type is algo, the exact HLR algorithm is used, otherwise the polygonal algorithm is used for defined shapes. - -If no shape is specified through the command arguments, the given HLR algorithm_type is applied to all *AIS_Shape* instances in the current context, and the command also changes the default HLR algorithm type. - -**Note** that this command works with instances of *AIS_Shape* or derived classes only, other interactive object types are ignored. +@snippet ViewerTest_ViewerCommands.cxx vhlrtype @subsubsection occt_draw_4_2_21 vcamera Syntax: -~~~~{.php} -vcamera [-ortho] [-projtype] - [-persp] - [-fovy [Angle]] [-distance [Distance]] - [-stereo] [-leftEye] [-rightEye] - [-iod [Distance]] [-iodType [absolute|relative]] - [-zfocus [Value]] [-zfocusType [absolute|relative]] -~~~~ - -Manages camera parameters. -Prints the current value when the option is called without argument. - -Orthographic camera: - * -ortho -- activates orthographic projection. - -Perspective camera: - * -persp -- activated perspective projection (mono); - * -fovy -- field of view in y axis, in degrees; - * -distance -- distance of eye from the camera center. - -Stereoscopic camera: - * -stereo -- perspective projection (stereo); - * -leftEye -- perspective projection (left eye); - * -rightEye -- perspective projection (right eye); - * -iod -- intraocular distance value; - * -iodType -- distance type, absolute or relative; - * -zfocus -- stereographic focus value; - * -zfocusType -- focus type, absolute or relative. +@snippet ViewerTest_ViewerCommands.cxx vcamera **Example:** ~~~~{.php} @@ -1541,20 +1419,7 @@ vcamera -persp @subsubsection occt_draw_4_2_22 vstereo Syntax: -~~~~{.php} -vstereo [0|1] [-mode Mode] [-reverse {0|1}] [-anaglyph Filter] -~~~~ - -Defines the stereo output mode. The following modes are available: - * quadBuffer -- OpenGL QuadBuffer stereo, requires driver support. Should be called BEFORE *vinit*! - * anaglyph -- Anaglyph glasses; - * rowInterlaced -- row-interlaced display; - * columnInterlaced -- column-interlaced display; - * chessBoard -- chess-board output; - * sideBySide -- horizontal pair; - * overUnder -- vertical pair; -Available Anaglyph filters for -anaglyph: - * redCyan, redCyanSimple, yellowBlue, yellowBlueSimple, greenMagentaSimple. +@snippet ViewerTest_ViewerCommands.cxx vstereo **Example:** ~~~~{.php} @@ -1568,252 +1433,189 @@ vcamera -lefteye vcamera -righteye ~~~~ -@subsubsection occt_draw_4_2_23 vfrustumculling - -Syntax: -~~~~{.php} -vfrustumculling [toEnable] -~~~~ - -Enables/disables objects clipping. - - @subsection occt_draw_4_3 AIS viewer -- display commands @subsubsection occt_draw_4_3_1 vdisplay Syntax: -~~~~{.php} -vdisplay [-noupdate|-update] [-local] [-mutable] [-neutral] - [-trsfPers {pan|zoom|rotate|trihedron|full|none}=none] [-trsfPersPos X Y [Z]] [-3d|-2d|-2dTopDown] - [-dispMode mode] [-highMode mode] - [-layer index] [-top|-topmost|-overlay|-underlay] - [-redisplay] - name1 [name2] ... [name n] -~~~~ +@snippet ViewerTest.cxx vdisplay -Displays named objects. -Option -local enables display of objects in the local selection context. -Local selection context will be opened if there is not any. - -* *noupdate* suppresses viewer redraw call. -* *mutable* enables optimization for mutable objects. -* *neutral* draws objects in the main viewer. -* *layer* sets z-layer for objects. It can use -overlay|-underlay|-top|-topmost instead of -layer index for the default z-layers. -* *top* draws objects on top of main presentations but below the topmost level. -* *topmost* draws in overlay for 3D presentations with independent Depth. -* *overlay* draws objects in overlay for 2D presentations (On-Screen-Display). -* *underlay* draws objects in underlay for 2D presentations (On-Screen-Display). -* *selectable|-noselect* controls selection of objects. -* *trsfPers* sets transform persistence flags. Flag *full* allows to pan, zoom and rotate. -* *trsfPersPos* sets an anchor point for transform persistence. -* *2d|-2dTopDown* displays object in screen coordinates. -* *dispmode* sets display mode for objects. -* *highmode* sets highlight mode for objects. -* *redisplay* recomputes presentation of objects. - -**Example:** +**Example:** ~~~~{.php} -vinit -box b 40 40 40 10 10 10 -psphere s 20 -vdisplay s b -vfit +vinit +box b 40 40 40 10 10 10 +psphere s 20 +vdisplay s b +vfit ~~~~ @subsubsection occt_draw_4_3_2 vdonly Syntax: -~~~~{.php} -vdonly [-noupdate|-update] [name1] ... [name n] -~~~~ +@snippet ViewerTest.cxx vdonly -Displays only selected or named objects. If there are no selected or named objects, nothing is done. - -**Example:** +**Example:** ~~~~{.php} -vinit -box b 40 40 40 10 10 10 -psphere s 20 -vdonly b +vinit +box b 40 40 40 10 10 10 +psphere s 20 +vdonly b vfit ~~~~ @subsubsection occt_draw_4_3_3 vdisplayall Syntax: -~~~~{.php} -vdisplayall [-local] -~~~~ +@snippet ViewerTest.cxx vdisplayall -Displays all erased interactive objects (see vdir and vstate). -Option -local enables displaying objects in the local selection context. - -**Example:** +**Example:** ~~~~{.php} -vinit -box b 40 40 40 10 10 10 -psphere s 20 -vdisplayall -vfit +vinit +box b 40 40 40 10 10 10 +psphere s 20 +vdisplayall +vfit ~~~~ @subsubsection occt_draw_4_3_4 verase Syntax: -~~~~{.php} -verase [name1] [name2] … [name n] -~~~~ +@snippet ViewerTest.cxx verase -Erases some selected or named objects. If there are no selected or named objects, the whole viewer is erased. - -**Example:** +**Example:** ~~~~{.php} -vinit -box b1 40 40 40 10 10 10 -box b2 -40 -40 -40 10 10 10 -psphere s 20 -vdisplayall -vfit -# erase only first box -verase b1 -# erase second box and sphere +vinit +box b1 40 40 40 10 10 10 +box b2 -40 -40 -40 10 10 10 +psphere s 20 +vdisplayall +vfit +# erase only first box +verase b1 +# erase second box and sphere verase ~~~~ @subsubsection occt_draw_4_3_5 veraseall Syntax: -~~~~{.php} -veraseall -~~~~ - -Erases all objects displayed in the viewer. +@snippet ViewerTest.cxx veraseall **Example:** ~~~~{.php} -vinit -box b1 40 40 40 10 10 10 -box b2 -40 -40 -40 10 10 10 -psphere s 20 -vdisplayall -vfit -# erase only first box -verase b1 -# erase second box and sphere +vinit +box b1 40 40 40 10 10 10 +box b2 -40 -40 -40 10 10 10 +psphere s 20 +vdisplayall +vfit +# erase only first box +verase b1 +# erase second box and sphere verseall ~~~~ @subsubsection occt_draw_4_3_6 vsetdispmode Syntax: -~~~~{.php} -vsetdispmode [name] mode(0,1,2,3) -~~~~ - -Sets display mode for all, selected or named objects. -* *0* (*WireFrame*), -* *1* (*Shading*), -* *2* (*Quick HideLineremoval*), -* *3* (*Exact HideLineremoval*). +@snippet ViewerTest.cxx vsetdispmode -**Example:** +**Example:** ~~~~{.php} -vinit -box b 10 10 10 -vdisplay b -vsetdispmode 1 +vinit +box b 10 10 10 +vdisplay b +vsetdispmode 1 vfit ~~~~ @subsubsection occt_draw_4_3_7 vdisplaytype Syntax: -~~~~{.php} -vdisplaytype type -~~~~ - -Displays all objects of a given type. -The following types are possible: *Point*, *Axis*, *Trihedron*, *PlaneTrihedron*, *Line*, *Circle*, *Plane*, *Shape*, *ConnectedShape*, *MultiConn.Shape*, *ConnectedInter.*, *MultiConn.*, *Constraint* and *Dimension*. +@snippet ViewerTest.cxx vdisplaytype @subsubsection occt_draw_4_3_8 verasetype Syntax: -~~~~{.php} -verasetype type -~~~~ - -Erases all objects of a given type. -Possible type is *Point*, *Axis*, *Trihedron*, *PlaneTrihedron*, *Line*, *Circle*, *Plane*, *Shape*, *ConnectedShape*, *MultiConn.Shape*, *ConnectedInter.*, *MultiConn.*, *Constraint* and *Dimension*. +@snippet ViewerTest.cxx verasetype @subsubsection occt_draw_4_3_9 vtypes Syntax: -~~~~{.php} -vtypes -~~~~ - -Makes a list of known types and signatures in AIS. +@snippet ViewerTest.cxx vtypes @subsubsection occt_draw_4_3_10 vaspects Syntax: -~~~~{.php} -vaspects [-noupdate|-update] [name1 [name2 [...]] | -defaults] - [-setVisibility 0|1] - [-setColor ColorName] [-setcolor R G B] [-unsetColor] - [-setMaterial MatName] [-unsetMaterial] - [-setTransparency Transp] [-unsetTransparency] - [-setWidth LineWidth] [-unsetWidth] - [-setLineType {solid|dash|dot|dotDash}] [-unsetLineType] - [-freeBoundary {off/on | 0/1}] - [-setFreeBoundaryWidth Width] [-unsetFreeBoundaryWidth] - [-setFreeBoundaryColor {ColorName | R G B}] [-unsetFreeBoundaryColor] - [-subshapes subname1 [subname2 [...]]] - [-isoontriangulation 0|1] - [-setMaxParamValue {value}] - -~~~~ - -Manages presentation properties of all, selected or named objects. -* *-subshapes* -- assigns presentation properties to the specified sub-shapes. -* *-defaults* -- assigns presentation properties to all objects that do not have their own specified properties and to all objects to be displayed in the future. -If *-defaults* option is used there should not be any names of objects and *-subshapes* specifier. +@snippet ViewerTest.cxx vaspects Aliases: ~~~~{.php} vsetcolor [-noupdate|-update] [name] ColorName - ~~~~ - Manages presentation properties (color, material, transparency) of all objects, selected or named. -**Color**. The *ColorName* can be: *BLACK*, *MATRAGRAY*, *MATRABLUE*, *ALICEBLUE*, *ANTIQUEWHITE*, *ANTIQUEWHITE1*, *ANTIQUEWHITE2*, *ANTIQUEWHITE3*, *ANTIQUEWHITE4*, *AQUAMARINE1*, *AQUAMARINE2*, *AQUAMARINE4*, *AZURE*, *AZURE2*, *AZURE3*, *AZURE4*, *BEIGE*, *BISQUE*, *BISQUE2*, *BISQUE3*, *BISQUE4*, *BLANCHEDALMOND*, *BLUE1*, *BLUE2*, *BLUE3*, *BLUE4*, *BLUEVIOLET*, *BROWN*, *BROWN1*, *BROWN2*, *BROWN3*, *BROWN4*, *BURLYWOOD*, *BURLYWOOD1*, *BURLYWOOD2*, *BURLYWOOD3*, *BURLYWOOD4*, *CADETBLUE*, *CADETBLUE1*, *CADETBLUE2*, *CADETBLUE3*, *CADETBLUE4*, *CHARTREUSE*, *CHARTREUSE1*, *CHARTREUSE2*, *CHARTREUSE3*, *CHARTREUSE4*, *CHOCOLATE*, *CHOCOLATE1*, *CHOCOLATE2*, *CHOCOLATE3*, *CHOCOLATE4*, *CORAL*, *CORAL1*, *CORAL2*, *CORAL3*, *CORAL4*, *CORNFLOWERBLUE*, *CORNSILK1*, *CORNSILK2*, *CORNSILK3*, *CORNSILK4*, *CYAN1*, *CYAN2*, *CYAN3*, *CYAN4*, *DARKGOLDENROD*, *DARKGOLDENROD1*, *DARKGOLDENROD2*, *DARKGOLDENROD3*, *DARKGOLDENROD4*, *DARKGREEN*, *DARKKHAKI*, *DARKOLIVEGREEN*, *DARKOLIVEGREEN1*, *DARKOLIVEGREEN2*, *DARKOLIVEGREEN3*, *DARKOLIVEGREEN4*, *DARKORANGE*, *DARKORANGE1*, *DARKORANGE2*, *DARKORANGE3*, *DARKORANGE4*, *DARKORCHID*, *DARKORCHID1*, *DARKORCHID2*, *DARKORCHID3*, *DARKORCHID4*, *DARKSALMON*, *DARKSEAGREEN*, *DARKSEAGREEN1*, *DARKSEAGREEN2*, *DARKSEAGREEN3*, *DARKSEAGREEN4*, *DARKSLATEBLUE*, *DARKSLATEGRAY1*, *DARKSLATEGRAY2*, *DARKSLATEGRAY3*, *DARKSLATEGRAY4*, *DARKSLATEGRAY*, *DARKTURQUOISE*, *DARKVIOLET*, *DEEPPINK*, *DEEPPINK2*, *DEEPPINK3*, *DEEPPINK4*, *DEEPSKYBLUE1*, *DEEPSKYBLUE2*, *DEEPSKYBLUE3*, *DEEPSKYBLUE4*, *DODGERBLUE1*, *DODGERBLUE2*, *DODGERBLUE3*, *DODGERBLUE4*, *FIREBRICK*, *FIREBRICK1*, *FIREBRICK2*, *FIREBRICK3*, *FIREBRICK4*, *FLORALWHITE*, *FORESTGREEN*, *GAINSBORO*, *GHOSTWHITE*, *GOLD*, *GOLD1*, *GOLD2*, *GOLD3*, *GOLD4*, *GOLDENROD*, *GOLDENROD1*, *GOLDENROD2*, *GOLDENROD3*, *GOLDENROD4*, *GRAY*, *GRAY0*, *GRAY1*, *GRAY10*, *GRAY11*, *GRAY12*, *GRAY13*, *GRAY14*, *GRAY15*, *GRAY16*, *GRAY17*, *GRAY18*, *GRAY19*, *GRAY2*, *GRAY20*, *GRAY21*, *GRAY22*, *GRAY23*, *GRAY24*, *GRAY25*, *GRAY26*, *GRAY27*, *GRAY28*, *GRAY29*, *GRAY3*, *GRAY30*, *GRAY31*, *GRAY32*, *GRAY33*, *GRAY34*, *GRAY35*, *GRAY36*, *GRAY37*, *GRAY38*, *GRAY39*, *GRAY4*, *GRAY40*, *GRAY41*, *GRAY42*, *GRAY43*, *GRAY44*, *GRAY45*, *GRAY46*, *GRAY47*, *GRAY48*, *GRAY49*, *GRAY5*, *GRAY50*, *GRAY51*, *GRAY52*, *GRAY53*, *GRAY54*, *GRAY55*, *GRAY56*, *GRAY57*, *GRAY58*, *GRAY59*, *GRAY6*, *GRAY60*, *GRAY61*, *GRAY62*, *GRAY63*, *GRAY64*, *GRAY65*, *GRAY66*, *GRAY67*, *GRAY68*, *GRAY69*, *GRAY7*, *GRAY70*, *GRAY71*, *GRAY72*, *GRAY73*, *GRAY74*, *GRAY75*, *GRAY76*, *GRAY77*, *GRAY78*, *GRAY79*, *GRAY8*, *GRAY80*, *GRAY81*, *GRAY82*, *GRAY83*, *GRAY85*, *GRAY86*, *GRAY87*, *GRAY88*, *GRAY89*, *GRAY9*, *GRAY90*, *GRAY91*, *GRAY92*, *GRAY93*, *GRAY94*, *GRAY95*, *GREEN*, *GREEN1*, *GREEN2*, *GREEN3*, *GREEN4*, *GREENYELLOW*, *GRAY97*, *GRAY98*, *GRAY99*, *HONEYDEW*, *HONEYDEW2*, *HONEYDEW3*, *HONEYDEW4*, *HOTPINK*, *HOTPINK1*, *HOTPINK2*, *HOTPINK3*, *HOTPINK4*, *INDIANRED*, *INDIANRED1*, *INDIANRED2*, *INDIANRED3*, *INDIANRED4*, *IVORY*, *IVORY2*, *IVORY3*, *IVORY4*, *KHAKI*, *KHAKI1*, *KHAKI2*, *KHAKI3*, *KHAKI4*, *LAVENDER*, *LAVENDERBLUSH1*, *LAVENDERBLUSH2*, *LAVENDERBLUSH3*, *LAVENDERBLUSH4*, *LAWNGREEN*, *LEMONCHIFFON1*, *LEMONCHIFFON2*, *LEMONCHIFFON3*, *LEMONCHIFFON4*, *LIGHTBLUE*, *LIGHTBLUE1*, *LIGHTBLUE2*, *LIGHTBLUE3*, *LIGHTBLUE4*, *LIGHTCORAL*, *LIGHTCYAN1*, *LIGHTCYAN2*, *LIGHTCYAN3*, *LIGHTCYAN4*, *LIGHTGOLDENROD*, *LIGHTGOLDENROD1*, *LIGHTGOLDENROD2*, *LIGHTGOLDENROD3*, *LIGHTGOLDENROD4*, *LIGHTGOLDENRODYELLOW*, *LIGHTGRAY*, *LIGHTPINK*, *LIGHTPINK1*, *LIGHTPINK2*, *LIGHTPINK3*, *LIGHTPINK4*, *LIGHTSALMON1*, *LIGHTSALMON2*, *LIGHTSALMON3*, *LIGHTSALMON4*, *LIGHTSEAGREEN*, *LIGHTSKYBLUE*, *LIGHTSKYBLUE1*, *LIGHTSKYBLUE2*, *LIGHTSKYBLUE3*, *LIGHTSKYBLUE4*, *LIGHTSLATEBLUE*, *LIGHTSLATEGRAY*, *LIGHTSTEELBLUE*, *LIGHTSTEELBLUE1*, *LIGHTSTEELBLUE2*, *LIGHTSTEELBLUE3*, *LIGHTSTEELBLUE4*, *LIGHTYELLOW*, *LIGHTYELLOW2*, *LIGHTYELLOW3*, *LIGHTYELLOW4*, *LIMEGREEN*, *LINEN*, *MAGENTA1*, *MAGENTA2*, *MAGENTA3*, *MAGENTA4*, *MAROON*, *MAROON1*, *MAROON2*, *MAROON3*, *MAROON4*, *MEDIUMAQUAMARINE*, *MEDIUMORCHID*, *MEDIUMORCHID1*, *MEDIUMORCHID2*, *MEDIUMORCHID3*, *MEDIUMORCHID4*, *MEDIUMPURPLE*, *MEDIUMPURPLE1*, *MEDIUMPURPLE2*, *MEDIUMPURPLE3*, *MEDIUMPURPLE4*, *MEDIUMSEAGREEN*, *MEDIUMSLATEBLUE*, *MEDIUMSPRINGGREEN*, *MEDIUMTURQUOISE*, *MEDIUMVIOLETRED*, *MIDNIGHTBLUE*, *MINTCREAM*, *MISTYROSE*, *MISTYROSE2*, *MISTYROSE3*, *MISTYROSE4*, *MOCCASIN*, *NAVAJOWHITE1*, *NAVAJOWHITE2*, *NAVAJOWHITE3*, *NAVAJOWHITE4*, *NAVYBLUE*, *OLDLACE*, *OLIVEDRAB*, *OLIVEDRAB1*, *OLIVEDRAB2*, *OLIVEDRAB3*, *OLIVEDRAB4*, *ORANGE*, *ORANGE1*, *ORANGE2*, *ORANGE3*, *ORANGE4*, *ORANGERED*, *ORANGERED1*, *ORANGERED2*, *ORANGERED3*, *ORANGERED4*, *ORCHID*, *ORCHID1*, *ORCHID2*, *ORCHID3*, *ORCHID4*, *PALEGOLDENROD*, *PALEGREEN*, *PALEGREEN1*, *PALEGREEN2*, *PALEGREEN3*, *PALEGREEN4*, *PALETURQUOISE*, *PALETURQUOISE1*, *PALETURQUOISE2*, *PALETURQUOISE3*, *PALETURQUOISE4*, *PALEVIOLETRED*, *PALEVIOLETRED1*, *PALEVIOLETRED2*, *PALEVIOLETRED3*, *PALEVIOLETRED4*, *PAPAYAWHIP*, *PEACHPUFF*, *PEACHPUFF2*, *PEACHPUFF3*, *PEACHPUFF4*, *PERU*, *PINK*, *PINK1*, *PINK2*, *PINK3*, *PINK4*, *PLUM*, *PLUM1*, *PLUM2*, *PLUM3*, *PLUM4*, *POWDERBLUE*, *PURPLE*, *PURPLE1*, *PURPLE2*, *PURPLE3*, *PURPLE4*, *RED*, *RED1*, *RED2*, *RED3*, *RED4*, *ROSYBROWN*, *ROSYBROWN1*, *ROSYBROWN2*, *ROSYBROWN3*, *ROSYBROWN4*, *ROYALBLUE*, *ROYALBLUE1*, *ROYALBLUE2*, *ROYALBLUE3*, *ROYALBLUE4*, *SADDLEBROWN*, *SALMON*, *SALMON1*, *SALMON2*, *SALMON3*, *SALMON4*, *SANDYBROWN*, *SEAGREEN*, *SEAGREEN1*, *SEAGREEN2*, *SEAGREEN3*, *SEAGREEN4*, *SEASHELL*, *SEASHELL2*, *SEASHELL3*, *SEASHELL4*, *BEET*, *TEAL*, *SIENNA*, *SIENNA1*, *SIENNA2*, *SIENNA3*, *SIENNA4*, *SKYBLUE*, *SKYBLUE1*, *SKYBLUE2*, *SKYBLUE3*, *SKYBLUE4*, *SLATEBLUE*, *SLATEBLUE1*, *SLATEBLUE2*, *SLATEBLUE3*, *SLATEBLUE4*, *SLATEGRAY1*, *SLATEGRAY2*, *SLATEGRAY3*, *SLATEGRAY4*, *SLATEGRAY*, *SNOW*, *SNOW2*, *SNOW3*, *SNOW4*, *SPRINGGREEN*, *SPRINGGREEN2*, *SPRINGGREEN3*, *SPRINGGREEN4*, *STEELBLUE*, *STEELBLUE1*, *STEELBLUE2*, *STEELBLUE3*, *STEELBLUE4*, *TAN*, *TAN1*, *TAN2*, *TAN3*, *TAN4*, *THISTLE*, *THISTLE1*, *THISTLE2*, *THISTLE3*, *THISTLE4*, *TOMATO*, *TOMATO1*, *TOMATO2*, *TOMATO3*, *TOMATO4*, *TURQUOISE*, *TURQUOISE1*, *TURQUOISE2*, *TURQUOISE3*, *TURQUOISE4*, *VIOLET*, *VIOLETRED*, *VIOLETRED1*, *VIOLETRED2*, *VIOLETRED3*, *VIOLETRED4*, *WHEAT*, *WHEAT1*, *WHEAT2*, *WHEAT3*, *WHEAT4*, *WHITE*, *WHITESMOKE*, *YELLOW*, *YELLOW1*, *YELLOW2*, *YELLOW3*, *YELLOW4* and *YELLOWGREEN*. -~~~~{.php} -vaspects [name] [-setcolor ColorName] [-setcolor R G B] [-unsetcolor] +**Color** name can be: *BLACK*, *MATRAGRAY*, *MATRABLUE*, *ALICEBLUE*, *ANTIQUEWHITE*, *ANTIQUEWHITE1*, *ANTIQUEWHITE2*, *ANTIQUEWHITE3*, *ANTIQUEWHITE4*, +*AQUAMARINE1*, *AQUAMARINE2*, *AQUAMARINE4*, *AZURE*, *AZURE2*, *AZURE3*, *AZURE4*, *BEIGE*, *BISQUE*, *BISQUE2*, *BISQUE3*, *BISQUE4*, *BLANCHEDALMOND*, *BLUE1*, *BLUE2*, *BLUE3*, *BLUE4*, *BLUEVIOLET*, +*BROWN*, *BROWN1*, *BROWN2*, *BROWN3*, *BROWN4*, *BURLYWOOD*, *BURLYWOOD1*, *BURLYWOOD2*, *BURLYWOOD3*, *BURLYWOOD4*, *CADETBLUE*, *CADETBLUE1*, *CADETBLUE2*, *CADETBLUE3*, *CADETBLUE4*, +*CHARTREUSE*, *CHARTREUSE1*, *CHARTREUSE2*, *CHARTREUSE3*, *CHARTREUSE4*, *CHOCOLATE*, *CHOCOLATE1*, *CHOCOLATE2*, *CHOCOLATE3*, *CHOCOLATE4*, *CORAL*, *CORAL1*, *CORAL2*, *CORAL3*, *CORAL4*, +*CORNFLOWERBLUE*, *CORNSILK1*, *CORNSILK2*, *CORNSILK3*, *CORNSILK4*, *CYAN1*, *CYAN2*, *CYAN3*, *CYAN4*, *DARKGOLDENROD*, *DARKGOLDENROD1*, *DARKGOLDENROD2*, *DARKGOLDENROD3*, *DARKGOLDENROD4*, *DARKGREEN*, +*DARKKHAKI*, *DARKOLIVEGREEN*, *DARKOLIVEGREEN1*, *DARKOLIVEGREEN2*, *DARKOLIVEGREEN3*, *DARKOLIVEGREEN4*, *DARKORANGE*, *DARKORANGE1*, *DARKORANGE2*, *DARKORANGE3*, *DARKORANGE4*, +*DARKORCHID*, *DARKORCHID1*, *DARKORCHID2*, *DARKORCHID3*, *DARKORCHID4*, *DARKSALMON*, *DARKSEAGREEN*, *DARKSEAGREEN1*, *DARKSEAGREEN2*, *DARKSEAGREEN3*, *DARKSEAGREEN4*, *DARKSLATEBLUE*, +*DARKSLATEGRAY1*, *DARKSLATEGRAY2*, *DARKSLATEGRAY3*, *DARKSLATEGRAY4*, *DARKSLATEGRAY*, *DARKTURQUOISE*, *DARKVIOLET*, *DEEPPINK*, *DEEPPINK2*, *DEEPPINK3*, *DEEPPINK4*, +*DEEPSKYBLUE1*, *DEEPSKYBLUE2*, *DEEPSKYBLUE3*, *DEEPSKYBLUE4*, *DODGERBLUE1*, *DODGERBLUE2*, *DODGERBLUE3*, *DODGERBLUE4*, *FIREBRICK*, *FIREBRICK1*, *FIREBRICK2*, *FIREBRICK3*, *FIREBRICK4*, +*FLORALWHITE*, *FORESTGREEN*, *GAINSBORO*, *GHOSTWHITE*, *GOLD*, *GOLD1*, *GOLD2*, *GOLD3*, *GOLD4*, *GOLDENROD*, *GOLDENROD1*, *GOLDENROD2*, *GOLDENROD3*, *GOLDENROD4*, +*GRAY*, *GRAY0*, *GRAY1*, *GRAY10*, *GRAY11*, *GRAY12*, *GRAY13*, *GRAY14*, *GRAY15*, *GRAY16*, *GRAY17*, *GRAY18*, *GRAY19*, *GRAY2*, *GRAY20*, *GRAY21*, *GRAY22*, *GRAY23*, *GRAY24*, *GRAY25*, +*GRAY26*, *GRAY27*, *GRAY28*, *GRAY29*, *GRAY3*, *GRAY30*, *GRAY31*, *GRAY32*, *GRAY33*, *GRAY34*, *GRAY35*, *GRAY36*, *GRAY37*, *GRAY38*, *GRAY39*, *GRAY4*, *GRAY40*, *GRAY41*, *GRAY42*, *GRAY43*, *GRAY44*, *GRAY45*, +*GRAY46*, *GRAY47*, *GRAY48*, *GRAY49*, *GRAY5*, *GRAY50*, *GRAY51*, *GRAY52*, *GRAY53*, *GRAY54*, *GRAY55*, *GRAY56*, *GRAY57*, *GRAY58*, *GRAY59*, *GRAY6*, *GRAY60*, *GRAY61*, *GRAY62*, *GRAY63*, *GRAY64*, *GRAY65*, +*GRAY66*, *GRAY67*, *GRAY68*, *GRAY69*, *GRAY7*, *GRAY70*, *GRAY71*, *GRAY72*, *GRAY73*, *GRAY74*, *GRAY75*, *GRAY76*, *GRAY77*, *GRAY78*, *GRAY79*, *GRAY8*, *GRAY80*, *GRAY81*, *GRAY82*, *GRAY83*, *GRAY85*, +*GRAY86*, *GRAY87*, *GRAY88*, *GRAY89*, *GRAY9*, *GRAY90*, *GRAY91*, *GRAY92*, *GRAY93*, *GRAY94*, *GRAY95*, *GREEN*, *GREEN1*, *GREEN2*, *GREEN3*, *GREEN4*, *GREENYELLOW*, *GRAY97*, *GRAY98*, *GRAY99*, +*HONEYDEW*, *HONEYDEW2*, *HONEYDEW3*, *HONEYDEW4*, *HOTPINK*, *HOTPINK1*, *HOTPINK2*, *HOTPINK3*, *HOTPINK4*, *INDIANRED*, *INDIANRED1*, *INDIANRED2*, *INDIANRED3*, *INDIANRED4*, +*IVORY*, *IVORY2*, *IVORY3*, *IVORY4*, *KHAKI*, *KHAKI1*, *KHAKI2*, *KHAKI3*, *KHAKI4*, *LAVENDER*, *LAVENDERBLUSH1*, *LAVENDERBLUSH2*, *LAVENDERBLUSH3*, *LAVENDERBLUSH4*, *LAWNGREEN*, +*LEMONCHIFFON1*, *LEMONCHIFFON2*, *LEMONCHIFFON3*, *LEMONCHIFFON4*, *LIGHTBLUE*, *LIGHTBLUE1*, *LIGHTBLUE2*, *LIGHTBLUE3*, *LIGHTBLUE4*, *LIGHTCORAL*, *LIGHTCYAN1*, *LIGHTCYAN2*, *LIGHTCYAN3*, *LIGHTCYAN4*, +*LIGHTGOLDENROD*, *LIGHTGOLDENROD1*, *LIGHTGOLDENROD2*, *LIGHTGOLDENROD3*, *LIGHTGOLDENROD4*, *LIGHTGOLDENRODYELLOW*, *LIGHTGRAY*, *LIGHTPINK*, *LIGHTPINK1*, *LIGHTPINK2*, *LIGHTPINK3*, *LIGHTPINK4*, +*LIGHTSALMON1*, *LIGHTSALMON2*, *LIGHTSALMON3*, *LIGHTSALMON4*, *LIGHTSEAGREEN*, *LIGHTSKYBLUE*, *LIGHTSKYBLUE1*, *LIGHTSKYBLUE2*, *LIGHTSKYBLUE3*, *LIGHTSKYBLUE4*, *LIGHTSLATEBLUE*, *LIGHTSLATEGRAY*, +*LIGHTSTEELBLUE*, *LIGHTSTEELBLUE1*, *LIGHTSTEELBLUE2*, *LIGHTSTEELBLUE3*, *LIGHTSTEELBLUE4*, *LIGHTYELLOW*, *LIGHTYELLOW2*, *LIGHTYELLOW3*, *LIGHTYELLOW4*, *LIMEGREEN*, *LINEN*, +*MAGENTA1*, *MAGENTA2*, *MAGENTA3*, *MAGENTA4*, *MAROON*, *MAROON1*, *MAROON2*, *MAROON3*, *MAROON4*, *MEDIUMAQUAMARINE*, *MEDIUMORCHID*, *MEDIUMORCHID1*, *MEDIUMORCHID2*, *MEDIUMORCHID3*, *MEDIUMORCHID4*, +*MEDIUMPURPLE*, *MEDIUMPURPLE1*, *MEDIUMPURPLE2*, *MEDIUMPURPLE3*, *MEDIUMPURPLE4*, *MEDIUMSEAGREEN*, *MEDIUMSLATEBLUE*, *MEDIUMSPRINGGREEN*, *MEDIUMTURQUOISE*, *MEDIUMVIOLETRED*, *MIDNIGHTBLUE*, *MINTCREAM*, +*MISTYROSE*, *MISTYROSE2*, *MISTYROSE3*, *MISTYROSE4*, *MOCCASIN*, *NAVAJOWHITE1*, *NAVAJOWHITE2*, *NAVAJOWHITE3*, *NAVAJOWHITE4*, *NAVYBLUE*, *OLDLACE*, *OLIVEDRAB*, +*OLIVEDRAB1*, *OLIVEDRAB2*, *OLIVEDRAB3*, *OLIVEDRAB4*, *ORANGE*, *ORANGE1*, *ORANGE2*, *ORANGE3*, *ORANGE4*, *ORANGERED*, *ORANGERED1*, *ORANGERED2*, *ORANGERED3*, *ORANGERED4*, +*ORCHID*, *ORCHID1*, *ORCHID2*, *ORCHID3*, *ORCHID4*, *PALEGOLDENROD*, *PALEGREEN*, *PALEGREEN1*, *PALEGREEN2*, *PALEGREEN3*, *PALEGREEN4*, +*PALETURQUOISE*, *PALETURQUOISE1*, *PALETURQUOISE2*, *PALETURQUOISE3*, *PALETURQUOISE4*, *PALEVIOLETRED*, *PALEVIOLETRED1*, *PALEVIOLETRED2*, *PALEVIOLETRED3*, *PALEVIOLETRED4*, *PAPAYAWHIP*, +*PEACHPUFF*, *PEACHPUFF2*, *PEACHPUFF3*, *PEACHPUFF4*, *PERU*, *PINK*, *PINK1*, *PINK2*, *PINK3*, *PINK4*, *PLUM*, *PLUM1*, *PLUM2*, *PLUM3*, *PLUM4*, *POWDERBLUE*, *PURPLE*, *PURPLE1*, *PURPLE2*, *PURPLE3*, *PURPLE4*, +*RED*, *RED1*, *RED2*, *RED3*, *RED4*, *ROSYBROWN*, *ROSYBROWN1*, *ROSYBROWN2*, *ROSYBROWN3*, *ROSYBROWN4*, *ROYALBLUE*, *ROYALBLUE1*, *ROYALBLUE2*, *ROYALBLUE3*, *ROYALBLUE4*, *SADDLEBROWN*, +*SALMON*, *SALMON1*, *SALMON2*, *SALMON3*, *SALMON4*, *SANDYBROWN*, *SEAGREEN*, *SEAGREEN1*, *SEAGREEN2*, *SEAGREEN3*, *SEAGREEN4*, *SEASHELL*, *SEASHELL2*, *SEASHELL3*, *SEASHELL4*, *BEET*, *TEAL*, +*SIENNA*, *SIENNA1*, *SIENNA2*, *SIENNA3*, *SIENNA4*, *SKYBLUE*, *SKYBLUE1*, *SKYBLUE2*, *SKYBLUE3*, *SKYBLUE4*, *SLATEBLUE*, *SLATEBLUE1*, *SLATEBLUE2*, *SLATEBLUE3*, *SLATEBLUE4*, +*SLATEGRAY1*, *SLATEGRAY2*, *SLATEGRAY3*, *SLATEGRAY4*, *SLATEGRAY*, *SNOW*, *SNOW2*, *SNOW3*, *SNOW4*, *SPRINGGREEN*, *SPRINGGREEN2*, *SPRINGGREEN3*, *SPRINGGREEN4*, +*STEELBLUE*, *STEELBLUE1*, *STEELBLUE2*, *STEELBLUE3*, *STEELBLUE4*, *TAN*, *TAN1*, *TAN2*, *TAN3*, *TAN4*, *THISTLE*, *THISTLE1*, *THISTLE2*, *THISTLE3*, *THISTLE4*, *TOMATO*, *TOMATO1*, *TOMATO2*, *TOMATO3*, *TOMATO4*, +*TURQUOISE*, *TURQUOISE1*, *TURQUOISE2*, *TURQUOISE3*, *TURQUOISE4*, *VIOLET*, *VIOLETRED*, *VIOLETRED1*, *VIOLETRED2*, *VIOLETRED3*, *VIOLETRED4*, *WHEAT*, *WHEAT1*, *WHEAT2*, *WHEAT3*, *WHEAT4*, *WHITE*, *WHITESMOKE*, +*YELLOW*, *YELLOW1*, *YELLOW2*, *YELLOW3*, *YELLOW4* and *YELLOWGREEN*. +~~~~{.php} +vaspects [name] [-setColor ColorName] [-setColor R G B] [-unsetColor] vsetcolor [name] ColorName vunsetcolor [name] ~~~~ -**Transparency. The *Transp* may be between 0.0 (opaque) and 1.0 (fully transparent). +**Transparency** may be between 0.0 (opaque) and 1.0 (fully transparent). **Warning**: at 1.0 the shape becomes invisible. ~~~~{.php} -vaspects [name] [-settransparency Transp] [-unsettransparency] -vsettransparency [name] Transp +vaspects [name] [-setTransparency Value] [-unsetTransparency] +vsettransparency [name] Value vunsettransparency [name] ~~~~ -**Material**. The *MatName* can be *BRASS*, *BRONZE*, *COPPER*, *GOLD*, *PEWTER*, *PLASTER*, *PLASTIC*, *SILVER*, *STEEL*, *STONE*, *SHINY_PLASTIC*, *SATIN*, *METALIZED*, *NEON_GNC*, *CHROME*, *ALUMINIUM*, *OBSIDIAN*, *NEON_PHC*, *JADE*, *WATER*, *GLASS*, *DIAMOND* or *CHARCOAL*. +**Material** name can be *BRASS*, *BRONZE*, *COPPER*, *GOLD*, *PEWTER*, *PLASTER*, *PLASTIC*, *SILVER*, *STEEL*, *STONE*, *SHINY_PLASTIC*, *SATIN*, +*METALIZED*, *NEON_GNC*, *CHROME*, *ALUMINIUM*, *OBSIDIAN*, *NEON_PHC*, *JADE*, *WATER*, *GLASS*, *DIAMOND* or *CHARCOAL*. ~~~~{.php} -vaspects [name] [-setmaterial MatName] [-unsetmaterial] -vsetmaterial [name] MatName +vaspects [name] [-setMaterial MaterialName] [-unsetMaterial] +vsetmaterial [name] MaterialName vunsetmaterial [name] ~~~~ -**Line width**. Specifies width of the edges. The *LineWidth* may be between 0.0 and 10.0. +**Line width** specifies width of the edges. The width value may be between 0.0 and 10.0. ~~~~{.php} -vaspects [name] [-setwidth LineWidth] [-unsetwidth] +vaspects [name] [-setWidth LineWidth] [-unsetWidth] vsetwidth [name] LineWidth vunsetwidth [name] ~~~~ @@ -1826,23 +1628,14 @@ vdisplay b vfit vsetdispmode b 1 -vaspects -setcolor red -settransparency 0.2 +vaspects -setColor red -setTransparency 0.2 vrotate 10 10 10 ~~~~ - - - - - @subsubsection occt_draw_4_3_11 vsetshading Syntax: -~~~~{.php} -vsetshading shapename [coefficient] -~~~~ - -Sets deflection coefficient that defines the quality of the shape’s representation in the shading mode. Default coefficient is 0.0008. +@snippet ViewerTest.cxx vsetshading **Example:** ~~~~{.php} @@ -1857,76 +1650,22 @@ vsetshading s 0.005 @subsubsection occt_draw_4_3_12 vunsetshading Syntax: -~~~~{.php} -vunsetshading [shapename] -~~~~ - -Sets default deflection coefficient (0.0008) that defines the quality of the shape’s representation in the shading mode. - -@subsubsection occt_draw_4_3_13 vsetam - -Syntax: -~~~~{.php} -vsetam [shapename] mode -~~~~ - -Activates selection mode for all selected or named shapes: -* *0* for *shape* itself, -* *1* (*vertices*), -* *2* (*edges*), -* *3* (*wires*), -* *4* (*faces*), -* *5* (*shells*), -* *6* (*solids*), -* *7* (*compounds*). - -**Example:** -~~~~{.php} -vinit -box b 10 10 10 -vdisplay b -vfit -vsetam b 2 -~~~~ - -@subsubsection occt_draw_4_3_14 vunsetam - -Syntax: -~~~~{.php} -vunsetam -~~~~ - -Deactivates all selection modes for all shapes. +@snippet ViewerTest.cxx vunsetshading @subsubsection occt_draw_4_3_15 vdump Syntax: -~~~~{.php} -vdump .{png|bmp|jpg|gif} [-width Width -height Height] - [-buffer rgb|rgba|depth=rgb] - [-stereo mono|left|right|blend|sideBySide|overUnder=mono] - -~~~~ - -Extracts the contents of the viewer window to a image file. +@snippet ViewerTest.cxx vdump @subsubsection occt_draw_4_3_16 vdir Syntax: -~~~~{.php} -vdir -~~~~ - -Displays the list of displayed objects. +@snippet ViewerTest.cxx vdir @subsubsection occt_draw_4_3_17 vsub Syntax: -~~~~{.php} -vsub 0/1(on/off)[shapename] -~~~~ - -Hilights/unhilights named or selected objects which are displayed at neutral state with subintensity color. +@snippet ViewerTest.cxx vsub **Example:** ~~~~{.php} @@ -1942,77 +1681,27 @@ vsub b 1 @subsubsection occt_draw_4_3_20 vsensdis Syntax: -~~~~{.php} -vsensdis -~~~~ - -Displays active entities (sensitive entities of one of the standard types corresponding to active selection modes). - -Standard entity types are those defined in Select3D package: - * sensitive box - * sensitive face - * sensitive curve - * sensitive segment - * sensitive circle - * sensitive point - * sensitive triangulation - * sensitive triangle -Custom (application-defined) sensitive entity types are not processed by this command. +@snippet ViewerTest.cxx vsensdis @subsubsection occt_draw_4_3_21 vsensera Syntax: -~~~~{.php} -vsensera -~~~~ +@snippet ViewerTest.cxx vsensera -Erases active entities. - @subsubsection occt_draw_4_3_24 vstate Syntax: -~~~~{.php} -vstate [-entities] [-hasSelected] [name1] ... [nameN] -~~~~ - -Reports show/hidden state for selected or named objects: - * *entities* -- prints low-level information about detected entities; - * *hasSelected* -- prints 1 if the context has a selected shape and 0 otherwise. +@snippet ViewerTest.cxx vstate @subsubsection occt_draw_4_3_25 vraytrace Syntax: -~~~~{.php} -vraytrace [0/1] -~~~~ - -Turns on/off ray tracing renderer. +@snippet ViewerTest_ViewerCommands.cxx vraytrace @subsubsection occt_draw_4_3_26 vrenderparams Syntax: -~~~~{.php} -vrenderparams [-rayTrace|-raster] [-rayDepth 0..10] [-shadows {on|off}] - [-reflections {on|off}] [-fsaa {on|off}] [-gleam {on|off}] - [-gi {on|off}] [-brng {on|off}] [-env {on|off}] - [-shadin {color|flat|gouraud|phong}] -~~~~ - -Manages rendering parameters: -* rayTrace -- Enables GPU ray-tracing -* raster -- Disables GPU ray-tracing -* rayDepth -- Defines maximum ray-tracing depth -* shadows -- Enables/disables shadows rendering -* reflections -- Enables/disables specular reflections -* fsaa -- Enables/disables adaptive anti-aliasing -* gleam -- Enables/disables transparency shadow effects -* gi -- Enables/disables global illumination effects -* brng -- Enables/disables blocked RNG (fast coherent PT) -* env -- Enables/disables environment map background -* shadingModel -- Controls shading model from enumeration color, flat, gouraud, phong - -Unlike *vcaps*, these parameters dramatically change visual properties. -The command is intended to control presentation quality depending on hardware capabilities and performance. +@snippet ViewerTest_ViewerCommands.cxx vrenderparams **Example:** ~~~~{.php} @@ -2023,59 +1712,17 @@ vfit vraytrace 1 vrenderparams -shadows 1 -reflections 1 -fsaa 1 ~~~~ -@subsubsection occt_draw_4_3_27 vshaderprog +@subsubsection occt_draw_4_3_27 vshader Syntax: -~~~~{.php} - 'vshaderprog [name] pathToVertexShader pathToFragmentShader' -or 'vshaderprog [name] off' to disable GLSL program -or 'vshaderprog [name] phong' to enable per-pixel lighting calculations -~~~~ - -Enables rendering using a shader program. - -@subsubsection occt_draw_4_3_28 vsetcolorbg - -Syntax: -~~~~{.php} -vsetcolorbg r g b -~~~~ - -Sets background color. - -**Example:** -~~~~{.php} -vinit -vsetcolorbg 200 0 200 -~~~~ +@snippet ViewerTest_OpenGlCommands.cxx vshader @subsection occt_draw_4_4 AIS viewer -- object commands @subsubsection occt_draw_4_4_1 vtrihedron Syntax: -~~~~{.php} -vtrihedron name [-dispMode {wf|sh|wireframe|shading}] - [-origin x y z ] - [-zaxis u v w -xaxis u v w ] - [-drawaxes {X|Y|Z|XY|YZ|XZ|XYZ}] - [-hidelabels {on|off}]" - [-label {XAxis|YAxis|ZAxis} value]" - [-attribute {XAxisLength|YAxisLength|ZAxisLength - |TubeRadiusPercent|ConeRadiusPercent" - |ConeLengthPercent|OriginRadiusPercent" - |ShadingNumberOfFacettes} value]" - [-color {Origin|XAxis|YAxis|ZAxis|XOYAxis|YOZAxis" - |XOZAxis|Whole} {r g b | colorName}]" - [-textcolor {r g b | colorName}]" - [-arrowscolor {r g b | colorName}]" - [-priority {Origin|XAxis|YAxis|ZAxis|XArrow" - |YArrow|ZArrow|XOYAxis|YOZAxis" - |XOZAxis|Whole} value] - -~~~~ - -Creates a new *AIS_Trihedron* object or changes existing trihedron. If no argument is set, the default trihedron (0XYZ) is created. +@snippet ViewerTest_ObjectCommands.cxx vtrihedron **Example:** ~~~~{.php} @@ -2091,21 +1738,12 @@ vtrihedron t2 -color ZAxis|Origin Quantity_NOC_BLUE1 @subsubsection occt_draw_4_4_2 vplanetri Syntax: -~~~~{.php} -vplanetri name -~~~~ - -Creates a plane from a trihedron selection. If no arguments are set, the default plane is created. - +@snippet ViewerTest_ObjectCommands.cxx vplanetri @subsubsection occt_draw_4_4_3 vsize Syntax: -~~~~{.php} -vsize [name] [size] -~~~~ - -Changes the size of a named or selected trihedron. If the name is not defined: it affects the selected trihedrons otherwise nothing is done. If the value is not defined, it is set to 100 by default. +@snippet ViewerTest_ObjectCommands.cxx vsize **Example:** ~~~~{.php} @@ -2118,11 +1756,7 @@ vsize tr2 400 @subsubsection occt_draw_4_4_4 vaxis Syntax: -~~~~{.php} -vaxis name [Xa Ya Za Xb Yb Zb] -~~~~ - -Creates an axis. If the values are not defined, an axis is created by interactive selection of two vertices or one edge +@snippet ViewerTest_ObjectCommands.cxx vaxis **Example:** ~~~~{.php} @@ -2134,234 +1768,144 @@ vaxis axe1 0 0 0 1 0 0 @subsubsection occt_draw_4_4_5 vaxispara Syntax: -~~~~{.php} -vaxispara name -~~~~ - -Creates an axis by interactive selection of an edge and a vertex. +@snippet ViewerTest_ObjectCommands.cxx vaxispara @subsubsection occt_draw_4_4_6 vaxisortho Syntax: -~~~~{.php} -vaxisotrho name -~~~~ - -Creates an axis by interactive selection of an edge and a vertex. The axis will be orthogonal to the selected edge. +@snippet ViewerTest_ObjectCommands.cxx vaxisortho @subsubsection occt_draw_4_4_7 vpoint Syntax: -~~~~{.php} -vpoint name [Xa Ya Za] -~~~~ - -Creates a point from coordinates. If the values are not defined, a point is created by interactive selection of a vertice or an edge (in the center of the edge). +@snippet ViewerTest_ObjectCommands.cxx vpoint -**Example:** +**Example:** ~~~~{.php} -vinit -vpoint p 0 0 0 +vinit +vpoint p 0 0 0 ~~~~ @subsubsection occt_draw_4_4_8 vplane Syntax: -~~~~{.php} -vplane name [AxisName] [PointName] -vplane name [PointName] [PointName] [PointName] -vplane name [PlaneName] [PointName] -~~~~ - -Creates a plane from named or interactively selected entities. -TypeOfSensitivity: - * 0 -- Interior - * 1 -- Boundary +@snippet ViewerTest_ObjectCommands.cxx vplane -**Example:** +**Example:** ~~~~{.php} -vinit -vpoint p1 0 50 0 -vaxis axe1 0 0 0 0 0 1 -vtrihedron tr -vplane plane1 axe1 p1 +vinit +vpoint p1 0 50 0 +vaxis axe1 0 0 0 0 0 1 +vtrihedron tr +vplane plane1 axe1 p1 ~~~~ @subsubsection occt_draw_4_4_9 vplanepara Syntax: -~~~~{.php} -vplanepara name -~~~~ - -Creates a plane from interactively selected vertex and face. +@snippet ViewerTest_ObjectCommands.cxx vplanepara @subsubsection occt_draw_4_4_10 vplaneortho Syntax: -~~~~{.php} -vplaneortho name -~~~~ - -Creates a plane from interactive selected face and coplanar edge. +@snippet ViewerTest_ObjectCommands.cxx vplaneortho @subsubsection occt_draw_4_4_11 vline Syntax: -~~~~{.php} -vline name [PointName] [PointName] -vline name [Xa Ya Za Xb Yb Zb] -~~~~ - -Creates a line from coordinates, named or interactively selected vertices. +@snippet ViewerTest_ObjectCommands.cxx vline -**Example:** +**Example:** ~~~~{.php} -vinit -vtrihedron tr -vpoint p1 0 50 0 -vpoint p2 50 0 0 -vline line1 p1 p2 -vline line2 0 0 0 50 0 1 +vinit +vtrihedron tr +vpoint p1 0 50 0 +vpoint p2 50 0 0 +vline line1 p1 p2 +vline line2 0 0 0 50 0 1 ~~~~ @subsubsection occt_draw_4_4_12 vcircle Syntax: -~~~~{.php} -vcircle name [PointName PointName PointName IsFilled] -vcircle name [PlaneName PointName Radius IsFilled] -~~~~ - -Creates a circle from named or interactively selected entities. Parameter IsFilled is defined as 0 or 1. +@snippet ViewerTest_ObjectCommands.cxx vcircle -**Example:** +**Example:** ~~~~{.php} -vinit -vtrihedron tr -vpoint p1 0 50 0 -vpoint p2 50 0 0 -vpoint p3 0 0 0 +vinit +vtrihedron tr +vpoint p1 0 50 0 +vpoint p2 50 0 0 +vpoint p3 0 0 0 vcircle circle1 p1 p2 p3 1 ~~~~ @subsubsection occt_draw_4_4_13 vtri2d Syntax: -~~~~{.php} -vtri2d name -~~~~ - -Creates a plane with a 2D trihedron from an interactively selected face. +@snippet ViewerTest_ObjectCommands.cxx vtri2d @subsubsection occt_draw_4_4_14 vselmode Syntax: -~~~~{.php} -vselmode [object] mode_number is_turned_on=(1|0) -~~~~ - -Sets the selection mode for an object. If the object value is not defined, the selection mode is set for all displayed objects. -*Mode_number* is a non-negative integer encoding different interactive object classes. -For shapes the following *mode_number* values are allowed: - * 0 -- shape - * 1 -- vertex - * 2 -- edge - * 3 -- wire - * 4 -- face - * 5 -- shell - * 6 -- solid - * 7 -- compsolid - * 8 -- compound -*is_turned_on* is: - * 1 if mode is to be switched on - * 0 if mode is to be switched off +@snippet ViewerTest_ObjectCommands.cxx vselmode -**Example:** +**Example:** ~~~~{.php} -vinit -vpoint p1 0 0 0 -vpoint p2 50 0 0 -vpoint p3 25 40 0 -vtriangle triangle1 p1 p2 p3 +vinit +vpoint p1 0 0 0 +vpoint p2 50 0 0 +vpoint p3 25 40 0 +vtriangle triangle1 p1 p2 p3 ~~~~ @subsubsection occt_draw_4_4_15 vconnect Syntax: -~~~~{.php} -vconnect vconnect name Xo Yo Zo object1 object2 ... [color=NAME] -~~~~ +@snippet ViewerTest_ObjectCommands.cxx vconnect -Creates *AIS_ConnectedInteractive* object from the input object and location and displays it. - -**Example:** +**Example:** ~~~~{.php} -vinit -vpoint p1 0 0 0 -vpoint p2 50 0 0 -vsegment segment p1 p2 -restore CrankArm.brep obj -vdisplay obj +vinit +vpoint p1 0 0 0 +vpoint p2 50 0 0 +vsegment segment p1 p2 +restore CrankArm.brep obj +vdisplay obj vconnect new obj 100100100 1 0 0 0 0 1 ~~~~ @subsubsection occt_draw_4_4_16 vtriangle Syntax: -~~~~{.php} -vtriangle name PointName PointName PointName -~~~~ - -Creates and displays a filled triangle from named points. +@snippet ViewerTest_ObjectCommands.cxx vtriangle -**Example:** +**Example:** ~~~~{.php} -vinit -vpoint p1 0 0 0 -vpoint p2 50 0 0 -vpoint p3 25 40 0 +vinit +vpoint p1 0 0 0 +vpoint p2 50 0 0 +vpoint p3 25 40 0 vtriangle triangle1 p1 p2 p3 ~~~~ @subsubsection occt_draw_4_4_17 vsegment Syntax: -~~~~{.php} -vsegment name PointName PointName -~~~~ +@snippet ViewerTest_ObjectCommands.cxx vsegment -Creates and displays a segment from named points. - -**Example:** +**Example:** ~~~~{.php} -Vinit -vpoint p1 0 0 0 -vpoint p2 50 0 0 -vsegment segment p1 p2 +vinit +vpoint p1 0 0 0 +vpoint p2 50 0 0 +vsegment segment p1 p2 ~~~~ @subsubsection occt_draw_4_4_18 vpointcloud Syntax: -~~~~{.php} -vpointcloud name shape [-randColor] [-normals] [-noNormals] -~~~~ - -Creates an interactive object for an arbitrary set of points from the triangulated shape. -Additional options: - * *randColor* -- generates a random color per point; - * *normals* -- generates a normal per point (default); - * *noNormals* -- does not generate a normal per point. - -~~~~{.php} -vpointcloud name x y z r npts {surface|volume} [-randColor] [-normals] [-noNormals] -~~~~ -Creates an arbitrary set of points (npts) randomly distributed on a spheric surface or within a spheric volume (x y z r). -Additional options: - * *randColor* -- generates a random color per point; - * *normals* -- generates a normal per point (default); - * *noNormals* -- does not generate a normal per point. +@snippet ViewerTest_ObjectCommands.cxx vpointcloud **Example:** ~~~~{.php} @@ -2373,32 +1917,12 @@ vfit @subsubsection occt_draw_4_4_19 vclipplane Syntax: -~~~~{.php} -vclipplane maxplanes -- gets plane limit for the view. -vclipplane create -- creates a new plane. -vclipplane delete -- deletes a plane. -vclipplane clone -- clones the plane definition. -vclipplane set/unset object -- sets/unsets the plane for an IO. -vclipplane set/unset view -- sets/unsets plane for a view. -vclipplane change on/off -- turns clipping on/off. -vclipplane change equation -- changes plane equation. -vclipplane change capping on/off -- turns capping on/off. -vclipplane change capping color -- sets color. -vclipplane change capping texname -- sets texture. -vclipplane change capping texscale -- sets texture scale. -vclipplane change capping texorigin -- sets texture origin. -vclipplane change capping texrotate -- sets texture rotation. -vclipplane change capping hatch on/off/ -- sets hatching mask. -~~~~ - -Manages clipping planes +@snippet ViewerTest_ViewerCommands.cxx vclipplane **Example:** ~~~~{.php} vinit -vclipplane create pln1 -vclipplane change pln1 equation 1 0 0 -0.1 -vclipplane set pln1 view Driver1/Viewer1/View1 +vclipplane pln1 -equation 1 0 0 -0.1 -set Driver1/Viewer1/View1 box b 100 100 100 vdisplay b vsetdispmode 1 @@ -2410,23 +1934,11 @@ vselect 100 100 @subsubsection occt_draw_4_4_20 vdimension Syntax: -~~~~{.php} -vdimension name {-angle|-length|-radius|-diameter} -shapes shape1 [shape2 [shape3]] - [-text 3d|2d wf|sh|wireframe|shading IntegerSize] - [-label left|right|hcenter|hfit top|bottom|vcenter|vfit] - [-arrow external|internal|fit] [{-arrowlength|-arlen} RealArrowLength] - [{-arrowangle|-arangle} ArrowAngle(degrees)] [-plane xoy|yoz|zox] - [-flyout FloatValue -extension FloatValue] - [-autovalue] [-value CustomRealValue] [-textvalue CustomTextValue] - [-dispunits DisplayUnitsString] - [-modelunits ModelUnitsString] [-showunits | -hideunits] -~~~~ - -Builds angle, length, radius or diameter dimension interactive object **name**. +@snippet ViewerTest_RelationCommands.cxx vdimension **Attention:** length dimension can't be built without working plane. -**Example:** +**Example:** ~~~~{.php} vinit vpoint p1 0 0 0 @@ -2444,25 +1956,9 @@ vfit @subsubsection occt_draw_4_4_21 vdimparam Syntax: -~~~~{.php} -vdimparam name [-text 3d|2d wf|sh|wireframe|shading IntegerSize] - [-label left|right|hcenter|hfit top|bottom|vcenter|vfit] - [-arrow external|internal|fit] - [{-arrowlength|-arlen} RealArrowLength] - [{-arrowangle|-arangle} ArrowAngle(degrees)] - [-plane xoy|yoz|zox] - [-flyout FloatValue -extension FloatValue] - [-autovalue] - [-value CustomRealValue] - [-textvalue CustomTextValue] - [-dispunits DisplayUnitsString] - [-modelunits ModelUnitsString] - [-showunits | -hideunits] -~~~~ - -Sets parameters for angle, length, radius and diameter dimension **name**. +@snippet ViewerTest_RelationCommands.cxx vdimparam -**Example:** +**Example:** ~~~~{.php} vinit vpoint p1 0 0 0 @@ -2477,14 +1973,9 @@ vdimparam dim1 -autovalue @subsubsection occt_draw_4_4_22 vangleparam Syntax: -~~~~{.php} -vangleparam name [-type interior|exterior] - [-showarrow first|second|both|none] -~~~~ - -Sets parameters for angle dimension **name**. +@snippet ViewerTest_RelationCommands.cxx vangleparam -**Example:** +**Example:** ~~~~{.php} vinit vpoint p1 0 0 0 @@ -2498,14 +1989,9 @@ vangleparam dim1 -type exterior -showarrow first @subsubsection occt_draw_4_4_23 vlengthparam Syntax: -~~~~{.php} -vlengthparam name [-type interior|exterior] - [-showarrow first|second|both|none] -~~~~ +@snippet ViewerTest_RelationCommands.cxx vlengthparam -Sets parameters for length dimension **name**. - -**Example:** +**Example:** ~~~~{.php} vinit vpoint p1 20 20 0 @@ -2520,16 +2006,9 @@ vlengthparam dim1 -direction ox @subsubsection occt_draw_4_4_24 vmovedim Syntax: -~~~~{.php} -vmovedim [name] [x y z] -~~~~ - -Moves picked or named (if **name** parameter is defined) dimension -to picked mouse position or input point with coordinates **x**,**y**,**z**. -Text label of dimension **name** is moved to position, another parts of dimension -are adjusted. +@snippet ViewerTest_RelationCommands.cxx vmovedim -**Example:** +**Example:** ~~~~{.php} vinit vpoint p1 0 0 0 @@ -2538,6 +2017,14 @@ vdimension dim1 -length -plane xoy -shapes p1 p2 vmovedim dim1 -10 30 0 ~~~~ +@subsubsection occt_draw_4_4_25 vtexture + +Syntax: +@snippet ViewerTest.cxx vtexture + +Texture mapping allows you to map textures on a shape. +Textures are texture image files and several are predefined. +You can control the number of occurrences of the texture on a face, the position of a texture and the scale factor of the texture. @subsection occt_draw_4_5 AIS viewer -- Mesh Visualization Service @@ -8159,78 +7646,6 @@ if (BRepTest_Objects::IsHistoryNeeded()) The method *BRepTest_Objects::IsHistoryNeeded()* controls if the history is needed to be filled in the algorithm and saved into the session after the algorithm is done (*setfillhistory* command controls this option in DRAW). - -@subsection occt_draw_7_12 Texture Mapping to a Shape - -Texture mapping allows you to map textures on a shape. Textures are texture image files and several are predefined. You can control the number of occurrences of the texture on a face, the position of a texture and the scale factor of the texture. - -@subsubsection occt_draw_7_12_1 vtexture - -Syntax: -~~~~{.php} -vtexture NameOfShape TextureFile -vtexture NameOfShape -vtexture NameOfShape ? -vtexture NameOfShape IdOfTexture -~~~~ - -**TextureFile** identifies the file containing the texture you want. The same syntax without **TextureFile** disables texture mapping. The question-mark ? lists available textures. **IdOfTexture** allows applying predefined textures. - -@subsubsection occt_draw_7_12_2 vtexscale - -Syntax: -~~~~{.php} -vtexscale NameOfShape ScaleU ScaleV -vtexscale NameOfShape ScaleUV -vtexscale NameOfShape -~~~~ - -*ScaleU* and *Scale V* allow scaling the texture according to the U and V parameters individually, while *ScaleUV* applies the same scale to both parameters. - -The syntax without *ScaleU*, *ScaleV* or *ScaleUV* disables texture scaling. - -@subsubsection occt_draw_7_12_3 vtexorigin - -Syntax: -~~~~{.php} -vtexorigin NameOfShape UOrigin VOrigin -vtexorigin NameOfShape UVOrigin -vtexorigin NameOfShape -~~~~ - -*UOrigin* and *VOrigin* allow placing the texture according to the U and V parameters individually, while *UVOrigin* applies the same position value to both parameters. - -The syntax without *UOrigin*, *VOrigin* or *UVOrigin* disables origin positioning. - -@subsubsection occt_draw_7_12_4 vtexrepeat - -Syntax: -~~~~{.php} -vtexrepeat NameOfShape URepeat VRepeat -vtexrepeat NameOfShape UVRepeat -vtexrepeat NameOfShape -~~~~ - -*URepeat* and *VRepeat* allow repeating the texture along the U and V parameters individually, while *UVRepeat* applies the same number of repetitions for both parameters. - -The same syntax without *URepeat*, *VRepeat* or *UVRepeat* disables texture repetition. - -@subsubsection occt_draw_7_12_5 vtexdefault - -Syntax: -~~~~{.php} -vtexdefault NameOfShape -~~~~ - -*Vtexdefault* sets or resets the texture mapping default parameters. - -The defaults are: - - * *URepeat = VRepeat = 1* no repetition - * *UOrigin = VOrigin = 1* origin set at (0,0) - * *UScale = VScale = 1* texture covers 100% of the face - - @section occt_draw_bop Boolean Operations Commands This chapter describes existing commands of Open CASCADE Draw Test Harness that are used for performing, analyzing, debugging the algorithm in Boolean Component. diff --git a/src/DrawResources/StandardCommands.tcl b/src/DrawResources/StandardCommands.tcl index bfeab27295..bbc98032d2 100644 --- a/src/DrawResources/StandardCommands.tcl +++ b/src/DrawResources/StandardCommands.tcl @@ -59,13 +59,28 @@ proc help {{theCommand ""} {theHelpString ""} {theGroup "Procedures"}} { } elseif {$theHelpString == ""} { # help function set isFound 0 - foreach f [lsort [array names Draw_Helps]] { - if {[string match $theCommand $f]} { - dputs -nonewline -intense $f - for {set j [string length $f]} {$j < 15} {incr j} { - puts -nonewline " " + foreach aCmdIter [lsort [array names Draw_Helps]] { + if {[string match $theCommand $aCmdIter]} { + dputs -nonewline -intense $aCmdIter + set aLines [split $Draw_Helps($aCmdIter) "\n"] + set aNbLines [llength $aLines] + set isFirstLine 0 + for {set aLineIter 0} {$aLineIter < $aNbLines} {incr aLineIter} { + set aLine [lindex $aLines $aLineIter] + if { "$aLine" == "" && ($aLineIter == 0 || $aLineIter == [expr $aNbLines - 1]) } { continue } + if { $isFirstLine == 0 } { + set isFirstLine 1 + for {set j [string length $aCmdIter]} {$j < 15} {incr j} { + puts -nonewline " " + } + puts -nonewline " : " + } else { + if { ![string match "\t\t:*" $aLine] } { + puts -nonewline " : " + } + } + puts -nonewline "${aLine}\n" } - puts " : $Draw_Helps($f)" set isFound 1 } } diff --git a/src/ViewerTest/ViewerTest.cxx b/src/ViewerTest/ViewerTest.cxx index acfb950601..533ffb7a4a 100644 --- a/src/ViewerTest/ViewerTest.cxx +++ b/src/ViewerTest/ViewerTest.cxx @@ -6542,388 +6542,377 @@ void ViewerTest::Commands(Draw_Interpretor& theCommands) ViewerTest::FilletCommands(theCommands); ViewerTest::OpenGlCommands(theCommands); - const char *group = "AIS_Display"; + const char* aGroup = "AIS Viewer"; + const char* aFileName = __FILE__; + auto addCmd = [&](const char* theName, Draw_Interpretor::CommandFunction theFunc, const char* theHelp) + { + theCommands.Add (theName, theHelp, aFileName, theFunc, aGroup); + }; // display - theCommands.Add("visos", - "visos [name1 ...] [nbUIsos nbVIsos IsoOnPlane(0|1)]\n" - "\tIf last 3 optional parameters are not set prints numbers of U-, V- isolines and IsoOnPlane.\n", - __FILE__, visos, group); - - theCommands.Add("vdisplay", - "vdisplay [-noupdate|-update] [-local] [-mutable] [-neutral]" - "\n\t\t: [-trsfPers {zoom|rotate|zoomRotate|none}=none]" - "\n\t\t: [-trsfPersPos X Y [Z]] [-3d]" - "\n\t\t: [-2d|-trihedron [{top|bottom|left|right|topLeft" - "\n\t\t: |topRight|bottomLeft|bottomRight}" - "\n\t\t: [offsetX offsetY]]]" - "\n\t\t: [-dispMode mode] [-highMode mode]" - "\n\t\t: [-layer index] [-top|-topmost|-overlay|-underlay]" - "\n\t\t: [-redisplay] [-erased]" - "\n\t\t: [-noecho] [-autoTriangulation {0|1}]" - "\n\t\t: name1 [name2] ... [name n]" - "\n\t\t: Displays named objects." - "\n\t\t: Option -local enables displaying of objects in local" - "\n\t\t: selection context. Local selection context will be opened" - "\n\t\t: if there is not any." - "\n\t\t: -noupdate Suppresses viewer redraw call." - "\n\t\t: -mutable Enables optimizations for mutable objects." - "\n\t\t: -neutral Draws objects in main viewer." - "\n\t\t: -erased Loads the object into context, but does not display it." - "\n\t\t: -layer Sets z-layer for objects." - "\n\t\t: Alternatively -overlay|-underlay|-top|-topmost" - "\n\t\t: options can be used for the default z-layers." - "\n\t\t: -top Draws object on top of main presentations" - "\n\t\t: but below topmost." - "\n\t\t: -topmost Draws in overlay for 3D presentations." - "\n\t\t: with independent Depth." - "\n\t\t: -overlay Draws objects in overlay for 2D presentations." - "\n\t\t: (On-Screen-Display)" - "\n\t\t: -underlay Draws objects in underlay for 2D presentations." - "\n\t\t: (On-Screen-Display)" - "\n\t\t: -selectable|-noselect Controls selection of objects." - "\n\t\t: -trsfPers Sets a transform persistence flags." - "\n\t\t: -trsfPersPos Sets an anchor point for transform persistence." - "\n\t\t: -2d Displays object in screen coordinates." - "\n\t\t: (DY looks up)" - "\n\t\t: -dispmode Sets display mode for objects." - "\n\t\t: -highmode Sets hilight mode for objects." - "\n\t\t: -redisplay Recomputes presentation of objects." - "\n\t\t: -noecho Avoid printing of command results." - "\n\t\t: -autoTriang Enable/disable auto-triangulation for displayed shape.", - __FILE__, VDisplay2, group); - - theCommands.Add ("vnbdisplayed", - "vnbdisplayed" - "\n\t\t: Returns number of displayed objects", - __FILE__, VNbDisplayed, group); - - theCommands.Add ("vupdate", - "vupdate name1 [name2] ... [name n]" - "\n\t\t: Updates named objects in interactive context", - __FILE__, VUpdate, group); - - theCommands.Add("verase", - "verase [-noupdate|-update] [-local] [name1] ... [name n] [-noerror]" - "\n\t\t: Erases selected or named objects." - "\n\t\t: If there are no selected or named objects the whole viewer is erased." - "\n\t\t: Option -local enables erasing of selected or named objects without" - "\n\t\t: closing local selection context." - "\n\t\t: Option -noerror prevents exception on non-existing objects.", - __FILE__, VErase, group); - - theCommands.Add("vremove", - "vremove [-noupdate|-update] [-context] [-all] [-noinfo] [name1] ... [name n] [-noerror]" - "or vremove [-context] -all to remove all objects" - "\n\t\t: Removes selected or named objects." - "\n\t\t If -context is in arguments, the objects are not deleted" - "\n\t\t from the map of objects and names." - "\n\t\t: Option -local enables removing of selected or named objects without" - "\n\t\t: closing local selection context. Empty local selection context will be" - "\n\t\t: closed." - "\n\t\t: Option -noupdate suppresses viewer redraw call." - "\n\t\t: Option -noinfo suppresses displaying the list of removed objects." - "\n\t\t: Option -noerror prevents exception on non-existing objects.", - __FILE__, VRemove, group); - - theCommands.Add("vdonly", - "vdonly [-noupdate|-update] [name1] ... [name n]" - "\n\t\t: Displays only selected or named objects", - __FILE__,VDonly2,group); - - theCommands.Add("vdisplayall", - "vdisplayall" - "\n\t\t: Displays all erased interactive objects (see vdir and vstate).", - __FILE__, VDisplayAll, group); - - theCommands.Add("veraseall", - "veraseall" - "\n\t\t: Erases all objects displayed in the viewer.", - __FILE__, VErase, group); - - theCommands.Add("verasetype", - "verasetype " - "\n\t\t: Erase all the displayed objects of one given kind (see vtypes)", - __FILE__, VEraseType, group); - theCommands.Add("vbounding", - "vbounding [-noupdate|-update] [-mode] name1 [name2 [...]]" - "\n\t\t: [-print] [-hide]" - "\n\t\t: Temporarily display bounding box of specified Interactive" - "\n\t\t: Objects, or print it to console if -print is specified." - "\n\t\t: Already displayed box might be hidden by -hide option.", - __FILE__,VBounding,group); - - theCommands.Add("vdisplaytype", - "vdisplaytype : vdisplaytype \n\t display all the objects of one given kind (see vtypes) which are stored the AISContext ", - __FILE__,VDisplayType,group); - - theCommands.Add("vsetdispmode", - "vsetdispmode [name] mode(1,2,..)" - "\n\t\t: Sets display mode for all, selected or named objects.", - __FILE__,VDispMode,group); - - theCommands.Add("vunsetdispmode", - "vunsetdispmode [name]" - "\n\t\t: Unsets custom display mode for selected or named objects.", - __FILE__,VDispMode,group); - - theCommands.Add("vdir", - "vdir [mask] [-list]" - "\n\t\t: Lists all objects displayed in 3D viewer" - "\n\t\t: mask - name filter like prefix*" - "\n\t\t: -list - format list with new-line per name; OFF by default", - __FILE__,VDir,group); - -#ifdef HAVE_FREEIMAGE - #define DUMP_FORMATS "{png|bmp|jpg|gif}" -#else - #define DUMP_FORMATS "{ppm}" -#endif - theCommands.Add("vdump", - "vdump ." DUMP_FORMATS " [-width Width -height Height]" - "\n\t\t: [-buffer rgb|rgba|depth=rgb]" - "\n\t\t: [-stereo mono|left|right|blend|sideBySide|overUnder=mono]" - "\n\t\t: [-xrPose base|head|handLeft|handRight=base]" - "\n\t\t: [-tileSize Size=0]" - "\n\t\t: Dumps content of the active view into image file", - __FILE__,VDump,group); - - theCommands.Add("vsub", "vsub 0/1 (off/on) [obj] : Subintensity(on/off) of selected objects", - __FILE__,VSubInt,group); - - theCommands.Add("vaspects", - "vaspects [-noupdate|-update] [name1 [name2 [...]] | -defaults] [-subshapes subname1 [subname2 [...]]]" - "\n\t\t: [-visibility {0|1}]" - "\n\t\t: [-color {ColorName | R G B}] [-unsetColor]" - "\n\t\t: [-backfaceColor Color]" - "\n\t\t: [-material MatName] [-unsetMaterial]" - "\n\t\t: [-transparency Transp] [-unsetTransparency]" - "\n\t\t: [-width LineWidth] [-unsetWidth]" - "\n\t\t: [-lineType {solid|dash|dot|dotDash|0xHexPattern} [-stippleFactor factor]]" - "\n\t\t: [-unsetLineType]" - "\n\t\t: [-markerType {.|+|x|O|xcircle|pointcircle|ring1|ring2|ring3|ball|ImagePath}]" - "\n\t\t: [-unsetMarkerType]" - "\n\t\t: [-markerSize Scale] [-unsetMarkerSize]" - "\n\t\t: [-freeBoundary {0|1}]" - "\n\t\t: [-freeBoundaryWidth Width] [-unsetFreeBoundaryWidth]" - "\n\t\t: [-freeBoundaryColor {ColorName | R G B}] [-unsetFreeBoundaryColor]" - "\n\t\t: [-isoOnTriangulation 0|1]" - "\n\t\t: [-maxParamValue {value}]" - "\n\t\t: [-sensitivity {selection_mode} {value}]" - "\n\t\t: [-shadingModel {unlit|flat|gouraud|phong|pbr|pbr_facet}]" - "\n\t\t: [-unsetShadingModel]" - "\n\t\t: [-interior {solid|hatch|hidenline|point}] [-setHatch HatchStyle]" - "\n\t\t: [-unsetInterior]" - "\n\t\t: [-faceBoundaryDraw {0|1}] [-mostContinuity {c0|g1|c1|g2|c2|c3|cn}]" - "\n\t\t: [-faceBoundaryWidth LineWidth] [-faceBoundaryColor R G B] [-faceBoundaryType LineType]" - "\n\t\t: [-drawEdges {0|1}] [-edgeType LineType] [-edgeColor R G B] [-quadEdges {0|1}]" - "\n\t\t: [-drawSilhouette {0|1}]" - "\n\t\t: [-alphaMode {opaque|mask|blend|maskblend|blendauto} [alphaCutOff=0.5]]" - "\n\t\t: [-dumpJson]" - "\n\t\t: [-dumpCompact {0|1}]" - "\n\t\t: [-dumpDepth depth]" - "\n\t\t: Manage presentation properties of all, selected or named objects." - "\n\t\t: When -subshapes is specified than following properties will be assigned to specified sub-shapes." - "\n\t\t: When -defaults is specified than presentation properties will be" - "\n\t\t: assigned to all objects that have not their own specified properties" - "\n\t\t: and to all objects to be displayed in the future." - "\n\t\t: If -defaults is used there should not be any objects' names nor -subshapes specifier." - "\n\t\t: See also vlistcolors and vlistmaterials to list named colors and materials" - "\n\t\t: accepted by arguments -material and -color", - __FILE__,VAspects,group); - - theCommands.Add("vsetcolor", - "vsetcolor [-noupdate|-update] [name] ColorName" - "\n\t\t: Sets color for all, selected or named objects." - "\n\t\t: Alias for vaspects -setcolor [name] ColorName.", - __FILE__,VAspects,group); - - theCommands.Add("vunsetcolor", - "vunsetcolor [-noupdate|-update] [name]" - "\n\t\t: Resets color for all, selected or named objects." - "\n\t\t: Alias for vaspects -unsetcolor [name].", - __FILE__,VAspects,group); - - theCommands.Add("vsettransparency", - "vsettransparency [-noupdate|-update] [name] Coefficient" - "\n\t\t: Sets transparency for all, selected or named objects." - "\n\t\t: The Coefficient may be between 0.0 (opaque) and 1.0 (fully transparent)." - "\n\t\t: Alias for vaspects -settransp [name] Coefficient.", - __FILE__,VAspects,group); - - theCommands.Add("vunsettransparency", - "vunsettransparency [-noupdate|-update] [name]" - "\n\t\t: Resets transparency for all, selected or named objects." - "\n\t\t: Alias for vaspects -unsettransp [name].", - __FILE__,VAspects,group); - - theCommands.Add("vsetmaterial", - "vsetmaterial [-noupdate|-update] [name] MaterialName" - "\n\t\t: Alias for vaspects -setmaterial [name] MaterialName.", - __FILE__,VAspects,group); - - theCommands.Add("vunsetmaterial", - "vunsetmaterial [-noupdate|-update] [name]" - "\n\t\t: Alias for vaspects -unsetmaterial [name].", - __FILE__,VAspects,group); - - theCommands.Add("vsetwidth", - "vsetwidth [-noupdate|-update] [name] width(0->10)" - "\n\t\t: Alias for vaspects -setwidth [name] width.", - __FILE__,VAspects,group); - - theCommands.Add("vunsetwidth", - "vunsetwidth [-noupdate|-update] [name]" - "\n\t\t: Alias for vaspects -unsetwidth [name].", - __FILE__,VAspects,group); - - theCommands.Add("vsetinteriorstyle", - "vsetinteriorstyle [-noupdate|-update] [name] Style" - "\n\t\t: Alias for vaspects -setInterior [name] Style.", - __FILE__,VAspects,group); - - theCommands.Add ("vsetedgetype", - "vsetedgetype [name] [-type {solid, dash, dot}] [-color R G B] [-width value]" - "\n\t\t: Alias for vaspects [name] -setEdgeType Type.", - __FILE__, VAspects, group); - - theCommands.Add ("vunsetedgetype", - "vunsetedgetype [name]" - "\n\t\t: Alias for vaspects [name] -unsetEdgeType.", - __FILE__, VAspects, group); - - theCommands.Add ("vshowfaceboundary", - "vshowfaceboundary [name]" - "\n\t\t: Alias for vaspects [name] -setFaceBoundaryDraw on", - __FILE__, VAspects, group); - - theCommands.Add("vsensdis", - "vsensdis : Display active entities (sensitive entities of one of the standard types corresponding to active selection modes)." - "\n\t\t: Standard entity types are those defined in Select3D package:" - "\n\t\t: - sensitive box" - "\n\t\t: - sensitive face" - "\n\t\t: - sensitive curve" - "\n\t\t: - sensitive segment" - "\n\t\t: - sensitive circle" - "\n\t\t: - sensitive point" - "\n\t\t: - sensitive triangulation" - "\n\t\t: - sensitive triangle" - "\n\t\t: Custom(application - defined) sensitive entity types are not processed by this command.", - __FILE__,VDispSensi,group); - - theCommands.Add("vsensera", - "vsensera : erase active entities", - __FILE__,VClearSensi,group); - - theCommands.Add("vsetshading", - "vsetshading : vsetshading name Quality(default=0.0008) " - "\n\t\t: Sets deflection coefficient that defines the quality of the shape representation in the shading mode.", - __FILE__,VShading,group); - - theCommands.Add("vunsetshading", - "vunsetshading :vunsetshading name " - "\n\t\t: Sets default deflection coefficient (0.0008) that defines the quality of the shape representation in the shading mode.", - __FILE__,VShading,group); - - theCommands.Add ("vtexture", - "vtexture [-noupdate|-update] name [ImageFile|IdOfTexture|off]" - "\n\t\t: [-tex0 Image0] [-tex1 Image1] [...]" - "\n\t\t: [-origin {u v|off}] [-scale {u v|off}] [-repeat {u v|off}]" - "\n\t\t: [-trsfTrans du dv] [-trsfScale su sv] [-trsfAngle Angle]" - "\n\t\t: [-modulate {on|off}] [-srgb {on|off}]=on" - "\n\t\t: [-setFilter {nearest|bilinear|trilinear}]" - "\n\t\t: [-setAnisoFilter {off|low|middle|quality}]" - "\n\t\t: [-default]" - "\n\t\t: The texture can be specified by filepath" - "\n\t\t: or as ID (0<=IdOfTexture<=20) specifying one of the predefined textures." - "\n\t\t: The options are:" - "\n\t\t: -scale Setup texture scaling for generating coordinates; (1, 1) by default" - "\n\t\t: -origin Setup texture origin for generating coordinates; (0, 0) by default" - "\n\t\t: -repeat Setup texture repeat for generating coordinates; (1, 1) by default" - "\n\t\t: -modulate Enable or disable texture color modulation" - "\n\t\t: -srgb Prefer sRGB texture format when applicable; TRUE by default" - "\n\t\t: -trsfAngle Setup dynamic texture coordinates transformation - rotation angle" - "\n\t\t: -trsfTrans Setup dynamic texture coordinates transformation - translation vector" - "\n\t\t: -trsfScale Setup dynamic texture coordinates transformation - scale vector" - "\n\t\t: -setFilter Setup texture filter" - "\n\t\t: -setAnisoFilter Setup anisotropic filter for texture with mip-levels" - "\n\t\t: -default Sets texture mapping default parameters", - __FILE__, VTexture, group); - - theCommands.Add("vtexscale", - "vtexscale name ScaleU ScaleV" - "\n\t\t: Alias for vtexture name -setScale ScaleU ScaleV.", - __FILE__,VTexture,group); - - theCommands.Add("vtexorigin", - "vtexorigin name OriginU OriginV" - "\n\t\t: Alias for vtexture name -setOrigin OriginU OriginV.", - __FILE__,VTexture,group); - - theCommands.Add("vtexrepeat", - "vtexrepeat name RepeatU RepeatV" - "\n\t\t: Alias for vtexture name -setRepeat RepeatU RepeatV.", - __FILE__, VTexture, group); - - theCommands.Add("vtexdefault", - "vtexdefault name" - "\n\t\t: Alias for vtexture name -default.", - __FILE__, VTexture, group); - - theCommands.Add("vstate", - "vstate [-entities] [-hasSelected] [name1] ... [nameN]" - "\n\t\t: Reports show/hidden state for selected or named objects" - "\n\t\t: -entities - print low-level information about detected entities" - "\n\t\t: -hasSelected - prints 1 if context has selected shape and 0 otherwise", - __FILE__,VState,group); - - theCommands.Add("vpickshapes", - "vpickshape subtype(VERTEX,EDGE,WIRE,FACE,SHELL,SOLID) [name1 or .] [name2 or .] [name n or .]" - "\n\t\t: Hold Ctrl and pick object by clicking Left mouse button." - "\n\t\t: Hold also Shift for multiple selection.", - __FILE__, VPickShape, group); - - theCommands.Add("vtypes", - "vtypes : list of known types and signatures in AIS - To be Used in vpickobject command for selection with filters", - __FILE__, VIOTypes, group); - - theCommands.Add("vselfilter", - "vselfilter [-contextfilter {AND|OR}]" - "\n [-type {VERTEX|EDGE|WIRE|FACE|SHAPE|SHELL|SOLID}]" - "\n [-secondtype {VERTEX|EDGE|WIRE|FACE|SHAPE|SHELL|SOLID}]" - "\n [-clear]" - "\nSets selection shape type filter in context or remove all filters." - "\n : Option -contextfilter : To define a selection filter for two or more types of entity," - "\n use value AND (OR by default)." - "\n : Option -type set type of selection filter. Filters are applied with Or combination." - "\n : Option -clear remove all filters in context", - __FILE__,VSelFilter,group); - - theCommands.Add("vpickselected", "vpickselected [name]: extract selected shape.", - __FILE__, VPickSelected, group); - - theCommands.Add ("vloadselection", - "vloadselection [-context] [name1] ... [nameN] : allows to load selection" - "\n\t\t: primitives for the shapes with names given without displaying them.", - __FILE__, VLoadSelection, group); - - theCommands.Add("vbsdf", "vbsdf [name] [options]" - "\nAdjusts parameters of material BSDF:" - "\n -help : Shows this message" - "\n -print : Print BSDF" - "\n -kd : Weight of the Lambertian BRDF" - "\n -kr : Weight of the reflection BRDF" - "\n -kt : Weight of the transmission BTDF" - "\n -ks : Weight of the glossy Blinn BRDF" - "\n -le : Self-emitted radiance" - "\n -fresnel : Fresnel coefficients; Allowed fresnel formats are: Constant x," - "\n Schlick x y z, Dielectric x, Conductor x y" - "\n -roughness : Roughness of material (Blinn's exponent)" - "\n -absorpcoeff : Absorption coefficient (only for transparent material)" - "\n -absorpcolor : Absorption color (only for transparent material)" - "\n -normalize : Normalize BSDF coefficients", - __FILE__, VBsdf, group); - + addCmd ("visos", visos, /* [visos] */ R"( +visos [name1 ...] [nbUIsos nbVIsos IsoOnPlane(0|1)] +If last 3 optional parameters are not set prints numbers of U-, V- isolines and IsoOnPlane. +)" /* [visos] */); + + addCmd ("vdisplay", VDisplay2, /* [vdisplay] */ R"( +vdisplay [-noupdate|-update] [-mutable] [-neutral] + [-trsfPers {zoom|rotate|zoomRotate|none}=none] + [-trsfPersPos X Y [Z]] [-3d] + [-2d|-trihedron [{top|bottom|left|right|topLeft + |topRight|bottomLeft|bottomRight} + [offsetX offsetY]]] + [-dispMode mode] [-highMode mode] + [-layer index] [-top|-topmost|-overlay|-underlay] + [-redisplay] [-erased] + [-noecho] [-autoTriangulation {0|1}] + name1 [name2] ... [name n] +Displays named objects. + -noupdate Suppresses viewer redraw call. + -mutable Enables optimizations for mutable objects. + -neutral Draws objects in main viewer. + -erased Loads the object into context, but does not display it. + -layer Sets z-layer for objects. + Alternatively -overlay|-underlay|-top|-topmost + options can be used for the default z-layers. + -top Draws object on top of main presentations + but below topmost. + -topmost Draws in overlay for 3D presentations. + with independent Depth. + -overlay Draws objects in overlay for 2D presentations. + (On-Screen-Display) + -underlay Draws objects in underlay for 2D presentations. + (On-Screen-Display) + -selectable|-noselect Controls selection of objects. + -trsfPers Sets a transform persistence flags. + -trsfPersPos Sets an anchor point for transform persistence. + -2d Displays object in screen coordinates. + (DY looks up) + -dispmode Sets display mode for objects. + -highmode Sets hilight mode for objects. + -redisplay Recomputes presentation of objects. + -noecho Avoid printing of command results. + -autoTriang Enable/disable auto-triangulation for displayed shape. +)" /* [vdisplay] */); + + addCmd ("vnbdisplayed", VNbDisplayed, /* [vnbdisplayed] */ R"( +vnbdisplayed : Returns number of displayed objects +)" /* [vnbdisplayed] */); + + addCmd ("vupdate", VUpdate, /* [vupdate] */ R"( +vupdate name1 [name2] ... [name n] +Updates named objects in interactive context +)" /* [vupdate] */); + + addCmd ("verase", VErase, /* [verase] */ R"( +verase [-noupdate|-update] [name1] ... [name n] [-noerror] +Erases selected or named objects. +If there are no selected or named objects the whole viewer is erased. +Option -noerror prevents exception on non-existing objects. +)" /* [verase] */); + + addCmd ("vremove", VRemove, /* [vremove] */ R"( +vremove [-noupdate|-update] [-context] [-all] [-noinfo] [name1] ... [name n] [-noerror] +or vremove [-context] -all to remove all objects +Removes selected or named objects. + -context do not delete object from the map of objects and names; + -noupdate suppresses viewer redraw call; + -noinfo suppresses displaying the list of removed objects; + -noerror prevents exception on non-existing objects. +)" /* [vremove] */); + + addCmd ("vdonly", VDonly2, /* [vdonly] */ R"( +vdonly [-noupdate|-update] [name1] ... [name n] +Displays only selected or named objects. +)" /* [vdonly] */); + + addCmd ("vdisplayall", VDisplayAll, /* [vdisplayall] */ R"( +vdisplayall : Displays all erased interactive objects (see vdir and vstate). +)" /* [vdisplayall] */); + + addCmd ("veraseall", VErase, /* [veraseall] */ R"( +veraseall : Erases all objects displayed in the viewer. +)" /* [veraseall] */); + + addCmd ("verasetype", VEraseType, /* [verasetype] */ R"( +verasetype +Erase all the displayed objects of one given kind (see vtypes). +The following types are possible: + Point, Axis, Trihedron, PlaneTrihedron, Line, Circle, Plane, Shape, + ConnectedShape, MultiConn.Shape, ConnectedInter., MultiConn., Constraint and Dimension. +)" /* [verasetype] */); + + addCmd ("vbounding", VBounding, /* [vbounding] */ R"( +vbounding [-noupdate|-update] [-mode] name1 [name2 [...]] + [-print] [-hide] +Temporarily display bounding box of specified Interactive Objects, +or print it to console if -print is specified. +Already displayed box might be hidden by -hide option. +)" /* [vbounding] */); + + addCmd ("vdisplaytype", VDisplayType, /* [vdisplaytype] */ R"( +vdisplaytype +Display all the objects of one given kind (see vtypes) which are stored the interactive context. +The following types are possible: + Point, Axis, Trihedron, PlaneTrihedron, Line, Circle, Plane, Shape, + ConnectedShape, MultiConn.Shape, ConnectedInter., MultiConn., Constraint and Dimension. +)" /* [vdisplaytype] */); + + addCmd ("vsetdispmode", VDispMode, /* [vsetdispmode] */ R"( +vsetdispmode [name] mode(1,2,..) +Sets display mode for all, selected or named objects. +In case of a shape presentation, 0 defines WireFrame, and 1 defines Shading display modes. +)" /* [vsetdispmode] */); + + addCmd ("vunsetdispmode", VDispMode, /* [vunsetdispmode] */ R"( +vunsetdispmode [name] +Unsets custom display mode for selected or named objects. +)" /* [vunsetdispmode] */); + + addCmd ("vdir", VDir, /* [vdir] */ R"( +vdir [mask] [-list] +Lists all objects displayed in 3D viewer + mask - name filter like prefix* + -list - format list with new-line per name; OFF by default +)" /* [vdir] */); + + addCmd ("vdump", VDump, /* [vdump] */ R"( +vdump .png [-width Width -height Height] + [-buffer rgb|rgba|depth=rgb] + [-stereo mono|left|right|blend|sideBySide|overUnder=mono] + [-xrPose base|head|handLeft|handRight=base] + [-tileSize Size=0] +Dumps content of the active view into image file. +)" /* [vdump] */); + + addCmd ("vsub", VSubInt, /* [vsub] */ R"( +vsub 0/1 (off/on) [obj] : Subintensity(on/off) of selected objects +)" /* [vsub] */); + + addCmd ("vaspects", VAspects, /* [vaspects] */ R"( +vaspects [-noupdate|-update] [name1 [name2 [...]] | -defaults] [-subshapes subname1 [subname2 [...]]] + [-visibility {0|1}] + [-color {ColorName | R G B}] [-unsetColor] + [-backfaceColor Color] + [-material MatName] [-unsetMaterial] + [-transparency Transp] [-unsetTransparency] + [-width LineWidth] [-unsetWidth] + [-lineType {solid|dash|dot|dotDash|0xHexPattern} [-stippleFactor factor]] + [-unsetLineType] + [-markerType {.|+|x|O|xcircle|pointcircle|ring1|ring2|ring3|ball|ImagePath}] + [-unsetMarkerType] + [-markerSize Scale] [-unsetMarkerSize] + [-freeBoundary {0|1}] + [-freeBoundaryWidth Width] [-unsetFreeBoundaryWidth] + [-freeBoundaryColor {ColorName | R G B}] [-unsetFreeBoundaryColor] + [-isoOnTriangulation 0|1] + [-maxParamValue {value}] + [-sensitivity {selection_mode} {value}] + [-shadingModel {unlit|flat|gouraud|phong|pbr|pbr_facet}] + [-unsetShadingModel] + [-interior {solid|hatch|hidenline|point}] [-setHatch HatchStyle] + [-unsetInterior] + [-faceBoundaryDraw {0|1}] [-mostContinuity {c0|g1|c1|g2|c2|c3|cn}] + [-faceBoundaryWidth LineWidth] [-faceBoundaryColor R G B] [-faceBoundaryType LineType] + [-drawEdges {0|1}] [-edgeType LineType] [-edgeColor R G B] [-quadEdges {0|1}] + [-drawSilhouette {0|1}] + [-alphaMode {opaque|mask|blend|maskblend|blendauto} [alphaCutOff=0.5]] + [-dumpJson] [-dumpCompact {0|1}] [-dumpDepth depth] +Manage presentation properties of all, selected or named objects. +When -subshapes is specified than following properties will be assigned to specified sub-shapes. +When -defaults is specified than presentation properties will be +assigned to all objects that have not their own specified properties +and to all objects to be displayed in the future. +If -defaults is used there should not be any objects' names nor -subshapes specifier. +See also vlistcolors and vlistmaterials to list named colors and materials +accepted by arguments -material and -color +)" /* [vaspects] */); + + addCmd ("vsetcolor", VAspects, /* [vsetcolor] */ R"( +vsetcolor [-noupdate|-update] [name] ColorName +Sets color for all, selected or named objects. +Alias for vaspects -setcolor [name] ColorName. +)" /* [vsetcolor] */); + + addCmd ("vunsetcolor", VAspects, /* [vunsetcolor] */ R"( +vunsetcolor [-noupdate|-update] [name] +Resets color for all, selected or named objects. +Alias for vaspects -unsetcolor [name]. +)" /* [vunsetcolor] */); + + addCmd ("vsettransparency", VAspects, /* [vsettransparency] */ R"( +vsettransparency [-noupdate|-update] [name] Coefficient +Sets transparency for all, selected or named objects. +The Coefficient may be between 0.0 (opaque) and 1.0 (fully transparent). +Alias for vaspects -settransp [name] Coefficient. +)" /* [vsettransparency] */); + + addCmd ("vunsettransparency", VAspects, /* [vunsettransparency] */ R"( +vunsettransparency [-noupdate|-update] [name] +Resets transparency for all, selected or named objects. +Alias for vaspects -unsettransp [name]. +)" /* [vunsettransparency] */); + + addCmd ("vsetmaterial", VAspects, /* [vsetmaterial] */ R"( +vsetmaterial [-noupdate|-update] [name] MaterialName +n\t\t: Alias for vaspects -setmaterial [name] MaterialName. +)" /* [vsetmaterial] */); + + addCmd ("vunsetmaterial", VAspects, /* [vunsetmaterial] */ R"( +vunsetmaterial [-noupdate|-update] [name] +Alias for vaspects -unsetmaterial [name]. +)" /* [vunsetmaterial] */); + + addCmd ("vsetwidth", VAspects, /* [vsetwidth] */ R"( +vsetwidth [-noupdate|-update] [name] width(0->10) +Alias for vaspects -setwidth [name] width. +)" /* [vsetwidth] */); + + addCmd ("vunsetwidth", VAspects, /* [vunsetwidth] */ R"( +vunsetwidth [-noupdate|-update] [name] +Alias for vaspects -unsetwidth [name]. +)" /* [vunsetwidth] */); + + addCmd ("vsetinteriorstyle", VAspects, /* [vsetinteriorstyle] */ R"( +vsetinteriorstyle [-noupdate|-update] [name] Style +Alias for vaspects -setInterior [name] Style. +)" /* [vsetinteriorstyle] */); + + addCmd ("vsetedgetype", VAspects, /* [vsetedgetype] */ R"( +vsetedgetype [name] [-type {solid, dash, dot}] [-color R G B] [-width value] +Alias for vaspects [name] -setEdgeType Type. +)" /* [vsetedgetype] */); + + addCmd ("vunsetedgetype", VAspects, /* [vunsetedgetype] */ R"( +vunsetedgetype [name] : Alias for vaspects [name] -unsetEdgeType. +)" /* [vunsetedgetype] */); + + addCmd ("vshowfaceboundary", VAspects, /* [vshowfaceboundary] */ R"( +vshowfaceboundary [name]: Alias for vaspects [name] -setFaceBoundaryDraw on. +)" /* [vshowfaceboundary] */); + + addCmd ("vsensdis", VDispSensi, /* [vsensdis] */ R"( +vsensdis : Display active entities +(sensitive entities of one of the standard types corresponding to active selection modes). +Standard entity types are those defined in Select3D package: + - sensitive box, face, curve, segment, circle, point, triangulation, triangle. +Custom (application-defined) sensitive entity types are not processed by this command. +)" /* [vsensdis] */); + + addCmd ("vsensera", VClearSensi, /* [vsensera] */ R"( +vsensera : erase active entities +)" /* [vsensera] */); + + addCmd ("vsetshading", VShading, /* [vsetshading] */ R"( +vsetshading name Quality(default=0.0008) +Sets deflection coefficient that defines the quality of the shape representation in the shading mode. +)" /* [vsetshading] */); + + addCmd ("vunsetshading", VShading, /* [vunsetshading] */ R"( +vunsetshading name +Sets default deflection coefficient (0.0008) that defines the quality of the shape representation in the shading mode. +)" /* [vunsetshading] */); + + addCmd ("vtexture", VTexture, /* [vtexture] */ R"( +vtexture [-noupdate|-update] name [ImageFile|IdOfTexture|off] + [-tex0 Image0] [-tex1 Image1] [...] + [-origin {u v|off}] [-scale {u v|off}] [-repeat {u v|off}] + [-trsfTrans du dv] [-trsfScale su sv] [-trsfAngle Angle] + [-modulate {on|off}] [-srgb {on|off}]=on + [-setFilter {nearest|bilinear|trilinear}] + [-setAnisoFilter {off|low|middle|quality}] + [-default] +The texture can be specified by filepath +or as ID (0<=IdOfTexture<=20) specifying one of the predefined textures. +The options are: + -scale Setup texture scaling for generating coordinates; (1, 1) by default + -origin Setup texture origin for generating coordinates; (0, 0) by default + -repeat Setup texture repeat for generating coordinates; (1, 1) by default + -modulate Enable or disable texture color modulation + -srgb Prefer sRGB texture format when applicable; TRUE by default + -trsfAngle Setup dynamic texture coordinates transformation - rotation angle + -trsfTrans Setup dynamic texture coordinates transformation - translation vector + -trsfScale Setup dynamic texture coordinates transformation - scale vector + -setFilter Setup texture filter + -setAnisoFilter Setup anisotropic filter for texture with mip-levels + -default Sets texture mapping default parameters +)" /* [vtexture] */); + + addCmd ("vtexscale", VTexture, /* [vtexscale] */ R"( +vtexscale name ScaleU ScaleV +Alias for vtexture name -setScale ScaleU ScaleV. +)" /* [vtexscale] */); + + addCmd ("vtexorigin", VTexture, /* [vtexorigin] */ R"( +vtexorigin name OriginU OriginV +Alias for vtexture name -setOrigin OriginU OriginV. +)" /* [vtexorigin] */); + + addCmd ("vtexrepeat", VTexture, /* [vtexrepeat] */ R"( +vtexrepeat name RepeatU RepeatV +Alias for vtexture name -setRepeat RepeatU RepeatV. +)" /* [vtexrepeat] */); + + addCmd ("vtexdefault", VTexture, /* [vtexdefault] */ R"( +vtexdefault name : Alias for vtexture name -default. +)" /* [vtexdefault] */); + + addCmd ("vstate", VState, /* [vstate] */ R"( +vstate [-entities] [-hasSelected] [name1] ... [nameN] +Reports show/hidden state for selected or named objects. + -entities prints low-level information about detected entities; + -hasSelected prints 1 if context has selected shape and 0 otherwise. +)" /* [vstate] */); + + addCmd ("vpickshapes", VPickShape, /* [vpickshapes] */ R"( +vpickshape subtype(VERTEX,EDGE,WIRE,FACE,SHELL,SOLID) [name1 or .] [name2 or .] [name n or .] +Hold Ctrl and pick object by clicking Left mouse button. +Hold also Shift for multiple selection. +)" /* [vpickshapes] */); + + addCmd ("vtypes", VIOTypes, /* [vtypes] */ R"( +vtypes : list of known types and signatures in AIS. +To be Used in vpickobject command for selection with filters. +)" /* [vtypes] */); + + addCmd ("vselfilter", VSelFilter, /* [vselfilter] */ R"( +vselfilter [-contextfilter {AND|OR}] + [-type {VERTEX|EDGE|WIRE|FACE|SHAPE|SHELL|SOLID}] + [-secondtype {VERTEX|EDGE|WIRE|FACE|SHAPE|SHELL|SOLID}] + [-clear] +Sets selection shape type filter in context or remove all filters. + -contextfilter to define a selection filter for two or more types of entity, + use value AND (OR by default). + -type set type of selection filter; filters are applied with Or combination. + -clear remove all filters in context. +)" /* [vselfilter] */); + + addCmd ("vpickselected", VPickSelected, /* [vpickselected] */ R"( +vpickselected [name]: extract selected shape. +)" /* [vpickselected] */); + + addCmd ("vloadselection", VLoadSelection, /* [vloadselection] */ R"( +vloadselection [-context] [name1] ... [nameN] +Allows to load selection primitives for the shapes with names given without displaying them. +)" /* [vloadselection] */); + + addCmd ("vbsdf", VBsdf, /* [vbsdf] */ R"( +vbsdf [name] [options] +nAdjusts parameters of material BSDF: + -help shows this message + -print print BSDF + -kd weight of the Lambertian BRDF + -kr weight of the reflection BRDF + -kt weight of the transmission BTDF + -ks weight of the glossy Blinn BRDF + -le self-emitted radiance + -fresnel Fresnel coefficients; Allowed fresnel formats are: Constant x, + Schlick x y z, Dielectric x, Conductor x y + -roughness roughness of material (Blinn's exponent) + -absorpcoeff absorption coefficient (only for transparent material) + -absorpcolor absorption color (only for transparent material) + -normalize normalize BSDF coefficients +)" /* [vbsdf] */); } //============================================================================== diff --git a/src/ViewerTest/ViewerTest_ObjectCommands.cxx b/src/ViewerTest/ViewerTest_ObjectCommands.cxx index 7e38bbf50b..b4281b6f63 100644 --- a/src/ViewerTest/ViewerTest_ObjectCommands.cxx +++ b/src/ViewerTest/ViewerTest_ObjectCommands.cxx @@ -6819,389 +6819,396 @@ static int VNormals (Draw_Interpretor& theDI, void ViewerTest::ObjectCommands(Draw_Interpretor& theCommands) { - const char *group ="AISObjects"; - - theCommands.Add ("vtrihedron", - "vtrihedron : vtrihedron name" - "\n\t\t: [-dispMode {wireframe|shading} ]" - "\n\t\t: [-origin x y z ]" - "\n\t\t: [-zaxis u v w -xaxis u v w ]" - "\n\t\t: [-drawAxes {X|Y|Z|XY|YZ|XZ|XYZ}]" - "\n\t\t: [-hideLabels {on|off}]" - "\n\t\t: [-hideArrows {on|off}]" - "\n\t\t: [-label {XAxis|YAxis|ZAxis} value]" - "\n\t\t: [-attribute {XAxisLength|YAxisLength|ZAxisLength" - "\n\t\t: |TubeRadiusPercent|ConeRadiusPercent" - "\n\t\t: |ConeLengthPercent|OriginRadiusPercent" - "\n\t\t: |ShadingNumberOfFacettes} value]" - "\n\t\t: [-color {Origin|XAxis|YAxis|ZAxis|XOYAxis|YOZAxis" - "\n\t\t: |XOZAxis|Whole} {r g b | colorName}]" - "\n\t\t: [-textColor [XAxis|YAxis|ZAxis] {r g b | colorName}]" - "\n\t\t: [-arrowColor [XAxis|YAxis|ZAxis] {r g b | colorName}]" - "\n\t\t: [-priority {Origin|XAxis|YAxis|ZAxis|XArrow" - "\n\t\t: |YArrow|ZArrow|XOYAxis|YOZAxis" - "\n\t\t: |XOZAxis|Whole} value]" - "\n\t\t:" - "\n\t\t: Creates a new *AIS_Trihedron* object or changes parameters of " - "\n\t\t: existing trihedron. If no argument is set," - "\n\t\t: the default trihedron (0XYZ) is created." - "\n\t\t: -dispMode mode of visualization: wf - wireframe," - "\n\t\t: sh - shading." - "\n\t\t: Default value is wireframe." - "\n\t\t: -origin allows to set trihedron location." - "\n\t\t: -zaxis/-xaxis allows to set trihedron X and Z" - "\n\t\t: directions. The directions should" - "\n\t\t: be orthogonal. Y direction is calculated." - "\n\t\t: -drawAxes allows to set what axes are drawn in the" - "\n\t\t: trihedron, default state is XYZ" - "\n\t\t: -hideLabels allows to show/hide trihedron labels" - "\n\t\t: -hideArrows allows to show/hide trihedron arrows" - "\n\t\t: -label allows to change default X/Y/Z titles of axes" - "\n\t\t: -attribute sets parameters of trihedron" - "\n\t\t: -color sets color properties of parts of trihedron" - "\n\t\t: -textColor sets color properties of trihedron labels" - "\n\t\t: -arrowColor sets color properties of trihedron arrows" - "\n\t\t: -priority allows to change default selection priority" - "\n\t\t: of trihedron components", - __FILE__,VTrihedron,group); - - theCommands.Add("vtri2d", - "vtri2d Name" - "\n\t\t: Creates a plane with a 2D trihedron from an interactively selected face.", - __FILE__,VTrihedron2D ,group); - - theCommands.Add("vplanetri", - "vplanetri name" - "\n\t\t: Create a plane from a trihedron selection. If no arguments are set, the default", - __FILE__,VPlaneTrihedron ,group); - - theCommands.Add("vsize", - "vsize : vsize [name(Default=Current)] [size(Default=100)] " - "\n\t\t: Changes the size of a named or selected trihedron." - "\n\t\t: If the name is not defined: it affects the selected trihedrons otherwise nothing is done." - "\n\t\t: If the value is not defined: it is set to 100 by default.", - __FILE__,VSize,group); - - theCommands.Add("vaxis", - "vaxis name [Xa] [Ya] [Za] [Xb] [Yb] [Zb]" - "\n\t\t: Creates an axis. If the values are not defined, an axis is created by interactive selection of two vertices or one edge", - __FILE__,VAxisBuilder,group); - - theCommands.Add("vaxispara", - "vaxispara name " - "\n\t\t: Creates an axis by interactive selection of an edge and a vertex.", - __FILE__,VAxisBuilder,group); - - theCommands.Add("vaxisortho", - "vaxisortho name " - "\n\t\t: Creates an axis by interactive selection of an edge and a vertex. The axis will be orthogonal to the selected edge.", - __FILE__,VAxisBuilder,group); - - theCommands.Add("vpoint", - "vpoint name [X Y [Z]] [-2d] [-nosel]" - "\n\t\t: Creates a point from coordinates." - "\n\t\t: If the values are not defined, a point is created from selected vertex or edge (center)." - "\n\t\t: -2d defines on-screen 2D point from top-left window corner" - "\n\t\t: -nosel creates non-selectable presentation", - __FILE__,VPointBuilder,group); - - theCommands.Add("vplane", - "vplane PlaneName [AxisName/PlaneName/PointName] [PointName/PointName/PointName] [Nothing/Nothing/PointName] [TypeOfSensitivity {0|1}]" - "\n\t\t: Creates a plane from named or interactively selected entities." - "\n\t\t: TypeOfSensitivity:" - "\n\t\t: 0 - Interior" - "\n\t\t: 1 - Boundary", - __FILE__,VPlaneBuilder,group); - - theCommands.Add ("vchangeplane", "vchangeplane usage: \n" - " vchangeplane " - " [x=center_x y=center_y z=center_z]" - " [dx=dir_x dy=dir_y dz=dir_z]" - " [sx=size_x sy=size_y]" - " [minsize=value]" - " [noupdate]\n" - " - changes parameters of the plane:\n" - " - x y z - center\n" - " - dx dy dz - normal\n" - " - sx sy - plane sizes\n" - " - noupdate - do not update/redisplay the plane in context\n" - " Please enter coordinates in format \"param=value\" in arbitrary order.", - __FILE__, VChangePlane, group); - - theCommands.Add("vplanepara", - "vplanepara PlaneName " - "\n\t\t: Creates a plane from interactively selected vertex and face.", - __FILE__,VPlaneBuilder,group); - - theCommands.Add("vplaneortho", - "vplaneortho PlaneName " - "\n\t\t: Creates a plane from interactive selected face and coplanar edge. ", - __FILE__,VPlaneBuilder,group); - - theCommands.Add("vline", - "vline LineName [Xa/PointName] [Ya/PointName] [Za] [Xb] [Yb] [Zb] " - "\n\t\t: Creates a line from coordinates, named or interactively selected vertices. ", - __FILE__,VLineBuilder,group); - - theCommands.Add("vcircle", - "vcircle CircleName [PointName PointName PointName IsFilled]\n\t\t\t\t\t[PlaneName PointName Radius IsFilled]" - "\n\t\t: Creates a circle from named or interactively selected entities." - "\n\t\t: Parameter IsFilled is defined as 0 or 1.", - __FILE__,VCircleBuilder,group); - - theCommands.Add ("vdrawtext", - "vdrawtext name text" - "\n\t\t: [-pos X=0 Y=0 Z=0]" - "\n\t\t: [-color {R G B|name}=yellow]" - "\n\t\t: [-halign {left|center|right}=left]" - "\n\t\t: [-valign {top|center|bottom|topfirstline}=bottom}]" - "\n\t\t: [-angle angle=0]" - "\n\t\t: [-zoom {0|1}=0]" - "\n\t\t: [-height height=16]" - "\n\t\t: [-wrapping width=40]" - "\n\t\t: [-aspect {regular|bold|italic|boldItalic}=regular]" - "\n\t\t: [-font font=Times]" - "\n\t\t: [-2d]" - "\n\t\t: [-perspos {X Y Z}=0 0 0], where" - "\n\t\t X and Y define the coordinate origin in 2d space relative to the view window" - "\n\t\t Example: X=0 Y=0 is center, X=1 Y=1 is upper right corner etc..." - "\n\t\t Z coordinate defines the gap from border of view window (except center position)." - "\n\t\t: [-disptype {blend|decal|shadow|subtitle|dimension|normal}=normal}" - "\n\t\t: [-subcolor {R G B|name}=white]" - "\n\t\t: [-noupdate]" - "\n\t\t: [-plane NormX NormY NormZ DirX DirY DirZ]" - "\n\t\t: [-flipping]" - "\n\t\t: [-ownanchor {0|1}=1]" - "\n\t\t: Display text label at specified position.", - __FILE__, VDrawText, group); - - theCommands.Add("vdrawsphere", - "vdrawsphere: vdrawsphere shapeName Fineness [X=0.0 Y=0.0 Z=0.0] [Radius=100.0] [ToShowEdges=0] [ToPrintInfo=1]\n", - __FILE__,VDrawSphere,group); - - theCommands.Add ("vlocation", - "vlocation name" - "\n\t\t: [-reset] [-copyFrom otherName]" - "\n\t\t: [-translate X Y [Z]] [-rotate x y z dx dy dz angle] [-scale [X Y Z] scale]" - "\n\t\t: [-pretranslate X Y [Z]] [-prerotate x y z dx dy dz angle] [-prescale [X Y Z] scale]" - "\n\t\t: [-mirror x y z dx dy dz] [-premirror x y z dx dy dz]" - "\n\t\t: [-setLocation X Y [Z]] [-setRotation QX QY QZ QW] [-setScale [X Y Z] scale]" - "\n\t\t: Object local transformation management:" - "\n\t\t: -reset resets transformation to identity" - "\n\t\t: -translate applies translation vector" - "\n\t\t: -rotate applies rotation around axis" - "\n\t\t: -scale applies scale factor with optional anchor" - "\n\t\t: -mirror applies mirror transformation" - "\n\t\t: -pretranslate pre-multiplies translation vector" - "\n\t\t: -prerotate pre-multiplies rotation around axis" - "\n\t\t: -prescale pre-multiplies scale transformation" - "\n\t\t: -premirror pre-multiplies mirror transformation" - "\n\t\t: -setLocation overrides translation part" - "\n\t\t: -setRotation overrides rotation part with specified quaternion" - "\n\t\t: -setScale overrides scale factor", - __FILE__, VSetLocation, group); - theCommands.Add ("vsetlocation", - "alias for vlocation", - __FILE__, VSetLocation, group); - theCommands.Add ("vchild", - "vchild parent [-add] [-remove] [-ignoreParentTrsf {0|1}] child1 [child2] [...]" - "\n\t\t: Command for testing low-level presentation connections." - "\n\t\t: vconnect command should be used instead.", - __FILE__, VChild, group); - theCommands.Add("vparent", - "vparent parent [-ignoreVisu]" - "\n\t\t: Command for testing object properties as parent in the hierarchy." - "\n\t\t: Arguments:" - "\n\t\t: -ignoreVisu do not propagate the visual state (display/erase/color) to children objects", - __FILE__, VParent, group); - theCommands.Add ("vcomputehlr", - "vcomputehlr shapeInput hlrResult [-algoType {algo|polyAlgo}=polyAlgo]" - "\n\t\t: [eyeX eyeY eyeZ dirX dirY dirZ upX upY upZ]" - "\n\t\t: [-showTangentEdges {on|off}=off] [-nbIsolines N=0] [-showHiddenEdges {on|off}=off]" - "\n\t\t: Arguments:" - "\n\t\t: shapeInput - name of the initial shape" - "\n\t\t: hlrResult - result HLR object from initial shape" - "\n\t\t: eye, dir are eye position and look direction" - "\n\t\t: up is the look up direction vector" - "\n\t\t: -algoType HLR algorithm to use" - "\n\t\t: -showTangentEdges include tangent edges" - "\n\t\t: -nbIsolines include isolines" - "\n\t\t: -showHiddenEdges include hidden edges" - "\n\t\t: Use vtop to see projected HLR shape.", - __FILE__, VComputeHLR, group); - - theCommands.Add("vdrawparray", - "vdrawparray name TypeOfArray={points|segments|polylines|triangles" - "\n\t\t: |trianglefans|trianglestrips|quads|quadstrips|polygons}" - "\n\t\t: [-deinterleaved|-mutable]" - "\n\t\t: [vertex={'v' x y z [normal={'n' nx ny nz}] [color={'c' r g b}] [texel={'t' tx ty}]]" - "\n\t\t: [bound= {'b' nbVertices [bound_color={'c' r g b}]]" - "\n\t\t: [edge= {'e' vertexId]" - "\n\t\t: [-shape shapeName] [-patch]" - "\n\t\t: Commands create an Interactive Object for specified Primitive Array definition (Graphic3d_ArrayOfPrimitives)" - "\n\t\t: with the main purpose is covering various combinations by tests", - __FILE__,VDrawPArray,group); - - theCommands.Add("vconnect", - "vconnect name Xo Yo Zo object1 object2 ... [color=NAME]" - "\n\t\t: Creates and displays AIS_ConnectedInteractive object from input object and location.", - __FILE__, VConnect, group); - - theCommands.Add("vconnectto", - "vconnectto : instance_name Xo Yo Zo object [-nodisplay|-noupdate|-update]" - " Makes an instance 'instance_name' of 'object' with position (Xo Yo Zo)." - "\n\t\t: -nodisplay - only creates interactive object, but not displays it", - __FILE__, VConnectTo,group); - - theCommands.Add("vdisconnect", - "vdisconnect assembly_name (object_name | object_number | 'all')" - " Disconnects all objects from assembly or disconnects object by name or number (use vlistconnected to enumerate assembly children).", - __FILE__,VDisconnect,group); - - theCommands.Add("vaddconnected", - "vaddconnected assembly_name object_name" - "Adds object to assembly.", - __FILE__,VAddConnected,group); - - theCommands.Add("vlistconnected", - "vlistconnected assembly_name" - "Lists objects in assembly.", - __FILE__,VListConnected,group); - - - theCommands.Add("vselmode", - "vselmode [object] selectionMode {on|off}" - "\n\t\t: [{-add|-set|-globalOrLocal}=-globalOrLocal]" - "\n\t\t: Switches selection mode for the specified object or for all objects in context." - "\n\t\t: Selection mode is either an integer number specific to Interactive Object," - "\n\t\t: or sub-shape type in case of AIS_Shape:" - "\n\t\t: Shape, Vertex, Edge, Wire, Face, Shell, Solid, CompSolid, Compound" - "\n\t\t: The integer mode 0 (Shape in case of AIS_Shape) is reserved for selecting object as whole." - "\n\t\t: Additional options:" - "\n\t\t: -add already activated selection modes will be left activated" - "\n\t\t: -set already activated selection modes will be deactivated" - "\n\t\t: -globalOrLocal (default) if new mode is Global selection mode," - "\n\t\t: then active local selection modes will be deactivated" - "\n\t\t: and the samthen active local selection modes will be deactivated", - __FILE__, VSetSelectionMode, group); - - theCommands.Add("vselnext", - "vselnext : hilight next detected", - __FILE__, VSelectionNext, group); - - theCommands.Add("vselprev", - "vselnext : hilight previous detected", - __FILE__, VSelectionPrevious, group); - - theCommands.Add("vtriangle", - "vtriangle Name PointName PointName PointName" - "\n\t\t: Creates and displays a filled triangle from named points.", - __FILE__, VTriangle,group); - - theCommands.Add("vsegment", - "vsegment Name PointName PointName" - "\n\t\t: Creates and displays a segment from named points.", - __FILE__, VTriangle,group); - - theCommands.Add ("vtorus", - "vtorus name [R1 R2 [Angle1=0 Angle2=360] [Angle=360]]" - "\n\t\t: [-radius R1] [-pipeRadius R2]" - "\n\t\t: [-pipeAngle Angle=360] [-segmentAngle1 Angle1=0 -segmentAngle2 Angle2=360]" - "\n\t\t: [-nbSlices Number=100] [-nbStacks Number=100] [-noupdate]" - "\n\t\t: Creates and displays a torus or torus segment." - "\n\t\t: Parameters of the torus :" - "\n\t\t: - R1 distance from the center of the pipe to the center of the torus" - "\n\t\t: - R2 radius of the pipe" - "\n\t\t: - Angle1 first angle to create a torus ring segment" - "\n\t\t: - Angle2 second angle to create a torus ring segment" - "\n\t\t: - Angle angle to create a torus pipe segment", - __FILE__, VTorus, group); - - theCommands.Add ("vcylinder", - "vcylinder name [R1 R2 Height] [-height H] [-radius R] [-bottomRadius R1 -topRadius R2]" - "\n\t\t: [-nbSlices Number=100] [-noupdate]" - "\n\t\t: Creates and displays a cylinder." - "\n\t\t: Parameters of the cylinder :" - "\n\t\t: - R1 cylinder bottom radius" - "\n\t\t: - R2 cylinder top radius" - "\n\t\t: - Height cylinder height", - __FILE__, VCylinder, group); - - theCommands.Add ("vsphere", - "vsphere name [-radius] R" - "\n\t\t: [-nbSlices Number=100] [-nbStacks Number=100] [-noupdate]" - "\n\t\t: Creates and displays a sphere.", - __FILE__, VSphere, group); - - theCommands.Add("vobjzlayer", - "vobjzlayer : set/get object [layerid] - set or get z layer id for the interactive object", - __FILE__, VObjZLayer, group); + const char* aGroup = "AIS Viewer"; + const char* aFileName = __FILE__; + auto addCmd = [&](const char* theName, Draw_Interpretor::CommandFunction theFunc, const char* theHelp) + { + theCommands.Add (theName, theHelp, aFileName, theFunc, aGroup); + }; + + addCmd ("vtrihedron", VTrihedron, /* [vtrihedron] */ R"( +vtrihedron name + [-dispMode {wireframe|shading} ] + [-origin x y z ] + [-zaxis u v w -xaxis u v w ] + [-drawAxes {X|Y|Z|XY|YZ|XZ|XYZ}] + [-hideLabels {on|off}] + [-hideArrows {on|off}] + [-label {XAxis|YAxis|ZAxis} value] + [-attribute {XAxisLength|YAxisLength|ZAxisLength + |TubeRadiusPercent|ConeRadiusPercent + |ConeLengthPercent|OriginRadiusPercent + |ShadingNumberOfFacettes} value] + [-color {Origin|XAxis|YAxis|ZAxis|XOYAxis|YOZAxis + |XOZAxis|Whole} {r g b | colorName}] + [-textColor [XAxis|YAxis|ZAxis] {r g b | colorName}] + [-arrowColor [XAxis|YAxis|ZAxis] {r g b | colorName}] + [-priority {Origin|XAxis|YAxis|ZAxis|XArrow + |YArrow|ZArrow|XOYAxis|YOZAxis + |XOZAxis|Whole} value] + +Creates/changes *AIS_Trihedron* object. + -dispMode mode of visualization: wf - wireframe, + sh - shading; + default value is wireframe; + -origin allows to set trihedron location; + -zaxis/-xaxis allows to set trihedron X and Z directions; + the directions should be orthogonal; + Y direction is calculated; + -drawAxes allows to set what axes are drawn in the + trihedron, default state is XYZ; + -hideLabels allows to show/hide trihedron labels; + -hideArrows allows to show/hide trihedron arrows; + -label allows to change default X/Y/Z titles of axes; + -attribute sets parameters of trihedron; + -color sets color properties of parts of trihedron; + -textColor sets color properties of trihedron labels; + -arrowColor sets color properties of trihedron arrows; + -priority allows to change default selection priority + of trihedron components. +)" /* [vtrihedron] */); + + addCmd ("vtri2d", VTrihedron2D, /* [vtri2d] */ R"( +vtri2d Name : Creates a plane with a 2D trihedron from an interactively selected face. +)" /* [vtri2d] */); + + addCmd ("vplanetri", VPlaneTrihedron, /* [vplanetri] */ R"( +vplanetri name +Create a plane from a trihedron selection. +If no arguments are set, the default plane is created. +)" /* [vplanetri] */); + + addCmd ("vsize", VSize, /* [vsize] */ R"( +vsize [name(Default=Current)] [size(Default=100)] +Changes the size of a named or selected trihedron. +If the name is not defined: it affects the selected trihedrons otherwise nothing is done. +If the value is not defined: it is set to 100 by default. +)" /* [vsize] */); + + addCmd ("vaxis", VAxisBuilder, /* [vaxis] */ R"( +vaxis name [Xa] [Ya] [Za] [Xb] [Yb] [Zb] +Creates an axis. If the values are not defined, +an axis is created by interactive selection of two vertices or one edge. +)" /* [vaxis] */); + + addCmd ("vaxispara", VAxisBuilder, /* [vaxispara] */ R"( +vaxispara name +Creates an axis by interactive selection of an edge and a vertex. +)" /* [vaxispara] */); + + addCmd ("vaxisortho", VAxisBuilder, /* [vaxisortho] */ R"( +vaxisortho name +Creates an axis by interactive selection of an edge and a vertex. +The axis will be orthogonal to the selected edge. +)" /* [vaxisortho] */); + + addCmd ("vpoint", VPointBuilder, /* [vpoint] */ R"( +vpoint name [X Y [Z]] [-2d] [-nosel] +Creates a point from coordinates. +If the values are not defined, a point is created from selected vertex or edge (center). + -2d defines on-screen 2D point from top-left window corner; + -nosel creates non-selectable presentation. +)" /* [vpoint] */); + + addCmd ("vplane", VPlaneBuilder, /* [vplane] */ R"( +vplane PlaneName [AxisName/PlaneName/PointName] + [PointName/PointName/PointName] [Nothing/Nothing/PointName] [TypeOfSensitivity {0|1}] +Creates a plane from named or interactively selected entities. TypeOfSensitivity: + 0 - Interior; + 1 - Boundary. +)" /* [vplane] */); + + addCmd ("vchangeplane", VChangePlane, /* [vchangeplane] */ R"( +vchangeplane plane_name + [x=center_x y=center_y z=center_z] + [dx=dir_x dy=dir_y dz=dir_z] + [sx=size_x sy=size_y] + [minsize=value] + [noupdate] +Changes parameters of the plane: + - x y z - center + - dx dy dz - normal + - sx sy - plane sizes + - noupdate - do not update/redisplay the plane in context +Please enter coordinates in format "param=value" in arbitrary order. +)" /* [vchangeplane] */); + + addCmd ("vplanepara", VPlaneBuilder, /* [vplanepara] */ R"( +vplanepara PlaneName +Creates a plane from interactively selected vertex and face. +)" /* [vplanepara] */); + + addCmd ("vplaneortho", VPlaneBuilder, /* [vplaneortho] */ R"( +vplaneortho PlaneName +Creates a plane from interactive selected face and coplanar edge. +)" /* [vplaneortho] */); + + addCmd ("vline", VLineBuilder, /* [vline] */ R"( +vline LineName [Xa/PointName] [Ya/PointName] [Za] [Xb] [Yb] [Zb] +Creates a line from coordinates, named or interactively selected vertices. +)" /* [vline] */); + + addCmd ("vcircle", VCircleBuilder, /* [vcircle] */ R"( +vcircle CircleName [PointName PointName PointName IsFilled] + [PlaneName PointName Radius IsFilled] +Creates a circle from named or interactively selected entities. +Parameter IsFilled is defined as 0 or 1. +)" /* [vcircle] */); + + addCmd ("vdrawtext", VDrawText, /* [vdrawtext] */ R"( +vdrawtext name text + [-pos X Y Z]={0 0 0} + [-color {R G B|name}]=yellow + [-halign {left|center|right}]=left + [-valign {top|center|bottom|topfirstline}}]=bottom + [-angle angle]=0 + [-zoom {0|1}]=0 + [-height height]=16 + [-wrapping width]=40 + [-aspect {regular|bold|italic|boldItalic}]=regular + [-font font]=Times + [-2d] [-perspos {X Y Z}]={0 0 0} + [-disptype {blend|decal|shadow|subtitle|dimension|normal}}=normal + [-subcolor {R G B|name}]=white + [-noupdate] + [-plane NormX NormY NormZ DirX DirY DirZ] + [-flipping] [-ownanchor {0|1}]=1 +Display text label at specified position. +Within -perspos, X and Y define the coordinate origin in 2d space relative to the view window. +Example: X=0 Y=0 is center, X=1 Y=1 is upper right corner etc... +Z coordinate defines the gap from border of view window (except center position). +)" /* [vdrawtext] */); + + addCmd ("vdrawsphere", VDrawSphere, /* [vdrawsphere] */ R"( +vdrawsphere shapeName Fineness [X=0.0 Y=0.0 Z=0.0] [Radius=100.0] [ToShowEdges=0] [ToPrintInfo=1] +)" /* [vdrawsphere] */); + + addCmd ("vlocation", VSetLocation, /* [vlocation] */ R"( +vlocation name + [-reset] [-copyFrom otherName] + [-translate X Y [Z]] [-rotate x y z dx dy dz angle] [-scale [X Y Z] scale] + [-pretranslate X Y [Z]] [-prerotate x y z dx dy dz angle] [-prescale [X Y Z] scale] + [-mirror x y z dx dy dz] [-premirror x y z dx dy dz] + [-setLocation X Y [Z]] [-setRotation QX QY QZ QW] [-setScale [X Y Z] scale] +Object local transformation management: + -reset resets transformation to identity + -translate applies translation vector + -rotate applies rotation around axis + -scale applies scale factor with optional anchor + -mirror applies mirror transformation + -pretranslate pre-multiplies translation vector + -prerotate pre-multiplies rotation around axis + -prescale pre-multiplies scale transformation + -premirror pre-multiplies mirror transformation + -setLocation overrides translation part + -setRotation overrides rotation part with specified quaternion + -setScale overrides scale factor +)" /* [vlocation] */); + + addCmd ("vsetlocation", VSetLocation, /* [vsetlocation] */ R"( +Alias for vlocation +)" /* [vsetlocation] */); + + addCmd ("vchild", VChild, /* [vchild] */ R"( +vchild parent [-add] [-remove] [-ignoreParentTrsf {0|1}] child1 [child2] [...] +Command for testing low-level presentation connections. +vconnect command should be used instead. +)" /* [vchild] */); + + addCmd ("vparent", VParent, /* [vparent] */ R"( +vparent parent [-ignoreVisu] +Command for testing object properties as parent in the hierarchy. + -ignoreVisu do not propagate the visual state (display/erase/color) to children objects +)" /* [vparent] */); + + addCmd ("vcomputehlr", VComputeHLR, /* [vcomputehlr] */ R"( +vcomputehlr shapeInput hlrResult [-algoType {algo|polyAlgo}=polyAlgo] + [eyeX eyeY eyeZ dirX dirY dirZ upX upY upZ] + [-showTangentEdges {on|off}=off] [-nbIsolines N=0] [-showHiddenEdges {on|off}=off] +Arguments: + shapeInput - name of the initial shape + hlrResult - result HLR object from initial shape + eye, dir are eye position and look direction + up is the look up direction vector + -algoType HLR algorithm to use + -showTangentEdges include tangent edges + -nbIsolines include isolines + -showHiddenEdges include hidden edges +Use vtop to see projected HLR shape. +)" /* [vcomputehlr] */); + + addCmd ("vdrawparray", VDrawPArray, /* [vdrawparray] */ R"( +vdrawparray name TypeOfArray={points|segments|polylines|triangles + |trianglefans|trianglestrips|quads|quadstrips|polygons} + [-deinterleaved|-mutable] + [vertex={'v' x y z [normal={'n' nx ny nz}] [color={'c' r g b}] [texel={'t' tx ty}]] + [bound= {'b' nbVertices [bound_color={'c' r g b}]] + [edge= {'e' vertexId] + [-shape shapeName] [-patch] +Commands create an Interactive Object for specified Primitive Array definition +with the main purpose is covering various combinations by tests. +)" /* [vdrawparray] */); + + addCmd ("vconnect", VConnect, /* [vconnect] */ R"( +vconnect name Xo Yo Zo object1 object2 ... [color=NAME] +Creates and displays AIS_ConnectedInteractive object from input object and location. +)" /* [vconnect] */); + + addCmd ("vconnectto", VConnectTo, /* [vconnectto] */ R"( +vconnectto instance_name Xo Yo Zo object [-nodisplay|-noupdate|-update] +Makes an instance 'instance_name' of 'object' with position (Xo Yo Zo). + -nodisplay - only creates interactive object, but not displays it. +)" /* [vconnectto] */); + + addCmd ("vdisconnect", VDisconnect, /* [vdisconnect] */ R"( +vdisconnect assembly_name {object_name|object_number|'all'} +Disconnects all objects from assembly or disconnects object by name or number. +Use vlistconnected to enumerate assembly children. +)" /* [vdisconnect] */); + + addCmd ("vaddconnected", VAddConnected, /* [vaddconnected] */ R"( +vaddconnected assembly_name object_name +Adds object to assembly. +)" /* [vaddconnected] */); + + addCmd ("vlistconnected", VListConnected, /* [vlistconnected] */ R"( +vlistconnected assembly_name +Lists objects in assembly. +)" /* [vlistconnected] */); + + addCmd ("vselmode", VSetSelectionMode, /* [vselmode] */ R"( +vselmode [object] selectionMode {on|off} + [{-add|-set|-globalOrLocal}=-globalOrLocal] +Switches selection mode for the specified object or for all objects in context. +Selection mode is either an integer number specific to Interactive Object, +or sub-shape type in case of AIS_Shape: + Shape, Vertex, Edge, Wire, Face, Shell, Solid, CompSolid, Compound +The integer mode 0 (Shape in case of AIS_Shape) is reserved for selecting object as whole. +Additional options: + -add already activated selection modes will be left activated + -set already activated selection modes will be deactivated + -globalOrLocal (default) if new mode is Global selection mode, + then active local selection modes will be deactivated + and the samthen active local selection modes will be deactivated +)" /* [vselmode] */); + + addCmd ("vselnext", VSelectionNext, /* [vselnext] */ R"( +vselnext : hilight next detected +)" /* [vselnext] */); + + addCmd ("vselprev", VSelectionPrevious, /* [vselprev] */ R"( +vselnext : hilight previous detected +)" /* [vselprev] */); + + addCmd ("vtriangle", VTriangle, /* [vtriangle] */ R"( +vtriangle Name PointName PointName PointName +Creates and displays a filled triangle from named points. +)" /* [vtriangle] */); + + addCmd ("vsegment", VTriangle, /* [vsegment] */ R"( +vsegment Name PointName PointName +Creates and displays a segment from named points. +)" /* [vsegment] */); + + addCmd ("vtorus", VTorus, /* [vtorus] */ R"( +vtorus name [R1 R2 [Angle1=0 Angle2=360] [Angle=360]] + [-radius R1] [-pipeRadius R2] + [-pipeAngle Angle=360] [-segmentAngle1 Angle1=0 -segmentAngle2 Angle2=360] + [-nbSlices Number=100] [-nbStacks Number=100] [-noupdate] +Creates and displays a torus or torus segment. +Parameters of the torus: + - R1 distance from the center of the pipe to the center of the torus + - R2 radius of the pipe + - Angle1 first angle to create a torus ring segment + - Angle2 second angle to create a torus ring segment + - Angle angle to create a torus pipe segment +)" /* [vtorus] */); + + addCmd ("vcylinder", VCylinder, /* [vcylinder] */ R"( +vcylinder name [R1 R2 Height] [-height H] [-radius R] [-bottomRadius R1 -topRadius R2] + [-nbSlices Number=100] [-noupdate] +Creates and displays a cylinder. +Parameters of the cylinder: + - R1 cylinder bottom radius + - R2 cylinder top radius + - Height cylinder height +)" /* [vcylinder] */); + + addCmd ("vsphere", VSphere, /* [vsphere] */ R"( +vsphere name [-radius] R + [-nbSlices Number=100] [-nbStacks Number=100] [-noupdate] +Creates and displays a sphere. +)" /* [vsphere] */); + + addCmd ("vobjzlayer", VObjZLayer, /* [vobjzlayer] */ R"( +vobjzlayer : set/get object [layerid] - set or get z layer id for the interactive object +)" /* [vobjzlayer] */); - theCommands.Add("vpolygonoffset", - "vpolygonoffset : [object [mode factor units]] - sets/gets polygon offset parameters for an object, without arguments prints the default values", - __FILE__, VPolygonOffset, group); - - theCommands.Add ("vmarkerstest", - "vmarkerstest: name X Y Z [PointsOnSide=10] [MarkerType=0] [Scale=1.0] [FileName=ImageFile]\n", - __FILE__, VMarkersTest, group); - - theCommands.Add ("text2brep", - "text2brep: name text" - "\n\t\t: [-pos X=0 Y=0 Z=0]" - "\n\t\t: [-halign {left|center|right}=left]" - "\n\t\t: [-valign {top|center|bottom|topfirstline}=bottom}]" - "\n\t\t: [-height height=16]" - "\n\t\t: [-aspect {regular|bold|italic|boldItalic}=regular]" - "\n\t\t: [-font font=Courier] [-strict {strict|aliases|any}=any]" - "\n\t\t: [-composite {on|off}=off]" - "\n\t\t: [-plane NormX NormY NormZ DirX DirY DirZ]", - __FILE__, TextToBRep, group); - theCommands.Add ("vfont", - "vfont [-add pathToFont [fontName] [regular,bold,italic,boldItalic=undefined] [singleStroke]]" - "\n\t\t: [-strict {any|aliases|strict}] [-find fontName [regular,bold,italic,boldItalic=undefined]] [-verbose {on|off}]" - "\n\t\t: [-findAll fontNameMask] [-findInfo fontName]" - "\n\t\t: [-unicodeFallback {on|off}]" - "\n\t\t: [-clear] [-init] [-list] [-names]" - "\n\t\t: [-aliases [aliasName]] [-addAlias Alias FontName] [-removeAlias Alias FontName] [-clearAlias Alias] [-clearAliases]" - "\n\t\t: Work with font registry - register font, list available fonts, find font." - "\n\t\t: -findAll is same as -find, but can print more than one font when mask is passed." - "\n\t\t: -findInfo is same as -find, but prints complete font information instead of family name.", - __FILE__, VFont, group); - - theCommands.Add ("vvertexmode", - "vvertexmode [name | -set {isolated | all | inherited} [name1 name2 ...]]\n" - "vvertexmode - prints the default vertex draw mode\n" - "vvertexmode name - prints the vertex draw mode of the given object\n" - "vvertexmode -set {isolated | all | inherited} - sets the default vertex draw mode and updates the mode for all displayed objects\n" - "vvertexmode -set {isolated | all | inherited} name1 name2 ... - sets the vertex draw mode for the specified object(s)\n", - __FILE__, VVertexMode, group); - - theCommands.Add ("vpointcloud", - "vpointcloud name shape [-randColor] [-normals] [-noNormals] [-uv]" - "\n\t\t: Create an interactive object for arbitrary set of points" - "\n\t\t: from triangulated shape." - "\n" - "vpointcloud name x y z r npts {surface|volume}\n" - " ... [-randColor] [-normals] [-noNormals] [-uv]" - "\n\t\t: Create arbitrary set of points (npts) randomly distributed" - "\n\t\t: on spheric surface or within spheric volume (x y z r)." - "\n\t\t:" - "\n\t\t: Additional options:" - "\n\t\t: -randColor - generate random color per point" - "\n\t\t: -normals - generate normal per point (default)" - "\n\t\t: -noNormals - do not generate normal per point" - "\n", - __FILE__, VPointCloud, group); - - theCommands.Add("vpriority", - "vpriority [-noupdate|-update] name [value]\n\t\t prints or sets the display priority for an object", - __FILE__, - VPriority, group); - - theCommands.Add ("vnormals", - "vnormals usage:\n" - "vnormals Shape [{on|off}=on] [-length {10}] [-nbAlongU {1}] [-nbAlongV {1}] [-nbAlong {1}]" - "\n\t\t: [-useMesh] [-oriented {0}1}=0]" - "\n\t\t: Displays/Hides normals calculated on shape geometry or retrieved from triangulation", - __FILE__, VNormals, group); + addCmd ("vpolygonoffset", VPolygonOffset, /* [vpolygonoffset] */ R"( +vpolygonoffset [object [mode factor units]] +Sets/gets polygon offset parameters for an object; without arguments prints the default values +)" /* [vpolygonoffset] */); + + addCmd ("vmarkerstest", VMarkersTest, /* [vmarkerstest] */ R"( +vmarkerstest: name X Y Z [PointsOnSide=10] [MarkerType=0] [Scale=1.0] [FileName=ImageFile] +)" /* [vmarkerstest] */); + + addCmd ("text2brep", TextToBRep, /* [text2brep] */ R"( +text2brep name text" + [-pos X=0 Y=0 Z=0]" + [-halign {left|center|right}=left]" + [-valign {top|center|bottom|topfirstline}=bottom}]" + [-height height=16]" + [-aspect {regular|bold|italic|boldItalic}=regular]" + [-font font=Courier] [-strict {strict|aliases|any}=any]" + [-composite {on|off}=off]" + [-plane NormX NormY NormZ DirX DirY DirZ]", +)" /* [text2brep] */); + + addCmd ("vfont", VFont, /* [vfont] */ R"( +vfont [-add pathToFont [fontName] [regular,bold,italic,boldItalic=undefined] [singleStroke]] + [-strict {any|aliases|strict}] [-find fontName [regular,bold,italic,boldItalic=undefined]] + [-verbose {on|off}] + [-findAll fontNameMask] [-findInfo fontName] + [-unicodeFallback {on|off}] + [-clear] [-init] [-list] [-names] + [-aliases [aliasName]] [-addAlias Alias FontName] [-removeAlias Alias FontName] + [-clearAlias Alias] [-clearAliases] +Work with font registry - register font, list available fonts, find font. + -findAll is same as -find, but can print more than one font when mask is passed. + -findInfo is same as -find, but prints complete font information instead of family name. +)" /* [vfont] */); + + addCmd ("vvertexmode", VVertexMode, /* [vvertexmode] */ R"( +vvertexmode [name | -set {isolated|all|inherited} [name1 name2 ...]] +Sets the vertex draw mode for the specified object(s) +or sets default vertex draw mode and updates the mode for all displayed objects. +Prints the default vertex draw mode without -set parameter. +)" /* [vvertexmode] */); + + addCmd ("vpointcloud", VPointCloud, /* [vpointcloud] */ R"( +vpointcloud name shape [-randColor] [-normals] [-noNormals] [-uv] +Create an interactive object for arbitrary set of points from triangulated shape. + +vpointcloud name x y z r npts {surface|volume} + ... [-randColor] [-normals] [-noNormals] [-uv] +Create arbitrary set of points (npts) randomly distributed +on spheric surface or within spheric volume (x y z r). + +Additional options: + -randColor - generate random color per point + -normals - generate normal per point (default) + -noNormals - do not generate normal per point +)" /* [vpointcloud] */); + + addCmd ("vpriority", VPriority, /* [vpriority] */ R"( +vpriority [-noupdate|-update] name [value] +Prints or sets the display priority for an object. +)" /* [vpriority] */); + + addCmd ("vnormals", VNormals, /* [vnormals] */ R"( +vnormals Shape [{on|off}=on] [-length {10}] [-nbAlongU {1}] [-nbAlongV {1}] [-nbAlong {1}] + [-useMesh] [-oriented {0}1}=0] +Displays/Hides normals calculated on shape geometry or retrieved from triangulation +)" /* [vnormals] */); } diff --git a/src/ViewerTest/ViewerTest_OpenGlCommands.cxx b/src/ViewerTest/ViewerTest_OpenGlCommands.cxx index 8fbd807047..fd57606da1 100644 --- a/src/ViewerTest/ViewerTest_OpenGlCommands.cxx +++ b/src/ViewerTest/ViewerTest_OpenGlCommands.cxx @@ -1161,48 +1161,61 @@ static Standard_Integer VGenEnvLUT (Draw_Interpretor&, void ViewerTest::OpenGlCommands(Draw_Interpretor& theCommands) { - const char* aGroup ="Commands for low-level TKOpenGl features"; - - theCommands.Add("vimmediatefront", - "vimmediatefront : render immediate mode to front buffer or to back buffer", - __FILE__, VImmediateFront, aGroup); - theCommands.Add("vglinfo", - "vglinfo [-short|-basic|-complete] [-lineWidth Value=80]" - "\n\t\t: [GL_VENDOR] [GL_RENDERER] [GL_VERSION]" - "\n\t\t: [GL_SHADING_LANGUAGE_VERSION] [GL_EXTENSIONS]" - "\n\t\t: print OpenGL info." - "\n\t\t: -lineWidth split values longer than specified value into multiple lines;" - "\n\t\t: -1 disables splitting.", - __FILE__, VGlInfo, aGroup); - theCommands.Add("vshader", - "vshader name -vert VertexShader -frag FragmentShader [-geom GeometryShader]" - "\n\t\t: [-off] [-phong] [-aspect {shading|line|point|text}=shading]" - "\n\t\t: [-header VersionHeader]" - "\n\t\t: [-tessControl TessControlShader -tesseval TessEvaluationShader]" - "\n\t\t: [-uniform Name FloatValue]" - "\n\t\t: Assign custom GLSL program to presentation aspects.", - __FILE__, VShaderProg, aGroup); - theCommands.Add("vshaderprog", "Alias for vshader", __FILE__, VShaderProg, aGroup); - theCommands.Add("vlistmaterials", - "vlistmaterials [*] [MaterialName1 [MaterialName2 [...]]] [dump.obj|dump.html]" - "\n\t\t: Without arguments, command prints the list of standard materials." - "\n\t\t: Otherwise, properties of specified materials will be printed" - "\n\t\t: or dumped into specified file." - "\n\t\t: * can be used to refer to complete list of standard materials.", - __FILE__, VListMaterials, aGroup); - theCommands.Add("vlistcolors", - "vlistcolors [*] [ColorName1 [ColorName2 [...]]] [dump.html]" - "\n\t\t: Without arguments, command prints the list of standard colors." - "\n\t\t: Otherwise, properties of specified colors will be printed" - "\n\t\t: or dumped into specified file." - "\n\t\t: * can be used to refer to complete list of standard colors.", - __FILE__, VListColors, aGroup); - theCommands.Add("vgenenvlut", - "vgenenvlut [-size size = 128] [-nbsamples nbsamples = 1024]" - "\n\t\t: Generates PBR environment look up table." - "\n\t\t: Saves it as C++ source file which is expected to be included in code." - "\n\t\t: The path where result will be located is 'Graphic3d_TextureRoot::TexturesFolder()'." - "\n\t\t: -size size of one side of resulted square table" - "\n\t\t: -nbsamples number of samples used in Monte-Carlo integration", - __FILE__, VGenEnvLUT, aGroup); + const char* aGroup = "AIS Viewer"; + const char* aFileName = __FILE__; + auto addCmd = [&](const char* theName, Draw_Interpretor::CommandFunction theFunc, const char* theHelp) + { + theCommands.Add (theName, theHelp, aFileName, theFunc, aGroup); + }; + + addCmd ("vimmediatefront", VImmediateFront, /* [vimmediatefront] */ R"( +vimmediatefront : render immediate mode to front buffer or to back buffer +)" /* [vimmediatefront] */); + + addCmd ("vglinfo", VGlInfo, /* [vglinfo] */ R"( +vglinfo [-short|-basic|-complete] [-lineWidth Value=80] + [GL_VENDOR] [GL_RENDERER] [GL_VERSION] + [GL_SHADING_LANGUAGE_VERSION] [GL_EXTENSIONS] +Print OpenGL info. + -lineWidth split values longer than specified value into multiple lines; + -1 disables splitting. +)" /* [vglinfo] */); + + addCmd ("vshader", VShaderProg, /* [vshader] */ R"( +vshader name -vert VertexShader -frag FragmentShader [-geom GeometryShader] + [-off] [-phong] [-aspect {shading|line|point|text}=shading] + [-header VersionHeader] + [-tessControl TessControlShader -tessEval TessEvaluationShader] + [-uniform Name FloatValue] +Assign custom GLSL program to presentation aspects. +)" /* [vshader] */); + + addCmd ("vshaderprog", VShaderProg, /* [vshaderprog] */ R"( +Alias for vshader +)" /* [vshaderprog] */); + + addCmd ("vlistmaterials", VListMaterials, /* [vlistmaterials] */ R"( +vlistmaterials [*] [MaterialName1 [MaterialName2 [...]]] [dump.obj|dump.html] +Without arguments, command prints the list of standard materials. +Otherwise, properties of specified materials will be printed +or dumped into specified file. +* can be used to refer to complete list of standard materials. +)" /* [vlistmaterials] */); + + addCmd ("vlistcolors", VListColors, /* [vlistcolors] */ R"( +vlistcolors [*] [ColorName1 [ColorName2 [...]]] [dump.html] +Without arguments, command prints the list of standard colors. +Otherwise, properties of specified colors will be printed +or dumped into specified file. +* can be used to refer to complete list of standard colors. +)" /* [vlistcolors] */); + + addCmd ("vgenenvlut", VGenEnvLUT, /* [vgenenvlut] */ R"( +vgenenvlut [-size size = 128] [-nbsamples nbsamples = 1024] +Generates PBR environment look up table. +Saves it as C++ source file which is expected to be included in code. +The path where result will be located is 'Graphic3d_TextureRoot::TexturesFolder()'. + -size size of one side of resulted square table + -nbsamples number of samples used in Monte-Carlo integration +)" /* [vgenenvlut] */); } diff --git a/src/ViewerTest/ViewerTest_RelationCommands.cxx b/src/ViewerTest/ViewerTest_RelationCommands.cxx index 1b5f656785..4c9e8d758b 100644 --- a/src/ViewerTest/ViewerTest_RelationCommands.cxx +++ b/src/ViewerTest/ViewerTest_RelationCommands.cxx @@ -1924,86 +1924,89 @@ static int VMoveDim (Draw_Interpretor& theDi, Standard_Integer theArgNum, const void ViewerTest::RelationCommands(Draw_Interpretor& theCommands) { - const char *group = "AISRelations"; - - theCommands.Add("vdimension", - "vdimension name {-angle|-length|-radius|-diameter}" - "[-shapes shape1 [shape2 [shape3]]\n" - "[-selected]\n" - "[-text 3d|2d wf|sh|wireframe|shading IntegerSize]\n" - "[-font FontName]\n" - "[-label left|right|hcenter|hfit top|bottom|vcenter|vfit]\n" - "[-arrow external|internal|fit]\n" - "[-zoomablearrow]\n" - "[{-arrowlength|-arlen} RealArrowLength]\n" - "[{-arrowangle|-arangle} ArrowAngle(degrees)]\n" - "[-plane xoy|yoz|zox]\n" - "[-flyout FloatValue -extension FloatValue]\n" - "[-autovalue]\n" - "[-value CustomRealValue]\n" - "[-textvalue CustomTextValue]\n" - "[-dispunits DisplayUnitsString]\n" - "[-modelunits ModelUnitsString]\n" - "[-showunits | -hideunits]\n" - " -Builds angle, length, radius and diameter dimensions.\n" - " -See also: vdimparam, vmovedim.\n", - __FILE__,VDimBuilder,group); - - theCommands.Add ("vrelation", - "vrelation name {-concentric|-equaldistance|-equalradius|-fix|-identic|-offset|-parallel|-perpendicular|-tangent|-symmetric}" - "\n\t\t: concentric - 2 circled edges." - "\n\t\t: equaldistance - 4 vertex/edges." - "\n\t\t: equalradius - 1 or 2 circled edges." - "\n\t\t: fix - 1 edge." - "\n\t\t: identic - 2 faces, edges or vertices." - "\n\t\t: offset - 2 faces." - "\n\t\t: parallel - 2 faces or 2 edges." - "\n\t\t: perpendicular - 2 faces or 2 edges." - "\n\t\t: tangent - two coplanar edges (first the circular edge then the tangent edge) or two faces." - "\n\t\t: symmetric - 3 edges or 1 edge and 2 vertices." - "-Builds specific relation from selected objects.", - __FILE__, VRelationBuilder, group); - - theCommands.Add("vdimparam", - "vdimparam name" - "[-text 3d|2d wf|sh|wireframe|shading IntegerSize]\n" - "[-font FontName]\n" - "[-label left|right|hcenter|hfit top|bottom|vcenter|vfit]\n" - "[-arrow external|internal|fit]\n" - "[-zoomablearrow 0|1]\n" - "[{-arrowlength|-arlen} RealArrowLength]\n" - "[{-arrowangle|-arangle} ArrowAngle(degrees)]\n" - "[-plane xoy|yoz|zox]\n" - "[-flyout FloatValue -extension FloatValue]\n" - "[-value CustomNumberValue]\n" - "[-textvalue CustomTextValue]\n" - "[-dispunits DisplayUnitsString]\n" - "[-modelunits ModelUnitsString]\n" - "[-showunits | -hideunits]\n" - " -Sets parameters for angle, length, radius and diameter dimensions.\n" - " -See also: vmovedim, vdimension.\n", - __FILE__,VDimParam,group); - - theCommands.Add("vlengthparam", - "vlengthparam name" - "[-direction {ox|oy|oz|x y z|autodirection}]\n" - " -Sets parameters for length dimension.\n" - " -See also: vdimparam, vdimension.\n", - __FILE__,VLengthParam,group); - - theCommands.Add("vangleparam", - "vangleparam name" - "[-type interior|exterior]\n" - "[-showarrow first|second|both|none]\n" - " -Sets parameters for angle dimension.\n" - " -See also: vdimparam, vdimension.\n", - __FILE__,VAngleParam,group); - - theCommands.Add("vmovedim", - "vmovedim : vmovedim [name] [x y z]" - "\n\t\t: Moves picked or named (if name defined)" - "\n\t\t: dimension to picked mouse position or input point." - "\n\t\t: Text label of dimension 'name' is moved to position, another parts of dimensionare adjusted.", - __FILE__,VMoveDim,group); - + const char* aGroup = "AIS Viewer"; + const char* aFileName = __FILE__; + auto addCmd = [&](const char* theName, Draw_Interpretor::CommandFunction theFunc, const char* theHelp) + { + theCommands.Add (theName, theHelp, aFileName, theFunc, aGroup); + }; + + addCmd ("vdimension", VDimBuilder, /* [vdimension] */ R"( +vdimension name {-angle|-length|-radius|-diameter} + [-shapes shape1 [shape2 [shape3]] + [-selected] + [-text 3d|2d wf|sh|wireframe|shading IntegerSize] + [-font FontName] + [-label left|right|hcenter|hfit top|bottom|vcenter|vfit] + [-arrow external|internal|fit] + [-zoomablearrow] + [{-arrowlength|-arlen} RealArrowLength] + [{-arrowangle|-arangle} ArrowAngle(degrees)] + [-plane xoy|yoz|zox] + [-flyout FloatValue -extension FloatValue] + [-autovalue] + [-value CustomRealValue] + [-textvalue CustomTextValue] + [-dispunits DisplayUnitsString] + [-modelunits ModelUnitsString] + [-showunits | -hideunits] +Builds angle, length, radius and diameter dimensions. +See also: vdimparam, vmovedim. +)" /* [vdimension] */); + + addCmd ("vrelation", VRelationBuilder, /* [vrelation] */ R"( +vrelation name {-concentric|-equaldistance|-equalradius|-fix| + -identic|-offset|-parallel|-perpendicular|-tangent|-symmetric} +Builds specific relation from selected objects: + -concentric - 2 circled edges + -equaldistance - 4 vertex/edges + -equalradius - 1 or 2 circled edges + -fix - 1 edge + -identic - 2 faces, edges or vertices + -offset - 2 faces + -parallel - 2 faces or 2 edges + -perpendicular - 2 faces or 2 edges + -tangent - two coplanar edges (first the circular edge then the tangent edge) or two faces + -symmetric - 3 edges or 1 edge and 2 vertices +)" /* [vrelation] */); + + addCmd ("vdimparam", VDimParam, /* [vdimparam] */ R"( +vdimparam name + [-text 3d|2d wf|sh|wireframe|shading IntegerSize] + [-font FontName] + [-label left|right|hcenter|hfit top|bottom|vcenter|vfit] + [-arrow external|internal|fit] + [-zoomablearrow 0|1] + [{-arrowlength|-arlen} RealArrowLength] + [{-arrowangle|-arangle} ArrowAngle(degrees)] + [-plane xoy|yoz|zox] + [-flyout FloatValue -extension FloatValue] + [-value CustomNumberValue] + [-textvalue CustomTextValue] + [-dispunits DisplayUnitsString] + [-modelunits ModelUnitsString] + [-showunits | -hideunits] +Sets parameters for angle, length, radius and diameter dimensions. +See also: vmovedim, vdimension. +)" /* [vdimparam] */); + + addCmd ("vlengthparam", VLengthParam, /* [vlengthparam] */ R"( +vlengthparam name [-direction {ox|oy|oz|x y z|autodirection}] +Sets parameters for length dimension. +See also: vdimparam, vdimension. +)" /* [vlengthparam] */); + + addCmd ("vangleparam", VAngleParam, /* [vangleparam] */ R"( +vangleparam name [-type interior|exterior] + [-showarrow first|second|both|none] +Sets parameters for angle dimension. +See also: vdimparam, vdimension. +)" /* [vangleparam] */); + + addCmd ("vmovedim", VMoveDim, /* [vmovedim] */ R"( +vmovedim [name] [x y z] +Moves picked or named (if name defined) +dimension to picked mouse position or input point. +Text label of dimension 'name' is moved to position, another parts of dimension are adjusted. +)" /* [vmovedim] */); } diff --git a/src/ViewerTest/ViewerTest_ViewerCommands.cxx b/src/ViewerTest/ViewerTest_ViewerCommands.cxx index 9c5194ac71..2991d76812 100644 --- a/src/ViewerTest/ViewerTest_ViewerCommands.cxx +++ b/src/ViewerTest/ViewerTest_ViewerCommands.cxx @@ -13665,898 +13665,963 @@ void ViewerTest::ViewerCommands(Draw_Interpretor& theCommands) // define destruction callback to destroy views in a well-defined order Tcl_CreateExitHandler (ViewerTest_ExitProc, 0); - const char *group = "ZeViewer"; - theCommands.Add("vdriver", - "vdriver [-list] [-default DriverName] [-load DriverName]" - "\n\t\t: Manages active graphic driver factory." - "\n\t\t: Prints current active driver when called without arguments." - "\n\t\t: Makes specified driver active when ActiveName argument is specified." - "\n\t\t: -list print registered factories" - "\n\t\t: -default define which factory should be used by default (to be used by next vinit call)" - "\n\t\t: -load try loading factory plugin and set it as default one", - __FILE__, VDriver, group); - theCommands.Add("vinit", - "vinit [-name viewName] [-left leftPx] [-top topPx] [-width widthPx] [-height heightPx]" - "\n\t\t: [-exitOnClose] [-closeOnEscape] [-cloneActive] [-virtual {on|off}=off] [-2d_mode {on|off}=off]" - #if defined(HAVE_XLIB) - "\n\t\t: [-display displayName]" - #endif - "\n\t\t: Creates new View window with specified name viewName." - "\n\t\t: By default the new view is created in the viewer and in" - "\n\t\t: graphic driver shared with active view." - "\n\t\t: -name {driverName/viewerName/viewName | viewerName/viewName | viewName}" - "\n\t\t: If driverName isn't specified the driver will be shared with active view." - "\n\t\t: If viewerName isn't specified the viewer will be shared with active view." -#if defined(HAVE_XLIB) - "\n\t\t: -display HostName.DisplayNumber[:ScreenNumber]" - "\n\t\t: Display name will be used within creation of graphic driver, when specified." -#endif - "\n\t\t: -left, -top pixel position of left top corner of the window." - "\n\t\t: -width, -height width and height of window respectively." - "\n\t\t: -cloneActive flag to copy camera and dimensions of active view." - "\n\t\t: -exitOnClose when specified, closing the view will exit application." - "\n\t\t: -closeOnEscape when specified, view will be closed on pressing Escape." - "\n\t\t: -virtual create an offscreen window within interactive session" - "\n\t\t: -2d_mode when on, view will not react on rotate scene events" - "\n\t\t: Additional commands for operations with views: vclose, vactivate, vviewlist.", - __FILE__,VInit,group); - theCommands.Add("vclose" , - "[view_id [keep_context=0|1]]\n" - "or vclose ALL - to remove all created views\n" - " - removes view(viewer window) defined by its view_id.\n" - " - keep_context: by default 0; if 1 and the last view is deleted" - " the current context is not removed.", - __FILE__,VClose,group); - theCommands.Add("vactivate" , - "vactivate view_id [-noUpdate]" - " - activates view(viewer window) defined by its view_id", - __FILE__,VActivate,group); - theCommands.Add("vviewlist", - "vviewlist [format={tree, long}]" - " - prints current list of views per viewer and graphic_driver ID shared between viewers" - " - format: format of result output, if tree the output is a tree view;" - "otherwise it's a list of full view names. By default format = tree", - __FILE__,VViewList,group); - theCommands.Add("vhelp" , - "vhelp : display help on the viewer commands", - __FILE__,VHelp,group); - theCommands.Add("vviewproj", - "vviewproj [top|bottom|left|right|front|back|axoLeft|axoRight]" - "\n\t\t: [+-X+-Y+-Z] [-Zup|-Yup] [-frame +-X+-Y]" - "\n\t\t: Setup view direction" - "\n\t\t: -Yup use Y-up convention instead of Zup (which is default)." - "\n\t\t: +-X+-Y+-Z define direction as combination of DX, DY and DZ;" - "\n\t\t: for example '+Z' will show front of the model," - "\n\t\t: '-X-Y+Z' will define left axonometrical view." - "\n\t\t: -frame define camera Up and Right directions (regardless Up convention);" - "\n\t\t: for example '+X+Z' will show front of the model with Z-up.", - __FILE__,VViewProj,group); - theCommands.Add("vtop" , - "vtop or : Top view. Orientation +X+Y" , - __FILE__,VViewProj,group); - theCommands.Add("vbottom" , - "vbottom : Bottom view. Orientation +X-Y" , - __FILE__,VViewProj,group); - theCommands.Add("vleft" , - "vleft : Left view. Orientation -Y+Z" , - __FILE__,VViewProj,group); - theCommands.Add("vright" , - "vright : Right view. Orientation +Y+Z" , - __FILE__,VViewProj,group); - theCommands.Add("vaxo" , - " vaxo or : Axonometric view. Orientation +X-Y+Z", - __FILE__,VViewProj,group); - theCommands.Add("vfront" , - "vfront : Front view. Orientation +X+Z" , - __FILE__,VViewProj,group); - theCommands.Add("vback" , - "vback : Back view. Orientation -X+Z" , - __FILE__,VViewProj,group); - theCommands.Add("vpick" , - "vpick : vpick X Y Z [shape subshape] ( all variables as string )", - __FILE__, VPick, group); - theCommands.Add("vfit", - "vfit or [-selected] [-noupdate]" - "\n\t\t: [-selected] fits the scene according to bounding box of currently selected objects", - __FILE__,VFit,group); - theCommands.Add ("vfitarea", - "vfitarea x1 y1 x2 y2" - "\n\t\t: vfitarea x1 y1 z1 x2 y2 z2" - "\n\t\t: Fit view to show area located between two points" - "\n\t\t: given in world 2D or 3D corrdinates.", - __FILE__, VFitArea, group); - theCommands.Add ("vzfit", "vzfit [scale]\n" - " Matches Z near, Z far view volume planes to the displayed objects.\n" - " \"scale\" - specifies factor to scale computed z range.\n", - __FILE__, VZFit, group); - theCommands.Add("vrepaint", - "vrepaint [-immediate] [-continuous FPS]" - "\n\t\t: force redraw of active View" - "\n\t\t: -immediate flag performs redraw of immediate layers only;" - "\n\t\t: -continuous activates/deactivates continuous redraw of active View," - "\n\t\t: 0 means no continuous rendering," - "\n\t\t: -1 means non-stop redraws," - "\n\t\t: >0 specifies target framerate,", - __FILE__,VRepaint,group); - theCommands.Add("vclear", - "vclear : vclear" - "\n\t\t: remove all the object from the viewer", - __FILE__,VClear,group); - theCommands.Add ("vbackground", - "vbackground [-color Color [-default]]" - "\n\t\t: [-gradient Color1 Color2 [-default]" - "\n\t\t: [-gradientMode {NONE|HORIZONTAL|VERTICAL|DIAG1|DIAG2|CORNER1|CORNER2|CORNER3|ELLIPTICAL}]=VERT]" - "\n\t\t: [-imageFile ImageFile [-imageMode {CENTERED|TILED|STRETCH|NONE}]=CENTERED [-srgb {0|1}]=1]" - "\n\t\t: [-cubemap CubemapFile1 [CubeMapFiles2-5] [-order TilesIndexes1-6] [-invertedz]=0]" - "\n\t\t: [-pbrEnv {ibl|noibl|keep}]" - "\n\t\t: Changes background or some background settings." - "\n\t\t: -color sets background color" - "\n\t\t: -gradient sets background gradient starting and ending colors" - "\n\t\t: -gradientMode sets gradient fill method" - "\n\t\t: -default sets background default gradient or color" - "\n\t\t: -imageFile sets filename of image used as background" - "\n\t\t: -imageMode sets image fill type" - "\n\t\t: -cubemap sets environment cubemap as background" - "\n\t\t: -invertedz sets inversion of Z axis for background cubemap rendering; FALSE when unspecified" - "\n\t\t: -pbrEnv sets on/off Image Based Lighting (IBL) from background cubemap for PBR" - "\n\t\t: -srgb prefer sRGB texture format when applicable; TRUE when unspecified" - "\n\t\t: -order defines order of tiles in one image cubemap" - "\n\t\t: TileIndexi defubes an index in range [0, 5] for i tile of one image packed cubemap" - "\n\t\t: (has no effect in case of multi-image cubemaps)", - __FILE__, - VBackground, - group); - theCommands.Add ("vsetbg", - "\n\t\t: Alias for 'vbackground -imageFile ImageFile [-imageMode FillType]'.", - __FILE__, - VBackground, - group); - theCommands.Add ("vsetbgmode", - "\n\t\t: Alias for 'vbackground -imageMode FillType'.", - __FILE__, - VBackground, - group); - theCommands.Add ("vsetgradientbg", - "\n\t\t: Alias for 'vbackground -gradient Color1 Color2 -gradientMode FillMethod'.", - __FILE__, - VBackground, - group); - theCommands.Add ("vsetgrbgmode", - "\n\t\t: Alias for 'vbackground -gradientMode FillMethod'.", - __FILE__, - VBackground, - group); - theCommands.Add ("vsetcolorbg", - "\n\t\t: Alias for 'vbackground -color Color'.", - __FILE__, - VBackground, - group); - theCommands.Add ("vsetdefaultbg", - "\n\t\t: Alias for 'vbackground -default -gradient Color1 Color2 [-gradientMode FillMethod]'" - "\n\t\t: and for 'vbackground -default -color Color'.", - __FILE__, - VBackground, - group); - theCommands.Add("vscale", - "vscale : vscale X Y Z", - __FILE__,VScale,group); - theCommands.Add("vzbufftrihedron", - "vzbufftrihedron [{-on|-off}=-on] [-type {wireframe|zbuffer}=zbuffer]" - "\n\t\t: [-position center|left_lower|left_upper|right_lower|right_upper]" - "\n\t\t: [-scale value=0.1] [-size value=0.8] [-arrowDiam value=0.05]" - "\n\t\t: [-colorArrowX color=RED] [-colorArrowY color=GREEN] [-colorArrowZ color=BLUE]" - "\n\t\t: [-nbfacets value=12] [-colorLabels color=WHITE]" - "\n\t\t: [-colorLabelX color] [-colorLabelY color] [-colorLabelZ color]" - "\n\t\t: Displays a trihedron", - __FILE__,VZBuffTrihedron,group); - theCommands.Add("vrotate", - "vrotate [[-mouseStart X Y] [-mouseMove X Y]]|[AX AY AZ [X Y Z]]" - "\n : Option -mouseStart starts rotation according to the mouse position" - "\n : Option -mouseMove continues rotation with angle computed" - "\n : from last and new mouse position." - "\n : vrotate AX AY AZ [X Y Z]", - __FILE__,VRotate,group); - theCommands.Add("vzoom", - "vzoom : vzoom coef", - __FILE__,VZoom,group); - theCommands.Add("vpan", - "vpan : vpan dx dy", - __FILE__,VPan,group); - theCommands.Add("vcolorscale", - "vcolorscale name [-noupdate|-update] [-demo]" - "\n\t\t: [-range RangeMin=0 RangeMax=1 NbIntervals=10]" - "\n\t\t: [-font HeightFont=20]" - "\n\t\t: [-logarithmic {on|off}=off] [-reversed {on|off}=off]" - "\n\t\t: [-smoothTransition {on|off}=off]" - "\n\t\t: [-hueRange MinAngle=230 MaxAngle=0]" - "\n\t\t: [-colorRange MinColor=BLUE1 MaxColor=RED]" - "\n\t\t: [-textpos {left|right|center|none}=right]" - "\n\t\t: [-labelAtBorder {on|off}=on]" - "\n\t\t: [-colors Color1 Color2 ...] [-color Index Color]" - "\n\t\t: [-labels Label1 Label2 ...] [-label Index Label]" - "\n\t\t: [-freeLabels NbOfLabels Label1 Label2 ...]" - "\n\t\t: [-xy Left=0 Bottom=0]" - "\n\t\t: [-uniform lightness hue_from hue_to]" - "\n\t\t: -demo - displays a color scale with demonstratio values" - "\n\t\t: -colors - set colors for all intervals" - "\n\t\t: -color - set color for specific interval" - "\n\t\t: -uniform - generate colors with the same lightness" - "\n\t\t: -textpos - horizontal label position relative to color scale bar" - "\n\t\t: -labelAtBorder - vertical label position relative to color interval;" - "\n\t\t: at border means the value inbetween neighbor intervals," - "\n\t\t: at center means the center value within current interval" - "\n\t\t: -labels - set labels for all intervals" - "\n\t\t: -freeLabels - same as -labels but does not require" - "\n\t\t: matching the number of intervals" - "\n\t\t: -label - set label for specific interval" - "\n\t\t: -title - set title" - "\n\t\t: -reversed - setup smooth color transition between intervals" - "\n\t\t: -smoothTransition - swap colorscale direction" - "\n\t\t: -hueRange - set hue angles corresponding to minimum and maximum values", - __FILE__, VColorScale, group); - theCommands.Add("vgraduatedtrihedron", - "vgraduatedtrihedron : -on/-off [-xname Name] [-yname Name] [-zname Name] [-arrowlength Value]\n" - "\t[-namefont Name] [-valuesfont Name]\n" - "\t[-xdrawname on/off] [-ydrawname on/off] [-zdrawname on/off]\n" - "\t[-xnameoffset IntVal] [-ynameoffset IntVal] [-znameoffset IntVal]" - "\t[-xnamecolor Color] [-ynamecolor Color] [-znamecolor Color]\n" - "\t[-xdrawvalues on/off] [-ydrawvalues on/off] [-zdrawvalues on/off]\n" - "\t[-xvaluesoffset IntVal] [-yvaluesoffset IntVal] [-zvaluesoffset IntVal]" - "\t[-xcolor Color] [-ycolor Color] [-zcolor Color]\n" - "\t[-xdrawticks on/off] [-ydrawticks on/off] [-zdrawticks on/off]\n" - "\t[-xticks Number] [-yticks Number] [-zticks Number]\n" - "\t[-xticklength IntVal] [-yticklength IntVal] [-zticklength IntVal]\n" - "\t[-drawgrid on/off] [-drawaxes on/off]\n" - " - Displays or erases graduated trihedron" - " - xname, yname, zname - names of axes, default: X, Y, Z\n" - " - namefont - font of axes names. Default: Arial\n" - " - xnameoffset, ynameoffset, znameoffset - offset of name from values or tickmarks or axis. Default: 30\n" - " - xnamecolor, ynamecolor, znamecolor - colors of axes names\n" - " - xvaluesoffset, yvaluesoffset, zvaluesoffset - offset of values from tickmarks or axis. Default: 10\n" - " - valuesfont - font of axes values. Default: Arial\n" - " - xcolor, ycolor, zcolor - color of axis and values\n" - " - xticks, yticks, xzicks - number of tickmark on axes. Default: 5\n" - " - xticklength, yticklength, xzicklength - length of tickmark on axes. Default: 10\n", - __FILE__,VGraduatedTrihedron,group); - theCommands.Add("vtile" , - "vtile [-totalSize W H] [-lowerLeft X Y] [-upperLeft X Y] [-tileSize W H]" - "\n\t\t: Setup view to draw a tile (a part of virtual bigger viewport)." - "\n\t\t: -totalSize the size of virtual bigger viewport" - "\n\t\t: -tileSize tile size (the view size will be used if omitted)" - "\n\t\t: -lowerLeft tile offset as lower left corner" - "\n\t\t: -upperLeft tile offset as upper left corner", - __FILE__, VTile, group); - theCommands.Add("vzlayer", - "vzlayer [layerId]" - "\n\t\t: [-add|-delete|-get|-settings] [-insertBefore AnotherLayer] [-insertAfter AnotherLayer]" - "\n\t\t: [-origin X Y Z] [-cullDist Distance] [-cullSize Size]" - "\n\t\t: [-enable|-disable {depthTest|depthWrite|depthClear|depthoffset}]" - "\n\t\t: [-enable|-disable {positiveOffset|negativeOffset|textureenv|rayTracing}]" - "\n\t\t: ZLayer list management:" - "\n\t\t: -add add new z layer to viewer and print its id" - "\n\t\t: -insertBefore add new z layer and insert it before existing one" - "\n\t\t: -insertAfter add new z layer and insert it after existing one" - "\n\t\t: -delete delete z layer" - "\n\t\t: -get print sequence of z layers" - "\n\t\t: -settings print status of z layer settings" - "\n\t\t: -disable disables given setting" - "\n\t\t: -enable enables given setting", - __FILE__,VZLayer,group); - theCommands.Add("vlayerline", - "vlayerline : vlayerline x1 y1 x2 y2 [linewidth=0.5] [linetype=0] [transparency=1.0]", - __FILE__,VLayerLine,group); - theCommands.Add("vgrid", - "vgrid [off] [-type {rect|circ}] [-mode {line|point}] [-origin X Y] [-rotAngle Angle] [-zoffset DZ]" - "\n\t\t: [-step X Y] [-size DX DY]" - "\n\t\t: [-step StepRadius NbDivisions] [-radius Radius]", - __FILE__, VGrid, group); - theCommands.Add ("vpriviledgedplane", - "vpriviledgedplane [Ox Oy Oz Nx Ny Nz [Xx Xy Xz]]" - "\n\t\t: Ox, Oy, Oz - plane origin" - "\n\t\t: Nx, Ny, Nz - plane normal direction" - "\n\t\t: Xx, Xy, Xz - plane x-reference axis direction" - "\n\t\t: Sets or prints viewer's priviledged plane geometry.", - __FILE__, VPriviledgedPlane, group); - theCommands.Add ("vconvert", - "vconvert v [Mode={window|view}]" - "\n\t\t: vconvert x y [Mode={window|view|grid|ray}]" - "\n\t\t: vconvert x y z [Mode={window|grid}]" - "\n\t\t: window - convert to window coordinates, pixels" - "\n\t\t: view - convert to view projection plane" - "\n\t\t: grid - convert to model coordinates, given on grid" - "\n\t\t: ray - convert projection ray to model coordinates" - "\n\t\t: - vconvert v window : convert view to window;" - "\n\t\t: - vconvert v view : convert window to view;" - "\n\t\t: - vconvert x y window : convert view to window;" - "\n\t\t: - vconvert x y view : convert window to view;" - "\n\t\t: - vconvert x y : convert window to model;" - "\n\t\t: - vconvert x y grid : convert window to model using grid;" - "\n\t\t: - vconvert x y ray : convert window projection line to model;" - "\n\t\t: - vconvert x y z window : convert model to window;" - "\n\t\t: - vconvert x y z grid : convert view to model using grid;" - "\n\t\t: Converts the given coordinates to window/view/model space.", - __FILE__, VConvert, group); - theCommands.Add ("vfps", - "vfps [framesNb=100] [-duration seconds] : estimate average frame rate for active view", - __FILE__, VFps, group); - theCommands.Add ("vstereo", - "vstereo [0|1] [-mode Mode] [-reverse {0|1}]" - "\n\t\t: [-mirrorComposer] [-hmdfov2d AngleDegrees] [-unitFactor MetersFactor]" - "\n\t\t: [-anaglyph Filter]" - "\n\t\t: Control stereo output mode." - "\n\t\t: When -mirrorComposer is specified, VR rendered frame will be mirrored in window (debug)." - "\n\t\t: Parameter -unitFactor specifies meters scale factor for mapping VR input." - "\n\t\t: Available modes for -mode:" - "\n\t\t: quadBuffer - OpenGL QuadBuffer stereo," - "\n\t\t: requires driver support." - "\n\t\t: Should be called BEFORE vinit!" - "\n\t\t: anaglyph - Anaglyph glasses" - "\n\t\t: rowInterlaced - row-interlaced display" - "\n\t\t: columnInterlaced - column-interlaced display" - "\n\t\t: chessBoard - chess-board output" - "\n\t\t: sideBySide - horizontal pair" - "\n\t\t: overUnder - vertical pair" - "\n\t\t: openVR - OpenVR (HMD)" - "\n\t\t: Available Anaglyph filters for -anaglyph:" - "\n\t\t: redCyan, redCyanSimple, yellowBlue, yellowBlueSimple," - "\n\t\t: greenMagentaSimple", - __FILE__, VStereo, group); - theCommands.Add ("vmemgpu", - "vmemgpu [f]: print system-dependent GPU memory information if available;" - " with f option returns free memory in bytes", - __FILE__, VMemGpu, group); - theCommands.Add ("vreadpixel", - "vreadpixel xPixel yPixel [{rgb|rgba|sRGB|sRGBa|depth|hls|rgbf|rgbaf}=rgba] [-name|-hex]" - " : Read pixel value for active view", - __FILE__, VReadPixel, group); - theCommands.Add("diffimage", - "diffimage imageFile1 imageFile2 [diffImageFile]" - "\n\t\t: [-toleranceOfColor {0..1}=0] [-blackWhite {on|off}=off] [-borderFilter {on|off}=off]" - "\n\t\t: [-display viewName prsName1 prsName2 prsNameDiff] [-exitOnClose] [-closeOnEscape]" - "\n\t\t: Compare two images by content and generate difference image." - "\n\t\t: When -exitOnClose is specified, closing the view will exit application." - "\n\t\t: When -closeOnEscape is specified, view will be closed on pressing Escape.", - __FILE__, VDiffImage, group); - theCommands.Add ("vselect", - "vselect x1 y1 [x2 y2 [x3 y3 ... xn yn]] [-allowoverlap 0|1] [-replace|-replaceextra|-xor|-add|-remove]\n" - "- emulates different types of selection:\n" - "- 1) single click selection\n" - "- 2) selection with rectangle having corners at pixel positions (x1,y1) and (x2,y2)\n" - "- 3) selection with polygon having corners in pixel positions (x1,y1), (x2,y2),...,(xn,yn)\n" - "- 4) -allowoverlap manages overlap and inclusion detection in rectangular and polygonal selection.\n" - " If the flag is set to 1, both sensitives that were included completely and overlapped partially by defined \n" - " rectangle or polygon will be detected, otherwise algorithm will chose only fully included sensitives.\n" - " Default behavior is to detect only full inclusion. (partial inclusion - overlap - is not allowed by default)\n" - "- 5) selection scheme replace, replaceextra, xor, add or remove (replace by default)", - __FILE__, VSelect, group); - theCommands.Add ("vmoveto", - "vmoveto [x y] [-reset]" - "\n\t\t: Emulates cursor movement to pixel position (x,y)." - "\n\t\t: -reset resets current highlighting", - __FILE__, VMoveTo, group); - theCommands.Add ("vselaxis", - "vselaxis x y z dx dy dz [-onlyTop 0|1] [-display Name] [-showNormal 0|1]" - "\n\t\t: Provides intersection by given axis and print result intersection points" - "\n\t\t: -onlyTop switches On/Off mode to find only top point or all" - "\n\t\t: -display Name displays intersecting axis and result intersection points for debug goals" - "\n\t\t: -showNormal adds displaying of normal in intersection point or not", - __FILE__, VSelectByAxis, group); - theCommands.Add ("vviewparams", - "vviewparams [-args] [-scale [s]]" - "\n\t\t: [-eye [x y z]] [-at [x y z]] [-up [x y z]]" - "\n\t\t: [-proj [x y z]] [-center x y] [-size sx]" - "\n\t\t: Manage current view parameters or prints all" - "\n\t\t: current values when called without argument." - "\n\t\t: -scale [s] prints or sets viewport relative scale" - "\n\t\t: -eye [x y z] prints or sets eye location" - "\n\t\t: -at [x y z] prints or sets center of look" - "\n\t\t: -up [x y z] prints or sets direction of up vector" - "\n\t\t: -proj [x y z] prints or sets direction of look" - "\n\t\t: -center x y sets location of center of the screen in pixels" - "\n\t\t: -size [sx] prints viewport projection width and height sizes" - "\n\t\t: or changes the size of its maximum dimension" - "\n\t\t: -args prints vviewparams arguments for restoring current view", - __FILE__, VViewParams, group); - - theCommands.Add("v2dmode", - "v2dmode [-name viewName] [-mode {-on|-off}=-on]" - "\n\t\t: name - name of existing view, if not defined, the active view is changed" - "\n\t\t: mode - switches On/Off rotation mode" - "\n\t\t: Set 2D mode of the active viewer manipulating. The following mouse and key actions are disabled:" - "\n\t\t: - rotation of the view by 3rd mouse button with Ctrl active" - "\n\t\t: - set view projection using key buttons: A/D/T/B/L/R for AXO, Reset, Top, Bottom, Left, Right" - "\n\t\t: View camera position might be changed only by commands.", - __FILE__, V2DMode, group); - - theCommands.Add("vanimation", "Alias for vanim", - __FILE__, VAnimation, group); - - theCommands.Add("vanim", - "List existing animations:" - "\n\t\t: vanim" - "\n\t\t: Animation playback:" - "\n\t\t: vanim name {-play|-resume|-pause|-stop} [playFrom [playDuration]]" - "\n\t\t: [-speed Coeff] [-freeLook] [-noPauseOnClick] [-lockLoop]" - "\n\t\t: -speed playback speed (1.0 is normal speed)" - "\n\t\t: -freeLook skip camera animations" - "\n\t\t: -noPauseOnClick do not pause animation on mouse click" - "\n\t\t: -lockLoop disable any interactions" - "\n\t\t:" - "\n\t\t: Animation definition:" - "\n\t\t: vanim Name/sub/name [-clear] [-delete]" - "\n\t\t: [start TimeSec] [duration TimeSec]" - "\n\t\t:" - "\n\t\t: Animation name defined in path-style (anim/name or anim.name)" - "\n\t\t: specifies nested animations." - "\n\t\t: There is no syntax to explicitly add new animation," - "\n\t\t: and all non-existing animations within the name will be" - "\n\t\t: implicitly created on first use (including parents)." - "\n\t\t:" - "\n\t\t: Each animation might define the SINGLE action (see below)," - "\n\t\t: like camera transition, object transformation or custom callback." - "\n\t\t: Child animations can be used for defining concurrent actions." - "\n\t\t:" - "\n\t\t: Camera animation:" - "\n\t\t: vanim name -view [-eye1 X Y Z] [-eye2 X Y Z]" - "\n\t\t: [-at1 X Y Z] [-at2 X Y Z]" - "\n\t\t: [-up1 X Y Z] [-up2 X Y Z]" - "\n\t\t: [-scale1 Scale] [-scale2 Scale]" - "\n\t\t: -eyeX camera Eye positions pair (start and end)" - "\n\t\t: -atX camera Center positions pair" - "\n\t\t: -upX camera Up directions pair" - "\n\t\t: -scaleX camera Scale factors pair" - "\n\t\t: Object animation:" - "\n\t\t: vanim name -object [-loc1 X Y Z] [-loc2 X Y Z]" - "\n\t\t: [-rot1 QX QY QZ QW] [-rot2 QX QY QZ QW]" - "\n\t\t: [-scale1 Scale] [-scale2 Scale]" - "\n\t\t: -locX object Location points pair (translation)" - "\n\t\t: -rotX object Orientations pair (quaternions)" - "\n\t\t: -scaleX object Scale factors pair (quaternions)" - "\n\t\t: Custom callback:" - "\n\t\t: vanim name -invoke \"Command Arg1 Arg2 %Pts %LocalPts %Normalized ArgN\"" - "\n\t\t: %Pts overall animation presentation timestamp" - "\n\t\t: %LocalPts local animation timestamp" - "\n\t\t: %Normalized local animation normalized value in range 0..1" - "\n\t\t:" - "\n\t\t: Video recording:" - "\n\t\t: vanim name -record FileName [Width Height] [-fps FrameRate=24]" - "\n\t\t: [-format Format] [-vcodec Codec] [-pix_fmt PixelFormat]" - "\n\t\t: [-crf Value] [-preset Preset]" - "\n\t\t: -fps video framerate" - "\n\t\t: -format file format, container (matroska, etc.)" - "\n\t\t: -vcodec video codec identifier (ffv1, mjpeg, etc.)" - "\n\t\t: -pix_fmt image pixel format (yuv420p, rgb24, etc.)" - "\n\t\t: -crf constant rate factor (specific to codec)" - "\n\t\t: -preset codec parameters preset (specific to codec)", - __FILE__, VAnimation, group); - - theCommands.Add("vchangeselected", - "vchangeselected shape" - "- adds to shape to selection or remove one from it", - __FILE__, VChangeSelected, group); - theCommands.Add ("vnbselected", - "vnbselected" - "\n\t\t: Returns number of selected objects", __FILE__, VNbSelected, group); - theCommands.Add ("vcamera", - "vcamera [PrsName] [-ortho] [-projtype]" - "\n\t\t: [-persp]" - "\n\t\t: [-fovy [Angle]] [-distance [Distance]]" - "\n\t\t: [-stereo] [-leftEye] [-rightEye]" - "\n\t\t: [-iod [Distance]] [-iodType [absolute|relative]]" - "\n\t\t: [-zfocus [Value]] [-zfocusType [absolute|relative]]" - "\n\t\t: [-fov2d [Angle]] [-lockZup {0|1}]" - "\n\t\t: [-rotationMode {active|pick|pickCenter|cameraAt|scene}]" - "\n\t\t: [-navigationMode {orbit|walk|flight}]" - "\n\t\t: [-xrPose base|head=base]" - "\n\t\t: Manages camera parameters." - "\n\t\t: Displays frustum when presentation name PrsName is specified." - "\n\t\t: Prints current value when option called without argument." - "\n\t\t: Orthographic camera:" - "\n\t\t: -ortho activate orthographic projection" - "\n\t\t: Perspective camera:" - "\n\t\t: -persp activate perspective projection (mono)" - "\n\t\t: -fovy field of view in y axis, in degrees" - "\n\t\t: -fov2d field of view limit for 2d on-screen elements" - "\n\t\t: -distance distance of eye from camera center" - "\n\t\t: -lockZup lock Z up (tunrtable mode)" - "\n\t\t: -rotationMode rotation mode (gravity point)" - "\n\t\t: -navigationMode navigation mode" - "\n\t\t: Stereoscopic camera:" - "\n\t\t: -stereo perspective projection (stereo)" - "\n\t\t: -leftEye perspective projection (left eye)" - "\n\t\t: -rightEye perspective projection (right eye)" - "\n\t\t: -iod intraocular distance value" - "\n\t\t: -iodType distance type, absolute or relative" - "\n\t\t: -zfocus stereographic focus value" - "\n\t\t: -zfocusType focus type, absolute or relative", - __FILE__, VCamera, group); - theCommands.Add ("vautozfit", "command to enable or disable automatic z-range adjusting\n" - "- vautozfit [on={1|0}] [scale]\n" - " Prints or changes parameters of automatic z-fit mode:\n" - " \"on\" - turns automatic z-fit on or off\n" - " \"scale\" - specifies factor to scale computed z range.\n", - __FILE__, VAutoZFit, group); - theCommands.Add ("vzrange", "command to manually access znear and zfar values\n" - " vzrange - without parameters shows current values\n" - " vzrange [znear] [zfar] - applies provided values to view", - __FILE__,VZRange, group); - theCommands.Add("vsetviewsize", - "vsetviewsize size", - __FILE__,VSetViewSize,group); - theCommands.Add("vmoveview", - "vmoveview Dx Dy Dz [Start = 1|0]", - __FILE__,VMoveView,group); - theCommands.Add("vtranslateview", - "vtranslateview Dx Dy Dz [Start = 1|0)]", - __FILE__,VTranslateView,group); - theCommands.Add("vturnview", - "vturnview Ax Ay Az [Start = 1|0]", - __FILE__,VTurnView,group); - theCommands.Add("vtextureenv", - "Enables or disables environment mapping in the 3D view, loading the texture from the given standard " - "or user-defined file and optionally applying texture mapping parameters\n" - " Usage:\n" - " vtextureenv off - disables environment mapping\n" - " vtextureenv on {std_texture|texture_file_name} [rep mod flt ss st ts tt rot] - enables environment mapping\n" - " std_texture = (0..7)\n" - " rep = {clamp|repeat}\n" - " mod = {decal|modulate}\n" - " flt = {nearest|bilinear|trilinear}\n" - " ss, st - scale factors for s and t texture coordinates\n" - " ts, tt - translation for s and t texture coordinates\n" - " rot - texture rotation angle in degrees", - __FILE__, VTextureEnv, group); - theCommands.Add("vhlr", - "vhlr {on|off} [-showHidden={1|0}] [-algoType={algo|polyAlgo}] [-noupdate]" - "\n\t\t: Hidden Line Removal algorithm." - "\n\t\t: -showHidden if set ON, hidden lines are drawn as dotted ones" - "\n\t\t: -algoType type of HLR algorithm.\n", - __FILE__,VHLR,group); - theCommands.Add("vhlrtype", - "vhlrtype {algo|polyAlgo} [shape_1 ... shape_n] [-noupdate]" - "\n\t\t: Changes the type of HLR algorithm using for shapes:" - "\n\t\t: 'algo' - exact HLR algorithm is applied" - "\n\t\t: 'polyAlgo' - polygonal HLR algorithm is applied" - "\n\t\t: If shapes are not given - option is applied to all shapes in the view", - __FILE__,VHLRType,group); - theCommands.Add("vclipplane", - "vclipplane planeName [{0|1}]" - "\n\t\t: [-equation1 A B C D]" - "\n\t\t: [-equation2 A B C D]" - "\n\t\t: [-boxInterior MinX MinY MinZ MaxX MaxY MaxZ]" - "\n\t\t: [-set|-unset|-setOverrideGlobal [objects|views]]" - "\n\t\t: [-maxPlanes]" - "\n\t\t: [-capping {0|1}]" - "\n\t\t: [-color R G B] [-transparency Value] [-hatch {on|off|ID}]" - "\n\t\t: [-texName Texture] [-texScale SX SY] [-texOrigin TX TY]" - "\n\t\t: [-texRotate Angle]" - "\n\t\t: [-useObjMaterial {0|1}] [-useObjTexture {0|1}]" - "\n\t\t: [-useObjShader {0|1}]" - "\n\t\t: Clipping planes management:" - "\n\t\t: -maxPlanes print plane limit for view" - "\n\t\t: -delete delete plane with given name" - "\n\t\t: {off|on|0|1} turn clipping on/off" - "\n\t\t: -set|-unset set/unset plane for Object or View list;" - "\n\t\t: applied to active View when list is omitted" - "\n\t\t: -equation A B C D change plane equation" - "\n\t\t: -clone SourcePlane NewPlane clone the plane definition." - "\n\t\t: Capping options:" - "\n\t\t: -capping {off|on|0|1} turn capping on/off" - "\n\t\t: -color R G B set capping color" - "\n\t\t: -transparency Value set capping transparency 0..1" - "\n\t\t: -texName Texture set capping texture" - "\n\t\t: -texScale SX SY set capping tex scale" - "\n\t\t: -texOrigin TX TY set capping tex origin" - "\n\t\t: -texRotate Angle set capping tex rotation" - "\n\t\t: -hatch {on|off|ID} set capping hatching mask" - "\n\t\t: -useObjMaterial {off|on|0|1} use material of clipped object" - "\n\t\t: -useObjTexture {off|on|0|1} use texture of clipped object" - "\n\t\t: -useObjShader {off|on|0|1} use shader program of object", - __FILE__, VClipPlane, group); - theCommands.Add("vdefaults", - "vdefaults [-absDefl value]" - "\n\t\t: [-devCoeff value]" - "\n\t\t: [-angDefl value]" - "\n\t\t: [-autoTriang {off/on | 0/1}]" - , __FILE__, VDefaults, group); - theCommands.Add("vlight", - "vlight [lightName] [-noupdate]" - "\n\t\t: [-clear|-defaults] [-layer Id] [-local|-global] [-disable|-enable]" - "\n\t\t: [-type {ambient|directional|spotlight|positional}] [-name value]" - "\n\t\t: [-position X Y Z] [-direction X Y Z] [-color colorName] [-intensity value]" - "\n\t\t: [-headlight 0|1] [-castShadows 0|1]" - "\n\t\t: [-range value] [-constAttenuation value] [-linearAttenuation value]" - "\n\t\t: [-spotExponent value] [-spotAngle angleDeg]" - "\n\t\t: [-smoothAngle value] [-smoothRadius value]" - "\n\t\t: [-display] [-showName 1|0] [-showRange 1|0] [-prsZoomable 1|0] [-prsSize Value]" - "\n\t\t: [-arcSize Value]" - "\n\t\t: Command manages light sources. Without arguments shows list of lights." - "\n\t\t: Arguments affecting the list of defined/active lights:" - "\n\t\t: -clear remove all light sources" - "\n\t\t: -defaults defines two standard light sources" - "\n\t\t: -reset resets light source parameters to default values" - "\n\t\t: -type sets type of light source" - "\n\t\t: -name sets new name to light source" - "\n\t\t: -global assigns light source to all views (default state)" - "\n\t\t: -local assigns light source to active view" - "\n\t\t: -zlayer assigns light source to specified Z-Layer" - "\n\t\t: Ambient light parameters:" - "\n\t\t: -color sets (normalized) light color" - "\n\t\t: -intensity sets intensity of light source, 1.0 by default;" - "\n\t\t: affects also environment cubemap intensity" - "\n\t\t: Point light parameters:" - "\n\t\t: -color sets (normalized) light color" - "\n\t\t: -intensity sets PBR intensity" - "\n\t\t: -range sets clamping distance" - "\n\t\t: -constAtten (obsolete) sets constant attenuation factor" - "\n\t\t: -linearAtten (obsolete) sets linear attenuation factor" - "\n\t\t: -smoothRadius sets PBR smoothing radius" - "\n\t\t: Directional light parameters:" - "\n\t\t: -color sets (normalized) light color" - "\n\t\t: -intensity sets PBR intensity" - "\n\t\t: -direction sets direction" - "\n\t\t: -headlight sets headlight flag" - "\n\t\t: -castShadows enables/disables shadow casting" - "\n\t\t: -smoothAngle sets PBR smoothing angle (in degrees) within 0..90 range" - "\n\t\t: Spot light parameters:" - "\n\t\t: -color sets (normalized) light color" - "\n\t\t: -intensity sets PBR intensity" - "\n\t\t: -range sets clamping distance" - "\n\t\t: -position sets position" - "\n\t\t: -direction sets direction" - "\n\t\t: -spotAngle sets spotlight angle" - "\n\t\t: -spotExp sets spotlight exponenta" - "\n\t\t: -headlight sets headlight flag" - "\n\t\t: -constAtten (obsolete) sets constant attenuation factor" - "\n\t\t: -linearAtten (obsolete) sets linear attenuation factor" - "\n\t\t: Light presentation parameters:" - "\n\t\t: -display adds light source presentation" - "\n\t\t: -showName shows/hides the name of light source; 1 by default" - "\n\t\t: -showRange shows/hides the range of spot/positional light source; 1 by default" - "\n\t\t: -prsZoomable makes light presentation zoomable/non-zoomable" - "\n\t\t: -prsDraggable makes light presentation draggable/non-draggable" - "\n\t\t: -prsSize sets light presentation size" - "\n\t\t: -arcSize sets arc presentation size(in pixels) for rotation directional light source; 25 by default" - "\n\t\t: Examples:" - "\n\t\t: vlight redlight -type POSITIONAL -headlight 1 -pos 0 1 1 -color RED" - "\n\t\t: vlight redlight -delete", - __FILE__, VLight, group); - theCommands.Add("vpbrenv", - "vpbrenv -clear|-generate" - "\n\t\t: Clears or generates PBR environment map of active view." - "\n\t\t: -clear clears PBR environment (fills by white color)" - "\n\t\t: -generate generates PBR environment from current background cubemap", - __FILE__, VPBREnvironment, group); - theCommands.Add("vraytrace", - "vraytrace [0|1]" - "\n\t\t: Turns on/off ray-tracing renderer." - "\n\t\t: 'vraytrace 0' alias for 'vrenderparams -raster'." - "\n\t\t: 'vraytrace 1' alias for 'vrenderparams -rayTrace'.", - __FILE__, VRenderParams, group); - theCommands.Add("vrenderparams", - "\n\t\t: Manages rendering parameters, affecting visual appearance, quality and performance." - "\n\t\t: Should be applied taking into account GPU hardware capabilities and performance." - "\n\t\t: Common parameters:" - "\n\t\t: vrenderparams [-raster] [-shadingModel {unlit|facet|gouraud|phong|pbr|pbr_facet}=gouraud]" - "\n\t\t: [-msaa 0..8=0] [-rendScale scale=1]" - "\n\t\t: [-resolution value=72] [-fontHinting {off|normal|light}=off]" - "\n\t\t: [-fontAutoHinting {auto|force|disallow}=auto]" - "\n\t\t: [-oit {off|weight|peel}] [-oit weighted [depthFactor=0.0]] [-oit peeling [nbLayers=4]]" - "\n\t\t: [-shadows {on|off}=on] [-shadowMapResolution value=1024] [-shadowMapBias value=0.005]" - "\n\t\t: [-depthPrePass {on|off}=off] [-alphaToCoverage {on|off}=on]" - "\n\t\t: [-frustumCulling {on|off|noupdate}=on] [-lineFeather width=1.0]" - "\n\t\t: [-sync {default|views}] [-reset]" - "\n\t\t: -raster Disables GPU ray-tracing." - "\n\t\t: -shadingModel Controls shading model." - "\n\t\t: -msaa Specifies number of samples for MSAA." - "\n\t\t: -rendScale Rendering resolution scale factor (supersampling, alternative to MSAA)." - "\n\t\t: -resolution Sets new pixels density (PPI) used as text scaling factor." - "\n\t\t: -fontHinting Enables/disables font hinting for better readability on low-resolution screens." - "\n\t\t: -fontAutoHinting Manages font autohinting." - "\n\t\t: -lineFeather Sets line feather factor while displaying mesh edges." - "\n\t\t: -alphaToCoverage Enables/disables alpha to coverage (needs MSAA)." - "\n\t\t: -oit Enables/disables order-independent transparency (OIT) rendering;" - "\n\t\t: off unordered transparency (but opaque objects implicitly draw first);" - "\n\t\t: weighted weight OIT is managed by depth weight factor 0.0..1.0;" - "\n\t\t: peeling depth peeling OIT is managed by number of peeling layers." - "\n\t\t: -shadows Enables/disables shadows rendering." - "\n\t\t: -shadowMapResolution Shadow texture map resolution." - "\n\t\t: -shadowMapBias Shadow map bias." - "\n\t\t: -depthPrePass Enables/disables depth pre-pass." - "\n\t\t: -frustumCulling Enables/disables objects frustum clipping or" - "\n\t\t: sets state to check structures culled previously." - "\n\t\t: -sync Sets active View parameters as Viewer defaults / to other Views." - "\n\t\t: -reset Resets active View parameters to Viewer defaults." - "\n\t\t: Diagnostic output (on-screen overlay):" - "\n\t\t: vrenderparams [-perfCounters none|fps|cpu|layers|structures|groups|arrays|triangles|points" - "\n\t\t: |gpuMem|frameTime|basic|extended|full|nofps|skipImmediate]" - "\n\t\t: [-perfUpdateInterval nbSeconds=1] [-perfChart nbFrames=1] [-perfChartMax seconds=0.1]" - "\n\t\t: -perfCounters Show/hide performance counters (flags can be combined)." - "\n\t\t: -perfUpdateInterval Performance counters update interval." - "\n\t\t: -perfChart Show frame timers chart limited by specified number of frames." - "\n\t\t: -perfChartMax Maximum time in seconds with the chart." - "\n\t\t: Ray-Tracing options:" - "\n\t\t: vrenderparams [-rayTrace] [-rayDepth {0..10}=3] [-reflections {on|off}=off]" - "\n\t\t: [-fsaa {on|off}=off] [-gleam {on|off}=off] [-env {on|off}=off]" - "\n\t\t: [-gi {on|off}=off] [-brng {on|off}=off]" - "\n\t\t: [-iss {on|off}=off] [-tileSize {1..4096}=32] [-nbTiles {64..1024}=256]" - "\n\t\t: [-ignoreNormalMap {on|off}=off] [-twoSide {on|off}=off]" - "\n\t\t: [-maxRad {value>0}=30.0]" - "\n\t\t: [-aperture {value>=0}=0.0] [-focal {value>=0.0}=1.0]" - "\n\t\t: [-exposure value=0.0] [-whitePoint value=1.0] [-toneMapping {disabled|filmic}=disabled]" - "\n\t\t: -rayTrace Enables GPU ray-tracing." - "\n\t\t: -rayDepth Defines maximum ray-tracing depth." - "\n\t\t: -reflections Enables/disables specular reflections." - "\n\t\t: -fsaa Enables/disables adaptive anti-aliasing." - "\n\t\t: -gleam Enables/disables transparency shadow effects." - "\n\t\t: -gi Enables/disables global illumination effects (Path-Tracing)." - "\n\t\t: -env Enables/disables environment map background." - "\n\t\t: -ignoreNormalMap Enables/disables normal map ignoring during path tracing." - "\n\t\t: -twoSide Enables/disables two-sided BSDF models (PT mode)." - "\n\t\t: -iss Enables/disables adaptive screen sampling (PT mode)." - "\n\t\t: -maxRad Value used for clamping radiance estimation (PT mode)." - "\n\t\t: -tileSize Specifies size of screen tiles in ISS mode (32 by default)." - "\n\t\t: -nbTiles Specifies number of screen tiles per Redraw in ISS mode (256 by default)." - "\n\t\t: -aperture Aperture size of perspective camera for depth-of-field effect (0 disables DOF)." - "\n\t\t: -focal Focal distance of perspective camera for depth-of-field effect." - "\n\t\t: -exposure Exposure value for tone mapping (0.0 value disables the effect)." - "\n\t\t: -whitePoint White point value for filmic tone mapping." - "\n\t\t: -toneMapping Tone mapping mode (disabled, filmic)." - "\n\t\t: PBR environment baking parameters (advanced/debug):" - "\n\t\t: vrenderparams [-pbrEnvPow2size {power>0}=9] [-pbrEnvSMLN {levels>1}=6] [-pbrEnvBP {0..1}=0.99]" - "\n\t\t: [-pbrEnvBDSN {samples>0}=1024] [-pbrEnvBSSN {samples>0}=256]" - "\n\t\t: -pbrEnvPow2size Controls size of IBL maps (real size can be calculates as 2^pbrenvpow2size)." - "\n\t\t: -pbrEnvSMLN Controls number of mipmap levels used in specular IBL map." - "\n\t\t: -pbrEnvBDSN Controls number of samples in Monte-Carlo integration during" - "\n\t\t: diffuse IBL map's sherical harmonics calculation." - "\n\t\t: -pbrEnvBSSN Controls maximum number of samples per mipmap level" - "\n\t\t: in Monte-Carlo integration during specular IBL maps generation." - "\n\t\t: -pbrEnvBP Controls strength of samples number reducing" - "\n\t\t: during specular IBL maps generation (1 disables reducing)." - "\n\t\t: Debug options:" - "\n\t\t: vrenderparams [-issd {on|off}=off] [-rebuildGlsl on|off]" - "\n\t\t: -issd Shows screen sampling distribution in ISS mode." - "\n\t\t: -rebuildGlsl Rebuild Ray-Tracing GLSL programs (for debugging)." - "\n\t\t: -brng Enables/disables blocked RNG (fast coherent PT).", - __FILE__, VRenderParams, group); - theCommands.Add("vstatprofiler", - "\n vstatprofiler [fps|cpu|allLayers|layers|allstructures|structures|groups" - "\n |allArrays|fillArrays|lineArrays|pointArrays|textArrays" - "\n |triangles|points|geomMem|textureMem|frameMem" - "\n |elapsedFrame|cpuFrameAverage|cpuPickingAverage|cpuCullingAverage|cpuDynAverage" - "\n |cpuFrameMax|cpuPickingMax|cpuCullingMax|cpuDynMax]" - "\n [-noredraw]" - "\n\t\t: Prints rendering statistics." - "\n\t\t: If there are some parameters - print corresponding statistic counters values," - "\n\t\t: else - print all performance counters set previously." - "\n\t\t: '-noredraw' Flag to avoid additional redraw call and use already collected values.\n", - __FILE__, VStatProfiler, group); - theCommands.Add ("vplace", - "vplace dx dy" - "\n\t\t: Places the point (in pixels) at the center of the window", - __FILE__, VPlace, group); - theCommands.Add("vxrotate", - "vxrotate", - __FILE__,VXRotate,group); - - theCommands.Add("vmanipulator", - "\n vmanipulator Name [-attach AISObject | -detach | ...]" - "\n tool to create and manage AIS manipulators." - "\n Options: " - "\n '-attach AISObject' attach manipulator to AISObject" - "\n '-adjustPosition {0|center|location|shapeLocation}' adjust position when attaching" - "\n '-adjustSize {0|1}' adjust size when attaching" - "\n '-enableModes {0|1}' enable modes when attaching" - "\n '-view {active | [name of view]}' display manipulator only in defined view," - "\n by default it is displayed in all views of the current viewer" - "\n '-detach' detach manipulator" - "\n '-startTransform mouse_x mouse_y' - invoke start of transformation" - "\n '-transform mouse_x mouse_y' - invoke transformation" - "\n '-stopTransform [abort]' - invoke stop of transformation" - "\n '-move x y z' - move attached object" - "\n '-rotate x y z dx dy dz angle' - rotate attached object" - "\n '-scale factor' - scale attached object" - "\n '-autoActivate {0|1}' - set activation on detection" - "\n '-followTranslation {0|1}' - set following translation transform" - "\n '-followRotation {0|1}' - set following rotation transform" - "\n '-followDragging {0|1}' - set following dragging transform" - "\n '-gap value' - set gap between sub-parts" - "\n '-part axis mode {0|1}' - set visual part" - "\n '-parts axis mode {0|1}' - set visual part" - "\n '-pos x y z [nx ny nz [xx xy xz]' - set position of manipulator" - "\n '-size value' - set size of manipulator" - "\n '-zoomable {0|1}' - set zoom persistence", - __FILE__, VManipulator, group); - - theCommands.Add("vselprops", - "\n vselprops [dynHighlight|localDynHighlight|selHighlight|localSelHighlight] [options]" - "\n Customizes selection and dynamic highlight parameters for the whole interactive context:" - "\n -autoActivate {0|1} : disables|enables default computation and activation of global selection mode" - "\n -autoHighlight {0|1} : disables|enables automatic highlighting in 3D Viewer" - "\n -highlightSelected {0|1}: disables|enables highlighting of detected object in selected state" - "\n -pickStrategy {first|topmost} : defines picking strategy" - "\n 'first' to pick first acceptable (default)" - "\n 'topmost' to pick only topmost (and nothing, if topmost is rejected by filters)" - "\n -pixTol value : sets up pixel tolerance" - "\n -depthTol {uniform|uniformpx} value : sets tolerance for sorting results by depth" - "\n -depthTol {sensfactor} : use sensitive factor for sorting results by depth" - "\n -preferClosest {0|1} : sets if depth should take precedence over priority while sorting results" - "\n -dispMode dispMode : sets display mode for highlighting" - "\n -layer ZLayer : sets ZLayer for highlighting" - "\n -color {name|r g b} : sets highlight color" - "\n -transp value : sets transparency coefficient for highlight" - "\n -material material : sets highlight material" - "\n -print : prints current state of all mentioned parameters", - __FILE__, VSelectionProperties, group); - theCommands.Add ("vhighlightselected", - "vhighlightselected [0|1]: alias for vselprops -highlightSelected.\n", - __FILE__, VSelectionProperties, group); - - theCommands.Add ("vseldump", - "vseldump file -type {depth|unnormDepth|object|owner|selMode|entity|entityType|surfNormal}=depth -pickedIndex Index=1" - "\n\t\t: [-xrPose base|head=base]" - "\n\t\t: Generate an image based on detection results:" - "\n\t\t: depth normalized depth values" - "\n\t\t: unnormDepth unnormalized depth values" - "\n\t\t: object color of detected object" - "\n\t\t: owner color of detected owner" - "\n\t\t: selMode color of selection mode" - "\n\t\t: entity color of detected entity" - "\n\t\t: entityType color of detected entity type" - "\n\t\t: surfNormal normal direction values", - __FILE__, VDumpSelectionImage, group); - - theCommands.Add ("vviewcube", - "vviewcube name" - "\n\t\t: Displays interactive view manipualtion object." - "\n\t\t: Options: " - "\n\t\t: -reset reset geomertical and visual attributes'" - "\n\t\t: -size Size adapted size of View Cube" - "\n\t\t: -boxSize Size box size" - "\n\t\t: -axes {0|1} show/hide axes (trihedron)" - "\n\t\t: -edges {0|1} show/hide edges of View Cube" - "\n\t\t: -vertices {0|1} show/hide vertices of View Cube" - "\n\t\t: -Yup {0|1} -Zup {0|1} set Y-up or Z-up view orientation" - "\n\t\t: -color Color color of View Cube" - "\n\t\t: -boxColor Color box color" - "\n\t\t: -boxSideColor Color box sides color" - "\n\t\t: -boxEdgeColor Color box edges color" - "\n\t\t: -boxCornerColor Color box corner color" - "\n\t\t: -textColor Color color of side text of view cube" - "\n\t\t: -innerColor Color inner box color" - "\n\t\t: -transparency Value transparency of object within [0, 1] range" - "\n\t\t: -boxTransparency Value transparency of box within [0, 1] range" - "\n\t\t: -xAxisTextColor Color color of X axis label" - "\n\t\t: -yAxisTextColor Color color of Y axis label" - "\n\t\t: -zAxisTextColor Color color of Z axis label" - "\n\t\t: -font Name font name" - "\n\t\t: -fontHeight Value font height" - "\n\t\t: -boxFacetExtension Value box facet extension" - "\n\t\t: -boxEdgeGap Value gap between box edges and box sides" - "\n\t\t: -boxEdgeMinSize Value minimal box edge size" - "\n\t\t: -boxCornerMinSize Value minimal box corner size" - "\n\t\t: -axesPadding Value padding between box and arrows" - "\n\t\t: -roundRadius Value relative radius of corners of sides within [0.0, 0.5] range" - "\n\t\t: -axesRadius Value radius of axes of the trihedron" - "\n\t\t: -axesConeRadius Value radius of the cone (arrow) of the trihedron" - "\n\t\t: -axesSphereRadius Value radius of the sphere (central point) of trihedron" - "\n\t\t: -fixedanimation {0|1} uninterruptible animation loop" - "\n\t\t: -duration Seconds animation duration in seconds", - __FILE__, VViewCube, group); - - theCommands.Add("vcolorconvert" , - "vcolorconvert {from|to} type C1 C2 C2" - "\n\t\t: vcolorconvert from type C1 C2 C2: Converts color from specified color space to linear RGB" - "\n\t\t: vcolorconvert to type R G B: Converts linear RGB color to specified color space" - "\n\t\t: type can be sRGB, HLS, Lab, or Lch", - __FILE__,VColorConvert,group); - theCommands.Add("vcolordiff" , - "vcolordiff R1 G1 B1 R2 G2 B2: returns CIEDE2000 color difference between two RGB colors", - __FILE__,VColorDiff,group); - theCommands.Add("vselbvhbuild", - "vselbvhbuild [{0|1}] [-nbThreads value] [-wait]" - "\n\t\t: Turns on/off prebuilding of BVH within background thread(s)" - "\n\t\t: -nbThreads number of threads, 1 by default; if < 1 then used (NbLogicalProcessors - 1)" - "\n\t\t: -wait waits for building all of BVH", - __FILE__,VSelBvhBuild,group); + const char* aGroup = "AIS Viewer"; + const char* aFileName = __FILE__; + auto addCmd = [&](const char* theName, Draw_Interpretor::CommandFunction theFunc, const char* theHelp) + { + theCommands.Add (theName, theHelp, aFileName, theFunc, aGroup); + }; + + addCmd ("vdriver", VDriver, /* [vdriver] */ R"( +vdriver [-list] [-default DriverName] [-load DriverName] +Manages active graphic driver factory. +Prints current active driver when called without arguments. +Makes specified driver active when ActiveName argument is specified. + -list print registered factories + -default define which factory should be used by default (to be used by next vinit call) + -load try loading factory plugin and set it as default one +)" /* [vdriver] */); + + addCmd ("vinit", VInit, /* [vinit] */ R"( +vinit [-name viewName] [-left leftPx] [-top topPx] [-width widthPx] [-height heightPx] + [-exitOnClose] [-closeOnEscape] [-cloneActive] [-virtual {on|off}=off] [-2d_mode {on|off}=off] + [-display displayName] +Creates new View window with specified name viewName. +By default the new view is created in the viewer and in graphic driver shared with active view. + -name {driverName/viewerName/viewName | viewerName/viewName | viewName} + if driverName isn't specified the driver will be shared with active view; + if viewerName isn't specified the viewer will be shared with active view. + -display HostName.DisplayNumber[:ScreenNumber] + +Display name will be used within creation of graphic driver, when specified. + -left, -top pixel position of left top corner of the window. + -width, -height width and height of window respectively. + -cloneActive flag to copy camera and dimensions of active view. + -exitOnClose when specified, closing the view will exit application. + -closeOnEscape when specified, view will be closed on pressing Escape. + -virtual create an offscreen window within interactive session + -2d_mode when on, view will not react on rotate scene events +Additional commands for operations with views: vclose, vactivate, vviewlist. +)" /* [vinit] */); + + addCmd ("vclose", VClose, /* [vclose] */ R"( +vclose [view_id [keep_context=0|1]] +or vclose ALL - to remove all created views + - removes view(viewer window) defined by its view_id. + - keep_context: by default 0; if 1 and the last view is deleted the current context is not removed. +)" /* [vclose] */); + + addCmd ("vactivate", VActivate, /* [vactivate] */ R"( +vactivate view_id [-noUpdate] +Activates view(viewer window) defined by its view_id. +)" /* [vactivate] */); + + addCmd ("vviewlist", VViewList, /* [vviewlist] */ R"( +vviewlist [format={tree, long}]=tree +Prints current list of views per viewer and graphic_driver ID shared between viewers + - format: format of result output, if tree the output is a tree view; + otherwise it's a list of full view names. +)" /* [vviewlist] */); + + addCmd ("vhelp", VHelp, /* [vhelp] */ R"( +vhelp : display help on the viewer commands and list of hotkeys. +)" /* [vhelp] */); + + addCmd ("vviewproj", VViewProj, /* [vviewproj] */ R"( +vviewproj [top|bottom|left|right|front|back|axoLeft|axoRight] + [+-X+-Y+-Z] [-Zup|-Yup] [-frame +-X+-Y] +Setup view direction + -Yup use Y-up convention instead of Zup (which is default). + +-X+-Y+-Z define direction as combination of DX, DY and DZ; + for example '+Z' will show front of the model, + '-X-Y+Z' will define left axonometric view. + -frame define camera Up and Right directions (regardless Up convention); + for example '+X+Z' will show front of the model with Z-up. +)" /* [vviewproj] */); + + addCmd ("vtop", VViewProj, /* [vtop] */ R"( +vtop or : Display top view (+X+Y) in the 3D viewer window. +)" /* [vtop] */); + + addCmd ("vbottom", VViewProj, /* [vbottom] */ R"( +vbottom : Display bottom view (+X-Y) in the 3D viewer window. +)" /* [vbottom] */); + + addCmd ("vleft", VViewProj, /* [vleft] */ R"( +vleft : Display left view (-Y+Z) in the 3D viewer window. +)" /* [vleft] */); + + addCmd ("vright", VViewProj, /* [vright] */ R"( +vright : Display right view (+Y+Z) in the 3D viewer window. +)" /* [vright] */); + + addCmd ("vaxo", VViewProj, /* [vaxo] */ R"( +vaxo or : Display axonometric view (+X-Y+Z) in the 3D viewer window. +)" /* [vaxo] */); + + addCmd ("vfront", VViewProj, /* [vfront] */ R"( +vfront : Display front view (+X+Z) in the 3D viewer window. +)" /* [vfront] */); + + addCmd ("vback", VViewProj, /* [vfront] */ R"( +vback : Display back view (-X+Z) in the 3D viewer window. +)" /* [vback] */); + + addCmd ("vpick", VPick, /* [vpick] */ R"( +vpick X Y Z [shape subshape] +)" /* [vpick] */); + + addCmd ("vfit", VFit, /* [vfit] */ R"( +vfit or [-selected] [-noupdate] +Fit all / selected. Objects in the view are visualized to occupy the maximum surface. +)" /* [vfit] */); + + addCmd ("vfitarea", VFitArea, /* [vfitarea] */ R"( +vfitarea [x1 y1 x2 y2] [x1 y1 z1 x2 y2 z2] +Fit view to show area located between two points +given in world 2D or 3D coordinates. +)" /* [vfitarea] */); + + addCmd ("vzfit", VZFit, /* [vzfit] */ R"( +vzfit [scale] +Automatic depth panning. +Matches Z near, Z far view volume planes to the displayed objects. + - "scale" specifies factor to scale computed z range. +)" /* [vzfit] */); + + addCmd ("vrepaint", VRepaint, /* [vrepaint] */ R"( +vrepaint [-immediate] [-continuous FPS] +Force redraw of active View. + -immediate flag performs redraw of immediate layers only; + -continuous activates/deactivates continuous redraw of active View, + 0 means no continuous rendering, + -1 means non-stop redraws, + >0 specifies target framerate. +)" /* [vrepaint] */); + + addCmd ("vclear", VClear, /* [vclear] */ R"( +vclear : Remove all the object from the viewer +)" /* [vclear] */); + + addCmd ("vbackground", VBackground, /* [vbackground] */ R"( +vbackground [-color Color [-default]] + [-gradient Color1 Color2 [-default] + [-gradientMode {NONE|HORIZONTAL|VERTICAL|DIAG1|DIAG2|CORNER1|CORNER2|CORNER3|ELLIPTICAL}]=VERT] + [-imageFile ImageFile [-imageMode {CENTERED|TILED|STRETCH|NONE}]=CENTERED [-srgb {0|1}]=1] + [-cubemap CubemapFile1 [CubeMapFiles2-5] [-order TilesIndexes1-6] [-invertedz]=0] + [-pbrEnv {ibl|noibl|keep}] +Changes background or some background settings. + -color sets background color + -gradient sets background gradient starting and ending colors + -gradientMode sets gradient fill method + -default sets background default gradient or color + -imageFile sets filename of image used as background + -imageMode sets image fill type + -cubemap sets environment cubemap as background + -invertedz sets inversion of Z axis for background cubemap rendering; FALSE when unspecified + -pbrEnv sets on/off Image Based Lighting (IBL) from background cubemap for PBR + -srgb prefer sRGB texture format when applicable; TRUE when unspecified" + -order defines order of tiles in one image cubemap + TileIndexi defubes an index in range [0, 5] for i tile of one image packed cubemap + (has no effect in case of multi-image cubemaps). +)" /* [vbackground] */); + + addCmd ("vsetbg", VBackground, /* [vsetbg] */ R"( +Alias for 'vbackground -imageFile ImageFile [-imageMode FillType]'. +)" /* [vsetbg] */); + + addCmd ("vsetbgmode", VBackground, /* [vsetbgmode] */ R"( +Alias for 'vbackground -imageMode FillType'. +)" /* [vsetbgmode] */); + + addCmd ("vsetgradientbg", VBackground, /* [vsetgradientbg] */ R"( +Alias for 'vbackground -gradient Color1 Color2 -gradientMode FillMethod'. +)" /* [vsetgradientbg] */); + + addCmd ("vsetgrbgmode", VBackground, /* [vsetgrbgmode] */ R"( +Alias for 'vbackground -gradientMode FillMethod'. +)" /* [vsetgrbgmode] */); + + addCmd ("vsetcolorbg", VBackground, /* [vsetcolorbg] */ R"( +Alias for 'vbackground -color Color'. +)" /* [vsetcolorbg] */); + + addCmd ("vsetdefaultbg", VBackground, /* [vsetdefaultbg] */ R"( +Alias for 'vbackground -default -gradient Color1 Color2 [-gradientMode FillMethod]' + and for 'vbackground -default -color Color'. +)" /* [vsetdefaultbg] */); + + addCmd ("vscale", VScale, /* [vscale] */ R"( +vscale X Y Z +)" /* [vscale] */); + + addCmd ("vzbufftrihedron", VZBuffTrihedron, /* [vzbufftrihedron] */ R"( +vzbufftrihedron [{-on|-off}=-on] [-type {wireframe|zbuffer}=zbuffer] + [-position center|left_lower|left_upper|right_lower|right_upper] + [-scale value=0.1] [-size value=0.8] [-arrowDiam value=0.05] + [-colorArrowX color=RED] [-colorArrowY color=GREEN] [-colorArrowZ color=BLUE] + [-nbfacets value=12] [-colorLabels color=WHITE] + [-colorLabelX color] [-colorLabelY color] [-colorLabelZ color] +Displays a trihedron. +)" /* [vzbufftrihedron] */); + + addCmd ("vrotate", VRotate, /* [vrotate] */ R"( +vrotate [[-mouseStart X Y] [-mouseMove X Y]]|[AX AY AZ [X Y Z]] + -mouseStart start rotation according to the mouse position; + -mouseMove continue rotation with angle computed + from last and new mouse position. +)" /* [vrotate] */); + + addCmd ("vzoom", VZoom, /* [vzoom] */ R"( +vzoom coef +)" /* [vzoom] */); + + addCmd ("vpan", VPan, /* [vpan] */ R"( +vpan dx dy +)" /* [vpan] */); + + addCmd ("vcolorscale", VColorScale, /* [vcolorscale] */ R"( +vcolorscale name [-noupdate|-update] [-demo] + [-range RangeMin=0 RangeMax=1 NbIntervals=10] + [-font HeightFont=20] + [-logarithmic {on|off}=off] [-reversed {on|off}=off] + [-smoothTransition {on|off}=off] + [-hueRange MinAngle=230 MaxAngle=0] + [-colorRange MinColor=BLUE1 MaxColor=RED] + [-textPos {left|right|center|none}=right] + [-labelAtBorder {on|off}=on] + [-colors Color1 Color2 ...] [-color Index Color] + [-labels Label1 Label2 ...] [-label Index Label] + [-freeLabels NbOfLabels Label1 Label2 ...] + [-xy Left=0 Bottom=0] + [-uniform lightness hue_from hue_to] + -demo display a color scale with demonstration values + -colors set colors for all intervals + -color set color for specific interval + -uniform generate colors with the same lightness + -textpos horizontal label position relative to color scale bar + -labelAtBorder vertical label position relative to color interval; + at border means the value inbetween neighbor intervals, + at center means the center value within current interval + -labels set labels for all intervals + -freeLabels same as -labels but does not require + matching the number of intervals + -label set label for specific interval + -title set title + -reversed setup smooth color transition between intervals + -smoothTransition swap colorscale direction + -hueRange set hue angles corresponding to minimum and maximum values +)" /* [vcolorscale] */); + + addCmd ("vgraduatedtrihedron", VGraduatedTrihedron, /* [vgraduatedtrihedron] */ R"( +vgraduatedtrihedron : -on/-off [-xname Name] [-yname Name] [-zname Name] [-arrowlength Value] + [-namefont Name] [-valuesfont Name] + [-xdrawname on/off] [-ydrawname on/off] [-zdrawname on/off] + [-xnameoffset IntVal] [-ynameoffset IntVal] [-znameoffset IntVal] + [-xnamecolor Color] [-ynamecolor Color] [-znamecolor Color] + [-xdrawvalues on/off] [-ydrawvalues on/off] [-zdrawvalues on/off] + [-xvaluesoffset IntVal] [-yvaluesoffset IntVal] [-zvaluesoffset IntVal] + [-xcolor Color] [-ycolor Color] [-zcolor Color] + [-xdrawticks on/off] [-ydrawticks on/off] [-zdrawticks on/off] + [-xticks Number] [-yticks Number] [-zticks Number] + [-xticklength IntVal] [-yticklength IntVal] [-zticklength IntVal] + [-drawgrid on/off] [-drawaxes on/off] +Display or erase graduated trihedron + - xname, yname, zname - names of axes, default: X, Y, Z + - namefont - font of axes names. Default: Arial + - xnameoffset, ynameoffset, znameoffset - offset of name + from values or tickmarks or axis. Default: 30 + - xnamecolor, ynamecolor, znamecolor - colors of axes names + - xvaluesoffset, yvaluesoffset, zvaluesoffset - offset of values + from tickmarks or axis. Default: 10 + - valuesfont - font of axes values. Default: Arial + - xcolor, ycolor, zcolor - color of axis and values + - xticks, yticks, xzicks - number of tickmark on axes. Default: 5 + - xticklength, yticklength, xzicklength - length of tickmark on axes. Default: 10 +)" /* [vgraduatedtrihedron] */); + + addCmd ("vtile", VTile, /* [vtile] */ R"( +vtile [-totalSize W H] [-lowerLeft X Y] [-upperLeft X Y] [-tileSize W H] +Setup view to draw a tile (a part of virtual bigger viewport). + -totalSize the size of virtual bigger viewport + -tileSize tile size (the view size will be used if omitted) + -lowerLeft tile offset as lower left corner + -upperLeft tile offset as upper left corner +)" /* [vtile] */); + + addCmd ("vzlayer", VZLayer, /* [vzlayer] */ R"( +vzlayer [layerId] + [-add|-delete|-get|-settings] [-insertBefore AnotherLayer] [-insertAfter AnotherLayer] + [-origin X Y Z] [-cullDist Distance] [-cullSize Size] + [-enable|-disable {depthTest|depthWrite|depthClear|depthoffset}] + [-enable|-disable {positiveOffset|negativeOffset|textureenv|rayTracing}] +ZLayer list management + -add add new z layer to viewer and print its id + -insertBefore add new z layer and insert it before existing one + -insertAfter add new z layer and insert it after existing one + -delete delete z layer + -get print sequence of z layers + -settings print status of z layer settings + -disable disables given setting + -enable enables given setting +)" /* [vzlayer] */); + + addCmd ("vlayerline", VLayerLine, /* [vlayerline] */ R"( +vlayerline x1 y1 x2 y2 [linewidth=0.5] [linetype=0] [transparency=1.0] +)" /* [vlayerline] */); + + addCmd ("vgrid", VGrid, /* [vgrid] */ R"( +vgrid [off] [-type {rect|circ}] [-mode {line|point}] [-origin X Y] [-rotAngle Angle] [-zoffset DZ] + [-step X Y] [-size DX DY] + [-step StepRadius NbDivisions] [-radius Radius] +)" /* [vgrid] */); + + addCmd ("vpriviledgedplane", VPriviledgedPlane, /* [vpriviledgedplane] */ R"( +vpriviledgedplane [Ox Oy Oz Nx Ny Nz [Xx Xy Xz]] +Sets or prints viewer's priviledged plane geometry: + Ox, Oy, Oz - plane origin; + Nx, Ny, Nz - plane normal direction; + Xx, Xy, Xz - plane x-reference axis direction. +)" /* [vpriviledgedplane] */); + + addCmd ("vconvert", VConvert, /* [vconvert] */ R"( +vconvert v [Mode={window|view}] +vconvert x y [Mode={window|view|grid|ray}] +vconvert x y z [Mode={window|grid}] +Convert the given coordinates to window/view/model space: + - window - convert to window coordinates, pixels; + - view - convert to view projection plane; + - grid - convert to model coordinates, given on grid; + - ray - convert projection ray to model coordinates. +)" /* [vconvert] */); + + addCmd ("vfps", VFps, /* [vfps] */ R"( +vfps [framesNb=100] [-duration seconds] : estimate average frame rate for active view. +)" /* [vfps] */); + + addCmd ("vstereo", VStereo, /* [vstereo] */ R"( +vstereo [0|1] [-mode Mode] [-reverse {0|1}] + [-mirrorComposer] [-hmdfov2d AngleDegrees] [-unitFactor MetersFactor] + [-anaglyph Filter] +Control stereo output mode. Available modes for -mode: + quadBuffer OpenGL QuadBuffer stereo; + requires driver support; + should be called BEFORE vinit! + anaglyph Anaglyph glasses, filters for -anaglyph: + redCyan, redCyanSimple, yellowBlue, yellowBlueSimple, greenMagentaSimple. + rowInterlaced row-interlaced display + columnInterlaced column-interlaced display + chessBoard chess-board output + sideBySide horizontal pair + overUnder vertical pair + openVR OpenVR (HMD), extra options: + -mirrorComposer flag to mirror VR frame in the window (debug); + -unitFactor specifies meters scale factor for mapping VR input. +)" /* [vstereo] */); + + addCmd ("vmemgpu", VMemGpu, /* [vmemgpu] */ R"( +vmemgpu [f]: print system-dependent GPU memory information if available; +with f option returns free memory in bytes. +)" /* [vmemgpu] */); + + addCmd ("vreadpixel", VReadPixel, /* [vreadpixel] */ R"( +vreadpixel xPixel yPixel [{rgb|rgba|sRGB|sRGBa|depth|hls|rgbf|rgbaf}=rgba] [-name|-hex] +Read pixel value for active view. +)" /* [vreadpixel] */); + + addCmd ("diffimage", VDiffImage, /* [diffimage] */ R"( +diffimage imageFile1 imageFile2 [diffImageFile] + [-toleranceOfColor {0..1}=0] [-blackWhite {on|off}=off] [-borderFilter {on|off}=off] + [-display viewName prsName1 prsName2 prsNameDiff] [-exitOnClose] [-closeOnEscape] +Compare two images by content and generate difference image. +When -exitOnClose is specified, closing the view will exit application. +When -closeOnEscape is specified, view will be closed on pressing Escape. +)" /* [diffimage] */); + + addCmd ("vselect", VSelect, /* [vselect] */ R"( +vselect x1 y1 [x2 y2 [x3 y3 ... xn yn]] [-allowoverlap 0|1] + [-replace|-replaceextra|-xor|-add|-remove] +Emulate different types of selection: + 1) Single click selection. + 2) Selection with rectangle having corners at pixel positions (x1,y1) and (x2,y2). + 3) Selection with polygon having corners in pixel positions (x1,y1), (x2,y2),...,(xn,yn). + 4) -allowoverlap manages overlap and inclusion detection in rectangular and polygonal selection. + If the flag is set to 1, both sensitives that were included completely + and overlapped partially by defined rectangle or polygon will be detected, + otherwise algorithm will chose only fully included sensitives. + Default behavior is to detect only full inclusion + (partial inclusion - overlap - is not allowed by default). + 5) Selection scheme replace, replaceextra, xor, add or remove (replace by default). +)" /* [vselect] */); + + addCmd ("vmoveto", VMoveTo, /* [vmoveto] */ R"( +vmoveto [x y] [-reset] +Emulate cursor movement to pixel position (x,y). + -reset resets current highlighting. +)" /* [vmoveto] */); + + addCmd ("vselaxis", VSelectByAxis, /* [vselaxis] */ R"( +vselaxis x y z dx dy dz [-onlyTop 0|1] [-display Name] [-showNormal 0|1]" +Provides intersection by given axis and print result intersection points. + -onlyTop switches On/Off mode to find only top point or all; + -display Name displays intersecting axis and result intersection points for debug goals; + -showNormal adds displaying of normal in intersection point or not. +)" /* [vselaxis] */); + + addCmd ("vviewparams", VViewParams, /* [vviewparams] */ R"( +vviewparams [-args] [-scale [s]] + [-eye [x y z]] [-at [x y z]] [-up [x y z]] + [-proj [x y z]] [-center x y] [-size sx] +Manage current view parameters (camera orientation) or prints all +current values when called without argument. + -scale [s] prints or sets viewport relative scale + -eye [x y z] prints or sets eye location + -at [x y z] prints or sets center of look + -up [x y z] prints or sets direction of up vector + -proj [x y z] prints or sets direction of look + -center x y sets location of center of the screen in pixels + -size [sx] prints viewport projection width and height sizes + or changes the size of its maximum dimension + -args prints vviewparams arguments for restoring current view +)" /* [vviewparams] */); + + addCmd ("v2dmode", V2DMode, /* [v2dmode] */ R"( +v2dmode [-name viewName] [-mode {-on|-off}=-on] + name - name of existing view, if not defined, the active view is changed; + mode - switches On/Off rotation mode. +Set 2D mode of the active viewer manipulating. The following mouse and key actions are disabled: + - rotation of the view by 3rd mouse button with Ctrl active + - set view projection using key buttons: A/D/T/B/L/R for AXO, Reset, Top, Bottom, Left, Right +View camera position might be changed only by commands. +)" /* [v2dmode] */); + + addCmd ("vanimation", VAnimation, /* [vanimation] */ R"( +Alias for vanim +)" /* [vanimation] */); + + addCmd ("vanim", VAnimation, /* [vanim] */ R"( +List existing animations: + vanim + +Animation playback: + vanim name {-play|-resume|-pause|-stop} [playFrom [playDuration]] + [-speed Coeff] [-freeLook] [-noPauseOnClick] [-lockLoop] + + -speed playback speed (1.0 is normal speed) + -freeLook skip camera animations + -noPauseOnClick do not pause animation on mouse click + -lockLoop disable any interactions + +Animation definition: + vanim Name/sub/name [-clear] [-delete] + [start TimeSec] [duration TimeSec] + +Animation name defined in path-style (anim/name or anim.name) +specifies nested animations. +There is no syntax to explicitly add new animation, +and all non-existing animations within the name will be +implicitly created on first use (including parents). + +Each animation might define the SINGLE action (see below), +like camera transition, object transformation or custom callback. +Child animations can be used for defining concurrent actions. + +Camera animation: + vanim name -view [-eye1 X Y Z] [-eye2 X Y Z] + [-at1 X Y Z] [-at2 X Y Z] + [-up1 X Y Z] [-up2 X Y Z] + [-scale1 Scale] [-scale2 Scale] + -eyeX camera Eye positions pair (start and end) + -atX camera Center positions pair + -upX camera Up directions pair + -scaleX camera Scale factors pair + +Object animation: + vanim name -object [-loc1 X Y Z] [-loc2 X Y Z] + [-rot1 QX QY QZ QW] [-rot2 QX QY QZ QW] + [-scale1 Scale] [-scale2 Scale] + -locX object Location points pair (translation) + -rotX object Orientations pair (quaternions) + -scaleX object Scale factors pair (quaternions) + +Custom callback: + vanim name -invoke "Command Arg1 Arg2 %Pts %LocalPts %Normalized ArgN" + + %Pts overall animation presentation timestamp + %LocalPts local animation timestamp + %Normalized local animation normalized value in range 0..1 + +Video recording: + vanim name -record FileName [Width Height] [-fps FrameRate=24] + [-format Format] [-vcodec Codec] [-pix_fmt PixelFormat] + [-crf Value] [-preset Preset] + -fps video framerate + -format file format, container (matroska, etc.) + -vcodec video codec identifier (ffv1, mjpeg, etc.) + -pix_fmt image pixel format (yuv420p, rgb24, etc.) + -crf constant rate factor (specific to codec) + -preset codec parameters preset (specific to codec) +)" /* [vanim] */); + + addCmd ("vchangeselected", VChangeSelected, /* [vchangeselected] */ R"( +vchangeselected shape : Add shape to selection or remove one from it. +)" /* [vchangeselected] */); + + addCmd ("vnbselected", VNbSelected, /* [vnbselected] */ R"( +vnbselected : Returns number of selected objects in the interactive context. +)" /* [vnbselected] */); + + addCmd ("vcamera", VCamera, /* [vcamera] */ R"( +vcamera [PrsName] [-ortho] [-projtype] + [-persp] + [-fovy [Angle]] [-distance [Distance]] + [-stereo] [-leftEye] [-rightEye] + [-iod [Distance]] [-iodType [absolute|relative]] + [-zfocus [Value]] [-zfocusType [absolute|relative]] + [-fov2d [Angle]] [-lockZup {0|1}] + [-rotationMode {active|pick|pickCenter|cameraAt|scene}] + [-navigationMode {orbit|walk|flight}] + [-xrPose base|head=base] +Manages camera parameters. +Displays frustum when presentation name PrsName is specified. +Prints current value when option called without argument. + +Orthographic camera: + -ortho activate orthographic projection. + +Perspective camera: + -persp activate perspective projection (mono); + -fovy field of view in y axis, in degrees; + -fov2d field of view limit for 2d on-screen elements; + -distance distance of eye from camera center; + -lockZup lock Z up (turntable mode); + -rotationMode rotation mode (gravity point); + -navigationMode navigation mode. + +Stereoscopic camera: + -stereo perspective projection (stereo); + -leftEye perspective projection (left eye); + -rightEye perspective projection (right eye); + -iod intraocular distance value; + -iodType distance type, absolute or relative; + -zfocus stereographic focus value; + -zfocusType focus type, absolute or relative. +)" /* [vcamera] */); + + addCmd ("vautozfit", VAutoZFit, /* [vautozfit] */ R"( +vautozfit [on={1|0}] [scale] +Prints or changes parameters of automatic z-fit mode: + "on" - turns automatic z-fit on or off; + "scale" - specifies factor to scale computed z range. +)" /* [vautozfit] */); + + addCmd ("vzrange", VZRange, /* [vzrange] */ R"( +vzrange [znear] [zfar] +Applies provided znear/zfar to view or prints current values. +)" /* [vzrange] */); + + addCmd ("vsetviewsize", VSetViewSize, /* [vsetviewsize] */ R"( +vsetviewsize size +)" /* [vsetviewsize] */); + + addCmd ("vmoveview", VMoveView, /* [vmoveview] */ R"( +vmoveview Dx Dy Dz [Start = 1|0] +)" /* [vmoveview] */); + + addCmd ("vtranslateview", VTranslateView, /* [vtranslateview] */ R"( +vtranslateview Dx Dy Dz [Start = 1|0)] +)" /* [vtranslateview] */); + + addCmd ("vturnview", VTurnView, /* [vturnview] */ R"( +vturnview Ax Ay Az [Start = 1|0] +)" /* [vturnview] */); + + addCmd ("vtextureenv", VTextureEnv, /* [vtextureenv] */ R"( +vtextureenv {on|off} {image_file} + [{clamp|repeat} {decal|modulate} {nearest|bilinear|trilinear} ss st ts tt rot] +Enables or disables environment mapping in the 3D view, loading the texture from the given standard +or user-defined file and optionally applying texture mapping parameters. + ss, st - scale factors for s and t texture coordinates; + ts, tt - translation for s and t texture coordinates; + rot - texture rotation angle in degrees. +)" /* [vtextureenv] */); + + addCmd ("vhlr", VHLR, /* [vhlr] */ R"( +vhlr {on|off} [-showHidden={1|0}] [-algoType={algo|polyAlgo}] [-noupdate] +Hidden Line Removal algorithm. + -showHidden if set ON, hidden lines are drawn as dotted ones; + -algoType type of HLR algorithm: + 'algo' - exact HLR algorithm is applied; + 'polyAlgo' - polygonal HLR algorithm is applied. +)" /* [vhlr] */); + + addCmd ("vhlrtype", VHLRType, /* [vhlrtype] */ R"( +vhlrtype {algo|polyAlgo} [shape_1 ... shape_n] [-noupdate] +Changes the type of HLR algorithm using for shapes: + 'algo' - exact HLR algorithm is applied; + 'polyAlgo' - polygonal HLR algorithm is applied. +If shapes are not given - option is applied to all shapes in the view. +)" /* [vhlrtype] */); + + addCmd ("vclipplane", VClipPlane, /* [vclipplane] */ R"( +vclipplane planeName [{0|1}] + [-equation1 A B C D] + [-equation2 A B C D] + [-boxInterior MinX MinY MinZ MaxX MaxY MaxZ] + [-set|-unset|-setOverrideGlobal [objects|views]] + [-maxPlanes] + [-capping {0|1}] + [-color R G B] [-transparency Value] [-hatch {on|off|ID}] + [-texName Texture] [-texScale SX SY] [-texOrigin TX TY] + [-texRotate Angle] + [-useObjMaterial {0|1}] [-useObjTexture {0|1}] + [-useObjShader {0|1}] + +Clipping planes management: + -maxPlanes print plane limit for view; + -delete delete plane with given name; + {off|on|0|1} turn clipping on/off; + -set|-unset set/unset plane for Object or View list; + applied to active View when list is omitted; + -equation A B C D change plane equation; + -clone SourcePlane NewPlane clone the plane definition. + +Capping options: + -capping {off|on|0|1} turn capping on/off; + -color R G B set capping color; + -transparency Value set capping transparency 0..1; + -texName Texture set capping texture; + -texScale SX SY set capping tex scale; + -texOrigin TX TY set capping tex origin; + -texRotate Angle set capping tex rotation; + -hatch {on|off|ID} set capping hatching mask; + -useObjMaterial {off|on|0|1} use material of clipped object; + -useObjTexture {off|on|0|1} use texture of clipped object; + -useObjShader {off|on|0|1} use shader program of object. +)" /* [vclipplane] */); + + addCmd ("vdefaults", VDefaults, /* [vdefaults] */ R"( +vdefaults [-absDefl value] [-devCoeff value] [-angDefl value] + [-autoTriang {off/on | 0/1}] +)" /* [vdefaults] */); + + addCmd ("vlight", VLight, /* [vlight] */ R"( +vlight [lightName] [-noupdate] + [-clear|-defaults] [-layer Id] [-local|-global] [-disable|-enable] + [-type {ambient|directional|spotlight|positional}] [-name value] + [-position X Y Z] [-direction X Y Z] [-color colorName] [-intensity value] + [-headlight 0|1] [-castShadows 0|1] + [-range value] [-constAttenuation value] [-linearAttenuation value] + [-spotExponent value] [-spotAngle angleDeg] + [-smoothAngle value] [-smoothRadius value] + [-display] [-showName 1|0] [-showRange 1|0] [-prsZoomable 1|0] [-prsSize Value] + [-arcSize Value] + +Command manages light sources. Without arguments shows list of lights. +Arguments affecting the list of defined/active lights: + -clear remove all light sources; + -defaults defines two standard light sources; + -reset resets light source parameters to default values; + -type sets type of light source; + -name sets new name to light source; + -global assigns light source to all views (default state); + -local assigns light source to active view; + -zlayer assigns light source to specified Z-Layer. + +Ambient light parameters: + -color sets (normalized) light color; + -intensity sets intensity of light source, 1.0 by default; + affects also environment cubemap intensity. + +Point light parameters: + -color sets (normalized) light color; + -intensity sets PBR intensity; + -range sets clamping distance; + -constAtten (obsolete) sets constant attenuation factor; + -linearAtten (obsolete) sets linear attenuation factor; + -smoothRadius sets PBR smoothing radius. + +Directional light parameters: + -color sets (normalized) light color; + -intensity sets PBR intensity; + -direction sets direction; + -headlight sets headlight flag; + -castShadows enables/disables shadow casting; + -smoothAngle sets PBR smoothing angle (in degrees) within 0..90 range. + +Spot light parameters: + -color sets (normalized) light color; + -intensity sets PBR intensity; + -range sets clamping distance; + -position sets position; + -direction sets direction; + -spotAngle sets spotlight angle; + -spotExp sets spotlight exponenta; + -headlight sets headlight flag; + -constAtten (obsolete) sets constant attenuation factor; + -linearAtten (obsolete) sets linear attenuation factor. + +Light presentation parameters: + -display adds light source presentation; + -showName shows/hides the name of light source; 1 by default; + -showRange shows/hides the range of spot/positional light source; 1 by default; + -prsZoomable makes light presentation zoomable/non-zoomable; + -prsDraggable makes light presentation draggable/non-draggable; + -prsSize sets light presentation size; + -arcSize sets arc presentation size(in pixels) + for rotation directional light source; 25 by default. + +Examples: + vlight redlight -type POSITIONAL -headlight 1 -pos 0 1 1 -color RED + vlight redlight -delete +)" /* [vlight] */); + + addCmd ("vpbrenv", VPBREnvironment, /* [vpbrenv] */ R"( +vpbrenv -clear|-generate +Clears or generates PBR environment map of active view. + -clear clears PBR environment (fills by white color); + -generate generates PBR environment from current background cubemap. +)" /* [vpbrenv] */); + + addCmd ("vraytrace", VRenderParams, /* [vraytrace] */ R"( +vraytrace [0|1] : Turns on/off ray-tracing renderer. + 'vraytrace 0' alias for 'vrenderparams -raster'. + 'vraytrace 1' alias for 'vrenderparams -rayTrace'. +)" /* [vraytrace] */); + + addCmd ("vrenderparams", VRenderParams, /* [vrenderparams] */ R"( +Manages rendering parameters, affecting visual appearance, quality and performance. +Should be applied taking into account GPU hardware capabilities and performance. + +Common parameters: +vrenderparams [-raster] [-shadingModel {unlit|facet|gouraud|phong|pbr|pbr_facet}=gouraud] + [-msaa 0..8=0] [-rendScale scale=1] + [-resolution value=72] [-fontHinting {off|normal|light}=off] + [-fontAutoHinting {auto|force|disallow}=auto] + [-oit {off|weight|peel}] [-oit weighted [depthFactor=0.0]] [-oit peeling [nbLayers=4]] + [-shadows {on|off}=on] [-shadowMapResolution value=1024] [-shadowMapBias value=0.005] + [-depthPrePass {on|off}=off] [-alphaToCoverage {on|off}=on] + [-frustumCulling {on|off|noupdate}=on] [-lineFeather width=1.0] + [-sync {default|views}] [-reset] + -raster Disables GPU ray-tracing. + -shadingModel Controls shading model. + -msaa Specifies number of samples for MSAA. + -rendScale Rendering resolution scale factor (supersampling, alternative to MSAA). + -resolution Sets new pixels density (PPI) used as text scaling factor. + -fontHinting Enables/disables font hinting for better readability on low-resolution screens. + -fontAutoHinting Manages font autohinting. + -lineFeather Sets line feather factor while displaying mesh edges. + -alphaToCoverage Enables/disables alpha to coverage (needs MSAA). + -oit Enables/disables order-independent transparency (OIT) rendering; + off unordered transparency (but opaque objects implicitly draw first); + weighted weight OIT is managed by depth weight factor 0.0..1.0; + peeling depth peeling OIT is managed by number of peeling layers. + -shadows Enables/disables shadows rendering. + -shadowMapResolution Shadow texture map resolution. + -shadowMapBias Shadow map bias. + -depthPrePass Enables/disables depth pre-pass. + -frustumCulling Enables/disables objects frustum clipping or + sets state to check structures culled previously. + -sync Sets active View parameters as Viewer defaults / to other Views. + -reset Resets active View parameters to Viewer defaults. + +Diagnostic output (on-screen overlay): +vrenderparams [-perfCounters none|fps|cpu|layers|structures|groups|arrays|triangles|points + |gpuMem|frameTime|basic|extended|full|nofps|skipImmediate] + [-perfUpdateInterval nbSeconds=1] [-perfChart nbFrames=1] [-perfChartMax seconds=0.1] + -perfCounters Show/hide performance counters (flags can be combined). + -perfUpdateInterval Performance counters update interval. + -perfChart Show frame timers chart limited by specified number of frames. + -perfChartMax Maximum time in seconds with the chart. + +Ray-Tracing options: +vrenderparams [-rayTrace] [-rayDepth {0..10}=3] [-reflections {on|off}=off] + [-fsaa {on|off}=off] [-gleam {on|off}=off] [-env {on|off}=off] + [-gi {on|off}=off] [-brng {on|off}=off] + [-iss {on|off}=off] [-tileSize {1..4096}=32] [-nbTiles {64..1024}=256] + [-ignoreNormalMap {on|off}=off] [-twoSide {on|off}=off] + [-maxRad {value>0}=30.0] + [-aperture {value>=0}=0.0] [-focal {value>=0.0}=1.0] + [-exposure value=0.0] [-whitePoint value=1.0] [-toneMapping {disabled|filmic}=disabled] + -rayTrace Enables GPU ray-tracing. + -rayDepth Defines maximum ray-tracing depth. + -reflections Enables/disables specular reflections. + -fsaa Enables/disables adaptive anti-aliasing. + -gleam Enables/disables transparency shadow effects. + -gi Enables/disables global illumination effects (Path-Tracing). + -env Enables/disables environment map background. + -ignoreNormalMap Enables/disables normal map ignoring during path tracing. + -twoSide Enables/disables two-sided BSDF models (PT mode). + -iss Enables/disables adaptive screen sampling (PT mode). + -maxRad Value used for clamping radiance estimation (PT mode). + -tileSize Specifies size of screen tiles in ISS mode (32 by default). + -nbTiles Specifies number of screen tiles per Redraw in ISS mode (256 by default). + -aperture Aperture size of perspective camera for depth-of-field effect (0 disables DOF). + -focal Focal distance of perspective camera for depth-of-field effect. + -exposure Exposure value for tone mapping (0.0 value disables the effect). + -whitePoint White point value for filmic tone mapping. + -toneMapping Tone mapping mode (disabled, filmic). + +PBR environment baking parameters (advanced/debug): +vrenderparams [-pbrEnvPow2size {power>0}=9] [-pbrEnvSMLN {levels>1}=6] [-pbrEnvBP {0..1}=0.99] + [-pbrEnvBDSN {samples>0}=1024] [-pbrEnvBSSN {samples>0}=256] + -pbrEnvPow2size Controls size of IBL maps (real size can be calculates as 2^pbrenvpow2size). + -pbrEnvSMLN Controls number of mipmap levels used in specular IBL map. + -pbrEnvBDSN Controls number of samples in Monte-Carlo integration during + diffuse IBL map's sherical harmonics calculation. + -pbrEnvBSSN Controls maximum number of samples per mipmap level + in Monte-Carlo integration during specular IBL maps generation. + -pbrEnvBP Controls strength of samples number reducing + during specular IBL maps generation (1 disables reducing). + +Debug options: +vrenderparams [-issd {on|off}=off] [-rebuildGlsl on|off] + -issd Shows screen sampling distribution in ISS mode. + -rebuildGlsl Rebuild Ray-Tracing GLSL programs (for debugging). + -brng Enables/disables blocked RNG (fast coherent PT). +)" /* [vrenderparams] */); + + addCmd ("vstatprofiler", VStatProfiler, /* [vstatprofiler] */ R"( +vstatprofiler [fps|cpu|allLayers|layers|allstructures|structures|groups + |allArrays|fillArrays|lineArrays|pointArrays|textArrays + |triangles|points|geomMem|textureMem|frameMem + |elapsedFrame|cpuFrameAverage|cpuPickingAverage|cpuCullingAverage|cpuDynAverage + |cpuFrameMax|cpuPickingMax|cpuCullingMax|cpuDynMax] + [-noredraw] +Prints rendering statistics for specified counters or for all when unspecified. +Set '-noredraw' flag to avoid additional redraw call and use already collected values. +)" /* [vstatprofiler] */); + + addCmd ("vplace", VPlace, /* [vplace] */ R"( +vplace dx dy : Places the point (in pixels) at the center of the window +)" /* [vplace] */); + + addCmd ("vxrotate", VXRotate, /* [vxrotate] */ R"( +vxrotate +)" /* [vxrotate] */); + + addCmd ("vmanipulator", VManipulator, /* [vmanipulator] */ R"( +vmanipulator Name [-attach AISObject | -detach | ...] +Tool to create and manage AIS manipulators. +Options: + '-attach AISObject' attach manipulator to AISObject + '-adjustPosition {0|center|location|shapeLocation}' adjust position when attaching + '-adjustSize {0|1}' adjust size when attaching + '-enableModes {0|1}' enable modes when attaching + '-view {active | [name of view]}' display manipulator only in defined view, + by default it is displayed in all views of the current viewer + '-detach' detach manipulator + '-startTransform mouse_x mouse_y' - invoke start of transformation + '-transform mouse_x mouse_y' - invoke transformation + '-stopTransform [abort]' - invoke stop of transformation + '-move x y z' - move attached object + '-rotate x y z dx dy dz angle' - rotate attached object + '-scale factor' - scale attached object + '-autoActivate {0|1}' - set activation on detection + '-followTranslation {0|1}' - set following translation transform + '-followRotation {0|1}' - set following rotation transform + '-followDragging {0|1}' - set following dragging transform + '-gap value' - set gap between sub-parts + '-part axis mode {0|1}' - set visual part + '-parts axis mode {0|1}' - set visual part + '-pos x y z [nx ny nz [xx xy xz]' - set position of manipulator + '-size value' - set size of manipulator + '-zoomable {0|1}' - set zoom persistence +)" /* [vmanipulator] */); + + addCmd ("vselprops", VSelectionProperties, /* [vselprops] */ R"( +vselprops [dynHighlight|localDynHighlight|selHighlight|localSelHighlight] [options] +Customizes selection and dynamic highlight parameters for the whole interactive context: + -autoActivate {0|1} disables|enables default computation + and activation of global selection mode + -autoHighlight {0|1} disables|enables automatic highlighting in 3D Viewer + -highlightSelected {0|1} disables|enables highlighting of detected object in selected state + -pickStrategy {first|topmost} : defines picking strategy + 'first' to pick first acceptable (default) + 'topmost' to pick only topmost (and nothing, if topmost is rejected by filters) + -pixTol value sets up pixel tolerance + -depthTol {uniform|uniformpx} value : sets tolerance for sorting results by depth + -depthTol {sensfactor} use sensitive factor for sorting results by depth + -preferClosest {0|1} sets if depth should take precedence over priority while sorting results + -dispMode dispMode sets display mode for highlighting + -layer ZLayer sets ZLayer for highlighting + -color {name|r g b} sets highlight color + -transp value sets transparency coefficient for highlight + -material material sets highlight material + -print prints current state of all mentioned parameters +)" /* [vselprops] */); + + addCmd ("vhighlightselected", VSelectionProperties, /* [vhighlightselected] */ R"( +vhighlightselected [0|1] : alias for vselprops -highlightSelected. +)" /* [vhighlightselected] */); + + addCmd ("vseldump", VDumpSelectionImage, /* [vseldump] */ R"( +vseldump file -type {depth|unnormDepth|object|owner|selMode|entity|entityType|surfNormal}=depth + -pickedIndex Index=1 + [-xrPose base|head=base] +Generate an image based on detection results: + depth normalized depth values + unnormDepth unnormalized depth values + object color of detected object + owner color of detected owner + selMode color of selection mode + entity color of detected entity + entityType color of detected entity type + surfNormal normal direction values +)" /* [vseldump] */); + + addCmd ("vviewcube", VViewCube, /* [vviewcube] */ R"( +vviewcube name +Displays interactive view manipulation object. Options: + -reset reset geometric and visual attributes + -size Size adapted size of View Cube + -boxSize Size box size + -axes {0|1} show/hide axes (trihedron) + -edges {0|1} show/hide edges of View Cube + -vertices {0|1} show/hide vertices of View Cube + -Yup {0|1} -Zup {0|1} set Y-up or Z-up view orientation + -color Color color of View Cube + -boxColor Color box color + -boxSideColor Color box sides color + -boxEdgeColor Color box edges color + -boxCornerColor Color box corner color + -textColor Color color of side text of view cube + -innerColor Color inner box color + -transparency Value transparency of object within [0, 1] range + -boxTransparency Value transparency of box within [0, 1] range + -xAxisTextColor Color color of X axis label + -yAxisTextColor Color color of Y axis label + -zAxisTextColor Color color of Z axis label + -font Name font name + -fontHeight Value font height + -boxFacetExtension Value box facet extension + -boxEdgeGap Value gap between box edges and box sides + -boxEdgeMinSize Value minimal box edge size + -boxCornerMinSize Value minimal box corner size + -axesPadding Value padding between box and arrows + -roundRadius Value relative radius of corners of sides within [0.0, 0.5] range + -axesRadius Value radius of axes of the trihedron + -axesConeRadius Value radius of the cone (arrow) of the trihedron + -axesSphereRadius Value radius of the sphere (central point) of trihedron + -fixedAnimation {0|1} uninterruptible animation loop + -duration Seconds animation duration in seconds +)" /* [vviewcube] */); + + addCmd ("vcolorconvert", VColorConvert, /* [vcolorconvert] */ R"( +vcolorconvert {from|to} type C1 C2 C2 +vcolorconvert from type C1 C2 C2 : Converts color from specified color space to linear RGB +vcolorconvert to type R G B : Converts linear RGB color to specified color space +Type can be sRGB, HLS, Lab, or Lch. +)" /* [vcolorconvert] */); + + addCmd ("vcolordiff", VColorDiff, /* [vcolordiff] */ R"( +vcolordiff R1 G1 B1 R2 G2 B2 : returns CIEDE2000 color difference between two RGB colors. +)" /* [vcolordiff] */); + + addCmd ("vselbvhbuild", VSelBvhBuild, /* [vselbvhbuild] */ R"( +vselbvhbuild [{0|1}] [-nbThreads value] [-wait] +Turns on/off prebuilding of BVH within background thread(s). + -nbThreads number of threads, 1 by default; if < 1 then used (NbLogicalProcessors - 1); + -wait waits for building all of BVH. +)" /* [vselbvhbuild] */); } From 03eb96038e853c37a2229e59d0acb72f5dd0478d Mon Sep 17 00:00:00 2001 From: kgv Date: Thu, 2 Dec 2021 18:54:45 +0300 Subject: [PATCH 156/639] 0032709: Samples, MFC - remove samples Viewer2d, Viewer3d, Ocaf, Triangulation, Animation, Convert --- CMakeLists.txt | 10 +- .../CMakeLists.txt | 0 .../adm/win/vc10/ImportExport.vcxproj | 0 .../adm/win/vc10/ImportExport.vcxproj.filters | 0 .../res/ImportExport.rc | 0 .../res/Toolbar.bmp | Bin .../res/resource.h | 0 .../src/ColoredShapes.cpp | 0 .../src/ColoredShapes.h | 0 .../src/ImportExportApp.cpp | 0 .../src/ImportExportApp.h | 0 .../src/ImportExportDoc.cpp | 0 .../src/ImportExportDoc.h | 0 .../src/StdAfx.cpp | 0 .../src/StdAfx.h | 0 .../mfc/standard/03_Viewer2d/CMakeLists.txt | 54 - samples/mfc/standard/03_Viewer2d/README.txt | 16 - .../03_Viewer2d/adm/win/vc10/Viewer2d.vcxproj | 354 ----- .../adm/win/vc10/Viewer2d.vcxproj.filters | 55 - .../mfc/standard/03_Viewer2d/res/Toolbar.bmp | Bin 1318 -> 0 bytes .../mfc/standard/03_Viewer2d/res/Viewer2d.rc | 420 ------ .../mfc/standard/03_Viewer2d/res/resource.h | 122 -- .../mfc/standard/03_Viewer2d/src/StdAfx.cpp | 6 - samples/mfc/standard/03_Viewer2d/src/StdAfx.h | 158 --- .../standard/03_Viewer2d/src/Viewer2dApp.cpp | 75 - .../standard/03_Viewer2d/src/Viewer2dApp.h | 30 - .../standard/03_Viewer2d/src/Viewer2dDoc.cpp | 405 ------ .../standard/03_Viewer2d/src/Viewer2dDoc.h | 42 - .../{08_HLR => 04_HLR}/CMakeLists.txt | 0 .../standard/{08_HLR => 04_HLR}/README.txt | 0 .../adm/win/vc10/HLR.vcxproj | 0 .../adm/win/vc10/HLR.vcxproj.filters | 0 .../{08_HLR => 04_HLR}/res/AXOVIEWU.bmp | Bin .../{08_HLR => 04_HLR}/res/BACKVIEWD.bmp | Bin .../{08_HLR => 04_HLR}/res/BACKVIEWF.bmp | Bin .../{08_HLR => 04_HLR}/res/BACKVIEWU.bmp | Bin .../{08_HLR => 04_HLR}/res/BOTTOMVIEWD.bmp | Bin .../{08_HLR => 04_HLR}/res/BOTTOMVIEWF.bmp | Bin .../{08_HLR => 04_HLR}/res/BOTTOMVIEWU.bmp | Bin .../{08_HLR => 04_HLR}/res/ChildFrame2D.bmp | Bin .../{08_HLR => 04_HLR}/res/ChildFrame3D.bmp | Bin .../{08_HLR => 04_HLR}/res/FRONTVIEWD.bmp | Bin .../{08_HLR => 04_HLR}/res/FRONTVIEWF.bmp | Bin .../{08_HLR => 04_HLR}/res/FRONTVIEWU.bmp | Bin .../standard/{08_HLR => 04_HLR}/res/HLR.rc | 0 .../{08_HLR => 04_HLR}/res/LEFTVIEWD.bmp | Bin .../{08_HLR => 04_HLR}/res/LEFTVIEWF.bmp | Bin .../{08_HLR => 04_HLR}/res/LEFTVIEWU.bmp | Bin .../{08_HLR => 04_HLR}/res/RIGHTVIEWD.bmp | Bin .../{08_HLR => 04_HLR}/res/RIGHTVIEWF.bmp | Bin .../{08_HLR => 04_HLR}/res/RIGHTVIEWU.bmp | Bin .../{08_HLR => 04_HLR}/res/ToolBarObjects.bmp | Bin .../{08_HLR => 04_HLR}/res/Toolbar.bmp | Bin .../{08_HLR => 04_HLR}/res/axoviewd.bmp | Bin .../{08_HLR => 04_HLR}/res/axoviewf.bmp | Bin .../{08_HLR => 04_HLR}/res/dummyd.bmp | Bin .../{08_HLR => 04_HLR}/res/dummyf.bmp | Bin .../{08_HLR => 04_HLR}/res/dummyu.bmp | Bin .../{08_HLR => 04_HLR}/res/resource.h | 0 .../{08_HLR => 04_HLR}/res/topviewd.bmp | Bin .../{08_HLR => 04_HLR}/res/topviewf.bmp | Bin .../{08_HLR => 04_HLR}/res/topviewu.bmp | Bin .../{08_HLR => 04_HLR}/src/HLRApp.cpp | 0 .../standard/{08_HLR => 04_HLR}/src/HLRApp.h | 0 .../{08_HLR => 04_HLR}/src/HLRDoc.cpp | 0 .../standard/{08_HLR => 04_HLR}/src/HLRDoc.h | 0 .../{08_HLR => 04_HLR}/src/HLRView2D.cpp | 0 .../{08_HLR => 04_HLR}/src/HLRView2D.h | 0 .../{08_HLR => 04_HLR}/src/HLRView3D.cpp | 0 .../{08_HLR => 04_HLR}/src/HLRView3D.h | 0 .../src/SelectionDialog.cpp | 0 .../{08_HLR => 04_HLR}/src/SelectionDialog.h | 0 .../{08_HLR => 04_HLR}/src/StdAfx.cpp | 0 .../standard/{08_HLR => 04_HLR}/src/StdAfx.h | 0 .../mfc/standard/04_Viewer3d/CMakeLists.txt | 77 -- .../04_Viewer3d/adm/win/vc10/Viewer3d.vcxproj | 492 ------- .../adm/win/vc10/Viewer3d.vcxproj.filters | 133 -- .../standard/04_Viewer3d/res/AISToolbar.bmp | Bin 1718 -> 0 bytes .../mfc/standard/04_Viewer3d/res/AIS_TB.bmp | Bin 2118 -> 0 bytes .../mfc/standard/04_Viewer3d/res/Toolbar.bmp | Bin 6918 -> 0 bytes .../mfc/standard/04_Viewer3d/res/Viewer3d.rc | 563 -------- .../mfc/standard/04_Viewer3d/res/resource.h | 94 -- .../mfc/standard/04_Viewer3d/res/resource.hm | 4 - .../standard/04_Viewer3d/src/BoxRadius.cpp | 61 - .../mfc/standard/04_Viewer3d/src/BoxRadius.h | 49 - .../04_Viewer3d/src/ConvertClickToPoint.cxx | 27 - .../04_Viewer3d/src/DlgAttributes.cpp | 332 ----- .../standard/04_Viewer3d/src/DlgAttributes.h | 83 -- .../mfc/standard/04_Viewer3d/src/DlgIsos.cpp | 49 - .../mfc/standard/04_Viewer3d/src/DlgIsos.h | 52 - .../04_Viewer3d/src/ISession_Curve.cpp | 52 - .../standard/04_Viewer3d/src/ISession_Curve.h | 32 - .../04_Viewer3d/src/ModelClippingDlg.cpp | 298 ---- .../04_Viewer3d/src/ModelClippingDlg.h | 68 - .../04_Viewer3d/src/OCCDemo_Presentation.cpp | 329 ----- .../04_Viewer3d/src/OCCDemo_Presentation.h | 135 -- .../standard/04_Viewer3d/src/OffsetDlg.cpp | 314 ----- .../mfc/standard/04_Viewer3d/src/OffsetDlg.h | 60 - .../mfc/standard/04_Viewer3d/src/ScaleDlg.cpp | 188 --- .../mfc/standard/04_Viewer3d/src/ScaleDlg.h | 63 - .../04_Viewer3d/src/ShadingModelDlg.cpp | 70 - .../04_Viewer3d/src/ShadingModelDlg.h | 53 - samples/mfc/standard/04_Viewer3d/src/State.h | 3 - .../mfc/standard/04_Viewer3d/src/StdAfx.cpp | 5 - samples/mfc/standard/04_Viewer3d/src/StdAfx.h | 70 - .../src/TexturesExt_Presentation.cpp | 441 ------ .../src/TexturesExt_Presentation.h | 59 - .../standard/04_Viewer3d/src/TrihedronDlg.cpp | 291 ---- .../standard/04_Viewer3d/src/TrihedronDlg.h | 82 -- .../standard/04_Viewer3d/src/Viewer3dApp.cpp | 93 -- .../standard/04_Viewer3d/src/Viewer3dApp.h | 34 - .../standard/04_Viewer3d/src/Viewer3dDoc.cpp | 1039 -------------- .../standard/04_Viewer3d/src/Viewer3dDoc.h | 159 --- .../standard/04_Viewer3d/src/Viewer3dView.cpp | 1180 ---------------- .../standard/04_Viewer3d/src/Viewer3dView.h | 173 --- samples/mfc/standard/06_Ocaf/CMakeLists.txt | 70 - .../06_Ocaf/adm/win/vc10/Ocaf.vcxproj | 493 ------- .../06_Ocaf/adm/win/vc10/Ocaf.vcxproj.filters | 112 -- samples/mfc/standard/06_Ocaf/res/AIS_TB.bmp | Bin 838 -> 0 bytes .../mfc/standard/06_Ocaf/res/ActionsTB.bmp | Bin 658 -> 0 bytes samples/mfc/standard/06_Ocaf/res/Ocaf.rc | 390 ------ samples/mfc/standard/06_Ocaf/res/Plugin | 44 - samples/mfc/standard/06_Ocaf/res/Resources | 15 - samples/mfc/standard/06_Ocaf/res/Toolbar.bmp | Bin 598 -> 0 bytes .../mfc/standard/06_Ocaf/res/UndoRedoTB.bmp | Bin 358 -> 0 bytes samples/mfc/standard/06_Ocaf/res/resource.h | 35 - .../mfc/standard/06_Ocaf/src/DebugBrowser.hxx | 113 -- .../mfc/standard/06_Ocaf/src/NewBoxDlg.cpp | 72 - samples/mfc/standard/06_Ocaf/src/NewBoxDlg.h | 53 - .../mfc/standard/06_Ocaf/src/NewCylDlg.cpp | 69 - samples/mfc/standard/06_Ocaf/src/NewCylDlg.h | 52 - .../06_Ocaf/src/OCAFSample_CommonDriver.cxx | 94 -- .../06_Ocaf/src/OCAFSample_CommonDriver.hxx | 37 - .../06_Ocaf/src/OCAFSample_Driver.hxx | 44 - samples/mfc/standard/06_Ocaf/src/OcafApp.cpp | 153 --- samples/mfc/standard/06_Ocaf/src/OcafApp.h | 45 - samples/mfc/standard/06_Ocaf/src/OcafDoc.cpp | 1209 ----------------- samples/mfc/standard/06_Ocaf/src/OcafDoc.h | 86 -- .../mfc/standard/06_Ocaf/src/OcafMainFrm.cpp | 96 -- .../mfc/standard/06_Ocaf/src/OcafMainFrm.h | 61 - samples/mfc/standard/06_Ocaf/src/StdAfx.cpp | 6 - samples/mfc/standard/06_Ocaf/src/StdAfx.h | 153 --- .../06_Ocaf/src/TOcafFunction_BoxDriver.cxx | 122 -- .../06_Ocaf/src/TOcafFunction_BoxDriver.hxx | 49 - .../06_Ocaf/src/TOcafFunction_CutDriver.cxx | 143 -- .../06_Ocaf/src/TOcafFunction_CutDriver.hxx | 49 - .../06_Ocaf/src/TOcafFunction_CylDriver.cxx | 116 -- .../06_Ocaf/src/TOcafFunction_CylDriver.hxx | 49 - .../06_Ocaf/src/TOcaf_Application.cxx | 39 - .../06_Ocaf/src/TOcaf_Application.hxx | 38 - .../standard/06_Ocaf/src/TOcaf_Commands.cxx | 357 ----- .../standard/06_Ocaf/src/TOcaf_Commands.hxx | 85 -- .../standard/07_Triangulation/CMakeLists.txt | 60 - .../adm/win/vc10/Triangulation.vcxproj | 321 ----- .../win/vc10/Triangulation.vcxproj.filters | 67 - .../standard/07_Triangulation/res/RCa05792 | Bin 12346 -> 0 bytes .../standard/07_Triangulation/res/Toolbar.bmp | Bin 2358 -> 0 bytes .../07_Triangulation/res/Triangulation.rc | 232 ---- .../standard/07_Triangulation/res/resource.h | 28 - .../07_Triangulation/src/ISession_Curve.cpp | 52 - .../07_Triangulation/src/ISession_Curve.h | 32 - .../src/OCCDemo_Presentation.cpp | 331 ----- .../src/OCCDemo_Presentation.h | 135 -- .../standard/07_Triangulation/src/StdAfx.cpp | 6 - .../standard/07_Triangulation/src/StdAfx.h | 113 -- .../src/Tesselate_Presentation.cpp | 439 ------ .../src/Tesselate_Presentation.h | 34 - .../07_Triangulation/src/TriangulationApp.cpp | 77 -- .../07_Triangulation/src/TriangulationApp.h | 32 - .../07_Triangulation/src/TriangulationDoc.cpp | 418 ------ .../07_Triangulation/src/TriangulationDoc.h | 63 - .../mfc/standard/09_Animation/CMakeLists.txt | 61 - .../adm/win/vc10/Animation.vcxproj | 409 ------ .../adm/win/vc10/Animation.vcxproj.filters | 82 -- .../standard/09_Animation/res/Animation.rc | 271 ---- .../mfc/standard/09_Animation/res/Toolbar.bmp | Bin 2278 -> 0 bytes .../mfc/standard/09_Animation/res/child2.bmp | Bin 2358 -> 0 bytes .../mfc/standard/09_Animation/res/resource.h | 56 - .../09_Animation/src/AnimationApp.cpp | 99 -- .../standard/09_Animation/src/AnimationApp.h | 38 - .../09_Animation/src/AnimationDoc.cpp | 344 ----- .../standard/09_Animation/src/AnimationDoc.h | 67 - .../09_Animation/src/AnimationView3D.cpp | 568 -------- .../09_Animation/src/AnimationView3D.h | 173 --- .../mfc/standard/09_Animation/src/Fonc.cxx | 96 -- .../mfc/standard/09_Animation/src/Fonc.hxx | 46 - .../09_Animation/src/ShadingDialog.cpp | 97 -- .../standard/09_Animation/src/ShadingDialog.h | 56 - .../mfc/standard/09_Animation/src/StdAfx.cpp | 6 - .../mfc/standard/09_Animation/src/StdAfx.h | 214 --- .../09_Animation/src/ThreadDialog.cpp | 74 - .../standard/09_Animation/src/ThreadDialog.h | 54 - .../mfc/standard/10_Convert/CMakeLists.txt | 83 -- .../10_Convert/adm/win/vc10/Convert.vcxproj | 467 ------- .../adm/win/vc10/Convert.vcxproj.filters | 112 -- .../10_Convert/src/Convert_Presentation.cpp | 459 ------- .../10_Convert/src/Convert_Presentation.h | 55 - .../src/ISession/ISession_Curve.cpp | 52 - .../10_Convert/src/ISession/ISession_Curve.h | 32 - .../10_Convert/src/OCCDemo_Presentation.cpp | 324 ----- .../10_Convert/src/OCCDemo_Presentation.h | 134 -- .../standard/10_Convert/src/WNT/MainFrm.cpp | 113 -- .../mfc/standard/10_Convert/src/WNT/MainFrm.h | 59 - .../standard/10_Convert/src/WNT/OCCDemo.cpp | 178 --- .../mfc/standard/10_Convert/src/WNT/OCCDemo.h | 57 - .../standard/10_Convert/src/WNT/OCCDemo.rc | 388 ------ .../10_Convert/src/WNT/OCCDemoDoc.cpp | 243 ---- .../standard/10_Convert/src/WNT/OCCDemoDoc.h | 86 -- .../10_Convert/src/WNT/OCCDemoView.cpp | 552 -------- .../standard/10_Convert/src/WNT/OCCDemoView.h | 144 -- .../10_Convert/src/WNT/ResultDialog.cpp | 206 --- .../10_Convert/src/WNT/ResultDialog.h | 67 - .../standard/10_Convert/src/WNT/StdAfx.cpp | 6 - .../mfc/standard/10_Convert/src/WNT/StdAfx.h | 41 - .../10_Convert/src/WNT/res/OCCDemo.ico | Bin 3774 -> 0 bytes .../10_Convert/src/WNT/res/OCCDemo.rc2 | 1 - .../10_Convert/src/WNT/res/logopen.bmp | Bin 58456 -> 0 bytes .../10_Convert/src/WNT/res/occlogo.bmp | Bin 9190 -> 0 bytes .../10_Convert/src/WNT/res/toolbar.bmp | Bin 1558 -> 0 bytes .../10_Convert/src/WNT/res/toolbar1.bmp | Bin 3558 -> 0 bytes .../standard/10_Convert/src/WNT/resource.h | 30 - samples/mfc/standard/All-vc10.sln | 64 +- samples/mfc/standard/All-vc11.sln | 64 +- samples/mfc/standard/All-vc12.sln | 64 +- samples/mfc/standard/All-vc14.sln | 64 +- samples/mfc/standard/All-vc141.sln | 64 +- samples/mfc/standard/All-vc142.sln | 64 +- .../Common/Primitive/Sample2D_Face.cpp | 440 ------ .../standard/Common/Primitive/Sample2D_Face.h | 81 -- .../Common/Primitive/Sample2D_Image.cpp | 49 - .../Common/Primitive/Sample2D_Image.h | 68 - .../Common/Primitive/Sample2D_Markers.cpp | 57 - .../Common/Primitive/Sample2D_Markers.h | 71 - samples/mfc/standard/Common/User_Cylinder.cxx | 478 ------- samples/mfc/standard/Common/User_Cylinder.hxx | 78 -- samples/mfc/standard/ReadMe.md | 12 +- samples/mfc/standard/mfcsample/CMakeLists.txt | 15 - .../mfcsample/adm/win/vc10/mfcsample.vcxproj | 53 - .../adm/win/vc10/mfcsample.vcxproj.filters | 31 - 239 files changed, 17 insertions(+), 24543 deletions(-) rename samples/mfc/standard/{05_ImportExport => 03_ImportExport}/CMakeLists.txt (100%) rename samples/mfc/standard/{05_ImportExport => 03_ImportExport}/adm/win/vc10/ImportExport.vcxproj (100%) rename samples/mfc/standard/{05_ImportExport => 03_ImportExport}/adm/win/vc10/ImportExport.vcxproj.filters (100%) rename samples/mfc/standard/{05_ImportExport => 03_ImportExport}/res/ImportExport.rc (100%) mode change 100755 => 100644 rename samples/mfc/standard/{05_ImportExport => 03_ImportExport}/res/Toolbar.bmp (100%) mode change 100755 => 100644 rename samples/mfc/standard/{05_ImportExport => 03_ImportExport}/res/resource.h (100%) mode change 100755 => 100644 rename samples/mfc/standard/{05_ImportExport => 03_ImportExport}/src/ColoredShapes.cpp (100%) mode change 100755 => 100644 rename samples/mfc/standard/{05_ImportExport => 03_ImportExport}/src/ColoredShapes.h (100%) mode change 100755 => 100644 rename samples/mfc/standard/{05_ImportExport => 03_ImportExport}/src/ImportExportApp.cpp (100%) mode change 100755 => 100644 rename samples/mfc/standard/{05_ImportExport => 03_ImportExport}/src/ImportExportApp.h (100%) mode change 100755 => 100644 rename samples/mfc/standard/{05_ImportExport => 03_ImportExport}/src/ImportExportDoc.cpp (100%) mode change 100755 => 100644 rename samples/mfc/standard/{05_ImportExport => 03_ImportExport}/src/ImportExportDoc.h (100%) mode change 100755 => 100644 rename samples/mfc/standard/{05_ImportExport => 03_ImportExport}/src/StdAfx.cpp (100%) mode change 100755 => 100644 rename samples/mfc/standard/{05_ImportExport => 03_ImportExport}/src/StdAfx.h (100%) mode change 100755 => 100644 delete mode 100644 samples/mfc/standard/03_Viewer2d/CMakeLists.txt delete mode 100644 samples/mfc/standard/03_Viewer2d/README.txt delete mode 100644 samples/mfc/standard/03_Viewer2d/adm/win/vc10/Viewer2d.vcxproj delete mode 100644 samples/mfc/standard/03_Viewer2d/adm/win/vc10/Viewer2d.vcxproj.filters delete mode 100755 samples/mfc/standard/03_Viewer2d/res/Toolbar.bmp delete mode 100755 samples/mfc/standard/03_Viewer2d/res/Viewer2d.rc delete mode 100755 samples/mfc/standard/03_Viewer2d/res/resource.h delete mode 100755 samples/mfc/standard/03_Viewer2d/src/StdAfx.cpp delete mode 100755 samples/mfc/standard/03_Viewer2d/src/StdAfx.h delete mode 100755 samples/mfc/standard/03_Viewer2d/src/Viewer2dApp.cpp delete mode 100755 samples/mfc/standard/03_Viewer2d/src/Viewer2dApp.h delete mode 100755 samples/mfc/standard/03_Viewer2d/src/Viewer2dDoc.cpp delete mode 100755 samples/mfc/standard/03_Viewer2d/src/Viewer2dDoc.h rename samples/mfc/standard/{08_HLR => 04_HLR}/CMakeLists.txt (100%) rename samples/mfc/standard/{08_HLR => 04_HLR}/README.txt (100%) rename samples/mfc/standard/{08_HLR => 04_HLR}/adm/win/vc10/HLR.vcxproj (100%) rename samples/mfc/standard/{08_HLR => 04_HLR}/adm/win/vc10/HLR.vcxproj.filters (100%) rename samples/mfc/standard/{08_HLR => 04_HLR}/res/AXOVIEWU.bmp (100%) mode change 100755 => 100644 rename samples/mfc/standard/{08_HLR => 04_HLR}/res/BACKVIEWD.bmp (100%) mode change 100755 => 100644 rename samples/mfc/standard/{08_HLR => 04_HLR}/res/BACKVIEWF.bmp (100%) mode change 100755 => 100644 rename samples/mfc/standard/{08_HLR => 04_HLR}/res/BACKVIEWU.bmp (100%) mode change 100755 => 100644 rename samples/mfc/standard/{08_HLR => 04_HLR}/res/BOTTOMVIEWD.bmp (100%) mode change 100755 => 100644 rename samples/mfc/standard/{08_HLR => 04_HLR}/res/BOTTOMVIEWF.bmp (100%) mode change 100755 => 100644 rename samples/mfc/standard/{08_HLR => 04_HLR}/res/BOTTOMVIEWU.bmp (100%) mode change 100755 => 100644 rename samples/mfc/standard/{08_HLR => 04_HLR}/res/ChildFrame2D.bmp (100%) mode change 100755 => 100644 rename samples/mfc/standard/{08_HLR => 04_HLR}/res/ChildFrame3D.bmp (100%) mode change 100755 => 100644 rename samples/mfc/standard/{08_HLR => 04_HLR}/res/FRONTVIEWD.bmp (100%) mode change 100755 => 100644 rename samples/mfc/standard/{08_HLR => 04_HLR}/res/FRONTVIEWF.bmp (100%) mode change 100755 => 100644 rename samples/mfc/standard/{08_HLR => 04_HLR}/res/FRONTVIEWU.bmp (100%) mode change 100755 => 100644 rename samples/mfc/standard/{08_HLR => 04_HLR}/res/HLR.rc (100%) mode change 100755 => 100644 rename samples/mfc/standard/{08_HLR => 04_HLR}/res/LEFTVIEWD.bmp (100%) mode change 100755 => 100644 rename samples/mfc/standard/{08_HLR => 04_HLR}/res/LEFTVIEWF.bmp (100%) mode change 100755 => 100644 rename samples/mfc/standard/{08_HLR => 04_HLR}/res/LEFTVIEWU.bmp (100%) mode change 100755 => 100644 rename samples/mfc/standard/{08_HLR => 04_HLR}/res/RIGHTVIEWD.bmp (100%) mode change 100755 => 100644 rename samples/mfc/standard/{08_HLR => 04_HLR}/res/RIGHTVIEWF.bmp (100%) mode change 100755 => 100644 rename samples/mfc/standard/{08_HLR => 04_HLR}/res/RIGHTVIEWU.bmp (100%) mode change 100755 => 100644 rename samples/mfc/standard/{08_HLR => 04_HLR}/res/ToolBarObjects.bmp (100%) mode change 100755 => 100644 rename samples/mfc/standard/{08_HLR => 04_HLR}/res/Toolbar.bmp (100%) mode change 100755 => 100644 rename samples/mfc/standard/{08_HLR => 04_HLR}/res/axoviewd.bmp (100%) mode change 100755 => 100644 rename samples/mfc/standard/{08_HLR => 04_HLR}/res/axoviewf.bmp (100%) mode change 100755 => 100644 rename samples/mfc/standard/{08_HLR => 04_HLR}/res/dummyd.bmp (100%) mode change 100755 => 100644 rename samples/mfc/standard/{08_HLR => 04_HLR}/res/dummyf.bmp (100%) mode change 100755 => 100644 rename samples/mfc/standard/{08_HLR => 04_HLR}/res/dummyu.bmp (100%) mode change 100755 => 100644 rename samples/mfc/standard/{08_HLR => 04_HLR}/res/resource.h (100%) mode change 100755 => 100644 rename samples/mfc/standard/{08_HLR => 04_HLR}/res/topviewd.bmp (100%) mode change 100755 => 100644 rename samples/mfc/standard/{08_HLR => 04_HLR}/res/topviewf.bmp (100%) mode change 100755 => 100644 rename samples/mfc/standard/{08_HLR => 04_HLR}/res/topviewu.bmp (100%) mode change 100755 => 100644 rename samples/mfc/standard/{08_HLR => 04_HLR}/src/HLRApp.cpp (100%) mode change 100755 => 100644 rename samples/mfc/standard/{08_HLR => 04_HLR}/src/HLRApp.h (100%) mode change 100755 => 100644 rename samples/mfc/standard/{08_HLR => 04_HLR}/src/HLRDoc.cpp (100%) mode change 100755 => 100644 rename samples/mfc/standard/{08_HLR => 04_HLR}/src/HLRDoc.h (100%) mode change 100755 => 100644 rename samples/mfc/standard/{08_HLR => 04_HLR}/src/HLRView2D.cpp (100%) mode change 100755 => 100644 rename samples/mfc/standard/{08_HLR => 04_HLR}/src/HLRView2D.h (100%) mode change 100755 => 100644 rename samples/mfc/standard/{08_HLR => 04_HLR}/src/HLRView3D.cpp (100%) mode change 100755 => 100644 rename samples/mfc/standard/{08_HLR => 04_HLR}/src/HLRView3D.h (100%) mode change 100755 => 100644 rename samples/mfc/standard/{08_HLR => 04_HLR}/src/SelectionDialog.cpp (100%) rename samples/mfc/standard/{08_HLR => 04_HLR}/src/SelectionDialog.h (100%) mode change 100755 => 100644 rename samples/mfc/standard/{08_HLR => 04_HLR}/src/StdAfx.cpp (100%) mode change 100755 => 100644 rename samples/mfc/standard/{08_HLR => 04_HLR}/src/StdAfx.h (100%) mode change 100755 => 100644 delete mode 100644 samples/mfc/standard/04_Viewer3d/CMakeLists.txt delete mode 100644 samples/mfc/standard/04_Viewer3d/adm/win/vc10/Viewer3d.vcxproj delete mode 100644 samples/mfc/standard/04_Viewer3d/adm/win/vc10/Viewer3d.vcxproj.filters delete mode 100644 samples/mfc/standard/04_Viewer3d/res/AISToolbar.bmp delete mode 100755 samples/mfc/standard/04_Viewer3d/res/AIS_TB.bmp delete mode 100755 samples/mfc/standard/04_Viewer3d/res/Toolbar.bmp delete mode 100755 samples/mfc/standard/04_Viewer3d/res/Viewer3d.rc delete mode 100755 samples/mfc/standard/04_Viewer3d/res/resource.h delete mode 100644 samples/mfc/standard/04_Viewer3d/res/resource.hm delete mode 100755 samples/mfc/standard/04_Viewer3d/src/BoxRadius.cpp delete mode 100755 samples/mfc/standard/04_Viewer3d/src/BoxRadius.h delete mode 100755 samples/mfc/standard/04_Viewer3d/src/ConvertClickToPoint.cxx delete mode 100755 samples/mfc/standard/04_Viewer3d/src/DlgAttributes.cpp delete mode 100755 samples/mfc/standard/04_Viewer3d/src/DlgAttributes.h delete mode 100755 samples/mfc/standard/04_Viewer3d/src/DlgIsos.cpp delete mode 100755 samples/mfc/standard/04_Viewer3d/src/DlgIsos.h delete mode 100755 samples/mfc/standard/04_Viewer3d/src/ISession_Curve.cpp delete mode 100755 samples/mfc/standard/04_Viewer3d/src/ISession_Curve.h delete mode 100755 samples/mfc/standard/04_Viewer3d/src/ModelClippingDlg.cpp delete mode 100755 samples/mfc/standard/04_Viewer3d/src/ModelClippingDlg.h delete mode 100755 samples/mfc/standard/04_Viewer3d/src/OCCDemo_Presentation.cpp delete mode 100755 samples/mfc/standard/04_Viewer3d/src/OCCDemo_Presentation.h delete mode 100755 samples/mfc/standard/04_Viewer3d/src/OffsetDlg.cpp delete mode 100755 samples/mfc/standard/04_Viewer3d/src/OffsetDlg.h delete mode 100755 samples/mfc/standard/04_Viewer3d/src/ScaleDlg.cpp delete mode 100755 samples/mfc/standard/04_Viewer3d/src/ScaleDlg.h delete mode 100755 samples/mfc/standard/04_Viewer3d/src/ShadingModelDlg.cpp delete mode 100755 samples/mfc/standard/04_Viewer3d/src/ShadingModelDlg.h delete mode 100755 samples/mfc/standard/04_Viewer3d/src/State.h delete mode 100755 samples/mfc/standard/04_Viewer3d/src/StdAfx.cpp delete mode 100755 samples/mfc/standard/04_Viewer3d/src/StdAfx.h delete mode 100755 samples/mfc/standard/04_Viewer3d/src/TexturesExt_Presentation.cpp delete mode 100755 samples/mfc/standard/04_Viewer3d/src/TexturesExt_Presentation.h delete mode 100755 samples/mfc/standard/04_Viewer3d/src/TrihedronDlg.cpp delete mode 100755 samples/mfc/standard/04_Viewer3d/src/TrihedronDlg.h delete mode 100755 samples/mfc/standard/04_Viewer3d/src/Viewer3dApp.cpp delete mode 100755 samples/mfc/standard/04_Viewer3d/src/Viewer3dApp.h delete mode 100755 samples/mfc/standard/04_Viewer3d/src/Viewer3dDoc.cpp delete mode 100755 samples/mfc/standard/04_Viewer3d/src/Viewer3dDoc.h delete mode 100755 samples/mfc/standard/04_Viewer3d/src/Viewer3dView.cpp delete mode 100755 samples/mfc/standard/04_Viewer3d/src/Viewer3dView.h delete mode 100644 samples/mfc/standard/06_Ocaf/CMakeLists.txt delete mode 100644 samples/mfc/standard/06_Ocaf/adm/win/vc10/Ocaf.vcxproj delete mode 100644 samples/mfc/standard/06_Ocaf/adm/win/vc10/Ocaf.vcxproj.filters delete mode 100755 samples/mfc/standard/06_Ocaf/res/AIS_TB.bmp delete mode 100755 samples/mfc/standard/06_Ocaf/res/ActionsTB.bmp delete mode 100755 samples/mfc/standard/06_Ocaf/res/Ocaf.rc delete mode 100755 samples/mfc/standard/06_Ocaf/res/Plugin delete mode 100755 samples/mfc/standard/06_Ocaf/res/Resources delete mode 100755 samples/mfc/standard/06_Ocaf/res/Toolbar.bmp delete mode 100755 samples/mfc/standard/06_Ocaf/res/UndoRedoTB.bmp delete mode 100755 samples/mfc/standard/06_Ocaf/res/resource.h delete mode 100755 samples/mfc/standard/06_Ocaf/src/DebugBrowser.hxx delete mode 100755 samples/mfc/standard/06_Ocaf/src/NewBoxDlg.cpp delete mode 100755 samples/mfc/standard/06_Ocaf/src/NewBoxDlg.h delete mode 100755 samples/mfc/standard/06_Ocaf/src/NewCylDlg.cpp delete mode 100755 samples/mfc/standard/06_Ocaf/src/NewCylDlg.h delete mode 100755 samples/mfc/standard/06_Ocaf/src/OCAFSample_CommonDriver.cxx delete mode 100755 samples/mfc/standard/06_Ocaf/src/OCAFSample_CommonDriver.hxx delete mode 100755 samples/mfc/standard/06_Ocaf/src/OCAFSample_Driver.hxx delete mode 100755 samples/mfc/standard/06_Ocaf/src/OcafApp.cpp delete mode 100755 samples/mfc/standard/06_Ocaf/src/OcafApp.h delete mode 100755 samples/mfc/standard/06_Ocaf/src/OcafDoc.cpp delete mode 100755 samples/mfc/standard/06_Ocaf/src/OcafDoc.h delete mode 100755 samples/mfc/standard/06_Ocaf/src/OcafMainFrm.cpp delete mode 100755 samples/mfc/standard/06_Ocaf/src/OcafMainFrm.h delete mode 100755 samples/mfc/standard/06_Ocaf/src/StdAfx.cpp delete mode 100755 samples/mfc/standard/06_Ocaf/src/StdAfx.h delete mode 100755 samples/mfc/standard/06_Ocaf/src/TOcafFunction_BoxDriver.cxx delete mode 100755 samples/mfc/standard/06_Ocaf/src/TOcafFunction_BoxDriver.hxx delete mode 100755 samples/mfc/standard/06_Ocaf/src/TOcafFunction_CutDriver.cxx delete mode 100755 samples/mfc/standard/06_Ocaf/src/TOcafFunction_CutDriver.hxx delete mode 100755 samples/mfc/standard/06_Ocaf/src/TOcafFunction_CylDriver.cxx delete mode 100755 samples/mfc/standard/06_Ocaf/src/TOcafFunction_CylDriver.hxx delete mode 100755 samples/mfc/standard/06_Ocaf/src/TOcaf_Application.cxx delete mode 100755 samples/mfc/standard/06_Ocaf/src/TOcaf_Application.hxx delete mode 100755 samples/mfc/standard/06_Ocaf/src/TOcaf_Commands.cxx delete mode 100755 samples/mfc/standard/06_Ocaf/src/TOcaf_Commands.hxx delete mode 100644 samples/mfc/standard/07_Triangulation/CMakeLists.txt delete mode 100644 samples/mfc/standard/07_Triangulation/adm/win/vc10/Triangulation.vcxproj delete mode 100644 samples/mfc/standard/07_Triangulation/adm/win/vc10/Triangulation.vcxproj.filters delete mode 100755 samples/mfc/standard/07_Triangulation/res/RCa05792 delete mode 100755 samples/mfc/standard/07_Triangulation/res/Toolbar.bmp delete mode 100755 samples/mfc/standard/07_Triangulation/res/Triangulation.rc delete mode 100755 samples/mfc/standard/07_Triangulation/res/resource.h delete mode 100755 samples/mfc/standard/07_Triangulation/src/ISession_Curve.cpp delete mode 100755 samples/mfc/standard/07_Triangulation/src/ISession_Curve.h delete mode 100755 samples/mfc/standard/07_Triangulation/src/OCCDemo_Presentation.cpp delete mode 100755 samples/mfc/standard/07_Triangulation/src/OCCDemo_Presentation.h delete mode 100755 samples/mfc/standard/07_Triangulation/src/StdAfx.cpp delete mode 100755 samples/mfc/standard/07_Triangulation/src/StdAfx.h delete mode 100755 samples/mfc/standard/07_Triangulation/src/Tesselate_Presentation.cpp delete mode 100755 samples/mfc/standard/07_Triangulation/src/Tesselate_Presentation.h delete mode 100755 samples/mfc/standard/07_Triangulation/src/TriangulationApp.cpp delete mode 100755 samples/mfc/standard/07_Triangulation/src/TriangulationApp.h delete mode 100755 samples/mfc/standard/07_Triangulation/src/TriangulationDoc.cpp delete mode 100755 samples/mfc/standard/07_Triangulation/src/TriangulationDoc.h delete mode 100644 samples/mfc/standard/09_Animation/CMakeLists.txt delete mode 100644 samples/mfc/standard/09_Animation/adm/win/vc10/Animation.vcxproj delete mode 100644 samples/mfc/standard/09_Animation/adm/win/vc10/Animation.vcxproj.filters delete mode 100755 samples/mfc/standard/09_Animation/res/Animation.rc delete mode 100755 samples/mfc/standard/09_Animation/res/Toolbar.bmp delete mode 100755 samples/mfc/standard/09_Animation/res/child2.bmp delete mode 100755 samples/mfc/standard/09_Animation/res/resource.h delete mode 100755 samples/mfc/standard/09_Animation/src/AnimationApp.cpp delete mode 100755 samples/mfc/standard/09_Animation/src/AnimationApp.h delete mode 100755 samples/mfc/standard/09_Animation/src/AnimationDoc.cpp delete mode 100755 samples/mfc/standard/09_Animation/src/AnimationDoc.h delete mode 100755 samples/mfc/standard/09_Animation/src/AnimationView3D.cpp delete mode 100755 samples/mfc/standard/09_Animation/src/AnimationView3D.h delete mode 100755 samples/mfc/standard/09_Animation/src/Fonc.cxx delete mode 100755 samples/mfc/standard/09_Animation/src/Fonc.hxx delete mode 100755 samples/mfc/standard/09_Animation/src/ShadingDialog.cpp delete mode 100755 samples/mfc/standard/09_Animation/src/ShadingDialog.h delete mode 100755 samples/mfc/standard/09_Animation/src/StdAfx.cpp delete mode 100755 samples/mfc/standard/09_Animation/src/StdAfx.h delete mode 100755 samples/mfc/standard/09_Animation/src/ThreadDialog.cpp delete mode 100755 samples/mfc/standard/09_Animation/src/ThreadDialog.h delete mode 100644 samples/mfc/standard/10_Convert/CMakeLists.txt delete mode 100644 samples/mfc/standard/10_Convert/adm/win/vc10/Convert.vcxproj delete mode 100644 samples/mfc/standard/10_Convert/adm/win/vc10/Convert.vcxproj.filters delete mode 100755 samples/mfc/standard/10_Convert/src/Convert_Presentation.cpp delete mode 100755 samples/mfc/standard/10_Convert/src/Convert_Presentation.h delete mode 100755 samples/mfc/standard/10_Convert/src/ISession/ISession_Curve.cpp delete mode 100755 samples/mfc/standard/10_Convert/src/ISession/ISession_Curve.h delete mode 100755 samples/mfc/standard/10_Convert/src/OCCDemo_Presentation.cpp delete mode 100755 samples/mfc/standard/10_Convert/src/OCCDemo_Presentation.h delete mode 100755 samples/mfc/standard/10_Convert/src/WNT/MainFrm.cpp delete mode 100755 samples/mfc/standard/10_Convert/src/WNT/MainFrm.h delete mode 100755 samples/mfc/standard/10_Convert/src/WNT/OCCDemo.cpp delete mode 100755 samples/mfc/standard/10_Convert/src/WNT/OCCDemo.h delete mode 100755 samples/mfc/standard/10_Convert/src/WNT/OCCDemo.rc delete mode 100755 samples/mfc/standard/10_Convert/src/WNT/OCCDemoDoc.cpp delete mode 100755 samples/mfc/standard/10_Convert/src/WNT/OCCDemoDoc.h delete mode 100755 samples/mfc/standard/10_Convert/src/WNT/OCCDemoView.cpp delete mode 100755 samples/mfc/standard/10_Convert/src/WNT/OCCDemoView.h delete mode 100755 samples/mfc/standard/10_Convert/src/WNT/ResultDialog.cpp delete mode 100755 samples/mfc/standard/10_Convert/src/WNT/ResultDialog.h delete mode 100755 samples/mfc/standard/10_Convert/src/WNT/StdAfx.cpp delete mode 100755 samples/mfc/standard/10_Convert/src/WNT/StdAfx.h delete mode 100755 samples/mfc/standard/10_Convert/src/WNT/res/OCCDemo.ico delete mode 100755 samples/mfc/standard/10_Convert/src/WNT/res/OCCDemo.rc2 delete mode 100755 samples/mfc/standard/10_Convert/src/WNT/res/logopen.bmp delete mode 100755 samples/mfc/standard/10_Convert/src/WNT/res/occlogo.bmp delete mode 100755 samples/mfc/standard/10_Convert/src/WNT/res/toolbar.bmp delete mode 100755 samples/mfc/standard/10_Convert/src/WNT/res/toolbar1.bmp delete mode 100755 samples/mfc/standard/10_Convert/src/WNT/resource.h delete mode 100755 samples/mfc/standard/Common/Primitive/Sample2D_Face.cpp delete mode 100755 samples/mfc/standard/Common/Primitive/Sample2D_Face.h delete mode 100755 samples/mfc/standard/Common/Primitive/Sample2D_Image.cpp delete mode 100755 samples/mfc/standard/Common/Primitive/Sample2D_Image.h delete mode 100755 samples/mfc/standard/Common/Primitive/Sample2D_Markers.cpp delete mode 100755 samples/mfc/standard/Common/Primitive/Sample2D_Markers.h delete mode 100755 samples/mfc/standard/Common/User_Cylinder.cxx delete mode 100755 samples/mfc/standard/Common/User_Cylinder.hxx diff --git a/CMakeLists.txt b/CMakeLists.txt index d98acc0ff9..208a5ab255 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1124,14 +1124,8 @@ if (BUILD_SAMPLES_MFC) add_subdirectory(samples/mfc/standard/mfcsample) add_subdirectory(samples/mfc/standard/01_Geometry) add_subdirectory(samples/mfc/standard/02_Modeling) - add_subdirectory(samples/mfc/standard/03_Viewer2d) - add_subdirectory(samples/mfc/standard/04_Viewer3d) - add_subdirectory(samples/mfc/standard/05_ImportExport) - add_subdirectory(samples/mfc/standard/06_Ocaf) - add_subdirectory(samples/mfc/standard/07_Triangulation) - add_subdirectory(samples/mfc/standard/08_HLR) - add_subdirectory(samples/mfc/standard/09_Animation) - add_subdirectory(samples/mfc/standard/10_Convert) + add_subdirectory(samples/mfc/standard/03_ImportExport) + add_subdirectory(samples/mfc/standard/04_HLR) message (STATUS "Info: \(${CURRENT_TIME}\) MFC Sample projects added") endif() diff --git a/samples/mfc/standard/05_ImportExport/CMakeLists.txt b/samples/mfc/standard/03_ImportExport/CMakeLists.txt similarity index 100% rename from samples/mfc/standard/05_ImportExport/CMakeLists.txt rename to samples/mfc/standard/03_ImportExport/CMakeLists.txt diff --git a/samples/mfc/standard/05_ImportExport/adm/win/vc10/ImportExport.vcxproj b/samples/mfc/standard/03_ImportExport/adm/win/vc10/ImportExport.vcxproj similarity index 100% rename from samples/mfc/standard/05_ImportExport/adm/win/vc10/ImportExport.vcxproj rename to samples/mfc/standard/03_ImportExport/adm/win/vc10/ImportExport.vcxproj diff --git a/samples/mfc/standard/05_ImportExport/adm/win/vc10/ImportExport.vcxproj.filters b/samples/mfc/standard/03_ImportExport/adm/win/vc10/ImportExport.vcxproj.filters similarity index 100% rename from samples/mfc/standard/05_ImportExport/adm/win/vc10/ImportExport.vcxproj.filters rename to samples/mfc/standard/03_ImportExport/adm/win/vc10/ImportExport.vcxproj.filters diff --git a/samples/mfc/standard/05_ImportExport/res/ImportExport.rc b/samples/mfc/standard/03_ImportExport/res/ImportExport.rc old mode 100755 new mode 100644 similarity index 100% rename from samples/mfc/standard/05_ImportExport/res/ImportExport.rc rename to samples/mfc/standard/03_ImportExport/res/ImportExport.rc diff --git a/samples/mfc/standard/05_ImportExport/res/Toolbar.bmp b/samples/mfc/standard/03_ImportExport/res/Toolbar.bmp old mode 100755 new mode 100644 similarity index 100% rename from samples/mfc/standard/05_ImportExport/res/Toolbar.bmp rename to samples/mfc/standard/03_ImportExport/res/Toolbar.bmp diff --git a/samples/mfc/standard/05_ImportExport/res/resource.h b/samples/mfc/standard/03_ImportExport/res/resource.h old mode 100755 new mode 100644 similarity index 100% rename from samples/mfc/standard/05_ImportExport/res/resource.h rename to samples/mfc/standard/03_ImportExport/res/resource.h diff --git a/samples/mfc/standard/05_ImportExport/src/ColoredShapes.cpp b/samples/mfc/standard/03_ImportExport/src/ColoredShapes.cpp old mode 100755 new mode 100644 similarity index 100% rename from samples/mfc/standard/05_ImportExport/src/ColoredShapes.cpp rename to samples/mfc/standard/03_ImportExport/src/ColoredShapes.cpp diff --git a/samples/mfc/standard/05_ImportExport/src/ColoredShapes.h b/samples/mfc/standard/03_ImportExport/src/ColoredShapes.h old mode 100755 new mode 100644 similarity index 100% rename from samples/mfc/standard/05_ImportExport/src/ColoredShapes.h rename to samples/mfc/standard/03_ImportExport/src/ColoredShapes.h diff --git a/samples/mfc/standard/05_ImportExport/src/ImportExportApp.cpp b/samples/mfc/standard/03_ImportExport/src/ImportExportApp.cpp old mode 100755 new mode 100644 similarity index 100% rename from samples/mfc/standard/05_ImportExport/src/ImportExportApp.cpp rename to samples/mfc/standard/03_ImportExport/src/ImportExportApp.cpp diff --git a/samples/mfc/standard/05_ImportExport/src/ImportExportApp.h b/samples/mfc/standard/03_ImportExport/src/ImportExportApp.h old mode 100755 new mode 100644 similarity index 100% rename from samples/mfc/standard/05_ImportExport/src/ImportExportApp.h rename to samples/mfc/standard/03_ImportExport/src/ImportExportApp.h diff --git a/samples/mfc/standard/05_ImportExport/src/ImportExportDoc.cpp b/samples/mfc/standard/03_ImportExport/src/ImportExportDoc.cpp old mode 100755 new mode 100644 similarity index 100% rename from samples/mfc/standard/05_ImportExport/src/ImportExportDoc.cpp rename to samples/mfc/standard/03_ImportExport/src/ImportExportDoc.cpp diff --git a/samples/mfc/standard/05_ImportExport/src/ImportExportDoc.h b/samples/mfc/standard/03_ImportExport/src/ImportExportDoc.h old mode 100755 new mode 100644 similarity index 100% rename from samples/mfc/standard/05_ImportExport/src/ImportExportDoc.h rename to samples/mfc/standard/03_ImportExport/src/ImportExportDoc.h diff --git a/samples/mfc/standard/05_ImportExport/src/StdAfx.cpp b/samples/mfc/standard/03_ImportExport/src/StdAfx.cpp old mode 100755 new mode 100644 similarity index 100% rename from samples/mfc/standard/05_ImportExport/src/StdAfx.cpp rename to samples/mfc/standard/03_ImportExport/src/StdAfx.cpp diff --git a/samples/mfc/standard/05_ImportExport/src/StdAfx.h b/samples/mfc/standard/03_ImportExport/src/StdAfx.h old mode 100755 new mode 100644 similarity index 100% rename from samples/mfc/standard/05_ImportExport/src/StdAfx.h rename to samples/mfc/standard/03_ImportExport/src/StdAfx.h diff --git a/samples/mfc/standard/03_Viewer2d/CMakeLists.txt b/samples/mfc/standard/03_Viewer2d/CMakeLists.txt deleted file mode 100644 index 45ea6c8a22..0000000000 --- a/samples/mfc/standard/03_Viewer2d/CMakeLists.txt +++ /dev/null @@ -1,54 +0,0 @@ -cmake_minimum_required (VERSION 2.6) - -project (Viewer2d) - -add_definitions (-DWINVER=0x0501 -DUNICODE -D_UNICODE) -set (CMAKE_MFC_FLAG 2) - -set (Viewer2d_SOURCE_DIR ${MFC_STANDARD_SAMPLES_DIR}/03_Viewer2d/src) -set (Viewer2d_HEADER_FILES ${Viewer2d_SOURCE_DIR}/Viewer2dApp.h - ${Viewer2d_SOURCE_DIR}/Viewer2dDoc.h - ${Viewer2d_SOURCE_DIR}/StdAfx.h ) -set (Viewer2d_SOURCE_FILES ${Viewer2d_SOURCE_DIR}/Viewer2dApp.cpp - ${Viewer2d_SOURCE_DIR}/Viewer2dDoc.cpp - ${Viewer2d_SOURCE_DIR}/StdAfx.cpp ) - -set (Viewer2d_RESOURCE_DIR ${MFC_STANDARD_SAMPLES_DIR}/03_Viewer2d/res) -set (Viewer2d_RESOURCE_HEADER ${Viewer2d_RESOURCE_DIR}/resource.h) -set (Viewer2d_RESOURCE_FILES ${Viewer2d_RESOURCE_DIR}/Toolbar.bmp - ${Viewer2d_RESOURCE_DIR}/Viewer2d.rc) - -# groups in the VS solution -source_group ("Source Files" FILES ${Viewer2d_SOURCE_FILES} - ${COMMON_WINMAIN_FILE}) - -source_group ("Header Files" FILES ${Viewer2d_HEADER_FILES} - ${Viewer2d_RESOURCE_HEADER}) - -source_group ("Resource Files" FILES ${Viewer2d_RESOURCE_FILES}) - -add_executable (Viewer2d WIN32 ${Viewer2d_SOURCE_FILES} - ${Viewer2d_HEADER_FILES} - ${COMMON_WINMAIN_FILE} - ${Viewer2d_RESOURCE_HEADER} - ${Viewer2d_RESOURCE_FILES}) - -set_property (TARGET Viewer2d PROPERTY FOLDER "Samples/mfc") - -if (SINGLE_GENERATOR) - install (TARGETS Viewer2d DESTINATION "${INSTALL_DIR_BIN}") -else() - install (TARGETS Viewer2d - CONFIGURATIONS Release RelWithDebInfo - DESTINATION "${INSTALL_DIR_BIN}") - install (TARGETS Viewer2d - CONFIGURATIONS Debug - DESTINATION "${INSTALL_DIR_BIN}d") -endif() - -include_directories (${CMAKE_BINARY_DIR}/inc - ${MFC_STANDARD_SAMPLES_DIR}/03_Viewer2d - ${Viewer2d_SOURCE_DIR} - ${MFC_STANDARD_SAMPLES_DIR}/Common) - -target_link_libraries (Viewer2d mfcsample) \ No newline at end of file diff --git a/samples/mfc/standard/03_Viewer2d/README.txt b/samples/mfc/standard/03_Viewer2d/README.txt deleted file mode 100644 index fa8efd0a1f..0000000000 --- a/samples/mfc/standard/03_Viewer2d/README.txt +++ /dev/null @@ -1,16 +0,0 @@ -Viewer2d sample demonstrates how the functionality of TKV3d package can be -used for 2D visualization. It provides samples of 2D objects visualization, -dynamic selection and highlighting. -It illustrates how to: -1) implement 2D view behavior with V3d_View class, with interactive zooming -and panning of the 2D scene; -2) draw 2D primitives like rectangles, lines, curves; -3) draw different types of markers; -4) draw text defined by its font, height, style, angle; -5) display 2D curves of a face' edges and group them using orientation -criterion; -6) display zoomable images; -6) display circular and rectangular grids . - -Viewer2d support zooming ,panning of displayed objects and -circular and rectangular grids. \ No newline at end of file diff --git a/samples/mfc/standard/03_Viewer2d/adm/win/vc10/Viewer2d.vcxproj b/samples/mfc/standard/03_Viewer2d/adm/win/vc10/Viewer2d.vcxproj deleted file mode 100644 index cbf9eef460..0000000000 --- a/samples/mfc/standard/03_Viewer2d/adm/win/vc10/Viewer2d.vcxproj +++ /dev/null @@ -1,354 +0,0 @@ - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {6B905DC2-4E72-4EDA-99C2-7473634690FE} - Viewer2d - MFCProj - - - - Application - Dynamic - Unicode - $(VCPlatformToolSet) - - - Application - Dynamic - Unicode - $(VCPlatformToolSet) - - - Application - Dynamic - Unicode - $(VCPlatformToolSet) - - - Application - Dynamic - Unicode - $(VCPlatformToolSet) - - - - - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>10.0.30319.1 - ../../../../win32\$(VCFMT)\bin\ - .\win32\obj\ - false - ../../../../win64\$(VCFMT)\bin\ - .\win64\obj\ - false - ../../../../win32\$(VCFMT)\bind\ - .\win32\objd\ - true - ../../../../win64\$(VCFMT)\bind\ - .\win64\objd\ - true - - - - NDEBUG;%(PreprocessorDefinitions) - true - true - Win32 - .\win32\obj/Viewer2d.tlb - - - - - MaxSpeed - OnlyExplicitInline - ..\..\..\src\Properties;.;..\..\..\src;..\..\..\..\Common;$(CSF_OCCTIncludePath);%(AdditionalIncludeDirectories) - NDEBUG;_WINDOWS;WINVER=0x0501;%(PreprocessorDefinitions) - true - MultiThreadedDLL - true - Use - stdafx.h - .\win32\obj/Viewer2d.pch - .\win32\obj/ - .\win32\obj/ - .\win32\obj/ - Level4 - true - Default - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - - - TKVCAF.lib;TKBRep.lib;TKBool.lib;TKCAF.lib;TKCDF.lib;TKernel.lib;TKFeat.lib;TKFillet.lib;TKG2d.lib;TKG3d.lib;TKGeomAlgo.lib;TKGeomBase.lib;TKHLR.lib;TKMath.lib;TKOffset.lib;TKPrim.lib;TKService.lib;TKTopAlgo.lib;TKV3d.lib;TKOpenGl.lib;mfcsample.lib;%(AdditionalDependencies) - ../../../../win32\$(VCFMT)\bin/Viewer2d.exe - true - ..\..\..\..\win32\$(VCFMT)\lib;$(CSF_OCCTLibPath);%(AdditionalLibraryDirectories) - ../../../../win32\$(VCFMT)\bin/Viewer2d.pdb - Windows - MachineX86 - - - - - NDEBUG;%(PreprocessorDefinitions) - true - true - X64 - .\win64\obj/Viewer2d.tlb - - - - - MaxSpeed - OnlyExplicitInline - ..\..\..\src\Properties;.;..\..\..\src;..\..\..\..\Common;$(CSF_OCCTIncludePath);%(AdditionalIncludeDirectories) - NDEBUG;_WINDOWS;WINVER=0x0501;%(PreprocessorDefinitions) - true - MultiThreadedDLL - true - Use - stdafx.h - .\win64\obj/Viewer2d.pch - .\win64\obj/ - .\win64\obj/ - .\win64\obj/ - Level4 - true - Default - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - - - TKVCAF.lib;TKBRep.lib;TKBool.lib;TKCAF.lib;TKCDF.lib;TKernel.lib;TKFeat.lib;TKFillet.lib;TKG2d.lib;TKG3d.lib;TKGeomAlgo.lib;TKGeomBase.lib;TKHLR.lib;TKMath.lib;TKOffset.lib;TKPrim.lib;TKService.lib;TKTopAlgo.lib;TKV3d.lib;TKOpenGl.lib;mfcsample.lib;%(AdditionalDependencies) - ../../../../win64\$(VCFMT)\bin/Viewer2d.exe - true - ..\..\..\..\win64\$(VCFMT)\lib;$(CSF_OCCTLibPath);%(AdditionalLibraryDirectories) - ../../../../win64\$(VCFMT)\bin/Viewer2d.pdb - Windows - MachineX64 - - - - - _DEBUG;%(PreprocessorDefinitions) - true - true - Win32 - .\win32\objd/Viewer2d.tlb - - - - - Disabled - ..\..\..\src\Properties;.;..\..\..\src;..\..\..\..\Common;$(CSF_OCCTIncludePath);%(AdditionalIncludeDirectories) - _DEBUG;_WINDOWS;WINVER=0x0501;%(PreprocessorDefinitions) - EnableFastChecks - MultiThreadedDebugDLL - Use - stdafx.h - .\win32\objd/Viewer2d.pch - .\win32\objd/ - .\win32\objd/ - .\win32\objd/ - Level4 - true - EditAndContinue - Default - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - - - TKVCAF.lib;TKBRep.lib;TKBool.lib;TKCAF.lib;TKCDF.lib;TKernel.lib;TKFeat.lib;TKFillet.lib;TKG2d.lib;TKG3d.lib;TKGeomAlgo.lib;TKGeomBase.lib;TKHLR.lib;TKMath.lib;TKOffset.lib;TKPrim.lib;TKService.lib;TKTopAlgo.lib;TKV3d.lib;TKOpenGl.lib;mfcsample.lib;%(AdditionalDependencies) - ../../../../win32\$(VCFMT)\bind/Viewer2d.exe - true - ..\..\..\..\win32\$(VCFMT)\libd;$(CSF_OCCTLibPath);%(AdditionalLibraryDirectories) - true - ../../../../win32\$(VCFMT)\bind/Viewer2d.pdb - Windows - MachineX86 - - - - - _DEBUG;%(PreprocessorDefinitions) - true - true - X64 - .\win64\objd/Viewer2d.tlb - - - - - Disabled - ..\..\..\src\Properties;.;..\..\..\src;..\..\..\..\Common;$(CSF_OCCTIncludePath);%(AdditionalIncludeDirectories) - _DEBUG;_WINDOWS;WINVER=0x0501;%(PreprocessorDefinitions) - EnableFastChecks - MultiThreadedDebugDLL - Use - stdafx.h - .\win64\objd/Viewer2d.pch - .\win64\objd/ - .\win64\objd/ - .\win64\objd/ - Level4 - true - ProgramDatabase - Default - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - - - TKVCAF.lib;TKBRep.lib;TKBool.lib;TKCAF.lib;TKCDF.lib;TKernel.lib;TKFeat.lib;TKFillet.lib;TKG2d.lib;TKG3d.lib;TKGeomAlgo.lib;TKGeomBase.lib;TKHLR.lib;TKMath.lib;TKOffset.lib;TKPrim.lib;TKService.lib;TKTopAlgo.lib;TKV3d.lib;TKOpenGl.lib;mfcsample.lib;%(AdditionalDependencies) - ../../../../win64\$(VCFMT)\bind/Viewer2d.exe - true - ..\..\..\..\win64\$(VCFMT)\libd;$(CSF_OCCTLibPath);%(AdditionalLibraryDirectories) - true - ../../../../win64\$(VCFMT)\bind/Viewer2d.pdb - Windows - MachineX64 - - - - - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - Create - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - Create - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - Create - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - Create - - - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - - - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - - - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - - - - - %(PreprocessorDefinitions) - res;%(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - res;%(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - res;%(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - res;%(AdditionalIncludeDirectories) - - - - - - - - - - - - - - {2d6cbbe8-6965-4016-b503-0d715ae26691} - false - - - - - - \ No newline at end of file diff --git a/samples/mfc/standard/03_Viewer2d/adm/win/vc10/Viewer2d.vcxproj.filters b/samples/mfc/standard/03_Viewer2d/adm/win/vc10/Viewer2d.vcxproj.filters deleted file mode 100644 index 77f8789975..0000000000 --- a/samples/mfc/standard/03_Viewer2d/adm/win/vc10/Viewer2d.vcxproj.filters +++ /dev/null @@ -1,55 +0,0 @@ - - - - - {a5fbdc06-d5d7-4c8a-b829-e986d5c86642} - cpp;c;cxx;rc;def;r;odl;idl;hpj;bat - - - {c7319851-4cde-42ce-b4aa-8b7ddd5f0c21} - h;hpp;hxx;hm;inl - - - {ffedd656-2b68-4a6e-8df3-973a1a5b136e} - ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe - - - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - - - Source Files - - - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - - - Resource Files - - - \ No newline at end of file diff --git a/samples/mfc/standard/03_Viewer2d/res/Toolbar.bmp b/samples/mfc/standard/03_Viewer2d/res/Toolbar.bmp deleted file mode 100755 index a6928bd8c9c40df8223674f3db3245f63a38187b..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1318 zcmbW0v2NQi5QbTxfxIP85p>U1Wa{2`@zk>e4chECAiQ-8KxoLG4hAv^5QsdB-$42P zqok-p+W@`j$kUPh^52R6_WkxMxcy-Kg8#&?@lWA1V+c=W^7w{PUaSd$Cp1l&7zxAq zd}h|d;7=F^ML2&-G1z}uZO<#4G4MmE=GQ+3dnMVkEgK)q>TZR5p3hyQa)1{$?B9$h z=hYHKrfM6uj70G4V;-9=91N%)v+QPel0}iW|KyG0ZPK?p*iQ1ql~25mI7X!kFS@>( zdheDsOSylHiDzRQIi-WM!P}ejD$*6tP zJ(9^8eZMH;4i}GlHw_E3zMbh6l*_Q>M(34W@J=@JoCNP)yjOuPM|3QB{&gpPD;_&b zy<8p@jH<6GwXO|bqP@c)f$zMd^H%-qIt0cTCEJDTG6KvwC72^G!IQwkyOjIv?b9K5 zCRv^F{mI)<8bQGTbDvrPd+KQW)RRPDaDA7HPL|Ix-#@>1oJF2>k)Ow?j~huw-RMC& z52>vH+>pYfIhd5mirR_iMUnM;J}x0J=eE}pD%+fT)m!YtUoYFFabf$Y??ILRzr5Uc T-eTY1!g{^nJcqeLfu}8Rp`Lqe diff --git a/samples/mfc/standard/03_Viewer2d/res/Viewer2d.rc b/samples/mfc/standard/03_Viewer2d/res/Viewer2d.rc deleted file mode 100755 index 240238973a..0000000000 --- a/samples/mfc/standard/03_Viewer2d/res/Viewer2d.rc +++ /dev/null @@ -1,420 +0,0 @@ -// Microsoft Visual C++ generated resource script. -// -#include "resource.h" - -#define APSTUDIO_READONLY_SYMBOLS -///////////////////////////////////////////////////////////////////////////// -// -// Generated from the TEXTINCLUDE 2 resource. -// -#include "afxres.h" -#include "..\..\Common\res\OCC_Resource.h" -///////////////////////////////////////////////////////////////////////////// -#undef APSTUDIO_READONLY_SYMBOLS - -///////////////////////////////////////////////////////////////////////////// -// English (U.S.) resources - -#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) -#ifdef _WIN32 -LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US -#pragma code_page(1252) -#endif //_WIN32 - -#ifdef APSTUDIO_INVOKED -///////////////////////////////////////////////////////////////////////////// -// -// TEXTINCLUDE -// - -1 TEXTINCLUDE -BEGIN - "resource.h\0" -END - -2 TEXTINCLUDE -BEGIN - "#include ""afxres.h""\r\n" - "#include ""..\\..\\..\\Common\\res\\OCC_Resource.h""\0" -END - -3 TEXTINCLUDE -BEGIN - "#define _AFX_NO_SPLITTER_RESOURCES\r\n" - "#define _AFX_NO_OLE_RESOURCES\r\n" - "#define _AFX_NO_TRACKER_RESOURCES\r\n" - "#define _AFX_NO_PROPERTY_RESOURCES\r\n" - "\r\n" - "#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)\r\n" - "#ifdef _WIN32\r\n" - "LANGUAGE 9, 1\r\n" - "#pragma code_page(1252)\r\n" - "#endif\r\n" - "#include ""afxres.rc"" // Standard components\r\n" - "#endif\0" -END - -#endif // APSTUDIO_INVOKED - - -///////////////////////////////////////////////////////////////////////////// -// -// Toolbar -// - -IDR_MAINFRAME TOOLBAR 16, 15 -BEGIN - BUTTON ID_FILE_NEW - SEPARATOR - BUTTON ID_BUTTON_Test_Text - BUTTON ID_BUTTON_Test_Markers - BUTTON ID_BUTTON_Test_Line - SEPARATOR - BUTTON ID_BUTTON_Test_Face - SEPARATOR - BUTTON ID_BUTTON_Test_Rect - SEPARATOR - BUTTON ID_BUTTON_Test_Curve - SEPARATOR - BUTTON ID_BUTTON32793 - BUTTON ID_BUTTON_Test_MultiImages - SEPARATOR - BUTTON ID_BUTTON_Erase -END - - -///////////////////////////////////////////////////////////////////////////// -// -// Dialog -// - -IDD_DIALOG_Color DIALOG 0, 0, 281, 186 -STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU -CAPTION "Color Map " -FONT 8, "MS Sans Serif" -BEGIN - LTEXT "Type Of The Color Map :",IDC_STATIC,20,10,87,10 - LTEXT "To be updated ...",IDC_ColorMap_STATIC_Type,110,10,69,10 - LTEXT "Size Of The Color Map :",IDC_STATIC,20,20,79,10 - CONTROL "Tab1",IDC_ColorMap_TAB,"SysTabControl32",TCS_BUTTONS,19,53,242,15 - LTEXT "To be updated ...",IDC_ColorMap_STATIC_Size,110,20,69,10 - GROUPBOX "Entries :",IDC_STATIC,10,40,264,50 - LTEXT "Color Name :",IDC_STATIC,20,75,50,10 - LTEXT "To be updated ...",IDC_ColorMap_STATIC_EntryColorName,204,75,69,10 - PUSHBUTTON "Add",IDC_ColorMap_BUTTON_AddNewEntry,110,145,55,15 - GROUPBOX "New Entry",IDC_STATIC,10,100,267,79 - PUSHBUTTON "Update Current",IDC_ColorMap_BUTTON_UpdateCurrentEntry,20,145,55,15 - LTEXT "Color Name :",IDC_ColorMap_STATIC_NewEntryColorNameStatic,20,120,55,10 - PUSHBUTTON "Edit...",IDC_ColorMap_BUTTON_NewEntry_EditColor,204,145,55,15 - LTEXT "999",IDC_ColorMap_STATIC_EntryColorRed,75,75,35,10 - LTEXT "999",IDC_ColorMap_STATIC_EntryColorGreen,120,75,35,10 - LTEXT "999",IDC_ColorMap_STATIC_EntryColorBlue,165,75,35,10 - EDITTEXT IDC_ColorMap_EDIT_NewEntryColorRed,75,120,35,12,ES_AUTOHSCROLL - EDITTEXT IDC_ColorMap_EDIT_NewEntryColorGreen,120,120,30,12,ES_AUTOHSCROLL - EDITTEXT IDC_ColorMap_EDIT_NewEntryColorBlue,165,120,35,12,ES_AUTOHSCROLL - COMBOBOX IDC_ColorMap_COMBO_NewEntryColorName,204,120,70,193,CBS_DROPDOWN | WS_VSCROLL | WS_TABSTOP - PUSHBUTTON "New Generic Color Map",IDC_ColorMap_BUTTON_NewGenericColorMap,179,4,95,13 - LTEXT "Not available for this type of Color map",IDC_ColorMap_STATIC_NewEntryNotavailable,70,130,160,10 - PUSHBUTTON "New Color Cube Color Map ",IDC_ColorMap_BUTTON_NewColorCubeColorMap,179,18,95,13 - PUSHBUTTON "New Color Ramp Color Map",IDC_ColorMap_BUTTON_NewColorRampColorMap,179,31,95,13 -END - -IDD_DIALOG_Font DIALOGEX 0, 0, 287, 210 -STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU -CAPTION "Font Map" -FONT 8, "MS Sans Serif", 0, 0, 0x1 -BEGIN - LTEXT "Size Of The Font Map :",IDC_STATIC,20,10,80,10 - LTEXT "To be updated ...",IDC_FontMap_STATIC_Size,110,10,80,10 - GROUPBOX "Entries :",IDC_STATIC,10,28,270,97,0,WS_EX_TRANSPARENT - CONTROL "Tab1",IDC_FontMap_TAB,"SysTabControl32",TCS_BUTTONS,20,40,242,15 - GROUPBOX "New Entry",IDC_STATIC,10,130,270,73 - PUSHBUTTON "Update Current",IDC_FontMap_BUTTON_UpdateCurrent,158,181,55,15 - PUSHBUTTON "Add",IDC_FontMap_BUTTON_NewEntry,221,179,55,16 - LTEXT "To be updated...",IDC_FontMap_STATIC_CurrentEntryValue,63,75,217,10 - LTEXT "Type :",IDC_STATIC,21,155,23,10 - LTEXT "Type :",IDC_STATIC,21,60,40,10 - LTEXT "To be updated ...",IDC_FontMap_STATIC_CurrentEntryType,63,60,80,10 - LTEXT "Size :",IDC_STATIC,21,174,42,10 - LTEXT "Slant :",IDC_STATIC,21,189,28,10 - EDITTEXT IDC_FontMap_EDIT_NewEntrySize,63,172,62,12,ES_AUTOHSCROLL | ES_WANTRETURN - EDITTEXT IDC_FontMap_EDIT_NewEntrySlant,63,187,62,12,ES_AUTOHSCROLL | ES_WANTRETURN - LTEXT "Size :",IDC_STATIC,21,90,30,10 - LTEXT "Slant :",IDC_STATIC,21,106,36,10 - LTEXT "Value :",IDC_STATIC,21,75,40,10 - LTEXT "Type :",IDC_STATIC,21,140,42,10 - COMBOBOX IDC_FontMap_COMBO_NewEntryType,63,138,113,77,CBS_DROPDOWN | WS_VSCROLL | WS_TABSTOP - EDITTEXT IDC_FontMap_EDIT_NewEntryValue,63,153,209,12,ES_AUTOHSCROLL | ES_READONLY - LTEXT "To be updated...",IDC_FontMap_STATIC_CurrentEntrySize,63,90,70,10 - LTEXT "To be updated...",IDC_FontMap_STATIC_CurrentEntrySlant,63,106,80,10 - PUSHBUTTON "Edit...",IDC_FontMap_BUTTON_NewEntry_EditFont,191,138,55,12 -END - -IDD_DIALOG_Width DIALOG 0, 0, 281, 167 -STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU -CAPTION "Width Map " -FONT 8, "MS Sans Serif" -BEGIN - LTEXT "Size Of The Width Map :",IDC_STATIC,15,10,80,10 - CONTROL "Tab1",IDC_WidthMap_TAB,"SysTabControl32",TCS_BUTTONS,21,40,242,15 - LTEXT "To be updated ...",IDC_WidthMap_STATIC_Size,107,10,80,10 - GROUPBOX "Entries :",IDC_STATIC,10,30,264,57 - LTEXT "Type :",IDC_STATIC,15,60,80,10 - LTEXT "Width :",IDC_STATIC,15,75,80,10 - LTEXT "Type :",IDC_STATIC,15,115,49,10 - LTEXT "Width :",IDC_STATIC,15,130,49,10 - COMBOBOX IDC_WidthMap_COMBO_NewEntryType,70,113,113,77,CBS_DROPDOWN | WS_VSCROLL | WS_TABSTOP - EDITTEXT IDC_WidthMap_EDIT_NewEntryWidth,70,128,62,12,ES_AUTOHSCROLL | ES_READONLY | ES_WANTRETURN - LTEXT "To be updated ...",IDC_WidthMap_STATIC_EntryType,107,60,80,10 - LTEXT "To be updated ...",IDC_WidthMap_STATIC_EntryWidth,107,75,80,10 - PUSHBUTTON "Add",IDC_WidthMap_BUTTON_AddNewEntry,200,130,55,15 - GROUPBOX "New Entry",IDC_STATIC,7,101,267,51 - PUSHBUTTON "Update Current",IDC_WidthMap_BUTTON_UpdateCurrentEntry,200,110,55,15 -END - -IDD_DIALOG_NewColorCube DIALOG 0, 0, 207, 156 -STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU -CAPTION "New Color Cube" -FONT 8, "MS Sans Serif" -BEGIN - DEFPUSHBUTTON "OK",IDOK,150,10,50,13 - PUSHBUTTON "Cancel",IDCANCEL,150,30,50,14 - LTEXT "base_pixel",IDC_STATIC,20,10,50,10 - LTEXT "greenmax",IDC_STATIC,20,70,50,10 - LTEXT "greenmult",IDC_STATIC,20,90,50,10 - LTEXT "bluemax",IDC_STATIC,20,110,50,10 - LTEXT "bluemult",IDC_STATIC,20,130,50,10 - EDITTEXT IDC_NewColorCube_EDIT_bluemult,80,130,50,12,ES_AUTOHSCROLL | ES_NUMBER - EDITTEXT IDC_NewColorCube_EDIT_bluemax,80,110,50,12,ES_AUTOHSCROLL | ES_NUMBER - EDITTEXT IDC_NewColorCube_EDIT_grennmult,80,90,50,12,ES_AUTOHSCROLL | ES_NUMBER - EDITTEXT IDC_NewColorCube_EDIT_greenmax,80,70,50,12,ES_AUTOHSCROLL | ES_NUMBER - EDITTEXT IDC_NewColorCube_EDIT_base_pixel,80,10,50,12,ES_AUTOHSCROLL | ES_NUMBER - LTEXT "redmax",IDC_STATIC,20,30,50,10 - EDITTEXT IDC_NewColorCube_EDIT_redmax,80,30,50,12,ES_AUTOHSCROLL | ES_NUMBER - LTEXT "redmult",IDC_STATIC,20,50,50,10 - EDITTEXT IDC_NewColorCube_EDIT_redmult,80,50,50,12,ES_AUTOHSCROLL | ES_NUMBER -END - -IDD_DIALOG_NewColorRamp DIALOG 0, 0, 252, 121 -STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU -CAPTION "New Color ramp" -FONT 8, "MS Sans Serif" -BEGIN - DEFPUSHBUTTON "OK",IDOK,150,10,50,13 - PUSHBUTTON "Cancel",IDCANCEL,150,30,50,14 - LTEXT "base_pixel",-1,20,10,49,10 - EDITTEXT IDC_NewColorRamp_EDIT_base_pixel,80,10,40,12,ES_AUTOHSCROLL | ES_NUMBER - LTEXT "dimension",-1,20,30,49,10 - EDITTEXT IDC_NewColorramp_EDIT_dimension,80,30,40,12,ES_AUTOHSCROLL | ES_NUMBER - LTEXT "Color Name :",IDC_ColorMap_STATIC_NewEntryColorNameStatic,20,50,49,10 - PUSHBUTTON "Edit...",IDC_NewColorMapRamp_BUTTON_EditColor,145,70,55,10 - EDITTEXT IDC_NewColorMapRamp_EDIT_ColorRed,28,70,35,12,ES_AUTOHSCROLL - EDITTEXT IDC_NewColorMapRamp_EDIT_ColorGreen,65,70,35,12,ES_AUTOHSCROLL - EDITTEXT IDC_NewColorMapRamp_EDIT_ColorBlue,103,70,35,12,ES_AUTOHSCROLL - COMBOBOX IDC_NewColorMap_COMBO_NewEntryColorName,80,50,70,193,CBS_DROPDOWN | WS_VSCROLL | WS_TABSTOP -END - -IDD_DIALOG_Type DIALOGEX 0, 0, 287, 170 -STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU -CAPTION "Type Map" -FONT 8, "MS Sans Serif", 0, 0, 0x1 -BEGIN - LTEXT "Size Of The Type Map :",-1,20,10,80,10 - LTEXT "To be updated ...",IDC_TypeMap_STATIC_Size,110,10,80,10 - GROUPBOX "Entries :",-1,10,28,270,62,0,WS_EX_TRANSPARENT - CONTROL "Tab1",IDC_TypeMap_TAB,"SysTabControl32",TCS_BUTTONS,20,40,242,15 - GROUPBOX "New Entry",-1,10,100,270,60 - PUSHBUTTON "Update Current",IDC_FontMap_BUTTON_UpdateCurrent,160,140,55,15 - PUSHBUTTON "Add",IDC_FontMap_BUTTON_NewEntry,220,140,55,15 - LTEXT "To be updated...",IDC_TypeMap_STATIC_CurrentEntryValue,63,75,217,10 - LTEXT "Value :",-1,21,126,42,10 - LTEXT "Style :",-1,21,60,40,10 - LTEXT "To be updated ...",IDC_TypeMap_STATIC_CurrentEntryStyle,63,60,80,10 - LTEXT "Value :",-1,21,75,40,10 - LTEXT "Style :",-1,21,111,42,10 - COMBOBOX IDC_TypeMap_COMBO_NewEntryStyle,63,108,113,77,CBS_DROPDOWN | WS_VSCROLL | WS_TABSTOP - EDITTEXT IDC_TypeMap_EDIT_NewEntryValue,63,124,194,12,ES_AUTOHSCROLL | ES_READONLY -END - -IDD_DIALOG_Mark DIALOGEX 0, 0, 287, 201 -STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU -CAPTION "Mark Map" -FONT 8, "MS Sans Serif", 0, 0, 0x1 -BEGIN - LTEXT "Size Of The Mark Map :",AFX_ID_PREVIEW_CLOSE,20,10,80,10 - LTEXT "To be updated ...",IDC_MarkMap_STATIC_Size,110,10,80,10 - GROUPBOX "Entries :",-1,10,28,270,92,0,WS_EX_TRANSPARENT - CONTROL "Tab1",IDC_MarkMap_TAB,"SysTabControl32",TCS_BUTTONS,20,40,242,15 - LTEXT "To be updated...",IDC_MarkMap_STATIC_CurrentEntryXValue,63,75,217,9 - LTEXT "Style :",-1,21,60,40,10 - LTEXT "To be updated ...",IDC_MarkMap_STATIC_CurrentEntryStyle,63,60,80,10 - LTEXT "XValue :",-1,21,75,40,9 - LTEXT "To be updated...",IDC_MarkMap_STATIC_CurrentEntryYValue,63,90,217,10 - LTEXT "YValue :",-1,21,90,40,10 - LTEXT "To be updated...",IDC_MarkMap_STATIC_CurrentEntrySValue,63,105,217,10 - LTEXT "SValue :",-1,21,105,40,10 - LTEXT "To be updated...",IDC_MarkMap_STATIC_CurrentEntryValue,62,90,217,10 -END - - -///////////////////////////////////////////////////////////////////////////// -// -// Bitmap -// - -IDR_MAINFRAME BITMAP "Toolbar.bmp" - -///////////////////////////////////////////////////////////////////////////// -// -// Menu -// - -IDR_2DTYPE MENU -BEGIN - POPUP "&File" - BEGIN - MENUITEM "&New\tCtrl+N", ID_FILE_NEW - MENUITEM "&Close", ID_FILE_CLOSE - MENUITEM SEPARATOR - MENUITEM "Export Image...", ID_FILE_EXPORT_IMAGE - MENUITEM SEPARATOR - MENUITEM "E&xit", ID_APP_EXIT - END - POPUP "&View" - BEGIN - MENUITEM "&Toolbar", ID_VIEW_TOOLBAR - MENUITEM "&Status Bar", ID_VIEW_STATUS_BAR - END - POPUP "&Window" - BEGIN - MENUITEM "&New Window", ID_WINDOW_NEW - MENUITEM "&Cascade", ID_WINDOW_CASCADE - MENUITEM "&Tile", ID_WINDOW_TILE_HORZ - MENUITEM "&Arrange Icons", ID_WINDOW_ARRANGE - END - POPUP "&Help" - BEGIN - MENUITEM "&About Viewer2d...", ID_APP_ABOUT - END -END - -IDR_MAINFRAME MENU -BEGIN - POPUP "&File" - BEGIN - MENUITEM "&New\tCtrl+N", ID_FILE_NEW - MENUITEM SEPARATOR - MENUITEM "E&xit", ID_APP_EXIT - END - POPUP "&View" - BEGIN - MENUITEM "&Toolbar", ID_VIEW_TOOLBAR - MENUITEM "&Status Bar", ID_VIEW_STATUS_BAR - END - POPUP "&Help" - BEGIN - MENUITEM "&About Viewer2d...", ID_APP_ABOUT - END -END - - -///////////////////////////////////////////////////////////////////////////// -// -// Version -// - -VS_VERSION_INFO VERSIONINFO - FILEVERSION 1,0,0,1 - PRODUCTVERSION 1,0,0,1 - FILEFLAGSMASK 0x3fL -#ifdef _DEBUG - FILEFLAGS 0x1L -#else - FILEFLAGS 0x0L -#endif - FILEOS 0x4L - FILETYPE 0x1L - FILESUBTYPE 0x0L -BEGIN - BLOCK "StringFileInfo" - BEGIN - BLOCK "040904B0" - BEGIN - VALUE "FileDescription", "SAMPLEVIEWER2D MFC Application" - VALUE "FileVersion", "1, 0, 0, 1" - VALUE "InternalName", "SAMPLEVIEWER2D" - VALUE "LegalCopyright", "Copyright � 1997" - VALUE "OriginalFilename", "VIEWER2D.EXE" - VALUE "ProductName", "SAMPLEVIEWER2D Application" - VALUE "ProductVersion", "1, 0, 0, 1" - END - END - BLOCK "VarFileInfo" - BEGIN - VALUE "Translation", 0x409, 1200 - END -END - - -///////////////////////////////////////////////////////////////////////////// -// -// String Table -// - -STRINGTABLE -BEGIN - IDR_MAINFRAME "Viewer2d" - IDR_2DTYPE "\nViewer2d\nViewer2d\n\n\nViewer2d.Document\nViewer2d Document" -END - -STRINGTABLE -BEGIN - ID_BUTTON_Test_Text "Test Text\nTest Text" - ID_BUTTON_Test_Markers "Test Markers\nTest Markers" - ID_BUTTON_Test_Line "Test Lines\nTest Lines" - ID_BUTTON_Erase "Erase all\nErase" -END - -STRINGTABLE -BEGIN - ID_BUTTONAxo "Face orientation\nFace orientation" -END - -STRINGTABLE -BEGIN - ID_BUTTON_Test_Curve "Test Curves\nTest Curves" -END - -STRINGTABLE -BEGIN - ID_BUTTON32793 "Test Image\nTest Image" - ID_BUTTON_Test_MultiImages "Test multi-images\nTest multi-images" - ID_BUTTON_Test_Rect "Test Rects\nTest Rects" - ID_BUTTON_Test_Face "Test Face\nTest Face" -END - -#endif // English (U.S.) resources -///////////////////////////////////////////////////////////////////////////// - - - -#ifndef APSTUDIO_INVOKED -///////////////////////////////////////////////////////////////////////////// -// -// Generated from the TEXTINCLUDE 3 resource. -// -#define _AFX_NO_SPLITTER_RESOURCES -#define _AFX_NO_OLE_RESOURCES -#define _AFX_NO_TRACKER_RESOURCES -#define _AFX_NO_PROPERTY_RESOURCES - -#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) -#ifdef _WIN32 -LANGUAGE 9, 1 -#pragma code_page(1252) -#endif -#include "afxres.rc" // Standard components -#endif -///////////////////////////////////////////////////////////////////////////// -#endif // not APSTUDIO_INVOKED - diff --git a/samples/mfc/standard/03_Viewer2d/res/resource.h b/samples/mfc/standard/03_Viewer2d/res/resource.h deleted file mode 100755 index f461f3c401..0000000000 --- a/samples/mfc/standard/03_Viewer2d/res/resource.h +++ /dev/null @@ -1,122 +0,0 @@ -//{{NO_DEPENDENCIES}} -// Microsoft Visual C++ generated include file. -// Used by Viewer2d.rc -// -#define ID_BUTTON_Test_Image 0 -#define IDR_MAINFRAME2 130 -#define IDR_2DTYPE2 131 -#define ID_FILE_EXPORT_IMAGE2 133 -#define ID_MENU_CASCADE_PROPERTIES 148 -#define IDD_DIALOG_Font 160 -#define IDD_DIALOG_Width 161 -#define IDD_DIALOG_Color 162 -#define IDD_DIALOG_NewColorCube 163 -#define IDD_DIALOG_NewColorRamp 164 -#define IDD_DIALOG_Type 165 -#define IDD_DIALOG_Mark 166 -#define ID_BUTTON_Test_Text 1043 -#define ID_BUTTON_Test_Markers 1045 -#define ID_BUTTON_Test_Line 1048 -#define ID_BUTTON_Erase 1051 -#define IDR_MAINFRAME1 1208 -#define IDC_ColorMap_STATIC_Type 1420 -#define IDC_ColorMap_STATIC_Size 1421 -#define IDC_ColorMap_TAB 1422 -#define IDC_ColorMap_STATIC_EntryColorGreen 1423 -#define IDC_ColorMap_STATIC_EntryColorRed 1424 -#define IDC_ColorMap_STATIC_EntryColorBlue 1425 -#define IDC_ColorMap_STATIC_EntryColorName 1426 -#define IDC_ColorMap_EDIT_NewEntryColorRed 1427 -#define IDC_ColorMap_EDIT_NewEntryColorGreen 1428 -#define IDC_ColorMap_EDIT_NewEntryColorBlue 1429 -#define IDC_ColorMap_COMBO_NewEntryColorName 1430 -#define IDC_ColorMap_BUTTON_NewEntry_EditColor 1431 -#define IDC_ColorMap_BUTTON_UpdateCurrentEntry 1432 -#define IDC_ColorMap_BUTTON_AddNewEntry 1433 -#define IDC_ColorMap_BUTTON_NewGenericColorMap 1434 -#define IDC_ColorMap_STATIC_NewEntryColorNameStatic 1435 -#define IDC_ColorMap_STATIC_NewEntryNotavailable 1436 -#define IDC_ColorMap_BUTTON_NewColorCubeColorMap 1437 -#define IDC_ColorMap_BUTTON_NewColorRampColorMap 1438 -#define IDC_NewColorMap_COMBO_NewEntryColorName 1439 -#define IDC_NewColorMap_BUTTON_NewColorRampColorMap 1440 -#define IDC_NewColorMapRamp_EDIT_ColorRed 1441 -#define IDC_NewColorMapRamp_EDIT_ColorGreen 1442 -#define IDC_NewColorMapRamp_EDIT_ColorBlue 1443 -#define IDC_NewColorMapRamp_BUTTON_EditColor 1444 -#define IDC_NewColorRamp_EDIT_base_pixel 1445 -#define IDC_NewColorramp_EDIT_dimension 1446 -#define IDC_NewColorCube_EDIT_bluemult 1447 -#define IDC_NewColorCube_EDIT_base_pixel 1448 -#define IDC_NewColorCube_EDIT_bluemax 1449 -#define IDC_NewColorCube_EDIT_grennmult 1450 -#define IDC_NewColorCube_EDIT_greenmax 1451 -#define IDC_NewColorCube_EDIT_redmax 1452 -#define IDC_NewColorCube_EDIT_redmult 1453 -#define IDC_WidthMap_STATIC_Size 1454 -#define IDC_WidthMap_TAB 1455 -#define IDC_WidthMap_STATIC_EntryType 1456 -#define IDC_WidthMap_STATIC_EntryWidth 1457 -#define IDC_WidthMap_COMBO_NewEntryType 1458 -#define IDC_WidthMap_EDIT_NewEntryWidth 1459 -#define IDC_WidthMap_BUTTON_AddNewEntry 1460 -#define IDC_WidthMap_BUTTON_UpdateCurrentEntry 1461 -#define IDC_FontMap_STATIC_Size 1462 -#define IDC_FontMap_TAB 1463 -#define IDC_FontMap_STATIC_CurrentEntryValue 1464 -#define IDC_FontMap_STATIC_CurrentEntryType 1465 -#define IDC_FontMap_STATIC_CurrentEntrySize 1466 -#define IDC_FontMap_STATIC_CurrentEntrySlant 1467 -#define IDC_FontMap_BUTTON_NewEntry 1468 -#define IDC_FontMap_BUTTON_UpdateCurrent 1469 -#define IDC_FontMap_COMBO_NewEntryType 1470 -#define IDC_FontMap_EDIT_NewEntryValue 1471 -#define IDC_FontMap_EDIT_NewEntrySize 1472 -#define IDC_FontMap_EDIT_NewEntrySlant 1473 -#define IDC_FontMap_BUTTON_NewEntry_EditFont 1474 -#define IDC_TypeMap_STATIC_Size 1475 -#define IDC_TypeMap_TAB 1476 -#define IDC_TypeMap_STATIC_CurrentEntryStyle 1477 -#define IDC_TypeMap_STATIC_CurrentEntryValue 1478 -#define IDC_TypeMap_COMBO_NewEntryStyle 1479 -#define IDC_TypeMap_EDIT_NewEntryValue 1480 -#define IDC_MarkMap_STATIC_Size 1481 -#define IDC_MarkMap_TAB 1482 -#define IDC_MarkMap_STATIC_CurrentEntryXValue 1483 -#define IDC_MarkMap_STATIC_CurrentEntryStyle 1484 -#define IDC_MarkMap_STATIC_CurrentEntryYValue 1485 -#define IDC_MarkMap_STATIC_CurrentEntrySValue 1486 -#define IDC_MarkMap_STATIC_CurrentEntryValue 1487 -#define ID_BUTTON32791 32791 -#define ID_BUTTON32793 32793 -#define ID_BUTTON_Test_MultiImages 32794 -#define ID_BUTTON_Test_Rect 32795 -#define ID_BUTTON_Test_Face 32796 -#define ID_BUTTON_Test_Curve 40016 -#define ID_FILE_NEW2 57601 -#define ID_FILE_OPEN2 57603 -#define ID_FILE_CLOSE2 57604 -#define ID_FILE_SAVE2 57605 -#define ID_FILE_SAVE_AS2 57606 -#define ID_WINDOW_NEW2 57652 -#define ID_WINDOW_ARRANGE2 57653 -#define ID_WINDOW_CASCADE2 57654 -#define ID_WINDOW_TILE_HORZ2 57655 -#define ID_WINDOW_TILE_VERT2 57656 -#define ID_WINDOW_SPLIT2 57657 -#define ID_APP_ABOUT2 57666 -#define ID_APP_EXIT2 57667 -#define ID_VIEW_TOOLBAR2 59394 -#define ID_VIEW_STATUS_BAR2 59395 - -// Next default values for new objects -// -#ifdef APSTUDIO_INVOKED -#ifndef APSTUDIO_READONLY_SYMBOLS -#define _APS_3D_CONTROLS 1 -#define _APS_NEXT_RESOURCE_VALUE 179 -#define _APS_NEXT_COMMAND_VALUE 32797 -#define _APS_NEXT_CONTROL_VALUE 1100 -#define _APS_NEXT_SYMED_VALUE 170 -#endif -#endif diff --git a/samples/mfc/standard/03_Viewer2d/src/StdAfx.cpp b/samples/mfc/standard/03_Viewer2d/src/StdAfx.cpp deleted file mode 100755 index f51e0a6cf3..0000000000 --- a/samples/mfc/standard/03_Viewer2d/src/StdAfx.cpp +++ /dev/null @@ -1,6 +0,0 @@ -// stdafx.cpp : source file that includes just the standard includes -// SampleViewer2d.pch will be the pre-compiled header -// stdafx.obj will contain the pre-compiled type information - -#include "stdafx.h" - diff --git a/samples/mfc/standard/03_Viewer2d/src/StdAfx.h b/samples/mfc/standard/03_Viewer2d/src/StdAfx.h deleted file mode 100755 index 133d0a5ec0..0000000000 --- a/samples/mfc/standard/03_Viewer2d/src/StdAfx.h +++ /dev/null @@ -1,158 +0,0 @@ -// stdafx.h : include file for standard system include files, -// or project specific include files that are used frequently, but -// are changed infrequently -// - -#if _MSC_VER >= 1000 -#pragma once -#endif // _MSC_VER >= 1000 - -#define VC_EXTRALEAN // Exclude rarely-used stuff from Windows headers - -#include // MFC core and standard components -#include // MFC extensions -#include // MFC OLE automation classes -#ifndef _AFX_NO_AFXCMN_SUPPORT -#include // MFC support for Windows Common Controls -#endif // _AFX_NO_AFXCMN_SUPPORT - -#pragma warning( disable : 4244 ) // Issue warning 4244 -#include "Standard_ShortReal.hxx" -#pragma warning( default : 4244 ) // Issue warning 4244 - -#include -/* -#ifndef Version15B -# ifndef Version15D -# ifndef Version20 -# define Version15B -# endif // Version20 -# endif // Version15D -#endif // Version15B - -#pragma message ("=============================") -#ifdef Version15B -# pragma message ("Set the libs for version 1.5B") -#endif // Version15B - -#ifdef Version15D -# pragma message ("Set the libs for version 1.5D") -#endif // Version15D - -#ifdef Version20 -# pragma message ("Set the libs for version 2.0 ") -#endif // Version20 -#pragma message ("=============================") - -#ifdef Version15B -# pragma comment (lib,"TKTop.lib") -# pragma comment (lib,"TShort.lib") -# pragma comment (lib,"TColQuantity.lib") -#endif - -#ifdef Version15D -# pragma comment (lib,"TKTop.lib") -#endif - -#ifdef Version20 -# pragma comment (lib,"TKTop1.lib") -# pragma comment (lib,"TKTop2.lib") -#endif - -#pragma message ("Set the specific libs for the application") -# pragma comment (lib,"TKGeom.lib") -# pragma comment (lib,"TKGlt.lib") -# pragma comment (lib,"TKGraphic.lib") -# pragma comment (lib,"TKPrsMgr.lib") -# pragma comment (lib,"TKViewers.lib") -# pragma comment (lib,"gp.lib") -# pragma comment (lib,"TKernel.lib") -*/ - -#include -#include -#include -#include -#include - -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include <..\res\resource.h> - -class ISession2D_InteractiveObject; - -class V3d_Viewer; -class SelectMgr_SelectableObject; -class TCollection_AsciiString; -class gp_Pnt2d; - -//{{AFX_INSERT_LOCATION}} -// Microsoft Developer Studio will insert additional declarations immediately before the previous line. - diff --git a/samples/mfc/standard/03_Viewer2d/src/Viewer2dApp.cpp b/samples/mfc/standard/03_Viewer2d/src/Viewer2dApp.cpp deleted file mode 100755 index c452e592ff..0000000000 --- a/samples/mfc/standard/03_Viewer2d/src/Viewer2dApp.cpp +++ /dev/null @@ -1,75 +0,0 @@ -// Viewer2dApp.cpp : Defines the class behaviors for the application. -// - -#include "stdafx.h" - -#include "Viewer2dApp.h" - -#include "OCC_MainFrame.h" -#include "OCC_2dChildFrame.h" -#include "Viewer2dDoc.h" -#include "OCC_2dView.h" - -#ifdef _DEBUG -#define new DEBUG_NEW -#undef THIS_FILE -static char THIS_FILE[] = __FILE__; -#endif - -///////////////////////////////////////////////////////////////////////////// -// CViewer2dApp construction - -CViewer2dApp::CViewer2dApp() : OCC_App() -{ - SampleName = "Viewer2d"; //for about dialog - SetSamplePath (L"..\\..\\03_Viewer2d"); -} - -///////////////////////////////////////////////////////////////////////////// -// The one and only CViewer2dApp object - -CViewer2dApp theApp; - -///////////////////////////////////////////////////////////////////////////// -// CViewer2dApp initialization - -BOOL CViewer2dApp::InitInstance() -{ - // Standard initialization - // If you are not using these features and wish to reduce the size - // of your final executable, you should remove from the following - // the specific initialization routines you do not need. - - LoadStdProfileSettings(); // Load standard INI file options (including MRU) - - // Register the application's document templates. Document templates - // serve as the connection between documents, frame windows and views. - - CMultiDocTemplate* pDocTemplate; - pDocTemplate = new CMultiDocTemplate( - IDR_2DTYPE, - RUNTIME_CLASS(CViewer2dDoc), - RUNTIME_CLASS(OCC_2dChildFrame), - RUNTIME_CLASS(OCC_2dView)); - AddDocTemplate(pDocTemplate); - - // create main MDI Frame window - OCC_MainFrame* pMainFrame = new OCC_MainFrame; - if (!pMainFrame->LoadFrame(IDR_MAINFRAME)) - return FALSE; - m_pMainWnd = pMainFrame; - - // Parse command line for standard shell commands, DDE, file open - CCommandLineInfo cmdInfo; - ParseCommandLine(cmdInfo); - - // Dispatch commands specified on the command line - if (!ProcessShellCommand(cmdInfo)) - return FALSE; - - // The main window has been initialized, so show and update it. - pMainFrame->ShowWindow(m_nCmdShow); - pMainFrame->UpdateWindow(); - - return TRUE; -} diff --git a/samples/mfc/standard/03_Viewer2d/src/Viewer2dApp.h b/samples/mfc/standard/03_Viewer2d/src/Viewer2dApp.h deleted file mode 100755 index d63265348f..0000000000 --- a/samples/mfc/standard/03_Viewer2d/src/Viewer2dApp.h +++ /dev/null @@ -1,30 +0,0 @@ -// Viewer2dApp.h : main header file for the VIEWER2D application -// - -#if !defined(AFX_VIEWER2DAPP_H__45F76B43_423D_11D7_8612_0060B0EE281E__INCLUDED_) -#define AFX_VIEWER2DAPP_H__45F76B43_423D_11D7_8612_0060B0EE281E__INCLUDED_ - -#if _MSC_VER > 1000 -#pragma once -#endif // _MSC_VER > 1000 - -#include - -class CViewer2dApp : public OCC_App -{ -public: - - CViewer2dApp(); - -// Overrides - // ClassWizard generated virtual function overrides - //{{AFX_VIRTUAL(CViewer2dApp) - public: - virtual BOOL InitInstance(); - //}}AFX_VIRTUAL -}; - - -///////////////////////////////////////////////////////////////////////////// - -#endif //(AFX_VIEWER2DAPP_H__45F76B43_423D_11D7_8612_0060B0EE281E__INCLUDED_) diff --git a/samples/mfc/standard/03_Viewer2d/src/Viewer2dDoc.cpp b/samples/mfc/standard/03_Viewer2d/src/Viewer2dDoc.cpp deleted file mode 100755 index fd99f3d03d..0000000000 --- a/samples/mfc/standard/03_Viewer2d/src/Viewer2dDoc.cpp +++ /dev/null @@ -1,405 +0,0 @@ -// Viewer2dDoc.cpp : implementation of the CViewer2dDoc class -// - -#include "stdafx.h" -#include "Viewer2dDoc.h" -#include "OCC_App.h" -#include "Primitive\Sample2D_Markers.h" -#include "Primitive\Sample2D_Face.h" -#include "Primitive\Sample2D_Image.h" - -///////////////////////////////////////////////////////////////////////////// -// CViewer2dDoc - -IMPLEMENT_DYNCREATE(CViewer2dDoc, CDocument) - -BEGIN_MESSAGE_MAP(CViewer2dDoc, CDocument) - //{{AFX_MSG_MAP(CViewer2dDoc) - ON_COMMAND(ID_BUTTON_Test_Text, OnBUTTONTestText) - ON_COMMAND(ID_BUTTON_Test_Markers, OnBUTTONTestMarkers) - ON_COMMAND(ID_BUTTON_Test_Line, OnBUTTONTestLine) - ON_COMMAND(ID_BUTTON_Erase, OnBUTTONErase) - ON_COMMAND(ID_BUTTON_Test_Face, OnBUTTONTestFace) - ON_COMMAND(ID_BUTTON_Test_Rect, OnBUTTONTestRect) - ON_COMMAND(ID_BUTTON_Test_Curve, OnBUTTONTestCurve) - ON_COMMAND(ID_BUTTON32793, OnBUTTONTestImage) // test image - ON_COMMAND(ID_BUTTON_Test_MultiImages, OnBUTTONMultipleImage) - - //}}AFX_MSG_MAP -END_MESSAGE_MAP() - -///////////////////////////////////////////////////////////////////////////// -// CViewer2dDoc construction/destruction - -CViewer2dDoc::CViewer2dDoc() -{ -} - -CViewer2dDoc::~CViewer2dDoc() -{ -} - -#ifdef _DEBUG -void CViewer2dDoc::AssertValid() const -{ - CDocument::AssertValid(); -} - -void CViewer2dDoc::Dump(CDumpContext& dc) const -{ - CDocument::Dump(dc); -} -#endif //_DEBUG - -///////////////////////////////////////////////////////////////////////////// -// CViewer2dDoc commands - -void CViewer2dDoc::OnBUTTONErase() -{ - myAISContext->EraseAll (Standard_True); -} - -void CViewer2dDoc::OnBUTTONTestText() -{ - int aColor = Quantity_NOC_MATRABLUE; - for (Standard_Real j = 15; j <= 20; j++) - { - Handle(AIS_TextLabel) aText = new AIS_TextLabel(); - aText->SetText (TCollection_AsciiString ("font 0 scale ") + (j / 20.0)); - aText->SetPosition (gp_Pnt (0.0, 15.0 * (j - 15.0), 0.0)); - aText->SetAngle (30.0 * M_PI / 180.0); - aText->SetColor (Quantity_NameOfColor(aColor++)); - aText->SetFontAspect (Font_FA_Regular); - aText->SetFont ("Courier"); - aText->SetHeight (j); - aText->SetHJustification (Graphic3d_HTA_LEFT); - aText->SetVJustification (Graphic3d_VTA_BOTTOM); - aText->SetZoomable (Standard_False); - myAISContext->Display(aText, Standard_False); - } - - for (Standard_Real j = 10; j <= 15; j++) - { - Handle(AIS_TextLabel) aText = new AIS_TextLabel(); - aText->SetText (TCollection_AsciiString ("font 1 scale ") + (j / 10.0)); - aText->SetPosition (gp_Pnt (80.0, 15.0 * (j - 10.0), 0.0)); - aText->SetAngle (0.0); - aText->SetColor (Quantity_NameOfColor(aColor++)); - aText->SetFontAspect (Font_FA_BoldItalic); - aText->SetFont ("Cambria"); - aText->SetHeight (j * 2); - aText->SetHJustification (Graphic3d_HTA_LEFT); - aText->SetVJustification (Graphic3d_VTA_BOTTOM); - aText->SetZoomable (Standard_False); - myAISContext->Display(aText, Standard_False); - } - - aColor = Quantity_NOC_MATRABLUE; - for (Standard_Real j = 5; j <= 10; j++) - { - Handle(AIS_TextLabel) aText = new AIS_TextLabel(); - aText->SetText (TCollection_AsciiString ("font 2 scale ") + (j / 10.0)); - aText->SetPosition (gp_Pnt (140.0, 15.0 * (j - 5.0), 0.0)); - aText->SetAngle (0.0); - aText->SetColor (Quantity_NameOfColor(aColor++)); - aText->SetFontAspect (Font_FA_Bold); - aText->SetFont ("Arial"); - aText->SetHeight (j * 2); - aText->SetHJustification (Graphic3d_HTA_LEFT); - aText->SetVJustification (Graphic3d_VTA_BOTTOM); - aText->SetZoomable (Standard_False); - myAISContext->Display(aText, Standard_False); - } - for (Standard_Real j = 10; j <= 15; j++) - { - Handle(AIS_TextLabel) aText = new AIS_TextLabel(); - aText->SetText (TCollection_AsciiString ("font 3 scale ") + (j / 10.0)); - aText->SetPosition (gp_Pnt (200.0, 15.0 * (j - 10.0), 0.0)); - aText->SetAngle (0.0); - aText->SetColor (Quantity_NameOfColor(aColor++)); - aText->SetFontAspect (Font_FA_Italic); - aText->SetFont ("Georgia"); - aText->SetHeight (j * 2); - aText->SetHJustification (Graphic3d_HTA_LEFT); - aText->SetVJustification (Graphic3d_VTA_BOTTOM); - aText->SetZoomable (Standard_False); - myAISContext->Display(aText, Standard_False); - } - - FitAll2DViews(Standard_True); // Update Viewer -} - - -void CViewer2dDoc::OnBUTTONTestMarkers() -{ - // generic Markers - Standard_Integer aColor = 20; - for (int i=1;i<=2;i++) - { - Handle (Sample2D_Markers) aMarker = - new Sample2D_Markers(10+5,5*i,Aspect_TOM_POINT,Quantity_NOC_YELLOW,2.0); - myAISContext->Display(aMarker, Standard_False); - } - for (int i=1;i<=2;i++) - { - Handle (Sample2D_Markers) aMarker = - new Sample2D_Markers(10+10,5*i,Aspect_TOM_O,(Quantity_NameOfColor)(aColor++)); - myAISContext->Display(aMarker, Standard_False); - } - for (int i=1;i<=2;i++) - { - Handle (Sample2D_Markers) aMarker = - new Sample2D_Markers(10+15,5*i,Aspect_TOM_O_PLUS,(Quantity_NameOfColor)(aColor++)); - myAISContext->Display(aMarker, Standard_False); - } - for (int i=1;i<=2;i++) - { - Handle (Sample2D_Markers) aMarker = - new Sample2D_Markers(10+20,5*i,Aspect_TOM_RING1,(Quantity_NameOfColor)(aColor++)); - myAISContext->Display(aMarker, Standard_False); - } - for (int i=1;i<=2;i++) - { - - Handle (Sample2D_Markers) aMarker = - new Sample2D_Markers(10+25,5*i,Aspect_TOM_STAR,(Quantity_NameOfColor)(aColor++)); - myAISContext->Display(aMarker, Standard_False); - } - for (int i=1;i<=2;i++) - { - Handle (Sample2D_Markers) aMarker = - new Sample2D_Markers(10+30,5*i,Aspect_TOM_O_X,(Quantity_NameOfColor)(aColor++)); - myAISContext->Display(aMarker, Standard_False); - } - - FitAll2DViews(Standard_False); // Update Viewer -} -void CViewer2dDoc::OnBUTTONTestLine() -{ - for (int i=0;i<=13;++i) - for (int j=0;j<=5;++j) - { - //set of rectangles here - TopoDS_Edge E1 = BRepBuilderAPI_MakeEdge(gp_Pnt(10*i,10*j,0.), gp_Pnt(10*i+7,10*j,0.)); - TopoDS_Edge E2 = BRepBuilderAPI_MakeEdge(gp_Pnt(10*i+7,10*j,0.), gp_Pnt(10*i+7,10*j+5,0.)); - TopoDS_Edge E3 = BRepBuilderAPI_MakeEdge(gp_Pnt(10*i+7,10*j+5,0.), gp_Pnt(10*i,10*j+5,0.)); - TopoDS_Edge E4 = BRepBuilderAPI_MakeEdge(gp_Pnt(10*i,10*j+5,0.), gp_Pnt(10*i,10*j,0.)); - TopoDS_Wire W = BRepBuilderAPI_MakeWire(E1,E2,E3,E4); - TopoDS_Face F = BRepBuilderAPI_MakeFace(W); - Handle(AIS_Shape) aRect = new AIS_Shape(F); - //set attributes of boundaries - Handle(Prs3d_Drawer) aDrawer = new Prs3d_Drawer(); - Handle(Prs3d_LineAspect) aLineAttrib = - new Prs3d_LineAspect(Quantity_NOC_YELLOW, - (Aspect_TypeOfLine)(Aspect_TOL_SOLID+j),1); - aDrawer->SetFaceBoundaryAspect(aLineAttrib); - aDrawer->SetFaceBoundaryDraw(Standard_True); - aRect->SetAttributes(aDrawer); - - myAISContext->SetDisplayMode (aRect, 1, Standard_False); - myAISContext->SetColor(aRect,(Quantity_NameOfColor)(Quantity_NOC_CADETBLUE+2*i),Standard_False); - myAISContext->SetMaterial(aRect,Graphic3d_NOM_PLASTIC,Standard_False); - myAISContext->Display(aRect, Standard_False); - - } - this->FitAll2DViews(Standard_True); -} - - -#include -#include - -void CViewer2dDoc::OnBUTTONTestFace() -{ - //erase all - myAISContext->EraseAll (Standard_True); - - CFileDialog dlg(TRUE, - NULL, - NULL, - OFN_HIDEREADONLY | OFN_OVERWRITEPROMPT, - L"BRep Files (*.brep)|*.brep; ||", - NULL ); - - CString initdir; - initdir.GetEnvironmentVariable (L"CSF_OCCTDataPath"); - initdir += L"\\occ"; - - dlg.m_ofn.lpstrInitialDir = initdir; - - if (dlg.DoModal() == IDOK) - { - SetCursor(AfxGetApp()->LoadStandardCursor(IDC_WAIT)); - - std::filebuf aFileBuf; - std::istream aStream (&aFileBuf); - if (!aFileBuf.open (dlg.GetPathName(), std::ios::in)) - { - AfxMessageBox (L"The shape must be not a null Face"); - return; - } - - TopoDS_Shape aFaceShape; - BRep_Builder aBuilder; - BRepTools::Read (aFaceShape, aStream, aBuilder); - if(aFaceShape.IsNull() || aFaceShape.ShapeType() != TopAbs_FACE) - { - AfxMessageBox (L"The shape must be not a null Face"); - return; - } - - TopoDS_Face aFace = TopoDS::Face(aFaceShape); - Handle(Sample2D_Face) anAISFace = new Sample2D_Face(aFaceShape); - myAISContext->Display(anAISFace,Standard_True); - //activate selection mode for edges selection - myAISContext->Activate(anAISFace,2); - - FitAll2DViews(Standard_False); - - } -} - - - -void CViewer2dDoc::OnBUTTONTestRect() -{ - //First rectangle - TopoDS_Edge E11 = BRepBuilderAPI_MakeEdge(gp_Pnt(40.,0.,0.), gp_Pnt(82.5,25.,0.)); - TopoDS_Edge E12 = BRepBuilderAPI_MakeEdge(gp_Pnt(82.5,25.,0.), gp_Pnt(42.5,93.,0.)); - TopoDS_Edge E13 = BRepBuilderAPI_MakeEdge(gp_Pnt(42.5,93.,0.), gp_Pnt(0.,68.,0.)); - TopoDS_Edge E14 = BRepBuilderAPI_MakeEdge(gp_Pnt(0.,68.,0.), gp_Pnt(40.,0.,0.)); - TopoDS_Wire W1 = BRepBuilderAPI_MakeWire(E11,E12,E13,E14); - Handle(AIS_Shape) aRect1 = new AIS_Shape(W1); - myAISContext->Display (aRect1, Standard_False); - myAISContext->SetColor (aRect1, Quantity_NOC_YELLOW, Standard_False); - - //Second rectangle - TopoDS_Edge E21 = BRepBuilderAPI_MakeEdge(gp_Pnt(110.,0.,0.), gp_Pnt(152.5,25.,0.)); - TopoDS_Edge E22 = BRepBuilderAPI_MakeEdge(gp_Pnt(152.5,25.,0.), gp_Pnt(112.5,93.,0.)); - TopoDS_Edge E23 = BRepBuilderAPI_MakeEdge(gp_Pnt(112.5,93.,0.), gp_Pnt(70.,68.,0.)); - TopoDS_Edge E24 = BRepBuilderAPI_MakeEdge(gp_Pnt(70.,68.,0.), gp_Pnt(110.,0.,0.)); - TopoDS_Wire W2 = BRepBuilderAPI_MakeWire(E21,E22,E23,E24); - Handle(AIS_Shape) aRect2 = new AIS_Shape(W2); - myAISContext->Display (aRect2, Standard_False); - myAISContext->SetColor (aRect2, Quantity_NOC_YELLOW, Standard_False); - myAISContext->Activate(aRect2,2); - - FitAll2DViews(Standard_True); // Update Viewer -} - -void CViewer2dDoc::OnBUTTONTestCurve() -{ - for(int i=0;i<=5;++i) - for(int j=0;j<=5;++j) - { - Handle(Geom_Point) aStart = new Geom_CartesianPoint(gp_Pnt(10*i,10*j,0.)); - Handle(Geom_Point) anEnd = new Geom_CartesianPoint(gp_Pnt(10*i+5,10*j+10,0.)); - Handle(AIS_Line) aLine = new AIS_Line(aStart,anEnd); - Handle(Prs3d_LineAspect) aLineAttrib = - new Prs3d_LineAspect((Quantity_NameOfColor)(Quantity_NOC_CADETBLUE+2*i+2*j), - (Aspect_TypeOfLine)((Aspect_TOL_DASH+i+j)%5),2+i+j); - aLine->Attributes()->SetLineAspect(aLineAttrib); - myAISContext->Display(aLine,Standard_False); - } - FitAll2DViews(Standard_True); -} - -void CViewer2dDoc::OnBUTTONTestImage() -{ - CFileDialog anOpenImageDlg (TRUE, - NULL, - NULL, - OFN_HIDEREADONLY | OFN_OVERWRITEPROMPT, - SupportedImageFormats() + L"| all files (*.*)|*.*;||", - NULL); - - CString anInitDir; - anInitDir.GetEnvironmentVariable (L"CASROOT"); - anInitDir += L"\\data\\images"; - - anOpenImageDlg.m_ofn.lpstrInitialDir = anInitDir; - if(anOpenImageDlg.DoModal() == IDOK) - { - SetCursor(AfxGetApp()->LoadStandardCursor (IDC_WAIT)); - CString aFilePath = anOpenImageDlg.GetPathName(); - TCollection_AsciiString aFileName ((const wchar_t* )aFilePath); - - //erase viewer - myAISContext->EraseAll (Standard_False); - - Handle(Sample2D_Image) anImage = new Sample2D_Image (aFileName); - anImage->SetCoord (40,50) ; - anImage->SetScale (1.0); - myAISContext->Display (anImage, AIS_Shaded, 0, Standard_False); - FitAll2DViews (Standard_True); - } -} - -void CViewer2dDoc::OnBUTTONMultipleImage() -{ - CFileDialog anOpenImageDlg (TRUE, - NULL, - NULL, - OFN_HIDEREADONLY | OFN_OVERWRITEPROMPT, - SupportedImageFormats() + L"| all files (*.*)|*.*;||", - NULL); - - CString anInitDir; - anInitDir.GetEnvironmentVariable (L"CASROOT"); - anInitDir += L"\\data\\images"; - - anOpenImageDlg.m_ofn.lpstrInitialDir = anInitDir; - - if (anOpenImageDlg.DoModal() == IDOK) - { - SetCursor(AfxGetApp()->LoadStandardCursor (IDC_WAIT)); - CString aFilePath = anOpenImageDlg.GetPathName(); - TCollection_AsciiString aFileName ((const wchar_t* )aFilePath); - - //erase viewer - myAISContext->EraseAll (Standard_False); - - //create images - { // 1 - Handle(Sample2D_Image) anImage = new Sample2D_Image (aFileName); - anImage->SetCoord (40, 50); - anImage->SetScale (0.5); - myAISContext->Display (anImage, AIS_Shaded, 0, Standard_False); - } - { // 2 - Handle(Sample2D_Image) anImage = new Sample2D_Image (aFileName); - anImage->SetCoord (100, 50); - anImage->SetScale (0.9); - myAISContext->Display (anImage, AIS_Shaded, 0, Standard_False); - } - { // 3 - Handle(Sample2D_Image) anImage = new Sample2D_Image (aFileName); - anImage->SetCoord (40, 40); - anImage->SetScale (0.3); - myAISContext->Display (anImage, AIS_Shaded, 0, Standard_False); - } - { // 4 - Handle(Sample2D_Image) anImage = new Sample2D_Image (aFileName); - anImage->SetCoord (50, 40); - myAISContext->Display (anImage, AIS_Shaded, 0, Standard_False); - } - { // 5 - Handle(Sample2D_Image) anImage = new Sample2D_Image (aFileName); - anImage->SetCoord (80, 45); - anImage->SetScale (2); - myAISContext->Display (anImage, AIS_Shaded, 0, Standard_False); - } - { // 6 - Handle(Sample2D_Image) anImage = new Sample2D_Image (aFileName); - anImage->SetCoord (20, -20); - myAISContext->Display (anImage, AIS_Shaded, 0, Standard_False); - } - { // 7 - Handle(Sample2D_Image) anImage = new Sample2D_Image (aFileName); - anImage->SetCoord (0, 0); - anImage->SetScale (0.5); - myAISContext->Display (anImage, AIS_Shaded, 0, Standard_False); - } - FitAll2DViews (Standard_True); // Update Viewer - } -} diff --git a/samples/mfc/standard/03_Viewer2d/src/Viewer2dDoc.h b/samples/mfc/standard/03_Viewer2d/src/Viewer2dDoc.h deleted file mode 100755 index dc586c5fe8..0000000000 --- a/samples/mfc/standard/03_Viewer2d/src/Viewer2dDoc.h +++ /dev/null @@ -1,42 +0,0 @@ -// Viewer2dDoc.h : interface of the CViewer2dDoc class -// -///////////////////////////////////////////////////////////////////////////// - -#include -#include -#include "OCC_2dDoc.h" - - -class CViewer2dDoc : public OCC_2dDoc -{ -protected: // create from serialization only - CViewer2dDoc(); - DECLARE_DYNCREATE(CViewer2dDoc) - -// Implementation -public: - virtual ~CViewer2dDoc(); -#ifdef _DEBUG - virtual void AssertValid() const; - virtual void Dump(CDumpContext& dc) const; -#endif - -protected: - -// Generated message map functions -protected: - //{{AFX_MSG(CViewer2dDoc) - afx_msg void OnBUTTONTestText(); - afx_msg void OnBUTTONTestMarkers(); - afx_msg void OnBUTTONTestLine(); - afx_msg void OnBUTTONErase(); - afx_msg void OnBUTTONTestFace(); - afx_msg void OnBUTTONTestRect(); - afx_msg void OnBUTTONTestCurve(); - afx_msg void OnBUTTONTestImage(); - afx_msg void OnBUTTONMultipleImage(); - //}}AFX_MSG - DECLARE_MESSAGE_MAP() - -}; - diff --git a/samples/mfc/standard/08_HLR/CMakeLists.txt b/samples/mfc/standard/04_HLR/CMakeLists.txt similarity index 100% rename from samples/mfc/standard/08_HLR/CMakeLists.txt rename to samples/mfc/standard/04_HLR/CMakeLists.txt diff --git a/samples/mfc/standard/08_HLR/README.txt b/samples/mfc/standard/04_HLR/README.txt similarity index 100% rename from samples/mfc/standard/08_HLR/README.txt rename to samples/mfc/standard/04_HLR/README.txt diff --git a/samples/mfc/standard/08_HLR/adm/win/vc10/HLR.vcxproj b/samples/mfc/standard/04_HLR/adm/win/vc10/HLR.vcxproj similarity index 100% rename from samples/mfc/standard/08_HLR/adm/win/vc10/HLR.vcxproj rename to samples/mfc/standard/04_HLR/adm/win/vc10/HLR.vcxproj diff --git a/samples/mfc/standard/08_HLR/adm/win/vc10/HLR.vcxproj.filters b/samples/mfc/standard/04_HLR/adm/win/vc10/HLR.vcxproj.filters similarity index 100% rename from samples/mfc/standard/08_HLR/adm/win/vc10/HLR.vcxproj.filters rename to samples/mfc/standard/04_HLR/adm/win/vc10/HLR.vcxproj.filters diff --git a/samples/mfc/standard/08_HLR/res/AXOVIEWU.bmp b/samples/mfc/standard/04_HLR/res/AXOVIEWU.bmp old mode 100755 new mode 100644 similarity index 100% rename from samples/mfc/standard/08_HLR/res/AXOVIEWU.bmp rename to samples/mfc/standard/04_HLR/res/AXOVIEWU.bmp diff --git a/samples/mfc/standard/08_HLR/res/BACKVIEWD.bmp b/samples/mfc/standard/04_HLR/res/BACKVIEWD.bmp old mode 100755 new mode 100644 similarity index 100% rename from samples/mfc/standard/08_HLR/res/BACKVIEWD.bmp rename to samples/mfc/standard/04_HLR/res/BACKVIEWD.bmp diff --git a/samples/mfc/standard/08_HLR/res/BACKVIEWF.bmp b/samples/mfc/standard/04_HLR/res/BACKVIEWF.bmp old mode 100755 new mode 100644 similarity index 100% rename from samples/mfc/standard/08_HLR/res/BACKVIEWF.bmp rename to samples/mfc/standard/04_HLR/res/BACKVIEWF.bmp diff --git a/samples/mfc/standard/08_HLR/res/BACKVIEWU.bmp b/samples/mfc/standard/04_HLR/res/BACKVIEWU.bmp old mode 100755 new mode 100644 similarity index 100% rename from samples/mfc/standard/08_HLR/res/BACKVIEWU.bmp rename to samples/mfc/standard/04_HLR/res/BACKVIEWU.bmp diff --git a/samples/mfc/standard/08_HLR/res/BOTTOMVIEWD.bmp b/samples/mfc/standard/04_HLR/res/BOTTOMVIEWD.bmp old mode 100755 new mode 100644 similarity index 100% rename from samples/mfc/standard/08_HLR/res/BOTTOMVIEWD.bmp rename to samples/mfc/standard/04_HLR/res/BOTTOMVIEWD.bmp diff --git a/samples/mfc/standard/08_HLR/res/BOTTOMVIEWF.bmp b/samples/mfc/standard/04_HLR/res/BOTTOMVIEWF.bmp old mode 100755 new mode 100644 similarity index 100% rename from samples/mfc/standard/08_HLR/res/BOTTOMVIEWF.bmp rename to samples/mfc/standard/04_HLR/res/BOTTOMVIEWF.bmp diff --git a/samples/mfc/standard/08_HLR/res/BOTTOMVIEWU.bmp b/samples/mfc/standard/04_HLR/res/BOTTOMVIEWU.bmp old mode 100755 new mode 100644 similarity index 100% rename from samples/mfc/standard/08_HLR/res/BOTTOMVIEWU.bmp rename to samples/mfc/standard/04_HLR/res/BOTTOMVIEWU.bmp diff --git a/samples/mfc/standard/08_HLR/res/ChildFrame2D.bmp b/samples/mfc/standard/04_HLR/res/ChildFrame2D.bmp old mode 100755 new mode 100644 similarity index 100% rename from samples/mfc/standard/08_HLR/res/ChildFrame2D.bmp rename to samples/mfc/standard/04_HLR/res/ChildFrame2D.bmp diff --git a/samples/mfc/standard/08_HLR/res/ChildFrame3D.bmp b/samples/mfc/standard/04_HLR/res/ChildFrame3D.bmp old mode 100755 new mode 100644 similarity index 100% rename from samples/mfc/standard/08_HLR/res/ChildFrame3D.bmp rename to samples/mfc/standard/04_HLR/res/ChildFrame3D.bmp diff --git a/samples/mfc/standard/08_HLR/res/FRONTVIEWD.bmp b/samples/mfc/standard/04_HLR/res/FRONTVIEWD.bmp old mode 100755 new mode 100644 similarity index 100% rename from samples/mfc/standard/08_HLR/res/FRONTVIEWD.bmp rename to samples/mfc/standard/04_HLR/res/FRONTVIEWD.bmp diff --git a/samples/mfc/standard/08_HLR/res/FRONTVIEWF.bmp b/samples/mfc/standard/04_HLR/res/FRONTVIEWF.bmp old mode 100755 new mode 100644 similarity index 100% rename from samples/mfc/standard/08_HLR/res/FRONTVIEWF.bmp rename to samples/mfc/standard/04_HLR/res/FRONTVIEWF.bmp diff --git a/samples/mfc/standard/08_HLR/res/FRONTVIEWU.bmp b/samples/mfc/standard/04_HLR/res/FRONTVIEWU.bmp old mode 100755 new mode 100644 similarity index 100% rename from samples/mfc/standard/08_HLR/res/FRONTVIEWU.bmp rename to samples/mfc/standard/04_HLR/res/FRONTVIEWU.bmp diff --git a/samples/mfc/standard/08_HLR/res/HLR.rc b/samples/mfc/standard/04_HLR/res/HLR.rc old mode 100755 new mode 100644 similarity index 100% rename from samples/mfc/standard/08_HLR/res/HLR.rc rename to samples/mfc/standard/04_HLR/res/HLR.rc diff --git a/samples/mfc/standard/08_HLR/res/LEFTVIEWD.bmp b/samples/mfc/standard/04_HLR/res/LEFTVIEWD.bmp old mode 100755 new mode 100644 similarity index 100% rename from samples/mfc/standard/08_HLR/res/LEFTVIEWD.bmp rename to samples/mfc/standard/04_HLR/res/LEFTVIEWD.bmp diff --git a/samples/mfc/standard/08_HLR/res/LEFTVIEWF.bmp b/samples/mfc/standard/04_HLR/res/LEFTVIEWF.bmp old mode 100755 new mode 100644 similarity index 100% rename from samples/mfc/standard/08_HLR/res/LEFTVIEWF.bmp rename to samples/mfc/standard/04_HLR/res/LEFTVIEWF.bmp diff --git a/samples/mfc/standard/08_HLR/res/LEFTVIEWU.bmp b/samples/mfc/standard/04_HLR/res/LEFTVIEWU.bmp old mode 100755 new mode 100644 similarity index 100% rename from samples/mfc/standard/08_HLR/res/LEFTVIEWU.bmp rename to samples/mfc/standard/04_HLR/res/LEFTVIEWU.bmp diff --git a/samples/mfc/standard/08_HLR/res/RIGHTVIEWD.bmp b/samples/mfc/standard/04_HLR/res/RIGHTVIEWD.bmp old mode 100755 new mode 100644 similarity index 100% rename from samples/mfc/standard/08_HLR/res/RIGHTVIEWD.bmp rename to samples/mfc/standard/04_HLR/res/RIGHTVIEWD.bmp diff --git a/samples/mfc/standard/08_HLR/res/RIGHTVIEWF.bmp b/samples/mfc/standard/04_HLR/res/RIGHTVIEWF.bmp old mode 100755 new mode 100644 similarity index 100% rename from samples/mfc/standard/08_HLR/res/RIGHTVIEWF.bmp rename to samples/mfc/standard/04_HLR/res/RIGHTVIEWF.bmp diff --git a/samples/mfc/standard/08_HLR/res/RIGHTVIEWU.bmp b/samples/mfc/standard/04_HLR/res/RIGHTVIEWU.bmp old mode 100755 new mode 100644 similarity index 100% rename from samples/mfc/standard/08_HLR/res/RIGHTVIEWU.bmp rename to samples/mfc/standard/04_HLR/res/RIGHTVIEWU.bmp diff --git a/samples/mfc/standard/08_HLR/res/ToolBarObjects.bmp b/samples/mfc/standard/04_HLR/res/ToolBarObjects.bmp old mode 100755 new mode 100644 similarity index 100% rename from samples/mfc/standard/08_HLR/res/ToolBarObjects.bmp rename to samples/mfc/standard/04_HLR/res/ToolBarObjects.bmp diff --git a/samples/mfc/standard/08_HLR/res/Toolbar.bmp b/samples/mfc/standard/04_HLR/res/Toolbar.bmp old mode 100755 new mode 100644 similarity index 100% rename from samples/mfc/standard/08_HLR/res/Toolbar.bmp rename to samples/mfc/standard/04_HLR/res/Toolbar.bmp diff --git a/samples/mfc/standard/08_HLR/res/axoviewd.bmp b/samples/mfc/standard/04_HLR/res/axoviewd.bmp old mode 100755 new mode 100644 similarity index 100% rename from samples/mfc/standard/08_HLR/res/axoviewd.bmp rename to samples/mfc/standard/04_HLR/res/axoviewd.bmp diff --git a/samples/mfc/standard/08_HLR/res/axoviewf.bmp b/samples/mfc/standard/04_HLR/res/axoviewf.bmp old mode 100755 new mode 100644 similarity index 100% rename from samples/mfc/standard/08_HLR/res/axoviewf.bmp rename to samples/mfc/standard/04_HLR/res/axoviewf.bmp diff --git a/samples/mfc/standard/08_HLR/res/dummyd.bmp b/samples/mfc/standard/04_HLR/res/dummyd.bmp old mode 100755 new mode 100644 similarity index 100% rename from samples/mfc/standard/08_HLR/res/dummyd.bmp rename to samples/mfc/standard/04_HLR/res/dummyd.bmp diff --git a/samples/mfc/standard/08_HLR/res/dummyf.bmp b/samples/mfc/standard/04_HLR/res/dummyf.bmp old mode 100755 new mode 100644 similarity index 100% rename from samples/mfc/standard/08_HLR/res/dummyf.bmp rename to samples/mfc/standard/04_HLR/res/dummyf.bmp diff --git a/samples/mfc/standard/08_HLR/res/dummyu.bmp b/samples/mfc/standard/04_HLR/res/dummyu.bmp old mode 100755 new mode 100644 similarity index 100% rename from samples/mfc/standard/08_HLR/res/dummyu.bmp rename to samples/mfc/standard/04_HLR/res/dummyu.bmp diff --git a/samples/mfc/standard/08_HLR/res/resource.h b/samples/mfc/standard/04_HLR/res/resource.h old mode 100755 new mode 100644 similarity index 100% rename from samples/mfc/standard/08_HLR/res/resource.h rename to samples/mfc/standard/04_HLR/res/resource.h diff --git a/samples/mfc/standard/08_HLR/res/topviewd.bmp b/samples/mfc/standard/04_HLR/res/topviewd.bmp old mode 100755 new mode 100644 similarity index 100% rename from samples/mfc/standard/08_HLR/res/topviewd.bmp rename to samples/mfc/standard/04_HLR/res/topviewd.bmp diff --git a/samples/mfc/standard/08_HLR/res/topviewf.bmp b/samples/mfc/standard/04_HLR/res/topviewf.bmp old mode 100755 new mode 100644 similarity index 100% rename from samples/mfc/standard/08_HLR/res/topviewf.bmp rename to samples/mfc/standard/04_HLR/res/topviewf.bmp diff --git a/samples/mfc/standard/08_HLR/res/topviewu.bmp b/samples/mfc/standard/04_HLR/res/topviewu.bmp old mode 100755 new mode 100644 similarity index 100% rename from samples/mfc/standard/08_HLR/res/topviewu.bmp rename to samples/mfc/standard/04_HLR/res/topviewu.bmp diff --git a/samples/mfc/standard/08_HLR/src/HLRApp.cpp b/samples/mfc/standard/04_HLR/src/HLRApp.cpp old mode 100755 new mode 100644 similarity index 100% rename from samples/mfc/standard/08_HLR/src/HLRApp.cpp rename to samples/mfc/standard/04_HLR/src/HLRApp.cpp diff --git a/samples/mfc/standard/08_HLR/src/HLRApp.h b/samples/mfc/standard/04_HLR/src/HLRApp.h old mode 100755 new mode 100644 similarity index 100% rename from samples/mfc/standard/08_HLR/src/HLRApp.h rename to samples/mfc/standard/04_HLR/src/HLRApp.h diff --git a/samples/mfc/standard/08_HLR/src/HLRDoc.cpp b/samples/mfc/standard/04_HLR/src/HLRDoc.cpp old mode 100755 new mode 100644 similarity index 100% rename from samples/mfc/standard/08_HLR/src/HLRDoc.cpp rename to samples/mfc/standard/04_HLR/src/HLRDoc.cpp diff --git a/samples/mfc/standard/08_HLR/src/HLRDoc.h b/samples/mfc/standard/04_HLR/src/HLRDoc.h old mode 100755 new mode 100644 similarity index 100% rename from samples/mfc/standard/08_HLR/src/HLRDoc.h rename to samples/mfc/standard/04_HLR/src/HLRDoc.h diff --git a/samples/mfc/standard/08_HLR/src/HLRView2D.cpp b/samples/mfc/standard/04_HLR/src/HLRView2D.cpp old mode 100755 new mode 100644 similarity index 100% rename from samples/mfc/standard/08_HLR/src/HLRView2D.cpp rename to samples/mfc/standard/04_HLR/src/HLRView2D.cpp diff --git a/samples/mfc/standard/08_HLR/src/HLRView2D.h b/samples/mfc/standard/04_HLR/src/HLRView2D.h old mode 100755 new mode 100644 similarity index 100% rename from samples/mfc/standard/08_HLR/src/HLRView2D.h rename to samples/mfc/standard/04_HLR/src/HLRView2D.h diff --git a/samples/mfc/standard/08_HLR/src/HLRView3D.cpp b/samples/mfc/standard/04_HLR/src/HLRView3D.cpp old mode 100755 new mode 100644 similarity index 100% rename from samples/mfc/standard/08_HLR/src/HLRView3D.cpp rename to samples/mfc/standard/04_HLR/src/HLRView3D.cpp diff --git a/samples/mfc/standard/08_HLR/src/HLRView3D.h b/samples/mfc/standard/04_HLR/src/HLRView3D.h old mode 100755 new mode 100644 similarity index 100% rename from samples/mfc/standard/08_HLR/src/HLRView3D.h rename to samples/mfc/standard/04_HLR/src/HLRView3D.h diff --git a/samples/mfc/standard/08_HLR/src/SelectionDialog.cpp b/samples/mfc/standard/04_HLR/src/SelectionDialog.cpp similarity index 100% rename from samples/mfc/standard/08_HLR/src/SelectionDialog.cpp rename to samples/mfc/standard/04_HLR/src/SelectionDialog.cpp diff --git a/samples/mfc/standard/08_HLR/src/SelectionDialog.h b/samples/mfc/standard/04_HLR/src/SelectionDialog.h old mode 100755 new mode 100644 similarity index 100% rename from samples/mfc/standard/08_HLR/src/SelectionDialog.h rename to samples/mfc/standard/04_HLR/src/SelectionDialog.h diff --git a/samples/mfc/standard/08_HLR/src/StdAfx.cpp b/samples/mfc/standard/04_HLR/src/StdAfx.cpp old mode 100755 new mode 100644 similarity index 100% rename from samples/mfc/standard/08_HLR/src/StdAfx.cpp rename to samples/mfc/standard/04_HLR/src/StdAfx.cpp diff --git a/samples/mfc/standard/08_HLR/src/StdAfx.h b/samples/mfc/standard/04_HLR/src/StdAfx.h old mode 100755 new mode 100644 similarity index 100% rename from samples/mfc/standard/08_HLR/src/StdAfx.h rename to samples/mfc/standard/04_HLR/src/StdAfx.h diff --git a/samples/mfc/standard/04_Viewer3d/CMakeLists.txt b/samples/mfc/standard/04_Viewer3d/CMakeLists.txt deleted file mode 100644 index 8e57cc5a35..0000000000 --- a/samples/mfc/standard/04_Viewer3d/CMakeLists.txt +++ /dev/null @@ -1,77 +0,0 @@ -cmake_minimum_required (VERSION 2.6) - -project (Viewer3d) - -add_definitions (-DWINVER=0x0501 -DUNICODE -D_UNICODE) -set (CMAKE_MFC_FLAG 2) - -set (Viewer3d_SRC_DIR ${MFC_STANDARD_SAMPLES_DIR}/04_Viewer3d/src) -set (Viewer3d_RESOURCE_DIR ${MFC_STANDARD_SAMPLES_DIR}/04_Viewer3d/res) -set (Viewer3d_HEADER_FILES ${Viewer3d_SRC_DIR}/BoxRadius.h - ${Viewer3d_SRC_DIR}/DlgIsos.h - ${Viewer3d_SRC_DIR}/ISession_Curve.h - ${Viewer3d_SRC_DIR}/ModelClippingDlg.h - ${Viewer3d_SRC_DIR}/OCCDemo_Presentation.h - ${Viewer3d_SRC_DIR}/OffsetDlg.h - ${Viewer3d_SRC_DIR}/ScaleDlg.h - ${Viewer3d_SRC_DIR}/ShadingModelDlg.h - ${Viewer3d_SRC_DIR}/StdAfx.h - ${Viewer3d_SRC_DIR}/TexturesExt_Presentation.h - ${Viewer3d_SRC_DIR}/TrihedronDlg.h - ${Viewer3d_SRC_DIR}/Viewer3dApp.h - ${Viewer3d_SRC_DIR}/Viewer3dDoc.h - ${Viewer3d_SRC_DIR}/Viewer3dView.h - ${Viewer3d_SRC_DIR}/State.h - ${Viewer3d_RESOURCE_DIR}/resource.h - ${Viewer3d_RESOURCE_DIR}/resource.hm) -set (Viewer3d_SOURCE_FILES ${Viewer3d_SRC_DIR}/BoxRadius.cpp - ${Viewer3d_SRC_DIR}/DlgIsos.cpp - ${Viewer3d_SRC_DIR}/ISession_Curve.cpp - ${Viewer3d_SRC_DIR}/ModelClippingDlg.cpp - ${Viewer3d_SRC_DIR}/OCCDemo_Presentation.cpp - ${Viewer3d_SRC_DIR}/OffsetDlg.cpp - ${Viewer3d_SRC_DIR}/ScaleDlg.cpp - ${Viewer3d_SRC_DIR}/ShadingModelDlg.cpp - ${Viewer3d_SRC_DIR}/StdAfx.cpp - ${Viewer3d_SRC_DIR}/TexturesExt_Presentation.cpp - ${Viewer3d_SRC_DIR}/TrihedronDlg.cpp - ${Viewer3d_SRC_DIR}/Viewer3dApp.cpp - ${Viewer3d_SRC_DIR}/Viewer3dDoc.cpp - ${Viewer3d_SRC_DIR}/Viewer3dView.cpp) - -set (Viewer3d_RESOURCE_FILES ${Viewer3d_RESOURCE_DIR}/Viewer3d.rc - ${Viewer3d_RESOURCE_DIR}/AISToolbar.bmp - ${Viewer3d_RESOURCE_DIR}/AIS_TB.bmp - ${Viewer3d_RESOURCE_DIR}/Toolbar.bmp) - -# groups in the VS solution -source_group ("Source Files" FILES ${Viewer3d_SOURCE_FILES} - ${COMMON_WINMAIN_FILE}) - -source_group ("Header Files" FILES ${Viewer3d_HEADER_FILES}) - -source_group ("Resource Files" FILES ${Viewer3d_RESOURCE_FILES}) - -add_executable (Viewer3d WIN32 ${Viewer3d_SOURCE_FILES} - ${Viewer3d_HEADER_FILES} - ${COMMON_WINMAIN_FILE} - ${Viewer3d_RESOURCE_FILES}) - -set_property (TARGET Viewer3d PROPERTY FOLDER "Samples/mfc") - -if (SINGLE_GENERATOR) - install (TARGETS Viewer3d DESTINATION "${INSTALL_DIR_BIN}") -else() - install (TARGETS Viewer3d - CONFIGURATIONS Release RelWithDebInfo - DESTINATION "${INSTALL_DIR_BIN}") - install (TARGETS Viewer3d - CONFIGURATIONS Debug - DESTINATION "${INSTALL_DIR_BIN}d") -endif() - -include_directories (${CMAKE_BINARY_DIR}/inc - ${Viewer3d_SRC_DIR} - ${MFC_STANDARD_SAMPLES_DIR}/Common) - -target_link_libraries (Viewer3d mfcsample) \ No newline at end of file diff --git a/samples/mfc/standard/04_Viewer3d/adm/win/vc10/Viewer3d.vcxproj b/samples/mfc/standard/04_Viewer3d/adm/win/vc10/Viewer3d.vcxproj deleted file mode 100644 index 0ff8da4041..0000000000 --- a/samples/mfc/standard/04_Viewer3d/adm/win/vc10/Viewer3d.vcxproj +++ /dev/null @@ -1,492 +0,0 @@ - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {949DFBDF-9007-4C88-8925-43209C36A5D6} - Viewer3d - MFCProj - - - - Application - Dynamic - Unicode - $(VCPlatformToolSet) - - - Application - Dynamic - Unicode - $(VCPlatformToolSet) - - - Application - Dynamic - Unicode - $(VCPlatformToolSet) - - - Application - Dynamic - Unicode - $(VCPlatformToolSet) - - - - - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>10.0.30319.1 - ../../../../win32\$(VCFMT)\bin\ - .\win32\obj\ - false - ../../../../win64\$(VCFMT)\bin\ - .\win64\obj\ - false - ../../../../win32\$(VCFMT)\bind\ - .\win32\objd\ - true - ../../../../win64\$(VCFMT)\bind\ - .\win64\objd\ - true - - - - NDEBUG;%(PreprocessorDefinitions) - true - true - Win32 - .\win32\obj/Viewer3d.tlb - - - - - MaxSpeed - OnlyExplicitInline - ..\..\..\;..\..\..\src;..\..\..\..\Common;$(CSF_OCCTIncludePath);%(AdditionalIncludeDirectories) - NDEBUG;_WINDOWS;WINVER=0x0501;%(PreprocessorDefinitions) - true - MultiThreadedDLL - true - Use - stdafx.h - .\win32\obj/Viewer3d.pch - .\win32\obj/ - .\win32\obj/ - .\win32\obj/ - Level4 - true - Default - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - - - TKVCAF.lib;TKBRep.lib;TKBool.lib;TKCAF.lib;TKCDF.lib;TKernel.lib;TKFeat.lib;TKFillet.lib;TKG2d.lib;TKG3d.lib;TKGeomAlgo.lib;TKGeomBase.lib;TKHLR.lib;TKMath.lib;TKOffset.lib;TKPrim.lib;TKService.lib;TKTopAlgo.lib;TKV3d.lib;TKOpenGl.lib;mfcsample.lib;%(AdditionalDependencies) - ../../../../win32\$(VCFMT)\bin/Viewer3d.exe - true - ..\..\..\..\win32\$(VCFMT)\lib;$(CSF_OCCTLibPath);%(AdditionalLibraryDirectories) - ../../../../win32\$(VCFMT)\bin/Viewer3d.pdb - Windows - MachineX86 - - - - - NDEBUG;%(PreprocessorDefinitions) - true - true - X64 - .\win64\obj/Viewer3d.tlb - - - - - MaxSpeed - OnlyExplicitInline - ..\..\..\;..\..\..\src;..\..\..\..\Common;$(CSF_OCCTIncludePath);%(AdditionalIncludeDirectories) - NDEBUG;_WINDOWS;WINVER=0x0501;%(PreprocessorDefinitions) - true - MultiThreadedDLL - true - Use - stdafx.h - .\win64\obj/Viewer3d.pch - .\win64\obj/ - .\win64\obj/ - .\win64\obj/ - Level4 - true - Default - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - - - TKVCAF.lib;TKBRep.lib;TKBool.lib;TKCAF.lib;TKCDF.lib;TKernel.lib;TKFeat.lib;TKFillet.lib;TKG2d.lib;TKG3d.lib;TKGeomAlgo.lib;TKGeomBase.lib;TKHLR.lib;TKMath.lib;TKOffset.lib;TKPrim.lib;TKService.lib;TKTopAlgo.lib;TKV3d.lib;TKOpenGl.lib;mfcsample.lib;%(AdditionalDependencies) - ../../../../win64\$(VCFMT)\bin/Viewer3d.exe - true - ..\..\..\..\win64\$(VCFMT)\lib;$(CSF_OCCTLibPath);%(AdditionalLibraryDirectories) - ../../../../win64\$(VCFMT)\bin/Viewer3d.pdb - Windows - MachineX64 - - - - - _DEBUG;%(PreprocessorDefinitions) - true - true - Win32 - .\win32\objd/Viewer3d.tlb - - - - - Disabled - ..\..\..\;..\..\..\src;..\..\..\..\Common;$(CSF_OCCTIncludePath);%(AdditionalIncludeDirectories) - _DEBUG;_WINDOWS;WINVER=0x0501;%(PreprocessorDefinitions) - EnableFastChecks - MultiThreadedDebugDLL - Use - stdafx.h - .\win32\objd/Viewer3d.pch - .\win32\objd/ - .\win32\objd/ - .\win32\objd/ - true - Level4 - true - EditAndContinue - Default - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - - - TKVCAF.lib;TKBRep.lib;TKBool.lib;TKCAF.lib;TKCDF.lib;TKernel.lib;TKFeat.lib;TKFillet.lib;TKG2d.lib;TKG3d.lib;TKGeomAlgo.lib;TKGeomBase.lib;TKHLR.lib;TKMath.lib;TKOffset.lib;TKPrim.lib;TKService.lib;TKTopAlgo.lib;TKV3d.lib;TKOpenGl.lib;mfcsample.lib;%(AdditionalDependencies) - ../../../../win32\$(VCFMT)\bind/Viewer3d.exe - true - ..\..\..\..\win32\$(VCFMT)\libd;$(CSF_OCCTLibPath);%(AdditionalLibraryDirectories) - true - ../../../../win32\$(VCFMT)\bind/Viewer3d.pdb - Windows - MachineX86 - - - - - _DEBUG;%(PreprocessorDefinitions) - true - true - X64 - .\win64\objd/Viewer3d.tlb - - - - - Disabled - ..\..\..\;..\..\..\src;..\..\..\..\Common;$(CSF_OCCTIncludePath);%(AdditionalIncludeDirectories) - _DEBUG;_WINDOWS;WINVER=0x0501;%(PreprocessorDefinitions) - EnableFastChecks - MultiThreadedDebugDLL - Use - stdafx.h - .\win64\objd/Viewer3d.pch - .\win64\objd/ - .\win64\objd/ - .\win64\objd/ - true - Level4 - true - ProgramDatabase - Default - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - - - TKVCAF.lib;TKBRep.lib;TKBool.lib;TKCAF.lib;TKCDF.lib;TKernel.lib;TKFeat.lib;TKFillet.lib;TKG2d.lib;TKG3d.lib;TKGeomAlgo.lib;TKGeomBase.lib;TKHLR.lib;TKMath.lib;TKOffset.lib;TKPrim.lib;TKService.lib;TKTopAlgo.lib;TKV3d.lib;TKOpenGl.lib;mfcsample.lib;%(AdditionalDependencies) - ../../../../win64\$(VCFMT)\bind/Viewer3d.exe - true - ..\..\..\..\win64\$(VCFMT)\libd;$(CSF_OCCTLibPath);%(AdditionalLibraryDirectories) - true - ../../../../win64\$(VCFMT)\bind/Viewer3d.pdb - Windows - MachineX64 - - - - - - - - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - true - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - true - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - - - - Disabled - ..\res;%(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - true - Disabled - ..\res;%(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - true - MaxSpeed - ..\res;%(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - MaxSpeed - ..\res;%(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - - - Disabled - ..\res;%(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - true - Disabled - ..\res;%(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - true - MaxSpeed - ..\res;%(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - MaxSpeed - ..\res;%(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - - - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - true - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - true - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - - - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - Create - true - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - Create - true - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - Create - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - Create - - - - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - true - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - true - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - - - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - true - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - true - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - - - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - true - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - true - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - - - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - true - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - true - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - - - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - true - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - true - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - - - - - %(PreprocessorDefinitions) - res;%(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - res;%(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - res;%(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - res;%(AdditionalIncludeDirectories) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - {2d6cbbe8-6965-4016-b503-0d715ae26691} - false - - - - - - \ No newline at end of file diff --git a/samples/mfc/standard/04_Viewer3d/adm/win/vc10/Viewer3d.vcxproj.filters b/samples/mfc/standard/04_Viewer3d/adm/win/vc10/Viewer3d.vcxproj.filters deleted file mode 100644 index 58bb2346ce..0000000000 --- a/samples/mfc/standard/04_Viewer3d/adm/win/vc10/Viewer3d.vcxproj.filters +++ /dev/null @@ -1,133 +0,0 @@ - - - - - {60965501-d2d2-46fa-bdc9-62d45562945b} - cpp;c;cxx;rc;def;r;odl;idl;hpj;bat - - - {76f67c93-789a-4fb7-a6ca-db367749f593} - h;hpp;hxx;hm;inl - - - {e16ddbde-8cef-4e45-9ba2-e1b79da373a5} - ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe - - - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - - - Source Files - - - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - - - Header Files - - - Resource Files - - - Resource Files - - - Resource Files - - - \ No newline at end of file diff --git a/samples/mfc/standard/04_Viewer3d/res/AISToolbar.bmp b/samples/mfc/standard/04_Viewer3d/res/AISToolbar.bmp deleted file mode 100644 index bff4ea87dc52ee069072f5accc3eed0f00ea8ab5..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1718 zcmd^9L2iRE5HwO%I7LC~Bl?W0_x{DF7zqh+i=WXa=WPEjLUR8&!uqo}EJ<4TmX*pQj>`&gJ+EQ1$+;TOK;r;pSrfaPk-=_46;>4!qYE-Q zH_fi_K0mRj`f?CjE-ep diff --git a/samples/mfc/standard/04_Viewer3d/res/AIS_TB.bmp b/samples/mfc/standard/04_Viewer3d/res/AIS_TB.bmp deleted file mode 100755 index d99e3aeafd02869aa2b1aa0bc9c8533b4647ab3b..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2118 zcmcIkJ!>055Z!>u$q+~af%I;aE`Pyx=VHDF(L*bYa;3&+eJnth7y5pajQYRe!KV^Ce&IW1%y$7QQKLt-t|OM?f^tz zc|>HPKCl(rI3Hu2ElyP5#h~GmcI1&k&^VbBaglevmqH5J@Ti}s$Q4Pfi6l&Of&Y(q zEN(Y2CSZBJq#f!pHVlt?5X1YI_k)Tx3|YUg7{-ChP71mhpkWwlVoSJ2J(rN%Ts7Lr zRX1^UhZ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GkWros9mNvIwLSn{@88cbNB$ns48LgD}V^l^H+fz^87S|;8# zY9&-}!_5)lm>{)G<5&e`dMPX3+DS~4IdFsNmGihl--~04}_vj?Xr4{7= zOZix1LQTWaX`3&sLnG9ZsbazBhWU&F3lhBlV=hcgajE}IL4>MV=lcEU8DOARvT2#_ zZ{J(P_0wAo=0e`j#?s3=khx**d!S*e*4rC{Jspf`mZ^P|2`t+Cgs;;TYC|~^Fqi>5 zGfhNU{knvkO$wd9u5;PCajz`=e{J|$y!yU-H!>~fQw_D>*QKX?aWv7l>a@q1Z(h{M Yw9E9Bel4C}*`a8zu|GQYiyI~LKYX^YfB*mh diff --git a/samples/mfc/standard/04_Viewer3d/res/Viewer3d.rc b/samples/mfc/standard/04_Viewer3d/res/Viewer3d.rc deleted file mode 100755 index 8f51d7fe1c..0000000000 --- a/samples/mfc/standard/04_Viewer3d/res/Viewer3d.rc +++ /dev/null @@ -1,563 +0,0 @@ -// Microsoft Visual C++ generated resource script. -// -#include "resource.h" - -// Generated Help ID header file -#define APSTUDIO_HIDDEN_SYMBOLS -#include "resource.hm" -#undef APSTUDIO_HIDDEN_SYMBOLS - -#define APSTUDIO_READONLY_SYMBOLS -///////////////////////////////////////////////////////////////////////////// -// -// Generated from the TEXTINCLUDE 2 resource. -// -#include "afxres.h" -#include "..\..\Common\res\OCC_Resource.h" -///////////////////////////////////////////////////////////////////////////// -#undef APSTUDIO_READONLY_SYMBOLS - -///////////////////////////////////////////////////////////////////////////// -// Russian resources - -#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_RUS) -#ifdef _WIN32 -LANGUAGE LANG_RUSSIAN, SUBLANG_DEFAULT -#pragma code_page(1251) -#endif //_WIN32 - -///////////////////////////////////////////////////////////////////////////// -// -// Dialog -// - -IDD_SETOFFSETS DIALOGEX 442, 45, 187, 60 -STYLE DS_SETFONT | DS_MODALFRAME | DS_SETFOREGROUND | DS_3DLOOK | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU -EXSTYLE WS_EX_TOOLWINDOW -CAPTION "Set offsets" -FONT 8, "MS Sans Serif", 0, 0, 0x1 -BEGIN - CONTROL "Slider2",IDC_SLIDER_OFFSETFACTOR,"msctls_trackbar32",TBS_BOTH | TBS_NOTICKS | WS_TABSTOP,39,14,100,15 - LTEXT "Factor:",IDC_STATIC,13,17,23,15 - LTEXT "Units:",IDC_STATIC,13,35,19,8 - CONTROL "Slider3",IDC_SLIDER_OFFSETUNITS,"msctls_trackbar32",TBS_BOTH | TBS_NOTICKS | WS_TABSTOP,39,32,100,15 - GROUPBOX "Offset parameters",IDC_STATIC,7,6,173,47 - EDITTEXT IDC_EDIT_OFFSETFACTOR,148,14,22,14,ES_AUTOHSCROLL | ES_NUMBER - EDITTEXT IDC_EDIT_OFFSETUNITS,148,32,22,14,ES_AUTOHSCROLL | ES_NUMBER -END - -IDD_TRIHEDRON DIALOG 0, 0, 138, 95 -STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU -CAPTION "Triedron settings" -FONT 8, "MS Sans Serif" -BEGIN - DEFPUSHBUTTON "OK",IDOK,21,75,50,14 - PUSHBUTTON "Cancel",IDCANCEL,73,75,50,14 - COMBOBOX IDC_COMBOTRIHEDRPOS,38,8,92,60,CBS_DROPDOWN | CBS_SORT | WS_VSCROLL | WS_TABSTOP - COMBOBOX IDC_COMBOTRIHEDRCOLOR,38,29,92,78,CBS_DROPDOWN | CBS_SORT | WS_VSCROLL | WS_TABSTOP - EDITTEXT IDC_EDITTRIHEDRSCALE,38,51,33,12,ES_CENTER | ES_AUTOHSCROLL - LTEXT "Color:",IDC_STATIC,8,31,20,8 - LTEXT "Position:",IDC_STATIC,8,10,28,8 - LTEXT "Scale:",IDC_STATIC,8,53,24,10 - CONTROL "Spin1",IDC_SPINTRIHEDRSCALE,"msctls_updown32",UDS_AUTOBUDDY | UDS_ARROWKEYS,70,51,11,12 -END - - -///////////////////////////////////////////////////////////////////////////// -// -// DESIGNINFO -// - -#ifdef APSTUDIO_INVOKED -GUIDELINES DESIGNINFO -BEGIN - IDD_SETOFFSETS, DIALOG - BEGIN - LEFTMARGIN, 7 - RIGHTMARGIN, 180 - TOPMARGIN, 6 - BOTTOMMARGIN, 53 - END -END -#endif // APSTUDIO_INVOKED - -#endif // Russian resources -///////////////////////////////////////////////////////////////////////////// - - -///////////////////////////////////////////////////////////////////////////// -// English (U.S.) resources - -#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) -#ifdef _WIN32 -LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US -#pragma code_page(1252) -#endif //_WIN32 - -///////////////////////////////////////////////////////////////////////////// -// -// Dialog -// - -IDD_SHADINGMODEL DIALOG 0, 0, 60, 66 -STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU -CAPTION "ShadingModel" -FONT 8, "MS Sans Serif" -BEGIN - PUSHBUTTON "GOURAUD",IDC_SHADINGMODEL_GOURAUD,7,7,46,16 - PUSHBUTTON "PHONG", IDC_SHADINGMODEL_PHONG, 7,25,46,15 -END - -IDD_MODELCLIPPING DIALOG 0, 0, 180, 74 -STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION -CAPTION "Model clipping" -FONT 8, "MS Sans Serif" -BEGIN - DEFPUSHBUTTON "OK",IDOK,13,47,50,14 - PUSHBUTTON "Cancel",IDCANCEL,70,47,50,14 - CONTROL "Slider1",IDC_SLIDER_MODELCLIPPING_Z,"msctls_trackbar32",TBS_BOTH | TBS_NOTICKS | WS_TABSTOP,21,6,97,15 - LTEXT "Z:",-1,12,10,8,8 - GROUPBOX "",-1,7,0,166,25 - EDITTEXT IDC_EDIT_MODELCLIPPING_Z,118,7,34,14,ES_AUTOHSCROLL | ES_NUMBER - GROUPBOX "",-1,7,38,166,29 - CONTROL "Model clipping ON/OFF",IDC_CHECK_MODELCLIPPINGONOFF, - "Button",BS_AUTOCHECKBOX | WS_TABSTOP,12,28,91,10 -END - -IDD_RADIUS DIALOGEX 0, 0, 151, 82 -STYLE DS_SETFONT | DS_MODALFRAME | DS_CONTEXTHELP | WS_POPUP | WS_CAPTION | WS_SYSMENU -CAPTION "Radius" -FONT 8, "MS Sans Serif", 0, 0, 0x1 -BEGIN - DEFPUSHBUTTON "OK",IDOK,7,61,50,14 - PUSHBUTTON "Cancel",IDCANCEL,94,61,50,14 - CONTROL "Spin1",IDC_SPIN_RADIUS,"msctls_updown32",UDS_ARROWKEYS,98,43,11,14 - EDITTEXT IDC_EDIT_RADIUS,48,42,45,13,ES_AUTOHSCROLL | NOT WS_TABSTOP - CTEXT "Radius Fillet",IDC_RadiusFillet,33,20,94,18,0,WS_EX_DLGMODALFRAME | WS_EX_CLIENTEDGE | WS_EX_STATICEDGE,HIDC_RadiusFillet -END - -IDD_ISOS DIALOG 0, 0, 161, 66 -STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU -CAPTION "Isos" -FONT 8, "MS Sans Serif" -BEGIN - DEFPUSHBUTTON "OK",IDOK,7,44,50,14 - PUSHBUTTON "Cancel",IDCANCEL,104,44,50,14 - LTEXT "U Isos Number",IDC_ISOU,31,13,48,8 - LTEXT "V Isos Number",IDC_ISOV,31,28,47,8 - EDITTEXT IDC_EDIT_ISOU,93,7,40,14,ES_AUTOHSCROLL - EDITTEXT IDC_EDIT_ISOV,93,24,40,12,ES_AUTOHSCROLL -END - - -#ifdef APSTUDIO_INVOKED -///////////////////////////////////////////////////////////////////////////// -// -// TEXTINCLUDE -// - -1 TEXTINCLUDE -BEGIN - "resource.h\0" -END - -2 TEXTINCLUDE -BEGIN - "#include ""afxres.h""\r\n" - "#include ""..\\..\\Common\\res\\OCC_Resource.h""\0" -END - -3 TEXTINCLUDE -BEGIN - "#define _AFX_NO_SPLITTER_RESOURCES\r\n" - "#define _AFX_NO_OLE_RESOURCES\r\n" - "#define _AFX_NO_TRACKER_RESOURCES\r\n" - "#define _AFX_NO_PROPERTY_RESOURCES\r\n" - "\r\n" - "#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)\r\n" - "#ifdef _WIN32\r\n" - "LANGUAGE 9, 1\r\n" - "#pragma code_page(1252)\r\n" - "#endif\r\n" - "#include ""afxres.rc"" // Standard components\r\n" - "#endif\0" -END - -#endif // APSTUDIO_INVOKED - - -///////////////////////////////////////////////////////////////////////////// -// -// Bitmap -// - -IDR_MAINFRAME BITMAP "..//res//Toolbar.bmp" -IDR_TB_AIS BITMAP "..//res//AIS_TB.bmp" - -///////////////////////////////////////////////////////////////////////////// -// -// Toolbar -// - -IDR_MAINFRAME TOOLBAR 20, 20 -BEGIN - BUTTON ID_FILE_NEW - SEPARATOR - BUTTON ID_CIRCLE - BUTTON ID_LINE - BUTTON ID_BOX - BUTTON ID_Cylinder - BUTTON ID_SPHERE - SEPARATOR - BUTTON ID_OVERLAPPED_BOX - BUTTON ID_OVERLAPPED_CYLINDER - BUTTON ID_OVERLAPPED_SPHERE - BUTTON ID_POLYGON_OFFSETS - SEPARATOR - BUTTON ID_ERASEALL - SEPARATOR - BUTTON ID_SPOT_LIGHT - BUTTON ID_POSITIONAL_LIGHT - BUTTON ID_DIRECTIONAL_LIGHT - BUTTON ID_AMBIENT_LIGHT - BUTTON ID_CLEAR_LIGHTS - SEPARATOR - BUTTON ID_SCALE - SEPARATOR - BUTTON ID_NBISOS - BUTTON ID_SHADINGMODEL - BUTTON ID_ANTIALIASINGONOFF - SEPARATOR - BUTTON ID_MODELCLIPPING - SEPARATOR - BUTTON ID_VERTICES - BUTTON ID_EDGES - BUTTON ID_FACES - BUTTON ID_NEUTRAL - SEPARATOR - BUTTON ID_FILLET3D - SEPARATOR - BUTTON ID_TEXTURE_ON - BUTTON ID_BUTTONStart - BUTTON ID_BUTTONPrev - BUTTON ID_BUTTONRepeat - BUTTON ID_BUTTONNext - BUTTON ID_BUTTONEnd - SEPARATOR - BUTTON ID_DUMP_VIEW - SEPARATOR - BUTTON ID_APP_ABOUT -END - -IDR_TB_AIS TOOLBAR 20, 20 -BEGIN - BUTTON ID_OBJECT_WIREFRAME - BUTTON ID_OBJECT_SHADING - BUTTON ID_OBJECT_COLORED_MESH - SEPARATOR - BUTTON ID_OBJECT_COLOR - BUTTON ID_OBJECT_MATERIAL - BUTTON ID_OBJECT_TRANSPARENCY - SEPARATOR - BUTTON ID_OBJECT_ERASE - BUTTON ID_OBJECT_DISPLAYALL - SEPARATOR - BUTTON ID_OBJECT_REMOVE - BUTTON ID_OBJECT_DIM -END - - -///////////////////////////////////////////////////////////////////////////// -// -// Menu -// - -IDR_MAINFRAME MENU -BEGIN - POPUP "&File" - BEGIN - MENUITEM "&New\tCtrl+N", ID_FILE_NEW - MENUITEM SEPARATOR - MENUITEM "E&xit", ID_APP_EXIT - END - POPUP "&View" - BEGIN - MENUITEM "&Toolbar", ID_VIEW_TOOLBAR - MENUITEM "&Status Bar", ID_VIEW_STATUS_BAR - END - POPUP "&Help" - BEGIN - MENUITEM "&About Viewer3d...", ID_APP_ABOUT - END -END - -IDR_3DTYPE MENU -BEGIN - POPUP "&File" - BEGIN - MENUITEM "&New\tCtrl+N", ID_FILE_NEW - MENUITEM "&Close", ID_FILE_CLOSE - MENUITEM SEPARATOR - MENUITEM "E&xit", ID_APP_EXIT - END - POPUP "&View" - BEGIN - MENUITEM "&Toolbar", ID_VIEW_TOOLBAR - MENUITEM "&Status Bar", ID_VIEW_STATUS_BAR - END - POPUP "&Options" - BEGIN - POPUP "&Trihedron" - BEGIN - MENUITEM "&Static Trihedron...", ID_OPTIONS_TRIHEDRON_STATIC_TRIHEDRON - MENUITEM "&Dynamic Trihedron", ID_OPTIONS_TRIHEDRON_DYNAMIC_TRIHEDRON - END - END - POPUP "&Window" - BEGIN - MENUITEM "&New Window", ID_WINDOW_NEW - MENUITEM "&Cascade", ID_WINDOW_CASCADE - MENUITEM "&Tile", ID_WINDOW_TILE_HORZ - MENUITEM "&Arrange Icons", ID_WINDOW_ARRANGE - END - POPUP "&Help" - BEGIN - MENUITEM "&About Viewer3d...", ID_APP_ABOUT - END -END - -IDR_Popup3D MENU -BEGIN - POPUP "BackGround" - BEGIN - MENUITEM "Background Color...", ID_Modify_ChangeBackground - END - POPUP "Object(s)" - BEGIN - MENUITEM "Erase", ID_OBJECT_ERASE - MENUITEM "Shading", ID_OBJECT_SHADING - MENUITEM "Wireframe", ID_OBJECT_WIREFRAME - MENUITEM "Color...", ID_OBJECT_COLOR - MENUITEM "Material...", ID_OBJECT_MATERIAL - POPUP "Material" - BEGIN - MENUITEM "Aluminium", ID_OBJECT_MATERIAL_ALUMINIUM - MENUITEM "Brass", ID_OBJECT_MATERIAL_BRASS - MENUITEM "Bronze", ID_OBJECT_MATERIAL_BRONZE - MENUITEM "Chrome", ID_OBJECT_MATERIAL_CHROME - MENUITEM "Copper", ID_OBJECT_MATERIAL_COPPER - MENUITEM "Gold", ID_OBJECT_MATERIAL_GOLD - MENUITEM "Jade", ID_OBJECT_MATERIAL_JADE - MENUITEM "Metalized", ID_OBJECT_MATERIAL_METALIZED - MENUITEM "Neon GNC", ID_OBJECT_MATERIAL_NEON_GNC - MENUITEM "Neon PHC", ID_OBJECT_MATERIAL_NEON_PHC - MENUITEM "Obsidian", ID_OBJECT_MATERIAL_OBSIDIAN - MENUITEM "Pewter", ID_OBJECT_MATERIAL_PEWTER - MENUITEM "Plaster", ID_OBJECT_MATERIAL_PLASTER - MENUITEM "Plastic", ID_OBJECT_MATERIAL_PLASTIC - MENUITEM "Satin", ID_OBJECT_MATERIAL_SATIN - MENUITEM "Shiny plastic", ID_OBJECT_MATERIAL_SHINY_PLASTIC - MENUITEM "Silver", ID_OBJECT_MATERIAL_SILVER - MENUITEM "Steel", ID_OBJECT_MATERIAL_STEEL - MENUITEM "Stone", ID_OBJECT_MATERIAL_STONE - MENUITEM SEPARATOR - MENUITEM "Default", ID_OBJECT_MATERIAL_DEFAULT - END - MENUITEM "Transparency...", ID_OBJECT_TRANSPARENCY - END - POPUP "User cylinder" - BEGIN - MENUITEM "Change face color", ID_USERCYLINDER_CHANGEFACECOLOR - END -END - - -///////////////////////////////////////////////////////////////////////////// -// -// Version -// - -VS_VERSION_INFO VERSIONINFO - FILEVERSION 1,0,0,1 - PRODUCTVERSION 1,0,0,1 - FILEFLAGSMASK 0x3fL -#ifdef _DEBUG - FILEFLAGS 0x1L -#else - FILEFLAGS 0x0L -#endif - FILEOS 0x4L - FILETYPE 0x1L - FILESUBTYPE 0x0L -BEGIN - BLOCK "StringFileInfo" - BEGIN - BLOCK "040904b0" - BEGIN - VALUE "FileDescription", "Viewer MFC Application" - VALUE "FileVersion", "1, 0, 0, 1" - VALUE "InternalName", "Viewer" - VALUE "LegalCopyright", "Copyright (C) 1997" - VALUE "OriginalFilename", "Viewer.EXE" - VALUE "ProductName", "SampleViewer3d Application" - VALUE "ProductVersion", "1, 0, 0, 1" - END - END - BLOCK "VarFileInfo" - BEGIN - VALUE "Translation", 0x409, 1200 - END -END - - -///////////////////////////////////////////////////////////////////////////// -// -// String Table -// - -STRINGTABLE -BEGIN - IDR_MAINFRAME "Viewer3d" - IDR_3DTYPE "\nViewer3d\n\n\n\n.Document\n Document" -END - -STRINGTABLE -BEGIN - ID_BOX "Create and display a box\nBox" - ID_Cylinder "Create and display a cylinder\nCylinder" - ID_SPHERE "Create and display a sphere\nSphere" - ID_ERASEALL "Remove all\nRemove all" - ID_AMBIENT_LIGHT "Create an ambient light source\nAmbient light" - ID_DIRECTIONAL_LIGHT "Create an directional light source\nDirectional light" - ID_POSITIONAL_LIGHT "Create an positional light source\nPositional light" - ID_SPOT_LIGHT "Create an spot light source\nSpot light" - ID_LIGHTOFF "Delete lights\nDelete lights" - ID_SHADINGMODEL "Define shading model\nShadingModel" - ID_ANTIALIASINGONOFF "Antialiasing ON/OFF\nAntialiasing" -END - -STRINGTABLE -BEGIN - ID_CLEAR_LIGHTS "Clear all the light sources\nClear lights" - ID_MODELCLIPPING "ModelClipping\nModelClipping" - ID_OVERLAPPED_BOX "Create and display two overlapped boxes\nOverlapped boxes" - ID_BUTTON819 "Create and display two overlapped spheres\nOverlapped spheres" - ID_OVERLAPPED_SPHERE "Create and display two overlapped spheres\nOverlapped spheres" - ID_BUTTON821 "Create and display two overlapped boxes\nOverlapped boxes" - ID_OVERLAPPED_CYLINDER "Create and display two overlapped cylinders\nOverlapped cylinders" - ID_POLYGON_OFFSETS "Set/unset offsets\nSet/unset offsets" - ID_OBJECT_COLORED_MESH "Puts cylinder in colored mesh\nColored mesh" - ID_SCALE "Scale\nScale" -END - -STRINGTABLE -BEGIN - ID_CIRCLE "Clear all the light sources\nClear lights" - ID_LINE "Create and display a line with standard tools\nLine" - ID_VERTICES "Set the selection mode to vertices\nVertices" - ID_EDGES "Set the selection mode to edges\nEdges" - ID_FACES "Set the selection modes to faces\nFaces" - ID_NEUTRAL "Neutral point for selection\nNeutral point" - ID_FILLET3D "Make a fillet between faces\nFillet" - ID_NBISOS "Set global isos number\nIsos" - ID_BUTTONStart "Press to go to the first sample\nFirst sample (Home)" - ID_BUTTONPrev "Press to go to the previous sample\nPrevious sample (PgUp)" - ID_BUTTONRepeat "Press to repeat the current sample\nRepeat sample (Space)" - ID_BUTTONNext "Press to go to the next sample\nNext sample (PgDn)" - ID_BUTTONEnd "Press to go to the last sample\nLast sample (End)" -END - -STRINGTABLE -BEGIN - ID_DUMP_VIEW "Save current frame into an image file\nExport view (F12)" - ID_TEXTURE_ON "Run texture example\nRun texture example" -END - -STRINGTABLE -BEGIN - ID_OBJECT_DIMENSIONS "Add dimensions" - ID_LOCALCONTEXT_ADDDIMENSION "Add new dimension for selected objects" -END - -#endif // English (U.S.) resources -///////////////////////////////////////////////////////////////////////////// - - -///////////////////////////////////////////////////////////////////////////// -// English (U.K.) resources - -#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENG) -#ifdef _WIN32 -LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_UK -#pragma code_page(1252) -#endif //_WIN32 - -///////////////////////////////////////////////////////////////////////////// -// -// Dialog -// - -IDD_SCALE DIALOG 0, 0, 186, 103 -STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU -CAPTION "Heterogeneous Scale" -FONT 8, "MS Sans Serif" -BEGIN - DEFPUSHBUTTON "OK",IDOK,13,78,50,14 - PUSHBUTTON "Cancel",IDCANCEL,70,78,50,14 - GROUPBOX "",IDC_STATIC,7,69,166,29 - GROUPBOX "",IDC_STATIC,7,0,166,65 - CONTROL "Slider1",IDC_SLIDER_SCALEX,"msctls_trackbar32",TBS_BOTH | TBS_NOTICKS | WS_TABSTOP,34,6,97,15 - LTEXT "X:",IDC_STATIC,13,9,8,8 - EDITTEXT IDC_EDIT_SCALEX,131,7,34,14,ES_AUTOHSCROLL | ES_NUMBER - CONTROL "Slider2",IDC_SLIDER_SCALEY,"msctls_trackbar32",TBS_BOTH | TBS_NOTICKS | WS_TABSTOP,34,25,97,15 - LTEXT "Y:",IDC_STATIC,13,28,8,8 - EDITTEXT IDC_EDIT_SCALEY,131,26,34,14,ES_AUTOHSCROLL | ES_NUMBER - CONTROL "Slider2",IDC_SLIDER_SCALEZ,"msctls_trackbar32",TBS_BOTH | TBS_NOTICKS | WS_TABSTOP,34,45,97,15 - LTEXT "Z:",IDC_STATIC,13,48,8,8 - EDITTEXT IDC_EDIT_SCALEZ,131,46,34,14,ES_AUTOHSCROLL | ES_NUMBER -END - - -///////////////////////////////////////////////////////////////////////////// -// -// DESIGNINFO -// - -#ifdef APSTUDIO_INVOKED -GUIDELINES DESIGNINFO -BEGIN - IDD_SCALE, DIALOG - BEGIN - LEFTMARGIN, 7 - RIGHTMARGIN, 179 - TOPMARGIN, 7 - BOTTOMMARGIN, 96 - END -END -#endif // APSTUDIO_INVOKED - -#endif // English (U.K.) resources -///////////////////////////////////////////////////////////////////////////// - - - -#ifndef APSTUDIO_INVOKED -///////////////////////////////////////////////////////////////////////////// -// -// Generated from the TEXTINCLUDE 3 resource. -// -#define _AFX_NO_SPLITTER_RESOURCES -#define _AFX_NO_OLE_RESOURCES -#define _AFX_NO_TRACKER_RESOURCES -#define _AFX_NO_PROPERTY_RESOURCES - -#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) -#ifdef _WIN32 -LANGUAGE 9, 1 -#pragma code_page(1252) -#endif -#include "afxres.rc" // Standard components -#endif -///////////////////////////////////////////////////////////////////////////// -#endif // not APSTUDIO_INVOKED - diff --git a/samples/mfc/standard/04_Viewer3d/res/resource.h b/samples/mfc/standard/04_Viewer3d/res/resource.h deleted file mode 100755 index d7e6ef7847..0000000000 --- a/samples/mfc/standard/04_Viewer3d/res/resource.h +++ /dev/null @@ -1,94 +0,0 @@ -//{{NO_DEPENDENCIES}} -// Microsoft Visual C++ generated include file. -// Used by Viewer3d.rc -// -#define IDD_SHADINGMODEL 131 -#define IDD_SETOFFSETS 134 -#define IDD_SCALE 139 -#define IDD_RADIUS 144 -#define IDD_TRIHEDRON 542 -#define ID_BOX 802 -#define ID_Cylinder 803 -#define ID_SPHERE 804 -#define ID_ERASEALL 805 -#define ID_AMBIENT_LIGHT 806 -#define ID_DIRECTIONAL_LIGHT 807 -#define ID_POSITIONAL_LIGHT 808 -#define ID_SPOT_LIGHT 809 -#define ID_LIGHTOFF 810 -#define ID_USERCYLINDER_CHANGEFACECOLOR 810 -#define ID_SHADINGMODEL 814 -#define ID_ANTIALIASINGONOFF 815 -#define ID_CLEAR_LIGHTS 816 -#define ID_MODELCLIPPING 817 -#define ID_OVERLAPPED_BOX 818 -#define ID_BUTTON819 819 -#define ID_OVERLAPPED_SPHERE 820 -#define ID_BUTTON821 821 -#define ID_OVERLAPPED_CYLINDER 822 -#define ID_POLYGON_OFFSETS 823 -#define ID_OBJECT_COLORED_MESH 827 -#define ID_OPTIONS_TRIHEDRON_STATIC_TRIHEDRON 829 -#define ID_OPTIONS_TRIHEDRON_DYNAMIC_TRIHEDRON 830 -#define ID_SCALE 831 -#define ID_CIRCLE 833 -#define ID_LINE 834 -#define ID_VERTICES 837 -#define ID_EDGES 838 -#define ID_FACES 839 -#define ID_NEUTRAL 840 -#define ID_FILLET3D 841 -#define ID_NBISOS 842 -#define ID_BUTTONStart 843 -#define ID_BUTTONPrev 844 -#define ID_BUTTONRepeat 845 -#define ID_BUTTONNext 846 -#define ID_BUTTONEnd 847 -#define ID_DUMP_VIEW 848 -#define ID_TEXTURE_ON 849 -#define IDC_SPIN_RADIUS 1000 -#define IDC_EDIT_RADIUS 1001 -#define IDC_SHADINGMODEL_COLOR 1002 -#define IDC_EDIT_ISOU 1002 -#define IDC_SHADINGMODEL_MULTICOLOR 1003 -#define IDC_SLIDER_MODELCLIPPING_Z 1003 -#define IDC_SHADINGMODEL_FLAT 1004 -#define IDC_ISOU 1004 -#define IDC_SHADINGMODEL_HIDDEN 1005 -#define IDC_EDIT_MODELCLIPPING_Z 1005 -#define IDC_ISOV 1005 -#define IDC_SHADINGMODEL_GOURAUD 1006 -#define IDC_EDIT_ISOV 1006 -#define IDC_SHADINGMODEL_PHONG 1007 -#define IDC_CHECK_MODELCLIPPINGONOFF 1008 -#define IDC_SLIDER_OFFSETFACTOR 1010 -#define IDC_SLIDER_OFFSETUNITS 1011 -#define IDC_EDIT_OFFSETFACTOR 1012 -#define IDC_EDIT_OFFSETUNITS 1013 -#define IDC_COMBO_OFFSETTYPE 1023 -#define IDC_SLIDER_SCALEX 1028 -#define IDC_SLIDER_SCALEY 1029 -#define IDC_EDIT_SCALEX 1030 -#define IDC_EDIT_SCALEY 1031 -#define IDC_RadiusFillet 1031 -#define IDC_SLIDER_SCALEZ 1032 -#define IDC_EDIT_SCALEZ 1033 -#define IDD_RESULTMESSAGEDLG 1500 -#define IDD_MODELCLIPPING 1501 -#define IDD_ISOS 1502 -#define IDC_EDITTRIHEDRSCALE 1686 -#define IDC_SPINTRIHEDRSCALE 1737 -#define IDC_COMBOTRIHEDRPOS 1739 -#define IDC_COMBOTRIHEDRCOLOR 1740 - -// Next default values for new objects -// -#ifdef APSTUDIO_INVOKED -#ifndef APSTUDIO_READONLY_SYMBOLS -#define _APS_3D_CONTROLS 1 -#define _APS_NEXT_RESOURCE_VALUE 140 -#define _APS_NEXT_COMMAND_VALUE 850 -#define _APS_NEXT_CONTROL_VALUE 1032 -#define _APS_NEXT_SYMED_VALUE 104 -#endif -#endif diff --git a/samples/mfc/standard/04_Viewer3d/res/resource.hm b/samples/mfc/standard/04_Viewer3d/res/resource.hm deleted file mode 100644 index 0ed8fdf68d..0000000000 --- a/samples/mfc/standard/04_Viewer3d/res/resource.hm +++ /dev/null @@ -1,4 +0,0 @@ -// Microsoft Visual C++ generated Help ID include file. -// Used by Viewer3d.rc -// -#define HIDC_RadiusFillet 0x808f0407 // IDD_RADIUS diff --git a/samples/mfc/standard/04_Viewer3d/src/BoxRadius.cpp b/samples/mfc/standard/04_Viewer3d/src/BoxRadius.cpp deleted file mode 100755 index da56cbe4a6..0000000000 --- a/samples/mfc/standard/04_Viewer3d/src/BoxRadius.cpp +++ /dev/null @@ -1,61 +0,0 @@ -// BoxRadius.cpp : implementation file -// - -#include "stdafx.h" -#include "Viewer3dApp.h" -#include "BoxRadius.h" - -///////////////////////////////////////////////////////////////////////////// - -BoxRadius::BoxRadius(CWnd* pParent, - double rad) - : CDialog(BoxRadius::IDD, pParent) -{ - //{{AFX_DATA_INIT(BoxRadius) - m_radius = rad; - //}}AFX_DATA_INIT -} - - -void BoxRadius::DoDataExchange(CDataExchange* pDX) -{ - CDialog::DoDataExchange(pDX); - //{{AFX_DATA_MAP(BoxRadius) - DDX_Control(pDX, IDC_SPIN_RADIUS, m_spinradius); - DDX_Text(pDX, IDC_EDIT_RADIUS, m_radius); - //}}AFX_DATA_MAP -} - - -BEGIN_MESSAGE_MAP(BoxRadius, CDialog) - //{{AFX_MSG_MAP(BoxRadius) - ON_NOTIFY(UDN_DELTAPOS, IDC_SPIN_RADIUS, OnDeltaposSpinRadius) - //}}AFX_MSG_MAP -END_MESSAGE_MAP() - -///////////////////////////////////////////////////////////////////////////// -// BoxRadius message handlers - -BOOL BoxRadius::OnInitDialog() -{ - CDialog::OnInitDialog(); - - // TODO: Add extra initialization here - m_spinradius.SetRange(-10000,10000); - return TRUE; // return TRUE unless you set the focus to a control - // EXCEPTION: OCX Property Pages should return FALSE -} - -void BoxRadius::OnDeltaposSpinRadius(NMHDR* pNMHDR, LRESULT* pResult) -{ - NM_UPDOWN* pNMUpDown = (NM_UPDOWN*)pNMHDR; - // TODO: Add your control notification handler code here - if (pNMUpDown->iDelta == 1) - pNMUpDown->iDelta = 1; - else - pNMUpDown->iDelta = -1; - m_radius = m_radius + pNMUpDown->iDelta; - UpdateData(FALSE); - *pResult = 0; -} - diff --git a/samples/mfc/standard/04_Viewer3d/src/BoxRadius.h b/samples/mfc/standard/04_Viewer3d/src/BoxRadius.h deleted file mode 100755 index 0679c506f6..0000000000 --- a/samples/mfc/standard/04_Viewer3d/src/BoxRadius.h +++ /dev/null @@ -1,49 +0,0 @@ -// BoxRadius.h : header file -// - -#if !defined(AFX_BOXRADIUS_H__AD263FF3_54F3_11D1_8C40_00AA00D10994__INCLUDED_) -#define AFX_BOXRADIUS_H__AD263FF3_54F3_11D1_8C40_00AA00D10994__INCLUDED_ - -#if _MSC_VER >= 1000 -#pragma once -#endif // _MSC_VER >= 1000 - -///////////////////////////////////////////////////////////////////////////// -// BoxRadius dialog - -class BoxRadius : public CDialog -{ -// Construction -public: - BoxRadius(CWnd* pParent,double rad); // standard constructor - -// Dialog Data - //{{AFX_DATA(BoxRadius) - enum { IDD = IDD_RADIUS }; - CSpinButtonCtrl m_spinradius; - double m_radius; - //}}AFX_DATA - - -// Overrides - // ClassWizard generated virtual function overrides - //{{AFX_VIRTUAL(BoxRadius) - protected: - virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support - //}}AFX_VIRTUAL - -// Implementation -protected: - - // Generated message map functions - //{{AFX_MSG(BoxRadius) - afx_msg void OnDeltaposSpinRadius(NMHDR* pNMHDR, LRESULT* pResult); - virtual BOOL OnInitDialog(); - //}}AFX_MSG - DECLARE_MESSAGE_MAP() -}; - -//{{AFX_INSERT_LOCATION}} -// Microsoft Developer Studio will insert additional declarations immediately before the previous line. - -#endif // !defined(AFX_BOXRADIUS_H__AD263FF3_54F3_11D1_8C40_00AA00D10994__INCLUDED_) diff --git a/samples/mfc/standard/04_Viewer3d/src/ConvertClickToPoint.cxx b/samples/mfc/standard/04_Viewer3d/src/ConvertClickToPoint.cxx deleted file mode 100755 index 7ffd51f904..0000000000 --- a/samples/mfc/standard/04_Viewer3d/src/ConvertClickToPoint.cxx +++ /dev/null @@ -1,27 +0,0 @@ -#include - -gp_Pnt ConvertClickToPoint(Standard_Real x, Standard_Real y, Handle(V3d_View) aView) -{ - - Standard_Real XEye,YEye,ZEye,XAt,YAt,ZAt; - aView->Eye(XEye,YEye,ZEye); - aView->At(XAt,YAt,ZAt); - gp_Pnt EyePoint(XEye,YEye,ZEye); - gp_Pnt AtPoint(XAt,YAt,ZAt); - - gp_Vec EyeVector(EyePoint,AtPoint); - gp_Dir EyeDir(EyeVector); - - gp_Pln PlaneOfTheView = gp_Pln(AtPoint,EyeDir); - Standard_Real X,Y,Z; - aView->Convert((int)x,(int)y,X,Y,Z); - gp_Pnt ConvertedPoint(X,Y,Z); - gp_Pnt2d ConvertedPointOnPlane = ProjLib::Project(PlaneOfTheView,ConvertedPoint); - - gp_Pnt ResultPoint = ElSLib::Value(ConvertedPointOnPlane.X(), - ConvertedPointOnPlane.Y(), - PlaneOfTheView); - return ResultPoint; -} - - diff --git a/samples/mfc/standard/04_Viewer3d/src/DlgAttributes.cpp b/samples/mfc/standard/04_Viewer3d/src/DlgAttributes.cpp deleted file mode 100755 index 3c527fd5dd..0000000000 --- a/samples/mfc/standard/04_Viewer3d/src/DlgAttributes.cpp +++ /dev/null @@ -1,332 +0,0 @@ -// DlgAttributes.cpp : implementation file -// - -#include "stdafx.h" - -#include "DlgAttributes.h" - -#include "AISDisplayModeApp.h" - -#include -#include - -#include - -#ifdef _DEBUG -#define new DEBUG_NEW -#undef THIS_FILE -static char THIS_FILE[] = __FILE__; -#endif - -///////////////////////////////////////////////////////////////////////////// -// DlgAttributes dialog - - -DlgAttributes::DlgAttributes(CWnd* pParent) - : CDialog(DlgAttributes::IDD, pParent) -{ - //{{AFX_DATA_INIT(DlgAttributes) - // NOTE: the ClassWizard will add member initialization here - //}}AFX_DATA_INIT -} - - -void DlgAttributes::DoDataExchange(CDataExchange* pDX) -{ - CDialog::DoDataExchange(pDX); - //{{AFX_DATA_MAP(DlgAttributes) - // NOTE: the ClassWizard will add DDX and DDV calls here - //}}AFX_DATA_MAP -} - - -BEGIN_MESSAGE_MAP(DlgAttributes, CDialog) - //{{AFX_MSG_MAP(DlgAttributes) - ON_BN_CLICKED(ID_OBJECT_MATERIAL_ALUMINIUM, OnObjectMaterialAluminium) - ON_BN_CLICKED(ID_OBJECT_MATERIAL_BRASS, OnObjectMaterialBrass) - ON_BN_CLICKED(ID_OBJECT_MATERIAL_BRONZE, OnObjectMaterialBronze) - ON_BN_CLICKED(ID_OBJECT_MATERIAL_CHROME, OnObjectMaterialChrome) - ON_BN_CLICKED(ID_OBJECT_MATERIAL_COPPER, OnObjectMaterialCopper) - ON_BN_CLICKED(ID_OBJECT_MATERIAL_GOLD, OnObjectMaterialGold) - ON_BN_CLICKED(ID_OBJECT_MATERIAL_JADE, OnObjectMaterialJade) - ON_BN_CLICKED(ID_OBJECT_MATERIAL_METALIZED, OnObjectMaterialMetalized) - ON_BN_CLICKED(ID_OBJECT_MATERIAL_NEON_GNC, OnObjectMaterialNeonGNC) - ON_BN_CLICKED(ID_OBJECT_MATERIAL_NEON_PHC, OnObjectMaterialNeonPHC) - ON_BN_CLICKED(ID_OBJECT_MATERIAL_OBSIDIAN, OnObjectMaterialObsidian) - ON_BN_CLICKED(ID_OBJECT_MATERIAL_PEWTER, OnObjectMaterialPewter) - ON_BN_CLICKED(ID_OBJECT_MATERIAL_PLASTER, OnObjectMaterialPlaster) - ON_BN_CLICKED(ID_OBJECT_MATERIAL_PLASTIC, OnObjectMaterialPlastic) - ON_BN_CLICKED(ID_OBJECT_MATERIAL_SATIN, OnObjectMaterialSatin) - ON_BN_CLICKED(ID_OBJECT_MATERIAL_SHINY_PLASTIC, OnObjectMaterialShinyPlastic) - ON_BN_CLICKED(ID_OBJECT_MATERIAL_SILVER, OnObjectMaterialSilver) - ON_BN_CLICKED(ID_OBJECT_MATERIAL_STEEL, OnObjectMaterialSteel) - ON_BN_CLICKED(ID_OBJECT_MATERIAL_STONE, OnObjectMaterialStone) - ON_BN_CLICKED(ID_OBJECT_MATERIAL_DEFAULT, OnObjectMaterialDefault) - ON_BN_CLICKED(ID_OBJECT_COLOR, OnColor) - ON_BN_CLICKED(ID_OBJECT_SHADING, OnShading) - ON_BN_CLICKED(ID_OBJECT_WIREFRAME, OnWireframe) - ON_COMMAND(ID_OBJECT_TRANSPARENCY, OnTransparency) - ON_UPDATE_COMMAND_UI(ID_OBJECT_TRANSPARENCY, OnUpdateObjectTransparency) -//}}AFX_MSG_MAP -END_MESSAGE_MAP() - -///////////////////////////////////////////////////////////////////////////// -// DlgAttributes message handlers - - -void DlgAttributes::OnColor() -{ - Handle(AIS_InteractiveObject) Current ; - Quantity_Color CSFColor ; - COLORREF MSColor ; - - myAISContext->InitCurrent(); - if (myAISContext->MoreCurrent()) { - Current = myAISContext->Current() ; - if ( Current->HasColor () ) { - CSFColor = Current->Color () ; - MSColor = RGB (CSFColor.Red()*255., - CSFColor.Green()*255., - CSFColor.Blue()*255.); - } - else { - MSColor = RGB (255,255,255) ; - } - - CColorDialog dlgColor(MSColor); - if (dlgColor.DoModal() == IDOK) { - MSColor = dlgColor.GetColor(); - CSFColor = Quantity_Color (GetRValue(MSColor)/255., - GetGValue(MSColor)/255., - GetBValue(MSColor)/255.,Quantity_TOC_RGB); - for (myAISContext->InitCurrent(); - myAISContext->MoreCurrent (); - myAISContext->NextCurrent ()) - myAISContext->SetColor (myAISContext->Current(), - CSFColor.Name()); - } - } - -TCollection_AsciiString Message ("\ -\n\ -for (myAISContext->InitCurrent(); myAISContext->MoreCurrent (); \n\ - myAISContext->NextCurrent ()) \n\ - myAISContext->SetColor (myAISContext->Current(), CSFColor.Name()); \n\ -\n"); - - CString text(Message.ToCString()); - (*myCResultDialog).SetTitle(CString("Setting Color")); - (*myCResultDialog).SetText(text); -} - - -void DlgAttributes::OnWireframe() -{ - for(myAISContext->InitCurrent(); myAISContext->MoreCurrent(); - myAISContext->NextCurrent()) - myAISContext->SetDisplayMode(myAISContext->Current(), 0); - -TCollection_AsciiString Message ("\ -\n\ -for (myAISContext->InitCurrent(); myAISContext->MoreCurrent (); \n\ - myAISContext->NextCurrent ()) \n\ - myAISContext->SetDisplayMode(myAISContext->Current(), 0); \n\ -\n"); - - CString text(Message.ToCString()); - (*myCResultDialog).SetTitle(CString("Wireframe")); - (*myCResultDialog).SetText(text); -} - -void DlgAttributes::Set(Handle ( AIS_InteractiveContext ) & acontext, CResultDialog& aResultDialog) -{ - myAISContext = acontext; - myCResultDialog=&aResultDialog; -} - -void DlgAttributes::OnTransparency() -{ -/* - for (myAISContext->InitCurrent(); myAISContext->MoreCurrent (); - myAISContext->NextCurrent ()) { - - - int ival = (int) ((double) myAISContext->Current()->Transparency()*10.) ; - double rval = ((double) ival)/10.; - CDialogTransparency Dlg(NULL, rval); - if(Dlg.DoModal()== IDOK) - myAISContext->SetTransparency (myAISContext->Current(),Dlg.m_transvalue); - - } -*/ - /* - CDialogTransparency DialBox(myAISContext); - DialBox.DoModal(); - CMDIFrameWnd *pFrame = (CMDIFrameWnd*)AfxGetApp()->m_pMainWnd; - CMDIChildWnd *pChild = (CMDIChildWnd *) pFrame->GetActiveFrame(); - OCC_3dView *pView = (OCC_3dView *) pChild->GetActiveView(); - pView->Redraw(); - */ - myAISContext->InitCurrent(); - if(myAISContext->NbCurrents() > 0){ - CDialogTransparency DialBox(myAISContext, AfxGetMainWnd()); - DialBox.DoModal(); - CMDIFrameWnd *pFrame = (CMDIFrameWnd*)AfxGetApp()->m_pMainWnd; - CMDIChildWnd *pChild = (CMDIChildWnd *) pFrame->GetActiveFrame(); - OCC_3dView *pView = (OCC_3dView *) pChild->GetActiveView(); - pView->Redraw(); - } - -TCollection_AsciiString Message ("\ -\n\ -for (myAISContext->InitCurrent(); myAISContext->MoreCurrent (); \n\ - myAISContext->NextCurrent ()) \n\ - myAISContext->SetTransparency (myAISContext->Current(),Dlg.m_transvalue); \n\ -\n"); - - CString text(Message.ToCString()); - (*myCResultDialog).SetTitle(CString("Setting Transparency")); - (*myCResultDialog).SetText(text); -} - - - -void DlgAttributes::OnObjectMaterialAluminium () { SetMaterial ( Graphic3d_NOM_ALUMINIUM ) ; } -void DlgAttributes::OnObjectMaterialBrass () { SetMaterial ( Graphic3d_NOM_BRASS ) ; } -void DlgAttributes::OnObjectMaterialBronze () { SetMaterial ( Graphic3d_NOM_BRONZE ) ; } -void DlgAttributes::OnObjectMaterialChrome () { SetMaterial ( Graphic3d_NOM_CHROME ) ; } -void DlgAttributes::OnObjectMaterialCopper () { SetMaterial ( Graphic3d_NOM_COPPER ) ; } -void DlgAttributes::OnObjectMaterialGold () { SetMaterial ( Graphic3d_NOM_GOLD ) ; } -void DlgAttributes::OnObjectMaterialJade () { SetMaterial ( Graphic3d_NOM_JADE ) ; } -void DlgAttributes::OnObjectMaterialMetalized () { SetMaterial ( Graphic3d_NOM_METALIZED ) ; } -void DlgAttributes::OnObjectMaterialNeonGNC () { SetMaterial ( Graphic3d_NOM_NEON_GNC ) ; } -void DlgAttributes::OnObjectMaterialNeonPHC () { SetMaterial ( Graphic3d_NOM_NEON_PHC ) ; } -void DlgAttributes::OnObjectMaterialObsidian () { SetMaterial ( Graphic3d_NOM_OBSIDIAN ) ; } -void DlgAttributes::OnObjectMaterialPewter () { SetMaterial ( Graphic3d_NOM_PEWTER ) ; } -void DlgAttributes::OnObjectMaterialPlaster () { SetMaterial ( Graphic3d_NOM_PLASTER ) ; } -void DlgAttributes::OnObjectMaterialPlastic () { SetMaterial ( Graphic3d_NOM_PLASTIC ) ; } -void DlgAttributes::OnObjectMaterialSatin () { SetMaterial ( Graphic3d_NOM_SATIN ) ; } -void DlgAttributes::OnObjectMaterialShinyPlastic () { SetMaterial ( Graphic3d_NOM_SHINY_PLASTIC ) ; } -void DlgAttributes::OnObjectMaterialSilver () { SetMaterial ( Graphic3d_NOM_SILVER ) ; } -void DlgAttributes::OnObjectMaterialSteel () { SetMaterial ( Graphic3d_NOM_STEEL ) ; } -void DlgAttributes::OnObjectMaterialStone () { SetMaterial ( Graphic3d_NOM_STONE ) ; } -void DlgAttributes::OnObjectMaterialDefault () { SetMaterial ( Graphic3d_NOM_DEFAULT ) ; } - -void DlgAttributes::SetMaterial(Graphic3d_NameOfMaterial Material) -{ - for (myAISContext->InitCurrent();myAISContext->MoreCurrent ();myAISContext->NextCurrent ()) - myAISContext->SetMaterial (myAISContext->Current(), - (Graphic3d_NameOfMaterial)(Material)); - - TCollection_AsciiString aString; - TCollection_AsciiString Message1 ("\ -\n\ -for (myAISContext->InitCurrent(); myAISContext->MoreCurrent (); \n\ - myAISContext->NextCurrent ()) \n\ - myAISContext->SetMaterial (myAISContext->Current(), "); - - TCollection_AsciiString Message2("); \n\ -\n"); - switch (Material){ - case 0: - aString = "Graphic3d_NOM_BRASS"; - break; - case 1: - aString = "Graphic3d_NOM_BRONZE"; - break; - case 2: - aString = "Graphic3d_NOM_COPPER"; - break; - case 3: - aString = "Graphic3d_NOM_GOLD"; - break; - case 4: - aString = "Graphic3d_NOM_PEWTER"; - break; - case 5: - aString = "Graphic3d_NOM_PLASTER"; - break; - case 6: - aString = "Graphic3d_NOM_PLASTIC"; - break; - case 7: - aString = "Graphic3d_NOM_SILVER"; - break; - case 8: - aString = "Graphic3d_NOM_STEEL"; - break; - case 9: - aString = "Graphic3d_NOM_STONE"; - break; - case 10: - aString = "Graphic3d_NOM_SHINY_PLASTIC"; - break; - case 11: - aString = "Graphic3d_NOM_SATIN"; - break; - case 12: - aString = "Graphic3d_NOM_METALIZED"; - break; - case 13: - aString = "Graphic3d_NOM_NEON_GNC"; - break; - case 14: - aString = "Graphic3d_NOM_CHROME"; - break; - case 15: - aString = "Graphic3d_NOM_ALUMINIUM"; - break; - case 16: - aString = "Graphic3d_NOM_OBSIDIAN"; - break; - case 17: - aString = "Graphic3d_NOM_NEON_PHC"; - break; - case 18: - aString = "Graphic3d_NOM_JADE"; - break; - case 19: - aString = "Graphic3d_NOM_DEFAULT"; - break; - default: - break; - } - - Message1 = Message1 +aString +Message2; - //Graphic3d_MaterialAspect aAspect (Material); - //Standard_CString aString = aAspect.MaterialName(); - - CString text(Message1.ToCString()); - (*myCResultDialog).SetTitle(CString("Setting Material")); - (*myCResultDialog).SetText(text); - -} - -void DlgAttributes::OnUpdateObjectTransparency(CCmdUI* pCmdUI) -{ - bool OneOrMoreInShading = false; - for (myAISContext->InitCurrent();myAISContext->MoreCurrent ();myAISContext->NextCurrent ()) - if (myAISContext->IsDisplayed(myAISContext->Current(),1)) OneOrMoreInShading=true; - pCmdUI->Enable (OneOrMoreInShading); -} - - - -void DlgAttributes::OnShading() -{ - for(myAISContext->InitCurrent(); myAISContext->MoreCurrent(); - myAISContext->NextCurrent()) - myAISContext->SetDisplayMode(myAISContext->Current(), 1); - - -TCollection_AsciiString Message ("\ -\n\ -for (myAISContext->InitCurrent(); myAISContext->MoreCurrent (); \n\ - myAISContext->NextCurrent ()) \n\ - myAISContext->SetDisplayMode(myAISContext->Current(), 1); \n\ -\n"); - - CString text(Message.ToCString()); - (*myCResultDialog).SetTitle(CString("Shading")); - (*myCResultDialog).SetText(text); -} diff --git a/samples/mfc/standard/04_Viewer3d/src/DlgAttributes.h b/samples/mfc/standard/04_Viewer3d/src/DlgAttributes.h deleted file mode 100755 index 8d8669325c..0000000000 --- a/samples/mfc/standard/04_Viewer3d/src/DlgAttributes.h +++ /dev/null @@ -1,83 +0,0 @@ -// DlgAttributes.h : header file -// - -#if !defined(AFX_DLGATTRIBUTES_H__AF548353_9EF6_11D1_A47D_00C095ECDA78__INCLUDED_) -#define AFX_DLGATTRIBUTES_H__AF548353_9EF6_11D1_A47D_00C095ECDA78__INCLUDED_ - -#if _MSC_VER >= 1000 -#pragma once -#endif // _MSC_VER >= 1000 - -#include -#include - -///////////////////////////////////////////////////////////////////////////// -// DlgAttributes dialog - -class DlgAttributes : public CDialog -{ -// Construction -public: - void Set(Handle(AIS_InteractiveContext)& acontext, CResultDialog& aResultDialog); - DlgAttributes(CWnd* pParent=NULL); - -// Dialog Data - //{{AFX_DATA(DlgAttributes) - enum { IDD = IDD_ATTRIBUTES }; - // NOTE: the ClassWizard will add data members here - //}}AFX_DATA - - -// Overrides - // ClassWizard generated virtual function overrides - //{{AFX_VIRTUAL(DlgAttributes) - protected: - virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support - //}}AFX_VIRTUAL - -// Implementation -protected: - - // Generated message map functions - //{{AFX_MSG(DlgAttributes) - afx_msg void OnColor(); - afx_msg void OnWireframe(); - afx_msg void OnTransparency() ; - afx_msg void OnShading(); - afx_msg void OnObjectMaterialAluminium(); - afx_msg void OnObjectMaterialBrass(); - afx_msg void OnObjectMaterialBronze(); - afx_msg void OnObjectMaterialChrome(); - afx_msg void OnObjectMaterialCopper(); - afx_msg void OnObjectMaterialGold(); - afx_msg void OnObjectMaterialJade(); - afx_msg void OnObjectMaterialMetalized(); - afx_msg void OnObjectMaterialNeonGNC(); - afx_msg void OnObjectMaterialNeonPHC(); - afx_msg void OnObjectMaterialObsidian(); - afx_msg void OnObjectMaterialPewter(); - afx_msg void OnObjectMaterialPlastic(); - afx_msg void OnObjectMaterialPlaster(); - afx_msg void OnObjectMaterialSatin(); - afx_msg void OnObjectMaterialShinyPlastic(); - afx_msg void OnObjectMaterialSilver(); - afx_msg void OnObjectMaterialSteel(); - afx_msg void OnObjectMaterialStone(); - afx_msg void OnObjectMaterialDefault(); - - afx_msg void OnUpdateObjectTransparency(CCmdUI* pCmdUI) ; - - - //}}AFX_MSG - DECLARE_MESSAGE_MAP() - void SetMaterial (Graphic3d_NameOfMaterial Material); - -private: - Handle(AIS_InteractiveContext) myAISContext; - CResultDialog* myCResultDialog; -}; - -//{{AFX_INSERT_LOCATION}} -// Microsoft Developer Studio will insert additional declarations immediately before the previous line. - -#endif // !defined(AFX_DLGATTRIBUTES_H__AF548353_9EF6_11D1_A47D_00C095ECDA78__INCLUDED_) diff --git a/samples/mfc/standard/04_Viewer3d/src/DlgIsos.cpp b/samples/mfc/standard/04_Viewer3d/src/DlgIsos.cpp deleted file mode 100755 index 4de80476da..0000000000 --- a/samples/mfc/standard/04_Viewer3d/src/DlgIsos.cpp +++ /dev/null @@ -1,49 +0,0 @@ -// DlgIsos.cpp : implementation file -// - -#include "stdafx.h" - -#include "DlgIsos.h" - -#include "Viewer3dApp.h" - -#ifdef _DEBUG -#define new DEBUG_NEW -#undef THIS_FILE -static char THIS_FILE[] = __FILE__; -#endif - -///////////////////////////////////////////////////////////////////////////// -// DlgIsos dialog - - -DlgIsos::DlgIsos(CWnd* pParent, - int nisou, - int nisov) - : CDialog(DlgIsos::IDD, pParent) -{ - //{{AFX_DATA_INIT(DlgIsos) - m_isou = nisou; - m_isov = nisov; - //}}AFX_DATA_INIT -} - - -void DlgIsos::DoDataExchange(CDataExchange* pDX) -{ - CDialog::DoDataExchange(pDX); - //{{AFX_DATA_MAP(DlgIsos) - DDX_Text(pDX, IDC_EDIT_ISOU, m_isou); - DDX_Text(pDX, IDC_EDIT_ISOV, m_isov); - //}}AFX_DATA_MAP -} - - -BEGIN_MESSAGE_MAP(DlgIsos, CDialog) - //{{AFX_MSG_MAP(DlgIsos) - // NOTE: the ClassWizard will add message map macros here - //}}AFX_MSG_MAP -END_MESSAGE_MAP() - -///////////////////////////////////////////////////////////////////////////// -// DlgIsos message handlers diff --git a/samples/mfc/standard/04_Viewer3d/src/DlgIsos.h b/samples/mfc/standard/04_Viewer3d/src/DlgIsos.h deleted file mode 100755 index 0853be19f1..0000000000 --- a/samples/mfc/standard/04_Viewer3d/src/DlgIsos.h +++ /dev/null @@ -1,52 +0,0 @@ -// DlgIsos.h : header file -// - -#include "stdafx.h" - -#if !defined(AFX_DLGISOS_H__AD159C33_9EDC_11D1_A47D_00C095ECDA78__INCLUDED_) -#define AFX_DLGISOS_H__AD159C33_9EDC_11D1_A47D_00C095ECDA78__INCLUDED_ - -#if _MSC_VER >= 1000 -#pragma once -#endif // _MSC_VER >= 1000 - -///////////////////////////////////////////////////////////////////////////// -// DlgIsos dialog - -class DlgIsos : public CDialog -{ -// Construction -public: - DlgIsos(CWnd* pParent, - int nisou, - int nisov); // standard constructor - -// Dialog Data - //{{AFX_DATA(DlgIsos) - enum { IDD = IDD_ISOS }; - int m_isou; - int m_isov; - //}}AFX_DATA - - -// Overrides - // ClassWizard generated virtual function overrides - //{{AFX_VIRTUAL(DlgIsos) - protected: - virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support - //}}AFX_VIRTUAL - -// Implementation -protected: - - // Generated message map functions - //{{AFX_MSG(DlgIsos) - // NOTE: the ClassWizard will add member functions here - //}}AFX_MSG - DECLARE_MESSAGE_MAP() -}; - -//{{AFX_INSERT_LOCATION}} -// Microsoft Developer Studio will insert additional declarations immediately before the previous line. - -#endif // !defined(AFX_DLGISOS_H__AD159C33_9EDC_11D1_A47D_00C095ECDA78__INCLUDED_) diff --git a/samples/mfc/standard/04_Viewer3d/src/ISession_Curve.cpp b/samples/mfc/standard/04_Viewer3d/src/ISession_Curve.cpp deleted file mode 100755 index 6d6fb6de72..0000000000 --- a/samples/mfc/standard/04_Viewer3d/src/ISession_Curve.cpp +++ /dev/null @@ -1,52 +0,0 @@ -// ISession_Curve.cpp: implementation of the ISession_Curve class. -// -////////////////////////////////////////////////////////////////////// - -#include "stdafx.h" -#include "ISession_Curve.h" -#include -#include -#include -#include -#include - -IMPLEMENT_STANDARD_RTTIEXT(ISession_Curve,AIS_InteractiveObject) - -#ifdef _DEBUG -#undef THIS_FILE -static char THIS_FILE[]=__FILE__; -#endif - -////////////////////////////////////////////////////////////////////// -// Construction/Destruction -////////////////////////////////////////////////////////////////////// - - -ISession_Curve::ISession_Curve(const Handle(Geom_Curve)& aCurve) -:AIS_InteractiveObject(),myCurve(aCurve) -{ -} - -ISession_Curve::~ISession_Curve() -{ - -} -void ISession_Curve::Compute(const Handle(PrsMgr_PresentationManager)& /*aPresentationManager*/, - const Handle(Prs3d_Presentation)& aPresentation, - const Standard_Integer /*aMode*/) -{ - GeomAdaptor_Curve anAdaptorCurve(myCurve); - if (hasOwnColor) - myDrawer->LineAspect()->SetColor (myDrawer->Color()); - myDrawer->Link()->SetDiscretisation(100); - myDrawer->Link()->SetMaximalParameterValue(500); - - StdPrs_Curve::Add (aPresentation, anAdaptorCurve, myDrawer); -} - -void ISession_Curve::ComputeSelection(const Handle(SelectMgr_Selection)& /*aSelection*/, - const Standard_Integer /*aMode*/) -{ -} - - diff --git a/samples/mfc/standard/04_Viewer3d/src/ISession_Curve.h b/samples/mfc/standard/04_Viewer3d/src/ISession_Curve.h deleted file mode 100755 index c1c955fdf9..0000000000 --- a/samples/mfc/standard/04_Viewer3d/src/ISession_Curve.h +++ /dev/null @@ -1,32 +0,0 @@ -// ISession_Curve.h: interface for the ISession_Curve class. -// -////////////////////////////////////////////////////////////////////// - -#if !defined(AFX_ISESSION_CURVE_H__F981CB93_A3CC_11D1_8DA3_0800369C8A03__INCLUDED_) -#define AFX_ISESSION_CURVE_H__F981CB93_A3CC_11D1_8DA3_0800369C8A03__INCLUDED_ - -#if _MSC_VER >= 1000 -#pragma once -#endif // _MSC_VER >= 1000 -#include -#include -#include -#include -class ISession_Curve; -DEFINE_STANDARD_HANDLE(ISession_Curve,AIS_InteractiveObject) - -class ISession_Curve : public AIS_InteractiveObject -{ -public: - ISession_Curve(const Handle(Geom_Curve)& aCurve); - virtual ~ISession_Curve(); -DEFINE_STANDARD_RTTIEXT(ISession_Curve,AIS_InteractiveObject) -private: - -Standard_EXPORT virtual void Compute(const Handle(PrsMgr_PresentationManager)& aPresentationManager,const Handle(Prs3d_Presentation)& aPresentation,const Standard_Integer aMode = 0) ; -void ComputeSelection(const Handle(SelectMgr_Selection)& aSelection,const Standard_Integer aMode) ; - -Handle(Geom_Curve) myCurve; -}; - -#endif // !defined(AFX_ISESSION_CURVE_H__F981CB93_A3CC_11D1_8DA3_0800369C8A03__INCLUDED_) diff --git a/samples/mfc/standard/04_Viewer3d/src/ModelClippingDlg.cpp b/samples/mfc/standard/04_Viewer3d/src/ModelClippingDlg.cpp deleted file mode 100755 index 2bf031f7da..0000000000 --- a/samples/mfc/standard/04_Viewer3d/src/ModelClippingDlg.cpp +++ /dev/null @@ -1,298 +0,0 @@ -// ModelClippingDlg.cpp : implementation file -// - -#include "stdafx.h" -#include "Viewer3dApp.h" -#include "ModelClippingDlg.h" -#include "Viewer3dDoc.h" -#include "offsetdlg.h" // Added by ClassView - -#ifdef _DEBUG -#define new DEBUG_NEW -#undef THIS_FILE -static char THIS_FILE[] = __FILE__; -#endif - -#define EOL "\n" - -// ======================================================================= -// function : CModelClippingDlg -// purpose : -// ======================================================================= -CModelClippingDlg::CModelClippingDlg (Handle(V3d_View) theView, - Handle(AIS_Shape) theShape, - Handle(Graphic3d_ClipPlane) theClippingPlane, - CViewer3dDoc* theDoc, - CWnd* theParent) -: CDialog(CModelClippingDlg::IDD, theParent), - m_ModelClipping_Z (0.0), - myModelClipping_Z (0.0), - m_ModelClippingONOFF (FALSE), - myView (theView), - myShape (theShape), - myClippingPlane (theClippingPlane), - myDoc (theDoc) -{} - -// ======================================================================= -// function : DoDataExchange -// purpose : -// ======================================================================= -void CModelClippingDlg::DoDataExchange(CDataExchange* pDX) -{ - CDialog::DoDataExchange(pDX); - //{{AFX_DATA_MAP(CModelClippingDlg) - DDX_Control(pDX, IDC_SLIDER_MODELCLIPPING_Z, m_ModelClippingZSlidCtrl); - DDX_Text(pDX, IDC_EDIT_MODELCLIPPING_Z, m_ModelClipping_Z); - DDX_Check(pDX, IDC_CHECK_MODELCLIPPINGONOFF, m_ModelClippingONOFF); - //}}AFX_DATA_MAP -} - - -BEGIN_MESSAGE_MAP(CModelClippingDlg, CDialog) - //{{AFX_MSG_MAP(CModelClippingDlg) - ON_WM_HSCROLL() - ON_EN_CHANGE(IDC_EDIT_MODELCLIPPING_Z, OnChangeEditModelclippingZ) - ON_BN_CLICKED(IDC_CHECK_MODELCLIPPINGONOFF, OnCheckModelclippingonoff) - //}}AFX_MSG_MAP -END_MESSAGE_MAP() - -// ======================================================================= -// function : OnHScroll -// purpose : -// ======================================================================= -void CModelClippingDlg::OnHScroll(UINT nSBCode, UINT nPos, CScrollBar* pScrollBar) -{ - UpdateData(TRUE); - - m_ModelClipping_Z = m_ModelClippingZSlidCtrl.GetPos(); - - UpdateData(FALSE); - - // Setting the ZClipping depth at m_ZClippingDepth value - gp_Pln aPlane (gp_Pnt (-m_ModelClipping_Z, 0.0, 0.0), gp_Dir(1.0, 0.0, 0.0)); - - myClippingPlane->SetEquation (aPlane); - - gp_Trsf myTrsf; - myTrsf.SetTranslation (gp_Pnt (m_ModelClipping_Z, 0.0, 0.0), gp_Pnt(myModelClipping_Z, 0.0, 0.0)); - - // transform presentation shape - if (m_ModelClippingONOFF) - { - myDoc->GetAISContext()->SetLocation (myShape, TopLoc_Location (myTrsf)); - myDoc->GetAISContext()->Redisplay (myShape, Standard_True); - myView->Update(); - } - else - { - myShape->SetLocalTransformation (myTrsf); - } - - TCollection_AsciiString aMessage ( - EOL "gp_Pln aPlane (gp_Pnt (-m_ModelClipping_Z, 0.0, 0.0), gp_Dir(1.0, 0.0, 0.0));" - EOL - EOL "myClippingPlane->SetEquation (aPlane);\n" ); - - // Update The Result Message Dialog - myDoc->UpdateResultMessageDlg ("Change clipping plane", aMessage); - - CDialog::OnHScroll (nSBCode, nPos, pScrollBar); -} - -// ======================================================================= -// function : OnInitDialog -// purpose : -// ======================================================================= -BOOL CModelClippingDlg::OnInitDialog() -{ - CDialog::OnInitDialog(); - - const Graphic3d_ClipPlane::Equation aPlaneEquation = myClippingPlane->GetEquation(); - - // m_ModelClipping_Z = D (plane coefficient) - m_ModelClipping_Z = aPlaneEquation[3]; - m_ModelClippingZSlidCtrl.SetRange (-750, 750, TRUE); - m_ModelClippingZSlidCtrl.SetPos ((int)floor (m_ModelClipping_Z)); - - m_ModelClippingONOFF = myClippingPlane->IsOn(); - - if (m_ModelClippingONOFF) - { - // register and activate clipping plane - Standard_Boolean toAddPlane = Standard_True; - Handle(Graphic3d_SequenceOfHClipPlane) aPlanes = myView->ClipPlanes(); - if (!aPlanes.IsNull()) - { - for (Graphic3d_SequenceOfHClipPlane::Iterator aPlaneIt (*aPlanes); aPlaneIt.More(); aPlaneIt.Next()) - { - if (aPlaneIt.Value() == myClippingPlane) - { - toAddPlane = Standard_False; - break; - } - } - } - - if (toAddPlane) - { - myView->AddClipPlane (myClippingPlane); - } - - myClippingPlane->SetOn (Standard_True); - - myDoc->GetAISContext()->Display (myShape, Standard_True); - } - - UpdateData (FALSE); - - return TRUE; -} - -// ======================================================================= -// function : OnChangeEditModelclippingZ -// purpose : -// ======================================================================= -void CModelClippingDlg::OnChangeEditModelclippingZ() -{ - UpdateData (TRUE); - - m_ModelClippingZSlidCtrl.SetPos ((int)floor (m_ModelClipping_Z)); - - // Change clipping plane - gp_Pln aPlane (gp_Pnt (-m_ModelClipping_Z, 0.0, 0.0), gp_Dir (1.0, 0.0, 0.0)); - - myClippingPlane->SetEquation (aPlane); - - // transform presentation shape - gp_Trsf myTrsf; - myTrsf.SetTranslation ( gp_Pnt (m_ModelClipping_Z, 0.0, 0.0), gp_Pnt (myModelClipping_Z, 0.0, 0.0)); - - // transform presentation shape - if (m_ModelClippingONOFF) - { - myDoc->GetAISContext()->SetLocation (myShape, TopLoc_Location (myTrsf)); - myDoc->GetAISContext()->Redisplay (myShape, Standard_False); - myView->Update(); - } - else - { - myShape->SetLocalTransformation (myTrsf); - } - - myModelClipping_Z = m_ModelClipping_Z; - - TCollection_AsciiString aMessage ( - EOL "gp_Pln aPlane (gp_Pnt (-m_ModelClipping_Z, 0.0, 0.0), gp_Dir(1.0, 0.0, 0.0));" - EOL - EOL "myClippingPlane->SetEquation (aPlane);\n" ); - - // Update The Result Message Dialog - myDoc->UpdateResultMessageDlg ("Change clipping plane", aMessage); -} - -// ======================================================================= -// function : OnCheckModelclippingonoff -// purpose : -// ======================================================================= -void CModelClippingDlg::OnCheckModelclippingonoff() -{ - UpdateData(TRUE); - - if (m_ModelClippingONOFF) - { - // register and activate clipping plane - Standard_Boolean toAddPlane = Standard_True; - Handle(Graphic3d_SequenceOfHClipPlane) aPlanes = myView->ClipPlanes(); - if (!aPlanes.IsNull()) - { - for (Graphic3d_SequenceOfHClipPlane::Iterator aPlaneIt (*aPlanes); aPlaneIt.More(); aPlaneIt.Next()) - { - if (aPlaneIt.Value() == myClippingPlane) - { - toAddPlane = Standard_False; - break; - } - } - } - - if (toAddPlane) - { - myView->AddClipPlane (myClippingPlane); - } - - myClippingPlane->SetOn (Standard_True); - - myDoc->GetAISContext()->Display (myShape, Standard_False); - } - else - { - // deactivate clipping plane - myClippingPlane->SetOn (Standard_False); - - myDoc->GetAISContext()->Remove (myShape, Standard_False); - } - - myView->Update(); - - TCollection_AsciiString aMessage ( - EOL "if (...)" - EOL "{" - EOL " // register and activate clipping plane" - EOL " if (!myView->ClipPlanes()->Contains (myClippingPlane))" - EOL " {" - EOL " myView->AddClipPlane (myClippingPlane);" - EOL " }" - EOL - EOL " myClippingPlane->SetOn (Standard_True);" - EOL "}" - EOL "else" - EOL "{" - EOL " // deactivate clipping plane" - EOL " myClippingPlane->SetOn (Standard_False);" - EOL "}" ); - - myDoc->UpdateResultMessageDlg ("Switch clipping on/off", aMessage); -} - -// ======================================================================= -// function : OnCancel -// purpose : -// ======================================================================= -void CModelClippingDlg::OnCancel() -{ - UpdateData(TRUE); - - if (m_ModelClippingONOFF) - { - // remove and deactivate clipping plane - myView->RemoveClipPlane (myClippingPlane); - - myClippingPlane->SetOn (Standard_False); - } - - m_ModelClippingONOFF=FALSE; - - if (!myShape.IsNull()) - { - myDoc->GetAISContext()->Remove (myShape, Standard_False); - } - - myView->Update(); - - CDialog::OnCancel(); -} - -// ======================================================================= -// function : OnOK -// purpose : -// ======================================================================= -void CModelClippingDlg::OnOK() -{ - if (!myShape.IsNull()) - { - myDoc->GetAISContext()->Remove (myShape, Standard_True); - } - - CDialog::OnOK(); -} diff --git a/samples/mfc/standard/04_Viewer3d/src/ModelClippingDlg.h b/samples/mfc/standard/04_Viewer3d/src/ModelClippingDlg.h deleted file mode 100755 index dc8533c96f..0000000000 --- a/samples/mfc/standard/04_Viewer3d/src/ModelClippingDlg.h +++ /dev/null @@ -1,68 +0,0 @@ -#if !defined(AFX_MODELCLIPPINGDLG_H__E206D99D_646E_11D3_8D0A_00AA00D10994__INCLUDED_) -#define AFX_MODELCLIPPINGDLG_H__E206D99D_646E_11D3_8D0A_00AA00D10994__INCLUDED_ - -#if _MSC_VER >= 1000 -#pragma once -#endif // _MSC_VER >= 1000 -// ModelClippingDlg.h : header file -// - -///////////////////////////////////////////////////////////////////////////// -// CModelClippingDlg dialog -#include "Viewer3dDoc.h" - -#include - -class CModelClippingDlg : public CDialog -{ -public: - - //! Standard constructor. - CModelClippingDlg (Handle(V3d_View) theView, - Handle(AIS_Shape) theShape, - Handle(Graphic3d_ClipPlane) theClippingPlane, - CViewer3dDoc* theDoc, - CWnd* theParent = NULL); - -// Dialog Data - //{{AFX_DATA(CModelClippingDlg) - enum { IDD = IDD_MODELCLIPPING }; - CSliderCtrl m_ModelClippingZSlidCtrl; - double m_ModelClipping_Z; - BOOL m_ModelClippingONOFF; - //}}AFX_DATA - - -// Overrides - // ClassWizard generated virtual function overrides - //{{AFX_VIRTUAL(CModelClippingDlg) - protected: - virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support - //}}AFX_VIRTUAL - -// Implementation -protected: - - // Generated message map functions - //{{AFX_MSG(CModelClippingDlg) - afx_msg void OnHScroll(UINT nSBCode, UINT nPos, CScrollBar* pScrollBar); - virtual BOOL OnInitDialog(); - afx_msg void OnChangeEditModelclippingZ(); - afx_msg void OnCheckModelclippingonoff(); - virtual void OnCancel(); - virtual void OnOK(); - //}}AFX_MSG - DECLARE_MESSAGE_MAP() - -private: - Handle(V3d_View) myView; - Handle(AIS_Shape) myShape; - Handle(Graphic3d_ClipPlane) myClippingPlane; - CViewer3dDoc* myDoc; - double myModelClipping_Z; -}; - -//{{AFX_INSERT_LOCATION}} -// Microsoft Developer Studio will insert additional declarations immediately before the previous line. - -#endif // !defined(AFX_MODELCLIPPINGDLG_H__E206D99D_646E_11D3_8D0A_00AA00D10994__INCLUDED_) diff --git a/samples/mfc/standard/04_Viewer3d/src/OCCDemo_Presentation.cpp b/samples/mfc/standard/04_Viewer3d/src/OCCDemo_Presentation.cpp deleted file mode 100755 index 10b73db8e9..0000000000 --- a/samples/mfc/standard/04_Viewer3d/src/OCCDemo_Presentation.cpp +++ /dev/null @@ -1,329 +0,0 @@ -// OCCDemo_Presentation.cpp: implementation of the OCCDemo_Presentation class. -// This is a base class for all presentations -////////////////////////////////////////////////////////////////////// - -#include "stdafx.h" -#include "OCCDemo_Presentation.h" -#include "Viewer3dView.h" -#include "ISession_Curve.h" - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#define MAX_PARAM 1000 // if a surface parameter is infinite, it is assigned -// this value in order to display the "infinit" object in the viewer. - - -Standard_Boolean OCCDemo_Presentation::WaitForInput (unsigned long aMilliSeconds) -{ - //::WaitForSingleObject(::CreateEvent (NULL, FALSE, FALSE, NULL), aMilliSeconds); - if (::MsgWaitForMultipleObjects(0, NULL, FALSE, aMilliSeconds, - QS_KEY | QS_MOUSEBUTTON) != WAIT_TIMEOUT) - { - MSG msg; - if (::PeekMessage (&msg, NULL, 0, 0, PM_NOREMOVE)) - { - if (msg.message == WM_KEYUP) - { - ::PeekMessage (&msg, NULL, 0, 0, PM_REMOVE); - return WaitForInput (aMilliSeconds); - } - else - return Standard_True; - } - } - return Standard_False; -} - -//================================================================ -// Function : fixParam -// Purpose : assigns a finite value to theParam if it's infinite -// (equal to +- Precision::Infinite()) -//================================================================ -static Standard_Boolean fixParam(Standard_Real& theParam) -{ - Standard_Boolean aResult = Standard_False; - if (Precision::IsNegativeInfinite(theParam)) - { - theParam = -MAX_PARAM; - aResult = Standard_True; - } - if (Precision::IsPositiveInfinite(theParam)) - { - theParam = MAX_PARAM; - aResult = Standard_True; - } - return aResult; -} - -//================================================================ -// Function : DrawSurface -// Purpose : displays a given geometric surface in 3d viewer -// (creates a finite face and displays it) -//================================================================ -Handle(AIS_InteractiveObject) OCCDemo_Presentation::drawSurface - (const Handle(Geom_Surface)& theSurface, - const Quantity_Color& theColor, - const Standard_Boolean toDisplay) -{ - Standard_Real u1, u2, v1, v2; - theSurface->Bounds(u1,u2,v1,v2); - fixParam(u1); - fixParam(u2); - fixParam(v1); - fixParam(v2); - - Handle(AIS_Shape) aGraphicSurface = - new AIS_Shape(BRepBuilderAPI_MakeFace (theSurface, u1, u2, v1, v2, Precision::Confusion())); - - getAISContext()->SetMaterial(aGraphicSurface, Graphic3d_NOM_PLASTIC, toDisplay); - getAISContext()->SetColor(aGraphicSurface, theColor, toDisplay); - if (toDisplay) { - if (FitMode){ - getAISContext()->Display (aGraphicSurface, Standard_False); - CViewer3dDoc::Fit(); - } - else - getAISContext()->Display (aGraphicSurface, Standard_True); - } - - return aGraphicSurface; -} - -//================================================================ -// Function : DrawCurve -// Purpose : displays a given curve 3d -//================================================================ -Handle(AIS_InteractiveObject) OCCDemo_Presentation::drawCurve - (const Handle(Geom_Curve)& theCurve, - const Quantity_Color& theColor, - const Standard_Boolean toDisplay) -{ - Handle(ISession_Curve) aGraphicCurve = new ISession_Curve (theCurve); - - getAISContext()->SetColor (aGraphicCurve, theColor, toDisplay); - aGraphicCurve->Attributes()->Link()->SetLineArrowDraw(Standard_False); - if (toDisplay){ - if (FitMode){ - getAISContext()->Display (aGraphicCurve, Standard_False); - CViewer3dDoc::Fit(); - } - else - getAISContext()->Display (aGraphicCurve, Standard_True); - } - - return aGraphicCurve; -} - -//================================================================ -// Function : DrawCurve -// Purpose : displays a given curve 2d -//================================================================ -Handle(AIS_InteractiveObject) OCCDemo_Presentation::drawCurve - (const Handle(Geom2d_Curve)& theCurve, - const Quantity_Color& theColor, - const Standard_Boolean toDisplay, - const gp_Ax2& aPosition) -{ - // create 3D curve in plane - Handle(Geom_Curve) aCurve3d; - if (theCurve->IsKind(STANDARD_TYPE(Geom2d_OffsetCurve))) - { - Handle(Geom2d_OffsetCurve) aOffCurve = - Handle(Geom2d_OffsetCurve)::DownCast(theCurve); - Handle(Geom_Curve) aBasCurve3d = - GeomAPI::To3d (aOffCurve->BasisCurve(), gp_Pln(aPosition)); - Standard_Real aDist = aOffCurve->Offset(); - aCurve3d = new Geom_OffsetCurve (aBasCurve3d, aDist, aPosition.Direction()); - } - else - { - aCurve3d = GeomAPI::To3d (theCurve, gp_Pln(aPosition)); - } - return drawCurve (aCurve3d, theColor, toDisplay); -} - -//================================================================ -// Function : drawPoint -// Purpose : displays a given point -//================================================================ -Handle(AIS_Point) OCCDemo_Presentation::drawPoint - (const gp_Pnt& aPnt, - const Quantity_Color& theColor, - const Standard_Boolean toDisplay) -{ - Handle(AIS_Point) aGraphicPoint = new AIS_Point (new Geom_CartesianPoint(aPnt)); - - getAISContext()->SetColor (aGraphicPoint, theColor, toDisplay); - if (toDisplay) { - getAISContext()->Display (aGraphicPoint, Standard_True); - //COCCDemoDoc::Fit(); - } - - return aGraphicPoint; -} - -//================================================================ -// Function : drawVector -// Purpose : displays a given vector in 3d viewer -// (segment of line starting at thePnt with the arrow at the end, -// the length of segment is the length of the vector) -//================================================================ -Handle(AIS_InteractiveObject) OCCDemo_Presentation::drawVector - (const gp_Pnt& thePnt, - const gp_Vec& theVec, - const Quantity_Color& theColor, - const Standard_Boolean toDisplay) -{ - Standard_Real aLength = theVec.Magnitude(); - if (aLength < Precision::Confusion()) - return Handle(AIS_InteractiveObject)(); - - Handle(Geom_Curve) aCurve = new Geom_Line (thePnt, theVec); - aCurve = new Geom_TrimmedCurve (aCurve, 0, aLength); - - Handle(ISession_Curve) aGraphicCurve = new ISession_Curve (aCurve); - - getAISContext()->SetColor (aGraphicCurve, theColor, toDisplay); - Handle(Prs3d_Drawer) aDrawer = aGraphicCurve->Attributes()->Link(); - aDrawer->SetLineArrowDraw(Standard_True); - aDrawer->ArrowAspect()->SetLength(aLength/10); - if (toDisplay) { - if (FitMode){ - getAISContext()->Display (aGraphicCurve, Standard_False); - CViewer3dDoc::Fit(); - } - else - getAISContext()->Display (aGraphicCurve, Standard_True); - } - - return aGraphicCurve; -} - - -Handle(AIS_Shape) OCCDemo_Presentation::drawShape - (const TopoDS_Shape& theShape,const Quantity_Color& theColor, - const Standard_Boolean toDisplay) -{ - Handle(AIS_Shape) aGraphicShape = new AIS_Shape(theShape); - - getAISContext()->SetMaterial(aGraphicShape, Graphic3d_NOM_PLASTIC, toDisplay); - getAISContext()->SetColor (aGraphicShape, theColor, toDisplay); - if (toDisplay){ - if (FitMode){ - getAISContext()->Display (aGraphicShape, Standard_False); - CViewer3dDoc::Fit(); - } - else - getAISContext()->Display (aGraphicShape, Standard_True); - } - - return aGraphicShape; -} - -Handle(AIS_Shape) OCCDemo_Presentation::drawShape - (const TopoDS_Shape& theShape, - const Graphic3d_NameOfMaterial theMaterial, - const Standard_Boolean toDisplay) -{ - Handle(AIS_Shape) aGraphicShape = new AIS_Shape(theShape); - - getAISContext()->SetMaterial(aGraphicShape, theMaterial, toDisplay); - if (toDisplay) { - if (FitMode){ - getAISContext()->Display (aGraphicShape, Standard_False); - CViewer3dDoc::Fit(); - } - else - getAISContext()->Display (aGraphicShape, Standard_True); - } - - return aGraphicShape; -} - -void OCCDemo_Presentation::GetViewAt (Standard_Real& theX, Standard_Real& theY, Standard_Real& theZ) -{ - CMDIFrameWnd *pFrame = (CMDIFrameWnd*)AfxGetApp()->m_pMainWnd; - CMDIChildWnd *pChild = (CMDIChildWnd *) pFrame->GetActiveFrame(); - CViewer3dView *pView = (CViewer3dView *) pChild->GetActiveView(); - pView->GetViewAt (theX, theY, theZ); -} - -void OCCDemo_Presentation::SetViewAt (const Standard_Real theX, const Standard_Real theY, const Standard_Real theZ) -{ - CMDIFrameWnd *pFrame = (CMDIFrameWnd*)AfxGetApp()->m_pMainWnd; - CMDIChildWnd *pChild = (CMDIChildWnd *) pFrame->GetActiveFrame(); - CViewer3dView *pView = (CViewer3dView *) pChild->GetActiveView(); - pView->SetViewAt (theX, theY, theZ); -} - -void OCCDemo_Presentation::GetViewEye(Standard_Real& X, Standard_Real& Y, Standard_Real& Z) -{ - CMDIFrameWnd *pFrame = (CMDIFrameWnd*)AfxGetApp()->m_pMainWnd; - CMDIChildWnd *pChild = (CMDIChildWnd *) pFrame->GetActiveFrame(); - CViewer3dView *pView = (CViewer3dView *) pChild->GetActiveView(); - pView->GetViewEye(X,Y,Z); -} - -void OCCDemo_Presentation::SetViewEye(Standard_Real X, Standard_Real Y, Standard_Real Z) -{ - CMDIFrameWnd *pFrame = (CMDIFrameWnd*)AfxGetApp()->m_pMainWnd; - CMDIChildWnd *pChild = (CMDIChildWnd *) pFrame->GetActiveFrame(); - CViewer3dView *pView = (CViewer3dView *) pChild->GetActiveView(); - pView->SetViewEye(X,Y,Z); -} - -Standard_Real OCCDemo_Presentation::GetViewScale() -{ - CMDIFrameWnd *pFrame = (CMDIFrameWnd*)AfxGetApp()->m_pMainWnd; - CMDIChildWnd *pChild = (CMDIChildWnd *) pFrame->GetActiveFrame(); - CViewer3dView *pView = (CViewer3dView *) pChild->GetActiveView(); - return pView->GetViewScale(); -} - -void OCCDemo_Presentation::SetViewScale(Standard_Real Coef) -{ - CMDIFrameWnd *pFrame = (CMDIFrameWnd*)AfxGetApp()->m_pMainWnd; - CMDIChildWnd *pChild = (CMDIChildWnd *) pFrame->GetActiveFrame(); - CViewer3dView *pView = (CViewer3dView *) pChild->GetActiveView(); - pView->SetViewScale(Coef); -} - -void OCCDemo_Presentation::ResetView() -{ - CMDIFrameWnd *pFrame = (CMDIFrameWnd*)AfxGetApp()->m_pMainWnd; - CMDIChildWnd *pChild = (CMDIChildWnd *) pFrame->GetActiveFrame(); - CViewer3dView *pView = (CViewer3dView *) pChild->GetActiveView(); - pView->Reset(); -} - -Handle(AIS_InteractiveContext) OCCDemo_Presentation::getAISContext() const -{ - return myDoc->GetAISContext(); -} - -Handle(V3d_Viewer) OCCDemo_Presentation::getViewer() const -{ - return myDoc->GetViewer(); -} - -Standard_CString OCCDemo_Presentation::GetDataDir() -{ - return myDoc->GetDataDir(); -} \ No newline at end of file diff --git a/samples/mfc/standard/04_Viewer3d/src/OCCDemo_Presentation.h b/samples/mfc/standard/04_Viewer3d/src/OCCDemo_Presentation.h deleted file mode 100755 index 1fa66aa451..0000000000 --- a/samples/mfc/standard/04_Viewer3d/src/OCCDemo_Presentation.h +++ /dev/null @@ -1,135 +0,0 @@ -// OCCDemo_Presentation.h: interface for the OCCDemo_Presentation class. -// This is a base class for all presentations -////////////////////////////////////////////////////////////////////// - -#if !defined(AFX_OCCDEMO_PRESENTATION_H__790EED7F_7BA2_11D5_BA4A_0060B0EE18EA__INCLUDED_) -#define AFX_OCCDEMO_PRESENTATION_H__790EED7F_7BA2_11D5_BA4A_0060B0EE18EA__INCLUDED_ - -#if _MSC_VER > 1000 -#pragma once -#endif // _MSC_VER > 1000 - -#include "Viewer3dDoc.h" - -#define WAIT_A_LITTLE WaitForInput(500) -#define WAIT_A_SECOND WaitForInput(1000) - -class CViewer3dDoc; -#include -#include -#include -#include -#include -class Quantity_Color; - -class OCCDemo_Presentation -{ -public: - // Construction - OCCDemo_Presentation() : myIndex(0), myNbSamples(0), FitMode(false){} - virtual ~OCCDemo_Presentation() {} - -public: - static OCCDemo_Presentation* Current; - // this pointer must be initialized when realize a derivable class; - // it is used by application to access to a presentation class instance - - void SetDocument (CViewer3dDoc* theDoc) {myDoc = theDoc;} - // document must be set by the user of this class before first use of iterations - -public: - // Titling - const CString& GetName() const {return myName;} - -public: - // Iteration on samples - void FirstSample() {myIndex=0;} - void LastSample() {myIndex=myNbSamples-1;} - Standard_Boolean AtFirstSample() const {return myIndex <= 0;} - Standard_Boolean AtLastSample() const {return myIndex >= myNbSamples-1;} - void NextSample() {myIndex++;} - void PrevSample() {myIndex--;} - virtual void DoSample() = 0; - static void GetViewAt (Standard_Real& theX, Standard_Real& theY, Standard_Real& theZ); - static void SetViewAt (const Standard_Real theX, const Standard_Real theY, const Standard_Real theZ); - static void GetViewEye (Standard_Real& X, Standard_Real& Y, Standard_Real& Z); - static void SetViewEye (Standard_Real X, Standard_Real Y, Standard_Real Z); - static Standard_Real GetViewScale(); - static void SetViewScale(Standard_Real Coef); - static void ResetView(); - CViewer3dDoc* getDocument() { return myDoc; } - - - // place one-time initialization code in this function - virtual void Init() {} - -protected: - // Methods to call from a derivable class - void setName (const char* theName) {myName = CString(theName);} - Handle(AIS_InteractiveContext) getAISContext() const; - Handle(V3d_Viewer) getViewer() const; -// void setResultTitle (const char* theTitle) {myDoc->GetResultDialog()->SetTitle(theTitle);} -// void setResultText (const char* theText) {myDoc->GetResultDialog()->SetText(theText);} - Standard_CString GetDataDir(); - - Standard_Boolean WaitForInput (unsigned long aMilliSeconds); - // Waits for a user input or a period of time has been elapsed - - Handle(AIS_InteractiveObject) drawSurface (const Handle(Geom_Surface)& theSurface, - const Quantity_Color& theColor = Quantity_Color(Quantity_NOC_LEMONCHIFFON3), - const Standard_Boolean toDisplay = Standard_True); - // creates a finite face based on the given geometric surface - // and displays it in the viewer if toDisplay = Standard_True - - Handle(AIS_InteractiveObject) drawCurve (const Handle(Geom_Curve)& theCurve, - const Quantity_Color& theColor = Quantity_Color(Quantity_NOC_RED), - const Standard_Boolean toDisplay = Standard_True); - // creates an ISession_Curve based on the given geometric curve - // and displays it in the viewer if toDisplay = Standard_True - - Handle(AIS_InteractiveObject) drawCurve (const Handle(Geom2d_Curve)& theCurve, - const Quantity_Color& theColor = Quantity_Color(Quantity_NOC_RED), - const Standard_Boolean toDisplay = Standard_True, - const gp_Ax2& aPosition = gp::XOY()); - // converts a given curve to 3d using aPosition and calls the previous method - - Handle(AIS_Point) drawPoint (const gp_Pnt& thePnt, - const Quantity_Color& theColor = Quantity_Color(Quantity_NOC_GREEN), - const Standard_Boolean toDisplay = Standard_True); - // creates a presentation of the given point - // and displays it in the viewer if toDisplay = Standard_True - - Handle(AIS_InteractiveObject) drawVector (const gp_Pnt& thePnt, - const gp_Vec& theVec, - const Quantity_Color& theColor = Quantity_Color(Quantity_NOC_YELLOW), - const Standard_Boolean toDisplay = Standard_True); - // creates a presentation of the given vector - // and displays it in the viewer if toDisplay = Standard_True - - Handle(AIS_Shape) drawShape (const TopoDS_Shape& theShape, - const Quantity_Color& theColor, - const Standard_Boolean toDisplay = Standard_True); - // creates a presentation of the given shape - // with material PLASTIC and a given color - // and displays it in the viewer if toDisplay = Standard_True - - Handle(AIS_Shape) drawShape (const TopoDS_Shape& theShape, - const Graphic3d_NameOfMaterial theMaterial = Graphic3d_NameOfMaterial_Brass, - const Standard_Boolean toDisplay = Standard_True); - // creates a presentation of the given shape with the given material - // (color is default for a given material) - // and displays it in the viewer if toDisplay = Standard_True - -protected: - // Fields to use in a derivable class - BOOL FitMode; - int myIndex; - int myNbSamples; - -private: - CViewer3dDoc* myDoc; - CString myName; - -}; - -#endif // !defined(AFX_OCCDEMO_PRESENTATION_H__790EED7F_7BA2_11D5_BA4A_0060B0EE18EA__INCLUDED_) diff --git a/samples/mfc/standard/04_Viewer3d/src/OffsetDlg.cpp b/samples/mfc/standard/04_Viewer3d/src/OffsetDlg.cpp deleted file mode 100755 index 9084dd3af6..0000000000 --- a/samples/mfc/standard/04_Viewer3d/src/OffsetDlg.cpp +++ /dev/null @@ -1,314 +0,0 @@ -// OffsetDlg.cpp : implementation file -// - -#include "stdafx.h" -#include "..\res\resource.h" -#include "offsetdlg.h" -#include "Viewer3dView.h" - -#ifdef _DEBUG -#define new DEBUG_NEW -#undef THIS_FILE -static char THIS_FILE[] = __FILE__; -#endif - -#define FactorMinValue 0 -#define FactorMaxValue 20 - -#define UnitsMinValue 0 -#define UnitsMaxValue 20 - - -///////////////////////////////////////////////////////////////////////////// -// COffsetDlg dialog - - -COffsetDlg::COffsetDlg(CViewer3dDoc* theDoc, CWnd* pParent /*=NULL*/) - : CDialog(COffsetDlg::IDD, pParent) -{ - //{{AFX_DATA_INIT(COffsetDlg) - m_Factor = 1.; - m_Units = 0.; - //}}AFX_DATA_INIT - myDoc = theDoc; -} - - -void COffsetDlg::DoDataExchange(CDataExchange* pDX) -{ - CDialog::DoDataExchange(pDX); - //{{AFX_DATA_MAP(COffsetDlg) - DDX_Control(pDX, IDC_SLIDER_OFFSETUNITS, m_UnitsSlidCtrl); - DDX_Control(pDX, IDC_SLIDER_OFFSETFACTOR, m_FactorSlidCtrl); - DDX_Text(pDX, IDC_EDIT_OFFSETFACTOR, m_Factor); - DDV_MinMaxDouble(pDX, m_Factor, FactorMinValue, FactorMaxValue); - DDX_Text(pDX, IDC_EDIT_OFFSETUNITS, m_Units); - DDV_MinMaxDouble(pDX, m_Units, UnitsMinValue, UnitsMaxValue); - //}}AFX_DATA_MAP -} - - -BEGIN_MESSAGE_MAP(COffsetDlg, CDialog) - //{{AFX_MSG_MAP(COffsetDlg) - ON_WM_HSCROLL() - ON_EN_CHANGE(IDC_EDIT_OFFSETFACTOR, OnChangeEditOffsetFactor) - ON_EN_CHANGE(IDC_EDIT_OFFSETUNITS, OnChangeEditOffsetUnits) - //}}AFX_MSG_MAP -END_MESSAGE_MAP() - -///////////////////////////////////////////////////////////////////////////// -// COffsetDlg message handlers - -BOOL COffsetDlg::OnInitDialog() -{ - CDialog::OnInitDialog(); - -// Initializing the ComboBox - SetOffsets(m_Factor,m_Units); - -// Setting the m_FactorSlidCtrl position at floor(m_Factor) value (because slider position is an integer) - m_FactorSlidCtrl.SetRange(FactorMinValue, FactorMaxValue, TRUE); - m_FactorSlidCtrl.SetPos( (int) floor(m_Factor)); - -// Setting the m_UnitsSlidCtrl position at floor(m_Units) value (because slider position is an integer) - m_UnitsSlidCtrl.SetRange(UnitsMinValue, UnitsMaxValue, TRUE); - m_UnitsSlidCtrl.SetPos( (int) floor(m_Units)); - - UpdateData(FALSE); - - - return TRUE; // return TRUE unless you set the focus to a control - // EXCEPTION: OCX Property Pages should return FALSE -} - -void COffsetDlg::OnHScroll(UINT nSBCode, UINT nPos, CScrollBar* pScrollBar) -{ - -// Setting the m_Factor value at m_FactorSlidCtrl position - m_Factor = m_FactorSlidCtrl.GetPos(); -// Setting the m_Units value at m_UnitsSlidCtrl position - m_Units = m_UnitsSlidCtrl.GetPos(); - - UpdateData(FALSE); - - - SetOffsets(m_Factor,m_Units); - - CDialog::OnHScroll(nSBCode, nPos, pScrollBar); -} - -void COffsetDlg::OnChangeEditOffsetFactor() -{ - UpdateData(); - - m_FactorSlidCtrl.SetPos(int(m_Units)); - - SetOffsets(m_Factor,m_Units); -} - -void COffsetDlg::OnChangeEditOffsetUnits() -{ - UpdateData(); - - m_UnitsSlidCtrl.SetPos(int(m_Units)); - - SetOffsets(m_Factor,m_Units); -} - -void COffsetDlg::SetOffsets(Standard_Real theFactor, Standard_Real theUnits) -{ - Handle(AIS_InteractiveContext) aAISContext = myDoc->GetAISContext(); - - Handle(AIS_Shape) aOverlappedBox = myDoc->GetOverlappedBox(); - Handle(AIS_Shape) aOverlappedCylinder = myDoc->GetOverlappedCylinder(); - Handle(AIS_Shape) aOverlappedSphere = myDoc->GetOverlappedSphere(); - Handle(AIS_Shape) aBox = myDoc->GetBox(); - Handle(User_Cylinder) aCylinder = myDoc->GetCylinder(); - Handle(AIS_Shape) aSphere = myDoc->GetSphere(); - - - myDoc->SetDialogTitle("Set offsets"); - - TCollection_AsciiString Message; - - Standard_Boolean OneOrMoreCurrentIsDisplayed=false; - Standard_ShortReal aFactor = (Standard_ShortReal)theFactor; - Standard_ShortReal aUnits = (Standard_ShortReal)theUnits; - - for (aAISContext->InitSelected(); aAISContext->MoreSelected(); aAISContext->NextSelected()) - if (aAISContext->IsDisplayed(aAISContext->SelectedInteractive())) OneOrMoreCurrentIsDisplayed=true; - - if(OneOrMoreCurrentIsDisplayed){ - // A small trick to avoid compiler error (C2668). - const Handle(AIS_InteractiveObject)& anIOOverlappedBox = aOverlappedBox; - const Handle(AIS_InteractiveObject)& anIOBox = aBox; - if((aAISContext->IsSelected(anIOOverlappedBox) || aAISContext->IsSelected(anIOBox)) - && aAISContext->IsDisplayed(aOverlappedBox)){ - aOverlappedBox->SetPolygonOffsets(Aspect_POM_Fill,aFactor,aUnits); - Message = "Box2 -> SetPolygonOffsets(Aspect_POM_Fill, Factor, Units);\n"; - //myDoc -> AddTextInDialog(Message); - } - - // A small trick to avoid compiler error (C2668). - const Handle(AIS_InteractiveObject)& anIOOverlappedCylinder = aOverlappedCylinder; - const Handle(AIS_InteractiveObject)& anIOCylinder = aCylinder; - if((aAISContext->IsSelected(anIOOverlappedCylinder) || aAISContext->IsSelected(anIOCylinder)) - && aAISContext->IsDisplayed(aOverlappedCylinder)){ - aOverlappedCylinder->SetPolygonOffsets(Aspect_POM_Fill,aFactor,aUnits); - Message = Message + "Cylinder2 -> SetPolygonOffsets(Aspect_POM_Fill, Factor, Units);\n"; - //myDoc -> AddTextInDialog(Message); - } - - // A small trick to avoid compiler error (C2668). - const Handle(AIS_InteractiveObject)& anIOOverlappedSphere = aOverlappedSphere; - const Handle(AIS_InteractiveObject)& anIOSphere = aSphere; - if((aAISContext->IsSelected(anIOOverlappedSphere) || aAISContext->IsSelected(anIOSphere)) - && aAISContext->IsDisplayed(aOverlappedSphere)){ - aOverlappedSphere->SetPolygonOffsets(Aspect_POM_Fill,aFactor,aUnits); - Message = Message + "Sphere2 -> SetPolygonOffsets(Aspect_POM_Fill, Factor, Units);\n"; - //myDoc -> AddTextInDialog(Message); - } - } - else{ - if(aAISContext->IsDisplayed(aOverlappedBox)){ - aOverlappedBox->SetPolygonOffsets(Aspect_POM_Fill,aFactor,aUnits); - Message = Message + "Box2 -> SetPolygonOffsets(Aspect_POM_Fill, Factor, Units);\n"; - //myDoc -> AddTextInDialog(Message); - } - - if(aAISContext->IsDisplayed(aOverlappedCylinder)){ - aOverlappedCylinder->SetPolygonOffsets(Aspect_POM_Fill,aFactor,aUnits); - Message = Message + "Cylinder2 -> SetPolygonOffsets(Aspect_POM_Fill, Factor, Units);\n"; - //myDoc -> AddTextInDialog(Message); - } - - if(aAISContext->IsDisplayed(aOverlappedSphere)){ - aOverlappedSphere->SetPolygonOffsets(Aspect_POM_Fill,aFactor,aUnits); - Message = Message + "Sphere2 -> SetPolygonOffsets(Aspect_POM_Fill, Factor, Units);\n"; - //myDoc -> AddTextInDialog(Message); - } - } - - CString aTextInDialog = myDoc -> GetDialogText(); - if (aTextInDialog != Message.ToCString()) - myDoc -> UpdateResultMessageDlg("Set offsets", Message); - aAISContext->UpdateCurrentViewer(); -} - -void COffsetDlg::UpdateValues() -{ - Standard_Integer aOffsetMode; - Standard_ShortReal aBoxFactor = 0; - Standard_ShortReal aCylFactor = 0; - Standard_ShortReal aSphereFactor = 0; - Standard_ShortReal aCylUnits = 0; - Standard_ShortReal aSphereUnits = 0; - Standard_ShortReal aBoxUnits = 0; - - Handle(AIS_InteractiveContext) aAISContext = myDoc->GetAISContext(); - - Handle(AIS_Shape) aOverlappedBox = myDoc->GetOverlappedBox(); - Handle(AIS_Shape) aOverlappedCylinder = myDoc->GetOverlappedCylinder(); - Handle(AIS_Shape) aOverlappedSphere = myDoc->GetOverlappedSphere(); - Handle(AIS_Shape) aBox = myDoc->GetBox(); - Handle(User_Cylinder) aCylinder = myDoc->GetCylinder(); - Handle(AIS_Shape) aSphere = myDoc->GetSphere(); - - BOOL IsOverlappedCylinderDisplayed = aAISContext->IsDisplayed(aOverlappedCylinder); - BOOL IsOverlappedSphereDisplayed = aAISContext->IsDisplayed(aOverlappedSphere); - BOOL IsOverlappedBoxDisplayed = aAISContext->IsDisplayed(aOverlappedBox); - - const Handle(AIS_InteractiveObject)& anIOOverlappedCylinder = aOverlappedCylinder; - const Handle(AIS_InteractiveObject)& anIOOverlappedSphere = aOverlappedSphere; - const Handle(AIS_InteractiveObject)& anIOOverlappedBox = aOverlappedBox; - BOOL IsOverlappedCylinderCurrent = aAISContext->IsSelected(anIOOverlappedCylinder); - BOOL IsOverlappedSphereCurrent = aAISContext->IsSelected(anIOOverlappedSphere); - BOOL IsOverlappedBoxCurrent = aAISContext->IsSelected(anIOOverlappedBox); - - - /*BOOL IsAnyOverlappedObjectCurrent = - IsOverlappedCylinderCurrent || IsOverlappedSphereCurrent || IsOverlappedBoxCurrent;*/ - - const Handle(AIS_InteractiveObject)& anIOCylinder = aCylinder; - const Handle(AIS_InteractiveObject)& anIOSphere = aSphere; - const Handle(AIS_InteractiveObject)& anIOBox = aBox; - BOOL IsCylinderCurrent = aAISContext->IsSelected(anIOCylinder); - BOOL IsSphereCurrent = aAISContext->IsSelected(anIOSphere); - BOOL IsBoxCurrent = aAISContext->IsSelected(anIOBox); - - BOOL IsAnyObjectCurrent = - IsOverlappedCylinderCurrent || IsOverlappedSphereCurrent || IsOverlappedBoxCurrent - || IsCylinderCurrent || IsSphereCurrent || IsBoxCurrent; - - BOOL IsAnyOverlappedObjectDisplayed = - IsOverlappedCylinderDisplayed || IsOverlappedSphereDisplayed || IsOverlappedBoxDisplayed; - - Standard_Boolean OneOrMoreCurrentIsDisplayed=false; - for (aAISContext->InitSelected();aAISContext->MoreSelected ();aAISContext->NextSelected ()) - if (aAISContext->IsDisplayed(aAISContext->SelectedInteractive())) OneOrMoreCurrentIsDisplayed=true; - - if(OneOrMoreCurrentIsDisplayed){ - if(IsOverlappedBoxDisplayed && (IsBoxCurrent || IsOverlappedBoxCurrent)){ - aOverlappedBox->PolygonOffsets(aOffsetMode,aBoxFactor,aBoxUnits); - } - - if(IsOverlappedCylinderDisplayed && (IsCylinderCurrent || IsOverlappedCylinderCurrent)){ - aOverlappedCylinder->PolygonOffsets(aOffsetMode,aCylFactor,aCylUnits); - } - - if(IsOverlappedSphereDisplayed && (IsSphereCurrent || IsOverlappedSphereCurrent)){ - aOverlappedSphere->PolygonOffsets(aOffsetMode,aSphereFactor,aSphereUnits); - } - - } - else{ - if(IsOverlappedBoxDisplayed){ - aOverlappedBox->PolygonOffsets(aOffsetMode,aBoxFactor,aBoxUnits); - } - - if(IsOverlappedCylinderDisplayed){ - aOverlappedCylinder->PolygonOffsets(aOffsetMode,aCylFactor,aCylUnits); - } - - if(IsOverlappedSphereDisplayed){ - aOverlappedSphere->PolygonOffsets(aOffsetMode,aSphereFactor,aSphereUnits); - } - } - - Standard_Real Max = aBoxFactor; - if (Max < aCylFactor) Max = aCylFactor; - if (Max < aSphereFactor) Max = aSphereFactor; - - m_Factor = Max; - - Max = aBoxUnits; - if (Max < aCylUnits) Max = aCylUnits; - if (Max < aSphereUnits) Max = aSphereUnits; - - m_Units = Max; - - m_FactorSlidCtrl.SetPos( (int) floor(m_Factor)); - - - m_UnitsSlidCtrl.SetPos( (int) floor(m_Units)); - UpdateData(FALSE); - - if( (IsOverlappedBoxCurrent || (IsBoxCurrent && IsOverlappedBoxDisplayed)) || - (IsOverlappedCylinderCurrent || (IsCylinderCurrent && IsOverlappedCylinderDisplayed)) || - (IsOverlappedSphereCurrent || (IsSphereCurrent && IsOverlappedSphereDisplayed)) || - (!IsAnyObjectCurrent && IsAnyOverlappedObjectDisplayed) - ) - { - m_FactorSlidCtrl.EnableWindow(); - m_UnitsSlidCtrl.EnableWindow(); - GetDlgItem(IDC_EDIT_OFFSETFACTOR)->EnableWindow(); - GetDlgItem(IDC_EDIT_OFFSETUNITS)->EnableWindow(); - } - else{ - m_FactorSlidCtrl.EnableWindow(false); - m_UnitsSlidCtrl.EnableWindow(false); - GetDlgItem(IDC_EDIT_OFFSETFACTOR)->EnableWindow(false); - GetDlgItem(IDC_EDIT_OFFSETUNITS)->EnableWindow(false); - } - -} diff --git a/samples/mfc/standard/04_Viewer3d/src/OffsetDlg.h b/samples/mfc/standard/04_Viewer3d/src/OffsetDlg.h deleted file mode 100755 index f97cd1da47..0000000000 --- a/samples/mfc/standard/04_Viewer3d/src/OffsetDlg.h +++ /dev/null @@ -1,60 +0,0 @@ -#if !defined(AFX_OFFSETDLG_H__9E963234_B2CB_11D8_8CF3_00047571ABCA__INCLUDED_) -#define AFX_OFFSETDLG_H__9E963234_B2CB_11D8_8CF3_00047571ABCA__INCLUDED_ - -#if _MSC_VER > 1000 -#pragma once -#endif // _MSC_VER > 1000 -// offsetdlg.h : header file -// - -#include "Viewer3dDoc.h" - -class CViewer3dDoc; -///////////////////////////////////////////////////////////////////////////// -// COffsetDlg dialog - -class COffsetDlg : public CDialog -{ -// Construction -public: - void UpdateValues(); - void SetOffsets(Standard_Real theFactor, Standard_Real theUnits); - COffsetDlg( CViewer3dDoc* theDoc, CWnd* pParent = NULL); - -// Dialog Data - //{{AFX_DATA(COffsetDlg) - enum { IDD = IDD_SETOFFSETS }; - CSliderCtrl m_UnitsSlidCtrl; - CSliderCtrl m_FactorSlidCtrl; - Standard_Real m_Factor; - Standard_Real m_Units; - //}}AFX_DATA - - -// Overrides - // ClassWizard generated virtual function overrides - //{{AFX_VIRTUAL(COffsetDlg) - protected: - virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support - //}}AFX_VIRTUAL - -// Implementation -protected: - - // Generated message map functions - //{{AFX_MSG(COffsetDlg) - virtual BOOL OnInitDialog(); - afx_msg void OnHScroll(UINT nSBCode, UINT nPos, CScrollBar* pScrollBar); - afx_msg void OnChangeEditOffsetFactor(); - afx_msg void OnChangeEditOffsetUnits(); - //}}AFX_MSG - DECLARE_MESSAGE_MAP() - - CViewer3dDoc* myDoc; - -}; - -//{{AFX_INSERT_LOCATION}} -// Microsoft Visual C++ will insert additional declarations immediately before the previous line. - -#endif // !defined(AFX_OFFSETDLG_H__9E963234_B2CB_11D8_8CF3_00047571ABCA__INCLUDED_) diff --git a/samples/mfc/standard/04_Viewer3d/src/ScaleDlg.cpp b/samples/mfc/standard/04_Viewer3d/src/ScaleDlg.cpp deleted file mode 100755 index 65d39f2c14..0000000000 --- a/samples/mfc/standard/04_Viewer3d/src/ScaleDlg.cpp +++ /dev/null @@ -1,188 +0,0 @@ -// ScaleDlg.cpp : implementation file -// - -#include "stdafx.h" -#include "ScaleDlg.h" - -#ifdef _DEBUG -#define new DEBUG_NEW -#undef THIS_FILE -static char THIS_FILE[] = __FILE__; -#endif - -///////////////////////////////////////////////////////////////////////////// -// ScaleDlg dialog - - -ScaleDlg::ScaleDlg(Handle(V3d_View) Current_V3d_View, CViewer3dView* pView, CWnd* pParent /*=NULL*/) - : CDialog(ScaleDlg::IDD, pParent) -{ - //{{AFX_DATA_INIT(ScaleDlg) - myCurrent_V3d_View = Current_V3d_View; - myView=pView; - m_ScaleX = 0; - m_ScaleY = 0; - m_ScaleZ = 0; - //}}AFX_DATA_INIT -} - - -void ScaleDlg::DoDataExchange(CDataExchange* pDX) -{ - CDialog::DoDataExchange(pDX); - //{{AFX_DATA_MAP(ScaleDlg) - DDX_Control(pDX, IDC_SLIDER_SCALEX, m_ScaleXSlidCtrl); - DDX_Control(pDX, IDC_SLIDER_SCALEY, m_ScaleYSlidCtrl); - DDX_Control(pDX, IDC_SLIDER_SCALEZ, m_ScaleZSlidCtrl); - DDX_Text(pDX, IDC_EDIT_SCALEX, m_ScaleX); - DDV_MinMaxInt(pDX, m_ScaleX, 1, 100); - DDX_Text(pDX, IDC_EDIT_SCALEY, m_ScaleY); - DDV_MinMaxInt(pDX, m_ScaleY, 1, 100); - DDX_Text(pDX, IDC_EDIT_SCALEZ, m_ScaleZ); - DDV_MinMaxInt(pDX, m_ScaleZ, 1, 100); - //}}AFX_DATA_MAP -} - - -BEGIN_MESSAGE_MAP(ScaleDlg, CDialog) - //{{AFX_MSG_MAP(ScaleDlg) - ON_EN_CHANGE(IDC_EDIT_SCALEX, OnChangeEditScaleX) - ON_EN_CHANGE(IDC_EDIT_SCALEY, OnChangeEditScaleY) - ON_EN_CHANGE(IDC_EDIT_SCALEZ, OnChangeEditScaleZ) - ON_WM_HSCROLL() - //}}AFX_MSG_MAP -END_MESSAGE_MAP() - -///////////////////////////////////////////////////////////////////////////// -// ScaleDlg message handlers -BOOL ScaleDlg::OnInitDialog() -{ - CDialog::OnInitDialog(); - - int ScaleX = myView->scaleX; - int ScaleY = myView->scaleY; - int ScaleZ = myView->scaleZ; - - m_ScaleX=ScaleX; - m_ScaleXSlidCtrl.SetRange(0, 100, TRUE); - m_ScaleXSlidCtrl.SetPos( ScaleX ); - - m_ScaleY=ScaleY; - m_ScaleYSlidCtrl.SetRange(0, 100, TRUE); - m_ScaleYSlidCtrl.SetPos( ScaleY ); - - m_ScaleZ=ScaleZ; - m_ScaleZSlidCtrl.SetRange(0, 100, TRUE); - m_ScaleZSlidCtrl.SetPos( ScaleZ ); - - UpdateData(FALSE); - - return TRUE; // return TRUE unless you set the focus to a control - // EXCEPTION: OCX Property Pages should return FALSE -} - -void ScaleDlg::OnChangeEditScaleX() -{ - UpdateData(TRUE); - - m_ScaleXSlidCtrl.SetPos( m_ScaleX ); - myView->scaleX = m_ScaleX; - - myCurrent_V3d_View->SetAxialScale( m_ScaleX, m_ScaleY, m_ScaleZ ); - myCurrent_V3d_View->Update(); - - TCollection_AsciiString Message("\ -myCurrent_V3d_View->SetAxialScale( m_ScaleX, m_ScaleY, m_ScaleZ);\n\ -\n\ -myCurrent_V3d_View->Update();\n\ - "); - - // Update The Result Message Dialog - myView->GetDocument()->UpdateResultMessageDlg("SetAxialScale",Message); -} - -void ScaleDlg::OnChangeEditScaleY() -{ - UpdateData(TRUE); - - m_ScaleYSlidCtrl.SetPos( m_ScaleY ); - myView->scaleY = m_ScaleY; - - myCurrent_V3d_View->SetAxialScale( m_ScaleX, m_ScaleY, m_ScaleZ ); - myCurrent_V3d_View->Update(); - - TCollection_AsciiString Message("\ -myCurrent_V3d_View->SetAxialScale( m_ScaleX, m_ScaleY, m_ScaleZ);\n\ -\n\ -myCurrent_V3d_View->Update();\n\ - "); - - // Update The Result Message Dialog - myView->GetDocument()->UpdateResultMessageDlg("SetAxialScale",Message); -} - -void ScaleDlg::OnChangeEditScaleZ() -{ - UpdateData(TRUE); - - m_ScaleZSlidCtrl.SetPos( m_ScaleZ ); - myView->scaleZ = m_ScaleZ; - - myCurrent_V3d_View->SetAxialScale( m_ScaleX, m_ScaleY, m_ScaleZ ); - myCurrent_V3d_View->Update(); - - TCollection_AsciiString Message("\ -myCurrent_V3d_View->SetAxialScale( m_ScaleX, m_ScaleY, m_ScaleZ);\n\ -\n\ -myCurrent_V3d_View->Update();\n\ - "); - - // Update The Result Message Dialog - myView->GetDocument()->UpdateResultMessageDlg("SetAxialScale",Message); -} - -void ScaleDlg::OnHScroll(UINT nSBCode, UINT nPos, CScrollBar* pScrollBar) -{ - m_ScaleX = m_ScaleXSlidCtrl.GetPos(); - m_ScaleY = m_ScaleYSlidCtrl.GetPos(); - m_ScaleZ = m_ScaleZSlidCtrl.GetPos(); - - if(m_ScaleX<=0) - { - m_ScaleX=1; - m_ScaleXSlidCtrl.SetPos( 1 ); - } - - if(m_ScaleY<=0) - { - m_ScaleY=1; - m_ScaleYSlidCtrl.SetPos( 1 ); - } - - if(m_ScaleZ<=0) - { - m_ScaleZ=1; - m_ScaleZSlidCtrl.SetPos( 1 ); - } - - UpdateData(FALSE); - - myView->scaleX = m_ScaleX; - myView->scaleY = m_ScaleY; - myView->scaleZ = m_ScaleZ; - - myCurrent_V3d_View->SetAxialScale( m_ScaleX, m_ScaleY, m_ScaleZ ); - myCurrent_V3d_View->Update(); - - TCollection_AsciiString Message("\ -myCurrent_V3d_View->SetAxialScale( m_ScaleX, m_ScaleY, m_ScaleZ);\n\ -\n\ -myCurrent_V3d_View->Update();\n\ - "); - - // Update The Result Message Dialog - myView->GetDocument()->UpdateResultMessageDlg("SetAxialScale",Message); - - CDialog::OnHScroll(nSBCode, nPos, pScrollBar); -} - diff --git a/samples/mfc/standard/04_Viewer3d/src/ScaleDlg.h b/samples/mfc/standard/04_Viewer3d/src/ScaleDlg.h deleted file mode 100755 index 2353a9ff92..0000000000 --- a/samples/mfc/standard/04_Viewer3d/src/ScaleDlg.h +++ /dev/null @@ -1,63 +0,0 @@ -#if !defined(AFX_ScaleDlg_H__1796AA04_63B7_4E46_B00A_D2DAC975CAF1__INCLUDED_) -#define AFX_ScaleDlg_H__1796AA04_63B7_4E46_B00A_D2DAC975CAF1__INCLUDED_ - -#if _MSC_VER > 1000 -#pragma once -#endif // _MSC_VER > 1000 -// ScaleDlg.h : header file -// - -#include "..\res\resource.h" -#include "Viewer3dView.h" - -///////////////////////////////////////////////////////////////////////////// -// ScaleDlg dialog - -class ScaleDlg : public CDialog -{ -// Construction -public: - ScaleDlg(Handle(V3d_View) Current_V3d_View, CViewer3dView* pView, CWnd* pParent = NULL); - -// Dialog Data - //{{AFX_DATA(ScaleDlg) - enum { IDD = IDD_SCALE }; - CSliderCtrl m_ScaleXSlidCtrl; - CSliderCtrl m_ScaleYSlidCtrl; - CSliderCtrl m_ScaleZSlidCtrl; - int m_ScaleX; - int m_ScaleY; - int m_ScaleZ; - //}}AFX_DATA - - -// Overrides - // ClassWizard generated virtual function overrides - //{{AFX_VIRTUAL(ScaleDlg) - protected: - virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support - //}}AFX_VIRTUAL - -// Implementation -protected: - - // Generated message map functions - //{{AFX_MSG(ScaleDlg) - virtual BOOL OnInitDialog(); - afx_msg void OnChangeEditScaleX(); - afx_msg void OnChangeEditScaleY(); - afx_msg void OnChangeEditScaleZ(); - afx_msg void OnHScroll(UINT nSBCode, UINT nPos, CScrollBar* pScrollBar); - //}}AFX_MSG - DECLARE_MESSAGE_MAP() - -private: - - Handle(V3d_View) myCurrent_V3d_View; - CViewer3dView* myView; -}; - -//{{AFX_INSERT_LOCATION}} -// Microsoft Visual C++ will insert additional declarations immediately before the previous line. - -#endif // !defined(AFX_ScaleDlg_H__1796AA04_63B7_4E46_B00A_D2DAC975CAF1__INCLUDED_) diff --git a/samples/mfc/standard/04_Viewer3d/src/ShadingModelDlg.cpp b/samples/mfc/standard/04_Viewer3d/src/ShadingModelDlg.cpp deleted file mode 100755 index 77ecb4860e..0000000000 --- a/samples/mfc/standard/04_Viewer3d/src/ShadingModelDlg.cpp +++ /dev/null @@ -1,70 +0,0 @@ -// ShadingModelDlg.cpp : implementation file -// - -#include "stdafx.h" -#include "Viewer3dApp.h" -#include "ShadingModelDlg.h" - -#ifdef _DEBUG -#define new DEBUG_NEW -#undef THIS_FILE -static char THIS_FILE[] = __FILE__; -#endif - -///////////////////////////////////////////////////////////////////////////// -// CShadingModelDlg dialog - - -CShadingModelDlg::CShadingModelDlg(Handle(V3d_View) Current_V3d_View, CWnd* pParent /*=NULL*/) - : CDialog(CShadingModelDlg::IDD, pParent) -{ - //{{AFX_DATA_INIT(CShadingModelDlg) - myCurrent_V3d_View=Current_V3d_View; - //}}AFX_DATA_INIT -} - - -void CShadingModelDlg::DoDataExchange(CDataExchange* pDX) -{ - CDialog::DoDataExchange(pDX); - //{{AFX_DATA_MAP(CShadingModelDlg) - // NOTE: the ClassWizard will add DDX and DDV calls here - //}}AFX_DATA_MAP -} - - -BEGIN_MESSAGE_MAP(CShadingModelDlg, CDialog) - //{{AFX_MSG_MAP(CShadingModelDlg) - ON_BN_CLICKED(IDC_SHADINGMODEL_COLOR, OnShadingmodelColor) - ON_BN_CLICKED(IDC_SHADINGMODEL_FLAT, OnShadingmodelFlat) - ON_BN_CLICKED(IDC_SHADINGMODEL_GOURAUD, OnShadingmodelGouraud) - ON_BN_CLICKED(IDC_SHADINGMODEL_PHONG, OnShadingmodelPhong) - //}}AFX_MSG_MAP -END_MESSAGE_MAP() - -///////////////////////////////////////////////////////////////////////////// -// CShadingModelDlg message handlers - -void CShadingModelDlg::OnShadingmodelColor() -{ - myCurrent_V3d_View->SetShadingModel(V3d_COLOR); - myCurrent_V3d_View->Update(); -} - -void CShadingModelDlg::OnShadingmodelFlat() -{ - myCurrent_V3d_View->SetShadingModel(V3d_FLAT); - myCurrent_V3d_View->Update(); -} - -void CShadingModelDlg::OnShadingmodelGouraud() -{ - myCurrent_V3d_View->SetShadingModel(V3d_GOURAUD); - myCurrent_V3d_View->Update(); -} - -void CShadingModelDlg::OnShadingmodelPhong() -{ - myCurrent_V3d_View->SetShadingModel(V3d_PHONG); - myCurrent_V3d_View->Update(); -} diff --git a/samples/mfc/standard/04_Viewer3d/src/ShadingModelDlg.h b/samples/mfc/standard/04_Viewer3d/src/ShadingModelDlg.h deleted file mode 100755 index 30f38ab23e..0000000000 --- a/samples/mfc/standard/04_Viewer3d/src/ShadingModelDlg.h +++ /dev/null @@ -1,53 +0,0 @@ -// ShadingModelDlg.h : header file -// -#if !defined(AFX_SHADINGMODELDLG_H__4DEFD9F9_61FC_11D3_8D0A_00AA00D10994__INCLUDED_) -#define AFX_SHADINGMODELDLG_H__4DEFD9F9_61FC_11D3_8D0A_00AA00D10994__INCLUDED_ - -#if _MSC_VER >= 1000 -#pragma once -#endif // _MSC_VER >= 1000 - -#include "..\res\resource.h" - -///////////////////////////////////////////////////////////////////////////// -// CShadingModelDlg dialog - -class CShadingModelDlg : public CDialog -{ -// Construction -public: - CShadingModelDlg(Handle(V3d_View) Current_V3d_View, CWnd* pParent = NULL); // standard constructor - -// Dialog Data - //{{AFX_DATA(CShadingModelDlg) - enum { IDD = IDD_SHADINGMODEL }; - // NOTE: the ClassWizard will add data members here - //}}AFX_DATA - - -// Overrides - // ClassWizard generated virtual function overrides - //{{AFX_VIRTUAL(CShadingModelDlg) - protected: - virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support - //}}AFX_VIRTUAL - -// Implementation -protected: - - // Generated message map functions - //{{AFX_MSG(CShadingModelDlg) - afx_msg void OnShadingmodelColor(); - afx_msg void OnShadingmodelFlat(); - afx_msg void OnShadingmodelGouraud(); - afx_msg void OnShadingmodelPhong(); - //}}AFX_MSG - DECLARE_MESSAGE_MAP() - - Handle(V3d_View) myCurrent_V3d_View; -}; - -//{{AFX_INSERT_LOCATION}} -// Microsoft Developer Studio will insert additional declarations immediately before the previous line. - -#endif // !defined(AFX_SHADINGMODELDLG_H__4DEFD9F9_61FC_11D3_8D0A_00AA00D10994__INCLUDED_) diff --git a/samples/mfc/standard/04_Viewer3d/src/State.h b/samples/mfc/standard/04_Viewer3d/src/State.h deleted file mode 100755 index b58cdc57aa..0000000000 --- a/samples/mfc/standard/04_Viewer3d/src/State.h +++ /dev/null @@ -1,3 +0,0 @@ -enum STATE { - FACE_COLOR - }; diff --git a/samples/mfc/standard/04_Viewer3d/src/StdAfx.cpp b/samples/mfc/standard/04_Viewer3d/src/StdAfx.cpp deleted file mode 100755 index a50be5907a..0000000000 --- a/samples/mfc/standard/04_Viewer3d/src/StdAfx.cpp +++ /dev/null @@ -1,5 +0,0 @@ -// stdafx.cpp : source file that includes just the standard includes -// SampleViewer3d.pch will be the pre-compiled header -// stdafx.obj will contain the pre-compiled type information - -#include "stdafx.h" diff --git a/samples/mfc/standard/04_Viewer3d/src/StdAfx.h b/samples/mfc/standard/04_Viewer3d/src/StdAfx.h deleted file mode 100755 index 2d5561443b..0000000000 --- a/samples/mfc/standard/04_Viewer3d/src/StdAfx.h +++ /dev/null @@ -1,70 +0,0 @@ -// stdafx.h : include file for standard system include files, -// or project specific include files that are used frequently, but -// are changed infrequently -// - -#if _MSC_VER >= 1000 -#pragma once -#endif // _MSC_VER >= 1000 - -#define VC_EXTRALEAN // Exclude rarely-used stuff from Windows headers - -#include // MFC core and standard components -#include // MFC extensions -#include // MFC OLE automation classes -#ifndef _AFX_NO_AFXCMN_SUPPORT -#include // MFC support for Windows Common Controls -#endif // _AFX_NO_AFXCMN_SUPPORT - -#pragma warning( disable : 4244 ) // Issue warning 4244 -#include "Standard_ShortReal.hxx" -#pragma warning( default : 4244 ) // Issue warning 4244 - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include "State.h" - -#include <..\res\resource.h> - -//{{AFX_INSERT_LOCATION}} -// Microsoft Developer Studio will insert additional declarations immediately before the previous line. - diff --git a/samples/mfc/standard/04_Viewer3d/src/TexturesExt_Presentation.cpp b/samples/mfc/standard/04_Viewer3d/src/TexturesExt_Presentation.cpp deleted file mode 100755 index a2b00f7a5d..0000000000 --- a/samples/mfc/standard/04_Viewer3d/src/TexturesExt_Presentation.cpp +++ /dev/null @@ -1,441 +0,0 @@ -// TexturesExt_Presentation.cpp: implementation of the TexturesExt_Presentation class. -// Creation of textural presentation of shape -////////////////////////////////////////////////////////////////////// - -#include "stdafx.h" -#include "TexturesExt_Presentation.h" -#include "Viewer3dApp.h" - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#define DISP(OBJ) getAISContext()->Display((OBJ), Standard_False) - -// Initialization of global variable with an instance of this class -OCCDemo_Presentation* OCCDemo_Presentation::Current = new TexturesExt_Presentation; - -// Initialization of array of samples -const TexturesExt_Presentation::PSampleFuncType TexturesExt_Presentation::SampleFuncs[] = -{ - &TexturesExt_Presentation::sampleBottle, - &TexturesExt_Presentation::sampleTerrain, - &TexturesExt_Presentation::sampleKitchen -}; - -#define EOL "\r\n" - -#define ZVIEW_SIZE 100 - -////////////////////////////////////////////////////////////////////// -// Construction/Destruction -////////////////////////////////////////////////////////////////////// - -TexturesExt_Presentation::TexturesExt_Presentation() -{ - myNbSamples = sizeof(SampleFuncs)/sizeof(PSampleFuncType); - setName ("Textured Shapes"); -} - -////////////////////////////////////////////////////////////////////// -// Sample execution -////////////////////////////////////////////////////////////////////// - -void TexturesExt_Presentation::DoSample() -{ - ((CViewer3dApp*) AfxGetApp())->SetSampleName (L"Viewer3d"); - ((CViewer3dApp*) AfxGetApp())->SetSamplePath (L"..\\..\\04_Viewer3d"); - getAISContext()->EraseAll (Standard_True); - if (myIndex >=0 && myIndex < myNbSamples) - { - // turn lights on for terrain sample - lightsOnOff(myIndex==1); - (this->*SampleFuncs[myIndex])(); - } -} - -void TexturesExt_Presentation::Init() -{ - // initialize v3d_view so it displays TexturesExt well - Handle(V3d_View) aView = getViewer()->ActiveViews().First(); - aView->SetSize(ZVIEW_SIZE); - -// getDocument()->UpdateResultMessageDlg("Textured Shape", - TCollection_AsciiString Message ("Textured Shape", - " TopoDS_Shape aShape;" EOL - "" EOL - " // initialize aShape" EOL - " // aShape = ..." EOL - "" EOL - " // create a textured presentation object for aShape" EOL - " Handle(AIS_Shape) aTShape = new AIS_Shape(aShape);" EOL - "" EOL - " TCollection_AsciiString aTFileName;" EOL - "" EOL - " // initialize aTFileName with an existing texture file name" EOL - " // (gif, bmp, xwd, rgb, and other formats are supported)" EOL - " // OR with an integer value string (max = Graphic3d_Texture2D::NumberOfTexturesExt())" EOL - " // which will indicate use of predefined texture of this number" EOL - " // aTFileName = ..." EOL - "" EOL - " aTShape->Attributes()->SetShadingAspect (new Prs3d_ShadingAspect());" EOL - " Handle(Graphic3d_Texture2Dmanual) aTexture = new Graphic3d_Texture2Dmanual (aTFileName);" EOL - " aTShape->Attributes()->ShadingAspect()->Aspect()->SetTextureMap (aTexture);" EOL - " aTShape->Attributes()->ShadingAspect()->Aspect()->SetTextureMapOn();" EOL); -// CString text(Message.ToCString()); - getDocument()->ClearDialog(); - getDocument()->SetDialogTitle("Change face color"); - getDocument()->AddTextInDialog(Message); -} - -////////////////////////////////////////////////////////////////////// -// Sample functions -////////////////////////////////////////////////////////////////////// -//================================================================ -// Function : TexturesExt_Presentation::Texturize -// display an AIS_Shape based on a given shape with texture with given filename -// filename can also be an integer value ("2", "5", etc.), in this case -// a predefined texture from Graphic3d_NameOfTexture2D with number = this value -// is loaded. -//================================================================ -Handle(AIS_Shape) TexturesExt_Presentation::Texturize(const TopoDS_Shape& aShape, - TCollection_AsciiString aTFileName, - Standard_Real toScaleU, - Standard_Real toScaleV, - Standard_Real toRepeatU, - Standard_Real toRepeatV, - Standard_Real originU, - Standard_Real originV) -{ - // create a textured presentation object for aShape - Handle(AIS_Shape) aTShape = new AIS_Shape(aShape); - TCollection_AsciiString TFileName; - // load texture from file if it is not an integer value - // integer value indicates a number of texture in predefined TexturesExt enumeration - CString anOCCTDataPathValue; - anOCCTDataPathValue.GetEnvironmentVariable(L"CSF_OCCTDataPath"); - CString initfile = (anOCCTDataPathValue + L"\\images\\"); - if (!aTFileName.IsIntegerValue()) - { - initfile += aTFileName.ToCString(); - } - - if (!aTShape->Attributes()->HasOwnShadingAspect()) - { - aTShape->Attributes()->SetShadingAspect (new Prs3d_ShadingAspect()); - } - aTShape->Attributes()->ShadingAspect()->Aspect()->SetTextureMap (new Graphic3d_Texture2Dmanual (TCollection_AsciiString ((const wchar_t* )initfile))); - aTShape->Attributes()->ShadingAspect()->Aspect()->SetTextureMapOn(); - - // do other initialization of AIS_Shape - aTShape->SetTextureScaleUV (gp_Pnt2d ( toScaleU, toScaleV)); - aTShape->SetTextureRepeatUV(gp_Pnt2d (toRepeatU, toRepeatV)); - aTShape->SetTextureOriginUV(gp_Pnt2d ( originU, originV)); - - aTShape->SetDisplayMode(AIS_Shaded); - - return aTShape; -} - - -//================================================================ -// Function : TexturesExt_Presentation::loadShape -// loads a shape from a given brep file from data dir into a given TopoDS_Shape object -//================================================================ -Standard_Boolean TexturesExt_Presentation::loadShape(TopoDS_Shape& aShape, - TCollection_AsciiString aFileName) -{ - // create a TopoDS_Shape -> read from a brep file - CString anOCCTDataPathValue; - anOCCTDataPathValue.GetEnvironmentVariable(L"CSF_OCCTDataPath"); - CString initfile = (anOCCTDataPathValue + L"\\occ\\" + aFileName.ToCString()); - - std::filebuf aFileBuf; - std::istream aStream (&aFileBuf); - if (!aFileBuf.open (initfile, std::ios::in)) - { - initfile += L" was not found. The sample can not be shown."; - getDocument()->UpdateResultMessageDlg ("Textured Shape", initfile); - return Standard_False; - } - - BRep_Builder aBld; - BRepTools::Read (aShape, aStream, aBld); - if (aShape.IsNull()) - { - initfile += " is invalid. The sample can not be shown."; - getDocument()->UpdateResultMessageDlg ("Textured Shape", initfile); - return Standard_False; - } - - return Standard_True; -} - -//================================================================ -// Function : lightsOnOff -// Purpose : 6 lights are used for a brighter demonstration of textured shapes -// call lightsOnOff(false) before showing normal shape -// call lightsOnOff(true) before showing textured shape -//================================================================ -void TexturesExt_Presentation::lightsOnOff(Standard_Boolean isOn) -{ - static Handle(V3d_Light) aLight1 = new V3d_DirectionalLight(V3d_XnegYposZneg); - static Handle(V3d_Light) aLight2 = new V3d_DirectionalLight(V3d_XnegYnegZpos); - static Handle(V3d_Light) aLight3 = new V3d_DirectionalLight(V3d_XposYnegZpos); - static Handle(V3d_Light) aLight4 = new V3d_DirectionalLight(V3d_XnegYnegZneg); - static Handle(V3d_Light) aLight5 = new V3d_DirectionalLight(V3d_XnegYposZpos); - static Handle(V3d_Light) aLight6 = new V3d_DirectionalLight(V3d_XposYposZpos); - - if (isOn) - { - getViewer()->SetLightOn(aLight1); - getViewer()->SetLightOn(aLight2); - getViewer()->SetLightOn(aLight3); - getViewer()->SetLightOn(aLight4); - getViewer()->SetLightOn(aLight5); - getViewer()->SetLightOn(aLight6); - } - else - { - getViewer()->SetLightOff(aLight1); - getViewer()->SetLightOff(aLight2); - getViewer()->SetLightOff(aLight3); - getViewer()->SetLightOff(aLight4); - getViewer()->SetLightOff(aLight5); - getViewer()->SetLightOff(aLight6); - } -} - -//================================================================ -// Function : TexturesExt_Presentation::sampleBottle -// Purpose : -//================================================================ -void TexturesExt_Presentation::sampleBottle() -{ - TopoDS_Shape aShape; - if (!loadShape(aShape, "bottle.brep")) - return; - - // resize and move the shape to the center of the viewer -gp_Trsf aTrsf1, aTrsf2; -aTrsf1.SetScale(gp_Pnt(0,0,0), 0.8); -aTrsf2.SetTranslation(gp_Pnt(0,0,0),gp_Pnt(0,0,-20)); -aTrsf1.Multiply(aTrsf2); -BRepBuilderAPI_Transform Transformer(aTrsf1); -Transformer.Perform(aShape); -aShape = Transformer.Shape(); - - TopTools_IndexedMapOfShape aFaces; - TopExp::MapShapes(aShape, TopAbs_FACE, aFaces); - - // display original shape in shaded display mode - Handle(AIS_Shape) aShapeIO = drawShape(aShape, Graphic3d_NOM_BRASS, Standard_False); - getAISContext()->SetDisplayMode(aShapeIO, AIS_Shaded, Standard_False); - // Set increased polygon offset for the main shape to avoid depth collision with textured faces - aShapeIO->SetPolygonOffsets(Aspect_POM_Fill, 1.5, 0.5); - DISP(aShapeIO); - - Handle(AIS_Shape) aTFace1 = Texturize(aFaces(16), "carrelage1.gif", 1, 1, 3, 2); - DISP(aTFace1); - - Handle(AIS_Shape) aTFace2 = Texturize(aFaces(21), "carrelage1.gif", 1, 1, 3, 2); - DISP(aTFace2); - - getViewer()->Update(); -} - - -//================================================================ -// Function : TexturesExt_Presentation::sampleLand -// Purpose : -//================================================================ -void TexturesExt_Presentation::sampleTerrain() -{ - TopoDS_Shape aShape; - if (!loadShape(aShape, "terrain.brep")) - return; - - // a part of the landscape is textured - TopTools_IndexedMapOfShape aFaces; - TopExp::MapShapes(aShape, TopAbs_FACE, aFaces); - -// TopLoc_Location aLoc; -// Handle(Geom_Surface) aSur = BRep_Tool::Surface(TopoDS::Face(aFaces(1)), aLoc); -// Standard_Real u1,u2,v1,v2; -// aSur->Bounds(u1,u2,v1,v2); -// gp_Pnt aPnt = aSur->Value(u1, v1); - gp_Pnt aPnt(82100,80300,10940);// point at u1,v1 - // resize and move the shape to the center of the viewer - - gp_Trsf aMoveTrsf; - gp_Ax3 New(gp_Pnt(-30,-30, 0),gp_Dir(0,0,1)); - gp_Ax3 aCurrent(aPnt,gp_Dir(0,0,1)); - aMoveTrsf.SetDisplacement(aCurrent, New); - - gp_Trsf aScaleTrsf; - aScaleTrsf.SetScale(aPnt,0.0075); - - BRepBuilderAPI_Transform aTransform(aMoveTrsf*aScaleTrsf); - - aTransform.Perform(aFaces(1)); - aShape = aTransform; - - getAISContext()->Display (Texturize (aShape, "terrain.gif"), Standard_True); -} - - -//================================================================ -// Function : moveScale -// Purpose : move a shape a little left and scale it to 15%. -//================================================================ -static void moveScale(TopoDS_Shape& aShape) -{ - gp_Trsf aMoveTrsf; - gp_Ax3 New(gp_Pnt(-30,-30, -10),gp_Dir(0,0,1)); - gp_Ax3 Current(gp_Pnt(0,0,0),gp_Dir(0,0,1)); - aMoveTrsf.SetDisplacement(Current, New); - - gp_Trsf aScaleTrsf; - aScaleTrsf.SetScale(gp_Pnt(0,0,0),0.15); - - BRepBuilderAPI_Transform aTransform(aMoveTrsf*aScaleTrsf); - - aTransform.Perform(aShape); - aShape = aTransform; -} - -//================================================================ -// Function : TexturesExt_Presentation::sampleKitchen -// Purpose : kitchen with texturized items in it. -//================================================================ -void TexturesExt_Presentation::sampleKitchen() -{ - TopoDS_Shape aShape; - - if (!loadShape(aShape, "Room.brep")) - return; - - gp_Trsf aTrsf; - gp_Ax3 NewCoordSystem (gp_Pnt(-1,-1, -1),gp_Dir(0,0,1)); - gp_Ax3 CurrentCoordSystem(gp_Pnt(0,0,0),gp_Dir(0,0,1)); - aTrsf.SetDisplacement(CurrentCoordSystem, NewCoordSystem); - aShape.Location(TopLoc_Location(aTrsf)); - - moveScale(aShape); - - // draw kitchen room without one wall (to better see the insides) - TopTools_IndexedMapOfShape aFaces; - TopExp::MapShapes(aShape, TopAbs_FACE, aFaces); - Standard_Integer nbFaces = aFaces.Extent(); - - // create a wooden kitchen floor - // the floor's face will be textured with texture from chataignier.gif - DISP(Texturize(aFaces(5),"plancher.gif",1,1,2,1)); - - // texturize other faces of the room with texture from wallpaper.gif (walls) - DISP(Texturize(aFaces(1),"wallpaper.gif",1,1,8,6)); - DISP(Texturize(aFaces(3),"wallpaper.gif",1,1,8,6)); - DISP(Texturize(aFaces(4),"wallpaper.gif",1,1,8,6)); - -// DISP(drawShape(aFaces(1), Quantity_NOC_LIGHTPINK, Standard_False)); -// DISP(drawShape(aFaces(3), Quantity_NOC_LIGHTPINK, Standard_False)); -// DISP(drawShape(aFaces(4), Quantity_NOC_LIGHTPINK, Standard_False)); - - // texturize furniture items with "wooden" texture - if (loadShape(aShape, "MODERN_Table_1.brep")) - { - moveScale(aShape); - DISP(Texturize(aShape, "chataignier.gif")); - } - if (loadShape(aShape, "MODERN_Chair_1.brep")) - { - moveScale(aShape); - DISP(Texturize(aShape, "chataignier.gif")); - } - if (loadShape(aShape, "MODERN_Cooker_1.brep")) - { - moveScale(aShape); - - aFaces.Clear(); - TopExp::MapShapes(aShape, TopAbs_FACE, aFaces); - nbFaces = aFaces.Extent(); - - for (Standard_Integer i = 1; i <= nbFaces; i++) - { - if (i >= 59) - DISP(drawShape(aFaces(i), Graphic3d_NOM_STEEL, Standard_False)); - else if (i >= 29) - DISP(drawShape(aFaces(i), Graphic3d_NOM_ALUMINIUM, Standard_False)); - else if (i == 28) - DISP(Texturize(aFaces(i), "cookerplate.gif")); - else - DISP(Texturize(aFaces(i), "chataignier.gif")); - } - } - if (loadShape(aShape, "MODERN_Cooker_1_opened.brep")) - { - moveScale(aShape); - DISP(Texturize(aShape, "chataignier.gif")); - } - if (loadShape(aShape, "MODERN_Exhaust_1.brep")) - { - moveScale(aShape); - DISP(drawShape(aShape, Graphic3d_NOM_STONE, Standard_False)); - } - if (loadShape(aShape, "MODERN_MVCooker_1.brep")) - { - moveScale(aShape); - DISP(drawShape(aShape, Graphic3d_NOM_SILVER, Standard_False)); - } - if (loadShape(aShape, "MODERN_MVCooker_1_opened.brep")) - { - moveScale(aShape); - DISP(drawShape(aShape, Graphic3d_NOM_SILVER, Standard_False)); - } - if (loadShape(aShape, "MODERN_Sink_1.brep")) - { - moveScale(aShape); - - aFaces.Clear(); - TopExp::MapShapes(aShape, TopAbs_FACE, aFaces); - nbFaces = aFaces.Extent(); - - for (Standard_Integer i = 1; i <= nbFaces; i++) - { - if (i < 145) - DISP(drawShape(aFaces(i), Graphic3d_NOM_ALUMINIUM, Standard_False)); - else if (i == 145) - DISP(Texturize(aFaces(i), "cookerplate.gif")); - else - DISP(Texturize(aFaces(i), "chataignier.gif")); - } - } - if (loadShape(aShape, "MODERN_Sink_1_opened.brep")) - { - moveScale(aShape); - DISP(Texturize(aShape, "chataignier.gif")); - } - if (loadShape(aShape, "MODERN_Refrigerator_1.brep")) - { - moveScale(aShape); - DISP(drawShape(aShape, Graphic3d_NOM_CHROME, Standard_False)); - } - if (loadShape(aShape, "MODERN_Refrigerator_1_opened.brep")) - { - moveScale(aShape); - DISP(drawShape(aShape, Graphic3d_NOM_CHROME, Standard_False)); - } - - getViewer()->Update(); -} \ No newline at end of file diff --git a/samples/mfc/standard/04_Viewer3d/src/TexturesExt_Presentation.h b/samples/mfc/standard/04_Viewer3d/src/TexturesExt_Presentation.h deleted file mode 100755 index 1c67a95be5..0000000000 --- a/samples/mfc/standard/04_Viewer3d/src/TexturesExt_Presentation.h +++ /dev/null @@ -1,59 +0,0 @@ -// TexturesExt_Presentation.h: interface for the TexturesExt_Presentation class. -// Creation of textural presentation of shape -////////////////////////////////////////////////////////////////////// - -#if !defined(AFX_TexturesExt_Presentation_H__790EED7F_7BA2_11D5_BA4A_0060B0EE18EA__INCLUDED_) -#define AFX_TexturesExt_Presentation_H__790EED7F_7BA2_11D5_BA4A_0060B0EE18EA__INCLUDED_ - -#if _MSC_VER > 1000 -#pragma once -#endif // _MSC_VER > 1000 - -#include "OCCDemo_Presentation.h" -#include -class TopoDS_Shape; -class TCollection_AsciiString; - -class TexturesExt_Presentation : public OCCDemo_Presentation -{ -public: - // Construction - TexturesExt_Presentation(); - -public: - // Iteration on samples - virtual void DoSample(); - // one phase of iterations - - virtual void Init(); - -private: - // display an AIS_Shape based on a given shape with texture with given filename - // filename can also be an integer value ("2", "5", etc.), in this case - // a predefined texture from Graphic3d_NameOfTexture2D with number = this value - // is loaded. - Handle(AIS_Shape) Texturize( - const TopoDS_Shape& aShape, TCollection_AsciiString aTFileName, - Standard_Real toScaleU=1.0, Standard_Real toScaleV=1.0, - Standard_Real toRepeatU=1.0, Standard_Real toRepeatV=1.0, - Standard_Real originU=0.0, Standard_Real originV=0.0); - - // loads a shape from a given brep file from data dir into a given TopoDS_Shape object - Standard_Boolean loadShape(TopoDS_Shape&, TCollection_AsciiString); - - // turns 6 diretional lights on/off for brighter demonstration - void lightsOnOff(Standard_Boolean isOn); - - // Sample functions - void sampleBottle(); - void sampleTerrain(); - void sampleKitchen(); - -private: - // Array of pointers to sample functions - typedef void (TexturesExt_Presentation::*PSampleFuncType)(); - static const PSampleFuncType SampleFuncs[]; - -}; - -#endif // !defined(AFX_TexturesExt_Presentation_H__790EED7F_7BA2_11D5_BA4A_0060B0EE18EA__INCLUDED_) diff --git a/samples/mfc/standard/04_Viewer3d/src/TrihedronDlg.cpp b/samples/mfc/standard/04_Viewer3d/src/TrihedronDlg.cpp deleted file mode 100755 index 6db2006ab1..0000000000 --- a/samples/mfc/standard/04_Viewer3d/src/TrihedronDlg.cpp +++ /dev/null @@ -1,291 +0,0 @@ -// TrihedronDlg.cpp : implementation file -// - -#include "stdafx.h" -#include "Viewer3dApp.h" -#include "Viewer3dView.h" -#include "TrihedronDlg.h" - -#ifdef _DEBUG -#define new DEBUG_NEW -#undef THIS_FILE -static char THIS_FILE[] = __FILE__; -#endif - -void round(double &value, unsigned char digits) -{ -char neg = 1; -if(value < 0){ -neg = (-1); -value *= (-1); -} -double inc(1.0); -while(digits){ inc*=10; --digits; } -double dg(value*inc*100); -value = floor(floor(dg)/100); -if((dg-(value*100)) > 49.9) value+=1; -value = (value*neg)/inc; -} - - -///////////////////////////////////////////////////////////////////////////// -// CTrihedronDlg dialog - - -//CTrihedronDlg::CTrihedronDlg(CWnd* pParent /*=NULL*/) - //: CDialog(CTrihedronDlg::IDD, pParent) - -CTrihedronDlg::CTrihedronDlg(Handle(V3d_View) Current_V3d_View, CViewer3dDoc* pDoc, CWnd* pParent /*=NULL*/) - : CDialog(CTrihedronDlg::IDD, pParent) - -{ - //{{AFX_DATA_INIT(CTrihedronDlg) - m_TrihedronScale = 0.1; - myDoc=pDoc; - myCurrent_V3d_View = Current_V3d_View; - /*m_*/Color = Quantity_NOC_WHITE; - /*m_*/Position = Aspect_TOTP_LEFT_UPPER; - - // NOTE: the ClassWizard will add member initialization here - //}}AFX_DATA_INIT -} - - -void CTrihedronDlg::DoDataExchange(CDataExchange* pDX) -{ - CDialog::DoDataExchange(pDX); - //{{AFX_DATA_MAP(CTrihedronDlg) - DDX_Control(pDX, IDC_COMBOTRIHEDRPOS, m_ComboTrihedronPosList); - DDX_Control(pDX, IDC_COMBOTRIHEDRCOLOR, m_ComboTrihedronColorList); - DDX_Text(pDX, IDC_EDITTRIHEDRSCALE, m_TrihedronScale); - DDV_MinMaxDouble(pDX, m_TrihedronScale, 0., 1.); - DDX_Control(pDX, IDC_SPINTRIHEDRSCALE, m_SpinTrihedronScale); - //}}AFX_DATA_MAP -} - - -BEGIN_MESSAGE_MAP(CTrihedronDlg, CDialog) - //{{AFX_MSG_MAP(CTrihedronDlg) - ON_CBN_SELCHANGE(IDC_COMBOTRIHEDRCOLOR, OnSelchangeCombotrihedrcolor) - ON_CBN_SELCHANGE(IDC_COMBOTRIHEDRPOS, OnSelchangeCombotrihedrpos) - ON_EN_CHANGE(IDC_EDITTRIHEDRSCALE, OnChangeEdittrihedrscale) - ON_NOTIFY(UDN_DELTAPOS, IDC_SPINTRIHEDRSCALE, OnDeltaposSpintrihedrscale) - //}}AFX_MSG_MAP -END_MESSAGE_MAP() - - - - - -///////////////////////////////////////////////////////////////////////////// -// CTrihedronDlg message handlers - -void CTrihedronDlg::OnSelchangeCombotrihedrcolor() -{ - UpdateData(TRUE); - int a = m_ComboTrihedronColorList.GetCurSel(); - if( a==0) - Color=Quantity_NOC_BLACK; - else if(a==1) - Color=Quantity_NOC_MATRABLUE; - else if(a==2) - Color=Quantity_NOC_MATRAGRAY; -// else if(a==3) -// Color=Quantity_NOC_ALICEBLUE; - else if(a==3) - Color=Quantity_NOC_ANTIQUEWHITE; - //else if(a==4) - // Color=Quantity_NOC_BISQUE; - - UpdateData(FALSE); - - myCurrent_V3d_View->TriedronDisplay(Position, Color, m_TrihedronScale); - myCurrent_V3d_View->Update(); - -} - -void CTrihedronDlg::OnSelchangeCombotrihedrpos() -{ - UpdateData(TRUE); - int b = m_ComboTrihedronPosList.GetCurSel(); - - if( b==0) - Position=Aspect_TOTP_CENTER; - else if(b==1) - Position=Aspect_TOTP_LEFT_LOWER; - else if(b==2) - Position=Aspect_TOTP_LEFT_UPPER; - else if(b==3) - Position=Aspect_TOTP_RIGHT_LOWER; - else if(b==4) - Position=Aspect_TOTP_RIGHT_UPPER; - - UpdateData(FALSE); - - myCurrent_V3d_View->TriedronDisplay(Position, Color, m_TrihedronScale); - myCurrent_V3d_View->Update(); - -} - - -BOOL CTrihedronDlg::OnInitDialog() -{ - CDialog::OnInitDialog(); - UpdateData(TRUE); - -// Initializing the ComboBox : Position - m_ComboTrihedronPosList.InsertString(-1, L"Center"); - m_ComboTrihedronPosList.InsertString(-1, L"Left Lower"); - m_ComboTrihedronPosList.InsertString(-1, L"Left Upper"); - m_ComboTrihedronPosList.InsertString(-1, L"Right Lower"); - m_ComboTrihedronPosList.InsertString(-1, L"Right Upper"); - -// Initializing the ComboBox : Color - /* - m_ComboTrihedronColorList.InsertString(-1, L"BLACK"); - m_ComboTrihedronColorList.InsertString(-1, L"MATRABLUE"); - m_ComboTrihedronColorList.InsertString(-1, L"MATRAGRAY"); - m_ComboTrihedronColorList.InsertString(-1, L"ALICE BLUE"); - m_ComboTrihedronColorList.InsertString(-1, L"WHITE"); - m_ComboTrihedronColorList.InsertString(-1, L"BISQUE"); - */ - m_ComboTrihedronColorList.InsertString(-1, L"Black"); - m_ComboTrihedronColorList.InsertString(-1, L"Blue"); - m_ComboTrihedronColorList.InsertString(-1, L"Gray"); - m_ComboTrihedronColorList.InsertString(-1, L"White"); - //m_ComboTrihedronColorList.InsertString(-1, L"Bisque"); - - - - UpdateData(FALSE); - -/* if (CDemoVisualizationView::slinitialisation()) - { - AfxMessageBox("debut"); - - if(m_Position==Aspect_TOTP_CENTER) - m_ComboTrihedronPosList.SetCurSel(0); - else if(m_Position==Aspect_TOTP_LEFT_LOWER) - m_ComboTrihedronPosList.SetCurSel(1); - else if(m_Position==Aspect_TOTP_LEFT_UPPER) - m_ComboTrihedronPosList.SetCurSel(2); - else if(m_Position==Aspect_TOTP_RIGHT_LOWER) - m_ComboTrihedronPosList.SetCurSel(3); - else if(m_Position==Aspect_TOTP_RIGHT_UPPER) - m_ComboTrihedronPosList.SetCurSel(4); - - if(m_Color==Quantity_NOC_BLACK) - m_ComboTrihedronColorList.SetCurSel(0); - else if(m_Color==Quantity_NOC_MATRABLUE) - m_ComboTrihedronColorList.SetCurSel(1); - else if(m_Color==Quantity_NOC_MATRAGRAY) - m_ComboTrihedronColorList.SetCurSel(2); - else if(m_Color==Quantity_NOC_ALICEBLUE) - m_ComboTrihedronColorList.SetCurSel(3); - else if(m_Color==Quantity_NOC_WHITE) - m_ComboTrihedronColorList.SetCurSel(4); - else if(m_Color==Quantity_NOC_BISQUE) - m_ComboTrihedronColorList.SetCurSel(5); - Position = m_Position; - Color = m_Color; - myCurrent_V3d_View->TriedronDisplay(Position, Color, m_TrihedronScale); - myCurrent_V3d_View->Update(); - - Initialisation = Standard_False; - - } - else - {*/ - if(Position==Aspect_TOTP_CENTER) - m_ComboTrihedronPosList.SetCurSel(0); - else if(Position==Aspect_TOTP_LEFT_LOWER) - m_ComboTrihedronPosList.SetCurSel(1); - else if(Position==Aspect_TOTP_LEFT_UPPER) - m_ComboTrihedronPosList.SetCurSel(2); - else if(Position==Aspect_TOTP_RIGHT_LOWER) - m_ComboTrihedronPosList.SetCurSel(3); - else if(Position==Aspect_TOTP_RIGHT_UPPER) - m_ComboTrihedronPosList.SetCurSel(4); - - if(Color==Quantity_NOC_BLACK) - m_ComboTrihedronColorList.SetCurSel(0); - else if(Color==Quantity_NOC_MATRABLUE) - m_ComboTrihedronColorList.SetCurSel(1); - else if(Color==Quantity_NOC_MATRAGRAY) - m_ComboTrihedronColorList.SetCurSel(2); -// else if(Color==Quantity_NOC_ALICEBLUE) -// m_ComboTrihedronColorList.SetCurSel(3); - else if(Color==Quantity_NOC_WHITE) - m_ComboTrihedronColorList.SetCurSel(3); - //else if(Color==Quantity_NOC_BISQUE) - // m_ComboTrihedronColorList.SetCurSel(4); - - myCurrent_V3d_View->TriedronDisplay(Position, Color, m_TrihedronScale); - myCurrent_V3d_View->Update(); -// } - - - - - - return TRUE; // return TRUE unless you set the focus to a control - // EXCEPTION: OCX Property Pages should return FALSE -} - - -void CTrihedronDlg::OnDeltaposSpintrihedrscale(NMHDR* pNMHDR, LRESULT* pResult) -{ - NM_UPDOWN* pNMUpDown = (NM_UPDOWN*)pNMHDR; - - if (pNMUpDown->iDelta >= 1) - pNMUpDown->iDelta = 1; - else - pNMUpDown->iDelta = -1; - - if ((pNMUpDown->iDelta > 0) && (m_TrihedronScale > 0)) - m_TrihedronScale = m_TrihedronScale - (pNMUpDown->iDelta)*0.01; - - if ((pNMUpDown->iDelta < 0) && (m_TrihedronScale < 1)) - m_TrihedronScale = m_TrihedronScale - (pNMUpDown->iDelta)*0.01; - - - m_TrihedronScale = m_TrihedronScale*100; - m_TrihedronScale = floor(m_TrihedronScale ); - m_TrihedronScale = m_TrihedronScale /100; - -// round(m_TrihedronScale,2); - - if (fabs(m_TrihedronScale) < 0.001) - m_TrihedronScale =0; - UpdateData(FALSE); - - myCurrent_V3d_View->TriedronDisplay(Position, Color, m_TrihedronScale); - *pResult = 0; - - myCurrent_V3d_View->Update(); - -} - -void CTrihedronDlg::OnChangeEdittrihedrscale() -{ - if (UpdateData()){ - myCurrent_V3d_View->TriedronDisplay(Position, Color, m_TrihedronScale); - myCurrent_V3d_View->Update(); - } -} - -void CTrihedronDlg::OnCancel() -{ - myCurrent_V3d_View->TriedronErase(); - myCurrent_V3d_View->Update(); - myDoc -> SetMyStaticTrihedronAxisIsDisplayed(FALSE); -// Initialisation = Standard_True; - CDialog::OnCancel(); -} - -void CTrihedronDlg::OnOK() -{ - myDoc -> SetMyStaticTrihedronAxisIsDisplayed(TRUE); - CDialog::OnOK(); -} - diff --git a/samples/mfc/standard/04_Viewer3d/src/TrihedronDlg.h b/samples/mfc/standard/04_Viewer3d/src/TrihedronDlg.h deleted file mode 100755 index bfe4056f9d..0000000000 --- a/samples/mfc/standard/04_Viewer3d/src/TrihedronDlg.h +++ /dev/null @@ -1,82 +0,0 @@ -#if !defined(AFX_TRIHEDRONDLG_H__1917B30F_3102_11D6_BD0D_00A0C982B46F__INCLUDED_) -#define AFX_TRIHEDRONDLG_H__1917B30F_3102_11D6_BD0D_00A0C982B46F__INCLUDED_ - -#if _MSC_VER > 1000 -#pragma once -#endif // _MSC_VER > 1000 -// TrihedronDlg.h : header file -// - -#include "Viewer3dDoc.h" - -#include -#include - -#include "..\res\resource.h" -///////////////////////////////////////////////////////////////////////////// -// CTrihedronDlg dialog - -class CTrihedronDlg : public CDialog -{ -// Construction -public: - CTrihedronDlg(CWnd* pParent = NULL); // standard constructor - CTrihedronDlg(Handle(V3d_View) Current_V3d_View, CViewer3dDoc* pDoc, CWnd* pParent = NULL); // standard constructor - - -// Dialog Data - //{{AFX_DATA(CTrihedronDlg) - enum { IDD = IDD_TRIHEDRON }; - CComboBox m_ComboTrihedronPosList; - CComboBox m_ComboTrihedronColorList; - double m_TrihedronScale; - CSpinButtonCtrl m_SpinTrihedronScale; - Quantity_NameOfColor m_Color; - Aspect_TypeOfTriedronPosition m_Position; - - - // NOTE: the ClassWizard will add data members here - //}}AFX_DATA - - -// Overrides - // ClassWizard generated virtual function overrides - //{{AFX_VIRTUAL(CTrihedronDlg) - protected: - virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support - //}}AFX_VIRTUAL - -// Implementation -protected: - - // Generated message map functions - //{{AFX_MSG(CTrihedronDlg) - afx_msg void OnSelchangeCombotrihedrcolor(); - afx_msg void OnSelchangeCombotrihedrpos(); - afx_msg void OnChangeEdittrihedrscale(); - afx_msg void OnDeltaposSpintrihedrscale(NMHDR* pNMHDR, LRESULT* pResult); - virtual BOOL OnInitDialog(); - virtual void OnCancel(); - virtual void OnOK(); - //}}AFX_MSG - DECLARE_MESSAGE_MAP() - -private: - - Handle(V3d_View) myCurrent_V3d_View; - CViewer3dDoc* myDoc; - Quantity_NameOfColor Color ; - Aspect_TypeOfTriedronPosition Position; -/* -public: - -static Standard_Boolean Initialisation; -static Standard_Boolean GetInitialisation() {return Initialisation;}; -*/ - -}; - -//{{AFX_INSERT_LOCATION}} -// Microsoft Visual C++ will insert additional declarations immediately before the previous line. - -#endif // !defined(AFX_TRIHEDRONDLG_H__1917B30F_3102_11D6_BD0D_00A0C982B46F__INCLUDED_) diff --git a/samples/mfc/standard/04_Viewer3d/src/Viewer3dApp.cpp b/samples/mfc/standard/04_Viewer3d/src/Viewer3dApp.cpp deleted file mode 100755 index 36834f8b2d..0000000000 --- a/samples/mfc/standard/04_Viewer3d/src/Viewer3dApp.cpp +++ /dev/null @@ -1,93 +0,0 @@ -// Viewer3dApp.cpp : Defines the class behaviors for the application. -// - -#include "stdafx.h" -#include "Viewer3dApp.h" - -#include -#include -#include "Viewer3dDoc.h" -#include "Viewer3dView.h" - -///////////////////////////////////////////////////////////////////////////// -// CViewer3dApp - -BEGIN_MESSAGE_MAP(CViewer3dApp, CWinApp) - //{{AFX_MSG_MAP(CViewer3dApp) - ON_COMMAND(ID_APP_ABOUT, OnAppAbout) - // NOTE - the ClassWizard will add and remove mapping macros here. - // DO NOT EDIT what you see in these blocks of generated code! - //}}AFX_MSG_MAP - // Standard file based document commands - ON_COMMAND(ID_FILE_NEW, CWinApp::OnFileNew) - ON_COMMAND(ID_FILE_OPEN, CWinApp::OnFileOpen) -END_MESSAGE_MAP() - -///////////////////////////////////////////////////////////////////////////// -// CViewer3dApp construction - -CViewer3dApp::CViewer3dApp() : OCC_App() -{ - SampleName = "Viewer3d"; //for about dialog - SetSamplePath (L"..\\..\\03_Viewer3d"); -} - -///////////////////////////////////////////////////////////////////////////// -// The one and only CViewer3dApp object - -CViewer3dApp theApp; - -///////////////////////////////////////////////////////////////////////////// -// CViewer3dApp initialization - -BOOL CViewer3dApp::InitInstance() -{ - AfxEnableControlContainer(); - - // Standard initialization - // If you are not using these features and wish to reduce the size - // of your final executable, you should remove from the following - // the specific initialization routines you do not need. - - // Change the registry key under which our settings are stored. - // You should modify this string to be something appropriate - // such as the name of your company or organization. - SetRegistryKey(_T("Local AppWizard-Generated Applications")); - - LoadStdProfileSettings(); // Load standard INI file options (including MRU) - - // Register the application's document templates. Document templates - // serve as the connection between documents, frame windows and views. - - CMultiDocTemplate* pDocTemplate; - pDocTemplate = new CMultiDocTemplate( - IDR_3DTYPE, - RUNTIME_CLASS(CViewer3dDoc), - RUNTIME_CLASS(OCC_3dChildFrame), // custom MDI child frame - RUNTIME_CLASS(CViewer3dView)); - AddDocTemplate(pDocTemplate); - - // create main MDI Frame window - OCC_MainFrame* pMainFrame = new OCC_MainFrame(with_AIS_TB); - if (!pMainFrame->LoadFrame(IDR_MAINFRAME)) - return FALSE; - m_pMainWnd = pMainFrame; - - // Parse command line for standard shell commands, DDE, file open - CCommandLineInfo cmdInfo; - ParseCommandLine(cmdInfo); - - // Dispatch commands specified on the command line - if (!ProcessShellCommand(cmdInfo)) - return FALSE; - - // The main window has been initialized, so show and update it. - pMainFrame->ShowWindow(m_nCmdShow); - pMainFrame->UpdateWindow(); - - return TRUE; -} - - -///////////////////////////////////////////////////////////////////////////// -// CViewer3dApp commands diff --git a/samples/mfc/standard/04_Viewer3d/src/Viewer3dApp.h b/samples/mfc/standard/04_Viewer3d/src/Viewer3dApp.h deleted file mode 100755 index 31459e5184..0000000000 --- a/samples/mfc/standard/04_Viewer3d/src/Viewer3dApp.h +++ /dev/null @@ -1,34 +0,0 @@ -// Viewer3dApp.h : main header file for the Viewer3d application -// - -#if !defined(AFX_VIEWER3DAPP_H__3045338E_3E75_11D7_8611_0060B0EE281E__INCLUDED_) -#define AFX_VIEWER3DAPP_H__3045338E_3E75_11D7_8611_0060B0EE281E__INCLUDED_ - -#if _MSC_VER >= 1000 -#pragma once -#endif // _MSC_VER >= 1000 - -#include - -class CViewer3dApp : public OCC_App -{ -public: - - CViewer3dApp(); - -// Overrides - // ClassWizard generated virtual function overrides - //{{AFX_VIRTUAL(CViewer3dApp) - public: - virtual BOOL InitInstance(); - //}}AFX_VIRTUAL - - DECLARE_MESSAGE_MAP() -}; - -///////////////////////////////////////////////////////////////////////////// - -//{{AFX_INSERT_LOCATION}} -// Microsoft Developer Studio will insert additional declarations immediately before the previous line. - -#endif // !defined(AFX_VIEWER3DAPP_H__3045338E_3E75_11D7_8611_0060B0EE281E__INCLUDED_) diff --git a/samples/mfc/standard/04_Viewer3d/src/Viewer3dDoc.cpp b/samples/mfc/standard/04_Viewer3d/src/Viewer3dDoc.cpp deleted file mode 100755 index a29bfdc869..0000000000 --- a/samples/mfc/standard/04_Viewer3d/src/Viewer3dDoc.cpp +++ /dev/null @@ -1,1039 +0,0 @@ -// Viewer3dDoc.cpp : implementation of the CViewer3dDoc class -// - -#include "stdafx.h" -#include "Viewer3dApp.h" -#include "BoxRadius.h" -#include "DlgIsos.h" - -#include "Viewer3dDoc.h" -#include "Viewer3dView.h" -#include "OffsetDlg.h" -#include "ResultDialog.h" -#include "User_Cylinder.hxx" - -#include "AIS_Trihedron.hxx" -#include "Geom_Axis2Placement.hxx" - -///////////////////////////////////////////////////////////////////////////// -// CViewer3dDoc - -IMPLEMENT_DYNCREATE(CViewer3dDoc, CDocument) - -BEGIN_MESSAGE_MAP(CViewer3dDoc, OCC_3dDoc) - //{{AFX_MSG_MAP(CViewer3dDoc) - ON_COMMAND(ID_BOX, OnBox) - ON_COMMAND(ID_Cylinder, OnCylinder) - ON_COMMAND(ID_SPHERE, OnSphere) - ON_COMMAND(ID_ERASEALL, OnRemoveAll) - ON_COMMAND(ID_NBISOS, OnNbisos) - ON_COMMAND(ID_FACES, OnFaces) - ON_COMMAND(ID_EDGES, OnEdges) - ON_COMMAND(ID_VERTICES, OnVertices) - ON_COMMAND(ID_NEUTRAL, OnNeutral) - ON_COMMAND(ID_USERCYLINDER_CHANGEFACECOLOR, OnUsercylinderChangefacecolor) - ON_COMMAND(ID_FILLET3D, OnFillet3d) - ON_COMMAND(ID_CIRCLE, OnCircle) - ON_COMMAND(ID_LINE, OnLine) - ON_COMMAND(ID_OVERLAPPED_BOX, OnOverlappedBox) - ON_COMMAND(ID_OVERLAPPED_CYLINDER, OnOverlappedCylinder) - ON_COMMAND(ID_OVERLAPPED_SPHERE, OnOverlappedSphere) - ON_COMMAND(ID_POLYGON_OFFSETS, OnPolygonOffsets) - ON_UPDATE_COMMAND_UI(ID_POLYGON_OFFSETS, OnUpdatePolygonOffsets) - ON_UPDATE_COMMAND_UI(ID_Cylinder, OnUpdateCylinder) - ON_UPDATE_COMMAND_UI(ID_SPHERE, OnUpdateSphere) - ON_UPDATE_COMMAND_UI(ID_BOX, OnUpdateBox) - ON_UPDATE_COMMAND_UI(ID_OVERLAPPED_CYLINDER, OnUpdateOverlappedCylinder) - ON_UPDATE_COMMAND_UI(ID_OVERLAPPED_SPHERE, OnUpdateOverlappedSphere) - ON_UPDATE_COMMAND_UI(ID_OVERLAPPED_BOX, OnUpdateOverlappedBox) - ON_COMMAND(ID_OBJECT_REMOVE, OnObjectRemove) - ON_COMMAND(ID_OBJECT_ERASE, OnObjectErase) - ON_COMMAND(ID_OBJECT_DISPLAYALL, OnObjectDisplayall) - ON_COMMAND(ID_OBJECT_COLORED_MESH, OnObjectColoredMesh) - ON_UPDATE_COMMAND_UI(ID_OBJECT_COLORED_MESH, OnUpdateObjectColoredMesh) - ON_UPDATE_COMMAND_UI(ID_OBJECT_SHADING, OnUpdateObjectShading) - ON_UPDATE_COMMAND_UI(ID_OBJECT_WIREFRAME, OnUpdateObjectWireframe) - ON_COMMAND(ID_OPTIONS_TRIHEDRON_DYNAMIC_TRIHEDRON, OnOptionsTrihedronDynamicTrihedron) - ON_UPDATE_COMMAND_UI(ID_OPTIONS_TRIHEDRON_DYNAMIC_TRIHEDRON, OnUpdateOptionsTrihedronDynamicTrihedron) - ON_UPDATE_COMMAND_UI(ID_OPTIONS_TRIHEDRON_STATIC_TRIHEDRON, OnUpdateOptionsTrihedronStaticTrihedron) - ON_COMMAND(ID_OBJECT_MATERIAL, OnObjectMaterial) - ON_COMMAND(ID_TEXTURE_ON, OnTextureOn) - ON_COMMAND(ID_BUTTONNext, OnBUTTONNext) - ON_COMMAND(ID_BUTTONStart, OnBUTTONStart) - ON_COMMAND(ID_BUTTONRepeat, OnBUTTONRepeat) - ON_COMMAND(ID_BUTTONPrev, OnBUTTONPrev) - ON_COMMAND(ID_BUTTONEnd, OnBUTTONEnd) - ON_UPDATE_COMMAND_UI(ID_BUTTONNext, OnUpdateBUTTONNext) - ON_UPDATE_COMMAND_UI(ID_BUTTONPrev, OnUpdateBUTTONPrev) - ON_UPDATE_COMMAND_UI(ID_BUTTONStart, OnUpdateBUTTONStart) - ON_UPDATE_COMMAND_UI(ID_BUTTONRepeat, OnUpdateBUTTONRepeat) - ON_UPDATE_COMMAND_UI(ID_BUTTONEnd, OnUpdateBUTTONEnd) - ON_COMMAND(ID_FILE_NEW, OnFileNew) - ON_COMMAND(ID_DUMP_VIEW, OnDumpView) - //}}AFX_MSG_MAP -END_MESSAGE_MAP() - -///////////////////////////////////////////////////////////////////////////// -// CViewer3dDoc construction/destruction - -CViewer3dDoc::CViewer3dDoc() -:OCC_3dDoc() -{ - myCylinder.Nullify(); - mySphere.Nullify(); - myBox.Nullify(); - myOverlappedCylinder.Nullify(); - myOverlappedSphere.Nullify(); - myOverlappedBox.Nullify(); - myOffsetDlg = NULL; - myStaticTrihedronAxisIsDisplayed = FALSE; - myState = -1; - - isTextureSampleStarted = FALSE; - - myPresentation = OCCDemo_Presentation::Current; - myPresentation->SetDocument(this); - - - myAISContext->DefaultDrawer()->ShadingAspect()->SetColor(Quantity_NOC_CHARTREUSE1); - myAISContext->DefaultDrawer()->ShadingAspect()->SetMaterial(Graphic3d_NOM_SILVER); - - strcpy_s(myDataDir, "Data"); - strcpy_s(myLastPath, "."); - - /* - Handle(AIS_Trihedron) myTrihedron; - Handle(Geom_Axis2Placement) myTrihedronAxis=new Geom_Axis2Placement(gp::XOY()); - myTrihedron=new AIS_Trihedron(myTrihedronAxis); - myAISContext->Display(myTrihedron); - */ -} - -CViewer3dDoc::~CViewer3dDoc() -{ -} - -///////////////////////////////////////////////////////////////////////////// -// CViewer3dDoc diagnostics - -#ifdef _DEBUG -void CViewer3dDoc::AssertValid() const -{ - CDocument::AssertValid(); -} - -void CViewer3dDoc::Dump(CDumpContext& dc) const -{ - CDocument::Dump(dc); -} -#endif //_DEBUG - -///////////////////////////////////////////////////////////////////////////// -// CViewer3dDoc commands - -void CViewer3dDoc::UpdateResultMessageDlg (CString theTitle, const TCollection_AsciiString& theMessage) -{ - CString aText (theMessage.ToCString()); - myCResultDialog.SetText (aText); - myCResultDialog.SetTitle(theTitle); -} - -void CViewer3dDoc::UpdateResultMessageDlg(CString theTitle, CString theMessage) -{ - myCResultDialog.SetText (theMessage); - myCResultDialog.SetTitle(theTitle); -} - -void CViewer3dDoc::OnBox() -{ - if(myBox.IsNull()) - { - BRepPrimAPI_MakeBox B(gp_Pnt(0,-400,-100), 200.,150.,100.); - - - myBox = new AIS_Shape(B.Shape()); - - myAISContext->SetMaterial (myBox, Graphic3d_NOM_PEWTER, Standard_False); - myAISContext->SetDisplayMode (myBox, 1, Standard_False); - - myAISContext->Display (myBox, Standard_True); - TCollection_AsciiString Message("\ -BRepPrimAPI_MakeBox Box1(gp_Pnt(0,-400,-100), 200.,150.,100.);\n\ - "); - - UpdateResultMessageDlg("Create Box",Message); - } -} - -void CViewer3dDoc::OnCylinder() -{ - if(myCylinder.IsNull()) - { - gp_Ax2 CylAx2(gp_Pnt(0,0,-100), gp_Dir(gp_Vec(gp_Pnt(0,0,-100),gp_Pnt(0,0,100)))); - myCylinder = new User_Cylinder(CylAx2, 80.,200.); - - myAISContext->SetDisplayMode (myCylinder, 1, Standard_False); - - myAISContext->Display (myCylinder, Standard_True); - - TCollection_AsciiString Message("\ -gp_Ax2 CylAx2(gp_Pnt(0,0,-100), gp_Dir(gp_Vec(gp_Pnt(0,0,-100),gp_Pnt(0,0,100))));\n\ -C = new User_Cylinder(CylAx2, 80.,200.);;\n\ - "); - - UpdateResultMessageDlg("Create Cylinder",Message); - } -} - -void CViewer3dDoc::OnSphere() -{ - if(mySphere.IsNull()) - { - BRepPrimAPI_MakeSphere S(gp_Pnt(0,300,0), 100.); - - mySphere = new AIS_Shape(S.Shape()); - - myAISContext->SetMaterial (mySphere, Graphic3d_NOM_BRONZE, Standard_False); - myAISContext->SetDisplayMode (mySphere, 1, Standard_False); - - myAISContext->Display (mySphere, Standard_True); - TCollection_AsciiString Message("\ -BRepPrimAPI_MakeSphere S(gp_Pnt(0,300,0), 100.);\n\ - "); - UpdateResultMessageDlg("Create Sphere",Message); - } -} - -void CViewer3dDoc::OnRemoveAll() - -{ - AIS_ListOfInteractive aListOfObjects; - myAISContext->ObjectsInside(aListOfObjects,AIS_KOI_Shape); - - AIS_ListIteratorOfListOfInteractive aListIterator; - for(aListIterator.Initialize(aListOfObjects);aListIterator.More();aListIterator.Next()){ - myAISContext->Remove (aListIterator.Value(), Standard_False); - } - - myAISContext->Remove (myCylinder, Standard_True); - - - myCylinder.Nullify(); - mySphere.Nullify(); - myBox.Nullify(); - myOverlappedCylinder.Nullify(); - myOverlappedSphere.Nullify(); - myOverlappedBox.Nullify(); - if(myOffsetDlg && myOffsetDlg->IsWindowVisible()) - myOffsetDlg->UpdateValues(); -} - -void CViewer3dDoc::OnOverlappedBox() -{ - OnBox(); - if(myOverlappedBox.IsNull()){ - BRepPrimAPI_MakeBox B(gp_Pnt(0,-400,-100), 200.,150.,100.); - - BRepBuilderAPI_NurbsConvert aNurbsConvert(B.Shape()); - TopoDS_Shape aBoxShape2 = aNurbsConvert.Shape(); - - - myOverlappedBox = new AIS_Shape(aBoxShape2); - - myAISContext->SetMaterial (myOverlappedBox, Graphic3d_NOM_GOLD, Standard_False); - myAISContext->SetDisplayMode (myOverlappedBox, 1, Standard_False); - - myAISContext->Display (myOverlappedBox, Standard_True); - TCollection_AsciiString Message("\ -BRepPrimAPI_MakeBox Box1(gp_Pnt(0,-400,-100), 200.,150.,100.);\n\ -\n\ -BRepPrimAPI_MakeBox Box2(gp_Pnt(0,-400,-100), 200.,150.,100.);\n\ -BRepBuilderAPI_NurbsConvert aNurbsConvert(Box2.Shape());\n\ - "); - UpdateResultMessageDlg("Create overlapped boxes",Message); - if(myOffsetDlg && myOffsetDlg->IsWindowVisible()) - myOffsetDlg->UpdateValues(); - } -} - -void CViewer3dDoc::OnOverlappedCylinder() -{ - OnCylinder(); - - if(myOverlappedCylinder.IsNull()){ - gp_Ax2 CylAx2(gp_Pnt(0,0,-100), gp_Dir(gp_Vec(gp_Pnt(0,0,-100),gp_Pnt(0,0,100)))); - BRepPrimAPI_MakeCylinder C(CylAx2, 80.,200.); - - BRepBuilderAPI_NurbsConvert aNurbsConvert(C.Shape()); - TopoDS_Shape aCylShape2 = aNurbsConvert.Shape(); - - myOverlappedCylinder = new AIS_Shape(aCylShape2); - - - myAISContext->SetMaterial (myOverlappedCylinder, Graphic3d_NOM_GOLD, Standard_False); - myAISContext->SetDisplayMode (myOverlappedCylinder, 1, Standard_False); - - myAISContext->Display (myOverlappedCylinder, Standard_True); - - TCollection_AsciiString Message("\ -gp_Ax2 CylAx2(gp_Pnt(0,0,-100), gp_Dir(gp_Vec(gp_Pnt(0,0,-100),gp_Pnt(0,0,100))));\n\ -Cylinder1 = new User_Cylinder(CylAx2, 80.,200.);\n\ -\n\ -BRepPrimAPI_MakeCylinder Cylinder2(CylAx2, 80.,200.);\n\ -BRepBuilderAPI_NurbsConvert aNurbsConvert(Cylinder2.Shape());\n\ - "); - UpdateResultMessageDlg("Create overlapped cylinders",Message); - if (myOffsetDlg && myOffsetDlg->IsWindowVisible()) - { - myOffsetDlg->UpdateValues(); - } - } -} - -void CViewer3dDoc::OnOverlappedSphere() -{ - OnSphere(); - if(myOverlappedSphere.IsNull()){ - BRepPrimAPI_MakeSphere S(gp_Pnt(0,300,0), 100.); - - BRepBuilderAPI_NurbsConvert aNurbsConvert(S.Shape()); - TopoDS_Shape aSphereShape2 = aNurbsConvert.Shape(); - - myOverlappedSphere = new AIS_Shape(aSphereShape2); - - myAISContext->SetMaterial (myOverlappedSphere, Graphic3d_NOM_GOLD, Standard_False); - - myAISContext->SetDisplayMode (myOverlappedSphere, 1, Standard_False); - - myAISContext->Display (myOverlappedSphere, Standard_True); - - TCollection_AsciiString Message("\ -BRepPrimAPI_MakeSphere Sphere1(gp_Pnt(0,300,0), 100.);\n\ -\n\ -BRepPrimAPI_MakeSphere Sphere2(gp_Pnt(0,300,0), 100.);\n\ -BRepBuilderAPI_NurbsConvert aNurbsConvert(Sphere2.Shape());\n\ - "); - UpdateResultMessageDlg("Create overlapped spheres",Message); - if (myOffsetDlg && myOffsetDlg->IsWindowVisible()) - { - myOffsetDlg->UpdateValues(); - } - } -} - -void CViewer3dDoc::OnPolygonOffsets() -{ - myOffsetDlg = new COffsetDlg(this); - myOffsetDlg->Create(COffsetDlg::IDD,NULL); - myAISContext->UpdateCurrentViewer(); -} - -void CViewer3dDoc::OnUpdatePolygonOffsets(CCmdUI* pCmdUI) -{ - Standard_Integer aOffsetMode; - Standard_ShortReal aFactor; - Standard_ShortReal aCylUnits = 0; - Standard_ShortReal aSphereUnits = 0; - Standard_ShortReal aBoxUnits = 0; - - BOOL IsOverlappedCylinderDisplayed = myAISContext->IsDisplayed(myOverlappedCylinder); - BOOL IsOverlappedSphereDisplayed = myAISContext->IsDisplayed(myOverlappedSphere); - BOOL IsOverlappedBoxDisplayed = myAISContext->IsDisplayed(myOverlappedBox); - BOOL IsAnyOverlappedObjectDisplayed = - IsOverlappedCylinderDisplayed || IsOverlappedSphereDisplayed || IsOverlappedBoxDisplayed; - - if(!myOverlappedCylinder.IsNull() && IsOverlappedCylinderDisplayed){ - myOverlappedCylinder->PolygonOffsets(aOffsetMode,aFactor,aCylUnits); - } - - if(!myOverlappedSphere.IsNull() && IsOverlappedSphereDisplayed){ - myOverlappedSphere->PolygonOffsets(aOffsetMode,aFactor,aSphereUnits); - } - - if(!myOverlappedBox.IsNull() && IsOverlappedBoxDisplayed){ - myOverlappedBox->PolygonOffsets(aOffsetMode,aFactor,aBoxUnits); - } - - if(myOffsetDlg && myOffsetDlg->IsWindowVisible()) - pCmdUI->SetCheck(TRUE); - else - pCmdUI->SetCheck(FALSE); - if (IsAnyOverlappedObjectDisplayed) - if(myOffsetDlg) - pCmdUI->Enable(!myOffsetDlg->IsWindowVisible()); - else - pCmdUI->Enable(TRUE); - else - pCmdUI->Enable(FALSE); -} - -void CViewer3dDoc::OnUpdateCylinder(CCmdUI* pCmdUI) -{ - pCmdUI->Enable(myCylinder.IsNull()); -} - -void CViewer3dDoc::OnUpdateSphere(CCmdUI* pCmdUI) -{ - pCmdUI->Enable(mySphere.IsNull()); -} - -void CViewer3dDoc::OnUpdateBox(CCmdUI* pCmdUI) -{ - pCmdUI->Enable(myBox.IsNull()); -} - -void CViewer3dDoc::OnUpdateOverlappedCylinder(CCmdUI* pCmdUI) -{ - pCmdUI->Enable (myOverlappedCylinder.IsNull() - || myCylinder.IsNull()); - -} - -void CViewer3dDoc::OnUpdateOverlappedSphere(CCmdUI* pCmdUI) -{ - pCmdUI->Enable (myOverlappedSphere.IsNull() - || mySphere.IsNull()); -} - -void CViewer3dDoc::OnUpdateOverlappedBox(CCmdUI* pCmdUI) -{ - pCmdUI->Enable (myOverlappedBox.IsNull() - || myBox.IsNull()); -} - -void CViewer3dDoc::OnObjectRemove() -{ - // A small trick to avoid compiler error (C2668). - const Handle(AIS_InteractiveObject)& aBox = myBox; - if(myAISContext->IsSelected (aBox)) - myBox.Nullify(); - - const Handle(AIS_InteractiveObject)& aCylinder = myCylinder; - if(myAISContext->IsSelected (aCylinder)) - myCylinder.Nullify(); - - const Handle(AIS_InteractiveObject)& aSphere = mySphere; - if(myAISContext->IsSelected (aSphere)) - mySphere.Nullify(); - - const Handle(AIS_InteractiveObject)& anOverlappedBox = myOverlappedBox; - if(myAISContext->IsSelected (anOverlappedBox)) - myOverlappedBox.Nullify(); - - const Handle(AIS_InteractiveObject)& anOverlappedCylinder = myOverlappedCylinder; - if(myAISContext->IsSelected (anOverlappedCylinder)) - myOverlappedCylinder.Nullify(); - - const Handle(AIS_InteractiveObject)& anOverlappedSphere = myOverlappedSphere; - if(myAISContext->IsSelected (anOverlappedSphere)) - myOverlappedSphere.Nullify(); - - - for(myAISContext->InitSelected();myAISContext->MoreSelected();myAISContext->InitSelected()) - myAISContext->Remove(myAISContext->SelectedInteractive(),Standard_True); - - if(myOffsetDlg && myOffsetDlg->IsWindowVisible()) - myOffsetDlg->UpdateValues(); -} - -void CViewer3dDoc::OnObjectErase() - -{ - OCC_3dBaseDoc::OnObjectErase(); - if(myOffsetDlg && myOffsetDlg->IsWindowVisible()) - myOffsetDlg->UpdateValues(); -} - -void CViewer3dDoc::OnObjectDisplayall() - -{ - OCC_3dBaseDoc::OnObjectDisplayall(); - if(myOffsetDlg && myOffsetDlg->IsWindowVisible()) - myOffsetDlg->UpdateValues(); -} - -Handle(User_Cylinder) CViewer3dDoc::GetCylinder() -{ - return myCylinder; -} - - -Handle(AIS_Shape) CViewer3dDoc::GetSphere() -{ - return mySphere; -} - -Handle(AIS_Shape) CViewer3dDoc::GetBox() -{ - return myBox; -} - -Handle(AIS_Shape) CViewer3dDoc::GetOverlappedCylinder() -{ - return myOverlappedCylinder; -} - - -Handle(AIS_Shape) CViewer3dDoc::GetOverlappedSphere() -{ - return myOverlappedSphere; -} - -Handle(AIS_Shape) CViewer3dDoc::GetOverlappedBox() -{ - return myOverlappedBox; -} - -void CViewer3dDoc::DragEvent (const Standard_Integer theX, - const Standard_Integer theY, - const Standard_Integer theState, - const Handle(V3d_View)& theView) -{ - OCC_3dBaseDoc::DragEvent (theX, theY, theState, theView); - if(myOffsetDlg && myOffsetDlg->IsWindowVisible()) - myOffsetDlg->UpdateValues(); -} - -//----------------------------------------------------------------------------------------- -// -//----------------------------------------------------------------------------------------- -void CViewer3dDoc::InputEvent(const Standard_Integer /*x*/, - const Standard_Integer /*y*/, - const Handle(V3d_View)& /*aView*/ ) -{ - if (myOffsetDlg && myOffsetDlg->IsWindowVisible()) - myOffsetDlg->UpdateValues(); - - Quantity_Color CSFColor; - COLORREF MSColor; - myAISContext->SelectDetected(); - - // Change the color of a selected face in a user cylinder - if (myState == FACE_COLOR) - { - myAISContext->InitSelected(); - if (myAISContext->MoreSelected()) - { - Handle(AIS_InteractiveObject) Current = myAISContext->SelectedInteractive(); - if (Current->HasColor()) - { - myAISContext->Color (Current, CSFColor); - MSColor = RGB (CSFColor.Red()*255.0, CSFColor.Green()*255.0, CSFColor.Blue()*255.0); - } - else - { - MSColor = RGB (255, 255, 255); - } - - CColorDialog dlgColor(MSColor); - if (dlgColor.DoModal() == IDOK) - { - MSColor = dlgColor.GetColor(); - CSFColor = Quantity_Color (GetRValue (MSColor)/255.0, - GetGValue (MSColor)/255.0, - GetBValue (MSColor)/255.0, - Quantity_TOC_RGB); - - Handle(AIS_InteractiveObject) aSelectedObject = myAISContext->SelectedInteractive(); - Handle(User_Cylinder)::DownCast (aSelectedObject)->SetColor (CSFColor); - - myAISContext->Redisplay (aSelectedObject, Standard_True); - myState = -1; - } - } - - myCResultDialog.SetTitle("Change face color"); - myCResultDialog.SetText( " Handle(AIS_InteractiveObject) aSelectedObject = myAISContext->SelectedInteractive(); \n" - " Handle(User_Cylinder)::DownCast(aSelectedObject)->SetColor (CSFColor); \n" - " myAISContext->Redisplay (myAISContext->Current(), Standard_True); \n" - " \n" - " \n" - " NOTE: a User_Cylinder is an object defined by the user. \n" - " The User_Cylinder class inherit from the AIS_InteractiveObject \n" - " Cascade class, it's use is the same as an AIS_InteractiveObject. \n" - " \n"); - SetTitle (L"Change face color"); - } -} - -//----------------------------------------------------------------------------------------- -// -//----------------------------------------------------------------------------------------- -void CViewer3dDoc::ShiftDragEvent (const Standard_Integer theX, - const Standard_Integer theY, - const Standard_Integer theState, - const Handle(V3d_View)& theView) -{ - OCC_3dBaseDoc::ShiftDragEvent(theX, theY, theState, theView); - if(myOffsetDlg && myOffsetDlg->IsWindowVisible()) - myOffsetDlg->UpdateValues(); -} - - -//----------------------------------------------------------------------------------------- -// -//----------------------------------------------------------------------------------------- -void CViewer3dDoc::ShiftInputEvent (const Standard_Integer theX, - const Standard_Integer theY, - const Handle(V3d_View)& theView) -{ - OCC_3dBaseDoc::ShiftInputEvent (theX, theY, theView); - if(myOffsetDlg && myOffsetDlg->IsWindowVisible()) - myOffsetDlg->UpdateValues(); -} - -void CViewer3dDoc::OnObjectColoredMesh() -{ - for(myAISContext->InitSelected();myAISContext->MoreSelected();myAISContext->NextSelected()) - if (myAISContext->SelectedInteractive()->IsKind(STANDARD_TYPE(User_Cylinder))) - { - myAISContext->ClearPrs(myAISContext->SelectedInteractive(),6,Standard_False); - myAISContext->RecomputePrsOnly(myAISContext->SelectedInteractive(), Standard_False); - myAISContext->SetDisplayMode(myAISContext->SelectedInteractive(), 6, Standard_False); - } - - myAISContext->UpdateCurrentViewer(); -} - -void CViewer3dDoc::OnUpdateObjectColoredMesh(CCmdUI* pCmdUI) -{ - bool CylinderIsCurrentAndDisplayed = false; - for (myAISContext->InitSelected();myAISContext->MoreSelected ();myAISContext->NextSelected ()) - if(myAISContext->SelectedInteractive()->IsKind(STANDARD_TYPE(User_Cylinder))) - CylinderIsCurrentAndDisplayed=true; - pCmdUI->Enable (CylinderIsCurrentAndDisplayed); -} - -void CViewer3dDoc::OnUpdateObjectWireframe(CCmdUI* pCmdUI) -{ - bool OneOrMoreInShadingOrColoredMesh = false; - for (myAISContext->InitSelected();myAISContext->MoreSelected ();myAISContext->NextSelected ()) - if (myAISContext->IsDisplayed(myAISContext->SelectedInteractive(), 1) || myAISContext->IsDisplayed(myAISContext->SelectedInteractive(), 6)) - OneOrMoreInShadingOrColoredMesh=true; - pCmdUI->Enable (OneOrMoreInShadingOrColoredMesh); -} - - -void CViewer3dDoc::OnUpdateObjectShading(CCmdUI* pCmdUI) -{ - bool OneOrMoreInWireframeOrColoredMesh = false; - for (myAISContext->InitSelected();myAISContext->MoreSelected ();myAISContext->NextSelected ()) - if (myAISContext->IsDisplayed(myAISContext->SelectedInteractive(),0) || myAISContext->IsDisplayed(myAISContext->SelectedInteractive(),6)) - OneOrMoreInWireframeOrColoredMesh=true; - pCmdUI->Enable (OneOrMoreInWireframeOrColoredMesh); -} - -void CViewer3dDoc::OnOptionsTrihedronDynamicTrihedron() -{ - if (myAISContext -> IsDisplayed(myTrihedron)) - { - myAISContext->Remove(myTrihedron, Standard_True); - } - else - { - Handle(Geom_Axis2Placement) myTrihedronAxis=new Geom_Axis2Placement(gp::XOY()); - myTrihedron=new AIS_Trihedron(myTrihedronAxis); - myAISContext->SetTrihedronSize(200, Standard_False); - myAISContext->Display(myTrihedron, Standard_True); - } -} - -void CViewer3dDoc::OnUpdateOptionsTrihedronDynamicTrihedron(CCmdUI* pCmdUI) -{ - if (myAISContext->IsDisplayed(myTrihedron)) - pCmdUI->SetCheck(1); - else - pCmdUI->SetCheck(0); -} - -void CViewer3dDoc::SetMyStaticTrihedronAxisIsDisplayed(BOOL IsDisplayed) -{ - myStaticTrihedronAxisIsDisplayed = IsDisplayed; -} - -void CViewer3dDoc::OnUpdateOptionsTrihedronStaticTrihedron(CCmdUI* pCmdUI) -{ - if (myStaticTrihedronAxisIsDisplayed) - pCmdUI->SetCheck(1); - else - pCmdUI->SetCheck(0); - -} - -void CViewer3dDoc::Popup (const Standard_Integer x, - const Standard_Integer y , - const Handle(V3d_View)& aView) -{ - myPopupMenuNumber=0; - // Specified check for context menu number to call - myAISContext->InitSelected(); - if (myAISContext->MoreSelected()) - { - if (myAISContext->SelectedInteractive()->IsKind(STANDARD_TYPE(User_Cylinder))) - { - myPopupMenuNumber = 2; - //return; - } - } - OCC_3dBaseDoc::Popup(x,y, aView); -} - -//Set faces selection mode -void CViewer3dDoc::OnFaces() -{ - myAISContext->Deactivate(); - myAISContext->Activate (AIS_Shape::SelectionMode (TopAbs_FACE)); - - myCResultDialog.SetTitle("Standard mode: TopAbs_FACE"); - myCResultDialog.SetText(" myAISContext->Deactivate();\n" - " myAISContext->Activate (AIS_Shape::SelectionMode (TopAbs_FACE));\n\n"); - SetTitle (L"Standard mode: TopAbs_FACE"); -} - -//Set edges selection mode -void CViewer3dDoc::OnEdges() -{ - myAISContext->Deactivate(); - myAISContext->Activate (AIS_Shape::SelectionMode (TopAbs_EDGE)); - - myCResultDialog.SetTitle("Standard mode: TopAbs_EDGE"); - myCResultDialog.SetText(" myAISContext->Deactivate();\n" - " myAISContext->Activate (AIS_Shape::SelectionMode (TopAbs_EDGE));\n\n"); - SetTitle (L"Standard mode: TopAbs_EDGE"); -} - -// Set vertices selection mode -void CViewer3dDoc::OnVertices() -{ - myAISContext->Deactivate(); - myAISContext->Activate (AIS_Shape::SelectionMode (TopAbs_VERTEX)); - - myCResultDialog.SetTitle("Standard mode: TopAbs_VERTEX"); - myCResultDialog.SetText(" myAISContext->Deactivate();\n" - " myAISContext->Activate (AIS_Shape::SelectionMode (TopAbs_VERTEX));\n\n"); - SetTitle (L"Standard mode: TopAbs_VERTEX"); -} - -//Neutral selection mode -void CViewer3dDoc::OnNeutral() -{ - myAISContext->Deactivate(); - myAISContext->Activate (0); - - myCResultDialog.SetTitle("Standard mode: Neutral"); - myCResultDialog.SetText(" myAISContext->Deactivate();\n" - " myAISContext->Activate (0);\n\n"); - SetTitle (L"Standard mode: Neutral"); -} - -// Change the color of faces on a user cylinder -void CViewer3dDoc::OnUsercylinderChangefacecolor() -{ - myAISContext->Activate (myAISContext->SelectedInteractive(), AIS_Shape::SelectionMode (TopAbs_FACE)); - myState = FACE_COLOR; - // see the following of treatment in inputevent -} - -// Make 3d fillets on solids -// It is necessary to activate the edges selection mode and select edges on an object -// before running this function -void CViewer3dDoc::OnFillet3d() -{ - myAISContext->InitSelected(); - if (myAISContext->MoreSelected()) - { - Handle(AIS_Shape) aSelInteractive (Handle(AIS_Shape)::DownCast (myAISContext->SelectedInteractive())); - if (aSelInteractive.IsNull()) - { - AfxMessageBox (L"It is necessary to activate the edges selection mode\n" - L"and select edges on an object before \nrunning this function"); - return; - } - - BRepFilletAPI_MakeFillet aFillet (aSelInteractive->Shape()); - - for (myAISContext->InitSelected(); myAISContext->MoreSelected(); myAISContext->NextSelected()) - { - const TopoDS_Shape& aSelShape = myAISContext->SelectedShape(); - if (aSelShape.ShapeType() != TopAbs_EDGE) - { - AfxMessageBox (L"It is necessary to activate the edges selection mode\n" - L"and select edges on an object before \nrunning this function"); - return; - } - } - - BoxRadius aDialog (NULL,10.); - if (aDialog.DoModal() == IDOK) - { - for (myAISContext->InitSelected(); myAISContext->MoreSelected(); myAISContext->NextSelected()) - { - // Selected shape has its own location, and sub-shapes in the solid shape for fillet building - // don't have own locations. Fillet builder needs to know that input edge is just the same one as - // some sub-shape in our target solid shape, so no location is to be in input edge for fillet builder. - TopoDS_Shape aSelShape = myAISContext->SelectedShape().Located (TopLoc_Location()); - aFillet.Add (aDialog.m_radius, TopoDS::Edge (aSelShape) ); - } - } - else - { - return; - } - - TopoDS_Shape aNewShape; - try - { - aNewShape = aFillet.Shape(); - } - catch (Standard_Failure) - { - AfxMessageBox (L"Error During Fillet computation"); - return; - } - - aSelInteractive ->Set (aNewShape); - myAISContext->Redisplay (aSelInteractive, Standard_True); - } - - myCResultDialog.SetTitle("Make a fillet"); - myCResultDialog.SetText(" Handle(AIS_Shape) S = Handle(AIS_Shape)::DownCast(myAISContext->Interactive()); \n" - " \n" - " BRepAPI_MakeFillet aFillet(S->Shape()); \n" - " \n" - " TopoDS_Edge anEdge=TopoDS::Edge(myAISContext->SelectedShape()); \n" - " \n" - " aFillet.Add(dlg.m_radius,anEdge); \n" - " \n" - " TopoDS_Shape aNewShape = aFillet.Shape(); \n" - " \n" - " S->Set(aNewShape); \n" - " \n" - " myAISContext->Redisplay(S); \n" - " \n"); - SetTitle (L"Make a fillet"); -} - -// Create and display a circle with standard tools -void CViewer3dDoc::OnCircle() -{ - gp_Ax2 anAx2 (gp_Pnt (0., 0., 0.), gp_Dir(0., 0., -1.)); - Handle(Geom_Circle) aGeomCircle = new Geom_Circle (anAx2, 300); - - // the lines above substitute - // GC_MakeCircle C(gp_Pnt(-100.,-300.,0.),gp_Pnt(-50.,-200.,0.),gp_Pnt(-10.,-250.,0.)); - // Handle(AIS_Circle) anAISCirc = new AIS_Circle(C.Value()); - - Handle(AIS_Circle) anAISCirc = new AIS_Circle(aGeomCircle); - myAISContext->Display (anAISCirc, Standard_True); - - myCResultDialog.SetTitle("Create a circle"); - myCResultDialog.SetText(" GC_MakeCircle C(gp_Pnt(-100.,-300.,0.),gp_Pnt(-50.,-200.,0.),gp_Pnt(-10.,-250.,0.)); \n" - " \n" - " Handle(AIS_Circle) anAISCirc = new AIS_Circle(C.Value()); \n" - " \n" - " myAISContext->Display(anAISCirc); \n" - " \n"); - SetTitle (L"Create a circle"); -} - -void CViewer3dDoc::OnLine() -{ - // TODO: Add your command handler code here - gp_Lin aGpLin (gp_Pnt (0., 0., 0.), gp_Dir(1., 0., 0.)); - Handle(Geom_Line) aGeomLin = new Geom_Line (aGpLin); - Handle(AIS_Line) anAISLine = new AIS_Line (aGeomLin); - myAISContext->Display (anAISLine, Standard_True); - - myCResultDialog.SetTitle("Create a line"); - myCResultDialog.SetText(" gp_Lin L(gp_Pnt(0.,0.,0.),gp_Dir(1.,0.,0.)); \n" - " \n" - " Handle(Geom_Line) aLine = new Geom_Line(L); \n" - " \n" - " Handle(AIS_Line) anAISLine = new AIS_Line(aLine); \n" - " \n" - " myAISContext->Display(anAISLine); \n" - " \n"); - SetTitle (L"Create a line"); -} - -void CViewer3dDoc::OnNbisos() -{ - int aNumU = myAISContext->DefaultDrawer()->UIsoAspect()->Number(); - int aNumV = myAISContext->DefaultDrawer()->VIsoAspect()->Number(); - - DlgIsos aDlg (NULL, aNumU, aNumV); - - if (aDlg.DoModal() == IDOK) - { - myAISContext->DefaultDrawer()->UIsoAspect()->SetNumber (aDlg.m_isou); - myAISContext->DefaultDrawer()->VIsoAspect()->SetNumber (aDlg.m_isov); - - myCResultDialog.SetTitle("Iso Aspect"); - myCResultDialog.SetText(" myAISContext->DefaultDrawer()->UIsoAspect()->SetNumber(dlg.m_isou); \n" - " \n" - " myAISContext->DefaultDrawer()->VIsoAspect()->SetNumber(dlg.m_isov); \n" - " \n"); - SetTitle (L"Iso Aspect"); - } -} - -BOOL CViewer3dDoc::OnNewDocument() -{ - if (!CDocument::OnNewDocument()) - return FALSE; - - // TODO: add reinitialization code here - // (SDI documents will reuse this document) - SetTitle(myPresentation->GetName()); - - myAISContext->EraseAll (Standard_False); - myAISContext->SetDisplayMode(AIS_Shaded, Standard_True); - - POSITION pos = GetFirstViewPosition(); - while (pos != NULL) - { - CViewer3dView* pView = (CViewer3dView*) GetNextView(pos); - pView->Reset(); - } - - return TRUE; -} - -void CViewer3dDoc::OnFileNew() -{ - OnNewDocument(); -} - -void CViewer3dDoc::InitViewButtons() -{ - POSITION pos = GetFirstViewPosition(); - while (pos != NULL) - { - CViewer3dView* pView = (CViewer3dView*) GetNextView(pos); - pView->InitButtons(); - } -} - -void CViewer3dDoc::OnTextureOn() -{ - isTextureSampleStarted = TRUE; - Start(); -} - -void CViewer3dDoc::DoSample() -{ - InitViewButtons(); - - HCURSOR hOldCursor = ::GetCursor(); - HCURSOR hNewCursor = AfxGetApp()->LoadStandardCursor(IDC_APPSTARTING); - - SetCursor(hNewCursor); - { - try - { - myPresentation->DoSample(); - } - catch (Standard_Failure const& anException) - { - Standard_SStream aSStream; - aSStream << "An exception was caught: " << anException << std::ends; - CString aMsg = aSStream.str().c_str(); - AfxMessageBox (aMsg); - } - } - SetCursor(hOldCursor); -} - -void CViewer3dDoc::OnBUTTONStart() -{ - myAISContext->EraseAll (Standard_True); - myPresentation->FirstSample(); - DoSample(); -} - -void CViewer3dDoc::OnBUTTONEnd() -{ - myAISContext->EraseAll (Standard_True); - myPresentation->LastSample(); - DoSample(); -} - -void CViewer3dDoc::OnBUTTONRepeat() -{ - DoSample(); -} - -void CViewer3dDoc::OnBUTTONNext() -{ - if (!myPresentation->AtLastSample()) - { - myPresentation->NextSample(); - DoSample(); - } -} - -void CViewer3dDoc::OnBUTTONPrev() -{ - if (!myPresentation->AtFirstSample()) - { - myPresentation->PrevSample(); - DoSample(); - } -} - -void CViewer3dDoc::OnUpdateBUTTONNext(CCmdUI* pCmdUI) -{ - if ( isTextureSampleStarted ) - pCmdUI->Enable (!myPresentation->AtLastSample()); - else - pCmdUI->Enable (FALSE); -} - -void CViewer3dDoc::OnUpdateBUTTONPrev(CCmdUI* pCmdUI) -{ - if ( isTextureSampleStarted ) - pCmdUI->Enable (!myPresentation->AtFirstSample()); - else - pCmdUI->Enable (FALSE); -} - -void CViewer3dDoc::OnUpdateBUTTONStart(CCmdUI* pCmdUI) -{ - pCmdUI->Enable (isTextureSampleStarted); -} - -void CViewer3dDoc::OnUpdateBUTTONRepeat(CCmdUI* pCmdUI) -{ - pCmdUI->Enable (isTextureSampleStarted); -} - -void CViewer3dDoc::OnUpdateBUTTONEnd(CCmdUI* pCmdUI) -{ - pCmdUI->Enable (isTextureSampleStarted); -} - -void CViewer3dDoc::OnDumpView() -{ - for (POSITION aPos = GetFirstViewPosition(); aPos != NULL;) - { - CViewer3dView* pView = (CViewer3dView* )GetNextView (aPos); - pView->UpdateWindow(); - } - - Handle(V3d_View) aView = myViewer->ActiveViews().First(); - ExportView (aView); -} - -void CViewer3dDoc::Start() -{ - myPresentation->Init(); - OnBUTTONStart(); -} - -void CViewer3dDoc::Fit() -{ - CMDIFrameWnd *pFrame = (CMDIFrameWnd*)AfxGetApp()->m_pMainWnd; - CMDIChildWnd *pChild = (CMDIChildWnd *) pFrame->GetActiveFrame(); - CViewer3dView *pView = (CViewer3dView *) pChild->GetActiveView(); - pView->FitAll(); -} diff --git a/samples/mfc/standard/04_Viewer3d/src/Viewer3dDoc.h b/samples/mfc/standard/04_Viewer3d/src/Viewer3dDoc.h deleted file mode 100755 index 69a4a708a4..0000000000 --- a/samples/mfc/standard/04_Viewer3d/src/Viewer3dDoc.h +++ /dev/null @@ -1,159 +0,0 @@ -// Viewer3dDoc.h : interface of the CViewer3dDoc class -// -///////////////////////////////////////////////////////////////////////////// - -#if !defined(AFX_VIEWERDOC_H__4EF39FBA_4EBB_11D1_8D67_0800369C8A03__INCLUDED_) -#define AFX_VIEWERDOC_H__4EF39FBA_4EBB_11D1_8D67_0800369C8A03__INCLUDED_ - -#if _MSC_VER >= 1000 -#pragma once -#endif // _MSC_VER >= 1000 - -#include "OCCDemo_Presentation.h" -#include "OffsetDlg.h" -#include "OCC_3dDoc.h" -#include "ResultDialog.h" -#include "User_Cylinder.hxx" - - -#include -#include -#include - -class COffsetDlg; -class OCCDemo_Presentation; - -class CViewer3dDoc : public OCC_3dDoc -{ - DECLARE_DYNCREATE(CViewer3dDoc) - -protected: // create from serialization only - CViewer3dDoc(); - void InitViewButtons(); - void DoSample(); - -public: - void SetMyStaticTrihedronAxisIsDisplayed(BOOL IsDisplayed); - Handle(AIS_Shape) GetBox(); - Handle(AIS_Shape) GetSphere(); - Handle(User_Cylinder) GetCylinder(); - Handle(AIS_Shape) GetOverlappedBox(); - Handle(AIS_Shape) GetOverlappedSphere(); - Handle(AIS_Shape) GetOverlappedCylinder(); - void Start(); - Standard_CString GetDataDir() {return myDataDir;} - static void Fit(); - - virtual ~CViewer3dDoc(); - void UpdateResultMessageDlg (CString theTitle, const TCollection_AsciiString& theMessage); - void UpdateResultMessageDlg (CString theTitle, CString theMessage); - virtual BOOL OnNewDocument(); - virtual void Popup (const Standard_Integer x, - const Standard_Integer y, - const Handle(V3d_View)& aView); - - virtual void DragEvent (const Standard_Integer x, - const Standard_Integer y, - const Standard_Integer TheState, - const Handle(V3d_View)& aView); - - virtual void InputEvent (const Standard_Integer x, - const Standard_Integer y, - const Handle(V3d_View)& aView); - - virtual void ShiftDragEvent (const Standard_Integer x, - const Standard_Integer y, - const Standard_Integer TheState, - const Handle(V3d_View)& aView); - - virtual void ShiftInputEvent (const Standard_Integer x, - const Standard_Integer y, - const Handle(V3d_View)& aView); - -#ifdef _DEBUG - virtual void AssertValid() const; - virtual void Dump(CDumpContext& dc) const; -#endif - - // Generated message map functions -protected: - BOOL myStaticTrihedronAxisIsDisplayed; - //{{AFX_MSG(CViewer3dDoc) - afx_msg void OnBox(); - afx_msg void OnCylinder(); - afx_msg void OnSphere(); - afx_msg void OnRemoveAll(); - afx_msg void OnNbisos(); - afx_msg void OnFaces(); - afx_msg void OnEdges(); - afx_msg void OnVertices(); - afx_msg void OnNeutral(); - afx_msg void OnUsercylinderChangefacecolor(); - afx_msg void OnFillet3d(); - afx_msg void OnCircle(); - afx_msg void OnLine(); - afx_msg void OnOverlappedBox(); - afx_msg void OnOverlappedCylinder(); - afx_msg void OnOverlappedSphere(); - afx_msg void OnPolygonOffsets(); - afx_msg void OnUpdatePolygonOffsets(CCmdUI* pCmdUI); - afx_msg void OnUpdateCylinder(CCmdUI* pCmdUI); - afx_msg void OnUpdateSphere(CCmdUI* pCmdUI); - afx_msg void OnUpdateBox(CCmdUI* pCmdUI); - afx_msg void OnUpdateOverlappedCylinder(CCmdUI* pCmdUI); - afx_msg void OnUpdateOverlappedSphere(CCmdUI* pCmdUI); - afx_msg void OnUpdateOverlappedBox(CCmdUI* pCmdUI); - afx_msg void OnObjectRemove(); - afx_msg void OnObjectErase(); - afx_msg void OnObjectDisplayall(); - afx_msg void OnObjectColoredMesh(); - afx_msg void OnUpdateObjectColoredMesh(CCmdUI* pCmdUI); - afx_msg void OnUpdateObjectShading(CCmdUI* pCmdUI); - afx_msg void OnUpdateObjectWireframe(CCmdUI* pCmdUI); - afx_msg void OnOptionsTrihedronDynamicTrihedron(); - afx_msg void OnUpdateOptionsTrihedronDynamicTrihedron(CCmdUI* pCmdUI); - afx_msg void OnUpdateOptionsTrihedronStaticTrihedron(CCmdUI* pCmdUI); - afx_msg void OnTextureOn(); - afx_msg void OnBUTTONNext(); - afx_msg void OnBUTTONStart(); - afx_msg void OnBUTTONRepeat(); - afx_msg void OnBUTTONPrev(); - afx_msg void OnBUTTONEnd(); - afx_msg void OnUpdateBUTTONNext(CCmdUI* pCmdUI); - afx_msg void OnUpdateBUTTONPrev(CCmdUI* pCmdUI); - afx_msg void OnUpdateBUTTONStart(CCmdUI* pCmdUI); - afx_msg void OnUpdateBUTTONRepeat(CCmdUI* pCmdUI); - afx_msg void OnUpdateBUTTONEnd(CCmdUI* pCmdUI); - afx_msg void OnFileNew(); - afx_msg void OnBUTTONShowResult(); - afx_msg void OnDumpView(); - //}}AFX_MSG - DECLARE_MESSAGE_MAP() - - //Attributes -protected: - int myState; - -private: - COffsetDlg* myOffsetDlg; - - Handle(User_Cylinder) myCylinder; - Handle(AIS_Shape) mySphere; - Handle(AIS_Shape) myBox; - Handle(AIS_Shape) myOverlappedCylinder; - Handle(AIS_Shape) myOverlappedSphere; - Handle(AIS_Shape) myOverlappedBox; - Handle(AIS_Trihedron) myTrihedron; - - OCCDemo_Presentation *myPresentation; - char myDataDir[5]; // for "Data\0" - char myLastPath[MAX_PATH]; // directory of lastly saved file in DumpView() - bool isTextureSampleStarted; -}; - -///////////////////////////////////////////////////////////////////////////// - -//{{AFX_INSERT_LOCATION}} -// Microsoft Developer Studio will insert additional declarations immediately before the previous line. - -#endif // !defined(AFX_VIEWERDOC_H__4EF39FBA_4EBB_11D1_8D67_0800369C8A03__INCLUDED_) diff --git a/samples/mfc/standard/04_Viewer3d/src/Viewer3dView.cpp b/samples/mfc/standard/04_Viewer3d/src/Viewer3dView.cpp deleted file mode 100755 index 62f5df3316..0000000000 --- a/samples/mfc/standard/04_Viewer3d/src/Viewer3dView.cpp +++ /dev/null @@ -1,1180 +0,0 @@ -// Viewer3dView.cpp : implementation of the CViewer3dView class -// - -#include "stdafx.h" - -#include "Viewer3dView.h" - -#include "OCC_MainFrame.h" -#include "Viewer3dApp.h" -#include "Viewer3dDoc.h" -#include "ScaleDlg.h" -#include "ShadingModelDlg.h" -#include "ModelClippingDlg.h" -#include "TrihedronDlg.h" - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#define ValZWMin 1 -#define X_Key 0x58 -#define Y_Key 0x59 -#define Z_Key 0x5A - -#define ModelClipping - -#ifdef _DEBUG -#undef THIS_FILE -static char THIS_FILE[] = __FILE__; -#endif - -//gp_Pnt ConvertClickToPoint(Standard_Real x, Standard_Real y, Handle(V3d_View) aView); - - gp_Pnt p1,p2,p3; - Handle(AIS_Shape) spotConeShape=new AIS_Shape(TopoDS_Solid()); - Handle(AIS_Shape) directionalEdgeShape=new AIS_Shape(TopoDS_Edge()); - -///////////////////////////////////////////////////////////////////////////// -// CViewer3dView - -IMPLEMENT_DYNCREATE(CViewer3dView, CView) - -BEGIN_MESSAGE_MAP(CViewer3dView, CView) - //{{AFX_MSG_MAP(CViewer3dView) - ON_COMMAND(ID_BUTTONAxo, OnBUTTONAxo) - ON_COMMAND(ID_BUTTONBack, OnBUTTONBack) - ON_COMMAND(ID_BUTTONBottom, OnBUTTONBottom) - ON_COMMAND(ID_BUTTONFront, OnBUTTONFront) - ON_COMMAND(ID_BUTTONHlrOff, OnBUTTONHlrOff) - ON_COMMAND(ID_BUTTONHlrOn, OnBUTTONHlrOn) - ON_COMMAND(ID_BUTTONLeft, OnBUTTONLeft) - ON_COMMAND(ID_BUTTONPan, OnBUTTONPan) - ON_COMMAND(ID_BUTTONPanGlo, OnBUTTONPanGlo) - ON_COMMAND(ID_BUTTONReset, OnBUTTONReset) - ON_COMMAND(ID_BUTTONRight, OnBUTTONRight) - ON_COMMAND(ID_BUTTONRot, OnBUTTONRot) - ON_COMMAND(ID_BUTTONTop, OnBUTTONTop) - ON_COMMAND(ID_BUTTONZoomAll, OnBUTTONZoomAll) - ON_WM_SIZE() - ON_COMMAND(ID_BUTTONZoomProg, OnBUTTONZoomProg) - ON_COMMAND(ID_BUTTONZoomWin, OnBUTTONZoomWin) - ON_WM_LBUTTONDOWN() - ON_WM_KEYDOWN() - ON_WM_LBUTTONUP() - ON_WM_MBUTTONDOWN() - ON_WM_MBUTTONUP() - ON_WM_MOUSEMOVE() - ON_WM_RBUTTONDOWN() - ON_WM_RBUTTONUP() - ON_UPDATE_COMMAND_UI(ID_BUTTONHlrOff, OnUpdateBUTTONHlrOff) - ON_UPDATE_COMMAND_UI(ID_BUTTONHlrOn, OnUpdateBUTTONHlrOn) - ON_UPDATE_COMMAND_UI(ID_BUTTONPanGlo, OnUpdateBUTTONPanGlo) - ON_UPDATE_COMMAND_UI(ID_BUTTONPan, OnUpdateBUTTONPan) - ON_UPDATE_COMMAND_UI(ID_BUTTONZoomProg, OnUpdateBUTTONZoomProg) - ON_UPDATE_COMMAND_UI(ID_BUTTONZoomWin, OnUpdateBUTTONZoomWin) - ON_UPDATE_COMMAND_UI(ID_BUTTONRot, OnUpdateBUTTONRot) - ON_COMMAND(ID_Modify_ChangeBackground , OnModifyChangeBackground) - ON_COMMAND(ID_DIRECTIONAL_LIGHT, OnDirectionalLight) - ON_COMMAND(ID_SPOT_LIGHT, OnSpotLight) - ON_COMMAND(ID_POSITIONAL_LIGHT, OnPositionalLight) - ON_COMMAND(ID_AMBIENT_LIGHT, OnAmbientLight) - ON_COMMAND(ID_SCALE, OnScale) - ON_COMMAND(ID_SHADINGMODEL, OnShadingmodel) - ON_COMMAND(ID_ANTIALIASINGONOFF, OnAntialiasingonoff) - ON_COMMAND(ID_CLEAR_LIGHTS, OnClearLights) - ON_COMMAND(ID_MODELCLIPPING, OnModelclipping) - ON_COMMAND(ID_OPTIONS_TRIHEDRON_STATIC_TRIHEDRON, OnOptionsTrihedronStaticTrihedron) - //}}AFX_MSG_MAP -END_MESSAGE_MAP() - -///////////////////////////////////////////////////////////////////////////// -// CViewer3dView construction/destruction - -CViewer3dView::CViewer3dView() -: scaleX (1), - scaleY (1), - scaleZ (1), - myVisMode (VIS_SHADE), - myCurrentMode (CurAction3d_Nothing), - myXmin (0), - myYmin (0), - myXmax (0), - myYmax (0), - myCurZoom (0.0), - NbActiveLights (2), // There are 2 default active lights - myHlrModeIsOn (Standard_False), - myRect (new AIS_RubberBand (Quantity_NOC_WHITE, Aspect_TOL_SOLID, 1.0)), - myAxisKey (0), - myScaleDirection (0) -{ - // TODO: add construction code here - myGraphicDriver = ((CViewer3dApp*)AfxGetApp())->GetGraphicDriver(); -} - -CViewer3dView::~CViewer3dView() -{ - myView->Remove(); -} - -BOOL CViewer3dView::PreCreateWindow(CREATESTRUCT& cs) -{ - // TODO: Modify the Window class or styles here by modifying - // the CREATESTRUCT cs - cs.lpszClass = ::AfxRegisterWndClass(CS_HREDRAW | CS_VREDRAW | CS_DBLCLKS | CS_OWNDC, ::LoadCursor(NULL, IDC_ARROW), NULL, NULL); - return CView::PreCreateWindow(cs); -} - -///////////////////////////////////////////////////////////////////////////// -// CViewer3dView drawing -void CViewer3dView::OnInitialUpdate() -{ - CView::OnInitialUpdate(); - - myView = GetDocument()->GetViewer()->CreateView(); - - // store for restore state after rotation (witch is in Degenerated mode) - myHlrModeIsOn = Standard_False; - myView->SetComputedMode (myHlrModeIsOn); - - Handle(WNT_Window) aWNTWindow = new WNT_Window (GetSafeHwnd()); - myView->SetWindow(aWNTWindow); - if (!aWNTWindow->IsMapped()) aWNTWindow->Map(); - - // Standard_Integer w=100 , h=100 ; /* Debug Matrox */ - // aWNTWindow->Size (w,h) ; /* Keeps me unsatisfied (rlb)..... */ - /* Resize is not supposed to be done on */ - /* Matrox */ - /* I suspect another problem elsewhere */ - // ::PostMessage ( GetSafeHwnd () , WM_SIZE , SIZE_RESTORED , w + h*65536 ) ; - - // store the mode ( nothing , dynamic zooming, dynamic ... ) - myCurrentMode = CurAction3d_Nothing; - myVisMode = VIS_SHADE; - RedrawVisMode(); -} - -void CViewer3dView::OnDraw(CDC* /*pDC*/) -{ - CViewer3dDoc* pDoc = GetDocument(); - ASSERT_VALID(pDoc); - myView->Redraw(); -} - -///////////////////////////////////////////////////////////////////////////// -// CViewer3dView diagnostics - -#ifdef _DEBUG -void CViewer3dView::AssertValid() const -{ - CView::AssertValid(); -} - -void CViewer3dView::Dump(CDumpContext& dc) const -{ - CView::Dump(dc); -} - -CViewer3dDoc* CViewer3dView::GetDocument() // non-debug version is inline -{ - ASSERT(m_pDocument->IsKindOf(RUNTIME_CLASS(CViewer3dDoc))); - return (CViewer3dDoc*)m_pDocument; -} -#endif //_DEBUG - -///////////////////////////////////////////////////////////////////////////// -// CViewer3dView message handlers - -gp_Pnt ConvertClickToPoint(Standard_Real x, Standard_Real y, Handle(V3d_View) aView) -{ - Standard_Real XEye,YEye,ZEye,XAt,YAt,ZAt; - aView->Eye(XEye,YEye,ZEye); - aView->At(XAt,YAt,ZAt); - gp_Pnt EyePoint(XEye,YEye,ZEye); - gp_Pnt AtPoint(XAt,YAt,ZAt); - - gp_Vec EyeVector(EyePoint,AtPoint); - gp_Dir EyeDir(EyeVector); - - gp_Pln PlaneOfTheView = gp_Pln(AtPoint,EyeDir); - Standard_Real X,Y,Z; - aView->Convert(int(x),int(y),X,Y,Z); - gp_Pnt ConvertedPoint(X,Y,Z); - gp_Pnt2d ConvertedPointOnPlane = ProjLib::Project(PlaneOfTheView,ConvertedPoint); - - gp_Pnt ResultPoint = ElSLib::Value(ConvertedPointOnPlane.X(), - ConvertedPointOnPlane.Y(), - PlaneOfTheView); - return ResultPoint; -} - -void CViewer3dView::OnSize(UINT nType, int cx, int cy) -{ - CView::OnSize (nType, cx, cy); - if (!myView.IsNull()) - myView->MustBeResized(); -} - -void CViewer3dView::OnBUTTONBack() -{ - myView->SetProj(V3d_Ypos); - -TCollection_AsciiString Message("\ -myView->SetProj(V3d_Ypos);\n\ - "); - - // Update The Result Message Dialog -GetDocument()->UpdateResultMessageDlg("SetProj",Message); -} // See the back View -void CViewer3dView::OnBUTTONFront() -{ - myView->SetProj(V3d_Yneg); - -TCollection_AsciiString Message("\ -myView->SetProj(V3d_Yneg);\n\ - "); - - // Update The Result Message Dialog -GetDocument()->UpdateResultMessageDlg("SetProj",Message); -} // See the front View - -void CViewer3dView::OnBUTTONBottom() -{ - myView->SetProj(V3d_Zneg); - -TCollection_AsciiString Message("\ -myView->SetProj(V3d_Zneg);\n\ - "); - - // Update The Result Message Dialog -GetDocument()->UpdateResultMessageDlg("SetProj",Message); -} // See the bottom View -void CViewer3dView::OnBUTTONTop() -{ - myView->SetProj(V3d_Zpos); - -TCollection_AsciiString Message("\ -myView->SetProj(V3d_Zpos);\n\ - "); - - // Update The Result Message Dialog -GetDocument()->UpdateResultMessageDlg("SetProj",Message); -} // See the top View - -void CViewer3dView::OnBUTTONLeft() -{ - myView->SetProj(V3d_Xneg); - -TCollection_AsciiString Message("\ -myView->SetProj(V3d_Xneg);\n\ - "); - - // Update The Result Message Dialog -GetDocument()->UpdateResultMessageDlg("SetProj",Message); -} // See the left View -void CViewer3dView::OnBUTTONRight() -{ - myView->SetProj(V3d_Xpos); - -TCollection_AsciiString Message("\ -myView->SetProj(V3d_Xpos);\n\ - "); - - // Update The Result Message Dialog -GetDocument()->UpdateResultMessageDlg("SetProj",Message); -} // See the right View - -void CViewer3dView::OnBUTTONAxo() -{ - myView->SetProj(V3d_XposYnegZpos); - -TCollection_AsciiString Message("\ -myView->SetProj(V3d_XposYnegZpos);\n\ - "); - - // Update The Result Message Dialog -GetDocument()->UpdateResultMessageDlg("SetProj",Message); -} // See the axonometric View - -void CViewer3dView::OnBUTTONHlrOff() -{ - myHlrModeIsOn = Standard_False; - myView->SetComputedMode (myHlrModeIsOn); - myView->Redraw(); - - TCollection_AsciiString aMsg ("myView->SetComputedMode (Standard_False);\n" - " "); - - // Update The Result Message Dialog - GetDocument()->UpdateResultMessageDlg ("SetComputedMode", aMsg); -} - -void CViewer3dView::OnBUTTONHlrOn() -{ - SetCursor(AfxGetApp()->LoadStandardCursor(IDC_WAIT)); - myHlrModeIsOn = Standard_True; - myView->SetComputedMode (myHlrModeIsOn); - myView->Redraw(); - SetCursor(AfxGetApp()->LoadStandardCursor(IDC_ARROW)); - - TCollection_AsciiString aMsg ("myView->SetComputedMode (Standard_True);\n" - " "); - - // Update The Result Message Dialog - GetDocument()->UpdateResultMessageDlg ("SetComputedMode", aMsg); -} - -void CViewer3dView::OnBUTTONPan() -{ myCurrentMode = CurAction3d_DynamicPanning; } - -void CViewer3dView::OnBUTTONPanGlo() -{ - // save the current zoom value - myCurZoom = myView->Scale(); - // Do a Global Zoom - myView->FitAll(); - // Set the mode - myCurrentMode = CurAction3d_GlobalPanning; -} - -void CViewer3dView::OnBUTTONReset() -{ myView->Reset(); } - -void CViewer3dView::OnBUTTONRot() -{ myCurrentMode = CurAction3d_DynamicRotation; } - - -void CViewer3dView::OnBUTTONZoomAll() -{ - myView->FitAll(); - myView->ZFitAll(); -} - -void CViewer3dView::OnBUTTONZoomProg() -{ myCurrentMode = CurAction3d_DynamicZooming; } - -void CViewer3dView::OnBUTTONZoomWin() -{ myCurrentMode = CurAction3d_WindowZooming; } - -void CViewer3dView::OnLButtonDown(UINT nFlags, CPoint point) -{ - // save the current mouse coordinate in min - myXmin=point.x; myYmin=point.y; - myXmax=point.x; myYmax=point.y; - - if ( nFlags & MK_CONTROL ) - { - // Button MB1 down Control :start zomming - // SetCursor(AfxGetApp()->LoadStandardCursor()); - } - else // if ( Ctrl ) - { - switch (myCurrentMode) - { - case CurAction3d_Nothing : // start a drag - if (nFlags & MK_SHIFT) - GetDocument()->ShiftDragEvent(myXmax,myYmax,-1,myView); - else - GetDocument()->DragEvent(myXmax,myYmax,-1,myView); - break; - break; - case CurAction3d_DynamicZooming : // noting - break; - case CurAction3d_WindowZooming : - break; - case CurAction3d_DynamicPanning :// noting - break; - case CurAction3d_GlobalPanning :// noting - break; - case CurAction3d_DynamicRotation : - if (myHlrModeIsOn) - { - myView->SetComputedMode (Standard_False); - } - myView->StartRotation (point.x, point.y); - break; - case CurAction3d_BeginPositionalLight : - { - p1 = ConvertClickToPoint(point.x,point.y,myView); - myCurrent_PositionalLight->SetPosition(p1.X(),p1.Y(),p1.Z()) ; - ((OCC_MainFrame*)AfxGetMainWnd())->SetStatusMessage("Ready"); - myCurrentMode = CurAction3d_Nothing; - -TCollection_AsciiString Message("\ -myCurrent_PositionalLight->SetPosition(Xp, Yp, Zp) ;\n\ -"); -// Update The Result Message Dialog -GetDocument()->UpdateResultMessageDlg("SetPosition",Message); - } - break; - case CurAction3d_BeginSpotLight : - { - p1 = ConvertClickToPoint(point.x,point.y,myView); - myCurrent_SpotLight = new V3d_SpotLight (p1, gp_Dir (gp_XYZ (0.0, 0.0, 1.0) - p1.XYZ()), Quantity_NOC_RED); - myView->SetLightOn(myCurrent_SpotLight); - NbActiveLights++; - p2 = gp_Pnt(p1.X(),p1.Y(),p1.Z()+1.); - Standard_Real coneHeigth=p1.Distance(p2); - BRepPrimAPI_MakeCone MakeCone(gp_Ax2(p1, gp_Dir(gp_Vec(p1, p2))), - 0, (p1.Distance(p2))/tan(1.04), coneHeigth); - spotConeShape->Set(MakeCone.Solid()); - GetDocument()->GetAISContext()->Display (spotConeShape, 0, -1, false); - ((OCC_MainFrame*)AfxGetMainWnd())->SetStatusMessage("Pick the target point"); - myCurrentMode = CurAction3d_TargetSpotLight; - -TCollection_AsciiString Message("\ -myCurrent_SpotLight->SetDirection(Xv, Yv, Zv);\n\ -"); -// Update The Result Message Dialog -GetDocument()->UpdateResultMessageDlg("SetDirection",Message); - } - break; - case CurAction3d_TargetSpotLight : - { - p2 = ConvertClickToPoint(point.x,point.y,myView); - ((OCC_MainFrame*)AfxGetMainWnd())->SetStatusMessage("Pick a third point (to define the angle)"); - myCurrentMode = CurAction3d_EndSpotLight; - -TCollection_AsciiString Message("\ -myCurrent_SpotLight->SetAngle(Angle) ;\n\ -"); -// Update The Result Message Dialog -GetDocument()->UpdateResultMessageDlg("SetAngle",Message); - } - break; - case CurAction3d_EndSpotLight : - GetDocument()->GetAISContext()->Erase (spotConeShape, Standard_True); - ((OCC_MainFrame*)AfxGetMainWnd())->SetStatusMessage("Ready"); - myCurrentMode = CurAction3d_Nothing; - break; - case CurAction3d_BeginDirectionalLight: - { - p1 = ConvertClickToPoint(point.x,point.y,myView); - p2 = gp_Pnt(p1.X(),p1.Y(),p1.Z()+1.); - BRepBuilderAPI_MakeEdge MakeEdge(p1, p2); - directionalEdgeShape->Set(MakeEdge.Edge()); - GetDocument()->GetAISContext()->Display (directionalEdgeShape, 0, -1, Standard_True); - // Create a directional light - myCurrent_DirectionalLight = new V3d_DirectionalLight (gp_Dir (p1.XYZ() - gp_XYZ (0.,0.,1.))); - myView->SetLightOn(myCurrent_DirectionalLight); - NbActiveLights++; - ((OCC_MainFrame*)AfxGetMainWnd())->SetStatusMessage("Pick the target point"); - myCurrentMode = CurAction3d_EndDirectionalLight; - - -TCollection_AsciiString Message("\ -myCurrent_DirectionalLight->SetDirection(Xv, Yv, Zv);\n\ -"); -// Update The Result Message Dialog -GetDocument()->UpdateResultMessageDlg("SetDirection",Message); - } - break; - case CurAction3d_EndDirectionalLight: - GetDocument()->GetAISContext()->Erase (directionalEdgeShape, Standard_True); - ((OCC_MainFrame*)AfxGetMainWnd())->SetStatusMessage("Ready"); - myCurrentMode = CurAction3d_Nothing; - break; - } - } -} - -void CViewer3dView::OnKeyDown(UINT nChar, UINT /*nRepCnt*/, UINT /*nFlags*/) -{ - - if( nChar == X_Key || nChar == Y_Key || nChar == Z_Key ) - myAxisKey = nChar; - else if( (nChar == VK_ADD || nChar == VK_SUBTRACT) && myAxisKey ) - { - myScaleDirection = nChar; - if( myAxisKey && myScaleDirection ) - { - switch( myAxisKey ) - { - case X_Key: - if( myScaleDirection == VK_ADD ) scaleX ++; - if( myScaleDirection == VK_SUBTRACT ) scaleX --; - break; - case Y_Key: - if( myScaleDirection == VK_ADD ) scaleY ++; - if( myScaleDirection == VK_SUBTRACT ) scaleY --; - break; - case Z_Key: - if( myScaleDirection == VK_ADD ) scaleZ ++; - if( myScaleDirection == VK_SUBTRACT ) scaleZ --; - break; - default: - break; - } - if( scaleX < 1 ) scaleX = 1; - if( scaleY < 1 ) scaleY = 1; - if( scaleZ < 1 ) scaleZ = 1; - - myView->SetAxialScale( scaleX, scaleY, scaleZ ); - } - } -} - -void CViewer3dView::OnLButtonUp(UINT nFlags, CPoint point) -{ - if ( nFlags & MK_CONTROL ) - { - return; - } - else // if ( Ctrl ) - { - switch (myCurrentMode) - { - case CurAction3d_Nothing : - if (point.x == myXmin && point.y == myYmin) - { // no offset between down and up --> selectEvent - myXmax=point.x; - myYmax=point.y; - if (nFlags & MK_SHIFT ) - GetDocument()->ShiftInputEvent(point.x,point.y,myView); - else - GetDocument()->InputEvent (point.x,point.y,myView); - } else - { - DrawRectangle(myXmin,myYmin,myXmax,myYmax,Standard_False); - myXmax=point.x; - myYmax=point.y; - if (nFlags & MK_SHIFT) - GetDocument()->ShiftDragEvent(point.x,point.y,1,myView); - else - GetDocument()->DragEvent(point.x,point.y,1,myView); - } - break; - case CurAction3d_DynamicZooming : - // SetCursor(AfxGetApp()->LoadStandardCursor()); - myCurrentMode = CurAction3d_Nothing; - break; - case CurAction3d_WindowZooming : - DrawRectangle(myXmin,myYmin,myXmax,myYmax,Standard_False); - myXmax=point.x; - myYmax=point.y; - if ((abs(myXmin-myXmax)>ValZWMin) || (abs(myYmin-myYmax)>ValZWMin)) - // Test if the zoom window is greater than a minimale window. - { - // Do the zoom window between Pmin and Pmax - myView->WindowFitAll(myXmin,myYmin,myXmax,myYmax); - } - myCurrentMode = CurAction3d_Nothing; - break; - case CurAction3d_DynamicPanning : - myCurrentMode = CurAction3d_Nothing; - break; - case CurAction3d_GlobalPanning : - myView->Place(point.x,point.y,myCurZoom); - myCurrentMode = CurAction3d_Nothing; - break; - case CurAction3d_DynamicRotation : - myCurrentMode = CurAction3d_Nothing; - break; - } //switch (myCurrentMode) - } // else // if ( Ctrl ) -} - -void CViewer3dView::OnMButtonDown(UINT nFlags, CPoint /*point*/) -{ - if ( nFlags & MK_CONTROL ) - { - // Button MB2 down Control : panning init - // SetCursor(AfxGetApp()->LoadStandardCursor()); - } -} - -void CViewer3dView::OnMButtonUp(UINT nFlags, CPoint /*point*/) -{ - if ( nFlags & MK_CONTROL ) - { - // Button MB2 down Control : panning init - // SetCursor(AfxGetApp()->LoadStandardCursor()); - } -} - -void CViewer3dView::OnRButtonDown(UINT nFlags, CPoint point) -{ - if ( nFlags & MK_CONTROL ) - { - // SetCursor(AfxGetApp()->LoadStandardCursor()); - if (myHlrModeIsOn) - { - myView->SetComputedMode (Standard_False); - } - myView->StartRotation (point.x, point.y); - } - else // if ( Ctrl ) - { - GetDocument()->Popup (point.x, point.y, myView); - } -} - -void CViewer3dView::OnRButtonUp(UINT /*nFlags*/, CPoint /*point*/) -{ - SetCursor(AfxGetApp()->LoadStandardCursor(IDC_WAIT)); - if (myHlrModeIsOn) - { - myView->SetComputedMode (myHlrModeIsOn); - myView->Redraw(); - } - SetCursor(AfxGetApp()->LoadStandardCursor(IDC_ARROW)); -} - -void CViewer3dView::OnMouseMove(UINT nFlags, CPoint point) -{ - // ============================ LEFT BUTTON ======================= - if ( nFlags & MK_LBUTTON) - { - if ( nFlags & MK_CONTROL ) - { - // move with MB1 and Control : on the dynamic zooming - // Do the zoom in function of mouse's coordinates - myView->Zoom(myXmax,myYmax,point.x,point.y); - // save the current mouse coordinate in min - myXmax = point.x; - myYmax = point.y; - } - else // if ( Ctrl ) - { - switch (myCurrentMode) - { - case CurAction3d_Nothing : - - myXmax = point.x; myYmax = point.y; - if (nFlags & MK_SHIFT) - GetDocument()->ShiftDragEvent(myXmax,myYmax,0,myView); - else - GetDocument()->DragEvent(myXmax,myYmax,0,myView); - DrawRectangle(myXmin,myYmin,myXmax,myYmax,Standard_True); - break; - case CurAction3d_DynamicZooming : - myView->Zoom(myXmax,myYmax,point.x,point.y); - // save the current mouse coordinate in min \n"; - myXmax=point.x; myYmax=point.y; - break; - case CurAction3d_WindowZooming : - myXmax = point.x; myYmax = point.y; - DrawRectangle(myXmin,myYmin,myXmax,myYmax,Standard_True, Aspect_TOL_DASH); - - break; - case CurAction3d_DynamicPanning : - myView->Pan(point.x-myXmax,myYmax-point.y); // Realize the panning - myXmax = point.x; myYmax = point.y; - break; - case CurAction3d_GlobalPanning : // nothing - break; - case CurAction3d_DynamicRotation : - myView->Rotation(point.x,point.y); - myView->Redraw(); - break; - }// switch (myCurrentMode) - }// if ( nFlags & MK_CONTROL ) else - } else // if ( nFlags & MK_LBUTTON) - // ============================ MIDDLE BUTTON ======================= - if ( nFlags & MK_MBUTTON) - { - if ( nFlags & MK_CONTROL ) - { - myView->Pan(point.x-myXmax,myYmax-point.y); // Realize the panning - myXmax = point.x; myYmax = point.y; - - } - } else // if ( nFlags & MK_MBUTTON) - // ============================ RIGHT BUTTON ======================= - if ( nFlags & MK_RBUTTON) - { - if ( nFlags & MK_CONTROL ) - { - myView->Rotation(point.x,point.y); - } - }else //if ( nFlags & MK_RBUTTON) - // ============================ NO BUTTON ======================= - { // No buttons - myXmax = point.x; myYmax = point.y; - if (myCurrentMode == CurAction3d_EndDirectionalLight) - { - p2 = ConvertClickToPoint(point.x,point.y,myView); - //Update the light dynamically - if( p1.Distance(p2)>Precision::Confusion()) - { - BRepBuilderAPI_MakeEdge MakeEdge(p1, p2); - directionalEdgeShape->Set(MakeEdge.Edge()); - GetDocument()->GetAISContext()->Redisplay(directionalEdgeShape,0,Standard_True); - myCurrent_DirectionalLight->SetDirection(p2.X()-p1.X(),p2.Y()-p1.Y(),p2.Z()-p1.Z()); - myView->UpdateLights(); - myView->Redraw(); - } - } - else if (myCurrentMode == CurAction3d_BeginPositionalLight) - { - p2 = ConvertClickToPoint(point.x,point.y,myView); - //Update the light dynamically - myCurrent_PositionalLight->SetPosition(p2.X(),p2.Y(),p2.Z()); - myView->UpdateLights(); - myView->Redraw(); - } - else if (myCurrentMode == CurAction3d_TargetSpotLight) - { - p2 = ConvertClickToPoint(point.x,point.y,myView); - //Update the light dynamically - Standard_Real coneHeigth=p1.Distance(p2); - if( coneHeigth>Precision::Confusion()) - { - BRepPrimAPI_MakeCone MakeCone(gp_Ax2(p1, gp_Dir(gp_Vec(p1, p2))), - 0, (p1.Distance(p2))/tan(1.04), coneHeigth); - spotConeShape->Set(MakeCone.Solid()); - GetDocument()->GetAISContext()->Redisplay(spotConeShape,0,Standard_True); - myCurrent_SpotLight->SetDirection(p2.X()-p1.X(),p2.Y()-p1.Y(),p2.Z()-p1.Z()); - myView->UpdateLights(); - myView->Redraw(); - } - } - else if (myCurrentMode == CurAction3d_EndSpotLight) - { - p3 = ConvertClickToPoint(point.x,point.y,myView); - //Update the light dynamically - Standard_Real coneHeigth=p1.Distance(p2); - if( (p2.Distance(p3))>Precision::Confusion()) - { - BRepPrimAPI_MakeCone MakeCone(gp_Ax2(p1, gp_Dir(gp_Vec(p1, p2))), - 0, p2.Distance(p3), coneHeigth); - spotConeShape->Set(MakeCone.Solid()); - GetDocument()->GetAISContext()->Redisplay(spotConeShape,0,Standard_True); - myCurrent_SpotLight->SetAngle((float )atan(p2.Distance(p3)/p1.Distance(p2))) ; - myView->UpdateLights(); - myView->Redraw(); - } - } - else if (nFlags & MK_SHIFT) - { - GetDocument()->ShiftMoveEvent(point.x,point.y,myView); - } - else - { - GetDocument()->MoveEvent(point.x,point.y,myView); - } - } -} - -void CViewer3dView::OnUpdateBUTTONHlrOff (CCmdUI* pCmdUI) -{ - pCmdUI->SetCheck (!myHlrModeIsOn); - pCmdUI->Enable (myHlrModeIsOn); -} - -void CViewer3dView::OnUpdateBUTTONHlrOn (CCmdUI* pCmdUI) -{ - pCmdUI->SetCheck (myHlrModeIsOn); - pCmdUI->Enable (!myHlrModeIsOn); -} - -void CViewer3dView::OnUpdateBUTTONPanGlo(CCmdUI* pCmdUI) -{ - pCmdUI->SetCheck (myCurrentMode == CurAction3d_GlobalPanning); - pCmdUI->Enable (myCurrentMode != CurAction3d_GlobalPanning); - -} - -void CViewer3dView::OnUpdateBUTTONPan(CCmdUI* pCmdUI) -{ - pCmdUI->SetCheck (myCurrentMode == CurAction3d_DynamicPanning); - pCmdUI->Enable (myCurrentMode != CurAction3d_DynamicPanning ); -} - -void CViewer3dView::OnUpdateBUTTONZoomProg(CCmdUI* pCmdUI) -{ - pCmdUI->SetCheck (myCurrentMode == CurAction3d_DynamicZooming ); - pCmdUI->Enable (myCurrentMode != CurAction3d_DynamicZooming); -} - -void CViewer3dView::OnUpdateBUTTONZoomWin(CCmdUI* pCmdUI) -{ - pCmdUI->SetCheck (myCurrentMode == CurAction3d_WindowZooming); - pCmdUI->Enable (myCurrentMode != CurAction3d_WindowZooming); -} - -void CViewer3dView::OnUpdateBUTTONRot(CCmdUI* pCmdUI) -{ - pCmdUI->SetCheck (myCurrentMode == CurAction3d_DynamicRotation); - pCmdUI->Enable (myCurrentMode != CurAction3d_DynamicRotation); -} - -void CViewer3dView::DrawRectangle (Standard_Integer theMinX, - Standard_Integer theMinY, - Standard_Integer theMaxX, - Standard_Integer theMaxY, - Standard_Boolean theToDraw, - Aspect_TypeOfLine theLineType) -{ - const Handle(AIS_InteractiveContext)& aCtx = GetDocument()->GetAISContext(); - if (!theToDraw) - { - aCtx->Remove (myRect, false); - aCtx->CurrentViewer()->RedrawImmediate(); - return; - } - - CRect aRect; - GetWindowRect (aRect); - myRect->SetLineType (theLineType); - myRect->SetRectangle (theMinX, aRect.Height() - theMinY, theMaxX, aRect.Height() - theMaxY); - if (!aCtx->IsDisplayed (myRect)) - { - aCtx->Display (myRect, false); - } - else - { - aCtx->Redisplay (myRect, false); - } - aCtx->CurrentViewer()->RedrawImmediate(); -} - -void CViewer3dView::OnModifyChangeBackground() -{ - Standard_Real R1; - Standard_Real G1; - Standard_Real B1; - myView->BackgroundColor(Quantity_TOC_RGB,R1,G1,B1); - COLORREF m_clr ; - m_clr = RGB(R1*255,G1*255,B1*255); - - CColorDialog dlgColor(m_clr); - if (dlgColor.DoModal() == IDOK) - { - m_clr = dlgColor.GetColor(); - R1 = GetRValue(m_clr)/255.; - G1 = GetGValue(m_clr)/255.; - B1 = GetBValue(m_clr)/255.; - myView->SetBackgroundColor(Quantity_TOC_RGB,R1,G1,B1); - } - myView->Redraw(); -} - -void CViewer3dView::OnDirectionalLight() -{ -// Directional light source creation - -// Checking if the Active lights limit number is not reached - if( NbActiveLights>=myGraphicDriver->InquireLightLimit() ) - { - CString aMsg; - aMsg.Format (L"You have reach the limit number of active lights (%d).\n Clear lights to create new ones.", myGraphicDriver->InquireLightLimit()); - MessageBox (aMsg, L"Light creation", MB_OK); - return; - } - - UpdateData(TRUE); - ((OCC_MainFrame*)AfxGetMainWnd())->SetStatusMessage("Pick a first point"); - myCurrentMode = CurAction3d_BeginDirectionalLight; - -TCollection_AsciiString Message("\ -myCurrent_DirectionalLight = new V3d_DirectionalLight (gp_Dir (theDirection));\n\ -\n\ -myView->SetLightOn(myCurrent_DirectionalLight);\n\ -\n\ -"); -// Update The Result Message Dialog - GetDocument()->UpdateResultMessageDlg("V3d_DirectionalLight",Message); -} - -void CViewer3dView::OnSpotLight() -{ -// Spot light source creation - -// Checking if the Active lights limit number is not reached - if( NbActiveLights>=myGraphicDriver->InquireLightLimit() ) - { - CString aMsg; - aMsg.Format(L"You have reach the limit number of active lights (%d).\n Clear lights to create new ones.", myGraphicDriver->InquireLightLimit()); - MessageBox (aMsg, L"Light creation", MB_OK); - return; - } - - ((OCC_MainFrame*)AfxGetMainWnd())->SetStatusMessage("Pick the light position"); - myCurrentMode = CurAction3d_BeginSpotLight; - -TCollection_AsciiString Message("\ -myCurrent_SpotLight = new V3d_SpotLight (gp_Pnt (thePosition), gp_Dir (theDirection), Quantity_NOC_RED);\n\ -\n\ -myView->SetLightOn(myCurrent_SpotLight);\n\ -\n\ -"); -// Update The Result Message Dialog -GetDocument()->UpdateResultMessageDlg("V3d_SpotLight",Message); -} - -void CViewer3dView::OnPositionalLight() -{ -// Positional light source creation - -// Checking if the Active lights limit number is not reached - if( NbActiveLights>=myGraphicDriver->InquireLightLimit() ) - { - CString aMsg; - aMsg.Format(L"You have reach the limit number of active lights (%d).\n Clear lights to create new ones.", myGraphicDriver->InquireLightLimit()); - MessageBox(aMsg, L"Light creation", MB_OK); - return; - } - - myCurrent_PositionalLight=new V3d_PositionalLight (gp_Pnt (0,0,0), Quantity_NOC_GREEN); - myCurrent_PositionalLight->SetAttenuation (1, 0); - myView->SetLightOn(myCurrent_PositionalLight); - NbActiveLights++; - ((OCC_MainFrame*)AfxGetMainWnd())->SetStatusMessage("Pick the light position"); - myCurrentMode = CurAction3d_BeginPositionalLight; - -TCollection_AsciiString Message("\ -myCurrent_PositionalLight=new V3d_PositionalLight (gp_Pnt(thePosition),Quantity_NOC_GREEN);\n\ -myCurrent_PositionalLight->SetAttenuation (1, 0);\n\ -\n\ -myView->SetLightOn(myCurrent_PositionalLight) ;\n\ - "); - - // Update The Result Message Dialog -GetDocument()->UpdateResultMessageDlg("V3d_PositionalLight",Message); -} - -void CViewer3dView::OnAmbientLight() -{ -// Ambiant light source creation - -// Checking if the Active lights limit number is not reached - if( NbActiveLights>=myGraphicDriver->InquireLightLimit() ) - { - CString aMsg; - aMsg.Format(L"You have reach the limit number of active lights (%d).\n Clear lights to create new ones.", myGraphicDriver->InquireLightLimit()); - MessageBox(aMsg, L"Light creation", MB_OK); - return; - } - - myCurrent_AmbientLight=new V3d_AmbientLight (Quantity_NOC_GRAY); - myView->SetLightOn(myCurrent_AmbientLight) ; - NbActiveLights++; - - myView->UpdateLights(); - myView->Redraw(); - -TCollection_AsciiString Message("\ -myCurrent_AmbientLight=new V3d_AmbientLight(Quantity_NOC_GRAY);\n\ -\n\ -myView->SetLightOn(myCurrent_AmbientLight) ;\n\ - "); - - // Update The Result Message Dialog -GetDocument()->UpdateResultMessageDlg("V3d_AmbientLight",Message); -} - - -void CViewer3dView::OnScale() -{ - ScaleDlg Dlg(myView, this); - Dlg.DoModal(); - myView->Redraw(); -} - -//V3d_View.hxx - -void CViewer3dView::OnShadingmodel() -{ -TCollection_AsciiString Message("\ -myView->SetShadingModel(V3d_TypeOfShadingModel myTypeOfShadingModel);\n\ -\n\ -myCurrent_V3d_View->Update();\n\ - "); - - // Update The Result Message Dialog -GetDocument()->UpdateResultMessageDlg("SetShadingModel",Message); - - CShadingModelDlg Dlg(myView); - Dlg.DoModal(); - myView->Redraw(); -} - - -void CViewer3dView::OnAntialiasingonoff() -{ - Graphic3d_RenderingParams& aParams = myView->ChangeRenderingParams(); - aParams.NbMsaaSamples = aParams.NbMsaaSamples == 0 ? 8 : 0; - myView->Update(); - -TCollection_AsciiString Message("\ -Graphic3d_RenderingParams& aParams = myView->ChangeRenderingParams();\n\ -aParams.NbMsaaSamples = aParams.NbMsaaSamples == 0 ? 8 : 0;\n\ - "); - - // Update The Result Message Dialog -GetDocument()->UpdateResultMessageDlg("SetAntialiasingOn/SetAntialiasingOff",Message); -} - -void CViewer3dView::OnClearLights() -{ -// Setting Off all viewer active lights - V3d_ListOfLight lights; - for (V3d_ListOfLightIterator anIter = myView->Viewer()->ActiveLightIterator(); anIter.More(); anIter.Next()) - { - lights.Append (anIter.Value()); - } - V3d_ListOfLightIterator itrLights(lights); - for (; itrLights.More(); itrLights.Next()) - { - myView->Viewer()->SetLightOff (itrLights.Value()); - } - -// Setting Off all view active lights - lights.Clear(); - for (V3d_ListOfLightIterator anIter = myView->ActiveLightIterator(); anIter.More(); anIter.Next()) - { - lights.Append (anIter.Value()); - } - itrLights.Initialize (lights); - for (; itrLights.More(); itrLights.Next()) - { - myView->SetLightOff (itrLights.Value()); - } - - myView->Viewer()->SetDefaultLights(); // Setting the default lights on - - NbActiveLights = 2; // There are 2 default active lights - - myView->Update(); - -TCollection_AsciiString Message("\ -// Setting Off all viewer active lights\n\ -V3d_ListOfLight lights;\n\ -for (V3d_ListOfLightIterator anIter = myView->Viewer()->ActiveLightIterator(); anIter.More(); anIter.Next())\n\ -{\n\ - lights.Append (anIter.Value());\n\ -}\n\ -V3d_ListOfLightIterator itrLights(lights);\n\ -for (; itrLights.More(); itrLights.Next())\n\ -{\n\ - myView->Viewer()->SetLightOff (itrLights.Value())\n\ -}\n\ -\n\ -// Setting Off all view active lights\n\ -lights.Clear();\n\ -for (V3d_ListOfLightIterator anIter = myView->ActiveLightIterator(); anIter.More(); anIter.Next())\n\ -{\n\ - lights.Append (anIter.Value());\n\ -}\n\ -itrLights.Initialize(lights);\n\ -for (; itrLights.More(); itrLights.Next())\n\ -{\n\ - myView->SetLightOff (itrLights.Value());\n\ -}\n\ -\n\ -myView->Viewer()->SetDefaultLights();// Setting the default lights on\n\ - "); - - // Update The Result Message Dialog -GetDocument()->UpdateResultMessageDlg("SetLightOff",Message); -} - -void CViewer3dView::OnModelclipping() -{ - if (myClippingPlane.IsNull()) - { - gp_Pln aClipPlane (gp_Pnt (0.0, 0.0, 0.0), gp_Dir (1.0, 0.0, 0.0)); - gp_Pln aFacePlane (gp_Pnt (0.1, 0.0, 0.0), gp_Dir (1.0, 0.0, 0.0)); - - // create clipping plane and add to view - myClippingPlane = new Graphic3d_ClipPlane (aClipPlane); - - // shape to represent clipping plane - BRepBuilderAPI_MakeFace aMakeFaceCommand (aFacePlane, 200.0, -200.0, 410.0, -410.0); - TopoDS_Face aShape = aMakeFaceCommand.Face(); - myShape = new AIS_Shape (aShape); - myShape->SetTransparency (0.5); - } - - CModelClippingDlg aClippingDlg (myView, myShape, myClippingPlane, GetDocument()); - - aClippingDlg.DoModal(); -} - -void CViewer3dView::OnOptionsTrihedronStaticTrihedron() -{ - CTrihedronDlg Dlg(myView, GetDocument()); - Dlg.DoModal(); -} - -void CViewer3dView::InitButtons() -{ - myXmin=0; - myYmin=0; - myXmax=0; - myYmax=0; - myCurZoom=0; - myCurrentMode = CurAction3d_Nothing; -} - -void CViewer3dView::Reset() -{ - InitButtons(); - myVisMode = VIS_SHADE; - if (!myView.IsNull()) - { - RedrawVisMode(); - myView->Reset(); - } -} - -void CViewer3dView::GetViewAt (Standard_Real& theX, Standard_Real& theY, Standard_Real& theZ) const -{ - myView->At (theX, theY, theZ); -} - -void CViewer3dView::SetViewAt (const Standard_Real theX, const Standard_Real theY, const Standard_Real theZ) -{ - myView->SetAt (theX, theY, theZ); -} - -void CViewer3dView::GetViewEye(Standard_Real& X, Standard_Real& Y, Standard_Real& Z) -{ - myView->Eye(X,Y,Z); -} - -void CViewer3dView::SetViewEye(Standard_Real X, Standard_Real Y, Standard_Real Z) -{ - myView->SetEye(X,Y,Z); -} - -Standard_Real CViewer3dView::GetViewScale() -{ - return myView->Scale(); -} - -void CViewer3dView::SetViewScale(Standard_Real Coef) -{ - myView->SetScale(Coef); -} - -void CViewer3dView::RedrawVisMode() -{ - switch (myVisMode) - { - case VIS_WIREFRAME: - GetDocument()->GetAISContext()->SetDisplayMode (AIS_WireFrame, Standard_True); - myView->SetComputedMode (Standard_False); - myView->Redraw(); - break; - case VIS_SHADE: - GetDocument()->GetAISContext()->SetDisplayMode (AIS_Shaded, Standard_True); - myView->SetComputedMode (Standard_False); - myView->Redraw(); - break; - case VIS_HLR: - SetCursor(AfxGetApp()->LoadStandardCursor(IDC_WAIT)); - myView->SetComputedMode (Standard_True); - myView->Redraw(); - SetCursor(AfxGetApp()->LoadStandardCursor(IDC_ARROW)); - GetDocument()->GetAISContext()->SetDisplayMode (AIS_WireFrame, Standard_True); - break; - } -} diff --git a/samples/mfc/standard/04_Viewer3d/src/Viewer3dView.h b/samples/mfc/standard/04_Viewer3d/src/Viewer3dView.h deleted file mode 100755 index 1f2d3495df..0000000000 --- a/samples/mfc/standard/04_Viewer3d/src/Viewer3dView.h +++ /dev/null @@ -1,173 +0,0 @@ -// Viewer3dView.h : interface of the CViewer3dView class -// -///////////////////////////////////////////////////////////////////////////// - -#if !defined(AFX_VIEWERVIEW_H__4EF39FBC_4EBB_11D1_8D67_0800369C8A03__INCLUDED_) -#define AFX_VIEWERVIEW_H__4EF39FBC_4EBB_11D1_8D67_0800369C8A03__INCLUDED_ - -#include - -#include -#include -#include -#include -#include - -#include - -#if _MSC_VER >= 1000 -#pragma once -#endif // _MSC_VER >= 1000 -enum View3D_CurrentAction { - CurAction3d_Nothing, - CurAction3d_DynamicZooming, - CurAction3d_WindowZooming, - CurAction3d_DynamicPanning, - CurAction3d_GlobalPanning, - CurAction3d_DynamicRotation, - CurAction3d_BeginSpotLight, - CurAction3d_TargetSpotLight, - CurAction3d_EndSpotLight, - CurAction3d_BeginPositionalLight, - CurAction3d_BeginDirectionalLight, - CurAction3d_EndDirectionalLight -}; - -class AIS_RubberBand; - -class CViewer3dView : public CView -{ -protected: // create from serialization only - CViewer3dView(); - DECLARE_DYNCREATE(CViewer3dView) - -public: - CViewer3dDoc* GetDocument(); - void Redraw() { myView->Redraw(); }; - void InitButtons(); - void Reset(); - void GetViewAt (Standard_Real& theX, Standard_Real& theY, Standard_Real& theZ) const; - void SetViewAt (const Standard_Real theX, const Standard_Real theY, const Standard_Real theZ); - void GetViewEye (Standard_Real& X, Standard_Real& Y, Standard_Real& Z); - void SetViewEye (const Standard_Real X,const Standard_Real Y,const Standard_Real Z); - Standard_Real GetViewScale(); - void SetViewScale (const Standard_Real Coef); - void FitAll() { myView->FitAll(); myView->ZFitAll(); }; - - -// Overrides - // ClassWizard generated virtual function overrides - //{{AFX_VIRTUAL(CViewer3dView) - public: - virtual void OnDraw(CDC* pDC); // overridden to draw this view - virtual BOOL PreCreateWindow(CREATESTRUCT& cs); - virtual void OnInitialUpdate(); - //}}AFX_VIRTUAL - -// Implementation -public: - virtual ~CViewer3dView(); -#ifdef _DEBUG - virtual void AssertValid() const; - virtual void Dump(CDumpContext& dc) const; -#endif - - int scaleX; - int scaleY; - int scaleZ; - -protected: - -// Generated message map functions -protected: - //{{AFX_MSG(CViewer3dView) - afx_msg void OnBUTTONAxo(); - afx_msg void OnBUTTONBack(); - afx_msg void OnBUTTONBottom(); - afx_msg void OnBUTTONFront(); - afx_msg void OnBUTTONHlrOff(); - afx_msg void OnBUTTONHlrOn(); - afx_msg void OnBUTTONLeft(); - afx_msg void OnBUTTONPan(); - afx_msg void OnBUTTONPanGlo(); - afx_msg void OnBUTTONReset(); - afx_msg void OnBUTTONRight(); - afx_msg void OnBUTTONRot(); - afx_msg void OnBUTTONTop(); - afx_msg void OnBUTTONZoomAll(); - afx_msg void OnSize(UINT nType, int cx, int cy); - afx_msg void OnBUTTONZoomProg(); - afx_msg void OnBUTTONZoomWin(); - afx_msg void OnLButtonDown(UINT nFlags, CPoint point); - afx_msg void OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags); - afx_msg void OnLButtonUp(UINT nFlags, CPoint point); - afx_msg void OnMButtonDown(UINT nFlags, CPoint point); - afx_msg void OnMButtonUp(UINT nFlags, CPoint point); - afx_msg void OnMouseMove(UINT nFlags, CPoint point); - afx_msg void OnRButtonDown(UINT nFlags, CPoint point); - afx_msg void OnRButtonUp(UINT nFlags, CPoint point); - afx_msg void OnUpdateBUTTONHlrOff(CCmdUI* pCmdUI); - afx_msg void OnUpdateBUTTONHlrOn(CCmdUI* pCmdUI); - afx_msg void OnUpdateBUTTONPanGlo(CCmdUI* pCmdUI); - afx_msg void OnUpdateBUTTONPan(CCmdUI* pCmdUI); - afx_msg void OnUpdateBUTTONZoomProg(CCmdUI* pCmdUI); - afx_msg void OnUpdateBUTTONZoomWin(CCmdUI* pCmdUI); - afx_msg void OnUpdateBUTTONRot(CCmdUI* pCmdUI); - afx_msg void OnModifyChangeBackground(); - afx_msg void OnDirectionalLight(); - afx_msg void OnSpotLight(); - afx_msg void OnPositionalLight(); - afx_msg void OnAmbientLight(); - afx_msg void OnScale(); - afx_msg void OnShadingmodel(); - afx_msg void OnAntialiasingonoff(); - afx_msg void OnClearLights(); - afx_msg void OnModelclipping(); - afx_msg void OnOptionsTrihedronStaticTrihedron(); - //}}AFX_MSG - DECLARE_MESSAGE_MAP() -private: - enum VisMode { VIS_WIREFRAME, VIS_SHADE, VIS_HLR }; - VisMode myVisMode; - - Handle(V3d_View) myView; - Handle(Graphic3d_GraphicDriver) myGraphicDriver; - View3D_CurrentAction myCurrentMode; - Standard_Integer myXmin; - Standard_Integer myYmin; - Standard_Integer myXmax; - Standard_Integer myYmax; - - Standard_Integer NbActiveLights; - Standard_Boolean myHlrModeIsOn; - Standard_Real myCurZoom; - Handle(V3d_AmbientLight) myCurrent_AmbientLight; - Handle(V3d_SpotLight) myCurrent_SpotLight; - Handle(V3d_PositionalLight) myCurrent_PositionalLight; - Handle(V3d_DirectionalLight) myCurrent_DirectionalLight; - Handle(Graphic3d_ClipPlane) myClippingPlane; - Handle(AIS_Shape) myShape; - Handle(AIS_RubberBand) myRect; //!< Rubber rectangle for selection - -private: - - void DrawRectangle (Standard_Integer theMinX, Standard_Integer theMinY, Standard_Integer theMaxX, Standard_Integer theMaxY, - Standard_Boolean theToDraw, Aspect_TypeOfLine theLineType = Aspect_TOL_SOLID); - - UINT myAxisKey; - UINT myScaleDirection; - void RedrawVisMode(); - -}; - -#ifndef _DEBUG // debug version in Viewer3dView.cpp -inline CViewer3dDoc* CViewer3dView::GetDocument() - { return (CViewer3dDoc*)m_pDocument; } -#endif - -///////////////////////////////////////////////////////////////////////////// - -//{{AFX_INSERT_LOCATION}} -// Microsoft Developer Studio will insert additional declarations immediately before the previous line. - -#endif // !defined(AFX_VIEWERVIEW_H__4EF39FBC_4EBB_11D1_8D67_0800369C8A03__INCLUDED_) diff --git a/samples/mfc/standard/06_Ocaf/CMakeLists.txt b/samples/mfc/standard/06_Ocaf/CMakeLists.txt deleted file mode 100644 index 8a45d105ef..0000000000 --- a/samples/mfc/standard/06_Ocaf/CMakeLists.txt +++ /dev/null @@ -1,70 +0,0 @@ -cmake_minimum_required (VERSION 2.6) - -project (Ocaf) - -add_definitions (-DWINVER=0x0501 -DUNICODE -D_UNICODE) -set (CMAKE_MFC_FLAG 2) - -set (Ocaf_SRC_DIR ${MFC_STANDARD_SAMPLES_DIR}/06_Ocaf/src) -set (Ocaf_HEADER_FILES ${Ocaf_SRC_DIR}/NewBoxDlg.h - ${Ocaf_SRC_DIR}/NewCylDlg.h - ${Ocaf_SRC_DIR}/OcafApp.h - ${Ocaf_SRC_DIR}/OcafDoc.h - ${Ocaf_SRC_DIR}/OcafMainFrm.h - ${Ocaf_SRC_DIR}/TOcaf_Commands.hxx - ${Ocaf_SRC_DIR}/StdAfx.h ) -set (Ocaf_SOURCE_FILES ${Ocaf_SRC_DIR}/NewBoxDlg.cpp - ${Ocaf_SRC_DIR}/NewCylDlg.cpp - ${Ocaf_SRC_DIR}/OcafApp.cpp - ${Ocaf_SRC_DIR}/OcafDoc.cpp - ${Ocaf_SRC_DIR}/OcafMainFrm.cpp - ${Ocaf_SRC_DIR}/TOcaf_Application.cxx - ${Ocaf_SRC_DIR}/TOcaf_Commands.cxx - ${Ocaf_SRC_DIR}/TOcafFunction_BoxDriver.cxx - ${Ocaf_SRC_DIR}/TOcafFunction_CutDriver.cxx - ${Ocaf_SRC_DIR}/TOcafFunction_CylDriver.cxx - ${Ocaf_SRC_DIR}/StdAfx.cpp ) - -set (Ocaf_RESOURCE_DIR ${MFC_STANDARD_SAMPLES_DIR}/06_Ocaf/res) -set (Ocaf_RESOURCE_HEADER ${Ocaf_RESOURCE_DIR}/resource.h) -set (Ocaf_RESOURCE_FILES ${Ocaf_RESOURCE_DIR}/ActionsTB.bmp - ${Ocaf_RESOURCE_DIR}/AIS_TB.bmp - ${Ocaf_RESOURCE_DIR}/Toolbar.bmp - ${Ocaf_RESOURCE_DIR}/UndoRedoTB.bmp - ${Ocaf_RESOURCE_DIR}/Ocaf.rc) - -# groups in the VS solution -source_group ("Source Files" FILES ${Ocaf_SOURCE_FILES} - ${COMMON_WINMAIN_FILE}) - -source_group ("Header Files" FILES ${Ocaf_HEADER_FILES} - ${Ocaf_RESOURCE_HEADER}) - -source_group ("Resource Files" FILES ${Ocaf_RESOURCE_FILES}) - -add_executable (Ocaf WIN32 ${Ocaf_SOURCE_FILES} - ${Ocaf_HEADER_FILES} - ${COMMON_WINMAIN_FILE} - ${Ocaf_RESOURCE_HEADER} - ${Ocaf_RESOURCE_FILES} ) - - -set_property (TARGET Ocaf PROPERTY FOLDER "Samples/mfc") - -if (SINGLE_GENERATOR) - install (TARGETS Ocaf DESTINATION "${INSTALL_DIR_BIN}") -else() - install (TARGETS Ocaf - CONFIGURATIONS Release RelWithDebInfo - DESTINATION "${INSTALL_DIR_BIN}") - install (TARGETS Ocaf - CONFIGURATIONS Debug - DESTINATION "${INSTALL_DIR_BIN}d") -endif() - -include_directories (${CMAKE_BINARY_DIR}/inc - ${MFC_STANDARD_SAMPLES_DIR}/06_Ocaf - ${Ocaf_SRC_DIR} - ${MFC_STANDARD_SAMPLES_DIR}/Common) - -target_link_libraries (Ocaf mfcsample TKLCAF TKVCAF TKBO TKBin TKXml TKBinL TKXmlL) diff --git a/samples/mfc/standard/06_Ocaf/adm/win/vc10/Ocaf.vcxproj b/samples/mfc/standard/06_Ocaf/adm/win/vc10/Ocaf.vcxproj deleted file mode 100644 index a68e892151..0000000000 --- a/samples/mfc/standard/06_Ocaf/adm/win/vc10/Ocaf.vcxproj +++ /dev/null @@ -1,493 +0,0 @@ - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {B3C10EF6-42C7-4DB8-A49C-7E38255D5B1B} - Ocaf - MFCProj - - - - Application - Dynamic - Unicode - $(VCPlatformToolSet) - - - Application - Dynamic - Unicode - $(VCPlatformToolSet) - - - Application - Dynamic - Unicode - $(VCPlatformToolSet) - - - Application - Dynamic - Unicode - $(VCPlatformToolSet) - - - - - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>10.0.30319.1 - ../../../../win32\$(VCFMT)\bin\ - .\win32\obj\ - false - ../../../../win64\$(VCFMT)\bin\ - .\win64\obj\ - false - ../../../../win32\$(VCFMT)\bind\ - .\win32\objd\ - true - ../../../../win64\$(VCFMT)\bind\ - .\win64\objd\ - true - - - - NDEBUG;%(PreprocessorDefinitions) - true - true - Win32 - .\win32\obj/Ocaf.tlb - - - - - MaxSpeed - OnlyExplicitInline - ..\..\..\;..\..\..\src;...\..\..\res;..\..\..\..\Common;$(CSF_OCCTIncludePath);%(AdditionalIncludeDirectories) - NDEBUG;_WINDOWS;WINVER=0x0501;%(PreprocessorDefinitions) - true - MultiThreadedDLL - true - Use - stdafx.h - .\win32\obj/Ocaf.pch - .\win32\obj/ - .\win32\obj/ - .\win32\obj/ - Level4 - true - Default - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - - - TKVCAF.lib;TKLCAF.lib;TKBrep.lib;TKIGES.lib;TKShHealing.lib;TKStep.lib;TKXSBase.lib;TKBO.lib;TKBool.lib;TKCAF.lib;TKCDF.lib;TKernel.lib;TKFeat.lib;TKFillet.lib;TKG2d.lib;TKG3d.lib;TKGeomAlgo.lib;TKGeomBase.lib;TKHLR.lib;TKMath.lib;TKOffset.lib;TKPrim.lib;TKService.lib;TKTopAlgo.lib;TKV3d.lib;TKOpenGl.lib;TKBin.lib;TKXml.lib;mfcsample.lib;%(AdditionalDependencies) - ../../../../win32\$(VCFMT)\bin/Ocaf.exe - true - ..\..\..\..\win32\$(VCFMT)\lib;$(CSF_OCCTLibPath);%(AdditionalLibraryDirectories) - ../../../../win32\$(VCFMT)\bin/Ocaf.pdb - Windows - MachineX86 - - - - - NDEBUG;%(PreprocessorDefinitions) - true - true - X64 - .\win64\obj/Ocaf.tlb - - - - - MaxSpeed - OnlyExplicitInline - ..\..\..\;..\..\..\src;...\..\..\res;..\..\..\..\Common;$(CSF_OCCTIncludePath);%(AdditionalIncludeDirectories) - NDEBUG;_WINDOWS;WINVER=0x0501;%(PreprocessorDefinitions) - true - MultiThreadedDLL - true - Use - stdafx.h - .\win64\obj/Ocaf.pch - .\win64\obj/ - .\win64\obj/ - .\win64\obj/ - Level4 - true - Default - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - - - TKVCAF.lib;TKLCAF.lib;TKBrep.lib;TKIGES.lib;TKShHealing.lib;TKStep.lib;TKXSBase.lib;TKBO.lib;TKBool.lib;TKCAF.lib;TKCDF.lib;TKernel.lib;TKFeat.lib;TKFillet.lib;TKG2d.lib;TKG3d.lib;TKGeomAlgo.lib;TKGeomBase.lib;TKHLR.lib;TKMath.lib;TKOffset.lib;TKPrim.lib;TKService.lib;TKTopAlgo.lib;TKV3d.lib;TKOpenGl.lib;TKBin.lib;TKXml.lib;mfcsample.lib;%(AdditionalDependencies) - ../../../../win64\$(VCFMT)\bin/Ocaf.exe - true - ..\..\..\..\win64\$(VCFMT)\lib;$(CSF_OCCTLibPath);%(AdditionalLibraryDirectories) - ../../../../win64\$(VCFMT)\bin/Ocaf.pdb - Windows - MachineX64 - - - - - _DEBUG;%(PreprocessorDefinitions) - true - true - Win32 - .\win32\objd/Ocaf.tlb - - - - - Disabled - ..\..\..\;..\..\..\src;...\..\..\res;..\..\..\..\Common;$(CSF_OCCTIncludePath);%(AdditionalIncludeDirectories) - _DEBUG;_WINDOWS;WINVER=0x0501;%(PreprocessorDefinitions) - EnableFastChecks - MultiThreadedDebugDLL - Use - stdafx.h - .\win32\objd/Ocaf.pch - .\win32\objd/ - .\win32\objd/ - .\win32\objd/ - Level4 - true - EditAndContinue - Default - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - - - TKVCAF.lib;TKLCAF.lib;TKBrep.lib;TKIGES.lib;TKShHealing.lib;TKStep.lib;TKXSBase.lib;TKBO.lib;TKBool.lib;TKCAF.lib;TKCDF.lib;TKernel.lib;TKFeat.lib;TKFillet.lib;TKG2d.lib;TKG3d.lib;TKGeomAlgo.lib;TKGeomBase.lib;TKHLR.lib;TKMath.lib;TKOffset.lib;TKPrim.lib;TKService.lib;TKTopAlgo.lib;TKV3d.lib;TKOpenGl.lib;TKBin.lib;TKXml.lib;mfcsample.lib;%(AdditionalDependencies) - ../../../../win32\$(VCFMT)\bind/Ocaf.exe - true - ..\..\..\..\win32\$(VCFMT)\libd;$(CSF_OCCTLibPath);%(AdditionalLibraryDirectories) - true - ../../../../win32\$(VCFMT)\bind/Ocaf.pdb - Windows - MachineX86 - - - - - _DEBUG;%(PreprocessorDefinitions) - true - true - X64 - .\win64\objd/Ocaf.tlb - - - - - Disabled - ..\..\..\;..\..\..\src;...\..\..\res;..\..\..\..\Common;$(CSF_OCCTIncludePath);%(AdditionalIncludeDirectories) - _DEBUG;_WINDOWS;WINVER=0x0501;%(PreprocessorDefinitions) - EnableFastChecks - MultiThreadedDebugDLL - Use - stdafx.h - .\win64\objd/Ocaf.pch - .\win64\objd/ - .\win64\objd/ - .\win64\objd/ - Level4 - true - ProgramDatabase - Default - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - - - TKVCAF.lib;TKLCAF.lib;TKBrep.lib;TKIGES.lib;TKShHealing.lib;TKStep.lib;TKXSBase.lib;TKBO.lib;TKBool.lib;TKCAF.lib;TKCDF.lib;TKernel.lib;TKFeat.lib;TKFillet.lib;TKG2d.lib;TKG3d.lib;TKGeomAlgo.lib;TKGeomBase.lib;TKHLR.lib;TKMath.lib;TKOffset.lib;TKPrim.lib;TKService.lib;TKTopAlgo.lib;TKV3d.lib;TKOpenGl.lib;TKBin.lib;TKXml.lib;mfcsample.lib;%(AdditionalDependencies) - ../../../../win64\$(VCFMT)\bind/Ocaf.exe - true - ..\..\..\..\win64\$(VCFMT)\libd;$(CSF_OCCTLibPath);%(AdditionalLibraryDirectories) - true - ../../../../win64\$(VCFMT)\bind/Ocaf.pdb - Windows - MachineX64 - - - - - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - - - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - - - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - - - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - - - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - - - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - Create - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - Create - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - Create - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - Create - - - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - - - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - - - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - - - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - - - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - - - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - - - - - %(PreprocessorDefinitions) - res;%(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - res;%(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - res;%(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - res;%(AdditionalIncludeDirectories) - - - - - - - - - - - - - - - - - - - - - - - - - {2d6cbbe8-6965-4016-b503-0d715ae26691} - false - - - - - - \ No newline at end of file diff --git a/samples/mfc/standard/06_Ocaf/adm/win/vc10/Ocaf.vcxproj.filters b/samples/mfc/standard/06_Ocaf/adm/win/vc10/Ocaf.vcxproj.filters deleted file mode 100644 index 976b07f05b..0000000000 --- a/samples/mfc/standard/06_Ocaf/adm/win/vc10/Ocaf.vcxproj.filters +++ /dev/null @@ -1,112 +0,0 @@ - - - - - {3c30d6ca-d9bc-459f-99b6-9cc644fb9093} - cpp;c;cxx;rc;def;r;odl;idl;hpj;bat - - - {84ea6fae-dd93-4f6d-b50f-ed88ccc5ce98} - h;hpp;hxx;hm;inl - - - {185b7bc3-efac-469b-960c-918d0e30bc03} - ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe - - - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - - - Source Files - - - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - - - Resource Files - - - Resource Files - - - Resource Files - - - Resource Files - - - \ No newline at end of file diff --git a/samples/mfc/standard/06_Ocaf/res/AIS_TB.bmp b/samples/mfc/standard/06_Ocaf/res/AIS_TB.bmp deleted file mode 100755 index f104c7f53fc3de755d25a032745f04af9b156d5c..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 838 zcma))uTsP?5XQqFbBaOX&lJZyAaJ|`&rrc;rsCp~nF?fYhX=Tsdx6|dO&tb-L!ogD zu65ztB<;am1>Yr`T=tjkW|Q0dyE7H_2z!nGfPR5~qRwHJdOMB7j4?`~DPz(Ai>d0m z4x>0iY$^nqq2nh@Fho_`dV;ibR>n!$k=B`6ky|j4#};Agw%tvvOnh?GRi%jp*TP2@ zF5N=-z~$A~CpW;eLwm>)@FK>qBuqcYCx@2!;BC1qoI!j^bB=HDy?sv_`Paf1MdAti z#mnC)-s6nmQ$A~?LovQM`$In4&Fjl{gY)ro;w#9~x?GmC@sIc^K6tlCWjKzH3g&!r zd@66kApCgVT|Ad$mo%Oi>(-K`)qn=x=X%P0q5j;o{^K26vLn~iuD%^n$oXK;cwYw| wdvM26AKc^9U@Qf9{2nI$?|X2;2o7HImr&_l$t){7(mK0AaPa>VvlE5In@06c&8Lk{LeW*xUM!t4zz2=qbWed_sDPxO)eRGg!Ff?m{+uo8)@C zAH?uLJ|ixO22sfoS>#z+*-51(%Ye)*TRj^O=0R<(2ZNi#~Y+>o4Bl{TF`r2Ff-xg8vtvlAX}?JNyh} z*tIm>Ie!9%EiXFKU_IZQ{r;<7hhPsto)5D;*}Fe@4A(byQyPo&*o^KUJt=IBs?G-p RPNVz7c9m0Rx8w?D$S>nq*vkL_ diff --git a/samples/mfc/standard/06_Ocaf/res/UndoRedoTB.bmp b/samples/mfc/standard/06_Ocaf/res/UndoRedoTB.bmp deleted file mode 100755 index 2876a290b8b80accc0c33e864e589c49c258a997..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 358 zcmb7+I}QRd3`A!oB$r%)l5^1SHMVwz+Z-)N+8cx!n@E7t;CP+yb)&A- zh6@Rt$rTzvM{5;Grs%yhYB16)!69ZQ1+z6R#A1ZNR01h^#4+E;aM V*1qO->67|2UANvR>u@&yzzbh=YY+ec diff --git a/samples/mfc/standard/06_Ocaf/res/resource.h b/samples/mfc/standard/06_Ocaf/res/resource.h deleted file mode 100755 index b9b6a86669..0000000000 --- a/samples/mfc/standard/06_Ocaf/res/resource.h +++ /dev/null @@ -1,35 +0,0 @@ -//{{NO_DEPENDENCIES}} -// Microsoft Developer Studio generated include file. -// Used by Ocaf.rc -// -#define IDR_ACTIONS 500 -#define IDR_UNDOREDO 520 -#define IDD_NEWBOX 529 -#define IDD_NEWCYL 530 -#define ID_WINDOW_NEW3D 1151 -#define ID_OBJECT_DELETE 1202 -#define IDC_R 1650 -#define IDC_X 1659 -#define IDC_L 1660 -#define IDC_Y 1663 -#define IDC_Z 1664 -#define IDC_H 1665 -#define IDC_W 1666 -#define IDC_NAME 1673 -#define ID_CREATEBOX 3000 -#define ID_CUT 3002 -#define ID_CREATECYL 3003 -#define ID_MODIFY 3004 -//#define ID_DFBR 3007 - -// Next default values for new objects -// -#ifdef APSTUDIO_INVOKED -#ifndef APSTUDIO_READONLY_SYMBOLS -#define _APS_3D_CONTROLS 1 -#define _APS_NEXT_RESOURCE_VALUE 504 -#define _APS_NEXT_COMMAND_VALUE 3007 -#define _APS_NEXT_CONTROL_VALUE 1658 -#define _APS_NEXT_SYMED_VALUE 600 -#endif -#endif diff --git a/samples/mfc/standard/06_Ocaf/src/DebugBrowser.hxx b/samples/mfc/standard/06_Ocaf/src/DebugBrowser.hxx deleted file mode 100755 index f788826c18..0000000000 --- a/samples/mfc/standard/06_Ocaf/src/DebugBrowser.hxx +++ /dev/null @@ -1,113 +0,0 @@ -// File generated by CPPExt (Value) -// Copyright (C) 1991,1995 by -// -// MATRA DATAVISION, FRANCE -// -// This software is furnished in accordance with the terms and conditions -// of the contract and with the inclusion of the above copyright notice. -// This software or any other copy thereof may not be provided or otherwise -// be made available to any other person. No title to an ownership of the -// software is hereby transferred. -// -// At the termination of the contract, the software and all copies of this -// software must be deleted. - -#ifndef _DebugBrowser_HeaderFile -#define _DebugBrowser_HeaderFile - -#ifndef _Standard_Integer_HeaderFile -#include -#endif -class TDocStd_Document; -class DebugBrowser_Attr; -class DebugBrowser_DFTree; -class DebugBrowser_DFNode; -class DebugBrowser_AttrNode; -class DebugBrowser_LabelNode; -class DebugBrowser_ListNode; -class DebugBrowser_NSNode; -class DebugBrowser_GUI; -class DebugBrowser_DataMapOfIntegerExtString; -class DebugBrowser_QTGUI; -class DebugBrowser_DataMapNodeOfDataMapOfIntegerExtString; -class DebugBrowser_DataMapIteratorOfDataMapOfIntegerExtString; - - -#ifndef _Standard_HeaderFile -#include -#endif -#ifndef _Standard_Macro_HeaderFile -#include -#endif - -class DebugBrowser { - -public: - - inline void* operator new(size_t,void* anAddress) - { - return anAddress; - } - inline void* operator new(size_t size) - { - return Standard::Allocate(size); - } - inline void operator delete(void *anAddress) - { - if (anAddress) Standard::Free((Standard_Address&)anAddress); - } -// inline void operator delete(void *anAddress, size_t size) -// { -// if (anAddress) Standard::Free((Standard_Address&)anAddress,size); -// } - // Methods PUBLIC - // -Standard_EXPORT static Standard_Integer DFBrowser(const Handle(TDocStd_Document)& theDoc) ; - - - - - -protected: - - // Methods PROTECTED - // - - - // Fields PROTECTED - // - - -private: - - // Methods PRIVATE - // - - - // Fields PRIVATE - // - -friend class DebugBrowser_Attr; -friend class DebugBrowser_DFTree; -friend class DebugBrowser_DFNode; -friend class DebugBrowser_AttrNode; -friend class DebugBrowser_LabelNode; -friend class DebugBrowser_ListNode; -friend class DebugBrowser_NSNode; -friend class DebugBrowser_GUI; -friend class DebugBrowser_DataMapOfIntegerExtString; -friend class DebugBrowser_QTGUI; -friend class DebugBrowser_DataMapNodeOfDataMapOfIntegerExtString; -friend class DebugBrowser_DataMapIteratorOfDataMapOfIntegerExtString; - -}; - - - - - -// other inline functions and methods (like "C++: function call" methods) -// - - -#endif diff --git a/samples/mfc/standard/06_Ocaf/src/NewBoxDlg.cpp b/samples/mfc/standard/06_Ocaf/src/NewBoxDlg.cpp deleted file mode 100755 index b670c73ed4..0000000000 --- a/samples/mfc/standard/06_Ocaf/src/NewBoxDlg.cpp +++ /dev/null @@ -1,72 +0,0 @@ -// NewBoxDlg.cpp : implementation file -// - -#include "stdafx.h" - -#include "NewBoxDlg.h" - -//#include "OcafApp.h" - -///////////////////////////////////////////////////////////////////////////// -// CNewBoxDlg dialog - -CNewBoxDlg::CNewBoxDlg(CWnd* pParent /*=NULL*/) - : CDialog(CNewBoxDlg::IDD, pParent) -{ - //{{AFX_DATA_INIT(CNewBoxDlg) - m_h = 10.0; - m_l = 15.0; - m_Name = _T("Box"); - m_w = 10.0; - m_x = 0.0; - m_y = 0.0; - m_z = 0.0; - //}}AFX_DATA_INIT -} - -void CNewBoxDlg::DoDataExchange(CDataExchange* pDX) -{ - CDialog::DoDataExchange(pDX); - //{{AFX_DATA_MAP(CNewBoxDlg) - DDX_Text(pDX, IDC_H, m_h); - DDX_Text(pDX, IDC_L, m_l); - DDX_Text(pDX, IDC_NAME, m_Name); - DDX_Text(pDX, IDC_W, m_w); - DDX_Text(pDX, IDC_X, m_x); - DDX_Text(pDX, IDC_Y, m_y); - DDX_Text(pDX, IDC_Z, m_z); - //}}AFX_DATA_MAP -} - - -BEGIN_MESSAGE_MAP(CNewBoxDlg, CDialog) - //{{AFX_MSG_MAP(CNewBoxDlg) - //}}AFX_MSG_MAP -END_MESSAGE_MAP() - -///////////////////////////////////////////////////////////////////////////// -// CNewBoxDlg message handlers - -void CNewBoxDlg::OnOK() -{ - UpdateData(TRUE); - if( (m_h<=Precision::Confusion()) || (m_l<=Precision::Confusion()) || (m_w<=Precision::Confusion()) ) - { - MessageBox (L"Length, height and width of a box should be srictly positives.", L"New box", MB_ICONEXCLAMATION); - return; - } - - CDialog::OnOK(); -} - -void CNewBoxDlg::InitFields(Standard_Real x, Standard_Real y, Standard_Real z, Standard_Real w, Standard_Real l, Standard_Real h, const TCollection_ExtendedString &Name) -{ - m_x=x; - m_y=y; - m_z=z; - m_w=w; - m_l=l; - m_h=h; - TCollection_AsciiString AsciiName(Name); - m_Name=AsciiName.ToCString(); -} diff --git a/samples/mfc/standard/06_Ocaf/src/NewBoxDlg.h b/samples/mfc/standard/06_Ocaf/src/NewBoxDlg.h deleted file mode 100755 index caec9e74c2..0000000000 --- a/samples/mfc/standard/06_Ocaf/src/NewBoxDlg.h +++ /dev/null @@ -1,53 +0,0 @@ -#if !defined(AFX_NEWBOXDLG_H__5A881DC0_7A5F_11D4_8D45_00AA00D10994__INCLUDED_) -#define AFX_NEWBOXDLG_H__5A881DC0_7A5F_11D4_8D45_00AA00D10994__INCLUDED_ - -#if _MSC_VER > 1000 -#pragma once -#endif // _MSC_VER > 1000 -// NewBoxDlg.h : header file -// - -///////////////////////////////////////////////////////////////////////////// -// CNewBoxDlg dialog - -class CNewBoxDlg : public CDialog -{ -// Construction -public: - void InitFields(Standard_Real x, Standard_Real y, Standard_Real z, Standard_Real w, Standard_Real l, Standard_Real h, const TCollection_ExtendedString &Name); - CNewBoxDlg(CWnd* pParent = NULL); // standard constructor - -// Dialog Data - //{{AFX_DATA(CNewBoxDlg) - enum { IDD = IDD_NEWBOX }; - double m_h; - double m_l; - CString m_Name; - double m_w; - double m_x; - double m_y; - double m_z; - //}}AFX_DATA - - -// Overrides - // ClassWizard generated virtual function overrides - //{{AFX_VIRTUAL(CNewBoxDlg) - protected: - virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support - //}}AFX_VIRTUAL - -// Implementation -protected: - - // Generated message map functions - //{{AFX_MSG(CNewBoxDlg) - virtual void OnOK(); - //}}AFX_MSG - DECLARE_MESSAGE_MAP() -}; - -//{{AFX_INSERT_LOCATION}} -// Microsoft Visual C++ will insert additional declarations immediately before the previous line. - -#endif // !defined(AFX_NEWBOXDLG_H__5A881DC0_7A5F_11D4_8D45_00AA00D10994__INCLUDED_) diff --git a/samples/mfc/standard/06_Ocaf/src/NewCylDlg.cpp b/samples/mfc/standard/06_Ocaf/src/NewCylDlg.cpp deleted file mode 100755 index a7f9a1822a..0000000000 --- a/samples/mfc/standard/06_Ocaf/src/NewCylDlg.cpp +++ /dev/null @@ -1,69 +0,0 @@ -// NewCylDlg.cpp : implementation file -// - -#include "stdafx.h" - -#include "NewCylDlg.h" - -//#include "OcafApp.h" - -///////////////////////////////////////////////////////////////////////////// -// CNewCylDlg dialog - -CNewCylDlg::CNewCylDlg(CWnd* pParent /*=NULL*/) - : CDialog(CNewCylDlg::IDD, pParent) -{ - //{{AFX_DATA_INIT(CNewCylDlg) - m_h = 20.0; - m_Name = _T("Cylinder"); - m_r = 10.0; - m_x = 0.0; - m_y = 0.0; - m_z = 0.0; - //}}AFX_DATA_INIT -} - -void CNewCylDlg::DoDataExchange(CDataExchange* pDX) -{ - CDialog::DoDataExchange(pDX); - //{{AFX_DATA_MAP(CNewCylDlg) - DDX_Text(pDX, IDC_H, m_h); - DDX_Text(pDX, IDC_NAME, m_Name); - DDX_Text(pDX, IDC_R, m_r); - DDX_Text(pDX, IDC_X, m_x); - DDX_Text(pDX, IDC_Y, m_y); - DDX_Text(pDX, IDC_Z, m_z); - //}}AFX_DATA_MAP -} - - -BEGIN_MESSAGE_MAP(CNewCylDlg, CDialog) - //{{AFX_MSG_MAP(CNewCylDlg) - //}}AFX_MSG_MAP -END_MESSAGE_MAP() - -///////////////////////////////////////////////////////////////////////////// -// CNewCylDlg message handlers - -void CNewCylDlg::OnOK() -{ - UpdateData(TRUE); - if( (m_h<=Precision::Confusion()) || (m_r<=Precision::Confusion()) ) - { - MessageBox (L"Radius and height of a cylinder should be srictly positives.", L"New box", MB_ICONEXCLAMATION); - return; - } - - CDialog::OnOK(); -} - -void CNewCylDlg::InitFields(Standard_Real x, Standard_Real y, Standard_Real z, Standard_Real r, Standard_Real h, const TCollection_ExtendedString &Name) -{ - m_x=x; - m_y=y; - m_z=z; - m_r=r; - m_h=h; - TCollection_AsciiString AsciiName(Name); - m_Name=AsciiName.ToCString(); -} diff --git a/samples/mfc/standard/06_Ocaf/src/NewCylDlg.h b/samples/mfc/standard/06_Ocaf/src/NewCylDlg.h deleted file mode 100755 index 640a8cdbe8..0000000000 --- a/samples/mfc/standard/06_Ocaf/src/NewCylDlg.h +++ /dev/null @@ -1,52 +0,0 @@ -#if !defined(AFX_NEWCYLDLG_H__FFA9686D_8580_11D4_8D47_00AA00D10994__INCLUDED_) -#define AFX_NEWCYLDLG_H__FFA9686D_8580_11D4_8D47_00AA00D10994__INCLUDED_ - -#if _MSC_VER > 1000 -#pragma once -#endif // _MSC_VER > 1000 -// NewCylDlg.h : header file -// - -///////////////////////////////////////////////////////////////////////////// -// CNewCylDlg dialog - -class CNewCylDlg : public CDialog -{ -// Construction -public: - void InitFields(Standard_Real x, Standard_Real y, Standard_Real z, Standard_Real r, Standard_Real h, const TCollection_ExtendedString &Name); - CNewCylDlg(CWnd* pParent = NULL); // standard constructor - -// Dialog Data - //{{AFX_DATA(CNewCylDlg) - enum { IDD = IDD_NEWCYL }; - double m_h; - CString m_Name; - double m_r; - double m_x; - double m_y; - double m_z; - //}}AFX_DATA - - -// Overrides - // ClassWizard generated virtual function overrides - //{{AFX_VIRTUAL(CNewCylDlg) - protected: - virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support - //}}AFX_VIRTUAL - -// Implementation -protected: - - // Generated message map functions - //{{AFX_MSG(CNewCylDlg) - virtual void OnOK(); - //}}AFX_MSG - DECLARE_MESSAGE_MAP() -}; - -//{{AFX_INSERT_LOCATION}} -// Microsoft Visual C++ will insert additional declarations immediately before the previous line. - -#endif // !defined(AFX_NEWCYLDLG_H__FFA9686D_8580_11D4_8D47_00AA00D10994__INCLUDED_) diff --git a/samples/mfc/standard/06_Ocaf/src/OCAFSample_CommonDriver.cxx b/samples/mfc/standard/06_Ocaf/src/OCAFSample_CommonDriver.cxx deleted file mode 100755 index 6658540682..0000000000 --- a/samples/mfc/standard/06_Ocaf/src/OCAFSample_CommonDriver.cxx +++ /dev/null @@ -1,94 +0,0 @@ -// File: OCAFSample_CommonDriver.cxx -// Created: Wed Feb 13 18:24:21 2002 -// Author: Michael KUZMITCHEV -// -//Modified by: Sergey RUIN (Naming) - -#include "stdafx.h" - -#include -#include -#include - -#include "Tags.h" - -#include -#include -#include -#include -#include -#include - -#include - -#include -//#include <.hxx> - -#include - -#define OK_OPERATION 0 -#define TREENODE_NOT_FOUND 1 -#define LABEL_NOT_FOUND 2 -#define NAMED_SHAPE_NOT_FOUND 3 -#define NAMED_SHAPE_EMPTY 4 -#define OPERATION_NOT_DONE 8 -#define NULL_OPERATION 9 - -// OCCT RTTI -IMPLEMENT_STANDARD_RTTIEXT (OCAFSample_CommonDriver, OCAFSample_Driver) - -//======================================================================= -//function : Constructor -//purpose : -//======================================================================= - -OCAFSample_CommonDriver::OCAFSample_CommonDriver() -{ -} - -//======================================================================= -//function : Execute -//purpose : -//======================================================================= - -Standard_Integer OCAFSample_CommonDriver::Execute(Handle(TFunction_Logbook)& theLogbook) const -{ - Handle(TDF_Reference) aReference; - TopoDS_Shape aMaster, aTool; - - Handle(TDataStd_TreeNode) aNode; - if(!Label().FindAttribute(TDataStd_TreeNode::GetDefaultTreeID(), aNode)) return TREENODE_NOT_FOUND; - - OCAFSample_ICommon anInterface(aNode); - aMaster = anInterface.GetContext(); - aTool = anInterface.GetTool(); - - BRepAlgoAPI_Common mkCommon(aMaster, aTool); - if (!mkCommon.IsDone()) return OPERATION_NOT_DONE; - if (mkCommon.Shape().IsNull()) return NULL_OPERATION; - if (!BRepAlgo::IsValid(mkCommon.Shape())) - return OPERATION_NOT_DONE; - - - // Name result - TDF_Label ResultLabel = Label().FindChild(RESULTS_TAG); - - BRepNaming_Common aNaming(ResultLabel); - aNaming.Load(mkCommon); - - OCAFSample_IShape::AddLabels(aNode, theLogbook); - - TDocStd_Modified::Add(aNode->Father()->Label()); - - theLogbook->SetImpacted(Label()); - TDocStd_Modified::Add(Label()); - - theLogbook->SetImpacted(ResultLabel); - - TDF_ChildIterator anIterator(ResultLabel); - for(; anIterator.More(); anIterator.Next()) { - theLogbook->SetImpacted(anIterator.Value()); - } - - return OK_OPERATION; -} diff --git a/samples/mfc/standard/06_Ocaf/src/OCAFSample_CommonDriver.hxx b/samples/mfc/standard/06_Ocaf/src/OCAFSample_CommonDriver.hxx deleted file mode 100755 index cc88a0a3b4..0000000000 --- a/samples/mfc/standard/06_Ocaf/src/OCAFSample_CommonDriver.hxx +++ /dev/null @@ -1,37 +0,0 @@ -// File generated by CPPExt (Transient) -// -// Copyright (C) 1991,1995 by -// -// MATRA DATAVISION, FRANCE -// -// This software is furnished in accordance with the terms and conditions -// of the contract and with the inclusion of the above copyright notice. -// This software or any other copy thereof may not be provided or otherwise -// be made available to any other person. No title to an ownership of the -// software is hereby transferred. -// -// At the termination of the contract, the software and all copies of this -// software must be deleted. -// -#ifndef _OCAFSample_CommonDriver_HeaderFile -#define _OCAFSample_CommonDriver_HeaderFile - -#include -#include - -class TFunction_Logbook; - - -class OCAFSample_CommonDriver : public OCAFSample_Driver -{ -public: - - Standard_EXPORT OCAFSample_CommonDriver (); - Standard_EXPORT virtual Standard_Integer Execute (Handle (TFunction_Logbook)& theLogbook) const; - Standard_EXPORT ~OCAFSample_CommonDriver (); - - // OCCT RTTI - DEFINE_STANDARD_RTTIEXT (OCAFSample_CommonDriver, OCAFSample_Driver) -}; - -#endif diff --git a/samples/mfc/standard/06_Ocaf/src/OCAFSample_Driver.hxx b/samples/mfc/standard/06_Ocaf/src/OCAFSample_Driver.hxx deleted file mode 100755 index fc6d35edc0..0000000000 --- a/samples/mfc/standard/06_Ocaf/src/OCAFSample_Driver.hxx +++ /dev/null @@ -1,44 +0,0 @@ -// File generated by CPPExt (Transient) -// -// Copyright (C) 1991,1995 by -// -// MATRA DATAVISION, FRANCE -// -// This software is furnished in accordance with the terms and conditions -// of the contract and with the inclusion of the above copyright notice. -// This software or any other copy thereof may not be provided or otherwise -// be made available to any other person. No title to an ownership of the -// software is hereby transferred. -// -// At the termination of the contract, the software and all copies of this -// software must be deleted. -// -#ifndef _OCAFSample_Driver_HeaderFile -#define _OCAFSample_Driver_HeaderFile - -#include -#include -#include - -class TFunction_Logbook; - -class OCAFSample_Driver : public TFunction_Driver -{ -public: - - Standard_EXPORT void Validate (TFunction_Logbook& log) const; - Standard_EXPORT virtual Standard_Boolean MustExecute (const Handle (TFunction_Logbook)& log) const; - Standard_EXPORT virtual Standard_Integer Execute (Handle (TFunction_Logbook)& log) const; - Standard_EXPORT virtual Standard_Boolean Arguments (TDF_LabelMap& theArgs) const; - Standard_EXPORT virtual Standard_Boolean Results (TDF_LabelMap& theRes) const; - Standard_EXPORT ~OCAFSample_Driver (); - - // OCCT RTTI - DEFINE_STANDARD_RTTIEXT(OCAFSample_Driver,TFunction_Driver) - -protected: - - Standard_EXPORT OCAFSample_Driver (); -}; - -#endif diff --git a/samples/mfc/standard/06_Ocaf/src/OcafApp.cpp b/samples/mfc/standard/06_Ocaf/src/OcafApp.cpp deleted file mode 100755 index ff43d3c36e..0000000000 --- a/samples/mfc/standard/06_Ocaf/src/OcafApp.cpp +++ /dev/null @@ -1,153 +0,0 @@ -// OcafApp.cpp : Defines the class behaviors for the application. -// - -#include "StdAfx.h" - -#include "OcafApp.h" - -#include "OcafMainFrm.h" -#include -#include "OcafDoc.h" -#include - -#include "direct.h" -#include - -#include -#include - -///////////////////////////////////////////////////////////////////////////// -// COcafApp - -BEGIN_MESSAGE_MAP(COcafApp, CWinApp) - //{{AFX_MSG_MAP(COcafApp) - ON_COMMAND(ID_APP_ABOUT, OnAppAbout) - // NOTE - the ClassWizard will add and remove mapping macros here. - // DO NOT EDIT what you see in these blocks of generated code! - //}}AFX_MSG_MAP - // Standard file based document commands - ON_COMMAND(ID_FILE_NEW, CWinApp::OnFileNew) - ON_COMMAND(ID_FILE_OPEN, OnFileOpen) -// ON_COMMAND(ID_FILE_OPEN, CWinApp::OnFileOpen) -END_MESSAGE_MAP() - -///////////////////////////////////////////////////////////////////////////// - -///////////////////////////////////////////////////////////////////////////// -// COcafApp construction - -COcafApp::COcafApp() : OCC_App() -{ - myApp = new TOcaf_Application(); - SampleName = "OCAF"; //for about dialog - SetSamplePath (L"..\\..\\06_Ocaf"); - - // load persistence - BinDrivers::DefineFormat (myApp); - XmlDrivers::DefineFormat (myApp); - - try - { - UnitsAPI::SetLocalSystem(UnitsAPI_MDTV); - } - catch (Standard_Failure) - { - AfxMessageBox (L"Fatal Error in units initialisation"); - } -} - -///////////////////////////////////////////////////////////////////////////// -// The one and only COcafApp object - -COcafApp theApp; - -///////////////////////////////////////////////////////////////////////////// -// COcafApp initialization - -BOOL COcafApp::InitInstance() -{ - AfxEnableControlContainer(); - - // Standard initialization - // If you are not using these features and wish to reduce the size - // of your final executable, you should remove from the following - // the specific initialization routines you do not need. - - // Change the registry key under which our settings are stored. - // You should modify this string to be something appropriate - // such as the name of your company or organization. - // Modified by CasCade : - SetRegistryKey(_T("Local CasCade Applications")); - - LoadStdProfileSettings(); // Load standard INI file options (including MRU) - - // Register the application's document templates. Document templates - // serve as the connection between documents, frame windows and views. - - pDocTemplateForView3d = new CMultiDocTemplate( - IDR_3DTYPE, - RUNTIME_CLASS(COcafDoc), - RUNTIME_CLASS(OCC_3dChildFrame), - RUNTIME_CLASS(OCC_3dView)); - AddDocTemplate(pDocTemplateForView3d); - - // create main MDI Frame window - OcafMainFrame* pMainFrame = new OcafMainFrame; - if (!pMainFrame->LoadFrame(IDR_MAINFRAME)) - return FALSE; - m_pMainWnd = pMainFrame; - - // Parse command line for standard shell commands, DDE, file open - CCommandLineInfo cmdInfo; - ParseCommandLine(cmdInfo); - - // Dispatch commands specified on the command line - if (!ProcessShellCommand(cmdInfo)) - return FALSE; - - // The main window has been initialized, so show and update it. - pMainFrame->ShowWindow(m_nCmdShow); - pMainFrame->UpdateWindow(); - - return TRUE; -} - -///////////////////////////////////////////////////////////////////////////// -// COcafApp commands - -BOOL COcafApp::IsViewExisting(CDocument * pDoc, CRuntimeClass * pViewClass, CView * & pView) -{ - ASSERT_VALID(pDoc); - ASSERT(pViewClass != (CRuntimeClass *)NULL ); - - POSITION position = pDoc->GetFirstViewPosition(); - while (position != (POSITION)NULL) - { - CView* pCurrentView = pDoc->GetNextView(position); - ASSERT_VALID(pCurrentView); - if (pCurrentView->IsKindOf(pViewClass)) - { - pView = pCurrentView; - return TRUE; - } - } - return FALSE; -} - -///////////////////////////////////////////////////////////////////////////// -// COCcafApp message handlers - -//================================================================ -// Function : COcafApp::OnFileOpen() -// Purpose : -//================================================================ -void COcafApp::OnFileOpen() -{ - CFileDialog aDlg(TRUE, NULL, NULL, OFN_FILEMUSTEXIST|OFN_HIDEREADONLY, - L"OCAFSample(Binary) (*.cbf)|*.cbf|OCAFSample(XML) (*.xml)|*.xml||"); - - if (aDlg.DoModal() != IDOK) - return; - - OpenDocumentFile (aDlg.GetPathName()); -} diff --git a/samples/mfc/standard/06_Ocaf/src/OcafApp.h b/samples/mfc/standard/06_Ocaf/src/OcafApp.h deleted file mode 100755 index 37588967b9..0000000000 --- a/samples/mfc/standard/06_Ocaf/src/OcafApp.h +++ /dev/null @@ -1,45 +0,0 @@ -// OcafApp.h : main header file for the OCAF application -// - -#if !defined(AFX_OCAF_H__49324D74_7836_11D4_8D45_00AA00D10994__INCLUDED_) -#define AFX_OCAF_H__49324D74_7836_11D4_8D45_00AA00D10994__INCLUDED_ - -#if _MSC_VER >= 1000 -#pragma once -#endif // _MSC_VER >= 1000 - -#include -#include "OcafDoc.h" -#include - - -class COcafApp : public OCC_App -{ -public: - - COcafApp(); - -// Overrides - // ClassWizard generated virtual function overrides - //{{AFX_VIRTUAL(COcafApp) - public: - virtual BOOL InitInstance(); - //}}AFX_VIRTUAL - void OnFileOpen(); -public: - Handle(TOcaf_Application) GetApp() {return myApp;} - -private : - BOOL IsViewExisting(CDocument* pDoc,CRuntimeClass* pViewClass,CView*& pView); - -private: - - Handle(TOcaf_Application) myApp; - CMultiDocTemplate* pDocTemplateForView3d; - - DECLARE_MESSAGE_MAP() -}; - -///////////////////////////////////////////////////////////////////////////// - -#endif // !defined(AFX_OCAF_H__49324D74_7836_11D4_8D45_00AA00D10994__INCLUDED_) diff --git a/samples/mfc/standard/06_Ocaf/src/OcafDoc.cpp b/samples/mfc/standard/06_Ocaf/src/OcafDoc.cpp deleted file mode 100755 index f82218600a..0000000000 --- a/samples/mfc/standard/06_Ocaf/src/OcafDoc.cpp +++ /dev/null @@ -1,1209 +0,0 @@ -// OcafDoc.cpp : implementation of the COcafDoc class -// - -#include "StdAfx.h" - -#include "OcafDoc.h" - -#include "OcafApp.h" -#include -#include "AISDialogs.h" - -// Dialog boxes classes -#include -#include -#include - -#include - -#include - -#ifdef _DEBUG -//#define new DEBUG_NEW // by cascade -#undef THIS_FILE -static char THIS_FILE[] = __FILE__; -#endif - -///////////////////////////////////////////////////////////////////////////// -// COcafDoc - -IMPLEMENT_DYNCREATE(COcafDoc, CDocument) - -BEGIN_MESSAGE_MAP(COcafDoc, OCC_3dBaseDoc) - //{{AFX_MSG_MAP(COcafDoc) - ON_COMMAND(ID_CREATEBOX, OnCreatebox) - ON_COMMAND(ID_EDIT_REDO, OnEditRedo) - ON_COMMAND(ID_EDIT_UNDO, OnEditUndo) - ON_UPDATE_COMMAND_UI(ID_EDIT_UNDO, OnUpdateEditUndo) - ON_COMMAND(ID_MODIFY, OnModify) - ON_UPDATE_COMMAND_UI(ID_MODIFY, OnUpdateModify) - ON_UPDATE_COMMAND_UI(ID_EDIT_REDO, OnUpdateEditRedo) - ON_COMMAND(ID_CUT, OnCut) - ON_COMMAND(ID_OBJECT_DELETE, OnObjectDelete) - ON_UPDATE_COMMAND_UI(ID_OBJECT_DELETE, OnUpdateObjectDelete) - ON_COMMAND(ID_FILE_SAVE, OnFileSave) - ON_COMMAND(ID_FILE_SAVE_AS, OnFileSaveAs) - ON_COMMAND(ID_CREATECYL, OnCreatecyl) -// ON_COMMAND(ID_DFBR, OnDfbr) - //}}AFX_MSG_MAP - -END_MESSAGE_MAP() - -///////////////////////////////////////////////////////////////////////////// -// COcafDoc construction/destruction - -COcafDoc::COcafDoc() -{ -} - -COcafDoc::~COcafDoc() -{ -} - - BOOL COcafDoc::OnNewDocument() - { - if (!CDocument::OnNewDocument()) - return FALSE; - - // Get an Handle on the current TOcaf_Application (which is initialized in the "Ocaf.h" file) - Handle(TOcaf_Application) OcafApp = ((COcafApp*)AfxGetApp())->GetApp(); - - // Create a new Ocaf document - OcafApp->NewDocument("BinOcaf",myOcafDoc); - TPrsStd_AISViewer::New(myOcafDoc->Main(),myViewer); - - Handle(AIS_InteractiveContext) CTX; - TPrsStd_AISViewer::Find(myOcafDoc->Main(), CTX); - CTX->SetDisplayMode (AIS_Shaded, Standard_True); - myAISContext=CTX; - - // Set the maximum number of available "undo" actions - myOcafDoc->SetUndoLimit(10); - - - TCollection_AsciiString Message ("\ - // Creation of a new document \n\ - \n\ - Handle(TOcaf_Application) OcafApp= ((COcafApp*)AfxGetApp())->GetApp(); \n\ - \n\ - // Creating the new document \n\ - OcafApp->NewDocument(\"BinOcaf\", myOcafDoc); \n\ - \n\ - // Creation of a new TPrsStd_AISViewer connected to the current V3d_Viewer\n\ - TPrsStd_AISViewer::New(myOcafDoc->Main(),myViewer); \n\ - \n\ - // Setting the number of memorized undos \n\ - myOcafDoc->SetUndoLimit(10); \n\ - \n"); - - myCResultDialog.SetTitle("New document"); - CString text(Message.ToCString()); - myCResultDialog.SetText(text); - - PathName=""; - - return TRUE; - } - -void COcafDoc::ActivateFrame(CRuntimeClass* pViewClass,int nCmdShow) -{ - POSITION position = GetFirstViewPosition(); - while (position != (POSITION)NULL) - { - CView* pCurrentView = (CView*)GetNextView(position); - if(pCurrentView->IsKindOf(pViewClass) ) - { - ASSERT_VALID(pCurrentView); - CFrameWnd* pParentFrm = pCurrentView->GetParentFrame(); - ASSERT(pParentFrm != (CFrameWnd *)NULL); - // simply make the frame window visible - pParentFrm->ActivateFrame(nCmdShow); - } - } - -} - -///////////////////////////////////////////////////////////////////////////// -// COcafDoc diagnostics - -#ifdef _DEBUG -void COcafDoc::AssertValid() const -{ - CDocument::AssertValid(); -} - -void COcafDoc::Dump(CDumpContext& dc) const -{ - CDocument::Dump(dc); -} -#endif //_DEBUG - -///////////////////////////////////////////////////////////////////////////// -// COcafDoc commands - -void COcafDoc::OnEditRedo() -{ - myOcafDoc->Redo(); - myOcafDoc->CommitCommand(); - myAISContext->UpdateCurrentViewer(); - - UpdateAllViews(NULL); - - TCollection_AsciiString Message = TCollection_AsciiString("\ -// Redo last undoes operation \n\ - \n\ -myOcafDoc->Redo(); \n\ - \n\ -myOcafDoc->CommitCommand(); \n\ - \n\ -\n"); - - myCResultDialog.SetTitle("Redo"); - CString text(Message.ToCString()); - myCResultDialog.SetText(text); -} - -void COcafDoc::OnEditUndo() -{ - myOcafDoc->Undo(); - myOcafDoc->CommitCommand(); - myAISContext->UpdateCurrentViewer(); - - UpdateAllViews(NULL); - - TCollection_AsciiString Message = TCollection_AsciiString("\ -// Undo last operation \n\ - \n\ -myOcafDoc->Undo(); \n\ - \n\ -myOcafDoc->CommitCommand(); \n\ - \n\ -\n"); - - myCResultDialog.SetTitle("Undo"); - CString text(Message.ToCString()); - myCResultDialog.SetText(text); -} - -void COcafDoc::OnUpdateEditRedo(CCmdUI* pCmdUI) -{ - // Disable the "redo" button if there is no availlables redo actions - if (myOcafDoc->GetAvailableRedos()>0) pCmdUI->Enable(Standard_True); - else pCmdUI->Enable(Standard_False); -} - -void COcafDoc::OnUpdateEditUndo(CCmdUI* pCmdUI) -{ - // Disable the "undo" button if there is no availlables undo actions - if (myOcafDoc->GetAvailableUndos()>0) pCmdUI->Enable(Standard_True); - else pCmdUI->Enable(Standard_False); -} - -void COcafDoc::OnCreatebox() -{ - EraseAll(); - CNewBoxDlg Dlg; - if(Dlg.DoModal()!=IDOK) return; - - Handle(TDocStd_Document) D = GetOcafDoc(); - - // Open a new command (for undo) - D->NewCommand(); - TOcaf_Commands TSC(D->Main()); - - // Create a new box using the CNewBoxDlg Dialog parameters as attributes - TDF_Label L = TSC.CreateBox (Dlg.m_x, Dlg.m_y, Dlg.m_z, Dlg.m_w, Dlg.m_l, Dlg.m_h, - TCollection_ExtendedString ((const wchar_t* )Dlg.m_Name)); - - // Get the TPrsStd_AISPresentation of the new box TNaming_NamedShape - Handle(TPrsStd_AISPresentation) prs= TPrsStd_AISPresentation::Set(L, TNaming_NamedShape::GetID()); - // Display it - prs->Display(1); - Fit3DViews(); - // Attach an integer attribute to L to memorize it's displayed - TDataStd_Integer::Set(L, 1); - myAISContext->UpdateCurrentViewer(); - - // Close the command (for undo) - D->CommitCommand(); - - - TCollection_AsciiString Message ("\ -// Creation of a new box using Ocaf attributes \n\ - \n\ -Handle(TDocStd_Document) D = GetOcafDoc(); \n\ - \n\ -// Opening a new command (for undo/redo) \n\ -D->NewCommand(); \n\ - \n\ -TOcaf_Commands TSC(D->Main()); \n\ -// Look at the TOcaf_Commands::CreateBox() function \n\ -TDF_Label L=TSC.CreateBox(m_x, m_y, m_z, m_w, m_l, m_h, Name); \n\ - \n\ -// Set the TPrsStd_AISPresentation of the box \n\ -Handle(TPrsStd_AISPresentation) prs; \n\ -prs= TPrsStd_AISPresentation::Set(L, TNaming_NamedShape::GetID()); \n\ - \n\ -// Displaying the box \n\ -prs->Display(1); \n\ - \n\ -// Commint the command (for undo/redo) \n\ -D->CommitCommand(); \n\ -\n"); - - myCResultDialog.SetTitle("Create box"); - CString text(Message.ToCString()); - myCResultDialog.SetText(text); -} - -void COcafDoc::OnCreatecyl() -{ - EraseAll(); - CNewCylDlg Dlg; - if(Dlg.DoModal()!=IDOK) return; - - Handle(TDocStd_Document) D = GetOcafDoc(); - - // Open a new command (for undo) - D->NewCommand(); - TOcaf_Commands TSC(D->Main()); - - // Create a new box using the CNewCylDlg Dialog parameters as attributes - TDF_Label L = TSC.CreateCyl (Dlg.m_x, Dlg.m_y, Dlg.m_z, Dlg.m_r, Dlg.m_h, - TCollection_ExtendedString ((const wchar_t* )Dlg.m_Name)); - - // Get the TPrsStd_AISPresentation of the new cylinder TNaming_NamedShape - Handle(TPrsStd_AISPresentation) prs= TPrsStd_AISPresentation::Set(L, TNaming_NamedShape::GetID()); - // Display it - prs->Display(1); - Fit3DViews(); - // Attach an integer attribute to L to memorize it's displayed - TDataStd_Integer::Set(L, 1); - myAISContext->UpdateCurrentViewer(); - - // Close the command (for undo) - D->CommitCommand(); - - - TCollection_AsciiString Message ("\ -// Creation of a new cylinder using Ocaf attributes \n\ - \n\ -Handle(TDocStd_Document) D = GetOcafDoc(); \n\ - \n\ -// Opening a new command (for undo/redo) \n\ -D->NewCommand(); \n\ - \n\ -TOcaf_Commands TSC(D->Main()); \n\ -// Look at the TOcaf_Commands::CreateCyl() function \n\ -TDF_Label L=TSC.CreateCyl(m_x, m_y, m_z, m_r, m_h, Name); \n\ - \n\ -// Set the TPrsStd_AISPresentation of the cylinder \n\ -Handle(TPrsStd_AISPresentation) prs; \n\ -prs= TPrsStd_AISPresentation::Set(L, TNaming_NamedShape::GetID()); \n\ - \n\ -// Displaying the cylinder \n\ -prs->Display(1); \n\ - \n\ -// Commint the command (for undo/redo) \n\ -D->CommitCommand(); \n\ -\n"); - - myCResultDialog.SetTitle("Create cylinder"); - CString text(Message.ToCString()); - myCResultDialog.SetText(text); -} - -void COcafDoc::OnModify() -{ - // Get the selected interactive object - myAISContext->InitSelected(); - Handle(AIS_InteractiveObject) curAISObject = myAISContext->SelectedInteractive(); - - - // Get the main label of the selected object - Handle(TPrsStd_AISPresentation) ObjectPrs = - Handle(TPrsStd_AISPresentation)::DownCast(curAISObject->GetOwner()); - TDF_Label LabObject = ObjectPrs->Label(); - - // Get the TFunction_Function attribute of the selected object - Handle(TFunction_Function) TFF; - if ( !LabObject.FindAttribute(TFunction_Function::GetID(),TFF) ) - { - MessageBoxW (AfxGetApp()->m_pMainWnd->m_hWnd, L"Object cannot be modify.", L"Modification", MB_ICONEXCLAMATION); - return; - } - // Get the Standard_GUID of the TFunction_FunctionDriver of the selected object TFunction_Function attribute - Standard_GUID myDriverID=TFF->GetDriverGUID(); - - Handle(TDocStd_Document) D = GetOcafDoc(); - Handle(TFunction_Logbook) log = TFunction_Logbook::Set(D->Main()); - - TCollection_AsciiString Message("\ -// Modification and recomputation of the selected object \n\ - \n\ -Handle(TDocStd_Document) D = GetOcafDoc(); \n\ - \n\ -// Getting the TPrsStd_AISPresentation of the selected object \n\ -Handle(TPrsStd_AISPresentation) ObjectPrs = \n\ - Handle(TPrsStd_AISPresentation)::DownCast(curAISObject->GetOwner()); \n\ - \n\ -// Getting the Label of the selected object using the TPrsStd_AISPresentation \n\ -TDF_Label LabObject = ObjectPrs->Label(); \n\ - \n\ -// Getting the TFunction_FunctionDriver ID attached to this label \n\ -Handle(TFunction_Function) TFF; \n\ -\n"); - TCollection_AsciiString Suite; - - // Case of a box created with the box function driver - if(myDriverID==TOcafFunction_BoxDriver::GetID()) - { - CNewBoxDlg Dlg; - Standard_Real x, y, z, w, l, h; - - // Get the attributes values of the current box - Handle(TDataStd_Real) curReal; - LabObject.FindChild(1).FindAttribute(TDataStd_Real::GetID(),curReal); - w=curReal->Get(); - LabObject.FindChild(2).FindAttribute(TDataStd_Real::GetID(),curReal); - l=curReal->Get(); - LabObject.FindChild(3).FindAttribute(TDataStd_Real::GetID(),curReal); - h=curReal->Get(); - LabObject.FindChild(4).FindAttribute(TDataStd_Real::GetID(),curReal); - x=curReal->Get(); - LabObject.FindChild(5).FindAttribute(TDataStd_Real::GetID(),curReal); - y=curReal->Get(); - LabObject.FindChild(6).FindAttribute(TDataStd_Real::GetID(),curReal); - z=curReal->Get(); - Handle(TDataStd_Name) stdName; - LabObject.FindAttribute(TDataStd_Name::GetID(),stdName); - - // Initialize the dialog box with the values of the current box - Dlg.InitFields(x, y, z, w, l, h, stdName->Get()); - - if(Dlg.DoModal()!=IDOK) return; - - // Open a new command (for undo) - D->NewCommand(); - - // Modify the box - TOcaf_Commands TSC(LabObject); - TSC.ModifyBox (Dlg.m_x, Dlg.m_y, Dlg.m_z, Dlg.m_w, Dlg.m_l, Dlg.m_h, - TCollection_ExtendedString ((const wchar_t* )Dlg.m_Name), log); - - // Get the presentation of the box, display it and set it selected - Handle(TPrsStd_AISPresentation) prs= TPrsStd_AISPresentation::Set(LabObject, TNaming_NamedShape::GetID()); - TDataStd_Integer::Set(LabObject, 1); - prs->Display(1); - myAISContext->UpdateCurrentViewer(); - // Close the command (for undo) - D->CommitCommand(); - - Message+=("\ - \n\ -// In this case the TFunction_FunctionDriver ID is a BoxDriver \n\ -if(myDriverID==TOcafFunction_BoxDriver::GetID()){ \n\ - \n\ -// Getting values of box attributes \n\ -Handle(TDataStd_Real) curReal; \n\ -LabObject.FindChild(1).FindAttribute(TDataStd_Real::GetID(),curReal); \n\ -w=curReal->Get(); \n\ -LabObject.FindChild(2).FindAttribute(TDataStd_Real::GetID(),curReal); \n\ -l=curReal->Get(); \n\ -LabObject.FindChild(3).FindAttribute(TDataStd_Real::GetID(),curReal); \n\ -h=curReal->Get(); \n\ -LabObject.FindChild(4).FindAttribute(TDataStd_Real::GetID(),curReal); \n\ -x=curReal->Get(); \n\ -LabObject.FindChild(5).FindAttribute(TDataStd_Real::GetID(),curReal); \n\ -y=curReal->Get(); \n\ -LabObject.FindChild(6).FindAttribute(TDataStd_Real::GetID(),curReal); \n\ -z=curReal->Get(); \n\ -Handle(TDataStd_Name) stdName; \n\ -LabObject.FindAttribute(TDataStd_Name::GetID(),stdName); \n\ - \n\ -// Opening a new command \n\ -D->NewCommand(); \n\ - \n\ -TOcaf_Commands TSC(LabObject); \n\ -// Look at the TOcaf_Commands::ModifyBox() function \n\ -TSC.ModifyBox(m_x, m_y, m_z, m_w, m_l, m_h, Name); \n\ - \n\ -// Set the TPrsStd_AISPresentation of the box \n\ -Handle(TPrsStd_AISPresentation) prs; \n\ -prs= TPrsStd_AISPresentation::Set(LabObject, TNaming_NamedShape::GetID()); \n\ - \n\ -// Display the box \n\ -prs->Display(1); \n\ - \n\ -// Commit the command \n\ -D->CommitCommand(); \n\ -} \n\ -\n"); - - myCResultDialog.SetTitle("Modify Box"); - } - // Case of a cylinder created with the box function driver - else if(myDriverID==TOcafFunction_CylDriver::GetID()) - { - CNewCylDlg Dlg; - Standard_Real x, y, z, r, h; - - // Get the attributes values of the current box - Handle(TDataStd_Real) curReal; - LabObject.FindChild(1).FindAttribute(TDataStd_Real::GetID(),curReal); - r=curReal->Get(); - LabObject.FindChild(2).FindAttribute(TDataStd_Real::GetID(),curReal); - h=curReal->Get(); - LabObject.FindChild(3).FindAttribute(TDataStd_Real::GetID(),curReal); - x=curReal->Get(); - LabObject.FindChild(4).FindAttribute(TDataStd_Real::GetID(),curReal); - y=curReal->Get(); - LabObject.FindChild(5).FindAttribute(TDataStd_Real::GetID(),curReal); - z=curReal->Get(); - Handle(TDataStd_Name) stdName; - LabObject.FindAttribute(TDataStd_Name::GetID(),stdName); - - // Initialize the dialog cylinder with the values of the current cylinder - Dlg.InitFields(x, y, z, r, h, stdName->Get()); - - if(Dlg.DoModal()!=IDOK) return; - - // Open a new command (for undo) - D->NewCommand(); - - // Modify the cylinder - TOcaf_Commands TSC(LabObject); - TSC.ModifyCyl (Dlg.m_x, Dlg.m_y, Dlg.m_z, Dlg.m_r, Dlg.m_h, - TCollection_ExtendedString ((const wchar_t* )Dlg.m_Name), log); - - // Get the presentation of the cylinder, display it and set it selected - Handle(TPrsStd_AISPresentation) prs= TPrsStd_AISPresentation::Set(LabObject, TNaming_NamedShape::GetID()); - TDataStd_Integer::Set(LabObject, 1); - prs->Display(1); - myAISContext->UpdateCurrentViewer(); - // Close the command (for undo) - D->CommitCommand(); - - Message+=("\ - \n\ -// In this case the TFunction_FunctionDriver ID is a CylDriver \n\ -if(myDriverID==TOcafFunction_CylDriver::GetID()){ \n\ - \n\ -// Getting values of box cylinder \n\ -Handle(TDataStd_Real) curReal; \n\ -LabObject.FindChild(1).FindAttribute(TDataStd_Real::GetID(),curReal); \n\ -r=curReal->Get(); \n\ -LabObject.FindChild(2).FindAttribute(TDataStd_Real::GetID(),curReal); \n\ -h=curReal->Get(); \n\ -LabObject.FindChild(3).FindAttribute(TDataStd_Real::GetID(),curReal); \n\ -x=curReal->Get(); \n\ -LabObject.FindChild(4).FindAttribute(TDataStd_Real::GetID(),curReal); \n\ -y=curReal->Get(); \n\ -LabObject.FindChild(5).FindAttribute(TDataStd_Real::GetID(),curReal); \n\ -z=curReal->Get(); \n\ -Handle(TDataStd_Name) stdName; \n\ -LabObject.FindAttribute(TDataStd_Name::GetID(),stdName); \n\ - \n\ -// Opening a new command \n\ -D->NewCommand(); \n\ - \n\ -TOcaf_Commands TSC(LabObject); \n\ -// Look at the TOcaf_Commands::ModifyCyl() function \n\ -TSC.ModifyCyl(m_x, m_y, m_z, m_r, m_h, Name); \n\ - \n\ -// Set the TPrsStd_AISPresentation of the cylinder \n\ -Handle(TPrsStd_AISPresentation) prs; \n\ -prs= TPrsStd_AISPresentation::Set(LabObject, TNaming_NamedShape::GetID()); \n\ - \n\ -// Display the cylinder \n\ -prs->Display(1); \n\ - \n\ -// Commit the command \n\ -D->CommitCommand(); \n\ -} \n\ -\n"); - - myCResultDialog.SetTitle("Modify cylinder"); - } - // Case of a cut solid created with the cut function driver - else if(myDriverID==TOcafFunction_CutDriver::GetID()) - { - // Open a new command (for undo) - D->NewCommand(); - - // Get the reference of the Original object used to make the cut object, - // this reference is here attached to the first child of the cut object label - Handle(TDF_Reference) OriginalRef; - LabObject.FindChild(1).FindAttribute(TDF_Reference::GetID(),OriginalRef); - - // Get the presentation of the Original object - Handle(TPrsStd_AISPresentation) OriginalPrs= TPrsStd_AISPresentation::Set(OriginalRef->Get(), TNaming_NamedShape::GetID()); - - // Get the reference of the Tool object used to make the cut object, - // this reference is here attached to the second child of the cut object label - Handle(TDF_Reference) ToolRef; - LabObject.FindChild(2).FindAttribute(TDF_Reference::GetID(),ToolRef); - TDF_Label ToolLab=ToolRef->Get(); - - - // Get the presentation of the Tool object - Handle(TPrsStd_AISPresentation) ToolPrs= TPrsStd_AISPresentation::Set(ToolLab, TNaming_NamedShape::GetID()); - - // Display the Original object and the Tool object, erase the cut object. - TDataStd_Integer::Set(OriginalRef->Get(), 1); - OriginalPrs->Display(1); - TDataStd_Integer::Set(ToolLab, 1); - ToolPrs->Display(1); - TDataStd_Integer::Set(LabObject, 0); - ObjectPrs->Erase(1); - myAISContext->UpdateCurrentViewer(); - - // In this we decided to modify the tool object which is a cylinder, - // so we open the cylinder parameters dialog box - CNewCylDlg Dlg; - Standard_Real x, y, z, h, r; - - // Get the attributes values of the tool cylinder - Handle(TDataStd_Real) curReal; - ToolLab.FindChild(1).FindAttribute(TDataStd_Real::GetID(),curReal); - r=curReal->Get(); - ToolLab.FindChild(2).FindAttribute(TDataStd_Real::GetID(),curReal); - h=curReal->Get(); - ToolLab.FindChild(3).FindAttribute(TDataStd_Real::GetID(),curReal); - x=curReal->Get(); - ToolLab.FindChild(4).FindAttribute(TDataStd_Real::GetID(),curReal); - y=curReal->Get(); - ToolLab.FindChild(5).FindAttribute(TDataStd_Real::GetID(),curReal); - z=curReal->Get(); - Handle(TDataStd_Name) stdName; - ToolLab.FindAttribute(TDataStd_Name::GetID(),stdName); - - // Initialize the dialog box with the values of the tool cylinder - Dlg.InitFields(x, y, z, r, h, stdName->Get()); - - if(Dlg.DoModal()!=IDOK) - { - D->AbortCommand(); - myAISContext->UpdateCurrentViewer(); - return; - } - - // Modify the cylinder - TOcaf_Commands ToolTSC(ToolLab); - ToolTSC.ModifyCyl (Dlg.m_x, Dlg.m_y, Dlg.m_z, Dlg.m_r, Dlg.m_h, - TCollection_ExtendedString ((const wchar_t* )Dlg.m_Name), log); - - // Redisplay the modified Tool object - TDataStd_Integer::Set(ToolLab, 1); - ToolPrs->Display(1); - myAISContext->UpdateCurrentViewer(); - Sleep(1000); - - // Get the TOcafFunction_CutDriver using its Standard_GUID in the TFunction_DriverTable - Handle(TFunction_Driver) myCutDriver; - if (TFunction_DriverTable::Get()->FindDriver(myDriverID, myCutDriver)) - myCutDriver->Init(LabObject); - - // Recompute the cut object if it must be (look at the MustExecute function code) -// if (myCutDriver->MustExecute(log)) -// { - log->SetTouched(LabObject); - if(myCutDriver->Execute(log)) - MessageBoxW (AfxGetApp()->m_pMainWnd->m_hWnd, L"Recompute failed", L"Modify cut", MB_ICONEXCLAMATION); -// } - - // Erase the Original object and the Tool objectedisplay the modified Tool object - TDataStd_Integer::Set(ToolLab, 0); - ToolPrs->Erase(0); - TDataStd_Integer::Set(OriginalRef->Get(), 0); - OriginalPrs->Erase(0); - ObjectPrs=TPrsStd_AISPresentation::Set(LabObject, TNaming_NamedShape::GetID()); - TDataStd_Integer::Set(LabObject, 1); - ObjectPrs->Display(1); - myAISContext->UpdateCurrentViewer(); - // Close the command (for undo) - D->CommitCommand(); - - Message+=("\ - \n\ -// In this case the TFunction_FunctionDriver ID is a CutDriver \n\ -if(myDriverID==TOcafFunction_CutDriver::GetID()){ \n\ - \n\ -// Getting values of cut attributes (which are reference to the shapes)\n\ -Handle(TDF_Reference) OriginalRef; \n\ -LabObject.FindChild(1).FindAttribute(TDF_Reference::GetID(),OriginalRef); \n\ -Handle(TDF_Reference) ToolRef; \n\ -LabObject.FindChild(2).FindAttribute(TDF_Reference::GetID(),ToolRef); \n\ - \n\ -// Getting the label of the tool shape (to modify it)\n\ -TDF_Label ToolLab=ToolRef->Get(); \n\ - \n\ -TOcaf_Commands TSC(ToolLab); \n\ -// Look at the TOcaf_Commands::ModifyBox() function \n\ -TSC.ModifyBox(m_x, m_y, m_z, m_w, m_l, m_h, Name); \n\ - \n\ -// Getting the TOcafFunction_CutDriver used to create the cut\n\ -Handle(TFunction_Driver) myCutDriver; \n\ -TFunction_DriverTable::Get()->FindDriver(myDriverID, myCutDriver); \n\ - \n\ -// Recompute the cut if it must be (if an attribute was modified)\n\ -if (myCutDriver->MustExecute(log)) { \n\ - log.SetTouched(LabObject); \n\ - myCutDriver->Execute(log) \n\ -} \n\ -Handle(TPrsStd_AISPresentation) prs; \n\ - \n\ -// Setting the TPrsStd_AISPresentation of the cut object\n\ -prs= TPrsStd_AISPresentation::Set(LabObject, TNaming_NamedShape::GetID()); \n\ - \n\ -// Display the TPrsStd_AISPresentation of the cut object\n\ -prs->Display(1); \n\ - \n\ -// Commit the command\n\ -D->CommitCommand(); \n\ -} \n\ -\n"); - - myCResultDialog.SetTitle("Modify Cut"); - } - else - { - MessageBoxW (AfxGetApp()->m_pMainWnd->m_hWnd, L"No associated function driver", L"Modify", MB_OK); - } - - CString text(Message.ToCString()); - myCResultDialog.SetText(text); -} - -void COcafDoc::OnUpdateModify(CCmdUI* pCmdUI) -{ - // Disable the "modify" button if there is no selected object or several selected objects - myAISContext->InitSelected(); - if(myAISContext->NbSelected()!=1) - { - pCmdUI->Enable(Standard_False); - return; - } - - // Get the root label of the selected object using its TPrsStd_AISPresentation - myAISContext->InitSelected(); - Handle(TPrsStd_AISPresentation) ObjectPrs = - Handle(TPrsStd_AISPresentation)::DownCast(myAISContext->SelectedInteractive()->GetOwner()); - if (!ObjectPrs.IsNull()){ - TDF_Label LabObject = ObjectPrs->Label(); - - - // Disable the "modify" button if selected object don't have a TFunction_Function attribute - Handle(TFunction_Function) TFF; - pCmdUI->Enable(LabObject.FindAttribute(TFunction_Function::GetID(),TFF) ); - } - else - pCmdUI->Enable(FALSE); -} - - -void COcafDoc::OnCut() -{ - EraseAll(); - Handle(TDocStd_Document) D = GetOcafDoc(); - TDF_Label L = D->Main(); - - TOcaf_Commands TSC(L); - - // Open a new command (for undo) - D->NewCommand(); - - // Create a new cyl (10*20 dimensions) - TDF_Label L2=TSC.CreateCyl(0, 10, -10, 5, 80, "Cylinder"); - Handle(TPrsStd_AISPresentation) prs1= TPrsStd_AISPresentation::Set(L2, TNaming_NamedShape::GetID()); - prs1->SetColor(Quantity_NOC_MATRABLUE); - TDataStd_Integer::Set(L2, 1); - prs1->Display(1); - Fit3DViews(); - - // Wait a second to see the construction - Sleep(500); - - // Create a new box (20*20*20 dimensions, at the (-12,0,10) position) - TDF_Label L1=TSC.CreateBox(-12, 0, 10, 20, 30, 40, "Box"); - Handle(TPrsStd_AISPresentation) prs2= TPrsStd_AISPresentation::Set(L1, TNaming_NamedShape::GetID()); - prs2->SetColor(Quantity_NOC_YELLOW); - TDataStd_Integer::Set(L1, 1); - prs2->Display(1); - Fit3DViews(); - - Sleep(1000); - - // Cut the boxes - L=TSC.Cut(L1, L2); - Handle(TPrsStd_AISPresentation) prs= TPrsStd_AISPresentation::Set(L, TNaming_NamedShape::GetID()); - - // Erase the two boxes and display the cut object - TDataStd_Integer::Set(L1, 0); - prs1->Erase(0); - TDataStd_Integer::Set(L2, 0); - prs2->Erase(0); - TDataStd_Integer::Set(L, 1); - prs->Display(1); - myAISContext->UpdateCurrentViewer(); - - // Close the cut operation command (for undo) - D->CommitCommand(); - - - TCollection_AsciiString Message ("\ -// Cut operation between a cylinder and a box \n\ - \n\ -Handle(TDocStd_Document) D = GetOcafDoc(); \n\ -TDF_Label L = D->Main(); \n\ - \n\ -// Opening a new command\n\ -D->NewCommand(); \n\ - \n\ -TOcaf_Commands TSC(D->Main()); \n\ - \n\ -// Create a box \n\ -// Look at the TOcaf_Commands::CreateBox() function \n\ -TDF_Label L1=TSC.CreateBox(-12, 0, 10, 24, 20, 20, '\"'Box'\"'); \n\ -// Look at the TOcaf_Commands::Cut() function \n\ - \n\ -// Create a cylinder \n\ -// Look at the TOcaf_Commands::CreateCyl() function \n\ -// Create two boxes \n\ -TDF_Label L2=TSC.CreateCyl(0, 0, 0, 10, 20, '\"'Cylinder'\"'); \n\ - \n\ -// Cut the cylinder with the box \n\ -L=TSC.Cut(L1, L2); \n\ -Handle(TPrsStd_AISPresentation) prs; \n\ - \n\ -// Setting the TPrsStd_AISPresentation of the cut object\n\ -prs= TPrsStd_AISPresentation::Set(L, TNaming_NamedShape::GetID()); \n\ - \n\ -// Displaying the TPrsStd_AISPresentation of the cut object\n\ -prs->Display(1); \n\ - \n\ -// Commit the command\n\ -D->CommitCommand(); \n\ -\n"); - - myCResultDialog.SetTitle("Cut operation"); - CString text(Message.ToCString()); - myCResultDialog.SetText(text); -} - - -void COcafDoc::Fit3DViews() -{ - POSITION position = GetFirstViewPosition(); - while (position != (POSITION)NULL) - { - CView* pCurrentView = (CView*)GetNextView(position); - if(pCurrentView->IsKindOf( RUNTIME_CLASS( OCC_3dView ) ) ) - { - ASSERT_VALID(pCurrentView); - OCC_3dView* aOCC_3dView = (OCC_3dView*)pCurrentView; - aOCC_3dView->FitAll(); - } - } - -} - -void COcafDoc::OnObjectDelete() -{ - Handle(TDocStd_Document) D = GetOcafDoc(); - - D->NewCommand(); - - AIS_ListOfInteractive aList; - for (myAISContext->InitSelected(); myAISContext->MoreSelected(); myAISContext->NextSelected()) - { - aList.Append(myAISContext->SelectedInteractive()); - } - - for (AIS_ListOfInteractive::Iterator anIter (aList); anIter.More(); anIter.Next()) - { - Handle(AIS_InteractiveObject) aPrs = anIter.Value(); - if (myAISContext->DisplayStatus (aPrs) == AIS_DS_Displayed) - { - Handle(TPrsStd_AISPresentation) CurrentPrs = Handle(TPrsStd_AISPresentation)::DownCast(aPrs->GetOwner()); - TDataStd_Integer::Set(CurrentPrs->Label(), 0); - CurrentPrs->Erase(1); - } - } - - D->CommitCommand(); - myAISContext->UpdateCurrentViewer(); - - TCollection_AsciiString Message ("\ - // Delete selected object \n\ - \n\ - Handle(TDocStd_Document) D = GetOcafDoc(); \n\ - \n\ - // Opening a new command\n\ - D->NewCommand(); \n\ - \n\ - // Getting the TPrsStd_AISPresentation of the selected object\n\ - Handle(TPrsStd_AISPresentation) CurrentPrs \n\ - =Handle(TPrsStd_AISPresentation)::DownCast(myAISContext->Current()->GetOwner()); \n\ - \n\ - // Erasing the TPrsStd_AISPresentation of the selected object\n\ - CurrentPrs->Erase(1); \n\ - \n\ - // Commit the command\n\ - D->CommitCommand(); \n\ - \n"); - - myCResultDialog.SetTitle("Delete"); - CString text(Message.ToCString()); - myCResultDialog.SetText(text); - } - - void COcafDoc::OnUpdateObjectDelete(CCmdUI* pCmdUI) - { - myAISContext->InitSelected(); - pCmdUI->Enable (myAISContext->MoreSelected()); - } - - void COcafDoc::DisplayPrs() - { - TDF_Label LabSat = myOcafDoc->Main(); - - for (TDF_ChildIterator it(LabSat); it.More(); it.Next()) - { - TDF_Label L = it.Value(); - Handle(TNaming_NamedShape) TNS; - if (!L.FindAttribute(TNaming_NamedShape::GetID(), TNS)) continue; - Handle(TDataStd_Integer) TDI; - - // To know if the object was displayed - if (L.FindAttribute(TDataStd_Integer::GetID(), TDI)) - if(!TDI->Get()) continue; - - Handle(TPrsStd_AISPresentation) prs; - if (!L.FindAttribute(TPrsStd_AISPresentation::GetID(),prs)) - prs = TPrsStd_AISPresentation::Set(L,TNaming_NamedShape::GetID()); - prs->SetColor(Quantity_NOC_ORANGE); - prs->Display(1); - } - - myAISContext->UpdateCurrentViewer(); -} - -void COcafDoc::OnCloseDocument() -{ - Handle(TOcaf_Application) OcafApp = ((COcafApp*)AfxGetApp())->GetApp(); - OcafApp->Close(myOcafDoc); - CDocument::OnCloseDocument(); -} - -void COcafDoc::OnFileSaveAs() -{ - const wchar_t* SPathName = PathName; - TCollection_ExtendedString TPathName (SPathName); - - CString Filter; - - if (TPathName.SearchFromEnd(".xml") > 0){ - Filter = "OCAFSample(XML) (*.xml)|*.xml|OCAFSample(Binary) (*.cbf)|*.cbf||"; - } else { - Filter = "OCAFSample(Binary) (*.cbf)|*.cbf|OCAFSample(XML) (*.xml)|*.xml||"; - } - - CFileDialog dlg(FALSE, - L"cbf", - GetTitle(), - OFN_HIDEREADONLY | OFN_OVERWRITEPROMPT, - Filter, - NULL ); - - - Handle(TOcaf_Application) m_App= ((COcafApp*)AfxGetApp())->GetApp(); - if (dlg.DoModal() != IDOK) return; - - SetTitle(dlg.GetFileTitle()); - - CWaitCursor aWaitCursor; - CString CSPath = dlg.GetPathName(); - - std::cout << "Save As " << CSPath << std::endl; - PathName=CSPath; - const wchar_t* SPath = CSPath; - TCollection_ExtendedString TPath (SPath); - - if (TPath.SearchFromEnd(".xml") > 0) - { - // The document must be saved in XML format - myOcafDoc->ChangeStorageFormat("XmlOcaf"); - } - else if (TPath.SearchFromEnd(".cbf") > 0) - { - // The document must be saved in binary format - myOcafDoc->ChangeStorageFormat("BinOcaf"); - } - - try - { - // Saves the document in the current application - m_App->SaveAs(myOcafDoc,TPath); - } - catch(...) - { - AfxMessageBox (L"Error! The file wasn't saved."); - return; - } -// // save the document in the current application -// m_App->SaveAs(myOcafDoc,TPath); - - SetPathName(SPath); - - TCollection_AsciiString Message = TCollection_AsciiString("\ -// Storing the document as \n\ - \n\ -Handle(TOcaf_Application) m_App= ((COcafApp*)AfxGetApp())->GetApp(); \n\ - \n\ -// Saving current OCAF document at TPath \n\ -m_App->SaveAs(myOcafDoc,(TCollection_ExtendedString) TPath); \n\ -\n"); - - myCResultDialog.SetTitle("Save a document"); - CString text(Message.ToCString()); - myCResultDialog.SetText(text); -} - -void COcafDoc::OnFileSave() -{ - Handle(TOcaf_Application) m_App= ((COcafApp*)AfxGetApp())->GetApp(); - - - if (myOcafDoc.IsNull()) - { - AfxMessageBox (L"Error during saving! Empty document."); - return; - } - - if(PathName!="") - { - const wchar_t* SPath = PathName; - TCollection_ExtendedString TPath (SPath); - - if (TPath.SearchFromEnd(".xml") > 0) - { - // The document must be saved in XML format - myOcafDoc->ChangeStorageFormat("XmlOcaf"); - } - else if (TPath.SearchFromEnd(".cbf") > 0) - { - // The document must be saved in binary format - myOcafDoc->ChangeStorageFormat("BinOcaf"); - } - - try - { - // Saves the document in the current application - m_App->SaveAs(myOcafDoc,TPath); - } - catch(...) - { - AfxMessageBox (L"Error! The file wasn't saved."); - return; - } - - TCollection_AsciiString Message = TCollection_AsciiString("\ -// Storing the document \n\ - \n\ -Handle(TOcaf_Application) m_App= ((COcafApp*)AfxGetApp())->GetApp(); \n\ - \n\ -// Saving current OCAF document at TPath \n\ -m_App->SaveAs(myOcafDoc,(TCollection_ExtendedString) TPath); \n\ -\n"); - - myCResultDialog.SetTitle("Save a document"); - CString text(Message.ToCString()); - myCResultDialog.SetText(text); - return; - } - - CFileDialog dlg(FALSE, - L"cbf", - GetTitle(), - OFN_HIDEREADONLY | OFN_OVERWRITEPROMPT, - L"OCAFSample(Binary) (*.cbf)|*.cbf|OCAFSample(XML) (*.xml)|*.xml||", - NULL ); - - if (dlg.DoModal() != IDOK) return; - - SetTitle(dlg.GetFileTitle()); - - CWaitCursor aWaitCursor; - CString CSPath = dlg.GetPathName(); - - const wchar_t* SPath = CSPath; - TCollection_ExtendedString TPath (SPath); - - // Choose storage format - if (TPath.SearchFromEnd(".xml") > 0) - { - // The document must be saved in XML format - myOcafDoc->ChangeStorageFormat("XmlOcaf"); - } - else if (TPath.SearchFromEnd(".cbf") > 0) - { - // The document must be saved in binary format - myOcafDoc->ChangeStorageFormat("BinOcaf"); - } - - try - { - // Saves the document in the current application - m_App->SaveAs(myOcafDoc,TPath); - } - catch(...) - { - AfxMessageBox (L"Error! The file wasn't saved."); - return; - } - - SetPathName(SPath); - PathName=CSPath; - - - TCollection_AsciiString Message = TCollection_AsciiString("\ -// Storing the document as \n\ - \n\ -Handle(TOcaf_Application) m_App= ((COcafApp*)AfxGetApp())->GetApp(); \n\ - \n\ -// Saving current OCAF document at TPath \n\ -m_App->SaveAs(myOcafDoc,(TCollection_ExtendedString) TPath); \n\ -\n"); - - myCResultDialog.SetTitle("Save a document"); - CString text(Message.ToCString()); - myCResultDialog.SetText(text); -} - -BOOL COcafDoc::OnOpenDocument(LPCTSTR lpszPathName) -{ - if (!CDocument::OnOpenDocument(lpszPathName)) - { - return FALSE; - } - - Handle(TOcaf_Application) m_App= ((COcafApp*)AfxGetApp())->GetApp(); - - CWaitCursor aWaitCursor; - PathName = lpszPathName; - - const wchar_t* aPathName = lpszPathName; - TCollection_ExtendedString anOccPathName (aPathName); - - // Open the document in the current application - //PCDM_ReaderStatus RS = m_App->Open(TPath,myOcafDoc); - m_App->Open(anOccPathName, myOcafDoc); - //CDF_RetrievableStatus RS = m_App->Open(TPath,myOcafDoc); - - // Connect the document CAF (myDoc) with the AISContext (myAISContext) - TPrsStd_AISViewer::New (myOcafDoc->Main(), myViewer); - myOcafDoc->SetUndoLimit (10); - - Handle(AIS_InteractiveContext) aContext; - TPrsStd_AISViewer::Find (myOcafDoc->Main(), aContext); - aContext->SetDisplayMode (AIS_Shaded, Standard_True); - myAISContext = aContext; - - // Display the presentations (which was not stored in the document) - DisplayPrs(); - - TCollection_AsciiString Message = TCollection_AsciiString("\ -// Retrieve a document \n\ - \n\ - Handle(TOcaf_Application) m_App= ((COcafApp*)AfxGetApp())->GetApp(); \n\ - \n\ -// Opening the OCAF document from the TPath file\n\ -m_App->Open((TCollection_ExtendedString) TPath,myOcafDoc); \n\ - \n\ -// Creation of a new TPrsStd_AISViewer connected to the current V3d_Viewer\n\ -TPrsStd_AISViewer::New(myOcafDoc->Main(),myViewer); \n\ - \n\ -// Setting the number of memorized undos \n\ -myOcafDoc->SetUndoLimit(10); \n\ - \n\ -\n"); - - myCResultDialog.SetTitle ("Open a document"); - CString text (Message.ToCString()); - myCResultDialog.SetText (text); - - return TRUE; - -} - - -void COcafDoc::EraseAll() -{ - myOcafDoc->NewCommand(); - - TDF_Label LabSat = myOcafDoc->Main(); - - for (TDF_ChildIterator it(LabSat); it.More(); it.Next()) - { - TDF_Label L = it.Value(); - Handle(TNaming_NamedShape) TNS; - if (!L.FindAttribute(TNaming_NamedShape::GetID(), TNS)) continue; - Handle(TDataStd_Integer) TDI; - - // To know if the object was displayed - if (L.FindAttribute(TDataStd_Integer::GetID(), TDI)) - if(!TDI->Get()) continue; - - Handle(TPrsStd_AISPresentation) prs; - if (!L.FindAttribute(TPrsStd_AISPresentation::GetID(),prs)) - prs = TPrsStd_AISPresentation::Set(L,TNaming_NamedShape::GetID()); - prs->SetColor(Quantity_NOC_ORANGE); - prs->Erase(1); - } - - myAISContext->UpdateCurrentViewer(); - - myOcafDoc->CommitCommand(); -} - -void COcafDoc::Popup(const Standard_Integer x, - const Standard_Integer y , - const Handle(V3d_View)& aView ) -{ - Standard_Integer PopupMenuNumber=0; - myAISContext->InitSelected(); - if (myAISContext->MoreSelected()) - PopupMenuNumber=1; - - CMenu menu; - VERIFY(menu.LoadMenu(IDR_Popup3D)); - CMenu* pPopup = menu.GetSubMenu(PopupMenuNumber); - - ASSERT(pPopup != NULL); - if (PopupMenuNumber == 1) // more than 1 object. - { - bool OneOrMoreInShading = false; - for (myAISContext->InitSelected();myAISContext->MoreSelected ();myAISContext->NextSelected ()) - if (myAISContext->IsDisplayed(myAISContext->SelectedInteractive(),1)) OneOrMoreInShading=true; - if(!OneOrMoreInShading) - pPopup->EnableMenuItem(5, MF_BYPOSITION | MF_DISABLED | MF_GRAYED); - } - - POINT winCoord = { x , y }; - Handle(WNT_Window) aWNTWindow= - Handle(WNT_Window)::DownCast(aView->Window()); - ClientToScreen ( (HWND)(aWNTWindow->HWindow()),&winCoord); - pPopup->TrackPopupMenu(TPM_LEFTALIGN | TPM_RIGHTBUTTON , winCoord.x, winCoord.y , - AfxGetMainWnd()); - - -} - - -//void COcafDoc::OnDfbr() -//{ -// // TODO: Add your command handler code here -// DebugBrowser::DFBrowser(myOcafDoc); -// -//} diff --git a/samples/mfc/standard/06_Ocaf/src/OcafDoc.h b/samples/mfc/standard/06_Ocaf/src/OcafDoc.h deleted file mode 100755 index d1704d215e..0000000000 --- a/samples/mfc/standard/06_Ocaf/src/OcafDoc.h +++ /dev/null @@ -1,86 +0,0 @@ -// OcafDoc.h : interface of the COcafDoc class -// -///////////////////////////////////////////////////////////////////////////// - -#if !defined(AFX_OCAFDOC_H__49324D7C_7836_11D4_8D45_00AA00D10994__INCLUDED_) -#define AFX_OCAFDOC_H__49324D7C_7836_11D4_8D45_00AA00D10994__INCLUDED_ - -#if _MSC_VER >= 1000 -#pragma once -#endif // _MSC_VER >= 1000 - -#include -#include - -class COcafDoc : public OCC_3dDoc -{ -protected: // create from serialization only - COcafDoc(); - DECLARE_DYNCREATE(COcafDoc) - -// Overrides - // ClassWizard generated virtual function overrides - //{{AFX_VIRTUAL(COcafDoc) - public: - virtual void OnCloseDocument(); - virtual BOOL OnOpenDocument(LPCTSTR lpszPathName); - virtual BOOL COcafDoc::OnNewDocument(); - - //}}AFX_VIRTUAL - -// Implementation -public: - virtual ~COcafDoc(); - virtual void Popup (const Standard_Integer x , - const Standard_Integer y , - const Handle(V3d_View)& aView ); - -#ifdef _DEBUG - virtual void AssertValid() const; - virtual void Dump(CDumpContext& dc) const; -#endif - -protected: - -// Generated message map functions -protected: - //{{AFX_MSG(COcafDoc) - afx_msg void OnCreatebox(); - afx_msg void OnEditRedo(); - afx_msg void OnEditUndo(); - afx_msg void OnUpdateEditUndo(CCmdUI* pCmdUI); - afx_msg void OnModify(); - afx_msg void OnUpdateModify(CCmdUI* pCmdUI); - afx_msg void OnUpdateEditRedo(CCmdUI* pCmdUI); - afx_msg void OnCut(); - afx_msg void OnObjectDelete(); - afx_msg void OnUpdateObjectDelete(CCmdUI* pCmdUI); - afx_msg void OnFileSave(); - afx_msg void OnFileSaveAs(); - afx_msg void OnCreatecyl(); - afx_msg void OnDfbr(); - //}}AFX_MSG - DECLARE_MESSAGE_MAP() -public : -void ActivateFrame(CRuntimeClass* pViewClass, int nCmdShow = SW_RESTORE ); - Handle(TDocStd_Document) GetOcafDoc() {return myOcafDoc;}; - CString PathName; - -private: - Handle(TDocStd_Document) myOcafDoc; - -public : - void EraseAll(); - -private: - void DisplayPrs(); - void Fit3DViews(); - -}; - -///////////////////////////////////////////////////////////////////////////// - -//{{AFX_INSERT_LOCATION}} -// Microsoft Visual C++ will insert additional declarations immediately before the previous line. - -#endif // !defined(AFX_OCAFDOC_H__49324D7C_7836_11D4_8D45_00AA00D10994__INCLUDED_) diff --git a/samples/mfc/standard/06_Ocaf/src/OcafMainFrm.cpp b/samples/mfc/standard/06_Ocaf/src/OcafMainFrm.cpp deleted file mode 100755 index 09a71246bb..0000000000 --- a/samples/mfc/standard/06_Ocaf/src/OcafMainFrm.cpp +++ /dev/null @@ -1,96 +0,0 @@ -// MainFrm.cpp : implementation of the OcafMainFrame class -// - -#include "StdAfx.h" - -#include "OcafMainFrm.h" - -#include "OcafApp.h" - -///////////////////////////////////////////////////////////////////////////// -// OcafMainFrame - -IMPLEMENT_DYNAMIC(OcafMainFrame, CMDIFrameWnd) - -BEGIN_MESSAGE_MAP(OcafMainFrame, CMDIFrameWnd) - //{{AFX_MSG_MAP(OcafMainFrame) - // NOTE - the ClassWizard will add and remove mapping macros here. - // DO NOT EDIT what you see in these blocks of generated code ! - ON_WM_CREATE() - //}}AFX_MSG_MAP -END_MESSAGE_MAP() - -static UINT indicators[] = -{ - ID_SEPARATOR, // status line indicator -// ID_INDICATOR_CAPS, -// ID_INDICATOR_NUM, -// ID_INDICATOR_SCRL, -}; - -///////////////////////////////////////////////////////////////////////////// -// OcafMainFrame construction/destruction - -OcafMainFrame::OcafMainFrame(): - OCC_MainFrame(true) -{ - // TODO: add member initialization code here - -} - -OcafMainFrame::~OcafMainFrame() -{ -} - -int OcafMainFrame::OnCreate(LPCREATESTRUCT lpCreateStruct) -{ - if (OCC_MainFrame::OnCreate(lpCreateStruct) == -1) - return -1; - - if (!m_UndoRedoBar.Create(this) || - !m_UndoRedoBar.LoadToolBar(IDR_UNDOREDO) || - !m_ActionsBar.Create(this) || - !m_ActionsBar.LoadToolBar(IDR_ACTIONS)) - { - TRACE0("Failed to create toolbar\n"); - return -1; // fail to create - } - - m_UndoRedoBar.SetBarStyle(m_UndoRedoBar.GetBarStyle() | - CBRS_TOOLTIPS | CBRS_FLYBY | CBRS_SIZE_DYNAMIC); - - m_ActionsBar.SetBarStyle(m_ActionsBar.GetBarStyle() | - CBRS_TOOLTIPS | CBRS_FLYBY | CBRS_SIZE_DYNAMIC); - - // TODO: Delete these three lines if you don't want the toolbar to - // be dockable - m_UndoRedoBar.EnableDocking(CBRS_ALIGN_ANY); - m_ActionsBar.EnableDocking(CBRS_ALIGN_ANY); - - EnableDocking(CBRS_ALIGN_ANY); - DockControlBarLeftOf(&m_UndoRedoBar,m_AISToolBar); - DockControlBarLeftOf(&m_ActionsBar,&m_UndoRedoBar); - -// SetTitle("Ocaf Sample"); - return 0; -} - - -///////////////////////////////////////////////////////////////////////////// -// OcafMainFrame diagnostics - -#ifdef _DEBUG -void OcafMainFrame::AssertValid() const -{ - CMDIFrameWnd::AssertValid(); -} - -void OcafMainFrame::Dump(CDumpContext& dc) const -{ - CMDIFrameWnd::Dump(dc); -} - -#endif //_DEBUG - -///////////////////////////////////////////////////////////////////////////// -// OcafMainFrame message handlers diff --git a/samples/mfc/standard/06_Ocaf/src/OcafMainFrm.h b/samples/mfc/standard/06_Ocaf/src/OcafMainFrm.h deleted file mode 100755 index 55abd74a13..0000000000 --- a/samples/mfc/standard/06_Ocaf/src/OcafMainFrm.h +++ /dev/null @@ -1,61 +0,0 @@ -// MainFrm.h : interface of the OcafMainFrame class -// -///////////////////////////////////////////////////////////////////////////// - -#if !defined(AFX_MAINFRM_H__49324D78_7836_11D4_8D45_00AA00D10994__INCLUDED_) -#define AFX_MAINFRM_H__49324D78_7836_11D4_8D45_00AA00D10994__INCLUDED_ - -#if _MSC_VER >= 1000 -#pragma once -#endif // _MSC_VER >= 1000 - -#include - -class OcafMainFrame : public OCC_MainFrame -{ - DECLARE_DYNAMIC(OcafMainFrame) -public: - OcafMainFrame(); - -// Attributes -public: - -// Operations -public: - -// Overrides - // ClassWizard generated virtual function overrides - //{{AFX_VIRTUAL(OcafMainFrame) - //}}AFX_VIRTUAL - -// Implementation -public: - virtual ~OcafMainFrame(); -#ifdef _DEBUG - virtual void AssertValid() const; - virtual void Dump(CDumpContext& dc) const; -#endif - - -protected: // control bar embedded members - CToolBar m_UndoRedoBar; - CToolBar m_ActionsBar; - -// Generated message map functions -protected: - //{{AFX_MSG(OcafMainFrame) - afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct); - // NOTE - the ClassWizard will add and remove member functions here. - // DO NOT EDIT what you see in these blocks of generated code! - //}}AFX_MSG - DECLARE_MESSAGE_MAP() - -private : -}; - -///////////////////////////////////////////////////////////////////////////// - -//{{AFX_INSERT_LOCATION}} -// Microsoft Visual C++ will insert additional declarations immediately before the previous line. - -#endif // !defined(AFX_MAINFRM_H__49324D78_7836_11D4_8D45_00AA00D10994__INCLUDED_) diff --git a/samples/mfc/standard/06_Ocaf/src/StdAfx.cpp b/samples/mfc/standard/06_Ocaf/src/StdAfx.cpp deleted file mode 100755 index e189c88b67..0000000000 --- a/samples/mfc/standard/06_Ocaf/src/StdAfx.cpp +++ /dev/null @@ -1,6 +0,0 @@ -// StdAfx.cpp : source file that includes just the standard includes -// SampleOcaf.pch will be the pre-compiled header -// StdAfx.obj will contain the pre-compiled type information - -#include "StdAfx.h" - diff --git a/samples/mfc/standard/06_Ocaf/src/StdAfx.h b/samples/mfc/standard/06_Ocaf/src/StdAfx.h deleted file mode 100755 index a4fad16a3a..0000000000 --- a/samples/mfc/standard/06_Ocaf/src/StdAfx.h +++ /dev/null @@ -1,153 +0,0 @@ -// StdAfx.h : include file for standard system include files, -// or project specific include files that are used frequently, but -// are changed infrequently -// - -#if !defined(AFX_STDAFX_H__49324D76_7836_11D4_8D45_00AA00D10994__INCLUDED_) -#define AFX_STDAFX_H__49324D76_7836_11D4_8D45_00AA00D10994__INCLUDED_ - -#if _MSC_VER >= 1000 -#pragma once -#endif // _MSC_VER >= 1000 - -#define VC_EXTRALEAN // Exclude rarely-used stuff from Windows headers - -#include // MFC core and standard components -#include // MFC extensions -#include // MFC OLE automation classes -#ifndef _AFX_NO_AFXCMN_SUPPORT -#include // MFC support for Windows Common Controls -#endif // _AFX_NO_AFXCMN_SUPPORT - - - -// CasCade : - -#ifdef MAINWIN -# define false FALSE -# define true TRUE -#endif - -#include - -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include - - -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -// OCAF -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -// Ocaf -#include -#include -#include -#include - -//End CasCade - -#include - - -//{{AFX_INSERT_LOCATION}} -// Microsoft Visual C++ will insert additional declarations immediately before the previous line. - -#endif // !defined(AFX_STDAFX_H__49324D76_7836_11D4_8D45_00AA00D10994__INCLUDED_) diff --git a/samples/mfc/standard/06_Ocaf/src/TOcafFunction_BoxDriver.cxx b/samples/mfc/standard/06_Ocaf/src/TOcafFunction_BoxDriver.cxx deleted file mode 100755 index 40979bf567..0000000000 --- a/samples/mfc/standard/06_Ocaf/src/TOcafFunction_BoxDriver.cxx +++ /dev/null @@ -1,122 +0,0 @@ -// File: TOcafFunction_BoxDriver.cxx -// Created: Mon Dec 27 10:37:13 1999 -// Author: Vladislav ROMASHKO -// - - -#include -#include -#include "Standard_GUID.hxx" -#include "TFunction_Logbook.hxx" -#include "TDataStd_Real.hxx" -#include "BRepPrimAPI_MakeBox.hxx" -#include "TNaming_Builder.hxx" - -IMPLEMENT_STANDARD_RTTIEXT (TOcafFunction_BoxDriver, TFunction_Driver) - -//======================================================================= -//function : GetID -//purpose : -//======================================================================= - -const Standard_GUID& TOcafFunction_BoxDriver::GetID() { - static Standard_GUID anID("22D22E51-D69A-11d4-8F1A-0060B0EE18E8"); - return anID; -} - - -//======================================================================= -//function : TPartStd_BoxDriver -//purpose : Creation of an instance of the driver. It's possible (and recommended) -// : to have only one instance of a driver for the whole session. -//======================================================================= - -TOcafFunction_BoxDriver::TOcafFunction_BoxDriver() -{} - -//======================================================================= -//function : Validate -//purpose : Validation of the object label, its arguments and its results. -//======================================================================= - -void TOcafFunction_BoxDriver::Validate(Handle(TFunction_Logbook)& log) const -{ - // We validate the object label ( Label() ), all the arguments and the results of the object: - log->SetValid(Label(), Standard_True); -} - -//======================================================================= -//function : MustExecute -//purpose : We call this method to check if the object was modified to -// : be invoked. If the object label or an argument is modified, -// : we must recompute the object - to call the method Execute(). -//======================================================================= -Standard_Boolean TOcafFunction_BoxDriver::MustExecute(const Handle(TFunction_Logbook)& log) const -{ - // If the object's label is modified: - if (log->IsModified(Label())) return Standard_True; - - // Cut (in our simple case) has two arguments: The original shape, and the tool shape. - // They are on the child labels of the box's label: - // So, OriginalNShape - is attached to the first child label - // ToolNShape - is attached to the second child label. - // - // Let's check them: - if (log->IsModified(Label().FindChild(1))) return Standard_True; // width. - if (log->IsModified(Label().FindChild(2))) return Standard_True; // length, - if (log->IsModified(Label().FindChild(3))) return Standard_True; // width. - if (log->IsModified(Label().FindChild(4))) return Standard_True; // length, - if (log->IsModified(Label().FindChild(5))) return Standard_True; // width. - if (log->IsModified(Label().FindChild(6))) return Standard_True; // length, - - // if there are no any modifications concerned the box, - // it's not necessary to recompute (to call the method Execute()): - return Standard_False; -} - -//======================================================================= -//function : Execute -//purpose : -// : We compute the object and topologically name it. -// : If during the execution we found something wrong, -// : we return the number of the failure. For example: -// : 1 - an attribute hasn't been found, -// : 2 - algorithm failed, -// : if there are no any mistakes occurred we return 0: -// : 0 - no mistakes were found. -//======================================================================= -Standard_Integer TOcafFunction_BoxDriver::Execute(Handle(TFunction_Logbook)& /*log*/) const -{ - // Get the values of dimension and position attributes - Handle(TDataStd_Real) TSR; - Standard_Real x,y,z,l,h,w; - if (!Label().FindChild(1).FindAttribute(TDataStd_Real::GetID(), TSR )) return 1; - l=TSR->Get(); - - if (!Label().FindChild(2).FindAttribute(TDataStd_Real::GetID(), TSR )) return 1; - h=TSR->Get(); - - if (!Label().FindChild(3).FindAttribute(TDataStd_Real::GetID(), TSR )) return 1; - w=TSR->Get(); - - if (!Label().FindChild(4).FindAttribute(TDataStd_Real::GetID(), TSR )) return 1; - x=TSR->Get(); - - if (!Label().FindChild(5).FindAttribute(TDataStd_Real::GetID(), TSR )) return 1; - y=TSR->Get(); - - if (!Label().FindChild(6).FindAttribute(TDataStd_Real::GetID(), TSR )) return 1; - z=TSR->Get(); - - // Build a box using the dimension and position attributes - BRepPrimAPI_MakeBox mkBox( gp_Pnt(x, y ,z), l, h ,w); - TopoDS_Shape ResultShape = mkBox.Shape(); - - - // Build a TNaming_NamedShape using built box - TNaming_Builder B(Label()); - B.Generated(ResultShape); -// That's all: - // If there are no any mistakes we return 0: - return 0; -} diff --git a/samples/mfc/standard/06_Ocaf/src/TOcafFunction_BoxDriver.hxx b/samples/mfc/standard/06_Ocaf/src/TOcafFunction_BoxDriver.hxx deleted file mode 100755 index 8a772e7289..0000000000 --- a/samples/mfc/standard/06_Ocaf/src/TOcafFunction_BoxDriver.hxx +++ /dev/null @@ -1,49 +0,0 @@ -// File generated by CPPExt (Transient) -// -// Copyright (C) 1991,1995 by -// -// MATRA DATAVISION, FRANCE -// -// This software is furnished in accordance with the terms and conditions -// of the contract and with the inclusion of the above copyright notice. -// This software or any other copy thereof may not be provided or otherwise -// be made available to any other person. No title to an ownership of the -// software is hereby transferred. -// -// At the termination of the contract, the software and all copies of this -// software must be deleted. -// -#ifndef _TOcafFunction_BoxDriver_HeaderFile -#define _TOcafFunction_BoxDriver_HeaderFile - -#ifndef _Standard_HeaderFile -#include -#endif - -#ifndef _TFunction_Driver_HeaderFile -#include -#endif -#ifndef _Standard_Boolean_HeaderFile -#include -#endif -#ifndef _Standard_Integer_HeaderFile -#include -#endif -class TFunction_Logbook; - -class TOcafFunction_BoxDriver : public TFunction_Driver -{ -public: - - Standard_EXPORT static const Standard_GUID& GetID (); - Standard_EXPORT TOcafFunction_BoxDriver (); - Standard_EXPORT virtual void Validate (Handle (TFunction_Logbook)& log) const; - Standard_EXPORT virtual Standard_Boolean MustExecute (const Handle (TFunction_Logbook)& log) const; - Standard_EXPORT virtual Standard_Integer Execute (Handle (TFunction_Logbook)& log) const; - - // OCCT RTTI - DEFINE_STANDARD_RTTIEXT(TOcafFunction_BoxDriver,TFunction_Driver) -}; - - -#endif diff --git a/samples/mfc/standard/06_Ocaf/src/TOcafFunction_CutDriver.cxx b/samples/mfc/standard/06_Ocaf/src/TOcafFunction_CutDriver.cxx deleted file mode 100755 index 66cbebef26..0000000000 --- a/samples/mfc/standard/06_Ocaf/src/TOcafFunction_CutDriver.cxx +++ /dev/null @@ -1,143 +0,0 @@ -// File: TOcafFunction_CutDriver.cxx -// Created: Mon Dec 27 10:37:13 1999 -// Author: Vladislav ROMASHKO -// - - -#include -#include - -#include -#include - -#include -#include -#include -#include "Standard_GUID.hxx" -#include "TFunction_Logbook.hxx" -#include "TDF_Reference.hxx" - -IMPLEMENT_STANDARD_RTTIEXT (TOcafFunction_CutDriver, TFunction_Driver) - -//======================================================================= -//function : GetID -//purpose : -//======================================================================= - -const Standard_GUID& TOcafFunction_CutDriver::GetID() { - static Standard_GUID anID("22D22E52-D69A-11d4-8F1A-0060B0EE18E8"); - return anID; -} - - -//======================================================================= -//function : TPartStd_CutDriver -//purpose : Creation of an instance of the driver. It's possible (and recommended) -// : to have only one instance of a driver for the whole session. -//======================================================================= - -TOcafFunction_CutDriver::TOcafFunction_CutDriver() -{} - -//======================================================================= -//function : Validate -//purpose : Validation of the object label, its arguments and its results. -//======================================================================= - -void TOcafFunction_CutDriver::Validate(Handle(TFunction_Logbook)& log) const -{ - // We validate the object label ( Label() ), all the arguments and the results of the object: - log->SetValid(Label(), Standard_True); -} - -//======================================================================= -//function : MustExecute -//purpose : We call this method to check if the object was modified to -// : be invoked. If the object label or an argument is modified, -// : we must recompute the object - to call the method Execute(). -//======================================================================= - -Standard_Boolean TOcafFunction_CutDriver::MustExecute(const Handle(TFunction_Logbook)& log) const -{ - // If the object's label is modified: - if (log->IsModified(Label())) return Standard_True; - - // Cut (in our simple case) has two arguments: The original shape, and the tool shape. - // They are on the child labels of the cut's label: - // So, OriginalNShape - is attached to the first child label - // ToolNShape - is attached to the second child label, - // . - // Let's check them: - Handle(TDF_Reference) OriginalRef; - //TDF_Label aLabel = Label().FindChild(1); -/* - BOOL f = Label().IsNull(); - int a = Label().NbChildren(); -*/ - TCollection_AsciiString aEntry; - TDF_Tool::Entry(Label(), aEntry); - std::cout << "Entry: "<IsModified(OriginalRef->Get())) return Standard_True; // Original shape. - - Handle(TDF_Reference) ToolRef; - Label().FindChild(2).FindAttribute(TDF_Reference::GetID(),ToolRef); - if (log->IsModified(ToolRef->Get())) return Standard_True; // Tool shape. - - // if there are no any modifications concerned the cut, - // it's not necessary to recompute (to call the method Execute()): - return Standard_False; -} - -//======================================================================= -//function : Execute -//purpose : -// : We compute the object and topologically name it. -// : If during the execution we found something wrong, -// : we return the number of the failure. For example: -// : 1 - an attribute hasn't been found, -// : 2 - algorithm failed, -// : if there are no any mistakes occurred we return 0: -// : 0 - no mistakes were found. -//======================================================================= - -Standard_Integer TOcafFunction_CutDriver::Execute(Handle(TFunction_Logbook)& /*log*/) const -{ - // Let's get the arguments (OriginalNShape, ToolNShape of the object): - - // First, we have to retrieve the TDF_Reference attributes to obtain the root labels of the OriginalNShape and the ToolNShape: - Handle(TDF_Reference) OriginalRef, ToolRef; - if (!Label().FindChild(1).FindAttribute(TDF_Reference::GetID(), OriginalRef )) return 1; - TDF_Label OriginalLab = OriginalRef->Get(); - if (!Label().FindChild(2).FindAttribute(TDF_Reference::GetID(), ToolRef)) return 1; - TDF_Label ToolLab = ToolRef->Get(); - - // Get the TNaming_NamedShape attributes of these labels - Handle(TNaming_NamedShape) OriginalNShape, ToolNShape; - if (!( OriginalLab.FindAttribute(TNaming_NamedShape::GetID(),OriginalNShape) )) - throw Standard_Failure("TOcaf_Commands::CutObjects"); - if (!( ToolLab.FindAttribute(TNaming_NamedShape::GetID(),ToolNShape) )) - throw Standard_Failure("TOcaf_Commands::CutObjects"); - - // Now, let's get the TopoDS_Shape of these TNaming_NamedShape: - TopoDS_Shape OriginalShape = OriginalNShape->Get(); - TopoDS_Shape ToolShape = ToolNShape->Get(); - -// STEP 2: - // Let's call for algorithm computing a cut operation: - BRepAlgoAPI_Cut mkCut(OriginalShape, ToolShape); - // Let's check if the Cut has been successful: - if (!mkCut.IsDone()) - { - MessageBoxW (NULL, L"Cut not done.", L"Cut Function Driver", MB_ICONERROR); - return 2; - } - TopoDS_Shape ResultShape = mkCut.Shape(); - - // Build a TNaming_NamedShape using built cut - TNaming_Builder B(Label()); - B.Modify( OriginalShape, ResultShape); -// That's all: - // If there are no any mistakes we return 0: - return 0; -} diff --git a/samples/mfc/standard/06_Ocaf/src/TOcafFunction_CutDriver.hxx b/samples/mfc/standard/06_Ocaf/src/TOcafFunction_CutDriver.hxx deleted file mode 100755 index ae07f6a7e6..0000000000 --- a/samples/mfc/standard/06_Ocaf/src/TOcafFunction_CutDriver.hxx +++ /dev/null @@ -1,49 +0,0 @@ -// File generated by CPPExt (Transient) -// -// Copyright (C) 1991,1995 by -// -// MATRA DATAVISION, FRANCE -// -// This software is furnished in accordance with the terms and conditions -// of the contract and with the inclusion of the above copyright notice. -// This software or any other copy thereof may not be provided or otherwise -// be made available to any other person. No title to an ownership of the -// software is hereby transferred. -// -// At the termination of the contract, the software and all copies of this -// software must be deleted. -// -#ifndef _TOcafFunction_CutDriver_HeaderFile -#define _TOcafFunction_CutDriver_HeaderFile - -#ifndef _Standard_HeaderFile -#include -#endif - -#ifndef _TFunction_Driver_HeaderFile -#include -#endif -#ifndef _Standard_Boolean_HeaderFile -#include -#endif -#ifndef _Standard_Integer_HeaderFile -#include -#endif -class TFunction_Logbook; - - -class TOcafFunction_CutDriver : public TFunction_Driver -{ -public: - - Standard_EXPORT static const Standard_GUID& GetID() ; - Standard_EXPORT TOcafFunction_CutDriver (); - Standard_EXPORT virtual void Validate (Handle (TFunction_Logbook)& log) const; - Standard_EXPORT virtual Standard_Boolean MustExecute (const Handle (TFunction_Logbook)& log) const; - Standard_EXPORT virtual Standard_Integer Execute (Handle (TFunction_Logbook)& log) const; - - // OCCT RTTI - DEFINE_STANDARD_RTTIEXT(TOcafFunction_CutDriver,TFunction_Driver) -}; - -#endif diff --git a/samples/mfc/standard/06_Ocaf/src/TOcafFunction_CylDriver.cxx b/samples/mfc/standard/06_Ocaf/src/TOcafFunction_CylDriver.cxx deleted file mode 100755 index 44595ed01c..0000000000 --- a/samples/mfc/standard/06_Ocaf/src/TOcafFunction_CylDriver.cxx +++ /dev/null @@ -1,116 +0,0 @@ -// File: TOcafFunction_CylDriver.cxx -// Created: Mon Dec 27 10:37:13 1999 -// Author: Vladislav ROMASHKO -// - - -#include -#include -#include -#include -#include "Standard_GUID.hxx" -#include "TFunction_Logbook.hxx" -#include "TDataStd_Real.hxx" -#include "TNaming_Builder.hxx" - -IMPLEMENT_STANDARD_RTTIEXT (TOcafFunction_CylDriver, TFunction_Driver) - -//======================================================================= -//function : GetID -//purpose : -//======================================================================= - -const Standard_GUID& TOcafFunction_CylDriver::GetID() { - static Standard_GUID anID("22D22E53-D69A-11d4-8F1A-0060B0EE18E8"); - return anID; -} - - -//======================================================================= -//function : TPartStd_CylDriver -//purpose : Creation of an instance of the driver. It's possible (and recommended) -// : to have only one instance of a driver for the whole session. -//======================================================================= - -TOcafFunction_CylDriver::TOcafFunction_CylDriver() -{} - -//======================================================================= -//function : Validate -//purpose : Validation of the object label, its arguments and its results. -//======================================================================= - -void TOcafFunction_CylDriver::Validate(Handle(TFunction_Logbook)& log) const -{ - // We validate the object label ( Label() ), all the arguments and the results of the object: - log->SetValid(Label(), Standard_True); -} - -//======================================================================= -//function : MustExecute -//purpose : We call this method to check if the object was modified to -// : be invoked. If the object label or an argument is modified, -// : we must recompute the object - to call the method Execute(). -//======================================================================= -Standard_Boolean TOcafFunction_CylDriver::MustExecute(const Handle(TFunction_Logbook)& log) const -{ - // If the object's label is modified: - if (log->IsModified(Label())) return Standard_True; - - // Cylinder (in our simple case) has 5 arguments: - // - // Let's check them: - if (log->IsModified(Label().FindChild(1))) return Standard_True; // radius. - if (log->IsModified(Label().FindChild(2))) return Standard_True; // height, - if (log->IsModified(Label().FindChild(3))) return Standard_True; // x. - if (log->IsModified(Label().FindChild(4))) return Standard_True; // y, - if (log->IsModified(Label().FindChild(5))) return Standard_True; // z. - - // if there are no any modifications concerned the Cyl, - // it's not necessary to recompute (to call the method Execute()): - return Standard_False; -} - -//======================================================================= -//function : Execute -//purpose : -// : We compute the object and topologically name it. -// : If during the execution we found something wrong, -// : we return the number of the failure. For example: -// : 1 - an attribute hasn't been found, -// : 2 - algorithm failed, -// : if there are no any mistakes occurred we return 0: -// : 0 - no mistakes were found. -//======================================================================= -Standard_Integer TOcafFunction_CylDriver::Execute(Handle(TFunction_Logbook)& /*log*/) const -{ - // Get the values of dimension and position attributes - Handle(TDataStd_Real) TSR; - Standard_Real x,y,z,r,h; - if (!Label().FindChild(1).FindAttribute(TDataStd_Real::GetID(), TSR )) return 1; - r=TSR->Get(); - - if (!Label().FindChild(2).FindAttribute(TDataStd_Real::GetID(), TSR )) return 1; - h=TSR->Get(); - - if (!Label().FindChild(3).FindAttribute(TDataStd_Real::GetID(), TSR )) return 1; - x=TSR->Get(); - - if (!Label().FindChild(4).FindAttribute(TDataStd_Real::GetID(), TSR )) return 1; - y=TSR->Get(); - - if (!Label().FindChild(5).FindAttribute(TDataStd_Real::GetID(), TSR )) return 1; - z=TSR->Get(); - - // Build a Cyl using the dimension and position attributes - BRepPrimAPI_MakeCylinder mkCyl( gp_Ax2(gp_Pnt(x, y ,z), gp_Dir(0,0,1)), r, h); - TopoDS_Shape ResultShape = mkCyl.Shape(); - - - // Build a TNaming_NamedShape using built Cyl - TNaming_Builder B(Label()); - B.Generated(ResultShape); -// That's all: - // If there are no any mistakes we return 0: - return 0; -} diff --git a/samples/mfc/standard/06_Ocaf/src/TOcafFunction_CylDriver.hxx b/samples/mfc/standard/06_Ocaf/src/TOcafFunction_CylDriver.hxx deleted file mode 100755 index 27ef1f14f2..0000000000 --- a/samples/mfc/standard/06_Ocaf/src/TOcafFunction_CylDriver.hxx +++ /dev/null @@ -1,49 +0,0 @@ -// File generated by CPPExt (Transient) -// -// Copyright (C) 1991,1995 by -// -// MATRA DATAVISION, FRANCE -// -// This software is furnished in accordance with the terms and conditions -// of the contract and with the inclusion of the above copyright notice. -// This software or any other copy thereof may not be provided or otherwise -// be made available to any other person. No title to an ownership of the -// software is hereby transferred. -// -// At the termination of the contract, the software and all copies of this -// software must be deleted. -// -#ifndef _TOcafFunction_CylDriver_HeaderFile -#define _TOcafFunction_CylDriver_HeaderFile - -#ifndef _Standard_HeaderFile -#include -#endif - -#ifndef _TFunction_Driver_HeaderFile -#include -#endif -#ifndef _Standard_Boolean_HeaderFile -#include -#endif -#ifndef _Standard_Integer_HeaderFile -#include -#endif -class TFunction_Logbook; - - -class TOcafFunction_CylDriver : public TFunction_Driver -{ -public: - - Standard_EXPORT static const Standard_GUID& GetID (); - Standard_EXPORT TOcafFunction_CylDriver (); - Standard_EXPORT virtual void Validate (Handle (TFunction_Logbook)& log) const; - Standard_EXPORT virtual Standard_Boolean MustExecute (const Handle (TFunction_Logbook)& log) const; - Standard_EXPORT virtual Standard_Integer Execute (Handle (TFunction_Logbook)& log) const; - - // OCCT RTTI - DEFINE_STANDARD_RTTIEXT(TOcafFunction_CylDriver,TFunction_Driver) -}; - -#endif diff --git a/samples/mfc/standard/06_Ocaf/src/TOcaf_Application.cxx b/samples/mfc/standard/06_Ocaf/src/TOcaf_Application.cxx deleted file mode 100755 index 8e05e69de5..0000000000 --- a/samples/mfc/standard/06_Ocaf/src/TOcaf_Application.cxx +++ /dev/null @@ -1,39 +0,0 @@ -// File: TOcaf_Application.cxx -// Created: Mon Jul 3 2000 -// Author: J Mazars - -//Modified by Sergey RUIN (An instantiation of the drivers) - -#include -#include -#include -#include -#include -#include -#include "TFunction_DriverTable.hxx" -#include "TOcafFunction_BoxDriver.hxx" -#include "TOcafFunction_CylDriver.hxx" -#include "TOcafFunction_CutDriver.hxx" - -IMPLEMENT_STANDARD_RTTIEXT (TOcaf_Application, TDocStd_Application) - -//======================================================================= -//function : TOcaf_Application -//purpose : -//======================================================================= - -TOcaf_Application::TOcaf_Application() -{ - // Instantiate a TOcafFunction_BoxDriver and add it to the TFunction_DriverTable - TFunction_DriverTable::Get()->AddDriver (TOcafFunction_BoxDriver::GetID(), - new TOcafFunction_BoxDriver()); - - // Instantiate a TOcafFunction_Cyl Driver and add it to the TFunction_DriverTable - TFunction_DriverTable::Get()->AddDriver (TOcafFunction_CylDriver::GetID(), - new TOcafFunction_CylDriver()); - - // Instantiate a TOcafFunction_CutDriver and add it to the TFunction_DriverTable - Handle(TOcafFunction_CutDriver) myCutDriver = new TOcafFunction_CutDriver(); - TFunction_DriverTable::Get()->AddDriver (TOcafFunction_CutDriver::GetID(), - new TOcafFunction_CutDriver()); -} diff --git a/samples/mfc/standard/06_Ocaf/src/TOcaf_Application.hxx b/samples/mfc/standard/06_Ocaf/src/TOcaf_Application.hxx deleted file mode 100755 index c719daa1e8..0000000000 --- a/samples/mfc/standard/06_Ocaf/src/TOcaf_Application.hxx +++ /dev/null @@ -1,38 +0,0 @@ -// File generated by CPPExt (Transient) -// -// Copyright (C) 1991,1995 by -// -// MATRA DATAVISION, FRANCE -// -// This software is furnished in accordance with the terms and conditions -// of the contract and with the inclusion of the above copyright notice. -// This software or any other copy thereof may not be provided or otherwise -// be made available to any other person. No title to an ownership of the -// software is hereby transferred. -// -// At the termination of the contract, the software and all copies of this -// software must be deleted. -// -#ifndef _TOcaf_Application_HeaderFile -#define _TOcaf_Application_HeaderFile - -#ifndef _TDocStd_Application_HeaderFile -#include -#endif -#ifndef _Standard_CString_HeaderFile -#include -#endif -#include -class TDocStd_Document; - - -class TOcaf_Application : public TDocStd_Application -{ -public: - Standard_EXPORT TOcaf_Application (); - - // OCCT RTTI - DEFINE_STANDARD_RTTIEXT (TOcaf_Application, TDocStd_Application) -}; - -#endif diff --git a/samples/mfc/standard/06_Ocaf/src/TOcaf_Commands.cxx b/samples/mfc/standard/06_Ocaf/src/TOcaf_Commands.cxx deleted file mode 100755 index 745668cbf5..0000000000 --- a/samples/mfc/standard/06_Ocaf/src/TOcaf_Commands.cxx +++ /dev/null @@ -1,357 +0,0 @@ -// File: TOcaf_Commands.cxx -// Created: Tue Feb 8 17:56:02 2000 -// Author: Modelistation -// - - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include "TDataStd_Name.hxx" -#include "TFunction_Function.hxx" -#include "TOcafFunction_BoxDriver.hxx" -#include "TFunction_DriverTable.hxx" -#include "TOcafFunction_CylDriver.hxx" -#include "TDF_Reference.hxx" -#include "TOcafFunction_CutDriver.hxx" - -//======================================================================= -//function : TOcaf_Commands -//purpose : -//======================================================================= - -TOcaf_Commands::TOcaf_Commands(const TDF_Label& Main) -{ - MainLab = Main; -} - -//======================================================================= -//function : CreateBox -//purpose : Create a box containing a Named shape, a name, a Function -// and a Data structure containing box conctruction parameters -//======================================================================= - -TDF_Label TOcaf_Commands::CreateBox(Standard_Real x, Standard_Real y, Standard_Real z, Standard_Real w, Standard_Real l, Standard_Real h, const TCollection_ExtendedString& Name) -{ - // A data structure for our box: - // the box itself is attached to the BoxLabel label (as his name and his function attribute) - // its arguments (dimensions: width, length and height; and position: x, y, z) - // are attached to the child labels of the box: - // - // 0:1 Box Label ---> Name ---> Named shape ---> Function - // | - // 0:1:1 -- Width Label - // | - // 0:1:2 -- Length Label - // | - // 0:1:3 -- Height Label - // | - // 0:1:4 -- X Label - // | - // 0:1:5 -- Y Label - // | - // 0:1:6 -- Z Label - - // Create a new label in the data structure for the box - TDF_Label L = TDF_TagSource::NewChild(MainLab); - - // Create the data structure : Set the dimensions, position and name attributes - TDataStd_Real::Set(L.FindChild(1), w); - TDataStd_Real::Set(L.FindChild(2), l); - TDataStd_Real::Set(L.FindChild(3), h); - TDataStd_Real::Set(L.FindChild(4), x); - TDataStd_Real::Set(L.FindChild(5), y); - TDataStd_Real::Set(L.FindChild(6), z); - TDataStd_Name::Set(L, Name); - - - // Instantiate a TFunction_Function attribute connected to the current box driver - // and attach it to the data structure as an attribute of the Box Label - Handle(TFunction_Function) myFunction = TFunction_Function::Set(L, TOcafFunction_BoxDriver::GetID()); - - // Initialize and execute the box driver (look at the "Execute()" code) - Handle(TFunction_Logbook) log = TFunction_Logbook::Set(L); - - Handle(TFunction_Driver) myBoxDriver; - // Find the TOcafFunction_BoxDriver in the TFunction_DriverTable using its GUID - if(!TFunction_DriverTable::Get()->FindDriver(TOcafFunction_BoxDriver::GetID(), myBoxDriver)) return L; - - myBoxDriver->Init(L); - if (myBoxDriver->Execute(log)) MessageBoxW (NULL, L"DFunction_Execute : failed", L"Box", MB_ICONERROR); - - return L; -} - - -//======================================================================= -//function : CreateCyl -//purpose : Create a cylinder containing a Named shape, a name, a Function -// and a Data structure containing cylinder conctruction parameters -//======================================================================= - -TDF_Label TOcaf_Commands::CreateCyl(Standard_Real x, Standard_Real y, Standard_Real z, Standard_Real r, Standard_Real h, const TCollection_ExtendedString& Name) -{ - // A data structure for our cylinder: - // the cylinder itself is attached to the CylinderLabel label (as his name and his function attribute) - // its arguments (dimensions: radius and height; and position: x, y, z) - // are attached to the child labels of the cylinder: - // - // 0:1 Cylinder Label ---> Name ---> Named shape ---> Function - // | - // 0:1:1 -- Radius Label - // | - // 0:1:2 -- Height Label - // | - // 0:1:3 -- X Label - // | - // 0:1:4 -- Y Label - // | - // 0:1:5 -- Z Label - - // Create a new label in the data structure for the cylinder - TDF_Label L = TDF_TagSource::NewChild(MainLab); - - // Create the data structure : Set the dimensions, position and name attributes - TDataStd_Real::Set(L.FindChild(1), r); - TDataStd_Real::Set(L.FindChild(2), h); - TDataStd_Real::Set(L.FindChild(3), x); - TDataStd_Real::Set(L.FindChild(4), y); - TDataStd_Real::Set(L.FindChild(5), z); - TDataStd_Name::Set(L, Name); - - - // Instantiate a TFunction_Function attribute connected to the current cylinder driver - // and attach it to the data structure as an attribute of the Cylinder Label - Handle(TFunction_Function) myFunction = TFunction_Function::Set(L, TOcafFunction_CylDriver::GetID()); - - // Initialize and execute the cylinder driver (look at the "Execute()" code) - Handle(TFunction_Logbook) log = TFunction_Logbook::Set(L); - - Handle(TFunction_Driver) myCylDriver; - // Find the TOcafFunction_CylDriver in the TFunction_DriverTable using its GUID - if(!TFunction_DriverTable::Get()->FindDriver(TOcafFunction_CylDriver::GetID(), myCylDriver)) return L; - - myCylDriver->Init(L); - if (myCylDriver->Execute(log)) MessageBoxW (NULL, L"DFunction_Execute : failed", L"Cylinder", MB_ICONERROR); - - return L; -} - - -TDF_Label TOcaf_Commands::ModifyBox(Standard_Real x, Standard_Real y, Standard_Real z, Standard_Real w, Standard_Real l, Standard_Real h, const TCollection_ExtendedString &Name, Handle(TFunction_Logbook) &log) -{ - // Set the name attribute (if it's not null) - Handle(TDataStd_Name) myStdName; - if(Name.Length()) - TDataStd_Name::Set(MainLab, Name); - - // Set the dimensions and position attributes (if changed) - Handle(TDataStd_Real) curReal; - MainLab.FindChild(1).FindAttribute(TDataStd_Real::GetID(),curReal); - if(w!=curReal->Get()) - { - TDataStd_Real::Set(MainLab.FindChild(1), w); - // Set the label of the attribute as touched for next recomputation - log->SetTouched(curReal->Label()); - } - - MainLab.FindChild(2).FindAttribute(TDataStd_Real::GetID(),curReal); - if(l!=curReal->Get()) - { - TDataStd_Real::Set(MainLab.FindChild(2), l); - // Set the label of the attribute as touched for next recomputation - log->SetTouched(curReal->Label()); - } - - MainLab.FindChild(3).FindAttribute(TDataStd_Real::GetID(),curReal); - if(h!=curReal->Get()) - { - TDataStd_Real::Set(MainLab.FindChild(3), h); - // Set the label of the attribute as touched for next recomputation - log->SetTouched(curReal->Label()); - } - - MainLab.FindChild(4).FindAttribute(TDataStd_Real::GetID(),curReal); - if(x!=curReal->Get()) - { - TDataStd_Real::Set(MainLab.FindChild(4), x); - // Set the label of the attribute as touched for next recomputation - log->SetTouched(curReal->Label()); - } - - MainLab.FindChild(5).FindAttribute(TDataStd_Real::GetID(),curReal); - if(y!=curReal->Get()) - { - TDataStd_Real::Set(MainLab.FindChild(5), y); - // Set the label of the attribute as touched for next recomputation - log->SetTouched(curReal->Label()); - } - - MainLab.FindChild(6).FindAttribute(TDataStd_Real::GetID(),curReal); - if(z!=curReal->Get()) - { - TDataStd_Real::Set(MainLab.FindChild(6), z); - // Set the label of the attribute as touched for next recomputation - log->SetTouched(curReal->Label()); - } - - // Get the TFunction_Function used to create the box - Handle(TFunction_Function) TFF; - if ( !MainLab.FindAttribute(TFunction_Function::GetID(),TFF) ) - { - MessageBox (NULL, L"Object cannot be modify.", L"Modification", MB_ICONEXCLAMATION); - return MainLab; - } - - // Get the TFunction_FunctionDriver GUID used with the TFunction_Function - Standard_GUID myDriverID=TFF->GetDriverGUID(); - Handle(TFunction_Driver) myBoxDriver; - // Find the TOcafFunction_BoxDriver in the TFunction_DriverTable using its GUID - TFunction_DriverTable::Get()->FindDriver(myDriverID, myBoxDriver); - // Execute the cut if it must be (if an attribute changes) - myBoxDriver->Init(MainLab); - if (myBoxDriver->MustExecute(log)) - { - // Set the box touched, it will be useful to recompute an object which used this box as attribute - log->SetTouched(MainLab); - if(myBoxDriver->Execute(log)) - MessageBox (NULL, L"Recompute failed", L"Modify box", MB_ICONEXCLAMATION); - } - - return MainLab; -} - -TDF_Label TOcaf_Commands::ModifyCyl(Standard_Real x, Standard_Real y, Standard_Real z, Standard_Real r, Standard_Real h, const TCollection_ExtendedString &Name, Handle(TFunction_Logbook) &log) -{ - // Set the name attribute (if it's not null) - Handle(TDataStd_Name) myStdName; - if(Name.Length()) - TDataStd_Name::Set(MainLab, Name); - - // Set the dimensions and position attributes (if changed) - Handle(TDataStd_Real) curReal; - MainLab.FindChild(1).FindAttribute(TDataStd_Real::GetID(),curReal); - if(r!=curReal->Get()) - { - TDataStd_Real::Set(MainLab.FindChild(1), r); - // Set the label of the attribute as touched for next recomputation - log->SetTouched(curReal->Label()); - } - - MainLab.FindChild(2).FindAttribute(TDataStd_Real::GetID(),curReal); - if(h!=curReal->Get()) - { - TDataStd_Real::Set(MainLab.FindChild(2), h); - // Set the label of the attribute as touched for next recomputation - log->SetTouched(curReal->Label()); - } - - MainLab.FindChild(3).FindAttribute(TDataStd_Real::GetID(),curReal); - if(x!=curReal->Get()) - { - TDataStd_Real::Set(MainLab.FindChild(3), x); - // Set the label of the attribute as touched for next recomputation - log->SetTouched(curReal->Label()); - } - - MainLab.FindChild(4).FindAttribute(TDataStd_Real::GetID(),curReal); - if(y!=curReal->Get()) - { - TDataStd_Real::Set(MainLab.FindChild(4), y); - // Set the label of the attribute as touched for next recomputation - log->SetTouched(curReal->Label()); - } - - MainLab.FindChild(5).FindAttribute(TDataStd_Real::GetID(),curReal); - if(z!=curReal->Get()) - { - TDataStd_Real::Set(MainLab.FindChild(5), z); - // Set the label of the attribute as touched for next recomputation - log->SetTouched(curReal->Label()); - } - - // Get the TFunction_Function used to create the cylinder - Handle(TFunction_Function) TFF; - if ( !MainLab.FindAttribute(TFunction_Function::GetID(),TFF) ) - { - MessageBoxW (NULL, L"Object cannot be modify.", L"Modification", MB_ICONEXCLAMATION); - return MainLab; - } - - // Get the TFunction_FunctionDriver GUID used with the TFunction_Function - Standard_GUID myDriverID=TFF->GetDriverGUID(); - Handle(TFunction_Driver) myCylDriver; - // Find the TOcafFunction_CylDriver in the TFunction_DriverTable using its GUID - TFunction_DriverTable::Get()->FindDriver(myDriverID, myCylDriver); - // Execute the cut if it must be (if an attribute changes) - myCylDriver->Init(MainLab); - if (myCylDriver->MustExecute(log)) - { - // Set the cylinder touched, it will be useful to recompute an object which used this cylinder as attribute - log->SetTouched(MainLab); - if(myCylDriver->Execute(log)) - MessageBoxW (NULL, L"Recompute failed", L"Modify cylinder", MB_ICONEXCLAMATION); - } - - return MainLab; -} - -TDF_Label TOcaf_Commands::Cut(TDF_Label ObjectLab, TDF_Label ToolObjectLab) -{ - // A data structure for our cut operation: - // the result itself is attached to the Result label (as his name and his function attribute) - // its arguments (Original object label; Tool object label) are attached to the child - // labels of the Result Label: - // - // 0:1 Result Label ---> Name ---> Named shape ---> Function - // | - // 0:1:1 -- Original object label Label - // | - // 0:1:2 -- object label Label - // - - // Create a new label in the data structure for the box - TDF_Label L = TDF_TagSource::NewChild(MainLab); - - // Create the data structure : Set a reference attribute on the Original and the Tool objects, set the name attribute - TDF_Reference::Set(L.FindChild(1), ObjectLab); - TDF_Reference::Set(L.FindChild(2), ToolObjectLab); - Handle(TDataStd_Name) ObjectName; - ObjectLab.FindAttribute(TDataStd_Name::GetID(),ObjectName); - TDataStd_Name::Set(L, ObjectName->Get()); - - - // Instantiate a TFunction_Function attribute connected to the current cut driver - // and attach it to the data structure as an attribute of the Result Label - Handle(TFunction_Function) myFunction = TFunction_Function::Set(L, TOcafFunction_CutDriver::GetID()); - - // Initialize and execute the cut driver (look at the "Execute()" code) - Handle(TFunction_Logbook) log = TFunction_Logbook::Set(L); - - Handle(TFunction_Driver) myCutDriver; - // Find the TOcafFunction_CutDriver in the TFunction_DriverTable using its GUID - if(!TFunction_DriverTable::Get()->FindDriver(TOcafFunction_CutDriver::GetID(), myCutDriver)) return L; - - myCutDriver->Init(L); - if (myCutDriver->Execute(log)) MessageBoxW (NULL, L"DFunction_Execute : failed", L"Cut", MB_ICONERROR); - - return L; -} diff --git a/samples/mfc/standard/06_Ocaf/src/TOcaf_Commands.hxx b/samples/mfc/standard/06_Ocaf/src/TOcaf_Commands.hxx deleted file mode 100755 index bf85d5df81..0000000000 --- a/samples/mfc/standard/06_Ocaf/src/TOcaf_Commands.hxx +++ /dev/null @@ -1,85 +0,0 @@ -// File generated by CPPExt (Value) -// Copyright (C) 1991,1995 by -// -// MATRA DATAVISION, FRANCE -// -// This software is furnished in accordance with the terms and conditions -// of the contract and with the inclusion of the above copyright notice. -// This software or any other copy thereof may not be provided or otherwise -// be made available to any other person. No title to an ownership of the -// software is hereby transferred. -// -// At the termination of the contract, the software and all copies of this -// software must be deleted. - -#ifndef _TOcaf_Commands_HeaderFile -#define _TOcaf_Commands_HeaderFile - -#ifndef _TDF_Label_HeaderFile -#include -#endif -#ifndef _Standard_Real_HeaderFile -#include -#endif -#ifndef _TNaming_NamedShape_HeaderFile -#include -#endif -#ifndef _Standard_Integer_HeaderFile -#include -#endif -class TDF_Label; -class gp_Pnt; -class TopoDS_Shape; -class TNaming_NamedShape; -class gp_XYZ; -class TOcaf_Object; - -#ifndef _Standard_Macro_HeaderFile -#include -#endif -#include "TFunction_Logbook.hxx" - -class TOcaf_Commands { - -public: - TDF_Label Cut( TDF_Label ObjectLab, TDF_Label ToolObjectLab); - TDF_Label ModifyBox(Standard_Real x, Standard_Real y, Standard_Real z, Standard_Real w, Standard_Real l, Standard_Real h, const TCollection_ExtendedString& Name, Handle(TFunction_Logbook) &log); - TDF_Label CreateBox(Standard_Real x, Standard_Real y, Standard_Real z, Standard_Real w, Standard_Real l, Standard_Real h, const TCollection_ExtendedString& Name); - TDF_Label ModifyCyl(Standard_Real x, Standard_Real y, Standard_Real z, Standard_Real r, Standard_Real h, const TCollection_ExtendedString &Name, Handle(TFunction_Logbook) &log); - TDF_Label CreateCyl(Standard_Real x, Standard_Real y, Standard_Real z, Standard_Real r, Standard_Real h, const TCollection_ExtendedString& Name); - - // Methods PUBLIC - // -Standard_EXPORT TOcaf_Commands(const TDF_Label& Main); -//Standard_EXPORT Handle(TDataStd_TreeNode) Graph() ; - -protected: - - // Methods PROTECTED - // - - - // Fields PROTECTED - // - - -private: - - // Methods PRIVATE - // - - - // Fields PRIVATE - // -TDF_Label MainLab; -}; - - - - - -// other inline functions and methods (like "C++: function call" methods) -// - - -#endif diff --git a/samples/mfc/standard/07_Triangulation/CMakeLists.txt b/samples/mfc/standard/07_Triangulation/CMakeLists.txt deleted file mode 100644 index 1cf8c5f8fe..0000000000 --- a/samples/mfc/standard/07_Triangulation/CMakeLists.txt +++ /dev/null @@ -1,60 +0,0 @@ -cmake_minimum_required (VERSION 2.6) - -project (Triangulation) - -add_definitions (-DWINVER=0x0501 -DUNICODE -D_UNICODE) -set (CMAKE_MFC_FLAG 2) - -set (Triangulation_SRC_DIR ${MFC_STANDARD_SAMPLES_DIR}/07_Triangulation/src) -set (Triangulation_HEADER_FILES ${Triangulation_SRC_DIR}/ISession_Curve.h - ${Triangulation_SRC_DIR}/OCCDemo_Presentation.h - ${Triangulation_SRC_DIR}/Tesselate_Presentation.h - ${Triangulation_SRC_DIR}/TriangulationApp.h - ${Triangulation_SRC_DIR}/TriangulationDoc.h - ${Triangulation_SRC_DIR}/StdAfx.h ) -set (Triangulation_SOURCE_FILES ${Triangulation_SRC_DIR}/ISession_Curve.cpp - ${Triangulation_SRC_DIR}/OCCDemo_Presentation.cpp - ${Triangulation_SRC_DIR}/Tesselate_Presentation.cpp - ${Triangulation_SRC_DIR}/TriangulationApp.cpp - ${Triangulation_SRC_DIR}/TriangulationDoc.cpp - ${Triangulation_SRC_DIR}/StdAfx.cpp) - -set (Triangulation_RESOURCE_DIR ${MFC_STANDARD_SAMPLES_DIR}/07_Triangulation/res) -set (Triangulation_RESOURCE_HEADER ${Triangulation_RESOURCE_DIR}/resource.h) -set (Triangulation_RESOURCE_FILES ${Triangulation_RESOURCE_DIR}/Toolbar.bmp - ${Triangulation_RESOURCE_DIR}/Triangulation.rc) - -# groups in the VS solution -source_group ("Source Files" FILES ${Triangulation_SOURCE_FILES} - ${COMMON_WINMAIN_FILE}) - -source_group ("Header Files" FILES ${Triangulation_HEADER_FILES} - ${Triangulation_RESOURCE_HEADER}) - -source_group ("Resource Files" FILES ${Triangulation_RESOURCE_FILES}) - -add_executable (Triangulation WIN32 ${Triangulation_SOURCE_FILES} - ${Triangulation_HEADER_FILES} - ${COMMON_WINMAIN_FILE} - ${Triangulation_RESOURCE_HEADER} - ${Triangulation_RESOURCE_FILES}) - -set_property (TARGET Triangulation PROPERTY FOLDER "Samples/mfc") - -if (SINGLE_GENERATOR) - install (TARGETS Triangulation DESTINATION "${INSTALL_DIR_BIN}") -else() - install (TARGETS Triangulation - CONFIGURATIONS Release RelWithDebInfo - DESTINATION "${INSTALL_DIR_BIN}") - install (TARGETS Triangulation - CONFIGURATIONS Debug - DESTINATION "${INSTALL_DIR_BIN}d") -endif() - -include_directories (${CMAKE_BINARY_DIR}/inc - ${MFC_STANDARD_SAMPLES_DIR}/07_Triangulation - ${Triangulation_SRC_DIR} - ${MFC_STANDARD_SAMPLES_DIR}/Common) - -target_link_libraries (Triangulation mfcsample TKSTEP209 TKSTEPAttr TKBO) \ No newline at end of file diff --git a/samples/mfc/standard/07_Triangulation/adm/win/vc10/Triangulation.vcxproj b/samples/mfc/standard/07_Triangulation/adm/win/vc10/Triangulation.vcxproj deleted file mode 100644 index 9ba0b2c9a6..0000000000 --- a/samples/mfc/standard/07_Triangulation/adm/win/vc10/Triangulation.vcxproj +++ /dev/null @@ -1,321 +0,0 @@ - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {B50C10C8-5260-498B-A80F-48FFB4534360} - Triangulation - MFCProj - - - - Application - Dynamic - Unicode - $(VCPlatformToolSet) - - - Application - Dynamic - Unicode - $(VCPlatformToolSet) - - - Application - Dynamic - Unicode - $(VCPlatformToolSet) - - - Application - Dynamic - Unicode - $(VCPlatformToolSet) - - - - - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>10.0.30319.1 - ../../../../win32\$(VCFMT)\bin\ - .\win32\obj\ - false - ../../../../win64\$(VCFMT)\bin\ - .\win64\obj\ - false - ../../../../win32\$(VCFMT)\bind\ - .\win32\objd\ - true - ../../../../win64\$(VCFMT)\bind\ - .\win64\objd\ - true - - - - NDEBUG;%(PreprocessorDefinitions) - true - true - Win32 - .\win32\obj/Triangulation.tlb - - - - - MaxSpeed - OnlyExplicitInline - ..\..\..\..\Common;..\..\..\;$(CSF_OCCTIncludePath);..\..\..\src;%(AdditionalIncludeDirectories) - NDEBUG;_WINDOWS;WINVER=0x0501;%(PreprocessorDefinitions) - true - MultiThreadedDLL - true - Use - stdafx.h - .\win32\obj/Triangulation.pch - .\win32\obj/ - .\win32\obj/ - .\win32\obj/ - Level4 - true - Default - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - - - TKVCAF.lib;TKVrml.lib;TKStl.lib;TKBRep.lib;TKIGES.lib;TKShHealing.lib;TKSTEP.lib;TKSTEP209.lib;TKSTEPAttr.lib;TKSTEPBase.lib;TKXSBase.lib;TKBO.lib;TKBool.lib;TKCAF.lib;TKCDF.lib;TKernel.lib;TKFeat.lib;TKFillet.lib;TKG2d.lib;TKG3d.lib;TKGeomAlgo.lib;TKGeomBase.lib;TKHLR.lib;TKMath.lib;TKOffset.lib;TKPrim.lib;TKService.lib;TKTopAlgo.lib;TKMesh.lib;TKV3d.lib;TKOpenGl.lib;mfcsample.lib;%(AdditionalDependencies) - ../../../../win32\$(VCFMT)\bin/Triangulation.exe - true - ..\..\..\..\win32\$(VCFMT)\lib;$(CSF_OCCTLibPath);%(AdditionalLibraryDirectories) - ../../../../win32\$(VCFMT)\bin/Triangulation.pdb - Windows - MachineX86 - - - - - NDEBUG;%(PreprocessorDefinitions) - true - true - X64 - .\win64\obj/Triangulation.tlb - - - - - MaxSpeed - OnlyExplicitInline - ..\..\..\..\Common;..\..\..\;$(CSF_OCCTIncludePath);..\..\..\src;%(AdditionalIncludeDirectories) - NDEBUG;_WINDOWS;WINVER=0x0501;%(PreprocessorDefinitions) - true - MultiThreadedDLL - true - Use - stdafx.h - .\win64\obj/Triangulation.pch - .\win64\obj/ - .\win64\obj/ - .\win64\obj/ - Level4 - true - Default - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - - - TKVCAF.lib;TKVrml.lib;TKStl.lib;TKBRep.lib;TKIGES.lib;TKShHealing.lib;TKSTEP.lib;TKSTEP209.lib;TKSTEPAttr.lib;TKSTEPBase.lib;TKXSBase.lib;TKBO.lib;TKBool.lib;TKCAF.lib;TKCDF.lib;TKernel.lib;TKFeat.lib;TKFillet.lib;TKG2d.lib;TKG3d.lib;TKGeomAlgo.lib;TKGeomBase.lib;TKHLR.lib;TKMath.lib;TKOffset.lib;TKPrim.lib;TKService.lib;TKTopAlgo.lib;TKMesh.lib;TKV3d.lib;TKOpenGl.lib;mfcsample.lib;%(AdditionalDependencies) - ../../../../win64\$(VCFMT)\bin/Triangulation.exe - true - ..\..\..\..\win64\$(VCFMT)\lib;$(CSF_OCCTLibPath);%(AdditionalLibraryDirectories) - ../../../../win64\$(VCFMT)\bin/Triangulation.pdb - Windows - MachineX64 - - - - - _DEBUG;%(PreprocessorDefinitions) - true - true - Win32 - .\win32\objd/Triangulation.tlb - - - - - Disabled - ..\..\..\..\Common;..\..\..\;$(CSF_OCCTIncludePath);..\..\..\src;%(AdditionalIncludeDirectories) - _DEBUG;_WINDOWS;WINVER=0x0501;%(PreprocessorDefinitions) - EnableFastChecks - MultiThreadedDebugDLL - Use - stdafx.h - .\win32\objd/Triangulation.pch - .\win32\objd/ - .\win32\objd/ - .\win32\objd/ - Level4 - true - EditAndContinue - Default - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - - - TKVCAF.lib;TKVrml.lib;TKStl.lib;TKBRep.lib;TKIGES.lib;TKShHealing.lib;TKSTEP.lib;TKSTEP209.lib;TKSTEPAttr.lib;TKSTEPBase.lib;TKXSBase.lib;TKBO.lib;TKBool.lib;TKCAF.lib;TKCDF.lib;TKernel.lib;TKFeat.lib;TKFillet.lib;TKG2d.lib;TKG3d.lib;TKGeomAlgo.lib;TKGeomBase.lib;TKHLR.lib;TKMath.lib;TKOffset.lib;TKPrim.lib;TKService.lib;TKTopAlgo.lib;TKMesh.lib;TKV3d.lib;TKOpenGl.lib;mfcsample.lib;%(AdditionalDependencies) - ../../../../win32\$(VCFMT)\bind/Triangulation.exe - true - ..\..\..\..\win32\$(VCFMT)\libd;$(CSF_OCCTLibPath);%(AdditionalLibraryDirectories) - true - ../../../../win32\$(VCFMT)\bind/Triangulation.pdb - Windows - MachineX86 - - - - - _DEBUG;%(PreprocessorDefinitions) - true - true - X64 - .\win64\objd/Triangulation.tlb - - - - - Disabled - ..\..\..\..\Common;..\..\..\;$(CSF_OCCTIncludePath);..\..\..\src;%(AdditionalIncludeDirectories) - _DEBUG;_WINDOWS;WINVER=0x0501;%(PreprocessorDefinitions) - EnableFastChecks - MultiThreadedDebugDLL - Use - stdafx.h - .\win64\objd/Triangulation.pch - .\win64\objd/ - .\win64\objd/ - .\win64\objd/ - Level4 - true - ProgramDatabase - Default - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - - - TKVCAF.lib;TKVrml.lib;TKStl.lib;TKBRep.lib;TKIGES.lib;TKShHealing.lib;TKSTEP.lib;TKSTEP209.lib;TKSTEPAttr.lib;TKSTEPBase.lib;TKXSBase.lib;TKBO.lib;TKBool.lib;TKCAF.lib;TKCDF.lib;TKernel.lib;TKFeat.lib;TKFillet.lib;TKG2d.lib;TKG3d.lib;TKGeomAlgo.lib;TKGeomBase.lib;TKHLR.lib;TKMath.lib;TKOffset.lib;TKPrim.lib;TKService.lib;TKTopAlgo.lib;TKMesh.lib;TKV3d.lib;TKOpenGl.lib;mfcsample.lib;%(AdditionalDependencies) - ../../../../win64\$(VCFMT)\bind/Triangulation.exe - true - ..\..\..\..\win64\$(VCFMT)\libd;$(CSF_OCCTLibPath);%(AdditionalLibraryDirectories) - true - ../../../../win64\$(VCFMT)\bind/Triangulation.pdb - Windows - MachineX64 - - - - - - - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - Create - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - Create - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - Create - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - Create - - - - - - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - - - - - - - - - - - - - - - - - - - - {2d6cbbe8-6965-4016-b503-0d715ae26691} - false - - - - - - \ No newline at end of file diff --git a/samples/mfc/standard/07_Triangulation/adm/win/vc10/Triangulation.vcxproj.filters b/samples/mfc/standard/07_Triangulation/adm/win/vc10/Triangulation.vcxproj.filters deleted file mode 100644 index 91717b535c..0000000000 --- a/samples/mfc/standard/07_Triangulation/adm/win/vc10/Triangulation.vcxproj.filters +++ /dev/null @@ -1,67 +0,0 @@ - - - - - {1ffd2e2a-cb4e-4b01-93a8-1689da39afe5} - cpp;c;cxx;rc;def;r;odl;idl;hpj;bat - - - {f9d99f5f-32c4-422c-b52f-1e0132811a39} - h;hpp;hxx;hm;inl - - - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - - - Source Files - - - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - - - - \ No newline at end of file diff --git a/samples/mfc/standard/07_Triangulation/res/RCa05792 b/samples/mfc/standard/07_Triangulation/res/RCa05792 deleted file mode 100755 index d21b55380d9760ffc3a0f036c45d1a73a7209089..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 12346 zcmeI2Z%-RZ62|-WN%tLmMv6ANm5+bPF89tDl2}UsVIa9vB+E;HMIwN($#T+t_hr>d)a#a+8AcjL}o%dNS#``!KBebKe!cHOD}HE><` z(H*)yJsJ2Xx9&_AtvKwz37hhxe$+*WWLhB2XVaCzn=T6u9l=Y_hY>G zlAOD*dS+7Gsx6!t|JYNza(ANC@tomf5}>0q(R@%}+O}u2)F5Ow(QI zb0969NY8zDAdMYKgI)bQkS_P!KlEgv?~iU{8;phXJdBmI-1`v`jp>2Sj@6~!XZ9R;EZ@Dfz+H{}(j&)M*4A=A z$htc6q>g)?v9599r!gA-JoWtx_4rGnNAuyYqSqDreJ*@=AU{2ko%CeCLs{{jF8KUg zSF5(?v1lC0SBC1ful}zij$zh@LRS1^Lteq?_S9!zeNJ?L@4Y2FF)HuXqOWm&a6gLk zK<&1teX1>ndTZFSBGdyNFXaOx^*fWbBf(J5d3vt#u1SJ7`UEM#)UU!cw1Xv7C5p?^0j3VRithExc)^JVN$d;(plVX7nmEcx4ftL z8|Mhk7!2R$k#EXw(c8wtBTr-YaO&^-vQOeOIZP@# z#~-J3EE-**5q|XFk?l})4m4)y9s3OBX(?yNZ)owq!O}eU9IjSd21G3}cFUvbT4qKU z!Obe472#^Y(Ajr6|4BX1a^$uwyLy39p#Ma^3Wt#_k*pV7|0YZ)&w=+udCe^6SgL04 zdZT>baINeUWHA}$!T1=d-WI4BP<^3Gdb*X~z8>mA*h@!7T1+hXpPPs2f?py6;Q zcEw{0&$-7o^iz>5HR<|TXa?SHOS4B_v+J@vawhIjOylmhawV{y6V;9 ze%1DU!CtJ&?!5Gi^4nLh$AzWb^+@{k$aZ8YR7{4-Wc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^&{IC?0`C+hJ! zvFKRVxC%WhZ%$TZ4|VJEEEIUa8i(J%96RG1&XI)yd_-$)O zbifJG+$lY>pqG0l>W`fS-H=AW#PsxKnm?N6uwbI(bI$45>@?G%tK|K zGdM=4Ja@1zZ;UN%nNKo?Q#LjR;`eh;BpL;5;!Frup4!fxpP9u@Lm-QncxKb-8RJx< a82^_Ke}Y6+X~WoU#5cls(0!gWJO2R#4?2bb diff --git a/samples/mfc/standard/07_Triangulation/res/Toolbar.bmp b/samples/mfc/standard/07_Triangulation/res/Toolbar.bmp deleted file mode 100755 index 19f56e05119bda195fce5ae9ddfc6550d27a4c36..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2358 zcmc(gJ&xNj5Jo3J07=+FF%Uq#o8$yJKwuzM?m`=jFr~Y=RO?%8zl{%)L+A#|`-Y?# z!QNswiw!N3R)O+3}b*Rz$m8 zF6{bY_RHp35|fWqEb&c;{ZF1*Kgs_X&AQRfNkZ4Z+ObxK%%(|~c;l!`l4aei#C^@1 zZR#-(xhsw+0 zj725?HiL}AYZu;~r)0&W9mMN7MmLJr=|Dw?dzH7n#mf$g=MIJ@oQ?!l?0Ac3y;3=g z(w#LV^%^=HR!Te%mAA|3!@qn6=M6kSNm^6ld5Z^*T)BT|x;^`sbx-)WtMR<@&zcYx z-gSM>6B+dUokud5>V=#ldGK%NZ>i7h-e37MYw<57E<9>q=g&)Du>(a5s{g>#4!Qr9 zc*a=sS9#deP&{2Aaq4n$!b9T?QFwj`%zArsi<&*XU*sIa4Pa?-Vd=K}9V4l3^`Aeg zdV$BK<0Dfdy*EFRQ}|F5O3c+{u0*x%VKNo>FDnlqPg}@cj!H$==uB1 zBdP;2TvyCJV-Lhrjxg>XYyPn4S`~&W#@{dcM?!KP`t;Px*N_VOczfO-ZdHU0 diff --git a/samples/mfc/standard/07_Triangulation/res/Triangulation.rc b/samples/mfc/standard/07_Triangulation/res/Triangulation.rc deleted file mode 100755 index ab6b27c663..0000000000 --- a/samples/mfc/standard/07_Triangulation/res/Triangulation.rc +++ /dev/null @@ -1,232 +0,0 @@ -// Microsoft Visual C++ generated resource script. -// -#include "resource.h" - -#define APSTUDIO_READONLY_SYMBOLS -///////////////////////////////////////////////////////////////////////////// -// -// Generated from the TEXTINCLUDE 2 resource. -// -#include "afxres.h" -#include "..\..\Common\res\OCC_Resource.h" -///////////////////////////////////////////////////////////////////////////// -#undef APSTUDIO_READONLY_SYMBOLS - -///////////////////////////////////////////////////////////////////////////// -// English (U.S.) resources - -#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) -#ifdef _WIN32 -LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US -#pragma code_page(1252) -#endif //_WIN32 - -#ifdef APSTUDIO_INVOKED -///////////////////////////////////////////////////////////////////////////// -// -// TEXTINCLUDE -// - -1 TEXTINCLUDE -BEGIN - "resource.h\0" -END - -2 TEXTINCLUDE -BEGIN - "#include ""afxres.h""\r\n" - "#include ""..\\..\\..\\Common\\res\\OCC_Resource.h""\0" -END - -3 TEXTINCLUDE -BEGIN - "#define _AFX_NO_SPLITTER_RESOURCES\r\n" - "#define _AFX_NO_OLE_RESOURCES\r\n" - "#define _AFX_NO_TRACKER_RESOURCES\r\n" - "#define _AFX_NO_PROPERTY_RESOURCES\r\n" - "\r\n" - "#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)\r\n" - "#ifdef _WIN32\r\n" - "LANGUAGE 9, 1\r\n" - "#pragma code_page(1252)\r\n" - "#endif\r\n" - "#include ""afxres.rc"" // Standard components\r\n" - "#endif\0" -END - -#endif // APSTUDIO_INVOKED - - -///////////////////////////////////////////////////////////////////////////// -// -// Bitmap -// - -IDR_MAINFRAME BITMAP "Toolbar.bmp" - -///////////////////////////////////////////////////////////////////////////// -// -// Toolbar -// - -IDR_MAINFRAME TOOLBAR 20, 20 -BEGIN - BUTTON ID_FILE_NEW - SEPARATOR - BUTTON ID_TRIANGU - BUTTON ID_Visu - SEPARATOR - BUTTON ID_Clear - SEPARATOR - BUTTON ID_BUTTONStart - BUTTON ID_BUTTONPrev - BUTTON ID_BUTTONRepeat - BUTTON ID_BUTTONNext - BUTTON ID_BUTTONEnd - BUTTON ID_DUMP_VIEW - SEPARATOR - BUTTON ID_APP_ABOUT -END - - -///////////////////////////////////////////////////////////////////////////// -// -// Menu -// - -IDR_MAINFRAME MENU -BEGIN - POPUP "&File" - BEGIN - MENUITEM "&New\tCtrl+N", ID_FILE_NEW - MENUITEM SEPARATOR - MENUITEM "E&xit", ID_APP_EXIT - END - POPUP "&View" - BEGIN - MENUITEM "&Toolbar", ID_VIEW_TOOLBAR - MENUITEM "&Status Bar", ID_VIEW_STATUS_BAR - END - POPUP "&Help" - BEGIN - MENUITEM "&About Triangulation...", ID_APP_ABOUT - END -END - -IDR_3DTYPE MENU -BEGIN - POPUP "&File" - BEGIN - MENUITEM "&New\tCtrl+N", ID_FILE_NEW - MENUITEM "&Close", ID_FILE_CLOSE - MENUITEM SEPARATOR - MENUITEM "E&xit", ID_APP_EXIT - END - POPUP "&View" - BEGIN - MENUITEM "&Toolbar", ID_VIEW_TOOLBAR - MENUITEM "&Status Bar", ID_VIEW_STATUS_BAR - END - POPUP "&Window" - BEGIN - MENUITEM "&New Window", ID_WINDOW_NEW - MENUITEM "&Cascade", ID_WINDOW_CASCADE - MENUITEM "&Tile", ID_WINDOW_TILE_HORZ - MENUITEM "&Arrange Icons", ID_WINDOW_ARRANGE - END - POPUP "&Help" - BEGIN - MENUITEM "&About Triangulation...", ID_APP_ABOUT - END -END - - -///////////////////////////////////////////////////////////////////////////// -// -// Version -// - -VS_VERSION_INFO VERSIONINFO - FILEVERSION 1,0,0,1 - PRODUCTVERSION 1,0,0,1 - FILEFLAGSMASK 0x3fL -#ifdef _DEBUG - FILEFLAGS 0x1L -#else - FILEFLAGS 0x0L -#endif - FILEOS 0x4L - FILETYPE 0x1L - FILESUBTYPE 0x0L -BEGIN - BLOCK "StringFileInfo" - BEGIN - BLOCK "040904b0" - BEGIN - VALUE "FileDescription", "Viewer MFC Application" - VALUE "FileVersion", "1, 0, 0, 1" - VALUE "InternalName", "Viewer" - VALUE "LegalCopyright", "Copyright (C) 1997" - VALUE "OriginalFilename", "Viewer.EXE" - VALUE "ProductName", "SampleTriangulation Application" - VALUE "ProductVersion", "1, 0, 0, 1" - END - END - BLOCK "VarFileInfo" - BEGIN - VALUE "Translation", 0x409, 1200 - END -END - - -///////////////////////////////////////////////////////////////////////////// -// -// String Table -// - -STRINGTABLE -BEGIN - IDR_MAINFRAME "Triangulation" - IDR_3DTYPE "\nTriangulation\n\n\n\n.Document\n Document" -END - -STRINGTABLE -BEGIN - ID_BOX "Create and display a box\nBox" - ID_Cylinder "Create and display a cylinder\nCylinder" - ID_TRIANGU "Compute triangulation on a shape\nMesh " - ID_Clear "Remove triangulation from a shape\nClear" - ID_Visu "Display triangulation\nDisplay triangulation" - ID_BUTTONPrev "Press to go to the previous sample\nPrevious sample (PgUp)" - ID_BUTTONRepeat "Press to repeat the current sample\nRepeat sample (Space)" - ID_BUTTONStart "Press to go to the first sample\nFirst sample (Home)" - ID_BUTTONNext "Press to go to the next sample\nNext sample (PgDn)" - ID_BUTTONEnd "Press to go to the last sample\nLast sample (End)" - ID_DUMP_VIEW "Save current frame into an image file\nExport view (F12)" -END - -#endif // English (U.S.) resources -///////////////////////////////////////////////////////////////////////////// - - - -#ifndef APSTUDIO_INVOKED -///////////////////////////////////////////////////////////////////////////// -// -// Generated from the TEXTINCLUDE 3 resource. -// -#define _AFX_NO_SPLITTER_RESOURCES -#define _AFX_NO_OLE_RESOURCES -#define _AFX_NO_TRACKER_RESOURCES -#define _AFX_NO_PROPERTY_RESOURCES - -#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) -#ifdef _WIN32 -LANGUAGE 9, 1 -#pragma code_page(1252) -#endif -#include "afxres.rc" // Standard components -#endif -///////////////////////////////////////////////////////////////////////////// -#endif // not APSTUDIO_INVOKED - diff --git a/samples/mfc/standard/07_Triangulation/res/resource.h b/samples/mfc/standard/07_Triangulation/res/resource.h deleted file mode 100755 index 1291556db0..0000000000 --- a/samples/mfc/standard/07_Triangulation/res/resource.h +++ /dev/null @@ -1,28 +0,0 @@ -//{{NO_DEPENDENCIES}} -// Microsoft Visual C++ generated include file. -// Used by TopologyTriangulation.rc -// -#define ID_BOX 802 -#define ID_Cylinder 803 -#define ID_TRIANGU 804 -#define ID_Clear 805 -#define ID_Visu 806 -#define ID_BUTTONPrev 807 -#define ID_BUTTONRepeat 808 -#define ID_BUTTONStart 809 -#define ID_BUTTONNext 810 -#define ID_BUTTONEnd 811 -#define ID_BUTTON812 812 -#define ID_DUMP_VIEW 812 - -// Next default values for new objects -// -#ifdef APSTUDIO_INVOKED -#ifndef APSTUDIO_READONLY_SYMBOLS -#define _APS_3D_CONTROLS 1 -#define _APS_NEXT_RESOURCE_VALUE 133 -#define _APS_NEXT_COMMAND_VALUE 813 -#define _APS_NEXT_CONTROL_VALUE 1002 -#define _APS_NEXT_SYMED_VALUE 101 -#endif -#endif diff --git a/samples/mfc/standard/07_Triangulation/src/ISession_Curve.cpp b/samples/mfc/standard/07_Triangulation/src/ISession_Curve.cpp deleted file mode 100755 index 6d6fb6de72..0000000000 --- a/samples/mfc/standard/07_Triangulation/src/ISession_Curve.cpp +++ /dev/null @@ -1,52 +0,0 @@ -// ISession_Curve.cpp: implementation of the ISession_Curve class. -// -////////////////////////////////////////////////////////////////////// - -#include "stdafx.h" -#include "ISession_Curve.h" -#include -#include -#include -#include -#include - -IMPLEMENT_STANDARD_RTTIEXT(ISession_Curve,AIS_InteractiveObject) - -#ifdef _DEBUG -#undef THIS_FILE -static char THIS_FILE[]=__FILE__; -#endif - -////////////////////////////////////////////////////////////////////// -// Construction/Destruction -////////////////////////////////////////////////////////////////////// - - -ISession_Curve::ISession_Curve(const Handle(Geom_Curve)& aCurve) -:AIS_InteractiveObject(),myCurve(aCurve) -{ -} - -ISession_Curve::~ISession_Curve() -{ - -} -void ISession_Curve::Compute(const Handle(PrsMgr_PresentationManager)& /*aPresentationManager*/, - const Handle(Prs3d_Presentation)& aPresentation, - const Standard_Integer /*aMode*/) -{ - GeomAdaptor_Curve anAdaptorCurve(myCurve); - if (hasOwnColor) - myDrawer->LineAspect()->SetColor (myDrawer->Color()); - myDrawer->Link()->SetDiscretisation(100); - myDrawer->Link()->SetMaximalParameterValue(500); - - StdPrs_Curve::Add (aPresentation, anAdaptorCurve, myDrawer); -} - -void ISession_Curve::ComputeSelection(const Handle(SelectMgr_Selection)& /*aSelection*/, - const Standard_Integer /*aMode*/) -{ -} - - diff --git a/samples/mfc/standard/07_Triangulation/src/ISession_Curve.h b/samples/mfc/standard/07_Triangulation/src/ISession_Curve.h deleted file mode 100755 index c1c955fdf9..0000000000 --- a/samples/mfc/standard/07_Triangulation/src/ISession_Curve.h +++ /dev/null @@ -1,32 +0,0 @@ -// ISession_Curve.h: interface for the ISession_Curve class. -// -////////////////////////////////////////////////////////////////////// - -#if !defined(AFX_ISESSION_CURVE_H__F981CB93_A3CC_11D1_8DA3_0800369C8A03__INCLUDED_) -#define AFX_ISESSION_CURVE_H__F981CB93_A3CC_11D1_8DA3_0800369C8A03__INCLUDED_ - -#if _MSC_VER >= 1000 -#pragma once -#endif // _MSC_VER >= 1000 -#include -#include -#include -#include -class ISession_Curve; -DEFINE_STANDARD_HANDLE(ISession_Curve,AIS_InteractiveObject) - -class ISession_Curve : public AIS_InteractiveObject -{ -public: - ISession_Curve(const Handle(Geom_Curve)& aCurve); - virtual ~ISession_Curve(); -DEFINE_STANDARD_RTTIEXT(ISession_Curve,AIS_InteractiveObject) -private: - -Standard_EXPORT virtual void Compute(const Handle(PrsMgr_PresentationManager)& aPresentationManager,const Handle(Prs3d_Presentation)& aPresentation,const Standard_Integer aMode = 0) ; -void ComputeSelection(const Handle(SelectMgr_Selection)& aSelection,const Standard_Integer aMode) ; - -Handle(Geom_Curve) myCurve; -}; - -#endif // !defined(AFX_ISESSION_CURVE_H__F981CB93_A3CC_11D1_8DA3_0800369C8A03__INCLUDED_) diff --git a/samples/mfc/standard/07_Triangulation/src/OCCDemo_Presentation.cpp b/samples/mfc/standard/07_Triangulation/src/OCCDemo_Presentation.cpp deleted file mode 100755 index fb4968a7f8..0000000000 --- a/samples/mfc/standard/07_Triangulation/src/OCCDemo_Presentation.cpp +++ /dev/null @@ -1,331 +0,0 @@ -// OCCDemo_Presentation.cpp: implementation of the OCCDemo_Presentation class. -// This is a base class for all presentations -////////////////////////////////////////////////////////////////////// - -#include "stdafx.h" -#include "OCCDemo_Presentation.h" -#include -#include "TriangulationDoc.h" -#include "ISession_Curve.h" - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#define MAX_PARAM 1000 // if a surface parameter is infinite, it is assigned -// this value in order to display the "infinit" object in the viewer. - - -Standard_Boolean OCCDemo_Presentation::WaitForInput (unsigned long aMilliSeconds) -{ - //::WaitForSingleObject(::CreateEvent (NULL, FALSE, FALSE, NULL), aMilliSeconds); - if (::MsgWaitForMultipleObjects(0, NULL, FALSE, aMilliSeconds, - QS_KEY | QS_MOUSEBUTTON) != WAIT_TIMEOUT) - { - MSG msg; - if (::PeekMessage (&msg, NULL, 0, 0, PM_NOREMOVE)) - { - if (msg.message == WM_KEYUP) - { - ::PeekMessage (&msg, NULL, 0, 0, PM_REMOVE); - return WaitForInput (aMilliSeconds); - } - else - return Standard_True; - } - } - return Standard_False; -} - -//================================================================ -// Function : fixParam -// Purpose : assigns a finite value to theParam if it's infinite -// (equal to +- Precision::Infinite()) -//================================================================ -static Standard_Boolean fixParam(Standard_Real& theParam) -{ - Standard_Boolean aResult = Standard_False; - if (Precision::IsNegativeInfinite(theParam)) - { - theParam = -MAX_PARAM; - aResult = Standard_True; - } - if (Precision::IsPositiveInfinite(theParam)) - { - theParam = MAX_PARAM; - aResult = Standard_True; - } - return aResult; -} - -//================================================================ -// Function : DrawSurface -// Purpose : displays a given geometric surface in 3d viewer -// (creates a finite face and displays it) -//================================================================ -Handle(AIS_InteractiveObject) OCCDemo_Presentation::drawSurface - (const Handle(Geom_Surface)& theSurface, - const Quantity_Color& theColor, - const Standard_Boolean toDisplay) -{ - Standard_Real u1, u2, v1, v2; - theSurface->Bounds(u1,u2,v1,v2); - fixParam(u1); - fixParam(u2); - fixParam(v1); - fixParam(v2); - - Handle(AIS_Shape) aGraphicSurface = - new AIS_Shape(BRepBuilderAPI_MakeFace (theSurface, u1, u2, v1, v2, Precision::Confusion())); - - getAISContext()->SetMaterial(aGraphicSurface, Graphic3d_NOM_PLASTIC, toDisplay); - getAISContext()->SetColor(aGraphicSurface, theColor, toDisplay); - if (toDisplay) { - if (FitMode){ - getAISContext()->Display (aGraphicSurface, Standard_False); - CTriangulationDoc::Fit(); - } - else - getAISContext()->Display (aGraphicSurface, Standard_True); - } - - return aGraphicSurface; -} - -//================================================================ -// Function : DrawCurve -// Purpose : displays a given curve 3d -//================================================================ -Handle(AIS_InteractiveObject) OCCDemo_Presentation::drawCurve - (const Handle(Geom_Curve)& theCurve, - const Quantity_Color& theColor, - const Standard_Boolean toDisplay) -{ - Handle(ISession_Curve) aGraphicCurve = new ISession_Curve (theCurve); - - getAISContext()->SetColor (aGraphicCurve, theColor, toDisplay); - aGraphicCurve->Attributes()->Link()->SetLineArrowDraw(Standard_False); - if (toDisplay){ - if (FitMode){ - getAISContext()->Display (aGraphicCurve, Standard_False); - CTriangulationDoc::Fit(); - } - else - getAISContext()->Display (aGraphicCurve, Standard_True); - } - - return aGraphicCurve; -} - -//================================================================ -// Function : DrawCurve -// Purpose : displays a given curve 2d -//================================================================ -Handle(AIS_InteractiveObject) OCCDemo_Presentation::drawCurve - (const Handle(Geom2d_Curve)& theCurve, - const Quantity_Color& theColor, - const Standard_Boolean toDisplay, - const gp_Ax2& aPosition) -{ - // create 3D curve in plane - Handle(Geom_Curve) aCurve3d; - if (theCurve->IsKind(STANDARD_TYPE(Geom2d_OffsetCurve))) - { - Handle(Geom2d_OffsetCurve) aOffCurve = - Handle(Geom2d_OffsetCurve)::DownCast(theCurve); - Handle(Geom_Curve) aBasCurve3d = - GeomAPI::To3d (aOffCurve->BasisCurve(), gp_Pln(aPosition)); - Standard_Real aDist = aOffCurve->Offset(); - aCurve3d = new Geom_OffsetCurve (aBasCurve3d, aDist, aPosition.Direction()); - } - else - { - aCurve3d = GeomAPI::To3d (theCurve, gp_Pln(aPosition)); - } - return drawCurve (aCurve3d, theColor, toDisplay); -} - -//================================================================ -// Function : drawPoint -// Purpose : displays a given point -//================================================================ -Handle(AIS_Point) OCCDemo_Presentation::drawPoint - (const gp_Pnt& aPnt, - const Quantity_Color& theColor, - const Standard_Boolean toDisplay) -{ - Handle(AIS_Point) aGraphicPoint = new AIS_Point (new Geom_CartesianPoint(aPnt)); - - getAISContext()->SetColor (aGraphicPoint, theColor, toDisplay); - if (toDisplay) { - getAISContext()->Display (aGraphicPoint, Standard_True); - //COCCDemoDoc::Fit(); - } - - return aGraphicPoint; -} - -//================================================================ -// Function : drawVector -// Purpose : displays a given vector in 3d viewer -// (segment of line starting at thePnt with the arrow at the end, -// the length of segment is the length of the vector) -//================================================================ -Handle(AIS_InteractiveObject) OCCDemo_Presentation::drawVector - (const gp_Pnt& thePnt, - const gp_Vec& theVec, - const Quantity_Color& theColor, - const Standard_Boolean toDisplay) -{ - Standard_Real aLength = theVec.Magnitude(); - if (aLength < Precision::Confusion()) - return Handle(AIS_InteractiveObject)(); - - Handle(Geom_Curve) aCurve = new Geom_Line (thePnt, theVec); - aCurve = new Geom_TrimmedCurve (aCurve, 0, aLength); - - Handle(ISession_Curve) aGraphicCurve = new ISession_Curve (aCurve); - - getAISContext()->SetColor (aGraphicCurve, theColor, toDisplay); - Handle(Prs3d_Drawer) aDrawer = aGraphicCurve->Attributes()->Link(); - aDrawer->SetLineArrowDraw(Standard_True); - aDrawer->ArrowAspect()->SetLength(aLength/10); - if (toDisplay) { - if (FitMode){ - getAISContext()->Display (aGraphicCurve, Standard_False); - CTriangulationDoc::Fit(); - } - else - getAISContext()->Display (aGraphicCurve, Standard_True); - } - - return aGraphicCurve; -} - - -Handle(AIS_Shape) OCCDemo_Presentation::drawShape - (const TopoDS_Shape& theShape,const Quantity_Color& theColor, - const Standard_Boolean toDisplay) -{ - Handle(AIS_Shape) aGraphicShape = new AIS_Shape(theShape); - - getAISContext()->SetMaterial(aGraphicShape, Graphic3d_NOM_PLASTIC, toDisplay); - getAISContext()->SetColor (aGraphicShape, theColor, toDisplay); - if (toDisplay){ - if (FitMode){ - getAISContext()->Display (aGraphicShape, Standard_False); - CTriangulationDoc::Fit(); - } - else - getAISContext()->Display (aGraphicShape, Standard_True); - } - - return aGraphicShape; -} - -Handle(AIS_Shape) OCCDemo_Presentation::drawShape - (const TopoDS_Shape& theShape, - const Graphic3d_NameOfMaterial theMaterial, - const Standard_Boolean toDisplay) -{ - Handle(AIS_Shape) aGraphicShape = new AIS_Shape(theShape); - - getAISContext()->SetMaterial(aGraphicShape, theMaterial, toDisplay); - if (toDisplay) { - if (FitMode){ - getAISContext()->Display (aGraphicShape, Standard_False); - CTriangulationDoc::Fit(); - } - else - getAISContext()->Display (aGraphicShape, Standard_True); - } - - return aGraphicShape; -} -/* -void OCCDemo_Presentation::GetViewCenter(Standard_Real& Xc, Standard_Real& Yc) -{ - CMDIFrameWnd *pFrame = (CMDIFrameWnd*)AfxGetApp()->m_pMainWnd; - CMDIChildWnd *pChild = (CMDIChildWnd *) pFrame->GetActiveFrame(); - OCC_3dView *pView = (OCC_3dView*)pChild->GetActiveView(); - pView->GetViewCenter(Xc,Yc); -} - -void OCCDemo_Presentation::SetViewCenter(Standard_Real Xc, Standard_Real Yc) -{ - CMDIFrameWnd *pFrame = (CMDIFrameWnd*)AfxGetApp()->m_pMainWnd; - CMDIChildWnd *pChild = (CMDIChildWnd *) pFrame->GetActiveFrame(); - COCCDemoView *pView = (COCCDemoView *) pChild->GetActiveView(); - pView->SetViewCenter(Xc,Yc); -} - -void OCCDemo_Presentation::GetViewEye(Standard_Real& X, Standard_Real& Y, Standard_Real& Z) -{ - CMDIFrameWnd *pFrame = (CMDIFrameWnd*)AfxGetApp()->m_pMainWnd; - CMDIChildWnd *pChild = (CMDIChildWnd *) pFrame->GetActiveFrame(); - COCCDemoView *pView = (COCCDemoView *) pChild->GetActiveView(); - pView->GetViewEye(X,Y,Z); -} - -void OCCDemo_Presentation::SetViewEye(Standard_Real X, Standard_Real Y, Standard_Real Z) -{ - CMDIFrameWnd *pFrame = (CMDIFrameWnd*)AfxGetApp()->m_pMainWnd; - CMDIChildWnd *pChild = (CMDIChildWnd *) pFrame->GetActiveFrame(); - COCCDemoView *pView = (COCCDemoView *) pChild->GetActiveView(); - pView->SetViewEye(X,Y,Z); -} - -Standard_Real OCCDemo_Presentation::GetViewScale() -{ - CMDIFrameWnd *pFrame = (CMDIFrameWnd*)AfxGetApp()->m_pMainWnd; - CMDIChildWnd *pChild = (CMDIChildWnd *) pFrame->GetActiveFrame(); - COCCDemoView *pView = (COCCDemoView *) pChild->GetActiveView(); - return pView->GetViewScale(); -} - -void OCCDemo_Presentation::SetViewScale(Standard_Real Coef) -{ - CMDIFrameWnd *pFrame = (CMDIFrameWnd*)AfxGetApp()->m_pMainWnd; - CMDIChildWnd *pChild = (CMDIChildWnd *) pFrame->GetActiveFrame(); - COCCDemoView *pView = (COCCDemoView *) pChild->GetActiveView(); - pView->SetViewScale(Coef); -} - -void OCCDemo_Presentation::ResetView() -{ - CMDIFrameWnd *pFrame = (CMDIFrameWnd*)AfxGetApp()->m_pMainWnd; - CMDIChildWnd *pChild = (CMDIChildWnd *) pFrame->GetActiveFrame(); - COCCDemoView *pView = (COCCDemoView *) pChild->GetActiveView(); - pView->Reset(); -} -*/ -Handle(AIS_InteractiveContext) OCCDemo_Presentation::getAISContext() const -{ - return myDoc->GetAISContext(); -} - -Handle(V3d_Viewer) OCCDemo_Presentation::getViewer() const -{ - return myDoc->GetViewer(); -} - - -Standard_CString OCCDemo_Presentation::GetDataDir() -{ - return myDoc->GetDataDir(); -} diff --git a/samples/mfc/standard/07_Triangulation/src/OCCDemo_Presentation.h b/samples/mfc/standard/07_Triangulation/src/OCCDemo_Presentation.h deleted file mode 100755 index 4b6c3fa876..0000000000 --- a/samples/mfc/standard/07_Triangulation/src/OCCDemo_Presentation.h +++ /dev/null @@ -1,135 +0,0 @@ -// OCCDemo_Presentation.h: interface for the OCCDemo_Presentation class. -// This is a base class for all presentations -////////////////////////////////////////////////////////////////////// - -#if !defined(AFX_OCCDEMO_PRESENTATION_H__790EED7F_7BA2_11D5_BA4A_0060B0EE18EA__INCLUDED_) -#define AFX_OCCDEMO_PRESENTATION_H__790EED7F_7BA2_11D5_BA4A_0060B0EE18EA__INCLUDED_ - -#if _MSC_VER > 1000 -#pragma once -#endif // _MSC_VER > 1000 - - -#define WAIT_A_LITTLE WaitForInput(500) -#define WAIT_A_SECOND WaitForInput(1000) - -//#include "TriangulationDoc.h" -//#include -class CTriangulationDoc; -#include -#include -#include -#include -#include -class Quantity_Color; - -class OCCDemo_Presentation -{ -public: - // Construction - OCCDemo_Presentation() : myIndex(0), myNbSamples(0), FitMode(false){} - virtual ~OCCDemo_Presentation() {} - -public: - static OCCDemo_Presentation* Current; - // this pointer must be initialized when realize a derivable class; - // it is used by application to access to a presentation class instance - - void SetDocument (CTriangulationDoc* theDoc) {myDoc = theDoc;} - // document must be set by the user of this class before first use of iterations - CTriangulationDoc* GetDocument () {return myDoc;} - -public: - // Titling - const CString& GetName() const {return myName;} - -public: - // Iteration on samples - void FirstSample() {myIndex=0;} - void LastSample() {myIndex=myNbSamples-1;} - Standard_Boolean AtFirstSample() const {return myIndex <= 0;} - Standard_Boolean AtLastSample() const {return myIndex >= myNbSamples-1;} - void NextSample() {myIndex++;} - void PrevSample() {myIndex--;} - virtual void DoSample() = 0; -/* - static void GetViewCenter(Standard_Real& Xc, Standard_Real& Yc); - static void SetViewCenter(const Standard_Real Xc, const Standard_Real Yc); - static void GetViewEye(Standard_Real& X, Standard_Real& Y, Standard_Real& Z); - static void SetViewEye(Standard_Real X, Standard_Real Y, Standard_Real Z); - static Standard_Real GetViewScale(); - static void SetViewScale(Standard_Real Coef); - static void ResetView(); -*/ - - // place one-time initialization code in this function - virtual void Init() {} - -protected: - // Methods to call from a derivable class - void setName (const char* theName) {myName = CString(theName);} - Handle(AIS_InteractiveContext) getAISContext() const; - Handle(V3d_Viewer) getViewer() const; - Standard_CString GetDataDir(); - - Standard_Boolean WaitForInput (unsigned long aMilliSeconds); - // Waits for a user input or a period of time has been elapsed - - Handle(AIS_InteractiveObject) drawSurface (const Handle(Geom_Surface)& theSurface, - const Quantity_Color& theColor = Quantity_Color(Quantity_NOC_LEMONCHIFFON3), - const Standard_Boolean toDisplay = Standard_True); - // creates a finite face based on the given geometric surface - // and displays it in the viewer if toDisplay = Standard_True - - Handle(AIS_InteractiveObject) drawCurve (const Handle(Geom_Curve)& theCurve, - const Quantity_Color& theColor = Quantity_Color(Quantity_NOC_RED), - const Standard_Boolean toDisplay = Standard_True); - // creates an ISession_Curve based on the given geometric curve - // and displays it in the viewer if toDisplay = Standard_True - - Handle(AIS_InteractiveObject) drawCurve (const Handle(Geom2d_Curve)& theCurve, - const Quantity_Color& theColor = Quantity_Color(Quantity_NOC_RED), - const Standard_Boolean toDisplay = Standard_True, - const gp_Ax2& aPosition = gp::XOY()); - // converts a given curve to 3d using aPosition and calls the previous method - - Handle(AIS_Point) drawPoint (const gp_Pnt& thePnt, - const Quantity_Color& theColor = Quantity_Color(Quantity_NOC_GREEN), - const Standard_Boolean toDisplay = Standard_True); - // creates a presentation of the given point - // and displays it in the viewer if toDisplay = Standard_True - - Handle(AIS_InteractiveObject) drawVector (const gp_Pnt& thePnt, - const gp_Vec& theVec, - const Quantity_Color& theColor = Quantity_Color(Quantity_NOC_YELLOW), - const Standard_Boolean toDisplay = Standard_True); - // creates a presentation of the given vector - // and displays it in the viewer if toDisplay = Standard_True - - Handle(AIS_Shape) drawShape (const TopoDS_Shape& theShape, - const Quantity_Color& theColor, - const Standard_Boolean toDisplay = Standard_True); - // creates a presentation of the given shape - // with material PLASTIC and a given color - // and displays it in the viewer if toDisplay = Standard_True - - Handle(AIS_Shape) drawShape (const TopoDS_Shape& theShape, - const Graphic3d_NameOfMaterial theMaterial = Graphic3d_NameOfMaterial_Brass, - const Standard_Boolean toDisplay = Standard_True); - // creates a presentation of the given shape with the given material - // (color is default for a given material) - // and displays it in the viewer if toDisplay = Standard_True - -protected: - // Fields to use in a derivable class - BOOL FitMode; - int myIndex; - int myNbSamples; - -private: - CTriangulationDoc* myDoc; - CString myName; - -}; - -#endif // !defined(AFX_OCCDEMO_PRESENTATION_H__790EED7F_7BA2_11D5_BA4A_0060B0EE18EA__INCLUDED_) diff --git a/samples/mfc/standard/07_Triangulation/src/StdAfx.cpp b/samples/mfc/standard/07_Triangulation/src/StdAfx.cpp deleted file mode 100755 index 2f73d9e052..0000000000 --- a/samples/mfc/standard/07_Triangulation/src/StdAfx.cpp +++ /dev/null @@ -1,6 +0,0 @@ -// stdafx.cpp : source file that includes just the standard includes -// SampleTriangulation.pch will be the pre-compiled header -// stdafx.obj will contain the pre-compiled type information - -#include "stdafx.h" - diff --git a/samples/mfc/standard/07_Triangulation/src/StdAfx.h b/samples/mfc/standard/07_Triangulation/src/StdAfx.h deleted file mode 100755 index a6a14f517f..0000000000 --- a/samples/mfc/standard/07_Triangulation/src/StdAfx.h +++ /dev/null @@ -1,113 +0,0 @@ -// stdafx.h : include file for standard system include files, -// or project specific include files that are used frequently, but -// are changed infrequently -// - -#if _MSC_VER >= 1000 -#pragma once -#endif // _MSC_VER >= 1000 - -#define VC_EXTRALEAN // Exclude rarely-used stuff from Windows headers - -#include // MFC core and standard components -#include // MFC extensions -#include // MFC OLE automation classes -#ifndef _AFX_NO_AFXCMN_SUPPORT -#include // MFC support for Windows Common Controls -#endif // _AFX_NO_AFXCMN_SUPPORT - -#pragma warning( disable : 4244 ) // Issue warning 4244 -#include "Standard_ShortReal.hxx" -#pragma warning( default : 4244 ) // Issue warning 4244 - -#include -/* -#ifndef Version15B -# ifndef Version15D -# ifndef Version20 -# define Version15B -# endif // Version20 -# endif // Version15D -#endif // Version15B - -#pragma message ("=============================") -#ifdef Version15B -# pragma message ("Set the libs for version 1.5B") -#endif // Version15B - -#ifdef Version15D -# pragma message ("Set the libs for version 1.5D") -#endif // Version15D - -#ifdef Version20 -# pragma message ("Set the libs for version 2.0 ") -#endif // Version20 -#pragma message ("=============================") - -#ifdef Version15B -# pragma comment (lib,"TKTop.lib") -# pragma comment (lib,"TShort.lib") -# pragma comment (lib,"TColQuantity.lib") -#endif - -#ifdef Version15D -# pragma comment (lib,"TKTop.lib") -#endif - -#ifdef Version20 -# pragma comment (lib,"TKTop1.lib") -# pragma comment (lib,"TKTop2.lib") -#endif - -#pragma message ("Set the specific libs for the application") -# pragma comment (lib,"TKPrs.lib") -# pragma comment (lib,"TKGeom.lib") -# pragma comment (lib,"TKGlt.lib") -# pragma comment (lib,"TKGraphic.lib") -# pragma comment (lib,"TKPrsMgr.lib") -# pragma comment (lib,"TKViewers.lib") -# pragma comment (lib,"TKSession.lib") -# pragma comment (lib,"TColgp.lib") -# pragma comment (lib,"TKernel.lib") -*/ - - -#include -#include -#include -#include -#include -#include -#include -#include - -#include "TopoDS_Shape.hxx" -#include "BRepPrimAPI_MakeBox.hxx" -#include "BRepPrimAPI_MakeSphere.hxx" -#include "gp_Pnt.hxx" -#include "BRepAlgoAPI_Cut.hxx" -#include "TopExp_Explorer.hxx" -#include "TopoDS_Face.hxx" -#include "TopLoc_Location.hxx" -#include "Poly_Triangulation.hxx" -#include "BRep_Tool.hxx" -#include "TopoDS.hxx" -#include "TColgp_Array1OfPnt.hxx" -#include "Poly_Array1OfTriangle.hxx" -#include "Poly_Triangle.hxx" -#include "gp_Pnt.hxx" -#include "BRepBuilderAPI_MakeEdge.hxx" -#include "BRep_Builder.hxx" -#include "TopoDS_Compound.hxx" -#include "BRepAlgoAPI_Fuse.hxx" -#include "BRepBuilderAPI_MakeVertex.hxx" -#include "TopoDS.hxx" -#include "BRepTools.hxx" -#include "BRepMesh_IncrementalMesh.hxx" - -#include - -#include -//{{AFX_INSERT_LOCATION}} -// Microsoft Developer Studio will insert additional declarations immediately before the previous line. - diff --git a/samples/mfc/standard/07_Triangulation/src/Tesselate_Presentation.cpp b/samples/mfc/standard/07_Triangulation/src/Tesselate_Presentation.cpp deleted file mode 100755 index b34e562e29..0000000000 --- a/samples/mfc/standard/07_Triangulation/src/Tesselate_Presentation.cpp +++ /dev/null @@ -1,439 +0,0 @@ -// Tesselate_Presentation.cpp: implementation of the Tesselate_Presentation class. -// Tesselate shapes. -//////////////////////////////////////////////////////////////////////////// - -#include "stdafx.h" -#include "Tesselate_Presentation.h" -#include "TriangulationApp.h" -#include "TriangulationDoc.h" - -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include - -#include -#include -#include -#include -#include - -#include - -#define EOL "\r\n" - -// Initialization of global variable with an instance of this class -OCCDemo_Presentation* OCCDemo_Presentation::Current = new Tesselate_Presentation; - -// Initialization of array of samples -Standard_CString Tesselate_Presentation::myFileNames[] = -{ - "wedge_ok.brep", - "shell1.brep", - "Pump_Nut.brep", - "Pump_TopCover.brep", - 0 -}; - -////////////////////////////////////////////////////////////////////// -// Construction/Destruction -////////////////////////////////////////////////////////////////////// - -Tesselate_Presentation::Tesselate_Presentation() -{ - for (myNbSamples = 0; myFileNames[myNbSamples]; myNbSamples++); - setName ("Tesselate shapes"); -} - -////////////////////////////////////////////////////////////////////// -// Sample execution -////////////////////////////////////////////////////////////////////// - -void Tesselate_Presentation::DoSample() -{ - ((CTriangulationApp*) AfxGetApp())->SetSampleName (L"Tesselate"); - ((CTriangulationApp*) AfxGetApp())->SetSamplePath (L""); - getAISContext()->EraseAll (Standard_True); - if (myIndex >=0 && myIndex < myNbSamples) - sample (myFileNames[myIndex]); -} - -////////////////////////////////////////////////////////////////////// -// Sample functions -////////////////////////////////////////////////////////////////////// -//================================================================ - -inline Standard_Integer _key(Standard_Integer n1,Standard_Integer n2) -{ - - Standard_Integer key = - (n2>n1)?(n1<<16)+n2:(n2<<16)+n1; - return key; -} - -//DATA : [myIndex][{Deflection,NumberOfFace,NumberOfEdge}] -static const Standard_Real DATA [][3] = -{ - {0.2,1,2},{0.5,6,2},{0.7,16,2},{1,1,2} -}; - - -void Tesselate_Presentation::tesselateShape(const TopoDS_Shape& aShape) -{ -// setResultTitle("Tesselate shape"); - TCollection_AsciiString aText = ( - "/////////////////////////////////////////////////////////////////" EOL - "// Tesselate shape." EOL - "/////////////////////////////////////////////////////////////////" EOL EOL - ) ; - - Standard_Real aDeflection = DATA[myIndex][0]; - Standard_Integer aNumOfFace = (Standard_Integer)DATA[myIndex][1]; - Standard_Integer aNumOfEdge = (Standard_Integer)DATA[myIndex][2]; - - aText += - "Standard_Real aDeflection;" EOL - "// aDeflection = ... ;" EOL EOL - - "// removes all the triangulations of the faces ," EOL - "//and all the polygons on the triangulations of the edges:" EOL - "BRepTools::Clean(aShape);" EOL EOL - - "// adds a triangulation of the shape aShape with the deflection aDeflection:" EOL - "BRepMesh::Mesh(aShape,aDeflection);" EOL EOL - - "TopExp_Explorer aExpFace,aExpEdge;" EOL - "for(aExpFace.Init(aShape,TopAbs_FACE);aExpFace.More();aExpFace.Next())" EOL - "{ " EOL - " TopoDS_Face aFace = TopoDS::Face(aExpFace.Current());" EOL - " TopLoc_Location aLocation;" EOL EOL - - " // takes the triangulation of the face aFace:" EOL - " Handle(Poly_Triangulation) aTr = BRep_Tool::Triangulation(aFace,aLocation);" EOL EOL - - " if(!aTr.IsNull()) // if this triangulation is not NULL" EOL - " { " EOL - " // create array of node points in absolute coordinate system" EOL - " TColgp_Array1OfPnt aPoints(1, aTr->NbNodes());" EOL - " for( Standard_Integer i = 1; i < aTr->NbNodes()+1; i++)" EOL - " aPoints(i) = aTr->Node (i).Transformed (aLocation);" EOL EOL - - " // Takes the node points of each triangle of this triangulation." EOL - " // takes a number of triangles:" EOL - " Standard_Integer nnn = aTr->NbTriangles();" EOL - " Standard_Integer nt,n1,n2,n3;" EOL - " for( nt = 1 ; nt < nnn+1 ; nt++)" EOL - " {" EOL - " // takes the node indices of each triangle in n1,n2,n3:" EOL - " aTr->Triangle (nt).Get (n1,n2,n3);" EOL - " // takes the node points:" EOL - " gp_Pnt aPnt1 = aPoints(n1);" EOL - " gp_Pnt aPnt2 = aPoints(n2);" EOL - " gp_Pnt aPnt3 = aPoints(n3);" EOL - " } " EOL EOL - - " // Takes the polygon associated to an edge." EOL - " aExpEdge.Init(aFace,TopAbs_EDGE);" EOL - " TopoDS_Edge aEdge;" EOL - " // for example,working with the first edge:" EOL - " if(aExpEdge.More())" EOL - " aEdge = TopoDS::Edge(aExpEdge.Current());" EOL EOL - - " if(!aEdge.IsNull()) // if this edge is not NULL" EOL - " {" EOL - " // takes the polygon associated to the edge aEdge:" EOL - " Handle(Poly_PolygonOnTriangulation) aPol = " EOL - " BRep_Tool::PolygonOnTriangulation(aEdge,aTr,aEdge.Location());" EOL EOL - - " if(!aPol.IsNull()) // if this polygon is not NULL" EOL - " // takes the array of nodes for this polygon" EOL - " // (indexes in the array of nodes for triangulation of theFace):" EOL - " const TColStd_Array1OfInteger& aNodesOfPol = aPol->Nodes();" EOL - " }" EOL - " }" EOL - "}" EOL EOL - - "//==================================================" EOL EOL - - ; - aText += " Result with deflection = "; - aText += TCollection_AsciiString(aDeflection); - aText += " :" EOL; - - GetDocument()->PocessTextInDialog("Compute the triangulation on a shape", aText); -// setResultText(aText.ToCString()); - -//========================================================================== - - BRepTools::Clean(aShape); - BRepMesh_IncrementalMesh(aShape,aDeflection); - - BRep_Builder aBuilder,aBuild1,aBuild2; - TopoDS_Compound aCompound,aComp1,aComp2; - aBuilder.MakeCompound(aCompound); - aBuild1.MakeCompound(aComp1); - aBuild2.MakeCompound(aComp2); - - Standard_Integer aCount = 0; - Standard_Integer aNumOfNodes = 0; - Standard_Integer aNumOfTriangles = 0; - - Handle(AIS_InteractiveObject) aShowEdge,aShowFace,aShowShape; - - TopExp_Explorer aExpFace,aExpEdge; - - for(aExpFace.Init(aShape,TopAbs_FACE);aExpFace.More();aExpFace.Next()) - { - aCount++; - - TopoDS_Face aFace = TopoDS::Face(aExpFace.Current()); - TopLoc_Location aLocation; - - Handle(Poly_Triangulation) aTr = BRep_Tool::Triangulation(aFace,aLocation); - - if(!aTr.IsNull()) - { - aNumOfNodes += aTr->NbNodes(); - //Standard_Integer aLower = aNodes.Lower(); - //Standard_Integer anUpper = aNodes.Upper(); - aNumOfTriangles += aTr->NbTriangles(); - - if(aCount == aNumOfFace) - { - Standard_Integer aNbOfNodesOfFace = aTr->NbNodes(); - Standard_Integer aNbOfTrianglesOfFace = aTr->NbTriangles(); - aExpEdge.Init(aFace,TopAbs_EDGE); - - TopoDS_Edge aEdge; - - for( Standard_Integer i = 0; aExpEdge.More() && i < aNumOfEdge ; aExpEdge.Next(), i++) - aEdge = TopoDS::Edge(aExpEdge.Current()); - - if(!aEdge.IsNull()) - { - Handle(Poly_PolygonOnTriangulation) aPol = - BRep_Tool::PolygonOnTriangulation(aEdge,aTr,aEdge.Location()); - - if(!aPol.IsNull()) - { - const TColStd_Array1OfInteger& aNodesOfPol = aPol->Nodes(); - Standard_Integer aNbOfNodesOfEdge = aPol->NbNodes(); - - aText += "Number of nodes of the edge = "; - aText += TCollection_AsciiString(aNbOfNodesOfEdge) + EOL; - aText += "Number of nodes of the face = "; - aText += TCollection_AsciiString(aNbOfNodesOfFace) + EOL; - aText += "Number of triangles of the face = "; - aText += TCollection_AsciiString(aNbOfTrianglesOfFace) + EOL; - GetDocument()->PocessTextInDialog("Compute the triangulation on a shape", aText); -// setResultText(aText.ToCString()); - - Standard_Integer aLower = aNodesOfPol.Lower(), anUpper = aNodesOfPol.Upper(); - for( int i = aLower; i < anUpper ; i++) - { - gp_Pnt aPnt1 = aTr->Node (aNodesOfPol (i)).Transformed (aLocation); - gp_Pnt aPnt2 = aTr->Node (aNodesOfPol (i+1)).Transformed (aLocation); - TopoDS_Vertex aVertex1 = BRepBuilderAPI_MakeVertex (aPnt1); - TopoDS_Vertex aVertex2 = BRepBuilderAPI_MakeVertex (aPnt2); - - if(!aVertex1.IsNull() && !aVertex2.IsNull() && // if vertices are "alive" - !BRep_Tool::Pnt(aVertex1).IsEqual( - BRep_Tool::Pnt(aVertex2),Precision::Confusion())) // if they are different - { - aEdge = BRepBuilderAPI_MakeEdge (aVertex1,aVertex2); - aBuild2.Add(aComp2,aVertex1); - if(!aEdge.IsNull()) - aBuild2.Add(aComp2,aEdge); - if(i == anUpper-1) - aBuild2.Add(aComp2,aVertex2); - } - } - - getAISContext()->EraseAll (Standard_False); - aShowShape = drawShape(aShape); - if(WAIT_A_SECOND) return; - aShowEdge = drawShape(aComp2,Quantity_NOC_GREEN); - getAISContext()->Erase (aShowShape, Standard_True); - if(WAIT_A_SECOND) return; - } - } - } - - - TopTools_DataMapOfIntegerShape aEdges; - TopTools_SequenceOfShape aVertices; - - for( Standard_Integer i = 1; i < aTr->NbNodes()+1; i++) - { - gp_Pnt aPnt = aTr->Node (i).Transformed (aLocation); - TopoDS_Vertex aVertex = BRepBuilderAPI_MakeVertex(aPnt); - - if(!aVertex.IsNull()) - { - aBuilder.Add(aCompound,aVertex); - if(aCount == aNumOfFace ) - aBuild1.Add(aComp1,aVertex); - aVertices.Append(aVertex); - } - } - - Standard_Integer nnn = aTr->NbTriangles(); - Standard_Integer nt,n1,n2,n3; - - for( nt = 1 ; nt < nnn+1 ; nt++) - { - aTr->Triangle (nt).Get (n1,n2,n3); - - Standard_Integer key[3]; - - TopoDS_Vertex aV1,aV2; - key[0] = _key(n1, n2); - if(!aEdges.IsBound(key[0])) - { - aV1 = TopoDS::Vertex(aVertices(n1)); - aV2 = TopoDS::Vertex(aVertices(n2)); - if(!aV1.IsNull() && !aV2.IsNull() && - !BRep_Tool::Pnt(aV1).IsEqual(BRep_Tool::Pnt(aV2),Precision::Confusion())) - { - TopoDS_Edge aEdge = BRepBuilderAPI_MakeEdge (aV1,aV2); - if(!aEdge.IsNull()) - { - aEdges.Bind(key[0], aEdge); - aBuilder.Add(aCompound,aEdges(key[0])); - if(aCount == aNumOfFace) - aBuild1.Add(aComp1,aEdges(key[0])); - } - } - } - - key[1] = _key(n2,n3); - if(!aEdges.IsBound(key[1])) - { - aV1 = TopoDS::Vertex(aVertices(n2)); - aV2 = TopoDS::Vertex(aVertices(n3)); - if(!aV1.IsNull() && !aV2.IsNull() && - !BRep_Tool::Pnt(aV1).IsEqual(BRep_Tool::Pnt(aV2),Precision::Confusion())) - { - TopoDS_Edge aEdge = BRepBuilderAPI_MakeEdge (aV1,aV2); - if(!aEdge.IsNull()) - { - aEdges.Bind(key[1],aEdge); - aBuilder.Add(aCompound,aEdges(key[1])); - if(aCount == aNumOfFace) - aBuild1.Add(aComp1,aEdges(key[1])); - } - } - } - - key[2] = _key(n3,n1); - if(!aEdges.IsBound(key[2])) - { - aV1 = TopoDS::Vertex(aVertices(n3)); - aV2 = TopoDS::Vertex(aVertices(n1)); - if(!aV1.IsNull() && !aV2.IsNull() && - !BRep_Tool::Pnt(aV1).IsEqual(BRep_Tool::Pnt(aV2),Precision::Confusion())) - { - TopoDS_Edge aEdge = BRepBuilderAPI_MakeEdge (aV1,aV2); - if(!aEdge.IsNull()) - { - aEdges.Bind(key[2],aEdge); - aBuilder.Add(aCompound,aEdges(key[2])); - if(aCount == aNumOfFace) - aBuild1.Add(aComp1,aEdges(key[2])); - } - } - } - } - - if(aCount == aNumOfFace) - { - aShowFace = drawShape(aComp1,Quantity_NOC_GREEN); - getAISContext()->Erase (aShowEdge, Standard_True); - } - } - else - { - aText += "Can't compute a triangulation on face "; - aText += TCollection_AsciiString(aCount) + EOL; - GetDocument()->PocessTextInDialog("Compute the triangulation on a shape", aText); -// setResultText(aText.ToCString()); - } - } - - aText += "Number of nodes of the shape = "; - aText += TCollection_AsciiString(aNumOfNodes) + EOL; - aText += "Number of triangles of the shape = "; - aText += TCollection_AsciiString(aNumOfTriangles) + EOL EOL; - GetDocument()->PocessTextInDialog("Compute the triangulation on a shape", aText); -// setResultText(aText.ToCString()); - - if(WAIT_A_SECOND) return; - drawShape(aCompound,Quantity_NOC_GREEN); - getAISContext()->Erase (aShowFace, Standard_True); - -} - -void Tesselate_Presentation::sample(const Standard_CString aFileName) -{ - CString anOCCTDataPathValue; - anOCCTDataPathValue.GetEnvironmentVariable(L"CSF_OCCTDataPath"); - CString initfile = (anOCCTDataPathValue + L"\\occ\\" + aFileName); - -/* - ResetView(); - - if (aFileName == "wedge_ok.brep"){ - SetViewCenter(6.3639597574916, 4.4907309380832); - SetViewScale(52.722555157077); - } - - if (aFileName == "shell1.brep"){ - SetViewCenter(60.457553053711, -20.351208944076); - SetViewScale(26.857478563027); - } - - if (aFileName == "Pump_Nut.brep"){ - SetViewCenter(248.77723166710, 77.249633819945); - SetViewScale(12.371719671833); - } - - if (aFileName == "Pump_TopCover.brep"){ - SetViewCenter(408.72474423160, 169.38361094986); - SetViewScale(2.1932732873087); - } -*/ - - std::filebuf aFileBuf; - std::istream aStream (&aFileBuf); - if (!aFileBuf.open (initfile, std::ios::in)) - { - initfile += L" was not found. The sample can not be shown."; - GetDocument()->PocessTextInDialog ("Compute the triangulation on a shape", initfile); - return; - } - - TopoDS_Shape aShape; - BRep_Builder aBld; - BRepTools::Read (aShape, aStream, aBld); - if (aShape.IsNull()) - { - initfile += L" was not found. The sample can not be shown."; - GetDocument()->PocessTextInDialog ("Compute the triangulation on a shape", initfile); - return; - } - - tesselateShape (aShape); -} diff --git a/samples/mfc/standard/07_Triangulation/src/Tesselate_Presentation.h b/samples/mfc/standard/07_Triangulation/src/Tesselate_Presentation.h deleted file mode 100755 index 45dd5bc735..0000000000 --- a/samples/mfc/standard/07_Triangulation/src/Tesselate_Presentation.h +++ /dev/null @@ -1,34 +0,0 @@ -// Tesselate_Presentation.h: interface for the Tesselate_Presentation class. -// Presentation class: Tesselate shapes. -////////////////////////////////////////////////////////////////////// - -#if !defined(AFX_Tesselate_PRESENTATION_H__790EED7F_7BA2_11D5_BA4A_0060B0EE18EA__INCLUDED_) -#define AFX_Tesselate_PRESENTATION_H__790EED7F_7BA2_11D5_BA4A_0060B0EE18EA__INCLUDED_ - -#if _MSC_VER > 1000 -#pragma once -#endif // _MSC_VER > 1000 - -#include - -class Tesselate_Presentation : public OCCDemo_Presentation -{ -public: - // Construction - Tesselate_Presentation(); - -public: - // Iteration on samples - virtual void DoSample(); - // one phase of iterations - -private: - // Sample functions - void sample(const Standard_CString aFileName); - void tesselateShape(const TopoDS_Shape& aShape); - - static Standard_CString myFileNames[]; - -}; - -#endif // !defined(AFX_Tesselate_PRESENTATION_H__790EED7F_7BA2_11D5_BA4A_0060B0EE18EA__INCLUDED_) diff --git a/samples/mfc/standard/07_Triangulation/src/TriangulationApp.cpp b/samples/mfc/standard/07_Triangulation/src/TriangulationApp.cpp deleted file mode 100755 index 4925e24fde..0000000000 --- a/samples/mfc/standard/07_Triangulation/src/TriangulationApp.cpp +++ /dev/null @@ -1,77 +0,0 @@ -// TriangulationApp.cpp : Defines the class behaviors for the application. -// - -#include "stdafx.h" - -#include "TriangulationApp.h" - -#include "OCC_MainFrame.h" -#include "OCC_3dChildFrame.h" -#include "TriangulationDoc.h" -#include "OCC_3dView.h" - -///////////////////////////////////////////////////////////////////////////// -// CTriangulationApp construction - -CTriangulationApp::CTriangulationApp() : OCC_App() -{ - SampleName = "TopologyTriangulation"; //for about dialog - SetSamplePath (L"..\\..\\07_Triangulation"); -} - -///////////////////////////////////////////////////////////////////////////// -// The one and only CTriangulationApp object - -CTriangulationApp theApp; - -///////////////////////////////////////////////////////////////////////////// -// CTriangulationApp initialization - -BOOL CTriangulationApp::InitInstance() -{ - AfxEnableControlContainer(); - - // Standard initialization - // If you are not using these features and wish to reduce the size - // of your final executable, you should remove from the following - // the specific initialization routines you do not need. - - // Change the registry key under which our settings are stored. - // You should modify this string to be something appropriate - // such as the name of your company or organization. - SetRegistryKey(_T("Local AppWizard-Generated Applications")); - - LoadStdProfileSettings(); // Load standard INI file options (including MRU) - - // Register the application's document templates. Document templates - // serve as the connection between documents, frame windows and views. - - CMultiDocTemplate* pDocTemplate; - pDocTemplate = new CMultiDocTemplate( - IDR_3DTYPE, - RUNTIME_CLASS(CTriangulationDoc), - RUNTIME_CLASS(OCC_3dChildFrame), // custom MDI child frame - RUNTIME_CLASS(OCC_3dView)); - AddDocTemplate(pDocTemplate); - - // create main MDI Frame window - OCC_MainFrame* pMainFrame = new OCC_MainFrame(with_AIS_TB); - if (!pMainFrame->LoadFrame(IDR_MAINFRAME)) - return FALSE; - m_pMainWnd = pMainFrame; - - // Parse command line for standard shell commands, DDE, file open - CCommandLineInfo cmdInfo; - ParseCommandLine(cmdInfo); - - // Dispatch commands specified on the command line - if (!ProcessShellCommand(cmdInfo)) - return FALSE; - - // The main window has been initialized, so show and update it. - pMainFrame->ShowWindow(m_nCmdShow); - pMainFrame->UpdateWindow(); - - return TRUE; -} - diff --git a/samples/mfc/standard/07_Triangulation/src/TriangulationApp.h b/samples/mfc/standard/07_Triangulation/src/TriangulationApp.h deleted file mode 100755 index 2630b7da34..0000000000 --- a/samples/mfc/standard/07_Triangulation/src/TriangulationApp.h +++ /dev/null @@ -1,32 +0,0 @@ -// TriangulationApp.h : main header file for the TRIANGULATION application -// - -#if !defined(AFX_TRIANGULATIONAPP_H__3045338A_3E75_11D7_8611_0060B0EE281E__INCLUDED_) -#define AFX_TRIANGULATIONAPP_H__3045338A_3E75_11D7_8611_0060B0EE281E__INCLUDED_ - -#if _MSC_VER >= 1000 -#pragma once -#endif // _MSC_VER >= 1000 - -#include - -class CTriangulationApp : public OCC_App -{ -public: - - CTriangulationApp(); - -// Overrides - // ClassWizard generated virtual function overrides - //{{AFX_VIRTUAL(CTriangulationApp) - public: - virtual BOOL InitInstance(); - //}}AFX_VIRTUAL -}; - -///////////////////////////////////////////////////////////////////////////// - -//{{AFX_INSERT_LOCATION}} -// Microsoft Developer Studio will insert additional declarations immediately before the previous line. - -#endif // !defined(AFX_TRIANGULATIONAPP_H__3045338A_3E75_11D7_8611_0060B0EE281E__INCLUDED_) diff --git a/samples/mfc/standard/07_Triangulation/src/TriangulationDoc.cpp b/samples/mfc/standard/07_Triangulation/src/TriangulationDoc.cpp deleted file mode 100755 index 4b9841d442..0000000000 --- a/samples/mfc/standard/07_Triangulation/src/TriangulationDoc.cpp +++ /dev/null @@ -1,418 +0,0 @@ -// TriangulationDoc.cpp : implementation of the CTriangulationDoc class -// - -#include "stdafx.h" - -#include "TriangulationDoc.h" - -#include "TriangulationApp.h" - -#include "OCCDemo_Presentation.h" - -#include - -#include "..\res\resource.h" - -#include -#include - -///////////////////////////////////////////////////////////////////////////// -// CTriangulationDoc - -IMPLEMENT_DYNCREATE(CTriangulationDoc, CDocument) - -BEGIN_MESSAGE_MAP(CTriangulationDoc, OCC_3dBaseDoc) - //{{AFX_MSG_MAP(CTriangulationDoc) - ON_COMMAND(ID_TRIANGU, OnTriangu) - ON_COMMAND(ID_Clear, OnClear) - ON_COMMAND(ID_Visu, OnVisu) - ON_COMMAND(ID_BUTTONNext, OnBUTTONNext) - ON_COMMAND(ID_BUTTONStart, OnBUTTONStart) - ON_COMMAND(ID_BUTTONRepeat, OnBUTTONRepeat) - ON_COMMAND(ID_BUTTONPrev, OnBUTTONPrev) - ON_COMMAND(ID_BUTTONEnd, OnBUTTONEnd) - ON_UPDATE_COMMAND_UI(ID_BUTTONNext, OnUpdateBUTTONNext) - ON_UPDATE_COMMAND_UI(ID_BUTTONPrev, OnUpdateBUTTONPrev) - ON_COMMAND(ID_FILE_NEW, OnFileNew) - ON_COMMAND(ID_DUMP_VIEW, OnDumpView) - //}}AFX_MSG_MAP -END_MESSAGE_MAP() - -///////////////////////////////////////////////////////////////////////////// -// CTriangulationDoc construction/destruction - -CTriangulationDoc::CTriangulationDoc() -{ - myPresentation = OCCDemo_Presentation::Current; - myPresentation->SetDocument(this); - - strcpy_s(myDataDir, "Data"); - strcpy_s(myLastPath, "."); -} - -CTriangulationDoc::~CTriangulationDoc() -{ -} - -///////////////////////////////////////////////////////////////////////////// -// CTriangulationDoc diagnostics - -#ifdef _DEBUG -void CTriangulationDoc::AssertValid() const -{ - CDocument::AssertValid(); -} - -void CTriangulationDoc::Dump(CDumpContext& dc) const -{ - CDocument::Dump(dc); -} -#endif //_DEBUG - -void CTriangulationDoc::OnTriangu() -{ - AIS_ListOfInteractive aList; - myAISContext->DisplayedObjects(aList); - AIS_ListIteratorOfListOfInteractive aListIterator; - for(aListIterator.Initialize(aList);aListIterator.More();aListIterator.Next()){ - myAISContext->Remove (aListIterator.Value(), Standard_False); - } - - TopoDS_Shape theBox = BRepPrimAPI_MakeBox(200,60,60); - TopoDS_Shape theSphere = BRepPrimAPI_MakeSphere(gp_Pnt(100,20,20),80); - TopoDS_Shape ShapeFused = BRepAlgoAPI_Fuse(theSphere,theBox); - BRepMesh_IncrementalMesh(ShapeFused,1); - - Handle (AIS_Shape) aSection = new AIS_Shape(ShapeFused); - myAISContext->SetDisplayMode (aSection, 1, Standard_False); - myAISContext->SetColor (aSection, Quantity_NOC_RED, Standard_False); - myAISContext->SetMaterial (aSection, Graphic3d_NOM_GOLD, Standard_False); - myAISContext->Display (aSection, Standard_False); - - Standard_Integer result(0); - - for (TopExp_Explorer ex(ShapeFused,TopAbs_FACE) ; ex.More(); ex.Next()) { - TopoDS_Face F =TopoDS::Face(ex.Current()); - TopLoc_Location L; - Handle (Poly_Triangulation) facing = BRep_Tool::Triangulation(F,L); - result = result + facing->NbTriangles(); - } - Fit(); - - TCollection_AsciiString Message ("\ - \n\ -TopoDS_Shape theBox = BRepPrimAPI_MakeBox(200,60,60); \n\ -TopoDS_Shape theSphere = BRepPrimAPI_MakeSphere(gp_Pnt(100,20,20),80); \n\ - \n\ -TopoDS_Shape ShapeFused = BRepBuilderAPI_Fuse(theSphere,theBox); \n\ - \n\ -BRepMesh::Mesh(ShapeFused,1); \n\ - \n\ -Standard_Integer result(0); \n\ - \n\ -for (TopExp_Explorer ex(ShapeFused,TopAbs_FACE) ; ex.More(); ex.Next()) { \n\ - TopoDS_Face F =TopoDS::Face(ex.Current()); \n\ - TopLoc_Location L; \n\ - Handle (Poly_Triangulation) facing = BRep_Tool::Triangulation(F,L); \n\ - result = result + facing->NbTriangles(); \n\ -} \n\ -\n\ ---- Number of created triangles ---\n"); - TCollection_AsciiString nombre(result); - Message += nombre; - Message +=("\ - \n\ - \n"); - PocessTextInDialog("Compute the triangulation on a shape", Message); -} - -void CTriangulationDoc::OnVisu() -{ - - AIS_ListOfInteractive aList; - myAISContext->DisplayedObjects(aList); - AIS_ListIteratorOfListOfInteractive aListIterator; - for(aListIterator.Initialize(aList);aListIterator.More();aListIterator.Next()){ - myAISContext->Remove (aListIterator.Value(), Standard_False); - } - -TopoDS_Shape theBox = BRepPrimAPI_MakeBox(200,60,60).Shape(); -TopoDS_Shape theSphere = BRepPrimAPI_MakeSphere(gp_Pnt(100, 20, 20), 80).Shape(); -TopoDS_Shape ShapeFused = BRepAlgoAPI_Fuse(theSphere, theBox).Shape(); -BRepMesh_IncrementalMesh(ShapeFused,1); - -Handle (AIS_Shape) aSection = new AIS_Shape(ShapeFused); -myAISContext->SetDisplayMode (aSection, 1, Standard_False); -myAISContext->SetColor (aSection, Quantity_NOC_RED, Standard_False); -myAISContext->SetMaterial (aSection, Graphic3d_NOM_GOLD, Standard_False); -myAISContext->SetTransparency (aSection, 0.1, Standard_False); -myAISContext->Display (aSection, Standard_False); - -BRep_Builder builder; -TopoDS_Compound Comp; -builder.MakeCompound(Comp); - -for (TopExp_Explorer ex(ShapeFused,TopAbs_FACE) ; ex.More(); ex.Next()) { - - TopoDS_Face F =TopoDS::Face(ex.Current()); - TopLoc_Location L; - Handle (Poly_Triangulation) facing = BRep_Tool::Triangulation(F,L); - - for (Standard_Integer i=1;i<=(facing->NbTriangles());i++) { - const Poly_Triangle trian = facing->Triangle (i); - Standard_Integer index1,index2,index3,M = 0, N = 0; - trian.Get(index1,index2,index3); - - for (Standard_Integer j=1;j<=3;j++) { - switch (j) { - case 1 : - M = index1; - N = index2; - break; - case 2 : - N = index3; - break; - case 3 : - M = index2; - } - - BRepBuilderAPI_MakeEdge ME(facing->Node (M), facing->Node (N)); - if (ME.IsDone()) { - builder.Add(Comp,ME.Edge()); - } - } - } -} -Handle (AIS_Shape) atriangulation = new AIS_Shape(Comp); -myAISContext->SetDisplayMode (atriangulation, 0, Standard_False); -myAISContext->SetColor (atriangulation, Quantity_NOC_WHITE, Standard_False); -myAISContext->Display (atriangulation, Standard_False); - -Fit(); - - TCollection_AsciiString Message ("\ - \n\ -TopoDS_Shape theBox = BRepPrimAPI_MakeBox(200,60,60); \n\ -TopoDS_Shape theSphere = BRepPrimAPI_MakeSphere(gp_Pnt(100,20,20),80); \n\ -TopoDS_Shape ShapeFused = BRepAlgoAPI_Fuse(theSphere,theBox); \n\ -BRepMesh::Mesh(ShapeFused,1); \n\ - \n\ -BRep_Builder builder; \n\ -TopoDS_Compound Comp; \n\ -builder.MakeCompound(Comp); \n\ - \n\ -for (TopExp_Explorer ex(ShapeFused,TopAbs_FACE) ; ex.More(); ex.Next()) { \n\ - \n\ - TopoDS_Face F =TopoDS::Face(ex.Current()); \n\ - TopLoc_Location L; \n\ - Handle (Poly_Triangulation) facing = BRep_Tool::Triangulation(F,L); \n\ - \n\ - for (Standard_Integer i=1;i<=(facing->NbTriangles());i++) { \n\ - Poly_Triangle trian = facing->Triangle (i); \n\ - Standard_Integer index1,index2,index3,M,N; \n\ - trian.Get(index1,index2,index3); \n\ - \n\ - for (Standard_Integer j=1;j<=3;j++) { \n\ - switch (j) { \n\ - case 1 : \n\ - M = index1; \n\ - N = index2; \n\ - break; \n\ - case 2 : \n\ - N = index3; \n\ - break; \n\ - case 3 : \n\ - M = index2; \n\ - } \n\ - \n\ - BRepBuilderAPI_MakeEdge ME(facing->Node (M),facing->Node (N)); \n\ - if (ME.IsDone()) { \n\ - builder.Add(Comp,ME.Edge()); \n\ - } \n\ - } \n\ - } \n\ -} \n\ - \n\ -Warning : The visualisation of the mesh is not optimised.\n\ -The shared edges between triangles are dispayed twice.\n\ -The purpose here is only to show how to decode the data structure of triangulation.\n\ - \n"); - PocessTextInDialog("Visualize the triangulation on a shape", Message); - -} - - - - -void CTriangulationDoc::OnClear() -{ - AIS_ListOfInteractive aList; - myAISContext->DisplayedObjects(aList); - AIS_ListIteratorOfListOfInteractive aListIterator; - for(aListIterator.Initialize(aList);aListIterator.More();aListIterator.Next()){ - myAISContext->Remove (aListIterator.Value(), Standard_False); - } - -TopoDS_Shape theBox = BRepPrimAPI_MakeBox(200, 60, 60).Shape(); -TopoDS_Shape theSphere = BRepPrimAPI_MakeSphere(gp_Pnt(100, 20, 20), 80).Shape(); -TopoDS_Shape ShapeFused = BRepAlgoAPI_Fuse(theSphere,theBox); -BRepMesh_IncrementalMesh(ShapeFused,1); - - -Handle (AIS_Shape) aSection = new AIS_Shape(ShapeFused); -myAISContext->SetDisplayMode (aSection, 1, Standard_False); -myAISContext->SetColor (aSection, Quantity_NOC_RED, Standard_False); -myAISContext->SetMaterial (aSection, Graphic3d_NOM_GOLD, Standard_False); -myAISContext->Display (aSection, Standard_False); - -BRepTools::Clean(ShapeFused); - -TCollection_AsciiString test; -if (!BRepTools::Triangulation(ShapeFused,1)) { - test = ("In fact the triangulation has been removed\n"); -} - -Fit(); - TCollection_AsciiString Message ("\ - \n\ -TopoDS_Shape theBox = BRepPrimAPI_MakeBox(200,60,60); \n\ -TopoDS_Shape theSphere = BRepPrimAPI_MakeSphere(gp_Pnt(100,20,20),80); \n\ -TopoDS_Shape ShapeFused = BRepAlgoAPI_Fuse(theSphere,theBox); \n\ -BRepMesh::Mesh(ShapeFused,1); \n\ - \n\ -BRepTools::Clean(ShapeFused); \n\ - \n\ -if (!BRepTools::Triangulation(ShapeFused,1)) { \n\ - TCollection_AsciiString test(); \n\ -} \n\ - \n\ - --- Result ---\n"); - - Message += test; - Message +=("\ - \n\ - \n"); - - PocessTextInDialog("Remove the triangulation", Message); - -} - -/******************************************************************************* -********************* T E S S E L A T E ************************************** -*******************************************************************************/ - -void CTriangulationDoc::Start() -{ - myPresentation->Init(); - OnBUTTONStart(); -} - -void CTriangulationDoc::OnFileNew() -{ - OnNewDocument(); - Start(); -} - -void CTriangulationDoc::InitViewButtons() -{ - //POSITION pos = GetFirstViewPosition(); -/* LLS - while (pos != NULL) - { - COCCDemoView* pView = (COCCDemoView*) GetNextView(pos); - pView->InitButtons(); - } -*/ -} - -void CTriangulationDoc::DoSample() -{ - InitViewButtons(); - - HCURSOR hOldCursor = ::GetCursor(); - HCURSOR hNewCursor = AfxGetApp()->LoadStandardCursor(IDC_APPSTARTING); - - SetCursor(hNewCursor); - { - try - { - myPresentation->DoSample(); - } - catch (Standard_Failure const& anException) - { - Standard_SStream aSStream; - aSStream << "An exception was caught: " << anException << std::ends; - CString aMsg = aSStream.str().c_str(); -// aSStream.rdbuf()->freeze(0); // allow deletion of dynamic array - AfxMessageBox (aMsg); - } - } - SetCursor(hOldCursor); -} - -void CTriangulationDoc::OnBUTTONStart() -{ - myAISContext->EraseAll (Standard_True); - myPresentation->FirstSample(); - DoSample(); -} - -void CTriangulationDoc::OnBUTTONEnd() -{ - myAISContext->EraseAll (Standard_True); - myPresentation->LastSample(); - DoSample(); -} - -void CTriangulationDoc::OnBUTTONRepeat() -{ - DoSample(); -} - -void CTriangulationDoc::OnBUTTONNext() -{ - if (!myPresentation->AtLastSample()) - { - myPresentation->NextSample(); - DoSample(); - } -} - -void CTriangulationDoc::OnBUTTONPrev() -{ - if (!myPresentation->AtFirstSample()) - { - myPresentation->PrevSample(); - DoSample(); - } -} - -void CTriangulationDoc::OnUpdateBUTTONNext(CCmdUI* pCmdUI) -{ - pCmdUI->Enable (!myPresentation->AtLastSample()); -} - -void CTriangulationDoc::OnUpdateBUTTONPrev(CCmdUI* pCmdUI) -{ - pCmdUI->Enable (!myPresentation->AtFirstSample()); -} - -void CTriangulationDoc::OnDumpView() -{ - for (POSITION aPos = GetFirstViewPosition(); aPos != NULL;) - { - OCC_3dView* pView = (OCC_3dView* )GetNextView (aPos); - pView->UpdateWindow(); - } - - Handle(V3d_View) aView = myViewer->ActiveViews().First(); - ExportView (aView); -} - -void CTriangulationDoc::Fit() -{ - CMDIFrameWnd *pFrame = (CMDIFrameWnd*)AfxGetApp()->m_pMainWnd; - CMDIChildWnd *pChild = (CMDIChildWnd *) pFrame->GetActiveFrame(); - OCC_3dView *pView = (OCC_3dView*)pChild->GetActiveView(); - pView->FitAll(); -} diff --git a/samples/mfc/standard/07_Triangulation/src/TriangulationDoc.h b/samples/mfc/standard/07_Triangulation/src/TriangulationDoc.h deleted file mode 100755 index 00d6ec3adb..0000000000 --- a/samples/mfc/standard/07_Triangulation/src/TriangulationDoc.h +++ /dev/null @@ -1,63 +0,0 @@ -// TriangulationDoc.h : interface of the CTopologyTriangulationDoc class -// -///////////////////////////////////////////////////////////////////////////// - -#if !defined(AFX_TRIANGULATIONDOC_H__3045338B_3E75_11D7_8611_0060B0EE281E__INCLUDED_) -#define AFX_TRIANGULATIONDOC_H__3045338B_3E75_11D7_8611_0060B0EE281E__INCLUDED_ - -#if _MSC_VER >= 1000 -#pragma once -#endif // _MSC_VER >= 1000 - -#include -//#include "OCCDemo_Presentation.h" -class OCCDemo_Presentation; - -class CTriangulationDoc : public OCC_3dDoc -{ - -protected: // create from serialization only - CTriangulationDoc(); - DECLARE_DYNCREATE(CTriangulationDoc) - void InitViewButtons(); - void DoSample(); -public: - virtual ~CTriangulationDoc(); - void Start(); - static void Fit(); - Standard_CString GetDataDir() {return myDataDir;} -#ifdef _DEBUG - virtual void AssertValid() const; - virtual void Dump(CDumpContext& dc) const; -#endif - -// Generated message map functions -protected: - //{{AFX_MSG(CTriangulationDoc) - afx_msg void OnTriangu(); - afx_msg void OnClear(); - afx_msg void OnVisu(); - afx_msg void OnBUTTONNext(); - afx_msg void OnBUTTONStart(); - afx_msg void OnBUTTONRepeat(); - afx_msg void OnBUTTONPrev(); - afx_msg void OnBUTTONEnd(); - afx_msg void OnUpdateBUTTONNext(CCmdUI* pCmdUI); - afx_msg void OnUpdateBUTTONPrev(CCmdUI* pCmdUI); - afx_msg void OnFileNew(); - afx_msg void OnDumpView(); - //}}AFX_MSG - DECLARE_MESSAGE_MAP() -private: - OCCDemo_Presentation *myPresentation; - char myDataDir[5]; // for "Data\0" - char myLastPath[MAX_PATH]; // directory of lastly saved file in DumpView() - -}; - -///////////////////////////////////////////////////////////////////////////// - -//{{AFX_INSERT_LOCATION}} -// Microsoft Developer Studio will insert additional declarations immediately before the previous line. - -#endif // !defined(AFX_TRIANGULATIONDOC_H__3045338B_3E75_11D7_8611_0060B0EE281E__INCLUDED_) diff --git a/samples/mfc/standard/09_Animation/CMakeLists.txt b/samples/mfc/standard/09_Animation/CMakeLists.txt deleted file mode 100644 index 9cea604460..0000000000 --- a/samples/mfc/standard/09_Animation/CMakeLists.txt +++ /dev/null @@ -1,61 +0,0 @@ -cmake_minimum_required (VERSION 2.6) - -project (Animation) - -add_definitions (-DWINVER=0x0501 -DUNICODE -D_UNICODE) -set (CMAKE_MFC_FLAG 2) - -set (Animation_SRC_DIR ${MFC_STANDARD_SAMPLES_DIR}/09_Animation/src) -set (Animation_HEADER_FILES ${Animation_SRC_DIR}/AnimationApp.h - ${Animation_SRC_DIR}/AnimationDoc.h - ${Animation_SRC_DIR}/AnimationView3D.h - ${Animation_SRC_DIR}/Fonc.hxx - ${Animation_SRC_DIR}/ShadingDialog.h - ${Animation_SRC_DIR}/ThreadDialog.h - ${Animation_SRC_DIR}/StdAfx.h ) -set (Animation_SOURCE_FILES ${Animation_SRC_DIR}/AnimationApp.cpp - ${Animation_SRC_DIR}/AnimationDoc.cpp - ${Animation_SRC_DIR}/AnimationView3D.cpp - ${Animation_SRC_DIR}/Fonc.cxx - ${Animation_SRC_DIR}/ShadingDialog.cpp - ${Animation_SRC_DIR}/ThreadDialog.cpp - ${Animation_SRC_DIR}/StdAfx.cpp ) - -set (Animation_RESOURCE_DIR ${MFC_STANDARD_SAMPLES_DIR}/09_Animation/res) -set (Animation_RESOURCE_HEADER ${Animation_RESOURCE_DIR}/resource.h) -set (Animation_RESOURCE_FILES ${Animation_RESOURCE_DIR}/child2.bmp - ${Animation_RESOURCE_DIR}/Toolbar.bmp - ${Animation_RESOURCE_DIR}/Animation.rc) - -# groups in the VS solution -source_group ("Source Files" FILES ${Animation_SOURCE_FILES} - ${COMMON_WINMAIN_FILE}) - -source_group ("Header Files" FILES ${Animation_HEADER_FILES}) - -source_group ("Resource Files" FILES ${Animation_RESOURCE_FILES}) - -add_executable (Animation WIN32 ${Animation_SOURCE_FILES} - ${Animation_HEADER_FILES} - ${COMMON_WINMAIN_FILE} - ${Animation_RESOURCE_FILES}) - -set_property (TARGET Animation PROPERTY FOLDER "Samples/mfc") - -if (SINGLE_GENERATOR) - install (TARGETS Animation DESTINATION "${INSTALL_DIR_BIN}") -else() - install (TARGETS Animation - CONFIGURATIONS Release RelWithDebInfo - DESTINATION "${INSTALL_DIR_BIN}") - install (TARGETS Animation - CONFIGURATIONS Debug - DESTINATION "${INSTALL_DIR_BIN}d") -endif() - -include_directories (${CMAKE_BINARY_DIR}/inc - ${Animation_RESOURCE_DIR} - ${Animation_SRC_DIR} - ${MFC_STANDARD_SAMPLES_DIR}/Common) - -target_link_libraries (Animation mfcsample TKBO) \ No newline at end of file diff --git a/samples/mfc/standard/09_Animation/adm/win/vc10/Animation.vcxproj b/samples/mfc/standard/09_Animation/adm/win/vc10/Animation.vcxproj deleted file mode 100644 index f22faa9356..0000000000 --- a/samples/mfc/standard/09_Animation/adm/win/vc10/Animation.vcxproj +++ /dev/null @@ -1,409 +0,0 @@ - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {92492ACB-1F57-40BB-818F-33AD1C20273A} - Animation - MFCProj - - - - Application - Dynamic - Unicode - $(VCPlatformToolSet) - - - Application - Dynamic - Unicode - $(VCPlatformToolSet) - - - Application - Dynamic - Unicode - $(VCPlatformToolSet) - - - Application - Dynamic - Unicode - $(VCPlatformToolSet) - - - - - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>10.0.30319.1 - ../../../../win32\$(VCFMT)\bind\ - .\win32\objd\ - true - ../../../../win64\$(VCFMT)\bind\ - .\win64\objd\ - true - ../../../../win32\$(VCFMT)\bin\ - .\win32\obj\ - false - ../../../../win64\$(VCFMT)\bin\ - .\win64\obj\ - false - - - - _DEBUG;%(PreprocessorDefinitions) - true - true - Win32 - .\win32\objd/Animation.tlb - - - - - Disabled - ..\..\..\;..\..\..\..\Common;$(CSF_OCCTIncludePath);%(AdditionalIncludeDirectories) - _DEBUG;_WINDOWS;WINVER=0x0501;%(PreprocessorDefinitions) - EnableFastChecks - MultiThreadedDebugDLL - Use - stdafx.h - .\win32\objd/Animation.pch - .\win32\objd/ - .\win32\objd/ - .\win32\objd/ - Level4 - true - EditAndContinue - Default - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - - - TKVCAF.lib;TKBRep.lib;TKBool.lib;TKCAF.lib;TKCDF.lib;TKernel.lib;TKFeat.lib;TKFillet.lib;TKG2d.lib;TKG3d.lib;TKGeomAlgo.lib;TKGeomBase.lib;TKHLR.lib;TKMath.lib;TKOffset.lib;TKPrim.lib;TKService.lib;TKTopAlgo.lib;TKV3d.lib;TKOpenGl.lib;mfcsample.lib;TKBO.lib;%(AdditionalDependencies) - ../../../../win32\$(VCFMT)\bind/Animation.exe - true - ..\..\..\..\win32\$(VCFMT)\libd;$(CSF_OCCTLibPath);%(AdditionalLibraryDirectories) - true - ../../../../win32\$(VCFMT)\bind/Animation.pdb - Windows - MachineX86 - - - - - _DEBUG;%(PreprocessorDefinitions) - true - true - X64 - .\win64\objd/Animation.tlb - - - - - Disabled - ..\..\..\;..\..\..\..\Common;$(CSF_OCCTIncludePath);%(AdditionalIncludeDirectories) - _DEBUG;_WINDOWS;WINVER=0x0501;%(PreprocessorDefinitions) - EnableFastChecks - MultiThreadedDebugDLL - Use - stdafx.h - .\win64\objd/Animation.pch - .\win64\objd/ - .\win64\objd/ - .\win64\objd/ - Level4 - true - ProgramDatabase - Default - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - - - TKVCAF.lib;TKBRep.lib;TKBool.lib;TKCAF.lib;TKCDF.lib;TKernel.lib;TKFeat.lib;TKFillet.lib;TKG2d.lib;TKG3d.lib;TKGeomAlgo.lib;TKGeomBase.lib;TKHLR.lib;TKMath.lib;TKOffset.lib;TKPrim.lib;TKService.lib;TKTopAlgo.lib;TKV3d.lib;TKOpenGl.lib;mfcsample.lib;TKBO.lib;%(AdditionalDependencies) - ../../../../win64\$(VCFMT)\bind/Animation.exe - true - ..\..\..\..\win64\$(VCFMT)\libd;$(CSF_OCCTLibPath);%(AdditionalLibraryDirectories) - true - ../../../../win64\$(VCFMT)\bind/Animation.pdb - Windows - MachineX64 - - - - - NDEBUG;%(PreprocessorDefinitions) - true - true - Win32 - .\win32\obj/Animation.tlb - - - - - MaxSpeed - OnlyExplicitInline - ..\..\..\;..\..\..\..\Common;$(CSF_OCCTIncludePath);%(AdditionalIncludeDirectories) - NDEBUG;_WINDOWS;%(PreprocessorDefinitions) - true - MultiThreadedDLL - true - Use - stdafx.h - .\win32\obj/Animation.pch - .\win32\obj/ - .\win32\obj/ - .\win32\obj/ - Level4 - true - Default - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - - - TKVCAF.lib;TKBRep.lib;TKBool.lib;TKCAF.lib;TKCDF.lib;TKernel.lib;TKFeat.lib;TKFillet.lib;TKG2d.lib;TKG3d.lib;TKGeomAlgo.lib;TKGeomBase.lib;TKHLR.lib;TKMath.lib;TKOffset.lib;TKPrim.lib;TKService.lib;TKTopAlgo.lib;TKV3d.lib;TKOpenGl.lib;mfcsample.lib;TKBO.lib;%(AdditionalDependencies) - ../../../../win32\$(VCFMT)\bin/Animation.exe - true - ..\..\..\..\win32\$(VCFMT)\lib;$(CSF_OCCTLibPath);%(AdditionalLibraryDirectories) - ../../../../win32\$(VCFMT)\bin/Animation.pdb - Windows - MachineX86 - - - - - NDEBUG;%(PreprocessorDefinitions) - true - true - X64 - .\win64\obj/Animation.tlb - - - - - MaxSpeed - OnlyExplicitInline - ..\..\..\;..\..\..\..\Common;$(CSF_OCCTIncludePath);%(AdditionalIncludeDirectories) - NDEBUG;_WINDOWS;%(PreprocessorDefinitions) - true - MultiThreadedDLL - true - Use - stdafx.h - .\win64\obj/Animation.pch - .\win64\obj/ - .\win64\obj/ - .\win64\obj/ - Level4 - true - Default - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - true - - - TKVCAF.lib;TKBRep.lib;TKBool.lib;TKCAF.lib;TKCDF.lib;TKernel.lib;TKFeat.lib;TKFillet.lib;TKG2d.lib;TKG3d.lib;TKGeomAlgo.lib;TKGeomBase.lib;TKHLR.lib;TKMath.lib;TKOffset.lib;TKPrim.lib;TKService.lib;TKTopAlgo.lib;TKV3d.lib;TKOpenGl.lib;mfcsample.lib;TKBO.lib;%(AdditionalDependencies) - ../../../../win64\$(VCFMT)\bin/Animation.exe - true - ..\..\..\..\win64\$(VCFMT)\lib;$(CSF_OCCTLibPath);%(AdditionalLibraryDirectories) - ../../../../win64\$(VCFMT)\bin/Animation.pdb - Windows - MachineX64 - - - - - %(PreprocessorDefinitions) - res;%(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - res;%(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - res;%(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - res;%(AdditionalIncludeDirectories) - - - - - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - - - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - - - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - - - - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - - - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - Create - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - Create - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - Create - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - Create - - - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - - - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - - - - - - - - - - - - - - - - - - - {2d6cbbe8-6965-4016-b503-0d715ae26691} - false - - - - - - \ No newline at end of file diff --git a/samples/mfc/standard/09_Animation/adm/win/vc10/Animation.vcxproj.filters b/samples/mfc/standard/09_Animation/adm/win/vc10/Animation.vcxproj.filters deleted file mode 100644 index 2be10d511f..0000000000 --- a/samples/mfc/standard/09_Animation/adm/win/vc10/Animation.vcxproj.filters +++ /dev/null @@ -1,82 +0,0 @@ - - - - - {d5298b93-c300-4e09-b89c-a7e7077e364f} - cpp;c;cxx;rc;def;r;odl;idl;hpj;bat - - - {44848e1a-ccd0-42de-b2d7-989ef24a56a9} - h;hpp;hxx;hm;inl - - - {ac89cece-2b9f-4975-ad38-a1fc83f2b2b3} - ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe - - - - - Source Files - - - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - - - Resource Files - - - Resource Files - - - \ No newline at end of file diff --git a/samples/mfc/standard/09_Animation/res/Animation.rc b/samples/mfc/standard/09_Animation/res/Animation.rc deleted file mode 100755 index f7147777e9..0000000000 --- a/samples/mfc/standard/09_Animation/res/Animation.rc +++ /dev/null @@ -1,271 +0,0 @@ -// Microsoft Visual C++ generated resource script. -// -#include "resource.h" - -#define APSTUDIO_READONLY_SYMBOLS -///////////////////////////////////////////////////////////////////////////// -// -// Generated from the TEXTINCLUDE 2 resource. -// -#include "afxres.h" -#include "..\..\Common\res\OCC_Resource.h" -///////////////////////////////////////////////////////////////////////////// -#undef APSTUDIO_READONLY_SYMBOLS - -///////////////////////////////////////////////////////////////////////////// -// English (U.S.) resources - -#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) -#ifdef _WIN32 -LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US -#pragma code_page(1252) -#endif //_WIN32 - -#ifdef APSTUDIO_INVOKED -///////////////////////////////////////////////////////////////////////////// -// -// TEXTINCLUDE -// - -1 TEXTINCLUDE -BEGIN - "resource.h\0" -END - -2 TEXTINCLUDE -BEGIN - "#include ""afxres.h""\r\n" - "#include ""..\\..\\Common\\res\\OCC_Resource.h""\0" -END - -3 TEXTINCLUDE -BEGIN - "#define _AFX_NO_SPLITTER_RESOURCES\r\n" - "#define _AFX_NO_OLE_RESOURCES\r\n" - "#define _AFX_NO_TRACKER_RESOURCES\r\n" - "#define _AFX_NO_PROPERTY_RESOURCES\r\n" - "\r\n" - "#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)\r\n" - "#ifdef _WIN32\r\n" - "LANGUAGE 9, 1\r\n" - "#pragma code_page(1252)\r\n" - "#endif\r\n" - "#include ""afxres.rc"" // Standard components\r\n" - "#endif\0" -END - -#endif // APSTUDIO_INVOKED - - -///////////////////////////////////////////////////////////////////////////// -// -// Bitmap -// - -IDR_MAINFRAME BITMAP "Toolbar.bmp" -IDR_3dCHILDFRAME BITMAP "child2.bmp" - -///////////////////////////////////////////////////////////////////////////// -// -// Toolbar -// - -IDR_MAINFRAME TOOLBAR 21, 20 -BEGIN - BUTTON ID_FILE_NEW - SEPARATOR - BUTTON ID_RESTART - BUTTON ID_STOP - BUTTON ID_Thread - BUTTON ID_SHADING - SEPARATOR - BUTTON ID_FILE_LOADGRID - SEPARATOR - BUTTON ID_APP_ABOUT -END - -IDR_3dCHILDFRAME TOOLBAR 20, 20 -BEGIN - BUTTON ID_BUTTONZoomAll - BUTTON ID_BUTTONZoomWin - BUTTON ID_BUTTONZoomProg - SEPARATOR - BUTTON ID_BUTTONPan - BUTTON ID_BUTTONPanGlo - SEPARATOR - BUTTON ID_BUTTONFly - BUTTON ID_BUTTONTurn - SEPARATOR - BUTTON ID_BUTTONRot - BUTTON ID_BUTTONReset - SEPARATOR - BUTTON ID_BUTTONHlrOff - BUTTON ID_BUTTONHlrOn -END - - -///////////////////////////////////////////////////////////////////////////// -// -// Menu -// - -IDR_MAINFRAME MENU -BEGIN - POPUP "&File" - BEGIN - MENUITEM "&New\tCtrl+N", ID_FILE_NEW - MENUITEM SEPARATOR - MENUITEM "E&xit", ID_APP_EXIT - END - POPUP "&View" - BEGIN - MENUITEM "&Toolbar", ID_VIEW_TOOLBAR - MENUITEM "&Status Bar", ID_VIEW_STATUS_BAR - END - POPUP "&Help" - BEGIN - MENUITEM "&About DisplayAnimation...", ID_APP_ABOUT - END -END - -IDR_3DTYPE MENU -BEGIN - POPUP "&File" - BEGIN - MENUITEM "&New\tCtrl+N", ID_FILE_NEW - MENUITEM "&Close", ID_FILE_CLOSE - MENUITEM SEPARATOR - MENUITEM "E&xit", ID_APP_EXIT - END - POPUP "&View" - BEGIN - MENUITEM "&Toolbar", ID_VIEW_TOOLBAR - MENUITEM "&Status Bar", ID_VIEW_STATUS_BAR - END - POPUP "&Window" - BEGIN - MENUITEM "&New Window", ID_WINDOW_NEW - MENUITEM "&Cascade", ID_WINDOW_CASCADE - MENUITEM "&Tile", ID_WINDOW_TILE_HORZ - MENUITEM "&Arrange Icons", ID_WINDOW_ARRANGE - END - POPUP "&Help" - BEGIN - MENUITEM "&About DisplayAnimation...", ID_APP_ABOUT - END -END - - -///////////////////////////////////////////////////////////////////////////// -// -// Dialog -// - -IDD_ShadingBoxDialog DIALOG 0, 0, 186, 95 -STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU -CAPTION "Deviation Coefficient" -FONT 8, "MS Sans Serif" -BEGIN - DEFPUSHBUTTON "OK",IDOK,21,65,50,14 - PUSHBUTTON "Cancel",IDCANCEL,111,65,50,14 - CONTROL "Slider1",IDC_SLIDER1,"msctls_trackbar32",TBS_TOP | TBS_NOTICKS | WS_BORDER | WS_TABSTOP,29,30,125,17 - LTEXT "Fine Default Unpolished",IDC_STATIC,35,14,118,13 -END - -IDD_ThreadBoxDialog DIALOG 0, 0, 186, 95 -STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU -CAPTION "Change the animation thread" -FONT 8, "MS Sans Serif" -BEGIN - DEFPUSHBUTTON "OK",IDOK,22,65,50,14 - PUSHBUTTON "Cancel",IDCANCEL,107,65,50,14 - GROUPBOX "Angle increment ",IDC_STATIC,7,7,172,49 - EDITTEXT IDC_Angle,65,27,48,16,ES_AUTOHSCROLL -END - -///////////////////////////////////////////////////////////////////////////// -// -// Version -// - -VS_VERSION_INFO VERSIONINFO - FILEVERSION 1,0,0,1 - PRODUCTVERSION 1,0,0,1 - FILEFLAGSMASK 0x3fL -#ifdef _DEBUG - FILEFLAGS 0x1L -#else - FILEFLAGS 0x0L -#endif - FILEOS 0x4L - FILETYPE 0x1L - FILESUBTYPE 0x0L -BEGIN - BLOCK "StringFileInfo" - BEGIN - BLOCK "040904b0" - BEGIN - VALUE "CompanyName", "Matra Datavision" - VALUE "FileDescription", "Sample Animation MFC Application" - VALUE "FileVersion", "1, 0, 0, 1" - VALUE "InternalName", "SampleAnimation" - VALUE "LegalCopyright", "Copyright (C) 1998" - VALUE "OriginalFilename", "SampleAnimation.EXE" - VALUE "ProductName", "SampleAnimation Application" - VALUE "ProductVersion", "1, 0, 0, 1" - END - END - BLOCK "VarFileInfo" - BEGIN - VALUE "Translation", 0x409, 1200 - END -END - - -///////////////////////////////////////////////////////////////////////////// -// -// String Table -// - -STRINGTABLE -BEGIN - IDR_MAINFRAME "Animation" - IDR_SAMPLE3DTYPE "\nAnimation\nAnimation\n\n\nAnimation.Document\nAnimation Document" -END - -STRINGTABLE -BEGIN - ID_ANIMATION "Build the model and start the animation\nStart the animation" - ID_STOP "Stop the animation\nStop the animation" - ID_RESTART "Restart the animation\nRestart the animation" - ID_SHADING "Deviation coefficient\nDeviation coefficient" - ID_Thread "Change the animation thread\nAnimation thread" - ID_DESTRUCT "Destruct the presentation\nDestruct the presentation" - ID_FILE_LOADGRID "Load Grid Files\nLoad Grid File" -END - -#endif // English (U.S.) resources -///////////////////////////////////////////////////////////////////////////// - - - -#ifndef APSTUDIO_INVOKED -///////////////////////////////////////////////////////////////////////////// -// -// Generated from the TEXTINCLUDE 3 resource. -// -#define _AFX_NO_SPLITTER_RESOURCES -#define _AFX_NO_OLE_RESOURCES -#define _AFX_NO_TRACKER_RESOURCES -#define _AFX_NO_PROPERTY_RESOURCES - -#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) -#ifdef _WIN32 -LANGUAGE 9, 1 -#pragma code_page(1252) -#endif -#include "afxres.rc" // Standard components -#endif -///////////////////////////////////////////////////////////////////////////// -#endif // not APSTUDIO_INVOKED - diff --git a/samples/mfc/standard/09_Animation/res/Toolbar.bmp b/samples/mfc/standard/09_Animation/res/Toolbar.bmp deleted file mode 100755 index d4c5b993392a47fa1fa43effd5ebf68849d792db..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2278 zcmchXzi!(w5XP@S0V?p28Yp0N>e}b%-gn_ts*|;u1q`&A3=KtIA)5ywfJYCSx&%Ss zwR1Kmllt9}JpHMf7DdpbM4u^=zx(bez5no|AhD0=-{Jm_`!((t^b$RhP0!hXm2UQl zD!Hht*u#wm=WsaSmq$9esO#9njmAUh++W*LZ8f(h=-^ttp#$#l@6*1bmaDmm0fUA2 z8|R*x<&zDdU|FQFcox>hGPj*YLfEje8dwDv#s9OeHI{cl`ZsDT>x^8HMPxt>&VIq% z`y#SR4Z_J|htQy0LhK)nymj|j*E{KJwTZ6aB8z1~*hcDA={B~JLlId#<6a-h!uZc3 z_rh}A_qH4BN-UAZ!kASO4oTYO_bjS7N;Z3jfFf%>V%JqE3rN~M-9O<&&XZdG! z&Dc-%4*lo)R@*3tD5pC|7g*O@>?N$qDa&3-@Z%g>7?H4yF+>yAH??67E26+LZ-jM` zS>!Z{vn&7%zmDE8)maqiD->;8Fa7N)w_y%T?*lJ#%zAu;FxF*_v$ygMU4T zh$@Gsz`u~+s*>^K{`OqJ|utH%nT{nzTF_%D^9zj zMl#7EDcV1Ne*F+MenEc5{Ehhu^Idok8Ny}OBJmND)5a+T{KM&F3nXB;TrODo;HrPP zUWqXA;}Jx9(-GdDuT^Haw2`OwWA_&@-JbuC9rAM`EIH*;${A?gdt1h4L-DpQOFLK% zqXPin^EaL>@D(lSn$p3W6@W?uMKl2q4x{G778_^<^Vt#2zEG`Fm=A>M%sfLRJ*^E5 zKJ#WWWmwXnX@QtA%_lX8$hSE+L@Uz*!02>))i!c}CYfF_~N)rwyJ)U=4}1vZrJIVFo`&j%){9QmNmy9S>l=f_Q0F)0_ul)boKPx%5N9;b6nR+4}6 zF)ZHossMHC65o+uV^6whj-Y;rZ$$xA8ug15Cd7XyKWT}tBPQA^v%Q-iyIY;U&yUrS zJ**JV1o;Rbk|7^b1Z5TK_s6$^!wcz4o^l+og8InbKgC3KW~%-y>FH%X6{$C)r3l92 z{kid}@6>&$#=4f&Thrcxh={$VU`|B7g?Vs#zpVU@urgkq!RN)LmEwg8t7dX8(c{yJ z(agY>DiwjiSLOU{RRe`xI`|m^#`aa&Q12J(OjYbO-d7q;Mx#n_4+9MGHF(DRj@ECb z@PlnJZ|^%h)W(LqKNYimmHcC7iZKj@Zfh$z%?WS19-sByZ9VbCf&%DY -#include -#include "AnimationDoc.h" -#include "AnimationView3D.h" -#include "..\..\Common\res\OCC_Resource.h" - -BEGIN_MESSAGE_MAP(CAnimationApp, OCC_App) - //{{AFX_MSG_MAP(CAnimationApp) - ON_COMMAND(ID_APP_ABOUT, OnAppAbout) - // NOTE - the ClassWizard will add and remove mapping macros here. - // DO NOT EDIT what you see in these blocks of generated code! - //}}AFX_MSG_MAP - // Standard file based document commands -END_MESSAGE_MAP() - -///////////////////////////////////////////////////////////////////////////// -// CAnimationApp construction - -CAnimationApp::CAnimationApp() : OCC_App() -{ - SampleName = "Animation"; //for about dialog - SetSamplePath (L"..\\..\\09_Animation"); -} - -///////////////////////////////////////////////////////////////////////////// -// The one and only CAnimationApp object - -CAnimationApp theApp; - -///////////////////////////////////////////////////////////////////////////// -// CAnimationApp initialization - -BOOL CAnimationApp::InitInstance() -{ - AfxEnableControlContainer(); - - // Standard initialization - // If you are not using these features and wish to reduce the size - // of your final executable, you should remove from the following - // the specific initialization routines you do not need. - - // Change the registry key under which our settings are stored. - // You should modify this string to be something appropriate - // such as the name of your company or organization. - // Modified by CasCade : - SetRegistryKey(_T("Local CasCade Applications")); - - LoadStdProfileSettings(); // Load standard INI file options (including MRU) - - // Register the application's document templates. Document templates - // serve as the connection between documents, frame windows and views. - - CMultiDocTemplate* pDocTemplateForView3d; - pDocTemplateForView3d = new CMultiDocTemplate( - IDR_3DTYPE, - RUNTIME_CLASS(CAnimationDoc), - RUNTIME_CLASS(OCC_3dChildFrame), // custom MDI child frame - RUNTIME_CLASS(CAnimationView3D)); - AddDocTemplate(pDocTemplateForView3d); - - - // create main MDI Frame window - OCC_MainFrame* pMainFrame = new OCC_MainFrame; - if (!pMainFrame->LoadFrame(IDR_MAINFRAME)) - return FALSE; - m_pMainWnd = pMainFrame; - - // Parse command line for standard shell commands, DDE, file open - CCommandLineInfo cmdInfo; - ParseCommandLine(cmdInfo); - - // Dispatch commands specified on the command line - if (!ProcessShellCommand(cmdInfo)) - return FALSE; - - // The main window has been initialized, so show and update it. - pMainFrame->ShowWindow(m_nCmdShow); - pMainFrame->UpdateWindow(); - - return TRUE; -} - -void CAnimationApp::OnAppAbout() -{ - CMDIFrameWnd *pFrame = (CMDIFrameWnd*)AfxGetApp()->m_pMainWnd; - CMDIChildWnd *pChild = (CMDIChildWnd *) pFrame->GetActiveFrame(); - CAnimationView3D *pView = (CAnimationView3D *) pChild->GetActiveView(); - pView -> OnStop(); - OCC_App::OnAppAbout(); - pView -> OnRestart(); -} - diff --git a/samples/mfc/standard/09_Animation/src/AnimationApp.h b/samples/mfc/standard/09_Animation/src/AnimationApp.h deleted file mode 100755 index a05ecb3b86..0000000000 --- a/samples/mfc/standard/09_Animation/src/AnimationApp.h +++ /dev/null @@ -1,38 +0,0 @@ -// AnimationApp.h : main header file for the Animation application -// - -#if !defined(AFX_ANIMATION_H__79840E7E_1001_11D2_B8C1_0000F87A77C1__INCLUDED_) -#define AFX_ANIMATION_H__79840E7E_1001_11D2_B8C1_0000F87A77C1__INCLUDED_ - -#if _MSC_VER >= 1000 -#pragma once -#endif // _MSC_VER >= 1000 - -#include - -class CAnimationApp : public OCC_App -{ -public: - - CAnimationApp(); - -//{{AFX_MSG(CAnimationApp) - afx_msg void OnAppAbout(); - // NOTE - the ClassWizard will add and remove member functions here. - // DO NOT EDIT what you see in these blocks of generated code ! - //}}AFX_MSG - DECLARE_MESSAGE_MAP() -// Overrides - // ClassWizard generated virtual function overrides - //{{AFX_VIRTUAL(CAnimationApp) - public: - virtual BOOL InitInstance(); - //}}AFX_VIRTUAL -}; - -///////////////////////////////////////////////////////////////////////////// - -//{{AFX_INSERT_LOCATION}} -// Microsoft Developer Studio will insert additional declarations immediately before the previous line. - -#endif // !defined(AFX_ANIMATION_H__79840E7E_1001_11D2_B8C1_0000F87A77C1__INCLUDED_) diff --git a/samples/mfc/standard/09_Animation/src/AnimationDoc.cpp b/samples/mfc/standard/09_Animation/src/AnimationDoc.cpp deleted file mode 100755 index 182857643f..0000000000 --- a/samples/mfc/standard/09_Animation/src/AnimationDoc.cpp +++ /dev/null @@ -1,344 +0,0 @@ -// AnimationDocApp.cpp : implementation of the CAnimationDoc class -// - -#include "stdafx.h" - -#include "AnimationApp.h" -#include "AnimationDoc.h" -#include "AnimationView3D.h" -#include "AISDialogs.h" -#include "ShadingDialog.h" -#include "ThreadDialog.h" -#include "Fonc.hxx" - -#define DEFAULT_COLOR Quantity_NOC_CYAN1 -#define DEFAULT_MATERIAL Graphic3d_NameOfMaterial_Plastered -#define DEFAULT_DEVIATIONCOEFFICIENT 0.001 -#define DEFAULT_HILIGHTCOLOR Quantity_NOC_YELLOW - - -#ifdef _DEBUG -//#define new DEBUG_NEW // by cascade -#undef THIS_FILE -static char THIS_FILE[] = __FILE__; -#endif - -///////////////////////////////////////////////////////////////////////////// -// CAnimationDoc - -IMPLEMENT_DYNCREATE(CAnimationDoc, CDocument) - -BEGIN_MESSAGE_MAP(CAnimationDoc, CDocument) - //{{AFX_MSG_MAP(CAnimationDoc) - ON_COMMAND(ID_SHADING, OnShading) - ON_COMMAND(ID_Thread, OnThread) - ON_COMMAND(ID_FILE_LOADGRID, OnFileLoadgrid) - ON_UPDATE_COMMAND_UI(ID_WALK_WALKTHRU, OnUpdateWalkWalkthru) - //}}AFX_MSG_MAP - -END_MESSAGE_MAP() - -///////////////////////////////////////////////////////////////////////////// -// CAnimationDoc construction/destruction - -CAnimationDoc::CAnimationDoc() -{ - // TODO: add one-time construction code here - - Handle(Graphic3d_GraphicDriver) aGraphicDriver = - ((CAnimationApp*)AfxGetApp())->GetGraphicDriver(); - - myViewer = new V3d_Viewer(aGraphicDriver); - myViewer->SetDefaultLights(); - myViewer->SetLightOn(); - - myAISContext =new AIS_InteractiveContext(myViewer); - - myDeviation = 0.0008; - thread = 4; - - BRep_Builder B; - TopoDS_Shape CrankArm; - TopoDS_Shape CylinderHead; - TopoDS_Shape Propeller; - TopoDS_Shape Piston; - TopoDS_Shape EngineBlock; - - /*wchar_t AbloluteExecutableFileName[200]; - HMODULE hModule = GetModuleHandleW (NULL); - GetModuleFileNameW (hModule, AbloluteExecutableFileName, 200); - CString aDataDirPath (AbloluteExecutableFileName); - int index = aDataDirPath.ReverseFind ('\\'); - aDataDirPath.Delete (index + 1, aDataDirPath.GetLength() - index - 1);*/ - - CString SHAREPATHValue; - SHAREPATHValue.GetEnvironmentVariable (L"CSF_OCCTDataPath"); - CString aDataDirPath = (SHAREPATHValue + "\\occ"); - - std::filebuf aFileBuf; - std::istream aStream (&aFileBuf); - CString aPathCrankArm = aDataDirPath + "\\CrankArm.rle"; - if (aFileBuf.open (aPathCrankArm, std::ios::in)) - { - BRepTools::Read (CrankArm, aStream, B); - aFileBuf.close(); - } - - CString aPathCylinderHead = aDataDirPath + "\\CylinderHead.rle"; - if (aFileBuf.open (aPathCylinderHead, std::ios::in)) - { - BRepTools::Read (CylinderHead, aStream, B); - aFileBuf.close(); - } - - CString aPathPropeller = aDataDirPath + "\\Propeller.rle"; - if (aFileBuf.open (aPathPropeller, std::ios::in)) - { - BRepTools::Read (Propeller, aStream, B); - aFileBuf.close(); - } - - CString aPathPiston = aDataDirPath + "\\Piston.rle"; - if (aFileBuf.open (aPathPiston, std::ios::in)) - { - BRepTools::Read (Piston, aStream, B); - aFileBuf.close(); - } - - CString aPathEngineBlock = aDataDirPath + "\\EngineBlock.rle"; - if (aFileBuf.open (aPathEngineBlock, std::ios::in)) - { - BRepTools::Read (EngineBlock, aStream, B); - aFileBuf.close(); - } - - if (CrankArm.IsNull() || CylinderHead.IsNull() || - Propeller.IsNull() || Piston.IsNull() || EngineBlock.IsNull()) - { - int rep = MessageBoxW (AfxGetApp()->m_pMainWnd->m_hWnd, L"Shape(s) not found.\nCheck the Data directory path!", L"Error", MB_OK | MB_ICONERROR); - if (rep == IDOK) - exit(0); - } - myAISContext->SetDeviationCoefficient(myDeviation); - - myAisCylinderHead = new AIS_Shape (CylinderHead); - myAISContext->SetColor (myAisCylinderHead, Quantity_NOC_WHITE, Standard_False); - myAISContext->SetMaterial (myAisCylinderHead, Graphic3d_NameOfMaterial_Plastified, Standard_False); - myAisEngineBlock = new AIS_Shape (EngineBlock); - myAISContext->SetColor(myAisEngineBlock, Quantity_NOC_WHITE, Standard_False); - myAISContext->SetMaterial(myAisEngineBlock,Graphic3d_NameOfMaterial_Plastified, Standard_False); - - myAISContext->Display(myAisCylinderHead ,1,-1,Standard_False); - myAISContext->Display(myAisEngineBlock ,1,-1,Standard_False); - - myAisCrankArm = new AIS_Shape (CrankArm); - myAISContext->SetColor (myAisCrankArm, Quantity_NOC_HOTPINK, Standard_False); - myAISContext->SetMaterial(myAisCrankArm, Graphic3d_NameOfMaterial_Plastified, Standard_False); - myAisPiston = new AIS_Shape (Piston); - myAISContext->SetColor (myAisPiston , Quantity_NOC_WHITE, Standard_False); - myAISContext->SetMaterial(myAisPiston , Graphic3d_NameOfMaterial_Plastified, Standard_False); - myAisPropeller = new AIS_Shape (Propeller); - myAISContext->SetColor (myAisPropeller, Quantity_NOC_RED, Standard_False); - myAISContext->SetMaterial(myAisPropeller, Graphic3d_NameOfMaterial_Plastified, Standard_False); - - myAISContext->Display(myAisCrankArm, 1,-1,Standard_False); - myAISContext->Display(myAisPropeller, 1,-1,Standard_False); - myAISContext->Display(myAisPiston, 1,-1,Standard_True); - - m_Xmin = -300. ; - m_Ymin = -300. ; - m_Zmin = -300. ; - m_Xmax = +300. ; - m_Ymax = +300. ; - m_Zmax = +300. ; - - m_bIsGridLoaded = FALSE; -} - -CAnimationDoc::~CAnimationDoc() -{ -} - -///////////////////////////////////////////////////////////////////////////// -// CAnimationDoc diagnostics - -#ifdef _DEBUG -void CAnimationDoc::AssertValid() const -{ - CDocument::AssertValid(); -} - -void CAnimationDoc::Dump(CDumpContext& dc) const -{ - CDocument::Dump(dc); -} -#endif //_DEBUG - -///////////////////////////////////////////////////////////////////////////// -// CAnimationDoc commands -//----------------------------------------------------------------------------------------- -// -//----------------------------------------------------------------------------------------- - -//----------------------------------------------------------------------------------------- -// -//----------------------------------------------------------------------------------------- -void CAnimationDoc::Popup(const Standard_Integer /*x*/, - const Standard_Integer /*y*/ , - const Handle(V3d_View)& /*aView*/) -{ -} - -void CAnimationDoc::OnMyTimer (double theTimeSec) -{ - // TODO: Add your message handler code here and/or call default - - Standard_Real angleA; - Standard_Real angleB; - Standard_Real X; - gp_Ax1 Ax1(gp_Pnt(0,0,0),gp_Vec(0,0,1)); - - angleA = thread * theTimeSec; - X = Sin(angleA)*3/8; - angleB = atan(X / Sqrt(-X * X + 1)); - Standard_Real decal(25*0.6); - - - //Build a transformation on the display - gp_Trsf aPropellerTrsf; - aPropellerTrsf.SetRotation(Ax1,angleA); - myAISContext->SetLocation(myAisPropeller,aPropellerTrsf); - - gp_Ax3 base(gp_Pnt(3*decal*(1-Cos(angleA)),-3*decal*Sin(angleA),0),gp_Vec(0,0,1),gp_Vec(1,0,0)); - gp_Trsf aCrankArmTrsf; - aCrankArmTrsf.SetTransformation( base.Rotated(gp_Ax1(gp_Pnt(3*decal,0,0),gp_Dir(0,0,1)),angleB)); - myAISContext->SetLocation(myAisCrankArm,aCrankArmTrsf); - - gp_Trsf aPistonTrsf; - aPistonTrsf.SetTranslation(gp_Vec(-3*decal*(1-Cos(angleA))-8*decal*(1-Cos(angleB)),0,0)); - myAISContext->SetLocation(myAisPiston,aPistonTrsf); -} - -void CAnimationDoc::OnShading() -{ - - POSITION position = GetFirstViewPosition(); - CView* pCurrentView = (CView*)GetNextView(position); - ((CAnimationView3D *)pCurrentView) ->OnStop(); - - CShadingDialog aDial(NULL); - - aDial.myvalue=int((myDeviation-0.00003)/0.00003); - - if (aDial.DoModal()==IDOK) { - Standard_Real dev(aDial.myvalue); - myDeviation = 0.00003+0.00003*dev; - - myAISContext->SetDeviationCoefficient(myDeviation); - TopoDS_Shape Propeller=myAisPropeller->Shape(); - BRepTools::Clean(Propeller); - - myAisPropeller->Set(Propeller); - myAISContext->Deactivate(myAisPropeller); - myAISContext->Redisplay (myAisPropeller, Standard_True); - } - ((CAnimationView3D *)pCurrentView)->OnRestart(); -} - - -void CAnimationDoc::OnThread() -{ - POSITION position = GetFirstViewPosition(); - CView* pCurrentView = (CView*)GetNextView(position); - ((CAnimationView3D *)pCurrentView) ->OnStop(); - CThreadDialog aThreadDial(NULL); - if (aThreadDial.DoModal()==IDOK) { - thread = aThreadDial.m_Angle; - } - - ((CAnimationView3D *)pCurrentView)->OnRestart(); -} - - -void CAnimationDoc::OnFileLoadgrid() -{ - // TODO: Add your command handler code here - - CFileDialog dlg(TRUE, - NULL, - NULL, - OFN_HIDEREADONLY | OFN_OVERWRITEPROMPT, - L"Points Files (*.pnt;*.pnts)|*.pnt; *.pnts|All Files (*.*)|*.*||", - NULL ); - - CString initdir; - initdir.GetEnvironmentVariable (L"CSF_OCCTDataPath"); - initdir += L"\\occ\\"; - - dlg.m_ofn.lpstrInitialDir = initdir; - - - if (dlg.DoModal() == IDOK) - { - CString C = dlg.GetPathName(); - SetCursor(AfxGetApp()->LoadStandardCursor(IDC_WAIT)); - - Handle(Geom_BSplineSurface) mySurface; - - if(grid2surf(C,mySurface )) - { - //To set the minimum value of the surface to Z=0 - Standard_Real Tolerance = 0.0; - Bnd_Box B; - TopoDS_Face myFace; - GeomAdaptor_Surface GAS(mySurface); - - - BndLib_AddSurface::Add(GAS,Tolerance,B); - - Standard_Real Xmin,Xmax,Ymin,Ymax,Zmin,Zmax; - B.Get(Xmin,Ymin,Zmin,Xmax,Ymax,Zmax); - TopoDS_Solid Box = BRepPrimAPI_MakeBox(gp_Pnt(Xmin,Ymin,0),Xmax-Xmin,Ymax-Ymin,50).Solid(); - - gp_Vec V(gp_Pnt(0,0,Zmin),gp_Pnt(0,0,0)); - - gp_Trsf T; - T.SetTranslation(V); - mySurface->Transform(T); - BRepBuilderAPI_MakeFace aMkFace(mySurface, Precision::Confusion()); - myFace = aMkFace.Face(); - - // Remove all other shapes - myAISContext->RemoveAll (Standard_False); - - Handle(AIS_Shape) myAISSurface = new AIS_Shape(myFace); - - myAISContext->Display(myAISSurface, Standard_False); - myAISContext->Deactivate(myAISSurface,Standard_False); - myAISContext->SetColor (myAISSurface,Quantity_NOC_WHITE,Standard_False); - myAISContext->SetMaterial (myAISSurface,Graphic3d_NameOfMaterial_Stone,Standard_False); - myAISContext->SetDisplayMode (myAISSurface,1,Standard_False); - myAISContext->SetDeviationCoefficient (0.001); - CMDIFrameWnd *pFrame = (CMDIFrameWnd*)AfxGetApp()->m_pMainWnd; - CMDIChildWnd *pChild = (CMDIChildWnd *) pFrame->GetActiveFrame(); - CAnimationView3D *pView = (CAnimationView3D *) pChild->GetActiveView(); - pView->FitAll(); - - Bnd_Box Boite; - BRepBndLib::Add(myFace, Boite); - Boite.Get(m_Xmin, m_Ymin, m_Zmin, m_Xmax, m_Ymax, m_Zmax); - - m_bIsGridLoaded = TRUE; - } - SetCursor(AfxGetApp()->LoadStandardCursor(IDC_ARROW)); -} - - -} - -void CAnimationDoc::OnUpdateWalkWalkthru(CCmdUI* pCmdUI) -{ - // TODO: Add your command update UI handler code here - CString aValue; - pCmdUI->SetCheck (aValue.GetEnvironmentVariable (L"CSF_WALKTHROUGH") ? 1 : 0); -} diff --git a/samples/mfc/standard/09_Animation/src/AnimationDoc.h b/samples/mfc/standard/09_Animation/src/AnimationDoc.h deleted file mode 100755 index ce27112b3b..0000000000 --- a/samples/mfc/standard/09_Animation/src/AnimationDoc.h +++ /dev/null @@ -1,67 +0,0 @@ -// Animation.h : interface of the CAnimationDoc class -// -///////////////////////////////////////////////////////////////////////////// - -#if !defined(AFX_ANIMATIONDOC_H__79840E86_1001_11D2_B8C1_0000F87A77C1__INCLUDED_) -#define AFX_ANIMATIONDOC_H__79840E86_1001_11D2_B8C1_0000F87A77C1__INCLUDED_ - -#if _MSC_VER >= 1000 -#pragma once -#endif // _MSC_VER >= 1000 - -#include "OCC_BaseDoc.h" -#include "AIS_ConnectedInteractive.hxx" -#include "Geom_Transformation.hxx" - - -class CAnimationDoc : public OCC_BaseDoc -{ -public: - void Popup (const Standard_Integer x, - const Standard_Integer y, - const Handle(V3d_View)& aView); - -protected: // create from serialization only - CAnimationDoc(); - DECLARE_DYNCREATE(CAnimationDoc) - -// Implementation -public: - virtual ~CAnimationDoc(); -#ifdef _DEBUG - virtual void AssertValid() const; - virtual void Dump(CDumpContext& dc) const; -#endif - -// Generated message map functions -protected: - //{{AFX_MSG(CAnimationDoc) - afx_msg void OnShading(); - afx_msg void OnThread(); - afx_msg void OnFileLoadgrid(); - afx_msg void OnUpdateWalkWalkthru(CCmdUI* pCmdUI); - //}}AFX_MSG - DECLARE_MESSAGE_MAP() - -private: - Handle(AIS_Shape) myAisCrankArm ; - Handle(AIS_Shape) myAisCylinderHead ; - Handle(AIS_Shape) myAisPropeller ; - Handle(AIS_Shape) myAisPiston ; - Handle(AIS_Shape) myAisEngineBlock ; - - Standard_Real myDeviation; - -public: - void OnMyTimer (double theTimeSec); - Standard_Integer thread; - double m_Xmin, m_Ymin, m_Zmin, m_Xmax, m_Ymax, m_Zmax; - BOOL m_bIsGridLoaded; -}; - -///////////////////////////////////////////////////////////////////////////// - -//{{AFX_INSERT_LOCATION}} -// Microsoft Developer Studio will insert additional declarations immediately before the previous line. - -#endif // !defined(AFX_ANIMATIONDOC_H__79840E86_1001_11D2_B8C1_0000F87A77C1__INCLUDED_) diff --git a/samples/mfc/standard/09_Animation/src/AnimationView3D.cpp b/samples/mfc/standard/09_Animation/src/AnimationView3D.cpp deleted file mode 100755 index 1cc55b62e7..0000000000 --- a/samples/mfc/standard/09_Animation/src/AnimationView3D.cpp +++ /dev/null @@ -1,568 +0,0 @@ -// AnimationView3D.cpp : implementation of the CAnimationView3D class -// - -#include "stdafx.h" - -#include "AnimationView3D.h" - -#include "AnimationApp.h" -#include "ShadingDialog.h" -#include "AnimationDoc.h" - -#include - -#ifdef _DEBUG -//#define new DEBUG_NEW by CasCade -#undef THIS_FILE -static char THIS_FILE[] = __FILE__; -#endif -static int rotCount = 0; - -// for elastic bean selection -#define ValZWMin 1 - - -///////////////////////////////////////////////////////////////////////////// -// CAnimationView3D - -IMPLEMENT_DYNCREATE(CAnimationView3D, CView) - -BEGIN_MESSAGE_MAP(CAnimationView3D, CView) - //{{AFX_MSG_MAP(CAnimationView3D) - ON_COMMAND(ID_BUTTONAxo, OnBUTTONAxo) - ON_COMMAND(ID_BUTTONBack, OnBUTTONBack) - ON_COMMAND(ID_BUTTONBottom, OnBUTTONBottom) - ON_COMMAND(ID_BUTTONFront, OnBUTTONFront) - ON_COMMAND(ID_BUTTONHlrOff, OnBUTTONHlrOff) - ON_COMMAND(ID_BUTTONHlrOn, OnBUTTONHlrOn) - ON_COMMAND(ID_BUTTONLeft, OnBUTTONLeft) - ON_COMMAND(ID_BUTTONPan, OnBUTTONPan) - ON_COMMAND(ID_BUTTONPanGlo, OnBUTTONPanGlo) - ON_COMMAND(ID_BUTTONReset, OnBUTTONReset) - ON_COMMAND(ID_BUTTONRight, OnBUTTONRight) - ON_COMMAND(ID_BUTTONRot, OnBUTTONRot) - ON_COMMAND(ID_BUTTONTop, OnBUTTONTop) - ON_COMMAND(ID_BUTTONZoomAll, OnBUTTONZoomAll) - ON_COMMAND(ID_FILE_EXPORT_IMAGE, OnFileExportImage) - ON_WM_SIZE() - ON_COMMAND(ID_BUTTONZoomProg, OnBUTTONZoomProg) - ON_COMMAND(ID_BUTTONZoomWin, OnBUTTONZoomWin) - ON_WM_MOUSEWHEEL() - ON_WM_LBUTTONDOWN() - ON_WM_LBUTTONUP() - ON_WM_MBUTTONDOWN() - ON_WM_MBUTTONUP() - ON_WM_MOUSEMOVE() - ON_WM_RBUTTONDOWN() - ON_WM_RBUTTONUP() - ON_UPDATE_COMMAND_UI(ID_BUTTONHlrOff, OnUpdateBUTTONHlrOff) - ON_UPDATE_COMMAND_UI(ID_BUTTONHlrOn, OnUpdateBUTTONHlrOn) - ON_UPDATE_COMMAND_UI(ID_BUTTONPanGlo, OnUpdateBUTTONPanGlo) - ON_UPDATE_COMMAND_UI(ID_BUTTONPan, OnUpdateBUTTONPan) - ON_UPDATE_COMMAND_UI(ID_BUTTONZoomProg, OnUpdateBUTTONZoomProg) - ON_UPDATE_COMMAND_UI(ID_BUTTONZoomWin, OnUpdateBUTTONZoomWin) - ON_UPDATE_COMMAND_UI(ID_BUTTONRot, OnUpdateBUTTONRot) - - ON_COMMAND(ID_Modify_ChangeBackground , OnChangeBackground) - ON_WM_TIMER() - ON_COMMAND(ID_STOP, OnStop) - ON_COMMAND(ID_RESTART, OnRestart) - - ON_COMMAND(ID_BUTTONFly, OnBUTTONFly) - ON_COMMAND(ID_BUTTONTurn, OnBUTTONTurn) - ON_UPDATE_COMMAND_UI(ID_BUTTONFly, OnUpdateBUTTONFly) - ON_UPDATE_COMMAND_UI(ID_BUTTONTurn, OnUpdateBUTTONTurn) - //}}AFX_MSG_MAP -// CasCade - -END_MESSAGE_MAP() - -///////////////////////////////////////////////////////////////////////////// -// CAnimationView3D construction/destruction - -CAnimationView3D::CAnimationView3D() -: myCurZoom (0.0), - myHlrModeIsOn (Standard_False), - myIsTurnStarted (Standard_False), - myUpdateRequests (0), - myCurrentMode (CurrentAction3d_Nothing) -{ - myDefaultGestures = myMouseGestureMap; -} - -CAnimationView3D::~CAnimationView3D() -{ - myView->Remove(); -} - -BOOL CAnimationView3D::PreCreateWindow(CREATESTRUCT& cs) -{ - // TODO: Modify the Window class or styles here by modifying - // the CREATESTRUCT cs - cs.lpszClass = ::AfxRegisterWndClass(CS_HREDRAW | CS_VREDRAW | CS_DBLCLKS | CS_OWNDC, ::LoadCursor(NULL, IDC_ARROW), NULL, NULL); - return CView::PreCreateWindow(cs); -} - -///////////////////////////////////////////////////////////////////////////// -// CAnimationView3D drawing - - -// ================================================================ -// Function : update3dView -// Purpose : -// ================================================================ -void CAnimationView3D::update3dView() -{ - if (myView.IsNull()) - { - return; - } - - if (++myUpdateRequests == 1) - { - Invalidate (FALSE); - UpdateWindow(); - } -} - -// ================================================================ -// Function : redraw3dView -// Purpose : -// ================================================================ -void CAnimationView3D::redraw3dView() -{ - if (!myView.IsNull()) - { - FlushViewEvents (GetDocument()->GetAISContext(), myView, true); - } -} - -// ================================================================ -// Function : handleViewRedraw -// Purpose : -// ================================================================ -void CAnimationView3D::handleViewRedraw (const Handle(AIS_InteractiveContext)& theCtx, - const Handle(V3d_View)& theView) -{ - myUpdateRequests = 0; - if (myAnimTimer.IsStarted()) - { - GetDocument()->OnMyTimer (myAnimTimer.ElapsedTime()); - setAskNextFrame(); - } - AIS_ViewController::handleViewRedraw (theCtx, theView); -} - -void CAnimationView3D::OnDraw(CDC* /*pDC*/) -{ - // always redraw immediate layer (dynamic highlighting) on Paint event, - // and redraw entire view content only when it is explicitly invalidated (V3d_View::Invalidate()) - myView->InvalidateImmediate(); - FlushViewEvents (GetDocument()->GetInteractiveContext(), myView, true); -} - -void CAnimationView3D::OnInitialUpdate() -{ - CView::OnInitialUpdate(); - - // TODO: Add your specialized code here and/or call the base class - // myView = GetDocument()->GetViewer()->CreateView(); - Handle(V3d_Viewer) aViewer = GetDocument()->GetViewer(); - aViewer->SetDefaultTypeOfView (V3d_PERSPECTIVE); - - myView = aViewer->CreateView(); - myView->SetImmediateUpdate (false); - - // store for restore state after rotation (witch is in Degenerated mode) - myHlrModeIsOn = myView->ComputedMode(); - - Handle(WNT_Window) aWNTWindow = new WNT_Window (GetSafeHwnd()); - myView->SetWindow(aWNTWindow); - if (!aWNTWindow->IsMapped()) aWNTWindow->Map(); - - // store the mode ( nothing , dynamic zooming, dynamic ... ) - myCurrentMode = CurrentAction3d_Nothing; - - CFrameWnd* pParentFrm = GetParentFrame(); - pParentFrm->ActivateFrame(SW_SHOWMAXIMIZED); -} - -// ======================================================================= -// function : defineMouseGestures -// purpose : -// ======================================================================= -void CAnimationView3D::defineMouseGestures() -{ - myMouseGestureMap.Clear(); - switch (myCurrentMode) - { - case CurrentAction3d_Nothing: - { - myMouseGestureMap = myDefaultGestures; - break; - } - case CurrentAction3d_DynamicZooming: - { - myMouseGestureMap.Bind (Aspect_VKeyMouse_LeftButton, AIS_MouseGesture_Zoom); - break; - } - case CurrentAction3d_GlobalPanning: - { - break; - } - case CurrentAction3d_WindowZooming: - { - myMouseGestureMap.Bind (Aspect_VKeyMouse_LeftButton, AIS_MouseGesture_ZoomWindow); - break; - } - case CurrentAction3d_DynamicPanning: - { - myMouseGestureMap.Bind (Aspect_VKeyMouse_LeftButton, AIS_MouseGesture_Pan); - break; - } - case CurrentAction3d_DynamicRotation: - { - myMouseGestureMap.Bind (Aspect_VKeyMouse_LeftButton, AIS_MouseGesture_RotateOrbit); - break; - } - case CurrentAction3d_Fly: - { - myMouseGestureMap.Bind (Aspect_VKeyMouse_LeftButton, AIS_MouseGesture_RotateView); - break; - } - } -} - -///////////////////////////////////////////////////////////////////////////// -// CAnimationView3D diagnostics - -#ifdef _DEBUG -void CAnimationView3D::AssertValid() const -{ - CView::AssertValid(); -} - -void CAnimationView3D::Dump(CDumpContext& dc) const -{ - CView::Dump(dc); -} - -CAnimationDoc* CAnimationView3D::GetDocument() // non-debug version is inline -{ - ASSERT(m_pDocument->IsKindOf(RUNTIME_CLASS(CAnimationDoc))); - return (CAnimationDoc*)m_pDocument; -} -#endif //_DEBUG - -///////////////////////////////////////////////////////////////////////////// -// CAnimationView3D message handlers -void CAnimationView3D::OnFileExportImage() -{ - GetDocument()->ExportView (myView); -} - -void CAnimationView3D::OnSize(UINT nType, int cx, int cy) -{ - CView::OnSize (nType, cx, cy); - if (cx != 0 - && cy != 0 - && !myView.IsNull()) - { - myView->Window()->DoResize(); - myView->MustBeResized(); - myView->Invalidate(); - update3dView(); - } -} - -void CAnimationView3D::OnBUTTONBack() -{ myView->SetProj(V3d_Ypos); } // See the back View -void CAnimationView3D::OnBUTTONFront() -{ myView->SetProj(V3d_Yneg); } // See the front View - -void CAnimationView3D::OnBUTTONBottom() -{ myView->SetProj(V3d_Zneg); } // See the bottom View -void CAnimationView3D::OnBUTTONTop() -{ myView->SetProj(V3d_Zpos); } // See the top View - -void CAnimationView3D::OnBUTTONLeft() -{ myView->SetProj(V3d_Xneg); } // See the left View -void CAnimationView3D::OnBUTTONRight() -{ myView->SetProj(V3d_Xpos); } // See the right View - -void CAnimationView3D::OnBUTTONAxo() -{ myView->SetProj(V3d_XposYnegZpos); } // See the axonometric View - -void CAnimationView3D::OnBUTTONHlrOff() -{ - myHlrModeIsOn = Standard_False; - myView->SetComputedMode (myHlrModeIsOn); - myView->Redraw(); -} - -void CAnimationView3D::OnBUTTONHlrOn() -{ - SetCursor(AfxGetApp()->LoadStandardCursor(IDC_WAIT)); - myHlrModeIsOn = Standard_True; - myView->SetComputedMode (myHlrModeIsOn); - myView->Redraw(); - SetCursor(AfxGetApp()->LoadStandardCursor(IDC_ARROW)); -} - -void CAnimationView3D::OnBUTTONPan() -{ - setCurrentAction (CurrentAction3d_DynamicPanning); -} - -void CAnimationView3D::OnBUTTONPanGlo() -{ - // save the current zoom value - myCurZoom = myView->Scale(); - // Do a Global Zoom - myView->FitAll(); - // Set the mode - setCurrentAction (CurrentAction3d_GlobalPanning); -} - -void CAnimationView3D::OnBUTTONReset() -{ - myView->Reset(); -} - -void CAnimationView3D::OnBUTTONRot() -{ setCurrentAction (CurrentAction3d_DynamicRotation); } - - -void CAnimationView3D::OnBUTTONZoomAll() -{ - FitAll(); -} - -void CAnimationView3D::OnBUTTONZoomProg() -{ setCurrentAction (CurrentAction3d_DynamicZooming); } - -void CAnimationView3D::OnBUTTONZoomWin() -{ setCurrentAction (CurrentAction3d_WindowZooming); } - -void CAnimationView3D::OnBUTTONFly() -{ setCurrentAction (CurrentAction3d_Fly); } - -void CAnimationView3D::OnBUTTONTurn() -{ setCurrentAction (CurrentAction3d_Turn); } - - -void CAnimationView3D::OnLButtonDown(UINT theFlags, CPoint thePoint) -{ - const Aspect_VKeyFlags aFlags = WNT_Window::MouseKeyFlagsFromEvent (theFlags); - PressMouseButton (Graphic3d_Vec2i (thePoint.x, thePoint.y), Aspect_VKeyMouse_LeftButton, aFlags, false); - myClickPos.SetValues (thePoint.x, thePoint.y); - myIsTurnStarted = myCurrentMode == CurrentAction3d_Turn && aFlags == Aspect_VKeyFlags_NONE; - update3dView(); -} - -void CAnimationView3D::OnLButtonUp(UINT theFlags, CPoint thePoint) -{ - const Aspect_VKeyFlags aFlags = WNT_Window::MouseKeyFlagsFromEvent (theFlags); - ReleaseMouseButton (Graphic3d_Vec2i (thePoint.x, thePoint.y), Aspect_VKeyMouse_LeftButton, aFlags, false); - if (myCurrentMode == CurrentAction3d_GlobalPanning) - { - myView->Place (thePoint.x, thePoint.y, myCurZoom); - myView->Invalidate(); - } - if (myCurrentMode != CurrentAction3d_Nothing) - { - setCurrentAction (CurrentAction3d_Nothing); - myIsTurnStarted = false; - } - update3dView(); -} - -void CAnimationView3D::OnMButtonDown(UINT theFlags, CPoint thePoint) -{ - const Aspect_VKeyFlags aFlags = WNT_Window::MouseKeyFlagsFromEvent (theFlags); - PressMouseButton (Graphic3d_Vec2i (thePoint.x, thePoint.y), Aspect_VKeyMouse_MiddleButton, aFlags, false); - update3dView(); -} - -void CAnimationView3D::OnMButtonUp(UINT theFlags, CPoint thePoint) -{ - const Aspect_VKeyFlags aFlags = WNT_Window::MouseKeyFlagsFromEvent (theFlags); - ReleaseMouseButton (Graphic3d_Vec2i (thePoint.x, thePoint.y), Aspect_VKeyMouse_MiddleButton, aFlags, false); - update3dView(); - if (myCurrentMode != CurrentAction3d_Nothing) - { - setCurrentAction (CurrentAction3d_Nothing); - } -} - -void CAnimationView3D::OnRButtonDown(UINT theFlags, CPoint thePoint) -{ - const Aspect_VKeyFlags aFlags = WNT_Window::MouseKeyFlagsFromEvent (theFlags); - PressMouseButton (Graphic3d_Vec2i (thePoint.x, thePoint.y), Aspect_VKeyMouse_RightButton, aFlags, false); - update3dView(); - myClickPos.SetValues (thePoint.x, thePoint.y); -} - -void CAnimationView3D::OnRButtonUp(UINT theFlags, CPoint thePoint) -{ - const Aspect_VKeyFlags aFlags = WNT_Window::MouseKeyFlagsFromEvent (theFlags); - ReleaseMouseButton (Graphic3d_Vec2i (thePoint.x, thePoint.y), Aspect_VKeyMouse_RightButton, aFlags, false); - update3dView(); - if (myCurrentMode != CurrentAction3d_Nothing) - { - setCurrentAction (CurrentAction3d_Nothing); - } - if (aFlags == Aspect_VKeyFlags_NONE - && (myClickPos - Graphic3d_Vec2i (thePoint.x, thePoint.y)).cwiseAbs().maxComp() <= 4) - { - GetDocument()->Popup (thePoint.x, thePoint.y, myView); - } -} - -// ======================================================================= -// function : OnMouseWheel -// purpose : -// ======================================================================= -BOOL CAnimationView3D::OnMouseWheel (UINT theFlags, short theDelta, CPoint thePoint) -{ - const Standard_Real aDeltaF = Standard_Real(theDelta) / Standard_Real(WHEEL_DELTA); - CPoint aCursorPnt = thePoint; - ScreenToClient (&aCursorPnt); - const Graphic3d_Vec2i aPos (aCursorPnt.x, aCursorPnt.y); - const Aspect_VKeyFlags aFlags = WNT_Window::MouseKeyFlagsFromEvent (theFlags); - if (UpdateMouseScroll (Aspect_ScrollDelta (aPos, aDeltaF, aFlags))) - { - update3dView(); - } - return true; -} - -void CAnimationView3D::OnMouseMove(UINT theFlags, CPoint thePoint) -{ - TRACKMOUSEEVENT aMouseEvent; // for WM_MOUSELEAVE - aMouseEvent.cbSize = sizeof(aMouseEvent); - aMouseEvent.dwFlags = TME_LEAVE; - aMouseEvent.hwndTrack = m_hWnd; - aMouseEvent.dwHoverTime = HOVER_DEFAULT; - if (!::_TrackMouseEvent (&aMouseEvent)) { TRACE("Track ERROR!\n"); } - - const Graphic3d_Vec2i aNewPnt (thePoint.x, thePoint.y); - const Aspect_VKeyFlags aFlags = WNT_Window::MouseKeyFlagsFromEvent (theFlags); - if (UpdateMousePosition (aNewPnt, PressedMouseButtons(), aFlags, false)) - { - update3dView(); - } - - if (myIsTurnStarted) - { - Graphic3d_Vec2i aWinSize; - myView->Window()->Size (aWinSize.x(), aWinSize.y()); - const Graphic3d_Vec2i aCenter = aWinSize / 2; - if (myClickPos != aCenter - && aNewPnt != aCenter - && aNewPnt != myClickPos) - { - const Graphic3d_Vec2i aVecFrom = myClickPos - aCenter; - const Graphic3d_Vec2i aVecTo = aNewPnt - aCenter; - const gp_Dir aDirFrom (aVecFrom.x() / double(aWinSize.x() / 2), aVecFrom.y() / double(aWinSize.y() / 2), 0.0); - const gp_Dir aDirTo (aVecTo.x() / double(aWinSize.x() / 2), aVecTo.y() / double(aWinSize.y() / 2), 0.0); - double anAngle = aDirFrom.AngleWithRef (aDirTo, gp::DZ()); - - myView->SetTwist (myView->Twist() + anAngle); - myView->Invalidate(); - update3dView(); - myClickPos = aNewPnt; - } - } -} - -void CAnimationView3D::OnUpdateBUTTONHlrOff(CCmdUI* pCmdUI) -{ - pCmdUI->SetCheck (!myHlrModeIsOn); - pCmdUI->Enable (myHlrModeIsOn); -} - -void CAnimationView3D::OnUpdateBUTTONHlrOn(CCmdUI* pCmdUI) -{ - pCmdUI->SetCheck (myHlrModeIsOn); - pCmdUI->Enable (!myHlrModeIsOn); -} - -void CAnimationView3D::OnUpdateBUTTONPanGlo(CCmdUI* pCmdUI) -{ - pCmdUI->SetCheck (myCurrentMode == CurrentAction3d_GlobalPanning); - pCmdUI->Enable (myCurrentMode != CurrentAction3d_GlobalPanning); - -} - -void CAnimationView3D::OnUpdateBUTTONPan(CCmdUI* pCmdUI) -{ - pCmdUI->SetCheck (myCurrentMode == CurrentAction3d_DynamicPanning); - pCmdUI->Enable (myCurrentMode != CurrentAction3d_DynamicPanning ); -} - -void CAnimationView3D::OnUpdateBUTTONZoomProg(CCmdUI* pCmdUI) -{ - pCmdUI->SetCheck (myCurrentMode == CurrentAction3d_DynamicZooming ); - pCmdUI->Enable (myCurrentMode != CurrentAction3d_DynamicZooming); -} - -void CAnimationView3D::OnUpdateBUTTONZoomWin(CCmdUI* pCmdUI) -{ - pCmdUI->SetCheck (myCurrentMode == CurrentAction3d_WindowZooming); - pCmdUI->Enable (myCurrentMode != CurrentAction3d_WindowZooming); -} - -void CAnimationView3D::OnUpdateBUTTONRot(CCmdUI* pCmdUI) -{ - pCmdUI->SetCheck (myCurrentMode == CurrentAction3d_DynamicRotation); - pCmdUI->Enable (myCurrentMode != CurrentAction3d_DynamicRotation); -} - -void CAnimationView3D::OnUpdateBUTTONFly(CCmdUI* pCmdUI) -{ - pCmdUI->Enable(true); - pCmdUI->SetCheck (myCurrentMode == CurrentAction3d_Fly); -} - -void CAnimationView3D::OnUpdateBUTTONTurn(CCmdUI* pCmdUI) -{ - pCmdUI->Enable(true); - pCmdUI->SetCheck (myCurrentMode == CurrentAction3d_Turn); -} - -void CAnimationView3D::OnChangeBackground() -{ - Standard_Real R1; - Standard_Real G1; - Standard_Real B1; - myView->BackgroundColor(Quantity_TOC_RGB,R1,G1,B1); - COLORREF m_clr ; - m_clr = RGB(R1*255,G1*255,B1*255); - - CColorDialog dlgColor(m_clr); - if (dlgColor.DoModal() == IDOK) - { - m_clr = dlgColor.GetColor(); - R1 = GetRValue(m_clr)/255.; - G1 = GetGValue(m_clr)/255.; - B1 = GetBValue(m_clr)/255.; - myView->SetBackgroundColor(Quantity_TOC_RGB,R1,G1,B1); - } - myView->Redraw(); -} - -//========================================================================================== -//========================================================================================== -//========================================================================================== - -void CAnimationView3D::OnStop() -{ - myAnimTimer.Pause(); -} - -void CAnimationView3D::OnRestart() -{ - myAnimTimer.Start(); - update3dView(); -} diff --git a/samples/mfc/standard/09_Animation/src/AnimationView3D.h b/samples/mfc/standard/09_Animation/src/AnimationView3D.h deleted file mode 100755 index 30db5da030..0000000000 --- a/samples/mfc/standard/09_Animation/src/AnimationView3D.h +++ /dev/null @@ -1,173 +0,0 @@ -// AnimationView.h : interface of the CAnimationView3D class -// -///////////////////////////////////////////////////////////////////////////// - -#if !defined(AFX_ANIMATIONVIEW3D_H__79840E88_1001_11D2_B8C1_0000F87A77C1_3D_INCLUDED_) -#define AFX_ANIMATIONVIEW3D_H__79840E88_1001_11D2_B8C1_0000F87A77C1_3D_INCLUDED_ - -#if _MSC_VER >= 1000 -#pragma once -#endif // _MSC_VER >= 1000 - -#include "AnimationDoc.h" -#include "..\..\Common\res\OCC_Resource.h" - -#include -#include - -class AIS_RubberBand; - -enum View3D_CurrentAction { - CurrentAction3d_Nothing, - CurrentAction3d_DynamicZooming, - CurrentAction3d_WindowZooming, - CurrentAction3d_DynamicPanning, - CurrentAction3d_GlobalPanning, - CurrentAction3d_DynamicRotation, - CurrentAction3d_Fly, - CurrentAction3d_Turn -}; - -class CAnimationView3D : public CView, public AIS_ViewController -{ -protected: // create from serialization only - CAnimationView3D(); - DECLARE_DYNCREATE(CAnimationView3D) - -// Attributes -public: - CAnimationDoc* GetDocument(); - -// Operations -public: - -// Overrides - // ClassWizard generated virtual function overrides - //{{AFX_VIRTUAL(CAnimationView3D) - public: - void FitAll() { if ( !myView.IsNull() ) myView->FitAll(); myView->ZFitAll(); }; - virtual void OnDraw(CDC* pDC); // overridden to draw this view - virtual BOOL PreCreateWindow(CREATESTRUCT& cs); - virtual void OnInitialUpdate(); // CasCade - protected: - - //}}AFX_VIRTUAL - -// Implementation -public: - virtual ~CAnimationView3D(); -#ifdef _DEBUG - virtual void AssertValid() const; - virtual void Dump(CDumpContext& dc) const; -#endif - -protected: - double m_dAngle; - BOOL m_bShift; - -// Generated message map functions -protected: - //{{AFX_MSG(CAnimationView3D) - afx_msg void OnBUTTONAxo(); - afx_msg void OnBUTTONBack(); - afx_msg void OnBUTTONBottom(); - afx_msg void OnBUTTONFront(); - afx_msg void OnBUTTONHlrOff(); - afx_msg void OnBUTTONHlrOn(); - afx_msg void OnBUTTONLeft(); - afx_msg void OnBUTTONPan(); - afx_msg void OnBUTTONPanGlo(); - afx_msg void OnBUTTONReset(); - afx_msg void OnBUTTONRight(); - afx_msg void OnBUTTONRot(); - afx_msg void OnBUTTONTop(); - afx_msg void OnBUTTONZoomAll(); - afx_msg void OnFileExportImage(); - afx_msg void OnSize(UINT nType, int cx, int cy); - afx_msg void OnBUTTONZoomProg(); - afx_msg void OnBUTTONZoomWin(); - afx_msg BOOL OnMouseWheel(UINT nFlags, short zDelta, CPoint point); - afx_msg void OnLButtonDown(UINT nFlags, CPoint point); - afx_msg void OnLButtonUp(UINT nFlags, CPoint point); - afx_msg void OnMButtonDown(UINT nFlags, CPoint point); - afx_msg void OnMButtonUp(UINT nFlags, CPoint point); - afx_msg void OnMouseMove(UINT nFlags, CPoint point); - afx_msg void OnRButtonDown(UINT nFlags, CPoint point); - afx_msg void OnRButtonUp(UINT nFlags, CPoint point); - afx_msg void OnUpdateBUTTONHlrOff(CCmdUI* pCmdUI); - afx_msg void OnUpdateBUTTONHlrOn(CCmdUI* pCmdUI); - afx_msg void OnUpdateBUTTONPanGlo(CCmdUI* pCmdUI); - afx_msg void OnUpdateBUTTONPan(CCmdUI* pCmdUI); - afx_msg void OnUpdateBUTTONZoomProg(CCmdUI* pCmdUI); - afx_msg void OnUpdateBUTTONZoomWin(CCmdUI* pCmdUI); - afx_msg void OnUpdateBUTTONRot(CCmdUI* pCmdUI); - - afx_msg void OnChangeBackground(); - - afx_msg void OnBUTTONFly(); - afx_msg void OnBUTTONTurn(); - afx_msg void OnUpdateBUTTONFly(CCmdUI* pCmdUI); - afx_msg void OnUpdateBUTTONTurn(CCmdUI* pCmdUI); - //}}AFX_MSG - -public : - afx_msg void OnStop(); - afx_msg void OnRestart(); -protected: - - DECLARE_MESSAGE_MAP() -private: - Handle(V3d_View) myView; -public: - Handle(V3d_View)& GetView() { return myView;}; - - //! Request view redrawing. - void update3dView(); - - //! Flush events and redraw view. - void redraw3dView(); - -protected: - - //! Handle view redraw. - virtual void handleViewRedraw (const Handle(AIS_InteractiveContext)& theCtx, - const Handle(V3d_View)& theView) Standard_OVERRIDE; - -protected: - - //! Setup mouse gestures. - void defineMouseGestures(); - - //! Get current action. - View3D_CurrentAction getCurrentAction() const { return myCurrentMode; } - - //! Set current action. - void setCurrentAction (View3D_CurrentAction theAction) - { - myCurrentMode = theAction; - defineMouseGestures(); - } - -private: - AIS_AnimationTimer myAnimTimer; - AIS_MouseGestureMap myDefaultGestures; - Graphic3d_Vec2i myClickPos; - Standard_Real myCurZoom; - Standard_Boolean myHlrModeIsOn; - Standard_Boolean myIsTurnStarted; - unsigned int myUpdateRequests; //!< counter for unhandled update requests - - View3D_CurrentAction myCurrentMode; -}; - -#ifndef _DEBUG // debug version in AnimationView.cpp -inline CAnimationDoc* CAnimationView3D::GetDocument() - { return (CAnimationDoc*)m_pDocument; } -#endif - -///////////////////////////////////////////////////////////////////////////// - -//{{AFX_INSERT_LOCATION}} -// Microsoft Developer Studio will insert additional declarations immediately before the previous line. - -#endif // !defined(AFX_ANIMATIONVIEW3D_H__79840E88_1001_11D2_B8C1_0000F87A77C1_3D_INCLUDED_) diff --git a/samples/mfc/standard/09_Animation/src/Fonc.cxx b/samples/mfc/standard/09_Animation/src/Fonc.cxx deleted file mode 100755 index e003e51a2d..0000000000 --- a/samples/mfc/standard/09_Animation/src/Fonc.cxx +++ /dev/null @@ -1,96 +0,0 @@ -#include "stdafx.h" - -#include "Fonc.hxx" - -//======================================================================= -//function : grid2surf -//purpose : grid2surf S FileName -// cf jm-oliva@paris3.matra-dtv.fr ( Merci JMO ) -//======================================================================= - -Standard_Boolean grid2surf(CString ShapeName, Handle(Geom_BSplineSurface)& S) -{ - CString aFileName = ShapeName; - aFileName.Replace(L'\\', L'/'); - - Handle(TColStd_HArray2OfReal) H; - - Standard_Real xmin, ymin, Dx, Dy; - H = ReadRegularGrid (aFileName, xmin, ymin, Dx, Dy); - GeomAPI_PointsToBSplineSurface MkSurf; - MkSurf.Interpolate(H->Array2(), xmin, Dx, ymin, Dy); - S = MkSurf.Surface(); - return Standard_True; -} - -//======================================================================= -//function : ReadRegularGrid -//purpose : -// cf jm-oliva@paris3.matra-dtv.fr ( Merci JMO ) -//======================================================================= -Handle(TColStd_HArray2OfReal) ReadRegularGrid(CString FileName, - Standard_Real& xmin, - Standard_Real& ymin, - Standard_Real& Deltax, - Standard_Real& Deltay) -{ - CString aFileName = FileName; - aFileName.Replace (L'\\', L'/'); - - Handle(TColStd_HArray2OfReal) H; - Standard_Integer R1 = 1, R2, C1 = 1, C2, R, C; - Standard_Real x, y, z; - - xmin = ymin = 10000000; - - FILE *fp = NULL; - _wfopen_s (&fp, aFileName, L"r"); - - if (fp) - { - fscanf_s(fp, "%d %d", &R2, &C2); - std::cout << "Reading Grid : ( " << R2 << " , " << C2 << " )." << std::endl; - - H = new TColStd_HArray2OfReal(C1, C2, R1, R2); - - Standard_Real FirstX = 0.0; - Standard_Real FirstY = 0.0; - - for(R = R1; R <= R2; R++) - { - for(C = C1; C <= C2; C++) - { - fscanf_s(fp, "%lf %lf %lf ", &x, &y, &z); - - if(R == 1 && C == 1) - { - FirstX=x; - FirstY=y; - } - - // First step for X - if(R == 1 && C == 2) - Deltax = x - FirstX; - - // First step for Y - if(R == 2 && C == 1) - Deltay = y - FirstY; - - // H->SetValue(R, C, z); - H->SetValue(C, R, z); - if(x < xmin) xmin = x; - if(y < ymin) ymin = y; - } - } - - std::cout << "Deltax = " << Deltax << std::endl; - std::cout << "Deltay = " << Deltay << std::endl; - - fclose(fp); - } - else - { - std::cout << "cannot open file : " << FileName << std::endl; - } - return H; -} diff --git a/samples/mfc/standard/09_Animation/src/Fonc.hxx b/samples/mfc/standard/09_Animation/src/Fonc.hxx deleted file mode 100755 index 85c0825827..0000000000 --- a/samples/mfc/standard/09_Animation/src/Fonc.hxx +++ /dev/null @@ -1,46 +0,0 @@ -// File: Functions.hxx -// Created: Tue Oct 07 09:23:55 1997 -// Author: Stephane ROUTELOUS -// - - -#include "StdAfx.h" - -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include "GeomAPI_PointsToBSplineSurface.hxx" -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - - -Standard_Boolean grid2surf(CString ShapeName, Handle(Geom_BSplineSurface)& S); -Handle(Geom_BSplineCurve) SetTransfo(Handle(Geom_BSplineCurve) aBSCurve); -Handle(Geom_BSplineCurve) BuildBSplineCurve(Standard_Boolean DisplayPoints = Standard_True); -Handle(TColStd_HArray2OfReal) ReadRegularGrid(CString FileName, - Standard_Real& xmin, - Standard_Real& ymin, - Standard_Real& Deltax, - Standard_Real& Deltay); diff --git a/samples/mfc/standard/09_Animation/src/ShadingDialog.cpp b/samples/mfc/standard/09_Animation/src/ShadingDialog.cpp deleted file mode 100755 index 646e89e97e..0000000000 --- a/samples/mfc/standard/09_Animation/src/ShadingDialog.cpp +++ /dev/null @@ -1,97 +0,0 @@ -// ShadingDialog.cpp : implementation file -// - -#include "stdafx.h" -#include "AnimationApp.h" -#include "ShadingDialog.h" - -#ifdef _DEBUG -#define new DEBUG_NEW -#undef THIS_FILE -static char THIS_FILE[] = __FILE__; -#endif - -///////////////////////////////////////////////////////////////////////////// -// CShadingDialog dialog - - -CShadingDialog::CShadingDialog(CWnd* pParent /*=NULL*/) - : CDialog(CShadingDialog::IDD, pParent) -{ -// EnableAutomation(); - - //{{AFX_DATA_INIT(CShadingDialog) - // NOTE: the ClassWizard will add member initialization here - //}}AFX_DATA_INIT -} - - -void CShadingDialog::OnFinalRelease() -{ - // When the last reference for an automation object is released - // OnFinalRelease is called. The base class will automatically - // deletes the object. Add additional cleanup required for your - // object before calling the base class. - - CDialog::OnFinalRelease(); -} - -void CShadingDialog::DoDataExchange(CDataExchange* pDX) -{ - CDialog::DoDataExchange(pDX); - //{{AFX_DATA_MAP(CShadingDialog) - DDX_Control(pDX, IDC_SLIDER1, m_Slide); - //}}AFX_DATA_MAP -} - - -BEGIN_MESSAGE_MAP(CShadingDialog, CDialog) - //{{AFX_MSG_MAP(CShadingDialog) - //}}AFX_MSG_MAP -END_MESSAGE_MAP() - -BEGIN_DISPATCH_MAP(CShadingDialog, CDialog) - //{{AFX_DISPATCH_MAP(CShadingDialog) - // NOTE - the ClassWizard will add and remove mapping macros here. - //}}AFX_DISPATCH_MAP -END_DISPATCH_MAP() - -// Note: we add support for IID_IShadingDialog to support typesafe binding -// from VBA. This IID must match the GUID that is attached to the -// dispinterface in the .ODL file. - -// {02819A09-10F2-11D2-B8C4-0000F87A77C1} -static const IID IID_IShadingDialog = -{ 0x2819a09, 0x10f2, 0x11d2, { 0xb8, 0xc4, 0x0, 0x0, 0xf8, 0x7a, 0x77, 0xc1 } }; - -BEGIN_INTERFACE_MAP(CShadingDialog, CDialog) - INTERFACE_PART(CShadingDialog, IID_IShadingDialog, Dispatch) -END_INTERFACE_MAP() - -///////////////////////////////////////////////////////////////////////////// -// CShadingDialog message handlers - -BOOL CShadingDialog::OnInitDialog() -{ - CDialog::OnInitDialog(); - - m_Slide.SetRange(0,100); - m_Slide.SetTicFreq(100); - m_Slide.SetPos(myvalue); - - //UpdateData(false); - return TRUE; // return TRUE unless you set the focus to a control - // EXCEPTION: OCX Property Pages should return FALSE -} - - - -void CShadingDialog::OnOK() -{ - // TODO: Add extra validation here - UpdateData(TRUE); - // store the position in my variable - myvalue= m_Slide.GetPos(); - - CDialog::OnOK(); -} diff --git a/samples/mfc/standard/09_Animation/src/ShadingDialog.h b/samples/mfc/standard/09_Animation/src/ShadingDialog.h deleted file mode 100755 index 9f519e6050..0000000000 --- a/samples/mfc/standard/09_Animation/src/ShadingDialog.h +++ /dev/null @@ -1,56 +0,0 @@ -#if !defined(AFX_SHADINGDIALOG_H__02819A0A_10F2_11D2_B8C4_0000F87A77C1__INCLUDED_) -#define AFX_SHADINGDIALOG_H__02819A0A_10F2_11D2_B8C4_0000F87A77C1__INCLUDED_ - -#if _MSC_VER >= 1000 -#pragma once -#endif // _MSC_VER >= 1000 -// ShadingDialog.h : header file -// - -///////////////////////////////////////////////////////////////////////////// -// CShadingDialog dialog - -class CShadingDialog : public CDialog -{ -// Construction -public: - CShadingDialog(CWnd* pParent = NULL); // standard constructor - -// Dialog Data - //{{AFX_DATA(CShadingDialog) - enum { IDD = IDD_ShadingBoxDialog }; - CSliderCtrl m_Slide; - int myvalue; - //}}AFX_DATA - - -// Overrides - // ClassWizard generated virtual function overrides - //{{AFX_VIRTUAL(CShadingDialog) - public: - virtual void OnFinalRelease(); - protected: - virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support - //}}AFX_VIRTUAL - -// Implementation -protected: - - // Generated message map functions - //{{AFX_MSG(CShadingDialog) - virtual BOOL OnInitDialog(); - virtual void OnOK(); - //}}AFX_MSG - DECLARE_MESSAGE_MAP() - // Generated OLE dispatch map functions - //{{AFX_DISPATCH(CShadingDialog) - // NOTE - the ClassWizard will add and remove member functions here. - //}}AFX_DISPATCH - DECLARE_DISPATCH_MAP() - DECLARE_INTERFACE_MAP() -}; - -//{{AFX_INSERT_LOCATION}} -// Microsoft Developer Studio will insert additional declarations immediately before the previous line. - -#endif // !defined(AFX_SHADINGDIALOG_H__02819A0A_10F2_11D2_B8C4_0000F87A77C1__INCLUDED_) diff --git a/samples/mfc/standard/09_Animation/src/StdAfx.cpp b/samples/mfc/standard/09_Animation/src/StdAfx.cpp deleted file mode 100755 index f40034aae7..0000000000 --- a/samples/mfc/standard/09_Animation/src/StdAfx.cpp +++ /dev/null @@ -1,6 +0,0 @@ -// stdafx.cpp : source file that includes just the standard includes -// SampleDisplayAnimation.pch will be the pre-compiled header -// stdafx.obj will contain the pre-compiled type information - -#include "stdafx.h" - diff --git a/samples/mfc/standard/09_Animation/src/StdAfx.h b/samples/mfc/standard/09_Animation/src/StdAfx.h deleted file mode 100755 index 65c608ae67..0000000000 --- a/samples/mfc/standard/09_Animation/src/StdAfx.h +++ /dev/null @@ -1,214 +0,0 @@ -// stdafx.h : include file for standard system include files, -// or project specific include files that are used frequently, but -// are changed infrequently -// - -#if !defined(AFX_STDAFX_H__79840E80_1001_11D2_B8C1_0000F87A77C1__INCLUDED_) -#define AFX_STDAFX_H__79840E80_1001_11D2_B8C1_0000F87A77C1__INCLUDED_ - -#if _MSC_VER >= 1000 -#pragma once -#endif // _MSC_VER >= 1000 - -#define VC_EXTRALEAN // Exclude rarely-used stuff from Windows headers - -#include // MFC core and standard components -#include // MFC extensions -#include // MFC OLE automation classes -#ifndef _AFX_NO_AFXCMN_SUPPORT -#include // MFC support for Windows Common Controls -#endif // _AFX_NO_AFXCMN_SUPPORT - - - -// CasCade : - -enum CurrentAction3d { - CurAction3d_Nothing, - CurAction3d_DynamicZooming, - CurAction3d_WindowZooming, - CurAction3d_DynamicPanning, - CurAction3d_GlobalPanning, - CurAction3d_DynamicRotation -}; - - -#define DEFAULT_DEVIATIONCOEFFICIENT 0.001 -#define DEFAULT_DCBIG 0.005 -#define DEFAULT_DCVBIG 0.01 -#define DEFAULT_DCSMALL 0.0002 -#define DEFAULT_DCVSMALL 0.00004 -#define DEFAULT_COLOR Quantity_NOC_CYAN1 -#define DEFAULT_MATERIAL Graphic3d_NameOfMaterial_Plastered -#define DEFAULT_BACKGROUNDCOLOR Quantity_NOC_MATRAGRAY -#define DEFAULT_HILIGHTCOLOR Quantity_NOC_YELLOW - -#pragma warning( disable : 4244 ) // Issue warning 4244 -#include -#pragma warning( default : 4244 ) // Issue warning 4244 - -#include -/* -#ifndef Version15B -# ifndef Version15D -# ifndef Version20 -# define Version15B -# endif // Version20 -# endif // Version15D -#endif // Version15B - -#pragma message ("=============================") -#ifdef Version15B -# pragma message ("Set the libs for version 1.5B") -#endif // Version15B - -#ifdef Version15D -# pragma message ("Set the libs for version 1.5D") -#endif // Version15D - -#ifdef Version20 -# pragma message ("Set the libs for version 2.0 ") -#endif // Version20 -#pragma message ("=============================") - -#ifdef Version15B -# pragma comment (lib,"TKTop.lib") -# pragma comment (lib,"TShort.lib") -# pragma comment (lib,"TColQuantity.lib") -#endif - -#ifdef Version15D -# pragma comment (lib,"TKTop.lib") -#endif - -#ifdef Version20 -# pragma comment (lib,"TKTop1.lib") -# pragma comment (lib,"TKTop2.lib") -#endif - -#pragma message ("Set the specific libs for the application") -# pragma comment (lib,"TKPrs.lib") -# pragma comment (lib,"TKGeom.lib") -# pragma comment (lib,"TKGlt.lib") -# pragma comment (lib,"TKGraphic.lib") -# pragma comment (lib,"TKPrsMgr.lib") -# pragma comment (lib,"TKViewers.lib") -# pragma comment (lib,"TKSession.lib") -# pragma comment (lib,"gp.lib") -# pragma comment (lib,"TKernel.lib") -# pragma comment (lib,"UnitsAPI.lib") -# pragma comment (lib,"PTColStd.lib") -# pragma comment (lib,"TKMgtShape.lib") -# pragma comment (lib,"TKPShape.lib") -# pragma comment (lib,"ShapeSchema.lib") -# pragma comment (lib,"FSD.lib") -# pragma comment (lib,"OSDriver.lib") -# pragma comment (lib,"ObjMgt.lib") -# pragma comment (lib,"TKXSBase.lib") -# pragma comment (lib,"TKXSIGES.lib") -# pragma comment (lib,"TKXS214.lib") -*/ - - -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -// had for opencascade -//#include -//#include -//#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include "HLRAlgo_Projector.hxx" - -#include -#include -#include -#include -#include -#include -#include -#include - -#include "..\res\resource.h" - -//End CasCade - - - -//{{AFX_INSERT_LOCATION}} -// Microsoft Developer Studio will insert additional declarations immediately before the previous line. - -#endif // !defined(AFX_STDAFX_H__79840E80_1001_11D2_B8C1_0000F87A77C1__INCLUDED_) diff --git a/samples/mfc/standard/09_Animation/src/ThreadDialog.cpp b/samples/mfc/standard/09_Animation/src/ThreadDialog.cpp deleted file mode 100755 index 77af262ae4..0000000000 --- a/samples/mfc/standard/09_Animation/src/ThreadDialog.cpp +++ /dev/null @@ -1,74 +0,0 @@ -// ThreadDialog.cpp : implementation file -// - -#include "stdafx.h" -#include "AnimationApp.h" -#include "ThreadDialog.h" - -#ifdef _DEBUG -#define new DEBUG_NEW -#undef THIS_FILE -static char THIS_FILE[] = __FILE__; -#endif - -///////////////////////////////////////////////////////////////////////////// -// CThreadDialog dialog - - -CThreadDialog::CThreadDialog(CWnd* pParent /*=NULL*/) - : CDialog(CThreadDialog::IDD, pParent) -{ -// EnableAutomation(); - - //{{AFX_DATA_INIT(CThreadDialog) - m_Angle = 4; - //}}AFX_DATA_INIT -} - - -void CThreadDialog::OnFinalRelease() -{ - // When the last reference for an automation object is released - // OnFinalRelease is called. The base class will automatically - // deletes the object. Add additional cleanup required for your - // object before calling the base class. - - CDialog::OnFinalRelease(); -} - -void CThreadDialog::DoDataExchange(CDataExchange* pDX) -{ - CDialog::DoDataExchange(pDX); - //{{AFX_DATA_MAP(CThreadDialog) - DDX_Text(pDX, IDC_Angle, m_Angle); - DDV_MinMaxUInt(pDX, m_Angle, 1, 60); - //}}AFX_DATA_MAP -} - - -BEGIN_MESSAGE_MAP(CThreadDialog, CDialog) - //{{AFX_MSG_MAP(CThreadDialog) - // NOTE: the ClassWizard will add message map macros here - //}}AFX_MSG_MAP -END_MESSAGE_MAP() - -BEGIN_DISPATCH_MAP(CThreadDialog, CDialog) - //{{AFX_DISPATCH_MAP(CThreadDialog) - // NOTE - the ClassWizard will add and remove mapping macros here. - //}}AFX_DISPATCH_MAP -END_DISPATCH_MAP() - -// Note: we add support for IID_IThreadDialog to support typesafe binding -// from VBA. This IID must match the GUID that is attached to the -// dispinterface in the .ODL file. - -// {539445D7-1182-11D2-B8C9-0000F87A77C1} -static const IID IID_IThreadDialog = -{ 0x539445d7, 0x1182, 0x11d2, { 0xb8, 0xc9, 0x0, 0x0, 0xf8, 0x7a, 0x77, 0xc1 } }; - -BEGIN_INTERFACE_MAP(CThreadDialog, CDialog) - INTERFACE_PART(CThreadDialog, IID_IThreadDialog, Dispatch) -END_INTERFACE_MAP() - -///////////////////////////////////////////////////////////////////////////// -// CThreadDialog message handlers diff --git a/samples/mfc/standard/09_Animation/src/ThreadDialog.h b/samples/mfc/standard/09_Animation/src/ThreadDialog.h deleted file mode 100755 index 2a0a2a5346..0000000000 --- a/samples/mfc/standard/09_Animation/src/ThreadDialog.h +++ /dev/null @@ -1,54 +0,0 @@ -#if !defined(AFX_THREADDIALOG_H__539445D8_1182_11D2_B8C9_0000F87A77C1__INCLUDED_) -#define AFX_THREADDIALOG_H__539445D8_1182_11D2_B8C9_0000F87A77C1__INCLUDED_ - -#if _MSC_VER >= 1000 -#pragma once -#endif // _MSC_VER >= 1000 -// ThreadDialog.h : header file -// - -///////////////////////////////////////////////////////////////////////////// -// CThreadDialog dialog - -class CThreadDialog : public CDialog -{ -// Construction -public: - CThreadDialog(CWnd* pParent = NULL); // standard constructor - -// Dialog Data - //{{AFX_DATA(CThreadDialog) - enum { IDD = IDD_ThreadBoxDialog }; - UINT m_Angle; - //}}AFX_DATA - - -// Overrides - // ClassWizard generated virtual function overrides - //{{AFX_VIRTUAL(CThreadDialog) - public: - virtual void OnFinalRelease(); - protected: - virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support - //}}AFX_VIRTUAL - -// Implementation -protected: - - // Generated message map functions - //{{AFX_MSG(CThreadDialog) - // NOTE: the ClassWizard will add member functions here - //}}AFX_MSG - DECLARE_MESSAGE_MAP() - // Generated OLE dispatch map functions - //{{AFX_DISPATCH(CThreadDialog) - // NOTE - the ClassWizard will add and remove member functions here. - //}}AFX_DISPATCH - DECLARE_DISPATCH_MAP() - DECLARE_INTERFACE_MAP() -}; - -//{{AFX_INSERT_LOCATION}} -// Microsoft Developer Studio will insert additional declarations immediately before the previous line. - -#endif // !defined(AFX_THREADDIALOG_H__539445D8_1182_11D2_B8C9_0000F87A77C1__INCLUDED_) diff --git a/samples/mfc/standard/10_Convert/CMakeLists.txt b/samples/mfc/standard/10_Convert/CMakeLists.txt deleted file mode 100644 index d6f6735ecb..0000000000 --- a/samples/mfc/standard/10_Convert/CMakeLists.txt +++ /dev/null @@ -1,83 +0,0 @@ -cmake_minimum_required (VERSION 2.6) - -project (Convert) - -add_definitions (-DWINVER=0x0501 -DUNICODE -D_UNICODE) -set (CMAKE_MFC_FLAG 2) - -set (Convert_SRC_DIR ${MFC_STANDARD_SAMPLES_DIR}/10_Convert/src) -set (Convert_HEADER_FILES ${Convert_SRC_DIR}/Convert_Presentation.h - ${Convert_SRC_DIR}/OCCDemo_Presentation.h) -set (Convert_SOURCE_FILES ${Convert_SRC_DIR}/Convert_Presentation.cpp - ${Convert_SRC_DIR}/OCCDemo_Presentation.cpp ) - -set (ISESSION_SUBDIR ${Convert_SRC_DIR}/ISession) -set (ISESSION_HEADER_FILES ${ISESSION_SUBDIR}/ISession_Curve.h) -set (ISESSION_SOURCE_FILES ${ISESSION_SUBDIR}/ISession_Curve.cpp) - -set (WNT_SUBDIR ${Convert_SRC_DIR}/WNT) -set (WNT_HEADER_FILES ${WNT_SUBDIR}/resource.h - ${WNT_SUBDIR}/MainFrm.h - ${WNT_SUBDIR}/OCCDemo.h - ${WNT_SUBDIR}/OCCDemoDoc.h - ${WNT_SUBDIR}/OCCDemoView.h - ${WNT_SUBDIR}/ResultDialog.h - ${WNT_SUBDIR}/StdAfx.h) -set (WNT_SOURCE_FILES ${WNT_SUBDIR}/MainFrm.cpp - ${WNT_SUBDIR}/OCCDemo.cpp - ${WNT_SUBDIR}/OCCDemoDoc.cpp - ${WNT_SUBDIR}/OCCDemoView.cpp - ${WNT_SUBDIR}/ResultDialog.cpp - ${WNT_SUBDIR}/StdAfx.cpp) - -set (WNT_RESOURCE_DIR ${WNT_SUBDIR}/res) -set (WNT_RESOURCE_FILES ${WNT_RESOURCE_DIR}/OCCDemo.ico - ${WNT_RESOURCE_DIR}/occlogo.bmp - ${WNT_RESOURCE_DIR}/toolbar.bmp - ${WNT_RESOURCE_DIR}/toolbar1.bmp - ${WNT_RESOURCE_DIR}/logopen.bmp - ${WNT_RESOURCE_DIR}/OCCDemo.rc2 - ${WNT_SUBDIR}/OCCDemo.rc) - -# groups in the VS solution -source_group ("Source Files" FILES ${Convert_SOURCE_FILES} - ${COMMON_WINMAIN_FILE}) - -source_group ("Source Files\\ISession" FILES ${ISESSION_SOURCE_FILES}) -source_group ("Source Files\\WNT" FILES ${WNT_SOURCE_FILES}) - -source_group ("Header Files" FILES ${Convert_HEADER_FILES} ) -source_group ("Header Files\\ISession" FILES ${ISESSION_HEADER_FILES} ) -source_group ("Header Files\\WNT" FILES ${WNT_HEADER_FILES}) - -source_group ("Resource Files" FILES ${WNT_RESOURCE_FILES}) - -add_executable (Convert WIN32 ${Convert_SOURCE_FILES} - ${Convert_HEADER_FILES} - ${ISESSION_SOURCE_FILES} - ${ISESSION_HEADER_FILES} - ${WNT_SOURCE_FILES} - ${WNT_HEADER_FILES} - ${COMMON_WINMAIN_FILE} - ${WNT_RESOURCE_FILES} ) - -set_property (TARGET Convert PROPERTY FOLDER "Samples/mfc") - -if (SINGLE_GENERATOR) - install (TARGETS Convert DESTINATION "${INSTALL_DIR_BIN}") -else() - install (TARGETS Convert - CONFIGURATIONS Release RelWithDebInfo - DESTINATION "${INSTALL_DIR_BIN}") - install (TARGETS Convert - CONFIGURATIONS Debug - DESTINATION "${INSTALL_DIR_BIN}d") -endif() - -include_directories (${CMAKE_BINARY_DIR}/inc - ${Convert_SRC_DIR} - ${ISESSION_SUBDIR} - ${WNT_SUBDIR} - ${MFC_STANDARD_SAMPLES_DIR}/Common) - -target_link_libraries (Convert mfcsample) \ No newline at end of file diff --git a/samples/mfc/standard/10_Convert/adm/win/vc10/Convert.vcxproj b/samples/mfc/standard/10_Convert/adm/win/vc10/Convert.vcxproj deleted file mode 100644 index 858193bf91..0000000000 --- a/samples/mfc/standard/10_Convert/adm/win/vc10/Convert.vcxproj +++ /dev/null @@ -1,467 +0,0 @@ - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {C527B648-F98D-42E5-9F59-251FD95D15A0} - Convert - MFCProj - - - - Application - Dynamic - Unicode - $(VCPlatformToolSet) - - - Application - Dynamic - Unicode - $(VCPlatformToolSet) - - - Application - Dynamic - Unicode - $(VCPlatformToolSet) - - - Application - Dynamic - Unicode - $(VCPlatformToolSet) - - - - - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>10.0.30319.1 - ../../../../win32\$(VCFMT)\bin\ - .\win32\obj\ - false - ../../../../win64\$(VCFMT)\bin\ - .\win64\obj\ - false - ../../../../win32\$(VCFMT)\bind\ - .\win32\objd\ - true - ../../../../win64\$(VCFMT)\bind\ - .\win64\objd\ - true - - - - NDEBUG;%(PreprocessorDefinitions) - true - true - Win32 - .\win32\obj/Convert.tlb - - - - - MaxSpeed - OnlyExplicitInline - ../../../../;../../../../Common;../../../src/WNT;../../../src;../../../src/ISession;$(CSF_OCCTIncludePath);../../../Common;%(AdditionalIncludeDirectories) - NDEBUG;_WINDOWS;WINVER=0x0501;%(PreprocessorDefinitions) - true - MultiThreadedDLL - true - - - StdAfx.h - .\win32\obj/Convert.pch - .\win32\obj/ - .\win32\obj/ - .\win32\obj/ - Level4 - true - Default - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - - - TKVCAF.lib;TKBool.lib;TKCAF.lib;TKCDF.lib;TKernel.lib;TKFeat.lib;TKFillet.lib;TKGeomAlgo.lib;TKHLR.lib;TKMath.lib;TKOffset.lib;TKPrim.lib;TKService.lib;TKTopAlgo.lib;TKV3d.lib;TKOpenGl.lib;TKBRep.lib;TKG2d.lib;TKG3d.lib;TKGeomBase.lib;mfcsample.lib;%(AdditionalDependencies) - ../../../../win32\$(VCFMT)\bin/Convert.exe - true - ..\..\..\..\win32\$(VCFMT)\lib;$(CSF_OCCTLibPath);%(AdditionalLibraryDirectories) - .\win32\obj\$(TargetFileName).intermediate.manifest - ../../../../win32\$(VCFMT)\bin/Convert.pdb - Windows - false - MachineX86 - - - - - NDEBUG;%(PreprocessorDefinitions) - true - true - X64 - .\win64\obj/Convert.tlb - - - - - MaxSpeed - OnlyExplicitInline - ../../../../;../../../../Common;../../../src/WNT;../../../src;../../../src/ISession;$(CSF_OCCTIncludePath);../../../Common;%(AdditionalIncludeDirectories) - NDEBUG;_WINDOWS;WINVER=0x0501;%(PreprocessorDefinitions) - true - MultiThreadedDLL - true - - - StdAfx.h - .\win64\obj/Convert.pch - .\win64\obj/ - .\win64\obj/ - .\win64\obj/ - Level4 - true - Default - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - - - TKVCAF.lib;TKBool.lib;TKCAF.lib;TKCDF.lib;TKernel.lib;TKFeat.lib;TKFillet.lib;TKGeomAlgo.lib;TKHLR.lib;TKMath.lib;TKOffset.lib;TKPrim.lib;TKService.lib;TKTopAlgo.lib;TKV3d.lib;TKOpenGl.lib;TKBRep.lib;TKG2d.lib;TKG3d.lib;TKGeomBase.lib;mfcsample.lib;%(AdditionalDependencies) - ../../../../win64\$(VCFMT)\bin/Convert.exe - true - ..\..\..\..\win64\$(VCFMT)\lib;$(CSF_OCCTLibPath);%(AdditionalLibraryDirectories) - .\win64\obj\$(TargetFileName).intermediate.manifest - ../../../../win64\$(VCFMT)\bin/Convert.pdb - Windows - false - MachineX64 - - - - - _DEBUG;%(PreprocessorDefinitions) - true - true - Win32 - .\win32\objd/Convert.tlb - - - - - Disabled - ../../../../;../../../../Common;../../../src/WNT;../../../src;../../../src/ISession;$(CSF_OCCTIncludePath);../../../Common;%(AdditionalIncludeDirectories) - _DEBUG;_WINDOWS;WINVER=0x0501;%(PreprocessorDefinitions) - EnableFastChecks - MultiThreadedDebugDLL - - - StdAfx.h - .\win32\objd/Convert.pch - .\win32\objd/ - .\win32\objd/ - .\win32\objd/ - Level4 - true - EditAndContinue - Default - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - - - TKVCAF.lib;TKBool.lib;TKCAF.lib;TKCDF.lib;TKernel.lib;TKFeat.lib;TKFillet.lib;TKGeomAlgo.lib;TKHLR.lib;TKMath.lib;TKOffset.lib;TKPrim.lib;TKService.lib;TKTopAlgo.lib;TKV3d.lib;TKOpenGl.lib;TKBRep.lib;TKG2d.lib;TKG3d.lib;TKGeomBase.lib;mfcsample.lib;%(AdditionalDependencies) - ../../../../win32\$(VCFMT)\bind/Convert.exe - true - ..\..\..\..\win32\$(VCFMT)\libd;$(CSF_OCCTLibPath);%(AdditionalLibraryDirectories) - .\win32\objd\$(TargetFileName).intermediate.manifest - true - ../../../../win32\$(VCFMT)\bind/Convert.pdb - Windows - MachineX86 - - - - - _DEBUG;%(PreprocessorDefinitions) - true - true - X64 - .\win64\objd/Convert.tlb - - - - - Disabled - ../../../../;../../../../Common;../../../src/WNT;../../../src;../../../src/ISession;$(CSF_OCCTIncludePath);../../../Common;%(AdditionalIncludeDirectories) - _DEBUG;_WINDOWS;WINVER=0x0501;%(PreprocessorDefinitions) - EnableFastChecks - MultiThreadedDebugDLL - - - StdAfx.h - .\win64\objd/Convert.pch - .\win64\objd/ - .\win64\objd/ - .\win64\objd/ - Level4 - true - ProgramDatabase - Default - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - - - TKVCAF.lib;TKBool.lib;TKCAF.lib;TKCDF.lib;TKernel.lib;TKFeat.lib;TKFillet.lib;TKGeomAlgo.lib;TKHLR.lib;TKMath.lib;TKOffset.lib;TKPrim.lib;TKService.lib;TKTopAlgo.lib;TKV3d.lib;TKOpenGl.lib;TKBRep.lib;TKG2d.lib;TKG3d.lib;TKGeomBase.lib;mfcsample.lib;%(AdditionalDependencies) - ../../../../win64\$(VCFMT)\bind/Convert.exe - true - ..\..\..\..\win64\$(VCFMT)\libd;$(CSF_OCCTLibPath);%(AdditionalLibraryDirectories) - .\win64\objd\$(TargetFileName).intermediate.manifest - true - ../../../../win64\$(VCFMT)\bind/Convert.pdb - Windows - MachineX64 - - - - - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - - - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - - - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - - - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - - - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - - - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - - - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - - - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - - - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - - - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - - - - - - - - - - - - - - - - - %(PreprocessorDefinitions) - \mfc\15_AdditionalSamples\Common\WNT;%(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - \mfc\15_AdditionalSamples\Common\WNT;%(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - \mfc\15_AdditionalSamples\Common\WNT;%(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - \mfc\15_AdditionalSamples\Common\WNT;%(AdditionalIncludeDirectories) - - - - - - - - - - - - - {2d6cbbe8-6965-4016-b503-0d715ae26691} - false - - - - - - \ No newline at end of file diff --git a/samples/mfc/standard/10_Convert/adm/win/vc10/Convert.vcxproj.filters b/samples/mfc/standard/10_Convert/adm/win/vc10/Convert.vcxproj.filters deleted file mode 100644 index 2423254399..0000000000 --- a/samples/mfc/standard/10_Convert/adm/win/vc10/Convert.vcxproj.filters +++ /dev/null @@ -1,112 +0,0 @@ - - - - - {b2e6cca6-ebc5-4e7e-b06c-1e047a9e5013} - cpp;c;cxx;rc;def;r;odl;idl;hpj;bat - - - {3f765fb2-98a9-4f66-b536-0f09b68eefce} - h;hpp;hxx;hm;inl - - - {44a1d1d0-2210-4fc3-9d12-694b98b3e218} - - - {40f21a32-e9bf-4885-95d3-c8ee7a07c9ad} - - - {8cb29cb9-5584-4028-9405-cd74b6d71fb5} - - - {83444696-f610-4476-9d6b-1fed4444557f} - - - - - Source Files - - - Source Files - - - Common Files\Sources - - - Common Files\Sources - - - Common Files\Sources - - - Common Files\Sources - - - Common Files\Sources - - - Common Files\Sources - - - Common Files\Sources - - - Common Files\Sources - - - - - Header Files - - - Common Files\Headers - - - Common Files\Headers - - - Common Files\Headers - - - Common Files\Headers - - - Common Files\Headers - - - Common Files\Headers - - - Common Files\Headers - - - Common Files\Headers - - - Common Files\Headers - - - - - Common Files\Sources - - - - - Common Files\Resource Files - - - Common Files\Resource Files - - - Common Files\Resource Files - - - Common Files\Resource Files - - - Common Files\Resource Files - - - - \ No newline at end of file diff --git a/samples/mfc/standard/10_Convert/src/Convert_Presentation.cpp b/samples/mfc/standard/10_Convert/src/Convert_Presentation.cpp deleted file mode 100755 index bbc65b1155..0000000000 --- a/samples/mfc/standard/10_Convert/src/Convert_Presentation.cpp +++ /dev/null @@ -1,459 +0,0 @@ -// Convert_Presentation.cpp: implementation of the Convert_Presentation class. -// Conversion of elementary geometry to BSpline curves and surfaces -////////////////////////////////////////////////////////////////////// - -#include "stdafx.h" -#include "Convert_Presentation.h" - -#include - -#include -#include - -#include -#include -#include -#include - -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - - -// Initialization of global variable with an instance of this class -OCCDemo_Presentation* OCCDemo_Presentation::Current = new Convert_Presentation; - -// Initialization of array of samples -const Convert_Presentation::PSampleFuncType Convert_Presentation::SampleFuncs[] = -{ - &Convert_Presentation::sampleCircle, - &Convert_Presentation::sampleEllipse, - &Convert_Presentation::sampleBezier, - &Convert_Presentation::sampleBezierSurface, - &Convert_Presentation::sampleCylindricalSurface, - &Convert_Presentation::sampleRevolSurface, - &Convert_Presentation::sampleToroidalSurface, - &Convert_Presentation::sampleConicalSurface, - &Convert_Presentation::sampleSphericalSurface -}; - -// Colors of objects -static const Quantity_Color CurveColor (1,1,0, Quantity_TOC_RGB); // yellow -static const Quantity_Color SurfaceColor (1,1,0, Quantity_TOC_RGB); // yellow -static const Quantity_Color BSplineColor (1,0.647,0, Quantity_TOC_RGB); // orange -static const Quantity_Color BSplineSurfaceColor (0,0,1, Quantity_TOC_RGB); // blue - -#define EOL "\r\n" - -////////////////////////////////////////////////////////////////////// -// Construction/Destruction -////////////////////////////////////////////////////////////////////// - -Convert_Presentation::Convert_Presentation() -{ - setName ("Conversion to BSpline curves and surfaces"); - myIndex = 0; - myNbFuncs = sizeof(SampleFuncs)/sizeof(PSampleFuncType); - myNbSamples = myNbFuncs; - FitMode = true; -} - -////////////////////////////////////////////////////////////////////// -// Sample execution -////////////////////////////////////////////////////////////////////// - -void Convert_Presentation::DoSample() -{ - ((COCCDemoApp*) AfxGetApp())->SetSampleName (L"Convert"); - ((COCCDemoApp*) AfxGetApp())->SetSamplePath (L"..\\..\\10_Convert"); - getAISContext()->EraseAll (Standard_True); - if (myIndex >=0 && myIndex < myNbFuncs) - (this->*SampleFuncs[myIndex])(); -} - -//================================================================ -// Function : Convert_Presentation::drawSurfaceAndItsBSpline -// Purpose : -//================================================================ -void Convert_Presentation::drawSurfaceAndItsBSpline(const Handle(Geom_Surface) & theSurface, - const Standard_CString theName, - TCollection_AsciiString& theText) -{ - TCollection_AsciiString aTitle ("Converting "); - aTitle += theName; - aTitle += " to BSpline surface"; - - theText += EOL - " Handle(Geom_BSplineSurface) aBSplineSurface = " EOL - " GeomConvert::SurfaceToBSplineSurface(aSurface);" EOL; - - setResultTitle (aTitle.ToCString()); - setResultText (theText.ToCString()); - - drawSurface (theSurface, SurfaceColor); - - if (WAIT_A_LITTLE) return; - - Handle(Geom_BSplineSurface) aBSplineSurface = GeomConvert::SurfaceToBSplineSurface(theSurface); - - _ASSERTE(!aBSplineSurface.IsNull()); - - drawSurface (aBSplineSurface, BSplineSurfaceColor); -} - -//================================================================ -// Function : Convert_Presentation::drawCurveAndItsBSpline -// Purpose : -//================================================================ -void Convert_Presentation::drawCurveAndItsBSpline(Handle(Geom_Curve) theCurve, - const Standard_CString theName, - TCollection_AsciiString& theText) -{ - TCollection_AsciiString aTitle ("Converting "); - aTitle += theName; - aTitle += " to BSpline curve"; - - theText += EOL - " Handle(Geom_BSplineCurve) aBSpline = " EOL - " GeomConvert::CurveToBSplineCurve(aCurve);" EOL; - - setResultTitle (aTitle.ToCString()); - setResultText (theText.ToCString()); - - drawCurve (theCurve, CurveColor); - - if (WAIT_A_LITTLE) return; - - Handle(Geom_Curve) aBSpline = GeomConvert::CurveToBSplineCurve(theCurve); - - drawCurve (aBSpline, BSplineColor); -} - - -////////////////////////////////////////////////////////////////////// -// Sample functions -////////////////////////////////////////////////////////////////////// - -//================================================================ -// Function : Convert_Presentation::sampleCircle -// Purpose : -//================================================================ -void Convert_Presentation::sampleCircle() -{ - gp_Pnt aOrigin (0,0,0); - gp_Dir aDir (1,0,0); - gp_Ax2 aAxis (aOrigin, aDir); - Standard_Real aRadius = 300; - Handle(Geom_Circle) aCurve = new Geom_Circle (aAxis, aRadius); - - TCollection_AsciiString aText ( - " gp_Pnt aOrigin (0,0,0);" EOL - " gp_Dir aDir (1,0,0);" EOL - " gp_Ax2 aAxis (aOrigin, aDir);" EOL - " Standard_Real aRadius = 300;" EOL - " Handle(Geom_Circle) aCurve = new Geom_Circle (aAxis, aRadius);" EOL - ); - drawCurveAndItsBSpline (aCurve, "Circle", aText); -} - -//================================================================ -// Function : Convert_Presentation::sampleEllipse -// Purpose : -//================================================================ -void Convert_Presentation::sampleEllipse() -{ - gp_Pnt aOrigin (0,0,0); - gp_Dir aDir (1,0,0); - gp_Ax2 aMajorAxis (aOrigin, aDir); - Standard_Real aMajorRadius = 300; - Standard_Real aMinorRadius = 150; - Handle(Geom_Ellipse) aCurve = - new Geom_Ellipse (aMajorAxis, aMajorRadius, aMinorRadius); - - TCollection_AsciiString aText ( - " gp_Pnt aOrigin (0,0,0);" EOL - " gp_Dir aDir (1,0,0);" EOL - " gp_Ax2 aAxis (aOrigin, aDir);" EOL - " Standard_Real aMajorRadius = 300;" EOL - " Standard_Real aMinorRadius = 150;" EOL - " Handle(Geom_Ellipse) aCurve = " EOL - " new Geom_Ellipse (aAxis, aMajorRadius, aMinorRadius);" EOL - ); - drawCurveAndItsBSpline (aCurve, "Ellipse", aText); -} - -//================================================================ -// Function : Convert_Presentation::sampleBezier -// Purpose : -//================================================================ -void Convert_Presentation::sampleBezier() -{ - TCollection_AsciiString aText ( - " Standard_Real aPolesCoords[][3] = {" EOL - " {0,0,0},{0,1,0},{1,1,0},{1,2,0},{2,2,0},{2,1,0},{3,1,0},{3,0,0},{2,0,0},{2,-1,0}," EOL - " {3,-1,0},{3,-2,0},{4,-2,0},{4,-1,0},{5,-1,0},{5,0,0},{6,0,0},{6,-1,0},{7,-1,0}," EOL - " {7,0,0},{8,0,0},{8,1,0}" EOL - " };" EOL - " TColgp_Array1OfPnt aPoles (1, sizeof(aPolesCoords)/(sizeof(Standard_Real)*2));" EOL - " " EOL - " for (Standard_Integer i=1; i <= aPoles.Upper(); i++)" EOL - " aPoles(i) = gp_Pnt (aPolesCoords[i-1][0]*100, " EOL - " aPolesCoords[i-1][1]*100, " EOL - " aPolesCoords[i-1][2]*100);" EOL - " " EOL - " Handle(Geom_BezierCurve) aCurve = new Geom_BezierCurve (aPoles);" EOL - ); - - Standard_Real aPolesCoords[][3] = { - {0,0,0},{0,1,0},{1,1,0},{1,2,0},{2,2,0},{2,1,0},{3,1,0},{3,0,0},{2,0,0},{2,-1,0}, - {3,-1,0},{3,-2,0},{4,-2,0},{4,-1,0},{5,-1,0},{5,0,0},{6,0,0},{6,-1,0},{7,-1,0}, - {7,0,0},{8,0,0},{8,1,0} - }; - TColgp_Array1OfPnt aPoles (1, sizeof(aPolesCoords)/(sizeof(Standard_Real)*3)); - - for (Standard_Integer i=1; i <= aPoles.Upper(); i++) - aPoles(i) = gp_Pnt (aPolesCoords[i-1][0]*150-500, - aPolesCoords[i-1][1]*150, - aPolesCoords[i-1][2]*150); - - Handle(Geom_BezierCurve) aCurve = new Geom_BezierCurve (aPoles); - - drawCurveAndItsBSpline (aCurve, "BezierCurve", aText); -} - -//================================================================ -// Function : Convert_Presentation::sampleBezierSurface -// Purpose : -//================================================================ -void Convert_Presentation::sampleBezierSurface() -{ - getAISContext()->EraseAll (Standard_True); - - Standard_CString aName = "BezierSurface"; - // Create a BezierSurface - TColgp_Array2OfPnt aPoles(1,2,1,4); // 8 points - TColStd_Array2OfReal aWeights(1,2,1,4); - // initializing array of points - aPoles.SetValue(1,1,gp_Pnt(0,10,0)); aPoles.SetValue(1,2,gp_Pnt(3.3,6.6,3)); - aPoles.SetValue(1,3,gp_Pnt(6.6,6.6,-3)); aPoles.SetValue(1,4,gp_Pnt(10,10,0)); - aPoles.SetValue(2,1,gp_Pnt(0,0,0)); aPoles.SetValue(2,2,gp_Pnt(3.3,3.3,-3)); - aPoles.SetValue(2,3,gp_Pnt(6.6,3.3,3)); aPoles.SetValue(2,4,gp_Pnt(10,0,0)); - // scaling poles - for (Standard_Integer i=1; i <= aPoles.ColLength(); i++) - for (Standard_Integer j=1; j <= aPoles.RowLength(); j++) - aPoles(i,j).ChangeCoord() = aPoles(i,j).Coord() * 100 + gp_XYZ(-500,-500,0); - //initializing array of weights - aWeights.SetValue(1,1,1); aWeights.SetValue(1,2,3); - aWeights.SetValue(1,3,9); aWeights.SetValue(1,4,1); - aWeights.SetValue(2,1,1); aWeights.SetValue(2,2,2); - aWeights.SetValue(2,3,5); aWeights.SetValue(2,4,1); - Handle(Geom_BezierSurface) aSurface = - new Geom_BezierSurface(aPoles, aWeights); - - TCollection_AsciiString aText ( - " // Create a BezierSurface" EOL - " TColgp_Array2OfPnt aPoles(1,2,1,4); // 8 points" EOL - " TColStd_Array2OfReal aWeights(1,2,1,4);" EOL - " // initializing array of points" EOL - " aPoles.SetValue(1,1,gp_Pnt(0,10,0)); aPoles.SetValue(1,2,gp_Pnt(3.3,6.6,3));" EOL - " aPoles.SetValue(1,3,gp_Pnt(6.6,6.6,-3)); aPoles.SetValue(1,4,gp_Pnt(10,10,0));" EOL - " aPoles.SetValue(2,1,gp_Pnt(0,0,0)); aPoles.SetValue(2,2,gp_Pnt(3.3,3.3,-3));" EOL - " aPoles.SetValue(2,3,gp_Pnt(6.6,3.3,3)); aPoles.SetValue(2,4,gp_Pnt(10,0,0)); " EOL - " // scaling poles" EOL - " for (Standard_Integer i=1; i <= aPoles.ColLength(); i++)" EOL - " for (Standard_Integer j=1; j <= aPoles.RowLength(); j++)" EOL - " aPoles(i,j).ChangeCoord() = aPoles(i,j).Coord() * 100 + gp_XYZ(-500,-500,0);" EOL - " //initializing array of weights" EOL - " aWeights.SetValue(1,1,1); aWeights.SetValue(1,2,3);" EOL - " aWeights.SetValue(1,3,9); aWeights.SetValue(1,4,1);" EOL - " aWeights.SetValue(2,1,1); aWeights.SetValue(2,2,2);" EOL - " aWeights.SetValue(2,3,5); aWeights.SetValue(2,4,1);" EOL - " Handle(Geom_BezierSurface) aSurface =" EOL - " new Geom_BezierSurface(aPoles, aWeights);" EOL - ); - - drawSurfaceAndItsBSpline (aSurface, aName, aText); -} - -//================================================================ -// Function : OCCDemo_Presentation::sampleCylindricalSurface -// Purpose : -//================================================================ -void Convert_Presentation::sampleCylindricalSurface() -{ - getAISContext()->EraseAll (Standard_True); - - Standard_CString aName = "Cylindrical Surface"; - TCollection_AsciiString aText ( - " // creating an axis parallel to Y axis" EOL - " gp_Ax3 anAx(gp_Pnt(0,0,0), gp_Dir(0,1,0));" EOL EOL - - " // creating a cylindrical surface along anAx with radius = 100" EOL - " Handle(Geom_CylindricalSurface) aCylSurface = new Geom_CylindricalSurface(anAx, 100);" EOL EOL - - " // only finit surfaces can be converted to BSpline surfaces, " EOL - " // cylindrical surface is infinite, it must be trimmed" EOL - " Handle(Geom_RectangularTrimmedSurface) aSurface = " EOL - " new Geom_RectangularTrimmedSurface(aCylSurface, 0, 2*PI, -1000, 1000, Standard_True, Standard_True);" EOL); - - // creating an axis parallel to Y axis - gp_Ax3 anAx(gp_Pnt(0,0,0), gp_Dir(0,1,0)); - - // creating a cylindrical surface along anAx with radius = 4 - Handle(Geom_CylindricalSurface) aCylSurface = new Geom_CylindricalSurface(anAx, 100); - - // only finit surfaces can be converted to BSpline surfaces, - // cylindrical surface is infinite, it must be trimmed - Handle(Geom_RectangularTrimmedSurface) aSurface = - new Geom_RectangularTrimmedSurface(aCylSurface, 0, 2*M_PI, -1000, 1000, Standard_True, Standard_True); - - drawSurfaceAndItsBSpline(aSurface, aName, aText); -} - -//================================================================ -// Function : OCCDemo_Presentation::sampleRevolSurface -// Purpose : -//================================================================ -void Convert_Presentation::sampleRevolSurface() -{ - FitMode=false; - ResetView(); - TranslateView(-176.84682, -102.12892); - SetViewScale(0.69326); - - getAISContext()->EraseAll (Standard_True); - - Standard_CString aName = "Surface of revolution"; - TCollection_AsciiString aText ( - " // creating a curve for revolution. Let it be a Bezier curve." EOL - " Handle(Geom_BezierCurve) aBezierCurve;" EOL EOL - - " // array of the bezier curve poles" EOL - " TColgp_Array1OfPnt aPoles(1,4);" EOL - " // array of the poles' weights" EOL - " TColStd_Array1OfReal aWeights(1,4);" EOL EOL - - " aPoles(1) = gp_Pnt(0, 0, 0); aWeights(1) = 1;" EOL - " aPoles(2) = gp_Pnt(150, 250, 0); aWeights(2) =75;" EOL - " aPoles(3) = gp_Pnt(350, 150, 0); aWeights(3) =120;" EOL - " aPoles(4) = gp_Pnt(500, 500, 0); aWeights(4) = 1;" EOL EOL - - " // creating a bezier curve" EOL - " aBezierCurve = new Geom_BezierCurve(aPoles, aWeights);" EOL EOL - - " // creating a surface of revolution of the bezier curve around Y axis" EOL - " gp_Ax1 anAx(gp_Pnt(0, 0, 0), gp_Dir(0,1,0));" EOL - " Handle(Geom_SurfaceOfRevolution) aSurface = new Geom_SurfaceOfRevolution(aBezierCurve, anAx);" EOL - ); - - // array of the bezier curve poles - TColgp_Array1OfPnt aPoles(1,4); - // array of the poles' weights - TColStd_Array1OfReal aWeights(1,4); - - aPoles(1) = gp_Pnt(0, 0, 0); aWeights(1) = 1; - aPoles(2) = gp_Pnt(150, 250, 0); aWeights(2) =75; - aPoles(3) = gp_Pnt(350, 150, 0); aWeights(3) =120; - aPoles(4) = gp_Pnt(500, 500, 0); aWeights(4) = 1; - - Handle(Geom_Curve) aBezierCurve = new Geom_BezierCurve(aPoles, aWeights); - drawCurve(aBezierCurve); - - // creating a surface of revolution of the bezier curve around Y axis - gp_Ax1 anAx(gp_Pnt(0,0,0), gp_Dir(0,1,0)); - Handle(Geom_SurfaceOfRevolution) aSurface = new Geom_SurfaceOfRevolution(aBezierCurve, anAx); - - drawSurfaceAndItsBSpline (aSurface, aName, aText); - FitMode=true; -} - -//================================================================ -// Function : Convert_Presentation::sampleToroidalSurface -// Purpose : -//================================================================ -void Convert_Presentation::sampleToroidalSurface() -{ - getAISContext()->EraseAll (Standard_True); - - Standard_CString aName = "Toroidal surface"; - TCollection_AsciiString aText ( - " // creating an axis parallel to Y axis" EOL - " gp_Ax3 anAx(gp_Pnt(0,0,0), gp_Dir(0,1,0));" EOL - " // creating a toroidal surface with major radius = 240 and minor radius = 120" EOL - " Handle(Geom_ToroidalSurface) aSurface = new Geom_ToroidalSurface(anAx, 240, 120);" EOL); - - // creating an axis parallel to Y axis - gp_Ax3 anAx(gp_Pnt(0,0,0), gp_Dir(0,1,0)); - // creating a toroidal surface with major radius = 240 and minor radius = 120 - Handle(Geom_ToroidalSurface) aSurface = new Geom_ToroidalSurface(anAx, 240, 120); - - drawSurfaceAndItsBSpline(aSurface, aName, aText); -} - -//================================================================ -// Function : Convert_Presentation::sampleConicalSurface -// Purpose : -//================================================================ -void Convert_Presentation::sampleConicalSurface() -{ - getAISContext()->EraseAll (Standard_True); - - Standard_CString aName = "Conical surface"; - TCollection_AsciiString aText ( - " // creating an axis parallel to Z axis" EOL - " gp_Ax3 anAx(gp_Pnt(0,0,0), gp_Dir(0,0,1)); " EOL - " // creating a conical surface with base radius = 10 and angle = 20 deg" EOL - " Handle(Geom_ConicalSurface) aConicalSurface = new Geom_ConicalSurface(anAx,PI/9., 10);" EOL EOL - - " // only finit surfaces can be converted to BSpline surfaces, " EOL - " // conical surface is infinite, it must be trimmed" EOL - " Handle(Geom_RectangularTrimmedSurface) aSurface = " EOL - " new Geom_RectangularTrimmedSurface(aConicalSurface, 0, 2*PI, -1000, 1000, Standard_True, Standard_True);" EOL); - - // creating an axis parallel to Z axis - gp_Ax3 anAx(gp_Pnt(0,0,0), gp_Dir(0,0,1)); - // creating a conical surface with base radius = 10 and angle = 20 deg - Handle(Geom_ConicalSurface) aConicalSurface = new Geom_ConicalSurface(anAx,M_PI/9., 10); - - // only finit surfaces can be converted to BSpline surfaces, - // conical surface is infinite, it must be trimmed - Handle(Geom_RectangularTrimmedSurface) aSurface = - new Geom_RectangularTrimmedSurface(aConicalSurface, 0, 2*M_PI, -1000, 1000, Standard_True, Standard_True); - - drawSurfaceAndItsBSpline(aSurface, aName, aText); -} - -//================================================================ -// Function : Convert_Presentation::sampleSphericalSurface -// Purpose : -//================================================================ -void Convert_Presentation::sampleSphericalSurface() -{ - getAISContext()->EraseAll (Standard_True); - - Standard_CString aName = "Spherical surface"; - TCollection_AsciiString aText ( - "// creating an axis parallel to Z axis" EOL - "gp_Ax3 anAx(gp_Pnt(0,0,0), gp_Dir(0,0,1));" EOL - "// creating a spherical surface with radius = 300" EOL - "Handle(Geom_SphericalSurface) aSurface = new Geom_SphericalSurface(anAx,300);" EOL); - - // creating an axis parallel to Z axis - gp_Ax3 anAx(gp_Pnt(0,0,0), gp_Dir(0,0,1)); - // creating a spherical surface with radius = 300 - Handle(Geom_SphericalSurface) aSurface = new Geom_SphericalSurface(anAx,300); - - drawSurfaceAndItsBSpline(aSurface, aName, aText); -} - diff --git a/samples/mfc/standard/10_Convert/src/Convert_Presentation.h b/samples/mfc/standard/10_Convert/src/Convert_Presentation.h deleted file mode 100755 index 1652113044..0000000000 --- a/samples/mfc/standard/10_Convert/src/Convert_Presentation.h +++ /dev/null @@ -1,55 +0,0 @@ -// Convert_Presentation.h: interface for the Convert_Presentation class. -// Conversion of elementary geometry to BSpline curves and surfaces -////////////////////////////////////////////////////////////////////// - -#if !defined(AFX_Convert_Presentation_H__790EED7F_7BA2_11D5_BA4A_0060B0EE18EA__INCLUDED_) -#define AFX_Convert_Presentation_H__790EED7F_7BA2_11D5_BA4A_0060B0EE18EA__INCLUDED_ - -#if _MSC_VER > 1000 -#pragma once -#endif // _MSC_VER > 1000 - -#include -#include -#include - -class Quantity_Color; - -class Convert_Presentation : public OCCDemo_Presentation -{ -public: - // Construction - Convert_Presentation(); - -public: - // Iteration on samples - virtual void DoSample(); - // one phase of iterations - -private: - // Sample functions - void sampleCircle(); - void sampleEllipse(); - void sampleBezier(); - void sampleBezierSurface(); - void sampleCylindricalSurface(); - void sampleRevolSurface(); - void sampleToroidalSurface(); - void sampleConicalSurface(); - void sampleSphericalSurface(); - - void drawCurveAndItsBSpline (Handle(Geom_Curve) theCurve, - const Standard_CString theName, TCollection_AsciiString& theText); - - void drawSurfaceAndItsBSpline (const Handle(Geom_Surface) & theSurface, - const Standard_CString theName, TCollection_AsciiString& theText); - -private: - // Array of pointers to sample functions - typedef void (Convert_Presentation::*PSampleFuncType)(); - static const PSampleFuncType SampleFuncs[]; - - int myNbFuncs; -}; - -#endif // !defined(AFX_Convert_Presentation_H__790EED7F_7BA2_11D5_BA4A_0060B0EE18EA__INCLUDED_) diff --git a/samples/mfc/standard/10_Convert/src/ISession/ISession_Curve.cpp b/samples/mfc/standard/10_Convert/src/ISession/ISession_Curve.cpp deleted file mode 100755 index 6d6fb6de72..0000000000 --- a/samples/mfc/standard/10_Convert/src/ISession/ISession_Curve.cpp +++ /dev/null @@ -1,52 +0,0 @@ -// ISession_Curve.cpp: implementation of the ISession_Curve class. -// -////////////////////////////////////////////////////////////////////// - -#include "stdafx.h" -#include "ISession_Curve.h" -#include -#include -#include -#include -#include - -IMPLEMENT_STANDARD_RTTIEXT(ISession_Curve,AIS_InteractiveObject) - -#ifdef _DEBUG -#undef THIS_FILE -static char THIS_FILE[]=__FILE__; -#endif - -////////////////////////////////////////////////////////////////////// -// Construction/Destruction -////////////////////////////////////////////////////////////////////// - - -ISession_Curve::ISession_Curve(const Handle(Geom_Curve)& aCurve) -:AIS_InteractiveObject(),myCurve(aCurve) -{ -} - -ISession_Curve::~ISession_Curve() -{ - -} -void ISession_Curve::Compute(const Handle(PrsMgr_PresentationManager)& /*aPresentationManager*/, - const Handle(Prs3d_Presentation)& aPresentation, - const Standard_Integer /*aMode*/) -{ - GeomAdaptor_Curve anAdaptorCurve(myCurve); - if (hasOwnColor) - myDrawer->LineAspect()->SetColor (myDrawer->Color()); - myDrawer->Link()->SetDiscretisation(100); - myDrawer->Link()->SetMaximalParameterValue(500); - - StdPrs_Curve::Add (aPresentation, anAdaptorCurve, myDrawer); -} - -void ISession_Curve::ComputeSelection(const Handle(SelectMgr_Selection)& /*aSelection*/, - const Standard_Integer /*aMode*/) -{ -} - - diff --git a/samples/mfc/standard/10_Convert/src/ISession/ISession_Curve.h b/samples/mfc/standard/10_Convert/src/ISession/ISession_Curve.h deleted file mode 100755 index c1c955fdf9..0000000000 --- a/samples/mfc/standard/10_Convert/src/ISession/ISession_Curve.h +++ /dev/null @@ -1,32 +0,0 @@ -// ISession_Curve.h: interface for the ISession_Curve class. -// -////////////////////////////////////////////////////////////////////// - -#if !defined(AFX_ISESSION_CURVE_H__F981CB93_A3CC_11D1_8DA3_0800369C8A03__INCLUDED_) -#define AFX_ISESSION_CURVE_H__F981CB93_A3CC_11D1_8DA3_0800369C8A03__INCLUDED_ - -#if _MSC_VER >= 1000 -#pragma once -#endif // _MSC_VER >= 1000 -#include -#include -#include -#include -class ISession_Curve; -DEFINE_STANDARD_HANDLE(ISession_Curve,AIS_InteractiveObject) - -class ISession_Curve : public AIS_InteractiveObject -{ -public: - ISession_Curve(const Handle(Geom_Curve)& aCurve); - virtual ~ISession_Curve(); -DEFINE_STANDARD_RTTIEXT(ISession_Curve,AIS_InteractiveObject) -private: - -Standard_EXPORT virtual void Compute(const Handle(PrsMgr_PresentationManager)& aPresentationManager,const Handle(Prs3d_Presentation)& aPresentation,const Standard_Integer aMode = 0) ; -void ComputeSelection(const Handle(SelectMgr_Selection)& aSelection,const Standard_Integer aMode) ; - -Handle(Geom_Curve) myCurve; -}; - -#endif // !defined(AFX_ISESSION_CURVE_H__F981CB93_A3CC_11D1_8DA3_0800369C8A03__INCLUDED_) diff --git a/samples/mfc/standard/10_Convert/src/OCCDemo_Presentation.cpp b/samples/mfc/standard/10_Convert/src/OCCDemo_Presentation.cpp deleted file mode 100755 index ed10730739..0000000000 --- a/samples/mfc/standard/10_Convert/src/OCCDemo_Presentation.cpp +++ /dev/null @@ -1,324 +0,0 @@ -// OCCDemo_Presentation.cpp: implementation of the OCCDemo_Presentation class. -// This is a base class for all presentations -////////////////////////////////////////////////////////////////////// - -#include "stdafx.h" -#include "OCCDemo_Presentation.h" -#include "OCCDemoView.h" -#include "ISession_Curve.h" - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#define MAX_PARAM 1000 // if a surface parameter is infinite, it is assigned -// this value in order to display the "infinit" object in the viewer. - - -Standard_Boolean OCCDemo_Presentation::WaitForInput (unsigned long aMilliSeconds) -{ - //::WaitForSingleObject(::CreateEvent (NULL, FALSE, FALSE, NULL), aMilliSeconds); - if (::MsgWaitForMultipleObjects(0, NULL, FALSE, aMilliSeconds, - QS_KEY | QS_MOUSEBUTTON) != WAIT_TIMEOUT) - { - MSG msg; - if (::PeekMessage (&msg, NULL, 0, 0, PM_NOREMOVE)) - { - if ( msg.message == WM_KEYUP || - msg.message == WM_MOUSEFIRST || - msg.message == WM_PAINT ) - { - ::PeekMessage (&msg, NULL, 0, 0, PM_REMOVE); - return WaitForInput (aMilliSeconds); - } - else - return Standard_True; - } - } - return Standard_False; -} - -//================================================================ -// Function : fixParam -// Purpose : assigns a finite value to theParam if it's infinite -// (equal to +- Precision::Infinite()) -//================================================================ -static Standard_Boolean fixParam(Standard_Real& theParam) -{ - Standard_Boolean aResult = Standard_False; - if (Precision::IsNegativeInfinite(theParam)) - { - theParam = -MAX_PARAM; - aResult = Standard_True; - } - if (Precision::IsPositiveInfinite(theParam)) - { - theParam = MAX_PARAM; - aResult = Standard_True; - } - return aResult; -} - -//================================================================ -// Function : DrawSurface -// Purpose : displays a given geometric surface in 3d viewer -// (creates a finite face and displays it) -//================================================================ -Handle(AIS_InteractiveObject) OCCDemo_Presentation::drawSurface - (const Handle(Geom_Surface)& theSurface, - const Quantity_Color& theColor, - const Standard_Boolean toDisplay) -{ - Standard_Real u1, u2, v1, v2; - theSurface->Bounds(u1,u2,v1,v2); - fixParam(u1); - fixParam(u2); - fixParam(v1); - fixParam(v2); - - Handle(AIS_Shape) aGraphicSurface = - new AIS_Shape(BRepBuilderAPI_MakeFace (theSurface, u1, u2, v1, v2, Precision::Confusion())); - - getAISContext()->SetMaterial(aGraphicSurface, Graphic3d_NOM_PLASTIC, toDisplay); - getAISContext()->SetColor(aGraphicSurface, theColor, toDisplay); - if (toDisplay) { - if (FitMode){ - getAISContext()->Display (aGraphicSurface, Standard_False); - COCCDemoDoc::Fit(); - } - else - getAISContext()->Display (aGraphicSurface, Standard_True); - } - - return aGraphicSurface; -} - -//================================================================ -// Function : DrawCurve -// Purpose : displays a given curve 3d -//================================================================ -Handle(AIS_InteractiveObject) OCCDemo_Presentation::drawCurve - (const Handle(Geom_Curve)& theCurve, - const Quantity_Color& theColor, - const Standard_Boolean toDisplay) -{ - Handle(ISession_Curve) aGraphicCurve = new ISession_Curve (theCurve); - - getAISContext()->SetColor (aGraphicCurve, theColor, toDisplay); - aGraphicCurve->Attributes()->Link()->SetLineArrowDraw(Standard_False); - if (toDisplay){ - if (FitMode){ - getAISContext()->Display (aGraphicCurve, Standard_False); - COCCDemoDoc::Fit(); - } - else - getAISContext()->Display (aGraphicCurve, Standard_True); - } - - return aGraphicCurve; -} - -//================================================================ -// Function : DrawCurve -// Purpose : displays a given curve 2d -//================================================================ -Handle(AIS_InteractiveObject) OCCDemo_Presentation::drawCurve - (const Handle(Geom2d_Curve)& theCurve, - const Quantity_Color& theColor, - const Standard_Boolean toDisplay, - const gp_Ax2& aPosition) -{ - // create 3D curve in plane - Handle(Geom_Curve) aCurve3d; - if (theCurve->IsKind(STANDARD_TYPE(Geom2d_OffsetCurve))) - { - Handle(Geom2d_OffsetCurve) aOffCurve = - Handle(Geom2d_OffsetCurve)::DownCast(theCurve); - Handle(Geom_Curve) aBasCurve3d = - GeomAPI::To3d (aOffCurve->BasisCurve(), gp_Pln(aPosition)); - Standard_Real aDist = aOffCurve->Offset(); - aCurve3d = new Geom_OffsetCurve (aBasCurve3d, aDist, aPosition.Direction()); - } - else - { - aCurve3d = GeomAPI::To3d (theCurve, gp_Pln(aPosition)); - } - return drawCurve (aCurve3d, theColor, toDisplay); -} - -//================================================================ -// Function : drawPoint -// Purpose : displays a given point -//================================================================ -Handle(AIS_Point) OCCDemo_Presentation::drawPoint - (const gp_Pnt& aPnt, - const Quantity_Color& theColor, - const Standard_Boolean toDisplay) -{ - Handle(AIS_Point) aGraphicPoint = new AIS_Point (new Geom_CartesianPoint(aPnt)); - - getAISContext()->SetColor (aGraphicPoint, theColor, toDisplay); - if (toDisplay) { - getAISContext()->Display (aGraphicPoint, Standard_True); - //COCCDemoDoc::Fit(); - } - - return aGraphicPoint; -} - -//================================================================ -// Function : drawVector -// Purpose : displays a given vector in 3d viewer -// (segment of line starting at thePnt with the arrow at the end, -// the length of segment is the length of the vector) -//================================================================ -Handle(AIS_InteractiveObject) OCCDemo_Presentation::drawVector - (const gp_Pnt& thePnt, - const gp_Vec& theVec, - const Quantity_Color& theColor, - const Standard_Boolean toDisplay) -{ - Standard_Real aLength = theVec.Magnitude(); - if (aLength < Precision::Confusion()) - return Handle(AIS_InteractiveObject)(); - - Handle(Geom_Curve) aCurve = new Geom_Line (thePnt, theVec); - aCurve = new Geom_TrimmedCurve (aCurve, 0, aLength); - - Handle(ISession_Curve) aGraphicCurve = new ISession_Curve (aCurve); - - getAISContext()->SetColor (aGraphicCurve, theColor, toDisplay); - Handle(Prs3d_Drawer) aDrawer = aGraphicCurve->Attributes()->Link(); - aDrawer->SetLineArrowDraw(Standard_True); - aDrawer->ArrowAspect()->SetLength(aLength/10); - if (toDisplay) { - if (FitMode){ - getAISContext()->Display (aGraphicCurve, Standard_False); - COCCDemoDoc::Fit(); - } - else - getAISContext()->Display (aGraphicCurve, Standard_True); - } - - return aGraphicCurve; -} - - -Handle(AIS_Shape) OCCDemo_Presentation::drawShape - (const TopoDS_Shape& theShape,const Quantity_Color& theColor, - const Standard_Boolean toDisplay) -{ - Handle(AIS_Shape) aGraphicShape = new AIS_Shape(theShape); - - getAISContext()->SetMaterial(aGraphicShape, Graphic3d_NOM_PLASTIC, toDisplay); - getAISContext()->SetColor (aGraphicShape, theColor, toDisplay); - if (toDisplay){ - if (FitMode){ - getAISContext()->Display (aGraphicShape, Standard_False); - COCCDemoDoc::Fit(); - } - else - getAISContext()->Display (aGraphicShape, Standard_True); - } - - return aGraphicShape; -} - -Handle(AIS_Shape) OCCDemo_Presentation::drawShape - (const TopoDS_Shape& theShape, - const Graphic3d_NameOfMaterial theMaterial, - const Standard_Boolean toDisplay) -{ - Handle(AIS_Shape) aGraphicShape = new AIS_Shape(theShape); - - getAISContext()->SetMaterial(aGraphicShape, theMaterial, toDisplay); - if (toDisplay) { - if (FitMode){ - getAISContext()->Display (aGraphicShape, Standard_False); - COCCDemoDoc::Fit(); - } - else - getAISContext()->Display (aGraphicShape, Standard_True); - } - - return aGraphicShape; -} - -void OCCDemo_Presentation::GetViewAt (Standard_Real& theX, Standard_Real& theY, Standard_Real& theZ) -{ - CMDIFrameWnd *pFrame = (CMDIFrameWnd*)AfxGetApp()->m_pMainWnd; - CMDIChildWnd *pChild = (CMDIChildWnd *) pFrame->GetActiveFrame(); - COCCDemoView *pView = (COCCDemoView *) pChild->GetActiveView(); - pView->GetViewAt (theX, theY, theZ); -} - -void OCCDemo_Presentation::SetViewAt (const Standard_Real theX, const Standard_Real theY, const Standard_Real theZ) -{ - CMDIFrameWnd *pFrame = (CMDIFrameWnd*)AfxGetApp()->m_pMainWnd; - CMDIChildWnd *pChild = (CMDIChildWnd *) pFrame->GetActiveFrame(); - COCCDemoView *pView = (COCCDemoView *) pChild->GetActiveView(); - pView->SetViewAt (theX, theY, theZ); -} - -void OCCDemo_Presentation::GetViewEye(Standard_Real& X, Standard_Real& Y, Standard_Real& Z) -{ - CMDIFrameWnd *pFrame = (CMDIFrameWnd*)AfxGetApp()->m_pMainWnd; - CMDIChildWnd *pChild = (CMDIChildWnd *) pFrame->GetActiveFrame(); - COCCDemoView *pView = (COCCDemoView *) pChild->GetActiveView(); - pView->GetViewEye(X,Y,Z); -} - -void OCCDemo_Presentation::SetViewEye(Standard_Real X, Standard_Real Y, Standard_Real Z) -{ - CMDIFrameWnd *pFrame = (CMDIFrameWnd*)AfxGetApp()->m_pMainWnd; - CMDIChildWnd *pChild = (CMDIChildWnd *) pFrame->GetActiveFrame(); - COCCDemoView *pView = (COCCDemoView *) pChild->GetActiveView(); - pView->SetViewEye(X,Y,Z); -} - -Standard_Real OCCDemo_Presentation::GetViewScale() -{ - CMDIFrameWnd *pFrame = (CMDIFrameWnd*)AfxGetApp()->m_pMainWnd; - CMDIChildWnd *pChild = (CMDIChildWnd *) pFrame->GetActiveFrame(); - COCCDemoView *pView = (COCCDemoView *) pChild->GetActiveView(); - return pView->GetViewScale(); -} - -void OCCDemo_Presentation::SetViewScale(Standard_Real Coef) -{ - CMDIFrameWnd *pFrame = (CMDIFrameWnd*)AfxGetApp()->m_pMainWnd; - CMDIChildWnd *pChild = (CMDIChildWnd *) pFrame->GetActiveFrame(); - COCCDemoView *pView = (COCCDemoView *) pChild->GetActiveView(); - pView->SetViewScale(Coef); -} - -void OCCDemo_Presentation::ResetView() -{ - CMDIFrameWnd *pFrame = (CMDIFrameWnd*)AfxGetApp()->m_pMainWnd; - CMDIChildWnd *pChild = (CMDIChildWnd *) pFrame->GetActiveFrame(); - COCCDemoView *pView = (COCCDemoView *) pChild->GetActiveView(); - pView->Reset(); -} - -void OCCDemo_Presentation::TranslateView (const Standard_Real theX, const Standard_Real theY) -{ - CMDIFrameWnd *pFrame = (CMDIFrameWnd*)AfxGetApp()->m_pMainWnd; - CMDIChildWnd *pChild = (CMDIChildWnd *) pFrame->GetActiveFrame(); - COCCDemoView *pView = (COCCDemoView *) pChild->GetActiveView(); - pView->Translate (theX, theY); -} diff --git a/samples/mfc/standard/10_Convert/src/OCCDemo_Presentation.h b/samples/mfc/standard/10_Convert/src/OCCDemo_Presentation.h deleted file mode 100755 index 5cf9390f5d..0000000000 --- a/samples/mfc/standard/10_Convert/src/OCCDemo_Presentation.h +++ /dev/null @@ -1,134 +0,0 @@ -// OCCDemo_Presentation.h: interface for the OCCDemo_Presentation class. -// This is a base class for all presentations -////////////////////////////////////////////////////////////////////// - -#if !defined(AFX_OCCDEMO_PRESENTATION_H__790EED7F_7BA2_11D5_BA4A_0060B0EE18EA__INCLUDED_) -#define AFX_OCCDEMO_PRESENTATION_H__790EED7F_7BA2_11D5_BA4A_0060B0EE18EA__INCLUDED_ - -#if _MSC_VER > 1000 -#pragma once -#endif // _MSC_VER > 1000 - - -#define WAIT_A_LITTLE WaitForInput(500) -#define WAIT_A_SECOND WaitForInput(1000) - -#include -#include -#include -#include -#include -#include -#include -class Quantity_Color; - -class OCCDemo_Presentation -{ -public: - // Construction - OCCDemo_Presentation() : myIndex(0), myNbSamples(0), FitMode(false){} - virtual ~OCCDemo_Presentation() {} - -public: - static OCCDemo_Presentation* Current; - // this pointer must be initialized when realize a derivable class; - // it is used by application to access to a presentation class instance - - void SetDocument (COCCDemoDoc* theDoc) {myDoc = theDoc;} - // document must be set by the user of this class before first use of iterations - -public: - // Titling - const CString& GetName() const {return myName;} - -public: - // Iteration on samples - void FirstSample() {myIndex=0;} - void LastSample() {myIndex=myNbSamples-1;} - Standard_Boolean AtFirstSample() const {return myIndex <= 0;} - Standard_Boolean AtLastSample() const {return myIndex >= myNbSamples-1;} - void NextSample() {myIndex++;} - void PrevSample() {myIndex--;} - virtual void DoSample() = 0; - static void GetViewAt (Standard_Real& theX, Standard_Real& theY, Standard_Real& theZ); - static void SetViewAt (const Standard_Real theX, const Standard_Real theY, const Standard_Real theZ); - static void GetViewEye (Standard_Real& X, Standard_Real& Y, Standard_Real& Z); - static void SetViewEye (Standard_Real X, Standard_Real Y, Standard_Real Z); - static Standard_Real GetViewScale(); - static void SetViewScale(Standard_Real Coef); - static void ResetView(); - static void TranslateView (const Standard_Real theX, const Standard_Real theY); - - // place one-time initialization code in this function - virtual void Init() {} - -protected: - // Methods to call from a derivable class - void setName (const char* theName) {myName = CString(theName);} - Handle(AIS_InteractiveContext) getAISContext() const {return myDoc->GetAISContext();} - Handle(V3d_Viewer) getViewer() const {return myDoc->GetViewer();} - void setResultTitle (const char* theTitle) {myDoc->GetResultDialog()->SetTitle(theTitle);} - void setResultText (const char* theText) {myDoc->GetResultDialog()->SetText(theText);} - Standard_CString GetDataDir() {return myDoc->GetDataDir();} - - Standard_Boolean WaitForInput (unsigned long aMilliSeconds); - // Waits for a user input or a period of time has been elapsed - - Handle(AIS_InteractiveObject) drawSurface (const Handle(Geom_Surface)& theSurface, - const Quantity_Color& theColor = Quantity_Color(Quantity_NOC_LEMONCHIFFON3), - const Standard_Boolean toDisplay = Standard_True); - // creates a finite face based on the given geometric surface - // and displays it in the viewer if toDisplay = Standard_True - - Handle(AIS_InteractiveObject) drawCurve (const Handle(Geom_Curve)& theCurve, - const Quantity_Color& theColor = Quantity_Color(Quantity_NOC_RED), - const Standard_Boolean toDisplay = Standard_True); - // creates an ISession_Curve based on the given geometric curve - // and displays it in the viewer if toDisplay = Standard_True - - Handle(AIS_InteractiveObject) drawCurve (const Handle(Geom2d_Curve)& theCurve, - const Quantity_Color& theColor = Quantity_Color(Quantity_NOC_RED), - const Standard_Boolean toDisplay = Standard_True, - const gp_Ax2& aPosition = gp::XOY()); - // converts a given curve to 3d using aPosition and calls the previous method - - Handle(AIS_Point) drawPoint (const gp_Pnt& thePnt, - const Quantity_Color& theColor = Quantity_Color(Quantity_NOC_GREEN), - const Standard_Boolean toDisplay = Standard_True); - // creates a presentation of the given point - // and displays it in the viewer if toDisplay = Standard_True - - Handle(AIS_InteractiveObject) drawVector (const gp_Pnt& thePnt, - const gp_Vec& theVec, - const Quantity_Color& theColor = Quantity_Color(Quantity_NOC_YELLOW), - const Standard_Boolean toDisplay = Standard_True); - // creates a presentation of the given vector - // and displays it in the viewer if toDisplay = Standard_True - - Handle(AIS_Shape) drawShape (const TopoDS_Shape& theShape, - const Quantity_Color& theColor, - const Standard_Boolean toDisplay = Standard_True); - // creates a presentation of the given shape - // with material PLASTIC and a given color - // and displays it in the viewer if toDisplay = Standard_True - - Handle(AIS_Shape) drawShape (const TopoDS_Shape& theShape, - const Graphic3d_NameOfMaterial theMaterial = Graphic3d_NameOfMaterial_Brass, - const Standard_Boolean toDisplay = Standard_True); - // creates a presentation of the given shape with the given material - // (color is default for a given material) - // and displays it in the viewer if toDisplay = Standard_True - -protected: - // Fields to use in a derivable class - BOOL FitMode; - int myIndex; - int myNbSamples; - -private: - COCCDemoDoc* myDoc; - CString myName; - -}; - -#endif // !defined(AFX_OCCDEMO_PRESENTATION_H__790EED7F_7BA2_11D5_BA4A_0060B0EE18EA__INCLUDED_) diff --git a/samples/mfc/standard/10_Convert/src/WNT/MainFrm.cpp b/samples/mfc/standard/10_Convert/src/WNT/MainFrm.cpp deleted file mode 100755 index 7135610a1e..0000000000 --- a/samples/mfc/standard/10_Convert/src/WNT/MainFrm.cpp +++ /dev/null @@ -1,113 +0,0 @@ -// MainFrm.cpp : implementation of the CMainFrame class -// - -#include "stdafx.h" -#include "OCCDemo.h" - -#include "MainFrm.h" -#include "OCCDemoDoc.h" - -#ifdef _DEBUG -#define new DEBUG_NEW -#undef THIS_FILE -static char THIS_FILE[] = __FILE__; -#endif - -///////////////////////////////////////////////////////////////////////////// -// CMainFrame - -IMPLEMENT_DYNCREATE(CMainFrame, CFrameWnd) - -BEGIN_MESSAGE_MAP(CMainFrame, CFrameWnd) - //{{AFX_MSG_MAP(CMainFrame) - // NOTE - the ClassWizard will add and remove mapping macros here. - // DO NOT EDIT what you see in these blocks of generated code ! - ON_WM_CREATE() - //}}AFX_MSG_MAP -END_MESSAGE_MAP() - -static UINT indicators[] = -{ - ID_SEPARATOR // status line indicator -}; - -///////////////////////////////////////////////////////////////////////////// -// CMainFrame construction/destruction - -CMainFrame::CMainFrame() -{ - // TODO: add member initialization code here - -} - -CMainFrame::~CMainFrame() -{ -} - -int CMainFrame::OnCreate(LPCREATESTRUCT lpCreateStruct) -{ - if (CFrameWnd::OnCreate(lpCreateStruct) == -1) - return -1; - - if (!m_wndToolBar.CreateEx(this, TBSTYLE_FLAT, WS_CHILD | WS_VISIBLE | CBRS_TOP - /* | CBRS_GRIPPER */| CBRS_TOOLTIPS | CBRS_FLYBY) || - !m_wndToolBar.LoadToolBar(IDR_MAINFRAME)) - { - TRACE0("Failed to create toolbar\n"); - return -1; // fail to create - } - - if (!m_wndToolBar1.CreateEx(this, TBSTYLE_FLAT, WS_CHILD | WS_VISIBLE | CBRS_TOP - | CBRS_TOOLTIPS | CBRS_FLYBY) || - !m_wndToolBar1.LoadToolBar(IDR_TOOLBAR1)) - { - TRACE0("Failed to create toolbar\n"); - return -1; // fail to create - } - - if (!m_wndStatusBar.Create(this) || - !m_wndStatusBar.SetIndicators(indicators, - sizeof(indicators)/sizeof(UINT))) - { - TRACE0("Failed to create status bar\n"); - return -1; // fail to create - } - - // TODO: Delete these three lines if you don't want the toolbar to - // be dockable - //m_wndToolBar.EnableDocking(CBRS_ALIGN_ANY); - //EnableDocking(CBRS_ALIGN_ANY); - //DockControlBar(&m_wndToolBar); - - return 0; -} - -BOOL CMainFrame::PreCreateWindow(CREATESTRUCT& cs) -{ - if( !CFrameWnd::PreCreateWindow(cs) ) - return FALSE; - // TODO: Modify the Window class or styles here by modifying - // the CREATESTRUCT cs - - return TRUE; -} - -///////////////////////////////////////////////////////////////////////////// -// CMainFrame diagnostics - -#ifdef _DEBUG -void CMainFrame::AssertValid() const -{ - CFrameWnd::AssertValid(); -} - -void CMainFrame::Dump(CDumpContext& dc) const -{ - CFrameWnd::Dump(dc); -} - -#endif //_DEBUG - -///////////////////////////////////////////////////////////////////////////// -// CMainFrame message handlers - diff --git a/samples/mfc/standard/10_Convert/src/WNT/MainFrm.h b/samples/mfc/standard/10_Convert/src/WNT/MainFrm.h deleted file mode 100755 index 51a368edeb..0000000000 --- a/samples/mfc/standard/10_Convert/src/WNT/MainFrm.h +++ /dev/null @@ -1,59 +0,0 @@ -// MainFrm.h : interface of the CMainFrame class -// -///////////////////////////////////////////////////////////////////////////// - -#if !defined(AFX_MAINFRM_H__57A6A22C_7B4F_11D5_BA4A_0060B0EE18EA__INCLUDED_) -#define AFX_MAINFRM_H__57A6A22C_7B4F_11D5_BA4A_0060B0EE18EA__INCLUDED_ - -#if _MSC_VER > 1000 -#pragma once -#endif // _MSC_VER > 1000 - -class CMainFrame : public CFrameWnd -{ - -protected: // create from serialization only - CMainFrame(); - DECLARE_DYNCREATE(CMainFrame) - -// Attributes -public: - -// Operations -public: - -// Overrides - // ClassWizard generated virtual function overrides - //{{AFX_VIRTUAL(CMainFrame) - virtual BOOL PreCreateWindow(CREATESTRUCT& cs); - //}}AFX_VIRTUAL - -// Implementation -public: - virtual ~CMainFrame(); -#ifdef _DEBUG - virtual void AssertValid() const; - virtual void Dump(CDumpContext& dc) const; -#endif - -protected: // control bar embedded members - CStatusBar m_wndStatusBar; - CToolBar m_wndToolBar; - CToolBar m_wndToolBar1; - -// Generated message map functions -protected: - //{{AFX_MSG(CMainFrame) - afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct); - // NOTE - the ClassWizard will add and remove member functions here. - // DO NOT EDIT what you see in these blocks of generated code! - //}}AFX_MSG - DECLARE_MESSAGE_MAP() -}; - -///////////////////////////////////////////////////////////////////////////// - -//{{AFX_INSERT_LOCATION}} -// Microsoft Visual C++ will insert additional declarations immediately before the previous line. - -#endif // !defined(AFX_MAINFRM_H__57A6A22C_7B4F_11D5_BA4A_0060B0EE18EA__INCLUDED_) diff --git a/samples/mfc/standard/10_Convert/src/WNT/OCCDemo.cpp b/samples/mfc/standard/10_Convert/src/WNT/OCCDemo.cpp deleted file mode 100755 index f43f375f7a..0000000000 --- a/samples/mfc/standard/10_Convert/src/WNT/OCCDemo.cpp +++ /dev/null @@ -1,178 +0,0 @@ -// OCCDemo.cpp : Defines the class behaviors for the application. -// - -#include "stdafx.h" -#include "OCCDemo.h" - -#include "MainFrm.h" -#include "OCCDemoDoc.h" -#include "OCCDemoView.h" - -#ifdef _DEBUG -#undef THIS_FILE -static char THIS_FILE[] = __FILE__; -#endif - -///////////////////////////////////////////////////////////////////////////// -// COCCDemoApp - -BEGIN_MESSAGE_MAP(COCCDemoApp, CWinApp) - //{{AFX_MSG_MAP(COCCDemoApp) - ON_COMMAND(ID_APP_ABOUT, OnAppAbout) - //}}AFX_MSG_MAP - // Standard file based document commands -END_MESSAGE_MAP() - -///////////////////////////////////////////////////////////////////////////// -// COCCDemoApp construction - -COCCDemoApp::COCCDemoApp() : OCC_App() -{ - SampleName = ""; - try - { - Handle(Aspect_DisplayConnection) aDisplayConnection; - myGraphicDriver = new OpenGl_GraphicDriver (aDisplayConnection); - } - catch (Standard_Failure) - { - AfxMessageBox (L"Fatal Error During Graphic Initialisation"); - } -} - -///////////////////////////////////////////////////////////////////////////// -// The one and only COCCDemoApp object - -COCCDemoApp theApp; - -///////////////////////////////////////////////////////////////////////////// -// COCCDemoApp initialization - -BOOL COCCDemoApp::InitInstance() -{ - // Standard initialization - // If you are not using these features and wish to reduce the size - // of your final executable, you should remove from the following - // the specific initialization routines you do not need. - - // Change the registry key under which our settings are stored. - // TODO: You should modify this string to be something appropriate - // such as the name of your company or organization. - SetRegistryKey(_T("Local AppWizard-Generated Applications")); - - LoadStdProfileSettings(); // Load standard INI file options (including MRU) - - // Register the application's document templates. Document templates - // serve as the connection between documents, frame windows and views. - - CSingleDocTemplate* pDocTemplate; - pDocTemplate = new CSingleDocTemplate( - IDR_MAINFRAME, - RUNTIME_CLASS(COCCDemoDoc), - RUNTIME_CLASS(CMainFrame), // main SDI frame window - RUNTIME_CLASS(COCCDemoView)); - AddDocTemplate(pDocTemplate); - - - // Parse command line for standard shell commands, DDE, file open - CCommandLineInfo cmdInfo; - ParseCommandLine(cmdInfo); - - // Dispatch commands specified on the command line - if (!ProcessShellCommand(cmdInfo)) - return FALSE; - - - // Create result dialog - AfxInitRichEdit(); - CMainFrame* cFrame = (CMainFrame*) GetMainWnd(); - COCCDemoDoc* aDoc = (COCCDemoDoc*) cFrame->GetActiveDocument(); - - // pass cFrame->GetDesktopWindow() as parent to have an independent dialog - // pass cFrame as parent to have the result dialog always above the main window - if (!aDoc->GetResultDialog()->Create(CResultDialog::IDD, cFrame->GetDesktopWindow())) - TRACE0("Failed to create result dialog\n"); - - aDoc->GetResultDialog()->SetIcon(AfxGetApp()->LoadIcon(IDR_MAINFRAME), FALSE); - aDoc->GetResultDialog()->ShowWindow(SW_HIDE); - aDoc->GetResultDialog()->Initialize(); - - // resize the result dialog, so no clipping occurs when user - // resizes the dialog manually - // position the result dialog to the left bottom corner of the view - CRect aDlgRect, aViewRect; - aDoc->GetResultDialog()->GetWindowRect(&aDlgRect); - cFrame->GetActiveView()->GetWindowRect(&aViewRect); - - int x = aViewRect.left; - int y = aViewRect.bottom - aDlgRect.Size().cy; - int cx = aDlgRect.Size().cx+1; - int cy = aDlgRect.Size().cy+1; - aDoc->GetResultDialog()->SetWindowPos(NULL, x, y, cx, cy, SWP_NOREDRAW | SWP_NOZORDER); - - m_pMainWnd->ShowWindow(SW_SHOW); - m_pMainWnd->UpdateWindow(); - m_pMainWnd->SetFocus(); - aDoc->Start(); - - return TRUE; -} - -/* -///////////////////////////////////////////////////////////////////////////// -// CAboutDlg dialog used for App About - -class CAboutDlg : public CDialog -{ -public: - CAboutDlg(); - -// Dialog Data - //{{AFX_DATA(CAboutDlg) - enum { IDD = IDD_ABOUTBOX }; - //}}AFX_DATA - - // ClassWizard generated virtual function overrides - //{{AFX_VIRTUAL(CAboutDlg) - protected: - virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support - //}}AFX_VIRTUAL - -// Implementation -protected: - //{{AFX_MSG(CAboutDlg) - // No message handlers - //}}AFX_MSG - DECLARE_MESSAGE_MAP() -}; - -CAboutDlg::CAboutDlg() : CDialog(CAboutDlg::IDD) -{ - //{{AFX_DATA_INIT(CAboutDlg) - //}}AFX_DATA_INIT -} - -void CAboutDlg::DoDataExchange(CDataExchange* pDX) -{ - CDialog::DoDataExchange(pDX); - //{{AFX_DATA_MAP(CAboutDlg) - //}}AFX_DATA_MAP -} - -BEGIN_MESSAGE_MAP(CAboutDlg, CDialog) - //{{AFX_MSG_MAP(CAboutDlg) - // No message handlers - //}}AFX_MSG_MAP -END_MESSAGE_MAP() - -// App command to run the dialog -void COCCDemoApp::OnAppAbout() -{ - CAboutDlg aboutDlg; - aboutDlg.DoModal(); -} - -///////////////////////////////////////////////////////////////////////////// -// COCCDemoApp message handlers - -*/ \ No newline at end of file diff --git a/samples/mfc/standard/10_Convert/src/WNT/OCCDemo.h b/samples/mfc/standard/10_Convert/src/WNT/OCCDemo.h deleted file mode 100755 index 180976da8a..0000000000 --- a/samples/mfc/standard/10_Convert/src/WNT/OCCDemo.h +++ /dev/null @@ -1,57 +0,0 @@ -// OCCDemo.h : main header file for the OCCDEMO application -// - -#if !defined(AFX_OCCDEMO_H__57A6A228_7B4F_11D5_BA4A_0060B0EE18EA__INCLUDED_) -#define AFX_OCCDEMO_H__57A6A228_7B4F_11D5_BA4A_0060B0EE18EA__INCLUDED_ - -#if _MSC_VER > 1000 -#pragma once -#endif // _MSC_VER > 1000 - -#ifndef __AFXWIN_H__ - #error include 'stdafx.h' before including this file for PCH -#endif - -#include "resource.h" // main symbols - -#include - -///////////////////////////////////////////////////////////////////////////// -// COCCDemoApp: -// See OCCDemo.cpp for the implementation of this class -// - -class COCCDemoApp : public OCC_App -{ -public: - - COCCDemoApp(); - - Handle(Graphic3d_GraphicDriver) GetGraphicDriver() const { return myGraphicDriver; } - -// Overrides - // ClassWizard generated virtual function overrides - //{{AFX_VIRTUAL(COCCDemoApp) - public: - virtual BOOL InitInstance(); - //}}AFX_VIRTUAL - -// Implementation - //{{AFX_MSG(COCCDemoApp) - //afx_msg void OnAppAbout(); - // NOTE - the ClassWizard will add and remove member functions here. - // DO NOT EDIT what you see in these blocks of generated code ! - //}}AFX_MSG - DECLARE_MESSAGE_MAP() - -private: - - Handle(Graphic3d_GraphicDriver) myGraphicDriver; -}; - -///////////////////////////////////////////////////////////////////////////// - -//{{AFX_INSERT_LOCATION}} -// Microsoft Visual C++ will insert additional declarations immediately before the previous line. - -#endif // !defined(AFX_OCCDEMO_H__57A6A228_7B4F_11D5_BA4A_0060B0EE18EA__INCLUDED_) diff --git a/samples/mfc/standard/10_Convert/src/WNT/OCCDemo.rc b/samples/mfc/standard/10_Convert/src/WNT/OCCDemo.rc deleted file mode 100755 index 352d2b678a..0000000000 --- a/samples/mfc/standard/10_Convert/src/WNT/OCCDemo.rc +++ /dev/null @@ -1,388 +0,0 @@ -//Microsoft Developer Studio generated resource script. -// -#include "resource.h" - -#define APSTUDIO_READONLY_SYMBOLS -///////////////////////////////////////////////////////////////////////////// -// -// Generated from the TEXTINCLUDE 2 resource. -// -#include "afxres.h" -#include "..\..\..\Common\res\OCC_Resource.h" -///////////////////////////////////////////////////////////////////////////// -#undef APSTUDIO_READONLY_SYMBOLS - -///////////////////////////////////////////////////////////////////////////// -// English (U.S.) resources - -#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) -#ifdef _WIN32 -LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US -#pragma code_page(1252) -#endif //_WIN32 - -#ifdef APSTUDIO_INVOKED -///////////////////////////////////////////////////////////////////////////// -// -// TEXTINCLUDE -// - -1 TEXTINCLUDE DISCARDABLE -BEGIN - "resource.h\0" -END - -2 TEXTINCLUDE DISCARDABLE -BEGIN - "#include ""afxres.h""\r\n" - "#include ""..\\..\\..\\Common\\res\\OCC_Resource.h""\0" - -END - -3 TEXTINCLUDE DISCARDABLE -BEGIN - "#define _AFX_NO_SPLITTER_RESOURCES\r\n" - "#define _AFX_NO_OLE_RESOURCES\r\n" - "#define _AFX_NO_TRACKER_RESOURCES\r\n" - "#define _AFX_NO_PROPERTY_RESOURCES\r\n" - "\r\n" - "#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)\r\n" - "#ifdef _WIN32\r\n" - "LANGUAGE 9, 1\r\n" - "#pragma code_page(1252)\r\n" - "#endif //_WIN32\r\n" - "#include ""res\\OCCDemo.rc2"" // non-Microsoft Visual C++ edited resources\r\n" - "#include ""afxres.rc"" // Standard components\r\n" - "#endif\r\n" - "\0" -END - -#endif // APSTUDIO_INVOKED - - -///////////////////////////////////////////////////////////////////////////// -// -// Icon -// - -// Icon with lowest ID value placed first to ensure application icon -// remains consistent on all systems. -IDR_MAINFRAME ICON DISCARDABLE "res\\OCCDemo.ico" - -///////////////////////////////////////////////////////////////////////////// -// -// Bitmap -// - -IDR_MAINFRAME BITMAP MOVEABLE PURE "res\\Toolbar.bmp" -IDR_TOOLBAR1 BITMAP DISCARDABLE "res\\Toolbar1.bmp" -IDB_OCCLOGO BITMAP DISCARDABLE "res\\occlogo.bmp" -IDB_OPENLOGO BITMAP DISCARDABLE "res\\logopen.bmp" - -///////////////////////////////////////////////////////////////////////////// -// -// Toolbar -// - -IDR_MAINFRAME TOOLBAR DISCARDABLE 20, 20 -BEGIN - BUTTON ID_BUTTONStart - BUTTON ID_BUTTONPrev - BUTTON ID_BUTTONRepeat - BUTTON ID_BUTTONNext - BUTTON ID_BUTTONEnd - SEPARATOR - BUTTON ID_BUTTONShowResult - BUTTON ID_DUMP_VIEW -END - -IDR_TOOLBAR1 TOOLBAR DISCARDABLE 20, 20 -BEGIN - BUTTON ID_BUTTONZoomAll - BUTTON ID_BUTTONZoomWin - BUTTON ID_BUTTONZoomProg - SEPARATOR - BUTTON ID_BUTTONPan - BUTTON ID_BUTTONPanGlo - SEPARATOR - BUTTON ID_BUTTONFront - BUTTON ID_BUTTONTop - BUTTON ID_BUTTONLeft - BUTTON ID_BUTTONBack - BUTTON ID_BUTTONRight - BUTTON ID_BUTTONBottom - BUTTON ID_BUTTONAxo - SEPARATOR - BUTTON ID_BUTTONRot - BUTTON ID_BUTTONReset - SEPARATOR - BUTTON ID_BUTTONWire - BUTTON ID_BUTTONShade - BUTTON ID_BUTTONHlrOn -END - - -///////////////////////////////////////////////////////////////////////////// -// -// Menu -// - -IDR_MAINFRAME MENU PRELOAD DISCARDABLE -BEGIN - POPUP "&File" - BEGIN - MENUITEM "Reset", ID_FILE_NEW - MENUITEM SEPARATOR - MENUITEM "E&xit", ID_APP_EXIT - END - POPUP "&Help" - BEGIN - MENUITEM "&About OCCDemo...", ID_APP_ABOUT - END -END - - -///////////////////////////////////////////////////////////////////////////// -// -// Accelerator -// - -IDR_MAINFRAME ACCELERATORS PRELOAD MOVEABLE PURE -BEGIN - "A", ID_BUTTONAxo, VIRTKEY, CONTROL, NOINVERT - "B", ID_BUTTONBack, VIRTKEY, CONTROL, NOINVERT - "F", ID_BUTTONZoomAll, VIRTKEY, NOINVERT - "F", ID_BUTTONFront, VIRTKEY, CONTROL, NOINVERT - "H", ID_BUTTONHlrOn, VIRTKEY, SHIFT, NOINVERT - "L", ID_BUTTONLeft, VIRTKEY, CONTROL, NOINVERT - "M", ID_BUTTONBottom, VIRTKEY, CONTROL, NOINVERT - "R", ID_BUTTONReset, VIRTKEY, NOINVERT - "R", ID_BUTTONRight, VIRTKEY, CONTROL, NOINVERT - "S", ID_BUTTONShade, VIRTKEY, SHIFT, NOINVERT - "T", ID_BUTTONTop, VIRTKEY, CONTROL, NOINVERT - VK_END, ID_BUTTONEnd, VIRTKEY, NOINVERT - VK_F11, ID_BUTTONShowResult, VIRTKEY, NOINVERT - VK_F12, ID_DUMP_VIEW, VIRTKEY, NOINVERT - VK_HOME, ID_BUTTONStart, VIRTKEY, NOINVERT - VK_NEXT, ID_BUTTONNext, VIRTKEY, NOINVERT - VK_PRIOR, ID_BUTTONPrev, VIRTKEY, NOINVERT - VK_SPACE, ID_BUTTONRepeat, VIRTKEY, NOINVERT - "W", ID_BUTTONWire, VIRTKEY, SHIFT, NOINVERT - "X", ID_APP_EXIT, VIRTKEY, CONTROL, NOINVERT -END - - -///////////////////////////////////////////////////////////////////////////// -// -// Dialog -// - -IDD_ABOUTBOX DIALOG DISCARDABLE 0, 0, 229, 170 -STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU -CAPTION "About OCCDemo" -FONT 8, "MS Sans Serif" -BEGIN - CTEXT "Copyright (C) 2003, OpenCASCADE Company",IDC_STATIC,42, - 106,145,8,SS_NOPREFIX - DEFPUSHBUTTON "OK",IDOK,90,132,50,14,WS_GROUP - CONTROL 142,IDC_STATIC,"Static",SS_BITMAP,50,35,129,62 - LTEXT "OCCDemo, OpenCASCADE 5.0",IDC_STATIC,64,20,101,8 -END - -IDD_ResultDialog DIALOG DISCARDABLE 0, 0, 244, 231 -STYLE WS_MINIMIZEBOX | WS_MAXIMIZEBOX | WS_POPUP | WS_CAPTION | WS_SYSMENU | - WS_THICKFRAME -CAPTION "Result Dialog" -FONT 8, "MS Sans Serif" -BEGIN - CONTROL "",IDC_RICHEDIT_ResultDialog,"RICHEDIT",ES_MULTILINE | - ES_AUTOVSCROLL | ES_AUTOHSCROLL | ES_NOHIDESEL | - ES_READONLY | WS_BORDER | WS_VSCROLL | WS_HSCROLL | - WS_TABSTOP,0,7,243,192 - PUSHBUTTON "Copy selection",IDC_CopySelectionToClipboard,0,206,60, - 18 - PUSHBUTTON "Copy all",IDC_CopyAllToClipboard,65,206,60,18 - PUSHBUTTON "Close",IDCANCEL,183,206,60,18 -END - - -#ifndef _MAC -///////////////////////////////////////////////////////////////////////////// -// -// Version -// - -VS_VERSION_INFO VERSIONINFO - FILEVERSION 1,0,0,1 - PRODUCTVERSION 1,0,0,1 - FILEFLAGSMASK 0x3fL -#ifdef _DEBUG - FILEFLAGS 0x1L -#else - FILEFLAGS 0x0L -#endif - FILEOS 0x4L - FILETYPE 0x1L - FILESUBTYPE 0x0L -BEGIN - BLOCK "StringFileInfo" - BEGIN - BLOCK "040904b0" - BEGIN - VALUE "Comments", "Open CASCADE Technology Demonstration Application\0" - VALUE "CompanyName", "Open CASCADE, France\0" - VALUE "FileDescription", "OCCDemo MFC Application\0" - VALUE "FileVersion", "1, 0, 0, 1\0" - VALUE "InternalName", "OCCDemo\0" - VALUE "LegalCopyright", "Copyright (C) 2001, Open CASCADE Company\0" - VALUE "LegalTrademarks", "Open CASCADE\0" - VALUE "OriginalFilename", "OCCDemo.EXE\0" - VALUE "PrivateBuild", "\0" - VALUE "ProductName", "OCCDemo Application\0" - VALUE "ProductVersion", "1, 0, 0, 1\0" - VALUE "SpecialBuild", "\0" - END - END - BLOCK "VarFileInfo" - BEGIN - VALUE "Translation", 0x409, 1200 - END -END - -#endif // !_MAC - - -///////////////////////////////////////////////////////////////////////////// -// -// DESIGNINFO -// - -#ifdef APSTUDIO_INVOKED -GUIDELINES DESIGNINFO DISCARDABLE -BEGIN - IDD_ABOUTBOX, DIALOG - BEGIN - LEFTMARGIN, 7 - RIGHTMARGIN, 222 - TOPMARGIN, 7 - BOTTOMMARGIN, 162 - END - - IDD_ResultDialog, DIALOG - BEGIN - RIGHTMARGIN, 243 - TOPMARGIN, 7 - BOTTOMMARGIN, 224 - END -END -#endif // APSTUDIO_INVOKED - - -///////////////////////////////////////////////////////////////////////////// -// -// String Table -// - -STRINGTABLE PRELOAD DISCARDABLE -BEGIN - IDR_MAINFRAME "OCCDemo\n\nOCCDem\n\n\nOCCDemo.Document\nOCCDem Document" -END - -STRINGTABLE PRELOAD DISCARDABLE -BEGIN - AFX_IDS_APP_TITLE "OCCDemo" - AFX_IDS_IDLEMESSAGE "Ready" -END - -STRINGTABLE DISCARDABLE -BEGIN - ID_FILE_NEW "Start demo a new\nReset" -END - -STRINGTABLE DISCARDABLE -BEGIN - ID_APP_ABOUT "Display program information, version number and copyright\nAbout" - ID_APP_EXIT "Quit the application\nExit" -END - -STRINGTABLE DISCARDABLE -BEGIN - AFX_IDS_SCSIZE "Change the window size" - AFX_IDS_SCMOVE "Change the window position" - AFX_IDS_SCMINIMIZE "Reduce the window to an icon" - AFX_IDS_SCMAXIMIZE "Enlarge the window to full size" - AFX_IDS_SCNEXTWINDOW "Switch to the next document window" - AFX_IDS_SCPREVWINDOW "Switch to the previous document window" - AFX_IDS_SCCLOSE "Close the active window" -END - -STRINGTABLE DISCARDABLE -BEGIN - AFX_IDS_SCRESTORE "Restore the window to normal size" - AFX_IDS_SCTASKLIST "Activate Task List" -END - -STRINGTABLE DISCARDABLE -BEGIN - ID_BUTTONZoomAll "Press to zoom the application objects in the view\nFitAll (F)" - ID_BUTTONZoomWin "Press and drag MB1 to select a zoom window\nZoom Window" - ID_BUTTONZoomProg "Press and drag MB1 to zoom\nDynamic Zooming" - ID_BUTTONPan "Press and drag MB1 to pan\nDynamic Panning" - ID_BUTTONPanGlo "Press and select a new view center t\nGlobal Panning" - ID_BUTTONFront "Press to select a front View\nFront (Ctrl+F)" - ID_BUTTONLeft "Press to select a left View\nLeft (Ctrl+L)" - ID_BUTTONTop "Press to select a top View\nTop (Ctrl+T)" - ID_BUTTONBack "Press to select a back View\nBack (Ctrl+B)" - ID_BUTTONRight "Press to select a right View\nRight (Ctrl+R)" - ID_BUTTONBottom "Press to select a bottom View\nBottom (Ctrl+M)" - ID_BUTTONAxo "Press to select axonometric View\nAxo (Ctrl+A)" - ID_BUTTONRot "Press and drag MB1 to rotate\nDynamic Rotation" - ID_BUTTONReset "Press to reset view\nReset (R)" - ID_BUTTONWire "Press to switch to wireframe mode\nWireframe mode (Shift+W)" -END - -STRINGTABLE DISCARDABLE -BEGIN - ID_BUTTONShade "Press to switch to shading mode\nShading mode (Shift+S)" - ID_BUTTONHlrOn "Press to switch to HLR mode\nHLR mode (Shift+H)" -END - -STRINGTABLE DISCARDABLE -BEGIN - ID_BUTTONStart "Press to go to the first sample\nFirst sample (Home)" - ID_BUTTONNext "Press to go to the next sample\nNext sample (PgDn)" - ID_BUTTONShowResult "Press to toggle show of source code on/off\nSource code (F11)" - ID_DUMP_VIEW "Save current frame into an image file\nExport view (F12)" - ID_BUTTONEnd "Press to go to the last sample\nLast sample (End)" - ID_BUTTONPrev "Press to go to the previous sample\nPrevious sample (PgUp)" - ID_BUTTONRepeat "Press to repeat the current sample\nRepeat sample (Space)" -END - -#endif // English (U.S.) resources -///////////////////////////////////////////////////////////////////////////// - - - -#ifndef APSTUDIO_INVOKED -///////////////////////////////////////////////////////////////////////////// -// -// Generated from the TEXTINCLUDE 3 resource. -// -#define _AFX_NO_SPLITTER_RESOURCES -#define _AFX_NO_OLE_RESOURCES -#define _AFX_NO_TRACKER_RESOURCES -#define _AFX_NO_PROPERTY_RESOURCES - -#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) -#ifdef _WIN32 -LANGUAGE 9, 1 -#pragma code_page(1252) -#endif //_WIN32 -#include "res\OCCDemo.rc2" // non-Microsoft Visual C++ edited resources -#include "afxres.rc" // Standard components -#include "..\\..\\..\\Common\\res\\OCC_Resource.h" -#endif - -///////////////////////////////////////////////////////////////////////////// -#endif // not APSTUDIO_INVOKED - diff --git a/samples/mfc/standard/10_Convert/src/WNT/OCCDemoDoc.cpp b/samples/mfc/standard/10_Convert/src/WNT/OCCDemoDoc.cpp deleted file mode 100755 index ae16d93428..0000000000 --- a/samples/mfc/standard/10_Convert/src/WNT/OCCDemoDoc.cpp +++ /dev/null @@ -1,243 +0,0 @@ -// OCCDemoDoc.cpp : implementation of the COCCDemoDoc class -// - -#include "stdafx.h" -#include "OCCDemo.h" - -#include "OCCDemoDoc.h" -#include "OCCDemo_Presentation.h" -#include "OCCDemoView.h" - -#include -#include - -#ifdef _DEBUG -#undef THIS_FILE -static char THIS_FILE[] = __FILE__; -#endif - -///////////////////////////////////////////////////////////////////////////// -// COCCDemoDoc - -IMPLEMENT_DYNCREATE(COCCDemoDoc, CDocument) - -BEGIN_MESSAGE_MAP(COCCDemoDoc, CDocument) - //{{AFX_MSG_MAP(COCCDemoDoc) - ON_COMMAND(ID_BUTTONNext, OnBUTTONNext) - ON_COMMAND(ID_BUTTONStart, OnBUTTONStart) - ON_COMMAND(ID_BUTTONRepeat, OnBUTTONRepeat) - ON_COMMAND(ID_BUTTONPrev, OnBUTTONPrev) - ON_COMMAND(ID_BUTTONEnd, OnBUTTONEnd) - ON_UPDATE_COMMAND_UI(ID_BUTTONNext, OnUpdateBUTTONNext) - ON_UPDATE_COMMAND_UI(ID_BUTTONPrev, OnUpdateBUTTONPrev) - ON_COMMAND(ID_FILE_NEW, OnFileNew) - ON_COMMAND(ID_BUTTONShowResult, OnBUTTONShowResult) - ON_UPDATE_COMMAND_UI(ID_BUTTONShowResult, OnUpdateBUTTONShowResult) - ON_COMMAND(ID_DUMP_VIEW, OnDumpView) - //}}AFX_MSG_MAP -END_MESSAGE_MAP() - -///////////////////////////////////////////////////////////////////////////// -// COCCDemoDoc construction/destruction - -COCCDemoDoc::COCCDemoDoc() -{ - // TODO: add one-time construction code here - Handle(Graphic3d_GraphicDriver) aGraphicDriver = - ((COCCDemoApp*)AfxGetApp())->GetGraphicDriver(); - - myViewer = new V3d_Viewer(aGraphicDriver); - myViewer->SetDefaultLights(); - myViewer->SetLightOn(); - myViewer->SetDefaultBackgroundColor (Quantity_NOC_BLACK); - - myAISContext = new AIS_InteractiveContext(myViewer); - myShowResult = FALSE; - myPresentation = OCCDemo_Presentation::Current; - myPresentation->SetDocument(this); - - strcpy_s(myDataDir, "Data"); - strcpy_s(myLastPath, "."); -} - -COCCDemoDoc::~COCCDemoDoc() -{ -} - -BOOL COCCDemoDoc::OnNewDocument() -{ - if (!CDocument::OnNewDocument()) - return FALSE; - - // TODO: add reinitialization code here - // (SDI documents will reuse this document) - SetTitle(myPresentation->GetName()); - - myAISContext->EraseAll (Standard_False); - myAISContext->SetDisplayMode (AIS_Shaded, Standard_True); - - POSITION pos = GetFirstViewPosition(); - while (pos != NULL) - { - COCCDemoView* pView = (COCCDemoView*) GetNextView(pos); - pView->Reset(); - } - - return TRUE; -} - -void COCCDemoDoc::Start() -{ - myPresentation->Init(); - OnBUTTONStart(); -} - -///////////////////////////////////////////////////////////////////////////// -// COCCDemoDoc serialization - -void COCCDemoDoc::Serialize(CArchive& ar) -{ - if (ar.IsStoring()) - {}// TODO: add storing code here - else - {}// TODO: add loading code here -} - -///////////////////////////////////////////////////////////////////////////// -// COCCDemoDoc diagnostics - -#ifdef _DEBUG -void COCCDemoDoc::AssertValid() const -{ - CDocument::AssertValid(); -} - -void COCCDemoDoc::Dump(CDumpContext& dc) const -{ - CDocument::Dump(dc); -} -#endif //_DEBUG - -///////////////////////////////////////////////////////////////////////////// -// COCCDemoDoc commands - -void COCCDemoDoc::OnFileNew() -{ - OnNewDocument(); - Start(); -} - -void COCCDemoDoc::InitViewButtons() -{ - POSITION pos = GetFirstViewPosition(); - while (pos != NULL) - { - COCCDemoView* pView = (COCCDemoView*) GetNextView(pos); - pView->InitButtons(); - } -} - -void COCCDemoDoc::DoSample() -{ - InitViewButtons(); - - HCURSOR hOldCursor = ::GetCursor(); - HCURSOR hNewCursor = AfxGetApp()->LoadStandardCursor(IDC_APPSTARTING); - - SetCursor(hNewCursor); - { - try - { - myPresentation->DoSample(); - } - catch (Standard_Failure const& anException) - { - Standard_SStream aSStream; - aSStream << "An exception was caught: " << anException << std::ends; - CString aMsg = aSStream.str().c_str(); - AfxMessageBox (aMsg); - } - } - SetCursor(hOldCursor); -} - -void COCCDemoDoc::OnBUTTONStart() -{ - myAISContext->EraseAll (Standard_True); - myPresentation->FirstSample(); - DoSample(); -} - -void COCCDemoDoc::OnBUTTONEnd() -{ - myAISContext->EraseAll (Standard_True); - myPresentation->LastSample(); - DoSample(); -} - -void COCCDemoDoc::OnBUTTONRepeat() -{ - DoSample(); -} - -void COCCDemoDoc::OnBUTTONNext() -{ - if (!myPresentation->AtLastSample()) - { - myPresentation->NextSample(); - DoSample(); - } -} - -void COCCDemoDoc::OnBUTTONPrev() -{ - if (!myPresentation->AtFirstSample()) - { - myPresentation->PrevSample(); - DoSample(); - } -} - -void COCCDemoDoc::OnUpdateBUTTONNext(CCmdUI* pCmdUI) -{ - pCmdUI->Enable (!myPresentation->AtLastSample()); -} - -void COCCDemoDoc::OnUpdateBUTTONPrev(CCmdUI* pCmdUI) -{ - pCmdUI->Enable (!myPresentation->AtFirstSample()); -} - -void COCCDemoDoc::OnBUTTONShowResult() -{ - myShowResult = !myShowResult; - if (myShowResult) - myCResultDialog.ShowWindow(SW_SHOWNORMAL); - else - myCResultDialog.ShowWindow(SW_HIDE); -} - -void COCCDemoDoc::OnUpdateBUTTONShowResult(CCmdUI* pCmdUI) -{ - pCmdUI->SetCheck (myShowResult); -} - -void COCCDemoDoc::OnDumpView() -{ - for (POSITION aPos = GetFirstViewPosition(); aPos != NULL;) - { - COCCDemoView* pView = (COCCDemoView* )GetNextView (aPos); - pView->UpdateWindow(); - } - - Handle(V3d_View) aView = myViewer->ActiveViews().First(); - ExportView (aView); -} - -void COCCDemoDoc::Fit() -{ - CMDIFrameWnd *pFrame = (CMDIFrameWnd*)AfxGetApp()->m_pMainWnd; - CMDIChildWnd *pChild = (CMDIChildWnd *) pFrame->GetActiveFrame(); - COCCDemoView *pView = (COCCDemoView *) pChild->GetActiveView(); - pView->FitAll(); -} diff --git a/samples/mfc/standard/10_Convert/src/WNT/OCCDemoDoc.h b/samples/mfc/standard/10_Convert/src/WNT/OCCDemoDoc.h deleted file mode 100755 index 0907c148c0..0000000000 --- a/samples/mfc/standard/10_Convert/src/WNT/OCCDemoDoc.h +++ /dev/null @@ -1,86 +0,0 @@ -// OCCDemoDoc.h : interface of the COCCDemoDoc class -// -///////////////////////////////////////////////////////////////////////////// - -#if !defined(AFX_OCCDEMODOC_H__57A6A22E_7B4F_11D5_BA4A_0060B0EE18EA__INCLUDED_) -#define AFX_OCCDEMODOC_H__57A6A22E_7B4F_11D5_BA4A_0060B0EE18EA__INCLUDED_ - -#if _MSC_VER > 1000 -#pragma once -#endif // _MSC_VER > 1000 - -#include -#include "ResultDialog.h" -class OCCDemo_Presentation; - -class COCCDemoDoc : public OCC_BaseDoc -{ -public: - CResultDialog* GetResultDialog () {return &myCResultDialog;} - Standard_CString GetDataDir() {return myDataDir;} - -protected: // create from serialization only - COCCDemoDoc(); - DECLARE_DYNCREATE(COCCDemoDoc) - -// Attributes -public: - BOOL& IsShowResult() {return myShowResult;} - -// Operations -public: - void Start(); - static void Fit(); - - -// Overrides - // ClassWizard generated virtual function overrides - //{{AFX_VIRTUAL(COCCDemoDoc) - public: - virtual BOOL OnNewDocument(); - virtual void Serialize(CArchive& ar); - //}}AFX_VIRTUAL - -// Implementation -public: - virtual ~COCCDemoDoc(); -#ifdef _DEBUG - virtual void AssertValid() const; - virtual void Dump(CDumpContext& dc) const; -#endif - -protected: - void InitViewButtons(); - void DoSample(); - -// Generated message map functions -protected: - //{{AFX_MSG(COCCDemoDoc) - afx_msg void OnBUTTONNext(); - afx_msg void OnBUTTONStart(); - afx_msg void OnBUTTONRepeat(); - afx_msg void OnBUTTONPrev(); - afx_msg void OnBUTTONEnd(); - afx_msg void OnUpdateBUTTONNext(CCmdUI* pCmdUI); - afx_msg void OnUpdateBUTTONPrev(CCmdUI* pCmdUI); - afx_msg void OnFileNew(); - afx_msg void OnBUTTONShowResult(); - afx_msg void OnUpdateBUTTONShowResult(CCmdUI* pCmdUI); - afx_msg void OnDumpView(); - //}}AFX_MSG - DECLARE_MESSAGE_MAP() - -private: - OCCDemo_Presentation *myPresentation; - CResultDialog myCResultDialog; - BOOL myShowResult; - char myDataDir[5]; // for "Data\0" - char myLastPath[MAX_PATH]; // directory of lastly saved file in DumpView() -}; - -///////////////////////////////////////////////////////////////////////////// - -//{{AFX_INSERT_LOCATION}} -// Microsoft Visual C++ will insert additional declarations immediately before the previous line. - -#endif // !defined(AFX_OCCDEMODOC_H__57A6A22E_7B4F_11D5_BA4A_0060B0EE18EA__INCLUDED_) diff --git a/samples/mfc/standard/10_Convert/src/WNT/OCCDemoView.cpp b/samples/mfc/standard/10_Convert/src/WNT/OCCDemoView.cpp deleted file mode 100755 index e16f537eba..0000000000 --- a/samples/mfc/standard/10_Convert/src/WNT/OCCDemoView.cpp +++ /dev/null @@ -1,552 +0,0 @@ -// OCCDemoView.cpp : implementation of the COCCDemoView class -// - -#include "stdafx.h" -#include "MainFrm.h" -#include "OCCDemo.h" -#include "OCCDemoDoc.h" -#include "OCCDemoView.h" - -#include -#include - -#define ValZWMin 1 - -#ifdef _DEBUG -#undef THIS_FILE -static char THIS_FILE[] = __FILE__; -#endif - -///////////////////////////////////////////////////////////////////////////// -// COCCDemoView - -IMPLEMENT_DYNCREATE(COCCDemoView, CView) - -BEGIN_MESSAGE_MAP(COCCDemoView, CView) - //{{AFX_MSG_MAP(COCCDemoView) - ON_COMMAND(ID_BUTTONAxo, OnBUTTONAxo) - ON_COMMAND(ID_BUTTONBack, OnBUTTONBack) - ON_COMMAND(ID_BUTTONBottom, OnBUTTONBottom) - ON_COMMAND(ID_BUTTONFront, OnBUTTONFront) - ON_COMMAND(ID_BUTTONHlrOn, OnBUTTONHlrOn) - ON_COMMAND(ID_BUTTONLeft, OnBUTTONLeft) - ON_COMMAND(ID_BUTTONPan, OnBUTTONPan) - ON_COMMAND(ID_BUTTONPanGlo, OnBUTTONPanGlo) - ON_COMMAND(ID_BUTTONReset, OnBUTTONReset) - ON_COMMAND(ID_BUTTONRight, OnBUTTONRight) - ON_COMMAND(ID_BUTTONRot, OnBUTTONRot) - ON_COMMAND(ID_BUTTONTop, OnBUTTONTop) - ON_COMMAND(ID_BUTTONZoomAll, OnBUTTONZoomAll) - ON_WM_SIZE() - ON_COMMAND(ID_BUTTONZoomProg, OnBUTTONZoomProg) - ON_COMMAND(ID_BUTTONZoomWin, OnBUTTONZoomWin) - ON_WM_LBUTTONDOWN() - ON_WM_LBUTTONUP() - ON_WM_MOUSEMOVE() - ON_WM_RBUTTONDOWN() - ON_WM_RBUTTONUP() - ON_UPDATE_COMMAND_UI(ID_BUTTONPanGlo, OnUpdateBUTTONPanGlo) - ON_UPDATE_COMMAND_UI(ID_BUTTONPan, OnUpdateBUTTONPan) - ON_UPDATE_COMMAND_UI(ID_BUTTONZoomProg, OnUpdateBUTTONZoomProg) - ON_UPDATE_COMMAND_UI(ID_BUTTONZoomWin, OnUpdateBUTTONZoomWin) - ON_UPDATE_COMMAND_UI(ID_BUTTONRot, OnUpdateBUTTONRot) - ON_COMMAND(ID_BUTTONWire, OnBUTTONWire) - ON_COMMAND(ID_BUTTONShade, OnBUTTONShade) - ON_UPDATE_COMMAND_UI(ID_BUTTONHlrOn, OnUpdateBUTTONHlrOn) - ON_UPDATE_COMMAND_UI(ID_BUTTONShade, OnUpdateBUTTONShade) - ON_UPDATE_COMMAND_UI(ID_BUTTONWire, OnUpdateBUTTONWire) - //}}AFX_MSG_MAP -END_MESSAGE_MAP() - -///////////////////////////////////////////////////////////////////////////// -// COCCDemoView construction/destruction - -COCCDemoView::COCCDemoView() -{ - myXmin=0; - myYmin=0; - myXmax=0; - myYmax=0; - myCurZoom=0; - myCurrentMode = CurAction3d_Nothing; - myVisMode = VIS_SHADE; - myRect = new AIS_RubberBand (Quantity_NOC_WHITE, Aspect_TOL_SOLID, 1.0); - myGraphicDriver = ((COCCDemoApp*)AfxGetApp())->GetGraphicDriver(); -} - -COCCDemoView::~COCCDemoView() -{ - if (!myView.IsNull()) - myView->Remove(); -} - -BOOL COCCDemoView::PreCreateWindow(CREATESTRUCT& cs) -{ - // TODO: Modify the Window class or styles here by modifying - // the CREATESTRUCT cs - cs.lpszClass = ::AfxRegisterWndClass(CS_HREDRAW | CS_VREDRAW | CS_DBLCLKS | CS_OWNDC, ::LoadCursor(NULL, IDC_ARROW), NULL, NULL); - return CView::PreCreateWindow(cs); -} - -///////////////////////////////////////////////////////////////////////////// -// COCCDemoView drawing - -void COCCDemoView::OnInitialUpdate() -{ - CView::OnInitialUpdate(); - - myView = GetDocument()->GetViewer()->CreateView(); - myView->SetViewMappingDefault(); - myView->SetViewOrientationDefault(); - - Handle(WNT_Window) aWNTWindow = new WNT_Window(GetSafeHwnd ()); - myView->SetWindow(aWNTWindow); - if (!aWNTWindow->IsMapped()) aWNTWindow->Map(); - - myCurrentMode = CurAction3d_Nothing; - myVisMode = VIS_SHADE; - RedrawVisMode(); -} - -void COCCDemoView::OnDraw(CDC* /*pDC*/) -{ - COCCDemoDoc* pDoc = GetDocument(); - ASSERT_VALID(pDoc); - // TODO: add draw code for native data here - myView->Redraw(); -} - -///////////////////////////////////////////////////////////////////////////// -// COCCDemoView diagnostics - -#ifdef _DEBUG -void COCCDemoView::AssertValid() const -{ - CView::AssertValid(); -} - -void COCCDemoView::Dump(CDumpContext& dc) const -{ - CView::Dump(dc); -} - -COCCDemoDoc* COCCDemoView::GetDocument() // non-debug version is inline -{ - ASSERT(m_pDocument->IsKindOf(RUNTIME_CLASS(COCCDemoDoc))); - return (COCCDemoDoc*)m_pDocument; -} -#endif //_DEBUG - -///////////////////////////////////////////////////////////////////////////// -// COCCDemoView message handlers - -void COCCDemoView::OnSize(UINT nType, int cx, int cy) -{ - CView::OnSize (nType, cx, cy); - if (!myView.IsNull()) - myView->MustBeResized(); -} - -void COCCDemoView::OnBUTTONBack() -{ - myView->SetProj(V3d_Ypos); -} - -void COCCDemoView::OnBUTTONFront() -{ - myView->SetProj(V3d_Yneg); -} - -void COCCDemoView::OnBUTTONBottom() -{ - myView->SetProj(V3d_Zneg); -} - -void COCCDemoView::OnBUTTONTop() -{ - myView->SetProj(V3d_Zpos); -} - -void COCCDemoView::OnBUTTONLeft() -{ - myView->SetProj(V3d_Xneg); -} - -void COCCDemoView::OnBUTTONRight() -{ - myView->SetProj(V3d_Xpos); -} - -void COCCDemoView::OnBUTTONAxo() -{ - myView->SetProj(V3d_XposYnegZpos); -} - -void COCCDemoView::OnBUTTONPan() -{ - myCurrentMode = CurAction3d_DynamicPanning; -} - -void COCCDemoView::OnBUTTONPanGlo() -{ - // save the current zoom value - myCurZoom = myView->Scale(); - // Do a Global Zoom - myView->FitAll(); - // Set the mode - myCurrentMode = CurAction3d_GlobalPanning; -} - -void COCCDemoView::OnBUTTONReset() -{ - myView->Reset(); -} - -void COCCDemoView::OnBUTTONRot() -{ - myCurrentMode = CurAction3d_DynamicRotation; -} - -void COCCDemoView::OnBUTTONZoomAll() -{ - myView->FitAll(); - myView->ZFitAll(); -} - -void COCCDemoView::OnBUTTONZoomProg() -{ - myCurrentMode = CurAction3d_DynamicZooming; -} - -void COCCDemoView::OnBUTTONZoomWin() -{ - myCurrentMode = CurAction3d_WindowZooming; -} - -void COCCDemoView::OnLButtonDown(UINT nFlags, CPoint point) -{ - // save the current mouse coordinate in min - myXmin=point.x; myYmin=point.y; - myXmax=point.x; myYmax=point.y; - - if ( ! (nFlags & MK_CONTROL) ) - { - if (myCurrentMode == CurAction3d_DynamicRotation) - { - myView->SetComputedMode(Standard_False); - myView->StartRotation(point.x,point.y); - } - } -} - -void COCCDemoView::OnLButtonUp(UINT nFlags, CPoint point) -{ - if ( !(nFlags & MK_CONTROL) ) - { - switch (myCurrentMode) - { - case CurAction3d_Nothing : - myXmax=point.x; - myYmax=point.y; - break; - case CurAction3d_DynamicZooming : - myCurrentMode = CurAction3d_Nothing; - break; - case CurAction3d_WindowZooming : - DrawRectangle(myXmin,myYmin,myXmax,myYmax,Standard_False); - myXmax=point.x; - myYmax=point.y; - if ((abs(myXmin-myXmax)>ValZWMin) || (abs(myYmin-myYmax)>ValZWMin)) - // Test if the zoom window is greater than a minimale window. - { - // Do the zoom window between Pmin and Pmax - myView->WindowFitAll(myXmin,myYmin,myXmax,myYmax); - } - myCurrentMode = CurAction3d_Nothing; - break; - case CurAction3d_DynamicPanning : - myCurrentMode = CurAction3d_Nothing; - break; - case CurAction3d_GlobalPanning : - myView->Place(point.x,point.y,myCurZoom); - myCurrentMode = CurAction3d_Nothing; - break; - case CurAction3d_DynamicRotation : - if (myVisMode == VIS_HLR) - { - SetCursor(AfxGetApp()->LoadStandardCursor(IDC_WAIT)); - myView->SetComputedMode(Standard_True); - myView->Redraw(); - SetCursor(AfxGetApp()->LoadStandardCursor(IDC_ARROW)); - } - myCurrentMode = CurAction3d_Nothing; - break; - } //switch (myCurrentMode) - } -} - -void COCCDemoView::OnRButtonDown(UINT nFlags, CPoint point) -{ - if ( nFlags & MK_CONTROL ) - { - myView->SetComputedMode(Standard_False); - myView->StartRotation(point.x,point.y); - } -} - -void COCCDemoView::OnRButtonUp(UINT /*nFlags*/, CPoint /*point*/) -{ - if (myVisMode == VIS_HLR) - { - SetCursor(AfxGetApp()->LoadStandardCursor(IDC_WAIT)); - myView->SetComputedMode(Standard_True); - myView->Redraw(); - SetCursor(AfxGetApp()->LoadStandardCursor(IDC_ARROW)); - } -} - -void COCCDemoView::OnMouseMove(UINT nFlags, CPoint point) -{ - // ============================ LEFT BUTTON ======================= - if ( nFlags & MK_LBUTTON) - { - if ( nFlags & MK_CONTROL ) - { - // move with MB1 and Control : on the dynamic zooming - // Do the zoom in function of mouse's coordinates - myView->Zoom(myXmax,myYmax,point.x,point.y); - // save the current mouse coordinate in max - myXmax = point.x; - myYmax = point.y; - } - else // if ( Ctrl ) - { - switch (myCurrentMode) - { - case CurAction3d_Nothing : - myXmax = point.x; - myYmax = point.y; - break; - case CurAction3d_DynamicZooming : - myView->Zoom(myXmax,myYmax,point.x,point.y); - // save the current mouse coordinate in max; - myXmax=point.x; - myYmax=point.y; - break; - case CurAction3d_WindowZooming : - myXmax = point.x; myYmax = point.y; - DrawRectangle (myXmin, myYmin, myXmax, myYmax, Standard_True, Aspect_TOL_DASH); - break; - case CurAction3d_DynamicPanning : - myView->Pan(point.x-myXmax,myYmax-point.y); // Realize the panning - myXmax = point.x; myYmax = point.y; - break; - case CurAction3d_GlobalPanning : // nothing - break; - case CurAction3d_DynamicRotation : - myView->Rotation(point.x,point.y); - myView->Redraw(); - break; - } - } - } - // ============================ MIDDLE BUTTON ======================= - else if ( nFlags & MK_MBUTTON) - { - if ( nFlags & MK_CONTROL ) - { - myView->Pan(point.x-myXmax,myYmax-point.y); // Realize the panning - myXmax = point.x; myYmax = point.y; - } - } - // ============================ RIGHT BUTTON ======================= - else if ( nFlags & MK_RBUTTON) - { - if ( nFlags & MK_CONTROL ) - { - myView->Rotation(point.x,point.y); - } - } - // ============================ NO BUTTON ======================= - else - { - myXmax = point.x; - myYmax = point.y; - } -} - -void COCCDemoView::OnUpdateBUTTONPanGlo(CCmdUI* pCmdUI) -{ - pCmdUI->SetCheck (myCurrentMode == CurAction3d_GlobalPanning); - pCmdUI->Enable (myCurrentMode != CurAction3d_GlobalPanning); -} - -void COCCDemoView::OnUpdateBUTTONPan(CCmdUI* pCmdUI) -{ - pCmdUI->SetCheck (myCurrentMode == CurAction3d_DynamicPanning); - pCmdUI->Enable (myCurrentMode != CurAction3d_DynamicPanning ); -} - -void COCCDemoView::OnUpdateBUTTONZoomProg(CCmdUI* pCmdUI) -{ - pCmdUI->SetCheck (myCurrentMode == CurAction3d_DynamicZooming ); - pCmdUI->Enable (myCurrentMode != CurAction3d_DynamicZooming); -} - -void COCCDemoView::OnUpdateBUTTONZoomWin(CCmdUI* pCmdUI) -{ - pCmdUI->SetCheck (myCurrentMode == CurAction3d_WindowZooming); - pCmdUI->Enable (myCurrentMode != CurAction3d_WindowZooming); -} - -void COCCDemoView::OnUpdateBUTTONRot(CCmdUI* pCmdUI) -{ - pCmdUI->SetCheck (myCurrentMode == CurAction3d_DynamicRotation); - pCmdUI->Enable (myCurrentMode != CurAction3d_DynamicRotation); -} - -void COCCDemoView::DrawRectangle (Standard_Integer theMinX, - Standard_Integer theMinY, - Standard_Integer theMaxX, - Standard_Integer theMaxY, - Standard_Boolean theToDraw, - Aspect_TypeOfLine theLineType) -{ - const Handle(AIS_InteractiveContext)& aCtx = GetDocument()->GetAISContext(); - if (!theToDraw) - { - aCtx->Remove (myRect, false); - aCtx->CurrentViewer()->RedrawImmediate(); - return; - } - - CRect aRect; - GetWindowRect (aRect); - myRect->SetLineType (theLineType); - myRect->SetRectangle (theMinX, aRect.Height() - theMinY, theMaxX, aRect.Height() - theMaxY); - if (!aCtx->IsDisplayed (myRect)) - { - aCtx->Display (myRect, false); - } - else - { - aCtx->Redisplay (myRect, false); - } - aCtx->CurrentViewer()->RedrawImmediate(); -} - -void COCCDemoView::InitButtons() -{ - myXmin=0; - myYmin=0; - myXmax=0; - myYmax=0; - myCurZoom=0; - myCurrentMode = CurAction3d_Nothing; -} - -void COCCDemoView::Reset() -{ - InitButtons(); - myVisMode = VIS_SHADE; - if (!myView.IsNull()) - { - RedrawVisMode(); - myView->Reset(); - } -} - -void COCCDemoView::RedrawVisMode() -{ - switch (myVisMode) - { - case VIS_WIREFRAME: - GetDocument()->GetAISContext()->SetDisplayMode (AIS_WireFrame, Standard_True); - myView->SetComputedMode (Standard_False); - myView->Redraw(); - break; - case VIS_SHADE: - GetDocument()->GetAISContext()->SetDisplayMode (AIS_Shaded, Standard_True); - myView->SetComputedMode (Standard_False); - myView->Redraw(); - break; - case VIS_HLR: - SetCursor(AfxGetApp()->LoadStandardCursor(IDC_WAIT)); - myView->SetComputedMode (Standard_True); - myView->Redraw(); - SetCursor(AfxGetApp()->LoadStandardCursor(IDC_ARROW)); - GetDocument()->GetAISContext()->SetDisplayMode (AIS_WireFrame, Standard_True); - break; - } -} - -void COCCDemoView::OnBUTTONWire() -{ - myVisMode = VIS_WIREFRAME; - RedrawVisMode(); -} - -void COCCDemoView::OnBUTTONShade() -{ - myVisMode = VIS_SHADE; - RedrawVisMode(); -} - -void COCCDemoView::OnBUTTONHlrOn() -{ - myVisMode = VIS_HLR; - RedrawVisMode(); -} - -void COCCDemoView::OnUpdateBUTTONWire(CCmdUI* pCmdUI) -{ - pCmdUI->SetCheck (myVisMode == VIS_WIREFRAME); - pCmdUI->Enable (myVisMode != VIS_WIREFRAME); -} - -void COCCDemoView::OnUpdateBUTTONShade(CCmdUI* pCmdUI) -{ - pCmdUI->SetCheck (myVisMode == VIS_SHADE); - pCmdUI->Enable (myVisMode != VIS_SHADE); -} - -void COCCDemoView::OnUpdateBUTTONHlrOn(CCmdUI* pCmdUI) -{ - pCmdUI->SetCheck (myVisMode == VIS_HLR); - pCmdUI->Enable (myVisMode != VIS_HLR); -} - -void COCCDemoView::GetViewAt (Standard_Real& theX, Standard_Real& theY, Standard_Real& theZ) const -{ - myView->At (theX, theY, theZ); -} - -void COCCDemoView::SetViewAt (const Standard_Real theX, const Standard_Real theY, const Standard_Real theZ) -{ - myView->SetAt (theX, theY, theZ); -} - -void COCCDemoView::GetViewEye(Standard_Real& X, Standard_Real& Y, Standard_Real& Z) -{ - myView->Eye(X,Y,Z); -} - -void COCCDemoView::SetViewEye(Standard_Real X, Standard_Real Y, Standard_Real Z) -{ - myView->SetEye(X,Y,Z); -} - -Standard_Real COCCDemoView::GetViewScale() -{ - return myView->Scale(); -} - -void COCCDemoView::SetViewScale(Standard_Real Coef) -{ - myView->SetScale(Coef); -} - -void COCCDemoView::Translate (const Standard_Real theX, const Standard_Real theY) -{ - myView->Panning (theX, theY); -} diff --git a/samples/mfc/standard/10_Convert/src/WNT/OCCDemoView.h b/samples/mfc/standard/10_Convert/src/WNT/OCCDemoView.h deleted file mode 100755 index d8379b6bb5..0000000000 --- a/samples/mfc/standard/10_Convert/src/WNT/OCCDemoView.h +++ /dev/null @@ -1,144 +0,0 @@ -// OCCDemoView.h : interface of the COCCDemoView class -// -///////////////////////////////////////////////////////////////////////////// - -#if !defined(AFX_OCCDEMOVIEW_H__57A6A230_7B4F_11D5_BA4A_0060B0EE18EA__INCLUDED_) -#define AFX_OCCDEMOVIEW_H__57A6A230_7B4F_11D5_BA4A_0060B0EE18EA__INCLUDED_ - -#if _MSC_VER > 1000 -#pragma once -#endif // _MSC_VER > 1000 - -enum View3D_CurrentAction { - CurAction3d_Nothing, - CurAction3d_DynamicZooming, - CurAction3d_WindowZooming, - CurAction3d_DynamicPanning, - CurAction3d_GlobalPanning, - CurAction3d_DynamicRotation -}; - -class AIS_RubberBand; - -class COCCDemoView : public CView -{ -protected: // create from serialization only - COCCDemoView(); - DECLARE_DYNCREATE(COCCDemoView) - -// Attributes -public: - COCCDemoDoc* GetDocument(); - void FitAll() - { - myView->FitAll(); - myView->ZFitAll(); - }; - void GetViewAt (Standard_Real& theX, Standard_Real& theY, Standard_Real& theZ) const; - void SetViewAt (const Standard_Real theX, const Standard_Real theY, const Standard_Real theZ); - void GetViewEye (Standard_Real& X, Standard_Real& Y, Standard_Real& Z); - void SetViewEye (const Standard_Real X,const Standard_Real Y,const Standard_Real Z); - Standard_Real GetViewScale(); - void SetViewScale(const Standard_Real Coef); - void Translate (const Standard_Real theX, const Standard_Real theY); - - -// Operations -public: - void InitButtons(); - void Reset(); - -// Overrides - // ClassWizard generated virtual function overrides - //{{AFX_VIRTUAL(COCCDemoView) - public: - virtual void OnDraw(CDC* pDC); // overridden to draw this view - virtual BOOL PreCreateWindow(CREATESTRUCT& cs); - virtual void OnInitialUpdate(); - protected: - //}}AFX_VIRTUAL - -// Implementation -public: - virtual ~COCCDemoView(); -#ifdef _DEBUG - virtual void AssertValid() const; - virtual void Dump(CDumpContext& dc) const; -#endif - -protected: - -// Generated message map functions -protected: - //{{AFX_MSG(COCCDemoView) - afx_msg void OnBUTTONAxo(); - afx_msg void OnBUTTONBack(); - afx_msg void OnBUTTONBottom(); - afx_msg void OnBUTTONFront(); - afx_msg void OnBUTTONHlrOn(); - afx_msg void OnBUTTONLeft(); - afx_msg void OnBUTTONPan(); - afx_msg void OnBUTTONPanGlo(); - afx_msg void OnBUTTONReset(); - afx_msg void OnBUTTONRight(); - afx_msg void OnBUTTONRot(); - afx_msg void OnBUTTONTop(); - afx_msg void OnBUTTONZoomAll(); - afx_msg void OnSize(UINT nType, int cx, int cy); - afx_msg void OnBUTTONZoomProg(); - afx_msg void OnBUTTONZoomWin(); - afx_msg void OnLButtonDown(UINT nFlags, CPoint point); - afx_msg void OnLButtonUp(UINT nFlags, CPoint point); - afx_msg void OnMouseMove(UINT nFlags, CPoint point); - afx_msg void OnRButtonDown(UINT nFlags, CPoint point); - afx_msg void OnRButtonUp(UINT nFlags, CPoint point); - afx_msg void OnUpdateBUTTONPanGlo(CCmdUI* pCmdUI); - afx_msg void OnUpdateBUTTONPan(CCmdUI* pCmdUI); - afx_msg void OnUpdateBUTTONZoomProg(CCmdUI* pCmdUI); - afx_msg void OnUpdateBUTTONZoomWin(CCmdUI* pCmdUI); - afx_msg void OnUpdateBUTTONRot(CCmdUI* pCmdUI); - afx_msg void OnBUTTONWire(); - afx_msg void OnBUTTONShade(); - afx_msg void OnUpdateBUTTONHlrOn(CCmdUI* pCmdUI); - afx_msg void OnUpdateBUTTONShade(CCmdUI* pCmdUI); - afx_msg void OnUpdateBUTTONWire(CCmdUI* pCmdUI); - //}}AFX_MSG - DECLARE_MESSAGE_MAP() - -private: - void RedrawVisMode(); - -private: - enum VisMode { VIS_WIREFRAME, VIS_SHADE, VIS_HLR }; - Handle(V3d_View) myView; - Handle(Graphic3d_GraphicDriver) myGraphicDriver; - View3D_CurrentAction myCurrentMode; - VisMode myVisMode; - Standard_Integer myXmin; - Standard_Integer myYmin; - Standard_Integer myXmax; - Standard_Integer myYmax; - Standard_Real myCurZoom; - -private: - Handle(AIS_RubberBand) myRect; //!< Rubber rectangle for selection - virtual void DrawRectangle (const Standard_Integer MinX , - const Standard_Integer MinY , - const Standard_Integer MaxX , - const Standard_Integer MaxY , - const Standard_Boolean Draw , - Aspect_TypeOfLine theLineType = Aspect_TOL_SOLID); - -}; - -#ifndef _DEBUG // debug version in OCCDemoView.cpp -inline COCCDemoDoc* COCCDemoView::GetDocument() - { return (COCCDemoDoc*)m_pDocument; } -#endif - -///////////////////////////////////////////////////////////////////////////// - -//{{AFX_INSERT_LOCATION}} -// Microsoft Visual C++ will insert additional declarations immediately before the previous line. - -#endif // !defined(AFX_OCCDEMOVIEW_H__57A6A230_7B4F_11D5_BA4A_0060B0EE18EA__INCLUDED_) diff --git a/samples/mfc/standard/10_Convert/src/WNT/ResultDialog.cpp b/samples/mfc/standard/10_Convert/src/WNT/ResultDialog.cpp deleted file mode 100755 index 90d6ab9421..0000000000 --- a/samples/mfc/standard/10_Convert/src/WNT/ResultDialog.cpp +++ /dev/null @@ -1,206 +0,0 @@ -// ResultDialog.cpp : implementation file -// - -#include "stdafx.h" -#include "OCCDemo.h" -#include "ResultDialog.h" -#include "MainFrm.h" -#include "OCCDemoDoc.h" - -#ifdef _DEBUG -#define new DEBUG_NEW -#undef THIS_FILE -static char THIS_FILE[] = __FILE__; -#endif - -// minimum distance between buttons, button and dialog border -#define d 5 - -///////////////////////////////////////////////////////////////////////////// -// CResultDialog dialog - - -CResultDialog::CResultDialog(CWnd* pParent /*=NULL*/) - : CDialog(CResultDialog::IDD, pParent) -{ - //{{AFX_DATA_INIT(CResultDialog) - // NOTE: the ClassWizard will add member initialization here - //}}AFX_DATA_INIT -} - -void CResultDialog::Empty() -{ - CRichEditCtrl *pEd = (CRichEditCtrl *) GetDlgItem (IDC_RICHEDIT_ResultDialog); - pEd->Clear(); -} - -void CResultDialog::SetText(LPCSTR aText) -{ - CRichEditCtrl *pEd = (CRichEditCtrl *) GetDlgItem (IDC_RICHEDIT_ResultDialog); - CString aCStr(aText); - pEd->SetWindowText(aCStr); -} - -void CResultDialog::SetTitle(LPCSTR aTitle) -{ - CString aCStr(aTitle); - SetWindowText(aCStr); -} - -void CResultDialog::DoDataExchange(CDataExchange* pDX) -{ - CDialog::DoDataExchange(pDX); - //{{AFX_DATA_MAP(CResultDialog) - // NOTE: the ClassWizard will add DDX and DDV calls here - //}}AFX_DATA_MAP -} - - -BEGIN_MESSAGE_MAP(CResultDialog, CDialog) - //{{AFX_MSG_MAP(CResultDialog) - ON_BN_CLICKED(IDC_CopySelectionToClipboard, OnCopySelectionToClipboard) - ON_BN_CLICKED(IDC_CopyAllToClipboard, OnCopyAllToClipboard) - ON_WM_SIZE() - //}}AFX_MSG_MAP -END_MESSAGE_MAP() - -///////////////////////////////////////////////////////////////////////////// -// CResultDialog message handlers - -void CResultDialog::OnCopySelectionToClipboard() -{ - CRichEditCtrl *pEd = (CRichEditCtrl *) GetDlgItem (IDC_RICHEDIT_ResultDialog); - pEd->Copy( ); -} - -void CResultDialog::OnCopyAllToClipboard() -{ - CRichEditCtrl *pEd = (CRichEditCtrl *) GetDlgItem (IDC_RICHEDIT_ResultDialog); - long nStartChar, nEndChar; - pEd->GetSel (nStartChar, nEndChar); - pEd->SetSel (0, -1); - pEd->Copy(); - pEd->SetSel (nStartChar, nEndChar); -} - -void CResultDialog::OnCancel() -{ - CMainFrame* cFrame = (CMainFrame*) AfxGetApp()->GetMainWnd(); - COCCDemoDoc* aDoc = (COCCDemoDoc*) cFrame->GetActiveDocument(); - aDoc->IsShowResult() = FALSE; - - CDialog::OnCancel(); -} - -void CResultDialog::Initialize() -{ - // Set Fixed Width Font for rich edit control - CRichEditCtrl *pEd = (CRichEditCtrl *) GetDlgItem (IDC_RICHEDIT_ResultDialog); - CFont aFixedWidthFont; - VERIFY(aFixedWidthFont.CreateFont( - 15, // nHeight - 5, // nWidth - 0, // nEscapement - 0, // nOrientation - FW_NORMAL, // nWeight - FALSE, // bItalic - FALSE, // bUnderline - 0, // cStrikeOut - ANSI_CHARSET, // nCharSet - OUT_DEFAULT_PRECIS, // nOutPrecision - CLIP_DEFAULT_PRECIS, // nClipPrecision - DEFAULT_QUALITY, // nQuality - FF_MODERN, // Fix width fonts are FF_MODERN - L"Courier New")); // lpszFacename - pEd->SetFont(&aFixedWidthFont, false); - - // save button's width and height, so they are calculated only once - RECT rect; - CWnd *pBCopy = (CWnd *) GetDlgItem (IDC_CopySelectionToClipboard); - pBCopy->GetWindowRect(&rect); - bw = rect.right - rect.left; // a button's width (they are all equal) - bh = rect.bottom - rect.top; // a button's height -} - - -// OnSize is a message handler of WM_SIZE message, -// it is reimplemented in order to reposition the buttons -// (keep them always in the bottom part of the dialog) -// and resize the rich edit controls as user resized THIS dialog. -void CResultDialog::OnSize(UINT nType, int cx, int cy) -{ - // call the base class handler - CDialog::OnSize(nType, cx, cy); - - //resizes internal GUI controls (rich edit control and 3 buttons) - //according to given values of this dialog width (cx) and height (cy). - //the method is called from OnSize message handler and - //from InitInstance of OCCDemo to do initial resize - CWnd *pEd = (CWnd *) GetDlgItem (IDC_RICHEDIT_ResultDialog); - CWnd *pBCopy = (CWnd *) GetDlgItem (IDC_CopySelectionToClipboard); - CWnd *pBCopyAll = (CWnd *) GetDlgItem (IDC_CopyAllToClipboard); - CWnd *pBClose = (CWnd *) GetDlgItem (IDCANCEL); - - if (pEd != NULL) // it is NULL when dialog is being created and OnSize is called - { - int butY = cy-bh-d; // y coordinate of buttons' top left corner - - pEd->SetWindowPos(&wndTop, 0, 0, cx, butY-4*d, SWP_NOMOVE); - pBCopy->SetWindowPos(&wndTop, d, butY, 0, 0, SWP_NOSIZE); - pBCopyAll->SetWindowPos(&wndTop, d+bw+d, butY, 0, 0, SWP_NOSIZE); - pBClose->SetWindowPos(&wndTop, cx-bw-d, butY, 0, 0, SWP_NOSIZE); - } - - RedrawWindow(); -} - -LRESULT CResultDialog::WindowProc(UINT message, WPARAM wParam, LPARAM lParam) -{ - if (message != WM_SIZING) - return CDialog::WindowProc(message, wParam, lParam); - - LPRECT pRect = (LPRECT) lParam; - int cx = pRect->right - pRect->left; - int cy = pRect->bottom - pRect->top; - - int minCx = 3*bw+5*d; - int minCy = 2*d+bh+200; - - if (cx < minCx || cy < minCy) - { - switch (wParam) - { - case WMSZ_BOTTOM: - pRect->bottom = pRect->top + minCy; - break; - case WMSZ_TOP: - pRect->top = pRect->bottom - minCy; - break; - case WMSZ_LEFT: - pRect->left = pRect->right - minCx; - break; - case WMSZ_RIGHT: - pRect->right = pRect->left + minCx; - break; - case WMSZ_TOPLEFT: - if (cx < minCx) pRect->left = pRect->right - minCx; - if (cy < minCy) pRect->top = pRect->bottom - minCy; - break; - case WMSZ_BOTTOMRIGHT: - if (cx < minCx) pRect->right = pRect->left + minCx; - if (cy < minCy) pRect->bottom = pRect->top + minCy; - break; - case WMSZ_TOPRIGHT: - if (cx < minCx) pRect->right = pRect->left + minCx; - if (cy < minCy) pRect->top = pRect->bottom - minCy; - break; - case WMSZ_BOTTOMLEFT: - if (cx < minCx) pRect->left = pRect->right - minCx; - if (cy < minCy) pRect->bottom = pRect->top + minCy; - break; - } - } - - return CDialog::WindowProc(message, wParam, lParam); -} - diff --git a/samples/mfc/standard/10_Convert/src/WNT/ResultDialog.h b/samples/mfc/standard/10_Convert/src/WNT/ResultDialog.h deleted file mode 100755 index 688fb14bb2..0000000000 --- a/samples/mfc/standard/10_Convert/src/WNT/ResultDialog.h +++ /dev/null @@ -1,67 +0,0 @@ -#if !defined(AFX_RESULTDIALOG_H__6597303D_7F5B_11D5_BA4D_0060B0EE18EA__INCLUDED_) -#define AFX_RESULTDIALOG_H__6597303D_7F5B_11D5_BA4D_0060B0EE18EA__INCLUDED_ - -#if _MSC_VER > 1000 -#pragma once -#endif // _MSC_VER > 1000 -// ResultDialog.h : header file -// - -#include "resource.h" -#include - -///////////////////////////////////////////////////////////////////////////// -// CResultDialog dialog - -class CResultDialog : public CDialog -{ -// Construction -public: - void Initialize(); - CResultDialog(CWnd* pParent = NULL); // standard constructor - void SetTitle(LPCSTR aTitle); - void SetText(LPCSTR aText); - void Empty(); - -// Dialog Data - //{{AFX_DATA(CResultDialog) - enum { IDD = IDD_ResultDialog }; - // NOTE: the ClassWizard will add data members here - //}}AFX_DATA - - -// Overrides - // ClassWizard generated virtual function overrides - //{{AFX_VIRTUAL(CResultDialog) - protected: - virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support - virtual LRESULT WindowProc(UINT message, WPARAM wParam, LPARAM lParam); - //}}AFX_VIRTUAL - -// Implementation -protected: - - // Generated message map functions - //{{AFX_MSG(CResultDialog) - afx_msg void OnCopySelectionToClipboard(); - afx_msg void OnCopyAllToClipboard(); - virtual void OnCancel(); - - // OnSize is a message handler of WM_SIZE message, - // it is reimplemented in order to reposition the buttons - // (keep them always in the bottom part of the dialog) - // and resize the rich edit controls as user resized THIS dialog. - afx_msg void OnSize(UINT nType, int cx, int cy); - //}}AFX_MSG - - DECLARE_MESSAGE_MAP() - -private: - int bw, bh; // button width and height - -}; - -//{{AFX_INSERT_LOCATION}} -// Microsoft Visual C++ will insert additional declarations immediately before the previous line. - -#endif // !defined(AFX_RESULTDIALOG_H__6597303D_7F5B_11D5_BA4D_0060B0EE18EA__INCLUDED_) diff --git a/samples/mfc/standard/10_Convert/src/WNT/StdAfx.cpp b/samples/mfc/standard/10_Convert/src/WNT/StdAfx.cpp deleted file mode 100755 index 24876baa40..0000000000 --- a/samples/mfc/standard/10_Convert/src/WNT/StdAfx.cpp +++ /dev/null @@ -1,6 +0,0 @@ -// stdafx.cpp : source file that includes just the standard includes -// OCCDemo.pch will be the pre-compiled header -// stdafx.obj will contain the pre-compiled type information - -#include "stdafx.h" - diff --git a/samples/mfc/standard/10_Convert/src/WNT/StdAfx.h b/samples/mfc/standard/10_Convert/src/WNT/StdAfx.h deleted file mode 100755 index 43eaa4062d..0000000000 --- a/samples/mfc/standard/10_Convert/src/WNT/StdAfx.h +++ /dev/null @@ -1,41 +0,0 @@ -// stdafx.h : include file for standard system include files, -// or project specific include files that are used frequently, but -// are changed infrequently -// - -#if !defined(AFX_STDAFX_H__57A6A22A_7B4F_11D5_BA4A_0060B0EE18EA__INCLUDED_) -#define AFX_STDAFX_H__57A6A22A_7B4F_11D5_BA4A_0060B0EE18EA__INCLUDED_ - -#if _MSC_VER > 1000 -#pragma once -#endif // _MSC_VER > 1000 - -#define VC_EXTRALEAN // Exclude rarely-used stuff from Windows headers - -#include // MFC core and standard components -#include // MFC extensions -//#include // MFC support for Internet Explorer 4 Common Controls -#ifndef _AFX_NO_AFXCMN_SUPPORT -#include // MFC support for Windows Common Controls -#endif // _AFX_NO_AFXCMN_SUPPORT - -#pragma warning( disable : 4244 ) // Issue warning 4244 -#include "Standard_ShortReal.hxx" -#pragma warning( default : 4244 ) // Issue warning 4244 - -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -//{{AFX_INSERT_LOCATION}} -// Microsoft Visual C++ will insert additional declarations immediately before the previous line. - -#endif // !defined(AFX_STDAFX_H__57A6A22A_7B4F_11D5_BA4A_0060B0EE18EA__INCLUDED_) diff --git a/samples/mfc/standard/10_Convert/src/WNT/res/OCCDemo.ico b/samples/mfc/standard/10_Convert/src/WNT/res/OCCDemo.ico deleted file mode 100755 index 99dbceb637ed9b2f5faa709d3ec109868688f6dc..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3774 zcmeH~v1=Sh6o;QUfkjp%2!Sdsv4$<8&U;hb3IqoA!p0!b7O_&zzn~_NBY~?00l{2j z6-kJTG%8Y^;P62TYig;9LO_K<97O5_F`9gD&T&E4$V`Q3Z-zIih%Rw5I8 z9z2lLe*RQsj=L}DDt$$tkSVSr?N5?<&!x?e$nEyXaOGC|{l4^n@5|}SpJZ}!Ql_S+ zWO{m9W@ct&Zf;KI=jX*3Ba4fRvbMG+tE;QBva%veOH0!JI?Ch6QNEW0iNhej9sDH+ zuU^U4^Iu40>5lH{VKlU87R{nr)#Av-p*wVk?$8~&hIw?4?iqM=kB*Um9?%1NKnUoO zabz4r%51q>@>?dd1X+oa(sQveSQsn}7KVfbgN4DuU}3N@Bup4A3>F3pgM}fX!(d^s zFjyEY3^t;{Vd1dK5o4+V3RXX!9_Z-0WLO-@9f=&1I#^N}_|b9WU~#advcTcsaBw&{ z92}`sa5xwo3=Re@orA-{;9v;kid<6($us&ePUY3=Kt*nkS1L8RJxrdYo&+8yPj1hT zo=H5pJ-O3%q}=G__vH8F*Ddno_teJ2;9>C8LAQ;nq}8Kfx#~7jgFwCjTYw{wFKw-I zP=f$RP!1NBwws^;OMoQ+5lEPh04#yPfKxySu<)fb4|@_|30jZDqNhQ30S$%-Lxds1 z5MhWgq~iobfFZ&VVF)lV4IO_NA`B6R2m@2o(P4-%L>M9fk^F(lB7qSn#~hBagCnN7 z)yK(#{3sh68?w2%DVgcZBRp7%_VD_>ZvtpL>JuUM^w#bX(S(x_Z)c)o2}C1*-hO=%4T_UXFN0TZ!x{}%7VWFw`i4--Ywj> z%HrnB?PXb>o1B2zo20;5@Yj}S<05)laxRKSQD}hq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!p|Jqmm_;hkhXJbeAICqS`$HBS~%*^odkp=SE zP<(t(7*!J%UX&NsP%2a^P`ag`RVc28AOmu{7%5O7Z#UDYgg=%IDT`$m=V7jDT7*_d z3bAzYoQq%6d^9^@j2z-c87qsIB&p1NLzx8~$Vw1m?>;`vAuWv)li>&Q3p0yX_(}en zIDtj3Xb%Q&bdZJOi{xdp zXT@ph_x6R53@at7ZNaTD7x^oyLX=4A!XadjUWy)m-~w#Zk4DTD|3HCvJVxzrAL5B3 z_TJ9MQWnkde*;JFVqhu#%ay&-`ZJ~d<<_-?qc68_|IC&x;poql_Lp1N|K9TDwr#0pf1U)o1e?JB zyc(Bk`Vu8jw&zQ1)l!@OYzdtG;m@vdslG2!0^k4rOKjCroBnJGDE`?MF4gx%O5mF1 I-~RUh1H>Jzy8r+H diff --git a/samples/mfc/standard/10_Convert/src/WNT/res/occlogo.bmp b/samples/mfc/standard/10_Convert/src/WNT/res/occlogo.bmp deleted file mode 100755 index bf12607e3c6931faf2b87f7c8acbeeb1e73c7611..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 9190 zcmd6s3s_Xu7RUcH1A+`XKxQf^2xtacT*Dq{W`&P5Z$c(%Nt&R6O4>C9#7rv8tEP#m zB$Q87(lW~o-;voSaS)LA01giC;WfOU=dOJQN$m=J_oB5v_L+V5T4$}_S$pk0XE@JK zFR+6sPZ$6rs24%anVJN~;`lLZV1f^4&lSz8hrfp&xm=y7~YcOxRFo^ZE-mcEl5W6p|8QVtB`hHjn<|%IAJVS zN;hG$>{V=>y&cgXd`~|7@R8*X1lg`feO*1WRoOUq_8gjOs_^PRBv|G?94GyOO|zv4 z@p8hFX%c*~*a)lV_DAIEr;!{z11h!))n(UlYP~UvzA->;+A18~6O8(rLR6F}(b8Ov z1G_yS2u)~fYeh=ham1X7#M~e$R_!)|>l_2T?q`c5KQBgF)@8i4;7u&@e+FY-lp^Sp z*Wfq-XliZ30A z!h;t-gL&i%Jd_X)$CSO8AGH;R^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p3eO!F(H8fV@O59{q-7h%r z%}A@=^Et)@0@mGWN2Afq)7#PLK79Q3veEV#{Tuu~oixoWJWrYzs`q(b2di$=H25}~ zjXlsqY;JCD@Z`juew({HO8DVJ6*_q~t@&?Q`+w#HSW~2zKFz*#Jdge=gb{66n;g@@ zqF`MFlDJ;^$cR|Y1dkw$vxT$@U!v4_yK^)y3lq9g9dreD)hTMHvvn=v`POuOTE)qR z4?ckP`Wz?S}w%n)W+u}Y3*smH6 zQ)4?B*mSPwn6GcCiR{b=EXvNQEKwGci@?e_LH7Iox8F4DI&}0Ngsc;yqIQmx)KD;1 zTZ01&LsRqO6eflupn0wk8dFEC6_`m}Z}t$-?&pB(`~B@6c0ncpRCYRfZLotl=!jf* za&}9};hhk^#P0~*8VIBuV_^e*)F)=3u$_?B5w?bvI%1UuiACjL64(2-o|zfz={Bex zz$EFI)C;UTg$US7tdodS)E#y_I5>_Ty7sCi!(j;IafKC7PB+vkuPVV-cc)kbMgtUs zs6%iu+9B31I(RsOm0PWO5&aL5vx)K3bvc&{Ug5x4S6+21w586l zsyD@&rHmbrj8yg@20?Y~aHQ5)`?O2$IM$u|oNTgBK22bi@nsvulHeHD2YBU+WtIvo6951J diff --git a/samples/mfc/standard/10_Convert/src/WNT/resource.h b/samples/mfc/standard/10_Convert/src/WNT/resource.h deleted file mode 100755 index 5a9e788ed4..0000000000 --- a/samples/mfc/standard/10_Convert/src/WNT/resource.h +++ /dev/null @@ -1,30 +0,0 @@ -//{{NO_DEPENDENCIES}} -// Microsoft Developer Studio generated include file. -// Used by OCCDemo.rc -// -#define IDD_ABOUTBOX 100 -#define IDR_MAINFRAME 128 -#define IDR_TOOLBAR1 130 -#define IDB_OCCLOGO 138 -#define IDB_OPENLOGO 142 -#define ID_BUTTONWire 50015 -#define ID_BUTTONShade 50016 -#define ID_BUTTONStart 50103 -#define ID_BUTTONNext 50104 -#define ID_BUTTONShowResult 50105 -#define ID_DUMP_VIEW 50106 -#define ID_BUTTONEnd 50107 -#define ID_BUTTONPrev 50109 -#define ID_BUTTONRepeat 50110 - -// Next default values for new objects -// -#ifdef APSTUDIO_INVOKED -#ifndef APSTUDIO_READONLY_SYMBOLS -#define _APS_3D_CONTROLS 1 -#define _APS_NEXT_RESOURCE_VALUE 143 -#define _APS_NEXT_COMMAND_VALUE 40111 -#define _APS_NEXT_CONTROL_VALUE 1007 -#define _APS_NEXT_SYMED_VALUE 101 -#endif -#endif diff --git a/samples/mfc/standard/All-vc10.sln b/samples/mfc/standard/All-vc10.sln index 74cead69d4..882e279641 100644 --- a/samples/mfc/standard/All-vc10.sln +++ b/samples/mfc/standard/All-vc10.sln @@ -4,24 +4,12 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Geometry", "01_Geometry\adm EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Modeling", "02_Modeling\adm\win\vc10\Modeling.vcxproj", "{B10FC678-B9AF-4B05-B3DC-8F790C610CC3}" EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Viewer2d", "03_Viewer2d\adm\win\vc10\Viewer2d.vcxproj", "{6B905DC2-4E72-4EDA-99C2-7473634690FE}" +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ImportExport", "03_ImportExport\adm\win\vc10\ImportExport.vcxproj", "{1C9A05AE-AF5A-4ACE-9A72-83436D77504C}" EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Viewer3d", "04_Viewer3d\adm\win\vc10\Viewer3d.vcxproj", "{949DFBDF-9007-4C88-8925-43209C36A5D6}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ImportExport", "05_ImportExport\adm\win\vc10\ImportExport.vcxproj", "{1C9A05AE-AF5A-4ACE-9A72-83436D77504C}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Ocaf", "06_Ocaf\adm\win\vc10\Ocaf.vcxproj", "{B3C10EF6-42C7-4DB8-A49C-7E38255D5B1B}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Triangulation", "07_Triangulation\adm\win\vc10\Triangulation.vcxproj", "{B50C10C8-5260-498B-A80F-48FFB4534360}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "HLR", "08_HLR\adm\win\vc10\HLR.vcxproj", "{76045260-8DA6-4A3E-B220-F5B1B4ADE192}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Animation", "09_Animation\adm\win\vc10\Animation.vcxproj", "{92492ACB-1F57-40BB-818F-33AD1C20273A}" +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "HLR", "04_HLR\adm\win\vc10\HLR.vcxproj", "{76045260-8DA6-4A3E-B220-F5B1B4ADE192}" EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mfcsample", "mfcsample\adm\win\vc10\mfcsample.vcxproj", "{2D6CBBE8-6965-4016-B503-0D715AE26691}" EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Convert", "10_Convert\adm\win\vc10\Convert.vcxproj", "{C527B648-F98D-42E5-9F59-251FD95D15A0}" -EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Win32 = Debug|Win32 @@ -46,22 +34,6 @@ Global {B10FC678-B9AF-4B05-B3DC-8F790C610CC3}.Release|Win32.Build.0 = Release|Win32 {B10FC678-B9AF-4B05-B3DC-8F790C610CC3}.Release|x64.ActiveCfg = Release|x64 {B10FC678-B9AF-4B05-B3DC-8F790C610CC3}.Release|x64.Build.0 = Release|x64 - {6B905DC2-4E72-4EDA-99C2-7473634690FE}.Debug|Win32.ActiveCfg = Debug|Win32 - {6B905DC2-4E72-4EDA-99C2-7473634690FE}.Debug|Win32.Build.0 = Debug|Win32 - {6B905DC2-4E72-4EDA-99C2-7473634690FE}.Debug|x64.ActiveCfg = Debug|x64 - {6B905DC2-4E72-4EDA-99C2-7473634690FE}.Debug|x64.Build.0 = Debug|x64 - {6B905DC2-4E72-4EDA-99C2-7473634690FE}.Release|Win32.ActiveCfg = Release|Win32 - {6B905DC2-4E72-4EDA-99C2-7473634690FE}.Release|Win32.Build.0 = Release|Win32 - {6B905DC2-4E72-4EDA-99C2-7473634690FE}.Release|x64.ActiveCfg = Release|x64 - {6B905DC2-4E72-4EDA-99C2-7473634690FE}.Release|x64.Build.0 = Release|x64 - {949DFBDF-9007-4C88-8925-43209C36A5D6}.Debug|Win32.ActiveCfg = Debug|Win32 - {949DFBDF-9007-4C88-8925-43209C36A5D6}.Debug|Win32.Build.0 = Debug|Win32 - {949DFBDF-9007-4C88-8925-43209C36A5D6}.Debug|x64.ActiveCfg = Debug|x64 - {949DFBDF-9007-4C88-8925-43209C36A5D6}.Debug|x64.Build.0 = Debug|x64 - {949DFBDF-9007-4C88-8925-43209C36A5D6}.Release|Win32.ActiveCfg = Release|Win32 - {949DFBDF-9007-4C88-8925-43209C36A5D6}.Release|Win32.Build.0 = Release|Win32 - {949DFBDF-9007-4C88-8925-43209C36A5D6}.Release|x64.ActiveCfg = Release|x64 - {949DFBDF-9007-4C88-8925-43209C36A5D6}.Release|x64.Build.0 = Release|x64 {1C9A05AE-AF5A-4ACE-9A72-83436D77504C}.Debug|Win32.ActiveCfg = Debug|Win32 {1C9A05AE-AF5A-4ACE-9A72-83436D77504C}.Debug|Win32.Build.0 = Debug|Win32 {1C9A05AE-AF5A-4ACE-9A72-83436D77504C}.Debug|x64.ActiveCfg = Debug|x64 @@ -70,22 +42,6 @@ Global {1C9A05AE-AF5A-4ACE-9A72-83436D77504C}.Release|Win32.Build.0 = Release|Win32 {1C9A05AE-AF5A-4ACE-9A72-83436D77504C}.Release|x64.ActiveCfg = Release|x64 {1C9A05AE-AF5A-4ACE-9A72-83436D77504C}.Release|x64.Build.0 = Release|x64 - {B3C10EF6-42C7-4DB8-A49C-7E38255D5B1B}.Debug|Win32.ActiveCfg = Debug|Win32 - {B3C10EF6-42C7-4DB8-A49C-7E38255D5B1B}.Debug|Win32.Build.0 = Debug|Win32 - {B3C10EF6-42C7-4DB8-A49C-7E38255D5B1B}.Debug|x64.ActiveCfg = Debug|x64 - {B3C10EF6-42C7-4DB8-A49C-7E38255D5B1B}.Debug|x64.Build.0 = Debug|x64 - {B3C10EF6-42C7-4DB8-A49C-7E38255D5B1B}.Release|Win32.ActiveCfg = Release|Win32 - {B3C10EF6-42C7-4DB8-A49C-7E38255D5B1B}.Release|Win32.Build.0 = Release|Win32 - {B3C10EF6-42C7-4DB8-A49C-7E38255D5B1B}.Release|x64.ActiveCfg = Release|x64 - {B3C10EF6-42C7-4DB8-A49C-7E38255D5B1B}.Release|x64.Build.0 = Release|x64 - {B50C10C8-5260-498B-A80F-48FFB4534360}.Debug|Win32.ActiveCfg = Debug|Win32 - {B50C10C8-5260-498B-A80F-48FFB4534360}.Debug|Win32.Build.0 = Debug|Win32 - {B50C10C8-5260-498B-A80F-48FFB4534360}.Debug|x64.ActiveCfg = Debug|x64 - {B50C10C8-5260-498B-A80F-48FFB4534360}.Debug|x64.Build.0 = Debug|x64 - {B50C10C8-5260-498B-A80F-48FFB4534360}.Release|Win32.ActiveCfg = Release|Win32 - {B50C10C8-5260-498B-A80F-48FFB4534360}.Release|Win32.Build.0 = Release|Win32 - {B50C10C8-5260-498B-A80F-48FFB4534360}.Release|x64.ActiveCfg = Release|x64 - {B50C10C8-5260-498B-A80F-48FFB4534360}.Release|x64.Build.0 = Release|x64 {76045260-8DA6-4A3E-B220-F5B1B4ADE192}.Debug|Win32.ActiveCfg = Debug|Win32 {76045260-8DA6-4A3E-B220-F5B1B4ADE192}.Debug|Win32.Build.0 = Debug|Win32 {76045260-8DA6-4A3E-B220-F5B1B4ADE192}.Debug|x64.ActiveCfg = Debug|x64 @@ -94,14 +50,6 @@ Global {76045260-8DA6-4A3E-B220-F5B1B4ADE192}.Release|Win32.Build.0 = Release|Win32 {76045260-8DA6-4A3E-B220-F5B1B4ADE192}.Release|x64.ActiveCfg = Release|x64 {76045260-8DA6-4A3E-B220-F5B1B4ADE192}.Release|x64.Build.0 = Release|x64 - {92492ACB-1F57-40BB-818F-33AD1C20273A}.Debug|Win32.ActiveCfg = Debug|Win32 - {92492ACB-1F57-40BB-818F-33AD1C20273A}.Debug|Win32.Build.0 = Debug|Win32 - {92492ACB-1F57-40BB-818F-33AD1C20273A}.Debug|x64.ActiveCfg = Debug|x64 - {92492ACB-1F57-40BB-818F-33AD1C20273A}.Debug|x64.Build.0 = Debug|x64 - {92492ACB-1F57-40BB-818F-33AD1C20273A}.Release|Win32.ActiveCfg = Release|Win32 - {92492ACB-1F57-40BB-818F-33AD1C20273A}.Release|Win32.Build.0 = Release|Win32 - {92492ACB-1F57-40BB-818F-33AD1C20273A}.Release|x64.ActiveCfg = Release|x64 - {92492ACB-1F57-40BB-818F-33AD1C20273A}.Release|x64.Build.0 = Release|x64 {2D6CBBE8-6965-4016-B503-0D715AE26691}.Debug|Win32.ActiveCfg = Debug|Win32 {2D6CBBE8-6965-4016-B503-0D715AE26691}.Debug|Win32.Build.0 = Debug|Win32 {2D6CBBE8-6965-4016-B503-0D715AE26691}.Debug|x64.ActiveCfg = Debug|x64 @@ -110,14 +58,6 @@ Global {2D6CBBE8-6965-4016-B503-0D715AE26691}.Release|Win32.Build.0 = Release|Win32 {2D6CBBE8-6965-4016-B503-0D715AE26691}.Release|x64.ActiveCfg = Release|x64 {2D6CBBE8-6965-4016-B503-0D715AE26691}.Release|x64.Build.0 = Release|x64 - {C527B648-F98D-42E5-9F59-251FD95D15A0}.Debug|Win32.ActiveCfg = Debug|Win32 - {C527B648-F98D-42E5-9F59-251FD95D15A0}.Debug|Win32.Build.0 = Debug|Win32 - {C527B648-F98D-42E5-9F59-251FD95D15A0}.Debug|x64.ActiveCfg = Debug|x64 - {C527B648-F98D-42E5-9F59-251FD95D15A0}.Debug|x64.Build.0 = Debug|x64 - {C527B648-F98D-42E5-9F59-251FD95D15A0}.Release|Win32.ActiveCfg = Release|Win32 - {C527B648-F98D-42E5-9F59-251FD95D15A0}.Release|Win32.Build.0 = Release|Win32 - {C527B648-F98D-42E5-9F59-251FD95D15A0}.Release|x64.ActiveCfg = Release|x64 - {C527B648-F98D-42E5-9F59-251FD95D15A0}.Release|x64.Build.0 = Release|x64 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/samples/mfc/standard/All-vc11.sln b/samples/mfc/standard/All-vc11.sln index 655e05c602..08aac37cc4 100644 --- a/samples/mfc/standard/All-vc11.sln +++ b/samples/mfc/standard/All-vc11.sln @@ -4,24 +4,12 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Geometry", "01_Geometry\adm EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Modeling", "02_Modeling\adm\win\vc10\Modeling.vcxproj", "{B10FC678-B9AF-4B05-B3DC-8F790C610CC3}" EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Viewer2d", "03_Viewer2d\adm\win\vc10\Viewer2d.vcxproj", "{6B905DC2-4E72-4EDA-99C2-7473634690FE}" +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ImportExport", "03_ImportExport\adm\win\vc10\ImportExport.vcxproj", "{1C9A05AE-AF5A-4ACE-9A72-83436D77504C}" EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Viewer3d", "04_Viewer3d\adm\win\vc10\Viewer3d.vcxproj", "{949DFBDF-9007-4C88-8925-43209C36A5D6}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ImportExport", "05_ImportExport\adm\win\vc10\ImportExport.vcxproj", "{1C9A05AE-AF5A-4ACE-9A72-83436D77504C}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Ocaf", "06_Ocaf\adm\win\vc10\Ocaf.vcxproj", "{B3C10EF6-42C7-4DB8-A49C-7E38255D5B1B}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Triangulation", "07_Triangulation\adm\win\vc10\Triangulation.vcxproj", "{B50C10C8-5260-498B-A80F-48FFB4534360}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "HLR", "08_HLR\adm\win\vc10\HLR.vcxproj", "{76045260-8DA6-4A3E-B220-F5B1B4ADE192}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Animation", "09_Animation\adm\win\vc10\Animation.vcxproj", "{92492ACB-1F57-40BB-818F-33AD1C20273A}" +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "HLR", "04_HLR\adm\win\vc10\HLR.vcxproj", "{76045260-8DA6-4A3E-B220-F5B1B4ADE192}" EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mfcsample", "mfcsample\adm\win\vc10\mfcsample.vcxproj", "{2D6CBBE8-6965-4016-B503-0D715AE26691}" EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Convert", "10_Convert\adm\win\vc10\Convert.vcxproj", "{C527B648-F98D-42E5-9F59-251FD95D15A0}" -EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Win32 = Debug|Win32 @@ -46,22 +34,6 @@ Global {B10FC678-B9AF-4B05-B3DC-8F790C610CC3}.Release|Win32.Build.0 = Release|Win32 {B10FC678-B9AF-4B05-B3DC-8F790C610CC3}.Release|x64.ActiveCfg = Release|x64 {B10FC678-B9AF-4B05-B3DC-8F790C610CC3}.Release|x64.Build.0 = Release|x64 - {6B905DC2-4E72-4EDA-99C2-7473634690FE}.Debug|Win32.ActiveCfg = Debug|Win32 - {6B905DC2-4E72-4EDA-99C2-7473634690FE}.Debug|Win32.Build.0 = Debug|Win32 - {6B905DC2-4E72-4EDA-99C2-7473634690FE}.Debug|x64.ActiveCfg = Debug|x64 - {6B905DC2-4E72-4EDA-99C2-7473634690FE}.Debug|x64.Build.0 = Debug|x64 - {6B905DC2-4E72-4EDA-99C2-7473634690FE}.Release|Win32.ActiveCfg = Release|Win32 - {6B905DC2-4E72-4EDA-99C2-7473634690FE}.Release|Win32.Build.0 = Release|Win32 - {6B905DC2-4E72-4EDA-99C2-7473634690FE}.Release|x64.ActiveCfg = Release|x64 - {6B905DC2-4E72-4EDA-99C2-7473634690FE}.Release|x64.Build.0 = Release|x64 - {949DFBDF-9007-4C88-8925-43209C36A5D6}.Debug|Win32.ActiveCfg = Debug|Win32 - {949DFBDF-9007-4C88-8925-43209C36A5D6}.Debug|Win32.Build.0 = Debug|Win32 - {949DFBDF-9007-4C88-8925-43209C36A5D6}.Debug|x64.ActiveCfg = Debug|x64 - {949DFBDF-9007-4C88-8925-43209C36A5D6}.Debug|x64.Build.0 = Debug|x64 - {949DFBDF-9007-4C88-8925-43209C36A5D6}.Release|Win32.ActiveCfg = Release|Win32 - {949DFBDF-9007-4C88-8925-43209C36A5D6}.Release|Win32.Build.0 = Release|Win32 - {949DFBDF-9007-4C88-8925-43209C36A5D6}.Release|x64.ActiveCfg = Release|x64 - {949DFBDF-9007-4C88-8925-43209C36A5D6}.Release|x64.Build.0 = Release|x64 {1C9A05AE-AF5A-4ACE-9A72-83436D77504C}.Debug|Win32.ActiveCfg = Debug|Win32 {1C9A05AE-AF5A-4ACE-9A72-83436D77504C}.Debug|Win32.Build.0 = Debug|Win32 {1C9A05AE-AF5A-4ACE-9A72-83436D77504C}.Debug|x64.ActiveCfg = Debug|x64 @@ -70,22 +42,6 @@ Global {1C9A05AE-AF5A-4ACE-9A72-83436D77504C}.Release|Win32.Build.0 = Release|Win32 {1C9A05AE-AF5A-4ACE-9A72-83436D77504C}.Release|x64.ActiveCfg = Release|x64 {1C9A05AE-AF5A-4ACE-9A72-83436D77504C}.Release|x64.Build.0 = Release|x64 - {B3C10EF6-42C7-4DB8-A49C-7E38255D5B1B}.Debug|Win32.ActiveCfg = Debug|Win32 - {B3C10EF6-42C7-4DB8-A49C-7E38255D5B1B}.Debug|Win32.Build.0 = Debug|Win32 - {B3C10EF6-42C7-4DB8-A49C-7E38255D5B1B}.Debug|x64.ActiveCfg = Debug|x64 - {B3C10EF6-42C7-4DB8-A49C-7E38255D5B1B}.Debug|x64.Build.0 = Debug|x64 - {B3C10EF6-42C7-4DB8-A49C-7E38255D5B1B}.Release|Win32.ActiveCfg = Release|Win32 - {B3C10EF6-42C7-4DB8-A49C-7E38255D5B1B}.Release|Win32.Build.0 = Release|Win32 - {B3C10EF6-42C7-4DB8-A49C-7E38255D5B1B}.Release|x64.ActiveCfg = Release|x64 - {B3C10EF6-42C7-4DB8-A49C-7E38255D5B1B}.Release|x64.Build.0 = Release|x64 - {B50C10C8-5260-498B-A80F-48FFB4534360}.Debug|Win32.ActiveCfg = Debug|Win32 - {B50C10C8-5260-498B-A80F-48FFB4534360}.Debug|Win32.Build.0 = Debug|Win32 - {B50C10C8-5260-498B-A80F-48FFB4534360}.Debug|x64.ActiveCfg = Debug|x64 - {B50C10C8-5260-498B-A80F-48FFB4534360}.Debug|x64.Build.0 = Debug|x64 - {B50C10C8-5260-498B-A80F-48FFB4534360}.Release|Win32.ActiveCfg = Release|Win32 - {B50C10C8-5260-498B-A80F-48FFB4534360}.Release|Win32.Build.0 = Release|Win32 - {B50C10C8-5260-498B-A80F-48FFB4534360}.Release|x64.ActiveCfg = Release|x64 - {B50C10C8-5260-498B-A80F-48FFB4534360}.Release|x64.Build.0 = Release|x64 {76045260-8DA6-4A3E-B220-F5B1B4ADE192}.Debug|Win32.ActiveCfg = Debug|Win32 {76045260-8DA6-4A3E-B220-F5B1B4ADE192}.Debug|Win32.Build.0 = Debug|Win32 {76045260-8DA6-4A3E-B220-F5B1B4ADE192}.Debug|x64.ActiveCfg = Debug|x64 @@ -94,14 +50,6 @@ Global {76045260-8DA6-4A3E-B220-F5B1B4ADE192}.Release|Win32.Build.0 = Release|Win32 {76045260-8DA6-4A3E-B220-F5B1B4ADE192}.Release|x64.ActiveCfg = Release|x64 {76045260-8DA6-4A3E-B220-F5B1B4ADE192}.Release|x64.Build.0 = Release|x64 - {92492ACB-1F57-40BB-818F-33AD1C20273A}.Debug|Win32.ActiveCfg = Debug|Win32 - {92492ACB-1F57-40BB-818F-33AD1C20273A}.Debug|Win32.Build.0 = Debug|Win32 - {92492ACB-1F57-40BB-818F-33AD1C20273A}.Debug|x64.ActiveCfg = Debug|x64 - {92492ACB-1F57-40BB-818F-33AD1C20273A}.Debug|x64.Build.0 = Debug|x64 - {92492ACB-1F57-40BB-818F-33AD1C20273A}.Release|Win32.ActiveCfg = Release|Win32 - {92492ACB-1F57-40BB-818F-33AD1C20273A}.Release|Win32.Build.0 = Release|Win32 - {92492ACB-1F57-40BB-818F-33AD1C20273A}.Release|x64.ActiveCfg = Release|x64 - {92492ACB-1F57-40BB-818F-33AD1C20273A}.Release|x64.Build.0 = Release|x64 {2D6CBBE8-6965-4016-B503-0D715AE26691}.Debug|Win32.ActiveCfg = Debug|Win32 {2D6CBBE8-6965-4016-B503-0D715AE26691}.Debug|Win32.Build.0 = Debug|Win32 {2D6CBBE8-6965-4016-B503-0D715AE26691}.Debug|x64.ActiveCfg = Debug|x64 @@ -110,14 +58,6 @@ Global {2D6CBBE8-6965-4016-B503-0D715AE26691}.Release|Win32.Build.0 = Release|Win32 {2D6CBBE8-6965-4016-B503-0D715AE26691}.Release|x64.ActiveCfg = Release|x64 {2D6CBBE8-6965-4016-B503-0D715AE26691}.Release|x64.Build.0 = Release|x64 - {C527B648-F98D-42E5-9F59-251FD95D15A0}.Debug|Win32.ActiveCfg = Debug|Win32 - {C527B648-F98D-42E5-9F59-251FD95D15A0}.Debug|Win32.Build.0 = Debug|Win32 - {C527B648-F98D-42E5-9F59-251FD95D15A0}.Debug|x64.ActiveCfg = Debug|x64 - {C527B648-F98D-42E5-9F59-251FD95D15A0}.Debug|x64.Build.0 = Debug|x64 - {C527B648-F98D-42E5-9F59-251FD95D15A0}.Release|Win32.ActiveCfg = Release|Win32 - {C527B648-F98D-42E5-9F59-251FD95D15A0}.Release|Win32.Build.0 = Release|Win32 - {C527B648-F98D-42E5-9F59-251FD95D15A0}.Release|x64.ActiveCfg = Release|x64 - {C527B648-F98D-42E5-9F59-251FD95D15A0}.Release|x64.Build.0 = Release|x64 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/samples/mfc/standard/All-vc12.sln b/samples/mfc/standard/All-vc12.sln index ab1f09712b..cc84cf8abb 100644 --- a/samples/mfc/standard/All-vc12.sln +++ b/samples/mfc/standard/All-vc12.sln @@ -4,24 +4,12 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Geometry", "01_Geometry\adm EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Modeling", "02_Modeling\adm\win\vc10\Modeling.vcxproj", "{B10FC678-B9AF-4B05-B3DC-8F790C610CC3}" EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Viewer2d", "03_Viewer2d\adm\win\vc10\Viewer2d.vcxproj", "{6B905DC2-4E72-4EDA-99C2-7473634690FE}" +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ImportExport", "03_ImportExport\adm\win\vc10\ImportExport.vcxproj", "{1C9A05AE-AF5A-4ACE-9A72-83436D77504C}" EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Viewer3d", "04_Viewer3d\adm\win\vc10\Viewer3d.vcxproj", "{949DFBDF-9007-4C88-8925-43209C36A5D6}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ImportExport", "05_ImportExport\adm\win\vc10\ImportExport.vcxproj", "{1C9A05AE-AF5A-4ACE-9A72-83436D77504C}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Ocaf", "06_Ocaf\adm\win\vc10\Ocaf.vcxproj", "{B3C10EF6-42C7-4DB8-A49C-7E38255D5B1B}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Triangulation", "07_Triangulation\adm\win\vc10\Triangulation.vcxproj", "{B50C10C8-5260-498B-A80F-48FFB4534360}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "HLR", "08_HLR\adm\win\vc10\HLR.vcxproj", "{76045260-8DA6-4A3E-B220-F5B1B4ADE192}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Animation", "09_Animation\adm\win\vc10\Animation.vcxproj", "{92492ACB-1F57-40BB-818F-33AD1C20273A}" +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "HLR", "04_HLR\adm\win\vc10\HLR.vcxproj", "{76045260-8DA6-4A3E-B220-F5B1B4ADE192}" EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mfcsample", "mfcsample\adm\win\vc10\mfcsample.vcxproj", "{2D6CBBE8-6965-4016-B503-0D715AE26691}" EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Convert", "10_Convert\adm\win\vc10\Convert.vcxproj", "{C527B648-F98D-42E5-9F59-251FD95D15A0}" -EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Win32 = Debug|Win32 @@ -46,22 +34,6 @@ Global {B10FC678-B9AF-4B05-B3DC-8F790C610CC3}.Release|Win32.Build.0 = Release|Win32 {B10FC678-B9AF-4B05-B3DC-8F790C610CC3}.Release|x64.ActiveCfg = Release|x64 {B10FC678-B9AF-4B05-B3DC-8F790C610CC3}.Release|x64.Build.0 = Release|x64 - {6B905DC2-4E72-4EDA-99C2-7473634690FE}.Debug|Win32.ActiveCfg = Debug|Win32 - {6B905DC2-4E72-4EDA-99C2-7473634690FE}.Debug|Win32.Build.0 = Debug|Win32 - {6B905DC2-4E72-4EDA-99C2-7473634690FE}.Debug|x64.ActiveCfg = Debug|x64 - {6B905DC2-4E72-4EDA-99C2-7473634690FE}.Debug|x64.Build.0 = Debug|x64 - {6B905DC2-4E72-4EDA-99C2-7473634690FE}.Release|Win32.ActiveCfg = Release|Win32 - {6B905DC2-4E72-4EDA-99C2-7473634690FE}.Release|Win32.Build.0 = Release|Win32 - {6B905DC2-4E72-4EDA-99C2-7473634690FE}.Release|x64.ActiveCfg = Release|x64 - {6B905DC2-4E72-4EDA-99C2-7473634690FE}.Release|x64.Build.0 = Release|x64 - {949DFBDF-9007-4C88-8925-43209C36A5D6}.Debug|Win32.ActiveCfg = Debug|Win32 - {949DFBDF-9007-4C88-8925-43209C36A5D6}.Debug|Win32.Build.0 = Debug|Win32 - {949DFBDF-9007-4C88-8925-43209C36A5D6}.Debug|x64.ActiveCfg = Debug|x64 - {949DFBDF-9007-4C88-8925-43209C36A5D6}.Debug|x64.Build.0 = Debug|x64 - {949DFBDF-9007-4C88-8925-43209C36A5D6}.Release|Win32.ActiveCfg = Release|Win32 - {949DFBDF-9007-4C88-8925-43209C36A5D6}.Release|Win32.Build.0 = Release|Win32 - {949DFBDF-9007-4C88-8925-43209C36A5D6}.Release|x64.ActiveCfg = Release|x64 - {949DFBDF-9007-4C88-8925-43209C36A5D6}.Release|x64.Build.0 = Release|x64 {1C9A05AE-AF5A-4ACE-9A72-83436D77504C}.Debug|Win32.ActiveCfg = Debug|Win32 {1C9A05AE-AF5A-4ACE-9A72-83436D77504C}.Debug|Win32.Build.0 = Debug|Win32 {1C9A05AE-AF5A-4ACE-9A72-83436D77504C}.Debug|x64.ActiveCfg = Debug|x64 @@ -70,22 +42,6 @@ Global {1C9A05AE-AF5A-4ACE-9A72-83436D77504C}.Release|Win32.Build.0 = Release|Win32 {1C9A05AE-AF5A-4ACE-9A72-83436D77504C}.Release|x64.ActiveCfg = Release|x64 {1C9A05AE-AF5A-4ACE-9A72-83436D77504C}.Release|x64.Build.0 = Release|x64 - {B3C10EF6-42C7-4DB8-A49C-7E38255D5B1B}.Debug|Win32.ActiveCfg = Debug|Win32 - {B3C10EF6-42C7-4DB8-A49C-7E38255D5B1B}.Debug|Win32.Build.0 = Debug|Win32 - {B3C10EF6-42C7-4DB8-A49C-7E38255D5B1B}.Debug|x64.ActiveCfg = Debug|x64 - {B3C10EF6-42C7-4DB8-A49C-7E38255D5B1B}.Debug|x64.Build.0 = Debug|x64 - {B3C10EF6-42C7-4DB8-A49C-7E38255D5B1B}.Release|Win32.ActiveCfg = Release|Win32 - {B3C10EF6-42C7-4DB8-A49C-7E38255D5B1B}.Release|Win32.Build.0 = Release|Win32 - {B3C10EF6-42C7-4DB8-A49C-7E38255D5B1B}.Release|x64.ActiveCfg = Release|x64 - {B3C10EF6-42C7-4DB8-A49C-7E38255D5B1B}.Release|x64.Build.0 = Release|x64 - {B50C10C8-5260-498B-A80F-48FFB4534360}.Debug|Win32.ActiveCfg = Debug|Win32 - {B50C10C8-5260-498B-A80F-48FFB4534360}.Debug|Win32.Build.0 = Debug|Win32 - {B50C10C8-5260-498B-A80F-48FFB4534360}.Debug|x64.ActiveCfg = Debug|x64 - {B50C10C8-5260-498B-A80F-48FFB4534360}.Debug|x64.Build.0 = Debug|x64 - {B50C10C8-5260-498B-A80F-48FFB4534360}.Release|Win32.ActiveCfg = Release|Win32 - {B50C10C8-5260-498B-A80F-48FFB4534360}.Release|Win32.Build.0 = Release|Win32 - {B50C10C8-5260-498B-A80F-48FFB4534360}.Release|x64.ActiveCfg = Release|x64 - {B50C10C8-5260-498B-A80F-48FFB4534360}.Release|x64.Build.0 = Release|x64 {76045260-8DA6-4A3E-B220-F5B1B4ADE192}.Debug|Win32.ActiveCfg = Debug|Win32 {76045260-8DA6-4A3E-B220-F5B1B4ADE192}.Debug|Win32.Build.0 = Debug|Win32 {76045260-8DA6-4A3E-B220-F5B1B4ADE192}.Debug|x64.ActiveCfg = Debug|x64 @@ -94,14 +50,6 @@ Global {76045260-8DA6-4A3E-B220-F5B1B4ADE192}.Release|Win32.Build.0 = Release|Win32 {76045260-8DA6-4A3E-B220-F5B1B4ADE192}.Release|x64.ActiveCfg = Release|x64 {76045260-8DA6-4A3E-B220-F5B1B4ADE192}.Release|x64.Build.0 = Release|x64 - {92492ACB-1F57-40BB-818F-33AD1C20273A}.Debug|Win32.ActiveCfg = Debug|Win32 - {92492ACB-1F57-40BB-818F-33AD1C20273A}.Debug|Win32.Build.0 = Debug|Win32 - {92492ACB-1F57-40BB-818F-33AD1C20273A}.Debug|x64.ActiveCfg = Debug|x64 - {92492ACB-1F57-40BB-818F-33AD1C20273A}.Debug|x64.Build.0 = Debug|x64 - {92492ACB-1F57-40BB-818F-33AD1C20273A}.Release|Win32.ActiveCfg = Release|Win32 - {92492ACB-1F57-40BB-818F-33AD1C20273A}.Release|Win32.Build.0 = Release|Win32 - {92492ACB-1F57-40BB-818F-33AD1C20273A}.Release|x64.ActiveCfg = Release|x64 - {92492ACB-1F57-40BB-818F-33AD1C20273A}.Release|x64.Build.0 = Release|x64 {2D6CBBE8-6965-4016-B503-0D715AE26691}.Debug|Win32.ActiveCfg = Debug|Win32 {2D6CBBE8-6965-4016-B503-0D715AE26691}.Debug|Win32.Build.0 = Debug|Win32 {2D6CBBE8-6965-4016-B503-0D715AE26691}.Debug|x64.ActiveCfg = Debug|x64 @@ -110,14 +58,6 @@ Global {2D6CBBE8-6965-4016-B503-0D715AE26691}.Release|Win32.Build.0 = Release|Win32 {2D6CBBE8-6965-4016-B503-0D715AE26691}.Release|x64.ActiveCfg = Release|x64 {2D6CBBE8-6965-4016-B503-0D715AE26691}.Release|x64.Build.0 = Release|x64 - {C527B648-F98D-42E5-9F59-251FD95D15A0}.Debug|Win32.ActiveCfg = Debug|Win32 - {C527B648-F98D-42E5-9F59-251FD95D15A0}.Debug|Win32.Build.0 = Debug|Win32 - {C527B648-F98D-42E5-9F59-251FD95D15A0}.Debug|x64.ActiveCfg = Debug|x64 - {C527B648-F98D-42E5-9F59-251FD95D15A0}.Debug|x64.Build.0 = Debug|x64 - {C527B648-F98D-42E5-9F59-251FD95D15A0}.Release|Win32.ActiveCfg = Release|Win32 - {C527B648-F98D-42E5-9F59-251FD95D15A0}.Release|Win32.Build.0 = Release|Win32 - {C527B648-F98D-42E5-9F59-251FD95D15A0}.Release|x64.ActiveCfg = Release|x64 - {C527B648-F98D-42E5-9F59-251FD95D15A0}.Release|x64.Build.0 = Release|x64 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/samples/mfc/standard/All-vc14.sln b/samples/mfc/standard/All-vc14.sln index 60d3c7cf26..40128526cc 100644 --- a/samples/mfc/standard/All-vc14.sln +++ b/samples/mfc/standard/All-vc14.sln @@ -4,24 +4,12 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Geometry", "01_Geometry\adm EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Modeling", "02_Modeling\adm\win\vc10\Modeling.vcxproj", "{B10FC678-B9AF-4B05-B3DC-8F790C610CC3}" EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Viewer2d", "03_Viewer2d\adm\win\vc10\Viewer2d.vcxproj", "{6B905DC2-4E72-4EDA-99C2-7473634690FE}" +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ImportExport", "03_ImportExport\adm\win\vc10\ImportExport.vcxproj", "{1C9A05AE-AF5A-4ACE-9A72-83436D77504C}" EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Viewer3d", "04_Viewer3d\adm\win\vc10\Viewer3d.vcxproj", "{949DFBDF-9007-4C88-8925-43209C36A5D6}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ImportExport", "05_ImportExport\adm\win\vc10\ImportExport.vcxproj", "{1C9A05AE-AF5A-4ACE-9A72-83436D77504C}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Ocaf", "06_Ocaf\adm\win\vc10\Ocaf.vcxproj", "{B3C10EF6-42C7-4DB8-A49C-7E38255D5B1B}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Triangulation", "07_Triangulation\adm\win\vc10\Triangulation.vcxproj", "{B50C10C8-5260-498B-A80F-48FFB4534360}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "HLR", "08_HLR\adm\win\vc10\HLR.vcxproj", "{76045260-8DA6-4A3E-B220-F5B1B4ADE192}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Animation", "09_Animation\adm\win\vc10\Animation.vcxproj", "{92492ACB-1F57-40BB-818F-33AD1C20273A}" +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "HLR", "04_HLR\adm\win\vc10\HLR.vcxproj", "{76045260-8DA6-4A3E-B220-F5B1B4ADE192}" EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mfcsample", "mfcsample\adm\win\vc10\mfcsample.vcxproj", "{2D6CBBE8-6965-4016-B503-0D715AE26691}" EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Convert", "10_Convert\adm\win\vc10\Convert.vcxproj", "{C527B648-F98D-42E5-9F59-251FD95D15A0}" -EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Win32 = Debug|Win32 @@ -46,22 +34,6 @@ Global {B10FC678-B9AF-4B05-B3DC-8F790C610CC3}.Release|Win32.Build.0 = Release|Win32 {B10FC678-B9AF-4B05-B3DC-8F790C610CC3}.Release|x64.ActiveCfg = Release|x64 {B10FC678-B9AF-4B05-B3DC-8F790C610CC3}.Release|x64.Build.0 = Release|x64 - {6B905DC2-4E72-4EDA-99C2-7473634690FE}.Debug|Win32.ActiveCfg = Debug|Win32 - {6B905DC2-4E72-4EDA-99C2-7473634690FE}.Debug|Win32.Build.0 = Debug|Win32 - {6B905DC2-4E72-4EDA-99C2-7473634690FE}.Debug|x64.ActiveCfg = Debug|x64 - {6B905DC2-4E72-4EDA-99C2-7473634690FE}.Debug|x64.Build.0 = Debug|x64 - {6B905DC2-4E72-4EDA-99C2-7473634690FE}.Release|Win32.ActiveCfg = Release|Win32 - {6B905DC2-4E72-4EDA-99C2-7473634690FE}.Release|Win32.Build.0 = Release|Win32 - {6B905DC2-4E72-4EDA-99C2-7473634690FE}.Release|x64.ActiveCfg = Release|x64 - {6B905DC2-4E72-4EDA-99C2-7473634690FE}.Release|x64.Build.0 = Release|x64 - {949DFBDF-9007-4C88-8925-43209C36A5D6}.Debug|Win32.ActiveCfg = Debug|Win32 - {949DFBDF-9007-4C88-8925-43209C36A5D6}.Debug|Win32.Build.0 = Debug|Win32 - {949DFBDF-9007-4C88-8925-43209C36A5D6}.Debug|x64.ActiveCfg = Debug|x64 - {949DFBDF-9007-4C88-8925-43209C36A5D6}.Debug|x64.Build.0 = Debug|x64 - {949DFBDF-9007-4C88-8925-43209C36A5D6}.Release|Win32.ActiveCfg = Release|Win32 - {949DFBDF-9007-4C88-8925-43209C36A5D6}.Release|Win32.Build.0 = Release|Win32 - {949DFBDF-9007-4C88-8925-43209C36A5D6}.Release|x64.ActiveCfg = Release|x64 - {949DFBDF-9007-4C88-8925-43209C36A5D6}.Release|x64.Build.0 = Release|x64 {1C9A05AE-AF5A-4ACE-9A72-83436D77504C}.Debug|Win32.ActiveCfg = Debug|Win32 {1C9A05AE-AF5A-4ACE-9A72-83436D77504C}.Debug|Win32.Build.0 = Debug|Win32 {1C9A05AE-AF5A-4ACE-9A72-83436D77504C}.Debug|x64.ActiveCfg = Debug|x64 @@ -70,22 +42,6 @@ Global {1C9A05AE-AF5A-4ACE-9A72-83436D77504C}.Release|Win32.Build.0 = Release|Win32 {1C9A05AE-AF5A-4ACE-9A72-83436D77504C}.Release|x64.ActiveCfg = Release|x64 {1C9A05AE-AF5A-4ACE-9A72-83436D77504C}.Release|x64.Build.0 = Release|x64 - {B3C10EF6-42C7-4DB8-A49C-7E38255D5B1B}.Debug|Win32.ActiveCfg = Debug|Win32 - {B3C10EF6-42C7-4DB8-A49C-7E38255D5B1B}.Debug|Win32.Build.0 = Debug|Win32 - {B3C10EF6-42C7-4DB8-A49C-7E38255D5B1B}.Debug|x64.ActiveCfg = Debug|x64 - {B3C10EF6-42C7-4DB8-A49C-7E38255D5B1B}.Debug|x64.Build.0 = Debug|x64 - {B3C10EF6-42C7-4DB8-A49C-7E38255D5B1B}.Release|Win32.ActiveCfg = Release|Win32 - {B3C10EF6-42C7-4DB8-A49C-7E38255D5B1B}.Release|Win32.Build.0 = Release|Win32 - {B3C10EF6-42C7-4DB8-A49C-7E38255D5B1B}.Release|x64.ActiveCfg = Release|x64 - {B3C10EF6-42C7-4DB8-A49C-7E38255D5B1B}.Release|x64.Build.0 = Release|x64 - {B50C10C8-5260-498B-A80F-48FFB4534360}.Debug|Win32.ActiveCfg = Debug|Win32 - {B50C10C8-5260-498B-A80F-48FFB4534360}.Debug|Win32.Build.0 = Debug|Win32 - {B50C10C8-5260-498B-A80F-48FFB4534360}.Debug|x64.ActiveCfg = Debug|x64 - {B50C10C8-5260-498B-A80F-48FFB4534360}.Debug|x64.Build.0 = Debug|x64 - {B50C10C8-5260-498B-A80F-48FFB4534360}.Release|Win32.ActiveCfg = Release|Win32 - {B50C10C8-5260-498B-A80F-48FFB4534360}.Release|Win32.Build.0 = Release|Win32 - {B50C10C8-5260-498B-A80F-48FFB4534360}.Release|x64.ActiveCfg = Release|x64 - {B50C10C8-5260-498B-A80F-48FFB4534360}.Release|x64.Build.0 = Release|x64 {76045260-8DA6-4A3E-B220-F5B1B4ADE192}.Debug|Win32.ActiveCfg = Debug|Win32 {76045260-8DA6-4A3E-B220-F5B1B4ADE192}.Debug|Win32.Build.0 = Debug|Win32 {76045260-8DA6-4A3E-B220-F5B1B4ADE192}.Debug|x64.ActiveCfg = Debug|x64 @@ -94,14 +50,6 @@ Global {76045260-8DA6-4A3E-B220-F5B1B4ADE192}.Release|Win32.Build.0 = Release|Win32 {76045260-8DA6-4A3E-B220-F5B1B4ADE192}.Release|x64.ActiveCfg = Release|x64 {76045260-8DA6-4A3E-B220-F5B1B4ADE192}.Release|x64.Build.0 = Release|x64 - {92492ACB-1F57-40BB-818F-33AD1C20273A}.Debug|Win32.ActiveCfg = Debug|Win32 - {92492ACB-1F57-40BB-818F-33AD1C20273A}.Debug|Win32.Build.0 = Debug|Win32 - {92492ACB-1F57-40BB-818F-33AD1C20273A}.Debug|x64.ActiveCfg = Debug|x64 - {92492ACB-1F57-40BB-818F-33AD1C20273A}.Debug|x64.Build.0 = Debug|x64 - {92492ACB-1F57-40BB-818F-33AD1C20273A}.Release|Win32.ActiveCfg = Release|Win32 - {92492ACB-1F57-40BB-818F-33AD1C20273A}.Release|Win32.Build.0 = Release|Win32 - {92492ACB-1F57-40BB-818F-33AD1C20273A}.Release|x64.ActiveCfg = Release|x64 - {92492ACB-1F57-40BB-818F-33AD1C20273A}.Release|x64.Build.0 = Release|x64 {2D6CBBE8-6965-4016-B503-0D715AE26691}.Debug|Win32.ActiveCfg = Debug|Win32 {2D6CBBE8-6965-4016-B503-0D715AE26691}.Debug|Win32.Build.0 = Debug|Win32 {2D6CBBE8-6965-4016-B503-0D715AE26691}.Debug|x64.ActiveCfg = Debug|x64 @@ -110,14 +58,6 @@ Global {2D6CBBE8-6965-4016-B503-0D715AE26691}.Release|Win32.Build.0 = Release|Win32 {2D6CBBE8-6965-4016-B503-0D715AE26691}.Release|x64.ActiveCfg = Release|x64 {2D6CBBE8-6965-4016-B503-0D715AE26691}.Release|x64.Build.0 = Release|x64 - {C527B648-F98D-42E5-9F59-251FD95D15A0}.Debug|Win32.ActiveCfg = Debug|Win32 - {C527B648-F98D-42E5-9F59-251FD95D15A0}.Debug|Win32.Build.0 = Debug|Win32 - {C527B648-F98D-42E5-9F59-251FD95D15A0}.Debug|x64.ActiveCfg = Debug|x64 - {C527B648-F98D-42E5-9F59-251FD95D15A0}.Debug|x64.Build.0 = Debug|x64 - {C527B648-F98D-42E5-9F59-251FD95D15A0}.Release|Win32.ActiveCfg = Release|Win32 - {C527B648-F98D-42E5-9F59-251FD95D15A0}.Release|Win32.Build.0 = Release|Win32 - {C527B648-F98D-42E5-9F59-251FD95D15A0}.Release|x64.ActiveCfg = Release|x64 - {C527B648-F98D-42E5-9F59-251FD95D15A0}.Release|x64.Build.0 = Release|x64 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/samples/mfc/standard/All-vc141.sln b/samples/mfc/standard/All-vc141.sln index 0ff8e8fac0..627eea28c0 100644 --- a/samples/mfc/standard/All-vc141.sln +++ b/samples/mfc/standard/All-vc141.sln @@ -4,24 +4,12 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Geometry", "01_Geometry\adm EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Modeling", "02_Modeling\adm\win\vc10\Modeling.vcxproj", "{B10FC678-B9AF-4B05-B3DC-8F790C610CC3}" EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Viewer2d", "03_Viewer2d\adm\win\vc10\Viewer2d.vcxproj", "{6B905DC2-4E72-4EDA-99C2-7473634690FE}" +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ImportExport", "03_ImportExport\adm\win\vc10\ImportExport.vcxproj", "{1C9A05AE-AF5A-4ACE-9A72-83436D77504C}" EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Viewer3d", "04_Viewer3d\adm\win\vc10\Viewer3d.vcxproj", "{949DFBDF-9007-4C88-8925-43209C36A5D6}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ImportExport", "05_ImportExport\adm\win\vc10\ImportExport.vcxproj", "{1C9A05AE-AF5A-4ACE-9A72-83436D77504C}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Ocaf", "06_Ocaf\adm\win\vc10\Ocaf.vcxproj", "{B3C10EF6-42C7-4DB8-A49C-7E38255D5B1B}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Triangulation", "07_Triangulation\adm\win\vc10\Triangulation.vcxproj", "{B50C10C8-5260-498B-A80F-48FFB4534360}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "HLR", "08_HLR\adm\win\vc10\HLR.vcxproj", "{76045260-8DA6-4A3E-B220-F5B1B4ADE192}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Animation", "09_Animation\adm\win\vc10\Animation.vcxproj", "{92492ACB-1F57-40BB-818F-33AD1C20273A}" +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "HLR", "04_HLR\adm\win\vc10\HLR.vcxproj", "{76045260-8DA6-4A3E-B220-F5B1B4ADE192}" EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mfcsample", "mfcsample\adm\win\vc10\mfcsample.vcxproj", "{2D6CBBE8-6965-4016-B503-0D715AE26691}" EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Convert", "10_Convert\adm\win\vc10\Convert.vcxproj", "{C527B648-F98D-42E5-9F59-251FD95D15A0}" -EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Win32 = Debug|Win32 @@ -46,22 +34,6 @@ Global {B10FC678-B9AF-4B05-B3DC-8F790C610CC3}.Release|Win32.Build.0 = Release|Win32 {B10FC678-B9AF-4B05-B3DC-8F790C610CC3}.Release|x64.ActiveCfg = Release|x64 {B10FC678-B9AF-4B05-B3DC-8F790C610CC3}.Release|x64.Build.0 = Release|x64 - {6B905DC2-4E72-4EDA-99C2-7473634690FE}.Debug|Win32.ActiveCfg = Debug|Win32 - {6B905DC2-4E72-4EDA-99C2-7473634690FE}.Debug|Win32.Build.0 = Debug|Win32 - {6B905DC2-4E72-4EDA-99C2-7473634690FE}.Debug|x64.ActiveCfg = Debug|x64 - {6B905DC2-4E72-4EDA-99C2-7473634690FE}.Debug|x64.Build.0 = Debug|x64 - {6B905DC2-4E72-4EDA-99C2-7473634690FE}.Release|Win32.ActiveCfg = Release|Win32 - {6B905DC2-4E72-4EDA-99C2-7473634690FE}.Release|Win32.Build.0 = Release|Win32 - {6B905DC2-4E72-4EDA-99C2-7473634690FE}.Release|x64.ActiveCfg = Release|x64 - {6B905DC2-4E72-4EDA-99C2-7473634690FE}.Release|x64.Build.0 = Release|x64 - {949DFBDF-9007-4C88-8925-43209C36A5D6}.Debug|Win32.ActiveCfg = Debug|Win32 - {949DFBDF-9007-4C88-8925-43209C36A5D6}.Debug|Win32.Build.0 = Debug|Win32 - {949DFBDF-9007-4C88-8925-43209C36A5D6}.Debug|x64.ActiveCfg = Debug|x64 - {949DFBDF-9007-4C88-8925-43209C36A5D6}.Debug|x64.Build.0 = Debug|x64 - {949DFBDF-9007-4C88-8925-43209C36A5D6}.Release|Win32.ActiveCfg = Release|Win32 - {949DFBDF-9007-4C88-8925-43209C36A5D6}.Release|Win32.Build.0 = Release|Win32 - {949DFBDF-9007-4C88-8925-43209C36A5D6}.Release|x64.ActiveCfg = Release|x64 - {949DFBDF-9007-4C88-8925-43209C36A5D6}.Release|x64.Build.0 = Release|x64 {1C9A05AE-AF5A-4ACE-9A72-83436D77504C}.Debug|Win32.ActiveCfg = Debug|Win32 {1C9A05AE-AF5A-4ACE-9A72-83436D77504C}.Debug|Win32.Build.0 = Debug|Win32 {1C9A05AE-AF5A-4ACE-9A72-83436D77504C}.Debug|x64.ActiveCfg = Debug|x64 @@ -70,22 +42,6 @@ Global {1C9A05AE-AF5A-4ACE-9A72-83436D77504C}.Release|Win32.Build.0 = Release|Win32 {1C9A05AE-AF5A-4ACE-9A72-83436D77504C}.Release|x64.ActiveCfg = Release|x64 {1C9A05AE-AF5A-4ACE-9A72-83436D77504C}.Release|x64.Build.0 = Release|x64 - {B3C10EF6-42C7-4DB8-A49C-7E38255D5B1B}.Debug|Win32.ActiveCfg = Debug|Win32 - {B3C10EF6-42C7-4DB8-A49C-7E38255D5B1B}.Debug|Win32.Build.0 = Debug|Win32 - {B3C10EF6-42C7-4DB8-A49C-7E38255D5B1B}.Debug|x64.ActiveCfg = Debug|x64 - {B3C10EF6-42C7-4DB8-A49C-7E38255D5B1B}.Debug|x64.Build.0 = Debug|x64 - {B3C10EF6-42C7-4DB8-A49C-7E38255D5B1B}.Release|Win32.ActiveCfg = Release|Win32 - {B3C10EF6-42C7-4DB8-A49C-7E38255D5B1B}.Release|Win32.Build.0 = Release|Win32 - {B3C10EF6-42C7-4DB8-A49C-7E38255D5B1B}.Release|x64.ActiveCfg = Release|x64 - {B3C10EF6-42C7-4DB8-A49C-7E38255D5B1B}.Release|x64.Build.0 = Release|x64 - {B50C10C8-5260-498B-A80F-48FFB4534360}.Debug|Win32.ActiveCfg = Debug|Win32 - {B50C10C8-5260-498B-A80F-48FFB4534360}.Debug|Win32.Build.0 = Debug|Win32 - {B50C10C8-5260-498B-A80F-48FFB4534360}.Debug|x64.ActiveCfg = Debug|x64 - {B50C10C8-5260-498B-A80F-48FFB4534360}.Debug|x64.Build.0 = Debug|x64 - {B50C10C8-5260-498B-A80F-48FFB4534360}.Release|Win32.ActiveCfg = Release|Win32 - {B50C10C8-5260-498B-A80F-48FFB4534360}.Release|Win32.Build.0 = Release|Win32 - {B50C10C8-5260-498B-A80F-48FFB4534360}.Release|x64.ActiveCfg = Release|x64 - {B50C10C8-5260-498B-A80F-48FFB4534360}.Release|x64.Build.0 = Release|x64 {76045260-8DA6-4A3E-B220-F5B1B4ADE192}.Debug|Win32.ActiveCfg = Debug|Win32 {76045260-8DA6-4A3E-B220-F5B1B4ADE192}.Debug|Win32.Build.0 = Debug|Win32 {76045260-8DA6-4A3E-B220-F5B1B4ADE192}.Debug|x64.ActiveCfg = Debug|x64 @@ -94,14 +50,6 @@ Global {76045260-8DA6-4A3E-B220-F5B1B4ADE192}.Release|Win32.Build.0 = Release|Win32 {76045260-8DA6-4A3E-B220-F5B1B4ADE192}.Release|x64.ActiveCfg = Release|x64 {76045260-8DA6-4A3E-B220-F5B1B4ADE192}.Release|x64.Build.0 = Release|x64 - {92492ACB-1F57-40BB-818F-33AD1C20273A}.Debug|Win32.ActiveCfg = Debug|Win32 - {92492ACB-1F57-40BB-818F-33AD1C20273A}.Debug|Win32.Build.0 = Debug|Win32 - {92492ACB-1F57-40BB-818F-33AD1C20273A}.Debug|x64.ActiveCfg = Debug|x64 - {92492ACB-1F57-40BB-818F-33AD1C20273A}.Debug|x64.Build.0 = Debug|x64 - {92492ACB-1F57-40BB-818F-33AD1C20273A}.Release|Win32.ActiveCfg = Release|Win32 - {92492ACB-1F57-40BB-818F-33AD1C20273A}.Release|Win32.Build.0 = Release|Win32 - {92492ACB-1F57-40BB-818F-33AD1C20273A}.Release|x64.ActiveCfg = Release|x64 - {92492ACB-1F57-40BB-818F-33AD1C20273A}.Release|x64.Build.0 = Release|x64 {2D6CBBE8-6965-4016-B503-0D715AE26691}.Debug|Win32.ActiveCfg = Debug|Win32 {2D6CBBE8-6965-4016-B503-0D715AE26691}.Debug|Win32.Build.0 = Debug|Win32 {2D6CBBE8-6965-4016-B503-0D715AE26691}.Debug|x64.ActiveCfg = Debug|x64 @@ -110,14 +58,6 @@ Global {2D6CBBE8-6965-4016-B503-0D715AE26691}.Release|Win32.Build.0 = Release|Win32 {2D6CBBE8-6965-4016-B503-0D715AE26691}.Release|x64.ActiveCfg = Release|x64 {2D6CBBE8-6965-4016-B503-0D715AE26691}.Release|x64.Build.0 = Release|x64 - {C527B648-F98D-42E5-9F59-251FD95D15A0}.Debug|Win32.ActiveCfg = Debug|Win32 - {C527B648-F98D-42E5-9F59-251FD95D15A0}.Debug|Win32.Build.0 = Debug|Win32 - {C527B648-F98D-42E5-9F59-251FD95D15A0}.Debug|x64.ActiveCfg = Debug|x64 - {C527B648-F98D-42E5-9F59-251FD95D15A0}.Debug|x64.Build.0 = Debug|x64 - {C527B648-F98D-42E5-9F59-251FD95D15A0}.Release|Win32.ActiveCfg = Release|Win32 - {C527B648-F98D-42E5-9F59-251FD95D15A0}.Release|Win32.Build.0 = Release|Win32 - {C527B648-F98D-42E5-9F59-251FD95D15A0}.Release|x64.ActiveCfg = Release|x64 - {C527B648-F98D-42E5-9F59-251FD95D15A0}.Release|x64.Build.0 = Release|x64 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/samples/mfc/standard/All-vc142.sln b/samples/mfc/standard/All-vc142.sln index 7fdda1fe8d..d4ef1b6938 100644 --- a/samples/mfc/standard/All-vc142.sln +++ b/samples/mfc/standard/All-vc142.sln @@ -4,24 +4,12 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Geometry", "01_Geometry\adm EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Modeling", "02_Modeling\adm\win\vc10\Modeling.vcxproj", "{B10FC678-B9AF-4B05-B3DC-8F790C610CC3}" EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Viewer2d", "03_Viewer2d\adm\win\vc10\Viewer2d.vcxproj", "{6B905DC2-4E72-4EDA-99C2-7473634690FE}" +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ImportExport", "03_ImportExport\adm\win\vc10\ImportExport.vcxproj", "{1C9A05AE-AF5A-4ACE-9A72-83436D77504C}" EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Viewer3d", "04_Viewer3d\adm\win\vc10\Viewer3d.vcxproj", "{949DFBDF-9007-4C88-8925-43209C36A5D6}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ImportExport", "05_ImportExport\adm\win\vc10\ImportExport.vcxproj", "{1C9A05AE-AF5A-4ACE-9A72-83436D77504C}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Ocaf", "06_Ocaf\adm\win\vc10\Ocaf.vcxproj", "{B3C10EF6-42C7-4DB8-A49C-7E38255D5B1B}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Triangulation", "07_Triangulation\adm\win\vc10\Triangulation.vcxproj", "{B50C10C8-5260-498B-A80F-48FFB4534360}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "HLR", "08_HLR\adm\win\vc10\HLR.vcxproj", "{76045260-8DA6-4A3E-B220-F5B1B4ADE192}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Animation", "09_Animation\adm\win\vc10\Animation.vcxproj", "{92492ACB-1F57-40BB-818F-33AD1C20273A}" +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "HLR", "04_HLR\adm\win\vc10\HLR.vcxproj", "{76045260-8DA6-4A3E-B220-F5B1B4ADE192}" EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mfcsample", "mfcsample\adm\win\vc10\mfcsample.vcxproj", "{2D6CBBE8-6965-4016-B503-0D715AE26691}" EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Convert", "10_Convert\adm\win\vc10\Convert.vcxproj", "{C527B648-F98D-42E5-9F59-251FD95D15A0}" -EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Win32 = Debug|Win32 @@ -46,22 +34,6 @@ Global {B10FC678-B9AF-4B05-B3DC-8F790C610CC3}.Release|Win32.Build.0 = Release|Win32 {B10FC678-B9AF-4B05-B3DC-8F790C610CC3}.Release|x64.ActiveCfg = Release|x64 {B10FC678-B9AF-4B05-B3DC-8F790C610CC3}.Release|x64.Build.0 = Release|x64 - {6B905DC2-4E72-4EDA-99C2-7473634690FE}.Debug|Win32.ActiveCfg = Debug|Win32 - {6B905DC2-4E72-4EDA-99C2-7473634690FE}.Debug|Win32.Build.0 = Debug|Win32 - {6B905DC2-4E72-4EDA-99C2-7473634690FE}.Debug|x64.ActiveCfg = Debug|x64 - {6B905DC2-4E72-4EDA-99C2-7473634690FE}.Debug|x64.Build.0 = Debug|x64 - {6B905DC2-4E72-4EDA-99C2-7473634690FE}.Release|Win32.ActiveCfg = Release|Win32 - {6B905DC2-4E72-4EDA-99C2-7473634690FE}.Release|Win32.Build.0 = Release|Win32 - {6B905DC2-4E72-4EDA-99C2-7473634690FE}.Release|x64.ActiveCfg = Release|x64 - {6B905DC2-4E72-4EDA-99C2-7473634690FE}.Release|x64.Build.0 = Release|x64 - {949DFBDF-9007-4C88-8925-43209C36A5D6}.Debug|Win32.ActiveCfg = Debug|Win32 - {949DFBDF-9007-4C88-8925-43209C36A5D6}.Debug|Win32.Build.0 = Debug|Win32 - {949DFBDF-9007-4C88-8925-43209C36A5D6}.Debug|x64.ActiveCfg = Debug|x64 - {949DFBDF-9007-4C88-8925-43209C36A5D6}.Debug|x64.Build.0 = Debug|x64 - {949DFBDF-9007-4C88-8925-43209C36A5D6}.Release|Win32.ActiveCfg = Release|Win32 - {949DFBDF-9007-4C88-8925-43209C36A5D6}.Release|Win32.Build.0 = Release|Win32 - {949DFBDF-9007-4C88-8925-43209C36A5D6}.Release|x64.ActiveCfg = Release|x64 - {949DFBDF-9007-4C88-8925-43209C36A5D6}.Release|x64.Build.0 = Release|x64 {1C9A05AE-AF5A-4ACE-9A72-83436D77504C}.Debug|Win32.ActiveCfg = Debug|Win32 {1C9A05AE-AF5A-4ACE-9A72-83436D77504C}.Debug|Win32.Build.0 = Debug|Win32 {1C9A05AE-AF5A-4ACE-9A72-83436D77504C}.Debug|x64.ActiveCfg = Debug|x64 @@ -70,22 +42,6 @@ Global {1C9A05AE-AF5A-4ACE-9A72-83436D77504C}.Release|Win32.Build.0 = Release|Win32 {1C9A05AE-AF5A-4ACE-9A72-83436D77504C}.Release|x64.ActiveCfg = Release|x64 {1C9A05AE-AF5A-4ACE-9A72-83436D77504C}.Release|x64.Build.0 = Release|x64 - {B3C10EF6-42C7-4DB8-A49C-7E38255D5B1B}.Debug|Win32.ActiveCfg = Debug|Win32 - {B3C10EF6-42C7-4DB8-A49C-7E38255D5B1B}.Debug|Win32.Build.0 = Debug|Win32 - {B3C10EF6-42C7-4DB8-A49C-7E38255D5B1B}.Debug|x64.ActiveCfg = Debug|x64 - {B3C10EF6-42C7-4DB8-A49C-7E38255D5B1B}.Debug|x64.Build.0 = Debug|x64 - {B3C10EF6-42C7-4DB8-A49C-7E38255D5B1B}.Release|Win32.ActiveCfg = Release|Win32 - {B3C10EF6-42C7-4DB8-A49C-7E38255D5B1B}.Release|Win32.Build.0 = Release|Win32 - {B3C10EF6-42C7-4DB8-A49C-7E38255D5B1B}.Release|x64.ActiveCfg = Release|x64 - {B3C10EF6-42C7-4DB8-A49C-7E38255D5B1B}.Release|x64.Build.0 = Release|x64 - {B50C10C8-5260-498B-A80F-48FFB4534360}.Debug|Win32.ActiveCfg = Debug|Win32 - {B50C10C8-5260-498B-A80F-48FFB4534360}.Debug|Win32.Build.0 = Debug|Win32 - {B50C10C8-5260-498B-A80F-48FFB4534360}.Debug|x64.ActiveCfg = Debug|x64 - {B50C10C8-5260-498B-A80F-48FFB4534360}.Debug|x64.Build.0 = Debug|x64 - {B50C10C8-5260-498B-A80F-48FFB4534360}.Release|Win32.ActiveCfg = Release|Win32 - {B50C10C8-5260-498B-A80F-48FFB4534360}.Release|Win32.Build.0 = Release|Win32 - {B50C10C8-5260-498B-A80F-48FFB4534360}.Release|x64.ActiveCfg = Release|x64 - {B50C10C8-5260-498B-A80F-48FFB4534360}.Release|x64.Build.0 = Release|x64 {76045260-8DA6-4A3E-B220-F5B1B4ADE192}.Debug|Win32.ActiveCfg = Debug|Win32 {76045260-8DA6-4A3E-B220-F5B1B4ADE192}.Debug|Win32.Build.0 = Debug|Win32 {76045260-8DA6-4A3E-B220-F5B1B4ADE192}.Debug|x64.ActiveCfg = Debug|x64 @@ -94,14 +50,6 @@ Global {76045260-8DA6-4A3E-B220-F5B1B4ADE192}.Release|Win32.Build.0 = Release|Win32 {76045260-8DA6-4A3E-B220-F5B1B4ADE192}.Release|x64.ActiveCfg = Release|x64 {76045260-8DA6-4A3E-B220-F5B1B4ADE192}.Release|x64.Build.0 = Release|x64 - {92492ACB-1F57-40BB-818F-33AD1C20273A}.Debug|Win32.ActiveCfg = Debug|Win32 - {92492ACB-1F57-40BB-818F-33AD1C20273A}.Debug|Win32.Build.0 = Debug|Win32 - {92492ACB-1F57-40BB-818F-33AD1C20273A}.Debug|x64.ActiveCfg = Debug|x64 - {92492ACB-1F57-40BB-818F-33AD1C20273A}.Debug|x64.Build.0 = Debug|x64 - {92492ACB-1F57-40BB-818F-33AD1C20273A}.Release|Win32.ActiveCfg = Release|Win32 - {92492ACB-1F57-40BB-818F-33AD1C20273A}.Release|Win32.Build.0 = Release|Win32 - {92492ACB-1F57-40BB-818F-33AD1C20273A}.Release|x64.ActiveCfg = Release|x64 - {92492ACB-1F57-40BB-818F-33AD1C20273A}.Release|x64.Build.0 = Release|x64 {2D6CBBE8-6965-4016-B503-0D715AE26691}.Debug|Win32.ActiveCfg = Debug|Win32 {2D6CBBE8-6965-4016-B503-0D715AE26691}.Debug|Win32.Build.0 = Debug|Win32 {2D6CBBE8-6965-4016-B503-0D715AE26691}.Debug|x64.ActiveCfg = Debug|x64 @@ -110,14 +58,6 @@ Global {2D6CBBE8-6965-4016-B503-0D715AE26691}.Release|Win32.Build.0 = Release|Win32 {2D6CBBE8-6965-4016-B503-0D715AE26691}.Release|x64.ActiveCfg = Release|x64 {2D6CBBE8-6965-4016-B503-0D715AE26691}.Release|x64.Build.0 = Release|x64 - {C527B648-F98D-42E5-9F59-251FD95D15A0}.Debug|Win32.ActiveCfg = Debug|Win32 - {C527B648-F98D-42E5-9F59-251FD95D15A0}.Debug|Win32.Build.0 = Debug|Win32 - {C527B648-F98D-42E5-9F59-251FD95D15A0}.Debug|x64.ActiveCfg = Debug|x64 - {C527B648-F98D-42E5-9F59-251FD95D15A0}.Debug|x64.Build.0 = Debug|x64 - {C527B648-F98D-42E5-9F59-251FD95D15A0}.Release|Win32.ActiveCfg = Release|Win32 - {C527B648-F98D-42E5-9F59-251FD95D15A0}.Release|Win32.Build.0 = Release|Win32 - {C527B648-F98D-42E5-9F59-251FD95D15A0}.Release|x64.ActiveCfg = Release|x64 - {C527B648-F98D-42E5-9F59-251FD95D15A0}.Release|x64.Build.0 = Release|x64 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/samples/mfc/standard/Common/Primitive/Sample2D_Face.cpp b/samples/mfc/standard/Common/Primitive/Sample2D_Face.cpp deleted file mode 100755 index acbaf9c666..0000000000 --- a/samples/mfc/standard/Common/Primitive/Sample2D_Face.cpp +++ /dev/null @@ -1,440 +0,0 @@ -#include "stdafx.h" - -#include "Sample2D_Face.h" - -IMPLEMENT_STANDARD_RTTIEXT(Sample2D_Face,AIS_InteractiveObject) - -Sample2D_Face::Sample2D_Face (const TopoDS_Shape& theFace) -:AIS_InteractiveObject() -{ - myshape = theFace; - myFORWARDColor = Quantity_NOC_BLUE1; - myREVERSEDColor = Quantity_NOC_YELLOW; - myINTERNALColor = Quantity_NOC_RED1; - myEXTERNALColor = Quantity_NOC_MAGENTA1; - myWidthIndex = 1; - myTypeIndex = 1; - - myForwardNum=0; - myReversedNum=0; - myInternalNum=0; - myExternalNum=0; - - SetAutoHilight(Standard_False); - - FillData(Standard_True); -} - -void Sample2D_Face::DrawMarker(const Handle(Geom2d_TrimmedCurve)& theCurve, const Handle(Prs3d_Presentation)& thePresentation) -{ - Standard_Real aCenterParam = (theCurve->FirstParameter()+theCurve->LastParameter())/2; - gp_Pnt2d p; - gp_Vec2d v; - theCurve->D1(aCenterParam,p,v); - if (v.Magnitude() > gp::Resolution()) - { - gp_Vec aDir(v.X(),v.Y(),0.); - gp_Pnt aPoint(p.X(),p.Y(),0.); - aDir.Normalize(); - aDir.Reverse(); - gp_Dir aZ(0,0,1); - gp_Pnt aLeft(aPoint.Translated(aDir.Rotated(gp_Ax1(aPoint,aZ), M_PI/6)*5)) ; - gp_Pnt aRight(aPoint.Translated(aDir.Rotated(gp_Ax1(aPoint,aZ), M_PI*11/6)*5)); - - Handle(Graphic3d_ArrayOfPolylines) anArrow = new Graphic3d_ArrayOfPolylines(3); - anArrow->AddVertex(aLeft); - anArrow->AddVertex(aPoint); - anArrow->AddVertex(aRight); - - thePresentation->CurrentGroup()->AddPrimitiveArray(anArrow); - } -} - -void Sample2D_Face::FillData(Standard_Boolean isSizesRecompute) -{ - if(myshape.IsNull() || myshape.ShapeType()!=TopAbs_FACE) return; - - Standard_Real f,l; - TopExp_Explorer ex; - TopoDS_Face aFace = TopoDS::Face(myshape); - - //count number of verteces and bounds in primitive arrays - if(isSizesRecompute) - { - mySeq_FORWARD.Clear(); - mySeq_REVERSED.Clear(); - mySeq_INTERNAL.Clear(); - mySeq_EXTERNAL.Clear(); - - myshape.Orientation(TopAbs_FORWARD); - ex.Init(myshape,TopAbs_EDGE); - while (ex.More()) - { - BRepAdaptor_Curve2d aCurveOnEdge(TopoDS::Edge(ex.Current()),aFace); - GCPnts_QuasiUniformDeflection anEdgeDistrib(aCurveOnEdge,1.e-2); - if(anEdgeDistrib.IsDone()) - switch (ex.Current().Orientation()) - { - case TopAbs_FORWARD: { - myForwardNum+=anEdgeDistrib.NbPoints(); - myForwardBounds++; - break; - } - case TopAbs_REVERSED: { - myReversedNum+=anEdgeDistrib.NbPoints(); - myReversedBounds++; - break; - } - case TopAbs_INTERNAL: { - myInternalNum+=anEdgeDistrib.NbPoints(); - myInternalBounds++; - break; - } - case TopAbs_EXTERNAL: { - myExternalNum+=anEdgeDistrib.NbPoints(); - myExternalBounds++; - break; - } - default : break; - }//end switch - ex.Next(); - } - } - - myForwardArray = new Graphic3d_ArrayOfPolylines(myForwardNum,myForwardBounds); - myReversedArray = new Graphic3d_ArrayOfPolylines(myReversedNum, myReversedBounds); - myInternalArray = new Graphic3d_ArrayOfPolylines(myInternalNum, myInternalBounds); - myExternalArray = new Graphic3d_ArrayOfPolylines(myExternalNum, myExternalBounds); - - //fill primitive arrays - ex.Init(myshape,TopAbs_EDGE); - while (ex.More()) { - const Handle(Geom2d_Curve) aCurve = BRep_Tool::CurveOnSurface - (TopoDS::Edge(ex.Current()),aFace,f,l); - - Handle(Geom2d_TrimmedCurve) aTrimmedCurve = new Geom2d_TrimmedCurve(aCurve,f,l); - TopoDS_Edge CurrentEdge= TopoDS::Edge(ex.Current()); - if(!aTrimmedCurve.IsNull()) - { - Handle(Geom_Curve) aCurve3d = GeomLib::To3d(gp_Ax2(gp_Pnt(0,0,0),gp_Dir(0,0,1)),aTrimmedCurve); - BRepAdaptor_Curve2d aCurveOnEdge(CurrentEdge,aFace); - GCPnts_QuasiUniformDeflection anEdgeDistrib(aCurveOnEdge,1.e-2); - if(anEdgeDistrib.IsDone()) - { - switch (ex.Current().Orientation()) - { - case TopAbs_FORWARD: { - myForwardArray->AddBound(anEdgeDistrib.NbPoints()); - for(Standard_Integer i=1;i<=anEdgeDistrib.NbPoints();++i) - { - myForwardArray->AddVertex(anEdgeDistrib.Value(i)); - } - if(isSizesRecompute) - mySeq_FORWARD.Append(aCurve3d); - break; - } - case TopAbs_REVERSED: { - myReversedArray->AddBound(anEdgeDistrib.NbPoints()); - for(Standard_Integer i=1;i<=anEdgeDistrib.NbPoints();++i) - { - myReversedArray->AddVertex(anEdgeDistrib.Value(i)); - } - if(isSizesRecompute) - mySeq_REVERSED.Append(aCurve3d); - break; - } - case TopAbs_INTERNAL: { - myInternalArray->AddBound(anEdgeDistrib.NbPoints()); - for(Standard_Integer i=1;i<=anEdgeDistrib.NbPoints();++i) - { - myInternalArray->AddVertex(anEdgeDistrib.Value(i)); - } - if(isSizesRecompute) - mySeq_INTERNAL.Append(aCurve3d); - break; - } - case TopAbs_EXTERNAL: { - myExternalArray->AddBound(anEdgeDistrib.NbPoints()); - for(Standard_Integer i=1;i<=anEdgeDistrib.NbPoints();++i) - { - myExternalArray->AddVertex(anEdgeDistrib.Value(i)); - } - if(isSizesRecompute) - mySeq_EXTERNAL.Append(aCurve3d); - break; - } - default : break; - }//end switch - } - }//end else - ex.Next(); - } -} - -void Sample2D_Face::Compute (const Handle(PrsMgr_PresentationManager)& /*thePresentationManager*/, - const Handle(Prs3d_Presentation)& thePresentation, - const Standard_Integer /*theMode*/) -{ - thePresentation->Clear(); - myDrawer->SetWireDraw(1); - - if(myshape.IsNull() || myshape.ShapeType()!=TopAbs_FACE) return; - - Handle(Graphic3d_AspectLine3d) aLineAspect_FORWARD = - new Graphic3d_AspectLine3d(myFORWARDColor, Aspect_TOL_SOLID,1); - Handle(Graphic3d_AspectLine3d) aLineAspect_REVERSED = - new Graphic3d_AspectLine3d(myREVERSEDColor, Aspect_TOL_SOLID,1); - Handle(Graphic3d_AspectLine3d) aLineAspect_INTERNAL = - new Graphic3d_AspectLine3d(myINTERNALColor, Aspect_TOL_SOLID,1); - Handle(Graphic3d_AspectLine3d) aLineAspect_EXTERNAL = - new Graphic3d_AspectLine3d(myEXTERNALColor, Aspect_TOL_SOLID,1); - - Standard_Real f,l; - TopoDS_Face aFace = TopoDS::Face(myshape); - //estimating number of verteces in primitive arrays - TopExp_Explorer ex(myshape,TopAbs_EDGE); - ex.Init(myshape,TopAbs_EDGE); - while (ex.More()) - { - const Handle(Geom2d_Curve) aCurve = BRep_Tool::CurveOnSurface - (TopoDS::Edge(ex.Current()),aFace,f,l); - - Handle(Geom2d_TrimmedCurve) aTrimmedCurve = new Geom2d_TrimmedCurve(aCurve,f,l); - TopoDS_Edge aCurrentEdge= TopoDS::Edge(ex.Current()); - //make a 3D curve from 2D trimmed curve to display it - Handle(Geom_Curve) aCurve3d = GeomLib::To3d(gp_Ax2(gp_Pnt(0,0,0),gp_Dir(0,0,1)),aTrimmedCurve); - //make distribution of points - BRepAdaptor_Curve2d aCurveOnEdge(aCurrentEdge,aFace); - GCPnts_QuasiUniformDeflection anEdgeDistrib(aCurveOnEdge,1.e-2); - if(anEdgeDistrib.IsDone()) - { - switch (ex.Current().Orientation()) - { - case TopAbs_FORWARD: { - - thePresentation->CurrentGroup()->SetPrimitivesAspect(aLineAspect_FORWARD); - DrawMarker(aTrimmedCurve, thePresentation); - break; - } - case TopAbs_REVERSED: { - - thePresentation->CurrentGroup()->SetPrimitivesAspect(aLineAspect_REVERSED); - DrawMarker(aTrimmedCurve, thePresentation); - break; - } - case TopAbs_INTERNAL: { - - thePresentation->CurrentGroup()->SetPrimitivesAspect(aLineAspect_INTERNAL); - DrawMarker(aTrimmedCurve, thePresentation); - - mySeq_INTERNAL.Append(aCurve3d); - break; - } - case TopAbs_EXTERNAL: { - - thePresentation->CurrentGroup()->SetPrimitivesAspect(aLineAspect_EXTERNAL); - DrawMarker(aTrimmedCurve, thePresentation); - break; - } - default : break; - }//end switch - } - ex.Next(); - } - //add all primitives to the presentation - thePresentation->CurrentGroup()->SetPrimitivesAspect(aLineAspect_FORWARD); - thePresentation->CurrentGroup()->AddPrimitiveArray(myForwardArray); - - thePresentation->CurrentGroup()->SetPrimitivesAspect(aLineAspect_REVERSED); - thePresentation->CurrentGroup()->AddPrimitiveArray(myReversedArray); - - thePresentation->CurrentGroup()->SetPrimitivesAspect(aLineAspect_INTERNAL); - thePresentation->CurrentGroup()->AddPrimitiveArray(myInternalArray); - - thePresentation->CurrentGroup()->SetPrimitivesAspect(aLineAspect_EXTERNAL); - thePresentation->CurrentGroup()->AddPrimitiveArray(myExternalArray); -} - -//Method for advanced customizable selection of picked object -void Sample2D_Face::HilightSelected -( const Handle(PrsMgr_PresentationManager)& thePM, - const SelectMgr_SequenceOfOwner& theOwners) -{ - Handle( Prs3d_Presentation ) aSelectionPrs; - - aSelectionPrs = GetSelectPresentation( thePM ); - - Handle(Graphic3d_AspectLine3d) aLineAspect = - new Graphic3d_AspectLine3d(Quantity_NOC_ANTIQUEWHITE, Aspect_TOL_SOLID,2); - if( HasPresentation() ) - aSelectionPrs->SetTransformPersistence (Presentation()->TransformPersistence()); - - Standard_Integer aLength = theOwners.Length(); - Handle (SelectMgr_EntityOwner) anOwner; - - aSelectionPrs->Clear(); - FillData(); - - Handle (Graphic3d_Group) aSelectGroup = aSelectionPrs->NewGroup(); - - for(Standard_Integer i=1; i<=aLength; ++i) - { - anOwner = theOwners.Value(i); - //check priority of owner to add primitives in one of array - //containing primitives with certain type of orientation - switch(anOwner->Priority()) - { - case 7: - { - //add to objects with forward orientation - aSelectGroup->SetGroupPrimitivesAspect(aLineAspect); - aSelectGroup->AddPrimitiveArray(myForwardArray); - break; - } - case 6: - { - //add to objects with reversed orientation - aSelectGroup->SetGroupPrimitivesAspect(aLineAspect); - aSelectGroup->AddPrimitiveArray(myReversedArray); - break; - } - case 5: - { - //add to objects with internal orientation - aSelectGroup->SetGroupPrimitivesAspect(aLineAspect); - aSelectGroup->AddPrimitiveArray(myInternalArray); - break; - } - case 4: - { - //add to objects with external orientation - aSelectGroup->SetGroupPrimitivesAspect(aLineAspect); - aSelectGroup->AddPrimitiveArray(myExternalArray); - break; - } - } - - } - aSelectionPrs->Display(); - -} - -void Sample2D_Face::ClearSelected () -{ - Handle( Prs3d_Presentation ) aSelectionPrs = GetSelectPresentation( NULL ); - if( !aSelectionPrs.IsNull() ) - aSelectionPrs->Clear(); -} - - - -//Method for advanced customizable highlighting of picked object -void Sample2D_Face::HilightOwnerWithColor ( const Handle(PrsMgr_PresentationManager)& thePM, - const Handle(Prs3d_Drawer)& theStyle, - const Handle(SelectMgr_EntityOwner)& theOwner) -{ - Handle( Prs3d_Presentation ) aHighlightPrs; - aHighlightPrs = GetHilightPresentation( thePM ); - if( HasPresentation() ) - aHighlightPrs->SetTransformPersistence (Presentation()->TransformPersistence()); - if(theOwner.IsNull()) - return; - aHighlightPrs->Clear(); - FillData(); - - //Direct highlighting - Handle (Graphic3d_Group) aHilightGroup = aHighlightPrs->NewGroup(); - Handle(Graphic3d_AspectLine3d) aLineAspect = - new Graphic3d_AspectLine3d(theStyle->Color(), Aspect_TOL_SOLID,2); - switch(theOwner->Priority()) - { - case 7: - { - aHilightGroup->SetGroupPrimitivesAspect(aLineAspect); - aHilightGroup->AddPrimitiveArray(myForwardArray); - break; - } - case 6: - { - aHilightGroup->SetGroupPrimitivesAspect(aLineAspect); - aHilightGroup->AddPrimitiveArray(myReversedArray); - break; - } - case 5: - { - aHilightGroup->SetGroupPrimitivesAspect(aLineAspect); - aHilightGroup->AddPrimitiveArray(myInternalArray); - break; - } - case 4: - { - aHilightGroup->SetGroupPrimitivesAspect(aLineAspect); - aHilightGroup->AddPrimitiveArray(myExternalArray); - break; - } - } - if( thePM->IsImmediateModeOn() ) - thePM->AddToImmediateList( aHighlightPrs ); - -} - - - -//for auto select -void Sample2D_Face::ComputeSelection (const Handle(SelectMgr_Selection)& theSelection, - const Standard_Integer /*theMode*/) -{ - if(myshape.IsNull()) - return; - - if(mySeq_FORWARD.Length()==0 && - mySeq_REVERSED.Length()==0 && - mySeq_INTERNAL.Length()==0 && - mySeq_EXTERNAL.Length()==0) return; - - //create entity owner for every part of the face - //set different priorities for primitives of different orientation - Handle(SelectMgr_EntityOwner) anOwner_Forward = new SelectMgr_EntityOwner(this,7); - Handle(SelectMgr_EntityOwner) anOwner_Reversed = new SelectMgr_EntityOwner(this,6); - Handle(SelectMgr_EntityOwner) anOwner_Internal = new SelectMgr_EntityOwner(this,5); - Handle(SelectMgr_EntityOwner) anOwner_External = new SelectMgr_EntityOwner(this,4); - - //create a sensitive for every part - Handle(Select3D_SensitiveGroup) aForwardGroup = new Select3D_SensitiveGroup(anOwner_Forward); - Handle(Select3D_SensitiveGroup) aReversedGroup = new Select3D_SensitiveGroup(anOwner_Reversed); - Handle(Select3D_SensitiveGroup) aInternalGroup = new Select3D_SensitiveGroup(anOwner_Internal); - Handle(Select3D_SensitiveGroup) aExternalGroup = new Select3D_SensitiveGroup(anOwner_External); - - Standard_Integer aLength = mySeq_FORWARD.Length(); - for(Standard_Integer i=1;i<=aLength;++i) - { - Handle(Select3D_SensitiveCurve) aSensitveCurve = new Select3D_SensitiveCurve(anOwner_Forward,mySeq_FORWARD(i)); - aForwardGroup->Add(aSensitveCurve); - } - theSelection->Add(aForwardGroup); - - aLength = mySeq_REVERSED.Length(); - for(Standard_Integer i=1;i<=aLength;++i) - { - Handle(Select3D_SensitiveCurve) aSensitveCurve = new Select3D_SensitiveCurve(anOwner_Reversed,mySeq_REVERSED(i)); - aReversedGroup->Add(aSensitveCurve); - } - theSelection->Add(aReversedGroup); - - aLength = mySeq_INTERNAL.Length(); - for(Standard_Integer i=1;i<=aLength;++i) - { - Handle(Select3D_SensitiveCurve) aSensitveCurve = new Select3D_SensitiveCurve(anOwner_Internal,mySeq_INTERNAL(i)); - aInternalGroup->Add(aSensitveCurve); - } - theSelection->Add(aInternalGroup); - - aLength = mySeq_EXTERNAL.Length(); - for(Standard_Integer i=1;i<=aLength;++i) - { - Handle(Select3D_SensitiveCurve) aSensitveCurve = new Select3D_SensitiveCurve(anOwner_External,mySeq_EXTERNAL(i)); - aExternalGroup->Add(aSensitveCurve); - } - theSelection->Add(aExternalGroup); -} - diff --git a/samples/mfc/standard/Common/Primitive/Sample2D_Face.h b/samples/mfc/standard/Common/Primitive/Sample2D_Face.h deleted file mode 100755 index 53cecc6f99..0000000000 --- a/samples/mfc/standard/Common/Primitive/Sample2D_Face.h +++ /dev/null @@ -1,81 +0,0 @@ -#ifndef _Sample2D_Face_HeaderFile -#define _Sample2D_Face_HeaderFile - -#include -#include -#include "TopoDS_Face.hxx" -#include -#include - -#include -class Sample2D_Face; -DEFINE_STANDARD_HANDLE(Sample2D_Face,AIS_InteractiveObject) -class Sample2D_Face : public AIS_InteractiveObject { - - - - -public: - - // Methods PUBLIC - // -Standard_EXPORT Sample2D_Face (const TopoDS_Shape& theFace); - -DEFINE_STANDARD_RTTIEXT(Sample2D_Face,AIS_InteractiveObject) - -private: - -//private fields - TopoDS_Shape myshape; - TColGeom_SequenceOfCurve mySeq_FORWARD; - TColGeom_SequenceOfCurve mySeq_REVERSED; - TColGeom_SequenceOfCurve mySeq_INTERNAL; - TColGeom_SequenceOfCurve mySeq_EXTERNAL; - - Handle(Graphic3d_ArrayOfPolylines) myForwardArray; - Handle(Graphic3d_ArrayOfPolylines) myReversedArray; - Handle(Graphic3d_ArrayOfPolylines) myInternalArray; - Handle(Graphic3d_ArrayOfPolylines) myExternalArray; - - Standard_Integer myForwardNum, - myReversedNum, - myInternalNum, - myExternalNum, - myForwardBounds, - myReversedBounds, - myInternalBounds, - myExternalBounds; - -//private methods - void FillData(Standard_Boolean isSizesRecomputed = Standard_False); - void ClearSelected (); - void HilightSelected( const Handle(PrsMgr_PresentationManager)& thePM, - const SelectMgr_SequenceOfOwner& theOwners); - - void HilightOwnerWithColor( const Handle(PrsMgr_PresentationManager)& thePM, - const Handle(Prs3d_Drawer)& theStyle, - const Handle(SelectMgr_EntityOwner)& theOwner); - - void Compute ( const Handle(PrsMgr_PresentationManager)& thePresentationManager, - const Handle(Prs3d_Presentation)& thePresentation, - const Standard_Integer theMode); - - void ComputeSelection (const Handle(SelectMgr_Selection)& theSelection, - const Standard_Integer theMode); - - void DrawMarker(const Handle(Geom2d_TrimmedCurve)& theCurve, const Handle(Prs3d_Presentation)& thePresentation); - -public: - Quantity_Color myFORWARDColor; - Quantity_Color myREVERSEDColor; - Quantity_Color myINTERNALColor; - Quantity_Color myEXTERNALColor; - Standard_Integer myWidthIndex; - Standard_Integer myTypeIndex ; - - TopoDS_Shape& Shape(){return myshape;} - void SetFace (const TopoDS_Shape& theFace){myshape = theFace;} - -}; - -#endif diff --git a/samples/mfc/standard/Common/Primitive/Sample2D_Image.cpp b/samples/mfc/standard/Common/Primitive/Sample2D_Image.cpp deleted file mode 100755 index 957791b9a1..0000000000 --- a/samples/mfc/standard/Common/Primitive/Sample2D_Image.cpp +++ /dev/null @@ -1,49 +0,0 @@ -#include "stdafx.h" - -#include "Sample2D_Image.h" - -#include -#include - -IMPLEMENT_STANDARD_RTTIEXT(Sample2D_Image,AIS_Shape) - -Sample2D_Image::Sample2D_Image(TCollection_AsciiString& aFileName, - const Standard_Real X, - const Standard_Real Y, - const Standard_Real aScale) - :AIS_Shape(TopoDS_Shape()) -{ - myFilename = aFileName; - myX = X; - myY = Y; - myScale = aScale; -} -void Sample2D_Image::MakeShape() -{ - Standard_Real coeff = 1.0; - Handle(Image_AlienPixMap) anImage = new Image_AlienPixMap(); - if (anImage->Load (myFilename)) - { - coeff = Standard_Real(anImage->Height()) / Standard_Real(anImage->Width()) * myScale; - } - - TopoDS_Edge E1 = BRepBuilderAPI_MakeEdge(gp_Pnt(myX,myY,0.), gp_Pnt(100*myScale+myX,myY,0.)); - TopoDS_Edge E2 = BRepBuilderAPI_MakeEdge(gp_Pnt(100*myScale+myX,myY,0.), gp_Pnt(100*myScale+myX,100*coeff+myY,0.)); - TopoDS_Edge E3 = BRepBuilderAPI_MakeEdge(gp_Pnt(100*myScale+myX,100*coeff+myY,0.), gp_Pnt(myX,100*coeff+myY,0.)); - TopoDS_Edge E4 = BRepBuilderAPI_MakeEdge(gp_Pnt(myX,100*coeff+myY,0.), gp_Pnt(myX,myY,0.)); - TopoDS_Wire anImageBounds = BRepBuilderAPI_MakeWire(E1,E2,E3,E4); - myFace = BRepBuilderAPI_MakeFace(gp_Pln(gp_Pnt(0,0,0),gp_Dir(0,0,1)),anImageBounds); -} - -void Sample2D_Image::SetContext(const Handle(AIS_InteractiveContext)& theContext) -{ - if(theContext.IsNull() || theContext->CurrentViewer().IsNull()) return; - AIS_InteractiveObject::SetContext(theContext); - MakeShape(); - this->Set(TopoDS_Shape(myFace)); - myDrawer->SetShadingAspect (new Prs3d_ShadingAspect()); - Handle(Graphic3d_Texture2Dmanual) aTexture = new Graphic3d_Texture2Dmanual (myFilename); - aTexture->DisableModulate(); - myDrawer->ShadingAspect()->Aspect()->SetTextureMap (aTexture); - myDrawer->ShadingAspect()->Aspect()->SetTextureMapOn(); -} diff --git a/samples/mfc/standard/Common/Primitive/Sample2D_Image.h b/samples/mfc/standard/Common/Primitive/Sample2D_Image.h deleted file mode 100755 index 0de9ef8311..0000000000 --- a/samples/mfc/standard/Common/Primitive/Sample2D_Image.h +++ /dev/null @@ -1,68 +0,0 @@ -#ifndef _Sample2D_Image_HeaderFile -#define _Sample2D_Image_HeaderFile -#include -#include - -#include -#include -#include -#include -#include -#include -#include -class Sample2D_Image; -DEFINE_STANDARD_HANDLE(Sample2D_Image,AIS_Shape) -class Sample2D_Image : public AIS_Shape { - -public: - -Standard_EXPORT Sample2D_Image(TCollection_AsciiString& aFileName, - const Standard_Real X = 0.0, - const Standard_Real Y = 0.0, - const Standard_Real aScale = 1.0); -Standard_EXPORT inline virtual void GetCoord(Standard_Real& X,Standard_Real& Y) const; -Standard_EXPORT inline virtual void SetCoord(const Standard_Real X,const Standard_Real Y) ; -Standard_EXPORT inline Standard_Real GetScale() const; -Standard_EXPORT inline void SetScale(const Standard_Real aNewScale) ; -Standard_EXPORT virtual void SetContext(const Handle(AIS_InteractiveContext)& theContext) ; - -DEFINE_STANDARD_RTTIEXT(Sample2D_Image,AIS_Shape) -private: - void MakeShape(); -protected: -TopoDS_Face myFace; -TCollection_AsciiString myFilename; -Standard_Real myX; -Standard_Real myY; -Standard_Real myScale; - -}; - -// other inline functions and methods (like "C++: function call" methods) -// - -inline void Sample2D_Image::GetCoord(Standard_Real& X, Standard_Real& Y) const -{ - X = myX; - Y = myY; -} - -inline void Sample2D_Image::SetCoord(const Standard_Real X, const Standard_Real Y) -{ - myX = X; - myY = Y; -} - -inline Standard_Real Sample2D_Image::GetScale() const -{ - return myScale; -} - -inline void Sample2D_Image::SetScale(const Standard_Real aNewScale) -{ - myScale = aNewScale; -} - - - -#endif diff --git a/samples/mfc/standard/Common/Primitive/Sample2D_Markers.cpp b/samples/mfc/standard/Common/Primitive/Sample2D_Markers.cpp deleted file mode 100755 index 8485517693..0000000000 --- a/samples/mfc/standard/Common/Primitive/Sample2D_Markers.cpp +++ /dev/null @@ -1,57 +0,0 @@ -#include "stdafx.h" - -#include "Sample2D_Markers.h" - -IMPLEMENT_STANDARD_RTTIEXT(Sample2D_Markers,AIS_InteractiveObject) - -// generic marker -Sample2D_Markers::Sample2D_Markers (const Standard_Real theXPosition, - const Standard_Real theYPosition, - const Aspect_TypeOfMarker theMarkerType, - const Quantity_Color theColor, - const Standard_Real theScaleOrId) - :AIS_InteractiveObject(),myArrayOfPoints (new Graphic3d_ArrayOfPoints (1)) -{ - myXPosition = theXPosition; - myYPosition = theYPosition; - myMarkerType = theMarkerType; - myColor = theColor; - myIndex = theScaleOrId; -} - -Sample2D_Markers::Sample2D_Markers (const Standard_Real theXPosition, - const Standard_Real theYPosition, - const Handle(Graphic3d_ArrayOfPoints)& theArrayOfPoints, - const Aspect_TypeOfMarker theMarkerType, - const Quantity_Color theColor, - const Standard_Real theScaleOrId) - :AIS_InteractiveObject(),myArrayOfPoints (new Graphic3d_ArrayOfPoints (6)) -{ - myXPosition = theXPosition; - myYPosition = theYPosition; - myMarkerType = theMarkerType; - myColor = theColor; - myIndex = theScaleOrId; - myArrayOfPoints = theArrayOfPoints; -} - - -void Sample2D_Markers::Compute (const Handle(PrsMgr_PresentationManager)& /*aPresentationManager*/, - const Handle(Prs3d_Presentation)& aPresentation, - const Standard_Integer /*aMode*/) -{ - if(myMarkerType == Aspect_TOM_USERDEFINED) - { - Handle(Graphic3d_AspectMarker3d) aMarker = new Graphic3d_AspectMarker3d(Aspect_TOM_POINT,myColor,myIndex); - aPresentation->CurrentGroup()->SetGroupPrimitivesAspect(aMarker); - aPresentation->CurrentGroup()->AddPrimitiveArray (myArrayOfPoints); - } - else - { - Handle(Graphic3d_AspectMarker3d) aMarker = new Graphic3d_AspectMarker3d(myMarkerType,myColor,myIndex); - aPresentation->CurrentGroup()->SetPrimitivesAspect(aMarker); - Handle(Graphic3d_ArrayOfPoints) anArrayOfPoints = new Graphic3d_ArrayOfPoints (1); - anArrayOfPoints->AddVertex (myXPosition, myYPosition, 0); - aPresentation->CurrentGroup()->AddPrimitiveArray (anArrayOfPoints); - } -} diff --git a/samples/mfc/standard/Common/Primitive/Sample2D_Markers.h b/samples/mfc/standard/Common/Primitive/Sample2D_Markers.h deleted file mode 100755 index 0aa3b20333..0000000000 --- a/samples/mfc/standard/Common/Primitive/Sample2D_Markers.h +++ /dev/null @@ -1,71 +0,0 @@ -#ifndef _Sample2D_Markers_HeaderFile -#define _Sample2D_Markers_HeaderFile - -#include -#include -#include -class Sample2D_Markers; -DEFINE_STANDARD_HANDLE(Sample2D_Markers,AIS_InteractiveObject) -class Sample2D_Markers : public AIS_InteractiveObject { - -enum Sample2D_CurrentTypeOfMarker { -Sample2D_CTOM_Generic, -Sample2D_CTOM_Polyline, -Sample2D_CTOM_Circle, -Sample2D_CTOM_Ellips -} ; - -public: - - // Generic marker - Standard_EXPORT Sample2D_Markers (const Standard_Real theXPosition, - const Standard_Real theYPosition, - const Aspect_TypeOfMarker theMarkerType, - const Quantity_Color theColor, - const Standard_Real theScaleOrId=5.0); - - // Polyline marker - Standard_EXPORT Sample2D_Markers (const Standard_Real theXPosition, - const Standard_Real theYPosition, - const Handle(Graphic3d_ArrayOfPoints)& theArrayOfPoints, - const Aspect_TypeOfMarker theMarkerType, - const Quantity_Color theColor, - const Standard_Real theScaleOrId=2.0); - - -DEFINE_STANDARD_RTTIEXT(Sample2D_Markers,AIS_InteractiveObject) - -private: - -virtual void Compute (const Handle(PrsMgr_PresentationManager)& /*aPresentationManager*/, - const Handle(Prs3d_Presentation)& /*aPresentation*/, - const Standard_Integer /*aMode*/); - -virtual void ComputeSelection (const Handle(SelectMgr_Selection)& /*aSelection*/, - const Standard_Integer /*aMode*/) {} - - -Standard_EXPORT virtual void SetContext(const Handle(AIS_InteractiveContext)& /*theContext*/) {} - - - -Sample2D_CurrentTypeOfMarker myCurrentTypeOfMarker; -Standard_Real myXPosition; -Standard_Real myYPosition; -Aspect_TypeOfMarker myMarkerType; -Quantity_Color myColor; -Standard_Real myWidth; -Standard_Real myHeight; -Standard_Real myIndex;//myScaleOrId -// specific polyline marker -Handle(Graphic3d_ArrayOfPoints) myArrayOfPoints; -}; - - - -// other inCurve functions and methods (like "C++: function call" methods) -// - - - -#endif diff --git a/samples/mfc/standard/Common/User_Cylinder.cxx b/samples/mfc/standard/Common/User_Cylinder.cxx deleted file mode 100755 index 815b73858f..0000000000 --- a/samples/mfc/standard/Common/User_Cylinder.cxx +++ /dev/null @@ -1,478 +0,0 @@ -#include - -#include - -// Implementation of Handle and type mgt -// - -IMPLEMENT_STANDARD_RTTIEXT(User_Cylinder,AIS_InteractiveObject) - -#include "ColoredMeshDlg.h" - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include - -// Constructors implementation -// - -User_Cylinder::User_Cylinder(const Standard_Real R, const Standard_Real H) : -AIS_InteractiveObject(PrsMgr_TOP_ProjectorDependent) -{ - BRepPrimAPI_MakeCylinder S(R,H); - myShape = S.Shape(); - SetHilightMode(0); - myDrawer->SetShadingAspect(new Prs3d_ShadingAspect()); - myColor = Quantity_NOC_GRAY; -} - -User_Cylinder::User_Cylinder(const gp_Ax2 CylAx2, const Standard_Real R, const Standard_Real H) : -AIS_InteractiveObject(PrsMgr_TOP_ProjectorDependent) - -{ - BRepPrimAPI_MakeCylinder S(CylAx2,R,H); - BRepBuilderAPI_NurbsConvert aNurbsConvert(S.Shape()); - myShape = aNurbsConvert.Shape(); - SetHilightMode(0); - myDrawer->SetShadingAspect(new Prs3d_ShadingAspect()); - myColor = Quantity_NOC_KHAKI4; -} - -void User_Cylinder::Compute(const Handle(PrsMgr_PresentationManager)& /*aPresentationManager*/, - const Handle(Prs3d_Presentation)& aPresentation, - const Standard_Integer aMode ) -{ - switch (aMode) { -case AIS_WireFrame: - { - StdPrs_WFShape::Add(aPresentation,myShape, myDrawer ); - break; - } -case AIS_Shaded: - { - Standard_Real aTransparency = Transparency(); - Graphic3d_NameOfMaterial aMaterial = Material(); - myDrawer->ShadingAspect()->SetMaterial(aMaterial); - myDrawer->ShadingAspect()->SetColor(myColor); - myDrawer->ShadingAspect()->SetTransparency (aTransparency); - StdPrs_ShadedShape::Add(aPresentation,myShape, myDrawer); - break; - } -case 6: //color - { - BRepTools::Clean(myShape); - BRepTools::Update(myShape); - - Handle(Graphic3d_StructureManager) aStrucMana = GetContext()->MainPrsMgr()->StructureManager(); - - Handle(Graphic3d_Group) mygroup = aPresentation->CurrentGroup(); - myAspect = (new Prs3d_ShadingAspect())->Aspect(); - Graphic3d_MaterialAspect material = myAspect->FrontMaterial(); - material.SetAmbientColor (Quantity_NOC_BLACK); - material.SetDiffuseColor (Quantity_NOC_BLACK); - material.SetSpecularColor(Quantity_NOC_BLACK); - material.SetEmissiveColor(Quantity_NOC_BLACK); - myAspect->SetFrontMaterial(material); - - mygroup->SetPrimitivesAspect(myAspect); - myAspect->SetEdgeOn(); - - myDeflection = StdPrs_ToolTriangulatedShape::GetDeflection(myShape,myDrawer); - BRepMesh_IncrementalMesh(myShape,myDeflection); - - myX1OnOff = Standard_False; - myXBlueOnOff = Standard_False; - myXGreenOnOff =Standard_False; - myXRedOnOff = Standard_False; - myY1OnOff = Standard_False; - myYBlueOnOff = Standard_False; - myYGreenOnOff = Standard_False; - myYRedOnOff = Standard_False; - myZ1OnOff = Standard_False; - myZBlueOnOff =Standard_False; - myZGreenOnOff = Standard_False; - myZRedOnOff = Standard_False; - - CColoredMeshDlg Dlg(NULL); - Dlg.DoModal(); - - myX1OnOff = Dlg.X1OnOff; - - myXBlueOnOff = Dlg.m_CheckXBlueOnOff != 0; - myXGreenOnOff = Dlg.m_CheckXGreenOnOff != 0; - myXRedOnOff = Dlg.m_CheckXRedOnOff != 0; - - myY1OnOff = Dlg.Y1OnOff; - - myYBlueOnOff = Dlg.m_CheckYBlueOnOff != 0; - myYGreenOnOff = Dlg.m_CheckYGreenOnOff != 0; - myYRedOnOff = Dlg.m_CheckYRedOnOff != 0; - - myZ1OnOff = Dlg.Z1OnOff; - - myZBlueOnOff = Dlg.m_CheckZBlueOnOff != 0; - myZGreenOnOff = Dlg.m_CheckZGreenOnOff != 0; - myZRedOnOff = Dlg.m_CheckZRedOnOff != 0; - - // Adds a triangulation of the shape myShape to its topological data structure. - // This triangulation is computed with the deflection myDeflection. - -#ifdef DEBUG - std::cout <<"Deflection = " << myDeflection << "\n" << std::endl; -#endif - - Standard_Integer NumFace; - TopExp_Explorer ExpFace; - - //khr --> - - gp_Pnt H (0,0,0); - gp_Pnt B (0,0,1000000000); - for( NumFace=0,ExpFace.Init(myShape,TopAbs_FACE); ExpFace.More(); ExpFace.Next(),NumFace++ ) - { - TopoDS_Face myFace = TopoDS::Face(ExpFace.Current()); - TopLoc_Location myLocation = myFace.Location(); - -#ifdef DEBUG - std::cout << "J\'explore actuellement la face " << NumFace << "\n" << std::endl; -#endif - Handle(Poly_Triangulation) myT = BRep_Tool::Triangulation(myFace, myLocation); - // Returns the Triangulation of the face. It is a null handle if there is no triangulation. - - if (myT.IsNull()) - { -#ifdef DEBUG - // std::cout << "Triangulation of the face "<< i <<" is null \n"<< std::endl; -#endif - return; - } - - Standard_Integer nnn = myT->NbTriangles(); // nnn : nombre de triangles - Standard_Integer nt, n1, n2, n3 = 0;// nt : triangle courant - // ni : sommet i du triangle courant - //recherche du pt "haut" et du pt "bas - for (nt = 1; nt <= nnn; nt++) - { - // triangles(nt).Get(n1,n2,n3); // le triangle est n1,n2,n3 - - if (myFace.Orientation() == TopAbs_REVERSED) // si la face est "reversed" - myT->Triangle (nt).Get (n1,n3,n2); // le triangle est n1,n3,n2 - else - myT->Triangle (nt).Get (n1,n2,n3); // le triangle est n1,n2,n3 - - if (TriangleIsValid (myT->Node (n1), myT->Node (n2), myT->Node (n3)) ) - { // Associates a vertexNT to each node - gp_Pnt p = myT->Node (n1).Transformed (myLocation.Transformation()); - gp_Pnt q = myT->Node (n2).Transformed (myLocation.Transformation()); - gp_Pnt r = myT->Node (n3).Transformed (myLocation.Transformation()); - - if (p.Z() > H.Z()) H=p; - if (q.Z() > H.Z()) H=q; - if (r.Z() > H.Z()) H=r; - if (p.Z() < B.Z()) B=p; - if (q.Z() < B.Z()) B=q; - if (r.Z() < B.Z()) B=r; - } - } - } - - //khr <-- - - - for( NumFace=0,ExpFace.Init(myShape,TopAbs_FACE); ExpFace.More(); ExpFace.Next(),NumFace++ ) - { - TopoDS_Face myFace = TopoDS::Face(ExpFace.Current()); - TopLoc_Location myLocation = myFace.Location(); - -#ifdef DEBUG - std::cout << "J\'explore actuellement la face " << NumFace << "\n" << std::endl; -#endif - Handle(Poly_Triangulation) myT = BRep_Tool::Triangulation(myFace, myLocation); - // Returns the Triangulation of the face. It is a null handle if there is no triangulation. - - if (myT.IsNull()) - { -#ifdef DEBUG - //std::cout << "Triangulation of the face "<< i <<" is null \n"<< std::endl; -#endif - return; - } - Poly_Connect pc(myT); - TColgp_Array1OfPnt Nodes (1, myT->NbNodes()); - for (Standard_Integer in = 1; in <= myT->NbNodes(); in++) - { - Nodes.SetValue(in, myT->Node (in)); - } - BAR = GProp_PGProps::Barycentre(Nodes); - - TColgp_Array1OfDir myNormal(Nodes.Lower(), Nodes.Upper()); - - StdPrs_ToolTriangulatedShape::Normal(myFace, pc, myNormal); - BRepTools::UVBounds(myFace,Umin, Umax, Vmin, Vmax); - dUmax = (Umax - Umin); - dVmax = (Vmax - Vmin); - - Standard_Integer nnn = myT->NbTriangles(); // nnn : nombre de triangles - Standard_Integer nt, n1, n2, n3 = 0;// nt : triangle courant - // ni : sommet i du triangle courant - - //recherche du pt "haut" et du pt "bas - // gp_Pnt H (0,0,0); - // gp_Pnt B (0,0,1000000000); - - for (nt = 1; nt <= nnn; nt++) - { - // triangles(nt).Get(n1,n2,n3); // le triangle est n1,n2,n3 - if (myFace.Orientation() == TopAbs_REVERSED) // si la face est "reversed" - myT->Triangle (nt).Get (n1,n3,n2); // le triangle est n1,n3,n2 - else - myT->Triangle (nt).Get (n1,n2,n3); // le triangle est n1,n2,n3 - - if (TriangleIsValid (Nodes(n1),Nodes(n2),Nodes(n3)) ) - { // Associates a vertexNT to each node - gp_Pnt p = myT->Node(n1).Transformed(myLocation.Transformation()); - gp_Pnt q = myT->Node(n2).Transformed(myLocation.Transformation()); - gp_Pnt r = myT->Node(n3).Transformed(myLocation.Transformation()); - } - } - - Handle(Graphic3d_ArrayOfTriangles) aOP = new Graphic3d_ArrayOfTriangles(3 * nnn, 0, Standard_True, Standard_True); - - for (nt = 1; nt <= nnn; nt++) - { -#ifdef DEBUG - std::cout << "On traite actuellement le triangle : "<< nt <<"\n"; -#endif - if (myFace.Orientation() == TopAbs_REVERSED) // si la face est "reversed" - myT->Triangle (nt).Get (n1,n3,n2); // le triangle est n1,n3,n2 - else - myT->Triangle (nt).Get (n1,n2,n3); // le triangle est n1,n2,n3 - - if (TriangleIsValid (Nodes(n1),Nodes(n2),Nodes(n3)) ) - { // Associates a vertexNT to each node - - TColgp_Array1OfPnt Points(1,3); - - gp_Pnt p = myT->Node(n1).Transformed(myLocation.Transformation()); - gp_Pnt q = myT->Node(n2).Transformed(myLocation.Transformation()); - gp_Pnt r = myT->Node(n3).Transformed(myLocation.Transformation()); - - Points(1).SetCoord(p.X(), p.Y(), p.Z()); - Points(2).SetCoord(q.X(), q.Y(), q.Z()); - Points(3).SetCoord(r.X(), r.Y(), r.Z()); - - aOP->AddVertex(Points(1), myNormal(n1), Color(p,B.Z(),H.Z(),Dlg.Colorization)); - aOP->AddVertex(Points(2), myNormal(n2), Color(q,B.Z(),H.Z(),Dlg.Colorization)); - aOP->AddVertex(Points(3), myNormal(n3), Color(r,B.Z(),H.Z(),Dlg.Colorization)); - } // end of "if the triangle is valid - } // end of the "parcours" of the triangles - - aPresentation->CurrentGroup()->AddPrimitiveArray (aOP); - - mygroup->SetGroupPrimitivesAspect(myAspect); - }// end of the exploration of the shape in faces - - break; - } - } -} - -void User_Cylinder::computeHLR (const Handle(Graphic3d_Camera)& aProjector, - const Handle(TopLoc_Datum3D)& , - const Handle(Prs3d_Presentation)& aPresentation) -{ - Handle (Prs3d_Drawer) aDefDrawer = GetContext()->DefaultDrawer(); - if (aDefDrawer->DrawHiddenLine()) - myDrawer->EnableDrawHiddenLine(); - else - myDrawer->DisableDrawHiddenLine(); - StdPrs_HLRPolyShape aTool; - aTool.ComputeHLR (aPresentation,myShape,myDrawer,aProjector); -} - -void User_Cylinder::ComputeSelection(const Handle(SelectMgr_Selection)& aSelection, - const Standard_Integer aMode) -{ - switch(aMode) - { - case 0: - StdSelect_BRepSelectionTool::Load(aSelection,this,myShape,TopAbs_SHAPE, 0.01, 0.1); - break; - case 4: - StdSelect_BRepSelectionTool::Load(aSelection,this,myShape,TopAbs_FACE, 0.01, 0.1); - break; - } -} - -Standard_Integer User_Cylinder::NbPossibleSelection() const -{ - return 2; -} - -Standard_Boolean User_Cylinder::AcceptShapeDecomposition() const -{ - return Standard_True; -} - -Standard_Boolean User_Cylinder::TriangleIsValid(const gp_Pnt& P1, const gp_Pnt& P2, const gp_Pnt& P3) const -{ - gp_Vec V1(P1,P2);// V1=(P1,P2) - gp_Vec V2(P2,P3);// V2=(P2,P3) - gp_Vec V3(P3,P1);// V3=(P3,P1) - - if ((V1.SquareMagnitude() > 1.e-10) && (V2.SquareMagnitude() > 1.e-10) && (V3.SquareMagnitude() > 1.e-10)) - { - V1.Cross(V2);// V1 = Normal - if (V1.SquareMagnitude() > 1.e-10) - return Standard_True; - else - return Standard_False; - } - else - return Standard_False; -} - -Quantity_Color User_Cylinder::Color(gp_Pnt& thePoint,Standard_Real AltMin,Standard_Real AltMax, - const Standard_Integer ColorizationMode) -{ - red =1; //initializing colors parameters - green=1; - blue =1; - switch ( ColorizationMode) - { - case 0 : //normal, vert/maron - { - Standard_Real Alt= thePoint.Z(); - - Standard_Real AltDelta; - - AltDelta = AltMax-AltMin; - - red = 0.5- ((0.5*(AltMax-Alt))/(AltDelta)); - //Standard_Real A = 7*Alt-7*AltMin; - green = (3*AltMax-AltMin)/(3*AltMax-AltMin+(7*Alt-7*AltMin)); - blue = 0 ; - - Quantity_Color color; - color.SetValues(red,green,blue, Quantity_TOC_RGB); - return color; - break; - }//end case 0 - - case 1 : //mer-neige - { - Standard_Real Alt= thePoint.Z(); - - Standard_Real b =AltMax-AltMin; - Standard_Real a= AltMax-thePoint.Z(); - - red =1; - green=1; - blue =1; - if (0 -#endif - -#include -#include -#include -#include -// Handle definition -// -class User_Cylinder; -DEFINE_STANDARD_HANDLE(User_Cylinder,AIS_InteractiveObject) - -class User_Cylinder: public AIS_InteractiveObject { -public: - Standard_EXPORT User_Cylinder(const Standard_Real R, const Standard_Real H); - Standard_EXPORT User_Cylinder(const gp_Ax2 CylAx2, const Standard_Real R, const Standard_Real H); - - ~User_Cylinder(){}; - - Standard_Boolean AcceptShapeDecomposition() const; - Standard_Integer NbPossibleSelection() const; - void SetColor(const Quantity_Color &aColor); - -private: - void Compute(const Handle(PrsMgr_PresentationManager)& aPresentationManager, - const Handle(Prs3d_Presentation)& aPresentation, - const Standard_Integer aMode = 0) ; - void ComputeSelection(const Handle(SelectMgr_Selection)& aSelection, - const Standard_Integer aMode) ; - void computeHLR (const Handle(Graphic3d_Camera)& aProjector, const Handle(TopLoc_Datum3D)& theTrsf, const Handle(Prs3d_Presentation)& aPresentation); - Standard_Boolean TriangleIsValid(const gp_Pnt& P1,const gp_Pnt& P2,const gp_Pnt& P3) const; - Quantity_Color Color(gp_Pnt& thePoint,Standard_Real AltMin,Standard_Real AltMax, const Standard_Integer ColorizationMode) ; - -// some methods like DynamicType() or IsKind() -// -DEFINE_STANDARD_RTTIEXT(User_Cylinder,AIS_InteractiveObject) -private: - Quantity_Color myColor; - TopoDS_Shape myShape; - - Handle(Graphic3d_AspectFillArea3d) myAspect; - Standard_Real myDeflection; - - Standard_Boolean myX1OnOff; - Standard_Boolean myXBlueOnOff; - Standard_Boolean myXGreenOnOff; - Standard_Boolean myXRedOnOff; - Standard_Boolean myY1OnOff; - Standard_Boolean myYBlueOnOff; - Standard_Boolean myYGreenOnOff; - Standard_Boolean myYRedOnOff; - Standard_Boolean myZ1OnOff; - Standard_Boolean myZBlueOnOff; - Standard_Boolean myZGreenOnOff; - Standard_Boolean myZRedOnOff; - - gp_Pnt BAR; - - Standard_Real Umin; - Standard_Real Umax; - Standard_Real Vmin; - Standard_Real Vmax; - Standard_Real dUmax; - Standard_Real dVmax; - - Standard_Real red; - Standard_Real green; - Standard_Real blue; - - - -//Handle(Graphic3d_Texture2Dmanual) mytexture; - -}; -#endif diff --git a/samples/mfc/standard/ReadMe.md b/samples/mfc/standard/ReadMe.md index 4ab75edf4f..2b2b9a19aa 100644 --- a/samples/mfc/standard/ReadMe.md +++ b/samples/mfc/standard/ReadMe.md @@ -5,14 +5,8 @@ Visual C++ programming samples for Windows platform containing illustrating how * Geometry * Modeling - * Viewer2d - * Viewer3d * ImportExport - * Ocaf - * Triangulation * HLR - * Animation - * Convert @figure{samples_mvc.png} @@ -39,10 +33,10 @@ To run the Open CASCADE Technology samples, use command: execute run.bat [vc10|vc11|vc12|vc14] [win32|win64] [Release|Debug] [SampleName] ~~~~ -To run the **Animation** sample, use command: +To run the **Geometry** sample, use command: ~~~~ -execute run.bat vc10 win64 Debug Animation +execute run.bat vc10 win64 Debug Geometry ~~~~ @@ -61,4 +55,4 @@ To run all sample projects in MS Visual C++ at once, use command: execute msvc.bat vc10 win64 Debug ~~~~ -Note: make sure that your *PATH* environment variable contains a directory, where *msdev.exe* is located. \ No newline at end of file +Note: make sure that your *PATH* environment variable contains a directory, where *msdev.exe* is located. diff --git a/samples/mfc/standard/mfcsample/CMakeLists.txt b/samples/mfc/standard/mfcsample/CMakeLists.txt index ee9c8b20c5..8b759a89d8 100644 --- a/samples/mfc/standard/mfcsample/CMakeLists.txt +++ b/samples/mfc/standard/mfcsample/CMakeLists.txt @@ -31,7 +31,6 @@ set (COMMON_SOURCE_FILES ${MFC_STANDARD_COMMON_SAMPLES_DIR}/AISDialogs.cpp ${MFC_STANDARD_COMMON_SAMPLES_DIR}/OCC_StereoConfigDlg.cpp ${MFC_STANDARD_COMMON_SAMPLES_DIR}/ParamsFacesPage.cpp ${MFC_STANDARD_COMMON_SAMPLES_DIR}/ResultDialog.cpp - ${MFC_STANDARD_COMMON_SAMPLES_DIR}/User_Cylinder.cxx ${MFC_STANDARD_COMMON_SAMPLES_DIR}/ColoredMeshDlg.cpp ${MFC_STANDARD_COMMON_SAMPLES_DIR}/DimensionDlg.cpp ${MFC_STANDARD_COMMON_SAMPLES_DIR}/LengthParamsEdgePage.cpp @@ -53,15 +52,6 @@ set (COMMON_ISESSION2D_DIR ${MFC_STANDARD_COMMON_SAMPLES_DIR}/ISession2 set (COMMON_ISESSION2D_HEADER_FILES ${COMMON_ISESSION2D_DIR}/ISession2D_Shape.h ) set (COMMON_ISESSION2D_SOURCE_FILES ${COMMON_ISESSION2D_DIR}/ISession2D_Shape.cpp ) -# Common Primitive -set (COMMON_PRIMITIVE_DIR ${MFC_STANDARD_COMMON_SAMPLES_DIR}/Primitive) -set (COMMON_PRIMITIVE_HEADER_FILES ${COMMON_PRIMITIVE_DIR}/Sample2D_Face.h - ${COMMON_PRIMITIVE_DIR}/Sample2D_Image.h - ${COMMON_PRIMITIVE_DIR}/Sample2D_Markers.h ) -set (COMMON_PRIMITIVE_SOURCE_FILES ${COMMON_PRIMITIVE_DIR}/Sample2D_Face.cpp - ${COMMON_PRIMITIVE_DIR}/Sample2D_Image.cpp - ${COMMON_PRIMITIVE_DIR}/Sample2D_Markers.cpp ) - # Common Resource2D set (COMMON_RESOURCE2D_DIR ${MFC_STANDARD_COMMON_SAMPLES_DIR}/Resource2D) set (COMMON_RESOURCE2D_HEADER_FILES ${COMMON_RESOURCE2D_DIR}/CircularGrid.h @@ -112,14 +102,12 @@ set (COMMON_RESOURCE_FILES ${COMMON_RESOURCE_DIR}/2dChildFrameTB.bmp # groups in the VS solution source_group ( "Header Files" FILES ${COMMON_HEADER_FILES} ${COMMON_IE_HEADER_FILES} - ${COMMON_PRIMITIVE_HEADER_FILES} ${COMMON_RESOURCE2D_HEADER_FILES} ${COMMON_ISESSION2D_HEADER_FILES}) source_group ("Source Files" FILES ${mfcsample_SOURCE_FILES} ${COMMON_SOURCE_FILES} ${COMMON_IE_SOURCE_FILES} - ${COMMON_PRIMITIVE_SOURCE_FILES} ${COMMON_RESOURCE2D_SOURCE_FILES} ${COMMON_ISESSION2D_SOURCE_FILES}) @@ -131,8 +119,6 @@ add_library ( mfcsample ${mfcsample_SOURCE_FILES} ${COMMON_SOURCE_FILES} ${COMMON_IE_HEADER_FILES} ${COMMON_IE_SOURCE_FILES} - ${COMMON_PRIMITIVE_HEADER_FILES} - ${COMMON_PRIMITIVE_SOURCE_FILES} ${COMMON_RESOURCE2D_HEADER_FILES} ${COMMON_RESOURCE2D_SOURCE_FILES} ${COMMON_ISESSION2D_HEADER_FILES} @@ -163,7 +149,6 @@ include_directories( ${CMAKE_BINARY_DIR}/inc ${MFC_STANDARD_COMMON_SAMPLES_DIR} ${COMMON_IE_DIR} ${COMMON_ISESSION2D_DIR} - ${COMMON_PRIMITIVE_DIR} ${COMMON_RESOURCE2D_DIR}) # OCCT libraries for using diff --git a/samples/mfc/standard/mfcsample/adm/win/vc10/mfcsample.vcxproj b/samples/mfc/standard/mfcsample/adm/win/vc10/mfcsample.vcxproj index 52e741b35b..4394b3b834 100644 --- a/samples/mfc/standard/mfcsample/adm/win/vc10/mfcsample.vcxproj +++ b/samples/mfc/standard/mfcsample/adm/win/vc10/mfcsample.vcxproj @@ -576,22 +576,6 @@ Create ..\Common\stdafx.h - - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - Disabled %(AdditionalIncludeDirectories) @@ -640,39 +624,6 @@ %(AdditionalIncludeDirectories) %(PreprocessorDefinitions) - - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - - - - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - Disabled - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - EnableFastChecks - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - MaxSpeed - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - Disabled %(AdditionalIncludeDirectories) @@ -729,13 +680,9 @@ - - - - diff --git a/samples/mfc/standard/mfcsample/adm/win/vc10/mfcsample.vcxproj.filters b/samples/mfc/standard/mfcsample/adm/win/vc10/mfcsample.vcxproj.filters index 9a0cc52520..712ec1084b 100644 --- a/samples/mfc/standard/mfcsample/adm/win/vc10/mfcsample.vcxproj.filters +++ b/samples/mfc/standard/mfcsample/adm/win/vc10/mfcsample.vcxproj.filters @@ -9,10 +9,6 @@ {c0619ee9-00d5-4587-ac1c-7f8e97f7d314} cpp;c;cxx;rc;def;r;odl;idl;hpj;bat - - {6c21e485-b17c-4b50-a64e-8032b8867916} - cpp;c;cxx;rc;def;r;odl;idl;hpj;bat - {5cef5b98-dbfe-4dc1-9030-6333f582b9e6} @@ -24,9 +20,6 @@ {da6f5036-6fe5-479c-9407-d4c6bb3bc83f} h;hpp;hxx;hm;inl - - {f0d2a1cd-637f-4375-8949-9c5bc227c1a6} - {cad0c56e-8d9f-4728-9d66-f7188c6080d7} @@ -90,9 +83,6 @@ Source Files - - Source Files - Source Files\Resource2D-src @@ -102,15 +92,6 @@ Source Files\Resource2D-src - - Source Files\Primitive-src - - - Source Files\Primitive-src - - - Source Files\Primitive-src - Source Files\ISession2D-src @@ -199,9 +180,6 @@ Header Files - - Header Files - Header Files\Resource2D-headers @@ -211,15 +189,6 @@ Header Files\Resource2D-headers - - Header Files\Primitive-headers - - - Header Files\Primitive-headers - - - Header Files\Primitive-headers - Header Files\ISession2D-headers From 68a8b152605f992760d1b9b7e53d1d418424e6f5 Mon Sep 17 00:00:00 2001 From: kgv Date: Sun, 5 Dec 2021 00:36:18 +0300 Subject: [PATCH 157/639] 0032714: Documentation - drop VS2010 from minimal requirements --- dox/build/build_3rdparty/building_3rdparty.md | 2 +- dox/introduction/introduction.md | 57 +++++++++---------- dox/upgrade/upgrade.md | 3 + .../foundation_classes/foundation_classes.md | 8 +-- 4 files changed, 36 insertions(+), 34 deletions(-) diff --git a/dox/build/build_3rdparty/building_3rdparty.md b/dox/build/build_3rdparty/building_3rdparty.md index eaf038b7a6..e86495c6d9 100644 --- a/dox/build/build_3rdparty/building_3rdparty.md +++ b/dox/build/build_3rdparty/building_3rdparty.md @@ -241,7 +241,7 @@ VTK is an open-source, freely available software system for 3D computer graphics 2. Use CMake to generate VS projects for building the library: - Start CMake-GUI and select VTK folder as source path, and the folder of your choice for VS project and intermediate build data. - Click **Configure**. - - Select the VS version to be used from the ones you have installed (we recommend using VS 2010) and the architecture (32 or 64-bit). + - Select the VS version to be used from the ones you have installed (we recommend using VS 2015) and the architecture (32 or 64-bit). - Generate VS projects with default CMake options. The open solution *VTK.sln* will be generated in the build folder. 3. Build project VTK in Release mode. diff --git a/dox/introduction/introduction.md b/dox/introduction/introduction.md index ae4ce84234..38d3df50a0 100644 --- a/dox/introduction/introduction.md +++ b/dox/introduction/introduction.md @@ -234,7 +234,7 @@ This module handles various problems of interoperability between CAD systems, ca * @ref occt_user_guides__step "STEP" (AP203: Mechanical Design, this covers General 3D CAD; AP214: Automotive Design; AP242). * @ref occt_iges_1 "IGES" (up to 5.3). * **glTF** 2.0 reader and writer. - * **OBJ** mesh file reader. + * **OBJ** mesh file reader and writer. * **VRML** converter translates Open CASCADE shapes to VRML 1.0 files (Virtual Reality Modeling Language). * **STL** converter translates Open CASCADE shapes to STL files. STL (STtereoLithography) format is widely used for rapid prototyping (3D printing). @@ -341,7 +341,7 @@ The tables below describe the recommended software configurations for which OCCT | OS | Compiler | | --------- | ----------- | -| Windows | Microsoft Visual Studio: 2010 SP1, 2012 Update 4, 2013 Update 5, 2015 Update 3, 2017 1, 2019
, LLVM (ClangCL), GCC 4.3+ (Mingw-w64)| +| Windows | Microsoft Visual Studio: 2013 Update 5, 2015 Update 3, 2017 1, 2019, 2022
, LLVM (ClangCL), GCC 4.3+ (Mingw-w64)| | Linux | GNU gcc 4.3+
LLVM CLang 3.6+ | | OS X / macOS | XCode 6 or newer | | Android | NDK r12, GNU gcc 4.9 or newer | @@ -352,29 +352,28 @@ The tables below describe the recommended software configurations for which OCCT @subsection intro_req_libs Third-party libraries and tools The following third-party libraries and tools are not included in OCCT sources but are either required or can be optionally used for the indicated components of OCCT. -They are not needed if relevant component is not needed. +They are not needed if relevant component is not needed - it is possible building core OCCT modules without additional dependencies. Note that pre-built packages of many of the listed libraries are available at -https://www.opencascade.com/content/3rd-party-components +https://dev.opencascade.org/resources/download/3rd-party-components -| Component | Where to find | Used for | Required or optional | +| Component | Where to find | Used for | Purpose | | --------- | ------------- | -------- | -------------------- | -| CMake 2.8+ | https://cmake.org/ | Build from sources | Optional | -| Intel TBB 4.x or later | https://www.threadingbuildingblocks.org/ | All | Optional (advanced parallelization of algorithms) | -| OpenGL 3.3+, OpenGL ES 2.0+ | System | Visualization | Required | -| OpenVR 1.10+ | https://github.com/ValveSoftware/openvr | Visualization | Optional (VR support) | -| Direct3D 9 | Windows | Visualization | Optional (integration with GUI using Direct3D) | -| FreeType 2.4+ | https://www.freetype.org/download.html | Visualization | Optional (text rendering) | -| FreeImage 3.17+ | https://sourceforge.net/projects/freeimage/files | Visualization | Optional (support of common 2D graphic formats) | -| FFmpeg 3.1+ | https://www.ffmpeg.org/download.html | Visualization | Optional (video recording) | -| VTK 6.1+ | https://www.vtk.org/download/ | Visualization | Optional (VTK integration) | -| Flex 2.6.4+ and Bison 3.7.1+ | https://sourceforge.net/projects/winflexbison/ | Data Exchange | Optional (update of STEP and ExprIntrp parsers) | -| RapidJSON 1.1+ | https://rapidjson.org/ | Data Exchange | Optional (reading glTF files) | -| Draco 1.4.1+ | https://github.com/google/draco | Data Exchange | Optional (reading compressed glTF files) | -| Tcl/Tk 8.6.3+
or ActiveTcl 8.6 | https://www.tcl.tk/software/tcltk/download.html
https://www.activestate.com/activetcl/downloads | DRAW Test Harness | Required | -| Qt Desktop: Qt 4.8.6+
Android: Qt 5.3.2+ | https://www.qt.io/download/ | Samples and demos | Optional (Qt samples) | -| Doxygen 1.8.5+ | https://www.doxygen.nl/download.html | Documentation | Required | -| Graphviz 2.38+ | https://graphviz.org/ | Documentation | Optional (dependency graphs) | +| CMake 2.8+ | https://cmake.org/ | Configuration | Build from sources | +| Intel TBB 4.x or later | https://oneapi-src.github.io/oneTBB/ | All | Parallelization of algorithms (alternative to built-in thread pool) | +| OpenGL 3.3+, OpenGL ES 2.0+ | System | Visualization | Required for using 3D Viewer | +| OpenVR 1.10+ | https://github.com/ValveSoftware/openvr | Visualization | VR (Virtual Reality) support in 3D Viewer | +| FreeType 2.4+ | https://www.freetype.org/download.html | Visualization | Text rendering in 3D Viewer | +| FreeImage 3.17+ | https://sourceforge.net/projects/freeimage/files | Visualization | Reading/writing image files | +| FFmpeg 3.1+ | https://www.ffmpeg.org/download.html | Visualization | Video recording | +| VTK 6.1+ | https://www.vtk.org/download/ | IVtk | VTK integration module | +| Flex 2.6.4+ and Bison 3.7.1+ | https://sourceforge.net/projects/winflexbison/ | Data Exchange | Updating STEP and ExprIntrp parsers | +| RapidJSON 1.1+ | https://rapidjson.org/ | Data Exchange | Reading glTF files | +| Draco 1.4.1+ | https://github.com/google/draco | Data Exchange | Reading compressed glTF files | +| Tcl/Tk 8.6.3+ | https://www.tcl.tk/software/tcltk/download.html | DRAW Test Harness | Tcl interpretor in Draw module | +| Qt 5.3.2+ | https://www.qt.io/download/ | Inspector and Samples | Inspector Qt samples and | +| Doxygen 1.8.5+ | https://www.doxygen.nl/download.html | Documentation | (Re)generating documentation | +| Graphviz 2.38+ | https://graphviz.org/ | Documentation | Generating dependency graphs | @subsection intro_req_hw Hardware @@ -398,7 +397,7 @@ Don't forget to report these bugs to vendors. @section intro_install Download and Installation -OCCT can be downloaded from https://www.opencascade.com/content/latest-release +OCCT can be downloaded from https://dev.opencascade.org/release In most cases you would want to rebuild OCCT from sources on your platform (OS, compiler) before using it in your project, to ensure binary compatibility and appropriate configuration of the library. @@ -432,7 +431,7 @@ The contents of the OCCT-7.4.0 directory (called further "OCCT root", or $CASROO * **adm** This folder contains administration files, which allow rebuilding OCCT; * **adm/cmake** This folder contains files of CMake building procedure; - * **adm/msvc** This folder contains Visual Studio projects for Visual C++ 2010, 2012, 2013, 2015, 2017 and 2019 which allow rebuilding OCCT under Windows platform in 32 and 64-bit mode; + * **adm/msvc** This folder contains Visual Studio projects for Visual C++ 2013, 2015, 2017, 2019 and 2022 which allow rebuilding OCCT under Windows platform in 32 and 64-bit mode; * **adm/scripts** This folder contains auxiliary scripts for semi-automated building and packaging of OCCT for different platforms; * **data** This folder contains CAD files in different formats, which can be used to test the OCCT functionality; * **doc** This folder contains OCCT documentation in HTML and PDF format; @@ -442,7 +441,7 @@ The contents of the OCCT-7.4.0 directory (called further "OCCT root", or $CASROO * **src** This folder contains OCCT source files. They are organized in folders, one per development unit; * **tests** This folder contains scripts for OCCT testing. * **tools** This folder contains sources of Inspector tool. - * **win64/vc10** This folder contains executable and library files built in optimize mode for Windows platform by Visual C++ 2010; + * **win64/vc14** This folder contains executable and library files built in optimize mode for Windows platform by Visual C++ 2015; @subsection intro_install_linux Linux @@ -463,7 +462,7 @@ To run any Open CASCADE Technology application you need to set the environment v You can define the environment variables with env.bat script located in the $CASROOT folder. This script accepts two arguments to be used: -the version of Visual Studio (vc10 -- vc142) and the architecture (win32 or win64). +the version of Visual Studio (vc12 -- vc142) and the architecture (win32 or win64). The additional environment settings necessary for compiling OCCT libraries and samples by Microsoft Visual Studio can be set using script custom.bat located in the same folder. @@ -507,7 +506,7 @@ The scripts are located in the OCCT root folder. * **CSF_ShadersDirectory** (optional) defines the directory for GLSL programs for Ray Tracing renderer (embedded resources are used when variable is undefined); * **CSF_SHMessage** (optional) defines the path to the messages file for *ShapeHealing*; * **CSF_XSMessage** (optional) defines the path to the messages file for **STEP** and **IGES** translators; - * **CSF_StandardDefaults**, **CSF_StandardLiteDefaults*, **CSF_XCAFDefaults**, and **CSF_PluginDefaults** define paths to directory where configuration files for OCAF persistence are located (required for open/save operations with OCAF documents); + * **CSF_StandardDefaults**, **CSF_StandardLiteDefaults**, **CSF_XCAFDefaults**, and **CSF_PluginDefaults** define paths to directory where configuration files for OCAF persistence are located (required for open/save operations with OCAF documents); * **CSF_IGESDefaults** and **CSF_STEPDefaults** (optional) define paths to directory where resource files of **IGES** and **STEP** translators are located; * **CSF_XmlOcafResource** is required in order to set the path to **XSD** resources, which defines XML grammar. * **CSF_MIGRATION_TYPES** is required in order to read documents that contain old data types, such as *TDataStd_Shape*; @@ -532,7 +531,7 @@ At minimum the following should be considered: the application should be provided separately in a modifiable form, with all materials needed for the user to be able to run the application with a modified version of OCCT. If you want to use Open CASCADE Technology without being bound by LGPL requirements, -please
contact Open CASCADE company for a commercial license. +please contact Open CASCADE company for a commercial license. Note that Open CASCADE Technology is provided on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND. The entire risk related to any use of the OCCT code and @@ -593,10 +592,10 @@ If you need further information on VTK, refer to VTK Homepage https://www.vtk.or **Doxygen** developed by Dimitri van Heesch is open source documentation system for C++, C, Java, Objective-C, Python, IDL, PHP and C#. This product is used in Open CASCADE Technology for automatic creation of Technical Documentation from C++ header files. -If you need further information on Doxygen, refer to https://www.stack.nl/~dimitri/doxygen/index.html. +If you need further information on Doxygen, refer to https://www.doxygen.nl/index.html. **Graphviz** is open source graph visualization software developed by John Ellson, Emden Gansner, Yifan Hu and Arif Bilgin. -Graph visualization is representiation of structured information as diagrams of abstract graphs and networks. +Graph visualization is representation of structured information as diagrams of abstract graphs and networks. This product is used together with Doxygen in Open CASCADE Technology for automatic creation of Technical Documentation (generation of dependency graphs). Current versions of Graphviz are licensed on an open source basis under The Eclipse Public License (EPL) (https://www.graphviz.org/license/). diff --git a/dox/upgrade/upgrade.md b/dox/upgrade/upgrade.md index 6e4a60b47e..40616dd491 100644 --- a/dox/upgrade/upgrade.md +++ b/dox/upgrade/upgrade.md @@ -2296,6 +2296,9 @@ void Perform(const Handle(Adaptor3d_CurveOnSurface)& theCurveOnSurface, @section upgrade_occt770 Upgrade to OCCT 7.7.0 +Building OCCT now requires C++11-compliant compiler, so that some legacy compilers (Visual Studio 2010 and 2012) are no more supported. +It is recommended using Visual Studio 2015 or newer for building OCCT on Windows platform. + @subsection upgrade_occt770_parallel_flag_removed Removed parameter theIsParallel from Put/Compute/Perform theIsParallel parameter has been removed from Put/Compute/Perform from the next classes: diff --git a/dox/user_guides/foundation_classes/foundation_classes.md b/dox/user_guides/foundation_classes/foundation_classes.md index a4abc1f22b..75ee0e41db 100644 --- a/dox/user_guides/foundation_classes/foundation_classes.md +++ b/dox/user_guides/foundation_classes/foundation_classes.md @@ -1837,7 +1837,7 @@ bool areEqualAngles (double theAngle1, double theAngle2) { return Abs(theAngle1 - theAngle2) < Precision::Angular(); } -~~~ +~~~~ It is also possible to check parallelism of two vectors as follows: ~~~~{.cpp} @@ -1845,7 +1845,7 @@ bool areParallelVectors (const gp_Vec& theVec1, const gp_Vec& theVec2) { return theVec1.IsParallel (theVec2, Precision::Angular()); } -~~~ +~~~~ Note that *Precision::Angular()* can be used on both dot and cross products because for small angles the *Sine* and the *Angle* are equivalent. So to test if two directions of type *gp_Dir* are perpendicular, it is legal to use the following code: @@ -1854,7 +1854,7 @@ bool arePerpendicular (const gp_Dir& theDir1, const gp_Dir& theDir2) { return Abs(theDir1 * theDir2) < Precision::Angular(); } -~~~ +~~~~ #### Precision::Confusion @@ -1875,7 +1875,7 @@ bool isNullVector (const gp_Vec& theVec) { return theVec.Magnitude() < Precision::Confusion(); } -~~~ +~~~~ #### Precision::Intersection From 9a52982920d9adafd9e1519fdd81d1c575ff84fd Mon Sep 17 00:00:00 2001 From: kgv Date: Mon, 22 Nov 2021 02:13:56 +0300 Subject: [PATCH 158/639] 0032678: Coding Rules, ApproxInt_SvSurfaces - eliminate GCC -fsanitize=undefined error ApproxInt_SvSurfaces::myUseSolver is now initialized by default constructor. --- src/ApproxInt/ApproxInt_SvSurfaces.hxx | 29 ++++++-------------------- 1 file changed, 6 insertions(+), 23 deletions(-) diff --git a/src/ApproxInt/ApproxInt_SvSurfaces.hxx b/src/ApproxInt/ApproxInt_SvSurfaces.hxx index 33e145c0a6..89509550b7 100644 --- a/src/ApproxInt/ApproxInt_SvSurfaces.hxx +++ b/src/ApproxInt/ApproxInt_SvSurfaces.hxx @@ -38,16 +38,14 @@ class IntSurf_PntOn2S; //! the solver used in intersection algorithm and required values are calculated. //! if myUseSolver = false, u1, v1, u2, v2 are considered as "exact" intersection points on two surfaces //! and required values are calculated directly using u1, v1, u2, v2 -//! - - -class ApproxInt_SvSurfaces +class ApproxInt_SvSurfaces { public: DEFINE_STANDARD_ALLOC - + ApproxInt_SvSurfaces() : myUseSolver (false) {} + //! returns True if Tg,Tguv1 Tguv2 can be computed. Standard_EXPORT virtual Standard_Boolean Compute (Standard_Real& u1, Standard_Real& v1, Standard_Real& u2, Standard_Real& v2, @@ -82,35 +80,20 @@ public: gp_Vec2d& Tg) = 0; Standard_EXPORT virtual ~ApproxInt_SvSurfaces(); - Standard_EXPORT virtual void SetUseSolver(const Standard_Boolean theUseSol) + void SetUseSolver (const Standard_Boolean theUseSol) { myUseSolver = theUseSol; } - Standard_EXPORT virtual Standard_Boolean GetUseSolver() const + virtual Standard_Boolean GetUseSolver() const { return myUseSolver; } - -protected: - - - - - private: -Standard_Boolean myUseSolver; - - + Standard_Boolean myUseSolver; }; - - - - - - #endif // _ApproxInt_SvSurfaces_HeaderFile From 90da038e9d7abd99c92bafcae1fd58f00b3d701b Mon Sep 17 00:00:00 2001 From: kgv Date: Mon, 6 Dec 2021 14:59:47 +0300 Subject: [PATCH 159/639] 0032663: Coding - remove AIS_SequenceOfInteractive --- src/AIS/AIS_SequenceOfInteractive.hxx | 26 -------------------------- src/AIS/FILES | 1 - 2 files changed, 27 deletions(-) delete mode 100644 src/AIS/AIS_SequenceOfInteractive.hxx diff --git a/src/AIS/AIS_SequenceOfInteractive.hxx b/src/AIS/AIS_SequenceOfInteractive.hxx deleted file mode 100644 index 662195b5f4..0000000000 --- a/src/AIS/AIS_SequenceOfInteractive.hxx +++ /dev/null @@ -1,26 +0,0 @@ -// Created on: 1996-12-11 -// Created by: Robert COUBLANC -// Copyright (c) 1996-1999 Matra Datavision -// Copyright (c) 1999-2014 OPEN CASCADE SAS -// -// This file is part of Open CASCADE Technology software library. -// -// This library is free software; you can redistribute it and/or modify it under -// the terms of the GNU Lesser General Public License version 2.1 as published -// by the Free Software Foundation, with special exception defined in the file -// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT -// distribution for complete text of the license and disclaimer of any warranty. -// -// Alternatively, this file may be used under the terms of Open CASCADE -// commercial license or contractual agreement. - -#ifndef AIS_SequenceOfInteractive_HeaderFile -#define AIS_SequenceOfInteractive_HeaderFile - -#include -#include - -typedef NCollection_Sequence AIS_SequenceOfInteractive; - - -#endif diff --git a/src/AIS/FILES b/src/AIS/FILES index 8b670407e5..beaf64b459 100644 --- a/src/AIS/FILES +++ b/src/AIS/FILES @@ -77,7 +77,6 @@ AIS_Selection.hxx AIS_SelectStatus.hxx AIS_SelectionModesConcurrency.hxx AIS_SelectionScheme.hxx -AIS_SequenceOfInteractive.hxx AIS_Shape.cxx AIS_Shape.hxx AIS_SignatureFilter.cxx From 4ec4e4e8a8d39a632aed54d0a1fea36c1320a0ce Mon Sep 17 00:00:00 2001 From: knosulko Date: Thu, 14 Oct 2021 20:15:02 +0300 Subject: [PATCH 160/639] 0030272: Modeling Algorithms - Incorrect work of gproject -fix TolU/V for approximation; -fix cutting tool for approximation; -add method Adaptor3d_HSurfaceTool::IsSurfG1. -add test bugs/moddata_3/bug30272 --- src/Adaptor3d/Adaptor3d_HSurfaceTool.cxx | 79 ++++++++++++++++++++++ src/Adaptor3d/Adaptor3d_HSurfaceTool.hxx | 4 ++ src/AdvApprox/AdvApprox_PrefAndRec.cxx | 15 ++-- src/Approx/Approx_CurveOnSurface.cxx | 73 ++++++++++++++++---- src/BRepAlgo/BRepAlgo_NormalProjection.cxx | 2 +- src/BRepTest/BRepTest_BasicCommands.cxx | 4 +- src/ProjLib/ProjLib_CompProjectedCurve.cxx | 16 +++++ src/ProjLib/ProjLib_CompProjectedCurve.hxx | 3 + tests/bugs/moddata_3/bug30272 | 48 +++++++++++++ 9 files changed, 224 insertions(+), 20 deletions(-) create mode 100644 tests/bugs/moddata_3/bug30272 diff --git a/src/Adaptor3d/Adaptor3d_HSurfaceTool.cxx b/src/Adaptor3d/Adaptor3d_HSurfaceTool.cxx index 673acbaa73..83c6bb2170 100644 --- a/src/Adaptor3d/Adaptor3d_HSurfaceTool.cxx +++ b/src/Adaptor3d/Adaptor3d_HSurfaceTool.cxx @@ -17,8 +17,11 @@ #include #include +#include #include +#include #include +#include #include #include #include @@ -98,3 +101,79 @@ Standard_Integer Adaptor3d_HSurfaceTool::NbSamplesV(const Handle(Adaptor3d_Surfa } return n; } + +Standard_Boolean Adaptor3d_HSurfaceTool::IsSurfG1(const Handle(Adaptor3d_Surface)& theSurf, + const Standard_Boolean theAlongU, + const Standard_Real theAngTol) +{ + Standard_Real aUf, aUl, aVf, aVl; + aUf = theSurf->FirstUParameter(); + aUl = theSurf->LastUParameter(); + aVf = theSurf->FirstVParameter(); + aVl = theSurf->LastVParameter(); + + Handle(Adaptor3d_Surface) aS = theSurf; + Handle(Adaptor3d_Curve) aC; + + Handle(Geom_BSplineSurface) aBS; + Handle(Geom_BSplineCurve) aBC; + + if (aS->GetType() == GeomAbs_OffsetSurface) + { + aS = aS->BasisSurface(); + } + + if (aS->GetType() == GeomAbs_SurfaceOfRevolution || + aS->GetType() == GeomAbs_SurfaceOfExtrusion) + { + aC = aS->BasisCurve(); + } + + if (!aC.IsNull()) + { + if (aC->GetType() == GeomAbs_OffsetCurve) + { + Handle(Geom_OffsetCurve) aOC = aC->OffsetCurve(); + aC = new GeomAdaptor_Curve(aOC->BasisCurve()); + } + + if (aC->GetType() == GeomAbs_BSplineCurve) + { + if ((theAlongU && aS->GetType() == GeomAbs_SurfaceOfExtrusion) || + (!theAlongU && aS->GetType() == GeomAbs_SurfaceOfRevolution)) + { + aBC = aC->BSpline(); + } + } + } + + if (aS->GetType() == GeomAbs_BSplineSurface) + { + aBS = aS->BSpline(); + + if (theAlongU) + { + const Standard_Real anIsoPar = (aVf + aVl) / 2.0; + aBC = Handle(Geom_BSplineCurve)::DownCast(aBS->VIso(anIsoPar)); + } + else + { + const Standard_Real anIsoPar = (aUf + aUl) / 2.0; + aBC = Handle(Geom_BSplineCurve)::DownCast(aBS->UIso(anIsoPar)); + } + } + + if(!aBC.IsNull()) + { + if (theAlongU) + { + return aBC->IsG1(aUf, aUl, theAngTol); + } + else + { + return aBC->IsG1(aVf, aVl, theAngTol); + } + } + + return Standard_False; +} diff --git a/src/Adaptor3d/Adaptor3d_HSurfaceTool.hxx b/src/Adaptor3d/Adaptor3d_HSurfaceTool.hxx index 9ec2f39268..57766af1ed 100644 --- a/src/Adaptor3d/Adaptor3d_HSurfaceTool.hxx +++ b/src/Adaptor3d/Adaptor3d_HSurfaceTool.hxx @@ -165,6 +165,10 @@ public: static Standard_Real OffsetValue (const Handle(Adaptor3d_Surface)& theSurf) { return theSurf->OffsetValue(); } + Standard_EXPORT static Standard_Boolean IsSurfG1 (const Handle(Adaptor3d_Surface)& theSurf, + const Standard_Boolean theAlongU, + const Standard_Real theAngTol = Precision::Angular()); + Standard_EXPORT static Standard_Integer NbSamplesU (const Handle(Adaptor3d_Surface)& S); Standard_EXPORT static Standard_Integer NbSamplesV (const Handle(Adaptor3d_Surface)& S); diff --git a/src/AdvApprox/AdvApprox_PrefAndRec.cxx b/src/AdvApprox/AdvApprox_PrefAndRec.cxx index 2f85ed4da8..be5e8ba9c2 100644 --- a/src/AdvApprox/AdvApprox_PrefAndRec.cxx +++ b/src/AdvApprox/AdvApprox_PrefAndRec.cxx @@ -39,6 +39,7 @@ Standard_Boolean AdvApprox_PrefAndRec::Value(const Standard_Real a, Standard_Real lgmin = 10 * Precision::PConfusion(); Standard_Integer i; Standard_Real cut, mil=(a+b)/2, dist; + Standard_Boolean isfound = Standard_False; cut = mil; @@ -48,15 +49,19 @@ Standard_Boolean AdvApprox_PrefAndRec::Value(const Standard_Real a, if ( dist > Abs(mil-myPrefCutting.Value(i))) { cut = myPrefCutting.Value(i); dist = Abs(mil-cut); + isfound = Standard_True; } } // Recheche d'une decoupe recommende - dist = Abs((a-b)/2); - for ( i=1; i<=myRecCutting.Length(); i++) { - if ((dist-lgmin) > Abs(mil-myRecCutting.Value(i))) { - cut = myRecCutting.Value(i); - dist = Abs(mil-cut); + if (!isfound) + { + dist = Abs((a-b)/2); + for ( i=1; i<=myRecCutting.Length(); i++) { + if ((dist-lgmin) > Abs(mil-myRecCutting.Value(i))) { + cut = myRecCutting.Value(i); + dist = Abs(mil-cut); + } } } diff --git a/src/Approx/Approx_CurveOnSurface.cxx b/src/Approx/Approx_CurveOnSurface.cxx index e612171046..bf3d1b05dd 100644 --- a/src/Approx/Approx_CurveOnSurface.cxx +++ b/src/Approx/Approx_CurveOnSurface.cxx @@ -20,6 +20,7 @@ #include #include #include +#include #include #include #include @@ -373,6 +374,14 @@ void Approx_CurveOnSurface::Perform(const Standard_Integer theMaxSegments, if(theOnly3d && theOnly2d) throw Standard_ConstructionError(); + GeomAbs_Shape aContinuity = theContinuity; + if (aContinuity == GeomAbs_G1) + aContinuity = GeomAbs_C1; + else if (aContinuity == GeomAbs_G2) + aContinuity = GeomAbs_C2; + else if (aContinuity > GeomAbs_C2) + aContinuity = GeomAbs_C2; //Restriction of AdvApprox_ApproxAFunction + Handle( Adaptor2d_Curve2d ) TrimmedC2D = myC2D->Trim( myFirst, myLast, Precision::PConfusion() ); Standard_Boolean isU, isForward; @@ -410,8 +419,24 @@ void Approx_CurveOnSurface::Perform(const Standard_Integer theMaxSegments, Standard_Real TolU, TolV; - TolU = mySurf->UResolution(myTol)/2; - TolV = mySurf->VResolution(myTol)/2; + TolU = mySurf->UResolution(myTol) / 2.; + TolV = mySurf->VResolution(myTol) / 2.; + + if (mySurf->UContinuity() == GeomAbs_C0) + { + if (!Adaptor3d_HSurfaceTool::IsSurfG1(mySurf, Standard_True, Precision::Angular())) + TolU = Min(1.e-3, 1.e3 * TolU); + if (!Adaptor3d_HSurfaceTool::IsSurfG1(mySurf, Standard_True, Precision::Confusion())) + TolU = Min(1.e-3, 1.e2 * TolU); + } + + if (mySurf->VContinuity() == GeomAbs_C0) + { + if (!Adaptor3d_HSurfaceTool::IsSurfG1(mySurf, Standard_False, Precision::Angular())) + TolV = Min(1.e-3, 1.e3 * TolV); + if (!Adaptor3d_HSurfaceTool::IsSurfG1(mySurf, Standard_False, Precision::Confusion())) + TolV = Min(1.e-3, 1.e2 * TolV); + } OneDTol->SetValue(1,TolU); OneDTol->SetValue(2,TolV); @@ -423,20 +448,44 @@ void Approx_CurveOnSurface::Perform(const Standard_Integer theMaxSegments, ThreeDTol->Init(myTol/2); } + AdvApprox_Cutting* CutTool; + + if (aContinuity <= myC2D->Continuity() && + aContinuity <= mySurf->UContinuity() && + aContinuity <= mySurf->VContinuity()) + { + CutTool = new AdvApprox_DichoCutting(); + } + else if (aContinuity == GeomAbs_C1) + { + Standard_Integer NbInterv_C1 = HCOnS->NbIntervals(GeomAbs_C1); + TColStd_Array1OfReal CutPnts_C1(1, NbInterv_C1 + 1); + HCOnS->Intervals(CutPnts_C1, GeomAbs_C1); + Standard_Integer NbInterv_C2 = HCOnS->NbIntervals(GeomAbs_C2); + TColStd_Array1OfReal CutPnts_C2(1, NbInterv_C2 + 1); + HCOnS->Intervals(CutPnts_C2, GeomAbs_C2); + + CutTool = new AdvApprox_PrefAndRec (CutPnts_C1, CutPnts_C2); + } + else + { + Standard_Integer NbInterv_C2 = HCOnS->NbIntervals(GeomAbs_C2); + TColStd_Array1OfReal CutPnts_C2(1, NbInterv_C2 + 1); + HCOnS->Intervals(CutPnts_C2, GeomAbs_C2); + Standard_Integer NbInterv_C3 = HCOnS->NbIntervals(GeomAbs_C3); + TColStd_Array1OfReal CutPnts_C3(1, NbInterv_C3 + 1); + HCOnS->Intervals(CutPnts_C3, GeomAbs_C3); + + CutTool = new AdvApprox_PrefAndRec (CutPnts_C2, CutPnts_C3); + } - Standard_Integer NbInterv_C2 = HCOnS->NbIntervals(GeomAbs_C2); - TColStd_Array1OfReal CutPnts_C2(1, NbInterv_C2 + 1); - HCOnS->Intervals(CutPnts_C2, GeomAbs_C2); - Standard_Integer NbInterv_C3 = HCOnS->NbIntervals(GeomAbs_C3); - TColStd_Array1OfReal CutPnts_C3(1, NbInterv_C3 + 1); - HCOnS->Intervals(CutPnts_C3, GeomAbs_C3); - - AdvApprox_PrefAndRec CutTool(CutPnts_C2,CutPnts_C3); AdvApprox_ApproxAFunction aApprox (Num1DSS, Num2DSS, Num3DSS, OneDTol, TwoDTolNul, ThreeDTol, - myFirst, myLast, theContinuity, + myFirst, myLast, aContinuity, theMaxDegree, theMaxSegments, - *EvalPtr, CutTool); + *EvalPtr, *CutTool); + + delete CutTool; myIsDone = aApprox.IsDone(); myHasResult = aApprox.HasResult(); diff --git a/src/BRepAlgo/BRepAlgo_NormalProjection.cxx b/src/BRepAlgo/BRepAlgo_NormalProjection.cxx index f94dab3b00..2fb121ddf2 100644 --- a/src/BRepAlgo/BRepAlgo_NormalProjection.cxx +++ b/src/BRepAlgo/BRepAlgo_NormalProjection.cxx @@ -152,7 +152,7 @@ void BRepAlgo_NormalProjection::SetDefaultParams() { myTol3d = 1.e-4; myTol2d = Pow(myTol3d, 2./3); - myContinuity = GeomAbs_C2; + myContinuity = GeomAbs_C1; myMaxDegree = 14; myMaxSeg = 16; } diff --git a/src/BRepTest/BRepTest_BasicCommands.cxx b/src/BRepTest/BRepTest_BasicCommands.cxx index aecc356a0c..89574e3008 100644 --- a/src/BRepTest/BRepTest_BasicCommands.cxx +++ b/src/BRepTest/BRepTest_BasicCommands.cxx @@ -1225,7 +1225,7 @@ static Standard_Integer vecdc(Draw_Interpretor& di,Standard_Integer ,const char* Standard_Real Tol = 1.e-4; Standard_Real Tol2d; Standard_Real MaxDistance = 1.e-3; - GeomAbs_Shape Continuity = GeomAbs_C2; + GeomAbs_Shape Continuity = GeomAbs_C1; Standard_Integer MaxDeg = 14; Standard_Integer MaxSeg = 16; @@ -1259,7 +1259,7 @@ static Standard_Integer vecdc(Draw_Interpretor& di,Standard_Integer ,const char* if(n > arg) { if (Draw::Atoi(a[arg]) == 0) Continuity = GeomAbs_C0; - else if (Draw::Atoi(a[arg]) == 1) Continuity = GeomAbs_C1; + else if (Draw::Atoi(a[arg]) == 2) Continuity = GeomAbs_C2; arg++; } diff --git a/src/ProjLib/ProjLib_CompProjectedCurve.cxx b/src/ProjLib/ProjLib_CompProjectedCurve.cxx index 7c9deded79..44e5d0042c 100644 --- a/src/ProjLib/ProjLib_CompProjectedCurve.cxx +++ b/src/ProjLib/ProjLib_CompProjectedCurve.cxx @@ -1784,6 +1784,22 @@ Standard_Real ProjLib_CompProjectedCurve::LastParameter() const return myCurve->LastParameter(); } +//======================================================================= +//function : Continuity +//purpose : +//======================================================================= + +GeomAbs_Shape ProjLib_CompProjectedCurve::Continuity() const +{ + GeomAbs_Shape ContC = myCurve->Continuity(); + GeomAbs_Shape ContSu = mySurface->UContinuity(); + if ( ContSu < ContC) ContC = ContSu; + GeomAbs_Shape ContSv = mySurface->VContinuity(); + if ( ContSv < ContC) ContC = ContSv; + + return ContC; +} + //======================================================================= //function : MaxDistance //purpose : diff --git a/src/ProjLib/ProjLib_CompProjectedCurve.hxx b/src/ProjLib/ProjLib_CompProjectedCurve.hxx index 8c5fa21640..6b93a8d5f0 100644 --- a/src/ProjLib/ProjLib_CompProjectedCurve.hxx +++ b/src/ProjLib/ProjLib_CompProjectedCurve.hxx @@ -158,6 +158,9 @@ public: //! which has a projection on S. Standard_EXPORT Standard_Real LastParameter() const Standard_OVERRIDE; + //! Returns the Continuity used in the approximation. + Standard_EXPORT GeomAbs_Shape Continuity() const Standard_OVERRIDE; + //! Returns the number of intervals which define //! an S continuous part of the projected curve Standard_EXPORT Standard_Integer NbIntervals (const GeomAbs_Shape S) const Standard_OVERRIDE; diff --git a/tests/bugs/moddata_3/bug30272 b/tests/bugs/moddata_3/bug30272 new file mode 100644 index 0000000000..a54656777d --- /dev/null +++ b/tests/bugs/moddata_3/bug30272 @@ -0,0 +1,48 @@ +puts "================" +puts "0030272: Modeling Algorithms - Incorrect work of gproject" +puts "================" +puts "" + +set BugNumber OCC30272 + +set tol_abs 1.0e-4 +set tol_rel 0.0001 + +restore [locate_data_file bug30272_cur.brep] c +restore [locate_data_file bug30272_sur.brep] s + +set result_C0 [gproject result_C0 c s 1.0e-3 -3d 1 -c C0] +regexp {2d is ([-0-9.+eE]+);..([-0-9.+eE]+)} $result_C0 full 2dUError_C0 2dVError_C0 +regexp {3d is ([-0-9.+eE]+)} $result_C0 full 3dError_C0 + +set expected_2dUError_C0 8.5166415968648575e-06 +set expected_2dVError_C0 1.9383641349197776e-07 +set expected_3dError_C0 0.00039481100189762405 + +checkreal "2dUError_C0" ${2dUError_C0} ${expected_2dUError_C0} ${tol_abs} ${tol_rel} +checkreal "2dVError_C0" ${2dVError_C0} ${expected_2dVError_C0} ${tol_abs} ${tol_rel} +checkreal "3dError_C0" ${3dError_C0} ${expected_3dError_C0} ${tol_abs} ${tol_rel} + +set result_C1 [gproject result_C1 c s 1.0e-3 -3d 1 -c C1] +regexp {2d is ([-0-9.+eE]+);..([-0-9.+eE]+)} $result_C1 full 2dUError_C1 2dVError_C1 +regexp {3d is ([-0-9.+eE]+)} $result_C1 full 3dError_C1 + +set expected_2dUError_C1 1.1207913216250422e-05 +set expected_2dVError_C1 1.9546900926719333e-07 +set expected_3dError_C1 0.00029305148512110709 + +checkreal "2dUError_C1" ${2dUError_C1} ${expected_2dUError_C1} ${tol_abs} ${tol_rel} +checkreal "2dVError_C1" ${2dVError_C1} ${expected_2dVError_C1} ${tol_abs} ${tol_rel} +checkreal "3dError_C1" ${3dError_C1} ${expected_3dError_C1} ${tol_abs} ${tol_rel} + +set result_C2 [gproject result_C2 c s 1.0e-3 -3d 1 -c C2] +regexp {2d is ([-0-9.+eE]+);..([-0-9.+eE]+)} $result_C2 full 2dUError_C2 2dVError_C2 +regexp {3d is ([-0-9.+eE]+)} $result_C2 full 3dError_C2 + +set expected_2dUError_C2 1.1368572775344132e-05 +set expected_2dVError_C2 1.8525211887318316e-07 +set expected_3dError_C2 0.00024049581776618967 + +checkreal "2dUError_C2" ${2dUError_C2} ${expected_2dUError_C2} ${tol_abs} ${tol_rel} +checkreal "2dVError_C2" ${2dVError_C2} ${expected_2dVError_C2} ${tol_abs} ${tol_rel} +checkreal "3dError_C2" ${3dError_C2} ${expected_3dError_C2} ${tol_abs} ${tol_rel} From ccd3858e636767d769931e8a1ade78114be02516 Mon Sep 17 00:00:00 2001 From: kgv Date: Sat, 4 Dec 2021 15:49:14 +0300 Subject: [PATCH 161/639] 0032711: Coding Rules - new warning in AIS_Shape::Color() after integration fix for 0032704 --- src/AIS/AIS_Shape.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/AIS/AIS_Shape.cxx b/src/AIS/AIS_Shape.cxx index 746db59025..5fcb6fa631 100644 --- a/src/AIS/AIS_Shape.cxx +++ b/src/AIS/AIS_Shape.cxx @@ -359,7 +359,7 @@ void AIS_Shape::Color (Quantity_Color& theColor) const { if (const Handle(Prs3d_ShadingAspect)& aShading = myDrawer->ShadingAspect()) { - theColor = myDrawer->ShadingAspect()->Color(myCurrentFacingModel); + theColor = aShading->Color(myCurrentFacingModel); } } From 7ce8fe052deeab109c042cab2ed84655717e30b0 Mon Sep 17 00:00:00 2001 From: kgv Date: Fri, 3 Dec 2021 19:51:07 +0300 Subject: [PATCH 162/639] 0032712: Visualization, OpenGl_Context.hxx - avoid including OpenGL headers --- src/OpenGl/OpenGl_Context.cxx | 4 ++-- src/OpenGl/OpenGl_Context.hxx | 21 ++++++++++++--------- src/OpenGl/OpenGl_IndexBuffer.cxx | 1 + src/OpenGl/OpenGl_UniformBuffer.cxx | 2 +- 4 files changed, 16 insertions(+), 12 deletions(-) diff --git a/src/OpenGl/OpenGl_Context.cxx b/src/OpenGl/OpenGl_Context.cxx index da868a036c..f5274a6d46 100644 --- a/src/OpenGl/OpenGl_Context.cxx +++ b/src/OpenGl/OpenGl_Context.cxx @@ -286,7 +286,7 @@ OpenGl_Context::OpenGl_Context (const Handle(OpenGl_Caps)& theCaps) #endif #endif - memset (myFuncs.operator->(), 0, sizeof(OpenGl_GlFunctions)); + memset (myFuncs.get(), 0, sizeof(OpenGl_GlFunctions)); myShaderManager = new OpenGl_ShaderManager (this); } @@ -3142,7 +3142,7 @@ bool OpenGl_Context::SetSampleAlphaToCoverage (bool theToEnable) // function : GetBufferSubData // purpose : // ======================================================================= -bool OpenGl_Context::GetBufferSubData (GLenum theTarget, GLintptr theOffset, GLsizeiptr theSize, void* theData) +bool OpenGl_Context::GetBufferSubData (unsigned int theTarget, intptr_t theOffset, intptr_t theSize, void* theData) { if (!hasGetBufferData) { diff --git a/src/OpenGl/OpenGl_Context.hxx b/src/OpenGl/OpenGl_Context.hxx index 82d1891942..ed3418d3d5 100644 --- a/src/OpenGl/OpenGl_Context.hxx +++ b/src/OpenGl/OpenGl_Context.hxx @@ -42,10 +42,11 @@ #include #include #include -#include #include +#include + //! Forward declarations #if defined(__APPLE__) #import @@ -74,6 +75,8 @@ struct OpenGl_ArbSamplerObject; struct OpenGl_ArbTexBindless; struct OpenGl_ExtGS; +struct OpenGl_GlCore11Fwd; +struct OpenGl_GlCore11; struct OpenGl_GlCore12; struct OpenGl_GlCore13; struct OpenGl_GlCore14; @@ -348,7 +351,7 @@ public: Standard_Integer VersionMinor() const { return myGlVerMinor; } //! Access entire map of loaded OpenGL functions. - const OpenGl_GlFunctions* Functions() const { return myFuncs.operator->(); } + const OpenGl_GlFunctions* Functions() const { return myFuncs.get(); } //! Clean up errors stack for this GL context (glGetError() in loop). //! @return true if some error has been cleared @@ -745,7 +748,7 @@ public: //! @name methods to alter or retrieve current state return theIndex >= myDrawBuffers.Lower() && theIndex <= myDrawBuffers.Upper() ? myDrawBuffers.Value (theIndex) - : GL_NONE; + : 0; // GL_NONE } //! Switch draw buffer, wrapper for ::glDrawBuffer(). @@ -964,12 +967,12 @@ public: //! @name methods to alter or retrieve current state //! - OpenGL 1.5+ (desktop) via glGetBufferSubData(); //! - OpenGL ES 3.0+ via glMapBufferRange(); //! - WebGL 2.0+ via gl.getBufferSubData(). - //! @param theTarget [in] target buffer to map - //! @param theOffset [in] offset to the beginning of sub-data - //! @param theSize [in] number of bytes to read - //! @param theData [out] destination pointer to fill + //! @param[in] theTarget target buffer to map {GLenum} + //! @param[in] theOffset offset to the beginning of sub-data {GLintptr} + //! @param[in] theSize number of bytes to read {GLsizeiptr} + //! @param[out] theData destination pointer to fill //! @return FALSE if functionality is unavailable - Standard_EXPORT bool GetBufferSubData (GLenum theTarget, GLintptr theOffset, GLsizeiptr theSize, void* theData); + Standard_EXPORT bool GetBufferSubData (unsigned int theTarget, intptr_t theOffset, intptr_t theSize, void* theData); //! Return Graphics Driver's vendor. const TCollection_AsciiString& Vendor() const { return myVendor; } @@ -1090,7 +1093,7 @@ private: // context info OpenGl_Clipping myClippingState; //!< state of clip planes void* myGlLibHandle; //!< optional handle to GL library - NCollection_Handle + std::unique_ptr myFuncs; //!< mega structure for all GL functions Aspect_GraphicsLibrary myGapi; //!< GAPI name Handle(Image_SupportedFormats) diff --git a/src/OpenGl/OpenGl_IndexBuffer.cxx b/src/OpenGl/OpenGl_IndexBuffer.cxx index 0dcf7e7d9d..fb09e40efa 100644 --- a/src/OpenGl/OpenGl_IndexBuffer.cxx +++ b/src/OpenGl/OpenGl_IndexBuffer.cxx @@ -15,6 +15,7 @@ #include #include +#include #include IMPLEMENT_STANDARD_RTTIEXT(OpenGl_IndexBuffer, OpenGl_Buffer) diff --git a/src/OpenGl/OpenGl_UniformBuffer.cxx b/src/OpenGl/OpenGl_UniformBuffer.cxx index af7fa0bfb2..5e5af556e4 100644 --- a/src/OpenGl/OpenGl_UniformBuffer.cxx +++ b/src/OpenGl/OpenGl_UniformBuffer.cxx @@ -13,7 +13,7 @@ #include -#include +#include #include IMPLEMENT_STANDARD_RTTIEXT(OpenGl_UniformBuffer, OpenGl_Buffer) From 340b2327b6f68d8bc02eebeb42886214c914c67f Mon Sep 17 00:00:00 2001 From: kgv Date: Mon, 6 Dec 2021 22:40:14 +0300 Subject: [PATCH 163/639] 0032718: Draw Harness, ViewerTest - fix misprint in vanim command description --- src/ViewerTest/ViewerTest_ViewerCommands.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ViewerTest/ViewerTest_ViewerCommands.cxx b/src/ViewerTest/ViewerTest_ViewerCommands.cxx index 2991d76812..68a0187699 100644 --- a/src/ViewerTest/ViewerTest_ViewerCommands.cxx +++ b/src/ViewerTest/ViewerTest_ViewerCommands.cxx @@ -14114,7 +14114,7 @@ Animation playback: Animation definition: vanim Name/sub/name [-clear] [-delete] - [start TimeSec] [duration TimeSec] + [-start TimeSec] [-duration TimeSec] [-end TimeSec] Animation name defined in path-style (anim/name or anim.name) specifies nested animations. From 18c678759eafb95646a369f2837ea15a09961b3e Mon Sep 17 00:00:00 2001 From: kgv Date: Mon, 6 Dec 2021 22:23:24 +0300 Subject: [PATCH 164/639] 0032717: Modeling Algorithms - BRepBuilderAPI_Copy should not remove triangulation from surface-less faces BRepBuilderAPI_Copy now ignores toCopyMesh flag for non-geometric shapes. --- src/BRepBuilderAPI/BRepBuilderAPI_Copy.cxx | 15 ++++++++++++--- tests/bugs/modalg_7/bug32717 | 17 +++++++++++++++++ 2 files changed, 29 insertions(+), 3 deletions(-) create mode 100644 tests/bugs/modalg_7/bug32717 diff --git a/src/BRepBuilderAPI/BRepBuilderAPI_Copy.cxx b/src/BRepBuilderAPI/BRepBuilderAPI_Copy.cxx index 3bd8ce0eb0..36c25a41e5 100644 --- a/src/BRepBuilderAPI/BRepBuilderAPI_Copy.cxx +++ b/src/BRepBuilderAPI/BRepBuilderAPI_Copy.cxx @@ -59,8 +59,11 @@ class BRepBuilderAPI_Copy_Modification : public BRepTools_Modification //! copies it if required Standard_Boolean NewTriangulation(const TopoDS_Face& F, Handle(Poly_Triangulation)& T) Standard_OVERRIDE { - if (!myCopyMesh) + if (!myCopyMesh + && BRep_Tool::IsGeometric (F)) + { return Standard_False; + } TopLoc_Location L; T = BRep_Tool::Triangulation(F, L); @@ -93,8 +96,11 @@ class BRepBuilderAPI_Copy_Modification : public BRepTools_Modification //! copies it if required Standard_Boolean NewPolygon(const TopoDS_Edge& E, Handle(Poly_Polygon3D)& P) Standard_OVERRIDE { - if (!myCopyMesh) + if (!myCopyMesh + && BRep_Tool::IsGeometric (E)) + { return Standard_False; + } TopLoc_Location aLoc; P = BRep_Tool::Polygon3D(E, aLoc); @@ -113,8 +119,11 @@ class BRepBuilderAPI_Copy_Modification : public BRepTools_Modification Standard_Boolean NewPolygonOnTriangulation(const TopoDS_Edge& E, const TopoDS_Face& F, Handle(Poly_PolygonOnTriangulation)& P) Standard_OVERRIDE { - if (!myCopyMesh) + if (!myCopyMesh + && BRep_Tool::IsGeometric (E)) + { return Standard_False; + } TopLoc_Location aLoc; Handle(Poly_Triangulation) aTria = BRep_Tool::Triangulation(F, aLoc); diff --git a/tests/bugs/modalg_7/bug32717 b/tests/bugs/modalg_7/bug32717 new file mode 100644 index 0000000000..6c91e34bd7 --- /dev/null +++ b/tests/bugs/modalg_7/bug32717 @@ -0,0 +1,17 @@ +puts "=================================================" +puts "0032717: Modeling Algorithms - BRepBuilderAPI_Copy should not remove triangulation from surface-less faces" +puts "=================================================" +puts "" + +pload XDE MODELING +box b 1 2 3 +incmesh b 1 +checktrinfo b -tri 12 -nod 24 +tclean -geom b +trinfo b +checktrinfo b -tri 12 -nod 24 + +# check that copied triangulation-only shape is copied with triangulation +tcopy b bb +trinfo bb +checktrinfo bb -tri 12 -nod 24 From bf2884afbe96274c90c6de5427ad8ae1886147ab Mon Sep 17 00:00:00 2001 From: kgv Date: Wed, 8 Dec 2021 14:10:11 +0300 Subject: [PATCH 165/639] 0032724: Coding Rules, Graphic3d_Structure - remove unused property Graphic3d_Structure::ContainsFacet() --- src/Graphic3d/Graphic3d_CStructure.cxx | 2 -- src/Graphic3d/Graphic3d_CStructure.hxx | 2 -- src/Graphic3d/Graphic3d_CView.cxx | 32 -------------------- src/Graphic3d/Graphic3d_CView.hxx | 6 ---- src/Graphic3d/Graphic3d_Group.cxx | 27 ++--------------- src/Graphic3d/Graphic3d_Group.hxx | 4 --- src/Graphic3d/Graphic3d_Structure.cxx | 41 -------------------------- src/Graphic3d/Graphic3d_Structure.hxx | 10 ------- src/OpenGl/OpenGl_StructureShadow.cxx | 1 - 9 files changed, 3 insertions(+), 122 deletions(-) diff --git a/src/Graphic3d/Graphic3d_CStructure.cxx b/src/Graphic3d/Graphic3d_CStructure.cxx index e60815de53..bfde61d4b0 100644 --- a/src/Graphic3d/Graphic3d_CStructure.cxx +++ b/src/Graphic3d/Graphic3d_CStructure.cxx @@ -29,7 +29,6 @@ IMPLEMENT_STANDARD_RTTIEXT(Graphic3d_CStructure,Standard_Transient) Graphic3d_CStructure::Graphic3d_CStructure (const Handle(Graphic3d_StructureManager)& theManager) : Priority (Structure_MAX_PRIORITY / 2), PreviousPriority (Structure_MAX_PRIORITY / 2), - ContainsFacet (0), // myGraphicDriver (theManager->GraphicDriver()), myZLayer (Graphic3d_ZLayerId_Default), @@ -67,7 +66,6 @@ void Graphic3d_CStructure::DumpJson (Standard_OStream& theOStream, Standard_Inte OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myZLayer) OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, Priority) OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, PreviousPriority) - OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, ContainsFacet) OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, IsInfinite) OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, stick) diff --git a/src/Graphic3d/Graphic3d_CStructure.hxx b/src/Graphic3d/Graphic3d_CStructure.hxx index 1210025d75..b80d78ba44 100644 --- a/src/Graphic3d/Graphic3d_CStructure.hxx +++ b/src/Graphic3d/Graphic3d_CStructure.hxx @@ -211,8 +211,6 @@ public: Standard_Integer Priority; Standard_Integer PreviousPriority; - Standard_Integer ContainsFacet; - protected: //! Create empty structure. diff --git a/src/Graphic3d/Graphic3d_CView.cxx b/src/Graphic3d/Graphic3d_CView.cxx index 1461965552..6718b60ebf 100644 --- a/src/Graphic3d/Graphic3d_CView.cxx +++ b/src/Graphic3d/Graphic3d_CView.cxx @@ -384,38 +384,6 @@ void Graphic3d_CView::InvalidateZLayerBoundingBox (const Graphic3d_ZLayerId theL } } -// ======================================================================= -// function : ContainsFacet -// purpose : -// ======================================================================= -Standard_Boolean Graphic3d_CView::ContainsFacet() const -{ - for (Graphic3d_MapOfStructure::Iterator aStructIter (myStructsDisplayed); aStructIter.More(); aStructIter.Next()) - { - if (aStructIter.Key()->ContainsFacet()) - { - return Standard_True; - } - } - return Standard_False; -} - -// ======================================================================= -// function : ContainsFacet -// purpose : -// ======================================================================= -Standard_Boolean Graphic3d_CView::ContainsFacet (const Graphic3d_MapOfStructure& theSet) const -{ - for (Graphic3d_MapIteratorOfMapOfStructure aStructIter (theSet); aStructIter.More(); aStructIter.Next()) - { - if (aStructIter.Key()->ContainsFacet()) - { - return Standard_True; - } - } - return Standard_False; -} - // ======================================================================= // function : DisplayedStructures // purpose : diff --git a/src/Graphic3d/Graphic3d_CView.hxx b/src/Graphic3d/Graphic3d_CView.hxx index 6373a8dfb5..13cf37e1eb 100644 --- a/src/Graphic3d/Graphic3d_CView.hxx +++ b/src/Graphic3d/Graphic3d_CView.hxx @@ -134,12 +134,6 @@ public: //! Computes the new presentation of the structures displayed in this view with the type Graphic3d_TOS_COMPUTED. Standard_EXPORT void Compute(); - //! Returns Standard_True if one of the structures displayed in the view contains Polygons, Triangles or Quadrangles. - Standard_EXPORT Standard_Boolean ContainsFacet() const; - - //! Returns Standard_True if one of the structures in the set contains Polygons, Triangles or Quadrangles. - Standard_EXPORT Standard_Boolean ContainsFacet (const Graphic3d_MapOfStructure& theSet) const; - //! Returns the set of structures displayed in this view. Standard_EXPORT void DisplayedStructures (Graphic3d_MapOfStructure& theStructures) const; diff --git a/src/Graphic3d/Graphic3d_Group.cxx b/src/Graphic3d/Graphic3d_Group.cxx index ad202ca899..1a704ec9d7 100644 --- a/src/Graphic3d/Graphic3d_Group.cxx +++ b/src/Graphic3d/Graphic3d_Group.cxx @@ -47,9 +47,8 @@ IMPLEMENT_STANDARD_RTTIEXT(Graphic3d_Group,Standard_Transient) // purpose : // ======================================================================= Graphic3d_Group::Graphic3d_Group (const Handle(Graphic3d_Structure)& theStruct) -: myStructure (theStruct.operator->()), - myIsClosed (false), - myContainsFacet (false) +: myStructure(theStruct.operator->()), + myIsClosed (false) { // } @@ -77,12 +76,6 @@ void Graphic3d_Group::Clear (Standard_Boolean theUpdateStructureMgr) myBounds.Clear(); - if (myContainsFacet) - { - myStructure->GroupsWithFacet (-1); - myContainsFacet = false; - } - // clear method could be used on Graphic3d_Structure destruction, // and its structure manager could be already destroyed, in that // case we don't need to update it; @@ -103,11 +96,6 @@ void Graphic3d_Group::Remove() return; } - if (myContainsFacet) - { - myStructure->GroupsWithFacet (-1); - myContainsFacet = false; - } myStructure->Remove (this); Update(); @@ -255,21 +243,13 @@ void Graphic3d_Group::AddPrimitiveArray (const Graphic3d_TypeOfPrimitiveArray th const Handle(Graphic3d_BoundBuffer)& , const Standard_Boolean theToEvalMinMax) { + (void )theType; if (IsDeleted() || theAttribs.IsNull()) { return; } - if (!myContainsFacet - && theType != Graphic3d_TOPA_POLYLINES - && theType != Graphic3d_TOPA_SEGMENTS - && theType != Graphic3d_TOPA_POINTS) - { - myStructure->GroupsWithFacet (1); - myContainsFacet = true; - } - if (!theToEvalMinMax) { Update(); @@ -481,5 +461,4 @@ void Graphic3d_Group::DumpJson (Standard_OStream& theOStream, Standard_Integer t OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &myBounds) OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myIsClosed) - OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myContainsFacet) } diff --git a/src/Graphic3d/Graphic3d_Group.hxx b/src/Graphic3d/Graphic3d_Group.hxx index c8462b90c7..47db10e404 100644 --- a/src/Graphic3d/Graphic3d_Group.hxx +++ b/src/Graphic3d/Graphic3d_Group.hxx @@ -140,9 +140,6 @@ public: //! Set transformation persistence. Standard_EXPORT virtual void SetTransformPersistence (const Handle(Graphic3d_TransformPers)& theTrsfPers); - //! Returns true if the group contains Polygons, Triangles or Quadrangles. - bool ContainsFacet() const { return myContainsFacet; } - //! Returns Standard_True if the group is deleted. //! is deleted after the call Remove (me) or the //! associated structure is deleted. @@ -301,7 +298,6 @@ protected: Graphic3d_Structure* myStructure; //!< pointer to the parent structure Graphic3d_BndBox4f myBounds; //!< bounding box bool myIsClosed; //!< flag indicating closed volume - bool myContainsFacet; //!< flag indicating that this group contains face primitives }; diff --git a/src/Graphic3d/Graphic3d_Structure.cxx b/src/Graphic3d/Graphic3d_Structure.cxx index cfe5ff8ecc..062b264097 100644 --- a/src/Graphic3d/Graphic3d_Structure.cxx +++ b/src/Graphic3d/Graphic3d_Structure.cxx @@ -85,7 +85,6 @@ void Graphic3d_Structure::clear (const Standard_Boolean theWithDestruction) // clean groups in graphics driver at first GraphicClear (theWithDestruction); - myCStructure->ContainsFacet = 0; myCStructure->SetGroupTransformPersistence (false); myStructureManager->Clear (this, theWithDestruction); @@ -294,33 +293,6 @@ void Graphic3d_Structure::UnHighlight() } } -//============================================================================= -//function : ContainsFacet -//purpose : -//============================================================================= -Standard_Boolean Graphic3d_Structure::ContainsFacet() const -{ - if (IsDeleted()) - { - return Standard_False; - } - else if (myCStructure->ContainsFacet > 0) - { - // if one of groups contains at least one facet, the structure contains it too - return Standard_True; - } - - // stop at the first descendant containing at least one facet - for (NCollection_IndexedMap::Iterator anIter (myDescendants); anIter.More(); anIter.Next()) - { - if (anIter.Value()->ContainsFacet()) - { - return Standard_True; - } - } - return Standard_False; -} - //============================================================================= //function : IsEmpty //purpose : @@ -355,19 +327,6 @@ Standard_Boolean Graphic3d_Structure::IsEmpty() const return Standard_True; } -//============================================================================= -//function : GroupsWithFacet -//purpose : -//============================================================================= -void Graphic3d_Structure::GroupsWithFacet (const Standard_Integer theDelta) -{ - myCStructure->ContainsFacet = myCStructure->ContainsFacet + theDelta; - if (myCStructure->ContainsFacet < 0) - { - myCStructure->ContainsFacet = 0; - } -} - //============================================================================= //function : ReCompute //purpose : diff --git a/src/Graphic3d/Graphic3d_Structure.hxx b/src/Graphic3d/Graphic3d_Structure.hxx index 04fa9348e5..8b9e438173 100644 --- a/src/Graphic3d/Graphic3d_Structure.hxx +++ b/src/Graphic3d/Graphic3d_Structure.hxx @@ -198,10 +198,6 @@ public: //! if is displayed in and TOS_COMPUTED. Standard_EXPORT void ReCompute (const Handle(Graphic3d_DataStructureManager)& aProjector); - //! Returns Standard_True if the structure contains - //! Polygons, Triangles or Quadrangles. - Standard_EXPORT Standard_Boolean ContainsFacet() const; - //! Returns the groups sequence included in this structure. const Graphic3d_SequenceOfGroup& Groups() const { return myCStructure->Groups(); } @@ -477,12 +473,6 @@ private: //! It will be erased at the next screen update. Standard_EXPORT void Remove (const Handle(Graphic3d_Group)& theGroup); - //! Manages the number of groups in the structure - //! which contains facet. - //! Polygons, Triangles or Quadrangles. - //! = +1 or -1 - Standard_EXPORT void GroupsWithFacet (const Standard_Integer ADelta); - //! Returns the extreme coordinates found in the structure without transformation applied. Standard_EXPORT Graphic3d_BndBox4f minMaxCoord() const; diff --git a/src/OpenGl/OpenGl_StructureShadow.cxx b/src/OpenGl/OpenGl_StructureShadow.cxx index 64672018d6..c068661e43 100644 --- a/src/OpenGl/OpenGl_StructureShadow.cxx +++ b/src/OpenGl/OpenGl_StructureShadow.cxx @@ -31,7 +31,6 @@ OpenGl_StructureShadow::OpenGl_StructureShadow (const Handle(Graphic3d_Structure Handle(OpenGl_StructureShadow) aShadow = Handle(OpenGl_StructureShadow)::DownCast (theStructure); myParent = aShadow.IsNull() ? theStructure : aShadow->myParent; - ContainsFacet = myParent->ContainsFacet; IsInfinite = myParent->IsInfinite; myBndBox = myParent->BoundingBox(); From 8f7159cbaa248a4e3d07983b16d6e2c8071cc593 Mon Sep 17 00:00:00 2001 From: kgv Date: Sat, 4 Dec 2021 15:19:47 +0300 Subject: [PATCH 166/639] 0032713: Visualization, OpenGl_GlFunctions - unify OpenGL and OpenGL ES function lists Including system OpenGL headers has been moved from OpenGl_GlFunctions.hxx to OpenGl_GlNative.hxx. Added OpenGl_GlTypes.hxx providing basic OpenGL 1.1 types. Wrappers of system OpenGL 1.1 / OpenGL ES 2.0 functions have been moved to OpenGl_GlFunctions.cxx. Avoided usage of global OpenGL functions in OpenGl package outside of OpenGl_GlFunctions.cxx. --- src/OpenGl/FILES | 2 + src/OpenGl/OpenGl_AspectsSprite.cxx | 15 +- src/OpenGl/OpenGl_CappingAlgo.cxx | 38 +- src/OpenGl/OpenGl_Context.cxx | 769 ++++------- src/OpenGl/OpenGl_Context.hxx | 2 +- src/OpenGl/OpenGl_Font.cxx | 7 +- src/OpenGl/OpenGl_FrameBuffer.cxx | 126 +- src/OpenGl/OpenGl_FrameStatsPrs.cxx | 10 +- src/OpenGl/OpenGl_GlCore11.hxx | 438 +++---- src/OpenGl/OpenGl_GlCore11Fwd.hxx | 590 ++------- src/OpenGl/OpenGl_GlCore32.hxx | 4 - src/OpenGl/OpenGl_GlCore33.hxx | 4 - src/OpenGl/OpenGl_GlCore40.hxx | 4 - src/OpenGl/OpenGl_GlCore41.hxx | 4 - src/OpenGl/OpenGl_GlCore42.hxx | 4 - src/OpenGl/OpenGl_GlCore43.hxx | 4 - src/OpenGl/OpenGl_GlCore44.hxx | 4 - src/OpenGl/OpenGl_GlCore45.hxx | 2 - src/OpenGl/OpenGl_GlCore46.hxx | 2 - src/OpenGl/OpenGl_GlFunctions.cxx | 1656 +++++++++++++++++++++++- src/OpenGl/OpenGl_GlFunctions.hxx | 1295 ++++++------------ src/OpenGl/OpenGl_GlNative.hxx | 67 + src/OpenGl/OpenGl_GlTypes.hxx | 345 +++++ src/OpenGl/OpenGl_GraphicDriver.cxx | 12 +- src/OpenGl/OpenGl_LayerList.cxx | 10 +- src/OpenGl/OpenGl_LineAttributes.cxx | 12 - src/OpenGl/OpenGl_PBREnvironment.cxx | 9 +- src/OpenGl/OpenGl_PointSprite.cxx | 10 +- src/OpenGl/OpenGl_PrimitiveArray.cxx | 73 +- src/OpenGl/OpenGl_Sampler.cxx | 15 +- src/OpenGl/OpenGl_ShaderManager.cxx | 27 +- src/OpenGl/OpenGl_ShaderProgram.cxx | 210 +-- src/OpenGl/OpenGl_StencilTest.cxx | 11 +- src/OpenGl/OpenGl_Structure.cxx | 7 +- src/OpenGl/OpenGl_Text.cxx | 33 +- src/OpenGl/OpenGl_Texture.cxx | 163 ++- src/OpenGl/OpenGl_TextureFormat.cxx | 246 ++-- src/OpenGl/OpenGl_TileSampler.cxx | 20 +- src/OpenGl/OpenGl_VertexBuffer.cxx | 6 - src/OpenGl/OpenGl_VertexBuffer.hxx | 3 +- src/OpenGl/OpenGl_View.cxx | 101 +- src/OpenGl/OpenGl_View_Raytrace.cxx | 87 +- src/OpenGl/OpenGl_Window.cxx | 8 +- src/OpenGl/OpenGl_Workspace.cxx | 23 +- src/OpenGlTest/OpenGlTest_Commands.cxx | 13 +- 45 files changed, 3601 insertions(+), 2890 deletions(-) create mode 100644 src/OpenGl/OpenGl_GlNative.hxx create mode 100644 src/OpenGl/OpenGl_GlTypes.hxx diff --git a/src/OpenGl/FILES b/src/OpenGl/FILES index e5b28a4b3c..c15c132dc6 100755 --- a/src/OpenGl/FILES +++ b/src/OpenGl/FILES @@ -84,6 +84,8 @@ OpenGl_ExtGS.hxx OpenGl_GLESExtensions.hxx OpenGl_GlFunctions.cxx OpenGl_GlFunctions.hxx +OpenGl_GlNative.hxx +OpenGl_GlTypes.hxx OpenGl_Flipper.cxx OpenGl_Flipper.hxx OpenGl_GlCore11.hxx diff --git a/src/OpenGl/OpenGl_AspectsSprite.cxx b/src/OpenGl/OpenGl_AspectsSprite.cxx index 81ad63cc78..bf9a21df3e 100644 --- a/src/OpenGl/OpenGl_AspectsSprite.cxx +++ b/src/OpenGl/OpenGl_AspectsSprite.cxx @@ -83,15 +83,14 @@ bool OpenGl_AspectsSprite::HasPointSprite (const Handle(OpenGl_Context)& theCtx, bool OpenGl_AspectsSprite::IsDisplayListSprite (const Handle(OpenGl_Context)& theCtx, const Handle(Graphic3d_Aspects)& theAspects) { -#if !defined(GL_ES_VERSION_2_0) + if (theCtx->GraphicsLibrary() == Aspect_GraphicsLibrary_OpenGLES) + { + return false; + } + const Handle(OpenGl_PointSprite)& aSprite = Sprite (theCtx, theAspects, false); return !aSprite.IsNull() && aSprite->IsDisplayList(); -#else - (void )theCtx; - (void )theAspects; - return false; -#endif } // ======================================================================= @@ -274,7 +273,6 @@ void OpenGl_AspectsSprite::build (const Handle(OpenGl_Context)& theCtx, } else if (theCtx->core11ffp != NULL) { - #if !defined(GL_ES_VERSION_2_0) // Creating list with bitmap for using it in compatibility mode GLuint aBitmapList = theCtx->core11ffp->glGenLists (1); aSprite->SetDisplayList (theCtx, aBitmapList); @@ -315,7 +313,7 @@ void OpenGl_AspectsSprite::build (const Handle(OpenGl_Context)& theCtx, { if (aFormat.IsValid()) { - aBitmapList = glGenLists (1); + aBitmapList = theCtx->core11ffp->glGenLists (1); aSpriteA->SetDisplayList (theCtx, aBitmapList); } @@ -329,7 +327,6 @@ void OpenGl_AspectsSprite::build (const Handle(OpenGl_Context)& theCtx, theCtx->core11ffp->glEndList(); } } - #endif } } // ======================================================================= diff --git a/src/OpenGl/OpenGl_CappingAlgo.cxx b/src/OpenGl/OpenGl_CappingAlgo.cxx index eed90116dd..94bd57c1a3 100755 --- a/src/OpenGl/OpenGl_CappingAlgo.cxx +++ b/src/OpenGl/OpenGl_CappingAlgo.cxx @@ -29,17 +29,18 @@ namespace //! Auxiliary sentry object managing stencil test. struct StencilTestSentry { - StencilTestSentry() : myDepthFuncPrev (0) {} + StencilTestSentry (const Handle(OpenGl_Context)& theCtx) + : myCtx (theCtx.get()), myDepthFuncPrev (0) {} //! Restore previous application state. ~StencilTestSentry() { if (myDepthFuncPrev != 0) { - glClear (GL_STENCIL_BUFFER_BIT); - glDepthFunc (myDepthFuncPrev); - glStencilFunc (GL_ALWAYS, 0, 0xFF); - glDisable (GL_STENCIL_TEST); + myCtx->core11fwd->glClear (GL_STENCIL_BUFFER_BIT); + myCtx->core11fwd->glDepthFunc (myDepthFuncPrev); + myCtx->core11fwd->glStencilFunc (GL_ALWAYS, 0, 0xFF); + myCtx->core11fwd->glDisable (GL_STENCIL_TEST); } } @@ -48,13 +49,14 @@ namespace { if (myDepthFuncPrev == 0) { - glEnable (GL_STENCIL_TEST); - glGetIntegerv (GL_DEPTH_FUNC, &myDepthFuncPrev); - glDepthFunc (GL_LESS); + myCtx->core11fwd->glEnable (GL_STENCIL_TEST); + myCtx->core11fwd->glGetIntegerv (GL_DEPTH_FUNC, &myDepthFuncPrev); + myCtx->core11fwd->glDepthFunc (GL_LESS); } } private: + OpenGl_Context* myCtx; GLint myDepthFuncPrev; }; @@ -120,7 +122,7 @@ namespace aContext->ChangeClipping().DisableAllExcept (theClipChain, theSubPlaneIndex); aContext->ShaderManager()->UpdateClippingState(); - glClear (GL_STENCIL_BUFFER_BIT); + aContext->core11fwd->glClear (GL_STENCIL_BUFFER_BIT); const bool aColorMaskBack = aContext->SetColorMask (false); // override aspects, disable culling @@ -130,14 +132,14 @@ namespace // evaluate number of pair faces if (theWorkspace->UseZBuffer()) { - glDisable (GL_DEPTH_TEST); + aContext->core11fwd->glDisable (GL_DEPTH_TEST); } if (theWorkspace->UseDepthWrite()) { - glDepthMask (GL_FALSE); + aContext->core11fwd->glDepthMask (GL_FALSE); } - glStencilFunc (GL_ALWAYS, 1, 0x01); - glStencilOp (GL_KEEP, GL_INVERT, GL_INVERT); + aContext->core11fwd->glStencilFunc (GL_ALWAYS, 1, 0x01); + aContext->core11fwd->glStencilOp (GL_KEEP, GL_INVERT, GL_INVERT); // render closed primitives if (aRenderPlane->ToUseObjectProperties()) @@ -167,13 +169,13 @@ namespace aContext->SetColorMask (aColorMaskBack); if (theWorkspace->UseDepthWrite()) { - glDepthMask (GL_TRUE); + aContext->core11fwd->glDepthMask (GL_TRUE); } - glStencilFunc (GL_EQUAL, 1, 0x01); - glStencilOp (GL_KEEP, GL_KEEP, GL_KEEP); + aContext->core11fwd->glStencilFunc (GL_EQUAL, 1, 0x01); + aContext->core11fwd->glStencilOp (GL_KEEP, GL_KEEP, GL_KEEP); if (theWorkspace->UseZBuffer()) { - glEnable (GL_DEPTH_TEST); + aContext->core11fwd->glEnable (GL_DEPTH_TEST); } theWorkspace->SetAspects (thePlane->AspectFace()); @@ -212,7 +214,7 @@ void OpenGl_CappingAlgo::RenderCapping (const Handle(OpenGl_Workspace)& theWorks // only filled primitives should be rendered const Standard_Integer aPrevFilter = theWorkspace->RenderFilter(); theWorkspace->SetRenderFilter (aPrevFilter | OpenGl_RenderFilter_FillModeOnly); - StencilTestSentry aStencilSentry; + StencilTestSentry aStencilSentry (aContext); // generate capping for every clip plane for (OpenGl_ClippingIterator aCappingIt (aContext->Clipping()); aCappingIt.More(); aCappingIt.Next()) diff --git a/src/OpenGl/OpenGl_Context.cxx b/src/OpenGl/OpenGl_Context.cxx index f5274a6d46..fbb1caf34d 100644 --- a/src/OpenGl/OpenGl_Context.cxx +++ b/src/OpenGl/OpenGl_Context.cxx @@ -76,6 +76,10 @@ IMPLEMENT_STANDARD_RTTIEXT(OpenGl_Context,Standard_Transient) #include #endif +#if defined(HAVE_GLES2) || defined(OCCT_UWP) || defined(__ANDROID__) || defined(__QNX__) || defined(__EMSCRIPTEN__) || (defined(TARGET_OS_IPHONE) && TARGET_OS_IPHONE) + #define OCC_USE_GLES2 +#endif + namespace { static const Handle(OpenGl_Resource) NULL_GL_RESOURCE; @@ -121,7 +125,7 @@ OpenGl_Context::OpenGl_Context (const Handle(OpenGl_Caps)& theCaps) core20fwd (NULL), caps (!theCaps.IsNull() ? theCaps : new OpenGl_Caps()), hasGetBufferData (Standard_False), -#if defined(GL_ES_VERSION_2_0) +#if defined(OCC_USE_GLES2) hasPackRowLength (Standard_False), hasUnpackRowLength (Standard_False), hasHighp (Standard_False), @@ -139,7 +143,7 @@ OpenGl_Context::OpenGl_Context (const Handle(OpenGl_Caps)& theCaps) hasFboSRGB (Standard_False), hasSRGBControl (Standard_False), hasFboRenderMipmap (Standard_False), -#if defined(GL_ES_VERSION_2_0) +#if defined(OCC_USE_GLES2) hasFlatShading (OpenGl_FeatureNotAvailable), #else hasFlatShading (OpenGl_FeatureInCore), @@ -185,7 +189,7 @@ OpenGl_Context::OpenGl_Context (const Handle(OpenGl_Caps)& theCaps) myGlLibHandle (NULL), myFuncs (new OpenGl_GlFunctions()), myGapi ( -#if defined(GL_ES_VERSION_2_0) +#if defined(OCC_USE_GLES2) Aspect_GraphicsLibrary_OpenGLES #else Aspect_GraphicsLibrary_OpenGL @@ -225,17 +229,10 @@ OpenGl_Context::OpenGl_Context (const Handle(OpenGl_Caps)& theCaps) myActiveMockTextures (0), myActiveHatchType (Aspect_HS_SOLID), myHatchIsEnabled (false), -#if !defined(GL_ES_VERSION_2_0) myPointSpriteOrig (GL_UPPER_LEFT), myRenderMode (GL_RENDER), myShadeModel (GL_SMOOTH), myPolygonMode (GL_FILL), -#else - myPointSpriteOrig (0), - myRenderMode (0), - myShadeModel (0), - myPolygonMode (0), -#endif myToCullBackFaces (false), myReadBuffer (0), myDrawBuffers (0, 7), @@ -299,7 +296,6 @@ OpenGl_Context::~OpenGl_Context() // release clean up queue ReleaseDelayed(); -#if !defined(GL_ES_VERSION_2_0) // release default VAO if (myDefaultVao != 0 && IsValid() @@ -308,7 +304,6 @@ OpenGl_Context::~OpenGl_Context() core32->glDeleteVertexArrays (1, &myDefaultVao); } myDefaultVao = 0; -#endif // release mock textures if (!myTextureRgbaBlack.IsNull()) @@ -358,11 +353,13 @@ OpenGl_Context::~OpenGl_Context() && IsValid()) { // reset callback - #if !defined(GL_ES_VERSION_2_0) void* aPtr = NULL; - glGetPointerv (GL_DEBUG_CALLBACK_USER_PARAM, &aPtr); - if (aPtr == this) - #endif + if (myGapi == Aspect_GraphicsLibrary_OpenGL) + { + myFuncs->glGetPointerv (GL_DEBUG_CALLBACK_USER_PARAM, &aPtr); + } + if (aPtr == this + || myGapi != Aspect_GraphicsLibrary_OpenGL) { arbDbg->glDebugMessageCallback (NULL, NULL); } @@ -421,8 +418,7 @@ void OpenGl_Context::ResizeViewport (const Standard_Integer* theRect) } } -#if !defined(GL_ES_VERSION_2_0) -inline Standard_Integer stereoToMonoBuffer (const Standard_Integer theBuffer) +static Standard_Integer stereoToMonoBuffer (const Standard_Integer theBuffer) { switch (theBuffer) { @@ -436,7 +432,6 @@ inline Standard_Integer stereoToMonoBuffer (const Standard_Integer theBuffer) return theBuffer; } } -#endif // ======================================================================= // function : SetReadBuffer @@ -444,17 +439,18 @@ inline Standard_Integer stereoToMonoBuffer (const Standard_Integer theBuffer) // ======================================================================= void OpenGl_Context::SetReadBuffer (const Standard_Integer theReadBuffer) { -#if !defined(GL_ES_VERSION_2_0) + if (myGapi == Aspect_GraphicsLibrary_OpenGLES) + { + return; + } + myReadBuffer = !myIsStereoBuffers ? stereoToMonoBuffer (theReadBuffer) : theReadBuffer; if (myReadBuffer < GL_COLOR_ATTACHMENT0 && arbFBO != NULL) { arbFBO->glBindFramebuffer (GL_FRAMEBUFFER, OpenGl_FrameBuffer::NO_FRAMEBUFFER); } - ::glReadBuffer (myReadBuffer); -#else - (void )theReadBuffer; -#endif + core11fwd->glReadBuffer (myReadBuffer); } // ======================================================================= @@ -463,20 +459,21 @@ void OpenGl_Context::SetReadBuffer (const Standard_Integer theReadBuffer) // ======================================================================= void OpenGl_Context::SetDrawBuffer (const Standard_Integer theDrawBuffer) { -#if !defined(GL_ES_VERSION_2_0) + if (myGapi == Aspect_GraphicsLibrary_OpenGLES) + { + return; + } + const Standard_Integer aDrawBuffer = !myIsStereoBuffers ? stereoToMonoBuffer (theDrawBuffer) : theDrawBuffer; if (aDrawBuffer < GL_COLOR_ATTACHMENT0 && arbFBO != NULL) { arbFBO->glBindFramebuffer (GL_FRAMEBUFFER, OpenGl_FrameBuffer::NO_FRAMEBUFFER); } - ::glDrawBuffer (aDrawBuffer); + core11fwd->glDrawBuffer (aDrawBuffer); myDrawBuffers.Init (GL_NONE); myDrawBuffers.SetValue (0, aDrawBuffer); -#else - (void )theDrawBuffer; -#endif } // ======================================================================= @@ -572,16 +569,20 @@ void OpenGl_Context::SetCullBackFaces (bool theToEnable) // ======================================================================= void OpenGl_Context::FetchState() { -#if !defined(GL_ES_VERSION_2_0) + if (myGapi == Aspect_GraphicsLibrary_OpenGLES) + { + return; + } + // cache feedback mode state if (core11ffp != NULL) { - ::glGetIntegerv (GL_RENDER_MODE, &myRenderMode); - ::glGetIntegerv (GL_SHADE_MODEL, &myShadeModel); + core11fwd->glGetIntegerv (GL_RENDER_MODE, &myRenderMode); + core11fwd->glGetIntegerv (GL_SHADE_MODEL, &myShadeModel); } // cache read buffers state - ::glGetIntegerv (GL_READ_BUFFER, &myReadBuffer); + core11fwd->glGetIntegerv (GL_READ_BUFFER, &myReadBuffer); // cache draw buffers state if (myDrawBuffers.Length() < myMaxDrawBuffers) @@ -593,18 +594,17 @@ void OpenGl_Context::FetchState() Standard_Integer aDrawBuffer = GL_NONE; if (myMaxDrawBuffers == 1) { - ::glGetIntegerv (GL_DRAW_BUFFER, &aDrawBuffer); + core11fwd->glGetIntegerv (GL_DRAW_BUFFER, &aDrawBuffer); myDrawBuffers.SetValue (0, aDrawBuffer); } else { for (Standard_Integer anI = 0; anI < myMaxDrawBuffers; ++anI) { - ::glGetIntegerv (GL_DRAW_BUFFER0 + anI, &aDrawBuffer); + core11fwd->glGetIntegerv (GL_DRAW_BUFFER0 + anI, &aDrawBuffer); myDrawBuffers.SetValue (anI, aDrawBuffer); } } -#endif } // ======================================================================= @@ -755,7 +755,7 @@ void OpenGl_Context::SwapBuffers() if ((HDC )myDisplay != NULL) { ::SwapBuffers ((HDC )myDisplay); - glFlush(); + core11fwd->glFlush(); } #elif defined(HAVE_XLIB) if ((Display* )myDisplay != NULL) @@ -851,14 +851,14 @@ Standard_Boolean OpenGl_Context::CheckExtension (const char* theExtName) const return Standard_False; } -#if !defined(GL_ES_VERSION_2_0) // available since OpenGL 3.0 // and the ONLY way to check extensions with OpenGL 3.1+ core profile - if (IsGlGreaterEqual (3, 0) + if (myGapi == Aspect_GraphicsLibrary_OpenGL + && IsGlGreaterEqual (3, 0) && myFuncs->glGetStringi != NULL) { GLint anExtNb = 0; - ::glGetIntegerv (GL_NUM_EXTENSIONS, &anExtNb); + core11fwd->glGetIntegerv (GL_NUM_EXTENSIONS, &anExtNb); const size_t anExtNameLen = strlen (theExtName); for (GLint anIter = 0; anIter < anExtNb; ++anIter) { @@ -872,10 +872,9 @@ Standard_Boolean OpenGl_Context::CheckExtension (const char* theExtName) const } return Standard_False; } -#endif // use old way with huge string for all extensions - const char* anExtString = (const char* )glGetString (GL_EXTENSIONS); + const char* anExtString = (const char* )core11fwd->glGetString (GL_EXTENSIONS); if (anExtString == NULL) { Messenger()->Send ("TKOpenGL: glGetString (GL_EXTENSIONS) has returned NULL! No GL context?", Message_Warning); @@ -1039,10 +1038,8 @@ TCollection_AsciiString OpenGl_Context::FormatGlError (int theGlError) case GL_INVALID_ENUM: return "GL_INVALID_ENUM"; case GL_INVALID_VALUE: return "GL_INVALID_VALUE"; case GL_INVALID_OPERATION: return "GL_INVALID_OPERATION"; - #ifdef GL_STACK_OVERFLOW case GL_STACK_OVERFLOW: return "GL_STACK_OVERFLOW"; case GL_STACK_UNDERFLOW: return "GL_STACK_UNDERFLOW"; - #endif case GL_OUT_OF_MEMORY: return "GL_OUT_OF_MEMORY"; case GL_INVALID_FRAMEBUFFER_OPERATION: return "GL_INVALID_FRAMEBUFFER_OPERATION"; } @@ -1056,18 +1053,18 @@ TCollection_AsciiString OpenGl_Context::FormatGlError (int theGlError) bool OpenGl_Context::ResetErrors (const bool theToPrintErrors) { int aPrevErr = 0; - int anErr = ::glGetError(); + int anErr = core11fwd->glGetError(); const bool hasError = anErr != GL_NO_ERROR; if (!theToPrintErrors) { - for (; anErr != GL_NO_ERROR && aPrevErr != anErr; aPrevErr = anErr, anErr = ::glGetError()) + for (; anErr != GL_NO_ERROR && aPrevErr != anErr; aPrevErr = anErr, anErr = core11fwd->glGetError()) { // } return hasError; } - for (; anErr != GL_NO_ERROR && aPrevErr != anErr; aPrevErr = anErr, anErr = ::glGetError()) + for (; anErr != GL_NO_ERROR && aPrevErr != anErr; aPrevErr = anErr, anErr = core11fwd->glGetError()) { const TCollection_ExtendedString aMsg = TCollection_ExtendedString ("Unhandled GL error: ") + FormatGlError (anErr); PushMessage (GL_DEBUG_SOURCE_APPLICATION, GL_DEBUG_TYPE_OTHER, 0, GL_DEBUG_SEVERITY_LOW, aMsg); @@ -1075,36 +1072,6 @@ bool OpenGl_Context::ResetErrors (const bool theToPrintErrors) return hasError; } -// ======================================================================= -// function : debugPrintError -// purpose : -// ======================================================================= -bool OpenGl_GlFunctions::debugPrintError (const char* theName) const -{ - const int anErr = ::glGetError(); - if (anErr != GL_NO_ERROR) - { - Message::SendFail() << theName << "(), unhandled GL error: " << OpenGl_Context::FormatGlError (anErr); - // there is no glSetError(), just emulate non-clear state - switch (anErr) - { - case GL_INVALID_VALUE: - { - ::glLineWidth(-1.0f); - ::glLineWidth( 1.0f); - break; - } - default: - case GL_INVALID_ENUM: - { - ::glEnable (0xFFFF); - break; - } - } - } - return anErr != GL_NO_ERROR; -} - // ======================================================================= // function : ReadGlVersion // purpose : @@ -1112,126 +1079,7 @@ bool OpenGl_GlFunctions::debugPrintError (const char* theName) const void OpenGl_Context::ReadGlVersion (Standard_Integer& theGlVerMajor, Standard_Integer& theGlVerMinor) { - // reset values - theGlVerMajor = 0; - theGlVerMinor = 0; - - bool toCheckVer3 = true; -#if defined(__EMSCRIPTEN__) - // WebGL 1.0 prints annoying invalid enumeration warnings to console. - toCheckVer3 = false; - if (EMSCRIPTEN_WEBGL_CONTEXT_HANDLE aWebGlCtx = emscripten_webgl_get_current_context()) - { - EmscriptenWebGLContextAttributes anAttribs = {}; - if (emscripten_webgl_get_context_attributes (aWebGlCtx, &anAttribs) == EMSCRIPTEN_RESULT_SUCCESS) - { - toCheckVer3 = anAttribs.majorVersion >= 2; - } - } -#endif - - // Available since OpenGL 3.0 and OpenGL ES 3.0. - if (toCheckVer3) - { - GLint aMajor = 0, aMinor = 0; - glGetIntegerv (GL_MAJOR_VERSION, &aMajor); - glGetIntegerv (GL_MINOR_VERSION, &aMinor); - // glGetError() sometimes does not report an error here even if - // GL does not know GL_MAJOR_VERSION and GL_MINOR_VERSION constants. - // This happens on some renderers like e.g. Cygwin MESA. - // Thus checking additionally if GL has put anything to - // the output variables. - if (::glGetError() == GL_NO_ERROR && aMajor != 0 && aMinor != 0) - { - theGlVerMajor = aMajor; - theGlVerMinor = aMinor; - return; - } - for (GLenum anErr = ::glGetError(), aPrevErr = GL_NO_ERROR;; aPrevErr = anErr, anErr = ::glGetError()) - { - if (anErr == GL_NO_ERROR - || anErr == aPrevErr) - { - break; - } - } - } - - // Read version string. - // Notice that only first two numbers split by point '2.1 XXXXX' are significant. - // Following trash (after space) is vendor-specific. - // New drivers also returns micro version of GL like '3.3.0' which has no meaning - // and should be considered as vendor-specific too. - const char* aVerStr = (const char* )glGetString (GL_VERSION); - if (aVerStr == NULL || *aVerStr == '\0') - { - // invalid GL context - return; - } - -//#if defined(GL_ES_VERSION_2_0) - // skip "OpenGL ES-** " section - for (; *aVerStr != '\0'; ++aVerStr) - { - if (*aVerStr >= '0' && *aVerStr <= '9') - { - break; - } - } -//#endif - - // parse string for major number - char aMajorStr[32]; - char aMinorStr[32]; - size_t aMajIter = 0; - while (aVerStr[aMajIter] >= '0' && aVerStr[aMajIter] <= '9') - { - ++aMajIter; - } - if (aMajIter == 0 || aMajIter >= sizeof(aMajorStr)) - { - return; - } - memcpy (aMajorStr, aVerStr, aMajIter); - aMajorStr[aMajIter] = '\0'; - - // parse string for minor number - aVerStr += aMajIter + 1; - size_t aMinIter = 0; - while (aVerStr[aMinIter] >= '0' && aVerStr[aMinIter] <= '9') - { - ++aMinIter; - } - if (aMinIter == 0 || aMinIter >= sizeof(aMinorStr)) - { - return; - } - memcpy (aMinorStr, aVerStr, aMinIter); - aMinorStr[aMinIter] = '\0'; - - // read numbers - theGlVerMajor = atoi (aMajorStr); - theGlVerMinor = atoi (aMinorStr); -#if defined(__EMSCRIPTEN__) - if (theGlVerMajor >= 3) - { - if (!toCheckVer3 - || ::strstr (aVerStr, "WebGL 1.0") != NULL) - { - Message::SendWarning() << "Warning! OpenGL context reports version " << theGlVerMajor << "." << theGlVerMinor - << " but WebGL 2.0 was unavailable\n" - << "Fallback to OpenGL ES 2.0 will be used instead of reported version"; - theGlVerMajor = 2; - theGlVerMinor = 0; - } - } -#endif - - if (theGlVerMajor <= 0) - { - theGlVerMajor = 0; - theGlVerMinor = 0; - } + OpenGl_GlFunctions::readGlVersion (theGlVerMajor, theGlVerMinor); } static Standard_CString THE_DBGMSG_UNKNOWN = "UNKNOWN"; @@ -1370,19 +1218,23 @@ void OpenGl_Context::checkWrongVersion (Standard_Integer theGlVerMajor, Standard myGlVerMinor = theGlVerMinor - 1; return; } -#if defined(GL_ES_VERSION_2_0) - switch (theGlVerMajor) + + if (myGapi == Aspect_GraphicsLibrary_OpenGLES) { - case 3: myGlVerMajor = 2; myGlVerMinor = 0; return; + switch (theGlVerMajor) + { + case 3: myGlVerMajor = 2; myGlVerMinor = 0; return; + } } -#else - switch (theGlVerMajor) + else { - case 2: myGlVerMajor = 1; myGlVerMinor = 5; return; - case 3: myGlVerMajor = 2; myGlVerMinor = 1; return; - case 4: myGlVerMajor = 3; myGlVerMinor = 3; return; + switch (theGlVerMajor) + { + case 2: myGlVerMajor = 1; myGlVerMinor = 5; return; + case 3: myGlVerMajor = 2; myGlVerMinor = 1; return; + case 4: myGlVerMajor = 3; myGlVerMinor = 3; return; + } } -#endif } // ======================================================================= @@ -1399,9 +1251,7 @@ void OpenGl_Context::init (const Standard_Boolean theIsCoreProfile) myMaxDrawBuffers = 1; myMaxColorAttachments = 1; myDefaultVao = 0; - ReadGlVersion (myGlVerMajor, myGlVerMinor); - myVendor = (const char* )::glGetString (GL_VENDOR); - myVendor.LowerCase(); + OpenGl_GlFunctions::readGlVersion (myGlVerMajor, myGlVerMinor); mySupportedFormats->Clear(); if (caps->contextMajorVersionUpper != -1) @@ -1413,19 +1263,22 @@ void OpenGl_Context::init (const Standard_Boolean theIsCoreProfile) { isLowered = true; myGlVerMajor = caps->contextMajorVersionUpper; - #if defined(GL_ES_VERSION_2_0) - switch (myGlVerMajor) + if (myGapi == Aspect_GraphicsLibrary_OpenGLES) { - case 2: myGlVerMinor = 0; break; + switch (myGlVerMajor) + { + case 2: myGlVerMinor = 0; break; + } } - #else - switch (myGlVerMajor) + else { - case 1: myGlVerMinor = 5; break; - case 2: myGlVerMinor = 1; break; - case 3: myGlVerMinor = 3; break; + switch (myGlVerMajor) + { + case 1: myGlVerMinor = 5; break; + case 2: myGlVerMinor = 1; break; + case 3: myGlVerMinor = 3; break; + } } - #endif } if (caps->contextMinorVersionUpper != -1 && myGlVerMinor > caps->contextMinorVersionUpper) @@ -1441,78 +1294,53 @@ void OpenGl_Context::init (const Standard_Boolean theIsCoreProfile) } } + myFuncs->load (*this, theIsCoreProfile); + if (!caps->ffpEnable && !IsGlGreaterEqual (2, 0)) { caps->ffpEnable = true; TCollection_ExtendedString aMsg = TCollection_ExtendedString("OpenGL driver is too old! Context info:\n") - + " Vendor: " + (const char* )::glGetString (GL_VENDOR) + "\n" - + " Renderer: " + (const char* )::glGetString (GL_RENDERER) + "\n" - + " Version: " + (const char* )::glGetString (GL_VERSION) + "\n" + + " Vendor: " + (const char* )core11fwd->glGetString (GL_VENDOR) + "\n" + + " Renderer: " + (const char* )core11fwd->glGetString (GL_RENDERER) + "\n" + + " Version: " + (const char* )core11fwd->glGetString (GL_VERSION) + "\n" + " Fallback using deprecated fixed-function pipeline.\n" + " Visualization might work incorrectly.\n" " Consider upgrading the graphics driver."; PushMessage (GL_DEBUG_SOURCE_APPLICATION, GL_DEBUG_TYPE_PORTABILITY, 0, GL_DEBUG_SEVERITY_HIGH, aMsg); } -#if defined(GL_ES_VERSION_2_0) - (void )theIsCoreProfile; - const bool isCoreProfile = false; -#else - + myVendor = (const char* )core11fwd->glGetString (GL_VENDOR); + myVendor.LowerCase(); if (myVendor.Search ("nvidia") != -1) { // Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STATIC_DRAW) // will use VIDEO memory as the source for buffer object operations. ExcludeMessage (GL_DEBUG_SOURCE_API, 131185); } - if (IsGlGreaterEqual (3, 0)) - { - // retrieve auxiliary function in advance - FindProc ("glGetStringi", myFuncs->glGetStringi); - } - - bool isCoreProfile = false; - if (IsGlGreaterEqual (3, 2)) - { - isCoreProfile = (theIsCoreProfile == Standard_True); - - // detect Core profile - if (!isCoreProfile) - { - GLint aProfile = 0; - ::glGetIntegerv (GL_CONTEXT_PROFILE_MASK, &aProfile); - isCoreProfile = (aProfile & GL_CONTEXT_CORE_PROFILE_BIT) != 0; - } - } -#endif - - myFuncs->load (*this, isCoreProfile); // setup shader generator myShaderManager->SetGapiVersion (myGlVerMajor, myGlVerMinor); myShaderManager->SetEmulateDepthClamp (!arbDepthClamp); - bool toReverseDFdxSign = false; -#if defined(GL_ES_VERSION_2_0) // workaround Adreno driver bug computing reversed normal using dFdx/dFdy - toReverseDFdxSign = myVendor.Search("qualcomm") != -1; -#endif + bool toReverseDFdxSign = myGapi == Aspect_GraphicsLibrary_OpenGLES + && myVendor.Search("qualcomm") != -1; myShaderManager->SetFlatShading (hasFlatShading != OpenGl_FeatureNotAvailable, toReverseDFdxSign); -#if defined(GL_ES_VERSION_2_0) - myShaderManager->SetUseRedAlpha (false); -#else - myShaderManager->SetUseRedAlpha (core11ffp == NULL); -#endif + myShaderManager->SetUseRedAlpha (myGapi != Aspect_GraphicsLibrary_OpenGLES + && core11ffp == NULL); #define checkGlslExtensionShort(theName) myShaderManager->EnableGlslExtension (Graphic3d_GlslExtension_ ## theName, CheckExtension (#theName)) -#if defined(GL_ES_VERSION_2_0) - checkGlslExtensionShort(GL_OES_standard_derivatives); - checkGlslExtensionShort(GL_EXT_shader_texture_lod); - checkGlslExtensionShort(GL_EXT_frag_depth); -#else - checkGlslExtensionShort(GL_EXT_gpu_shader4); -#endif + if (myGapi == Aspect_GraphicsLibrary_OpenGLES) + { + checkGlslExtensionShort(GL_OES_standard_derivatives); + checkGlslExtensionShort(GL_EXT_shader_texture_lod); + checkGlslExtensionShort(GL_EXT_frag_depth); + } + else + { + checkGlslExtensionShort(GL_EXT_gpu_shader4); + } // initialize debug context extension if (arbDbg != NULL @@ -1521,51 +1349,49 @@ void OpenGl_Context::init (const Standard_Boolean theIsCoreProfile) // setup default callback myIsGlDebugCtx = Standard_True; arbDbg->glDebugMessageCallback (debugCallbackWrap, this); - #if defined(GL_ES_VERSION_2_0) - ::glEnable (GL_DEBUG_OUTPUT); - #else - if (core43 != NULL) + if (myGapi == Aspect_GraphicsLibrary_OpenGLES) { - ::glEnable (GL_DEBUG_OUTPUT); + core11fwd->glEnable (GL_DEBUG_OUTPUT); + } + else if (core43 != NULL) + { + core11fwd->glEnable (GL_DEBUG_OUTPUT); } - #endif if (caps->contextSyncDebug) { // note that some broken implementations (e.g. simulators) might generate error message on this call - ::glEnable (GL_DEBUG_OUTPUT_SYNCHRONOUS); + core11fwd->glEnable (GL_DEBUG_OUTPUT_SYNCHRONOUS); } } if (hasDrawBuffers) { - glGetIntegerv (GL_MAX_DRAW_BUFFERS, &myMaxDrawBuffers); - glGetIntegerv (GL_MAX_COLOR_ATTACHMENTS, &myMaxColorAttachments); + core11fwd->glGetIntegerv (GL_MAX_DRAW_BUFFERS, &myMaxDrawBuffers); + core11fwd->glGetIntegerv (GL_MAX_COLOR_ATTACHMENTS, &myMaxColorAttachments); if (myDrawBuffers.Length() < myMaxDrawBuffers) { myDrawBuffers.Resize (0, myMaxDrawBuffers - 1, false); } } - glGetIntegerv (GL_MAX_TEXTURE_SIZE, &myMaxTexDim); -#if !defined(GL_ES_VERSION_2_0) + core11fwd->glGetIntegerv (GL_MAX_TEXTURE_SIZE, &myMaxTexDim); if (IsGlGreaterEqual (1, 3) && core11ffp != NULL) { // this is a maximum of texture units for FFP functionality, // usually smaller than combined texture units available for GLSL - glGetIntegerv (GL_MAX_TEXTURE_UNITS, &myMaxTexUnitsFFP); + core11fwd->glGetIntegerv (GL_MAX_TEXTURE_UNITS, &myMaxTexUnitsFFP); myMaxTexCombined = myMaxTexUnitsFFP; } -#endif if (IsGlGreaterEqual (2, 0)) { - glGetIntegerv (GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS, &myMaxTexCombined); + core11fwd->glGetIntegerv (GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS, &myMaxTexCombined); } mySpriteTexUnit = myMaxTexCombined >= 2 ? Graphic3d_TextureUnit_PointSprite : Graphic3d_TextureUnit_0; GLint aMaxVPortSize[2] = {0, 0}; - glGetIntegerv (GL_MAX_VIEWPORT_DIMS, aMaxVPortSize); + core11fwd->glGetIntegerv (GL_MAX_VIEWPORT_DIMS, aMaxVPortSize); myMaxDumpSizeX = Min (aMaxVPortSize[0], myMaxTexDim); myMaxDumpSizeY = Min (aMaxVPortSize[1], myMaxTexDim); if (myVendor == "intel") @@ -1576,80 +1402,84 @@ void OpenGl_Context::init (const Standard_Boolean theIsCoreProfile) if (extAnis) { - glGetIntegerv (GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT, &myAnisoMax); + core11fwd->glGetIntegerv (GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT, &myAnisoMax); } myClippingState.Init(); -#if defined(GL_ES_VERSION_2_0) - if (IsGlGreaterEqual (3, 0)) + if (myGapi == Aspect_GraphicsLibrary_OpenGLES) { - // MSAA RenderBuffers have been defined in OpenGL ES 3.0, but MSAA Textures - only in OpenGL ES 3.1+ - myHasMsaaTextures = IsGlGreaterEqual (3, 1) - && myFuncs->glTexStorage2DMultisample != NULL; - ::glGetIntegerv (GL_MAX_SAMPLES, &myMaxMsaaSamples); + if (IsGlGreaterEqual (3, 0)) + { + // MSAA RenderBuffers have been defined in OpenGL ES 3.0, but MSAA Textures - only in OpenGL ES 3.1+ + myHasMsaaTextures = IsGlGreaterEqual (3, 1) + && myFuncs->glTexStorage2DMultisample != NULL; + core11fwd->glGetIntegerv (GL_MAX_SAMPLES, &myMaxMsaaSamples); + } } -#else - if (core30 != NULL) + else if (core30 != NULL) { // MSAA RenderBuffers have been defined in OpenGL 3.0, but MSAA Textures - only in OpenGL 3.2+ if (core32 != NULL) { myHasMsaaTextures = true; - ::glGetIntegerv (GL_MAX_SAMPLES, &myMaxMsaaSamples); + core11fwd->glGetIntegerv (GL_MAX_SAMPLES, &myMaxMsaaSamples); } else if (CheckExtension ("GL_ARB_texture_multisample") && myFuncs->glTexImage2DMultisample != NULL) { myHasMsaaTextures = true; GLint aNbColorSamples = 0, aNbDepthSamples = 0; - ::glGetIntegerv (GL_MAX_COLOR_TEXTURE_SAMPLES, &aNbColorSamples); - ::glGetIntegerv (GL_MAX_DEPTH_TEXTURE_SAMPLES, &aNbDepthSamples); + core11fwd->glGetIntegerv (GL_MAX_COLOR_TEXTURE_SAMPLES, &aNbColorSamples); + core11fwd->glGetIntegerv (GL_MAX_DEPTH_TEXTURE_SAMPLES, &aNbDepthSamples); myMaxMsaaSamples = Min (aNbColorSamples, aNbDepthSamples); } } -#endif if (myMaxMsaaSamples <= 1) { myHasMsaaTextures = false; } -#if !defined(GL_ES_VERSION_2_0) - if (core32 != NULL && isCoreProfile) + if (myGapi != Aspect_GraphicsLibrary_OpenGLES) { - core32->glGenVertexArrays (1, &myDefaultVao); - } + if (core32 != NULL && core11ffp == NULL) + { + core32->glGenVertexArrays (1, &myDefaultVao); + } - myTexClamp = IsGlGreaterEqual (1, 2) ? GL_CLAMP_TO_EDGE : GL_CLAMP; + myTexClamp = IsGlGreaterEqual (1, 2) ? GL_CLAMP_TO_EDGE : GL_CLAMP; - GLint aStereo = GL_FALSE; - glGetIntegerv (GL_STEREO, &aStereo); - myIsStereoBuffers = aStereo == 1; + GLint aStereo = GL_FALSE; + core11fwd->glGetIntegerv (GL_STEREO, &aStereo); + myIsStereoBuffers = aStereo == 1; - // get number of maximum clipping planes - glGetIntegerv (GL_MAX_CLIP_PLANES, &myMaxClipPlanes); -#endif + // get number of maximum clipping planes + core11fwd->glGetIntegerv (GL_MAX_CLIP_PLANES, &myMaxClipPlanes); + } -#if defined(GL_ES_VERSION_2_0) - // check whether ray tracing mode is supported - myHasRayTracing = IsGlGreaterEqual (3, 2); - myHasRayTracingTextures = myHasRayTracingAdaptiveSampling = myHasRayTracingAdaptiveSamplingAtomic = false; -#else - // check whether ray tracing mode is supported - myHasRayTracing = IsGlGreaterEqual (3, 1) - && arbTboRGB32 - && arbFBOBlit != NULL; - - // check whether textures in ray tracing mode are supported - myHasRayTracingTextures = myHasRayTracing - && arbTexBindless != NULL; - - // check whether adaptive screen sampling in ray tracing mode is supported - myHasRayTracingAdaptiveSampling = myHasRayTracing - && core44 != NULL; - myHasRayTracingAdaptiveSamplingAtomic = myHasRayTracingAdaptiveSampling - && CheckExtension ("GL_NV_shader_atomic_float"); -#endif + if (myGapi == Aspect_GraphicsLibrary_OpenGLES) + { + // check whether ray tracing mode is supported + myHasRayTracing = IsGlGreaterEqual (3, 2); + myHasRayTracingTextures = myHasRayTracingAdaptiveSampling = myHasRayTracingAdaptiveSamplingAtomic = false; + } + else + { + // check whether ray tracing mode is supported + myHasRayTracing = IsGlGreaterEqual (3, 1) + && arbTboRGB32 + && arbFBOBlit != NULL; + + // check whether textures in ray tracing mode are supported + myHasRayTracingTextures = myHasRayTracing + && arbTexBindless != NULL; + + // check whether adaptive screen sampling in ray tracing mode is supported + myHasRayTracingAdaptiveSampling = myHasRayTracing + && core44 != NULL; + myHasRayTracingAdaptiveSamplingAtomic = myHasRayTracingAdaptiveSampling + && CheckExtension ("GL_NV_shader_atomic_float"); + } if (arbFBO != NULL && hasFboSRGB) @@ -1657,17 +1487,13 @@ void OpenGl_Context::init (const Standard_Boolean theIsCoreProfile) // Detect if window buffer is considered by OpenGL as sRGB-ready // (linear RGB color written by shader is automatically converted into sRGB) // or not (offscreen FBO should be blit into window buffer with gamma correction). - const GLenum aDefWinBuffer = - #if !defined(GL_ES_VERSION_2_0) - GL_BACK_LEFT; - #else - GL_BACK; - #endif + const GLenum aDefWinBuffer = myGapi == Aspect_GraphicsLibrary_OpenGLES ? GL_BACK : GL_BACK_LEFT; GLint aWinColorEncoding = 0; // GL_LINEAR bool toSkipCheck = false; - #if defined(GL_ES_VERSION_2_0) - toSkipCheck = !IsGlGreaterEqual (3, 0); - #endif + if (myGapi == Aspect_GraphicsLibrary_OpenGLES) + { + toSkipCheck = !IsGlGreaterEqual (3, 0); + } if (!toSkipCheck) { arbFBO->glGetFramebufferAttachmentParameteriv (GL_FRAMEBUFFER, aDefWinBuffer, GL_FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING, &aWinColorEncoding); @@ -1681,17 +1507,18 @@ void OpenGl_Context::init (const Standard_Boolean theIsCoreProfile) // NVIDIA drivers, however, always return GL_LINEAR even for sRGB-ready pixel formats on Windows platform, // while AMD and Intel report GL_SRGB as expected. // macOS drivers seems to be also report GL_LINEAR even for [NSColorSpace sRGBColorSpace]. - #if !defined(GL_ES_VERSION_2_0) - #ifdef __APPLE__ - myIsSRgbWindow = true; - #else - if (!myIsSRgbWindow - && myVendor.Search ("nvidia") != -1) + if (myGapi != Aspect_GraphicsLibrary_OpenGLES) { + #ifdef __APPLE__ myIsSRgbWindow = true; + #else + if (!myIsSRgbWindow + && myVendor.Search ("nvidia") != -1) + { + myIsSRgbWindow = true; + } + #endif } - #endif - #endif if (!myIsSRgbWindow) { Message::SendTrace ("OpenGl_Context, warning: window buffer is not sRGB-ready.\n" @@ -1707,10 +1534,11 @@ void OpenGl_Context::init (const Standard_Boolean theIsCoreProfile) mySupportedFormats->Add (Image_Format_RGBA); if (extBgra) { - #if !defined(GL_ES_VERSION_2_0) - // no BGR on OpenGL ES - only BGRA as extension - mySupportedFormats->Add (Image_Format_BGR); - #endif + if (myGapi != Aspect_GraphicsLibrary_OpenGLES) + { + // no BGR on OpenGL ES - only BGRA as extension + mySupportedFormats->Add (Image_Format_BGR); + } mySupportedFormats->Add (Image_Format_BGR32); mySupportedFormats->Add (Image_Format_BGRA); } @@ -1734,9 +1562,10 @@ void OpenGl_Context::init (const Standard_Boolean theIsCoreProfile) } if (extBgra) { - #if !defined(GL_ES_VERSION_2_0) - mySupportedFormats->Add (Image_Format_BGRF); - #endif + if (myGapi != Aspect_GraphicsLibrary_OpenGLES) + { + mySupportedFormats->Add (Image_Format_BGRF); + } mySupportedFormats->Add (Image_Format_BGRAF); } } @@ -1781,17 +1610,23 @@ void OpenGl_Context::init (const Standard_Boolean theIsCoreProfile) #endif // check whether PBR shading model is supported - myHasPBR = arbFBO != NULL - && myMaxTexCombined >= 4 - && arbTexFloat - && (IsGlGreaterEqual (3, 0) - #if defined(GL_ES_VERSION_2_0) - || hasHighp - // || CheckExtension ("GL_EXT_shader_texture_lod") fallback is used when extension is unavailable - #else - || (IsGlGreaterEqual (2, 1) && CheckExtension ("GL_EXT_gpu_shader4")) - #endif - ); + myHasPBR = false; + if (arbFBO != NULL + && myMaxTexCombined >= 4 + && arbTexFloat) + { + if (myGapi == Aspect_GraphicsLibrary_OpenGLES) + { + myHasPBR = IsGlGreaterEqual (3, 0) + || hasHighp; + // || CheckExtension ("GL_EXT_shader_texture_lod") fallback is used when extension is unavailable + } + else + { + myHasPBR = IsGlGreaterEqual (3, 0) + || (IsGlGreaterEqual (2, 1) && CheckExtension ("GL_EXT_gpu_shader4")); + } + } myDepthPeelingDepthTexUnit = static_cast(myMaxTexCombined + Graphic3d_TextureUnit_DepthPeelingDepth); // -6 myDepthPeelingFrontColorTexUnit = static_cast(myMaxTexCombined + Graphic3d_TextureUnit_DepthPeelingFrontColor); // -5 @@ -1813,7 +1648,6 @@ void OpenGl_Context::init (const Standard_Boolean theIsCoreProfile) // ======================================================================= Standard_Size OpenGl_Context::AvailableMemory() const { -#if !defined(GL_ES_VERSION_2_0) if (atiMem) { // this is actually information for VBO pool @@ -1821,7 +1655,8 @@ Standard_Size OpenGl_Context::AvailableMemory() const // it can be used for total GPU memory estimations GLint aMemInfo[4]; aMemInfo[0] = 0; - glGetIntegerv (GL_VBO_FREE_MEMORY_ATI, aMemInfo); + + core11fwd->glGetIntegerv (GL_VBO_FREE_MEMORY_ATI, aMemInfo); // returned value is in KiB, however this maybe changed in future return Standard_Size(aMemInfo[0]) * 1024; } @@ -1829,10 +1664,9 @@ Standard_Size OpenGl_Context::AvailableMemory() const { // current available dedicated video memory (in KiB), currently unused GPU memory GLint aMemInfo = 0; - glGetIntegerv (GL_GPU_MEMORY_INFO_CURRENT_AVAILABLE_VIDMEM_NVX, &aMemInfo); + core11fwd->glGetIntegerv (GL_GPU_MEMORY_INFO_CURRENT_AVAILABLE_VIDMEM_NVX, &aMemInfo); return Standard_Size(aMemInfo) * 1024; } -#endif return 0; } @@ -1863,7 +1697,7 @@ TCollection_AsciiString OpenGl_Context::MemoryInfo() const // ======================================================================= void OpenGl_Context::MemoryInfo (TColStd_IndexedDataMapOfStringString& theDict) const { -#if defined(GL_ES_VERSION_2_0) +#if defined(TARGET_OS_IPHONE) && TARGET_OS_IPHONE (void )theDict; #elif defined(__APPLE__) && !defined(HAVE_XLIB) GLint aGlRendId = 0; @@ -1907,12 +1741,11 @@ void OpenGl_Context::MemoryInfo (TColStd_IndexedDataMapOfStringString& theDict) } #endif -#if !defined(GL_ES_VERSION_2_0) if (atiMem) { GLint aValues[4]; memset (aValues, 0, sizeof(aValues)); - glGetIntegerv (GL_VBO_FREE_MEMORY_ATI, aValues); + core11fwd->glGetIntegerv (GL_VBO_FREE_MEMORY_ATI, aValues); // total memory free in the pool addInfo (theDict, "GPU free memory", TCollection_AsciiString() + (aValues[0] / 1024) + " MiB"); @@ -1932,16 +1765,16 @@ void OpenGl_Context::MemoryInfo (TColStd_IndexedDataMapOfStringString& theDict) { //current available dedicated video memory (in KiB), currently unused GPU memory GLint aValue = 0; - glGetIntegerv (GL_GPU_MEMORY_INFO_CURRENT_AVAILABLE_VIDMEM_NVX, &aValue); + core11fwd->glGetIntegerv (GL_GPU_MEMORY_INFO_CURRENT_AVAILABLE_VIDMEM_NVX, &aValue); addInfo (theDict, "GPU free memory", TCollection_AsciiString() + (aValue / 1024) + " MiB"); // dedicated video memory, total size (in KiB) of the GPU memory GLint aDedicated = 0; - glGetIntegerv (GL_GPU_MEMORY_INFO_DEDICATED_VIDMEM_NVX, &aDedicated); + core11fwd->glGetIntegerv (GL_GPU_MEMORY_INFO_DEDICATED_VIDMEM_NVX, &aDedicated); addInfo (theDict, "GPU memory", TCollection_AsciiString() + (aDedicated / 1024) + " MiB"); // total available memory, total size (in KiB) of the memory available for allocations - glGetIntegerv (GL_GPU_MEMORY_INFO_TOTAL_AVAILABLE_MEMORY_NVX, &aValue); + core11fwd->glGetIntegerv (GL_GPU_MEMORY_INFO_TOTAL_AVAILABLE_MEMORY_NVX, &aValue); if (aValue != aDedicated) { // different only for special configurations @@ -1963,9 +1796,8 @@ void OpenGl_Context::MemoryInfo (TColStd_IndexedDataMapOfStringString& theDict) } } #endif -#endif -#if !defined(GL_ES_VERSION_2_0) && !defined(__APPLE__) && !defined(_WIN32) +#if defined(HAVE_XLIB) && !defined(__APPLE__) && !defined(_WIN32) // GLX_RENDERER_VENDOR_ID_MESA if (myFuncs->glXQueryCurrentRendererIntegerMESA != NULL) { @@ -2028,24 +1860,24 @@ void OpenGl_Context::DiagnosticInformation (TColStd_IndexedDataMapOfStringString if ((theFlags & Graphic3d_DiagnosticInfo_Device) != 0) { Standard_Integer aDriverVer[2] = {}; - ReadGlVersion (aDriverVer[0], aDriverVer[1]); - addInfo (theDict, "GLvendor", (const char*)::glGetString (GL_VENDOR)); - addInfo (theDict, "GLdevice", (const char*)::glGetString (GL_RENDERER)); + OpenGl_GlFunctions::readGlVersion (aDriverVer[0], aDriverVer[1]); + addInfo (theDict, "GLvendor", (const char*)core11fwd->glGetString (GL_VENDOR)); + addInfo (theDict, "GLdevice", (const char*)core11fwd->glGetString (GL_RENDERER)); #ifdef __EMSCRIPTEN__ if (CheckExtension ("GL_WEBGL_debug_renderer_info")) { - if (const char* aVendor = (const char*)::glGetString (0x9245)) + if (const char* aVendor = (const char*)core11fwd->glGetString (0x9245)) { addInfo (theDict, "GLunmaskedVendor", aVendor); } - if (const char* aDevice = (const char*)::glGetString (0x9246)) + if (const char* aDevice = (const char*)core11fwd->glGetString (0x9246)) { addInfo (theDict, "GLunmaskedDevice", aDevice); } } #endif - addInfo (theDict, "GLversion", (const char*)::glGetString (GL_VERSION)); + addInfo (theDict, "GLversion", (const char*)core11fwd->glGetString (GL_VERSION)); if (myGlVerMajor != aDriverVer[0] || myGlVerMinor != aDriverVer[1]) { @@ -2053,7 +1885,7 @@ void OpenGl_Context::DiagnosticInformation (TColStd_IndexedDataMapOfStringString } if (IsGlGreaterEqual (2, 0)) { - addInfo (theDict, "GLSLversion", (const char*)::glGetString (GL_SHADING_LANGUAGE_VERSION)); + addInfo (theDict, "GLSLversion", (const char*)core11fwd->glGetString (GL_SHADING_LANGUAGE_VERSION)); } if (myIsGlDebugCtx) { @@ -2072,7 +1904,7 @@ void OpenGl_Context::DiagnosticInformation (TColStd_IndexedDataMapOfStringString if ((theFlags & Graphic3d_DiagnosticInfo_FrameBuffer) != 0) { GLint aViewport[4] = {}; - ::glGetIntegerv (GL_VIEWPORT, aViewport); + core11fwd->glGetIntegerv (GL_VIEWPORT, aViewport); addInfo (theDict, "Viewport", TCollection_AsciiString() + aViewport[2] + "x" + aViewport[3]); } @@ -2083,13 +1915,13 @@ void OpenGl_Context::DiagnosticInformation (TColStd_IndexedDataMapOfStringString if ((theFlags & Graphic3d_DiagnosticInfo_Extensions) != 0) { - #if !defined(GL_ES_VERSION_2_0) - if (IsGlGreaterEqual (3, 0) + if (myGapi != Aspect_GraphicsLibrary_OpenGLES + && IsGlGreaterEqual (3, 0) && myFuncs->glGetStringi != NULL) { TCollection_AsciiString anExtList; GLint anExtNb = 0; - ::glGetIntegerv (GL_NUM_EXTENSIONS, &anExtNb); + core11fwd->glGetIntegerv (GL_NUM_EXTENSIONS, &anExtNb); for (GLint anIter = 0; anIter < anExtNb; ++anIter) { const char* anExtension = (const char*)myFuncs->glGetStringi (GL_EXTENSIONS, (GLuint)anIter); @@ -2102,9 +1934,8 @@ void OpenGl_Context::DiagnosticInformation (TColStd_IndexedDataMapOfStringString addInfo(theDict, "GLextensions", anExtList); } else - #endif { - addInfo (theDict, "GLextensions", (const char*)::glGetString (GL_EXTENSIONS)); + addInfo (theDict, "GLextensions", (const char*)core11fwd->glGetString (GL_EXTENSIONS)); } } } @@ -2279,23 +2110,19 @@ Handle(OpenGl_TextureSet) OpenGl_Context::BindTextures (const Handle(OpenGl_Text OpenGl_Sampler::applySamplerParams (aThisCtx, aTextureNew->Sampler()->Parameters(), aTextureNew->Sampler().get(), aTextureNew->GetTarget(), aTextureNew->MaxMipmapLevel()); } } - #if !defined(GL_ES_VERSION_2_0) if (core11ffp != NULL) { OpenGl_Sampler::applyGlobalTextureParams (aThisCtx, *aTextureNew, aTextureNew->Sampler()->Parameters()); } - #endif } else if (aTextureOld != NULL && aTextureOld->IsValid()) { aTextureOld->Unbind (aThisCtx, aTexUnit); - #if !defined(GL_ES_VERSION_2_0) if (core11ffp != NULL) { OpenGl_Sampler::resetGlobalTextureParams (aThisCtx, *aTextureOld, aTextureOld->Sampler()->Parameters()); } - #endif } } myActiveTextures = theTextures; @@ -2362,7 +2189,6 @@ Standard_Boolean OpenGl_Context::BindProgram (const Handle(OpenGl_ShaderProgram) // ======================================================================= void OpenGl_Context::BindDefaultVao() { -#if !defined(GL_ES_VERSION_2_0) if (myDefaultVao == 0 || core32 == NULL) { @@ -2370,7 +2196,6 @@ void OpenGl_Context::BindDefaultVao() } core32->glBindVertexArray (myDefaultVao); -#endif } // ======================================================================= @@ -2390,11 +2215,7 @@ Handle(OpenGl_FrameBuffer) OpenGl_Context::SetDefaultFrameBuffer (const Handle(O // ======================================================================= Standard_Boolean OpenGl_Context::IsRender() const { -#if !defined(GL_ES_VERSION_2_0) return myRenderMode == GL_RENDER; -#else - return Standard_True; -#endif } // ======================================================================= @@ -2403,11 +2224,7 @@ Standard_Boolean OpenGl_Context::IsRender() const // ======================================================================= Standard_Boolean OpenGl_Context::IsFeedback() const { -#if !defined(GL_ES_VERSION_2_0) return myRenderMode == GL_FEEDBACK; -#else - return Standard_False; -#endif } // ======================================================================= @@ -2538,12 +2355,10 @@ void OpenGl_Context::SetColor4fv (const OpenGl_Vec4& theColor) myActiveProgram->SetUniform (this, aLoc, Vec4FromQuantityColor (theColor)); } } -#if !defined(GL_ES_VERSION_2_0) else if (core11ffp != NULL) { core11ffp->glColor4fv (theColor.GetData()); } -#endif } // ======================================================================= @@ -2585,25 +2400,19 @@ void OpenGl_Context::SetLineStipple (const Standard_ShortReal theFactor, return; } -#if !defined(GL_ES_VERSION_2_0) - if (thePattern != 0xFFFF) + if (core11ffp != NULL) { - if (core11ffp != NULL) + if (thePattern != 0xFFFF) { core11fwd->glEnable (GL_LINE_STIPPLE); - core11ffp->glLineStipple (static_cast (theFactor), static_cast (thePattern)); } - } - else - { - if (core11ffp != NULL) + else { core11fwd->glDisable (GL_LINE_STIPPLE); } } -#endif } // ======================================================================= @@ -2612,9 +2421,8 @@ void OpenGl_Context::SetLineStipple (const Standard_ShortReal theFactor, // ======================================================================= void OpenGl_Context::SetLineWidth (const Standard_ShortReal theWidth) { -#if !defined(GL_ES_VERSION_2_0) - if (core11ffp != NULL) -#endif + if (myGapi == Aspect_GraphicsLibrary_OpenGLES + || core11ffp != NULL) { // glLineWidth() is still defined within Core Profile, but has no effect with values != 1.0f core11fwd->glLineWidth (theWidth * myLineWidthScale); @@ -2661,11 +2469,10 @@ void OpenGl_Context::SetTextureMatrix (const Handle(Graphic3d_TextureParams)& th return; } -#if !defined(GL_ES_VERSION_2_0) if (core11ffp != NULL) { GLint aMatrixMode = GL_TEXTURE; - ::glGetIntegerv (GL_MATRIX_MODE, &aMatrixMode); + core11fwd->glGetIntegerv (GL_MATRIX_MODE, &aMatrixMode); core11ffp->glMatrixMode (GL_TEXTURE); OpenGl_Mat4 aTextureMat; @@ -2684,7 +2491,6 @@ void OpenGl_Context::SetTextureMatrix (const Handle(Graphic3d_TextureParams)& th core11ffp->glLoadMatrixf (aTextureMat.GetData()); core11ffp->glMatrixMode (aMatrixMode); } -#endif } // ======================================================================= @@ -2696,20 +2502,19 @@ void OpenGl_Context::SetPointSize (const Standard_ShortReal theSize) if (!myActiveProgram.IsNull()) { myActiveProgram->SetUniform (this, myActiveProgram->GetStateLocation (OpenGl_OCCT_POINT_SIZE), theSize); - #if !defined(GL_ES_VERSION_2_0) - //myContext->core11fwd->glEnable (GL_VERTEX_PROGRAM_POINT_SIZE); - #endif + //if (myGapi == Aspect_GraphicsLibrary_OpenGL) + //core11fwd->glEnable (GL_VERTEX_PROGRAM_POINT_SIZE); } -#if !defined(GL_ES_VERSION_2_0) //else + + if (myGapi != Aspect_GraphicsLibrary_OpenGLES) { core11fwd->glPointSize (theSize); if (core20fwd != NULL) { - //myContext->core11fwd->glDisable (GL_VERTEX_PROGRAM_POINT_SIZE); + //core11fwd->glDisable (GL_VERTEX_PROGRAM_POINT_SIZE); } } -#endif } // ======================================================================= @@ -2718,8 +2523,8 @@ void OpenGl_Context::SetPointSize (const Standard_ShortReal theSize) // ======================================================================= void OpenGl_Context::SetPointSpriteOrigin() { -#if !defined(GL_ES_VERSION_2_0) - if (core15fwd == NULL) + if (myGapi == Aspect_GraphicsLibrary_OpenGLES + || core15fwd == NULL) { return; } @@ -2728,9 +2533,10 @@ void OpenGl_Context::SetPointSpriteOrigin() if (myPointSpriteOrig != aNewState) { myPointSpriteOrig = aNewState; + #if !defined(GL_ES_VERSION_2_0) core15fwd->glPointParameteri (GL_POINT_SPRITE_COORD_ORIGIN, aNewState); + #endif } -#endif } // ======================================================================= @@ -2746,7 +2552,7 @@ Standard_Boolean OpenGl_Context::SetGlNormalizeEnabled (Standard_Boolean isEnabl Standard_Boolean anOldGlNormalize = myIsGlNormalizeEnabled; myIsGlNormalizeEnabled = isEnabled; -#if !defined(GL_ES_VERSION_2_0) + if (core11ffp != NULL) { if (isEnabled) @@ -2758,7 +2564,6 @@ Standard_Boolean OpenGl_Context::SetGlNormalizeEnabled (Standard_Boolean isEnabl core11fwd->glDisable (GL_NORMALIZE); } } -#endif return anOldGlNormalize; } @@ -2769,7 +2574,6 @@ Standard_Boolean OpenGl_Context::SetGlNormalizeEnabled (Standard_Boolean isEnabl // ======================================================================= void OpenGl_Context::SetShadeModel (Graphic3d_TypeOfShadingModel theModel) { -#if !defined(GL_ES_VERSION_2_0) if (core11ffp != NULL) { const Standard_Integer aModel = theModel == Graphic3d_TypeOfShadingModel_PhongFacet @@ -2781,9 +2585,6 @@ void OpenGl_Context::SetShadeModel (Graphic3d_TypeOfShadingModel theModel) myShadeModel = aModel; core11ffp->glShadeModel (aModel); } -#else - (void )theModel; -#endif } // ======================================================================= @@ -2798,13 +2599,11 @@ Standard_Integer OpenGl_Context::SetPolygonMode (const Standard_Integer theMode) } const Standard_Integer anOldPolygonMode = myPolygonMode; - myPolygonMode = theMode; - -#if !defined(GL_ES_VERSION_2_0) - ::glPolygonMode (GL_FRONT_AND_BACK, (GLenum)theMode); -#endif - + if (myGapi != Aspect_GraphicsLibrary_OpenGLES) + { + core11fwd->glPolygonMode (GL_FRONT_AND_BACK, (GLenum)theMode); + } return anOldPolygonMode; } @@ -2824,7 +2623,6 @@ bool OpenGl_Context::SetPolygonHatchEnabled (const bool theIsEnabled) } const bool anOldIsEnabled = myHatchIsEnabled; -#if !defined(GL_ES_VERSION_2_0) if (theIsEnabled && myActiveHatchType != Aspect_HS_SOLID) { @@ -2834,7 +2632,7 @@ bool OpenGl_Context::SetPolygonHatchEnabled (const bool theIsEnabled) { core11fwd->glDisable (GL_POLYGON_STIPPLE); } -#endif + myHatchIsEnabled = theIsEnabled; return anOldIsEnabled; } @@ -2852,7 +2650,6 @@ Standard_Integer OpenGl_Context::SetPolygonHatchStyle (const Handle(Graphic3d_Ha return myActiveHatchType; } -#if !defined(GL_ES_VERSION_2_0) if (aNewStyle == Aspect_HS_SOLID) { if (myHatchIsEnabled) @@ -2879,9 +2676,6 @@ Standard_Integer OpenGl_Context::SetPolygonHatchStyle (const Handle(Graphic3d_Ha core11fwd->glEnable (GL_POLYGON_STIPPLE); } return anOldType; -#else - return myActiveHatchType; -#endif } // ======================================================================= @@ -2904,35 +2698,36 @@ void OpenGl_Context::SetPolygonOffset (const Graphic3d_PolygonOffset& theOffset) } } -#if !defined(GL_ES_VERSION_2_0) - const bool toLineOld = (myPolygonOffset.Mode & Aspect_POM_Line) == Aspect_POM_Line; - const bool toLineNew = (theOffset.Mode & Aspect_POM_Line) == Aspect_POM_Line; - if (toLineNew != toLineOld) + if (myGapi != Aspect_GraphicsLibrary_OpenGLES) { - if (toLineNew) - { - core11fwd->glEnable (GL_POLYGON_OFFSET_LINE); - } - else + const bool toLineOld = (myPolygonOffset.Mode & Aspect_POM_Line) == Aspect_POM_Line; + const bool toLineNew = (theOffset.Mode & Aspect_POM_Line) == Aspect_POM_Line; + if (toLineNew != toLineOld) { - core11fwd->glDisable (GL_POLYGON_OFFSET_LINE); + if (toLineNew) + { + core11fwd->glEnable (GL_POLYGON_OFFSET_LINE); + } + else + { + core11fwd->glDisable (GL_POLYGON_OFFSET_LINE); + } } - } - const bool toPointOld = (myPolygonOffset.Mode & Aspect_POM_Point) == Aspect_POM_Point; - const bool toPointNew = (theOffset.Mode & Aspect_POM_Point) == Aspect_POM_Point; - if (toPointNew != toPointOld) - { - if (toPointNew) + const bool toPointOld = (myPolygonOffset.Mode & Aspect_POM_Point) == Aspect_POM_Point; + const bool toPointNew = (theOffset.Mode & Aspect_POM_Point) == Aspect_POM_Point; + if (toPointNew != toPointOld) { - core11fwd->glEnable (GL_POLYGON_OFFSET_POINT); - } - else - { - core11fwd->glDisable (GL_POLYGON_OFFSET_POINT); + if (toPointNew) + { + core11fwd->glEnable (GL_POLYGON_OFFSET_POINT); + } + else + { + core11fwd->glDisable (GL_POLYGON_OFFSET_POINT); + } } } -#endif if (myPolygonOffset.Factor != theOffset.Factor || myPolygonOffset.Units != theOffset.Units) @@ -3035,7 +2830,6 @@ void OpenGl_Context::DisableFeatures() const core11fwd->glDisable(GL_DEPTH_TEST); core11fwd->glDisable(GL_STENCIL_TEST); -#if !defined(GL_ES_VERSION_2_0) if (core11ffp == NULL) { return; @@ -3049,37 +2843,43 @@ void OpenGl_Context::DisableFeatures() const core11fwd->glDisable(GL_FOG); core11fwd->glDisable(GL_LOGIC_OP); - glPixelTransferi(GL_MAP_COLOR, GL_FALSE); - glPixelTransferi(GL_RED_SCALE, 1); - glPixelTransferi(GL_RED_BIAS, 0); - glPixelTransferi(GL_GREEN_SCALE, 1); - glPixelTransferi(GL_GREEN_BIAS, 0); - glPixelTransferi(GL_BLUE_SCALE, 1); - glPixelTransferi(GL_BLUE_BIAS, 0); - glPixelTransferi(GL_ALPHA_SCALE, 1); - glPixelTransferi(GL_ALPHA_BIAS, 0); + core11ffp->glPixelTransferi (GL_MAP_COLOR, GL_FALSE); + core11ffp->glPixelTransferi (GL_RED_SCALE, 1); + core11ffp->glPixelTransferi (GL_RED_BIAS, 0); + core11ffp->glPixelTransferi (GL_GREEN_SCALE, 1); + core11ffp->glPixelTransferi (GL_GREEN_BIAS, 0); + core11ffp->glPixelTransferi (GL_BLUE_SCALE, 1); + core11ffp->glPixelTransferi (GL_BLUE_BIAS, 0); + core11ffp->glPixelTransferi (GL_ALPHA_SCALE, 1); + core11ffp->glPixelTransferi (GL_ALPHA_BIAS, 0); - if ((myGlVerMajor >= 1) && (myGlVerMinor >= 2)) + if (IsGlGreaterEqual (1, 2)) { if (CheckExtension ("GL_CONVOLUTION_1D_EXT")) + { core11fwd->glDisable(GL_CONVOLUTION_1D_EXT); - + } if (CheckExtension ("GL_CONVOLUTION_2D_EXT")) + { core11fwd->glDisable(GL_CONVOLUTION_2D_EXT); - + } if (CheckExtension ("GL_SEPARABLE_2D_EXT")) + { core11fwd->glDisable(GL_SEPARABLE_2D_EXT); - + } if (CheckExtension ("GL_SEPARABLE_2D_EXT")) + { core11fwd->glDisable(GL_HISTOGRAM_EXT); - + } if (CheckExtension ("GL_MINMAX_EXT")) + { core11fwd->glDisable(GL_MINMAX_EXT); - + } if (CheckExtension ("GL_TEXTURE_3D_EXT")) + { core11fwd->glDisable(GL_TEXTURE_3D_EXT); + } } -#endif } // ======================================================================= @@ -3154,7 +2954,7 @@ bool OpenGl_Context::GetBufferSubData (unsigned int theTarget, intptr_t theOffse Module.ctx.getBufferSubData($0, $1, HEAPU8.subarray($2, $2 + $3)); }, theTarget, theOffset, theData, theSize); return true; -#elif defined(GL_ES_VERSION_2_0) +#elif defined(OCC_USE_GLES2) if (void* aData = core30->glMapBufferRange (theTarget, theOffset, theSize, GL_MAP_READ_BIT)) { memcpy (theData, aData, theSize); @@ -3239,12 +3039,11 @@ void OpenGl_Context::DumpJson (Standard_OStream& theOStream, Standard_Integer th // ======================================================================= void OpenGl_Context::DumpJsonOpenGlState (Standard_OStream& theOStream, Standard_Integer) { - GLboolean isEnableBlend = glIsEnabled (GL_BLEND); - GLboolean isEnableCullFace = glIsEnabled (GL_CULL_FACE); - GLboolean isEnableDepthTest = glIsEnabled (GL_DEPTH_TEST); + GLboolean isEnableBlend = core11fwd->glIsEnabled (GL_BLEND); + GLboolean isEnableCullFace = core11fwd->glIsEnabled (GL_CULL_FACE); + GLboolean isEnableDepthTest = core11fwd->glIsEnabled (GL_DEPTH_TEST); OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, isEnableBlend) OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, isEnableCullFace) OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, isEnableDepthTest) } - diff --git a/src/OpenGl/OpenGl_Context.hxx b/src/OpenGl/OpenGl_Context.hxx index ed3418d3d5..92e456c8e3 100644 --- a/src/OpenGl/OpenGl_Context.hxx +++ b/src/OpenGl/OpenGl_Context.hxx @@ -981,7 +981,7 @@ public: //! @name methods to alter or retrieve current state Standard_EXPORT void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const; //! Dumps the content of openGL state into the stream - Standard_EXPORT static void DumpJsonOpenGlState (Standard_OStream& theOStream, Standard_Integer theDepth = -1); + Standard_EXPORT void DumpJsonOpenGlState (Standard_OStream& theOStream, Standard_Integer theDepth = -1); //! Set GL_SHADE_MODEL value. Standard_EXPORT void SetShadeModel (Graphic3d_TypeOfShadingModel theModel); diff --git a/src/OpenGl/OpenGl_Font.cxx b/src/OpenGl/OpenGl_Font.cxx index a5e66273da..384c4754a6 100755 --- a/src/OpenGl/OpenGl_Font.cxx +++ b/src/OpenGl/OpenGl_Font.cxx @@ -203,9 +203,10 @@ bool OpenGl_Font::renderGlyph (const Handle(OpenGl_Context)& theCtx, } aTexture->Bind (theCtx); -#if !defined(GL_ES_VERSION_2_0) - theCtx->core11fwd->glPixelStorei (GL_UNPACK_LSB_FIRST, GL_FALSE); -#endif + if (theCtx->GraphicsLibrary() != Aspect_GraphicsLibrary_OpenGLES) + { + theCtx->core11fwd->glPixelStorei (GL_UNPACK_LSB_FIRST, GL_FALSE); + } if (theCtx->hasUnpackRowLength) { theCtx->core11fwd->glPixelStorei (GL_UNPACK_ROW_LENGTH, 0); diff --git a/src/OpenGl/OpenGl_FrameBuffer.cxx b/src/OpenGl/OpenGl_FrameBuffer.cxx index 6ee169946a..f7a4d95a7d 100644 --- a/src/OpenGl/OpenGl_FrameBuffer.cxx +++ b/src/OpenGl/OpenGl_FrameBuffer.cxx @@ -50,15 +50,14 @@ namespace // while WebGL 1.0 + GL_WEBGL_depth_texture needs GL_DEPTH_STENCIL_ATTACHMENT // and NOT separate GL_DEPTH_ATTACHMENT+GL_STENCIL_ATTACHMENT calls which is different to OpenGL ES 2.0 + extension return theCtx->IsGlGreaterEqual (3, 0) || theCtx->extPDS; - #elif defined(GL_ES_VERSION_2_0) + #else // supported since OpenGL ES 3.0, // while OpenGL ES 2.0 + GL_EXT_packed_depth_stencil needs separate GL_DEPTH_ATTACHMENT+GL_STENCIL_ATTACHMENT calls - return theCtx->IsGlGreaterEqual (3, 0); - #else + // // available on desktop since OpenGL 3.0 // or OpenGL 2.0 + GL_ARB_framebuffer_object (GL_EXT_framebuffer_object is unsupported by OCCT) - (void )theCtx; - return true; + return theCtx->GraphicsLibrary() != Aspect_GraphicsLibrary_OpenGLES + || theCtx->IsGlGreaterEqual (3, 0); #endif } } @@ -968,60 +967,104 @@ Standard_Boolean OpenGl_FrameBuffer::BufferDump (const Handle(OpenGl_Context)& t bool toConvRgba2Rgb = false; switch (theImage.Format()) { - #if !defined(GL_ES_VERSION_2_0) case Image_Format_Gray: + { + if (theGlCtx->GraphicsLibrary() == Aspect_GraphicsLibrary_OpenGLES) + { + return false; + } + aFormat = theBufferType == Graphic3d_BT_Depth ? GL_DEPTH_COMPONENT : GL_RED; aType = GL_UNSIGNED_BYTE; break; + } case Image_Format_GrayF: + { + if (theGlCtx->GraphicsLibrary() == Aspect_GraphicsLibrary_OpenGLES) + { + return false; + } + aFormat = theBufferType == Graphic3d_BT_Depth ? GL_DEPTH_COMPONENT : GL_RED; aType = GL_FLOAT; break; + } case Image_Format_RGF: + { + if (theGlCtx->GraphicsLibrary() == Aspect_GraphicsLibrary_OpenGLES) + { + return false; + } + aFormat = GL_RG; aType = GL_FLOAT; break; + } case Image_Format_RGB: - aFormat = GL_RGB; - aType = GL_UNSIGNED_BYTE; + { + if (theGlCtx->GraphicsLibrary() == Aspect_GraphicsLibrary_OpenGLES) + { + aFormat = GL_RGBA; + toConvRgba2Rgb = true; + } + else + { + aFormat = GL_RGB; + } + aType = GL_UNSIGNED_BYTE; break; + } case Image_Format_BGR: - aFormat = GL_BGR; - aType = GL_UNSIGNED_BYTE; + { + if (theGlCtx->GraphicsLibrary() == Aspect_GraphicsLibrary_OpenGLES) + { + aFormat = GL_RGBA; + toConvRgba2Rgb = true; + } + else + { + aFormat = GL_BGR; + } + aType = GL_UNSIGNED_BYTE; break; + } case Image_Format_BGRA: case Image_Format_BGR32: - aFormat = GL_BGRA; - aType = GL_UNSIGNED_BYTE; + { + if (theGlCtx->GraphicsLibrary() == Aspect_GraphicsLibrary_OpenGLES) + { + aFormat = GL_RGBA; + toSwapRgbaBgra = true; + } + else + { + aFormat = GL_BGRA; + } + aType = GL_UNSIGNED_BYTE; break; + } case Image_Format_BGRF: + { + if (theGlCtx->GraphicsLibrary() == Aspect_GraphicsLibrary_OpenGLES) + { + return false; + } + aFormat = GL_BGR; aType = GL_FLOAT; break; + } case Image_Format_BGRAF: + { + if (theGlCtx->GraphicsLibrary() == Aspect_GraphicsLibrary_OpenGLES) + { + return false; + } + aFormat = GL_BGRA; aType = GL_FLOAT; break; - #else - case Image_Format_Gray: - case Image_Format_GrayF: - case Image_Format_BGRF: - case Image_Format_BGRAF: - case Image_Format_RGF: - return Standard_False; - case Image_Format_BGRA: - case Image_Format_BGR32: - aFormat = GL_RGBA; - aType = GL_UNSIGNED_BYTE; - toSwapRgbaBgra = true; - break; - case Image_Format_BGR: - case Image_Format_RGB: - aFormat = GL_RGBA; - aType = GL_UNSIGNED_BYTE; - toConvRgba2Rgb = true; - break; - #endif + } case Image_Format_RGBA: case Image_Format_RGB32: aFormat = GL_RGBA; @@ -1052,30 +1095,25 @@ Standard_Boolean OpenGl_FrameBuffer::BufferDump (const Handle(OpenGl_Context)& t return Standard_False; } -#if !defined(GL_ES_VERSION_2_0) GLint aReadBufferPrev = GL_BACK; - if (theBufferType == Graphic3d_BT_Depth + if (theGlCtx->GraphicsLibrary() != Aspect_GraphicsLibrary_OpenGLES + && theBufferType == Graphic3d_BT_Depth && aFormat != GL_DEPTH_COMPONENT) { return Standard_False; } -#else - (void )theBufferType; -#endif // bind FBO if used if (!theFbo.IsNull() && theFbo->IsValid()) { theFbo->BindBuffer (theGlCtx); } - else + else if (theGlCtx->GraphicsLibrary() != Aspect_GraphicsLibrary_OpenGLES) { - #if !defined(GL_ES_VERSION_2_0) theGlCtx->core11fwd->glGetIntegerv (GL_READ_BUFFER, &aReadBufferPrev); GLint aDrawBufferPrev = GL_BACK; theGlCtx->core11fwd->glGetIntegerv (GL_DRAW_BUFFER, &aDrawBufferPrev); - glReadBuffer (aDrawBufferPrev); - #endif + theGlCtx->core11fwd->glReadBuffer (aDrawBufferPrev); } // setup alignment @@ -1155,11 +1193,9 @@ Standard_Boolean OpenGl_FrameBuffer::BufferDump (const Handle(OpenGl_Context)& t { theFbo->UnbindBuffer (theGlCtx); } - else + else if (theGlCtx->GraphicsLibrary() != Aspect_GraphicsLibrary_OpenGLES) { - #if !defined(GL_ES_VERSION_2_0) - glReadBuffer (aReadBufferPrev); - #endif + theGlCtx->core11fwd->glReadBuffer (aReadBufferPrev); } if (toSwapRgbaBgra) diff --git a/src/OpenGl/OpenGl_FrameStatsPrs.cxx b/src/OpenGl/OpenGl_FrameStatsPrs.cxx index d6891588ef..b57e6ed613 100644 --- a/src/OpenGl/OpenGl_FrameStatsPrs.cxx +++ b/src/OpenGl/OpenGl_FrameStatsPrs.cxx @@ -378,7 +378,7 @@ void OpenGl_FrameStatsPrs::Render (const Handle(OpenGl_Workspace)& theWorkspace) if (theWorkspace->UseDepthWrite()) { theWorkspace->UseDepthWrite() = Standard_False; - glDepthMask (GL_FALSE); + aCtx->core11fwd->glDepthMask (GL_FALSE); } const OpenGl_Aspects* aTextAspectBack = theWorkspace->SetAspects (&myTextAspect); @@ -417,8 +417,8 @@ void OpenGl_FrameStatsPrs::Render (const Handle(OpenGl_Workspace)& theWorkspace) Graphic3d_AlphaMode_Blend, true, false, Handle(OpenGl_ShaderProgram)()); aCtx->SetColor4fv (OpenGl_Vec4 (1.0f, 1.0f, 1.0f, 1.0f)); - glEnable (GL_BLEND); - glBlendFunc (GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); + aCtx->core15fwd->glEnable (GL_BLEND); + aCtx->core15fwd->glBlendFunc (GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); myChartVertices->Bind (aCtx); myChartVertices->bindAttribute (aCtx, Graphic3d_TOA_POS, 3, GL_FLOAT, myChartVertices->GetComponentsNb(), NULL); myChartVertices->bindAttribute (aCtx, Graphic3d_TOA_COLOR, 4, GL_UNSIGNED_BYTE, myChartVertices->GetComponentsNb(), (void* )sizeof(Graphic3d_Vec3)); @@ -429,7 +429,7 @@ void OpenGl_FrameStatsPrs::Render (const Handle(OpenGl_Workspace)& theWorkspace) myChartVertices->Unbind (aCtx); myChartVertices->unbindAttribute (aCtx, Graphic3d_TOA_COLOR); myChartVertices->unbindAttribute (aCtx, Graphic3d_TOA_POS); - glDisable (GL_BLEND); + aCtx->core15fwd->glDisable (GL_BLEND); myChartLines->Bind (aCtx); myChartLines->bindAttribute (aCtx, Graphic3d_TOA_POS, 3, GL_FLOAT, myChartLines->GetComponentsNb(), NULL); @@ -453,7 +453,7 @@ void OpenGl_FrameStatsPrs::Render (const Handle(OpenGl_Workspace)& theWorkspace) if (theWorkspace->UseDepthWrite() != wasEnabledDepth) { theWorkspace->UseDepthWrite() = wasEnabledDepth; - glDepthMask (wasEnabledDepth ? GL_TRUE : GL_FALSE); + aCtx->core11fwd->glDepthMask (wasEnabledDepth ? GL_TRUE : GL_FALSE); } } diff --git a/src/OpenGl/OpenGl_GlCore11.hxx b/src/OpenGl/OpenGl_GlCore11.hxx index e1495f1cd7..b8858494a5 100644 --- a/src/OpenGl/OpenGl_GlCore11.hxx +++ b/src/OpenGl/OpenGl_GlCore11.hxx @@ -18,6 +18,171 @@ #include +#ifndef GL_COMPILE +#define GL_COMPILE 0x1300 +#define GL_COMPILE_AND_EXECUTE 0x1301 + +#define GL_RENDER_MODE 0x0C40 +#define GL_RENDER 0x1C00 +#define GL_FEEDBACK 0x1C01 +#define GL_SELECT 0x1C02 + +#define GL_SHADE_MODEL 0x0B54 +#define GL_FLAT 0x1D00 +#define GL_SMOOTH 0x1D01 +#define GL_POINT 0x1B00 +#define GL_LINE 0x1B01 +#define GL_FILL 0x1B02 + +#define GL_LINE_STIPPLE 0x0B24 +#define GL_LINE_STIPPLE_PATTERN 0x0B25 +#define GL_LINE_STIPPLE_REPEAT 0x0B26 + +#define GL_POLYGON_MODE 0x0B40 +#define GL_POLYGON_SMOOTH 0x0B41 +#define GL_POLYGON_STIPPLE 0x0B42 + +#define GL_MATRIX_MODE 0x0BA0 +#define GL_NORMALIZE 0x0BA1 + +#define GL_TEXTURE_1D 0x0DE0 + +#define GL_MAX_CLIP_PLANES 0x0D32 +#define GL_CLIP_PLANE0 0x3000 +#define GL_CLIP_PLANE1 0x3001 +#define GL_CLIP_PLANE2 0x3002 +#define GL_CLIP_PLANE3 0x3003 +#define GL_CLIP_PLANE4 0x3004 +#define GL_CLIP_PLANE5 0x3005 + +#define GL_QUADS 0x0007 +#define GL_QUAD_STRIP 0x0008 +#define GL_POLYGON 0x0009 + +#define GL_LIGHTING 0x0B50 +#define GL_LIGHT_MODEL_LOCAL_VIEWER 0x0B51 +#define GL_LIGHT_MODEL_TWO_SIDE 0x0B52 +#define GL_LIGHT_MODEL_AMBIENT 0x0B53 +#define GL_COLOR_MATERIAL 0x0B57 +#define GL_LIGHT0 0x4000 +#define GL_LIGHT1 0x4001 +#define GL_LIGHT2 0x4002 +#define GL_LIGHT3 0x4003 +#define GL_LIGHT4 0x4004 +#define GL_LIGHT5 0x4005 +#define GL_LIGHT6 0x4006 +#define GL_LIGHT7 0x4007 + +// LightParameter +#define GL_AMBIENT 0x1200 +#define GL_DIFFUSE 0x1201 +#define GL_SPECULAR 0x1202 +#define GL_POSITION 0x1203 +#define GL_SPOT_DIRECTION 0x1204 +#define GL_SPOT_EXPONENT 0x1205 +#define GL_SPOT_CUTOFF 0x1206 +#define GL_CONSTANT_ATTENUATION 0x1207 +#define GL_LINEAR_ATTENUATION 0x1208 +#define GL_QUADRATIC_ATTENUATION 0x1209 + +#define GL_EMISSION 0x1600 +#define GL_SHININESS 0x1601 +#define GL_AMBIENT_AND_DIFFUSE 0x1602 +#define GL_COLOR_INDEXES 0x1603 + +// MatrixMode +#define GL_MODELVIEW 0x1700 +#define GL_PROJECTION 0x1701 +#define GL_TEXTURE 0x1702 + +#define GL_POINT_SMOOTH_HINT 0x0C51 +#define GL_LINE_SMOOTH_HINT 0x0C52 +#define GL_POLYGON_SMOOTH_HINT 0x0C53 +#define GL_FOG_HINT 0x0C54 +#define GL_FOG 0x0B60 + +#define GL_LOGIC_OP_MODE 0x0BF0 +#define GL_INDEX_LOGIC_OP 0x0BF1 +#define GL_LOGIC_OP GL_INDEX_LOGIC_OP +#define GL_COLOR_LOGIC_OP 0x0BF2 +#define GL_CLEAR 0x1500 +#define GL_AND 0x1501 +#define GL_AND_REVERSE 0x1502 +#define GL_COPY 0x1503 +#define GL_AND_INVERTED 0x1504 +#define GL_NOOP 0x1505 +#define GL_XOR 0x1506 +#define GL_OR 0x1507 +#define GL_NOR 0x1508 +#define GL_EQUIV 0x1509 +#define GL_INVERT 0x150A +#define GL_OR_REVERSE 0x150B +#define GL_COPY_INVERTED 0x150C +#define GL_OR_INVERTED 0x150D +#define GL_NAND 0x150E +#define GL_SET 0x150F + +#define GL_VERTEX_ARRAY 0x8074 +#define GL_NORMAL_ARRAY 0x8075 +#define GL_COLOR_ARRAY 0x8076 +#define GL_INDEX_ARRAY 0x8077 +#define GL_TEXTURE_COORD_ARRAY 0x8078 + +#define GL_PROXY_TEXTURE_1D 0x8063 + +#define GL_ALPHA_TEST 0x0BC0 +#define GL_ALPHA_TEST_FUNC 0x0BC1 +#define GL_ALPHA_TEST_REF 0x0BC2 + +// TextureCoordName +#define GL_S 0x2000 +#define GL_T 0x2001 +#define GL_R 0x2002 +#define GL_Q 0x2003 + +// TextureEnvMode +#define GL_MODULATE 0x2100 +#define GL_DECAL 0x2101 + +// TextureEnvParameter +#define GL_TEXTURE_ENV_MODE 0x2200 +#define GL_TEXTURE_ENV_COLOR 0x2201 + +// TextureEnvTarget +#define GL_TEXTURE_ENV 0x2300 + +// TextureGenMode +#define GL_EYE_LINEAR 0x2400 +#define GL_OBJECT_LINEAR 0x2401 +#define GL_SPHERE_MAP 0x2402 + +// TextureGenParameter +#define GL_TEXTURE_GEN_MODE 0x2500 +#define GL_OBJECT_PLANE 0x2501 +#define GL_EYE_PLANE 0x2502 + +#define GL_TEXTURE_GEN_S 0x0C60 +#define GL_TEXTURE_GEN_T 0x0C61 +#define GL_TEXTURE_GEN_R 0x0C62 +#define GL_TEXTURE_GEN_Q 0x0C63 + +#define GL_MAP_COLOR 0x0D10 +#define GL_MAP_STENCIL 0x0D11 +#define GL_RED_SCALE 0x0D14 +#define GL_RED_BIAS 0x0D15 +#define GL_GREEN_SCALE 0x0D18 +#define GL_GREEN_BIAS 0x0D19 +#define GL_BLUE_SCALE 0x0D1A +#define GL_BLUE_BIAS 0x0D1B +#define GL_ALPHA_SCALE 0x0D1C +#define GL_ALPHA_BIAS 0x0D1D +#define GL_DEPTH_SCALE 0x0D1E +#define GL_DEPTH_BIAS 0x0D1F + +#define GL_STACK_OVERFLOW 0x0503 +#define GL_STACK_UNDERFLOW 0x0504 +#endif + //! OpenGL 1.1 core. //! Notice that all functions within this structure are actually exported by system GL library. //! The main purpose for these hint - to control visibility of functions per GL version @@ -25,272 +190,77 @@ struct OpenGl_GlCore11 : protected OpenGl_GlFunctions { -#if !defined(GL_ES_VERSION_2_0) public: - inline void glTexEnvi (GLenum target, GLenum pname, GLint param) - { - ::glTexEnvi (target, pname, param); - OpenGl_TRACE(glTexEnvi) - } - - inline void glGetTexEnviv (GLenum target, GLenum pname, GLint *params) - { - ::glGetTexEnviv (target, pname, params); - OpenGl_TRACE(glGetTexEnviv) - } - - inline void glLogicOp (GLenum opcode) - { - ::glLogicOp (opcode); - OpenGl_TRACE(glLogicOp) - } + using OpenGl_GlFunctions::glTexEnvi; + using OpenGl_GlFunctions::glGetTexEnviv; public: //! @name Begin/End primitive specification (removed since 3.1) - inline void glColor4fv (const GLfloat* theVec) - { - ::glColor4fv (theVec); - OpenGl_TRACE(glColor4fv) - } + using OpenGl_GlFunctions::glColor4fv; public: //! @name Matrix operations (removed since 3.1) - inline void glMatrixMode (GLenum theMode) - { - ::glMatrixMode (theMode); - OpenGl_TRACE(glMatrixMode) - } - - inline void glLoadIdentity() - { - ::glLoadIdentity(); - OpenGl_TRACE(glLoadIdentity) - } - - inline void glLoadMatrixf (const GLfloat* theMatrix) - { - ::glLoadMatrixf (theMatrix); - OpenGl_TRACE(glLoadMatrixf) - } + using OpenGl_GlFunctions::glMatrixMode; + using OpenGl_GlFunctions::glLoadIdentity; + using OpenGl_GlFunctions::glLoadMatrixf; public: //! @name Line and Polygon stipple (removed since 3.1) - inline void glLineStipple (GLint theFactor, GLushort thePattern) - { - ::glLineStipple (theFactor, thePattern); - OpenGl_TRACE(glLineStipple) - } - - inline void glPolygonStipple (const GLubyte* theMask) - { - ::glPolygonStipple (theMask); - OpenGl_TRACE(glPolygonStipple) - } + using OpenGl_GlFunctions::glLineStipple; + using OpenGl_GlFunctions::glPolygonStipple; public: //! @name Fixed pipeline lighting (removed since 3.1) - inline void glShadeModel (GLenum theMode) - { - ::glShadeModel (theMode); - OpenGl_TRACE(glShadeModel) - } - - inline void glLightf (GLenum theLight, GLenum pname, GLfloat param) - { - ::glLightf (theLight, pname, param); - OpenGl_TRACE(glLightf) - } - - inline void glLightfv (GLenum theLight, GLenum pname, const GLfloat* params) - { - ::glLightfv (theLight, pname, params); - OpenGl_TRACE(glLightfv) - } - - inline void glLightModeli (GLenum pname, GLint param) - { - ::glLightModeli(pname, param); - OpenGl_TRACE(glLightModeli) - } - - inline void glLightModelfv (GLenum pname, const GLfloat* params) - { - ::glLightModelfv(pname, params); - OpenGl_TRACE(glLightModelfv) - } - - inline void glMaterialf (GLenum face, GLenum pname, GLfloat param) - { - ::glMaterialf(face, pname, param); - OpenGl_TRACE(glMaterialf) - } - - inline void glMaterialfv (GLenum face, GLenum pname, const GLfloat* params) - { - ::glMaterialfv(face, pname, params); - OpenGl_TRACE(glMaterialfv) - } - - inline void glColorMaterial (GLenum face, GLenum mode) - { - ::glColorMaterial(face, mode); - OpenGl_TRACE(glColorMaterial) - } + using OpenGl_GlFunctions::glShadeModel; + using OpenGl_GlFunctions::glLightf; + using OpenGl_GlFunctions::glLightfv; + using OpenGl_GlFunctions::glLightModeli; + using OpenGl_GlFunctions::glLightModelfv; + using OpenGl_GlFunctions::glMaterialf; + using OpenGl_GlFunctions::glMaterialfv; + using OpenGl_GlFunctions::glColorMaterial; public: //! @name clipping plane (removed since 3.1) - inline void glClipPlane (GLenum thePlane, const GLdouble* theEquation) - { - ::glClipPlane (thePlane, theEquation); - OpenGl_TRACE(glClipPlane) - } + using OpenGl_GlFunctions::glClipPlane; public: //! @name Display lists (removed since 3.1) - inline void glDeleteLists (GLuint theList, GLsizei theRange) - { - ::glDeleteLists (theList, theRange); - OpenGl_TRACE(glDeleteLists) - } - - inline GLuint glGenLists (GLsizei theRange) - { - const GLuint aRes = ::glGenLists (theRange); - OpenGl_TRACE(glGenLists) - return aRes; - } - - inline void glNewList (GLuint theList, GLenum theMode) - { - ::glNewList (theList, theMode); - OpenGl_TRACE(glNewList) - } - - inline void glEndList() - { - ::glEndList(); - OpenGl_TRACE(glEndList) - } - - inline void glCallList (GLuint theList) - { - ::glCallList (theList); - OpenGl_TRACE(glCallList) - } - - inline void glCallLists (GLsizei theNb, GLenum theType, const GLvoid* theLists) - { - ::glCallLists (theNb, theType, theLists); - OpenGl_TRACE(glCallLists) - } - - inline void glListBase (GLuint theBase) - { - ::glListBase (theBase); - OpenGl_TRACE(glListBase) - } + using OpenGl_GlFunctions::glDeleteLists; + using OpenGl_GlFunctions::glGenLists; + using OpenGl_GlFunctions::glNewList; + using OpenGl_GlFunctions::glEndList; + using OpenGl_GlFunctions::glCallList; + using OpenGl_GlFunctions::glCallLists; + using OpenGl_GlFunctions::glListBase; public: //! @name Current raster position and Rectangles (removed since 3.1) - inline void glRasterPos2i (GLint x, GLint y) - { - ::glRasterPos2i (x, y); - OpenGl_TRACE(glRasterPos2i) - } - - inline void glRasterPos3fv (const GLfloat* theVec) - { - ::glRasterPos3fv (theVec); - OpenGl_TRACE(glRasterPos3fv) - } + using OpenGl_GlFunctions::glRasterPos2i; + using OpenGl_GlFunctions::glRasterPos3fv; public: //! @name Texture mapping (removed since 3.1) - inline void glTexGeni (GLenum coord, GLenum pname, GLint param) - { - ::glTexGeni (coord, pname, param); - OpenGl_TRACE(glTexGeni) - } - - inline void glTexGenfv (GLenum coord, GLenum pname, const GLfloat* params) - { - ::glTexGenfv (coord, pname, params); - OpenGl_TRACE(glTexGenfv) - } + using OpenGl_GlFunctions::glTexGeni; + using OpenGl_GlFunctions::glTexGenfv; public: //! @name Pixel copying (removed since 3.1) - inline void glDrawPixels (GLsizei width, GLsizei height, - GLenum format, GLenum type, - const GLvoid* pixels) - { - ::glDrawPixels (width, height, format, type, pixels); - OpenGl_TRACE(glDrawPixels) - } - - inline void glCopyPixels (GLint x, GLint y, - GLsizei width, GLsizei height, - GLenum type) - { - ::glCopyPixels (x, y, width, height, type); - OpenGl_TRACE(glCopyPixels) - } - - inline void glBitmap (GLsizei width, GLsizei height, - GLfloat xorig, GLfloat yorig, - GLfloat xmove, GLfloat ymove, - const GLubyte* bitmap) - { - ::glBitmap (width, height, xorig, yorig, xmove, ymove, bitmap); - OpenGl_TRACE(glBitmap) - } + using OpenGl_GlFunctions::glDrawPixels; + using OpenGl_GlFunctions::glCopyPixels; + using OpenGl_GlFunctions::glBitmap; public: //! @name Edge flags and fixed-function vertex processing (removed since 3.1) - inline void glIndexPointer (GLenum theType, GLsizei theStride, const GLvoid* thePtr) - { - ::glIndexPointer (theType, theStride, thePtr); - OpenGl_TRACE(glIndexPointer) - } - - inline void glVertexPointer (GLint theSize, GLenum theType, GLsizei theStride, const GLvoid* thePtr) - { - ::glVertexPointer (theSize, theType, theStride, thePtr); - OpenGl_TRACE(glVertexPointer) - } - - inline void glNormalPointer (GLenum theType, GLsizei theStride, const GLvoid* thePtr) - { - ::glNormalPointer (theType, theStride, thePtr); - OpenGl_TRACE(glNormalPointer) - } - - inline void glColorPointer (GLint theSize, GLenum theType, GLsizei theStride, const GLvoid* thePtr) - { - ::glColorPointer (theSize, theType, theStride, thePtr); - OpenGl_TRACE(glColorPointer) - } - - inline void glTexCoordPointer (GLint theSize, GLenum theType, GLsizei theStride, const GLvoid* thePtr) - { - ::glTexCoordPointer (theSize, theType, theStride, thePtr); - OpenGl_TRACE(glTexCoordPointer) - } - - inline void glEnableClientState (GLenum theCap) - { - ::glEnableClientState (theCap); - OpenGl_TRACE(glEnableClientState) - } - - inline void glDisableClientState (GLenum theCap) - { - ::glDisableClientState (theCap); - OpenGl_TRACE(glDisableClientState) - } - -#endif + using OpenGl_GlFunctions::glIndexPointer; + using OpenGl_GlFunctions::glVertexPointer; + using OpenGl_GlFunctions::glNormalPointer; + using OpenGl_GlFunctions::glColorPointer; + using OpenGl_GlFunctions::glTexCoordPointer; + using OpenGl_GlFunctions::glEnableClientState; + using OpenGl_GlFunctions::glDisableClientState; + using OpenGl_GlFunctions::glPixelTransferi; }; diff --git a/src/OpenGl/OpenGl_GlCore11Fwd.hxx b/src/OpenGl/OpenGl_GlCore11Fwd.hxx index 07fef6806c..4ac2be42a2 100644 --- a/src/OpenGl/OpenGl_GlCore11Fwd.hxx +++ b/src/OpenGl/OpenGl_GlCore11Fwd.hxx @@ -27,542 +27,96 @@ struct OpenGl_GlCore11Fwd : protected OpenGl_GlFunctions public: //! @name Miscellaneous - inline void glClearColor (GLclampf theRed, GLclampf theGreen, GLclampf theBlue, GLclampf theAlpha) - { - ::glClearColor (theRed, theGreen, theBlue, theAlpha); - OpenGl_TRACE(glClearColor) - } - - inline void glClear (GLbitfield theMask) - { - ::glClear (theMask); - OpenGl_TRACE(glClear) - } - - inline void glColorMask (GLboolean theRed, GLboolean theGreen, GLboolean theBlue, GLboolean theAlpha) - { - ::glColorMask (theRed, theGreen, theBlue, theAlpha); - OpenGl_TRACE(glColorMask) - } - - inline void glBlendFunc (GLenum sfactor, GLenum dfactor) - { - ::glBlendFunc(sfactor, dfactor); - OpenGl_TRACE(glBlendFunc) - } - - inline void glCullFace (GLenum theMode) - { - ::glCullFace (theMode); - OpenGl_TRACE(glCullFace) - } - - inline void glFrontFace (GLenum theMode) - { - ::glFrontFace (theMode); - OpenGl_TRACE(glFrontFace) - } - - inline void glLineWidth (GLfloat theWidth) - { - ::glLineWidth (theWidth); - OpenGl_TRACE(glLineWidth) - } - - inline void glPolygonOffset (GLfloat theFactor, GLfloat theUnits) - { - ::glPolygonOffset (theFactor, theUnits); - OpenGl_TRACE(glPolygonOffset) - } - - inline void glScissor (GLint theX, GLint theY, GLsizei theWidth, GLsizei theHeight) - { - ::glScissor (theX, theY, theWidth, theHeight); - OpenGl_TRACE(glScissor) - } - - inline void glEnable (GLenum theCap) - { - ::glEnable (theCap); - OpenGl_TRACE(glEnable) - } - - inline void glDisable (GLenum theCap) - { - ::glDisable (theCap); - OpenGl_TRACE(glDisable) - } - - inline GLboolean glIsEnabled (GLenum theCap) - { - return ::glIsEnabled (theCap); - } - - inline void glGetBooleanv (GLenum theParamName, GLboolean* theValues) - { - ::glGetBooleanv (theParamName, theValues); - OpenGl_TRACE(glGetBooleanv) - } - - inline void glGetFloatv (GLenum theParamName, GLfloat* theValues) - { - ::glGetFloatv (theParamName, theValues); - OpenGl_TRACE(glGetFloatv) - } - - inline void glGetIntegerv (GLenum theParamName, GLint* theValues) - { - ::glGetIntegerv (theParamName, theValues); - OpenGl_TRACE(glGetIntegerv) - } - - inline GLenum glGetError() - { - return ::glGetError(); - } - - inline const GLubyte* glGetString (GLenum theName) - { - const GLubyte* aRes = ::glGetString (theName); - OpenGl_TRACE(glGetString) - return aRes; - } - - inline void glFinish() - { - ::glFinish(); - OpenGl_TRACE(glFinish) - } - - inline void glFlush() - { - ::glFlush(); - OpenGl_TRACE(glFlush) - } - - inline void glHint (GLenum theTarget, GLenum theMode) - { - ::glHint (theTarget, theMode); - OpenGl_TRACE(glHint) - } + using OpenGl_GlFunctions::glClearColor; + using OpenGl_GlFunctions::glClear; + using OpenGl_GlFunctions::glColorMask; + using OpenGl_GlFunctions::glBlendFunc; + using OpenGl_GlFunctions::glCullFace; + using OpenGl_GlFunctions::glFrontFace; + using OpenGl_GlFunctions::glLineWidth; + using OpenGl_GlFunctions::glPolygonOffset; + using OpenGl_GlFunctions::glScissor; + using OpenGl_GlFunctions::glEnable; + using OpenGl_GlFunctions::glDisable; + using OpenGl_GlFunctions::glIsEnabled; + using OpenGl_GlFunctions::glGetBooleanv; + using OpenGl_GlFunctions::glGetFloatv; + using OpenGl_GlFunctions::glGetIntegerv; + using OpenGl_GlFunctions::glGetError; + using OpenGl_GlFunctions::glGetString; + using OpenGl_GlFunctions::glFinish; + using OpenGl_GlFunctions::glFlush; + using OpenGl_GlFunctions::glHint; public: //! @name Depth Buffer - inline void glClearDepth (GLclampd theDepth) - { - #if defined(GL_ES_VERSION_2_0) - ::glClearDepthf ((GLfloat )theDepth); - #else - ::glClearDepth (theDepth); - #endif - OpenGl_TRACE(glClearDepth) - } - - inline void glClearDepthf (GLfloat theDepth) - { - #if defined(GL_ES_VERSION_2_0) - ::glClearDepthf (theDepth); - #else - ::glClearDepth ((GLclampd )theDepth); - #endif - OpenGl_TRACE(glClearDepthf) - } - - inline void glDepthFunc (GLenum theFunc) - { - ::glDepthFunc (theFunc); - OpenGl_TRACE(glDepthFunc) - } - - inline void glDepthMask (GLboolean theFlag) - { - ::glDepthMask (theFlag); - OpenGl_TRACE(glDepthMask) - } - - inline void glDepthRange (GLclampd theNearValue, - GLclampd theFarValue) - { - #if defined(GL_ES_VERSION_2_0) - ::glDepthRangef ((GLfloat )theNearValue, (GLfloat )theFarValue); - #else - ::glDepthRange (theNearValue, theFarValue); - #endif - OpenGl_TRACE(glDepthRange) - } - - inline void glDepthRangef (GLfloat theNearValue, - GLfloat theFarValue) - { - #if defined(GL_ES_VERSION_2_0) - ::glDepthRangef (theNearValue, theFarValue); - #else - ::glDepthRange ((GLclampd )theNearValue, (GLclampd )theFarValue); - #endif - OpenGl_TRACE(glDepthRangef) - } + using OpenGl_GlFunctions::glClearDepth; + using OpenGl_GlFunctions::glClearDepthf; + using OpenGl_GlFunctions::glDepthFunc; + using OpenGl_GlFunctions::glDepthMask; + using OpenGl_GlFunctions::glDepthRange; + using OpenGl_GlFunctions::glDepthRangef; public: //! @name Transformation - inline void glViewport (GLint theX, GLint theY, GLsizei theWidth, GLsizei theHeight) - { - ::glViewport (theX, theY, theWidth, theHeight); - OpenGl_TRACE(glViewport) - } + using OpenGl_GlFunctions::glViewport; public: //! @name Vertex Arrays - inline void glDrawArrays (GLenum theMode, GLint theFirst, GLsizei theCount) - { - ::glDrawArrays (theMode, theFirst, theCount); - OpenGl_TRACE(glDrawArrays) - } - - inline void glDrawElements (GLenum theMode, GLsizei theCount, GLenum theType, const GLvoid* theIndices) - { - ::glDrawElements (theMode, theCount, theType, theIndices); - OpenGl_TRACE(glDrawElements) - } + using OpenGl_GlFunctions::glDrawArrays; + using OpenGl_GlFunctions::glDrawElements; public: //! @name Raster functions - inline void glPixelStorei (GLenum theParamName, GLint theParam) - { - ::glPixelStorei (theParamName, theParam); - OpenGl_TRACE(glPixelStorei) - } - - inline void glReadPixels (GLint x, GLint y, - GLsizei width, GLsizei height, - GLenum format, GLenum type, - GLvoid* pixels) - { - ::glReadPixels (x, y, width, height, format, type, pixels); - OpenGl_TRACE(glReadPixels) - } + using OpenGl_GlFunctions::glPixelStorei; + using OpenGl_GlFunctions::glReadPixels; public: //! @name Stenciling - inline void glStencilFunc (GLenum func, GLint ref, GLuint mask) - { - ::glStencilFunc (func, ref, mask); - OpenGl_TRACE(glStencilFunc) - } - - inline void glStencilMask (GLuint mask) - { - ::glStencilMask (mask); - OpenGl_TRACE(glStencilMask) - } - - inline void glStencilOp (GLenum fail, GLenum zfail, GLenum zpass) - { - ::glStencilOp (fail, zfail, zpass); - OpenGl_TRACE(glStencilOp) - } - - inline void glClearStencil (GLint s) - { - ::glClearStencil (s); - OpenGl_TRACE(glClearStencil) - } + using OpenGl_GlFunctions::glStencilFunc; + using OpenGl_GlFunctions::glStencilMask; + using OpenGl_GlFunctions::glStencilOp; + using OpenGl_GlFunctions::glClearStencil; public: //! @name Texture mapping - inline void glTexParameterf (GLenum target, GLenum pname, GLfloat param) - { - ::glTexParameterf (target, pname, param); - OpenGl_TRACE(glTexParameterf) - } - - inline void glTexParameteri (GLenum target, GLenum pname, GLint param) - { - ::glTexParameteri (target, pname, param); - OpenGl_TRACE(glTexParameteri) - } - - inline void glTexParameterfv (GLenum target, GLenum pname, const GLfloat* params) - { - ::glTexParameterfv (target, pname, params); - OpenGl_TRACE(glTexParameterfv) - } - - inline void glTexParameteriv (GLenum target, GLenum pname, const GLint* params) - { - ::glTexParameteriv (target, pname, params); - OpenGl_TRACE(glTexParameteriv) - } - - inline void glGetTexParameterfv (GLenum target, GLenum pname, GLfloat* params) - { - ::glGetTexParameterfv (target, pname, params); - OpenGl_TRACE(glGetTexParameterfv) - } - - inline void glGetTexParameteriv (GLenum target, GLenum pname, GLint* params) - { - ::glGetTexParameteriv (target, pname, params); - OpenGl_TRACE(glGetTexParameteriv) - } - - inline void glTexImage2D (GLenum target, GLint level, - GLint internalFormat, - GLsizei width, GLsizei height, - GLint border, GLenum format, GLenum type, - const GLvoid* pixels) - { - ::glTexImage2D(target, level, internalFormat, width, height, border, format, type, pixels); - OpenGl_TRACE(glTexImage2D) - } - - inline void glGenTextures (GLsizei n, GLuint* textures) - { - ::glGenTextures(n, textures); - OpenGl_TRACE(glGenTextures) - } - - inline void glDeleteTextures (GLsizei n, const GLuint* textures) - { - ::glDeleteTextures(n, textures); - OpenGl_TRACE(glDeleteTextures) - } - - inline void glBindTexture (GLenum target, GLuint texture) - { - ::glBindTexture(target, texture); - OpenGl_TRACE(glBindTexture) - } - - inline GLboolean glIsTexture (GLuint texture) - { - const GLboolean aRes = ::glIsTexture (texture); - OpenGl_TRACE(glIsTexture) - return aRes; - } - - inline void glTexSubImage2D (GLenum target, GLint level, - GLint xoffset, GLint yoffset, - GLsizei width, GLsizei height, - GLenum format, GLenum type, - const GLvoid* pixels) - { - ::glTexSubImage2D(target, level, xoffset, yoffset, width, height, format, type, pixels); - OpenGl_TRACE(glTexSubImage2D) - } - - inline void glCopyTexImage2D (GLenum target, GLint level, - GLenum internalformat, - GLint x, GLint y, - GLsizei width, GLsizei height, - GLint border) - { - ::glCopyTexImage2D(target, level, internalformat, x, y, width, height, border); - OpenGl_TRACE(glCopyTexImage2D) - } - - inline void glCopyTexSubImage2D (GLenum target, GLint level, - GLint xoffset, GLint yoffset, - GLint x, GLint y, - GLsizei width, GLsizei height) - { - ::glCopyTexSubImage2D(target, level, xoffset, yoffset, x, y, width, height); - OpenGl_TRACE(glCopyTexSubImage2D) - } - -#if !defined(GL_ES_VERSION_2_0) - inline void glTexImage1D (GLenum target, GLint level, - GLint internalFormat, - GLsizei width, GLint border, - GLenum format, GLenum type, - const GLvoid* pixels) - { - ::glTexImage1D(target, level, internalFormat, width, border, format, type, pixels); - OpenGl_TRACE(glTexImage1D) - } - - inline void glTexSubImage1D (GLenum target, GLint level, - GLint xoffset, - GLsizei width, GLenum format, - GLenum type, const GLvoid* pixels) - { - ::glTexSubImage1D(target, level, xoffset, width, format, type, pixels); - OpenGl_TRACE(glTexSubImage1D) - } - - inline void glCopyTexImage1D (GLenum target, GLint level, - GLenum internalformat, - GLint x, GLint y, - GLsizei width, GLint border) - { - ::glCopyTexImage1D(target, level, internalformat, x, y, width, border); - OpenGl_TRACE(glCopyTexImage1D) - } - - inline void glCopyTexSubImage1D (GLenum target, GLint level, - GLint xoffset, GLint x, GLint y, - GLsizei width) - { - ::glCopyTexSubImage1D(target, level, xoffset, x, y, width); - OpenGl_TRACE(glCopyTexSubImage1D) - } - - inline void glGetTexImage (GLenum target, GLint level, - GLenum format, GLenum type, - GLvoid* pixels) - { - ::glGetTexImage (target, level, format, type, pixels); - OpenGl_TRACE(glGetTexImage) - } -#endif - -#if !defined(GL_ES_VERSION_2_0) - - inline void glAlphaFunc (GLenum theFunc, GLclampf theRef) - { - ::glAlphaFunc (theFunc, theRef); - OpenGl_TRACE(glAlphaFunc) - } - - inline void glPointSize (GLfloat theSize) - { - ::glPointSize (theSize); - OpenGl_TRACE(glPointSize) - } - -#endif - -/*#if !defined(GL_ES_VERSION_2_0) - - inline void glTexEnvf (GLenum target, GLenum pname, GLfloat param) - { - ::glTexEnvf (target, pname, param); - } - - inline void glTexEnvi (GLenum target, GLenum pname, GLint param) - { - ::glTexEnvi (target, pname, param); - } - - inline void glTexEnvfv (GLenum target, GLenum pname, const GLfloat* params) - { - ::glTexEnvfv (target, pname, params); - } - - inline void glTexEnviv (GLenum target, GLenum pname, const GLint* params) - { - ::glTexEnviv (target, pname, params); - } - - inline void glGetTexEnvfv (GLenum target, GLenum pname, GLfloat* params) - { - ::glGetTexEnvfv (target, pname, params); - } - - inline void glGetTexEnviv (GLenum target, GLenum pname, GLint* params) - { - ::glGetTexEnviv (target, pname, params); - } - - inline void glGetTexLevelParameterfv (GLenum target, GLint level, GLenum pname, GLfloat* params) - { - ::glGetTexLevelParameterfv (target, level, pname, params); - } - - inline void glGetTexLevelParameteriv (GLenum target, GLint level, GLenum pname, GLint* params) - { - ::glGetTexLevelParameteriv (target, level, pname, params); - } - - inline void glClearIndex (GLfloat c) - { - ::glClearIndex(c); - } - - inline void glIndexMask (GLuint theMask) - { - ::glIndexMask (theMask); - } - - inline void glLogicOp (GLenum opcode) - { - ::glLogicOp(opcode); - } - - inline void glPolygonMode (GLenum theFace, GLenum theMode) - { - ::glPolygonMode (theFace, theMode); - } - - inline void glDrawBuffer (GLenum theMode) - { - ::glDrawBuffer (theMode); - } - - inline void glReadBuffer (GLenum theMode) - { - ::glReadBuffer (theMode); - } - - inline void glGetDoublev (GLenum theParamName, GLdouble* theValues) - { - ::glGetDoublev (theParamName, theValues); - } - - inline GLint glRenderMode (GLenum theMode) - { - return ::glRenderMode (theMode); - } - - inline void glArrayElement (GLint i) - { - ::glArrayElement (i); - } - - inline void glPixelStoref (GLenum theParamName, GLfloat theParam) - { - ::glPixelStoref (theParamName, theParam); - } - - inline void glPixelTransferf (GLenum theParamName, GLfloat theParam) - { - ::glPixelTransferf (theParamName, theParam); - } - - inline void glPixelTransferi (GLenum theParamName, GLint theParam) - { - ::glPixelTransferi (theParamName, theParam); - } - - inline void glPixelMapfv (GLenum map, GLsizei mapsize, const GLfloat* values) - { - ::glPixelMapfv (map, mapsize, values); - } - - inline void glPixelMapuiv (GLenum map, GLsizei mapsize, const GLuint* values) - { - ::glPixelMapuiv (map, mapsize, values); - } - - inline void glPixelMapusv (GLenum map, GLsizei mapsize, const GLushort* values) - { - ::glPixelMapusv (map, mapsize, values); - } - - inline void glGetPixelMapfv (GLenum map, GLfloat* values) - { - ::glGetPixelMapfv (map, values); - } - - inline void glGetPixelMapuiv (GLenum map, GLuint* values) - { - ::glGetPixelMapuiv (map, values); - } - - inline void glGetPixelMapusv (GLenum map, GLushort* values) - { - ::glGetPixelMapusv (map, values); - } -#endif*/ + using OpenGl_GlFunctions::glTexParameterf; + using OpenGl_GlFunctions::glTexParameteri; + using OpenGl_GlFunctions::glTexParameterfv; + using OpenGl_GlFunctions::glTexParameteriv; + using OpenGl_GlFunctions::glGetTexParameterfv; + using OpenGl_GlFunctions::glGetTexParameteriv; + using OpenGl_GlFunctions::glTexImage2D; + using OpenGl_GlFunctions::glGenTextures; + using OpenGl_GlFunctions::glDeleteTextures; + using OpenGl_GlFunctions::glBindTexture; + using OpenGl_GlFunctions::glIsTexture; + using OpenGl_GlFunctions::glTexSubImage2D; + using OpenGl_GlFunctions::glCopyTexImage2D; + using OpenGl_GlFunctions::glCopyTexSubImage2D; + +public: //! @name desktop extensions - not supported in OpenGL ES 2..0 + + using OpenGl_GlFunctions::glTexImage1D; + using OpenGl_GlFunctions::glTexSubImage1D; + using OpenGl_GlFunctions::glCopyTexImage1D; + using OpenGl_GlFunctions::glCopyTexSubImage1D; + using OpenGl_GlFunctions::glGetTexImage; + using OpenGl_GlFunctions::glAlphaFunc; + using OpenGl_GlFunctions::glPointSize; + + // added to OpenGL ES 3.0 + using OpenGl_GlFunctions::glReadBuffer; + using OpenGl_GlFunctions::glDrawBuffer; + + // added to OpenGL ES 3.1 + using OpenGl_GlFunctions::glGetTexLevelParameteriv; + + // added to OpenGL ES 3.2 + using OpenGl_GlFunctions::glGetPointerv; + + using OpenGl_GlFunctions::glPolygonMode; + using OpenGl_GlFunctions::glLogicOp; }; diff --git a/src/OpenGl/OpenGl_GlCore32.hxx b/src/OpenGl/OpenGl_GlCore32.hxx index 1a42ee80a0..b225fb569b 100644 --- a/src/OpenGl/OpenGl_GlCore32.hxx +++ b/src/OpenGl/OpenGl_GlCore32.hxx @@ -24,8 +24,6 @@ struct OpenGl_GlCore32 : public OpenGl_GlCore31 private: typedef OpenGl_GlCore31 theBaseClass_t; -#if !defined(GL_ES_VERSION_2_0) - public: //! @name GL_ARB_draw_elements_base_vertex (added to OpenGL 3.2 core) using theBaseClass_t::glDrawElementsBaseVertex; @@ -60,8 +58,6 @@ public: //! @name OpenGL 3.2 additives to 3.1 using theBaseClass_t::glGetBufferParameteri64v; using theBaseClass_t::glFramebufferTexture; -#endif - }; #endif // _OpenGl_GlCore32_Header diff --git a/src/OpenGl/OpenGl_GlCore33.hxx b/src/OpenGl/OpenGl_GlCore33.hxx index a2e95f4a3c..263a8c52fa 100644 --- a/src/OpenGl/OpenGl_GlCore33.hxx +++ b/src/OpenGl/OpenGl_GlCore33.hxx @@ -24,8 +24,6 @@ struct OpenGl_GlCore33 : public OpenGl_GlCore32 private: typedef OpenGl_GlCore32 theBaseClass_t; -#if !defined(GL_ES_VERSION_2_0) - public: //! @name GL_ARB_blend_func_extended (added to OpenGL 3.3 core) using theBaseClass_t::glBindFragDataLocationIndexed; @@ -69,8 +67,6 @@ public: //! @name OpenGL 3.3 additives to 3.2 using theBaseClass_t::glVertexAttribDivisor; -#endif - }; #endif // _OpenGl_GlCore33_Header diff --git a/src/OpenGl/OpenGl_GlCore40.hxx b/src/OpenGl/OpenGl_GlCore40.hxx index 1f69f80c6d..dc6b835502 100644 --- a/src/OpenGl/OpenGl_GlCore40.hxx +++ b/src/OpenGl/OpenGl_GlCore40.hxx @@ -24,8 +24,6 @@ struct OpenGl_GlCore40 : public OpenGl_GlCore33 private: typedef OpenGl_GlCore33 theBaseClass_t; -#if !defined(GL_ES_VERSION_2_0) - public: //! @name GL_ARB_draw_indirect (added to OpenGL 4.0 core) using theBaseClass_t::glDrawArraysIndirect; @@ -93,8 +91,6 @@ public: //! @name OpenGL 4.0 additives to 3.3 using theBaseClass_t::glBlendFunci; using theBaseClass_t::glBlendFuncSeparatei; -#endif - }; #endif // _OpenGl_GlCore40_Header diff --git a/src/OpenGl/OpenGl_GlCore41.hxx b/src/OpenGl/OpenGl_GlCore41.hxx index cdf82b403c..2b69a2518b 100644 --- a/src/OpenGl/OpenGl_GlCore41.hxx +++ b/src/OpenGl/OpenGl_GlCore41.hxx @@ -24,8 +24,6 @@ struct OpenGl_GlCore41 : public OpenGl_GlCore40 private: typedef OpenGl_GlCore40 theBaseClass_t; -#if !defined(GL_ES_VERSION_2_0) - public: //! @name GL_ARB_ES2_compatibility (added to OpenGL 4.1 core) using theBaseClass_t::glReleaseShaderCompiler; @@ -129,8 +127,6 @@ public: //! @name GL_ARB_viewport_array (added to OpenGL 4.1 core) using theBaseClass_t::glGetFloati_v; using theBaseClass_t::glGetDoublei_v; -#endif - }; #endif // _OpenGl_GlCore41_Header diff --git a/src/OpenGl/OpenGl_GlCore42.hxx b/src/OpenGl/OpenGl_GlCore42.hxx index 7746b2f738..20514c0f19 100644 --- a/src/OpenGl/OpenGl_GlCore42.hxx +++ b/src/OpenGl/OpenGl_GlCore42.hxx @@ -24,8 +24,6 @@ struct OpenGl_GlCore42 : public OpenGl_GlCore41 private: typedef OpenGl_GlCore41 theBaseClass_t; -#if !defined(GL_ES_VERSION_2_0) - public: //! @name GL_ARB_base_instance (added to OpenGL 4.2 core) using theBaseClass_t::glDrawArraysInstancedBaseInstance; @@ -56,8 +54,6 @@ public: //! @name GL_ARB_texture_storage (added to OpenGL 4.2 core) using theBaseClass_t::glTexStorage2D; using theBaseClass_t::glTexStorage3D; -#endif - }; #endif // _OpenGl_GlCore42_Header diff --git a/src/OpenGl/OpenGl_GlCore43.hxx b/src/OpenGl/OpenGl_GlCore43.hxx index 9971877c9f..9f95c856ba 100644 --- a/src/OpenGl/OpenGl_GlCore43.hxx +++ b/src/OpenGl/OpenGl_GlCore43.hxx @@ -26,8 +26,6 @@ private: public: //! @name OpenGL 4.3 additives to 4.2 -#if !defined(GL_ES_VERSION_2_0) - using theBaseClass_t::glClearBufferData; using theBaseClass_t::glClearBufferSubData; using theBaseClass_t::glDispatchCompute; @@ -72,8 +70,6 @@ public: //! @name OpenGL 4.3 additives to 4.2 using theBaseClass_t::glObjectPtrLabel; using theBaseClass_t::glGetObjectPtrLabel; -#endif - }; #endif // _OpenGl_GlCore43_Header diff --git a/src/OpenGl/OpenGl_GlCore44.hxx b/src/OpenGl/OpenGl_GlCore44.hxx index e8c8e5997a..5405899165 100644 --- a/src/OpenGl/OpenGl_GlCore44.hxx +++ b/src/OpenGl/OpenGl_GlCore44.hxx @@ -26,8 +26,6 @@ private: public: //! @name OpenGL 4.4 additives to 4.3 -#if !defined(GL_ES_VERSION_2_0) - using theBaseClass_t::glBufferStorage; using theBaseClass_t::glClearTexImage; using theBaseClass_t::glClearTexSubImage; @@ -38,8 +36,6 @@ public: //! @name OpenGL 4.4 additives to 4.3 using theBaseClass_t::glBindImageTextures; using theBaseClass_t::glBindVertexBuffers; -#endif - }; #endif // _OpenGl_GlCore44_Header diff --git a/src/OpenGl/OpenGl_GlCore45.hxx b/src/OpenGl/OpenGl_GlCore45.hxx index 804dde35f1..86f2aa4bf1 100644 --- a/src/OpenGl/OpenGl_GlCore45.hxx +++ b/src/OpenGl/OpenGl_GlCore45.hxx @@ -24,7 +24,6 @@ private: public: //! @name OpenGL 4.5 additives to 4.4 -#if !defined(GL_ES_VERSION_2_0) using theBaseClass_t::glClipControl; using theBaseClass_t::glCreateTransformFeedbacks; using theBaseClass_t::glTransformFeedbackBufferBase; @@ -135,7 +134,6 @@ public: //! @name OpenGL 4.5 additives to 4.4 using theBaseClass_t::glGetnUniformuiv; using theBaseClass_t::glReadnPixels; using theBaseClass_t::glTextureBarrier; -#endif }; diff --git a/src/OpenGl/OpenGl_GlCore46.hxx b/src/OpenGl/OpenGl_GlCore46.hxx index 333d1947cb..6a47a8c6fb 100644 --- a/src/OpenGl/OpenGl_GlCore46.hxx +++ b/src/OpenGl/OpenGl_GlCore46.hxx @@ -24,12 +24,10 @@ private: public: //! @name OpenGL 4.6 additives to 4.5 -#if !defined(GL_ES_VERSION_2_0) using theBaseClass_t::glSpecializeShader; using theBaseClass_t::glMultiDrawArraysIndirectCount; using theBaseClass_t::glMultiDrawElementsIndirectCount; using theBaseClass_t::glPolygonOffsetClamp; -#endif }; diff --git a/src/OpenGl/OpenGl_GlFunctions.cxx b/src/OpenGl/OpenGl_GlFunctions.cxx index 67688584bb..3eda7a2cb4 100644 --- a/src/OpenGl/OpenGl_GlFunctions.cxx +++ b/src/OpenGl/OpenGl_GlFunctions.cxx @@ -11,9 +11,7 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -#if defined(_WIN32) - #include -#endif +#include #include @@ -26,22 +24,1658 @@ #include #include +#include + #if !defined(HAVE_EGL) && defined(HAVE_XLIB) #include #endif -// ======================================================================= -// function : init -// purpose : -// ======================================================================= -void OpenGl_GlFunctions::load (OpenGl_Context& theCtx, - Standard_Boolean theIsCoreProfile) +#ifdef __EMSCRIPTEN__ + #include + #include +#endif + +// This debug macros can be enabled to help debugging OpenGL implementations +// without solid / working debugging capabilities. +//#define TO_TRACE + +#define WrapProxyProc(theFunc) this->theFunc=opencascade::theFunc +#define WrapProxyProc5(theFunc1,theFunc2,theFunc3,theFunc4,theFunc5) \ + WrapProxyProc(theFunc1);WrapProxyProc(theFunc2);WrapProxyProc(theFunc3);WrapProxyProc(theFunc4);WrapProxyProc(theFunc5) + +#ifdef TO_TRACE + #define OpenGl_TRACE(theName) {OpenGl_GlFunctions::debugPrintError(#theName);} + #define WrapProxyDef(theFunc) this->theFunc=opencascade::theFunc +#else + #define OpenGl_TRACE(theName) + // skip wrapper and set pointer to global function + #define WrapProxyDef(theFunc) this->theFunc=opencascade::theFunc;this->theFunc=::theFunc; +#endif + +#define WrapProxyDef5(theFunc1,theFunc2,theFunc3,theFunc4,theFunc5) \ + WrapProxyDef(theFunc1);WrapProxyDef(theFunc2);WrapProxyDef(theFunc3);WrapProxyDef(theFunc4);WrapProxyDef(theFunc5) + +namespace opencascade { + static void APIENTRY glReadBuffer (GLenum mode) + { + #if defined(GL_ES_VERSION_2_0) + ::glEnable (0xFFFF); // added to OpenGL ES 3.0 + (void )mode; + #else + ::glReadBuffer (mode); + #endif + OpenGl_TRACE(glReadBuffer) + } + + static void APIENTRY glGetTexLevelParameteriv (GLenum target, GLint level, GLenum pname, GLint *params) + { + #if defined(GL_ES_VERSION_2_0) + ::glEnable (0xFFFF); // added to OpenGL ES 3.1 + (void )target; (void )level; (void )pname; (void )params; + #else + ::glGetTexLevelParameteriv (target, level, pname, params); + #endif + OpenGl_TRACE(glGetTexLevelParameteriv) + } + + static void APIENTRY glGetTexLevelParameterfv (GLenum target, GLint level, GLenum pname, GLfloat *params) + { + #if defined(GL_ES_VERSION_2_0) + ::glEnable (0xFFFF); // added to OpenGL ES 3.1 + (void )target; (void )level; (void )pname; (void )params; + #else + ::glGetTexLevelParameterfv (target, level, pname, params); + #endif + OpenGl_TRACE(glGetTexLevelParameterfv) + } + + static void APIENTRY glGetPointerv (GLenum name, GLvoid* *params) + { + #if defined(GL_ES_VERSION_2_0) + *params = NULL; + ::glEnable (0xFFFF); // added to OpenGL ES 3.2 + (void )name; + #else + ::glGetPointerv (name, params); + #endif + OpenGl_TRACE(glGetPointerv) + } + + static void APIENTRY glDrawBuffer (GLenum mode) + { + #if defined(GL_ES_VERSION_2_0) + ::glEnable (0xFFFF); + (void )mode; + #else + ::glDrawBuffer (mode); + #endif + OpenGl_TRACE(glDrawBuffer) + } + + // Miscellaneous + + static void APIENTRY glClearColor (GLclampf theRed, GLclampf theGreen, GLclampf theBlue, GLclampf theAlpha) + { + ::glClearColor (theRed, theGreen, theBlue, theAlpha); + OpenGl_TRACE(glClearColor) + } + + static void APIENTRY glClear (GLbitfield theMask) + { + ::glClear (theMask); + OpenGl_TRACE(glClear) + } + + static void APIENTRY glColorMask (GLboolean theRed, GLboolean theGreen, GLboolean theBlue, GLboolean theAlpha) + { + ::glColorMask (theRed, theGreen, theBlue, theAlpha); + OpenGl_TRACE(glColorMask) + } + + static void APIENTRY glBlendFunc (GLenum sfactor, GLenum dfactor) + { + ::glBlendFunc(sfactor, dfactor); + OpenGl_TRACE(glBlendFunc) + } + + static void APIENTRY glCullFace (GLenum theMode) + { + ::glCullFace (theMode); + OpenGl_TRACE(glCullFace) + } + + static void APIENTRY glFrontFace (GLenum theMode) + { + ::glFrontFace (theMode); + OpenGl_TRACE(glFrontFace) + } + + static void APIENTRY glLineWidth (GLfloat theWidth) + { + ::glLineWidth (theWidth); + OpenGl_TRACE(glLineWidth) + } + + static void APIENTRY glPolygonOffset (GLfloat theFactor, GLfloat theUnits) + { + ::glPolygonOffset (theFactor, theUnits); + OpenGl_TRACE(glPolygonOffset) + } + + static void APIENTRY glScissor (GLint theX, GLint theY, GLsizei theWidth, GLsizei theHeight) + { + ::glScissor (theX, theY, theWidth, theHeight); + OpenGl_TRACE(glScissor) + } + + static void APIENTRY glEnable (GLenum theCap) + { + ::glEnable (theCap); + OpenGl_TRACE(glEnable) + } + + static void APIENTRY glDisable (GLenum theCap) + { + ::glDisable (theCap); + OpenGl_TRACE(glDisable) + } + + static GLboolean APIENTRY glIsEnabled (GLenum theCap) + { + return ::glIsEnabled (theCap); + } + + static void APIENTRY glGetBooleanv (GLenum theParamName, GLboolean* theValues) + { + ::glGetBooleanv (theParamName, theValues); + OpenGl_TRACE(glGetBooleanv) + } + + static void APIENTRY glGetFloatv (GLenum theParamName, GLfloat* theValues) + { + ::glGetFloatv (theParamName, theValues); + OpenGl_TRACE(glGetFloatv) + } + + static void APIENTRY glGetIntegerv (GLenum theParamName, GLint* theValues) + { + ::glGetIntegerv (theParamName, theValues); + OpenGl_TRACE(glGetIntegerv) + } + + static GLenum APIENTRY glGetError() + { + return ::glGetError(); + } + + static const GLubyte* APIENTRY glGetString (GLenum theName) + { + const GLubyte* aRes = ::glGetString (theName); + OpenGl_TRACE(glGetString) + return aRes; + } + + static void APIENTRY glFinish() + { + ::glFinish(); + OpenGl_TRACE(glFinish) + } + + static void APIENTRY glFlush() + { + ::glFlush(); + OpenGl_TRACE(glFlush) + } + + static void APIENTRY glHint (GLenum theTarget, GLenum theMode) + { + ::glHint (theTarget, theMode); + OpenGl_TRACE(glHint) + } + + // Depth Buffer + + static void APIENTRY glClearDepth (GLclampd theDepth) + { + #if defined(GL_ES_VERSION_2_0) + ::glClearDepthf ((GLfloat )theDepth); + #else + ::glClearDepth (theDepth); + #endif + OpenGl_TRACE(glClearDepth) + } + + static void APIENTRY glClearDepthf (GLfloat theDepth) + { + #if defined(GL_ES_VERSION_2_0) + ::glClearDepthf (theDepth); + #else + ::glClearDepth (theDepth); + #endif + OpenGl_TRACE(glClearDepthf) + } + + static void APIENTRY glDepthFunc (GLenum theFunc) + { + ::glDepthFunc (theFunc); + OpenGl_TRACE(glDepthFunc) + } + + static void APIENTRY glDepthMask (GLboolean theFlag) + { + ::glDepthMask (theFlag); + OpenGl_TRACE(glDepthMask) + } + + static void APIENTRY glDepthRange (GLclampd theNearValue, + GLclampd theFarValue) + { + #if defined(GL_ES_VERSION_2_0) + ::glDepthRangef ((GLfloat )theNearValue, (GLfloat )theFarValue); + #else + ::glDepthRange (theNearValue, theFarValue); + #endif + OpenGl_TRACE(glDepthRange) + } + + static void APIENTRY glDepthRangef (GLfloat theNearValue, + GLfloat theFarValue) + { + #if defined(GL_ES_VERSION_2_0) + ::glDepthRangef (theNearValue, theFarValue); + #else + ::glDepthRange (theNearValue, theFarValue); + #endif + OpenGl_TRACE(glDepthRangef) + } + + // Transformation + + static void APIENTRY glViewport (GLint theX, GLint theY, GLsizei theWidth, GLsizei theHeight) + { + ::glViewport (theX, theY, theWidth, theHeight); + OpenGl_TRACE(glViewport) + } + + // Vertex Arrays + + static void APIENTRY glDrawArrays (GLenum theMode, GLint theFirst, GLsizei theCount) + { + ::glDrawArrays (theMode, theFirst, theCount); + OpenGl_TRACE(glDrawArrays) + } + + static void APIENTRY glDrawElements (GLenum theMode, GLsizei theCount, GLenum theType, const GLvoid* theIndices) + { + ::glDrawElements (theMode, theCount, theType, theIndices); + OpenGl_TRACE(glDrawElements) + } + + // Raster functions + + static void APIENTRY glPixelStorei (GLenum theParamName, GLint theParam) + { + ::glPixelStorei (theParamName, theParam); + OpenGl_TRACE(glPixelStorei) + } + + static void APIENTRY glReadPixels (GLint x, GLint y, + GLsizei width, GLsizei height, + GLenum format, GLenum type, + GLvoid* pixels) + { + ::glReadPixels (x, y, width, height, format, type, pixels); + OpenGl_TRACE(glReadPixels) + } + + // Stenciling + + static void APIENTRY glStencilFunc (GLenum func, GLint ref, GLuint mask) + { + ::glStencilFunc (func, ref, mask); + OpenGl_TRACE(glStencilFunc) + } + + static void APIENTRY glStencilMask (GLuint mask) + { + ::glStencilMask (mask); + OpenGl_TRACE(glStencilMask) + } + + static void APIENTRY glStencilOp (GLenum fail, GLenum zfail, GLenum zpass) + { + ::glStencilOp (fail, zfail, zpass); + OpenGl_TRACE(glStencilOp) + } + + static void APIENTRY glClearStencil (GLint s) + { + ::glClearStencil (s); + OpenGl_TRACE(glClearStencil) + } + + // Texture mapping + + static void APIENTRY glTexParameterf (GLenum target, GLenum pname, GLfloat param) + { + ::glTexParameterf (target, pname, param); + OpenGl_TRACE(glTexParameterf) + } + + static void APIENTRY glTexParameteri (GLenum target, GLenum pname, GLint param) + { + ::glTexParameteri (target, pname, param); + OpenGl_TRACE(glTexParameteri) + } + + static void APIENTRY glTexParameterfv (GLenum target, GLenum pname, const GLfloat* params) + { + ::glTexParameterfv (target, pname, params); + OpenGl_TRACE(glTexParameterfv) + } + + static void APIENTRY glTexParameteriv (GLenum target, GLenum pname, const GLint* params) + { + ::glTexParameteriv (target, pname, params); + OpenGl_TRACE(glTexParameteriv) + } + + static void APIENTRY glGetTexParameterfv (GLenum target, GLenum pname, GLfloat* params) + { + ::glGetTexParameterfv (target, pname, params); + OpenGl_TRACE(glGetTexParameterfv) + } + + static void APIENTRY glGetTexParameteriv (GLenum target, GLenum pname, GLint* params) + { + ::glGetTexParameteriv (target, pname, params); + OpenGl_TRACE(glGetTexParameteriv) + } + + static void APIENTRY glTexImage2D (GLenum target, GLint level, + GLint internalFormat, + GLsizei width, GLsizei height, + GLint border, GLenum format, GLenum type, + const GLvoid* pixels) + { + ::glTexImage2D(target, level, internalFormat, width, height, border, format, type, pixels); + OpenGl_TRACE(glTexImage2D) + } + + static void APIENTRY glGenTextures (GLsizei n, GLuint* textures) + { + ::glGenTextures(n, textures); + OpenGl_TRACE(glGenTextures) + } + + static void APIENTRY glDeleteTextures (GLsizei n, const GLuint* textures) + { + ::glDeleteTextures(n, textures); + OpenGl_TRACE(glDeleteTextures) + } + + static void APIENTRY glBindTexture (GLenum target, GLuint texture) + { + ::glBindTexture(target, texture); + OpenGl_TRACE(glBindTexture) + } + + static GLboolean APIENTRY glIsTexture (GLuint texture) + { + const GLboolean aRes = ::glIsTexture (texture); + OpenGl_TRACE(glIsTexture) + return aRes; + } + + static void APIENTRY glTexSubImage2D (GLenum target, GLint level, + GLint xoffset, GLint yoffset, + GLsizei width, GLsizei height, + GLenum format, GLenum type, + const GLvoid* pixels) + { + ::glTexSubImage2D(target, level, xoffset, yoffset, width, height, format, type, pixels); + OpenGl_TRACE(glTexSubImage2D) + } + + static void APIENTRY glCopyTexImage2D (GLenum target, GLint level, + GLenum internalformat, + GLint x, GLint y, + GLsizei width, GLsizei height, + GLint border) + { + ::glCopyTexImage2D(target, level, internalformat, x, y, width, height, border); + OpenGl_TRACE(glCopyTexImage2D) + } + + static void APIENTRY glCopyTexSubImage2D (GLenum target, GLint level, + GLint xoffset, GLint yoffset, + GLint x, GLint y, + GLsizei width, GLsizei height) + { + ::glCopyTexSubImage2D(target, level, xoffset, yoffset, x, y, width, height); + OpenGl_TRACE(glCopyTexSubImage2D) + } + + // desktop extensions - not supported in OpenGL ES 2.0 + + static void APIENTRY glTexImage1D (GLenum target, GLint level, + GLint internalFormat, + GLsizei width, GLint border, + GLenum format, GLenum type, + const GLvoid* pixels) + { + #if defined(GL_ES_VERSION_2_0) + ::glEnable (0xFFFF); + (void )target; (void )level; (void )internalFormat; (void )width; (void )border; (void )format; (void )type; (void )pixels; + #else + ::glTexImage1D(target, level, internalFormat, width, border, format, type, pixels); + #endif + OpenGl_TRACE(glTexImage1D) + } + + static void APIENTRY glTexSubImage1D (GLenum target, GLint level, + GLint xoffset, + GLsizei width, GLenum format, + GLenum type, const GLvoid* pixels) + { + #if defined(GL_ES_VERSION_2_0) + ::glEnable (0xFFFF); + (void )target; (void )level; (void )xoffset; (void )width; (void )format; (void )type; (void )pixels; + #else + ::glTexSubImage1D(target, level, xoffset, width, format, type, pixels); + #endif + OpenGl_TRACE(glTexSubImage1D) + } + + static void APIENTRY glCopyTexImage1D (GLenum target, GLint level, + GLenum internalformat, + GLint x, GLint y, + GLsizei width, GLint border) + { + #if defined(GL_ES_VERSION_2_0) + ::glEnable (0xFFFF); + (void )target; (void )level; (void )internalformat; (void )x; (void )y; (void )width; (void )border; + #else + ::glCopyTexImage1D(target, level, internalformat, x, y, width, border); + #endif + OpenGl_TRACE(glCopyTexImage1D) + } + + static void APIENTRY glCopyTexSubImage1D (GLenum target, GLint level, + GLint xoffset, GLint x, GLint y, + GLsizei width) + { + #if defined(GL_ES_VERSION_2_0) + ::glEnable (0xFFFF); + (void )target; (void )level; (void )xoffset; (void )x; (void )y; (void )width; + #else + ::glCopyTexSubImage1D(target, level, xoffset, x, y, width); + #endif + OpenGl_TRACE(glCopyTexSubImage1D) + } + + static void APIENTRY glGetTexImage (GLenum target, GLint level, + GLenum format, GLenum type, + GLvoid* pixels) + { + #if defined(GL_ES_VERSION_2_0) + ::glEnable (0xFFFF); + (void )target; (void )level; (void )format; (void )type; (void )pixels; + #else + ::glGetTexImage (target, level, format, type, pixels); + #endif + OpenGl_TRACE(glGetTexImage) + } + + static void APIENTRY glAlphaFunc (GLenum theFunc, GLclampf theRef) + { + #if defined(GL_ES_VERSION_2_0) + ::glEnable (0xFFFF); + (void )theFunc; (void )theRef; + #else + ::glAlphaFunc (theFunc, theRef); + #endif + OpenGl_TRACE(glAlphaFunc) + } + + static void APIENTRY glPointSize (GLfloat theSize) + { + #if defined(GL_ES_VERSION_2_0) + ::glEnable (0xFFFF); + (void )theSize; + #else + ::glPointSize (theSize); + #endif + OpenGl_TRACE(glPointSize) + } + + static void APIENTRY glPolygonMode (GLenum face, GLenum mode) + { + #if defined(GL_ES_VERSION_2_0) + ::glEnable (0xFFFF); + (void )face; (void )mode; + #else + ::glPolygonMode (face, mode); + #endif + OpenGl_TRACE(glPolygonMode); + } + + static void APIENTRY glLogicOp (GLenum opcode) + { + #if defined(GL_ES_VERSION_2_0) + ::glEnable (0xFFFF); + (void )opcode; + #else + ::glLogicOp (opcode); + #endif + OpenGl_TRACE(glLogicOp) + } + + static void APIENTRY glMultiDrawElements (GLenum theMode, const GLsizei* theCount, GLenum theType, const void* const* theIndices, GLsizei theDrawCount) + { + if (theCount == NULL + || theIndices == NULL) + { + return; + } + + for (GLsizei aBatchIter = 0; aBatchIter < theDrawCount; ++aBatchIter) + { + ::glDrawElements (theMode, theCount[aBatchIter], theType, theIndices[aBatchIter]); + } + OpenGl_TRACE(glMultiDrawElements) + } + +#if defined(GL_ES_VERSION_2_0) + +// OpenGL ES 1.1 + + static void APIENTRY glActiveTexture (GLenum texture) + { + ::glActiveTexture (texture); + OpenGl_TRACE(glActiveTexture) + } + + static void APIENTRY glCompressedTexImage2D (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid *data) + { + ::glCompressedTexImage2D (target, level, internalformat, width, height, border, imageSize, data); + OpenGl_TRACE(glCompressedTexImage2D) + } + + static void APIENTRY glCompressedTexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid *data) + { + ::glCompressedTexSubImage2D (target, level, xoffset, yoffset, width, height, format, imageSize, data); + OpenGl_TRACE(glCompressedTexSubImage2D) + } + + static void APIENTRY glBindBuffer (GLenum target, GLuint buffer) + { + ::glBindBuffer (target, buffer); + OpenGl_TRACE(glBindBuffer) + } + + static void APIENTRY glBufferData (GLenum target, GLsizeiptr size, const void* data, GLenum usage) + { + ::glBufferData (target, size, data, usage); + OpenGl_TRACE(glBufferData) + } + + static void APIENTRY glBufferSubData (GLenum target, GLintptr offset, GLsizeiptr size, const void* data) + { + ::glBufferSubData (target, offset, size, data); + OpenGl_TRACE(glBufferSubData) + } + + static void APIENTRY glDeleteBuffers (GLsizei n, const GLuint *buffers) + { + ::glDeleteBuffers (n, buffers); + OpenGl_TRACE(glDeleteBuffers) + } + + static void APIENTRY glGenBuffers (GLsizei n, GLuint *buffers) + { + ::glGenBuffers (n, buffers); + OpenGl_TRACE(glGenBuffers) + } + + static void APIENTRY glGetBufferParameteriv (GLenum target, GLenum pname, GLint* params) + { + ::glGetBufferParameteriv (target, pname, params); + OpenGl_TRACE(glGetBufferParameteriv) + } + + static GLboolean APIENTRY glIsBuffer (GLuint buffer) + { + return ::glIsBuffer (buffer); + } + + static void APIENTRY glSampleCoverage (GLfloat value, GLboolean invert) + { + ::glSampleCoverage (value, invert); + OpenGl_TRACE(glSampleCoverage) + } + + // OpenGL ES 2.0 + + static void APIENTRY glBlendColor (GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha) + { + ::glBlendColor (red, green, blue, alpha); + OpenGl_TRACE(glBlendColor) + } + + static void APIENTRY glBlendEquation (GLenum mode) + { + ::glBlendEquation (mode); + OpenGl_TRACE(glBlendEquation) + } + + static void APIENTRY glBlendFuncSeparate (GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha) + { + ::glBlendFuncSeparate (sfactorRGB, dfactorRGB, sfactorAlpha, dfactorAlpha); + OpenGl_TRACE(glBlendFuncSeparate) + } + + static void APIENTRY glBlendEquationSeparate (GLenum modeRGB, GLenum modeAlpha) + { + ::glBlendEquationSeparate (modeRGB, modeAlpha); + OpenGl_TRACE(glBlendEquationSeparate) + } + + static void APIENTRY glStencilOpSeparate (GLenum face, GLenum sfail, GLenum dpfail, GLenum dppass) + { + ::glStencilOpSeparate (face, sfail, dpfail, dppass); + OpenGl_TRACE(glStencilOpSeparate) + } + + static void APIENTRY glStencilFuncSeparate (GLenum face, GLenum func, GLint ref, GLuint mask) + { + ::glStencilFuncSeparate (face, func, ref, mask); + OpenGl_TRACE(glStencilFuncSeparate) + } + + static void APIENTRY glStencilMaskSeparate (GLenum face, GLuint mask) + { + ::glStencilMaskSeparate (face, mask); + OpenGl_TRACE(glStencilMaskSeparate) + } + + static void APIENTRY glAttachShader (GLuint program, GLuint shader) + { + ::glAttachShader (program, shader); + OpenGl_TRACE(glAttachShader) + } + + static void APIENTRY glBindAttribLocation (GLuint program, GLuint index, const GLchar *name) + { + ::glBindAttribLocation (program, index, name); + OpenGl_TRACE(glBindAttribLocation) + } + + static void APIENTRY glBindFramebuffer (GLenum target, GLuint framebuffer) + { + ::glBindFramebuffer (target, framebuffer); + OpenGl_TRACE(glBindFramebuffer) + } + + static void APIENTRY glBindRenderbuffer (GLenum target, GLuint renderbuffer) + { + ::glBindRenderbuffer (target, renderbuffer); + OpenGl_TRACE(glBindRenderbuffer) + } + + static GLenum APIENTRY glCheckFramebufferStatus (GLenum target) + { + return ::glCheckFramebufferStatus (target); + } + + static void APIENTRY glCompileShader (GLuint shader) + { + ::glCompileShader (shader); + OpenGl_TRACE(glCompileShader) + } + + static GLuint APIENTRY glCreateProgram() + { + return ::glCreateProgram(); + } + + static GLuint APIENTRY glCreateShader (GLenum type) + { + return ::glCreateShader (type); + } + + static void APIENTRY glDeleteFramebuffers (GLsizei n, const GLuint *framebuffers) + { + ::glDeleteFramebuffers (n, framebuffers); + OpenGl_TRACE(glDeleteFramebuffers) + } + + static void APIENTRY glDeleteProgram (GLuint program) + { + ::glDeleteProgram (program); + OpenGl_TRACE(glDeleteProgram) + } + + static void APIENTRY glDeleteRenderbuffers (GLsizei n, const GLuint *renderbuffers) + { + ::glDeleteRenderbuffers (n, renderbuffers); + OpenGl_TRACE(glDeleteRenderbuffers) + } + + static void APIENTRY glDeleteShader (GLuint shader) + { + ::glDeleteShader (shader); + OpenGl_TRACE(glDeleteShader) + } + + static void APIENTRY glDetachShader (GLuint program, GLuint shader) + { + ::glDetachShader (program, shader); + OpenGl_TRACE(glDetachShader) + } + + static void APIENTRY glDisableVertexAttribArray (GLuint index) + { + ::glDisableVertexAttribArray (index); + OpenGl_TRACE(glDisableVertexAttribArray) + } + + static void APIENTRY glEnableVertexAttribArray (GLuint index) + { + ::glEnableVertexAttribArray (index); + OpenGl_TRACE(glEnableVertexAttribArray) + } + + static void APIENTRY glFramebufferRenderbuffer (GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer) + { + ::glFramebufferRenderbuffer (target, attachment, renderbuffertarget, renderbuffer); + OpenGl_TRACE(glFramebufferRenderbuffer) + } + + static void APIENTRY glFramebufferTexture2D (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level) + { + ::glFramebufferTexture2D (target, attachment, textarget, texture, level); + OpenGl_TRACE(glFramebufferTexture2D) + } + + static void APIENTRY glGenerateMipmap (GLenum target) + { + ::glGenerateMipmap (target); + OpenGl_TRACE(glGenerateMipmap) + } + + static void APIENTRY glGenFramebuffers (GLsizei n, GLuint *framebuffers) + { + ::glGenFramebuffers (n, framebuffers); + OpenGl_TRACE(glGenFramebuffers) + } + + static void APIENTRY glGenRenderbuffers (GLsizei n, GLuint *renderbuffers) + { + ::glGenRenderbuffers (n, renderbuffers); + OpenGl_TRACE(glGenRenderbuffers) + } + + static void APIENTRY glGetActiveAttrib (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLint* size, GLenum *type, GLchar *name) + { + ::glGetActiveAttrib (program, index, bufSize, length, size, type, name); + OpenGl_TRACE(glGetActiveAttrib) + } + + static void APIENTRY glGetActiveUniform (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLint* size, GLenum *type, GLchar *name) + { + ::glGetActiveUniform (program, index, bufSize, length, size, type, name); + OpenGl_TRACE(glGetActiveUniform) + } + + static void APIENTRY glGetAttachedShaders (GLuint program, GLsizei maxCount, GLsizei *count, GLuint *shaders) + { + ::glGetAttachedShaders (program, maxCount, count, shaders); + OpenGl_TRACE(glGetAttachedShaders) + } + + static GLint APIENTRY glGetAttribLocation (GLuint program, const GLchar *name) + { + const GLint aRes = ::glGetAttribLocation (program, name); + OpenGl_TRACE(glGetAttribLocation) + return aRes; + } + + static void APIENTRY glGetFramebufferAttachmentParameteriv (GLenum target, GLenum attachment, GLenum pname, GLint* params) + { + ::glGetFramebufferAttachmentParameteriv (target, attachment, pname, params); + OpenGl_TRACE(glGetFramebufferAttachmentParameteriv) + } + + static void APIENTRY glGetProgramiv (GLuint program, GLenum pname, GLint* params) + { + ::glGetProgramiv (program, pname, params); + OpenGl_TRACE(glGetProgramiv) + } + + static void APIENTRY glGetProgramInfoLog (GLuint program, GLsizei bufSize, GLsizei *length, GLchar *infoLog) + { + ::glGetProgramInfoLog (program, bufSize, length, infoLog); + OpenGl_TRACE(glGetProgramInfoLog) + } + + static void APIENTRY glGetRenderbufferParameteriv (GLenum target, GLenum pname, GLint* params) + { + ::glGetRenderbufferParameteriv (target, pname, params); + OpenGl_TRACE(glGetRenderbufferParameteriv) + } + + static void APIENTRY glGetShaderiv (GLuint shader, GLenum pname, GLint* params) + { + ::glGetShaderiv (shader, pname, params); + OpenGl_TRACE(glGetShaderiv) + } + + static void APIENTRY glGetShaderInfoLog (GLuint shader, GLsizei bufSize, GLsizei *length, GLchar *infoLog) + { + ::glGetShaderInfoLog (shader, bufSize, length, infoLog); + OpenGl_TRACE(glGetShaderInfoLog) + } + + static void APIENTRY glGetShaderPrecisionFormat (GLenum shadertype, GLenum precisiontype, GLint* range, GLint* precision) + { + ::glGetShaderPrecisionFormat (shadertype, precisiontype, range, precision); + OpenGl_TRACE(glGetShaderPrecisionFormat) + } + + static void APIENTRY glGetShaderSource (GLuint shader, GLsizei bufSize, GLsizei *length, GLchar *source) + { + ::glGetShaderSource (shader, bufSize, length, source); + OpenGl_TRACE(glGetShaderSource) + } + + static void APIENTRY glGetUniformfv (GLuint program, GLint location, GLfloat* params) + { + ::glGetUniformfv (program, location, params); + OpenGl_TRACE(glGetUniformfv) + } + + static void APIENTRY glGetUniformiv (GLuint program, GLint location, GLint* params) + { + ::glGetUniformiv (program, location, params); + OpenGl_TRACE(glGetUniformiv) + } + + static GLint APIENTRY glGetUniformLocation (GLuint program, const GLchar *name) + { + const GLint aRes = ::glGetUniformLocation (program, name); + OpenGl_TRACE(glGetUniformLocation) + return aRes; + } + + static void APIENTRY glGetVertexAttribfv (GLuint index, GLenum pname, GLfloat* params) + { + ::glGetVertexAttribfv (index, pname, params); + OpenGl_TRACE(glGetVertexAttribfv) + } + + static void APIENTRY glGetVertexAttribiv (GLuint index, GLenum pname, GLint* params) + { + ::glGetVertexAttribiv (index, pname, params); + OpenGl_TRACE(glGetVertexAttribiv) + } + + static void APIENTRY glGetVertexAttribPointerv (GLuint index, GLenum pname, void* *pointer) + { + ::glGetVertexAttribPointerv (index, pname, pointer); + OpenGl_TRACE(glGetVertexAttribPointerv) + } + + static GLboolean APIENTRY glIsFramebuffer (GLuint framebuffer) + { + return ::glIsFramebuffer (framebuffer); + } + + static GLboolean APIENTRY glIsProgram (GLuint program) + { + return ::glIsProgram (program); + } + + static GLboolean APIENTRY glIsRenderbuffer (GLuint renderbuffer) + { + return ::glIsRenderbuffer (renderbuffer); + } + + static GLboolean APIENTRY glIsShader (GLuint shader) + { + return ::glIsShader (shader); + } + + static void APIENTRY glLinkProgram (GLuint program) + { + ::glLinkProgram (program); + OpenGl_TRACE(glLinkProgram) + } + + static void APIENTRY glReleaseShaderCompiler() + { + ::glReleaseShaderCompiler(); + OpenGl_TRACE(glReleaseShaderCompiler) + } + + static void APIENTRY glRenderbufferStorage (GLenum target, GLenum internalformat, GLsizei width, GLsizei height) + { + ::glRenderbufferStorage (target, internalformat, width, height); + OpenGl_TRACE(glRenderbufferStorage) + } + + static void APIENTRY glShaderBinary (GLsizei count, const GLuint *shaders, GLenum binaryformat, const void* binary, GLsizei length) + { + ::glShaderBinary (count, shaders, binaryformat, binary, length); + OpenGl_TRACE(glShaderBinary) + } + + static void APIENTRY glShaderSource (GLuint shader, GLsizei count, const GLchar *const*string, const GLint* length) + { + ::glShaderSource (shader, count, string, length); + OpenGl_TRACE(glShaderSource) + } + + static void APIENTRY glUniform1f (GLint location, GLfloat v0) + { + ::glUniform1f (location, v0); + OpenGl_TRACE(glUniform1f) + } + + static void APIENTRY glUniform1fv (GLint location, GLsizei count, const GLfloat* value) + { + ::glUniform1fv (location, count, value); + OpenGl_TRACE(glUniform1fv) + } + + static void APIENTRY glUniform1i (GLint location, GLint v0) + { + ::glUniform1i (location, v0); + OpenGl_TRACE(glUniform1i) + } + + static void APIENTRY glUniform1iv (GLint location, GLsizei count, const GLint* value) + { + ::glUniform1iv (location, count, value); + OpenGl_TRACE(glUniform1iv) + } + + static void APIENTRY glUniform2f (GLint location, GLfloat v0, GLfloat v1) + { + ::glUniform2f (location, v0, v1); + OpenGl_TRACE(glUniform2f) + } + + static void APIENTRY glUniform2fv (GLint location, GLsizei count, const GLfloat* value) + { + ::glUniform2fv (location, count, value); + OpenGl_TRACE(glUniform2fv) + } + + static void APIENTRY glUniform2i (GLint location, GLint v0, GLint v1) + { + ::glUniform2i (location, v0, v1); + OpenGl_TRACE(glUniform2i) + } + + static void APIENTRY glUniform2iv (GLint location, GLsizei count, const GLint* value) + { + ::glUniform2iv (location, count, value); + OpenGl_TRACE(glUniform2iv) + } + + static void APIENTRY glUniform3f (GLint location, GLfloat v0, GLfloat v1, GLfloat v2) + { + ::glUniform3f (location, v0, v1, v2); + OpenGl_TRACE(glUniform3f) + } + + static void APIENTRY glUniform3fv (GLint location, GLsizei count, const GLfloat* value) + { + ::glUniform3fv (location, count, value); + OpenGl_TRACE(glUniform3fv) + } + + static void APIENTRY glUniform3i (GLint location, GLint v0, GLint v1, GLint v2) + { + ::glUniform3i (location, v0, v1, v2); + OpenGl_TRACE(glUniform3i) + } + + static void APIENTRY glUniform3iv (GLint location, GLsizei count, const GLint* value) + { + ::glUniform3iv (location, count, value); + OpenGl_TRACE(glUniform3iv) + } + + static void APIENTRY glUniform4f (GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3) + { + ::glUniform4f (location, v0, v1, v2, v3); + OpenGl_TRACE(glUniform4f) + } + + static void APIENTRY glUniform4fv (GLint location, GLsizei count, const GLfloat* value) + { + ::glUniform4fv (location, count, value); + OpenGl_TRACE(glUniform4fv) + } + + static void APIENTRY glUniform4i (GLint location, GLint v0, GLint v1, GLint v2, GLint v3) + { + ::glUniform4i (location, v0, v1, v2, v3); + OpenGl_TRACE(glUniform4i) + } + + static void APIENTRY glUniform4iv (GLint location, GLsizei count, const GLint* value) + { + ::glUniform4iv (location, count, value); + OpenGl_TRACE(glUniform4iv) + } + + static void APIENTRY glUniformMatrix2fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat* value) + { + ::glUniformMatrix2fv (location, count, transpose, value); + OpenGl_TRACE(glUniformMatrix2fv) + } + + static void APIENTRY glUniformMatrix3fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat* value) + { + ::glUniformMatrix3fv (location, count, transpose, value); + OpenGl_TRACE(glUniformMatrix3fv) + } + + static void APIENTRY glUniformMatrix4fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat* value) + { + ::glUniformMatrix4fv (location, count, transpose, value); + OpenGl_TRACE(glUniformMatrix4fv) + } + + static void APIENTRY glUseProgram (GLuint program) + { + ::glUseProgram (program); + OpenGl_TRACE(glUseProgram) + } + + static void APIENTRY glValidateProgram (GLuint program) + { + ::glValidateProgram (program); + OpenGl_TRACE(glValidateProgram) + } + + static void APIENTRY glVertexAttrib1f (GLuint index, GLfloat x) + { + ::glVertexAttrib1f (index, x); + OpenGl_TRACE(glVertexAttrib1f) + } + + static void APIENTRY glVertexAttrib1fv (GLuint index, const GLfloat* v) + { + ::glVertexAttrib1fv (index, v); + OpenGl_TRACE(glVertexAttrib1fv) + } + + static void APIENTRY glVertexAttrib2f (GLuint index, GLfloat x, GLfloat y) + { + ::glVertexAttrib2f (index, x, y); + OpenGl_TRACE(glVertexAttrib2f) + } + + static void APIENTRY glVertexAttrib2fv (GLuint index, const GLfloat* v) + { + ::glVertexAttrib2fv (index, v); + OpenGl_TRACE(glVertexAttrib2fv) + } + + static void APIENTRY glVertexAttrib3f (GLuint index, GLfloat x, GLfloat y, GLfloat z) + { + ::glVertexAttrib3f (index, x, y, z); + OpenGl_TRACE(glVertexAttrib3f) + } + + static void APIENTRY glVertexAttrib3fv (GLuint index, const GLfloat* v) + { + ::glVertexAttrib3fv (index, v); + OpenGl_TRACE(glVertexAttrib3fv) + } + + static void APIENTRY glVertexAttrib4f (GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w) + { + ::glVertexAttrib4f (index, x, y, z, w); + OpenGl_TRACE(glVertexAttrib4f) + } + + static void APIENTRY glVertexAttrib4fv (GLuint index, const GLfloat* v) + { + ::glVertexAttrib4fv (index, v); + OpenGl_TRACE(glVertexAttrib4fv) + } + + static void APIENTRY glVertexAttribPointer (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const void* pointer) + { + ::glVertexAttribPointer (index, size, type, normalized, stride, pointer); + OpenGl_TRACE(glVertexAttribPointer) + } + +#else + // legacy OpenGL 1.1 FFP + + static void APIENTRY glTexEnvi (GLenum target, GLenum pname, GLint param) + { + ::glTexEnvi (target, pname, param); + OpenGl_TRACE(glTexEnvi) + } + + static void APIENTRY glGetTexEnviv (GLenum target, GLenum pname, GLint *params) + { + ::glGetTexEnviv (target, pname, params); + OpenGl_TRACE(glGetTexEnviv) + } + + // Begin/End primitive specification (removed since 3.1) + + static void APIENTRY glColor4fv (const GLfloat* theVec) + { + ::glColor4fv (theVec); + OpenGl_TRACE(glColor4fv) + } + + // Matrix operations (removed since 3.1) + + static void APIENTRY glMatrixMode (GLenum theMode) + { + ::glMatrixMode (theMode); + OpenGl_TRACE(glMatrixMode) + } + + static void APIENTRY glLoadIdentity() + { + ::glLoadIdentity(); + OpenGl_TRACE(glLoadIdentity) + } + + static void APIENTRY glLoadMatrixf (const GLfloat* theMatrix) + { + ::glLoadMatrixf (theMatrix); + OpenGl_TRACE(glLoadMatrixf) + } + + // Line and Polygon stipple (removed since 3.1) + + static void APIENTRY glLineStipple (GLint theFactor, GLushort thePattern) + { + ::glLineStipple (theFactor, thePattern); + OpenGl_TRACE(glLineStipple) + } + + static void APIENTRY glPolygonStipple (const GLubyte* theMask) + { + ::glPolygonStipple (theMask); + OpenGl_TRACE(glPolygonStipple) + } + + // Fixed pipeline lighting (removed since 3.1) + + static void APIENTRY glShadeModel (GLenum theMode) + { + ::glShadeModel (theMode); + OpenGl_TRACE(glShadeModel) + } + + static void APIENTRY glLightf (GLenum theLight, GLenum pname, GLfloat param) + { + ::glLightf (theLight, pname, param); + OpenGl_TRACE(glLightf) + } + + static void APIENTRY glLightfv (GLenum theLight, GLenum pname, const GLfloat* params) + { + ::glLightfv (theLight, pname, params); + OpenGl_TRACE(glLightfv) + } + + static void APIENTRY glLightModeli (GLenum pname, GLint param) + { + ::glLightModeli(pname, param); + OpenGl_TRACE(glLightModeli) + } + + static void APIENTRY glLightModelfv (GLenum pname, const GLfloat* params) + { + ::glLightModelfv(pname, params); + OpenGl_TRACE(glLightModelfv) + } + + static void APIENTRY glMaterialf (GLenum face, GLenum pname, GLfloat param) + { + ::glMaterialf(face, pname, param); + OpenGl_TRACE(glMaterialf) + } + + static void APIENTRY glMaterialfv (GLenum face, GLenum pname, const GLfloat* params) + { + ::glMaterialfv(face, pname, params); + OpenGl_TRACE(glMaterialfv) + } + + static void APIENTRY glColorMaterial (GLenum face, GLenum mode) + { + ::glColorMaterial(face, mode); + OpenGl_TRACE(glColorMaterial) + } + + // clipping plane (removed since 3.1) + + static void APIENTRY glClipPlane (GLenum thePlane, const GLdouble* theEquation) + { + ::glClipPlane (thePlane, theEquation); + OpenGl_TRACE(glClipPlane) + } + + // Display lists (removed since 3.1) + + static void APIENTRY glDeleteLists (GLuint theList, GLsizei theRange) + { + ::glDeleteLists (theList, theRange); + OpenGl_TRACE(glDeleteLists) + } + + static GLuint APIENTRY glGenLists (GLsizei theRange) + { + const GLuint aRes = ::glGenLists (theRange); + OpenGl_TRACE(glGenLists) + return aRes; + } + + static void APIENTRY glNewList (GLuint theList, GLenum theMode) + { + ::glNewList (theList, theMode); + OpenGl_TRACE(glNewList) + } + + static void APIENTRY glEndList() + { + ::glEndList(); + OpenGl_TRACE(glEndList) + } + + static void APIENTRY glCallList (GLuint theList) + { + ::glCallList (theList); + OpenGl_TRACE(glCallList) + } + + static void APIENTRY glCallLists (GLsizei theNb, GLenum theType, const GLvoid* theLists) + { + ::glCallLists (theNb, theType, theLists); + OpenGl_TRACE(glCallLists) + } + + static void APIENTRY glListBase (GLuint theBase) + { + ::glListBase (theBase); + OpenGl_TRACE(glListBase) + } + + // Current raster position and Rectangles (removed since 3.1) + + static void APIENTRY glRasterPos2i (GLint x, GLint y) + { + ::glRasterPos2i (x, y); + OpenGl_TRACE(glRasterPos2i) + } + + static void APIENTRY glRasterPos3fv (const GLfloat* theVec) + { + ::glRasterPos3fv (theVec); + OpenGl_TRACE(glRasterPos3fv) + } + + // Texture mapping (removed since 3.1) + + static void APIENTRY glTexGeni (GLenum coord, GLenum pname, GLint param) + { + ::glTexGeni (coord, pname, param); + OpenGl_TRACE(glTexGeni) + } + + static void APIENTRY glTexGenfv (GLenum coord, GLenum pname, const GLfloat* params) + { + ::glTexGenfv (coord, pname, params); + OpenGl_TRACE(glTexGenfv) + } + + // Pixel copying (removed since 3.1) + + static void APIENTRY glDrawPixels (GLsizei width, GLsizei height, + GLenum format, GLenum type, + const GLvoid* pixels) + { + ::glDrawPixels (width, height, format, type, pixels); + OpenGl_TRACE(glDrawPixels) + } + + static void APIENTRY glCopyPixels (GLint x, GLint y, + GLsizei width, GLsizei height, + GLenum type) + { + ::glCopyPixels (x, y, width, height, type); + OpenGl_TRACE(glCopyPixels) + } + + static void APIENTRY glBitmap (GLsizei width, GLsizei height, + GLfloat xorig, GLfloat yorig, + GLfloat xmove, GLfloat ymove, + const GLubyte* bitmap) + { + ::glBitmap (width, height, xorig, yorig, xmove, ymove, bitmap); + OpenGl_TRACE(glBitmap) + } + + // Edge flags and fixed-function vertex processing (removed since 3.1) + + static void APIENTRY glIndexPointer (GLenum theType, GLsizei theStride, const GLvoid* thePtr) + { + ::glIndexPointer (theType, theStride, thePtr); + OpenGl_TRACE(glIndexPointer) + } + + static void APIENTRY glVertexPointer (GLint theSize, GLenum theType, GLsizei theStride, const GLvoid* thePtr) + { + ::glVertexPointer (theSize, theType, theStride, thePtr); + OpenGl_TRACE(glVertexPointer) + } + + static void APIENTRY glNormalPointer (GLenum theType, GLsizei theStride, const GLvoid* thePtr) + { + ::glNormalPointer (theType, theStride, thePtr); + OpenGl_TRACE(glNormalPointer) + } + + static void APIENTRY glColorPointer (GLint theSize, GLenum theType, GLsizei theStride, const GLvoid* thePtr) + { + ::glColorPointer (theSize, theType, theStride, thePtr); + OpenGl_TRACE(glColorPointer) + } + + static void APIENTRY glTexCoordPointer (GLint theSize, GLenum theType, GLsizei theStride, const GLvoid* thePtr) + { + ::glTexCoordPointer (theSize, theType, theStride, thePtr); + OpenGl_TRACE(glTexCoordPointer) + } + + static void APIENTRY glEnableClientState (GLenum theCap) + { + ::glEnableClientState (theCap); + OpenGl_TRACE(glEnableClientState) + } + + static void APIENTRY glDisableClientState (GLenum theCap) + { + ::glDisableClientState (theCap); + OpenGl_TRACE(glDisableClientState) + } + + static void APIENTRY glPixelTransferi (GLenum pname, GLint param) + { + ::glPixelTransferi (pname, param); + OpenGl_TRACE(glPixelTransferi) + } +#endif +} + +// ======================================================================= +// function : debugPrintError +// purpose : +// ======================================================================= +bool OpenGl_GlFunctions::debugPrintError (const char* theName) +{ + const int anErr = ::glGetError(); + if (anErr != GL_NO_ERROR) + { + Message::SendFail() << theName << "(), unhandled GL error: " << OpenGl_Context::FormatGlError (anErr); + // there is no glSetError(), just emulate non-clear state + switch (anErr) + { + case GL_INVALID_VALUE: + { + ::glLineWidth(-1.0f); + ::glLineWidth( 1.0f); + break; + } + default: + case GL_INVALID_ENUM: + { + ::glEnable (0xFFFF); + break; + } + } + } + return anErr != GL_NO_ERROR; +} + +// ======================================================================= +// function : readGlVersion +// purpose : +// ======================================================================= +void OpenGl_GlFunctions::readGlVersion (Standard_Integer& theGlVerMajor, + Standard_Integer& theGlVerMinor) +{ + // reset values + theGlVerMajor = 0; + theGlVerMinor = 0; + + bool toCheckVer3 = true; +#if defined(__EMSCRIPTEN__) + // WebGL 1.0 prints annoying invalid enumeration warnings to console. + toCheckVer3 = false; + if (EMSCRIPTEN_WEBGL_CONTEXT_HANDLE aWebGlCtx = emscripten_webgl_get_current_context()) + { + EmscriptenWebGLContextAttributes anAttribs = {}; + if (emscripten_webgl_get_context_attributes (aWebGlCtx, &anAttribs) == EMSCRIPTEN_RESULT_SUCCESS) + { + toCheckVer3 = anAttribs.majorVersion >= 2; + } + } +#endif + + // Available since OpenGL 3.0 and OpenGL ES 3.0. + if (toCheckVer3) + { + GLint aMajor = 0, aMinor = 0; + ::glGetIntegerv (GL_MAJOR_VERSION, &aMajor); + ::glGetIntegerv (GL_MINOR_VERSION, &aMinor); + // glGetError() sometimes does not report an error here even if + // GL does not know GL_MAJOR_VERSION and GL_MINOR_VERSION constants. + // This happens on some renderers like e.g. Cygwin MESA. + // Thus checking additionally if GL has put anything to + // the output variables. + if (::glGetError() == GL_NO_ERROR && aMajor != 0 && aMinor != 0) + { + theGlVerMajor = aMajor; + theGlVerMinor = aMinor; + return; + } + for (GLenum anErr = ::glGetError(), aPrevErr = GL_NO_ERROR;; aPrevErr = anErr, anErr = ::glGetError()) + { + if (anErr == GL_NO_ERROR + || anErr == aPrevErr) + { + break; + } + } + } + + // Read version string. + // Notice that only first two numbers split by point '2.1 XXXXX' are significant. + // Following trash (after space) is vendor-specific. + // New drivers also returns micro version of GL like '3.3.0' which has no meaning + // and should be considered as vendor-specific too. + const char* aVerStr = (const char* )::glGetString (GL_VERSION); + if (aVerStr == NULL || *aVerStr == '\0') + { + // invalid GL context + return; + } + +//#if defined(GL_ES_VERSION_2_0) + // skip "OpenGL ES-** " section + for (; *aVerStr != '\0'; ++aVerStr) + { + if (*aVerStr >= '0' && *aVerStr <= '9') + { + break; + } + } +//#endif + + // parse string for major number + char aMajorStr[32]; + char aMinorStr[32]; + size_t aMajIter = 0; + while (aVerStr[aMajIter] >= '0' && aVerStr[aMajIter] <= '9') + { + ++aMajIter; + } + if (aMajIter == 0 || aMajIter >= sizeof(aMajorStr)) + { + return; + } + memcpy (aMajorStr, aVerStr, aMajIter); + aMajorStr[aMajIter] = '\0'; + + // parse string for minor number + aVerStr += aMajIter + 1; + size_t aMinIter = 0; + while (aVerStr[aMinIter] >= '0' && aVerStr[aMinIter] <= '9') + { + ++aMinIter; + } + if (aMinIter == 0 || aMinIter >= sizeof(aMinorStr)) + { + return; + } + memcpy (aMinorStr, aVerStr, aMinIter); + aMinorStr[aMinIter] = '\0'; + + // read numbers + theGlVerMajor = atoi (aMajorStr); + theGlVerMinor = atoi (aMinorStr); +#if defined(__EMSCRIPTEN__) + if (theGlVerMajor >= 3) + { + if (!toCheckVer3 + || ::strstr (aVerStr, "WebGL 1.0") != NULL) + { + Message::SendWarning() << "Warning! OpenGL context reports version " << theGlVerMajor << "." << theGlVerMinor + << " but WebGL 2.0 was unavailable\n" + << "Fallback to OpenGL ES 2.0 will be used instead of reported version"; + theGlVerMajor = 2; + theGlVerMinor = 0; + } + } +#endif + + if (theGlVerMajor <= 0) + { + theGlVerMajor = 0; + theGlVerMinor = 0; + } +} + +// ======================================================================= +// function : load +// purpose : +// ======================================================================= +void OpenGl_GlFunctions::load (OpenGl_Context& theCtx, + Standard_Boolean theIsCoreProfile) +{ +#if !defined(GL_ES_VERSION_2_0) + bool isCoreProfile = false; + if (theCtx.GraphicsLibrary() == Aspect_GraphicsLibrary_OpenGL + && theCtx.IsGlGreaterEqual (3, 2)) + { + isCoreProfile = (theIsCoreProfile == true); + + // detect Core profile + if (!isCoreProfile) + { + GLint aProfile = 0; + ::glGetIntegerv (GL_CONTEXT_PROFILE_MASK, &aProfile); + isCoreProfile = (aProfile & GL_CONTEXT_CORE_PROFILE_BIT) != 0; + } + } +#else + (void )theIsCoreProfile; +#endif + + // set built-in functions + WrapProxyDef5 (glGetIntegerv, glClearColor, glClear, glColorMask, glBlendFunc); + WrapProxyDef5 (glCullFace, glFrontFace, glLineWidth, glPolygonOffset, glScissor); + WrapProxyDef5 (glEnable, glDisable, glIsEnabled, glGetBooleanv, glGetFloatv); + WrapProxyDef5 (glGetIntegerv, glGetError, glGetString, glFinish, glFlush); + WrapProxyDef5 (glHint, glDepthFunc, glDepthMask, glPixelStorei, glClearStencil); + WrapProxyDef5 (glReadPixels, glStencilFunc, glStencilMask, glStencilOp, glTexParameterf); + WrapProxyDef5 (glTexParameterf, glTexParameteri, glTexParameterfv, glTexParameteriv, glGetTexParameterfv); + WrapProxyDef5 (glGetTexParameteriv, glTexImage2D, glGenTextures, glDeleteTextures, glBindTexture); + WrapProxyDef5 (glIsTexture, glTexSubImage2D, glCopyTexImage2D, glCopyTexSubImage2D, glViewport); + WrapProxyProc5 (glDrawArrays, glDrawElements, glMultiDrawElements, glClearDepth, glClearDepthf); + WrapProxyProc5 (glReadBuffer, glDrawBuffer, glGetPointerv, glDepthRange, glDepthRangef); + WrapProxyProc5 (glTexImage1D, glTexSubImage1D, glCopyTexImage1D, glCopyTexSubImage1D, glGetTexImage); + +#if defined(GL_ES_VERSION_2_0) + WrapProxyDef5 (glActiveTexture, glCompressedTexImage2D, glCompressedTexSubImage2D, glBindBuffer, glBufferData); + WrapProxyDef5 (glBufferSubData, glDeleteBuffers, glDepthRangef, glGenBuffers, glGetBufferParameteriv); + WrapProxyDef5 (glIsBuffer, glSampleCoverage, glBlendColor, glBlendEquation, glBlendFuncSeparate); + WrapProxyDef5 (glBlendEquationSeparate, glStencilOpSeparate, glStencilFuncSeparate, glStencilMaskSeparate, glAttachShader); + WrapProxyDef5 (glBindAttribLocation, glBindFramebuffer, glBindRenderbuffer, glCheckFramebufferStatus, glCompileShader); + WrapProxyDef5 (glCreateProgram, glCreateShader, glDeleteFramebuffers, glDeleteProgram, glDeleteRenderbuffers); + WrapProxyDef5 (glDeleteShader, glDetachShader, glDisableVertexAttribArray, glEnableVertexAttribArray, glFramebufferRenderbuffer); + WrapProxyDef5 (glFramebufferTexture2D, glGenerateMipmap, glGenFramebuffers, glGenRenderbuffers, glGetActiveAttrib); + WrapProxyDef5 (glGetActiveUniform, glGetAttachedShaders, glGetAttribLocation, glGetFramebufferAttachmentParameteriv, glGetProgramiv); + WrapProxyDef5 (glGetProgramInfoLog, glGetRenderbufferParameteriv, glGetShaderiv, glGetShaderInfoLog, glGetShaderPrecisionFormat); + WrapProxyDef5 (glGetShaderSource, glGetUniformfv, glGetUniformiv, glGetUniformLocation, glGetVertexAttribfv); + WrapProxyDef5 (glGetVertexAttribiv, glGetVertexAttribPointerv, glIsFramebuffer, glIsProgram, glIsRenderbuffer); + WrapProxyDef5 (glIsShader, glLinkProgram, glReleaseShaderCompiler, glRenderbufferStorage, glShaderBinary); + WrapProxyDef5 (glShaderSource, glUniform1f, glUniform1fv, glUniform1i, glUniform1iv); + WrapProxyDef5 (glUniform2f, glUniform2fv, glUniform2i, glUniform2iv, glUniform3f); + WrapProxyDef5 (glUniform3fv, glUniform3i, glUniform3iv, glUniform4f, glUniform4fv); + WrapProxyDef5 (glUniform4i, glUniform4iv, glUniformMatrix2fv, glUniformMatrix3fv, glUniformMatrix4fv); + WrapProxyDef5 (glUseProgram, glValidateProgram, glVertexAttrib1f, glVertexAttrib1fv, glVertexAttrib2f); + WrapProxyDef5 (glVertexAttrib2fv, glVertexAttrib3f, glVertexAttrib3fv, glVertexAttrib4f, glVertexAttrib4fv); + WrapProxyDef (glVertexAttribPointer); + // empty fallbacks + WrapProxyProc5 (glAlphaFunc, glPointSize, glLogicOp, glPolygonMode, glGetTexLevelParameteriv); + WrapProxyProc (glGetTexLevelParameterfv); +#else + WrapProxyDef5 (glAlphaFunc, glPointSize, glLogicOp, glPolygonMode, glGetTexLevelParameteriv); + WrapProxyDef (glGetTexLevelParameterfv); + if (!isCoreProfile) + { + WrapProxyDef5 (glTexEnvi, glGetTexEnviv, glColor4fv, glMatrixMode, glLoadIdentity); + WrapProxyDef5 (glLoadMatrixf, glLineStipple, glPolygonStipple, glShadeModel, glLightf); + WrapProxyDef5 (glLightfv, glLightModeli, glLightModelfv, glMaterialf, glMaterialfv); + WrapProxyDef5 (glColorMaterial, glClipPlane, glDeleteLists, glGenLists, glNewList); + WrapProxyDef5 (glEndList, glCallList, glCallLists, glListBase, glRasterPos2i); + WrapProxyDef5 (glRasterPos3fv, glTexGeni, glTexGenfv, glDrawPixels, glCopyPixels); + WrapProxyDef5 (glBitmap, glIndexPointer, glVertexPointer, glNormalPointer, glColorPointer); + WrapProxyDef (glTexCoordPointer); + WrapProxyDef (glEnableClientState); + WrapProxyDef (glDisableClientState); + WrapProxyDef (glPixelTransferi); + } +#endif + + if (theCtx.IsGlGreaterEqual (3, 0)) + { + // retrieve auxiliary function in advance + theCtx.FindProc ("glGetStringi", theCtx.myFuncs->glGetStringi); + } + #if defined(GL_ES_VERSION_2_0) - (void )theIsCoreProfile; theCtx.core11ffp = NULL; #else - theCtx.core11ffp = !theIsCoreProfile ? (OpenGl_GlCore11* )this : NULL; + theCtx.core11ffp = !isCoreProfile ? (OpenGl_GlCore11* )this : NULL; #endif theCtx.core11fwd = (OpenGl_GlCore11Fwd* )this; theCtx.core15 = NULL; diff --git a/src/OpenGl/OpenGl_GlFunctions.hxx b/src/OpenGl/OpenGl_GlFunctions.hxx index 3e2f6b64d2..351fe717a3 100644 --- a/src/OpenGl/OpenGl_GlFunctions.hxx +++ b/src/OpenGl/OpenGl_GlFunctions.hxx @@ -16,54 +16,12 @@ #ifndef OpenGl_GlFunctions_HeaderFile #define OpenGl_GlFunctions_HeaderFile -// required for correct APIENTRY definition -#if defined(_WIN32) && !defined(APIENTRY) && !defined(__CYGWIN__) && !defined(__SCITECH_SNAP__) - #define WIN32_LEAN_AND_MEAN - #include -#endif +#include #include #include -#ifndef APIENTRY - #define APIENTRY -#endif -#ifndef APIENTRYP - #define APIENTRYP APIENTRY * -#endif -#ifndef GLAPI - #define GLAPI extern -#endif - -// exclude modern definitions and system-provided glext.h, should be defined before gl.h inclusion -#ifndef GL_GLEXT_LEGACY - #define GL_GLEXT_LEGACY -#endif -#ifndef GLX_GLXEXT_LEGACY - #define GLX_GLXEXT_LEGACY -#endif - -// include main OpenGL header provided with system -#if defined(__APPLE__) - #import - // macOS 10.4 deprecated OpenGL framework - suppress useless warnings - #define GL_SILENCE_DEPRECATION - #if defined(TARGET_OS_IPHONE) && TARGET_OS_IPHONE - #include - #else - #include - #endif - #define __X_GL_H // prevent chaotic gl.h inclusions to avoid compile errors -#elif defined(HAVE_GLES2) || defined(OCCT_UWP) || defined(__ANDROID__) || defined(__QNX__) || defined(__EMSCRIPTEN__) - #if defined(_WIN32) - // Angle OpenGL ES headers do not define function prototypes even for core functions, - // however OCCT is expected to be linked against libGLESv2 - #define GL_GLEXT_PROTOTYPES - #endif - #include -#else - #include -#endif +#include #if !defined(HAVE_EGL) #if defined(__ANDROID__) || defined(__QNX__) || defined(__EMSCRIPTEN__) || defined(HAVE_GLES2) || defined(OCCT_UWP) @@ -74,10 +32,8 @@ #endif struct Aspect_XDisplay; -#if defined(GL_ES_VERSION_2_0) - #include -#else - // GL version can be defined by system gl.h header +// GL version can be defined by system gl.h header +#ifdef GL_VERSION_1_2 #undef GL_VERSION_1_2 #undef GL_VERSION_1_3 #undef GL_VERSION_1_4 @@ -94,10 +50,15 @@ struct Aspect_XDisplay; #undef GL_VERSION_4_3 #undef GL_VERSION_4_4 #undef GL_VERSION_4_5 - - // include glext.h provided by Khronos group - #include #endif +#ifdef GL_COPY_READ_BUFFER_BINDING + // suppress iOS SDK -Wmacro-redefined warnings + #undef GL_DRAW_FRAMEBUFFER_BINDING + #undef GL_COPY_READ_BUFFER_BINDING + #undef GL_COPY_WRITE_BUFFER_BINDING +#endif +// include glext.h provided by Khronos group +#include class OpenGl_Context; @@ -107,864 +68,398 @@ struct OpenGl_GlFunctions //! Check glGetError(); defined for debugging purposes. //! @return TRUE on error - Standard_EXPORT bool debugPrintError (const char* theName) const; + Standard_EXPORT static bool debugPrintError (const char* theName); + + //! Read OpenGL version. + Standard_EXPORT static void readGlVersion (Standard_Integer& theGlVerMajor, + Standard_Integer& theGlVerMinor); //! Load functions. Standard_EXPORT void load (OpenGl_Context& theCtx, Standard_Boolean theIsCoreProfile); - // This debug macros can be enabled to help debugging OpenGL implementations - // without solid / working debugging capabilities. - //#define OpenGl_TRACE(theName) {OpenGl_GlFunctions::debugPrintError(#theName);} - #define OpenGl_TRACE(theName) - -public: //! @name OpenGL ES 1.1 - -#if defined(GL_ES_VERSION_2_0) - - inline void glActiveTexture (GLenum texture) const - { - ::glActiveTexture (texture); - OpenGl_TRACE(glActiveTexture) - } - - inline void glCompressedTexImage2D (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid *data) const - { - ::glCompressedTexImage2D (target, level, internalformat, width, height, border, imageSize, data); - OpenGl_TRACE(glCompressedTexImage2D) - } - - inline void glCompressedTexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid *data) const - { - ::glCompressedTexSubImage2D (target, level, xoffset, yoffset, width, height, format, imageSize, data); - OpenGl_TRACE(glCompressedTexSubImage2D) - } - - inline void glBindBuffer (GLenum target, GLuint buffer) const - { - ::glBindBuffer (target, buffer); - OpenGl_TRACE(glBindBuffer) - } - - inline void glBufferData (GLenum target, GLsizeiptr size, const void* data, GLenum usage) const - { - ::glBufferData (target, size, data, usage); - OpenGl_TRACE(glBufferData) - } - - inline void glBufferSubData (GLenum target, GLintptr offset, GLsizeiptr size, const void* data) const - { - ::glBufferSubData (target, offset, size, data); - OpenGl_TRACE(glBufferSubData) - } - - inline void glDeleteBuffers (GLsizei n, const GLuint *buffers) const - { - ::glDeleteBuffers (n, buffers); - OpenGl_TRACE(glDeleteBuffers) - } - - inline void glDeleteTextures (GLsizei n, const GLuint *textures) const - { - ::glDeleteTextures (n, textures); - OpenGl_TRACE(glDeleteTextures) - } - - inline void glDepthFunc (GLenum func) const - { - ::glDepthFunc (func); - OpenGl_TRACE(glDepthFunc) - } - - inline void glDepthMask (GLboolean flag) const - { - ::glDepthMask (flag); - OpenGl_TRACE(glDepthMask) - } - - inline void glDepthRangef (GLfloat n, GLfloat f) const - { - ::glDepthRangef (n, f); - OpenGl_TRACE(glDepthRangef) - } - - inline void glGenBuffers (GLsizei n, GLuint *buffers) const - { - ::glGenBuffers (n, buffers); - OpenGl_TRACE(glGenBuffers) - } - - inline void glGenTextures (GLsizei n, GLuint *textures) const - { - ::glGenTextures (n, textures); - OpenGl_TRACE(glGenTextures) - } - - inline void glGetBufferParameteriv (GLenum target, GLenum pname, GLint* params) const - { - ::glGetBufferParameteriv (target, pname, params); - OpenGl_TRACE(glGetBufferParameteriv) - } - - inline GLboolean glIsBuffer (GLuint buffer) const - { - return ::glIsBuffer (buffer); - } - - inline void glSampleCoverage (GLfloat value, GLboolean invert) const - { - ::glSampleCoverage (value, invert); - OpenGl_TRACE(glSampleCoverage) - } - - inline void glMultiDrawElements (GLenum theMode, const GLsizei* theCount, GLenum theType, const void* const* theIndices, GLsizei theDrawCount) const - { - if (theCount == NULL - || theIndices == NULL) - { - return; - } - - for (GLsizei aBatchIter = 0; aBatchIter < theDrawCount; ++aBatchIter) - { - ::glDrawElements (theMode, theCount[aBatchIter], theType, theIndices[aBatchIter]); - } - OpenGl_TRACE(glMultiDrawElements) - } +public: //! @name OpenGL 1.1 -#endif + typedef void (APIENTRYP glClearColor_t)(GLclampf theRed, GLclampf theGreen, GLclampf theBlue, GLclampf theAlpha); + glClearColor_t glClearColor; + + typedef void (APIENTRYP glClear_t)(GLbitfield theMask); + glClear_t glClear; + + typedef void (APIENTRYP glColorMask_t)(GLboolean theRed, GLboolean theGreen, GLboolean theBlue, GLboolean theAlpha); + glColorMask_t glColorMask; + + typedef void (APIENTRYP glBlendFunc_t)(GLenum sfactor, GLenum dfactor); + glBlendFunc_t glBlendFunc; + + typedef void (APIENTRYP glCullFace_t)(GLenum theMode); + glCullFace_t glCullFace; + + typedef void (APIENTRYP glFrontFace_t)(GLenum theMode); + glFrontFace_t glFrontFace; + + typedef void (APIENTRYP glLineWidth_t)(GLfloat theWidth); + glLineWidth_t glLineWidth; + + typedef void (APIENTRYP glPolygonOffset_t)(GLfloat theFactor, GLfloat theUnits); + glPolygonOffset_t glPolygonOffset; + + typedef void (APIENTRYP glScissor_t)(GLint theX, GLint theY, GLsizei theWidth, GLsizei theHeight); + glScissor_t glScissor; + + typedef void (APIENTRYP glEnable_t)(GLenum theCap); + glEnable_t glEnable; + + typedef void (APIENTRYP glDisable_t)(GLenum theCap); + glDisable_t glDisable; + + typedef GLboolean (APIENTRYP glIsEnabled_t)(GLenum theCap); + glIsEnabled_t glIsEnabled; + + typedef void (APIENTRYP glGetBooleanv_t)(GLenum theParamName, GLboolean* theValues); + glGetBooleanv_t glGetBooleanv; + + typedef void (APIENTRYP glGetFloatv_t)(GLenum theParamName, GLfloat* theValues); + glGetFloatv_t glGetFloatv; + + typedef void (APIENTRYP glGetIntegerv_t)(GLenum theParamName, GLint* theValues); + glGetIntegerv_t glGetIntegerv; + + typedef GLenum (APIENTRYP glGetError_t)(); + glGetError_t glGetError; + + typedef const GLubyte* (APIENTRYP glGetString_t)(GLenum theName); + glGetString_t glGetString; + + typedef void (APIENTRYP glFinish_t)(); + glFinish_t glFinish; + + typedef void (APIENTRYP glFlush_t)(); + glFlush_t glFlush; + + typedef void (APIENTRYP glHint_t)(GLenum theTarget, GLenum theMode); + glHint_t glHint; + + typedef void (APIENTRYP glGetPointerv_t)(GLenum pname, GLvoid* *params); + glGetPointerv_t glGetPointerv; + + typedef void (APIENTRYP glReadBuffer_t)(GLenum src); // added to OpenGL ES 3.0 + glReadBuffer_t glReadBuffer; + + typedef void (APIENTRYP glDrawBuffer_t)(GLenum mode); // added to OpenGL ES 3.0 + glDrawBuffer_t glDrawBuffer; + + typedef void (APIENTRYP glPixelTransferi_t)(GLenum pname, GLint param); + glPixelTransferi_t glPixelTransferi; + +public: //! @name Depth Buffer + + typedef void (APIENTRYP glClearDepth_t)(GLclampd theDepth); + glClearDepth_t glClearDepth; + + typedef void (APIENTRYP glDepthFunc_t)(GLenum theFunc); + glDepthFunc_t glDepthFunc; + + typedef void (APIENTRYP glDepthMask_t)(GLboolean theFlag); + glDepthMask_t glDepthMask; + + typedef void (APIENTRYP glDepthRange_t)(GLclampd theNearValue, GLclampd theFarValue); + glDepthRange_t glDepthRange; + +public: //! @name Transformation + + typedef void (APIENTRYP glViewport_t)(GLint theX, GLint theY, GLsizei theWidth, GLsizei theHeight); + glViewport_t glViewport; + +public: //! @name Vertex Arrays + + typedef void (APIENTRYP glDrawArrays_t)(GLenum theMode, GLint theFirst, GLsizei theCount); + glDrawArrays_t glDrawArrays; + + typedef void (APIENTRYP glDrawElements_t)(GLenum theMode, GLsizei theCount, GLenum theType, const GLvoid* theIndices); + glDrawElements_t glDrawElements; + +public: //! @name Raster functions + + typedef void (APIENTRYP glPixelStorei_t)(GLenum theParamName, GLint theParam); + glPixelStorei_t glPixelStorei; + + typedef void (APIENTRYP glReadPixels_t)(GLint x, GLint y, + GLsizei width, GLsizei height, + GLenum format, GLenum type, + GLvoid* pixels); + glReadPixels_t glReadPixels; + +public: //! @name Stenciling + + typedef void (APIENTRYP glStencilFunc_t)(GLenum func, GLint ref, GLuint mask); + glStencilFunc_t glStencilFunc; + + typedef void (APIENTRYP glStencilMask_t)(GLuint mask); + glStencilMask_t glStencilMask; + + typedef void (APIENTRYP glStencilOp_t)(GLenum fail, GLenum zfail, GLenum zpass); + glStencilOp_t glStencilOp; + + typedef void (APIENTRYP glClearStencil_t)(GLint s); + glClearStencil_t glClearStencil; + +public: //! @name Texture mapping + + typedef void (APIENTRYP glTexParameterf_t)(GLenum target, GLenum pname, GLfloat param); + glTexParameterf_t glTexParameterf; + + typedef void (APIENTRYP glTexParameteri_t)(GLenum target, GLenum pname, GLint param); + glTexParameteri_t glTexParameteri; + + typedef void (APIENTRYP glTexParameterfv_t)(GLenum target, GLenum pname, const GLfloat* params); + glTexParameterfv_t glTexParameterfv; + + typedef void (APIENTRYP glTexParameteriv_t)(GLenum target, GLenum pname, const GLint* params); + glTexParameteriv_t glTexParameteriv; + + typedef void (APIENTRYP glGetTexParameterfv_t)(GLenum target, GLenum pname, GLfloat* params); + glGetTexParameterfv_t glGetTexParameterfv; + + typedef void (APIENTRYP glGetTexParameteriv_t)(GLenum target, GLenum pname, GLint* params); + glGetTexParameteriv_t glGetTexParameteriv; + + typedef void (APIENTRYP glTexImage2D_t)(GLenum target, GLint level, + GLint internalFormat, + GLsizei width, GLsizei height, + GLint border, GLenum format, GLenum type, + const GLvoid* pixels); + glTexImage2D_t glTexImage2D; + + typedef void (APIENTRYP glGenTextures_t)(GLsizei n, GLuint* textures); + glGenTextures_t glGenTextures; + + typedef void (APIENTRYP glDeleteTextures_t)(GLsizei n, const GLuint* textures); + glDeleteTextures_t glDeleteTextures; -public: //! @name OpenGL ES 2.0 - -#if defined(GL_ES_VERSION_2_0) - inline void glBlendColor (GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha) const - { - ::glBlendColor (red, green, blue, alpha); - OpenGl_TRACE(glBlendColor) - } - - inline void glBlendEquation (GLenum mode) const - { - ::glBlendEquation (mode); - OpenGl_TRACE(glBlendEquation) - } - - inline void glBlendFuncSeparate (GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha) const - { - ::glBlendFuncSeparate (sfactorRGB, dfactorRGB, sfactorAlpha, dfactorAlpha); - OpenGl_TRACE(glBlendFuncSeparate) - } - - inline void glBlendEquationSeparate (GLenum modeRGB, GLenum modeAlpha) const - { - ::glBlendEquationSeparate (modeRGB, modeAlpha); - OpenGl_TRACE(glBlendEquationSeparate) - } - - inline void glStencilOpSeparate (GLenum face, GLenum sfail, GLenum dpfail, GLenum dppass) const - { - ::glStencilOpSeparate (face, sfail, dpfail, dppass); - OpenGl_TRACE(glStencilOpSeparate) - } - - inline void glStencilFuncSeparate (GLenum face, GLenum func, GLint ref, GLuint mask) const - { - ::glStencilFuncSeparate (face, func, ref, mask); - OpenGl_TRACE(glStencilFuncSeparate) - } - - inline void glStencilMaskSeparate (GLenum face, GLuint mask) const - { - ::glStencilMaskSeparate (face, mask); - OpenGl_TRACE(glStencilMaskSeparate) - } - - inline void glAttachShader (GLuint program, GLuint shader) const - { - ::glAttachShader (program, shader); - OpenGl_TRACE(glAttachShader) - } - - inline void glBindAttribLocation (GLuint program, GLuint index, const GLchar *name) const - { - ::glBindAttribLocation (program, index, name); - OpenGl_TRACE(glBindAttribLocation) - } - - inline void glBindFramebuffer (GLenum target, GLuint framebuffer) const - { - ::glBindFramebuffer (target, framebuffer); - OpenGl_TRACE(glBindFramebuffer) - } - - inline void glBindRenderbuffer (GLenum target, GLuint renderbuffer) const - { - ::glBindRenderbuffer (target, renderbuffer); - OpenGl_TRACE(glBindRenderbuffer) - } - - inline GLenum glCheckFramebufferStatus (GLenum target) const - { - return ::glCheckFramebufferStatus (target); - } - - inline void glCompileShader (GLuint shader) const - { - ::glCompileShader (shader); - OpenGl_TRACE(glCompileShader) - } - - inline GLuint glCreateProgram() const - { - return ::glCreateProgram(); - } - - inline GLuint glCreateShader (GLenum type) const - { - return ::glCreateShader (type); - } - - inline void glDeleteFramebuffers (GLsizei n, const GLuint *framebuffers) const - { - ::glDeleteFramebuffers (n, framebuffers); - OpenGl_TRACE(glDeleteFramebuffers) - } - - inline void glDeleteProgram (GLuint program) const - { - ::glDeleteProgram (program); - OpenGl_TRACE(glDeleteProgram) - } - - inline void glDeleteRenderbuffers (GLsizei n, const GLuint *renderbuffers) const - { - ::glDeleteRenderbuffers (n, renderbuffers); - OpenGl_TRACE(glDeleteRenderbuffers) - } - - inline void glDeleteShader (GLuint shader) const - { - ::glDeleteShader (shader); - OpenGl_TRACE(glDeleteShader) - } - - inline void glDetachShader (GLuint program, GLuint shader) const - { - ::glDetachShader (program, shader); - OpenGl_TRACE(glDetachShader) - } - - inline void glDisableVertexAttribArray (GLuint index) const - { - ::glDisableVertexAttribArray (index); - OpenGl_TRACE(glDisableVertexAttribArray) - } - - inline void glEnableVertexAttribArray (GLuint index) const - { - ::glEnableVertexAttribArray (index); - OpenGl_TRACE(glEnableVertexAttribArray) - } - - inline void glFramebufferRenderbuffer (GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer) const - { - ::glFramebufferRenderbuffer (target, attachment, renderbuffertarget, renderbuffer); - OpenGl_TRACE(glFramebufferRenderbuffer) - } - - inline void glFramebufferTexture2D (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level) const - { - ::glFramebufferTexture2D (target, attachment, textarget, texture, level); - OpenGl_TRACE(glFramebufferTexture2D) - } - - inline void glGenerateMipmap (GLenum target) const - { - ::glGenerateMipmap (target); - OpenGl_TRACE(glGenerateMipmap) - } - - inline void glGenFramebuffers (GLsizei n, GLuint *framebuffers) const - { - ::glGenFramebuffers (n, framebuffers); - OpenGl_TRACE(glGenFramebuffers) - } - - inline void glGenRenderbuffers (GLsizei n, GLuint *renderbuffers) const - { - ::glGenRenderbuffers (n, renderbuffers); - OpenGl_TRACE(glGenRenderbuffers) - } - - inline void glGetActiveAttrib (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLint* size, GLenum *type, GLchar *name) const - { - ::glGetActiveAttrib (program, index, bufSize, length, size, type, name); - OpenGl_TRACE(glGetActiveAttrib) - } - - inline void glGetActiveUniform (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLint* size, GLenum *type, GLchar *name) const - { - ::glGetActiveUniform (program, index, bufSize, length, size, type, name); - OpenGl_TRACE(glGetActiveUniform) - } - - inline void glGetAttachedShaders (GLuint program, GLsizei maxCount, GLsizei *count, GLuint *shaders) const - { - ::glGetAttachedShaders (program, maxCount, count, shaders); - OpenGl_TRACE(glGetAttachedShaders) - } - - inline GLint glGetAttribLocation (GLuint program, const GLchar *name) const - { - const GLint aRes = ::glGetAttribLocation (program, name); - OpenGl_TRACE(glGetAttribLocation) - return aRes; - } - - inline void glGetFramebufferAttachmentParameteriv (GLenum target, GLenum attachment, GLenum pname, GLint* params) const - { - ::glGetFramebufferAttachmentParameteriv (target, attachment, pname, params); - OpenGl_TRACE(glGetFramebufferAttachmentParameteriv) - } - - inline void glGetProgramiv (GLuint program, GLenum pname, GLint* params) const - { - ::glGetProgramiv (program, pname, params); - OpenGl_TRACE(glGetProgramiv) - } - - inline void glGetProgramInfoLog (GLuint program, GLsizei bufSize, GLsizei *length, GLchar *infoLog) const - { - ::glGetProgramInfoLog (program, bufSize, length, infoLog); - OpenGl_TRACE(glGetProgramInfoLog) - } - - inline void glGetRenderbufferParameteriv (GLenum target, GLenum pname, GLint* params) const - { - ::glGetRenderbufferParameteriv (target, pname, params); - OpenGl_TRACE(glGetRenderbufferParameteriv) - } - - inline void glGetShaderiv (GLuint shader, GLenum pname, GLint* params) const - { - ::glGetShaderiv (shader, pname, params); - OpenGl_TRACE(glGetShaderiv) - } - - inline void glGetShaderInfoLog (GLuint shader, GLsizei bufSize, GLsizei *length, GLchar *infoLog) const - { - ::glGetShaderInfoLog (shader, bufSize, length, infoLog); - OpenGl_TRACE(glGetShaderInfoLog) - } - - inline void glGetShaderPrecisionFormat (GLenum shadertype, GLenum precisiontype, GLint* range, GLint* precision) const - { - ::glGetShaderPrecisionFormat (shadertype, precisiontype, range, precision); - OpenGl_TRACE(glGetShaderPrecisionFormat) - } - - inline void glGetShaderSource (GLuint shader, GLsizei bufSize, GLsizei *length, GLchar *source) const - { - ::glGetShaderSource (shader, bufSize, length, source); - OpenGl_TRACE(glGetShaderSource) - } - - inline void glGetUniformfv (GLuint program, GLint location, GLfloat* params) const - { - ::glGetUniformfv (program, location, params); - OpenGl_TRACE(glGetUniformfv) - } - - inline void glGetUniformiv (GLuint program, GLint location, GLint* params) const - { - ::glGetUniformiv (program, location, params); - OpenGl_TRACE(glGetUniformiv) - } - - GLint glGetUniformLocation (GLuint program, const GLchar *name) const - { - const GLint aRes = ::glGetUniformLocation (program, name); - OpenGl_TRACE(glGetUniformLocation) - return aRes; - } - - inline void glGetVertexAttribfv (GLuint index, GLenum pname, GLfloat* params) const - { - ::glGetVertexAttribfv (index, pname, params); - OpenGl_TRACE(glGetVertexAttribfv) - } - - inline void glGetVertexAttribiv (GLuint index, GLenum pname, GLint* params) const - { - ::glGetVertexAttribiv (index, pname, params); - OpenGl_TRACE(glGetVertexAttribiv) - } - - inline void glGetVertexAttribPointerv (GLuint index, GLenum pname, void* *pointer) const - { - ::glGetVertexAttribPointerv (index, pname, pointer); - OpenGl_TRACE(glGetVertexAttribPointerv) - } - - inline GLboolean glIsFramebuffer (GLuint framebuffer) const - { - return ::glIsFramebuffer (framebuffer); - } - - inline GLboolean glIsProgram (GLuint program) const - { - return ::glIsProgram (program); - } - - inline GLboolean glIsRenderbuffer (GLuint renderbuffer) const - { - return ::glIsRenderbuffer (renderbuffer); - } - - inline GLboolean glIsShader (GLuint shader) const - { - return ::glIsShader (shader); - } - - inline void glLinkProgram (GLuint program) const - { - ::glLinkProgram (program); - OpenGl_TRACE(glLinkProgram) - } - - inline void glReleaseShaderCompiler() const - { - ::glReleaseShaderCompiler(); - OpenGl_TRACE(glReleaseShaderCompiler) - } - - inline void glRenderbufferStorage (GLenum target, GLenum internalformat, GLsizei width, GLsizei height) const - { - ::glRenderbufferStorage (target, internalformat, width, height); - OpenGl_TRACE(glRenderbufferStorage) - } - - inline void glShaderBinary (GLsizei count, const GLuint *shaders, GLenum binaryformat, const void* binary, GLsizei length) const - { - ::glShaderBinary (count, shaders, binaryformat, binary, length); - OpenGl_TRACE(glShaderBinary) - } - - inline void glShaderSource (GLuint shader, GLsizei count, const GLchar** string, const GLint* length) const - { - ::glShaderSource (shader, count, string, length); - OpenGl_TRACE(glShaderSource) - } - - inline void glUniform1f (GLint location, GLfloat v0) const - { - ::glUniform1f (location, v0); - OpenGl_TRACE(glUniform1f) - } - - inline void glUniform1fv (GLint location, GLsizei count, const GLfloat* value) const - { - ::glUniform1fv (location, count, value); - OpenGl_TRACE(glUniform1fv) - } - - inline void glUniform1i (GLint location, GLint v0) const - { - ::glUniform1i (location, v0); - OpenGl_TRACE(glUniform1i) - } - - inline void glUniform1iv (GLint location, GLsizei count, const GLint* value) const - { - ::glUniform1iv (location, count, value); - OpenGl_TRACE(glUniform1iv) - } - - inline void glUniform2f (GLint location, GLfloat v0, GLfloat v1) const - { - ::glUniform2f (location, v0, v1); - OpenGl_TRACE(glUniform2f) - } - - inline void glUniform2fv (GLint location, GLsizei count, const GLfloat* value) const - { - ::glUniform2fv (location, count, value); - OpenGl_TRACE(glUniform2fv) - } - - inline void glUniform2i (GLint location, GLint v0, GLint v1) const - { - ::glUniform2i (location, v0, v1); - OpenGl_TRACE(glUniform2i) - } - - inline void glUniform2iv (GLint location, GLsizei count, const GLint* value) const - { - ::glUniform2iv (location, count, value); - OpenGl_TRACE(glUniform2iv) - } - - inline void glUniform3f (GLint location, GLfloat v0, GLfloat v1, GLfloat v2) const - { - ::glUniform3f (location, v0, v1, v2); - OpenGl_TRACE(glUniform3f) - } - - inline void glUniform3fv (GLint location, GLsizei count, const GLfloat* value) const - { - ::glUniform3fv (location, count, value); - OpenGl_TRACE(glUniform3fv) - } - - inline void glUniform3i (GLint location, GLint v0, GLint v1, GLint v2) const - { - ::glUniform3i (location, v0, v1, v2); - OpenGl_TRACE(glUniform3i) - } - - inline void glUniform3iv (GLint location, GLsizei count, const GLint* value) const - { - ::glUniform3iv (location, count, value); - OpenGl_TRACE(glUniform3iv) - } - - inline void glUniform4f (GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3) const - { - ::glUniform4f (location, v0, v1, v2, v3); - OpenGl_TRACE(glUniform4f) - } - - inline void glUniform4fv (GLint location, GLsizei count, const GLfloat* value) const - { - ::glUniform4fv (location, count, value); - OpenGl_TRACE(glUniform4fv) - } - - inline void glUniform4i (GLint location, GLint v0, GLint v1, GLint v2, GLint v3) const - { - ::glUniform4i (location, v0, v1, v2, v3); - OpenGl_TRACE(glUniform4i) - } - - inline void glUniform4iv (GLint location, GLsizei count, const GLint* value) const - { - ::glUniform4iv (location, count, value); - OpenGl_TRACE(glUniform4iv) - } - - inline void glUniformMatrix2fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat* value) const - { - ::glUniformMatrix2fv (location, count, transpose, value); - OpenGl_TRACE(glUniformMatrix2fv) - } - - inline void glUniformMatrix3fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat* value) const - { - ::glUniformMatrix3fv (location, count, transpose, value); - OpenGl_TRACE(glUniformMatrix3fv) - } - - inline void glUniformMatrix4fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat* value) const - { - ::glUniformMatrix4fv (location, count, transpose, value); - OpenGl_TRACE(glUniformMatrix4fv) - } - - inline void glUseProgram (GLuint program) const - { - ::glUseProgram (program); - OpenGl_TRACE(glUseProgram) - } - - inline void glValidateProgram (GLuint program) const - { - ::glValidateProgram (program); - OpenGl_TRACE(glValidateProgram) - } - - inline void glVertexAttrib1f (GLuint index, GLfloat x) const - { - ::glVertexAttrib1f (index, x); - OpenGl_TRACE(glVertexAttrib1f) - } - - inline void glVertexAttrib1fv (GLuint index, const GLfloat* v) const - { - ::glVertexAttrib1fv (index, v); - OpenGl_TRACE(glVertexAttrib1fv) - } - - inline void glVertexAttrib2f (GLuint index, GLfloat x, GLfloat y) const - { - ::glVertexAttrib2f (index, x, y); - OpenGl_TRACE(glVertexAttrib2f) - } - - inline void glVertexAttrib2fv (GLuint index, const GLfloat* v) const - { - ::glVertexAttrib2fv (index, v); - OpenGl_TRACE(glVertexAttrib2fv) - } - - inline void glVertexAttrib3f (GLuint index, GLfloat x, GLfloat y, GLfloat z) const - { - ::glVertexAttrib3f (index, x, y, z); - OpenGl_TRACE(glVertexAttrib3f) - } - - inline void glVertexAttrib3fv (GLuint index, const GLfloat* v) const - { - ::glVertexAttrib3fv (index, v); - OpenGl_TRACE(glVertexAttrib3fv) - } - - inline void glVertexAttrib4f (GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w) const - { - ::glVertexAttrib4f (index, x, y, z, w); - OpenGl_TRACE(glVertexAttrib4f) - } - - inline void glVertexAttrib4fv (GLuint index, const GLfloat* v) const - { - ::glVertexAttrib4fv (index, v); - OpenGl_TRACE(glVertexAttrib4fv) - } - - inline void glVertexAttribPointer (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const void* pointer) const - { - ::glVertexAttribPointer (index, size, type, normalized, stride, pointer); - OpenGl_TRACE(glVertexAttribPointer) - } - -public: //! @name OpenGL ES 3.0 - - opencascade::PFNGLREADBUFFERPROC glReadBuffer; - opencascade::PFNGLDRAWRANGEELEMENTSPROC glDrawRangeElements; - opencascade::PFNGLTEXIMAGE3DPROC glTexImage3D; - opencascade::PFNGLTEXSUBIMAGE3DPROC glTexSubImage3D; - opencascade::PFNGLCOPYTEXSUBIMAGE3DPROC glCopyTexSubImage3D; - opencascade::PFNGLCOMPRESSEDTEXIMAGE3DPROC glCompressedTexImage3D; - opencascade::PFNGLCOMPRESSEDTEXSUBIMAGE3DPROC glCompressedTexSubImage3D; - opencascade::PFNGLGENQUERIESPROC glGenQueries; - opencascade::PFNGLDELETEQUERIESPROC glDeleteQueries; - opencascade::PFNGLISQUERYPROC glIsQuery; - opencascade::PFNGLBEGINQUERYPROC glBeginQuery; - opencascade::PFNGLENDQUERYPROC glEndQuery; - opencascade::PFNGLGETQUERYIVPROC glGetQueryiv; - opencascade::PFNGLGETQUERYOBJECTUIVPROC glGetQueryObjectuiv; - opencascade::PFNGLUNMAPBUFFERPROC glUnmapBuffer; - opencascade::PFNGLGETBUFFERPOINTERVPROC glGetBufferPointerv; - opencascade::PFNGLDRAWBUFFERSPROC glDrawBuffers; - opencascade::PFNGLUNIFORMMATRIX2X3FVPROC glUniformMatrix2x3fv; - opencascade::PFNGLUNIFORMMATRIX3X2FVPROC glUniformMatrix3x2fv; - opencascade::PFNGLUNIFORMMATRIX2X4FVPROC glUniformMatrix2x4fv; - opencascade::PFNGLUNIFORMMATRIX4X2FVPROC glUniformMatrix4x2fv; - opencascade::PFNGLUNIFORMMATRIX3X4FVPROC glUniformMatrix3x4fv; - opencascade::PFNGLUNIFORMMATRIX4X3FVPROC glUniformMatrix4x3fv; - opencascade::PFNGLBLITFRAMEBUFFERPROC glBlitFramebuffer; - opencascade::PFNGLRENDERBUFFERSTORAGEMULTISAMPLEPROC glRenderbufferStorageMultisample; - opencascade::PFNGLFRAMEBUFFERTEXTURELAYERPROC glFramebufferTextureLayer; - opencascade::PFNGLMAPBUFFERRANGEPROC glMapBufferRange; - opencascade::PFNGLFLUSHMAPPEDBUFFERRANGEPROC glFlushMappedBufferRange; - opencascade::PFNGLBINDVERTEXARRAYPROC glBindVertexArray; - opencascade::PFNGLDELETEVERTEXARRAYSPROC glDeleteVertexArrays; - opencascade::PFNGLGENVERTEXARRAYSPROC glGenVertexArrays; - opencascade::PFNGLISVERTEXARRAYPROC glIsVertexArray; - opencascade::PFNGLGETINTEGERI_VPROC glGetIntegeri_v; - opencascade::PFNGLBEGINTRANSFORMFEEDBACKPROC glBeginTransformFeedback; - opencascade::PFNGLENDTRANSFORMFEEDBACKPROC glEndTransformFeedback; - opencascade::PFNGLBINDBUFFERRANGEPROC glBindBufferRange; - opencascade::PFNGLBINDBUFFERBASEPROC glBindBufferBase; - opencascade::PFNGLTRANSFORMFEEDBACKVARYINGSPROC glTransformFeedbackVaryings; - opencascade::PFNGLGETTRANSFORMFEEDBACKVARYINGPROC glGetTransformFeedbackVarying; - opencascade::PFNGLVERTEXATTRIBIPOINTERPROC glVertexAttribIPointer; - opencascade::PFNGLGETVERTEXATTRIBIIVPROC glGetVertexAttribIiv; - opencascade::PFNGLGETVERTEXATTRIBIUIVPROC glGetVertexAttribIuiv; - opencascade::PFNGLVERTEXATTRIBI4IPROC glVertexAttribI4i; - opencascade::PFNGLVERTEXATTRIBI4UIPROC glVertexAttribI4ui; - opencascade::PFNGLVERTEXATTRIBI4IVPROC glVertexAttribI4iv; - opencascade::PFNGLVERTEXATTRIBI4UIVPROC glVertexAttribI4uiv; - opencascade::PFNGLGETUNIFORMUIVPROC glGetUniformuiv; - opencascade::PFNGLGETFRAGDATALOCATIONPROC glGetFragDataLocation; - opencascade::PFNGLUNIFORM1UIPROC glUniform1ui; - opencascade::PFNGLUNIFORM2UIPROC glUniform2ui; - opencascade::PFNGLUNIFORM3UIPROC glUniform3ui; - opencascade::PFNGLUNIFORM4UIPROC glUniform4ui; - opencascade::PFNGLUNIFORM1UIVPROC glUniform1uiv; - opencascade::PFNGLUNIFORM2UIVPROC glUniform2uiv; - opencascade::PFNGLUNIFORM3UIVPROC glUniform3uiv; - opencascade::PFNGLUNIFORM4UIVPROC glUniform4uiv; - opencascade::PFNGLCLEARBUFFERIVPROC glClearBufferiv; - opencascade::PFNGLCLEARBUFFERUIVPROC glClearBufferuiv; - opencascade::PFNGLCLEARBUFFERFVPROC glClearBufferfv; - opencascade::PFNGLCLEARBUFFERFIPROC glClearBufferfi; - opencascade::PFNGLGETSTRINGIPROC glGetStringi; - opencascade::PFNGLCOPYBUFFERSUBDATAPROC glCopyBufferSubData; - opencascade::PFNGLGETUNIFORMINDICESPROC glGetUniformIndices; - opencascade::PFNGLGETACTIVEUNIFORMSIVPROC glGetActiveUniformsiv; - opencascade::PFNGLGETUNIFORMBLOCKINDEXPROC glGetUniformBlockIndex; - opencascade::PFNGLGETACTIVEUNIFORMBLOCKIVPROC glGetActiveUniformBlockiv; - opencascade::PFNGLGETACTIVEUNIFORMBLOCKNAMEPROC glGetActiveUniformBlockName; - opencascade::PFNGLUNIFORMBLOCKBINDINGPROC glUniformBlockBinding; - opencascade::PFNGLDRAWARRAYSINSTANCEDPROC glDrawArraysInstanced; - opencascade::PFNGLDRAWELEMENTSINSTANCEDPROC glDrawElementsInstanced; - opencascade::PFNGLFENCESYNCPROC glFenceSync; - opencascade::PFNGLISSYNCPROC glIsSync; - opencascade::PFNGLDELETESYNCPROC glDeleteSync; - opencascade::PFNGLCLIENTWAITSYNCPROC glClientWaitSync; - opencascade::PFNGLWAITSYNCPROC glWaitSync; - opencascade::PFNGLGETINTEGER64VPROC glGetInteger64v; - opencascade::PFNGLGETSYNCIVPROC glGetSynciv; - opencascade::PFNGLGETINTEGER64I_VPROC glGetInteger64i_v; - opencascade::PFNGLGETBUFFERPARAMETERI64VPROC glGetBufferParameteri64v; - opencascade::PFNGLGENSAMPLERSPROC glGenSamplers; - opencascade::PFNGLDELETESAMPLERSPROC glDeleteSamplers; - opencascade::PFNGLISSAMPLERPROC glIsSampler; - opencascade::PFNGLBINDSAMPLERPROC glBindSampler; - opencascade::PFNGLSAMPLERPARAMETERIPROC glSamplerParameteri; - opencascade::PFNGLSAMPLERPARAMETERIVPROC glSamplerParameteriv; - opencascade::PFNGLSAMPLERPARAMETERFPROC glSamplerParameterf; - opencascade::PFNGLSAMPLERPARAMETERFVPROC glSamplerParameterfv; - opencascade::PFNGLGETSAMPLERPARAMETERIVPROC glGetSamplerParameteriv; - opencascade::PFNGLGETSAMPLERPARAMETERFVPROC glGetSamplerParameterfv; - opencascade::PFNGLVERTEXATTRIBDIVISORPROC glVertexAttribDivisor; - opencascade::PFNGLBINDTRANSFORMFEEDBACKPROC glBindTransformFeedback; - opencascade::PFNGLDELETETRANSFORMFEEDBACKSPROC glDeleteTransformFeedbacks; - opencascade::PFNGLGENTRANSFORMFEEDBACKSPROC glGenTransformFeedbacks; - opencascade::PFNGLISTRANSFORMFEEDBACKPROC glIsTransformFeedback; - opencascade::PFNGLPAUSETRANSFORMFEEDBACKPROC glPauseTransformFeedback; - opencascade::PFNGLRESUMETRANSFORMFEEDBACKPROC glResumeTransformFeedback; - opencascade::PFNGLGETPROGRAMBINARYPROC glGetProgramBinary; - opencascade::PFNGLPROGRAMBINARYPROC glProgramBinary; - opencascade::PFNGLPROGRAMPARAMETERIPROC glProgramParameteri; - opencascade::PFNGLINVALIDATEFRAMEBUFFERPROC glInvalidateFramebuffer; - opencascade::PFNGLINVALIDATESUBFRAMEBUFFERPROC glInvalidateSubFramebuffer; - opencascade::PFNGLTEXSTORAGE2DPROC glTexStorage2D; - opencascade::PFNGLTEXSTORAGE3DPROC glTexStorage3D; - opencascade::PFNGLGETINTERNALFORMATIVPROC glGetInternalformativ; - -public: //! @name OpenGL ES 3.1 - - opencascade::PFNGLDISPATCHCOMPUTEPROC glDispatchCompute; - opencascade::PFNGLDISPATCHCOMPUTEINDIRECTPROC glDispatchComputeIndirect; - opencascade::PFNGLDRAWARRAYSINDIRECTPROC glDrawArraysIndirect; - opencascade::PFNGLDRAWELEMENTSINDIRECTPROC glDrawElementsIndirect; - opencascade::PFNGLFRAMEBUFFERPARAMETERIPROC glFramebufferParameteri; - opencascade::PFNGLGETFRAMEBUFFERPARAMETERIVPROC glGetFramebufferParameteriv; - opencascade::PFNGLGETPROGRAMINTERFACEIVPROC glGetProgramInterfaceiv; - opencascade::PFNGLGETPROGRAMRESOURCEINDEXPROC glGetProgramResourceIndex; - opencascade::PFNGLGETPROGRAMRESOURCENAMEPROC glGetProgramResourceName; - opencascade::PFNGLGETPROGRAMRESOURCEIVPROC glGetProgramResourceiv; - opencascade::PFNGLGETPROGRAMRESOURCELOCATIONPROC glGetProgramResourceLocation; - opencascade::PFNGLUSEPROGRAMSTAGESPROC glUseProgramStages; - opencascade::PFNGLACTIVESHADERPROGRAMPROC glActiveShaderProgram; - opencascade::PFNGLCREATESHADERPROGRAMVPROC glCreateShaderProgramv; - opencascade::PFNGLBINDPROGRAMPIPELINEPROC glBindProgramPipeline; - opencascade::PFNGLDELETEPROGRAMPIPELINESPROC glDeleteProgramPipelines; - opencascade::PFNGLGENPROGRAMPIPELINESPROC glGenProgramPipelines; - opencascade::PFNGLISPROGRAMPIPELINEPROC glIsProgramPipeline; - opencascade::PFNGLGETPROGRAMPIPELINEIVPROC glGetProgramPipelineiv; - opencascade::PFNGLPROGRAMUNIFORM1IPROC glProgramUniform1i; - opencascade::PFNGLPROGRAMUNIFORM2IPROC glProgramUniform2i; - opencascade::PFNGLPROGRAMUNIFORM3IPROC glProgramUniform3i; - opencascade::PFNGLPROGRAMUNIFORM4IPROC glProgramUniform4i; - opencascade::PFNGLPROGRAMUNIFORM1UIPROC glProgramUniform1ui; - opencascade::PFNGLPROGRAMUNIFORM2UIPROC glProgramUniform2ui; - opencascade::PFNGLPROGRAMUNIFORM3UIPROC glProgramUniform3ui; - opencascade::PFNGLPROGRAMUNIFORM4UIPROC glProgramUniform4ui; - opencascade::PFNGLPROGRAMUNIFORM1FPROC glProgramUniform1f; - opencascade::PFNGLPROGRAMUNIFORM2FPROC glProgramUniform2f; - opencascade::PFNGLPROGRAMUNIFORM3FPROC glProgramUniform3f; - opencascade::PFNGLPROGRAMUNIFORM4FPROC glProgramUniform4f; - opencascade::PFNGLPROGRAMUNIFORM1IVPROC glProgramUniform1iv; - opencascade::PFNGLPROGRAMUNIFORM2IVPROC glProgramUniform2iv; - opencascade::PFNGLPROGRAMUNIFORM3IVPROC glProgramUniform3iv; - opencascade::PFNGLPROGRAMUNIFORM4IVPROC glProgramUniform4iv; - opencascade::PFNGLPROGRAMUNIFORM1UIVPROC glProgramUniform1uiv; - opencascade::PFNGLPROGRAMUNIFORM2UIVPROC glProgramUniform2uiv; - opencascade::PFNGLPROGRAMUNIFORM3UIVPROC glProgramUniform3uiv; - opencascade::PFNGLPROGRAMUNIFORM4UIVPROC glProgramUniform4uiv; - opencascade::PFNGLPROGRAMUNIFORM1FVPROC glProgramUniform1fv; - opencascade::PFNGLPROGRAMUNIFORM2FVPROC glProgramUniform2fv; - opencascade::PFNGLPROGRAMUNIFORM3FVPROC glProgramUniform3fv; - opencascade::PFNGLPROGRAMUNIFORM4FVPROC glProgramUniform4fv; - opencascade::PFNGLPROGRAMUNIFORMMATRIX2FVPROC glProgramUniformMatrix2fv; - opencascade::PFNGLPROGRAMUNIFORMMATRIX3FVPROC glProgramUniformMatrix3fv; - opencascade::PFNGLPROGRAMUNIFORMMATRIX4FVPROC glProgramUniformMatrix4fv; - opencascade::PFNGLPROGRAMUNIFORMMATRIX2X3FVPROC glProgramUniformMatrix2x3fv; - opencascade::PFNGLPROGRAMUNIFORMMATRIX3X2FVPROC glProgramUniformMatrix3x2fv; - opencascade::PFNGLPROGRAMUNIFORMMATRIX2X4FVPROC glProgramUniformMatrix2x4fv; - opencascade::PFNGLPROGRAMUNIFORMMATRIX4X2FVPROC glProgramUniformMatrix4x2fv; - opencascade::PFNGLPROGRAMUNIFORMMATRIX3X4FVPROC glProgramUniformMatrix3x4fv; - opencascade::PFNGLPROGRAMUNIFORMMATRIX4X3FVPROC glProgramUniformMatrix4x3fv; - opencascade::PFNGLVALIDATEPROGRAMPIPELINEPROC glValidateProgramPipeline; - opencascade::PFNGLGETPROGRAMPIPELINEINFOLOGPROC glGetProgramPipelineInfoLog; - opencascade::PFNGLBINDIMAGETEXTUREPROC glBindImageTexture; - opencascade::PFNGLGETBOOLEANI_VPROC glGetBooleani_v; - opencascade::PFNGLMEMORYBARRIERPROC glMemoryBarrier; - opencascade::PFNGLMEMORYBARRIERBYREGIONPROC glMemoryBarrierByRegion; - opencascade::PFNGLTEXSTORAGE2DMULTISAMPLEPROC glTexStorage2DMultisample; - opencascade::PFNGLGETMULTISAMPLEFVPROC glGetMultisamplefv; - opencascade::PFNGLSAMPLEMASKIPROC glSampleMaski; - opencascade::PFNGLGETTEXLEVELPARAMETERIVPROC glGetTexLevelParameteriv; - opencascade::PFNGLGETTEXLEVELPARAMETERFVPROC glGetTexLevelParameterfv; - opencascade::PFNGLBINDVERTEXBUFFERPROC glBindVertexBuffer; - opencascade::PFNGLVERTEXATTRIBFORMATPROC glVertexAttribFormat; - opencascade::PFNGLVERTEXATTRIBIFORMATPROC glVertexAttribIFormat; - opencascade::PFNGLVERTEXATTRIBBINDINGPROC glVertexAttribBinding; - opencascade::PFNGLVERTEXBINDINGDIVISORPROC glVertexBindingDivisor; + typedef void (APIENTRYP glBindTexture_t)(GLenum target, GLuint texture); + glBindTexture_t glBindTexture; + + typedef GLboolean (APIENTRYP glIsTexture_t)(GLuint texture); + glIsTexture_t glIsTexture; + + typedef void (APIENTRYP glTexSubImage2D_t)(GLenum target, GLint level, + GLint xoffset, GLint yoffset, + GLsizei width, GLsizei height, + GLenum format, GLenum type, + const GLvoid* pixels); + glTexSubImage2D_t glTexSubImage2D; + + typedef void (APIENTRYP glCopyTexImage2D_t)(GLenum target, GLint level, + GLenum internalformat, + GLint x, GLint y, + GLsizei width, GLsizei height, + GLint border); + glCopyTexImage2D_t glCopyTexImage2D; + + typedef void (APIENTRYP glCopyTexSubImage2D_t)(GLenum target, GLint level, + GLint xoffset, GLint yoffset, + GLint x, GLint y, + GLsizei width, GLsizei height); + glCopyTexSubImage2D_t glCopyTexSubImage2D; + +public: // not part of OpenGL ES 2.0 + typedef void (APIENTRYP glTexImage1D_t)(GLenum target, GLint level, + GLint internalFormat, + GLsizei width, GLint border, + GLenum format, GLenum type, + const GLvoid* pixels); + glTexImage1D_t glTexImage1D; + + typedef void (APIENTRYP glTexSubImage1D_t)(GLenum target, GLint level, + GLint xoffset, + GLsizei width, GLenum format, + GLenum type, const GLvoid* pixels); + glTexSubImage1D_t glTexSubImage1D; + + typedef void (APIENTRYP glCopyTexImage1D_t)(GLenum target, GLint level, + GLenum internalformat, + GLint x, GLint y, + GLsizei width, GLint border); + glCopyTexImage1D_t glCopyTexImage1D; + + typedef void (APIENTRYP glCopyTexSubImage1D_t)(GLenum target, GLint level, + GLint xoffset, GLint x, GLint y, + GLsizei width); + glCopyTexSubImage1D_t glCopyTexSubImage1D; + + typedef void (APIENTRYP glGetTexImage_t)(GLenum target, GLint level, + GLenum format, GLenum type, + GLvoid* pixels); + glGetTexImage_t glGetTexImage; + + typedef void (APIENTRYP glAlphaFunc_t)(GLenum theFunc, GLclampf theRef); + glAlphaFunc_t glAlphaFunc; + + typedef void (APIENTRYP glPointSize_t)(GLfloat theSize); + glPointSize_t glPointSize; + +public: //! @name OpenGL 1.1 FFP (obsolete, removed since 3.1) + + typedef void (APIENTRYP glTexEnvi_t)(GLenum target, GLenum pname, GLint param); + glTexEnvi_t glTexEnvi; + + typedef void (APIENTRYP glGetTexEnviv_t)(GLenum target, GLenum pname, GLint *params); + glGetTexEnviv_t glGetTexEnviv; + + typedef void (APIENTRYP glLogicOp_t)(GLenum opcode); + glLogicOp_t glLogicOp; + +public: //! @name Begin/End primitive specification (removed since 3.1) + + typedef void (APIENTRYP glColor4fv_t)(const GLfloat* theVec); + glColor4fv_t glColor4fv; + +public: //! @name Matrix operations (removed since 3.1) + + typedef void (APIENTRYP glMatrixMode_t)(GLenum theMode); + glMatrixMode_t glMatrixMode; + + typedef void (APIENTRYP glLoadIdentity_t)(); + glLoadIdentity_t glLoadIdentity; + + typedef void (APIENTRYP glLoadMatrixf_t)(const GLfloat* theMatrix); + glLoadMatrixf_t glLoadMatrixf; + +public: //! @name Line and Polygon stipple (removed since 3.1) + + typedef void (APIENTRYP glLineStipple_t)(GLint theFactor, GLushort thePattern); + glLineStipple_t glLineStipple; + + typedef void (APIENTRYP glPolygonStipple_t)(const GLubyte* theMask); + glPolygonStipple_t glPolygonStipple; + +public: //! @name Fixed pipeline lighting (removed since 3.1) + + typedef void (APIENTRYP glShadeModel_t)(GLenum theMode); + glShadeModel_t glShadeModel; + + typedef void (APIENTRYP glLightf_t)(GLenum theLight, GLenum pname, GLfloat param); + glLightf_t glLightf; + + typedef void (APIENTRYP glLightfv_t)(GLenum theLight, GLenum pname, const GLfloat* params); + glLightfv_t glLightfv; + + typedef void (APIENTRYP glLightModeli_t)(GLenum pname, GLint param); + glLightModeli_t glLightModeli; + + typedef void (APIENTRYP glLightModelfv_t)(GLenum pname, const GLfloat* params); + glLightModelfv_t glLightModelfv; + + typedef void (APIENTRYP glMaterialf_t)(GLenum face, GLenum pname, GLfloat param); + glMaterialf_t glMaterialf; + + typedef void (APIENTRYP glMaterialfv_t)(GLenum face, GLenum pname, const GLfloat* params); + glMaterialfv_t glMaterialfv; + + typedef void (APIENTRYP glColorMaterial_t)(GLenum face, GLenum mode); + glColorMaterial_t glColorMaterial; + +public: //! @name clipping plane (removed since 3.1) + + typedef void (APIENTRYP glClipPlane_t)(GLenum thePlane, const GLdouble* theEquation); + glClipPlane_t glClipPlane; + +public: //! @name Display lists (removed since 3.1) + + typedef void (APIENTRYP glDeleteLists_t)(GLuint theList, GLsizei theRange); + glDeleteLists_t glDeleteLists; + + typedef GLuint (APIENTRYP glGenLists_t)(GLsizei theRange); + glGenLists_t glGenLists; + + typedef void (APIENTRYP glNewList_t)(GLuint theList, GLenum theMode); + glNewList_t glNewList; + + typedef void (APIENTRYP glEndList_t)(); + glEndList_t glEndList; + + typedef void (APIENTRYP glCallList_t)(GLuint theList); + glCallList_t glCallList; + + typedef void (APIENTRYP glCallLists_t)(GLsizei theNb, GLenum theType, const GLvoid* theLists); + glCallLists_t glCallLists; + + typedef void (APIENTRYP glListBase_t)(GLuint theBase); + glListBase_t glListBase; + +public: //! @name Current raster position and Rectangles (removed since 3.1) + + typedef void (APIENTRYP glRasterPos2i_t)(GLint x, GLint y); + glRasterPos2i_t glRasterPos2i; + + typedef void (APIENTRYP glRasterPos3fv_t)(const GLfloat* theVec); + glRasterPos3fv_t glRasterPos3fv; + +public: //! @name Texture mapping (removed since 3.1) + + typedef void (APIENTRYP glTexGeni_t)(GLenum coord, GLenum pname, GLint param); + glTexGeni_t glTexGeni; + + typedef void (APIENTRYP glTexGenfv_t)(GLenum coord, GLenum pname, const GLfloat* params); + glTexGenfv_t glTexGenfv; + +public: //! @name Pixel copying (removed since 3.1) + + typedef void (APIENTRYP glDrawPixels_t)(GLsizei width, GLsizei height, + GLenum format, GLenum type, + const GLvoid* pixels); + glDrawPixels_t glDrawPixels; + + typedef void (APIENTRYP glCopyPixels_t)(GLint x, GLint y, + GLsizei width, GLsizei height, + GLenum type); + glCopyPixels_t glCopyPixels; + + typedef void (APIENTRYP glBitmap_t)(GLsizei width, GLsizei height, + GLfloat xorig, GLfloat yorig, + GLfloat xmove, GLfloat ymove, + const GLubyte* bitmap); + glBitmap_t glBitmap; + +public: //! @name Edge flags and fixed-function vertex processing (removed since 3.1) + + typedef void (APIENTRYP glIndexPointer_t)(GLenum theType, GLsizei theStride, const GLvoid* thePtr); + glIndexPointer_t glIndexPointer; + + typedef void (APIENTRYP glVertexPointer_t)(GLint theSize, GLenum theType, GLsizei theStride, const GLvoid* thePtr); + glVertexPointer_t glVertexPointer; + + typedef void (APIENTRYP glNormalPointer_t)(GLenum theType, GLsizei theStride, const GLvoid* thePtr); + glNormalPointer_t glNormalPointer; + + typedef void (APIENTRYP glColorPointer_t)(GLint theSize, GLenum theType, GLsizei theStride, const GLvoid* thePtr); + glColorPointer_t glColorPointer; + + typedef void (APIENTRYP glTexCoordPointer_t)(GLint theSize, GLenum theType, GLsizei theStride, const GLvoid* thePtr); + glTexCoordPointer_t glTexCoordPointer; + + typedef void (APIENTRYP glEnableClientState_t)(GLenum theCap); + glEnableClientState_t glEnableClientState; + + typedef void (APIENTRYP glDisableClientState_t)(GLenum theCap); + glDisableClientState_t glDisableClientState; + + typedef void (APIENTRYP glGetTexLevelParameterfv_t)(GLenum target, GLint level, GLenum pname, GLfloat *params); + glGetTexLevelParameterfv_t glGetTexLevelParameterfv; + + typedef void (APIENTRYP glGetTexLevelParameteriv_t)(GLenum target, GLint level, GLenum pname, GLint *params); + glGetTexLevelParameteriv_t glGetTexLevelParameteriv; + + typedef void (APIENTRYP glPolygonMode_t)(GLenum face, GLenum mode); + glPolygonMode_t glPolygonMode; public: //! @name OpenGL ES 3.2 + typedef void (APIENTRYP glBlendBarrier_t) (void); + glBlendBarrier_t glBlendBarrier; - opencascade::PFNGLBLENDBARRIERPROC glBlendBarrier; - opencascade::PFNGLCOPYIMAGESUBDATAPROC glCopyImageSubData; - opencascade::PFNGLPUSHDEBUGGROUPPROC glPushDebugGroup; - opencascade::PFNGLPOPDEBUGGROUPPROC glPopDebugGroup; - opencascade::PFNGLOBJECTLABELPROC glObjectLabel; - opencascade::PFNGLGETOBJECTLABELPROC glGetObjectLabel; - opencascade::PFNGLOBJECTPTRLABELPROC glObjectPtrLabel; - opencascade::PFNGLGETOBJECTPTRLABELPROC glGetObjectPtrLabel; - opencascade::PFNGLGETPOINTERVPROC glGetPointerv; - opencascade::PFNGLENABLEIPROC glEnablei; - opencascade::PFNGLDISABLEIPROC glDisablei; - opencascade::PFNGLBLENDEQUATIONIPROC glBlendEquationi; - opencascade::PFNGLBLENDEQUATIONSEPARATEIPROC glBlendEquationSeparatei; - opencascade::PFNGLBLENDFUNCIPROC glBlendFunci; - opencascade::PFNGLBLENDFUNCSEPARATEIPROC glBlendFuncSeparatei; - opencascade::PFNGLCOLORMASKIPROC glColorMaski; - opencascade::PFNGLISENABLEDIPROC glIsEnabledi; - opencascade::PFNGLDRAWELEMENTSBASEVERTEXPROC glDrawElementsBaseVertex; - opencascade::PFNGLDRAWRANGEELEMENTSBASEVERTEXPROC glDrawRangeElementsBaseVertex; - opencascade::PFNGLDRAWELEMENTSINSTANCEDBASEVERTEXPROC glDrawElementsInstancedBaseVertex; - opencascade::PFNGLFRAMEBUFFERTEXTUREPROC glFramebufferTexture; - opencascade::PFNGLPRIMITIVEBOUNDINGBOXPROC glPrimitiveBoundingBox; - opencascade::PFNGLGETGRAPHICSRESETSTATUSPROC glGetGraphicsResetStatus; - opencascade::PFNGLREADNPIXELSPROC glReadnPixels; - opencascade::PFNGLGETNUNIFORMFVPROC glGetnUniformfv; - opencascade::PFNGLGETNUNIFORMIVPROC glGetnUniformiv; - opencascade::PFNGLGETNUNIFORMUIVPROC glGetnUniformuiv; - opencascade::PFNGLMINSAMPLESHADINGPROC glMinSampleShading; - opencascade::PFNGLPATCHPARAMETERIPROC glPatchParameteri; - opencascade::PFNGLTEXPARAMETERIIVPROC glTexParameterIiv; - opencascade::PFNGLTEXPARAMETERIUIVPROC glTexParameterIuiv; - opencascade::PFNGLGETTEXPARAMETERIIVPROC glGetTexParameterIiv; - opencascade::PFNGLGETTEXPARAMETERIUIVPROC glGetTexParameterIuiv; - opencascade::PFNGLSAMPLERPARAMETERIIVPROC glSamplerParameterIiv; - opencascade::PFNGLSAMPLERPARAMETERIUIVPROC glSamplerParameterIuiv; - opencascade::PFNGLGETSAMPLERPARAMETERIIVPROC glGetSamplerParameterIiv; - opencascade::PFNGLGETSAMPLERPARAMETERIUIVPROC glGetSamplerParameterIuiv; - opencascade::PFNGLTEXBUFFERPROC glTexBuffer; - opencascade::PFNGLTEXBUFFERRANGEPROC glTexBufferRange; - opencascade::PFNGLTEXSTORAGE3DMULTISAMPLEPROC glTexStorage3DMultisample; - -public: //! @name GL_KHR_debug (optional) or OpenGL ES 3.2+ - - opencascade::PFNGLDEBUGMESSAGECONTROLPROC glDebugMessageControl; - opencascade::PFNGLDEBUGMESSAGEINSERTPROC glDebugMessageInsert; - opencascade::PFNGLDEBUGMESSAGECALLBACKPROC glDebugMessageCallback; - opencascade::PFNGLGETDEBUGMESSAGELOGPROC glGetDebugMessageLog; - -#else // OpenGL ES vs. desktop + typedef void (APIENTRYP glPrimitiveBoundingBox_t) (GLfloat minX, GLfloat minY, GLfloat minZ, GLfloat minW, GLfloat maxX, GLfloat maxY, GLfloat maxZ, GLfloat maxW); + glPrimitiveBoundingBox_t glPrimitiveBoundingBox; public: //! @name OpenGL 1.2 @@ -1942,8 +1437,6 @@ public: //! @name glX extensions glXQueryCurrentRendererStringMESA_t glXQueryCurrentRendererStringMESA; #endif -#endif // OpenGL ES vs. desktop - }; #endif // _OpenGl_GlFunctions_Header diff --git a/src/OpenGl/OpenGl_GlNative.hxx b/src/OpenGl/OpenGl_GlNative.hxx new file mode 100644 index 0000000000..f65e33eb0a --- /dev/null +++ b/src/OpenGl/OpenGl_GlNative.hxx @@ -0,0 +1,67 @@ +// Copyright (c) 2021 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 OpenGl_GlNative_HeaderFile +#define OpenGl_GlNative_HeaderFile + +// required for correct APIENTRY definition +#if defined(_WIN32) && !defined(APIENTRY) && !defined(__CYGWIN__) && !defined(__SCITECH_SNAP__) + #define WIN32_LEAN_AND_MEAN + #include +#endif + +#ifndef APIENTRY + #define APIENTRY +#endif +#ifndef APIENTRYP + #define APIENTRYP APIENTRY * +#endif +#ifndef GLAPI + #define GLAPI extern +#endif + +#ifndef GL_APICALL + #define GL_APICALL GLAPI +#endif + +// exclude modern definitions and system-provided glext.h, should be defined before gl.h inclusion +#ifndef GL_GLEXT_LEGACY + #define GL_GLEXT_LEGACY +#endif +#ifndef GLX_GLXEXT_LEGACY + #define GLX_GLXEXT_LEGACY +#endif + +// include main OpenGL header provided with system +#if defined(__APPLE__) + #import + // macOS 10.4 deprecated OpenGL framework - suppress useless warnings + #define GL_SILENCE_DEPRECATION + #if defined(TARGET_OS_IPHONE) && TARGET_OS_IPHONE + #include + #else + #include + #endif + #define __X_GL_H // prevent chaotic gl.h inclusions to avoid compile errors +#elif defined(HAVE_GLES2) || defined(OCCT_UWP) || defined(__ANDROID__) || defined(__QNX__) || defined(__EMSCRIPTEN__) + #if defined(_WIN32) + // Angle OpenGL ES headers do not define function prototypes even for core functions, + // however OCCT is expected to be linked against libGLESv2 + #define GL_GLEXT_PROTOTYPES + #endif + #include +#else + #include +#endif + +#endif // OpenGl_GlNative_HeaderFile diff --git a/src/OpenGl/OpenGl_GlTypes.hxx b/src/OpenGl/OpenGl_GlTypes.hxx new file mode 100644 index 0000000000..1de86a6131 --- /dev/null +++ b/src/OpenGl/OpenGl_GlTypes.hxx @@ -0,0 +1,345 @@ +// Copyright (c) 2021 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 OpenGl_GlTypes_HeaderFile +#define OpenGl_GlTypes_HeaderFile + +#include + +typedef khronos_int8_t GLbyte; +typedef khronos_float_t GLclampf; +typedef khronos_int32_t GLfixed; +typedef short GLshort; +typedef unsigned short GLushort; +typedef void GLvoid; +typedef struct __GLsync *GLsync; +typedef khronos_int64_t GLint64; +typedef khronos_uint64_t GLuint64; +typedef unsigned int GLenum; +typedef unsigned int GLuint; +typedef char GLchar; +typedef khronos_float_t GLfloat; +typedef khronos_ssize_t GLsizeiptr; +typedef khronos_intptr_t GLintptr; +typedef unsigned int GLbitfield; +typedef int GLint; +typedef unsigned char GLboolean; +typedef int GLsizei; +typedef khronos_uint8_t GLubyte; + +typedef double GLdouble; +typedef double GLclampd; + +#define GL_NONE 0 + +#define GL_DEPTH_BUFFER_BIT 0x00000100 +#define GL_STENCIL_BUFFER_BIT 0x00000400 +#define GL_COLOR_BUFFER_BIT 0x00004000 +#define GL_FALSE 0 +#define GL_TRUE 1 +#define GL_POINTS 0x0000 +#define GL_LINES 0x0001 +#define GL_LINE_LOOP 0x0002 +#define GL_LINE_STRIP 0x0003 +#define GL_TRIANGLES 0x0004 +#define GL_TRIANGLE_STRIP 0x0005 +#define GL_TRIANGLE_FAN 0x0006 +#define GL_ZERO 0 +#define GL_ONE 1 +#define GL_SRC_COLOR 0x0300 +#define GL_ONE_MINUS_SRC_COLOR 0x0301 +#define GL_SRC_ALPHA 0x0302 +#define GL_ONE_MINUS_SRC_ALPHA 0x0303 +#define GL_DST_ALPHA 0x0304 +#define GL_ONE_MINUS_DST_ALPHA 0x0305 +#define GL_DST_COLOR 0x0306 +#define GL_ONE_MINUS_DST_COLOR 0x0307 +#define GL_SRC_ALPHA_SATURATE 0x0308 +#define GL_FUNC_ADD 0x8006 +#define GL_BLEND_EQUATION 0x8009 +#define GL_BLEND_EQUATION_RGB 0x8009 +#define GL_BLEND_EQUATION_ALPHA 0x883D +#define GL_FUNC_SUBTRACT 0x800A +#define GL_FUNC_REVERSE_SUBTRACT 0x800B +#define GL_BLEND_DST_RGB 0x80C8 +#define GL_BLEND_SRC_RGB 0x80C9 +#define GL_BLEND_DST_ALPHA 0x80CA +#define GL_BLEND_SRC_ALPHA 0x80CB +#define GL_CONSTANT_COLOR 0x8001 +#define GL_ONE_MINUS_CONSTANT_COLOR 0x8002 +#define GL_CONSTANT_ALPHA 0x8003 +#define GL_ONE_MINUS_CONSTANT_ALPHA 0x8004 +#define GL_BLEND_COLOR 0x8005 +#define GL_ARRAY_BUFFER 0x8892 +#define GL_ELEMENT_ARRAY_BUFFER 0x8893 +#define GL_ARRAY_BUFFER_BINDING 0x8894 +#define GL_ELEMENT_ARRAY_BUFFER_BINDING 0x8895 +#define GL_STREAM_DRAW 0x88E0 +#define GL_STATIC_DRAW 0x88E4 +#define GL_DYNAMIC_DRAW 0x88E8 +#define GL_BUFFER_SIZE 0x8764 +#define GL_BUFFER_USAGE 0x8765 +#define GL_CURRENT_VERTEX_ATTRIB 0x8626 + +#define GL_FRONT_LEFT 0x0400 +#define GL_FRONT_RIGHT 0x0401 +#define GL_BACK_LEFT 0x0402 +#define GL_BACK_RIGHT 0x0403 +#define GL_FRONT 0x0404 +#define GL_BACK 0x0405 +#define GL_LEFT 0x0406 +#define GL_RIGHT 0x0407 +#define GL_FRONT_AND_BACK 0x0408 + +#define GL_TEXTURE_2D 0x0DE1 +#define GL_CULL_FACE 0x0B44 +#define GL_BLEND 0x0BE2 +#define GL_DITHER 0x0BD0 +#define GL_STENCIL_TEST 0x0B90 +#define GL_DEPTH_TEST 0x0B71 +#define GL_SCISSOR_TEST 0x0C11 + +#define GL_POLYGON_OFFSET_FACTOR 0x8038 +#define GL_POLYGON_OFFSET_UNITS 0x2A00 +#define GL_POLYGON_OFFSET_POINT 0x2A01 +#define GL_POLYGON_OFFSET_LINE 0x2A02 +#define GL_POLYGON_OFFSET_FILL 0x8037 + +#define GL_SAMPLE_ALPHA_TO_COVERAGE 0x809E +#define GL_SAMPLE_COVERAGE 0x80A0 +#define GL_NO_ERROR 0 +#define GL_INVALID_ENUM 0x0500 +#define GL_INVALID_VALUE 0x0501 +#define GL_INVALID_OPERATION 0x0502 +#define GL_OUT_OF_MEMORY 0x0505 +#define GL_CW 0x0900 +#define GL_CCW 0x0901 +#define GL_LINE_WIDTH 0x0B21 +#define GL_ALIASED_POINT_SIZE_RANGE 0x846D +#define GL_ALIASED_LINE_WIDTH_RANGE 0x846E +#define GL_CULL_FACE_MODE 0x0B45 +#define GL_FRONT_FACE 0x0B46 +#define GL_DEPTH_RANGE 0x0B70 +#define GL_DEPTH_WRITEMASK 0x0B72 +#define GL_DEPTH_CLEAR_VALUE 0x0B73 +#define GL_DEPTH_FUNC 0x0B74 +#define GL_STENCIL_CLEAR_VALUE 0x0B91 +#define GL_STENCIL_FUNC 0x0B92 +#define GL_STENCIL_FAIL 0x0B94 +#define GL_STENCIL_PASS_DEPTH_FAIL 0x0B95 +#define GL_STENCIL_PASS_DEPTH_PASS 0x0B96 +#define GL_STENCIL_REF 0x0B97 +#define GL_STENCIL_VALUE_MASK 0x0B93 +#define GL_STENCIL_WRITEMASK 0x0B98 +#define GL_STENCIL_BACK_FUNC 0x8800 +#define GL_STENCIL_BACK_FAIL 0x8801 +#define GL_STENCIL_BACK_PASS_DEPTH_FAIL 0x8802 +#define GL_STENCIL_BACK_PASS_DEPTH_PASS 0x8803 +#define GL_STENCIL_BACK_REF 0x8CA3 +#define GL_STENCIL_BACK_VALUE_MASK 0x8CA4 +#define GL_STENCIL_BACK_WRITEMASK 0x8CA5 + +#define GL_VIEWPORT 0x0BA2 +#define GL_SCISSOR_BOX 0x0C10 +#define GL_COLOR_CLEAR_VALUE 0x0C22 +#define GL_COLOR_WRITEMASK 0x0C23 + +#define GL_UNPACK_LSB_FIRST 0x0CF1 // only desktop +#define GL_UNPACK_ROW_LENGTH 0x0CF2 +#define GL_UNPACK_SKIP_ROWS 0x0CF3 +#define GL_UNPACK_SKIP_PIXELS 0x0CF4 +#define GL_UNPACK_ALIGNMENT 0x0CF5 +#define GL_PACK_LSB_FIRST 0x0D01 // only desktop +#define GL_PACK_ROW_LENGTH 0x0D02 +#define GL_PACK_SKIP_ROWS 0x0D03 +#define GL_PACK_SKIP_PIXELS 0x0D04 +#define GL_PACK_ALIGNMENT 0x0D05 + +#define GL_MAX_TEXTURE_SIZE 0x0D33 +#define GL_MAX_VIEWPORT_DIMS 0x0D3A +#define GL_SUBPIXEL_BITS 0x0D50 +#define GL_RED_BITS 0x0D52 +#define GL_GREEN_BITS 0x0D53 +#define GL_BLUE_BITS 0x0D54 +#define GL_ALPHA_BITS 0x0D55 +#define GL_DEPTH_BITS 0x0D56 +#define GL_STENCIL_BITS 0x0D57 +#define GL_POLYGON_OFFSET_UNITS 0x2A00 +#define GL_POLYGON_OFFSET_FACTOR 0x8038 +#define GL_TEXTURE_BINDING_2D 0x8069 +#define GL_SAMPLE_BUFFERS 0x80A8 +#define GL_SAMPLES 0x80A9 +#define GL_SAMPLE_COVERAGE_VALUE 0x80AA +#define GL_SAMPLE_COVERAGE_INVERT 0x80AB +#define GL_NUM_COMPRESSED_TEXTURE_FORMATS 0x86A2 +#define GL_COMPRESSED_TEXTURE_FORMATS 0x86A3 +#define GL_DONT_CARE 0x1100 +#define GL_FASTEST 0x1101 +#define GL_NICEST 0x1102 +#define GL_GENERATE_MIPMAP_HINT 0x8192 +#define GL_BYTE 0x1400 +#define GL_UNSIGNED_BYTE 0x1401 +#define GL_SHORT 0x1402 +#define GL_UNSIGNED_SHORT 0x1403 +#define GL_INT 0x1404 +#define GL_UNSIGNED_INT 0x1405 +#define GL_FLOAT 0x1406 +#define GL_FIXED 0x140C +#define GL_DEPTH_COMPONENT 0x1902 +#define GL_ALPHA 0x1906 +#define GL_RGB 0x1907 +#define GL_RGBA 0x1908 +#define GL_LUMINANCE 0x1909 +#define GL_LUMINANCE_ALPHA 0x190A + +#define GL_NEVER 0x0200 +#define GL_LESS 0x0201 +#define GL_EQUAL 0x0202 +#define GL_LEQUAL 0x0203 +#define GL_GREATER 0x0204 +#define GL_NOTEQUAL 0x0205 +#define GL_GEQUAL 0x0206 +#define GL_ALWAYS 0x0207 +#define GL_KEEP 0x1E00 +#define GL_REPLACE 0x1E01 +#define GL_INCR 0x1E02 +#define GL_DECR 0x1E03 +#define GL_INVERT 0x150A +#define GL_INCR_WRAP 0x8507 +#define GL_DECR_WRAP 0x8508 +#define GL_VENDOR 0x1F00 +#define GL_RENDERER 0x1F01 +#define GL_VERSION 0x1F02 +#define GL_EXTENSIONS 0x1F03 +#define GL_NEAREST 0x2600 +#define GL_LINEAR 0x2601 +#define GL_NEAREST_MIPMAP_NEAREST 0x2700 +#define GL_LINEAR_MIPMAP_NEAREST 0x2701 +#define GL_NEAREST_MIPMAP_LINEAR 0x2702 +#define GL_LINEAR_MIPMAP_LINEAR 0x2703 +#define GL_TEXTURE_MAG_FILTER 0x2800 +#define GL_TEXTURE_MIN_FILTER 0x2801 +#define GL_TEXTURE_WRAP_S 0x2802 +#define GL_TEXTURE_WRAP_T 0x2803 +#define GL_TEXTURE 0x1702 +#define GL_TEXTURE_CUBE_MAP 0x8513 +#define GL_TEXTURE_BINDING_CUBE_MAP 0x8514 +#define GL_TEXTURE_CUBE_MAP_POSITIVE_X 0x8515 +#define GL_TEXTURE_CUBE_MAP_NEGATIVE_X 0x8516 +#define GL_TEXTURE_CUBE_MAP_POSITIVE_Y 0x8517 +#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Y 0x8518 +#define GL_TEXTURE_CUBE_MAP_POSITIVE_Z 0x8519 +#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Z 0x851A +#define GL_MAX_CUBE_MAP_TEXTURE_SIZE 0x851C +#define GL_TEXTURE0 0x84C0 +#define GL_TEXTURE1 0x84C1 +#define GL_TEXTURE2 0x84C2 +#define GL_TEXTURE3 0x84C3 +#define GL_TEXTURE4 0x84C4 +#define GL_TEXTURE5 0x84C5 +#define GL_TEXTURE6 0x84C6 +#define GL_TEXTURE7 0x84C7 +#define GL_TEXTURE8 0x84C8 +#define GL_TEXTURE9 0x84C9 +#define GL_TEXTURE10 0x84CA +#define GL_TEXTURE11 0x84CB +#define GL_TEXTURE12 0x84CC +#define GL_TEXTURE13 0x84CD +#define GL_TEXTURE14 0x84CE +#define GL_TEXTURE15 0x84CF +#define GL_TEXTURE16 0x84D0 +#define GL_TEXTURE17 0x84D1 +#define GL_TEXTURE18 0x84D2 +#define GL_TEXTURE19 0x84D3 +#define GL_TEXTURE20 0x84D4 +#define GL_TEXTURE21 0x84D5 +#define GL_TEXTURE22 0x84D6 +#define GL_TEXTURE23 0x84D7 +#define GL_TEXTURE24 0x84D8 +#define GL_TEXTURE25 0x84D9 +#define GL_TEXTURE26 0x84DA +#define GL_TEXTURE27 0x84DB +#define GL_TEXTURE28 0x84DC +#define GL_TEXTURE29 0x84DD +#define GL_TEXTURE30 0x84DE +#define GL_TEXTURE31 0x84DF +#define GL_ACTIVE_TEXTURE 0x84E0 +#define GL_CLAMP 0x2900 +#define GL_REPEAT 0x2901 +#define GL_CLAMP_TO_EDGE 0x812F +#define GL_MIRRORED_REPEAT 0x8370 +#define GL_FLOAT_VEC2 0x8B50 +#define GL_FLOAT_VEC3 0x8B51 +#define GL_FLOAT_VEC4 0x8B52 +#define GL_INT_VEC2 0x8B53 +#define GL_INT_VEC3 0x8B54 +#define GL_INT_VEC4 0x8B55 +#define GL_BOOL 0x8B56 +#define GL_BOOL_VEC2 0x8B57 +#define GL_BOOL_VEC3 0x8B58 +#define GL_BOOL_VEC4 0x8B59 +#define GL_FLOAT_MAT2 0x8B5A +#define GL_FLOAT_MAT3 0x8B5B +#define GL_FLOAT_MAT4 0x8B5C +#define GL_SAMPLER_2D 0x8B5E +#define GL_SAMPLER_CUBE 0x8B60 + +#define GL_COLOR 0x1800 +#define GL_DEPTH 0x1801 +#define GL_STENCIL 0x1802 +#define GL_RED 0x1903 +#define GL_RGB8 0x8051 +#define GL_RGBA8 0x8058 + +// in core since OpenGL ES 3.0, extension GL_OES_rgb8_rgba8 +#define GL_LUMINANCE8 0x8040 +// GL_EXT_texture_format_BGRA8888 +#define GL_BGRA_EXT 0x80E1 // same as GL_BGRA on desktop + +#define GL_R16 0x822A +#define GL_RGB4 0x804F +#define GL_RGB5 0x8050 +#define GL_RGB10 0x8052 +#define GL_RGB12 0x8053 +#define GL_RGB16 0x8054 +#define GL_RGB10_A2 0x8059 +#define GL_RGBA12 0x805A +#define GL_RGBA16 0x805B +#define GL_ALPHA8 0x803C +#define GL_ALPHA16 0x803E +#define GL_RG16 0x822C + +#define GL_R16_SNORM 0x8F98 +#define GL_RG16_SNORM 0x8F99 +#define GL_RGB16_SNORM 0x8F9A +#define GL_RGBA16_SNORM 0x8F9B + +#define GL_RED_SNORM 0x8F90 +#define GL_RG_SNORM 0x8F91 +#define GL_RGB_SNORM 0x8F92 +#define GL_RGBA_SNORM 0x8F93 + +#define GL_DRAW_BUFFER 0x0C01 +#define GL_READ_BUFFER 0x0C02 +#define GL_DOUBLEBUFFER 0x0C32 +#define GL_STEREO 0x0C33 + +#define GL_PROXY_TEXTURE_2D 0x8064 +#define GL_TEXTURE_WIDTH 0x1000 +#define GL_TEXTURE_HEIGHT 0x1001 +#define GL_TEXTURE_INTERNAL_FORMAT 0x1003 + +// OpenGL ES 3.0+ or OES_texture_half_float +#define GL_HALF_FLOAT_OES 0x8D61 + +#endif // OpenGl_GlTypes_HeaderFile diff --git a/src/OpenGl/OpenGl_GraphicDriver.cxx b/src/OpenGl/OpenGl_GraphicDriver.cxx index b98795d318..448f53642b 100644 --- a/src/OpenGl/OpenGl_GraphicDriver.cxx +++ b/src/OpenGl/OpenGl_GraphicDriver.cxx @@ -14,7 +14,7 @@ // commercial license or contractual agreement. #if defined(_WIN32) - #include + #include // for UWP #endif #include @@ -59,6 +59,10 @@ IMPLEMENT_STANDARD_RTTIEXT(OpenGl_GraphicDriver,Graphic3d_GraphicDriver) #endif #endif +#if defined(HAVE_GLES2) || defined(OCCT_UWP) || defined(__ANDROID__) || defined(__QNX__) || defined(__EMSCRIPTEN__) || (defined(TARGET_OS_IPHONE) && TARGET_OS_IPHONE) + #define OpenGl_USE_GLES2 +#endif + namespace { static const Handle(OpenGl_Context) TheNullGlCtx; @@ -75,7 +79,7 @@ namespace EGL_ALPHA_SIZE, 0, EGL_DEPTH_SIZE, 24, EGL_STENCIL_SIZE, 8, - #if defined(GL_ES_VERSION_2_0) + #if defined(OpenGl_USE_GLES2) EGL_RENDERABLE_TYPE, EGL_OPENGL_ES2_BIT, #else EGL_RENDERABLE_TYPE, EGL_OPENGL_BIT, @@ -87,7 +91,7 @@ namespace EGLint aNbConfigs = 0; for (Standard_Integer aGlesVer = 3; aGlesVer >= 2; --aGlesVer) { - #if defined(GL_ES_VERSION_2_0) + #if defined(OpenGl_USE_GLES2) aConfigAttribs[6 * 2 + 1] = aGlesVer == 3 ? EGL_OPENGL_ES3_BIT : EGL_OPENGL_ES2_BIT; #else if (aGlesVer == 2) @@ -317,7 +321,7 @@ Standard_Boolean OpenGl_GraphicDriver::InitContext() return Standard_False; } -#if defined(GL_ES_VERSION_2_0) +#if defined(OpenGl_USE_GLES2) EGLint anEglCtxAttribs3[] = { EGL_CONTEXT_CLIENT_VERSION, 3, EGL_NONE, EGL_NONE }; EGLint anEglCtxAttribs2[] = { EGL_CONTEXT_CLIENT_VERSION, 2, EGL_NONE, EGL_NONE }; if (eglBindAPI (EGL_OPENGL_ES_API) != EGL_TRUE) diff --git a/src/OpenGl/OpenGl_LayerList.cxx b/src/OpenGl/OpenGl_LayerList.cxx index d12e38ea5f..efa7434541 100644 --- a/src/OpenGl/OpenGl_LayerList.cxx +++ b/src/OpenGl/OpenGl_LayerList.cxx @@ -573,11 +573,11 @@ void OpenGl_LayerList::renderLayer (const Handle(OpenGl_Workspace)& theWorkspace if (aLayerSettings.ToEnableDepthTest()) { // assuming depth test is enabled by default - glDepthFunc (theDefaultSettings.DepthFunc); + aCtx->core11fwd->glDepthFunc (theDefaultSettings.DepthFunc); } else { - glDepthFunc (GL_ALWAYS); + aCtx->core11fwd->glDepthFunc (GL_ALWAYS); } // save environment texture @@ -592,7 +592,7 @@ void OpenGl_LayerList::renderLayer (const Handle(OpenGl_Workspace)& theWorkspace // handle depth write theWorkspace->UseDepthWrite() = aLayerSettings.ToEnableDepthWrite() && theDefaultSettings.DepthMask == GL_TRUE; - glDepthMask (theWorkspace->UseDepthWrite() ? GL_TRUE : GL_FALSE); + aCtx->core11fwd->glDepthMask (theWorkspace->UseDepthWrite() ? GL_TRUE : GL_FALSE); const Standard_Boolean hasLocalCS = !aLayerSettings.OriginTransformation().IsNull(); const Handle(OpenGl_ShaderManager)& aManager = aCtx->ShaderManager(); @@ -863,8 +863,8 @@ void OpenGl_LayerList::Render (const Handle(OpenGl_Workspace)& theWorkspace, if (aClearDepthLayer > aClearDepthLayerPrev) { aClearDepthLayerPrev = aClearDepthLayer; - glDepthMask (GL_TRUE); - glClear (GL_DEPTH_BUFFER_BIT); + aCtx->core11fwd->glDepthMask (GL_TRUE); + aCtx->core11fwd->glClear (GL_DEPTH_BUFFER_BIT); } } diff --git a/src/OpenGl/OpenGl_LineAttributes.cxx b/src/OpenGl/OpenGl_LineAttributes.cxx index aa53850aee..4ea3843aba 100644 --- a/src/OpenGl/OpenGl_LineAttributes.cxx +++ b/src/OpenGl/OpenGl_LineAttributes.cxx @@ -44,7 +44,6 @@ OpenGl_LineAttributes::~OpenGl_LineAttributes() // ======================================================================= void OpenGl_LineAttributes::Release (OpenGl_Context* theGlCtx) { -#if !defined(GL_ES_VERSION_2_0) if (theGlCtx != NULL && theGlCtx->IsValid()) { @@ -53,9 +52,6 @@ void OpenGl_LineAttributes::Release (OpenGl_Context* theGlCtx) theGlCtx->core11ffp->glDeleteLists ((GLuint)anIter.Value(), 1); } } -#else - (void )theGlCtx; -#endif myStyles.Clear(); } @@ -66,17 +62,11 @@ void OpenGl_LineAttributes::Release (OpenGl_Context* theGlCtx) unsigned int OpenGl_LineAttributes::init (const OpenGl_Context* theGlCtx, const Handle(Graphic3d_HatchStyle)& theStyle) { -#if !defined(GL_ES_VERSION_2_0) const unsigned int aListId = theGlCtx->core11ffp->glGenLists(1); theGlCtx->core11ffp->glNewList ((GLuint)aListId, GL_COMPILE); theGlCtx->core11ffp->glPolygonStipple ((const GLubyte*)theStyle->Pattern()); theGlCtx->core11ffp->glEndList(); return aListId; -#else - (void )theGlCtx; - (void )theStyle; - return 0; -#endif } // ======================================================================= @@ -100,8 +90,6 @@ bool OpenGl_LineAttributes::SetTypeOfHatch (const OpenGl_Context* myStyles.Bind (theStyle, aGpuListId); } -#if !defined(GL_ES_VERSION_2_0) theGlCtx->core11ffp->glCallList ((GLuint)aGpuListId); -#endif return true; } diff --git a/src/OpenGl/OpenGl_PBREnvironment.cxx b/src/OpenGl/OpenGl_PBREnvironment.cxx index b6e83efd9c..80da3218dd 100644 --- a/src/OpenGl/OpenGl_PBREnvironment.cxx +++ b/src/OpenGl/OpenGl_PBREnvironment.cxx @@ -468,12 +468,11 @@ bool OpenGl_PBREnvironment::processSpecIBLMap (const Handle(OpenGl_Context)& the const bool canRenderMipmaps = theCtx->hasFboRenderMipmap; const OpenGl_TextureFormat aTexFormat = OpenGl_TextureFormat::FindSizedFormat (theCtx, myIBLMaps[OpenGl_TypeOfIBLMap_Specular].SizedFormat()); -#if !defined(GL_ES_VERSION_2_0) - const GLint anIntFormat = aTexFormat.InternalFormat(); -#else // ES 2.0 does not support sized formats and format conversions - them detected from data type - const GLint anIntFormat = theCtx->IsGlGreaterEqual (3, 0) ? aTexFormat.InternalFormat() : aTexFormat.PixelFormat(); -#endif + const GLint anIntFormat = (theCtx->GraphicsLibrary() != Aspect_GraphicsLibrary_OpenGLES + || theCtx->IsGlGreaterEqual (3, 0)) + ? aTexFormat.InternalFormat() + : aTexFormat.PixelFormat(); for (int aLevelIter = mySpecMapLevelsNumber - 1;; --aLevelIter) { diff --git a/src/OpenGl/OpenGl_PointSprite.cxx b/src/OpenGl/OpenGl_PointSprite.cxx index acbe7d1f20..e188f6d8d2 100755 --- a/src/OpenGl/OpenGl_PointSprite.cxx +++ b/src/OpenGl/OpenGl_PointSprite.cxx @@ -59,9 +59,7 @@ void OpenGl_PointSprite::Release (OpenGl_Context* theGlCtx) if (theGlCtx->IsValid()) { - #if !defined(GL_ES_VERSION_2_0) - glDeleteLists (myBitmapList, 1); - #endif + theGlCtx->core11ffp->glDeleteLists (myBitmapList, 1); } myBitmapList = 0; } @@ -84,12 +82,10 @@ void OpenGl_PointSprite::SetDisplayList (const Handle(OpenGl_Context)& theCtx, // function : DrawBitmap // purpose : // ======================================================================= -void OpenGl_PointSprite::DrawBitmap (const Handle(OpenGl_Context)& ) const +void OpenGl_PointSprite::DrawBitmap (const Handle(OpenGl_Context)& theCtx) const { if (myBitmapList != 0) { - #if !defined(GL_ES_VERSION_2_0) - glCallList (myBitmapList); - #endif + theCtx->core11ffp->glCallList (myBitmapList); } } diff --git a/src/OpenGl/OpenGl_PrimitiveArray.cxx b/src/OpenGl/OpenGl_PrimitiveArray.cxx index b9f12d0992..fa37741aaf 100644 --- a/src/OpenGl/OpenGl_PrimitiveArray.cxx +++ b/src/OpenGl/OpenGl_PrimitiveArray.cxx @@ -416,20 +416,19 @@ void OpenGl_PrimitiveArray::drawArray (const Handle(OpenGl_Workspace)& theWorksp const Graphic3d_Vec4* theFaceColors, const Standard_Boolean theHasVertColor) const { + const Handle(OpenGl_Context)& aGlContext = theWorkspace->GetGlContext(); if (myVboAttribs.IsNull()) { - #if !defined(GL_ES_VERSION_2_0) - if (myDrawMode == GL_POINTS) + if (myDrawMode == GL_POINTS + && aGlContext->core11ffp != NULL) { // extreme compatibility mode - without sprites but with markers drawMarkers (theWorkspace); } - #endif return; } - const Handle(OpenGl_Context)& aGlContext = theWorkspace->GetGlContext(); - const bool toHilight = theWorkspace->ToHighlight(); + const bool toHilight = theWorkspace->ToHighlight(); const GLenum aDrawMode = !aGlContext->ActiveProgram().IsNull() && aGlContext->ActiveProgram()->HasTessellationStage() ? GL_PATCHES @@ -452,14 +451,14 @@ void OpenGl_PrimitiveArray::drawArray (const Handle(OpenGl_Workspace)& theWorksp { const GLint aNbElemsInGroup = myBounds->Bounds[aGroupIter]; if (theFaceColors != NULL) aGlContext->SetColor4fv (theFaceColors[aGroupIter]); - glDrawElements (aDrawMode, aNbElemsInGroup, myVboIndices->GetDataType(), anOffset); + aGlContext->core11fwd->glDrawElements (aDrawMode, aNbElemsInGroup, myVboIndices->GetDataType(), anOffset); anOffset += aStride * aNbElemsInGroup; } } else { // draw one (or sequential) primitive by the indices - glDrawElements (aDrawMode, myVboIndices->GetElemsNb(), myVboIndices->GetDataType(), anOffset); + aGlContext->core11fwd->glDrawElements (aDrawMode, myVboIndices->GetElemsNb(), myVboIndices->GetDataType(), anOffset); } myVboIndices->Unbind (aGlContext); } @@ -470,7 +469,7 @@ void OpenGl_PrimitiveArray::drawArray (const Handle(OpenGl_Workspace)& theWorksp { const GLint aNbElemsInGroup = myBounds->Bounds[aGroupIter]; if (theFaceColors != NULL) aGlContext->SetColor4fv (theFaceColors[aGroupIter]); - glDrawArrays (aDrawMode, aFirstElem, aNbElemsInGroup); + aGlContext->core11fwd->glDrawArrays (aDrawMode, aFirstElem, aNbElemsInGroup); aFirstElem += aNbElemsInGroup; } } @@ -482,7 +481,7 @@ void OpenGl_PrimitiveArray::drawArray (const Handle(OpenGl_Workspace)& theWorksp } else { - glDrawArrays (aDrawMode, 0, myVboAttribs->GetElemsNb()); + aGlContext->core11fwd->glDrawArrays (aDrawMode, 0, myVboAttribs->GetElemsNb()); } } @@ -503,9 +502,7 @@ void OpenGl_PrimitiveArray::drawEdges (const Handle(OpenGl_Workspace)& theWorksp } const OpenGl_Aspects* anAspect = theWorkspace->Aspects(); -#if !defined(GL_ES_VERSION_2_0) const Standard_Integer aPolyModeOld = aGlContext->SetPolygonMode (GL_LINE); -#endif if (aGlContext->core20fwd != NULL) { @@ -518,13 +515,11 @@ void OpenGl_PrimitiveArray::drawEdges (const Handle(OpenGl_Workspace)& theWorksp && aGlContext->ActiveProgram()->HasTessellationStage() ? GL_PATCHES : myDrawMode; -#if !defined(GL_ES_VERSION_2_0) if (aGlContext->ActiveProgram().IsNull() && aGlContext->core11ffp != NULL) { aGlContext->core11fwd->glDisable (GL_LIGHTING); } -#endif /// OCC22236 NOTE: draw edges for all situations: /// 1) draw elements with GL_LINE style as edges from myPArray->bufferVBO[VBOEdges] indices array @@ -580,9 +575,7 @@ void OpenGl_PrimitiveArray::drawEdges (const Handle(OpenGl_Workspace)& theWorksp myVboAttribs->UnbindAttribute (aGlContext, Graphic3d_TOA_POS); // restore line context -#if !defined(GL_ES_VERSION_2_0) aGlContext->SetPolygonMode (aPolyModeOld); -#endif } // ======================================================================= @@ -605,13 +598,12 @@ void OpenGl_PrimitiveArray::drawMarkers (const Handle(OpenGl_Workspace)& theWork return; } -#if !defined(GL_ES_VERSION_2_0) if (aCtx->core11ffp != NULL) { aCtx->core11fwd->glEnable (GL_ALPHA_TEST); aCtx->core11fwd->glAlphaFunc (GL_GEQUAL, 0.1f); } -#endif + aCtx->core11fwd->glEnable (GL_BLEND); aCtx->core11fwd->glBlendFunc (GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); @@ -625,7 +617,6 @@ void OpenGl_PrimitiveArray::drawMarkers (const Handle(OpenGl_Workspace)& theWork aCtx->SetPointSize (1.0f); } -#if !defined(GL_ES_VERSION_2_0) // Textured markers will be drawn with the glBitmap else if (const Handle(OpenGl_PointSprite)& aSprite = anAspectMarker->SpriteRes (aCtx, theWorkspace->ToHighlight())) { @@ -635,10 +626,8 @@ void OpenGl_PrimitiveArray::drawMarkers (const Handle(OpenGl_Workspace)& theWork aSprite->DrawBitmap (theWorkspace->GetGlContext()); } } -#endif aCtx->core11fwd->glDisable (GL_BLEND); -#if !defined(GL_ES_VERSION_2_0) if (aCtx->core11ffp != NULL) { if (aCtx->ShaderManager()->MaterialState().AlphaCutoff() >= ShortRealLast()) @@ -650,7 +639,6 @@ void OpenGl_PrimitiveArray::drawMarkers (const Handle(OpenGl_Workspace)& theWork aCtx->core11fwd->glAlphaFunc (GL_GEQUAL, aCtx->ShaderManager()->MaterialState().AlphaCutoff()); } } -#endif } // ======================================================================= @@ -696,13 +684,12 @@ OpenGl_PrimitiveArray::OpenGl_PrimitiveArray (const OpenGl_GraphicDriver* if (theDriver != NULL) { myUID = theDriver->GetNextPrimitiveArrayUID(); - #if defined (GL_ES_VERSION_2_0) const Handle(OpenGl_Context)& aCtx = theDriver->GetSharedContext(); - if (!aCtx.IsNull()) + if (!aCtx.IsNull() + && aCtx->GraphicsLibrary() == Aspect_GraphicsLibrary_OpenGLES) { processIndices (aCtx); } - #endif } setDrawMode (theType); @@ -838,7 +825,6 @@ void OpenGl_PrimitiveArray::UpdateDrawStats (Graphic3d_FrameStatsDataTmp& theSta theStats[Graphic3d_FrameStatsCounter_NbTrianglesNotCulled] += aNbIndices - 4 * aNbBounds; break; } - #if !defined(GL_ES_VERSION_2_0) case GL_QUADS: { theStats[Graphic3d_FrameStatsCounter_NbTrianglesNotCulled] += aNbIndices / 2; @@ -849,7 +835,6 @@ void OpenGl_PrimitiveArray::UpdateDrawStats (Graphic3d_FrameStatsDataTmp& theSta theStats[Graphic3d_FrameStatsCounter_NbTrianglesNotCulled] += (aNbIndices / 2 - aNbBounds) * 2; break; } - #endif } } @@ -876,10 +861,10 @@ void OpenGl_PrimitiveArray::Render (const Handle(OpenGl_Workspace)& theWorkspace { toDrawInteriorEdges = 1; toDrawArray = true; - #if !defined(GL_ES_VERSION_2_0) - if (anAspectFace->Aspect()->EdgeLineType() != Aspect_TOL_SOLID - || aCtx->hasGeometryStage == OpenGl_FeatureNotAvailable - || aCtx->caps->usePolygonMode) + if (aCtx->GraphicsLibrary() != Aspect_GraphicsLibrary_OpenGLES + && (anAspectFace->Aspect()->EdgeLineType() != Aspect_TOL_SOLID + || aCtx->hasGeometryStage == OpenGl_FeatureNotAvailable + || aCtx->caps->usePolygonMode)) { toDrawInteriorEdges = 2; if (anAspectFace->Aspect()->InteriorStyle() == Aspect_IS_EMPTY) @@ -894,7 +879,6 @@ void OpenGl_PrimitiveArray::Render (const Handle(OpenGl_Workspace)& theWorkspace } } } - #endif } } else @@ -921,9 +905,10 @@ void OpenGl_PrimitiveArray::Render (const Handle(OpenGl_Workspace)& theWorkspace // compatibility - keep data to draw markers using display lists Standard_Boolean toKeepData = myDrawMode == GL_POINTS && anAspectFace->IsDisplayListSprite (aCtx); - #if defined (GL_ES_VERSION_2_0) - processIndices (aCtx); - #endif + if (aCtx->GraphicsLibrary() == Aspect_GraphicsLibrary_OpenGLES) + { + processIndices (aCtx); + } buildVBO (aCtx, toKeepData); myIsVboInit = Standard_True; } @@ -984,14 +969,10 @@ void OpenGl_PrimitiveArray::Render (const Handle(OpenGl_Workspace)& theWorkspace { aCtx->ShaderManager()->PushInteriorState (aCtx->ActiveProgram(), anAspectFace->Aspect()); } - #if !defined (GL_ES_VERSION_2_0) else if (toSetLinePolygMode) { aCtx->SetPolygonMode (GL_LINE); } - #else - (void )toSetLinePolygMode; - #endif break; } } @@ -1067,7 +1048,6 @@ void OpenGl_PrimitiveArray::Render (const Handle(OpenGl_Workspace)& theWorkspace } } -#if !defined(GL_ES_VERSION_2_0) // draw triangulation edges using Polygon Mode if (toDrawInteriorEdges == 2) { @@ -1081,7 +1061,6 @@ void OpenGl_PrimitiveArray::Render (const Handle(OpenGl_Workspace)& theWorkspace drawEdges (theWorkspace); } } -#endif } // ======================================================================= @@ -1141,7 +1120,6 @@ void OpenGl_PrimitiveArray::setDrawMode (const Graphic3d_TypeOfPrimitiveArray th myIsFillType = true; break; // - #if !defined(GL_ES_VERSION_2_0) case Graphic3d_TOPA_QUADRANGLES: myDrawMode = GL_QUADS; myIsFillType = true; @@ -1154,11 +1132,6 @@ void OpenGl_PrimitiveArray::setDrawMode (const Graphic3d_TypeOfPrimitiveArray th myDrawMode = GL_POLYGON; myIsFillType = true; break; - #else - case Graphic3d_TOPA_QUADRANGLES: - case Graphic3d_TOPA_QUADRANGLESTRIPS: - case Graphic3d_TOPA_POLYGONS: - #endif case Graphic3d_TOPA_UNDEFINED: myDrawMode = DRAW_MODE_NONE; myIsFillType = false; @@ -1218,9 +1191,11 @@ void OpenGl_PrimitiveArray::InitBuffers (const Handle(OpenGl_Context)& th myIndices = theIndices; myAttribs = theAttribs; myBounds = theBounds; -#if defined(GL_ES_VERSION_2_0) - processIndices (theContext); -#endif + if (!theContext.IsNull() + && theContext->GraphicsLibrary() == Aspect_GraphicsLibrary_OpenGLES) + { + processIndices (theContext); + } setDrawMode (theType); } diff --git a/src/OpenGl/OpenGl_Sampler.cxx b/src/OpenGl/OpenGl_Sampler.cxx index a793dda89d..45fe965044 100644 --- a/src/OpenGl/OpenGl_Sampler.cxx +++ b/src/OpenGl/OpenGl_Sampler.cxx @@ -217,12 +217,11 @@ void OpenGl_Sampler::applySamplerParams (const Handle(OpenGl_Context)& theCtx, // setup texture wrapping const GLenum aWrapMode = theParams->IsRepeat() ? GL_REPEAT : theCtx->TextureWrapClamp(); setParameter (theCtx, theSampler, theTarget, GL_TEXTURE_WRAP_S, aWrapMode); -#if !defined(GL_ES_VERSION_2_0) if (theTarget == GL_TEXTURE_1D) { return; } -#endif + setParameter (theCtx, theSampler, theTarget, GL_TEXTURE_WRAP_T, aWrapMode); if (theTarget == GL_TEXTURE_3D || theTarget == GL_TEXTURE_CUBE_MAP) @@ -284,11 +283,6 @@ void OpenGl_Sampler::applyGlobalTextureParams (const Handle(OpenGl_Context)& the const OpenGl_Texture& theTexture, const Handle(Graphic3d_TextureParams)& theParams) { -#if defined(GL_ES_VERSION_2_0) - (void )theCtx; - (void )theTexture; - (void )theParams; -#else if (theCtx->core11ffp == NULL || theParams->TextureUnit() >= theCtx->MaxTextureUnitsFFP()) { @@ -386,7 +380,6 @@ void OpenGl_Sampler::applyGlobalTextureParams (const Handle(OpenGl_Context)& the } default: break; } -#endif } // ======================================================================= @@ -397,11 +390,6 @@ void OpenGl_Sampler::resetGlobalTextureParams (const Handle(OpenGl_Context)& the const OpenGl_Texture& theTexture, const Handle(Graphic3d_TextureParams)& theParams) { -#if defined(GL_ES_VERSION_2_0) - (void )theCtx; - (void )theTexture; - (void )theParams; -#else if (theCtx->core11ffp == NULL) { return; @@ -442,5 +430,4 @@ void OpenGl_Sampler::resetGlobalTextureParams (const Handle(OpenGl_Context)& the } default: break; } -#endif } diff --git a/src/OpenGl/OpenGl_ShaderManager.cxx b/src/OpenGl/OpenGl_ShaderManager.cxx index 04efdf9a1e..892cc020a5 100644 --- a/src/OpenGl/OpenGl_ShaderManager.cxx +++ b/src/OpenGl/OpenGl_ShaderManager.cxx @@ -30,8 +30,6 @@ IMPLEMENT_STANDARD_RTTIEXT(OpenGl_ShaderManager, Graphic3d_ShaderManager) namespace { -#if !defined(GL_ES_VERSION_2_0) - static const GLfloat THE_DEFAULT_AMBIENT[4] = { 0.0f, 0.0f, 0.0f, 1.0f }; static const GLfloat THE_DEFAULT_SPOT_DIR[3] = { 0.0f, 0.0f, -1.0f }; static const GLfloat THE_DEFAULT_SPOT_EXPONENT = 0.0f; @@ -112,9 +110,8 @@ namespace theCtx->core11ffp->glLoadMatrixf (theModelView.GetData()); } - glEnable (theLightGlId); + theCtx->core11fwd->glEnable (theLightGlId); } -#endif } // ======================================================================= @@ -122,11 +119,7 @@ namespace // purpose : Creates new empty shader manager // ======================================================================= OpenGl_ShaderManager::OpenGl_ShaderManager (OpenGl_Context* theContext) -#if defined(GL_ES_VERSION_2_0) -: Graphic3d_ShaderManager (Aspect_GraphicsLibrary_OpenGLES), -#else -: Graphic3d_ShaderManager (Aspect_GraphicsLibrary_OpenGL), -#endif +: Graphic3d_ShaderManager (theContext->GraphicsLibrary()), myFfpProgram (new OpenGl_ShaderProgramFFP()), myShadingModel (Graphic3d_TypeOfShadingModel_Gouraud), myUnlitPrograms (new OpenGl_SetOfPrograms()), @@ -366,7 +359,6 @@ void OpenGl_ShaderManager::pushLightSourceState (const Handle(OpenGl_ShaderProgr theProgram->UpdateState (OpenGl_LIGHT_SOURCES_STATE, myLightSourceState.Index()); if (theProgram == myFfpProgram) { - #if !defined(GL_ES_VERSION_2_0) if (myContext->core11ffp == NULL) { return; @@ -409,7 +401,6 @@ void OpenGl_ShaderManager::pushLightSourceState (const Handle(OpenGl_ShaderProgr { myContext->core11fwd->glDisable (aLightGlId); } - #endif return; } @@ -596,13 +587,11 @@ void OpenGl_ShaderManager::pushProjectionState (const Handle(OpenGl_ShaderProgra theProgram->UpdateState (OpenGl_PROJECTION_STATE, myProjectionState.Index()); if (theProgram == myFfpProgram) { - #if !defined(GL_ES_VERSION_2_0) if (myContext->core11ffp != NULL) { myContext->core11ffp->glMatrixMode (GL_PROJECTION); myContext->core11ffp->glLoadMatrixf (myProjectionState.ProjectionMatrix().GetData()); } - #endif return; } @@ -636,7 +625,6 @@ void OpenGl_ShaderManager::pushModelWorldState (const Handle(OpenGl_ShaderProgra theProgram->UpdateState (OpenGl_MODEL_WORLD_STATE, myModelWorldState.Index()); if (theProgram == myFfpProgram) { - #if !defined(GL_ES_VERSION_2_0) if (myContext->core11ffp != NULL) { const OpenGl_Mat4 aModelView = myWorldViewState.WorldViewMatrix() * myModelWorldState.ModelWorldMatrix(); @@ -644,7 +632,6 @@ void OpenGl_ShaderManager::pushModelWorldState (const Handle(OpenGl_ShaderProgra myContext->core11ffp->glLoadMatrixf (aModelView.GetData()); theProgram->UpdateState (OpenGl_WORLD_VIEW_STATE, myWorldViewState.Index()); } - #endif return; } @@ -683,7 +670,6 @@ void OpenGl_ShaderManager::pushWorldViewState (const Handle(OpenGl_ShaderProgram theProgram->UpdateState (OpenGl_WORLD_VIEW_STATE, myWorldViewState.Index()); if (theProgram == myFfpProgram) { - #if !defined(GL_ES_VERSION_2_0) if (myContext->core11ffp != NULL) { const OpenGl_Mat4 aModelView = myWorldViewState.WorldViewMatrix() * myModelWorldState.ModelWorldMatrix(); @@ -691,7 +677,6 @@ void OpenGl_ShaderManager::pushWorldViewState (const Handle(OpenGl_ShaderProgram myContext->core11ffp->glLoadMatrixf (aModelView.GetData()); theProgram->UpdateState (OpenGl_MODEL_WORLD_STATE, myModelWorldState.Index()); } - #endif return; } @@ -743,7 +728,6 @@ void OpenGl_ShaderManager::pushClippingState (const Handle(OpenGl_ShaderProgram) theProgram->UpdateState (OpenGl_CLIP_PLANES_STATE, myClippingState.Index()); if (theProgram == myFfpProgram) { - #if !defined(GL_ES_VERSION_2_0) if (myContext->core11ffp == NULL) { return; @@ -814,7 +798,6 @@ void OpenGl_ShaderManager::pushClippingState (const Handle(OpenGl_ShaderProgram) const OpenGl_Mat4 aModelView = myWorldViewState.WorldViewMatrix() * myModelWorldState.ModelWorldMatrix(); myContext->core11ffp->glLoadMatrixf (aModelView.GetData()); } - #endif return; } @@ -917,7 +900,6 @@ void OpenGl_ShaderManager::pushMaterialState (const Handle(OpenGl_ShaderProgram) theProgram->UpdateState (OpenGl_MATERIAL_STATE, myMaterialState.Index()); if (theProgram == myFfpProgram) { - #if !defined(GL_ES_VERSION_2_0) if (myContext->core11ffp == NULL) { return; @@ -951,7 +933,6 @@ void OpenGl_ShaderManager::pushMaterialState (const Handle(OpenGl_ShaderProgram) myContext->core11ffp->glMaterialfv(GL_BACK, GL_EMISSION, aBackMat.Emission.GetData()); myContext->core11ffp->glMaterialf (GL_BACK, GL_SHININESS, aBackMat.Shine()); } - #endif return; } @@ -1050,7 +1031,6 @@ void OpenGl_ShaderManager::PushState (const Handle(OpenGl_ShaderProgram)& thePro (float )myContext->Viewport()[2], (float )myContext->Viewport()[3])); } } -#if !defined(GL_ES_VERSION_2_0) else if (myContext->core11ffp != NULL) { // manage FFP lighting @@ -1064,9 +1044,6 @@ void OpenGl_ShaderManager::PushState (const Handle(OpenGl_ShaderProgram)& thePro myContext->core11fwd->glEnable (GL_LIGHTING); } } -#else - (void )theShadingModel; -#endif } // ======================================================================= diff --git a/src/OpenGl/OpenGl_ShaderProgram.cxx b/src/OpenGl/OpenGl_ShaderProgram.cxx index 55971d5e09..51143e1bd2 100755 --- a/src/OpenGl/OpenGl_ShaderProgram.cxx +++ b/src/OpenGl/OpenGl_ShaderProgram.cxx @@ -217,102 +217,105 @@ Standard_Boolean OpenGl_ShaderProgram::Initialize (const Handle(OpenGl_Context)& } // detect the minimum GLSL version required for defined Shader Objects -#if defined(GL_ES_VERSION_2_0) - if (myHasTessShader) + if (theCtx->GraphicsLibrary() == Aspect_GraphicsLibrary_OpenGLES) { - if (!theCtx->IsGlGreaterEqual (3, 2)) + if (myHasTessShader) { - theCtx->PushMessage (GL_DEBUG_SOURCE_APPLICATION, GL_DEBUG_TYPE_ERROR, 0, GL_DEBUG_SEVERITY_HIGH, - "Error! Tessellation shader requires OpenGL ES 3.2+"); - return false; - } - else if (aHeaderVer.IsEmpty()) - { - aHeaderVer = "#version 320 es"; - } - } - else if ((aShaderMask & Graphic3d_TOS_GEOMETRY) != 0) - { - switch (theCtx->hasGeometryStage) - { - case OpenGl_FeatureNotAvailable: + if (!theCtx->IsGlGreaterEqual (3, 2)) { theCtx->PushMessage (GL_DEBUG_SOURCE_APPLICATION, GL_DEBUG_TYPE_ERROR, 0, GL_DEBUG_SEVERITY_HIGH, - "Error! Geometry shader requires OpenGL ES 3.2+ or GL_EXT_geometry_shader"); + "Error! Tessellation shader requires OpenGL ES 3.2+"); return false; } - case OpenGl_FeatureInExtensions: + else if (aHeaderVer.IsEmpty()) { - if (aHeaderVer.IsEmpty()) - { - aHeaderVer = "#version 310 es"; - } - break; + aHeaderVer = "#version 320 es"; } - case OpenGl_FeatureInCore: + } + else if ((aShaderMask & Graphic3d_TOS_GEOMETRY) != 0) + { + switch (theCtx->hasGeometryStage) { - if (aHeaderVer.IsEmpty()) + case OpenGl_FeatureNotAvailable: + { + theCtx->PushMessage (GL_DEBUG_SOURCE_APPLICATION, GL_DEBUG_TYPE_ERROR, 0, GL_DEBUG_SEVERITY_HIGH, + "Error! Geometry shader requires OpenGL ES 3.2+ or GL_EXT_geometry_shader"); + return false; + } + case OpenGl_FeatureInExtensions: { - aHeaderVer = "#version 320 es"; + if (aHeaderVer.IsEmpty()) + { + aHeaderVer = "#version 310 es"; + } + break; + } + case OpenGl_FeatureInCore: + { + if (aHeaderVer.IsEmpty()) + { + aHeaderVer = "#version 320 es"; + } + break; } - break; } } - } - else if ((aShaderMask & Graphic3d_TOS_COMPUTE) != 0) - { - if (!theCtx->IsGlGreaterEqual (3, 1)) - { - theCtx->PushMessage (GL_DEBUG_SOURCE_APPLICATION, GL_DEBUG_TYPE_ERROR, 0, GL_DEBUG_SEVERITY_HIGH, - "Error! Compute shaders require OpenGL ES 3.1+"); - return false; - } - else if (aHeaderVer.IsEmpty()) - { - aHeaderVer = "#version 310 es"; - } - } -#else - if ((aShaderMask & Graphic3d_TOS_COMPUTE) != 0) - { - if (!theCtx->IsGlGreaterEqual (4, 3)) - { - theCtx->PushMessage (GL_DEBUG_SOURCE_APPLICATION, GL_DEBUG_TYPE_ERROR, 0, GL_DEBUG_SEVERITY_HIGH, - "Error! Compute shaders require OpenGL 4.3+"); - return 0; - } - else if (aHeaderVer.IsEmpty()) + else if ((aShaderMask & Graphic3d_TOS_COMPUTE) != 0) { - aHeaderVer = "#version 430"; + if (!theCtx->IsGlGreaterEqual (3, 1)) + { + theCtx->PushMessage (GL_DEBUG_SOURCE_APPLICATION, GL_DEBUG_TYPE_ERROR, 0, GL_DEBUG_SEVERITY_HIGH, + "Error! Compute shaders require OpenGL ES 3.1+"); + return false; + } + else if (aHeaderVer.IsEmpty()) + { + aHeaderVer = "#version 310 es"; + } } } - else if (myHasTessShader) + else { - if (!theCtx->IsGlGreaterEqual (4, 0)) - { - theCtx->PushMessage (GL_DEBUG_SOURCE_APPLICATION, GL_DEBUG_TYPE_ERROR, 0, GL_DEBUG_SEVERITY_HIGH, - "Error! Tessellation shaders require OpenGL 4.0+"); - return 0; - } - else if (aHeaderVer.IsEmpty()) + if ((aShaderMask & Graphic3d_TOS_COMPUTE) != 0) { - aHeaderVer = "#version 400"; + if (!theCtx->IsGlGreaterEqual (4, 3)) + { + theCtx->PushMessage (GL_DEBUG_SOURCE_APPLICATION, GL_DEBUG_TYPE_ERROR, 0, GL_DEBUG_SEVERITY_HIGH, + "Error! Compute shaders require OpenGL 4.3+"); + return 0; + } + else if (aHeaderVer.IsEmpty()) + { + aHeaderVer = "#version 430"; + } } - } - else if ((aShaderMask & Graphic3d_TOS_GEOMETRY) != 0) - { - if (!theCtx->IsGlGreaterEqual (3, 2)) + else if (myHasTessShader) { - theCtx->PushMessage (GL_DEBUG_SOURCE_APPLICATION, GL_DEBUG_TYPE_ERROR, 0, GL_DEBUG_SEVERITY_HIGH, - "Error! Geometry shaders require OpenGL 3.2+"); - return 0; + if (!theCtx->IsGlGreaterEqual (4, 0)) + { + theCtx->PushMessage (GL_DEBUG_SOURCE_APPLICATION, GL_DEBUG_TYPE_ERROR, 0, GL_DEBUG_SEVERITY_HIGH, + "Error! Tessellation shaders require OpenGL 4.0+"); + return 0; + } + else if (aHeaderVer.IsEmpty()) + { + aHeaderVer = "#version 400"; + } } - else if (aHeaderVer.IsEmpty()) + else if ((aShaderMask & Graphic3d_TOS_GEOMETRY) != 0) { - aHeaderVer = "#version 150"; + if (!theCtx->IsGlGreaterEqual (3, 2)) + { + theCtx->PushMessage (GL_DEBUG_SOURCE_APPLICATION, GL_DEBUG_TYPE_ERROR, 0, GL_DEBUG_SEVERITY_HIGH, + "Error! Geometry shaders require OpenGL 3.2+"); + return 0; + } + else if (aHeaderVer.IsEmpty()) + { + aHeaderVer = "#version 150"; + } } } -#endif for (Graphic3d_ShaderObjectList::Iterator anIter (theShaders); anIter.More(); anIter.Next()) { @@ -380,36 +383,34 @@ Standard_Boolean OpenGl_ShaderProgram::Initialize (const Handle(OpenGl_Context)& if (theCtx->hasSampleVariables == OpenGl_FeatureInExtensions) { -#if defined(GL_ES_VERSION_2_0) - if (theCtx->oesSampleVariables) + if (theCtx->GraphicsLibrary() == Aspect_GraphicsLibrary_OpenGLES + && theCtx->oesSampleVariables) { anExtensions += "#extension GL_OES_sample_variables : enable\n"; } -#else - if (theCtx->arbSampleShading) + else if (theCtx->GraphicsLibrary() == Aspect_GraphicsLibrary_OpenGL + && theCtx->arbSampleShading) { anExtensions += "#extension GL_ARB_sample_shading : enable\n"; } -#endif } -#if defined(GL_ES_VERSION_2_0) - if (theCtx->hasGeometryStage == OpenGl_FeatureInExtensions) + + if (theCtx->GraphicsLibrary() == Aspect_GraphicsLibrary_OpenGLES + && theCtx->hasGeometryStage == OpenGl_FeatureInExtensions) { anExtensions += "#extension GL_EXT_geometry_shader : enable\n" "#extension GL_EXT_shader_io_blocks : enable\n"; } -#endif TCollection_AsciiString aPrecisionHeader; - if (anIter.Value()->Type() == Graphic3d_TOS_FRAGMENT) + if (anIter.Value()->Type() == Graphic3d_TOS_FRAGMENT + && theCtx->GraphicsLibrary() == Aspect_GraphicsLibrary_OpenGLES) { - #if defined(GL_ES_VERSION_2_0) aPrecisionHeader = theCtx->hasHighp ? "precision highp float;\n" "precision highp int;\n" : "precision mediump float;\n" "precision mediump int;\n"; - #endif } TCollection_AsciiString aHeaderType; @@ -999,19 +1000,23 @@ Standard_Boolean OpenGl_ShaderProgram::SetUniform (const Handle(OpenGl_Context)& return false; } -#if !defined(GL_ES_VERSION_2_0) - if (theCtx->core32 != NULL) + if (theCtx->GraphicsLibrary() == Aspect_GraphicsLibrary_OpenGLES) { - theCtx->core32->glUniform2uiv (theLocation, 1, theValue.GetData()); - return true; + if (theCtx->core30 != NULL) + { + theCtx->core30->glUniform2uiv (theLocation, 1, theValue.GetData()); + return true; + } } -#else - if (theCtx->core30 != NULL) + else { - theCtx->core30->glUniform2uiv (theLocation, 1, theValue.GetData()); - return true; + if (theCtx->core32 != NULL) + { + theCtx->core32->glUniform2uiv (theLocation, 1, theValue.GetData()); + return true; + } } -#endif + return false; } @@ -1041,19 +1046,22 @@ Standard_Boolean OpenGl_ShaderProgram::SetUniform (const Handle(OpenGl_Context)& return false; } -#if !defined(GL_ES_VERSION_2_0) - if (theCtx->core32 != NULL) + if (theCtx->GraphicsLibrary() == Aspect_GraphicsLibrary_OpenGLES) { - theCtx->core32->glUniform2uiv (theLocation, theCount, theValue->GetData()); - return true; + if (theCtx->core30 != NULL) + { + theCtx->core30->glUniform2uiv (theLocation, theCount, theValue->GetData()); + return true; + } } -#else - if (theCtx->core30 != NULL) + else { - theCtx->core30->glUniform2uiv (theLocation, theCount, theValue->GetData()); - return true; + if (theCtx->core32 != NULL) + { + theCtx->core32->glUniform2uiv (theLocation, theCount, theValue->GetData()); + return true; + } } -#endif return false; } diff --git a/src/OpenGl/OpenGl_StencilTest.cxx b/src/OpenGl/OpenGl_StencilTest.cxx index 12af1e30a4..ea3b0c92dd 100755 --- a/src/OpenGl/OpenGl_StencilTest.cxx +++ b/src/OpenGl/OpenGl_StencilTest.cxx @@ -15,6 +15,8 @@ #include #include +#include +#include #include OpenGl_StencilTest::OpenGl_StencilTest() @@ -26,16 +28,17 @@ OpenGl_StencilTest::OpenGl_StencilTest() // function : Render // purpose : // ======================================================================= -void OpenGl_StencilTest::Render (const Handle(OpenGl_Workspace)&) const +void OpenGl_StencilTest::Render (const Handle(OpenGl_Workspace)& theWorkspace) const { + const Handle(OpenGl_Context)& aCtx = theWorkspace->GetGlContext(); if (myIsEnabled) { - glEnable (GL_STENCIL_TEST); - glStencilFunc (GL_NOTEQUAL, 1, 0xFF); + aCtx->core11fwd->glEnable (GL_STENCIL_TEST); + aCtx->core11fwd->glStencilFunc (GL_NOTEQUAL, 1, 0xFF); } else { - glDisable (GL_STENCIL_TEST); + aCtx->core11fwd->glDisable (GL_STENCIL_TEST); } } diff --git a/src/OpenGl/OpenGl_Structure.cxx b/src/OpenGl/OpenGl_Structure.cxx index 722df45c7d..9e4c4bfa98 100644 --- a/src/OpenGl/OpenGl_Structure.cxx +++ b/src/OpenGl/OpenGl_Structure.cxx @@ -59,7 +59,6 @@ void OpenGl_Structure::renderBoundingBox (const Handle(OpenGl_Workspace)& theWor aCtx->core20fwd->glDrawArrays (GL_LINES, 0, aBoundBoxVertBuffer->GetElemsNb()); aBoundBoxVertBuffer->UnbindAttribute(aCtx, Graphic3d_TOA_POS); } -#if !defined(GL_ES_VERSION_2_0) else if (aCtx->core11ffp != NULL) { const Graphic3d_Vec3d aMind = myBndBox.CornerMin() + aMoveVec; @@ -94,7 +93,6 @@ void OpenGl_Structure::renderBoundingBox (const Handle(OpenGl_Workspace)& theWor aCtx->core11fwd->glDrawArrays (GL_LINE_STRIP, 0, 16); aCtx->core11ffp->glDisableClientState (GL_VERTEX_ARRAY); } -#endif aCtx->BindTextures (aPrevTexture, Handle(OpenGl_ShaderProgram)()); } @@ -444,7 +442,7 @@ void OpenGl_Structure::Render (const Handle(OpenGl_Workspace) &theWorkspace) con aModelWorld = myRenderTrsf; const Standard_Boolean anOldGlNormalize = aCtx->IsGlNormalizeEnabled(); -#if !defined(GL_ES_VERSION_2_0) + // detect scale transform if (aCtx->core11ffp != NULL && !myTrsf.IsNull()) @@ -455,7 +453,6 @@ void OpenGl_Structure::Render (const Handle(OpenGl_Workspace) &theWorkspace) con aCtx->SetGlNormalizeEnabled (Standard_True); } } -#endif bool anOldCastShadows = false; #ifdef GL_DEPTH_CLAMP @@ -703,7 +700,6 @@ void OpenGl_Structure::applyPersistence (const Handle(OpenGl_Context)& theCtx, theCtx->VirtualViewport()[2], theCtx->VirtualViewport()[3]); } -#if !defined(GL_ES_VERSION_2_0) if (!theCtx->IsGlNormalizeEnabled() && theCtx->core11ffp != NULL) { @@ -713,7 +709,6 @@ void OpenGl_Structure::applyPersistence (const Handle(OpenGl_Context)& theCtx, theCtx->SetGlNormalizeEnabled (true); } } -#endif } // ======================================================================= diff --git a/src/OpenGl/OpenGl_Text.cxx b/src/OpenGl/OpenGl_Text.cxx index f27d9d6c7e..9f439522d1 100644 --- a/src/OpenGl/OpenGl_Text.cxx +++ b/src/OpenGl/OpenGl_Text.cxx @@ -375,10 +375,8 @@ void OpenGl_Text::Render (const Handle(OpenGl_Context)& theCtx, unsigned int theResolution, Font_Hinting theFontHinting) const { -#if !defined(GL_ES_VERSION_2_0) const Standard_Integer aPrevPolygonMode = theCtx->SetPolygonMode (GL_FILL); const bool aPrevHatchingMode = theCtx->SetPolygonHatchEnabled (false); -#endif render (theCtx, theTextAspect, theTextAspect.Aspect()->ColorRGBA(), @@ -386,10 +384,8 @@ void OpenGl_Text::Render (const Handle(OpenGl_Context)& theCtx, theResolution, theFontHinting); -#if !defined(GL_ES_VERSION_2_0) theCtx->SetPolygonMode (aPrevPolygonMode); theCtx->SetPolygonHatchEnabled (aPrevHatchingMode); -#endif } // ======================================================================= @@ -645,13 +641,12 @@ void OpenGl_Text::drawRect (const Handle(OpenGl_Context)& theCtx, Graphic3d_AlphaMode_Opaque, Standard_False, Standard_False, Handle(OpenGl_ShaderProgram)()); -#if !defined(GL_ES_VERSION_2_0) if (theCtx->core11ffp != NULL && theCtx->ActiveProgram().IsNull()) { theCtx->core11fwd->glBindTexture (GL_TEXTURE_2D, 0); } -#endif + theCtx->SetColor4fv (theColorSubs); setupMatrix (theCtx, theTextAspect, OpenGl_Vec3 (0.0f, 0.0f, 0.0f)); myBndVertsVbo->BindAttribute (theCtx, Graphic3d_TOA_POS); @@ -759,13 +754,11 @@ void OpenGl_Text::render (const Handle(OpenGl_Context)& theCtx, } } -#if !defined(GL_ES_VERSION_2_0) if (theCtx->core11ffp != NULL && theCtx->caps->ffpEnable) { theCtx->core11fwd->glDisable (GL_LIGHTING); } -#endif // setup depth test const bool hasDepthTest = !myIs2d @@ -779,14 +772,13 @@ void OpenGl_Text::render (const Handle(OpenGl_Context)& theCtx, { theCtx->core15fwd->glActiveTexture (GL_TEXTURE0); } -#if !defined(GL_ES_VERSION_2_0) + // activate texture unit if (theCtx->core11ffp != NULL && theCtx->ActiveProgram().IsNull()) { const Handle(OpenGl_Texture)& aTexture = myFont->Texture(); OpenGl_Sampler::applyGlobalTextureParams (theCtx, *aTexture, aTexture->Sampler()->Parameters()); } -#endif // setup blending if (theTextAspect.Aspect()->AlphaMode() == Graphic3d_AlphaMode_MaskBlend) @@ -803,10 +795,11 @@ void OpenGl_Text::render (const Handle(OpenGl_Context)& theCtx, { case Aspect_TODT_BLEND: { - #if !defined(GL_ES_VERSION_2_0) - theCtx->core11fwd->glEnable (GL_COLOR_LOGIC_OP); - theCtx->core11ffp->glLogicOp (GL_XOR); - #endif + if (theCtx->GraphicsLibrary() == Aspect_GraphicsLibrary_OpenGL) + { + theCtx->core11fwd->glEnable (GL_COLOR_LOGIC_OP); + theCtx->core11fwd->glLogicOp (GL_XOR); + } break; } case Aspect_TODT_SUBTITLE: @@ -855,13 +848,11 @@ void OpenGl_Text::render (const Handle(OpenGl_Context)& theCtx, theCtx->ApplyProjectionMatrix(); } -#if !defined(GL_ES_VERSION_2_0) if (theCtx->core11ffp != NULL && theCtx->ActiveProgram().IsNull()) { const Handle(OpenGl_Texture)& aTexture = myFont->Texture(); OpenGl_Sampler::resetGlobalTextureParams (theCtx, *aTexture, aTexture->Sampler()->Parameters()); } -#endif if (theTextAspect.Aspect()->TextDisplayType() == Aspect_TODT_DIMENSION) { @@ -873,12 +864,11 @@ void OpenGl_Text::render (const Handle(OpenGl_Context)& theCtx, { theCtx->core11fwd->glDisable (GL_DEPTH_TEST); } - #if !defined(GL_ES_VERSION_2_0) if (theCtx->core11ffp != NULL) { theCtx->core11fwd->glDisable (GL_TEXTURE_2D); } - #endif + const bool aColorMaskBack = theCtx->SetColorMask (false); theCtx->core11fwd->glClear (GL_STENCIL_BUFFER_BIT); @@ -899,9 +889,10 @@ void OpenGl_Text::render (const Handle(OpenGl_Context)& theCtx, theCtx->core11fwd->glDisable (GL_BLEND); } theCtx->core11fwd->glDisable (GL_STENCIL_TEST); -#if !defined(GL_ES_VERSION_2_0) - theCtx->core11fwd->glDisable (GL_COLOR_LOGIC_OP); -#endif + if (theCtx->GraphicsLibrary() == Aspect_GraphicsLibrary_OpenGL) + { + theCtx->core11fwd->glDisable (GL_COLOR_LOGIC_OP); + } // model view matrix was modified theCtx->WorldViewState.Pop(); diff --git a/src/OpenGl/OpenGl_Texture.cxx b/src/OpenGl/OpenGl_Texture.cxx index 1d1933ff23..655e02001a 100644 --- a/src/OpenGl/OpenGl_Texture.cxx +++ b/src/OpenGl/OpenGl_Texture.cxx @@ -244,13 +244,10 @@ bool OpenGl_Texture::Init (const Handle(OpenGl_Context)& theCtx, return false; } -#if !defined(GL_ES_VERSION_2_0) - const GLenum aTarget = theType == Graphic3d_TOT_1D + const GLenum aTarget = (theType == Graphic3d_TOT_1D + && theCtx->GraphicsLibrary() != Aspect_GraphicsLibrary_OpenGLES) ? GL_TEXTURE_1D : GL_TEXTURE_2D; -#else - const GLenum aTarget = GL_TEXTURE_2D; -#endif const bool toPatchExisting = IsValid() && myTextFormat == theFormat.PixelFormat() && myTarget == aTarget @@ -280,12 +277,12 @@ bool OpenGl_Texture::Init (const Handle(OpenGl_Context)& theCtx, myTextFormat = theFormat.PixelFormat(); mySizedFormat = theFormat.InternalFormat(); myNbSamples = 1; -#if !defined(GL_ES_VERSION_2_0) - const GLint anIntFormat = theFormat.InternalFormat(); -#else + // ES 2.0 does not support sized formats and format conversions - them detected from data type - const GLint anIntFormat = theCtx->IsGlGreaterEqual (3, 0) ? theFormat.InternalFormat() : theFormat.PixelFormat(); -#endif + const GLint anIntFormat = (theCtx->GraphicsLibrary() != Aspect_GraphicsLibrary_OpenGLES + || theCtx->IsGlGreaterEqual (3, 0)) + ? theFormat.InternalFormat() + : theFormat.PixelFormat(); if (theFormat.DataType() == GL_FLOAT && !theCtx->arbTexFloat) @@ -307,8 +304,9 @@ bool OpenGl_Texture::Init (const Handle(OpenGl_Context)& theCtx, Release (theCtx.get()); return false; } -#if !defined(GL_ES_VERSION_2_0) - else if (!theCtx->IsGlGreaterEqual (3, 0) && !theCtx->arbNPTW) + else if (theCtx->GraphicsLibrary() != Aspect_GraphicsLibrary_OpenGL + && !theCtx->IsGlGreaterEqual (3, 0) + && !theCtx->arbNPTW) { // Notice that formally general NPOT textures are required by OpenGL 2.0 specifications // however some hardware (NV30 - GeForce FX, RadeOn 9xxx and Xxxx) supports GLSL but not NPOT! @@ -326,8 +324,9 @@ bool OpenGl_Texture::Init (const Handle(OpenGl_Context)& theCtx, return false; } } -#else - else if (!theCtx->IsGlGreaterEqual (3, 0) && theType == Graphic3d_TOT_2D_MIPMAP) + else if (theCtx->GraphicsLibrary() == Aspect_GraphicsLibrary_OpenGLES + && !theCtx->IsGlGreaterEqual (3, 0) + && theType == Graphic3d_TOT_2D_MIPMAP) { // Mipmap NPOT textures are not supported by OpenGL ES 2.0. const GLsizei aWidthP2 = OpenGl_Context::GetPowerOfTwo (theSizeXY.x(), aMaxSize); @@ -341,11 +340,8 @@ bool OpenGl_Texture::Init (const Handle(OpenGl_Context)& theCtx, myMaxMipLevel = 0; } } -#endif -#if !defined(GL_ES_VERSION_2_0) GLint aTestWidth = 0, aTestHeight = 0; -#endif GLvoid* aDataPtr = (theImage != NULL) ? (GLvoid* )theImage->Data() : NULL; // setup the alignment @@ -376,7 +372,14 @@ bool OpenGl_Texture::Init (const Handle(OpenGl_Context)& theCtx, { case Graphic3d_TOT_1D: { - #if !defined(GL_ES_VERSION_2_0) + if (theCtx->GraphicsLibrary() == Aspect_GraphicsLibrary_OpenGLES) + { + theCtx->PushMessage (GL_DEBUG_SOURCE_APPLICATION, GL_DEBUG_TYPE_ERROR, 0, GL_DEBUG_SEVERITY_HIGH, + TCollection_AsciiString ( "Error: 1D textures are not supported by hardware [") + myResourceId +"]"); + Release (theCtx.get()); + return false; + } + Bind (theCtx); applyDefaultSamplerParams (theCtx); if (toPatchExisting) @@ -391,8 +394,8 @@ bool OpenGl_Texture::Init (const Handle(OpenGl_Context)& theCtx, theCtx->core11fwd->glTexImage1D (GL_PROXY_TEXTURE_1D, 0, anIntFormat, theSizeXY.x(), 0, theFormat.PixelFormat(), theFormat.DataType(), NULL); - glGetTexLevelParameteriv (GL_PROXY_TEXTURE_1D, 0, GL_TEXTURE_WIDTH, &aTestWidth); - glGetTexLevelParameteriv (GL_PROXY_TEXTURE_1D, 0, GL_TEXTURE_INTERNAL_FORMAT, &mySizedFormat); + theCtx->core11fwd->glGetTexLevelParameteriv (GL_PROXY_TEXTURE_1D, 0, GL_TEXTURE_WIDTH, &aTestWidth); + theCtx->core11fwd->glGetTexLevelParameteriv (GL_PROXY_TEXTURE_1D, 0, GL_TEXTURE_INTERNAL_FORMAT, &mySizedFormat); if (aTestWidth == 0) { // no memory or broken input parameters @@ -416,12 +419,6 @@ bool OpenGl_Texture::Init (const Handle(OpenGl_Context)& theCtx, Unbind (theCtx); return true; - #else - theCtx->PushMessage (GL_DEBUG_SOURCE_APPLICATION, GL_DEBUG_TYPE_ERROR, 0, GL_DEBUG_SEVERITY_HIGH, - TCollection_AsciiString ( "Error: 1D textures are not supported by hardware [") + myResourceId +"]"); - Release (theCtx.get()); - return false; - #endif } case Graphic3d_TOT_2D: case Graphic3d_TOT_2D_MIPMAP: @@ -449,22 +446,23 @@ bool OpenGl_Texture::Init (const Handle(OpenGl_Context)& theCtx, return true; } - #if !defined(GL_ES_VERSION_2_0) - // use proxy to check texture could be created or not - theCtx->core11fwd->glTexImage2D (GL_PROXY_TEXTURE_2D, 0, anIntFormat, - theSizeXY.x(), theSizeXY.y(), 0, - theFormat.PixelFormat(), theFormat.DataType(), NULL); - glGetTexLevelParameteriv (GL_PROXY_TEXTURE_2D, 0, GL_TEXTURE_WIDTH, &aTestWidth); - glGetTexLevelParameteriv (GL_PROXY_TEXTURE_2D, 0, GL_TEXTURE_HEIGHT, &aTestHeight); - glGetTexLevelParameteriv (GL_PROXY_TEXTURE_2D, 0, GL_TEXTURE_INTERNAL_FORMAT, &mySizedFormat); - if (aTestWidth == 0 || aTestHeight == 0) + if (theCtx->GraphicsLibrary() == Aspect_GraphicsLibrary_OpenGL) { - // no memory or broken input parameters - Unbind (theCtx); - Release (theCtx.get()); - return false; + // use proxy to check texture could be created or not + theCtx->core11fwd->glTexImage2D (GL_PROXY_TEXTURE_2D, 0, anIntFormat, + theSizeXY.x(), theSizeXY.y(), 0, + theFormat.PixelFormat(), theFormat.DataType(), NULL); + theCtx->core11fwd->glGetTexLevelParameteriv (GL_PROXY_TEXTURE_2D, 0, GL_TEXTURE_WIDTH, &aTestWidth); + theCtx->core11fwd->glGetTexLevelParameteriv (GL_PROXY_TEXTURE_2D, 0, GL_TEXTURE_HEIGHT, &aTestHeight); + theCtx->core11fwd->glGetTexLevelParameteriv (GL_PROXY_TEXTURE_2D, 0, GL_TEXTURE_INTERNAL_FORMAT, &mySizedFormat); + if (aTestWidth == 0 || aTestHeight == 0) + { + // no memory or broken input parameters + Unbind (theCtx); + Release (theCtx.get()); + return false; + } } - #endif theCtx->core11fwd->glTexImage2D (GL_TEXTURE_2D, 0, anIntFormat, theSizeXY.x(), theSizeXY.y(), 0, @@ -496,16 +494,15 @@ bool OpenGl_Texture::Init (const Handle(OpenGl_Context)& theCtx, if (anErr != GL_NO_ERROR) { myMaxMipLevel = 0; - #if defined(GL_ES_VERSION_2_0) - if (theFormat.InternalFormat() == GL_RGB8 - || theFormat.InternalFormat() == GL_SRGB8) + if (theCtx->GraphicsLibrary() == Aspect_GraphicsLibrary_OpenGLES + && (theFormat.InternalFormat() == GL_RGB8 + || theFormat.InternalFormat() == GL_SRGB8)) { theCtx->PushMessage (GL_DEBUG_SOURCE_APPLICATION, GL_DEBUG_TYPE_PORTABILITY, 0, GL_DEBUG_SEVERITY_HIGH, TCollection_AsciiString ("Warning: generating mipmaps requires color-renderable format, while giving ") + OpenGl_TextureFormat::FormatFormat (anIntFormat) + " [" + myResourceId +"]"); } else - #endif { theCtx->PushMessage (GL_DEBUG_SOURCE_APPLICATION, GL_DEBUG_TYPE_PORTABILITY, 0, GL_DEBUG_SEVERITY_HIGH, TCollection_AsciiString ("Warning: generating mipmaps has failed [") + myResourceId +"]"); @@ -737,17 +734,15 @@ bool OpenGl_Texture::Init2DMultisample (const Handle(OpenGl_Context)& theCtx, //myTextFormat = theTextFormat; mySizedFormat = theTextFormat; if (theCtx->HasTextureMultisampling() - && theCtx->Functions()->glTexStorage2DMultisample != NULL) + && theCtx->Functions()->glTexStorage2DMultisample != NULL) // OpenGL 4.3 { theCtx->Functions()->glTexStorage2DMultisample (myTarget, myNbSamples, theTextFormat, theSizeX, theSizeY, GL_FALSE); } -#if !defined(GL_ES_VERSION_2_0) else if (theCtx->HasTextureMultisampling() - && theCtx->Functions()->glTexImage2DMultisample != NULL) + && theCtx->Functions()->glTexImage2DMultisample != NULL) // OpenGL 3.2 { theCtx->Functions()->glTexImage2DMultisample (myTarget, myNbSamples, theTextFormat, theSizeX, theSizeY, GL_FALSE); } -#endif else { theCtx->PushMessage (GL_DEBUG_SOURCE_APPLICATION, GL_DEBUG_TYPE_ERROR, 0, GL_DEBUG_SEVERITY_HIGH, @@ -783,12 +778,13 @@ bool OpenGl_Texture::InitRectangle (const Handle(OpenGl_Context)& theCtx, const Standard_Integer theSizeY, const OpenGl_TextureFormat& theFormat) { - if (!Create (theCtx) || !theCtx->IsGlGreaterEqual (3, 0)) + if (!theCtx->IsGlGreaterEqual (3, 0) + || !Create (theCtx) + || theCtx->GraphicsLibrary() == Aspect_GraphicsLibrary_OpenGLES) { return false; } -#if !defined(GL_ES_VERSION_2_0) myTarget = GL_TEXTURE_RECTANGLE; myNbSamples = 1; myMaxMipLevel = 0; @@ -810,9 +806,9 @@ bool OpenGl_Texture::InitRectangle (const Handle(OpenGl_Context)& theCtx, myTextFormat, GL_FLOAT, NULL); GLint aTestSizeX = 0, aTestSizeY = 0; - glGetTexLevelParameteriv (GL_PROXY_TEXTURE_RECTANGLE, 0, GL_TEXTURE_WIDTH, &aTestSizeX); - glGetTexLevelParameteriv (GL_PROXY_TEXTURE_RECTANGLE, 0, GL_TEXTURE_HEIGHT, &aTestSizeY); - glGetTexLevelParameteriv (GL_PROXY_TEXTURE_RECTANGLE, 0, GL_TEXTURE_INTERNAL_FORMAT, &mySizedFormat); + theCtx->core11fwd->glGetTexLevelParameteriv (GL_PROXY_TEXTURE_RECTANGLE, 0, GL_TEXTURE_WIDTH, &aTestSizeX); + theCtx->core11fwd->glGetTexLevelParameteriv (GL_PROXY_TEXTURE_RECTANGLE, 0, GL_TEXTURE_HEIGHT, &aTestSizeY); + theCtx->core11fwd->glGetTexLevelParameteriv (GL_PROXY_TEXTURE_RECTANGLE, 0, GL_TEXTURE_INTERNAL_FORMAT, &mySizedFormat); if (aTestSizeX == 0 || aTestSizeY == 0) { Unbind (theCtx); @@ -832,12 +828,6 @@ bool OpenGl_Texture::InitRectangle (const Handle(OpenGl_Context)& theCtx, mySizeY = aSizeY; Unbind (theCtx); return true; -#else - (void )theSizeX; - (void )theSizeY; - (void )theFormat; - return false; -#endif } // ======================================================================= @@ -891,23 +881,24 @@ bool OpenGl_Texture::Init3D (const Handle(OpenGl_Context)& theCtx, // setup the alignment OpenGl_UnpackAlignmentSentry::Reset (*theCtx); -#if !defined (GL_ES_VERSION_2_0) - theCtx->core15fwd->glTexImage3D (GL_PROXY_TEXTURE_3D, 0, mySizedFormat, - aSizeXYZ.x(), aSizeXYZ.y(), aSizeXYZ.z(), 0, - theFormat.PixelFormat(), theFormat.DataType(), NULL); - - NCollection_Vec3 aTestSizeXYZ; - glGetTexLevelParameteriv (GL_PROXY_TEXTURE_3D, 0, GL_TEXTURE_WIDTH, &aTestSizeXYZ.x()); - glGetTexLevelParameteriv (GL_PROXY_TEXTURE_3D, 0, GL_TEXTURE_HEIGHT, &aTestSizeXYZ.y()); - glGetTexLevelParameteriv (GL_PROXY_TEXTURE_3D, 0, GL_TEXTURE_DEPTH, &aTestSizeXYZ.z()); - glGetTexLevelParameteriv (GL_PROXY_TEXTURE_3D, 0, GL_TEXTURE_INTERNAL_FORMAT, &mySizedFormat); - if (aTestSizeXYZ.x() == 0 || aTestSizeXYZ.y() == 0 || aTestSizeXYZ.z() == 0) + if (theCtx->GraphicsLibrary() == Aspect_GraphicsLibrary_OpenGL) { - Unbind (theCtx); - Release (theCtx.get()); - return false; + theCtx->Functions()->glTexImage3D (GL_PROXY_TEXTURE_3D, 0, mySizedFormat, + aSizeXYZ.x(), aSizeXYZ.y(), aSizeXYZ.z(), 0, + theFormat.PixelFormat(), theFormat.DataType(), NULL); + + NCollection_Vec3 aTestSizeXYZ; + theCtx->core11fwd->glGetTexLevelParameteriv (GL_PROXY_TEXTURE_3D, 0, GL_TEXTURE_WIDTH, &aTestSizeXYZ.x()); + theCtx->core11fwd->glGetTexLevelParameteriv (GL_PROXY_TEXTURE_3D, 0, GL_TEXTURE_HEIGHT, &aTestSizeXYZ.y()); + theCtx->core11fwd->glGetTexLevelParameteriv (GL_PROXY_TEXTURE_3D, 0, GL_TEXTURE_DEPTH, &aTestSizeXYZ.z()); + theCtx->core11fwd->glGetTexLevelParameteriv (GL_PROXY_TEXTURE_3D, 0, GL_TEXTURE_INTERNAL_FORMAT, &mySizedFormat); + if (aTestSizeXYZ.x() == 0 || aTestSizeXYZ.y() == 0 || aTestSizeXYZ.z() == 0) + { + Unbind (theCtx); + Release (theCtx.get()); + return false; + } } -#endif applyDefaultSamplerParams (theCtx); theCtx->Functions()->glTexImage3D (myTarget, 0, mySizedFormat, @@ -1030,8 +1021,8 @@ bool OpenGl_Texture::InitCubeMap (const Handle(OpenGl_Context)& theCtx, return false; } -#if defined(GL_ES_VERSION_2_0) if (theToGenMipmap + && theCtx->GraphicsLibrary() == Aspect_GraphicsLibrary_OpenGLES && !theCtx->IsGlGreaterEqual (3, 0) && (aFormat.PixelFormat() == GL_SRGB_EXT || aFormat.PixelFormat() == GL_SRGB_ALPHA_EXT)) @@ -1042,7 +1033,6 @@ bool OpenGl_Texture::InitCubeMap (const Handle(OpenGl_Context)& theCtx, aFormat.SetPixelFormat (aFormat.PixelFormat() == GL_SRGB_EXT ? GL_RGB : GL_RGBA); aFormat.SetInternalFormat(aFormat.PixelFormat() == GL_SRGB_EXT ? GL_RGB8 : GL_RGBA8); } -#endif myTarget = GL_TEXTURE_CUBE_MAP; myNbSamples = 1; @@ -1050,12 +1040,12 @@ bool OpenGl_Texture::InitCubeMap (const Handle(OpenGl_Context)& theCtx, mySizeY = (GLsizei )theSize; myTextFormat = aFormat.Format(); mySizedFormat = aFormat.Internal(); -#if !defined(GL_ES_VERSION_2_0) - const GLint anIntFormat = aFormat.InternalFormat(); -#else + // ES 2.0 does not support sized formats and format conversions - them detected from data type - const GLint anIntFormat = theCtx->IsGlGreaterEqual (3, 0) ? aFormat.InternalFormat() : aFormat.PixelFormat(); -#endif + const GLint anIntFormat = (theCtx->GraphicsLibrary() != Aspect_GraphicsLibrary_OpenGLES + || theCtx->IsGlGreaterEqual (3, 0)) + ? aFormat.InternalFormat() + : aFormat.PixelFormat(); Bind (theCtx); applyDefaultSamplerParams (theCtx); @@ -1290,10 +1280,10 @@ bool OpenGl_Texture::ImageDump (Image_PixMap& theImage, Standard_Integer theLevel, Standard_Integer theCubeSide) const { -#if !defined(GL_ES_VERSION_2_0) const OpenGl_TextureFormat aFormat = OpenGl_TextureFormat::FindSizedFormat (theCtx, mySizedFormat); if (theCtx.IsNull() || !IsValid() + || theCtx->GraphicsLibrary() == Aspect_GraphicsLibrary_OpenGLES // glGetTexImage() is unavailable in OpenGL ES || theLevel < 0 || !aFormat.IsValid() || aFormat.ImageFormat() == Image_Format_UNKNOWN @@ -1341,13 +1331,4 @@ bool OpenGl_Texture::ImageDump (Image_PixMap& theImage, const bool hasErrors = theCtx->ResetErrors (true); theCtx->core11fwd->glPixelStorei (GL_PACK_ALIGNMENT, 1); return !hasErrors; -#else - // glGetTexImage() is unavailable in OpenGL ES - (void )theImage; - (void )theCtx; - (void )theTexUnit; - (void )theLevel; - (void )theCubeSide; - return false; -#endif } diff --git a/src/OpenGl/OpenGl_TextureFormat.cxx b/src/OpenGl/OpenGl_TextureFormat.cxx index 14a89723a4..5fcc450efd 100644 --- a/src/OpenGl/OpenGl_TextureFormat.cxx +++ b/src/OpenGl/OpenGl_TextureFormat.cxx @@ -125,11 +125,8 @@ OpenGl_TextureFormat OpenGl_TextureFormat::FindFormat (const Handle(OpenGl_Conte { OpenGl_TextureFormat aFormat; aFormat.SetImageFormat (theFormat); -#if defined(GL_ES_VERSION_2_0) - const bool useRedRedAlpha = false; -#else - const bool useRedRedAlpha = (theCtx->core11ffp == NULL); -#endif + const bool useRedRedAlpha = theCtx->GraphicsLibrary() != Aspect_GraphicsLibrary_OpenGLES + && theCtx->core11ffp == NULL; switch (theFormat) { case Image_Format_GrayF: @@ -142,11 +139,9 @@ OpenGl_TextureFormat OpenGl_TextureFormat::FindFormat (const Handle(OpenGl_Conte } else { - #if !defined(GL_ES_VERSION_2_0) - aFormat.SetInternalFormat (GL_LUMINANCE8); - #else - aFormat.SetInternalFormat (GL_LUMINANCE); - #endif + aFormat.SetInternalFormat (theCtx->GraphicsLibrary() == Aspect_GraphicsLibrary_OpenGLES + ? GL_LUMINANCE + : GL_LUMINANCE8); aFormat.SetPixelFormat (GL_LUMINANCE); } aFormat.SetDataType (GL_FLOAT); @@ -162,11 +157,9 @@ OpenGl_TextureFormat OpenGl_TextureFormat::FindFormat (const Handle(OpenGl_Conte } else { - #if !defined(GL_ES_VERSION_2_0) - aFormat.SetInternalFormat (GL_ALPHA8); - #else - aFormat.SetInternalFormat (GL_ALPHA); - #endif + aFormat.SetInternalFormat (theCtx->GraphicsLibrary() == Aspect_GraphicsLibrary_OpenGLES + ? GL_ALPHA + : GL_ALPHA8); aFormat.SetPixelFormat (GL_ALPHA); } aFormat.SetDataType (GL_FLOAT); @@ -214,15 +207,16 @@ OpenGl_TextureFormat OpenGl_TextureFormat::FindFormat (const Handle(OpenGl_Conte } case Image_Format_BGRF: { - #if !defined(GL_ES_VERSION_2_0) + if (theCtx->GraphicsLibrary() == Aspect_GraphicsLibrary_OpenGLES) + { + return OpenGl_TextureFormat(); + } + aFormat.SetNbComponents (3); aFormat.SetInternalFormat (theCtx->arbTexFloat ? GL_RGB32F : GL_RGB8); aFormat.SetPixelFormat (GL_BGR); // equals to GL_BGR_EXT aFormat.SetDataType (GL_FLOAT); return aFormat; - #else - return OpenGl_TextureFormat(); - #endif } case Image_Format_RGF_half: { @@ -230,11 +224,10 @@ OpenGl_TextureFormat OpenGl_TextureFormat::FindFormat (const Handle(OpenGl_Conte aFormat.SetInternalFormat (GL_RG16F); aFormat.SetPixelFormat (GL_RG); aFormat.SetDataType (GL_HALF_FLOAT); - if (theCtx->hasHalfFloatBuffer == OpenGl_FeatureInExtensions) + if (theCtx->hasHalfFloatBuffer == OpenGl_FeatureInExtensions + && theCtx->GraphicsLibrary() == Aspect_GraphicsLibrary_OpenGLES) { - #if defined(GL_ES_VERSION_2_0) aFormat.SetDataType (GL_HALF_FLOAT_OES); - #endif } return aFormat; } @@ -244,11 +237,10 @@ OpenGl_TextureFormat OpenGl_TextureFormat::FindFormat (const Handle(OpenGl_Conte aFormat.SetInternalFormat (GL_RGBA16F); aFormat.SetPixelFormat (GL_RGBA); aFormat.SetDataType (GL_HALF_FLOAT); - if (theCtx->hasHalfFloatBuffer == OpenGl_FeatureInExtensions) + if (theCtx->hasHalfFloatBuffer == OpenGl_FeatureInExtensions + && theCtx->GraphicsLibrary() == Aspect_GraphicsLibrary_OpenGLES) { - #if defined(GL_ES_VERSION_2_0) aFormat.SetDataType (GL_HALF_FLOAT_OES); - #endif } return aFormat; } @@ -261,106 +253,114 @@ OpenGl_TextureFormat OpenGl_TextureFormat::FindFormat (const Handle(OpenGl_Conte if (theIsColorMap && theCtx->ToRenderSRGB()) { - #if defined(GL_ES_VERSION_2_0) - if (!theCtx->IsGlGreaterEqual (3, 0)) + if (theCtx->GraphicsLibrary() == Aspect_GraphicsLibrary_OpenGLES + && !theCtx->IsGlGreaterEqual (3, 0)) { aFormat.SetPixelFormat (GL_SRGB_ALPHA_EXT); } - #endif aFormat.SetInternalFormat (GL_SRGB8_ALPHA8); } return aFormat; } case Image_Format_BGRA: { - #if !defined(GL_ES_VERSION_2_0) - if (!theCtx->IsGlGreaterEqual (1, 2) - && !theCtx->extBgra) - { - return OpenGl_TextureFormat(); - } - aFormat.SetNbComponents (4); - aFormat.SetInternalFormat (GL_RGBA8); - if (theIsColorMap - && theCtx->ToRenderSRGB()) + if (theCtx->GraphicsLibrary() != Aspect_GraphicsLibrary_OpenGLES) { - aFormat.SetInternalFormat (GL_SRGB8_ALPHA8); - } - #else - if (theIsColorMap - && theCtx->ToRenderSRGB()) - { - // GL_SRGB8_ALPHA8 with texture swizzling would be better + if (!theCtx->IsGlGreaterEqual (1, 2) + && !theCtx->extBgra) + { + return OpenGl_TextureFormat(); + } + aFormat.SetNbComponents (4); + aFormat.SetInternalFormat (GL_RGBA8); + if (theIsColorMap + && theCtx->ToRenderSRGB()) + { + aFormat.SetInternalFormat (GL_SRGB8_ALPHA8); + } } - if (!theCtx->extBgra) + else { - return OpenGl_TextureFormat(); + if (theIsColorMap + && theCtx->ToRenderSRGB()) + { + // GL_SRGB8_ALPHA8 with texture swizzling would be better + } + if (!theCtx->extBgra) + { + return OpenGl_TextureFormat(); + } + aFormat.SetNbComponents (4); + aFormat.SetInternalFormat (GL_BGRA_EXT); } - aFormat.SetNbComponents (4); - aFormat.SetInternalFormat (GL_BGRA_EXT); - #endif aFormat.SetPixelFormat (GL_BGRA_EXT); // equals to GL_BGRA aFormat.SetDataType (GL_UNSIGNED_BYTE); return aFormat; } case Image_Format_RGB32: { - #if !defined(GL_ES_VERSION_2_0) - // ask driver to convert data to RGB8 to save memory - aFormat.SetNbComponents (3); - aFormat.SetInternalFormat (GL_RGB8); - aFormat.SetPixelFormat (GL_RGBA); - aFormat.SetDataType (GL_UNSIGNED_BYTE); - if (theIsColorMap - && theCtx->ToRenderSRGB()) + if (theCtx->GraphicsLibrary() != Aspect_GraphicsLibrary_OpenGLES) { - aFormat.SetInternalFormat (GL_SRGB8); + // ask driver to convert data to RGB8 to save memory + aFormat.SetNbComponents (3); + aFormat.SetInternalFormat (GL_RGB8); + aFormat.SetPixelFormat (GL_RGBA); + aFormat.SetDataType (GL_UNSIGNED_BYTE); + if (theIsColorMap + && theCtx->ToRenderSRGB()) + { + aFormat.SetInternalFormat (GL_SRGB8); + } } - #else - // conversion is not supported - aFormat.SetNbComponents (4); - aFormat.SetInternalFormat (GL_RGBA8); - aFormat.SetPixelFormat (GL_RGBA); - aFormat.SetDataType (GL_UNSIGNED_BYTE); - if (theIsColorMap - && theCtx->ToRenderSRGB()) + else { - if (!theCtx->IsGlGreaterEqual (3, 0)) + // conversion is not supported + aFormat.SetNbComponents (4); + aFormat.SetInternalFormat (GL_RGBA8); + aFormat.SetPixelFormat (GL_RGBA); + aFormat.SetDataType (GL_UNSIGNED_BYTE); + if (theIsColorMap + && theCtx->ToRenderSRGB()) { - aFormat.SetPixelFormat (GL_SRGB_ALPHA_EXT); + if (!theCtx->IsGlGreaterEqual (3, 0)) + { + aFormat.SetPixelFormat (GL_SRGB_ALPHA_EXT); + } + aFormat.SetInternalFormat (GL_SRGB8_ALPHA8); } - aFormat.SetInternalFormat (GL_SRGB8_ALPHA8); } - #endif return aFormat; } case Image_Format_BGR32: { - #if !defined(GL_ES_VERSION_2_0) - if (!theCtx->IsGlGreaterEqual(1, 2) && !theCtx->extBgra) + if (theCtx->GraphicsLibrary() != Aspect_GraphicsLibrary_OpenGLES) { - return OpenGl_TextureFormat(); - } - aFormat.SetNbComponents (3); - aFormat.SetInternalFormat (GL_RGB8); - if (theIsColorMap - && theCtx->ToRenderSRGB()) - { - aFormat.SetInternalFormat (GL_SRGB8); - } - #else - if (theIsColorMap - && theCtx->ToRenderSRGB()) - { - // GL_SRGB8_ALPHA8 with texture swizzling would be better + if (!theCtx->IsGlGreaterEqual(1, 2) && !theCtx->extBgra) + { + return OpenGl_TextureFormat(); + } + aFormat.SetNbComponents (3); + aFormat.SetInternalFormat (GL_RGB8); + if (theIsColorMap + && theCtx->ToRenderSRGB()) + { + aFormat.SetInternalFormat (GL_SRGB8); + } } - if (!theCtx->extBgra) + else { - return OpenGl_TextureFormat(); + if (theIsColorMap + && theCtx->ToRenderSRGB()) + { + // GL_SRGB8_ALPHA8 with texture swizzling would be better + } + if (!theCtx->extBgra) + { + return OpenGl_TextureFormat(); + } + aFormat.SetNbComponents (4); + aFormat.SetInternalFormat (GL_BGRA_EXT); } - aFormat.SetNbComponents (4); - aFormat.SetInternalFormat (GL_BGRA_EXT); - #endif aFormat.SetPixelFormat (GL_BGRA_EXT); // equals to GL_BGRA aFormat.SetDataType (GL_UNSIGNED_BYTE); return aFormat; @@ -374,19 +374,22 @@ OpenGl_TextureFormat OpenGl_TextureFormat::FindFormat (const Handle(OpenGl_Conte if (theIsColorMap && theCtx->ToRenderSRGB()) { - #if defined(GL_ES_VERSION_2_0) - if (!theCtx->IsGlGreaterEqual (3, 0)) + if (theCtx->GraphicsLibrary() == Aspect_GraphicsLibrary_OpenGLES + && !theCtx->IsGlGreaterEqual (3, 0)) { aFormat.SetPixelFormat (GL_SRGB_EXT); } - #endif aFormat.SetInternalFormat (GL_SRGB8); } return aFormat; } case Image_Format_BGR: { - #if !defined(GL_ES_VERSION_2_0) + if (theCtx->GraphicsLibrary() == Aspect_GraphicsLibrary_OpenGLES) + { + return OpenGl_TextureFormat(); + } + if (!theCtx->IsGlGreaterEqual (1, 2) && !theCtx->extBgra) { @@ -401,7 +404,6 @@ OpenGl_TextureFormat OpenGl_TextureFormat::FindFormat (const Handle(OpenGl_Conte { aFormat.SetInternalFormat (GL_SRGB8); } - #endif return aFormat; } case Image_Format_Gray: @@ -414,11 +416,9 @@ OpenGl_TextureFormat OpenGl_TextureFormat::FindFormat (const Handle(OpenGl_Conte } else { - #if !defined(GL_ES_VERSION_2_0) - aFormat.SetInternalFormat (GL_LUMINANCE8); - #else - aFormat.SetInternalFormat (GL_LUMINANCE); - #endif + aFormat.SetInternalFormat (theCtx->GraphicsLibrary() == Aspect_GraphicsLibrary_OpenGLES + ? GL_LUMINANCE + : GL_LUMINANCE8); aFormat.SetPixelFormat (GL_LUMINANCE); } aFormat.SetDataType (GL_UNSIGNED_BYTE); @@ -434,11 +434,9 @@ OpenGl_TextureFormat OpenGl_TextureFormat::FindFormat (const Handle(OpenGl_Conte } else { - #if !defined(GL_ES_VERSION_2_0) - aFormat.SetInternalFormat (GL_ALPHA8); - #else - aFormat.SetInternalFormat (GL_ALPHA); - #endif + aFormat.SetInternalFormat (theCtx->GraphicsLibrary() == Aspect_GraphicsLibrary_OpenGLES + ? GL_ALPHA + : GL_ALPHA8); aFormat.SetPixelFormat (GL_ALPHA); } aFormat.SetDataType (GL_UNSIGNED_BYTE); @@ -498,11 +496,9 @@ OpenGl_TextureFormat OpenGl_TextureFormat::FindSizedFormat (const Handle(OpenGl_ aFormat.SetImageFormat (Image_Format_RGBAF_half); if (theCtx->hasHalfFloatBuffer == OpenGl_FeatureInExtensions) { - #if defined(GL_ES_VERSION_2_0) - aFormat.SetDataType (GL_HALF_FLOAT_OES); - #else - aFormat.SetDataType (GL_FLOAT); - #endif + aFormat.SetDataType (theCtx->GraphicsLibrary() == Aspect_GraphicsLibrary_OpenGLES + ? GL_HALF_FLOAT_OES + : GL_FLOAT); } return aFormat; } @@ -515,11 +511,9 @@ OpenGl_TextureFormat OpenGl_TextureFormat::FindSizedFormat (const Handle(OpenGl_ aFormat.SetImageFormat (Image_Format_GrayF); if (theCtx->hasHalfFloatBuffer == OpenGl_FeatureInExtensions) { - #if defined(GL_ES_VERSION_2_0) - aFormat.SetDataType (GL_HALF_FLOAT_OES); - #else - aFormat.SetDataType (GL_FLOAT); - #endif + aFormat.SetDataType (theCtx->GraphicsLibrary() == Aspect_GraphicsLibrary_OpenGLES + ? GL_HALF_FLOAT_OES + : GL_FLOAT); } return aFormat; } @@ -532,11 +526,9 @@ OpenGl_TextureFormat OpenGl_TextureFormat::FindSizedFormat (const Handle(OpenGl_ aFormat.SetImageFormat (Image_Format_RGF_half); if (theCtx->hasHalfFloatBuffer == OpenGl_FeatureInExtensions) { - #if defined(GL_ES_VERSION_2_0) - aFormat.SetDataType (GL_HALF_FLOAT_OES); - #else - aFormat.SetDataType (GL_FLOAT); - #endif + aFormat.SetDataType (theCtx->GraphicsLibrary() == Aspect_GraphicsLibrary_OpenGLES + ? GL_HALF_FLOAT_OES + : GL_FLOAT); } return aFormat; } @@ -554,12 +546,11 @@ OpenGl_TextureFormat OpenGl_TextureFormat::FindSizedFormat (const Handle(OpenGl_ { if (theCtx->ToRenderSRGB()) { - #if defined(GL_ES_VERSION_2_0) - if (!theCtx->IsGlGreaterEqual (3, 0)) + if (theCtx->GraphicsLibrary() == Aspect_GraphicsLibrary_OpenGLES + && !theCtx->IsGlGreaterEqual (3, 0)) { aFormat.SetPixelFormat (GL_SRGB_ALPHA_EXT); } - #endif } else { @@ -582,12 +573,11 @@ OpenGl_TextureFormat OpenGl_TextureFormat::FindSizedFormat (const Handle(OpenGl_ { if (theCtx->ToRenderSRGB()) { - #if defined(GL_ES_VERSION_2_0) - if (!theCtx->IsGlGreaterEqual (3, 0)) + if (theCtx->GraphicsLibrary() == Aspect_GraphicsLibrary_OpenGLES + && !theCtx->IsGlGreaterEqual (3, 0)) { aFormat.SetPixelFormat (GL_SRGB_EXT); } - #endif } else { diff --git a/src/OpenGl/OpenGl_TileSampler.cxx b/src/OpenGl/OpenGl_TileSampler.cxx index 1f28b4671f..3d988e4d1f 100644 --- a/src/OpenGl/OpenGl_TileSampler.cxx +++ b/src/OpenGl/OpenGl_TileSampler.cxx @@ -47,7 +47,7 @@ void OpenGl_TileSampler::GrabVarianceMap (const Handle(OpenGl_Context)& theConte } myVarianceRaw.Init (0); -#if !defined(GL_ES_VERSION_2_0) + theTexture->Bind (theContext); theContext->core11fwd->glPixelStorei (GL_PACK_ALIGNMENT, 1); theContext->core11fwd->glPixelStorei (GL_PACK_ROW_LENGTH, 0); @@ -60,10 +60,6 @@ void OpenGl_TileSampler::GrabVarianceMap (const Handle(OpenGl_Context)& theConte TCollection_AsciiString ("Error! Failed to fetch visual error map from the GPU ") + OpenGl_Context::FormatGlError (anErr)); return; } -#else - // glGetTexImage() is unavailable on OpenGL ES, FBO + glReadPixels() can be used instead - (void )theContext; -#endif const float aFactor = 1.0f / myScaleFactor; for (Standard_Size aColIter = 0; aColIter < myVarianceMap.SizeX; ++aColIter) @@ -274,9 +270,10 @@ bool OpenGl_TileSampler::upload (const Handle(OpenGl_Context)& theContext, { theSamplesTexture->Bind (theContext); theContext->core11fwd->glPixelStorei (GL_UNPACK_ALIGNMENT, 1); - #if !defined(GL_ES_VERSION_2_0) - theContext->core11fwd->glPixelStorei (GL_UNPACK_ROW_LENGTH, 0); - #endif + if (theContext->hasUnpackRowLength) + { + theContext->core11fwd->glPixelStorei (GL_UNPACK_ROW_LENGTH, 0); + } if (theSamplesTexture->SizeX() == (int )myTileSamples.SizeX && theSamplesTexture->SizeY() == (int )myTileSamples.SizeY) { @@ -314,9 +311,10 @@ bool OpenGl_TileSampler::upload (const Handle(OpenGl_Context)& theContext, { theOffsetsTexture->Bind (theContext); theContext->core11fwd->glPixelStorei (GL_UNPACK_ALIGNMENT, 1); - #if !defined(GL_ES_VERSION_2_0) - theContext->core11fwd->glPixelStorei (GL_UNPACK_ROW_LENGTH, 0); - #endif + if (theContext->hasUnpackRowLength) + { + theContext->core11fwd->glPixelStorei (GL_UNPACK_ROW_LENGTH, 0); + } theContext->core11fwd->glTexSubImage2D (GL_TEXTURE_2D, 0, 0, 0, (int )anOffsets.SizeX, (int )anOffsets.SizeY, GL_RG_INTEGER, GL_INT, anOffsets.Data()); if (theContext->core11fwd->glGetError() != GL_NO_ERROR) { diff --git a/src/OpenGl/OpenGl_VertexBuffer.cxx b/src/OpenGl/OpenGl_VertexBuffer.cxx index da052caaa4..a13a70c034 100644 --- a/src/OpenGl/OpenGl_VertexBuffer.cxx +++ b/src/OpenGl/OpenGl_VertexBuffer.cxx @@ -136,13 +136,11 @@ void OpenGl_VertexBuffer::bindAttribute (const Handle(OpenGl_Context)& theCtx, { if (theCtx->ActiveProgram().IsNull()) { - #if !defined(GL_ES_VERSION_2_0) if (theCtx->core11ffp != NULL) { bindFixed (theCtx, theAttribute, theNbComp, theDataType, theStride, theOffset); } else - #endif { // OpenGL handles vertex attribute setup independently from active GLSL program, // but OCCT historically requires program to be bound beforehand (this check could be removed in future). @@ -164,19 +162,16 @@ void OpenGl_VertexBuffer::unbindAttribute (const Handle(OpenGl_Context)& theCt { if (theCtx->ActiveProgram().IsNull()) { - #if !defined(GL_ES_VERSION_2_0) if (theCtx->core11ffp != NULL) { unbindFixed (theCtx, theAttribute); } - #endif return; } theCtx->core20fwd->glDisableVertexAttribArray (theAttribute); } -#if !defined(GL_ES_VERSION_2_0) // ======================================================================= // function : bindFixed // purpose : @@ -255,4 +250,3 @@ void OpenGl_VertexBuffer::unbindFixedColor (const Handle(OpenGl_Context)& theCtx // invalidate FFP material state after GL_COLOR_MATERIAL has modified it (took values from the vertex color) theCtx->ShaderManager()->UpdateMaterialState(); } -#endif diff --git a/src/OpenGl/OpenGl_VertexBuffer.hxx b/src/OpenGl/OpenGl_VertexBuffer.hxx index e423d05988..fc59435972 100644 --- a/src/OpenGl/OpenGl_VertexBuffer.hxx +++ b/src/OpenGl/OpenGl_VertexBuffer.hxx @@ -84,7 +84,7 @@ public: //! @name advanced methods const Graphic3d_TypeOfAttribute theMode); private: -#if !defined(GL_ES_VERSION_2_0) + //! Setup FFP array pointer. Standard_EXPORT static void bindFixed (const Handle(OpenGl_Context)& theGlCtx, const Graphic3d_TypeOfAttribute theMode, @@ -100,7 +100,6 @@ private: //! Disable FFP color array pointer. Standard_EXPORT static void unbindFixedColor (const Handle(OpenGl_Context)& theCtx); -#endif public: //! @name methods for interleaved attributes array //! @return true if buffer contains per-vertex color attribute diff --git a/src/OpenGl/OpenGl_View.cxx b/src/OpenGl/OpenGl_View.cxx index c636f9252b..ec410fc6f8 100644 --- a/src/OpenGl/OpenGl_View.cxx +++ b/src/OpenGl/OpenGl_View.cxx @@ -464,6 +464,7 @@ void OpenGl_View::GraduatedTrihedronMinMaxValues (const Graphic3d_Vec3 theMin, c // ======================================================================= Standard_Boolean OpenGl_View::BufferDump (Image_PixMap& theImage, const Graphic3d_BufferType& theBufferType) { + const Handle(OpenGl_Context)& aCtx = myWorkspace->GetGlContext(); if (theBufferType != Graphic3d_BT_RGB_RayTraceHdrLeft) { return myWorkspace->BufferDump(myFBO, theImage, theBufferType); @@ -474,9 +475,10 @@ Standard_Boolean OpenGl_View::BufferDump (Image_PixMap& theImage, const Graphic3 return myWorkspace->BufferDump(myAccumFrames % 2 ? myRaytraceFBO2[0] : myRaytraceFBO1[0], theImage, theBufferType); } -#if defined(GL_ES_VERSION_2_0) - return false; -#else + if (aCtx->GraphicsLibrary() == Aspect_GraphicsLibrary_OpenGLES) + { + return false; + } if (theImage.Format() != Image_Format_RGBF) { return false; @@ -499,9 +501,9 @@ Standard_Boolean OpenGl_View::BufferDump (Image_PixMap& theImage, const Graphic3 return false; } - glBindTexture (GL_TEXTURE_RECTANGLE, myRaytraceOutputTexture[0]->TextureId()); - glGetTexImage (GL_TEXTURE_RECTANGLE, 0, OpenGl_TextureFormat::Create().Format(), GL_FLOAT, &aValues[0]); - glBindTexture (GL_TEXTURE_RECTANGLE, 0); + aCtx->core11fwd->glBindTexture (GL_TEXTURE_RECTANGLE, myRaytraceOutputTexture[0]->TextureId()); + aCtx->core11fwd->glGetTexImage (GL_TEXTURE_RECTANGLE, 0, OpenGl_TextureFormat::Create().Format(), GL_FLOAT, &aValues[0]); + aCtx->core11fwd->glBindTexture (GL_TEXTURE_RECTANGLE, 0); for (unsigned int aRow = 0; aRow < aH; aRow += 2) { for (unsigned int aCol = 0; aCol < aW; aCol += 3) @@ -515,7 +517,6 @@ Standard_Boolean OpenGl_View::BufferDump (Image_PixMap& theImage, const Graphic3 } return true; -#endif } // ======================================================================= @@ -989,7 +990,7 @@ void OpenGl_View::drawBackground (const Handle(OpenGl_Workspace)& theWorkspace, } #ifdef GL_DEPTH_CLAMP - const bool wasDepthClamped = aCtx->arbDepthClamp && glIsEnabled (GL_DEPTH_CLAMP); + const bool wasDepthClamped = aCtx->arbDepthClamp && aCtx->core11fwd->glIsEnabled (GL_DEPTH_CLAMP); if (aCtx->arbDepthClamp && !wasDepthClamped) { // make sure background is always drawn (workaround skybox rendering on some hardware) @@ -1280,14 +1281,18 @@ bool OpenGl_View::prepareFrameBuffers (Graphic3d_Camera::Projection& theProj) if (!aCtx->GetResource (THE_SHARED_ENV_LUT_KEY, anEnvLUT)) { bool toConvertHalfFloat = false; - #if defined(GL_ES_VERSION_2_0) + // GL_RG32F is not texture-filterable format in OpenGL ES without OES_texture_float_linear extension. // GL_RG16F is texture-filterable since OpenGL ES 3.0 or OpenGL ES 2.0 + OES_texture_half_float_linear. // OpenGL ES 3.0 allows initialization of GL_RG16F from 32-bit float data, but OpenGL ES 2.0 + OES_texture_half_float does not. // Note that it is expected that GL_RG16F has enough precision for this table, so that it can be used also on desktop OpenGL. - const bool hasHalfFloat = aCtx->IsGlGreaterEqual (3, 0) || aCtx->CheckExtension ("GL_OES_texture_half_float_linear"); - toConvertHalfFloat = !aCtx->IsGlGreaterEqual (3, 0) && hasHalfFloat; - #endif + const bool hasHalfFloat = aCtx->GraphicsLibrary() == Aspect_GraphicsLibrary_OpenGLES + && (aCtx->IsGlGreaterEqual (3, 0) || aCtx->CheckExtension ("GL_OES_texture_half_float_linear")); + if (aCtx->GraphicsLibrary() == Aspect_GraphicsLibrary_OpenGLES) + { + toConvertHalfFloat = !aCtx->IsGlGreaterEqual (3, 0) && hasHalfFloat; + } + Image_Format anImgFormat = Image_Format_UNKNOWN; if (aCtx->arbTexRG) { @@ -1330,13 +1335,12 @@ bool OpenGl_View::prepareFrameBuffers (Graphic3d_Camera::Projection& theProj) } OpenGl_TextureFormat aTexFormat = OpenGl_TextureFormat::FindFormat (aCtx, aPixMap->Format(), false); - #if defined(GL_ES_VERSION_2_0) - if (aTexFormat.IsValid() + if (aCtx->GraphicsLibrary() == Aspect_GraphicsLibrary_OpenGLES + && aTexFormat.IsValid() && hasHalfFloat) { aTexFormat.SetInternalFormat (aCtx->arbTexRG ? GL_RG16F : GL_RGBA16F); } - #endif Handle(Graphic3d_TextureParams) aParams = new Graphic3d_TextureParams(); aParams->SetFilter (Graphic3d_TOTF_BILINEAR); @@ -1677,18 +1681,14 @@ void OpenGl_View::Redraw() anImmFbosOit[1] = NULL; } - #if !defined(GL_ES_VERSION_2_0) aCtx->SetReadDrawBuffer (aStereoMode == Graphic3d_StereoMode_QuadBuffer ? GL_BACK_LEFT : GL_BACK); - #endif aCtx->SetResolution (myRenderParams.Resolution, myRenderParams.ResolutionRatio(), aMainFbos[0] != NULL ? myRenderParams.RenderResolutionScale : 1.0f); redraw (Graphic3d_Camera::Projection_MonoLeftEye, aMainFbos[0], aMainFbosOit[0]); myBackBufferRestored = Standard_True; myIsImmediateDrawn = Standard_False; - #if !defined(GL_ES_VERSION_2_0) aCtx->SetReadDrawBuffer (aStereoMode == Graphic3d_StereoMode_QuadBuffer ? GL_BACK_LEFT : GL_BACK); - #endif aCtx->SetResolution (myRenderParams.Resolution, myRenderParams.ResolutionRatio(), anImmFbos[0] != NULL ? myRenderParams.RenderResolutionScale : 1.0f); if (!redrawImmediate (Graphic3d_Camera::Projection_MonoLeftEye, aMainFbos[0], anImmFbos[0], anImmFbosOit[0])) @@ -1708,18 +1708,15 @@ void OpenGl_View::Redraw() { blitBuffers (aMainFbos[0], anXRFbo); // resize or resolve MSAA samples } - #if !defined(GL_ES_VERSION_2_0) - const Aspect_GraphicsLibrary aGraphicsLib = Aspect_GraphicsLibrary_OpenGL; - #else - const Aspect_GraphicsLibrary aGraphicsLib = Aspect_GraphicsLibrary_OpenGLES; - #endif + const Aspect_GraphicsLibrary aGraphicsLib = aCtx->GraphicsLibrary(); myXRSession->SubmitEye ((void* )(size_t )anXRFbo->ColorTexture()->TextureId(), aGraphicsLib, Aspect_ColorSpace_sRGB, Aspect_Eye_Left); } - #if !defined(GL_ES_VERSION_2_0) - aCtx->SetReadDrawBuffer (aStereoMode == Graphic3d_StereoMode_QuadBuffer ? GL_BACK_RIGHT : GL_BACK); - #endif + if (aCtx->GraphicsLibrary() != Aspect_GraphicsLibrary_OpenGLES) + { + aCtx->SetReadDrawBuffer (aStereoMode == Graphic3d_StereoMode_QuadBuffer ? GL_BACK_RIGHT : GL_BACK); + } aCtx->SetResolution (myRenderParams.Resolution, myRenderParams.ResolutionRatio(), aMainFbos[1] != NULL ? myRenderParams.RenderResolutionScale : 1.0f); @@ -1741,11 +1738,8 @@ void OpenGl_View::Redraw() { blitBuffers (aMainFbos[1], anXRFbo); // resize or resolve MSAA samples } - #if !defined(GL_ES_VERSION_2_0) - const Aspect_GraphicsLibrary aGraphicsLib = Aspect_GraphicsLibrary_OpenGL; - #else - const Aspect_GraphicsLibrary aGraphicsLib = Aspect_GraphicsLibrary_OpenGLES; - #endif + + const Aspect_GraphicsLibrary aGraphicsLib = aCtx->GraphicsLibrary(); myXRSession->SubmitEye ((void* )(size_t )anXRFbo->ColorTexture()->TextureId(), aGraphicsLib, Aspect_ColorSpace_sRGB, Aspect_Eye_Right); aCtx->core11fwd->glFinish(); @@ -1778,12 +1772,10 @@ void OpenGl_View::Redraw() anImmFboOit = myImmediateSceneFbosOit[0]->IsValid() ? myImmediateSceneFbosOit[0].operator->() : NULL; } - #if !defined(GL_ES_VERSION_2_0) if (aMainFbo == NULL) { aCtx->SetReadDrawBuffer (GL_BACK); } - #endif aCtx->SetResolution (myRenderParams.Resolution, myRenderParams.ResolutionRatio(), aMainFbo != aFrameBuffer ? myRenderParams.RenderResolutionScale : 1.0f); @@ -1920,12 +1912,10 @@ void OpenGl_View::RedrawImmediate() { aCtx->arbFBO->glBindFramebuffer (GL_FRAMEBUFFER, OpenGl_FrameBuffer::NO_FRAMEBUFFER); } - #if !defined(GL_ES_VERSION_2_0) if (anImmFbos[0] == NULL) { aCtx->SetReadDrawBuffer (aStereoMode == Graphic3d_StereoMode_QuadBuffer ? GL_BACK_LEFT : GL_BACK); } - #endif aCtx->SetResolution (myRenderParams.Resolution, myRenderParams.ResolutionRatio(), anImmFbos[0] != NULL ? myRenderParams.RenderResolutionScale : 1.0f); @@ -1946,12 +1936,10 @@ void OpenGl_View::RedrawImmediate() { aCtx->arbFBO->glBindFramebuffer (GL_FRAMEBUFFER, OpenGl_FrameBuffer::NO_FRAMEBUFFER); } - #if !defined(GL_ES_VERSION_2_0) if (anImmFbos[1] == NULL) { aCtx->SetReadDrawBuffer (aStereoMode == Graphic3d_StereoMode_QuadBuffer ? GL_BACK_RIGHT : GL_BACK); } - #endif aCtx->SetResolution (myRenderParams.Resolution, myRenderParams.ResolutionRatio(), anImmFbos[1] != NULL ? myRenderParams.RenderResolutionScale : 1.0f); toSwap = redrawImmediate (Graphic3d_Camera::Projection_MonoRightEye, @@ -1974,12 +1962,10 @@ void OpenGl_View::RedrawImmediate() anImmFbo = myImmediateSceneFbos[0].operator->(); anImmFboOit = myImmediateSceneFbosOit[0]->IsValid() ? myImmediateSceneFbosOit[0].operator->() : NULL; } - #if !defined(GL_ES_VERSION_2_0) if (aMainFbo == NULL) { aCtx->SetReadDrawBuffer (GL_BACK); } - #endif aCtx->SetResolution (myRenderParams.Resolution, myRenderParams.ResolutionRatio(), anImmFbo != aFrameBuffer ? myRenderParams.RenderResolutionScale : 1.0f); toSwap = redrawImmediate (aProjectType, @@ -2090,9 +2076,10 @@ bool OpenGl_View::redrawImmediate (const Graphic3d_Camera::Projection theProject } else if (theDrawFbo == NULL) { - #if !defined(GL_ES_VERSION_2_0) - aCtx->core11fwd->glGetBooleanv (GL_DOUBLEBUFFER, &toCopyBackToFront); - #endif + if (aCtx->GraphicsLibrary() != Aspect_GraphicsLibrary_OpenGLES) + { + aCtx->core11fwd->glGetBooleanv (GL_DOUBLEBUFFER, &toCopyBackToFront); + } if (toCopyBackToFront && myTransientDrawToFront) { @@ -2204,7 +2191,6 @@ void OpenGl_View::render (Graphic3d_Camera::Projection theProjection, && theOutputFBO != NULL && theOutputFBO->NbSamples() != 0); -#if !defined(GL_ES_VERSION_2_0) // Disable current clipping planes if (aContext->core11ffp != NULL) { @@ -2214,7 +2200,6 @@ void OpenGl_View::render (Graphic3d_Camera::Projection theProjection, aContext->core11fwd->glDisable (aClipPlaneId); } } -#endif // update states of OpenGl_BVHTreeSelector (frustum culling algorithm); // note that we pass here window dimensions ignoring Graphic3d_RenderingParams::RenderResolutionScale @@ -2262,20 +2247,17 @@ void OpenGl_View::render (Graphic3d_Camera::Projection theProjection, drawBackground (myWorkspace, theProjection); } -#if !defined(GL_ES_VERSION_2_0) // Switch off lighting by default if (aContext->core11ffp != NULL && aContext->caps->ffpEnable) { aContext->core11fwd->glDisable (GL_LIGHTING); } -#endif // ================================= // Step 3: Redraw main plane // ================================= -#if !defined(GL_ES_VERSION_2_0) // if the view is scaled normal vectors are scaled to unit // length for correct displaying of shaded objects const gp_Pnt anAxialScale = aContext->Camera()->AxialScale(); @@ -2289,7 +2271,6 @@ void OpenGl_View::render (Graphic3d_Camera::Projection theProjection, { aContext->SetGlNormalizeEnabled (Standard_False); } -#endif aManager->SetShadingModel (OpenGl_ShaderManager::PBRShadingModelFallback (myRenderParams.ShadingModel, checkPBRAvailability())); @@ -2558,14 +2539,15 @@ void OpenGl_View::bindDefaultFbo (OpenGl_FrameBuffer* theCustomFbo) } else { - #if !defined(GL_ES_VERSION_2_0) - aCtx->SetReadDrawBuffer (GL_BACK); - #else - if (aCtx->arbFBO != NULL) + if (aCtx->GraphicsLibrary() != Aspect_GraphicsLibrary_OpenGLES) + { + aCtx->SetReadDrawBuffer (GL_BACK); + } + else if (aCtx->arbFBO != NULL) { aCtx->arbFBO->glBindFramebuffer (GL_FRAMEBUFFER, OpenGl_FrameBuffer::NO_FRAMEBUFFER); } - #endif + const Standard_Integer aViewport[4] = { 0, 0, myWindow->Width(), myWindow->Height() }; aCtx->ResizeViewport (aViewport); } @@ -2744,13 +2726,12 @@ bool OpenGl_View::blitBuffers (OpenGl_FrameBuffer* theReadFbo, aCtx->core20fwd->glDepthFunc (GL_ALWAYS); aCtx->core20fwd->glDepthMask (GL_TRUE); aCtx->core20fwd->glEnable (GL_DEPTH_TEST); - #if defined(GL_ES_VERSION_2_0) - if (!aCtx->IsGlGreaterEqual (3, 0) - && !aCtx->extFragDepth) + if (aCtx->GraphicsLibrary() == Aspect_GraphicsLibrary_OpenGLES + && !aCtx->IsGlGreaterEqual (3, 0) + && !aCtx->extFragDepth) { aCtx->core20fwd->glDisable (GL_DEPTH_TEST); } - #endif aCtx->BindTextures (Handle(OpenGl_TextureSet)(), Handle(OpenGl_ShaderProgram)()); @@ -2995,7 +2976,6 @@ void OpenGl_View::drawStereoPair (OpenGl_FrameBuffer* theDrawFbo) bool OpenGl_View::copyBackToFront() { myIsImmediateDrawn = Standard_False; -#if !defined(GL_ES_VERSION_2_0) const Handle(OpenGl_Context)& aCtx = myWorkspace->GetGlContext(); if (aCtx->core11ffp == NULL) { @@ -3056,9 +3036,6 @@ bool OpenGl_View::copyBackToFront() // read/write from front buffer now aCtx->SetReadBuffer (aCtx->DrawBuffer()); return true; -#else - return false; -#endif } // ======================================================================= diff --git a/src/OpenGl/OpenGl_View_Raytrace.cxx b/src/OpenGl/OpenGl_View_Raytrace.cxx index 7b3b171877..91894ef2ff 100644 --- a/src/OpenGl/OpenGl_View_Raytrace.cxx +++ b/src/OpenGl/OpenGl_View_Raytrace.cxx @@ -600,11 +600,7 @@ Handle(OpenGl_TriangleSet) OpenGl_View::addRaytracePrimitiveArray (const OpenGl_ const Handle(Graphic3d_Buffer)& anAttribs = theArray->Attributes(); if (theArray->DrawMode() < GL_TRIANGLES - #ifndef GL_ES_VERSION_2_0 || theArray->DrawMode() > GL_POLYGON - #else - || theArray->DrawMode() > GL_TRIANGLE_FAN - #endif || anAttribs.IsNull()) { return Handle(OpenGl_TriangleSet)(); @@ -755,11 +751,9 @@ Standard_Boolean OpenGl_View::addRaytraceVertexIndices (OpenGl_TriangleSet& case GL_TRIANGLES: return addRaytraceTriangleArray (theSet, theMatID, theCount, theOffset, theArray.Indices()); case GL_TRIANGLE_FAN: return addRaytraceTriangleFanArray (theSet, theMatID, theCount, theOffset, theArray.Indices()); case GL_TRIANGLE_STRIP: return addRaytraceTriangleStripArray (theSet, theMatID, theCount, theOffset, theArray.Indices()); - #if !defined(GL_ES_VERSION_2_0) case GL_QUAD_STRIP: return addRaytraceQuadrangleStripArray (theSet, theMatID, theCount, theOffset, theArray.Indices()); case GL_QUADS: return addRaytraceQuadrangleArray (theSet, theMatID, theCount, theOffset, theArray.Indices()); case GL_POLYGON: return addRaytracePolygonArray (theSet, theMatID, theCount, theOffset, theArray.Indices()); - #endif } return Standard_False; @@ -1031,16 +1025,14 @@ const TCollection_AsciiString OpenGl_View::ShaderSource::EMPTY_PREFIX; TCollection_AsciiString OpenGl_View::ShaderSource::Source (const Handle(OpenGl_Context)& theCtx, const GLenum theType) const { - TCollection_AsciiString aVersion = - #if defined(GL_ES_VERSION_2_0) - "#version 320 es\n"; - #else - "#version 140\n"; - #endif + TCollection_AsciiString aVersion = theCtx->GraphicsLibrary() == Aspect_GraphicsLibrary_OpenGLES + ? "#version 320 es\n" + : "#version 140\n"; + TCollection_AsciiString aPrecisionHeader; - if (theType == GL_FRAGMENT_SHADER) + if (theType == GL_FRAGMENT_SHADER + && theCtx->GraphicsLibrary() == Aspect_GraphicsLibrary_OpenGLES) { - #if defined(GL_ES_VERSION_2_0) aPrecisionHeader = theCtx->hasHighp ? "precision highp float;\n" "precision highp int;\n" @@ -1050,9 +1042,6 @@ TCollection_AsciiString OpenGl_View::ShaderSource::Source (const Handle(OpenGl_C "precision mediump int;\n" "precision mediump samplerBuffer;\n" "precision mediump isamplerBuffer;\n"; - #else - (void )theCtx; - #endif } if (myPrefix.IsEmpty()) { @@ -1480,25 +1469,28 @@ Standard_Boolean OpenGl_View::initRaytraceResources (const Standard_Integer theS { myAccumFrames = 0; // accumulation should be restarted - #if defined(GL_ES_VERSION_2_0) - if (!theGlContext->IsGlGreaterEqual (3, 2)) - { - return safeFailBack ("Ray-tracing requires OpenGL ES 3.2 and higher", theGlContext); - } - #else - if (!theGlContext->IsGlGreaterEqual (3, 1)) - { - return safeFailBack ("Ray-tracing requires OpenGL 3.1 and higher", theGlContext); - } - else if (!theGlContext->arbTboRGB32) + if (theGlContext->GraphicsLibrary() == Aspect_GraphicsLibrary_OpenGLES) { - return safeFailBack ("Ray-tracing requires OpenGL 4.0+ or GL_ARB_texture_buffer_object_rgb32 extension", theGlContext); + if (!theGlContext->IsGlGreaterEqual (3, 2)) + { + return safeFailBack ("Ray-tracing requires OpenGL ES 3.2 and higher", theGlContext); + } } - else if (!theGlContext->arbFBOBlit) + else { - return safeFailBack ("Ray-tracing requires EXT_framebuffer_blit extension", theGlContext); + if (!theGlContext->IsGlGreaterEqual (3, 1)) + { + return safeFailBack ("Ray-tracing requires OpenGL 3.1 and higher", theGlContext); + } + else if (!theGlContext->arbTboRGB32) + { + return safeFailBack ("Ray-tracing requires OpenGL 4.0+ or GL_ARB_texture_buffer_object_rgb32 extension", theGlContext); + } + else if (!theGlContext->arbFBOBlit) + { + return safeFailBack ("Ray-tracing requires EXT_framebuffer_blit extension", theGlContext); + } } - #endif myRaytraceParameters.NbBounces = myRenderParams.RaytracingDepth; @@ -2119,19 +2111,22 @@ void OpenGl_View::updatePerspCameraPT (const OpenGl_Mat4& theOrientati // ======================================================================= Standard_Boolean OpenGl_View::uploadRaytraceData (const Handle(OpenGl_Context)& theGlContext) { -#if defined(GL_ES_VERSION_2_0) - if (!theGlContext->IsGlGreaterEqual (3, 2)) + if (theGlContext->GraphicsLibrary() == Aspect_GraphicsLibrary_OpenGLES) { - Message::SendFail() << "Error: OpenGL ES version is less than 3.2"; - return Standard_False; + if (!theGlContext->IsGlGreaterEqual (3, 2)) + { + Message::SendFail() << "Error: OpenGL ES version is less than 3.2"; + return Standard_False; + } } -#else - if (!theGlContext->IsGlGreaterEqual (3, 1)) + else { - Message::SendFail() << "Error: OpenGL version is less than 3.1"; - return Standard_False; + if (!theGlContext->IsGlGreaterEqual (3, 1)) + { + Message::SendFail() << "Error: OpenGL version is less than 3.1"; + return Standard_False; + } } -#endif myAccumFrames = 0; // accumulation should be restarted @@ -2748,7 +2743,6 @@ void OpenGl_View::bindRaytraceTextures (const Handle(OpenGl_Context)& theGlConte if (myRaytraceParameters.AdaptiveScreenSampling && myRaytraceParameters.GlobalIllumination) { - #if !defined(GL_ES_VERSION_2_0) theGlContext->core42->glBindImageTexture (OpenGl_RT_OutputImage, myRaytraceOutputTexture[theStereoView]->TextureId(), 0, GL_TRUE, 0, GL_READ_WRITE, GL_R32F); theGlContext->core42->glBindImageTexture (OpenGl_RT_VisualErrorImage, @@ -2763,9 +2757,6 @@ void OpenGl_View::bindRaytraceTextures (const Handle(OpenGl_Context)& theGlConte theGlContext->core42->glBindImageTexture (OpenGl_RT_TileSamplesImage, myRaytraceTileSamplesTexture[theStereoView]->TextureId(), 0, GL_TRUE, 0, GL_READ_WRITE, GL_R32I); } - #else - (void )theStereoView; - #endif } const Handle(OpenGl_TextureSet)& anEnvTextureSet = myRaytraceParameters.CubemapForBack @@ -2996,15 +2987,11 @@ Standard_Boolean OpenGl_View::runPathtrace (const Standard_Integer myTileSampler.UploadSamples (theGlContext, myRaytraceTileSamplesTexture[aFBOIdx], false); } - #if !defined(GL_ES_VERSION_2_0) theGlContext->core44->glClearTexImage (myRaytraceOutputTexture[aFBOIdx]->TextureId(), 0, GL_RED, GL_FLOAT, NULL); - #endif } // Clear adaptive screen sampling images - #if !defined(GL_ES_VERSION_2_0) theGlContext->core44->glClearTexImage (myRaytraceVisualErrorTexture[aFBOIdx]->TextureId(), 0, GL_RED_INTEGER, GL_INT, NULL); - #endif } bindRaytraceTextures (theGlContext, aFBOIdx); @@ -3065,9 +3052,7 @@ Standard_Boolean OpenGl_View::runPathtrace (const Standard_Integer theGlContext->core20fwd->glDrawArrays (GL_TRIANGLES, 0, 6); if (myRaytraceParameters.AdaptiveScreenSampling) { - #if !defined(GL_ES_VERSION_2_0) theGlContext->core44->glMemoryBarrier (GL_SHADER_IMAGE_ACCESS_BARRIER_BIT); - #endif } } aRenderImageFramebuffer->UnbindBuffer (theGlContext); diff --git a/src/OpenGl/OpenGl_Window.cxx b/src/OpenGl/OpenGl_Window.cxx index 89140cdea7..711fa1a243 100644 --- a/src/OpenGl/OpenGl_Window.cxx +++ b/src/OpenGl/OpenGl_Window.cxx @@ -804,17 +804,15 @@ void OpenGl_Window::Init() // #endif - glDisable (GL_DITHER); - glDisable (GL_SCISSOR_TEST); + myGlContext->core11fwd->glDisable (GL_DITHER); + myGlContext->core11fwd->glDisable (GL_SCISSOR_TEST); const Standard_Integer aViewport[4] = { 0, 0, myWidth, myHeight }; myGlContext->ResizeViewport (aViewport); -#if !defined(GL_ES_VERSION_2_0) myGlContext->SetDrawBuffer (GL_BACK); if (myGlContext->core11ffp != NULL) { - glMatrixMode (GL_MODELVIEW); + myGlContext->core11ffp->glMatrixMode (GL_MODELVIEW); } -#endif } // ======================================================================= diff --git a/src/OpenGl/OpenGl_Workspace.cxx b/src/OpenGl/OpenGl_Workspace.cxx index 8b927eb652..9ff9e1ba81 100644 --- a/src/OpenGl/OpenGl_Workspace.cxx +++ b/src/OpenGl/OpenGl_Workspace.cxx @@ -124,7 +124,6 @@ OpenGl_Workspace::OpenGl_Workspace (OpenGl_View* theView, const Handle(OpenGl_Wi myGlContext->core11fwd->glPixelStorei (GL_UNPACK_ALIGNMENT, 1); // General initialization of the context - #if !defined(GL_ES_VERSION_2_0) if (myGlContext->core11ffp != NULL) { // enable two-side lighting by default @@ -136,15 +135,17 @@ OpenGl_Workspace::OpenGl_Workspace (OpenGl_View* theView, const Handle(OpenGl_Wi } } - myGlContext->core11fwd->glHint (GL_LINE_SMOOTH_HINT, GL_FASTEST); - myGlContext->core11fwd->glHint (GL_POLYGON_SMOOTH_HINT, GL_FASTEST); + if (myGlContext->GraphicsLibrary() != Aspect_GraphicsLibrary_OpenGLES) + { + myGlContext->core11fwd->glHint (GL_LINE_SMOOTH_HINT, GL_FASTEST); + myGlContext->core11fwd->glHint (GL_POLYGON_SMOOTH_HINT, GL_FASTEST); + } if (myGlContext->Vendor() == "microsoft corporation" && !myGlContext->IsGlGreaterEqual (1, 2)) { // this software implementation causes too slow rendering into GL_FRONT on modern Windows theView->SetImmediateModeDrawToFront (false); } - #endif } myNoneCulling .Aspect()->SetFaceCulling (Graphic3d_TypeOfBackfacingModel_DoubleSided); @@ -171,11 +172,9 @@ Standard_Boolean OpenGl_Workspace::Activate() { if (myGlContext->caps->ffpEnable) { - #if defined(GL_ES_VERSION_2_0) - Message::SendWarning ("Warning: FFP is unsupported by OpenGL ES"); - #else - Message::SendWarning ("Warning: FFP is unsupported by OpenGL Core Profile"); - #endif + Message::SendWarning (myGlContext->GraphicsLibrary() != Aspect_GraphicsLibrary_OpenGLES + ? "Warning: FFP is unsupported by OpenGL ES" + : "Warning: FFP is unsupported by OpenGL Core Profile"); myGlContext->caps->ffpEnable = false; } } @@ -187,12 +186,10 @@ Standard_Boolean OpenGl_Workspace::Activate() myGlContext->caps->useZeroToOneDepth = false; } myView->Camera()->SetZeroToOneDepth (myGlContext->caps->useZeroToOneDepth); -#if !defined(GL_ES_VERSION_2_0) if (myGlContext->arbClipControl) { myGlContext->Functions()->glClipControl (GL_LOWER_LEFT, myGlContext->caps->useZeroToOneDepth ? GL_ZERO_TO_ONE : GL_NEGATIVE_ONE_TO_ONE); } -#endif ResetAppliedAspect(); @@ -305,18 +302,14 @@ const OpenGl_Aspects* OpenGl_Workspace::ApplyAspects (bool theToBindTextures) if (myAspectsApplied.IsNull() || myAspectsApplied->InteriorStyle() != anIntstyle) { - #if !defined(GL_ES_VERSION_2_0) myGlContext->SetPolygonMode (anIntstyle == Aspect_IS_POINT ? GL_POINT : GL_FILL); myGlContext->SetPolygonHatchEnabled (anIntstyle == Aspect_IS_HATCH); - #endif } -#if !defined(GL_ES_VERSION_2_0) if (anIntstyle == Aspect_IS_HATCH) { myGlContext->SetPolygonHatchStyle (myAspectsSet->Aspect()->HatchStyle()); } -#endif // Case of hidden line if (anIntstyle == Aspect_IS_HIDDENLINE) diff --git a/src/OpenGlTest/OpenGlTest_Commands.cxx b/src/OpenGlTest/OpenGlTest_Commands.cxx index 792ee68113..be6785cf38 100644 --- a/src/OpenGlTest/OpenGlTest_Commands.cxx +++ b/src/OpenGlTest/OpenGlTest_Commands.cxx @@ -199,7 +199,7 @@ void VUserDrawObj::Render(const Handle(OpenGl_Workspace)& theWorkspace) const // Finally draw something to make sure UserDraw really works aVertBuffer->BindAttribute (aCtx, Graphic3d_TOA_POS); - glDrawArrays(GL_LINE_LOOP, 0, aVertBuffer->GetElemsNb()); + aCtx->core11fwd->glDrawArrays (GL_LINE_LOOP, 0, aVertBuffer->GetElemsNb()); aVertBuffer->UnbindAttribute(aCtx, Graphic3d_TOA_POS); aVertBuffer->Release (aCtx.get()); } @@ -350,10 +350,15 @@ static int VGlDebug (Draw_Interpretor& theDI, const char** theArgVec) { Handle(OpenGl_GraphicDriver) aDriver; + Handle(OpenGl_Context) aGlCtx; Handle(V3d_View) aView = ViewerTest::CurrentView(); if (!aView.IsNull()) { aDriver = Handle(OpenGl_GraphicDriver)::DownCast (aView->Viewer()->Driver()); + if (!aDriver.IsNull()) + { + aGlCtx = aDriver->GetSharedContext(); + } } OpenGl_Caps* aDefCaps = getDefaultCaps().get(); OpenGl_Caps* aCaps = !aDriver.IsNull() ? &aDriver->ChangeOptions() : NULL; @@ -365,15 +370,15 @@ static int VGlDebug (Draw_Interpretor& theDI, { aCaps = aDefCaps; } - else + else if (!aGlCtx.IsNull()) { - Standard_Boolean isActive = OpenGl_Context::CheckExtension ((const char* )::glGetString (GL_EXTENSIONS), + Standard_Boolean isActive = OpenGl_Context::CheckExtension ((const char* )aGlCtx->core11fwd->glGetString (GL_EXTENSIONS), "GL_ARB_debug_output"); aDebActive = isActive ? " (active)" : " (inactive)"; if (isActive) { // GL_DEBUG_OUTPUT_SYNCHRONOUS_ARB - aSyncActive = ::glIsEnabled (0x8242) == GL_TRUE ? " (active)" : " (inactive)"; + aSyncActive = aGlCtx->core11fwd->glIsEnabled (0x8242) == GL_TRUE ? " (active)" : " (inactive)"; } } From 4af354e6ed080a03678e881506107d6862b14dd1 Mon Sep 17 00:00:00 2001 From: kgv Date: Tue, 7 Dec 2021 12:21:04 +0300 Subject: [PATCH 167/639] 0032720: Coding Rules - rename glext.h to OpenGl_glext.h --- src/OpenGl/FILES | 2 +- src/OpenGl/OpenGl_GlFunctions.hxx | 2 +- src/OpenGl/{glext.h => OpenGl_glext.h} | 0 3 files changed, 2 insertions(+), 2 deletions(-) rename src/OpenGl/{glext.h => OpenGl_glext.h} (100%) diff --git a/src/OpenGl/FILES b/src/OpenGl/FILES index c15c132dc6..990a881650 100755 --- a/src/OpenGl/FILES +++ b/src/OpenGl/FILES @@ -1,4 +1,4 @@ -glext.h +OpenGl_glext.h OpenGl_khrplatform.h OpenGl_ArbDbg.hxx OpenGl_ArbFBO.hxx diff --git a/src/OpenGl/OpenGl_GlFunctions.hxx b/src/OpenGl/OpenGl_GlFunctions.hxx index 351fe717a3..1009a9fe07 100644 --- a/src/OpenGl/OpenGl_GlFunctions.hxx +++ b/src/OpenGl/OpenGl_GlFunctions.hxx @@ -58,7 +58,7 @@ struct Aspect_XDisplay; #undef GL_COPY_WRITE_BUFFER_BINDING #endif // include glext.h provided by Khronos group -#include +#include class OpenGl_Context; diff --git a/src/OpenGl/glext.h b/src/OpenGl/OpenGl_glext.h similarity index 100% rename from src/OpenGl/glext.h rename to src/OpenGl/OpenGl_glext.h From f4f9ce4b77e5051b56bacda7c7ea160ac60abb1f Mon Sep 17 00:00:00 2001 From: kgv Date: Wed, 8 Dec 2021 22:45:18 +0300 Subject: [PATCH 168/639] 0032727: Coding Rules - eliminate CLang warning -Wshorten-64-to-32 in MessageView_ActionsTest.cxx --- tools/MessageView/MessageView_ActionsTest.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/MessageView/MessageView_ActionsTest.cxx b/tools/MessageView/MessageView_ActionsTest.cxx index c085a11de2..afa98b16f9 100644 --- a/tools/MessageView/MessageView_ActionsTest.cxx +++ b/tools/MessageView/MessageView_ActionsTest.cxx @@ -150,7 +150,7 @@ void MessageView_ActionsTest::OnTestMetric() return; OCCT_ADD_MESSAGE_LEVEL_SENTRY ("MessageModel_Actions::OnTestMetric()"); - unsigned int start_time = clock(); + clock_t start_time = clock(); Standard_Integer aCounter = 1500; Standard_Real aValue = 0., aValue2 = 0.1; @@ -172,7 +172,7 @@ void MessageView_ActionsTest::OnTestMetric() myTreeModel->UpdateTreeModel(); - unsigned int end_time = clock(); + clock_t end_time = clock(); std::cout << "clock() = " << end_time - start_time << std::endl; } From e3dae4a9f33a1b478184d3513a1b6f360aef09a7 Mon Sep 17 00:00:00 2001 From: kgv Date: Tue, 7 Dec 2021 20:07:04 +0300 Subject: [PATCH 169/639] 0032723: Draw Harness, ViewerTest - sloppy animation in WebGL Fixed emscripten_async_call() calls to use requestAnimationFrame() instead of setTimeout(). ViewerTest_EventManager::handleViewRedraw() - fixed queuing new onWasmRedrawView() before previous one has been processed (leading to multiplying of pending redraws executed at the same time). RWGltf_TriangulationReader::readDracoBuffer - suppressed CLang compilation warnings. --- samples/webgl/WasmOcctView.cpp | 16 ++++++---- samples/webgl/WasmOcctView.h | 2 +- src/RWGltf/RWGltf_TriangulationReader.cxx | 2 +- src/Standard/Standard_WarningsDisable.hxx | 1 + src/ViewerTest/ViewerTest_EventManager.cxx | 37 ++++++++++++++-------- src/ViewerTest/ViewerTest_EventManager.hxx | 9 +++++- 6 files changed, 44 insertions(+), 23 deletions(-) diff --git a/samples/webgl/WasmOcctView.cpp b/samples/webgl/WasmOcctView.cpp index 53e0096030..8aa88568b9 100644 --- a/samples/webgl/WasmOcctView.cpp +++ b/samples/webgl/WasmOcctView.cpp @@ -114,7 +114,7 @@ WasmOcctView& WasmOcctView::Instance() // ================================================================ WasmOcctView::WasmOcctView() : myDevicePixelRatio (1.0f), - myUpdateRequests (0) + myNbUpdateRequests (0) { addActionHotKeys (Aspect_VKey_NavForward, Aspect_VKey_W, Aspect_VKey_W | Aspect_VKeyFlags_SHIFT); addActionHotKeys (Aspect_VKey_NavBackward , Aspect_VKey_S, Aspect_VKey_S | Aspect_VKeyFlags_SHIFT); @@ -395,9 +395,11 @@ void WasmOcctView::ProcessInput() // Queue onRedrawView()/redrawView callback to redraw canvas after all user input is flushed by browser. // Redrawing viewer on every single message would be a pointless waste of resources, // as user will see only the last drawn frame due to WebGL implementation details. - if (++myUpdateRequests == 1) + // -1 in emscripten_async_call() redirects to requestAnimationFrame(); + // requestPostAnimationFrame() is a better under development alternative. + if (++myNbUpdateRequests == 1) { - emscripten_async_call (onRedrawView, this, 0); + emscripten_async_call (onRedrawView, this, -1); } } } @@ -424,6 +426,7 @@ void WasmOcctView::redrawView() { if (!myView.IsNull()) { + myNbUpdateRequests = 0; FlushViewEvents (myContext, myView, true); } } @@ -435,13 +438,14 @@ void WasmOcctView::redrawView() void WasmOcctView::handleViewRedraw (const Handle(AIS_InteractiveContext)& theCtx, const Handle(V3d_View)& theView) { - myUpdateRequests = 0; AIS_ViewController::handleViewRedraw (theCtx, theView); if (myToAskNextFrame) { // ask more frames - ++myUpdateRequests; - emscripten_async_call (onRedrawView, this, 0); + if (++myNbUpdateRequests == 1) + { + emscripten_async_call (onRedrawView, this, -1); + } } } diff --git a/samples/webgl/WasmOcctView.h b/samples/webgl/WasmOcctView.h index 58921a6bed..e5be3c6cb3 100644 --- a/samples/webgl/WasmOcctView.h +++ b/samples/webgl/WasmOcctView.h @@ -249,7 +249,7 @@ class WasmOcctView : protected AIS_ViewController TCollection_AsciiString myCanvasId; //!< canvas element id on HTML page Graphic3d_Vec2i myWinSizeOld; float myDevicePixelRatio; //!< device pixel ratio for handling high DPI displays - unsigned int myUpdateRequests; //!< counter for unhandled update requests + unsigned int myNbUpdateRequests; //!< counter for unhandled update requests }; diff --git a/src/RWGltf/RWGltf_TriangulationReader.cxx b/src/RWGltf/RWGltf_TriangulationReader.cxx index 16ad9b9fa6..c528ae6134 100644 --- a/src/RWGltf/RWGltf_TriangulationReader.cxx +++ b/src/RWGltf/RWGltf_TriangulationReader.cxx @@ -224,7 +224,7 @@ bool RWGltf_TriangulationReader::readDracoBuffer (const Handle(RWGltf_GltfLatePr #ifdef HAVE_DRACO std::vector aReadData; - aReadData.resize (theGltfData.StreamLength); + aReadData.resize ((size_t )theGltfData.StreamLength); aSharedStream->read (aReadData.data(), (std::streamsize )theGltfData.StreamLength); if (!aSharedStream->good()) { diff --git a/src/Standard/Standard_WarningsDisable.hxx b/src/Standard/Standard_WarningsDisable.hxx index ca47a76d8e..25000d5991 100644 --- a/src/Standard/Standard_WarningsDisable.hxx +++ b/src/Standard/Standard_WarningsDisable.hxx @@ -31,6 +31,7 @@ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wall" #pragma clang diagnostic ignored "-Wextra" + #pragma clang diagnostic ignored "-Wshorten-64-to-32" #elif defined(_MSC_VER) #pragma warning(push, 0) #elif defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6)) diff --git a/src/ViewerTest/ViewerTest_EventManager.cxx b/src/ViewerTest/ViewerTest_EventManager.cxx index 3335af811f..772dd1f984 100644 --- a/src/ViewerTest/ViewerTest_EventManager.cxx +++ b/src/ViewerTest/ViewerTest_EventManager.cxx @@ -38,17 +38,25 @@ #include #include - //! Callback flushing events and redrawing the WebGL canvas. - static void onWasmRedrawView (void* ) +//======================================================================= +//function : onWasmRedrawView +//purpose : +//======================================================================= +void ViewerTest_EventManager::onWasmRedrawView (void* ) +{ + Handle(ViewerTest_EventManager) aViewCtrl = ViewerTest::CurrentEventManager(); + if (!aViewCtrl.IsNull()) { - Handle(ViewerTest_EventManager) aViewCtrl = ViewerTest::CurrentEventManager(); + aViewCtrl->myNbUpdateRequests = 0; + const Handle(V3d_View)& aView = ViewerTest::CurrentView(); const Handle(AIS_InteractiveContext)& aCtx = ViewerTest::GetAISContext(); - if (!aViewCtrl.IsNull() && !aView.IsNull() && !aCtx.IsNull()) + if (!aView.IsNull() && !aCtx.IsNull()) { aViewCtrl->ProcessExpose(); } } +} #endif Standard_IMPORT Standard_Boolean Draw_Interprete (const char* theCommand); @@ -76,7 +84,7 @@ ViewerTest_EventManager::ViewerTest_EventManager (const Handle(V3d_View)& myView (theView), myToPickPnt (Standard_False), myIsTmpContRedraw (Standard_False), - myUpdateRequests (0) + myNbUpdateRequests (0) { myViewAnimation = GlobalViewAnimation(); @@ -183,7 +191,6 @@ void ViewerTest_EventManager::ProcessExpose() void ViewerTest_EventManager::handleViewRedraw (const Handle(AIS_InteractiveContext)& theCtx, const Handle(V3d_View)& theView) { - myUpdateRequests = 0; AIS_ViewController::handleViewRedraw (theCtx, theView); // On non-Windows platforms Aspect_Window::InvalidateContent() from rendering thread does not work as expected @@ -202,10 +209,12 @@ void ViewerTest_EventManager::handleViewRedraw (const Handle(AIS_InteractiveCont } // ask more frames - ++myUpdateRequests; - #if defined(__EMSCRIPTEN__) - emscripten_async_call (onWasmRedrawView, this, 0); - #endif + if (++myNbUpdateRequests == 1) + { + #if defined(__EMSCRIPTEN__) + emscripten_async_call (onWasmRedrawView, this, -1); + #endif + } } else if (myIsTmpContRedraw) { @@ -256,11 +265,11 @@ void ViewerTest_EventManager::ProcessInput() // Queue onWasmRedrawView() callback to redraw canvas after all user input is flushed by browser. // Redrawing viewer on every single message would be a pointless waste of resources, // as user will see only the last drawn frame due to WebGL implementation details. - if (++myUpdateRequests == 1) + // -1 in emscripten_async_call() redirects to requestAnimationFrame(); + // requestPostAnimationFrame() is a better under development alternative. + if (++myNbUpdateRequests == 1) { - #if defined(__EMSCRIPTEN__) - emscripten_async_call (onWasmRedrawView, this, 0); - #endif + emscripten_async_call (onWasmRedrawView, this, -1); } #else // handle synchronously diff --git a/src/ViewerTest/ViewerTest_EventManager.hxx b/src/ViewerTest/ViewerTest_EventManager.hxx index 23dfe7dcee..0bfbe32727 100644 --- a/src/ViewerTest/ViewerTest_EventManager.hxx +++ b/src/ViewerTest/ViewerTest_EventManager.hxx @@ -138,6 +138,13 @@ protected: unsigned int theModifNew, double theTimeStamp); +private: + +#if defined(__EMSCRIPTEN__) + //! Callback flushing events and redrawing the WebGL canvas. + static void onWasmRedrawView (void* ); +#endif + private: Handle(AIS_InteractiveContext) myCtx; @@ -148,7 +155,7 @@ private: Standard_Boolean myToPickPnt; Standard_Boolean myIsTmpContRedraw; - unsigned int myUpdateRequests; //!< counter for unhandled update requests + unsigned int myNbUpdateRequests; //!< counter for unhandled update requests }; From e463b2f685d8c815f8a7ab996c6843808e8b1430 Mon Sep 17 00:00:00 2001 From: kgv Date: Wed, 8 Dec 2021 15:55:11 +0300 Subject: [PATCH 170/639] 0032725: Visualization - Graphic3d_Structure::SetDisplayPriority() should use public enumeration Graphic3d_DisplayPriority Added new enumeration Graphic3d_DisplayPriority. Graphic3d_Layer now defines a fixed-length array of priorities. Properties Graphic3d_CStructure::Id, Priority, PreviousPriority have been wrapped into methods. --- src/AIS/AIS_Axis.cxx | 1 - src/AIS/AIS_Circle.cxx | 2 - src/AIS/AIS_InteractiveContext.cxx | 8 +-- src/AIS/AIS_InteractiveContext.hxx | 9 +++- src/AIS/AIS_Line.cxx | 2 - src/AIS/AIS_PlaneTrihedron.cxx | 1 - src/AIS/AIS_Shape.cxx | 19 ++++--- src/AIS/AIS_TexturedShape.cxx | 20 +++---- src/Graphic3d/FILES | 2 +- src/Graphic3d/Graphic3d_CStructure.cxx | 17 +++--- src/Graphic3d/Graphic3d_CStructure.hxx | 28 +++++++--- src/Graphic3d/Graphic3d_CView.cxx | 4 +- src/Graphic3d/Graphic3d_CView.hxx | 8 +-- src/Graphic3d/Graphic3d_DisplayPriority.hxx | 40 ++++++++++++++ src/Graphic3d/Graphic3d_GraphicDriver.cxx | 14 ++--- src/Graphic3d/Graphic3d_Group.cxx | 1 - src/Graphic3d/Graphic3d_Layer.cxx | 57 ++++++++------------ src/Graphic3d/Graphic3d_Layer.hxx | 19 ++++--- src/Graphic3d/Graphic3d_Structure.cxx | 34 ++++++------ src/Graphic3d/Graphic3d_Structure.hxx | 42 +++++++-------- src/Graphic3d/Graphic3d_Structure.pxx | 23 -------- src/Graphic3d/Graphic3d_StructureManager.cxx | 4 +- src/Graphic3d/Graphic3d_StructureManager.hxx | 4 +- src/MeshVS/MeshVS_Mesh.cxx | 2 +- src/OpenGl/OpenGl_GraphicDriver.cxx | 6 +-- src/OpenGl/OpenGl_LayerList.cxx | 23 ++++---- src/OpenGl/OpenGl_LayerList.hxx | 15 +++--- src/OpenGl/OpenGl_View.cxx | 6 +-- src/OpenGl/OpenGl_View.hxx | 4 +- src/OpenGl/OpenGl_View_Raytrace.cxx | 8 +-- src/PrsMgr/PrsMgr_PresentationManager.cxx | 16 +++--- src/PrsMgr/PrsMgr_PresentationManager.hxx | 7 +-- src/SelectMgr/SelectMgr_ViewerSelector.cxx | 4 +- src/V3d/V3d_CircularGrid.cxx | 2 +- src/V3d/V3d_Plane.cxx | 2 +- src/V3d/V3d_RectangularGrid.cxx | 2 +- src/V3d/V3d_Trihedron.cxx | 2 +- src/ViewerTest/ViewerTest_ObjectCommands.cxx | 10 ++-- src/XCAFPrs/XCAFPrs_AISObject.cxx | 2 +- 39 files changed, 237 insertions(+), 233 deletions(-) create mode 100644 src/Graphic3d/Graphic3d_DisplayPriority.hxx delete mode 100644 src/Graphic3d/Graphic3d_Structure.pxx diff --git a/src/AIS/AIS_Axis.cxx b/src/AIS/AIS_Axis.cxx index 2be1c37c20..e4864120f4 100644 --- a/src/AIS/AIS_Axis.cxx +++ b/src/AIS/AIS_Axis.cxx @@ -188,7 +188,6 @@ void AIS_Axis::Compute (const Handle(PrsMgr_PresentationManager)& , const Standard_Integer ) { thePrs->SetInfiniteState (myInfiniteState); - thePrs->SetDisplayPriority (5); if (!myIsXYZAxis) { GeomAdaptor_Curve curv (myComponent); diff --git a/src/AIS/AIS_Circle.cxx b/src/AIS/AIS_Circle.cxx index 08160855aa..9a8371f70f 100644 --- a/src/AIS/AIS_Circle.cxx +++ b/src/AIS/AIS_Circle.cxx @@ -76,8 +76,6 @@ void AIS_Circle::Compute (const Handle(PrsMgr_PresentationManager)& , const Handle(Prs3d_Presentation)& thePrs, const Standard_Integer ) { - thePrs->SetDisplayPriority (5); - if (myCircleIsArc) { ComputeArc (thePrs); } else { ComputeCircle (thePrs); } } diff --git a/src/AIS/AIS_InteractiveContext.cxx b/src/AIS/AIS_InteractiveContext.cxx index ae54206b16..427dd5a08e 100644 --- a/src/AIS/AIS_InteractiveContext.cxx +++ b/src/AIS/AIS_InteractiveContext.cxx @@ -882,11 +882,11 @@ Standard_Boolean AIS_InteractiveContext::IsDisplayed (const Handle(AIS_Interacti //function : DisplayPriority //purpose : //======================================================================= -Standard_Integer AIS_InteractiveContext::DisplayPriority (const Handle(AIS_InteractiveObject)& theIObj) const +Graphic3d_DisplayPriority AIS_InteractiveContext::DisplayPriority (const Handle(AIS_InteractiveObject)& theIObj) const { if (theIObj.IsNull()) { - return -1; + return Graphic3d_DisplayPriority_INVALID; } const Handle(AIS_GlobalStatus)* aStatus = myObjects.Seek (theIObj); @@ -901,7 +901,7 @@ Standard_Integer AIS_InteractiveContext::DisplayPriority (const Handle(AIS_Inter : 0); return myMainPM->DisplayPriority (theIObj, aDispMode); } - return 0; + return Graphic3d_DisplayPriority_INVALID; } //======================================================================= @@ -909,7 +909,7 @@ Standard_Integer AIS_InteractiveContext::DisplayPriority (const Handle(AIS_Inter //purpose : //======================================================================= void AIS_InteractiveContext::SetDisplayPriority (const Handle(AIS_InteractiveObject)& theIObj, - const Standard_Integer thePriority) + const Graphic3d_DisplayPriority thePriority) { if (theIObj.IsNull()) { diff --git a/src/AIS/AIS_InteractiveContext.hxx b/src/AIS/AIS_InteractiveContext.hxx index 8faa035d4f..acbb8741ef 100644 --- a/src/AIS/AIS_InteractiveContext.hxx +++ b/src/AIS/AIS_InteractiveContext.hxx @@ -276,10 +276,15 @@ public: //! @name highlighting management public: //! @name object presence management (View affinity, Layer, Priority) //! Returns the display priority of the Object. - Standard_EXPORT Standard_Integer DisplayPriority (const Handle(AIS_InteractiveObject)& theIObj) const; + Standard_EXPORT Graphic3d_DisplayPriority DisplayPriority (const Handle(AIS_InteractiveObject)& theIObj) const; //! Sets the display priority of the seen parts presentation of the Object. - Standard_EXPORT void SetDisplayPriority (const Handle(AIS_InteractiveObject)& theIObj, const Standard_Integer thePriority); + Standard_EXPORT void SetDisplayPriority (const Handle(AIS_InteractiveObject)& theIObj, + const Graphic3d_DisplayPriority thePriority); + + Standard_DEPRECATED("Deprecated since OCCT7.7, Graphic3d_DisplayPriority should be passed instead of integer number to SetDisplayPriority()") + void SetDisplayPriority (const Handle(AIS_InteractiveObject)& theIObj, + const Standard_Integer thePriority) { SetDisplayPriority (theIObj, (Graphic3d_DisplayPriority )thePriority); } //! Get Z layer id set for displayed interactive object. Standard_EXPORT Graphic3d_ZLayerId GetZLayer (const Handle(AIS_InteractiveObject)& theIObj) const; diff --git a/src/AIS/AIS_Line.cxx b/src/AIS/AIS_Line.cxx index b3d92c5c33..db9bf36c55 100644 --- a/src/AIS/AIS_Line.cxx +++ b/src/AIS/AIS_Line.cxx @@ -69,8 +69,6 @@ void AIS_Line::Compute (const Handle(PrsMgr_PresentationManager)&, const Handle(Prs3d_Presentation)& thePrs, const Standard_Integer ) { - thePrs->SetDisplayPriority (5); - if (!myLineIsSegment) { ComputeInfiniteLine (thePrs); } else { ComputeSegmentLine (thePrs); } } diff --git a/src/AIS/AIS_PlaneTrihedron.cxx b/src/AIS/AIS_PlaneTrihedron.cxx index d7e8426510..bafe6a3c3a 100644 --- a/src/AIS/AIS_PlaneTrihedron.cxx +++ b/src/AIS/AIS_PlaneTrihedron.cxx @@ -153,7 +153,6 @@ void AIS_PlaneTrihedron::Compute (const Handle(PrsMgr_PresentationManager)& , const Handle(Prs3d_Presentation)& thePrs, const Standard_Integer ) { - thePrs->SetDisplayPriority (5); // drawing axis in X direction gp_Pnt first, last; Standard_Real value = myDrawer->DatumAspect()->AxisLength(Prs3d_DatumParts_XAxis); diff --git a/src/AIS/AIS_Shape.cxx b/src/AIS/AIS_Shape.cxx index 5fcb6fa631..41ed66f0db 100644 --- a/src/AIS/AIS_Shape.cxx +++ b/src/AIS/AIS_Shape.cxx @@ -121,22 +121,21 @@ void AIS_Shape::Compute (const Handle(PrsMgr_PresentationManager)& , const Handle(Prs3d_Presentation)& thePrs, const Standard_Integer theMode) { - if (myshape.IsNull()) + if (myshape.IsNull() + || (myshape.ShapeType() == TopAbs_COMPOUND && myshape.NbChildren() == 0)) { return; } // wire,edge,vertex -> pas de HLR + priorite display superieure - const Standard_Integer aShapeType = (Standard_Integer )myshape.ShapeType(); - if (aShapeType > 4 && aShapeType < 8) + if (myshape.ShapeType() >= TopAbs_WIRE + && myshape.ShapeType() <= TopAbs_VERTEX) { + // TopAbs_WIRE -> 7, TopAbs_EDGE -> 8, TopAbs_VERTEX -> 9 (Graphic3d_DisplayPriority_Highlight) + const Standard_Integer aPrior = (Standard_Integer )Graphic3d_DisplayPriority_Above1 + + (Standard_Integer )myshape.ShapeType() - TopAbs_WIRE; thePrs->SetVisual (Graphic3d_TOS_ALL); - thePrs->SetDisplayPriority (aShapeType + 2); - } - // Shape vide -> Assemblage vide. - if (myshape.ShapeType() == TopAbs_COMPOUND && myshape.NbChildren() == 0) - { - return; + thePrs->SetDisplayPriority ((Graphic3d_DisplayPriority )aPrior); } if (IsInfinite()) @@ -238,7 +237,7 @@ void AIS_Shape::computeHlrPresentation (const Handle(Graphic3d_Camera)& theProje case TopAbs_EDGE: case TopAbs_WIRE: { - thePrs->SetDisplayPriority (4); + thePrs->SetDisplayPriority (Graphic3d_DisplayPriority_Below); StdPrs_WFShape::Add (thePrs, theShape, theDrawer); return; } diff --git a/src/AIS/AIS_TexturedShape.cxx b/src/AIS/AIS_TexturedShape.cxx index e42990c8d2..80c20d7aed 100644 --- a/src/AIS/AIS_TexturedShape.cxx +++ b/src/AIS/AIS_TexturedShape.cxx @@ -349,24 +349,20 @@ void AIS_TexturedShape::Compute (const Handle(PrsMgr_PresentationManager)& , const Handle(Prs3d_Presentation)& thePrs, const Standard_Integer theMode) { - if (myshape.IsNull()) + if (myshape.IsNull() + || (myshape.ShapeType() == TopAbs_COMPOUND && myshape.NbChildren() == 0)) { return; } - if (myshape.ShapeType() > TopAbs_FACE && myshape.ShapeType() < TopAbs_SHAPE) + if (myshape.ShapeType() >= TopAbs_WIRE + && myshape.ShapeType() <= TopAbs_VERTEX) { + // TopAbs_WIRE -> 7, TopAbs_EDGE -> 8, TopAbs_VERTEX -> 9 (Graphic3d_DisplayPriority_Highlight) + const Standard_Integer aPrior = (Standard_Integer )Graphic3d_DisplayPriority_Above1 + + (Standard_Integer )myshape.ShapeType() - TopAbs_WIRE; thePrs->SetVisual (Graphic3d_TOS_ALL); - thePrs->SetDisplayPriority (myshape.ShapeType() + 2); - } - - if (myshape.ShapeType() == TopAbs_COMPOUND) - { - TopExp_Explorer anExplor (myshape, TopAbs_VERTEX); - if (!anExplor.More()) - { - return; - } + thePrs->SetDisplayPriority ((Graphic3d_DisplayPriority )aPrior); } if (IsInfinite()) diff --git a/src/Graphic3d/FILES b/src/Graphic3d/FILES index 6ab739fb89..71ca2e7dff 100755 --- a/src/Graphic3d/FILES +++ b/src/Graphic3d/FILES @@ -64,6 +64,7 @@ Graphic3d_CView.hxx Graphic3d_DataStructureManager.cxx Graphic3d_DataStructureManager.hxx Graphic3d_DiagnosticInfo.hxx +Graphic3d_DisplayPriority.hxx Graphic3d_FrameStats.cxx Graphic3d_FrameStats.hxx Graphic3d_FrameStatsCounter.hxx @@ -139,7 +140,6 @@ Graphic3d_ShaderVariable.lxx Graphic3d_StereoMode.hxx Graphic3d_Structure.cxx Graphic3d_Structure.hxx -Graphic3d_Structure.pxx Graphic3d_StructureDefinitionError.hxx Graphic3d_StructureManager.cxx Graphic3d_StructureManager.hxx diff --git a/src/Graphic3d/Graphic3d_CStructure.cxx b/src/Graphic3d/Graphic3d_CStructure.cxx index bfde61d4b0..cf7b7c6b64 100644 --- a/src/Graphic3d/Graphic3d_CStructure.cxx +++ b/src/Graphic3d/Graphic3d_CStructure.cxx @@ -14,7 +14,6 @@ #include -#include "Graphic3d_Structure.pxx" #include #include #include @@ -27,11 +26,11 @@ IMPLEMENT_STANDARD_RTTIEXT(Graphic3d_CStructure,Standard_Transient) //purpose : //============================================================================= Graphic3d_CStructure::Graphic3d_CStructure (const Handle(Graphic3d_StructureManager)& theManager) -: Priority (Structure_MAX_PRIORITY / 2), - PreviousPriority (Structure_MAX_PRIORITY / 2), - // - myGraphicDriver (theManager->GraphicDriver()), +: myGraphicDriver (theManager->GraphicDriver()), + myId (-1), myZLayer (Graphic3d_ZLayerId_Default), + myPriority (Graphic3d_DisplayPriority_Normal), + myPreviousPriority(Graphic3d_DisplayPriority_Normal), myIsCulled (Standard_True), myBndBoxClipCheck(Standard_True), myHasGroupTrsf (Standard_False), @@ -45,7 +44,7 @@ Graphic3d_CStructure::Graphic3d_CStructure (const Handle(Graphic3d_StructureMana IsMutable (Standard_False), Is2dText (Standard_False) { - Id = myGraphicDriver->NewIdentification(); + myId = myGraphicDriver->NewIdentification(); } //======================================================================= @@ -62,10 +61,10 @@ void Graphic3d_CStructure::DumpJson (Standard_OStream& theOStream, Standard_Inte OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, aGroup.get()) } - OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, Id) + OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myId) OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myZLayer) - OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, Priority) - OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, PreviousPriority) + OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myPriority) + OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myPreviousPriority) OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, IsInfinite) OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, stick) diff --git a/src/Graphic3d/Graphic3d_CStructure.hxx b/src/Graphic3d/Graphic3d_CStructure.hxx index b80d78ba44..8c37f5172d 100644 --- a/src/Graphic3d/Graphic3d_CStructure.hxx +++ b/src/Graphic3d/Graphic3d_CStructure.hxx @@ -16,6 +16,7 @@ #define _Graphic3d_CStructure_HeaderFile #include +#include #include #include #include @@ -139,6 +140,21 @@ public: //! highlight flag is set to true const Handle(Graphic3d_PresentationAttributes)& HighlightStyle() const { return myHighlightStyle; } + //! Return structure id (generated by Graphic3d_GraphicDriver::NewIdentification() during structure construction). + Standard_Integer Identification() const { return myId; } + + //! Return structure display priority. + Graphic3d_DisplayPriority Priority() const { return myPriority; } + + //! Set structure display priority. + void SetPriority (Graphic3d_DisplayPriority thePriority) { myPriority = thePriority; } + + //! Return previous structure display priority. + Graphic3d_DisplayPriority PreviousPriority() const { return myPreviousPriority; } + + //! Set previous structure display priority. + void SetPreviousPriority (Graphic3d_DisplayPriority thePriority) { myPreviousPriority = thePriority; } + public: //! Returns FALSE if the structure hits the current view volume, otherwise returns TRUE. @@ -184,8 +200,7 @@ public: //! Highlights structure with the given style virtual void GraphicHighlight (const Handle(Graphic3d_PresentationAttributes)& theStyle) = 0; - //! Unhighlights the structure and invalidates pointer to structure's highlight - //! style + //! Unhighlights the structure and invalidates pointer to structure's highlight style virtual void GraphicUnhighlight() = 0; //! Create shadow link to this structure @@ -207,10 +222,6 @@ public: Handle(Graphic3d_ViewAffinity) ViewAffinity; //!< view affinity mask - Standard_Integer Id; - Standard_Integer Priority; - Standard_Integer PreviousPriority; - protected: //! Create empty structure. @@ -226,7 +237,10 @@ protected: Handle(Graphic3d_SequenceOfHClipPlane) myClipPlanes; Handle(Graphic3d_PresentationAttributes) myHighlightStyle; //! Current highlight style; is set only if highlight flag is true - Graphic3d_ZLayerId myZLayer; + Standard_Integer myId; + Graphic3d_ZLayerId myZLayer; + Graphic3d_DisplayPriority myPriority; + Graphic3d_DisplayPriority myPreviousPriority; mutable Standard_Boolean myIsCulled; //!< A status specifying is structure needs to be rendered after BVH tree traverse Standard_Boolean myBndBoxClipCheck; //!< Flag responsible for checking of bounding box clipping before drawing of object diff --git a/src/Graphic3d/Graphic3d_CView.cxx b/src/Graphic3d/Graphic3d_CView.cxx index 6718b60ebf..a97efe8692 100644 --- a/src/Graphic3d/Graphic3d_CView.cxx +++ b/src/Graphic3d/Graphic3d_CView.cxx @@ -959,8 +959,8 @@ Standard_Boolean Graphic3d_CView::IsDisplayed (const Handle(Graphic3d_Structure) // purpose : // ======================================================================= void Graphic3d_CView::ChangePriority (const Handle(Graphic3d_Structure)& theStructure, - const Standard_Integer /*theOldPriority*/, - const Standard_Integer theNewPriority) + const Graphic3d_DisplayPriority /*theOldPriority*/, + const Graphic3d_DisplayPriority theNewPriority) { if (!IsActive() || !IsDisplayed (theStructure)) diff --git a/src/Graphic3d/Graphic3d_CView.hxx b/src/Graphic3d/Graphic3d_CView.hxx index 13cf37e1eb..d10a127240 100644 --- a/src/Graphic3d/Graphic3d_CView.hxx +++ b/src/Graphic3d/Graphic3d_CView.hxx @@ -212,8 +212,8 @@ private: //! Changes the display priority of the structure. Standard_EXPORT void ChangePriority (const Handle(Graphic3d_Structure)& theStructure, - const Standard_Integer theOldPriority, - const Standard_Integer theNewPriority); + const Graphic3d_DisplayPriority theOldPriority, + const Graphic3d_DisplayPriority theNewPriority); //! Change Z layer of already displayed structure in the view. Standard_EXPORT void ChangeZLayer (const Handle(Graphic3d_Structure)& theStructure, @@ -551,7 +551,7 @@ private: //! Adds the structure to display lists of the view. virtual void displayStructure (const Handle(Graphic3d_CStructure)& theStructure, - const Standard_Integer thePriority) = 0; + const Graphic3d_DisplayPriority thePriority) = 0; //! Erases the structure from display lists of the view. virtual void eraseStructure (const Handle(Graphic3d_CStructure)& theStructure) = 0; @@ -562,7 +562,7 @@ private: //! Changes the priority of a structure within its Z layer in the specified view. virtual void changePriority (const Handle(Graphic3d_CStructure)& theCStructure, - const Standard_Integer theNewPriority) = 0; + const Graphic3d_DisplayPriority theNewPriority) = 0; protected: diff --git a/src/Graphic3d/Graphic3d_DisplayPriority.hxx b/src/Graphic3d/Graphic3d_DisplayPriority.hxx new file mode 100644 index 0000000000..81015503b8 --- /dev/null +++ b/src/Graphic3d/Graphic3d_DisplayPriority.hxx @@ -0,0 +1,40 @@ +// Copyright (c) 1995-1999 Matra Datavision +// Copyright (c) 1999-2014 OPEN CASCADE SAS +// +// This file is part of Open CASCADE Technology software library. +// +// This library is free software; you can redistribute it and/or modify it under +// the terms of the GNU Lesser General Public License version 2.1 as published +// by the Free Software Foundation, with special exception defined in the file +// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT +// distribution for complete text of the license and disclaimer of any warranty. +// +// Alternatively, this file may be used under the terms of Open CASCADE +// commercial license or contractual agreement. + +#ifndef _Graphic3d_DisplayPriority_HeaderFile +#define _Graphic3d_DisplayPriority_HeaderFile + +#include + +//! Structure priority - range (do not change this range!). +//! Values are between 0 and 10, with 5 used by default. +//! A structure of priority 10 is displayed the last and appears over the others (considering depth test). +enum Graphic3d_DisplayPriority +{ + Graphic3d_DisplayPriority_INVALID = -1, + Graphic3d_DisplayPriority_Bottom = 0, + Graphic3d_DisplayPriority_AlmostBottom = 1, + Graphic3d_DisplayPriority_Below3 = 2, + Graphic3d_DisplayPriority_Below2 = 3, + Graphic3d_DisplayPriority_Below = 4, + Graphic3d_DisplayPriority_Normal = 5, + Graphic3d_DisplayPriority_Above = 6, + Graphic3d_DisplayPriority_Above1 = 7, + Graphic3d_DisplayPriority_Above2 = 8, + Graphic3d_DisplayPriority_Highlight = 9, + Graphic3d_DisplayPriority_Topmost = 10, +}; +enum { Graphic3d_DisplayPriority_NB = Graphic3d_DisplayPriority_Topmost - Graphic3d_DisplayPriority_Bottom + 1 }; + +#endif // _Graphic3d_DisplayPriority_HeaderFile diff --git a/src/Graphic3d/Graphic3d_GraphicDriver.cxx b/src/Graphic3d/Graphic3d_GraphicDriver.cxx index 4395ff576a..3717f05d65 100644 --- a/src/Graphic3d/Graphic3d_GraphicDriver.cxx +++ b/src/Graphic3d/Graphic3d_GraphicDriver.cxx @@ -38,7 +38,7 @@ Graphic3d_GraphicDriver::Graphic3d_GraphicDriver (const Handle(Aspect_DisplayCon aSettings.SetEnableDepthWrite (Standard_False); aSettings.SetClearDepth (Standard_False); aSettings.SetPolygonOffset (Graphic3d_PolygonOffset()); - Handle(Graphic3d_Layer) aLayer = new Graphic3d_Layer (Graphic3d_ZLayerId_BotOSD, 1, Handle(Select3D_BVHBuilder3d)()); + Handle(Graphic3d_Layer) aLayer = new Graphic3d_Layer (Graphic3d_ZLayerId_BotOSD, Handle(Select3D_BVHBuilder3d)()); aLayer->SetLayerSettings (aSettings); myLayers.Append (aLayer); myLayerIds.Bind (aLayer->LayerId(), aLayer); @@ -54,7 +54,7 @@ Graphic3d_GraphicDriver::Graphic3d_GraphicDriver (const Handle(Aspect_DisplayCon aSettings.SetEnableDepthWrite (Standard_True); aSettings.SetClearDepth (Standard_False); aSettings.SetPolygonOffset (Graphic3d_PolygonOffset()); - Handle(Graphic3d_Layer) aLayer = new Graphic3d_Layer (Graphic3d_ZLayerId_Default, 1, Handle(Select3D_BVHBuilder3d)()); + Handle(Graphic3d_Layer) aLayer = new Graphic3d_Layer (Graphic3d_ZLayerId_Default, Handle(Select3D_BVHBuilder3d)()); aLayer->SetLayerSettings (aSettings); myLayers.Append (aLayer); myLayerIds.Bind (aLayer->LayerId(), aLayer); @@ -70,7 +70,7 @@ Graphic3d_GraphicDriver::Graphic3d_GraphicDriver (const Handle(Aspect_DisplayCon aSettings.SetEnableDepthWrite (Standard_True); aSettings.SetClearDepth (Standard_False); aSettings.SetPolygonOffset (Graphic3d_PolygonOffset()); - Handle(Graphic3d_Layer) aLayer = new Graphic3d_Layer (Graphic3d_ZLayerId_Top, 1, Handle(Select3D_BVHBuilder3d)()); + Handle(Graphic3d_Layer) aLayer = new Graphic3d_Layer (Graphic3d_ZLayerId_Top, Handle(Select3D_BVHBuilder3d)()); aLayer->SetLayerSettings (aSettings); myLayers.Append (aLayer); myLayerIds.Bind (aLayer->LayerId(), aLayer); @@ -86,7 +86,7 @@ Graphic3d_GraphicDriver::Graphic3d_GraphicDriver (const Handle(Aspect_DisplayCon aSettings.SetEnableDepthWrite (Standard_True); aSettings.SetClearDepth (Standard_True); aSettings.SetPolygonOffset (Graphic3d_PolygonOffset()); - Handle(Graphic3d_Layer) aLayer = new Graphic3d_Layer (Graphic3d_ZLayerId_Topmost, 1, Handle(Select3D_BVHBuilder3d)()); + Handle(Graphic3d_Layer) aLayer = new Graphic3d_Layer (Graphic3d_ZLayerId_Topmost, Handle(Select3D_BVHBuilder3d)()); aLayer->SetLayerSettings (aSettings); myLayers.Append (aLayer); myLayerIds.Bind (aLayer->LayerId(), aLayer); @@ -102,7 +102,7 @@ Graphic3d_GraphicDriver::Graphic3d_GraphicDriver (const Handle(Aspect_DisplayCon aSettings.SetEnableDepthWrite (Standard_False); aSettings.SetClearDepth (Standard_False); aSettings.SetPolygonOffset (Graphic3d_PolygonOffset()); - Handle(Graphic3d_Layer) aLayer = new Graphic3d_Layer (Graphic3d_ZLayerId_TopOSD, 1, Handle(Select3D_BVHBuilder3d)()); + Handle(Graphic3d_Layer) aLayer = new Graphic3d_Layer (Graphic3d_ZLayerId_TopOSD, Handle(Select3D_BVHBuilder3d)()); aLayer->SetLayerSettings (aSettings); myLayers.Append (aLayer); myLayerIds.Bind (aLayer->LayerId(), aLayer); @@ -192,7 +192,7 @@ void Graphic3d_GraphicDriver::InsertLayerBefore (const Graphic3d_ZLayerId theNew Standard_ASSERT_RAISE (!myLayerIds.IsBound (theNewLayerId), "Graphic3d_GraphicDriver::InsertLayerBefore, Layer with theLayerId already exists"); - Handle(Graphic3d_Layer) aNewLayer = new Graphic3d_Layer (theNewLayerId, 1, Handle(Select3D_BVHBuilder3d)()); + Handle(Graphic3d_Layer) aNewLayer = new Graphic3d_Layer (theNewLayerId, Handle(Select3D_BVHBuilder3d)()); aNewLayer->SetLayerSettings (theSettings); Handle(Graphic3d_Layer) anOtherLayer; @@ -228,7 +228,7 @@ void Graphic3d_GraphicDriver::InsertLayerAfter (const Graphic3d_ZLayerId theNewL Standard_ASSERT_RAISE (!myLayerIds.IsBound (theNewLayerId), "Graphic3d_GraphicDriver::InsertLayerAfter, Layer with theLayerId already exists"); - Handle(Graphic3d_Layer) aNewLayer = new Graphic3d_Layer (theNewLayerId, 1, Handle(Select3D_BVHBuilder3d)()); + Handle(Graphic3d_Layer) aNewLayer = new Graphic3d_Layer (theNewLayerId, Handle(Select3D_BVHBuilder3d)()); aNewLayer->SetLayerSettings (theSettings); Handle(Graphic3d_Layer) anOtherLayer; diff --git a/src/Graphic3d/Graphic3d_Group.cxx b/src/Graphic3d/Graphic3d_Group.cxx index 1a704ec9d7..7b5cf7bf70 100644 --- a/src/Graphic3d/Graphic3d_Group.cxx +++ b/src/Graphic3d/Graphic3d_Group.cxx @@ -27,7 +27,6 @@ #include #include #include -#include "Graphic3d_Structure.pxx" #include #include #include diff --git a/src/Graphic3d/Graphic3d_Layer.cxx b/src/Graphic3d/Graphic3d_Layer.cxx index f5870fec8c..b6e2d6279c 100644 --- a/src/Graphic3d/Graphic3d_Layer.cxx +++ b/src/Graphic3d/Graphic3d_Layer.cxx @@ -23,10 +23,8 @@ IMPLEMENT_STANDARD_RTTIEXT(Graphic3d_Layer, Standard_Transient) // purpose : // ======================================================================= Graphic3d_Layer::Graphic3d_Layer (Graphic3d_ZLayerId theId, - Standard_Integer theNbPriorities, const Handle(Select3D_BVHBuilder3d)& theBuilder) -: myArray (0, theNbPriorities - 1), - myNbStructures (0), +: myNbStructures (0), myNbStructuresNotCulled (0), myLayerId (theId), myBVHPrimitivesTrsfPers (theBuilder), @@ -50,16 +48,16 @@ Graphic3d_Layer::~Graphic3d_Layer() // purpose : // ======================================================================= void Graphic3d_Layer::Add (const Graphic3d_CStructure* theStruct, - Standard_Integer thePriority, + Graphic3d_DisplayPriority thePriority, Standard_Boolean isForChangePriority) { - const Standard_Integer anIndex = Min (Max (thePriority, 0), myArray.Length() - 1); + const Standard_Integer anIndex = Min (Max (thePriority, Graphic3d_DisplayPriority_Bottom), Graphic3d_DisplayPriority_Topmost); if (theStruct == NULL) { return; } - myArray (anIndex).Add (theStruct); + myArray[anIndex].Add (theStruct); if (theStruct->IsAlwaysRendered()) { theStruct->MarkAsNotCulled(); @@ -87,19 +85,18 @@ void Graphic3d_Layer::Add (const Graphic3d_CStructure* theStruct, // purpose : // ======================================================================= bool Graphic3d_Layer::Remove (const Graphic3d_CStructure* theStruct, - Standard_Integer& thePriority, + Graphic3d_DisplayPriority& thePriority, Standard_Boolean isForChangePriority) { if (theStruct == NULL) { - thePriority = -1; + thePriority = Graphic3d_DisplayPriority_INVALID; return false; } - const Standard_Integer aNbPriorities = myArray.Length(); - for (Standard_Integer aPriorityIter = 0; aPriorityIter < aNbPriorities; ++aPriorityIter) + for (Standard_Integer aPriorityIter = Graphic3d_DisplayPriority_Bottom; aPriorityIter <= Graphic3d_DisplayPriority_Topmost; ++aPriorityIter) { - Graphic3d_IndexedMapOfStructure& aStructures = myArray (aPriorityIter); + Graphic3d_IndexedMapOfStructure& aStructures = myArray[aPriorityIter]; const Standard_Integer anIndex = aStructures.FindIndex (theStruct); if (anIndex == 0) { @@ -133,11 +130,11 @@ bool Graphic3d_Layer::Remove (const Graphic3d_CStructure* theStruct, } } --myNbStructures; - thePriority = aPriorityIter; + thePriority = (Graphic3d_DisplayPriority )aPriorityIter; return true; } - thePriority = -1; + thePriority = Graphic3d_DisplayPriority_INVALID; return false; } @@ -203,9 +200,9 @@ Bnd_Box Graphic3d_Layer::BoundingBox (Standard_Integer theViewId, // Recompute layer bounding box myBoundingBox[aBoxId].SetVoid(); - for (Graphic3d_ArrayOfIndexedMapOfStructure::Iterator aMapIter (myArray); aMapIter.More(); aMapIter.Next()) + for (Standard_Integer aPriorIter = Graphic3d_DisplayPriority_Bottom; aPriorIter <= Graphic3d_DisplayPriority_Topmost; ++aPriorIter) { - const Graphic3d_IndexedMapOfStructure& aStructures = aMapIter.Value(); + const Graphic3d_IndexedMapOfStructure& aStructures = myArray[aPriorIter]; for (Graphic3d_IndexedMapOfStructure::Iterator aStructIter (aStructures); aStructIter.More(); aStructIter.Next()) { const Graphic3d_CStructure* aStructure = aStructIter.Value(); @@ -344,9 +341,9 @@ Standard_Real Graphic3d_Layer::considerZoomPersistenceObjects (Standard_Integer const Graphic3d_Mat4d& aWorldViewMat = theCamera->OrientationMatrix(); Standard_Real aMaxCoef = -std::numeric_limits::max(); - for (Graphic3d_ArrayOfIndexedMapOfStructure::Iterator aMapIter (myArray); aMapIter.More(); aMapIter.Next()) + for (Standard_Integer aPriorIter = Graphic3d_DisplayPriority_Bottom; aPriorIter <= Graphic3d_DisplayPriority_Topmost; ++aPriorIter) { - const Graphic3d_IndexedMapOfStructure& aStructures = aMapIter.Value(); + const Graphic3d_IndexedMapOfStructure& aStructures = myArray[aPriorIter]; for (Graphic3d_IndexedMapOfStructure::Iterator aStructIter (aStructures); aStructIter.More(); aStructIter.Next()) { const Graphic3d_CStructure* aStructure = aStructIter.Value(); @@ -463,9 +460,9 @@ void Graphic3d_Layer::updateBVH() const myBVHPrimitivesTrsfPers.Clear(); myAlwaysRenderedMap.Clear(); myIsBVHPrimitivesNeedsReset = Standard_False; - for (Graphic3d_ArrayOfIndexedMapOfStructure::Iterator aMapIter (myArray); aMapIter.More(); aMapIter.Next()) + for (Standard_Integer aPriorIter = Graphic3d_DisplayPriority_Bottom; aPriorIter <= Graphic3d_DisplayPriority_Topmost; ++aPriorIter) { - const Graphic3d_IndexedMapOfStructure& aStructures = aMapIter.Value(); + const Graphic3d_IndexedMapOfStructure& aStructures = myArray[aPriorIter]; for (Graphic3d_IndexedMapOfStructure::Iterator aStructIter (aStructures); aStructIter.More(); aStructIter.Next()) { const Graphic3d_CStructure* aStruct = aStructIter.Value(); @@ -655,20 +652,13 @@ void Graphic3d_Layer::UpdateCulling (Standard_Integer theViewId, // ======================================================================= Standard_Boolean Graphic3d_Layer::Append (const Graphic3d_Layer& theOther) { - // the source priority list shouldn't have more priorities - const Standard_Integer aNbPriorities = theOther.NbPriorities(); - if (aNbPriorities > NbPriorities()) - { - return Standard_False; - } - // add all structures to destination priority list - for (Standard_Integer aPriorityIter = 0; aPriorityIter < aNbPriorities; ++aPriorityIter) + for (Standard_Integer aPriorityIter = Graphic3d_DisplayPriority_Bottom; aPriorityIter <= Graphic3d_DisplayPriority_Topmost; ++aPriorityIter) { - const Graphic3d_IndexedMapOfStructure& aStructures = theOther.myArray (aPriorityIter); + const Graphic3d_IndexedMapOfStructure& aStructures = theOther.myArray[aPriorityIter]; for (Graphic3d_IndexedMapOfStructure::Iterator aStructIter (aStructures); aStructIter.More(); aStructIter.Next()) { - Add (aStructIter.Value(), aPriorityIter); + Add (aStructIter.Value(), (Graphic3d_DisplayPriority )aPriorityIter); } } @@ -688,9 +678,9 @@ void Graphic3d_Layer::SetLayerSettings (const Graphic3d_ZLayerSettings& theSetti return; } - for (Graphic3d_ArrayOfIndexedMapOfStructure::Iterator aMapIter (myArray); aMapIter.More(); aMapIter.Next()) + for (Standard_Integer aPriorIter = Graphic3d_DisplayPriority_Bottom; aPriorIter <= Graphic3d_DisplayPriority_Topmost; ++aPriorIter) { - Graphic3d_IndexedMapOfStructure& aStructures = aMapIter.ChangeValue(); + Graphic3d_IndexedMapOfStructure& aStructures = myArray[aPriorIter]; for (Graphic3d_IndexedMapOfStructure::Iterator aStructIter (aStructures); aStructIter.More(); aStructIter.Next()) { Graphic3d_CStructure* aStructure = const_cast(aStructIter.Value()); @@ -712,10 +702,9 @@ void Graphic3d_Layer::DumpJson (Standard_OStream& theOStream, Standard_Integer t OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myNbStructures) OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myNbStructuresNotCulled) - const Standard_Integer aNbPriorities = myArray.Length(); - for (Standard_Integer aPriorityIter = 0; aPriorityIter < aNbPriorities; ++aPriorityIter) + for (Standard_Integer aPriorityIter = Graphic3d_DisplayPriority_Bottom; aPriorityIter <= Graphic3d_DisplayPriority_Topmost; ++aPriorityIter) { - const Graphic3d_IndexedMapOfStructure& aStructures = myArray (aPriorityIter); + const Graphic3d_IndexedMapOfStructure& aStructures = myArray[aPriorityIter]; for (Graphic3d_IndexedMapOfStructure::Iterator aStructIter (aStructures); aStructIter.More(); aStructIter.Next()) { const Graphic3d_CStructure* aStructure = aStructIter.Value(); diff --git a/src/Graphic3d/Graphic3d_Layer.hxx b/src/Graphic3d/Graphic3d_Layer.hxx index bd5c3dca8a..7a480075b7 100644 --- a/src/Graphic3d/Graphic3d_Layer.hxx +++ b/src/Graphic3d/Graphic3d_Layer.hxx @@ -16,6 +16,7 @@ #include #include +#include #include #include #include @@ -24,11 +25,13 @@ #include #include +#include + //! Defines index map of structures. typedef NCollection_IndexedMap Graphic3d_IndexedMapOfStructure; //! Defines array of indexed maps of structures. -typedef NCollection_Array1 Graphic3d_ArrayOfIndexedMapOfStructure; +typedef std::array Graphic3d_ArrayOfIndexedMapOfStructure; class Graphic3d_CullingTool; @@ -40,7 +43,6 @@ public: //! Initializes associated priority list and layer properties Standard_EXPORT Graphic3d_Layer (Graphic3d_ZLayerId theId, - Standard_Integer theNbPriorities, const Handle(Select3D_BVHBuilder3d)& theBuilder); //! Destructor. @@ -49,10 +51,10 @@ public: //! Return layer id. Graphic3d_ZLayerId LayerId() const { return myLayerId; } - //! Returns BVH tree builder for frustom culling. + //! Returns BVH tree builder for frustum culling. const Handle(Select3D_BVHBuilder3d)& FrustumCullingBVHBuilder() const { return myBVHPrimitivesTrsfPers.Builder(); } - //! Assigns BVH tree builder for frustom culling. + //! Assigns BVH tree builder for frustum culling. void SetFrustumCullingBVHBuilder (const Handle(Select3D_BVHBuilder3d)& theBuilder) { myBVHPrimitivesTrsfPers.SetBuilder (theBuilder); } //! Return true if layer was marked with immediate flag. @@ -65,12 +67,12 @@ public: Standard_EXPORT void SetLayerSettings (const Graphic3d_ZLayerSettings& theSettings); Standard_EXPORT void Add (const Graphic3d_CStructure* theStruct, - Standard_Integer thePriority, + Graphic3d_DisplayPriority thePriority, Standard_Boolean isForChangePriority = Standard_False); //! Remove structure and returns its priority, if the structure is not found, method returns negative value Standard_EXPORT bool Remove (const Graphic3d_CStructure* theStruct, - Standard_Integer& thePriority, + Graphic3d_DisplayPriority& thePriority, Standard_Boolean isForChangePriority = Standard_False); //! @return the number of structures @@ -80,7 +82,7 @@ public: Standard_Integer NbStructuresNotCulled() const { return myNbStructuresNotCulled; } //! Returns the number of available priority levels - Standard_Integer NbPriorities() const { return myArray.Length(); } + Standard_Integer NbPriorities() const { return Graphic3d_DisplayPriority_NB; } //! Append layer of acceptable type (with similar number of priorities or less). //! Returns Standard_False if the list can not be accepted. @@ -89,6 +91,9 @@ public: //! Returns array of structures. const Graphic3d_ArrayOfIndexedMapOfStructure& ArrayOfStructures() const { return myArray; } + //! Returns structures for specified priority. + const Graphic3d_IndexedMapOfStructure& Structures (Graphic3d_DisplayPriority thePriority) const { return myArray[thePriority]; } + //! Marks BVH tree for given priority list as dirty and //! marks primitive set for rebuild. Standard_EXPORT void InvalidateBVHData(); diff --git a/src/Graphic3d/Graphic3d_Structure.cxx b/src/Graphic3d/Graphic3d_Structure.cxx index 062b264097..92b56ada60 100644 --- a/src/Graphic3d/Graphic3d_Structure.cxx +++ b/src/Graphic3d/Graphic3d_Structure.cxx @@ -27,8 +27,6 @@ #include #include -#include "Graphic3d_Structure.pxx" - #include #include @@ -133,7 +131,7 @@ void Graphic3d_Structure::Remove() } // Destruction of me in the graphic library - const Standard_Integer aStructId = myCStructure->Id; + const Standard_Integer aStructId = myCStructure->Identification(); myCStructure->GraphicDriver()->RemoveIdentification(aStructId); myCStructure->GraphicDriver()->RemoveStructure (myCStructure); myCStructure.Nullify(); @@ -164,25 +162,25 @@ void Graphic3d_Structure::Display() //function : SetDisplayPriority //purpose : //============================================================================= -void Graphic3d_Structure::SetDisplayPriority (const Standard_Integer thePriority) +void Graphic3d_Structure::SetDisplayPriority (const Graphic3d_DisplayPriority thePriority) { if (IsDeleted() - || thePriority == myCStructure->Priority) + || thePriority == myCStructure->Priority()) { return; } - myCStructure->PreviousPriority = myCStructure->Priority; - myCStructure->Priority = thePriority; + Graphic3d_PriorityDefinitionError_Raise_if ((thePriority > Graphic3d_DisplayPriority_Topmost) + || (thePriority < Graphic3d_DisplayPriority_Bottom), + "Bad value for StructurePriority"); - if (myCStructure->Priority != myCStructure->PreviousPriority) + myCStructure->SetPreviousPriority (myCStructure->Priority()); + myCStructure->SetPriority (thePriority); + if (myCStructure->Priority() != myCStructure->PreviousPriority()) { - Graphic3d_PriorityDefinitionError_Raise_if ((myCStructure->Priority > Structure_MAX_PRIORITY) - || (myCStructure->Priority < Structure_MIN_PRIORITY), - "Bad value for StructurePriority"); if (myCStructure->stick) { - myStructureManager->ChangeDisplayPriority (this, myCStructure->PreviousPriority, myCStructure->Priority); + myStructureManager->ChangeDisplayPriority (this, myCStructure->PreviousPriority(), myCStructure->Priority()); } } } @@ -194,16 +192,16 @@ void Graphic3d_Structure::SetDisplayPriority (const Standard_Integer thePriority void Graphic3d_Structure::ResetDisplayPriority() { if (IsDeleted() - || myCStructure->Priority == myCStructure->PreviousPriority) + || myCStructure->Priority() == myCStructure->PreviousPriority()) { return; } - const Standard_Integer aPriority = myCStructure->Priority; - myCStructure->Priority = myCStructure->PreviousPriority; + const Graphic3d_DisplayPriority aPriority = myCStructure->Priority(); + myCStructure->SetPriority (myCStructure->PreviousPriority()); if (myCStructure->stick) { - myStructureManager->ChangeDisplayPriority (this, aPriority, myCStructure->Priority); + myStructureManager->ChangeDisplayPriority (this, aPriority, myCStructure->Priority()); } } @@ -237,10 +235,8 @@ void Graphic3d_Structure::Highlight (const Handle(Graphic3d_PresentationAttribut return; } - SetDisplayPriority (Structure_MAX_PRIORITY - 1); - + SetDisplayPriority (Graphic3d_DisplayPriority_Highlight); myCStructure->GraphicHighlight (theStyle); - if (!theToUpdateMgr) { return; diff --git a/src/Graphic3d/Graphic3d_Structure.hxx b/src/Graphic3d/Graphic3d_Structure.hxx index 8b9e438173..905628df50 100644 --- a/src/Graphic3d/Graphic3d_Structure.hxx +++ b/src/Graphic3d/Graphic3d_Structure.hxx @@ -76,7 +76,23 @@ public: Standard_EXPORT virtual void Display(); //! Returns the current display priority for this structure. - Standard_Integer DisplayPriority() const { return myCStructure->Priority; } + Graphic3d_DisplayPriority DisplayPriority() const { return myCStructure->Priority(); } + + //! Modifies the order of displaying the structure. + //! Values are between 0 and 10. + //! Structures are drawn according to their display priorities in ascending order. + //! A structure of priority 10 is displayed the last and appears over the others. + //! The default value is 5. + //! Warning: If structure is displayed then the SetDisplayPriority method erases it and displays with the new priority. + //! Raises Graphic3d_PriorityDefinitionError if Priority is greater than 10 or a negative value. + Standard_EXPORT void SetDisplayPriority (const Graphic3d_DisplayPriority thePriority); + + Standard_DEPRECATED("Deprecated since OCCT7.7, Graphic3d_DisplayPriority should be passed instead of integer number to SetDisplayPriority()") + void SetDisplayPriority (const Standard_Integer thePriority) { SetDisplayPriority ((Graphic3d_DisplayPriority )thePriority); } + + //! Reset the current priority of the structure to the previous priority. + //! Warning: If structure is displayed then the SetDisplayPriority() method erases it and displays with the previous priority. + Standard_EXPORT void ResetDisplayPriority(); //! Erases this structure in all the views of the visualiser. virtual void Erase() { erase(); } @@ -106,28 +122,6 @@ public: if (!myCStructure.IsNull()) { myCStructure->IsInfinite = theToSet ? 1 : 0; } } - //! Modifies the order of displaying the structure. - //! Values are between 0 and 10. - //! Structures are drawn according to their display priorities - //! in ascending order. - //! A structure of priority 10 is displayed the last and appears over the others. - //! The default value is 5. - //! Category: Methods to modify the class definition - //! Warning: If is displayed then the SetDisplayPriority - //! method erase and display with the - //! new priority. - //! Raises PriorityDefinitionError if is - //! greater than 10 or a negative value. - Standard_EXPORT void SetDisplayPriority (const Standard_Integer Priority); - - //! Reset the current priority of the structure to the - //! previous priority. - //! Category: Methods to modify the class definition - //! Warning: If is displayed then the SetDisplayPriority - //! method erase and display with the - //! previous priority. - Standard_EXPORT void ResetDisplayPriority(); - //! Set Z layer ID for the structure. The Z layer mechanism //! allows to display structures presented in higher layers in overlay //! of structures in lower layers by switching off z buffer depth @@ -411,7 +405,7 @@ public: } //! Returns the identification number of this structure. - Standard_Integer Identification() const { return myCStructure->Id; } + Standard_Integer Identification() const { return myCStructure->Identification(); } //! Prints information about the network associated //! with the structure . diff --git a/src/Graphic3d/Graphic3d_Structure.pxx b/src/Graphic3d/Graphic3d_Structure.pxx deleted file mode 100644 index c841755f09..0000000000 --- a/src/Graphic3d/Graphic3d_Structure.pxx +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) 1995-1999 Matra Datavision -// Copyright (c) 1999-2014 OPEN CASCADE SAS -// -// This file is part of Open CASCADE Technology software library. -// -// This library is free software; you can redistribute it and/or modify it under -// the terms of the GNU Lesser General Public License version 2.1 as published -// by the Free Software Foundation, with special exception defined in the file -// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT -// distribution for complete text of the license and disclaimer of any warranty. -// -// Alternatively, this file may be used under the terms of Open CASCADE -// commercial license or contractual agreement. - -#ifndef STRUCTURE_PXX_INCLUDED -#define STRUCTURE_PXX_INCLUDED - -// structure priority : range (do not change this range !) -// call_togl_displaystructure, CALL_DEF_VIEW, MajView ... -#define Structure_MAX_PRIORITY 10 -#define Structure_MIN_PRIORITY 0 - -#endif diff --git a/src/Graphic3d/Graphic3d_StructureManager.cxx b/src/Graphic3d/Graphic3d_StructureManager.cxx index e979b644f3..de8637203c 100644 --- a/src/Graphic3d/Graphic3d_StructureManager.cxx +++ b/src/Graphic3d/Graphic3d_StructureManager.cxx @@ -420,8 +420,8 @@ void Graphic3d_StructureManager::SetTransform (const Handle(Graphic3d_Structure) // purpose : // ======================================================================== void Graphic3d_StructureManager::ChangeDisplayPriority (const Handle(Graphic3d_Structure)& theStructure, - const Standard_Integer theOldPriority, - const Standard_Integer theNewPriority) + const Graphic3d_DisplayPriority theOldPriority, + const Graphic3d_DisplayPriority theNewPriority) { for (Graphic3d_IndexedMapOfView::Iterator aViewIt (myDefinedViews); aViewIt.More(); aViewIt.Next()) { diff --git a/src/Graphic3d/Graphic3d_StructureManager.hxx b/src/Graphic3d/Graphic3d_StructureManager.hxx index 19c376fa22..906abfef5b 100644 --- a/src/Graphic3d/Graphic3d_StructureManager.hxx +++ b/src/Graphic3d/Graphic3d_StructureManager.hxx @@ -112,7 +112,9 @@ public: Standard_EXPORT virtual void SetTransform (const Handle(Graphic3d_Structure)& theStructure, const Handle(TopLoc_Datum3D)& theTrsf); //! Changes the display priority of the structure . - Standard_EXPORT virtual void ChangeDisplayPriority (const Handle(Graphic3d_Structure)& theStructure, const Standard_Integer theOldPriority, const Standard_Integer theNewPriority); + Standard_EXPORT virtual void ChangeDisplayPriority (const Handle(Graphic3d_Structure)& theStructure, + const Graphic3d_DisplayPriority theOldPriority, + const Graphic3d_DisplayPriority theNewPriority); //! Change Z layer for structure. The Z layer mechanism allows to display structures in higher //! layers in overlay of structures in lower layers. diff --git a/src/MeshVS/MeshVS_Mesh.cxx b/src/MeshVS/MeshVS_Mesh.cxx index 9d1df7055a..3f55246015 100644 --- a/src/MeshVS/MeshVS_Mesh.cxx +++ b/src/MeshVS/MeshVS_Mesh.cxx @@ -1051,7 +1051,7 @@ void MeshVS_Mesh::HilightSelected ( const Handle(PrsMgr_PresentationManager)& th if ( IsNeedToRedisplay ) { - aSelectionPrs->SetDisplayPriority(9); + aSelectionPrs->SetDisplayPriority (Graphic3d_DisplayPriority_Highlight); aSelectionPrs->Display(); } diff --git a/src/OpenGl/OpenGl_GraphicDriver.cxx b/src/OpenGl/OpenGl_GraphicDriver.cxx index 448f53642b..4ed778fd2f 100644 --- a/src/OpenGl/OpenGl_GraphicDriver.cxx +++ b/src/OpenGl/OpenGl_GraphicDriver.cxx @@ -743,7 +743,7 @@ void OpenGl_GraphicDriver::SetZLayerSettings (const Graphic3d_ZLayerId theLayerI Handle(Graphic3d_CStructure) OpenGl_GraphicDriver::CreateStructure (const Handle(Graphic3d_StructureManager)& theManager) { Handle(OpenGl_Structure) aStructure = new OpenGl_Structure (theManager); - myMapOfStructure.Bind (aStructure->Id, aStructure.operator->()); + myMapOfStructure.Bind (aStructure->Identification(), aStructure.operator->()); return aStructure; } @@ -754,12 +754,12 @@ Handle(Graphic3d_CStructure) OpenGl_GraphicDriver::CreateStructure (const Handle void OpenGl_GraphicDriver::RemoveStructure (Handle(Graphic3d_CStructure)& theCStructure) { OpenGl_Structure* aStructure = NULL; - if (!myMapOfStructure.Find (theCStructure->Id, aStructure)) + if (!myMapOfStructure.Find (theCStructure->Identification(), aStructure)) { return; } - myMapOfStructure.UnBind (theCStructure->Id); + myMapOfStructure.UnBind (theCStructure->Identification()); aStructure->Release (GetSharedContext()); theCStructure.Nullify(); } diff --git a/src/OpenGl/OpenGl_LayerList.cxx b/src/OpenGl/OpenGl_LayerList.cxx index efa7434541..4c30668c79 100644 --- a/src/OpenGl/OpenGl_LayerList.cxx +++ b/src/OpenGl/OpenGl_LayerList.cxx @@ -156,9 +156,8 @@ struct OpenGl_GlobalLayerSettings //purpose : Constructor //======================================================================= -OpenGl_LayerList::OpenGl_LayerList (const Standard_Integer theNbPriorities) +OpenGl_LayerList::OpenGl_LayerList() : myBVHBuilder (new BVH_LinearBuilder (BVH_Constants_LeafNodeSizeSingle, BVH_Constants_MaxTreeDepth)), - myNbPriorities (theNbPriorities), myNbStructures (0), myImmediateNbStructures (0), myModifStateOfRaytraceable (0) @@ -201,7 +200,7 @@ void OpenGl_LayerList::InsertLayerBefore (const Graphic3d_ZLayerId theNewLayerId return; } - Handle(Graphic3d_Layer) aNewLayer = new Graphic3d_Layer (theNewLayerId, myNbPriorities, myBVHBuilder); + Handle(Graphic3d_Layer) aNewLayer = new Graphic3d_Layer (theNewLayerId, myBVHBuilder); aNewLayer->SetLayerSettings (theSettings); Handle(Graphic3d_Layer) anOtherLayer; @@ -239,7 +238,7 @@ void OpenGl_LayerList::InsertLayerAfter (const Graphic3d_ZLayerId theNewLayerId, return; } - Handle(Graphic3d_Layer) aNewLayer = new Graphic3d_Layer (theNewLayerId, myNbPriorities, myBVHBuilder); + Handle(Graphic3d_Layer) aNewLayer = new Graphic3d_Layer (theNewLayerId, myBVHBuilder); aNewLayer->SetLayerSettings (theSettings); Handle(Graphic3d_Layer) anOtherLayer; @@ -294,7 +293,7 @@ void OpenGl_LayerList::RemoveLayer (const Graphic3d_ZLayerId theLayerId) void OpenGl_LayerList::AddStructure (const OpenGl_Structure* theStruct, const Graphic3d_ZLayerId theLayerId, - const Standard_Integer thePriority, + const Graphic3d_DisplayPriority thePriority, Standard_Boolean isForChangePriority) { // add structure to associated layer, @@ -324,7 +323,7 @@ void OpenGl_LayerList::RemoveStructure (const OpenGl_Structure* theStructure) const Handle(Graphic3d_Layer)* aLayerPtr = myLayerIds.Seek (aLayerId); const Handle(Graphic3d_Layer)& aLayer = aLayerPtr != NULL ? *aLayerPtr : myLayerIds.Find (Graphic3d_ZLayerId_Default); - Standard_Integer aPriority = -1; + Graphic3d_DisplayPriority aPriority = Graphic3d_DisplayPriority_INVALID; // remove structure from associated list // if the structure is not found there, @@ -396,7 +395,7 @@ void OpenGl_LayerList::ChangeLayer (const OpenGl_Structure* theStructure, const Handle(Graphic3d_Layer)* aLayerPtr = myLayerIds.Seek (theOldLayerId); const Handle(Graphic3d_Layer)& aLayer = aLayerPtr != NULL ? *aLayerPtr : myLayerIds.Find (Graphic3d_ZLayerId_Default); - Standard_Integer aPriority = -1; + Graphic3d_DisplayPriority aPriority = Graphic3d_DisplayPriority_INVALID; // take priority and remove structure from list found by // if the structure is not found there, scan through all other layers @@ -460,13 +459,12 @@ void OpenGl_LayerList::ChangeLayer (const OpenGl_Structure* theStructure, //======================================================================= void OpenGl_LayerList::ChangePriority (const OpenGl_Structure* theStructure, const Graphic3d_ZLayerId theLayerId, - const Standard_Integer theNewPriority) + const Graphic3d_DisplayPriority theNewPriority) { const Handle(Graphic3d_Layer)* aLayerPtr = myLayerIds.Seek (theLayerId); const Handle(Graphic3d_Layer)& aLayer = aLayerPtr != NULL ? *aLayerPtr : myLayerIds.Find (Graphic3d_ZLayerId_Default); - Standard_Integer anOldPriority = -1; - + Graphic3d_DisplayPriority anOldPriority = Graphic3d_DisplayPriority_INVALID; if (aLayer->Remove (theStructure, anOldPriority, Standard_True)) { --myNbStructures; @@ -664,9 +662,9 @@ void OpenGl_LayerList::renderLayer (const Handle(OpenGl_Workspace)& theWorkspace // render priority list const Standard_Integer aViewId = theWorkspace->View()->Identification(); - for (Graphic3d_ArrayOfIndexedMapOfStructure::Iterator aMapIter (theLayer.ArrayOfStructures()); aMapIter.More(); aMapIter.Next()) + for (Standard_Integer aPriorityIter = Graphic3d_DisplayPriority_Bottom; aPriorityIter <= Graphic3d_DisplayPriority_Topmost; ++aPriorityIter) { - const Graphic3d_IndexedMapOfStructure& aStructures = aMapIter.Value(); + const Graphic3d_IndexedMapOfStructure& aStructures = theLayer.Structures ((Graphic3d_DisplayPriority )aPriorityIter); for (OpenGl_Structure::StructIterator aStructIter (aStructures); aStructIter.More(); aStructIter.Next()) { const OpenGl_Structure* aStruct = aStructIter.Value(); @@ -1250,7 +1248,6 @@ void OpenGl_LayerList::DumpJson (Standard_OStream& theOStream, Standard_Integer OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, aLayerId.get()) } - OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myNbPriorities) OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myNbStructures) OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myImmediateNbStructures) OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myModifStateOfRaytraceable) diff --git a/src/OpenGl/OpenGl_LayerList.hxx b/src/OpenGl/OpenGl_LayerList.hxx index ad28b63526..a92304918d 100644 --- a/src/OpenGl/OpenGl_LayerList.hxx +++ b/src/OpenGl/OpenGl_LayerList.hxx @@ -36,13 +36,13 @@ class OpenGl_LayerList public: //! Constructor - Standard_EXPORT OpenGl_LayerList (const Standard_Integer theNbPriorities); + Standard_EXPORT OpenGl_LayerList(); //! Destructor Standard_EXPORT virtual ~OpenGl_LayerList(); //! Method returns the number of available priorities - Standard_Integer NbPriorities() const { return myNbPriorities; } + Standard_Integer NbPriorities() const { return Graphic3d_DisplayPriority_NB; } //! Number of displayed structures Standard_Integer NbStructures() const { return myNbStructures; } @@ -68,7 +68,7 @@ public: //! to default bottom-level layer. Standard_EXPORT void AddStructure (const OpenGl_Structure* theStruct, const Graphic3d_ZLayerId theLayerId, - const Standard_Integer thePriority, + const Graphic3d_DisplayPriority thePriority, Standard_Boolean isForChangePriority = Standard_False); //! Remove structure from structure list and return its previous priority @@ -84,7 +84,7 @@ public: //! Changes structure priority within its ZLayer Standard_EXPORT void ChangePriority (const OpenGl_Structure* theStructure, const Graphic3d_ZLayerId theLayerId, - const Standard_Integer theNewPriority); + const Graphic3d_DisplayPriority theNewPriority); //! Returns reference to the layer with given ID. OpenGl_Layer& Layer (const Graphic3d_ZLayerId theLayerId) { return *myLayerIds.Find (theLayerId); } @@ -120,10 +120,10 @@ public: //! Returns structure modification state (for ray-tracing). Standard_Size ModificationStateOfRaytracable() const { return myModifStateOfRaytraceable; } - //! Returns BVH tree builder for frustom culling. + //! Returns BVH tree builder for frustum culling. const Handle(Select3D_BVHBuilder3d)& FrustumCullingBVHBuilder() const { return myBVHBuilder; } - //! Assigns BVH tree builder for frustom culling. + //! Assigns BVH tree builder for frustum culling. Standard_EXPORT void SetFrustumCullingBVHBuilder (const Handle(Select3D_BVHBuilder3d)& theBuilder); //! Dumps the content of me into the stream @@ -203,9 +203,8 @@ protected: NCollection_List myLayers; NCollection_DataMap myLayerIds; - Handle(Select3D_BVHBuilder3d) myBVHBuilder; //!< BVH tree builder for frustom culling + Handle(Select3D_BVHBuilder3d) myBVHBuilder; //!< BVH tree builder for frustum culling - Standard_Integer myNbPriorities; Standard_Integer myNbStructures; Standard_Integer myImmediateNbStructures; //!< number of structures within immediate layers diff --git a/src/OpenGl/OpenGl_View.cxx b/src/OpenGl/OpenGl_View.cxx index ec410fc6f8..f352db0655 100644 --- a/src/OpenGl/OpenGl_View.cxx +++ b/src/OpenGl/OpenGl_View.cxx @@ -39,7 +39,6 @@ #include #include -#include "../Graphic3d/Graphic3d_Structure.pxx" #include "../Textures/Textures_EnvLUT.pxx" namespace @@ -109,7 +108,6 @@ OpenGl_View::OpenGl_View (const Handle(Graphic3d_StructureManager)& theMgr, myCaps (theCaps), myWasRedrawnGL (Standard_False), myToShowGradTrihedron (false), - myZLayers (Structure_MAX_PRIORITY - Structure_MIN_PRIORITY + 1), myStateCounter (theCounter), myCurrLightSourceState (theCounter->Increment()), myLightsRevision (0), @@ -880,7 +878,7 @@ void OpenGl_View::FBOChangeViewport (const Handle(Standard_Transient)& theFbo, //purpose : //======================================================================= void OpenGl_View::displayStructure (const Handle(Graphic3d_CStructure)& theStructure, - const Standard_Integer thePriority) + const Graphic3d_DisplayPriority thePriority) { const OpenGl_Structure* aStruct = static_cast (theStructure.get()); const Graphic3d_ZLayerId aZLayer = aStruct->ZLayer(); @@ -916,7 +914,7 @@ void OpenGl_View::changeZLayer (const Handle(Graphic3d_CStructure)& theStructure //purpose : //======================================================================= void OpenGl_View::changePriority (const Handle(Graphic3d_CStructure)& theStructure, - const Standard_Integer theNewPriority) + const Graphic3d_DisplayPriority theNewPriority) { const Graphic3d_ZLayerId aLayerId = theStructure->ZLayer(); const OpenGl_Structure* aStruct = static_cast (theStructure.get()); diff --git a/src/OpenGl/OpenGl_View.hxx b/src/OpenGl/OpenGl_View.hxx index 32b1f8043b..78367fa9aa 100644 --- a/src/OpenGl/OpenGl_View.hxx +++ b/src/OpenGl/OpenGl_View.hxx @@ -403,7 +403,7 @@ private: //! Adds the structure to display lists of the view. Standard_EXPORT virtual void displayStructure (const Handle(Graphic3d_CStructure)& theStructure, - const Standard_Integer thePriority) Standard_OVERRIDE; + const Graphic3d_DisplayPriority thePriority) Standard_OVERRIDE; //! Erases the structure from display lists of the view. Standard_EXPORT virtual void eraseStructure (const Handle(Graphic3d_CStructure)& theStructure) Standard_OVERRIDE; @@ -414,7 +414,7 @@ private: //! Changes the priority of a structure within its Z layer in the specified view. Standard_EXPORT virtual void changePriority (const Handle(Graphic3d_CStructure)& theCStructure, - const Standard_Integer theNewPriority) Standard_OVERRIDE; + const Graphic3d_DisplayPriority theNewPriority) Standard_OVERRIDE; private: diff --git a/src/OpenGl/OpenGl_View_Raytrace.cxx b/src/OpenGl/OpenGl_View_Raytrace.cxx index 91894ef2ff..d36c0c5aba 100644 --- a/src/OpenGl/OpenGl_View_Raytrace.cxx +++ b/src/OpenGl/OpenGl_View_Raytrace.cxx @@ -121,10 +121,10 @@ Standard_Boolean OpenGl_View::updateRaytraceGeometry (const RaytraceUpdateMode continue; } - const Graphic3d_ArrayOfIndexedMapOfStructure& aStructArray = aLayer->ArrayOfStructures(); - for (Standard_Integer anIndex = 0; anIndex < aStructArray.Length(); ++anIndex) + for (Standard_Integer aPriorityIter = Graphic3d_DisplayPriority_Bottom; aPriorityIter <= Graphic3d_DisplayPriority_Topmost; ++aPriorityIter) { - for (OpenGl_Structure::StructIterator aStructIt (aStructArray.Value (anIndex)); aStructIt.More(); aStructIt.Next()) + const Graphic3d_IndexedMapOfStructure& aStructures = aLayer->Structures ((Graphic3d_DisplayPriority )aPriorityIter); + for (OpenGl_Structure::StructIterator aStructIt (aStructures); aStructIt.More(); aStructIt.Next()) { const OpenGl_Structure* aStructure = aStructIt.Value(); @@ -136,7 +136,7 @@ Standard_Boolean OpenGl_View::updateRaytraceGeometry (const RaytraceUpdateMode } else if (aStructure->IsVisible() && myRaytraceParameters.GlobalIllumination) { - aNonRaytraceIDs.insert (aStructure->highlight ? aStructure->Id : -aStructure->Id); + aNonRaytraceIDs.insert (aStructure->highlight ? aStructure->Identification() : -aStructure->Identification()); } } else if (theMode == OpenGl_GUM_PREPARE) diff --git a/src/PrsMgr/PrsMgr_PresentationManager.cxx b/src/PrsMgr/PrsMgr_PresentationManager.cxx index b0be613603..915e1b9fd7 100644 --- a/src/PrsMgr/PrsMgr_PresentationManager.cxx +++ b/src/PrsMgr/PrsMgr_PresentationManager.cxx @@ -210,7 +210,7 @@ void PrsMgr_PresentationManager::Unhighlight (const Handle(PrsMgr_PresentableObj // ======================================================================= void PrsMgr_PresentationManager::SetDisplayPriority (const Handle(PrsMgr_PresentableObject)& thePrsObj, const Standard_Integer theMode, - const Standard_Integer theNewPrior) const + const Graphic3d_DisplayPriority theNewPrior) const { if (thePrsObj->ToPropagateVisualState()) { @@ -231,15 +231,15 @@ void PrsMgr_PresentationManager::SetDisplayPriority (const Handle(PrsMgr_Present // function : DisplayPriority // purpose : // ======================================================================= -Standard_Integer PrsMgr_PresentationManager::DisplayPriority (const Handle(PrsMgr_PresentableObject)& thePrsObj, - const Standard_Integer theMode) const +Graphic3d_DisplayPriority PrsMgr_PresentationManager::DisplayPriority (const Handle(PrsMgr_PresentableObject)& thePrsObj, + const Standard_Integer theMode) const { if (thePrsObj->ToPropagateVisualState()) { for (PrsMgr_ListOfPresentableObjectsIter anIter(thePrsObj->Children()); anIter.More(); anIter.Next()) { - Standard_Integer aPriority = DisplayPriority(anIter.Value(), theMode); - if (aPriority != 0) + Graphic3d_DisplayPriority aPriority = DisplayPriority(anIter.Value(), theMode); + if (aPriority != Graphic3d_DisplayPriority_INVALID) { return aPriority; } @@ -249,7 +249,7 @@ Standard_Integer PrsMgr_PresentationManager::DisplayPriority (const Handle(PrsMg const Handle(PrsMgr_Presentation) aPrs = Presentation (thePrsObj, theMode); return !aPrs.IsNull() ? aPrs->DisplayPriority() - : 0; + : Graphic3d_DisplayPriority_INVALID; } // ======================================================================= @@ -697,7 +697,7 @@ void PrsMgr_PresentationManager::UpdateHighlightTrsf (const Handle(V3d_Viewer)& } Handle(TopLoc_Datum3D) aTrsf = theObj->LocalTransformationGeom(); - const Standard_Integer aParentId = aPrs->CStructure()->Id; + const Standard_Integer aParentId = aPrs->CStructure()->Identification(); updatePrsTransformation (myImmediateList, aParentId, aTrsf); if (!myViewDependentImmediateList.IsEmpty()) @@ -709,7 +709,7 @@ void PrsMgr_PresentationManager::UpdateHighlightTrsf (const Handle(V3d_Viewer)& if (aView->IsComputed (aParentId, aViewDepParentPrs)) { updatePrsTransformation (myViewDependentImmediateList, - aViewDepParentPrs->CStructure()->Id, + aViewDepParentPrs->CStructure()->Identification(), aTrsf); } } diff --git a/src/PrsMgr/PrsMgr_PresentationManager.hxx b/src/PrsMgr/PrsMgr_PresentationManager.hxx index 5160c520c6..a33b505410 100644 --- a/src/PrsMgr/PrsMgr_PresentationManager.hxx +++ b/src/PrsMgr/PrsMgr_PresentationManager.hxx @@ -66,12 +66,13 @@ public: //! Sets the display priority theNewPrior of the //! presentable object thePrsObject in this framework with the display mode theMode. - Standard_EXPORT void SetDisplayPriority (const Handle(PrsMgr_PresentableObject)& thePrsObject, const Standard_Integer theMode, const Standard_Integer theNewPrior) const; - + Standard_EXPORT void SetDisplayPriority (const Handle(PrsMgr_PresentableObject)& thePrsObject, + const Standard_Integer theMode, + const Graphic3d_DisplayPriority theNewPrior) const; //! Returns the display priority of the presentable object //! thePrsObject in this framework with the display mode theMode. - Standard_EXPORT Standard_Integer DisplayPriority (const Handle(PrsMgr_PresentableObject)& thePrsObject, const Standard_Integer theMode) const; + Standard_EXPORT Graphic3d_DisplayPriority DisplayPriority (const Handle(PrsMgr_PresentableObject)& thePrsObject, const Standard_Integer theMode) const; //! Set Z layer ID for all presentations of the object. Standard_EXPORT void SetZLayer (const Handle(PrsMgr_PresentableObject)& thePrsObject, const Graphic3d_ZLayerId theLayerId); diff --git a/src/SelectMgr/SelectMgr_ViewerSelector.cxx b/src/SelectMgr/SelectMgr_ViewerSelector.cxx index 42c8028fba..8559eaed3a 100644 --- a/src/SelectMgr/SelectMgr_ViewerSelector.cxx +++ b/src/SelectMgr/SelectMgr_ViewerSelector.cxx @@ -1301,7 +1301,7 @@ void SelectMgr_ViewerSelector::DisplaySensitive (const Handle(V3d_View)& theView for (Graphic3d_SequenceOfStructure::Iterator aStructIter (myStructs); aStructIter.More(); aStructIter.Next()) { Handle(Graphic3d_Structure)& aStruct = aStructIter.ChangeValue(); - aStruct->SetDisplayPriority (10); + aStruct->SetDisplayPriority (Graphic3d_DisplayPriority_Topmost); aStruct->Display(); } @@ -1348,7 +1348,7 @@ void SelectMgr_ViewerSelector::DisplaySensitive (const Handle(SelectMgr_Selectio SelectMgr::ComputeSensitivePrs (aStruct, theSel, theTrsf, Handle(Graphic3d_TransformPers)()); myStructs.Append (aStruct); - myStructs.Last()->SetDisplayPriority (10); + myStructs.Last()->SetDisplayPriority (Graphic3d_DisplayPriority_Topmost); myStructs.Last()->Display(); theView->Update(); diff --git a/src/V3d/V3d_CircularGrid.cxx b/src/V3d/V3d_CircularGrid.cxx index 99691c4552..c15eae14b7 100644 --- a/src/V3d/V3d_CircularGrid.cxx +++ b/src/V3d/V3d_CircularGrid.cxx @@ -103,7 +103,7 @@ void V3d_CircularGrid::SetColors (const Quantity_Color& aColor, const Quantity_C void V3d_CircularGrid::Display () { - myStructure->SetDisplayPriority (1); + myStructure->SetDisplayPriority (Graphic3d_DisplayPriority_AlmostBottom); myStructure->Display(); UpdateDisplay(); } diff --git a/src/V3d/V3d_Plane.cxx b/src/V3d/V3d_Plane.cxx index 3a26015bd4..c40df8d197 100755 --- a/src/V3d/V3d_Plane.cxx +++ b/src/V3d/V3d_Plane.cxx @@ -86,7 +86,7 @@ void V3d_Plane::Display (const Handle(V3d_View)& theView, aPrims->AddVertex ( aSize,-aSize, anOffset); aGroup->AddPrimitiveArray(aPrims); - myGraphicStructure->SetDisplayPriority (0); + myGraphicStructure->SetDisplayPriority (Graphic3d_DisplayPriority_Bottom); myGraphicStructure->Display(); Update(); } diff --git a/src/V3d/V3d_RectangularGrid.cxx b/src/V3d/V3d_RectangularGrid.cxx index cfa41e3dac..2eaa5b7ae2 100644 --- a/src/V3d/V3d_RectangularGrid.cxx +++ b/src/V3d/V3d_RectangularGrid.cxx @@ -104,7 +104,7 @@ void V3d_RectangularGrid::SetColors (const Quantity_Color& aColor, const Quantit void V3d_RectangularGrid::Display () { - myStructure->SetDisplayPriority (1); + myStructure->SetDisplayPriority (Graphic3d_DisplayPriority_AlmostBottom); myStructure->Display(); UpdateDisplay(); } diff --git a/src/V3d/V3d_Trihedron.cxx b/src/V3d/V3d_Trihedron.cxx index 61159f0921..6b3eac1540 100644 --- a/src/V3d/V3d_Trihedron.cxx +++ b/src/V3d/V3d_Trihedron.cxx @@ -255,7 +255,7 @@ void V3d_Trihedron::Display (const V3d_View& theView) myStructure = new TrihedronStructure (theView.Viewer()->StructureManager(), this); myStructure->SetTransformPersistence (myTransformPers); myStructure->SetZLayer (Graphic3d_ZLayerId_Topmost); - myStructure->SetDisplayPriority (9); + myStructure->SetDisplayPriority (Graphic3d_DisplayPriority_Highlight); myStructure->SetInfiniteState (Standard_True); myStructure->CStructure()->ViewAffinity = new Graphic3d_ViewAffinity(); myStructure->CStructure()->ViewAffinity->SetVisible (Standard_False); diff --git a/src/ViewerTest/ViewerTest_ObjectCommands.cxx b/src/ViewerTest/ViewerTest_ObjectCommands.cxx index b4281b6f63..14aa3e64f8 100644 --- a/src/ViewerTest/ViewerTest_ObjectCommands.cxx +++ b/src/ViewerTest/ViewerTest_ObjectCommands.cxx @@ -6548,16 +6548,16 @@ static int VPriority (Draw_Interpretor& theDI, } TCollection_AsciiString aLastArg (theArgs[theArgNum - 1]); - Standard_Integer aPriority = -1; + Standard_Integer aPriority = Graphic3d_DisplayPriority_INVALID; Standard_Integer aNbArgs = theArgNum; if (aLastArg.IsIntegerValue()) { aPriority = aLastArg.IntegerValue(); --aNbArgs; - if (aPriority < 0 || aPriority > 10) + if (aPriority < Graphic3d_DisplayPriority_Bottom || aPriority > Graphic3d_DisplayPriority_Topmost) { Message::SendFail() << "Syntax error: the specified display priority value '" << aLastArg - << "' is outside the valid range [0..10]"; + << "' is outside the valid range [" << Graphic3d_DisplayPriority_Bottom << ".." << Graphic3d_DisplayPriority_Topmost << "]"; return 1; } } @@ -6589,13 +6589,13 @@ static int VPriority (Draw_Interpretor& theDI, return 1; } - if (aPriority < 1) + if (aPriority == Graphic3d_DisplayPriority_INVALID) { theDI << aContext->DisplayPriority (anIObj) << " "; } else { - aContext->SetDisplayPriority (anIObj, aPriority); + aContext->SetDisplayPriority (anIObj, (Graphic3d_DisplayPriority )aPriority); } } return 0; diff --git a/src/XCAFPrs/XCAFPrs_AISObject.cxx b/src/XCAFPrs/XCAFPrs_AISObject.cxx index 2f182da0bb..5d01a9079f 100644 --- a/src/XCAFPrs/XCAFPrs_AISObject.cxx +++ b/src/XCAFPrs/XCAFPrs_AISObject.cxx @@ -240,7 +240,7 @@ void XCAFPrs_AISObject::Compute (const Handle(PrsMgr_PresentationManager)& thePr if (XCAFPrs::GetViewNameMode()) { // Displaying Name attributes - thePrs->SetDisplayPriority (10); + thePrs->SetDisplayPriority (Graphic3d_DisplayPriority_Topmost); DisplayText (myLabel, thePrs, Attributes()->DimensionAspect()->TextAspect(), TopLoc_Location());//no location } } From 6ba81a695f5e233b1da71e5242b1f32bf1debae0 Mon Sep 17 00:00:00 2001 From: ssafarov Date: Mon, 15 Nov 2021 18:15:33 +0300 Subject: [PATCH 171/639] 0026174: Data Exchange, IGES - Loss of color after the second write of file A copy of myface is made, where further on the copy the geometry changes. We connect the face, wire, edge of the original shape with the one whose geometry was changed. This is done in order to get the original shape in the TransferWire() and TransferEdge() methods. --- src/BRepToIGES/BRepToIGES_BREntity.cxx | 3 +- src/BRepToIGES/BRepToIGES_BRShell.cxx | 99 +++++++++++--------- src/BRepToIGES/BRepToIGES_BRSolid.cxx | 3 +- src/BRepToIGES/BRepToIGES_BRWire.cxx | 91 ++++++++++-------- src/BRepToIGES/BRepToIGES_BRWire.hxx | 46 ++++----- src/BRepToIGESBRep/BRepToIGESBRep_Entity.cxx | 12 ++- tests/bugs/iges/bug26174 | 45 +++++++++ tests/bugs/xde/bug26174 | 53 ----------- 8 files changed, 187 insertions(+), 165 deletions(-) create mode 100644 tests/bugs/iges/bug26174 delete mode 100644 tests/bugs/xde/bug26174 diff --git a/src/BRepToIGES/BRepToIGES_BREntity.cxx b/src/BRepToIGES/BRepToIGES_BREntity.cxx index 50963f80e7..37d1cba74c 100644 --- a/src/BRepToIGES/BRepToIGES_BREntity.cxx +++ b/src/BRepToIGES/BRepToIGES_BREntity.cxx @@ -146,7 +146,8 @@ Handle(IGESData_IGESEntity) BRepToIGES_BREntity::TransferShape TopoDS_Edge E = TopoDS::Edge(start); BRepToIGES_BRWire BW(*this); BW.SetModel(GetModel()); - res = BW.TransferEdge(E, Standard_False); + TopTools_DataMapOfShapeShape anEmptyMap; + res = BW.TransferEdge(E, anEmptyMap, Standard_False); } else if (start.ShapeType() == TopAbs_WIRE) { TopoDS_Wire W = TopoDS::Wire(start); diff --git a/src/BRepToIGES/BRepToIGES_BRShell.cxx b/src/BRepToIGES/BRepToIGES_BRShell.cxx index 30955574e1..34e5f6dce5 100644 --- a/src/BRepToIGES/BRepToIGES_BRShell.cxx +++ b/src/BRepToIGES/BRepToIGES_BRShell.cxx @@ -19,6 +19,7 @@ #include #include +#include #include #include #include @@ -123,8 +124,14 @@ Handle(IGESData_IGESEntity) BRepToIGES_BRShell ::TransferFace(const TopoDS_Face& } // pour explorer la face , il faut la mettre fORWARD. - TopoDS_Face myface; + TopoDS_Face aFace = start; + // Associates the input face (start) and its sub-shapes with the reversed variant, + // if the input face has a Reversed orientation + TopTools_DataMapOfShapeShape aShapeShapeMap; if (start.Orientation() == TopAbs_REVERSED) { + BRepBuilderAPI_Copy aCopy; + aCopy.Perform(aFace); + //create face with redirected surface BRep_Builder B; TopLoc_Location aLoc; @@ -133,29 +140,35 @@ Handle(IGESData_IGESEntity) BRepToIGES_BRShell ::TransferFace(const TopoDS_Face& { // take basis surface, because pcurves will be transformed, so trim will be shifted, // accorded to new face bounds - Handle(Geom_RectangularTrimmedSurface) aTrimmedSurf = + Handle(Geom_RectangularTrimmedSurface) aTrimmedSurf = Handle(Geom_RectangularTrimmedSurface)::DownCast(aSurf); aSurf = aTrimmedSurf->BasisSurface(); } aSurf = aSurf->UReversed(); Standard_Real aTol = BRep_Tool::Tolerance(start); - B.MakeFace(myface, aSurf, aLoc ,aTol); + B.MakeFace(aFace, aSurf, aLoc, aTol); // set specifics flags of a Face - B.NaturalRestriction(myface, BRep_Tool::NaturalRestriction(start)); + B.NaturalRestriction(aFace, BRep_Tool::NaturalRestriction(start)); //add wires TopoDS_Wire anOuter = TopoDS::Wire(ShapeAlgo::AlgoContainer()->OuterWire(start)); TopExp_Explorer ex; - for (ex.Init(start,TopAbs_WIRE); ex.More(); ex.Next()) { + for (ex.Init(start, TopAbs_WIRE); ex.More(); ex.Next()) { TopoDS_Wire W = TopoDS::Wire(ex.Current()); + TopoDS_Wire aCopyWire = TopoDS::Wire(aCopy.ModifiedShape(W)); + aCopyWire = TopoDS::Wire(aCopyWire.Oriented(W.Orientation())); if (!W.IsNull() && W.IsSame(anOuter)) { - B.Add(myface, W); + B.Add(aFace, aCopyWire); + aShapeShapeMap.Bind(aCopyWire, W); // Bind the reversed copy of Wire to the original break; } - } - for (ex.Init(start,TopAbs_WIRE); ex.More(); ex.Next()) { + } + for (ex.Init(start, TopAbs_WIRE); ex.More(); ex.Next()) { TopoDS_Wire W = TopoDS::Wire(ex.Current()); + TopoDS_Wire aCopyWire = TopoDS::Wire(aCopy.ModifiedShape(W)); + aCopyWire = TopoDS::Wire(aCopyWire.Oriented(W.Orientation())); if (!W.IsNull() && !W.IsSame(anOuter)) { - B.Add(myface, W); + B.Add(aFace, aCopyWire); + aShapeShapeMap.Bind(aCopyWire, W); // Bind the reversed copy of Wire to the original } } @@ -167,43 +180,48 @@ Handle(IGESData_IGESEntity) BRepToIGES_BRShell ::TransferFace(const TopoDS_Face& gp_Ax2d axis(gp_Pnt2d(aCenter, V1), gp_Dir2d(0.,1.)); T.SetMirror(axis); NCollection_Map aMap (101, new NCollection_IncAllocator); - for (ex.Init(myface,TopAbs_EDGE);ex.More(); ex.Next()) { - TopoDS_Edge anEdge = TopoDS::Edge(ex.Current()); - if (!aMap.Add(anEdge)) + for (ex.Init(start, TopAbs_EDGE); ex.More(); ex.Next()) { + TopoDS_Edge anOrigEdge = TopoDS::Edge(ex.Current()); + TopoDS_Edge aCopyEdge = TopoDS::Edge(aCopy.ModifiedShape(anOrigEdge)); + aCopyEdge = TopoDS::Edge(aCopyEdge.Oriented(anOrigEdge.Orientation())); + if (!aMap.Add(aCopyEdge)) // seam edge has been already updated continue; Standard_Real f, l; Handle(Geom2d_Curve) aCurve1, aCurve2; - aCurve1 = BRep_Tool::CurveOnSurface(anEdge, start, f, l); - aTol = BRep_Tool::Tolerance(anEdge); + aCurve1 = BRep_Tool::CurveOnSurface(aCopyEdge, TopoDS::Face(aCopy.ModifiedShape(start)), f, l); + aTol = BRep_Tool::Tolerance(aCopyEdge); if (!aCurve1.IsNull()) { aCurve1 = Handle(Geom2d_Curve)::DownCast(aCurve1->Transformed(T)); - if (BRepTools::IsReallyClosed(anEdge, start)) { - TopoDS_Edge revEdge = TopoDS::Edge(anEdge.Reversed()); - aCurve2 = BRep_Tool::CurveOnSurface(revEdge, start, f, l); + if (BRepTools::IsReallyClosed(aCopyEdge, TopoDS::Face(aCopy.ModifiedShape(start)))) { + TopoDS_Edge revEdge = TopoDS::Edge(aCopyEdge.Reversed()); + aCurve2 = BRep_Tool::CurveOnSurface(revEdge, TopoDS::Face(aCopy.ModifiedShape(start)), f, l); if (!aCurve2.IsNull()) { aCurve2 = Handle(Geom2d_Curve)::DownCast(aCurve2->Transformed(T)); - if (anEdge.Orientation() == TopAbs_FORWARD) - B.UpdateEdge(anEdge, aCurve1, aCurve2, myface, aTol); + if (aCopyEdge.Orientation() == TopAbs_FORWARD) + { + B.UpdateEdge(aCopyEdge, aCurve1, aCurve2, aFace, aTol); + } else - B.UpdateEdge(anEdge, aCurve2, aCurve1, myface, aTol); + { + B.UpdateEdge(aCopyEdge, aCurve2, aCurve1, aFace, aTol); + } } else { - B.UpdateEdge(anEdge, aCurve1, myface, aTol); + B.UpdateEdge(aCopyEdge, aCurve1, aFace, aTol); } } else { - B.UpdateEdge(anEdge, aCurve1, myface, aTol); + B.UpdateEdge(aCopyEdge, aCurve1, aFace, aTol); } // set range for degenerated edges - if (BRep_Tool::Degenerated(anEdge)) { - B.Range(anEdge, myface, f, l); + if (BRep_Tool::Degenerated(aCopyEdge)) { + B.Range(aCopyEdge, aFace, f, l); } } + aShapeShapeMap.Bind(aCopyEdge, anOrigEdge); // Bind the reversed copy of Edge to the original } - } - else { - myface = start; + aShapeShapeMap.Bind(start, aFace); // Bind the original face to the reversed copy } //Standard_Integer Nb = 0; //szv#4:S4163:12Mar99 unused @@ -213,13 +231,12 @@ Handle(IGESData_IGESEntity) BRepToIGES_BRShell ::TransferFace(const TopoDS_Face& // returns the face surface // ------------------------ - Handle(Geom_Surface) Surf = BRep_Tool::Surface(myface); - Handle(Geom_Surface) Surf1; + Handle(Geom_Surface) Surf = BRep_Tool::Surface(aFace); if (!Surf.IsNull()) { Standard_Real U1, U2, V1, V2; // pour limiter les surfaces de base - BRepTools::UVBounds(myface, U1, U2, V1, V2); + BRepTools::UVBounds(aFace, U1, U2, V1, V2); GeomToIGES_GeomSurface GS; GS.SetModel(GetModel()); ISurf = GS.TransferSurface(Surf, U1, U2, V1, V2); @@ -228,14 +245,6 @@ Handle(IGESData_IGESEntity) BRepToIGES_BRShell ::TransferFace(const TopoDS_Face& return res; } Length = GS.Length(); - - // modif mjm du 17/07/97 - if (Surf->IsKind(STANDARD_TYPE(Geom_RectangularTrimmedSurface))) { - DeclareAndCast(Geom_RectangularTrimmedSurface, rectang, Surf); - Surf1 = rectang->BasisSurface(); - } - else - Surf1 = Surf; } @@ -249,11 +258,11 @@ Handle(IGESData_IGESEntity) BRepToIGES_BRShell ::TransferFace(const TopoDS_Face& // outer wire //:n3 TopoDS_Wire Outer = BRepTools::OuterWire(myface); - TopoDS_Wire Outer = ShapeAlgo::AlgoContainer()->OuterWire(myface); //:n3 + TopoDS_Wire Outer = ShapeAlgo::AlgoContainer()->OuterWire(aFace); //:n3 Handle(IGESGeom_CurveOnSurface) IOuter = new IGESGeom_CurveOnSurface; if (!Outer.IsNull()) { Handle(IGESData_IGESEntity) ICurve3d = - BW.TransferWire(Outer, myface, ICurve2d, Length); + BW.TransferWire(Outer, aFace, aShapeShapeMap, ICurve2d, Length); if ((!ICurve3d.IsNull()) && (!ICurve2d.IsNull())) Iprefer = 3; if ((!ICurve3d.IsNull()) && (ICurve2d.IsNull())) Iprefer = 2; if ((ICurve3d.IsNull()) && (!ICurve2d.IsNull())) Iprefer = 1; @@ -264,7 +273,7 @@ Handle(IGESData_IGESEntity) BRepToIGES_BRShell ::TransferFace(const TopoDS_Face& TopExp_Explorer Ex; Handle(TColStd_HSequenceOfTransient) Seq = new TColStd_HSequenceOfTransient(); - for (Ex.Init(myface,TopAbs_WIRE); Ex.More(); Ex.Next()) { + for (Ex.Init(aFace, TopAbs_WIRE); Ex.More(); Ex.Next()) { TopoDS_Wire W = TopoDS::Wire(Ex.Current()); Handle(IGESGeom_CurveOnSurface) Curve = new IGESGeom_CurveOnSurface; if (W.IsNull()) { @@ -272,7 +281,7 @@ Handle(IGESData_IGESEntity) BRepToIGES_BRShell ::TransferFace(const TopoDS_Face& } else if (!W.IsSame(Outer)) { Handle(IGESData_IGESEntity) ICurve3d = - BW.TransferWire(W, myface, ICurve2d, Length); + BW.TransferWire(W, aFace, aShapeShapeMap, ICurve2d, Length); if ((!ICurve3d.IsNull()) && (!ICurve2d.IsNull())) Iprefer = 3; if ((!ICurve3d.IsNull()) && (ICurve2d.IsNull())) Iprefer = 2; if ((ICurve3d.IsNull()) && (!ICurve2d.IsNull())) Iprefer = 1; @@ -282,15 +291,15 @@ Handle(IGESData_IGESEntity) BRepToIGES_BRShell ::TransferFace(const TopoDS_Face& } // all inners edges not in a wire - for (Ex.Init(myface,TopAbs_EDGE,TopAbs_WIRE); Ex.More(); Ex.Next()) { + for (Ex.Init(aFace,TopAbs_EDGE,TopAbs_WIRE); Ex.More(); Ex.Next()) { TopoDS_Edge E = TopoDS::Edge(Ex.Current()); Handle(IGESGeom_CurveOnSurface) Curve = new IGESGeom_CurveOnSurface; if (E.IsNull()) { AddWarning(start," an Edge is a null entity"); } else { - Handle(IGESData_IGESEntity) ICurve3d = BW.TransferEdge(E, Standard_False); - Handle(IGESData_IGESEntity) newICurve2d = BW.TransferEdge(E, myface, Length, Standard_False); + Handle(IGESData_IGESEntity) ICurve3d = BW.TransferEdge(E, aShapeShapeMap, Standard_False); + Handle(IGESData_IGESEntity) newICurve2d = BW.TransferEdge(E, aFace, aShapeShapeMap, Length, Standard_False); if ((!ICurve3d.IsNull()) && (!newICurve2d.IsNull())) Iprefer = 3; if ((!ICurve3d.IsNull()) && (newICurve2d.IsNull())) Iprefer = 2; if ((ICurve3d.IsNull()) && (!newICurve2d.IsNull())) Iprefer = 1; diff --git a/src/BRepToIGES/BRepToIGES_BRSolid.cxx b/src/BRepToIGES/BRepToIGES_BRSolid.cxx index 6d6e3c1f09..21ababf37b 100644 --- a/src/BRepToIGES/BRepToIGES_BRSolid.cxx +++ b/src/BRepToIGES/BRepToIGES_BRSolid.cxx @@ -306,7 +306,8 @@ Handle(IGESData_IGESEntity) BRepToIGES_BRSolid ::TransferCompound(const TopoDS_C AddWarning(start," an Edge is a null entity"); } else { - IShape = BW.TransferEdge(S, Standard_False); + TopTools_DataMapOfShapeShape anEmptyMap; + IShape = BW.TransferEdge(S, anEmptyMap, Standard_False); if (!IShape.IsNull()) Seq->Append(IShape); } } diff --git a/src/BRepToIGES/BRepToIGES_BRWire.cxx b/src/BRepToIGES/BRepToIGES_BRWire.cxx index 595a3619d7..6db3258f44 100644 --- a/src/BRepToIGES/BRepToIGES_BRWire.cxx +++ b/src/BRepToIGES/BRepToIGES_BRWire.cxx @@ -111,7 +111,8 @@ Handle(IGESData_IGESEntity) BRepToIGES_BRWire ::TransferWire } else if (start.ShapeType() == TopAbs_EDGE) { TopoDS_Edge E = TopoDS::Edge(start); - res = TransferEdge(E, Standard_False); + TopTools_DataMapOfShapeShape anEmptyMap; + res = TransferEdge(E, anEmptyMap, Standard_False); } else if (start.ShapeType() == TopAbs_WIRE) { TopoDS_Wire W = TopoDS::Wire(start); @@ -249,17 +250,18 @@ Handle(IGESData_IGESEntity) BRepToIGES_BRWire ::TransferVertex //============================================================================= Handle(IGESData_IGESEntity) BRepToIGES_BRWire ::TransferEdge -(const TopoDS_Edge& myedge, - const Standard_Boolean isBRepMode) +(const TopoDS_Edge& theEdge, + const TopTools_DataMapOfShapeShape& theOriginMap, + const Standard_Boolean theIsBRepMode) { Handle(IGESData_IGESEntity) res; - if ( myedge.IsNull()) return res; + if (theEdge.IsNull()) return res; // returns the 3d curve of the edge and the parameter range TopLoc_Location L; Standard_Real First, Last, U1, U2; Handle(IGESData_IGESEntity) ICurve; - Handle(Geom_Curve) Curve3d = BRep_Tool::Curve(myedge, L, First, Last); + Handle(Geom_Curve) Curve3d = BRep_Tool::Curve(theEdge, L, First, Last); //#28 rln 19.10.98 UKI60155, etc. //Only Bezier will be converted into B-Spline, not Conic. This conertation @@ -275,7 +277,7 @@ Handle(IGESData_IGESEntity) BRepToIGES_BRWire ::TransferEdge else Curve3d = Handle(Geom_Curve)::DownCast(Curve3d->Copy()); - if (myedge.Orientation() == TopAbs_REVERSED && !isBRepMode) { + if (theEdge.Orientation() == TopAbs_REVERSED && !theIsBRepMode) { U1 = Curve3d->ReversedParameter(Last); U2 = Curve3d->ReversedParameter(First); Curve3d->Reverse(); @@ -296,7 +298,9 @@ Handle(IGESData_IGESEntity) BRepToIGES_BRWire ::TransferEdge if (!ICurve.IsNull()) res = ICurve; - SetShapeResult ( myedge, res ); + // In the reverted face's case find an origin by the reverted + TopoDS_Edge anEdge = !theOriginMap.IsEmpty() ? TopoDS::Edge(theOriginMap.Find(theEdge)) : theEdge; + SetShapeResult ( anEdge, res ); return res; } @@ -306,22 +310,23 @@ Handle(IGESData_IGESEntity) BRepToIGES_BRWire ::TransferEdge // TransferEdge //============================================================================= -Handle(IGESData_IGESEntity) BRepToIGES_BRWire ::TransferEdge (const TopoDS_Edge& myedge, - const TopoDS_Face& myface, - const Standard_Real length, - const Standard_Boolean isBRepMode) +Handle(IGESData_IGESEntity) BRepToIGES_BRWire ::TransferEdge (const TopoDS_Edge& theEdge, + const TopoDS_Face& theFace, + const TopTools_DataMapOfShapeShape& theOriginMap, + const Standard_Real theLength, + const Standard_Boolean theIsBRepMode) { Handle(IGESData_IGESEntity) res; - if ( myedge.IsNull() || GetPCurveMode() ==0 || - ( ! isBRepMode && BRep_Tool::Degenerated ( myedge ) ) ) return res; + if (theEdge.IsNull() || GetPCurveMode() ==0 || + ( ! theIsBRepMode && BRep_Tool::Degenerated (theEdge) ) ) return res; //S4181 pdn 23.04.99 adjusting length factor according to analytic mode. - Standard_Real myLen = length; - Standard_Boolean analyticMode = ( GetConvertSurfaceMode() ==0 && isBRepMode ); + Standard_Real myLen = theLength; + Standard_Boolean analyticMode = ( GetConvertSurfaceMode() ==0 && theIsBRepMode ); - // returns the 2d curve associated to myedge in the parametric space of myface + // returns the 2d curve associated to theEdge in the parametric space of theFace Standard_Real First, Last; - Handle(Geom2d_Curve) Curve2d = BRep_Tool::CurveOnSurface(myedge, myface, First, Last); + Handle(Geom2d_Curve) Curve2d = BRep_Tool::CurveOnSurface(theEdge, theFace, First, Last); Handle(IGESData_IGESEntity) ICurve2d; //#29 rln 19.10.98 @@ -333,12 +338,12 @@ Handle(IGESData_IGESEntity) BRepToIGES_BRWire ::TransferEdge (const TopoDS_Edge& // It is necessary to invert (u,v) surfaces of revolution. TopLoc_Location L; - Handle(Geom_Surface) st = BRep_Tool::Surface(myface, L); + Handle(Geom_Surface) st = BRep_Tool::Surface(theFace, L); if (st->IsKind(STANDARD_TYPE(Geom_Plane))){ return res; } Standard_Real Ufirst, Ulast, Vfirst, Vlast; - BRepTools::UVBounds(myface, Ufirst, Ulast, Vfirst, Vlast); + BRepTools::UVBounds(theFace, Ufirst, Ulast, Vfirst, Vlast); Handle(Geom_Surface) Surf; if (st->IsKind(STANDARD_TYPE(Geom_RectangularTrimmedSurface))) { @@ -439,7 +444,7 @@ Handle(IGESData_IGESEntity) BRepToIGES_BRWire ::TransferEdge (const TopoDS_Edge& //S4181 transfer functionality gp_Trsf2d trans; Standard_Real uFact = 1.; - if(isBRepMode && Surf->IsKind(STANDARD_TYPE(Geom_Plane))) { + if(theIsBRepMode && Surf->IsKind(STANDARD_TYPE(Geom_Plane))) { trans.SetScale(gp_Pnt2d(0,0),1./GetUnit()); } if(Surf->IsKind(STANDARD_TYPE(Geom_SurfaceOfLinearExtrusion))) { @@ -485,7 +490,7 @@ Handle(IGESData_IGESEntity) BRepToIGES_BRWire ::TransferEdge (const TopoDS_Edge& Curve2d = sbe.TransformPCurve(Curve2d,trans1,1.,First,Last); } - if (myedge.Orientation() == TopAbs_REVERSED) { + if (theEdge.Orientation() == TopAbs_REVERSED) { Standard_Real tmpFirst = Curve2d->ReversedParameter(Last), tmpLast = Curve2d->ReversedParameter(First); Curve2d->Reverse(); @@ -503,7 +508,9 @@ Handle(IGESData_IGESEntity) BRepToIGES_BRWire ::TransferEdge (const TopoDS_Edge& if (!ICurve2d.IsNull()) res = ICurve2d; - SetShapeResult ( myedge, res ); + // In the reverted face's case find an origin by the reverted + TopoDS_Edge anEdge = !theOriginMap.IsEmpty() ? TopoDS::Edge(theOriginMap.Find(theEdge)) : theEdge; + SetShapeResult ( anEdge, res ); return res; } @@ -535,7 +542,8 @@ Handle(IGESData_IGESEntity) BRepToIGES_BRWire ::TransferWire AddWarning(mywire, "an Edge is a null entity"); } else { - ent = TransferEdge(E, Standard_False); + TopTools_DataMapOfShapeShape anEmptyMap; + ent = TransferEdge(E, anEmptyMap, Standard_False); if (!ent.IsNull()) Seq->Append(ent); } } @@ -571,13 +579,14 @@ Handle(IGESData_IGESEntity) BRepToIGES_BRWire ::TransferWire //============================================================================= Handle(IGESData_IGESEntity) BRepToIGES_BRWire ::TransferWire -(const TopoDS_Wire & mywire, - const TopoDS_Face & myface, - Handle(IGESData_IGESEntity)& mycurve2d, - const Standard_Real length) +(const TopoDS_Wire & theWire, + const TopoDS_Face& theFace, + const TopTools_DataMapOfShapeShape& theOriginMap, + Handle(IGESData_IGESEntity)& theCurve2d, + const Standard_Real theLength) { Handle(IGESData_IGESEntity) res; - if ( mywire.IsNull()) return res; + if (theWire.IsNull()) return res; Handle(IGESData_IGESEntity) ent3d ; Handle(IGESData_IGESEntity) ent2d ; @@ -586,45 +595,45 @@ Handle(IGESData_IGESEntity) BRepToIGES_BRWire ::TransferWire // create a 3d CompositeCurve and a 2d CompositeCurve - TopExp_Explorer TE(mywire, TopAbs_VERTEX); + TopExp_Explorer TE(theWire, TopAbs_VERTEX); if ( TE.More()) { // PTV OCC908 workaround for KAS:dev version /* BRepTools_WireExplorer WE; - for ( WE.Init(mywire,myface); WE.More(); WE.Next()) { + for ( WE.Init(theWire,theFace); WE.More(); WE.Next()) { TopoDS_Edge E = WE.Current(); if (E.IsNull()) { - AddWarning(mywire, "an Edge is a null entity"); + AddWarning(theWire, "an Edge is a null entity"); } else { ent3d = TransferEdge(E, Standard_False); if (!ent3d.IsNull()) Seq3d->Append(ent3d); - ent2d = TransferEdge(E, myface, length, Standard_False); + ent2d = TransferEdge(E, theFace, theLength, Standard_False); if (!ent2d.IsNull()) Seq2d->Append(ent2d); } } */ Handle(ShapeFix_Wire) aSFW = - new ShapeFix_Wire( mywire, myface, Precision::Confusion() ); + new ShapeFix_Wire( theWire, theFace, Precision::Confusion() ); aSFW->FixReorder(); Handle(ShapeExtend_WireData) aSEWD = aSFW->WireData(); Standard_Integer nbE = aSEWD->NbEdges(); for (Standard_Integer windex = 1; windex <= nbE; windex++) { TopoDS_Edge E = aSEWD->Edge( windex ); if (E.IsNull()) { - AddWarning(mywire, "an Edge is a null entity"); + AddWarning(theWire, "an Edge is a null entity"); } else { - ent3d = TransferEdge(E, Standard_False); + ent3d = TransferEdge(E, theOriginMap, Standard_False); if (!ent3d.IsNull()) Seq3d->Append(ent3d); - ent2d = TransferEdge(E, myface, length, Standard_False); + ent2d = TransferEdge(E, theFace, theOriginMap, theLength, Standard_False); if (!ent2d.IsNull()) Seq2d->Append(ent2d); } } // OCC908 end of workaround } else - AddWarning(mywire, " no Vertex associated to the Wire"); + AddWarning(theWire, " no Vertex associated to the Wire"); // Composite Curve 3D Standard_Integer nb3d = Seq3d->Length(); @@ -649,7 +658,7 @@ Handle(IGESData_IGESEntity) BRepToIGES_BRWire ::TransferWire Standard_Integer nb2d = Seq2d->Length(); Handle(IGESData_HArray1OfIGESEntity) Tab2d; if ( nb2d == 1 ) { - mycurve2d = ent2d; + theCurve2d = ent2d; } else if (nb2d >= 2) { Tab2d = new IGESData_HArray1OfIGESEntity(1,nb2d); @@ -661,10 +670,12 @@ Handle(IGESData_IGESEntity) BRepToIGES_BRWire ::TransferWire } Handle(IGESGeom_CompositeCurve) Comp = new IGESGeom_CompositeCurve; Comp->Init(Tab2d); - mycurve2d = Comp; + theCurve2d = Comp; } - SetShapeResult ( mywire, res ); + // In the reverted face's case find an origin by the reverted + TopoDS_Wire aWire = !theOriginMap.IsEmpty() ? TopoDS::Wire(theOriginMap.Find(theWire)) : theWire; + SetShapeResult ( aWire, res ); return res; } diff --git a/src/BRepToIGES/BRepToIGES_BRWire.hxx b/src/BRepToIGES/BRepToIGES_BRWire.hxx index 265aa826db..600ec0369f 100644 --- a/src/BRepToIGES/BRepToIGES_BRWire.hxx +++ b/src/BRepToIGES/BRepToIGES_BRWire.hxx @@ -24,6 +24,8 @@ #include #include #include +#include + class IGESData_IGESEntity; class TopoDS_Shape; class TopoDS_Vertex; @@ -90,22 +92,22 @@ public: //! this member returns a NullEntity. Standard_EXPORT Handle(IGESData_IGESEntity) TransferVertex (const TopoDS_Vertex& myvertex, const TopoDS_Face& myface, gp_Pnt2d& mypoint); - //! Transfert an Edge entity from TopoDS to IGES - //! If this Entity could not be converted, - //! this member returns a NullEntity. - //! isBRepMode indicates if write mode is BRep - //! (True when called from BRepToIGESBRep and False when from BRepToIGES) - //! If edge is REVERSED and isBRepMode is False 3D edge curve is reversed, - //! otherwise, not. - Standard_EXPORT Handle(IGESData_IGESEntity) TransferEdge (const TopoDS_Edge& myedge, const Standard_Boolean isBRepMode); + //! Transfert an Edge 3d entity from TopoDS to IGES + //! If edge is REVERSED and isBRepMode is False 3D edge curve is reversed + //! @param[in] theEdge input edge to transfer + //! @param[in] theOriginMap shapemap contains the original shapes. Should be empty if face is not reversed + //! @param[in] theIsBRepMode indicates if write mode is BRep + //! @return Iges entity or null if could not be converted + Standard_EXPORT Handle(IGESData_IGESEntity) TransferEdge (const TopoDS_Edge& theEdge, const TopTools_DataMapOfShapeShape& theOriginMap, const Standard_Boolean theIsBRepMode); - //! Transfert an Edge entity on a Face from TopoDS to IGES - //! If this Entity could not be converted, - //! this member returns a NullEntity. - //! isBRepMode indicates if write mode is BRep - //! (True when called from BRepToIGESBRep and False when from BRepToIGES) - //! passing into Transform2dCurve() - Standard_EXPORT Handle(IGESData_IGESEntity) TransferEdge (const TopoDS_Edge& myedge, const TopoDS_Face& myface, const Standard_Real length, const Standard_Boolean isBRepMode); + //! Transfert an Edge 2d entity on a Face from TopoDS to IGES + //! @param[in] theEdge input edge to transfer + //! @param[in] theFace input face to get the surface and UV coordinates from it + //! @param[in] theOriginMap shapemap contains the original shapes. Should be empty if face is not reversed + //! @param[in] theLength input surface length + //! @param[in] theIsBRepMode indicates if write mode is BRep + //! @return Iges entity or null if could not be converted + Standard_EXPORT Handle(IGESData_IGESEntity) TransferEdge (const TopoDS_Edge& theEdge, const TopoDS_Face& theFace, const TopTools_DataMapOfShapeShape& theOriginMap, const Standard_Real theLength, const Standard_Boolean theIsBRepMode); //! Transfert a Wire entity from TopoDS to IGES //! If this Entity could not be converted, @@ -113,12 +115,14 @@ public: Standard_EXPORT Handle(IGESData_IGESEntity) TransferWire (const TopoDS_Wire& mywire); //! Transfert a Wire entity from TopoDS to IGES. - //! Returns the curve associated to mywire in - //! the parametric space of myface. - //! If this Entity could not be converted, - //! this member returns a NullEntity. - //! Parameter IsRevol is not used anymore - Standard_EXPORT Handle(IGESData_IGESEntity) TransferWire (const TopoDS_Wire& mywire, const TopoDS_Face& myface, Handle(IGESData_IGESEntity)& mycurve2d, const Standard_Real length); + //! @param[in] theWire input wire + //! @param[in] theFace input face + //! @param[in] theOriginMap shapemap contains the original shapes. Should be empty if face is not reversed + //! @param[in] theCurve2d input curve 2d + //! @param[in] theLength input surface length + //! @return Iges entity (the curve associated to mywire in the parametric space of myface) + //! or null if could not be converted + Standard_EXPORT Handle(IGESData_IGESEntity) TransferWire (const TopoDS_Wire& theWire, const TopoDS_Face& theFace, const TopTools_DataMapOfShapeShape& theOriginMap, Handle(IGESData_IGESEntity)& theCurve2d, const Standard_Real theLength); diff --git a/src/BRepToIGESBRep/BRepToIGESBRep_Entity.cxx b/src/BRepToIGESBRep/BRepToIGESBRep_Entity.cxx index f0c2054187..d1e166b633 100644 --- a/src/BRepToIGESBRep/BRepToIGESBRep_Entity.cxx +++ b/src/BRepToIGESBRep/BRepToIGESBRep_Entity.cxx @@ -303,7 +303,8 @@ Handle(IGESData_IGESEntity) BRepToIGESBRep_Entity::TransferShape TopoDS_Edge E = TopoDS::Edge(start); BRepToIGES_BRWire BW(*this); BW.SetModel(GetModel()); - res = BW.TransferEdge(E, Standard_False); + TopTools_DataMapOfShapeShape anEmptyMap; + res = BW.TransferEdge(E, anEmptyMap, Standard_False); return res; } else if (start.ShapeType() == TopAbs_WIRE) { @@ -357,7 +358,8 @@ Handle(IGESData_IGESEntity) BRepToIGESBRep_Entity::TransferEdge (const TopoDS_E { BRepToIGES_BRWire BR(*this); BR.SetModel(GetModel()); - return BR.TransferEdge (myedge, Standard_True); + TopTools_DataMapOfShapeShape anEmptyMap; + return BR.TransferEdge (myedge, anEmptyMap, Standard_True); } @@ -375,7 +377,8 @@ Handle(IGESData_IGESEntity) BRepToIGESBRep_Entity::TransferEdge (const TopoDS_Ed BRepToIGES_BRWire BR(*this); BR.SetModel(GetModel()); - ICurve2d = BR.TransferEdge (myedge, myface, Length, Standard_True); + TopTools_DataMapOfShapeShape anEmptyMap; + ICurve2d = BR.TransferEdge (myedge, myface, anEmptyMap, Length, Standard_True); // curve 3d is obligatory. If it does not exist it is created and stored in "myCurves". // If the edge is degenerated, there is no associated 3d. So "edge-tuple" @@ -897,7 +900,8 @@ Handle(IGESData_IGESEntity) BRepToIGESBRep_Entity::TransferCompound (const TopoD BRepToIGES_BRWire BW(*this); BW.SetModel(GetModel()); - IShape = BW.TransferEdge(S, Standard_False); + TopTools_DataMapOfShapeShape anEmptyMap; + IShape = BW.TransferEdge(S, anEmptyMap, Standard_False); if (!IShape.IsNull()) Seq->Append(IShape); } diff --git a/tests/bugs/iges/bug26174 b/tests/bugs/iges/bug26174 new file mode 100644 index 0000000000..ae57337c76 --- /dev/null +++ b/tests/bugs/iges/bug26174 @@ -0,0 +1,45 @@ +puts "============" +puts "0026174: Data Exchange, IGES - Loss of color after the second write of file" +puts "============" + +pload XDE +catch { Close D } +catch { Close D1 } + +box b 0 0 0 10 10 10 +compound b c +XNewDoc D +XAddShape D c 1 +XSetColor D 0:1:1:1:1 1 0 0 + +WriteIges D $imagedir/${casename}_orig.igs +XGetOneShape res D +set dump [dump res] +if { [regexp "Dump of 24 Curve2ds" $dump] != 1 } { + puts "Error: incorrect Curve transfer" +} +WriteIges D $imagedir/${casename}_comp.igs +ReadIges D1 $imagedir/${casename}_comp.igs +XGetOneShape res1 D1 + +vinit view1 +vclear +XDisplay D1 0:1:1:1 +vfit +set ColorD1 [string trim [vreadpixel 204 204 name]] +if {$ColorD1 != "RED 1"} { + puts "Error: expected color of shape from Document1 is RED." +} + +catch {[file delete $imagedir/${casename}_orig.igs]} +catch {[file delete $imagedir/${casename}_comp.igs]} + +checkprops res -equal res1 +set color_orig [XGetAllColors D] +set color_comp [XGetAllColors D1] +if { $color_orig != $color_comp } { + puts "Error: incorrect color transfer" +} + +checknbshapes res -vertex 8 -edge 12 -wire 6 -face 6 +checkview -screenshot -3d -path $imagedir/${test_image}.png diff --git a/tests/bugs/xde/bug26174 b/tests/bugs/xde/bug26174 deleted file mode 100644 index 8575727753..0000000000 --- a/tests/bugs/xde/bug26174 +++ /dev/null @@ -1,53 +0,0 @@ -puts "TODO OCC26174 ALL: ERROR: OCC26174 is reproduced." - -puts "========" -puts "OCC26174" -puts "========" -puts "" -####################################################### -# Loss of color after the second write of file (iges) -####################################################### - -pload DCAF - -set aFileD1 ${imagedir}/${casename}_D1.igs -set aFileD2 ${imagedir}/${casename}_D2.igs - -set anImageD $imagedir/${casename}_D.png -set anImageD1 $imagedir/${casename}_D1.png -set anImageD2 $imagedir/${casename}_D2.png - -box b 0 0 0 10 10 10 -compound b c -NewDocument D -XAddShape D c 1 -XSetColor D 0:1:1:1 1 0 0 - -XShow D -vfit -set ColorD [string trim [vreadpixel 204 204 name]] -vdump $anImageD - -WriteIges D ${aFileD1} -WriteIges D ${aFileD2} - -ReadIges D1 ${aFileD1} -ReadIges D2 ${aFileD2} -file delete -force ${aFileD1} -file delete -force ${aFileD2} - -XShow D1 -vfit -set ColorD1 [string trim [vreadpixel 204 204 name]] -vdump $anImageD1 -if {$ColorD != $ColorD1} { - puts "ERROR: OCC26174 is reproduced. Expected color of shape from Document1 is ${ColorD}, not ${ColorD1}." -} - -XShow D2 -vfit -set ColorD2 [string trim [vreadpixel 204 204 name]] -vdump $anImageD2 -if {$ColorD != $ColorD2} { - puts "ERROR: OCC26174 is reproduced. Expected color of shape from Document2 is ${ColorD}, not ${ColorD2}." -} From 2f195ab9159553b7373f779452c052545fc4d397 Mon Sep 17 00:00:00 2001 From: kgv Date: Tue, 14 Dec 2021 00:25:36 +0300 Subject: [PATCH 172/639] 0032484: Configuration, CMake fails to find EGL and GLES2 include directory on iOS platform Fixed configuration errors and compilation errors on iOS target due to unexpected EGL usage (non-existing on iOS). --- CMakeLists.txt | 6 ++++-- src/OpenGl/OpenGl_GlFunctions.hxx | 4 +++- src/OpenGl/OpenGl_GraphicDriver.cxx | 24 +++++++++++++++++------- 3 files changed, 24 insertions(+), 10 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 208a5ab255..4b255ca7b5 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -661,8 +661,10 @@ endif() if (CAN_USE_GLES2) if (USE_GLES2) add_definitions (-DHAVE_GLES2_EXT) - OCCT_INCLUDE_CMAKE_FILE ("adm/cmake/egl") - OCCT_INCLUDE_CMAKE_FILE ("adm/cmake/gles2") + if (NOT IOS) + OCCT_INCLUDE_CMAKE_FILE ("adm/cmake/egl") + OCCT_INCLUDE_CMAKE_FILE ("adm/cmake/gles2") + endif() else() OCCT_CHECK_AND_UNSET_GROUP ("3RDPARTY_EGL") OCCT_CHECK_AND_UNSET_GROUP ("3RDPARTY_GLES2") diff --git a/src/OpenGl/OpenGl_GlFunctions.hxx b/src/OpenGl/OpenGl_GlFunctions.hxx index 1009a9fe07..8b4e4a6bad 100644 --- a/src/OpenGl/OpenGl_GlFunctions.hxx +++ b/src/OpenGl/OpenGl_GlFunctions.hxx @@ -25,7 +25,9 @@ #if !defined(HAVE_EGL) #if defined(__ANDROID__) || defined(__QNX__) || defined(__EMSCRIPTEN__) || defined(HAVE_GLES2) || defined(OCCT_UWP) - #define HAVE_EGL + #if !defined(__APPLE__) + #define HAVE_EGL // EAGL is used instead of EGL + #endif #elif !defined(_WIN32) && !defined(__APPLE__) && !defined(HAVE_XLIB) #define HAVE_EGL #endif diff --git a/src/OpenGl/OpenGl_GraphicDriver.cxx b/src/OpenGl/OpenGl_GraphicDriver.cxx index 4ed778fd2f..3535cda0ed 100644 --- a/src/OpenGl/OpenGl_GraphicDriver.cxx +++ b/src/OpenGl/OpenGl_GraphicDriver.cxx @@ -52,7 +52,17 @@ IMPLEMENT_STANDARD_RTTIEXT(OpenGl_GraphicDriver,Graphic3d_GraphicDriver) #include #endif -#if defined(HAVE_EGL) || defined(HAVE_GLES2) || defined(OCCT_UWP) || defined(__ANDROID__) || defined(__QNX__) || defined(__EMSCRIPTEN__) +#if !defined(HAVE_EGL) +#if defined(__ANDROID__) || defined(__QNX__) || defined(__EMSCRIPTEN__) || defined(HAVE_GLES2) || defined(OCCT_UWP) + #if !defined(__APPLE__) + #define HAVE_EGL // EAGL is used instead of EGL + #endif +#elif !defined(_WIN32) && !defined(__APPLE__) && !defined(HAVE_XLIB) + #define HAVE_EGL +#endif +#endif + +#if defined(HAVE_EGL) #include #ifndef EGL_OPENGL_ES3_BIT #define EGL_OPENGL_ES3_BIT 0x00000040 @@ -67,7 +77,7 @@ namespace { static const Handle(OpenGl_Context) TheNullGlCtx; -#if defined(HAVE_EGL) || defined(HAVE_GLES2) || defined(OCCT_UWP) || defined(__ANDROID__) || defined(__QNX__) || defined(__EMSCRIPTEN__) +#if defined(HAVE_EGL) //! Wrapper over eglChooseConfig() called with preferred defaults. static EGLConfig chooseEglSurfConfig (EGLDisplay theDisplay) { @@ -159,7 +169,7 @@ OpenGl_GraphicDriver::OpenGl_GraphicDriver (const Handle(Aspect_DisplayConnectio myMapOfView (1, NCollection_BaseAllocator::CommonBaseAllocator()), myMapOfStructure (1, NCollection_BaseAllocator::CommonBaseAllocator()) { -#if defined(HAVE_EGL) || defined(HAVE_GLES2) || defined(OCCT_UWP) || defined(__ANDROID__) || defined(__QNX__) || defined(__EMSCRIPTEN__) +#if defined(HAVE_EGL) myEglDisplay = (Aspect_Display )EGL_NO_DISPLAY; myEglContext = (Aspect_RenderingContext )EGL_NO_CONTEXT; #endif @@ -254,7 +264,7 @@ void OpenGl_GraphicDriver::ReleaseContext() aWindow->GetGlContext()->forcedRelease(); } -#if defined(HAVE_EGL) || defined(HAVE_GLES2) || defined(OCCT_UWP) || defined(__ANDROID__) || defined(__QNX__) || defined(__EMSCRIPTEN__) +#if defined(HAVE_EGL) if (myIsOwnContext) { if (myEglContext != (Aspect_RenderingContext )EGL_NO_CONTEXT) @@ -289,7 +299,7 @@ void OpenGl_GraphicDriver::ReleaseContext() Standard_Boolean OpenGl_GraphicDriver::InitContext() { ReleaseContext(); -#if defined(HAVE_EGL) || defined(HAVE_GLES2) || defined(OCCT_UWP) || defined(__ANDROID__) || defined(__QNX__) || defined(__EMSCRIPTEN__) +#if defined(HAVE_EGL) #if defined(HAVE_XLIB) if (myDisplayConnection.IsNull()) @@ -373,7 +383,7 @@ Standard_Boolean OpenGl_GraphicDriver::InitEglContext (Aspect_Display t void* theEglConfig) { ReleaseContext(); -#if defined(HAVE_EGL) || defined(HAVE_GLES2) || defined(OCCT_UWP) || defined(__ANDROID__) || defined(__QNX__) || defined(__EMSCRIPTEN__) +#if defined(HAVE_EGL) #if defined(HAVE_XLIB) if (myDisplayConnection.IsNull()) { @@ -424,7 +434,7 @@ void OpenGl_GraphicDriver::chooseVisualInfo() XVisualInfo* aVisInfo = NULL; Aspect_FBConfig anFBConfig = NULL; -#if defined(HAVE_EGL) || defined(HAVE_GLES2) +#if defined(HAVE_EGL) XVisualInfo aVisInfoTmp; memset (&aVisInfoTmp, 0, sizeof(aVisInfoTmp)); aVisInfoTmp.screen = DefaultScreen (aDisp); From 468856bf4a0aef71cb63a5c14774e981d3a88c27 Mon Sep 17 00:00:00 2001 From: ichesnok Date: Thu, 2 Dec 2021 14:40:35 +0300 Subject: [PATCH 173/639] 0032452: Data Exchange - IGES reader returns invalid shapes if xstep.cascade.unit property is changed from default Fixed documentation in 'IGES Translator' and 'STEP Translator' sections (description of the read.maxprecision.val parameter). --- dox/user_guides/iges/iges.md | 4 +++- dox/user_guides/step/step.md | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/dox/user_guides/iges/iges.md b/dox/user_guides/iges/iges.md index 3d2323e1d9..1db3f4dec8 100644 --- a/dox/user_guides/iges/iges.md +++ b/dox/user_guides/iges/iges.md @@ -165,7 +165,9 @@ if (!Interface_Static::SetIVal ("read.maxprecision.mode",1)) Default value is *Preferred (0)*.

read.maxprecision.val

-defines the maximum allowable tolerance (in mm) of the shape. It should be not less than the basis value of tolerance set in processor (either Resolution from the file or *read.precision.val*). Actually, the maximum between *read.maxprecision.val* and basis tolerance is used to define maximum allowed tolerance. +defines the maximum allowable tolerance (in internal units, which are specified in xstep.cascade.unit) of the shape. +It should be not less than the basis value of tolerance set in processor (either Resolution from the file or *read.precision.val*). +Actually, the maximum between *read.maxprecision.val* and basis tolerance is used to define maximum allowed tolerance. Read this parameter with: ~~~~{.cpp} Standard_Real rp = Interface_Static::RVal("read.maxprecision.val"); diff --git a/dox/user_guides/step/step.md b/dox/user_guides/step/step.md index 0ceccc12c9..9ea4dc7f44 100644 --- a/dox/user_guides/step/step.md +++ b/dox/user_guides/step/step.md @@ -182,7 +182,9 @@ By default this value is 0.0001. The value given to this parameter is a basic value for ShapeHealing algorithms and the processor. It does its best to reach it. Under certain circumstances, the value you give may not be attached to all of the entities concerned at the end of processing. STEP-to-OpenCASCADE translation does not improve the quality of the geometry in the original STEP file. This means that the value you enter may be impossible to attach to all shapes with the given quality of the geometry in the STEP file.

read.maxprecision.val

-Defines the maximum allowed tolerance (in mm) of the shape. It should be not less than the basic value of tolerance set in the processor (either the uncertainty from the file or *read.precision.val*). Actually, the maximum between *read.maxprecision.val* and the basis tolerance is used to define the maximum allowed tolerance. +Defines the maximum allowed tolerance (in internal units, which are specified in xstep.cascade.unit) of the shape. +It should be not less than the basic value of tolerance set in the processor (either the uncertainty from the file or *read.precision.val*). +Actually, the maximum between *read.maxprecision.val* and the basis tolerance is used to define the maximum allowed tolerance. Read this parameter with: ~~~~{.cpp} From f291ad25280206edd05fc2b8ab3a46621e846ade Mon Sep 17 00:00:00 2001 From: kgv Date: Thu, 16 Dec 2021 01:50:41 +0300 Subject: [PATCH 174/639] 0032733: Coding Rules - fix misprints in Doxygen tags --- src/AIS/AIS_InteractiveContext.hxx | 4 ++-- src/AIS/AIS_Selection.hxx | 8 +++---- src/BRep/BRep_TFace.hxx | 2 +- src/BRepTools/BRepTools.hxx | 6 ++--- src/Graphic3d/Graphic3d_CView.hxx | 1 - src/Graphic3d/Graphic3d_Camera.hxx | 8 +++---- src/Graphic3d/Graphic3d_PBRMaterial.hxx | 2 +- src/Graphic3d/Graphic3d_TransformPers.hxx | 3 ++- src/Message/Message.hxx | 2 +- src/NCollection/NCollection_Mat3.hxx | 6 ++--- src/NCollection/NCollection_UBTree.hxx | 2 +- src/OpenGl/OpenGl_Context.hxx | 8 +++---- src/OpenGl/OpenGl_GraphicDriver.hxx | 12 +++++----- src/Standard/Standard_Dump.hxx | 24 +++++++++---------- src/StdPrs/StdPrs_ToolTriangulatedShape.hxx | 6 ++--- .../TCollection_ExtendedString.hxx | 2 +- src/TDataStd/TDataStd_NamedData.hxx | 4 ++-- src/gp/gp_XY.hxx | 12 +++++++++- src/gp/gp_XYZ.hxx | 17 ++++++++++++- 19 files changed, 77 insertions(+), 52 deletions(-) diff --git a/src/AIS/AIS_InteractiveContext.hxx b/src/AIS/AIS_InteractiveContext.hxx index acbb8741ef..9f2f2647ad 100644 --- a/src/AIS/AIS_InteractiveContext.hxx +++ b/src/AIS/AIS_InteractiveContext.hxx @@ -1434,8 +1434,8 @@ protected: //! @name internal methods } //! Bind/Unbind status to object and its children - //! @param theObj [in] the object to change status - //! @param theStatus status, if NULL, unbind object + //! @param[in] theIObj the object to change status + //! @param[in] theStatus status, if NULL, unbind object Standard_EXPORT void setObjectStatus (const Handle(AIS_InteractiveObject)& theIObj, const PrsMgr_DisplayStatus theStatus, const Standard_Integer theDispyMode, diff --git a/src/AIS/AIS_Selection.hxx b/src/AIS/AIS_Selection.hxx index 1a8bfd5e8e..ce18b38ff7 100644 --- a/src/AIS/AIS_Selection.hxx +++ b/src/AIS/AIS_Selection.hxx @@ -80,10 +80,10 @@ public: const Handle(SelectMgr_EntityOwner)& Value() const { return myIterator.Value(); } //! Select or deselect owners depending on the selection scheme. - //! @param theOwners [in] elements to change selection state - //! @param theSelScheme [in] selection scheme, defines how owner is selected - //! @param theToAllowSelOverlap [in] selection flag, if true - overlapped entities are allowed - //! @param theFilter [in] context filter to skip not acceptable owners + //! @param[in] thePickedOwners elements to change selection state + //! @param[in] theSelScheme selection scheme, defines how owner is selected + //! @param[in] theToAllowSelOverlap selection flag, if true - overlapped entities are allowed + //! @param[in] theFilter context filter to skip not acceptable owners Standard_EXPORT virtual void SelectOwners (const AIS_NArray1OfEntityOwner& thePickedOwners, const AIS_SelectionScheme theSelScheme, const Standard_Boolean theToAllowSelOverlap, diff --git a/src/BRep/BRep_TFace.hxx b/src/BRep/BRep_TFace.hxx index 9d8edc974d..2654de5629 100644 --- a/src/BRep/BRep_TFace.hxx +++ b/src/BRep/BRep_TFace.hxx @@ -86,7 +86,7 @@ public: void NaturalRestriction (const Standard_Boolean theRestriction) { myNaturalRestriction = theRestriction; } //! Returns the triangulation of this face according to the mesh purpose. - //! @param theMeshPurpose [in] a mesh purpose to find appropriate triangulation (NONE by default). + //! @param[in] thePurpose a mesh purpose to find appropriate triangulation (NONE by default). //! @return an active triangulation in case of NONE purpose, //! the first triangulation appropriate for the input purpose, //! just the first triangulation if none matching other criteria and input purpose is AnyFallback diff --git a/src/BRepTools/BRepTools.hxx b/src/BRepTools/BRepTools.hxx index 51dddda991..9e50dd3fb8 100644 --- a/src/BRepTools/BRepTools.hxx +++ b/src/BRepTools/BRepTools.hxx @@ -276,7 +276,7 @@ public: //! @param theWithNormals [in] flag which specifies whether to save triangulation with (TRUE) or without (FALSE) normals; //! has no effect on triangulation-only geometry //! @param theVersion [in] the TopTools format version - //! @param theRange the range of progress indicator to fill in + //! @param theProgress the range of progress indicator to fill in Standard_EXPORT static void Write (const TopoDS_Shape& theShape, Standard_OStream& theStream, const Standard_Boolean theWithTriangles, @@ -293,7 +293,7 @@ public: //! This alias writes shape with triangulation data. //! @param theShape [in] the shape to write //! @param theFile [in] the path to file to output shape into - //! @param theRange the range of progress indicator to fill in + //! @param theProgress the range of progress indicator to fill in static Standard_Boolean Write (const TopoDS_Shape& theShape, const Standard_CString theFile, const Message_ProgressRange& theProgress = Message_ProgressRange()) @@ -310,7 +310,7 @@ public: //! @param theWithNormals [in] flag which specifies whether to save triangulation with (TRUE) or without (FALSE) normals; //! has no effect on triangulation-only geometry //! @param theVersion [in] the TopTools format version - //! @param theRange the range of progress indicator to fill in + //! @param theProgress the range of progress indicator to fill in Standard_EXPORT static Standard_Boolean Write (const TopoDS_Shape& theShape, const Standard_CString theFile, const Standard_Boolean theWithTriangles, diff --git a/src/Graphic3d/Graphic3d_CView.hxx b/src/Graphic3d/Graphic3d_CView.hxx index d10a127240..f7c0121a1e 100644 --- a/src/Graphic3d/Graphic3d_CView.hxx +++ b/src/Graphic3d/Graphic3d_CView.hxx @@ -399,7 +399,6 @@ public: //! Enables or disables IBL (Image Based Lighting) from background cubemap. //! Has no effect if PBR is not used. //! @param[in] theToEnableIBL enable or disable IBL from background cubemap - //! @param[in] theToUpdate redraw the view virtual void SetImageBasedLighting (Standard_Boolean theToEnableIBL) = 0; //! Returns environment texture set for the view. diff --git a/src/Graphic3d/Graphic3d_Camera.hxx b/src/Graphic3d/Graphic3d_Camera.hxx index 4415701d64..aeebc7cbf6 100644 --- a/src/Graphic3d/Graphic3d_Camera.hxx +++ b/src/Graphic3d/Graphic3d_Camera.hxx @@ -309,7 +309,7 @@ public: //! When switching to perspective projection from orthographic one, //! the ZNear and ZFar are reset to default values (0.001, 3000.0) //! if less than 0.0. - //! @param theProjectionType [in] the camera projection type. + //! @param[in] theProjection the camera projection type. Standard_EXPORT void SetProjectionType (const Projection theProjection); //! @return camera projection type. @@ -369,12 +369,12 @@ public: //! for orthogonal projection the view volume contains the displayed objects //! completely. For zoomed perspective view, the view volume is adjusted such //! that it contains the objects or their parts, located in front of the camera. - //! @param theScaleFactor [in] the scale factor for Z-range. + //! @param[in] theScaleFactor the scale factor for Z-range. //! The range between Z-min, Z-max projection volume planes //! evaluated by z fitting method will be scaled using this coefficient. //! Program error exception is thrown if negative or zero value is passed. - //! @param theMinMax [in] applicative min max boundaries. - //! @param theScaleFactor [in] real graphical boundaries (not accounting infinite flag). + //! @param[in] theMinMax applicative min max boundaries. + //! @param[in] theGraphicBB real graphical boundaries (not accounting infinite flag). Standard_EXPORT bool ZFitAll (const Standard_Real theScaleFactor, const Bnd_Box& theMinMax, const Bnd_Box& theGraphicBB, diff --git a/src/Graphic3d/Graphic3d_PBRMaterial.hxx b/src/Graphic3d/Graphic3d_PBRMaterial.hxx index 301b5b907b..ceba0add61 100644 --- a/src/Graphic3d/Graphic3d_PBRMaterial.hxx +++ b/src/Graphic3d/Graphic3d_PBRMaterial.hxx @@ -110,7 +110,7 @@ public: //! Generates 2D look up table of scale and bias for fresnell zero coefficient. //! It is needed for calculation reflectance part of environment lighting. //! @param [out] theLUT table storage (must be Image_Format_RGF). - //! @param [in] theIntegralSamplesCount number of importance samples in hemisphere integral calculation for every table item. + //! @param [in] theNbIntegralSamples number of importance samples in hemisphere integral calculation for every table item. Standard_EXPORT static void GenerateEnvLUT (const Handle(Image_PixMap)& theLUT, unsigned int theNbIntegralSamples = 1024); diff --git a/src/Graphic3d/Graphic3d_TransformPers.hxx b/src/Graphic3d/Graphic3d_TransformPers.hxx index 53b7592056..ed60b613d9 100644 --- a/src/Graphic3d/Graphic3d_TransformPers.hxx +++ b/src/Graphic3d/Graphic3d_TransformPers.hxx @@ -228,9 +228,10 @@ public: //! @param theViewportWidth [in] the width of viewport. //! @param theViewportHeight [in] the height of viewport. virtual Standard_Real persistentScale (const Handle(Graphic3d_Camera)& theCamera, - const Standard_Integer /*theViewportWidth*/, + const Standard_Integer theViewportWidth, const Standard_Integer theViewportHeight) const { + (void )theViewportWidth; // use total size when tiling is active const Standard_Integer aVPSizeY = theCamera->Tile().IsValid() ? theCamera->Tile().TotalSize.y() : theViewportHeight; diff --git a/src/Message/Message.hxx b/src/Message/Message.hxx index b4a461b095..1b04551d4b 100644 --- a/src/Message/Message.hxx +++ b/src/Message/Message.hxx @@ -42,7 +42,7 @@ public: //! It can be customized according to the application needs. //! //! The following syntax can be used to print messages: - //! @begincode + //! @code //! Message::DefaultMessenger()->Send ("My Warning", Message_Warning); //! Message::SendWarning ("My Warning"); // short-cut for Message_Warning //! Message::SendWarning() << "My Warning with " << theCounter << " arguments"; diff --git a/src/NCollection/NCollection_Mat3.hxx b/src/NCollection/NCollection_Mat3.hxx index 79d745cb5a..0bccf88ba2 100644 --- a/src/NCollection/NCollection_Mat3.hxx +++ b/src/NCollection/NCollection_Mat3.hxx @@ -430,8 +430,8 @@ public: } //! Compute inverted matrix. - //! @param theOutMx [out] the inverted matrix - //! @param theDet [out] determinant of matrix + //! @param[out] theInv the inverted matrix + //! @param[out] theDet determinant of matrix //! @return true if reversion success bool Inverted (NCollection_Mat3& theInv, Element_t& theDet) const { @@ -447,7 +447,7 @@ public: } //! Compute inverted matrix. - //! @param theOutMx [out] the inverted matrix + //! @param[out] theInv the inverted matrix //! @return true if reversion success bool Inverted (NCollection_Mat3& theInv) const { diff --git a/src/NCollection/NCollection_UBTree.hxx b/src/NCollection/NCollection_UBTree.hxx index 2b50ca81ba..a622117f62 100644 --- a/src/NCollection/NCollection_UBTree.hxx +++ b/src/NCollection/NCollection_UBTree.hxx @@ -150,7 +150,7 @@ public: * Forces *this node being gemmated such a way that it becomes * a branch holding the previous content of *this node at the * first child and theObj at the second child. - * @param TheNewBnd + * @param theNewBnd * new bounding box comprizing both child nodes. * @param theObj * added object. diff --git a/src/OpenGl/OpenGl_Context.hxx b/src/OpenGl/OpenGl_Context.hxx index 92e456c8e3..c7b4093305 100644 --- a/src/OpenGl/OpenGl_Context.hxx +++ b/src/OpenGl/OpenGl_Context.hxx @@ -647,7 +647,7 @@ public: //! Sets polygon hatch pattern. //! Zero-index value is a default alias for solid filling. - //! @param the type of hatch supported by base implementation of + //! @param theStyle type of hatch supported by base implementation of //! OpenGl_LineAttributes (Aspect_HatchStyle) or the type supported by custom //! implementation derived from OpenGl_LineAttributes class. //! @return old type of hatch. @@ -774,9 +774,9 @@ public: //! @name methods to alter or retrieve current state //! - TRUE when writing into offscreen FBO (always expected to be in sRGB or RGBF formats). //! - TRUE when writing into sRGB-ready window buffer (might require choosing proper pixel format on window creation). //! - FALSE if sRGB rendering is not supported or sRGB-not-ready window buffer is used for drawing. - //! @param theIsFbo [in] flag indicating writing into offscreen FBO (always expected sRGB-ready when sRGB FBO is supported) - //! or into window buffer (FALSE, sRGB-readiness might vary). - //! @param theIsSRgb [in] flag indicating off-screen FBO is sRGB-ready + //! @param[in] theIsFbo flag indicating writing into offscreen FBO (always expected sRGB-ready when sRGB FBO is supported) + //! or into window buffer (FALSE, sRGB-readiness might vary). + //! @param[in] theIsFboSRgb flag indicating off-screen FBO is sRGB-ready Standard_EXPORT void SetFrameBufferSRGB (bool theIsFbo, bool theIsFboSRgb = true); //! Return cached flag indicating writing into color buffer is enabled or disabled (glColorMask). diff --git a/src/OpenGl/OpenGl_GraphicDriver.hxx b/src/OpenGl/OpenGl_GraphicDriver.hxx index 3cdbe91fe4..64e0518e61 100644 --- a/src/OpenGl/OpenGl_GraphicDriver.hxx +++ b/src/OpenGl/OpenGl_GraphicDriver.hxx @@ -106,17 +106,17 @@ public: public: //! Adds a layer to all views. - //! @param theLayerId [in] id of new layer, should be > 0 (negative values are reserved for default layers). - //! @param theSettings [in] new layer settings - //! @param theLayerAfter [in] id of layer to append new layer before + //! @param[in] theNewLayerId id of new layer, should be > 0 (negative values are reserved for default layers). + //! @param[in] theSettings new layer settings + //! @param[in] theLayerAfter id of layer to append new layer before Standard_EXPORT virtual void InsertLayerBefore (const Graphic3d_ZLayerId theNewLayerId, const Graphic3d_ZLayerSettings& theSettings, const Graphic3d_ZLayerId theLayerAfter) Standard_OVERRIDE; //! Adds a layer to all views. - //! @param theLayerId [in] id of created layer - //! @param theSettings [in] new layer settings - //! @param theLayerBefore [in] id of layer to append new layer after + //! @param[in] theNewLayerId id of created layer + //! @param[in] theSettings new layer settings + //! @param[in] theLayerBefore id of layer to append new layer after Standard_EXPORT virtual void InsertLayerAfter (const Graphic3d_ZLayerId theNewLayerId, const Graphic3d_ZLayerSettings& theSettings, const Graphic3d_ZLayerId theLayerBefore) Standard_OVERRIDE; diff --git a/src/Standard/Standard_Dump.hxx b/src/Standard/Standard_Dump.hxx index eec5c9dc92..c8f2d6facc 100644 --- a/src/Standard/Standard_Dump.hxx +++ b/src/Standard/Standard_Dump.hxx @@ -383,33 +383,33 @@ public: Standard_EXPORT static void DumpRealValues (Standard_OStream& theOStream, int theCount, ...); //! Check whether the parameter name is equal to the name in the stream at position - //! @param theSStream [in] stream with values - //! @param theName [in] stream key value - //! @param theStreamPos [out] current position in the stream + //! @param[in] theStreamStr stream with values + //! @param[in] theName stream key value + //! @param[out] theStreamPos current position in the stream Standard_EXPORT static Standard_Boolean ProcessStreamName (const TCollection_AsciiString& theStreamStr, const TCollection_AsciiString& theName, Standard_Integer& theStreamPos); //! Check whether the field name is equal to the name in the stream at position - //! @param theSStream [in] stream with values - //! @param theName [in] stream key field value - //! @param theStreamPos [out] current position in the stream + //! @param[in] theStreamStr stream with values + //! @param[in] theName stream key field value + //! @param[out] theStreamPos current position in the stream Standard_EXPORT static Standard_Boolean ProcessFieldName (const TCollection_AsciiString& theStreamStr, const TCollection_AsciiString& theName, Standard_Integer& theStreamPos); //! Unite values in one value using template: value_1, value_2, ..., value_n - //! @param theSStream [in] stream with values - //! @param theStreamPos [out] current position in the stream - //! @param theCount [in] number of values + //! @param[in] theStreamStr stream with values + //! @param[out] theStreamPos current position in the stream + //! @param[in] theCount number of values Standard_EXPORT static Standard_Boolean InitRealValues (const TCollection_AsciiString& theStreamStr, Standard_Integer& theStreamPos, int theCount, ...); //! Returns real value - //! @param theSStream [in] stream with values - //! @param theStreamPos [out] current position in the stream - //! @param theValue [out] stream value + //! @param[in] theStreamStr stream with values + //! @param[out] theStreamPos current position in the stream + //! @param[out] theValue stream value Standard_EXPORT static Standard_Boolean InitValue (const TCollection_AsciiString& theStreamStr, Standard_Integer& theStreamPos, TCollection_AsciiString& theValue); diff --git a/src/StdPrs/StdPrs_ToolTriangulatedShape.hxx b/src/StdPrs/StdPrs_ToolTriangulatedShape.hxx index 44f65328a0..b7ee68550d 100644 --- a/src/StdPrs/StdPrs_ToolTriangulatedShape.hxx +++ b/src/StdPrs/StdPrs_ToolTriangulatedShape.hxx @@ -59,9 +59,9 @@ public: Poly_Connect& thePolyConnect); //! Evaluate normals for a triangle of a face. - //! @param theFace [in] the face. - //! @param thePolyConnect [in] the definition of a face triangulation. - //! @param theNormal [out] the array of normals for each triangle. + //! @param[in] theFace the face. + //! @param[in] thePolyConnect the definition of a face triangulation. + //! @param[out] theNormals the array of normals for each triangle. Standard_EXPORT static void Normal (const TopoDS_Face& theFace, Poly_Connect& thePolyConnect, TColgp_Array1OfDir& theNormals); diff --git a/src/TCollection/TCollection_ExtendedString.hxx b/src/TCollection/TCollection_ExtendedString.hxx index 899eecd7f9..be5c3f97b3 100644 --- a/src/TCollection/TCollection_ExtendedString.hxx +++ b/src/TCollection/TCollection_ExtendedString.hxx @@ -333,7 +333,7 @@ friend Standard_EXPORT Standard_OStream& operator << (Standard_OStream& astream, //! Returns a hashed value for the extended string within the range 1 .. theUpper. //! Note: if string is ASCII, the computed value is the same as the value computed with the HashCode function on a //! TCollection_AsciiString string composed with equivalent ASCII characters. - //! @param theExtendedString the extended string which hash code is to be computed + //! @param theString the extended string which hash code is to be computed //! @param theUpperBound the upper bound of the range a computing hash code must be within //! @return a computed hash code, in the range [1, theUpperBound] static Standard_Integer HashCode (const TCollection_ExtendedString& theString, diff --git a/src/TDataStd/TDataStd_NamedData.hxx b/src/TDataStd/TDataStd_NamedData.hxx index 1072256a57..d3b58d5c95 100644 --- a/src/TDataStd/TDataStd_NamedData.hxx +++ b/src/TDataStd/TDataStd_NamedData.hxx @@ -177,8 +177,8 @@ public: Standard_EXPORT const Handle(TColStd_HArray1OfReal)& GetArrayOfReals (const TCollection_ExtendedString& theName); //! Defines a named array of real values. - //! @param theName [in] key - //! @param theArrayOfIntegers [in] new value, overrides existing (passed array will be copied by value!) + //! @param[in] theName key + //! @param[in] theArrayOfReals new value, overrides existing (passed array will be copied by value!) void SetArrayOfReals (const TCollection_ExtendedString& theName, const Handle(TColStd_HArray1OfReal)& theArrayOfReals) { diff --git a/src/gp/gp_XY.hxx b/src/gp/gp_XY.hxx index 2310780e02..a86853310c 100644 --- a/src/gp/gp_XY.hxx +++ b/src/gp/gp_XY.hxx @@ -115,6 +115,7 @@ public: //! @code //! .X() = .X() + theOther.X() //! .Y() = .Y() + theOther.Y() + //! @endcode inline void Add (const gp_XY& theOther) { x += theOther.x; @@ -183,6 +184,7 @@ public: //! @code //! .X() = .X() * theScalar; //! .Y() = .Y() * theScalar; + //! @endcode void Multiply (const Standard_Real theScalar) { x *= theScalar; @@ -194,6 +196,7 @@ public: //! @code //! .X() = .X() * theOther.X(); //! .Y() = .Y() * theOther.Y(); + //! @endcode void Multiply (const gp_XY& theOther) { x *= theOther.x; @@ -210,16 +213,17 @@ public: //! @code //! New.X() = .X() * theScalar; //! New.Y() = .Y() * theScalar; + //! @endcode Standard_NODISCARD gp_XY Multiplied (const Standard_Real theScalar) const { return gp_XY (x * theScalar, y * theScalar); } Standard_NODISCARD gp_XY operator* (const Standard_Real theScalar) const { return Multiplied (theScalar); } //! @code //! new.X() = .X() * theOther.X(); //! new.Y() = .Y() * theOther.Y(); + //! @endcode Standard_NODISCARD gp_XY Multiplied (const gp_XY& theOther) const { return gp_XY (x * theOther.X(), y * theOther.Y()); } //! New = theMatrix * - //! @endcode Standard_NODISCARD gp_XY Multiplied (const gp_Mat2d& theMatrix) const { return gp_XY (theMatrix.Value (1, 1) * x + theMatrix.Value (1, 2) * y, @@ -258,6 +262,7 @@ public: //! @code //! New.X() = -.X() //! New.Y() = -.Y() + //! @endcode Standard_NODISCARD gp_XY Reversed() const { gp_XY aCoord2D = *this; @@ -271,6 +276,7 @@ public: //! assigns the result to this number pair: //! @code //! theA1 * theXY1 + theA2 * theXY2 + //! @endcode inline void SetLinearForm (const Standard_Real theA1, const gp_XY& theXY1, const Standard_Real theA2, const gp_XY& theXY2) { @@ -282,6 +288,7 @@ public: //! assigns the result to this number pair: //! @code //! theA1 * theXY1 + theA2 * theXY2 + theXY3 + //! @endcode inline void SetLinearForm (const Standard_Real theA1, const gp_XY& theXY1, const Standard_Real theA2, const gp_XY& theXY2, const gp_XY& theXY3) @@ -294,6 +301,7 @@ public: //! assigns the result to this number pair: //! @code //! theA1 * theXY1 + theXY2 + //! @endcode inline void SetLinearForm (const Standard_Real theA1, const gp_XY& theXY1, const gp_XY& theXY2) { @@ -305,6 +313,7 @@ public: //! assigns the result to this number pair: //! @code //! theXY1 + theXY2 + //! @endcode inline void SetLinearForm (const gp_XY& theXY1, const gp_XY& theXY2) { @@ -315,6 +324,7 @@ public: //! @code //! .X() = .X() - theOther.X() //! .Y() = .Y() - theOther.Y() + //! @endcode inline void Subtract (const gp_XY& theOther) { x -= theOther.x; diff --git a/src/gp/gp_XYZ.hxx b/src/gp/gp_XYZ.hxx index fa944ab788..ed247ebc76 100644 --- a/src/gp/gp_XYZ.hxx +++ b/src/gp/gp_XYZ.hxx @@ -139,6 +139,7 @@ public: //! .X() = .X() + theOther.X() //! .Y() = .Y() + theOther.Y() //! .Z() = .Z() + theOther.Z() + //! @endcode void Add (const gp_XYZ& theOther) { x += theOther.x; @@ -164,6 +165,7 @@ public: //! .X() = .Y() * theOther.Z() - .Z() * theOther.Y() //! .Y() = .Z() * theOther.X() - .X() * theOther.Z() //! .Z() = .X() * theOther.Y() - .Y() * theOther.X() + //! @endcode void Cross (const gp_XYZ& theOther); void operator^= (const gp_XYZ& theOther) { Cross (theOther); } @@ -230,6 +232,7 @@ public: //! .X() = .X() * theScalar; //! .Y() = .Y() * theScalar; //! .Z() = .Z() * theScalar; + //! @endcode void Multiply (const Standard_Real theScalar) { x *= theScalar; @@ -243,6 +246,7 @@ public: //! .X() = .X() * theOther.X(); //! .Y() = .Y() * theOther.Y(); //! .Z() = .Z() * theOther.Z(); + //! @endcode void Multiply (const gp_XYZ& theOther) { x *= theOther.x; @@ -261,6 +265,7 @@ public: //! New.X() = .X() * theScalar; //! New.Y() = .Y() * theScalar; //! New.Z() = .Z() * theScalar; + //! @endcode Standard_NODISCARD gp_XYZ Multiplied (const Standard_Real theScalar) const { return gp_XYZ (x * theScalar, y * theScalar, z * theScalar); } Standard_NODISCARD gp_XYZ operator* (const Standard_Real theScalar) const { return Multiplied (theScalar); } @@ -269,10 +274,10 @@ public: //! new.X() = .X() * theOther.X(); //! new.Y() = .Y() * theOther.Y(); //! new.Z() = .Z() * theOther.Z(); + //! @endcode Standard_NODISCARD gp_XYZ Multiplied (const gp_XYZ& theOther) const { return gp_XYZ (x * theOther.x, y * theOther.y, z * theOther.z); } //! New = theMatrix * - //! @endcode Standard_NODISCARD gp_XYZ Multiplied (const gp_Mat& theMatrix) const { return gp_XYZ (theMatrix.Value (1, 1) * x + theMatrix.Value (1, 2) * y + theMatrix.Value (1, 3) * z, @@ -307,6 +312,7 @@ public: //! .X() = -.X() //! .Y() = -.Y() //! .Z() = -.Z() + //! @endcode void Reverse() { x = -x; @@ -318,12 +324,14 @@ public: //! New.X() = -.X() //! New.Y() = -.Y() //! New.Z() = -.Z() + //! @endcode Standard_NODISCARD gp_XYZ Reversed() const { return gp_XYZ (-x, -y, -z); } //! @code //! .X() = .X() - theOther.X() //! .Y() = .Y() - theOther.Y() //! .Z() = .Z() - theOther.Z() + //! @endcode void Subtract (const gp_XYZ& theOther) { x -= theOther.x; @@ -337,6 +345,7 @@ public: //! new.X() = .X() - theOther.X() //! new.Y() = .Y() - theOther.Y() //! new.Z() = .Z() - theOther.Z() + //! @endcode Standard_NODISCARD gp_XYZ Subtracted (const gp_XYZ& theOther) const { return gp_XYZ (x - theOther.x, y - theOther.y, z - theOther.z); } Standard_NODISCARD gp_XYZ operator- (const gp_XYZ& theOther) const { return Subtracted (theOther); } @@ -344,6 +353,7 @@ public: //! is set to the following linear form : //! @code //! theA1 * theXYZ1 + theA2 * theXYZ2 + theA3 * theXYZ3 + theXYZ4 + //! @endcode void SetLinearForm (const Standard_Real theA1, const gp_XYZ& theXYZ1, const Standard_Real theA2, const gp_XYZ& theXYZ2, const Standard_Real theA3, const gp_XYZ& theXYZ3, @@ -357,6 +367,7 @@ public: //! is set to the following linear form : //! @code //! theA1 * theXYZ1 + theA2 * theXYZ2 + theA3 * theXYZ3 + //! @endcode void SetLinearForm (const Standard_Real theA1, const gp_XYZ& theXYZ1, const Standard_Real theA2, const gp_XYZ& theXYZ2, const Standard_Real theA3, const gp_XYZ& theXYZ3) @@ -369,6 +380,7 @@ public: //! is set to the following linear form : //! @code //! theA1 * theXYZ1 + theA2 * theXYZ2 + theXYZ3 + //! @endcode void SetLinearForm (const Standard_Real theA1, const gp_XYZ& theXYZ1, const Standard_Real theA2, const gp_XYZ& theXYZ2, const gp_XYZ& theXYZ3) @@ -381,6 +393,7 @@ public: //! is set to the following linear form : //! @code //! theA1 * theXYZ1 + theA2 * theXYZ2 + //! @endcode void SetLinearForm (const Standard_Real theA1, const gp_XYZ& theXYZ1, const Standard_Real theA2, const gp_XYZ& theXYZ2) { @@ -392,6 +405,7 @@ public: //! is set to the following linear form : //! @code //! theA1 * theXYZ1 + theXYZ2 + //! @endcode void SetLinearForm (const Standard_Real theA1, const gp_XYZ& theXYZ1, const gp_XYZ& theXYZ2) { @@ -403,6 +417,7 @@ public: //! is set to the following linear form : //! @code //! theXYZ1 + theXYZ2 + //! @endcode void SetLinearForm (const gp_XYZ& theXYZ1, const gp_XYZ& theXYZ2) { x = theXYZ1.x + theXYZ2.x; From 4d476dd2ed29c49e1e714554f51b591d60565a17 Mon Sep 17 00:00:00 2001 From: kgv Date: Wed, 15 Dec 2021 16:47:25 +0300 Subject: [PATCH 175/639] 0032732: Visualization, TKOpenGl - do not include system headers within OpenGl_GlFunctions.hxx --- dox/upgrade/upgrade.md | 10 ++++++- src/D3DHost/D3DHost_FrameBuffer.cxx | 43 +---------------------------- src/OpenGl/OpenGl_Caps.cxx | 6 ---- src/OpenGl/OpenGl_Context.cxx | 2 -- src/OpenGl/OpenGl_Context_1.mm | 4 +-- src/OpenGl/OpenGl_GlFunctions.hxx | 2 -- src/OpenGl/OpenGl_GlTypes.hxx | 32 +++++++++++++++++++++ src/OpenGl/OpenGl_GraphicDriver.cxx | 3 ++ src/OpenGl/OpenGl_SceneGeometry.cxx | 6 ---- src/OpenGl/OpenGl_Window.cxx | 4 +++ src/OpenGl/OpenGl_Window_1.mm | 27 +++++++++--------- 11 files changed, 65 insertions(+), 74 deletions(-) diff --git a/dox/upgrade/upgrade.md b/dox/upgrade/upgrade.md index 40616dd491..5caa102205 100644 --- a/dox/upgrade/upgrade.md +++ b/dox/upgrade/upgrade.md @@ -7,6 +7,8 @@ Upgrade from older OCCT versions {#occt__upgrade} This document provides technical details on changes made in particular versions of OCCT. It can help to upgrade user applications based on previous versions of OCCT to newer ones. +@ref upgrade_occt770 "SEEK TO THE LAST CHAPTER (UPGRADE TO 7.7.0)" + @subsection upgrade_intro_precautions Precautions Back-up your code before the upgrade. @@ -24,7 +26,6 @@ The automatic upgrade tool is provided as is, without warranty of any kind, and It is your responsibility to ensure that the changes you made in your code are correct. When you upgrade the code by an automatic script, make sure to carefully review the introduced changes at each step before committing them. - @section upgrade_65 Upgrade to OCCT 6.5.0 Porting of user applications from an earlier OCCT version to version 6.5 requires taking into account the following major changes: @@ -2321,3 +2322,10 @@ aValidateEdge.Process(); `Prs3d_Drawer` getters no more implicitly create "default" aspects. If specific property has not been set before to this drawer instance nor to linked drawer instance, then NULL property will be returned. Make sure to set property beforehand or to call `SetOwn*` / `SetupOwn*` methods to derive from defaults. + +@subsection upgrade_occt770_opengl OpenGL functions + +Applications extending OCCT 3D Viewer and calling OpenGL functions directly (like @c @::glEnable(), e.g. using global namespace) might be affected by changes in `OpenGl_GlFunctions.hxx`. +This header, as well as `OpenGl_GlCore20.hxx` and similar, no more include system OpenGL / OpenGL ES headers to define function table. +Application code calling OpenGL functions directly should be changed to either use `OpenGl_Context::core11fwd` (as designed) +or to include system OpenGL headers in advance (with help of `OpenGl_GlNative.hxx`). diff --git a/src/D3DHost/D3DHost_FrameBuffer.cxx b/src/D3DHost/D3DHost_FrameBuffer.cxx index a077d9718c..209f57b04d 100644 --- a/src/D3DHost/D3DHost_FrameBuffer.cxx +++ b/src/D3DHost/D3DHost_FrameBuffer.cxx @@ -56,7 +56,6 @@ D3DHost_FrameBuffer::~D3DHost_FrameBuffer() // ======================================================================= void D3DHost_FrameBuffer::Release (OpenGl_Context* theCtx) { -#if !defined(GL_ES_VERSION_2_0) if (myGlD3dDevice != NULL) { const OpenGl_GlFunctions* aFuncs = (theCtx != NULL && theCtx->IsValid()) @@ -77,7 +76,6 @@ void D3DHost_FrameBuffer::Release (OpenGl_Context* theCtx) } myGlD3dDevice = NULL; } -#endif if (myD3dSurf != NULL) { @@ -146,7 +144,7 @@ Standard_Boolean D3DHost_FrameBuffer::InitD3dInterop (const Handle(OpenGl_Contex const Standard_Integer theDepthFormat) { Release (theCtx.operator->()); -#if !defined(GL_ES_VERSION_2_0) + myDepthFormat = theDepthFormat; myVPSizeX = theSizeX; myVPSizeY = theSizeY; @@ -207,14 +205,6 @@ Standard_Boolean D3DHost_FrameBuffer::InitD3dInterop (const Handle(OpenGl_Contex myD3dFallback = Standard_False; return Standard_True; -#else - (void )theD3DDevice; - (void )theIsD3dEx; - (void )theSizeX; - (void )theSizeY; - (void )theDepthFormat; - return Standard_False; -#endif } // ======================================================================= @@ -223,10 +213,6 @@ Standard_Boolean D3DHost_FrameBuffer::InitD3dInterop (const Handle(OpenGl_Contex // ======================================================================= Standard_Boolean D3DHost_FrameBuffer::registerD3dBuffer (const Handle(OpenGl_Context)& theCtx) { -#if defined(GL_ES_VERSION_2_0) - (void )theCtx; - return Standard_False; -#else const OpenGl_GlFunctions* aFuncs = theCtx->Functions(); if (myGlD3dSurf != NULL) { @@ -264,7 +250,6 @@ Standard_Boolean D3DHost_FrameBuffer::registerD3dBuffer (const Handle(OpenGl_Con } return Standard_True; -#endif } // ======================================================================= @@ -292,35 +277,15 @@ void D3DHost_FrameBuffer::BindBuffer (const Handle(OpenGl_Context)& theCtx) const OpenGl_TextureFormat aDepthFormat = OpenGl_TextureFormat::FindSizedFormat (theCtx, myDepthFormat); if (myDepthStencilTexture->IsValid()) { - #ifdef GL_DEPTH_STENCIL_ATTACHMENT theCtx->arbFBO->glFramebufferTexture2D (GL_FRAMEBUFFER, aDepthFormat.PixelFormat() == GL_DEPTH_STENCIL ? GL_DEPTH_STENCIL_ATTACHMENT : GL_DEPTH_ATTACHMENT, myDepthStencilTexture->GetTarget(), myDepthStencilTexture->TextureId(), 0); - #else - theCtx->arbFBO->glFramebufferTexture2D (GL_FRAMEBUFFER, GL_DEPTH_ATTACHMENT, - myDepthStencilTexture->GetTarget(), myDepthStencilTexture->TextureId(), 0); - if (aDepthFormat.PixelFormat() == GL_DEPTH_STENCIL) - { - theCtx->arbFBO->glFramebufferTexture2D (GL_FRAMEBUFFER, GL_STENCIL_ATTACHMENT, - myDepthStencilTexture->GetTarget(), myDepthStencilTexture->TextureId(), 0); - } - #endif } if (theCtx->arbFBO->glCheckFramebufferStatus (GL_FRAMEBUFFER) != GL_FRAMEBUFFER_COMPLETE) { if (myDepthStencilTexture->IsValid()) { - #ifdef GL_DEPTH_STENCIL_ATTACHMENT theCtx->arbFBO->glFramebufferTexture2D (GL_FRAMEBUFFER, aDepthFormat.PixelFormat() == GL_DEPTH_STENCIL ? GL_DEPTH_STENCIL_ATTACHMENT : GL_DEPTH_ATTACHMENT, myDepthStencilTexture->GetTarget(), 0, 0); - #else - theCtx->arbFBO->glFramebufferTexture2D (GL_FRAMEBUFFER, GL_DEPTH_ATTACHMENT, - myDepthStencilTexture->GetTarget(), 0, 0); - if (aDepthFormat.PixelFormat() == GL_DEPTH_STENCIL) - { - theCtx->arbFBO->glFramebufferTexture2D (GL_FRAMEBUFFER, GL_STENCIL_ATTACHMENT, - myDepthStencilTexture->GetTarget(), 0, 0); - } - #endif } if (theCtx->arbFBO->glCheckFramebufferStatus (GL_FRAMEBUFFER) != GL_FRAMEBUFFER_COMPLETE) { @@ -353,16 +318,12 @@ void D3DHost_FrameBuffer::LockSurface (const Handle(OpenGl_Context)& theCtx) return; } -#if !defined(GL_ES_VERSION_2_0) const OpenGl_GlFunctions* aFuncs = theCtx->Functions(); if (!aFuncs->wglDXLockObjectsNV (myGlD3dDevice, 1, &myGlD3dSurf)) { theCtx->PushMessage (GL_DEBUG_SOURCE_APPLICATION, GL_DEBUG_TYPE_ERROR, 0, GL_DEBUG_SEVERITY_HIGH, "D3DHost_FrameBuffer::LockSurface(), lock failed!"); } -#else - (void )theCtx; -#endif } // ======================================================================= @@ -416,8 +377,6 @@ void D3DHost_FrameBuffer::UnlockSurface (const Handle(OpenGl_Context)& theCtx) return; } -#if !defined(GL_ES_VERSION_2_0) const OpenGl_GlFunctions* aFuncs = theCtx->Functions(); aFuncs->wglDXUnlockObjectsNV (myGlD3dDevice, 1, &myGlD3dSurf); -#endif } diff --git a/src/OpenGl/OpenGl_Caps.cxx b/src/OpenGl/OpenGl_Caps.cxx index 28169e84b0..cc72994b89 100755 --- a/src/OpenGl/OpenGl_Caps.cxx +++ b/src/OpenGl/OpenGl_Caps.cxx @@ -15,8 +15,6 @@ #include -#include - IMPLEMENT_STANDARD_RTTIEXT(OpenGl_Caps,Standard_Transient) // ======================================================================= @@ -40,11 +38,7 @@ OpenGl_Caps::OpenGl_Caps() contextDebug (Standard_False), contextSyncDebug (Standard_False), contextNoAccel (Standard_False), -#if !defined(GL_ES_VERSION_2_0) contextCompatible (Standard_True), -#else - contextCompatible (Standard_False), -#endif contextNoExtensions (Standard_False), contextMajorVersionUpper (-1), contextMinorVersionUpper (-1), diff --git a/src/OpenGl/OpenGl_Context.cxx b/src/OpenGl/OpenGl_Context.cxx index fbb1caf34d..dc38571ef1 100644 --- a/src/OpenGl/OpenGl_Context.cxx +++ b/src/OpenGl/OpenGl_Context.cxx @@ -2533,9 +2533,7 @@ void OpenGl_Context::SetPointSpriteOrigin() if (myPointSpriteOrig != aNewState) { myPointSpriteOrig = aNewState; - #if !defined(GL_ES_VERSION_2_0) core15fwd->glPointParameteri (GL_POINT_SPRITE_COORD_ORIGIN, aNewState); - #endif } } diff --git a/src/OpenGl/OpenGl_Context_1.mm b/src/OpenGl/OpenGl_Context_1.mm index cd82bbf955..f55953d700 100644 --- a/src/OpenGl/OpenGl_Context_1.mm +++ b/src/OpenGl/OpenGl_Context_1.mm @@ -90,11 +90,11 @@ return; } - ::glBindRenderbuffer (GL_RENDERBUFFER, myDefaultFbo->ColorRenderBuffer()); + myFuncs->glBindRenderbuffer (GL_RENDERBUFFER, myDefaultFbo->ColorRenderBuffer()); [myGContext presentRenderbuffer: GL_RENDERBUFFER]; //::glBindRenderbuffer (GL_RENDERBUFFER, 0); #else - glFinish(); + core11fwd->glFinish(); [myGContext flushBuffer]; #endif } diff --git a/src/OpenGl/OpenGl_GlFunctions.hxx b/src/OpenGl/OpenGl_GlFunctions.hxx index 8b4e4a6bad..4308080845 100644 --- a/src/OpenGl/OpenGl_GlFunctions.hxx +++ b/src/OpenGl/OpenGl_GlFunctions.hxx @@ -16,8 +16,6 @@ #ifndef OpenGl_GlFunctions_HeaderFile #define OpenGl_GlFunctions_HeaderFile -#include - #include #include diff --git a/src/OpenGl/OpenGl_GlTypes.hxx b/src/OpenGl/OpenGl_GlTypes.hxx index 1de86a6131..165a367848 100644 --- a/src/OpenGl/OpenGl_GlTypes.hxx +++ b/src/OpenGl/OpenGl_GlTypes.hxx @@ -14,6 +14,38 @@ #ifndef OpenGl_GlTypes_HeaderFile #define OpenGl_GlTypes_HeaderFile +// required for correct APIENTRY definition +#if defined(_WIN32) && !defined(APIENTRY) && !defined(__CYGWIN__) && !defined(__SCITECH_SNAP__) + #define WIN32_LEAN_AND_MEAN + #include +#endif + +#if defined(__APPLE__) + #import +#endif + +#ifndef APIENTRY + #define APIENTRY +#endif +#ifndef APIENTRYP + #define APIENTRYP APIENTRY * +#endif +#ifndef GLAPI + #define GLAPI extern +#endif + +#ifndef GL_APICALL + #define GL_APICALL GLAPI +#endif + +// exclude modern definitions and system-provided glext.h, should be defined before gl.h inclusion +#ifndef GL_GLEXT_LEGACY + #define GL_GLEXT_LEGACY +#endif +#ifndef GLX_GLXEXT_LEGACY + #define GLX_GLXEXT_LEGACY +#endif + #include typedef khronos_int8_t GLbyte; diff --git a/src/OpenGl/OpenGl_GraphicDriver.cxx b/src/OpenGl/OpenGl_GraphicDriver.cxx index 3535cda0ed..b39fd6c199 100644 --- a/src/OpenGl/OpenGl_GraphicDriver.cxx +++ b/src/OpenGl/OpenGl_GraphicDriver.cxx @@ -173,6 +173,9 @@ OpenGl_GraphicDriver::OpenGl_GraphicDriver (const Handle(Aspect_DisplayConnectio myEglDisplay = (Aspect_Display )EGL_NO_DISPLAY; myEglContext = (Aspect_RenderingContext )EGL_NO_CONTEXT; #endif +#if defined(OpenGl_USE_GLES2) + myCaps->contextCompatible = false; +#endif #if defined(HAVE_XLIB) if (myDisplayConnection.IsNull()) diff --git a/src/OpenGl/OpenGl_SceneGeometry.cxx b/src/OpenGl/OpenGl_SceneGeometry.cxx index 070f6ae8ae..a09e4c0939 100644 --- a/src/OpenGl/OpenGl_SceneGeometry.cxx +++ b/src/OpenGl/OpenGl_SceneGeometry.cxx @@ -388,7 +388,6 @@ Standard_Boolean OpenGl_RaytraceGeometry::AcquireTextures (const Handle(OpenGl_C return Standard_True; } -#if !defined(GL_ES_VERSION_2_0) Standard_Integer aTexIter = 0; for (NCollection_Vector::Iterator aTexSrcIter (myTextures); aTexSrcIter.More(); aTexSrcIter.Next(), ++aTexIter) { @@ -425,7 +424,6 @@ Standard_Boolean OpenGl_RaytraceGeometry::AcquireTextures (const Handle(OpenGl_C return Standard_False; } } -#endif return Standard_True; } @@ -441,7 +439,6 @@ Standard_Boolean OpenGl_RaytraceGeometry::ReleaseTextures (const Handle(OpenGl_C return Standard_True; } -#if !defined(GL_ES_VERSION_2_0) for (size_t aTexIter = 0; aTexIter < myTextureHandles.size(); ++aTexIter) { theContext->arbTexBindless->glMakeTextureHandleNonResidentARB (myTextureHandles[aTexIter]); @@ -453,7 +450,6 @@ Standard_Boolean OpenGl_RaytraceGeometry::ReleaseTextures (const Handle(OpenGl_C return Standard_False; } } -#endif return Standard_True; } @@ -499,7 +495,6 @@ Standard_Boolean OpenGl_RaytraceGeometry::UpdateTextureHandles (const Handle(Ope myTextureHandles.clear(); myTextureHandles.resize (myTextures.Size()); -#if !defined(GL_ES_VERSION_2_0) Standard_Integer aTexIter = 0; for (NCollection_Vector::Iterator aTexSrcIter (myTextures); aTexSrcIter.More(); aTexSrcIter.Next(), ++aTexIter) { @@ -524,7 +519,6 @@ Standard_Boolean OpenGl_RaytraceGeometry::UpdateTextureHandles (const Handle(Ope return Standard_False; } } -#endif return Standard_True; } diff --git a/src/OpenGl/OpenGl_Window.cxx b/src/OpenGl/OpenGl_Window.cxx index 711fa1a243..788aa3553e 100644 --- a/src/OpenGl/OpenGl_Window.cxx +++ b/src/OpenGl/OpenGl_Window.cxx @@ -13,6 +13,10 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. +#if defined(_WIN32) + #include +#endif + #include #include diff --git a/src/OpenGl/OpenGl_Window_1.mm b/src/OpenGl/OpenGl_Window_1.mm index 49108d4f2b..af552243a5 100644 --- a/src/OpenGl/OpenGl_Window_1.mm +++ b/src/OpenGl/OpenGl_Window_1.mm @@ -326,12 +326,12 @@ const Handle(OpenGl_Context)& theShareCtx) EAGLContext* aGLCtx = myGlContext->myGContext; CAEAGLLayer* anEaglLayer = (CAEAGLLayer* )myUIView.layer; GLuint aWinRBColor = 0; - ::glGenRenderbuffers (1, &aWinRBColor); - ::glBindRenderbuffer (GL_RENDERBUFFER, aWinRBColor); + myGlContext->Functions()->glGenRenderbuffers (1, &aWinRBColor); + myGlContext->Functions()->glBindRenderbuffer (GL_RENDERBUFFER, aWinRBColor); [aGLCtx renderbufferStorage: GL_RENDERBUFFER fromDrawable: anEaglLayer]; - ::glGetRenderbufferParameteriv (GL_RENDERBUFFER, GL_RENDERBUFFER_WIDTH, &myWidth); - ::glGetRenderbufferParameteriv (GL_RENDERBUFFER, GL_RENDERBUFFER_HEIGHT, &myHeight); - ::glBindRenderbuffer (GL_RENDERBUFFER, 0); + myGlContext->Functions()->glGetRenderbufferParameteriv (GL_RENDERBUFFER, GL_RENDERBUFFER_WIDTH, &myWidth); + myGlContext->Functions()->glGetRenderbufferParameteriv (GL_RENDERBUFFER, GL_RENDERBUFFER_HEIGHT, &myHeight); + myGlContext->Functions()->glBindRenderbuffer (GL_RENDERBUFFER, 0); if (!aDefFbo->InitWithRB (myGlContext, Graphic3d_Vec2i (myWidth, myHeight), GL_RGBA8, GL_DEPTH24_STENCIL8, aWinRBColor)) { @@ -380,16 +380,17 @@ const Handle(OpenGl_Context)& theShareCtx) myHeightPt = Standard_Integer(aBounds.size.height); #endif - ::glDisable (GL_DITHER); - ::glDisable (GL_SCISSOR_TEST); - ::glViewport (0, 0, myWidth, myHeight); -#if !defined(GL_ES_VERSION_2_0) - ::glDrawBuffer (GL_BACK); - if (myGlContext->core11ffp != NULL) + myGlContext->core11fwd->glDisable (GL_DITHER); + myGlContext->core11fwd->glDisable (GL_SCISSOR_TEST); + myGlContext->core11fwd->glViewport (0, 0, myWidth, myHeight); + if (myGlContext->GraphicsLibrary() != Aspect_GraphicsLibrary_OpenGLES) { - ::glMatrixMode (GL_MODELVIEW); + myGlContext->core11fwd->glDrawBuffer (GL_BACK); + if (myGlContext->core11ffp != NULL) + { + myGlContext->core11ffp->glMatrixMode (GL_MODELVIEW); + } } -#endif } // ======================================================================= From 90eac74988bd414f9c9ed4e73591f6a565be3804 Mon Sep 17 00:00:00 2001 From: kgv Date: Fri, 17 Dec 2021 05:50:46 +0300 Subject: [PATCH 176/639] 0032738: Configuration, scripts - handle ABI list within iOS building script adm/scripts/ios_build.sh Variables "toSimulator" and "anAbi" within "ios_custom.sh" have been replaced by "anAbiList" which can be defined like "iPhoneOS|arm64 iPhoneSimulator|arm64". Added "toPackFat" option packing multiple architectures into FAT archives. --- adm/scripts/ios_build.sh | 252 ++++++++++++++++++----------- adm/scripts/ios_custom.sh.template | 8 +- 2 files changed, 163 insertions(+), 97 deletions(-) diff --git a/adm/scripts/ios_build.sh b/adm/scripts/ios_build.sh index 959e6d7b49..ff222519a2 100755 --- a/adm/scripts/ios_build.sh +++ b/adm/scripts/ios_build.sh @@ -20,13 +20,13 @@ export aRapidJson= export aDraco= # build stages to perform -export toSimulator=0 export isStatic=1 export toCMake=1 export toClean=1 export toMake=1 export toInstall=1 export toPack=0 +export toPackFat=0 export toDebug=0 export BUILD_ModelingData=ON @@ -41,13 +41,25 @@ export USE_RAPIDJSON=OFF export USE_DRACO=OFF export IPHONEOS_DEPLOYMENT_TARGET=8.0 -export anAbi=arm64 -#export anAbi=x86_64 +#export anAbiList="iPhoneOS|arm64 iPhoneSimulator|arm64 iPhoneSimulator|x86_64" +export anAbiList="iPhoneOS|arm64" if [[ -f "${aScriptDir}/ios_custom.sh" ]]; then source "${aScriptDir}/ios_custom.sh" fi +anOcctVerSuffix=`grep -e "#define OCC_VERSION_DEVELOPMENT" "$aCasSrc/src/Standard/Standard_Version.hxx" | awk '{print $3}' | xargs` +anOcctVersion=`grep -e "#define OCC_VERSION_COMPLETE" "$aCasSrc/src/Standard/Standard_Version.hxx" | awk '{print $3}' | xargs` +aGitBranch=`git symbolic-ref --short HEAD` + +YEAR=$(date +"%Y") +MONTH=$(date +"%m") +DAY=$(date +"%d") +aRevision=-${YEAR}-${MONTH}-${DAY} +#aRevision=-${aGitBranch} + +set -o pipefail + aBuildType="Release" aBuildTypePrefix= if [[ $toDebug == 1 ]]; then @@ -58,59 +70,52 @@ aLibType="Shared" if [[ $isStatic == 1 ]]; then aLibType="Static" fi -aPlatformAndCompiler=ios-${anAbi}${aBuildTypePrefix}-clang -aPlatformSdk="iphoneos" -aSysRoot="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk" -if [[ $toSimulator == 1 ]]; then - #anAbi=x86_64 - aPlatformAndCompiler=ios-simulator64-${anAbi}${aBuildTypePrefix}-clang - aPlatformSdk="iphonesimulator" - aSysRoot="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk" -fi -aWorkDir="${aCasSrc}/${aBuildRoot}/${aPlatformAndCompiler}-make" -aDestDir="${aCasSrc}/${aBuildRoot}/${aPlatformAndCompiler}" -aLogFile="${aCasSrc}/${aBuildRoot}/build-${aPlatformAndCompiler}.log" +function buildArch { + anAbi=$1 + aPlatformSdk=$2 -if [[ $toCMake == 1 ]] && [[ $toClean == 1 ]]; then - rm -r -f "$aWorkDir" - rm -r -f "$aDestDir" -fi -mkdir -p "$aWorkDir" -mkdir -p "$aDestDir" -rm -f "$aLogFile" + aPlatformAndCompiler=${aPlatformSdk}-${anAbi}${aBuildTypePrefix}-clang -anOcctVerSuffix=`grep -e "#define OCC_VERSION_DEVELOPMENT" "$aCasSrc/src/Standard/Standard_Version.hxx" | awk '{print $3}' | xargs` -anOcctVersion=`grep -e "#define OCC_VERSION_COMPLETE" "$aCasSrc/src/Standard/Standard_Version.hxx" | awk '{print $3}' | xargs` -aGitBranch=`git symbolic-ref --short HEAD` + aWorkDir="${aCasSrc}/${aBuildRoot}/${aPlatformAndCompiler}-make" + aDestDir="${aCasSrc}/${aBuildRoot}/${aPlatformAndCompiler}" + aLogFile="${aCasSrc}/${aBuildRoot}/build-${aPlatformAndCompiler}.log" -# include some information about OCCT into archive -echo \> "${aWorkDir}/VERSION.html" -git status >> "${aWorkDir}/VERSION.html" -git log -n 100 >> "${aWorkDir}/VERSION.html" -echo \>> "${aWorkDir}/VERSION.html" + if [[ $toCMake == 1 ]] && [[ $toClean == 1 ]]; then + rm -r -f "$aWorkDir" + rm -r -f "$aDestDir" + fi + mkdir -p "$aWorkDir" + mkdir -p "$aDestDir" + rm -f "$aLogFile" -pushd "$aWorkDir" + # include some information about OCCT into archive + echo \> "${aWorkDir}/VERSION.html" + git status >> "${aWorkDir}/VERSION.html" + git log -n 100 >> "${aWorkDir}/VERSION.html" + echo \>> "${aWorkDir}/VERSION.html" -aTimeZERO=$SECONDS -set -o pipefail + pushd "$aWorkDir" -function logDuration { - if [[ $1 == 1 ]]; then - aDur=$(($4 - $3)) - echo $2 time: $aDur sec>> "$aLogFile" - fi -} + aTimeZERO=$SECONDS + + function logDuration { + if [[ $1 == 1 ]]; then + aDur=$(($4 - $3)) + echo $2 time: $aDur sec>> "$aLogFile" + fi + } -# (re)generate Make files -if [[ $toCMake == 1 ]]; then - echo Configuring OCCT for iOS... - cmake -G "Unix Makefiles" \ + aSysRoot="/Applications/Xcode.app/Contents/Developer/Platforms/${aPlatformSdk}.platform/Developer/SDKs/${aPlatformSdk}.sdk" + + # (re)generate Make files + if [[ $toCMake == 1 ]]; then + echo Configuring OCCT for iOS... + cmake -G "Unix Makefiles" \ -D CMAKE_SYSTEM_NAME="iOS" \ -D CMAKE_OSX_ARCHITECTURES:STRING="$anAbi" \ -D CMAKE_OSX_DEPLOYMENT_TARGET:STRING="$IPHONEOS_DEPLOYMENT_TARGET" \ -D CMAKE_OSX_SYSROOT:PATH="$aSysRoot" \ - -D ENABLE_VISIBILITY:BOOL="TRUE" \ -D CMAKE_C_USE_RESPONSE_FILE_FOR_OBJECTS:BOOL="OFF" \ -D CMAKE_CXX_USE_RESPONSE_FILE_FOR_OBJECTS:BOOL="OFF" \ -D CMAKE_BUILD_TYPE:STRING="$aBuildType" \ @@ -145,57 +150,118 @@ if [[ $toCMake == 1 ]]; then -D BUILD_MODULE_DataExchange:BOOL="${BUILD_DataExchange}" \ -D BUILD_MODULE_Draw:BOOL="OFF" \ -D BUILD_DOC_Overview:BOOL="OFF" \ - "$aCasSrc" 2>&1 | tee -a "$aLogFile" - aResult=$?; if [[ $aResult != 0 ]]; then exit $aResult; fi -fi -aTimeGEN=$SECONDS -logDuration $toCMake "Generation" $aTimeZERO $aTimeGEN + "$aCasSrc" 2>&1 | tee -a "$aLogFile" + aResult=$?; if [[ $aResult != 0 ]]; then exit $aResult; fi + fi + aTimeGEN=$SECONDS + logDuration $toCMake "Generation" $aTimeZERO $aTimeGEN -# clean up from previous build -if [[ $toClean == 1 ]]; then - make clean -fi + # clean up from previous build + if [[ $toClean == 1 ]]; then + make clean + fi + + # build the project + if [[ $toMake == 1 ]]; then + echo Building... + make -j $aNbJobs 2>&1 | tee -a "$aLogFile" + aResult=$?; if [[ $aResult != 0 ]]; then exit $aResult; fi + fi + aTimeBUILD=$SECONDS + logDuration $toMake "Building" $aTimeGEN $aTimeBUILD + logDuration $toMake "Total building" $aTimeZERO $aTimeBUILD + + # install the project + if [[ $toInstall == 1 ]]; then + echo Installing OCCT into $aDestDir... + make install 2>&1 | tee -a "$aLogFile" + cp -f "$aWorkDir/VERSION.html" "$aDestDir/VERSION.html" + echo Platform: ${aPlatformSdk} ABI: ${anAbi} Build: ${aBuildType} IPHONEOS_DEPLOYMENT_TARGET: ${IPHONEOS_DEPLOYMENT_TARGET} > "$aDestDir/build_target.txt" + fi + aTimeINSTALL=$SECONDS + logDuration $toInstall "Install" $aTimeBUILD $aTimeINSTALL + + # create an archive + if [[ $toPack == 1 ]]; then + anArchName=occt-${anOcctVersion}${anOcctVerSuffix}${aRevision}-${aPlatformAndCompiler}.tar.bz2 + echo Creating an archive ${aCasSrc}/${aBuildRoot}/${anArchName}... + rm ${aDestDir}/../${anArchName} &>/dev/null + pushd "$aDestDir" + tar -jcf ${aDestDir}/../${anArchName} * + popd + fi + aTimePACK=$SECONDS + logDuration $toPack "Packing archive" $aTimeINSTALL $aTimePACK + + # finished + DURATION=$(($aTimePACK - $aTimeZERO)) + echo Total time: $DURATION sec + logDuration 1 "Total" $aTimeZERO $aTimePACK -# build the project -if [[ $toMake == 1 ]]; then - echo Building... - make -j $aNbJobs 2>&1 | tee -a "$aLogFile" - aResult=$?; if [[ $aResult != 0 ]]; then exit $aResult; fi -fi -aTimeBUILD=$SECONDS -logDuration $toMake "Building" $aTimeGEN $aTimeBUILD -logDuration $toMake "Total building" $aTimeZERO $aTimeBUILD - -# install the project -if [[ $toInstall == 1 ]]; then - echo Installing OCCT into $aDestDir... - make install 2>&1 | tee -a "$aLogFile" - cp -f "$aWorkDir/VERSION.html" "$aDestDir/VERSION.html" -fi -aTimeINSTALL=$SECONDS -logDuration $toInstall "Install" $aTimeBUILD $aTimeINSTALL - -# create an archive -if [[ $toPack == 1 ]]; then - YEAR=$(date +"%Y") - MONTH=$(date +"%m") - DAY=$(date +"%d") - aRevision=-${YEAR}-${MONTH}-${DAY} - #aRevision=-${aGitBranch} - - anArchName=occt-${anOcctVersion}${anOcctVerSuffix}${aRevision}-${aPlatformAndCompiler}.tar.bz2 - echo Creating an archive ${aCasSrc}/${aBuildRoot}/${anArchName}... - rm ${aDestDir}/../${anArchName} &>/dev/null - pushd "$aDestDir" - tar -jcf ${aDestDir}/../${anArchName} * popd -fi -aTimePACK=$SECONDS -logDuration $toPack "Packing archive" $aTimeINSTALL $aTimePACK +} + +for anArchIter in $anAbiList +do + IFS="|" read -r aPlatform anArch <<< "$anArchIter" + echo Platform: ${aPlatform} ABI: ${anArch} Build: ${aBuildType} + buildArch $anArch $aPlatform +done -# finished -DURATION=$(($aTimePACK - $aTimeZERO)) -echo Total time: $DURATION sec -logDuration 1 "Total" $aTimeZERO $aTimePACK +# create a FAT archive +if [[ $toPackFat == 1 ]]; then + for aPlatIter in iPhoneOS iPhoneSimulator + do + aSuffixFat=${aPlatIter}${aBuildTypePrefix}-clang + aFatDir="${aCasSrc}/${aBuildRoot}/${aSuffixFat}" -popd + # merge per-arch builds into fat builds + hasPlatform=0 + for anArchIter in $anAbiList + do + IFS="|" read -r aPlatform anArch <<< "$anArchIter" + if [[ $aPlatIter != ${aPlatform} ]]; then + continue + fi + + aSuffixThin=${aPlatform}-${anArch}${aBuildTypePrefix}-clang + anArchDir="${aCasSrc}/${aBuildRoot}/${aSuffixThin}" + if [[ $hasPlatform == 0 ]]; then + hasPlatform=1 + echo Packing FAT archive for platform: ${aPlatform} + rm -r -f "$aFatDir" + mkdir -p "$aFatDir" + rsync -r --exclude '*.a' "$anArchDir/" "$aFatDir" + rm -f "$aFatDir/build_target.txt" + for aLibIter in $anArchDir/lib/*.a; do + aLibName=`basename $aLibIter` + lipo "$anArchDir/lib/$aLibName" -output "$aFatDir/lib/$aLibName" -create + done + else + for aLibIter in $aFatDir/lib/*.a; do + aLibName=`basename $aLibIter` + lipo "$aFatDir/lib/$aLibName" "$anArchDir/lib/$aLibName" -output "$aFatDir/lib/$aLibName" -create + #lipo -info "$aFatDir/lib/$aLibName" + done + fi + cat "$anArchDir/build_target.txt" >> "$aFatDir/build_target.txt" + done + + # create an archive + for anArchIter in $anAbiList + do + IFS="|" read -r aPlatform anArch <<< "$anArchIter" + if [[ $aPlatIter != ${aPlatform} ]]; then + continue + fi + + anArchName=occt-${anOcctVersion}${anOcctVerSuffix}${aRevision}-${aSuffixFat}.tar.bz2 + echo Creating an archive ${aCasSrc}/${aBuildRoot}/${anArchName}... + rm ${aFatDir}/../${anArchName} &>/dev/null + pushd "$aFatDir" + tar -jcf ${aFatDir}/../${anArchName} * + popd + break + done + done +fi diff --git a/adm/scripts/ios_custom.sh.template b/adm/scripts/ios_custom.sh.template index 52f15eb8b0..c54624ebf6 100644 --- a/adm/scripts/ios_custom.sh.template +++ b/adm/scripts/ios_custom.sh.template @@ -1,4 +1,4 @@ -# environment configuration template for macos_build.sh (to be renamed as macos_custom_env.sh) +# environment configuration template for ios_build.sh (to be renamed as ios_custom_env.sh) export PATH=/Applications/CMake.app/Contents/bin:$PATH export aFreeType="$aSrcRoot/../3rdparty/freetype-2.10.4-ios" export aFreeImage="$aSrcRoot/../3rdparty/freeimage-3.18-ios" @@ -6,13 +6,13 @@ export aRapidJson="$aSrcRoot/../3rdparty/rapidjson-1.1.0" export aDraco="$aSrcRoot/../3rdparty/draco-1.4.1-ios" # Uncomment to customize building steps -#export toSimulator=0 #export isStatic=0 #export toCMake=1 #export toClean=1 #export toMake=1 #export toInstall=1 #export toPack=0 +#export toPackFat=1 #export toDebug=0 #export BUILD_ModelingData=ON @@ -26,5 +26,5 @@ export aDraco="$aSrcRoot/../3rdparty/draco-1.4.1-ios" #export USE_FREEIMAGE=ON #export IPHONEOS_DEPLOYMENT_TARGET=8.0 -#export anAbi=arm64 -#export anAbi=x86_64 +#export anAbiList="iPhoneOS|arm64 iPhoneSimulator|arm64 iPhoneSimulator|x86_64" +#export anAbiList="iPhoneOS|arm64" From 302ad26bffd1ef35a61b8b25b79b9376d9a3e906 Mon Sep 17 00:00:00 2001 From: kgv Date: Fri, 17 Dec 2021 09:53:46 +0300 Subject: [PATCH 177/639] 0032739: Configuration, scripts - handle ABI list within macOS building script adm/scripts/macos_build.sh --- adm/scripts/macos_build.sh | 257 ++++++++++++++++++--------- adm/scripts/macos_custom.sh.template | 6 +- 2 files changed, 176 insertions(+), 87 deletions(-) diff --git a/adm/scripts/macos_build.sh b/adm/scripts/macos_build.sh index e5fbe96c7f..b44fb1bec5 100755 --- a/adm/scripts/macos_build.sh +++ b/adm/scripts/macos_build.sh @@ -20,11 +20,13 @@ export aRapidJson= export aDraco= # build stages to perform +export isStatic=0 export toCMake=1 export toClean=1 export toMake=1 export toInstall=1 export toPack=0 +export toPackFat=0 export toDebug=0 export BUILD_ModelingData=ON @@ -34,72 +36,92 @@ export BUILD_ApplicationFramework=ON export BUILD_DataExchange=ON export BUILD_Draw=ON +export USE_FREETYPE=ON export USE_FREEIMAGE=ON export USE_RAPIDJSON=OFF export USE_DRACO=OFF export MACOSX_DEPLOYMENT_TARGET=10.10 -#export anAbi=arm64 -export anAbi=x86_64 +#export anAbiList="arm64 x86_64" +export anAbiList="x86_64" +aPlatform="macos" if [[ -f "${aScriptDir}/macos_custom.sh" ]]; then source "${aScriptDir}/macos_custom.sh" fi +anOcctVerSuffix=`grep -e "#define OCC_VERSION_DEVELOPMENT" "$aCasSrc/src/Standard/Standard_Version.hxx" | awk '{print $3}' | xargs` +anOcctVersion=`grep -e "#define OCC_VERSION_COMPLETE" "$aCasSrc/src/Standard/Standard_Version.hxx" | awk '{print $3}' | xargs` +aGitBranch=`git symbolic-ref --short HEAD` + +YEAR=$(date +"%Y") +MONTH=$(date +"%m") +DAY=$(date +"%d") +aRevision=-${YEAR}-${MONTH}-${DAY} +#aRevision=-${aGitBranch} + +set -o pipefail + aBuildType="Release" aBuildTypePrefix= if [[ $toDebug == 1 ]]; then aBuildType="Debug" aBuildTypePrefix="-debug" fi -aPlatformAndCompiler=mac-${anAbi}${aBuildTypePrefix}-clang +aLibType="Shared" +aLibExt="dylib" +if [[ $isStatic == 1 ]]; then + aLibType="Static" + aLibExt="a" +fi -aWorkDir="${aCasSrc}/${aBuildRoot}/${aPlatformAndCompiler}-make" -aDestDir="${aCasSrc}/${aBuildRoot}/${aPlatformAndCompiler}" -aLogFile="${aCasSrc}/${aBuildRoot}/build-${aPlatformAndCompiler}.log" +function buildArch { + anAbi=$1 -if [[ $toCMake == 1 ]] && [[ $toClean == 1 ]]; then - rm -r -f "$aWorkDir" - rm -r -f "$aDestDir" -fi -mkdir -p "$aWorkDir" -mkdir -p "$aDestDir" -rm -f "$aLogFile" + aPlatformAndCompiler=${aPlatform}-${anAbi}${aBuildTypePrefix}-clang -anOcctVerSuffix=`grep -e "#define OCC_VERSION_DEVELOPMENT" "$aCasSrc/src/Standard/Standard_Version.hxx" | awk '{print $3}' | xargs` -anOcctVersion=`grep -e "#define OCC_VERSION_COMPLETE" "$aCasSrc/src/Standard/Standard_Version.hxx" | awk '{print $3}' | xargs` -aGitBranch=`git symbolic-ref --short HEAD` + aWorkDir="${aCasSrc}/${aBuildRoot}/${aPlatformAndCompiler}-make" + aDestDir="${aCasSrc}/${aBuildRoot}/${aPlatformAndCompiler}" + aLogFile="${aCasSrc}/${aBuildRoot}/build-${aPlatformAndCompiler}.log" -# include some information about OCCT into archive -echo \> "${aWorkDir}/VERSION.html" -git status >> "${aWorkDir}/VERSION.html" -git log -n 100 >> "${aWorkDir}/VERSION.html" -echo \>> "${aWorkDir}/VERSION.html" + if [[ $toCMake == 1 ]] && [[ $toClean == 1 ]]; then + rm -r -f "$aWorkDir" + rm -r -f "$aDestDir" + fi + mkdir -p "$aWorkDir" + mkdir -p "$aDestDir" + rm -f "$aLogFile" -pushd "$aWorkDir" + # include some information about OCCT into archive + echo \> "${aWorkDir}/VERSION.html" + git status >> "${aWorkDir}/VERSION.html" + git log -n 100 >> "${aWorkDir}/VERSION.html" + echo \>> "${aWorkDir}/VERSION.html" -aTimeZERO=$SECONDS -set -o pipefail + pushd "$aWorkDir" -function logDuration { - if [[ $1 == 1 ]]; then - aDur=$(($4 - $3)) - echo $2 time: $aDur sec>> "$aLogFile" - fi -} + aTimeZERO=$SECONDS -# (re)generate Make files -if [[ $toCMake == 1 ]]; then - echo Configuring OCCT for macOS... - cmake -G "Unix Makefiles" \ - -D CMAKE_BUILD_TYPE:STRING="$aBuildType" \ - -D BUILD_LIBRARY_TYPE:STRING="Shared" \ + function logDuration { + if [[ $1 == 1 ]]; then + aDur=$(($4 - $3)) + echo $2 time: $aDur sec>> "$aLogFile" + fi + } + + # (re)generate Make files + if [[ $toCMake == 1 ]]; then + echo Configuring OCCT for macOS... + cmake -G "Unix Makefiles" \ -D CMAKE_OSX_ARCHITECTURES:STRING="$anAbi" \ + -D CMAKE_BUILD_TYPE:STRING="$aBuildType" \ + -D BUILD_LIBRARY_TYPE:STRING="$aLibType" \ -D INSTALL_DIR:PATH="$aDestDir" \ -D INSTALL_DIR_INCLUDE:STRING="inc" \ -D INSTALL_DIR_LIB:STRING="lib" \ -D INSTALL_DIR_RESOURCE:STRING="src" \ -D INSTALL_NAME_DIR:STRING="@executable_path/../Frameworks" \ + -D USE_FREETYPE:BOOL="$USE_FREETYPE" \ -D 3RDPARTY_FREETYPE_DIR:PATH="$aFreeType" \ -D 3RDPARTY_FREETYPE_INCLUDE_DIR_freetype2:FILEPATH="$aFreeType/include" \ -D 3RDPARTY_FREETYPE_INCLUDE_DIR_ft2build:FILEPATH="$aFreeType/include" \ @@ -125,57 +147,122 @@ if [[ $toCMake == 1 ]]; then -D BUILD_MODULE_DataExchange:BOOL="${BUILD_DataExchange}" \ -D BUILD_MODULE_Draw:BOOL="${BUILD_Draw}" \ -D BUILD_DOC_Overview:BOOL="OFF" \ - "$aCasSrc" 2>&1 | tee -a "$aLogFile" - aResult=$?; if [[ $aResult != 0 ]]; then exit $aResult; fi -fi -aTimeGEN=$SECONDS -logDuration $toCMake "Generation" $aTimeZERO $aTimeGEN + "$aCasSrc" 2>&1 | tee -a "$aLogFile" + aResult=$?; if [[ $aResult != 0 ]]; then exit $aResult; fi + fi + aTimeGEN=$SECONDS + logDuration $toCMake "Generation" $aTimeZERO $aTimeGEN -# clean up from previous build -if [[ $toClean == 1 ]]; then - make clean -fi + # clean up from previous build + if [[ $toClean == 1 ]]; then + make clean + fi + + # build the project + if [[ $toMake == 1 ]]; then + echo Building OCCT... + make -j $aNbJobs 2>&1 | tee -a "$aLogFile" + aResult=$?; if [[ $aResult != 0 ]]; then exit $aResult; fi + fi + aTimeBUILD=$SECONDS + logDuration $toMake "Building" $aTimeGEN $aTimeBUILD + logDuration $toMake "Total building" $aTimeZERO $aTimeBUILD + + # install the project + if [[ $toInstall == 1 ]]; then + echo Installing OCCT into $aDestDir... + make install 2>&1 | tee -a "$aLogFile" + cp -f "$aWorkDir/VERSION.html" "$aDestDir/VERSION.html" + echo Platform: macOS ABI: ${anAbi} Build: ${aBuildType} MACOSX_DEPLOYMENT_TARGET: ${MACOSX_DEPLOYMENT_TARGET} > "$aDestDir/build_target.txt" + fi + aTimeINSTALL=$SECONDS + logDuration $toInstall "Install" $aTimeBUILD $aTimeINSTALL + + # create an archive + if [[ $toPack == 1 ]]; then + anArchName=occt-${anOcctVersion}${anOcctVerSuffix}${aRevision}-${aPlatformAndCompiler}.tar.bz2 + echo Creating an archive ${aCasSrc}/${aBuildRoot}/${anArchName}... + rm ${aDestDir}/../${anArchName} &>/dev/null + pushd "$aDestDir" + tar -jcf ${aDestDir}/../${anArchName} * + popd + fi + aTimePACK=$SECONDS + logDuration $toPack "Packing archive" $aTimeINSTALL $aTimePACK + + # finished + DURATION=$(($aTimePACK - $aTimeZERO)) + echo Total time: $DURATION sec + logDuration 1 "Total" $aTimeZERO $aTimePACK -# build the project -if [[ $toMake == 1 ]]; then - echo Building OCCT... - make -j $aNbJobs 2>&1 | tee -a "$aLogFile" - aResult=$?; if [[ $aResult != 0 ]]; then exit $aResult; fi -fi -aTimeBUILD=$SECONDS -logDuration $toMake "Building" $aTimeGEN $aTimeBUILD -logDuration $toMake "Total building" $aTimeZERO $aTimeBUILD - -# install the project -if [[ $toInstall == 1 ]]; then - echo Installing OCCT into $aDestDir... - make install 2>&1 | tee -a "$aLogFile" - cp -f "$aWorkDir/VERSION.html" "$aDestDir/VERSION.html" -fi -aTimeINSTALL=$SECONDS -logDuration $toInstall "Install" $aTimeBUILD $aTimeINSTALL - -# create an archive -if [[ $toPack == 1 ]]; then - YEAR=$(date +"%Y") - MONTH=$(date +"%m") - DAY=$(date +"%d") - aRevision=-${YEAR}-${MONTH}-${DAY} - #aRevision=-${aGitBranch} - - anArchName=occt-${anOcctVersion}${anOcctVerSuffix}${aRevision}-${aPlatformAndCompiler}.tar.bz2 - echo Creating an archive ${aCasSrc}/${aBuildRoot}/${anArchName}... - rm ${aDestDir}/../${anArchName} &>/dev/null - pushd "$aDestDir" - tar -jcf ${aDestDir}/../${anArchName} * popd -fi -aTimePACK=$SECONDS -logDuration $toPack "Packing archive" $aTimeINSTALL $aTimePACK +} + +for anArchIter in $anAbiList +do + echo Platform: macOS ABI: ${anArchIter} Build: ${aBuildType} + buildArch $anArchIter +done + +# create a FAT archive +if [[ $toPackFat == 1 ]]; then + aSuffixFat=${aPlatform}${aBuildTypePrefix}-clang + aFatDir="${aCasSrc}/${aBuildRoot}/${aSuffixFat}" + + # merge per-arch builds into fat builds + hasPlatform=0 + for anArchIter in $anAbiList + do + aSuffixThin=${aPlatform}-${anArchIter}${aBuildTypePrefix}-clang + anArchDir="${aCasSrc}/${aBuildRoot}/${aSuffixThin}" + if [[ $hasPlatform == 0 ]]; then + hasPlatform=1 + echo Packing FAT archive + rm -r -f "$aFatDir" + mkdir -p "$aFatDir" + if [[ $isStatic == 1 ]]; then + rsync -r -l --exclude '*.a' "$anArchDir/" "$aFatDir" + else + rsync -r -l --exclude '*.dylib' "$anArchDir/" "$aFatDir" + fi + rm -f "$aFatDir/build_target.txt" -# finished -DURATION=$(($aTimePACK - $aTimeZERO)) -echo Total time: $DURATION sec -logDuration 1 "Total" $aTimeZERO $aTimePACK + if [[ -L "$anArchDir/bin/DRAWEXE" ]]; then + aDrawExe=$(readlink "$anArchDir/bin/DRAWEXE") + rm $aFatDir/bin/$aDrawExe + lipo "$anArchDir/bin/$aDrawExe" -output "$aFatDir/bin/$aDrawExe" -create + fi -popd + for aLibIter in $anArchDir/lib/*.$aLibExt; do + aLibName=`basename $aLibIter` + if [[ -L "$anArchDir/lib/$aLibName" ]]; then + cp -a "$anArchDir/lib/$aLibName" "$aFatDir/lib/" + else + lipo "$anArchDir/lib/$aLibName" -output "$aFatDir/lib/$aLibName" -create + fi + done + else + if [[ -L "$anArchDir/bin/DRAWEXE" ]]; then + aDrawExe=$(readlink "$anArchDir/bin/DRAWEXE") + lipo "$aFatDir/bin/$aDrawExe" "$anArchDir/bin/$aDrawExe" -output "$aFatDir/bin/$aDrawExe" -create + fi + + for aLibIter in $aFatDir/lib/*.$aLibExt; do + aLibName=`basename $aLibIter` + if [[ ! -L "$anArchDir/lib/$aLibName" ]]; then + lipo "$aFatDir/lib/$aLibName" "$anArchDir/lib/$aLibName" -output "$aFatDir/lib/$aLibName" -create + #lipo -info "$aFatDir/lib/$aLibName" + fi + done + fi + cat "$anArchDir/build_target.txt" >> "$aFatDir/build_target.txt" + done + + # create an archive + anArchName=occt-${anOcctVersion}${anOcctVerSuffix}${aRevision}-${aSuffixFat}.tar.bz2 + echo Creating an archive ${aCasSrc}/${aBuildRoot}/${anArchName}... + rm ${aFatDir}/../${anArchName} &>/dev/null + pushd "$aFatDir" + tar -jcf ${aFatDir}/../${anArchName} * + popd +fi diff --git a/adm/scripts/macos_custom.sh.template b/adm/scripts/macos_custom.sh.template index c56a72fa06..740c24f640 100644 --- a/adm/scripts/macos_custom.sh.template +++ b/adm/scripts/macos_custom.sh.template @@ -12,6 +12,7 @@ export aDraco="$aSrcRoot/../3rdparty/draco-1.4.1-macos" #export toMake=1 #export toInstall=1 #export toPack=1 +#export toPackFat=1 #export BUILD_ModelingData=ON #export BUILD_ModelingAlgorithms=ON @@ -25,5 +26,6 @@ export aDraco="$aSrcRoot/../3rdparty/draco-1.4.1-macos" #export USE_FREEIMAGE=ON #export MACOSX_DEPLOYMENT_TARGET=10.10 -#export anAbi=arm64 -#export anAbi=x86_64 +#export anAbiList=arm64 +#export anAbiList=x86_64 +#export anAbiList="arm64 x86_64" From 1bc34debc1bc4d931cde5254aff3869b317e3cd9 Mon Sep 17 00:00:00 2001 From: kgv Date: Sun, 19 Dec 2021 12:29:47 +0300 Subject: [PATCH 178/639] 0032740: Coding Rules, OpenGl_Context.cxx - new warning on macOS after integration fix for #32732 --- src/OpenGl/OpenGl_Context.cxx | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/OpenGl/OpenGl_Context.cxx b/src/OpenGl/OpenGl_Context.cxx index dc38571ef1..4d2bac38b9 100644 --- a/src/OpenGl/OpenGl_Context.cxx +++ b/src/OpenGl/OpenGl_Context.cxx @@ -15,6 +15,9 @@ #if defined(_WIN32) #include +#elif defined(__APPLE__) + // macOS 10.4 deprecated OpenGL framework - suppress useless warnings + #define GL_SILENCE_DEPRECATION #endif #include From ce7fe22d97cc4d8813ab062e875ba1500916cb8d Mon Sep 17 00:00:00 2001 From: kgv Date: Sun, 19 Dec 2021 11:29:36 +0300 Subject: [PATCH 179/639] 0032743: Coding Rules - remove unused class friends of Package classes --- src/AppParCurves/AppParCurves.hxx | 39 ---------- src/BOPTest/BOPTest.hxx | 7 -- src/BRepBuilderAPI/BRepBuilderAPI.cxx | 2 +- src/BRepBuilderAPI/BRepBuilderAPI.hxx | 39 ---------- src/BRepCheck/BRepCheck.cxx | 2 +- src/BRepCheck/BRepCheck.hxx | 28 ------- src/BRepClass3d/BRepClass3d.cxx | 6 +- src/BRepClass3d/BRepClass3d.hxx | 26 ------- src/BRepFeat/BRepFeat.cxx | 2 +- src/BRepFeat/BRepFeat.hxx | 33 --------- src/BRepFill/BRepFill.cxx | 3 +- src/BRepFill/BRepFill.hxx | 47 +----------- src/BRepGProp/BRepGProp.hxx | 28 ------- src/BRepLProp/BRepLProp.cxx | 2 +- src/BRepLProp/BRepLProp.hxx | 25 ------- src/BRepLib/BRepLib.hxx | 32 -------- src/BRepTools/BRepTools.cxx | 2 +- src/BRepTools/BRepTools.hxx | 22 ------ src/BinMDF/BinMDF.hxx | 27 ------- src/BinMDataStd/BinMDataStd.hxx | 41 ---------- src/BinMDataXtd/BinMDataXtd.hxx | 25 ------- src/BinMDocStd/BinMDocStd.cxx | 2 +- src/BinMDocStd/BinMDocStd.hxx | 22 ------ src/BinMFunction/BinMFunction.cxx | 2 +- src/BinMFunction/BinMFunction.hxx | 24 ------ src/BinMNaming/BinMNaming.cxx | 2 +- src/BinMNaming/BinMNaming.hxx | 20 ----- src/BinMXCAFDoc/BinMXCAFDoc.cxx | 2 +- src/BinMXCAFDoc/BinMXCAFDoc.hxx | 29 -------- src/BinTools/BinTools.hxx | 23 ------ src/Bisector/Bisector.hxx | 31 -------- src/BlendFunc/BlendFunc.cxx | 3 +- src/BlendFunc/BlendFunc.hxx | 35 --------- src/BndLib/BndLib.cxx | 2 +- src/BndLib/BndLib.hxx | 24 ------ src/CSLib/CSLib.hxx | 23 ------ src/ChFi2d/ChFi2d.hxx | 23 ------ src/ChFi3d/ChFi3d.cxx | 2 +- src/ChFi3d/ChFi3d.hxx | 25 ------- src/DDF/DDF.hxx | 24 ------ src/DDataStd/DDataStd.hxx | 24 ------ src/DDocStd/DDocStd.cxx | 3 +- src/DDocStd/DDocStd.hxx | 20 ----- src/DNaming/DNaming.cxx | 2 +- src/DNaming/DNaming.hxx | 32 -------- src/Draft/Draft.cxx | 2 +- src/Draft/Draft.hxx | 25 ------- src/DrawDim/DrawDim.cxx | 2 +- src/DrawDim/DrawDim.hxx | 30 -------- src/Expr/Expr.hxx | 72 ------------------ src/ExprIntrp/ExprIntrp.hxx | 27 +------ src/GProp/GProp.cxx | 2 +- src/GProp/GProp.hxx | 28 ------- src/GccEnt/GccEnt.hxx | 23 ------ src/Geom2dConvert/Geom2dConvert.cxx | 4 +- src/Geom2dConvert/Geom2dConvert.hxx | 25 ------- src/Geom2dGcc/Geom2dGcc.cxx | 6 +- src/Geom2dGcc/Geom2dGcc.hxx | 46 ------------ src/GeomAPI/GeomAPI.cxx | 2 +- src/GeomAPI/GeomAPI.hxx | 31 -------- src/GeomConvert/GeomConvert.cxx | 5 +- src/GeomConvert/GeomConvert.hxx | 29 -------- src/GeomConvert/GeomConvert_1.cxx | 5 +- src/GeomFill/GeomFill.cxx | 2 +- src/GeomFill/GeomFill.hxx | 75 ------------------- src/GeomInt/GeomInt.hxx | 49 ------------ src/GeomLProp/GeomLProp.cxx | 2 +- src/GeomLProp/GeomLProp.hxx | 25 ------- src/GeomLib/GeomLib.hxx | 24 ------ src/GeomTools/GeomTools.cxx | 2 +- src/GeomTools/GeomTools.hxx | 25 ------- src/HLRBRep/HLRBRep.cxx | 2 +- src/HLRBRep/HLRBRep.hxx | 76 ------------------- src/HLRTest/HLRTest.cxx | 2 +- src/HLRTest/HLRTest.hxx | 26 ------- src/HeaderSection/HeaderSection.hxx | 26 ------- src/IFSelect/IFSelect.hxx | 99 ------------------------- src/IGESAppli/IGESAppli.hxx | 63 ---------------- src/IGESBasic/IGESBasic.hxx | 62 ---------------- src/IGESCAFControl/IGESCAFControl.hxx | 23 ------ src/IGESConvGeom/IGESConvGeom.cxx | 7 +- src/IGESConvGeom/IGESConvGeom.hxx | 22 ------ src/IGESData/IGESData.hxx | 60 --------------- src/IGESDefs/IGESDefs.cxx | 2 +- src/IGESDefs/IGESDefs.hxx | 40 ---------- src/IGESDimen/IGESDimen.cxx | 2 +- src/IGESDimen/IGESDimen.hxx | 71 ------------------ src/IGESDraw/IGESDraw.cxx | 2 +- src/IGESDraw/IGESDraw.hxx | 53 ------------- src/IGESGeom/IGESGeom.cxx | 2 +- src/IGESGeom/IGESGeom.hxx | 71 ------------------ src/IGESGraph/IGESGraph.cxx | 2 +- src/IGESGraph/IGESGraph.hxx | 53 ------------- src/IGESSelect/IGESSelect.cxx | 2 +- src/IGESSelect/IGESSelect.hxx | 67 ----------------- src/IGESSolid/IGESSolid.cxx | 2 +- src/IGESSolid/IGESSolid.hxx | 74 ------------------ src/IGESToBRep/IGESToBRep.cxx | 6 +- src/IntImpParGen/IntImpParGen.cxx | 11 +-- src/IntImpParGen/IntImpParGen.hxx | 25 ------- src/IntSurf/IntSurf.hxx | 30 -------- src/Intf/Intf.cxx | 2 +- src/Intf/Intf.hxx | 29 -------- src/Law/Law.cxx | 2 +- src/Law/Law.hxx | 31 -------- src/LocOpe/LocOpe.hxx | 42 ----------- src/LocalAnalysis/LocalAnalysis.hxx | 5 -- src/PLib/PLib.cxx | 5 +- src/PLib/PLib.hxx | 19 ----- src/Poly/Poly.hxx | 9 --- src/QABugs/QABugs.hxx | 21 ------ src/RWHeaderSection/RWHeaderSection.cxx | 2 +- src/RWHeaderSection/RWHeaderSection.hxx | 26 ------- src/RWStepAP214/RWStepAP214.cxx | 2 +- src/RWStepAP214/RWStepAP214.hxx | 49 ------------ src/STEPConstruct/STEPConstruct.cxx | 2 +- src/STEPConstruct/STEPConstruct.hxx | 31 -------- src/STEPEdit/STEPEdit.cxx | 2 +- src/STEPEdit/STEPEdit.hxx | 23 ------ src/SWDRAW/SWDRAW.cxx | 7 +- src/SWDRAW/SWDRAW.hxx | 30 -------- src/ShapeAlgo/ShapeAlgo.hxx | 23 ------ src/ShapeAnalysis/ShapeAnalysis.cxx | 8 +- src/ShapeAnalysis/ShapeAnalysis.hxx | 37 --------- src/ShapeBuild/ShapeBuild.cxx | 3 +- src/ShapeBuild/ShapeBuild.hxx | 24 ------ src/ShapeCustom/ShapeCustom.hxx | 32 -------- src/ShapeExtend/ShapeExtend.hxx | 27 ------- src/ShapeFix/ShapeFix.hxx | 42 ----------- src/ShapeProcess/ShapeProcess.cxx | 3 +- src/ShapeProcess/ShapeProcess.hxx | 26 ------- src/ShapeUpgrade/ShapeUpgrade.cxx | 3 +- src/ShapeUpgrade/ShapeUpgrade.hxx | 35 --------- src/StepAP214/StepAP214.cxx | 3 +- src/StepAP214/StepAP214.hxx | 66 ----------------- src/StepData/StepData.cxx | 4 +- src/StepData/StepData.hxx | 60 --------------- src/StepToTopoDS/StepToTopoDS.hxx | 39 ---------- src/Storage/Storage.cxx | 4 +- src/Storage/Storage.hxx | 33 --------- src/TDF/TDF.cxx | 6 +- src/TDF/TDF.hxx | 48 ------------ src/TDataStd/TDataStd.hxx | 60 --------------- src/TDocStd/TDocStd.hxx | 34 --------- src/TNaming/TNaming.cxx | 2 +- src/TNaming/TNaming.hxx | 44 ----------- src/TopExp/TopExp.hxx | 22 ------ src/TopOpeBRep/TopOpeBRep.hxx | 46 ------------ src/TopOpeBRepBuild/FILES | 1 - src/TopOpeBRepBuild/TopOpeBRepBuild.cxx | 15 ---- src/TopOpeBRepDS/TopOpeBRepDS.cxx | 2 +- src/TopOpeBRepDS/TopOpeBRepDS.hxx | 67 ----------------- src/TopOpeBRepTool/TopOpeBRepTool.hxx | 42 ----------- src/TopTools/TopTools.cxx | 2 +- src/TopTools/TopTools.hxx | 25 ------- src/TopoDS/TopoDS.hxx | 41 ---------- src/TopoDSToStep/TopoDSToStep.cxx | 2 +- src/TopoDSToStep/TopoDSToStep.hxx | 36 --------- src/TransferBRep/TransferBRep.cxx | 2 +- src/TransferBRep/TransferBRep.hxx | 29 -------- src/Units/Units.cxx | 12 +-- src/Units/Units.hxx | 36 --------- src/Vrml/Vrml.cxx | 2 +- src/Vrml/Vrml.hxx | 60 --------------- src/VrmlAPI/VrmlAPI.cxx | 2 +- src/VrmlAPI/VrmlAPI.hxx | 22 ------ src/XCAFPrs/XCAFPrs.hxx | 23 ------ src/XDEDRAW/XDEDRAW.cxx | 2 +- src/XDEDRAW/XDEDRAW.hxx | 26 ------- src/XSAlgo/XSAlgo.cxx | 2 +- src/XSAlgo/XSAlgo.hxx | 23 ------ src/XSControl/XSControl.cxx | 2 +- src/XSControl/XSControl.hxx | 34 --------- src/XSDRAWSTLVRML/XSDRAWSTLVRML.cxx | 2 +- src/XSDRAWSTLVRML/XSDRAWSTLVRML.hxx | 25 ------- src/XmlMDataStd/XmlMDataStd.cxx | 3 +- src/XmlMDataStd/XmlMDataStd.hxx | 43 ----------- src/XmlMDataXtd/XmlMDataXtd.cxx | 3 +- src/XmlMDataXtd/XmlMDataXtd.hxx | 25 ------- src/XmlMDocStd/XmlMDocStd.cxx | 2 +- src/XmlMDocStd/XmlMDocStd.hxx | 22 ------ src/XmlMFunction/XmlMFunction.cxx | 2 +- src/XmlMFunction/XmlMFunction.hxx | 25 ------- src/XmlMNaming/XmlMNaming.cxx | 2 +- src/XmlMNaming/XmlMNaming.hxx | 23 ------ src/XmlMXCAFDoc/XmlMXCAFDoc.cxx | 2 +- src/XmlMXCAFDoc/XmlMXCAFDoc.hxx | 30 -------- src/XmlObjMgt/XmlObjMgt.cxx | 3 +- src/XmlObjMgt/XmlObjMgt.hxx | 24 ------ src/math/math.hxx | 61 --------------- 190 files changed, 87 insertions(+), 4181 deletions(-) delete mode 100644 src/TopOpeBRepBuild/TopOpeBRepBuild.cxx diff --git a/src/AppParCurves/AppParCurves.hxx b/src/AppParCurves/AppParCurves.hxx index e7ae86624b..3902ecb321 100644 --- a/src/AppParCurves/AppParCurves.hxx +++ b/src/AppParCurves/AppParCurves.hxx @@ -27,7 +27,6 @@ #include class math_Matrix; - //! Parallel Approximation in n curves. //! This package gives all the algorithms used to approximate a MultiLine //! described by the tool MLineTool. @@ -47,44 +46,6 @@ public: Standard_EXPORT static void SplineFunction (const Standard_Integer NbPoles, const Standard_Integer Degree, const math_Vector& Parameters, const math_Vector& FlatKnots, math_Matrix& A, math_Matrix& DA, math_IntegerVector& Index); - - - -protected: - - - - - -private: - - - - -friend class AppParCurves_MultiPoint; -friend class AppParCurves_MultiCurve; -friend class AppParCurves_MultiBSpCurve; -friend class AppParCurves_ConstraintCouple; -friend class AppParCurves_LeastSquare; -friend class AppParCurves_ResolConstraint; -friend class AppParCurves_Function; -friend class AppParCurves_BSpFunction; -friend class AppParCurves_Gradient; -friend class AppParCurves_Gradient_BFGS; -friend class AppParCurves_ParLeastSquare; -friend class AppParCurves_ResConstraint; -friend class AppParCurves_ParFunction; -friend class AppParCurves_BSpGradient; -friend class AppParCurves_BSpGradient_BFGS; -friend class AppParCurves_BSpParLeastSquare; -friend class AppParCurves_BSpParFunction; - }; - - - - - - #endif // _AppParCurves_HeaderFile diff --git a/src/BOPTest/BOPTest.hxx b/src/BOPTest/BOPTest.hxx index 4d385f6030..d23fb2405e 100644 --- a/src/BOPTest/BOPTest.hxx +++ b/src/BOPTest/BOPTest.hxx @@ -71,13 +71,6 @@ public: //! For numeric values, the number correspond to the order in enum. Standard_EXPORT static BOPAlgo_Operation GetOperationType(const Standard_CString theOp); -protected: - -private: - -friend class BOPTest_Objects; -friend class BOPTest_DrawableShape; - }; #endif // _BOPTest_HeaderFile diff --git a/src/BRepBuilderAPI/BRepBuilderAPI.cxx b/src/BRepBuilderAPI/BRepBuilderAPI.cxx index e5e8b587b1..e0d9c60e4e 100644 --- a/src/BRepBuilderAPI/BRepBuilderAPI.cxx +++ b/src/BRepBuilderAPI/BRepBuilderAPI.cxx @@ -14,10 +14,10 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. +#include #include #include -#include #include #include #include diff --git a/src/BRepBuilderAPI/BRepBuilderAPI.hxx b/src/BRepBuilderAPI/BRepBuilderAPI.hxx index 2bc47ce761..91092301bf 100644 --- a/src/BRepBuilderAPI/BRepBuilderAPI.hxx +++ b/src/BRepBuilderAPI/BRepBuilderAPI.hxx @@ -103,45 +103,6 @@ public: //! Returns the default precision. Standard_EXPORT static Standard_Real Precision(); - - - -protected: - - - - - -private: - - - - -friend class BRepBuilderAPI_Command; -friend class BRepBuilderAPI_MakeShape; -friend class BRepBuilderAPI_MakeVertex; -friend class BRepBuilderAPI_MakeEdge; -friend class BRepBuilderAPI_MakeEdge2d; -friend class BRepBuilderAPI_MakePolygon; -friend class BRepBuilderAPI_MakeFace; -friend class BRepBuilderAPI_FindPlane; -friend class BRepBuilderAPI_Sewing; -friend class BRepBuilderAPI_MakeWire; -friend class BRepBuilderAPI_MakeShell; -friend class BRepBuilderAPI_MakeSolid; -friend class BRepBuilderAPI_ModifyShape; -friend class BRepBuilderAPI_Transform; -friend class BRepBuilderAPI_NurbsConvert; -friend class BRepBuilderAPI_GTransform; -friend class BRepBuilderAPI_Copy; -friend class BRepBuilderAPI_Collect; - }; - - - - - - #endif // _BRepBuilderAPI_HeaderFile diff --git a/src/BRepCheck/BRepCheck.cxx b/src/BRepCheck/BRepCheck.cxx index e057a54588..2f587ffd24 100644 --- a/src/BRepCheck/BRepCheck.cxx +++ b/src/BRepCheck/BRepCheck.cxx @@ -14,9 +14,9 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. +#include #include -#include #include #include #include diff --git a/src/BRepCheck/BRepCheck.hxx b/src/BRepCheck/BRepCheck.hxx index 2ceb463556..aec962a191 100644 --- a/src/BRepCheck/BRepCheck.hxx +++ b/src/BRepCheck/BRepCheck.hxx @@ -49,34 +49,6 @@ public: //! Returns the resolution on the surface Standard_EXPORT static Standard_Real PrecSurface(const Handle(Adaptor3d_Surface)& aAHSurf); - - -protected: - - - - - -private: - - - - -friend class BRepCheck_Result; -friend class BRepCheck_Vertex; -friend class BRepCheck_Edge; -friend class BRepCheck_Wire; -friend class BRepCheck_Face; -friend class BRepCheck_Shell; -friend class BRepCheck_Solid; -friend class BRepCheck_Analyzer; - }; - - - - - - #endif // _BRepCheck_HeaderFile diff --git a/src/BRepClass3d/BRepClass3d.cxx b/src/BRepClass3d/BRepClass3d.cxx index 29ab06ef0f..4385164b1e 100644 --- a/src/BRepClass3d/BRepClass3d.cxx +++ b/src/BRepClass3d/BRepClass3d.cxx @@ -14,13 +14,9 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -// File: BRepClass3d.cxx -// Created: Thu Sep 20 10:05:46 2012 -// Author: -// +#include #include -#include #include #include #include diff --git a/src/BRepClass3d/BRepClass3d.hxx b/src/BRepClass3d/BRepClass3d.hxx index 333eea514f..2fb50307e8 100644 --- a/src/BRepClass3d/BRepClass3d.hxx +++ b/src/BRepClass3d/BRepClass3d.hxx @@ -38,32 +38,6 @@ public: //! If has only one shell, then it will return, without checking orientation. Standard_EXPORT static TopoDS_Shell OuterShell (const TopoDS_Solid& S); - - - -protected: - - - - - -private: - - - - -friend class BRepClass3d_Intersector3d; -friend class BRepClass3d_SolidExplorer; -friend class BRepClass3d_SolidPassiveClassifier; -friend class BRepClass3d_SClassifier; -friend class BRepClass3d_SolidClassifier; - }; - - - - - - #endif // _BRepClass3d_HeaderFile diff --git a/src/BRepFeat/BRepFeat.cxx b/src/BRepFeat/BRepFeat.cxx index 7f3d843b0f..4118757b34 100644 --- a/src/BRepFeat/BRepFeat.cxx +++ b/src/BRepFeat/BRepFeat.cxx @@ -14,6 +14,7 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. +#include #include #include @@ -21,7 +22,6 @@ #include #include #include -#include #include #include #include diff --git a/src/BRepFeat/BRepFeat.hxx b/src/BRepFeat/BRepFeat.hxx index ad14560bf5..d4441dc105 100644 --- a/src/BRepFeat/BRepFeat.hxx +++ b/src/BRepFeat/BRepFeat.hxx @@ -107,39 +107,6 @@ public: //! the Stream and returns . Standard_EXPORT static Standard_OStream& Print (const BRepFeat_StatusError SE, Standard_OStream& S); - - - -protected: - - - - - -private: - - - - -friend class BRepFeat_Builder; -friend class BRepFeat_MakeCylindricalHole; -friend class BRepFeat_SplitShape; -friend class BRepFeat_Form; -friend class BRepFeat_RibSlot; -friend class BRepFeat_MakePrism; -friend class BRepFeat_MakeRevol; -friend class BRepFeat_MakePipe; -friend class BRepFeat_Gluer; -friend class BRepFeat_MakeDPrism; -friend class BRepFeat_MakeLinearForm; -friend class BRepFeat_MakeRevolutionForm; - }; - - - - - - #endif // _BRepFeat_HeaderFile diff --git a/src/BRepFill/BRepFill.cxx b/src/BRepFill/BRepFill.cxx index 7f02bf8449..e40eb199f7 100644 --- a/src/BRepFill/BRepFill.cxx +++ b/src/BRepFill/BRepFill.cxx @@ -34,12 +34,13 @@ // Modified: Mon Oct 12 09:42:33 1998 // number of edges in EdgesFromVertex (CTS21570) +#include + #include #include #include #include #include -#include #include #include #include diff --git a/src/BRepFill/BRepFill.hxx b/src/BRepFill/BRepFill.hxx index ad592c45e9..d8c8d085c9 100644 --- a/src/BRepFill/BRepFill.hxx +++ b/src/BRepFill/BRepFill.hxx @@ -63,58 +63,15 @@ public: //! Insert ACR on a wire Standard_EXPORT static TopoDS_Wire InsertACR (const TopoDS_Wire& wire, const TColStd_Array1OfReal& ACRcuts, const Standard_Real prec); - - - -protected: - - - - - private: - //! Computes origins and orientation on a closed wire Standard_EXPORT static void SearchOrigin (TopoDS_Wire& W, const gp_Pnt& P, const gp_Vec& V, const Standard_Real Tol); +private: - -friend class BRepFill_Generator; -friend class BRepFill_SectionLaw; -friend class BRepFill_ShapeLaw; -friend class BRepFill_NSections; -friend class BRepFill_Draft; -friend class BRepFill_LocationLaw; -friend class BRepFill_DraftLaw; -friend class BRepFill_Edge3DLaw; -friend class BRepFill_EdgeOnSurfLaw; -friend class BRepFill_ACRLaw; -friend class BRepFill_Pipe; -friend class BRepFill_PipeShell; -friend class BRepFill_Evolved; -friend class BRepFill_Sweep; -friend class BRepFill_CompatibleWires; -friend class BRepFill_OffsetWire; -friend class BRepFill_OffsetAncestors; -friend class BRepFill_ApproxSeewing; -friend class BRepFill_ComputeCLine; -friend class BRepFill_TrimSurfaceTool; -friend class BRepFill_TrimEdgeTool; -friend class BRepFill_SectionPlacement; -friend class BRepFill_Section; -friend class BRepFill_TrimShellCorner; -friend class BRepFill_CurveConstraint; -friend class BRepFill_Filling; -friend class BRepFill_FaceAndOrder; -friend class BRepFill_EdgeFaceAndOrder; + friend class BRepFill_PipeShell; }; - - - - - - #endif // _BRepFill_HeaderFile diff --git a/src/BRepGProp/BRepGProp.hxx b/src/BRepGProp/BRepGProp.hxx index ea9f2cbf94..0f0acebc7c 100644 --- a/src/BRepGProp/BRepGProp.hxx +++ b/src/BRepGProp/BRepGProp.hxx @@ -248,34 +248,6 @@ public: const Standard_Boolean IFlag = Standard_False, const Standard_Boolean SkipShared = Standard_False); - -protected: - - - - - -private: - - - - -friend class BRepGProp_EdgeTool; -friend class BRepGProp_Face; -friend class BRepGProp_Domain; -friend class BRepGProp_Cinert; -friend class BRepGProp_Sinert; -friend class BRepGProp_Vinert; -friend class BRepGProp_VinertGK; -friend class BRepGProp_UFunction; -friend class BRepGProp_TFunction; - }; - - - - - - #endif // _BRepGProp_HeaderFile diff --git a/src/BRepLProp/BRepLProp.cxx b/src/BRepLProp/BRepLProp.cxx index cbbb7dc768..f6f48c9859 100644 --- a/src/BRepLProp/BRepLProp.cxx +++ b/src/BRepLProp/BRepLProp.cxx @@ -14,9 +14,9 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. +#include #include -#include #include #include #include diff --git a/src/BRepLProp/BRepLProp.hxx b/src/BRepLProp/BRepLProp.hxx index 7d96d8e85b..63e04a5ef5 100644 --- a/src/BRepLProp/BRepLProp.hxx +++ b/src/BRepLProp/BRepLProp.hxx @@ -45,31 +45,6 @@ public: //! The same as preceding but using the standard tolerances from package Precision. Standard_EXPORT static GeomAbs_Shape Continuity (const BRepAdaptor_Curve& C1, const BRepAdaptor_Curve& C2, const Standard_Real u1, const Standard_Real u2); - - - -protected: - - - - - -private: - - - - -friend class BRepLProp_CurveTool; -friend class BRepLProp_SurfaceTool; -friend class BRepLProp_CLProps; -friend class BRepLProp_SLProps; - }; - - - - - - #endif // _BRepLProp_HeaderFile diff --git a/src/BRepLib/BRepLib.hxx b/src/BRepLib/BRepLib.hxx index 8a95ae2cc1..85d8c6d267 100644 --- a/src/BRepLib/BRepLib.hxx +++ b/src/BRepLib/BRepLib.hxx @@ -282,38 +282,6 @@ public: const Standard_Boolean theExtVMax, TopoDS_Face& theFExtended); - -protected: - - - - - -private: - - - - -friend class BRepLib_Command; -friend class BRepLib_MakeShape; -friend class BRepLib_MakeVertex; -friend class BRepLib_MakeEdge; -friend class BRepLib_MakeEdge2d; -friend class BRepLib_MakePolygon; -friend class BRepLib_MakeFace; -friend class BRepLib_MakeWire; -friend class BRepLib_MakeShell; -friend class BRepLib_MakeSolid; -friend class BRepLib_FindSurface; -friend class BRepLib_FuseEdges; -friend class BRepLib_CheckCurveOnSurface; - }; - - - - - - #endif // _BRepLib_HeaderFile diff --git a/src/BRepTools/BRepTools.cxx b/src/BRepTools/BRepTools.cxx index a6ad77c8f8..90ea3e49a5 100644 --- a/src/BRepTools/BRepTools.cxx +++ b/src/BRepTools/BRepTools.cxx @@ -14,6 +14,7 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. +#include #include #include @@ -24,7 +25,6 @@ #include #include #include -#include #include #include #include diff --git a/src/BRepTools/BRepTools.hxx b/src/BRepTools/BRepTools.hxx index 9e50dd3fb8..d187da66d5 100644 --- a/src/BRepTools/BRepTools.hxx +++ b/src/BRepTools/BRepTools.hxx @@ -358,28 +358,6 @@ public: Standard_EXPORT static void CheckLocations(const TopoDS_Shape& theS, TopTools_ListOfShape& theProblemShapes); -protected: - - - - - -private: - - - - -friend class BRepTools_WireExplorer; -friend class BRepTools_Modification; -friend class BRepTools_Modifier; -friend class BRepTools_TrsfModification; -friend class BRepTools_NurbsConvertModification; -friend class BRepTools_GTrsfModification; -friend class BRepTools_Substitution; -friend class BRepTools_Quilt; -friend class BRepTools_ShapeSet; -friend class BRepTools_ReShape; - }; #endif // _BRepTools_HeaderFile diff --git a/src/BinMDF/BinMDF.hxx b/src/BinMDF/BinMDF.hxx index 0259876417..cd80374baa 100644 --- a/src/BinMDF/BinMDF.hxx +++ b/src/BinMDF/BinMDF.hxx @@ -23,7 +23,6 @@ class BinMDF_ADriverTable; class Message_Messenger; - //! This package provides classes and methods to //! translate a transient DF into a persistent one and //! vice versa. @@ -49,32 +48,6 @@ public: //! Adds the attribute storage drivers to . Standard_EXPORT static void AddDrivers (const Handle(BinMDF_ADriverTable)& aDriverTable, const Handle(Message_Messenger)& aMsgDrv); - - - - -protected: - - - - - -private: - - - - -friend class BinMDF_ADriver; -friend class BinMDF_ReferenceDriver; -friend class BinMDF_TagSourceDriver; -friend class BinMDF_ADriverTable; - }; - - - - - - #endif // _BinMDF_HeaderFile diff --git a/src/BinMDataStd/BinMDataStd.hxx b/src/BinMDataStd/BinMDataStd.hxx index 5257638135..765eb2f912 100644 --- a/src/BinMDataStd/BinMDataStd.hxx +++ b/src/BinMDataStd/BinMDataStd.hxx @@ -57,47 +57,6 @@ static void SetAttributeID(const BinObjMgt_Persistent& theSource, const Handle(T anAtt->SetID(T::GetID()); } - -protected: - - - - - -private: - - - - -friend class BinMDataStd_GenericExtStringDriver; -friend class BinMDataStd_IntegerDriver; -friend class BinMDataStd_RealDriver; -friend class BinMDataStd_IntegerArrayDriver; -friend class BinMDataStd_RealArrayDriver; -friend class BinMDataStd_UAttributeDriver; -friend class BinMDataStd_VariableDriver; -friend class BinMDataStd_ExpressionDriver; -friend class BinMDataStd_TreeNodeDriver; -friend class BinMDataStd_ExtStringArrayDriver; -friend class BinMDataStd_GenericEmptyDriver; -friend class BinMDataStd_AsciiStringDriver; -friend class BinMDataStd_IntPackedMapDriver; -friend class BinMDataStd_IntegerListDriver; -friend class BinMDataStd_RealListDriver; -friend class BinMDataStd_ExtStringListDriver; -friend class BinMDataStd_BooleanListDriver; -friend class BinMDataStd_ReferenceListDriver; -friend class BinMDataStd_BooleanArrayDriver; -friend class BinMDataStd_ReferenceArrayDriver; -friend class BinMDataStd_ByteArrayDriver; -friend class BinMDataStd_NamedDataDriver; - }; - - - - - - #endif // _BinMDataStd_HeaderFile diff --git a/src/BinMDataXtd/BinMDataXtd.hxx b/src/BinMDataXtd/BinMDataXtd.hxx index f6ad616c46..afbe249205 100644 --- a/src/BinMDataXtd/BinMDataXtd.hxx +++ b/src/BinMDataXtd/BinMDataXtd.hxx @@ -39,31 +39,6 @@ public: Standard_EXPORT static Standard_Integer DocumentVersion(); - - - -protected: - - - - - -private: - - - - -friend class BinMDataXtd_GeometryDriver; -friend class BinMDataXtd_ConstraintDriver; -friend class BinMDataXtd_PatternStdDriver; -friend class BinMDataXtd_TriangulationDriver; - }; - - - - - - #endif // _BinMDataXtd_HeaderFile diff --git a/src/BinMDocStd/BinMDocStd.cxx b/src/BinMDocStd/BinMDocStd.cxx index 72d28027ae..105d8213dc 100644 --- a/src/BinMDocStd/BinMDocStd.cxx +++ b/src/BinMDocStd/BinMDocStd.cxx @@ -13,9 +13,9 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. +#include #include -#include #include #include diff --git a/src/BinMDocStd/BinMDocStd.hxx b/src/BinMDocStd/BinMDocStd.hxx index f802f6f36f..9f3838b668 100644 --- a/src/BinMDocStd/BinMDocStd.hxx +++ b/src/BinMDocStd/BinMDocStd.hxx @@ -35,28 +35,6 @@ public: //! Adds the attribute drivers to . Standard_EXPORT static void AddDrivers (const Handle(BinMDF_ADriverTable)& theDriverTable, const Handle(Message_Messenger)& aMsgDrv); - - - -protected: - - - - - -private: - - - - -friend class BinMDocStd_XLinkDriver; - }; - - - - - - #endif // _BinMDocStd_HeaderFile diff --git a/src/BinMFunction/BinMFunction.cxx b/src/BinMFunction/BinMFunction.cxx index 4e0324daf9..0f2603272e 100644 --- a/src/BinMFunction/BinMFunction.cxx +++ b/src/BinMFunction/BinMFunction.cxx @@ -13,9 +13,9 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. +#include #include -#include #include #include #include diff --git a/src/BinMFunction/BinMFunction.hxx b/src/BinMFunction/BinMFunction.hxx index 1b28d69326..046415cb98 100644 --- a/src/BinMFunction/BinMFunction.hxx +++ b/src/BinMFunction/BinMFunction.hxx @@ -35,30 +35,6 @@ public: //! Adds the attribute drivers to . Standard_EXPORT static void AddDrivers (const Handle(BinMDF_ADriverTable)& theDriverTable, const Handle(Message_Messenger)& aMsgDrv); - - - -protected: - - - - - -private: - - - - -friend class BinMFunction_FunctionDriver; -friend class BinMFunction_GraphNodeDriver; -friend class BinMFunction_ScopeDriver; - }; - - - - - - #endif // _BinMFunction_HeaderFile diff --git a/src/BinMNaming/BinMNaming.cxx b/src/BinMNaming/BinMNaming.cxx index 40f47baf3c..49df7dfa5f 100644 --- a/src/BinMNaming/BinMNaming.cxx +++ b/src/BinMNaming/BinMNaming.cxx @@ -13,9 +13,9 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. +#include #include -#include #include #include #include diff --git a/src/BinMNaming/BinMNaming.hxx b/src/BinMNaming/BinMNaming.hxx index e3c8ab5be3..66a05f9c1f 100644 --- a/src/BinMNaming/BinMNaming.hxx +++ b/src/BinMNaming/BinMNaming.hxx @@ -36,26 +36,6 @@ public: //! Adds the attribute drivers to . Standard_EXPORT static void AddDrivers (const Handle(BinMDF_ADriverTable)& theDriverTable, const Handle(Message_Messenger)& aMsgDrv); -protected: - - - - - -private: - - - - -friend class BinMNaming_NamedShapeDriver; -friend class BinMNaming_NamingDriver; - }; - - - - - - #endif // _BinMNaming_HeaderFile diff --git a/src/BinMXCAFDoc/BinMXCAFDoc.cxx b/src/BinMXCAFDoc/BinMXCAFDoc.cxx index df49106583..846d5c67f2 100644 --- a/src/BinMXCAFDoc/BinMXCAFDoc.cxx +++ b/src/BinMXCAFDoc/BinMXCAFDoc.cxx @@ -13,10 +13,10 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. +#include #include #include -#include #include #include #include diff --git a/src/BinMXCAFDoc/BinMXCAFDoc.hxx b/src/BinMXCAFDoc/BinMXCAFDoc.hxx index 45652b2b8f..df5945db61 100644 --- a/src/BinMXCAFDoc/BinMXCAFDoc.hxx +++ b/src/BinMXCAFDoc/BinMXCAFDoc.hxx @@ -35,35 +35,6 @@ public: //! Adds the attribute drivers to . Standard_EXPORT static void AddDrivers (const Handle(BinMDF_ADriverTable)& theDriverTable, const Handle(Message_Messenger)& theMsgDrv); - - - -protected: - - - - - -private: - - - - -friend class BinMXCAFDoc_CentroidDriver; -friend class BinMXCAFDoc_ColorDriver; -friend class BinMXCAFDoc_GraphNodeDriver; -friend class BinMXCAFDoc_LengthUnitDriver; -friend class BinMXCAFDoc_LocationDriver; -friend class BinMXCAFDoc_DatumDriver; -friend class BinMXCAFDoc_DimTolDriver; -friend class BinMXCAFDoc_MaterialDriver; - }; - - - - - - #endif // _BinMXCAFDoc_HeaderFile diff --git a/src/BinTools/BinTools.hxx b/src/BinTools/BinTools.hxx index 2f58ac6d16..c70728e003 100644 --- a/src/BinTools/BinTools.hxx +++ b/src/BinTools/BinTools.hxx @@ -124,29 +124,6 @@ public: (TopoDS_Shape& theShape, const Standard_CString theFile, const Message_ProgressRange& theRange = Message_ProgressRange()); -protected: - - - - - -private: - - - - -friend class BinTools_ShapeSet; -friend class BinTools_Curve2dSet; -friend class BinTools_CurveSet; -friend class BinTools_SurfaceSet; -friend class BinTools_LocationSet; - }; - - - - - - #endif // _BinTools_HeaderFile diff --git a/src/Bisector/Bisector.hxx b/src/Bisector/Bisector.hxx index 6794613350..8f502c914c 100644 --- a/src/Bisector/Bisector.hxx +++ b/src/Bisector/Bisector.hxx @@ -37,37 +37,6 @@ public: Standard_EXPORT static Standard_Boolean IsConvex (const Handle(Geom2d_Curve)& Cu, const Standard_Real Sign); - - - -protected: - - - - - -private: - - - - -friend class Bisector_Curve; -friend class Bisector_BisecAna; -friend class Bisector_BisecPC; -friend class Bisector_BisecCC; -friend class Bisector_Bisec; -friend class Bisector_Inter; -friend class Bisector_PointOnBis; -friend class Bisector_PolyBis; -friend class Bisector_FunctionH; -friend class Bisector_FunctionInter; - }; - - - - - - #endif // _Bisector_HeaderFile diff --git a/src/BlendFunc/BlendFunc.cxx b/src/BlendFunc/BlendFunc.cxx index d6cfb7ff9d..230de2a927 100644 --- a/src/BlendFunc/BlendFunc.cxx +++ b/src/BlendFunc/BlendFunc.cxx @@ -18,8 +18,9 @@ // 30/12/1996 PMN Ajout de GetMinimalWeight // 23/09/1997 PMN Supprimme GetCircle et GetTol (passe dans GeomFill) -#include #include + +#include #include #include #include diff --git a/src/BlendFunc/BlendFunc.hxx b/src/BlendFunc/BlendFunc.hxx index a4f32032f1..3d38856383 100644 --- a/src/BlendFunc/BlendFunc.hxx +++ b/src/BlendFunc/BlendFunc.hxx @@ -53,41 +53,6 @@ public: Standard_EXPORT static Standard_Boolean ComputeDNormal (const Handle(Adaptor3d_Surface)& Surf, const gp_Pnt2d& p2d, gp_Vec& Normal, gp_Vec& DNu, gp_Vec& DNv); - - - -protected: - - - - - -private: - - - - -friend class BlendFunc_ConstRad; -friend class BlendFunc_ConstRadInv; -friend class BlendFunc_Ruled; -friend class BlendFunc_RuledInv; -friend class BlendFunc_EvolRad; -friend class BlendFunc_EvolRadInv; -friend class BlendFunc_CSConstRad; -friend class BlendFunc_CSCircular; -friend class BlendFunc_Corde; -friend class BlendFunc_Chamfer; -friend class BlendFunc_ChamfInv; -friend class BlendFunc_ChAsym; -friend class BlendFunc_ChAsymInv; -friend class BlendFunc_Tensor; - }; - - - - - - #endif // _BlendFunc_HeaderFile diff --git a/src/BndLib/BndLib.cxx b/src/BndLib/BndLib.cxx index 18e1b39a9d..fc742cab2b 100644 --- a/src/BndLib/BndLib.cxx +++ b/src/BndLib/BndLib.cxx @@ -12,10 +12,10 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. +#include #include #include -#include #include #include #include diff --git a/src/BndLib/BndLib.hxx b/src/BndLib/BndLib.hxx index 3ea0494d4d..d81f1271ae 100644 --- a/src/BndLib/BndLib.hxx +++ b/src/BndLib/BndLib.hxx @@ -181,30 +181,6 @@ public: //! VMin,VMax can be [-pi/2,pi/2] Standard_EXPORT static void Add (const gp_Torus& P, const Standard_Real UMin, const Standard_Real UMax, const Standard_Real VMin, const Standard_Real VMax, const Standard_Real Tol, Bnd_Box& B); - - - -protected: - - - - - -private: - - - - -friend class BndLib_Add3dCurve; -friend class BndLib_Add2dCurve; -friend class BndLib_AddSurface; - }; - - - - - - #endif // _BndLib_HeaderFile diff --git a/src/CSLib/CSLib.hxx b/src/CSLib/CSLib.hxx index 1832609bd4..3021a9d971 100644 --- a/src/CSLib/CSLib.hxx +++ b/src/CSLib/CSLib.hxx @@ -122,29 +122,6 @@ public: //! In the regular cases , Iduref=Idvref=0. Standard_EXPORT static gp_Vec DNNormal (const Standard_Integer Nu, const Standard_Integer Nv, const TColgp_Array2OfVec& DerNUV, const Standard_Integer Iduref = 0, const Standard_Integer Idvref = 0); - - - -protected: - - - - - -private: - - - - -friend class CSLib_Class2d; -friend class CSLib_NormalPolyDef; - }; - - - - - - #endif // _CSLib_HeaderFile diff --git a/src/ChFi2d/ChFi2d.hxx b/src/ChFi2d/ChFi2d.hxx index 7eb7156e4f..a48fea1966 100644 --- a/src/ChFi2d/ChFi2d.hxx +++ b/src/ChFi2d/ChFi2d.hxx @@ -53,33 +53,10 @@ public: DEFINE_STANDARD_ALLOC - - - - -protected: - - - - - -private: - - Standard_EXPORT static Standard_Boolean CommonVertex (const TopoDS_Edge& E1, const TopoDS_Edge& E2, TopoDS_Vertex& V); Standard_EXPORT static ChFi2d_ConstructionError FindConnectedEdges (const TopoDS_Face& F, const TopoDS_Vertex& V, TopoDS_Edge& E1, TopoDS_Edge& E2); - - -friend class ChFi2d_Builder; - }; - - - - - - #endif // _ChFi2d_HeaderFile diff --git a/src/ChFi3d/ChFi3d.cxx b/src/ChFi3d/ChFi3d.cxx index 3397f9012d..9c792365f3 100644 --- a/src/ChFi3d/ChFi3d.cxx +++ b/src/ChFi3d/ChFi3d.cxx @@ -14,12 +14,12 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. +#include #include #include #include #include -#include #include #include #include diff --git a/src/ChFi3d/ChFi3d.hxx b/src/ChFi3d/ChFi3d.hxx index eb218fba2a..b36266ee1c 100644 --- a/src/ChFi3d/ChFi3d.hxx +++ b/src/ChFi3d/ChFi3d.hxx @@ -77,31 +77,6 @@ public: //! identic or opposed concave edges. Standard_EXPORT static Standard_Boolean SameSide (const TopAbs_Orientation Or, const TopAbs_Orientation OrSave1, const TopAbs_Orientation OrSave2, const TopAbs_Orientation OrFace1, const TopAbs_Orientation OrFace2); - - - -protected: - - - - - -private: - - - - -friend class ChFi3d_Builder; -friend class ChFi3d_ChBuilder; -friend class ChFi3d_FilBuilder; -friend class ChFi3d_SearchSing; - }; - - - - - - #endif // _ChFi3d_HeaderFile diff --git a/src/DDF/DDF.hxx b/src/DDF/DDF.hxx index 8ac9f0b9cb..993f02760c 100644 --- a/src/DDF/DDF.hxx +++ b/src/DDF/DDF.hxx @@ -84,30 +84,6 @@ public: //! Browser commands . Standard_EXPORT static void BrowserCommands (Draw_Interpretor& theCommands); - - - -protected: - - - - - -private: - - - - -friend class DDF_Data; -friend class DDF_Browser; -friend class DDF_Transaction; - }; - - - - - - #endif // _DDF_HeaderFile diff --git a/src/DDataStd/DDataStd.hxx b/src/DDataStd/DDataStd.hxx index 0d9d5158d6..8e73bf4998 100644 --- a/src/DDataStd/DDataStd.hxx +++ b/src/DDataStd/DDataStd.hxx @@ -69,30 +69,6 @@ public: Standard_EXPORT static void DumpConstraint (const Handle(TDataXtd_Constraint)& C, Standard_OStream& S); - - - -protected: - - - - - -private: - - - - -friend class DDataStd_DrawPresentation; -friend class DDataStd_DrawDriver; -friend class DDataStd_TreeBrowser; - }; - - - - - - #endif // _DDataStd_HeaderFile diff --git a/src/DDocStd/DDocStd.cxx b/src/DDocStd/DDocStd.cxx index 1de7275b99..d517dc716c 100644 --- a/src/DDocStd/DDocStd.cxx +++ b/src/DDocStd/DDocStd.cxx @@ -13,8 +13,9 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -#include #include + +#include #include #include #include diff --git a/src/DDocStd/DDocStd.hxx b/src/DDocStd/DDocStd.hxx index aed7cb9d07..b10d783136 100644 --- a/src/DDocStd/DDocStd.hxx +++ b/src/DDocStd/DDocStd.hxx @@ -85,26 +85,6 @@ public: //! ShapeSchema_Read Standard_EXPORT static void ShapeSchemaCommands(Draw_Interpretor& theCommands); - -protected: - - - - - -private: - - - - -friend class DDocStd_DrawDocument; - }; - - - - - - #endif // _DDocStd_HeaderFile diff --git a/src/DNaming/DNaming.cxx b/src/DNaming/DNaming.cxx index 63b66a71c4..bdfecc94b3 100644 --- a/src/DNaming/DNaming.cxx +++ b/src/DNaming/DNaming.cxx @@ -14,6 +14,7 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. +#include #include #include @@ -22,7 +23,6 @@ #include #include #include -#include #include #include #include diff --git a/src/DNaming/DNaming.hxx b/src/DNaming/DNaming.hxx index cb02766df0..2cf2f22fac 100644 --- a/src/DNaming/DNaming.hxx +++ b/src/DNaming/DNaming.hxx @@ -118,38 +118,6 @@ public: //! commands for testing Naming Standard_EXPORT static void ModelingCommands (Draw_Interpretor& DI); - - - -protected: - - - - - -private: - - - - -friend class DNaming_BoxDriver; -friend class DNaming_CylinderDriver; -friend class DNaming_SphereDriver; -friend class DNaming_SelectionDriver; -friend class DNaming_BooleanOperationDriver; -friend class DNaming_FilletDriver; -friend class DNaming_TransformationDriver; -friend class DNaming_PrismDriver; -friend class DNaming_RevolutionDriver; -friend class DNaming_PointDriver; -friend class DNaming_Line3DDriver; - }; - - - - - - #endif // _DNaming_HeaderFile diff --git a/src/Draft/Draft.cxx b/src/Draft/Draft.cxx index 9f8bf522ae..512a4dd4c8 100644 --- a/src/Draft/Draft.cxx +++ b/src/Draft/Draft.cxx @@ -14,10 +14,10 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. +#include #include #include -#include #include #include #include diff --git a/src/Draft/Draft.hxx b/src/Draft/Draft.hxx index daf5279317..b18dbc7a0f 100644 --- a/src/Draft/Draft.hxx +++ b/src/Draft/Draft.hxx @@ -43,31 +43,6 @@ public: //! Otherwise, the exception DomainError is raised. Standard_EXPORT static Standard_Real Angle (const TopoDS_Face& F, const gp_Dir& Direction); - - - -protected: - - - - - -private: - - - - -friend class Draft_Modification; -friend class Draft_FaceInfo; -friend class Draft_EdgeInfo; -friend class Draft_VertexInfo; - }; - - - - - - #endif // _Draft_HeaderFile diff --git a/src/DrawDim/DrawDim.cxx b/src/DrawDim/DrawDim.cxx index 2100a354d9..2a426a3595 100644 --- a/src/DrawDim/DrawDim.cxx +++ b/src/DrawDim/DrawDim.cxx @@ -14,12 +14,12 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. +#include #include #include #include #include -#include #include #include #include diff --git a/src/DrawDim/DrawDim.hxx b/src/DrawDim/DrawDim.hxx index 8c98265060..b4179db1a1 100644 --- a/src/DrawDim/DrawDim.hxx +++ b/src/DrawDim/DrawDim.hxx @@ -71,36 +71,6 @@ public: //! false if is not a planar face Standard_EXPORT static Standard_Boolean Pln (const TopoDS_Face& f, gp_Pln& p); - - - -protected: - - - - - -private: - - - - -friend class DrawDim_Dimension; -friend class DrawDim_Angle; -friend class DrawDim_Distance; -friend class DrawDim_Radius; -friend class DrawDim_PlanarDimension; -friend class DrawDim_PlanarAngle; -friend class DrawDim_PlanarDistance; -friend class DrawDim_PlanarRadius; -friend class DrawDim_PlanarDiameter; - }; - - - - - - #endif // _DrawDim_HeaderFile diff --git a/src/Expr/Expr.hxx b/src/Expr/Expr.hxx index 6b5eb68778..fddc2f94f2 100644 --- a/src/Expr/Expr.hxx +++ b/src/Expr/Expr.hxx @@ -47,78 +47,6 @@ public: Standard_EXPORT static Standard_Real Sign (const Standard_Real val); - - - -protected: - - - - - -private: - - - - -friend class Expr_GeneralExpression; -friend class Expr_NumericValue; -friend class Expr_NamedExpression; -friend class Expr_NamedConstant; -friend class Expr_NamedUnknown; -friend class Expr_UnaryExpression; -friend class Expr_Absolute; -friend class Expr_ArcCosine; -friend class Expr_ArcSine; -friend class Expr_ArcTangent; -friend class Expr_ArgCosh; -friend class Expr_ArgSinh; -friend class Expr_ArgTanh; -friend class Expr_Cosh; -friend class Expr_Cosine; -friend class Expr_Exponential; -friend class Expr_LogOf10; -friend class Expr_LogOfe; -friend class Expr_Sign; -friend class Expr_Sine; -friend class Expr_Sinh; -friend class Expr_Square; -friend class Expr_SquareRoot; -friend class Expr_Tangent; -friend class Expr_Tanh; -friend class Expr_UnaryFunction; -friend class Expr_UnaryMinus; -friend class Expr_BinaryExpression; -friend class Expr_BinaryFunction; -friend class Expr_Difference; -friend class Expr_Division; -friend class Expr_Exponentiate; -friend class Expr_PolyExpression; -friend class Expr_PolyFunction; -friend class Expr_Product; -friend class Expr_Sum; -friend class Expr_UnknownIterator; -friend class Expr_GeneralRelation; -friend class Expr_SingleRelation; -friend class Expr_Different; -friend class Expr_Equal; -friend class Expr_GreaterThan; -friend class Expr_GreaterThanOrEqual; -friend class Expr_LessThan; -friend class Expr_LessThanOrEqual; -friend class Expr_SystemRelation; -friend class Expr_RelationIterator; -friend class Expr_RUIterator; -friend class Expr_GeneralFunction; -friend class Expr_NamedFunction; -friend class Expr_FunctionDerivative; - }; - - - - - - #endif // _Expr_HeaderFile diff --git a/src/ExprIntrp/ExprIntrp.hxx b/src/ExprIntrp/ExprIntrp.hxx index f5244142f7..f3dda9e19c 100644 --- a/src/ExprIntrp/ExprIntrp.hxx +++ b/src/ExprIntrp/ExprIntrp.hxx @@ -35,35 +35,16 @@ public: DEFINE_STANDARD_ALLOC - - - - -protected: - - - - - private: - Standard_EXPORT static Standard_Boolean Parse (const Handle(ExprIntrp_Generator)& gen, const TCollection_AsciiString& str); +private: - -friend class ExprIntrp_Generator; -friend class ExprIntrp_GenExp; -friend class ExprIntrp_GenFct; -friend class ExprIntrp_GenRel; -friend class ExprIntrp_Analysis; + friend class ExprIntrp_GenExp; + friend class ExprIntrp_GenFct; + friend class ExprIntrp_GenRel; }; - - - - - - #endif // _ExprIntrp_HeaderFile diff --git a/src/GProp/GProp.cxx b/src/GProp/GProp.cxx index 3dc2cf854e..29869b049b 100644 --- a/src/GProp/GProp.cxx +++ b/src/GProp/GProp.cxx @@ -12,12 +12,12 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. +#include #include #include #include #include -#include #include void GProp::HOperator ( diff --git a/src/GProp/GProp.hxx b/src/GProp/GProp.hxx index d3f62243bd..be5f97656f 100644 --- a/src/GProp/GProp.hxx +++ b/src/GProp/GProp.hxx @@ -64,34 +64,6 @@ public: //! the function MatrixOfInertia on any GProp_GProps object. Standard_EXPORT static void HOperator (const gp_Pnt& G, const gp_Pnt& Q, const Standard_Real Mass, gp_Mat& Operator); - - - -protected: - - - - - -private: - - - - -friend class GProp_GProps; -friend class GProp_PGProps; -friend class GProp_CelGProps; -friend class GProp_SelGProps; -friend class GProp_VelGProps; -friend class GProp_PrincipalProps; -friend class GProp_PEquation; - }; - - - - - - #endif // _GProp_HeaderFile diff --git a/src/GccEnt/GccEnt.hxx b/src/GccEnt/GccEnt.hxx index 8e8e574d99..3c9084a684 100644 --- a/src/GccEnt/GccEnt.hxx +++ b/src/GccEnt/GccEnt.hxx @@ -124,29 +124,6 @@ public: //! or line are external to one another. Standard_EXPORT static GccEnt_QualifiedCirc Outside (const gp_Circ2d& Obj); - - - -protected: - - - - - -private: - - - - -friend class GccEnt_QualifiedLin; -friend class GccEnt_QualifiedCirc; - }; - - - - - - #endif // _GccEnt_HeaderFile diff --git a/src/Geom2dConvert/Geom2dConvert.cxx b/src/Geom2dConvert/Geom2dConvert.cxx index 59894043c3..e796882e15 100644 --- a/src/Geom2dConvert/Geom2dConvert.cxx +++ b/src/Geom2dConvert/Geom2dConvert.cxx @@ -12,8 +12,7 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -//Jean-Claude Vauthier Novembre 1991 -//Passage sur C1 Aout 1992 et ajout transformation Bezier->BSpline +#include #include #include @@ -33,7 +32,6 @@ #include #include #include -#include #include #include #include diff --git a/src/Geom2dConvert/Geom2dConvert.hxx b/src/Geom2dConvert/Geom2dConvert.hxx index 3141832898..f6450ef3ae 100644 --- a/src/Geom2dConvert/Geom2dConvert.hxx +++ b/src/Geom2dConvert/Geom2dConvert.hxx @@ -254,31 +254,6 @@ public: const Standard_Real AngularTolerance, const Standard_Real Tolerance); - - - -protected: - - - - - -private: - - - - -friend class Geom2dConvert_BSplineCurveKnotSplitting; -friend class Geom2dConvert_BSplineCurveToBezierCurve; -friend class Geom2dConvert_CompCurveToBSplineCurve; -friend class Geom2dConvert_ApproxCurve; - }; - - - - - - #endif // _Geom2dConvert_HeaderFile diff --git a/src/Geom2dGcc/Geom2dGcc.cxx b/src/Geom2dGcc/Geom2dGcc.cxx index 1ee4937814..38151e7e9f 100644 --- a/src/Geom2dGcc/Geom2dGcc.cxx +++ b/src/Geom2dGcc/Geom2dGcc.cxx @@ -12,13 +12,9 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -//========================================================================= -// Methodes de package permettant de qualifier les objets. + -// + -//========================================================================= +#include #include -#include #include Geom2dGcc_QualifiedCurve diff --git a/src/Geom2dGcc/Geom2dGcc.hxx b/src/Geom2dGcc/Geom2dGcc.hxx index 3062f8df6b..4c994cca37 100644 --- a/src/Geom2dGcc/Geom2dGcc.hxx +++ b/src/Geom2dGcc/Geom2dGcc.hxx @@ -114,52 +114,6 @@ public: //! myQCurve = Geom2dGcc::Outside(Obj); Standard_EXPORT static Geom2dGcc_QualifiedCurve Outside (const Geom2dAdaptor_Curve& Obj); - - - -protected: - - - - - -private: - - - - -friend class Geom2dGcc_CurveTool; -friend class Geom2dGcc_QualifiedCurve; -friend class Geom2dGcc_Circ2d3Tan; -friend class Geom2dGcc_Circ2d2TanRad; -friend class Geom2dGcc_Circ2d2TanOn; -friend class Geom2dGcc_Circ2dTanOnRad; -friend class Geom2dGcc_Circ2dTanCen; -friend class Geom2dGcc_Lin2d2Tan; -friend class Geom2dGcc_Lin2dTanObl; -friend class Geom2dGcc_QCurve; -friend class Geom2dGcc_CurveToolGeo; -friend class Geom2dGcc_Circ2d2TanOnGeo; -friend class Geom2dGcc_Circ2d2TanRadGeo; -friend class Geom2dGcc_Circ2dTanCenGeo; -friend class Geom2dGcc_Circ2dTanOnRadGeo; -friend class Geom2dGcc_Circ2d3TanIter; -friend class Geom2dGcc_FunctionTanCuCuCu; -friend class Geom2dGcc_Circ2d2TanOnIter; -friend class Geom2dGcc_FunctionTanCuCuOnCu; -friend class Geom2dGcc_Lin2dTanOblIter; -friend class Geom2dGcc_FunctionTanObl; -friend class Geom2dGcc_Lin2d2TanIter; -friend class Geom2dGcc_FunctionTanCuCu; -friend class Geom2dGcc_FunctionTanCuPnt; -friend class Geom2dGcc_FunctionTanCirCu; - }; - - - - - - #endif // _Geom2dGcc_HeaderFile diff --git a/src/GeomAPI/GeomAPI.cxx b/src/GeomAPI/GeomAPI.cxx index 0a9c72be9f..8d97fc0e57 100644 --- a/src/GeomAPI/GeomAPI.cxx +++ b/src/GeomAPI/GeomAPI.cxx @@ -14,6 +14,7 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. +#include #include #include @@ -34,7 +35,6 @@ #include #include #include -#include #include #include #include diff --git a/src/GeomAPI/GeomAPI.hxx b/src/GeomAPI/GeomAPI.hxx index 341dce5e0a..c63455d2ab 100644 --- a/src/GeomAPI/GeomAPI.hxx +++ b/src/GeomAPI/GeomAPI.hxx @@ -89,37 +89,6 @@ public: //! The resulting 3D curve is of the same nature as that of the curve C. Standard_EXPORT static Handle(Geom_Curve) To3d (const Handle(Geom2d_Curve)& C, const gp_Pln& P); - - - -protected: - - - - - -private: - - - - -friend class GeomAPI_ProjectPointOnCurve; -friend class GeomAPI_ProjectPointOnSurf; -friend class GeomAPI_ExtremaCurveCurve; -friend class GeomAPI_ExtremaCurveSurface; -friend class GeomAPI_ExtremaSurfaceSurface; -friend class GeomAPI_PointsToBSpline; -friend class GeomAPI_PointsToBSplineSurface; -friend class GeomAPI_Interpolate; -friend class GeomAPI_IntSS; -friend class GeomAPI_IntCS; - }; - - - - - - #endif // _GeomAPI_HeaderFile diff --git a/src/GeomConvert/GeomConvert.cxx b/src/GeomConvert/GeomConvert.cxx index 386dff8ef9..c288f02b47 100644 --- a/src/GeomConvert/GeomConvert.cxx +++ b/src/GeomConvert/GeomConvert.cxx @@ -12,9 +12,7 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -// Jean-Claude Vauthier Novembre 1991 -// Passage sur C1 Aout 1992 et ajout transformation Bezier->BSpline + Debug -// Modif JCV correction bug le 2/08/1993 +#include #include #include @@ -38,7 +36,6 @@ #include #include #include -#include #include #include #include diff --git a/src/GeomConvert/GeomConvert.hxx b/src/GeomConvert/GeomConvert.hxx index b0bc0ea726..be3623c2f6 100644 --- a/src/GeomConvert/GeomConvert.hxx +++ b/src/GeomConvert/GeomConvert.hxx @@ -371,35 +371,6 @@ public: const Standard_Real AngularTolerance, const Standard_Real tolerance); - - - -protected: - - - - - -private: - - - - -friend class GeomConvert_BSplineCurveKnotSplitting; -friend class GeomConvert_BSplineSurfaceKnotSplitting; -friend class GeomConvert_BSplineCurveToBezierCurve; -friend class GeomConvert_CompCurveToBSplineCurve; -friend class GeomConvert_BSplineSurfaceToBezierSurface; -friend class GeomConvert_CompBezierSurfacesToBSplineSurface; -friend class GeomConvert_ApproxSurface; -friend class GeomConvert_ApproxCurve; - }; - - - - - - #endif // _GeomConvert_HeaderFile diff --git a/src/GeomConvert/GeomConvert_1.cxx b/src/GeomConvert/GeomConvert_1.cxx index 0f619b5534..ec702460b2 100644 --- a/src/GeomConvert/GeomConvert_1.cxx +++ b/src/GeomConvert/GeomConvert_1.cxx @@ -12,9 +12,7 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -//Jean-Claude Vauthier Novembre 1991 -//Passage sur C1 Aout 1992 et ajout transformation Bezier->BSpline -//Modif JCV correction bug le 02/08/1993 +#include #include #include @@ -39,7 +37,6 @@ #include #include #include -#include #include #include #include diff --git a/src/GeomFill/GeomFill.cxx b/src/GeomFill/GeomFill.cxx index d4c9b7a46f..cd0f04fa9f 100644 --- a/src/GeomFill/GeomFill.cxx +++ b/src/GeomFill/GeomFill.cxx @@ -14,6 +14,7 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. +#include #include #include @@ -26,7 +27,6 @@ #include #include #include -#include #include #include #include diff --git a/src/GeomFill/GeomFill.hxx b/src/GeomFill/GeomFill.hxx index d0d7bd4836..f55d0c36c6 100644 --- a/src/GeomFill/GeomFill.hxx +++ b/src/GeomFill/GeomFill.hxx @@ -65,81 +65,6 @@ public: //! Tolerance for approximation Standard_EXPORT static Standard_Real GetTolerance (const Convert_ParameterisationType TConv, const Standard_Real AngleMin, const Standard_Real Radius, const Standard_Real AngularTol, const Standard_Real SpatialTol); - - - -protected: - - - - - -private: - - - - -friend class GeomFill_Filling; -friend class GeomFill_Stretch; -friend class GeomFill_Coons; -friend class GeomFill_Curved; -friend class GeomFill_BezierCurves; -friend class GeomFill_BSplineCurves; -friend class GeomFill_Profiler; -friend class GeomFill_SectionGenerator; -friend class GeomFill_Line; -friend class GeomFill_AppSurf; -friend class GeomFill_SweepSectionGenerator; -friend class GeomFill_AppSweep; -friend class GeomFill_Generator; -friend class GeomFill_Pipe; -friend class GeomFill_Tensor; -friend class GeomFill_ConstrainedFilling; -friend class GeomFill_Boundary; -friend class GeomFill_DegeneratedBound; -friend class GeomFill_SimpleBound; -friend class GeomFill_BoundWithSurf; -friend class GeomFill_CoonsAlgPatch; -friend class GeomFill_TgtField; -friend class GeomFill_TgtOnCoons; -friend class GeomFill_CornerState; -friend class GeomFill_CircularBlendFunc; -friend class GeomFill_SweepFunction; -friend class GeomFill_LocFunction; -friend class GeomFill_PolynomialConvertor; -friend class GeomFill_QuasiAngularConvertor; -friend class GeomFill_SnglrFunc; -friend class GeomFill_FunctionDraft; -friend class GeomFill_PlanFunc; -friend class GeomFill_FunctionGuide; -friend class GeomFill_SectionLaw; -friend class GeomFill_UniformSection; -friend class GeomFill_EvolvedSection; -friend class GeomFill_NSections; -friend class GeomFill_LocationLaw; -friend class GeomFill_CurveAndTrihedron; -friend class GeomFill_LocationDraft; -friend class GeomFill_LocationGuide; -friend class GeomFill_TrihedronLaw; -friend class GeomFill_Fixed; -friend class GeomFill_Frenet; -friend class GeomFill_CorrectedFrenet; -friend class GeomFill_DiscreteTrihedron; -friend class GeomFill_ConstantBiNormal; -friend class GeomFill_Darboux; -friend class GeomFill_DraftTrihedron; -friend class GeomFill_TrihedronWithGuide; -friend class GeomFill_GuideTrihedronAC; -friend class GeomFill_GuideTrihedronPlan; -friend class GeomFill_Sweep; -friend class GeomFill_SectionPlacement; - }; - - - - - - #endif // _GeomFill_HeaderFile diff --git a/src/GeomInt/GeomInt.hxx b/src/GeomInt/GeomInt.hxx index d8654d3884..9bb26355b5 100644 --- a/src/GeomInt/GeomInt.hxx +++ b/src/GeomInt/GeomInt.hxx @@ -37,55 +37,6 @@ public: //! Adjusts the parameter to the range [theParMin, theParMax] Standard_EXPORT static Standard_Boolean AdjustPeriodic (const Standard_Real thePar, const Standard_Real theParMin, const Standard_Real theParMax, const Standard_Real thePeriod, Standard_Real& theNewPar, Standard_Real& theOffset, const Standard_Real theEps = 0.0); - - - -protected: - - - - - -private: - - - - -friend class GeomInt_IntSS; -friend class GeomInt_LineConstructor; -friend class GeomInt_LineTool; -friend class GeomInt_WLApprox; -friend class GeomInt_ParameterAndOrientation; -friend class GeomInt_TheFunctionOfTheInt2SOfThePrmPrmSvSurfacesOfWLApprox; -friend class GeomInt_TheInt2SOfThePrmPrmSvSurfacesOfWLApprox; -friend class GeomInt_ThePrmPrmSvSurfacesOfWLApprox; -friend class GeomInt_TheZerImpFuncOfTheImpPrmSvSurfacesOfWLApprox; -friend class GeomInt_TheImpPrmSvSurfacesOfWLApprox; -friend class GeomInt_TheMultiLineOfWLApprox; -friend class GeomInt_TheMultiLineToolOfWLApprox; -friend class GeomInt_BSpParLeastSquareOfMyBSplGradientOfTheComputeLineOfWLApprox; -friend class GeomInt_BSpParFunctionOfMyBSplGradientOfTheComputeLineOfWLApprox; -friend class GeomInt_BSpGradient_BFGSOfMyBSplGradientOfTheComputeLineOfWLApprox; -friend class GeomInt_MyBSplGradientOfTheComputeLineOfWLApprox; -friend class GeomInt_ParLeastSquareOfMyGradientbisOfTheComputeLineOfWLApprox; -friend class GeomInt_ResConstraintOfMyGradientbisOfTheComputeLineOfWLApprox; -friend class GeomInt_ParFunctionOfMyGradientbisOfTheComputeLineOfWLApprox; -friend class GeomInt_Gradient_BFGSOfMyGradientbisOfTheComputeLineOfWLApprox; -friend class GeomInt_MyGradientbisOfTheComputeLineOfWLApprox; -friend class GeomInt_TheComputeLineOfWLApprox; -friend class GeomInt_ParLeastSquareOfMyGradientOfTheComputeLineBezierOfWLApprox; -friend class GeomInt_ResConstraintOfMyGradientOfTheComputeLineBezierOfWLApprox; -friend class GeomInt_ParFunctionOfMyGradientOfTheComputeLineBezierOfWLApprox; -friend class GeomInt_Gradient_BFGSOfMyGradientOfTheComputeLineBezierOfWLApprox; -friend class GeomInt_MyGradientOfTheComputeLineBezierOfWLApprox; -friend class GeomInt_TheComputeLineBezierOfWLApprox; - }; - - - - - - #endif // _GeomInt_HeaderFile diff --git a/src/GeomLProp/GeomLProp.cxx b/src/GeomLProp/GeomLProp.cxx index 2a4157674f..3d48a5ae7d 100644 --- a/src/GeomLProp/GeomLProp.cxx +++ b/src/GeomLProp/GeomLProp.cxx @@ -14,12 +14,12 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. +#include #include #include #include #include -#include #include #include #include diff --git a/src/GeomLProp/GeomLProp.hxx b/src/GeomLProp/GeomLProp.hxx index aa1e1d3147..19279e329b 100644 --- a/src/GeomLProp/GeomLProp.hxx +++ b/src/GeomLProp/GeomLProp.hxx @@ -49,31 +49,6 @@ public: //! tolerances from package Precision. Standard_EXPORT static GeomAbs_Shape Continuity (const Handle(Geom_Curve)& C1, const Handle(Geom_Curve)& C2, const Standard_Real u1, const Standard_Real u2, const Standard_Boolean r1, const Standard_Boolean r2); - - - -protected: - - - - - -private: - - - - -friend class GeomLProp_CurveTool; -friend class GeomLProp_SurfaceTool; -friend class GeomLProp_CLProps; -friend class GeomLProp_SLProps; - }; - - - - - - #endif // _GeomLProp_HeaderFile diff --git a/src/GeomLib/GeomLib.hxx b/src/GeomLib/GeomLib.hxx index e14506695f..97c3ee446e 100644 --- a/src/GeomLib/GeomLib.hxx +++ b/src/GeomLib/GeomLib.hxx @@ -249,30 +249,6 @@ public: const Standard_Real theParam, const Standard_Boolean theIsForward); -protected: - - -private: - - - - -friend class GeomLib_MakeCurvefromApprox; -friend class GeomLib_Interpolate; -friend class GeomLib_DenominatorMultiplier; -friend class GeomLib_CheckBSplineCurve; -friend class GeomLib_Check2dBSplineCurve; -friend class GeomLib_IsPlanarSurface; -friend class GeomLib_Tool; -friend class GeomLib_PolyFunc; -friend class GeomLib_LogSample; - }; - - - - - - #endif // _GeomLib_HeaderFile diff --git a/src/GeomTools/GeomTools.cxx b/src/GeomTools/GeomTools.cxx index a488cd7500..01215f875e 100644 --- a/src/GeomTools/GeomTools.cxx +++ b/src/GeomTools/GeomTools.cxx @@ -14,11 +14,11 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. +#include #include #include #include -#include #include #include #include diff --git a/src/GeomTools/GeomTools.hxx b/src/GeomTools/GeomTools.hxx index 1acc4b41ec..dd08849a15 100644 --- a/src/GeomTools/GeomTools.hxx +++ b/src/GeomTools/GeomTools.hxx @@ -79,31 +79,6 @@ public: //! in case of error Standard_EXPORT static void GetReal (Standard_IStream& IS, Standard_Real& theValue); - - - -protected: - - - - - -private: - - - - -friend class GeomTools_UndefinedTypeHandler; -friend class GeomTools_SurfaceSet; -friend class GeomTools_CurveSet; -friend class GeomTools_Curve2dSet; - }; - - - - - - #endif // _GeomTools_HeaderFile diff --git a/src/HLRBRep/HLRBRep.cxx b/src/HLRBRep/HLRBRep.cxx index bf0ab798d7..6f5fc6356d 100644 --- a/src/HLRBRep/HLRBRep.cxx +++ b/src/HLRBRep/HLRBRep.cxx @@ -14,6 +14,7 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. +#include #include #include @@ -23,7 +24,6 @@ #include #include #include -#include #include #include #include diff --git a/src/HLRBRep/HLRBRep.hxx b/src/HLRBRep/HLRBRep.hxx index 1c3473f32a..a177c36c4a 100644 --- a/src/HLRBRep/HLRBRep.hxx +++ b/src/HLRBRep/HLRBRep.hxx @@ -44,82 +44,6 @@ public: Standard_EXPORT static void PolyHLRAngleAndDeflection (const Standard_Real InAngl, Standard_Real& OutAngl, Standard_Real& OutDefl); - - - -protected: - - - - - -private: - - - - -friend class HLRBRep_CurveTool; -friend class HLRBRep_BCurveTool; -friend class HLRBRep_Curve; -friend class HLRBRep_SurfaceTool; -friend class HLRBRep_BSurfaceTool; -friend class HLRBRep_Surface; -friend class HLRBRep_CLPropsATool; -friend class HLRBRep_CLProps; -friend class HLRBRep_SLPropsATool; -friend class HLRBRep_SLProps; -friend class HLRBRep_CInter; -friend class HLRBRep_LineTool; -friend class HLRBRep_InterCSurf; -friend class HLRBRep_EdgeFaceTool; -friend class HLRBRep_Intersector; -friend class HLRBRep_EdgeData; -friend class HLRBRep_FaceData; -friend class HLRBRep_FaceIterator; -friend class HLRBRep_Data; -friend class HLRBRep_ShapeToHLR; -friend class HLRBRep_HLRToShape; -friend class HLRBRep_ShapeBounds; -friend class HLRBRep_EdgeInterferenceTool; -friend class HLRBRep_VertexList; -friend class HLRBRep_EdgeIList; -friend class HLRBRep_AreaLimit; -friend class HLRBRep_EdgeBuilder; -friend class HLRBRep_Hider; -friend class HLRBRep_InternalAlgo; -friend class HLRBRep_Algo; -friend class HLRBRep_PolyAlgo; -friend class HLRBRep_BiPoint; -friend class HLRBRep_BiPnt2D; -friend class HLRBRep_PolyHLRToShape; -friend class HLRBRep_TheCurveLocatorOfTheProjPCurOfCInter; -friend class HLRBRep_PCLocFOfTheLocateExtPCOfTheProjPCurOfCInter; -friend class HLRBRep_TheLocateExtPCOfTheProjPCurOfCInter; -friend class HLRBRep_TheProjPCurOfCInter; -friend class HLRBRep_MyImpParToolOfTheIntersectorOfTheIntConicCurveOfCInter; -friend class HLRBRep_TheIntersectorOfTheIntConicCurveOfCInter; -friend class HLRBRep_TheIntConicCurveOfCInter; -friend class HLRBRep_IntConicCurveOfCInter; -friend class HLRBRep_ThePolygon2dOfTheIntPCurvePCurveOfCInter; -friend class HLRBRep_TheDistBetweenPCurvesOfTheIntPCurvePCurveOfCInter; -friend class HLRBRep_ExactIntersectionPointOfTheIntPCurvePCurveOfCInter; -friend class HLRBRep_TheIntPCurvePCurveOfCInter; -friend class HLRBRep_ThePolygonOfInterCSurf; -friend class HLRBRep_ThePolygonToolOfInterCSurf; -friend class HLRBRep_ThePolyhedronOfInterCSurf; -friend class HLRBRep_ThePolyhedronToolOfInterCSurf; -friend class HLRBRep_TheInterferenceOfInterCSurf; -friend class HLRBRep_TheCSFunctionOfInterCSurf; -friend class HLRBRep_TheExactInterCSurf; -friend class HLRBRep_TheQuadCurvFuncOfTheQuadCurvExactInterCSurf; -friend class HLRBRep_TheQuadCurvExactInterCSurf; - }; - - - - - - #endif // _HLRBRep_HeaderFile diff --git a/src/HLRTest/HLRTest.cxx b/src/HLRTest/HLRTest.cxx index 1d10e90b5f..f44e722cc5 100644 --- a/src/HLRTest/HLRTest.cxx +++ b/src/HLRTest/HLRTest.cxx @@ -14,6 +14,7 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. +#include #include #include @@ -23,7 +24,6 @@ #include #include #include -#include #include #include #include diff --git a/src/HLRTest/HLRTest.hxx b/src/HLRTest/HLRTest.hxx index b12bdcd865..030ec0a670 100644 --- a/src/HLRTest/HLRTest.hxx +++ b/src/HLRTest/HLRTest.hxx @@ -57,32 +57,6 @@ public: //! Defines commands to test the Hidden Line Removal Standard_EXPORT static void Commands (Draw_Interpretor& I); - - - -protected: - - - - - -private: - - - - -friend class HLRTest_ShapeData; -friend class HLRTest_DrawableEdgeTool; -friend class HLRTest_DrawablePolyEdgeTool; -friend class HLRTest_Projector; -friend class HLRTest_OutLiner; - }; - - - - - - #endif // _HLRTest_HeaderFile diff --git a/src/HeaderSection/HeaderSection.hxx b/src/HeaderSection/HeaderSection.hxx index 2fbf112d7c..a113cec9d1 100644 --- a/src/HeaderSection/HeaderSection.hxx +++ b/src/HeaderSection/HeaderSection.hxx @@ -35,32 +35,6 @@ public: //! creates a Protocol Standard_EXPORT static Handle(HeaderSection_Protocol) Protocol(); - - - -protected: - - - - - -private: - - - - -friend class HeaderSection_Protocol; -friend class HeaderSection_FileName; -friend class HeaderSection_FileDescription; -friend class HeaderSection_FileSchema; -friend class HeaderSection_HeaderRecognizer; - }; - - - - - - #endif // _HeaderSection_HeaderFile diff --git a/src/IFSelect/IFSelect.hxx b/src/IFSelect/IFSelect.hxx index 3bdcf76690..2d88cfbae3 100644 --- a/src/IFSelect/IFSelect.hxx +++ b/src/IFSelect/IFSelect.hxx @@ -56,105 +56,6 @@ public: //! to be used (this avoids to export the class SessionFile). Standard_EXPORT static Standard_Boolean RestoreSession (const Handle(IFSelect_WorkSession)& WS, const Standard_CString file); - - - -protected: - - - - - -private: - - - - -friend class IFSelect_Signature; -friend class IFSelect_SignMultiple; -friend class IFSelect_SignType; -friend class IFSelect_SignCategory; -friend class IFSelect_SignValidity; -friend class IFSelect_SignAncestor; -friend class IFSelect_ShareOut; -friend class IFSelect_AppliedModifiers; -friend class IFSelect_ShareOutResult; -friend class IFSelect_PacketList; -friend class IFSelect_Dispatch; -friend class IFSelect_DispGlobal; -friend class IFSelect_DispPerOne; -friend class IFSelect_DispPerCount; -friend class IFSelect_DispPerSignature; -friend class IFSelect_DispPerFiles; -friend class IFSelect_SelectionIterator; -friend class IFSelect_Selection; -friend class IFSelect_SelectBase; -friend class IFSelect_SelectModelRoots; -friend class IFSelect_SelectModelEntities; -friend class IFSelect_SelectEntityNumber; -friend class IFSelect_SelectPointed; -friend class IFSelect_SelectCombine; -friend class IFSelect_SelectUnion; -friend class IFSelect_SelectIntersection; -friend class IFSelect_SelectControl; -friend class IFSelect_SelectDiff; -friend class IFSelect_SelectDeduct; -friend class IFSelect_SelectShared; -friend class IFSelect_SelectSharing; -friend class IFSelect_SelectAnyList; -friend class IFSelect_SelectInList; -friend class IFSelect_SelectSuite; -friend class IFSelect_SelectExtract; -friend class IFSelect_SelectUnknownEntities; -friend class IFSelect_SelectErrorEntities; -friend class IFSelect_SelectIncorrectEntities; -friend class IFSelect_SelectRoots; -friend class IFSelect_SelectRootComps; -friend class IFSelect_SelectRange; -friend class IFSelect_SelectAnyType; -friend class IFSelect_SelectType; -friend class IFSelect_SelectSignature; -friend class IFSelect_SelectFlag; -friend class IFSelect_SelectSent; -friend class IFSelect_SelectExplore; -friend class IFSelect_SelectSignedShared; -friend class IFSelect_SelectSignedSharing; -friend class IFSelect_IntParam; -friend class IFSelect_SignatureList; -friend class IFSelect_CheckCounter; -friend class IFSelect_SignCounter; -friend class IFSelect_GraphCounter; -friend class IFSelect_Editor; -friend class IFSelect_ParamEditor; -friend class IFSelect_EditForm; -friend class IFSelect_ListEditor; -friend class IFSelect_ContextModif; -friend class IFSelect_ContextWrite; -friend class IFSelect_Transformer; -friend class IFSelect_TransformStandard; -friend class IFSelect_ModelCopier; -friend class IFSelect_GeneralModifier; -friend class IFSelect_Modifier; -friend class IFSelect_ModifReorder; -friend class IFSelect_ModifEditForm; -friend class IFSelect_FileModifier; -friend class IFSelect_ModelModifier; -friend class IFSelect_WorkSession; -friend class IFSelect_WorkLibrary; -friend class IFSelect_SessionFile; -friend class IFSelect_SessionDumper; -friend class IFSelect_BasicDumper; -friend class IFSelect_Activator; -friend class IFSelect_SessionPilot; -friend class IFSelect_Act; -friend class IFSelect_Functions; - }; - - - - - - #endif // _IFSelect_HeaderFile diff --git a/src/IGESAppli/IGESAppli.hxx b/src/IGESAppli/IGESAppli.hxx index a908a0b797..ede062db7d 100644 --- a/src/IGESAppli/IGESAppli.hxx +++ b/src/IGESAppli/IGESAppli.hxx @@ -39,69 +39,6 @@ public: //! Returns the Protocol for this Package Standard_EXPORT static Handle(IGESAppli_Protocol) Protocol(); - - - -protected: - - - - - -private: - - - - -friend class IGESAppli_Node; -friend class IGESAppli_FiniteElement; -friend class IGESAppli_NodalDisplAndRot; -friend class IGESAppli_NodalResults; -friend class IGESAppli_ElementResults; -friend class IGESAppli_Flow; -friend class IGESAppli_PipingFlow; -friend class IGESAppli_RegionRestriction; -friend class IGESAppli_LevelFunction; -friend class IGESAppli_LineWidening; -friend class IGESAppli_DrilledHole; -friend class IGESAppli_ReferenceDesignator; -friend class IGESAppli_PinNumber; -friend class IGESAppli_PartNumber; -friend class IGESAppli_FlowLineSpec; -friend class IGESAppli_LevelToPWBLayerMap; -friend class IGESAppli_PWBArtworkStackup; -friend class IGESAppli_PWBDrilledHole; -friend class IGESAppli_NodalConstraint; -friend class IGESAppli_ToolNode; -friend class IGESAppli_ToolFiniteElement; -friend class IGESAppli_ToolNodalDisplAndRot; -friend class IGESAppli_ToolNodalResults; -friend class IGESAppli_ToolElementResults; -friend class IGESAppli_ToolFlow; -friend class IGESAppli_ToolPipingFlow; -friend class IGESAppli_ToolRegionRestriction; -friend class IGESAppli_ToolLevelFunction; -friend class IGESAppli_ToolLineWidening; -friend class IGESAppli_ToolDrilledHole; -friend class IGESAppli_ToolReferenceDesignator; -friend class IGESAppli_ToolPinNumber; -friend class IGESAppli_ToolPartNumber; -friend class IGESAppli_ToolFlowLineSpec; -friend class IGESAppli_ToolLevelToPWBLayerMap; -friend class IGESAppli_ToolPWBArtworkStackup; -friend class IGESAppli_ToolPWBDrilledHole; -friend class IGESAppli_ToolNodalConstraint; -friend class IGESAppli_Protocol; -friend class IGESAppli_ReadWriteModule; -friend class IGESAppli_GeneralModule; -friend class IGESAppli_SpecificModule; - }; - - - - - - #endif // _IGESAppli_HeaderFile diff --git a/src/IGESBasic/IGESBasic.hxx b/src/IGESBasic/IGESBasic.hxx index b510441f10..f3cc50f1f1 100644 --- a/src/IGESBasic/IGESBasic.hxx +++ b/src/IGESBasic/IGESBasic.hxx @@ -38,68 +38,6 @@ public: //! Returns the Protocol for this Package Standard_EXPORT static Handle(IGESBasic_Protocol) Protocol(); - - - -protected: - - - - - -private: - - - - -friend class IGESBasic_SubfigureDef; -friend class IGESBasic_Group; -friend class IGESBasic_GroupWithoutBackP; -friend class IGESBasic_SingleParent; -friend class IGESBasic_ExternalRefFileIndex; -friend class IGESBasic_OrderedGroup; -friend class IGESBasic_OrderedGroupWithoutBackP; -friend class IGESBasic_Hierarchy; -friend class IGESBasic_ExternalReferenceFile; -friend class IGESBasic_Name; -friend class IGESBasic_AssocGroupType; -friend class IGESBasic_SingularSubfigure; -friend class IGESBasic_ExternalRefFileName; -friend class IGESBasic_ExternalRefFile; -friend class IGESBasic_ExternalRefName; -friend class IGESBasic_ExternalRefLibName; -friend class IGESBasic_ToolSubfigureDef; -friend class IGESBasic_ToolGroup; -friend class IGESBasic_ToolGroupWithoutBackP; -friend class IGESBasic_ToolSingleParent; -friend class IGESBasic_ToolExternalRefFileIndex; -friend class IGESBasic_ToolOrderedGroup; -friend class IGESBasic_ToolOrderedGroupWithoutBackP; -friend class IGESBasic_ToolHierarchy; -friend class IGESBasic_ToolExternalReferenceFile; -friend class IGESBasic_ToolName; -friend class IGESBasic_ToolAssocGroupType; -friend class IGESBasic_ToolSingularSubfigure; -friend class IGESBasic_ToolExternalRefFileName; -friend class IGESBasic_ToolExternalRefFile; -friend class IGESBasic_ToolExternalRefName; -friend class IGESBasic_ToolExternalRefLibName; -friend class IGESBasic_Protocol; -friend class IGESBasic_ReadWriteModule; -friend class IGESBasic_GeneralModule; -friend class IGESBasic_SpecificModule; -friend class IGESBasic_HArray1OfHArray1OfInteger; -friend class IGESBasic_HArray1OfHArray1OfReal; -friend class IGESBasic_HArray1OfHArray1OfXY; -friend class IGESBasic_HArray1OfHArray1OfXYZ; -friend class IGESBasic_HArray1OfHArray1OfIGESEntity; - }; - - - - - - #endif // _IGESBasic_HeaderFile diff --git a/src/IGESCAFControl/IGESCAFControl.hxx b/src/IGESCAFControl/IGESCAFControl.hxx index a4f2ba1537..8641ed15a3 100644 --- a/src/IGESCAFControl/IGESCAFControl.hxx +++ b/src/IGESCAFControl/IGESCAFControl.hxx @@ -41,29 +41,6 @@ public: //! If no corresponding color defined in IGES, returns 0 Standard_EXPORT static Standard_Integer EncodeColor (const Quantity_Color& col); - - - -protected: - - - - - -private: - - - - -friend class IGESCAFControl_Reader; -friend class IGESCAFControl_Writer; - }; - - - - - - #endif // _IGESCAFControl_HeaderFile diff --git a/src/IGESConvGeom/IGESConvGeom.cxx b/src/IGESConvGeom/IGESConvGeom.cxx index 09fd548996..5b6cae001f 100644 --- a/src/IGESConvGeom/IGESConvGeom.cxx +++ b/src/IGESConvGeom/IGESConvGeom.cxx @@ -14,11 +14,7 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -// modif du 31/01/97 : mjm -// on commence par les SplineCurves. -// modif du 17/03/97 : mjm -// SplineSurfaces. -//%13 pdn 12.02.99: USA60293 avoid applying transformation twice +#include #include #include @@ -28,7 +24,6 @@ #include #include #include -#include #include #include #include diff --git a/src/IGESConvGeom/IGESConvGeom.hxx b/src/IGESConvGeom/IGESConvGeom.hxx index 1aaf695398..d29fd7c9e7 100644 --- a/src/IGESConvGeom/IGESConvGeom.hxx +++ b/src/IGESConvGeom/IGESConvGeom.hxx @@ -90,28 +90,6 @@ public: //! all the knots can be passed to C2, all knots which can be are. Standard_EXPORT static Standard_Integer IncreaseSurfaceContinuity (const Handle(Geom_BSplineSurface)& surface, const Standard_Real epsgeom, const Standard_Integer continuity = 2); - - - -protected: - - - - - -private: - - - - -friend class IGESConvGeom_GeomBuilder; - }; - - - - - - #endif // _IGESConvGeom_HeaderFile diff --git a/src/IGESData/IGESData.hxx b/src/IGESData/IGESData.hxx index a8bc86e407..257f5e12ae 100644 --- a/src/IGESData/IGESData.hxx +++ b/src/IGESData/IGESData.hxx @@ -39,66 +39,6 @@ public: //! Returns a Protocol from IGESData (avoids to create it) Standard_EXPORT static Handle(IGESData_Protocol) Protocol(); - - - -protected: - - - - - -private: - - - - -friend class IGESData_Protocol; -friend class IGESData_IGESModel; -friend class IGESData_IGESEntity; -friend class IGESData_LineFontEntity; -friend class IGESData_LevelListEntity; -friend class IGESData_TransfEntity; -friend class IGESData_ViewKindEntity; -friend class IGESData_LabelDisplayEntity; -friend class IGESData_ColorEntity; -friend class IGESData_NameEntity; -friend class IGESData_SingleParentEntity; -friend class IGESData_UndefinedEntity; -friend class IGESData_FreeFormatEntity; -friend class IGESData_GlobalSection; -friend class IGESData_DefSwitch; -friend class IGESData_DirChecker; -friend class IGESData_IGESReaderData; -friend class IGESData_IGESReaderTool; -friend class IGESData_ParamReader; -friend class IGESData_ParamCursor; -friend class IGESData_DirPart; -friend class IGESData_IGESType; -friend class IGESData_FileRecognizer; -friend class IGESData_IGESWriter; -friend class IGESData_IGESDumper; -friend class IGESData_BasicEditor; -friend class IGESData_ToolLocation; -friend class IGESData_GeneralModule; -friend class IGESData_DefaultGeneral; -friend class IGESData_ReadWriteModule; -friend class IGESData_SpecificModule; -friend class IGESData_DefaultSpecific; -friend class IGESData_FileProtocol; -friend class IGESData_WriterLib; -friend class IGESData_SpecificLib; -friend class IGESData_GlobalNodeOfWriterLib; -friend class IGESData_NodeOfWriterLib; -friend class IGESData_GlobalNodeOfSpecificLib; -friend class IGESData_NodeOfSpecificLib; - }; - - - - - - #endif // _IGESData_HeaderFile diff --git a/src/IGESDefs/IGESDefs.cxx b/src/IGESDefs/IGESDefs.cxx index f065366ea0..70642abeae 100644 --- a/src/IGESDefs/IGESDefs.cxx +++ b/src/IGESDefs/IGESDefs.cxx @@ -11,10 +11,10 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. +#include #include #include -#include #include #include #include diff --git a/src/IGESDefs/IGESDefs.hxx b/src/IGESDefs/IGESDefs.hxx index 1e648f9e0d..fa821bc7f8 100644 --- a/src/IGESDefs/IGESDefs.hxx +++ b/src/IGESDefs/IGESDefs.hxx @@ -39,46 +39,6 @@ public: //! Returns the Protocol for this Package Standard_EXPORT static Handle(IGESDefs_Protocol) Protocol(); - - - -protected: - - - - - -private: - - - - -friend class IGESDefs_AssociativityDef; -friend class IGESDefs_MacroDef; -friend class IGESDefs_UnitsData; -friend class IGESDefs_AttributeDef; -friend class IGESDefs_TabularData; -friend class IGESDefs_GenericData; -friend class IGESDefs_AttributeTable; -friend class IGESDefs_ToolAssociativityDef; -friend class IGESDefs_ToolMacroDef; -friend class IGESDefs_ToolUnitsData; -friend class IGESDefs_ToolAttributeDef; -friend class IGESDefs_ToolTabularData; -friend class IGESDefs_ToolGenericData; -friend class IGESDefs_ToolAttributeTable; -friend class IGESDefs_Protocol; -friend class IGESDefs_ReadWriteModule; -friend class IGESDefs_GeneralModule; -friend class IGESDefs_SpecificModule; -friend class IGESDefs_HArray1OfHArray1OfTextDisplayTemplate; - }; - - - - - - #endif // _IGESDefs_HeaderFile diff --git a/src/IGESDimen/IGESDimen.cxx b/src/IGESDimen/IGESDimen.cxx index 5227c96910..53531b0d02 100644 --- a/src/IGESDimen/IGESDimen.cxx +++ b/src/IGESDimen/IGESDimen.cxx @@ -11,10 +11,10 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. +#include #include #include -#include #include #include #include diff --git a/src/IGESDimen/IGESDimen.hxx b/src/IGESDimen/IGESDimen.hxx index 6dfc7787b1..663b090fcb 100644 --- a/src/IGESDimen/IGESDimen.hxx +++ b/src/IGESDimen/IGESDimen.hxx @@ -40,77 +40,6 @@ public: //! Returns the Protocol for this Package Standard_EXPORT static Handle(IGESDimen_Protocol) Protocol(); - - - -protected: - - - - - -private: - - - - -friend class IGESDimen_CenterLine; -friend class IGESDimen_Section; -friend class IGESDimen_WitnessLine; -friend class IGESDimen_AngularDimension; -friend class IGESDimen_CurveDimension; -friend class IGESDimen_DiameterDimension; -friend class IGESDimen_FlagNote; -friend class IGESDimen_GeneralLabel; -friend class IGESDimen_GeneralNote; -friend class IGESDimen_NewGeneralNote; -friend class IGESDimen_LeaderArrow; -friend class IGESDimen_LinearDimension; -friend class IGESDimen_OrdinateDimension; -friend class IGESDimen_PointDimension; -friend class IGESDimen_RadiusDimension; -friend class IGESDimen_GeneralSymbol; -friend class IGESDimen_SectionedArea; -friend class IGESDimen_DimensionedGeometry; -friend class IGESDimen_NewDimensionedGeometry; -friend class IGESDimen_DimensionUnits; -friend class IGESDimen_DimensionTolerance; -friend class IGESDimen_DimensionDisplayData; -friend class IGESDimen_BasicDimension; -friend class IGESDimen_ToolCenterLine; -friend class IGESDimen_ToolSection; -friend class IGESDimen_ToolWitnessLine; -friend class IGESDimen_ToolAngularDimension; -friend class IGESDimen_ToolCurveDimension; -friend class IGESDimen_ToolDiameterDimension; -friend class IGESDimen_ToolFlagNote; -friend class IGESDimen_ToolGeneralLabel; -friend class IGESDimen_ToolGeneralNote; -friend class IGESDimen_ToolNewGeneralNote; -friend class IGESDimen_ToolLeaderArrow; -friend class IGESDimen_ToolLinearDimension; -friend class IGESDimen_ToolOrdinateDimension; -friend class IGESDimen_ToolPointDimension; -friend class IGESDimen_ToolRadiusDimension; -friend class IGESDimen_ToolGeneralSymbol; -friend class IGESDimen_ToolSectionedArea; -friend class IGESDimen_ToolDimensionedGeometry; -friend class IGESDimen_ToolNewDimensionedGeometry; -friend class IGESDimen_ToolDimensionUnits; -friend class IGESDimen_ToolDimensionTolerance; -friend class IGESDimen_ToolDimensionDisplayData; -friend class IGESDimen_ToolBasicDimension; -friend class IGESDimen_Protocol; -friend class IGESDimen_ReadWriteModule; -friend class IGESDimen_GeneralModule; -friend class IGESDimen_SpecificModule; - }; - - - - - - #endif // _IGESDimen_HeaderFile diff --git a/src/IGESDraw/IGESDraw.cxx b/src/IGESDraw/IGESDraw.cxx index bc64534ece..da2f051a9f 100644 --- a/src/IGESDraw/IGESDraw.cxx +++ b/src/IGESDraw/IGESDraw.cxx @@ -11,11 +11,11 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. +#include #include #include #include -#include #include #include #include diff --git a/src/IGESDraw/IGESDraw.hxx b/src/IGESDraw/IGESDraw.hxx index 273a9763e9..d3f38b3df7 100644 --- a/src/IGESDraw/IGESDraw.hxx +++ b/src/IGESDraw/IGESDraw.hxx @@ -40,59 +40,6 @@ public: //! Returns the Protocol for this Package Standard_EXPORT static Handle(IGESDraw_Protocol) Protocol(); - - - -protected: - - - - - -private: - - - - -friend class IGESDraw_ConnectPoint; -friend class IGESDraw_NetworkSubfigureDef; -friend class IGESDraw_ViewsVisible; -friend class IGESDraw_ViewsVisibleWithAttr; -friend class IGESDraw_LabelDisplay; -friend class IGESDraw_Planar; -friend class IGESDraw_SegmentedViewsVisible; -friend class IGESDraw_Drawing; -friend class IGESDraw_DrawingWithRotation; -friend class IGESDraw_View; -friend class IGESDraw_RectArraySubfigure; -friend class IGESDraw_CircArraySubfigure; -friend class IGESDraw_NetworkSubfigure; -friend class IGESDraw_PerspectiveView; -friend class IGESDraw_ToolConnectPoint; -friend class IGESDraw_ToolNetworkSubfigureDef; -friend class IGESDraw_ToolViewsVisible; -friend class IGESDraw_ToolViewsVisibleWithAttr; -friend class IGESDraw_ToolLabelDisplay; -friend class IGESDraw_ToolPlanar; -friend class IGESDraw_ToolSegmentedViewsVisible; -friend class IGESDraw_ToolDrawing; -friend class IGESDraw_ToolDrawingWithRotation; -friend class IGESDraw_ToolView; -friend class IGESDraw_ToolRectArraySubfigure; -friend class IGESDraw_ToolCircArraySubfigure; -friend class IGESDraw_ToolNetworkSubfigure; -friend class IGESDraw_ToolPerspectiveView; -friend class IGESDraw_Protocol; -friend class IGESDraw_ReadWriteModule; -friend class IGESDraw_GeneralModule; -friend class IGESDraw_SpecificModule; - }; - - - - - - #endif // _IGESDraw_HeaderFile diff --git a/src/IGESGeom/IGESGeom.cxx b/src/IGESGeom/IGESGeom.cxx index 7624bb6e54..3da2ab75ae 100644 --- a/src/IGESGeom/IGESGeom.cxx +++ b/src/IGESGeom/IGESGeom.cxx @@ -11,11 +11,11 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. +#include #include #include #include -#include #include #include #include diff --git a/src/IGESGeom/IGESGeom.hxx b/src/IGESGeom/IGESGeom.hxx index 86340551cf..494b151690 100644 --- a/src/IGESGeom/IGESGeom.hxx +++ b/src/IGESGeom/IGESGeom.hxx @@ -38,77 +38,6 @@ public: //! Returns the Protocol for this Package Standard_EXPORT static Handle(IGESGeom_Protocol) Protocol(); - - - -protected: - - - - - -private: - - - - -friend class IGESGeom_CircularArc; -friend class IGESGeom_CompositeCurve; -friend class IGESGeom_ConicArc; -friend class IGESGeom_CopiousData; -friend class IGESGeom_Plane; -friend class IGESGeom_Line; -friend class IGESGeom_SplineCurve; -friend class IGESGeom_SplineSurface; -friend class IGESGeom_Point; -friend class IGESGeom_RuledSurface; -friend class IGESGeom_SurfaceOfRevolution; -friend class IGESGeom_TabulatedCylinder; -friend class IGESGeom_Direction; -friend class IGESGeom_TransformationMatrix; -friend class IGESGeom_Flash; -friend class IGESGeom_BSplineCurve; -friend class IGESGeom_BSplineSurface; -friend class IGESGeom_OffsetCurve; -friend class IGESGeom_OffsetSurface; -friend class IGESGeom_Boundary; -friend class IGESGeom_CurveOnSurface; -friend class IGESGeom_BoundedSurface; -friend class IGESGeom_TrimmedSurface; -friend class IGESGeom_ToolCircularArc; -friend class IGESGeom_ToolCompositeCurve; -friend class IGESGeom_ToolConicArc; -friend class IGESGeom_ToolCopiousData; -friend class IGESGeom_ToolPlane; -friend class IGESGeom_ToolLine; -friend class IGESGeom_ToolSplineCurve; -friend class IGESGeom_ToolSplineSurface; -friend class IGESGeom_ToolPoint; -friend class IGESGeom_ToolRuledSurface; -friend class IGESGeom_ToolSurfaceOfRevolution; -friend class IGESGeom_ToolTabulatedCylinder; -friend class IGESGeom_ToolDirection; -friend class IGESGeom_ToolTransformationMatrix; -friend class IGESGeom_ToolFlash; -friend class IGESGeom_ToolBSplineCurve; -friend class IGESGeom_ToolBSplineSurface; -friend class IGESGeom_ToolOffsetCurve; -friend class IGESGeom_ToolOffsetSurface; -friend class IGESGeom_ToolBoundary; -friend class IGESGeom_ToolCurveOnSurface; -friend class IGESGeom_ToolBoundedSurface; -friend class IGESGeom_ToolTrimmedSurface; -friend class IGESGeom_Protocol; -friend class IGESGeom_ReadWriteModule; -friend class IGESGeom_GeneralModule; -friend class IGESGeom_SpecificModule; - }; - - - - - - #endif // _IGESGeom_HeaderFile diff --git a/src/IGESGraph/IGESGraph.cxx b/src/IGESGraph/IGESGraph.cxx index 0654205a9d..e8bf483955 100644 --- a/src/IGESGraph/IGESGraph.cxx +++ b/src/IGESGraph/IGESGraph.cxx @@ -11,11 +11,11 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. +#include #include #include #include -#include #include #include #include diff --git a/src/IGESGraph/IGESGraph.hxx b/src/IGESGraph/IGESGraph.hxx index 50971606cd..0d13100020 100644 --- a/src/IGESGraph/IGESGraph.hxx +++ b/src/IGESGraph/IGESGraph.hxx @@ -40,59 +40,6 @@ public: //! Returns the Protocol for this Package Standard_EXPORT static Handle(IGESGraph_Protocol) Protocol(); - - - -protected: - - - - - -private: - - - - -friend class IGESGraph_LineFontDefTemplate; -friend class IGESGraph_LineFontDefPattern; -friend class IGESGraph_TextFontDef; -friend class IGESGraph_TextDisplayTemplate; -friend class IGESGraph_Color; -friend class IGESGraph_DefinitionLevel; -friend class IGESGraph_NominalSize; -friend class IGESGraph_DrawingSize; -friend class IGESGraph_DrawingUnits; -friend class IGESGraph_IntercharacterSpacing; -friend class IGESGraph_LineFontPredefined; -friend class IGESGraph_HighLight; -friend class IGESGraph_Pick; -friend class IGESGraph_UniformRectGrid; -friend class IGESGraph_ToolLineFontDefTemplate; -friend class IGESGraph_ToolLineFontDefPattern; -friend class IGESGraph_ToolTextFontDef; -friend class IGESGraph_ToolTextDisplayTemplate; -friend class IGESGraph_ToolColor; -friend class IGESGraph_ToolDefinitionLevel; -friend class IGESGraph_ToolNominalSize; -friend class IGESGraph_ToolDrawingSize; -friend class IGESGraph_ToolDrawingUnits; -friend class IGESGraph_ToolIntercharacterSpacing; -friend class IGESGraph_ToolLineFontPredefined; -friend class IGESGraph_ToolHighLight; -friend class IGESGraph_ToolPick; -friend class IGESGraph_ToolUniformRectGrid; -friend class IGESGraph_Protocol; -friend class IGESGraph_ReadWriteModule; -friend class IGESGraph_GeneralModule; -friend class IGESGraph_SpecificModule; - }; - - - - - - #endif // _IGESGraph_HeaderFile diff --git a/src/IGESSelect/IGESSelect.cxx b/src/IGESSelect/IGESSelect.cxx index 6ce03026bf..fa1a76ba7c 100644 --- a/src/IGESSelect/IGESSelect.cxx +++ b/src/IGESSelect/IGESSelect.cxx @@ -11,6 +11,7 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. +#include #include #include @@ -18,7 +19,6 @@ #include #include #include -#include #include #include #include diff --git a/src/IGESSelect/IGESSelect.hxx b/src/IGESSelect/IGESSelect.hxx index 1752b12ecc..4f042ad496 100644 --- a/src/IGESSelect/IGESSelect.hxx +++ b/src/IGESSelect/IGESSelect.hxx @@ -51,73 +51,6 @@ public: //! known the case) Standard_EXPORT static Standard_Integer WhatIges (const Handle(IGESData_IGESEntity)& ent, const Interface_Graph& G, Handle(IGESData_IGESEntity)& sup, Standard_Integer& index); - - - -protected: - - - - - -private: - - - - -friend class IGESSelect_EditHeader; -friend class IGESSelect_EditDirPart; -friend class IGESSelect_IGESTypeForm; -friend class IGESSelect_IGESName; -friend class IGESSelect_SignStatus; -friend class IGESSelect_SignLevelNumber; -friend class IGESSelect_SignColor; -friend class IGESSelect_CounterOfLevelNumber; -friend class IGESSelect_ViewSorter; -friend class IGESSelect_DispPerSingleView; -friend class IGESSelect_DispPerDrawing; -friend class IGESSelect_SelectVisibleStatus; -friend class IGESSelect_SelectSubordinate; -friend class IGESSelect_SelectLevelNumber; -friend class IGESSelect_SelectName; -friend class IGESSelect_SelectFromSingleView; -friend class IGESSelect_SelectFromDrawing; -friend class IGESSelect_SelectSingleViewFrom; -friend class IGESSelect_SelectDrawingFrom; -friend class IGESSelect_SelectBypassGroup; -friend class IGESSelect_SelectBypassSubfigure; -friend class IGESSelect_SelectBasicGeom; -friend class IGESSelect_SelectFaces; -friend class IGESSelect_SelectPCurves; -friend class IGESSelect_ModelModifier; -friend class IGESSelect_FileModifier; -friend class IGESSelect_FloatFormat; -friend class IGESSelect_AddFileComment; -friend class IGESSelect_UpdateFileName; -friend class IGESSelect_UpdateCreationDate; -friend class IGESSelect_UpdateLastChange; -friend class IGESSelect_SetVersion5; -friend class IGESSelect_SetGlobalParameter; -friend class IGESSelect_AutoCorrect; -friend class IGESSelect_ComputeStatus; -friend class IGESSelect_RebuildDrawings; -friend class IGESSelect_RebuildGroups; -friend class IGESSelect_AddGroup; -friend class IGESSelect_ChangeLevelNumber; -friend class IGESSelect_ChangeLevelList; -friend class IGESSelect_SplineToBSpline; -friend class IGESSelect_RemoveCurves; -friend class IGESSelect_SetLabel; -friend class IGESSelect_WorkLibrary; -friend class IGESSelect_Activator; -friend class IGESSelect_Dumper; - }; - - - - - - #endif // _IGESSelect_HeaderFile diff --git a/src/IGESSolid/IGESSolid.cxx b/src/IGESSolid/IGESSolid.cxx index ed5395c1b6..f808f9b2e1 100644 --- a/src/IGESSolid/IGESSolid.cxx +++ b/src/IGESSolid/IGESSolid.cxx @@ -11,11 +11,11 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. +#include #include #include #include -#include #include #include #include diff --git a/src/IGESSolid/IGESSolid.hxx b/src/IGESSolid/IGESSolid.hxx index bea960eeac..177ad2a7a6 100644 --- a/src/IGESSolid/IGESSolid.hxx +++ b/src/IGESSolid/IGESSolid.hxx @@ -38,80 +38,6 @@ public: //! Returns the Protocol for this Package Standard_EXPORT static Handle(IGESSolid_Protocol) Protocol(); - - - -protected: - - - - - -private: - - - - -friend class IGESSolid_Block; -friend class IGESSolid_RightAngularWedge; -friend class IGESSolid_Cylinder; -friend class IGESSolid_ConeFrustum; -friend class IGESSolid_Sphere; -friend class IGESSolid_Torus; -friend class IGESSolid_SolidOfRevolution; -friend class IGESSolid_SolidOfLinearExtrusion; -friend class IGESSolid_Ellipsoid; -friend class IGESSolid_BooleanTree; -friend class IGESSolid_SelectedComponent; -friend class IGESSolid_SolidAssembly; -friend class IGESSolid_ManifoldSolid; -friend class IGESSolid_PlaneSurface; -friend class IGESSolid_CylindricalSurface; -friend class IGESSolid_ConicalSurface; -friend class IGESSolid_SphericalSurface; -friend class IGESSolid_ToroidalSurface; -friend class IGESSolid_SolidInstance; -friend class IGESSolid_VertexList; -friend class IGESSolid_EdgeList; -friend class IGESSolid_Loop; -friend class IGESSolid_Face; -friend class IGESSolid_Shell; -friend class IGESSolid_ToolBlock; -friend class IGESSolid_ToolRightAngularWedge; -friend class IGESSolid_ToolCylinder; -friend class IGESSolid_ToolConeFrustum; -friend class IGESSolid_ToolSphere; -friend class IGESSolid_ToolTorus; -friend class IGESSolid_ToolSolidOfRevolution; -friend class IGESSolid_ToolSolidOfLinearExtrusion; -friend class IGESSolid_ToolEllipsoid; -friend class IGESSolid_ToolBooleanTree; -friend class IGESSolid_ToolSelectedComponent; -friend class IGESSolid_ToolSolidAssembly; -friend class IGESSolid_ToolManifoldSolid; -friend class IGESSolid_ToolPlaneSurface; -friend class IGESSolid_ToolCylindricalSurface; -friend class IGESSolid_ToolConicalSurface; -friend class IGESSolid_ToolSphericalSurface; -friend class IGESSolid_ToolToroidalSurface; -friend class IGESSolid_ToolSolidInstance; -friend class IGESSolid_ToolVertexList; -friend class IGESSolid_ToolEdgeList; -friend class IGESSolid_ToolLoop; -friend class IGESSolid_ToolFace; -friend class IGESSolid_ToolShell; -friend class IGESSolid_Protocol; -friend class IGESSolid_ReadWriteModule; -friend class IGESSolid_GeneralModule; -friend class IGESSolid_SpecificModule; -friend class IGESSolid_TopoBuilder; - }; - - - - - - #endif // _IGESSolid_HeaderFile diff --git a/src/IGESToBRep/IGESToBRep.cxx b/src/IGESToBRep/IGESToBRep.cxx index 423c67ec10..59c6e88e4f 100644 --- a/src/IGESToBRep/IGESToBRep.cxx +++ b/src/IGESToBRep/IGESToBRep.cxx @@ -14,10 +14,7 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -// 21.12.98 rln, gka S4054 -// 06.01.99 pdn transmission from ShapeTool_MakeWire back to BRepAPI_MakeWire -// 19.03.99 abv //:q5: code improvement, unnecessary includes removed -//S4181 pdn 15.04.99 Recognition of elementary surfaces as basic. +#include #include #include @@ -60,7 +57,6 @@ #include #include #include -#include #include #include #include diff --git a/src/IntImpParGen/IntImpParGen.cxx b/src/IntImpParGen/IntImpParGen.cxx index b62b3f95be..0bf0008123 100644 --- a/src/IntImpParGen/IntImpParGen.cxx +++ b/src/IntImpParGen/IntImpParGen.cxx @@ -14,11 +14,11 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. +#include #include #include #include -#include #include #include #include @@ -213,12 +213,3 @@ Standard_Boolean IntImpParGen::DetermineTransition(const IntRes2d_Position P } return(Standard_True); } - - - - - - - - - diff --git a/src/IntImpParGen/IntImpParGen.hxx b/src/IntImpParGen/IntImpParGen.hxx index d36b28b0e9..f132cca6b6 100644 --- a/src/IntImpParGen/IntImpParGen.hxx +++ b/src/IntImpParGen/IntImpParGen.hxx @@ -54,31 +54,6 @@ public: Standard_EXPORT static Standard_Real NormalizeOnDomain (Standard_Real& Par1, const IntRes2d_Domain& Dom1); - - - -protected: - - - - - -private: - - - - -friend class IntImpParGen_ImpTool; -friend class IntImpParGen_ImpParTool; -friend class IntImpParGen_Intersector; -friend class IntImpParGen_MyImpParTool; - }; - - - - - - #endif // _IntImpParGen_HeaderFile diff --git a/src/IntSurf/IntSurf.hxx b/src/IntSurf/IntSurf.hxx index bbda383d8b..26afc55520 100644 --- a/src/IntSurf/IntSurf.hxx +++ b/src/IntSurf/IntSurf.hxx @@ -55,36 +55,6 @@ public: const Handle(Adaptor3d_Surface)& theSecondSurf, Standard_Real theArrOfPeriod[4]); - - -protected: - - - - - -private: - - - - -friend class IntSurf_PntOn2S; -friend class IntSurf_Couple; -friend class IntSurf_LineOn2S; -friend class IntSurf_Quadric; -friend class IntSurf_QuadricTool; -friend class IntSurf_PathPoint; -friend class IntSurf_PathPointTool; -friend class IntSurf_InteriorPoint; -friend class IntSurf_InteriorPointTool; -friend class IntSurf_Transition; - }; - - - - - - #endif // _IntSurf_HeaderFile diff --git a/src/Intf/Intf.cxx b/src/Intf/Intf.cxx index 23c104e61c..f8fe98fd87 100644 --- a/src/Intf/Intf.cxx +++ b/src/Intf/Intf.cxx @@ -14,10 +14,10 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. +#include #include #include -#include //======================================================================= //function : PlaneEquation diff --git a/src/Intf/Intf.hxx b/src/Intf/Intf.hxx index f52e7db24d..72dccb0d09 100644 --- a/src/Intf/Intf.hxx +++ b/src/Intf/Intf.hxx @@ -49,35 +49,6 @@ public: //! Compute if the triangle contain . Standard_EXPORT static Standard_Boolean Contain (const gp_Pnt& P1, const gp_Pnt& P2, const gp_Pnt& P3, const gp_Pnt& ThePnt); - - - -protected: - - - - - -private: - - - - -friend class Intf_Polygon2d; -friend class Intf_SectionPoint; -friend class Intf_SectionLine; -friend class Intf_TangentZone; -friend class Intf_Interference; -friend class Intf_Tool; -friend class Intf_InterferencePolygon2d; -friend class Intf_InterferencePolygonPolyhedron; - }; - - - - - - #endif // _Intf_HeaderFile diff --git a/src/Law/Law.cxx b/src/Law/Law.cxx index 563457ee44..b3d2b231cb 100644 --- a/src/Law/Law.cxx +++ b/src/Law/Law.cxx @@ -14,11 +14,11 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. +#include #include #include #include -#include #include #include #include diff --git a/src/Law/Law.hxx b/src/Law/Law.hxx index b23b1c24ff..3cc8ed2129 100644 --- a/src/Law/Law.hxx +++ b/src/Law/Law.hxx @@ -96,37 +96,6 @@ public: Standard_EXPORT static Handle(Law_BSpline) ScaleCub (const Standard_Real First, const Standard_Real Last, const Standard_Boolean HasF, const Standard_Boolean HasL, const Standard_Real VFirst, const Standard_Real VLast); - - - -protected: - - - - - -private: - - - - -friend class Law_BSpline; -friend class Law_Interpolate; -friend class Law_Function; -friend class Law_Constant; -friend class Law_Linear; -friend class Law_BSpFunc; -friend class Law_S; -friend class Law_Interpol; -friend class Law_Composite; -friend class Law_BSplineKnotSplitting; - }; - - - - - - #endif // _Law_HeaderFile diff --git a/src/LocOpe/LocOpe.hxx b/src/LocOpe/LocOpe.hxx index 904757df86..5aea7f1bdc 100644 --- a/src/LocOpe/LocOpe.hxx +++ b/src/LocOpe/LocOpe.hxx @@ -51,48 +51,6 @@ public: Standard_EXPORT static void SampleEdges (const TopoDS_Shape& S, TColgp_SequenceOfPnt& Pt); - - - -protected: - - - - - -private: - - - - -friend class LocOpe_SplitShape; -friend class LocOpe_WiresOnShape; -friend class LocOpe_Spliter; -friend class LocOpe_Generator; -friend class LocOpe_GeneratedShape; -friend class LocOpe_GluedShape; -friend class LocOpe_Prism; -friend class LocOpe_Revol; -friend class LocOpe_Pipe; -friend class LocOpe_DPrism; -friend class LocOpe_LinearForm; -friend class LocOpe_RevolutionForm; -friend class LocOpe_Gluer; -friend class LocOpe_FindEdges; -friend class LocOpe_FindEdgesInFace; -friend class LocOpe_PntFace; -friend class LocOpe_CurveShapeIntersector; -friend class LocOpe_CSIntersector; -friend class LocOpe_BuildShape; -friend class LocOpe_SplitDrafts; -friend class LocOpe_BuildWires; - }; - - - - - - #endif // _LocOpe_HeaderFile diff --git a/src/LocalAnalysis/LocalAnalysis.hxx b/src/LocalAnalysis/LocalAnalysis.hxx index 1bdcf1ef42..0bcce7d6f3 100644 --- a/src/LocalAnalysis/LocalAnalysis.hxx +++ b/src/LocalAnalysis/LocalAnalysis.hxx @@ -43,11 +43,6 @@ public: //! This function gives information about a variable SurfaceContinuity Standard_EXPORT static void Dump (const LocalAnalysis_CurveContinuity& curvconti, Standard_OStream& o); -private: - -friend class LocalAnalysis_SurfaceContinuity; -friend class LocalAnalysis_CurveContinuity; - }; #endif // _LocalAnalysis_HeaderFile diff --git a/src/PLib/PLib.cxx b/src/PLib/PLib.cxx index c867542e47..521a339a2a 100644 --- a/src/PLib/PLib.cxx +++ b/src/PLib/PLib.cxx @@ -14,16 +14,13 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -// Modified: 28/02/1996 by PMN : HermiteCoefficients added -// Modified: 18/06/1996 by PMN : NULL reference. -// Modified: 19/02/1997 by JCT : EvalPoly2Var added +#include #include #include #include #include #include -#include #include // To convert points array into Real .. diff --git a/src/PLib/PLib.hxx b/src/PLib/PLib.hxx index 4f2a27a08d..96c28b72d0 100644 --- a/src/PLib/PLib.hxx +++ b/src/PLib/PLib.hxx @@ -346,25 +346,6 @@ public: Standard_EXPORT static void EvalLength (const Standard_Integer Degree, const Standard_Integer Dimension, Standard_Real& PolynomialCoeff, const Standard_Real U1, const Standard_Real U2, const Standard_Real Tol, Standard_Real& Length, Standard_Real& Error); - - - -protected: - - - - - -private: - - - - -friend class PLib_Base; -friend class PLib_JacobiPolynomial; -friend class PLib_HermitJacobi; -friend class PLib_DoubleJacobiPolynomial; - }; #endif // _PLib_HeaderFile diff --git a/src/Poly/Poly.hxx b/src/Poly/Poly.hxx index 9c9b95cd7b..78a8788415 100644 --- a/src/Poly/Poly.hxx +++ b/src/Poly/Poly.hxx @@ -190,15 +190,6 @@ public: return Standard_True; } -private: - -friend class Poly_Triangle; -friend class Poly_Triangulation; -friend class Poly_Polygon3D; -friend class Poly_Polygon2D; -friend class Poly_PolygonOnTriangulation; -friend class Poly_Connect; - }; #endif // _Poly_HeaderFile diff --git a/src/QABugs/QABugs.hxx b/src/QABugs/QABugs.hxx index d4439d63ae..0ddac6deb0 100644 --- a/src/QABugs/QABugs.hxx +++ b/src/QABugs/QABugs.hxx @@ -73,27 +73,6 @@ public: Standard_EXPORT static void Commands_BVH (Draw_Interpretor& DI); - -protected: - - - - - -private: - - - - -friend class QABugs_MyText; -friend class QABugs_PresentableObject; - }; - - - - - - #endif // _QABugs_HeaderFile diff --git a/src/RWHeaderSection/RWHeaderSection.cxx b/src/RWHeaderSection/RWHeaderSection.cxx index b1d2f27262..62f917e641 100644 --- a/src/RWHeaderSection/RWHeaderSection.cxx +++ b/src/RWHeaderSection/RWHeaderSection.cxx @@ -11,10 +11,10 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. +#include #include #include -#include #include #include #include diff --git a/src/RWHeaderSection/RWHeaderSection.hxx b/src/RWHeaderSection/RWHeaderSection.hxx index 5d8204cc11..55197b20d8 100644 --- a/src/RWHeaderSection/RWHeaderSection.hxx +++ b/src/RWHeaderSection/RWHeaderSection.hxx @@ -34,32 +34,6 @@ public: //! enforced the initialisation of the libraries Standard_EXPORT static void Init(); - - - -protected: - - - - - -private: - - - - -friend class RWHeaderSection_ReadWriteModule; -friend class RWHeaderSection_GeneralModule; -friend class RWHeaderSection_RWFileName; -friend class RWHeaderSection_RWFileDescription; -friend class RWHeaderSection_RWFileSchema; - }; - - - - - - #endif // _RWHeaderSection_HeaderFile diff --git a/src/RWStepAP214/RWStepAP214.cxx b/src/RWStepAP214/RWStepAP214.cxx index 6693363283..b1608e0442 100644 --- a/src/RWStepAP214/RWStepAP214.cxx +++ b/src/RWStepAP214/RWStepAP214.cxx @@ -11,11 +11,11 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. +#include #include #include #include -#include #include #include #include diff --git a/src/RWStepAP214/RWStepAP214.hxx b/src/RWStepAP214/RWStepAP214.hxx index 9ad95d3db8..0d6af9fedc 100644 --- a/src/RWStepAP214/RWStepAP214.hxx +++ b/src/RWStepAP214/RWStepAP214.hxx @@ -34,55 +34,6 @@ public: //! enforced the initialisation of the libraries Standard_EXPORT static void Init(); - - - -protected: - - - - - -private: - - - - -friend class RWStepAP214_ReadWriteModule; -friend class RWStepAP214_GeneralModule; -friend class RWStepAP214_RWAutoDesignActualDateAndTimeAssignment; -friend class RWStepAP214_RWAutoDesignActualDateAssignment; -friend class RWStepAP214_RWAutoDesignApprovalAssignment; -friend class RWStepAP214_RWAutoDesignDateAndPersonAssignment; -friend class RWStepAP214_RWAutoDesignGroupAssignment; -friend class RWStepAP214_RWAutoDesignNominalDateAndTimeAssignment; -friend class RWStepAP214_RWAutoDesignNominalDateAssignment; -friend class RWStepAP214_RWAutoDesignOrganizationAssignment; -friend class RWStepAP214_RWAutoDesignPersonAndOrganizationAssignment; -friend class RWStepAP214_RWAutoDesignPresentedItem; -friend class RWStepAP214_RWAutoDesignSecurityClassificationAssignment; -friend class RWStepAP214_RWAutoDesignDocumentReference; -friend class RWStepAP214_RWAppliedDateAndTimeAssignment; -friend class RWStepAP214_RWAppliedDateAssignment; -friend class RWStepAP214_RWAppliedApprovalAssignment; -friend class RWStepAP214_RWAppliedGroupAssignment; -friend class RWStepAP214_RWAppliedOrganizationAssignment; -friend class RWStepAP214_RWAppliedPersonAndOrganizationAssignment; -friend class RWStepAP214_RWAppliedPresentedItem; -friend class RWStepAP214_RWAppliedSecurityClassificationAssignment; -friend class RWStepAP214_RWAppliedDocumentReference; -friend class RWStepAP214_RWAppliedExternalIdentificationAssignment; -friend class RWStepAP214_RWClass; -friend class RWStepAP214_RWExternallyDefinedClass; -friend class RWStepAP214_RWExternallyDefinedGeneralProperty; -friend class RWStepAP214_RWRepItemGroup; - }; - - - - - - #endif // _RWStepAP214_HeaderFile diff --git a/src/STEPConstruct/STEPConstruct.cxx b/src/STEPConstruct/STEPConstruct.cxx index dd704c7e4b..da9eaaf169 100644 --- a/src/STEPConstruct/STEPConstruct.cxx +++ b/src/STEPConstruct/STEPConstruct.cxx @@ -13,10 +13,10 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. +#include #include #include -#include #include #include #include diff --git a/src/STEPConstruct/STEPConstruct.hxx b/src/STEPConstruct/STEPConstruct.hxx index a178a3985b..d7219f72ef 100644 --- a/src/STEPConstruct/STEPConstruct.hxx +++ b/src/STEPConstruct/STEPConstruct.hxx @@ -62,37 +62,6 @@ public: //! Find CDSR correcponding to the component in the specified assembly Standard_EXPORT static Standard_Boolean FindCDSR (const Handle(Transfer_Binder)& ComponentBinder, const Handle(StepShape_ShapeDefinitionRepresentation)& AssemblySDR, Handle(StepShape_ContextDependentShapeRepresentation)& ComponentCDSR); - - - -protected: - - - - - -private: - - - - -friend class STEPConstruct_Tool; -friend class STEPConstruct_UnitContext; -friend class STEPConstruct_Part; -friend class STEPConstruct_Assembly; -friend class STEPConstruct_Styles; -friend class STEPConstruct_ValidationProps; -friend class STEPConstruct_ExternRefs; -friend class STEPConstruct_AP203Context; -friend class STEPConstruct_ContextTool; -friend class STEPConstruct_PointHasher; - }; - - - - - - #endif // _STEPConstruct_HeaderFile diff --git a/src/STEPEdit/STEPEdit.cxx b/src/STEPEdit/STEPEdit.cxx index 42e1295cf6..094df77a51 100644 --- a/src/STEPEdit/STEPEdit.cxx +++ b/src/STEPEdit/STEPEdit.cxx @@ -11,6 +11,7 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. +#include #include #include @@ -21,7 +22,6 @@ #include #include #include -#include #include Handle(Interface_Protocol) STEPEdit::Protocol () diff --git a/src/STEPEdit/STEPEdit.hxx b/src/STEPEdit/STEPEdit.hxx index 89e7b09830..166fd33d6a 100644 --- a/src/STEPEdit/STEPEdit.hxx +++ b/src/STEPEdit/STEPEdit.hxx @@ -63,29 +63,6 @@ public: //! By default in the whole StepModel Standard_EXPORT static Handle(IFSelect_SelectSignature) NewSelectShapeRepr(); - - - -protected: - - - - - -private: - - - - -friend class STEPEdit_EditContext; -friend class STEPEdit_EditSDR; - }; - - - - - - #endif // _STEPEdit_HeaderFile diff --git a/src/SWDRAW/SWDRAW.cxx b/src/SWDRAW/SWDRAW.cxx index 29221fa30e..e428fa46cd 100644 --- a/src/SWDRAW/SWDRAW.cxx +++ b/src/SWDRAW/SWDRAW.cxx @@ -11,6 +11,7 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. +#include #include #include @@ -20,7 +21,6 @@ #include #include #include -#include #include #include #include @@ -118,11 +118,6 @@ void SWDRAW::Init (Draw_Interpretor& theCommands) { if (!dejadraw) { dejadraw = 1; -// DBRep::BasicCommands(theCommands); -// CKY 4-AOUT-1998 : pb avec GeomFill -// GeometryTest::AllCommands(theCommands); -// BRepTest::AllCommands(theCommands); -// MeshTest::Commands(theCommands); } SWDRAW_ShapeTool::InitCommands (theCommands); diff --git a/src/SWDRAW/SWDRAW.hxx b/src/SWDRAW/SWDRAW.hxx index 02a34da95f..4ea68bdb3f 100644 --- a/src/SWDRAW/SWDRAW.hxx +++ b/src/SWDRAW/SWDRAW.hxx @@ -44,44 +44,14 @@ public: DEFINE_STANDARD_ALLOC - //! Loads commands defined in SWDRAW Standard_EXPORT static void Init (Draw_Interpretor& theCommands); - - - -protected: - - - - - -private: - - //! Returns the name of the DRAW group accumulating the //! commands from the classes prefixed with Shape*. //! Returns "Shape Healing". Standard_EXPORT static Standard_CString GroupName(); - - -friend class SWDRAW_ShapeTool; -friend class SWDRAW_ShapeAnalysis; -friend class SWDRAW_ShapeCustom; -friend class SWDRAW_ShapeExtend; -friend class SWDRAW_ShapeFix; -friend class SWDRAW_ShapeUpgrade; -friend class SWDRAW_ShapeProcess; -friend class SWDRAW_ShapeProcessAPI; - }; - - - - - - #endif // _SWDRAW_HeaderFile diff --git a/src/ShapeAlgo/ShapeAlgo.hxx b/src/ShapeAlgo/ShapeAlgo.hxx index 8369162e89..ef4d5fda5d 100644 --- a/src/ShapeAlgo/ShapeAlgo.hxx +++ b/src/ShapeAlgo/ShapeAlgo.hxx @@ -41,29 +41,6 @@ public: //! Returns default AlgoContainer Standard_EXPORT static Handle(ShapeAlgo_AlgoContainer) AlgoContainer(); - - - -protected: - - - - - -private: - - - - -friend class ShapeAlgo_ToolContainer; -friend class ShapeAlgo_AlgoContainer; - }; - - - - - - #endif // _ShapeAlgo_HeaderFile diff --git a/src/ShapeAnalysis/ShapeAnalysis.cxx b/src/ShapeAnalysis/ShapeAnalysis.cxx index acc8a75be6..995466e29f 100644 --- a/src/ShapeAnalysis/ShapeAnalysis.cxx +++ b/src/ShapeAnalysis/ShapeAnalysis.cxx @@ -13,12 +13,7 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -// pdn 15.11.98 new methods -//:n3 abv 08.02.99: PRO17820: ShapeAnalysis::OuterWire instead of BRepTools::OuterWire() -// szv #1 05.03.99: PRO15686: compute UV points for Plane surfaces in case of same vertices -//#4 szv S4163: optimizations -//:s5 abv 22.04.99 Adding debug printouts in catch {} blocks -//%21 pdn 15.04.99 CTS22655 +#include #include #include @@ -34,7 +29,6 @@ #include #include #include -#include #include #include #include diff --git a/src/ShapeAnalysis/ShapeAnalysis.hxx b/src/ShapeAnalysis/ShapeAnalysis.hxx index 1ac0e19f31..be6f228ab5 100644 --- a/src/ShapeAnalysis/ShapeAnalysis.hxx +++ b/src/ShapeAnalysis/ShapeAnalysis.hxx @@ -94,43 +94,6 @@ public: //! Computes exact UV bounds of all wires on the face Standard_EXPORT static void GetFaceUVBounds (const TopoDS_Face& F, Standard_Real& Umin, Standard_Real& Umax, Standard_Real& Vmin, Standard_Real& Vmax); - - - -protected: - - - - - -private: - - - - -friend class ShapeAnalysis_Geom; -friend class ShapeAnalysis_Curve; -friend class ShapeAnalysis_Surface; -friend class ShapeAnalysis_Edge; -friend class ShapeAnalysis_Wire; -friend class ShapeAnalysis_WireOrder; -friend class ShapeAnalysis_WireVertex; -friend class ShapeAnalysis_CheckSmallFace; -friend class ShapeAnalysis_Shell; -friend class ShapeAnalysis_ShapeTolerance; -friend class ShapeAnalysis_ShapeContents; -friend class ShapeAnalysis_FreeBounds; -friend class ShapeAnalysis_FreeBoundData; -friend class ShapeAnalysis_FreeBoundsProperties; -friend class ShapeAnalysis_TransferParameters; -friend class ShapeAnalysis_TransferParametersProj; - }; - - - - - - #endif // _ShapeAnalysis_HeaderFile diff --git a/src/ShapeBuild/ShapeBuild.cxx b/src/ShapeBuild/ShapeBuild.cxx index 1e809c5c47..96787ed966 100644 --- a/src/ShapeBuild/ShapeBuild.cxx +++ b/src/ShapeBuild/ShapeBuild.cxx @@ -14,9 +14,9 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. +#include #include -#include //======================================================================= //function : PlaneXOY @@ -28,4 +28,3 @@ Handle(Geom_Plane) ShapeBuild::PlaneXOY() if (xoy.IsNull()) xoy = new Geom_Plane (0,0,1,0); return xoy; } - diff --git a/src/ShapeBuild/ShapeBuild.hxx b/src/ShapeBuild/ShapeBuild.hxx index 31e7decef4..1b452f601e 100644 --- a/src/ShapeBuild/ShapeBuild.hxx +++ b/src/ShapeBuild/ShapeBuild.hxx @@ -39,30 +39,6 @@ public: //! with this support surface Standard_EXPORT static Handle(Geom_Plane) PlaneXOY(); - - - -protected: - - - - - -private: - - - - -friend class ShapeBuild_Vertex; -friend class ShapeBuild_Edge; -friend class ShapeBuild_ReShape; - }; - - - - - - #endif // _ShapeBuild_HeaderFile diff --git a/src/ShapeCustom/ShapeCustom.hxx b/src/ShapeCustom/ShapeCustom.hxx index b5fdd9a91d..1fcfe0ce11 100644 --- a/src/ShapeCustom/ShapeCustom.hxx +++ b/src/ShapeCustom/ShapeCustom.hxx @@ -99,38 +99,6 @@ public: //! Geom_BSplineSurface (with same parameterisation). Standard_EXPORT static TopoDS_Shape ConvertToBSpline (const TopoDS_Shape& S, const Standard_Boolean extrMode, const Standard_Boolean revolMode, const Standard_Boolean offsetMode, const Standard_Boolean planeMode = Standard_False); - - - -protected: - - - - - -private: - - - - -friend class ShapeCustom_Surface; -friend class ShapeCustom_Curve; -friend class ShapeCustom_Curve2d; -friend class ShapeCustom_RestrictionParameters; -friend class ShapeCustom_Modification; -friend class ShapeCustom_DirectModification; -friend class ShapeCustom_TrsfModification; -friend class ShapeCustom_BSplineRestriction; -friend class ShapeCustom_ConvertToRevolution; -friend class ShapeCustom_SweptToElementary; -friend class ShapeCustom_ConvertToBSpline; - }; - - - - - - #endif // _ShapeCustom_HeaderFile diff --git a/src/ShapeExtend/ShapeExtend.hxx b/src/ShapeExtend/ShapeExtend.hxx index acb9e4bc63..7414f34331 100644 --- a/src/ShapeExtend/ShapeExtend.hxx +++ b/src/ShapeExtend/ShapeExtend.hxx @@ -58,33 +58,6 @@ public: //! Tells if a bit flag contains bit corresponding to enumerated status Standard_EXPORT static Standard_Boolean DecodeStatus (const Standard_Integer flag, const ShapeExtend_Status status); - - - -protected: - - - - - -private: - - - - -friend class ShapeExtend_ComplexCurve; -friend class ShapeExtend_CompositeSurface; -friend class ShapeExtend_WireData; -friend class ShapeExtend_BasicMsgRegistrator; -friend class ShapeExtend_MsgRegistrator; -friend class ShapeExtend_Explorer; - }; - - - - - - #endif // _ShapeExtend_HeaderFile diff --git a/src/ShapeFix/ShapeFix.hxx b/src/ShapeFix/ShapeFix.hxx index a1e30c6396..fb6a1f5ccf 100644 --- a/src/ShapeFix/ShapeFix.hxx +++ b/src/ShapeFix/ShapeFix.hxx @@ -77,48 +77,6 @@ public: //! Calculate size of least edge; Standard_EXPORT static Standard_Real LeastEdgeSize (TopoDS_Shape& theshape); - - - -protected: - - - - - -private: - - - - -friend class ShapeFix_Root; -friend class ShapeFix_EdgeProjAux; -friend class ShapeFix_Edge; -friend class ShapeFix_Wire; -friend class ShapeFix_Face; -friend class ShapeFix_FixSmallFace; -friend class ShapeFix_FixSmallSolid; -friend class ShapeFix_WireVertex; -friend class ShapeFix_Wireframe; -friend class ShapeFix_FreeBounds; -friend class ShapeFix_FaceConnect; -friend class ShapeFix_Shell; -friend class ShapeFix_Solid; -friend class ShapeFix_ShapeTolerance; -friend class ShapeFix_Shape; -friend class ShapeFix_EdgeConnect; -friend class ShapeFix_ComposeShell; -friend class ShapeFix_SplitCommonVertex; -friend class ShapeFix_WireSegment; -friend class ShapeFix_IntersectionTool; -friend class ShapeFix_SplitTool; - }; - - - - - - #endif // _ShapeFix_HeaderFile diff --git a/src/ShapeProcess/ShapeProcess.cxx b/src/ShapeProcess/ShapeProcess.cxx index 3f4c8fe74c..e38395aec5 100644 --- a/src/ShapeProcess/ShapeProcess.cxx +++ b/src/ShapeProcess/ShapeProcess.cxx @@ -13,11 +13,12 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. +#include + #include #include #include #include -#include #include #include #include diff --git a/src/ShapeProcess/ShapeProcess.hxx b/src/ShapeProcess/ShapeProcess.hxx index 27322a37aa..b8408d5b20 100644 --- a/src/ShapeProcess/ShapeProcess.hxx +++ b/src/ShapeProcess/ShapeProcess.hxx @@ -54,32 +54,6 @@ public: const Standard_CString seq, const Message_ProgressRange& theProgress = Message_ProgressRange()); - - - -protected: - - - - - -private: - - - - -friend class ShapeProcess_Context; -friend class ShapeProcess_ShapeContext; -friend class ShapeProcess_Operator; -friend class ShapeProcess_UOperator; -friend class ShapeProcess_OperLibrary; - }; - - - - - - #endif // _ShapeProcess_HeaderFile diff --git a/src/ShapeUpgrade/ShapeUpgrade.cxx b/src/ShapeUpgrade/ShapeUpgrade.cxx index 7f2444269b..2c3d838d8f 100644 --- a/src/ShapeUpgrade/ShapeUpgrade.cxx +++ b/src/ShapeUpgrade/ShapeUpgrade.cxx @@ -14,12 +14,11 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -// abv 24.05.99 S4174: methods Debug() commented +#include #include #include #include -#include #include #include #include diff --git a/src/ShapeUpgrade/ShapeUpgrade.hxx b/src/ShapeUpgrade/ShapeUpgrade.hxx index 2bdb74feae..488bf4abdc 100644 --- a/src/ShapeUpgrade/ShapeUpgrade.hxx +++ b/src/ShapeUpgrade/ShapeUpgrade.hxx @@ -54,41 +54,6 @@ public: Standard_EXPORT static Standard_Boolean C0BSplineToSequenceOfC1BSplineCurve (const Handle(Geom2d_BSplineCurve)& BS, Handle(TColGeom2d_HSequenceOfBoundedCurve)& seqBS); -private: - -friend class ShapeUpgrade_Tool; -friend class ShapeUpgrade_EdgeDivide; -friend class ShapeUpgrade_ClosedEdgeDivide; -friend class ShapeUpgrade_WireDivide; -friend class ShapeUpgrade_FaceDivide; -friend class ShapeUpgrade_ClosedFaceDivide; -friend class ShapeUpgrade_FaceDivideArea; -friend class ShapeUpgrade_ShapeDivide; -friend class ShapeUpgrade_ShapeDivideArea; -friend class ShapeUpgrade_ShapeDivideContinuity; -friend class ShapeUpgrade_ShapeDivideAngle; -friend class ShapeUpgrade_ShapeConvertToBezier; -friend class ShapeUpgrade_ShapeDivideClosed; -friend class ShapeUpgrade_ShapeDivideClosedEdges; -friend class ShapeUpgrade_SplitCurve; -friend class ShapeUpgrade_SplitCurve2d; -friend class ShapeUpgrade_SplitCurve2dContinuity; -friend class ShapeUpgrade_ConvertCurve2dToBezier; -friend class ShapeUpgrade_SplitCurve3d; -friend class ShapeUpgrade_SplitCurve3dContinuity; -friend class ShapeUpgrade_ConvertCurve3dToBezier; -friend class ShapeUpgrade_SplitSurface; -friend class ShapeUpgrade_SplitSurfaceContinuity; -friend class ShapeUpgrade_SplitSurfaceAngle; -friend class ShapeUpgrade_ConvertSurfaceToBezierBasis; -friend class ShapeUpgrade_SplitSurfaceArea; -friend class ShapeUpgrade_ShellSewing; -friend class ShapeUpgrade_FixSmallCurves; -friend class ShapeUpgrade_FixSmallBezierCurves; -friend class ShapeUpgrade_RemoveLocations; -friend class ShapeUpgrade_RemoveInternalWires; -friend class ShapeUpgrade_UnifySameDomain; - }; #endif // _ShapeUpgrade_HeaderFile diff --git a/src/StepAP214/StepAP214.cxx b/src/StepAP214/StepAP214.cxx index 77702ead72..03bbecf7fc 100644 --- a/src/StepAP214/StepAP214.cxx +++ b/src/StepAP214/StepAP214.cxx @@ -11,9 +11,9 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. +#include #include -#include #include StaticHandle(StepAP214_Protocol, proto); @@ -24,4 +24,3 @@ Handle(StepAP214_Protocol) StepAP214::Protocol() InitHandleVoid(StepAP214_Protocol, proto); return proto; } - diff --git a/src/StepAP214/StepAP214.hxx b/src/StepAP214/StepAP214.hxx index 32647cd1bf..9ddeee5326 100644 --- a/src/StepAP214/StepAP214.hxx +++ b/src/StepAP214/StepAP214.hxx @@ -37,72 +37,6 @@ public: //! creates a Protocol Standard_EXPORT static Handle(StepAP214_Protocol) Protocol(); - - - -protected: - - - - - -private: - - - - -friend class StepAP214_AutoDesignDateAndPersonItem; -friend class StepAP214_AutoDesignDateAndTimeItem; -friend class StepAP214_AutoDesignDatedItem; -friend class StepAP214_AutoDesignGeneralOrgItem; -friend class StepAP214_AutoDesignOrganizationItem; -friend class StepAP214_AutoDesignGroupedItem; -friend class StepAP214_AutoDesignPresentedItemSelect; -friend class StepAP214_AutoDesignReferencingItem; -friend class StepAP214_DateAndTimeItem; -friend class StepAP214_DateItem; -friend class StepAP214_ApprovalItem; -friend class StepAP214_OrganizationItem; -friend class StepAP214_DocumentReferenceItem; -friend class StepAP214_GroupItem; -friend class StepAP214_PersonAndOrganizationItem; -friend class StepAP214_PresentedItemSelect; -friend class StepAP214_SecurityClassificationItem; -friend class StepAP214_Protocol; -friend class StepAP214_AutoDesignApprovalAssignment; -friend class StepAP214_AutoDesignActualDateAndTimeAssignment; -friend class StepAP214_AutoDesignNominalDateAndTimeAssignment; -friend class StepAP214_AutoDesignActualDateAssignment; -friend class StepAP214_AutoDesignNominalDateAssignment; -friend class StepAP214_AutoDesignGroupAssignment; -friend class StepAP214_AutoDesignOrganizationAssignment; -friend class StepAP214_AutoDesignDateAndPersonAssignment; -friend class StepAP214_AutoDesignPersonAndOrganizationAssignment; -friend class StepAP214_AutoDesignPresentedItem; -friend class StepAP214_AutoDesignSecurityClassificationAssignment; -friend class StepAP214_AutoDesignDocumentReference; -friend class StepAP214_AppliedApprovalAssignment; -friend class StepAP214_AppliedDateAndTimeAssignment; -friend class StepAP214_AppliedDateAssignment; -friend class StepAP214_AppliedGroupAssignment; -friend class StepAP214_AppliedOrganizationAssignment; -friend class StepAP214_AppliedPersonAndOrganizationAssignment; -friend class StepAP214_AppliedPresentedItem; -friend class StepAP214_AppliedSecurityClassificationAssignment; -friend class StepAP214_AppliedDocumentReference; -friend class StepAP214_AppliedExternalIdentificationAssignment; -friend class StepAP214_Class; -friend class StepAP214_ExternalIdentificationItem; -friend class StepAP214_ExternallyDefinedClass; -friend class StepAP214_ExternallyDefinedGeneralProperty; -friend class StepAP214_RepItemGroup; - }; - - - - - - #endif // _StepAP214_HeaderFile diff --git a/src/StepData/StepData.cxx b/src/StepData/StepData.cxx index 79e848c48e..a0e6c519e5 100644 --- a/src/StepData/StepData.cxx +++ b/src/StepData/StepData.cxx @@ -11,13 +11,11 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -// abv 09.04.99 S4136: eliminate parameter step.readaccept.void -// svv #2 23.02.00: porting on SIL +#include #include #include #include -#include #include #include #include diff --git a/src/StepData/StepData.hxx b/src/StepData/StepData.hxx index 3285f3f1ce..f24a777f1f 100644 --- a/src/StepData/StepData.hxx +++ b/src/StepData/StepData.hxx @@ -50,66 +50,6 @@ public: //! Returns a Protocol from StepData (avoids to create it) Standard_EXPORT static Handle(StepData_Protocol) Protocol(); - - - -protected: - - - - - -private: - - - - -friend class StepData_StepModel; -friend class StepData_UndefinedEntity; -friend class StepData_SelectType; -friend class StepData_Field; -friend class StepData_SelectMember; -friend class StepData_SelectInt; -friend class StepData_SelectReal; -friend class StepData_SelectNamed; -friend class StepData_SelectArrReal; -friend class StepData_PDescr; -friend class StepData_FieldList; -friend class StepData_FieldList1; -friend class StepData_FieldListN; -friend class StepData_FieldListD; -friend class StepData_EDescr; -friend class StepData_ESDescr; -friend class StepData_ECDescr; -friend class StepData_Described; -friend class StepData_Simple; -friend class StepData_Plex; -friend class StepData_FreeFormEntity; -friend class StepData_Protocol; -friend class StepData_GeneralModule; -friend class StepData_FileRecognizer; -friend class StepData_FileProtocol; -friend class StepData_HeaderTool; -friend class StepData_EnumTool; -friend class StepData_DescrProtocol; -friend class StepData_DescrGeneral; -friend class StepData_DescrReadWrite; -friend class StepData_StepReaderData; -friend class StepData_StepReaderTool; -friend class StepData_ReadWriteModule; -friend class StepData_StepWriter; -friend class StepData_StepDumper; -friend class StepData_WriterLib; -friend class StepData_DefaultGeneral; -friend class StepData_GlobalNodeOfWriterLib; -friend class StepData_NodeOfWriterLib; - }; - - - - - - #endif // _StepData_HeaderFile diff --git a/src/StepToTopoDS/StepToTopoDS.hxx b/src/StepToTopoDS/StepToTopoDS.hxx index 4aae8313de..043a53d18b 100644 --- a/src/StepToTopoDS/StepToTopoDS.hxx +++ b/src/StepToTopoDS/StepToTopoDS.hxx @@ -59,45 +59,6 @@ public: Standard_EXPORT static Standard_CString DecodeGeometricToolError (const StepToTopoDS_GeometricToolError Error); - - - -protected: - - - - - -private: - - - - -friend class StepToTopoDS_Root; -friend class StepToTopoDS_TranslateShell; -friend class StepToTopoDS_TranslateFace; -friend class StepToTopoDS_TranslateEdgeLoop; -friend class StepToTopoDS_TranslateEdge; -friend class StepToTopoDS_TranslateVertex; -friend class StepToTopoDS_TranslatePolyLoop; -friend class StepToTopoDS_TranslateVertexLoop; -friend class StepToTopoDS_TranslateCompositeCurve; -friend class StepToTopoDS_TranslateCurveBoundedSurface; -friend class StepToTopoDS_Builder; -friend class StepToTopoDS_MakeTransformed; -friend class StepToTopoDS_GeometricTool; -friend class StepToTopoDS_Tool; -friend class StepToTopoDS_CartesianPointHasher; -friend class StepToTopoDS_PointPair; -friend class StepToTopoDS_PointPairHasher; -friend class StepToTopoDS_NMTool; - }; - - - - - - #endif // _StepToTopoDS_HeaderFile diff --git a/src/Storage/Storage.cxx b/src/Storage/Storage.cxx index ba0f2d2892..9977c8dbb3 100644 --- a/src/Storage/Storage.cxx +++ b/src/Storage/Storage.cxx @@ -12,13 +12,13 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -#include #include +#include + TCollection_AsciiString Storage::Version() { TCollection_AsciiString v("1.3"); return v; } - diff --git a/src/Storage/Storage.hxx b/src/Storage/Storage.hxx index 638d1a0964..e649f214d6 100644 --- a/src/Storage/Storage.hxx +++ b/src/Storage/Storage.hxx @@ -53,39 +53,6 @@ public: //! returns the version of Storage's read/write routines Standard_EXPORT static TCollection_AsciiString Version(); - - - -protected: - - - - - -private: - - - - -friend class Storage_BaseDriver; -friend class Storage_CallBack; -friend class Storage_DefaultCallBack; -friend class Storage_HeaderData; -friend class Storage_Data; -friend class Storage_TypeData; -friend class Storage_RootData; -friend class Storage_Root; -friend class Storage_Schema; -friend class Storage_InternalData; -friend class Storage_stCONSTclCOM; -friend class Storage_TypedCallBack; - }; - - - - - - #endif // _Storage_HeaderFile diff --git a/src/TDF/TDF.cxx b/src/TDF/TDF.cxx index b6a183a0cf..c4a418c278 100644 --- a/src/TDF/TDF.cxx +++ b/src/TDF/TDF.cxx @@ -13,14 +13,10 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -// ------- -// Version: 0.0 -//Version Date Purpose -// 0.0 Nov 14 1997 Creation +#include #include #include -#include #include static TDF_GUIDProgIDMap guidprogidmap; diff --git a/src/TDF/TDF.hxx b/src/TDF/TDF.hxx index c9bc52c274..3c67e457d4 100644 --- a/src/TDF/TDF.hxx +++ b/src/TDF/TDF.hxx @@ -58,54 +58,6 @@ public: //! Returns True if there is ProgID for given then ProgID is returned in Standard_EXPORT static Standard_Boolean ProgIDFromGUID (const Standard_GUID& ID, TCollection_ExtendedString& ProgID); - - - -protected: - - - - - -private: - - - - -friend class TDF_Data; -friend class TDF_Label; -friend class TDF_Attribute; -friend class TDF_TagSource; -friend class TDF_Reference; -friend class TDF_ClosureMode; -friend class TDF_ClosureTool; -friend class TDF_CopyTool; -friend class TDF_CopyLabel; -friend class TDF_ComparisonTool; -friend class TDF_Transaction; -friend class TDF_Delta; -friend class TDF_AttributeDelta; -friend class TDF_DeltaOnAddition; -friend class TDF_DeltaOnForget; -friend class TDF_DeltaOnResume; -friend class TDF_DeltaOnRemoval; -friend class TDF_DeltaOnModification; -friend class TDF_DefaultDeltaOnRemoval; -friend class TDF_DefaultDeltaOnModification; -friend class TDF_ChildIterator; -friend class TDF_ChildIDIterator; -friend class TDF_DataSet; -friend class TDF_RelocationTable; -friend class TDF_Tool; -friend class TDF_LabelMapHasher; -friend class TDF_IDFilter; - }; - - - - - - #endif // _TDF_HeaderFile diff --git a/src/TDataStd/TDataStd.hxx b/src/TDataStd/TDataStd.hxx index c501edfb7f..1c0b0e9f5d 100644 --- a/src/TDataStd/TDataStd.hxx +++ b/src/TDataStd/TDataStd.hxx @@ -60,66 +60,6 @@ public: //! the Stream and returns . Standard_EXPORT static Standard_OStream& Print (const TDataStd_RealEnum DIM, Standard_OStream& S); - - - -protected: - - - - - -private: - - - - -friend class TDataStd_Current; -friend class TDataStd_Name; -friend class TDataStd_Comment; -friend class TDataStd_Integer; -friend class TDataStd_IntegerArray; -friend class TDataStd_Real; -friend class TDataStd_RealArray; -friend class TDataStd_ExtStringArray; -friend class TDataStd_UAttribute; -friend class TDataStd_TreeNode; -friend class TDataStd_ChildNodeIterator; -friend class TDataStd_Directory; -friend class TDataStd_NoteBook; -friend class TDataStd_Expression; -friend class TDataStd_Relation; -friend class TDataStd_Variable; -friend class TDataStd_DeltaOnModificationOfIntArray; -friend class TDataStd_DeltaOnModificationOfRealArray; -friend class TDataStd_DeltaOnModificationOfExtStringArray; -friend class TDataStd_DeltaOnModificationOfIntPackedMap; -friend class TDataStd_DeltaOnModificationOfByteArray; -friend class TDataStd_Tick; -friend class TDataStd_AsciiString; -friend class TDataStd_IntPackedMap; -friend class TDataStd_IntegerList; -friend class TDataStd_RealList; -friend class TDataStd_ExtStringList; -friend class TDataStd_BooleanList; -friend class TDataStd_ReferenceList; -friend class TDataStd_BooleanArray; -friend class TDataStd_ReferenceArray; -friend class TDataStd_ByteArray; -friend class TDataStd_NamedData; -friend class TDataStd_HDataMapOfStringInteger; -friend class TDataStd_HDataMapOfStringReal; -friend class TDataStd_HDataMapOfStringString; -friend class TDataStd_HDataMapOfStringByte; -friend class TDataStd_HDataMapOfStringHArray1OfInteger; -friend class TDataStd_HDataMapOfStringHArray1OfReal; - }; - - - - - - #endif // _TDataStd_HeaderFile diff --git a/src/TDocStd/TDocStd.hxx b/src/TDocStd/TDocStd.hxx index f7c7ac7b27..4febc7c68b 100644 --- a/src/TDocStd/TDocStd.hxx +++ b/src/TDocStd/TDocStd.hxx @@ -68,40 +68,6 @@ public: //! cleared before use. Standard_EXPORT static void IDList (TDF_IDList& anIDList); - - - -protected: - - - - - -private: - - - - -friend class TDocStd_Application; -friend class TDocStd_Document; -friend class TDocStd_Context; -friend class TDocStd_XLink; -friend class TDocStd_XLinkIterator; -friend class TDocStd_XLinkTool; -friend class TDocStd_Owner; -friend class TDocStd_Modified; -friend class TDocStd_XLinkRoot; -friend class TDocStd_PathParser; -friend class TDocStd_CompoundDelta; -friend class TDocStd_ApplicationDelta; -friend class TDocStd_MultiTransactionManager; - }; - - - - - - #endif // _TDocStd_HeaderFile diff --git a/src/TNaming/TNaming.cxx b/src/TNaming/TNaming.cxx index 98d607b271..3e9bd279dc 100644 --- a/src/TNaming/TNaming.cxx +++ b/src/TNaming/TNaming.cxx @@ -14,6 +14,7 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. +#include #include #include @@ -24,7 +25,6 @@ #include #include #include -#include #include #include #include diff --git a/src/TNaming/TNaming.hxx b/src/TNaming/TNaming.hxx index 91f709a26b..d63f3544ba 100644 --- a/src/TNaming/TNaming.hxx +++ b/src/TNaming/TNaming.hxx @@ -180,50 +180,6 @@ public: //! the Stream and returns . Standard_EXPORT static Standard_OStream& Print (const TDF_Label& ACCESS, Standard_OStream& S); - - - -protected: - - - - - -private: - - - - -friend class TNaming_CopyShape; -friend class TNaming_TranslateTool; -friend class TNaming_Translator; -friend class TNaming_NamedShape; -friend class TNaming_UsedShapes; -friend class TNaming_Builder; -friend class TNaming_Tool; -friend class TNaming_Iterator; -friend class TNaming_NewShapeIterator; -friend class TNaming_OldShapeIterator; -friend class TNaming_SameShapeIterator; -friend class TNaming_Name; -friend class TNaming_Naming; -friend class TNaming_Selector; -friend class TNaming_DeltaOnRemoval; -friend class TNaming_DeltaOnModification; -friend class TNaming_RefShape; -friend class TNaming_Scope; -friend class TNaming_Identifier; -friend class TNaming_Localizer; -friend class TNaming_ShapesSet; -friend class TNaming_IteratorOnShapesSet; -friend class TNaming_NamingTool; - }; - - - - - - #endif // _TNaming_HeaderFile diff --git a/src/TopExp/TopExp.hxx b/src/TopExp/TopExp.hxx index b33b8b2d8b..bc3b734b9e 100644 --- a/src/TopExp/TopExp.hxx +++ b/src/TopExp/TopExp.hxx @@ -119,28 +119,6 @@ public: //! Warning: has sense only if the value is returned Standard_EXPORT static Standard_Boolean CommonVertex (const TopoDS_Edge& E1, const TopoDS_Edge& E2, TopoDS_Vertex& V); - - - -protected: - - - - - -private: - - - - -friend class TopExp_Explorer; - }; - - - - - - #endif // _TopExp_HeaderFile diff --git a/src/TopOpeBRep/TopOpeBRep.hxx b/src/TopOpeBRep/TopOpeBRep.hxx index 4a64bf6f7b..a4b04a2801 100644 --- a/src/TopOpeBRep/TopOpeBRep.hxx +++ b/src/TopOpeBRep/TopOpeBRep.hxx @@ -38,52 +38,6 @@ public: //! Stream and returns . Standard_EXPORT static Standard_OStream& Print (const TopOpeBRep_TypeLineCurve TLC, Standard_OStream& OS); - - - -protected: - - - - - -private: - - - - -friend class TopOpeBRep_VPointInter; -friend class TopOpeBRep_VPointInterIterator; -friend class TopOpeBRep_WPointInter; -friend class TopOpeBRep_WPointInterIterator; -friend class TopOpeBRep_LineInter; -friend class TopOpeBRep_Hctxff2d; -friend class TopOpeBRep_Hctxee2d; -friend class TopOpeBRep_Point2d; -friend class TopOpeBRep_PointClassifier; -friend class TopOpeBRep_VPointInterClassifier; -friend class TopOpeBRep_GeomTool; -friend class TopOpeBRep_FacesIntersector; -friend class TopOpeBRep_EdgesIntersector; -friend class TopOpeBRep_FaceEdgeIntersector; -friend class TopOpeBRep_ShapeScanner; -friend class TopOpeBRep_ShapeIntersector; -friend class TopOpeBRep_ShapeIntersector2d; -friend class TopOpeBRep_PointGeomTool; -friend class TopOpeBRep_FFTransitionTool; -friend class TopOpeBRep_Bipoint; -friend class TopOpeBRep_FacesFiller; -friend class TopOpeBRep_FFDumper; -friend class TopOpeBRep_EdgesFiller; -friend class TopOpeBRep_FaceEdgeFiller; -friend class TopOpeBRep_DSFiller; - }; - - - - - - #endif // _TopOpeBRep_HeaderFile diff --git a/src/TopOpeBRepBuild/FILES b/src/TopOpeBRepBuild/FILES index 85337b9b10..69e12e5e52 100755 --- a/src/TopOpeBRepBuild/FILES +++ b/src/TopOpeBRepBuild/FILES @@ -1,4 +1,3 @@ -TopOpeBRepBuild.cxx TopOpeBRepBuild_Area1dBuilder.cxx TopOpeBRepBuild_Area1dBuilder.hxx TopOpeBRepBuild_Area2dBuilder.cxx diff --git a/src/TopOpeBRepBuild/TopOpeBRepBuild.cxx b/src/TopOpeBRepBuild/TopOpeBRepBuild.cxx deleted file mode 100644 index 5750d7ec44..0000000000 --- a/src/TopOpeBRepBuild/TopOpeBRepBuild.cxx +++ /dev/null @@ -1,15 +0,0 @@ -// Created on: 1995-01-06 -// Created by: Jean Yves LEBEY -// Copyright (c) 1995-1999 Matra Datavision -// Copyright (c) 1999-2014 OPEN CASCADE SAS -// -// This file is part of Open CASCADE Technology software library. -// -// This library is free software; you can redistribute it and/or modify it under -// the terms of the GNU Lesser General Public License version 2.1 as published -// by the Free Software Foundation, with special exception defined in the file -// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT -// distribution for complete text of the license and disclaimer of any warranty. -// -// Alternatively, this file may be used under the terms of Open CASCADE -// commercial license or contractual agreement. diff --git a/src/TopOpeBRepDS/TopOpeBRepDS.cxx b/src/TopOpeBRepDS/TopOpeBRepDS.cxx index d4b6a7d0c0..538f786f1c 100644 --- a/src/TopOpeBRepDS/TopOpeBRepDS.cxx +++ b/src/TopOpeBRepDS/TopOpeBRepDS.cxx @@ -14,10 +14,10 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. +#include #include #include -#include #include //======================================================================= diff --git a/src/TopOpeBRepDS/TopOpeBRepDS.hxx b/src/TopOpeBRepDS/TopOpeBRepDS.hxx index c86171a76e..5af2f91bb9 100644 --- a/src/TopOpeBRepDS/TopOpeBRepDS.hxx +++ b/src/TopOpeBRepDS/TopOpeBRepDS.hxx @@ -79,73 +79,6 @@ public: Standard_EXPORT static TopOpeBRepDS_Kind ShapeToKind (const TopAbs_ShapeEnum S); - - - -protected: - - - - - -private: - - - - -friend class TopOpeBRepDS_Interference; -friend class TopOpeBRepDS_InterferenceIterator; -friend class TopOpeBRepDS_TKI; -friend class TopOpeBRepDS_Transition; -friend class TopOpeBRepDS_CurvePointInterference; -friend class TopOpeBRepDS_SurfaceCurveInterference; -friend class TopOpeBRepDS_SolidSurfaceInterference; -friend class TopOpeBRepDS_ShapeShapeInterference; -friend class TopOpeBRepDS_EdgeVertexInterference; -friend class TopOpeBRepDS_FaceEdgeInterference; -friend class TopOpeBRepDS_Surface; -friend class TopOpeBRepDS_Curve; -friend class TopOpeBRepDS_Point; -friend class TopOpeBRepDS_GeometryData; -friend class TopOpeBRepDS_SurfaceData; -friend class TopOpeBRepDS_CurveData; -friend class TopOpeBRepDS_PointData; -friend class TopOpeBRepDS_ShapeData; -friend class TopOpeBRepDS_DSS; -friend class TopOpeBRepDS_DataStructure; -friend class TopOpeBRepDS_SurfaceIterator; -friend class TopOpeBRepDS_CurveIterator; -friend class TopOpeBRepDS_PointIterator; -friend class TopOpeBRepDS_SurfaceExplorer; -friend class TopOpeBRepDS_CurveExplorer; -friend class TopOpeBRepDS_PointExplorer; -friend class TopOpeBRepDS_InterferenceTool; -friend class TopOpeBRepDS_BuildTool; -friend class TopOpeBRepDS_Dumper; -friend class TopOpeBRepDS_Marker; -friend class TopOpeBRepDS_HDataStructure; -friend class TopOpeBRepDS_EdgeInterferenceTool; -friend class TopOpeBRepDS_Edge3dInterferenceTool; -friend class TopOpeBRepDS_FaceInterferenceTool; -friend class TopOpeBRepDS_Filter; -friend class TopOpeBRepDS_Reducer; -friend class TopOpeBRepDS_TOOL; -friend class TopOpeBRepDS_FIR; -friend class TopOpeBRepDS_EIR; -friend class TopOpeBRepDS_Check; -friend class TopOpeBRepDS_GapFiller; -friend class TopOpeBRepDS_GapTool; -friend class TopOpeBRepDS_Association; -friend class TopOpeBRepDS_ListOfShapeOn1State; -friend class TopOpeBRepDS_Explorer; -friend class TopOpeBRepDS_ShapeWithState; - }; - - - - - - #endif // _TopOpeBRepDS_HeaderFile diff --git a/src/TopOpeBRepTool/TopOpeBRepTool.hxx b/src/TopOpeBRepTool/TopOpeBRepTool.hxx index 04f3d7da60..912ac17f8c 100644 --- a/src/TopOpeBRepTool/TopOpeBRepTool.hxx +++ b/src/TopOpeBRepTool/TopOpeBRepTool.hxx @@ -92,48 +92,6 @@ public: //! Prints as string on stream ; returns . Standard_EXPORT static Standard_OStream& Print (const TopOpeBRepTool_OutCurveType OCT, Standard_OStream& S); - - - -protected: - - - - - -private: - - - - -friend class TopOpeBRepTool_GeomTool; -friend class TopOpeBRepTool_AncestorsTool; -friend class TopOpeBRepTool_C2DF; -friend class TopOpeBRepTool_SolidClassifier; -friend class TopOpeBRepTool_CurveTool; -friend class TopOpeBRepTool_HBoxTool; -friend class TopOpeBRepTool_BoxSort; -friend class TopOpeBRepTool_ShapeExplorer; -friend class TopOpeBRepTool_ShapeTool; -friend class TopOpeBRepTool_ShapeClassifier; -friend class TopOpeBRepTool_connexity; -friend class TopOpeBRepTool_face; -friend class TopOpeBRepTool_CLASSI; -friend class TopOpeBRepTool_TOOL; -friend class TopOpeBRepTool_CORRISO; -friend class TopOpeBRepTool_REGUW; -friend class TopOpeBRepTool_REGUS; -friend class TopOpeBRepTool_makeTransition; -friend class TopOpeBRepTool_mkTondgE; -friend class TopOpeBRepTool_PurgeInternalEdges; -friend class TopOpeBRepTool_FuseEdges; - }; - - - - - - #endif // _TopOpeBRepTool_HeaderFile diff --git a/src/TopTools/TopTools.cxx b/src/TopTools/TopTools.cxx index d7720f4d1e..3eee8c55f3 100644 --- a/src/TopTools/TopTools.cxx +++ b/src/TopTools/TopTools.cxx @@ -14,9 +14,9 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. +#include #include -#include #include //======================================================================= diff --git a/src/TopTools/TopTools.hxx b/src/TopTools/TopTools.hxx index 2374518da8..89aea81ed5 100644 --- a/src/TopTools/TopTools.hxx +++ b/src/TopTools/TopTools.hxx @@ -84,31 +84,6 @@ public: //! position. Standard_EXPORT static void Dummy (const Standard_Integer I); - - - -protected: - - - - - -private: - - - - -friend class TopTools_ShapeMapHasher; -friend class TopTools_OrientedShapeMapHasher; -friend class TopTools_LocationSet; -friend class TopTools_ShapeSet; - }; - - - - - - #endif // _TopTools_HeaderFile diff --git a/src/TopoDS/TopoDS.hxx b/src/TopoDS/TopoDS.hxx index 988f82aaac..eccbb08a69 100644 --- a/src/TopoDS/TopoDS.hxx +++ b/src/TopoDS/TopoDS.hxx @@ -114,49 +114,8 @@ inline static TopoDS_CompSolid& CompSolid(TopoDS_Shape&); static const TopoDS_Compound& Compound (const TopoDS_Shape& S); inline static TopoDS_Compound& Compound(TopoDS_Shape&); - - - -protected: - - - - - -private: - - - - -friend class TopoDS_Shape; -friend class TopoDS_HShape; -friend class TopoDS_TShape; -friend class TopoDS_TVertex; -friend class TopoDS_Vertex; -friend class TopoDS_TEdge; -friend class TopoDS_Edge; -friend class TopoDS_TWire; -friend class TopoDS_Wire; -friend class TopoDS_TFace; -friend class TopoDS_Face; -friend class TopoDS_TShell; -friend class TopoDS_Shell; -friend class TopoDS_TSolid; -friend class TopoDS_Solid; -friend class TopoDS_TCompSolid; -friend class TopoDS_CompSolid; -friend class TopoDS_TCompound; -friend class TopoDS_Compound; -friend class TopoDS_Builder; -friend class TopoDS_Iterator; - }; - #include - - - - #endif // _TopoDS_HeaderFile diff --git a/src/TopoDSToStep/TopoDSToStep.cxx b/src/TopoDSToStep/TopoDSToStep.cxx index f10eded06d..f38ea4fd32 100644 --- a/src/TopoDSToStep/TopoDSToStep.cxx +++ b/src/TopoDSToStep/TopoDSToStep.cxx @@ -14,6 +14,7 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. +#include #include #include @@ -28,7 +29,6 @@ #include #include #include -#include #include #include #include diff --git a/src/TopoDSToStep/TopoDSToStep.hxx b/src/TopoDSToStep/TopoDSToStep.hxx index 4dba01af05..4c2ca50f81 100644 --- a/src/TopoDSToStep/TopoDSToStep.hxx +++ b/src/TopoDSToStep/TopoDSToStep.hxx @@ -73,42 +73,6 @@ public: //! (binders) stored in FinderProcess Standard_EXPORT static void AddResult (const Handle(Transfer_FinderProcess)& FP, const TopoDSToStep_Tool& Tool); - - - -protected: - - - - - -private: - - - - -friend class TopoDSToStep_Root; -friend class TopoDSToStep_MakeManifoldSolidBrep; -friend class TopoDSToStep_MakeBrepWithVoids; -friend class TopoDSToStep_MakeFacetedBrep; -friend class TopoDSToStep_MakeFacetedBrepAndBrepWithVoids; -friend class TopoDSToStep_MakeShellBasedSurfaceModel; -friend class TopoDSToStep_MakeGeometricCurveSet; -friend class TopoDSToStep_Builder; -friend class TopoDSToStep_WireframeBuilder; -friend class TopoDSToStep_Tool; -friend class TopoDSToStep_FacetedTool; -friend class TopoDSToStep_MakeStepFace; -friend class TopoDSToStep_MakeStepWire; -friend class TopoDSToStep_MakeStepEdge; -friend class TopoDSToStep_MakeStepVertex; - }; - - - - - - #endif // _TopoDSToStep_HeaderFile diff --git a/src/TransferBRep/TransferBRep.cxx b/src/TransferBRep/TransferBRep.cxx index 057ca42f2a..d1663423ae 100644 --- a/src/TransferBRep/TransferBRep.cxx +++ b/src/TransferBRep/TransferBRep.cxx @@ -11,6 +11,7 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. +#include #include #include @@ -34,7 +35,6 @@ #include #include #include -#include #include #include #include diff --git a/src/TransferBRep/TransferBRep.hxx b/src/TransferBRep/TransferBRep.hxx index 44ea2417ab..8e86f29be9 100644 --- a/src/TransferBRep/TransferBRep.hxx +++ b/src/TransferBRep/TransferBRep.hxx @@ -153,35 +153,6 @@ public: //! considered Standard_EXPORT static Interface_CheckIterator CheckObject (const Interface_CheckIterator& chl, const Handle(Standard_Transient)& obj); - - - -protected: - - - - - -private: - - - - -friend class TransferBRep_Reader; -friend class TransferBRep_ShapeInfo; -friend class TransferBRep_BinderOfShape; -friend class TransferBRep_ShapeBinder; -friend class TransferBRep_ShapeListBinder; -friend class TransferBRep_ShapeMapper; -friend class TransferBRep_OrientedShapeMapper; -friend class TransferBRep_TransferResultInfo; - }; - - - - - - #endif // _TransferBRep_HeaderFile diff --git a/src/Units/Units.cxx b/src/Units/Units.cxx index b8081560c3..802121ffe0 100644 --- a/src/Units/Units.cxx +++ b/src/Units/Units.cxx @@ -14,16 +14,8 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -// Modified Wed Apr 2 14:10:05 1997 by Gerard GRAS -// Add FirstQuantity access methods -// Modified Mon Apr 7 16:52:40 1997 by Patrick BOSINCO -// Add Dimensions access methods - -// Convertir correctement les unites translatees - -#include - #include + #include #include #include @@ -38,6 +30,8 @@ #include #include +#include + static Handle(Units_Dimensions) nulldimensions; static Handle(Units_UnitsLexicon) lexiconunits; static Handle(Units_Lexicon) lexiconformula; diff --git a/src/Units/Units.hxx b/src/Units/Units.hxx index 4a9ab0427e..f48c3f5fa9 100644 --- a/src/Units/Units.hxx +++ b/src/Units/Units.hxx @@ -87,42 +87,6 @@ public: //! return the dimension associated to the Type Standard_EXPORT static Handle(Units_Dimensions) Dimensions (const Standard_CString aType); - - - -protected: - - - - - -private: - - - - -friend class Units_Dimensions; -friend class Units_Unit; -friend class Units_ShiftedUnit; -friend class Units_Token; -friend class Units_ShiftedToken; -friend class Units_Quantity; -friend class Units_UnitsDictionary; -friend class Units_UnitsSystem; -friend class Units_Explorer; -friend class Units_Sentence; -friend class Units_MathSentence; -friend class Units_UnitSentence; -friend class Units_Lexicon; -friend class Units_UnitsLexicon; -friend class Units_Measurement; - }; - - - - - - #endif // _Units_HeaderFile diff --git a/src/Vrml/Vrml.cxx b/src/Vrml/Vrml.cxx index 77a357f29b..0eceaba0c3 100644 --- a/src/Vrml/Vrml.cxx +++ b/src/Vrml/Vrml.cxx @@ -11,10 +11,10 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. +#include #include #include -#include Standard_OStream& Vrml::VrmlHeaderWriter(Standard_OStream& anOStream) { diff --git a/src/Vrml/Vrml.hxx b/src/Vrml/Vrml.hxx index e3a7994a5f..eb9694ac2f 100644 --- a/src/Vrml/Vrml.hxx +++ b/src/Vrml/Vrml.hxx @@ -47,66 +47,6 @@ public: Standard_EXPORT static Standard_OStream& CommentWriter (const Standard_CString aComment, Standard_OStream& anOStream); - - - -protected: - - - - - -private: - - - - -friend class Vrml_SFImage; -friend class Vrml_SFRotation; -friend class Vrml_AsciiText; -friend class Vrml_Cone; -friend class Vrml_Cube; -friend class Vrml_Cylinder; -friend class Vrml_IndexedFaceSet; -friend class Vrml_IndexedLineSet; -friend class Vrml_PointSet; -friend class Vrml_Sphere; -friend class Vrml_Coordinate3; -friend class Vrml_FontStyle; -friend class Vrml_Info; -friend class Vrml_LOD; -friend class Vrml_Material; -friend class Vrml_MaterialBinding; -friend class Vrml_Normal; -friend class Vrml_NormalBinding; -friend class Vrml_Texture2; -friend class Vrml_Texture2Transform; -friend class Vrml_TextureCoordinate2; -friend class Vrml_ShapeHints; -friend class Vrml_MatrixTransform; -friend class Vrml_Rotation; -friend class Vrml_Scale; -friend class Vrml_Transform; -friend class Vrml_Translation; -friend class Vrml_OrthographicCamera; -friend class Vrml_PerspectiveCamera; -friend class Vrml_DirectionalLight; -friend class Vrml_PointLight; -friend class Vrml_SpotLight; -friend class Vrml_Group; -friend class Vrml_Separator; -friend class Vrml_Switch; -friend class Vrml_TransformSeparator; -friend class Vrml_WWWAnchor; -friend class Vrml_WWWInline; -friend class Vrml_Instancing; - }; - - - - - - #endif // _Vrml_HeaderFile diff --git a/src/VrmlAPI/VrmlAPI.cxx b/src/VrmlAPI/VrmlAPI.cxx index 03f378f461..895ac4f3df 100644 --- a/src/VrmlAPI/VrmlAPI.cxx +++ b/src/VrmlAPI/VrmlAPI.cxx @@ -13,9 +13,9 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. +#include #include -#include #include Standard_Boolean VrmlAPI::Write(const TopoDS_Shape& aShape, const Standard_CString aFileName, const Standard_Integer aVersion) { diff --git a/src/VrmlAPI/VrmlAPI.hxx b/src/VrmlAPI/VrmlAPI.hxx index ee977716b6..ccc78523a6 100644 --- a/src/VrmlAPI/VrmlAPI.hxx +++ b/src/VrmlAPI/VrmlAPI.hxx @@ -38,28 +38,6 @@ public: //! to the file identified by aFileName using default parameters. Standard_EXPORT static Standard_Boolean Write (const TopoDS_Shape& aShape, const Standard_CString aFileName, const Standard_Integer aVersion = 2); - - - -protected: - - - - - -private: - - - - -friend class VrmlAPI_Writer; - }; - - - - - - #endif // _VrmlAPI_HeaderFile diff --git a/src/XCAFPrs/XCAFPrs.hxx b/src/XCAFPrs/XCAFPrs.hxx index b416fa2381..2116f2ad69 100644 --- a/src/XCAFPrs/XCAFPrs.hxx +++ b/src/XCAFPrs/XCAFPrs.hxx @@ -47,29 +47,6 @@ public: Standard_EXPORT static Standard_Boolean GetViewNameMode(); - - - -protected: - - - - - -private: - - - - -friend class XCAFPrs_Driver; -friend class XCAFPrs_Style; - }; - - - - - - #endif // _XCAFPrs_HeaderFile diff --git a/src/XDEDRAW/XDEDRAW.cxx b/src/XDEDRAW/XDEDRAW.cxx index 270b07483b..bb35bd39b5 100644 --- a/src/XDEDRAW/XDEDRAW.cxx +++ b/src/XDEDRAW/XDEDRAW.cxx @@ -13,6 +13,7 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. +#include #include #include @@ -94,7 +95,6 @@ #include #include #include -#include #include #include #include diff --git a/src/XDEDRAW/XDEDRAW.hxx b/src/XDEDRAW/XDEDRAW.hxx index 0eb76f7ec4..c26574fd5c 100644 --- a/src/XDEDRAW/XDEDRAW.hxx +++ b/src/XDEDRAW/XDEDRAW.hxx @@ -38,32 +38,6 @@ public: //! Loads all Draw commands of TKXDEDRAW. Used for plugin. Standard_EXPORT static void Factory (Draw_Interpretor& theDI); - - - -protected: - - - - - -private: - - - - -friend class XDEDRAW_Shapes; -friend class XDEDRAW_Colors; -friend class XDEDRAW_Layers; -friend class XDEDRAW_Props; -friend class XDEDRAW_Common; - }; - - - - - - #endif // _XDEDRAW_HeaderFile diff --git a/src/XSAlgo/XSAlgo.cxx b/src/XSAlgo/XSAlgo.cxx index a1c20cebec..8515b50075 100644 --- a/src/XSAlgo/XSAlgo.cxx +++ b/src/XSAlgo/XSAlgo.cxx @@ -13,11 +13,11 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. +#include #include #include #include -#include #include static Handle(XSAlgo_AlgoContainer) theContainer; diff --git a/src/XSAlgo/XSAlgo.hxx b/src/XSAlgo/XSAlgo.hxx index ea29c2db24..382f31f83b 100644 --- a/src/XSAlgo/XSAlgo.hxx +++ b/src/XSAlgo/XSAlgo.hxx @@ -42,29 +42,6 @@ public: //! Returns default AlgoContainer Standard_EXPORT static Handle(XSAlgo_AlgoContainer) AlgoContainer(); - - - -protected: - - - - - -private: - - - - -friend class XSAlgo_ToolContainer; -friend class XSAlgo_AlgoContainer; - }; - - - - - - #endif // _XSAlgo_HeaderFile diff --git a/src/XSControl/XSControl.cxx b/src/XSControl/XSControl.cxx index 62dc96cb98..7b74aedce8 100644 --- a/src/XSControl/XSControl.cxx +++ b/src/XSControl/XSControl.cxx @@ -11,9 +11,9 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. +#include #include -#include #include #include diff --git a/src/XSControl/XSControl.hxx b/src/XSControl/XSControl.hxx index 67df55c8b8..dcb9b5d553 100644 --- a/src/XSControl/XSControl.hxx +++ b/src/XSControl/XSControl.hxx @@ -43,40 +43,6 @@ public: //! it provides access to external variables Standard_EXPORT static Handle(XSControl_Vars) Vars (const Handle(IFSelect_SessionPilot)& pilot); - - - -protected: - - - - - -private: - - - - -friend class XSControl_Controller; -friend class XSControl_TransferReader; -friend class XSControl_TransferWriter; -friend class XSControl_WorkSession; -friend class XSControl_SelectForTransfer; -friend class XSControl_SignTransferStatus; -friend class XSControl_ConnectedShapes; -friend class XSControl_Reader; -friend class XSControl_Writer; -friend class XSControl_Functions; -friend class XSControl_FuncShape; -friend class XSControl_Utils; -friend class XSControl_Vars; - }; - - - - - - #endif // _XSControl_HeaderFile diff --git a/src/XSDRAWSTLVRML/XSDRAWSTLVRML.cxx b/src/XSDRAWSTLVRML/XSDRAWSTLVRML.cxx index e1e85d3151..e3d28131c8 100644 --- a/src/XSDRAWSTLVRML/XSDRAWSTLVRML.cxx +++ b/src/XSDRAWSTLVRML/XSDRAWSTLVRML.cxx @@ -13,6 +13,7 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. +#include #include #include @@ -79,7 +80,6 @@ #include #include #include -#include #include #include #include diff --git a/src/XSDRAWSTLVRML/XSDRAWSTLVRML.hxx b/src/XSDRAWSTLVRML/XSDRAWSTLVRML.hxx index 21388296fc..f7fd4dd7cd 100644 --- a/src/XSDRAWSTLVRML/XSDRAWSTLVRML.hxx +++ b/src/XSDRAWSTLVRML/XSDRAWSTLVRML.hxx @@ -30,37 +30,12 @@ public: DEFINE_STANDARD_ALLOC - //! Inits commands for writing to STL and VRML formats Standard_EXPORT static void InitCommands (Draw_Interpretor& theCommands); //! Loads all Draw commands of TKXSDRAW. Used for plugin. Standard_EXPORT static void Factory (Draw_Interpretor& theDI); - - - -protected: - - - - - -private: - - - - -friend class XSDRAWSTLVRML_DataSource; -friend class XSDRAWSTLVRML_DataSource3D; -friend class XSDRAWSTLVRML_DrawableMesh; - }; - - - - - - #endif // _XSDRAWSTLVRML_HeaderFile diff --git a/src/XmlMDataStd/XmlMDataStd.cxx b/src/XmlMDataStd/XmlMDataStd.cxx index 95d1b81c1d..7eda683add 100644 --- a/src/XmlMDataStd/XmlMDataStd.cxx +++ b/src/XmlMDataStd/XmlMDataStd.cxx @@ -13,10 +13,9 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -// modified 20.04.2009 Sergey Zaritchny +#include #include -#include #include #include #include diff --git a/src/XmlMDataStd/XmlMDataStd.hxx b/src/XmlMDataStd/XmlMDataStd.hxx index 5ce3539d4f..7740548871 100644 --- a/src/XmlMDataStd/XmlMDataStd.hxx +++ b/src/XmlMDataStd/XmlMDataStd.hxx @@ -31,52 +31,9 @@ public: DEFINE_STANDARD_ALLOC - //! Adds the attribute drivers to . Standard_EXPORT static void AddDrivers (const Handle(XmlMDF_ADriverTable)& aDriverTable, const Handle(Message_Messenger)& anMsgDrv); - -protected: - - - - - -private: - - - - -friend class XmlMDataStd_GenericExtStringDriver; -friend class XmlMDataStd_IntegerDriver; -friend class XmlMDataStd_RealDriver; -friend class XmlMDataStd_IntegerArrayDriver; -friend class XmlMDataStd_RealArrayDriver; -friend class XmlMDataStd_ExtStringArrayDriver; -friend class XmlMDataStd_UAttributeDriver; -friend class XmlMDataStd_VariableDriver; -friend class XmlMDataStd_ExpressionDriver; -friend class XmlMDataStd_RelationDriver; -friend class XmlMDataStd_TreeNodeDriver; -friend class XmlMDataStd_GenericEmptyDriver; -friend class XmlMDataStd_IntegerListDriver; -friend class XmlMDataStd_RealListDriver; -friend class XmlMDataStd_ExtStringListDriver; -friend class XmlMDataStd_BooleanListDriver; -friend class XmlMDataStd_ReferenceListDriver; -friend class XmlMDataStd_BooleanArrayDriver; -friend class XmlMDataStd_ReferenceArrayDriver; -friend class XmlMDataStd_ByteArrayDriver; -friend class XmlMDataStd_NamedDataDriver; -friend class XmlMDataStd_AsciiStringDriver; -friend class XmlMDataStd_IntPackedMapDriver; - }; - - - - - - #endif // _XmlMDataStd_HeaderFile diff --git a/src/XmlMDataXtd/XmlMDataXtd.cxx b/src/XmlMDataXtd/XmlMDataXtd.cxx index 9a63cbc18f..be331a0dc5 100644 --- a/src/XmlMDataXtd/XmlMDataXtd.cxx +++ b/src/XmlMDataXtd/XmlMDataXtd.cxx @@ -13,10 +13,9 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -// modified 20.04.2009 Sergey Zaritchny +#include #include -#include #include #include #include diff --git a/src/XmlMDataXtd/XmlMDataXtd.hxx b/src/XmlMDataXtd/XmlMDataXtd.hxx index 2c6b3a7128..4e7c3c8ed8 100644 --- a/src/XmlMDataXtd/XmlMDataXtd.hxx +++ b/src/XmlMDataXtd/XmlMDataXtd.hxx @@ -38,31 +38,6 @@ public: Standard_EXPORT static Standard_Integer DocumentVersion(); - - - -protected: - - - - - -private: - - - - -friend class XmlMDataXtd_GeometryDriver; -friend class XmlMDataXtd_ConstraintDriver; -friend class XmlMDataXtd_PatternStdDriver; -friend class XmlMDataXtd_TriangulationDriver; - }; - - - - - - #endif // _XmlMDataXtd_HeaderFile diff --git a/src/XmlMDocStd/XmlMDocStd.cxx b/src/XmlMDocStd/XmlMDocStd.cxx index 7fa7bd085e..3827fe22cb 100644 --- a/src/XmlMDocStd/XmlMDocStd.cxx +++ b/src/XmlMDocStd/XmlMDocStd.cxx @@ -13,10 +13,10 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. +#include #include #include -#include #include //======================================================================= diff --git a/src/XmlMDocStd/XmlMDocStd.hxx b/src/XmlMDocStd/XmlMDocStd.hxx index 46eb4a0575..bbf5f038cd 100644 --- a/src/XmlMDocStd/XmlMDocStd.hxx +++ b/src/XmlMDocStd/XmlMDocStd.hxx @@ -35,28 +35,6 @@ public: //! Adds the attribute drivers to . Standard_EXPORT static void AddDrivers (const Handle(XmlMDF_ADriverTable)& aDriverTable, const Handle(Message_Messenger)& theMessageDriver); - - - -protected: - - - - - -private: - - - - -friend class XmlMDocStd_XLinkDriver; - }; - - - - - - #endif // _XmlMDocStd_HeaderFile diff --git a/src/XmlMFunction/XmlMFunction.cxx b/src/XmlMFunction/XmlMFunction.cxx index 8b72f1a574..bcb2f4f9d9 100644 --- a/src/XmlMFunction/XmlMFunction.cxx +++ b/src/XmlMFunction/XmlMFunction.cxx @@ -13,10 +13,10 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. +#include #include #include -#include #include #include #include diff --git a/src/XmlMFunction/XmlMFunction.hxx b/src/XmlMFunction/XmlMFunction.hxx index 594e122af9..3bdd58cace 100644 --- a/src/XmlMFunction/XmlMFunction.hxx +++ b/src/XmlMFunction/XmlMFunction.hxx @@ -31,34 +31,9 @@ public: DEFINE_STANDARD_ALLOC - //! Adds the attribute storage drivers to . Standard_EXPORT static void AddDrivers (const Handle(XmlMDF_ADriverTable)& aDriverTable, const Handle(Message_Messenger)& theMessageDriver); - - - -protected: - - - - - -private: - - - - -friend class XmlMFunction_FunctionDriver; -friend class XmlMFunction_ScopeDriver; -friend class XmlMFunction_GraphNodeDriver; - }; - - - - - - #endif // _XmlMFunction_HeaderFile diff --git a/src/XmlMNaming/XmlMNaming.cxx b/src/XmlMNaming/XmlMNaming.cxx index c2538e7e8f..ddd21756c2 100644 --- a/src/XmlMNaming/XmlMNaming.cxx +++ b/src/XmlMNaming/XmlMNaming.cxx @@ -13,10 +13,10 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. +#include #include #include -#include #include #include diff --git a/src/XmlMNaming/XmlMNaming.hxx b/src/XmlMNaming/XmlMNaming.hxx index 41b574e23d..eaaede6a43 100644 --- a/src/XmlMNaming/XmlMNaming.hxx +++ b/src/XmlMNaming/XmlMNaming.hxx @@ -32,32 +32,9 @@ public: DEFINE_STANDARD_ALLOC - //! Adds the attribute drivers to . Standard_EXPORT static void AddDrivers (const Handle(XmlMDF_ADriverTable)& aDriverTable, const Handle(Message_Messenger)& aMessageDriver); - -protected: - - - - - -private: - - - - -friend class XmlMNaming_NamedShapeDriver; -friend class XmlMNaming_NamingDriver; -friend class XmlMNaming_Shape1; - }; - - - - - - #endif // _XmlMNaming_HeaderFile diff --git a/src/XmlMXCAFDoc/XmlMXCAFDoc.cxx b/src/XmlMXCAFDoc/XmlMXCAFDoc.cxx index ffd01b6df8..95ab0a7002 100644 --- a/src/XmlMXCAFDoc/XmlMXCAFDoc.cxx +++ b/src/XmlMXCAFDoc/XmlMXCAFDoc.cxx @@ -13,12 +13,12 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. +#include #include #include #include #include -#include #include #include #include diff --git a/src/XmlMXCAFDoc/XmlMXCAFDoc.hxx b/src/XmlMXCAFDoc/XmlMXCAFDoc.hxx index 66f73c07e9..a0013a112b 100644 --- a/src/XmlMXCAFDoc/XmlMXCAFDoc.hxx +++ b/src/XmlMXCAFDoc/XmlMXCAFDoc.hxx @@ -32,39 +32,9 @@ public: DEFINE_STANDARD_ALLOC - //! Adds the attribute drivers to . Standard_EXPORT static void AddDrivers (const Handle(XmlMDF_ADriverTable)& aDriverTable, const Handle(Message_Messenger)& anMsgDrv); - - - -protected: - - - - - -private: - - - - -friend class XmlMXCAFDoc_CentroidDriver; -friend class XmlMXCAFDoc_ColorDriver; -friend class XmlMXCAFDoc_GraphNodeDriver; -friend class XmlMXCAFDoc_LengthUnitDriver; -friend class XmlMXCAFDoc_LocationDriver; -friend class XmlMXCAFDoc_DatumDriver; -friend class XmlMXCAFDoc_DimTolDriver; -friend class XmlMXCAFDoc_MaterialDriver; - }; - - - - - - #endif // _XmlMXCAFDoc_HeaderFile diff --git a/src/XmlObjMgt/XmlObjMgt.cxx b/src/XmlObjMgt/XmlObjMgt.cxx index bf61608dfa..cb26845faa 100644 --- a/src/XmlObjMgt/XmlObjMgt.cxx +++ b/src/XmlObjMgt/XmlObjMgt.cxx @@ -13,12 +13,11 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -//AGV 150202: Add parameter isClearText to SetStringValue() +#include #include #include #include -#include #include #include diff --git a/src/XmlObjMgt/XmlObjMgt.hxx b/src/XmlObjMgt/XmlObjMgt.hxx index 218653f18d..de410089f9 100644 --- a/src/XmlObjMgt/XmlObjMgt.hxx +++ b/src/XmlObjMgt/XmlObjMgt.hxx @@ -78,30 +78,6 @@ public: Standard_EXPORT static Standard_Boolean GetReal (const XmlObjMgt_DOMString& theString, Standard_Real& theValue); - - - -protected: - - - - - -private: - - - - -friend class XmlObjMgt_Persistent; -friend class XmlObjMgt_GP; -friend class XmlObjMgt_Array1; - }; - - - - - - #endif // _XmlObjMgt_HeaderFile diff --git a/src/math/math.hxx b/src/math/math.hxx index f44e215ff4..a9eaeb4faa 100644 --- a/src/math/math.hxx +++ b/src/math/math.hxx @@ -70,67 +70,6 @@ public: //! Otherwise this method returns Standard_False. Standard_EXPORT static Standard_Boolean KronrodPointsAndWeights (const Standard_Integer Index, math_Vector& Points, math_Vector& Weights); - - - -protected: - - - - - -private: - - - - -friend class math_Matrix; -friend class math_Function; -friend class math_FunctionWithDerivative; -friend class math_MultipleVarFunction; -friend class math_MultipleVarFunctionWithGradient; -friend class math_MultipleVarFunctionWithHessian; -friend class math_FunctionSet; -friend class math_FunctionSetWithDerivatives; -friend class math_Gauss; -friend class math_GaussLeastSquare; -friend class math_SVD; -friend class math_DirectPolynomialRoots; -friend class math_FunctionRoots; -friend class math_BissecNewton; -friend class math_FunctionRoot; -friend class math_NewtonFunctionRoot; -friend class math_BracketedRoot; -friend class math_FunctionSetRoot; -friend class math_NewtonFunctionSetRoot; -friend class math_BracketMinimum; -friend class math_BrentMinimum; -friend class math_Powell; -friend class math_FRPR; -friend class math_BFGS; -friend class math_NewtonMinimum; -friend class math_Jacobi; -friend class math_GaussSingleIntegration; -friend class math_GaussMultipleIntegration; -friend class math_GaussSetIntegration; -friend class math_FunctionSample; -friend class math_FunctionAllRoots; -friend class math_Householder; -friend class math_Crout; -friend class math_Uzawa; -friend class math_TrigonometricFunctionRoots; -friend class math_KronrodSingleIntegration; -friend class math_EigenValuesSearcher; -friend class math_ComputeGaussPointsAndWeights; -friend class math_ComputeKronrodPointsAndWeights; -friend class math_DoubleTab; - }; - - - - - - #endif // _math_HeaderFile From f32cb549d8040e5369412b5aede52a78f475d612 Mon Sep 17 00:00:00 2001 From: aml Date: Sun, 19 Dec 2021 10:43:29 +0300 Subject: [PATCH 180/639] 0032742: Coding - get rid of unused headers [Adaptor2d to Approx] --- src/AIS/AIS_AnimationCamera.cxx | 2 -- src/AIS/AIS_AnimationObject.cxx | 2 -- src/AIS/AIS_AttributeFilter.hxx | 1 - src/AIS/AIS_Axis.cxx | 2 -- src/AIS/AIS_BadEdgeFilter.cxx | 3 --- src/AIS/AIS_BadEdgeFilter.hxx | 2 -- src/AIS/AIS_C0RegularityFilter.cxx | 1 - src/AIS/AIS_C0RegularityFilter.hxx | 2 -- src/AIS/AIS_Circle.cxx | 3 --- src/AIS/AIS_ColorScale.cxx | 8 -------- src/AIS/AIS_ColoredShape.cxx | 7 ------- src/AIS/AIS_ColoredShape.hxx | 1 - src/AIS/AIS_ConnectedInteractive.cxx | 6 ------ src/AIS/AIS_DataMapOfShapeDrawer.hxx | 1 - src/AIS/AIS_ExclusionFilter.cxx | 1 - src/AIS/AIS_ExclusionFilter.hxx | 1 - src/AIS/AIS_GlobalStatus.hxx | 3 --- src/AIS/AIS_GraphicTool.cxx | 2 -- src/AIS/AIS_GraphicTool.hxx | 1 - src/AIS/AIS_InteractiveContext.cxx | 3 --- src/AIS/AIS_InteractiveContext.hxx | 1 - src/AIS/AIS_InteractiveObject.cxx | 4 ---- src/AIS/AIS_LightSource.cxx | 1 - src/AIS/AIS_LightSource.hxx | 1 - src/AIS/AIS_Line.cxx | 3 --- src/AIS/AIS_Manipulator.cxx | 1 + src/AIS/AIS_Manipulator.hxx | 3 --- src/AIS/AIS_MediaPlayer.cxx | 2 -- src/AIS/AIS_MultipleConnectedInteractive.cxx | 3 --- src/AIS/AIS_Plane.cxx | 5 ----- src/AIS/AIS_PlaneTrihedron.cxx | 6 ------ src/AIS/AIS_Point.cxx | 4 ---- src/AIS/AIS_Point.hxx | 1 - src/AIS/AIS_PointCloud.cxx | 2 -- src/AIS/AIS_RubberBand.cxx | 3 --- src/AIS/AIS_Shape.cxx | 14 -------------- src/AIS/AIS_Shape.hxx | 1 + src/AIS/AIS_SignatureFilter.hxx | 1 - src/AIS/AIS_TexturedShape.cxx | 3 --- src/AIS/AIS_TexturedShape.hxx | 2 -- src/AIS/AIS_Triangulation.cxx | 4 ---- src/AIS/AIS_Trihedron.cxx | 3 +-- src/AIS/AIS_Trihedron.hxx | 4 ---- src/AIS/AIS_TypeFilter.hxx | 1 - src/AIS/AIS_ViewController.cxx | 3 --- src/AIS/AIS_ViewController.hxx | 2 -- src/AIS/AIS_ViewCube.cxx | 2 -- src/AIS/AIS_XRTrackedDevice.cxx | 1 - .../APIHeaderSection_EditHeader.cxx | 1 - .../APIHeaderSection_EditHeader.hxx | 2 -- .../APIHeaderSection_MakeHeader.cxx | 1 - .../APIHeaderSection_MakeHeader.hxx | 1 - src/Adaptor2d/Adaptor2d_Curve2d.cxx | 3 --- src/Adaptor2d/Adaptor2d_Line2d.cxx | 1 - src/Adaptor2d/Adaptor2d_Line2d.hxx | 2 -- src/Adaptor2d/Adaptor2d_OffsetCurve.cxx | 3 --- src/Adaptor3d/Adaptor3d_Curve.cxx | 3 --- src/Adaptor3d/Adaptor3d_Curve.hxx | 1 - src/Adaptor3d/Adaptor3d_CurveOnSurface.cxx | 3 --- src/Adaptor3d/Adaptor3d_CurveOnSurface.hxx | 1 - src/Adaptor3d/Adaptor3d_HSurfaceTool.cxx | 4 ---- src/Adaptor3d/Adaptor3d_HSurfaceTool.hxx | 1 - src/Adaptor3d/Adaptor3d_IsoCurve.cxx | 6 ------ src/Adaptor3d/Adaptor3d_IsoCurve.hxx | 1 - src/Adaptor3d/Adaptor3d_Surface.cxx | 3 --- src/AdvApp2Var/AdvApp2Var_ApproxAFunc2Var.cxx | 3 --- src/AdvApp2Var/AdvApp2Var_ApproxAFunc2Var.hxx | 3 --- src/AdvApp2Var/AdvApp2Var_Criterion.cxx | 2 -- .../AdvApp2Var_EvaluatorFunc2Var.hxx | 2 -- .../AdvApp2Var_MathBase_mathinit.cxx | 1 - src/AdvApp2Var/AdvApp2Var_Network.cxx | 1 - src/AdvApp2Var/AdvApp2Var_Network.hxx | 2 -- src/AdvApp2Var/AdvApp2Var_Node.hxx | 1 - src/AdvApp2Var/AdvApp2Var_Patch.cxx | 2 -- src/AdvApp2Var/AdvApp2Var_Patch.hxx | 1 - src/AdvApp2Var/AdvApp2Var_SysBase.cxx | 2 -- src/AdvApp2Var/AdvApp2Var_SysBase.hxx | 1 - src/AdvApprox/AdvApprox_ApproxAFunction.cxx | 2 -- src/AdvApprox/AdvApprox_EvaluatorFunction.hxx | 2 -- src/AdvApprox/AdvApprox_PrefAndRec.hxx | 1 - src/AdvApprox/AdvApprox_PrefCutting.hxx | 2 -- src/AdvApprox/AdvApprox_SimpleApprox.cxx | 2 -- src/AdvApprox/AdvApprox_SimpleApprox.hxx | 2 -- src/AppBlend/AppBlend_Approx.cxx | 3 --- src/AppBlend/AppBlend_Approx.hxx | 2 -- src/AppCont/AppCont_ContMatrices.hxx | 1 - src/AppCont/AppCont_LeastSquare.cxx | 1 - src/AppCont/AppCont_LeastSquare.hxx | 1 - ...t_BFGSOfMyBSplGradientOfBSplineCompute.hxx | 3 --- ...nctionOfMyBSplGradientOfBSplineCompute.hxx | 4 ---- ...SquareOfMyBSplGradientOfBSplineCompute.hxx | 2 -- src/AppDef/AppDef_BSplineCompute.hxx | 1 - src/AppDef/AppDef_Compute.hxx | 2 -- ...Def_Gradient_BFGSOfMyGradientOfCompute.hxx | 3 --- ...nt_BFGSOfMyGradientbisOfBSplineCompute.hxx | 3 --- .../AppDef_Gradient_BFGSOfTheGradient.hxx | 3 --- src/AppDef/AppDef_LinearCriteria.cxx | 4 ---- src/AppDef/AppDef_LinearCriteria.hxx | 3 --- src/AppDef/AppDef_MultiLine.cxx | 1 - src/AppDef/AppDef_MultiLine.hxx | 1 - src/AppDef/AppDef_MultiPointConstraint.cxx | 3 --- .../AppDef_MyBSplGradientOfBSplineCompute.hxx | 1 - src/AppDef/AppDef_MyGradientOfCompute.hxx | 1 - .../AppDef_MyGradientbisOfBSplineCompute.hxx | 1 - src/AppDef/AppDef_MyLineTool.hxx | 2 -- ...ppDef_ParFunctionOfMyGradientOfCompute.hxx | 4 ---- ...unctionOfMyGradientbisOfBSplineCompute.hxx | 4 ---- .../AppDef_ParFunctionOfTheGradient.hxx | 4 ---- ...ef_ParLeastSquareOfMyGradientOfCompute.hxx | 1 - ...tSquareOfMyGradientbisOfBSplineCompute.hxx | 1 - .../AppDef_ParLeastSquareOfTheGradient.hxx | 1 - ...Def_ResConstraintOfMyGradientOfCompute.hxx | 1 - ...straintOfMyGradientbisOfBSplineCompute.hxx | 1 - .../AppDef_ResConstraintOfTheGradient.hxx | 1 - src/AppDef/AppDef_SmoothCriterion.cxx | 2 -- src/AppDef/AppDef_SmoothCriterion.hxx | 1 - src/AppDef/AppDef_TheFunction.hxx | 4 ---- src/AppDef/AppDef_TheGradient.hxx | 1 - src/AppDef/AppDef_TheLeastSquares.hxx | 1 - src/AppDef/AppDef_TheResol.hxx | 1 - src/AppDef/AppDef_Variational.cxx | 19 ------------------- src/AppDef/AppDef_Variational.hxx | 4 ---- src/AppParCurves/AppParCurves.cxx | 2 -- src/AppParCurves/AppParCurves.hxx | 2 -- .../AppParCurves_ConstraintCouple.hxx | 1 - ...AppParCurves_HArray1OfConstraintCouple.hxx | 1 - .../AppParCurves_MultiBSpCurve.cxx | 2 -- .../AppParCurves_MultiBSpCurve.hxx | 1 - src/AppParCurves/AppParCurves_MultiCurve.cxx | 3 --- src/AppParCurves/AppParCurves_MultiPoint.cxx | 1 - src/Approx/Approx_Curve3d.cxx | 2 -- src/Approx/Approx_CurveOnSurface.cxx | 3 --- src/Approx/Approx_CurvilinearParameter.cxx | 6 ------ src/Approx/Approx_CurvlinFunc.cxx | 2 -- src/Approx/Approx_CurvlinFunc.hxx | 1 - src/Approx/Approx_FitAndDivide.hxx | 3 --- src/Approx/Approx_FitAndDivide2d.hxx | 3 --- src/Approx/Approx_HArray1OfGTrsf2d.hxx | 1 - src/Approx/Approx_MCurvesToBSpCurve.cxx | 4 ---- src/Approx/Approx_MCurvesToBSpCurve.hxx | 2 -- src/Approx/Approx_SameParameter.cxx | 7 ------- src/Approx/Approx_SweepApproximation.cxx | 5 ----- src/Approx/Approx_SweepApproximation.hxx | 2 -- src/Approx/Approx_SweepFunction.cxx | 1 - src/Approx/Approx_SweepFunction.hxx | 2 -- tools/View/View_Widget.cxx | 1 + 146 files changed, 4 insertions(+), 353 deletions(-) diff --git a/src/AIS/AIS_AnimationCamera.cxx b/src/AIS/AIS_AnimationCamera.cxx index 8ca5e2ea36..5623040dcc 100644 --- a/src/AIS/AIS_AnimationCamera.cxx +++ b/src/AIS/AIS_AnimationCamera.cxx @@ -14,8 +14,6 @@ #include -#include -#include #include IMPLEMENT_STANDARD_RTTIEXT(AIS_AnimationCamera, AIS_Animation) diff --git a/src/AIS/AIS_AnimationObject.cxx b/src/AIS/AIS_AnimationObject.cxx index 74ec0e4040..faff48f054 100644 --- a/src/AIS/AIS_AnimationObject.cxx +++ b/src/AIS/AIS_AnimationObject.cxx @@ -15,8 +15,6 @@ #include #include -#include -#include #include IMPLEMENT_STANDARD_RTTIEXT(AIS_AnimationObject, AIS_Animation) diff --git a/src/AIS/AIS_AttributeFilter.hxx b/src/AIS/AIS_AttributeFilter.hxx index 3e492aadff..0d910bed46 100644 --- a/src/AIS/AIS_AttributeFilter.hxx +++ b/src/AIS/AIS_AttributeFilter.hxx @@ -22,7 +22,6 @@ #include #include -#include #include class SelectMgr_EntityOwner; diff --git a/src/AIS/AIS_Axis.cxx b/src/AIS/AIS_Axis.cxx index e4864120f4..9580e5c223 100644 --- a/src/AIS/AIS_Axis.cxx +++ b/src/AIS/AIS_Axis.cxx @@ -36,8 +36,6 @@ #include #include #include -#include -#include #include IMPLEMENT_STANDARD_RTTIEXT(AIS_Axis,AIS_InteractiveObject) diff --git a/src/AIS/AIS_BadEdgeFilter.cxx b/src/AIS/AIS_BadEdgeFilter.cxx index f8ca6055a2..1bdd5b27d8 100644 --- a/src/AIS/AIS_BadEdgeFilter.cxx +++ b/src/AIS/AIS_BadEdgeFilter.cxx @@ -17,12 +17,9 @@ // #include -#include #include #include #include -#include -#include #include IMPLEMENT_STANDARD_RTTIEXT(AIS_BadEdgeFilter,SelectMgr_Filter) diff --git a/src/AIS/AIS_BadEdgeFilter.hxx b/src/AIS/AIS_BadEdgeFilter.hxx index 89a7e937c1..a9f1ab19a6 100644 --- a/src/AIS/AIS_BadEdgeFilter.hxx +++ b/src/AIS/AIS_BadEdgeFilter.hxx @@ -18,12 +18,10 @@ #define _AIS_BadEdgeFilter_HeaderFile #include -#include #include #include #include -#include #include class SelectMgr_EntityOwner; class TopoDS_Edge; diff --git a/src/AIS/AIS_C0RegularityFilter.cxx b/src/AIS/AIS_C0RegularityFilter.cxx index 7d4c9da7a4..8becc91faa 100644 --- a/src/AIS/AIS_C0RegularityFilter.cxx +++ b/src/AIS/AIS_C0RegularityFilter.cxx @@ -18,7 +18,6 @@ #include #include #include -#include #include #include #include diff --git a/src/AIS/AIS_C0RegularityFilter.hxx b/src/AIS/AIS_C0RegularityFilter.hxx index 9b5e2c3a2d..6da54fe2fe 100644 --- a/src/AIS/AIS_C0RegularityFilter.hxx +++ b/src/AIS/AIS_C0RegularityFilter.hxx @@ -18,11 +18,9 @@ #define _AIS_C0RegularityFilter_HeaderFile #include -#include #include #include -#include #include class TopoDS_Shape; class SelectMgr_EntityOwner; diff --git a/src/AIS/AIS_Circle.cxx b/src/AIS/AIS_Circle.cxx index 9a8371f70f..70c7e7957e 100644 --- a/src/AIS/AIS_Circle.cxx +++ b/src/AIS/AIS_Circle.cxx @@ -18,7 +18,6 @@ #include #include -#include #include #include #include @@ -32,8 +31,6 @@ #include #include #include -#include -#include IMPLEMENT_STANDARD_RTTIEXT(AIS_Circle,AIS_InteractiveObject) diff --git a/src/AIS/AIS_ColorScale.cxx b/src/AIS/AIS_ColorScale.cxx index 70aa1ec75f..08ec0bcf75 100644 --- a/src/AIS/AIS_ColorScale.cxx +++ b/src/AIS/AIS_ColorScale.cxx @@ -17,26 +17,18 @@ #include #include #include -#include #include #include -#include #include #include #include #include #include #include -#include -#include #include #include -#include -#include #include -#include #include -#include #include IMPLEMENT_STANDARD_RTTIEXT(AIS_ColorScale, AIS_InteractiveObject) diff --git a/src/AIS/AIS_ColoredShape.cxx b/src/AIS/AIS_ColoredShape.cxx index b3bfb64a9a..ec68acf925 100644 --- a/src/AIS/AIS_ColoredShape.cxx +++ b/src/AIS/AIS_ColoredShape.cxx @@ -19,28 +19,21 @@ #include #include #include -#include #include #include #include #include #include #include -#include #include -#include -#include -#include #include #include #include -#include #include #include #include #include #include -#include #include #include diff --git a/src/AIS/AIS_ColoredShape.hxx b/src/AIS/AIS_ColoredShape.hxx index 55a4069311..570b0c65e1 100644 --- a/src/AIS/AIS_ColoredShape.hxx +++ b/src/AIS/AIS_ColoredShape.hxx @@ -19,7 +19,6 @@ #include #include #include -#include #include #include #include diff --git a/src/AIS/AIS_ConnectedInteractive.cxx b/src/AIS/AIS_ConnectedInteractive.cxx index bf38ac2973..64decc8336 100644 --- a/src/AIS/AIS_ConnectedInteractive.cxx +++ b/src/AIS/AIS_ConnectedInteractive.cxx @@ -20,22 +20,16 @@ #include #include #include -#include -#include #include #include #include #include -#include #include #include #include -#include #include #include -#include #include -#include #include IMPLEMENT_STANDARD_RTTIEXT(AIS_ConnectedInteractive,AIS_InteractiveObject) diff --git a/src/AIS/AIS_DataMapOfShapeDrawer.hxx b/src/AIS/AIS_DataMapOfShapeDrawer.hxx index ffa340ea9e..9655723226 100644 --- a/src/AIS/AIS_DataMapOfShapeDrawer.hxx +++ b/src/AIS/AIS_DataMapOfShapeDrawer.hxx @@ -16,7 +16,6 @@ #include #include -#include #include typedef NCollection_DataMap AIS_DataMapOfShapeDrawer; diff --git a/src/AIS/AIS_ExclusionFilter.cxx b/src/AIS/AIS_ExclusionFilter.cxx index 46e9878d53..639b226a30 100644 --- a/src/AIS/AIS_ExclusionFilter.cxx +++ b/src/AIS/AIS_ExclusionFilter.cxx @@ -20,7 +20,6 @@ #include #include #include -#include #include IMPLEMENT_STANDARD_RTTIEXT(AIS_ExclusionFilter,SelectMgr_Filter) diff --git a/src/AIS/AIS_ExclusionFilter.hxx b/src/AIS/AIS_ExclusionFilter.hxx index ca43911f66..f182d43585 100644 --- a/src/AIS/AIS_ExclusionFilter.hxx +++ b/src/AIS/AIS_ExclusionFilter.hxx @@ -20,7 +20,6 @@ #include #include -#include #include #include #include diff --git a/src/AIS/AIS_GlobalStatus.hxx b/src/AIS/AIS_GlobalStatus.hxx index 9a1585a015..e823e7960e 100644 --- a/src/AIS/AIS_GlobalStatus.hxx +++ b/src/AIS/AIS_GlobalStatus.hxx @@ -18,13 +18,10 @@ #define _AIS_GlobalStatus_HeaderFile #include -#include -#include #include #include #include -#include #include DEFINE_STANDARD_HANDLE(AIS_GlobalStatus, Standard_Transient) diff --git a/src/AIS/AIS_GraphicTool.cxx b/src/AIS/AIS_GraphicTool.cxx index 0b31453cf1..d0f3128472 100644 --- a/src/AIS/AIS_GraphicTool.cxx +++ b/src/AIS/AIS_GraphicTool.cxx @@ -16,9 +16,7 @@ #include -#include #include -#include #include #include #include diff --git a/src/AIS/AIS_GraphicTool.hxx b/src/AIS/AIS_GraphicTool.hxx index 453f22a443..599339ec0b 100644 --- a/src/AIS/AIS_GraphicTool.hxx +++ b/src/AIS/AIS_GraphicTool.hxx @@ -21,7 +21,6 @@ #include #include -#include #include #include #include diff --git a/src/AIS/AIS_InteractiveContext.cxx b/src/AIS/AIS_InteractiveContext.cxx index 427dd5a08e..a2130989ac 100644 --- a/src/AIS/AIS_InteractiveContext.cxx +++ b/src/AIS/AIS_InteractiveContext.cxx @@ -21,9 +21,7 @@ #include #include #include -#include #include -#include #include #include #include @@ -31,7 +29,6 @@ #include #include #include -#include #include #include #include diff --git a/src/AIS/AIS_InteractiveContext.hxx b/src/AIS/AIS_InteractiveContext.hxx index 9f2f2647ad..5b9ec24c28 100644 --- a/src/AIS/AIS_InteractiveContext.hxx +++ b/src/AIS/AIS_InteractiveContext.hxx @@ -42,7 +42,6 @@ #include #include #include -#include #include class V3d_Viewer; diff --git a/src/AIS/AIS_InteractiveObject.cxx b/src/AIS/AIS_InteractiveObject.cxx index f11083300f..b1f43ab8bf 100644 --- a/src/AIS/AIS_InteractiveObject.cxx +++ b/src/AIS/AIS_InteractiveObject.cxx @@ -17,10 +17,6 @@ #include #include -#include -#include -#include -#include #include #include #include diff --git a/src/AIS/AIS_LightSource.cxx b/src/AIS/AIS_LightSource.cxx index 91ae697643..f70f4e70d8 100644 --- a/src/AIS/AIS_LightSource.cxx +++ b/src/AIS/AIS_LightSource.cxx @@ -20,7 +20,6 @@ #include #include #include -#include #include #include #include diff --git a/src/AIS/AIS_LightSource.hxx b/src/AIS/AIS_LightSource.hxx index c2da38840c..3816b73a4a 100644 --- a/src/AIS/AIS_LightSource.hxx +++ b/src/AIS/AIS_LightSource.hxx @@ -17,7 +17,6 @@ #define _AIS_LightSource_HeaderFile #include -#include #include class Select3D_SensitiveSphere; diff --git a/src/AIS/AIS_Line.cxx b/src/AIS/AIS_Line.cxx index db9bf36c55..246d468abe 100644 --- a/src/AIS/AIS_Line.cxx +++ b/src/AIS/AIS_Line.cxx @@ -18,13 +18,11 @@ #include #include -#include #include #include #include #include #include -#include #include #include #include @@ -34,7 +32,6 @@ #include #include #include -#include #include IMPLEMENT_STANDARD_RTTIEXT(AIS_Line,AIS_InteractiveObject) diff --git a/src/AIS/AIS_Manipulator.cxx b/src/AIS/AIS_Manipulator.cxx index 99a003e93b..05aefddb1f 100644 --- a/src/AIS/AIS_Manipulator.cxx +++ b/src/AIS/AIS_Manipulator.cxx @@ -15,6 +15,7 @@ #include +#include #include #include #include diff --git a/src/AIS/AIS_Manipulator.hxx b/src/AIS/AIS_Manipulator.hxx index 90dd33097f..84c82ad2ae 100644 --- a/src/AIS/AIS_Manipulator.hxx +++ b/src/AIS/AIS_Manipulator.hxx @@ -18,17 +18,14 @@ #include #include -#include #include #include #include -#include #include #include #include #include #include -#include #include NCOLLECTION_HSEQUENCE(AIS_ManipulatorObjectSequence, Handle(AIS_InteractiveObject)) diff --git a/src/AIS/AIS_MediaPlayer.cxx b/src/AIS/AIS_MediaPlayer.cxx index 8cd1c13f64..f975903b33 100644 --- a/src/AIS/AIS_MediaPlayer.cxx +++ b/src/AIS/AIS_MediaPlayer.cxx @@ -16,10 +16,8 @@ #include #include -#include #include #include -#include #include #include #include diff --git a/src/AIS/AIS_MultipleConnectedInteractive.cxx b/src/AIS/AIS_MultipleConnectedInteractive.cxx index 9531647b9c..90383d0dd3 100644 --- a/src/AIS/AIS_MultipleConnectedInteractive.cxx +++ b/src/AIS/AIS_MultipleConnectedInteractive.cxx @@ -19,10 +19,7 @@ #include #include #include -#include #include -#include -#include IMPLEMENT_STANDARD_RTTIEXT(AIS_MultipleConnectedInteractive,AIS_InteractiveObject) diff --git a/src/AIS/AIS_Plane.cxx b/src/AIS/AIS_Plane.cxx index 0a754b371c..b04a7a9cec 100644 --- a/src/AIS/AIS_Plane.cxx +++ b/src/AIS/AIS_Plane.cxx @@ -17,7 +17,6 @@ #include #include -#include #include #include #include @@ -45,11 +44,7 @@ #include #include #include -#include -#include #include -#include -#include IMPLEMENT_STANDARD_RTTIEXT(AIS_Plane,AIS_InteractiveObject) diff --git a/src/AIS/AIS_PlaneTrihedron.cxx b/src/AIS/AIS_PlaneTrihedron.cxx index bafe6a3c3a..2a9bfb8bc6 100644 --- a/src/AIS/AIS_PlaneTrihedron.cxx +++ b/src/AIS/AIS_PlaneTrihedron.cxx @@ -18,13 +18,10 @@ // + (-1) selection mode token into account // (SAMTECH specific) -#include #include #include #include -#include #include -#include #include #include #include @@ -33,9 +30,6 @@ #include #include #include -#include -#include -#include #include #include #include diff --git a/src/AIS/AIS_Point.cxx b/src/AIS/AIS_Point.cxx index a772b8ce6a..6e6cab6a8f 100644 --- a/src/AIS/AIS_Point.cxx +++ b/src/AIS/AIS_Point.cxx @@ -17,15 +17,11 @@ #include #include -#include #include -#include -#include #include #include #include #include -#include #include #include #include diff --git a/src/AIS/AIS_Point.hxx b/src/AIS/AIS_Point.hxx index d370356e99..4ffa79e7a0 100644 --- a/src/AIS/AIS_Point.hxx +++ b/src/AIS/AIS_Point.hxx @@ -17,7 +17,6 @@ #ifndef _AIS_Point_HeaderFile #define _AIS_Point_HeaderFile -#include #include class Geom_Point; diff --git a/src/AIS/AIS_PointCloud.cxx b/src/AIS/AIS_PointCloud.cxx index 917bd7f109..cd4933c643 100644 --- a/src/AIS/AIS_PointCloud.cxx +++ b/src/AIS/AIS_PointCloud.cxx @@ -17,13 +17,11 @@ #include #include -#include #include #include #include #include #include -#include #include #include #include diff --git a/src/AIS/AIS_RubberBand.cxx b/src/AIS/AIS_RubberBand.cxx index 8019f714ed..fb74ea7292 100644 --- a/src/AIS/AIS_RubberBand.cxx +++ b/src/AIS/AIS_RubberBand.cxx @@ -23,10 +23,7 @@ #include #include #include -#include -#include #include -#include #include diff --git a/src/AIS/AIS_Shape.cxx b/src/AIS/AIS_Shape.cxx index 41ed66f0db..eb9e7f68e7 100644 --- a/src/AIS/AIS_Shape.cxx +++ b/src/AIS/AIS_Shape.cxx @@ -18,36 +18,25 @@ #include #include -#include -#include #include #include #include -#include -#include #include #include -#include -#include #include #include -#include #include #include #include #include #include -#include -#include #include -#include #include #include #include #include #include #include -#include #include #include #include @@ -56,10 +45,7 @@ #include #include #include -#include #include -#include -#include IMPLEMENT_STANDARD_RTTIEXT(AIS_Shape,AIS_InteractiveObject) diff --git a/src/AIS/AIS_Shape.hxx b/src/AIS/AIS_Shape.hxx index 8d08eb4311..9c9afc1c40 100644 --- a/src/AIS/AIS_Shape.hxx +++ b/src/AIS/AIS_Shape.hxx @@ -17,6 +17,7 @@ #ifndef _AIS_Shape_HeaderFile #define _AIS_Shape_HeaderFile +#include #include #include #include diff --git a/src/AIS/AIS_SignatureFilter.hxx b/src/AIS/AIS_SignatureFilter.hxx index 8e977b7dd2..2e87ed10f9 100644 --- a/src/AIS/AIS_SignatureFilter.hxx +++ b/src/AIS/AIS_SignatureFilter.hxx @@ -23,7 +23,6 @@ #include #include #include -#include class SelectMgr_EntityOwner; diff --git a/src/AIS/AIS_TexturedShape.cxx b/src/AIS/AIS_TexturedShape.cxx index 80c20d7aed..46e2dc6aa0 100644 --- a/src/AIS/AIS_TexturedShape.cxx +++ b/src/AIS/AIS_TexturedShape.cxx @@ -25,10 +25,8 @@ #include #include #include -#include #include #include -#include #include #include #include @@ -36,7 +34,6 @@ #include #include #include -#include IMPLEMENT_STANDARD_RTTIEXT(AIS_TexturedShape,AIS_Shape) diff --git a/src/AIS/AIS_TexturedShape.hxx b/src/AIS/AIS_TexturedShape.hxx index 5c3ece94bb..270470f3a1 100644 --- a/src/AIS/AIS_TexturedShape.hxx +++ b/src/AIS/AIS_TexturedShape.hxx @@ -18,12 +18,10 @@ #include #include -#include #include #include #include #include -#include #include #include diff --git a/src/AIS/AIS_Triangulation.cxx b/src/AIS/AIS_Triangulation.cxx index 8c179b6286..734d092ef7 100644 --- a/src/AIS/AIS_Triangulation.cxx +++ b/src/AIS/AIS_Triangulation.cxx @@ -16,14 +16,10 @@ #include #include #include -#include #include #include #include -#include -#include #include -#include #include #include #include diff --git a/src/AIS/AIS_Trihedron.cxx b/src/AIS/AIS_Trihedron.cxx index a5ea0fb6b3..98191cdd19 100644 --- a/src/AIS/AIS_Trihedron.cxx +++ b/src/AIS/AIS_Trihedron.cxx @@ -18,10 +18,9 @@ #include #include +#include #include #include -#include -#include #include #include #include diff --git a/src/AIS/AIS_Trihedron.hxx b/src/AIS/AIS_Trihedron.hxx index 3d0dd745b3..03cb6f1c29 100644 --- a/src/AIS/AIS_Trihedron.hxx +++ b/src/AIS/AIS_Trihedron.hxx @@ -19,17 +19,13 @@ #include #include -#include #include #include #include #include #include -#include #include -#include #include -#include #include class Geom_Axis2Placement; diff --git a/src/AIS/AIS_TypeFilter.hxx b/src/AIS/AIS_TypeFilter.hxx index 4fa6230053..1163e24d18 100644 --- a/src/AIS/AIS_TypeFilter.hxx +++ b/src/AIS/AIS_TypeFilter.hxx @@ -22,7 +22,6 @@ #include #include -#include class SelectMgr_EntityOwner; diff --git a/src/AIS/AIS_ViewController.cxx b/src/AIS/AIS_ViewController.cxx index 2d08659425..b923079fa4 100644 --- a/src/AIS/AIS_ViewController.cxx +++ b/src/AIS/AIS_ViewController.cxx @@ -21,10 +21,7 @@ #include #include #include -#include -#include #include -#include #include #include #include diff --git a/src/AIS/AIS_ViewController.hxx b/src/AIS/AIS_ViewController.hxx index 8ab8fd23a8..21e9ccdde0 100644 --- a/src/AIS/AIS_ViewController.hxx +++ b/src/AIS/AIS_ViewController.hxx @@ -14,8 +14,6 @@ #ifndef _AIS_ViewController_HeaderFile #define _AIS_ViewController_HeaderFile -#include -#include #include #include #include diff --git a/src/AIS/AIS_ViewCube.cxx b/src/AIS/AIS_ViewCube.cxx index 1e405cb44f..2af2fef307 100644 --- a/src/AIS/AIS_ViewCube.cxx +++ b/src/AIS/AIS_ViewCube.cxx @@ -18,14 +18,12 @@ #include #include #include -#include #include #include #include #include #include #include -#include #include #include #include diff --git a/src/AIS/AIS_XRTrackedDevice.cxx b/src/AIS/AIS_XRTrackedDevice.cxx index 4c52b61661..af435d50b6 100644 --- a/src/AIS/AIS_XRTrackedDevice.cxx +++ b/src/AIS/AIS_XRTrackedDevice.cxx @@ -16,7 +16,6 @@ #include #include #include -#include #include #include #include diff --git a/src/APIHeaderSection/APIHeaderSection_EditHeader.cxx b/src/APIHeaderSection/APIHeaderSection_EditHeader.cxx index 51adb10c11..2bc59031ef 100644 --- a/src/APIHeaderSection/APIHeaderSection_EditHeader.cxx +++ b/src/APIHeaderSection/APIHeaderSection_EditHeader.cxx @@ -15,7 +15,6 @@ #include #include #include -#include #include #include #include diff --git a/src/APIHeaderSection/APIHeaderSection_EditHeader.hxx b/src/APIHeaderSection/APIHeaderSection_EditHeader.hxx index ca5543d907..749528cb48 100644 --- a/src/APIHeaderSection/APIHeaderSection_EditHeader.hxx +++ b/src/APIHeaderSection/APIHeaderSection_EditHeader.hxx @@ -18,10 +18,8 @@ #define _APIHeaderSection_EditHeader_HeaderFile #include -#include #include -#include #include class TCollection_AsciiString; class IFSelect_EditForm; diff --git a/src/APIHeaderSection/APIHeaderSection_MakeHeader.cxx b/src/APIHeaderSection/APIHeaderSection_MakeHeader.cxx index 1ce12440d2..9f90004ff9 100644 --- a/src/APIHeaderSection/APIHeaderSection_MakeHeader.cxx +++ b/src/APIHeaderSection/APIHeaderSection_MakeHeader.cxx @@ -25,7 +25,6 @@ #include #include #include -#include #include #include #include diff --git a/src/APIHeaderSection/APIHeaderSection_MakeHeader.hxx b/src/APIHeaderSection/APIHeaderSection_MakeHeader.hxx index 30897dec5d..9415693b65 100644 --- a/src/APIHeaderSection/APIHeaderSection_MakeHeader.hxx +++ b/src/APIHeaderSection/APIHeaderSection_MakeHeader.hxx @@ -23,7 +23,6 @@ #include #include -#include #include class HeaderSection_FileName; class HeaderSection_FileSchema; diff --git a/src/Adaptor2d/Adaptor2d_Curve2d.cxx b/src/Adaptor2d/Adaptor2d_Curve2d.cxx index 5bcd2eb872..4e29d2b805 100644 --- a/src/Adaptor2d/Adaptor2d_Curve2d.cxx +++ b/src/Adaptor2d/Adaptor2d_Curve2d.cxx @@ -25,10 +25,7 @@ #include #include #include -#include -#include #include -#include IMPLEMENT_STANDARD_RTTIEXT(Adaptor2d_Curve2d, Standard_Transient) diff --git a/src/Adaptor2d/Adaptor2d_Line2d.cxx b/src/Adaptor2d/Adaptor2d_Line2d.cxx index 16792e654a..900cf4b0ab 100644 --- a/src/Adaptor2d/Adaptor2d_Line2d.cxx +++ b/src/Adaptor2d/Adaptor2d_Line2d.cxx @@ -25,7 +25,6 @@ #include #include #include -#include #include #include diff --git a/src/Adaptor2d/Adaptor2d_Line2d.hxx b/src/Adaptor2d/Adaptor2d_Line2d.hxx index 142263881e..5fe95ce881 100644 --- a/src/Adaptor2d/Adaptor2d_Line2d.hxx +++ b/src/Adaptor2d/Adaptor2d_Line2d.hxx @@ -19,10 +19,8 @@ #include #include -#include #include -#include #include #include #include diff --git a/src/Adaptor2d/Adaptor2d_OffsetCurve.cxx b/src/Adaptor2d/Adaptor2d_OffsetCurve.cxx index dd1e205e89..7f4d40c21c 100644 --- a/src/Adaptor2d/Adaptor2d_OffsetCurve.cxx +++ b/src/Adaptor2d/Adaptor2d_OffsetCurve.cxx @@ -15,8 +15,6 @@ #include #include #include -#include -#include #include #include #include @@ -26,7 +24,6 @@ #include #include #include -#include #include #include #include diff --git a/src/Adaptor3d/Adaptor3d_Curve.cxx b/src/Adaptor3d/Adaptor3d_Curve.cxx index 76b13c5557..09cd950524 100644 --- a/src/Adaptor3d/Adaptor3d_Curve.cxx +++ b/src/Adaptor3d/Adaptor3d_Curve.cxx @@ -26,10 +26,7 @@ #include #include #include -#include -#include #include -#include IMPLEMENT_STANDARD_RTTIEXT(Adaptor3d_Curve, Standard_Transient) diff --git a/src/Adaptor3d/Adaptor3d_Curve.hxx b/src/Adaptor3d/Adaptor3d_Curve.hxx index e797edea3d..b1fc100868 100644 --- a/src/Adaptor3d/Adaptor3d_Curve.hxx +++ b/src/Adaptor3d/Adaptor3d_Curve.hxx @@ -17,7 +17,6 @@ #ifndef _Adaptor3d_Curve_HeaderFile #define _Adaptor3d_Curve_HeaderFile -#include #include #include #include diff --git a/src/Adaptor3d/Adaptor3d_CurveOnSurface.cxx b/src/Adaptor3d/Adaptor3d_CurveOnSurface.cxx index 8480ace335..787af3564e 100644 --- a/src/Adaptor3d/Adaptor3d_CurveOnSurface.cxx +++ b/src/Adaptor3d/Adaptor3d_CurveOnSurface.cxx @@ -25,9 +25,7 @@ #include #include #include -#include #include -#include #include #include #include @@ -50,7 +48,6 @@ #include #include #include -#include #include #include #include diff --git a/src/Adaptor3d/Adaptor3d_CurveOnSurface.hxx b/src/Adaptor3d/Adaptor3d_CurveOnSurface.hxx index 554a7edf39..a1105a4886 100644 --- a/src/Adaptor3d/Adaptor3d_CurveOnSurface.hxx +++ b/src/Adaptor3d/Adaptor3d_CurveOnSurface.hxx @@ -18,7 +18,6 @@ #define _Adaptor3d_CurveOnSurface_HeaderFile #include -#include #include #include #include diff --git a/src/Adaptor3d/Adaptor3d_HSurfaceTool.cxx b/src/Adaptor3d/Adaptor3d_HSurfaceTool.cxx index 83c6bb2170..9873386075 100644 --- a/src/Adaptor3d/Adaptor3d_HSurfaceTool.cxx +++ b/src/Adaptor3d/Adaptor3d_HSurfaceTool.cxx @@ -22,10 +22,6 @@ #include #include #include -#include -#include -#include -#include Standard_Integer Adaptor3d_HSurfaceTool::NbSamplesU(const Handle(Adaptor3d_Surface)& S) { diff --git a/src/Adaptor3d/Adaptor3d_HSurfaceTool.hxx b/src/Adaptor3d/Adaptor3d_HSurfaceTool.hxx index 57766af1ed..1b3eae0c93 100644 --- a/src/Adaptor3d/Adaptor3d_HSurfaceTool.hxx +++ b/src/Adaptor3d/Adaptor3d_HSurfaceTool.hxx @@ -35,7 +35,6 @@ #include #include #include -#include #include class Adaptor3d_HSurfaceTool diff --git a/src/Adaptor3d/Adaptor3d_IsoCurve.cxx b/src/Adaptor3d/Adaptor3d_IsoCurve.cxx index 7493df89da..3859809d5b 100644 --- a/src/Adaptor3d/Adaptor3d_IsoCurve.cxx +++ b/src/Adaptor3d/Adaptor3d_IsoCurve.cxx @@ -15,8 +15,6 @@ #include #include -#include -#include #include #include #include @@ -33,12 +31,8 @@ #include #include #include -#include #include #include -#include -#include -#include IMPLEMENT_STANDARD_RTTIEXT(Adaptor3d_IsoCurve, Adaptor3d_Curve) diff --git a/src/Adaptor3d/Adaptor3d_IsoCurve.hxx b/src/Adaptor3d/Adaptor3d_IsoCurve.hxx index 9fa24f5a95..38b6a07aef 100644 --- a/src/Adaptor3d/Adaptor3d_IsoCurve.hxx +++ b/src/Adaptor3d/Adaptor3d_IsoCurve.hxx @@ -17,7 +17,6 @@ #ifndef _Adaptor3d_IsoCurve_HeaderFile #define _Adaptor3d_IsoCurve_HeaderFile -#include #include #include diff --git a/src/Adaptor3d/Adaptor3d_Surface.cxx b/src/Adaptor3d/Adaptor3d_Surface.cxx index c48bbc5b42..55a7528614 100644 --- a/src/Adaptor3d/Adaptor3d_Surface.cxx +++ b/src/Adaptor3d/Adaptor3d_Surface.cxx @@ -28,10 +28,7 @@ #include #include #include -#include -#include #include -#include IMPLEMENT_STANDARD_RTTIEXT(Adaptor3d_Surface, Standard_Transient) diff --git a/src/AdvApp2Var/AdvApp2Var_ApproxAFunc2Var.cxx b/src/AdvApp2Var/AdvApp2Var_ApproxAFunc2Var.cxx index ae47b436e5..f07a63a035 100644 --- a/src/AdvApp2Var/AdvApp2Var_ApproxAFunc2Var.cxx +++ b/src/AdvApp2Var/AdvApp2Var_ApproxAFunc2Var.cxx @@ -29,13 +29,10 @@ #include #include #include -#include #include #include #include -#include -#include #include #include diff --git a/src/AdvApp2Var/AdvApp2Var_ApproxAFunc2Var.hxx b/src/AdvApp2Var/AdvApp2Var_ApproxAFunc2Var.hxx index e9c79b607f..73e72e7da5 100644 --- a/src/AdvApp2Var/AdvApp2Var_ApproxAFunc2Var.hxx +++ b/src/AdvApp2Var/AdvApp2Var_ApproxAFunc2Var.hxx @@ -23,10 +23,7 @@ #include #include -#include #include -#include -#include #include #include #include diff --git a/src/AdvApp2Var/AdvApp2Var_Criterion.cxx b/src/AdvApp2Var/AdvApp2Var_Criterion.cxx index c65914408d..fa4ee7cead 100644 --- a/src/AdvApp2Var/AdvApp2Var_Criterion.cxx +++ b/src/AdvApp2Var/AdvApp2Var_Criterion.cxx @@ -15,9 +15,7 @@ // commercial license or contractual agreement. -#include #include -#include AdvApp2Var_Criterion::~AdvApp2Var_Criterion() {} diff --git a/src/AdvApp2Var/AdvApp2Var_EvaluatorFunc2Var.hxx b/src/AdvApp2Var/AdvApp2Var_EvaluatorFunc2Var.hxx index 46366dc44c..2215281feb 100644 --- a/src/AdvApp2Var/AdvApp2Var_EvaluatorFunc2Var.hxx +++ b/src/AdvApp2Var/AdvApp2Var_EvaluatorFunc2Var.hxx @@ -17,8 +17,6 @@ #ifndef AdvApp2Var_EvaluatorFunc2Var_HeaderFile #define AdvApp2Var_EvaluatorFunc2Var_HeaderFile -#include -#include #include // History - the C function pointer converted to a virtual class diff --git a/src/AdvApp2Var/AdvApp2Var_MathBase_mathinit.cxx b/src/AdvApp2Var/AdvApp2Var_MathBase_mathinit.cxx index 288c5b19ca..ffa5a2a10a 100644 --- a/src/AdvApp2Var/AdvApp2Var_MathBase_mathinit.cxx +++ b/src/AdvApp2Var/AdvApp2Var_MathBase_mathinit.cxx @@ -14,7 +14,6 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -#include #include diff --git a/src/AdvApp2Var/AdvApp2Var_Network.cxx b/src/AdvApp2Var/AdvApp2Var_Network.cxx index bef0ef41df..a2476c50c5 100644 --- a/src/AdvApp2Var/AdvApp2Var_Network.cxx +++ b/src/AdvApp2Var/AdvApp2Var_Network.cxx @@ -21,7 +21,6 @@ #include #include #include -#include #include //========================================================================================== diff --git a/src/AdvApp2Var/AdvApp2Var_Network.hxx b/src/AdvApp2Var/AdvApp2Var_Network.hxx index 8c5d95d198..1047bbe8b8 100644 --- a/src/AdvApp2Var/AdvApp2Var_Network.hxx +++ b/src/AdvApp2Var/AdvApp2Var_Network.hxx @@ -24,8 +24,6 @@ #include #include #include -#include -#include class AdvApp2Var_Patch; diff --git a/src/AdvApp2Var/AdvApp2Var_Node.hxx b/src/AdvApp2Var/AdvApp2Var_Node.hxx index 9fdd814195..5722d3d5ba 100644 --- a/src/AdvApp2Var/AdvApp2Var_Node.hxx +++ b/src/AdvApp2Var/AdvApp2Var_Node.hxx @@ -17,7 +17,6 @@ #ifndef _AdvApp2Var_Node_HeaderFile #define _AdvApp2Var_Node_HeaderFile -#include #include #include #include diff --git a/src/AdvApp2Var/AdvApp2Var_Patch.cxx b/src/AdvApp2Var/AdvApp2Var_Patch.cxx index 49e86f0e8e..1b0bf691c6 100644 --- a/src/AdvApp2Var/AdvApp2Var_Patch.cxx +++ b/src/AdvApp2Var/AdvApp2Var_Patch.cxx @@ -33,9 +33,7 @@ #include #include #include -#include #include -#include #include #include #include diff --git a/src/AdvApp2Var/AdvApp2Var_Patch.hxx b/src/AdvApp2Var/AdvApp2Var_Patch.hxx index 379a1f777d..1afe83be0c 100644 --- a/src/AdvApp2Var/AdvApp2Var_Patch.hxx +++ b/src/AdvApp2Var/AdvApp2Var_Patch.hxx @@ -21,7 +21,6 @@ #include #include -#include #include #include #include diff --git a/src/AdvApp2Var/AdvApp2Var_SysBase.cxx b/src/AdvApp2Var/AdvApp2Var_SysBase.cxx index 6d6a283453..7f32dcb631 100644 --- a/src/AdvApp2Var/AdvApp2Var_SysBase.cxx +++ b/src/AdvApp2Var/AdvApp2Var_SysBase.cxx @@ -14,9 +14,7 @@ // AdvApp2Var_SysBase.cxx #include #include -#include #include -#include #include #include #include diff --git a/src/AdvApp2Var/AdvApp2Var_SysBase.hxx b/src/AdvApp2Var/AdvApp2Var_SysBase.hxx index 135ec21fb1..8cf12ccfba 100644 --- a/src/AdvApp2Var/AdvApp2Var_SysBase.hxx +++ b/src/AdvApp2Var/AdvApp2Var_SysBase.hxx @@ -15,7 +15,6 @@ #ifndef AdvApp2Var_SysBase_HeaderFile #define AdvApp2Var_SysBase_HeaderFile -#include #include #include diff --git a/src/AdvApprox/AdvApprox_ApproxAFunction.cxx b/src/AdvApprox/AdvApprox_ApproxAFunction.cxx index ffbf4e23c4..388ddf909d 100644 --- a/src/AdvApprox/AdvApprox_ApproxAFunction.cxx +++ b/src/AdvApprox/AdvApprox_ApproxAFunction.cxx @@ -22,7 +22,6 @@ // Modified PMN 15/04/1997 : Gestion fine de la continuite aux lieux de decoupes #include -#include #include #include #include @@ -34,7 +33,6 @@ #include #include #include -#include #include #include #include diff --git a/src/AdvApprox/AdvApprox_EvaluatorFunction.hxx b/src/AdvApprox/AdvApprox_EvaluatorFunction.hxx index ae76e172e8..3394a2cd42 100644 --- a/src/AdvApprox/AdvApprox_EvaluatorFunction.hxx +++ b/src/AdvApprox/AdvApprox_EvaluatorFunction.hxx @@ -17,8 +17,6 @@ #ifndef _AdvApprox_EvaluatorFunction_HeaderFile #define _AdvApprox_EvaluatorFunction_HeaderFile -#include -#include #include // abv 01.04.2009: the C function pointer converted to a virtual class diff --git a/src/AdvApprox/AdvApprox_PrefAndRec.hxx b/src/AdvApprox/AdvApprox_PrefAndRec.hxx index 4fcf49116e..baf0aebc39 100644 --- a/src/AdvApprox/AdvApprox_PrefAndRec.hxx +++ b/src/AdvApprox/AdvApprox_PrefAndRec.hxx @@ -22,7 +22,6 @@ #include #include -#include #include #include diff --git a/src/AdvApprox/AdvApprox_PrefCutting.hxx b/src/AdvApprox/AdvApprox_PrefCutting.hxx index 05285725de..de5661820a 100644 --- a/src/AdvApprox/AdvApprox_PrefCutting.hxx +++ b/src/AdvApprox/AdvApprox_PrefCutting.hxx @@ -24,8 +24,6 @@ #include #include #include -#include - //! inherits class Cutting; contains a list of preferential points (di)i diff --git a/src/AdvApprox/AdvApprox_SimpleApprox.cxx b/src/AdvApprox/AdvApprox_SimpleApprox.cxx index 7bf1be3835..6ffcec798b 100644 --- a/src/AdvApprox/AdvApprox_SimpleApprox.cxx +++ b/src/AdvApprox/AdvApprox_SimpleApprox.cxx @@ -22,10 +22,8 @@ #include #include #include -#include #include #include -#include #include #include diff --git a/src/AdvApprox/AdvApprox_SimpleApprox.hxx b/src/AdvApprox/AdvApprox_SimpleApprox.hxx index 629c1b7685..757db18ef7 100644 --- a/src/AdvApprox/AdvApprox_SimpleApprox.hxx +++ b/src/AdvApprox/AdvApprox_SimpleApprox.hxx @@ -25,12 +25,10 @@ #include #include #include -#include #include #include #include #include -#include #include class PLib_JacobiPolynomial; diff --git a/src/AppBlend/AppBlend_Approx.cxx b/src/AppBlend/AppBlend_Approx.cxx index 386c4589d7..d71db43360 100644 --- a/src/AppBlend/AppBlend_Approx.cxx +++ b/src/AppBlend/AppBlend_Approx.cxx @@ -16,9 +16,6 @@ #include -#include -#include -#include //======================================================================= //function : AppBlend_Approx diff --git a/src/AppBlend/AppBlend_Approx.hxx b/src/AppBlend/AppBlend_Approx.hxx index 098d269b42..5797cd8f43 100644 --- a/src/AppBlend/AppBlend_Approx.hxx +++ b/src/AppBlend/AppBlend_Approx.hxx @@ -22,13 +22,11 @@ #include #include -#include #include #include #include #include #include -#include //! Bspline approximation of a surface. diff --git a/src/AppCont/AppCont_ContMatrices.hxx b/src/AppCont/AppCont_ContMatrices.hxx index b4a51a1138..c136b9459d 100644 --- a/src/AppCont/AppCont_ContMatrices.hxx +++ b/src/AppCont/AppCont_ContMatrices.hxx @@ -15,7 +15,6 @@ #ifndef AppCont_ContMatrices_HeaderFile #define AppCont_ContMatrices_HeaderFile #include -#include // Stockage des matrices de resolution d approxiamtion continue. // La classe est limitee a 26 pour MMatrix et InvMMatrix, (pas de contraintes) diff --git a/src/AppCont/AppCont_LeastSquare.cxx b/src/AppCont/AppCont_LeastSquare.cxx index aca869e65a..01acce62da 100644 --- a/src/AppCont/AppCont_LeastSquare.cxx +++ b/src/AppCont/AppCont_LeastSquare.cxx @@ -24,7 +24,6 @@ #include #include #include -#include //======================================================================= diff --git a/src/AppCont/AppCont_LeastSquare.hxx b/src/AppCont/AppCont_LeastSquare.hxx index c71ad2af75..51300f2903 100644 --- a/src/AppCont/AppCont_LeastSquare.hxx +++ b/src/AppCont/AppCont_LeastSquare.hxx @@ -19,7 +19,6 @@ #include #include -#include #include #include #include diff --git a/src/AppDef/AppDef_BSpGradient_BFGSOfMyBSplGradientOfBSplineCompute.hxx b/src/AppDef/AppDef_BSpGradient_BFGSOfMyBSplGradientOfBSplineCompute.hxx index 7b54be12d1..f8549c0fd8 100644 --- a/src/AppDef/AppDef_BSpGradient_BFGSOfMyBSplGradientOfBSplineCompute.hxx +++ b/src/AppDef/AppDef_BSpGradient_BFGSOfMyBSplGradientOfBSplineCompute.hxx @@ -21,11 +21,8 @@ #include #include -#include #include #include -#include -#include class AppDef_MultiLine; class AppDef_MyLineTool; class AppDef_MyBSplGradientOfBSplineCompute; diff --git a/src/AppDef/AppDef_BSpParFunctionOfMyBSplGradientOfBSplineCompute.hxx b/src/AppDef/AppDef_BSpParFunctionOfMyBSplGradientOfBSplineCompute.hxx index 5e425c210b..0a7ff5db39 100644 --- a/src/AppDef/AppDef_BSpParFunctionOfMyBSplGradientOfBSplineCompute.hxx +++ b/src/AppDef/AppDef_BSpParFunctionOfMyBSplGradientOfBSplineCompute.hxx @@ -21,13 +21,9 @@ #include #include -#include #include -#include #include -#include #include -#include #include #include #include diff --git a/src/AppDef/AppDef_BSpParLeastSquareOfMyBSplGradientOfBSplineCompute.hxx b/src/AppDef/AppDef_BSpParLeastSquareOfMyBSplGradientOfBSplineCompute.hxx index 53d81b0647..1c2bd3d1d4 100644 --- a/src/AppDef/AppDef_BSpParLeastSquareOfMyBSplGradientOfBSplineCompute.hxx +++ b/src/AppDef/AppDef_BSpParLeastSquareOfMyBSplGradientOfBSplineCompute.hxx @@ -28,9 +28,7 @@ #include #include #include -#include #include -#include #include #include class StdFail_NotDone; diff --git a/src/AppDef/AppDef_BSplineCompute.hxx b/src/AppDef/AppDef_BSplineCompute.hxx index 9965d783f7..06d5e0620e 100644 --- a/src/AppDef/AppDef_BSplineCompute.hxx +++ b/src/AppDef/AppDef_BSplineCompute.hxx @@ -22,7 +22,6 @@ #include #include -#include #include #include #include diff --git a/src/AppDef/AppDef_Compute.hxx b/src/AppDef/AppDef_Compute.hxx index 29fe92bc18..2dd4b06d62 100644 --- a/src/AppDef/AppDef_Compute.hxx +++ b/src/AppDef/AppDef_Compute.hxx @@ -24,14 +24,12 @@ #include #include #include -#include #include #include #include #include #include #include -#include #include #include #include diff --git a/src/AppDef/AppDef_Gradient_BFGSOfMyGradientOfCompute.hxx b/src/AppDef/AppDef_Gradient_BFGSOfMyGradientOfCompute.hxx index 0628b2115c..c3b011b8e4 100644 --- a/src/AppDef/AppDef_Gradient_BFGSOfMyGradientOfCompute.hxx +++ b/src/AppDef/AppDef_Gradient_BFGSOfMyGradientOfCompute.hxx @@ -21,11 +21,8 @@ #include #include -#include #include #include -#include -#include class AppDef_MultiLine; class AppDef_MyLineTool; class AppDef_MyGradientOfCompute; diff --git a/src/AppDef/AppDef_Gradient_BFGSOfMyGradientbisOfBSplineCompute.hxx b/src/AppDef/AppDef_Gradient_BFGSOfMyGradientbisOfBSplineCompute.hxx index f9442d93d2..4f45e380d3 100644 --- a/src/AppDef/AppDef_Gradient_BFGSOfMyGradientbisOfBSplineCompute.hxx +++ b/src/AppDef/AppDef_Gradient_BFGSOfMyGradientbisOfBSplineCompute.hxx @@ -21,11 +21,8 @@ #include #include -#include #include #include -#include -#include class AppDef_MultiLine; class AppDef_MyLineTool; class AppDef_MyGradientbisOfBSplineCompute; diff --git a/src/AppDef/AppDef_Gradient_BFGSOfTheGradient.hxx b/src/AppDef/AppDef_Gradient_BFGSOfTheGradient.hxx index 45476317be..dda9a709d6 100644 --- a/src/AppDef/AppDef_Gradient_BFGSOfTheGradient.hxx +++ b/src/AppDef/AppDef_Gradient_BFGSOfTheGradient.hxx @@ -21,11 +21,8 @@ #include #include -#include #include #include -#include -#include class AppDef_MultiLine; class AppDef_MyLineTool; class AppDef_TheGradient; diff --git a/src/AppDef/AppDef_LinearCriteria.cxx b/src/AppDef/AppDef_LinearCriteria.cxx index e42e5b16d3..ae23fb5090 100644 --- a/src/AppDef/AppDef_LinearCriteria.cxx +++ b/src/AppDef/AppDef_LinearCriteria.cxx @@ -19,7 +19,6 @@ #include #include #include -#include #include #include #include @@ -28,11 +27,8 @@ #include #include #include -#include #include -#include #include -#include #include #include #include diff --git a/src/AppDef/AppDef_LinearCriteria.hxx b/src/AppDef/AppDef_LinearCriteria.hxx index d3e95ce033..7c7d2938b6 100644 --- a/src/AppDef/AppDef_LinearCriteria.hxx +++ b/src/AppDef/AppDef_LinearCriteria.hxx @@ -18,12 +18,9 @@ #define _AppDef_LinearCriteria_HeaderFile #include -#include #include -#include #include -#include #include #include #include diff --git a/src/AppDef/AppDef_MultiLine.cxx b/src/AppDef/AppDef_MultiLine.cxx index f8715cd172..b53ea7db6d 100644 --- a/src/AppDef/AppDef_MultiLine.cxx +++ b/src/AppDef/AppDef_MultiLine.cxx @@ -18,7 +18,6 @@ #include #include #include -#include #include AppDef_MultiLine::AppDef_MultiLine(){} diff --git a/src/AppDef/AppDef_MultiLine.hxx b/src/AppDef/AppDef_MultiLine.hxx index 595fc6f9ce..737a73f215 100644 --- a/src/AppDef/AppDef_MultiLine.hxx +++ b/src/AppDef/AppDef_MultiLine.hxx @@ -26,7 +26,6 @@ #include #include #include -#include #include class AppDef_MultiPointConstraint; diff --git a/src/AppDef/AppDef_MultiPointConstraint.cxx b/src/AppDef/AppDef_MultiPointConstraint.cxx index a5f8530059..b35ba67def 100644 --- a/src/AppDef/AppDef_MultiPointConstraint.cxx +++ b/src/AppDef/AppDef_MultiPointConstraint.cxx @@ -18,12 +18,9 @@ #include #include #include -#include #include -#include #include #include -#include #include #include diff --git a/src/AppDef/AppDef_MyBSplGradientOfBSplineCompute.hxx b/src/AppDef/AppDef_MyBSplGradientOfBSplineCompute.hxx index cf59263e93..aa0392ed8f 100644 --- a/src/AppDef/AppDef_MyBSplGradientOfBSplineCompute.hxx +++ b/src/AppDef/AppDef_MyBSplGradientOfBSplineCompute.hxx @@ -24,7 +24,6 @@ #include #include #include -#include #include #include #include diff --git a/src/AppDef/AppDef_MyGradientOfCompute.hxx b/src/AppDef/AppDef_MyGradientOfCompute.hxx index 88815d6804..f1b3a67a1f 100644 --- a/src/AppDef/AppDef_MyGradientOfCompute.hxx +++ b/src/AppDef/AppDef_MyGradientOfCompute.hxx @@ -24,7 +24,6 @@ #include #include #include -#include #include #include class Standard_OutOfRange; diff --git a/src/AppDef/AppDef_MyGradientbisOfBSplineCompute.hxx b/src/AppDef/AppDef_MyGradientbisOfBSplineCompute.hxx index 2606608423..0a5ccfe93a 100644 --- a/src/AppDef/AppDef_MyGradientbisOfBSplineCompute.hxx +++ b/src/AppDef/AppDef_MyGradientbisOfBSplineCompute.hxx @@ -24,7 +24,6 @@ #include #include #include -#include #include #include class Standard_OutOfRange; diff --git a/src/AppDef/AppDef_MyLineTool.hxx b/src/AppDef/AppDef_MyLineTool.hxx index c6e9ce4b20..c9ae70021a 100644 --- a/src/AppDef/AppDef_MyLineTool.hxx +++ b/src/AppDef/AppDef_MyLineTool.hxx @@ -19,12 +19,10 @@ #include #include -#include #include #include #include -#include #include #include #include diff --git a/src/AppDef/AppDef_ParFunctionOfMyGradientOfCompute.hxx b/src/AppDef/AppDef_ParFunctionOfMyGradientOfCompute.hxx index 4363971d9c..0e44666978 100644 --- a/src/AppDef/AppDef_ParFunctionOfMyGradientOfCompute.hxx +++ b/src/AppDef/AppDef_ParFunctionOfMyGradientOfCompute.hxx @@ -21,13 +21,9 @@ #include #include -#include #include -#include #include -#include #include -#include #include #include #include diff --git a/src/AppDef/AppDef_ParFunctionOfMyGradientbisOfBSplineCompute.hxx b/src/AppDef/AppDef_ParFunctionOfMyGradientbisOfBSplineCompute.hxx index 5a7686b611..d608f7ed45 100644 --- a/src/AppDef/AppDef_ParFunctionOfMyGradientbisOfBSplineCompute.hxx +++ b/src/AppDef/AppDef_ParFunctionOfMyGradientbisOfBSplineCompute.hxx @@ -21,13 +21,9 @@ #include #include -#include #include -#include #include -#include #include -#include #include #include #include diff --git a/src/AppDef/AppDef_ParFunctionOfTheGradient.hxx b/src/AppDef/AppDef_ParFunctionOfTheGradient.hxx index 1c732a84eb..72d561df27 100644 --- a/src/AppDef/AppDef_ParFunctionOfTheGradient.hxx +++ b/src/AppDef/AppDef_ParFunctionOfTheGradient.hxx @@ -21,13 +21,9 @@ #include #include -#include #include -#include #include -#include #include -#include #include #include #include diff --git a/src/AppDef/AppDef_ParLeastSquareOfMyGradientOfCompute.hxx b/src/AppDef/AppDef_ParLeastSquareOfMyGradientOfCompute.hxx index cab5b55aa9..336499edc6 100644 --- a/src/AppDef/AppDef_ParLeastSquareOfMyGradientOfCompute.hxx +++ b/src/AppDef/AppDef_ParLeastSquareOfMyGradientOfCompute.hxx @@ -30,7 +30,6 @@ #include #include #include -#include #include #include class StdFail_NotDone; diff --git a/src/AppDef/AppDef_ParLeastSquareOfMyGradientbisOfBSplineCompute.hxx b/src/AppDef/AppDef_ParLeastSquareOfMyGradientbisOfBSplineCompute.hxx index 4c6ec7636e..463cabc9eb 100644 --- a/src/AppDef/AppDef_ParLeastSquareOfMyGradientbisOfBSplineCompute.hxx +++ b/src/AppDef/AppDef_ParLeastSquareOfMyGradientbisOfBSplineCompute.hxx @@ -30,7 +30,6 @@ #include #include #include -#include #include #include class StdFail_NotDone; diff --git a/src/AppDef/AppDef_ParLeastSquareOfTheGradient.hxx b/src/AppDef/AppDef_ParLeastSquareOfTheGradient.hxx index 37c1704473..1f1bb56d69 100644 --- a/src/AppDef/AppDef_ParLeastSquareOfTheGradient.hxx +++ b/src/AppDef/AppDef_ParLeastSquareOfTheGradient.hxx @@ -30,7 +30,6 @@ #include #include #include -#include #include #include class StdFail_NotDone; diff --git a/src/AppDef/AppDef_ResConstraintOfMyGradientOfCompute.hxx b/src/AppDef/AppDef_ResConstraintOfMyGradientOfCompute.hxx index 1746bb4c3b..75dfb16d47 100644 --- a/src/AppDef/AppDef_ResConstraintOfMyGradientOfCompute.hxx +++ b/src/AppDef/AppDef_ResConstraintOfMyGradientOfCompute.hxx @@ -21,7 +21,6 @@ #include #include -#include #include #include #include diff --git a/src/AppDef/AppDef_ResConstraintOfMyGradientbisOfBSplineCompute.hxx b/src/AppDef/AppDef_ResConstraintOfMyGradientbisOfBSplineCompute.hxx index 064a5efc99..8c5b484a17 100644 --- a/src/AppDef/AppDef_ResConstraintOfMyGradientbisOfBSplineCompute.hxx +++ b/src/AppDef/AppDef_ResConstraintOfMyGradientbisOfBSplineCompute.hxx @@ -21,7 +21,6 @@ #include #include -#include #include #include #include diff --git a/src/AppDef/AppDef_ResConstraintOfTheGradient.hxx b/src/AppDef/AppDef_ResConstraintOfTheGradient.hxx index 67fef3b891..fa6aac6842 100644 --- a/src/AppDef/AppDef_ResConstraintOfTheGradient.hxx +++ b/src/AppDef/AppDef_ResConstraintOfTheGradient.hxx @@ -21,7 +21,6 @@ #include #include -#include #include #include #include diff --git a/src/AppDef/AppDef_SmoothCriterion.cxx b/src/AppDef/AppDef_SmoothCriterion.cxx index aa29bdad1e..e4dce5b7b2 100644 --- a/src/AppDef/AppDef_SmoothCriterion.cxx +++ b/src/AppDef/AppDef_SmoothCriterion.cxx @@ -18,8 +18,6 @@ #include #include #include -#include -#include #include IMPLEMENT_STANDARD_RTTIEXT(AppDef_SmoothCriterion,Standard_Transient) \ No newline at end of file diff --git a/src/AppDef/AppDef_SmoothCriterion.hxx b/src/AppDef/AppDef_SmoothCriterion.hxx index a1b2b60ea0..b1a836526f 100644 --- a/src/AppDef/AppDef_SmoothCriterion.hxx +++ b/src/AppDef/AppDef_SmoothCriterion.hxx @@ -18,7 +18,6 @@ #define _AppDef_SmoothCriterion_HeaderFile #include -#include #include #include diff --git a/src/AppDef/AppDef_TheFunction.hxx b/src/AppDef/AppDef_TheFunction.hxx index 48c1284b62..fb7652829f 100644 --- a/src/AppDef/AppDef_TheFunction.hxx +++ b/src/AppDef/AppDef_TheFunction.hxx @@ -21,13 +21,9 @@ #include #include -#include #include -#include #include -#include #include -#include #include #include #include diff --git a/src/AppDef/AppDef_TheGradient.hxx b/src/AppDef/AppDef_TheGradient.hxx index a7d2520eac..b37925d40c 100644 --- a/src/AppDef/AppDef_TheGradient.hxx +++ b/src/AppDef/AppDef_TheGradient.hxx @@ -24,7 +24,6 @@ #include #include #include -#include #include #include class Standard_OutOfRange; diff --git a/src/AppDef/AppDef_TheLeastSquares.hxx b/src/AppDef/AppDef_TheLeastSquares.hxx index 6570f299f8..7c10ee2ba6 100644 --- a/src/AppDef/AppDef_TheLeastSquares.hxx +++ b/src/AppDef/AppDef_TheLeastSquares.hxx @@ -30,7 +30,6 @@ #include #include #include -#include #include #include class StdFail_NotDone; diff --git a/src/AppDef/AppDef_TheResol.hxx b/src/AppDef/AppDef_TheResol.hxx index 51f60bb1a8..93b13ddadc 100644 --- a/src/AppDef/AppDef_TheResol.hxx +++ b/src/AppDef/AppDef_TheResol.hxx @@ -21,7 +21,6 @@ #include #include -#include #include #include #include diff --git a/src/AppDef/AppDef_Variational.cxx b/src/AppDef/AppDef_Variational.cxx index facdb75e9e..b4604d0e35 100644 --- a/src/AppDef/AppDef_Variational.cxx +++ b/src/AppDef/AppDef_Variational.cxx @@ -18,19 +18,10 @@ // avec criteres variationnels #include -#include #include #include -#include -#include -#include -#include -#include #include -#include #include -#include -#include #define No_Standard_RangeError #define No_Standard_OutOfRange @@ -44,7 +35,6 @@ #include #include #include -#include #include #include #include @@ -55,27 +45,19 @@ #include #include #include -#include #include #include #include #include #include -#include -#include #include #include #include -#include #include #include -#include #include -#include #include -#include -#include #include #include @@ -84,7 +66,6 @@ #if defined(_MSC_VER) # include -# include #endif /* _MSC_VER */ // diff --git a/src/AppDef/AppDef_Variational.hxx b/src/AppDef/AppDef_Variational.hxx index d9069f1e15..3e2c7465de 100644 --- a/src/AppDef/AppDef_Variational.hxx +++ b/src/AppDef/AppDef_Variational.hxx @@ -23,12 +23,8 @@ #include #include -#include #include -#include -#include #include -#include #include #include #include diff --git a/src/AppParCurves/AppParCurves.cxx b/src/AppParCurves/AppParCurves.cxx index f60c640e3a..94c9c18dd1 100644 --- a/src/AppParCurves/AppParCurves.cxx +++ b/src/AppParCurves/AppParCurves.cxx @@ -18,8 +18,6 @@ #include #include -#include -#include #include #include diff --git a/src/AppParCurves/AppParCurves.hxx b/src/AppParCurves/AppParCurves.hxx index 3902ecb321..1453a6f582 100644 --- a/src/AppParCurves/AppParCurves.hxx +++ b/src/AppParCurves/AppParCurves.hxx @@ -21,9 +21,7 @@ #include #include -#include #include -#include #include class math_Matrix; diff --git a/src/AppParCurves/AppParCurves_ConstraintCouple.hxx b/src/AppParCurves/AppParCurves_ConstraintCouple.hxx index 2d796a1622..911911ee74 100644 --- a/src/AppParCurves/AppParCurves_ConstraintCouple.hxx +++ b/src/AppParCurves/AppParCurves_ConstraintCouple.hxx @@ -21,7 +21,6 @@ #include #include -#include #include diff --git a/src/AppParCurves/AppParCurves_HArray1OfConstraintCouple.hxx b/src/AppParCurves/AppParCurves_HArray1OfConstraintCouple.hxx index c3012be013..d602cd4a0e 100644 --- a/src/AppParCurves/AppParCurves_HArray1OfConstraintCouple.hxx +++ b/src/AppParCurves/AppParCurves_HArray1OfConstraintCouple.hxx @@ -17,7 +17,6 @@ #ifndef AppParCurves_HArray1OfConstraintCouple_HeaderFile #define AppParCurves_HArray1OfConstraintCouple_HeaderFile -#include #include #include diff --git a/src/AppParCurves/AppParCurves_MultiBSpCurve.cxx b/src/AppParCurves/AppParCurves_MultiBSpCurve.cxx index c42a8428ad..ed0a35993a 100644 --- a/src/AppParCurves/AppParCurves_MultiBSpCurve.cxx +++ b/src/AppParCurves/AppParCurves_MultiBSpCurve.cxx @@ -21,8 +21,6 @@ #include #include #include -#include -#include #include #include #include diff --git a/src/AppParCurves/AppParCurves_MultiBSpCurve.hxx b/src/AppParCurves/AppParCurves_MultiBSpCurve.hxx index b1f5a8573a..ce7d30df15 100644 --- a/src/AppParCurves/AppParCurves_MultiBSpCurve.hxx +++ b/src/AppParCurves/AppParCurves_MultiBSpCurve.hxx @@ -28,7 +28,6 @@ #include #include #include -#include #include class gp_Pnt; class gp_Pnt2d; diff --git a/src/AppParCurves/AppParCurves_MultiCurve.cxx b/src/AppParCurves/AppParCurves_MultiCurve.cxx index 8228a96b05..e9fd509252 100644 --- a/src/AppParCurves/AppParCurves_MultiCurve.cxx +++ b/src/AppParCurves/AppParCurves_MultiCurve.cxx @@ -20,9 +20,6 @@ #include #include #include -#include -#include -#include #include #include #include diff --git a/src/AppParCurves/AppParCurves_MultiPoint.cxx b/src/AppParCurves/AppParCurves_MultiPoint.cxx index 67d667b97a..faf2c490d8 100644 --- a/src/AppParCurves/AppParCurves_MultiPoint.cxx +++ b/src/AppParCurves/AppParCurves_MultiPoint.cxx @@ -17,7 +17,6 @@ #include #include #include -#include #include #include #include diff --git a/src/Approx/Approx_Curve3d.cxx b/src/Approx/Approx_Curve3d.cxx index 830ef39610..ccbab07868 100644 --- a/src/Approx/Approx_Curve3d.cxx +++ b/src/Approx/Approx_Curve3d.cxx @@ -24,8 +24,6 @@ #include #include #include -#include -#include #include #include diff --git a/src/Approx/Approx_CurveOnSurface.cxx b/src/Approx/Approx_CurveOnSurface.cxx index bf3d1b05dd..1899d0eb82 100644 --- a/src/Approx/Approx_CurveOnSurface.cxx +++ b/src/Approx/Approx_CurveOnSurface.cxx @@ -17,7 +17,6 @@ #include #include -#include #include #include #include @@ -28,7 +27,6 @@ #include #include #include -#include #include #include #include @@ -39,7 +37,6 @@ #include #include #include -#include #include #include #include diff --git a/src/Approx/Approx_CurvilinearParameter.cxx b/src/Approx/Approx_CurvilinearParameter.cxx index b5ca21c518..77ca7f8e2c 100644 --- a/src/Approx/Approx_CurvilinearParameter.cxx +++ b/src/Approx/Approx_CurvilinearParameter.cxx @@ -18,13 +18,10 @@ #include #include -#include #include #include #include #include -#include -#include #include #include #include @@ -33,11 +30,8 @@ #include #include #include -#include #include #include -#include -#include #include #include #include diff --git a/src/Approx/Approx_CurvlinFunc.cxx b/src/Approx/Approx_CurvlinFunc.cxx index 9bb8c5a5a9..ba82388e95 100644 --- a/src/Approx/Approx_CurvlinFunc.cxx +++ b/src/Approx/Approx_CurvlinFunc.cxx @@ -22,9 +22,7 @@ #include #include #include -#include #include -#include #include #include #include diff --git a/src/Approx/Approx_CurvlinFunc.hxx b/src/Approx/Approx_CurvlinFunc.hxx index 6a9f6bd02d..c97e46146b 100644 --- a/src/Approx/Approx_CurvlinFunc.hxx +++ b/src/Approx/Approx_CurvlinFunc.hxx @@ -18,7 +18,6 @@ #define _Approx_CurvlinFunc_HeaderFile #include -#include #include #include #include diff --git a/src/Approx/Approx_FitAndDivide.hxx b/src/Approx/Approx_FitAndDivide.hxx index 70443fdeaa..f5a4b24f81 100644 --- a/src/Approx/Approx_FitAndDivide.hxx +++ b/src/Approx/Approx_FitAndDivide.hxx @@ -19,14 +19,11 @@ #include #include -#include #include #include #include -#include #include -#include #include #include class AppParCurves_MultiCurve; diff --git a/src/Approx/Approx_FitAndDivide2d.hxx b/src/Approx/Approx_FitAndDivide2d.hxx index 2a334ce597..e98a013e5d 100644 --- a/src/Approx/Approx_FitAndDivide2d.hxx +++ b/src/Approx/Approx_FitAndDivide2d.hxx @@ -19,14 +19,11 @@ #include #include -#include #include #include #include -#include #include -#include #include #include class AppParCurves_MultiCurve; diff --git a/src/Approx/Approx_HArray1OfGTrsf2d.hxx b/src/Approx/Approx_HArray1OfGTrsf2d.hxx index af7da670a3..1938e310c2 100644 --- a/src/Approx/Approx_HArray1OfGTrsf2d.hxx +++ b/src/Approx/Approx_HArray1OfGTrsf2d.hxx @@ -17,7 +17,6 @@ #ifndef Approx_HArray1OfGTrsf2d_HeaderFile #define Approx_HArray1OfGTrsf2d_HeaderFile -#include #include #include diff --git a/src/Approx/Approx_MCurvesToBSpCurve.cxx b/src/Approx/Approx_MCurvesToBSpCurve.cxx index ab324f7787..f929166f90 100644 --- a/src/Approx/Approx_MCurvesToBSpCurve.cxx +++ b/src/Approx/Approx_MCurvesToBSpCurve.cxx @@ -13,15 +13,11 @@ // commercial license or contractual agreement. -#include -#include -#include #include #include #include #include #include -#include #include #include #include diff --git a/src/Approx/Approx_MCurvesToBSpCurve.hxx b/src/Approx/Approx_MCurvesToBSpCurve.hxx index a1875efadd..294e4bf607 100644 --- a/src/Approx/Approx_MCurvesToBSpCurve.hxx +++ b/src/Approx/Approx_MCurvesToBSpCurve.hxx @@ -19,10 +19,8 @@ #include #include -#include #include -#include #include class AppParCurves_MultiCurve; diff --git a/src/Approx/Approx_SameParameter.cxx b/src/Approx/Approx_SameParameter.cxx index b4c282710b..5e9c451d85 100644 --- a/src/Approx/Approx_SameParameter.cxx +++ b/src/Approx/Approx_SameParameter.cxx @@ -20,22 +20,15 @@ #include #include #include -#include -#include #include #include #include #include #include -#include -#include -#include #include #include #include #include -#include -#include #include #include diff --git a/src/Approx/Approx_SweepApproximation.cxx b/src/Approx/Approx_SweepApproximation.cxx index b5cc429a78..5e136d2fc9 100644 --- a/src/Approx/Approx_SweepApproximation.cxx +++ b/src/Approx/Approx_SweepApproximation.cxx @@ -16,7 +16,6 @@ #include -#include #include #include #include @@ -24,12 +23,8 @@ #include #include #include -#include #include -#include #include -#include -#include #include //======================================================================= diff --git a/src/Approx/Approx_SweepApproximation.hxx b/src/Approx/Approx_SweepApproximation.hxx index 7b67b0380f..bc37483456 100644 --- a/src/Approx/Approx_SweepApproximation.hxx +++ b/src/Approx/Approx_SweepApproximation.hxx @@ -21,7 +21,6 @@ #include #include -#include #include #include #include @@ -34,7 +33,6 @@ #include #include #include -#include #include #include #include diff --git a/src/Approx/Approx_SweepFunction.cxx b/src/Approx/Approx_SweepFunction.cxx index d8caf9b9bb..66dba62da3 100644 --- a/src/Approx/Approx_SweepFunction.cxx +++ b/src/Approx/Approx_SweepFunction.cxx @@ -18,7 +18,6 @@ #include #include #include -#include #include IMPLEMENT_STANDARD_RTTIEXT(Approx_SweepFunction,Standard_Transient) diff --git a/src/Approx/Approx_SweepFunction.hxx b/src/Approx/Approx_SweepFunction.hxx index 52eddb118b..56c0334bc4 100644 --- a/src/Approx/Approx_SweepFunction.hxx +++ b/src/Approx/Approx_SweepFunction.hxx @@ -18,10 +18,8 @@ #define _Approx_SweepFunction_HeaderFile #include -#include #include -#include #include #include #include diff --git a/tools/View/View_Widget.cxx b/tools/View/View_Widget.cxx index 6954e56654..a9b7406d25 100644 --- a/tools/View/View_Widget.cxx +++ b/tools/View/View_Widget.cxx @@ -19,6 +19,7 @@ #include +#include #include #include #include From bcecb5832b2749a588c0877099e4909f2523f499 Mon Sep 17 00:00:00 2001 From: emv Date: Thu, 28 Oct 2021 11:07:05 +0300 Subject: [PATCH 181/639] 0032644: Modeling Algorithms - Empty result of section operation Use distance criteria additionally to parameter criteria when verifying the extrema solution to belong to the edge boundary. Refactor the BRepExtrema_DistanceSS class to remove the excessive methods with mirrored parameters. --- dox/upgrade/upgrade.md | 4 + src/BRepExtrema/BRepExtrema_DistanceSS.cxx | 1208 ++++++++------------ src/BRepExtrema/BRepExtrema_DistanceSS.hxx | 171 +-- tests/bugs/modalg_7/bug32644 | 22 + 4 files changed, 601 insertions(+), 804 deletions(-) create mode 100644 tests/bugs/modalg_7/bug32644 diff --git a/dox/upgrade/upgrade.md b/dox/upgrade/upgrade.md index 5caa102205..72720303c3 100644 --- a/dox/upgrade/upgrade.md +++ b/dox/upgrade/upgrade.md @@ -2300,6 +2300,10 @@ void Perform(const Handle(Adaptor3d_CurveOnSurface)& theCurveOnSurface, Building OCCT now requires C++11-compliant compiler, so that some legacy compilers (Visual Studio 2010 and 2012) are no more supported. It is recommended using Visual Studio 2015 or newer for building OCCT on Windows platform. +@subsection upgrade_770_removed_features Removed features + +* One of the constructors of the BRepExtrema_DistanceSS class (the one without deflection parameter) has been removed as excessive. The remaining constructor has to be used instead. + @subsection upgrade_occt770_parallel_flag_removed Removed parameter theIsParallel from Put/Compute/Perform theIsParallel parameter has been removed from Put/Compute/Perform from the next classes: diff --git a/src/BRepExtrema/BRepExtrema_DistanceSS.cxx b/src/BRepExtrema/BRepExtrema_DistanceSS.cxx index 7cbd701f3b..0031e66a71 100644 --- a/src/BRepExtrema/BRepExtrema_DistanceSS.cxx +++ b/src/BRepExtrema/BRepExtrema_DistanceSS.cxx @@ -73,7 +73,7 @@ static Standard_Boolean TRI_SOLUTION (const BRepExtrema_SeqOfSolution& SeqSol, c } } return Standard_True; -} +} //------------------------------------------------------------------------------ // function: MIN_SOLUTION @@ -85,16 +85,16 @@ static void MIN_SOLUTION (const BRepExtrema_SeqOfSolution& SeqSol1, BRepExtrema_SeqOfSolution& seqSol1, BRepExtrema_SeqOfSolution& seqSol2) { - for (BRepExtrema_SeqOfSolution::iterator anIt1 = SeqSol1.begin(), anIt2 = SeqSol2.begin(); - anIt1 != SeqSol1.end(); + for (BRepExtrema_SeqOfSolution::iterator anIt1 = SeqSol1.begin(), anIt2 = SeqSol2.begin(); + anIt1 != SeqSol1.end(); anIt1++, anIt2++) { const Standard_Real dst1 = anIt1->Dist(); if (fabs(dst1 - DstRef) < Eps) - { + { seqSol1.Append(*anIt1); seqSol2.Append(*anIt2); - } + } } } @@ -104,7 +104,7 @@ static void MIN_SOLUTION (const BRepExtrema_SeqOfSolution& SeqSol1, static void TRIM_INFINIT_EDGE(const TopoDS_Edge& S1, const TopoDS_Edge& S2, TopoDS_Edge& aResEdge, Standard_Boolean& bIsTrim1, Standard_Boolean& bIsTrim2) { - if ( BRep_Tool::Degenerated(S1) || BRep_Tool::Degenerated(S2) ) + if (BRep_Tool::Degenerated(S1) || BRep_Tool::Degenerated(S2)) return; aResEdge = S2; @@ -113,17 +113,17 @@ static void TRIM_INFINIT_EDGE(const TopoDS_Edge& S1, const TopoDS_Edge& S2, Topo Handle(Geom_Curve) pCurv2 = BRep_Tool::Curve(S2, aFirst2, aLast2); if (Precision::IsInfinite(aFirst1) && - Precision::IsInfinite(aLast1) && + Precision::IsInfinite(aLast1) && Precision::IsInfinite(aFirst2) && Precision::IsInfinite(aLast2)) return; - + Standard_Real Umin = 0., Umax = 0.; Standard_Boolean bUmin, bUmax; bUmin = bUmax = Standard_False; Handle(Geom_Curve) pCurv; - if ( !pCurv1.IsNull() && (Precision::IsInfinite(aFirst1) || Precision::IsInfinite(aLast1)) ) + if (!pCurv1.IsNull() && (Precision::IsInfinite(aFirst1) || Precision::IsInfinite(aLast1))) { pCurv = pCurv1; bIsTrim1 = Standard_True; @@ -138,7 +138,7 @@ static void TRIM_INFINIT_EDGE(const TopoDS_Edge& S1, const TopoDS_Edge& S2, Topo Umax = aLast1; } } - else if ( !pCurv2.IsNull() && (Precision::IsInfinite(aFirst2) || Precision::IsInfinite(aLast2)) ) + else if (!pCurv2.IsNull() && (Precision::IsInfinite(aFirst2) || Precision::IsInfinite(aLast2))) { pCurv = pCurv2; bIsTrim2 = Standard_True; @@ -172,7 +172,7 @@ static void TRIM_INFINIT_EDGE(const TopoDS_Edge& S1, const TopoDS_Edge& S2, Topo const gp_Pnt aPnt6(Xmax, Ymin, Zmax); const gp_Pnt aPnt7(Xmax, Ymin, Zmin); - Standard_Real arrU[8]; + Standard_Real arrU[8]; GeomAPI_ProjectPointOnCurve aProj(aPnt0, pCurv); /*szv:aProj.Perform(aPnt0);*/ arrU[0] = aProj.LowerDistanceParameter(); aProj.Perform(aPnt1); arrU[1] = aProj.LowerDistanceParameter(); @@ -182,22 +182,22 @@ static void TRIM_INFINIT_EDGE(const TopoDS_Edge& S1, const TopoDS_Edge& S2, Topo aProj.Perform(aPnt5); arrU[5] = aProj.LowerDistanceParameter(); aProj.Perform(aPnt6); arrU[6] = aProj.LowerDistanceParameter(); aProj.Perform(aPnt7); arrU[7] = aProj.LowerDistanceParameter(); - + if (!bUmin) Umin = arrU[0]; - + if (!bUmax) Umax = arrU[0]; Standard_Integer i = 0; while (i < 8) - { + { const Standard_Real aU = arrU[i++]; - if (aU < Umin) - Umin = aU; - else if (aU > Umax) - Umax = aU; - } + if (aU < Umin) + Umin = aU; + else if (aU > Umax) + Umax = aU; + } Standard_Real tol = Precision::Confusion(); if (bIsTrim1) @@ -205,7 +205,7 @@ static void TRIM_INFINIT_EDGE(const TopoDS_Edge& S1, const TopoDS_Edge& S2, Topo else if (bIsTrim2) tol = BRep_Tool::Tolerance(S2); - const Standard_Real EpsU = GeomAdaptor_Curve(pCurv).Resolution(3.*tol); + const Standard_Real EpsU = GeomAdaptor_Curve(pCurv).Resolution(3. * tol); if (fabs(Umin - Umax) < EpsU) { Umin -= EpsU; @@ -225,23 +225,23 @@ static void TRIM_INFINIT_FACE(const TopoDS_Shape& S1, const TopoDS_Shape& S2, { bIsInfinit = Standard_False; - TopAbs_ShapeEnum Type1 = S1.ShapeType(); + TopAbs_ShapeEnum Type1 = S1.ShapeType(); TopAbs_ShapeEnum Type2 = S2.ShapeType(); TopoDS_Edge aE; TopoDS_Face aF; - + if (Type1 == TopAbs_EDGE && Type2 == TopAbs_FACE) { aE = TopoDS::Edge(S1); - if ( BRep_Tool::Degenerated(aE) ) + if (BRep_Tool::Degenerated(aE)) return; aF = TopoDS::Face(S2); } else if (Type2 == TopAbs_EDGE && Type1 == TopAbs_FACE) { aE = TopoDS::Edge(S2); - if ( BRep_Tool::Degenerated(aE) ) + if (BRep_Tool::Degenerated(aE)) return; aF = TopoDS::Face(S1); } @@ -253,7 +253,7 @@ static void TRIM_INFINIT_FACE(const TopoDS_Shape& S1, const TopoDS_Shape& S2, aResFace = aF; Handle(Geom_Surface) pSurf = BRep_Tool::Surface(aF); - + const Standard_Boolean bRestrict = BRep_Tool::NaturalRestriction(aF); Standard_Real U1, V1, U2, V2; @@ -284,15 +284,15 @@ static void TRIM_INFINIT_FACE(const TopoDS_Shape& S1, const TopoDS_Shape& S2, if (Precision::IsInfinite(V1)) bIsTrim = Standard_True; else - { + { Vmin = V1; bVmin = Standard_True; - } - + } + if (Precision::IsInfinite(V2)) bIsTrim = Standard_True; else - { + { Vmax = V2; bVmax = Standard_True; } @@ -308,11 +308,11 @@ static void TRIM_INFINIT_FACE(const TopoDS_Shape& S1, const TopoDS_Shape& S2, } if (bIsTrim) - { + { Bnd_Box aEdgeBox; BRepBndLib::Add(aE, aEdgeBox); - if(aEdgeBox.IsWhole()) + if (aEdgeBox.IsWhole()) return; Standard_Real Xmin, Ymin, Zmin, Xmax, Ymax, Zmax; @@ -329,14 +329,14 @@ static void TRIM_INFINIT_FACE(const TopoDS_Shape& S1, const TopoDS_Shape& S2, Standard_Real arrU[8], arrV[8]; GeomAPI_ProjectPointOnSurf aProj(aPnt0, pSurf); - /*szv:aProj.Perform(aPnt0);*/ if (aProj.IsDone()) aProj.LowerDistanceParameters(arrU[0],arrV[0]); - aProj.Perform(aPnt1); if (aProj.IsDone()) aProj.LowerDistanceParameters(arrU[1],arrV[1]); - aProj.Perform(aPnt2); if (aProj.IsDone()) aProj.LowerDistanceParameters(arrU[2],arrV[2]); - aProj.Perform(aPnt3); if (aProj.IsDone()) aProj.LowerDistanceParameters(arrU[3],arrV[3]); - aProj.Perform(aPnt4); if (aProj.IsDone()) aProj.LowerDistanceParameters(arrU[4],arrV[4]); - aProj.Perform(aPnt5); if (aProj.IsDone()) aProj.LowerDistanceParameters(arrU[5],arrV[5]); - aProj.Perform(aPnt6); if (aProj.IsDone()) aProj.LowerDistanceParameters(arrU[6],arrV[6]); - aProj.Perform(aPnt7); if (aProj.IsDone()) aProj.LowerDistanceParameters(arrU[7],arrV[7]); + /*szv:aProj.Perform(aPnt0);*/ if (aProj.IsDone()) aProj.LowerDistanceParameters(arrU[0], arrV[0]); + aProj.Perform(aPnt1); if (aProj.IsDone()) aProj.LowerDistanceParameters(arrU[1], arrV[1]); + aProj.Perform(aPnt2); if (aProj.IsDone()) aProj.LowerDistanceParameters(arrU[2], arrV[2]); + aProj.Perform(aPnt3); if (aProj.IsDone()) aProj.LowerDistanceParameters(arrU[3], arrV[3]); + aProj.Perform(aPnt4); if (aProj.IsDone()) aProj.LowerDistanceParameters(arrU[4], arrV[4]); + aProj.Perform(aPnt5); if (aProj.IsDone()) aProj.LowerDistanceParameters(arrU[5], arrV[5]); + aProj.Perform(aPnt6); if (aProj.IsDone()) aProj.LowerDistanceParameters(arrU[6], arrV[6]); + aProj.Perform(aPnt7); if (aProj.IsDone()) aProj.LowerDistanceParameters(arrU[7], arrV[7]); if (!bUmin) Umin = arrU[0]; @@ -349,33 +349,33 @@ static void TRIM_INFINIT_FACE(const TopoDS_Shape& S1, const TopoDS_Shape& S2, Standard_Integer i = 0; while (i < 8) - { + { const Standard_Real aU = arrU[i]; - if (aU < Umin) - Umin = aU; - else if (aU > Umax) - Umax = aU; + if (aU < Umin) + Umin = aU; + else if (aU > Umax) + Umax = aU; const Standard_Real aV = arrV[i]; - if (aV < Vmin) - Vmin = aV; - else if (aV > Vmax) - Vmax = aV; + if (aV < Vmin) + Vmin = aV; + else if (aV > Vmax) + Vmax = aV; i++; - } - + } + GeomAdaptor_Surface aGAS(pSurf); const Standard_Real tol = BRep_Tool::Tolerance(aF); - const Standard_Real EpsU = aGAS.UResolution(3.*tol); + const Standard_Real EpsU = aGAS.UResolution(3. * tol); if (fabs(Umin - Umax) < EpsU) { Umin -= EpsU; Umax += EpsU; } - const Standard_Real EpsV = aGAS.VResolution(3.*tol); + const Standard_Real EpsV = aGAS.VResolution(3. * tol); if (fabs(Vmin - Vmax) < EpsV) { Vmin -= EpsV; @@ -394,14 +394,14 @@ static void TRIM_INFINIT_FACE(const TopoDS_Shape& S1, const TopoDS_Shape& S2, //------------------------------------------------------------------------------ // static function: PERFORM_C0 //------------------------------------------------------------------------------ -static void PERFORM_C0(const TopoDS_Edge &S1, const TopoDS_Edge &S2, +static void PERFORM_C0(const TopoDS_Edge& S1, const TopoDS_Edge& S2, BRepExtrema_SeqOfSolution& SeqSol1, BRepExtrema_SeqOfSolution& SeqSol2, const Standard_Real DstRef, Standard_Real& mDstRef, const Standard_Real Eps) { - if ( BRep_Tool::Degenerated(S1) || BRep_Tool::Degenerated(S2) ) + if (BRep_Tool::Degenerated(S1) || BRep_Tool::Degenerated(S2)) return; Standard_Integer iE; @@ -409,15 +409,15 @@ static void PERFORM_C0(const TopoDS_Edge &S1, const TopoDS_Edge &S2, { TopoDS_Edge E, Eother; if (iE == 0) - { - E = S1; - Eother = S2; - } + { + E = S1; + Eother = S2; + } else - { - E = S2; - Eother = S1; - } + { + E = S2; + Eother = S1; + } Standard_Real aFirst, aLast; Handle(Geom_Curve) pCurv = BRep_Tool::Curve(E, aFirst, aLast); @@ -426,25 +426,25 @@ static void PERFORM_C0(const TopoDS_Edge &S1, const TopoDS_Edge &S2, Handle(Geom_Curve) pCurvOther = BRep_Tool::Curve(Eother, aFOther, aLOther); if (pCurv->Continuity() == GeomAbs_C0) - { + { const Standard_Real epsP = Precision::PConfusion(); GeomAdaptor_Curve aAdaptorCurve(pCurv, aFirst, aLast); const Standard_Integer nbIntervals = aAdaptorCurve.NbIntervals(GeomAbs_C1); - TColStd_Array1OfReal arrInter(1,1+nbIntervals); + TColStd_Array1OfReal arrInter(1, 1 + nbIntervals); aAdaptorCurve.Intervals(arrInter, GeomAbs_C1); GeomAdaptor_Curve aAdaptorCurveOther(pCurvOther, aFOther, aLOther); const Standard_Integer nbIntervalsOther = aAdaptorCurveOther.NbIntervals(GeomAbs_C1); - TColStd_Array1OfReal arrInterOther(1,1+nbIntervalsOther); + TColStd_Array1OfReal arrInterOther(1, 1 + nbIntervalsOther); aAdaptorCurveOther.Intervals(arrInterOther, GeomAbs_C1); - Standard_Real Udeb,Ufin; - BRep_Tool::Range(Eother,Udeb,Ufin); + Standard_Real Udeb, Ufin; + BRep_Tool::Range(Eother, Udeb, Ufin); - gp_Pnt P1,Pt; - Standard_Integer i, ii; + gp_Pnt P1, Pt; + Standard_Integer i, ii; BRepClass_FaceClassifier classifier; for (i = 1; i <= arrInter.Length(); i++) { @@ -452,36 +452,36 @@ static void PERFORM_C0(const TopoDS_Edge &S1, const TopoDS_Edge &S2, const gp_Pnt aPnt = aAdaptorCurve.Value(aParameter); const TopoDS_Vertex V1 = BRepBuilderAPI_MakeVertex(aPnt); - BRepExtrema_ExtPC Ext(V1,Eother); - const Standard_Integer NbExtrema = Ext.IsDone()? Ext.NbExt() : 0; - if ( NbExtrema > 0 ) - { + BRepExtrema_ExtPC Ext(V1, Eother); + const Standard_Integer NbExtrema = Ext.IsDone() ? Ext.NbExt() : 0; + if (NbExtrema > 0) + { // Search minimum distance dstmin Standard_Real Dstmin = Ext.SquareDistance(1); for (ii = 2; ii <= NbExtrema; ii++) { const Standard_Real sDst = Ext.SquareDistance(ii); - if (sDst=epsP)&&(fabs(t-Ufin)>epsP)) + if ((fabs(t - Udeb) >= epsP) && (fabs(t - Ufin) > epsP)) { if (mDstRef > Dstmin) - mDstRef=Dstmin; - const BRepExtrema_SolutionElem Sol1(Dstmin,aPnt,BRepExtrema_IsOnEdge,E,aParameter); - const BRepExtrema_SolutionElem Sol2(Dstmin,Pt,BRepExtrema_IsOnEdge,Eother,t); + mDstRef = Dstmin; + const BRepExtrema_SolutionElem Sol1(Dstmin, aPnt, BRepExtrema_IsOnEdge, E, aParameter); + const BRepExtrema_SolutionElem Sol2(Dstmin, Pt, BRepExtrema_IsOnEdge, Eother, t); SeqSol1.Append(iE == 0 ? Sol1 : Sol2); SeqSol2.Append(iE == 0 ? Sol2 : Sol1); } @@ -489,58 +489,90 @@ static void PERFORM_C0(const TopoDS_Edge &S1, const TopoDS_Edge &S2, } } } - for (Standard_Integer i2 = 1; i2<=arrInterOther.Length(); i2++) + for (Standard_Integer i2 = 1; i2 <= arrInterOther.Length(); i2++) { const Standard_Real aParameterOther = arrInterOther(i2); const gp_Pnt aPntOther = aAdaptorCurveOther.Value(aParameterOther); const Standard_Real Dst = aPnt.Distance(aPntOther); - if ((Dst < DstRef - Eps) || (fabs(Dst-DstRef) < Eps)) - { + if ((Dst < DstRef - Eps) || (fabs(Dst - DstRef) < Eps)) + { if (mDstRef > Dst) - mDstRef=Dst; - const BRepExtrema_SolutionElem Sol1(Dst,aPnt,BRepExtrema_IsOnEdge,E,aParameter); - const BRepExtrema_SolutionElem Sol2(Dst,aPntOther,BRepExtrema_IsOnEdge,Eother,aParameterOther); + mDstRef = Dst; + const BRepExtrema_SolutionElem Sol1(Dst, aPnt, BRepExtrema_IsOnEdge, E, aParameter); + const BRepExtrema_SolutionElem Sol2(Dst, aPntOther, BRepExtrema_IsOnEdge, Eother, aParameterOther); SeqSol1.Append(iE == 0 ? Sol1 : Sol2); SeqSol2.Append(iE == 0 ? Sol2 : Sol1); - } + } } } } } } -/*********************************************************************************/ +//======================================================================= +//function : isOnBoundary +//purpose : Checks in 3d if the extrema point belongs to edge boundary +//======================================================================= +static Standard_Boolean isOnBoundary(const TopoDS_Edge& theEdge, + const gp_Pnt& theSol, + const Standard_Real theParam, + const Standard_Real thePTol) +{ + for (TopoDS_Iterator it(theEdge); it.More(); it.Next()) + { + const TopoDS_Vertex& aV = TopoDS::Vertex (it.Value()); + Standard_Real aVParam = BRep_Tool::Parameter(aV, theEdge); + if (Abs (aVParam - theParam) < thePTol && + BRep_Tool::Pnt (aV).Distance (theSol) < BRep_Tool::Tolerance (aV)) + { + return Standard_True; + } + } + return Standard_False; +} -void BRepExtrema_DistanceSS::Perform(const TopoDS_Shape& S1, const TopoDS_Shape& S2, - const Bnd_Box& B1, const Bnd_Box& B2) +//======================================================================= +//function : Perform +//purpose : +//======================================================================= +void BRepExtrema_DistanceSS::Perform(const TopoDS_Shape& theS1, const TopoDS_Shape& theS2, + const Bnd_Box& theBox1, const Bnd_Box& theBox2) { - SeqSolShape1.Clear(); - SeqSolShape2.Clear(); - myModif=Standard_False; + mySeqSolShape1.Clear(); + mySeqSolShape2.Clear(); + myModif = Standard_False; + + Standard_Real aBBDist = theBox1.Distance (theBox2); + if (aBBDist - myDstRef > myEps) + { + // The Box-Box distance is greater than the start distance. + // The solution cannot be improved further. + return; + } - switch (S1.ShapeType()) + switch (theS1.ShapeType()) { - case TopAbs_VERTEX : + case TopAbs_VERTEX: { - TopoDS_Vertex V1 = TopoDS::Vertex(S1); - switch (S2.ShapeType()) + TopoDS_Vertex aV1 = TopoDS::Vertex (theS1); + switch (theS2.ShapeType()) { - case TopAbs_VERTEX : + case TopAbs_VERTEX: { - TopoDS_Vertex V2 = TopoDS::Vertex(S2); - Perform( V1, V2 ); + TopoDS_Vertex aV2 = TopoDS::Vertex (theS2); + Perform (aV1, aV2, mySeqSolShape1, mySeqSolShape2); break; } - case TopAbs_EDGE : + case TopAbs_EDGE: { - TopoDS_Edge E2 = TopoDS::Edge(S2); - Perform( V1, E2, B1, B2 ); + TopoDS_Edge aE2 = TopoDS::Edge (theS2); + Perform (aV1, aE2, mySeqSolShape1, mySeqSolShape2); break; } - case TopAbs_FACE : + case TopAbs_FACE: { - TopoDS_Face F2 = TopoDS::Face(S2); - Perform( V1, F2, B1, B2 ); + TopoDS_Face aF2 = TopoDS::Face (theS2); + Perform (aV1, aF2, mySeqSolShape1, mySeqSolShape2); break; } default: @@ -548,41 +580,40 @@ void BRepExtrema_DistanceSS::Perform(const TopoDS_Shape& S1, const TopoDS_Shape& } break; } - - case TopAbs_EDGE : + case TopAbs_EDGE: { - TopoDS_Edge E1 = TopoDS::Edge(S1); - switch (S2.ShapeType()) + TopoDS_Edge aE1 = TopoDS::Edge (theS1); + switch (theS2.ShapeType()) { - case TopAbs_VERTEX : + case TopAbs_VERTEX: { - TopoDS_Vertex V2 = TopoDS::Vertex(S2); - Perform( E1, V2, B1, B2 ); + TopoDS_Vertex aV2 = TopoDS::Vertex (theS2); + Perform (aV2, aE1, mySeqSolShape2, mySeqSolShape1); break; } - case TopAbs_EDGE : + case TopAbs_EDGE: { - TopoDS_Edge E2 = TopoDS::Edge(S2); + TopoDS_Edge aE2 = TopoDS::Edge (theS2); TopoDS_Edge aTrimEdge; Standard_Boolean bIsTrim1 = Standard_False; Standard_Boolean bIsTrim2 = Standard_False; - TRIM_INFINIT_EDGE( E1, E2, aTrimEdge, bIsTrim1, bIsTrim2 ); + TRIM_INFINIT_EDGE (aE1, aE2, aTrimEdge, bIsTrim1, bIsTrim2); if (bIsTrim1) - E1 = aTrimEdge; + aE1 = aTrimEdge; if (bIsTrim2) - E2 = aTrimEdge; - Perform( E1, E2, B1, B2 ); + aE2 = aTrimEdge; + Perform (aE1, aE2, mySeqSolShape1, mySeqSolShape2); break; } - case TopAbs_FACE : + case TopAbs_FACE: { - TopoDS_Face F2 = TopoDS::Face(S2); + TopoDS_Face aF2 = TopoDS::Face (theS2); TopoDS_Face aTrimFace; Standard_Boolean bIsInfinit; - TRIM_INFINIT_FACE( E1, F2, aTrimFace, bIsInfinit ); + TRIM_INFINIT_FACE (aE1, aF2, aTrimFace, bIsInfinit); if (bIsInfinit) - F2 = aTrimFace; - Perform( E1, F2, B1, B2 ); + aF2 = aTrimFace; + Perform (aE1, aF2, mySeqSolShape1, mySeqSolShape2); break; } default: @@ -590,33 +621,32 @@ void BRepExtrema_DistanceSS::Perform(const TopoDS_Shape& S1, const TopoDS_Shape& } break; } - - case TopAbs_FACE : + case TopAbs_FACE: { - TopoDS_Face F1 = TopoDS::Face(S1); - switch (S2.ShapeType()) + TopoDS_Face aF1 = TopoDS::Face (theS1); + switch (theS2.ShapeType()) { - case TopAbs_VERTEX : + case TopAbs_VERTEX: { - TopoDS_Vertex V2 = TopoDS::Vertex(S2); - Perform( F1, V2, B1, B2 ); + TopoDS_Vertex aV2 = TopoDS::Vertex (theS2); + Perform (aV2, aF1, mySeqSolShape2, mySeqSolShape1); break; } - case TopAbs_EDGE : + case TopAbs_EDGE: { - TopoDS_Edge E2 = TopoDS::Edge(S2); + TopoDS_Edge aE2 = TopoDS::Edge (theS2); TopoDS_Face aTrimFace; Standard_Boolean bIsInfinit; - TRIM_INFINIT_FACE( F1, E2, aTrimFace, bIsInfinit ); + TRIM_INFINIT_FACE (aF1, aE2, aTrimFace, bIsInfinit); if (bIsInfinit) - F1 = aTrimFace; - Perform( F1, E2, B1, B2 ); + aF1 = aTrimFace; + Perform (aE2, aF1, mySeqSolShape2, mySeqSolShape1); break; } - case TopAbs_FACE : + case TopAbs_FACE: { - TopoDS_Face F2 = TopoDS::Face(S2); - Perform( F1, F2, B1, B2 ); + TopoDS_Face aF2 = TopoDS::Face (theS2); + Perform (aF1, aF2, mySeqSolShape1, mySeqSolShape2); break; } default: @@ -629,78 +659,80 @@ void BRepExtrema_DistanceSS::Perform(const TopoDS_Shape& S1, const TopoDS_Shape& } } -/*********************************************************************************/ - -void BRepExtrema_DistanceSS::Perform(const TopoDS_Vertex& S1, const TopoDS_Vertex& S2) -{ - const gp_Pnt P1 = BRep_Tool::Pnt(S1); - const gp_Pnt P2 = BRep_Tool::Pnt(S2); +//======================================================================= +//function : Perform +//purpose : Vertex-Vertex +//======================================================================= +void BRepExtrema_DistanceSS::Perform (const TopoDS_Vertex& theS1, + const TopoDS_Vertex& theS2, + BRepExtrema_SeqOfSolution& theSeqSolShape1, + BRepExtrema_SeqOfSolution& theSeqSolShape2) +{ + const gp_Pnt aP1 = BRep_Tool::Pnt (theS1); + const gp_Pnt aP2 = BRep_Tool::Pnt (theS2); - const Standard_Real Dst = P1.Distance(P2); - if ((Dst < myDstRef - myEps) || (fabs(Dst-myDstRef) < myEps)) - { + const Standard_Real Dst = aP1.Distance(aP2); + if ((Dst < myDstRef - myEps) || (fabs(Dst - myDstRef) < myEps)) + { if (myDstRef > Dst) - myDstRef=Dst; - myModif=Standard_True; - const BRepExtrema_SolutionElem Sol1(Dst,P1,BRepExtrema_IsVertex,S1); - const BRepExtrema_SolutionElem Sol2(Dst,P2,BRepExtrema_IsVertex,S2); - SeqSolShape1.Append(Sol1); - SeqSolShape2.Append(Sol2); + myDstRef = Dst; + myModif = Standard_True; + const BRepExtrema_SolutionElem Sol1 (Dst, aP1, BRepExtrema_IsVertex, theS1); + const BRepExtrema_SolutionElem Sol2 (Dst, aP2, BRepExtrema_IsVertex, theS2); + theSeqSolShape1.Append (Sol1); + theSeqSolShape2.Append (Sol2); } } -/*********************************************************************************/ - -void BRepExtrema_DistanceSS::Perform(const TopoDS_Vertex& S1, const TopoDS_Edge& S2, - const Bnd_Box& B1, const Bnd_Box& B2) -{ - if (BRep_Tool::Degenerated(S2)) +//======================================================================= +//function : Perform +//purpose : Vertex-Edge +//======================================================================= +void BRepExtrema_DistanceSS::Perform (const TopoDS_Vertex& theS1, + const TopoDS_Edge& theS2, + BRepExtrema_SeqOfSolution& theSeqSolShape1, + BRepExtrema_SeqOfSolution& theSeqSolShape2) +{ + if (BRep_Tool::Degenerated(theS2)) return; - const Standard_Real Dst=B1.Distance(B2); - if ((Dst < myDstRef - myEps) || (fabs(Dst-myDstRef) < myEps)) + BRepExtrema_ExtPC Ext(theS1, theS2); + const Standard_Integer NbExtrema = Ext.IsDone() ? Ext.NbExt() : 0; + if (NbExtrema > 0) { - BRepExtrema_ExtPC Ext(S1,S2); - const Standard_Integer NbExtrema = Ext.IsDone()? Ext.NbExt() : 0; - if ( NbExtrema > 0 ) + // Search minimum distance Dstmin + Standard_Integer i; + Standard_Real Dstmin = Ext.SquareDistance(1); + for (i = 2; i <= NbExtrema; i++) { - // Search minimum distance Dstmin - Standard_Integer i; - Standard_Real Dstmin = Ext.SquareDistance(1); - for (i = 2; i <= NbExtrema; i++) - { - const Standard_Real sDst = Ext.SquareDistance(i); - if (sDst=epsP) && (fabs(t-Ufin)>epsP) ) - { - if (myDstRef > Dstmin) - myDstRef=Dstmin; - myModif=Standard_True; - const BRepExtrema_SolutionElem Sol1(Dstmin,P1,BRepExtrema_IsVertex,S1); - const BRepExtrema_SolutionElem Sol2(Dstmin,Pt,BRepExtrema_IsOnEdge,S2,t); - SeqSolShape1.Append(Sol1); - SeqSolShape2.Append(Sol2); - } + if (myDstRef > Dstmin) + myDstRef = Dstmin; + myModif = Standard_True; + const BRepExtrema_SolutionElem Sol1(Dstmin, P1, BRepExtrema_IsVertex, theS1); + const BRepExtrema_SolutionElem Sol2(Dstmin, Pt, BRepExtrema_IsOnEdge, theS2, t); + theSeqSolShape1.Append(Sol1); + theSeqSolShape2.Append(Sol2); } } } @@ -709,114 +741,56 @@ void BRepExtrema_DistanceSS::Perform(const TopoDS_Vertex& S1, const TopoDS_Edge& } } -void BRepExtrema_DistanceSS::Perform(const TopoDS_Edge& S1,const TopoDS_Vertex& S2, - const Bnd_Box& B1,const Bnd_Box& B2) +//======================================================================= +//function : Perform +//purpose : Vertex-Face +//======================================================================= +void BRepExtrema_DistanceSS::Perform(const TopoDS_Vertex& theS1, + const TopoDS_Face& theS2, + BRepExtrema_SeqOfSolution& theSeqSolShape1, + BRepExtrema_SeqOfSolution& theSeqSolShape2) { - if (BRep_Tool::Degenerated(S1)) - return; - - const Standard_Real Dst=B1.Distance(B2); - if ((Dst < myDstRef - myEps) || (fabs(Dst-myDstRef) < myEps)) + BRepExtrema_ExtPF Ext (theS1, theS2, myFlag, myAlgo); + const Standard_Integer NbExtrema = Ext.IsDone() ? Ext.NbExt() : 0; + if (NbExtrema > 0) { - BRepExtrema_ExtPC Ext(S2,S1); - const Standard_Integer NbExtrema = Ext.IsDone()? Ext.NbExt() : 0; - if ( NbExtrema > 0 ) + // Search minimum distance Dstmin + Standard_Integer i; + Standard_Real Dstmin = Ext.SquareDistance(1); + for (i = 2; i <= NbExtrema; i++) { - // Search minimum distance Dstmin - Standard_Integer i; - Standard_Real Dstmin = Ext.SquareDistance(1); - for (i = 2; i <= NbExtrema; i++) - { - const Standard_Real sDst = Ext.SquareDistance(i); - if (sDst=epsP) && (fabs(t-Ufin)>epsP) ) - { - if (myDstRef > Dstmin) - myDstRef=Dstmin; - myModif=Standard_True; - const BRepExtrema_SolutionElem Sol1(Dstmin,Pt,BRepExtrema_IsOnEdge,S1,t); - const BRepExtrema_SolutionElem Sol2(Dstmin,P2,BRepExtrema_IsVertex,S2); - SeqSolShape1.Append(Sol1); - SeqSolShape2.Append(Sol2); - } - } - } - } - } + const Standard_Real sDst = Ext.SquareDistance(i); + if (sDst < Dstmin) + Dstmin = sDst; } - } -} - -/*********************************************************************************/ - -void BRepExtrema_DistanceSS::Perform(const TopoDS_Vertex& S1, const TopoDS_Face& S2, - const Bnd_Box& B1, const Bnd_Box& B2) -{ - const Standard_Real Dst=B1.Distance(B2); - if ((Dst < myDstRef - myEps) || (fabs(Dst-myDstRef) < myEps)) - { - BRepExtrema_ExtPF Ext(S1,S2,myFlag,myAlgo); - const Standard_Integer NbExtrema = Ext.IsDone()? Ext.NbExt() : 0; - if ( NbExtrema > 0 ) + Dstmin = sqrt(Dstmin); + if ((Dstmin < myDstRef - myEps) || (fabs(Dstmin - myDstRef) < myEps)) { - // Search minimum distance Dstmin - Standard_Integer i; - Standard_Real Dstmin = Ext.SquareDistance(1); - for (i = 2; i <= NbExtrema; i++) - { - const Standard_Real sDst = Ext.SquareDistance(i); - if (sDst Dstmin) - myDstRef=Dstmin; - myModif=Standard_True; - const BRepExtrema_SolutionElem Sol1(Dstmin,P1,BRepExtrema_IsVertex,S1); - const BRepExtrema_SolutionElem Sol2(Dstmin,Pt,BRepExtrema_IsInFace,S2,U,V); - SeqSolShape1.Append(Sol1); - SeqSolShape2.Append(Sol2); - } + if (myDstRef > Dstmin) + myDstRef = Dstmin; + myModif = Standard_True; + const BRepExtrema_SolutionElem Sol1(Dstmin, P1, BRepExtrema_IsVertex, theS1); + const BRepExtrema_SolutionElem Sol2(Dstmin, Pt, BRepExtrema_IsInFace, theS2, U, V); + theSeqSolShape1.Append(Sol1); + theSeqSolShape2.Append(Sol2); } } } @@ -825,206 +799,211 @@ void BRepExtrema_DistanceSS::Perform(const TopoDS_Vertex& S1, const TopoDS_Face& } } -void BRepExtrema_DistanceSS::Perform(const TopoDS_Face& S1, const TopoDS_Vertex& S2, - const Bnd_Box& B1, const Bnd_Box& B2) +//======================================================================= +//function : Perform +//purpose : Edge-Edge +//======================================================================= +void BRepExtrema_DistanceSS::Perform (const TopoDS_Edge& theS1, + const TopoDS_Edge& theS2, + BRepExtrema_SeqOfSolution& theSeqSolShape1, + BRepExtrema_SeqOfSolution& theSeqSolShape2) { - const Standard_Real Dst=B1.Distance(B2); - if ((Dst < myDstRef - myEps) || (fabs(Dst-myDstRef) < myEps)) - { - BRepExtrema_ExtPF Ext(S2,S1,myFlag,myAlgo); - const Standard_Integer NbExtrema = Ext.IsDone()? Ext.NbExt() : 0; - if ( NbExtrema > 0 ) + if (BRep_Tool::Degenerated(theS1) || BRep_Tool::Degenerated(theS2)) + return; + + const Standard_Real DstRef = myDstRef; + + BRepExtrema_ExtCC Ext(theS1, theS2); + const Standard_Integer NbExtrema = Ext.IsDone() ? (Ext.IsParallel() ? 0 : Ext.NbExt()) : 0; + if (NbExtrema > 0) + { + // Search minimum distance Dstmin + Standard_Integer i; + Standard_Real Dstmin = Ext.SquareDistance(1); + for (i = 2; i <= NbExtrema; i++) { - // Search minimum distance Dstmin - Standard_Integer i; - Standard_Real Dstmin = Ext.SquareDistance(1); - for (i = 2; i <= NbExtrema; i++) - { - const Standard_Real sDst = Ext.SquareDistance(i); - if (sDst Dstmin) - myDstRef=Dstmin; - myModif=Standard_True; - const BRepExtrema_SolutionElem Sol1(Dstmin,Pt,BRepExtrema_IsInFace,S1,U,V); - const BRepExtrema_SolutionElem Sol2(Dstmin,P2,BRepExtrema_IsVertex,S2); - SeqSolShape1.Append(Sol1); - SeqSolShape2.Append(Sol2); - } + if (myDstRef > Dstmin) + myDstRef = Dstmin; + myModif = Standard_True; + const BRepExtrema_SolutionElem Sol1(Dstmin, Pt1, BRepExtrema_IsOnEdge, theS1, t1); + const BRepExtrema_SolutionElem Sol2(Dstmin, Pt2, BRepExtrema_IsOnEdge, theS2, t2); + theSeqSolShape1.Append(Sol1); + theSeqSolShape2.Append(Sol2); } } } } } } -} -/*********************************************************************************/ + BRepExtrema_SeqOfSolution SeqSolution1; + BRepExtrema_SeqOfSolution SeqSolution2; + + PERFORM_C0(theS1, theS2, SeqSolution1, SeqSolution2, DstRef, myDstRef, myEps); -void BRepExtrema_DistanceSS::Perform(const TopoDS_Edge& S1, const TopoDS_Edge& S2, - const Bnd_Box& B1, const Bnd_Box& B2) + BRepExtrema_SeqOfSolution seqSol1; + BRepExtrema_SeqOfSolution seqSol2; + + if (SeqSolution1.Length() > 0 && SeqSolution2.Length() > 0) + MIN_SOLUTION(SeqSolution1, SeqSolution2, myDstRef, myEps, seqSol1, seqSol2); + + if (!seqSol1.IsEmpty() && !seqSol2.IsEmpty()) + { + theSeqSolShape1.Append(seqSol1); + theSeqSolShape2.Append(seqSol2); + myModif = Standard_True; + } +} + +//======================================================================= +//function : Perform +//purpose : Edge-Face +//======================================================================= +void BRepExtrema_DistanceSS::Perform (const TopoDS_Edge& theS1, const TopoDS_Face& theS2, + BRepExtrema_SeqOfSolution& theSeqSolShape1, + BRepExtrema_SeqOfSolution& theSeqSolShape2) { - if (BRep_Tool::Degenerated(S1) || BRep_Tool::Degenerated(S2)) + if (BRep_Tool::Degenerated(theS1)) return; - const Standard_Real Dst=B1.Distance(B2); - if ((Dst < myDstRef - myEps) || (fabs(Dst-myDstRef) < myEps)) - { - const Standard_Real DstRef = myDstRef; + BRepClass_FaceClassifier classifier; - BRepExtrema_ExtCC Ext(S1,S2); - const Standard_Integer NbExtrema = Ext.IsDone()? (Ext.IsParallel()? 0 : Ext.NbExt()) : 0; - if ( NbExtrema > 0 ) + BRepExtrema_ExtCF Ext(theS1, theS2); + const Standard_Integer NbExtrema = Ext.IsDone() ? (Ext.IsParallel() ? 0 : Ext.NbExt()) : 0; + if (NbExtrema > 0) + { + // Search minimum distance Dstmin + Standard_Integer i; + Standard_Real Dstmin = Ext.SquareDistance(1); + for (i = 2; i <= NbExtrema; i++) { - // Search minimum distance Dstmin - Standard_Integer i; - Standard_Real Dstmin = Ext.SquareDistance(1); - for (i = 2; i <= NbExtrema; i++) - { - const Standard_Real sDst = Ext.SquareDistance(i); - if (sDst=epsP)&&(fabs(t1-Ufin1)>epsP)&&(fabs(t2-Udeb2)>=epsP)&&(fabs(t2-Ufin2)>epsP)) + Ext.ParameterOnFace(i, U, V); + const gp_Pnt2d PUV(U, V); + classifier.Perform(theS2, PUV, tol); + if (classifier.State() == TopAbs_IN) { if (myDstRef > Dstmin) - myDstRef=Dstmin; - myModif=Standard_True; - const BRepExtrema_SolutionElem Sol1(Dstmin,Pt1,BRepExtrema_IsOnEdge,S1,t1); - const BRepExtrema_SolutionElem Sol2(Dstmin,Pt2,BRepExtrema_IsOnEdge,S2,t2); - SeqSolShape1.Append(Sol1); - SeqSolShape2.Append(Sol2); + myDstRef = Dstmin; + myModif = Standard_True; + const BRepExtrema_SolutionElem Sol1(Dstmin, Pt1, BRepExtrema_IsOnEdge, theS1, t1); + const BRepExtrema_SolutionElem Sol2(Dstmin, Pt2, BRepExtrema_IsInFace, theS2, U, V); + theSeqSolShape1.Append(Sol1); + theSeqSolShape2.Append(Sol2); } } } } } } + } + Standard_Real aFirst, aLast; + Handle(Geom_Curve) pCurv = BRep_Tool::Curve(theS1, aFirst, aLast); + if (pCurv->Continuity() == GeomAbs_C0) + { BRepExtrema_SeqOfSolution SeqSolution1; BRepExtrema_SeqOfSolution SeqSolution2; - PERFORM_C0(S1, S2, SeqSolution1, SeqSolution2, DstRef, myDstRef, myEps); - - BRepExtrema_SeqOfSolution seqSol1; - BRepExtrema_SeqOfSolution seqSol2; - - if (SeqSolution1.Length() > 0 && SeqSolution2.Length() > 0) - MIN_SOLUTION(SeqSolution1, SeqSolution2, myDstRef, myEps, seqSol1, seqSol2); - - if (!seqSol1.IsEmpty() && !seqSol2.IsEmpty()) - { - SeqSolShape1.Append(seqSol1); - SeqSolShape2.Append(seqSol2); - myModif = Standard_True; - } - } -} + GeomAdaptor_Curve aAdaptorCurve(pCurv, aFirst, aLast); + const Standard_Integer nbIntervals = aAdaptorCurve.NbIntervals(GeomAbs_C1); -/*********************************************************************************/ + TColStd_Array1OfReal arrInter(1, 1 + nbIntervals); + aAdaptorCurve.Intervals(arrInter, GeomAbs_C1); -void BRepExtrema_DistanceSS::Perform(const TopoDS_Edge& S1, const TopoDS_Face& S2, - const Bnd_Box& B1, const Bnd_Box& B2) -{ - if (BRep_Tool::Degenerated(S1)) - return; - - const Standard_Real Dst=B1.Distance(B2); - if ((Dst < myDstRef - myEps) || (fabs(Dst-myDstRef) < myEps)) - { - BRepClass_FaceClassifier classifier; + gp_Pnt Pt; + Standard_Real U, V; + const Standard_Real tol = BRep_Tool::Tolerance(theS2); - BRepExtrema_ExtCF Ext(S1,S2); - const Standard_Integer NbExtrema = Ext.IsDone()? (Ext.IsParallel()? 0 : Ext.NbExt()) : 0; - if ( NbExtrema > 0 ) + Standard_Integer i; + for (i = 1; i <= arrInter.Length(); i++) { - // Search minimum distance Dstmin - Standard_Integer i; - Standard_Real Dstmin = Ext.SquareDistance(1); - for (i = 2; i <= NbExtrema; i++) - { - const Standard_Real sDst = Ext.SquareDistance(i); - if (sDst 0) + { + // Search minimum distance Dstmin + Standard_Integer ii; + Standard_Real Dstmin = ExtPF.SquareDistance(1); + for (ii = 2; ii <= NbExtremaPF; ii++) + { + const Standard_Real sDst = ExtPF.SquareDistance(ii); + if (sDst < Dstmin) + Dstmin = sDst; + } + Dstmin = sqrt(Dstmin); - for (i = 1; i <= NbExtrema; i++) + if ((Dstmin < myDstRef - myEps) || (fabs(Dstmin - myDstRef) < myEps)) { - if (fabs(Dstmin-sqrt(Ext.SquareDistance(i)))=epsP)&&(fabs(t1-Ufin)>epsP)) + ExtPF.Parameter(ii, U, V); + const gp_Pnt2d PUV(U, V); + classifier.Perform(theS2, PUV, tol); + if (classifier.State() == TopAbs_IN) { - Ext.ParameterOnFace(i,U,V); - const gp_Pnt2d PUV(U,V); - classifier.Perform(S2,PUV,tol); - if (classifier.State()==TopAbs_IN) - { - if (myDstRef > Dstmin) - myDstRef=Dstmin; - myModif=Standard_True; - const BRepExtrema_SolutionElem Sol1(Dstmin,Pt1,BRepExtrema_IsOnEdge,S1,t1); - const BRepExtrema_SolutionElem Sol2(Dstmin,Pt2,BRepExtrema_IsInFace,S2,U,V); - SeqSolShape1.Append(Sol1); - SeqSolShape2.Append(Sol2); - } + if (myDstRef > Dstmin) + myDstRef = Dstmin; + myModif = Standard_True; + const BRepExtrema_SolutionElem Sol1(Dstmin, aPnt, BRepExtrema_IsOnEdge, theS1, aParameter); + const BRepExtrema_SolutionElem Sol2(Dstmin, ExtPF.Point(ii), BRepExtrema_IsInFace, theS2, U, V); + SeqSolution1.Append(Sol1); + SeqSolution2.Append(Sol2); } } } @@ -1032,289 +1011,78 @@ void BRepExtrema_DistanceSS::Perform(const TopoDS_Edge& S1, const TopoDS_Face& S } } - Standard_Real aFirst, aLast; - Handle(Geom_Curve) pCurv = BRep_Tool::Curve(S1, aFirst, aLast); - if (pCurv->Continuity() == GeomAbs_C0) - { - BRepExtrema_SeqOfSolution SeqSolution1; - BRepExtrema_SeqOfSolution SeqSolution2; - - GeomAdaptor_Curve aAdaptorCurve(pCurv, aFirst, aLast); - const Standard_Integer nbIntervals = aAdaptorCurve.NbIntervals(GeomAbs_C1); - - TColStd_Array1OfReal arrInter(1,1+nbIntervals); - aAdaptorCurve.Intervals(arrInter, GeomAbs_C1); - - gp_Pnt Pt; - Standard_Real U,V; - const Standard_Real tol = BRep_Tool::Tolerance(S2); - - Standard_Integer i; - for (i = 1; i <= arrInter.Length(); i++) - { - const Standard_Real aParameter = arrInter(i); - gp_Pnt aPnt = aAdaptorCurve.Value(aParameter); - TopoDS_Vertex V1 = BRepBuilderAPI_MakeVertex(aPnt); - - BRepExtrema_ExtPF ExtPF(V1,S2); - const Standard_Integer NbExtremaPF = ExtPF.IsDone()? ExtPF.NbExt() : 0; - if (NbExtremaPF > 0 ) - { - // Search minimum distance Dstmin - Standard_Integer ii; - Standard_Real Dstmin = ExtPF.SquareDistance(1); - for (ii = 2; ii <= NbExtremaPF; ii++) - { - const Standard_Real sDst = ExtPF.SquareDistance(ii); - if (sDst Dstmin) - myDstRef=Dstmin; - myModif=Standard_True; - const BRepExtrema_SolutionElem Sol1(Dstmin,aPnt,BRepExtrema_IsOnEdge,S1,aParameter); - const BRepExtrema_SolutionElem Sol2(Dstmin,ExtPF.Point(ii),BRepExtrema_IsInFace,S2,U,V); - SeqSolution1.Append(Sol1); - SeqSolution2.Append(Sol2); - } - } - } - } - } - } + BRepExtrema_SeqOfSolution seqSol1; + BRepExtrema_SeqOfSolution seqSol2; + if (SeqSolution1.Length() > 0 && SeqSolution2.Length() > 0) + MIN_SOLUTION(SeqSolution1, SeqSolution2, myDstRef, myEps, seqSol1, seqSol2); - BRepExtrema_SeqOfSolution seqSol1; - BRepExtrema_SeqOfSolution seqSol2; - if (SeqSolution1.Length() > 0 && SeqSolution2.Length() > 0) - MIN_SOLUTION(SeqSolution1, SeqSolution2, myDstRef, myEps, seqSol1, seqSol2); - - if (!seqSol1.IsEmpty() && !seqSol2.IsEmpty()) - { - SeqSolShape1.Append(seqSol1); - SeqSolShape2.Append(seqSol2); - } + if (!seqSol1.IsEmpty() && !seqSol2.IsEmpty()) + { + theSeqSolShape1.Append(seqSol1); + theSeqSolShape2.Append(seqSol2); } } } -void BRepExtrema_DistanceSS::Perform(const TopoDS_Face& S1, const TopoDS_Edge& S2, - const Bnd_Box& B1, const Bnd_Box& B2) +//======================================================================= +//function : Perform +//purpose : Face-Face +//======================================================================= +void BRepExtrema_DistanceSS::Perform (const TopoDS_Face& theS1, + const TopoDS_Face& theS2, + BRepExtrema_SeqOfSolution& theSeqSolShape1, + BRepExtrema_SeqOfSolution& theSeqSolShape2) { - if (BRep_Tool::Degenerated(S2)) - return; - - const Standard_Real Dst=B1.Distance(B2); - if ((Dst < myDstRef - myEps) || (fabs(Dst-myDstRef) < myEps)) + BRepExtrema_ExtFF Ext(theS1, theS2); + const Standard_Integer NbExtrema = Ext.IsDone() ? (Ext.IsParallel() ? 0 : Ext.NbExt()) : 0; + if (NbExtrema > 0) { - BRepClass_FaceClassifier classifier; - - BRepExtrema_ExtCF Ext(S2,S1); - const Standard_Integer NbExtrema = Ext.IsDone()? (Ext.IsParallel()? 0 : Ext.NbExt()) : 0; - if ( NbExtrema > 0 ) + // Search minimum distance Dstmin + Standard_Integer i; + Standard_Real Dstmin = Ext.SquareDistance(1); + for (i = 2; i <= NbExtrema; i++) { - // Search minimum distance Dstmin - Standard_Integer i; - Standard_Real Dstmin = Ext.SquareDistance(1); - for (i = 2; i <= NbExtrema; i++) - { - const Standard_Real sDst = Ext.SquareDistance(i); - if (sDst=epsP)&&(fabs(t1-Ufin)>epsP)) - { - Ext.ParameterOnFace(i,U,V); - const gp_Pnt2d PUV(U,V); - classifier.Perform(S1,PUV,tol); - if (classifier.State()==TopAbs_IN) - { - if (myDstRef > Dstmin) - myDstRef=Dstmin; - myModif=Standard_True; - const BRepExtrema_SolutionElem Sol2(Dstmin,Pt1,BRepExtrema_IsOnEdge,S2,t1); - const BRepExtrema_SolutionElem Sol1(Dstmin,Pt2,BRepExtrema_IsInFace,S1,U,V); - SeqSolShape1.Append(Sol1); - SeqSolShape2.Append(Sol2); - } - } - } - } - } - } + const Standard_Real sDst = Ext.SquareDistance(i); + if (sDst < Dstmin) + Dstmin = sDst; } - - Standard_Real aFirst, aLast; - Handle(Geom_Curve) pCurv = BRep_Tool::Curve(S2, aFirst, aLast); - if (pCurv->Continuity() == GeomAbs_C0) + Dstmin = sqrt(Dstmin); + if ((Dstmin < myDstRef - myEps) || (fabs(Dstmin - myDstRef) < myEps)) { - BRepExtrema_SeqOfSolution SeqSolution1; - BRepExtrema_SeqOfSolution SeqSolution2; - - GeomAdaptor_Curve aAdaptorCurve(pCurv, aFirst, aLast); - const Standard_Integer nbIntervals = aAdaptorCurve.NbIntervals(GeomAbs_C1); - - TColStd_Array1OfReal arrInter(1,1+nbIntervals); - aAdaptorCurve.Intervals(arrInter, GeomAbs_C1); + const Standard_Real tol1 = BRep_Tool::Tolerance(theS1); + const Standard_Real tol2 = BRep_Tool::Tolerance(theS2); - gp_Pnt Pt; - Standard_Real U,V; - const Standard_Real tol = BRep_Tool::Tolerance(S1); - - Standard_Integer i; - for (i = 1; i <= arrInter.Length(); i++) - { - const Standard_Real aParameter = arrInter(i); - gp_Pnt aPnt = aAdaptorCurve.Value(aParameter); - TopoDS_Vertex V1 = BRepBuilderAPI_MakeVertex(aPnt); - - BRepExtrema_ExtPF ExtPF(V1,S1); - const Standard_Integer NbExtremaPF = ExtPF.IsDone()? ExtPF.NbExt() : 0; - if (NbExtremaPF > 0 ) - { - // Search minimum distance Dstmin - Standard_Integer ii; - Standard_Real Dstmin = ExtPF.SquareDistance(1); - for (ii = 2; ii <= NbExtremaPF; ii++) - { - const Standard_Real sDst = ExtPF.SquareDistance(ii); - if (sDst Dstmin) - myDstRef=Dstmin; - myModif=Standard_True; - const BRepExtrema_SolutionElem Sol2(Dstmin,aPnt,BRepExtrema_IsOnEdge,S2,aParameter); - const BRepExtrema_SolutionElem Sol1(Dstmin,ExtPF.Point(ii),BRepExtrema_IsInFace,S1,U,V); - SeqSolution1.Append(Sol1); - SeqSolution2.Append(Sol2); - } - } - } - } - } - } - - BRepExtrema_SeqOfSolution seqSol1; - BRepExtrema_SeqOfSolution seqSol2; - if (SeqSolution1.Length() > 0 && SeqSolution2.Length() > 0) - MIN_SOLUTION(SeqSolution1, SeqSolution2, myDstRef, myEps, seqSol1, seqSol2); - - if (!seqSol1.IsEmpty() && !seqSol2.IsEmpty()) - { - SeqSolShape1.Append(seqSol1); - SeqSolShape2.Append(seqSol2); - } - } - } -} - -/*********************************************************************************/ + gp_Pnt Pt1, Pt2; + gp_Pnt2d PUV; + Standard_Real U1, V1, U2, V2; + BRepClass_FaceClassifier classifier; -void BRepExtrema_DistanceSS::Perform(const TopoDS_Face& S1, const TopoDS_Face& S2, - const Bnd_Box& B1, const Bnd_Box& B2) -{ - const Standard_Real Dst=B1.Distance(B2); - if ((Dst < myDstRef - myEps) || (fabs(Dst-myDstRef) < myEps)) - { - BRepExtrema_ExtFF Ext(S1,S2); - const Standard_Integer NbExtrema = Ext.IsDone()? (Ext.IsParallel()? 0 : Ext.NbExt()) : 0; - if ( NbExtrema > 0 ) - { - // Search minimum distance Dstmin - Standard_Integer i; - Standard_Real Dstmin = Ext.SquareDistance(1); - for (i = 2; i <= NbExtrema; i++) + for (i = 1; i <= NbExtrema; i++) { - const Standard_Real sDst = Ext.SquareDistance(i); - if (sDst Dstmin) - myDstRef=Dstmin; - myModif=Standard_True; - const BRepExtrema_SolutionElem Sol1(Dstmin,Pt1,BRepExtrema_IsInFace,S1,U1,V1); - const BRepExtrema_SolutionElem Sol2(Dstmin,Pt2,BRepExtrema_IsInFace,S2,U2,V2); - SeqSolShape1.Append(Sol1); - SeqSolShape2.Append(Sol2); - } + if (myDstRef > Dstmin) + myDstRef = Dstmin; + myModif = Standard_True; + const BRepExtrema_SolutionElem Sol1(Dstmin, Pt1, BRepExtrema_IsInFace, theS1, U1, V1); + const BRepExtrema_SolutionElem Sol2(Dstmin, Pt2, BRepExtrema_IsInFace, theS2, U2, V2); + theSeqSolShape1.Append(Sol1); + theSeqSolShape2.Append(Sol2); } } } @@ -1323,5 +1091,3 @@ void BRepExtrema_DistanceSS::Perform(const TopoDS_Face& S1, const TopoDS_Face& S } } } - -/*********************************************************************************/ diff --git a/src/BRepExtrema/BRepExtrema_DistanceSS.hxx b/src/BRepExtrema/BRepExtrema_DistanceSS.hxx index 1f7e6fc9e4..638bff0297 100644 --- a/src/BRepExtrema/BRepExtrema_DistanceSS.hxx +++ b/src/BRepExtrema/BRepExtrema_DistanceSS.hxx @@ -26,111 +26,116 @@ class TopoDS_Vertex; class TopoDS_Edge; class TopoDS_Face; - -//! This class allows to compute minimum distance between two shapes
-//! (face edge vertex) and is used in DistShapeShape class.
+//! This class allows to compute minimum distance between two brep shapes +//! (face edge vertex) and is used in DistShapeShape class. class BRepExtrema_DistanceSS { - public: +public: DEFINE_STANDARD_ALLOC - //! computes the distance between two Shapes ( face edge vertex).
- BRepExtrema_DistanceSS(const TopoDS_Shape& S1, const TopoDS_Shape& S2, - const Bnd_Box& B1, const Bnd_Box& B2, - const Standard_Real DstRef, - const Extrema_ExtFlag F = Extrema_ExtFlag_MINMAX, - const Extrema_ExtAlgo A = Extrema_ExtAlgo_Grad) - : myDstRef(DstRef), myModif(Standard_False), myEps(Precision::Confusion()), myFlag(F), myAlgo(A) - { - Perform(S1, S2, B1, B2); - } - //! computes the distance between two Shapes ( face edge vertex).
- //! Parameter theDeflection is used to specify a maximum deviation
- //! of extreme distances from the minimum one.
- //! Default value is Precision::Confusion().
- BRepExtrema_DistanceSS(const TopoDS_Shape& S1, const TopoDS_Shape& S2, - const Bnd_Box& B1, const Bnd_Box& B2, - const Standard_Real DstRef, const Standard_Real aDeflection, - const Extrema_ExtFlag F = Extrema_ExtFlag_MINMAX, - const Extrema_ExtAlgo A = Extrema_ExtAlgo_Grad) - : myDstRef(DstRef), myModif(Standard_False), myEps(aDeflection), myFlag(F), myAlgo(A) +public: //! @name Constructor from two shapes + + //! Computes the distance between two Shapes (face edge vertex). + //! @param theS1 - First shape + //! @param theS2 - Second shape + //! @param theBox1 - Bounding box of first shape + //! @param theBox2 - Bounding box of second shape + //! @param theDstRef - Initial distance between the shapes to start with + //! @param theDeflection - Maximum deviation of extreme distances from the minimum + //! one (default is Precision::Confusion()). + //! @param theExtFlag - Specifies which extrema solutions to look for + //! (default is MINMAX, applied only to point-face extrema) + //! @param theExtAlgo - Specifies which extrema algorithm is to be used + //! (default is Grad algo, applied only to point-face extrema) + BRepExtrema_DistanceSS(const TopoDS_Shape& theS1, const TopoDS_Shape& theS2, + const Bnd_Box& theBox1, const Bnd_Box& theBox2, + const Standard_Real theDstRef, + const Standard_Real theDeflection = Precision::Confusion(), + const Extrema_ExtFlag theExtFlag = Extrema_ExtFlag_MINMAX, + const Extrema_ExtAlgo theExtAlgo = Extrema_ExtAlgo_Grad) + : + myDstRef(theDstRef), + myModif(Standard_False), + myEps(theDeflection), + myFlag(theExtFlag), + myAlgo(theExtAlgo) { - Perform(S1, S2, B1, B2); + Perform(theS1, theS2, theBox1, theBox2); } - //! True if the distance has been computed
+ +public: //! @name Results + + //! Returns true if the distance has been computed, false otherwise. Standard_Boolean IsDone() const { return myModif; } - //! returns the distance value
+ + //! Returns the distance value. Standard_Real DistValue() const { return myDstRef; } - //! returns the list of solutions on the first shape
+ + //! Returns the list of solutions on the first shape. const BRepExtrema_SeqOfSolution& Seq1Value() const { - return SeqSolShape1; + return mySeqSolShape1; } - //! returns the list of solutions on the second shape
+ + //! Returns the list of solutions on the second shape. const BRepExtrema_SeqOfSolution& Seq2Value() const { - return SeqSolShape2; - } - //! sets the flag controlling minimum and maximum search - void SetFlag(const Extrema_ExtFlag F) - { - myFlag = F; - } - //! sets the flag controlling ... - void SetAlgo(const Extrema_ExtAlgo A) - { - myAlgo = A; + return mySeqSolShape2; } - private: - - //! computes the distance between two Shapes ( face edge vertex)
- Standard_EXPORT void Perform(const TopoDS_Shape& S1,const TopoDS_Shape& S2,const Bnd_Box& B1,const Bnd_Box& B2); - - //! computes the distance between two vertices
- void Perform(const TopoDS_Vertex& S1,const TopoDS_Vertex& S2); - //! computes the minimum distance between a vertex and an edge
- void Perform(const TopoDS_Vertex& S1,const TopoDS_Edge& S2,const Bnd_Box& B1,const Bnd_Box& B2); - //! computes the minimum distance between a vertex and a face
- void Perform(const TopoDS_Vertex& S1,const TopoDS_Face& S2,const Bnd_Box& B1,const Bnd_Box& B2); - - //! computes the minimum distance between an edge and a vertex
- void Perform(const TopoDS_Edge& S1,const TopoDS_Vertex& S2,const Bnd_Box& B1,const Bnd_Box& B2); - /*{ - Perform(S2, S1, B2, B1); - }*/ - //! computes the minimum distance between two edges
- void Perform(const TopoDS_Edge& S1,const TopoDS_Edge& S2,const Bnd_Box& B1,const Bnd_Box& B2); - //! computes the minimum distance an edge and a face
- void Perform(const TopoDS_Edge& S1,const TopoDS_Face& S2,const Bnd_Box& B1,const Bnd_Box& B2); - - //! computes the minimum distance betwwen a face and a vertex
- void Perform(const TopoDS_Face& S1,const TopoDS_Vertex& S2,const Bnd_Box& B1,const Bnd_Box& B2); - /*{ - Perform(S2, S1, B2, B1); - }*/ - //! computes the minimum distance between a face and an edge
- void Perform(const TopoDS_Face& S1,const TopoDS_Edge& S2,const Bnd_Box& B1,const Bnd_Box& B2); - /*{ - Perform(S2, S1, B2, B1); - }*/ - //! computes the minimum distance between two faces
- void Perform(const TopoDS_Face& S1,const TopoDS_Face& S2,const Bnd_Box& B1,const Bnd_Box& B2); - - BRepExtrema_SeqOfSolution SeqSolShape1; - BRepExtrema_SeqOfSolution SeqSolShape2; - Standard_Real myDstRef; - Standard_Boolean myModif; - Standard_Real myEps; - Extrema_ExtFlag myFlag; - Extrema_ExtAlgo myAlgo; +private: //! @name private methods performing the search + + //! Computes the distance between two Shapes (face edge vertex). + //! General method to sort out the shape types and call the specific method. + Standard_EXPORT void Perform(const TopoDS_Shape& theS1, const TopoDS_Shape& theS2, + const Bnd_Box& theBox1, const Bnd_Box& theBox2); + + //! Computes the distance between two vertices. + void Perform(const TopoDS_Vertex& S1, const TopoDS_Vertex& S2, + BRepExtrema_SeqOfSolution& theSeqSolShape1, + BRepExtrema_SeqOfSolution& theSeqSolShape2); + + //! Computes the minimum distance between a vertex and an edge. + void Perform(const TopoDS_Vertex& theS1, const TopoDS_Edge& theS2, + BRepExtrema_SeqOfSolution& theSeqSolShape1, + BRepExtrema_SeqOfSolution& theSeqSolShape2); + + //! Computes the minimum distance between a vertex and a face. + void Perform(const TopoDS_Vertex& theS1, const TopoDS_Face& theS2, + BRepExtrema_SeqOfSolution& theSeqSolShape1, + BRepExtrema_SeqOfSolution& theSeqSolShape2); + + //! Computes the minimum distance between two edges. + void Perform(const TopoDS_Edge& theS1, const TopoDS_Edge& theS2, + BRepExtrema_SeqOfSolution& theSeqSolShape1, + BRepExtrema_SeqOfSolution& theSeqSolShape2); + + //! Computes the minimum distance between an edge and a face. + void Perform(const TopoDS_Edge& theS1, const TopoDS_Face& theS2, + BRepExtrema_SeqOfSolution& theSeqSolShape1, + BRepExtrema_SeqOfSolution& theSeqSolShape2); + + //! Computes the minimum distance between two faces. + void Perform(const TopoDS_Face& theS1, const TopoDS_Face& theS2, + BRepExtrema_SeqOfSolution& theSeqSolShape1, + BRepExtrema_SeqOfSolution& theSeqSolShape2); + +private: //! @name Fields + + BRepExtrema_SeqOfSolution mySeqSolShape1; //!< Solutions on the first shape + BRepExtrema_SeqOfSolution mySeqSolShape2; //!< Solutions on the second shape + Standard_Real myDstRef; //!< The minimal distance found + Standard_Boolean myModif; //!< Flag indicating whether the solution was improved or not + Standard_Real myEps; //!< Deflection + Extrema_ExtFlag myFlag; //!< Extrema flag indicating what solutions to look for + Extrema_ExtAlgo myAlgo; //!< Extrema algo to be used to look for solutions }; #endif diff --git a/tests/bugs/modalg_7/bug32644 b/tests/bugs/modalg_7/bug32644 new file mode 100644 index 0000000000..6a6964039d --- /dev/null +++ b/tests/bugs/modalg_7/bug32644 @@ -0,0 +1,22 @@ +puts "=================================================" +puts "OCC32644: Modeling Algorithms - Empty result of section operation" +puts "=================================================" +puts "" + +restore [locate_data_file bug32644_face.brep] f +restore [locate_data_file bug32644_wire.brep] w + +bclearobjects +bcleartools +baddobjects f +baddtools w +bfillds + +bbop result 4 +checkprops result -l 2.06 +checksection result -r 2 +checknbshapes result -edge 2 + +bsplit rsplit +checkshape rsplit +checknbshapes rsplit -face 2 From 2f23e4e3a53dcb17de80bebfdbb63d20a0546ef4 Mon Sep 17 00:00:00 2001 From: aml Date: Sun, 26 Dec 2021 10:22:25 +0300 Subject: [PATCH 182/639] 0032751: Coding - get rid of unused headers [AppStd to BndLib] --- src/AppStd/AppStd_Application.hxx | 3 --- src/AppStdL/AppStdL_Application.hxx | 3 --- src/ApproxInt/ApproxInt_KnotTools.cxx | 4 ---- src/ApproxInt/ApproxInt_KnotTools.hxx | 3 --- src/ApproxInt/ApproxInt_SvSurfaces.cxx | 3 --- .../Aspect_AspectFillAreaDefinitionError.hxx | 1 - src/Aspect/Aspect_AspectLineDefinitionError.hxx | 1 - src/Aspect/Aspect_AspectMarkerDefinitionError.hxx | 1 - src/Aspect/Aspect_CircularGrid.hxx | 4 ---- src/Aspect/Aspect_ColorSpace.hxx | 2 -- src/Aspect/Aspect_GenId.hxx | 1 - src/Aspect/Aspect_Grid.hxx | 2 -- src/Aspect/Aspect_RectangularGrid.hxx | 3 --- src/Aspect/Aspect_ScrollDelta.hxx | 1 - src/Aspect/Aspect_Touch.hxx | 2 -- src/Aspect/Aspect_Window.cxx | 2 -- src/Aspect/Aspect_WindowInputListener.hxx | 2 -- src/BiTgte/BiTgte_Blend.cxx | 10 ---------- src/BiTgte/BiTgte_Blend.hxx | 5 ----- src/BiTgte/BiTgte_CurveOnEdge.cxx | 3 --- src/BiTgte/BiTgte_CurveOnEdge.hxx | 2 -- src/BiTgte/BiTgte_CurveOnVertex.cxx | 2 -- src/BiTgte/BiTgte_CurveOnVertex.hxx | 2 -- src/BinDrivers/BinDrivers.cxx | 2 -- .../BinDrivers_DocumentRetrievalDriver.cxx | 1 - .../BinDrivers_DocumentRetrievalDriver.hxx | 2 -- .../BinDrivers_DocumentStorageDriver.cxx | 2 -- .../BinDrivers_DocumentStorageDriver.hxx | 1 - src/BinLDrivers/BinLDrivers.cxx | 2 -- .../BinLDrivers_DocumentRetrievalDriver.cxx | 5 ----- .../BinLDrivers_DocumentRetrievalDriver.hxx | 2 -- src/BinLDrivers/BinLDrivers_DocumentSection.cxx | 1 - src/BinLDrivers/BinLDrivers_DocumentSection.hxx | 2 -- .../BinLDrivers_DocumentStorageDriver.cxx | 7 ------- .../BinLDrivers_DocumentStorageDriver.hxx | 2 -- src/BinMDF/BinMDF.cxx | 1 - src/BinMDF/BinMDF_ADriver.hxx | 5 ----- src/BinMDF/BinMDF_ADriverTable.hxx | 1 - src/BinMDF/BinMDF_ReferenceDriver.hxx | 2 -- src/BinMDF/BinMDF_TagSourceDriver.hxx | 2 -- src/BinMDataStd/BinMDataStd.hxx | 1 - src/BinMDataStd/BinMDataStd_AsciiStringDriver.cxx | 2 -- src/BinMDataStd/BinMDataStd_AsciiStringDriver.hxx | 2 -- src/BinMDataStd/BinMDataStd_BooleanArrayDriver.cxx | 2 -- src/BinMDataStd/BinMDataStd_BooleanArrayDriver.hxx | 2 -- src/BinMDataStd/BinMDataStd_BooleanListDriver.hxx | 2 -- src/BinMDataStd/BinMDataStd_ByteArrayDriver.cxx | 2 -- src/BinMDataStd/BinMDataStd_ByteArrayDriver.hxx | 1 - src/BinMDataStd/BinMDataStd_ExpressionDriver.hxx | 2 -- .../BinMDataStd_ExtStringArrayDriver.cxx | 2 -- .../BinMDataStd_ExtStringArrayDriver.hxx | 1 - .../BinMDataStd_ExtStringListDriver.hxx | 2 -- src/BinMDataStd/BinMDataStd_GenericEmptyDriver.hxx | 2 -- .../BinMDataStd_GenericExtStringDriver.cxx | 2 -- .../BinMDataStd_GenericExtStringDriver.hxx | 2 -- src/BinMDataStd/BinMDataStd_IntPackedMapDriver.cxx | 2 -- src/BinMDataStd/BinMDataStd_IntPackedMapDriver.hxx | 1 - src/BinMDataStd/BinMDataStd_IntegerArrayDriver.cxx | 1 - src/BinMDataStd/BinMDataStd_IntegerArrayDriver.hxx | 1 - src/BinMDataStd/BinMDataStd_IntegerDriver.cxx | 2 -- src/BinMDataStd/BinMDataStd_IntegerDriver.hxx | 2 -- src/BinMDataStd/BinMDataStd_IntegerListDriver.cxx | 1 - src/BinMDataStd/BinMDataStd_IntegerListDriver.hxx | 2 -- src/BinMDataStd/BinMDataStd_NamedDataDriver.cxx | 14 -------------- src/BinMDataStd/BinMDataStd_NamedDataDriver.hxx | 2 -- src/BinMDataStd/BinMDataStd_RealArrayDriver.cxx | 1 - src/BinMDataStd/BinMDataStd_RealArrayDriver.hxx | 1 - src/BinMDataStd/BinMDataStd_RealDriver.cxx | 2 -- src/BinMDataStd/BinMDataStd_RealDriver.hxx | 2 -- src/BinMDataStd/BinMDataStd_RealListDriver.cxx | 1 - src/BinMDataStd/BinMDataStd_RealListDriver.hxx | 2 -- .../BinMDataStd_ReferenceArrayDriver.hxx | 2 -- .../BinMDataStd_ReferenceListDriver.hxx | 2 -- src/BinMDataStd/BinMDataStd_TreeNodeDriver.cxx | 1 - src/BinMDataStd/BinMDataStd_TreeNodeDriver.hxx | 2 -- src/BinMDataStd/BinMDataStd_UAttributeDriver.hxx | 2 -- src/BinMDataStd/BinMDataStd_VariableDriver.hxx | 2 -- src/BinMDataXtd/BinMDataXtd.hxx | 1 - src/BinMDataXtd/BinMDataXtd_ConstraintDriver.hxx | 2 -- src/BinMDataXtd/BinMDataXtd_GeometryDriver.hxx | 2 -- src/BinMDataXtd/BinMDataXtd_PatternStdDriver.hxx | 2 -- src/BinMDataXtd/BinMDataXtd_PositionDriver.cxx | 1 - src/BinMDataXtd/BinMDataXtd_PositionDriver.hxx | 2 -- src/BinMDataXtd/BinMDataXtd_PresentationDriver.hxx | 2 -- .../BinMDataXtd_TriangulationDriver.hxx | 2 -- src/BinMDocStd/BinMDocStd_XLinkDriver.hxx | 1 - src/BinMFunction/BinMFunction_FunctionDriver.hxx | 1 - src/BinMFunction/BinMFunction_GraphNodeDriver.cxx | 1 - src/BinMFunction/BinMFunction_GraphNodeDriver.hxx | 1 - src/BinMFunction/BinMFunction_ScopeDriver.cxx | 1 - src/BinMFunction/BinMFunction_ScopeDriver.hxx | 1 - src/BinMNaming/BinMNaming_NamedShapeDriver.cxx | 1 - src/BinMNaming/BinMNaming_NamedShapeDriver.hxx | 2 -- src/BinMNaming/BinMNaming_NamingDriver.cxx | 3 --- src/BinMNaming/BinMNaming_NamingDriver.hxx | 1 - src/BinMXCAFDoc/BinMXCAFDoc.cxx | 2 -- .../BinMXCAFDoc_AssemblyItemRefDriver.cxx | 1 - .../BinMXCAFDoc_AssemblyItemRefDriver.hxx | 1 - src/BinMXCAFDoc/BinMXCAFDoc_CentroidDriver.hxx | 2 -- src/BinMXCAFDoc/BinMXCAFDoc_ColorDriver.hxx | 2 -- src/BinMXCAFDoc/BinMXCAFDoc_DatumDriver.cxx | 1 - src/BinMXCAFDoc/BinMXCAFDoc_DatumDriver.hxx | 2 -- src/BinMXCAFDoc/BinMXCAFDoc_DimTolDriver.cxx | 2 -- src/BinMXCAFDoc/BinMXCAFDoc_DimTolDriver.hxx | 2 -- src/BinMXCAFDoc/BinMXCAFDoc_GraphNodeDriver.hxx | 2 -- src/BinMXCAFDoc/BinMXCAFDoc_LengthUnitDriver.hxx | 2 -- src/BinMXCAFDoc/BinMXCAFDoc_LocationDriver.hxx | 1 - src/BinMXCAFDoc/BinMXCAFDoc_MaterialDriver.hxx | 2 -- src/BinMXCAFDoc/BinMXCAFDoc_NoteBinDataDriver.cxx | 2 -- src/BinMXCAFDoc/BinMXCAFDoc_NoteCommentDriver.cxx | 1 - src/BinMXCAFDoc/BinMXCAFDoc_NoteDriver.cxx | 1 - src/BinMXCAFDoc/BinMXCAFDoc_NoteDriver.hxx | 1 - src/BinObjMgt/BinObjMgt_Persistent.cxx | 5 ----- src/BinObjMgt/BinObjMgt_Persistent.hxx | 6 ------ src/BinTObjDrivers/BinTObjDrivers.cxx | 1 - .../BinTObjDrivers_IntSparseArrayDriver.cxx | 2 -- src/BinTObjDrivers/BinTObjDrivers_ModelDriver.cxx | 1 - .../BinTObjDrivers_ReferenceDriver.cxx | 3 --- src/BinTools/BinTools.hxx | 5 ----- src/BinTools/BinTools_Curve2dSet.cxx | 1 - src/BinTools/BinTools_CurveSet.cxx | 1 - src/BinTools/BinTools_LocationSet.cxx | 3 --- src/BinTools/BinTools_LocationSet.hxx | 1 - src/BinTools/BinTools_OStream.cxx | 1 - src/BinTools/BinTools_ShapeReader.cxx | 1 - src/BinTools/BinTools_ShapeSet.cxx | 7 ------- src/BinTools/BinTools_ShapeWriter.hxx | 1 - src/BinTools/BinTools_SurfaceSet.cxx | 3 --- src/BinXCAFDrivers/BinXCAFDrivers.cxx | 1 - src/Bisector/Bisector_Bisec.cxx | 1 - src/Bisector/Bisector_Bisec.hxx | 2 -- src/Bisector/Bisector_BisecAna.cxx | 10 ---------- src/Bisector/Bisector_BisecAna.hxx | 1 - src/Bisector/Bisector_BisecCC.cxx | 9 --------- src/Bisector/Bisector_BisecCC.hxx | 3 --- src/Bisector/Bisector_BisecPC.cxx | 13 ------------- src/Bisector/Bisector_BisecPC.hxx | 3 --- src/Bisector/Bisector_Curve.hxx | 1 - src/Bisector/Bisector_FunctionInter.hxx | 2 -- src/Bisector/Bisector_Inter.cxx | 1 - src/Bisector/Bisector_Inter.hxx | 2 -- src/Bisector/Bisector_PointOnBis.hxx | 1 - src/Bisector/Bisector_PolyBis.cxx | 3 --- src/Bisector/Bisector_PolyBis.hxx | 2 -- src/Blend/Blend_AppFunction.cxx | 3 --- src/Blend/Blend_AppFunction.hxx | 2 -- src/Blend/Blend_CSFunction.cxx | 5 ----- src/Blend/Blend_CSFunction.hxx | 2 -- src/Blend/Blend_CurvPointFuncInv.cxx | 2 -- src/Blend/Blend_CurvPointFuncInv.hxx | 2 -- src/Blend/Blend_FuncInv.cxx | 1 - src/Blend/Blend_Function.cxx | 4 ---- src/Blend/Blend_Function.hxx | 4 ---- src/Blend/Blend_Point.cxx | 1 - src/Blend/Blend_Point.hxx | 1 - src/Blend/Blend_RstRstFunction.cxx | 5 ----- src/Blend/Blend_RstRstFunction.hxx | 4 ---- src/Blend/Blend_SurfCurvFuncInv.cxx | 1 - src/Blend/Blend_SurfCurvFuncInv.hxx | 2 -- src/Blend/Blend_SurfPointFuncInv.cxx | 2 -- src/Blend/Blend_SurfPointFuncInv.hxx | 2 -- src/Blend/Blend_SurfRstFunction.cxx | 5 ----- src/Blend/Blend_SurfRstFunction.hxx | 4 ---- src/BlendFunc/BlendFunc.cxx | 2 -- src/BlendFunc/BlendFunc_CSCircular.cxx | 2 -- src/BlendFunc/BlendFunc_CSConstRad.cxx | 2 -- src/BlendFunc/BlendFunc_ChAsym.cxx | 2 -- src/BlendFunc/BlendFunc_ChAsym.hxx | 1 - src/BlendFunc/BlendFunc_ChAsymInv.cxx | 2 -- src/BlendFunc/BlendFunc_ChAsymInv.hxx | 1 - src/BlendFunc/BlendFunc_ChamfInv.cxx | 3 --- src/BlendFunc/BlendFunc_Chamfer.cxx | 7 ------- src/BlendFunc/BlendFunc_Chamfer.hxx | 6 ------ src/BlendFunc/BlendFunc_ConstRad.cxx | 1 - src/BlendFunc/BlendFunc_ConstRad.hxx | 1 - src/BlendFunc/BlendFunc_ConstRadInv.cxx | 2 -- src/BlendFunc/BlendFunc_ConstThroat.cxx | 7 ------- src/BlendFunc/BlendFunc_ConstThroat.hxx | 4 ---- src/BlendFunc/BlendFunc_ConstThroatInv.cxx | 3 --- .../BlendFunc_ConstThroatWithPenetration.cxx | 7 ------- .../BlendFunc_ConstThroatWithPenetration.hxx | 5 ----- .../BlendFunc_ConstThroatWithPenetrationInv.cxx | 3 --- src/BlendFunc/BlendFunc_Corde.cxx | 3 --- src/BlendFunc/BlendFunc_EvolRad.cxx | 5 ----- src/BlendFunc/BlendFunc_EvolRad.hxx | 1 - src/BlendFunc/BlendFunc_EvolRadInv.cxx | 2 -- src/BlendFunc/BlendFunc_GenChamfInv.cxx | 2 -- src/BlendFunc/BlendFunc_GenChamfInv.hxx | 1 - src/BlendFunc/BlendFunc_GenChamfer.cxx | 2 -- src/BlendFunc/BlendFunc_GenChamfer.hxx | 1 - src/BlendFunc/BlendFunc_Ruled.cxx | 2 -- src/BlendFunc/BlendFunc_RuledInv.cxx | 2 -- src/BlendFunc/BlendFunc_Tensor.cxx | 7 ++----- src/BlendFunc/BlendFunc_Tensor.hxx | 2 -- src/Bnd/Bnd_B2f.hxx | 2 -- src/Bnd/Bnd_B3f.hxx | 5 ----- src/Bnd/Bnd_BoundSortBox.hxx | 1 - src/Bnd/Bnd_BoundSortBox2d.cxx | 1 - src/Bnd/Bnd_BoundSortBox2d.hxx | 2 -- src/Bnd/Bnd_Box.cxx | 2 -- src/Bnd/Bnd_Box.hxx | 1 - src/Bnd/Bnd_Box2d.cxx | 1 - src/Bnd/Bnd_HArray1OfBox2d.hxx | 1 - src/Bnd/Bnd_HArray1OfSphere.hxx | 1 - src/Bnd/Bnd_OBB.hxx | 2 -- src/Bnd/Bnd_Range.hxx | 1 - src/Bnd/Bnd_Sphere.hxx | 1 - src/BndLib/BndLib.cxx | 4 ---- src/BndLib/BndLib_Add2dCurve.cxx | 1 - src/BndLib/BndLib_Add2dCurve.hxx | 1 - src/BndLib/BndLib_Add3dCurve.cxx | 9 --------- src/BndLib/BndLib_Add3dCurve.hxx | 2 -- src/BndLib/BndLib_AddSurface.cxx | 6 ------ src/BndLib/BndLib_AddSurface.hxx | 2 -- 214 files changed, 2 insertions(+), 515 deletions(-) diff --git a/src/AppStd/AppStd_Application.hxx b/src/AppStd/AppStd_Application.hxx index b4e17d85eb..6bb372e2a2 100644 --- a/src/AppStd/AppStd_Application.hxx +++ b/src/AppStd/AppStd_Application.hxx @@ -17,11 +17,8 @@ #define _AppStd_Application_HeaderFile #include -#include #include -#include -#include class AppStd_Application; diff --git a/src/AppStdL/AppStdL_Application.hxx b/src/AppStdL/AppStdL_Application.hxx index d9b2e898f3..e84100b4e0 100644 --- a/src/AppStdL/AppStdL_Application.hxx +++ b/src/AppStdL/AppStdL_Application.hxx @@ -17,11 +17,8 @@ #define _AppStdL_Application_HeaderFile #include -#include #include -#include -#include class AppStdL_Application; DEFINE_STANDARD_HANDLE(AppStdL_Application, TDocStd_Application) diff --git a/src/ApproxInt/ApproxInt_KnotTools.cxx b/src/ApproxInt/ApproxInt_KnotTools.cxx index 5128529e42..2396d2a44f 100644 --- a/src/ApproxInt/ApproxInt_KnotTools.cxx +++ b/src/ApproxInt/ApproxInt_KnotTools.cxx @@ -14,14 +14,10 @@ #include #include #include -#include -#include #include #include #include -#include #include -#include #include #include #include diff --git a/src/ApproxInt/ApproxInt_KnotTools.hxx b/src/ApproxInt/ApproxInt_KnotTools.hxx index 84291b8ce8..06ede31915 100644 --- a/src/ApproxInt/ApproxInt_KnotTools.hxx +++ b/src/ApproxInt/ApproxInt_KnotTools.hxx @@ -14,9 +14,6 @@ #ifndef _ApproxInt_KnotTools_HeaderFile #define _ApproxInt_KnotTools_HeaderFile -#ifndef _Standard_HeaderFile -#include -#endif #ifndef _Standard_DefineAlloc_HeaderFile #include #endif diff --git a/src/ApproxInt/ApproxInt_SvSurfaces.cxx b/src/ApproxInt/ApproxInt_SvSurfaces.cxx index cb9b568031..a05b5411f4 100644 --- a/src/ApproxInt/ApproxInt_SvSurfaces.cxx +++ b/src/ApproxInt/ApproxInt_SvSurfaces.cxx @@ -14,9 +14,6 @@ #include -#include -#include -#include //======================================================================= //function : ~ApproxInt_SvSurfaces diff --git a/src/Aspect/Aspect_AspectFillAreaDefinitionError.hxx b/src/Aspect/Aspect_AspectFillAreaDefinitionError.hxx index cad74271d5..3e1b38bfb2 100644 --- a/src/Aspect/Aspect_AspectFillAreaDefinitionError.hxx +++ b/src/Aspect/Aspect_AspectFillAreaDefinitionError.hxx @@ -17,7 +17,6 @@ #define _Aspect_AspectFillAreaDefinitionError_HeaderFile #include -#include #include #include diff --git a/src/Aspect/Aspect_AspectLineDefinitionError.hxx b/src/Aspect/Aspect_AspectLineDefinitionError.hxx index abde5a8ae7..efe40d40ba 100644 --- a/src/Aspect/Aspect_AspectLineDefinitionError.hxx +++ b/src/Aspect/Aspect_AspectLineDefinitionError.hxx @@ -17,7 +17,6 @@ #define _Aspect_AspectLineDefinitionError_HeaderFile #include -#include #include #include diff --git a/src/Aspect/Aspect_AspectMarkerDefinitionError.hxx b/src/Aspect/Aspect_AspectMarkerDefinitionError.hxx index 1451779326..e6542ada60 100644 --- a/src/Aspect/Aspect_AspectMarkerDefinitionError.hxx +++ b/src/Aspect/Aspect_AspectMarkerDefinitionError.hxx @@ -17,7 +17,6 @@ #define _Aspect_AspectMarkerDefinitionError_HeaderFile #include -#include #include #include diff --git a/src/Aspect/Aspect_CircularGrid.hxx b/src/Aspect/Aspect_CircularGrid.hxx index 917163ed5c..f507b6a5cc 100644 --- a/src/Aspect/Aspect_CircularGrid.hxx +++ b/src/Aspect/Aspect_CircularGrid.hxx @@ -17,11 +17,7 @@ #ifndef _Aspect_CircularGrid_HeaderFile #define _Aspect_CircularGrid_HeaderFile -#include -#include - #include -#include #include diff --git a/src/Aspect/Aspect_ColorSpace.hxx b/src/Aspect/Aspect_ColorSpace.hxx index cbeb9431e4..d27c1ed412 100644 --- a/src/Aspect/Aspect_ColorSpace.hxx +++ b/src/Aspect/Aspect_ColorSpace.hxx @@ -14,8 +14,6 @@ #ifndef _Aspect_ColorSpace_HeaderFile #define _Aspect_ColorSpace_HeaderFile -#include - //! Texture color spaces accepted by XR composer. enum Aspect_ColorSpace { diff --git a/src/Aspect/Aspect_GenId.hxx b/src/Aspect/Aspect_GenId.hxx index 4b58fe758b..a9742638b1 100644 --- a/src/Aspect/Aspect_GenId.hxx +++ b/src/Aspect/Aspect_GenId.hxx @@ -21,7 +21,6 @@ #include #include -#include #include #include diff --git a/src/Aspect/Aspect_Grid.hxx b/src/Aspect/Aspect_Grid.hxx index a7034b9edd..cce1715371 100644 --- a/src/Aspect/Aspect_Grid.hxx +++ b/src/Aspect/Aspect_Grid.hxx @@ -18,10 +18,8 @@ #define _Aspect_Grid_HeaderFile #include -#include #include -#include #include #include diff --git a/src/Aspect/Aspect_RectangularGrid.hxx b/src/Aspect/Aspect_RectangularGrid.hxx index 4cdcc08485..870b1368a2 100644 --- a/src/Aspect/Aspect_RectangularGrid.hxx +++ b/src/Aspect/Aspect_RectangularGrid.hxx @@ -18,11 +18,8 @@ #define _Aspect_RectangularGrid_HeaderFile #include -#include -#include #include -#include class Aspect_RectangularGrid : public Aspect_Grid { diff --git a/src/Aspect/Aspect_ScrollDelta.hxx b/src/Aspect/Aspect_ScrollDelta.hxx index b764522ac0..cce447223c 100644 --- a/src/Aspect/Aspect_ScrollDelta.hxx +++ b/src/Aspect/Aspect_ScrollDelta.hxx @@ -16,7 +16,6 @@ #include #include -#include //! Parameters for mouse scroll action. struct Aspect_ScrollDelta diff --git a/src/Aspect/Aspect_Touch.hxx b/src/Aspect/Aspect_Touch.hxx index 6ccf11d9f2..d2d6e9f276 100644 --- a/src/Aspect/Aspect_Touch.hxx +++ b/src/Aspect/Aspect_Touch.hxx @@ -15,8 +15,6 @@ #define _Aspect_Touch_HeaderFile #include -#include -#include //! Structure holding touch position - original and current location. class Aspect_Touch diff --git a/src/Aspect/Aspect_Window.cxx b/src/Aspect/Aspect_Window.cxx index d41d1250b7..641097e113 100644 --- a/src/Aspect/Aspect_Window.cxx +++ b/src/Aspect/Aspect_Window.cxx @@ -24,10 +24,8 @@ // for the class #include -#include #include #include -#include #include #include diff --git a/src/Aspect/Aspect_WindowInputListener.hxx b/src/Aspect/Aspect_WindowInputListener.hxx index 4ca36566d7..d4b5e1128a 100644 --- a/src/Aspect/Aspect_WindowInputListener.hxx +++ b/src/Aspect/Aspect_WindowInputListener.hxx @@ -17,8 +17,6 @@ #include #include #include -#include -#include struct Aspect_ScrollDelta; class WNT_HIDSpaceMouse; diff --git a/src/BiTgte/BiTgte_Blend.cxx b/src/BiTgte/BiTgte_Blend.cxx index 5304099da2..5f3133fc8f 100644 --- a/src/BiTgte/BiTgte_Blend.cxx +++ b/src/BiTgte/BiTgte_Blend.cxx @@ -16,7 +16,6 @@ #include -#include #include #include #include @@ -29,7 +28,6 @@ #include #include #include -#include #include #include #include @@ -40,12 +38,10 @@ #include #include #include -#include #include #include #include #include -#include #include #include #include @@ -53,7 +49,6 @@ #include #include #include -#include #include #include #include @@ -70,7 +65,6 @@ #include #include #include -#include #include #include #include @@ -85,10 +79,7 @@ #include #include #include -#include #include -#include -#include #ifdef OCCT_DEBUG #include @@ -2295,7 +2286,6 @@ void BiTgte_Blend::ComputeSurfaces() //purpose : //======================================================================= #include -#include void BiTgte_Blend::ComputeShape() { diff --git a/src/BiTgte/BiTgte_Blend.hxx b/src/BiTgte/BiTgte_Blend.hxx index 39a07e83b7..20ce4d49d5 100644 --- a/src/BiTgte/BiTgte_Blend.hxx +++ b/src/BiTgte/BiTgte_Blend.hxx @@ -21,14 +21,9 @@ #include #include -#include -#include -#include -#include #include #include #include -#include #include #include #include diff --git a/src/BiTgte/BiTgte_CurveOnEdge.cxx b/src/BiTgte/BiTgte_CurveOnEdge.cxx index a94b3a6091..0898be8003 100644 --- a/src/BiTgte/BiTgte_CurveOnEdge.cxx +++ b/src/BiTgte/BiTgte_CurveOnEdge.cxx @@ -22,7 +22,6 @@ #include #include #include -#include #include #include #include @@ -32,10 +31,8 @@ #include #include #include -#include #include #include -#include #include IMPLEMENT_STANDARD_RTTIEXT(BiTgte_CurveOnEdge, Adaptor3d_Curve) diff --git a/src/BiTgte/BiTgte_CurveOnEdge.hxx b/src/BiTgte/BiTgte_CurveOnEdge.hxx index 125f7e1b0b..0d3e392f10 100644 --- a/src/BiTgte/BiTgte_CurveOnEdge.hxx +++ b/src/BiTgte/BiTgte_CurveOnEdge.hxx @@ -22,8 +22,6 @@ #include #include -#include -#include #include #include #include diff --git a/src/BiTgte/BiTgte_CurveOnVertex.cxx b/src/BiTgte/BiTgte_CurveOnVertex.cxx index 0678454615..8715f13e94 100644 --- a/src/BiTgte/BiTgte_CurveOnVertex.cxx +++ b/src/BiTgte/BiTgte_CurveOnVertex.cxx @@ -27,10 +27,8 @@ #include #include #include -#include #include #include -#include #include #include diff --git a/src/BiTgte/BiTgte_CurveOnVertex.hxx b/src/BiTgte/BiTgte_CurveOnVertex.hxx index 399287fb1f..b8548aed49 100644 --- a/src/BiTgte/BiTgte_CurveOnVertex.hxx +++ b/src/BiTgte/BiTgte_CurveOnVertex.hxx @@ -19,10 +19,8 @@ #include #include -#include #include -#include #include #include #include diff --git a/src/BinDrivers/BinDrivers.cxx b/src/BinDrivers/BinDrivers.cxx index 1ea43b93f0..781f57e8d5 100644 --- a/src/BinDrivers/BinDrivers.cxx +++ b/src/BinDrivers/BinDrivers.cxx @@ -25,12 +25,10 @@ #include #include #include -#include #include #include #include #include -#include #include static Standard_GUID BinStorageDriver ("03a56835-8269-11d5-aab2-0050044b1af1"); diff --git a/src/BinDrivers/BinDrivers_DocumentRetrievalDriver.cxx b/src/BinDrivers/BinDrivers_DocumentRetrievalDriver.cxx index 8ddd4f3ba1..7bb34ee087 100644 --- a/src/BinDrivers/BinDrivers_DocumentRetrievalDriver.cxx +++ b/src/BinDrivers/BinDrivers_DocumentRetrievalDriver.cxx @@ -19,7 +19,6 @@ #include #include #include -#include #include #include #include diff --git a/src/BinDrivers/BinDrivers_DocumentRetrievalDriver.hxx b/src/BinDrivers/BinDrivers_DocumentRetrievalDriver.hxx index 163a092323..a62c8eb155 100644 --- a/src/BinDrivers/BinDrivers_DocumentRetrievalDriver.hxx +++ b/src/BinDrivers/BinDrivers_DocumentRetrievalDriver.hxx @@ -17,11 +17,9 @@ #define _BinDrivers_DocumentRetrievalDriver_HeaderFile #include -#include #include #include -#include #include #include class BinMDF_ADriverTable; diff --git a/src/BinDrivers/BinDrivers_DocumentStorageDriver.cxx b/src/BinDrivers/BinDrivers_DocumentStorageDriver.cxx index 410b70eabe..017899da2f 100644 --- a/src/BinDrivers/BinDrivers_DocumentStorageDriver.cxx +++ b/src/BinDrivers/BinDrivers_DocumentStorageDriver.cxx @@ -17,14 +17,12 @@ #include #include -#include #include #include #include #include #include #include -#include #include IMPLEMENT_STANDARD_RTTIEXT(BinDrivers_DocumentStorageDriver,BinLDrivers_DocumentStorageDriver) diff --git a/src/BinDrivers/BinDrivers_DocumentStorageDriver.hxx b/src/BinDrivers/BinDrivers_DocumentStorageDriver.hxx index 457ba74b63..53a68d9f97 100644 --- a/src/BinDrivers/BinDrivers_DocumentStorageDriver.hxx +++ b/src/BinDrivers/BinDrivers_DocumentStorageDriver.hxx @@ -17,7 +17,6 @@ #define _BinDrivers_DocumentStorageDriver_HeaderFile #include -#include #include #include diff --git a/src/BinLDrivers/BinLDrivers.cxx b/src/BinLDrivers/BinLDrivers.cxx index 63c5b5dfac..20befe1fa2 100644 --- a/src/BinLDrivers/BinLDrivers.cxx +++ b/src/BinLDrivers/BinLDrivers.cxx @@ -22,12 +22,10 @@ #include #include #include -#include #include #include #include #include -#include #include //#include diff --git a/src/BinLDrivers/BinLDrivers_DocumentRetrievalDriver.cxx b/src/BinLDrivers/BinLDrivers_DocumentRetrievalDriver.cxx index 0c75fcfefa..c6b7d50a49 100644 --- a/src/BinLDrivers/BinLDrivers_DocumentRetrievalDriver.cxx +++ b/src/BinLDrivers/BinLDrivers_DocumentRetrievalDriver.cxx @@ -19,18 +19,14 @@ #include #include #include -#include #include #include #include -#include #include #include #include #include -#include #include -#include #include #include #include @@ -40,7 +36,6 @@ #include #include #include -#include #include #include #include diff --git a/src/BinLDrivers/BinLDrivers_DocumentRetrievalDriver.hxx b/src/BinLDrivers/BinLDrivers_DocumentRetrievalDriver.hxx index 92ffda6a28..03eaaaa720 100644 --- a/src/BinLDrivers/BinLDrivers_DocumentRetrievalDriver.hxx +++ b/src/BinLDrivers/BinLDrivers_DocumentRetrievalDriver.hxx @@ -17,7 +17,6 @@ #define _BinLDrivers_DocumentRetrievalDriver_HeaderFile #include -#include #include #include @@ -27,7 +26,6 @@ #include #include #include -#include #include class BinMDF_ADriverTable; diff --git a/src/BinLDrivers/BinLDrivers_DocumentSection.cxx b/src/BinLDrivers/BinLDrivers_DocumentSection.cxx index 3ef3d12523..97c5b4b8e7 100644 --- a/src/BinLDrivers/BinLDrivers_DocumentSection.cxx +++ b/src/BinLDrivers/BinLDrivers_DocumentSection.cxx @@ -15,7 +15,6 @@ #include #include -#include #include //======================================================================= diff --git a/src/BinLDrivers/BinLDrivers_DocumentSection.hxx b/src/BinLDrivers/BinLDrivers_DocumentSection.hxx index cbb435819b..c56f534a73 100644 --- a/src/BinLDrivers/BinLDrivers_DocumentSection.hxx +++ b/src/BinLDrivers/BinLDrivers_DocumentSection.hxx @@ -20,8 +20,6 @@ #include #include -#include -#include #include #include #include diff --git a/src/BinLDrivers/BinLDrivers_DocumentStorageDriver.cxx b/src/BinLDrivers/BinLDrivers_DocumentStorageDriver.cxx index 0a5ec15f77..0cd67f6a2a 100644 --- a/src/BinLDrivers/BinLDrivers_DocumentStorageDriver.cxx +++ b/src/BinLDrivers/BinLDrivers_DocumentStorageDriver.cxx @@ -15,28 +15,21 @@ #include -#include #include #include -#include #include #include #include #include -#include #include #include #include #include #include -#include #include #include #include #include -#include -#include -#include #include #include #include diff --git a/src/BinLDrivers/BinLDrivers_DocumentStorageDriver.hxx b/src/BinLDrivers/BinLDrivers_DocumentStorageDriver.hxx index 61109b1c3a..dee195b71c 100644 --- a/src/BinLDrivers/BinLDrivers_DocumentStorageDriver.hxx +++ b/src/BinLDrivers/BinLDrivers_DocumentStorageDriver.hxx @@ -17,7 +17,6 @@ #define _BinLDrivers_DocumentStorageDriver_HeaderFile #include -#include #include #include @@ -27,7 +26,6 @@ #include #include #include -#include #include #include class BinMDF_ADriverTable; diff --git a/src/BinMDF/BinMDF.cxx b/src/BinMDF/BinMDF.cxx index 4ec3aa37a4..37fefbe948 100644 --- a/src/BinMDF/BinMDF.cxx +++ b/src/BinMDF/BinMDF.cxx @@ -13,7 +13,6 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. - #include #include #include diff --git a/src/BinMDF/BinMDF_ADriver.hxx b/src/BinMDF/BinMDF_ADriver.hxx index 608d2e81ea..1c82148640 100644 --- a/src/BinMDF/BinMDF_ADriver.hxx +++ b/src/BinMDF/BinMDF_ADriver.hxx @@ -17,13 +17,8 @@ #define _BinMDF_ADriver_HeaderFile #include -#include -#include #include -#include -#include -#include #include #include class Message_Messenger; diff --git a/src/BinMDF/BinMDF_ADriverTable.hxx b/src/BinMDF/BinMDF_ADriverTable.hxx index fc6d2fd77a..306bc37bdc 100644 --- a/src/BinMDF/BinMDF_ADriverTable.hxx +++ b/src/BinMDF/BinMDF_ADriverTable.hxx @@ -22,7 +22,6 @@ #include #include #include -#include #include #include #include diff --git a/src/BinMDF/BinMDF_ReferenceDriver.hxx b/src/BinMDF/BinMDF_ReferenceDriver.hxx index 959bc321aa..8da4895f91 100644 --- a/src/BinMDF/BinMDF_ReferenceDriver.hxx +++ b/src/BinMDF/BinMDF_ReferenceDriver.hxx @@ -17,10 +17,8 @@ #define _BinMDF_ReferenceDriver_HeaderFile #include -#include #include -#include #include #include class Message_Messenger; diff --git a/src/BinMDF/BinMDF_TagSourceDriver.hxx b/src/BinMDF/BinMDF_TagSourceDriver.hxx index 83d217010b..4c073c2519 100644 --- a/src/BinMDF/BinMDF_TagSourceDriver.hxx +++ b/src/BinMDF/BinMDF_TagSourceDriver.hxx @@ -17,10 +17,8 @@ #define _BinMDF_TagSourceDriver_HeaderFile #include -#include #include -#include #include #include class Message_Messenger; diff --git a/src/BinMDataStd/BinMDataStd.hxx b/src/BinMDataStd/BinMDataStd.hxx index 765eb2f912..d2ca4dbabf 100644 --- a/src/BinMDataStd/BinMDataStd.hxx +++ b/src/BinMDataStd/BinMDataStd.hxx @@ -20,7 +20,6 @@ #include #include -#include #include #include diff --git a/src/BinMDataStd/BinMDataStd_AsciiStringDriver.cxx b/src/BinMDataStd/BinMDataStd_AsciiStringDriver.cxx index 3a6fc34675..93cf7f2ba2 100644 --- a/src/BinMDataStd/BinMDataStd_AsciiStringDriver.cxx +++ b/src/BinMDataStd/BinMDataStd_AsciiStringDriver.cxx @@ -16,14 +16,12 @@ #include #include -#include #include #include #include #include #include #include -#include #include IMPLEMENT_STANDARD_RTTIEXT(BinMDataStd_AsciiStringDriver,BinMDF_ADriver) diff --git a/src/BinMDataStd/BinMDataStd_AsciiStringDriver.hxx b/src/BinMDataStd/BinMDataStd_AsciiStringDriver.hxx index 35c5b041d3..17350a5d45 100644 --- a/src/BinMDataStd/BinMDataStd_AsciiStringDriver.hxx +++ b/src/BinMDataStd/BinMDataStd_AsciiStringDriver.hxx @@ -17,10 +17,8 @@ #define _BinMDataStd_AsciiStringDriver_HeaderFile #include -#include #include -#include #include #include class Message_Messenger; diff --git a/src/BinMDataStd/BinMDataStd_BooleanArrayDriver.cxx b/src/BinMDataStd/BinMDataStd_BooleanArrayDriver.cxx index aa856f6b4b..00d12e7077 100644 --- a/src/BinMDataStd/BinMDataStd_BooleanArrayDriver.cxx +++ b/src/BinMDataStd/BinMDataStd_BooleanArrayDriver.cxx @@ -19,8 +19,6 @@ #include #include #include -#include -#include #include #include diff --git a/src/BinMDataStd/BinMDataStd_BooleanArrayDriver.hxx b/src/BinMDataStd/BinMDataStd_BooleanArrayDriver.hxx index 59896282ce..5376a168da 100644 --- a/src/BinMDataStd/BinMDataStd_BooleanArrayDriver.hxx +++ b/src/BinMDataStd/BinMDataStd_BooleanArrayDriver.hxx @@ -17,10 +17,8 @@ #define _BinMDataStd_BooleanArrayDriver_HeaderFile #include -#include #include -#include #include #include class Message_Messenger; diff --git a/src/BinMDataStd/BinMDataStd_BooleanListDriver.hxx b/src/BinMDataStd/BinMDataStd_BooleanListDriver.hxx index 26883050fb..29f42ce173 100644 --- a/src/BinMDataStd/BinMDataStd_BooleanListDriver.hxx +++ b/src/BinMDataStd/BinMDataStd_BooleanListDriver.hxx @@ -17,10 +17,8 @@ #define _BinMDataStd_BooleanListDriver_HeaderFile #include -#include #include -#include #include #include class Message_Messenger; diff --git a/src/BinMDataStd/BinMDataStd_ByteArrayDriver.cxx b/src/BinMDataStd/BinMDataStd_ByteArrayDriver.cxx index 936ee8407d..058bc2bf2a 100644 --- a/src/BinMDataStd/BinMDataStd_ByteArrayDriver.cxx +++ b/src/BinMDataStd/BinMDataStd_ByteArrayDriver.cxx @@ -19,8 +19,6 @@ #include #include #include -#include -#include #include #include #include diff --git a/src/BinMDataStd/BinMDataStd_ByteArrayDriver.hxx b/src/BinMDataStd/BinMDataStd_ByteArrayDriver.hxx index b3f324e7d6..01d5baecc8 100644 --- a/src/BinMDataStd/BinMDataStd_ByteArrayDriver.hxx +++ b/src/BinMDataStd/BinMDataStd_ByteArrayDriver.hxx @@ -20,7 +20,6 @@ #include #include -#include #include #include class Message_Messenger; diff --git a/src/BinMDataStd/BinMDataStd_ExpressionDriver.hxx b/src/BinMDataStd/BinMDataStd_ExpressionDriver.hxx index bae055c967..dbbaa978cd 100644 --- a/src/BinMDataStd/BinMDataStd_ExpressionDriver.hxx +++ b/src/BinMDataStd/BinMDataStd_ExpressionDriver.hxx @@ -17,10 +17,8 @@ #define _BinMDataStd_ExpressionDriver_HeaderFile #include -#include #include -#include #include #include class Message_Messenger; diff --git a/src/BinMDataStd/BinMDataStd_ExtStringArrayDriver.cxx b/src/BinMDataStd/BinMDataStd_ExtStringArrayDriver.cxx index 4470dcc662..43c0812271 100644 --- a/src/BinMDataStd/BinMDataStd_ExtStringArrayDriver.cxx +++ b/src/BinMDataStd/BinMDataStd_ExtStringArrayDriver.cxx @@ -19,8 +19,6 @@ #include #include #include -#include -#include #include #include #include diff --git a/src/BinMDataStd/BinMDataStd_ExtStringArrayDriver.hxx b/src/BinMDataStd/BinMDataStd_ExtStringArrayDriver.hxx index d75d45b93d..2a4dab3823 100644 --- a/src/BinMDataStd/BinMDataStd_ExtStringArrayDriver.hxx +++ b/src/BinMDataStd/BinMDataStd_ExtStringArrayDriver.hxx @@ -20,7 +20,6 @@ #include #include -#include #include #include class Message_Messenger; diff --git a/src/BinMDataStd/BinMDataStd_ExtStringListDriver.hxx b/src/BinMDataStd/BinMDataStd_ExtStringListDriver.hxx index 4dc4d76001..ef0bf3e4c0 100644 --- a/src/BinMDataStd/BinMDataStd_ExtStringListDriver.hxx +++ b/src/BinMDataStd/BinMDataStd_ExtStringListDriver.hxx @@ -17,10 +17,8 @@ #define _BinMDataStd_ExtStringListDriver_HeaderFile #include -#include #include -#include #include #include class Message_Messenger; diff --git a/src/BinMDataStd/BinMDataStd_GenericEmptyDriver.hxx b/src/BinMDataStd/BinMDataStd_GenericEmptyDriver.hxx index 6b1fc275da..ed45310a20 100644 --- a/src/BinMDataStd/BinMDataStd_GenericEmptyDriver.hxx +++ b/src/BinMDataStd/BinMDataStd_GenericEmptyDriver.hxx @@ -15,10 +15,8 @@ #define _BinMDataStd_GenericEmptyDriver_HeaderFile #include -#include #include -#include #include #include class Message_Messenger; diff --git a/src/BinMDataStd/BinMDataStd_GenericExtStringDriver.cxx b/src/BinMDataStd/BinMDataStd_GenericExtStringDriver.cxx index 9fcaa6c03d..c6f3ad78f1 100644 --- a/src/BinMDataStd/BinMDataStd_GenericExtStringDriver.cxx +++ b/src/BinMDataStd/BinMDataStd_GenericExtStringDriver.cxx @@ -13,12 +13,10 @@ #include -#include #include #include #include #include -#include #include IMPLEMENT_STANDARD_RTTIEXT(BinMDataStd_GenericExtStringDriver,BinMDF_ADriver) diff --git a/src/BinMDataStd/BinMDataStd_GenericExtStringDriver.hxx b/src/BinMDataStd/BinMDataStd_GenericExtStringDriver.hxx index 9a0694a55f..a5efea089a 100644 --- a/src/BinMDataStd/BinMDataStd_GenericExtStringDriver.hxx +++ b/src/BinMDataStd/BinMDataStd_GenericExtStringDriver.hxx @@ -15,10 +15,8 @@ #define _BinMDataStd_GenericExtStringDriver_HeaderFile #include -#include #include -#include #include #include class Message_Messenger; diff --git a/src/BinMDataStd/BinMDataStd_IntPackedMapDriver.cxx b/src/BinMDataStd/BinMDataStd_IntPackedMapDriver.cxx index 3bade5243e..e65923e342 100644 --- a/src/BinMDataStd/BinMDataStd_IntPackedMapDriver.cxx +++ b/src/BinMDataStd/BinMDataStd_IntPackedMapDriver.cxx @@ -22,8 +22,6 @@ #include #include #include -#include -#include #include #include #include diff --git a/src/BinMDataStd/BinMDataStd_IntPackedMapDriver.hxx b/src/BinMDataStd/BinMDataStd_IntPackedMapDriver.hxx index de07d74255..905bd8be24 100644 --- a/src/BinMDataStd/BinMDataStd_IntPackedMapDriver.hxx +++ b/src/BinMDataStd/BinMDataStd_IntPackedMapDriver.hxx @@ -20,7 +20,6 @@ #include #include -#include #include #include class Message_Messenger; diff --git a/src/BinMDataStd/BinMDataStd_IntegerArrayDriver.cxx b/src/BinMDataStd/BinMDataStd_IntegerArrayDriver.cxx index a25cb4e215..df14805034 100644 --- a/src/BinMDataStd/BinMDataStd_IntegerArrayDriver.cxx +++ b/src/BinMDataStd/BinMDataStd_IntegerArrayDriver.cxx @@ -19,7 +19,6 @@ #include #include #include -#include #include #include #include diff --git a/src/BinMDataStd/BinMDataStd_IntegerArrayDriver.hxx b/src/BinMDataStd/BinMDataStd_IntegerArrayDriver.hxx index 64307414b9..42956ab894 100644 --- a/src/BinMDataStd/BinMDataStd_IntegerArrayDriver.hxx +++ b/src/BinMDataStd/BinMDataStd_IntegerArrayDriver.hxx @@ -20,7 +20,6 @@ #include #include -#include #include #include class Message_Messenger; diff --git a/src/BinMDataStd/BinMDataStd_IntegerDriver.cxx b/src/BinMDataStd/BinMDataStd_IntegerDriver.cxx index 89b6025be0..fe39951d9d 100644 --- a/src/BinMDataStd/BinMDataStd_IntegerDriver.cxx +++ b/src/BinMDataStd/BinMDataStd_IntegerDriver.cxx @@ -15,12 +15,10 @@ #include -#include #include #include #include #include -#include #include IMPLEMENT_STANDARD_RTTIEXT(BinMDataStd_IntegerDriver,BinMDF_ADriver) diff --git a/src/BinMDataStd/BinMDataStd_IntegerDriver.hxx b/src/BinMDataStd/BinMDataStd_IntegerDriver.hxx index 0c8d672bf4..a15e011ce3 100644 --- a/src/BinMDataStd/BinMDataStd_IntegerDriver.hxx +++ b/src/BinMDataStd/BinMDataStd_IntegerDriver.hxx @@ -17,10 +17,8 @@ #define _BinMDataStd_IntegerDriver_HeaderFile #include -#include #include -#include #include #include class Message_Messenger; diff --git a/src/BinMDataStd/BinMDataStd_IntegerListDriver.cxx b/src/BinMDataStd/BinMDataStd_IntegerListDriver.cxx index 9d3954a953..00788cda88 100644 --- a/src/BinMDataStd/BinMDataStd_IntegerListDriver.cxx +++ b/src/BinMDataStd/BinMDataStd_IntegerListDriver.cxx @@ -20,7 +20,6 @@ #include #include #include -#include #include #include diff --git a/src/BinMDataStd/BinMDataStd_IntegerListDriver.hxx b/src/BinMDataStd/BinMDataStd_IntegerListDriver.hxx index 09614dbeb2..653be28852 100644 --- a/src/BinMDataStd/BinMDataStd_IntegerListDriver.hxx +++ b/src/BinMDataStd/BinMDataStd_IntegerListDriver.hxx @@ -17,10 +17,8 @@ #define _BinMDataStd_IntegerListDriver_HeaderFile #include -#include #include -#include #include #include class Message_Messenger; diff --git a/src/BinMDataStd/BinMDataStd_NamedDataDriver.cxx b/src/BinMDataStd/BinMDataStd_NamedDataDriver.cxx index 294f785843..2cb5c14d42 100644 --- a/src/BinMDataStd/BinMDataStd_NamedDataDriver.cxx +++ b/src/BinMDataStd/BinMDataStd_NamedDataDriver.cxx @@ -19,20 +19,6 @@ #include #include #include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include #include #include diff --git a/src/BinMDataStd/BinMDataStd_NamedDataDriver.hxx b/src/BinMDataStd/BinMDataStd_NamedDataDriver.hxx index 835548de22..27f843ebe6 100644 --- a/src/BinMDataStd/BinMDataStd_NamedDataDriver.hxx +++ b/src/BinMDataStd/BinMDataStd_NamedDataDriver.hxx @@ -17,10 +17,8 @@ #define _BinMDataStd_NamedDataDriver_HeaderFile #include -#include #include -#include #include #include class Message_Messenger; diff --git a/src/BinMDataStd/BinMDataStd_RealArrayDriver.cxx b/src/BinMDataStd/BinMDataStd_RealArrayDriver.cxx index 69447573c5..d2af030f41 100644 --- a/src/BinMDataStd/BinMDataStd_RealArrayDriver.cxx +++ b/src/BinMDataStd/BinMDataStd_RealArrayDriver.cxx @@ -19,7 +19,6 @@ #include #include #include -#include #include #include diff --git a/src/BinMDataStd/BinMDataStd_RealArrayDriver.hxx b/src/BinMDataStd/BinMDataStd_RealArrayDriver.hxx index 91693010c6..c7748c41ce 100644 --- a/src/BinMDataStd/BinMDataStd_RealArrayDriver.hxx +++ b/src/BinMDataStd/BinMDataStd_RealArrayDriver.hxx @@ -20,7 +20,6 @@ #include #include -#include #include #include class Message_Messenger; diff --git a/src/BinMDataStd/BinMDataStd_RealDriver.cxx b/src/BinMDataStd/BinMDataStd_RealDriver.cxx index 10fe079d85..480f7dc482 100644 --- a/src/BinMDataStd/BinMDataStd_RealDriver.cxx +++ b/src/BinMDataStd/BinMDataStd_RealDriver.cxx @@ -15,12 +15,10 @@ #include -#include #include #include #include #include -#include #include IMPLEMENT_STANDARD_RTTIEXT(BinMDataStd_RealDriver,BinMDF_ADriver) diff --git a/src/BinMDataStd/BinMDataStd_RealDriver.hxx b/src/BinMDataStd/BinMDataStd_RealDriver.hxx index 33e05c46ed..7f894d125a 100644 --- a/src/BinMDataStd/BinMDataStd_RealDriver.hxx +++ b/src/BinMDataStd/BinMDataStd_RealDriver.hxx @@ -17,10 +17,8 @@ #define _BinMDataStd_RealDriver_HeaderFile #include -#include #include -#include #include #include class Message_Messenger; diff --git a/src/BinMDataStd/BinMDataStd_RealListDriver.cxx b/src/BinMDataStd/BinMDataStd_RealListDriver.cxx index 51eace351f..e09f4dcf94 100644 --- a/src/BinMDataStd/BinMDataStd_RealListDriver.cxx +++ b/src/BinMDataStd/BinMDataStd_RealListDriver.cxx @@ -20,7 +20,6 @@ #include #include #include -#include #include #include diff --git a/src/BinMDataStd/BinMDataStd_RealListDriver.hxx b/src/BinMDataStd/BinMDataStd_RealListDriver.hxx index ac9e47a653..7420383f1e 100644 --- a/src/BinMDataStd/BinMDataStd_RealListDriver.hxx +++ b/src/BinMDataStd/BinMDataStd_RealListDriver.hxx @@ -17,10 +17,8 @@ #define _BinMDataStd_RealListDriver_HeaderFile #include -#include #include -#include #include #include class Message_Messenger; diff --git a/src/BinMDataStd/BinMDataStd_ReferenceArrayDriver.hxx b/src/BinMDataStd/BinMDataStd_ReferenceArrayDriver.hxx index 004511149b..bc80c40b8f 100644 --- a/src/BinMDataStd/BinMDataStd_ReferenceArrayDriver.hxx +++ b/src/BinMDataStd/BinMDataStd_ReferenceArrayDriver.hxx @@ -17,10 +17,8 @@ #define _BinMDataStd_ReferenceArrayDriver_HeaderFile #include -#include #include -#include #include #include class Message_Messenger; diff --git a/src/BinMDataStd/BinMDataStd_ReferenceListDriver.hxx b/src/BinMDataStd/BinMDataStd_ReferenceListDriver.hxx index 2436cb7348..00869b4a1d 100644 --- a/src/BinMDataStd/BinMDataStd_ReferenceListDriver.hxx +++ b/src/BinMDataStd/BinMDataStd_ReferenceListDriver.hxx @@ -17,10 +17,8 @@ #define _BinMDataStd_ReferenceListDriver_HeaderFile #include -#include #include -#include #include #include class Message_Messenger; diff --git a/src/BinMDataStd/BinMDataStd_TreeNodeDriver.cxx b/src/BinMDataStd/BinMDataStd_TreeNodeDriver.cxx index 48ab0a253e..a4e3388017 100644 --- a/src/BinMDataStd/BinMDataStd_TreeNodeDriver.cxx +++ b/src/BinMDataStd/BinMDataStd_TreeNodeDriver.cxx @@ -18,7 +18,6 @@ #include #include #include -#include #include #include diff --git a/src/BinMDataStd/BinMDataStd_TreeNodeDriver.hxx b/src/BinMDataStd/BinMDataStd_TreeNodeDriver.hxx index b272da2c64..11e1db4886 100644 --- a/src/BinMDataStd/BinMDataStd_TreeNodeDriver.hxx +++ b/src/BinMDataStd/BinMDataStd_TreeNodeDriver.hxx @@ -17,10 +17,8 @@ #define _BinMDataStd_TreeNodeDriver_HeaderFile #include -#include #include -#include #include #include class Message_Messenger; diff --git a/src/BinMDataStd/BinMDataStd_UAttributeDriver.hxx b/src/BinMDataStd/BinMDataStd_UAttributeDriver.hxx index 47742f48df..f6c347ac8d 100644 --- a/src/BinMDataStd/BinMDataStd_UAttributeDriver.hxx +++ b/src/BinMDataStd/BinMDataStd_UAttributeDriver.hxx @@ -17,10 +17,8 @@ #define _BinMDataStd_UAttributeDriver_HeaderFile #include -#include #include -#include #include #include class Message_Messenger; diff --git a/src/BinMDataStd/BinMDataStd_VariableDriver.hxx b/src/BinMDataStd/BinMDataStd_VariableDriver.hxx index 57b07d8782..1343d27868 100644 --- a/src/BinMDataStd/BinMDataStd_VariableDriver.hxx +++ b/src/BinMDataStd/BinMDataStd_VariableDriver.hxx @@ -17,10 +17,8 @@ #define _BinMDataStd_VariableDriver_HeaderFile #include -#include #include -#include #include #include class Message_Messenger; diff --git a/src/BinMDataXtd/BinMDataXtd.hxx b/src/BinMDataXtd/BinMDataXtd.hxx index afbe249205..de4611ae51 100644 --- a/src/BinMDataXtd/BinMDataXtd.hxx +++ b/src/BinMDataXtd/BinMDataXtd.hxx @@ -19,7 +19,6 @@ #include #include #include - #include class BinMDF_ADriverTable; class Message_Messenger; diff --git a/src/BinMDataXtd/BinMDataXtd_ConstraintDriver.hxx b/src/BinMDataXtd/BinMDataXtd_ConstraintDriver.hxx index 7a66e74a6d..c00cf35d6e 100644 --- a/src/BinMDataXtd/BinMDataXtd_ConstraintDriver.hxx +++ b/src/BinMDataXtd/BinMDataXtd_ConstraintDriver.hxx @@ -17,10 +17,8 @@ #define _BinMDataXtd_ConstraintDriver_HeaderFile #include -#include #include -#include #include #include class Message_Messenger; diff --git a/src/BinMDataXtd/BinMDataXtd_GeometryDriver.hxx b/src/BinMDataXtd/BinMDataXtd_GeometryDriver.hxx index 0cf882c087..5142bf3b43 100644 --- a/src/BinMDataXtd/BinMDataXtd_GeometryDriver.hxx +++ b/src/BinMDataXtd/BinMDataXtd_GeometryDriver.hxx @@ -17,10 +17,8 @@ #define _BinMDataXtd_GeometryDriver_HeaderFile #include -#include #include -#include #include #include class Message_Messenger; diff --git a/src/BinMDataXtd/BinMDataXtd_PatternStdDriver.hxx b/src/BinMDataXtd/BinMDataXtd_PatternStdDriver.hxx index 51c3f45b32..629031d0de 100644 --- a/src/BinMDataXtd/BinMDataXtd_PatternStdDriver.hxx +++ b/src/BinMDataXtd/BinMDataXtd_PatternStdDriver.hxx @@ -17,10 +17,8 @@ #define _BinMDataXtd_PatternStdDriver_HeaderFile #include -#include #include -#include #include #include class Message_Messenger; diff --git a/src/BinMDataXtd/BinMDataXtd_PositionDriver.cxx b/src/BinMDataXtd/BinMDataXtd_PositionDriver.cxx index e857140a89..cf73dee135 100644 --- a/src/BinMDataXtd/BinMDataXtd_PositionDriver.cxx +++ b/src/BinMDataXtd/BinMDataXtd_PositionDriver.cxx @@ -17,7 +17,6 @@ #include -#include #include #include #include diff --git a/src/BinMDataXtd/BinMDataXtd_PositionDriver.hxx b/src/BinMDataXtd/BinMDataXtd_PositionDriver.hxx index 2ceecc5f35..0dba5a9b4c 100644 --- a/src/BinMDataXtd/BinMDataXtd_PositionDriver.hxx +++ b/src/BinMDataXtd/BinMDataXtd_PositionDriver.hxx @@ -17,10 +17,8 @@ #define _BinMDataXtd_PositionDriver_HeaderFile #include -#include #include -#include #include #include class Message_Messenger; diff --git a/src/BinMDataXtd/BinMDataXtd_PresentationDriver.hxx b/src/BinMDataXtd/BinMDataXtd_PresentationDriver.hxx index e7f242e6f5..d07d198502 100644 --- a/src/BinMDataXtd/BinMDataXtd_PresentationDriver.hxx +++ b/src/BinMDataXtd/BinMDataXtd_PresentationDriver.hxx @@ -17,10 +17,8 @@ #define _BinMDataXtd_PresentationDriver_HeaderFile #include -#include #include -#include #include #include class Message_Messenger; diff --git a/src/BinMDataXtd/BinMDataXtd_TriangulationDriver.hxx b/src/BinMDataXtd/BinMDataXtd_TriangulationDriver.hxx index 0b34976431..c271327d19 100644 --- a/src/BinMDataXtd/BinMDataXtd_TriangulationDriver.hxx +++ b/src/BinMDataXtd/BinMDataXtd_TriangulationDriver.hxx @@ -17,10 +17,8 @@ #define _BinMDataXtd_TriangulationDriver_HeaderFile #include -#include #include -#include #include #include class Message_Messenger; diff --git a/src/BinMDocStd/BinMDocStd_XLinkDriver.hxx b/src/BinMDocStd/BinMDocStd_XLinkDriver.hxx index 03134ed61a..64dd5bd639 100644 --- a/src/BinMDocStd/BinMDocStd_XLinkDriver.hxx +++ b/src/BinMDocStd/BinMDocStd_XLinkDriver.hxx @@ -20,7 +20,6 @@ #include #include -#include #include #include class Message_Messenger; diff --git a/src/BinMFunction/BinMFunction_FunctionDriver.hxx b/src/BinMFunction/BinMFunction_FunctionDriver.hxx index bb6d5b50ac..652d6aa78c 100644 --- a/src/BinMFunction/BinMFunction_FunctionDriver.hxx +++ b/src/BinMFunction/BinMFunction_FunctionDriver.hxx @@ -20,7 +20,6 @@ #include #include -#include #include #include class Message_Messenger; diff --git a/src/BinMFunction/BinMFunction_GraphNodeDriver.cxx b/src/BinMFunction/BinMFunction_GraphNodeDriver.cxx index 122ab8cb0f..2a8d1a9584 100644 --- a/src/BinMFunction/BinMFunction_GraphNodeDriver.cxx +++ b/src/BinMFunction/BinMFunction_GraphNodeDriver.cxx @@ -22,7 +22,6 @@ #include #include #include -#include #include #include diff --git a/src/BinMFunction/BinMFunction_GraphNodeDriver.hxx b/src/BinMFunction/BinMFunction_GraphNodeDriver.hxx index 64b6ea428f..ae23e98506 100644 --- a/src/BinMFunction/BinMFunction_GraphNodeDriver.hxx +++ b/src/BinMFunction/BinMFunction_GraphNodeDriver.hxx @@ -20,7 +20,6 @@ #include #include -#include #include #include class Message_Messenger; diff --git a/src/BinMFunction/BinMFunction_ScopeDriver.cxx b/src/BinMFunction/BinMFunction_ScopeDriver.cxx index 412b85edf2..b5f79a4b0e 100644 --- a/src/BinMFunction/BinMFunction_ScopeDriver.cxx +++ b/src/BinMFunction/BinMFunction_ScopeDriver.cxx @@ -25,7 +25,6 @@ #include #include #include -#include #include IMPLEMENT_STANDARD_RTTIEXT(BinMFunction_ScopeDriver,BinMDF_ADriver) diff --git a/src/BinMFunction/BinMFunction_ScopeDriver.hxx b/src/BinMFunction/BinMFunction_ScopeDriver.hxx index 560f4e424a..a83f181688 100644 --- a/src/BinMFunction/BinMFunction_ScopeDriver.hxx +++ b/src/BinMFunction/BinMFunction_ScopeDriver.hxx @@ -20,7 +20,6 @@ #include #include -#include #include #include class Message_Messenger; diff --git a/src/BinMNaming/BinMNaming_NamedShapeDriver.cxx b/src/BinMNaming/BinMNaming_NamedShapeDriver.cxx index 2d08ecff90..e23187cb4c 100644 --- a/src/BinMNaming/BinMNaming_NamedShapeDriver.cxx +++ b/src/BinMNaming/BinMNaming_NamedShapeDriver.cxx @@ -28,7 +28,6 @@ #include #include #include -#include #include #include #include diff --git a/src/BinMNaming/BinMNaming_NamedShapeDriver.hxx b/src/BinMNaming/BinMNaming_NamedShapeDriver.hxx index 7a2d3124a1..41e02e027d 100644 --- a/src/BinMNaming/BinMNaming_NamedShapeDriver.hxx +++ b/src/BinMNaming/BinMNaming_NamedShapeDriver.hxx @@ -17,12 +17,10 @@ #define _BinMNaming_NamedShapeDriver_HeaderFile #include -#include #include #include #include -#include #include #include #include diff --git a/src/BinMNaming/BinMNaming_NamingDriver.cxx b/src/BinMNaming/BinMNaming_NamingDriver.cxx index 96c703898a..8411cfe42a 100644 --- a/src/BinMNaming/BinMNaming_NamingDriver.cxx +++ b/src/BinMNaming/BinMNaming_NamingDriver.cxx @@ -29,9 +29,6 @@ #include #include #include -#include -#include -#include #include #include diff --git a/src/BinMNaming/BinMNaming_NamingDriver.hxx b/src/BinMNaming/BinMNaming_NamingDriver.hxx index dbd1e98570..778230caf3 100644 --- a/src/BinMNaming/BinMNaming_NamingDriver.hxx +++ b/src/BinMNaming/BinMNaming_NamingDriver.hxx @@ -20,7 +20,6 @@ #include #include -#include #include #include class Message_Messenger; diff --git a/src/BinMXCAFDoc/BinMXCAFDoc.cxx b/src/BinMXCAFDoc/BinMXCAFDoc.cxx index 846d5c67f2..38303e0546 100644 --- a/src/BinMXCAFDoc/BinMXCAFDoc.cxx +++ b/src/BinMXCAFDoc/BinMXCAFDoc.cxx @@ -16,7 +16,6 @@ #include #include -#include #include #include #include @@ -26,7 +25,6 @@ #include #include #include -#include #include #include #include diff --git a/src/BinMXCAFDoc/BinMXCAFDoc_AssemblyItemRefDriver.cxx b/src/BinMXCAFDoc/BinMXCAFDoc_AssemblyItemRefDriver.cxx index 356b65984a..ebe82cfb30 100644 --- a/src/BinMXCAFDoc/BinMXCAFDoc_AssemblyItemRefDriver.cxx +++ b/src/BinMXCAFDoc/BinMXCAFDoc_AssemblyItemRefDriver.cxx @@ -16,7 +16,6 @@ #include #include #include -#include #include #include diff --git a/src/BinMXCAFDoc/BinMXCAFDoc_AssemblyItemRefDriver.hxx b/src/BinMXCAFDoc/BinMXCAFDoc_AssemblyItemRefDriver.hxx index ebacff89bf..e16118d06d 100644 --- a/src/BinMXCAFDoc/BinMXCAFDoc_AssemblyItemRefDriver.hxx +++ b/src/BinMXCAFDoc/BinMXCAFDoc_AssemblyItemRefDriver.hxx @@ -20,7 +20,6 @@ #include #include -#include #include #include diff --git a/src/BinMXCAFDoc/BinMXCAFDoc_CentroidDriver.hxx b/src/BinMXCAFDoc/BinMXCAFDoc_CentroidDriver.hxx index 115de2d9d9..c2064fbd4b 100644 --- a/src/BinMXCAFDoc/BinMXCAFDoc_CentroidDriver.hxx +++ b/src/BinMXCAFDoc/BinMXCAFDoc_CentroidDriver.hxx @@ -17,10 +17,8 @@ #define _BinMXCAFDoc_CentroidDriver_HeaderFile #include -#include #include -#include #include #include class Message_Messenger; diff --git a/src/BinMXCAFDoc/BinMXCAFDoc_ColorDriver.hxx b/src/BinMXCAFDoc/BinMXCAFDoc_ColorDriver.hxx index 3bfe550936..b7d3bb7a61 100644 --- a/src/BinMXCAFDoc/BinMXCAFDoc_ColorDriver.hxx +++ b/src/BinMXCAFDoc/BinMXCAFDoc_ColorDriver.hxx @@ -17,10 +17,8 @@ #define _BinMXCAFDoc_ColorDriver_HeaderFile #include -#include #include -#include #include #include class Message_Messenger; diff --git a/src/BinMXCAFDoc/BinMXCAFDoc_DatumDriver.cxx b/src/BinMXCAFDoc/BinMXCAFDoc_DatumDriver.cxx index 8dc949d42b..806504f16b 100644 --- a/src/BinMXCAFDoc/BinMXCAFDoc_DatumDriver.cxx +++ b/src/BinMXCAFDoc/BinMXCAFDoc_DatumDriver.cxx @@ -19,7 +19,6 @@ #include #include #include -#include #include #include #include diff --git a/src/BinMXCAFDoc/BinMXCAFDoc_DatumDriver.hxx b/src/BinMXCAFDoc/BinMXCAFDoc_DatumDriver.hxx index f3d0204a25..ba59ca9fdb 100644 --- a/src/BinMXCAFDoc/BinMXCAFDoc_DatumDriver.hxx +++ b/src/BinMXCAFDoc/BinMXCAFDoc_DatumDriver.hxx @@ -17,10 +17,8 @@ #define _BinMXCAFDoc_DatumDriver_HeaderFile #include -#include #include -#include #include #include class Message_Messenger; diff --git a/src/BinMXCAFDoc/BinMXCAFDoc_DimTolDriver.cxx b/src/BinMXCAFDoc/BinMXCAFDoc_DimTolDriver.cxx index f2bde5018c..68ad40d31a 100644 --- a/src/BinMXCAFDoc/BinMXCAFDoc_DimTolDriver.cxx +++ b/src/BinMXCAFDoc/BinMXCAFDoc_DimTolDriver.cxx @@ -19,8 +19,6 @@ #include #include #include -#include -#include #include #include diff --git a/src/BinMXCAFDoc/BinMXCAFDoc_DimTolDriver.hxx b/src/BinMXCAFDoc/BinMXCAFDoc_DimTolDriver.hxx index 93b2825b35..585e9e4f79 100644 --- a/src/BinMXCAFDoc/BinMXCAFDoc_DimTolDriver.hxx +++ b/src/BinMXCAFDoc/BinMXCAFDoc_DimTolDriver.hxx @@ -17,10 +17,8 @@ #define _BinMXCAFDoc_DimTolDriver_HeaderFile #include -#include #include -#include #include #include class Message_Messenger; diff --git a/src/BinMXCAFDoc/BinMXCAFDoc_GraphNodeDriver.hxx b/src/BinMXCAFDoc/BinMXCAFDoc_GraphNodeDriver.hxx index e748c87d08..b40557d04e 100644 --- a/src/BinMXCAFDoc/BinMXCAFDoc_GraphNodeDriver.hxx +++ b/src/BinMXCAFDoc/BinMXCAFDoc_GraphNodeDriver.hxx @@ -17,10 +17,8 @@ #define _BinMXCAFDoc_GraphNodeDriver_HeaderFile #include -#include #include -#include #include #include class Message_Messenger; diff --git a/src/BinMXCAFDoc/BinMXCAFDoc_LengthUnitDriver.hxx b/src/BinMXCAFDoc/BinMXCAFDoc_LengthUnitDriver.hxx index 9f1bd4d6b7..209816c546 100644 --- a/src/BinMXCAFDoc/BinMXCAFDoc_LengthUnitDriver.hxx +++ b/src/BinMXCAFDoc/BinMXCAFDoc_LengthUnitDriver.hxx @@ -15,10 +15,8 @@ #define _BinMXCAFDoc_LengthUnitDriver_HeaderFile #include -#include #include -#include #include #include class Message_Messenger; diff --git a/src/BinMXCAFDoc/BinMXCAFDoc_LocationDriver.hxx b/src/BinMXCAFDoc/BinMXCAFDoc_LocationDriver.hxx index c46d5b8838..54992d1f16 100644 --- a/src/BinMXCAFDoc/BinMXCAFDoc_LocationDriver.hxx +++ b/src/BinMXCAFDoc/BinMXCAFDoc_LocationDriver.hxx @@ -21,7 +21,6 @@ #include #include -#include #include #include class Message_Messenger; diff --git a/src/BinMXCAFDoc/BinMXCAFDoc_MaterialDriver.hxx b/src/BinMXCAFDoc/BinMXCAFDoc_MaterialDriver.hxx index f2ecd6aff2..de3fd61f64 100644 --- a/src/BinMXCAFDoc/BinMXCAFDoc_MaterialDriver.hxx +++ b/src/BinMXCAFDoc/BinMXCAFDoc_MaterialDriver.hxx @@ -17,10 +17,8 @@ #define _BinMXCAFDoc_MaterialDriver_HeaderFile #include -#include #include -#include #include #include class Message_Messenger; diff --git a/src/BinMXCAFDoc/BinMXCAFDoc_NoteBinDataDriver.cxx b/src/BinMXCAFDoc/BinMXCAFDoc_NoteBinDataDriver.cxx index c37709d35b..5eb79457cb 100644 --- a/src/BinMXCAFDoc/BinMXCAFDoc_NoteBinDataDriver.cxx +++ b/src/BinMXCAFDoc/BinMXCAFDoc_NoteBinDataDriver.cxx @@ -16,8 +16,6 @@ #include #include #include -#include -#include #include #include #include diff --git a/src/BinMXCAFDoc/BinMXCAFDoc_NoteCommentDriver.cxx b/src/BinMXCAFDoc/BinMXCAFDoc_NoteCommentDriver.cxx index 14e00cf561..8a9f3601a6 100644 --- a/src/BinMXCAFDoc/BinMXCAFDoc_NoteCommentDriver.cxx +++ b/src/BinMXCAFDoc/BinMXCAFDoc_NoteCommentDriver.cxx @@ -16,7 +16,6 @@ #include #include #include -#include #include #include diff --git a/src/BinMXCAFDoc/BinMXCAFDoc_NoteDriver.cxx b/src/BinMXCAFDoc/BinMXCAFDoc_NoteDriver.cxx index 477f153fa7..40feb40c73 100644 --- a/src/BinMXCAFDoc/BinMXCAFDoc_NoteDriver.cxx +++ b/src/BinMXCAFDoc/BinMXCAFDoc_NoteDriver.cxx @@ -16,7 +16,6 @@ #include #include #include -#include #include #include diff --git a/src/BinMXCAFDoc/BinMXCAFDoc_NoteDriver.hxx b/src/BinMXCAFDoc/BinMXCAFDoc_NoteDriver.hxx index 10be389d91..6e9a9f55c0 100644 --- a/src/BinMXCAFDoc/BinMXCAFDoc_NoteDriver.hxx +++ b/src/BinMXCAFDoc/BinMXCAFDoc_NoteDriver.hxx @@ -20,7 +20,6 @@ #include #include -#include #include #include diff --git a/src/BinObjMgt/BinObjMgt_Persistent.cxx b/src/BinObjMgt/BinObjMgt_Persistent.cxx index 4056c7d0a7..eb135b2d9e 100644 --- a/src/BinObjMgt/BinObjMgt_Persistent.cxx +++ b/src/BinObjMgt/BinObjMgt_Persistent.cxx @@ -16,12 +16,7 @@ #include #include -#include #include -#include -#include -#include -#include #include #include #include diff --git a/src/BinObjMgt/BinObjMgt_Persistent.hxx b/src/BinObjMgt/BinObjMgt_Persistent.hxx index 2919efc00a..13331a1167 100644 --- a/src/BinObjMgt/BinObjMgt_Persistent.hxx +++ b/src/BinObjMgt/BinObjMgt_Persistent.hxx @@ -22,13 +22,7 @@ #include #include -#include -#include -#include -#include -#include #include -#include #include #include #include diff --git a/src/BinTObjDrivers/BinTObjDrivers.cxx b/src/BinTObjDrivers/BinTObjDrivers.cxx index 7425c20000..43b6b0c2a9 100644 --- a/src/BinTObjDrivers/BinTObjDrivers.cxx +++ b/src/BinTObjDrivers/BinTObjDrivers.cxx @@ -16,7 +16,6 @@ // The original implementation Copyright: (C) RINA S.p.A #include -#include #include #include #include diff --git a/src/BinTObjDrivers/BinTObjDrivers_IntSparseArrayDriver.cxx b/src/BinTObjDrivers/BinTObjDrivers_IntSparseArrayDriver.cxx index b217994c91..3beb263efb 100644 --- a/src/BinTObjDrivers/BinTObjDrivers_IntSparseArrayDriver.cxx +++ b/src/BinTObjDrivers/BinTObjDrivers_IntSparseArrayDriver.cxx @@ -20,8 +20,6 @@ #include #include #include -#include -#include #include diff --git a/src/BinTObjDrivers/BinTObjDrivers_ModelDriver.cxx b/src/BinTObjDrivers/BinTObjDrivers_ModelDriver.cxx index 238451e83e..9354fdf54d 100644 --- a/src/BinTObjDrivers/BinTObjDrivers_ModelDriver.cxx +++ b/src/BinTObjDrivers/BinTObjDrivers_ModelDriver.cxx @@ -18,7 +18,6 @@ #include #include -#include #include #include diff --git a/src/BinTObjDrivers/BinTObjDrivers_ReferenceDriver.cxx b/src/BinTObjDrivers/BinTObjDrivers_ReferenceDriver.cxx index d6f121ef1b..76ec68a61f 100644 --- a/src/BinTObjDrivers/BinTObjDrivers_ReferenceDriver.cxx +++ b/src/BinTObjDrivers/BinTObjDrivers_ReferenceDriver.cxx @@ -17,14 +17,11 @@ #include -#include #include #include #include -#include #include #include -#include #include diff --git a/src/BinTools/BinTools.hxx b/src/BinTools/BinTools.hxx index c70728e003..0f2cd73464 100644 --- a/src/BinTools/BinTools.hxx +++ b/src/BinTools/BinTools.hxx @@ -22,11 +22,6 @@ #include #include -#include -#include -#include -#include -#include #include class TopoDS_Shape; diff --git a/src/BinTools/BinTools_Curve2dSet.cxx b/src/BinTools/BinTools_Curve2dSet.cxx index bbcfc9fcff..8979369fa7 100644 --- a/src/BinTools/BinTools_Curve2dSet.cxx +++ b/src/BinTools/BinTools_Curve2dSet.cxx @@ -33,7 +33,6 @@ #include #include #include -#include #include #include #include diff --git a/src/BinTools/BinTools_CurveSet.cxx b/src/BinTools/BinTools_CurveSet.cxx index 4b30c291d5..1966f12e5c 100644 --- a/src/BinTools/BinTools_CurveSet.cxx +++ b/src/BinTools/BinTools_CurveSet.cxx @@ -33,7 +33,6 @@ #include #include #include -#include #include #include #include diff --git a/src/BinTools/BinTools_LocationSet.cxx b/src/BinTools/BinTools_LocationSet.cxx index 3f16450a14..e1f5aa286b 100644 --- a/src/BinTools/BinTools_LocationSet.cxx +++ b/src/BinTools/BinTools_LocationSet.cxx @@ -16,11 +16,8 @@ #include #include -#include #include -#include #include -#include #include //======================================================================= diff --git a/src/BinTools/BinTools_LocationSet.hxx b/src/BinTools/BinTools_LocationSet.hxx index ee989e7edf..c7add935a4 100644 --- a/src/BinTools/BinTools_LocationSet.hxx +++ b/src/BinTools/BinTools_LocationSet.hxx @@ -18,7 +18,6 @@ #include #include -#include #include #include diff --git a/src/BinTools/BinTools_OStream.cxx b/src/BinTools/BinTools_OStream.cxx index 36d7486309..bb84c9eb82 100644 --- a/src/BinTools/BinTools_OStream.cxx +++ b/src/BinTools/BinTools_OStream.cxx @@ -12,7 +12,6 @@ // commercial license or contractual agreement. #include -#include #if DO_INVERSE #include diff --git a/src/BinTools/BinTools_ShapeReader.cxx b/src/BinTools/BinTools_ShapeReader.cxx index c797b4f0b7..336590f90e 100644 --- a/src/BinTools/BinTools_ShapeReader.cxx +++ b/src/BinTools/BinTools_ShapeReader.cxx @@ -16,7 +16,6 @@ #include #include #include -#include #include #include #include diff --git a/src/BinTools/BinTools_ShapeSet.cxx b/src/BinTools/BinTools_ShapeSet.cxx index 5df9100a2d..0460882c7e 100644 --- a/src/BinTools/BinTools_ShapeSet.cxx +++ b/src/BinTools/BinTools_ShapeSet.cxx @@ -16,15 +16,12 @@ #include #include -#include -#include #include #include #include #include #include #include -#include #include #include #include @@ -37,14 +34,10 @@ #include #include #include -#include -#include #include #include #include -#include #include -#include #include #include #include diff --git a/src/BinTools/BinTools_ShapeWriter.hxx b/src/BinTools/BinTools_ShapeWriter.hxx index 17eda44a34..f9dc241fa0 100644 --- a/src/BinTools/BinTools_ShapeWriter.hxx +++ b/src/BinTools/BinTools_ShapeWriter.hxx @@ -16,7 +16,6 @@ #include #include -#include #include #include diff --git a/src/BinTools/BinTools_SurfaceSet.cxx b/src/BinTools/BinTools_SurfaceSet.cxx index 2e837e2955..d2c118ad65 100644 --- a/src/BinTools/BinTools_SurfaceSet.cxx +++ b/src/BinTools/BinTools_SurfaceSet.cxx @@ -18,7 +18,6 @@ #include #include #include -#include #include #include #include @@ -36,8 +35,6 @@ #include #include #include -#include -#include #include #include #include diff --git a/src/BinXCAFDrivers/BinXCAFDrivers.cxx b/src/BinXCAFDrivers/BinXCAFDrivers.cxx index a433371b8f..49df247122 100644 --- a/src/BinXCAFDrivers/BinXCAFDrivers.cxx +++ b/src/BinXCAFDrivers/BinXCAFDrivers.cxx @@ -20,7 +20,6 @@ #include #include #include -#include #include #include #include diff --git a/src/Bisector/Bisector_Bisec.cxx b/src/Bisector/Bisector_Bisec.cxx index 7159fc6936..09f3164508 100644 --- a/src/Bisector/Bisector_Bisec.cxx +++ b/src/Bisector/Bisector_Bisec.cxx @@ -33,7 +33,6 @@ #include #include #include -#include #include #ifdef OCCT_DEBUG diff --git a/src/Bisector/Bisector_Bisec.hxx b/src/Bisector/Bisector_Bisec.hxx index 17fdd17dd7..89b99ba4fd 100644 --- a/src/Bisector/Bisector_Bisec.hxx +++ b/src/Bisector/Bisector_Bisec.hxx @@ -21,9 +21,7 @@ #include #include -#include #include -#include class Geom2d_TrimmedCurve; class Geom2d_Curve; class gp_Pnt2d; diff --git a/src/Bisector/Bisector_BisecAna.cxx b/src/Bisector/Bisector_BisecAna.cxx index c5d509b880..64a31618a3 100644 --- a/src/Bisector/Bisector_BisecAna.cxx +++ b/src/Bisector/Bisector_BisecAna.cxx @@ -22,10 +22,8 @@ #include #include #include -#include #include #include -#include #include #include #include @@ -38,19 +36,11 @@ #include #include #include -#include -#include #include #include #include #include -#include -#include -#include #include -#include -#include -#include #include #include diff --git a/src/Bisector/Bisector_BisecAna.hxx b/src/Bisector/Bisector_BisecAna.hxx index e0b5d98d87..3d96a6145c 100644 --- a/src/Bisector/Bisector_BisecAna.hxx +++ b/src/Bisector/Bisector_BisecAna.hxx @@ -23,7 +23,6 @@ #include #include #include -#include #include #include class Geom2d_TrimmedCurve; diff --git a/src/Bisector/Bisector_BisecCC.cxx b/src/Bisector/Bisector_BisecCC.cxx index a334b06a1a..07f29490ce 100644 --- a/src/Bisector/Bisector_BisecCC.cxx +++ b/src/Bisector/Bisector_BisecCC.cxx @@ -18,20 +18,14 @@ #include #include #include -#include #include #include #include -#include #include #include #include -#include -#include #include -#include #include -#include #include #include #include @@ -43,11 +37,8 @@ #include #include #include -#include -#include #include #include -#include #include IMPLEMENT_STANDARD_RTTIEXT(Bisector_BisecCC,Bisector_Curve) diff --git a/src/Bisector/Bisector_BisecCC.hxx b/src/Bisector/Bisector_BisecCC.hxx index 149c05b0ec..b18dc89f9f 100644 --- a/src/Bisector/Bisector_BisecCC.hxx +++ b/src/Bisector/Bisector_BisecCC.hxx @@ -18,13 +18,10 @@ #define _Bisector_BisecCC_HeaderFile #include -#include -#include #include #include #include -#include #include #include #include diff --git a/src/Bisector/Bisector_BisecPC.cxx b/src/Bisector/Bisector_BisecPC.cxx index 784f8a9000..5ee0290a45 100644 --- a/src/Bisector/Bisector_BisecPC.cxx +++ b/src/Bisector/Bisector_BisecPC.cxx @@ -18,30 +18,17 @@ #include #include #include -#include -#include #include #include -#include -#include -#include #include -#include -#include -#include -#include #include #include #include #include #include #include -#include #include -#include -#include #include -#include #include IMPLEMENT_STANDARD_RTTIEXT(Bisector_BisecPC,Bisector_Curve) diff --git a/src/Bisector/Bisector_BisecPC.hxx b/src/Bisector/Bisector_BisecPC.hxx index d3006c4edb..be81b90930 100644 --- a/src/Bisector/Bisector_BisecPC.hxx +++ b/src/Bisector/Bisector_BisecPC.hxx @@ -18,13 +18,10 @@ #define _Bisector_BisecPC_HeaderFile #include -#include #include -#include #include #include -#include #include #include class Geom2d_Curve; diff --git a/src/Bisector/Bisector_Curve.hxx b/src/Bisector/Bisector_Curve.hxx index 7738f1955e..727408b5d0 100644 --- a/src/Bisector/Bisector_Curve.hxx +++ b/src/Bisector/Bisector_Curve.hxx @@ -22,7 +22,6 @@ #include #include -#include #include class gp_Pnt2d; diff --git a/src/Bisector/Bisector_FunctionInter.hxx b/src/Bisector/Bisector_FunctionInter.hxx index 8bdf0ea896..fd22c46ca1 100644 --- a/src/Bisector/Bisector_FunctionInter.hxx +++ b/src/Bisector/Bisector_FunctionInter.hxx @@ -22,8 +22,6 @@ #include #include -#include -#include class Geom2d_Curve; class Bisector_Curve; diff --git a/src/Bisector/Bisector_Inter.cxx b/src/Bisector/Bisector_Inter.cxx index 2de350fe5d..876a4a501b 100644 --- a/src/Bisector/Bisector_Inter.cxx +++ b/src/Bisector/Bisector_Inter.cxx @@ -35,7 +35,6 @@ #include #include #include -#include #ifdef OCCT_DEBUG //#define DRAW diff --git a/src/Bisector/Bisector_Inter.hxx b/src/Bisector/Bisector_Inter.hxx index c5e724c3c2..6328531448 100644 --- a/src/Bisector/Bisector_Inter.hxx +++ b/src/Bisector/Bisector_Inter.hxx @@ -22,8 +22,6 @@ #include #include -#include -#include class Bisector_Bisec; class IntRes2d_Domain; class Geom2d_Curve; diff --git a/src/Bisector/Bisector_PointOnBis.hxx b/src/Bisector/Bisector_PointOnBis.hxx index 7ae90ebdf3..1f5a89ad7c 100644 --- a/src/Bisector/Bisector_PointOnBis.hxx +++ b/src/Bisector/Bisector_PointOnBis.hxx @@ -21,7 +21,6 @@ #include #include -#include #include #include diff --git a/src/Bisector/Bisector_PolyBis.cxx b/src/Bisector/Bisector_PolyBis.cxx index 8eee7d532e..6cddc59389 100644 --- a/src/Bisector/Bisector_PolyBis.cxx +++ b/src/Bisector/Bisector_PolyBis.cxx @@ -15,13 +15,10 @@ // commercial license or contractual agreement. -#include #include #include -#include #include #include -#include //============================================================================= //function : Bisector_PolyBis diff --git a/src/Bisector/Bisector_PolyBis.hxx b/src/Bisector/Bisector_PolyBis.hxx index 5938ccbd0e..d4b9341a04 100644 --- a/src/Bisector/Bisector_PolyBis.hxx +++ b/src/Bisector/Bisector_PolyBis.hxx @@ -22,9 +22,7 @@ #include #include -#include #include -#include class gp_Trsf2d; diff --git a/src/Blend/Blend_AppFunction.cxx b/src/Blend/Blend_AppFunction.cxx index ae877f3272..01e645ab40 100644 --- a/src/Blend/Blend_AppFunction.cxx +++ b/src/Blend/Blend_AppFunction.cxx @@ -15,9 +15,6 @@ #include #include -#include -#include -#include //======================================================================= //function : Parameter diff --git a/src/Blend/Blend_AppFunction.hxx b/src/Blend/Blend_AppFunction.hxx index 9fe4641dc5..5494ea4b92 100644 --- a/src/Blend/Blend_AppFunction.hxx +++ b/src/Blend/Blend_AppFunction.hxx @@ -22,10 +22,8 @@ #include #include -#include #include #include -#include #include #include #include diff --git a/src/Blend/Blend_CSFunction.cxx b/src/Blend/Blend_CSFunction.cxx index f434ef4c13..613a550fdb 100644 --- a/src/Blend/Blend_CSFunction.cxx +++ b/src/Blend/Blend_CSFunction.cxx @@ -16,11 +16,6 @@ #include #include #include -#include -#include -#include -#include -#include #include Standard_Integer Blend_CSFunction::NbVariables () const diff --git a/src/Blend/Blend_CSFunction.hxx b/src/Blend/Blend_CSFunction.hxx index b2d69af59b..07922ddeeb 100644 --- a/src/Blend/Blend_CSFunction.hxx +++ b/src/Blend/Blend_CSFunction.hxx @@ -22,10 +22,8 @@ #include #include -#include #include #include -#include #include #include #include diff --git a/src/Blend/Blend_CurvPointFuncInv.cxx b/src/Blend/Blend_CurvPointFuncInv.cxx index c48b0d2e81..de92493bcb 100644 --- a/src/Blend/Blend_CurvPointFuncInv.cxx +++ b/src/Blend/Blend_CurvPointFuncInv.cxx @@ -16,8 +16,6 @@ #include -#include -#include //======================================================================= //function : NbVariables diff --git a/src/Blend/Blend_CurvPointFuncInv.hxx b/src/Blend/Blend_CurvPointFuncInv.hxx index b1dafd97e3..567a1e4e53 100644 --- a/src/Blend/Blend_CurvPointFuncInv.hxx +++ b/src/Blend/Blend_CurvPointFuncInv.hxx @@ -22,10 +22,8 @@ #include #include -#include #include #include -#include class math_Matrix; class gp_Pnt; diff --git a/src/Blend/Blend_FuncInv.cxx b/src/Blend/Blend_FuncInv.cxx index ab3b984453..13ce5fefcc 100644 --- a/src/Blend/Blend_FuncInv.cxx +++ b/src/Blend/Blend_FuncInv.cxx @@ -15,7 +15,6 @@ #include #include -#include Standard_Integer Blend_FuncInv::NbVariables () const { diff --git a/src/Blend/Blend_Function.cxx b/src/Blend/Blend_Function.cxx index 3d848a81c0..7b4e69adb6 100644 --- a/src/Blend/Blend_Function.cxx +++ b/src/Blend/Blend_Function.cxx @@ -16,10 +16,6 @@ #include #include #include -#include -#include -#include -#include Standard_Integer Blend_Function::NbVariables () const { diff --git a/src/Blend/Blend_Function.hxx b/src/Blend/Blend_Function.hxx index 75ca69f7f1..c1b88d7877 100644 --- a/src/Blend/Blend_Function.hxx +++ b/src/Blend/Blend_Function.hxx @@ -22,12 +22,8 @@ #include #include -#include #include -#include -#include #include -#include #include #include #include diff --git a/src/Blend/Blend_Point.cxx b/src/Blend/Blend_Point.cxx index 4032b9a08d..2a54930b05 100644 --- a/src/Blend/Blend_Point.cxx +++ b/src/Blend/Blend_Point.cxx @@ -17,7 +17,6 @@ #include #include #include -#include Blend_Point::Blend_Point ():istgt(Standard_True) {} diff --git a/src/Blend/Blend_Point.hxx b/src/Blend/Blend_Point.hxx index e84ddabee4..a0d42ab820 100644 --- a/src/Blend/Blend_Point.hxx +++ b/src/Blend/Blend_Point.hxx @@ -23,7 +23,6 @@ #include #include -#include #include #include class gp_Vec2d; diff --git a/src/Blend/Blend_RstRstFunction.cxx b/src/Blend/Blend_RstRstFunction.cxx index b6925cbf61..ce98ab3f0b 100644 --- a/src/Blend/Blend_RstRstFunction.cxx +++ b/src/Blend/Blend_RstRstFunction.cxx @@ -18,11 +18,6 @@ #include #include #include -#include -#include -#include -#include -#include #include const gp_Pnt& Blend_RstRstFunction::Pnt1() const diff --git a/src/Blend/Blend_RstRstFunction.hxx b/src/Blend/Blend_RstRstFunction.hxx index a100eb2355..b7f26346bd 100644 --- a/src/Blend/Blend_RstRstFunction.hxx +++ b/src/Blend/Blend_RstRstFunction.hxx @@ -18,13 +18,9 @@ #include #include -#include #include -#include -#include #include -#include #include #include #include diff --git a/src/Blend/Blend_SurfCurvFuncInv.cxx b/src/Blend/Blend_SurfCurvFuncInv.cxx index f0be071b72..f481ee0fc5 100644 --- a/src/Blend/Blend_SurfCurvFuncInv.cxx +++ b/src/Blend/Blend_SurfCurvFuncInv.cxx @@ -17,7 +17,6 @@ #include #include -#include //======================================================================= //function : NbVariables diff --git a/src/Blend/Blend_SurfCurvFuncInv.hxx b/src/Blend/Blend_SurfCurvFuncInv.hxx index c2c4344b01..5d870729ae 100644 --- a/src/Blend/Blend_SurfCurvFuncInv.hxx +++ b/src/Blend/Blend_SurfCurvFuncInv.hxx @@ -23,9 +23,7 @@ #include #include -#include #include -#include class math_Matrix; //! Deferred class for a function used to compute a diff --git a/src/Blend/Blend_SurfPointFuncInv.cxx b/src/Blend/Blend_SurfPointFuncInv.cxx index 35c3b0b52d..86a85771a8 100644 --- a/src/Blend/Blend_SurfPointFuncInv.cxx +++ b/src/Blend/Blend_SurfPointFuncInv.cxx @@ -16,8 +16,6 @@ #include -#include -#include //======================================================================= //function : NbVariables diff --git a/src/Blend/Blend_SurfPointFuncInv.hxx b/src/Blend/Blend_SurfPointFuncInv.hxx index 75e177d02d..968d6fde38 100644 --- a/src/Blend/Blend_SurfPointFuncInv.hxx +++ b/src/Blend/Blend_SurfPointFuncInv.hxx @@ -22,10 +22,8 @@ #include #include -#include #include #include -#include class math_Matrix; class gp_Pnt; diff --git a/src/Blend/Blend_SurfRstFunction.cxx b/src/Blend/Blend_SurfRstFunction.cxx index b49a87e890..f583f752d1 100644 --- a/src/Blend/Blend_SurfRstFunction.cxx +++ b/src/Blend/Blend_SurfRstFunction.cxx @@ -18,11 +18,6 @@ #include #include #include -#include -#include -#include -#include -#include #include const gp_Pnt& Blend_SurfRstFunction::Pnt1() const diff --git a/src/Blend/Blend_SurfRstFunction.hxx b/src/Blend/Blend_SurfRstFunction.hxx index 9c9ff6cec6..f6cf7a9e1e 100644 --- a/src/Blend/Blend_SurfRstFunction.hxx +++ b/src/Blend/Blend_SurfRstFunction.hxx @@ -18,13 +18,9 @@ #include #include -#include #include -#include -#include #include -#include #include #include #include diff --git a/src/BlendFunc/BlendFunc.cxx b/src/BlendFunc/BlendFunc.cxx index 230de2a927..eca32b7611 100644 --- a/src/BlendFunc/BlendFunc.cxx +++ b/src/BlendFunc/BlendFunc.cxx @@ -23,7 +23,6 @@ #include #include #include -#include #include #include #include @@ -34,7 +33,6 @@ #include #include #include -#include #include //======================================================================= diff --git a/src/BlendFunc/BlendFunc_CSCircular.cxx b/src/BlendFunc/BlendFunc_CSCircular.cxx index 8800769567..ff59369b1c 100644 --- a/src/BlendFunc/BlendFunc_CSCircular.cxx +++ b/src/BlendFunc/BlendFunc_CSCircular.cxx @@ -19,13 +19,11 @@ // Modified 23/06/1997 PMN : Pb de division par 0. #include -#include #include #include #include #include #include -#include #include #include #include diff --git a/src/BlendFunc/BlendFunc_CSConstRad.cxx b/src/BlendFunc/BlendFunc_CSConstRad.cxx index 6d85ff649e..48a46bb3f4 100644 --- a/src/BlendFunc/BlendFunc_CSConstRad.cxx +++ b/src/BlendFunc/BlendFunc_CSConstRad.cxx @@ -18,13 +18,11 @@ // + Utilisation de GeomFill::GetCircle dans Section. #include -#include #include #include #include #include #include -#include #include #include #include diff --git a/src/BlendFunc/BlendFunc_ChAsym.cxx b/src/BlendFunc/BlendFunc_ChAsym.cxx index 845e939ba2..5d6c2463fb 100644 --- a/src/BlendFunc/BlendFunc_ChAsym.cxx +++ b/src/BlendFunc/BlendFunc_ChAsym.cxx @@ -15,8 +15,6 @@ // commercial license or contractual agreement. -#include -#include #include #include #include diff --git a/src/BlendFunc/BlendFunc_ChAsym.hxx b/src/BlendFunc/BlendFunc_ChAsym.hxx index 96a82758bd..aeb6ec0c8c 100644 --- a/src/BlendFunc/BlendFunc_ChAsym.hxx +++ b/src/BlendFunc/BlendFunc_ChAsym.hxx @@ -20,7 +20,6 @@ #include #include #include -#include #include #include #include diff --git a/src/BlendFunc/BlendFunc_ChAsymInv.cxx b/src/BlendFunc/BlendFunc_ChAsymInv.cxx index 3ef8b19449..4c77faf4b7 100644 --- a/src/BlendFunc/BlendFunc_ChAsymInv.cxx +++ b/src/BlendFunc/BlendFunc_ChAsymInv.cxx @@ -16,8 +16,6 @@ #include -#include -#include #include #include #include diff --git a/src/BlendFunc/BlendFunc_ChAsymInv.hxx b/src/BlendFunc/BlendFunc_ChAsymInv.hxx index df4c03e952..10d3355164 100644 --- a/src/BlendFunc/BlendFunc_ChAsymInv.hxx +++ b/src/BlendFunc/BlendFunc_ChAsymInv.hxx @@ -18,7 +18,6 @@ #define _BlendFunc_ChAsymInv_HeaderFile #include -#include #include #include diff --git a/src/BlendFunc/BlendFunc_ChamfInv.cxx b/src/BlendFunc/BlendFunc_ChamfInv.cxx index 6a235fbfac..356c11c8fd 100644 --- a/src/BlendFunc/BlendFunc_ChamfInv.cxx +++ b/src/BlendFunc/BlendFunc_ChamfInv.cxx @@ -16,12 +16,9 @@ #include -#include -#include #include #include #include -#include //======================================================================= //function : BlendFunc_ChamfInv diff --git a/src/BlendFunc/BlendFunc_Chamfer.cxx b/src/BlendFunc/BlendFunc_Chamfer.cxx index a53d2eceb3..8053699104 100644 --- a/src/BlendFunc/BlendFunc_Chamfer.cxx +++ b/src/BlendFunc/BlendFunc_Chamfer.cxx @@ -17,18 +17,11 @@ // Modified : 20/08/96 PMN Ajout des methodes (Nb)Intervals et IsRationnal // Modified : 30/12/96 PMN Ajout GetMinimalWeight, GetSectionSize; -#include -#include -#include -#include #include #include -#include #include #include -#include #include -#include #include //======================================================================= diff --git a/src/BlendFunc/BlendFunc_Chamfer.hxx b/src/BlendFunc/BlendFunc_Chamfer.hxx index 050c9ad05d..64d82ee951 100644 --- a/src/BlendFunc/BlendFunc_Chamfer.hxx +++ b/src/BlendFunc/BlendFunc_Chamfer.hxx @@ -22,12 +22,6 @@ #include #include #include -#include -#include -#include -#include -#include -#include class math_Matrix; class gp_Pnt; diff --git a/src/BlendFunc/BlendFunc_ConstRad.cxx b/src/BlendFunc/BlendFunc_ConstRad.cxx index d5cfef6406..91b0fb5a73 100644 --- a/src/BlendFunc/BlendFunc_ConstRad.cxx +++ b/src/BlendFunc/BlendFunc_ConstRad.cxx @@ -19,7 +19,6 @@ // Modified 20/02/1998 PMN Singular surfaces management #include -#include #include #include #include diff --git a/src/BlendFunc/BlendFunc_ConstRad.hxx b/src/BlendFunc/BlendFunc_ConstRad.hxx index f69b58819e..668468a74e 100644 --- a/src/BlendFunc/BlendFunc_ConstRad.hxx +++ b/src/BlendFunc/BlendFunc_ConstRad.hxx @@ -21,7 +21,6 @@ #include #include #include -#include #include #include #include diff --git a/src/BlendFunc/BlendFunc_ConstRadInv.cxx b/src/BlendFunc/BlendFunc_ConstRadInv.cxx index eb1c15eb68..9c24ac7f25 100644 --- a/src/BlendFunc/BlendFunc_ConstRadInv.cxx +++ b/src/BlendFunc/BlendFunc_ConstRadInv.cxx @@ -16,8 +16,6 @@ #include -#include -#include #include #include #include diff --git a/src/BlendFunc/BlendFunc_ConstThroat.cxx b/src/BlendFunc/BlendFunc_ConstThroat.cxx index 3300f17951..1aa7e2ee06 100644 --- a/src/BlendFunc/BlendFunc_ConstThroat.cxx +++ b/src/BlendFunc/BlendFunc_ConstThroat.cxx @@ -12,19 +12,12 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -#include -#include -#include -#include #include #include -#include #include #include #include -#include #include -#include #include #define Eps 1.e-15 diff --git a/src/BlendFunc/BlendFunc_ConstThroat.hxx b/src/BlendFunc/BlendFunc_ConstThroat.hxx index 5b5a032fa5..1b1a15ae31 100644 --- a/src/BlendFunc/BlendFunc_ConstThroat.hxx +++ b/src/BlendFunc/BlendFunc_ConstThroat.hxx @@ -19,11 +19,7 @@ #include #include #include -#include #include -#include -#include -#include #include class math_Matrix; diff --git a/src/BlendFunc/BlendFunc_ConstThroatInv.cxx b/src/BlendFunc/BlendFunc_ConstThroatInv.cxx index 00458a028c..79d8a126ea 100644 --- a/src/BlendFunc/BlendFunc_ConstThroatInv.cxx +++ b/src/BlendFunc/BlendFunc_ConstThroatInv.cxx @@ -14,12 +14,9 @@ #include -#include -#include #include #include #include -#include //======================================================================= //function : BlendFunc_ConstThroatInv diff --git a/src/BlendFunc/BlendFunc_ConstThroatWithPenetration.cxx b/src/BlendFunc/BlendFunc_ConstThroatWithPenetration.cxx index 67ab7531c4..354a69dd6b 100644 --- a/src/BlendFunc/BlendFunc_ConstThroatWithPenetration.cxx +++ b/src/BlendFunc/BlendFunc_ConstThroatWithPenetration.cxx @@ -12,19 +12,12 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -#include -#include -#include -#include #include #include -#include #include #include #include -#include #include -#include #include #define Eps 1.e-15 diff --git a/src/BlendFunc/BlendFunc_ConstThroatWithPenetration.hxx b/src/BlendFunc/BlendFunc_ConstThroatWithPenetration.hxx index b2e8cc12d2..fa6ee54ede 100644 --- a/src/BlendFunc/BlendFunc_ConstThroatWithPenetration.hxx +++ b/src/BlendFunc/BlendFunc_ConstThroatWithPenetration.hxx @@ -19,12 +19,7 @@ #include #include #include -#include #include -#include -#include -#include -#include class math_Matrix; diff --git a/src/BlendFunc/BlendFunc_ConstThroatWithPenetrationInv.cxx b/src/BlendFunc/BlendFunc_ConstThroatWithPenetrationInv.cxx index 28865578f0..24b8720324 100644 --- a/src/BlendFunc/BlendFunc_ConstThroatWithPenetrationInv.cxx +++ b/src/BlendFunc/BlendFunc_ConstThroatWithPenetrationInv.cxx @@ -14,12 +14,9 @@ #include -#include -#include #include #include #include -#include //======================================================================= //function : BlendFunc_ConstThroatInv diff --git a/src/BlendFunc/BlendFunc_Corde.cxx b/src/BlendFunc/BlendFunc_Corde.cxx index d423b3f41c..9ad7cb1bf4 100644 --- a/src/BlendFunc/BlendFunc_Corde.cxx +++ b/src/BlendFunc/BlendFunc_Corde.cxx @@ -15,12 +15,9 @@ // commercial license or contractual agreement. -#include -#include #include #include #include -#include #include #include #include diff --git a/src/BlendFunc/BlendFunc_EvolRad.cxx b/src/BlendFunc/BlendFunc_EvolRad.cxx index de4ec608a2..7ab02e2765 100644 --- a/src/BlendFunc/BlendFunc_EvolRad.cxx +++ b/src/BlendFunc/BlendFunc_EvolRad.cxx @@ -16,15 +16,12 @@ #include -#include #include #include #include #include -#include #include #include -#include #include #include #include @@ -34,10 +31,8 @@ #include #include #include -#include #include #include -#include #include #define Eps 1.e-15 diff --git a/src/BlendFunc/BlendFunc_EvolRad.hxx b/src/BlendFunc/BlendFunc_EvolRad.hxx index 779b6ec62d..16fe6d82dd 100644 --- a/src/BlendFunc/BlendFunc_EvolRad.hxx +++ b/src/BlendFunc/BlendFunc_EvolRad.hxx @@ -21,7 +21,6 @@ #include #include #include -#include #include #include #include diff --git a/src/BlendFunc/BlendFunc_EvolRadInv.cxx b/src/BlendFunc/BlendFunc_EvolRadInv.cxx index 4bbe7d009a..57334305f4 100644 --- a/src/BlendFunc/BlendFunc_EvolRadInv.cxx +++ b/src/BlendFunc/BlendFunc_EvolRadInv.cxx @@ -16,8 +16,6 @@ #include -#include -#include #include #include #include diff --git a/src/BlendFunc/BlendFunc_GenChamfInv.cxx b/src/BlendFunc/BlendFunc_GenChamfInv.cxx index 7ddfe41456..b4bc7633a5 100644 --- a/src/BlendFunc/BlendFunc_GenChamfInv.cxx +++ b/src/BlendFunc/BlendFunc_GenChamfInv.cxx @@ -14,8 +14,6 @@ #include -#include -#include #include #include #include diff --git a/src/BlendFunc/BlendFunc_GenChamfInv.hxx b/src/BlendFunc/BlendFunc_GenChamfInv.hxx index f7a5842794..0d8502c167 100644 --- a/src/BlendFunc/BlendFunc_GenChamfInv.hxx +++ b/src/BlendFunc/BlendFunc_GenChamfInv.hxx @@ -16,7 +16,6 @@ #define _BlendFunc_GenChamfInv_HeaderFile #include -#include #include #include diff --git a/src/BlendFunc/BlendFunc_GenChamfer.cxx b/src/BlendFunc/BlendFunc_GenChamfer.cxx index 3280009a97..54382dfba3 100644 --- a/src/BlendFunc/BlendFunc_GenChamfer.cxx +++ b/src/BlendFunc/BlendFunc_GenChamfer.cxx @@ -12,8 +12,6 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -#include -#include #include #include #include diff --git a/src/BlendFunc/BlendFunc_GenChamfer.hxx b/src/BlendFunc/BlendFunc_GenChamfer.hxx index e7534c5518..79d5f3fadb 100644 --- a/src/BlendFunc/BlendFunc_GenChamfer.hxx +++ b/src/BlendFunc/BlendFunc_GenChamfer.hxx @@ -16,7 +16,6 @@ #define _BlendFunc_GenChamfer_HeaderFile #include -#include #include #include #include diff --git a/src/BlendFunc/BlendFunc_Ruled.cxx b/src/BlendFunc/BlendFunc_Ruled.cxx index e16ba980b5..fe843393bf 100644 --- a/src/BlendFunc/BlendFunc_Ruled.cxx +++ b/src/BlendFunc/BlendFunc_Ruled.cxx @@ -15,8 +15,6 @@ // commercial license or contractual agreement. -#include -#include #include #include #include diff --git a/src/BlendFunc/BlendFunc_RuledInv.cxx b/src/BlendFunc/BlendFunc_RuledInv.cxx index a2a2486480..dbbf6c821d 100644 --- a/src/BlendFunc/BlendFunc_RuledInv.cxx +++ b/src/BlendFunc/BlendFunc_RuledInv.cxx @@ -16,8 +16,6 @@ #include -#include -#include #include #include #include diff --git a/src/BlendFunc/BlendFunc_Tensor.cxx b/src/BlendFunc/BlendFunc_Tensor.cxx index 688fd8817a..6fe5a20459 100644 --- a/src/BlendFunc/BlendFunc_Tensor.cxx +++ b/src/BlendFunc/BlendFunc_Tensor.cxx @@ -18,13 +18,10 @@ #include #include #include -#include -#include -#include BlendFunc_Tensor::BlendFunc_Tensor(const Standard_Integer NbRow, - const Standard_Integer NbCol, - const Standard_Integer NbMat) : + const Standard_Integer NbCol, + const Standard_Integer NbMat) : Tab(1,NbRow*NbMat*NbCol), nbrow( NbRow ), nbcol( NbCol ), diff --git a/src/BlendFunc/BlendFunc_Tensor.hxx b/src/BlendFunc/BlendFunc_Tensor.hxx index 384112c405..8e4a5b6118 100644 --- a/src/BlendFunc/BlendFunc_Tensor.hxx +++ b/src/BlendFunc/BlendFunc_Tensor.hxx @@ -22,8 +22,6 @@ #include #include -#include -#include #include class math_Matrix; diff --git a/src/Bnd/Bnd_B2f.hxx b/src/Bnd/Bnd_B2f.hxx index 6b7a02d533..b17eb19d0f 100644 --- a/src/Bnd/Bnd_B2f.hxx +++ b/src/Bnd/Bnd_B2f.hxx @@ -22,9 +22,7 @@ #include #include -#include #include -#include class gp_XY; class gp_Pnt2d; class gp_Trsf2d; diff --git a/src/Bnd/Bnd_B3f.hxx b/src/Bnd/Bnd_B3f.hxx index e391590881..d534865594 100644 --- a/src/Bnd/Bnd_B3f.hxx +++ b/src/Bnd/Bnd_B3f.hxx @@ -19,12 +19,7 @@ #include #include -#include -#include -#include -#include -#include class gp_XYZ; class gp_Pnt; class gp_Trsf; diff --git a/src/Bnd/Bnd_BoundSortBox.hxx b/src/Bnd/Bnd_BoundSortBox.hxx index 18f26a8027..b83e4f5663 100644 --- a/src/Bnd/Bnd_BoundSortBox.hxx +++ b/src/Bnd/Bnd_BoundSortBox.hxx @@ -23,7 +23,6 @@ #include #include -#include #include #include #include diff --git a/src/Bnd/Bnd_BoundSortBox2d.cxx b/src/Bnd/Bnd_BoundSortBox2d.cxx index a639b3ccc8..d5eaec691a 100644 --- a/src/Bnd/Bnd_BoundSortBox2d.cxx +++ b/src/Bnd/Bnd_BoundSortBox2d.cxx @@ -22,7 +22,6 @@ #include #include #include -#include //======================================================================= //function : Bnd_BoundSortBox2d diff --git a/src/Bnd/Bnd_BoundSortBox2d.hxx b/src/Bnd/Bnd_BoundSortBox2d.hxx index 121aa1f1d5..20c06219bd 100644 --- a/src/Bnd/Bnd_BoundSortBox2d.hxx +++ b/src/Bnd/Bnd_BoundSortBox2d.hxx @@ -21,9 +21,7 @@ #include #include -#include #include -#include #include #include #include diff --git a/src/Bnd/Bnd_Box.cxx b/src/Bnd/Bnd_Box.cxx index 0b09e26cf3..fb0c1495fa 100644 --- a/src/Bnd/Bnd_Box.cxx +++ b/src/Bnd/Bnd_Box.cxx @@ -16,7 +16,6 @@ #include #include -#include #include #include #include @@ -27,7 +26,6 @@ #define ClearVoidFlag() ( Flags &= ~VoidMask ) #include -#include // #include #define Bnd_Precision_Infinite 1e+100 diff --git a/src/Bnd/Bnd_Box.hxx b/src/Bnd/Bnd_Box.hxx index a260fd4ef2..9080207e0f 100644 --- a/src/Bnd/Bnd_Box.hxx +++ b/src/Bnd/Bnd_Box.hxx @@ -23,7 +23,6 @@ #include #include -#include #include class gp_Pnt; class gp_Dir; diff --git a/src/Bnd/Bnd_Box2d.cxx b/src/Bnd/Bnd_Box2d.cxx index de882d94bb..0790c51dd1 100644 --- a/src/Bnd/Bnd_Box2d.cxx +++ b/src/Bnd/Bnd_Box2d.cxx @@ -16,7 +16,6 @@ #include -#include #include #include #include diff --git a/src/Bnd/Bnd_HArray1OfBox2d.hxx b/src/Bnd/Bnd_HArray1OfBox2d.hxx index 067d23bb67..5a56bdc99e 100644 --- a/src/Bnd/Bnd_HArray1OfBox2d.hxx +++ b/src/Bnd/Bnd_HArray1OfBox2d.hxx @@ -17,7 +17,6 @@ #ifndef Bnd_HArray1OfBox2d_HeaderFile #define Bnd_HArray1OfBox2d_HeaderFile -#include #include #include diff --git a/src/Bnd/Bnd_HArray1OfSphere.hxx b/src/Bnd/Bnd_HArray1OfSphere.hxx index d62de7c2a1..2e31665200 100644 --- a/src/Bnd/Bnd_HArray1OfSphere.hxx +++ b/src/Bnd/Bnd_HArray1OfSphere.hxx @@ -17,7 +17,6 @@ #ifndef Bnd_HArray1OfSphere_HeaderFile #define Bnd_HArray1OfSphere_HeaderFile -#include #include #include diff --git a/src/Bnd/Bnd_OBB.hxx b/src/Bnd/Bnd_OBB.hxx index 54b65f87ee..2b2c0fc74c 100644 --- a/src/Bnd/Bnd_OBB.hxx +++ b/src/Bnd/Bnd_OBB.hxx @@ -19,8 +19,6 @@ #include #include #include -#include -#include #include #include diff --git a/src/Bnd/Bnd_Range.hxx b/src/Bnd/Bnd_Range.hxx index 660fbe5ee0..6898bde0b6 100644 --- a/src/Bnd/Bnd_Range.hxx +++ b/src/Bnd/Bnd_Range.hxx @@ -16,7 +16,6 @@ #ifndef _Bnd_Range_HeaderFile #define _Bnd_Range_HeaderFile -#include #include #include diff --git a/src/Bnd/Bnd_Sphere.hxx b/src/Bnd/Bnd_Sphere.hxx index da98f4a5e9..04b3e4f9f6 100644 --- a/src/Bnd/Bnd_Sphere.hxx +++ b/src/Bnd/Bnd_Sphere.hxx @@ -23,7 +23,6 @@ #include #include #include -#include //! This class represents a bounding sphere of a geometric entity diff --git a/src/BndLib/BndLib.cxx b/src/BndLib/BndLib.cxx index fc742cab2b..67f372816f 100644 --- a/src/BndLib/BndLib.cxx +++ b/src/BndLib/BndLib.cxx @@ -19,8 +19,6 @@ #include #include #include -#include -#include #include #include #include @@ -31,8 +29,6 @@ #include #include #include -#include -#include #include #include #include diff --git a/src/BndLib/BndLib_Add2dCurve.cxx b/src/BndLib/BndLib_Add2dCurve.cxx index 8bf76191f8..ad454b8a94 100644 --- a/src/BndLib/BndLib_Add2dCurve.cxx +++ b/src/BndLib/BndLib_Add2dCurve.cxx @@ -32,7 +32,6 @@ #include #include #include -#include #include #include #include diff --git a/src/BndLib/BndLib_Add2dCurve.hxx b/src/BndLib/BndLib_Add2dCurve.hxx index f0554be897..5d8b6a3231 100644 --- a/src/BndLib/BndLib_Add2dCurve.hxx +++ b/src/BndLib/BndLib_Add2dCurve.hxx @@ -21,7 +21,6 @@ #include #include -#include class Adaptor2d_Curve2d; class Bnd_Box2d; class Geom2d_Curve; diff --git a/src/BndLib/BndLib_Add3dCurve.cxx b/src/BndLib/BndLib_Add3dCurve.cxx index c313521212..e26d6a93f1 100644 --- a/src/BndLib/BndLib_Add3dCurve.cxx +++ b/src/BndLib/BndLib_Add3dCurve.cxx @@ -13,26 +13,17 @@ // commercial license or contractual agreement. -#include #include #include #include #include #include #include -#include #include -#include -#include -#include -#include -#include #include #include #include -#include #include -#include #include #include #include diff --git a/src/BndLib/BndLib_Add3dCurve.hxx b/src/BndLib/BndLib_Add3dCurve.hxx index 1e7372de68..286682bf19 100644 --- a/src/BndLib/BndLib_Add3dCurve.hxx +++ b/src/BndLib/BndLib_Add3dCurve.hxx @@ -19,9 +19,7 @@ #include #include -#include -#include // class Adaptor3d_Curve; class Bnd_Box; diff --git a/src/BndLib/BndLib_AddSurface.cxx b/src/BndLib/BndLib_AddSurface.cxx index f36c72749b..fa219167fb 100644 --- a/src/BndLib/BndLib_AddSurface.cxx +++ b/src/BndLib/BndLib_AddSurface.cxx @@ -21,7 +21,6 @@ #include #include #include -#include #include #include #include @@ -29,17 +28,12 @@ #include #include #include -#include #include -#include #include #include #include #include -#include -#include #include -#include #include // static Standard_Integer NbUSamples(const Adaptor3d_Surface& S, diff --git a/src/BndLib/BndLib_AddSurface.hxx b/src/BndLib/BndLib_AddSurface.hxx index 205010c8d1..0dc98c33b9 100644 --- a/src/BndLib/BndLib_AddSurface.hxx +++ b/src/BndLib/BndLib_AddSurface.hxx @@ -19,9 +19,7 @@ #include #include -#include -#include class Adaptor3d_Surface; class Bnd_Box; From 2ac4e1beee073adcde693f9e1d18338db22317c0 Mon Sep 17 00:00:00 2001 From: asuraven Date: Mon, 20 Dec 2021 19:27:09 +0300 Subject: [PATCH 183/639] 0032744: Modeling Algorithms - Endless loop in GCPnts_UniformDeflection fixed finish criteria in CPnts_UniformDeflection::Perform() --- src/CPnts/CPnts_UniformDeflection.cxx | 228 +++++++++++++++----------- src/QABugs/QABugs_20.cxx | 41 +++++ tests/bugs/modalg_7/bug32744 | 9 + 3 files changed, 181 insertions(+), 97 deletions(-) create mode 100644 tests/bugs/modalg_7/bug32744 diff --git a/src/CPnts/CPnts_UniformDeflection.cxx b/src/CPnts/CPnts_UniformDeflection.cxx index d58cfbcf98..d3d6225688 100644 --- a/src/CPnts/CPnts_UniformDeflection.cxx +++ b/src/CPnts/CPnts_UniformDeflection.cxx @@ -89,139 +89,173 @@ static void D22d(const Standard_Address C, const Standard_Real U, void CPnts_UniformDeflection::Perform() { gp_Pnt P, P1, P2; -// gp_Vec V1, V2, VV1, VV2, VV; gp_Vec V1, V2, VV; Standard_Real Un1; Standard_Real NormD1, NormD2; myIPoint = -1; myNbPoints = -1; - - while ( (myNbPoints<2) && (!myFinish) ) { - - myNbPoints = myNbPoints + 1; + + const Standard_Real anEspilon = Epsilon(myFirstParam); + + while ( (myNbPoints<2) && (!myFinish) ) + { + ++myNbPoints; myParams[myNbPoints] = myFirstParam; if (my3d) + { D23d(myCurve, myFirstParam, myPoints[myNbPoints], V1, V2); + } else + { D22d(myCurve, myFirstParam, myPoints[myNbPoints], V1, V2); - P = myPoints[myNbPoints] ; + } + P = myPoints[myNbPoints]; NormD1 = V1.Magnitude(); - if (NormD1 < myTolCur || V2.Magnitude() < myTolCur) { + if (NormD1 < myTolCur || V2.Magnitude() < myTolCur) + { // singularity on the tangent or null curvature myDu = Min(myDwmax, 1.5 * myDu); } - else { + else + { NormD2 = V2.CrossMagnitude(V1); - if (NormD2 / NormD1 < myDeflection) { // collinearity of derivatives - myDu = Min(myDwmax, 1.5 * myDu); + if (NormD2 / NormD1 < myDeflection) + { + // collinearity of derivatives + myDu = Min(myDwmax, 1.5 * myDu); } - else { - myDu = Sqrt(8.* myDeflection * NormD1 / NormD2 ); - myDu = Min(Max(myDu, myTolCur), myDwmax); + else + { + myDu = Sqrt(8.* myDeflection * NormD1 / NormD2); + myDu = Min(Max(myDu, myTolCur), myDwmax); } } // check if the arrow is observed if WithControl - - if (myControl) { + if (myControl) + { myDu = Min(myDu, myLastParam-myFirstParam); - if (my3d) { - - D03d(myCurve, myFirstParam + myDu,P); - D03d(myCurve, myFirstParam + (myDu / 2.0),P1); + if (my3d) + { + D03d(myCurve, myFirstParam + myDu,P); + D03d(myCurve, myFirstParam + (myDu / 2.0), P1); } - else { - - D02d(myCurve, myFirstParam + myDu,P); - D02d(myCurve, myFirstParam + (myDu / 2.0),P1); + else + { + D02d(myCurve, myFirstParam + myDu,P); + D02d(myCurve, myFirstParam + (myDu / 2.0), P1); } V1= gp_Vec(myPoints[myNbPoints], P); NormD1 = V1.Magnitude(); - if (NormD1 >= myDeflection) { - V2 = gp_Vec(myPoints[myNbPoints], P1); - NormD2 = V2.CrossMagnitude(V1) / NormD1; - - // passing of arrow starting from which the redivision is done is arbitrary - // probably it will be necessary to readjust it (differentiate the first point - // from the others) this test does not work on the points of inflexion - - if (NormD2 > myDeflection / 5.0) { - NormD2 = Max(NormD2, 1.1 * myDeflection); - myDu = myDu * Sqrt(myDeflection / NormD2); - myDu = Min(Max(myDu, myTolCur), myDwmax); - } + if (NormD1 >= myDeflection) + { + V2 = gp_Vec(myPoints[myNbPoints], P1); + NormD2 = V2.CrossMagnitude(V1) / NormD1; + + // passing of arrow starting from which the redivision is done is arbitrary + // probably it will be necessary to readjust it (differentiate the first point + // from the others) this test does not work on the points of inflexion + if (NormD2 > myDeflection / 5.0) + { + NormD2 = Max(NormD2, 1.1 * myDeflection); + myDu = myDu * Sqrt(myDeflection / NormD2); + myDu = Min(Max(myDu, myTolCur), myDwmax); + } } } - myFirstParam = myFirstParam + myDu; - myFinish = (myLastParam - myFirstParam < myTolCur) || (myDu == 0.); + myFirstParam += myDu; + myFinish = myLastParam - myFirstParam < myTolCur || + Abs(myDu) < myTolCur || + // to avoid less than double precision endless increment + myDu < anEspilon; } - if (myFinish) { + if (myFinish) + { // the last point is corrected if control - if (myControl && (myNbPoints == 1) ) { + if (myControl && (myNbPoints == 1) ) + { Un1 = myParams[0]; - if (myLastParam - Un1 < 0.33*(myLastParam-myFirstParam)) { - myFirstParam = (myLastParam + Un1) / 2.0; - myParams[0]= myFirstParam; - myParams[1]= myLastParam; - if (my3d) { - D03d(myCurve, myParams[0], myPoints[0]); - D03d(myCurve, myParams[1], myPoints[1]); - } - else { - D02d(myCurve, myParams[0], myPoints[0]); + if (myLastParam - Un1 < 0.33*(myLastParam-myFirstParam)) + { + myFirstParam = (myLastParam + Un1) / 2.0; + myParams[0] = myFirstParam; + myParams[1] = myLastParam; + if (my3d) + { + D03d(myCurve, myParams[0], myPoints[0]); + D03d(myCurve, myParams[1], myPoints[1]); + } + else + { + D02d(myCurve, myParams[0], myPoints[0]); D02d(myCurve, myParams[1], myPoints[1]); - } + } } - else { - if (my3d) { - D23d(myCurve, myLastParam, P1, V1, V2); - } - else { - D22d(myCurve, myLastParam, P1, V1, V2); - } - P = myPoints[0] ; - VV = gp_Vec(P1, P); - NormD1 = VV.Magnitude(); - if ( NormD1 < myDeflection) { - myParams[1]= myLastParam; - myPoints[1]= P1 ; - } - else { - myFirstParam = (myLastParam * (myParams[1] - Un1) + Un1 * myDu) - /(myFirstParam -Un1); - if (my3d) - D03d(myCurve, myFirstParam, P2); - else - D02d(myCurve, myFirstParam, P2); - - if ((VV.CrossMagnitude(gp_Vec(P2, P)) / NormD1 < myDeflection) && - (Un1 >= myLastParam - myDwmax) ) { - // point n is removed - myParams[1]= myLastParam; - myPoints[1] = P1 ; - } - else { - myParams[1]=myFirstParam; - myPoints[1] = P2 ; - myParams[2]=myLastParam; - myPoints[2] = P1 ; - myNbPoints = myNbPoints +1; - } - } + else + { + if (my3d) + { + D23d(myCurve, myLastParam, P1, V1, V2); + } + else + { + D22d(myCurve, myLastParam, P1, V1, V2); + } + P = myPoints[0]; + VV = gp_Vec(P1, P); + NormD1 = VV.Magnitude(); + if (NormD1 < myDeflection) + { + myParams[1] = myLastParam; + myPoints[1] = P1; + } + else + { + myFirstParam = (myLastParam * (myParams[1] - Un1) + Un1 * myDu) / (myFirstParam - Un1); + if (my3d) + { + D03d(myCurve, myFirstParam, P2); + } + else + { + D02d(myCurve, myFirstParam, P2); + } + if ((VV.CrossMagnitude(gp_Vec(P2, P)) / NormD1 < myDeflection) && + (Un1 >= myLastParam - myDwmax) ) + { + // point n is removed + myParams[1] = myLastParam; + myPoints[1] = P1; + } + else + { + myParams[1] = myFirstParam; + myPoints[1] = P2; + myParams[2] = myLastParam; + myPoints[2] = P1; + ++myNbPoints; + } + } } } - else { - myNbPoints = myNbPoints +1 ; - if (myNbPoints >= 3) myNbPoints = 2; - myParams[myNbPoints]= myLastParam; - if (my3d) { - D03d(myCurve, myLastParam, myPoints[myNbPoints]); - } - else { - D02d(myCurve, myLastParam, myPoints[myNbPoints]); - } + else + { + ++myNbPoints; + if (myNbPoints >= 3) + { + myNbPoints = 2; + } + myParams[myNbPoints] = myLastParam; + if (my3d) + { + D03d(myCurve, myLastParam, myPoints[myNbPoints]); + } + else + { + D02d(myCurve, myLastParam, myPoints[myNbPoints]); + } } } } diff --git a/src/QABugs/QABugs_20.cxx b/src/QABugs/QABugs_20.cxx index 4647e76614..4248cd2b2e 100644 --- a/src/QABugs/QABugs_20.cxx +++ b/src/QABugs/QABugs_20.cxx @@ -4148,6 +4148,41 @@ static Standard_Integer OCC29406 (Draw_Interpretor&, Standard_Integer, const cha return 0; } +#include +#include +static Standard_Integer OCC32744(Draw_Interpretor& theDi, Standard_Integer theNbArgs, const char** theArgVec) +{ + if (theNbArgs != 2) + { + theDi << "Syntax error: wrong number of arguments!\n"; + return 1; + } + + const TopoDS_Shape& aShape = DBRep::Get(theArgVec[1]); + if (aShape.IsNull()) + { + theDi << " Null Shape is not allowed here\n"; + return 1; + } + else if (aShape.ShapeType() != TopAbs_EDGE) + { + theDi << " Shape type must be EDGE\n"; + return 1; + } + + const TopoDS_Edge& anEdge = TopoDS::Edge(aShape); + BRepCheck_Analyzer analyzer(anEdge); + if (analyzer.IsValid()) + { + Standard_Real firstParam = 0., lastParam = 0.; + Handle(Geom_Curve) pCurve = BRep_Tool::Curve(anEdge, firstParam, lastParam); + GeomAdaptor_Curve curveAdaptor(pCurve, firstParam, lastParam); + GCPnts_UniformDeflection uniformAbs(curveAdaptor, 0.001, firstParam, lastParam); + } + + return 0; +} + void QABugs::Commands_20(Draw_Interpretor& theCommands) { const char *group = "QABugs"; @@ -4234,5 +4269,11 @@ void QABugs::Commands_20(Draw_Interpretor& theCommands) { theCommands.Add ("OCC29406", "Tests the case when newly set axis for gp_Ax3 is parallel to one of current axis", __FILE__, OCC29406, group); + + theCommands.Add("OCC32744", + "Tests avoid Endless loop in GCPnts_UniformDeflection", + __FILE__, + OCC32744, group); + return; } diff --git a/tests/bugs/modalg_7/bug32744 b/tests/bugs/modalg_7/bug32744 new file mode 100644 index 0000000000..17b37f1e10 --- /dev/null +++ b/tests/bugs/modalg_7/bug32744 @@ -0,0 +1,9 @@ +puts "=================================================" +puts "0032744: Modeling Algorithms -Endless loop in GCPnts_UniformDeflection" +puts "=================================================" +puts "" + +pload QAcommands +# test execution time must be within the cpulimit +restore [locate_data_file bug32744.brep] s +OCC32744 s \ No newline at end of file From 16a263dc17600ac13a5110bd7028ba558d1a0700 Mon Sep 17 00:00:00 2001 From: achesnok Date: Fri, 15 Oct 2021 01:50:13 +0300 Subject: [PATCH 184/639] 0032606: Visualization - add a shader for sky V3d_View::BackgroundSkydome() Introduced V3d_View::SkydomeAspect() property for generating skydome cubemap environment. Skydome features: day/night cycle, 2 types of clouds, atmosphere, water surface, stars, fog. --- src/Aspect/Aspect_SkydomeBackground.cxx | 99 ++++++ src/Aspect/Aspect_SkydomeBackground.hxx | 104 +++++++ src/Aspect/FILES | 2 + src/Graphic3d/Graphic3d_CView.cxx | 21 ++ src/Graphic3d/Graphic3d_CView.hxx | 10 + src/Graphic3d/Graphic3d_ShaderManager.cxx | 38 +++ src/Graphic3d/Graphic3d_ShaderManager.hxx | 3 + src/OpenGl/OpenGl_ShaderManager.cxx | 13 + src/OpenGl/OpenGl_ShaderManager.hxx | 4 + src/OpenGl/OpenGl_View.cxx | 111 ++++++- src/OpenGl/OpenGl_View.hxx | 8 +- src/Shaders/FILES | 2 + src/Shaders/Shaders_SkydomBackground_fs.pxx | 303 +++++++++++++++++++ src/Shaders/SkydomBackground.fs | 300 ++++++++++++++++++ src/V3d/V3d_View.cxx | 10 + src/V3d/V3d_View.hxx | 9 + src/ViewerTest/ViewerTest_ViewerCommands.cxx | 59 ++++ tests/opengl/data/background/skydome | 43 +++ 18 files changed, 1133 insertions(+), 6 deletions(-) create mode 100644 src/Aspect/Aspect_SkydomeBackground.cxx create mode 100644 src/Aspect/Aspect_SkydomeBackground.hxx create mode 100644 src/Shaders/Shaders_SkydomBackground_fs.pxx create mode 100644 src/Shaders/SkydomBackground.fs create mode 100644 tests/opengl/data/background/skydome diff --git a/src/Aspect/Aspect_SkydomeBackground.cxx b/src/Aspect/Aspect_SkydomeBackground.cxx new file mode 100644 index 0000000000..8fd3cc031f --- /dev/null +++ b/src/Aspect/Aspect_SkydomeBackground.cxx @@ -0,0 +1,99 @@ +// Created on: 2021-10-14 +// Created by: Artem CHESNOKOV +// Copyright (c) 2021 OPEN CASCADE SAS +// +// This file is part of Open CASCADE Technology software library. +// +// This library is free software; you can redistribute it and/or modify it under +// the terms of the GNU Lesser General Public License version 2.1 as published +// by the Free Software Foundation, with special exception defined in the file +// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT +// distribution for complete text of the license and disclaimer of any warranty. +// +// Alternatively, this file may be used under the terms of Open CASCADE +// commercial license or contractual agreement. + +#include + +#include + +// ======================================================================= +// function : Constructor +// purpose : +// ======================================================================= +Aspect_SkydomeBackground::Aspect_SkydomeBackground() +: mySunDirection (0.0f, 1.0f, 0.0f), + myCloudiness (0.2f), + myTime (0.0f), + myFogginess (0.0f), + mySize (512) +{ + // +} + +// ======================================================================= +// function : Constructor +// purpose : +// ======================================================================= +Aspect_SkydomeBackground::Aspect_SkydomeBackground (const gp_Dir& theSunDirection, Standard_ShortReal theCloudiness, + Standard_ShortReal theTime, Standard_ShortReal theFogginess, Standard_Integer theSize) + : mySunDirection (theSunDirection), myCloudiness (theCloudiness), myTime (theTime), myFogginess (theFogginess), mySize (theSize) +{ + Standard_RangeError_Raise_if (theFogginess < 0, "Aspect_SkydomeBackground::Aspect_SkydomeBackground() theFoggines must be >= 0"); + Standard_RangeError_Raise_if (theCloudiness < 0, "Aspect_SkydomeBackground::Aspect_SkydomeBackground() theCloudiness must be >= 0"); + Standard_RangeError_Raise_if (theSize <= 0, "Aspect_SkydomeBackground::Aspect_SkydomeBackground() theSize must be > 0"); +} + +// ======================================================================= +// function : ~Aspect_SkydomeBackground +// purpose : +// ======================================================================= +Aspect_SkydomeBackground::~Aspect_SkydomeBackground() +{ + // +} + +// ======================================================================= +// function : SetCloudiness +// purpose : +// ======================================================================= +void Aspect_SkydomeBackground::SetCloudiness (Standard_ShortReal theCloudiness) +{ + Standard_RangeError_Raise_if (theCloudiness < 0, "Aspect_SkydomeBackground::SetCloudiness() theCloudiness must be >= 0"); + myCloudiness = theCloudiness; +} + +// ======================================================================= +// function : SetFogginess +// purpose : +// ======================================================================= +void Aspect_SkydomeBackground::SetFogginess (Standard_ShortReal theFogginess) +{ + Standard_RangeError_Raise_if (theFogginess < 0, "Aspect_SkydomeBackground::SetFogginess() theFoggines must be >= 0"); + myFogginess = theFogginess; +} + +// ======================================================================= +// function : SetSize +// purpose : +// ======================================================================= +void Aspect_SkydomeBackground::SetSize (Standard_Integer theSize) +{ + Standard_RangeError_Raise_if (theSize <= 0, "Aspect_SkydomeBackground::SetSize() theSize must be > 0"); + mySize = theSize; +} + +// ======================================================================= +// function : DumpJson +// purpose : +// ======================================================================= +void Aspect_SkydomeBackground::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const +{ + OCCT_DUMP_CLASS_BEGIN (theOStream, Aspect_GradientBackground) + + OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &mySunDirection) + OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myTime) + OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myFogginess) + OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myCloudiness) + OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, mySize) +} diff --git a/src/Aspect/Aspect_SkydomeBackground.hxx b/src/Aspect/Aspect_SkydomeBackground.hxx new file mode 100644 index 0000000000..52eff71c17 --- /dev/null +++ b/src/Aspect/Aspect_SkydomeBackground.hxx @@ -0,0 +1,104 @@ +// Created on: 2021-10-14 +// Created by: Artem CHESNOKOV +// Copyright (c) 2021 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 _Aspect_SkydomeBackground_Header +#define _Aspect_SkydomeBackground_Header + +#include +#include +#include +#include +#include + +//! This class allows the definition of a window skydome background. +class Aspect_SkydomeBackground +{ +public: + + DEFINE_STANDARD_ALLOC + + //! Creates a window skydome background. + //! By default skydome is initialized with sun at its zenith (0.0, 1.0, 0.0), + //! average clody (0.2), zero time parameter, zero fogginess, 512x512 texture size. + Standard_EXPORT Aspect_SkydomeBackground(); + + //! Creates a window skydome background with given parameters. + //! @param[in] theSunDirection direction to the sun (moon). Sun direction with negative Y component + //! represents moon with (-X, -Y, -Z) direction. + //! @param[in] theCloudiness cloud intensity, 0.0 means no clouds at all and 1.0 - high clody. + //! @param[in] theTime time parameter of simulation. Might be tweaked to slightly change appearance. + //! @param[in] theFogginess fog intensity, 0.0 means no fog and 1.0 - high fogginess + //! @param[in] theSize size of cubemap side in pixels. + Standard_EXPORT Aspect_SkydomeBackground (const gp_Dir& theSunDirection, + Standard_ShortReal theCloudiness, + Standard_ShortReal theTime, + Standard_ShortReal theFogginess, + Standard_Integer theSize); + + //! Destructor. + Standard_EXPORT ~Aspect_SkydomeBackground(); + + //! Get sun direction. By default this value is (0, 1, 0) + //! Sun direction with negative Y component represents moon with (-X, -Y, -Z) direction. + const gp_Dir& SunDirection() const { return mySunDirection; } + + //! Get cloud intensity. By default this value is 0.2 + //! 0.0 means no clouds at all and 1.0 - high clody. + Standard_ShortReal Cloudiness() const { return myCloudiness; } + + //! Get time of cloud simulation. By default this value is 0.0 + //! This value might be tweaked to slightly change appearance of clouds. + Standard_ShortReal TimeParameter() const { return myTime; } + + //! Get fog intensity. By default this value is 0.0 + //! 0.0 means no fog and 1.0 - high fogginess + Standard_ShortReal Fogginess() const { return myFogginess; } + + //! Get size of cubemap. By default this value is 512 + Standard_Integer Size() const { return mySize; } + + //! Set sun direction. By default this value is (0, 1, 0) + //! Sun direction with negative Y component represents moon with (-X, -Y, -Z) direction. + void SetSunDirection (const gp_Dir& theSunDirection) { mySunDirection = theSunDirection; } + + //! Set cloud intensity. By default this value is 0.2 + //! 0.0 means no clouds at all and 1.0 - high clody. + Standard_EXPORT void SetCloudiness (Standard_ShortReal theCloudiness); + + //! Set time of cloud simulation. By default this value is 0.0 + //! This value might be tweaked to slightly change appearance of clouds. + void SetTimeParameter (Standard_ShortReal theTime) { myTime = theTime; } + + //! Set fog intensity. By default this value is 0.0 + //! 0.0 means no fog and 1.0 - high fogginess + Standard_EXPORT void SetFogginess (Standard_ShortReal theFogginess); + + //! Set size of cubemap. By default this value is 512 + Standard_EXPORT void SetSize (Standard_Integer theSize); + + //! Dumps the content of me into the stream + Standard_EXPORT void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const; + +private: + + gp_Dir mySunDirection; //!< Sun (moon) light direction. + Standard_ShortReal myCloudiness; //!< Cloud intensity. + Standard_ShortReal myTime; //!< Simulation time parameter. + Standard_ShortReal myFogginess; //!< Fog intensity + Standard_Integer mySize; //!< Size of cubemap in pixels + +}; + +#endif // _Aspect_SkydomeBackground_Header diff --git a/src/Aspect/FILES b/src/Aspect/FILES index 492dcb79a4..b1c7fa3f98 100755 --- a/src/Aspect/FILES +++ b/src/Aspect/FILES @@ -40,6 +40,8 @@ Aspect_RectangularGrid.hxx Aspect_RenderingContext.hxx Aspect_SequenceOfColor.hxx Aspect_ScrollDelta.hxx +Aspect_SkydomeBackground.cxx +Aspect_SkydomeBackground.hxx Aspect_Touch.hxx Aspect_TouchMap.hxx Aspect_TrackedDevicePose.hxx diff --git a/src/Graphic3d/Graphic3d_CView.cxx b/src/Graphic3d/Graphic3d_CView.cxx index a97efe8692..07077415ff 100644 --- a/src/Graphic3d/Graphic3d_CView.cxx +++ b/src/Graphic3d/Graphic3d_CView.cxx @@ -14,6 +14,7 @@ #include #include +#include #include #include #include @@ -27,6 +28,7 @@ IMPLEMENT_STANDARD_RTTIEXT(Graphic3d_CView,Graphic3d_DataStructureManager) Graphic3d_CView::Graphic3d_CView (const Handle(Graphic3d_StructureManager)& theMgr) : myBgColor (Quantity_NOC_BLACK), myBackgroundType (Graphic3d_TOB_NONE), + myToUpdateSkydome (Standard_False), myStructureManager (theMgr), myCamera (new Graphic3d_Camera()), myHiddenObjects (new Graphic3d_NMapOfTransient()), @@ -53,6 +55,25 @@ Graphic3d_CView::~Graphic3d_CView() } } +// ======================================================================= +// function : SetBackgroundSkydome +// purpose : +// ======================================================================= +void Graphic3d_CView::SetBackgroundSkydome (const Aspect_SkydomeBackground& theAspect, + Standard_Boolean theToUpdatePBREnv) +{ + myToUpdateSkydome = true; + mySkydomeAspect = theAspect; + myCubeMapBackground = new Graphic3d_CubeMapPacked (""); + SetBackgroundType (Graphic3d_TOB_CUBEMAP); + if (theToUpdatePBREnv + && !myCubeMapIBL.IsNull()) + { + SetImageBasedLighting (false); + SetImageBasedLighting (true); + } +} + // ======================================================================= // function : Activate // purpose : diff --git a/src/Graphic3d/Graphic3d_CView.hxx b/src/Graphic3d/Graphic3d_CView.hxx index f7c0121a1e..43e3675fc3 100644 --- a/src/Graphic3d/Graphic3d_CView.hxx +++ b/src/Graphic3d/Graphic3d_CView.hxx @@ -16,6 +16,7 @@ #include #include +#include #include #include #include @@ -396,6 +397,13 @@ public: //! Sets background type. void SetBackgroundType (Graphic3d_TypeOfBackground theType) { myBackgroundType = theType; } + //! Returns skydome aspect; + const Aspect_SkydomeBackground& BackgroundSkydome() const { return mySkydomeAspect; } + + //! Sets skydome aspect + Standard_EXPORT void SetBackgroundSkydome (const Aspect_SkydomeBackground& theAspect, + Standard_Boolean theToUpdatePBREnv = Standard_True); + //! Enables or disables IBL (Image Based Lighting) from background cubemap. //! Has no effect if PBR is not used. //! @param[in] theToEnableIBL enable or disable IBL from background cubemap @@ -574,6 +582,8 @@ protected: Handle(Graphic3d_CubeMap) myCubeMapIBL; //!< Cubemap used for environment lighting Handle(Graphic3d_TextureEnv) myTextureEnvData; Graphic3d_TypeOfBackground myBackgroundType; //!< Current type of background + Aspect_SkydomeBackground mySkydomeAspect; + Standard_Boolean myToUpdateSkydome; Handle(Graphic3d_StructureManager) myStructureManager; Handle(Graphic3d_Camera) myCamera; diff --git a/src/Graphic3d/Graphic3d_ShaderManager.cxx b/src/Graphic3d/Graphic3d_ShaderManager.cxx index d6dfb378b5..b553462225 100644 --- a/src/Graphic3d/Graphic3d_ShaderManager.cxx +++ b/src/Graphic3d/Graphic3d_ShaderManager.cxx @@ -32,6 +32,7 @@ #include "../Shaders/Shaders_PhongPointLight_glsl.pxx" #include "../Shaders/Shaders_PhongSpotLight_glsl.pxx" #include "../Shaders/Shaders_PointLightAttenuation_glsl.pxx" +#include "../Shaders/Shaders_SkydomBackground_fs.pxx" #include "../Shaders/Shaders_TangentSpaceNormal_glsl.pxx" IMPLEMENT_STANDARD_RTTIEXT(Graphic3d_ShaderManager, Standard_Transient) @@ -2094,6 +2095,43 @@ Handle(Graphic3d_ShaderProgram) Graphic3d_ShaderManager::getBgCubeMapProgram() c return aProgSrc; } +// ======================================================================= +// function : getBgSkydomeProgram +// purpose : +// ======================================================================= +Handle(Graphic3d_ShaderProgram) Graphic3d_ShaderManager::getBgSkydomeProgram() const +{ + Handle(Graphic3d_ShaderProgram) aProgSrc = new Graphic3d_ShaderProgram(); + + Graphic3d_ShaderObject::ShaderVariableList aUniforms, aStageInOuts; + aStageInOuts.Append (Graphic3d_ShaderObject::ShaderVariable ("vec2 TexCoord", Graphic3d_TOS_VERTEX | Graphic3d_TOS_FRAGMENT)); + + TCollection_AsciiString aSrcVert = TCollection_AsciiString() + + EOL"void main()" + EOL"{" + EOL" gl_Position = vec4 (occVertex.xy, 0.0, 1.0);" + EOL" TexCoord = 0.5 * gl_Position.xy + vec2 (0.5);" + EOL"}"; + + TCollection_AsciiString aSrcFrag = Shaders_SkydomBackground_fs; + + if (myGapi == Aspect_GraphicsLibrary_OpenGL) + { + aProgSrc->SetHeader ("#version 130"); + } + else if (myGapi == Aspect_GraphicsLibrary_OpenGLES) + { + if (IsGapiGreaterEqual (3, 0)) + { + aProgSrc->SetHeader ("#version 300 es"); + } + } + aProgSrc->AttachShader (Graphic3d_ShaderObject::CreateFromSource (aSrcVert, Graphic3d_TOS_VERTEX, aUniforms, aStageInOuts)); + aProgSrc->AttachShader (Graphic3d_ShaderObject::CreateFromSource (aSrcFrag, Graphic3d_TOS_FRAGMENT, aUniforms, aStageInOuts)); + + return aProgSrc; +} + // ======================================================================= // function : getColoredQuadProgram // purpose : diff --git a/src/Graphic3d/Graphic3d_ShaderManager.hxx b/src/Graphic3d/Graphic3d_ShaderManager.hxx index 0619ea11e7..023b574260 100644 --- a/src/Graphic3d/Graphic3d_ShaderManager.hxx +++ b/src/Graphic3d/Graphic3d_ShaderManager.hxx @@ -142,6 +142,9 @@ protected: //! Generates shader program to render environment cubemap as background. Standard_EXPORT Handle(Graphic3d_ShaderProgram) getBgCubeMapProgram() const; + //! Generates shader program to render skydome background. + Standard_EXPORT Handle(Graphic3d_ShaderProgram) getBgSkydomeProgram() const; + //! Generates shader program to render correctly colored quad. Standard_EXPORT Handle(Graphic3d_ShaderProgram) getColoredQuadProgram() const; diff --git a/src/OpenGl/OpenGl_ShaderManager.cxx b/src/OpenGl/OpenGl_ShaderManager.cxx index 892cc020a5..0023cf89d4 100644 --- a/src/OpenGl/OpenGl_ShaderManager.cxx +++ b/src/OpenGl/OpenGl_ShaderManager.cxx @@ -1374,6 +1374,19 @@ const Handle(Graphic3d_ShaderProgram)& OpenGl_ShaderManager::GetBgCubeMapProgram return myBgCubeMapProgram; } +// ======================================================================= +// function : GetBgSkydomeProgram +// purpose : +// ======================================================================= +const Handle(Graphic3d_ShaderProgram)& OpenGl_ShaderManager::GetBgSkydomeProgram () +{ + if (myBgSkydomeProgram.IsNull()) + { + myBgSkydomeProgram = getBgSkydomeProgram(); + } + return myBgSkydomeProgram; +} + // ======================================================================= // function : GetColoredQuadProgram // purpose : diff --git a/src/OpenGl/OpenGl_ShaderManager.hxx b/src/OpenGl/OpenGl_ShaderManager.hxx index 22cc1b339a..9d9501fd81 100644 --- a/src/OpenGl/OpenGl_ShaderManager.hxx +++ b/src/OpenGl/OpenGl_ShaderManager.hxx @@ -229,6 +229,9 @@ public: //! Generates shader program to render environment cubemap as background. Standard_EXPORT const Handle(Graphic3d_ShaderProgram)& GetBgCubeMapProgram(); + //! Generates shader program to render skydome background. + Standard_EXPORT const Handle(Graphic3d_ShaderProgram)& GetBgSkydomeProgram(); + //! Generates shader program to render correctly colored quad. Standard_EXPORT const Handle(Graphic3d_ShaderProgram)& GetColoredQuadProgram(); @@ -772,6 +775,7 @@ protected: Handle(OpenGl_ShaderProgram) myPBREnvBakingProgram[3]; //!< programs for IBL maps generation used in PBR pipeline (0 for Diffuse; 1 for Specular; 2 for fallback) Handle(Graphic3d_ShaderProgram) myBgCubeMapProgram; //!< program for background cubemap rendering + Handle(Graphic3d_ShaderProgram) myBgSkydomeProgram; //!< program for background cubemap rendering Handle(Graphic3d_ShaderProgram) myColoredQuadProgram; //!< program for correct quad rendering Handle(OpenGl_ShaderProgram) myStereoPrograms[Graphic3d_StereoMode_NB]; //!< standard stereo programs diff --git a/src/OpenGl/OpenGl_View.cxx b/src/OpenGl/OpenGl_View.cxx index f352db0655..99f139e030 100644 --- a/src/OpenGl/OpenGl_View.cxx +++ b/src/OpenGl/OpenGl_View.cxx @@ -998,13 +998,17 @@ void OpenGl_View::drawBackground (const Handle(OpenGl_Workspace)& theWorkspace, if (myBackgroundType == Graphic3d_TOB_CUBEMAP) { - myCubeMapParams->Aspect()->ShaderProgram()->PushVariableInt ("uZCoeff", myCubeMapBackground->ZIsInverted() ? -1 : 1); - myCubeMapParams->Aspect()->ShaderProgram()->PushVariableInt ("uYCoeff", myCubeMapBackground->IsTopDown() ? 1 : -1); - const OpenGl_Aspects* anOldAspectFace = theWorkspace->SetAspects (myCubeMapParams); + updateSkydomeBg (aCtx); + if (!myCubeMapParams->Aspect()->ShaderProgram().IsNull()) + { + myCubeMapParams->Aspect()->ShaderProgram()->PushVariableInt ("uZCoeff", myCubeMapBackground->ZIsInverted() ? -1 : 1); + myCubeMapParams->Aspect()->ShaderProgram()->PushVariableInt ("uYCoeff", myCubeMapBackground->IsTopDown() ? 1 : -1); + const OpenGl_Aspects* anOldAspectFace = theWorkspace->SetAspects (myCubeMapParams); - myBackgrounds[Graphic3d_TOB_CUBEMAP]->Render (theWorkspace, theProjection); + myBackgrounds[Graphic3d_TOB_CUBEMAP]->Render (theWorkspace, theProjection); - theWorkspace->SetAspects (anOldAspectFace); + theWorkspace->SetAspects (anOldAspectFace); + } } else if (myBackgroundType == Graphic3d_TOB_GRADIENT || myBackgroundType == Graphic3d_TOB_TEXTURE) @@ -3080,6 +3084,97 @@ Standard_Boolean OpenGl_View::checkOitCompatibility (const Handle(OpenGl_Context return Standard_False; } +// ======================================================================= +// function : updateSkydomeBg +// purpose : +// ======================================================================= +void OpenGl_View::updateSkydomeBg (const Handle(OpenGl_Context)& theCtx) +{ + if (!myToUpdateSkydome) + { + return; + } + + myToUpdateSkydome = false; + + // Set custom shader + Handle(OpenGl_ShaderProgram) aProg; + Handle(Graphic3d_ShaderProgram) aProxy = theCtx->ShaderManager()->GetBgSkydomeProgram(); + TCollection_AsciiString anUnused; + theCtx->ShaderManager()->Create (aProxy, anUnused, aProg); + Handle(OpenGl_ShaderProgram) aPrevProgram = theCtx->ActiveProgram(); + theCtx->BindProgram (aProg); + + // Setup uniforms + aProg->SetUniform (theCtx, "uSunDir", OpenGl_Vec3((float )mySkydomeAspect.SunDirection().X(), + (float )mySkydomeAspect.SunDirection().Y(), + (float )mySkydomeAspect.SunDirection().Z())); + aProg->SetUniform (theCtx, "uCloudy", mySkydomeAspect.Cloudiness()); + aProg->SetUniform (theCtx, "uTime", mySkydomeAspect.TimeParameter()); + aProg->SetUniform (theCtx, "uFog", mySkydomeAspect.Fogginess()); + + // Create and prepare framebuffer + GLint aPrevFBO = 0; + theCtx->core11fwd->glGetIntegerv (GL_FRAMEBUFFER_BINDING, &aPrevFBO); + GLuint anFBO = 0; + theCtx->arbFBO->glGenFramebuffers (1, &anFBO); + theCtx->arbFBO->glBindFramebuffer (GL_FRAMEBUFFER, anFBO); + + const Standard_Integer anOldViewport[4] = {theCtx->Viewport()[0], theCtx->Viewport()[1], theCtx->Viewport()[2], theCtx->Viewport()[3]}; + const Standard_Integer aViewport[4] = {0, 0, mySkydomeAspect.Size(), mySkydomeAspect.Size()}; + theCtx->ResizeViewport (aViewport); + + // Fullscreen triangle + Handle(OpenGl_VertexBuffer) aVBO = new OpenGl_VertexBuffer(); + const float aTriangle[] = {-1.0, -1.0, 3.0, -1.0, -1.0, 3.0}; + aVBO->Init (theCtx, 2, 3, aTriangle); + aVBO->BindAttribute (theCtx, Graphic3d_TypeOfAttribute::Graphic3d_TOA_POS); + aVBO->Bind (theCtx); + + if (mySkydomeTexture.IsNull()) + { + mySkydomeTexture = new OpenGl_Texture(); + mySkydomeTexture->Sampler()->Parameters()->SetFilter (Graphic3d_TOTF_BILINEAR); + } + if (mySkydomeTexture->SizeX() != mySkydomeAspect.Size()) + { + mySkydomeTexture->Release (theCtx.get()); + mySkydomeTexture->InitCubeMap (theCtx, NULL, mySkydomeAspect.Size(), + Image_Format_RGB, false, false); + } + + // init aspects if needed + if (myCubeMapParams->TextureSet (theCtx).IsNull()) + { + myCubeMapParams->Aspect()->SetInteriorStyle (Aspect_IS_SOLID); + myCubeMapParams->Aspect()->SetFaceCulling (Graphic3d_TypeOfBackfacingModel_DoubleSided); + myCubeMapParams->Aspect()->SetShadingModel (Graphic3d_TypeOfShadingModel_Unlit); + myCubeMapParams->Aspect()->SetShaderProgram (theCtx->ShaderManager()->GetBgCubeMapProgram()); + Handle(Graphic3d_TextureSet) aTextureSet = new Graphic3d_TextureSet (1); + myCubeMapParams->Aspect()->SetTextureSet (aTextureSet); + myCubeMapParams->Aspect()->SetTextureMapOn (true); + myCubeMapParams->SynchronizeAspects(); + } + + myCubeMapParams->Aspect()->ShaderProgram()->PushVariableInt ("uZCoeff", 1); + myCubeMapParams->Aspect()->ShaderProgram()->PushVariableInt ("uYCoeff", 1); + + for (Standard_Integer aSideIter = 0; aSideIter < 6; aSideIter++) + { + aProg->SetUniform (theCtx, "uSide", aSideIter); + theCtx->arbFBO->glFramebufferTexture2D (GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_CUBE_MAP_POSITIVE_X + aSideIter, + mySkydomeTexture->TextureId(), 0); + theCtx->core15->glDrawArrays (GL_TRIANGLES, 0, 3); + } + theCtx->arbFBO->glDeleteFramebuffers (1, &anFBO); + aVBO->Release (theCtx.get()); + + myCubeMapParams->TextureSet (theCtx)->ChangeFirst() = mySkydomeTexture; + theCtx->BindProgram (aPrevProgram); + theCtx->ResizeViewport (anOldViewport); + theCtx->arbFBO->glBindFramebuffer (GL_FRAMEBUFFER, aPrevFBO); +} + // ======================================================================= // function : checkPBRAvailability // purpose : @@ -3096,6 +3191,12 @@ Standard_Boolean OpenGl_View::checkPBRAvailability() const // ======================================================================= void OpenGl_View::updatePBREnvironment (const Handle(OpenGl_Context)& theCtx) { + if (myBackgroundType == Graphic3d_TOB_CUBEMAP + && myToUpdateSkydome) + { + updateSkydomeBg (theCtx); + } + if (myPBREnvState != OpenGl_PBREnvState_CREATED || !myPBREnvRequest) { diff --git a/src/OpenGl/OpenGl_View.hxx b/src/OpenGl/OpenGl_View.hxx index 78367fa9aa..4f5781aa64 100644 --- a/src/OpenGl/OpenGl_View.hxx +++ b/src/OpenGl/OpenGl_View.hxx @@ -379,7 +379,7 @@ protected: //! @name Rendering of GL graphics (with prepared drawing buffer). OpenGl_FrameBuffer* theOitAccumFbo, const Standard_Boolean theToDrawImmediate); - //! Draw background (gradient / image) + //! Draw background (gradient / image / cubemap) Standard_EXPORT virtual void drawBackground (const Handle(OpenGl_Workspace)& theWorkspace, Graphic3d_Camera::Projection theProjection); @@ -507,6 +507,12 @@ protected: //! @name Background parameters OpenGl_Aspects* myColoredQuadParams; //!< Stores parameters for gradient (corner mode) background OpenGl_BackgroundArray* myBackgrounds[Graphic3d_TypeOfBackground_NB]; //!< Array of primitive arrays of different background types Handle(OpenGl_TextureSet) myTextureEnv; + Handle(OpenGl_Texture) mySkydomeTexture; + +protected: //! @name methods related to skydome background + + //! Generates skydome cubemap. + Standard_EXPORT void updateSkydomeBg (const Handle(OpenGl_Context)& theCtx); protected: //! @name methods related to PBR diff --git a/src/Shaders/FILES b/src/Shaders/FILES index e4efc735ae..2a1d29017d 100644 --- a/src/Shaders/FILES +++ b/src/Shaders/FILES @@ -24,6 +24,7 @@ srcinc:::PathtraceBase.fs srcinc:::RaytraceBase.vs srcinc:::RaytraceSmooth.fs srcinc:::TangentSpaceNormal.glsl +srcinc:::SkydomBackground.fs Shaders_Declarations_glsl.pxx Shaders_DeclarationsImpl_glsl.pxx Shaders_DirectionalLightShadow_glsl.pxx @@ -48,3 +49,4 @@ Shaders_PathtraceBase_fs.pxx Shaders_RaytraceBase_vs.pxx Shaders_RaytraceSmooth_fs.pxx Shaders_TangentSpaceNormal_glsl.pxx +Shaders_SkydomBackground_fs.pxx diff --git a/src/Shaders/Shaders_SkydomBackground_fs.pxx b/src/Shaders/Shaders_SkydomBackground_fs.pxx new file mode 100644 index 0000000000..008d1885b0 --- /dev/null +++ b/src/Shaders/Shaders_SkydomBackground_fs.pxx @@ -0,0 +1,303 @@ +// This file has been automatically generated from resource file src/Shaders/SkydomBackground.fs + +static const char Shaders_SkydomBackground_fs[] = + "// Constants\n" + "const float M_PI = 3.1415926535;\n" + "const float THE_EARTH_RADIUS = 6360e3;\n" + "const vec3 THE_EARTH_CENTER = vec3 (0.0, -THE_EARTH_RADIUS, 0.0);\n" + "const float THE_ATMO_RADIUS = 6380e3; // atmosphere radius (6420e3?)\n" + "const float THE_G = 0.76; // anisotropy of the medium (papers use 0.76)\n" + "const float THE_G2 = THE_G * THE_G;\n" + "const float THE_HR = 8000.0; // Thickness of the atmosphere\n" + "const float THE_HM = 1000.0; // Same as above but for Mie\n" + "const vec3 THE_BETA_R = vec3 (5.8e-6, 13.5e-6, 33.1e-6); // Reyleigh scattering normal earth\n" + "const vec3 THE_BETA_M = vec3 (21e-6); // Normal Mie scattering\n" + "\n" + "// Parameters\n" + "const float THE_SunAttenuation = 1.0; // sun intensity\n" + "const float THE_EyeHeight = 100.0; // viewer height\n" + "const float THE_HorizonWidth = 0.002;\n" + "const int THE_NbSamples = 8;\n" + "const int THE_NbSamplesLight = 8; // integral sampling rate (might highly hit performance)\n" + "const float THE_SunPower = 5.0;\n" + "const float THE_StarTreshold = 0.98;\n" + "\n" + "// Uniforms\n" + "uniform vec3 uSunDir;\n" + "uniform float uTime;\n" + "uniform float uCloudy;\n" + "uniform float uFog;\n" + "\n" + "float hash13 (in vec3 p3)\n" + "{\n" + " p3 = fract (p3 * 0.1031);\n" + " p3 += dot (p3, p3.zyx + 31.32);\n" + " return fract ((p3.x + p3.y) * p3.z);\n" + "}\n" + "\n" + "float hash12 (in vec2 p)\n" + "{\n" + " vec3 p3 = fract (vec3(p.xyx) * .1031);\n" + " p3 += dot (p3, p3.yzx + 33.33);\n" + " return fract ((p3.x + p3.y) * p3.z);\n" + "}\n" + "\n" + "float smoothStarField (in vec2 theSamplePos)\n" + "{\n" + " vec2 aFract = fract (theSamplePos);\n" + " vec2 aFloorSample = floor (theSamplePos);\n" + " float v1 = hash12 (aFloorSample);\n" + " float v2 = hash12 (aFloorSample + vec2( 0.0, 1.0 ));\n" + " float v3 = hash12 (aFloorSample + vec2( 1.0, 0.0 ));\n" + " float v4 = hash12 (aFloorSample + vec2( 1.0, 1.0 ));\n" + "\n" + " vec2 u = aFract * aFract * (3.0 - 2.0 * aFract);\n" + "\n" + " return mix(v1, v2, u.x) +\n" + " (v3 - v1) * u.y * (1.0 - u.x) +\n" + " (v4 - v2) * u.x * u.y;\n" + "}\n" + "\n" + "float noisyStarField (in vec2 theSamplePos)\n" + "{\n" + " float aStarVal = smoothStarField (theSamplePos);\n" + " if (aStarVal >= THE_StarTreshold)\n" + " {\n" + " aStarVal = pow ((aStarVal - THE_StarTreshold) / (1.0 - THE_StarTreshold), 6.0);\n" + " }\n" + " else\n" + " {\n" + " aStarVal = 0.0;\n" + " }\n" + " return aStarVal;\n" + "}\n" + "\n" + "float smoothNoise (in vec3 theCoord)\n" + "{\n" + " vec3 anInt = floor (theCoord);\n" + " vec3 anFract = fract (theCoord);\n" + " anFract = anFract * anFract * (3.0 - (2.0 * anFract));\n" + " return mix(mix(mix(hash13(anInt ),\n" + " hash13(anInt + vec3(1.0, 0.0, 0.0)), anFract.x),\n" + " mix(hash13(anInt + vec3(0.0, 1.0, 0.0)),\n" + " hash13(anInt + vec3(1.0, 1.0, 0.0)), anFract.x), anFract.y),\n" + " mix(mix(hash13(anInt + vec3(0.0, 0.0, 1.0)),\n" + " hash13(anInt + vec3(1.0, 0.0, 1.0)), anFract.x),\n" + " mix(hash13(anInt + vec3(0.0, 1.0, 1.0)),\n" + " hash13(anInt + vec3(1.0, 1.0, 1.0)), anFract.x), anFract.y), anFract.z);\n" + "}\n" + "\n" + "float fnoise (in vec3 theCoord, in float theTime)\n" + "{\n" + " theCoord *= .25;\n" + " float aNoise;\n" + "\n" + " aNoise = 0.5000 * smoothNoise (theCoord);\n" + " theCoord = theCoord * 3.02; theCoord.y -= theTime * 0.2;\n" + " aNoise += 0.2500 * smoothNoise (theCoord);\n" + " theCoord = theCoord * 3.03; theCoord.y += theTime * 0.06;\n" + " aNoise += 0.1250 * smoothNoise (theCoord);\n" + " theCoord = theCoord * 3.01;\n" + " aNoise += 0.0625 * smoothNoise (theCoord);\n" + " theCoord = theCoord * 3.03;\n" + " aNoise += 0.03125 * smoothNoise (theCoord);\n" + " theCoord = theCoord * 3.02;\n" + " aNoise += 0.015625 * smoothNoise (theCoord);\n" + " return aNoise;\n" + "}\n" + "\n" + "float clouds (in vec3 theTs, in float theTime)\n" + "{\n" + " float aCloud = fnoise (theTs * 2e-4, theTime) + uCloudy * 0.1;\n" + " aCloud = smoothstep (0.44, 0.64, aCloud);\n" + " aCloud *= 70.0;\n" + " return aCloud + uFog;\n" + "}\n" + "\n" + "void densities (in vec3 thePos, out float theRayleigh, out float theMie, in float theTime)\n" + "{\n" + " float aHeight = length (thePos - THE_EARTH_CENTER) - THE_EARTH_RADIUS;\n" + " theRayleigh = exp (-aHeight / THE_HR);\n" + "\n" + " float aCloud = 0.0;\n" + " if (aHeight > 5000.0 && aHeight < 8000.0)\n" + " {\n" + " aCloud = clouds (thePos + vec3 (0.0, 0.,-theTime*3e3), theTime);\n" + " aCloud *= sin (M_PI*(aHeight - 5e3) / 5e3) * uCloudy;\n" + " }\n" + "\n" + " float aCloud2 = 0.0;\n" + " if (aHeight > 12e3 && aHeight < 15.5e3)\n" + " {\n" + " aCloud2 = fnoise (thePos * 3e-4, theTime) * clouds (thePos * 32.0, theTime);\n" + " aCloud2 *= sin (M_PI * (aHeight - 12e3) / 12e3) * 0.05;\n" + " aCloud2 = clamp (aCloud2, 0.0, 1.0);\n" + " }\n" + "\n" + " theMie = exp (-aHeight / THE_HM) + aCloud + uFog;\n" + " theMie += aCloud2;\n" + "}\n" + "\n" + "// ray with sphere intersection problem is reduced to solving the equation\n" + "// (P - C)^2 = r^2 <--- sphere equation\n" + "// where P is P(t) = A + t*B <--- point on ray\n" + "// t^2*dot(B, B) + t*2*dot(B, A-C) + dot(A-C, A-C) - r^2 = 0\n" + "// [ A ] [ B ] [ C ]\n" + "// We just need to solve the above quadratic equation\n" + "float raySphereIntersect (in vec3 theOrig, in vec3 theDir, in float theRadius)\n" + "{\n" + " theOrig = theOrig - THE_EARTH_CENTER;\n" + " // A coefficient will be always 1 (theDir is normalized)\n" + " float B = dot (theOrig, theDir);\n" + " float C = dot (theOrig, theOrig) - theRadius * theRadius;\n" + " // optimized version of classic (-b +- sqrt(b^2 - 4ac)) / 2a\n" + " float aDet2 = B * B - C;\n" + " if (aDet2 < 0.0) { return -1.0; }\n" + " float aDet = sqrt (aDet2);\n" + " float aT1 = -B - aDet;\n" + " float aT2 = -B + aDet;\n" + " return aT1 >= 0.0 ? aT1 : aT2;\n" + "}\n" + "\n" + "void scatter (in vec3 theEye, in vec3 theRay, in vec3 theSun,\n" + " out vec3 theCol, out float theScat, in float theTime)\n" + "{\n" + " float aRayLen = raySphereIntersect (theEye, theRay, THE_ATMO_RADIUS);\n" + " float aMu = dot (theRay, theSun);\n" + " float aMu2 = 1.0 + aMu*aMu;\n" + " // The Raleigh phase function looks like this:\n" + " float aPhaseR = 3.0/(16.0 * M_PI) * aMu2;\n" + " // And the Mie phase function equation is:\n" + " float aPhaseM = (3.0 / (8.0 * M_PI) * (1.0 - THE_G2) * aMu2)\n" + " / ((2.0 + THE_G2) * pow (1.0 + THE_G2 - 2.0 * THE_G * aMu, 1.5));\n" + "\n" + " float anOpticalDepthR = 0.0;\n" + " float anOpticalDepthM = 0.0;\n" + " vec3 aSumR = vec3 (0.0);\n" + " vec3 aSumM = vec3 (0.0); // Mie and Rayleigh contribution\n" + "\n" + " float dl = aRayLen / float (THE_NbSamples);\n" + " for (int i = 0; i < THE_NbSamples; ++i)\n" + " {\n" + " float l = float(i) * dl;\n" + " vec3 aSamplePos = theEye + theRay * l;\n" + "\n" + " float dR, dM;\n" + " densities (aSamplePos, dR, dM, theTime);\n" + " dR *= dl;\n" + " dM *= dl;\n" + " anOpticalDepthR += dR;\n" + " anOpticalDepthM += dM;\n" + "\n" + " float aSegmentLengthLight = raySphereIntersect (aSamplePos, theSun, THE_ATMO_RADIUS);\n" + " if (aSegmentLengthLight > 0.0)\n" + " {\n" + " float dls = aSegmentLengthLight / float (THE_NbSamplesLight);\n" + " float anOpticalDepthRs = 0.0;\n" + " float anOpticalDepthMs = 0.0;\n" + " for (int j = 0; j < THE_NbSamplesLight; ++j)\n" + " {\n" + " float ls = float (j) * dls;\n" + " vec3 aSamplePosS = aSamplePos + theSun * ls;\n" + " float dRs, dMs;\n" + " densities (aSamplePosS, dRs, dMs, theTime);\n" + " anOpticalDepthRs += dRs * dls;\n" + " anOpticalDepthMs += dMs * dls;\n" + " }\n" + "\n" + " vec3 anAttenuation = exp (-(THE_BETA_R * (anOpticalDepthR + anOpticalDepthRs)\n" + " + THE_BETA_M * (anOpticalDepthM + anOpticalDepthMs)));\n" + " aSumR += anAttenuation * dR;\n" + " aSumM += anAttenuation * dM;\n" + " }\n" + " }\n" + "\n" + " theCol = THE_SunPower * (aSumR * THE_BETA_R * aPhaseR + aSumM * THE_BETA_M * aPhaseM);\n" + " theScat = 1.0 - clamp (anOpticalDepthM*1e-5, 0.0, 1.0);\n" + "}\n" + "\n" + "// This is where all the magic happens. We first raymarch along the primary ray\n" + "// (from the camera origin to the point where the ray exits the atmosphere).\n" + "// For each sample along the primary ray,\n" + "// we then \"cast\" a light ray and raymarch along that ray as well.\n" + "// We basically shoot a ray in the direction of the sun.\n" + "vec4 computeIncidentLight (in vec3 theRayDirection, in vec2 theUv, in float theTime)\n" + "{\n" + " float aSunAttenuation = THE_SunAttenuation;\n" + " vec3 aSunDir = uSunDir;\n" + " // conversion to moon\n" + " float aStarAttenuation = 0.0;\n" + " if (aSunDir.y < 0.0)\n" + " {\n" + " aSunDir *= -1.0;\n" + " aSunAttenuation = aSunAttenuation * 0.1;\n" + " aStarAttenuation = sqrt (aSunDir.y);\n" + " }\n" + "\n" + " vec3 anEyePosition = vec3(0.0, THE_EyeHeight, 0.0);\n" + "\n" + " // draw a water surface horizontally symmetrically to the sky\n" + " if (theRayDirection.y <= -THE_HorizonWidth / 2.0)\n" + " {\n" + " theRayDirection.y = -THE_HorizonWidth - theRayDirection.y;\n" + " }\n" + "\n" + " float aScattering = 0.0;\n" + " vec3 aColor = vec3 (0.0);\n" + "\n" + " scatter (anEyePosition, theRayDirection, aSunDir, aColor, aScattering, theTime);\n" + " aColor *= aSunAttenuation;\n" + " float aStarIntensity = noisyStarField (theUv * 2048.0);\n" + " vec3 aStarColor = vec3 (aScattering * aStarIntensity * aStarAttenuation);\n" + " aColor += aStarColor;\n" + "\n" + " return vec4 (1.18 * pow (aColor, vec3(0.7)), 1.0);\n" + "}\n" + "\n" + "uniform int uSide;\n" + "\n" + "void main()\n" + "{\n" + " vec2 anUv = vec2 (2.0 * TexCoord.x - 1.0,\n" + " 2.0 * TexCoord.y - 1.0);\n" + " vec3 aPlanes[6];\n" + " aPlanes[0] = vec3 (+1.0, 0.0, 0.0);\n" + " aPlanes[1] = vec3 (-1.0, 0.0, 0.0);\n" + " aPlanes[2] = vec3 ( 0.0,+1.0, 0.0);\n" + " aPlanes[3] = vec3 ( 0.0,-1.0, 0.0);\n" + " aPlanes[4] = vec3 ( 0.0, 0.0,+1.0);\n" + " aPlanes[5] = vec3 ( 0.0, 0.0,-1.0);\n" + " vec3 aRayDirection;\n" + " if (uSide == 0)\n" + " {\n" + " // Positive X side\n" + " aRayDirection = aPlanes[0] + vec3 (0.0, +anUv.y, -anUv.x);\n" + " }\n" + " else if (uSide == 1)\n" + " {\n" + " // Negative X side\n" + " aRayDirection = aPlanes[1] + vec3 (0.0, +anUv.y, +anUv.x);\n" + " }\n" + " else if (uSide == 2)\n" + " {\n" + " // Positive Y side\n" + " aRayDirection = aPlanes[2] + vec3 (+anUv.x, 0.0, +anUv.y);\n" + " }\n" + " else if (uSide == 3)\n" + " {\n" + " // Negative Y side\n" + " aRayDirection = aPlanes[3] + vec3 (+anUv.x, 0.0, -anUv.y);\n" + " }\n" + " else if (uSide == 4)\n" + " {\n" + " // Positive Z side\n" + " aRayDirection = aPlanes[4] + vec3 (+anUv.x, +anUv.y, 0.0);\n" + " }\n" + " else if (uSide == 5)\n" + " {\n" + " // Negative Z side\n" + " aRayDirection = aPlanes[5] + vec3 (-anUv.x, +anUv.y, 0.0);\n" + " }\n" + "\n" + " occFragColor = computeIncidentLight (normalize (aRayDirection), anUv, uTime);\n" + "}\n"; diff --git a/src/Shaders/SkydomBackground.fs b/src/Shaders/SkydomBackground.fs new file mode 100644 index 0000000000..3afc3d0f08 --- /dev/null +++ b/src/Shaders/SkydomBackground.fs @@ -0,0 +1,300 @@ +// Constants +const float M_PI = 3.1415926535; +const float THE_EARTH_RADIUS = 6360e3; +const vec3 THE_EARTH_CENTER = vec3 (0.0, -THE_EARTH_RADIUS, 0.0); +const float THE_ATMO_RADIUS = 6380e3; // atmosphere radius (6420e3?) +const float THE_G = 0.76; // anisotropy of the medium (papers use 0.76) +const float THE_G2 = THE_G * THE_G; +const float THE_HR = 8000.0; // Thickness of the atmosphere +const float THE_HM = 1000.0; // Same as above but for Mie +const vec3 THE_BETA_R = vec3 (5.8e-6, 13.5e-6, 33.1e-6); // Reyleigh scattering normal earth +const vec3 THE_BETA_M = vec3 (21e-6); // Normal Mie scattering + +// Parameters +const float THE_SunAttenuation = 1.0; // sun intensity +const float THE_EyeHeight = 100.0; // viewer height +const float THE_HorizonWidth = 0.002; +const int THE_NbSamples = 8; +const int THE_NbSamplesLight = 8; // integral sampling rate (might highly hit performance) +const float THE_SunPower = 5.0; +const float THE_StarTreshold = 0.98; + +// Uniforms +uniform vec3 uSunDir; +uniform float uTime; +uniform float uCloudy; +uniform float uFog; + +float hash13 (in vec3 p3) +{ + p3 = fract (p3 * 0.1031); + p3 += dot (p3, p3.zyx + 31.32); + return fract ((p3.x + p3.y) * p3.z); +} + +float hash12 (in vec2 p) +{ + vec3 p3 = fract (vec3(p.xyx) * .1031); + p3 += dot (p3, p3.yzx + 33.33); + return fract ((p3.x + p3.y) * p3.z); +} + +float smoothStarField (in vec2 theSamplePos) +{ + vec2 aFract = fract (theSamplePos); + vec2 aFloorSample = floor (theSamplePos); + float v1 = hash12 (aFloorSample); + float v2 = hash12 (aFloorSample + vec2( 0.0, 1.0 )); + float v3 = hash12 (aFloorSample + vec2( 1.0, 0.0 )); + float v4 = hash12 (aFloorSample + vec2( 1.0, 1.0 )); + + vec2 u = aFract * aFract * (3.0 - 2.0 * aFract); + + return mix(v1, v2, u.x) + + (v3 - v1) * u.y * (1.0 - u.x) + + (v4 - v2) * u.x * u.y; +} + +float noisyStarField (in vec2 theSamplePos) +{ + float aStarVal = smoothStarField (theSamplePos); + if (aStarVal >= THE_StarTreshold) + { + aStarVal = pow ((aStarVal - THE_StarTreshold) / (1.0 - THE_StarTreshold), 6.0); + } + else + { + aStarVal = 0.0; + } + return aStarVal; +} + +float smoothNoise (in vec3 theCoord) +{ + vec3 anInt = floor (theCoord); + vec3 anFract = fract (theCoord); + anFract = anFract * anFract * (3.0 - (2.0 * anFract)); + return mix(mix(mix(hash13(anInt ), + hash13(anInt + vec3(1.0, 0.0, 0.0)), anFract.x), + mix(hash13(anInt + vec3(0.0, 1.0, 0.0)), + hash13(anInt + vec3(1.0, 1.0, 0.0)), anFract.x), anFract.y), + mix(mix(hash13(anInt + vec3(0.0, 0.0, 1.0)), + hash13(anInt + vec3(1.0, 0.0, 1.0)), anFract.x), + mix(hash13(anInt + vec3(0.0, 1.0, 1.0)), + hash13(anInt + vec3(1.0, 1.0, 1.0)), anFract.x), anFract.y), anFract.z); +} + +float fnoise (in vec3 theCoord, in float theTime) +{ + theCoord *= .25; + float aNoise; + + aNoise = 0.5000 * smoothNoise (theCoord); + theCoord = theCoord * 3.02; theCoord.y -= theTime * 0.2; + aNoise += 0.2500 * smoothNoise (theCoord); + theCoord = theCoord * 3.03; theCoord.y += theTime * 0.06; + aNoise += 0.1250 * smoothNoise (theCoord); + theCoord = theCoord * 3.01; + aNoise += 0.0625 * smoothNoise (theCoord); + theCoord = theCoord * 3.03; + aNoise += 0.03125 * smoothNoise (theCoord); + theCoord = theCoord * 3.02; + aNoise += 0.015625 * smoothNoise (theCoord); + return aNoise; +} + +float clouds (in vec3 theTs, in float theTime) +{ + float aCloud = fnoise (theTs * 2e-4, theTime) + uCloudy * 0.1; + aCloud = smoothstep (0.44, 0.64, aCloud); + aCloud *= 70.0; + return aCloud + uFog; +} + +void densities (in vec3 thePos, out float theRayleigh, out float theMie, in float theTime) +{ + float aHeight = length (thePos - THE_EARTH_CENTER) - THE_EARTH_RADIUS; + theRayleigh = exp (-aHeight / THE_HR); + + float aCloud = 0.0; + if (aHeight > 5000.0 && aHeight < 8000.0) + { + aCloud = clouds (thePos + vec3 (0.0, 0.,-theTime*3e3), theTime); + aCloud *= sin (M_PI*(aHeight - 5e3) / 5e3) * uCloudy; + } + + float aCloud2 = 0.0; + if (aHeight > 12e3 && aHeight < 15.5e3) + { + aCloud2 = fnoise (thePos * 3e-4, theTime) * clouds (thePos * 32.0, theTime); + aCloud2 *= sin (M_PI * (aHeight - 12e3) / 12e3) * 0.05; + aCloud2 = clamp (aCloud2, 0.0, 1.0); + } + + theMie = exp (-aHeight / THE_HM) + aCloud + uFog; + theMie += aCloud2; +} + +// ray with sphere intersection problem is reduced to solving the equation +// (P - C)^2 = r^2 <--- sphere equation +// where P is P(t) = A + t*B <--- point on ray +// t^2*dot(B, B) + t*2*dot(B, A-C) + dot(A-C, A-C) - r^2 = 0 +// [ A ] [ B ] [ C ] +// We just need to solve the above quadratic equation +float raySphereIntersect (in vec3 theOrig, in vec3 theDir, in float theRadius) +{ + theOrig = theOrig - THE_EARTH_CENTER; + // A coefficient will be always 1 (theDir is normalized) + float B = dot (theOrig, theDir); + float C = dot (theOrig, theOrig) - theRadius * theRadius; + // optimized version of classic (-b +- sqrt(b^2 - 4ac)) / 2a + float aDet2 = B * B - C; + if (aDet2 < 0.0) { return -1.0; } + float aDet = sqrt (aDet2); + float aT1 = -B - aDet; + float aT2 = -B + aDet; + return aT1 >= 0.0 ? aT1 : aT2; +} + +void scatter (in vec3 theEye, in vec3 theRay, in vec3 theSun, + out vec3 theCol, out float theScat, in float theTime) +{ + float aRayLen = raySphereIntersect (theEye, theRay, THE_ATMO_RADIUS); + float aMu = dot (theRay, theSun); + float aMu2 = 1.0 + aMu*aMu; + // The Raleigh phase function looks like this: + float aPhaseR = 3.0/(16.0 * M_PI) * aMu2; + // And the Mie phase function equation is: + float aPhaseM = (3.0 / (8.0 * M_PI) * (1.0 - THE_G2) * aMu2) + / ((2.0 + THE_G2) * pow (1.0 + THE_G2 - 2.0 * THE_G * aMu, 1.5)); + + float anOpticalDepthR = 0.0; + float anOpticalDepthM = 0.0; + vec3 aSumR = vec3 (0.0); + vec3 aSumM = vec3 (0.0); // Mie and Rayleigh contribution + + float dl = aRayLen / float (THE_NbSamples); + for (int i = 0; i < THE_NbSamples; ++i) + { + float l = float(i) * dl; + vec3 aSamplePos = theEye + theRay * l; + + float dR, dM; + densities (aSamplePos, dR, dM, theTime); + dR *= dl; + dM *= dl; + anOpticalDepthR += dR; + anOpticalDepthM += dM; + + float aSegmentLengthLight = raySphereIntersect (aSamplePos, theSun, THE_ATMO_RADIUS); + if (aSegmentLengthLight > 0.0) + { + float dls = aSegmentLengthLight / float (THE_NbSamplesLight); + float anOpticalDepthRs = 0.0; + float anOpticalDepthMs = 0.0; + for (int j = 0; j < THE_NbSamplesLight; ++j) + { + float ls = float (j) * dls; + vec3 aSamplePosS = aSamplePos + theSun * ls; + float dRs, dMs; + densities (aSamplePosS, dRs, dMs, theTime); + anOpticalDepthRs += dRs * dls; + anOpticalDepthMs += dMs * dls; + } + + vec3 anAttenuation = exp (-(THE_BETA_R * (anOpticalDepthR + anOpticalDepthRs) + + THE_BETA_M * (anOpticalDepthM + anOpticalDepthMs))); + aSumR += anAttenuation * dR; + aSumM += anAttenuation * dM; + } + } + + theCol = THE_SunPower * (aSumR * THE_BETA_R * aPhaseR + aSumM * THE_BETA_M * aPhaseM); + theScat = 1.0 - clamp (anOpticalDepthM*1e-5, 0.0, 1.0); +} + +// This is where all the magic happens. We first raymarch along the primary ray +// (from the camera origin to the point where the ray exits the atmosphere). +// For each sample along the primary ray, +// we then "cast" a light ray and raymarch along that ray as well. +// We basically shoot a ray in the direction of the sun. +vec4 computeIncidentLight (in vec3 theRayDirection, in vec2 theUv, in float theTime) +{ + float aSunAttenuation = THE_SunAttenuation; + vec3 aSunDir = uSunDir; + // conversion to moon + float aStarAttenuation = 0.0; + if (aSunDir.y < 0.0) + { + aSunDir *= -1.0; + aSunAttenuation = aSunAttenuation * 0.1; + aStarAttenuation = sqrt (aSunDir.y); + } + + vec3 anEyePosition = vec3(0.0, THE_EyeHeight, 0.0); + + // draw a water surface horizontally symmetrically to the sky + if (theRayDirection.y <= -THE_HorizonWidth / 2.0) + { + theRayDirection.y = -THE_HorizonWidth - theRayDirection.y; + } + + float aScattering = 0.0; + vec3 aColor = vec3 (0.0); + + scatter (anEyePosition, theRayDirection, aSunDir, aColor, aScattering, theTime); + aColor *= aSunAttenuation; + float aStarIntensity = noisyStarField (theUv * 2048.0); + vec3 aStarColor = vec3 (aScattering * aStarIntensity * aStarAttenuation); + aColor += aStarColor; + + return vec4 (1.18 * pow (aColor, vec3(0.7)), 1.0); +} + +uniform int uSide; + +void main() +{ + vec2 anUv = vec2 (2.0 * TexCoord.x - 1.0, + 2.0 * TexCoord.y - 1.0); + vec3 aPlanes[6]; + aPlanes[0] = vec3 (+1.0, 0.0, 0.0); + aPlanes[1] = vec3 (-1.0, 0.0, 0.0); + aPlanes[2] = vec3 ( 0.0,+1.0, 0.0); + aPlanes[3] = vec3 ( 0.0,-1.0, 0.0); + aPlanes[4] = vec3 ( 0.0, 0.0,+1.0); + aPlanes[5] = vec3 ( 0.0, 0.0,-1.0); + vec3 aRayDirection; + if (uSide == 0) + { + // Positive X side + aRayDirection = aPlanes[0] + vec3 (0.0, +anUv.y, -anUv.x); + } + else if (uSide == 1) + { + // Negative X side + aRayDirection = aPlanes[1] + vec3 (0.0, +anUv.y, +anUv.x); + } + else if (uSide == 2) + { + // Positive Y side + aRayDirection = aPlanes[2] + vec3 (+anUv.x, 0.0, +anUv.y); + } + else if (uSide == 3) + { + // Negative Y side + aRayDirection = aPlanes[3] + vec3 (+anUv.x, 0.0, -anUv.y); + } + else if (uSide == 4) + { + // Positive Z side + aRayDirection = aPlanes[4] + vec3 (+anUv.x, +anUv.y, 0.0); + } + else if (uSide == 5) + { + // Negative Z side + aRayDirection = aPlanes[5] + vec3 (-anUv.x, +anUv.y, 0.0); + } + + occFragColor = computeIncidentLight (normalize (aRayDirection), anUv, uTime); +} diff --git a/src/V3d/V3d_View.cxx b/src/V3d/V3d_View.cxx index c5e768b3df..ecd4c1d6b4 100644 --- a/src/V3d/V3d_View.cxx +++ b/src/V3d/V3d_View.cxx @@ -529,6 +529,16 @@ void V3d_View::SetBackgroundCubeMap (const Handle(Graphic3d_CubeMap)& theCubeMap } } +//============================================================================= +//function : SetBackgroundSkydome +//purpose : +//============================================================================= +void V3d_View::SetBackgroundSkydome (const Aspect_SkydomeBackground& theAspect, + Standard_Boolean theToUpdatePBREnv) +{ + myView->SetBackgroundSkydome (theAspect, theToUpdatePBREnv); +} + //============================================================================= //function : IsImageBasedLighting //purpose : diff --git a/src/V3d/V3d_View.hxx b/src/V3d/V3d_View.hxx index 222fb18ef0..aa4159e1a2 100644 --- a/src/V3d/V3d_View.hxx +++ b/src/V3d/V3d_View.hxx @@ -219,6 +219,15 @@ public: Standard_Boolean theToUpdatePBREnv = Standard_True, Standard_Boolean theToUpdate = Standard_False); + //! Returns skydome aspect; + const Aspect_SkydomeBackground& BackgroundSkydome() const { return myView->BackgroundSkydome(); } + + //! Sets skydome aspect + //! @param theAspect cubemap generation parameters + //! @param theToUpdatePBREnv defines whether IBL maps will be generated or not + Standard_EXPORT void SetBackgroundSkydome (const Aspect_SkydomeBackground& theAspect, + Standard_Boolean theToUpdatePBREnv = Standard_True); + //! Returns TRUE if IBL (Image Based Lighting) from background cubemap is enabled. Standard_EXPORT Standard_Boolean IsImageBasedLighting() const; diff --git a/src/ViewerTest/ViewerTest_ViewerCommands.cxx b/src/ViewerTest/ViewerTest_ViewerCommands.cxx index 68a0187699..77520fe13c 100644 --- a/src/ViewerTest/ViewerTest_ViewerCommands.cxx +++ b/src/ViewerTest/ViewerTest_ViewerCommands.cxx @@ -2692,6 +2692,9 @@ static int VBackground (Draw_Interpretor& theDI, Aspect_FillMethod anImageMode = Aspect_FM_CENTERED; bool hasImageMode = false; + bool isSkydomeBg = false; + Aspect_SkydomeBackground aSkydomeAspect; + NCollection_Sequence aCubeMapSeq; Graphic3d_CubeMapOrder aCubeOrder = Graphic3d_CubeMapOrder::Default(); bool isCubeZInverted = false; @@ -2722,6 +2725,48 @@ static int VBackground (Draw_Interpretor& theDI, { anImagePath = theArgVec[++anArgIter]; } + else if (anArg == "-skydome" + || anArg == "-sky") + { + isSkydomeBg = true; + } + else if (anArgIter + 3 < theNbArgs + && isSkydomeBg + && anArg == "-sundir") + { + float aX = (float) Draw::Atof (theArgVec[++anArgIter]); + float aY = (float) Draw::Atof (theArgVec[++anArgIter]); + float aZ = (float) Draw::Atof (theArgVec[++anArgIter]); + aSkydomeAspect.SetSunDirection (gp_Dir(aX, aY, aZ)); + } + else if (anArgIter + 1 < theNbArgs + && isSkydomeBg + && anArg == "-cloud") + { + float aCloudy = (float) Draw::Atof (theArgVec[++anArgIter]); + aSkydomeAspect.SetCloudiness (aCloudy); + } + else if (anArgIter + 1 < theNbArgs + && isSkydomeBg + && anArg == "-time") + { + float aTime = (float) Draw::Atof (theArgVec[++anArgIter]); + aSkydomeAspect.SetTimeParameter (aTime); + } + else if (anArgIter + 1 < theNbArgs + && isSkydomeBg + && anArg == "-fog") + { + float aFoggy = (float) Draw::Atof (theArgVec[++anArgIter]); + aSkydomeAspect.SetFogginess (aFoggy); + } + else if (anArgIter + 1 < theNbArgs + && isSkydomeBg + && anArg == "-size") + { + Standard_Integer aSize = Draw::Atoi (theArgVec[++anArgIter]); + aSkydomeAspect.SetSize (aSize); + } else if (anArgIter + 1 < theNbArgs && aCubeMapSeq.IsEmpty() && (anArg == "-cubemap" @@ -3003,6 +3048,11 @@ static int VBackground (Draw_Interpretor& theDI, aView->SetBgImageStyle (anImageMode); } + if (isSkydomeBg) + { + aView->SetBackgroundSkydome (aSkydomeAspect, toUseIBL != -1); + } + if (!aCubeMapSeq.IsEmpty()) { Handle(Graphic3d_CubeMap) aCubeMap; @@ -13809,6 +13859,8 @@ vbackground [-color Color [-default]] [-gradientMode {NONE|HORIZONTAL|VERTICAL|DIAG1|DIAG2|CORNER1|CORNER2|CORNER3|ELLIPTICAL}]=VERT] [-imageFile ImageFile [-imageMode {CENTERED|TILED|STRETCH|NONE}]=CENTERED [-srgb {0|1}]=1] [-cubemap CubemapFile1 [CubeMapFiles2-5] [-order TilesIndexes1-6] [-invertedz]=0] + [-skydome [-sunDir X Y Z=0 1 0] [-cloud Cloudy=0.2] [-time Time=0.0] + [-fog Haze=0.0] [-size SizePx=512]] [-pbrEnv {ibl|noibl|keep}] Changes background or some background settings. -color sets background color @@ -13824,6 +13876,13 @@ Changes background or some background settings. -order defines order of tiles in one image cubemap TileIndexi defubes an index in range [0, 5] for i tile of one image packed cubemap (has no effect in case of multi-image cubemaps). +Skydome background parameters (generated cubemap): + -skydome sets procedurally generated skydome as background + -sunDir sets direction to the sun, direction with negative y component represents moon direction (-x, -y, -z) + -cloud sets cloud intensity (0.0 - clear sky, 1.0 - very high cloudy) + -time might be tweaked to slightly change appearance of clouds + -fog sets mist intensity (0.0 - no mist at all, 1.0 - high mist) + -size sets size in pixels of cubemap side )" /* [vbackground] */); addCmd ("vsetbg", VBackground, /* [vsetbg] */ R"( diff --git a/tests/opengl/data/background/skydome b/tests/opengl/data/background/skydome new file mode 100644 index 0000000000..281bad22b6 --- /dev/null +++ b/tests/opengl/data/background/skydome @@ -0,0 +1,43 @@ +puts "============" +puts "0032606: Visualization - add a shader for sky" +puts "============" +puts "" + +set THE_DIM 256 + +pload MODELING VISUALIZATION +psphere s 1 + +vinit View1 -width 768 -height 512 +vcamera -persp -fovy 120 + +chrono t restart +vbackground -skydome -size $THE_DIM -cloud 0.3 -sunDir 1.0 0.5 0.0 -time 10 -fog 0.3 +chrono t show +vaxo +vdump $imagedir/${casename}_day.png + +chrono t restart +vbackground -skydome -size $THE_DIM -cloud 0.3 -sunDir 1.0 -0.5 0.0 -time -10 -fog 0.05 +chrono t show +vaxo +vdump $imagedir/${casename}_night.png + +chrono t restart +vbackground -skydome -size $THE_DIM -cloud 0.15 -sunDir 1.0 0.15 0.0 -time 10 +chrono t show +vaxo +vdump $imagedir/${casename}_sunset.png + +chrono t restart +vbackground -skydome -size $THE_DIM +chrono t show +vaxo +vdump $imagedir/${casename}_defaults.png + +vdisplay -dispMode 1 s +vfit +vaspects s -material SILVER +vrenderparams -shadingModel pbr +vlight headlight -enabled 0 +vdump $imagedir/${casename}_pbr.png From e2a956a63361efab10298b6d064ecee1515b2cfa Mon Sep 17 00:00:00 2001 From: jgv Date: Fri, 24 Dec 2021 07:12:49 +0300 Subject: [PATCH 185/639] 0032747: Modeling Algorithms - Exact HLR algorithm gives wrong result Modify the method IntWalk_IWalking::TestArretCadre: correct the value of scalar product of two vectors according to the tolerances in U and V. --- src/IntWalk/IntWalk_IWalking_2.gxx | 49 +++++++++++++++++++++++------- tests/hlr/exact_hlr/C13 | 2 -- tests/hlr/exact_hlr/C18 | 3 -- tests/hlr/exact_hlr/C3 | 4 +-- tests/hlr/exact_hlr/bug32747 | 10 ++++++ tests/hlr/exact_hlr/end | 6 ++++ tests/hlr/{ => poly_hlr}/end | 0 7 files changed, 55 insertions(+), 19 deletions(-) create mode 100644 tests/hlr/exact_hlr/bug32747 create mode 100644 tests/hlr/exact_hlr/end rename tests/hlr/{ => poly_hlr}/end (100%) diff --git a/src/IntWalk/IntWalk_IWalking_2.gxx b/src/IntWalk/IntWalk_IWalking_2.gxx index a35a87531b..2e5d7f0cdd 100644 --- a/src/IntWalk/IntWalk_IWalking_2.gxx +++ b/src/IntWalk/IntWalk_IWalking_2.gxx @@ -22,6 +22,14 @@ #define No_Standard_OutOfRange #endif +static void CutVectorByTolerances (gp_Vec2d& theVector, + const math_Vector& theTolerance) +{ + if (Abs(theVector.X()) < theTolerance(1)) + theVector.SetX (0.); + if (Abs(theVector.Y()) < theTolerance(2)) + theVector.SetY (0.); +} // _______________________________________________ // @@ -771,8 +779,13 @@ void IntWalk_IWalking::TestArretCadre Line->Value(j).ParametersOnS1(Uc,Vc); } - Scal = (Up-wd1[i].ustart) * (Uc-wd1[i].ustart) + - (Vp-wd1[i].vstart) * (Vc-wd1[i].vstart); + gp_Vec2d aVec1 (Up-wd1[i].ustart, Vp-wd1[i].vstart), + aVec2 (Uc-wd1[i].ustart, Vc-wd1[i].vstart); + CutVectorByTolerances (aVec1, tolerance); + CutVectorByTolerances (aVec2, tolerance); + + Scal = aVec1 * aVec2; + // if a stop point is found: stop the line on this point. if (Scal < 0) { Line->Cut(j); nbp= Line->NbPoints(); @@ -791,8 +804,14 @@ void IntWalk_IWalking::TestArretCadre } else if (nbMultiplicities[i] > 0) { for (Standard_Integer k = N+1; k <= N + nbMultiplicities[i]; k++) { - Scal = (Up-Umult(k)) * (Uc-Umult(k)) + - (Vp-Vmult(k)) * (Vc-Vmult(k)); + + aVec1.SetCoord (Up-Umult(k), Vp-Vmult(k)), + aVec2.SetCoord (Uc-Umult(k), Vc-Vmult(k)); + CutVectorByTolerances (aVec1, tolerance); + CutVectorByTolerances (aVec2, tolerance); + + Scal = aVec1 * aVec2; + if (Scal < 0) { Line->Cut(j); nbp= Line->NbPoints(); Irang=i; @@ -847,11 +866,13 @@ void IntWalk_IWalking::TestArretCadre // now the last point of the line and the last calculated point are compated. // there will be no need to "Cut" - Scal = (Up-wd1[i].ustart) * (UV(1)-wd1[i].ustart) + - // (Vp-wd1[i].vstart) * (UV(2)-wd1[i].vstart); - // modified by NIZHNY-MKK Fri Oct 27 12:29:41 2000 - (Vp-wd1[i].vstart) * (UV(2)-wd1[i].vstart); - + gp_Vec2d aVec1 (Up-wd1[i].ustart, Vp-wd1[i].vstart), + aVec2 (UV(1)-wd1[i].ustart, UV(2)-wd1[i].vstart); + CutVectorByTolerances (aVec1, tolerance); + CutVectorByTolerances (aVec2, tolerance); + + Scal = aVec1 * aVec2; + if (Scal < 0) { Irang = i; UV(1) = wd1[Irang].ustart; @@ -867,8 +888,14 @@ void IntWalk_IWalking::TestArretCadre } else if (nbMultiplicities[i] > 0) { for (Standard_Integer j = N+1; j <= N+nbMultiplicities[i]; j++) { - Scal = (Up-Umult(j)) * (UV(1)-Umult(j)) + - (Vp-Vmult(j)) * (UV(2)-Vmult(j)); + + aVec1.SetCoord (Up-Umult(j), Vp-Vmult(j)); + aVec2.SetCoord (UV(1)-Umult(j), UV(2)-Vmult(j)); + CutVectorByTolerances (aVec1, tolerance); + CutVectorByTolerances (aVec2, tolerance); + + Scal = aVec1 * aVec2; + if (Scal < 0) { Irang=i; UV(1) = wd1[Irang].ustart; diff --git a/tests/hlr/exact_hlr/C13 b/tests/hlr/exact_hlr/C13 index 6f702cdfd2..255ff26e64 100644 --- a/tests/hlr/exact_hlr/C13 +++ b/tests/hlr/exact_hlr/C13 @@ -1,5 +1,3 @@ -puts "TODO OCC30286 ALL: Error : The length of result shape is 9589.21, expected 9547.11" - set viewname "vright" set length 9547.11 diff --git a/tests/hlr/exact_hlr/C18 b/tests/hlr/exact_hlr/C18 index 1b73d4c3a4..ca7c58f7af 100644 --- a/tests/hlr/exact_hlr/C18 +++ b/tests/hlr/exact_hlr/C18 @@ -1,6 +1,3 @@ -puts "TODO OCC30286 Windows: Error : The length of result shape is 2416.66, expected 2418.08" -puts "TODO OCC30286 Linux: Error : The length of result shape is 2414.48, expected 2418.08" - set viewname "vright" set length 2418.08 diff --git a/tests/hlr/exact_hlr/C3 b/tests/hlr/exact_hlr/C3 index 5211d9ca17..8046b6722c 100644 --- a/tests/hlr/exact_hlr/C3 +++ b/tests/hlr/exact_hlr/C3 @@ -1,7 +1,5 @@ -puts "TODO OCC30286 Linux: Error : The length of result shape is 3249.9, expected 3234.6" - set viewname "vright" -set length 3234.6 +set length 3237.63 testreadstep [locate_data_file bug27341_570-DWLNL-40-08-L_131LANG_16VERSATZ_DIN.stp] a COMPUTE_HLR $viewname $algotype diff --git a/tests/hlr/exact_hlr/bug32747 b/tests/hlr/exact_hlr/bug32747 new file mode 100644 index 0000000000..ae97d80d13 --- /dev/null +++ b/tests/hlr/exact_hlr/bug32747 @@ -0,0 +1,10 @@ +puts "================================================" +puts "OCC32747: Exact HLR algorithm gives wrong result" +puts "================================================" +puts "" + +set viewname "vfront" +set length 34.3597 + +restore [locate_data_file bug32747.brep] a +COMPUTE_HLR $viewname $algotype diff --git a/tests/hlr/exact_hlr/end b/tests/hlr/exact_hlr/end new file mode 100644 index 0000000000..0928d556f2 --- /dev/null +++ b/tests/hlr/exact_hlr/end @@ -0,0 +1,6 @@ +checkprops result -l ${length} + +checkview -screenshot -2d -path ${imagedir}/${test_image}.png + +# to end a test script +puts "TEST COMPLETED" diff --git a/tests/hlr/end b/tests/hlr/poly_hlr/end similarity index 100% rename from tests/hlr/end rename to tests/hlr/poly_hlr/end From 6cb968fd6fcb9ee08ad60191aa0bedf6cdd6ea9a Mon Sep 17 00:00:00 2001 From: vro Date: Wed, 29 Dec 2021 11:00:06 +0300 Subject: [PATCH 186/639] 0032757: Application Framework, scaling transformation - loading of an OCAF XML document fails A flag not to raise an exception is used on reading of an OCAF document. If such a shape with scaling transformation is stored in the document, it should be read. Modified files: XmlMNaming\XmlMNaming_NamedShapeDriver.cxx: not checking of the type of transformation for a read shape --- src/XmlMNaming/XmlMNaming_NamedShapeDriver.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/XmlMNaming/XmlMNaming_NamedShapeDriver.cxx b/src/XmlMNaming/XmlMNaming_NamedShapeDriver.cxx index 7545449f31..844cdec736 100644 --- a/src/XmlMNaming/XmlMNaming_NamedShapeDriver.cxx +++ b/src/XmlMNaming/XmlMNaming_NamedShapeDriver.cxx @@ -325,7 +325,7 @@ static int doTranslate (const XmlMNaming_Shape1& thePShape, return 1; theResult.TShape (theShapeSet.Shape(aShapeId).TShape()); theResult.Orientation (thePShape.Orientation()); - theResult.Location (theShapeSet.Locations().Location (thePShape.LocId())); + theResult.Location (theShapeSet.Locations().Location (thePShape.LocId()), false); return 0; } From d925497360c239049ef65e566d425c472076f5e9 Mon Sep 17 00:00:00 2001 From: kgv Date: Thu, 30 Dec 2021 16:41:09 +0300 Subject: [PATCH 187/639] 0032758: Visualization, TKOpenGl - disable shadow-map from transform-persistence objects OpenGl_View::renderShadowMap() now skips transform-persistent objects. OpenGl_ShadowMap::UpdateCamera() - removed redundant Z-range expansion for non-rendered objects. Improved syntax of vdrawtext command. --- src/OpenGl/OpenGl_Group.hxx | 6 +- src/OpenGl/OpenGl_RenderFilter.hxx | 2 + src/OpenGl/OpenGl_ShadowMap.cxx | 2 +- src/OpenGl/OpenGl_View.cxx | 2 + src/OpenGl/OpenGl_Workspace.cxx | 8 + src/ViewerTest/ViewerTest_ObjectCommands.cxx | 226 ++++++++----------- tests/opengl/data/shadows/trsfpers | 21 ++ 7 files changed, 133 insertions(+), 134 deletions(-) create mode 100644 tests/opengl/data/shadows/trsfpers diff --git a/src/OpenGl/OpenGl_Group.hxx b/src/OpenGl/OpenGl_Group.hxx index 8f04a6ae3a..8d3ea781f8 100644 --- a/src/OpenGl/OpenGl_Group.hxx +++ b/src/OpenGl/OpenGl_Group.hxx @@ -52,7 +52,11 @@ public: } //! Return TRUE if group contains primitives with transform persistence. - bool HasPersistence() const { return myStructure != NULL && !myStructure->TransformPersistence().IsNull(); } + bool HasPersistence() const + { + return !myTrsfPers.IsNull() + || (myStructure != NULL && !myStructure->TransformPersistence().IsNull()); + } //! Update aspect. Standard_EXPORT virtual void SetGroupPrimitivesAspect (const Handle(Graphic3d_Aspects)& theAspect) Standard_OVERRIDE; diff --git a/src/OpenGl/OpenGl_RenderFilter.hxx b/src/OpenGl/OpenGl_RenderFilter.hxx index 1abb0d5e24..759ce97840 100755 --- a/src/OpenGl/OpenGl_RenderFilter.hxx +++ b/src/OpenGl/OpenGl_RenderFilter.hxx @@ -26,6 +26,8 @@ enum OpenGl_RenderFilter OpenGl_RenderFilter_NonRaytraceableOnly = 0x004, //!< render only non-raytraceable elements OpenGl_RenderFilter_FillModeOnly = 0x008, //!< render only filled elements + + OpenGl_RenderFilter_SkipTrsfPersistence = 0x010, //!< render only normal 3D objects without transformation persistence }; #endif diff --git a/src/OpenGl/OpenGl_ShadowMap.cxx b/src/OpenGl/OpenGl_ShadowMap.cxx index bec004a052..fa803e97f1 100644 --- a/src/OpenGl/OpenGl_ShadowMap.cxx +++ b/src/OpenGl/OpenGl_ShadowMap.cxx @@ -89,7 +89,7 @@ bool OpenGl_ShadowMap::UpdateCamera (const Graphic3d_CView& theView, const gp_XYZ* theOrigin) { const Bnd_Box aMinMaxBox = theOrigin == NULL ? theView.MinMaxValues (false) : Bnd_Box(); // applicative min max boundaries - const Bnd_Box aGraphicBox = theOrigin == NULL ? theView.MinMaxValues (true) : Bnd_Box(); // real graphical boundaries (not accounting infinite flag) + const Bnd_Box aGraphicBox = aMinMaxBox; switch (myShadowLight->Type()) { diff --git a/src/OpenGl/OpenGl_View.cxx b/src/OpenGl/OpenGl_View.cxx index 99f139e030..95cb7dcdaf 100644 --- a/src/OpenGl/OpenGl_View.cxx +++ b/src/OpenGl/OpenGl_View.cxx @@ -2162,7 +2162,9 @@ void OpenGl_View::renderShadowMap (const Handle(OpenGl_ShadowMap)& theShadowMap) aCtx->core11fwd->glClearDepth (1.0); aCtx->core11fwd->glClear (GL_DEPTH_BUFFER_BIT); + myWorkspace->SetRenderFilter (myWorkspace->RenderFilter() | OpenGl_RenderFilter_SkipTrsfPersistence); renderScene (Graphic3d_Camera::Projection_Orthographic, aShadowBuffer.get(), NULL, false); + myWorkspace->SetRenderFilter (myWorkspace->RenderFilter() & ~(Standard_Integer )OpenGl_RenderFilter_SkipTrsfPersistence); aCtx->SetColorMask (true); myWorkspace->ResetAppliedAspect(); diff --git a/src/OpenGl/OpenGl_Workspace.cxx b/src/OpenGl/OpenGl_Workspace.cxx index 9ff9e1ba81..8d09d642e0 100644 --- a/src/OpenGl/OpenGl_Workspace.cxx +++ b/src/OpenGl/OpenGl_Workspace.cxx @@ -423,6 +423,14 @@ Standard_Boolean OpenGl_Workspace::BufferDump (const Handle(OpenGl_FrameBuffer)& bool OpenGl_Workspace::ShouldRender (const OpenGl_Element* theElement, const OpenGl_Group* theGroup) { + if ((myRenderFilter & OpenGl_RenderFilter_SkipTrsfPersistence) != 0) + { + if (theGroup->HasPersistence()) + { + return false; + } + } + // render only non-raytracable elements when RayTracing is enabled if ((myRenderFilter & OpenGl_RenderFilter_NonRaytraceableOnly) != 0) { diff --git a/src/ViewerTest/ViewerTest_ObjectCommands.cxx b/src/ViewerTest/ViewerTest_ObjectCommands.cxx index 14aa3e64f8..b0ddaab799 100644 --- a/src/ViewerTest/ViewerTest_ObjectCommands.cxx +++ b/src/ViewerTest/ViewerTest_ObjectCommands.cxx @@ -2378,15 +2378,10 @@ static int VDrawText (Draw_Interpretor& theDI, { continue; } - else if (aParam == "-pos" - || aParam == "-position") + else if ((aParam == "-pos" + || aParam == "-position") + && anArgIt + 3 < theArgsNb) { - if (anArgIt + 3 >= theArgsNb) - { - Message::SendFail() << "Error: wrong number of values for parameter '" << aParam << "'"; - return 1; - } - aPos.SetX (Draw::Atof (theArgVec[++anArgIt])); aPos.SetY (Draw::Atof (theArgVec[++anArgIt])); aPos.SetZ (Draw::Atof (theArgVec[++anArgIt])); @@ -2406,59 +2401,70 @@ static int VDrawText (Draw_Interpretor& theDI, anArgIt += aNbParsed; aTextPrs->SetColor (aColor); } - else if (aParam == "-halign") + else if ((aParam == "-halign" + || aParam == "-valign" + || aParam == "-align") + && anArgIt + 1 < theArgsNb) { - if (++anArgIt >= theArgsNb) - { - Message::SendFail() << "Error: wrong number of values for parameter '" << aParam.ToCString() << "'"; - return 1; - } - - TCollection_AsciiString aType (theArgVec[anArgIt]); + TCollection_AsciiString aType (theArgVec[++anArgIt]); aType.LowerCase(); if (aType == "left") { aTextPrs->SetHJustification (Graphic3d_HTA_LEFT); + if (aParam == "-valign") + { + Message::SendFail() << "Syntax error at '" << aParam << "'"; + return 1; + } } else if (aType == "center") { - aTextPrs->SetHJustification (Graphic3d_HTA_CENTER); + if (aParam == "-halign" + || aParam == "-align") + { + aTextPrs->SetHJustification (Graphic3d_HTA_CENTER); + } + if (aParam == "-valign" + || aParam == "-align") + { + aTextPrs->SetVJustification (Graphic3d_VTA_CENTER); + } } else if (aType == "right") { aTextPrs->SetHJustification (Graphic3d_HTA_RIGHT); + if (aParam == "-valign") + { + Message::SendFail() << "Syntax error at '" << aParam << "'"; + return 1; + } } - else - { - Message::SendFail() << "Syntax error at '" << aParam << "'"; - return 1; - } - } - else if (aParam == "-valign") - { - if (++anArgIt >= theArgsNb) - { - Message::SendFail() << "Syntax error: wrong number of values for parameter '" << aParam << "'"; - return 1; - } - - TCollection_AsciiString aType (theArgVec[anArgIt]); - aType.LowerCase(); - if (aType == "top") + else if (aType == "top") { aTextPrs->SetVJustification (Graphic3d_VTA_TOP); - } - else if (aType == "center") - { - aTextPrs->SetVJustification (Graphic3d_VTA_CENTER); + if (aParam == "-halign") + { + Message::SendFail() << "Syntax error at '" << aParam << "'"; + return 1; + } } else if (aType == "bottom") { aTextPrs->SetVJustification (Graphic3d_VTA_BOTTOM); + if (aParam == "-halign") + { + Message::SendFail() << "Syntax error at '" << aParam << "'"; + return 1; + } } else if (aType == "topfirstline") { aTextPrs->SetVJustification (Graphic3d_VTA_TOPFIRSTLINE); + if (aParam == "-halign") + { + Message::SendFail() << "Syntax error at '" << aParam << "'"; + return 1; + } } else { @@ -2466,59 +2472,37 @@ static int VDrawText (Draw_Interpretor& theDI, return 1; } } - else if (aParam == "-angle") + else if (aParam == "-angle" + && anArgIt + 1 < theArgsNb) { - if (++anArgIt >= theArgsNb) - { - Message::SendFail() << "Syntax error: wrong number of values for parameter '" << aParam << "'"; - return 1; - } - - aTextPrs->SetAngle (Draw::Atof (theArgVec[anArgIt]) * (M_PI / 180.0)); + aTextPrs->SetAngle (Draw::Atof (theArgVec[++anArgIt]) * (M_PI / 180.0)); } - else if (aParam == "-zoom") + else if (aParam == "-zoom" + || aParam == "-nozoom" + || aParam == "-zoomable" + || aParam == "-nonzoomable") { - if (++anArgIt >= theArgsNb) - { - Message::SendFail() << "Syntax error: wrong number of values for parameter '" << aParam << "'"; - return 1; - } - - aTextPrs->SetZoomable (Draw::Atoi (theArgVec[anArgIt]) == 1); + const bool isZoomable = Draw::ParseOnOffNoIterator (theArgsNb, theArgVec, anArgIt); + aTextPrs->SetZoomable (isZoomable); } - else if (aParam == "-height") + else if (aParam == "-height" + && anArgIt + 1 < theArgsNb) { - if (++anArgIt >= theArgsNb) - { - Message::SendFail() << "Syntax error: wrong number of values for parameter '" << aParam << "'"; - return 1; - } - - aTextPrs->SetHeight (Draw::Atof(theArgVec[anArgIt])); + aTextPrs->SetHeight (Draw::Atof(theArgVec[++anArgIt])); } - else if (aParam == "-wrapping") + else if (aParam == "-wrapping" + && anArgIt + 1 < theArgsNb) { - if (++anArgIt >= theArgsNb) - { - Message::SendFail() << "Syntax error: wrong number of values for parameter '" << aParam << "'"; - return 1; - } - if (aTextFormatter.IsNull()) { aTextFormatter = new Font_TextFormatter(); } - aTextFormatter->SetWrapping ((Standard_ShortReal)Draw::Atof(theArgVec[anArgIt])); + aTextFormatter->SetWrapping ((Standard_ShortReal)Draw::Atof(theArgVec[++anArgIt])); } - else if (aParam == "-aspect") + else if (aParam == "-aspect" + && anArgIt + 1 < theArgsNb) { - if (++anArgIt >= theArgsNb) - { - Message::SendFail() << "Syntax error: wrong number of values for parameter '" << aParam << "'"; - return 1; - } - - TCollection_AsciiString anOption (theArgVec[anArgIt]); + TCollection_AsciiString anOption (theArgVec[++anArgIt]); anOption.LowerCase(); Font_FontAspect aFontAspect = Font_FA_Undefined; if (!parseFontStyle (anOption, aFontAspect)) @@ -2528,71 +2512,49 @@ static int VDrawText (Draw_Interpretor& theDI, } aTextPrs->SetFontAspect (aFontAspect); } - else if (aParam == "-font") + else if (aParam == "-font" + && anArgIt + 1 < theArgsNb) { - if (++anArgIt >= theArgsNb) - { - Message::SendFail() << "Syntax error: wrong number of values for parameter '" << aParam << "'"; - return 1; - } - - aTextPrs->SetFont (theArgVec[anArgIt]); + aTextPrs->SetFont (theArgVec[++anArgIt]); } - else if (aParam == "-plane") + else if (aParam == "-plane" + && anArgIt + 6 < theArgsNb) { - if (anArgIt + 6 >= theArgsNb) - { - Message::SendFail() << "Syntax error: wrong number of values for parameter '" << aParam << "'"; - return 1; - } - - Standard_Real aX = Draw::Atof (theArgVec[++anArgIt]); - Standard_Real aY = Draw::Atof (theArgVec[++anArgIt]); - Standard_Real aZ = Draw::Atof (theArgVec[++anArgIt]); - aNormal.SetCoord (aX, aY, aZ); - - aX = Draw::Atof (theArgVec[++anArgIt]); - aY = Draw::Atof (theArgVec[++anArgIt]); - aZ = Draw::Atof (theArgVec[++anArgIt]); - aDirection.SetCoord (aX, aY, aZ); - + aNormal.SetCoord (Draw::Atof (theArgVec[anArgIt + 1]), + Draw::Atof (theArgVec[anArgIt + 2]), + Draw::Atof (theArgVec[anArgIt + 3])); + aDirection.SetCoord (Draw::Atof (theArgVec[anArgIt + 4]), + Draw::Atof (theArgVec[anArgIt + 5]), + Draw::Atof (theArgVec[anArgIt + 6])); aHasPlane = Standard_True; + anArgIt += 6; } - else if (aParam == "-flipping") + else if (aParam == "-flipping" + || aParam == "-noflipping" + || aParam == "-flip" + || aParam == "-noflip") { - aTextPrs->SetFlipping (Standard_True); + const bool toFlip = Draw::ParseOnOffNoIterator (theArgsNb, theArgVec, anArgIt); + aTextPrs->SetFlipping (toFlip); } - else if (aParam == "-ownanchor") + else if (aParam == "-ownanchor" + || aParam == "-noownanchor") { - if (++anArgIt >= theArgsNb) - { - std::cout << "Error: wrong number of values for parameter '" << aParam.ToCString() << "'.\n"; - return 1; - } - aTextPrs->SetOwnAnchorPoint (Draw::Atoi (theArgVec[anArgIt]) == 1); + const bool isOwnAnchor = Draw::ParseOnOffNoIterator (theArgsNb, theArgVec, anArgIt); + aTextPrs->SetOwnAnchorPoint (isOwnAnchor); } - else if (aParam == "-disptype" - || aParam == "-displaytype") + else if ((aParam == "-disptype" + || aParam == "-displaytype") + && anArgIt + 1 < theArgsNb) { - if (++anArgIt >= theArgsNb) - { - Message::SendFail() << "Syntax error: wrong number of values for parameter '" << aParam << "'"; - return 1; - } - TCollection_AsciiString aType (theArgVec[anArgIt]); + TCollection_AsciiString aType (theArgVec[++anArgIt]); aType.LowerCase(); - if (aType == "subtitle") - aDisplayType = Aspect_TODT_SUBTITLE; - else if (aType == "decal") - aDisplayType = Aspect_TODT_DEKALE; - else if (aType == "blend") - aDisplayType = Aspect_TODT_BLEND; - else if (aType == "dimension") - aDisplayType = Aspect_TODT_DIMENSION; - else if (aType == "normal") - aDisplayType = Aspect_TODT_NORMAL; - else if (aType == "shadow") - aDisplayType = Aspect_TODT_SHADOW; + if (aType == "subtitle") { aDisplayType = Aspect_TODT_SUBTITLE; } + else if (aType == "decal") { aDisplayType = Aspect_TODT_DEKALE; } + else if (aType == "blend") { aDisplayType = Aspect_TODT_BLEND; } + else if (aType == "dimension") { aDisplayType = Aspect_TODT_DIMENSION; } + else if (aType == "normal") { aDisplayType = Aspect_TODT_NORMAL; } + else if (aType == "shadow") { aDisplayType = Aspect_TODT_SHADOW; } else { Message::SendFail() << "Syntax error: wrong display type '" << aType << "'"; diff --git a/tests/opengl/data/shadows/trsfpers b/tests/opengl/data/shadows/trsfpers new file mode 100644 index 0000000000..cd493f85ff --- /dev/null +++ b/tests/opengl/data/shadows/trsfpers @@ -0,0 +1,21 @@ +puts "========" +puts "0032758: Visualization, TKOpenGl - disable shadow-map from transform-persistence objects" +puts "========" + +pload MODELING VISUALIZATION +if { $::tcl_platform(os) == "Darwin" } { vcaps -core } +vinit View1 +vcamera -persp +vviewparams -scale 1.1 -proj 0.57 -0.57 0.57 -up -0.4 0.4 0.8 +vrenderparams -shadows +vlight headlight -castShadows 1 -head 0 -dir -1 -1 -1 +vtrihedron trih + +box g -250 -250 0 500 500 0 -preview +vdisplay -dispMode 1 g +vaspects g -color GRAY60 + +box b 20 10 50 +vdisplay -dispMode 1 b -trsfPers ZOOM -trsfPersPos 0 0 0 + +vdump $::imagedir/${::casename}.png From 7e524fcbe13f37dd5572ac249b1065fc1d937406 Mon Sep 17 00:00:00 2001 From: kgv Date: Mon, 10 Jan 2022 14:59:16 +0300 Subject: [PATCH 188/639] 0032764: Coding Rules - missing include guard in BRepExtrema_MapOfIntegerPackedMapOfInteger.hxx --- .../BRepExtrema_MapOfIntegerPackedMapOfInteger.hxx | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/BRepExtrema/BRepExtrema_MapOfIntegerPackedMapOfInteger.hxx b/src/BRepExtrema/BRepExtrema_MapOfIntegerPackedMapOfInteger.hxx index 47e8c24f4e..f7d734c1f6 100644 --- a/src/BRepExtrema/BRepExtrema_MapOfIntegerPackedMapOfInteger.hxx +++ b/src/BRepExtrema/BRepExtrema_MapOfIntegerPackedMapOfInteger.hxx @@ -13,8 +13,13 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. +#ifndef _BRepExtrema_MapOfIntegerPackedMapOfInteger_HeaderFile +#define _BRepExtrema_MapOfIntegerPackedMapOfInteger_HeaderFile + #include #include //! Set of overlapped sub-shapes. -typedef NCollection_DataMap BRepExtrema_MapOfIntegerPackedMapOfInteger; \ No newline at end of file +typedef NCollection_DataMap BRepExtrema_MapOfIntegerPackedMapOfInteger; + +#endif // _BRepExtrema_MapOfIntegerPackedMapOfInteger_HeaderFile From 9ff36dac47b6f3bac4a433e14832d2937a0a7d00 Mon Sep 17 00:00:00 2001 From: aml Date: Tue, 11 Jan 2022 16:37:26 +0300 Subject: [PATCH 189/639] 0032768: Coding - get rid of unused headers [BopAlgo to BRepBuilderAPI] --- src/BOPAlgo/BOPAlgo_ArgumentAnalyzer.cxx | 8 -------- src/BOPAlgo/BOPAlgo_ArgumentAnalyzer.hxx | 2 -- src/BOPAlgo/BOPAlgo_BOP.cxx | 1 - src/BOPAlgo/BOPAlgo_BOP.hxx | 3 --- src/BOPAlgo/BOPAlgo_Builder.hxx | 1 - src/BOPAlgo/BOPAlgo_BuilderFace.cxx | 9 --------- src/BOPAlgo/BOPAlgo_BuilderShape.hxx | 3 --- src/BOPAlgo/BOPAlgo_BuilderSolid.cxx | 15 -------------- src/BOPAlgo/BOPAlgo_Builder_1.cxx | 1 - src/BOPAlgo/BOPAlgo_Builder_2.cxx | 7 ------- src/BOPAlgo/BOPAlgo_Builder_3.cxx | 11 ---------- src/BOPAlgo/BOPAlgo_Builder_4.cxx | 1 - src/BOPAlgo/BOPAlgo_CellsBuilder.cxx | 1 - src/BOPAlgo/BOPAlgo_CellsBuilder.hxx | 4 ---- src/BOPAlgo/BOPAlgo_CheckResult.hxx | 1 - src/BOPAlgo/BOPAlgo_CheckerSI.cxx | 4 ---- src/BOPAlgo/BOPAlgo_CheckerSI.hxx | 2 -- src/BOPAlgo/BOPAlgo_CheckerSI_1.cxx | 1 - src/BOPAlgo/BOPAlgo_ListOfCheckResult.hxx | 1 - src/BOPAlgo/BOPAlgo_MakeConnected.cxx | 2 -- src/BOPAlgo/BOPAlgo_MakePeriodic.cxx | 2 -- src/BOPAlgo/BOPAlgo_MakerVolume.cxx | 1 - src/BOPAlgo/BOPAlgo_MakerVolume.hxx | 1 - src/BOPAlgo/BOPAlgo_Options.cxx | 1 - src/BOPAlgo/BOPAlgo_PaveFiller.cxx | 6 ------ src/BOPAlgo/BOPAlgo_PaveFiller.hxx | 1 - src/BOPAlgo/BOPAlgo_PaveFiller_1.cxx | 2 -- src/BOPAlgo/BOPAlgo_PaveFiller_10.cxx | 3 --- src/BOPAlgo/BOPAlgo_PaveFiller_2.cxx | 1 - src/BOPAlgo/BOPAlgo_PaveFiller_3.cxx | 5 ----- src/BOPAlgo/BOPAlgo_PaveFiller_4.cxx | 7 ------- src/BOPAlgo/BOPAlgo_PaveFiller_5.cxx | 3 --- src/BOPAlgo/BOPAlgo_PaveFiller_6.cxx | 6 ------ src/BOPAlgo/BOPAlgo_PaveFiller_7.cxx | 4 ---- src/BOPAlgo/BOPAlgo_PaveFiller_8.cxx | 8 -------- src/BOPAlgo/BOPAlgo_PaveFiller_9.cxx | 5 ----- src/BOPAlgo/BOPAlgo_Section.cxx | 7 ------- src/BOPAlgo/BOPAlgo_Section.hxx | 1 - src/BOPAlgo/BOPAlgo_SectionAttribute.hxx | 2 -- src/BOPAlgo/BOPAlgo_Tools.cxx | 4 ---- src/BOPAlgo/BOPAlgo_Tools.hxx | 1 - src/BOPAlgo/BOPAlgo_ToolsProvider.cxx | 1 - src/BOPAlgo/BOPAlgo_WireSplitter.cxx | 7 ------- src/BOPAlgo/BOPAlgo_WireSplitter_1.cxx | 6 ------ src/BOPDS/BOPDS_CommonBlock.hxx | 1 - src/BOPDS/BOPDS_Curve.hxx | 1 - src/BOPDS/BOPDS_DS.cxx | 7 ------- src/BOPDS/BOPDS_DS.hxx | 3 --- .../BOPDS_DataMapOfIntegerListOfPaveBlock.hxx | 1 - src/BOPDS/BOPDS_IndexRange.hxx | 1 - src/BOPDS/BOPDS_Iterator.cxx | 2 -- src/BOPDS/BOPDS_Iterator.hxx | 2 -- src/BOPDS/BOPDS_IteratorSI.cxx | 11 ---------- src/BOPDS/BOPDS_Pair.hxx | 1 - src/BOPDS/BOPDS_PairMapHasher.hxx | 2 -- src/BOPDS/BOPDS_Pave.hxx | 1 - src/BOPDS/BOPDS_PaveBlock.cxx | 2 -- src/BOPDS/BOPDS_PaveBlock.hxx | 3 --- src/BOPDS/BOPDS_PaveMapHasher.hxx | 2 -- src/BOPDS/BOPDS_Point.hxx | 1 - src/BOPDS/BOPDS_ShapeInfo.cxx | 2 -- src/BOPDS/BOPDS_ShapeInfo.hxx | 1 - src/BOPDS/BOPDS_SubIterator.cxx | 3 --- src/BOPDS/BOPDS_SubIterator.hxx | 2 -- src/BOPDS/BOPDS_Tools.hxx | 3 --- src/BOPDS/BOPDS_VectorOfListOfPaveBlock.hxx | 1 - src/BOPTest/BOPTest.cxx | 5 ----- src/BOPTest/BOPTest_APICommands.cxx | 4 ---- src/BOPTest/BOPTest_BOPCommands.cxx | 6 ------ src/BOPTest/BOPTest_DebugCommands.cxx | 1 - src/BOPTest/BOPTest_DrawableShape.cxx | 10 ---------- src/BOPTest/BOPTest_DrawableShape.hxx | 3 --- src/BOPTest/BOPTest_LowCommands.cxx | 3 --- src/BOPTest/BOPTest_MkConnectedCommands.cxx | 1 - src/BOPTest/BOPTest_Objects.hxx | 3 --- src/BOPTest/BOPTest_OptionCommands.cxx | 1 - src/BOPTest/BOPTest_PartitionCommands.cxx | 4 ---- src/BOPTest/BOPTest_PeriodicityCommands.cxx | 1 - .../BOPTest_RemoveFeaturesCommands.cxx | 4 ---- src/BOPTest/BOPTest_TolerCommands.cxx | 5 ----- src/BOPTest/BOPTest_UtilityCommands.cxx | 2 -- src/BOPTools/BOPTools_AlgoTools.cxx | 3 --- src/BOPTools/BOPTools_AlgoTools2D.cxx | 20 ------------------- src/BOPTools/BOPTools_AlgoTools2D_1.cxx | 9 --------- src/BOPTools/BOPTools_AlgoTools3D.cxx | 15 -------------- src/BOPTools/BOPTools_AlgoTools3D.hxx | 2 -- src/BOPTools/BOPTools_AlgoTools_1.cxx | 11 ---------- src/BOPTools/BOPTools_AlgoTools_2.cxx | 2 -- src/BOPTools/BOPTools_BoxTree.hxx | 2 -- src/BOPTools/BOPTools_PairSelector.hxx | 1 - src/BOPTools/BOPTools_Parallel.hxx | 2 -- src/BOPTools/BOPTools_Set.hxx | 2 -- src/BOPTools/BOPTools_SetMapHasher.hxx | 2 -- src/BRep/BRep_Builder.cxx | 3 --- src/BRep/BRep_Builder.hxx | 10 ++-------- src/BRep/BRep_Curve3D.hxx | 2 -- src/BRep/BRep_CurveOn2Surfaces.hxx | 4 ---- src/BRep/BRep_CurveOnClosedSurface.hxx | 4 ---- src/BRep/BRep_CurveOnSurface.hxx | 2 -- src/BRep/BRep_CurveRepresentation.cxx | 2 -- src/BRep/BRep_CurveRepresentation.hxx | 2 -- src/BRep/BRep_GCurve.cxx | 1 - src/BRep/BRep_GCurve.hxx | 1 - src/BRep/BRep_PointOnCurve.hxx | 2 -- src/BRep/BRep_PointOnCurveOnSurface.hxx | 2 -- src/BRep/BRep_PointOnSurface.hxx | 2 -- src/BRep/BRep_PointRepresentation.cxx | 1 - src/BRep/BRep_PointRepresentation.hxx | 2 -- src/BRep/BRep_PointsOnSurface.hxx | 1 - src/BRep/BRep_Polygon3D.hxx | 1 - src/BRep/BRep_PolygonOnClosedSurface.hxx | 1 - .../BRep_PolygonOnClosedTriangulation.hxx | 1 - src/BRep/BRep_PolygonOnSurface.hxx | 1 - src/BRep/BRep_PolygonOnTriangulation.hxx | 1 - src/BRep/BRep_TEdge.cxx | 3 --- src/BRep/BRep_TEdge.hxx | 2 -- src/BRep/BRep_TFace.cxx | 1 - src/BRep/BRep_TFace.hxx | 2 -- src/BRep/BRep_TVertex.cxx | 1 - src/BRep/BRep_TVertex.hxx | 1 - src/BRep/BRep_Tool.cxx | 7 ------- src/BRepAdaptor/BRepAdaptor_CompCurve.cxx | 5 ----- src/BRepAdaptor/BRepAdaptor_Curve.cxx | 4 ---- src/BRepAdaptor/BRepAdaptor_Curve.hxx | 1 - src/BRepAdaptor/BRepAdaptor_Curve2d.cxx | 1 - .../BRepAdaptor_HArray1OfCurve.hxx | 1 - src/BRepAdaptor/BRepAdaptor_Surface.cxx | 3 --- src/BRepAdaptor/BRepAdaptor_Surface.hxx | 1 - src/BRepAlgo/BRepAlgo.cxx | 6 ------ src/BRepAlgo/BRepAlgo.hxx | 2 -- src/BRepAlgo/BRepAlgo_1.cxx | 6 ------ src/BRepAlgo/BRepAlgo_AsDes.cxx | 1 - src/BRepAlgo/BRepAlgo_AsDes.hxx | 2 -- src/BRepAlgo/BRepAlgo_FaceRestrictor.cxx | 1 - src/BRepAlgo/BRepAlgo_FaceRestrictor.hxx | 3 --- src/BRepAlgo/BRepAlgo_Loop.cxx | 2 -- src/BRepAlgo/BRepAlgo_Loop.hxx | 2 -- src/BRepAlgo/BRepAlgo_NormalProjection.cxx | 6 ------ src/BRepAlgo/BRepAlgo_NormalProjection.hxx | 3 --- src/BRepAlgoAPI/BRepAlgoAPI_Algo.hxx | 2 -- src/BRepAlgoAPI/BRepAlgoAPI_BuilderAlgo.hxx | 1 - src/BRepAlgoAPI/BRepAlgoAPI_Check.hxx | 2 -- src/BRepAlgoAPI/BRepAlgoAPI_Common.cxx | 1 - src/BRepAlgoAPI/BRepAlgoAPI_Common.hxx | 1 - src/BRepAlgoAPI/BRepAlgoAPI_Cut.cxx | 1 - src/BRepAlgoAPI/BRepAlgoAPI_Cut.hxx | 2 -- src/BRepAlgoAPI/BRepAlgoAPI_Defeaturing.cxx | 2 -- src/BRepAlgoAPI/BRepAlgoAPI_Fuse.cxx | 1 - src/BRepAlgoAPI/BRepAlgoAPI_Fuse.hxx | 1 - src/BRepAlgoAPI/BRepAlgoAPI_Section.cxx | 1 - src/BRepApprox/BRepApprox_Approx.hxx | 1 - src/BRepApprox/BRepApprox_ApproxLine.hxx | 1 - ...MyBSplGradientOfTheComputeLineOfApprox.hxx | 3 --- ...MyBSplGradientOfTheComputeLineOfApprox.hxx | 4 ---- ...MyBSplGradientOfTheComputeLineOfApprox.hxx | 1 - ...GradientOfTheComputeLineBezierOfApprox.hxx | 3 --- ...fMyGradientbisOfTheComputeLineOfApprox.hxx | 3 --- ...MyBSplGradientOfTheComputeLineOfApprox.hxx | 1 - ...GradientOfTheComputeLineBezierOfApprox.hxx | 1 - ..._MyGradientbisOfTheComputeLineOfApprox.hxx | 1 - ...GradientOfTheComputeLineBezierOfApprox.hxx | 4 ---- ...fMyGradientbisOfTheComputeLineOfApprox.hxx | 4 ---- ...GradientOfTheComputeLineBezierOfApprox.hxx | 1 - ...fMyGradientbisOfTheComputeLineOfApprox.hxx | 1 - ...GradientOfTheComputeLineBezierOfApprox.hxx | 1 - ...fMyGradientbisOfTheComputeLineOfApprox.hxx | 1 - src/BRepApprox/BRepApprox_SurfaceTool.cxx | 6 ------ ...RepApprox_TheComputeLineBezierOfApprox.hxx | 2 -- .../BRepApprox_TheComputeLineOfApprox.hxx | 2 -- ...fTheInt2SOfThePrmPrmSvSurfacesOfApprox.hxx | 5 ----- ...BRepApprox_TheImpPrmSvSurfacesOfApprox.hxx | 1 - ..._TheInt2SOfThePrmPrmSvSurfacesOfApprox.hxx | 3 --- .../BRepApprox_TheMultiLineToolOfApprox.hxx | 6 ------ ...BRepApprox_ThePrmPrmSvSurfacesOfApprox.hxx | 1 - ...erImpFuncOfTheImpPrmSvSurfacesOfApprox.hxx | 5 ----- src/BRepBlend/BRepBlend_AppFunc.cxx | 3 --- src/BRepBlend/BRepBlend_AppFunc.hxx | 1 - src/BRepBlend/BRepBlend_AppFuncRoot.cxx | 8 -------- src/BRepBlend/BRepBlend_AppFuncRoot.hxx | 2 -- src/BRepBlend/BRepBlend_AppFuncRst.cxx | 3 --- src/BRepBlend/BRepBlend_AppFuncRst.hxx | 1 - src/BRepBlend/BRepBlend_AppFuncRstRst.cxx | 3 --- src/BRepBlend/BRepBlend_AppFuncRstRst.hxx | 1 - src/BRepBlend/BRepBlend_AppSurface.cxx | 3 --- src/BRepBlend/BRepBlend_AppSurface.hxx | 2 -- src/BRepBlend/BRepBlend_BlendTool.cxx | 4 ---- src/BRepBlend/BRepBlend_CSWalking.hxx | 2 -- src/BRepBlend/BRepBlend_CurvPointRadInv.hxx | 2 -- src/BRepBlend/BRepBlend_Extremity.cxx | 2 -- src/BRepBlend/BRepBlend_HCurve2dTool.cxx | 7 ------- src/BRepBlend/BRepBlend_HCurve2dTool.hxx | 2 -- src/BRepBlend/BRepBlend_HCurveTool.cxx | 7 ------- src/BRepBlend/BRepBlend_HCurveTool.hxx | 2 -- src/BRepBlend/BRepBlend_Line.cxx | 3 --- src/BRepBlend/BRepBlend_Line.hxx | 6 +----- src/BRepBlend/BRepBlend_PointOnRst.cxx | 1 - src/BRepBlend/BRepBlend_RstRstConstRad.cxx | 1 - src/BRepBlend/BRepBlend_RstRstEvolRad.cxx | 1 - src/BRepBlend/BRepBlend_RstRstLineBuilder.cxx | 4 ---- .../BRepBlend_SurfCurvConstRadInv.cxx | 2 -- .../BRepBlend_SurfCurvEvolRadInv.cxx | 2 -- .../BRepBlend_SurfPointConstRadInv.cxx | 2 -- .../BRepBlend_SurfPointEvolRadInv.cxx | 2 -- src/BRepBlend/BRepBlend_SurfRstConstRad.cxx | 3 --- src/BRepBlend/BRepBlend_SurfRstEvolRad.cxx | 3 --- .../BRepBlend_SurfRstLineBuilder.cxx | 4 ---- src/BRepBndLib/BRepBndLib.cxx | 3 --- src/BRepBndLib/BRepBndLib.hxx | 2 -- src/BRepBndLib/BRepBndLib_1.cxx | 10 ---------- src/BRepBuilderAPI/BRepBuilderAPI.cxx | 10 ---------- src/BRepBuilderAPI/BRepBuilderAPI_Collect.cxx | 1 - src/BRepBuilderAPI/BRepBuilderAPI_Copy.hxx | 1 - .../BRepBuilderAPI_FindPlane.cxx | 1 - .../BRepBuilderAPI_FindPlane.hxx | 2 -- .../BRepBuilderAPI_GTransform.cxx | 4 ---- .../BRepBuilderAPI_GTransform.hxx | 2 -- .../BRepBuilderAPI_MakeEdge.cxx | 3 --- .../BRepBuilderAPI_MakeEdge.hxx | 1 - .../BRepBuilderAPI_MakeEdge2d.cxx | 1 - .../BRepBuilderAPI_MakeEdge2d.hxx | 1 - .../BRepBuilderAPI_MakeFace.cxx | 1 - .../BRepBuilderAPI_MakeFace.hxx | 1 - .../BRepBuilderAPI_MakePolygon.cxx | 1 - .../BRepBuilderAPI_MakePolygon.hxx | 1 - .../BRepBuilderAPI_MakeShape.cxx | 5 ----- .../BRepBuilderAPI_MakeShape.hxx | 1 - .../BRepBuilderAPI_MakeShell.cxx | 1 - .../BRepBuilderAPI_MakeShell.hxx | 1 - .../BRepBuilderAPI_MakeSolid.cxx | 1 - .../BRepBuilderAPI_MakeSolid.hxx | 1 - .../BRepBuilderAPI_MakeVertex.cxx | 3 --- .../BRepBuilderAPI_MakeWire.cxx | 1 - .../BRepBuilderAPI_MakeWire.hxx | 1 - .../BRepBuilderAPI_ModifyShape.cxx | 1 - .../BRepBuilderAPI_NurbsConvert.cxx | 2 -- .../BRepBuilderAPI_NurbsConvert.hxx | 2 -- src/BRepBuilderAPI/BRepBuilderAPI_Sewing.cxx | 16 --------------- src/BRepBuilderAPI/BRepBuilderAPI_Sewing.hxx | 2 -- .../BRepBuilderAPI_Transform.cxx | 2 -- .../BRepBuilderAPI_Transform.hxx | 2 -- .../BRepBuilderAPI_VertexInspector.hxx | 1 - 241 files changed, 3 insertions(+), 705 deletions(-) diff --git a/src/BOPAlgo/BOPAlgo_ArgumentAnalyzer.cxx b/src/BOPAlgo/BOPAlgo_ArgumentAnalyzer.cxx index 9a79159b94..af16ada090 100644 --- a/src/BOPAlgo/BOPAlgo_ArgumentAnalyzer.cxx +++ b/src/BOPAlgo/BOPAlgo_ArgumentAnalyzer.cxx @@ -22,28 +22,20 @@ #include #include #include -#include #include -#include #include #include #include #include #include #include -#include #include #include #include -#include #include -#include #include #include -#include -#include #include -#include #include #include #include diff --git a/src/BOPAlgo/BOPAlgo_ArgumentAnalyzer.hxx b/src/BOPAlgo/BOPAlgo_ArgumentAnalyzer.hxx index e8682ce789..854215817f 100644 --- a/src/BOPAlgo/BOPAlgo_ArgumentAnalyzer.hxx +++ b/src/BOPAlgo/BOPAlgo_ArgumentAnalyzer.hxx @@ -21,11 +21,9 @@ #include #include -#include #include #include #include -#include #include diff --git a/src/BOPAlgo/BOPAlgo_BOP.cxx b/src/BOPAlgo/BOPAlgo_BOP.cxx index 1c6c51ae7f..39641f6869 100644 --- a/src/BOPAlgo/BOPAlgo_BOP.cxx +++ b/src/BOPAlgo/BOPAlgo_BOP.cxx @@ -23,7 +23,6 @@ #include #include #include -#include #include #include #include diff --git a/src/BOPAlgo/BOPAlgo_BOP.hxx b/src/BOPAlgo/BOPAlgo_BOP.hxx index 7146fc8015..ea63fa5276 100644 --- a/src/BOPAlgo/BOPAlgo_BOP.hxx +++ b/src/BOPAlgo/BOPAlgo_BOP.hxx @@ -19,14 +19,11 @@ #include #include -#include #include #include #include #include #include -#include -#include class BOPAlgo_PaveFiller; //! diff --git a/src/BOPAlgo/BOPAlgo_Builder.hxx b/src/BOPAlgo/BOPAlgo_Builder.hxx index 85b6a3e726..402c0855e2 100644 --- a/src/BOPAlgo/BOPAlgo_Builder.hxx +++ b/src/BOPAlgo/BOPAlgo_Builder.hxx @@ -34,7 +34,6 @@ #include #include #include -#include #include class IntTools_Context; class TopoDS_Shape; diff --git a/src/BOPAlgo/BOPAlgo_BuilderFace.cxx b/src/BOPAlgo/BOPAlgo_BuilderFace.cxx index 46addcede5..2154b04c30 100644 --- a/src/BOPAlgo/BOPAlgo_BuilderFace.cxx +++ b/src/BOPAlgo/BOPAlgo_BuilderFace.cxx @@ -16,14 +16,11 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -#include -#include #include #include #include #include #include -#include #include #include #include @@ -31,16 +28,10 @@ #include #include #include -#include -#include -#include #include -#include #include #include -#include #include -#include #include #include #include diff --git a/src/BOPAlgo/BOPAlgo_BuilderShape.hxx b/src/BOPAlgo/BOPAlgo_BuilderShape.hxx index a2885a631a..4b66dd7d12 100644 --- a/src/BOPAlgo/BOPAlgo_BuilderShape.hxx +++ b/src/BOPAlgo/BOPAlgo_BuilderShape.hxx @@ -25,13 +25,10 @@ #include #include -#include - #include #include #include #include -#include class TopoDS_Shape; //! Root class for algorithms that has shape as result. diff --git a/src/BOPAlgo/BOPAlgo_BuilderSolid.cxx b/src/BOPAlgo/BOPAlgo_BuilderSolid.cxx index 4dfe15c897..023eecfbe9 100644 --- a/src/BOPAlgo/BOPAlgo_BuilderSolid.cxx +++ b/src/BOPAlgo/BOPAlgo_BuilderSolid.cxx @@ -20,29 +20,15 @@ #include #include #include -#include #include -#include #include #include #include #include -#include #include -#include -#include -#include -#include -#include -#include -#include -#include #include #include #include -#include -#include -#include #include #include #include @@ -53,7 +39,6 @@ #include #include #include -#include #include #include #include diff --git a/src/BOPAlgo/BOPAlgo_Builder_1.cxx b/src/BOPAlgo/BOPAlgo_Builder_1.cxx index f343f9d274..df89fac43a 100644 --- a/src/BOPAlgo/BOPAlgo_Builder_1.cxx +++ b/src/BOPAlgo/BOPAlgo_Builder_1.cxx @@ -22,7 +22,6 @@ #include #include #include -#include #include #include #include diff --git a/src/BOPAlgo/BOPAlgo_Builder_2.cxx b/src/BOPAlgo/BOPAlgo_Builder_2.cxx index 07bbf9bbbf..f2ebfef171 100644 --- a/src/BOPAlgo/BOPAlgo_Builder_2.cxx +++ b/src/BOPAlgo/BOPAlgo_Builder_2.cxx @@ -24,27 +24,20 @@ #include #include #include -#include #include #include -#include #include -#include #include #include #include -#include -#include #include #include #include #include #include -#include #include #include #include -#include #include #include #include diff --git a/src/BOPAlgo/BOPAlgo_Builder_3.cxx b/src/BOPAlgo/BOPAlgo_Builder_3.cxx index 1a6fd06f3a..390b762625 100644 --- a/src/BOPAlgo/BOPAlgo_Builder_3.cxx +++ b/src/BOPAlgo/BOPAlgo_Builder_3.cxx @@ -17,28 +17,18 @@ // #include // -#include // -#include #include // #include #include -#include -#include #include -#include -#include -#include -#include -#include // #include #include // #include // -#include #include // #include @@ -52,7 +42,6 @@ #include // #include -#include #include #include diff --git a/src/BOPAlgo/BOPAlgo_Builder_4.cxx b/src/BOPAlgo/BOPAlgo_Builder_4.cxx index a9d125f070..e18bcb6d84 100644 --- a/src/BOPAlgo/BOPAlgo_Builder_4.cxx +++ b/src/BOPAlgo/BOPAlgo_Builder_4.cxx @@ -22,7 +22,6 @@ #include #include #include -#include //======================================================================= //function : LocGenerated diff --git a/src/BOPAlgo/BOPAlgo_CellsBuilder.cxx b/src/BOPAlgo/BOPAlgo_CellsBuilder.cxx index e9645238e4..ee8b58f2b8 100644 --- a/src/BOPAlgo/BOPAlgo_CellsBuilder.cxx +++ b/src/BOPAlgo/BOPAlgo_CellsBuilder.cxx @@ -19,7 +19,6 @@ #include #include #include -#include #include #include #include diff --git a/src/BOPAlgo/BOPAlgo_CellsBuilder.hxx b/src/BOPAlgo/BOPAlgo_CellsBuilder.hxx index fd03822e54..ea922c8881 100644 --- a/src/BOPAlgo/BOPAlgo_CellsBuilder.hxx +++ b/src/BOPAlgo/BOPAlgo_CellsBuilder.hxx @@ -16,14 +16,10 @@ #ifndef _BOPAlgo_CellsBuilder_HeaderFile #define _BOPAlgo_CellsBuilder_HeaderFile -#include #include -#include #include -#include -#include #include #include diff --git a/src/BOPAlgo/BOPAlgo_CheckResult.hxx b/src/BOPAlgo/BOPAlgo_CheckResult.hxx index ffe75bd02b..8234d39731 100644 --- a/src/BOPAlgo/BOPAlgo_CheckResult.hxx +++ b/src/BOPAlgo/BOPAlgo_CheckResult.hxx @@ -23,7 +23,6 @@ #include #include #include -#include //! contains information about faulty shapes and faulty types diff --git a/src/BOPAlgo/BOPAlgo_CheckerSI.cxx b/src/BOPAlgo/BOPAlgo_CheckerSI.cxx index 6c93b78613..0f7db656d1 100644 --- a/src/BOPAlgo/BOPAlgo_CheckerSI.cxx +++ b/src/BOPAlgo/BOPAlgo_CheckerSI.cxx @@ -31,17 +31,13 @@ #include #include #include -#include -#include #include #include #include #include -#include #include #include #include -#include #include //======================================================================= diff --git a/src/BOPAlgo/BOPAlgo_CheckerSI.hxx b/src/BOPAlgo/BOPAlgo_CheckerSI.hxx index 31dd03118a..ba2f853d9a 100644 --- a/src/BOPAlgo/BOPAlgo_CheckerSI.hxx +++ b/src/BOPAlgo/BOPAlgo_CheckerSI.hxx @@ -22,8 +22,6 @@ #include #include -#include -#include #include diff --git a/src/BOPAlgo/BOPAlgo_CheckerSI_1.cxx b/src/BOPAlgo/BOPAlgo_CheckerSI_1.cxx index d607cba573..a033ba6101 100644 --- a/src/BOPAlgo/BOPAlgo_CheckerSI_1.cxx +++ b/src/BOPAlgo/BOPAlgo_CheckerSI_1.cxx @@ -33,7 +33,6 @@ #include #include #include -#include #include ///////////////////////////////////////////////////////////////////////// diff --git a/src/BOPAlgo/BOPAlgo_ListOfCheckResult.hxx b/src/BOPAlgo/BOPAlgo_ListOfCheckResult.hxx index a9bd854381..a72a0583c4 100644 --- a/src/BOPAlgo/BOPAlgo_ListOfCheckResult.hxx +++ b/src/BOPAlgo/BOPAlgo_ListOfCheckResult.hxx @@ -14,7 +14,6 @@ #ifndef BOPAlgo_ListOfCheckResult_HeaderFile #define BOPAlgo_ListOfCheckResult_HeaderFile -#include #include typedef NCollection_List BOPAlgo_ListOfCheckResult; diff --git a/src/BOPAlgo/BOPAlgo_MakeConnected.cxx b/src/BOPAlgo/BOPAlgo_MakeConnected.cxx index 7709b8cb9a..cd06cabe6a 100644 --- a/src/BOPAlgo/BOPAlgo_MakeConnected.cxx +++ b/src/BOPAlgo/BOPAlgo_MakeConnected.cxx @@ -25,8 +25,6 @@ #include -#include - //======================================================================= //function : Perform //purpose : Makes the shapes connected diff --git a/src/BOPAlgo/BOPAlgo_MakePeriodic.cxx b/src/BOPAlgo/BOPAlgo_MakePeriodic.cxx index 1b32d93921..677d4ad21a 100644 --- a/src/BOPAlgo/BOPAlgo_MakePeriodic.cxx +++ b/src/BOPAlgo/BOPAlgo_MakePeriodic.cxx @@ -17,8 +17,6 @@ #include -#include - #include #include diff --git a/src/BOPAlgo/BOPAlgo_MakerVolume.cxx b/src/BOPAlgo/BOPAlgo_MakerVolume.cxx index 2332cec777..58e480dc28 100644 --- a/src/BOPAlgo/BOPAlgo_MakerVolume.cxx +++ b/src/BOPAlgo/BOPAlgo_MakerVolume.cxx @@ -21,7 +21,6 @@ #include #include #include -#include #include #include #include diff --git a/src/BOPAlgo/BOPAlgo_MakerVolume.hxx b/src/BOPAlgo/BOPAlgo_MakerVolume.hxx index 2a4dbbffb7..ee64155bc1 100644 --- a/src/BOPAlgo/BOPAlgo_MakerVolume.hxx +++ b/src/BOPAlgo/BOPAlgo_MakerVolume.hxx @@ -18,7 +18,6 @@ #include #include #include -#include #include #include diff --git a/src/BOPAlgo/BOPAlgo_Options.cxx b/src/BOPAlgo/BOPAlgo_Options.cxx index 7ff5d35b07..45785e5b0f 100644 --- a/src/BOPAlgo/BOPAlgo_Options.cxx +++ b/src/BOPAlgo/BOPAlgo_Options.cxx @@ -20,7 +20,6 @@ #include #include #include -#include #include namespace diff --git a/src/BOPAlgo/BOPAlgo_PaveFiller.cxx b/src/BOPAlgo/BOPAlgo_PaveFiller.cxx index afe18b1e8d..be31c116d8 100644 --- a/src/BOPAlgo/BOPAlgo_PaveFiller.cxx +++ b/src/BOPAlgo/BOPAlgo_PaveFiller.cxx @@ -19,18 +19,12 @@ #include #include #include -#include #include #include -#include -#include #include #include #include #include -#include -#include -#include namespace { diff --git a/src/BOPAlgo/BOPAlgo_PaveFiller.hxx b/src/BOPAlgo/BOPAlgo_PaveFiller.hxx index f5182858b3..431accaa9e 100644 --- a/src/BOPAlgo/BOPAlgo_PaveFiller.hxx +++ b/src/BOPAlgo/BOPAlgo_PaveFiller.hxx @@ -39,7 +39,6 @@ #include #include #include -#include #include #include #include diff --git a/src/BOPAlgo/BOPAlgo_PaveFiller_1.cxx b/src/BOPAlgo/BOPAlgo_PaveFiller_1.cxx index aa1e754562..9435f46ec6 100644 --- a/src/BOPAlgo/BOPAlgo_PaveFiller_1.cxx +++ b/src/BOPAlgo/BOPAlgo_PaveFiller_1.cxx @@ -22,7 +22,6 @@ #include #include #include -#include #include #include #include @@ -35,7 +34,6 @@ #include #include #include -#include #include #include #include diff --git a/src/BOPAlgo/BOPAlgo_PaveFiller_10.cxx b/src/BOPAlgo/BOPAlgo_PaveFiller_10.cxx index b5c9eff0a5..bacc0fbccf 100644 --- a/src/BOPAlgo/BOPAlgo_PaveFiller_10.cxx +++ b/src/BOPAlgo/BOPAlgo_PaveFiller_10.cxx @@ -26,12 +26,9 @@ #include #include -#include #include #include -#include -#include #include #include #include diff --git a/src/BOPAlgo/BOPAlgo_PaveFiller_2.cxx b/src/BOPAlgo/BOPAlgo_PaveFiller_2.cxx index c91453ec4f..eecb0ff9a3 100644 --- a/src/BOPAlgo/BOPAlgo_PaveFiller_2.cxx +++ b/src/BOPAlgo/BOPAlgo_PaveFiller_2.cxx @@ -32,7 +32,6 @@ #include #include #include -#include #include #include #include diff --git a/src/BOPAlgo/BOPAlgo_PaveFiller_3.cxx b/src/BOPAlgo/BOPAlgo_PaveFiller_3.cxx index 0d31a176bf..0e36f380fb 100644 --- a/src/BOPAlgo/BOPAlgo_PaveFiller_3.cxx +++ b/src/BOPAlgo/BOPAlgo_PaveFiller_3.cxx @@ -20,7 +20,6 @@ #include #include #include -#include #include #include #include @@ -30,12 +29,9 @@ #include #include #include -#include #include #include -#include #include -#include #include #include #include @@ -43,7 +39,6 @@ #include #include #include -#include #include #include #include diff --git a/src/BOPAlgo/BOPAlgo_PaveFiller_4.cxx b/src/BOPAlgo/BOPAlgo_PaveFiller_4.cxx index 6b5287a022..e39b6276a1 100644 --- a/src/BOPAlgo/BOPAlgo_PaveFiller_4.cxx +++ b/src/BOPAlgo/BOPAlgo_PaveFiller_4.cxx @@ -18,21 +18,14 @@ #include #include -#include -#include #include #include #include #include #include -#include #include #include #include -#include -#include -#include -#include #include #include #include diff --git a/src/BOPAlgo/BOPAlgo_PaveFiller_5.cxx b/src/BOPAlgo/BOPAlgo_PaveFiller_5.cxx index 827135c9b4..0e4c6ed89f 100644 --- a/src/BOPAlgo/BOPAlgo_PaveFiller_5.cxx +++ b/src/BOPAlgo/BOPAlgo_PaveFiller_5.cxx @@ -21,9 +21,7 @@ #include #include #include -#include #include -#include #include #include #include @@ -35,7 +33,6 @@ #include #include #include -#include #include #include #include diff --git a/src/BOPAlgo/BOPAlgo_PaveFiller_6.cxx b/src/BOPAlgo/BOPAlgo_PaveFiller_6.cxx index a0824caf24..4dff51109f 100644 --- a/src/BOPAlgo/BOPAlgo_PaveFiller_6.cxx +++ b/src/BOPAlgo/BOPAlgo_PaveFiller_6.cxx @@ -20,7 +20,6 @@ #include #include #include -#include #include #include #include @@ -44,10 +43,7 @@ #include #include #include -#include -#include #include -#include #include #include #include @@ -65,13 +61,11 @@ #include #include #include -#include #include #include #include #include #include -#include #include #include #include diff --git a/src/BOPAlgo/BOPAlgo_PaveFiller_7.cxx b/src/BOPAlgo/BOPAlgo_PaveFiller_7.cxx index 969d3e1b44..c78e87804f 100644 --- a/src/BOPAlgo/BOPAlgo_PaveFiller_7.cxx +++ b/src/BOPAlgo/BOPAlgo_PaveFiller_7.cxx @@ -19,7 +19,6 @@ #include #include #include -#include #include #include #include @@ -28,7 +27,6 @@ #include #include #include -#include #include #include #include @@ -52,11 +50,9 @@ #include #include #include -#include #include #include #include -#include #include #include #include diff --git a/src/BOPAlgo/BOPAlgo_PaveFiller_8.cxx b/src/BOPAlgo/BOPAlgo_PaveFiller_8.cxx index d71031252d..6a90599df3 100644 --- a/src/BOPAlgo/BOPAlgo_PaveFiller_8.cxx +++ b/src/BOPAlgo/BOPAlgo_PaveFiller_8.cxx @@ -16,25 +16,17 @@ // commercial license or contractual agreement. #include -#include -#include #include #include -#include #include #include #include #include #include -#include #include #include -#include -#include #include #include -#include -#include #include #include #include diff --git a/src/BOPAlgo/BOPAlgo_PaveFiller_9.cxx b/src/BOPAlgo/BOPAlgo_PaveFiller_9.cxx index 107822398e..50a2efb8c5 100644 --- a/src/BOPAlgo/BOPAlgo_PaveFiller_9.cxx +++ b/src/BOPAlgo/BOPAlgo_PaveFiller_9.cxx @@ -13,23 +13,18 @@ // commercial license or contractual agreement. -#include #include -#include -#include #include #include #include #include #include #include -#include #include #include #include #include #include -#include #include // diff --git a/src/BOPAlgo/BOPAlgo_Section.cxx b/src/BOPAlgo/BOPAlgo_Section.cxx index e889a5c514..47b97ef5a2 100644 --- a/src/BOPAlgo/BOPAlgo_Section.cxx +++ b/src/BOPAlgo/BOPAlgo_Section.cxx @@ -16,23 +16,16 @@ #include #include #include -#include #include #include #include -#include #include -#include #include #include #include -#include #include #include #include -#include -#include -#include #include #include #include diff --git a/src/BOPAlgo/BOPAlgo_Section.hxx b/src/BOPAlgo/BOPAlgo_Section.hxx index 613050a8bf..b1b3d08d55 100644 --- a/src/BOPAlgo/BOPAlgo_Section.hxx +++ b/src/BOPAlgo/BOPAlgo_Section.hxx @@ -21,7 +21,6 @@ #include #include -#include class BOPAlgo_PaveFiller; diff --git a/src/BOPAlgo/BOPAlgo_SectionAttribute.hxx b/src/BOPAlgo/BOPAlgo_SectionAttribute.hxx index a0770c3c7a..6236830be1 100644 --- a/src/BOPAlgo/BOPAlgo_SectionAttribute.hxx +++ b/src/BOPAlgo/BOPAlgo_SectionAttribute.hxx @@ -16,8 +16,6 @@ #ifndef _BOPAlgo_SectionAttribute_HeaderFile #define _BOPAlgo_SectionAttribute_HeaderFile -#include - //! Class is a container of the flags used //! by intersection algorithm class BOPAlgo_SectionAttribute diff --git a/src/BOPAlgo/BOPAlgo_Tools.cxx b/src/BOPAlgo/BOPAlgo_Tools.cxx index c102ed7c53..13151f8413 100644 --- a/src/BOPAlgo/BOPAlgo_Tools.cxx +++ b/src/BOPAlgo/BOPAlgo_Tools.cxx @@ -17,14 +17,10 @@ #include #include -#include #include #include -#include -#include #include #include -#include #include #include #include diff --git a/src/BOPAlgo/BOPAlgo_Tools.hxx b/src/BOPAlgo/BOPAlgo_Tools.hxx index f6aaee2c25..ec6cce7908 100644 --- a/src/BOPAlgo/BOPAlgo_Tools.hxx +++ b/src/BOPAlgo/BOPAlgo_Tools.hxx @@ -17,7 +17,6 @@ #include #include -#include #include #include diff --git a/src/BOPAlgo/BOPAlgo_ToolsProvider.cxx b/src/BOPAlgo/BOPAlgo_ToolsProvider.cxx index cd2884f169..dfc0cf643f 100644 --- a/src/BOPAlgo/BOPAlgo_ToolsProvider.cxx +++ b/src/BOPAlgo/BOPAlgo_ToolsProvider.cxx @@ -15,7 +15,6 @@ #include #include -#include //======================================================================= //function : Constructor diff --git a/src/BOPAlgo/BOPAlgo_WireSplitter.cxx b/src/BOPAlgo/BOPAlgo_WireSplitter.cxx index 0653cf4b05..c9dfc05ad0 100644 --- a/src/BOPAlgo/BOPAlgo_WireSplitter.cxx +++ b/src/BOPAlgo/BOPAlgo_WireSplitter.cxx @@ -19,18 +19,11 @@ #include #include #include -#include -#include #include -#include -#include #include #include #include -#include -#include #include -#include //======================================================================= //function : diff --git a/src/BOPAlgo/BOPAlgo_WireSplitter_1.cxx b/src/BOPAlgo/BOPAlgo_WireSplitter_1.cxx index 2ebac40a3c..6225ae596a 100644 --- a/src/BOPAlgo/BOPAlgo_WireSplitter_1.cxx +++ b/src/BOPAlgo/BOPAlgo_WireSplitter_1.cxx @@ -15,16 +15,12 @@ #include #include #include -#include #include #include #include #include #include #include -#include -#include -#include #include #include #include @@ -34,7 +30,6 @@ #include #include #include -#include #include #include #include @@ -44,7 +39,6 @@ #include #include #include -#include #include #include #include diff --git a/src/BOPDS/BOPDS_CommonBlock.hxx b/src/BOPDS/BOPDS_CommonBlock.hxx index 14a2f2a118..953b2cb6b8 100644 --- a/src/BOPDS/BOPDS_CommonBlock.hxx +++ b/src/BOPDS/BOPDS_CommonBlock.hxx @@ -20,7 +20,6 @@ #include #include -#include #include #include #include diff --git a/src/BOPDS/BOPDS_Curve.hxx b/src/BOPDS/BOPDS_Curve.hxx index 73ea48a99b..8192754974 100644 --- a/src/BOPDS/BOPDS_Curve.hxx +++ b/src/BOPDS/BOPDS_Curve.hxx @@ -23,7 +23,6 @@ #include #include #include -#include #include class IntTools_Curve; class Bnd_Box; diff --git a/src/BOPDS/BOPDS_DS.cxx b/src/BOPDS/BOPDS_DS.cxx index aefaeeebe5..9ad33e6fdd 100644 --- a/src/BOPDS/BOPDS_DS.cxx +++ b/src/BOPDS/BOPDS_DS.cxx @@ -13,8 +13,6 @@ // commercial license or contractual agreement. -#include -#include #include #include #include @@ -27,10 +25,7 @@ #include #include #include -#include -#include #include -#include #include #include #include @@ -45,10 +40,8 @@ #include #include #include -#include #include #include -#include #include #include // diff --git a/src/BOPDS/BOPDS_DS.hxx b/src/BOPDS/BOPDS_DS.hxx index 75ebc192b6..38d0f33e8d 100644 --- a/src/BOPDS/BOPDS_DS.hxx +++ b/src/BOPDS/BOPDS_DS.hxx @@ -20,8 +20,6 @@ #include #include -#include -#include #include #include #include @@ -41,7 +39,6 @@ #include #include #include -#include #include #include #include diff --git a/src/BOPDS/BOPDS_DataMapOfIntegerListOfPaveBlock.hxx b/src/BOPDS/BOPDS_DataMapOfIntegerListOfPaveBlock.hxx index 6cd2db3c56..6c8a35d70d 100644 --- a/src/BOPDS/BOPDS_DataMapOfIntegerListOfPaveBlock.hxx +++ b/src/BOPDS/BOPDS_DataMapOfIntegerListOfPaveBlock.hxx @@ -16,7 +16,6 @@ #define BOPDS_DataMapOfIntegerListOfPaveBlock_HeaderFile #include -#include #include typedef NCollection_DataMap BOPDS_DataMapOfIntegerListOfPaveBlock; diff --git a/src/BOPDS/BOPDS_IndexRange.hxx b/src/BOPDS/BOPDS_IndexRange.hxx index d3396eaa31..549ab9b5cf 100644 --- a/src/BOPDS/BOPDS_IndexRange.hxx +++ b/src/BOPDS/BOPDS_IndexRange.hxx @@ -19,7 +19,6 @@ #include #include -#include #include diff --git a/src/BOPDS/BOPDS_Iterator.cxx b/src/BOPDS/BOPDS_Iterator.cxx index a685c02aee..b0adff25bc 100644 --- a/src/BOPDS/BOPDS_Iterator.cxx +++ b/src/BOPDS/BOPDS_Iterator.cxx @@ -16,7 +16,6 @@ // commercial license or contractual agreement. -#include #include #include #include @@ -29,7 +28,6 @@ #include #include #include -#include #include ///////////////////////////////////////////////////////////////////////// diff --git a/src/BOPDS/BOPDS_Iterator.hxx b/src/BOPDS/BOPDS_Iterator.hxx index e14a47a360..b5004549cb 100644 --- a/src/BOPDS/BOPDS_Iterator.hxx +++ b/src/BOPDS/BOPDS_Iterator.hxx @@ -24,12 +24,10 @@ #include #include -#include #include #include #include #include -#include #include class IntTools_Context; diff --git a/src/BOPDS/BOPDS_IteratorSI.cxx b/src/BOPDS/BOPDS_IteratorSI.cxx index 13f0926ead..581c74569d 100644 --- a/src/BOPDS/BOPDS_IteratorSI.cxx +++ b/src/BOPDS/BOPDS_IteratorSI.cxx @@ -12,28 +12,17 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -#include #include #include #include -#include #include -#include #include #include #include #include #include -#include #include #include -#include -#include -#include -#include -#include -#include -#include // //======================================================================= diff --git a/src/BOPDS/BOPDS_Pair.hxx b/src/BOPDS/BOPDS_Pair.hxx index 747ecc834f..e26a7d3fd0 100644 --- a/src/BOPDS/BOPDS_Pair.hxx +++ b/src/BOPDS/BOPDS_Pair.hxx @@ -17,7 +17,6 @@ #include #include -#include //! The class is to provide the pair of indices of interfering shapes. diff --git a/src/BOPDS/BOPDS_PairMapHasher.hxx b/src/BOPDS/BOPDS_PairMapHasher.hxx index 73b78bfb33..64d7ec7b6e 100644 --- a/src/BOPDS/BOPDS_PairMapHasher.hxx +++ b/src/BOPDS/BOPDS_PairMapHasher.hxx @@ -17,10 +17,8 @@ #include #include -#include #include -#include #include class BOPDS_Pair; diff --git a/src/BOPDS/BOPDS_Pave.hxx b/src/BOPDS/BOPDS_Pave.hxx index 4fa4544590..8d5bcc069c 100644 --- a/src/BOPDS/BOPDS_Pave.hxx +++ b/src/BOPDS/BOPDS_Pave.hxx @@ -19,7 +19,6 @@ #include #include -#include #include #include diff --git a/src/BOPDS/BOPDS_PaveBlock.cxx b/src/BOPDS/BOPDS_PaveBlock.cxx index b5d7d77aef..df2dd6e6b1 100755 --- a/src/BOPDS/BOPDS_PaveBlock.cxx +++ b/src/BOPDS/BOPDS_PaveBlock.cxx @@ -13,8 +13,6 @@ // commercial license or contractual agreement. -#include -#include #include #include #include diff --git a/src/BOPDS/BOPDS_PaveBlock.hxx b/src/BOPDS/BOPDS_PaveBlock.hxx index 695433752d..d615677c0d 100644 --- a/src/BOPDS/BOPDS_PaveBlock.hxx +++ b/src/BOPDS/BOPDS_PaveBlock.hxx @@ -16,16 +16,13 @@ #define _BOPDS_PaveBlock_HeaderFile #include -#include #include #include #include #include #include -#include #include -#include #include #include diff --git a/src/BOPDS/BOPDS_PaveMapHasher.hxx b/src/BOPDS/BOPDS_PaveMapHasher.hxx index 95ea61db20..e64a644a8b 100644 --- a/src/BOPDS/BOPDS_PaveMapHasher.hxx +++ b/src/BOPDS/BOPDS_PaveMapHasher.hxx @@ -17,10 +17,8 @@ #include #include -#include #include -#include class BOPDS_Pave; diff --git a/src/BOPDS/BOPDS_Point.hxx b/src/BOPDS/BOPDS_Point.hxx index d2761a8e9b..35b8c236f2 100644 --- a/src/BOPDS/BOPDS_Point.hxx +++ b/src/BOPDS/BOPDS_Point.hxx @@ -17,7 +17,6 @@ #include #include -#include #include #include diff --git a/src/BOPDS/BOPDS_ShapeInfo.cxx b/src/BOPDS/BOPDS_ShapeInfo.cxx index b9ad093be9..17cb876a24 100644 --- a/src/BOPDS/BOPDS_ShapeInfo.cxx +++ b/src/BOPDS/BOPDS_ShapeInfo.cxx @@ -13,8 +13,6 @@ // commercial license or contractual agreement. -#include -#include #include #include diff --git a/src/BOPDS/BOPDS_ShapeInfo.hxx b/src/BOPDS/BOPDS_ShapeInfo.hxx index f2babc6253..474d6a92c0 100644 --- a/src/BOPDS/BOPDS_ShapeInfo.hxx +++ b/src/BOPDS/BOPDS_ShapeInfo.hxx @@ -23,7 +23,6 @@ #include #include #include -#include #include #include diff --git a/src/BOPDS/BOPDS_SubIterator.cxx b/src/BOPDS/BOPDS_SubIterator.cxx index 5105fa3e9a..479c65f778 100644 --- a/src/BOPDS/BOPDS_SubIterator.cxx +++ b/src/BOPDS/BOPDS_SubIterator.cxx @@ -15,7 +15,6 @@ #include -#include #include #include @@ -24,8 +23,6 @@ #include -#include - #include //======================================================================= diff --git a/src/BOPDS/BOPDS_SubIterator.hxx b/src/BOPDS/BOPDS_SubIterator.hxx index 44fcd42502..df3070771f 100644 --- a/src/BOPDS/BOPDS_SubIterator.hxx +++ b/src/BOPDS/BOPDS_SubIterator.hxx @@ -20,11 +20,9 @@ #include #include -#include #include #include #include -#include #include diff --git a/src/BOPDS/BOPDS_Tools.hxx b/src/BOPDS/BOPDS_Tools.hxx index 4784f5b450..e836419827 100644 --- a/src/BOPDS/BOPDS_Tools.hxx +++ b/src/BOPDS/BOPDS_Tools.hxx @@ -17,12 +17,9 @@ #include #include -#include #include #include -#include - //! The class BOPDS_Tools contains diff --git a/src/BOPDS/BOPDS_VectorOfListOfPaveBlock.hxx b/src/BOPDS/BOPDS_VectorOfListOfPaveBlock.hxx index b21b3620f7..4a8313931a 100644 --- a/src/BOPDS/BOPDS_VectorOfListOfPaveBlock.hxx +++ b/src/BOPDS/BOPDS_VectorOfListOfPaveBlock.hxx @@ -16,7 +16,6 @@ #define BOPDS_VectorOfListOfPaveBlock_HeaderFile #include -#include #include typedef NCollection_Vector BOPDS_VectorOfListOfPaveBlock; diff --git a/src/BOPTest/BOPTest.cxx b/src/BOPTest/BOPTest.cxx index 5de6f3d84d..74adcb3b9f 100644 --- a/src/BOPTest/BOPTest.cxx +++ b/src/BOPTest/BOPTest.cxx @@ -25,13 +25,8 @@ #include #include #include -#include -#include #include -#include -#include #include -#include #include #include diff --git a/src/BOPTest/BOPTest_APICommands.cxx b/src/BOPTest/BOPTest_APICommands.cxx index 3a9949551e..afa89fbe41 100644 --- a/src/BOPTest/BOPTest_APICommands.cxx +++ b/src/BOPTest/BOPTest_APICommands.cxx @@ -16,8 +16,6 @@ #include #include #include -#include -#include #include #include #include @@ -25,14 +23,12 @@ #include #include #include -#include #include #include #include #include -#include static Standard_Integer bapibuild(Draw_Interpretor&, Standard_Integer, const char**); static Standard_Integer bapibop (Draw_Interpretor&, Standard_Integer, const char**); diff --git a/src/BOPTest/BOPTest_BOPCommands.cxx b/src/BOPTest/BOPTest_BOPCommands.cxx index a9ee0eed15..f22b0c2a3f 100644 --- a/src/BOPTest/BOPTest_BOPCommands.cxx +++ b/src/BOPTest/BOPTest_BOPCommands.cxx @@ -22,11 +22,6 @@ #include #include #include -#include -#include -#include -#include -#include #include #include #include @@ -39,7 +34,6 @@ #include #include #include -#include #include #include #include diff --git a/src/BOPTest/BOPTest_DebugCommands.cxx b/src/BOPTest/BOPTest_DebugCommands.cxx index 694508d14c..68f0a252af 100644 --- a/src/BOPTest/BOPTest_DebugCommands.cxx +++ b/src/BOPTest/BOPTest_DebugCommands.cxx @@ -38,7 +38,6 @@ #include #include -#include #include diff --git a/src/BOPTest/BOPTest_DrawableShape.cxx b/src/BOPTest/BOPTest_DrawableShape.cxx index acdd451155..f19e817a9b 100644 --- a/src/BOPTest/BOPTest_DrawableShape.cxx +++ b/src/BOPTest/BOPTest_DrawableShape.cxx @@ -20,20 +20,10 @@ #include #include #include -#include #include #include -#include #include -#include -#include -#include -#include -#include -#include #include -#include -#include #include #include #include diff --git a/src/BOPTest/BOPTest_DrawableShape.hxx b/src/BOPTest/BOPTest_DrawableShape.hxx index f80ba693df..a1ab4a7af3 100644 --- a/src/BOPTest/BOPTest_DrawableShape.hxx +++ b/src/BOPTest/BOPTest_DrawableShape.hxx @@ -17,13 +17,10 @@ #define _BOPTest_DrawableShape_HeaderFile #include -#include -#include #include #include #include -#include class Draw_Text3D; class TopoDS_Shape; class gp_Pnt; diff --git a/src/BOPTest/BOPTest_LowCommands.cxx b/src/BOPTest/BOPTest_LowCommands.cxx index c7bdd09b1f..a509ac69af 100644 --- a/src/BOPTest/BOPTest_LowCommands.cxx +++ b/src/BOPTest/BOPTest_LowCommands.cxx @@ -16,9 +16,7 @@ #include #include -#include #include -#include #include #include #include @@ -29,7 +27,6 @@ #include #include #include -#include #include #include #include diff --git a/src/BOPTest/BOPTest_MkConnectedCommands.cxx b/src/BOPTest/BOPTest_MkConnectedCommands.cxx index 8e15fd9a73..91785f6d49 100644 --- a/src/BOPTest/BOPTest_MkConnectedCommands.cxx +++ b/src/BOPTest/BOPTest_MkConnectedCommands.cxx @@ -30,7 +30,6 @@ #include #include -#include static Standard_Integer MakeConnected(Draw_Interpretor&, Standard_Integer, const char**); static Standard_Integer MakePeriodic(Draw_Interpretor&, Standard_Integer, const char**); diff --git a/src/BOPTest/BOPTest_Objects.hxx b/src/BOPTest/BOPTest_Objects.hxx index 5c3e5e0ba9..fb1212e64b 100644 --- a/src/BOPTest/BOPTest_Objects.hxx +++ b/src/BOPTest/BOPTest_Objects.hxx @@ -17,13 +17,10 @@ #include #include -#include #include #include #include -#include -#include #include #include // diff --git a/src/BOPTest/BOPTest_OptionCommands.cxx b/src/BOPTest/BOPTest_OptionCommands.cxx index 63ea864060..f53086643e 100644 --- a/src/BOPTest/BOPTest_OptionCommands.cxx +++ b/src/BOPTest/BOPTest_OptionCommands.cxx @@ -19,7 +19,6 @@ #include #include -#include #include static Standard_Integer boptions (Draw_Interpretor&, Standard_Integer, const char**); static Standard_Integer brunparallel (Draw_Interpretor&, Standard_Integer, const char**); diff --git a/src/BOPTest/BOPTest_PartitionCommands.cxx b/src/BOPTest/BOPTest_PartitionCommands.cxx index ffc15f6fc4..e1b3095de2 100644 --- a/src/BOPTest/BOPTest_PartitionCommands.cxx +++ b/src/BOPTest/BOPTest_PartitionCommands.cxx @@ -25,12 +25,8 @@ #include #include #include -#include -#include -#include #include #include -#include #include #include diff --git a/src/BOPTest/BOPTest_PeriodicityCommands.cxx b/src/BOPTest/BOPTest_PeriodicityCommands.cxx index 6528491ced..ba34651a00 100644 --- a/src/BOPTest/BOPTest_PeriodicityCommands.cxx +++ b/src/BOPTest/BOPTest_PeriodicityCommands.cxx @@ -28,7 +28,6 @@ #include #include -#include static Standard_Integer MakePeriodic(Draw_Interpretor&, Standard_Integer, const char**); static Standard_Integer GetTwins(Draw_Interpretor&, Standard_Integer, const char**); diff --git a/src/BOPTest/BOPTest_RemoveFeaturesCommands.cxx b/src/BOPTest/BOPTest_RemoveFeaturesCommands.cxx index 2f00af4c38..a453cdb681 100644 --- a/src/BOPTest/BOPTest_RemoveFeaturesCommands.cxx +++ b/src/BOPTest/BOPTest_RemoveFeaturesCommands.cxx @@ -24,12 +24,8 @@ #include #include -#include #include -#include -#include - static Standard_Integer RemoveFeatures (Draw_Interpretor&, Standard_Integer, const char**); //======================================================================= diff --git a/src/BOPTest/BOPTest_TolerCommands.cxx b/src/BOPTest/BOPTest_TolerCommands.cxx index c8ac62d61e..f0ce35cc8f 100644 --- a/src/BOPTest/BOPTest_TolerCommands.cxx +++ b/src/BOPTest/BOPTest_TolerCommands.cxx @@ -15,9 +15,6 @@ #include #include -#include -#include -#include #include #include #include @@ -29,7 +26,6 @@ #include #include #include -#include #include #include #include @@ -42,7 +38,6 @@ #include #include #include -#include #include #include diff --git a/src/BOPTest/BOPTest_UtilityCommands.cxx b/src/BOPTest/BOPTest_UtilityCommands.cxx index 6e6d8b977b..31c9eaf35c 100644 --- a/src/BOPTest/BOPTest_UtilityCommands.cxx +++ b/src/BOPTest/BOPTest_UtilityCommands.cxx @@ -19,8 +19,6 @@ #include #include #include -#include -#include #include #include #include diff --git a/src/BOPTools/BOPTools_AlgoTools.cxx b/src/BOPTools/BOPTools_AlgoTools.cxx index bf1891b02b..78322a73c5 100644 --- a/src/BOPTools/BOPTools_AlgoTools.cxx +++ b/src/BOPTools/BOPTools_AlgoTools.cxx @@ -25,7 +25,6 @@ #include #include #include -#include #include #include #include @@ -44,7 +43,6 @@ #include #include #include -#include #include #include #include @@ -66,7 +64,6 @@ #include #include #include -#include #include // diff --git a/src/BOPTools/BOPTools_AlgoTools2D.cxx b/src/BOPTools/BOPTools_AlgoTools2D.cxx index 356e0e8be0..9bcafe1c33 100644 --- a/src/BOPTools/BOPTools_AlgoTools2D.cxx +++ b/src/BOPTools/BOPTools_AlgoTools2D.cxx @@ -15,34 +15,15 @@ #include #include -#include -#include -#include -#include #include -#include -#include #include #include -#include -#include #include -#include -#include -#include -#include -#include -#include #include -#include -#include #include -#include #include -#include #include #include -#include #include #include #include @@ -55,7 +36,6 @@ #include #include #include -#include #include #include #include diff --git a/src/BOPTools/BOPTools_AlgoTools2D_1.cxx b/src/BOPTools/BOPTools_AlgoTools2D_1.cxx index aca558d7a5..1d4d5252de 100644 --- a/src/BOPTools/BOPTools_AlgoTools2D_1.cxx +++ b/src/BOPTools/BOPTools_AlgoTools2D_1.cxx @@ -13,24 +13,15 @@ // commercial license or contractual agreement. #include -#include #include #include -#include - -#include #include -#include #include #include -#include -#include -#include - #include #include #include diff --git a/src/BOPTools/BOPTools_AlgoTools3D.cxx b/src/BOPTools/BOPTools_AlgoTools3D.cxx index 001da1875c..c620cbd701 100644 --- a/src/BOPTools/BOPTools_AlgoTools3D.cxx +++ b/src/BOPTools/BOPTools_AlgoTools3D.cxx @@ -17,39 +17,25 @@ #include #include #include -#include -#include -#include -#include #include #include #include -#include -#include -#include #include #include #include #include -#include #include #include #include -#include #include #include -#include #include -#include #include #include -#include -#include #include #include #include #include -#include #include #include #include @@ -60,7 +46,6 @@ #include #include #include -#include #include static void Add(const TopoDS_Shape& aS, diff --git a/src/BOPTools/BOPTools_AlgoTools3D.hxx b/src/BOPTools/BOPTools_AlgoTools3D.hxx index 10457b91e9..0af02fefd7 100644 --- a/src/BOPTools/BOPTools_AlgoTools3D.hxx +++ b/src/BOPTools/BOPTools_AlgoTools3D.hxx @@ -19,9 +19,7 @@ #include #include -#include #include -#include class TopoDS_Edge; class TopoDS_Face; class gp_Dir; diff --git a/src/BOPTools/BOPTools_AlgoTools_1.cxx b/src/BOPTools/BOPTools_AlgoTools_1.cxx index 613af81479..49357bf62f 100644 --- a/src/BOPTools/BOPTools_AlgoTools_1.cxx +++ b/src/BOPTools/BOPTools_AlgoTools_1.cxx @@ -17,16 +17,13 @@ #include #include #include -#include #include -#include #include #include #include #include #include #include -#include #include #include #include @@ -42,7 +39,6 @@ #include #include #include -#include #include #include #include @@ -51,9 +47,6 @@ #include #include #include -#include -#include -#include #include #include #include @@ -64,13 +57,9 @@ #include #include #include -#include -#include #include -#include #include #include -#include #include diff --git a/src/BOPTools/BOPTools_AlgoTools_2.cxx b/src/BOPTools/BOPTools_AlgoTools_2.cxx index d1b30637f3..f066189c52 100644 --- a/src/BOPTools/BOPTools_AlgoTools_2.cxx +++ b/src/BOPTools/BOPTools_AlgoTools_2.cxx @@ -30,8 +30,6 @@ #include #include #include -#include -#include #include //======================================================================= diff --git a/src/BOPTools/BOPTools_BoxTree.hxx b/src/BOPTools/BOPTools_BoxTree.hxx index 7477139f3b..0f2093545f 100644 --- a/src/BOPTools/BOPTools_BoxTree.hxx +++ b/src/BOPTools/BOPTools_BoxTree.hxx @@ -15,11 +15,9 @@ #ifndef BOPTools_BoxTree_HeaderFile #define BOPTools_BoxTree_HeaderFile -#include #include #include #include -#include #include //! Redefines BoxSet to use the Linear builder by default diff --git a/src/BOPTools/BOPTools_PairSelector.hxx b/src/BOPTools/BOPTools_PairSelector.hxx index 19a22740be..65d79712ee 100644 --- a/src/BOPTools/BOPTools_PairSelector.hxx +++ b/src/BOPTools/BOPTools_PairSelector.hxx @@ -19,7 +19,6 @@ #include #include -#include #include //! Template Selector for selection of the elements from two BVH trees. diff --git a/src/BOPTools/BOPTools_Parallel.hxx b/src/BOPTools/BOPTools_Parallel.hxx index c35deaaef5..2f34d7bc4e 100644 --- a/src/BOPTools/BOPTools_Parallel.hxx +++ b/src/BOPTools/BOPTools_Parallel.hxx @@ -15,8 +15,6 @@ #ifndef _BOPTools_Parallel_HeaderFile #define _BOPTools_Parallel_HeaderFile -#include -#include #include #include #include diff --git a/src/BOPTools/BOPTools_Set.hxx b/src/BOPTools/BOPTools_Set.hxx index 10071a5888..bd6ecd2939 100644 --- a/src/BOPTools/BOPTools_Set.hxx +++ b/src/BOPTools/BOPTools_Set.hxx @@ -19,11 +19,9 @@ #include #include -#include #include #include #include -#include #include diff --git a/src/BOPTools/BOPTools_SetMapHasher.hxx b/src/BOPTools/BOPTools_SetMapHasher.hxx index ae8cfdaf52..875f0b09ab 100644 --- a/src/BOPTools/BOPTools_SetMapHasher.hxx +++ b/src/BOPTools/BOPTools_SetMapHasher.hxx @@ -17,10 +17,8 @@ #include #include -#include #include -#include class BOPTools_Set; diff --git a/src/BRep/BRep_Builder.cxx b/src/BRep/BRep_Builder.cxx index 17e869f98f..ab78ac8e0b 100644 --- a/src/BRep/BRep_Builder.cxx +++ b/src/BRep/BRep_Builder.cxx @@ -20,7 +20,6 @@ #include #include #include -#include #include #include #include @@ -42,9 +41,7 @@ #include #include #include -#include #include -#include #include #include #include diff --git a/src/BRep/BRep_Builder.hxx b/src/BRep/BRep_Builder.hxx index ef3cbf4c72..1d03a4b3bc 100644 --- a/src/BRep/BRep_Builder.hxx +++ b/src/BRep/BRep_Builder.hxx @@ -17,18 +17,12 @@ #ifndef _BRep_Builder_HeaderFile #define _BRep_Builder_HeaderFile +#include +#include #include #include #include - #include -#include -#include -#include -#include -#include -#include -#include class TopoDS_Face; class Geom_Surface; diff --git a/src/BRep/BRep_Curve3D.hxx b/src/BRep/BRep_Curve3D.hxx index 39183cec3f..7bd393eb72 100644 --- a/src/BRep/BRep_Curve3D.hxx +++ b/src/BRep/BRep_Curve3D.hxx @@ -18,11 +18,9 @@ #define _BRep_Curve3D_HeaderFile #include -#include #include #include -#include class Geom_Curve; class TopLoc_Location; class gp_Pnt; diff --git a/src/BRep/BRep_CurveOn2Surfaces.hxx b/src/BRep/BRep_CurveOn2Surfaces.hxx index 2c487d656e..9cb675abda 100644 --- a/src/BRep/BRep_CurveOn2Surfaces.hxx +++ b/src/BRep/BRep_CurveOn2Surfaces.hxx @@ -18,12 +18,8 @@ #define _BRep_CurveOn2Surfaces_HeaderFile #include -#include -#include -#include #include -#include #include class Geom_Surface; class gp_Pnt; diff --git a/src/BRep/BRep_CurveOnClosedSurface.hxx b/src/BRep/BRep_CurveOnClosedSurface.hxx index 1938304e90..b94a3f4609 100644 --- a/src/BRep/BRep_CurveOnClosedSurface.hxx +++ b/src/BRep/BRep_CurveOnClosedSurface.hxx @@ -18,12 +18,8 @@ #define _BRep_CurveOnClosedSurface_HeaderFile #include -#include -#include -#include #include -#include class Geom2d_Curve; class Geom_Surface; class TopLoc_Location; diff --git a/src/BRep/BRep_CurveOnSurface.hxx b/src/BRep/BRep_CurveOnSurface.hxx index b5ac334966..b2c90797c5 100644 --- a/src/BRep/BRep_CurveOnSurface.hxx +++ b/src/BRep/BRep_CurveOnSurface.hxx @@ -18,12 +18,10 @@ #define _BRep_CurveOnSurface_HeaderFile #include -#include #include #include #include -#include class Geom2d_Curve; class Geom_Surface; class TopLoc_Location; diff --git a/src/BRep/BRep_CurveRepresentation.cxx b/src/BRep/BRep_CurveRepresentation.cxx index a8d05237e5..54bf58abec 100644 --- a/src/BRep/BRep_CurveRepresentation.cxx +++ b/src/BRep/BRep_CurveRepresentation.cxx @@ -17,7 +17,6 @@ #include #include -#include #include #include #include @@ -25,7 +24,6 @@ #include #include #include -#include #include IMPLEMENT_STANDARD_RTTIEXT(BRep_CurveRepresentation,Standard_Transient) diff --git a/src/BRep/BRep_CurveRepresentation.hxx b/src/BRep/BRep_CurveRepresentation.hxx index 5d2389c2ce..ffb3cf748c 100644 --- a/src/BRep/BRep_CurveRepresentation.hxx +++ b/src/BRep/BRep_CurveRepresentation.hxx @@ -18,11 +18,9 @@ #define _BRep_CurveRepresentation_HeaderFile #include -#include #include #include -#include #include class Geom_Surface; class Poly_Triangulation; diff --git a/src/BRep/BRep_GCurve.cxx b/src/BRep/BRep_GCurve.cxx index c5851057de..90dc8cef46 100644 --- a/src/BRep/BRep_GCurve.cxx +++ b/src/BRep/BRep_GCurve.cxx @@ -16,7 +16,6 @@ #include -#include #include #include diff --git a/src/BRep/BRep_GCurve.hxx b/src/BRep/BRep_GCurve.hxx index 6e7eb7ab9f..b8832a352d 100644 --- a/src/BRep/BRep_GCurve.hxx +++ b/src/BRep/BRep_GCurve.hxx @@ -18,7 +18,6 @@ #define _BRep_GCurve_HeaderFile #include -#include #include #include diff --git a/src/BRep/BRep_PointOnCurve.hxx b/src/BRep/BRep_PointOnCurve.hxx index c8a483abc3..bf65bbd0cb 100644 --- a/src/BRep/BRep_PointOnCurve.hxx +++ b/src/BRep/BRep_PointOnCurve.hxx @@ -18,11 +18,9 @@ #define _BRep_PointOnCurve_HeaderFile #include -#include #include #include -#include class Geom_Curve; class TopLoc_Location; diff --git a/src/BRep/BRep_PointOnCurveOnSurface.hxx b/src/BRep/BRep_PointOnCurveOnSurface.hxx index 53f976114a..f72beaecc3 100644 --- a/src/BRep/BRep_PointOnCurveOnSurface.hxx +++ b/src/BRep/BRep_PointOnCurveOnSurface.hxx @@ -18,11 +18,9 @@ #define _BRep_PointOnCurveOnSurface_HeaderFile #include -#include #include #include -#include class Geom2d_Curve; class Geom_Surface; class TopLoc_Location; diff --git a/src/BRep/BRep_PointOnSurface.hxx b/src/BRep/BRep_PointOnSurface.hxx index 878dd65de8..6465a5a0e9 100644 --- a/src/BRep/BRep_PointOnSurface.hxx +++ b/src/BRep/BRep_PointOnSurface.hxx @@ -18,11 +18,9 @@ #define _BRep_PointOnSurface_HeaderFile #include -#include #include #include -#include class Geom_Surface; class TopLoc_Location; diff --git a/src/BRep/BRep_PointRepresentation.cxx b/src/BRep/BRep_PointRepresentation.cxx index 45dac877cf..6fc78044f0 100644 --- a/src/BRep/BRep_PointRepresentation.cxx +++ b/src/BRep/BRep_PointRepresentation.cxx @@ -17,7 +17,6 @@ #include #include -#include #include #include #include diff --git a/src/BRep/BRep_PointRepresentation.hxx b/src/BRep/BRep_PointRepresentation.hxx index 8d90833e93..98c51804e4 100644 --- a/src/BRep/BRep_PointRepresentation.hxx +++ b/src/BRep/BRep_PointRepresentation.hxx @@ -18,12 +18,10 @@ #define _BRep_PointRepresentation_HeaderFile #include -#include #include #include #include -#include class Geom_Curve; class Geom2d_Curve; class Geom_Surface; diff --git a/src/BRep/BRep_PointsOnSurface.hxx b/src/BRep/BRep_PointsOnSurface.hxx index 4dff6c0df2..4222ea688c 100644 --- a/src/BRep/BRep_PointsOnSurface.hxx +++ b/src/BRep/BRep_PointsOnSurface.hxx @@ -18,7 +18,6 @@ #define _BRep_PointsOnSurface_HeaderFile #include -#include #include #include diff --git a/src/BRep/BRep_Polygon3D.hxx b/src/BRep/BRep_Polygon3D.hxx index 4d19a503a8..24b2fd88d2 100644 --- a/src/BRep/BRep_Polygon3D.hxx +++ b/src/BRep/BRep_Polygon3D.hxx @@ -21,7 +21,6 @@ #include #include -#include class Poly_Polygon3D; class TopLoc_Location; diff --git a/src/BRep/BRep_PolygonOnClosedSurface.hxx b/src/BRep/BRep_PolygonOnClosedSurface.hxx index fb2954bc4f..cb7557a947 100644 --- a/src/BRep/BRep_PolygonOnClosedSurface.hxx +++ b/src/BRep/BRep_PolygonOnClosedSurface.hxx @@ -21,7 +21,6 @@ #include #include -#include class Poly_Polygon2D; class Geom_Surface; class TopLoc_Location; diff --git a/src/BRep/BRep_PolygonOnClosedTriangulation.hxx b/src/BRep/BRep_PolygonOnClosedTriangulation.hxx index 332cd5270b..0285abd0a0 100644 --- a/src/BRep/BRep_PolygonOnClosedTriangulation.hxx +++ b/src/BRep/BRep_PolygonOnClosedTriangulation.hxx @@ -21,7 +21,6 @@ #include #include -#include class Poly_PolygonOnTriangulation; class Poly_Triangulation; class TopLoc_Location; diff --git a/src/BRep/BRep_PolygonOnSurface.hxx b/src/BRep/BRep_PolygonOnSurface.hxx index 62d05df2b8..ae15681244 100644 --- a/src/BRep/BRep_PolygonOnSurface.hxx +++ b/src/BRep/BRep_PolygonOnSurface.hxx @@ -21,7 +21,6 @@ #include #include -#include class Poly_Polygon2D; class Geom_Surface; class TopLoc_Location; diff --git a/src/BRep/BRep_PolygonOnTriangulation.hxx b/src/BRep/BRep_PolygonOnTriangulation.hxx index 6a8cb5e9ce..27bb1ac5f1 100644 --- a/src/BRep/BRep_PolygonOnTriangulation.hxx +++ b/src/BRep/BRep_PolygonOnTriangulation.hxx @@ -21,7 +21,6 @@ #include #include -#include class Poly_PolygonOnTriangulation; class Poly_Triangulation; class TopLoc_Location; diff --git a/src/BRep/BRep_TEdge.cxx b/src/BRep/BRep_TEdge.cxx index 484cf800a4..b718a2e096 100644 --- a/src/BRep/BRep_TEdge.cxx +++ b/src/BRep/BRep_TEdge.cxx @@ -18,11 +18,8 @@ #include #include #include -#include -#include #include #include -#include #include IMPLEMENT_STANDARD_RTTIEXT(BRep_TEdge,TopoDS_TEdge) diff --git a/src/BRep/BRep_TEdge.hxx b/src/BRep/BRep_TEdge.hxx index 65be265785..12a5c3e9be 100644 --- a/src/BRep/BRep_TEdge.hxx +++ b/src/BRep/BRep_TEdge.hxx @@ -20,11 +20,9 @@ #include #include -#include #include #include #include -#include class TopoDS_TShape; diff --git a/src/BRep/BRep_TFace.cxx b/src/BRep/BRep_TFace.cxx index c44d3b14fa..bf4cea41f2 100644 --- a/src/BRep/BRep_TFace.cxx +++ b/src/BRep/BRep_TFace.cxx @@ -19,7 +19,6 @@ #include #include #include -#include #include #include diff --git a/src/BRep/BRep_TFace.hxx b/src/BRep/BRep_TFace.hxx index 2654de5629..2b81a8f209 100644 --- a/src/BRep/BRep_TFace.hxx +++ b/src/BRep/BRep_TFace.hxx @@ -18,12 +18,10 @@ #define _BRep_TFace_HeaderFile #include -#include #include #include #include -#include #include class Geom_Surface; class TopoDS_TShape; diff --git a/src/BRep/BRep_TVertex.cxx b/src/BRep/BRep_TVertex.cxx index 7190a49375..ba308302b1 100644 --- a/src/BRep/BRep_TVertex.cxx +++ b/src/BRep/BRep_TVertex.cxx @@ -18,7 +18,6 @@ #include #include #include -#include #include IMPLEMENT_STANDARD_RTTIEXT(BRep_TVertex,TopoDS_TVertex) diff --git a/src/BRep/BRep_TVertex.hxx b/src/BRep/BRep_TVertex.hxx index 21292ef6f0..adb128322d 100644 --- a/src/BRep/BRep_TVertex.hxx +++ b/src/BRep/BRep_TVertex.hxx @@ -18,7 +18,6 @@ #define _BRep_TVertex_HeaderFile #include -#include #include #include diff --git a/src/BRep/BRep_Tool.cxx b/src/BRep/BRep_Tool.cxx index 5d308fc2e9..f4d4c59df4 100644 --- a/src/BRep/BRep_Tool.cxx +++ b/src/BRep/BRep_Tool.cxx @@ -19,12 +19,7 @@ #include #include #include -#include -#include -#include #include -#include -#include #include #include #include @@ -47,7 +42,6 @@ #include #include #include -#include #include #include #include @@ -65,7 +59,6 @@ #include #include #include -#include #include #include #include diff --git a/src/BRepAdaptor/BRepAdaptor_CompCurve.cxx b/src/BRepAdaptor/BRepAdaptor_CompCurve.cxx index 2cf7998f0a..92a732e37c 100644 --- a/src/BRepAdaptor/BRepAdaptor_CompCurve.cxx +++ b/src/BRepAdaptor/BRepAdaptor_CompCurve.cxx @@ -18,7 +18,6 @@ #include #include -#include #include #include #include @@ -29,10 +28,6 @@ #include #include #include -#include -#include -#include -#include #include #include #include diff --git a/src/BRepAdaptor/BRepAdaptor_Curve.cxx b/src/BRepAdaptor/BRepAdaptor_Curve.cxx index 1bd9a2f7da..d82c69d26f 100644 --- a/src/BRepAdaptor/BRepAdaptor_Curve.cxx +++ b/src/BRepAdaptor/BRepAdaptor_Curve.cxx @@ -22,7 +22,6 @@ #include #include #include -#include #include #include #include @@ -34,14 +33,11 @@ #include #include #include -#include #include #include -#include #include #include #include -#include IMPLEMENT_STANDARD_RTTIEXT(BRepAdaptor_Curve, Adaptor3d_Curve) diff --git a/src/BRepAdaptor/BRepAdaptor_Curve.hxx b/src/BRepAdaptor/BRepAdaptor_Curve.hxx index fe198ee6a3..642ebc3aef 100644 --- a/src/BRepAdaptor/BRepAdaptor_Curve.hxx +++ b/src/BRepAdaptor/BRepAdaptor_Curve.hxx @@ -22,7 +22,6 @@ #include #include #include -#include #include #include #include diff --git a/src/BRepAdaptor/BRepAdaptor_Curve2d.cxx b/src/BRepAdaptor/BRepAdaptor_Curve2d.cxx index ceccc9e5b4..b1a938bc32 100644 --- a/src/BRepAdaptor/BRepAdaptor_Curve2d.cxx +++ b/src/BRepAdaptor/BRepAdaptor_Curve2d.cxx @@ -17,7 +17,6 @@ #include #include -#include #include #include diff --git a/src/BRepAdaptor/BRepAdaptor_HArray1OfCurve.hxx b/src/BRepAdaptor/BRepAdaptor_HArray1OfCurve.hxx index 8d21b9a5f4..ee026c3279 100644 --- a/src/BRepAdaptor/BRepAdaptor_HArray1OfCurve.hxx +++ b/src/BRepAdaptor/BRepAdaptor_HArray1OfCurve.hxx @@ -17,7 +17,6 @@ #ifndef BRepAdaptor_HArray1OfCurve_HeaderFile #define BRepAdaptor_HArray1OfCurve_HeaderFile -#include #include #include diff --git a/src/BRepAdaptor/BRepAdaptor_Surface.cxx b/src/BRepAdaptor/BRepAdaptor_Surface.cxx index 98acaaba90..66d769c103 100644 --- a/src/BRepAdaptor/BRepAdaptor_Surface.cxx +++ b/src/BRepAdaptor/BRepAdaptor_Surface.cxx @@ -35,9 +35,6 @@ #include #include #include -#include -#include -#include #include IMPLEMENT_STANDARD_RTTIEXT(BRepAdaptor_Surface, Adaptor3d_Surface) diff --git a/src/BRepAdaptor/BRepAdaptor_Surface.hxx b/src/BRepAdaptor/BRepAdaptor_Surface.hxx index b1b6c4014f..ed06ef1b8a 100644 --- a/src/BRepAdaptor/BRepAdaptor_Surface.hxx +++ b/src/BRepAdaptor/BRepAdaptor_Surface.hxx @@ -17,7 +17,6 @@ #ifndef _BRepAdaptor_Surface_HeaderFile #define _BRepAdaptor_Surface_HeaderFile -#include #include #include #include diff --git a/src/BRepAlgo/BRepAlgo.cxx b/src/BRepAlgo/BRepAlgo.cxx index 75574ac191..6e334d67c7 100644 --- a/src/BRepAlgo/BRepAlgo.cxx +++ b/src/BRepAlgo/BRepAlgo.cxx @@ -32,7 +32,6 @@ #include #include #include -#include #include #include #include @@ -47,11 +46,6 @@ #include #include #include -#include - -//Temporary -#//include - //======================================================================= //function : ConcatenateWire diff --git a/src/BRepAlgo/BRepAlgo.hxx b/src/BRepAlgo/BRepAlgo.hxx index 57463d1a23..380592c946 100644 --- a/src/BRepAlgo/BRepAlgo.hxx +++ b/src/BRepAlgo/BRepAlgo.hxx @@ -18,8 +18,6 @@ #define _BRepAlgo_HeaderFile #include -#include -#include #include class TopoDS_Wire; class TopoDS_Edge; diff --git a/src/BRepAlgo/BRepAlgo_1.cxx b/src/BRepAlgo/BRepAlgo_1.cxx index e313ba2d80..e32b19cd91 100644 --- a/src/BRepAlgo/BRepAlgo_1.cxx +++ b/src/BRepAlgo/BRepAlgo_1.cxx @@ -20,22 +20,16 @@ #include #include #include -#include #include #include #include #include #include -#include -#include #include #include #include -#include #include #include -#include -#include #include //======================================================================= diff --git a/src/BRepAlgo/BRepAlgo_AsDes.cxx b/src/BRepAlgo/BRepAlgo_AsDes.cxx index 26545676a7..768d0e3793 100644 --- a/src/BRepAlgo/BRepAlgo_AsDes.cxx +++ b/src/BRepAlgo/BRepAlgo_AsDes.cxx @@ -19,7 +19,6 @@ #include #include #include -#include #include IMPLEMENT_STANDARD_RTTIEXT(BRepAlgo_AsDes,Standard_Transient) diff --git a/src/BRepAlgo/BRepAlgo_AsDes.hxx b/src/BRepAlgo/BRepAlgo_AsDes.hxx index b5721dc82c..2f9d1ff5c5 100644 --- a/src/BRepAlgo/BRepAlgo_AsDes.hxx +++ b/src/BRepAlgo/BRepAlgo_AsDes.hxx @@ -18,12 +18,10 @@ #define _BRepAlgo_AsDes_HeaderFile #include -#include #include #include #include -#include class TopoDS_Shape; diff --git a/src/BRepAlgo/BRepAlgo_FaceRestrictor.cxx b/src/BRepAlgo/BRepAlgo_FaceRestrictor.cxx index c12f410090..644bdaf491 100644 --- a/src/BRepAlgo/BRepAlgo_FaceRestrictor.cxx +++ b/src/BRepAlgo/BRepAlgo_FaceRestrictor.cxx @@ -34,7 +34,6 @@ #include #include #include -#include //======================================================================= //function : BRepAlgo_FaceRestrictor diff --git a/src/BRepAlgo/BRepAlgo_FaceRestrictor.hxx b/src/BRepAlgo/BRepAlgo_FaceRestrictor.hxx index 794ddf3593..ea5c642b46 100644 --- a/src/BRepAlgo/BRepAlgo_FaceRestrictor.hxx +++ b/src/BRepAlgo/BRepAlgo_FaceRestrictor.hxx @@ -19,11 +19,8 @@ #include #include -#include -#include #include -#include #include class TopoDS_Wire; diff --git a/src/BRepAlgo/BRepAlgo_Loop.cxx b/src/BRepAlgo/BRepAlgo_Loop.cxx index f79b096f79..8fb739c23c 100644 --- a/src/BRepAlgo/BRepAlgo_Loop.cxx +++ b/src/BRepAlgo/BRepAlgo_Loop.cxx @@ -36,10 +36,8 @@ #include #include #include -#include #include #include -#include #include #include diff --git a/src/BRepAlgo/BRepAlgo_Loop.hxx b/src/BRepAlgo/BRepAlgo_Loop.hxx index f82a59b68b..cd6ce89076 100644 --- a/src/BRepAlgo/BRepAlgo_Loop.hxx +++ b/src/BRepAlgo/BRepAlgo_Loop.hxx @@ -19,12 +19,10 @@ #include #include -#include #include #include #include -#include #include #include class TopoDS_Edge; diff --git a/src/BRepAlgo/BRepAlgo_NormalProjection.cxx b/src/BRepAlgo/BRepAlgo_NormalProjection.cxx index 2fb121ddf2..bd31fde08b 100644 --- a/src/BRepAlgo/BRepAlgo_NormalProjection.cxx +++ b/src/BRepAlgo/BRepAlgo_NormalProjection.cxx @@ -25,7 +25,6 @@ #include #include #include -#include #include #include #include @@ -34,22 +33,17 @@ #include #include #include -#include #include -#include -#include #include #include #include #include -#include #include #include #include #include #include #include -#include #ifdef OCCT_DEBUG_CHRONO #include diff --git a/src/BRepAlgo/BRepAlgo_NormalProjection.hxx b/src/BRepAlgo/BRepAlgo_NormalProjection.hxx index b1891ef272..b91fb0d974 100644 --- a/src/BRepAlgo/BRepAlgo_NormalProjection.hxx +++ b/src/BRepAlgo/BRepAlgo_NormalProjection.hxx @@ -19,11 +19,8 @@ #include #include -#include #include -#include -#include #include #include #include diff --git a/src/BRepAlgoAPI/BRepAlgoAPI_Algo.hxx b/src/BRepAlgoAPI/BRepAlgoAPI_Algo.hxx index 5ff5a9e8aa..5702b68b0f 100644 --- a/src/BRepAlgoAPI/BRepAlgoAPI_Algo.hxx +++ b/src/BRepAlgoAPI/BRepAlgoAPI_Algo.hxx @@ -19,9 +19,7 @@ #include #include -#include #include -#include #include #include diff --git a/src/BRepAlgoAPI/BRepAlgoAPI_BuilderAlgo.hxx b/src/BRepAlgoAPI/BRepAlgoAPI_BuilderAlgo.hxx index 051e9ef930..acf9d963ea 100644 --- a/src/BRepAlgoAPI/BRepAlgoAPI_BuilderAlgo.hxx +++ b/src/BRepAlgoAPI/BRepAlgoAPI_BuilderAlgo.hxx @@ -25,7 +25,6 @@ #include #include #include -#include #include #include diff --git a/src/BRepAlgoAPI/BRepAlgoAPI_Check.hxx b/src/BRepAlgoAPI/BRepAlgoAPI_Check.hxx index bf9e252580..e8d78b9952 100644 --- a/src/BRepAlgoAPI/BRepAlgoAPI_Check.hxx +++ b/src/BRepAlgoAPI/BRepAlgoAPI_Check.hxx @@ -23,8 +23,6 @@ #include #include #include -#include -#include #include #include diff --git a/src/BRepAlgoAPI/BRepAlgoAPI_Common.cxx b/src/BRepAlgoAPI/BRepAlgoAPI_Common.cxx index 5060b99596..e74c341fd5 100644 --- a/src/BRepAlgoAPI/BRepAlgoAPI_Common.cxx +++ b/src/BRepAlgoAPI/BRepAlgoAPI_Common.cxx @@ -16,7 +16,6 @@ #include -#include #include #include diff --git a/src/BRepAlgoAPI/BRepAlgoAPI_Common.hxx b/src/BRepAlgoAPI/BRepAlgoAPI_Common.hxx index a3151a2df8..d10e8e69c0 100644 --- a/src/BRepAlgoAPI/BRepAlgoAPI_Common.hxx +++ b/src/BRepAlgoAPI/BRepAlgoAPI_Common.hxx @@ -19,7 +19,6 @@ #include #include -#include #include class BOPAlgo_PaveFiller; diff --git a/src/BRepAlgoAPI/BRepAlgoAPI_Cut.cxx b/src/BRepAlgoAPI/BRepAlgoAPI_Cut.cxx index 89defaf635..9b91169eca 100644 --- a/src/BRepAlgoAPI/BRepAlgoAPI_Cut.cxx +++ b/src/BRepAlgoAPI/BRepAlgoAPI_Cut.cxx @@ -16,7 +16,6 @@ #include -#include #include #include diff --git a/src/BRepAlgoAPI/BRepAlgoAPI_Cut.hxx b/src/BRepAlgoAPI/BRepAlgoAPI_Cut.hxx index 41dba20286..118cc2f3b0 100644 --- a/src/BRepAlgoAPI/BRepAlgoAPI_Cut.hxx +++ b/src/BRepAlgoAPI/BRepAlgoAPI_Cut.hxx @@ -19,10 +19,8 @@ #include #include -#include #include -#include class BOPAlgo_PaveFiller; class TopoDS_Shape; diff --git a/src/BRepAlgoAPI/BRepAlgoAPI_Defeaturing.cxx b/src/BRepAlgoAPI/BRepAlgoAPI_Defeaturing.cxx index 04fa1a3dbd..878ae0ae04 100644 --- a/src/BRepAlgoAPI/BRepAlgoAPI_Defeaturing.cxx +++ b/src/BRepAlgoAPI/BRepAlgoAPI_Defeaturing.cxx @@ -15,8 +15,6 @@ #include -#include - //======================================================================= //function : Build //purpose : diff --git a/src/BRepAlgoAPI/BRepAlgoAPI_Fuse.cxx b/src/BRepAlgoAPI/BRepAlgoAPI_Fuse.cxx index cd3689b915..f4c4b4b61e 100644 --- a/src/BRepAlgoAPI/BRepAlgoAPI_Fuse.cxx +++ b/src/BRepAlgoAPI/BRepAlgoAPI_Fuse.cxx @@ -16,7 +16,6 @@ #include -#include #include #include diff --git a/src/BRepAlgoAPI/BRepAlgoAPI_Fuse.hxx b/src/BRepAlgoAPI/BRepAlgoAPI_Fuse.hxx index 53fd176773..9a0ba75644 100644 --- a/src/BRepAlgoAPI/BRepAlgoAPI_Fuse.hxx +++ b/src/BRepAlgoAPI/BRepAlgoAPI_Fuse.hxx @@ -19,7 +19,6 @@ #include #include -#include #include class BOPAlgo_PaveFiller; diff --git a/src/BRepAlgoAPI/BRepAlgoAPI_Section.cxx b/src/BRepAlgoAPI/BRepAlgoAPI_Section.cxx index 1125e6d719..032a3eb82b 100644 --- a/src/BRepAlgoAPI/BRepAlgoAPI_Section.cxx +++ b/src/BRepAlgoAPI/BRepAlgoAPI_Section.cxx @@ -31,7 +31,6 @@ #include -#include #include // diff --git a/src/BRepApprox/BRepApprox_Approx.hxx b/src/BRepApprox/BRepApprox_Approx.hxx index 59d9951684..87c91f00a9 100644 --- a/src/BRepApprox/BRepApprox_Approx.hxx +++ b/src/BRepApprox/BRepApprox_Approx.hxx @@ -25,7 +25,6 @@ #include #include #include -#include #include #include #include diff --git a/src/BRepApprox/BRepApprox_ApproxLine.hxx b/src/BRepApprox/BRepApprox_ApproxLine.hxx index fcc24913f9..c73015290d 100644 --- a/src/BRepApprox/BRepApprox_ApproxLine.hxx +++ b/src/BRepApprox/BRepApprox_ApproxLine.hxx @@ -21,7 +21,6 @@ #include #include -#include #include class Geom_BSplineCurve; class Geom2d_BSplineCurve; diff --git a/src/BRepApprox/BRepApprox_BSpGradient_BFGSOfMyBSplGradientOfTheComputeLineOfApprox.hxx b/src/BRepApprox/BRepApprox_BSpGradient_BFGSOfMyBSplGradientOfTheComputeLineOfApprox.hxx index 17d5735de2..82a838b236 100644 --- a/src/BRepApprox/BRepApprox_BSpGradient_BFGSOfMyBSplGradientOfTheComputeLineOfApprox.hxx +++ b/src/BRepApprox/BRepApprox_BSpGradient_BFGSOfMyBSplGradientOfTheComputeLineOfApprox.hxx @@ -21,11 +21,8 @@ #include #include -#include #include #include -#include -#include class BRepApprox_TheMultiLineOfApprox; class BRepApprox_TheMultiLineToolOfApprox; class BRepApprox_MyBSplGradientOfTheComputeLineOfApprox; diff --git a/src/BRepApprox/BRepApprox_BSpParFunctionOfMyBSplGradientOfTheComputeLineOfApprox.hxx b/src/BRepApprox/BRepApprox_BSpParFunctionOfMyBSplGradientOfTheComputeLineOfApprox.hxx index e4ac5c7593..1f8cb54f88 100644 --- a/src/BRepApprox/BRepApprox_BSpParFunctionOfMyBSplGradientOfTheComputeLineOfApprox.hxx +++ b/src/BRepApprox/BRepApprox_BSpParFunctionOfMyBSplGradientOfTheComputeLineOfApprox.hxx @@ -21,13 +21,9 @@ #include #include -#include #include -#include #include -#include #include -#include #include #include #include diff --git a/src/BRepApprox/BRepApprox_BSpParLeastSquareOfMyBSplGradientOfTheComputeLineOfApprox.hxx b/src/BRepApprox/BRepApprox_BSpParLeastSquareOfMyBSplGradientOfTheComputeLineOfApprox.hxx index 2c5606b57a..1575a0f2f4 100644 --- a/src/BRepApprox/BRepApprox_BSpParLeastSquareOfMyBSplGradientOfTheComputeLineOfApprox.hxx +++ b/src/BRepApprox/BRepApprox_BSpParLeastSquareOfMyBSplGradientOfTheComputeLineOfApprox.hxx @@ -30,7 +30,6 @@ #include #include #include -#include #include #include class StdFail_NotDone; diff --git a/src/BRepApprox/BRepApprox_Gradient_BFGSOfMyGradientOfTheComputeLineBezierOfApprox.hxx b/src/BRepApprox/BRepApprox_Gradient_BFGSOfMyGradientOfTheComputeLineBezierOfApprox.hxx index 73f1d42b68..c1cc266515 100644 --- a/src/BRepApprox/BRepApprox_Gradient_BFGSOfMyGradientOfTheComputeLineBezierOfApprox.hxx +++ b/src/BRepApprox/BRepApprox_Gradient_BFGSOfMyGradientOfTheComputeLineBezierOfApprox.hxx @@ -21,11 +21,8 @@ #include #include -#include #include #include -#include -#include class BRepApprox_TheMultiLineOfApprox; class BRepApprox_TheMultiLineToolOfApprox; class BRepApprox_MyGradientOfTheComputeLineBezierOfApprox; diff --git a/src/BRepApprox/BRepApprox_Gradient_BFGSOfMyGradientbisOfTheComputeLineOfApprox.hxx b/src/BRepApprox/BRepApprox_Gradient_BFGSOfMyGradientbisOfTheComputeLineOfApprox.hxx index 785cf2d427..679d657283 100644 --- a/src/BRepApprox/BRepApprox_Gradient_BFGSOfMyGradientbisOfTheComputeLineOfApprox.hxx +++ b/src/BRepApprox/BRepApprox_Gradient_BFGSOfMyGradientbisOfTheComputeLineOfApprox.hxx @@ -21,11 +21,8 @@ #include #include -#include #include #include -#include -#include class BRepApprox_TheMultiLineOfApprox; class BRepApprox_TheMultiLineToolOfApprox; class BRepApprox_MyGradientbisOfTheComputeLineOfApprox; diff --git a/src/BRepApprox/BRepApprox_MyBSplGradientOfTheComputeLineOfApprox.hxx b/src/BRepApprox/BRepApprox_MyBSplGradientOfTheComputeLineOfApprox.hxx index 1282328066..2a37e60fa6 100644 --- a/src/BRepApprox/BRepApprox_MyBSplGradientOfTheComputeLineOfApprox.hxx +++ b/src/BRepApprox/BRepApprox_MyBSplGradientOfTheComputeLineOfApprox.hxx @@ -24,7 +24,6 @@ #include #include #include -#include #include #include #include diff --git a/src/BRepApprox/BRepApprox_MyGradientOfTheComputeLineBezierOfApprox.hxx b/src/BRepApprox/BRepApprox_MyGradientOfTheComputeLineBezierOfApprox.hxx index 6bef091928..c193a09fdd 100644 --- a/src/BRepApprox/BRepApprox_MyGradientOfTheComputeLineBezierOfApprox.hxx +++ b/src/BRepApprox/BRepApprox_MyGradientOfTheComputeLineBezierOfApprox.hxx @@ -24,7 +24,6 @@ #include #include #include -#include #include #include class Standard_OutOfRange; diff --git a/src/BRepApprox/BRepApprox_MyGradientbisOfTheComputeLineOfApprox.hxx b/src/BRepApprox/BRepApprox_MyGradientbisOfTheComputeLineOfApprox.hxx index 2b1cea6722..47b5277420 100644 --- a/src/BRepApprox/BRepApprox_MyGradientbisOfTheComputeLineOfApprox.hxx +++ b/src/BRepApprox/BRepApprox_MyGradientbisOfTheComputeLineOfApprox.hxx @@ -24,7 +24,6 @@ #include #include #include -#include #include #include class Standard_OutOfRange; diff --git a/src/BRepApprox/BRepApprox_ParFunctionOfMyGradientOfTheComputeLineBezierOfApprox.hxx b/src/BRepApprox/BRepApprox_ParFunctionOfMyGradientOfTheComputeLineBezierOfApprox.hxx index 34a69fd526..3fab1fabc6 100644 --- a/src/BRepApprox/BRepApprox_ParFunctionOfMyGradientOfTheComputeLineBezierOfApprox.hxx +++ b/src/BRepApprox/BRepApprox_ParFunctionOfMyGradientOfTheComputeLineBezierOfApprox.hxx @@ -21,13 +21,9 @@ #include #include -#include #include -#include #include -#include #include -#include #include #include #include diff --git a/src/BRepApprox/BRepApprox_ParFunctionOfMyGradientbisOfTheComputeLineOfApprox.hxx b/src/BRepApprox/BRepApprox_ParFunctionOfMyGradientbisOfTheComputeLineOfApprox.hxx index 2e7db5c870..b063ac79ae 100644 --- a/src/BRepApprox/BRepApprox_ParFunctionOfMyGradientbisOfTheComputeLineOfApprox.hxx +++ b/src/BRepApprox/BRepApprox_ParFunctionOfMyGradientbisOfTheComputeLineOfApprox.hxx @@ -21,13 +21,9 @@ #include #include -#include #include -#include #include -#include #include -#include #include #include #include diff --git a/src/BRepApprox/BRepApprox_ParLeastSquareOfMyGradientOfTheComputeLineBezierOfApprox.hxx b/src/BRepApprox/BRepApprox_ParLeastSquareOfMyGradientOfTheComputeLineBezierOfApprox.hxx index 309dd8604a..0989b7e7cc 100644 --- a/src/BRepApprox/BRepApprox_ParLeastSquareOfMyGradientOfTheComputeLineBezierOfApprox.hxx +++ b/src/BRepApprox/BRepApprox_ParLeastSquareOfMyGradientOfTheComputeLineBezierOfApprox.hxx @@ -30,7 +30,6 @@ #include #include #include -#include #include #include class StdFail_NotDone; diff --git a/src/BRepApprox/BRepApprox_ParLeastSquareOfMyGradientbisOfTheComputeLineOfApprox.hxx b/src/BRepApprox/BRepApprox_ParLeastSquareOfMyGradientbisOfTheComputeLineOfApprox.hxx index 24d0f5578c..604d6ccba7 100644 --- a/src/BRepApprox/BRepApprox_ParLeastSquareOfMyGradientbisOfTheComputeLineOfApprox.hxx +++ b/src/BRepApprox/BRepApprox_ParLeastSquareOfMyGradientbisOfTheComputeLineOfApprox.hxx @@ -30,7 +30,6 @@ #include #include #include -#include #include #include class StdFail_NotDone; diff --git a/src/BRepApprox/BRepApprox_ResConstraintOfMyGradientOfTheComputeLineBezierOfApprox.hxx b/src/BRepApprox/BRepApprox_ResConstraintOfMyGradientOfTheComputeLineBezierOfApprox.hxx index a0f5431fbf..9810f75bec 100644 --- a/src/BRepApprox/BRepApprox_ResConstraintOfMyGradientOfTheComputeLineBezierOfApprox.hxx +++ b/src/BRepApprox/BRepApprox_ResConstraintOfMyGradientOfTheComputeLineBezierOfApprox.hxx @@ -21,7 +21,6 @@ #include #include -#include #include #include #include diff --git a/src/BRepApprox/BRepApprox_ResConstraintOfMyGradientbisOfTheComputeLineOfApprox.hxx b/src/BRepApprox/BRepApprox_ResConstraintOfMyGradientbisOfTheComputeLineOfApprox.hxx index fa86057a89..2ab4d15974 100644 --- a/src/BRepApprox/BRepApprox_ResConstraintOfMyGradientbisOfTheComputeLineOfApprox.hxx +++ b/src/BRepApprox/BRepApprox_ResConstraintOfMyGradientbisOfTheComputeLineOfApprox.hxx @@ -21,7 +21,6 @@ #include #include -#include #include #include #include diff --git a/src/BRepApprox/BRepApprox_SurfaceTool.cxx b/src/BRepApprox/BRepApprox_SurfaceTool.cxx index 4f28c123b4..180b2a89a2 100644 --- a/src/BRepApprox/BRepApprox_SurfaceTool.cxx +++ b/src/BRepApprox/BRepApprox_SurfaceTool.cxx @@ -16,14 +16,8 @@ #include -#include #include #include -#include -#include -#include -#include -#include Standard_Integer BRepApprox_SurfaceTool::NbSamplesU (const BRepAdaptor_Surface&) { diff --git a/src/BRepApprox/BRepApprox_TheComputeLineBezierOfApprox.hxx b/src/BRepApprox/BRepApprox_TheComputeLineBezierOfApprox.hxx index 25406dbe4f..297853fc03 100644 --- a/src/BRepApprox/BRepApprox_TheComputeLineBezierOfApprox.hxx +++ b/src/BRepApprox/BRepApprox_TheComputeLineBezierOfApprox.hxx @@ -24,14 +24,12 @@ #include #include #include -#include #include #include #include #include #include #include -#include #include #include #include diff --git a/src/BRepApprox/BRepApprox_TheComputeLineOfApprox.hxx b/src/BRepApprox/BRepApprox_TheComputeLineOfApprox.hxx index 74e773cb66..721d3ac5b3 100644 --- a/src/BRepApprox/BRepApprox_TheComputeLineOfApprox.hxx +++ b/src/BRepApprox/BRepApprox_TheComputeLineOfApprox.hxx @@ -22,13 +22,11 @@ #include #include -#include #include #include #include #include #include -#include #include #include #include diff --git a/src/BRepApprox/BRepApprox_TheFunctionOfTheInt2SOfThePrmPrmSvSurfacesOfApprox.hxx b/src/BRepApprox/BRepApprox_TheFunctionOfTheInt2SOfThePrmPrmSvSurfacesOfApprox.hxx index db04c8b66b..c36d415774 100644 --- a/src/BRepApprox/BRepApprox_TheFunctionOfTheInt2SOfThePrmPrmSvSurfacesOfApprox.hxx +++ b/src/BRepApprox/BRepApprox_TheFunctionOfTheInt2SOfThePrmPrmSvSurfacesOfApprox.hxx @@ -19,16 +19,11 @@ #include #include -#include -#include #include -#include -#include #include #include #include -#include #include #include #include diff --git a/src/BRepApprox/BRepApprox_TheImpPrmSvSurfacesOfApprox.hxx b/src/BRepApprox/BRepApprox_TheImpPrmSvSurfacesOfApprox.hxx index 4f2e3366eb..ff53052dbd 100644 --- a/src/BRepApprox/BRepApprox_TheImpPrmSvSurfacesOfApprox.hxx +++ b/src/BRepApprox/BRepApprox_TheImpPrmSvSurfacesOfApprox.hxx @@ -28,7 +28,6 @@ #include #include #include -#include class BRepAdaptor_Surface; class BRepApprox_SurfaceTool; class IntSurf_Quadric; diff --git a/src/BRepApprox/BRepApprox_TheInt2SOfThePrmPrmSvSurfacesOfApprox.hxx b/src/BRepApprox/BRepApprox_TheInt2SOfThePrmPrmSvSurfacesOfApprox.hxx index 9ade0f1fd2..57c427ffab 100644 --- a/src/BRepApprox/BRepApprox_TheInt2SOfThePrmPrmSvSurfacesOfApprox.hxx +++ b/src/BRepApprox/BRepApprox_TheInt2SOfThePrmPrmSvSurfacesOfApprox.hxx @@ -19,14 +19,11 @@ #include #include -#include -#include #include #include #include #include -#include #include #include class StdFail_NotDone; diff --git a/src/BRepApprox/BRepApprox_TheMultiLineToolOfApprox.hxx b/src/BRepApprox/BRepApprox_TheMultiLineToolOfApprox.hxx index 844abc3bb8..36af180e40 100644 --- a/src/BRepApprox/BRepApprox_TheMultiLineToolOfApprox.hxx +++ b/src/BRepApprox/BRepApprox_TheMultiLineToolOfApprox.hxx @@ -21,14 +21,8 @@ #include #include -#include #include -#include #include -#include -#include -#include -#include class BRepApprox_TheMultiLineOfApprox; class ApproxInt_SvSurfaces; diff --git a/src/BRepApprox/BRepApprox_ThePrmPrmSvSurfacesOfApprox.hxx b/src/BRepApprox/BRepApprox_ThePrmPrmSvSurfacesOfApprox.hxx index 97dcf4a0f5..b99a68391c 100644 --- a/src/BRepApprox/BRepApprox_ThePrmPrmSvSurfacesOfApprox.hxx +++ b/src/BRepApprox/BRepApprox_ThePrmPrmSvSurfacesOfApprox.hxx @@ -28,7 +28,6 @@ #include #include #include -#include class BRepAdaptor_Surface; class BRepApprox_SurfaceTool; class BRepApprox_ApproxLine; diff --git a/src/BRepApprox/BRepApprox_TheZerImpFuncOfTheImpPrmSvSurfacesOfApprox.hxx b/src/BRepApprox/BRepApprox_TheZerImpFuncOfTheImpPrmSvSurfacesOfApprox.hxx index e863ce2a29..de37d98a3d 100644 --- a/src/BRepApprox/BRepApprox_TheZerImpFuncOfTheImpPrmSvSurfacesOfApprox.hxx +++ b/src/BRepApprox/BRepApprox_TheZerImpFuncOfTheImpPrmSvSurfacesOfApprox.hxx @@ -19,16 +19,11 @@ #include #include -#include -#include -#include #include -#include #include #include #include -#include #include class StdFail_UndefinedDerivative; class BRepAdaptor_Surface; diff --git a/src/BRepBlend/BRepBlend_AppFunc.cxx b/src/BRepBlend/BRepBlend_AppFunc.cxx index 10a7734e35..5951829ec5 100644 --- a/src/BRepBlend/BRepBlend_AppFunc.cxx +++ b/src/BRepBlend/BRepBlend_AppFunc.cxx @@ -15,12 +15,9 @@ // commercial license or contractual agreement. -#include #include -#include #include #include -#include #include IMPLEMENT_STANDARD_RTTIEXT(BRepBlend_AppFunc,BRepBlend_AppFuncRoot) diff --git a/src/BRepBlend/BRepBlend_AppFunc.hxx b/src/BRepBlend/BRepBlend_AppFunc.hxx index 7a20512b77..d396b88952 100644 --- a/src/BRepBlend/BRepBlend_AppFunc.hxx +++ b/src/BRepBlend/BRepBlend_AppFunc.hxx @@ -21,7 +21,6 @@ #include #include -#include #include class BRepBlend_Line; class Blend_Function; diff --git a/src/BRepBlend/BRepBlend_AppFuncRoot.cxx b/src/BRepBlend/BRepBlend_AppFuncRoot.cxx index a81ca86e20..de8508e8b0 100644 --- a/src/BRepBlend/BRepBlend_AppFuncRoot.cxx +++ b/src/BRepBlend/BRepBlend_AppFuncRoot.cxx @@ -16,19 +16,11 @@ #include -#include #include #include #include #include -#include #include -#include -#include -#include -#include -#include -#include IMPLEMENT_STANDARD_RTTIEXT(BRepBlend_AppFuncRoot,Approx_SweepFunction) diff --git a/src/BRepBlend/BRepBlend_AppFuncRoot.hxx b/src/BRepBlend/BRepBlend_AppFuncRoot.hxx index 96010e168d..ed1c6bd4eb 100644 --- a/src/BRepBlend/BRepBlend_AppFuncRoot.hxx +++ b/src/BRepBlend/BRepBlend_AppFuncRoot.hxx @@ -25,8 +25,6 @@ #include #include #include -#include -#include #include #include #include diff --git a/src/BRepBlend/BRepBlend_AppFuncRst.cxx b/src/BRepBlend/BRepBlend_AppFuncRst.cxx index d61808261b..19f68c28e8 100644 --- a/src/BRepBlend/BRepBlend_AppFuncRst.cxx +++ b/src/BRepBlend/BRepBlend_AppFuncRst.cxx @@ -15,12 +15,9 @@ // commercial license or contractual agreement. -#include -#include #include #include #include -#include #include IMPLEMENT_STANDARD_RTTIEXT(BRepBlend_AppFuncRst,BRepBlend_AppFuncRoot) diff --git a/src/BRepBlend/BRepBlend_AppFuncRst.hxx b/src/BRepBlend/BRepBlend_AppFuncRst.hxx index 13783263a9..335a8399b5 100644 --- a/src/BRepBlend/BRepBlend_AppFuncRst.hxx +++ b/src/BRepBlend/BRepBlend_AppFuncRst.hxx @@ -21,7 +21,6 @@ #include #include -#include #include class BRepBlend_Line; class Blend_SurfRstFunction; diff --git a/src/BRepBlend/BRepBlend_AppFuncRstRst.cxx b/src/BRepBlend/BRepBlend_AppFuncRstRst.cxx index dfda9f6512..6205049b97 100644 --- a/src/BRepBlend/BRepBlend_AppFuncRstRst.cxx +++ b/src/BRepBlend/BRepBlend_AppFuncRstRst.cxx @@ -15,12 +15,9 @@ // commercial license or contractual agreement. -#include -#include #include #include #include -#include #include IMPLEMENT_STANDARD_RTTIEXT(BRepBlend_AppFuncRstRst,BRepBlend_AppFuncRoot) diff --git a/src/BRepBlend/BRepBlend_AppFuncRstRst.hxx b/src/BRepBlend/BRepBlend_AppFuncRstRst.hxx index 982cf7973c..3fc44e10b4 100644 --- a/src/BRepBlend/BRepBlend_AppFuncRstRst.hxx +++ b/src/BRepBlend/BRepBlend_AppFuncRstRst.hxx @@ -21,7 +21,6 @@ #include #include -#include #include class BRepBlend_Line; class Blend_RstRstFunction; diff --git a/src/BRepBlend/BRepBlend_AppSurface.cxx b/src/BRepBlend/BRepBlend_AppSurface.cxx index 460d599fc2..4cef0aab21 100644 --- a/src/BRepBlend/BRepBlend_AppSurface.cxx +++ b/src/BRepBlend/BRepBlend_AppSurface.cxx @@ -17,9 +17,6 @@ #include #include -#include -#include -#include #include #include #include diff --git a/src/BRepBlend/BRepBlend_AppSurface.hxx b/src/BRepBlend/BRepBlend_AppSurface.hxx index b3e6051331..8d78dc4f29 100644 --- a/src/BRepBlend/BRepBlend_AppSurface.hxx +++ b/src/BRepBlend/BRepBlend_AppSurface.hxx @@ -23,10 +23,8 @@ #include #include -#include #include #include -#include #include #include #include diff --git a/src/BRepBlend/BRepBlend_BlendTool.cxx b/src/BRepBlend/BRepBlend_BlendTool.cxx index 23147b0a98..ecd458bc7b 100644 --- a/src/BRepBlend/BRepBlend_BlendTool.cxx +++ b/src/BRepBlend/BRepBlend_BlendTool.cxx @@ -18,10 +18,8 @@ #include #include -#include #include #include -#include #include #include #include @@ -31,8 +29,6 @@ #include #include #include -#include -#include //======================================================================= //function : Project diff --git a/src/BRepBlend/BRepBlend_CSWalking.hxx b/src/BRepBlend/BRepBlend_CSWalking.hxx index 4dd1ffb262..8cc3b0ccba 100644 --- a/src/BRepBlend/BRepBlend_CSWalking.hxx +++ b/src/BRepBlend/BRepBlend_CSWalking.hxx @@ -129,8 +129,6 @@ private: #define Blend_CSWalking BRepBlend_CSWalking #define Blend_CSWalking_hxx -#include - #undef TheVertex #undef TheVertex_hxx #undef TheArc diff --git a/src/BRepBlend/BRepBlend_CurvPointRadInv.hxx b/src/BRepBlend/BRepBlend_CurvPointRadInv.hxx index 9e71c82d47..d6b1d6f21c 100644 --- a/src/BRepBlend/BRepBlend_CurvPointRadInv.hxx +++ b/src/BRepBlend/BRepBlend_CurvPointRadInv.hxx @@ -24,9 +24,7 @@ #include #include #include -#include #include -#include class math_Matrix; diff --git a/src/BRepBlend/BRepBlend_Extremity.cxx b/src/BRepBlend/BRepBlend_Extremity.cxx index 6ace49c32f..b2472b79f9 100644 --- a/src/BRepBlend/BRepBlend_Extremity.cxx +++ b/src/BRepBlend/BRepBlend_Extremity.cxx @@ -20,8 +20,6 @@ #include #include #include -#include -#include BRepBlend_Extremity::BRepBlend_Extremity (): pt(gp_Pnt(0,0,0)), diff --git a/src/BRepBlend/BRepBlend_HCurve2dTool.cxx b/src/BRepBlend/BRepBlend_HCurve2dTool.cxx index 709787d04c..21fc32b706 100644 --- a/src/BRepBlend/BRepBlend_HCurve2dTool.cxx +++ b/src/BRepBlend/BRepBlend_HCurve2dTool.cxx @@ -20,13 +20,6 @@ #include #include #include -#include -#include -#include -#include -#include -#include -#include //============================================================ Standard_Integer BRepBlend_HCurve2dTool::NbSamples (const Handle(Adaptor2d_Curve2d)& C, diff --git a/src/BRepBlend/BRepBlend_HCurve2dTool.hxx b/src/BRepBlend/BRepBlend_HCurve2dTool.hxx index 2e00dfcfc1..c28ebfdbea 100644 --- a/src/BRepBlend/BRepBlend_HCurve2dTool.hxx +++ b/src/BRepBlend/BRepBlend_HCurve2dTool.hxx @@ -18,8 +18,6 @@ #define _BRepBlend_HCurve2dTool_HeaderFile #include -#include -#include #include #include #include diff --git a/src/BRepBlend/BRepBlend_HCurveTool.cxx b/src/BRepBlend/BRepBlend_HCurveTool.cxx index 8902fe3401..48e7aed39d 100644 --- a/src/BRepBlend/BRepBlend_HCurveTool.cxx +++ b/src/BRepBlend/BRepBlend_HCurveTool.cxx @@ -20,13 +20,6 @@ #include #include #include -#include -#include -#include -#include -#include -#include -#include //============================================================ Standard_Integer BRepBlend_HCurveTool::NbSamples (const Handle(Adaptor3d_Curve)& C, diff --git a/src/BRepBlend/BRepBlend_HCurveTool.hxx b/src/BRepBlend/BRepBlend_HCurveTool.hxx index 247b59741d..3edb968f7a 100644 --- a/src/BRepBlend/BRepBlend_HCurveTool.hxx +++ b/src/BRepBlend/BRepBlend_HCurveTool.hxx @@ -18,8 +18,6 @@ #define _BRepBlend_HCurveTool_HeaderFile #include -#include -#include #include #include #include diff --git a/src/BRepBlend/BRepBlend_Line.cxx b/src/BRepBlend/BRepBlend_Line.cxx index 724333675d..039d2f2cec 100644 --- a/src/BRepBlend/BRepBlend_Line.cxx +++ b/src/BRepBlend/BRepBlend_Line.cxx @@ -13,10 +13,7 @@ // commercial license or contractual agreement. -#include -#include #include -#include #include IMPLEMENT_STANDARD_RTTIEXT(BRepBlend_Line,Standard_Transient) diff --git a/src/BRepBlend/BRepBlend_Line.hxx b/src/BRepBlend/BRepBlend_Line.hxx index 73737dbbea..c62fc793b1 100644 --- a/src/BRepBlend/BRepBlend_Line.hxx +++ b/src/BRepBlend/BRepBlend_Line.hxx @@ -17,15 +17,11 @@ #ifndef _BRepBlend_Line_HeaderFile #define _BRepBlend_Line_HeaderFile -#include -#include - #include -#include #include -#include #include #include + class Blend_Point; diff --git a/src/BRepBlend/BRepBlend_PointOnRst.cxx b/src/BRepBlend/BRepBlend_PointOnRst.cxx index 90815bdfc8..3e53f75fd1 100644 --- a/src/BRepBlend/BRepBlend_PointOnRst.cxx +++ b/src/BRepBlend/BRepBlend_PointOnRst.cxx @@ -16,7 +16,6 @@ #include #include -#include BRepBlend_PointOnRst::BRepBlend_PointOnRst () : prm(0.0) diff --git a/src/BRepBlend/BRepBlend_RstRstConstRad.cxx b/src/BRepBlend/BRepBlend_RstRstConstRad.cxx index 7ebfde0f53..6774a498d3 100644 --- a/src/BRepBlend/BRepBlend_RstRstConstRad.cxx +++ b/src/BRepBlend/BRepBlend_RstRstConstRad.cxx @@ -23,7 +23,6 @@ #include #include #include -#include #include #include #include diff --git a/src/BRepBlend/BRepBlend_RstRstEvolRad.cxx b/src/BRepBlend/BRepBlend_RstRstEvolRad.cxx index 034bc2f5de..87e5064cee 100644 --- a/src/BRepBlend/BRepBlend_RstRstEvolRad.cxx +++ b/src/BRepBlend/BRepBlend_RstRstEvolRad.cxx @@ -23,7 +23,6 @@ #include #include #include -#include #include #include #include diff --git a/src/BRepBlend/BRepBlend_RstRstLineBuilder.cxx b/src/BRepBlend/BRepBlend_RstRstLineBuilder.cxx index 63d77a7bb6..0183b24216 100644 --- a/src/BRepBlend/BRepBlend_RstRstLineBuilder.cxx +++ b/src/BRepBlend/BRepBlend_RstRstLineBuilder.cxx @@ -16,15 +16,11 @@ #include -#include -#include #include #include -#include #include #include #include -#include #include #include #include diff --git a/src/BRepBlend/BRepBlend_SurfCurvConstRadInv.cxx b/src/BRepBlend/BRepBlend_SurfCurvConstRadInv.cxx index e855c3ab43..30f4225cc3 100644 --- a/src/BRepBlend/BRepBlend_SurfCurvConstRadInv.cxx +++ b/src/BRepBlend/BRepBlend_SurfCurvConstRadInv.cxx @@ -16,8 +16,6 @@ #include -#include -#include #include #include diff --git a/src/BRepBlend/BRepBlend_SurfCurvEvolRadInv.cxx b/src/BRepBlend/BRepBlend_SurfCurvEvolRadInv.cxx index b32d2c2b22..bf9e1754de 100644 --- a/src/BRepBlend/BRepBlend_SurfCurvEvolRadInv.cxx +++ b/src/BRepBlend/BRepBlend_SurfCurvEvolRadInv.cxx @@ -16,8 +16,6 @@ #include -#include -#include #include #include #include diff --git a/src/BRepBlend/BRepBlend_SurfPointConstRadInv.cxx b/src/BRepBlend/BRepBlend_SurfPointConstRadInv.cxx index 933b58e942..2944fd10f4 100644 --- a/src/BRepBlend/BRepBlend_SurfPointConstRadInv.cxx +++ b/src/BRepBlend/BRepBlend_SurfPointConstRadInv.cxx @@ -15,8 +15,6 @@ // commercial license or contractual agreement. -#include -#include #include #include #include diff --git a/src/BRepBlend/BRepBlend_SurfPointEvolRadInv.cxx b/src/BRepBlend/BRepBlend_SurfPointEvolRadInv.cxx index ed48d2b423..51e4a9fbc8 100644 --- a/src/BRepBlend/BRepBlend_SurfPointEvolRadInv.cxx +++ b/src/BRepBlend/BRepBlend_SurfPointEvolRadInv.cxx @@ -15,8 +15,6 @@ // commercial license or contractual agreement. -#include -#include #include #include #include diff --git a/src/BRepBlend/BRepBlend_SurfRstConstRad.cxx b/src/BRepBlend/BRepBlend_SurfRstConstRad.cxx index 1e878dec20..7f2517ce57 100644 --- a/src/BRepBlend/BRepBlend_SurfRstConstRad.cxx +++ b/src/BRepBlend/BRepBlend_SurfRstConstRad.cxx @@ -16,14 +16,11 @@ #include -#include -#include #include #include #include #include #include -#include #include #include #include diff --git a/src/BRepBlend/BRepBlend_SurfRstEvolRad.cxx b/src/BRepBlend/BRepBlend_SurfRstEvolRad.cxx index f0dcb69a0e..b70aee8655 100644 --- a/src/BRepBlend/BRepBlend_SurfRstEvolRad.cxx +++ b/src/BRepBlend/BRepBlend_SurfRstEvolRad.cxx @@ -16,14 +16,11 @@ #include -#include -#include #include #include #include #include #include -#include #include #include #include diff --git a/src/BRepBlend/BRepBlend_SurfRstLineBuilder.cxx b/src/BRepBlend/BRepBlend_SurfRstLineBuilder.cxx index 98c7af553d..02d657bd34 100644 --- a/src/BRepBlend/BRepBlend_SurfRstLineBuilder.cxx +++ b/src/BRepBlend/BRepBlend_SurfRstLineBuilder.cxx @@ -16,16 +16,12 @@ #include -#include -#include #include #include -#include #include #include #include #include -#include #include #include #include diff --git a/src/BRepBndLib/BRepBndLib.cxx b/src/BRepBndLib/BRepBndLib.cxx index a225c55540..e8e3a98708 100644 --- a/src/BRepBndLib/BRepBndLib.cxx +++ b/src/BRepBndLib/BRepBndLib.cxx @@ -16,14 +16,11 @@ #include #include #include -#include #include #include #include #include -#include #include -#include #include #include #include diff --git a/src/BRepBndLib/BRepBndLib.hxx b/src/BRepBndLib/BRepBndLib.hxx index aff41a5ef6..c44457f5f9 100644 --- a/src/BRepBndLib/BRepBndLib.hxx +++ b/src/BRepBndLib/BRepBndLib.hxx @@ -19,9 +19,7 @@ #include #include -#include -#include class TopoDS_Shape; class Bnd_Box; class Bnd_OBB; diff --git a/src/BRepBndLib/BRepBndLib_1.cxx b/src/BRepBndLib/BRepBndLib_1.cxx index 969145438b..f77feec382 100644 --- a/src/BRepBndLib/BRepBndLib_1.cxx +++ b/src/BRepBndLib/BRepBndLib_1.cxx @@ -11,12 +11,7 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -#include -#include -#include #include -#include -#include #include #include #include @@ -26,19 +21,14 @@ #include #include #include -#include #include #include #include -#include -#include #include #include #include #include -#include -#include #include //======================================================================= diff --git a/src/BRepBuilderAPI/BRepBuilderAPI.cxx b/src/BRepBuilderAPI/BRepBuilderAPI.cxx index e0d9c60e4e..e84fe8d2ec 100644 --- a/src/BRepBuilderAPI/BRepBuilderAPI.cxx +++ b/src/BRepBuilderAPI/BRepBuilderAPI.cxx @@ -21,13 +21,6 @@ #include #include #include -#include -#include -#include -#include -#include -#include -#include #include //======================================================================= @@ -44,7 +37,6 @@ void BRepBuilderAPI::Plane(const Handle(Geom_Plane)& P) //function : Plane //purpose : //======================================================================= - const Handle(Geom_Plane)& BRepBuilderAPI::Plane() { return BRepLib::Plane(); @@ -55,7 +47,6 @@ const Handle(Geom_Plane)& BRepBuilderAPI::Plane() //function : Precision //purpose : //======================================================================= - void BRepBuilderAPI::Precision(const Standard_Real P) { BRepLib::Precision(P); @@ -66,7 +57,6 @@ void BRepBuilderAPI::Precision(const Standard_Real P) //function : Precision //purpose : //======================================================================= - Standard_Real BRepBuilderAPI::Precision() { return BRepLib::Precision(); diff --git a/src/BRepBuilderAPI/BRepBuilderAPI_Collect.cxx b/src/BRepBuilderAPI/BRepBuilderAPI_Collect.cxx index 7217e03e94..2f54913e2c 100644 --- a/src/BRepBuilderAPI/BRepBuilderAPI_Collect.cxx +++ b/src/BRepBuilderAPI/BRepBuilderAPI_Collect.cxx @@ -22,7 +22,6 @@ #include #include #include -#include #include #include diff --git a/src/BRepBuilderAPI/BRepBuilderAPI_Copy.hxx b/src/BRepBuilderAPI/BRepBuilderAPI_Copy.hxx index 3dc9c5f581..640db82fb3 100644 --- a/src/BRepBuilderAPI/BRepBuilderAPI_Copy.hxx +++ b/src/BRepBuilderAPI/BRepBuilderAPI_Copy.hxx @@ -19,7 +19,6 @@ #include #include -#include #include diff --git a/src/BRepBuilderAPI/BRepBuilderAPI_FindPlane.cxx b/src/BRepBuilderAPI/BRepBuilderAPI_FindPlane.cxx index 90d5664746..0f4e35eeac 100644 --- a/src/BRepBuilderAPI/BRepBuilderAPI_FindPlane.cxx +++ b/src/BRepBuilderAPI/BRepBuilderAPI_FindPlane.cxx @@ -31,7 +31,6 @@ #include #include #include -#include #include #include #include diff --git a/src/BRepBuilderAPI/BRepBuilderAPI_FindPlane.hxx b/src/BRepBuilderAPI/BRepBuilderAPI_FindPlane.hxx index a0695d5809..8edc89db05 100644 --- a/src/BRepBuilderAPI/BRepBuilderAPI_FindPlane.hxx +++ b/src/BRepBuilderAPI/BRepBuilderAPI_FindPlane.hxx @@ -21,8 +21,6 @@ #include #include -#include -#include class Geom_Plane; class TopoDS_Shape; diff --git a/src/BRepBuilderAPI/BRepBuilderAPI_GTransform.cxx b/src/BRepBuilderAPI/BRepBuilderAPI_GTransform.cxx index ecd4b008bf..e0c5fb912f 100644 --- a/src/BRepBuilderAPI/BRepBuilderAPI_GTransform.cxx +++ b/src/BRepBuilderAPI/BRepBuilderAPI_GTransform.cxx @@ -20,12 +20,8 @@ #include #include #include -#include #include -#include -#include #include -#include #include //======================================================================= diff --git a/src/BRepBuilderAPI/BRepBuilderAPI_GTransform.hxx b/src/BRepBuilderAPI/BRepBuilderAPI_GTransform.hxx index 3cc981de8e..63683575b1 100644 --- a/src/BRepBuilderAPI/BRepBuilderAPI_GTransform.hxx +++ b/src/BRepBuilderAPI/BRepBuilderAPI_GTransform.hxx @@ -19,12 +19,10 @@ #include #include -#include #include #include #include -#include #include class TopoDS_Shape; diff --git a/src/BRepBuilderAPI/BRepBuilderAPI_MakeEdge.cxx b/src/BRepBuilderAPI/BRepBuilderAPI_MakeEdge.cxx index e1c467eb5a..974ecda048 100644 --- a/src/BRepBuilderAPI/BRepBuilderAPI_MakeEdge.cxx +++ b/src/BRepBuilderAPI/BRepBuilderAPI_MakeEdge.cxx @@ -17,15 +17,12 @@ #include #include -#include #include #include #include #include -#include #include #include -#include #include #include diff --git a/src/BRepBuilderAPI/BRepBuilderAPI_MakeEdge.hxx b/src/BRepBuilderAPI/BRepBuilderAPI_MakeEdge.hxx index e26dc8b06d..7ec829f32a 100644 --- a/src/BRepBuilderAPI/BRepBuilderAPI_MakeEdge.hxx +++ b/src/BRepBuilderAPI/BRepBuilderAPI_MakeEdge.hxx @@ -24,7 +24,6 @@ #include #include #include -#include #include class TopoDS_Vertex; class gp_Pnt; diff --git a/src/BRepBuilderAPI/BRepBuilderAPI_MakeEdge2d.cxx b/src/BRepBuilderAPI/BRepBuilderAPI_MakeEdge2d.cxx index 1a7de2fd0e..0be780e29e 100644 --- a/src/BRepBuilderAPI/BRepBuilderAPI_MakeEdge2d.cxx +++ b/src/BRepBuilderAPI/BRepBuilderAPI_MakeEdge2d.cxx @@ -23,7 +23,6 @@ #include #include #include -#include #include #include diff --git a/src/BRepBuilderAPI/BRepBuilderAPI_MakeEdge2d.hxx b/src/BRepBuilderAPI/BRepBuilderAPI_MakeEdge2d.hxx index b44b213721..5b0b300bf2 100644 --- a/src/BRepBuilderAPI/BRepBuilderAPI_MakeEdge2d.hxx +++ b/src/BRepBuilderAPI/BRepBuilderAPI_MakeEdge2d.hxx @@ -24,7 +24,6 @@ #include #include #include -#include #include class TopoDS_Vertex; class gp_Pnt2d; diff --git a/src/BRepBuilderAPI/BRepBuilderAPI_MakeFace.cxx b/src/BRepBuilderAPI/BRepBuilderAPI_MakeFace.cxx index 82f3d6771e..b21f484866 100644 --- a/src/BRepBuilderAPI/BRepBuilderAPI_MakeFace.cxx +++ b/src/BRepBuilderAPI/BRepBuilderAPI_MakeFace.cxx @@ -22,7 +22,6 @@ #include #include #include -#include #include #include diff --git a/src/BRepBuilderAPI/BRepBuilderAPI_MakeFace.hxx b/src/BRepBuilderAPI/BRepBuilderAPI_MakeFace.hxx index 75187545da..17e355eafd 100644 --- a/src/BRepBuilderAPI/BRepBuilderAPI_MakeFace.hxx +++ b/src/BRepBuilderAPI/BRepBuilderAPI_MakeFace.hxx @@ -24,7 +24,6 @@ #include #include #include -#include #include class TopoDS_Face; class gp_Pln; diff --git a/src/BRepBuilderAPI/BRepBuilderAPI_MakePolygon.cxx b/src/BRepBuilderAPI/BRepBuilderAPI_MakePolygon.cxx index 15ca15fdfc..526f162389 100644 --- a/src/BRepBuilderAPI/BRepBuilderAPI_MakePolygon.cxx +++ b/src/BRepBuilderAPI/BRepBuilderAPI_MakePolygon.cxx @@ -17,7 +17,6 @@ #include #include -#include #include #include #include diff --git a/src/BRepBuilderAPI/BRepBuilderAPI_MakePolygon.hxx b/src/BRepBuilderAPI/BRepBuilderAPI_MakePolygon.hxx index a0fde05bc6..e5375e389c 100644 --- a/src/BRepBuilderAPI/BRepBuilderAPI_MakePolygon.hxx +++ b/src/BRepBuilderAPI/BRepBuilderAPI_MakePolygon.hxx @@ -23,7 +23,6 @@ #include #include -#include class gp_Pnt; class TopoDS_Vertex; class TopoDS_Edge; diff --git a/src/BRepBuilderAPI/BRepBuilderAPI_MakeShape.cxx b/src/BRepBuilderAPI/BRepBuilderAPI_MakeShape.cxx index 2ff0a1454c..6bf1bd1d85 100644 --- a/src/BRepBuilderAPI/BRepBuilderAPI_MakeShape.cxx +++ b/src/BRepBuilderAPI/BRepBuilderAPI_MakeShape.cxx @@ -16,12 +16,7 @@ #include -#include -#include -#include -#include #include -#include //======================================================================= //function : BRepBuilderAPI_MakeShape diff --git a/src/BRepBuilderAPI/BRepBuilderAPI_MakeShape.hxx b/src/BRepBuilderAPI/BRepBuilderAPI_MakeShape.hxx index 80c06e107c..cf10ea7701 100644 --- a/src/BRepBuilderAPI/BRepBuilderAPI_MakeShape.hxx +++ b/src/BRepBuilderAPI/BRepBuilderAPI_MakeShape.hxx @@ -24,7 +24,6 @@ #include #include #include -#include #include diff --git a/src/BRepBuilderAPI/BRepBuilderAPI_MakeShell.cxx b/src/BRepBuilderAPI/BRepBuilderAPI_MakeShell.cxx index e3a0b31edd..3e99285ceb 100644 --- a/src/BRepBuilderAPI/BRepBuilderAPI_MakeShell.cxx +++ b/src/BRepBuilderAPI/BRepBuilderAPI_MakeShell.cxx @@ -17,7 +17,6 @@ #include #include -#include #include //======================================================================= diff --git a/src/BRepBuilderAPI/BRepBuilderAPI_MakeShell.hxx b/src/BRepBuilderAPI/BRepBuilderAPI_MakeShell.hxx index 817a533725..d5df37572b 100644 --- a/src/BRepBuilderAPI/BRepBuilderAPI_MakeShell.hxx +++ b/src/BRepBuilderAPI/BRepBuilderAPI_MakeShell.hxx @@ -23,7 +23,6 @@ #include #include -#include #include #include class Geom_Surface; diff --git a/src/BRepBuilderAPI/BRepBuilderAPI_MakeSolid.cxx b/src/BRepBuilderAPI/BRepBuilderAPI_MakeSolid.cxx index e796d8699d..97290d8a68 100644 --- a/src/BRepBuilderAPI/BRepBuilderAPI_MakeSolid.cxx +++ b/src/BRepBuilderAPI/BRepBuilderAPI_MakeSolid.cxx @@ -16,7 +16,6 @@ #include -#include #include #include #include diff --git a/src/BRepBuilderAPI/BRepBuilderAPI_MakeSolid.hxx b/src/BRepBuilderAPI/BRepBuilderAPI_MakeSolid.hxx index 1bb3b20aea..523c72bdd8 100644 --- a/src/BRepBuilderAPI/BRepBuilderAPI_MakeSolid.hxx +++ b/src/BRepBuilderAPI/BRepBuilderAPI_MakeSolid.hxx @@ -23,7 +23,6 @@ #include #include -#include class TopoDS_CompSolid; class TopoDS_Shell; class TopoDS_Solid; diff --git a/src/BRepBuilderAPI/BRepBuilderAPI_MakeVertex.cxx b/src/BRepBuilderAPI/BRepBuilderAPI_MakeVertex.cxx index 8620832d4b..717ce41f0c 100644 --- a/src/BRepBuilderAPI/BRepBuilderAPI_MakeVertex.cxx +++ b/src/BRepBuilderAPI/BRepBuilderAPI_MakeVertex.cxx @@ -15,11 +15,8 @@ // commercial license or contractual agreement. -#include -#include #include #include -#include #include //======================================================================= diff --git a/src/BRepBuilderAPI/BRepBuilderAPI_MakeWire.cxx b/src/BRepBuilderAPI/BRepBuilderAPI_MakeWire.cxx index 4b0a5a6d90..1acd79ff6f 100644 --- a/src/BRepBuilderAPI/BRepBuilderAPI_MakeWire.cxx +++ b/src/BRepBuilderAPI/BRepBuilderAPI_MakeWire.cxx @@ -16,7 +16,6 @@ #include -#include #include #include #include diff --git a/src/BRepBuilderAPI/BRepBuilderAPI_MakeWire.hxx b/src/BRepBuilderAPI/BRepBuilderAPI_MakeWire.hxx index 3c83d7b021..be89327a2a 100644 --- a/src/BRepBuilderAPI/BRepBuilderAPI_MakeWire.hxx +++ b/src/BRepBuilderAPI/BRepBuilderAPI_MakeWire.hxx @@ -24,7 +24,6 @@ #include #include #include -#include #include class TopoDS_Edge; class TopoDS_Wire; diff --git a/src/BRepBuilderAPI/BRepBuilderAPI_ModifyShape.cxx b/src/BRepBuilderAPI/BRepBuilderAPI_ModifyShape.cxx index f82288b33f..7ab53d2f76 100644 --- a/src/BRepBuilderAPI/BRepBuilderAPI_ModifyShape.cxx +++ b/src/BRepBuilderAPI/BRepBuilderAPI_ModifyShape.cxx @@ -17,7 +17,6 @@ #include #include -#include #include #include diff --git a/src/BRepBuilderAPI/BRepBuilderAPI_NurbsConvert.cxx b/src/BRepBuilderAPI/BRepBuilderAPI_NurbsConvert.cxx index a130f82aac..a0e7448524 100644 --- a/src/BRepBuilderAPI/BRepBuilderAPI_NurbsConvert.cxx +++ b/src/BRepBuilderAPI/BRepBuilderAPI_NurbsConvert.cxx @@ -19,10 +19,8 @@ #include #include #include -#include #include #include -#include #include #include diff --git a/src/BRepBuilderAPI/BRepBuilderAPI_NurbsConvert.hxx b/src/BRepBuilderAPI/BRepBuilderAPI_NurbsConvert.hxx index b439d775f8..bc0098d1eb 100644 --- a/src/BRepBuilderAPI/BRepBuilderAPI_NurbsConvert.hxx +++ b/src/BRepBuilderAPI/BRepBuilderAPI_NurbsConvert.hxx @@ -19,10 +19,8 @@ #include #include -#include #include -#include #include #include diff --git a/src/BRepBuilderAPI/BRepBuilderAPI_Sewing.cxx b/src/BRepBuilderAPI/BRepBuilderAPI_Sewing.cxx index cb11204ff1..65bb5ab958 100644 --- a/src/BRepBuilderAPI/BRepBuilderAPI_Sewing.cxx +++ b/src/BRepBuilderAPI/BRepBuilderAPI_Sewing.cxx @@ -42,9 +42,7 @@ #define TEST 1 -#include #include -#include #include #include #include @@ -61,45 +59,33 @@ #include #include #include -#include #include #include #include -#include -#include -#include #include #include #include #include -#include -#include -#include #include -#include #include #include #include #include -#include #include #include #include #include #include #include -#include #include #include #include #include #include #include -#include #include #include #include -#include #include #include #include @@ -116,9 +102,7 @@ #include #include #include -#include #include -#include #include #include #include diff --git a/src/BRepBuilderAPI/BRepBuilderAPI_Sewing.hxx b/src/BRepBuilderAPI/BRepBuilderAPI_Sewing.hxx index 217dc572cc..883f3d6c3f 100644 --- a/src/BRepBuilderAPI/BRepBuilderAPI_Sewing.hxx +++ b/src/BRepBuilderAPI/BRepBuilderAPI_Sewing.hxx @@ -20,8 +20,6 @@ #include #include -#include -#include #include #include #include diff --git a/src/BRepBuilderAPI/BRepBuilderAPI_Transform.cxx b/src/BRepBuilderAPI/BRepBuilderAPI_Transform.cxx index 8052e97e27..3b5b233e69 100644 --- a/src/BRepBuilderAPI/BRepBuilderAPI_Transform.cxx +++ b/src/BRepBuilderAPI/BRepBuilderAPI_Transform.cxx @@ -17,9 +17,7 @@ #include #include -#include #include -#include #include //======================================================================= diff --git a/src/BRepBuilderAPI/BRepBuilderAPI_Transform.hxx b/src/BRepBuilderAPI/BRepBuilderAPI_Transform.hxx index c3945e20ec..ac27d62600 100644 --- a/src/BRepBuilderAPI/BRepBuilderAPI_Transform.hxx +++ b/src/BRepBuilderAPI/BRepBuilderAPI_Transform.hxx @@ -22,8 +22,6 @@ #include #include -#include -#include #include #include class TopoDS_Shape; diff --git a/src/BRepBuilderAPI/BRepBuilderAPI_VertexInspector.hxx b/src/BRepBuilderAPI/BRepBuilderAPI_VertexInspector.hxx index 1eb76061f8..49b419cdca 100644 --- a/src/BRepBuilderAPI/BRepBuilderAPI_VertexInspector.hxx +++ b/src/BRepBuilderAPI/BRepBuilderAPI_VertexInspector.hxx @@ -18,7 +18,6 @@ #include #include -#include #include #include From dfa2a6719ca7dfea6a97743f87d47ba472de8a11 Mon Sep 17 00:00:00 2001 From: kgv Date: Wed, 12 Jan 2022 19:51:18 +0300 Subject: [PATCH 190/639] 0032763: Coding Rules - eliminate CLang warning -Wbitwise-instead-of-logical in math_FunctionSetRoot.cxx --- src/math/FILES | 1 - src/math/math_FunctionSetRoot.cxx | 43 +++++++++----- src/math/math_FunctionSetRoot.hxx | 98 ++++++++++++++++++------------- src/math/math_FunctionSetRoot.lxx | 80 ------------------------- 4 files changed, 87 insertions(+), 135 deletions(-) delete mode 100644 src/math/math_FunctionSetRoot.lxx diff --git a/src/math/FILES b/src/math/FILES index 8c392c612a..c371253135 100755 --- a/src/math/FILES +++ b/src/math/FILES @@ -52,7 +52,6 @@ math_FunctionSet.cxx math_FunctionSet.hxx math_FunctionSetRoot.cxx math_FunctionSetRoot.hxx -math_FunctionSetRoot.lxx math_FunctionSetWithDerivatives.hxx math_FunctionWithDerivative.cxx math_FunctionWithDerivative.hxx diff --git a/src/math/math_FunctionSetRoot.cxx b/src/math/math_FunctionSetRoot.cxx index 3cb7d8aa6b..51801a4313 100644 --- a/src/math/math_FunctionSetRoot.cxx +++ b/src/math/math_FunctionSetRoot.cxx @@ -736,12 +736,15 @@ void math_FunctionSetRoot::Perform(math_FunctionSetWithDerivatives& F, myIsDivergent = Standard_False; for (i = 1; i <= Ninc; i++) { - myIsDivergent |= (Sol(i) < theInfBound(i)) | (theSupBound(i) < Sol(i)); + myIsDivergent = myIsDivergent + || Sol(i) < theInfBound(i) + || Sol(i) > theSupBound(i); } - if (theStopOnDivergent & myIsDivergent) + if (theStopOnDivergent && myIsDivergent) { return; } + // Verification de la validite des inconnues par rapport aux bornes. // Recentrage sur les bornes si pas valide. for ( i = 1; i <= Ninc; i++) { @@ -811,9 +814,11 @@ void math_FunctionSetRoot::Perform(math_FunctionSetWithDerivatives& F, // for (i = 1; i <= Ninc; i++) { - myIsDivergent |= (Sol(i) < theInfBound(i)) | (theSupBound(i) < Sol(i)); + myIsDivergent = myIsDivergent + || Sol(i) < theInfBound(i) + || Sol(i) > theSupBound(i); } - if (theStopOnDivergent & myIsDivergent) + if (theStopOnDivergent && myIsDivergent) { return; } @@ -877,9 +882,11 @@ void math_FunctionSetRoot::Perform(math_FunctionSetWithDerivatives& F, // for (i = 1; i <= Ninc; i++) { - myIsDivergent |= (Sol(i) < theInfBound(i)) | (theSupBound(i) < Sol(i)); + myIsDivergent = myIsDivergent + || Sol(i) < theInfBound(i) + || Sol(i) > theSupBound(i); } - if (theStopOnDivergent & myIsDivergent) + if (theStopOnDivergent && myIsDivergent) { return; } @@ -915,9 +922,11 @@ void math_FunctionSetRoot::Perform(math_FunctionSetWithDerivatives& F, // for (i = 1; i <= Ninc; i++) { - myIsDivergent |= (Sol(i) < theInfBound(i)) | (theSupBound(i) < Sol(i)); + myIsDivergent = myIsDivergent + || Sol(i) < theInfBound(i) + || Sol(i) > theSupBound(i); } - if (theStopOnDivergent & myIsDivergent) + if (theStopOnDivergent && myIsDivergent) { return; } @@ -997,9 +1006,11 @@ void math_FunctionSetRoot::Perform(math_FunctionSetWithDerivatives& F, // for (i = 1; i <= Ninc; i++) { - myIsDivergent |= (Sol(i) < theInfBound(i)) | (theSupBound(i) < Sol(i)); + myIsDivergent = myIsDivergent + || Sol(i) < theInfBound(i) + || Sol(i) > theSupBound(i); } - if (theStopOnDivergent & myIsDivergent) + if (theStopOnDivergent && myIsDivergent) { return; } @@ -1040,9 +1051,11 @@ void math_FunctionSetRoot::Perform(math_FunctionSetWithDerivatives& F, // for (i = 1; i <= Ninc; i++) { - myIsDivergent |= (Sol(i) < theInfBound(i)) | (theSupBound(i) < Sol(i)); + myIsDivergent = myIsDivergent + || Sol(i) < theInfBound(i) + || Sol(i) > theSupBound(i); } - if (theStopOnDivergent & myIsDivergent) + if (theStopOnDivergent && myIsDivergent) { return; } @@ -1083,9 +1096,11 @@ void math_FunctionSetRoot::Perform(math_FunctionSetWithDerivatives& F, // for (i = 1; i <= Ninc; i++) { - myIsDivergent |= (Sol(i) < theInfBound(i)) | (theSupBound(i) < Sol(i)); + myIsDivergent = myIsDivergent + || Sol(i) < theInfBound(i) + || Sol(i) > theSupBound(i); } - if (theStopOnDivergent & myIsDivergent) + if (theStopOnDivergent && myIsDivergent) { return; } diff --git a/src/math/math_FunctionSetRoot.hxx b/src/math/math_FunctionSetRoot.hxx index 60995f12a5..9a66a7e044 100644 --- a/src/math/math_FunctionSetRoot.hxx +++ b/src/math/math_FunctionSetRoot.hxx @@ -17,18 +17,14 @@ #ifndef _math_FunctionSetRoot_HeaderFile #define _math_FunctionSetRoot_HeaderFile -#include -#include -#include - -#include -#include -#include -#include #include +#include +#include #include -class math_FunctionSetWithDerivatives; +#include +#include +class math_FunctionSetWithDerivatives; //! The math_FunctionSetRoot class calculates the root //! of a set of N functions of M variables (NM). Knowing @@ -43,7 +39,6 @@ public: DEFINE_STANDARD_ALLOC - //! is used in a sub-class to initialize correctly all the fields //! of this class. //! The range (1, F.NbVariables()) must be especially @@ -69,39 +64,58 @@ public: //! in a sub-class to implement a specific test to stop the iterations. //! In this case, the solution is found when: abs(Xi - Xi-1) <= Tolerance //! for all unknowns. - virtual Standard_Boolean IsSolutionReached (math_FunctionSetWithDerivatives& F); - + virtual Standard_Boolean IsSolutionReached (math_FunctionSetWithDerivatives& ) + { + for (Standard_Integer i = 1; i <= Sol.Length(); ++i) + { + if (Abs (Delta(i)) > Tol(i)) + { + return Standard_False; + } + } + return Standard_True; + } //! Improves the root of function from the initial guess point. //! The infinum and supremum may be given to constrain the solution. //! In this case, the solution is found when: abs(Xi - Xi-1)(j) <= Tolerance(j) //! for all unknowns. Standard_EXPORT void Perform (math_FunctionSetWithDerivatives& theFunction, const math_Vector& theStartingPoint, const Standard_Boolean theStopOnDivergent = Standard_False); - //! Improves the root of function from the initial guess point. //! The infinum and supremum may be given to constrain the solution. //! In this case, the solution is found when: abs(Xi - Xi-1) <= Tolerance //! for all unknowns. Standard_EXPORT void Perform (math_FunctionSetWithDerivatives& theFunction, const math_Vector& theStartingPoint, const math_Vector& theInfBound, const math_Vector& theSupBound, const Standard_Boolean theStopOnDivergent = Standard_False); - //! Returns true if the computations are successful, otherwise returns false. - Standard_Boolean IsDone() const; - + Standard_Boolean IsDone() const { return Done; } + //! Returns the number of iterations really done //! during the computation of the root. //! Exception NotDone is raised if the root was not found. - Standard_Integer NbIterations() const; + Standard_Integer NbIterations() const + { + StdFail_NotDone_Raise_if(!Done, " "); + return Kount; + } //! returns the stateNumber (as returned by //! F.GetStateNumber()) associated to the root found. - Standard_Integer StateNumber() const; + Standard_Integer StateNumber() const + { + StdFail_NotDone_Raise_if(!Done, " "); + return State; + } //! Returns the value of the root of function F. //! Exception NotDone is raised if the root was not found. - const math_Vector& Root() const; - + const math_Vector& Root() const + { + StdFail_NotDone_Raise_if(!Done, " "); + return Sol; + } + //! Outputs the root vector in Root. //! Exception NotDone is raised if the root was not found. //! Exception DimensionError is raised if the range of Root @@ -110,19 +124,32 @@ public: //! Returns the matrix value of the derivative at the root. //! Exception NotDone is raised if the root was not found. - const math_Matrix& Derivative() const; + const math_Matrix& Derivative() const + { + StdFail_NotDone_Raise_if(!Done, " "); + return DF; + } //! outputs the matrix value of the derivative //! at the root in Der. //! Exception NotDone is raised if the root was not found. //! Exception DimensionError is raised if the column range //! of is not equal to the range of the startingPoint. - void Derivative (math_Matrix& Der) const; - + void Derivative (math_Matrix& Der) const + { + StdFail_NotDone_Raise_if(!Done, " "); + Standard_DimensionError_Raise_if(Der.ColNumber() != Sol.Length(), " "); + Der = DF; + } + //! returns the vector value of the error done //! on the functions at the root. //! Exception NotDone is raised if the root was not found. - const math_Vector& FunctionSetErrors() const; + const math_Vector& FunctionSetErrors() const + { + StdFail_NotDone_Raise_if(!Done, " "); + return Delta; + } //! outputs the vector value of the error done //! on the functions at the root in Err. @@ -135,26 +162,18 @@ public: //! of the object. //! Is used to redefine the operator <<. Standard_EXPORT void Dump (Standard_OStream& o) const; - - Standard_Boolean IsDivergent() const; - - + Standard_Boolean IsDivergent() const { return myIsDivergent; } protected: - - math_Vector Delta; math_Vector Sol; math_Matrix DF; math_Vector Tol; - private: - - Standard_Boolean Done; Standard_Integer Kount; Standard_Integer State; @@ -175,14 +194,13 @@ private: math_Vector Temp4; Standard_Boolean myIsDivergent; - }; - -#include - - - - +inline Standard_OStream& operator<< (Standard_OStream& theStream, + const math_FunctionSetRoot& theF) +{ + theF.Dump (theStream); + return theStream; +} #endif // _math_FunctionSetRoot_HeaderFile diff --git a/src/math/math_FunctionSetRoot.lxx b/src/math/math_FunctionSetRoot.lxx deleted file mode 100644 index 24b1bad422..0000000000 --- a/src/math/math_FunctionSetRoot.lxx +++ /dev/null @@ -1,80 +0,0 @@ -// Copyright (c) 1997-1999 Matra Datavision -// Copyright (c) 1999-2014 OPEN CASCADE SAS -// -// This file is part of Open CASCADE Technology software library. -// -// This library is free software; you can redistribute it and/or modify it under -// the terms of the GNU Lesser General Public License version 2.1 as published -// by the Free Software Foundation, with special exception defined in the file -// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT -// distribution for complete text of the license and disclaimer of any warranty. -// -// Alternatively, this file may be used under the terms of Open CASCADE -// commercial license or contractual agreement. - -#include -#include - -inline Standard_Boolean math_FunctionSetRoot::IsSolutionReached(math_FunctionSetWithDerivatives&) -{ - for (Standard_Integer i = 1; i <= Sol.Length(); ++i) - if ( Abs(Delta(i)) > Tol(i) ) - return Standard_False; - - return Standard_True; -} - - -inline Standard_Boolean math_FunctionSetRoot::IsDone() const -{ - return Done; -} - - -inline Standard_OStream& operator<<(Standard_OStream& o, - const math_FunctionSetRoot& F) -{ - F.Dump(o); - return o; -} - - -inline const math_Vector& math_FunctionSetRoot::Root() const{ - StdFail_NotDone_Raise_if(!Done, " "); - return Sol; -} - - -inline const math_Vector& math_FunctionSetRoot::FunctionSetErrors() const{ - StdFail_NotDone_Raise_if(!Done, " "); - return Delta; -} - - -inline const math_Matrix& math_FunctionSetRoot::Derivative() const{ - StdFail_NotDone_Raise_if(!Done, " "); - return DF; -} - -inline void math_FunctionSetRoot::Derivative(math_Matrix& Der) const{ - StdFail_NotDone_Raise_if(!Done, " "); - Standard_DimensionError_Raise_if(Der.ColNumber() != Sol.Length(), " "); - Der = DF; -} - - -inline Standard_Integer math_FunctionSetRoot::StateNumber() const{ - StdFail_NotDone_Raise_if(!Done, " "); - return State; -} - - -inline Standard_Integer math_FunctionSetRoot::NbIterations() const{ - StdFail_NotDone_Raise_if(!Done, " "); - return Kount; -} - -inline Standard_Boolean math_FunctionSetRoot::IsDivergent() const -{ - return myIsDivergent; -} From 0101c6febef3d0e959aa5ff87bbbeb36d32a6871 Mon Sep 17 00:00:00 2001 From: emv Date: Tue, 11 Jan 2022 18:10:23 +0300 Subject: [PATCH 191/639] 0032333: Modeling Algorithms - Empty(wrong) result of offset operation in mode "Complete" join type "Intersection" Add more faces for intersection in rebuilding process basing on the connection of the splits of offset faces (special treatment for the artificially invalid faces). When rebuilding faces add vertices common for faces for trimming the new intersection edges. Adjust existing and create new test cases. --- src/BRepOffset/BRepOffset_MakeOffset_1.cxx | 438 +++++++++++++++++---- tests/offset/shape_type_i_c/K9 | 10 +- tests/offset/shape_type_i_c/P8 | 10 +- tests/offset/shape_type_i_c/Q9 | 2 +- tests/offset/shape_type_i_c/XB7 | 2 - tests/offset/shape_type_i_c/XB8 | 2 - tests/offset/shape_type_i_c/XB9 | 2 - tests/offset/shape_type_i_c/XD3 | 2 +- tests/offset/shape_type_i_c/XJ7 | 6 +- tests/offset/shape_type_i_c/XM1 | 4 +- tests/offset/shape_type_i_c/XU4 | 17 + tests/offset/shape_type_i_c/XU5 | 31 ++ tests/offset/shape_type_i_c/XY4 | 7 +- tests/offset/shape_type_i_c/XY5 | 4 - tests/offset/shape_type_i_c/XY9 | 29 ++ tests/offset/shape_type_i_c/XZ3 | 30 ++ tests/offset/shape_type_i_c/XZ4 | 30 ++ tests/offset/shape_type_i_c/XZ5 | 27 ++ tests/offset/shape_type_i_c/XZ6 | 21 + tests/offset/shape_type_i_c/XZ7 | 37 ++ tests/offset/shape_type_i_c/XZ8 | 29 ++ tests/offset/shape_type_i_c/XZ9 | 17 + tests/offset/shape_type_i_c/Z4 | 9 +- tests/offset/shape_type_i_c/ZB4 | 11 +- tests/offset/shape_type_i_c/ZC8 | 11 +- tests/offset/shape_type_i_c/ZD9 | 11 +- tests/offset/shape_type_i_c_multi/B7 | 2 +- 27 files changed, 673 insertions(+), 128 deletions(-) create mode 100644 tests/offset/shape_type_i_c/XU4 create mode 100644 tests/offset/shape_type_i_c/XU5 create mode 100644 tests/offset/shape_type_i_c/XY9 create mode 100644 tests/offset/shape_type_i_c/XZ3 create mode 100644 tests/offset/shape_type_i_c/XZ4 create mode 100644 tests/offset/shape_type_i_c/XZ5 create mode 100644 tests/offset/shape_type_i_c/XZ6 create mode 100644 tests/offset/shape_type_i_c/XZ7 create mode 100644 tests/offset/shape_type_i_c/XZ8 create mode 100644 tests/offset/shape_type_i_c/XZ9 diff --git a/src/BRepOffset/BRepOffset_MakeOffset_1.cxx b/src/BRepOffset/BRepOffset_MakeOffset_1.cxx index b4c9f12243..dab0aac318 100644 --- a/src/BRepOffset/BRepOffset_MakeOffset_1.cxx +++ b/src/BRepOffset/BRepOffset_MakeOffset_1.cxx @@ -52,6 +52,7 @@ #include #include #include +#include #include #include @@ -107,6 +108,19 @@ namespace { { BRep_Builder().Add (theSOut, theS); } + static void AddToContainer (const TopoDS_Shape& theKey, + const TopoDS_Shape& theValue, + TopTools_DataMapOfShapeListOfShape& theMap) + { + if (TopTools_ListOfShape* pList = theMap.ChangeSeek (theKey)) + { + pList->Append (theValue); + } + else + { + theMap.Bound (theKey, TopTools_ListOfShape())->Append (theValue); + } + } //======================================================================= //function : TakeModified @@ -617,7 +631,9 @@ class BRepOffset_BuildOffsetFaces //! Filtering the invalid edges according to currently invalid faces void FilterInvalidEdges (const BRepOffset_DataMapOfShapeIndexedMapOfShape& theDMFMIE, - const TopTools_IndexedMapOfShape& theMERemoved); + const TopTools_IndexedMapOfShape& theMERemoved, + const TopTools_IndexedMapOfShape& theMEInside, + TopTools_MapOfShape& theMEUseInRebuild); private: //! @name Checking faces @@ -766,6 +782,7 @@ class BRepOffset_BuildOffsetFaces const TopTools_MapOfShape& theVertsToAvoid, const TopTools_MapOfShape& theNewVertsToAvoid, const TopTools_MapOfShape& theMECheckExt, + const TopTools_DataMapOfShapeListOfShape* theSSInterfs, TopTools_MapOfShape& theMVBounds, TopTools_DataMapOfShapeListOfShape& theEImages); @@ -877,16 +894,18 @@ class BRepOffset_BuildOffsetFaces TopTools_IndexedMapOfShape myEdgesToAvoid; //!< Splits of edges to be avoided when building splits of faces TopTools_MapOfShape myLastInvEdges; //!< Edges marked invalid on the current step and to be avoided on the next step TopTools_MapOfShape myModifiedEdges; //!< Edges to be used for building splits + TopTools_IndexedMapOfShape myInsideEdges; //!< Edges located fully inside solids built from the splits of offset faces TopTools_IndexedDataMapOfShapeListOfShape myInvalidFaces; //!< Invalid faces - splits of offset faces consisting of invalid edges - TopTools_DataMapOfShapeShape myArtInvalidFaces; //!< Artificially invalid faces - valid faces intentionally marked invalid - //! to be rebuilt on the future steps in the situations when invalid edges - //! are present, but invalid faces not + BRepOffset_DataMapOfShapeIndexedMapOfShape myArtInvalidFaces; //!< Artificially invalid faces - valid faces intentionally marked invalid + //! to be rebuilt on the future steps in the situations when invalid edges + //! are present, but invalid faces not TopTools_DataMapOfShapeInteger myAlreadyInvFaces; //!< Count number of the same face being marked invalid to avoid infinite //! rebuilding of the same face TopTools_DataMapOfShapeListOfShape myFNewHoles; //!< Images of the hole faces of the original face TopTools_DataMapOfShapeListOfShape mySSInterfs; //!< Intersection information, used to collect intersection pairs during rebuild + TopTools_DataMapOfShapeListOfShape mySSInterfsArt; //!< Intersection information, used to collect intersection pairs during rebuild NCollection_DataMap myIntersectionPairs; //!< All possible intersection pairs, used to avoid some of the intersections @@ -1004,6 +1023,7 @@ void BRepOffset_BuildOffsetFaces::BuildSplitsOfExtendedFaces (const Message_Prog myInvalidEdges.Clear(); myInvertedEdges.Clear(); mySSInterfs.Clear(); + mySSInterfsArt.Clear(); myIntersectionPairs.Clear(); mySolids.Nullify(); myFacesToRebuild.Clear(); @@ -1299,9 +1319,8 @@ void BRepOffset_BuildOffsetFaces::BuildSplitsOfFaces (const Message_ProgressRang // if (bArtificialCase) { - TopTools_IndexedMapOfShape aMEInv; // make the face invalid - myArtInvalidFaces.Bind (aF, aCE); + TopTools_IndexedMapOfShape aMEInv; // *pLFIm = aLFImages; TopTools_ListIteratorOfListOfShape aItLFIm (aLFImages); @@ -1324,6 +1343,7 @@ void BRepOffset_BuildOffsetFaces::BuildSplitsOfFaces (const Message_ProgressRang } } // + myArtInvalidFaces.Bind (aF, aMEInv); aDMFMIE.Bind (aF, aMEInv); aLFDone.Append (aF); // @@ -1519,9 +1539,8 @@ void BRepOffset_BuildOffsetFaces::BuildSplitsOfFaces (const Message_ProgressRang RemoveInvalidSplitsFromValid (aDMFMVIE); // // remove inside faces - TopTools_IndexedMapOfShape aMEInside; RemoveInsideFaces (anInvertedFaces, aMFToCheckInt, aMFInvInHole, aFHoles, - aMERemoved, aMEInside, aPSOuter.Next (5.)); + aMERemoved, myInsideEdges, aPSOuter.Next (5.)); // // make compound of valid splits TopoDS_Compound aCFIm; @@ -1546,7 +1565,7 @@ void BRepOffset_BuildOffsetFaces::BuildSplitsOfFaces (const Message_ProgressRang FilterEdgesImages (aCFIm); // // filter invalid faces - FilterInvalidFaces (aDMEF, aMEInside); + FilterInvalidFaces (aDMEF, aMERemoved.Extent() ? myInsideEdges : aMERemoved); aNb = myInvalidFaces.Extent(); if (!aNb) { @@ -1572,7 +1591,10 @@ void BRepOffset_BuildOffsetFaces::BuildSplitsOfFaces (const Message_ProgressRang #endif // // filter invalid edges - FilterInvalidEdges (aDMFMIE, aMERemoved); + TopTools_MapOfShape aMEUseInRebuild; + FilterInvalidEdges (aDMFMIE, aMERemoved, + aMERemoved.Extent() ? myInsideEdges : aMERemoved, + aMEUseInRebuild); // // Check additionally validity of edges originated from vertices. CheckEdgesCreatedByVertex(); @@ -1594,8 +1616,11 @@ void BRepOffset_BuildOffsetFaces::BuildSplitsOfFaces (const Message_ProgressRang for (i = 1; i <= aNb; ++i) { const TopoDS_Shape& aE = myInvalidEdges (i); - myEdgesToAvoid.Add (aE); myLastInvEdges.Add (aE); + if (!aMEUseInRebuild.Contains(aE)) + { + myEdgesToAvoid.Add (aE); + } } // aNb = myInvalidFaces.Extent(); @@ -1793,11 +1818,10 @@ Standard_Boolean BRepOffset_BuildOffsetFaces::CheckIfArtificial (const TopoDS_Sh { const TopoDS_Edge& aE = TopoDS::Edge (aItLE.Value()); // - if (myOEImages.IsBound (aE)) + if (const TopTools_ListOfShape* pLEIm = myOEImages.Seek (aE)) { Standard_Boolean bChecked = Standard_False; - const TopTools_ListOfShape& aLEIm = myOEImages.Find (aE); - TopTools_ListIteratorOfListOfShape aItLEIm (aLEIm); + TopTools_ListIteratorOfListOfShape aItLEIm (*pLEIm); for (; aItLEIm.More(); aItLEIm.Next()) { const TopoDS_Edge& aEIm = TopoDS::Edge (aItLEIm.Value()); @@ -4165,6 +4189,7 @@ void BRepOffset_BuildOffsetFaces::RemoveInsideFaces (const TopTools_ListOfShape& RemoveInvalidSplits (aMFToRem, aMV, theMERemoved); // // Get inside faces from the removed ones comparing them with boundary edges + theMEInside.Clear(); aNb = theMERemoved.Extent(); for (i = 1; i <= aNb; ++i) { @@ -4189,6 +4214,28 @@ void BRepOffset_BuildOffsetFaces::RemoveInsideFaces (const TopTools_ListOfShape& void BRepOffset_BuildOffsetFaces::ShapesConnections (const TopTools_DataMapOfShapeShape& theDMFOr, BOPAlgo_Builder& theBuilder) { + // Make connexity blocks from invalid edges to use the whole block + // to which the edge is connected instead of the single edge. + TopoDS_Compound aCEInv; + BRep_Builder().MakeCompound(aCEInv); + for (Standard_Integer i = 1; i <= myInvalidEdges.Extent(); ++i) + { + AddToContainer (myInvalidEdges(i), aCEInv); + } + + TopTools_ListOfShape aLCB; + BOPTools_AlgoTools::MakeConnexityBlocks (aCEInv, TopAbs_VERTEX, TopAbs_EDGE, aLCB); + + // Binding from the edge to the block + TopTools_DataMapOfShapeShape aECBMap; + for (TopTools_ListOfShape::Iterator itCB(aLCB); itCB.More(); itCB.Next()) + { + for (TopoDS_Iterator itE(itCB.Value()); itE.More(); itE.Next()) + { + aECBMap.Bind(itE.Value(), itCB.Value()); + } + } + // update invalid edges with images and keep connection to original edge TopTools_DataMapOfShapeListOfShape aDMEOr; Standard_Integer aNb = myInvalidEdges.Extent(); @@ -4206,13 +4253,7 @@ void BRepOffset_BuildOffsetFaces::ShapesConnections (const TopTools_DataMapOfSha for (; aItLEIm.More(); aItLEIm.Next()) { const TopoDS_Shape& aEIm = aItLEIm.Value(); - // - TopTools_ListOfShape* pLEOr = aDMEOr.ChangeSeek (aEIm); - if (!pLEOr) - { - pLEOr = aDMEOr.Bound (aEIm, TopTools_ListOfShape()); - } - AppendToList (*pLEOr, aEInv); + AddToContainer (aEIm, aEInv, aDMEOr); } } // @@ -4365,6 +4406,121 @@ void BRepOffset_BuildOffsetFaces::ShapesConnections (const TopTools_DataMapOfSha AppendToList (*pLF, aFOp); } } + + // Treatment for the artificial case - check if one of the faces is artificially invalid + for (Standard_Integer iF = 0; iF < 2; ++iF) + { + const TopoDS_Shape& aFArt = !iF ? *pF1 : *pF2; + const TopoDS_Shape& aFOpposite = !iF ? *pF2 : *pF1; + + if (!myArtInvalidFaces.IsBound (aFArt)) + continue; + + if (myInvalidFaces.Contains (aFOpposite) && !myArtInvalidFaces.IsBound (aFOpposite)) + continue; + + // Collect own invalid edges of the face and the invalid edges connected to those + // own invalid edges to be avoided in the check for intersection. + TopTools_IndexedMapOfShape aMEAvoid; + if (const TopTools_IndexedMapOfShape* pFEInv = myArtInvalidFaces.Seek (aFOpposite)) + { + for (Standard_Integer iE = 1; iE <= pFEInv->Extent(); ++iE) + { + if (const TopoDS_Shape* pCB = aECBMap.Seek (pFEInv->FindKey(iE))) + { + TopExp::MapShapes (*pCB, TopAbs_EDGE, aMEAvoid); + } + } + } + else if (const TopTools_ListOfShape* pLFIm = myOFImages.Seek (aFOpposite)) + { + for (TopTools_ListOfShape::Iterator itLFIm (*pLFIm); itLFIm.More(); itLFIm.Next()) + { + for (TopExp_Explorer expE (itLFIm.Value(), TopAbs_EDGE); expE.More(); expE.Next()) + { + if (const TopoDS_Shape* pCB = aECBMap.Seek (expE.Current())) + { + TopExp::MapShapes (*pCB, TopAbs_EDGE, aMEAvoid); + } + } + } + } + + const TopoDS_Shape& aFArtIm = !iF ? aFIm1 : aFIm2; + const TopoDS_Shape& aFOppositeIm = !iF ? aFIm2 : aFIm1; + + // Check if there are any intersections between edges of artificially + // invalid face and opposite face + const Standard_Integer nFOp = pDS->Index (aFOppositeIm); + + for (TopExp_Explorer expE (aFArtIm, TopAbs_EDGE); expE.More(); expE.Next()) + { + const TopoDS_Shape& aE = expE.Current(); + if (!myInvalidEdges.Contains (aE) || myInvertedEdges.Contains (aE) || aMEAvoid.Contains (aE)) + { + continue; + } + const Standard_Integer nE = pDS->Index (aE); + if (nE < 0) + { + continue; + } + + if (!pDS->HasInterf(nE, nFOp)) + { + continue; + } + + TopTools_ListOfShape aLV; + const BOPDS_VectorOfInterfEF& aEFs = pDS->InterfEF(); + for (Standard_Integer iEF = 0; iEF < aEFs.Size(); ++iEF) + { + const BOPDS_InterfEF& aEF = aEFs (iEF); + if (aEF.Contains (nE) && aEF.Contains(nFOp)) + { + if (aEF.CommonPart().Type() == TopAbs_VERTEX) + aLV.Append (pDS->Shape (aEF.IndexNew())); + } + } + + if (aLV.IsEmpty()) + { + continue; + } + + // Make sure that there is an opposite intersection exists, i.e. some of the edges + // of the opposite face intersect the artificially invalid face. + const Standard_Integer nFArt = pDS->Index (aFArtIm); + TopExp_Explorer expEOp (aFOppositeIm, TopAbs_EDGE); + for (; expEOp.More(); expEOp.Next()) + { + const TopoDS_Shape& aEOp = expEOp.Current(); + const Standard_Integer nEOp = pDS->Index (aEOp); + if (pDS->HasInterf(nEOp, nFArt)) + { + break; + } + } + if (!expEOp.More()) + { + continue; + } + + // Intersection is present - add connection between offset faces. + AddToContainer (aFArt, aFOpposite, mySSInterfsArt); + + // Add connection between edge and opposite face + AddToContainer (aE, aFOpposite, mySSInterfsArt); + + // Along with the opposite face, save the intersection vertices to + // be used for trimming the intersection edge in the rebuilding process + for (TopTools_ListOfShape::Iterator itLV (aLV); itLV.More(); itLV.Next()) + { + // Add connection to intersection vertex + AddToContainer (aE, itLV.Value(), mySSInterfsArt); + } + } + } } } @@ -4960,7 +5116,9 @@ void BRepOffset_BuildOffsetFaces::CheckEdgesCreatedByVertex() //purpose : Filtering the invalid edges according to currently invalid faces //======================================================================= void BRepOffset_BuildOffsetFaces::FilterInvalidEdges (const BRepOffset_DataMapOfShapeIndexedMapOfShape& theDMFMIE, - const TopTools_IndexedMapOfShape& theMERemoved) + const TopTools_IndexedMapOfShape& theMERemoved, + const TopTools_IndexedMapOfShape& theMEInside, + TopTools_MapOfShape& theMEUseInRebuild) { TopoDS_Compound aCEInv; TopTools_IndexedMapOfShape aMEInv; @@ -5023,14 +5181,16 @@ void BRepOffset_BuildOffsetFaces::FilterInvalidEdges (const BRepOffset_DataMapOf const TopoDS_Shape& aF = myInvalidFaces.FindKey (i); if (myArtInvalidFaces.IsBound (aF)) { - const TopTools_IndexedMapOfShape& aMIE = theDMFMIE.Find (aF); - const Standard_Integer aNbIE = aMIE.Extent(); - for (Standard_Integer iE = 1; iE <= aNbIE; ++iE) + if (const TopTools_IndexedMapOfShape* aMIE = theDMFMIE.Seek (aF)) { - const TopoDS_Shape& aE = aMIE (iE); - if (aMEInv.Contains (aE) && !aMEInvToAvoid.Contains (aE)) + const Standard_Integer aNbIE = aMIE->Extent(); + for (Standard_Integer iE = 1; iE <= aNbIE; ++iE) { - aReallyInvEdges.Add (aE); + const TopoDS_Shape& aE = aMIE->FindKey (iE); + if (aMEInv.Contains (aE) && !aMEInvToAvoid.Contains (aE)) + { + aReallyInvEdges.Add (aE); + } } } } @@ -5053,8 +5213,46 @@ void BRepOffset_BuildOffsetFaces::FilterInvalidEdges (const BRepOffset_DataMapOf } } } - // + myInvalidEdges = aReallyInvEdges; + + // Check if any of the currently invalid edges may be used for + // rebuilding splits of invalid faces. + // For that the edge should be inside and not connected to invalid + // boundary edges of the same origin. + + aNb = myInvalidEdges.Extent(); + for (i = 1; i <= aNb; ++i) + { + const TopoDS_Shape& aE = myInvalidEdges (i); + if (!theMEInside.Contains (aE) || !myValidEdges.Contains (aE)) + { + continue; + } + + const TopTools_ListOfShape* pEOrigins = myOEOrigins.Seek (aE); + if (!pEOrigins) + { + theMEUseInRebuild.Add (aE); + continue; + } + + Standard_Boolean bHasInvOutside = Standard_False; + for (TopTools_ListOfShape::Iterator itEOr (*pEOrigins); !bHasInvOutside && itEOr.More(); itEOr.Next()) + { + if (const TopTools_ListOfShape* pEIms = myOEImages.Seek (itEOr.Value())) + { + for (TopTools_ListOfShape::Iterator itEIms (*pEIms); !bHasInvOutside && itEIms.More(); itEIms.Next()) + { + bHasInvOutside = myInvalidEdges.Contains (itEIms.Value()) && !theMEInside.Contains (itEIms.Value()); + } + } + } + if (!bHasInvOutside) + { + theMEUseInRebuild.Add (aE); + } + } } //======================================================================= @@ -5116,7 +5314,7 @@ void BRepOffset_BuildOffsetFaces::FindFacesToRebuild() aDMFLV.Bind (aF, aLVAvoid); } // - const TopTools_ListOfShape* pLF = mySSInterfs.Seek (aF); + const TopTools_ListOfShape* pLF = !myArtInvalidFaces.IsBound(aF) ? mySSInterfs.Seek (aF) : mySSInterfsArt.Seek(aF); if (pLF) { TopTools_ListIteratorOfListOfShape aItLFE (*pLF); @@ -5275,7 +5473,7 @@ void BRepOffset_BuildOffsetFaces::IntersectFaces (TopTools_MapOfShape& theVertsT TopTools_DataMapOfShapeShape aDMFImF; TopoDS_Compound aCFArt; BRep_Builder().MakeCompound (aCFArt); - TopTools_DataMapIteratorOfDataMapOfShapeShape aItM (myArtInvalidFaces); + BRepOffset_DataMapOfShapeIndexedMapOfShape::Iterator aItM (myArtInvalidFaces); for (; aItM.More(); aItM.Next()) { const TopoDS_Shape& aF = aItM.Key(); @@ -5597,9 +5795,13 @@ void BRepOffset_BuildOffsetFaces::IntersectFaces (TopTools_MapOfShape& theVertsT continue; } // - const TopTools_ListOfShape& aLFImi = myOFImages.FindFromKey (aFi); + const TopTools_ListOfShape* aLFImi = myOFImages.Seek (aFi); + if (!aLFImi) + continue; // - TopTools_ListOfShape& aLFEi = aFLE.ChangeFromKey (aFi); + TopTools_ListOfShape* aLFEi = aFLE.ChangeSeek (aFi); + if (!aLFEi) + continue; // TopTools_ListOfShape& aLFDone = aMDone.ChangeFind (aFi); // @@ -5618,20 +5820,42 @@ void BRepOffset_BuildOffsetFaces::IntersectFaces (TopTools_MapOfShape& theVertsT if (pInterFi && !pInterFi->Contains (aFj)) continue; - const TopTools_ListOfShape& aLFImj = myOFImages.FindFromKey (aFj); + const TopTools_ListOfShape* aLFImj = myOFImages.Seek(aFj); + if (!aLFImj) + continue; // - TopTools_ListOfShape& aLFEj = aFLE.ChangeFromKey (aFj); + TopTools_ListOfShape* aLFEj = aFLE.ChangeSeek (aFj); + if (!aLFEj) + continue; + // // if there are some common edges between faces // we should use these edges and do not intersect again. TopTools_ListOfShape aLEC; - FindCommonParts (aLFImi, aLFImj, aLEC); + FindCommonParts (*aLFImi, *aLFImj, aLEC); // if (aLEC.Extent()) { // no need to intersect if we have common edges between faces Standard_Boolean bForceUse = aMFIntExt.Contains (aFi) || aMFIntExt.Contains (aFj); - ProcessCommonEdges (aLEC, aME, aMEInfETrim, aMAllInvs, bForceUse, aMECV, aMECheckExt, aDMEETrim, aLFEi, aLFEj, aMEToInt); + ProcessCommonEdges (aLEC, aME, aMEInfETrim, aMAllInvs, bForceUse, aMECV, aMECheckExt, aDMEETrim, *aLFEi, *aLFEj, aMEToInt); + + // Add common vertices not belonging to the common edges for trimming the intersection edges + TopTools_IndexedMapOfShape aMVOnCE; + for (TopTools_ListOfShape::Iterator itE (aLEC); itE.More(); itE.Next()) + { + TopExp::MapShapes (itE.Value(), TopAbs_VERTEX, aMVOnCE); + } + + TopTools_ListOfShape aLEV; + FindCommonParts (*aLFImi, *aLFImj, aLEV, TopAbs_VERTEX); + for (TopTools_ListOfShape::Iterator itV (aLEV); itV.More(); itV.Next()) + { + if (!aMVOnCE.Contains (itV.Value())) + { + aMECV.Add (itV.Value()); + } + } continue; } // @@ -5657,7 +5881,7 @@ void BRepOffset_BuildOffsetFaces::IntersectFaces (TopTools_MapOfShape& theVertsT { // use intersection line obtained on the previous steps // plus, find new origins for these lines - UpdateIntersectedFaces (aFInv, aFi, aFj, aLFInv, aLFImi, aLFImj, aLFEi, aLFEj, aMEToInt); + UpdateIntersectedFaces (aFInv, aFi, aFj, aLFInv, *aLFImi, *aLFImj, *aLFEi, *aLFEj, aMEToInt); continue; } // @@ -5669,13 +5893,14 @@ void BRepOffset_BuildOffsetFaces::IntersectFaces (TopTools_MapOfShape& theVertsT aLFDone.Append (aFj); aMDone.ChangeFind (aFj).Append (aFi); // - IntersectFaces (aFInv, aFi, aFj, aLFInv, aLFImi, aLFImj, aLFEi, aLFEj, aMECV, aMEToInt); + IntersectFaces (aFInv, aFi, aFj, aLFInv, *aLFImi, *aLFImj, *aLFEi, *aLFEj, aMECV, aMEToInt); } } // // intersect and trim edges for this chain IntersectAndTrimEdges (aMFInt, aMEToInt, aDMEETrim, aME, aMECV, - aMVInv, aMVRInv, aMECheckExt, aMVBounds, aEImages); + aMVInv, aMVRInv, aMECheckExt, bArtificial ? &mySSInterfsArt : 0, + aMVBounds, aEImages); // Standard_Integer iE, aNbEToInt = aMEToInt.Extent(); for (iE = 1; iE <= aNbEToInt; ++iE) @@ -5956,12 +6181,8 @@ void BRepOffset_BuildOffsetFaces::FindFacesForIntersection (const TopoDS_Shape& } } // - if (theArtCase) - { - return; - } - // - const TopTools_ListOfShape* pLFInv = mySSInterfs.Seek (theFInv); + const TopTools_DataMapOfShapeListOfShape& aSSInterfsMap = theArtCase ? mySSInterfsArt : mySSInterfs; + const TopTools_ListOfShape* pLFInv = aSSInterfsMap.Seek (theFInv); if (!pLFInv) { return; @@ -5985,7 +6206,7 @@ void BRepOffset_BuildOffsetFaces::FindFacesForIntersection (const TopoDS_Shape& for (i = 1; i <= aNbE; ++i) { const TopoDS_Shape& aS = theME (i); - const TopTools_ListOfShape* pLF = mySSInterfs.Seek (aS); + const TopTools_ListOfShape* pLF = aSSInterfsMap.Seek (aS); if (!pLF) { continue; @@ -6002,30 +6223,33 @@ void BRepOffset_BuildOffsetFaces::FindFacesForIntersection (const TopoDS_Shape& // // check if the face has some connection to already added for intersection faces const TopTools_ListOfShape& aLFIm = myOFImages.FindFromKey (aF); - TopTools_ListIteratorOfListOfShape aItLFIm (aLFIm); - for (; aItLFIm.More(); aItLFIm.Next()) + if (!theArtCase) { - const TopoDS_Shape& aFIm = aItLFIm.Value(); - TopExp_Explorer aExp (aFIm, TopAbs_EDGE); - for (; aExp.More(); aExp.Next()) + TopTools_ListIteratorOfListOfShape aItLFIm (aLFIm); + for (; aItLFIm.More(); aItLFIm.Next()) { - if (aMShapes.Contains (aExp.Current())) + const TopoDS_Shape& aFIm = aItLFIm.Value(); + TopExp_Explorer aExp (aFIm, TopAbs_EDGE); + for (; aExp.More(); aExp.Next()) + { + if (aMShapes.Contains (aExp.Current())) + { + break; + } + } + if (aExp.More()) { break; } } - if (aExp.More()) + if (!aItLFIm.More()) { - break; + continue; } } - if (!aItLFIm.More()) - { - continue; - } // aMFToAdd.Add (aF); - aItLFIm.Initialize (aLFIm); + TopTools_ListIteratorOfListOfShape aItLFIm (aLFIm); for (; aItLFIm.More(); aItLFIm.Next()) { const TopoDS_Shape& aFIm = aItLFIm.Value(); @@ -6423,6 +6647,7 @@ void BRepOffset_BuildOffsetFaces::IntersectAndTrimEdges (const TopTools_IndexedM const TopTools_MapOfShape& theVertsToAvoid, const TopTools_MapOfShape& theNewVertsToAvoid, const TopTools_MapOfShape& theMECheckExt, + const TopTools_DataMapOfShapeListOfShape* theSSInterfs, TopTools_MapOfShape& theMVBounds, TopTools_DataMapOfShapeListOfShape& theEImages) { @@ -6468,30 +6693,39 @@ void BRepOffset_BuildOffsetFaces::IntersectAndTrimEdges (const TopTools_IndexedM aNb = theMSInv.Extent(); for (i = 1; i <= aNb; ++i) { - const TopoDS_Shape& aV = theMSInv (i); - if (aV.ShapeType() != TopAbs_VERTEX) + const TopoDS_Shape& aS = theMSInv(i); + // edge case + if (theSSInterfs) { - continue; - } - // - TopTools_ListOfShape* pLVE = aDMVE.ChangeSeek (aV); - if (!pLVE) - { - continue; + if (const TopTools_ListOfShape* pLV = theSSInterfs->Seek (aS)) + { + // Add vertices from intersection info to trim section edges of artificial faces + for (TopTools_ListOfShape::Iterator itLV (*pLV); itLV.More(); itLV.Next()) + { + if (itLV.Value().ShapeType() == TopAbs_VERTEX) + { + aLArgs.Append (itLV.Value()); + } + } + } } - // - aIt.Initialize (*pLVE); - for (; aIt.More(); aIt.Next()) + + // vertex case + if (const TopTools_ListOfShape* pLVE = aDMVE.ChangeSeek(aS)) { - const TopoDS_Shape& aE = aIt.Value(); - // - aExp.Init (aE, TopAbs_VERTEX); - for (; aExp.More(); aExp.Next()) + aIt.Initialize(*pLVE); + for (; aIt.More(); aIt.Next()) { - const TopoDS_Shape& aV1 = aExp.Current(); - if (!theVertsToAvoid.Contains (aV1) && aMFence.Add (aV1)) + const TopoDS_Shape& aE = aIt.Value(); + // + aExp.Init(aE, TopAbs_VERTEX); + for (; aExp.More(); aExp.Next()) { - aLArgs.Append (aV1); + const TopoDS_Shape& aV1 = aExp.Current(); + if (!theVertsToAvoid.Contains(aV1) && aMFence.Add(aV1)) + { + aLArgs.Append(aV1); + } } } } @@ -7137,9 +7371,19 @@ void BRepOffset_BuildOffsetFaces::UpdateValidEdges (const TopTools_IndexedDataMa TopExp::MapShapes (aItSpIm.Value(), TopAbs_EDGE, aNewEdges); } } + + TopoDS_Compound anInsideEdges; + BRep_Builder().MakeCompound (anInsideEdges); + for (Standard_Integer iE = 1; iE <= myInsideEdges.Extent(); ++iE) + { + BRep_Builder().Add (anInsideEdges, myInsideEdges (iE)); + } + // // Rebuild the map of edges to avoid, using the intersection results TopTools_IndexedMapOfShape aMEAvoid; + TopoDS_Compound aCEAvoid; + BRep_Builder().MakeCompound (aCEAvoid); // GF's data structure const BOPDS_PDS& pDS = aGF.PDS(); @@ -7175,7 +7419,7 @@ void BRepOffset_BuildOffsetFaces::UpdateValidEdges (const TopTools_IndexedDataMa if (bKeep) { // keep the original edge - aMEAvoid.Add (aE); + AddToContainer (aE, aMEAvoid); continue; } @@ -7184,9 +7428,41 @@ void BRepOffset_BuildOffsetFaces::UpdateValidEdges (const TopTools_IndexedDataMa { const TopoDS_Shape& aEIm = aItLEIm.Value(); if (!aNewEdges.Contains (aEIm)) - aMEAvoid.Add (aEIm); + { + AddToContainer(aEIm, aCEAvoid); + } } } + + Standard_Boolean isCut = Standard_False; + if (aCEAvoid.NbChildren() > 0) + { + // Perform intersection with the small subset of the edges to make + // it possible to use the inside edges for building new splits. + BOPAlgo_BOP aBOP; + aBOP.AddArgument (aCEAvoid); + aBOP.AddTool (anInsideEdges); + aBOP.SetOperation (BOPAlgo_CUT); + aBOP.Perform(); + isCut = !aBOP.HasErrors(); + + if (isCut) + { + for (TopoDS_Iterator itCE (aCEAvoid); itCE.More(); itCE.Next()) + { + if (!aBOP.IsDeleted (itCE.Value())) + { + aMEAvoid.Add (itCE.Value()); + } + } + } + } + + if (!isCut) + { + TopExp::MapShapes (aCEAvoid, TopAbs_EDGE, aMEAvoid); + } + myEdgesToAvoid = aMEAvoid; } diff --git a/tests/offset/shape_type_i_c/K9 b/tests/offset/shape_type_i_c/K9 index d12e87d13b..a809443e79 100644 --- a/tests/offset/shape_type_i_c/K9 +++ b/tests/offset/shape_type_i_c/K9 @@ -1,7 +1,11 @@ restore [locate_data_file bug25926_before_offset.brep] s -OFFSETSHAPE 50 {} $calcul $type +explode s so +offsetparameter 1e-7 c i r +offsetload s_1 50 +offsetperform result -checkprops result -v 3.68672e+008 +checkprops result -s 4.96128e+06 -v 3.68655e+08 -checknbshapes result -shell 1 +unifysamedom result_unif result +checknbshapes result_unif -wire 12 -face 12 -shell 1 -solid 1 diff --git a/tests/offset/shape_type_i_c/P8 b/tests/offset/shape_type_i_c/P8 index 278e3aa7d1..888cc53164 100644 --- a/tests/offset/shape_type_i_c/P8 +++ b/tests/offset/shape_type_i_c/P8 @@ -1,8 +1,10 @@ restore [locate_data_file bug25926_before_offset_trim1.brep] s -OFFSETSHAPE 50 {} $calcul $type +offsetparameter 1e-7 c i r +offsetload s 50 +offsetperform result -checkprops result -v 3.61993e+007 -checkprops result -s 696458 +checkprops result -s 694900 -v 3.6175e+07 -checknbshapes result -shell 1 +unifysamedom result_unif result +checknbshapes result_unif -wire 9 -face 9 -shell 1 -solid 1 diff --git a/tests/offset/shape_type_i_c/Q9 b/tests/offset/shape_type_i_c/Q9 index fef564f485..a2a2378f4f 100755 --- a/tests/offset/shape_type_i_c/Q9 +++ b/tests/offset/shape_type_i_c/Q9 @@ -7,7 +7,7 @@ restore [locate_data_file bug25926_offset_shape_trim3.brep] s OFFSETSHAPE 12 {} $calcul $type -checkprops result -v 948181 -s 66208.6 +checkprops result -v 948181 -s 66208.6 -deps 1.e-3 unifysamedom result_unif result checknbshapes result_unif -shell 1 -face 14 diff --git a/tests/offset/shape_type_i_c/XB7 b/tests/offset/shape_type_i_c/XB7 index d00ec1d446..25ae9e9d55 100644 --- a/tests/offset/shape_type_i_c/XB7 +++ b/tests/offset/shape_type_i_c/XB7 @@ -1,5 +1,3 @@ -puts "TODO CR27414 ALL: Error : is WRONG because number of FACE entities in shape" - restore [locate_data_file bug26917_dom-8092_trim3.brep] s offsetparameter 1e-7 $calcul $type diff --git a/tests/offset/shape_type_i_c/XB8 b/tests/offset/shape_type_i_c/XB8 index 1fa5bdadbf..8b3a0e5e32 100644 --- a/tests/offset/shape_type_i_c/XB8 +++ b/tests/offset/shape_type_i_c/XB8 @@ -1,5 +1,3 @@ -puts "TODO CR27414 ALL: Error : is WRONG because number of FACE entities in shape" - restore [locate_data_file bug26917_dom-8092_trim4.brep] s offsetparameter 1e-7 $calcul $type diff --git a/tests/offset/shape_type_i_c/XB9 b/tests/offset/shape_type_i_c/XB9 index 0b53c2669c..9474d4ff32 100644 --- a/tests/offset/shape_type_i_c/XB9 +++ b/tests/offset/shape_type_i_c/XB9 @@ -1,5 +1,3 @@ -puts "TODO CR27414 ALL: Error : is WRONG because number of FACE entities in shape" - restore [locate_data_file bug26917_dom-8092_simple.brep] s offsetparameter 1e-7 $calcul $type diff --git a/tests/offset/shape_type_i_c/XD3 b/tests/offset/shape_type_i_c/XD3 index 910ba6654c..7ee106c546 100755 --- a/tests/offset/shape_type_i_c/XD3 +++ b/tests/offset/shape_type_i_c/XD3 @@ -7,7 +7,7 @@ restore [locate_data_file bug26917_25926_offset_shape_trim4.brep] s OFFSETSHAPE 12 {} $calcul $type -checkprops result -v 643336 -s 45602.9 +checkprops result -v 643336 -s 45602.9 -deps 1.e-3 unifysamedom result_unif result checknbshapes result_unif -shell 1 -face 8 diff --git a/tests/offset/shape_type_i_c/XJ7 b/tests/offset/shape_type_i_c/XJ7 index 3d8ab32dce..71a3fdfa43 100644 --- a/tests/offset/shape_type_i_c/XJ7 +++ b/tests/offset/shape_type_i_c/XJ7 @@ -1,6 +1,6 @@ -puts "TODO OCC27414 ALL: Error: The command cannot be built" -puts "TODO OCC27414 ALL: Tcl Exception" -puts "TODO OCC27414 ALL: TEST INCOMPLETE" +puts "TODO OCC27414 ALL: Error : is WRONG because number of" +puts "TODO OCC27414 ALL: Error : The area of result shape is" +puts "TODO OCC27414 ALL: Error : The volume of result shape is" restore [locate_data_file bug26917_dom-8092.t6c1_trim5_with_faces.brep] c diff --git a/tests/offset/shape_type_i_c/XM1 b/tests/offset/shape_type_i_c/XM1 index f84299b516..e1677e64d6 100644 --- a/tests/offset/shape_type_i_c/XM1 +++ b/tests/offset/shape_type_i_c/XM1 @@ -4,9 +4,9 @@ offsetparameter 1e-7 c i r offsetload s 8 offsetperform result -checkprops result -v 4.40128e+007 -s 1.81672e+006 +checkprops result -s 1.81645e+06 -v 4.40127e+07 unifysamedom result_unif result -checknbshapes result_unif -edge 186 -face 64 -shell 1 +checknbshapes result_unif -wire 62 -face 62 -shell 1 checkview -display result_unif -2d -path ${imagedir}/${test_image}.png diff --git a/tests/offset/shape_type_i_c/XU4 b/tests/offset/shape_type_i_c/XU4 new file mode 100644 index 0000000000..609293ae53 --- /dev/null +++ b/tests/offset/shape_type_i_c/XU4 @@ -0,0 +1,17 @@ +puts "=============================================================================================" +puts "0032333: Modeling Algorithms - Empty(wrong) result of offset operation in mode \"Complete\" join type \"Intersection\"" +puts "=============================================================================================" +puts "" + +restore [locate_data_file bug32333_Z4_trim.brep] s + +offsetparameter 1e-7 c i r +offsetload s 9.5 +offsetperform result + +checkprops result -s 88948.9 -v 1.11587e+06 + +unifysamedom result_unif result +checknbshapes result_unif -wire 15 -face 15 -shell 1 -solid 1 + +checkview -display result_unif -2d -path ${imagedir}/${test_image}.png diff --git a/tests/offset/shape_type_i_c/XU5 b/tests/offset/shape_type_i_c/XU5 new file mode 100644 index 0000000000..e46970e04d --- /dev/null +++ b/tests/offset/shape_type_i_c/XU5 @@ -0,0 +1,31 @@ +puts "TODO CR27414 ALL: Error: operation with offset value 7 has failed" +puts "TODO CR27414 ALL: Error: operation with offset value 8 has failed" +puts "TODO CR27414 ALL: Error: operation with offset value 9 has failed" +puts "TODO CR27414 ALL: Error: operation with offset value 10 has failed" +puts "TODO CR27414 ALL: Error: operation with offset value 11 has failed" +puts "TODO CR27414 ALL: Error: operation with offset value 12 has failed" +puts "TODO CR27414 ALL: Operations with following offset values have failed: 7 8 9 10 11 12" +puts "TODO CR27414 ALL: Error : The offset cannot be built" + +puts "=============================================================================================" +puts "0032333: Modeling Algorithms - Empty(wrong) result of offset operation in mode \"Complete\" join type \"Intersection\"" +puts "=============================================================================================" +puts "" + +# This is a simplified version of XZ7 case + +restore [locate_data_file bug32333_178_trim4.brep] s + +set ref_values { { 94323.2 1.42329e+06 14 14 } \ + { 98288.3 1.51959e+06 14 14 } \ + { 102311 1.61989e+06 14 14 } \ + { 106392 1.72423e+06 14 14 } \ + { 110531 1.83269e+06 14 14 } \ + { 114728 1.94532e+06 14 14 } } + +perform_offset_increasing s 7 12 1 $ref_values + +#copy r10 result +#copy r10_unif result_unif + +#checkview -display result_unif -2d -path ${imagedir}/${test_image}.png diff --git a/tests/offset/shape_type_i_c/XY4 b/tests/offset/shape_type_i_c/XY4 index d78a593eb0..32a76b7194 100644 --- a/tests/offset/shape_type_i_c/XY4 +++ b/tests/offset/shape_type_i_c/XY4 @@ -1,7 +1,4 @@ -puts "TODO CR32333 ALL: Error : The area of result shape is" -puts "TODO CR32333 ALL: Error : The command is not valid." -puts "TODO CR32333 ALL: Error : The volume of result shape is" -puts "TODO CR32333 ALL: Error : is WRONG because number of" +puts "TODO CR27414 ALL: Error : is WRONG because number of" puts "=============================================================================================" puts "0032088: Modeling Algorithms - Empty result of offset operation in mode \"Complete\" join type \"Intersection\"" @@ -17,6 +14,6 @@ offsetperform result checkprops result -s 3.1312e+06 -v 5.77267e+07 unifysamedom result_unif result -checknbshapes result_unif -wire 492 -face 492 -shell 1 -solid 1 +checknbshapes result_unif -wire 491 -face 492 -shell 1 -solid 1 checkview -display result_unif -2d -path ${imagedir}/${test_image}.png diff --git a/tests/offset/shape_type_i_c/XY5 b/tests/offset/shape_type_i_c/XY5 index 51160a7074..be307a8570 100644 --- a/tests/offset/shape_type_i_c/XY5 +++ b/tests/offset/shape_type_i_c/XY5 @@ -1,7 +1,3 @@ -puts "TODO OCC32333 ALL: Error: The command cannot be built" -puts "TODO OCC32333 ALL: gives an empty result" -puts "TODO OCC32333 ALL: TEST INCOMPLETE" - puts "=============================================================================================" puts "0032088: Modeling Algorithms - Empty result of offset operation in mode \"Complete\" join type \"Intersection\"" puts "=============================================================================================" diff --git a/tests/offset/shape_type_i_c/XY9 b/tests/offset/shape_type_i_c/XY9 new file mode 100644 index 0000000000..7c06e967d6 --- /dev/null +++ b/tests/offset/shape_type_i_c/XY9 @@ -0,0 +1,29 @@ +puts "=============================================================================================" +puts "0032333: Modeling Algorithms - Empty(wrong) result of offset operation in mode \"Complete\" join type \"Intersection\"" +puts "=============================================================================================" +puts "" + +restore [locate_data_file bug32333_ZU6_trim.brep] s + +set ref_values { { 154279 1.16809e+06 31 31 } \ + { 159804 1.32512e+06 31 31 } \ + { 165387 1.48771e+06 31 31 } \ + { 171028 1.65592e+06 31 31 } \ + { 148419 1.82979e+06 29 29 } \ + { 132204 1.98042e+06 17 17 } \ + { 136267 2.11465e+06 17 17 } \ + { 125291 2.25298e+06 13 13 } \ + { 129494 2.38037e+06 13 13 } \ + { 133767 2.51199e+06 13 13 } \ + { 138109 2.64793e+06 13 13 } \ + { 142522 2.78824e+06 13 13 } \ + { 147004 2.93299e+06 13 13 } \ + { 151557 3.08227e+06 13 13 } \ + { 156179 3.23613e+06 13 13 } } + +perform_offset_increasing s 1 15 1 $ref_values + +copy r10 result +copy r10_unif result_unif + +checkview -display result_unif -2d -path ${imagedir}/${test_image}.png diff --git a/tests/offset/shape_type_i_c/XZ3 b/tests/offset/shape_type_i_c/XZ3 new file mode 100644 index 0000000000..263dde8f44 --- /dev/null +++ b/tests/offset/shape_type_i_c/XZ3 @@ -0,0 +1,30 @@ +puts "TODO CR27414 ALL: Error: number of wire entities in the result" +puts "TODO CR27414 ALL: Error: number of face entities in the result" +puts "TODO CR27414 ALL: Error: operation with offset value 9 has failed" +puts "TODO CR27414 ALL: Error: operation with offset value 10 has failed" +puts "TODO CR27414 ALL: Operations with following offset values have failed: 9 10" + +puts "=============================================================================================" +puts "0032333: Modeling Algorithms - Empty(wrong) result of offset operation in mode \"Complete\" join type \"Intersection\"" +puts "=============================================================================================" +puts "" + +restore [locate_data_file bug32333_172.brep] s + +set ref_values { { 2.68545e+06 6.72361e+07 386 386 } \ + { 2.69691e+06 6.99355e+07 330 330 } \ + { 2.73363e+06 7.26508e+07 330 330 } \ + { 2.74228e+06 7.54028e+07 166 166 } \ + { 2.78873e+06 7.81683e+07 166 166 } \ + { 2.82923e+06 8.09803e+07 106 106 } \ + { 2.88058e+06 8.38352e+07 106 106 } \ + { 2.93204e+06 8.67414e+07 106 106 } \ + { 2.65427e+06 8.95363e+07 6 6 } \ + { 2.69318e+06 9.22106e+07 6 6 } } + +perform_offset_increasing s 1 10 1 $ref_values + +copy r5 result +copy r5_unif result_unif + +checkview -display result_unif -2d -path ${imagedir}/${test_image}.png diff --git a/tests/offset/shape_type_i_c/XZ4 b/tests/offset/shape_type_i_c/XZ4 new file mode 100644 index 0000000000..bef4dd74e9 --- /dev/null +++ b/tests/offset/shape_type_i_c/XZ4 @@ -0,0 +1,30 @@ +puts "TODO CR27414 ALL: Error: number of wire entities in the result" +puts "TODO CR27414 ALL: Error: number of face entities in the result" +puts "TODO CR27414 ALL: Error: operation with offset value 9 has failed" +puts "TODO CR27414 ALL: Error: operation with offset value 10 has failed" +puts "TODO CR27414 ALL: Operations with following offset values have failed: 9 10" + +puts "=============================================================================================" +puts "0032333: Modeling Algorithms - Empty(wrong) result of offset operation in mode \"Complete\" join type \"Intersection\"" +puts "=============================================================================================" +puts "" + +restore [locate_data_file bug32333_172_trim1.brep] s + +set ref_values { { 171093 2.538e+06 42 42 } \ + { 169448 2.70883e+06 41 41 } \ + { 174262 2.88068e+06 41 41 } \ + { 176065 3.05738e+06 25 25 } \ + { 181589 3.2362e+06 25 25 } \ + { 185420 3.42058e+06 17 17 } \ + { 191400 3.60898e+06 17 17 } \ + { 197447 3.8034e+06 17 17 } \ + { 175027 3.98979e+06 11 11 } \ + { 179953 4.16727e+06 11 11 } } + +perform_offset_increasing s 1 10 1 $ref_values + +copy r5 result +copy r5_unif result_unif + +checkview -display result_unif -2d -path ${imagedir}/${test_image}.png diff --git a/tests/offset/shape_type_i_c/XZ5 b/tests/offset/shape_type_i_c/XZ5 new file mode 100644 index 0000000000..479f7f83cc --- /dev/null +++ b/tests/offset/shape_type_i_c/XZ5 @@ -0,0 +1,27 @@ +puts "TODO CR27414 ALL: Error: operation with offset value 9 has failed" +puts "TODO CR27414 ALL: Operations with following offset values have failed: 9" + +puts "=============================================================================================" +puts "0032333: Modeling Algorithms - Empty(wrong) result of offset operation in mode \"Complete\" join type \"Intersection\"" +puts "=============================================================================================" +puts "" + +restore [locate_data_file bug32333_172_trim2.brep] s + +set ref_values { { 82542.8 820795 18 18 } \ + { 82089.5 903148 19 19 } \ + { 86737.5 987555 19 19 } \ + { 91176.7 1.07665e+06 15 15 } \ + { 95898.3 1.17018e+06 15 15 } \ + { 100690 1.26847e+06 15 15 } \ + { 105551 1.37158e+06 15 15 } \ + { 110483 1.47959e+06 15 15 } \ + { 98501.1 1.58422e+06 5 5 } \ + { 102414 1.68468e+06 5 5 } } + +perform_offset_increasing s 1 10 1 $ref_values + +copy r5 result +copy r5_unif result_unif + +checkview -display result_unif -2d -path ${imagedir}/${test_image}.png diff --git a/tests/offset/shape_type_i_c/XZ6 b/tests/offset/shape_type_i_c/XZ6 new file mode 100644 index 0000000000..fe1a6908d2 --- /dev/null +++ b/tests/offset/shape_type_i_c/XZ6 @@ -0,0 +1,21 @@ +puts "=============================================================================================" +puts "0032333: Modeling Algorithms - Empty(wrong) result of offset operation in mode \"Complete\" join type \"Intersection\"" +puts "=============================================================================================" +puts "" + +restore [locate_data_file bug32333_178.brep] s + +set ref_values { { 6.2988e+06 1.0009e+08 1590 1590 } \ + { 6.46295e+06 1.12852e+08 1556 1556 } \ + { 6.59935e+06 1.25914e+08 1585 1570 } \ + { 5.67319e+06 1.38166e+08 552 552 } \ + { 5.52249e+06 1.49358e+08 260 260 } \ + { 5.72672e+06 1.60607e+08 260 260 } \ + { 4.90877e+06 1.71755e+08 44 44 } } + +perform_offset_increasing s 1 13 2 $ref_values + +copy r5 result +copy r5_unif result_unif + +checkview -display result_unif -2d -path ${imagedir}/${test_image}.png diff --git a/tests/offset/shape_type_i_c/XZ7 b/tests/offset/shape_type_i_c/XZ7 new file mode 100644 index 0000000000..54ed10b54d --- /dev/null +++ b/tests/offset/shape_type_i_c/XZ7 @@ -0,0 +1,37 @@ +puts "TODO CR27414 ALL: Error: operation with offset value 7 has failed" +puts "TODO CR27414 ALL: Error: operation with offset value 8 has failed" +puts "TODO CR27414 ALL: Error: operation with offset value 9 has failed" +puts "TODO CR27414 ALL: Error: operation with offset value 10 has failed" +puts "TODO CR27414 ALL: Error: operation with offset value 11 has failed" +puts "TODO CR27414 ALL: Error: operation with offset value 12 has failed" +puts "TODO CR27414 ALL: Operations with following offset values have failed: 7 8 9 10 11 12" + +puts "=============================================================================================" +puts "0032333: Modeling Algorithms - Empty(wrong) result of offset operation in mode \"Complete\" join type \"Intersection\"" +puts "=============================================================================================" +puts "" + +restore [locate_data_file bug32333_178_trim1.brep] s + +set ref_values { { 237838 3.74252e+06 61 61 } \ + { 241858 3.98236e+06 61 61 } \ + { 245948 4.22626e+06 59 59 } \ + { 250116 4.47428e+06 59 59 } \ + { 245191 4.72003e+06 60 60 } \ + { 236043 4.96659e+06 29 29 } \ + { 241534 5.20537e+06 25 25 } \ + { 245656 5.44968e+06 17 17 } \ + { 251925 5.69846e+06 17 17 } \ + { 258263 5.95355e+06 17 17 } \ + { 264668 6.21501e+06 17 17 } \ + { 271141 6.48291e+06 17 17 } \ + { 243904 6.74052e+06 9 9 } \ + { 249735 6.98734e+06 9 9 } \ + { 255633 7.24002e+06 9 9 } } + +perform_offset_increasing s 1 15 1 $ref_values + +copy r5 result +copy r5_unif result_unif + +checkview -display result_unif -2d -path ${imagedir}/${test_image}.png diff --git a/tests/offset/shape_type_i_c/XZ8 b/tests/offset/shape_type_i_c/XZ8 new file mode 100644 index 0000000000..3c86b6e3ac --- /dev/null +++ b/tests/offset/shape_type_i_c/XZ8 @@ -0,0 +1,29 @@ +puts "=============================================================================================" +puts "0032333: Modeling Algorithms - Empty(wrong) result of offset operation in mode \"Complete\" join type \"Intersection\"" +puts "=============================================================================================" +puts "" + +restore [locate_data_file bug32333_178_trim2.brep] s + +set ref_values { { 72863.6 1.02754e+06 24 24 } \ + { 75700.8 1.10182e+06 24 24 } \ + { 78584.1 1.17895e+06 24 24 } \ + { 81513.2 1.259e+06 24 24 } \ + { 84488.3 1.342e+06 24 24 } \ + { 87509.3 1.42799e+06 24 24 } \ + { 90576.3 1.51703e+06 24 24 } \ + { 91698.4 1.60916e+06 16 16 } \ + { 94791 1.7024e+06 16 16 } \ + { 97929.5 1.79876e+06 16 16 } \ + { 101114 1.89827e+06 16 16 } \ + { 104344 2.001e+06 16 16 } \ + { 107621 2.10698e+06 16 16 } \ + { 110943 2.21626e+06 16 16 } \ + { 114311 2.32888e+06 16 16 } } + +perform_offset_increasing s 1 15 1 $ref_values + +copy r5 result +copy r5_unif result_unif + +checkview -display result_unif -2d -path ${imagedir}/${test_image}.png diff --git a/tests/offset/shape_type_i_c/XZ9 b/tests/offset/shape_type_i_c/XZ9 new file mode 100644 index 0000000000..6e29048346 --- /dev/null +++ b/tests/offset/shape_type_i_c/XZ9 @@ -0,0 +1,17 @@ +puts "=============================================================================================" +puts "0032333: Modeling Algorithms - Empty(wrong) result of offset operation in mode \"Complete\" join type \"Intersection\"" +puts "=============================================================================================" +puts "" + +restore [locate_data_file bug32333_178_trim3.brep] s + +offsetparameter 1e-7 c i r +offsetload s 15 +offsetperform result + +checkprops result -s 117600 -v 2.73811e+06 + +unifysamedom result_unif result +checknbshapes result_unif -wire 7 -face 7 -shell 1 -solid 1 + +checkview -display result_unif -2d -path ${imagedir}/${test_image}.png diff --git a/tests/offset/shape_type_i_c/Z4 b/tests/offset/shape_type_i_c/Z4 index 708afe4351..f4c74d6e70 100644 --- a/tests/offset/shape_type_i_c/Z4 +++ b/tests/offset/shape_type_i_c/Z4 @@ -1,7 +1,10 @@ restore [locate_data_file bug26917_M2_trim4.brep] s -OFFSETSHAPE 8 {} $calcul $type +offsetparameter 1e-7 c i r +offsetload s 8 +offsetperform result -checkprops result -v 4.65244e+006 +checkprops result -s 279365 -v 4.65244e+06 -checknbshapes result -shell 1 +unifysamedom result_unif result +checknbshapes result_unif -wire 72 -face 72 -shell 1 -solid 1 diff --git a/tests/offset/shape_type_i_c/ZB4 b/tests/offset/shape_type_i_c/ZB4 index 63cfa23845..b49bd979d0 100644 --- a/tests/offset/shape_type_i_c/ZB4 +++ b/tests/offset/shape_type_i_c/ZB4 @@ -1,10 +1,13 @@ -puts "TODO CR27414 ALL: Error : The area of result shape is" -puts "TODO CR27414 ALL: Error : The volume of result shape is" +puts "TODO OCC27414 ALL: Error : is WRONG because number of" +puts "TODO OCC27414 ALL: Error : The area of result shape is" +puts "TODO OCC27414 ALL: Error : The volume of result shape is" +puts "TODO OCC27414 ALL: Error: bsection of the result and s is not equal to zero" restore [locate_data_file bug26917_M2_trim22.brep] s OFFSETSHAPE 8 {} $calcul $type -checkprops result -v 1.1318e+006 -s 69137.2 +checkprops result -s 69299.9 -v 1.08094e+06 -deps 1.e-3 -checknbshapes result -shell 1 +unifysamedom result_unif result +checknbshapes result_unif -wire 19 -face 19 -shell 1 -solid 1 diff --git a/tests/offset/shape_type_i_c/ZC8 b/tests/offset/shape_type_i_c/ZC8 index ad84f9346c..39ac3f62cb 100644 --- a/tests/offset/shape_type_i_c/ZC8 +++ b/tests/offset/shape_type_i_c/ZC8 @@ -1,11 +1,12 @@ -puts "TODO OCC27414 ALL: Error: The command cannot be built" -puts "TODO OCC27414 ALL: gives an empty result" -puts "TODO OCC27414 ALL: TEST INCOMPLETE" +puts "TODO OCC27414 ALL: Error : is WRONG because number of" +puts "TODO OCC27414 ALL: Error : The area of result shape is" +puts "TODO OCC27414 ALL: Error : The volume of result shape is" restore [locate_data_file bug26917_M2_trim35.brep] s OFFSETSHAPE 8 {} $calcul $type -checkprops result -v 0 +checkprops result -s 30085.9 -v 282977 -deps 1.e-3 -checknbshapes result -shell 1 +unifysamedom result_unif result +checknbshapes result_unif -wire 9 -face 9 -shell 1 -solid 1 diff --git a/tests/offset/shape_type_i_c/ZD9 b/tests/offset/shape_type_i_c/ZD9 index 22b45bf1ad..ce3362e29a 100755 --- a/tests/offset/shape_type_i_c/ZD9 +++ b/tests/offset/shape_type_i_c/ZD9 @@ -1,11 +1,12 @@ -puts "TODO OCC27414 ALL: Error: The command cannot be built" -puts "TODO OCC27414 ALL: gives an empty result" -puts "TODO OCC27414 ALL: TEST INCOMPLETE" +puts "TODO OCC27414 ALL: Error : is WRONG because number of" +puts "TODO OCC27414 ALL: Error : The area of result shape is" +puts "TODO OCC27414 ALL: Error : The volume of result shape is" restore [locate_data_file bug26917_M2_trim9.brep] s OFFSETSHAPE 15 {} $calcul $type -checkprops result -s 0 -v 0 +checkprops result -s 29576.6 -v 276693 -checknbshapes result -shell 1 +unifysamedom result_unif result +checknbshapes result_unif -wire 16 -face 16 -shell 1 -solid 1 diff --git a/tests/offset/shape_type_i_c_multi/B7 b/tests/offset/shape_type_i_c_multi/B7 index 66745247b0..2e963d6a97 100644 --- a/tests/offset/shape_type_i_c_multi/B7 +++ b/tests/offset/shape_type_i_c_multi/B7 @@ -21,7 +21,7 @@ restore [locate_data_file bug31148_plate_split.brep] s perform_offset_multi_with_ref r0_01 s 0 {6 10 14} {1 5 1} {464 244 26 26} 1; # BAD (null shape) perform_offset_multi_with_ref r0_02 s 0 {9 11} {5 5} {448 244 24 23} 1; # BAD (filled part) -perform_offset_multi_with_ref r0_03 s 0 {6 9 11 14} {1 5 5 1} {464 268 36 35} 1; # BAD (mostly removed) +perform_offset_multi_with_ref r0_03 s 0 {6 9 11 14} {1 5 5 1} {464 268 36 35} 1; # BAD (internal part is filled) perform_offset_multi_with_ref r0_04 s 0 {8 10 12} {5 5 5} {464 276 22 20} 1; # BAD (out of borders) perform_offset_multi_with_ref r0_05 s 0 {6 8 10 12 14 } {1 5 5 5 1} {464 292 30 28} 1 perform_offset_multi_with_ref r0_06 s 0 {7 9 11 13} {1 3 3 1} {424 236 28 27} 1 From 71943b31f820c2b9191854299241dd82c2716eaf Mon Sep 17 00:00:00 2001 From: achesnok Date: Sat, 8 Jan 2022 17:07:10 +0300 Subject: [PATCH 192/639] 0032722: Visualization, TKOpenGl - performance counters disappear at some camera viewpoints Fixed OpenGl_FrameStatsPrs::Render() to enable depth clamping. Fixed OpenGl_View::MinMaxValues() to take into account performance overlay. --- src/OpenGl/OpenGl_FrameStatsPrs.cxx | 9 +++++++++ src/OpenGl/OpenGl_View.cxx | 9 +++++++++ tests/opengl/data/general/bug32722 | 19 +++++++++++++++++++ 3 files changed, 37 insertions(+) create mode 100644 tests/opengl/data/general/bug32722 diff --git a/src/OpenGl/OpenGl_FrameStatsPrs.cxx b/src/OpenGl/OpenGl_FrameStatsPrs.cxx index b57e6ed613..8213867c66 100644 --- a/src/OpenGl/OpenGl_FrameStatsPrs.cxx +++ b/src/OpenGl/OpenGl_FrameStatsPrs.cxx @@ -380,6 +380,11 @@ void OpenGl_FrameStatsPrs::Render (const Handle(OpenGl_Workspace)& theWorkspace) theWorkspace->UseDepthWrite() = Standard_False; aCtx->core11fwd->glDepthMask (GL_FALSE); } + const bool wasDepthClamped = aCtx->arbDepthClamp && aCtx->core11fwd->glIsEnabled (GL_DEPTH_CLAMP); + if (aCtx->arbDepthClamp && !wasDepthClamped) + { + aCtx->core11fwd->glEnable (GL_DEPTH_CLAMP); + } const OpenGl_Aspects* aTextAspectBack = theWorkspace->SetAspects (&myTextAspect); @@ -455,6 +460,10 @@ void OpenGl_FrameStatsPrs::Render (const Handle(OpenGl_Workspace)& theWorkspace) theWorkspace->UseDepthWrite() = wasEnabledDepth; aCtx->core11fwd->glDepthMask (wasEnabledDepth ? GL_TRUE : GL_FALSE); } + if (aCtx->arbDepthClamp && !wasDepthClamped) + { + aCtx->core11fwd->glDisable (GL_DEPTH_CLAMP); + } } // ======================================================================= diff --git a/src/OpenGl/OpenGl_View.cxx b/src/OpenGl/OpenGl_View.cxx index 95cb7dcdaf..819491c3e6 100644 --- a/src/OpenGl/OpenGl_View.cxx +++ b/src/OpenGl/OpenGl_View.cxx @@ -787,6 +787,15 @@ Bnd_Box OpenGl_View::MinMaxValues (const Standard_Boolean theToIncludeAuxiliary) Bnd_Box aBox = base_type::MinMaxValues (theToIncludeAuxiliary); + // make sure that stats overlay isn't clamped on hardware with unavailable depth clamping + if (myRenderParams.ToShowStats && !myWorkspace->GetGlContext()->arbDepthClamp) + { + Bnd_Box aStatsBox (gp_Pnt (float(myWindow->Width() / 2.0), float(myWindow->Height() / 2.0), 0.0), + gp_Pnt (float(myWindow->Width() / 2.0), float(myWindow->Height() / 2.0), 0.0)); + myRenderParams.StatsPosition->Apply (myCamera, myCamera->ProjectionMatrix(), myCamera->OrientationMatrix(), + myWindow->Width(), myWindow->Height(), aStatsBox); + aBox.Add (aStatsBox); + } return aBox; } diff --git a/tests/opengl/data/general/bug32722 b/tests/opengl/data/general/bug32722 new file mode 100644 index 0000000000..4d4b9301b3 --- /dev/null +++ b/tests/opengl/data/general/bug32722 @@ -0,0 +1,19 @@ +puts "========" +puts "OCC32722: Visualization, TKOpenGl - performance counters disappear at some camera viewpoints" +puts "========" +puts "" + +pload MODELING VISUALIZATION +vinit View1 +vcamera -persp + +box b1 0 0 0 50 50 50 +box b2 150 0 0 50 50 50 +box b3 0 150 0 50 50 50 +vdisplay b1 b2 b3 -dispMode 1 -noupdate +vaspects b1 b2 b3 -color RED -transparency 0.5 + +vrenderparams -perfCounters fps +vviewparams -scale 2.14747 -proj 0.160074 0.265291 -0.950788 -up -0.0189965 0.963858 0.265739 -at 63.0574 214.479 199.417 +checkcolor 22 34 0.8 0.8 0.8 +vdump $::imagedir/${::casename}.png From 7073768338a5bb3a2c7385b43f9a599e3d7ec5a1 Mon Sep 17 00:00:00 2001 From: isn Date: Wed, 5 Apr 2017 15:16:40 +0300 Subject: [PATCH 193/639] 0028642: BRepOffsetAPI_ThruSections/BRepFill_Generator are modifying the input shape sections 1) BRepFill_Generator and BRepOffsetAPI_ThruSections now support 'non-destructive' mode for the input shapes (sections wires). The shape history of this algorithms also has been modified. 2) New test grids (based on the previous ones) have been added. These new cases use locked shapes as input arguments 3) The option '-safe' has been added to 'thrusections' command --- src/BRepFill/BRepFill_Generator.cxx | 277 ++++++++++++++---- src/BRepFill/BRepFill_Generator.hxx | 29 +- .../BRepOffsetAPI_ThruSections.cxx | 197 ++++++++++--- .../BRepOffsetAPI_ThruSections.hxx | 16 +- src/BRepTest/BRepTest_SweepCommands.cxx | 13 +- tests/thrusection/grids.list | 4 +- tests/thrusection/not_solids_locked/A1 | 7 + tests/thrusection/not_solids_locked/B1 | 7 + tests/thrusection/not_solids_locked/C1 | 7 + tests/thrusection/not_solids_locked/D1 | 7 + tests/thrusection/not_solids_locked/F1 | 7 + tests/thrusection/not_solids_locked/G1 | 7 + tests/thrusection/not_solids_locked/H1 | 7 + tests/thrusection/not_solids_locked/I1 | 7 + tests/thrusection/not_solids_locked/J1 | 7 + tests/thrusection/not_solids_locked/K1 | 7 + tests/thrusection/not_solids_locked/L1 | 7 + tests/thrusection/not_solids_locked/M1 | 7 + tests/thrusection/not_solids_locked/N1 | 7 + tests/thrusection/not_solids_locked/O1 | 7 + tests/thrusection/not_solids_locked/P1 | 7 + tests/thrusection/not_solids_locked/Q1 | 6 + tests/thrusection/not_solids_locked/R1 | 7 + tests/thrusection/not_solids_locked/S1 | 7 + tests/thrusection/not_solids_locked/T1 | 7 + tests/thrusection/not_solids_locked/U1 | 6 + tests/thrusection/not_solids_locked/V1 | 7 + tests/thrusection/not_solids_locked/W1 | 7 + tests/thrusection/not_solids_locked/W8 | 6 + tests/thrusection/solids_locked/A1 | 11 + tests/thrusection/solids_locked/A2 | 6 + tests/thrusection/solids_locked/A3 | 6 + tests/thrusection/solids_locked/A4 | 7 + tests/thrusection/solids_locked/A5 | 7 + tests/thrusection/solids_locked/A6 | 8 + tests/thrusection/solids_locked/A7 | 8 + tests/thrusection/solids_locked/A8 | 9 + tests/thrusection/solids_locked/A9 | 9 + tests/thrusection/specific/N5 | 15 + tests/thrusection/specific/N6 | 15 + tests/thrusection/specific_locked/A1 | 55 ++++ tests/thrusection/specific_locked/A2 | 59 ++++ tests/thrusection/specific_locked/A3 | 59 ++++ tests/thrusection/specific_locked/A4 | 60 ++++ tests/thrusection/specific_locked/A6 | 55 ++++ tests/thrusection/specific_locked/A7 | 55 ++++ tests/thrusection/specific_locked/A8 | 55 ++++ tests/thrusection/specific_locked/B1 | 39 +++ tests/thrusection/specific_locked/B2 | 39 +++ tests/thrusection/specific_locked/B3 | 40 +++ tests/thrusection/specific_locked/B5 | 41 +++ tests/thrusection/specific_locked/B6 | 39 +++ tests/thrusection/specific_locked/B7 | 40 +++ tests/thrusection/specific_locked/B9 | 40 +++ tests/thrusection/specific_locked/C1 | 36 +++ tests/thrusection/specific_locked/C2 | 40 +++ tests/thrusection/specific_locked/C4 | 40 +++ tests/thrusection/specific_locked/C5 | 39 +++ tests/thrusection/specific_locked/C6 | 40 +++ tests/thrusection/specific_locked/C8 | 41 +++ tests/thrusection/specific_locked/C9 | 39 +++ tests/thrusection/specific_locked/D1 | 39 +++ tests/thrusection/specific_locked/D3 | 40 +++ tests/thrusection/specific_locked/D4 | 39 +++ tests/thrusection/specific_locked/D5 | 38 +++ tests/thrusection/specific_locked/D7 | 40 +++ tests/thrusection/specific_locked/D8 | 39 +++ tests/thrusection/specific_locked/D9 | 40 +++ tests/thrusection/specific_locked/E1 | 38 +++ tests/thrusection/specific_locked/E2 | 40 +++ tests/thrusection/specific_locked/E3 | 39 +++ tests/thrusection/specific_locked/E4 | 42 +++ tests/thrusection/specific_locked/E6 | 156 ++++++++++ tests/thrusection/specific_locked/E7 | 155 ++++++++++ tests/thrusection/specific_locked/E8 | 156 ++++++++++ tests/thrusection/specific_locked/F1 | 155 ++++++++++ tests/thrusection/specific_locked/F2 | 156 ++++++++++ tests/thrusection/specific_locked/F3 | 157 ++++++++++ tests/thrusection/specific_locked/F5 | 50 ++++ tests/thrusection/specific_locked/F6 | 50 ++++ tests/thrusection/specific_locked/F7 | 51 ++++ tests/thrusection/specific_locked/F9 | 51 ++++ tests/thrusection/specific_locked/G1 | 51 ++++ tests/thrusection/specific_locked/G2 | 51 ++++ tests/thrusection/specific_locked/G4 | 183 ++++++++++++ tests/thrusection/specific_locked/G6 | 181 ++++++++++++ tests/thrusection/specific_locked/N5 | 24 ++ tests/thrusection/specific_locked/N6 | 24 ++ 88 files changed, 3700 insertions(+), 131 deletions(-) create mode 100644 tests/thrusection/not_solids_locked/A1 create mode 100644 tests/thrusection/not_solids_locked/B1 create mode 100644 tests/thrusection/not_solids_locked/C1 create mode 100644 tests/thrusection/not_solids_locked/D1 create mode 100644 tests/thrusection/not_solids_locked/F1 create mode 100644 tests/thrusection/not_solids_locked/G1 create mode 100644 tests/thrusection/not_solids_locked/H1 create mode 100644 tests/thrusection/not_solids_locked/I1 create mode 100644 tests/thrusection/not_solids_locked/J1 create mode 100644 tests/thrusection/not_solids_locked/K1 create mode 100644 tests/thrusection/not_solids_locked/L1 create mode 100644 tests/thrusection/not_solids_locked/M1 create mode 100644 tests/thrusection/not_solids_locked/N1 create mode 100644 tests/thrusection/not_solids_locked/O1 create mode 100644 tests/thrusection/not_solids_locked/P1 create mode 100644 tests/thrusection/not_solids_locked/Q1 create mode 100644 tests/thrusection/not_solids_locked/R1 create mode 100644 tests/thrusection/not_solids_locked/S1 create mode 100644 tests/thrusection/not_solids_locked/T1 create mode 100644 tests/thrusection/not_solids_locked/U1 create mode 100644 tests/thrusection/not_solids_locked/V1 create mode 100644 tests/thrusection/not_solids_locked/W1 create mode 100644 tests/thrusection/not_solids_locked/W8 create mode 100644 tests/thrusection/solids_locked/A1 create mode 100644 tests/thrusection/solids_locked/A2 create mode 100644 tests/thrusection/solids_locked/A3 create mode 100644 tests/thrusection/solids_locked/A4 create mode 100644 tests/thrusection/solids_locked/A5 create mode 100644 tests/thrusection/solids_locked/A6 create mode 100644 tests/thrusection/solids_locked/A7 create mode 100644 tests/thrusection/solids_locked/A8 create mode 100644 tests/thrusection/solids_locked/A9 create mode 100644 tests/thrusection/specific/N5 create mode 100644 tests/thrusection/specific/N6 create mode 100644 tests/thrusection/specific_locked/A1 create mode 100644 tests/thrusection/specific_locked/A2 create mode 100644 tests/thrusection/specific_locked/A3 create mode 100644 tests/thrusection/specific_locked/A4 create mode 100644 tests/thrusection/specific_locked/A6 create mode 100644 tests/thrusection/specific_locked/A7 create mode 100644 tests/thrusection/specific_locked/A8 create mode 100644 tests/thrusection/specific_locked/B1 create mode 100644 tests/thrusection/specific_locked/B2 create mode 100644 tests/thrusection/specific_locked/B3 create mode 100644 tests/thrusection/specific_locked/B5 create mode 100644 tests/thrusection/specific_locked/B6 create mode 100644 tests/thrusection/specific_locked/B7 create mode 100644 tests/thrusection/specific_locked/B9 create mode 100644 tests/thrusection/specific_locked/C1 create mode 100644 tests/thrusection/specific_locked/C2 create mode 100644 tests/thrusection/specific_locked/C4 create mode 100644 tests/thrusection/specific_locked/C5 create mode 100644 tests/thrusection/specific_locked/C6 create mode 100644 tests/thrusection/specific_locked/C8 create mode 100644 tests/thrusection/specific_locked/C9 create mode 100644 tests/thrusection/specific_locked/D1 create mode 100644 tests/thrusection/specific_locked/D3 create mode 100644 tests/thrusection/specific_locked/D4 create mode 100644 tests/thrusection/specific_locked/D5 create mode 100644 tests/thrusection/specific_locked/D7 create mode 100644 tests/thrusection/specific_locked/D8 create mode 100644 tests/thrusection/specific_locked/D9 create mode 100644 tests/thrusection/specific_locked/E1 create mode 100644 tests/thrusection/specific_locked/E2 create mode 100644 tests/thrusection/specific_locked/E3 create mode 100644 tests/thrusection/specific_locked/E4 create mode 100644 tests/thrusection/specific_locked/E6 create mode 100644 tests/thrusection/specific_locked/E7 create mode 100644 tests/thrusection/specific_locked/E8 create mode 100644 tests/thrusection/specific_locked/F1 create mode 100644 tests/thrusection/specific_locked/F2 create mode 100644 tests/thrusection/specific_locked/F3 create mode 100644 tests/thrusection/specific_locked/F5 create mode 100644 tests/thrusection/specific_locked/F6 create mode 100644 tests/thrusection/specific_locked/F7 create mode 100644 tests/thrusection/specific_locked/F9 create mode 100644 tests/thrusection/specific_locked/G1 create mode 100644 tests/thrusection/specific_locked/G2 create mode 100644 tests/thrusection/specific_locked/G4 create mode 100644 tests/thrusection/specific_locked/G6 create mode 100644 tests/thrusection/specific_locked/N5 create mode 100644 tests/thrusection/specific_locked/N6 diff --git a/src/BRepFill/BRepFill_Generator.cxx b/src/BRepFill/BRepFill_Generator.cxx index d71ba4d910..79d59d1fea 100644 --- a/src/BRepFill/BRepFill_Generator.cxx +++ b/src/BRepFill/BRepFill_Generator.cxx @@ -503,13 +503,37 @@ void CreateKPart(const TopoDS_Edge& Edge1,const TopoDS_Edge& Edge2, Surf = surface; } +//======================================================================= +//function : CreateNewEdge +//purpose : +//======================================================================= +static TopoDS_Edge CreateNewEdge(const TopoDS_Edge& theEdge, TopTools_DataMapOfShapeShape& theCopiedEdges, + const TopoDS_Wire& theWire, TopTools_IndexedMapOfShape& theModifWires) +{ + BRep_Builder aBuilder; + TopoDS_Edge aNewEdge; + aNewEdge = TopoDS::Edge(theEdge.EmptyCopied()); + TopoDS_Iterator anIterator(theEdge); + for (; anIterator.More(); anIterator.Next()) + { + aBuilder.Add(aNewEdge, anIterator.Value()); + } + theCopiedEdges.Bind(theEdge, aNewEdge); + + if (!theModifWires.Contains(theWire)) + { + theModifWires.Add(theWire); + } + return aNewEdge; +} //======================================================================= //function : BRepFill_Generator //purpose : //======================================================================= -BRepFill_Generator::BRepFill_Generator() +BRepFill_Generator::BRepFill_Generator(): + myMutableInput (Standard_True) { } @@ -541,9 +565,11 @@ void BRepFill_Generator::Perform() B.MakeShell(myShell); Standard_Integer Nb = myWires.Length(); + TopTools_IndexedMapOfShape aModifWires; //indexed map for debugging BRepTools_WireExplorer ex1,ex2; + Standard_Boolean aFirstWire = Standard_True; Standard_Boolean wPoint1, wPoint2, uClosed = Standard_False, DegenFirst = Standard_False, DegenLast = Standard_False; for ( Standard_Integer i = 1; i <= Nb-1; i++) { @@ -580,47 +606,51 @@ void BRepFill_Generator::Perform() Standard_Boolean tantque = ex1.More() && ex2.More(); - while ( tantque ) { - - TopoDS_Vertex V1f,V1l,V2f,V2l, Vf_toMap, Vl_toMap; - - Standard_Boolean degen1 - = BRep_Tool::Degenerated(TopoDS::Edge(ex1.Current())); - Standard_Boolean degen2 - = BRep_Tool::Degenerated(TopoDS::Edge(ex2.Current())); - - if ( degen1 ) { - TopoDS_Shape aLocalShape = ex1.Current().EmptyCopied(); - Edge1 = TopoDS::Edge(aLocalShape); -// Edge1 = TopoDS::Edge(ex1.Current().EmptyCopied()); -// aLocalShape = ex1.Current(); -// TopExp::Vertices(TopoDS::Edge(aLocalShape),V1f,V1l); - TopExp::Vertices(TopoDS::Edge(ex1.Current()),V1f,V1l); - V1f.Orientation(TopAbs_FORWARD); - B.Add(Edge1,V1f); - V1l.Orientation(TopAbs_REVERSED); - B.Add(Edge1,V1l); - B.Range(Edge1,0,1); + while (tantque) + { + TopoDS_Vertex V1f, V1l, V2f, V2l, Vf_toMap, Vl_toMap; + const TopoDS_Edge& anOrEdge1 = TopoDS::Edge(ex1.Current()); + const TopoDS_Edge& anOrEdge2 = TopoDS::Edge(ex2.Current()); + + Standard_Boolean degen1 = BRep_Tool::Degenerated(anOrEdge1); + Standard_Boolean degen2 = BRep_Tool::Degenerated(anOrEdge2); + + if (degen1) + { + TopoDS_Shape aLocalShape = anOrEdge1.EmptyCopied(); + Edge1 = TopoDS::Edge(aLocalShape); + // Edge1 = TopoDS::Edge(ex1.Current().EmptyCopied()); + // aLocalShape = ex1.Current(); + // TopExp::Vertices(TopoDS::Edge(aLocalShape),V1f,V1l); + TopExp::Vertices(anOrEdge1, V1f, V1l); + V1f.Orientation(TopAbs_FORWARD); + B.Add(Edge1,V1f); + V1l.Orientation(TopAbs_REVERSED); + B.Add(Edge1,V1l); + B.Range(Edge1,0,1); + myOldNewShapes.Bind(anOrEdge1, Edge1); } - else { - TopoDS_Shape aLocalShape = ex1.Current(); - Edge1 = TopoDS::Edge(aLocalShape); -// Edge1 = TopoDS::Edge(ex1.Current()); + else + { + Edge1 = anOrEdge1; } - if ( degen2 ) { - TopoDS_Shape aLocalShape = ex2.Current().EmptyCopied(); - Edge2 = TopoDS::Edge(aLocalShape); -// Edge2 = TopoDS::Edge(ex2.Current().EmptyCopied()); - TopExp::Vertices(TopoDS::Edge(ex2.Current()),V2f,V2l); - V2f.Orientation(TopAbs_FORWARD); - B.Add(Edge2,V2f); - V2l.Orientation(TopAbs_REVERSED); - B.Add(Edge2,V2l); - B.Range(Edge2,0,1); + if (degen2) + { + TopoDS_Shape aLocalShape = anOrEdge2.EmptyCopied(); + Edge2 = TopoDS::Edge(aLocalShape); + // Edge2 = TopoDS::Edge(ex2.Current().EmptyCopied()); + TopExp::Vertices(anOrEdge2, V2f, V2l); + V2f.Orientation(TopAbs_FORWARD); + B.Add(Edge2,V2f); + V2l.Orientation(TopAbs_REVERSED); + B.Add(Edge2,V2l); + B.Range(Edge2,0,1); + myOldNewShapes.Bind(anOrEdge2, Edge2); } - else { - Edge2 = TopoDS::Edge(ex2.Current()); + else + { + Edge2 = anOrEdge2; } Standard_Boolean Periodic = (BRep_Tool::IsClosed(Edge1) || degen1) && @@ -821,32 +851,36 @@ void BRepFill_Generator::Perform() Map.Bind(Vl_toMap, Edge4); } - // make the wire - - TopoDS_Wire W; - B.MakeWire(W); - - if (! (degen1 && IType == 4)) - B.Add(W,Edge1); - B.Add(W,Edge4); - if (! (degen2 && IType == 4)) - B.Add(W,Edge2.Reversed()); - B.Add(W,Edge3); - - B.Add(Face,W); - - B.Add(myShell,Face); + if (!myMutableInput) + { + if (!degen1) //if true=>already empty-copied + { + const TopoDS_Shape* aNewEd1 = myOldNewShapes.Seek(Edge1); + if (aNewEd1) + { + Edge1 = TopoDS::Edge(*aNewEd1); + } + else if (aFirstWire && (IType != 4 || BRep_Tool::SameParameter(Edge1) || BRep_Tool::SameRange(Edge1))) + { + //if such expression is true and mutableInput is false => pre-copy the edge to prevent a following modifying (see code below) + Edge1 = CreateNewEdge(Edge1, myOldNewShapes, Wire1, aModifWires); + } + } + if (!degen2) + { + const TopoDS_Shape* aNewEd2 = myOldNewShapes.Seek(Edge2); + if (aNewEd2) + { + Edge2 = TopoDS::Edge(*aNewEd2); + } + else if (IType != 4 || BRep_Tool::SameParameter(Edge2) || BRep_Tool::SameRange(Edge2)) + { + Edge2 = CreateNewEdge(Edge2, myOldNewShapes, Wire2, aModifWires); + } + } + } - // complete myMap for edge1 - if (! (degen1 && IType == 4)) - { - TopTools_ListOfShape Empty; - if (!myMap.IsBound(Edge1)) myMap.Bind(Edge1,Empty); - myMap(Edge1).Append(Face); - } - // set the pcurves - Standard_Real T = Precision::Confusion(); if (IType != 4) //not plane @@ -933,17 +967,98 @@ void BRepFill_Generator::Perform() B.SameRange(Edge3,Standard_False); B.SameRange(Edge4,Standard_False); + // make the wire + TopoDS_Wire aWire; + B.MakeWire(aWire); + + if (!(degen1 && IType == 4)) + { + B.Add(aWire,Edge1); + } + B.Add(aWire,Edge4); + if (!(degen2 && IType == 4)) + { + B.Add(aWire,Edge2.Reversed()); + } + B.Add(aWire,Edge3); + + B.Add(Face,aWire); + B.Add(myShell,Face); + + // complete myMap for edge1 + if (! (degen1 && IType == 4)) + { + TopoDS_Edge aREd = anOrEdge1; + if (degen1) + { + aREd = Edge1; + } + + if (!myMap.IsBound(aREd)) + { + TopTools_ListOfShape Empty; + myMap.Bind(aREd,Empty); + } + myMap(aREd).Append(Face); + } + tantque = ex1.More() && ex2.More(); if (wPoint1) tantque = ex2.More(); if (wPoint2) tantque = ex1.More(); } + aFirstWire = Standard_False; + } + + //all vertices from myShell are the part of orig. section wires + if (myMutableInput) + { + BRepLib::SameParameter(myShell); + } + else + { + TopTools_DataMapIteratorOfDataMapOfShapeShape aMapIt(myOldNewShapes); + for (;aMapIt.More();aMapIt.Next()) + { + const TopoDS_Shape& aK = aMapIt.Key(); + const TopoDS_Shape& aVal = aMapIt.Value(); + myReshaper.Replace(aK, aVal); + } + BRepLib::SameParameter(myShell, myReshaper); + myShell = TopoDS::Shell(myReshaper.Apply(myShell)); } - BRepLib::SameParameter(myShell); if (uClosed && DegenFirst && DegenLast) + { myShell.Closed(Standard_True); -} + } + + //update wire's history + TopoDS_Iterator anItEdge; + for (int i = 1; i <= aModifWires.Extent(); i++) + { + const TopoDS_Shape& aCurWire = aModifWires(i); + TopoDS_Wire aNewWire; + B.MakeWire(aNewWire); + anItEdge.Initialize(aCurWire); + for (;anItEdge.More();anItEdge.Next()) + { + const TopoDS_Shape& aCurEdge = anItEdge.Value(); //edges only + const TopoDS_Shape& aNewEdge = ResultShape(aCurEdge); + B.Add(aNewWire, aNewEdge); + } + + aNewWire.Free(aCurWire.Free()); + aNewWire.Modified(aCurWire.Modified()); + aNewWire.Checked(aCurWire.Checked()); + aNewWire.Orientable(aCurWire.Orientable()); + aNewWire.Closed(aCurWire.Closed()); + aNewWire.Infinite(aCurWire.Infinite()); + aNewWire.Convex(aCurWire.Convex()); + + myOldNewShapes.Bind(aCurWire, aNewWire); + } +} //======================================================================= //function : GeneratedShapes @@ -972,4 +1087,38 @@ const TopTools_DataMapOfShapeListOfShape& BRepFill_Generator::Generated() const return myMap; } +//======================================================================= +//function : ResultShape +//purpose : +//======================================================================= +TopoDS_Shape BRepFill_Generator::ResultShape (const TopoDS_Shape& theShape) const +{ + const TopoDS_Shape* aShape = myOldNewShapes.Seek(theShape); + TopoDS_Shape aNewShape = aShape ? *aShape : theShape; + TopoDS_Shape aPrevShape; + do + { + aPrevShape = aNewShape; + aNewShape = myReshaper.Value(aNewShape); + } + while (aNewShape != aPrevShape); + return aNewShape; +} +//======================================================================= +//function : SetMutableInput +//purpose : +//======================================================================= +void BRepFill_Generator::SetMutableInput(const Standard_Boolean theIsMutableInput) +{ + myMutableInput = theIsMutableInput; +} + +//======================================================================= +//function : IsMutableInput +//purpose : +//======================================================================= +Standard_Boolean BRepFill_Generator::IsMutableInput() const +{ + return myMutableInput; +} diff --git a/src/BRepFill/BRepFill_Generator.hxx b/src/BRepFill/BRepFill_Generator.hxx index cb842869ab..39b2bfc9db 100644 --- a/src/BRepFill/BRepFill_Generator.hxx +++ b/src/BRepFill/BRepFill_Generator.hxx @@ -24,11 +24,12 @@ #include #include #include +#include #include +#include class TopoDS_Wire; class TopoDS_Shape; - //! Compute a topological surface ( a shell) using //! generating wires. The face of the shell will be //! ruled surfaces passing by the wires. @@ -56,31 +57,31 @@ public: //! of a section. Standard_EXPORT const TopTools_ListOfShape& GeneratedShapes (const TopoDS_Shape& SSection) const; + //! Returns a modified shape in the constructed shell, + //! If shape is not changed (replaced) during operation => returns the same shape + Standard_EXPORT TopoDS_Shape ResultShape (const TopoDS_Shape& theShape) const; - + //! Sets the mutable input state + //! If true then the input profile can be modified + //! inside the operation. Default value is true. + Standard_EXPORT void SetMutableInput(const Standard_Boolean theIsMutableInput); + + //! Returns the current mutable input state + Standard_EXPORT Standard_Boolean IsMutableInput() const; protected: - - - - private: - - TopTools_SequenceOfShape myWires; TopoDS_Shell myShell; TopTools_DataMapOfShapeListOfShape myMap; - + TopTools_DataMapOfShapeShape myOldNewShapes; + BRepTools_ReShape myReshaper; + Standard_Boolean myMutableInput; }; - #include - - - - #endif // _BRepFill_Generator_HeaderFile diff --git a/src/BRepOffsetAPI/BRepOffsetAPI_ThruSections.cxx b/src/BRepOffsetAPI/BRepOffsetAPI_ThruSections.cxx index 745eba1f38..5129308edf 100644 --- a/src/BRepOffsetAPI/BRepOffsetAPI_ThruSections.cxx +++ b/src/BRepOffsetAPI/BRepOffsetAPI_ThruSections.cxx @@ -52,6 +52,7 @@ #include #include #include +#include #include #include #include @@ -87,6 +88,8 @@ #include #include #include +#include +#include #include #include #include @@ -253,6 +256,7 @@ BRepOffsetAPI_ThruSections::BRepOffsetAPI_ThruSections(const Standard_Boolean is myDegen1(Standard_False), myDegen2(Standard_False) { myWCheck = Standard_True; + myMutableInput = Standard_True; //---------------------------- myParamType = Approx_ChordLength; myDegMax = 8; @@ -276,6 +280,7 @@ void BRepOffsetAPI_ThruSections::Init(const Standard_Boolean isSolid, const Stan myIsRuled = ruled; myPres3d = pres3d; myWCheck = Standard_True; + myMutableInput = Standard_True; //---------------------------- myParamType = Approx_ChordLength; myDegMax = 6; @@ -341,6 +346,7 @@ void BRepOffsetAPI_ThruSections::CheckCompatibility(const Standard_Boolean check void BRepOffsetAPI_ThruSections::Build(const Message_ProgressRange& /*theRange*/) { + myBFGenerator.Nullify(); //Check set of section for right configuration of punctual sections Standard_Integer i; TopExp_Explorer explo; @@ -508,14 +514,16 @@ void BRepOffsetAPI_ThruSections::Build(const Message_ProgressRange& /*theRange*/ void BRepOffsetAPI_ThruSections::CreateRuled() { Standard_Integer nbSects = myWires.Length(); - BRepFill_Generator aGene; + myBFGenerator = new BRepFill_Generator(); + myBFGenerator->SetMutableInput(IsMutableInput()); // for (Standard_Integer i=1; i<=nbSects; i++) { Standard_Integer i; - for (i=1; i<=nbSects; i++) { - aGene.AddWire(TopoDS::Wire(myWires(i))); + for (i=1; i<=nbSects; i++) + { + myBFGenerator->AddWire(TopoDS::Wire(myWires(i))); } - aGene.Perform(); - TopoDS_Shell shell = aGene.Shell(); + myBFGenerator->Perform(); + TopoDS_Shell shell = myBFGenerator->Shell(); if (myIsSolid) { @@ -524,7 +532,7 @@ void BRepOffsetAPI_ThruSections::CreateRuled() if (vClosed) { - TopoDS_Solid solid; + TopoDS_Solid solid; BRep_Builder B; B.MakeSolid(solid); B.Add(solid, shell); @@ -543,9 +551,10 @@ void BRepOffsetAPI_ThruSections::CreateRuled() } else { + //myBFGenerator stores the same 'myWires' + TopoDS_Wire wire1 = TopoDS::Wire(myBFGenerator->ResultShape(myWires.First())); + TopoDS_Wire wire2 = TopoDS::Wire(myBFGenerator->ResultShape(myWires.Last())); - TopoDS_Wire wire1 = TopoDS::Wire(myWires.First()); - TopoDS_Wire wire2 = TopoDS::Wire(myWires.Last()); myShape = MakeSolid(shell, wire1, wire2, myPres3d, myFirst, myLast); } @@ -585,30 +594,37 @@ void BRepOffsetAPI_ThruSections::CreateRuled() Standard_Boolean degen2 = BRep_Tool::Degenerated(anExp2.Current()); TopTools_MapOfShape MapFaces; - if (degen2){ - TopoDS_Vertex Vdegen = TopExp::FirstVertex(TopoDS::Edge(edge2)); - for (it.Initialize(MV.FindFromKey(Vdegen)); it.More(); it.Next()) { + if (degen2) + { + TopoDS_Vertex Vdegen = TopoDS::Vertex(myBFGenerator->ResultShape(TopExp::FirstVertex(TopoDS::Edge(edge2)))); + for (it.Initialize(MV.FindFromKey(Vdegen)); it.More(); it.Next()) + { MapFaces.Add(it.Value()); } } - else { - for (it.Initialize(M.FindFromKey(edge2)); it.More(); it.Next()) { + else + { + for (it.Initialize(M.FindFromKey(myBFGenerator->ResultShape(edge2))); it.More(); it.Next()) + { MapFaces.Add(it.Value()); } } - if (degen1) { - TopoDS_Vertex Vdegen = TopExp::FirstVertex(TopoDS::Edge(edge1)); - for (it.Initialize(MV.FindFromKey(Vdegen)); it.More(); it.Next()) { + if (degen1) + { + TopoDS_Vertex Vdegen = TopoDS::Vertex(myBFGenerator->ResultShape(TopExp::FirstVertex(TopoDS::Edge(edge1)))); + for (it.Initialize(MV.FindFromKey(Vdegen)); it.More(); it.Next()) + { const TopoDS_Shape& Face = it.Value(); - if (MapFaces.Contains(Face)) { + if (MapFaces.Contains(Face)) + { myEdgeFace.Bind(edge1, Face); break; } } } else { - for (it.Initialize(M.FindFromKey(edge1)); it.More(); it.Next()) { + for (it.Initialize(M.FindFromKey(myBFGenerator->ResultShape(edge1))); it.More(); it.Next()) { const TopoDS_Shape& Face = it.Value(); if (MapFaces.Contains(Face)) { myEdgeFace.Bind(edge1, Face); @@ -930,14 +946,65 @@ void BRepOffsetAPI_ThruSections::CreateSmoothed() Done(); } - TopExp_Explorer ex(myShape,TopAbs_EDGE); - while (ex.More()) { - const TopoDS_Edge& CurE = TopoDS::Edge(ex.Current()); - B.SameRange(CurE, Standard_False); - B.SameParameter(CurE, Standard_False); - Standard_Real tol = BRep_Tool::Tolerance(CurE); - BRepLib::SameParameter(CurE,tol); - ex.Next(); + TopTools_DataMapOfShapeReal aVertexToleranceMap; + TopExp_Explorer aTopExplorer(myShape,TopAbs_EDGE); + while (aTopExplorer.More()) + { + const TopoDS_Edge& aCurEdge = TopoDS::Edge(aTopExplorer.Current()); + B.SameRange(aCurEdge, Standard_False); + B.SameParameter(aCurEdge, Standard_False); + Standard_Real aTolerance = BRep_Tool::Tolerance(aCurEdge); + if (myMutableInput) + { + BRepLib::SameParameter(aCurEdge,aTolerance); + } + else + { + //all edges from myShape can be safely updated/changed + //all vertices from myShape are the part of the original wires + Standard_Real aNewTolerance = -1; + BRepLib::SameParameter(aCurEdge, aTolerance, aNewTolerance, Standard_True); + if (aNewTolerance > 0) + { + TopoDS_Vertex aVertex1, aVertex2; + TopExp::Vertices(aCurEdge,aVertex1,aVertex2); + if (!aVertex1.IsNull()) + { + const Standard_Real* anOldTolerance = aVertexToleranceMap.Seek(aVertex1); + if (!anOldTolerance || (anOldTolerance && *anOldTolerance < aNewTolerance)) + { + aVertexToleranceMap.Bind(aVertex1,aNewTolerance); + } + } + if (!aVertex2.IsNull()) + { + const Standard_Real* anOldTolerance = aVertexToleranceMap.Seek(aVertex2); + if (!anOldTolerance || (anOldTolerance && *anOldTolerance < aNewTolerance)) + { + aVertexToleranceMap.Bind(aVertex2,aNewTolerance); + } + } + } + } + aTopExplorer.Next(); + } + + if (!myMutableInput) + { + BRepTools_ReShape aReshaper; + TopTools_DataMapIteratorOfDataMapOfShapeReal aMapIterator(aVertexToleranceMap); + for (;aMapIterator.More();aMapIterator.Next()) + { + const TopoDS_Vertex& aVertex = TopoDS::Vertex(aMapIterator.Key()); + Standard_Real aNewTolerance = aMapIterator.Value(); + if (BRep_Tool::Tolerance(aVertex) < aNewTolerance) + { + TopoDS_Vertex aNnewVertex = TopoDS::Vertex(aVertex.EmptyCopied()); + B.UpdateVertex(aNnewVertex, aNewTolerance); + aReshaper.Replace(aVertex, aNnewVertex); + } + } + myShape = aReshaper.Apply(myShape); } } @@ -1245,11 +1312,17 @@ BRepOffsetAPI_ThruSections::Generated(const TopoDS_Shape& S) //we return the whole bunch of longitudinal edges TopExp::MapShapesAndAncestors(myShape, TopAbs_VERTEX, TopAbs_EDGE, VEmap); TopTools_IndexedMapOfShape Emap; - const TopTools_ListOfShape& Elist = VEmap.FindFromKey(S); - TopTools_ListIteratorOfListOfShape itl(Elist); - for (; itl.More(); itl.Next()) + TopoDS_Shape aNewShape = S; + if ((myIsRuled || !myMutableInput) && !myBFGenerator.IsNull()) + { + aNewShape = myBFGenerator->ResultShape(S); + } + + const TopTools_ListOfShape& anEdgeList = VEmap.FindFromKey(aNewShape); + TopTools_ListIteratorOfListOfShape aListIterator(anEdgeList); + for (; aListIterator.More(); aListIterator.Next()) { - const TopoDS_Edge& anEdge = TopoDS::Edge(itl.Value()); + const TopoDS_Edge& anEdge = TopoDS::Edge(aListIterator.Value()); if (!BRep_Tool::Degenerated(anEdge)) { TopoDS_Vertex VV [2]; @@ -1257,9 +1330,11 @@ BRepOffsetAPI_ThruSections::Generated(const TopoDS_Shape& S) //Comprehensive check for possible case of //one vertex for start and end degenerated sections: //we must take only outgoing or only ingoing edges - if ((IsDegen[0] && S.IsSame(VV[0])) || - (IsDegen[1] && S.IsSame(VV[1]))) + if ((IsDegen[0] && aNewShape.IsSame(VV[0])) || + (IsDegen[1] && aNewShape.IsSame(VV[1]))) + { Emap.Add(anEdge); + } } } for (Standard_Integer j = 1; j <= Emap.Extent(); j++) @@ -1276,11 +1351,16 @@ BRepOffsetAPI_ThruSections::Generated(const TopoDS_Shape& S) TopExp::LastVertex(anEdge) : TopExp::FirstVertex(anEdge); const TopTools_ListOfShape& EElist = VEmap.FindFromKey(aVertex); TopTools_IndexedMapOfShape EmapOfSection; - TopExp::MapShapes(myWires(IndOfSec), TopAbs_EDGE, EmapOfSection); + TopoDS_Shape aWireSection = myWires(IndOfSec); + if ((myIsRuled || !myMutableInput) && !myBFGenerator.IsNull()) + { + aWireSection = myBFGenerator->ResultShape(aWireSection); + } + TopExp::MapShapes(aWireSection, TopAbs_EDGE, EmapOfSection); TopoDS_Edge NextEdge; - for (itl.Initialize(EElist); itl.More(); itl.Next()) + for (aListIterator.Initialize(EElist); aListIterator.More(); aListIterator.Next()) { - NextEdge = TopoDS::Edge(itl.Value()); + NextEdge = TopoDS::Edge(aListIterator.Value()); if (!NextEdge.IsSame(anEdge) && !EmapOfSection.Contains(NextEdge)) break; @@ -1296,17 +1376,6 @@ BRepOffsetAPI_ThruSections::Generated(const TopoDS_Shape& S) Standard_Integer Eindex = myVertexIndex(S); Standard_Integer Vindex = (Eindex > 0)? 0 : 1; Eindex = Abs(Eindex); - const TopoDS_Wire& FirstSection = TopoDS::Wire(myWires(1)); - TopoDS_Edge FirstEdge; - TopoDS_Vertex FirstVertexOfFirstEdge; - BRepTools_WireExplorer wexp(FirstSection); - for (Standard_Integer inde = 1; wexp.More(); wexp.Next(),inde++) - { - FirstEdge = wexp.Current(); - FirstVertexOfFirstEdge = wexp.CurrentVertex(); - if (inde == Eindex) - break; - } //Find the first longitudinal edge TopoDS_Face FirstFace = TopoDS::Face(AllFaces(Eindex)); @@ -1329,6 +1398,24 @@ BRepOffsetAPI_ThruSections::Generated(const TopoDS_Shape& S) } else { + TopoDS_Edge FirstEdge; + TopoDS_Vertex FirstVertexOfFirstEdge; + const TopoDS_Wire& FirstSection = TopoDS::Wire(myWires(1)); + BRepTools_WireExplorer aWireExplorer(FirstSection); + for (Standard_Integer i = 1; aWireExplorer.More(); aWireExplorer.Next(), i++) + { + FirstEdge = aWireExplorer.Current(); + if (i == Eindex) + { + if ((myIsRuled || !myMutableInput) && !myBFGenerator.IsNull()) + { + FirstEdge = TopoDS::Edge(myBFGenerator->ResultShape(FirstEdge)); + } + FirstVertexOfFirstEdge = aWireExplorer.CurrentVertex(); + break; + } + } + TopoDS_Shape FirstEdgeInFace; FirstEdgeInFace = Explo.Current(); TopoDS_Vertex VV [2]; @@ -1366,7 +1453,7 @@ BRepOffsetAPI_ThruSections::Generated(const TopoDS_Shape& S) { FirstVertex = TopExp::LastVertex(anEdge); const TopTools_ListOfShape& Elist1 = VEmap.FindFromKey(FirstVertex); - FirstEdge = (anEdge.IsSame(Elist1.First()))? + TopoDS_Edge FirstEdge = (anEdge.IsSame(Elist1.First()))? TopoDS::Edge(Elist1.Last()) : TopoDS::Edge(Elist1.First()); Eindex += myNbEdgesInSection; FirstFace = TopoDS::Face(AllFaces(Eindex)); @@ -1504,7 +1591,23 @@ Standard_Boolean BRepOffsetAPI_ThruSections::UseSmoothing () const return myUseSmoothing; } +//======================================================================= +//function : SetMutableInput +//purpose : +//======================================================================= +void BRepOffsetAPI_ThruSections::SetMutableInput(const Standard_Boolean theIsMutableInput) +{ + myMutableInput = theIsMutableInput; +} +//======================================================================= +//function : IsMutableInput +//purpose : +//======================================================================= +Standard_Boolean BRepOffsetAPI_ThruSections::IsMutableInput() const +{ + return myMutableInput; +} diff --git a/src/BRepOffsetAPI/BRepOffsetAPI_ThruSections.hxx b/src/BRepOffsetAPI/BRepOffsetAPI_ThruSections.hxx index 6211461380..dbe90ba5ee 100644 --- a/src/BRepOffsetAPI/BRepOffsetAPI_ThruSections.hxx +++ b/src/BRepOffsetAPI/BRepOffsetAPI_ThruSections.hxx @@ -33,11 +33,13 @@ #include #include #include +#include + class TopoDS_Wire; class TopoDS_Vertex; class TopoDS_Shape; class Geom_BSplineSurface; - +class BRepFill_Generator; //! Describes functions to build a loft. This is a shell or a //! solid passing through a set of sections in a given @@ -144,6 +146,11 @@ public: //! Returns the Face generated by each edge of the first wire Standard_EXPORT TopoDS_Shape GeneratedFace (const TopoDS_Shape& Edge) const; + //! Sets the mutable input state. + //! If true then the input profile can be modified inside + //! the thrusection operation. Default value is true. + Standard_EXPORT void SetMutableInput(const Standard_Boolean theIsMutableInput); + //! Returns a list of new shapes generated from the shape //! S by the shell-generating algorithm. //! This function is redefined from BRepBuilderAPI_MakeShape::Generated. @@ -155,7 +162,9 @@ public: { return myInputWires; } - + //! Returns the current mutable input state + Standard_EXPORT Standard_Boolean IsMutableInput() const; + protected: @@ -197,7 +206,8 @@ private: Standard_Integer myDegMax; Standard_Real myCritWeights[3]; Standard_Boolean myUseSmoothing; - + Standard_Boolean myMutableInput; + NCollection_Handle myBFGenerator; }; diff --git a/src/BRepTest/BRepTest_SweepCommands.cxx b/src/BRepTest/BRepTest_SweepCommands.cxx index be6dce7a25..3cf1503ee1 100644 --- a/src/BRepTest/BRepTest_SweepCommands.cxx +++ b/src/BRepTest/BRepTest_SweepCommands.cxx @@ -470,10 +470,15 @@ Standard_Integer thrusections(Draw_Interpretor&, Standard_Integer n, const char* Generator = 0; } Generator = new BRepOffsetAPI_ThruSections(issolid, isruled); - + Standard_Boolean IsMutableInput = Standard_True; Standard_Integer NbEdges = 0; Standard_Boolean IsFirstWire = Standard_False; for (Standard_Integer i = index + 2; i <= n - 1; i++) { + if (!strcmp(a[i], "-safe")) + { + IsMutableInput = Standard_False; + continue; + } Standard_Boolean IsWire = Standard_True; Shape = DBRep::Get(a[i], TopAbs_WIRE); if (!Shape.IsNull()) @@ -507,6 +512,8 @@ Standard_Integer thrusections(Draw_Interpretor&, Standard_Integer n, const char* } + Generator->SetMutableInput(IsMutableInput); + check = (check || !samenumber); Generator->CheckCompatibility(check); @@ -1001,7 +1008,9 @@ void BRepTest::SweepCommands(Draw_Interpretor& theCommands) theCommands.Add("gener", "gener result wire1 wire2 [..wire..]", __FILE__, gener, g); - theCommands.Add("thrusections", "thrusections [-N] result issolid isruled shape1 shape2 [..shape..], the option -N means no check on wires, shapes must be wires or vertices (only first or last)", + theCommands.Add("thrusections", "thrusections [-N] result issolid isruled shape1 shape2 [..shape..] [-safe],\n" + "\t\tthe option -N means no check on wires, shapes must be wires or vertices (only first or last),\n" + "\t\t-safe option allows to prevent the modifying of input shapes", __FILE__, thrusections, g); theCommands.Add("mksweep", "mksweep wire", diff --git a/tests/thrusection/grids.list b/tests/thrusection/grids.list index 2d2da6b56c..cb68540472 100644 --- a/tests/thrusection/grids.list +++ b/tests/thrusection/grids.list @@ -2,4 +2,6 @@ 002 not_solids 003 specific 004 bugs - +005 not_solids_locked +006 solids_locked +007 specific_locked \ No newline at end of file diff --git a/tests/thrusection/not_solids_locked/A1 b/tests/thrusection/not_solids_locked/A1 new file mode 100644 index 0000000000..91b288036f --- /dev/null +++ b/tests/thrusection/not_solids_locked/A1 @@ -0,0 +1,7 @@ +restore [locate_data_file D1] w1 +restore [locate_data_file D1] w2 +ttranslate w2 0 20 0 +setflags w1 locked +setflags w2 locked +thrusections result 0 0 w1 w2 -safe +checkprops result -s 200 diff --git a/tests/thrusection/not_solids_locked/B1 b/tests/thrusection/not_solids_locked/B1 new file mode 100644 index 0000000000..f3d0ab2a38 --- /dev/null +++ b/tests/thrusection/not_solids_locked/B1 @@ -0,0 +1,7 @@ +restore [locate_data_file D2] w1 +restore [locate_data_file D4] w2 +ttranslate w2 0 20 0 +setflags w1 locked +setflags w2 locked +thrusections result 0 0 w1 w2 -safe +checkprops result -s 161.603 diff --git a/tests/thrusection/not_solids_locked/C1 b/tests/thrusection/not_solids_locked/C1 new file mode 100644 index 0000000000..18614eb808 --- /dev/null +++ b/tests/thrusection/not_solids_locked/C1 @@ -0,0 +1,7 @@ +restore [locate_data_file D4] w1 +restore [locate_data_file D1] w2 +ttranslate w2 0 20 0 +setflags w1 locked +setflags w2 locked +thrusections result 0 0 w1 w2 -safe +checkprops result -s 200 diff --git a/tests/thrusection/not_solids_locked/D1 b/tests/thrusection/not_solids_locked/D1 new file mode 100644 index 0000000000..6258d60a54 --- /dev/null +++ b/tests/thrusection/not_solids_locked/D1 @@ -0,0 +1,7 @@ +restore [locate_data_file D5] w1 +restore [locate_data_file D4] w2 +ttranslate w2 0 20 0 +setflags w1 locked +setflags w2 locked +thrusections result 0 0 w1 w2 -safe +checkprops result -s 161.603 diff --git a/tests/thrusection/not_solids_locked/F1 b/tests/thrusection/not_solids_locked/F1 new file mode 100644 index 0000000000..9d2da63359 --- /dev/null +++ b/tests/thrusection/not_solids_locked/F1 @@ -0,0 +1,7 @@ +restore [locate_data_file C2] w1 +restore [locate_data_file C1] w2 +ttranslate w2 0 0 40 +setflags w1 locked +setflags w2 locked +thrusections result 0 0 w1 w2 -safe +checkprops result -s 2513.27 diff --git a/tests/thrusection/not_solids_locked/G1 b/tests/thrusection/not_solids_locked/G1 new file mode 100644 index 0000000000..62ac4b45b2 --- /dev/null +++ b/tests/thrusection/not_solids_locked/G1 @@ -0,0 +1,7 @@ +restore [locate_data_file C3] w1 +restore [locate_data_file C1] w2 +ttranslate w2 0 0 40 +setflags w1 locked +setflags w2 locked +thrusections result 0 0 w1 w2 -safe +checkprops result -s 2196.82 diff --git a/tests/thrusection/not_solids_locked/H1 b/tests/thrusection/not_solids_locked/H1 new file mode 100644 index 0000000000..6f9a0396fa --- /dev/null +++ b/tests/thrusection/not_solids_locked/H1 @@ -0,0 +1,7 @@ +restore [locate_data_file C4] w1 +restore [locate_data_file C1] w2 +ttranslate w2 0 0 40 +setflags w1 locked +setflags w2 locked +thrusections result 0 0 w1 w2 -safe +checkprops result -s 2513.27 diff --git a/tests/thrusection/not_solids_locked/I1 b/tests/thrusection/not_solids_locked/I1 new file mode 100644 index 0000000000..2d588a4b64 --- /dev/null +++ b/tests/thrusection/not_solids_locked/I1 @@ -0,0 +1,7 @@ +restore [locate_data_file C5] w1 +restore [locate_data_file C1] w2 +ttranslate w2 0 0 40 +setflags w1 locked +setflags w2 locked +thrusections result 0 0 w1 w2 -safe +checkprops result -s 2513.27 diff --git a/tests/thrusection/not_solids_locked/J1 b/tests/thrusection/not_solids_locked/J1 new file mode 100644 index 0000000000..7e549d5722 --- /dev/null +++ b/tests/thrusection/not_solids_locked/J1 @@ -0,0 +1,7 @@ +restore [locate_data_file C6] w1 +restore [locate_data_file C1] w2 +ttranslate w2 0 0 40 +setflags w1 locked +setflags w2 locked +thrusections result 0 0 w1 w2 -safe +checkprops result -s 2196.82 diff --git a/tests/thrusection/not_solids_locked/K1 b/tests/thrusection/not_solids_locked/K1 new file mode 100644 index 0000000000..de685a6751 --- /dev/null +++ b/tests/thrusection/not_solids_locked/K1 @@ -0,0 +1,7 @@ +restore [locate_data_file C7] w1 +restore [locate_data_file C1] w2 +ttranslate w2 0 0 40 +setflags w1 locked +setflags w2 locked +thrusections result 0 0 w1 w2 -safe +checkprops result -s 2020.65 diff --git a/tests/thrusection/not_solids_locked/L1 b/tests/thrusection/not_solids_locked/L1 new file mode 100644 index 0000000000..d91b0e5092 --- /dev/null +++ b/tests/thrusection/not_solids_locked/L1 @@ -0,0 +1,7 @@ +restore [locate_data_file C8] w1 +restore [locate_data_file C1] w2 +ttranslate w2 0 0 40 +setflags w1 locked +setflags w2 locked +thrusections result 0 0 w1 w2 -safe +checkprops result -s 2020.65 diff --git a/tests/thrusection/not_solids_locked/M1 b/tests/thrusection/not_solids_locked/M1 new file mode 100644 index 0000000000..1891756d93 --- /dev/null +++ b/tests/thrusection/not_solids_locked/M1 @@ -0,0 +1,7 @@ +restore [locate_data_file C9] w1 +restore [locate_data_file C1] w2 +ttranslate w2 0 0 40 +setflags w1 locked +setflags w2 locked +thrusections result 0 0 w1 w2 -safe +checkprops result -s 1834.5 diff --git a/tests/thrusection/not_solids_locked/N1 b/tests/thrusection/not_solids_locked/N1 new file mode 100644 index 0000000000..02316db242 --- /dev/null +++ b/tests/thrusection/not_solids_locked/N1 @@ -0,0 +1,7 @@ +restore [locate_data_file C10] w1 +restore [locate_data_file C1] w2 +ttranslate w2 0 0 40 +setflags w1 locked +setflags w2 locked +thrusections result 0 0 w1 w2 -safe +checkprops result -s 2020.65 diff --git a/tests/thrusection/not_solids_locked/O1 b/tests/thrusection/not_solids_locked/O1 new file mode 100644 index 0000000000..b907157c6d --- /dev/null +++ b/tests/thrusection/not_solids_locked/O1 @@ -0,0 +1,7 @@ +restore [locate_data_file C11] w1 +restore [locate_data_file C1] w2 +ttranslate w2 0 0 40 +setflags w1 locked +setflags w2 locked +thrusections result 0 0 w1 w2 -safe +checkprops result -s 2020.65 diff --git a/tests/thrusection/not_solids_locked/P1 b/tests/thrusection/not_solids_locked/P1 new file mode 100644 index 0000000000..42d1ab3008 --- /dev/null +++ b/tests/thrusection/not_solids_locked/P1 @@ -0,0 +1,7 @@ +restore [locate_data_file C12] w1 +restore [locate_data_file C1] w2 +ttranslate w2 0 0 40 +setflags w1 locked +setflags w2 locked +thrusections result 0 0 w1 w2 -safe +checkprops result -s 1834.5 diff --git a/tests/thrusection/not_solids_locked/Q1 b/tests/thrusection/not_solids_locked/Q1 new file mode 100644 index 0000000000..7de395109e --- /dev/null +++ b/tests/thrusection/not_solids_locked/Q1 @@ -0,0 +1,6 @@ +restore [locate_data_file C13] w1 +restore [locate_data_file C1] w2 +setflags w1 locked +setflags w2 locked +thrusections result 0 0 w1 w2 -safe +checkprops result -s 1295.31 diff --git a/tests/thrusection/not_solids_locked/R1 b/tests/thrusection/not_solids_locked/R1 new file mode 100644 index 0000000000..e2f822a21a --- /dev/null +++ b/tests/thrusection/not_solids_locked/R1 @@ -0,0 +1,7 @@ +restore [locate_data_file C1] w1 +restore [locate_data_file C10] w2 +ttranslate w2 0 0 40 +setflags w1 locked +setflags w2 locked +thrusections result 0 0 w1 w2 -safe +checkprops result -s 2020.65 diff --git a/tests/thrusection/not_solids_locked/S1 b/tests/thrusection/not_solids_locked/S1 new file mode 100644 index 0000000000..ebf2a14bb8 --- /dev/null +++ b/tests/thrusection/not_solids_locked/S1 @@ -0,0 +1,7 @@ +restore [locate_data_file C3] w1 +restore [locate_data_file C11] w2 +ttranslate w2 0 0 40 +setflags w1 locked +setflags w2 locked +thrusections result 0 0 w1 w2 -safe +checkprops result -s 1690.09 diff --git a/tests/thrusection/not_solids_locked/T1 b/tests/thrusection/not_solids_locked/T1 new file mode 100644 index 0000000000..89245176ed --- /dev/null +++ b/tests/thrusection/not_solids_locked/T1 @@ -0,0 +1,7 @@ +restore [locate_data_file C5] w1 +restore [locate_data_file C12] w2 +ttranslate w2 0 0 40 +setflags w1 locked +setflags w2 locked +thrusections result 0 0 w1 w2 -safe +checkprops result -s 1834.5 diff --git a/tests/thrusection/not_solids_locked/U1 b/tests/thrusection/not_solids_locked/U1 new file mode 100644 index 0000000000..286814b8bf --- /dev/null +++ b/tests/thrusection/not_solids_locked/U1 @@ -0,0 +1,6 @@ +restore [locate_data_file C7] w1 +restore [locate_data_file C13] w2 +setflags w1 locked +setflags w2 locked +thrusections result 0 0 w1 w2 -safe +checkprops result -s 762.417 diff --git a/tests/thrusection/not_solids_locked/V1 b/tests/thrusection/not_solids_locked/V1 new file mode 100644 index 0000000000..8972a93298 --- /dev/null +++ b/tests/thrusection/not_solids_locked/V1 @@ -0,0 +1,7 @@ +restore [locate_data_file C10] w1 +restore [locate_data_file C10] w2 +ttranslate w2 0 0 40 +setflags w1 locked +setflags w2 locked +thrusections result 0 0 w1 w2 -safe +checkprops result -s 1507.96 diff --git a/tests/thrusection/not_solids_locked/W1 b/tests/thrusection/not_solids_locked/W1 new file mode 100644 index 0000000000..ce47c9e2ec --- /dev/null +++ b/tests/thrusection/not_solids_locked/W1 @@ -0,0 +1,7 @@ +restore [locate_data_file C12] w1 +restore [locate_data_file C11] w2 +ttranslate w2 0 0 40 +setflags w1 locked +setflags w2 locked +thrusections result 0 0 w1 w2 -safe +checkprops result -s 1314 diff --git a/tests/thrusection/not_solids_locked/W8 b/tests/thrusection/not_solids_locked/W8 new file mode 100644 index 0000000000..6c597250ff --- /dev/null +++ b/tests/thrusection/not_solids_locked/W8 @@ -0,0 +1,6 @@ +dall +restore [locate_data_file buc60318.rle] w +explode w W +setflags w locked +thrusections result 0 0 w_1 w_2 w_3 w_4 w_5 -safe +checkprops result -s 254109 diff --git a/tests/thrusection/solids_locked/A1 b/tests/thrusection/solids_locked/A1 new file mode 100644 index 0000000000..2d904b7428 --- /dev/null +++ b/tests/thrusection/solids_locked/A1 @@ -0,0 +1,11 @@ +restore [locate_data_file cts21295_1.brep] f1 +restore [locate_data_file cts21295_2.brep] f2 +restore [locate_data_file cts21295_3.brep] f3 +explode f1 w +explode f2 w +explode f3 w +setflags f1_1 locked +setflags f2_1 locked +setflags f3_1 locked +thrusections result 1 0 f1_1 f2_1 f3_1 -safe +checkprops result -s 49757.1 diff --git a/tests/thrusection/solids_locked/A2 b/tests/thrusection/solids_locked/A2 new file mode 100644 index 0000000000..f2cb0a91c9 --- /dev/null +++ b/tests/thrusection/solids_locked/A2 @@ -0,0 +1,6 @@ +restore [locate_data_file cts21570_1.rle] w1 +restore [locate_data_file cts21570_2.rle] w2 +setflags w1 locked +setflags w2 locked +thrusections result 1 0 w1 w2 -safe +checkprops result -s 29817.5 diff --git a/tests/thrusection/solids_locked/A3 b/tests/thrusection/solids_locked/A3 new file mode 100644 index 0000000000..94c7cb78db --- /dev/null +++ b/tests/thrusection/solids_locked/A3 @@ -0,0 +1,6 @@ +restore [locate_data_file cts21570_1.rle] w1 +restore [locate_data_file cts21570_2.rle] w2 +setflags w1 locked +setflags w2 locked +thrusections result 1 0 w2 w1 -safe +checkprops result -s 29817.5 diff --git a/tests/thrusection/solids_locked/A4 b/tests/thrusection/solids_locked/A4 new file mode 100644 index 0000000000..32a3e9624e --- /dev/null +++ b/tests/thrusection/solids_locked/A4 @@ -0,0 +1,7 @@ +restore [locate_data_file cts21570_1.rle] w1 +restore [locate_data_file cts21570_2.rle] w2 +orientation w1 F +setflags w1 locked +setflags w2 locked +thrusections result 1 0 w1 w2 -safe +checkprops result -s 29817.5 diff --git a/tests/thrusection/solids_locked/A5 b/tests/thrusection/solids_locked/A5 new file mode 100644 index 0000000000..b6c5120934 --- /dev/null +++ b/tests/thrusection/solids_locked/A5 @@ -0,0 +1,7 @@ +restore [locate_data_file cts21570_1.rle] w1 +restore [locate_data_file cts21570_2.rle] w2 +orientation w1 F +setflags w1 locked +setflags w2 locked +thrusections result 1 0 w2 w1 -safe +checkprops result -s 29817.5 diff --git a/tests/thrusection/solids_locked/A6 b/tests/thrusection/solids_locked/A6 new file mode 100644 index 0000000000..6a8b0a773c --- /dev/null +++ b/tests/thrusection/solids_locked/A6 @@ -0,0 +1,8 @@ +restore [locate_data_file cts21570_1.rle] w1 +restore [locate_data_file cts21570_2.rle] w2 +orientation w1 F +orientation w2 R +setflags w1 locked +setflags w2 locked +thrusections result 1 0 w1 w2 -safe +checkprops result -s 29817.5 diff --git a/tests/thrusection/solids_locked/A7 b/tests/thrusection/solids_locked/A7 new file mode 100644 index 0000000000..a76184fca5 --- /dev/null +++ b/tests/thrusection/solids_locked/A7 @@ -0,0 +1,8 @@ +restore [locate_data_file cts21570_1.rle] w1 +restore [locate_data_file cts21570_2.rle] w2 +orientation w1 F +orientation w2 R +setflags w1 locked +setflags w2 locked +thrusections result 1 0 w2 w1 -safe +checkprops result -s 29817.5 diff --git a/tests/thrusection/solids_locked/A8 b/tests/thrusection/solids_locked/A8 new file mode 100644 index 0000000000..a24d8473f3 --- /dev/null +++ b/tests/thrusection/solids_locked/A8 @@ -0,0 +1,9 @@ +restore [locate_data_file cts21570_1.rle] w1 +restore [locate_data_file cts21570_2.rle] w2 +orientation w1 F +orientation w2 R +orientation w1 R +setflags w1 locked +setflags w2 locked +thrusections result 1 0 w1 w2 -safe +checkprops result -s 29817.5 diff --git a/tests/thrusection/solids_locked/A9 b/tests/thrusection/solids_locked/A9 new file mode 100644 index 0000000000..3fafcc58c2 --- /dev/null +++ b/tests/thrusection/solids_locked/A9 @@ -0,0 +1,9 @@ +restore [locate_data_file cts21570_1.rle] w1 +restore [locate_data_file cts21570_2.rle] w2 +orientation w1 F +orientation w2 R +orientation w1 R +setflags w1 locked +setflags w2 locked +thrusections result 1 0 w2 w1 -safe +checkprops result -s 29817.5 diff --git a/tests/thrusection/specific/N5 b/tests/thrusection/specific/N5 new file mode 100644 index 0000000000..0c4f9e463c --- /dev/null +++ b/tests/thrusection/specific/N5 @@ -0,0 +1,15 @@ +puts "========" +puts "OCC28642: BRepOffsetAPI_ThruSections/BRepFill_Generator are modifying the input shape sections" +puts "========" +puts "" + +#check "closed" thrusection (first profile is same as the last) +polyline p1 0 0 0 1 0 0 +polyline p2 2 1 0 2 2 0 +polyline p3 3 0 0 4 0 0 +polyline p4 2 -1 0 2 -2 0 +thrusections result 0 0 p1 p2 p3 p4 p1 + +checkprops result -s 10.1587 +checknbshapes result -vertex 2 -edge 3 -wire 1 -face 1 -shell 1 -solid 0 -compsolid 0 -compound 0 -shape 8 + diff --git a/tests/thrusection/specific/N6 b/tests/thrusection/specific/N6 new file mode 100644 index 0000000000..add54429e3 --- /dev/null +++ b/tests/thrusection/specific/N6 @@ -0,0 +1,15 @@ +puts "========" +puts "OCC28642: BRepOffsetAPI_ThruSections/BRepFill_Generator are modifying the input shape sections" +puts "========" +puts "" + +#check "closed" thrusection (first profile is same as the last) +polyline p1 0 0 0 1 0 0 +polyline p2 2 1 0 2 2 0 +polyline p3 3 0 0 4 0 0 +polyline p4 2 -1 0 2 -2 0 +thrusections result 0 1 p1 p2 p3 p4 p1 + +checkprops result -s 6 +checknbshapes result -vertex 8 -edge 12 -wire 4 -face 4 -shell 1 -solid 0 -compsolid 0 -compound 0 -shape 29 + diff --git a/tests/thrusection/specific_locked/A1 b/tests/thrusection/specific_locked/A1 new file mode 100644 index 0000000000..d1bd049316 --- /dev/null +++ b/tests/thrusection/specific_locked/A1 @@ -0,0 +1,55 @@ +puts "============" +puts "OCC7166" +puts "============" +puts "" +####################################################################### +# Improvement of API of ThruSection +####################################################################### + +set BugNumber OCC7166 + +# +# * v3 +# | \ +# | \ +# | \ +# | \ +# | /* v2 +# | / +# | / * v4, v5 +# | / +# * +# v1 +# + +vertex v1 0 0 0 +vertex v2 5 5 0 +vertex v3 0 10 0 + +vertex v4 5 2.5 20 +vertex v5 5 2.5 -20 + +edge e1 v1 v2 +edge e2 v2 v3 +edge e3 v3 v1 + +wire w1 e1 e2 e3 + +set issolid 0 +set isruled 1 +setflags w1 locked +setflags v4 locked +setflags v5 locked + +thrusections result ${issolid} ${isruled} v4 w1 v5 -safe + + +checkprops result -s 490.101 + +checknbshapes result -vertex 5 -edge 9 -wire 6 -face 6 -shell 1 -solid 0 -compsolid 0 -compound 0 -shape 27 +set index [lsearch [whatis result] Closed] +if {$index == -1} { + puts "Faulty ${BugNumber} : result is not Closed shape" +} + + diff --git a/tests/thrusection/specific_locked/A2 b/tests/thrusection/specific_locked/A2 new file mode 100644 index 0000000000..67c60d1b49 --- /dev/null +++ b/tests/thrusection/specific_locked/A2 @@ -0,0 +1,59 @@ +puts "============" +puts "OCC7166" +puts "============" +puts "" +####################################################################### +# Improvement of API of ThruSection +####################################################################### + +set BugNumber OCC7166 + +# +# * v3 +# | \ +# | \ +# | \ +# | \ +# | /* v2 +# | / +# | / * v4, v5 +# | / +# * +# v1 +# + +vertex v1 0 0 0 +vertex v2 5 5 0 +vertex v3 0 10 0 + +vertex v4 5 2.5 20 +vertex v5 5 2.5 -20 + +edge e1 v1 v2 +edge e2 v2 v3 +edge e3 v3 v1 + +wire w1 e1 e2 e3 + +setflags w1 locked +setflags v4 locked +setflags v5 locked + +set issolid 1 +set isruled 1 +thrusections result ${issolid} ${isruled} v4 w1 v5 -safe + + +checkprops result -s 490.101 + + +checknbshapes result -vertex 5 -edge 9 -wire 6 -face 6 -shell 1 -solid 1 -compsolid 0 -compound 0 -shape 28 + + +set index [lsearch [whatis result] Closed] +if {$index == -1} { + puts "Faulty ${BugNumber} : result is not Closed shape" + +} + + diff --git a/tests/thrusection/specific_locked/A3 b/tests/thrusection/specific_locked/A3 new file mode 100644 index 0000000000..188bea4597 --- /dev/null +++ b/tests/thrusection/specific_locked/A3 @@ -0,0 +1,59 @@ +puts "============" +puts "OCC7166" +puts "============" +puts "" +####################################################################### +# Improvement of API of ThruSection +####################################################################### + +set BugNumber OCC7166 + +# +# * v3 +# | \ +# | \ +# | \ +# | \ +# | /* v2 +# | / +# | / * v4, v5 +# | / +# * +# v1 +# + +vertex v1 0 0 0 +vertex v2 5 5 0 +vertex v3 0 10 0 + +vertex v4 5 2.5 20 +vertex v5 5 2.5 -20 + +edge e1 v1 v2 +edge e2 v2 v3 +edge e3 v3 v1 + +wire w1 e1 e2 e3 + +set issolid 0 +set isruled 0 + +setflags w1 locked +setflags v4 locked +setflags v5 locked + +thrusections result ${issolid} ${isruled} v4 w1 v5 -safe + + +checkprops result -s 651.466 + +checknbshapes result -vertex 2 -edge 9 -wire 3 -face 3 -shell 1 -solid 0 -compsolid 0 -compound 0 -shape 18 + + +set index [lsearch [whatis result] Closed] +if {$index == -1} { + puts "Faulty ${BugNumber} : result is not Closed shape" + +} + + diff --git a/tests/thrusection/specific_locked/A4 b/tests/thrusection/specific_locked/A4 new file mode 100644 index 0000000000..52a1e8e672 --- /dev/null +++ b/tests/thrusection/specific_locked/A4 @@ -0,0 +1,60 @@ +puts "============" +puts "OCC7166" +puts "============" +puts "" +####################################################################### +# Improvement of API of ThruSection +####################################################################### + +set BugNumber OCC7166 + +# +# * v3 +# | \ +# | \ +# | \ +# | \ +# | /* v2 +# | / +# | / * v4, v5 +# | / +# * +# v1 +# + +vertex v1 0 0 0 +vertex v2 5 5 0 +vertex v3 0 10 0 + +vertex v4 5 2.5 20 +vertex v5 5 2.5 -20 + +edge e1 v1 v2 +edge e2 v2 v3 +edge e3 v3 v1 + +wire w1 e1 e2 e3 + +setflags w1 locked +setflags v4 locked +setflags v5 locked + + +set issolid 1 +set isruled 0 +thrusections result ${issolid} ${isruled} v4 w1 v5 -safe + + +checkprops result -s 651.466 + + +checknbshapes result -vertex 2 -edge 9 -wire 3 -face 3 -shell 1 -solid 1 -compsolid 0 -compound 0 -shape 19 + + +set index [lsearch [whatis result] Closed] +if {$index == -1} { + puts "Faulty ${BugNumber} : result is not Closed shape" + +} + + diff --git a/tests/thrusection/specific_locked/A6 b/tests/thrusection/specific_locked/A6 new file mode 100644 index 0000000000..a5e87f9f15 --- /dev/null +++ b/tests/thrusection/specific_locked/A6 @@ -0,0 +1,55 @@ +puts "============" +puts "OCC7166" +puts "============" +puts "" +####################################################################### +# Improvement of API of ThruSection +####################################################################### + +set BugNumber OCC7166 + +# +# * v2 +# / \ +# / \ +# / * \ +# / v4, v5 \ +# *----------------* v3 +# v1 +# + +vertex v1 0 0 0 +vertex v2 5 5 0 +vertex v3 10 0 0 + +vertex v4 5 2.5 20 +vertex v5 5 2.5 -20 + +edge e1 v1 v2 +edge e2 v2 v3 +edge e3 v3 v1 + +wire w1 e1 e2 e3 + +setflags w1 locked +setflags v4 locked +setflags v5 locked + +set issolid 1 +set isruled 1 +thrusections result ${issolid} ${isruled} v4 w1 v5 -safe + + +checkprops result -s 485.502 + + +checknbshapes result -vertex 5 -edge 9 -wire 6 -face 6 -shell 1 -solid 1 -compsolid 0 -compound 0 -shape 28 + + +set index [lsearch [whatis result] Closed] +if {$index == -1} { + puts "Faulty ${BugNumber} : result is not Closed shape" + +} + + diff --git a/tests/thrusection/specific_locked/A7 b/tests/thrusection/specific_locked/A7 new file mode 100644 index 0000000000..645e9bc26c --- /dev/null +++ b/tests/thrusection/specific_locked/A7 @@ -0,0 +1,55 @@ +puts "============" +puts "OCC7166" +puts "============" +puts "" +####################################################################### +# Improvement of API of ThruSection +####################################################################### + +set BugNumber OCC7166 + +# +# * v2 +# / \ +# / \ +# / * \ +# / v4, v5 \ +# *----------------* v3 +# v1 +# + +vertex v1 0 0 0 +vertex v2 5 5 0 +vertex v3 10 0 0 + +vertex v4 5 2.5 20 +vertex v5 5 2.5 -20 + +edge e1 v1 v2 +edge e2 v2 v3 +edge e3 v3 v1 + +wire w1 e1 e2 e3 + +set issolid 0 +set isruled 0 + +setflags w1 locked +setflags v4 locked +setflags v5 locked + +thrusections result ${issolid} ${isruled} v4 w1 v5 -safe + + +checkprops result -s 646.621 + +checknbshapes result -vertex 2 -edge 9 -wire 3 -face 3 -shell 1 -solid 0 -compsolid 0 -compound 0 -shape 18 + + +set index [lsearch [whatis result] Closed] +if {$index == -1} { + puts "Faulty ${BugNumber} : result is not Closed shape" + +} + + diff --git a/tests/thrusection/specific_locked/A8 b/tests/thrusection/specific_locked/A8 new file mode 100644 index 0000000000..2ba4a370da --- /dev/null +++ b/tests/thrusection/specific_locked/A8 @@ -0,0 +1,55 @@ +puts "============" +puts "OCC7166" +puts "============" +puts "" +####################################################################### +# Improvement of API of ThruSection +####################################################################### + +set BugNumber OCC7166 + +# +# * v2 +# / \ +# / \ +# / * \ +# / v4, v5 \ +# *----------------* v3 +# v1 +# + +vertex v1 0 0 0 +vertex v2 5 5 0 +vertex v3 10 0 0 + +vertex v4 5 2.5 20 +vertex v5 5 2.5 -20 + +edge e1 v1 v2 +edge e2 v2 v3 +edge e3 v3 v1 + +wire w1 e1 e2 e3 + +setflags w1 locked +setflags v4 locked +setflags v5 locked + +set issolid 1 +set isruled 0 +thrusections result ${issolid} ${isruled} v4 w1 v5 -safe + + +checkprops result -s 646.621 + + +checknbshapes result -vertex 2 -edge 9 -wire 3 -face 3 -shell 1 -solid 1 -compsolid 0 -compound 0 -shape 19 + + +set index [lsearch [whatis result] Closed] +if {$index == -1} { + puts "Faulty ${BugNumber} : result is not Closed shape" + +} + + diff --git a/tests/thrusection/specific_locked/B1 b/tests/thrusection/specific_locked/B1 new file mode 100644 index 0000000000..e32c7fee99 --- /dev/null +++ b/tests/thrusection/specific_locked/B1 @@ -0,0 +1,39 @@ +puts "============" +puts "OCC7166" +puts "============" +puts "" +####################################################################### +# Improvement of API of ThruSection +####################################################################### + +set BugNumber OCC7166 + +circle c1 0 0 0 10 +mkedge e1 c1 +wire w1 e1 + +vertex v1 0 0 20 +vertex v2 0 0 -20 + +set issolid 1 +set isruled 1 +setflags w1 locked +setflags v1 locked +setflags v2 locked + +catch {thrusections result ${issolid} ${isruled} v1 w1 v2 -safe} + + +checkprops result -s 1404.96 + + +checknbshapes result -vertex 3 -edge 5 -wire 2 -face 2 -shell 1 -solid 1 -compsolid 0 -compound 0 -shape 14 + + +set index [lsearch [whatis result] Closed] +if {$index == -1} { + puts "Faulty ${BugNumber} : result is not Closed shape" + +} + + diff --git a/tests/thrusection/specific_locked/B2 b/tests/thrusection/specific_locked/B2 new file mode 100644 index 0000000000..b2d991bf23 --- /dev/null +++ b/tests/thrusection/specific_locked/B2 @@ -0,0 +1,39 @@ +puts "============" +puts "OCC7166" +puts "============" +puts "" +####################################################################### +# Improvement of API of ThruSection +####################################################################### + +set BugNumber OCC7166 + +circle c1 0 0 0 10 +mkedge e1 c1 +wire w1 e1 + +vertex v1 0 0 20 +vertex v2 0 0 -20 + +set issolid 0 +set isruled 0 + +setflags w1 locked +setflags v1 locked +setflags v2 locked + +catch {thrusections result ${issolid} ${isruled} v1 w1 v2 -safe} + + +checkprops result -s 1829.23 + +checknbshapes result -vertex 2 -edge 3 -wire 1 -face 1 -shell 1 -solid 0 -compsolid 0 -compound 0 -shape 8 + + +set index [lsearch [whatis result] Closed] +if {$index == -1} { + puts "Faulty ${BugNumber} : result is not Closed shape" + +} + + diff --git a/tests/thrusection/specific_locked/B3 b/tests/thrusection/specific_locked/B3 new file mode 100644 index 0000000000..fe3d2a128d --- /dev/null +++ b/tests/thrusection/specific_locked/B3 @@ -0,0 +1,40 @@ +puts "============" +puts "OCC7166" +puts "============" +puts "" +####################################################################### +# Improvement of API of ThruSection +####################################################################### + +set BugNumber OCC7166 + +circle c1 0 0 0 10 +mkedge e1 c1 +wire w1 e1 + +vertex v1 0 0 20 +vertex v2 0 0 -20 + +set issolid 1 +set isruled 0 + +setflags w1 locked +setflags v1 locked +setflags v2 locked + +catch {thrusections result ${issolid} ${isruled} v1 w1 v2 -safe} + + +checkprops result -s 1829.23 + + +checknbshapes result -vertex 2 -edge 3 -wire 1 -face 1 -shell 1 -solid 1 -compsolid 0 -compound 0 -shape 9 + + +set index [lsearch [whatis result] Closed] +if {$index == -1} { + puts "Faulty ${BugNumber} : result is not Closed shape" + +} + + diff --git a/tests/thrusection/specific_locked/B5 b/tests/thrusection/specific_locked/B5 new file mode 100644 index 0000000000..1b7446026f --- /dev/null +++ b/tests/thrusection/specific_locked/B5 @@ -0,0 +1,41 @@ +puts "============" +puts "OCC7166" +puts "============" +puts "" +####################################################################### +# Improvement of API of ThruSection +####################################################################### + +set BugNumber OCC7166 + +circle c1 0 0 0 10 +mkedge e1 c1 +wire w1 e1 + +vertex v1 40 0 20 +vertex v2 40 0 -20 + +set issolid 1 +set isruled 1 + +setflags w1 locked +setflags v1 locked +setflags v2 locked + + +catch {thrusections result ${issolid} ${isruled} v1 w1 v2 -safe} + + +checkprops result -s 2160.94 + + +checknbshapes result -vertex 3 -edge 5 -wire 2 -face 2 -shell 1 -solid 1 -compsolid 0 -compound 0 -shape 14 + + +set index [lsearch [whatis result] Closed] +if {$index == -1} { + puts "Faulty ${BugNumber} : result is not Closed shape" + +} + + diff --git a/tests/thrusection/specific_locked/B6 b/tests/thrusection/specific_locked/B6 new file mode 100644 index 0000000000..2f17105d3e --- /dev/null +++ b/tests/thrusection/specific_locked/B6 @@ -0,0 +1,39 @@ +puts "============" +puts "OCC7166" +puts "============" +puts "" +####################################################################### +# Improvement of API of ThruSection +####################################################################### + +set BugNumber OCC7166 + +circle c1 0 0 0 10 +mkedge e1 c1 +wire w1 e1 + +vertex v1 40 0 20 +vertex v2 40 0 -20 + +set issolid 0 +set isruled 0 + +setflags w1 locked +setflags v1 locked +setflags v2 locked + +catch {thrusections result ${issolid} ${isruled} v1 w1 v2 -safe} + + +checkprops result -s 2556.25 + +checknbshapes result -vertex 2 -edge 3 -wire 1 -face 1 -shell 1 -solid 0 -compsolid 0 -compound 0 -shape 8 + + +set index [lsearch [whatis result] Closed] +if {$index == -1} { + puts "Faulty ${BugNumber} : result is not Closed shape" + +} + + diff --git a/tests/thrusection/specific_locked/B7 b/tests/thrusection/specific_locked/B7 new file mode 100644 index 0000000000..54fae39339 --- /dev/null +++ b/tests/thrusection/specific_locked/B7 @@ -0,0 +1,40 @@ +puts "============" +puts "OCC7166" +puts "============" +puts "" +####################################################################### +# Improvement of API of ThruSection +####################################################################### + +set BugNumber OCC7166 + +circle c1 0 0 0 10 +mkedge e1 c1 +wire w1 e1 + +vertex v1 40 0 20 +vertex v2 40 0 -20 + +set issolid 1 +set isruled 0 + +setflags w1 locked +setflags v1 locked +setflags v2 locked + +catch {thrusections result ${issolid} ${isruled} v1 w1 v2 -safe} + + +checkprops result -s 2556.25 + + +checknbshapes result -vertex 2 -edge 3 -wire 1 -face 1 -shell 1 -solid 1 -compsolid 0 -compound 0 -shape 9 + + +set index [lsearch [whatis result] Closed] +if {$index == -1} { + puts "Faulty ${BugNumber} : result is not Closed shape" + +} + + diff --git a/tests/thrusection/specific_locked/B9 b/tests/thrusection/specific_locked/B9 new file mode 100644 index 0000000000..12c7c081de --- /dev/null +++ b/tests/thrusection/specific_locked/B9 @@ -0,0 +1,40 @@ +puts "============" +puts "OCC7166" +puts "============" +puts "" +####################################################################### +# Improvement of API of ThruSection +####################################################################### + +set BugNumber OCC7166 + +ellipse ellipse1 0 0 0 10 5 +mkedge e1 ellipse1 +wire w1 e1 + +vertex v1 0 0 20 +vertex v2 0 0 -20 + +set issolid 1 +set isruled 1 + +setflags w1 locked +setflags v1 locked +setflags v2 locked + +catch {thrusections result ${issolid} ${isruled} v1 w1 v2 -safe} + + +checkprops result -s 1021.13 + + +checknbshapes result -vertex 3 -edge 5 -wire 2 -face 2 -shell 1 -solid 1 -compsolid 0 -compound 0 -shape 14 + + +set index [lsearch [whatis result] Closed] +if {$index == -1} { + puts "Faulty ${BugNumber} : result is not Closed shape" + +} + + diff --git a/tests/thrusection/specific_locked/C1 b/tests/thrusection/specific_locked/C1 new file mode 100644 index 0000000000..5fafb9107a --- /dev/null +++ b/tests/thrusection/specific_locked/C1 @@ -0,0 +1,36 @@ +puts "============" +puts "OCC7166" +puts "============" +####################################################################### +# Improvement of API of ThruSection +####################################################################### +set BugNumber OCC7166 + +ellipse ellipse1 0 0 0 10 5 +mkedge e1 ellipse1 +wire w1 e1 + +vertex v1 0 0 20 +vertex v2 0 0 -20 + +set issolid 0 +set isruled 0 +setflags w1 locked +setflags v1 locked +setflags v2 locked + +catch {thrusections result ${issolid} ${isruled} v1 w1 v2 -safe} + + +checkprops result -s 1346.42 + +checknbshapes result -vertex 2 -edge 3 -wire 1 -face 1 -shell 1 -solid 0 -compsolid 0 -compound 0 -shape 8 + + +set index [lsearch [whatis result] Closed] +if {$index == -1} { + puts "Faulty ${BugNumber} : result is not Closed shape" + +} + + diff --git a/tests/thrusection/specific_locked/C2 b/tests/thrusection/specific_locked/C2 new file mode 100644 index 0000000000..400cc3852c --- /dev/null +++ b/tests/thrusection/specific_locked/C2 @@ -0,0 +1,40 @@ +puts "============" +puts "OCC7166" +puts "============" +puts "" +####################################################################### +# Improvement of API of ThruSection +####################################################################### + +set BugNumber OCC7166 + +ellipse ellipse1 0 0 0 10 5 +mkedge e1 ellipse1 +wire w1 e1 + +vertex v1 0 0 20 +vertex v2 0 0 -20 + +set issolid 1 +set isruled 0 + +setflags w1 locked +setflags v1 locked +setflags v2 locked + +catch {thrusections result ${issolid} ${isruled} v1 w1 v2 -safe } + + +checkprops result -s 1346.42 + + +checknbshapes result -vertex 2 -edge 3 -wire 1 -face 1 -shell 1 -solid 1 -compsolid 0 -compound 0 -shape 9 + + +set index [lsearch [whatis result] Closed] +if {$index == -1} { + puts "Faulty ${BugNumber} : result is not Closed shape" + +} + + diff --git a/tests/thrusection/specific_locked/C4 b/tests/thrusection/specific_locked/C4 new file mode 100644 index 0000000000..cec06960db --- /dev/null +++ b/tests/thrusection/specific_locked/C4 @@ -0,0 +1,40 @@ +puts "============" +puts "OCC7166" +puts "============" +puts "" +####################################################################### +# Improvement of API of ThruSection +####################################################################### + +set BugNumber OCC7166 + +ellipse ellipse1 0 0 0 10 5 +mkedge e1 ellipse1 +wire w1 e1 + +vertex v1 40 0 20 +vertex v2 40 0 -20 + +set issolid 1 +set isruled 1 + +setflags w1 locked +setflags v1 locked +setflags v2 locked + +catch {thrusections result ${issolid} ${isruled} v1 w1 v2 -safe} + + +checkprops result -s 1353.78 + + +checknbshapes result -vertex 3 -edge 5 -wire 2 -face 2 -shell 1 -solid 1 -compsolid 0 -compound 0 -shape 14 + + +set index [lsearch [whatis result] Closed] +if {$index == -1} { + puts "Faulty ${BugNumber} : result is not Closed shape" + +} + + diff --git a/tests/thrusection/specific_locked/C5 b/tests/thrusection/specific_locked/C5 new file mode 100644 index 0000000000..ed09ff1bcc --- /dev/null +++ b/tests/thrusection/specific_locked/C5 @@ -0,0 +1,39 @@ +puts "============" +puts "OCC7166" +puts "============" +puts "" +####################################################################### +# Improvement of API of ThruSection +####################################################################### + +set BugNumber OCC7166 + +ellipse ellipse1 0 0 0 10 5 +mkedge e1 ellipse1 +wire w1 e1 + +vertex v1 40 0 20 +vertex v2 40 0 -20 + +set issolid 0 +set isruled 0 + +setflags w1 locked +setflags v1 locked +setflags v2 locked + +catch {thrusections result ${issolid} ${isruled} v1 w1 v2 -safe} + + +checkprops result -s 1683.87 + +checknbshapes result -vertex 2 -edge 3 -wire 1 -face 1 -shell 1 -solid 0 -compsolid 0 -compound 0 -shape 8 + + +set index [lsearch [whatis result] Closed] +if {$index == -1} { + puts "Faulty ${BugNumber} : result is not Closed shape" + +} + + diff --git a/tests/thrusection/specific_locked/C6 b/tests/thrusection/specific_locked/C6 new file mode 100644 index 0000000000..7d55cef302 --- /dev/null +++ b/tests/thrusection/specific_locked/C6 @@ -0,0 +1,40 @@ +puts "============" +puts "OCC7166" +puts "============" +puts "" +####################################################################### +# Improvement of API of ThruSection +####################################################################### + +set BugNumber OCC7166 + +ellipse ellipse1 0 0 0 10 5 +mkedge e1 ellipse1 +wire w1 e1 + +vertex v1 40 0 20 +vertex v2 40 0 -20 + +set issolid 1 +set isruled 0 + +setflags w1 locked +setflags v1 locked +setflags v2 locked + +catch {thrusections result ${issolid} ${isruled} v1 w1 v2 -safe} + + +checkprops result -s 1683.87 + + +checknbshapes result -vertex 2 -edge 3 -wire 1 -face 1 -shell 1 -solid 1 -compsolid 0 -compound 0 -shape 9 + + +set index [lsearch [whatis result] Closed] +if {$index == -1} { + puts "Faulty ${BugNumber} : result is not Closed shape" + +} + + diff --git a/tests/thrusection/specific_locked/C8 b/tests/thrusection/specific_locked/C8 new file mode 100644 index 0000000000..bbc0d65a05 --- /dev/null +++ b/tests/thrusection/specific_locked/C8 @@ -0,0 +1,41 @@ +puts "============" +puts "OCC7166" +puts "============" +puts "" +####################################################################### +# Improvement of API of ThruSection +####################################################################### + +set BugNumber OCC7166 + +beziercurve bc1 5 5 5 0 5 -5 0 -5 -5 0 -5 5 0 5 5 0 +mkedge e1 bc1 +wire w1 e1 + +vertex v1 0 0 20 +vertex v2 0 0 -20 + +set issolid 1 +set isruled 1 + +setflags w1 locked +setflags v1 locked +setflags v2 locked + + +catch {thrusections result ${issolid} ${isruled} v1 w1 v2 -safe} + + +checkprops result -s 449.295 + + +checknbshapes result -vertex 3 -edge 5 -wire 2 -face 2 -shell 1 -solid 1 -compsolid 0 -compound 0 -shape 14 + + +set index [lsearch [whatis result] Closed] +if {$index == -1} { + puts "Faulty ${BugNumber} : result is not Closed shape" + +} + + diff --git a/tests/thrusection/specific_locked/C9 b/tests/thrusection/specific_locked/C9 new file mode 100644 index 0000000000..27b4ca1a1d --- /dev/null +++ b/tests/thrusection/specific_locked/C9 @@ -0,0 +1,39 @@ +puts "============" +puts "OCC7166" +puts "============" +puts "" +####################################################################### +# Improvement of API of ThruSection +####################################################################### + +set BugNumber OCC7166 + +beziercurve bc1 5 5 5 0 5 -5 0 -5 -5 0 -5 5 0 5 5 0 +mkedge e1 bc1 +wire w1 e1 + +vertex v1 0 0 20 +vertex v2 0 0 -20 + +set issolid 0 +set isruled 0 + +setflags w1 locked +setflags v1 locked +setflags v2 locked + +catch {thrusections result ${issolid} ${isruled} v1 w1 v2 -safe} + + +checkprops result -s 597.473 + +checknbshapes result -vertex 2 -edge 3 -wire 1 -face 1 -shell 1 -solid 0 -compsolid 0 -compound 0 -shape 8 + + +set index [lsearch [whatis result] Closed] +if {$index == -1} { + puts "Faulty ${BugNumber} : result is not Closed shape" + +} + + diff --git a/tests/thrusection/specific_locked/D1 b/tests/thrusection/specific_locked/D1 new file mode 100644 index 0000000000..910d8e822f --- /dev/null +++ b/tests/thrusection/specific_locked/D1 @@ -0,0 +1,39 @@ +puts "============" +puts "OCC7166" +puts "============" +puts "" +####################################################################### +# Improvement of API of ThruSection +####################################################################### + +set BugNumber OCC7166 + +beziercurve bc1 5 5 5 0 5 -5 0 -5 -5 0 -5 5 0 5 5 0 +mkedge e1 bc1 +wire w1 e1 + +vertex v1 0 0 20 +vertex v2 0 0 -20 + +set issolid 1 +set isruled 0 +setflags w1 locked +setflags v1 locked +setflags v2 locked + +catch {thrusections result ${issolid} ${isruled} v1 w1 v2 -safe } + + +checkprops result -s 597.473 + + +checknbshapes result -vertex 2 -edge 3 -wire 1 -face 1 -shell 1 -solid 1 -compsolid 0 -compound 0 -shape 9 + + +set index [lsearch [whatis result] Closed] +if {$index == -1} { + puts "Faulty ${BugNumber} : result is not Closed shape" + +} + + diff --git a/tests/thrusection/specific_locked/D3 b/tests/thrusection/specific_locked/D3 new file mode 100644 index 0000000000..62ad151469 --- /dev/null +++ b/tests/thrusection/specific_locked/D3 @@ -0,0 +1,40 @@ +puts "============" +puts "OCC7166" +puts "============" +puts "" +####################################################################### +# Improvement of API of ThruSection +####################################################################### + +set BugNumber OCC7166 + +beziercurve bc1 5 5 5 0 5 -5 0 -5 -5 0 -5 5 0 5 5 0 +mkedge e1 bc1 +wire w1 e1 + +vertex v1 40 0 20 +vertex v2 40 0 -20 + +set issolid 1 +set isruled 1 + +setflags w1 locked +setflags v1 locked +setflags v2 locked + +catch {thrusections result ${issolid} ${isruled} v1 w1 v2 -safe} + + +checkprops result -s 740.079 + + +checknbshapes result -vertex 3 -edge 5 -wire 2 -face 2 -shell 1 -solid 1 -compsolid 0 -compound 0 -shape 14 + + +set index [lsearch [whatis result] Closed] +if {$index == -1} { + puts "Faulty ${BugNumber} : result is not Closed shape" + +} + + diff --git a/tests/thrusection/specific_locked/D4 b/tests/thrusection/specific_locked/D4 new file mode 100644 index 0000000000..22b503b55f --- /dev/null +++ b/tests/thrusection/specific_locked/D4 @@ -0,0 +1,39 @@ +puts "============" +puts "OCC7166" +puts "============" +puts "" +####################################################################### +# Improvement of API of ThruSection +####################################################################### + +set BugNumber OCC7166 + +beziercurve bc1 5 5 5 0 5 -5 0 -5 -5 0 -5 5 0 5 5 0 +mkedge e1 bc1 +wire w1 e1 + +vertex v1 40 0 20 +vertex v2 40 0 -20 + +set issolid 0 +set isruled 0 + +setflags w1 locked +setflags v1 locked +setflags v2 locked + +catch {thrusections result ${issolid} ${isruled} v1 w1 v2 -safe} + + +checkprops result -s 881.045 + +checknbshapes result -vertex 2 -edge 3 -wire 1 -face 1 -shell 1 -solid 0 -compsolid 0 -compound 0 -shape 8 + + +set index [lsearch [whatis result] Closed] +if {$index == -1} { + puts "Faulty ${BugNumber} : result is not Closed shape" + +} + + diff --git a/tests/thrusection/specific_locked/D5 b/tests/thrusection/specific_locked/D5 new file mode 100644 index 0000000000..38124d179e --- /dev/null +++ b/tests/thrusection/specific_locked/D5 @@ -0,0 +1,38 @@ +puts "============" +puts "OCC7166" +puts "============" +puts "" +####################################################################### +# Improvement of API of ThruSection +####################################################################### + +set BugNumber OCC7166 + +beziercurve bc1 5 5 5 0 5 -5 0 -5 -5 0 -5 5 0 5 5 0 +mkedge e1 bc1 +wire w1 e1 + +vertex v1 40 0 20 +vertex v2 40 0 -20 + +set issolid 1 +set isruled 0 + +setflags w1 locked +setflags v1 locked +setflags v2 locked + +catch {thrusections result ${issolid} ${isruled} v1 w1 v2 -safe} + + +checkprops result -s 881.045 + + +checknbshapes result -vertex 2 -edge 3 -wire 1 -face 1 -shell 1 -solid 1 -compsolid 0 -compound 0 -shape 9 +set index [lsearch [whatis result] Closed] +if {$index == -1} { + puts "Faulty ${BugNumber} : result is not Closed shape" + +} + + diff --git a/tests/thrusection/specific_locked/D7 b/tests/thrusection/specific_locked/D7 new file mode 100644 index 0000000000..02481fb28e --- /dev/null +++ b/tests/thrusection/specific_locked/D7 @@ -0,0 +1,40 @@ +puts "============" +puts "OCC7166" +puts "============" +puts "" +####################################################################### +# Improvement of API of ThruSection +####################################################################### + +set BugNumber OCC7166 + +pbsplinecurve pbc1 3 9 0 1 1 1 2 1 3 1 4 1 5 1 6 1 7 1 8 1 -1 0 0 1 -2 2 0 1 0 1 0 1 2 2 0 1 1 0 0 1 2 -2 0 1 0 -1 0 1 -2 -2 0 1 +mkedge e1 pbc1 +wire w1 e1 + +vertex v1 0 0 20 +vertex v2 0 0 -20 + +set issolid 1 +set isruled 1 + +setflags w1 locked +setflags v1 locked +setflags v2 locked + +catch {thrusections result ${issolid} ${isruled} v1 w1 v2 -safe} + + +checkprops result -s 245.485 + + +checknbshapes result -vertex 3 -edge 5 -wire 2 -face 2 -shell 1 -solid 1 -compsolid 0 -compound 0 -shape 14 + + +set index [lsearch [whatis result] Closed] +if {$index == -1} { + puts "Faulty ${BugNumber} : result is not Closed shape" + +} + + diff --git a/tests/thrusection/specific_locked/D8 b/tests/thrusection/specific_locked/D8 new file mode 100644 index 0000000000..61dc388fc8 --- /dev/null +++ b/tests/thrusection/specific_locked/D8 @@ -0,0 +1,39 @@ +puts "============" +puts "OCC7166" +puts "============" +puts "" +####################################################################### +# Improvement of API of ThruSection +####################################################################### + +set BugNumber OCC7166 + +pbsplinecurve pbc1 3 9 0 1 1 1 2 1 3 1 4 1 5 1 6 1 7 1 8 1 -1 0 0 1 -2 2 0 1 0 1 0 1 2 2 0 1 1 0 0 1 2 -2 0 1 0 -1 0 1 -2 -2 0 1 +mkedge e1 pbc1 +wire w1 e1 + +vertex v1 0 0 20 +vertex v2 0 0 -20 + +set issolid 0 +set isruled 0 + +setflags w1 locked +setflags v1 locked +setflags v2 locked + +catch {thrusections result ${issolid} ${isruled} v1 w1 v2 -safe} + + +checkprops result -s 327.161 + +checknbshapes result -vertex 2 -edge 3 -wire 1 -face 1 -shell 1 -solid 0 -compsolid 0 -compound 0 -shape 8 + + +set index [lsearch [whatis result] Closed] +if {$index == -1} { + puts "Faulty ${BugNumber} : result is not Closed shape" + +} + + diff --git a/tests/thrusection/specific_locked/D9 b/tests/thrusection/specific_locked/D9 new file mode 100644 index 0000000000..51ab82724a --- /dev/null +++ b/tests/thrusection/specific_locked/D9 @@ -0,0 +1,40 @@ +puts "============" +puts "OCC7166" +puts "============" +puts "" +####################################################################### +# Improvement of API of ThruSection +####################################################################### + +set BugNumber OCC7166 + +pbsplinecurve pbc1 3 9 0 1 1 1 2 1 3 1 4 1 5 1 6 1 7 1 8 1 -1 0 0 1 -2 2 0 1 0 1 0 1 2 2 0 1 1 0 0 1 2 -2 0 1 0 -1 0 1 -2 -2 0 1 +mkedge e1 pbc1 +wire w1 e1 + +vertex v1 0 0 20 +vertex v2 0 0 -20 + +set issolid 1 +set isruled 0 + +setflags w1 locked +setflags v1 locked +setflags v2 locked + +catch {thrusections result ${issolid} ${isruled} v1 w1 v2 -safe} + + +checkprops result -s 327.161 + + +checknbshapes result -vertex 2 -edge 3 -wire 1 -face 1 -shell 1 -solid 1 -compsolid 0 -compound 0 -shape 9 + + +set index [lsearch [whatis result] Closed] +if {$index == -1} { + puts "Faulty ${BugNumber} : result is not Closed shape" + +} + + diff --git a/tests/thrusection/specific_locked/E1 b/tests/thrusection/specific_locked/E1 new file mode 100644 index 0000000000..76590a9af2 --- /dev/null +++ b/tests/thrusection/specific_locked/E1 @@ -0,0 +1,38 @@ +puts "============" +puts "OCC7166" +puts "============" +puts "" +####################################################################### +# Improvement of API of ThruSection +####################################################################### + +set BugNumber OCC7166 + +pbsplinecurve pbc1 3 9 0 1 1 1 2 1 3 1 4 1 5 1 6 1 7 1 8 1 -1 0 0 1 -2 2 0 1 0 1 0 1 2 2 0 1 1 0 0 1 2 -2 0 1 0 -1 0 1 -2 -2 0 1 +mkedge e1 pbc1 +wire w1 e1 + +vertex v1 40 0 20 +vertex v2 40 0 -20 + +set issolid 0 +set isruled 1 +setflags w1 locked +setflags v1 locked +setflags v2 locked + +catch {thrusections result ${issolid} ${isruled} v1 w1 v2 -safe} + + +checkprops result -s 400.925 + +checknbshapes result -vertex 3 -edge 5 -wire 2 -face 2 -shell 1 -solid 0 -compsolid 0 -compound 0 -shape 13 + + +set index [lsearch [whatis result] Closed] +if {$index == -1} { + puts "Faulty ${BugNumber} : result is not Closed shape" + +} + + diff --git a/tests/thrusection/specific_locked/E2 b/tests/thrusection/specific_locked/E2 new file mode 100644 index 0000000000..68bedc9811 --- /dev/null +++ b/tests/thrusection/specific_locked/E2 @@ -0,0 +1,40 @@ +puts "============" +puts "OCC7166" +puts "============" +puts "" +####################################################################### +# Improvement of API of ThruSection +####################################################################### + +set BugNumber OCC7166 + +pbsplinecurve pbc1 3 9 0 1 1 1 2 1 3 1 4 1 5 1 6 1 7 1 8 1 -1 0 0 1 -2 2 0 1 0 1 0 1 2 2 0 1 1 0 0 1 2 -2 0 1 0 -1 0 1 -2 -2 0 1 +mkedge e1 pbc1 +wire w1 e1 + +vertex v1 40 0 20 +vertex v2 40 0 -20 + +set issolid 1 +set isruled 1 + +setflags w1 locked +setflags v1 locked +setflags v2 locked + +catch {thrusections result ${issolid} ${isruled} v1 w1 v2 -safe} + + +checkprops result -s 400.925 + + +checknbshapes result -vertex 3 -edge 5 -wire 2 -face 2 -shell 1 -solid 1 -compsolid 0 -compound 0 -shape 14 + + +set index [lsearch [whatis result] Closed] +if {$index == -1} { + puts "Faulty ${BugNumber} : result is not Closed shape" + +} + + diff --git a/tests/thrusection/specific_locked/E3 b/tests/thrusection/specific_locked/E3 new file mode 100644 index 0000000000..c570bcd71a --- /dev/null +++ b/tests/thrusection/specific_locked/E3 @@ -0,0 +1,39 @@ +puts "============" +puts "OCC7166" +puts "============" +puts "" +####################################################################### +# Improvement of API of ThruSection +####################################################################### + +set BugNumber OCC7166 + +pbsplinecurve pbc1 3 9 0 1 1 1 2 1 3 1 4 1 5 1 6 1 7 1 8 1 -1 0 0 1 -2 2 0 1 0 1 0 1 2 2 0 1 1 0 0 1 2 -2 0 1 0 -1 0 1 -2 -2 0 1 +mkedge e1 pbc1 +wire w1 e1 + +vertex v1 40 0 20 +vertex v2 40 0 -20 + +set issolid 0 +set isruled 0 + +setflags w1 locked +setflags v1 locked +setflags v2 locked + +catch {thrusections result ${issolid} ${isruled} v1 w1 v2 -safe} + + +checkprops result -s 478.063 + +checknbshapes result -vertex 2 -edge 3 -wire 1 -face 1 -shell 1 -solid 0 -compsolid 0 -compound 0 -shape 8 + + +set index [lsearch [whatis result] Closed] +if {$index == -1} { + puts "Faulty ${BugNumber} : result is not Closed shape" + +} + + diff --git a/tests/thrusection/specific_locked/E4 b/tests/thrusection/specific_locked/E4 new file mode 100644 index 0000000000..471209cc43 --- /dev/null +++ b/tests/thrusection/specific_locked/E4 @@ -0,0 +1,42 @@ +puts "TODO OCC7166 ALL: Error : The area of result shape is" + +puts "============" +puts "OCC7166" +puts "============" +puts "" +####################################################################### +# Improvement of API of ThruSection +####################################################################### + +set BugNumber OCC7166 + +pbsplinecurve pbc1 3 9 0 1 1 1 2 1 3 1 4 1 5 1 6 1 7 1 8 1 -1 0 0 1 -2 2 0 1 0 1 0 1 2 2 0 1 1 0 0 1 2 -2 0 1 0 -1 0 1 -2 -2 0 1 +mkedge e1 pbc1 +wire w1 e1 + +vertex v1 40 0 20 +vertex v2 40 0 -20 + +set issolid 1 +set isruled 0 + +setflags w1 locked +setflags v1 locked +setflags v2 locked + +catch {thrusections result ${issolid} ${isruled} v1 w1 v2 -safe} + + +checkprops result -s 422.859 + + +checknbshapes result -vertex 2 -edge 3 -wire 1 -face 1 -shell 1 -solid 1 -compsolid 0 -compound 0 -shape 9 + + +set index [lsearch [whatis result] Closed] +if {$index == -1} { + puts "Faulty ${BugNumber} : result is not Closed shape" + +} + + diff --git a/tests/thrusection/specific_locked/E6 b/tests/thrusection/specific_locked/E6 new file mode 100644 index 0000000000..85c8034d35 --- /dev/null +++ b/tests/thrusection/specific_locked/E6 @@ -0,0 +1,156 @@ +puts "============" +puts "OCC7166" +puts "============" +puts "" +####################################################################### +# Improvement of API of ThruSection +####################################################################### + +set BugNumber OCC7166 + +# +# +# +# +# +# v22 v21 +# *----------------------* +# / \ +# / \ +# / v12 v11 \ +# / *---------------------* \ +# / | | \ +# / | | \ +# * v23 | * v3 | v28 * +# | | | \ | | +# | | | \ | | +# | | | \ | | +# | | | \ | | +# | | | /* v2 | | +# | | | / | | +# | | | / | | * v4, v5 +# | | | / | | +# | | * | | +# | | v1 | | +# | | | | +# | | | | +# * v24 | | v27 * +# \ | | / +# \ *---------------------* / +# \ v13 v14 / +# \ / +# \ / +# \ v25 v26 / +# *----------------------* +# +# +# + +set z1 40 +set z2 20 +set z3 0 +set z4 100 + +# begining vertex +vertex v4 55 2.5 ${z4} +# ending vertex +vertex v5 55 2.5 -${z4} + +# top triangle +vertex v1 0 0 ${z1} +vertex v2 5 5 ${z1} +vertex v3 0 10 ${z1} + +edge e1 v1 v2 +edge e2 v2 v3 +edge e3 v3 v1 + +wire w1 e1 e2 e3 + +# top quadrangle +vertex v11 15 15 ${z2} +vertex v12 -15 15 ${z2} +vertex v13 -15 -15 ${z2} +vertex v14 15 -15 ${z2} + +edge e11 v11 v12 +edge e12 v12 v13 +edge e13 v13 v14 +edge e14 v14 v11 + +wire w11 e11 e12 e13 e14 + +# top octagon +vertex v21 25 25 ${z3} +vertex v22 -25 25 ${z3} +vertex v23 -30 10 ${z3} +vertex v24 -30 -10 ${z3} +vertex v25 -25 -25 ${z3} +vertex v26 25 -25 ${z3} +vertex v27 30 -10 ${z3} +vertex v28 30 10 ${z3} + +edge e21 v21 v22 +edge e22 v22 v23 +edge e23 v23 v24 +edge e24 v24 v25 +edge e25 v25 v26 +edge e26 v26 v27 +edge e27 v27 v28 +edge e28 v28 v21 + +wire w21 e21 e22 e23 e24 e25 e26 e27 e28 + +# bottom quadrangle +vertex v111 15 15 -${z2} +vertex v112 -15 15 -${z2} +vertex v113 -15 -15 -${z2} +vertex v114 15 -15 -${z2} + +edge e111 v111 v112 +edge e112 v112 v113 +edge e113 v113 v114 +edge e114 v114 v111 + +wire w111 e111 e112 e113 e114 + +# bottom triangle +vertex v101 0 0 -${z1} +vertex v102 5 5 -${z1} +vertex v103 0 10 -${z1} + +edge e101 v101 v102 +edge e102 v102 v103 +edge e103 v103 v101 + +wire w101 e101 e102 e103 + + +# +set issolid 1 +set isruled 1 + +setflags w1 locked +setflags v4 locked +setflags w11 locked +setflags w21 locked +setflags w111 locked +setflags w101 locked +setflags v5 locked + +thrusections result ${issolid} ${isruled} v4 w1 w11 w21 w111 w101 v5 -safe + + +checkprops result -s 12651.5 + + +checknbshapes result -vertex 57 -edge 121 -wire 66 -face 66 -shell 1 -solid 1 -compsolid 0 -compound 0 -shape 312 + + +set index [lsearch [whatis result] Closed] +if {$index == -1} { + puts "Faulty ${BugNumber} : result is not Closed shape" + +} + + diff --git a/tests/thrusection/specific_locked/E7 b/tests/thrusection/specific_locked/E7 new file mode 100644 index 0000000000..02170a4856 --- /dev/null +++ b/tests/thrusection/specific_locked/E7 @@ -0,0 +1,155 @@ +puts "TODO OCC7166 ALL: Error : The area of result shape is" + +puts "============" +puts "OCC7166" +puts "============" +puts "" +####################################################################### +# Improvement of API of ThruSection +####################################################################### + +set BugNumber OCC7166 + +# +# +# +# +# +# v22 v21 +# *----------------------* +# / \ +# / \ +# / v12 v11 \ +# / *---------------------* \ +# / | | \ +# / | | \ +# * v23 | * v3 | v28 * +# | | | \ | | +# | | | \ | | +# | | | \ | | +# | | | \ | | +# | | | /* v2 | | +# | | | / | | +# | | | / | | * v4, v5 +# | | | / | | +# | | * | | +# | | v1 | | +# | | | | +# | | | | +# * v24 | | v27 * +# \ | | / +# \ *---------------------* / +# \ v13 v14 / +# \ / +# \ / +# \ v25 v26 / +# *----------------------* +# +# +# + +set z1 40 +set z2 20 +set z3 0 +set z4 100 + +# begining vertex +vertex v4 55 2.5 ${z4} +# ending vertex +vertex v5 55 2.5 -${z4} + +# top triangle +vertex v1 0 0 ${z1} +vertex v2 5 5 ${z1} +vertex v3 0 10 ${z1} + +edge e1 v1 v2 +edge e2 v2 v3 +edge e3 v3 v1 + +wire w1 e1 e2 e3 + +# top quadrangle +vertex v11 15 15 ${z2} +vertex v12 -15 15 ${z2} +vertex v13 -15 -15 ${z2} +vertex v14 15 -15 ${z2} + +edge e11 v11 v12 +edge e12 v12 v13 +edge e13 v13 v14 +edge e14 v14 v11 + +wire w11 e11 e12 e13 e14 + +# top octagon +vertex v21 25 25 ${z3} +vertex v22 -25 25 ${z3} +vertex v23 -30 10 ${z3} +vertex v24 -30 -10 ${z3} +vertex v25 -25 -25 ${z3} +vertex v26 25 -25 ${z3} +vertex v27 30 -10 ${z3} +vertex v28 30 10 ${z3} + +edge e21 v21 v22 +edge e22 v22 v23 +edge e23 v23 v24 +edge e24 v24 v25 +edge e25 v25 v26 +edge e26 v26 v27 +edge e27 v27 v28 +edge e28 v28 v21 + +wire w21 e21 e22 e23 e24 e25 e26 e27 e28 + +# bottom quadrangle +vertex v111 15 15 -${z2} +vertex v112 -15 15 -${z2} +vertex v113 -15 -15 -${z2} +vertex v114 15 -15 -${z2} + +edge e111 v111 v112 +edge e112 v112 v113 +edge e113 v113 v114 +edge e114 v114 v111 + +wire w111 e111 e112 e113 e114 + +# bottom triangle +vertex v101 0 0 -${z1} +vertex v102 5 5 -${z1} +vertex v103 0 10 -${z1} + +edge e101 v101 v102 +edge e102 v102 v103 +edge e103 v103 v101 + +wire w101 e101 e102 e103 + +setflags v4 locked +setflags w1 locked +setflags w11 locked +setflags w21 locked +setflags w111 locked +setflags w101 locked +setflags v5 locked + +# +set issolid 0 +set isruled 0 +thrusections result ${issolid} ${isruled} v4 w1 w11 w21 w111 w101 v5 -safe + + +checkprops result -s 56691.9 + +checknbshapes result -vertex 2 -edge 33 -wire 11 -face 11 -shell 1 -solid 0 -compsolid 0 -compound 0 -shape 58 + + +set index [lsearch [whatis result] Closed] +if {$index == -1} { + puts "Faulty ${BugNumber} : result is not Closed shape" + +} + + diff --git a/tests/thrusection/specific_locked/E8 b/tests/thrusection/specific_locked/E8 new file mode 100644 index 0000000000..f691491927 --- /dev/null +++ b/tests/thrusection/specific_locked/E8 @@ -0,0 +1,156 @@ +puts "TODO OCC7166 ALL: Error : The area of result shape is" + +puts "============" +puts "OCC7166" +puts "============" +puts "" +####################################################################### +# Improvement of API of ThruSection +####################################################################### + +set BugNumber OCC7166 + +# +# +# +# +# +# v22 v21 +# *----------------------* +# / \ +# / \ +# / v12 v11 \ +# / *---------------------* \ +# / | | \ +# / | | \ +# * v23 | * v3 | v28 * +# | | | \ | | +# | | | \ | | +# | | | \ | | +# | | | \ | | +# | | | /* v2 | | +# | | | / | | +# | | | / | | * v4, v5 +# | | | / | | +# | | * | | +# | | v1 | | +# | | | | +# | | | | +# * v24 | | v27 * +# \ | | / +# \ *---------------------* / +# \ v13 v14 / +# \ / +# \ / +# \ v25 v26 / +# *----------------------* +# +# +# + +set z1 40 +set z2 20 +set z3 0 +set z4 100 + +# begining vertex +vertex v4 55 2.5 ${z4} +# ending vertex +vertex v5 55 2.5 -${z4} + +# top triangle +vertex v1 0 0 ${z1} +vertex v2 5 5 ${z1} +vertex v3 0 10 ${z1} + +edge e1 v1 v2 +edge e2 v2 v3 +edge e3 v3 v1 + +wire w1 e1 e2 e3 + +# top quadrangle +vertex v11 15 15 ${z2} +vertex v12 -15 15 ${z2} +vertex v13 -15 -15 ${z2} +vertex v14 15 -15 ${z2} + +edge e11 v11 v12 +edge e12 v12 v13 +edge e13 v13 v14 +edge e14 v14 v11 + +wire w11 e11 e12 e13 e14 + +# top octagon +vertex v21 25 25 ${z3} +vertex v22 -25 25 ${z3} +vertex v23 -30 10 ${z3} +vertex v24 -30 -10 ${z3} +vertex v25 -25 -25 ${z3} +vertex v26 25 -25 ${z3} +vertex v27 30 -10 ${z3} +vertex v28 30 10 ${z3} + +edge e21 v21 v22 +edge e22 v22 v23 +edge e23 v23 v24 +edge e24 v24 v25 +edge e25 v25 v26 +edge e26 v26 v27 +edge e27 v27 v28 +edge e28 v28 v21 + +wire w21 e21 e22 e23 e24 e25 e26 e27 e28 + +# bottom quadrangle +vertex v111 15 15 -${z2} +vertex v112 -15 15 -${z2} +vertex v113 -15 -15 -${z2} +vertex v114 15 -15 -${z2} + +edge e111 v111 v112 +edge e112 v112 v113 +edge e113 v113 v114 +edge e114 v114 v111 + +wire w111 e111 e112 e113 e114 + +# bottom triangle +vertex v101 0 0 -${z1} +vertex v102 5 5 -${z1} +vertex v103 0 10 -${z1} + +edge e101 v101 v102 +edge e102 v102 v103 +edge e103 v103 v101 + +wire w101 e101 e102 e103 + +setflags v4 locked +setflags w1 locked +setflags w11 locked +setflags w21 locked +setflags w111 locked +setflags w101 locked +setflags v5 locked + +# +set issolid 1 +set isruled 0 +thrusections result ${issolid} ${isruled} v4 w1 w11 w21 w111 w101 v5 -safe + + +checkprops result -s 56691.9 + + +checknbshapes result -vertex 2 -edge 33 -wire 11 -face 11 -shell 1 -solid 1 -compsolid 0 -compound 0 -shape 59 + + +set index [lsearch [whatis result] Closed] +if {$index == -1} { + puts "Faulty ${BugNumber} : result is not Closed shape" + +} + + diff --git a/tests/thrusection/specific_locked/F1 b/tests/thrusection/specific_locked/F1 new file mode 100644 index 0000000000..a83c817328 --- /dev/null +++ b/tests/thrusection/specific_locked/F1 @@ -0,0 +1,155 @@ +puts "============" +puts "OCC7166" +puts "============" +puts "" +####################################################################### +# Improvement of API of ThruSection +####################################################################### + +set BugNumber OCC7166 + +# +# +# +# +# +# v22 v21 +# *----------------------* +# / \ +# / \ +# / v12 v11 \ +# / *---------------------* \ +# / | | \ +# / | | \ +# * v23 | * v3 | v28 * +# | | | \ | | +# | | | \ | | +# | | | \ | | +# | | | \ | | +# | | | /* v2 | | +# | | | / | | +# | | | / | | * v4, v5 +# | | | / | | +# | | * | | +# | | v1 | | +# | | | | +# | | | | +# * v24 | | v27 * +# \ | | / +# \ *---------------------* / +# \ v13 v14 / +# \ / +# \ / +# \ v25 v26 / +# *----------------------* +# +# +# + +set z1 40 +set z2 20 +set z3 0 +set z4 100 + +# begining vertex +vertex v4 2.5 5 ${z4} +# ending vertex +vertex v5 2.5 5 -${z4} + +# top triangle +vertex v1 0 0 ${z1} +vertex v2 5 5 ${z1} +vertex v3 0 10 ${z1} + +edge e1 v1 v2 +edge e2 v2 v3 +edge e3 v3 v1 + +wire w1 e1 e2 e3 + +# top quadrangle +vertex v11 15 15 ${z2} +vertex v12 -15 15 ${z2} +vertex v13 -15 -15 ${z2} +vertex v14 15 -15 ${z2} + +edge e11 v11 v12 +edge e12 v12 v13 +edge e13 v13 v14 +edge e14 v14 v11 + +wire w11 e11 e12 e13 e14 + +# top octagon +vertex v21 25 25 ${z3} +vertex v22 -25 25 ${z3} +vertex v23 -30 10 ${z3} +vertex v24 -30 -10 ${z3} +vertex v25 -25 -25 ${z3} +vertex v26 25 -25 ${z3} +vertex v27 30 -10 ${z3} +vertex v28 30 10 ${z3} + +edge e21 v21 v22 +edge e22 v22 v23 +edge e23 v23 v24 +edge e24 v24 v25 +edge e25 v25 v26 +edge e26 v26 v27 +edge e27 v27 v28 +edge e28 v28 v21 + +wire w21 e21 e22 e23 e24 e25 e26 e27 e28 + +# bottom quadrangle +vertex v111 15 15 -${z2} +vertex v112 -15 15 -${z2} +vertex v113 -15 -15 -${z2} +vertex v114 15 -15 -${z2} + +edge e111 v111 v112 +edge e112 v112 v113 +edge e113 v113 v114 +edge e114 v114 v111 + +wire w111 e111 e112 e113 e114 + +# bottom triangle +vertex v101 0 0 -${z1} +vertex v102 5 5 -${z1} +vertex v103 0 10 -${z1} + +edge e101 v101 v102 +edge e102 v102 v103 +edge e103 v103 v101 + +wire w101 e101 e102 e103 + +setflags v4 locked +setflags w1 locked +setflags w11 locked +setflags w21 locked +setflags w111 locked +setflags w101 locked +setflags v5 locked + + +# +set issolid 1 +set isruled 1 +thrusections result ${issolid} ${isruled} v4 w1 w11 w21 w111 w101 v5 -safe + + +checkprops result -s 12301.8 + + +checknbshapes result -vertex 57 -edge 121 -wire 66 -face 66 -shell 1 -solid 1 -compsolid 0 -compound 0 -shape 312 + + +set index [lsearch [whatis result] Closed] +if {$index == -1} { + puts "Faulty ${BugNumber} : result is not Closed shape" + +} + + diff --git a/tests/thrusection/specific_locked/F2 b/tests/thrusection/specific_locked/F2 new file mode 100644 index 0000000000..7319643954 --- /dev/null +++ b/tests/thrusection/specific_locked/F2 @@ -0,0 +1,156 @@ +puts "TODO OCC7166 ALL: Error : The area of result shape is" + +puts "============" +puts "OCC7166" +puts "============" +puts "" +####################################################################### +# Improvement of API of ThruSection +####################################################################### + +set BugNumber OCC7166 + +# +# +# +# +# +# v22 v21 +# *----------------------* +# / \ +# / \ +# / v12 v11 \ +# / *---------------------* \ +# / | | \ +# / | | \ +# * v23 | * v3 | v28 * +# | | | \ | | +# | | | \ | | +# | | | \ | | +# | | | \ | | +# | | | /* v2 | | +# | | | / | | +# | | | / | | * v4, v5 +# | | | / | | +# | | * | | +# | | v1 | | +# | | | | +# | | | | +# * v24 | | v27 * +# \ | | / +# \ *---------------------* / +# \ v13 v14 / +# \ / +# \ / +# \ v25 v26 / +# *----------------------* +# +# +# + +set z1 40 +set z2 20 +set z3 0 +set z4 100 + +# begining vertex +vertex v4 2.5 5 ${z4} +# ending vertex +vertex v5 2.5 5 -${z4} + +# top triangle +vertex v1 0 0 ${z1} +vertex v2 5 5 ${z1} +vertex v3 0 10 ${z1} + +edge e1 v1 v2 +edge e2 v2 v3 +edge e3 v3 v1 + +wire w1 e1 e2 e3 + +# top quadrangle +vertex v11 15 15 ${z2} +vertex v12 -15 15 ${z2} +vertex v13 -15 -15 ${z2} +vertex v14 15 -15 ${z2} + +edge e11 v11 v12 +edge e12 v12 v13 +edge e13 v13 v14 +edge e14 v14 v11 + +wire w11 e11 e12 e13 e14 + +# top octagon +vertex v21 25 25 ${z3} +vertex v22 -25 25 ${z3} +vertex v23 -30 10 ${z3} +vertex v24 -30 -10 ${z3} +vertex v25 -25 -25 ${z3} +vertex v26 25 -25 ${z3} +vertex v27 30 -10 ${z3} +vertex v28 30 10 ${z3} + +edge e21 v21 v22 +edge e22 v22 v23 +edge e23 v23 v24 +edge e24 v24 v25 +edge e25 v25 v26 +edge e26 v26 v27 +edge e27 v27 v28 +edge e28 v28 v21 + +wire w21 e21 e22 e23 e24 e25 e26 e27 e28 + +# bottom quadrangle +vertex v111 15 15 -${z2} +vertex v112 -15 15 -${z2} +vertex v113 -15 -15 -${z2} +vertex v114 15 -15 -${z2} + +edge e111 v111 v112 +edge e112 v112 v113 +edge e113 v113 v114 +edge e114 v114 v111 + +wire w111 e111 e112 e113 e114 + +# bottom triangle +vertex v101 0 0 -${z1} +vertex v102 5 5 -${z1} +vertex v103 0 10 -${z1} + +edge e101 v101 v102 +edge e102 v102 v103 +edge e103 v103 v101 + +wire w101 e101 e102 e103 + +setflags v4 locked +setflags w1 locked +setflags w11 locked +setflags w21 locked +setflags w111 locked +setflags w101 locked +setflags v5 locked + + +# +set issolid 0 +set isruled 0 +thrusections result ${issolid} ${isruled} v4 w1 w11 w21 w111 w101 v5 -safe + + +checkprops result -s 37693.9 + +checknbshapes result -vertex 2 -edge 33 -wire 11 -face 11 -shell 1 -solid 0 -compsolid 0 -compound 0 -shape 58 + + +set index [lsearch [whatis result] Closed] +if {$index == -1} { + puts "Faulty ${BugNumber} : result is not Closed shape" + +} + + diff --git a/tests/thrusection/specific_locked/F3 b/tests/thrusection/specific_locked/F3 new file mode 100644 index 0000000000..0008b0cfba --- /dev/null +++ b/tests/thrusection/specific_locked/F3 @@ -0,0 +1,157 @@ +puts "TODO OCC7166 ALL: Error : The area of result shape is" + +puts "============" +puts "OCC7166" +puts "============" +puts "" +####################################################################### +# Improvement of API of ThruSection +####################################################################### + +set BugNumber OCC7166 + +# +# +# +# +# +# v22 v21 +# *----------------------* +# / \ +# / \ +# / v12 v11 \ +# / *---------------------* \ +# / | | \ +# / | | \ +# * v23 | * v3 | v28 * +# | | | \ | | +# | | | \ | | +# | | | \ | | +# | | | \ | | +# | | | /* v2 | | +# | | | / | | +# | | | / | | * v4, v5 +# | | | / | | +# | | * | | +# | | v1 | | +# | | | | +# | | | | +# * v24 | | v27 * +# \ | | / +# \ *---------------------* / +# \ v13 v14 / +# \ / +# \ / +# \ v25 v26 / +# *----------------------* +# +# +# + +set z1 40 +set z2 20 +set z3 0 +set z4 100 + +# begining vertex +vertex v4 2.5 5 ${z4} +# ending vertex +vertex v5 2.5 5 -${z4} + +# top triangle +vertex v1 0 0 ${z1} +vertex v2 5 5 ${z1} +vertex v3 0 10 ${z1} + +edge e1 v1 v2 +edge e2 v2 v3 +edge e3 v3 v1 + +wire w1 e1 e2 e3 + +# top quadrangle +vertex v11 15 15 ${z2} +vertex v12 -15 15 ${z2} +vertex v13 -15 -15 ${z2} +vertex v14 15 -15 ${z2} + +edge e11 v11 v12 +edge e12 v12 v13 +edge e13 v13 v14 +edge e14 v14 v11 + +wire w11 e11 e12 e13 e14 + +# top octagon +vertex v21 25 25 ${z3} +vertex v22 -25 25 ${z3} +vertex v23 -30 10 ${z3} +vertex v24 -30 -10 ${z3} +vertex v25 -25 -25 ${z3} +vertex v26 25 -25 ${z3} +vertex v27 30 -10 ${z3} +vertex v28 30 10 ${z3} + +edge e21 v21 v22 +edge e22 v22 v23 +edge e23 v23 v24 +edge e24 v24 v25 +edge e25 v25 v26 +edge e26 v26 v27 +edge e27 v27 v28 +edge e28 v28 v21 + +wire w21 e21 e22 e23 e24 e25 e26 e27 e28 + +# bottom quadrangle +vertex v111 15 15 -${z2} +vertex v112 -15 15 -${z2} +vertex v113 -15 -15 -${z2} +vertex v114 15 -15 -${z2} + +edge e111 v111 v112 +edge e112 v112 v113 +edge e113 v113 v114 +edge e114 v114 v111 + +wire w111 e111 e112 e113 e114 + +# bottom triangle +vertex v101 0 0 -${z1} +vertex v102 5 5 -${z1} +vertex v103 0 10 -${z1} + +edge e101 v101 v102 +edge e102 v102 v103 +edge e103 v103 v101 + +wire w101 e101 e102 e103 + +setflags v4 locked +setflags w1 locked +setflags w11 locked +setflags w21 locked +setflags w111 locked +setflags w101 locked +setflags v5 locked + + +# +set issolid 1 +set isruled 0 +thrusections result ${issolid} ${isruled} v4 w1 w11 w21 w111 w101 v5 -safe + + +checkprops result -s 37693.9 + + +checknbshapes result -vertex 2 -edge 33 -wire 11 -face 11 -shell 1 -solid 1 -compsolid 0 -compound 0 -shape 59 + + +set index [lsearch [whatis result] Closed] +if {$index == -1} { + puts "Faulty ${BugNumber} : result is not Closed shape" + +} + + diff --git a/tests/thrusection/specific_locked/F5 b/tests/thrusection/specific_locked/F5 new file mode 100644 index 0000000000..cdf66fe9fe --- /dev/null +++ b/tests/thrusection/specific_locked/F5 @@ -0,0 +1,50 @@ +puts "TODO OCC7166 ALL: Error : is WRONG because number of " + +puts "============" +puts "OCC7166" +puts "============" +puts "" +####################################################################### +# Improvement of API of ThruSection +####################################################################### + +set BugNumber OCC7166 + +pbsplinecurve pbc1 3 9 0 1 1 1 2 1 3 1 4 1 5 1 6 1 7 1 8 1 -1 0 0 1 -2 2 0 1 0 1 0 1 2 2 0 1 1 0 0 1 2 -2 0 1 0 -1 0 1 -2 -2 0 1 +mkedge e1 pbc1 +wire w1 e1 + +#vertex v1 0 0 20 +#vertex v2 0 0 -20 +circle c1 0 0 20 0 0 -1 -1 1 0 0.1 +mkedge ec1 c1 +wire wc1 ec1 + +circle c2 0 0 -20 0 0 -1 -1 1 0 0.1 +mkedge ec2 c2 +wire wc2 ec2 + +set issolid 1 +set isruled 1 + +setflags wc1 locked +setflags w1 locked +setflags wc2 locked + +#catch {thrusections result ${issolid} ${isruled} v1 w1 v2} +catch {thrusections result ${issolid} ${isruled} wc1 w1 wc2 -safe} + + +checkprops result -s 256.875 + + +checknbshapes result -vertex 6 -edge 10 -wire 6 -face 6 -shell 1 -solid 1 -compsolid 0 -compound 0 -shape 30 + + +set index [lsearch [whatis result] Closed] +if {$index == -1} { + puts "Faulty ${BugNumber} : result is not Closed shape" + +} + + diff --git a/tests/thrusection/specific_locked/F6 b/tests/thrusection/specific_locked/F6 new file mode 100644 index 0000000000..f9acb74d97 --- /dev/null +++ b/tests/thrusection/specific_locked/F6 @@ -0,0 +1,50 @@ +puts "TODO OCC7166 ALL: Faulty OCC7166 : result is not Closed shape" +puts "TODO OCC7166 ALL: Error : is WRONG because number of " + +puts "============" +puts "OCC7166" +puts "============" +puts "" +####################################################################### +# Improvement of API of ThruSection +####################################################################### + +set BugNumber OCC7166 + +pbsplinecurve pbc1 3 9 0 1 1 1 2 1 3 1 4 1 5 1 6 1 7 1 8 1 -1 0 0 1 -2 2 0 1 0 1 0 1 2 2 0 1 1 0 0 1 2 -2 0 1 0 -1 0 1 -2 -2 0 1 +mkedge e1 pbc1 +wire w1 e1 + +#vertex v1 0 0 20 +#vertex v2 0 0 -20 +circle c1 0 0 20 0 0 -1 -1 1 0 0.1 +mkedge ec1 c1 +wire wc1 ec1 + +circle c2 0 0 -20 0 0 -1 -1 1 0 0.1 +mkedge ec2 c2 +wire wc2 ec2 + +set issolid 0 +set isruled 0 + +setflags wc1 locked +setflags w1 locked +setflags wc2 locked + +#catch {thrusections result ${issolid} ${isruled} v1 w1 v2} +catch {thrusections result ${issolid} ${isruled} wc1 w1 wc2 -safe} + + +checkprops result -s 332.724 + +checknbshapes result -vertex 4 -edge 6 -wire 2 -face 2 -shell 1 -solid 0 -compsolid 0 -compound 0 -shape 15 + + +set index [lsearch [whatis result] Closed] +if {$index == -1} { + puts "Faulty ${BugNumber} : result is not Closed shape" + +} + + diff --git a/tests/thrusection/specific_locked/F7 b/tests/thrusection/specific_locked/F7 new file mode 100644 index 0000000000..f41a5824d3 --- /dev/null +++ b/tests/thrusection/specific_locked/F7 @@ -0,0 +1,51 @@ +puts "TODO OCC7166 ALL: Error : is WRONG because number of " +puts "TODO OCC7166 ALL: Error : The area of result shape is" + +puts "============" +puts "OCC7166" +puts "============" +puts "" +####################################################################### +# Improvement of API of ThruSection +####################################################################### + +set BugNumber OCC7166 + +pbsplinecurve pbc1 3 9 0 1 1 1 2 1 3 1 4 1 5 1 6 1 7 1 8 1 -1 0 0 1 -2 2 0 1 0 1 0 1 2 2 0 1 1 0 0 1 2 -2 0 1 0 -1 0 1 -2 -2 0 1 +mkedge e1 pbc1 +wire w1 e1 + +##vertex v1 0 0 20 +#vertex v2 0 0 -20 +circle c1 0 0 20 0 0 -1 -1 1 0 0.1 +mkedge ec1 c1 +wire wc1 ec1 + +circle c2 0 0 -20 0 0 -1 -1 1 0 0.1 +mkedge ec2 c2 +wire wc2 ec2 + +set issolid 1 +set isruled 0 + +setflags wc1 locked +setflags w1 locked +setflags wc2 locked + +#catch {thrusections result ${issolid} ${isruled} v1 w1 v2 } +catch {thrusections result ${issolid} ${isruled} wc1 w1 wc2 -safe} + + +checkprops result -s 314.974 + + +checknbshapes result -vertex 2 -edge 3 -wire 1 -face 1 -shell 1 -solid 1 -compsolid 0 -compound 0 -shape 9 + + +set index [lsearch [whatis result] Closed] +if {$index == -1} { + puts "Faulty ${BugNumber} : result is not Closed shape" + +} + + diff --git a/tests/thrusection/specific_locked/F9 b/tests/thrusection/specific_locked/F9 new file mode 100644 index 0000000000..ae4da3d21f --- /dev/null +++ b/tests/thrusection/specific_locked/F9 @@ -0,0 +1,51 @@ +puts "TODO OCC7166 ALL: Error : is WRONG because number of " + +puts "============" +puts "OCC7166" +puts "============" +puts "" +####################################################################### +# Improvement of API of ThruSection +####################################################################### + +set BugNumber OCC7166 + +pbsplinecurve pbc1 3 9 0 1 1 1 2 1 3 1 4 1 5 1 6 1 7 1 8 1 -1 0 0 1 -2 2 0 1 0 1 0 1 2 2 0 1 1 0 0 1 2 -2 0 1 0 -1 0 1 -2 -2 0 1 +mkedge e1 pbc1 +wire w1 e1 + +#vertex v1 40 0 20 +#vertex v2 40 0 -20 +circle c1 40 0 20 0 0 -1 -1 1 0 0.1 +mkedge ec1 c1 +wire wc1 ec1 + +circle c2 40 0 -20 0 0 -1 -1 1 0 0.1 +mkedge ec2 c2 +wire wc2 ec2 + +set issolid 1 +set isruled 1 + +setflags wc1 locked +setflags w1 locked +setflags wc2 locked + + +#catch {thrusections result ${issolid} ${isruled} v1 w1 v2} +catch {thrusections result ${issolid} ${isruled} wc1 w1 wc2 -safe} + + +checkprops result -s 419.166 + + +checknbshapes result -vertex 6 -edge 10 -wire 6 -face 6 -shell 1 -solid 1 -compsolid 0 -compound 0 -shape 30 + + +set index [lsearch [whatis result] Closed] +if {$index == -1} { + puts "Faulty ${BugNumber} : result is not Closed shape" + +} + + diff --git a/tests/thrusection/specific_locked/G1 b/tests/thrusection/specific_locked/G1 new file mode 100644 index 0000000000..e384592adb --- /dev/null +++ b/tests/thrusection/specific_locked/G1 @@ -0,0 +1,51 @@ +puts "TODO OCC7166 ALL: Faulty OCC7166 : result is not Closed shape" +puts "TODO OCC7166 ALL: Error : is WRONG because number of " +puts "TODO OCC7166 ALL: Error : The area of result shape is" + +puts "============" +puts "OCC7166" +puts "============" +puts "" +####################################################################### +# Improvement of API of ThruSection +####################################################################### + +set BugNumber OCC7166 + +pbsplinecurve pbc1 3 9 0 1 1 1 2 1 3 1 4 1 5 1 6 1 7 1 8 1 -1 0 0 1 -2 2 0 1 0 1 0 1 2 2 0 1 1 0 0 1 2 -2 0 1 0 -1 0 1 -2 -2 0 1 +mkedge e1 pbc1 +wire w1 e1 + +#vertex v1 40 0 20 +#vertex v2 40 0 -20 +circle c1 40 0 20 0 0 -1 -1 1 0 0.1 +mkedge ec1 c1 +wire wc1 ec1 + +circle c2 40 0 -20 0 0 -1 -1 1 0 0.1 +mkedge ec2 c2 +wire wc2 ec2 + +set issolid 0 +set isruled 0 + +setflags wc1 locked +setflags w1 locked +setflags wc2 locked + +#catch {thrusections result ${issolid} ${isruled} v1 w1 v2} +catch {thrusections result ${issolid} ${isruled} wc1 w1 wc2 -safe} + + +checkprops result -s 702.858 + +checknbshapes result -vertex 4 -edge 6 -wire 2 -face 2 -shell 1 -solid 0 -compsolid 0 -compound 0 -shape 15 + + +set index [lsearch [whatis result] Closed] +if {$index == -1} { + puts "Faulty ${BugNumber} : result is not Closed shape" + +} + + diff --git a/tests/thrusection/specific_locked/G2 b/tests/thrusection/specific_locked/G2 new file mode 100644 index 0000000000..3f6bac6866 --- /dev/null +++ b/tests/thrusection/specific_locked/G2 @@ -0,0 +1,51 @@ +puts "TODO OCC7166 ALL: Error : is WRONG because number of " +puts "TODO OCC7166 ALL: Error : The area of result shape is" + +puts "============" +puts "OCC7166" +puts "============" +puts "" +####################################################################### +# Improvement of API of ThruSection +####################################################################### + +set BugNumber OCC7166 + +pbsplinecurve pbc1 3 9 0 1 1 1 2 1 3 1 4 1 5 1 6 1 7 1 8 1 -1 0 0 1 -2 2 0 1 0 1 0 1 2 2 0 1 1 0 0 1 2 -2 0 1 0 -1 0 1 -2 -2 0 1 +mkedge e1 pbc1 +wire w1 e1 + +#vertex v1 40 0 20 +#vertex v2 40 0 -20 +circle c1 40 0 20 0 0 -1 -1 1 0 0.1 +mkedge ec1 c1 +wire wc1 ec1 + +circle c2 40 0 -20 0 0 -1 -1 1 0 0.1 +mkedge ec2 c2 +wire wc2 ec2 + +set issolid 1 +set isruled 0 + +setflags wc1 locked +setflags w1 locked +setflags wc2 locked + +#catch {thrusections result ${issolid} ${isruled} v1 w1 v2 } +catch {thrusections result ${issolid} ${isruled} wc1 w1 wc2 -safe} + + +checkprops result -s 702.921 + + +checknbshapes result -vertex 4 -edge 6 -wire 4 -face 4 -shell 1 -solid 1 -compsolid 0 -compound 0 -shape 20 + + +set index [lsearch [whatis result] Closed] +if {$index == -1} { + puts "Faulty ${BugNumber} : result is not Closed shape" + +} + + diff --git a/tests/thrusection/specific_locked/G4 b/tests/thrusection/specific_locked/G4 new file mode 100644 index 0000000000..bf823e5460 --- /dev/null +++ b/tests/thrusection/specific_locked/G4 @@ -0,0 +1,183 @@ +puts "TODO OCC7166 ALL: Error : is WRONG because number of " + +puts "============" +puts "OCC7166" +puts "============" +puts "" +####################################################################### +# Improvement of API of ThruSection +####################################################################### + +set BugNumber OCC7166 + +# +# +# +# +# +# v22 v21 +# *----------------------* +# / \ +# / \ +# / v12 v11 \ +# / *---------------------* \ +# / | | \ +# / | | \ +# * v23 | * v3 | v28 * +# | | | \ | | +# | | | \ | | +# | | | \ | | +# | | | \ | | +# | | | /* v2 | | +# | | | / | | +# | | | / | | * v4, v5 +# | | | / | | +# | | * | | +# | | v1 | | +# | | | | +# | | | | +# * v24 | | v27 * +# \ | | / +# \ *---------------------* / +# \ v13 v14 / +# \ / +# \ / +# \ v25 v26 / +# *----------------------* +# +# +# + +set z1 40 +set z2 20 +set z3 0 +set z4 100 +set z5 30 +set z6 10 + +# begining vertex +vertex v4 55 2.5 ${z4} +# ending vertex +vertex v5 55 2.5 -${z4} + +# top triangle +vertex v1 0 0 ${z1} +vertex v2 5 5 ${z1} +vertex v3 0 10 ${z1} + +edge e1 v1 v2 +edge e2 v2 v3 +edge e3 v3 v1 + +wire w1 e1 e2 e3 + +# top beziercurve +beziercurve bzc1 5 5 5 ${z5} 5 -5 ${z5} -5 -5 ${z5} -5 5 ${z5} 5 5 ${z5} +mkedge ebzc1 bzc1 +wire wbzc1 ebzc1 + +# top quadrangle +vertex v11 15 15 ${z2} +vertex v12 -15 15 ${z2} +vertex v13 -15 -15 ${z2} +vertex v14 15 -15 ${z2} + +edge e11 v11 v12 +edge e12 v12 v13 +edge e13 v13 v14 +edge e14 v14 v11 + +wire w11 e11 e12 e13 e14 + +# top pbsplinecurve +pbsplinecurve pbc1 3 9 0 1 1 1 2 1 3 1 4 1 5 1 6 1 7 1 8 1 -1 0 ${z6} 1 -2 2 ${z6} 1 0 1 ${z6} 1 2 2 ${z6} 1 1 0 ${z6} 1 2 -2 ${z6} 1 0 -1 ${z6} 1 -2 -2 ${z6} 1 +mkedge epbc1 pbc1 +wire wpbc1 epbc1 + +# octagon +vertex v21 25 25 ${z3} +vertex v22 -25 25 ${z3} +vertex v23 -30 10 ${z3} +vertex v24 -30 -10 ${z3} +vertex v25 -25 -25 ${z3} +vertex v26 25 -25 ${z3} +vertex v27 30 -10 ${z3} +vertex v28 30 10 ${z3} + +edge e21 v21 v22 +edge e22 v22 v23 +edge e23 v23 v24 +edge e24 v24 v25 +edge e25 v25 v26 +edge e26 v26 v27 +edge e27 v27 v28 +edge e28 v28 v21 + +wire w21 e21 e22 e23 e24 e25 e26 e27 e28 + +# bottom pbsplinecurve +pbsplinecurve pbc2 3 9 0 1 1 1 2 1 3 1 4 1 5 1 6 1 7 1 8 1 -1 0 -${z6} 1 -2 2 -${z6} 1 0 1 -${z6} 1 2 2 -${z6} 1 1 0 -${z6} 1 2 -2 -${z6} 1 0 -1 -${z6} 1 -2 -2 -${z6} 1 +mkedge epbc2 pbc2 +wire wpbc2 epbc2 + +# bottom quadrangle +vertex v111 15 15 -${z2} +vertex v112 -15 15 -${z2} +vertex v113 -15 -15 -${z2} +vertex v114 15 -15 -${z2} + +edge e111 v111 v112 +edge e112 v112 v113 +edge e113 v113 v114 +edge e114 v114 v111 + +wire w111 e111 e112 e113 e114 + +# bottom beziercurve +beziercurve bzc2 5 5 5 -${z5} 5 -5 -${z5} -5 -5 -${z5} -5 5 -${z5} 5 5 -${z5} +mkedge ebzc2 bzc2 +wire wbzc2 ebzc2 + +# bottom triangle +vertex v101 0 0 -${z1} +vertex v102 5 5 -${z1} +vertex v103 0 10 -${z1} + +edge e101 v101 v102 +edge e102 v102 v103 +edge e103 v103 v101 + +wire w101 e101 e102 e103 + +setflags v4 locked +setflags w1 locked +setflags wbzc1 locked +setflags w11 locked +setflags wpbc1 locked +setflags wpbc2 locked +setflags w111 locked +setflags wbzc2 locked +setflags w101 locked +setflags v5 locked +setflags w21 locked + +# +set issolid 1 +set isruled 1 +#thrusections result ${issolid} ${isruled} v4 w1 w11 w21 w111 w101 v5 +thrusections result ${issolid} ${isruled} v4 w1 wbzc1 w11 wpbc1 w21 wpbc2 w111 wbzc2 w101 v5 -safe + + +checkprops result -s 12786.5 + + +checknbshapes result -vertex 101 -edge 209 -wire 110 -face 110 -shell 1 -solid 2 -compsolid 0 -compound 0 -shape 532 + + +set index [lsearch [whatis result] Closed] +if {$index == -1} { + puts "Faulty ${BugNumber} : result is not Closed shape" + +} + + diff --git a/tests/thrusection/specific_locked/G6 b/tests/thrusection/specific_locked/G6 new file mode 100644 index 0000000000..ea646acc36 --- /dev/null +++ b/tests/thrusection/specific_locked/G6 @@ -0,0 +1,181 @@ +puts "============" +puts "OCC7166" +puts "============" +puts "" +####################################################################### +# Improvement of API of ThruSection +####################################################################### + +set BugNumber OCC7166 + +# +# +# +# +# +# v22 v21 +# *----------------------* +# / \ +# / \ +# / v12 v11 \ +# / *---------------------* \ +# / | | \ +# / | | \ +# * v23 | * v3 | v28 * +# | | | \ | | +# | | | \ | | +# | | | \ | | +# | | | \ | | +# | | | /* v2 | | +# | | | / | | +# | | | / | | * v4, v5 +# | | | / | | +# | | * | | +# | | v1 | | +# | | | | +# | | | | +# * v24 | | v27 * +# \ | | / +# \ *---------------------* / +# \ v13 v14 / +# \ / +# \ / +# \ v25 v26 / +# *----------------------* +# +# +# + +set z1 40 +set z2 20 +set z3 0 +set z4 100 +set z5 30 +set z6 10 + +# begining vertex +vertex v4 2.5 5 ${z4} +# ending vertex +vertex v5 2.5 5 -${z4} + +# top triangle +vertex v1 0 0 ${z1} +vertex v2 5 5 ${z1} +vertex v3 0 10 ${z1} + +edge e1 v1 v2 +edge e2 v2 v3 +edge e3 v3 v1 + +wire w1 e1 e2 e3 + +# top beziercurve +beziercurve bzc1 5 5 5 ${z5} 5 -5 ${z5} -5 -5 ${z5} -5 5 ${z5} 5 5 ${z5} +mkedge ebzc1 bzc1 +wire wbzc1 ebzc1 + +# top quadrangle +vertex v11 15 15 ${z2} +vertex v12 -15 15 ${z2} +vertex v13 -15 -15 ${z2} +vertex v14 15 -15 ${z2} + +edge e11 v11 v12 +edge e12 v12 v13 +edge e13 v13 v14 +edge e14 v14 v11 + +wire w11 e11 e12 e13 e14 + +# top pbsplinecurve +pbsplinecurve pbc1 3 9 0 1 1 1 2 1 3 1 4 1 5 1 6 1 7 1 8 1 -1 0 ${z6} 1 -2 2 ${z6} 1 0 1 ${z6} 1 2 2 ${z6} 1 1 0 ${z6} 1 2 -2 ${z6} 1 0 -1 ${z6} 1 -2 -2 ${z6} 1 +mkedge epbc1 pbc1 +wire wpbc1 epbc1 + +# octagon +vertex v21 25 25 ${z3} +vertex v22 -25 25 ${z3} +vertex v23 -30 10 ${z3} +vertex v24 -30 -10 ${z3} +vertex v25 -25 -25 ${z3} +vertex v26 25 -25 ${z3} +vertex v27 30 -10 ${z3} +vertex v28 30 10 ${z3} + +edge e21 v21 v22 +edge e22 v22 v23 +edge e23 v23 v24 +edge e24 v24 v25 +edge e25 v25 v26 +edge e26 v26 v27 +edge e27 v27 v28 +edge e28 v28 v21 + +wire w21 e21 e22 e23 e24 e25 e26 e27 e28 + +# bottom pbsplinecurve +pbsplinecurve pbc2 3 9 0 1 1 1 2 1 3 1 4 1 5 1 6 1 7 1 8 1 -1 0 -${z6} 1 -2 2 -${z6} 1 0 1 -${z6} 1 2 2 -${z6} 1 1 0 -${z6} 1 2 -2 -${z6} 1 0 -1 -${z6} 1 -2 -2 -${z6} 1 +mkedge epbc2 pbc2 +wire wpbc2 epbc2 + +# bottom quadrangle +vertex v111 15 15 -${z2} +vertex v112 -15 15 -${z2} +vertex v113 -15 -15 -${z2} +vertex v114 15 -15 -${z2} + +edge e111 v111 v112 +edge e112 v112 v113 +edge e113 v113 v114 +edge e114 v114 v111 + +wire w111 e111 e112 e113 e114 + +# bottom beziercurve +beziercurve bzc2 5 5 5 -${z5} 5 -5 -${z5} -5 -5 -${z5} -5 5 -${z5} 5 5 -${z5} +mkedge ebzc2 bzc2 +wire wbzc2 ebzc2 + +# bottom triangle +vertex v101 0 0 -${z1} +vertex v102 5 5 -${z1} +vertex v103 0 10 -${z1} + +edge e101 v101 v102 +edge e102 v102 v103 +edge e103 v103 v101 + +wire w101 e101 e102 e103 + +setflags v4 locked +setflags w1 locked +setflags wbzc1 locked +setflags w11 locked +setflags wpbc1 locked +setflags w21 locked +setflags wpbc2 locked +setflags w111 locked +setflags wbzc2 locked +setflags w101 locked +setflags v5 locked + +# +set issolid 1 +set isruled 1 +#thrusections result ${issolid} ${isruled} v4 w1 w11 w21 w111 w101 v5 +thrusections result ${issolid} ${isruled} v4 w1 wbzc1 w11 wpbc1 w21 wpbc2 w111 wbzc2 w101 v5 -safe + + +checkprops result -s 12436.8 + + +checknbshapes result -vertex 101 -edge 209 -wire 110 -face 110 -shell 1 -solid 1 -compsolid 0 -compound 0 -shape 532 + + +set index [lsearch [whatis result] Closed] +if {$index == -1} { + puts "Faulty ${BugNumber} : result is not Closed shape" + +} + + diff --git a/tests/thrusection/specific_locked/N5 b/tests/thrusection/specific_locked/N5 new file mode 100644 index 0000000000..64cf89dfaf --- /dev/null +++ b/tests/thrusection/specific_locked/N5 @@ -0,0 +1,24 @@ +puts "========" +puts "OCC28642" +puts "========" +puts "" +######################################### +# BRepOffsetAPI_ThruSections/BRepFill_Generator are modifying the input shape sections +######################################### + +#check "closed" thrusection (first profile is same as the last) +polyline p1 0 0 0 1 0 0 +polyline p2 2 1 0 2 2 0 +polyline p3 3 0 0 4 0 0 +polyline p4 2 -1 0 2 -2 0 + +setflags p1 locked +setflags p2 locked +setflags p3 locked +setflags p4 locked + +thrusections result 0 0 p1 p2 p3 p4 p1 -safe + +checkprops result -s 10.1587 +checknbshapes result -vertex 2 -edge 3 -wire 1 -face 1 -shell 1 -solid 0 -compsolid 0 -compound 0 -shape 8 + diff --git a/tests/thrusection/specific_locked/N6 b/tests/thrusection/specific_locked/N6 new file mode 100644 index 0000000000..9b32f14dfd --- /dev/null +++ b/tests/thrusection/specific_locked/N6 @@ -0,0 +1,24 @@ +puts "========" +puts "OCC28642" +puts "========" +puts "" +######################################### +# BRepOffsetAPI_ThruSections/BRepFill_Generator are modifying the input shape sections +######################################### + +#check "closed" thrusection (first profile is same as the last) +polyline p1 0 0 0 1 0 0 +polyline p2 2 1 0 2 2 0 +polyline p3 3 0 0 4 0 0 +polyline p4 2 -1 0 2 -2 0 + +setflags p1 locked +setflags p2 locked +setflags p3 locked +setflags p4 locked + +thrusections result 0 1 p1 p2 p3 p4 p1 -safe + +checkprops result -s 6 +checknbshapes result -vertex 8 -edge 12 -wire 4 -face 4 -shell 1 -solid 0 -compsolid 0 -compound 0 -shape 29 + From ddb9ed4810c4b409992d6e73107e4067ad7e0015 Mon Sep 17 00:00:00 2001 From: kgv Date: Sat, 15 Jan 2022 01:39:19 +0300 Subject: [PATCH 194/639] 0032779: Visualization, TKOpenGl - support using a wide color window buffer format (10bit per component / 30bit RGB) Added new flag OpenGl_Caps::buffersDeepColor disabled by default. OpenGl_Window now tries to find a RGB10_A2 pixel format using wglChoosePixelFormatARB(). OpenGl_TextureFormat::FindSizedFormat() - added handling of GL_RGB10_A2 internal format. OpenGl_View::SetWindow() now selects preferred FBO color format basing on parameters. OpenGl_Context::DiagnosticInformation()/OpenGl_View::DiagnosticInformation() now include information about window pixel format / FBO texture format. --- src/OpenGl/OpenGl_Caps.cxx | 2 + src/OpenGl/OpenGl_Caps.hxx | 19 +++ src/OpenGl/OpenGl_Context.cxx | 66 ++++++++++ src/OpenGl/OpenGl_Context.hxx | 8 ++ src/OpenGl/OpenGl_DepthPeeling.cxx | 10 +- src/OpenGl/OpenGl_FrameBuffer.cxx | 19 ++- src/OpenGl/OpenGl_FrameBuffer.hxx | 14 +- src/OpenGl/OpenGl_GraphicDriver.cxx | 67 ++++++---- src/OpenGl/OpenGl_ShadowMap.cxx | 2 +- src/OpenGl/OpenGl_TextureFormat.cxx | 10 ++ src/OpenGl/OpenGl_View.cxx | 62 ++++++--- src/OpenGl/OpenGl_Window.cxx | 15 ++- src/OpenGlTest/OpenGlTest_Commands.cxx | 175 ++++++++----------------- 13 files changed, 281 insertions(+), 188 deletions(-) diff --git a/src/OpenGl/OpenGl_Caps.cxx b/src/OpenGl/OpenGl_Caps.cxx index cc72994b89..140a767d00 100755 --- a/src/OpenGl/OpenGl_Caps.cxx +++ b/src/OpenGl/OpenGl_Caps.cxx @@ -34,6 +34,7 @@ OpenGl_Caps::OpenGl_Caps() useZeroToOneDepth (Standard_False), buffersNoSwap (Standard_False), buffersOpaqueAlpha(Standard_True), + buffersDeepColor (Standard_False), contextStereo (Standard_False), contextDebug (Standard_False), contextSyncDebug (Standard_False), @@ -73,6 +74,7 @@ OpenGl_Caps& OpenGl_Caps::operator= (const OpenGl_Caps& theCopy) useZeroToOneDepth = theCopy.useZeroToOneDepth; buffersNoSwap = theCopy.buffersNoSwap; buffersOpaqueAlpha= theCopy.buffersOpaqueAlpha; + buffersDeepColor = theCopy.buffersDeepColor; contextStereo = theCopy.contextStereo; contextDebug = theCopy.contextDebug; contextSyncDebug = theCopy.contextSyncDebug; diff --git a/src/OpenGl/OpenGl_Caps.hxx b/src/OpenGl/OpenGl_Caps.hxx index 67d0eba38f..5281e046da 100755 --- a/src/OpenGl/OpenGl_Caps.hxx +++ b/src/OpenGl/OpenGl_Caps.hxx @@ -60,6 +60,25 @@ public: //! @name context creation parameters */ Standard_Boolean buffersOpaqueAlpha; + /** + * Specify whether deep color format (10-bit per component / 30-bit RGB) should be used + * instead of standard color format (8-bit per component / 24-bit RGB) when available. + * Deep color provides higher accuracy within the same color range (sRGB) + * and doesn't enable wide color gamut / HDR support. + * Higher precision helps eliminating banding effect on smooth gradients. + * + * Effect of the flag will vary depending on platform: + * - used as a hint on systems with 24-bit RGB color defined as preferred pixels format + * but with 30-bit RGB color being activated systemwide (e.g. Windows); + * - ignored on systems with deep color defined as preferred pixel format (e.g. Linux / X11), + * deep 30-bit RGB color will be used regardless of the flag value; + * - ignored on configurations not supporting deep color (incompatible display / system / GPU / driver), + * standard 24-bit RGB color will be used instead. + * + * OFF by default. + */ + Standard_Boolean buffersDeepColor; + /** * Request stereoscopic context (with Quad Buffer). This flag requires support in OpenGL driver. * diff --git a/src/OpenGl/OpenGl_Context.cxx b/src/OpenGl/OpenGl_Context.cxx index 4d2bac38b9..0f269886e9 100644 --- a/src/OpenGl/OpenGl_Context.cxx +++ b/src/OpenGl/OpenGl_Context.cxx @@ -243,7 +243,9 @@ OpenGl_Context::OpenGl_Context (const Handle(OpenGl_Caps)& theCaps) myColorMask (true), myAlphaToCoverage (false), myIsGlDebugCtx (false), + myIsWindowDeepColor (false), myIsSRgbWindow (false), + myIsSRgbActive (false), myResolution (Graphic3d_RenderingParams::THE_DEFAULT_RESOLUTION), myResolutionRatio (1.0f), myLineWidthScale (1.0f), @@ -1529,6 +1531,11 @@ void OpenGl_Context::init (const Standard_Boolean theIsCoreProfile) } } + Graphic3d_Vec4i aWinBitsRGBA; + Graphic3d_Vec2i aWinBitsDepthStencil; + WindowBufferBits (aWinBitsRGBA, aWinBitsDepthStencil); + myIsWindowDeepColor = aWinBitsRGBA.r() >= 10; + // standard formats mySupportedFormats->Add (Image_Format_Gray); mySupportedFormats->Add (Image_Format_Alpha); @@ -1813,6 +1820,58 @@ void OpenGl_Context::MemoryInfo (TColStd_IndexedDataMapOfStringString& theDict) #endif } +// ======================================================================= +// function : WindowBufferBits +// purpose : +// ======================================================================= +void OpenGl_Context::WindowBufferBits (Graphic3d_Vec4i& theColorBits, + Graphic3d_Vec2i& theDepthStencilBits) const +{ + if (core11ffp != NULL + || myGapi == Aspect_GraphicsLibrary_OpenGLES) + { + // removed from core with no working alternative + core11fwd->glGetIntegerv (GL_RED_BITS, &theColorBits.r()); + core11fwd->glGetIntegerv (GL_GREEN_BITS, &theColorBits.g()); + core11fwd->glGetIntegerv (GL_BLUE_BITS, &theColorBits.b()); + core11fwd->glGetIntegerv (GL_ALPHA_BITS, &theColorBits.a()); + core11fwd->glGetIntegerv (GL_DEPTH_BITS, &theDepthStencilBits[0]); + core11fwd->glGetIntegerv (GL_STENCIL_BITS, &theDepthStencilBits[1]); + } + else + { + #if defined(HAVE_EGL) + // + #elif defined(_WIN32) + const int aPixFrmtIndex = GetPixelFormat ((HDC )myDisplay); + PIXELFORMATDESCRIPTOR aFormat; + memset (&aFormat, 0, sizeof(aFormat)); + aFormat.nSize = sizeof(aFormat); + DescribePixelFormat ((HDC )myDisplay, aPixFrmtIndex, sizeof(PIXELFORMATDESCRIPTOR), &aFormat); + theColorBits.SetValues (aFormat.cRedBits, aFormat.cGreenBits, aFormat.cBlueBits, aFormat.cAlphaBits); + theDepthStencilBits.SetValues (aFormat.cDepthBits, aFormat.cStencilBits); + #elif defined(HAVE_XLIB) + Display* aDisplay = (Display* )myDisplay; + XWindowAttributes aWinAttribs; + XGetWindowAttributes (aDisplay, (::Window )myWindow, &aWinAttribs); + XVisualInfo aVisInfo; + aVisInfo.visualid = aWinAttribs.visual->visualid; + aVisInfo.screen = DefaultScreen(aDisplay); + int aNbItems = 0; + std::unique_ptr aVis (XGetVisualInfo (aDisplay, VisualIDMask | VisualScreenMask, &aVisInfo, &aNbItems), &XFree); + if (aVis.get() != NULL) + { + glXGetConfig (aDisplay, aVis.get(), GLX_RED_SIZE, &theColorBits.r()); + glXGetConfig (aDisplay, aVis.get(), GLX_GREEN_SIZE, &theColorBits.g()); + glXGetConfig (aDisplay, aVis.get(), GLX_BLUE_SIZE, &theColorBits.b()); + glXGetConfig (aDisplay, aVis.get(), GLX_ALPHA_SIZE, &theColorBits.a()); + glXGetConfig (aDisplay, aVis.get(), GLX_DEPTH_SIZE, &theDepthStencilBits[0]); + glXGetConfig (aDisplay, aVis.get(), GLX_STENCIL_SIZE, &theDepthStencilBits[1]); + } + #endif + } +} + // ======================================================================= // function : DiagnosticInfo // purpose : @@ -1909,6 +1968,13 @@ void OpenGl_Context::DiagnosticInformation (TColStd_IndexedDataMapOfStringString GLint aViewport[4] = {}; core11fwd->glGetIntegerv (GL_VIEWPORT, aViewport); addInfo (theDict, "Viewport", TCollection_AsciiString() + aViewport[2] + "x" + aViewport[3]); + + Graphic3d_Vec4i aWinBitsRGBA; + Graphic3d_Vec2i aWinBitsDepthStencil; + WindowBufferBits (aWinBitsRGBA, aWinBitsDepthStencil); + addInfo (theDict, "Window buffer", + TCollection_AsciiString() + "RGB" + aWinBitsRGBA.r() + " ALPHA" + aWinBitsRGBA.a() + + " DEPTH" + aWinBitsDepthStencil[0] + " STENCIL" + aWinBitsDepthStencil[1]); } if ((theFlags & Graphic3d_DiagnosticInfo_Memory) != 0) diff --git a/src/OpenGl/OpenGl_Context.hxx b/src/OpenGl/OpenGl_Context.hxx index c7b4093305..b49f9cfcba 100644 --- a/src/OpenGl/OpenGl_Context.hxx +++ b/src/OpenGl/OpenGl_Context.hxx @@ -398,6 +398,10 @@ public: Standard_EXPORT void DiagnosticInformation (TColStd_IndexedDataMapOfStringString& theDict, Graphic3d_DiagnosticInfo theFlags) const; + //! Fetches information about window buffer pixel format. + Standard_EXPORT void WindowBufferBits (Graphic3d_Vec4i& theColorBits, + Graphic3d_Vec2i& theDepthStencilBits) const; + //! Access shared resource by its name. //! @param theKey - unique identifier; //! @return handle to shared resource or NULL. @@ -565,6 +569,9 @@ public: //! Overrides if window/surface buffer is sRGB-ready or not (initialized with the context). void SetWindowSRGB (bool theIsSRgb) { myIsSRgbWindow = theIsSRgb; } + //! Returns TRUE if window/surface buffer has deep color (10bit per component / 30bit RGB) or better precision. + bool IsWindowDeepColor() const { return myIsWindowDeepColor; } + //! Convert Quantity_ColorRGBA into vec4 //! with conversion or no conversion into non-linear sRGB //! basing on ToRenderSRGB() flag. @@ -1165,6 +1172,7 @@ private: //! @name fields tracking current state Standard_Boolean myAllowAlphaToCov; //!< flag allowing GL_SAMPLE_ALPHA_TO_COVERAGE usage Standard_Boolean myAlphaToCoverage; //!< flag indicating GL_SAMPLE_ALPHA_TO_COVERAGE state Standard_Boolean myIsGlDebugCtx; //!< debug context initialization state + Standard_Boolean myIsWindowDeepColor; //!< indicates that window buffer is has deep color pixel format Standard_Boolean myIsSRgbWindow; //!< indicates that window buffer is sRGB-ready Standard_Boolean myIsSRgbActive; //!< flag indicating GL_FRAMEBUFFER_SRGB state TCollection_AsciiString myVendor; //!< Graphics Driver's vendor diff --git a/src/OpenGl/OpenGl_DepthPeeling.cxx b/src/OpenGl/OpenGl_DepthPeeling.cxx index f89caa2976..b105a10af0 100644 --- a/src/OpenGl/OpenGl_DepthPeeling.cxx +++ b/src/OpenGl/OpenGl_DepthPeeling.cxx @@ -27,11 +27,11 @@ IMPLEMENT_STANDARD_RTTIEXT(OpenGl_DepthPeeling, OpenGl_NamedResource) OpenGl_DepthPeeling::OpenGl_DepthPeeling() : OpenGl_NamedResource ("depth_peeling") { - myDepthPeelFbosOit[0] = new OpenGl_FrameBuffer(); - myDepthPeelFbosOit[1] = new OpenGl_FrameBuffer(); - myFrontBackColorFbosOit[0] = new OpenGl_FrameBuffer(); - myFrontBackColorFbosOit[1] = new OpenGl_FrameBuffer(); - myBlendBackFboOit = new OpenGl_FrameBuffer(); + myDepthPeelFbosOit[0] = new OpenGl_FrameBuffer (myResourceId + ":fbo0"); + myDepthPeelFbosOit[1] = new OpenGl_FrameBuffer (myResourceId + ":fbo1"); + myFrontBackColorFbosOit[0] = new OpenGl_FrameBuffer (myResourceId + ":fbo0_color"); + myFrontBackColorFbosOit[1] = new OpenGl_FrameBuffer (myResourceId + ":fbo1_color"); + myBlendBackFboOit = new OpenGl_FrameBuffer (myResourceId + ":fbo_blend"); } // ======================================================================= diff --git a/src/OpenGl/OpenGl_FrameBuffer.cxx b/src/OpenGl/OpenGl_FrameBuffer.cxx index f7a4d95a7d..2d7d0328cb 100644 --- a/src/OpenGl/OpenGl_FrameBuffer.cxx +++ b/src/OpenGl/OpenGl_FrameBuffer.cxx @@ -22,7 +22,7 @@ #include #include -IMPLEMENT_STANDARD_RTTIEXT(OpenGl_FrameBuffer,OpenGl_Resource) +IMPLEMENT_STANDARD_RTTIEXT(OpenGl_FrameBuffer, OpenGl_NamedResource) namespace { @@ -66,8 +66,9 @@ namespace // function : OpenGl_FrameBuffer // purpose : // ======================================================================= -OpenGl_FrameBuffer::OpenGl_FrameBuffer() -: myInitVPSizeX (0), +OpenGl_FrameBuffer::OpenGl_FrameBuffer (const TCollection_AsciiString& theResourceId) +: OpenGl_NamedResource (theResourceId), + myInitVPSizeX (0), myInitVPSizeY (0), myVPSizeX (0), myVPSizeY (0), @@ -79,10 +80,10 @@ OpenGl_FrameBuffer::OpenGl_FrameBuffer() myIsOwnBuffer (false), myIsOwnColor (false), myIsOwnDepth (false), - myDepthStencilTexture (new OpenGl_Texture()) + myDepthStencilTexture (new OpenGl_Texture (theResourceId + ":depth_stencil")) { myColorFormats.Append (GL_RGBA8); - myColorTextures.Append (new OpenGl_Texture()); + myColorTextures.Append (new OpenGl_Texture (theResourceId + ":color")); } // ======================================================================= @@ -221,7 +222,9 @@ Standard_Boolean OpenGl_FrameBuffer::Init (const Handle(OpenGl_Context)& theGlCo } for (Standard_Integer aLength = 0; aLength < myColorFormats.Length(); ++aLength) { - myColorTextures.Append (aLength < aTextures.Length() ? aTextures.Value (aLength) : new OpenGl_Texture()); + myColorTextures.Append (aLength < aTextures.Length() + ? aTextures.Value (aLength) + : new OpenGl_Texture (myResourceId + ":color" + aLength)); } myDepthFormat = theDepthStencilTexture->GetFormat(); @@ -343,7 +346,9 @@ Standard_Boolean OpenGl_FrameBuffer::Init (const Handle(OpenGl_Context)& theGlCo } for (Standard_Integer aLength = 0; aLength < myColorFormats.Length(); ++aLength) { - myColorTextures.Append (aLength < aTextures.Length() ? aTextures.Value (aLength) : new OpenGl_Texture()); + myColorTextures.Append (aLength < aTextures.Length() + ? aTextures.Value (aLength) + : new OpenGl_Texture (myResourceId + ":color" + aLength)); } myDepthFormat = theDepthFormat; diff --git a/src/OpenGl/OpenGl_FrameBuffer.hxx b/src/OpenGl/OpenGl_FrameBuffer.hxx index 3071c04cdc..d3955eca00 100644 --- a/src/OpenGl/OpenGl_FrameBuffer.hxx +++ b/src/OpenGl/OpenGl_FrameBuffer.hxx @@ -15,7 +15,7 @@ #ifndef OpenGl_FrameBuffer_HeaderFile #define OpenGl_FrameBuffer_HeaderFile -#include +#include #include #include @@ -25,16 +25,16 @@ class Image_PixMap; class OpenGl_Texture; -DEFINE_STANDARD_HANDLE(OpenGl_FrameBuffer, OpenGl_Resource) +DEFINE_STANDARD_HANDLE(OpenGl_FrameBuffer, OpenGl_NamedResource) //! Short declaration of useful collection types. typedef NCollection_Vector OpenGl_ColorFormats; //! Class implements FrameBuffer Object (FBO) resource //! intended for off-screen rendering. -class OpenGl_FrameBuffer : public OpenGl_Resource +class OpenGl_FrameBuffer : public OpenGl_NamedResource { - + DEFINE_STANDARD_RTTIEXT(OpenGl_FrameBuffer, OpenGl_NamedResource) public: //! Helpful constants @@ -57,7 +57,7 @@ public: public: //! Empty constructor - Standard_EXPORT OpenGl_FrameBuffer(); + Standard_EXPORT OpenGl_FrameBuffer (const TCollection_AsciiString& theResourceId = TCollection_AsciiString()); //! Destructor Standard_EXPORT virtual ~OpenGl_FrameBuffer(); @@ -371,10 +371,6 @@ protected: OpenGl_TextureArray myColorTextures; //!< color texture objects Handle(OpenGl_Texture) myDepthStencilTexture; //!< depth-stencil texture object -public: - - DEFINE_STANDARD_RTTIEXT(OpenGl_FrameBuffer,OpenGl_Resource) // Type definition - }; #endif // OPENGL_FRAME_BUFFER_H diff --git a/src/OpenGl/OpenGl_GraphicDriver.cxx b/src/OpenGl/OpenGl_GraphicDriver.cxx index b39fd6c199..8e348d9406 100644 --- a/src/OpenGl/OpenGl_GraphicDriver.cxx +++ b/src/OpenGl/OpenGl_GraphicDriver.cxx @@ -79,28 +79,30 @@ namespace #if defined(HAVE_EGL) //! Wrapper over eglChooseConfig() called with preferred defaults. - static EGLConfig chooseEglSurfConfig (EGLDisplay theDisplay) + static EGLConfig chooseEglSurfConfig (EGLDisplay theDisplay, + const Handle(OpenGl_Caps)& theCaps) { - EGLint aConfigAttribs[] = - { - EGL_RED_SIZE, 8, - EGL_GREEN_SIZE, 8, - EGL_BLUE_SIZE, 8, - EGL_ALPHA_SIZE, 0, - EGL_DEPTH_SIZE, 24, - EGL_STENCIL_SIZE, 8, - #if defined(OpenGl_USE_GLES2) - EGL_RENDERABLE_TYPE, EGL_OPENGL_ES2_BIT, - #else - EGL_RENDERABLE_TYPE, EGL_OPENGL_BIT, - #endif - EGL_NONE - }; - EGLConfig aCfg = NULL; EGLint aNbConfigs = 0; for (Standard_Integer aGlesVer = 3; aGlesVer >= 2; --aGlesVer) { + bool isDeepColor = theCaps->buffersDeepColor; + EGLint aConfigAttribs[] = + { + EGL_RED_SIZE, isDeepColor ? 10 : 8, + EGL_GREEN_SIZE, isDeepColor ? 10 : 8, + EGL_BLUE_SIZE, isDeepColor ? 10 : 8, + EGL_ALPHA_SIZE, 0, + EGL_DEPTH_SIZE, 24, + EGL_STENCIL_SIZE, 8, + #if defined(OpenGl_USE_GLES2) + EGL_RENDERABLE_TYPE, EGL_OPENGL_ES2_BIT, + #else + EGL_RENDERABLE_TYPE, EGL_OPENGL_BIT, + #endif + EGL_NONE + }; + #if defined(OpenGl_USE_GLES2) aConfigAttribs[6 * 2 + 1] = aGlesVer == 3 ? EGL_OPENGL_ES3_BIT : EGL_OPENGL_ES2_BIT; #else @@ -117,13 +119,30 @@ namespace } eglGetError(); - aConfigAttribs[4 * 2 + 1] = 16; // try config with smaller depth buffer - if (eglChooseConfig (theDisplay, aConfigAttribs, &aCfg, 1, &aNbConfigs) == EGL_TRUE - && aCfg != NULL) + if (isDeepColor) { - return aCfg; + // try config with smaller color buffer + aConfigAttribs[0 * 2 + 1] = 8; + aConfigAttribs[1 * 2 + 1] = 8; + aConfigAttribs[2 * 2 + 1] = 8; + if (eglChooseConfig (theDisplay, aConfigAttribs, &aCfg, 1, &aNbConfigs) == EGL_TRUE + && aCfg != NULL) + { + return aCfg; + } + eglGetError(); + } + + { + // try config with smaller depth buffer + aConfigAttribs[4 * 2 + 1] = 16; + if (eglChooseConfig (theDisplay, aConfigAttribs, &aCfg, 1, &aNbConfigs) == EGL_TRUE + && aCfg != NULL) + { + return aCfg; + } + eglGetError(); } - eglGetError(); } return aCfg; } @@ -327,7 +346,7 @@ Standard_Boolean OpenGl_GraphicDriver::InitContext() return Standard_False; } - myEglConfig = chooseEglSurfConfig ((EGLDisplay )myEglDisplay); + myEglConfig = chooseEglSurfConfig ((EGLDisplay )myEglDisplay, myCaps); if (myEglConfig == NULL) { ::Message::SendFail ("Error: EGL does not provide compatible configurations"); @@ -404,7 +423,7 @@ Standard_Boolean OpenGl_GraphicDriver::InitEglContext (Aspect_Display t myEglConfig = theEglConfig; if (theEglConfig == NULL) { - myEglConfig = chooseEglSurfConfig ((EGLDisplay )myEglDisplay); + myEglConfig = chooseEglSurfConfig ((EGLDisplay )myEglDisplay, myCaps); if (myEglConfig == NULL) { ::Message::SendFail ("Error: EGL does not provide compatible configurations"); diff --git a/src/OpenGl/OpenGl_ShadowMap.cxx b/src/OpenGl/OpenGl_ShadowMap.cxx index fa803e97f1..f56f2241ab 100644 --- a/src/OpenGl/OpenGl_ShadowMap.cxx +++ b/src/OpenGl/OpenGl_ShadowMap.cxx @@ -29,7 +29,7 @@ IMPLEMENT_STANDARD_RTTIEXT(OpenGl_ShadowMap, OpenGl_NamedResource) // ======================================================================= OpenGl_ShadowMap::OpenGl_ShadowMap() : OpenGl_NamedResource ("shadow_map"), - myShadowMapFbo (new OpenGl_FrameBuffer()), + myShadowMapFbo (new OpenGl_FrameBuffer (myResourceId + ":fbo")), myShadowCamera (new Graphic3d_Camera()), myShadowMapBias (0.0f) { diff --git a/src/OpenGl/OpenGl_TextureFormat.cxx b/src/OpenGl/OpenGl_TextureFormat.cxx index 5fcc450efd..31f62cc39f 100644 --- a/src/OpenGl/OpenGl_TextureFormat.cxx +++ b/src/OpenGl/OpenGl_TextureFormat.cxx @@ -110,6 +110,7 @@ TCollection_AsciiString OpenGl_TextureFormat::FormatDataType (GLint theDataType) case GL_HALF_FLOAT: return "GL_HALF_FLOAT"; case 0x8D61: return "GL_HALF_FLOAT_OES"; case GL_UNSIGNED_INT_24_8: return "GL_UNSIGNED_INT_24_8"; + case GL_UNSIGNED_INT_2_10_10_10_REV: return "GL_UNSIGNED_INT_2_10_10_10_REV"; case GL_FLOAT_32_UNSIGNED_INT_24_8_REV: return "GL_FLOAT_32_UNSIGNED_INT_24_8_REV"; } return OpenGl_Context::FormatGlEnumHex (theDataType); @@ -586,6 +587,15 @@ OpenGl_TextureFormat OpenGl_TextureFormat::FindSizedFormat (const Handle(OpenGl_ } return aFormat; } + case GL_RGB10_A2: + { + aFormat.SetNbComponents (4); + aFormat.SetInternalFormat (theSizedFormat); + aFormat.SetPixelFormat (GL_RGBA); + aFormat.SetDataType (GL_UNSIGNED_INT_2_10_10_10_REV); + aFormat.SetImageFormat (Image_Format_RGBA); + return aFormat; + } // integer types case GL_R32I: { diff --git a/src/OpenGl/OpenGl_View.cxx b/src/OpenGl/OpenGl_View.cxx index 819491c3e6..d398a4a9ec 100644 --- a/src/OpenGl/OpenGl_View.cxx +++ b/src/OpenGl/OpenGl_View.cxx @@ -158,21 +158,21 @@ OpenGl_View::OpenGl_View (const Handle(Graphic3d_StructureManager)& theMgr, myNoShadingLight = new Graphic3d_LightSet(); myNoShadingLight->Add (aLight); - myMainSceneFbos[0] = new OpenGl_FrameBuffer(); - myMainSceneFbos[1] = new OpenGl_FrameBuffer(); - myMainSceneFbosOit[0] = new OpenGl_FrameBuffer(); - myMainSceneFbosOit[1] = new OpenGl_FrameBuffer(); - myImmediateSceneFbos[0] = new OpenGl_FrameBuffer(); - myImmediateSceneFbos[1] = new OpenGl_FrameBuffer(); - myImmediateSceneFbosOit[0] = new OpenGl_FrameBuffer(); - myImmediateSceneFbosOit[1] = new OpenGl_FrameBuffer(); - myXrSceneFbo = new OpenGl_FrameBuffer(); - myOpenGlFBO = new OpenGl_FrameBuffer(); - myOpenGlFBO2 = new OpenGl_FrameBuffer(); - myRaytraceFBO1[0] = new OpenGl_FrameBuffer(); - myRaytraceFBO1[1] = new OpenGl_FrameBuffer(); - myRaytraceFBO2[0] = new OpenGl_FrameBuffer(); - myRaytraceFBO2[1] = new OpenGl_FrameBuffer(); + myMainSceneFbos[0] = new OpenGl_FrameBuffer ("fbo0_main"); + myMainSceneFbos[1] = new OpenGl_FrameBuffer ("fbo1_main"); + myMainSceneFbosOit[0] = new OpenGl_FrameBuffer ("fbo0_main_oit"); + myMainSceneFbosOit[1] = new OpenGl_FrameBuffer ("fbo1_main_oit"); + myImmediateSceneFbos[0] = new OpenGl_FrameBuffer ("fbo0_imm"); + myImmediateSceneFbos[1] = new OpenGl_FrameBuffer ("fbo1_imm"); + myImmediateSceneFbosOit[0] = new OpenGl_FrameBuffer ("fbo0_imm_oit"); + myImmediateSceneFbosOit[1] = new OpenGl_FrameBuffer ("fbo1_imm_oit"); + myXrSceneFbo = new OpenGl_FrameBuffer ("fbo_xr"); + myOpenGlFBO = new OpenGl_FrameBuffer ("fbo_gl"); + myOpenGlFBO2 = new OpenGl_FrameBuffer ("fbo_gl2"); + myRaytraceFBO1[0] = new OpenGl_FrameBuffer ("fbo0_raytrace1"); + myRaytraceFBO1[1] = new OpenGl_FrameBuffer ("fbo1_raytrace1"); + myRaytraceFBO2[0] = new OpenGl_FrameBuffer ("fbo0_raytrace2"); + myRaytraceFBO2[1] = new OpenGl_FrameBuffer ("fbo1_raytrace2"); myDepthPeelingFbos = new OpenGl_DepthPeeling(); myShadowMaps = new OpenGl_ShadowMapArray(); } @@ -387,8 +387,25 @@ void OpenGl_View::SetWindow (const Handle(Aspect_Window)& theWindow, myHasFboBlit = Standard_True; Invalidate(); + // choose preferred FBO format + const Handle(OpenGl_Context)& aCtx = myWorkspace->GetGlContext(); + if (aCtx->IsWindowDeepColor() + && aCtx->IsGlGreaterEqual (3, 0)) + { + myFboColorFormat = GL_RGB10_A2; + } + else if (aCtx->HasSRGB()) + { + // note that GL_SRGB8 is not required to be renderable, unlike GL_RGB8, GL_RGBA8, GL_SRGB8_ALPHA8 + myFboColorFormat = GL_SRGB8_ALPHA8; + } + else + { + myFboColorFormat = GL_RGBA8; + } + // Environment texture resource does not support lazy initialization. - initTextureEnv (myWorkspace->GetGlContext()); + initTextureEnv (aCtx); } // ======================================================================= @@ -950,6 +967,19 @@ void OpenGl_View::DiagnosticInformation (TColStd_IndexedDataMapOfStringString& t { TCollection_AsciiString aResRatio (myRenderParams.ResolutionRatio()); theDict.ChangeFromIndex (theDict.Add ("ResolutionRatio", aResRatio)) = aResRatio; + if (myMainSceneFbos[0]->IsValid()) + { + TCollection_AsciiString anFboInfo; + if (const Handle(OpenGl_Texture)& aColorTex = myMainSceneFbos[0]->ColorTexture()) + { + anFboInfo += OpenGl_TextureFormat::FormatFormat (aColorTex->SizedFormat()); + } + if (const Handle(OpenGl_Texture)& aDepthTex = myMainSceneFbos[0]->DepthStencilTexture()) + { + anFboInfo = anFboInfo + " " + OpenGl_TextureFormat::FormatFormat (aDepthTex->SizedFormat()); + } + theDict.ChangeFromIndex (theDict.Add ("FBO buffer", anFboInfo)) = anFboInfo; + } } } diff --git a/src/OpenGl/OpenGl_Window.cxx b/src/OpenGl/OpenGl_Window.cxx index 788aa3553e..16545d39fc 100644 --- a/src/OpenGl/OpenGl_Window.cxx +++ b/src/OpenGl/OpenGl_Window.cxx @@ -340,7 +340,7 @@ OpenGl_Window::OpenGl_Window (const Handle(OpenGl_GraphicDriver)& theDriver, HWND aWinTmp = NULL; HDC aDevCtxTmp = NULL; HGLRC aRendCtxTmp = NULL; - if ((!theCaps->contextDebug && !theCaps->contextNoAccel && theCaps->contextCompatible) + if ((!theCaps->contextDebug && !theCaps->contextNoAccel && theCaps->contextCompatible && !theCaps->buffersDeepColor) || RegisterClassW (&aClass) == 0) { aClass.lpszClassName = NULL; @@ -404,7 +404,11 @@ OpenGl_Window::OpenGl_Window (const Handle(OpenGl_GraphicDriver)& theDriver, WGL_PIXEL_TYPE_ARB, WGL_TYPE_RGBA_ARB, //WGL_SAMPLE_BUFFERS_ARB, 1, //WGL_SAMPLES_ARB, 8, - WGL_COLOR_BITS_ARB, 24, + //WGL_COLOR_BITS_ARB, 24, + WGL_RED_BITS_ARB, theCaps->buffersDeepColor ? 10 : 8, + WGL_GREEN_BITS_ARB, theCaps->buffersDeepColor ? 10 : 8, + WGL_BLUE_BITS_ARB, theCaps->buffersDeepColor ? 10 : 8, + WGL_ALPHA_BITS_ARB, theCaps->buffersDeepColor ? 2 : 8, WGL_DEPTH_BITS_ARB, 24, WGL_STENCIL_BITS_ARB, 8, // WGL_EXT_colorspace extension specifies if OpenGL should write into window buffer as into sRGB or RGB framebuffer @@ -415,7 +419,12 @@ OpenGl_Window::OpenGl_Window (const Handle(OpenGl_GraphicDriver)& theDriver, 0, 0, }; unsigned int aFrmtsNb = 0; - aChoosePixProc (aWindowDC, aPixAttribs, NULL, 1, &aPixelFrmtId, &aFrmtsNb); + if (!aChoosePixProc (aWindowDC, aPixAttribs, NULL, 1, &aPixelFrmtId, &aFrmtsNb) + && theCaps->buffersDeepColor) + { + /// TODO + Message::SendFail() << "Error: unable to find RGB10_A2 window buffer format!"; + } } // setup pixel format - may be set only once per window diff --git a/src/OpenGlTest/OpenGlTest_Commands.cxx b/src/OpenGlTest/OpenGlTest_Commands.cxx index be6785cf38..226b6e44b2 100644 --- a/src/OpenGlTest/OpenGlTest_Commands.cxx +++ b/src/OpenGlTest/OpenGlTest_Commands.cxx @@ -597,6 +597,7 @@ static int VCaps (Draw_Interpretor& theDI, theDI << "Stereo: " << (aCaps->contextStereo ? "1" : "0") << "\n"; theDI << "WinBuffer: " << (aCaps->useSystemBuffer ? "1" : "0") << "\n"; theDI << "OpaqueAlpha: " << (aCaps->buffersOpaqueAlpha ? "1" : "0") << "\n"; + theDI << "DeepColor: " << (aCaps->buffersDeepColor ? "1" : "0") << "\n"; theDI << "NoExt:" << (aCaps->contextNoExtensions ? "1" : "0") << "\n"; theDI << "MaxVersion:" << aCaps->contextMajorVersionUpper << "." << aCaps->contextMinorVersionUpper << "\n"; theDI << "CompressTextures: " << (aCaps->compressedTexturesDisable ? "0" : "1") << "\n"; @@ -614,148 +615,90 @@ static int VCaps (Draw_Interpretor& theDI, continue; } else if (anArgCase == "-vsync" + || anArgCase == "-novsync" || anArgCase == "-swapinterval") { - Standard_Boolean toEnable = Standard_True; - if (++anArgIter < theArgNb - && !Draw::ParseOnOff (theArgVec[anArgIter], toEnable)) - { - --anArgIter; - } - aCaps->swapInterval = toEnable; + aCaps->swapInterval = Draw::ParseOnOffNoIterator (theArgNb, theArgVec, anArgIter); } - else if (anArgCase == "-ffp") + else if (anArgCase == "-ffp" + || anArgCase == "-noffp") { - Standard_Boolean toEnable = Standard_True; - if (++anArgIter < theArgNb - && !Draw::ParseOnOff (theArgVec[anArgIter], toEnable)) - { - --anArgIter; - } - aCaps->ffpEnable = toEnable; + aCaps->ffpEnable = Draw::ParseOnOffNoIterator (theArgNb, theArgVec, anArgIter); } - else if (anArgCase == "-polygonmode") + else if (anArgCase == "-polygonmode" + || anArgCase == "-nopolygonmode") { - Standard_Boolean toEnable = Standard_True; - if (++anArgIter < theArgNb - && !Draw::ParseOnOff (theArgVec[anArgIter], toEnable)) - { - --anArgIter; - } - aCaps->usePolygonMode = toEnable; + aCaps->usePolygonMode = Draw::ParseOnOffNoIterator (theArgNb, theArgVec, anArgIter); } - else if (anArgCase == "-srgb") + else if (anArgCase == "-srgb" + || anArgCase == "-nosrgb") { - Standard_Boolean toEnable = Standard_True; - if (++anArgIter < theArgNb - && !Draw::ParseOnOff (theArgVec[anArgIter], toEnable)) - { - --anArgIter; - } - aCaps->sRGBDisable = !toEnable; + aCaps->sRGBDisable = !Draw::ParseOnOffNoIterator (theArgNb, theArgVec, anArgIter); } - else if (anArgCase == "-compressedtextures") + else if (anArgCase == "-compressedtextures" + || anArgCase == "-nocompressedtextures") { - Standard_Boolean toEnable = Standard_True; - if (++anArgIter < theArgNb - && !Draw::ParseOnOff (theArgVec[anArgIter], toEnable)) - { - --anArgIter; - } - aCaps->compressedTexturesDisable = !toEnable; + aCaps->compressedTexturesDisable = !Draw::ParseOnOffNoIterator (theArgNb, theArgVec, anArgIter); } - else if (anArgCase == "-vbo") + else if (anArgCase == "-vbo" + || anArgCase == "-novbo") { - Standard_Boolean toEnable = Standard_True; - if (++anArgIter < theArgNb - && !Draw::ParseOnOff (theArgVec[anArgIter], toEnable)) - { - --anArgIter; - } - aCaps->vboDisable = !toEnable; + aCaps->vboDisable = !Draw::ParseOnOffNoIterator (theArgNb, theArgVec, anArgIter); } else if (anArgCase == "-sprite" || anArgCase == "-sprites") { - Standard_Boolean toEnable = Standard_True; - if (++anArgIter < theArgNb - && !Draw::ParseOnOff (theArgVec[anArgIter], toEnable)) - { - --anArgIter; - } - aCaps->pntSpritesDisable = !toEnable; + aCaps->pntSpritesDisable = !Draw::ParseOnOffIterator (theArgNb, theArgVec, anArgIter); } else if (anArgCase == "-depthzerotoone" || anArgCase == "-zerotoonedepth" || anArgCase == "-usezerotoonedepth" || anArgCase == "-iszerotoonedepth") { - Standard_Boolean toEnable = Standard_True; - if (++anArgIter < theArgNb - && !Draw::ParseOnOff (theArgVec[anArgIter], toEnable)) - { - --anArgIter; - } - aCaps->useZeroToOneDepth = toEnable; + aCaps->useZeroToOneDepth = Draw::ParseOnOffIterator (theArgNb, theArgVec, anArgIter); } - else if (anArgCase == "-softmode") + else if (anArgCase == "-softmode" + || anArgCase == "-contextnoaccel") { - Standard_Boolean toEnable = Standard_True; - if (++anArgIter < theArgNb - && !Draw::ParseOnOff (theArgVec[anArgIter], toEnable)) - { - --anArgIter; - } - aCaps->contextNoAccel = toEnable; + aCaps->contextNoAccel = Draw::ParseOnOffIterator (theArgNb, theArgVec, anArgIter); } else if (anArgCase == "-opaquealpha" - || anArgCase == "-buffersOpaqueAlpha") + || anArgCase == "-noopaquealpha" + || anArgCase == "-buffersopaquealpha" + || anArgCase == "-nobuffersopaquealpha") { - Standard_Boolean toEnable = Standard_True; - if (++anArgIter < theArgNb - && !Draw::ParseOnOff (theArgVec[anArgIter], toEnable)) - { - --anArgIter; - } - aCaps->buffersOpaqueAlpha = toEnable; + aCaps->buffersOpaqueAlpha = Draw::ParseOnOffNoIterator (theArgNb, theArgVec, anArgIter); + } + else if (anArgCase == "-deepcolor" + || anArgCase == "-nodeepcolor" + || anArgCase == "-buffersdeepcolor" + || anArgCase == "-nobuffersdeepcolor") + { + aCaps->buffersDeepColor = Draw::ParseOnOffNoIterator (theArgNb, theArgVec, anArgIter); } else if (anArgCase == "-winbuffer" || anArgCase == "-windowbuffer" + || anArgCase == "-nowinbuffer" + || anArgCase == "-nowindowbuffer" || anArgCase == "-usewinbuffer" || anArgCase == "-usewindowbuffer" || anArgCase == "-usesystembuffer") { - Standard_Boolean toEnable = Standard_True; - if (++anArgIter < theArgNb - && !Draw::ParseOnOff (theArgVec[anArgIter], toEnable)) - { - --anArgIter; - } - aCaps->useSystemBuffer = toEnable; + aCaps->useSystemBuffer = Draw::ParseOnOffNoIterator (theArgNb, theArgVec, anArgIter); } else if (anArgCase == "-accel" - || anArgCase == "-acceleration") + || anArgCase == "-acceleration" + || anArgCase == "-noaccel" + || anArgCase == "-noacceleration") { - Standard_Boolean toEnable = Standard_True; - if (++anArgIter < theArgNb - && !Draw::ParseOnOff (theArgVec[anArgIter], toEnable)) - { - --anArgIter; - } - aCaps->contextNoAccel = !toEnable; + aCaps->contextNoAccel = !Draw::ParseOnOffNoIterator (theArgNb, theArgVec, anArgIter); } else if (anArgCase == "-compat" || anArgCase == "-compatprofile" || anArgCase == "-compatible" || anArgCase == "-compatibleprofile") { - Standard_Boolean toEnable = Standard_True; - if (++anArgIter < theArgNb - && !Draw::ParseOnOff (theArgVec[anArgIter], toEnable)) - { - --anArgIter; - } - aCaps->contextCompatible = toEnable; + aCaps->contextCompatible = Draw::ParseOnOffIterator (theArgNb, theArgVec, anArgIter); if (!aCaps->contextCompatible) { aCaps->ffpEnable = Standard_False; @@ -764,40 +707,24 @@ static int VCaps (Draw_Interpretor& theDI, else if (anArgCase == "-core" || anArgCase == "-coreprofile") { - Standard_Boolean toEnable = Standard_True; - if (++anArgIter < theArgNb - && !Draw::ParseOnOff (theArgVec[anArgIter], toEnable)) - { - --anArgIter; - } - aCaps->contextCompatible = !toEnable; + aCaps->contextCompatible = !Draw::ParseOnOffIterator (theArgNb, theArgVec, anArgIter); if (!aCaps->contextCompatible) { aCaps->ffpEnable = Standard_False; } } else if (anArgCase == "-stereo" - || anArgCase == "-quadbuffer") + || anArgCase == "-quadbuffer" + || anArgCase == "-nostereo" + || anArgCase == "-noquadbuffer") { - Standard_Boolean toEnable = Standard_True; - if (++anArgIter < theArgNb - && !Draw::ParseOnOff (theArgVec[anArgIter], toEnable)) - { - --anArgIter; - } - aCaps->contextStereo = toEnable; + aCaps->contextStereo = Draw::ParseOnOffNoIterator (theArgNb, theArgVec, anArgIter); } else if (anArgCase == "-noext" || anArgCase == "-noextensions" || anArgCase == "-noextension") { - Standard_Boolean toDisable = Standard_True; - if (++anArgIter < theArgNb - && !Draw::ParseOnOff (theArgVec[anArgIter], toDisable)) - { - --anArgIter; - } - aCaps->contextNoExtensions = toDisable; + aCaps->contextNoExtensions = Draw::ParseOnOffIterator (theArgNb, theArgVec, anArgIter); } else if (anArgCase == "-maxversion" || anArgCase == "-upperversion" @@ -859,7 +786,7 @@ void OpenGlTest::Commands (Draw_Interpretor& theCommands) "vcaps [-sRGB {0|1}] [-vbo {0|1}] [-sprites {0|1}] [-ffp {0|1}] [-polygonMode {0|1}]" "\n\t\t: [-compatibleProfile {0|1}] [-compressedTextures {0|1}]" "\n\t\t: [-vsync {0|1}] [-useWinBuffer {0|1}] [-opaqueAlpha {0|1}]" - "\n\t\t: [-quadBuffer {0|1}] [-stereo {0|1}]" + "\n\t\t: [-deepColor {0|1}] [-quadBuffer {0|1}] [-stereo {0|1}]" "\n\t\t: [-softMode {0|1}] [-noupdate|-update]" "\n\t\t: [-zeroToOneDepth {0|1}]" "\n\t\t: [-noExtensions {0|1}] [-maxVersion Major Minor]" @@ -877,10 +804,12 @@ void OpenGlTest::Commands (Draw_Interpretor& theCommands) "\n\t\t: opaqueAlpha - disable writes in alpha component of color buffer" "\n\t\t: winBuffer - allow using window buffer for rendering" "\n\t\t: zeroToOneDepth - use [0,1] depth range instead of [-1,1] range" + "\n\t\t: Window buffer creation options:" + "\n\t\t: quadbuffer - QuadBuffer for stereoscopic displays" + "\n\t\t: deepColor - window buffer with higher color precision (30bit instead of 24bit RGB)" "\n\t\t: Context creation options:" "\n\t\t: softMode - software OpenGL implementation" "\n\t\t: compatibleProfile - backward-compatible profile" - "\n\t\t: quadbuffer - QuadBuffer" "\n\t\t: noExtensions - disallow usage of extensions" "\n\t\t: maxVersion - force upper OpenGL version to be used" "\n\t\t: These parameters control alternative" From 2275caec095f21648a89cef2102a6a6d58a66890 Mon Sep 17 00:00:00 2001 From: kgv Date: Sun, 16 Jan 2022 18:20:45 +0300 Subject: [PATCH 195/639] 0032780: Visualization, TKOpenGl - add smoothing to row interlaced stereoscopic output Added new option Graphic3d_RenderingParams::ToSmoothInterlacing enabled by default. Added -smooth option to vstereo command. Added -dpiAware option to vinit command (Windows). --- src/Graphic3d/Graphic3d_RenderingParams.hxx | 2 + src/Graphic3d/Graphic3d_ShaderManager.cxx | 21 ++- src/Graphic3d/Graphic3d_StereoMode.hxx | 2 +- src/OpenGl/OpenGl_ShaderManager.cxx | 3 +- src/OpenGl/OpenGl_View.cxx | 82 +++++++---- src/ViewerTest/ViewerTest_ViewerCommands.cxx | 147 ++++++++++++++----- tests/opengl/data/general/stereo | 15 +- 7 files changed, 197 insertions(+), 75 deletions(-) diff --git a/src/Graphic3d/Graphic3d_RenderingParams.hxx b/src/Graphic3d/Graphic3d_RenderingParams.hxx index 38fafd4a78..e299663032 100644 --- a/src/Graphic3d/Graphic3d_RenderingParams.hxx +++ b/src/Graphic3d/Graphic3d_RenderingParams.hxx @@ -146,6 +146,7 @@ public: HmdFov2d (30.0f), AnaglyphFilter (Anaglyph_RedCyan_Optimized), ToReverseStereo (Standard_False), + ToSmoothInterlacing (Standard_True), ToMirrorComposer (Standard_True), // StatsPosition (new Graphic3d_TransformPers (Graphic3d_TMF_2d, Aspect_TOTP_LEFT_UPPER, Graphic3d_Vec2i (20, 20))), @@ -260,6 +261,7 @@ public: //! @name VR / stereoscopic parameters Graphic3d_Mat4 AnaglyphLeft; //!< left anaglyph filter (in normalized colorspace), Color = AnaglyphRight * theColorRight + AnaglyphLeft * theColorLeft; Graphic3d_Mat4 AnaglyphRight; //!< right anaglyph filter (in normalized colorspace), Color = AnaglyphRight * theColorRight + AnaglyphLeft * theColorLeft; Standard_Boolean ToReverseStereo; //!< flag to reverse stereo pair, FALSE by default + Standard_Boolean ToSmoothInterlacing; //!< flag to smooth output on interlaced displays (improves text readability / reduces line aliasing), TRUE by default Standard_Boolean ToMirrorComposer; //!< if output device is an external composer - mirror rendering results in window in addition to sending frame to composer, TRUE by default public: //! @name on-screen display parameters diff --git a/src/Graphic3d/Graphic3d_ShaderManager.cxx b/src/Graphic3d/Graphic3d_ShaderManager.cxx index b553462225..b78d99a00d 100644 --- a/src/Graphic3d/Graphic3d_ShaderManager.cxx +++ b/src/Graphic3d/Graphic3d_ShaderManager.cxx @@ -1800,11 +1800,14 @@ Handle(Graphic3d_ShaderProgram) Graphic3d_ShaderManager::getStdProgramStereo (Gr case Graphic3d_StereoMode_RowInterlaced: { aName = "row-interlaced"; + aUniforms.Append (Graphic3d_ShaderObject::ShaderVariable ("vec2 uTexOffset", Graphic3d_TOS_FRAGMENT)); aSrcFrag = EOL"void main()" EOL"{" - EOL" vec4 aColorL = occTexture2D (uLeftSampler, TexCoord);" - EOL" vec4 aColorR = occTexture2D (uRightSampler, TexCoord);" + EOL" vec2 aTexCoordL = TexCoord - uTexOffset;" + EOL" vec2 aTexCoordR = TexCoord + uTexOffset;" + EOL" vec4 aColorL = occTexture2D (uLeftSampler, aTexCoordL);" + EOL" vec4 aColorR = occTexture2D (uRightSampler, aTexCoordR);" EOL" if (int (mod (gl_FragCoord.y - 1023.5, 2.0)) != 1)" EOL" {" EOL" occSetFragColor (aColorL);" @@ -1819,11 +1822,14 @@ Handle(Graphic3d_ShaderProgram) Graphic3d_ShaderManager::getStdProgramStereo (Gr case Graphic3d_StereoMode_ColumnInterlaced: { aName = "column-interlaced"; + aUniforms.Append (Graphic3d_ShaderObject::ShaderVariable ("vec2 uTexOffset", Graphic3d_TOS_FRAGMENT)); aSrcFrag = EOL"void main()" EOL"{" - EOL" vec4 aColorL = occTexture2D (uLeftSampler, TexCoord);" - EOL" vec4 aColorR = occTexture2D (uRightSampler, TexCoord);" + EOL" vec2 aTexCoordL = TexCoord - uTexOffset;" + EOL" vec2 aTexCoordR = TexCoord + uTexOffset;" + EOL" vec4 aColorL = occTexture2D (uLeftSampler, aTexCoordL);" + EOL" vec4 aColorR = occTexture2D (uRightSampler, aTexCoordR);" EOL" if (int (mod (gl_FragCoord.x - 1023.5, 2.0)) == 1)" EOL" {" EOL" occSetFragColor (aColorL);" @@ -1838,11 +1844,14 @@ Handle(Graphic3d_ShaderProgram) Graphic3d_ShaderManager::getStdProgramStereo (Gr case Graphic3d_StereoMode_ChessBoard: { aName = "chessboard"; + aUniforms.Append (Graphic3d_ShaderObject::ShaderVariable ("vec2 uTexOffset", Graphic3d_TOS_FRAGMENT)); aSrcFrag = EOL"void main()" EOL"{" - EOL" vec4 aColorL = occTexture2D (uLeftSampler, TexCoord);" - EOL" vec4 aColorR = occTexture2D (uRightSampler, TexCoord);" + EOL" vec2 aTexCoordL = TexCoord - uTexOffset;" + EOL" vec2 aTexCoordR = TexCoord + uTexOffset;" + EOL" vec4 aColorL = occTexture2D (uLeftSampler, aTexCoordL);" + EOL" vec4 aColorR = occTexture2D (uRightSampler, aTexCoordR);" EOL" bool isEvenX = int(mod(floor(gl_FragCoord.x - 1023.5), 2.0)) != 1;" EOL" bool isEvenY = int(mod(floor(gl_FragCoord.y - 1023.5), 2.0)) == 1;" EOL" if ((isEvenX && isEvenY) || (!isEvenX && !isEvenY))" diff --git a/src/Graphic3d/Graphic3d_StereoMode.hxx b/src/Graphic3d/Graphic3d_StereoMode.hxx index 4aef0c1332..e2ca4f56c2 100644 --- a/src/Graphic3d/Graphic3d_StereoMode.hxx +++ b/src/Graphic3d/Graphic3d_StereoMode.hxx @@ -28,7 +28,7 @@ enum Graphic3d_StereoMode Graphic3d_StereoMode_OverUnder, //!< vertical pair Graphic3d_StereoMode_SoftPageFlip, //!< software PageFlip for shutter glasses, should NOT be used! Graphic3d_StereoMode_OpenVR, //!< OpenVR (HMD) - Graphic3d_StereoMode_NB //!< the number of modes }; +enum { Graphic3d_StereoMode_NB = Graphic3d_StereoMode_OpenVR + 1 }; #endif // _Graphic3d_StereoMode_HeaderFile diff --git a/src/OpenGl/OpenGl_ShaderManager.cxx b/src/OpenGl/OpenGl_ShaderManager.cxx index 0023cf89d4..fa660e5492 100644 --- a/src/OpenGl/OpenGl_ShaderManager.cxx +++ b/src/OpenGl/OpenGl_ShaderManager.cxx @@ -1249,7 +1249,7 @@ Standard_Boolean OpenGl_ShaderManager::prepareStdProgramPhong (Handle(OpenGl_Sha // ======================================================================= Standard_Boolean OpenGl_ShaderManager::BindStereoProgram (Graphic3d_StereoMode theStereoMode) { - if (theStereoMode < 0 || theStereoMode >= Graphic3d_StereoMode_NB) + if (theStereoMode < 0 || (int )theStereoMode >= Graphic3d_StereoMode_NB) { return false; } @@ -1271,6 +1271,7 @@ Standard_Boolean OpenGl_ShaderManager::BindStereoProgram (Graphic3d_StereoMode t myContext->BindProgram (aProgram); aProgram->SetSampler (myContext, "uLeftSampler", Graphic3d_TextureUnit_0); aProgram->SetSampler (myContext, "uRightSampler", Graphic3d_TextureUnit_1); + aProgram->SetUniform (myContext, "uTexOffset", Graphic3d_Vec2(0.0f)); return true; } diff --git a/src/OpenGl/OpenGl_View.cxx b/src/OpenGl/OpenGl_View.cxx index d398a4a9ec..97a98a6737 100644 --- a/src/OpenGl/OpenGl_View.cxx +++ b/src/OpenGl/OpenGl_View.cxx @@ -175,6 +175,8 @@ OpenGl_View::OpenGl_View (const Handle(Graphic3d_StructureManager)& theMgr, myRaytraceFBO2[1] = new OpenGl_FrameBuffer ("fbo1_raytrace2"); myDepthPeelingFbos = new OpenGl_DepthPeeling(); myShadowMaps = new OpenGl_ShadowMapArray(); + + myXrSceneFbo->ColorTexture()->Sampler()->Parameters()->SetFilter (Graphic3d_TOTF_BILINEAR); } // ======================================================================= @@ -2862,10 +2864,7 @@ void OpenGl_View::drawStereoPair (OpenGl_FrameBuffer* theDrawFbo) if (!myOpenGlFBO ->InitLazy (aCtx, aPair[0]->GetVPSize(), myFboColorFormat, myFboDepthFormat, 0) || !myOpenGlFBO2->InitLazy (aCtx, aPair[0]->GetVPSize(), myFboColorFormat, 0, 0)) { - aCtx->PushMessage (GL_DEBUG_SOURCE_APPLICATION, - GL_DEBUG_TYPE_ERROR, - 0, - GL_DEBUG_SEVERITY_HIGH, + aCtx->PushMessage (GL_DEBUG_SOURCE_APPLICATION, GL_DEBUG_TYPE_ERROR, 0, GL_DEBUG_SEVERITY_HIGH, "Error! Unable to allocate FBO for blitting stereo pair"); bindDefaultFbo (theDrawFbo); return; @@ -2924,10 +2923,16 @@ void OpenGl_View::drawStereoPair (OpenGl_FrameBuffer* theDrawFbo) OpenGl_VertexBuffer* aVerts = initBlitQuad (myToFlipOutput); const Handle(OpenGl_ShaderManager)& aManager = aCtx->ShaderManager(); - if (aVerts->IsValid() - && aManager->BindStereoProgram (myRenderParams.StereoMode)) + if (!aVerts->IsValid() + || !aManager->BindStereoProgram (myRenderParams.StereoMode)) { - if (myRenderParams.StereoMode == Graphic3d_StereoMode_Anaglyph) + aCtx->PushMessage (GL_DEBUG_SOURCE_APPLICATION, GL_DEBUG_TYPE_ERROR, 0, GL_DEBUG_SEVERITY_HIGH, "Error! Anaglyph has failed"); + return; + } + + switch (myRenderParams.StereoMode) + { + case Graphic3d_StereoMode_Anaglyph: { OpenGl_Mat4 aFilterL, aFilterR; aFilterL.SetDiagonal (Graphic3d_Vec4 (0.0f, 0.0f, 0.0f, 0.0f)); @@ -2988,28 +2993,55 @@ void OpenGl_View::drawStereoPair (OpenGl_FrameBuffer* theDrawFbo) } aCtx->ActiveProgram()->SetUniform (aCtx, "uMultL", aFilterL); aCtx->ActiveProgram()->SetUniform (aCtx, "uMultR", aFilterR); + break; } - - aPair[0]->ColorTexture()->Bind (aCtx, Graphic3d_TextureUnit_0); - aPair[1]->ColorTexture()->Bind (aCtx, Graphic3d_TextureUnit_1); - aVerts->BindVertexAttrib (aCtx, 0); - - aCtx->core20fwd->glDrawArrays (GL_TRIANGLE_STRIP, 0, 4); - - aVerts->UnbindVertexAttrib (aCtx, 0); - aPair[1]->ColorTexture()->Unbind (aCtx, Graphic3d_TextureUnit_1); - aPair[0]->ColorTexture()->Unbind (aCtx, Graphic3d_TextureUnit_0); + case Graphic3d_StereoMode_RowInterlaced: + { + Graphic3d_Vec2 aTexOffset = myRenderParams.ToSmoothInterlacing + ? Graphic3d_Vec2 (0.0f, -0.5f / float(aPair[0]->GetSizeY())) + : Graphic3d_Vec2(); + aCtx->ActiveProgram()->SetUniform (aCtx, "uTexOffset", aTexOffset); + break; + } + case Graphic3d_StereoMode_ColumnInterlaced: + { + Graphic3d_Vec2 aTexOffset = myRenderParams.ToSmoothInterlacing + ? Graphic3d_Vec2 (0.5f / float(aPair[0]->GetSizeX()), 0.0f) + : Graphic3d_Vec2(); + aCtx->ActiveProgram()->SetUniform (aCtx, "uTexOffset", aTexOffset); + break; + } + case Graphic3d_StereoMode_ChessBoard: + { + Graphic3d_Vec2 aTexOffset = myRenderParams.ToSmoothInterlacing + ? Graphic3d_Vec2 (0.5f / float(aPair[0]->GetSizeX()), + -0.5f / float(aPair[0]->GetSizeY())) + : Graphic3d_Vec2(); + aCtx->ActiveProgram()->SetUniform (aCtx, "uTexOffset", aTexOffset); + break; + } + default: break; } - else + + for (int anEyeIter = 0; anEyeIter < 2; ++anEyeIter) { - TCollection_ExtendedString aMsg = TCollection_ExtendedString() - + "Error! Anaglyph has failed"; - aCtx->PushMessage (GL_DEBUG_SOURCE_APPLICATION, - GL_DEBUG_TYPE_ERROR, - 0, - GL_DEBUG_SEVERITY_HIGH, - aMsg); + OpenGl_FrameBuffer* anEyeFbo = aPair[anEyeIter]; + anEyeFbo->ColorTexture()->Bind (aCtx, (Graphic3d_TextureUnit )(Graphic3d_TextureUnit_0 + anEyeIter)); + if (anEyeFbo->ColorTexture()->Sampler()->Parameters()->Filter() != Graphic3d_TOTF_BILINEAR) + { + // force filtering + anEyeFbo->ColorTexture()->Sampler()->Parameters()->SetFilter (Graphic3d_TOTF_BILINEAR); + aCtx->core20fwd->glTexParameteri (GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); + aCtx->core20fwd->glTexParameteri (GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); + } } + aVerts->BindVertexAttrib (aCtx, 0); + + aCtx->core20fwd->glDrawArrays (GL_TRIANGLE_STRIP, 0, 4); + + aVerts->UnbindVertexAttrib (aCtx, 0); + aPair[1]->ColorTexture()->Unbind (aCtx, Graphic3d_TextureUnit_1); + aPair[0]->ColorTexture()->Unbind (aCtx, Graphic3d_TextureUnit_0); } // ======================================================================= diff --git a/src/ViewerTest/ViewerTest_ViewerCommands.cxx b/src/ViewerTest/ViewerTest_ViewerCommands.cxx index 77520fe13c..3bf244970b 100644 --- a/src/ViewerTest/ViewerTest_ViewerCommands.cxx +++ b/src/ViewerTest/ViewerTest_ViewerCommands.cxx @@ -957,7 +957,7 @@ static int VInit (Draw_Interpretor& theDi, Standard_Integer theArgsNb, const cha Standard_Boolean isVirtual = false; Handle(V3d_View) aCopyFrom; TCollection_AsciiString aName, aValue; - int is2dMode = -1; + int is2dMode = -1, aDpiAware = -1; for (Standard_Integer anArgIt = 1; anArgIt < theArgsNb; ++anArgIt) { const TCollection_AsciiString anArg = theArgVec[anArgIt]; @@ -1039,6 +1039,10 @@ static int VInit (Draw_Interpretor& theDi, Standard_Integer theArgsNb, const cha { aDisplayName = theArgVec[++anArgIt]; } + else if (anArgCase == "-dpiaware") + { + aDpiAware = Draw::ParseOnOffIterator (theArgsNb, theArgVec, anArgIt) ? 1 : 0; + } else if (!ViewerTest::CurrentView().IsNull() && aCopyFrom.IsNull() && (anArgCase == "-copy" @@ -1098,12 +1102,44 @@ static int VInit (Draw_Interpretor& theDi, Standard_Integer theArgsNb, const cha } } +#if defined(_WIN32) + if (aDpiAware != -1) + { + typedef void* (WINAPI *SetThreadDpiAwarenessContext_t)(void*); + if (HMODULE aUser32Module = GetModuleHandleW (L"User32")) + { + SetThreadDpiAwarenessContext_t aSetDpiAware = (SetThreadDpiAwarenessContext_t )GetProcAddress (aUser32Module, "SetThreadDpiAwarenessContext"); + if (aDpiAware == 1) + { + // DPI_AWARENESS_CONTEXT_PER_MONITOR_AWARE_V2 + if (aSetDpiAware ((void* )-4) == NULL) + { + // DPI_AWARENESS_CONTEXT_PER_MONITOR_AWARE for older systems + if (aSetDpiAware ((void* )-3) == NULL) + { + Message::SendFail() << "Error: unable to enable DPI awareness"; + } + } + } + else + { + // DPI_AWARENESS_CONTEXT_UNAWARE + if (aSetDpiAware ((void* )-1) == NULL) + { + Message::SendFail() << "Error: unable to disable DPI awareness"; + } + } + } + } +#else + (void )aDpiAware; #if !defined(HAVE_XLIB) if (!aDisplayName.IsEmpty()) { aDisplayName.Clear(); Message::SendWarning() << "Warning: display parameter will be ignored.\n"; } +#endif #endif ViewerTest_Names aViewNames (aViewName); @@ -9373,15 +9409,60 @@ static int VStereo (Draw_Interpretor& theDI, TCollection_AsciiString aMode; switch (aView->RenderingParams().StereoMode) { - case Graphic3d_StereoMode_QuadBuffer : aMode = "quadBuffer"; break; - case Graphic3d_StereoMode_RowInterlaced : aMode = "rowInterlaced"; break; - case Graphic3d_StereoMode_ColumnInterlaced : aMode = "columnInterlaced"; break; - case Graphic3d_StereoMode_ChessBoard : aMode = "chessBoard"; break; - case Graphic3d_StereoMode_SideBySide : aMode = "sideBySide"; break; - case Graphic3d_StereoMode_OverUnder : aMode = "overUnder"; break; - case Graphic3d_StereoMode_SoftPageFlip : aMode = "softpageflip"; break; - case Graphic3d_StereoMode_OpenVR : aMode = "openVR"; break; - case Graphic3d_StereoMode_Anaglyph : + case Graphic3d_StereoMode_QuadBuffer: + { + aMode = "quadBuffer"; + break; + } + case Graphic3d_StereoMode_RowInterlaced: + { + aMode = "rowInterlaced"; + if (aView->RenderingParams().ToSmoothInterlacing) + { + aMode.AssignCat (" (smoothed)"); + } + break; + } + case Graphic3d_StereoMode_ColumnInterlaced: + { + aMode = "columnInterlaced"; + if (aView->RenderingParams().ToSmoothInterlacing) + { + aMode.AssignCat (" (smoothed)"); + } + break; + } + case Graphic3d_StereoMode_ChessBoard: + { + aMode = "chessBoard"; + if (aView->RenderingParams().ToSmoothInterlacing) + { + aMode.AssignCat (" (smoothed)"); + } + break; + } + case Graphic3d_StereoMode_SideBySide: + { + aMode = "sideBySide"; + break; + } + case Graphic3d_StereoMode_OverUnder: + { + aMode = "overUnder"; + break; + } + case Graphic3d_StereoMode_SoftPageFlip: + { + aMode = "softPageFlip"; + break; + } + case Graphic3d_StereoMode_OpenVR: + { + aMode = "openVR"; + break; + } + case Graphic3d_StereoMode_Anaglyph: + { aMode = "anaglyph"; switch (aView->RenderingParams().AnaglyphFilter) { @@ -9390,9 +9471,9 @@ static int VStereo (Draw_Interpretor& theDI, case Graphic3d_RenderingParams::Anaglyph_YellowBlue_Simple : aMode.AssignCat (" (yellowBlueSimple)"); break; case Graphic3d_RenderingParams::Anaglyph_YellowBlue_Optimized: aMode.AssignCat (" (yellowBlue)"); break; case Graphic3d_RenderingParams::Anaglyph_GreenMagenta_Simple : aMode.AssignCat (" (greenMagentaSimple)"); break; - default: break; + case Graphic3d_RenderingParams::Anaglyph_UserDefined : aMode.AssignCat (" (userDefined)"); break; } - default: break; + } } theDI << "Mode " << aMode << "\n"; } @@ -9441,27 +9522,12 @@ static int VStereo (Draw_Interpretor& theDI, } } else if (aFlag == "-reverse" + || aFlag == "-noreverse" || aFlag == "-reversed" - || aFlag == "-swap") - { - Standard_Boolean toEnable = Standard_True; - if (++anArgIter < theArgNb - && !Draw::ParseOnOff (theArgVec[anArgIter], toEnable)) - { - --anArgIter; - } - aParams->ToReverseStereo = toEnable; - } - else if (aFlag == "-noreverse" + || aFlag == "-swap" || aFlag == "-noswap") { - Standard_Boolean toDisable = Standard_True; - if (++anArgIter < theArgNb - && !Draw::ParseOnOff (theArgVec[anArgIter], toDisable)) - { - --anArgIter; - } - aParams->ToReverseStereo = !toDisable; + aParams->ToReverseStereo = Draw::ParseOnOffNoIterator (theArgNb, theArgVec, anArgIter); } else if (aFlag == "-mode" || aFlag == "-stereomode") @@ -9513,13 +9579,14 @@ static int VStereo (Draw_Interpretor& theDI, else if (aFlag == "-mirror" || aFlag == "-mirrorcomposer") { - Standard_Boolean toEnable = Standard_True; - if (++anArgIter < theArgNb - && !Draw::ParseOnOff (theArgVec[anArgIter], toEnable)) - { - --anArgIter; - } - aParams->ToMirrorComposer = toEnable; + aParams->ToMirrorComposer = Draw::ParseOnOffNoIterator (theArgNb, theArgVec, anArgIter);; + } + else if (aFlag == "-smooth" + || aFlag == "-nosmooth" + || aFlag == "-smoothinterlacing" + || aFlag == "-nosmoothinterlacing") + { + aParams->ToSmoothInterlacing = Draw::ParseOnOffNoIterator (theArgNb, theArgVec, anArgIter); } else if (anArgIter + 1 < theArgNb && (aFlag == "-unitfactor" @@ -13735,7 +13802,7 @@ Makes specified driver active when ActiveName argument is specified. addCmd ("vinit", VInit, /* [vinit] */ R"( vinit [-name viewName] [-left leftPx] [-top topPx] [-width widthPx] [-height heightPx] [-exitOnClose] [-closeOnEscape] [-cloneActive] [-virtual {on|off}=off] [-2d_mode {on|off}=off] - [-display displayName] + [-display displayName] [-dpiAware {on|off}] Creates new View window with specified name viewName. By default the new view is created in the viewer and in graphic driver shared with active view. -name {driverName/viewerName/viewName | viewerName/viewName | viewName} @@ -13751,6 +13818,7 @@ Display name will be used within creation of graphic driver, when specified. -closeOnEscape when specified, view will be closed on pressing Escape. -virtual create an offscreen window within interactive session -2d_mode when on, view will not react on rotate scene events + -dpiAware override dpi aware hint (Windows platform) Additional commands for operations with views: vclose, vactivate, vviewlist. )" /* [vinit] */); @@ -14061,7 +14129,7 @@ vfps [framesNb=100] [-duration seconds] : estimate average frame rate for active addCmd ("vstereo", VStereo, /* [vstereo] */ R"( vstereo [0|1] [-mode Mode] [-reverse {0|1}] [-mirrorComposer] [-hmdfov2d AngleDegrees] [-unitFactor MetersFactor] - [-anaglyph Filter] + [-anaglyph Filter] [-smoothInterlacing] Control stereo output mode. Available modes for -mode: quadBuffer OpenGL QuadBuffer stereo; requires driver support; @@ -14069,6 +14137,7 @@ Control stereo output mode. Available modes for -mode: anaglyph Anaglyph glasses, filters for -anaglyph: redCyan, redCyanSimple, yellowBlue, yellowBlueSimple, greenMagentaSimple. rowInterlaced row-interlaced display + smooth smooth interlaced output for better text readability columnInterlaced column-interlaced display chessBoard chess-board output sideBySide horizontal pair diff --git a/tests/opengl/data/general/stereo b/tests/opengl/data/general/stereo index 493b8dd80f..19ad87e2ab 100644 --- a/tests/opengl/data/general/stereo +++ b/tests/opengl/data/general/stereo @@ -18,15 +18,24 @@ vstereo -mode anaglyph vfit vdump $::imagedir/${::casename}_anaglyph.png -stereo blend -vstereo -mode columnInterlaced +vstereo -mode columnInterlaced -smooth 0 vdump $::imagedir/${::casename}_col.png -stereo blend -vstereo -mode chessBoard +vstereo -mode columnInterlaced -smooth 1 +vdump $::imagedir/${::casename}_col_smooth.png -stereo blend + +vstereo -mode chessBoard -smooth 0 vdump $::imagedir/${::casename}_chess.png -stereo blend -vstereo -mode rowInterlaced +vstereo -mode chessBoard -smooth 1 +vdump $::imagedir/${::casename}_chess_smooth.png -stereo blend + +vstereo -mode rowInterlaced -smooth 0 vdump $::imagedir/${::casename}_row.png -stereo blend +vstereo -mode rowInterlaced -smooth 1 +vdump $::imagedir/${::casename}_row_smooth.png -stereo blend + vstereo -mode sideBySide vdump $::imagedir/${::casename}_sbs_anamorph.png -stereo blend From ba9548c55b89f8c185f5ff1e0d71575a3c7f3d60 Mon Sep 17 00:00:00 2001 From: kgv Date: Thu, 13 Jan 2022 15:51:40 +0300 Subject: [PATCH 196/639] 0032668: Documentation - add tutorial for creating a custom AIS Interactive Object --- dox/FILES_HTML.txt | 1 + dox/samples/ais_object.md | 911 ++++++++++++++++++ .../images/ais_object_step1_bndbox.png | Bin 0 -> 3169 bytes .../images/ais_object_step1_highlight.png | Bin 0 -> 14313 bytes .../images/ais_object_step1_shaded.png | Bin 0 -> 3308 bytes .../images/ais_object_step1_shaded_wf.png | Bin 0 -> 5330 bytes .../images/ais_object_step2_segments.png | Bin 0 -> 3706 bytes .../images/ais_object_step3_quadrics_10.png | Bin 0 -> 5872 bytes .../images/ais_object_step3_quadrics_25.png | Bin 0 -> 5873 bytes .../images/ais_object_step3_quadrics_disk.png | Bin 0 -> 4652 bytes .../images/ais_object_step3_quadrics_fin.png | Bin 0 -> 4625 bytes .../images/ais_object_step4_highlight1.png | Bin 0 -> 3734 bytes .../images/ais_object_step4_highlight2.png | Bin 0 -> 6179 bytes .../images/ais_object_step4_highlight3.png | Bin 0 -> 4024 bytes dox/samples/samples.md | 3 + src/QADraw/FILES | 2 +- src/QADraw/QADraw.cxx | 28 +- src/QADraw/QADraw.hxx | 34 +- src/QADraw/QADraw_Additional.cxx | 29 - src/QADraw/QADraw_Tutorials.cxx | 349 +++++++ tests/demo/samples/aisobject | 14 + 21 files changed, 1303 insertions(+), 68 deletions(-) create mode 100644 dox/samples/ais_object.md create mode 100644 dox/samples/images/ais_object_step1_bndbox.png create mode 100644 dox/samples/images/ais_object_step1_highlight.png create mode 100644 dox/samples/images/ais_object_step1_shaded.png create mode 100644 dox/samples/images/ais_object_step1_shaded_wf.png create mode 100644 dox/samples/images/ais_object_step2_segments.png create mode 100644 dox/samples/images/ais_object_step3_quadrics_10.png create mode 100644 dox/samples/images/ais_object_step3_quadrics_25.png create mode 100644 dox/samples/images/ais_object_step3_quadrics_disk.png create mode 100644 dox/samples/images/ais_object_step3_quadrics_fin.png create mode 100644 dox/samples/images/ais_object_step4_highlight1.png create mode 100644 dox/samples/images/ais_object_step4_highlight2.png create mode 100644 dox/samples/images/ais_object_step4_highlight3.png delete mode 100644 src/QADraw/QADraw_Additional.cxx create mode 100644 src/QADraw/QADraw_Tutorials.cxx create mode 100644 tests/demo/samples/aisobject diff --git a/dox/FILES_HTML.txt b/dox/FILES_HTML.txt index d8c8a633a8..487bef712a 100644 --- a/dox/FILES_HTML.txt +++ b/dox/FILES_HTML.txt @@ -22,6 +22,7 @@ samples/samples.md samples/ocaf.md samples/ocaf_func.md samples/draw_scripts.md +samples/ais_object.md samples/novice_guide.md tutorial/tutorial.md diff --git a/dox/samples/ais_object.md b/dox/samples/ais_object.md new file mode 100644 index 0000000000..cf5a17e7c5 --- /dev/null +++ b/dox/samples/ais_object.md @@ -0,0 +1,911 @@ +AIS: Custom Presentation {#tutorials__ais_object} +======== + +@tableofcontents + +@section intro Getting Started + +OCCT provides a strong set of built-in Interactive Objects for rapid application development, +but the real power and flexibility of **Application Interactive Services** (@c AIS) could be revealed by subclassing and implementing custom presentations. +In this tutorial we will focus on the development of a custom @c AIS_InteractiveObject and show the basics step by step. + +Let's start from the very beginning and try subclassing @c AIS_InteractiveObject object: + +~~~~{.cpp} +class MyAisObject : public AIS_InteractiveObject +{ + DEFINE_STANDARD_RTTI_INLINE(MyAisObject, AIS_InteractiveObject) +public: + MyAisObject() {} +public: + virtual void Compute (const Handle(PrsMgr_PresentationManager)& thePrsMgr, + const Handle(Prs3d_Presentation)& thePrs, + const Standard_Integer theMode) override {} + + virtual void ComputeSelection (const Handle(SelectMgr_Selection)& theSel, + const Standard_Integer theMode) override {} + + virtual bool AcceptDisplayMode (const Standard_Integer theMode) const override + { return true; } +}; +~~~~ + +@c DEFINE_STANDARD_RTTI_INLINE() macro will register the new class within the OCCT Run-Time Type Information (RTTI) system. +This step is optional (you may skip it if you are not going to use methods like @c Standard_Transient::DynamicType() in application code), but it is a common practice while subclassing OCCT classes. + +The @c AIS_InteractiveObject interface defines only a couple of pure virtual methods - @c @::Compute() defining an object presentation and @c @::ComputeSelection() defining a selectable (pickable) volume. +Selection and presentation are two independent mechanisms in **AIS**. Presentation rendering is done with help of OpenGL or a similar low-level graphics library, while selection doesn't depend on a graphic driver at all. +Providing an empty implementation of these two methods would be enough for adding the object to @c AIS_InteractiveContext (@c @::Display()), but obviously nothing will appear on the screen. + +@section prs_builders Presentation builders + +To go ahead, we need to define some presentation of our object. +OCCT provides a set of presentation building tools for common elements like arrows, shapes, boxes, etc. +These tools could be found within @c Prs3d, @c StdPrs and @c DsgPrs packages: + +- **Prs3d** + provides builders for simple geometric elements. + - @c Prs3d_Arrow, @c Prs3d_BndBox, @c Prs3d_Point, @c Prs3d_Text, @c Prs3d_ToolCylinder, @c Prs3d_ToolDisk, @c Prs3d_ToolSector, @c Prs3d_ToolSphere, @c Prs3d_ToolTorus +- **StdPrs** + provides builders for analytical geometry and B-Rep shapes (@c TopoDS_Shape). + - @c StdPrs_WFShape, @c StdPrs_ShadedShape, @c StdPrs_BRepTextBuilder +- **DsgPrs** + provides builders for datums, dimensions and relations. + +Presentation builders are reusable bricks for constructing @c AIS objects. +Standard OCCT interactive objects highly rely on them, so that you may easily replicate @c AIS_Shape presentation for displaying a shape with just a couple of lines calling @c StdPrs_ShadedShape: + +~~~~{.cpp} +void MyAisObject::Compute (const Handle(PrsMgr_PresentationManager)& thePrsMgr, + const Handle(Prs3d_Presentation)& thePrs, + const Standard_Integer theMode) +{ + TopoDS_Shape aShape = BRepPrimAPI_MakeCylinder (100.0, 100.0); + StdPrs_ShadedShape::Add (thePrs, aShape, myDrawer); +} +... +Handle(AIS_InteractiveContext) theCtx; +Handle(MyAisObject) aPrs = new MyAisObject(); +theCtx->Display (aPrs, true); +~~~~ + +@figure{ais_object_step1_shaded.png,"@c StdPrs_ShadedShape presentation builder.",409} height=409px + +@c PrsMgr_PresentableObject::Compute() method takes three arguments: +- **Presentation Manager** (@c PrsMgr_PresentationManager). + Rarely used parameter, but might be necessary for some advanced use cases. +- **Presentation** (@c Prs3d_Presentation or @c Graphic3d_Structure). + Defines the structure to fill in with presentation elements. +- **Display Mode** (integer number). + Specifies the display mode to compute. + **0** is a default display mode, if not overridden by @c AIS_InteractiveObject::SetDisplayMode() or by @c AIS_InteractiveContext::Display(). + +For each supported display mode, the **Presentation Manager** creates a dedicated @c Prs3d_Presentation and stores it within the object itself as a list of presentations @c PrsMgr_PresentableObject::Presentations(). +It is a good practice to reject unsupported display modes within @c @::Compute() method: + +~~~~{.cpp} +void MyAisObject::Compute (const Handle(PrsMgr_PresentationManager)& thePrsMgr, + const Handle(Prs3d_Presentation)& thePrs, + const Standard_Integer theMode) +{ + if (theMode != 0) { return; } // reject non-zero display modes + + TopoDS_Shape aShape = BRepPrimAPI_MakeCylinder (100.0, 100.0); + StdPrs_ShadedShape::Add (thePrs, aShape, myDrawer); +} +~~~~ + +This wouldn't, however, prevent application from displaying the object with another display mode like this: + +~~~~{.cpp} +Handle(AIS_InteractiveContext) theCtx; +Handle(MyAisObject) aPrs = new MyAisObject(); +theCtx->Display (aPrs, 100, -1, true); +~~~~ + +The code above will display @c MyAisObject with display mode equal to 100, and after @c @::Compute() modifications nothing will be displayed on the screen. +@c AIS will still create a presentation with specified display mode, but it will be empty - method @c @::AcceptDisplayMode() could be overridden to disallow even creation of an empty presentation: + +~~~~{.cpp} +bool MyAisObject::AcceptDisplayMode (const Standard_Integer theMode) const +{ + return theMode == 0; // reject non-zero display modes +} +~~~~ + +@c AIS_InteractiveContext::Display() checks if requested display mode is actually supported by the object, and uses default display mode (_**0**_) if it is not. +@c StdPrs_ShadedShape prepares a shaded (triangulated) presentation of a shape, while @c StdPrs_WFShape creates a wireframe presentation with B-Rep wire boundaries: + +~~~~{.cpp} +void MyAisObject::Compute (const Handle(PrsMgr_PresentationManager)& thePrsMgr, + const Handle(Prs3d_Presentation)& thePrs, + const Standard_Integer theMode) +{ + if (!AcceptDisplayMode (theMode)) { return; } + + TopoDS_Shape aShape = BRepPrimAPI_MakeCylinder (100.0, 100.0); + StdPrs_ShadedShape::Add (thePrs, aShape, myDrawer); // add shading + StdPrs_WFShape::Add (thePrs, aShape, myDrawer); // add wireframe +} +~~~~ + +@figure{ais_object_step1_shaded_wf.png,"Result of @c StdPrs_ShadedShape + @c StdPrs_WFShape presentation builders.",409} height=409px + +Presentation builders take the @c Prs3d_Drawer object defining various attributes - material of shaded shape, number of isolines in wireframe mode, tessellation quality, line colors and many others. +@c PrsMgr_PresentableObject defines @c myDrawer property with default attributes. +@c StdPrs makes it easy to display topological shapes. +With the help of @c Prs3d tools we may display elements like arrows, boxes or text labels. +Let's extend our presentation with a second **display mode 1** showing a bounding box using @c Prs3d_BndBox builder: + +~~~~{.cpp} +bool MyAisObject::AcceptDisplayMode (const Standard_Integer theMode) const +{ + return theMode == 0 || theMode == 1; +} +void MyAisObject::Compute (const Handle(PrsMgr_PresentationManager)& thePrsMgr, + const Handle(Prs3d_Presentation)& thePrs, + const Standard_Integer theMode) +{ + TopoDS_Shape aShape = BRepPrimAPI_MakeCylinder (100.0, 100.0); + if (theMode == 0) + { + StdPrs_ShadedShape::Add (thePrs, aShape, myDrawer); + StdPrs_WFShape::Add (thePrs, aShape, myDrawer); // add wireframe + } + else if (theMode == 1) + { + Bnd_Box aBox; + BRepBndLib::Add (aShape, aBox); + Prs3d_BndBox::Add (thePrs, aBox, myDrawer); + } +} +~~~~ + +Now, displaying an object with **display mode 1** will show a box: + +~~~~{.cpp} +Handle(AIS_InteractiveContext) theCtx; +Handle(MyAisObject) aPrs = new MyAisObject(); +theCtx->Display (aPrs, 1, 0, true); +~~~~ + +@figure{ais_object_step1_bndbox.png,"@c Prs3d_BndBox presentation builder.",409} height=409px + +@c AIS disallows activating multiple display modes at the same time, so that these presentation modes should be alternatives to each other. +But @c AIS may use non-active display mode for highlighting purposes - like wireframe (@c AIS_Wireframe) presentation displayed on top of shaded (@c AIS_Shaded) presentation for selected @c AIS_Shape objects. + +Let's define a dedicated enumeration for display modes supported by our interactive object and setup the 1st (@c MyDispMode_Highlight) display mode for highlighting with help of @c PrsMgr_PresentableObject::SetHilightMode(): + +~~~~{.cpp} +class MyAisObject : public AIS_InteractiveObject +{ +public: + enum MyDispMode { MyDispMode_Main = 0, MyDispMode_Highlight = 1 }; + +... + +MyAisObject::MyAisObject() +{ + SetDisplayMode (MyDispMode_Main); // main (active) display mode + SetHilightMode (MyDispMode_Highlight); // auxiliary (highlighting) mode +} + +... + +Handle(AIS_InteractiveContext) theCtx; +Handle(MyAisObject) aPrs = new MyAisObject(); +theCtx->Display (aPrs, MyAisObject::MyDispMode_Main, 0, false); +theCtx->HilightWithColor (aPrs, aPrs->HilightAttributes(), false); +theCtx->CurrentViewer()->Redraw(); +~~~~ + +@figure{ais_object_step1_highlight.png,"Highlighting by color (left) and highlighting by another display mode (right).",818} height=409px + +In this particular use case we've used the method @c AIS_InteractiveContext::HilightWithColor() instead of @c @::SetSelected() - just because our object is not selectable yet and @c @::SetSelected() wouldn't work. +Highlighted presentation appears on the screen with modulated color (see left screenshot above). +Using a dedicated display mode for highlighting (right screenshot above) allows customizing presentation in selected / highlighted states. + +@section prim_arrays Primitive arrays + +@c Prs3d_Presentation might be filled in by the following **primitives**: +- **Triangles** + - @c Graphic3d_ArrayOfTriangles + - @c Graphic3d_ArrayOfTriangleFans + - @c Graphic3d_ArrayOfTriangleStrips +- **Lines** + - @c Graphic3d_ArrayOfSegments + - @c Graphic3d_ArrayOfPolylines +- **Points** or **Markers** + - @c Graphic3d_ArrayOfPoints + +This triplet of primitives is what graphics hardware is capable of rendering, so that it could be transferred directly to low-level graphics libraries in the form of *Vertex Buffer Objects* (VBO). +Each **primitive array** consists of an array of vertex attributes (_**position**, **normal**, **texture coordinates**, **vertex colors**_, etc.) and optional **array of indices**. +The latter one avoids duplicating vertices shared between connected elements (triangles, polylines) in attributes array. + +@c Graphic3d_ArrayOfPrimitives and it's subclasses provide a convenient interface for filling in primitive arrays: +- Constructor takes a number of vertices, number of edges (indices) and a bitmask of optional vertex attributes. +- @c Graphic3d_ArrayOfPrimitives::AddVertex() appends a vertex with specified attributes to the end of the array (within the range specified at construction time). +- @c Graphic3d_ArrayOfPrimitives::AddEdges() appends indices, starting with 1. + Each line segment is defined by two consequential edges, each triangle is defined by three consequential edges. + +Let's extend our sample and display a cylinder section contour defined by array of indexed segments (e.g. a polyline of four vertices): + +~~~~{.cpp} +void MyAisObject::Compute (const Handle(PrsMgr_PresentationManager)& thePrsMgr, + const Handle(Prs3d_Presentation)& thePrs, + const Standard_Integer theMode) +{ + const double aRadius = 100.0, aHeight = 100.0; + TopoDS_Shape aShape = BRepPrimAPI_MakeCylinder (aRadius, aHeight); + if (theMode == MyDispMode_Main) + { + StdPrs_ShadedShape::Add (thePrs, aShape, myDrawer); + //StdPrs_WFShape::Add (thePrs, aShape, myDrawer); + Handle(Graphic3d_ArrayOfSegments) aSegs = new Graphic3d_ArrayOfSegments (4, 4 * 2, Graphic3d_ArrayFlags_None); + aSegs->AddVertex (gp_Pnt (0.0, -aRadius, 0.0)); + aSegs->AddVertex (gp_Pnt (0.0, -aRadius, aHeight)); + aSegs->AddVertex (gp_Pnt (0.0, aRadius, aHeight)); + aSegs->AddVertex (gp_Pnt (0.0, aRadius, 0.0)); + aSegs->AddEdges (1, 2); + aSegs->AddEdges (2, 3); + aSegs->AddEdges (3, 4); + aSegs->AddEdges (4, 1); + Handle(Graphic3d_Group) aGroupSegs = thePrs->NewGroup(); + aGroupSegs->SetGroupPrimitivesAspect (myDrawer->WireAspect()->Aspect()); + aGroupSegs->AddPrimitiveArray (aSegs); + } + else if (theMode == MyDispMode_Highlight) { ... } +} +~~~~ + +@figure{ais_object_step2_segments.png,"Displaying @c Graphic3d_ArrayOfSegments.",409} height=409px + +The process is quite straightforward: +- Create a new @c Graphic3d_Group using @c Prs3d_Presentation::NewGroup(); +- Specify presentation aspects using @c Graphic3d_Group::SetGroupPrimitivesAspect(); +- Create and add an array of primitives using @c Graphic3d_Group::AddPrimitiveArray(). + +Standard presentation builders like @c StdPrs_ShadedShape / @c StdPrs_WFShape internally do exactly the same thing - a tessellated representation of a shape is added to presentation in form of triangles (shaded), +line segments (wireframe and free edges) and markers (free shape vertices). + +A single @c Graphic3d_Group normally defines just a single primitive array, but it is technically possible adding more arrays to the same group @c Graphic3d_Group::AddPrimitiveArray() +and with different aspects @c Graphic3d_Group::SetPrimitivesAspect(), which might be considered in advanced scenarios. + +Method @c Graphic3d_Group::AddText() allows adding text labels to a presentation. +Internally, text labels are rendered as an array of textured triangles using texture atlas created from a font, but this complex logic is hidden from the user. + +@section prim_aspects Primitive aspects + +@c Graphic3d_Aspects is a class defining **display properties** of a primitive array (@c Graphic3d_Group::SetGroupPrimitivesAspect()) - +_**material**, **shading model**, **color**, **texture maps**, **blending mode**, **line width**_ and others. + +There are also subclasses @c Graphic3d_AspectFillArea3d (triangles), @c Graphic3d_AspectLine3d (lines), @c Graphic3d_AspectMarker3d (markers) +and @c Graphic3d_AspectText3d (text labels) defined as specializations for a specific primitive array type. +These subclasses exist for historical reasons and are treated by renderers in exactly the same way. + +It is technically possible to create transient aspects directly within @c @::Compute() method like this: + +~~~~{.cpp} +void MyAisObject::Compute (const Handle(PrsMgr_PresentationManager)& thePrsMgr, + const Handle(Prs3d_Presentation)& thePrs, + const Standard_Integer theMode) +{ + Handle(Graphic3d_Aspects) anAspects = new Graphic3d_Aspects(); + anAspects->SetShadingModel (Graphic3d_TypeOfShadingModel_Unlit); + anAspects->SetColor (Quantity_NOC_RED); + Handle(Graphic3d_Group) aGroup = thePrs->NewGroup(); + aGroup->SetGroupPrimitivesAspect (anAspects); + ... +} +~~~~ + +While this code would work as expected, but prevents further dynamic updates of presentation aspects without recomputing entire presentation. +Instead, it is preferred taking attributes from @c PrsMgr_PresentableObject::myDrawer / @c @::Attributes() or storing custom attributes as class fields. +@c Prs3d_Drawer defines a set of attributes used by @c AIS presentation builders, but the same parameters might be used by a custom builder as well. + +It is also preferred preallocating attributes in the class constructor. +This would allow changing attributes without recomputing the entire presentation - just by calling @c PrsMgr_PresentableObject::SynchronizeAspects() after modifications. +Our custom object uses @c myDrawer->ShadingAspect() and @c myDrawer->WireAspect() aspects, so let's initialize them explicitly - assign silver material for shading and green color to line segments: + +~~~~{.cpp} +MyAisObject::MyAisObject() +{ + SetHilightMode (MyDispMode_Highlight); + myDrawer->SetupOwnShadingAspect(); + myDrawer->ShadingAspect()->SetMaterial (Graphic3d_NameOfMaterial_Silver); + myDrawer->SetWireAspect (new Prs3d_LineAspect (Quantity_NOC_GREEN, Aspect_TOL_SOLID, 2.0)); +} +~~~~ + +@section quadric_builders Quadric builders + +Previously, we've used @c StdPrs_ShadedShape for displaying cylinder geometry. +The @c Prs3d package provides a simpler way for displaying geometry like cylinders, spheres and toruses - based on the @c Prs3d_ToolQuadric interface. +This interface allows bypassing creation of a complex B-Rep (@c TopoDS_Shape) definition of a simple geometry, and to avoid using general-purpose tessellators like @c BRepMesh. + +> This difference could be negligible for a small number of such objects, but might become considerable for larger amounts. +> The B-Rep definition of a valid cylinder includes 2 unique @c TopoDS_Vertex, 3 @c TopoDS_Edge, 3 @c TopoDS_Wire, 3 @c TopoDS_Face, 1 @c TopoDS_Shell and 1 @c TopoDS_Solid. +> Internally each @c TopoDS_Edge also defines curves (@c Geom_Curve as well as 2D parametric @c Geom2d_Curve) and each @c TopoDS_Face defines analytical surface (@c Geom_Surface). +> Meshing such geometry with the help of @c BRepMesh is much more complicated than one may think. +> A plenty of data structures (memory!) and computations (time!) for displaying a geometry that could be triangulated by a simple for loop. + +@c Prs3d_ToolQuadric solves this problem by creating a triangulation for such kinds of shapes in a straight-forward way. +Let's try using @c Prs3d_ToolCylinder in our sample: + +~~~~{.cpp} +void MyAisObject::Compute (const Handle(PrsMgr_PresentationManager)& thePrsMgr, + const Handle(Prs3d_Presentation)& thePrs, + const Standard_Integer theMode) +{ + const double aRadius = 100.0, aHeight = 100.0; + TopoDS_Shape aShape = BRepPrimAPI_MakeCylinder (aRadius, aHeight); + if (theMode == MyDispMode_Main) + { + //StdPrs_ShadedShape::Add (thePrs, aShape, myDrawer); // add shading + //StdPrs_WFShape::Add (thePrs, aShape, myDrawer); // add wireframe + Handle(Graphic3d_ArrayOfTriangles) aTris = + Prs3d_ToolCylinder::Create (aRadius, aRadius, aHeight, 10, 10, gp_Trsf()); + Handle(Graphic3d_Group) aGroupTris = thePrs->NewGroup(); + aGroupTris->SetGroupPrimitivesAspect (myDrawer->ShadingAspect()->Aspect()); + aGroupTris->AddPrimitiveArray (aTris); + ... + } + ... +} +~~~~ + +@figure{ais_object_step3_quadrics_10.png,"@c Prs3d_ToolCylinder (10 slices).",409} height=409px + +Well... that looks a little bit edgy. +Quadric builder creates a triangulation taking the following parameters: +- Geometry parameters. + (in case of a cylinder - base radius, top radius and height). +- Number of subdivisions along U (slices) and V (stacks) parameters. + In some cases only one parametric scope matters. +- Transformation @c gp_Trsf to apply + (original geometry is defined within some reference coordinate system). + +Let's increase number of subdivisions from _10_ to _25_: +~~~~{.cpp} +Handle(Graphic3d_ArrayOfTriangles) aTris = + Prs3d_ToolCylinder::Create (aRadius, aRadius, aHeight, 25, 25, gp_Trsf()); +~~~~ + +@figure{ais_object_step3_quadrics_25.png,"@c Prs3d_ToolCylinder (25 slices).",409} height=409px + +It looks much better now! Note that @c Prs3d_ToolCylinder could be used for building both cones and cylinders depending on top/bottom radius definition. + +There is one issue though - our cylinder doesn't have top and bottom anymore! +To fix this problem we will use one more quadric builder @c Prs3d_ToolDisk: + +~~~~{.cpp} +void MyAisObject::Compute (const Handle(PrsMgr_PresentationManager)& thePrsMgr, + const Handle(Prs3d_Presentation)& thePrs, + const Standard_Integer theMode) +{ + const double aRadius = 100.0, aHeight = 100.0; + if (theMode == MyDispMode_Main) + { + Prs3d_ToolCylinder aCyl (aRadius, aRadius, aHeight, 25, 25); + Prs3d_ToolDisk aDisk (0.0, aRadius, 25, 1); + + Handle(Graphic3d_ArrayOfTriangles) aTris = + new Graphic3d_ArrayOfTriangles (aCyl.VerticesNb() + 2 * aDisk.VerticesNb(), + 3 * (aCyl.TrianglesNb() + 2 * aDisk.TrianglesNb()), + Graphic3d_ArrayFlags_VertexNormal); + aCyl .FillArray (aTris, gp_Trsf()); + aDisk.FillArray (aTris, gp_Trsf()); + + gp_Trsf aDisk2Trsf; + aDisk2Trsf.SetTransformation (gp_Ax3 (gp_Pnt (0.0, 0.0, aHeight), -gp::DZ(), gp::DX()), gp::XOY()); + aDisk.FillArray (aTris, aDisk2Trsf); + + Handle(Graphic3d_Group) aGroupTris = thePrs->NewGroup(); + aGroupTris->SetGroupPrimitivesAspect (myDrawer->ShadingAspect()->Aspect()); + aGroupTris->AddPrimitiveArray (aTris); + aGroupTris->SetClosed (true); + ... + } +} +~~~~ + +Now our cylinder looks solid! The sample above merges two triangulations into a single one instead of appending each primitive array individually. + +This looks like a minor difference, but it might have a _dramatic impact on performance_ in case of a large scene, +as each `Graphic3d_ArrayOfPrimitives` is mapped into a dedicated draw call at graphic driver (OpenGL) level. + +@figure{ais_object_step3_quadrics_fin.png,"@c Prs3d_ToolCylinder + @c Prs3d_ToolDisk.",409} height=409px + +As an exercise, let's try computing a triangulation for cylinder disk without help of @c Prs3d_ToolDisk builder: + +~~~~{.cpp} +void MyAisObject::Compute (const Handle(PrsMgr_PresentationManager)& thePrsMgr, + const Handle(Prs3d_Presentation)& thePrs, + const Standard_Integer theMode) +{ + const double aRadius = 100.0, aHeight = 100.0; + if (theMode == MyDispMode_Main) + { + const int aNbSlices = 25; + Prs3d_ToolCylinder aCyl (aRadius, aRadius, aHeight, aNbSlices, aNbSlices); + Handle(Graphic3d_ArrayOfTriangles) aTris = + new Graphic3d_ArrayOfTriangles (aCyl.VerticesNb(), + 3 * (aCyl.TrianglesNb()), + Graphic3d_ArrayFlags_VertexNormal); + aCyl.FillArray (aTris, gp_Trsf()); + + Handle(Graphic3d_ArrayOfTriangles) aTris2 = + new Graphic3d_ArrayOfTriangles (aNbSlices + 1, aNbSlices * 3, Graphic3d_ArrayFlags_VertexNormal); + aTris2->AddVertex (gp_Pnt (0.0, 0.0, aHeight), -gp::DZ()); + for (int aSliceIter = 0; aSliceIter < aNbSlices; ++aSliceIter) + { + double anAngle = M_PI * 2.0 * double(aSliceIter) / double(aNbSlices); + aTris2->AddVertex (gp_Pnt (Cos (anAngle) * aRadius, Sin (anAngle) * aRadius, aHeight), -gp::DZ()); + } + for (int aSliceIter = 0; aSliceIter < aNbSlices; ++aSliceIter) + { + aTris2->AddEdges (1, aSliceIter + 2, aSliceIter + 1 < aNbSlices ? (aSliceIter + 3) : 2); + } + + Handle(Graphic3d_Group) aGroupTris = thePrs->NewGroup(); + aGroupTris->SetGroupPrimitivesAspect (myDrawer->ShadingAspect()->Aspect()); + aGroupTris->AddPrimitiveArray (aTris); + aGroupTris->AddPrimitiveArray (aTris2); + ... + } +} +~~~~ + +@figure{ais_object_step3_quadrics_disk.png,"Manually triangulated disk.",409} height=409px + +The disk is here, but it has a strange color - like it is not affected by lighting. +This happens when vertex normals are defined incorrectly. +In our case we defined disk normal as @c -DZ (see the second argument of @c Graphic3d_ArrayOfTriangles::AddVertex()), +but normal direction should be also aligned to triangulation winding rule. +Graphic driver defines the front side of triangle using clockwise order of triangle nodes, and normal should be defined for a front side of triangle - e.g. it should be @c gp::DZ() in our case. +After reversing vertex normal direction, cylinder looks exactly like when @c Prs3d_ToolDisk was used. + +Front / back face orientation might be displayed using different material based on @c Graphic3d_Aspects::SetDistinguish() flag and @c @::FrontMaterial() / @c @::BackMaterial() setup. + +@section ais_selection Computing selection +In the first part of the tutorial we have created a custom @c AIS object @c MyAisObject computing presentation by implementing the @c PrsMgr_PresentableObject::Compute() interface. +In this part we will extend our object with interactive capabilities and make it selectable through implementing @c SelectMgr_SelectableObject interface. + +Let's do the first step and put into @c @::ComputeSelection() method some logic. +This method should fill in the @c SelectMgr_Selection argument with @c SelectMgr_SensitiveEntity entities defining selectable elements - triangulations, polylines, points and their composition. +@c Select3D_SensitiveBox is probably the simplest way to define selectable volume - by it's bounding box: + +~~~~{.cpp} +void MyAisObject::ComputeSelection (const Handle(SelectMgr_Selection)& theSel, + const Standard_Integer theMode) +{ + const double aRadius = 100.0, aHeight = 100.0; + TopoDS_Shape aShape = BRepPrimAPI_MakeCylinder (aRadius, aHeight); + Bnd_Box aBox; + BRepBndLib::Add (aShape, aBox); + Handle(SelectMgr_EntityOwner) anOwner = new SelectMgr_EntityOwner (this); + Handle(Select3D_SensitiveBox) aSensBox = new Select3D_SensitiveBox (anOwner, aBox); + theSel->Add (aSensBox); +} +~~~~ + +@c SelectMgr_EntityOwner is a key object in selection logic - it serves as an identifier of a pickable object or it's part. +You may see this object in methods like @c AIS_InteractiveContext::DetectedOwner(), **Owners** are stored within the list of selection objects @c AIS_Selection +and it received by methods like @c AIS_InteractiveContext::SetSelected() and @c AIS_InteractiveContext::AddOrRemoveSelected(). +From the Selector's point of view, @c AIS_InteractiveObject is just a drawer for @c SelectMgr_EntityOwner. + +The _**0th selection mode**_ normally defines a single Owner of the entire object. +To make a composite object selectable as whole, we add to Selection as many SensitiveEntity as necessary referring to the same Owner. +It might look confusing from first glance, that @c SelectMgr_SensitiveEntity stores @c SelectMgr_EntityOwner as a class field, and not in the opposite way +(@c SelectMgr_EntityOwner doesn't store the list of @c SelectMgr_SensitiveEntity defining it's picking volume). + +For local selection (selection of object parts) we create individual Owners for each part and add SensitiveEntity to Selection in the same way. +Owner may store an additional identifier as a class field, like @c StdSelect_BRepOwner stores @c TopoDS_Shape as an identifier of picked sub-shape with @c AIS_Shape object. + +In a similar way as @c StdPrs_ShadedShape is a **presentation builder** for @c TopoDS_Shape, the @c StdSelect_BRepSelectionTool can be seen as a standard **selection builder** for shapes: + +~~~~{.cpp} +void MyAisObject::ComputeSelection (const Handle(SelectMgr_Selection)& theSel, + const Standard_Integer theMode) +{ + const double aRadius = 100.0, aHeight = 100.0; + TopoDS_Shape aShape = BRepPrimAPI_MakeCylinder (aRadius, aHeight); + Standard_Real aDefl = StdPrs_ToolTriangulatedShape::GetDeflection (aShape, myDrawer); + StdSelect_BRepSelectionTool::Load (theSel, this, aShape, TopAbs_SHAPE, aDefl, + myDrawer->DeviationAngle(), + myDrawer->IsAutoTriangulation()); +} +~~~~ + +Internally, @c StdSelect_BRepSelectionTool iterates over sub-shapes and appends to the Selection (@c theSel) entities like @c Select3D_SensitiveTriangulation (for faces) and @c Select3D_SensitiveCurve (for edges). + +Previously, we have used @c Prs3d_ToolCylinder to triangulate a cylinder, so let's try to construct @c Select3D_SensitivePrimitiveArray from the same triangulation: + +~~~~{.cpp} +void MyAisObject::ComputeSelection (const Handle(SelectMgr_Selection)& theSel, + const Standard_Integer theMode) +{ + const double aRadius = 100.0, aHeight = 100.0; + Handle(SelectMgr_EntityOwner) anOwner = new SelectMgr_EntityOwner (this); + Handle(Graphic3d_ArrayOfTriangles) aTris = + Prs3d_ToolCylinder::Create (aRadius, aRadius, aHeight, 25, 25, gp_Trsf()); + Handle(Select3D_SensitivePrimitiveArray) aSensTri = + new Select3D_SensitivePrimitiveArray (anOwner); + aSensTri->InitTriangulation (aTris->Attributes(), aTris->Indices(), + TopLoc_Location()); + theSel->Add (aSensTri); +} +~~~~ + +Selection is computed independently from presentation, so that they don't have to match each other. +But inconsistency between presentation and selection might confuse a user, when he will not be able to pick an object clearly displayed under the mouse cursor. +These issues might happen, for example, when selection uses tessellated representation of the same geometry computed with different parameters (different number of subdivisions, or different deflection parameters). + +As in case of @c @::Compute(), it makes sense defining some enumeration of **selection modes** supported by specific object and reject unsupported ones to avoid unexpected behavior: + +~~~~{.cpp} +void MyAisObject::ComputeSelection (const Handle(SelectMgr_Selection)& theSel, + const Standard_Integer theMode) +{ + if (theMode != 0) { return; } + ... +} +~~~~ + +Unlike display modes, @c AIS_InteractiveContext allows activating an arbitrary combination of selection modes. +A user should be careful to activate only the modes that actually make sense and may work together. + +Selection mode to activate could be specified while displaying the object (passing _**-1**_ instead of _**0**_ would display an object with deactivated selection): + +~~~~{.cpp} +Handle(AIS_InteractiveContext) theCtx; +Handle(MyAisObject) aPrs = new MyAisObject(); +theCtx->Display (aPrs, MyAisObject::MyDispMode_Main, 0, false); +~~~~ + +Later on @c AIS_InteractiveContext::SetSelectionModeActive(), or it's wrappers @c AIS_InteractiveContext::Activate() and @c AIS_InteractiveContext::Deactivate(), +could be used to enable or disable desired selection modes one by one. + +@section sel_owner_highlight Highlighting selection owner + +As has been mentioned in the previous section, @c SelectMgr_EntityOwner is a key object which can be used as an identifier of selectable part(s). +Naturally, you might want to subclass it to put some application-specific ids for identification of selected parts. +But there are more things you may do with the Owner class like customized highlighting. + +Let's start from the beginning and define a custom Owner class: + +~~~~{.cpp} +class MyAisOwner : public SelectMgr_EntityOwner +{ + DEFINE_STANDARD_RTTI_INLINE(MyAisOwner, SelectMgr_EntityOwner) +public: + MyAisOwner (const Handle(MyAisObject)& theObj, int thePriority = 0) + : SelectMgr_EntityOwner (theObj, thePriority) {} + + virtual void HilightWithColor (const Handle(PrsMgr_PresentationManager)& thePrsMgr, + const Handle(Prs3d_Drawer)& theStyle, + const Standard_Integer theMode) override + { base_type::HilightWithColor (thePrsMgr, theStyle, theMode); } + + virtual void Unhilight (const Handle(PrsMgr_PresentationManager)& thePrsMgr, + const Standard_Integer theMode) override + { base_type::Unhilight (thePrsMgr, theMode); } +protected: + Handle(Prs3d_Presentation) myPrs; +}; +~~~~ + +@c SelectMgr_EntityOwner doesn't define any pure virtual methods, and can be instanced straight ahead, like it was done within @c MyAisObject::ComputeSelection() implementation above. +Let's revert usage of a dedicated display mode for highlighting (remove @c SetHilightMode() in @c MyAisObject constructor) and use our new class @c MyAisOwner within @c @::ComputeSelection(): + +~~~~{.cpp} +MyAisObject::MyAisObject() +{ + //SetHilightMode (MyDispMode_Highlight); + myDrawer->SetupOwnShadingAspect(); + ... +} + +void MyAisObject::ComputeSelection (const Handle(SelectMgr_Selection)& theSel, + const Standard_Integer theMode) +{ + const double aRadius = 100.0, aHeight = 100.0; + Handle(MyAisOwner) anOwner = new MyAisOwner (this); + ... +} +~~~~ + +The further logic creating sensitive entities and filling in Selection could be left as is. +Substitution of @c SelectMgr_EntityOwner with @c MyAisOwner currently doesn't change behavior and we see highlighting of the entire object through color modulation. +This is because default implementation of @c SelectMgr_EntityOwner for highlighting logic looks like this (simplified): + +~~~~{.cpp} +void SelectMgr_EntityOwner::HilightWithColor ( + const Handle(PrsMgr_PresentationManager)& thePrsMgr, + const Handle(Prs3d_Drawer)& theStyle, + const Standard_Integer theMode) +{ + const Graphic3d_ZLayerId aHiLayer = + theStyle->ZLayer() != Graphic3d_ZLayerId_UNKNOWN + ? theStyle->ZLayer() + : mySelectable->ZLayer(); + thePrsMgr->Color (mySelectable, theStyle, theMode, NULL, aHiLayer); +} +~~~~ + +@figure{ais_object_step4_highlight1.png,"Default behavior of @c SelectMgr_EntityOwner::HilightWithColor().",409} height=409px + +Now, let's override the @c SelectMgr_EntityOwner::HilightWithColor() method and display a bounding box presentation: + +~~~~{.cpp} +void MyAisOwner::HilightWithColor (const Handle(PrsMgr_PresentationManager)& thePrsMgr, + const Handle(Prs3d_Drawer)& theStyle, + const Standard_Integer theMode) +{ + if (myPrs.IsNull()) + { + myPrs = new Prs3d_Presentation (thePrsMgr->StructureManager()); + MyAisObject* anObj = dynamic_cast (mySelectable); + anObj->Compute (thePrsMgr, myPrs, MyAisObject::MyDispMode_Highlight); + } + if (!thePrsMgr->IsImmediateModeOn()) + { + myPrs->Display(); + } +} +~~~~ + +@c SelectMgr_EntityOwner::HilightWithColor() doesn't receive a presentation to fill in as an argument; highlight presentation should be manually created and even explicitly displayed on the screen. +To avoid code duplication, the code above reuses @c MyAisObject::Compute() already implementing computation of highlight presentation. + +@figure{ais_object_step4_highlight2.png,"Result of custom implementation @c MyAisOwner::HilightWithColor().",409} height=409px + +The visual result of the selected object looks exactly the same as when we've used a dedicated highlight mode. +One thing became broken, though - highlighting remains displayed even after clearing selection. +To fix this issue, we need implementing @c SelectMgr_EntityOwner::Unhilight() and hide our custom presentation explicitly: + +~~~~{.cpp} +void MyAisOwner::Unhilight (const Handle(PrsMgr_PresentationManager)& thePrsMgr, + const Standard_Integer theMode) +{ + if (!myPrs.IsNull()) { myPrs->Erase(); } +} +~~~~ + +Another problem is that the object is no longer dynamically highlighted. +To fix that we need to handle @c PrsMgr_PresentationManager::IsImmediateModeOn() specifically. +Within this mode turned ON, presentation should be displayed on the screen with help of @c PrsMgr_PresentationManager::AddToImmediateList() method +(it will be cleared from the screen automatically on the next mouse movement): + +~~~~{.cpp} +void MyAisOwner::HilightWithColor (const Handle(PrsMgr_PresentationManager)& thePrsMgr, + const Handle(Prs3d_Drawer)& theStyle, + const Standard_Integer theMode) +{ + if (myPrs.IsNull()) + { + myPrs = new Prs3d_Presentation (thePrsMgr->StructureManager()); + MyAisObject* anObj = dynamic_cast (mySelectable); + anObj->Compute (thePrsMgr, myPrs, MyAisObject::MyDispMode_Highlight); + } + if (thePrsMgr->IsImmediateModeOn()) + { + Handle(Prs3d_PresentationShadow) aShadow = + new Prs3d_PresentationShadow (thePrsMgr->StructureManager(), myPrs); + aShadow->SetZLayer (Graphic3d_ZLayerId_Top); + aShadow->Highlight (theStyle); + thePrsMgr->AddToImmediateList (aShadow); + } + else + { + myPrs->Display(); + } +} +~~~~ + +We may create two dedicated presentations for dynamic highlighting or reuse existing one for both cases with help of a transient object @c Prs3d_PresentationShadow. + +Let's go further and make dynamic highlighting a little bit more interesting - by drawing a surface normal at the point where mouse picked the object: + +~~~~{.cpp} +void MyAisOwner::HilightWithColor (const Handle(PrsMgr_PresentationManager)& thePrsMgr, + const Handle(Prs3d_Drawer)& theStyle, + const Standard_Integer theMode) +{ + MyAisObject* anObj = dynamic_cast (mySelectable); + if (thePrsMgr->IsImmediateModeOn()) + { + Handle(StdSelect_ViewerSelector) aSelector = + anObj->InteractiveContext()->MainSelector(); + SelectMgr_SortCriterion aPickPnt; + for (int aPickIter = 1; aPickIter <= aSelector->NbPicked(); ++aPickIter) + { + if (aSelector->Picked (aPickIter) == this) + { + aPickPnt = aSelector->PickedData (aPickIter); + break; + } + } + + Handle(Prs3d_Presentation) aPrs = mySelectable->GetHilightPresentation (thePrsMgr); + aPrs->SetZLayer (Graphic3d_ZLayerId_Top); + aPrs->Clear(); + Handle(Graphic3d_Group) aGroup = aPrs->NewGroup(); + aGroupPnt->SetGroupPrimitivesAspect (theStyle->ArrowAspect()->Aspect()); + gp_Trsf aTrsfInv = mySelectable->LocalTransformation().Inverted(); + gp_Dir aNorm (aPickPnt.Normal.x(), aPickPnt.Normal.y(), aPickPnt.Normal.z()); + Handle(Graphic3d_ArrayOfTriangles) aTris = + Prs3d_Arrow::DrawShaded (gp_Ax1(aPickPnt.Point, aNorm).Transformed (aTrsfInv), + 1.0, 15.0, + 3.0, 4.0, 10); + aGroupPnt->AddPrimitiveArray (aTris); + thePrsMgr->AddToImmediateList (aPrs); + } +} +~~~~ + +Code above does not store our new highlight presentation as a property of @c MyAisOwner, and instead uses @c SelectMgr_SelectableObject::GetHilightPresentation() method +to create a presentation stored directly inside of our interactive object. + +Next trick is passing through the last picking results in @c StdSelect_ViewerSelector. +Dynamic highlighting is expected to be called right after picking, so that highlighted Owner should be always found in picking results. +@c StdSelect_ViewerSelector::Picked() returns entities in the descending order of their distance from picking ray origin (mouse cursor); +normally our Owner should be the very first one in this list when no selection filters are assigned to @c AIS_InteractiveContext. + +@c SelectMgr_SortCriterion provides us useful information like 3D point on detected object lying on the picking ray, and surface normal direction at this point (actually, it would be a normal to a picked triangle), +which we display as an arrow with help of @c Prs3d_Arrow presentation builder. + +@figure{ais_object_step4_highlight3.png,"Surface normal on mouse over.",409} height=409px + +Result looks pretty nice on the screenshot, but has interaction problems - once displayed, an arrow is no longer updated with further mouse movements. +But this behavior is not a bug - @c AIS calls @c MyAisOwner::HilightWithColor() only when picking Owner changes to avoid unnecessary Viewer updates. +To override this behavior, we may override @c SelectMgr_EntityOwner::IsForcedHilight() option: + +~~~~{.cpp} +class MyAisOwner : public SelectMgr_EntityOwner +{ +... + virtual bool IsForcedHilight() const override { return true; } +}; +~~~~ + +This solves the problem within our specific use case. +Keep in mind that most objects don't need updating highlight presentation on every mouse move; +overriding this flag everywhere would be a waste of resources and may cause performance issues - use it sparingly. + +@section highlight_apporaches Highlighting approaches + +@c AIS provides one more alternative to handle presentation highlighting, which is managed by option @c SelectMgr_SelectableObject::IsAutoHilight(). +By default, this option is turned ON and redirects highlighting logic to @c SelectMgr_EntityOwner::HilightWithColor() demonstrated in the previous section. +Turning this option OFF redirects highlighting logic to the interactive object itself @c SelectMgr_SelectableObject::HilightSelected(). + +Apart from moving the logic from Owner to Interactive Object, this approach allows handling highlighting of all selected Owners within the same Object at once and sharing a common presentation +instead of per-Owner presentation - improving performance and reducing memory utilization in case of a large number of small selectable elements, like mesh nodes in @c MeshVS_Mesh object. + +The further optimization of such a scenario would be using a single Owner for the entire Object +storing the list of selected elements within the Owner itself - as utilized by @c AIS_PointCloud object for highlighting individual points. + +We wouldn't describe these advanced techniques here in detail - let's just summarize main highlighting approaches available in @c AIS: +- Highlighting of a main presentation of Interactive Object (active display mode) + filled in by @c PrsMgr_PresentableObject::Compute() + and displayed with color modulation by @c AIS logic. + - Example: @c AIS_TextLabel. +- Highlighting of a secondary presentation of Interactive Object + filled in by @c PrsMgr_PresentableObject::Compute() + and displayed with color modulation by @c AIS logic. + - Example: @c AIS_Shape, displayed in @c AIS_Shaded display mode and highlighted using @c AIS_Wireframe display mode (default behavior). + See also @c PrsMgr_PresentableObject::SetHilightMode(). +- Highlight presentation stored within a custom @c SelectMgr_EntityOwner + and managed by @c SelectMgr_EntityOwner::HilightWithColor(). + - Example: @c StdSelect_BRepOwner for selection of sub-shapes. +- Custom highlight presentation stored within Interactive Object itself + (see @c SelectMgr_SelectableObject::GetHilightPresentation() / @c @::GetSelectPresentation() methods). + - Filled in by @c SelectMgr_EntityOwner::HilightWithColor() + with @c SelectMgr_SelectableObject::IsAutoHilight() turned ON.
+ Example: @c AIS_PointCloud. + - Filled in by @c SelectMgr_SelectableObject::HilightSelected() + with @c SelectMgr_SelectableObject::IsAutoHilight() turned OFF.
+ Example: @c MeshVS_Mesh. +- Main presentation of Interactive Object (active display mode) + filled in by @c PrsMgr_PresentableObject::Compute() + and manually updated (recomputed or modified aspects) on highlight events. + - Example: @c AIS_Manipulator. + +The number of options looks overwhelming but in general, it is better to stick to the simplest approach working for you and consider alternatives only when you have to. + +@section mouse_click Mouse click + +Dynamic highlighting is only one of scenarios where @c SelectMgr_EntityOwner could be useful. +Another feature is an interface for handling a mouse click @c SelectMgr_EntityOwner @c @::HandleMouseClick(). + +This interface is useful for defining some user interface elements like buttons, and most likely your application will use a more comprehensive GUI framework for this purpose instead of @c AIS. +But let's have some fun and make our object to change a color on each mouse click: + +~~~~{.cpp} +class MyAisOwner : public SelectMgr_EntityOwner +{ +... + virtual bool HandleMouseClick (const Graphic3d_Vec2i& thePoint, + Aspect_VKeyMouse theButton, + Aspect_VKeyFlags theModifiers, + bool theIsDoubleClick) override; +}; + +bool MyAisOwner::HandleMouseClick (const Graphic3d_Vec2i& thePoint, + Aspect_VKeyMouse theButton, + Aspect_VKeyFlags theModifiers, + bool theIsDoubleClick) +{ + static math_BullardGenerator aRandGen; + Quantity_Color aRandColor (float(aRandGen.NextInt() % 256) / 255.0f, + float(aRandGen.NextInt() % 256) / 255.0f, + float(aRandGen.NextInt() % 256) / 255.0f, + Quantity_TOC_sRGB); + mySelectable->Attributes()->ShadingAspect()->SetColor(aRandColor); + mySelectable->SynchronizeAspects(); + return true; +} +~~~~ + +Looks pretty simple. Now let's make things more interesting and launch some simple object animation on each click. +We use a couple of global (@c static) variables in our sample for simplicity - don't do that in a real production code. + +~~~~{.cpp} +class MyAisOwner : public SelectMgr_EntityOwner +{ +... + void SetAnimation (const Handle(AIS_Animation)& theAnim) + { myAnim = theAnim; } +... + Handle(AIS_Animation) myAnim; +}; + +bool MyAisOwner::HandleMouseClick (const Graphic3d_Vec2i& thePoint, + Aspect_VKeyMouse theButton, + Aspect_VKeyFlags theModifiers, + bool theIsDoubleClick) +{ + static bool isFirst = true; + isFirst = !isFirst; + MyAisObject* anObj = dynamic_cast (mySelectable); + gp_Trsf aTrsfTo; + aTrsfTo.SetRotation (gp_Ax1 (gp::Origin(), gp::DX()), + isFirst ? M_PI * 0.5 : -M_PI * 0.5); + gp_Trsf aTrsfFrom = anObj->LocalTransformation(); + Handle(AIS_AnimationObject) anAnim = + new AIS_AnimationObject ("MyAnim", anObj->InteractiveContext(), + anObj, aTrsfFrom, aTrsfTo); + anAnim->SetOwnDuration (2.0); + + myAnim->Clear(); + myAnim->Add (anAnim); + myAnim->StartTimer (0.0, 1.0, true); + return true; +} +~~~~ + +Animation is a complex topic that is worth a dedicated article - let's not go too deep in detail here. +To perform animation in a non-interrupted way, it should be handled by some class like @c AIS_ViewController, which is responsible for managing user input events and for 3D viewer updates. +To utilize it, you need adding a custom object animation to @c AIS_ViewController::ObjectsAnimation() or adding custom view animation to @c AIS_ViewController::ViewAnimation(). +Somewhere in application this might look like this: + +~~~~{.cpp} +Handle(AIS_InteractiveContext) theCtx; +Handle(AIS_ViewController) theViewCtrl; +Handle(MyAisObject) aPrs = new MyAisObject(); +aPrs->SetAnimation (theViewCtrl->ObjectsAnimation()); +theCtx->Display (aPrs, MyAisObject::MyDispMode_Main, 0, false); +~~~~ + +@section final Final result + +The final sample could be seen by calling @c QATutorialAisObject command from Draw Harness plugin @c QAcommands (@c TKQADraw toolkit): + +~~~~ +pload VISUALIZATION QAcommands +vinit View1 +QATutorialAisObject p +vfit +~~~~ + +You may also take a look onto source code of this command at @c src/QADraw/QADraw_Tutorials.cxx if you have some problems following the tutorial. diff --git a/dox/samples/images/ais_object_step1_bndbox.png b/dox/samples/images/ais_object_step1_bndbox.png new file mode 100644 index 0000000000000000000000000000000000000000..48baaf76b5ce2448ce786d58cb8ce3163b59d776 GIT binary patch literal 3169 zcmai0`#;m)AD@x?;xmy=mk}~Hm!T+^Vfnbs!X%@`hYh)h6uIV7?sJ>AMlMB4Xzoe~ zg}1q+D9bmwWeAZJ;p_AL2fnYzUqV0o_Nn!d z>EEk+pvq;S1^-MCHSPd@;G?Q>D8QNEmf_mw5QYsZ&qyoSGFF0XJ}NNaLJL#M#b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zrSxHHi5gKv5rB%753w2B z;iU!Lq?x6sX~i+1Qr;h|QcTQ!@!~@#IHpHziRo2p24Z}!ILe!BK%oaiOE>-iKG`J+4$F7xD{>q5}kg{O6A z3o*!`GFBZtLD)ojNB6{eOTCCPeCZBzBWWd}N58m{v7l)EVquh_f8ct1dvRfCz%18l z@URBT=af3f#UB)vXVLK>@($)TD&v*GOe z$rTL$`knyw+SbOumVCYzU?!wJv{T(o{-P!8LidJU}emcr4kG$ zz?`11hj$c$el8r#e?v$y9KQKn3E5&#!W_DFg0+zq-Tbupp;-M7{IpDng6gjdg9b^E zZ?1_E1l^3cI%)#o`3C9E7lLr=K0$Q!QcbRI`fJMr=Gb)=YgS$>`MG^?cl_^340}9x z^(D-E$L@wL=!=iZa6qk07X^?!@`9!cq) z@sviN;ecKNmDQ&<;a;oDT6z8VOlZ4^2l8?Ckq@+IxBKcF9@T(fx6oz4L!6Xx>j3o? zsN?&1#I6R7m31;&G@jk6ZWRV{MqdoMU{BL26mLyO;3*KfueoOn~S{MgDfD)g) z%aUE4gt7*Gy|wz12!Q;5_G)Z=-^!aWbk-_?=<}sjCax^?|7BzEKkWYj3XuN~XvVQ+ br7p2%rI-JPHG{W%0;d01{GDawc=>+;ucx7y literal 0 HcmV?d00001 diff --git a/dox/samples/images/ais_object_step1_shaded.png b/dox/samples/images/ais_object_step1_shaded.png new file mode 100644 index 0000000000000000000000000000000000000000..f39c0141d7a3a07b835621da7edd7c99192bf216 GIT binary patch literal 3308 zcmc&$dpK0-AGcja>~^s>R$E(9YfiS&g=`8TxmCN=jEdq6gGkCHw{@vjlS{Qu&g#O5 zSc7$(nPG&D26YC>br3ZMsiEYS-1a@Rzo*|H`_J#$=lRX^o-^*+Qx0=n>p`WwySTQgNIFI=vCC_L(0L?xo$F zQkRACUz}+Xi-U?icGU(~Dw?0jA1gA<_fvMMSPESJYrlQ1qvmhovK<==&W4tEhUwlz zSe;u!JCFPzr?ViwlWq-*onr$Rrd$#4r14iu?XhT~QF(u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q=o%3i4!1H_(YIr8p1R4zk%lvc0mm@a zjX`-}OsL<3cf@`^kl)2dZbXIn1;00~qvD)vh|)lJ;Y@JgK*DDSvqmKPaju59XJi+i z0GQ3}cnJtx%tx^^hL_bBlM>vI=phlHLyet#<3(LVCK4y{TF{AzOY zp@uC7NrAau;^#KXZ&=rduujvIik5pOgC8W){$40Z4b&H>m_rlqrl*Pm#f~~Zj>ffr zezrm){%Ua24MmtVDx{w0(Om!+g?hdXESZSQg+Ze(WQxPE;xm<4rEgc-FjX~9fAx4m zcuk8&SVqe3bOba=LKd7i)6vnqc(TpB2 z1(rWfX`30y3z$5-cpxuztix?4WYqH6>m6!?0c2l+4isZ~qpig|#vQH6|C7aSJr(p zshE$0=1S%)@-1}DWwS_viS3kk^Y_m|Pvu#C{S*v?ba)+|_g1|mdA9aXy-~{D{ba?x zxK>{*=bbl-BykGu-X6Gdrz=U1^xAe`R9iw>0DMsSR#gh71kSk$1z`?V3g%$z3B6v1 zvB5mjwk2-UH@jRQ1G$KtqOEn=kPNmmWC<-ABu#}2I~?9#_$NW?2S7pR6XFxDfoI|> zoo8M37=Yn?1+AbmfMi++b|>4*Z>{dj%H4@+Afs-CWLOYY2$0dvK)zzC;LhY}1RRz_ zto&CI@Yf(FeQ&Ytg)2({48oOAHXP6@+hV~gZ3F<2EF?SRVgFYNB+r64dc~?y@J%&2 zKb;B50>RQuH4vBp7p0kx?BZn{1UMKFYp93qtOoJ`3~b)&eqxGk285XI;`4mxhL(%M z7~s*)lXi3C4V4kfZ{X#y(jon%R9G>~P{BP@FJG->L(GQRib?PSmnyEcB{?1{+{BtH z>!8^pG)!!FeBWgJuTBQkkE_v&?6?mh^g-H z|guvmy_GmI{o?f WUQz0UcIGb9tc9t~-W+46h`#`lS9%`+ literal 0 HcmV?d00001 diff --git a/dox/samples/images/ais_object_step1_shaded_wf.png b/dox/samples/images/ais_object_step1_shaded_wf.png new file mode 100644 index 0000000000000000000000000000000000000000..54b1ad5816bf6980acb8de40ae1b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/ais_object_step2_segments.png b/dox/samples/images/ais_object_step2_segments.png new file mode 100644 index 0000000000000000000000000000000000000000..70a55443b7cf7688a58f56a8d5372ffe44c0cf40 GIT binary patch literal 3706 zcmc&%X;f3!+V*NIqJp&;D5JG`5DolWx&n)4dL%?n~nOFu#Yn zTW!=6)zw=X>-XgDz{HX9A4(b^oq%Kx)pDjSOG z{nDeNGOY2+c*4d~4}5q%d2TkDr_g_W3+7RfU$|&kUwy^-B~?|}g*rcZm0ovJc8K5? zF*9Ts+|`p~epjp&U0vspe)Th=QVClv0`be?dWG&tjK0*eee6M%OX_!WhM!&+Im60x zwbi@q+rJ*TraI=Iw$0_Ln;hxde)TU68=&UeorY2-$KJmr8CZ)VTN|nLBswcAk%I=z2rPw!x9`j{AQ!(})ce3=xe*8^NKIH>6nNsKZtBWkx=A~BE`b-kt zL}@``>#E4Mpxcx?iP{-*`BC5OVx^L8kEVqurILfSHT=v+)Y<$Rp?T96MD4NRhZ)i= zaD<VPoe6xlk(>1KJO7c<`LC!bS_p7&Yl zw#TwZQ1$f(W2CYbk2seG?g+X=0T~g?!%3+U>+i-s4!r7Kz9s9D0lJp*%~Jz8;sS+V zdcd#G**93Le76FUdmaP>2!!V%r0R}gg`_}5c++%1pKwnf(*I|x51fmPxW=$=+b(=> z7p&#b1Xgw$*Mr)K3)$9ilCnL`H6N+ebk&o%o6#@8sH#*9tQx15%tD`P>K{$h@PmD| zauEtkri5GdB3m-kF4i>13J={{nQs7ku6k`mNPo7Xg~%>!dEg^4wGfY{SPuKn+l~T+a z?=KL?**YTvuLuLRNV6w4tP9YNBBXmJJf}aLuT^H0&bG(h z`0U*f2$D3b+S`+bLkgZT&Vy? z$5GWjb-%ulb3?jK_kX}mM9slC)1-YcxAkd&&s4{uuFZJvdS@Jj(Nj1x=&*Csn&w@H zfUrmk*%lHllym_dl}n9u**c}@i52UDblbAMj0JPNHBhk2EYMxAY=Ecu2!YXCOHoIo z4Sa{Eiw+sHbp}xJ%xD>nrt|Uo0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EdhZb>BnyO5|S+2B8w zBer0MyF%peeUyZXeao>w_17qe0wgG;Nc=O4O_~4HtvFADjh!e!`)?*C3s8GdX-lQe)@{`0+9zVz5<`6D z?qdmMfsBWS?D%FP?u9%SBSJJc`7L^A?8sZ{xB%`_n8Zexc96Y*4um{p&tV136X0r_<420Vz_tSV zcocrE@E-tWz6-lSI&$m}>Cp zh41r}XJ)Rz@CN0*ncO#`1c)`3^ZoH;@v4+QD7$wlWR(KPGj);+at;++G(7wo1VZId zo8vDZRJnJt{%BqxsEz+dqJ%Tyx5EKPZY)7|LJ?iM21|qT3z7R0bZg$d)(JZNnzYshPN509CA-3^);}WEB@j z?FlmYs*-FtuYoQTWdN>~v^SWH)+u>Lq+d4JfX_VStr)IJ_EjrQr+}j#99crYBM(|& zKO(y?j(#rL2L@CXltfE3X~Aka{1;BLHNVw-kMC^7L=Qgltlyti8HUkLG>9AfmOfjV z`S`~phl5(NI5xE&mcDwk3)6t?N)h9?9P6)oo^Qi{X6uNc$+O+qeASoR(bs8&f7|4F61^(;fn?H|JmO!0F=tv*tYZE WKZX7g5cW?Au8pOmMX~vhSN;R(5iXkm literal 0 HcmV?d00001 diff --git a/dox/samples/images/ais_object_step3_quadrics_10.png b/dox/samples/images/ais_object_step3_quadrics_10.png new file mode 100644 index 0000000000000000000000000000000000000000..24b62a30f4f866fcbe1f7b9d5fd47b2528bc04a9 GIT binary patch literal 5872 zcmcgwXH-*JyLM(QD1we?5D*weoIy`if}k|9pg1C;0Wl|tNI8IXL4x#A2Mbl&ktR3_ zs5Hq55Tz3h?I0)^Aaq4QNDu)-FLx)-z2AIy-TU`j3)b4%`@H?#&wlp4d*-x(#2VQ( z%a$#Z`2B=FdD*fb5`_O^KZ2R})g9mmf%&`sVbg2vBVA5z7y7SPTq!#ooVYHJENHqBq@4CSQZ>OT#C>EGZ%Tz=#i@9v!ZVz=|ubJPNSl12Q+ z&Xn%$FYI9M68ywJIM&+?KUZl)5=ZjfZwBx_u$r5$>X^(ZP930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b/dox/samples/images/ais_object_step3_quadrics_25.png new file mode 100644 index 0000000000000000000000000000000000000000..59a38129b48d09a600a7dcfa2944031c244df76e GIT binary patch literal 5873 zcmcgwhg(x=_I8&Y8;&}bND-J-#072yf}n!Pt_7u71_W{m2qa!W2t;X$G#v$%x`+RRqRPHtZqtxfY z;gbw!U9+`ew|XXjpjXY>S@)Q(cN*_~Y3Tp8;Le-7svXc;21&8%_p}qwjtHC&K5uyZ z^zsE>I(~T@&-q#0@g~*Ke-HavFOGS$^7Hdw_KD|5)v+B79dm(GgA%Eqb+w*{s_Dc3 z?VnvmaKNE<+`H&?$=Wo>^Jc~F`{hCN1D2UK87bG; z9}C}2=}*-hrdWa*Z|s#!%^UPuo125@r^7S{2lP%$$uy>5`AQDI{J!P6p$gwGys9`$ zoJakBeM9J*xHvldqHlRt)WrkBM!#9#y`+1A$D z>L(sg_8Dm^$bFAm^OL_0?AlnH{j}xG_U*R|$gaZl&9ZC*Dk&4OH7VQuyj-pILZ0Hy`(J}T)1x!!5B64hB^xS&Z z^N&_r$AF1qTPhz@vnvrtj_rNN8{g<7IBq4|Rqj)t^GX>3)7?a!T5To~b1UxtHIBuQ zpomc)W9RG6rPs$)?;a-M)HVoT8`7hqUNUApwZTVS@FD;WgC&icTC`j4$FKJVw`;zt zx_CPZfjm+WpIH8Kh1$(aC65s2wc!D7IxoM)C>wdt{$UO=;O%6^AeNV*{?{>Xr|Sy9 zYPdf}sf%oySN1&p=D<*5Y(W%qwut$)`u35!-Z97TK7t{#EazH%jAvW+=tO=ccjlA1 zR@LHkB-o1s87?+);^=8BoB+1uvVAkAO|Jc1bjEKYW_Q3b!A`U=_W{~^Oo6t%g!tL{ ze_r2I#MI(`-woUmOeF+|YFjeDF5ULv+LnaiypzRF#W%F7t|kE=Iweb?R}<)d+^Nu0 zXxNtu&n_EHTidzCnR_rFbAk0GZsXU}G#55Cn~`PX#VC#Iyrl8#_*Ss*4%}e*s6=gf z?Xg(VEhIq{_)eoOWh6ZiT@6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DeD zr%&G#X}*7TL5>apNllW|b;!DTLD2>N1f@RSeMmQpe~JM|q2J8iy?c5b>gcx-&jO~m zH!mo@^Ws(VCR7gx&9Z5{SwxK``+~+!xMUChec!$e@Ifk$a9a|Mo@hLsjuQ5G!?qvRP Hr(gdMlMxnq literal 0 HcmV?d00001 diff --git a/dox/samples/images/ais_object_step3_quadrics_disk.png b/dox/samples/images/ais_object_step3_quadrics_disk.png new file mode 100644 index 0000000000000000000000000000000000000000..4747f9fdb1cb6595fd08d9f50084809b2e3a6721 GIT binary patch literal 4652 zcmcgw2U`=_8n&zrL084NL7IptZCHZBB2AH=U;!zSgeVY@BE5(hP!Uv`)Qq9XYUoXw zED%6~t5SooprE0OKq!VTz1q!Q`uWhG&Bx~s|2&XQ*+Eq5wLp2j=9DhH z4)3E^OX(krsp?qK3akzYaa}4b11bN%pJ!?J@3V4$wipEkbwxETZYNPnj$_o-ZR`II zy--y}93L;7ZYNl5iOj67Ryycie%s4!WuCjdY}#((G(2(gl6Y-ETSte;lgY-Ot-q&~ z-#MO;pr$Ko@wsDFY(bJW{9vG4PcoZZ5vXFymD7GIq4Sv6IY+j!!MeIeb_qE=WU+d! z+YTN2qT*cieRiZZl({=BzqPB2{`)<>L;0sW#ugV#s)DK;8RZcT?;kA;=#KW>(|hLX z>nn{K{O7Wgnxf3fi=yt%&X!ls>5q<%ic3_RoExeS-L;_W@@8kE#SNmG`(^7P?~Qe$ z*>;oM*J&DMDp-q5|LpQ|W7%zcUsP7Q*2T;h7k|1MFP+=N3SPs!+FEnUjdY5~!wX>V zO!QQ?cX#L5-KXJXdBTPnP{3rbi;GKC&W*w3qM~LMCj<1cqvbwMNN(CwW zFsb+NPt+QiUGN{}bsx2G&mBG)6^`>7YRp_;hxTfeIp6&1cv!NA*R$exYuwNh(St~= zw>OPWh>2+^UZ=%j;bt2VBO!UK_12e3>e2qqnDg&~iixN^VOomXD;tc_pEdK=smMJX zj=;DZD?HER+%Rpl!)OP$pMB8!%t2bs9fuxA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d*=tWmW3@iKH;D`5j2ej%Pns_yQI)`8~PA zyLV~oeLLUF1*Xh%WcH#r9s)2n=on^a zdlra?O=X9N?<_C{CyD`Nkm)wdZBaBv5hPyR#|vl`oXQPF|Z|2-;f+p_O3mrJ1qeUDI%)fu0eA2G*BA@rF5^L@1_nMjt z5vay+?yW&fmuLcYE9~dzC+GO>1c7P>E0S1*xos-W?(T!gRc1kDP`dYyh`4Kq;1eIo zT3ST8L)OezWCT;5hm*SpK3;iaV=f|Ui;)n$c+CxUScBJ~IQ zON=7;htDH@Q?=1YrQ9X%1v0z_vg4+Vf>zjqfS;m{5?qg+{XGB^@?<_Kll&OeemW0 literal 0 HcmV?d00001 diff --git a/dox/samples/images/ais_object_step3_quadrics_fin.png b/dox/samples/images/ais_object_step3_quadrics_fin.png new file mode 100644 index 0000000000000000000000000000000000000000..00f23de308454d48e03d6a91137d2954759b28fd GIT binary patch literal 4625 zcmcgw=U-Dv7lw6pcUe#oMPcnAiU}7J1VyPL(xNC5Ad-MfxF}6ZDAFwpihwLZ2%*^! z1Ows<IY}`lstMJf=1T+|trd-|O*RW@PzF^~RLVAInZu ze-+vmBZuQYIo!v+U#SR-(F_po0*L?LkA`r1@S|yjMn-Zhk=3cN3V83`<4Ig+sF%R%!FxRP|*H~oal`=ss-ws zNp_(+$7YWky1RFJp%ck66>_I_^u%HHoXr%gb5my7qe?IVsLO-luN2E;;9A{MJT(>Ba~3H_jX$S(+~p&>bAMceaOA zTK?+NRi8}^SHTJ{m?UPrdC5Lr>#C3{sPAuH?|J2!+bnFcO)3+~+yQ zVdK;KRILDq(2mG^w|ZL&<_+#_Ol~+N4Kh(?eF&KByFHxzt@?Lr%`u5LcG8ySI`8i~>2Sbo^56Yu44{Cextr^;#kf|g**ebSf~gyZnCOU| zw4X!U{v_sv<$tB?_aFBgd0wU*9T7~`H%()vgd}`;y?g)8Q;*uU+%PMIMi*w1=_ua>3+%>z>OskU1G+vhv zNNOa|Zxiwe_0F&CN6p2BDvD)|Hj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bMR~c zx6n$GuBbsQ5rcdOrHCP*7h7SGs{1tI&2Kp{|(4mf zzVCnzwt}Ok-N|rl77NM(P=WZWwPn#MnB@pmEw29c@K>}5*3)$}n)$Jf` z(0tAJxpd|}dG*f9+apwss+pljbtAFYu97i~f584Rs!xX;p`6dnygM{E&mp-6tQ6fx zRnijhs`Au-gn|4uwMK8n8A`@+;`>p{R6$I+OIr=?3?6dcpL9h_Vq2=_D`q|J1iH*! zhA1;k-I}la*zR<=bmE_S>)Tavprb#xzYNd6x55L?aU}`R<&F*;DI**;rz{S%7PuMNPEXh+8`!GWmeBjfA!Kt2#7Zu{mmM}4j zGc>nw5kk|$R$AlX;!pj*jpjq%*BIcFnK9miht4pT*^3_E=vQ+Bh$6b>4=EU3U09Cc zgWSvW7_9RMOXzPRHV92Cir#kGr(#GegH4c`sVF)up?7~gUrAatA|uX(@2>;tOvVF2 z0TsJ`&ZnV2?w6KgS&r8d3}`ZX{PlVwPqZXp9i(-ECpIUOV2qTre7B5UN%GGTdkudM{cG&{1?~1P zA-7=vvBFMU!D|;|S&p!`o#OF)_iKtu55kgKiwX{3lN>w%BUz`z?)U!*6A`0q{8`1P kVz}@B`Oo|}`;)7`2*BNT#|2HK_3yEfzM0;K8~6YDKi3{__5c6? literal 0 HcmV?d00001 diff --git a/dox/samples/images/ais_object_step4_highlight3.png b/dox/samples/images/ais_object_step4_highlight3.png new file mode 100644 index 0000000000000000000000000000000000000000..9be042ab50f02a625344867cf818b7fb00ed135d GIT binary patch literal 4024 zcmb_fiC8>-Lm&{&glp_ zUDGhs?}`y``4eq%&X>J@MTlD*{KuO0X?7Im@#c&?BlDIC8S^UFzWlaIQS7f z&9EjPeRe(BmDE*yea|l^jm>lZ+C|uU53Hux;Bo!d81@Y7cb)x5*G_->>CU0|t{ZxG+txmHdN zbC|NpQ(nsji! zw#&*g0Tw)fosP7$x4s*~Z|aM@9mNLMA%!g|s!7F~2F5KGs$>_R+jr!%A$qHJYu$hJ zfbJ+*YEbMhdo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Sa;-Q&UZ4^1AnTh48l9QMJ{4Z9ZA set of code snippets performing typical actions with @ref occt_user_guides__ocaf "OCAF" services for newcomers. * @ref samples__ocaf_func
A simple example dedicated to the usage of "Function Mechanism" of @ref occt_user_guides__ocaf "OCCT Application Framework". + * @ref tutorials__ais_object +
A programming tutorial teaching how to compute presentation within AIS_InteractiveObject subclass for displaying in @ref occt_user_guides__visualization "OCCT 3D Viewer". - @subpage samples__projects * @ref samples_qt_iesample
A cross-platform multi-document 3D Viewer sample with CAD import / export functionality based on **Qt Widgets** framework. @@ -44,6 +46,7 @@ - @subpage occt__tutorial - @subpage samples__ocaf - @subpage samples__ocaf_func +- @subpage tutorials__ais_object @page samples__projects Sample Projects - @subpage samples_qt_iesample diff --git a/src/QADraw/FILES b/src/QADraw/FILES index e7e616ee07..4194c1f5c4 100755 --- a/src/QADraw/FILES +++ b/src/QADraw/FILES @@ -1,3 +1,3 @@ QADraw.cxx QADraw.hxx -QADraw_Additional.cxx +QADraw_Tutorials.cxx diff --git a/src/QADraw/QADraw.cxx b/src/QADraw/QADraw.cxx index fefa242a05..a0d0888136 100644 --- a/src/QADraw/QADraw.cxx +++ b/src/QADraw/QADraw.cxx @@ -14,23 +14,27 @@ // commercial license or contractual agreement. #include -#include -#include -#include -#include -#include + +#include +#include +#include +#include + #include -#include #include #include #include #include +#include +#include +#include +#include +#include +#include #include #include -#include -#include -#include +#include //======================================================================= //function : QATestExtremaSS @@ -172,7 +176,11 @@ void QADraw::Factory(Draw_Interpretor& theCommands) { // definition of QA Command QADraw::CommonCommands(theCommands); - QADraw::AdditionalCommands(theCommands); + QADraw::TutorialCommands(theCommands); + + QABugs::Commands(theCommands); + QADNaming::AllCommands(theCommands); + QANCollection::Commands(theCommands); } // Declare entry point PLUGINFACTORY diff --git a/src/QADraw/QADraw.hxx b/src/QADraw/QADraw.hxx index 9d8bf3dbc3..5e6832b902 100644 --- a/src/QADraw/QADraw.hxx +++ b/src/QADraw/QADraw.hxx @@ -22,44 +22,22 @@ #include - - +//! Draw Harness plugin defining non-general commands specific to test cases. class QADraw { public: DEFINE_STANDARD_ALLOC - - //! Define specicial commands for AIS. - Standard_EXPORT static void CommonCommands (Draw_Interpretor& DI); - - Standard_EXPORT static void AdditionalCommands (Draw_Interpretor& DI); - - //! Loads all QA Draw commands. Used for plugin. - Standard_EXPORT static void Factory (Draw_Interpretor& DI); - - - - -protected: - - - - - -private: - + Standard_EXPORT static void CommonCommands (Draw_Interpretor& theCommands); + Standard_EXPORT static void AdditionalCommands (Draw_Interpretor& theCommands); + Standard_EXPORT static void TutorialCommands (Draw_Interpretor& theCommands); + //! Loads all QA Draw commands. Used for plugin. + Standard_EXPORT static void Factory (Draw_Interpretor& theCommands); }; - - - - - - #endif // _QADraw_HeaderFile diff --git a/src/QADraw/QADraw_Additional.cxx b/src/QADraw/QADraw_Additional.cxx deleted file mode 100644 index 7990d64ee6..0000000000 --- a/src/QADraw/QADraw_Additional.cxx +++ /dev/null @@ -1,29 +0,0 @@ -// Created on: 2002-03-12 -// Created by: QA Admin -// Copyright (c) 2002-2014 OPEN CASCADE SAS -// -// This file is part of Open CASCADE Technology software library. -// -// This library is free software; you can redistribute it and/or modify it under -// the terms of the GNU Lesser General Public License version 2.1 as published -// by the Free Software Foundation, with special exception defined in the file -// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT -// distribution for complete text of the license and disclaimer of any warranty. -// -// Alternatively, this file may be used under the terms of Open CASCADE -// commercial license or contractual agreement. - -#include -#include -#include -#include - -void QADraw::AdditionalCommands(Draw_Interpretor& theCommands) -{ - QABugs::Commands(theCommands); - - QADNaming::AllCommands(theCommands); - QANCollection::Commands(theCommands); - - return; -} diff --git a/src/QADraw/QADraw_Tutorials.cxx b/src/QADraw/QADraw_Tutorials.cxx new file mode 100644 index 0000000000..3fc6924bb5 --- /dev/null +++ b/src/QADraw/QADraw_Tutorials.cxx @@ -0,0 +1,349 @@ +// Copyright (c) 2022 OPEN CASCADE SAS +// +// This file is part of Open CASCADE Technology software library. +// +// This library is free software; you can redistribute it and/or modify it under +// the terms of the GNU Lesser General Public License version 2.1 as published +// by the Free Software Foundation, with special exception defined in the file +// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT +// distribution for complete text of the license and disclaimer of any warranty. +// +// Alternatively, this file may be used under the terms of Open CASCADE +// commercial license or contractual agreement. + +#include + +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +namespace +{ + +//! Custom AIS object from dox/samples/ais_object.md tutorial. +//! Make sure to update tutorial after modifications in this code! +class MyAisObject : public AIS_InteractiveObject +{ + DEFINE_STANDARD_RTTI_INLINE(MyAisObject, AIS_InteractiveObject) +public: + enum MyDispMode { MyDispMode_Main = 0, MyDispMode_Highlight = 1 }; +public: + MyAisObject(); + void SetAnimation (const Handle(AIS_Animation)& theAnim) { myAnim = theAnim; } +public: + virtual void Compute (const Handle(PrsMgr_PresentationManager)& thePrsMgr, + const Handle(Prs3d_Presentation)& thePrs, + const Standard_Integer theMode) override; + + virtual void ComputeSelection (const Handle(SelectMgr_Selection)& theSel, + const Standard_Integer theMode) override; + + virtual bool AcceptDisplayMode (const Standard_Integer theMode) const override + { + return theMode == MyDispMode_Main || theMode == MyDispMode_Highlight; + } +protected: + Handle(AIS_Animation) myAnim; + gp_Pnt myDragPntFrom; +}; + +MyAisObject::MyAisObject() +{ + // highlighting might use different display mode (see tutorial) + //SetHilightMode (MyDispMode_Highlight); + + myDrawer->SetupOwnShadingAspect(); + myDrawer->ShadingAspect()->SetMaterial (Graphic3d_NameOfMaterial_Silver); + myDrawer->SetWireAspect (new Prs3d_LineAspect (Quantity_NOC_GREEN, Aspect_TOL_SOLID, 2.0)); +} + +void MyAisObject::Compute (const Handle(PrsMgr_PresentationManager)& thePrsMgr, + const Handle(Prs3d_Presentation)& thePrs, + const Standard_Integer theMode) +{ + (void )thePrsMgr; + const double aRadius = 100.0, aHeight = 100.0; + TopoDS_Shape aShape = BRepPrimAPI_MakeCylinder (aRadius, aHeight); + if (theMode == MyDispMode_Main) + { + // use standard shape builders + //StdPrs_ShadedShape::Add (thePrs, aShape, myDrawer); + //StdPrs_WFShape::Add (thePrs, aShape, myDrawer); // add wireframe + + // use quadric builders for cylinder surface and disks + const int aNbSlices = 25; + Prs3d_ToolCylinder aCyl (aRadius, aRadius, aHeight, aNbSlices, aNbSlices); + Prs3d_ToolDisk aDisk (0.0, aRadius, 25, 1); + + Handle(Graphic3d_ArrayOfTriangles) aTris = + new Graphic3d_ArrayOfTriangles (aCyl.VerticesNb() + 2 * aDisk.VerticesNb(), + 3 * (aCyl.TrianglesNb() + 2 * aDisk.TrianglesNb()), + Graphic3d_ArrayFlags_VertexNormal); + aCyl .FillArray (aTris, gp_Trsf()); + aDisk.FillArray (aTris, gp_Trsf()); + + gp_Trsf aDisk2Trsf; + aDisk2Trsf.SetTransformation (gp_Ax3 (gp_Pnt (0.0, 0.0, aHeight), -gp::DZ(), gp::DX()), gp::XOY()); + aDisk.FillArray (aTris, aDisk2Trsf); + + Handle(Graphic3d_Group) aGroupTris = thePrs->NewGroup(); + aGroupTris->SetGroupPrimitivesAspect (myDrawer->ShadingAspect()->Aspect()); + aGroupTris->AddPrimitiveArray (aTris); + aGroupTris->SetClosed (true); // will allow backface culling / capping for our solid object + + // manually tessellated disk + /*Handle(Graphic3d_ArrayOfTriangles) aTris2 = + new Graphic3d_ArrayOfTriangles (aNbSlices + 1, aNbSlices * 3, Graphic3d_ArrayFlags_VertexNormal); + aTris2->AddVertex (gp_Pnt (0.0, 0.0, aHeight), gp::DZ()); + for (int aSliceIter = 0; aSliceIter < aNbSlices; ++aSliceIter) + { + double anAngle = M_PI * 2.0 * double(aSliceIter) / double(aNbSlices); + aTris2->AddVertex (gp_Pnt (Cos (anAngle) * aRadius, Sin (anAngle) * aRadius, aHeight), gp::DZ()); + } + for (int aSliceIter = 0; aSliceIter < aNbSlices; ++aSliceIter) + { + aTris2->AddEdges (1, aSliceIter + 2, aSliceIter + 1 < aNbSlices ? (aSliceIter + 3) : 2); + } + aGroupTris->AddPrimitiveArray (aTris2);*/ + + // manually tessellate cylinder section as a polyline + Handle(Graphic3d_ArrayOfSegments) aSegs = new Graphic3d_ArrayOfSegments (4, 4 * 2, Graphic3d_ArrayFlags_None); + aSegs->AddVertex (gp_Pnt (0.0, -aRadius, 0.0)); + aSegs->AddVertex (gp_Pnt (0.0, -aRadius, aHeight)); + aSegs->AddVertex (gp_Pnt (0.0, aRadius, aHeight)); + aSegs->AddVertex (gp_Pnt (0.0, aRadius, 0.0)); + aSegs->AddEdges (1, 2); + aSegs->AddEdges (2, 3); + aSegs->AddEdges (3, 4); + aSegs->AddEdges (4, 1); + + Handle(Graphic3d_Group) aGroupSegs = thePrs->NewGroup(); + aGroupSegs->SetGroupPrimitivesAspect (myDrawer->WireAspect()->Aspect()); + aGroupSegs->AddPrimitiveArray (aSegs); + } + else if (theMode == MyDispMode_Highlight) + { + Bnd_Box aBox; + BRepBndLib::Add (aShape, aBox); + Prs3d_BndBox::Add (thePrs, aBox, myDrawer); + } +} + +//! Custom AIS owner. +class MyAisOwner : public SelectMgr_EntityOwner +{ + DEFINE_STANDARD_RTTI_INLINE(MyAisOwner, SelectMgr_EntityOwner) +public: + MyAisOwner (const Handle(MyAisObject)& theObj, int thePriority = 0) + : SelectMgr_EntityOwner (theObj, thePriority) {} + + void SetAnimation (const Handle(AIS_Animation)& theAnim) { myAnim = theAnim; } + + virtual void HilightWithColor (const Handle(PrsMgr_PresentationManager)& thePrsMgr, + const Handle(Prs3d_Drawer)& theStyle, + const Standard_Integer theMode) override; + virtual void Unhilight (const Handle(PrsMgr_PresentationManager)& thePrsMgr, + const Standard_Integer theMode) override; + + virtual bool IsForcedHilight() const override { return true; } + virtual bool HandleMouseClick (const Graphic3d_Vec2i& thePoint, + Aspect_VKeyMouse theButton, + Aspect_VKeyFlags theModifiers, + bool theIsDoubleClick) override; + virtual void SetLocation (const TopLoc_Location& theLocation) override + { + if (!myPrs.IsNull()) { myPrs->SetTransformation (new TopLoc_Datum3D (theLocation.Transformation())); } + } +protected: + Handle(Prs3d_Presentation) myPrs; + Handle(AIS_Animation) myAnim; +}; + +void MyAisOwner::HilightWithColor (const Handle(PrsMgr_PresentationManager)& thePrsMgr, + const Handle(Prs3d_Drawer)& theStyle, + const Standard_Integer theMode) +{ + (void )theMode; + MyAisObject* anObj = dynamic_cast (mySelectable); + if (myPrs.IsNull()) + { + myPrs = new Prs3d_Presentation (thePrsMgr->StructureManager()); + anObj->Compute (thePrsMgr, myPrs, MyAisObject::MyDispMode_Highlight); + } + if (thePrsMgr->IsImmediateModeOn()) + { + Handle(StdSelect_ViewerSelector3d) aSelector = anObj->InteractiveContext()->MainSelector(); + SelectMgr_SortCriterion aPickPnt; + for (int aPickIter = 1; aPickIter <= aSelector->NbPicked(); ++aPickIter) + { + if (aSelector->Picked (aPickIter) == this) + { + aPickPnt = aSelector->PickedData (aPickIter); + break; + } + } + + Handle(Prs3d_Presentation) aPrs = mySelectable->GetHilightPresentation (thePrsMgr); + aPrs->Clear(); + Handle(Graphic3d_Group) aGroupPnt = aPrs->NewGroup(); + aGroupPnt->SetGroupPrimitivesAspect (theStyle->ArrowAspect()->Aspect()); + + gp_Trsf aTrsfInv (mySelectable->InversedTransformation().Trsf()); + gp_Dir aNorm (aPickPnt.Normal.x(), aPickPnt.Normal.y(), aPickPnt.Normal.z()); + Handle(Graphic3d_ArrayOfTriangles) aTris = + Prs3d_Arrow::DrawShaded (gp_Ax1(aPickPnt.Point, aNorm).Transformed (aTrsfInv), + 1.0, 15.0, + 3.0, 4.0, 10); + aGroupPnt->AddPrimitiveArray (aTris); + + aPrs->SetZLayer (Graphic3d_ZLayerId_Top); + thePrsMgr->AddToImmediateList (aPrs); + + //Handle(Prs3d_PresentationShadow) aShadow = new Prs3d_PresentationShadow (thePrsMgr->StructureManager(), myPrs); + //aShadow->SetZLayer (Graphic3d_ZLayerId_Top); + //aShadow->Highlight (theStyle); + //thePrsMgr->AddToImmediateList (aShadow); + } + else + { + myPrs->SetTransformation (mySelectable->TransformationGeom()); + myPrs->Display(); + } +} + +void MyAisOwner::Unhilight (const Handle(PrsMgr_PresentationManager)& thePrsMgr, + const Standard_Integer theMode) +{ + (void )thePrsMgr; + (void )theMode; + if (!myPrs.IsNull()) + { + myPrs->Erase(); + } +} + +bool MyAisOwner::HandleMouseClick (const Graphic3d_Vec2i& thePoint, + Aspect_VKeyMouse theButton, + Aspect_VKeyFlags theModifiers, + bool theIsDoubleClick) +{ + (void )thePoint; + (void )theButton; + (void )theModifiers; + (void )theIsDoubleClick; + { + static math_BullardGenerator aRandGen; + Quantity_Color aRandColor (float(aRandGen.NextInt() % 256) / 255.0f, + float(aRandGen.NextInt() % 256) / 255.0f, + float(aRandGen.NextInt() % 256) / 255.0f, + Quantity_TOC_sRGB); + mySelectable->Attributes()->ShadingAspect()->SetColor(aRandColor); + mySelectable->SynchronizeAspects(); + } + + if (!myAnim.IsNull()) + { + static bool isFirst = true; + isFirst = !isFirst; + MyAisObject* anObj = dynamic_cast (mySelectable); + + gp_Trsf aTrsfTo; + aTrsfTo.SetRotation (gp_Ax1 (gp::Origin(), gp::DX()), isFirst ? M_PI * 0.5 : -M_PI * 0.5); + gp_Trsf aTrsfFrom = anObj->LocalTransformation(); + Handle(AIS_AnimationObject) anAnim = new AIS_AnimationObject ("MyAnim", anObj->InteractiveContext(), anObj, aTrsfFrom, aTrsfTo); + anAnim->SetOwnDuration (2.0); + + myAnim->Clear(); + myAnim->Add (anAnim); + myAnim->StartTimer (0.0, 1.0, true); + } + + return true; +} + +void MyAisObject::ComputeSelection (const Handle(SelectMgr_Selection)& theSel, + const Standard_Integer theMode) +{ + if (theMode != 0) + { + return; + } + + const double aRadius = 100.0, aHeight = 100.0; + TopoDS_Shape aShape = BRepPrimAPI_MakeCylinder (aRadius, aHeight); + Bnd_Box aBox; + BRepBndLib::Add (aShape, aBox); + Handle(MyAisOwner) anOwner = new MyAisOwner (this); + anOwner->SetAnimation (myAnim); + + Handle(Graphic3d_ArrayOfTriangles) aTris = Prs3d_ToolCylinder::Create (aRadius, aRadius, aHeight, 25, 25, gp_Trsf()); + Handle(Select3D_SensitivePrimitiveArray) aSensTri = new Select3D_SensitivePrimitiveArray (anOwner); + aSensTri->InitTriangulation (aTris->Attributes(), aTris->Indices(), TopLoc_Location()); + theSel->Add (aSensTri); + + //Handle(SelectMgr_EntityOwner) anOwner = new SelectMgr_EntityOwner (this); + //Handle(Select3D_SensitiveBox) aSensBox = new Select3D_SensitiveBox (anOwner, aBox); + //theSel->Add (aSensBox); +} + +} + +//======================================================================= +//function : QATutorialAisObject +//purpose : +//======================================================================= +static Standard_Integer QATutorialAisObject (Draw_Interpretor& theDi, + Standard_Integer theNbArgs, + const char** theArgVec) +{ + if (theNbArgs != 2) + { + theDi << "Syntax error: wrong number of arguments"; + return 1; + } + if (ViewerTest::GetAISContext().IsNull()) + { + theDi << "Syntax error: no active viewer"; + return 1; + } + + const TCollection_AsciiString aPrsName (theArgVec[1]); + + Handle(MyAisObject) aPrs = new MyAisObject(); + aPrs->SetAnimation (ViewerTest::CurrentEventManager()->ObjectsAnimation()); + ViewerTest::Display (aPrsName, aPrs); + return 0; +} + +//======================================================================= +//function : TutorialCommands +//purpose : +//======================================================================= +void QADraw::TutorialCommands (Draw_Interpretor& theCommands) +{ + const char* aGroup = "QA_Commands"; + + theCommands.Add ("QATutorialAisObject", + "QATutorialAisObject name", + __FILE__, QATutorialAisObject, aGroup); +} diff --git a/tests/demo/samples/aisobject b/tests/demo/samples/aisobject new file mode 100644 index 0000000000..420a4a1b6a --- /dev/null +++ b/tests/demo/samples/aisobject @@ -0,0 +1,14 @@ +puts "==============================" +puts "0032668: Documentation - add tutorial for creating a custom AIS Interactive Object" +puts "==============================" + +pload MODELING VISUALIZATION QAcommands +vclear +vinit View1 + +QATutorialAisObject p +vfit +vmoveto 300 300 +vdump $imagedir/${casename}.png + +puts "TEST COMPLETED" From d7dac7fc364233640cad10763a9a4602154f22e0 Mon Sep 17 00:00:00 2001 From: Dzmitry Razmyslovich Date: Tue, 18 Jan 2022 14:52:39 +0100 Subject: [PATCH 197/639] 0032784: BinXCAF fails to load documents containing the shapes with scaled/mirrored location A flag not to raise an exception is used on reading of an XCAF document. If such a shape with scaling transformation is stored in the document, it should be read. --- src/BinMNaming/BinMNaming_NamedShapeDriver.cxx | 2 +- tests/bugs/xde/bug32784 | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) create mode 100644 tests/bugs/xde/bug32784 diff --git a/src/BinMNaming/BinMNaming_NamedShapeDriver.cxx b/src/BinMNaming/BinMNaming_NamedShapeDriver.cxx index e23187cb4c..1ee3e46d0b 100644 --- a/src/BinMNaming/BinMNaming_NamedShapeDriver.cxx +++ b/src/BinMNaming/BinMNaming_NamedShapeDriver.cxx @@ -131,7 +131,7 @@ static int TranslateFrom (const BinObjMgt_Persistent& theSource, TopAbs_Orientation anOrient = CharToOrientation (aCharOrient); theResult.TShape (theShapeSet->Shape (aShapeID).TShape());//TShape - theResult.Location (theShapeSet->Locations().Location (aLocID)); //Location + theResult.Location (theShapeSet->Locations().Location (aLocID), Standard_False); //Location theResult.Orientation (anOrient);//Orientation return 0; } diff --git a/tests/bugs/xde/bug32784 b/tests/bugs/xde/bug32784 new file mode 100644 index 0000000000..5ad3ead49f --- /dev/null +++ b/tests/bugs/xde/bug32784 @@ -0,0 +1,6 @@ +puts "===========" +puts "0032784: BinXCAF fails to load documents containing the shapes with scaled/mirrored location" +puts "===========" + +if [info exists D] {catch {Close D}} +XOpen [locate_data_file bug32784_mirrored.xbf] D From 33a4d46b288c06729eb8f496a73287bbf5e1fe0c Mon Sep 17 00:00:00 2001 From: aml Date: Wed, 12 Jan 2022 17:16:00 +0300 Subject: [PATCH 198/639] 0032781: Coding - get rid of unused headers [BRepCheck to ChFiKPart] --- src/BOPAlgo/BOPAlgo_BuilderSolid.cxx | 1 + src/BRepCheck/BRepCheck.cxx | 1 - src/BRepCheck/BRepCheck_Analyzer.cxx | 2 - src/BRepCheck/BRepCheck_Analyzer.hxx | 1 - src/BRepCheck/BRepCheck_Edge.cxx | 7 - src/BRepCheck/BRepCheck_Face.cxx | 3 - src/BRepCheck/BRepCheck_Face.hxx | 1 - src/BRepCheck/BRepCheck_Result.hxx | 3 - src/BRepCheck/BRepCheck_Shell.cxx | 4 - src/BRepCheck/BRepCheck_Shell.hxx | 3 - src/BRepCheck/BRepCheck_Solid.cxx | 2 - src/BRepCheck/BRepCheck_Vertex.cxx | 5 - src/BRepCheck/BRepCheck_Vertex.hxx | 1 - src/BRepCheck/BRepCheck_Wire.cxx | 7 - src/BRepCheck/BRepCheck_Wire.hxx | 1 - .../BRepClass_FClass2dOfFClassifier.hxx | 4 - src/BRepClass/BRepClass_FClassifier.hxx | 3 - src/BRepClass/BRepClass_FaceClassifier.cxx | 1 - src/BRepClass/BRepClass_FaceClassifier.hxx | 1 - src/BRepClass/BRepClass_FaceExplorer.hxx | 3 - .../BRepClass_FacePassiveClassifier.hxx | 3 - src/BRepClass/BRepClass_Intersector.hxx | 2 - src/BRepClass3d/BRepClass3d_BndBoxTree.hxx | 2 - src/BRepClass3d/BRepClass3d_Intersector3d.cxx | 2 - src/BRepClass3d/BRepClass3d_Intersector3d.hxx | 3 - src/BRepClass3d/BRepClass3d_SClassifier.cxx | 4 - src/BRepClass3d/BRepClass3d_SClassifier.hxx | 3 - .../BRepClass3d_SolidClassifier.cxx | 1 - .../BRepClass3d_SolidClassifier.hxx | 2 - src/BRepClass3d/BRepClass3d_SolidExplorer.cxx | 7 - .../BRepClass3d_SolidPassiveClassifier.hxx | 1 - .../BRepExtrema_DistShapeShape.cxx | 1 - .../BRepExtrema_DistShapeShape.hxx | 2 - src/BRepExtrema/BRepExtrema_DistanceSS.cxx | 4 - src/BRepExtrema/BRepExtrema_ExtCF.cxx | 1 - src/BRepExtrema/BRepExtrema_ExtFF.cxx | 1 - src/BRepExtrema/BRepExtrema_ExtPF.hxx | 2 - .../BRepExtrema_ShapeProximity.hxx | 4 - src/BRepFeat/BRepFeat.cxx | 4 - src/BRepFeat/BRepFeat_Builder.cxx | 4 - src/BRepFeat/BRepFeat_Builder.hxx | 4 - src/BRepFeat/BRepFeat_Form.cxx | 14 -- src/BRepFeat/BRepFeat_Form.hxx | 1 - src/BRepFeat/BRepFeat_Gluer.cxx | 2 - src/BRepFeat/BRepFeat_Gluer.hxx | 1 - src/BRepFeat/BRepFeat_MakeCylindricalHole.cxx | 5 - src/BRepFeat/BRepFeat_MakeCylindricalHole.hxx | 1 - src/BRepFeat/BRepFeat_MakeDPrism.cxx | 12 -- src/BRepFeat/BRepFeat_MakeDPrism.hxx | 3 - src/BRepFeat/BRepFeat_MakeLinearForm.cxx | 19 -- src/BRepFeat/BRepFeat_MakeLinearForm.hxx | 2 - src/BRepFeat/BRepFeat_MakePipe.cxx | 12 -- src/BRepFeat/BRepFeat_MakePipe.hxx | 3 - src/BRepFeat/BRepFeat_MakePrism.cxx | 9 - src/BRepFeat/BRepFeat_MakePrism.hxx | 3 - src/BRepFeat/BRepFeat_MakeRevol.cxx | 20 --- src/BRepFeat/BRepFeat_MakeRevol.hxx | 3 - src/BRepFeat/BRepFeat_MakeRevolutionForm.cxx | 17 -- src/BRepFeat/BRepFeat_MakeRevolutionForm.hxx | 2 - src/BRepFeat/BRepFeat_RibSlot.cxx | 12 -- src/BRepFeat/BRepFeat_RibSlot.hxx | 2 - src/BRepFeat/BRepFeat_SplitShape.cxx | 9 - src/BRepFeat/BRepFeat_SplitShape.hxx | 1 - src/BRepFill/BRepFill.cxx | 16 -- src/BRepFill/BRepFill.hxx | 1 - src/BRepFill/BRepFill_ACRLaw.cxx | 1 - src/BRepFill/BRepFill_AdvancedEvolved.cxx | 16 -- src/BRepFill/BRepFill_AdvancedEvolved.hxx | 1 - src/BRepFill/BRepFill_ApproxSeewing.cxx | 2 - src/BRepFill/BRepFill_ApproxSeewing.hxx | 1 - src/BRepFill/BRepFill_CompatibleWires.cxx | 5 - src/BRepFill/BRepFill_CompatibleWires.hxx | 3 - src/BRepFill/BRepFill_ComputeCLine.hxx | 3 - src/BRepFill/BRepFill_CurveConstraint.cxx | 9 - src/BRepFill/BRepFill_CurveConstraint.hxx | 1 - src/BRepFill/BRepFill_Draft.cxx | 11 -- src/BRepFill/BRepFill_DraftLaw.cxx | 2 - src/BRepFill/BRepFill_DraftLaw.hxx | 1 - src/BRepFill/BRepFill_Edge3DLaw.cxx | 1 - src/BRepFill/BRepFill_EdgeOnSurfLaw.hxx | 2 - src/BRepFill/BRepFill_Evolved.cxx | 11 -- src/BRepFill/BRepFill_Evolved.hxx | 2 - src/BRepFill/BRepFill_Filling.cxx | 9 - src/BRepFill/BRepFill_Generator.cxx | 7 +- src/BRepFill/BRepFill_Generator.hxx | 1 - src/BRepFill/BRepFill_LocationLaw.cxx | 3 - src/BRepFill/BRepFill_LocationLaw.hxx | 2 - src/BRepFill/BRepFill_MultiLine.cxx | 1 - src/BRepFill/BRepFill_MultiLine.hxx | 1 - src/BRepFill/BRepFill_NSections.cxx | 6 - src/BRepFill/BRepFill_NSections.hxx | 2 - src/BRepFill/BRepFill_OffsetAncestors.cxx | 1 - src/BRepFill/BRepFill_OffsetWire.cxx | 17 -- src/BRepFill/BRepFill_OffsetWire.hxx | 4 - src/BRepFill/BRepFill_Pipe.cxx | 7 - src/BRepFill/BRepFill_Pipe.hxx | 3 - src/BRepFill/BRepFill_PipeShell.cxx | 9 - src/BRepFill/BRepFill_PipeShell.hxx | 2 - src/BRepFill/BRepFill_Section.cxx | 1 - src/BRepFill/BRepFill_Section.hxx | 2 - src/BRepFill/BRepFill_SectionLaw.cxx | 12 -- src/BRepFill/BRepFill_SectionLaw.hxx | 2 - src/BRepFill/BRepFill_SectionPlacement.cxx | 4 - src/BRepFill/BRepFill_SectionPlacement.hxx | 2 - src/BRepFill/BRepFill_ShapeLaw.hxx | 2 - src/BRepFill/BRepFill_Sweep.cxx | 13 -- src/BRepFill/BRepFill_Sweep.hxx | 3 - src/BRepFill/BRepFill_TrimEdgeTool.cxx | 5 - src/BRepFill/BRepFill_TrimEdgeTool.hxx | 2 - src/BRepFill/BRepFill_TrimShellCorner.cxx | 7 - src/BRepFill/BRepFill_TrimShellCorner.hxx | 3 - src/BRepFill/BRepFill_TrimSurfaceTool.cxx | 9 - src/BRepFill/BRepFill_TrimSurfaceTool.hxx | 2 - .../BRepFilletAPI_LocalOperation.hxx | 2 - .../BRepFilletAPI_MakeChamfer.cxx | 2 - .../BRepFilletAPI_MakeChamfer.hxx | 1 - .../BRepFilletAPI_MakeFillet.cxx | 6 - .../BRepFilletAPI_MakeFillet.hxx | 1 - .../BRepFilletAPI_MakeFillet2d.hxx | 3 - src/BRepGProp/BRepGProp.cxx | 4 - src/BRepGProp/BRepGProp.hxx | 1 - src/BRepGProp/BRepGProp_Cinert.hxx | 1 - src/BRepGProp/BRepGProp_Domain.cxx | 1 - src/BRepGProp/BRepGProp_EdgeTool.cxx | 1 - src/BRepGProp/BRepGProp_EdgeTool.hxx | 2 - src/BRepGProp/BRepGProp_Face.cxx | 1 - src/BRepGProp/BRepGProp_Face.hxx | 2 - src/BRepGProp/BRepGProp_Gauss.cxx | 2 - src/BRepGProp/BRepGProp_MeshCinert.cxx | 1 - src/BRepGProp/BRepGProp_MeshProps.hxx | 1 - src/BRepGProp/BRepGProp_Sinert.hxx | 2 - src/BRepGProp/BRepGProp_TFunction.cxx | 1 - src/BRepGProp/BRepGProp_TFunction.hxx | 3 - src/BRepGProp/BRepGProp_UFunction.cxx | 1 - src/BRepGProp/BRepGProp_UFunction.hxx | 2 - src/BRepGProp/BRepGProp_Vinert.hxx | 2 - src/BRepGProp/BRepGProp_VinertGK.cxx | 1 - src/BRepGProp/BRepGProp_VinertGK.hxx | 3 - .../BRepIntCurveSurface_Inter.cxx | 2 - .../BRepIntCurveSurface_Inter.hxx | 2 - src/BRepLProp/BRepLProp.cxx | 1 - src/BRepLProp/BRepLProp_CLProps.hxx | 4 - src/BRepLProp/BRepLProp_CurveTool.hxx | 2 - src/BRepLProp/BRepLProp_SLProps.hxx | 3 - src/BRepLProp/BRepLProp_SurfaceTool.hxx | 2 - src/BRepLib/BRepLib.cxx | 18 -- src/BRepLib/BRepLib_CheckCurveOnSurface.cxx | 1 - src/BRepLib/BRepLib_FindSurface.cxx | 10 -- src/BRepLib/BRepLib_FindSurface.hxx | 2 - src/BRepLib/BRepLib_FuseEdges.cxx | 11 -- src/BRepLib/BRepLib_FuseEdges.hxx | 3 - src/BRepLib/BRepLib_MakeEdge.hxx | 1 - src/BRepLib/BRepLib_MakeEdge2d.hxx | 1 - src/BRepLib/BRepLib_MakeFace.hxx | 2 - src/BRepLib/BRepLib_MakePolygon.cxx | 2 - src/BRepLib/BRepLib_MakePolygon.hxx | 2 - src/BRepLib/BRepLib_MakeShape.cxx | 2 - src/BRepLib/BRepLib_MakeShape.hxx | 2 - src/BRepLib/BRepLib_MakeShell.cxx | 1 - src/BRepLib/BRepLib_MakeShell.hxx | 2 - src/BRepLib/BRepLib_MakeSolid.cxx | 2 - src/BRepLib/BRepLib_MakeSolid.hxx | 2 - src/BRepLib/BRepLib_MakeVertex.hxx | 1 - src/BRepLib/BRepLib_MakeWire.cxx | 5 - src/BRepLib/BRepLib_MakeWire.hxx | 1 - src/BRepLib/BRepLib_MakeWire_1.cxx | 5 - src/BRepLib/BRepLib_ValidateEdge.cxx | 1 - src/BRepMAT2d/BRepMAT2d_BisectingLocus.cxx | 4 - src/BRepMAT2d/BRepMAT2d_BisectingLocus.hxx | 1 - src/BRepMAT2d/BRepMAT2d_Explorer.cxx | 9 - src/BRepMAT2d/BRepMAT2d_Explorer.hxx | 1 - src/BRepMAT2d/BRepMAT2d_LinkTopoBilo.cxx | 5 - src/BRepMAT2d/BRepMAT2d_LinkTopoBilo.hxx | 1 - src/BRepMesh/BRepMesh_BaseMeshAlgo.cxx | 2 - src/BRepMesh/BRepMesh_Circle.hxx | 1 - src/BRepMesh/BRepMesh_CircleInspector.hxx | 2 - src/BRepMesh/BRepMesh_CircleTool.hxx | 1 - src/BRepMesh/BRepMesh_Classifier.hxx | 3 - src/BRepMesh/BRepMesh_ConeRangeSplitter.cxx | 2 + src/BRepMesh/BRepMesh_ConeRangeSplitter.hxx | 1 - .../BRepMesh_ConstrainedBaseMeshAlgo.hxx | 2 - src/BRepMesh/BRepMesh_CurveTessellator.cxx | 1 - src/BRepMesh/BRepMesh_CustomBaseMeshAlgo.hxx | 1 - .../BRepMesh_CylinderRangeSplitter.cxx | 2 + .../BRepMesh_CylinderRangeSplitter.hxx | 1 - .../BRepMesh_DataStructureOfDelaun.cxx | 1 - .../BRepMesh_DataStructureOfDelaun.hxx | 4 - .../BRepMesh_DefaultRangeSplitter.cxx | 2 - .../BRepMesh_DefaultRangeSplitter.hxx | 4 - src/BRepMesh/BRepMesh_Deflection.cxx | 1 - src/BRepMesh/BRepMesh_Deflection.hxx | 1 - .../BRepMesh_DelabellaBaseMeshAlgo.hxx | 2 - .../BRepMesh_DelabellaMeshAlgoFactory.cxx | 3 - .../BRepMesh_DelabellaMeshAlgoFactory.hxx | 2 - src/BRepMesh/BRepMesh_Delaun.cxx | 1 - src/BRepMesh/BRepMesh_Delaun.hxx | 5 - .../BRepMesh_DelaunayBaseMeshAlgo.hxx | 2 - src/BRepMesh/BRepMesh_DiscretRoot.hxx | 1 - src/BRepMesh/BRepMesh_Edge.hxx | 2 - src/BRepMesh/BRepMesh_EdgeDiscret.cxx | 1 - .../BRepMesh_EdgeParameterProvider.hxx | 3 - .../BRepMesh_EdgeTessellationExtractor.hxx | 2 - src/BRepMesh/BRepMesh_FaceDiscret.cxx | 1 - src/BRepMesh/BRepMesh_FaceDiscret.hxx | 2 - src/BRepMesh/BRepMesh_GeomTool.cxx | 1 - src/BRepMesh/BRepMesh_IncrementalMesh.cxx | 1 - src/BRepMesh/BRepMesh_IncrementalMesh.hxx | 1 - src/BRepMesh/BRepMesh_MeshAlgoFactory.cxx | 3 - src/BRepMesh/BRepMesh_MeshAlgoFactory.hxx | 2 - src/BRepMesh/BRepMesh_MeshTool.hxx | 1 - src/BRepMesh/BRepMesh_ModelHealer.cxx | 1 - src/BRepMesh/BRepMesh_ModelHealer.hxx | 1 - src/BRepMesh/BRepMesh_ModelPostProcessor.cxx | 2 + src/BRepMesh/BRepMesh_ModelPostProcessor.hxx | 1 - src/BRepMesh/BRepMesh_ModelPreProcessor.cxx | 3 +- src/BRepMesh/BRepMesh_ModelPreProcessor.hxx | 1 - src/BRepMesh/BRepMesh_OrientedEdge.hxx | 2 - src/BRepMesh/BRepMesh_PluginEntryType.hxx | 2 - src/BRepMesh/BRepMesh_ShapeTool.cxx | 1 - src/BRepMesh/BRepMesh_ShapeTool.hxx | 2 - src/BRepMesh/BRepMesh_ShapeVisitor.cxx | 5 - src/BRepMesh/BRepMesh_Triangle.hxx | 1 - src/BRepMesh/BRepMesh_Triangulator.hxx | 3 - src/BRepMesh/BRepMesh_Vertex.hxx | 1 - src/BRepMesh/BRepMesh_VertexInspector.hxx | 1 - src/BRepMesh/BRepMesh_VertexTool.hxx | 1 - src/BRepMeshData/BRepMeshData_Curve.cxx | 1 - src/BRepMeshData/BRepMeshData_Edge.cxx | 2 - src/BRepMeshData/BRepMeshData_Edge.hxx | 1 - src/BRepMeshData/BRepMeshData_Face.cxx | 1 - src/BRepMeshData/BRepMeshData_Model.cxx | 2 - src/BRepMeshData/BRepMeshData_Model.hxx | 1 - src/BRepMeshData/BRepMeshData_PCurve.cxx | 1 - src/BRepMeshData/BRepMeshData_Wire.cxx | 2 - src/BRepOffset/BRepOffset.cxx | 2 - src/BRepOffset/BRepOffset_Analyse.cxx | 8 - src/BRepOffset/BRepOffset_Analyse.hxx | 3 - src/BRepOffset/BRepOffset_Inter2d.cxx | 9 - src/BRepOffset/BRepOffset_Inter3d.cxx | 5 - src/BRepOffset/BRepOffset_Inter3d.hxx | 2 - src/BRepOffset/BRepOffset_MakeLoops.cxx | 2 - src/BRepOffset/BRepOffset_MakeLoops.hxx | 1 - src/BRepOffset/BRepOffset_MakeOffset.cxx | 19 -- src/BRepOffset/BRepOffset_MakeOffset.hxx | 3 - src/BRepOffset/BRepOffset_MakeOffset_1.cxx | 8 - .../BRepOffset_MakeSimpleOffset.cxx | 1 - src/BRepOffset/BRepOffset_Offset.cxx | 4 - src/BRepOffset/BRepOffset_SimpleOffset.cxx | 1 - src/BRepOffset/BRepOffset_SimpleOffset.hxx | 1 - src/BRepOffset/BRepOffset_Tool.cxx | 12 -- src/BRepOffset/BRepOffset_Tool.hxx | 1 - .../BRepOffsetAPI_DraftAngle.cxx | 7 - .../BRepOffsetAPI_DraftAngle.hxx | 4 - .../BRepOffsetAPI_FindContigousEdges.cxx | 1 - .../BRepOffsetAPI_FindContigousEdges.hxx | 2 - src/BRepOffsetAPI/BRepOffsetAPI_MakeDraft.cxx | 1 - src/BRepOffsetAPI/BRepOffsetAPI_MakeDraft.hxx | 1 - .../BRepOffsetAPI_MakeEvolved.cxx | 3 - .../BRepOffsetAPI_MakeEvolved.hxx | 3 - .../BRepOffsetAPI_MakeFilling.cxx | 3 - .../BRepOffsetAPI_MakeFilling.hxx | 1 - .../BRepOffsetAPI_MakeOffset.cxx | 3 - .../BRepOffsetAPI_MakeOffset.hxx | 4 - .../BRepOffsetAPI_MakeOffsetShape.cxx | 3 - .../BRepOffsetAPI_MakeOffsetShape.hxx | 2 - src/BRepOffsetAPI/BRepOffsetAPI_MakePipe.cxx | 3 - src/BRepOffsetAPI/BRepOffsetAPI_MakePipe.hxx | 2 - .../BRepOffsetAPI_MakePipeShell.cxx | 2 - .../BRepOffsetAPI_MakePipeShell.hxx | 2 - .../BRepOffsetAPI_MakeThickSolid.cxx | 3 - .../BRepOffsetAPI_MakeThickSolid.hxx | 1 - .../BRepOffsetAPI_MiddlePath.cxx | 3 - .../BRepOffsetAPI_MiddlePath.hxx | 2 - .../BRepOffsetAPI_NormalProjection.cxx | 4 - .../BRepOffsetAPI_NormalProjection.hxx | 3 - .../BRepOffsetAPI_ThruSections.cxx | 3 - .../BRepOffsetAPI_ThruSections.hxx | 2 - src/BRepPreviewAPI/BRepPreviewAPI_MakeBox.cxx | 3 - src/BRepPrim/BRepPrim_Builder.cxx | 1 - src/BRepPrim/BRepPrim_Builder.hxx | 3 - src/BRepPrim/BRepPrim_Cone.hxx | 1 - src/BRepPrim/BRepPrim_Cylinder.cxx | 1 - src/BRepPrim/BRepPrim_Cylinder.hxx | 1 - src/BRepPrim/BRepPrim_FaceBuilder.hxx | 1 - src/BRepPrim/BRepPrim_GWedge.cxx | 5 - src/BRepPrim/BRepPrim_GWedge.hxx | 1 - src/BRepPrim/BRepPrim_OneAxis.cxx | 4 - src/BRepPrim/BRepPrim_OneAxis.hxx | 3 - src/BRepPrim/BRepPrim_Sphere.cxx | 1 - src/BRepPrim/BRepPrim_Sphere.hxx | 1 - src/BRepPrim/BRepPrim_Torus.cxx | 1 - src/BRepPrim/BRepPrim_Torus.hxx | 1 - src/BRepPrim/BRepPrim_Wedge.cxx | 1 - src/BRepPrim/BRepPrim_Wedge.hxx | 1 - src/BRepPrimAPI/BRepPrimAPI_MakeBox.cxx | 6 - src/BRepPrimAPI/BRepPrimAPI_MakeBox.hxx | 2 - src/BRepPrimAPI/BRepPrimAPI_MakeCone.cxx | 4 - src/BRepPrimAPI/BRepPrimAPI_MakeCone.hxx | 2 - src/BRepPrimAPI/BRepPrimAPI_MakeCylinder.cxx | 4 - src/BRepPrimAPI/BRepPrimAPI_MakeCylinder.hxx | 2 - src/BRepPrimAPI/BRepPrimAPI_MakeHalfSpace.hxx | 1 - src/BRepPrimAPI/BRepPrimAPI_MakeOneAxis.cxx | 2 - src/BRepPrimAPI/BRepPrimAPI_MakeOneAxis.hxx | 2 - src/BRepPrimAPI/BRepPrimAPI_MakePrism.hxx | 2 - src/BRepPrimAPI/BRepPrimAPI_MakeRevol.cxx | 2 - src/BRepPrimAPI/BRepPrimAPI_MakeRevol.hxx | 2 - .../BRepPrimAPI_MakeRevolution.cxx | 1 - .../BRepPrimAPI_MakeRevolution.hxx | 1 - src/BRepPrimAPI/BRepPrimAPI_MakeSphere.cxx | 2 - src/BRepPrimAPI/BRepPrimAPI_MakeSphere.hxx | 3 - src/BRepPrimAPI/BRepPrimAPI_MakeSweep.hxx | 1 - src/BRepPrimAPI/BRepPrimAPI_MakeTorus.cxx | 3 - src/BRepPrimAPI/BRepPrimAPI_MakeTorus.hxx | 2 - src/BRepPrimAPI/BRepPrimAPI_MakeWedge.cxx | 3 - src/BRepPrimAPI/BRepPrimAPI_MakeWedge.hxx | 1 - src/BRepProj/BRepProj_Projection.cxx | 8 - src/BRepProj/BRepProj_Projection.hxx | 1 - src/BRepSweep/BRepSweep_Builder.cxx | 1 - src/BRepSweep/BRepSweep_Iterator.cxx | 2 - .../BRepSweep_NumLinearRegularSweep.cxx | 4 - .../BRepSweep_NumLinearRegularSweep.hxx | 3 - src/BRepSweep/BRepSweep_Revol.hxx | 1 - src/BRepSweep/BRepSweep_Rotation.cxx | 1 - src/BRepSweep/BRepSweep_Rotation.hxx | 1 - src/BRepSweep/BRepSweep_Tool.cxx | 1 - src/BRepSweep/BRepSweep_Tool.hxx | 1 - src/BRepSweep/BRepSweep_Translation.cxx | 4 - src/BRepSweep/BRepSweep_Trsf.cxx | 1 - src/BRepSweep/BRepSweep_Trsf.hxx | 2 - src/BRepTest/BRepTest_BasicCommands.cxx | 8 +- src/BRepTest/BRepTest_ChamferCommands.cxx | 1 - src/BRepTest/BRepTest_CheckCommands.cxx | 13 -- src/BRepTest/BRepTest_CurveCommands.cxx | 6 - src/BRepTest/BRepTest_DrawableHistory.hxx | 1 - src/BRepTest/BRepTest_ExtremaCommands.cxx | 2 - src/BRepTest/BRepTest_FeatureCommands.cxx | 15 -- src/BRepTest/BRepTest_FilletCommands.cxx | 9 - src/BRepTest/BRepTest_FillingCommands.cxx | 30 ---- src/BRepTest/BRepTest_GPropCommands.cxx | 7 - src/BRepTest/BRepTest_HistoryCommands.cxx | 1 - src/BRepTest/BRepTest_MatCommands.cxx | 5 - src/BRepTest/BRepTest_OtherCommands.cxx | 21 --- src/BRepTest/BRepTest_PrimitiveCommands.cxx | 3 - src/BRepTest/BRepTest_ProjectionCommands.cxx | 6 - src/BRepTest/BRepTest_SurfaceCommands.cxx | 7 - src/BRepTest/BRepTest_SweepCommands.cxx | 3 - src/BRepTest/BRepTest_TopologyCommands.cxx | 17 +- src/BRepToIGES/BRepToIGES_BREntity.cxx | 4 - src/BRepToIGES/BRepToIGES_BREntity.hxx | 2 - src/BRepToIGES/BRepToIGES_BRShell.cxx | 10 -- src/BRepToIGES/BRepToIGES_BRSolid.cxx | 1 - src/BRepToIGES/BRepToIGES_BRWire.cxx | 9 - src/BRepToIGES/BRepToIGES_BRWire.hxx | 2 - src/BRepToIGESBRep/BRepToIGESBRep_Entity.cxx | 36 ---- src/BRepToIGESBRep/BRepToIGESBRep_Entity.hxx | 1 - src/BRepTools/BRepTools.cxx | 17 -- src/BRepTools/BRepTools.hxx | 2 - src/BRepTools/BRepTools_GTrsfModification.cxx | 7 - src/BRepTools/BRepTools_GTrsfModification.hxx | 2 - src/BRepTools/BRepTools_MapOfVertexPnt2d.hxx | 1 - src/BRepTools/BRepTools_Modification.hxx | 1 - src/BRepTools/BRepTools_Modifier.cxx | 5 - src/BRepTools/BRepTools_Modifier.hxx | 2 - .../BRepTools_NurbsConvertModification.cxx | 17 -- .../BRepTools_NurbsConvertModification.hxx | 2 - src/BRepTools/BRepTools_PurgeLocations.cxx | 1 - src/BRepTools/BRepTools_PurgeLocations.hxx | 1 - src/BRepTools/BRepTools_Quilt.cxx | 3 - src/BRepTools/BRepTools_Quilt.hxx | 2 - src/BRepTools/BRepTools_ReShape.cxx | 7 - src/BRepTools/BRepTools_ReShape.hxx | 1 - src/BRepTools/BRepTools_ShapeSet.cxx | 10 -- src/BRepTools/BRepTools_ShapeSet.hxx | 1 - src/BRepTools/BRepTools_Substitution.cxx | 1 - src/BRepTools/BRepTools_Substitution.hxx | 2 - src/BRepTools/BRepTools_TrsfModification.cxx | 4 - src/BRepTools/BRepTools_TrsfModification.hxx | 2 - src/BRepTools/BRepTools_WireExplorer.cxx | 5 - src/BRepTools/BRepTools_WireExplorer.hxx | 3 - .../BRepTopAdaptor_FClass2d.hxx | 3 - src/BRepTopAdaptor/BRepTopAdaptor_HVertex.cxx | 2 - src/BRepTopAdaptor/BRepTopAdaptor_HVertex.hxx | 8 +- .../BRepTopAdaptor_TopolTool.cxx | 5 - .../BRepTopAdaptor_TopolTool.hxx | 1 - src/BSplCLib/BSplCLib.cxx | 3 - src/BSplCLib/BSplCLib.hxx | 20 +-- src/BSplCLib/BSplCLib_Cache.cxx | 1 - src/BSplCLib/BSplCLib_Cache.hxx | 17 +- src/BSplCLib/BSplCLib_CacheParams.hxx | 3 - src/BSplSLib/BSplSLib.hxx | 15 +- src/BSplSLib/BSplSLib_Cache.cxx | 2 - src/BSplSLib/BSplSLib_Cache.hxx | 12 -- src/BSplSLib/BSplSLib_EvaluatorFunction.hxx | 1 - src/BVH/BVH.cxx | 6 - src/Blend/Blend_FuncInv.hxx | 1 + src/CDF/CDF_Application.cxx | 1 - src/CDF/CDF_Application.hxx | 1 - src/CDF/CDF_Directory.hxx | 2 - src/CDF/CDF_DirectoryIterator.cxx | 1 - src/CDF/CDF_DirectoryIterator.hxx | 1 - src/CDF/CDF_FWOSDriver.cxx | 1 - src/CDF/CDF_FWOSDriver.hxx | 2 - src/CDF/CDF_MetaDataDriver.cxx | 3 - src/CDF/CDF_Store.cxx | 2 - src/CDF/CDF_Store.hxx | 4 - src/CDF/CDF_StoreList.cxx | 2 - src/CDF/CDF_StoreList.hxx | 3 - src/CDM/CDM_Application.cxx | 1 - src/CDM/CDM_Application.hxx | 5 - src/CDM/CDM_Document.cxx | 3 - src/CDM/CDM_MapOfDocument.hxx | 1 - src/CDM/CDM_MetaData.cxx | 1 - src/CDM/CDM_MetaData.hxx | 1 - src/CDM/CDM_Reference.hxx | 1 - src/CDM/CDM_ReferenceIterator.hxx | 1 - src/ChFi2d/ChFi2d_AnaFilletAlgo.cxx | 3 - src/ChFi2d/ChFi2d_Builder.cxx | 4 - src/ChFi2d/ChFi2d_Builder.hxx | 3 - src/ChFi2d/ChFi2d_Builder_0.cxx | 1 - src/ChFi2d/ChFi2d_ChamferAPI.cxx | 2 - src/ChFi2d/ChFi2d_FilletAlgo.cxx | 1 - src/ChFi2d/ChFi2d_FilletAlgo.hxx | 1 - src/ChFi3d/ChFi3d.cxx | 5 - src/ChFi3d/ChFi3d.hxx | 1 - src/ChFi3d/ChFi3d_Builder.cxx | 26 --- src/ChFi3d/ChFi3d_Builder.hxx | 1 - src/ChFi3d/ChFi3d_Builder_0.cxx | 169 +++++------------- src/ChFi3d/ChFi3d_Builder_0.hxx | 21 --- src/ChFi3d/ChFi3d_Builder_1.cxx | 18 -- src/ChFi3d/ChFi3d_Builder_2.cxx | 31 +--- src/ChFi3d/ChFi3d_Builder_6.cxx | 19 -- src/ChFi3d/ChFi3d_Builder_C1.cxx | 39 ---- src/ChFi3d/ChFi3d_Builder_C2.cxx | 32 ---- src/ChFi3d/ChFi3d_Builder_CnCrn.cxx | 20 --- src/ChFi3d/ChFi3d_Builder_NotImp.cxx | 24 --- src/ChFi3d/ChFi3d_Builder_SpKP.cxx | 28 --- src/ChFi3d/ChFi3d_ChBuilder.cxx | 10 -- src/ChFi3d/ChFi3d_ChBuilder.hxx | 1 - src/ChFi3d/ChFi3d_ChBuilder_C2.cxx | 13 -- src/ChFi3d/ChFi3d_ChBuilder_C3.cxx | 24 +-- src/ChFi3d/ChFi3d_Debug.cxx | 2 - src/ChFi3d/ChFi3d_FilBuilder.cxx | 6 - src/ChFi3d/ChFi3d_FilBuilder.hxx | 1 - src/ChFi3d/ChFi3d_FilBuilder_C2.cxx | 32 +--- src/ChFi3d/ChFi3d_FilBuilder_C3.cxx | 33 +--- src/ChFiDS/ChFiDS_ChamfSpine.hxx | 3 - src/ChFiDS/ChFiDS_CircSection.hxx | 1 - src/ChFiDS/ChFiDS_CommonPoint.cxx | 3 - src/ChFiDS/ChFiDS_CommonPoint.hxx | 1 - src/ChFiDS/ChFiDS_ElSpine.cxx | 4 - src/ChFiDS/ChFiDS_ElSpine.hxx | 2 - src/ChFiDS/ChFiDS_FilSpine.cxx | 1 - src/ChFiDS/ChFiDS_HData.hxx | 1 - src/ChFiDS/ChFiDS_Map.hxx | 1 - src/ChFiDS/ChFiDS_Regul.hxx | 1 - src/ChFiDS/ChFiDS_SecHArray1.hxx | 1 - src/ChFiDS/ChFiDS_Spine.cxx | 4 - src/ChFiDS/ChFiDS_Stripe.hxx | 2 - src/ChFiDS/ChFiDS_StripeMap.cxx | 1 - src/ChFiDS/ChFiDS_SurfData.cxx | 2 - src/ChFiDS/ChFiDS_SurfData.hxx | 2 - src/ChFiKPart/ChFiKPart_ComputeData.cxx | 38 ---- src/ChFiKPart/ChFiKPart_ComputeData_CS.hxx | 1 - .../ChFiKPart_ComputeData_ChAsymPlnCon.cxx | 1 - .../ChFiKPart_ComputeData_ChPlnCon.cxx | 9 - src/ChFiKPart/ChFiKPart_ComputeData_Fcts.hxx | 4 - .../ChFiKPart_ComputeData_FilPlnCon.cxx | 3 - .../ChFiKPart_ComputeData_FilPlnPln.cxx | 3 - .../ChFiKPart_ComputeData_Rotule.cxx | 4 - src/TopExp/TopExp.hxx | 3 +- 470 files changed, 78 insertions(+), 2069 deletions(-) diff --git a/src/BOPAlgo/BOPAlgo_BuilderSolid.cxx b/src/BOPAlgo/BOPAlgo_BuilderSolid.cxx index 023eecfbe9..05db2286c5 100644 --- a/src/BOPAlgo/BOPAlgo_BuilderSolid.cxx +++ b/src/BOPAlgo/BOPAlgo_BuilderSolid.cxx @@ -25,6 +25,7 @@ #include #include #include +#include #include #include #include diff --git a/src/BRepCheck/BRepCheck.cxx b/src/BRepCheck/BRepCheck.cxx index 2f587ffd24..a388e20ffb 100644 --- a/src/BRepCheck/BRepCheck.cxx +++ b/src/BRepCheck/BRepCheck.cxx @@ -19,7 +19,6 @@ #include #include #include -#include #include #include #include diff --git a/src/BRepCheck/BRepCheck_Analyzer.cxx b/src/BRepCheck/BRepCheck_Analyzer.cxx index 67ca44e664..90282fcf22 100644 --- a/src/BRepCheck/BRepCheck_Analyzer.cxx +++ b/src/BRepCheck/BRepCheck_Analyzer.cxx @@ -30,11 +30,9 @@ #include #include #include -#include #include #include #include -#include #include #include #include diff --git a/src/BRepCheck/BRepCheck_Analyzer.hxx b/src/BRepCheck/BRepCheck_Analyzer.hxx index 1f549fab5d..b71f0490bb 100644 --- a/src/BRepCheck/BRepCheck_Analyzer.hxx +++ b/src/BRepCheck/BRepCheck_Analyzer.hxx @@ -23,7 +23,6 @@ #include #include -#include #include class BRepCheck_Result; diff --git a/src/BRepCheck/BRepCheck_Edge.cxx b/src/BRepCheck/BRepCheck_Edge.cxx index 4e5cd6ca22..32d55b8cd7 100644 --- a/src/BRepCheck/BRepCheck_Edge.cxx +++ b/src/BRepCheck/BRepCheck_Edge.cxx @@ -18,13 +18,8 @@ #include #include #include -#include -#include -#include #include #include -#include -#include #include #include #include @@ -32,7 +27,6 @@ #include #include #include -#include #include #include #include @@ -45,7 +39,6 @@ #include #include #include -#include #include #include #include diff --git a/src/BRepCheck/BRepCheck_Face.cxx b/src/BRepCheck/BRepCheck_Face.cxx index c8ee81dabf..f128ec6d4d 100644 --- a/src/BRepCheck/BRepCheck_Face.cxx +++ b/src/BRepCheck/BRepCheck_Face.cxx @@ -23,7 +23,6 @@ #include #include #include -#include #include #include #include @@ -48,9 +47,7 @@ #include #include #include -#include #include -#include #include #include #include diff --git a/src/BRepCheck/BRepCheck_Face.hxx b/src/BRepCheck/BRepCheck_Face.hxx index a6853e9e39..741a9954b3 100644 --- a/src/BRepCheck/BRepCheck_Face.hxx +++ b/src/BRepCheck/BRepCheck_Face.hxx @@ -20,7 +20,6 @@ #include #include -#include #include #include #include diff --git a/src/BRepCheck/BRepCheck_Result.hxx b/src/BRepCheck/BRepCheck_Result.hxx index b993569099..7ba1695020 100644 --- a/src/BRepCheck/BRepCheck_Result.hxx +++ b/src/BRepCheck/BRepCheck_Result.hxx @@ -18,10 +18,7 @@ #define _BRepCheck_Result_HeaderFile #include -#include -#include -#include #include #include #include diff --git a/src/BRepCheck/BRepCheck_Shell.cxx b/src/BRepCheck/BRepCheck_Shell.cxx index e5daa1c456..d94e5226ad 100644 --- a/src/BRepCheck/BRepCheck_Shell.cxx +++ b/src/BRepCheck/BRepCheck_Shell.cxx @@ -19,7 +19,6 @@ #include #include #include -#include #include #include #include @@ -29,12 +28,9 @@ #include #include #include -#include #include #include -#include #include -#include #include IMPLEMENT_STANDARD_RTTIEXT(BRepCheck_Shell,BRepCheck_Result) diff --git a/src/BRepCheck/BRepCheck_Shell.hxx b/src/BRepCheck/BRepCheck_Shell.hxx index 2876d1c0e3..e5535a860e 100644 --- a/src/BRepCheck/BRepCheck_Shell.hxx +++ b/src/BRepCheck/BRepCheck_Shell.hxx @@ -18,11 +18,8 @@ #define _BRepCheck_Shell_HeaderFile #include -#include #include -#include -#include #include #include #include diff --git a/src/BRepCheck/BRepCheck_Solid.cxx b/src/BRepCheck/BRepCheck_Solid.cxx index 1e1cb925ce..43baa11a32 100644 --- a/src/BRepCheck/BRepCheck_Solid.cxx +++ b/src/BRepCheck/BRepCheck_Solid.cxx @@ -21,7 +21,6 @@ #include #include #include -#include #include #include #include @@ -33,7 +32,6 @@ #include #include #include -#include IMPLEMENT_STANDARD_RTTIEXT(BRepCheck_Solid,BRepCheck_Result) diff --git a/src/BRepCheck/BRepCheck_Vertex.cxx b/src/BRepCheck/BRepCheck_Vertex.cxx index 89c57693f5..0a0ef698d2 100644 --- a/src/BRepCheck/BRepCheck_Vertex.cxx +++ b/src/BRepCheck/BRepCheck_Vertex.cxx @@ -17,11 +17,6 @@ #include #include -#include -#include -#include -#include -#include #include #include #include diff --git a/src/BRepCheck/BRepCheck_Vertex.hxx b/src/BRepCheck/BRepCheck_Vertex.hxx index 1e9f15f40c..b17f0d4034 100644 --- a/src/BRepCheck/BRepCheck_Vertex.hxx +++ b/src/BRepCheck/BRepCheck_Vertex.hxx @@ -21,7 +21,6 @@ #include #include -#include class TopoDS_Vertex; class TopoDS_Shape; diff --git a/src/BRepCheck/BRepCheck_Wire.cxx b/src/BRepCheck/BRepCheck_Wire.cxx index 7177add687..10e40a8165 100644 --- a/src/BRepCheck/BRepCheck_Wire.cxx +++ b/src/BRepCheck/BRepCheck_Wire.cxx @@ -28,7 +28,6 @@ #include #include #include -#include #include #include #include @@ -58,16 +57,10 @@ #include #include #include -#include #include -#include #include #include -#include -#include #include -#include -#include #include #include diff --git a/src/BRepCheck/BRepCheck_Wire.hxx b/src/BRepCheck/BRepCheck_Wire.hxx index ea71c1d846..6beeda0cb9 100644 --- a/src/BRepCheck/BRepCheck_Wire.hxx +++ b/src/BRepCheck/BRepCheck_Wire.hxx @@ -20,7 +20,6 @@ #include #include -#include #include #include #include diff --git a/src/BRepClass/BRepClass_FClass2dOfFClassifier.hxx b/src/BRepClass/BRepClass_FClass2dOfFClassifier.hxx index 492066a66f..e938720497 100644 --- a/src/BRepClass/BRepClass_FClass2dOfFClassifier.hxx +++ b/src/BRepClass/BRepClass_FClass2dOfFClassifier.hxx @@ -19,11 +19,7 @@ #include #include -#include -#include -#include -#include #include #include #include diff --git a/src/BRepClass/BRepClass_FClassifier.hxx b/src/BRepClass/BRepClass_FClassifier.hxx index 359d8f9db2..fe43b1fe76 100644 --- a/src/BRepClass/BRepClass_FClassifier.hxx +++ b/src/BRepClass/BRepClass_FClassifier.hxx @@ -19,13 +19,10 @@ #include #include -#include #include #include -#include #include -#include #include class Standard_DomainError; class BRepClass_FaceExplorer; diff --git a/src/BRepClass/BRepClass_FaceClassifier.cxx b/src/BRepClass/BRepClass_FaceClassifier.cxx index 65cc41fc0c..b3736626f2 100644 --- a/src/BRepClass/BRepClass_FaceClassifier.cxx +++ b/src/BRepClass/BRepClass_FaceClassifier.cxx @@ -20,7 +20,6 @@ #include #include #include -#include #include //======================================================================= diff --git a/src/BRepClass/BRepClass_FaceClassifier.hxx b/src/BRepClass/BRepClass_FaceClassifier.hxx index e4382fb6e2..334f14344e 100644 --- a/src/BRepClass/BRepClass_FaceClassifier.hxx +++ b/src/BRepClass/BRepClass_FaceClassifier.hxx @@ -22,7 +22,6 @@ #include #include -#include class BRepClass_FaceExplorer; class gp_Pnt2d; class TopoDS_Face; diff --git a/src/BRepClass/BRepClass_FaceExplorer.hxx b/src/BRepClass/BRepClass_FaceExplorer.hxx index 8866993bc2..fe674e06fd 100644 --- a/src/BRepClass/BRepClass_FaceExplorer.hxx +++ b/src/BRepClass/BRepClass_FaceExplorer.hxx @@ -19,15 +19,12 @@ #include #include -#include #include #include #include #include #include -#include -#include class gp_Pnt2d; class gp_Lin2d; class BRepClass_Edge; diff --git a/src/BRepClass/BRepClass_FacePassiveClassifier.hxx b/src/BRepClass/BRepClass_FacePassiveClassifier.hxx index 9063f70326..f93b6d015a 100644 --- a/src/BRepClass/BRepClass_FacePassiveClassifier.hxx +++ b/src/BRepClass/BRepClass_FacePassiveClassifier.hxx @@ -19,11 +19,8 @@ #include #include -#include -#include #include -#include #include #include #include diff --git a/src/BRepClass/BRepClass_Intersector.hxx b/src/BRepClass/BRepClass_Intersector.hxx index 05acbc2e63..cdede179d0 100644 --- a/src/BRepClass/BRepClass_Intersector.hxx +++ b/src/BRepClass/BRepClass_Intersector.hxx @@ -19,10 +19,8 @@ #include #include -#include #include -#include class gp_Lin2d; class BRepClass_Edge; class gp_Dir2d; diff --git a/src/BRepClass3d/BRepClass3d_BndBoxTree.hxx b/src/BRepClass3d/BRepClass3d_BndBoxTree.hxx index 5050a74828..a817324ab1 100644 --- a/src/BRepClass3d/BRepClass3d_BndBoxTree.hxx +++ b/src/BRepClass3d/BRepClass3d_BndBoxTree.hxx @@ -20,12 +20,10 @@ #include #include #include -#include #include #include #include #include -#include #include #include diff --git a/src/BRepClass3d/BRepClass3d_Intersector3d.cxx b/src/BRepClass3d/BRepClass3d_Intersector3d.cxx index 29977872e2..8b1b5a879b 100644 --- a/src/BRepClass3d/BRepClass3d_Intersector3d.cxx +++ b/src/BRepClass3d/BRepClass3d_Intersector3d.cxx @@ -20,13 +20,11 @@ #include #include #include -#include #include #include #include #include #include -#include #include //============================================================================ diff --git a/src/BRepClass3d/BRepClass3d_Intersector3d.hxx b/src/BRepClass3d/BRepClass3d_Intersector3d.hxx index 7b7c3c0916..23f735e787 100644 --- a/src/BRepClass3d/BRepClass3d_Intersector3d.hxx +++ b/src/BRepClass3d/BRepClass3d_Intersector3d.hxx @@ -19,12 +19,9 @@ #include #include -#include #include -#include #include -#include #include #include class gp_Lin; diff --git a/src/BRepClass3d/BRepClass3d_SClassifier.cxx b/src/BRepClass3d/BRepClass3d_SClassifier.cxx index 675bbd99c9..1cbf729b23 100644 --- a/src/BRepClass3d/BRepClass3d_SClassifier.cxx +++ b/src/BRepClass3d/BRepClass3d_SClassifier.cxx @@ -20,7 +20,6 @@ #include #include #include -#include #include #include #include @@ -28,10 +27,7 @@ #include #include #include -#include #include -#include -#include #include #include #include diff --git a/src/BRepClass3d/BRepClass3d_SClassifier.hxx b/src/BRepClass3d/BRepClass3d_SClassifier.hxx index 732cf5b3b2..f28a5e412d 100644 --- a/src/BRepClass3d/BRepClass3d_SClassifier.hxx +++ b/src/BRepClass3d/BRepClass3d_SClassifier.hxx @@ -19,12 +19,9 @@ #include #include -#include #include #include -#include -#include #include class BRepClass3d_SolidExplorer; class gp_Pnt; diff --git a/src/BRepClass3d/BRepClass3d_SolidClassifier.cxx b/src/BRepClass3d/BRepClass3d_SolidClassifier.cxx index ebf241f484..9e33ed99cf 100644 --- a/src/BRepClass3d/BRepClass3d_SolidClassifier.cxx +++ b/src/BRepClass3d/BRepClass3d_SolidClassifier.cxx @@ -59,7 +59,6 @@ static StatistiquesBRepClass3d STAT; #include #include -#include #include BRepClass3d_SolidClassifier::BRepClass3d_SolidClassifier() diff --git a/src/BRepClass3d/BRepClass3d_SolidClassifier.hxx b/src/BRepClass3d/BRepClass3d_SolidClassifier.hxx index 4e902600e5..420c14182e 100644 --- a/src/BRepClass3d/BRepClass3d_SolidClassifier.hxx +++ b/src/BRepClass3d/BRepClass3d_SolidClassifier.hxx @@ -19,12 +19,10 @@ #include #include -#include #include #include #include -#include class TopoDS_Shape; class gp_Pnt; diff --git a/src/BRepClass3d/BRepClass3d_SolidExplorer.cxx b/src/BRepClass3d/BRepClass3d_SolidExplorer.cxx index 07a45b616d..43b657b336 100644 --- a/src/BRepClass3d/BRepClass3d_SolidExplorer.cxx +++ b/src/BRepClass3d/BRepClass3d_SolidExplorer.cxx @@ -25,22 +25,15 @@ //-- To printf on NT -#include #include #include -#include #include -#include #include -#include #include #include #include #include -#include #include -#include -#include #include #include #include diff --git a/src/BRepClass3d/BRepClass3d_SolidPassiveClassifier.hxx b/src/BRepClass3d/BRepClass3d_SolidPassiveClassifier.hxx index 3b40add298..1d83427339 100644 --- a/src/BRepClass3d/BRepClass3d_SolidPassiveClassifier.hxx +++ b/src/BRepClass3d/BRepClass3d_SolidPassiveClassifier.hxx @@ -24,7 +24,6 @@ #include #include #include -#include #include #include #include diff --git a/src/BRepExtrema/BRepExtrema_DistShapeShape.cxx b/src/BRepExtrema/BRepExtrema_DistShapeShape.cxx index 1ef68ed9d6..8bd58f7e22 100644 --- a/src/BRepExtrema/BRepExtrema_DistShapeShape.cxx +++ b/src/BRepExtrema/BRepExtrema_DistShapeShape.cxx @@ -25,7 +25,6 @@ #include #include #include -#include #include #include #include diff --git a/src/BRepExtrema/BRepExtrema_DistShapeShape.hxx b/src/BRepExtrema/BRepExtrema_DistShapeShape.hxx index 67269dbd62..3e5bc64a72 100644 --- a/src/BRepExtrema/BRepExtrema_DistShapeShape.hxx +++ b/src/BRepExtrema/BRepExtrema_DistShapeShape.hxx @@ -20,10 +20,8 @@ #include #include #include -#include #include #include -#include #include #include #include diff --git a/src/BRepExtrema/BRepExtrema_DistanceSS.cxx b/src/BRepExtrema/BRepExtrema_DistanceSS.cxx index 0031e66a71..e81108b794 100644 --- a/src/BRepExtrema/BRepExtrema_DistanceSS.cxx +++ b/src/BRepExtrema/BRepExtrema_DistanceSS.cxx @@ -18,7 +18,6 @@ #include -#include #include #include #include @@ -34,12 +33,10 @@ #include #include #include -#include #include #include #include #include -#include #include #include #include @@ -54,7 +51,6 @@ #include #include #include -#include /*********************************************************************************/ diff --git a/src/BRepExtrema/BRepExtrema_ExtCF.cxx b/src/BRepExtrema/BRepExtrema_ExtCF.cxx index cafdc8db11..4009b81001 100644 --- a/src/BRepExtrema/BRepExtrema_ExtCF.cxx +++ b/src/BRepExtrema/BRepExtrema_ExtCF.cxx @@ -18,7 +18,6 @@ #include #include -#include #include #include #include diff --git a/src/BRepExtrema/BRepExtrema_ExtFF.cxx b/src/BRepExtrema/BRepExtrema_ExtFF.cxx index 02f7d5826e..377e3e1e72 100644 --- a/src/BRepExtrema/BRepExtrema_ExtFF.cxx +++ b/src/BRepExtrema/BRepExtrema_ExtFF.cxx @@ -19,7 +19,6 @@ #include -#include #include #include #include diff --git a/src/BRepExtrema/BRepExtrema_ExtPF.hxx b/src/BRepExtrema/BRepExtrema_ExtPF.hxx index 1c90d570ab..e132fc7e84 100644 --- a/src/BRepExtrema/BRepExtrema_ExtPF.hxx +++ b/src/BRepExtrema/BRepExtrema_ExtPF.hxx @@ -14,9 +14,7 @@ #ifndef _BRepExtrema_ExtPF_HeaderFile #define _BRepExtrema_ExtPF_HeaderFile -#include #include -#include #include #include #include diff --git a/src/BRepExtrema/BRepExtrema_ShapeProximity.hxx b/src/BRepExtrema/BRepExtrema_ShapeProximity.hxx index 328d23d94d..d863742136 100644 --- a/src/BRepExtrema/BRepExtrema_ShapeProximity.hxx +++ b/src/BRepExtrema/BRepExtrema_ShapeProximity.hxx @@ -16,10 +16,6 @@ #ifndef _BRepExtrema_ShapeProximity_HeaderFile #define _BRepExtrema_ShapeProximity_HeaderFile -#include -#include - -#include #include //! Tool class for shape proximity detection. diff --git a/src/BRepFeat/BRepFeat.cxx b/src/BRepFeat/BRepFeat.cxx index 4118757b34..725050a01f 100644 --- a/src/BRepFeat/BRepFeat.cxx +++ b/src/BRepFeat/BRepFeat.cxx @@ -16,12 +16,10 @@ #include -#include #include #include #include #include -#include #include #include #include @@ -36,7 +34,6 @@ #include #include #include -#include #include #include #include @@ -54,7 +51,6 @@ #include #include #include -#include #include #define NECHANTBARYC 11 diff --git a/src/BRepFeat/BRepFeat_Builder.cxx b/src/BRepFeat/BRepFeat_Builder.cxx index 24c641209b..5c53721adb 100644 --- a/src/BRepFeat/BRepFeat_Builder.cxx +++ b/src/BRepFeat/BRepFeat_Builder.cxx @@ -30,15 +30,11 @@ #include #include #include -#include -#include -#include #include #include #include #include #include -#include #include //======================================================================= diff --git a/src/BRepFeat/BRepFeat_Builder.hxx b/src/BRepFeat/BRepFeat_Builder.hxx index b0f2616832..2d3fc4327c 100644 --- a/src/BRepFeat/BRepFeat_Builder.hxx +++ b/src/BRepFeat/BRepFeat_Builder.hxx @@ -18,13 +18,9 @@ #include #include -#include #include -#include -#include #include -#include #include #include #include diff --git a/src/BRepFeat/BRepFeat_Form.cxx b/src/BRepFeat/BRepFeat_Form.cxx index e04e2ce919..19f1de65c1 100644 --- a/src/BRepFeat/BRepFeat_Form.cxx +++ b/src/BRepFeat/BRepFeat_Form.cxx @@ -15,14 +15,9 @@ // commercial license or contractual agreement. -#include -#include #include #include -#include #include -#include -#include #include #include #include @@ -36,25 +31,16 @@ #include #include #include -#include -#include #include #include #include #include -#include #include -#include #include #include #include -#include #include #include -#include -#include -#include -#include #include #ifdef OCCT_DEBUG diff --git a/src/BRepFeat/BRepFeat_Form.hxx b/src/BRepFeat/BRepFeat_Form.hxx index ef350db86a..793fb952d9 100644 --- a/src/BRepFeat/BRepFeat_Form.hxx +++ b/src/BRepFeat/BRepFeat_Form.hxx @@ -21,7 +21,6 @@ #include #include -#include #include #include #include diff --git a/src/BRepFeat/BRepFeat_Gluer.cxx b/src/BRepFeat/BRepFeat_Gluer.cxx index b119560b4a..15e9717947 100644 --- a/src/BRepFeat/BRepFeat_Gluer.cxx +++ b/src/BRepFeat/BRepFeat_Gluer.cxx @@ -17,8 +17,6 @@ #include #include -#include -#include #include #include diff --git a/src/BRepFeat/BRepFeat_Gluer.hxx b/src/BRepFeat/BRepFeat_Gluer.hxx index aba0dfe40c..a525775c1a 100644 --- a/src/BRepFeat/BRepFeat_Gluer.hxx +++ b/src/BRepFeat/BRepFeat_Gluer.hxx @@ -24,7 +24,6 @@ #include #include #include -#include #include class TopoDS_Shape; class TopoDS_Face; diff --git a/src/BRepFeat/BRepFeat_MakeCylindricalHole.cxx b/src/BRepFeat/BRepFeat_MakeCylindricalHole.cxx index 025dbfe1f2..ca244cff14 100644 --- a/src/BRepFeat/BRepFeat_MakeCylindricalHole.cxx +++ b/src/BRepFeat/BRepFeat_MakeCylindricalHole.cxx @@ -16,12 +16,9 @@ #include -#include -#include #include #include #include -#include #include #include #include @@ -29,13 +26,11 @@ #include #include #include -#include #include #include #include #include #include -#include #include #include #include diff --git a/src/BRepFeat/BRepFeat_MakeCylindricalHole.hxx b/src/BRepFeat/BRepFeat_MakeCylindricalHole.hxx index 26b0ea93e3..87ff55200b 100644 --- a/src/BRepFeat/BRepFeat_MakeCylindricalHole.hxx +++ b/src/BRepFeat/BRepFeat_MakeCylindricalHole.hxx @@ -19,7 +19,6 @@ #include #include -#include #include #include diff --git a/src/BRepFeat/BRepFeat_MakeDPrism.cxx b/src/BRepFeat/BRepFeat_MakeDPrism.cxx index 4d9e8ac669..7f01a42ba8 100644 --- a/src/BRepFeat/BRepFeat_MakeDPrism.cxx +++ b/src/BRepFeat/BRepFeat_MakeDPrism.cxx @@ -16,8 +16,6 @@ #include -#include -#include #include #include #include @@ -28,7 +26,6 @@ #include #include #include -#include #include #include #include @@ -36,13 +33,10 @@ #include #include #include -#include -#include #include #include #include #include -#include #include #include #include @@ -51,16 +45,10 @@ #include #include #include -#include #include #include #include -#include #include -#include -#include -#include -#include #include #ifdef OCCT_DEBUG diff --git a/src/BRepFeat/BRepFeat_MakeDPrism.hxx b/src/BRepFeat/BRepFeat_MakeDPrism.hxx index a31e84b660..358e94b8a6 100644 --- a/src/BRepFeat/BRepFeat_MakeDPrism.hxx +++ b/src/BRepFeat/BRepFeat_MakeDPrism.hxx @@ -21,15 +21,12 @@ #include #include -#include #include #include -#include #include #include #include #include -#include class Geom_Curve; class TopoDS_Shape; class TopoDS_Edge; diff --git a/src/BRepFeat/BRepFeat_MakeLinearForm.cxx b/src/BRepFeat/BRepFeat_MakeLinearForm.cxx index b87a8827fe..c08cf2d9fd 100644 --- a/src/BRepFeat/BRepFeat_MakeLinearForm.cxx +++ b/src/BRepFeat/BRepFeat_MakeLinearForm.cxx @@ -36,34 +36,20 @@ #include #include #include -#include -#include #include #include #include #include #include #include -#include -#include #include -#include -#include #include -#include #include -#include #include -#include -#include #include #include #include #include -#include -#include -#include -#include #include #include #include @@ -71,13 +57,8 @@ #include #include #include -#include -#include #include -#include #include -#include -#include #ifdef OCCT_DEBUG extern Standard_Boolean BRepFeat_GettraceFEAT(); diff --git a/src/BRepFeat/BRepFeat_MakeLinearForm.hxx b/src/BRepFeat/BRepFeat_MakeLinearForm.hxx index 08c10bdbb5..dad2fc20b2 100644 --- a/src/BRepFeat/BRepFeat_MakeLinearForm.hxx +++ b/src/BRepFeat/BRepFeat_MakeLinearForm.hxx @@ -22,12 +22,10 @@ #include #include -#include #include #include #include #include -#include class Geom_Curve; class Geom_Plane; class TopoDS_Shape; diff --git a/src/BRepFeat/BRepFeat_MakePipe.cxx b/src/BRepFeat/BRepFeat_MakePipe.cxx index 7434e2ca24..484db318e8 100644 --- a/src/BRepFeat/BRepFeat_MakePipe.cxx +++ b/src/BRepFeat/BRepFeat_MakePipe.cxx @@ -15,18 +15,11 @@ // commercial license or contractual agreement. -#include #include #include #include -#include -#include #include #include -#include -#include -#include -#include #include #include #include @@ -38,11 +31,6 @@ #include #include #include -#include -#include -#include -#include -#include #ifdef OCCT_DEBUG extern Standard_Boolean BRepFeat_GettraceFEAT(); diff --git a/src/BRepFeat/BRepFeat_MakePipe.hxx b/src/BRepFeat/BRepFeat_MakePipe.hxx index c5d10ffe1f..b1f56a12f5 100644 --- a/src/BRepFeat/BRepFeat_MakePipe.hxx +++ b/src/BRepFeat/BRepFeat_MakePipe.hxx @@ -22,13 +22,10 @@ #include #include -#include #include #include -#include #include #include -#include class Geom_Curve; class TopoDS_Edge; diff --git a/src/BRepFeat/BRepFeat_MakePrism.cxx b/src/BRepFeat/BRepFeat_MakePrism.cxx index 6d50d91a80..34ed188e4f 100644 --- a/src/BRepFeat/BRepFeat_MakePrism.cxx +++ b/src/BRepFeat/BRepFeat_MakePrism.cxx @@ -16,11 +16,9 @@ #include -#include #include #include #include -#include #include #include #include @@ -35,7 +33,6 @@ #include #include #include -#include #include #include #include @@ -45,19 +42,13 @@ #include #include #include -#include #include #include -#include #include #include #include #include -#include -#include -#include #include -#include #ifdef OCCT_DEBUG extern Standard_Boolean BRepFeat_GettraceFEAT(); diff --git a/src/BRepFeat/BRepFeat_MakePrism.hxx b/src/BRepFeat/BRepFeat_MakePrism.hxx index 453927089c..5f559884ac 100644 --- a/src/BRepFeat/BRepFeat_MakePrism.hxx +++ b/src/BRepFeat/BRepFeat_MakePrism.hxx @@ -24,12 +24,9 @@ #include #include #include -#include #include #include #include -#include -#include class Geom_Curve; class TopoDS_Face; class TopoDS_Edge; diff --git a/src/BRepFeat/BRepFeat_MakeRevol.cxx b/src/BRepFeat/BRepFeat_MakeRevol.cxx index 1f93310c0d..69eeee218d 100644 --- a/src/BRepFeat/BRepFeat_MakeRevol.cxx +++ b/src/BRepFeat/BRepFeat_MakeRevol.cxx @@ -16,21 +16,14 @@ #include -#include -#include #include #include -#include -#include #include #include -#include #include #include #include #include -#include -#include #include #include #include @@ -38,32 +31,19 @@ #include #include #include -#include -#include -#include #include #include #include -#include #include #include -#include #include #include #include -#include #include -#include #include #include #include -#include #include -#include -#include -#include -#include -#include #ifdef OCCT_DEBUG extern Standard_Boolean BRepFeat_GettraceFEAT(); diff --git a/src/BRepFeat/BRepFeat_MakeRevol.hxx b/src/BRepFeat/BRepFeat_MakeRevol.hxx index c807e66d38..0cf191e9d8 100644 --- a/src/BRepFeat/BRepFeat_MakeRevol.hxx +++ b/src/BRepFeat/BRepFeat_MakeRevol.hxx @@ -24,12 +24,9 @@ #include #include #include -#include #include #include #include -#include -#include class Geom_Curve; class TopoDS_Face; class TopoDS_Edge; diff --git a/src/BRepFeat/BRepFeat_MakeRevolutionForm.cxx b/src/BRepFeat/BRepFeat_MakeRevolutionForm.cxx index a2525e7583..e4c3983703 100644 --- a/src/BRepFeat/BRepFeat_MakeRevolutionForm.cxx +++ b/src/BRepFeat/BRepFeat_MakeRevolutionForm.cxx @@ -36,11 +36,9 @@ #include #include #include -#include #include #include #include -#include #include #include #include @@ -55,29 +53,19 @@ #include #include #include -#include -#include #include -#include #include #include #include #include -#include -#include -#include #include -#include #include #include #include #include #include -#include #include -#include #include -#include #include #include #include @@ -85,13 +73,8 @@ #include #include #include -#include -#include #include -#include #include -#include -#include #ifdef OCCT_DEBUG extern Standard_Boolean BRepFeat_GettraceFEAT(); diff --git a/src/BRepFeat/BRepFeat_MakeRevolutionForm.hxx b/src/BRepFeat/BRepFeat_MakeRevolutionForm.hxx index b653858708..e6a66a8c77 100644 --- a/src/BRepFeat/BRepFeat_MakeRevolutionForm.hxx +++ b/src/BRepFeat/BRepFeat_MakeRevolutionForm.hxx @@ -22,8 +22,6 @@ #include #include -#include -#include #include #include #include diff --git a/src/BRepFeat/BRepFeat_RibSlot.cxx b/src/BRepFeat/BRepFeat_RibSlot.cxx index 9c59a2c302..94a8f0b5c4 100644 --- a/src/BRepFeat/BRepFeat_RibSlot.cxx +++ b/src/BRepFeat/BRepFeat_RibSlot.cxx @@ -15,14 +15,9 @@ // commercial license or contractual agreement. -#include -#include #include -#include #include -#include #include -#include #include #include #include @@ -63,10 +58,7 @@ #include #include #include -#include -#include #include -#include #include #include #include @@ -74,11 +66,7 @@ #include #include #include -#include -#include -#include #include -#include #include #ifdef OCCT_DEBUG diff --git a/src/BRepFeat/BRepFeat_RibSlot.hxx b/src/BRepFeat/BRepFeat_RibSlot.hxx index e8160baaef..cb28bcc691 100644 --- a/src/BRepFeat/BRepFeat_RibSlot.hxx +++ b/src/BRepFeat/BRepFeat_RibSlot.hxx @@ -22,7 +22,6 @@ #include #include -#include #include #include #include @@ -32,7 +31,6 @@ #include #include #include -#include #include class TopoDS_Edge; class Geom_Plane; diff --git a/src/BRepFeat/BRepFeat_SplitShape.cxx b/src/BRepFeat/BRepFeat_SplitShape.cxx index 4b5ea9399c..fdc233bc9b 100644 --- a/src/BRepFeat/BRepFeat_SplitShape.cxx +++ b/src/BRepFeat/BRepFeat_SplitShape.cxx @@ -17,16 +17,7 @@ #include #include -#include -#include -#include -#include -#include -#include -#include #include -#include -#include #include //======================================================================= diff --git a/src/BRepFeat/BRepFeat_SplitShape.hxx b/src/BRepFeat/BRepFeat_SplitShape.hxx index 406a7c4d25..ee793bc4ff 100644 --- a/src/BRepFeat/BRepFeat_SplitShape.hxx +++ b/src/BRepFeat/BRepFeat_SplitShape.hxx @@ -23,7 +23,6 @@ #include #include -#include #include #include diff --git a/src/BRepFill/BRepFill.cxx b/src/BRepFill/BRepFill.cxx index e40eb199f7..38fd29fa4f 100644 --- a/src/BRepFill/BRepFill.cxx +++ b/src/BRepFill/BRepFill.cxx @@ -38,17 +38,13 @@ #include #include -#include #include #include -#include #include #include #include #include -#include #include -#include #include #include #include @@ -56,23 +52,15 @@ #include #include #include -#include #include #include -#include -#include #include -#include -#include #include #include #include #include -#include -#include #include #include -#include #include #include #include @@ -84,12 +72,8 @@ #include #include #include -#include -#include -#include #include #include -#include #include #include diff --git a/src/BRepFill/BRepFill.hxx b/src/BRepFill/BRepFill.hxx index d8c8d085c9..d3d74f0884 100644 --- a/src/BRepFill/BRepFill.hxx +++ b/src/BRepFill/BRepFill.hxx @@ -22,7 +22,6 @@ #include #include -#include #include class TopoDS_Face; class TopoDS_Edge; diff --git a/src/BRepFill/BRepFill_ACRLaw.cxx b/src/BRepFill/BRepFill_ACRLaw.cxx index dec7b3dc0b..520c366f92 100644 --- a/src/BRepFill/BRepFill_ACRLaw.cxx +++ b/src/BRepFill/BRepFill_ACRLaw.cxx @@ -28,7 +28,6 @@ #include #include #include -#include #include #include #include diff --git a/src/BRepFill/BRepFill_AdvancedEvolved.cxx b/src/BRepFill/BRepFill_AdvancedEvolved.cxx index 70f4b2bb16..2d5cdd19f5 100644 --- a/src/BRepFill/BRepFill_AdvancedEvolved.cxx +++ b/src/BRepFill/BRepFill_AdvancedEvolved.cxx @@ -19,36 +19,21 @@ #include #include #include -#include -#include -#include #include #include #include -#include #include #include -#include -#include #include -#include -#include -#include #include #include #include -#include #include -#include #include #include -#include -#include #include #include -#include #include -#include #include #include #include @@ -57,7 +42,6 @@ #include #include #include -#include #include #include diff --git a/src/BRepFill/BRepFill_AdvancedEvolved.hxx b/src/BRepFill/BRepFill_AdvancedEvolved.hxx index 3df98e8e7e..8f4ce93430 100644 --- a/src/BRepFill/BRepFill_AdvancedEvolved.hxx +++ b/src/BRepFill/BRepFill_AdvancedEvolved.hxx @@ -24,7 +24,6 @@ #include #include #include -#include class BOPAlgo_MakerVolume; class TopoDS_Face; diff --git a/src/BRepFill/BRepFill_ApproxSeewing.cxx b/src/BRepFill/BRepFill_ApproxSeewing.cxx index fd803701ba..456a491daa 100644 --- a/src/BRepFill/BRepFill_ApproxSeewing.cxx +++ b/src/BRepFill/BRepFill_ApproxSeewing.cxx @@ -20,12 +20,10 @@ #include #include #include -#include #include #include #include #include -#include #include #include #include diff --git a/src/BRepFill/BRepFill_ApproxSeewing.hxx b/src/BRepFill/BRepFill_ApproxSeewing.hxx index 89fe6fb864..12e7a58a93 100644 --- a/src/BRepFill/BRepFill_ApproxSeewing.hxx +++ b/src/BRepFill/BRepFill_ApproxSeewing.hxx @@ -22,7 +22,6 @@ #include #include -#include class Geom_Curve; class Geom2d_Curve; diff --git a/src/BRepFill/BRepFill_CompatibleWires.cxx b/src/BRepFill/BRepFill_CompatibleWires.cxx index b4d2cb8931..13212c52a1 100644 --- a/src/BRepFill/BRepFill_CompatibleWires.cxx +++ b/src/BRepFill/BRepFill_CompatibleWires.cxx @@ -34,12 +34,10 @@ #include #include #include -#include #include #include #include #include -#include #include #include #include @@ -50,18 +48,15 @@ #include #include #include -#include #include #include #include #include #include -#include #include #include #include #include -#include #include #include diff --git a/src/BRepFill/BRepFill_CompatibleWires.hxx b/src/BRepFill/BRepFill_CompatibleWires.hxx index ace76b4fef..ffcac2acc8 100644 --- a/src/BRepFill/BRepFill_CompatibleWires.hxx +++ b/src/BRepFill/BRepFill_CompatibleWires.hxx @@ -19,11 +19,8 @@ #include #include -#include #include -#include -#include #include #include class TopoDS_Edge; diff --git a/src/BRepFill/BRepFill_ComputeCLine.hxx b/src/BRepFill/BRepFill_ComputeCLine.hxx index e736d53bd5..939e646279 100644 --- a/src/BRepFill/BRepFill_ComputeCLine.hxx +++ b/src/BRepFill/BRepFill_ComputeCLine.hxx @@ -19,14 +19,11 @@ #include #include -#include #include #include #include -#include #include -#include #include #include class AppParCurves_MultiCurve; diff --git a/src/BRepFill/BRepFill_CurveConstraint.cxx b/src/BRepFill/BRepFill_CurveConstraint.cxx index b8cf9eb637..d36b0515d9 100644 --- a/src/BRepFill/BRepFill_CurveConstraint.cxx +++ b/src/BRepFill/BRepFill_CurveConstraint.cxx @@ -15,24 +15,15 @@ // commercial license or contractual agreement. -#include -#include -#include -#include #include #include #include #include #include -#include -#include #include -#include #include -#include #include #include -#include #include IMPLEMENT_STANDARD_RTTIEXT(BRepFill_CurveConstraint,GeomPlate_CurveConstraint) diff --git a/src/BRepFill/BRepFill_CurveConstraint.hxx b/src/BRepFill/BRepFill_CurveConstraint.hxx index d967011775..d9f006e8b5 100644 --- a/src/BRepFill/BRepFill_CurveConstraint.hxx +++ b/src/BRepFill/BRepFill_CurveConstraint.hxx @@ -22,7 +22,6 @@ #include #include -#include class BRepFill_CurveConstraint; DEFINE_STANDARD_HANDLE(BRepFill_CurveConstraint, GeomPlate_CurveConstraint) diff --git a/src/BRepFill/BRepFill_Draft.cxx b/src/BRepFill/BRepFill_Draft.cxx index 65f605bf74..b8c9762958 100644 --- a/src/BRepFill/BRepFill_Draft.cxx +++ b/src/BRepFill/BRepFill_Draft.cxx @@ -16,9 +16,6 @@ #include -#include -#include -#include #include #include #include @@ -26,14 +23,11 @@ #include #include #include -#include #include #include #include #include -#include #include -#include #include #include #include @@ -52,16 +46,12 @@ #include #include #include -#include #include #include #include #include -#include #include #include -#include -#include #include #include #include @@ -71,7 +61,6 @@ #include #include #include -#include #include #ifdef DRAW diff --git a/src/BRepFill/BRepFill_DraftLaw.cxx b/src/BRepFill/BRepFill_DraftLaw.cxx index 4c53a06a63..6b817ece34 100644 --- a/src/BRepFill/BRepFill_DraftLaw.cxx +++ b/src/BRepFill/BRepFill_DraftLaw.cxx @@ -20,9 +20,7 @@ #include #include #include -#include #include -#include #include #include diff --git a/src/BRepFill/BRepFill_DraftLaw.hxx b/src/BRepFill/BRepFill_DraftLaw.hxx index 7beb4620b3..dc1956f568 100644 --- a/src/BRepFill/BRepFill_DraftLaw.hxx +++ b/src/BRepFill/BRepFill_DraftLaw.hxx @@ -18,7 +18,6 @@ #define _BRepFill_DraftLaw_HeaderFile #include -#include #include #include diff --git a/src/BRepFill/BRepFill_Edge3DLaw.cxx b/src/BRepFill/BRepFill_Edge3DLaw.cxx index 2fc30df8c1..2da513fb83 100644 --- a/src/BRepFill/BRepFill_Edge3DLaw.cxx +++ b/src/BRepFill/BRepFill_Edge3DLaw.cxx @@ -25,7 +25,6 @@ #include #include #include -#include #include #include #include diff --git a/src/BRepFill/BRepFill_EdgeOnSurfLaw.hxx b/src/BRepFill/BRepFill_EdgeOnSurfLaw.hxx index 0d53a0d9d3..e173e0098b 100644 --- a/src/BRepFill/BRepFill_EdgeOnSurfLaw.hxx +++ b/src/BRepFill/BRepFill_EdgeOnSurfLaw.hxx @@ -18,9 +18,7 @@ #define _BRepFill_EdgeOnSurfLaw_HeaderFile #include -#include -#include #include class TopoDS_Wire; class TopoDS_Shape; diff --git a/src/BRepFill/BRepFill_Evolved.cxx b/src/BRepFill/BRepFill_Evolved.cxx index a5024f938c..6655ffb441 100644 --- a/src/BRepFill/BRepFill_Evolved.cxx +++ b/src/BRepFill/BRepFill_Evolved.cxx @@ -19,15 +19,11 @@ #include #include #include -#include -#include #include #include #include #include -#include #include -#include #include #include #include @@ -52,13 +48,10 @@ #include #include #include -#include #include #include -#include #include #include -#include #include #include #include @@ -67,7 +60,6 @@ #include #include #include -#include #include #include #include @@ -106,11 +98,8 @@ #include #include #include -#include -#include #include #include -#include #include //#define DRAW diff --git a/src/BRepFill/BRepFill_Evolved.hxx b/src/BRepFill/BRepFill_Evolved.hxx index a386af2a30..2bc725e431 100644 --- a/src/BRepFill/BRepFill_Evolved.hxx +++ b/src/BRepFill/BRepFill_Evolved.hxx @@ -19,12 +19,10 @@ #include #include -#include #include #include #include -#include #include #include #include diff --git a/src/BRepFill/BRepFill_Filling.cxx b/src/BRepFill/BRepFill_Filling.cxx index 546919e9aa..89f77932a1 100644 --- a/src/BRepFill/BRepFill_Filling.cxx +++ b/src/BRepFill/BRepFill_Filling.cxx @@ -18,11 +18,8 @@ #include #include -#include -#include #include #include -#include #include #include #include @@ -32,7 +29,6 @@ #include #include #include -#include #include #include #include @@ -47,17 +43,13 @@ #include #include #include -#include #include #include -#include -#include #include #include #include #include #include -#include #include #include #include @@ -65,7 +57,6 @@ #include #include #include -#include #include static gp_Vec MakeFinVec( const TopoDS_Wire aWire, const TopoDS_Vertex aVertex ) diff --git a/src/BRepFill/BRepFill_Generator.cxx b/src/BRepFill/BRepFill_Generator.cxx index 79d59d1fea..756a31bf03 100644 --- a/src/BRepFill/BRepFill_Generator.cxx +++ b/src/BRepFill/BRepFill_Generator.cxx @@ -24,20 +24,15 @@ #include #include #include -#include -#include #include #include #include -#include #include #include #include #include -#include #include #include -#include #include #include #include @@ -51,11 +46,11 @@ #include #include #include -#include #include #include #include #include +#include #include #include #include diff --git a/src/BRepFill/BRepFill_Generator.hxx b/src/BRepFill/BRepFill_Generator.hxx index 39b2bfc9db..421040bd5a 100644 --- a/src/BRepFill/BRepFill_Generator.hxx +++ b/src/BRepFill/BRepFill_Generator.hxx @@ -19,7 +19,6 @@ #include #include -#include #include #include diff --git a/src/BRepFill/BRepFill_LocationLaw.cxx b/src/BRepFill/BRepFill_LocationLaw.cxx index 88fb76449e..55979ea65b 100644 --- a/src/BRepFill/BRepFill_LocationLaw.cxx +++ b/src/BRepFill/BRepFill_LocationLaw.cxx @@ -28,14 +28,11 @@ #include #include #include -#include -#include #include #include #include #include #include -#include #include #include #include diff --git a/src/BRepFill/BRepFill_LocationLaw.hxx b/src/BRepFill/BRepFill_LocationLaw.hxx index 4f3effc644..ef0c460388 100644 --- a/src/BRepFill/BRepFill_LocationLaw.hxx +++ b/src/BRepFill/BRepFill_LocationLaw.hxx @@ -21,7 +21,6 @@ #include #include -#include #include #include #include @@ -30,7 +29,6 @@ #include #include #include -#include class GeomFill_LocationLaw; class TopoDS_Edge; class TopoDS_Vertex; diff --git a/src/BRepFill/BRepFill_MultiLine.cxx b/src/BRepFill/BRepFill_MultiLine.cxx index 1d6b1406bf..9f27aa77ab 100644 --- a/src/BRepFill/BRepFill_MultiLine.cxx +++ b/src/BRepFill/BRepFill_MultiLine.cxx @@ -18,7 +18,6 @@ #include #include -#include #include #include #include diff --git a/src/BRepFill/BRepFill_MultiLine.hxx b/src/BRepFill/BRepFill_MultiLine.hxx index cf7899fb2e..2244f4b050 100644 --- a/src/BRepFill/BRepFill_MultiLine.hxx +++ b/src/BRepFill/BRepFill_MultiLine.hxx @@ -26,7 +26,6 @@ #include #include #include -#include #include #include #include diff --git a/src/BRepFill/BRepFill_NSections.cxx b/src/BRepFill/BRepFill_NSections.cxx index c2a827123d..6e7f0c984b 100644 --- a/src/BRepFill/BRepFill_NSections.cxx +++ b/src/BRepFill/BRepFill_NSections.cxx @@ -18,7 +18,6 @@ #include #include #include -#include #include #include #include @@ -26,23 +25,18 @@ #include #include #include -#include #include -#include #include -#include #include #include #include #include #include -#include #include #include #include #include #include -#include #include #include #include diff --git a/src/BRepFill/BRepFill_NSections.hxx b/src/BRepFill/BRepFill_NSections.hxx index 0efee65da8..5066650231 100644 --- a/src/BRepFill/BRepFill_NSections.hxx +++ b/src/BRepFill/BRepFill_NSections.hxx @@ -20,13 +20,11 @@ #include #include -#include #include #include #include #include #include -#include #include #include class Geom_BSplineSurface; diff --git a/src/BRepFill/BRepFill_OffsetAncestors.cxx b/src/BRepFill/BRepFill_OffsetAncestors.cxx index efd6e3101d..cf387726d8 100644 --- a/src/BRepFill/BRepFill_OffsetAncestors.cxx +++ b/src/BRepFill/BRepFill_OffsetAncestors.cxx @@ -22,7 +22,6 @@ #include #include #include -#include //======================================================================= //function : BRepFill_OffsetAncestors diff --git a/src/BRepFill/BRepFill_OffsetWire.cxx b/src/BRepFill/BRepFill_OffsetWire.cxx index a1a1699211..0c7cb2b840 100644 --- a/src/BRepFill/BRepFill_OffsetWire.cxx +++ b/src/BRepFill/BRepFill_OffsetWire.cxx @@ -18,9 +18,7 @@ #include #include -#include #include -#include #include #include #include @@ -28,14 +26,12 @@ #include #include #include -#include #include #include #include #include #include #include -#include #include #include #include @@ -44,14 +40,12 @@ #include #include #include -#include #include #include #include #include #include #include -#include #include #include #include @@ -59,9 +53,7 @@ #include #include #include -#include #include -#include #include #include #include @@ -72,14 +64,9 @@ #include #include #include -#include #include -#include #include -#include -#include #include -#include #include #include #include @@ -88,15 +75,11 @@ #include #include #include -#include -#include #include #include #include #include -#include #include -#include #include #include diff --git a/src/BRepFill/BRepFill_OffsetWire.hxx b/src/BRepFill/BRepFill_OffsetWire.hxx index a0c3865cb6..f5c89597c0 100644 --- a/src/BRepFill/BRepFill_OffsetWire.hxx +++ b/src/BRepFill/BRepFill_OffsetWire.hxx @@ -19,13 +19,9 @@ #include #include -#include #include -#include -#include #include -#include #include #include #include diff --git a/src/BRepFill/BRepFill_Pipe.cxx b/src/BRepFill/BRepFill_Pipe.cxx index 00944ac2f4..8fe76d21b8 100644 --- a/src/BRepFill/BRepFill_Pipe.cxx +++ b/src/BRepFill/BRepFill_Pipe.cxx @@ -18,7 +18,6 @@ #include #include #include -#include #include #include #include @@ -44,11 +43,7 @@ #include #include #include -#include #include -#include -#include -#include #include #include #include @@ -61,9 +56,7 @@ #include #include #include -#include #include -#include #include #ifdef DRAW diff --git a/src/BRepFill/BRepFill_Pipe.hxx b/src/BRepFill/BRepFill_Pipe.hxx index 26717bcd51..bd26997ade 100644 --- a/src/BRepFill/BRepFill_Pipe.hxx +++ b/src/BRepFill/BRepFill_Pipe.hxx @@ -24,15 +24,12 @@ #include #include #include -#include #include #include #include #include #include #include -#include -#include class BRepFill_LocationLaw; class TopoDS_Face; class TopoDS_Edge; diff --git a/src/BRepFill/BRepFill_PipeShell.cxx b/src/BRepFill/BRepFill_PipeShell.cxx index b9fbd97435..e0405b02c2 100644 --- a/src/BRepFill/BRepFill_PipeShell.cxx +++ b/src/BRepFill/BRepFill_PipeShell.cxx @@ -24,7 +24,6 @@ #include #include #include -#include #include #include #include @@ -36,9 +35,7 @@ #include #include #include -#include #include -#include #include #include #include @@ -58,19 +55,15 @@ #include #include #include -#include #include #include #include -#include #include #include #include #include -#include #include #include -#include #include #include #include @@ -91,10 +84,8 @@ IMPLEMENT_STANDARD_RTTIEXT(BRepFill_PipeShell,Standard_Transient) static Standard_Boolean Affich = 0; #endif -#include #include #include -#include static Standard_Boolean BuildBoundaries(const BRepFill_Sweep& theSweep, diff --git a/src/BRepFill/BRepFill_PipeShell.hxx b/src/BRepFill/BRepFill_PipeShell.hxx index 89b8b10c50..3ff08b460c 100644 --- a/src/BRepFill/BRepFill_PipeShell.hxx +++ b/src/BRepFill/BRepFill_PipeShell.hxx @@ -24,9 +24,7 @@ #include #include #include -#include #include -#include #include #include #include diff --git a/src/BRepFill/BRepFill_Section.cxx b/src/BRepFill/BRepFill_Section.cxx index 09e5d6f8a7..c15fa7a25a 100644 --- a/src/BRepFill/BRepFill_Section.cxx +++ b/src/BRepFill/BRepFill_Section.cxx @@ -22,7 +22,6 @@ #include #include #include -#include #include #include diff --git a/src/BRepFill/BRepFill_Section.hxx b/src/BRepFill/BRepFill_Section.hxx index f9bf2892d2..b07da5e4c3 100644 --- a/src/BRepFill/BRepFill_Section.hxx +++ b/src/BRepFill/BRepFill_Section.hxx @@ -19,11 +19,9 @@ #include #include -#include #include #include -#include //! To store section definition diff --git a/src/BRepFill/BRepFill_SectionLaw.cxx b/src/BRepFill/BRepFill_SectionLaw.cxx index 03a32f4458..aa86b68b27 100644 --- a/src/BRepFill/BRepFill_SectionLaw.cxx +++ b/src/BRepFill/BRepFill_SectionLaw.cxx @@ -20,22 +20,10 @@ #include #include #include -#include -#include -#include -#include #include -#include -#include #include -#include -#include -#include -#include -#include #include #include -#include #include IMPLEMENT_STANDARD_RTTIEXT(BRepFill_SectionLaw,Standard_Transient) diff --git a/src/BRepFill/BRepFill_SectionLaw.hxx b/src/BRepFill/BRepFill_SectionLaw.hxx index af7e022483..8e08fe6a96 100644 --- a/src/BRepFill/BRepFill_SectionLaw.hxx +++ b/src/BRepFill/BRepFill_SectionLaw.hxx @@ -22,12 +22,10 @@ #include #include -#include #include #include #include #include -#include class GeomFill_SectionLaw; class TopoDS_Vertex; class TopoDS_Shape; diff --git a/src/BRepFill/BRepFill_SectionPlacement.cxx b/src/BRepFill/BRepFill_SectionPlacement.cxx index 0164700549..631d94183d 100644 --- a/src/BRepFill/BRepFill_SectionPlacement.cxx +++ b/src/BRepFill/BRepFill_SectionPlacement.cxx @@ -17,15 +17,12 @@ #include #include -#include #include -#include #include #include #include #include #include -#include #include #include #include @@ -35,7 +32,6 @@ #include #include #include -#include #include #include #include diff --git a/src/BRepFill/BRepFill_SectionPlacement.hxx b/src/BRepFill/BRepFill_SectionPlacement.hxx index d691ec9966..aafc11761d 100644 --- a/src/BRepFill/BRepFill_SectionPlacement.hxx +++ b/src/BRepFill/BRepFill_SectionPlacement.hxx @@ -23,9 +23,7 @@ #include #include -#include #include -#include class BRepFill_LocationLaw; diff --git a/src/BRepFill/BRepFill_ShapeLaw.hxx b/src/BRepFill/BRepFill_ShapeLaw.hxx index 43adea9134..9eaa4e47c3 100644 --- a/src/BRepFill/BRepFill_ShapeLaw.hxx +++ b/src/BRepFill/BRepFill_ShapeLaw.hxx @@ -22,11 +22,9 @@ #include #include -#include #include #include #include -#include class Law_Function; class TopoDS_Vertex; class TopoDS_Wire; diff --git a/src/BRepFill/BRepFill_Sweep.cxx b/src/BRepFill/BRepFill_Sweep.cxx index a9a6d2bdd6..d26a35f807 100644 --- a/src/BRepFill/BRepFill_Sweep.cxx +++ b/src/BRepFill/BRepFill_Sweep.cxx @@ -18,34 +18,27 @@ #include #include #include -#include #include #include -#include #include -#include #include #include #include #include -#include #include #include #include -#include #include #include #include #include #include -#include #include #include #include #include #include #include -#include #include #include #include @@ -58,7 +51,6 @@ #include #include #include -#include #include #include #include @@ -68,14 +60,12 @@ #include #include #include -#include #include #include #include #include #include #include -#include #include #include #include @@ -91,13 +81,10 @@ #include #include #include -#include #include #include #include -#include #include -#include #include //#include diff --git a/src/BRepFill/BRepFill_Sweep.hxx b/src/BRepFill/BRepFill_Sweep.hxx index 8f5fbec144..24979e63e6 100644 --- a/src/BRepFill/BRepFill_Sweep.hxx +++ b/src/BRepFill/BRepFill_Sweep.hxx @@ -21,13 +21,10 @@ #include #include -#include -#include #include #include #include #include -#include #include #include #include diff --git a/src/BRepFill/BRepFill_TrimEdgeTool.cxx b/src/BRepFill/BRepFill_TrimEdgeTool.cxx index 4d3e56406c..e6ae701b4c 100644 --- a/src/BRepFill/BRepFill_TrimEdgeTool.cxx +++ b/src/BRepFill/BRepFill_TrimEdgeTool.cxx @@ -26,18 +26,13 @@ #include #include #include -#include -#include -#include #include #include #include #include #include #include -#include #include -#include #include #include #include diff --git a/src/BRepFill/BRepFill_TrimEdgeTool.hxx b/src/BRepFill/BRepFill_TrimEdgeTool.hxx index b0979f165b..2fba09f557 100644 --- a/src/BRepFill/BRepFill_TrimEdgeTool.hxx +++ b/src/BRepFill/BRepFill_TrimEdgeTool.hxx @@ -21,9 +21,7 @@ #include #include -#include #include -#include #include #include #include diff --git a/src/BRepFill/BRepFill_TrimShellCorner.cxx b/src/BRepFill/BRepFill_TrimShellCorner.cxx index 65ce9a96f6..8b2a07fa34 100644 --- a/src/BRepFill/BRepFill_TrimShellCorner.cxx +++ b/src/BRepFill/BRepFill_TrimShellCorner.cxx @@ -25,10 +25,8 @@ #include #include #include -#include #include #include -#include #include #include #include @@ -39,10 +37,7 @@ #include #include #include -#include #include -#include -#include #include #include #include @@ -55,10 +50,8 @@ #include #include #include -#include #include #include -#include #include #include #include diff --git a/src/BRepFill/BRepFill_TrimShellCorner.hxx b/src/BRepFill/BRepFill_TrimShellCorner.hxx index 1d5e9a0fb6..283e546b91 100644 --- a/src/BRepFill/BRepFill_TrimShellCorner.hxx +++ b/src/BRepFill/BRepFill_TrimShellCorner.hxx @@ -23,11 +23,8 @@ #include #include #include -#include -#include #include #include -#include #include #include #include diff --git a/src/BRepFill/BRepFill_TrimSurfaceTool.cxx b/src/BRepFill/BRepFill_TrimSurfaceTool.cxx index 53de917a72..581e1e94e0 100644 --- a/src/BRepFill/BRepFill_TrimSurfaceTool.cxx +++ b/src/BRepFill/BRepFill_TrimSurfaceTool.cxx @@ -16,14 +16,12 @@ #include -#include #include #include #include #include #include #include -#include #include #include #include @@ -31,7 +29,6 @@ #include #include #include -#include #include #include #include @@ -47,15 +44,9 @@ #include #include #include -#include #include -#include #include #include -#include -#include -#include -#include #include #include #include diff --git a/src/BRepFill/BRepFill_TrimSurfaceTool.hxx b/src/BRepFill/BRepFill_TrimSurfaceTool.hxx index 9767e69a3b..57ffa14385 100644 --- a/src/BRepFill/BRepFill_TrimSurfaceTool.hxx +++ b/src/BRepFill/BRepFill_TrimSurfaceTool.hxx @@ -23,9 +23,7 @@ #include #include -#include #include -#include #include class Geom2d_Curve; class gp_Pnt2d; diff --git a/src/BRepFilletAPI/BRepFilletAPI_LocalOperation.hxx b/src/BRepFilletAPI/BRepFilletAPI_LocalOperation.hxx index b8a3da7d8d..51d88284a3 100644 --- a/src/BRepFilletAPI/BRepFilletAPI_LocalOperation.hxx +++ b/src/BRepFilletAPI/BRepFilletAPI_LocalOperation.hxx @@ -23,8 +23,6 @@ #include #include -#include -#include #include class TopoDS_Edge; class TopoDS_Vertex; diff --git a/src/BRepFilletAPI/BRepFilletAPI_MakeChamfer.cxx b/src/BRepFilletAPI/BRepFilletAPI_MakeChamfer.cxx index 85bcc71d61..8cbf619fc8 100644 --- a/src/BRepFilletAPI/BRepFilletAPI_MakeChamfer.cxx +++ b/src/BRepFilletAPI/BRepFilletAPI_MakeChamfer.cxx @@ -17,7 +17,6 @@ #include #include -#include #include #include #include @@ -25,7 +24,6 @@ #include #include #include -#include //======================================================================= //function : BRepFilletAPI_MakeChamfer diff --git a/src/BRepFilletAPI/BRepFilletAPI_MakeChamfer.hxx b/src/BRepFilletAPI/BRepFilletAPI_MakeChamfer.hxx index 5850a8d6cd..3b7b37fcb7 100644 --- a/src/BRepFilletAPI/BRepFilletAPI_MakeChamfer.hxx +++ b/src/BRepFilletAPI/BRepFilletAPI_MakeChamfer.hxx @@ -26,7 +26,6 @@ #include #include #include -#include #include #include class TopoDS_Shape; diff --git a/src/BRepFilletAPI/BRepFilletAPI_MakeFillet.cxx b/src/BRepFilletAPI/BRepFilletAPI_MakeFillet.cxx index 54c31dafd1..f1b3287e34 100644 --- a/src/BRepFilletAPI/BRepFilletAPI_MakeFillet.cxx +++ b/src/BRepFilletAPI/BRepFilletAPI_MakeFillet.cxx @@ -19,20 +19,14 @@ #include #include #include -#include -#include #include -#include #include -#include -#include #include #include #include #include #include #include -#include //======================================================================= //function : BRepFilletAPI_MakeFillet diff --git a/src/BRepFilletAPI/BRepFilletAPI_MakeFillet.hxx b/src/BRepFilletAPI/BRepFilletAPI_MakeFillet.hxx index 36585fda23..6113821c2b 100644 --- a/src/BRepFilletAPI/BRepFilletAPI_MakeFillet.hxx +++ b/src/BRepFilletAPI/BRepFilletAPI_MakeFillet.hxx @@ -29,7 +29,6 @@ #include #include #include -#include #include #include #include diff --git a/src/BRepFilletAPI/BRepFilletAPI_MakeFillet2d.hxx b/src/BRepFilletAPI/BRepFilletAPI_MakeFillet2d.hxx index a7a3a85a26..63c24f723f 100644 --- a/src/BRepFilletAPI/BRepFilletAPI_MakeFillet2d.hxx +++ b/src/BRepFilletAPI/BRepFilletAPI_MakeFillet2d.hxx @@ -23,10 +23,7 @@ #include #include -#include -#include #include -#include #include #include class TopoDS_Face; diff --git a/src/BRepGProp/BRepGProp.cxx b/src/BRepGProp/BRepGProp.cxx index 9aab6e6019..43c9d08129 100644 --- a/src/BRepGProp/BRepGProp.cxx +++ b/src/BRepGProp/BRepGProp.cxx @@ -19,18 +19,14 @@ #include #include #include -#include #include #include #include #include -#include #include -#include #include #include -#include #ifdef OCCT_DEBUG static Standard_Integer AffichEps = 0; diff --git a/src/BRepGProp/BRepGProp.hxx b/src/BRepGProp/BRepGProp.hxx index 0f0acebc7c..977b5affb7 100644 --- a/src/BRepGProp/BRepGProp.hxx +++ b/src/BRepGProp/BRepGProp.hxx @@ -21,7 +21,6 @@ #include #include -#include #include #include diff --git a/src/BRepGProp/BRepGProp_Cinert.hxx b/src/BRepGProp/BRepGProp_Cinert.hxx index 212af6abc5..291260426a 100644 --- a/src/BRepGProp/BRepGProp_Cinert.hxx +++ b/src/BRepGProp/BRepGProp_Cinert.hxx @@ -19,7 +19,6 @@ #include #include -#include #include class BRepAdaptor_Curve; diff --git a/src/BRepGProp/BRepGProp_Domain.cxx b/src/BRepGProp/BRepGProp_Domain.cxx index 3e31b7816e..6cd020c5ec 100644 --- a/src/BRepGProp/BRepGProp_Domain.cxx +++ b/src/BRepGProp/BRepGProp_Domain.cxx @@ -17,7 +17,6 @@ #include #include -#include //======================================================================= //function : Next diff --git a/src/BRepGProp/BRepGProp_EdgeTool.cxx b/src/BRepGProp/BRepGProp_EdgeTool.cxx index c76af72509..60685eac9f 100644 --- a/src/BRepGProp/BRepGProp_EdgeTool.cxx +++ b/src/BRepGProp/BRepGProp_EdgeTool.cxx @@ -21,7 +21,6 @@ #include #include #include -#include Standard_Real BRepGProp_EdgeTool::FirstParameter(const BRepAdaptor_Curve& C) { diff --git a/src/BRepGProp/BRepGProp_EdgeTool.hxx b/src/BRepGProp/BRepGProp_EdgeTool.hxx index f697986b4a..2e4197d77a 100644 --- a/src/BRepGProp/BRepGProp_EdgeTool.hxx +++ b/src/BRepGProp/BRepGProp_EdgeTool.hxx @@ -19,9 +19,7 @@ #include #include -#include -#include #include #include #include diff --git a/src/BRepGProp/BRepGProp_Face.cxx b/src/BRepGProp/BRepGProp_Face.cxx index f0ea770bc2..38892ac8a5 100644 --- a/src/BRepGProp/BRepGProp_Face.cxx +++ b/src/BRepGProp/BRepGProp_Face.cxx @@ -27,7 +27,6 @@ #include #include #include -#include #include #include #include diff --git a/src/BRepGProp/BRepGProp_Face.hxx b/src/BRepGProp/BRepGProp_Face.hxx index ce731620c2..7dd3a32b6f 100644 --- a/src/BRepGProp/BRepGProp_Face.hxx +++ b/src/BRepGProp/BRepGProp_Face.hxx @@ -23,10 +23,8 @@ #include #include -#include #include #include -#include #include #include #include diff --git a/src/BRepGProp/BRepGProp_Gauss.cxx b/src/BRepGProp/BRepGProp_Gauss.cxx index 0ce6ff1ad9..800783d8b1 100644 --- a/src/BRepGProp/BRepGProp_Gauss.cxx +++ b/src/BRepGProp/BRepGProp_Gauss.cxx @@ -12,8 +12,6 @@ // commercial license or contractual agreement. #include -#include -#include #include #include #include diff --git a/src/BRepGProp/BRepGProp_MeshCinert.cxx b/src/BRepGProp/BRepGProp_MeshCinert.cxx index 349ee14a71..be7a9dcc75 100644 --- a/src/BRepGProp/BRepGProp_MeshCinert.cxx +++ b/src/BRepGProp/BRepGProp_MeshCinert.cxx @@ -15,7 +15,6 @@ #include #include #include -#include #include //======================================================================= diff --git a/src/BRepGProp/BRepGProp_MeshProps.hxx b/src/BRepGProp/BRepGProp_MeshProps.hxx index 57622d0d98..4b0dc9ab00 100644 --- a/src/BRepGProp/BRepGProp_MeshProps.hxx +++ b/src/BRepGProp/BRepGProp_MeshProps.hxx @@ -16,7 +16,6 @@ #include #include -#include #include class Poly_Triangulation; diff --git a/src/BRepGProp/BRepGProp_Sinert.hxx b/src/BRepGProp/BRepGProp_Sinert.hxx index 7fe9238a58..654ef3acd4 100644 --- a/src/BRepGProp/BRepGProp_Sinert.hxx +++ b/src/BRepGProp/BRepGProp_Sinert.hxx @@ -19,9 +19,7 @@ #include #include -#include -#include #include class BRepGProp_Face; class gp_Pnt; diff --git a/src/BRepGProp/BRepGProp_TFunction.cxx b/src/BRepGProp/BRepGProp_TFunction.cxx index f7422000b9..e8a8674d03 100644 --- a/src/BRepGProp/BRepGProp_TFunction.cxx +++ b/src/BRepGProp/BRepGProp_TFunction.cxx @@ -14,7 +14,6 @@ // commercial license or contractual agreement. -#include #include #include #include diff --git a/src/BRepGProp/BRepGProp_TFunction.hxx b/src/BRepGProp/BRepGProp_TFunction.hxx index 6566403995..e2655b6a18 100644 --- a/src/BRepGProp/BRepGProp_TFunction.hxx +++ b/src/BRepGProp/BRepGProp_TFunction.hxx @@ -22,12 +22,9 @@ #include #include -#include #include #include -#include #include -#include class gp_Pnt; diff --git a/src/BRepGProp/BRepGProp_UFunction.cxx b/src/BRepGProp/BRepGProp_UFunction.cxx index 1fdc71c276..5083b266b9 100644 --- a/src/BRepGProp/BRepGProp_UFunction.cxx +++ b/src/BRepGProp/BRepGProp_UFunction.cxx @@ -14,7 +14,6 @@ // commercial license or contractual agreement. -#include #include #include #include diff --git a/src/BRepGProp/BRepGProp_UFunction.hxx b/src/BRepGProp/BRepGProp_UFunction.hxx index 9a70a66381..893b8804cf 100644 --- a/src/BRepGProp/BRepGProp_UFunction.hxx +++ b/src/BRepGProp/BRepGProp_UFunction.hxx @@ -22,8 +22,6 @@ #include #include -#include -#include #include #include #include diff --git a/src/BRepGProp/BRepGProp_Vinert.hxx b/src/BRepGProp/BRepGProp_Vinert.hxx index f762c62017..5c4cf05c13 100644 --- a/src/BRepGProp/BRepGProp_Vinert.hxx +++ b/src/BRepGProp/BRepGProp_Vinert.hxx @@ -19,9 +19,7 @@ #include #include -#include -#include #include class BRepGProp_Face; class gp_Pnt; diff --git a/src/BRepGProp/BRepGProp_VinertGK.cxx b/src/BRepGProp/BRepGProp_VinertGK.cxx index 01737d7725..bf8b8d8677 100644 --- a/src/BRepGProp/BRepGProp_VinertGK.cxx +++ b/src/BRepGProp/BRepGProp_VinertGK.cxx @@ -15,7 +15,6 @@ #include -#include #include #include #include diff --git a/src/BRepGProp/BRepGProp_VinertGK.hxx b/src/BRepGProp/BRepGProp_VinertGK.hxx index 7aaf3829c5..1593ace13b 100644 --- a/src/BRepGProp/BRepGProp_VinertGK.hxx +++ b/src/BRepGProp/BRepGProp_VinertGK.hxx @@ -18,11 +18,8 @@ #include #include -#include -#include #include -#include #include class BRepGProp_Face; class BRepGProp_Domain; diff --git a/src/BRepIntCurveSurface/BRepIntCurveSurface_Inter.cxx b/src/BRepIntCurveSurface/BRepIntCurveSurface_Inter.cxx index 396e7d08b3..8d4fef7bbd 100644 --- a/src/BRepIntCurveSurface/BRepIntCurveSurface_Inter.cxx +++ b/src/BRepIntCurveSurface/BRepIntCurveSurface_Inter.cxx @@ -24,12 +24,10 @@ #include #include #include -#include #include #include #include #include -#include #include //=========================================================================== diff --git a/src/BRepIntCurveSurface/BRepIntCurveSurface_Inter.hxx b/src/BRepIntCurveSurface/BRepIntCurveSurface_Inter.hxx index b3d555b04f..1694ed1ca9 100644 --- a/src/BRepIntCurveSurface/BRepIntCurveSurface_Inter.hxx +++ b/src/BRepIntCurveSurface/BRepIntCurveSurface_Inter.hxx @@ -19,8 +19,6 @@ #include #include -#include -#include #include #include #include diff --git a/src/BRepLProp/BRepLProp.cxx b/src/BRepLProp/BRepLProp.cxx index f6f48c9859..14f88cdf9e 100644 --- a/src/BRepLProp/BRepLProp.cxx +++ b/src/BRepLProp/BRepLProp.cxx @@ -16,7 +16,6 @@ #include -#include #include #include #include diff --git a/src/BRepLProp/BRepLProp_CLProps.hxx b/src/BRepLProp/BRepLProp_CLProps.hxx index 7503ed5ddc..3f1597c431 100644 --- a/src/BRepLProp/BRepLProp_CLProps.hxx +++ b/src/BRepLProp/BRepLProp_CLProps.hxx @@ -19,16 +19,12 @@ #include #include -#include #include -#include -#include #include #include #include #include -#include class LProp_BadContinuity; class Standard_DomainError; class Standard_OutOfRange; diff --git a/src/BRepLProp/BRepLProp_CurveTool.hxx b/src/BRepLProp/BRepLProp_CurveTool.hxx index c60e8b515b..fb693eaef5 100644 --- a/src/BRepLProp/BRepLProp_CurveTool.hxx +++ b/src/BRepLProp/BRepLProp_CurveTool.hxx @@ -19,9 +19,7 @@ #include #include -#include -#include #include class BRepAdaptor_Curve; class gp_Pnt; diff --git a/src/BRepLProp/BRepLProp_SLProps.hxx b/src/BRepLProp/BRepLProp_SLProps.hxx index ff836adf1a..0ea0a22388 100644 --- a/src/BRepLProp/BRepLProp_SLProps.hxx +++ b/src/BRepLProp/BRepLProp_SLProps.hxx @@ -19,16 +19,13 @@ #include #include -#include #include -#include #include #include #include #include #include -#include class LProp_BadContinuity; class Standard_DomainError; class Standard_OutOfRange; diff --git a/src/BRepLProp/BRepLProp_SurfaceTool.hxx b/src/BRepLProp/BRepLProp_SurfaceTool.hxx index f65b70ec08..5f3d64cad4 100644 --- a/src/BRepLProp/BRepLProp_SurfaceTool.hxx +++ b/src/BRepLProp/BRepLProp_SurfaceTool.hxx @@ -19,9 +19,7 @@ #include #include -#include -#include #include class BRepAdaptor_Surface; class gp_Pnt; diff --git a/src/BRepLib/BRepLib.cxx b/src/BRepLib/BRepLib.cxx index d89ecb4c1f..b956633f1c 100644 --- a/src/BRepLib/BRepLib.cxx +++ b/src/BRepLib/BRepLib.cxx @@ -19,26 +19,17 @@ #include -#include #include #include -#include #include #include -#include #include -#include #include -#include -#include #include #include -#include #include #include #include -#include -#include #include #include #include @@ -46,13 +37,10 @@ #include #include #include -#include #include -#include #include #include #include -#include #include #include #include @@ -72,11 +60,9 @@ #include #include #include -#include #include #include #include -#include #include #include #include @@ -84,10 +70,6 @@ #include #include #include -#include -#include -#include -#include #include #include #include diff --git a/src/BRepLib/BRepLib_CheckCurveOnSurface.cxx b/src/BRepLib/BRepLib_CheckCurveOnSurface.cxx index 29d5d42f39..335e4b748a 100644 --- a/src/BRepLib/BRepLib_CheckCurveOnSurface.cxx +++ b/src/BRepLib/BRepLib_CheckCurveOnSurface.cxx @@ -23,7 +23,6 @@ #include #include #include -#include //======================================================================= //function : BRepLib_CheckCurveOnSurface diff --git a/src/BRepLib/BRepLib_FindSurface.cxx b/src/BRepLib/BRepLib_FindSurface.cxx index 21a85b697e..5b3cbf38b2 100644 --- a/src/BRepLib/BRepLib_FindSurface.cxx +++ b/src/BRepLib/BRepLib_FindSurface.cxx @@ -29,23 +29,13 @@ #include #include #include -#include -#include #include -#include -#include -#include -#include -#include #include #include #include #include #include #include -#include -#include -#include #include #include #include diff --git a/src/BRepLib/BRepLib_FindSurface.hxx b/src/BRepLib/BRepLib_FindSurface.hxx index d4300d66c6..dc682feee8 100644 --- a/src/BRepLib/BRepLib_FindSurface.hxx +++ b/src/BRepLib/BRepLib_FindSurface.hxx @@ -21,8 +21,6 @@ #include #include -#include -#include #include class Geom_Surface; class TopoDS_Shape; diff --git a/src/BRepLib/BRepLib_FuseEdges.cxx b/src/BRepLib/BRepLib_FuseEdges.cxx index cdf173c507..a1b802143c 100644 --- a/src/BRepLib/BRepLib_FuseEdges.cxx +++ b/src/BRepLib/BRepLib_FuseEdges.cxx @@ -25,18 +25,14 @@ #include #include #include -#include #include -#include #include -#include #include #include #include #include #include #include -#include #include #include #include @@ -47,10 +43,6 @@ #include #include #include -#include -#include -#include -#include #include #include #include @@ -64,10 +56,7 @@ #include #include #include -#include -#include #include -#include #include #include diff --git a/src/BRepLib/BRepLib_FuseEdges.hxx b/src/BRepLib/BRepLib_FuseEdges.hxx index 1dd9906f6f..75de842823 100644 --- a/src/BRepLib/BRepLib_FuseEdges.hxx +++ b/src/BRepLib/BRepLib_FuseEdges.hxx @@ -18,17 +18,14 @@ #include #include -#include #include -#include #include #include #include #include #include #include -#include #include #include class TopoDS_Vertex; diff --git a/src/BRepLib/BRepLib_MakeEdge.hxx b/src/BRepLib/BRepLib_MakeEdge.hxx index e4177c6179..ed3b47968d 100644 --- a/src/BRepLib/BRepLib_MakeEdge.hxx +++ b/src/BRepLib/BRepLib_MakeEdge.hxx @@ -24,7 +24,6 @@ #include #include #include -#include class gp_Pnt; class gp_Lin; class gp_Circ; diff --git a/src/BRepLib/BRepLib_MakeEdge2d.hxx b/src/BRepLib/BRepLib_MakeEdge2d.hxx index 7a10165fe3..d42b5d2dc5 100644 --- a/src/BRepLib/BRepLib_MakeEdge2d.hxx +++ b/src/BRepLib/BRepLib_MakeEdge2d.hxx @@ -24,7 +24,6 @@ #include #include #include -#include class gp_Pnt2d; class gp_Lin2d; class gp_Circ2d; diff --git a/src/BRepLib/BRepLib_MakeFace.hxx b/src/BRepLib/BRepLib_MakeFace.hxx index abd8fbae4a..1bbc39fd9b 100644 --- a/src/BRepLib/BRepLib_MakeFace.hxx +++ b/src/BRepLib/BRepLib_MakeFace.hxx @@ -23,8 +23,6 @@ #include #include -#include -#include class TopoDS_Face; class gp_Pln; class gp_Cylinder; diff --git a/src/BRepLib/BRepLib_MakePolygon.cxx b/src/BRepLib/BRepLib_MakePolygon.cxx index 18965a8717..ea9f0dc1ca 100644 --- a/src/BRepLib/BRepLib_MakePolygon.cxx +++ b/src/BRepLib/BRepLib_MakePolygon.cxx @@ -16,8 +16,6 @@ #include -#include -#include #include #include #include diff --git a/src/BRepLib/BRepLib_MakePolygon.hxx b/src/BRepLib/BRepLib_MakePolygon.hxx index 644bdabe3a..96e006b051 100644 --- a/src/BRepLib/BRepLib_MakePolygon.hxx +++ b/src/BRepLib/BRepLib_MakePolygon.hxx @@ -19,12 +19,10 @@ #include #include -#include #include #include #include -#include class gp_Pnt; class TopoDS_Wire; diff --git a/src/BRepLib/BRepLib_MakeShape.cxx b/src/BRepLib/BRepLib_MakeShape.cxx index c8df93fc8e..910aaf8e32 100644 --- a/src/BRepLib/BRepLib_MakeShape.cxx +++ b/src/BRepLib/BRepLib_MakeShape.cxx @@ -16,8 +16,6 @@ #include -#include -#include #include #include diff --git a/src/BRepLib/BRepLib_MakeShape.hxx b/src/BRepLib/BRepLib_MakeShape.hxx index 80bba52e00..8d7a00d598 100644 --- a/src/BRepLib/BRepLib_MakeShape.hxx +++ b/src/BRepLib/BRepLib_MakeShape.hxx @@ -25,8 +25,6 @@ #include #include #include -#include -#include class TopoDS_Face; class TopoDS_Edge; diff --git a/src/BRepLib/BRepLib_MakeShell.cxx b/src/BRepLib/BRepLib_MakeShell.cxx index c866cb7105..e29094422b 100644 --- a/src/BRepLib/BRepLib_MakeShell.cxx +++ b/src/BRepLib/BRepLib_MakeShell.cxx @@ -24,7 +24,6 @@ #include #include #include -#include #include #include #include diff --git a/src/BRepLib/BRepLib_MakeShell.hxx b/src/BRepLib/BRepLib_MakeShell.hxx index 75dd2c99fa..8fd81a723e 100644 --- a/src/BRepLib/BRepLib_MakeShell.hxx +++ b/src/BRepLib/BRepLib_MakeShell.hxx @@ -23,8 +23,6 @@ #include #include -#include -#include class Geom_Surface; class TopoDS_Shell; diff --git a/src/BRepLib/BRepLib_MakeSolid.cxx b/src/BRepLib/BRepLib_MakeSolid.cxx index 178fb9ddfb..e64c3a7f8c 100644 --- a/src/BRepLib/BRepLib_MakeSolid.cxx +++ b/src/BRepLib/BRepLib_MakeSolid.cxx @@ -17,7 +17,6 @@ #include #include -#include #include #include #include @@ -25,7 +24,6 @@ #include #include #include -#include #include //======================================================================= diff --git a/src/BRepLib/BRepLib_MakeSolid.hxx b/src/BRepLib/BRepLib_MakeSolid.hxx index 4546fd48d3..54d0a08ce5 100644 --- a/src/BRepLib/BRepLib_MakeSolid.hxx +++ b/src/BRepLib/BRepLib_MakeSolid.hxx @@ -19,9 +19,7 @@ #include #include -#include -#include #include #include class TopoDS_CompSolid; diff --git a/src/BRepLib/BRepLib_MakeVertex.hxx b/src/BRepLib/BRepLib_MakeVertex.hxx index a84d9c6bdc..ea39532f1b 100644 --- a/src/BRepLib/BRepLib_MakeVertex.hxx +++ b/src/BRepLib/BRepLib_MakeVertex.hxx @@ -19,7 +19,6 @@ #include #include -#include #include class gp_Pnt; diff --git a/src/BRepLib/BRepLib_MakeWire.cxx b/src/BRepLib/BRepLib_MakeWire.cxx index 6733de36f4..b91b7d0d03 100644 --- a/src/BRepLib/BRepLib_MakeWire.cxx +++ b/src/BRepLib/BRepLib_MakeWire.cxx @@ -17,11 +17,7 @@ #include #include -#include -#include #include -#include -#include #include #include #include @@ -31,7 +27,6 @@ #include #include #include -#include #include //======================================================================= diff --git a/src/BRepLib/BRepLib_MakeWire.hxx b/src/BRepLib/BRepLib_MakeWire.hxx index d227ece0f1..195b826ebf 100644 --- a/src/BRepLib/BRepLib_MakeWire.hxx +++ b/src/BRepLib/BRepLib_MakeWire.hxx @@ -19,7 +19,6 @@ #include #include -#include #include #include diff --git a/src/BRepLib/BRepLib_MakeWire_1.cxx b/src/BRepLib/BRepLib_MakeWire_1.cxx index 7dde7a53bb..7e3f332ecb 100644 --- a/src/BRepLib/BRepLib_MakeWire_1.cxx +++ b/src/BRepLib/BRepLib_MakeWire_1.cxx @@ -24,16 +24,11 @@ #include #include #include -#include #include #include -#include #include #include -#include #include -#include -#include #include #include #include diff --git a/src/BRepLib/BRepLib_ValidateEdge.cxx b/src/BRepLib/BRepLib_ValidateEdge.cxx index ba34e4faa1..2b55aa7c21 100644 --- a/src/BRepLib/BRepLib_ValidateEdge.cxx +++ b/src/BRepLib/BRepLib_ValidateEdge.cxx @@ -13,7 +13,6 @@ #include -#include #include #include #include diff --git a/src/BRepMAT2d/BRepMAT2d_BisectingLocus.cxx b/src/BRepMAT2d/BRepMAT2d_BisectingLocus.cxx index ef992f3594..dcbd1e4084 100644 --- a/src/BRepMAT2d/BRepMAT2d_BisectingLocus.cxx +++ b/src/BRepMAT2d/BRepMAT2d_BisectingLocus.cxx @@ -27,16 +27,12 @@ #include #include #include -#include #include -#include -#include #include #include #include #include #include -#include #include #include diff --git a/src/BRepMAT2d/BRepMAT2d_BisectingLocus.hxx b/src/BRepMAT2d/BRepMAT2d_BisectingLocus.hxx index 76e75bb475..8f03b29859 100644 --- a/src/BRepMAT2d/BRepMAT2d_BisectingLocus.hxx +++ b/src/BRepMAT2d/BRepMAT2d_BisectingLocus.hxx @@ -22,7 +22,6 @@ #include #include -#include #include #include #include diff --git a/src/BRepMAT2d/BRepMAT2d_Explorer.cxx b/src/BRepMAT2d/BRepMAT2d_Explorer.cxx index e231f4029f..32ba12c3be 100644 --- a/src/BRepMAT2d/BRepMAT2d_Explorer.cxx +++ b/src/BRepMAT2d/BRepMAT2d_Explorer.cxx @@ -21,11 +21,9 @@ #include #include #include -#include #include #include #include -#include #include #include #include @@ -35,19 +33,12 @@ #include #include #include -#include -#include #include -#include -#include -#include #include #include #include -#include #include #include -#include #include #include #include diff --git a/src/BRepMAT2d/BRepMAT2d_Explorer.hxx b/src/BRepMAT2d/BRepMAT2d_Explorer.hxx index 1866743b74..9c530d1822 100644 --- a/src/BRepMAT2d/BRepMAT2d_Explorer.hxx +++ b/src/BRepMAT2d/BRepMAT2d_Explorer.hxx @@ -26,7 +26,6 @@ #include #include #include -#include #include class TopoDS_Face; class TopoDS_Wire; diff --git a/src/BRepMAT2d/BRepMAT2d_LinkTopoBilo.cxx b/src/BRepMAT2d/BRepMAT2d_LinkTopoBilo.cxx index 3c4003cbb5..b28b253baa 100644 --- a/src/BRepMAT2d/BRepMAT2d_LinkTopoBilo.cxx +++ b/src/BRepMAT2d/BRepMAT2d_LinkTopoBilo.cxx @@ -16,22 +16,17 @@ #include -#include #include #include #include #include -#include #include -#include #include #include #include -#include #include #include #include -#include #include #include #include diff --git a/src/BRepMAT2d/BRepMAT2d_LinkTopoBilo.hxx b/src/BRepMAT2d/BRepMAT2d_LinkTopoBilo.hxx index 935ce27af9..98ff365f5a 100644 --- a/src/BRepMAT2d/BRepMAT2d_LinkTopoBilo.hxx +++ b/src/BRepMAT2d/BRepMAT2d_LinkTopoBilo.hxx @@ -25,7 +25,6 @@ #include #include #include -#include class BRepMAT2d_Explorer; class BRepMAT2d_BisectingLocus; class MAT_BasicElt; diff --git a/src/BRepMesh/BRepMesh_BaseMeshAlgo.cxx b/src/BRepMesh/BRepMesh_BaseMeshAlgo.cxx index 81e318a016..da37dfca9b 100644 --- a/src/BRepMesh/BRepMesh_BaseMeshAlgo.cxx +++ b/src/BRepMesh/BRepMesh_BaseMeshAlgo.cxx @@ -14,8 +14,6 @@ // commercial license or contractual agreement. #include -#include -#include #include #include #include diff --git a/src/BRepMesh/BRepMesh_Circle.hxx b/src/BRepMesh/BRepMesh_Circle.hxx index c37813fc19..8fcf55e7ee 100644 --- a/src/BRepMesh/BRepMesh_Circle.hxx +++ b/src/BRepMesh/BRepMesh_Circle.hxx @@ -16,7 +16,6 @@ #include #include -#include #include //! Describes a 2d circle with a size of only 3 Standard_Real diff --git a/src/BRepMesh/BRepMesh_CircleInspector.hxx b/src/BRepMesh/BRepMesh_CircleInspector.hxx index f185f50849..c01d9e8e5f 100644 --- a/src/BRepMesh/BRepMesh_CircleInspector.hxx +++ b/src/BRepMesh/BRepMesh_CircleInspector.hxx @@ -18,9 +18,7 @@ #include #include -#include #include -#include #include //! Auxiliary class to find circles shot by the given point. diff --git a/src/BRepMesh/BRepMesh_CircleTool.hxx b/src/BRepMesh/BRepMesh_CircleTool.hxx index 7a307bef3d..614f47bbb7 100644 --- a/src/BRepMesh/BRepMesh_CircleTool.hxx +++ b/src/BRepMesh/BRepMesh_CircleTool.hxx @@ -21,7 +21,6 @@ #include #include #include -#include #include #include #include diff --git a/src/BRepMesh/BRepMesh_Classifier.hxx b/src/BRepMesh/BRepMesh_Classifier.hxx index d675cb4bd0..2cfe84f56e 100644 --- a/src/BRepMesh/BRepMesh_Classifier.hxx +++ b/src/BRepMesh/BRepMesh_Classifier.hxx @@ -16,9 +16,6 @@ #ifndef _BRepMesh_Classifier_HeaderFile #define _BRepMesh_Classifier_HeaderFile -#include -#include -#include #include #include diff --git a/src/BRepMesh/BRepMesh_ConeRangeSplitter.cxx b/src/BRepMesh/BRepMesh_ConeRangeSplitter.cxx index da28dd093c..add0a50374 100644 --- a/src/BRepMesh/BRepMesh_ConeRangeSplitter.cxx +++ b/src/BRepMesh/BRepMesh_ConeRangeSplitter.cxx @@ -14,7 +14,9 @@ // commercial license or contractual agreement. #include + #include +#include //======================================================================= // Function: GetSplitSteps diff --git a/src/BRepMesh/BRepMesh_ConeRangeSplitter.hxx b/src/BRepMesh/BRepMesh_ConeRangeSplitter.hxx index e9abf42fec..c34e652a29 100644 --- a/src/BRepMesh/BRepMesh_ConeRangeSplitter.hxx +++ b/src/BRepMesh/BRepMesh_ConeRangeSplitter.hxx @@ -17,7 +17,6 @@ #define _BRepMesh_ConeRangeSplitter_HeaderFile #include -#include //! Auxiliary class extending default range splitter in //! order to generate internal nodes for conical surface. diff --git a/src/BRepMesh/BRepMesh_ConstrainedBaseMeshAlgo.hxx b/src/BRepMesh/BRepMesh_ConstrainedBaseMeshAlgo.hxx index ea21bdda16..a46c9afe0d 100644 --- a/src/BRepMesh/BRepMesh_ConstrainedBaseMeshAlgo.hxx +++ b/src/BRepMesh/BRepMesh_ConstrainedBaseMeshAlgo.hxx @@ -17,8 +17,6 @@ #define _BRepMesh_ConstrainedBaseMeshAlgo_HeaderFile #include -#include -#include class BRepMesh_Delaun; diff --git a/src/BRepMesh/BRepMesh_CurveTessellator.cxx b/src/BRepMesh/BRepMesh_CurveTessellator.cxx index ec6860afa2..fbb1b47305 100644 --- a/src/BRepMesh/BRepMesh_CurveTessellator.cxx +++ b/src/BRepMesh/BRepMesh_CurveTessellator.cxx @@ -15,7 +15,6 @@ #include #include -#include #include #include #include diff --git a/src/BRepMesh/BRepMesh_CustomBaseMeshAlgo.hxx b/src/BRepMesh/BRepMesh_CustomBaseMeshAlgo.hxx index bfeba79de4..547a9c89ff 100644 --- a/src/BRepMesh/BRepMesh_CustomBaseMeshAlgo.hxx +++ b/src/BRepMesh/BRepMesh_CustomBaseMeshAlgo.hxx @@ -18,7 +18,6 @@ #include #include -#include #include #include diff --git a/src/BRepMesh/BRepMesh_CylinderRangeSplitter.cxx b/src/BRepMesh/BRepMesh_CylinderRangeSplitter.cxx index 7016ad86c8..734fd5e5e6 100644 --- a/src/BRepMesh/BRepMesh_CylinderRangeSplitter.cxx +++ b/src/BRepMesh/BRepMesh_CylinderRangeSplitter.cxx @@ -14,7 +14,9 @@ // commercial license or contractual agreement. #include + #include +#include //======================================================================= // Function: Reset diff --git a/src/BRepMesh/BRepMesh_CylinderRangeSplitter.hxx b/src/BRepMesh/BRepMesh_CylinderRangeSplitter.hxx index 87a94574f6..21053afa11 100644 --- a/src/BRepMesh/BRepMesh_CylinderRangeSplitter.hxx +++ b/src/BRepMesh/BRepMesh_CylinderRangeSplitter.hxx @@ -17,7 +17,6 @@ #define _BRepMesh_CylinderRangeSplitter_HeaderFile #include -#include //! Auxiliary class extending default range splitter in //! order to generate internal nodes for cylindrical surface. diff --git a/src/BRepMesh/BRepMesh_DataStructureOfDelaun.cxx b/src/BRepMesh/BRepMesh_DataStructureOfDelaun.cxx index e69a110dc9..bd9bc087a4 100644 --- a/src/BRepMesh/BRepMesh_DataStructureOfDelaun.cxx +++ b/src/BRepMesh/BRepMesh_DataStructureOfDelaun.cxx @@ -19,7 +19,6 @@ #include #include -#include #include #include #include diff --git a/src/BRepMesh/BRepMesh_DataStructureOfDelaun.hxx b/src/BRepMesh/BRepMesh_DataStructureOfDelaun.hxx index 86457a0f8f..f8e034531d 100644 --- a/src/BRepMesh/BRepMesh_DataStructureOfDelaun.hxx +++ b/src/BRepMesh/BRepMesh_DataStructureOfDelaun.hxx @@ -15,10 +15,6 @@ #define _BRepMesh_DataStructureOfDelaun_HeaderFile #include -#include -#include -#include -#include #include class BRepMesh_Edge; diff --git a/src/BRepMesh/BRepMesh_DefaultRangeSplitter.cxx b/src/BRepMesh/BRepMesh_DefaultRangeSplitter.cxx index 89557796a2..a7359f8ee9 100644 --- a/src/BRepMesh/BRepMesh_DefaultRangeSplitter.cxx +++ b/src/BRepMesh/BRepMesh_DefaultRangeSplitter.cxx @@ -15,9 +15,7 @@ #include -#include #include -#include #include //======================================================================= diff --git a/src/BRepMesh/BRepMesh_DefaultRangeSplitter.hxx b/src/BRepMesh/BRepMesh_DefaultRangeSplitter.hxx index 23f9864dcc..3037d27643 100644 --- a/src/BRepMesh/BRepMesh_DefaultRangeSplitter.hxx +++ b/src/BRepMesh/BRepMesh_DefaultRangeSplitter.hxx @@ -16,10 +16,6 @@ #ifndef _BRepMesh_DefaultRangeSplitter_HeaderFile #define _BRepMesh_DefaultRangeSplitter_HeaderFile -#include -#include -#include -#include #include struct IMeshTools_Parameters; diff --git a/src/BRepMesh/BRepMesh_Deflection.cxx b/src/BRepMesh/BRepMesh_Deflection.cxx index 8d8fc97b05..7e274d7b01 100644 --- a/src/BRepMesh/BRepMesh_Deflection.cxx +++ b/src/BRepMesh/BRepMesh_Deflection.cxx @@ -15,7 +15,6 @@ #include -#include #include #include #include diff --git a/src/BRepMesh/BRepMesh_Deflection.hxx b/src/BRepMesh/BRepMesh_Deflection.hxx index 015670603b..4d16ed6c5a 100644 --- a/src/BRepMesh/BRepMesh_Deflection.hxx +++ b/src/BRepMesh/BRepMesh_Deflection.hxx @@ -16,7 +16,6 @@ #ifndef _BRepMesh_Deflection_HeaderFile #define _BRepMesh_Deflection_HeaderFile -#include #include #include #include diff --git a/src/BRepMesh/BRepMesh_DelabellaBaseMeshAlgo.hxx b/src/BRepMesh/BRepMesh_DelabellaBaseMeshAlgo.hxx index 0f4af0f2c7..1b9dac12c0 100644 --- a/src/BRepMesh/BRepMesh_DelabellaBaseMeshAlgo.hxx +++ b/src/BRepMesh/BRepMesh_DelabellaBaseMeshAlgo.hxx @@ -17,8 +17,6 @@ #define _BRepMesh_DelabellaBaseMeshAlgo_HeaderFile #include -#include -#include //! Class provides base functionality to build face triangulation using Delabella project. diff --git a/src/BRepMesh/BRepMesh_DelabellaMeshAlgoFactory.cxx b/src/BRepMesh/BRepMesh_DelabellaMeshAlgoFactory.cxx index 8b02c4a46c..49ae2f0f78 100644 --- a/src/BRepMesh/BRepMesh_DelabellaMeshAlgoFactory.cxx +++ b/src/BRepMesh/BRepMesh_DelabellaMeshAlgoFactory.cxx @@ -14,8 +14,6 @@ // commercial license or contractual agreement. #include -#include -#include #include #include #include @@ -23,7 +21,6 @@ #include #include #include -#include #include #include diff --git a/src/BRepMesh/BRepMesh_DelabellaMeshAlgoFactory.hxx b/src/BRepMesh/BRepMesh_DelabellaMeshAlgoFactory.hxx index 486e0d51ae..6a8cf2b727 100644 --- a/src/BRepMesh/BRepMesh_DelabellaMeshAlgoFactory.hxx +++ b/src/BRepMesh/BRepMesh_DelabellaMeshAlgoFactory.hxx @@ -17,8 +17,6 @@ #define _BRepMesh_DelabellaMeshAlgoFactory_HeaderFile #include -#include -#include #include //! Implementation of IMeshTools_MeshAlgoFactory providing Delabella-based diff --git a/src/BRepMesh/BRepMesh_Delaun.cxx b/src/BRepMesh/BRepMesh_Delaun.cxx index e2bb8fed47..0aa1eeb2ba 100644 --- a/src/BRepMesh/BRepMesh_Delaun.cxx +++ b/src/BRepMesh/BRepMesh_Delaun.cxx @@ -16,7 +16,6 @@ #include -#include #include #include #include diff --git a/src/BRepMesh/BRepMesh_Delaun.hxx b/src/BRepMesh/BRepMesh_Delaun.hxx index 04c7df1fdc..fb575548b2 100755 --- a/src/BRepMesh/BRepMesh_Delaun.hxx +++ b/src/BRepMesh/BRepMesh_Delaun.hxx @@ -18,17 +18,12 @@ #include #include -#include -#include #include #include #include #include #include #include -#include -#include -#include #include class Bnd_B2d; diff --git a/src/BRepMesh/BRepMesh_DelaunayBaseMeshAlgo.hxx b/src/BRepMesh/BRepMesh_DelaunayBaseMeshAlgo.hxx index 093d668758..bce1b39a34 100644 --- a/src/BRepMesh/BRepMesh_DelaunayBaseMeshAlgo.hxx +++ b/src/BRepMesh/BRepMesh_DelaunayBaseMeshAlgo.hxx @@ -17,8 +17,6 @@ #define _BRepMesh_DelaunayBaseMeshAlgo_HeaderFile #include -#include -#include //! Class provides base functionality to build face triangulation using Dealunay approach. diff --git a/src/BRepMesh/BRepMesh_DiscretRoot.hxx b/src/BRepMesh/BRepMesh_DiscretRoot.hxx index 77bb24cae7..50b45c0d94 100644 --- a/src/BRepMesh/BRepMesh_DiscretRoot.hxx +++ b/src/BRepMesh/BRepMesh_DiscretRoot.hxx @@ -15,7 +15,6 @@ #define _BRepMesh_DiscretRoot_HeaderFile #include -#include #include #include #include diff --git a/src/BRepMesh/BRepMesh_Edge.hxx b/src/BRepMesh/BRepMesh_Edge.hxx index 8b9718dd44..f0c50b9bf5 100644 --- a/src/BRepMesh/BRepMesh_Edge.hxx +++ b/src/BRepMesh/BRepMesh_Edge.hxx @@ -15,8 +15,6 @@ #define _BRepMesh_Edge_HeaderFile #include -#include -#include #include #include diff --git a/src/BRepMesh/BRepMesh_EdgeDiscret.cxx b/src/BRepMesh/BRepMesh_EdgeDiscret.cxx index 6fe4463fb4..a68165a291 100644 --- a/src/BRepMesh/BRepMesh_EdgeDiscret.cxx +++ b/src/BRepMesh/BRepMesh_EdgeDiscret.cxx @@ -16,7 +16,6 @@ #include #include #include -#include #include #include #include diff --git a/src/BRepMesh/BRepMesh_EdgeParameterProvider.hxx b/src/BRepMesh/BRepMesh_EdgeParameterProvider.hxx index ab778b9256..7070c0997e 100644 --- a/src/BRepMesh/BRepMesh_EdgeParameterProvider.hxx +++ b/src/BRepMesh/BRepMesh_EdgeParameterProvider.hxx @@ -23,12 +23,9 @@ #include #include #include -#include #include #include -#include #include -#include class gp_Pnt; class TopoDS_Edge; diff --git a/src/BRepMesh/BRepMesh_EdgeTessellationExtractor.hxx b/src/BRepMesh/BRepMesh_EdgeTessellationExtractor.hxx index 8e4b264e99..e41a33f39d 100644 --- a/src/BRepMesh/BRepMesh_EdgeTessellationExtractor.hxx +++ b/src/BRepMesh/BRepMesh_EdgeTessellationExtractor.hxx @@ -17,9 +17,7 @@ #define _BRepMesh_EdgeTessellationExtractor_HeaderFile #include -#include #include -#include #include #include diff --git a/src/BRepMesh/BRepMesh_FaceDiscret.cxx b/src/BRepMesh/BRepMesh_FaceDiscret.cxx index 5d76218476..a2b8cccf66 100644 --- a/src/BRepMesh/BRepMesh_FaceDiscret.cxx +++ b/src/BRepMesh/BRepMesh_FaceDiscret.cxx @@ -15,7 +15,6 @@ #include #include -#include #include #include #include diff --git a/src/BRepMesh/BRepMesh_FaceDiscret.hxx b/src/BRepMesh/BRepMesh_FaceDiscret.hxx index 026ec0310e..63bae95c96 100644 --- a/src/BRepMesh/BRepMesh_FaceDiscret.hxx +++ b/src/BRepMesh/BRepMesh_FaceDiscret.hxx @@ -18,9 +18,7 @@ #include #include -#include #include -#include //! Class implements functionality starting triangulation of model's faces. //! Each face is processed separately and can be executed in parallel mode. diff --git a/src/BRepMesh/BRepMesh_GeomTool.cxx b/src/BRepMesh/BRepMesh_GeomTool.cxx index abdb8ddead..ffa7649433 100644 --- a/src/BRepMesh/BRepMesh_GeomTool.cxx +++ b/src/BRepMesh/BRepMesh_GeomTool.cxx @@ -25,7 +25,6 @@ #include #include #include -#include #include namespace diff --git a/src/BRepMesh/BRepMesh_IncrementalMesh.cxx b/src/BRepMesh/BRepMesh_IncrementalMesh.cxx index 04c46f92c1..cbd18c4aa3 100644 --- a/src/BRepMesh/BRepMesh_IncrementalMesh.cxx +++ b/src/BRepMesh/BRepMesh_IncrementalMesh.cxx @@ -17,7 +17,6 @@ #include #include #include -#include #include #include #include diff --git a/src/BRepMesh/BRepMesh_IncrementalMesh.hxx b/src/BRepMesh/BRepMesh_IncrementalMesh.hxx index db19ca960d..3853c84075 100644 --- a/src/BRepMesh/BRepMesh_IncrementalMesh.hxx +++ b/src/BRepMesh/BRepMesh_IncrementalMesh.hxx @@ -15,7 +15,6 @@ #define _BRepMesh_IncrementalMesh_HeaderFile #include -#include #include #include diff --git a/src/BRepMesh/BRepMesh_MeshAlgoFactory.cxx b/src/BRepMesh/BRepMesh_MeshAlgoFactory.cxx index e6650d27e9..00fd9f9556 100644 --- a/src/BRepMesh/BRepMesh_MeshAlgoFactory.cxx +++ b/src/BRepMesh/BRepMesh_MeshAlgoFactory.cxx @@ -14,14 +14,11 @@ // commercial license or contractual agreement. #include -#include -#include #include #include #include #include #include -#include #include #include diff --git a/src/BRepMesh/BRepMesh_MeshAlgoFactory.hxx b/src/BRepMesh/BRepMesh_MeshAlgoFactory.hxx index 491cb16e83..7ea9a82953 100644 --- a/src/BRepMesh/BRepMesh_MeshAlgoFactory.hxx +++ b/src/BRepMesh/BRepMesh_MeshAlgoFactory.hxx @@ -17,8 +17,6 @@ #define _BRepMesh_MeshAlgoFactory_HeaderFile #include -#include -#include #include //! Default implementation of IMeshTools_MeshAlgoFactory providing algorithms diff --git a/src/BRepMesh/BRepMesh_MeshTool.hxx b/src/BRepMesh/BRepMesh_MeshTool.hxx index 88c0d071ea..ed51a81f2b 100644 --- a/src/BRepMesh/BRepMesh_MeshTool.hxx +++ b/src/BRepMesh/BRepMesh_MeshTool.hxx @@ -17,7 +17,6 @@ #define _BRepMesh_MeshTool_HeaderFile #include -#include #include #include #include diff --git a/src/BRepMesh/BRepMesh_ModelHealer.cxx b/src/BRepMesh/BRepMesh_ModelHealer.cxx index e943015c16..def938d41a 100644 --- a/src/BRepMesh/BRepMesh_ModelHealer.cxx +++ b/src/BRepMesh/BRepMesh_ModelHealer.cxx @@ -15,7 +15,6 @@ #include #include -#include #include #include #include diff --git a/src/BRepMesh/BRepMesh_ModelHealer.hxx b/src/BRepMesh/BRepMesh_ModelHealer.hxx index 5d6d129432..46ab5216fe 100644 --- a/src/BRepMesh/BRepMesh_ModelHealer.hxx +++ b/src/BRepMesh/BRepMesh_ModelHealer.hxx @@ -18,7 +18,6 @@ #include #include -#include #include #include diff --git a/src/BRepMesh/BRepMesh_ModelPostProcessor.cxx b/src/BRepMesh/BRepMesh_ModelPostProcessor.cxx index b6253542c4..800bc7993b 100644 --- a/src/BRepMesh/BRepMesh_ModelPostProcessor.cxx +++ b/src/BRepMesh/BRepMesh_ModelPostProcessor.cxx @@ -14,10 +14,12 @@ // commercial license or contractual agreement. #include + #include #include #include #include +#include #include #include #include diff --git a/src/BRepMesh/BRepMesh_ModelPostProcessor.hxx b/src/BRepMesh/BRepMesh_ModelPostProcessor.hxx index f780f05adb..9b050ccd91 100644 --- a/src/BRepMesh/BRepMesh_ModelPostProcessor.hxx +++ b/src/BRepMesh/BRepMesh_ModelPostProcessor.hxx @@ -17,7 +17,6 @@ #define _BRepMesh_ModelPostProcessor_HeaderFile #include -#include #include //! Class implements functionality of model post-processing tool. diff --git a/src/BRepMesh/BRepMesh_ModelPreProcessor.cxx b/src/BRepMesh/BRepMesh_ModelPreProcessor.cxx index 8fdd133577..5466059a53 100644 --- a/src/BRepMesh/BRepMesh_ModelPreProcessor.cxx +++ b/src/BRepMesh/BRepMesh_ModelPreProcessor.cxx @@ -14,13 +14,14 @@ // commercial license or contractual agreement. #include + #include #include -#include #include #include #include #include +#include #include #include #include diff --git a/src/BRepMesh/BRepMesh_ModelPreProcessor.hxx b/src/BRepMesh/BRepMesh_ModelPreProcessor.hxx index 8f0903f1cb..0da23a99ce 100644 --- a/src/BRepMesh/BRepMesh_ModelPreProcessor.hxx +++ b/src/BRepMesh/BRepMesh_ModelPreProcessor.hxx @@ -17,7 +17,6 @@ #define _BRepMesh_ModelPreProcessor_HeaderFile #include -#include #include //! Class implements functionality of model pre-processing tool. diff --git a/src/BRepMesh/BRepMesh_OrientedEdge.hxx b/src/BRepMesh/BRepMesh_OrientedEdge.hxx index 5b64f407bb..0cc32b0707 100644 --- a/src/BRepMesh/BRepMesh_OrientedEdge.hxx +++ b/src/BRepMesh/BRepMesh_OrientedEdge.hxx @@ -16,8 +16,6 @@ #include #include -#include -#include //! Light weighted structure representing simple link. class BRepMesh_OrientedEdge diff --git a/src/BRepMesh/BRepMesh_PluginEntryType.hxx b/src/BRepMesh/BRepMesh_PluginEntryType.hxx index 2233c30ca3..b3523e6f89 100644 --- a/src/BRepMesh/BRepMesh_PluginEntryType.hxx +++ b/src/BRepMesh/BRepMesh_PluginEntryType.hxx @@ -14,8 +14,6 @@ #ifndef _BRepMesh_PluginEntryType_HeaderFile #define _BRepMesh_PluginEntryType_HeaderFile -#include - class TopoDS_Shape; class BRepMesh_DiscretRoot; diff --git a/src/BRepMesh/BRepMesh_ShapeTool.cxx b/src/BRepMesh/BRepMesh_ShapeTool.cxx index 21a1bad3bd..bb3f924d2f 100644 --- a/src/BRepMesh/BRepMesh_ShapeTool.cxx +++ b/src/BRepMesh/BRepMesh_ShapeTool.cxx @@ -16,7 +16,6 @@ #include #include #include -#include #include #include #include diff --git a/src/BRepMesh/BRepMesh_ShapeTool.hxx b/src/BRepMesh/BRepMesh_ShapeTool.hxx index f47ebfba25..f14157cb9f 100644 --- a/src/BRepMesh/BRepMesh_ShapeTool.hxx +++ b/src/BRepMesh/BRepMesh_ShapeTool.hxx @@ -17,8 +17,6 @@ #define _BRepMesh_ShapeTool_HeaderFile #include -#include -#include #include #include #include diff --git a/src/BRepMesh/BRepMesh_ShapeVisitor.cxx b/src/BRepMesh/BRepMesh_ShapeVisitor.cxx index 0c4727ab07..22c4bc28c1 100644 --- a/src/BRepMesh/BRepMesh_ShapeVisitor.cxx +++ b/src/BRepMesh/BRepMesh_ShapeVisitor.cxx @@ -14,11 +14,6 @@ // commercial license or contractual agreement. #include -#include -#include -#include -#include -#include #include #include #include diff --git a/src/BRepMesh/BRepMesh_Triangle.hxx b/src/BRepMesh/BRepMesh_Triangle.hxx index 72ee6eb666..abc61fd367 100644 --- a/src/BRepMesh/BRepMesh_Triangle.hxx +++ b/src/BRepMesh/BRepMesh_Triangle.hxx @@ -19,7 +19,6 @@ #include #include -#include #include diff --git a/src/BRepMesh/BRepMesh_Triangulator.hxx b/src/BRepMesh/BRepMesh_Triangulator.hxx index 5c3f09d9e3..cdbbc54582 100644 --- a/src/BRepMesh/BRepMesh_Triangulator.hxx +++ b/src/BRepMesh/BRepMesh_Triangulator.hxx @@ -16,10 +16,7 @@ #ifndef _BRepMesh_Triangulator_HeaderFile #define _BRepMesh_Triangulator_HeaderFile -#include -#include #include -#include #include #include #include diff --git a/src/BRepMesh/BRepMesh_Vertex.hxx b/src/BRepMesh/BRepMesh_Vertex.hxx index 5c6e7cf102..b991817a84 100644 --- a/src/BRepMesh/BRepMesh_Vertex.hxx +++ b/src/BRepMesh/BRepMesh_Vertex.hxx @@ -17,7 +17,6 @@ #include #include -#include #include #include #include diff --git a/src/BRepMesh/BRepMesh_VertexInspector.hxx b/src/BRepMesh/BRepMesh_VertexInspector.hxx index e8efa57dbf..d4aa73acb3 100644 --- a/src/BRepMesh/BRepMesh_VertexInspector.hxx +++ b/src/BRepMesh/BRepMesh_VertexInspector.hxx @@ -18,7 +18,6 @@ #include #include -#include #include #include #include diff --git a/src/BRepMesh/BRepMesh_VertexTool.hxx b/src/BRepMesh/BRepMesh_VertexTool.hxx index cdf10a6594..68abb52863 100644 --- a/src/BRepMesh/BRepMesh_VertexTool.hxx +++ b/src/BRepMesh/BRepMesh_VertexTool.hxx @@ -14,7 +14,6 @@ #ifndef _BRepMesh_VertexTool_HeaderFile #define _BRepMesh_VertexTool_HeaderFile -#include #include #include #include diff --git a/src/BRepMeshData/BRepMeshData_Curve.cxx b/src/BRepMeshData/BRepMeshData_Curve.cxx index 7b954cd0ae..a1daaf3af7 100644 --- a/src/BRepMeshData/BRepMeshData_Curve.cxx +++ b/src/BRepMeshData/BRepMeshData_Curve.cxx @@ -15,7 +15,6 @@ #include #include -#include #include IMPLEMENT_STANDARD_RTTIEXT(BRepMeshData_Curve, IMeshData_Curve) diff --git a/src/BRepMeshData/BRepMeshData_Edge.cxx b/src/BRepMeshData/BRepMeshData_Edge.cxx index 1af0dc15c0..9b30ed791a 100644 --- a/src/BRepMeshData/BRepMeshData_Edge.cxx +++ b/src/BRepMeshData/BRepMeshData_Edge.cxx @@ -16,8 +16,6 @@ #include #include #include -#include -#include IMPLEMENT_STANDARD_RTTIEXT(BRepMeshData_Edge, IMeshData_Edge) diff --git a/src/BRepMeshData/BRepMeshData_Edge.hxx b/src/BRepMeshData/BRepMeshData_Edge.hxx index 432d4582b1..0f64ab5804 100644 --- a/src/BRepMeshData/BRepMeshData_Edge.hxx +++ b/src/BRepMeshData/BRepMeshData_Edge.hxx @@ -17,7 +17,6 @@ #define _BRepMeshData_Edge_HeaderFile #include -#include #include #include diff --git a/src/BRepMeshData/BRepMeshData_Face.cxx b/src/BRepMeshData/BRepMeshData_Face.cxx index 833e108c27..1180e0e675 100644 --- a/src/BRepMeshData/BRepMeshData_Face.cxx +++ b/src/BRepMeshData/BRepMeshData_Face.cxx @@ -15,7 +15,6 @@ #include #include -#include #include IMPLEMENT_STANDARD_RTTIEXT(BRepMeshData_Face, IMeshData_Face) diff --git a/src/BRepMeshData/BRepMeshData_Model.cxx b/src/BRepMeshData/BRepMeshData_Model.cxx index e62bb3cf0b..1731c174e2 100644 --- a/src/BRepMeshData/BRepMeshData_Model.cxx +++ b/src/BRepMeshData/BRepMeshData_Model.cxx @@ -17,8 +17,6 @@ #include #include -#include -#include #include IMPLEMENT_STANDARD_RTTIEXT(BRepMeshData_Model, IMeshData_Model) diff --git a/src/BRepMeshData/BRepMeshData_Model.hxx b/src/BRepMeshData/BRepMeshData_Model.hxx index b76315aeac..efdd356441 100644 --- a/src/BRepMeshData/BRepMeshData_Model.hxx +++ b/src/BRepMeshData/BRepMeshData_Model.hxx @@ -19,7 +19,6 @@ #include #include #include -#include #include //! Default implementation of model entity. diff --git a/src/BRepMeshData/BRepMeshData_PCurve.cxx b/src/BRepMeshData/BRepMeshData_PCurve.cxx index 818b7a3c62..cff9950e9a 100644 --- a/src/BRepMeshData/BRepMeshData_PCurve.cxx +++ b/src/BRepMeshData/BRepMeshData_PCurve.cxx @@ -15,7 +15,6 @@ #include #include -#include #include #include diff --git a/src/BRepMeshData/BRepMeshData_Wire.cxx b/src/BRepMeshData/BRepMeshData_Wire.cxx index deb56edb7a..db266c9674 100644 --- a/src/BRepMeshData/BRepMeshData_Wire.cxx +++ b/src/BRepMeshData/BRepMeshData_Wire.cxx @@ -15,8 +15,6 @@ #include #include -#include -#include IMPLEMENT_STANDARD_RTTIEXT(BRepMeshData_Wire, IMeshData_Wire) diff --git a/src/BRepOffset/BRepOffset.cxx b/src/BRepOffset/BRepOffset.cxx index 7fac35f35f..84b411df82 100644 --- a/src/BRepOffset/BRepOffset.cxx +++ b/src/BRepOffset/BRepOffset.cxx @@ -17,7 +17,6 @@ #include #include -#include #include #include #include @@ -39,7 +38,6 @@ #include #include #include -#include #include //======================================================================= diff --git a/src/BRepOffset/BRepOffset_Analyse.cxx b/src/BRepOffset/BRepOffset_Analyse.cxx index 8247b362af..facfbed344 100644 --- a/src/BRepOffset/BRepOffset_Analyse.cxx +++ b/src/BRepOffset/BRepOffset_Analyse.cxx @@ -18,26 +18,19 @@ #include #include #include -#include -#include #include -#include #include #include -#include #include #include #include -#include #include -#include #include #include #include #include #include #include -#include #include #include #include @@ -46,7 +39,6 @@ #include #include #include -#include #include #include diff --git a/src/BRepOffset/BRepOffset_Analyse.hxx b/src/BRepOffset/BRepOffset_Analyse.hxx index 1b7eb83bf4..9172a4ddf0 100644 --- a/src/BRepOffset/BRepOffset_Analyse.hxx +++ b/src/BRepOffset/BRepOffset_Analyse.hxx @@ -19,13 +19,10 @@ #include #include -#include -#include #include #include #include -#include #include #include #include diff --git a/src/BRepOffset/BRepOffset_Inter2d.cxx b/src/BRepOffset/BRepOffset_Inter2d.cxx index f59ca2b58d..1249748124 100644 --- a/src/BRepOffset/BRepOffset_Inter2d.cxx +++ b/src/BRepOffset/BRepOffset_Inter2d.cxx @@ -18,16 +18,9 @@ #include -#include -#include -#include -#include -#include #include #include -#include #include -#include #include #include #include @@ -77,8 +70,6 @@ #include #include #include -#include -#include #include #include diff --git a/src/BRepOffset/BRepOffset_Inter3d.cxx b/src/BRepOffset/BRepOffset_Inter3d.cxx index 8fc46ce06d..00804755ec 100644 --- a/src/BRepOffset/BRepOffset_Inter3d.cxx +++ b/src/BRepOffset/BRepOffset_Inter3d.cxx @@ -24,15 +24,12 @@ #include #include #include -#include #include #include #include #include #include -#include #include -#include #include #include #include @@ -42,8 +39,6 @@ #include #include #include -#include -#include #include // #include diff --git a/src/BRepOffset/BRepOffset_Inter3d.hxx b/src/BRepOffset/BRepOffset_Inter3d.hxx index ffbddf3844..c002d47ffb 100644 --- a/src/BRepOffset/BRepOffset_Inter3d.hxx +++ b/src/BRepOffset/BRepOffset_Inter3d.hxx @@ -25,11 +25,9 @@ #include #include #include -#include #include #include #include -#include class BRepAlgo_AsDes; class BRepAlgo_Image; class TopoDS_Face; diff --git a/src/BRepOffset/BRepOffset_MakeLoops.cxx b/src/BRepOffset/BRepOffset_MakeLoops.cxx index 738dba4132..3bc335d1bb 100644 --- a/src/BRepOffset/BRepOffset_MakeLoops.cxx +++ b/src/BRepOffset/BRepOffset_MakeLoops.cxx @@ -19,7 +19,6 @@ #include #include #include -#include #include #include #include @@ -30,7 +29,6 @@ #include #include #include -#include #include #include diff --git a/src/BRepOffset/BRepOffset_MakeLoops.hxx b/src/BRepOffset/BRepOffset_MakeLoops.hxx index e309f50e4f..9f32735f85 100644 --- a/src/BRepOffset/BRepOffset_MakeLoops.hxx +++ b/src/BRepOffset/BRepOffset_MakeLoops.hxx @@ -25,7 +25,6 @@ #include #include -#include class BRepAlgo_AsDes; class BRepAlgo_Image; class BRepOffset_Analyse; diff --git a/src/BRepOffset/BRepOffset_MakeOffset.cxx b/src/BRepOffset/BRepOffset_MakeOffset.cxx index e18919550c..7da4639d31 100644 --- a/src/BRepOffset/BRepOffset_MakeOffset.cxx +++ b/src/BRepOffset/BRepOffset_MakeOffset.cxx @@ -27,9 +27,7 @@ #include #include #include -#include #include -#include #include #include #include @@ -40,15 +38,9 @@ #include #include #include -#include -#include #include -#include #include #include -#include -#include -#include #include #include #include @@ -67,11 +59,9 @@ #include #include #include -#include #include #include #include -#include #include #include #include @@ -79,7 +69,6 @@ #include #include #include -#include #include #include #include @@ -87,8 +76,6 @@ #include #include #include -#include -#include #include #include #include @@ -100,16 +87,10 @@ #include #include #include -#include -#include -#include #include #include -#include #include -#include #include -#include #include #include #include diff --git a/src/BRepOffset/BRepOffset_MakeOffset.hxx b/src/BRepOffset/BRepOffset_MakeOffset.hxx index dc19d393db..4aaf867151 100644 --- a/src/BRepOffset/BRepOffset_MakeOffset.hxx +++ b/src/BRepOffset/BRepOffset_MakeOffset.hxx @@ -21,13 +21,10 @@ #include #include -#include #include #include #include -#include #include -#include #include #include #include diff --git a/src/BRepOffset/BRepOffset_MakeOffset_1.cxx b/src/BRepOffset/BRepOffset_MakeOffset_1.cxx index dab0aac318..04359001d2 100644 --- a/src/BRepOffset/BRepOffset_MakeOffset_1.cxx +++ b/src/BRepOffset/BRepOffset_MakeOffset_1.cxx @@ -22,7 +22,6 @@ #include #include -#include #include #include @@ -35,18 +34,12 @@ #include -#include -#include - -#include - #include #include #include -#include #include #include #include @@ -61,7 +54,6 @@ #include #include -#include #include #include diff --git a/src/BRepOffset/BRepOffset_MakeSimpleOffset.cxx b/src/BRepOffset/BRepOffset_MakeSimpleOffset.cxx index d3f5ed8cd9..8c8ed3ed03 100644 --- a/src/BRepOffset/BRepOffset_MakeSimpleOffset.cxx +++ b/src/BRepOffset/BRepOffset_MakeSimpleOffset.cxx @@ -41,7 +41,6 @@ #include #include #include -#include //============================================================================= diff --git a/src/BRepOffset/BRepOffset_Offset.cxx b/src/BRepOffset/BRepOffset_Offset.cxx index 449b3452af..b1ecb8c476 100644 --- a/src/BRepOffset/BRepOffset_Offset.cxx +++ b/src/BRepOffset/BRepOffset_Offset.cxx @@ -19,8 +19,6 @@ #include #include #include -#include -#include #include #include #include @@ -47,7 +45,6 @@ #include #include #include -#include #include #include #include @@ -75,7 +72,6 @@ #include #include #include -#include #include #include diff --git a/src/BRepOffset/BRepOffset_SimpleOffset.cxx b/src/BRepOffset/BRepOffset_SimpleOffset.cxx index b8d804f7a7..730241e053 100644 --- a/src/BRepOffset/BRepOffset_SimpleOffset.cxx +++ b/src/BRepOffset/BRepOffset_SimpleOffset.cxx @@ -28,7 +28,6 @@ #include #include #include -#include #include #include #include diff --git a/src/BRepOffset/BRepOffset_SimpleOffset.hxx b/src/BRepOffset/BRepOffset_SimpleOffset.hxx index ea45b2ae1d..a5c46ba99d 100644 --- a/src/BRepOffset/BRepOffset_SimpleOffset.hxx +++ b/src/BRepOffset/BRepOffset_SimpleOffset.hxx @@ -22,7 +22,6 @@ #include #include #include -#include #include #include diff --git a/src/BRepOffset/BRepOffset_Tool.cxx b/src/BRepOffset/BRepOffset_Tool.cxx index 97cc14cd26..a7a1930e24 100644 --- a/src/BRepOffset/BRepOffset_Tool.cxx +++ b/src/BRepOffset/BRepOffset_Tool.cxx @@ -22,38 +22,30 @@ #include #include #include -#include -#include #include -#include #include #include #include #include #include #include -#include #include #include #include -#include #include #include #include #include #include #include -#include #include #include #include #include -#include #include #include #include #include -#include #include #include #include @@ -69,7 +61,6 @@ #include #include #include -#include #include #include #include @@ -97,11 +88,9 @@ #include #include #include -#include #include #include #include -#include #include #include #include @@ -114,7 +103,6 @@ #include #include #include -#include #include #include diff --git a/src/BRepOffset/BRepOffset_Tool.hxx b/src/BRepOffset/BRepOffset_Tool.hxx index 7287d5c773..48334f4268 100644 --- a/src/BRepOffset/BRepOffset_Tool.hxx +++ b/src/BRepOffset/BRepOffset_Tool.hxx @@ -21,7 +21,6 @@ #include #include -#include #include #include #include diff --git a/src/BRepOffsetAPI/BRepOffsetAPI_DraftAngle.cxx b/src/BRepOffsetAPI/BRepOffsetAPI_DraftAngle.cxx index 4e2f73ed37..051cf89694 100644 --- a/src/BRepOffsetAPI/BRepOffsetAPI_DraftAngle.cxx +++ b/src/BRepOffsetAPI/BRepOffsetAPI_DraftAngle.cxx @@ -17,12 +17,10 @@ #include #include -#include #include #include #include #include -#include #include #include #include @@ -37,10 +35,7 @@ #include #include #include -#include -#include #include -#include #include #include #include @@ -50,9 +45,7 @@ #include #include #include -#include #include -#include #include #include diff --git a/src/BRepOffsetAPI/BRepOffsetAPI_DraftAngle.hxx b/src/BRepOffsetAPI/BRepOffsetAPI_DraftAngle.hxx index a74e31b3bb..e3ecd5f825 100644 --- a/src/BRepOffsetAPI/BRepOffsetAPI_DraftAngle.hxx +++ b/src/BRepOffsetAPI/BRepOffsetAPI_DraftAngle.hxx @@ -19,13 +19,9 @@ #include #include -#include #include -#include #include -#include -#include #include #include diff --git a/src/BRepOffsetAPI/BRepOffsetAPI_FindContigousEdges.cxx b/src/BRepOffsetAPI/BRepOffsetAPI_FindContigousEdges.cxx index 9495f84a8e..7434f95acb 100644 --- a/src/BRepOffsetAPI/BRepOffsetAPI_FindContigousEdges.cxx +++ b/src/BRepOffsetAPI/BRepOffsetAPI_FindContigousEdges.cxx @@ -19,7 +19,6 @@ #include #include #include -#include #include //======================================================================= diff --git a/src/BRepOffsetAPI/BRepOffsetAPI_FindContigousEdges.hxx b/src/BRepOffsetAPI/BRepOffsetAPI_FindContigousEdges.hxx index 487fc01afa..6612755ef0 100644 --- a/src/BRepOffsetAPI/BRepOffsetAPI_FindContigousEdges.hxx +++ b/src/BRepOffsetAPI/BRepOffsetAPI_FindContigousEdges.hxx @@ -21,8 +21,6 @@ #include #include -#include -#include #include #include class BRepBuilderAPI_Sewing; diff --git a/src/BRepOffsetAPI/BRepOffsetAPI_MakeDraft.cxx b/src/BRepOffsetAPI/BRepOffsetAPI_MakeDraft.cxx index d1c59133c1..588137c4e2 100644 --- a/src/BRepOffsetAPI/BRepOffsetAPI_MakeDraft.cxx +++ b/src/BRepOffsetAPI/BRepOffsetAPI_MakeDraft.cxx @@ -15,7 +15,6 @@ #include #include #include -#include #include #include #include diff --git a/src/BRepOffsetAPI/BRepOffsetAPI_MakeDraft.hxx b/src/BRepOffsetAPI/BRepOffsetAPI_MakeDraft.hxx index a7865e360e..ad30fdd503 100644 --- a/src/BRepOffsetAPI/BRepOffsetAPI_MakeDraft.hxx +++ b/src/BRepOffsetAPI/BRepOffsetAPI_MakeDraft.hxx @@ -25,7 +25,6 @@ #include #include #include -#include #include class TopoDS_Shape; class gp_Dir; diff --git a/src/BRepOffsetAPI/BRepOffsetAPI_MakeEvolved.cxx b/src/BRepOffsetAPI/BRepOffsetAPI_MakeEvolved.cxx index 0fc1c6763c..0bf9d40fd6 100644 --- a/src/BRepOffsetAPI/BRepOffsetAPI_MakeEvolved.cxx +++ b/src/BRepOffsetAPI/BRepOffsetAPI_MakeEvolved.cxx @@ -16,15 +16,12 @@ #include -#include #include #include -#include #include #include #include #include -#include static const TopTools_ListOfShape anEmptyList; diff --git a/src/BRepOffsetAPI/BRepOffsetAPI_MakeEvolved.hxx b/src/BRepOffsetAPI/BRepOffsetAPI_MakeEvolved.hxx index ae64f39ae4..f108d3b7ac 100644 --- a/src/BRepOffsetAPI/BRepOffsetAPI_MakeEvolved.hxx +++ b/src/BRepOffsetAPI/BRepOffsetAPI_MakeEvolved.hxx @@ -19,14 +19,11 @@ #include #include -#include #include #include #include #include -#include -#include #include class TopoDS_Wire; class TopoDS_Shape; diff --git a/src/BRepOffsetAPI/BRepOffsetAPI_MakeFilling.cxx b/src/BRepOffsetAPI/BRepOffsetAPI_MakeFilling.cxx index 5eb9909159..cd3bed2bff 100644 --- a/src/BRepOffsetAPI/BRepOffsetAPI_MakeFilling.cxx +++ b/src/BRepOffsetAPI/BRepOffsetAPI_MakeFilling.cxx @@ -17,9 +17,6 @@ #include #include -#include -#include -#include #include #include #include diff --git a/src/BRepOffsetAPI/BRepOffsetAPI_MakeFilling.hxx b/src/BRepOffsetAPI/BRepOffsetAPI_MakeFilling.hxx index 8bddfa045c..56947b9b1e 100644 --- a/src/BRepOffsetAPI/BRepOffsetAPI_MakeFilling.hxx +++ b/src/BRepOffsetAPI/BRepOffsetAPI_MakeFilling.hxx @@ -23,7 +23,6 @@ #include #include -#include #include #include #include diff --git a/src/BRepOffsetAPI/BRepOffsetAPI_MakeOffset.cxx b/src/BRepOffsetAPI/BRepOffsetAPI_MakeOffset.cxx index a6b1720535..02b8959bfb 100644 --- a/src/BRepOffsetAPI/BRepOffsetAPI_MakeOffset.cxx +++ b/src/BRepOffsetAPI/BRepOffsetAPI_MakeOffset.cxx @@ -20,8 +20,6 @@ #include #include #include -#include -#include #include #include #include @@ -37,7 +35,6 @@ #include #include #include -#include #ifdef OCCT_DEBUG #include diff --git a/src/BRepOffsetAPI/BRepOffsetAPI_MakeOffset.hxx b/src/BRepOffsetAPI/BRepOffsetAPI_MakeOffset.hxx index cc45358ff1..0a09eb5693 100644 --- a/src/BRepOffsetAPI/BRepOffsetAPI_MakeOffset.hxx +++ b/src/BRepOffsetAPI/BRepOffsetAPI_MakeOffset.hxx @@ -19,15 +19,11 @@ #include #include -#include -#include -#include #include #include #include #include -#include class TopoDS_Wire; class TopoDS_Shape; diff --git a/src/BRepOffsetAPI/BRepOffsetAPI_MakeOffsetShape.cxx b/src/BRepOffsetAPI/BRepOffsetAPI_MakeOffsetShape.cxx index f6a5ff0a13..67d0ba3bf7 100644 --- a/src/BRepOffsetAPI/BRepOffsetAPI_MakeOffsetShape.cxx +++ b/src/BRepOffsetAPI/BRepOffsetAPI_MakeOffsetShape.cxx @@ -14,11 +14,8 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -#include #include -#include #include -#include //======================================================================= //function : BRepOffsetAPI_MakeOffsetShape diff --git a/src/BRepOffsetAPI/BRepOffsetAPI_MakeOffsetShape.hxx b/src/BRepOffsetAPI/BRepOffsetAPI_MakeOffsetShape.hxx index 231fc0444e..acb40eb6f1 100644 --- a/src/BRepOffsetAPI/BRepOffsetAPI_MakeOffsetShape.hxx +++ b/src/BRepOffsetAPI/BRepOffsetAPI_MakeOffsetShape.hxx @@ -24,9 +24,7 @@ #include #include #include -#include #include -#include #include #include class TopoDS_Shape; diff --git a/src/BRepOffsetAPI/BRepOffsetAPI_MakePipe.cxx b/src/BRepOffsetAPI/BRepOffsetAPI_MakePipe.cxx index 3d3f80fe6e..eca836ba18 100644 --- a/src/BRepOffsetAPI/BRepOffsetAPI_MakePipe.cxx +++ b/src/BRepOffsetAPI/BRepOffsetAPI_MakePipe.cxx @@ -15,16 +15,13 @@ // commercial license or contractual agreement. -#include #include #include #include -#include #include #include #include #include -#include #include #include diff --git a/src/BRepOffsetAPI/BRepOffsetAPI_MakePipe.hxx b/src/BRepOffsetAPI/BRepOffsetAPI_MakePipe.hxx index 22f58e90ec..e65918546e 100644 --- a/src/BRepOffsetAPI/BRepOffsetAPI_MakePipe.hxx +++ b/src/BRepOffsetAPI/BRepOffsetAPI_MakePipe.hxx @@ -24,8 +24,6 @@ #include #include #include -#include -#include class TopoDS_Wire; class TopoDS_Shape; diff --git a/src/BRepOffsetAPI/BRepOffsetAPI_MakePipeShell.cxx b/src/BRepOffsetAPI/BRepOffsetAPI_MakePipeShell.cxx index b222a52b04..2f2b4b6fe5 100644 --- a/src/BRepOffsetAPI/BRepOffsetAPI_MakePipeShell.cxx +++ b/src/BRepOffsetAPI/BRepOffsetAPI_MakePipeShell.cxx @@ -21,8 +21,6 @@ #include #include #include -#include -#include #include #include #include diff --git a/src/BRepOffsetAPI/BRepOffsetAPI_MakePipeShell.hxx b/src/BRepOffsetAPI/BRepOffsetAPI_MakePipeShell.hxx index 4cde357186..4533640e4b 100644 --- a/src/BRepOffsetAPI/BRepOffsetAPI_MakePipeShell.hxx +++ b/src/BRepOffsetAPI/BRepOffsetAPI_MakePipeShell.hxx @@ -22,11 +22,9 @@ #include #include -#include #include #include #include -#include #include #include #include diff --git a/src/BRepOffsetAPI/BRepOffsetAPI_MakeThickSolid.cxx b/src/BRepOffsetAPI/BRepOffsetAPI_MakeThickSolid.cxx index 5238dd920d..bf8547da4f 100644 --- a/src/BRepOffsetAPI/BRepOffsetAPI_MakeThickSolid.cxx +++ b/src/BRepOffsetAPI/BRepOffsetAPI_MakeThickSolid.cxx @@ -15,12 +15,9 @@ // commercial license or contractual agreement. -#include #include -#include #include #include -#include //======================================================================= diff --git a/src/BRepOffsetAPI/BRepOffsetAPI_MakeThickSolid.hxx b/src/BRepOffsetAPI/BRepOffsetAPI_MakeThickSolid.hxx index 245f7bdf7e..850d9b81f1 100644 --- a/src/BRepOffsetAPI/BRepOffsetAPI_MakeThickSolid.hxx +++ b/src/BRepOffsetAPI/BRepOffsetAPI_MakeThickSolid.hxx @@ -23,7 +23,6 @@ #include #include -#include #include #include #include diff --git a/src/BRepOffsetAPI/BRepOffsetAPI_MiddlePath.cxx b/src/BRepOffsetAPI/BRepOffsetAPI_MiddlePath.cxx index 67bce0849c..25d8297b72 100644 --- a/src/BRepOffsetAPI/BRepOffsetAPI_MiddlePath.cxx +++ b/src/BRepOffsetAPI/BRepOffsetAPI_MiddlePath.cxx @@ -32,7 +32,6 @@ #include #include #include -#include #include #include #include @@ -57,8 +56,6 @@ #include #include #include -#include -#include #include static Standard_Boolean IsLinear(const TopoDS_Edge& anEdge, diff --git a/src/BRepOffsetAPI/BRepOffsetAPI_MiddlePath.hxx b/src/BRepOffsetAPI/BRepOffsetAPI_MiddlePath.hxx index 5d9be2a4f8..8a00f578f9 100644 --- a/src/BRepOffsetAPI/BRepOffsetAPI_MiddlePath.hxx +++ b/src/BRepOffsetAPI/BRepOffsetAPI_MiddlePath.hxx @@ -18,11 +18,9 @@ #include #include -#include #include #include -#include #include #include #include diff --git a/src/BRepOffsetAPI/BRepOffsetAPI_NormalProjection.cxx b/src/BRepOffsetAPI/BRepOffsetAPI_NormalProjection.cxx index 6d0be92578..b8468212b9 100644 --- a/src/BRepOffsetAPI/BRepOffsetAPI_NormalProjection.cxx +++ b/src/BRepOffsetAPI/BRepOffsetAPI_NormalProjection.cxx @@ -16,10 +16,6 @@ #include -#include -#include -#include -#include #include BRepOffsetAPI_NormalProjection::BRepOffsetAPI_NormalProjection() diff --git a/src/BRepOffsetAPI/BRepOffsetAPI_NormalProjection.hxx b/src/BRepOffsetAPI/BRepOffsetAPI_NormalProjection.hxx index 09a56d0cb7..48e81ad93f 100644 --- a/src/BRepOffsetAPI/BRepOffsetAPI_NormalProjection.hxx +++ b/src/BRepOffsetAPI/BRepOffsetAPI_NormalProjection.hxx @@ -23,10 +23,7 @@ #include #include -#include #include -#include -#include #include class TopoDS_Shape; class TopoDS_Edge; diff --git a/src/BRepOffsetAPI/BRepOffsetAPI_ThruSections.cxx b/src/BRepOffsetAPI/BRepOffsetAPI_ThruSections.cxx index 5129308edf..c931227136 100644 --- a/src/BRepOffsetAPI/BRepOffsetAPI_ThruSections.cxx +++ b/src/BRepOffsetAPI/BRepOffsetAPI_ThruSections.cxx @@ -56,7 +56,6 @@ #include #include #include -#include #include #include #include @@ -76,7 +75,6 @@ #include #include #include -#include #include #include #include @@ -91,7 +89,6 @@ #include #include #include -#include #include //======================================================================= diff --git a/src/BRepOffsetAPI/BRepOffsetAPI_ThruSections.hxx b/src/BRepOffsetAPI/BRepOffsetAPI_ThruSections.hxx index dbe90ba5ee..a69dc022b4 100644 --- a/src/BRepOffsetAPI/BRepOffsetAPI_ThruSections.hxx +++ b/src/BRepOffsetAPI/BRepOffsetAPI_ThruSections.hxx @@ -22,8 +22,6 @@ #include #include -#include -#include #include #include #include diff --git a/src/BRepPreviewAPI/BRepPreviewAPI_MakeBox.cxx b/src/BRepPreviewAPI/BRepPreviewAPI_MakeBox.cxx index 6cd21578fb..f30f355a31 100644 --- a/src/BRepPreviewAPI/BRepPreviewAPI_MakeBox.cxx +++ b/src/BRepPreviewAPI/BRepPreviewAPI_MakeBox.cxx @@ -15,14 +15,11 @@ #include -#include #include #include #include #include -#include - //======================================================================= //function : Build //purpose : diff --git a/src/BRepPrim/BRepPrim_Builder.cxx b/src/BRepPrim/BRepPrim_Builder.cxx index 59ae5f9459..4fe5053d43 100644 --- a/src/BRepPrim/BRepPrim_Builder.cxx +++ b/src/BRepPrim/BRepPrim_Builder.cxx @@ -25,7 +25,6 @@ #include #include #include -#include #include #include #include diff --git a/src/BRepPrim/BRepPrim_Builder.hxx b/src/BRepPrim/BRepPrim_Builder.hxx index 20ce195b3e..79dce65adb 100644 --- a/src/BRepPrim/BRepPrim_Builder.hxx +++ b/src/BRepPrim/BRepPrim_Builder.hxx @@ -19,11 +19,8 @@ #include #include -#include #include -#include -#include class TopoDS_Shell; class TopoDS_Face; class gp_Pln; diff --git a/src/BRepPrim/BRepPrim_Cone.hxx b/src/BRepPrim/BRepPrim_Cone.hxx index f2bcc30ae8..ef1270d2f2 100644 --- a/src/BRepPrim/BRepPrim_Cone.hxx +++ b/src/BRepPrim/BRepPrim_Cone.hxx @@ -21,7 +21,6 @@ #include #include -#include #include class gp_Ax2; class gp_Pnt; diff --git a/src/BRepPrim/BRepPrim_Cylinder.cxx b/src/BRepPrim/BRepPrim_Cylinder.cxx index b49e89e241..fabb6ad333 100644 --- a/src/BRepPrim/BRepPrim_Cylinder.cxx +++ b/src/BRepPrim/BRepPrim_Cylinder.cxx @@ -24,7 +24,6 @@ #include #include #include -#include #include //======================================================================= diff --git a/src/BRepPrim/BRepPrim_Cylinder.hxx b/src/BRepPrim/BRepPrim_Cylinder.hxx index 1b53715953..87f34da134 100644 --- a/src/BRepPrim/BRepPrim_Cylinder.hxx +++ b/src/BRepPrim/BRepPrim_Cylinder.hxx @@ -21,7 +21,6 @@ #include #include -#include #include class gp_Ax2; class gp_Pnt; diff --git a/src/BRepPrim/BRepPrim_FaceBuilder.hxx b/src/BRepPrim/BRepPrim_FaceBuilder.hxx index a59082d3f0..612e2aeaad 100644 --- a/src/BRepPrim/BRepPrim_FaceBuilder.hxx +++ b/src/BRepPrim/BRepPrim_FaceBuilder.hxx @@ -24,7 +24,6 @@ #include #include #include -#include #include class BRep_Builder; class Geom_Surface; diff --git a/src/BRepPrim/BRepPrim_GWedge.cxx b/src/BRepPrim/BRepPrim_GWedge.cxx index b0eba6c7a6..c8343464ae 100644 --- a/src/BRepPrim/BRepPrim_GWedge.cxx +++ b/src/BRepPrim/BRepPrim_GWedge.cxx @@ -15,8 +15,6 @@ // commercial license or contractual agreement. -#include -#include #include #include #include @@ -27,12 +25,9 @@ #include #include #include -#include #include -#include #include #include -#include #define NBFACES 6 #define NBWIRES 6 diff --git a/src/BRepPrim/BRepPrim_GWedge.hxx b/src/BRepPrim/BRepPrim_GWedge.hxx index 58dc5e54d1..854f147004 100644 --- a/src/BRepPrim/BRepPrim_GWedge.hxx +++ b/src/BRepPrim/BRepPrim_GWedge.hxx @@ -23,7 +23,6 @@ #include #include -#include #include #include #include diff --git a/src/BRepPrim/BRepPrim_OneAxis.cxx b/src/BRepPrim/BRepPrim_OneAxis.cxx index 3cd65c3ee1..f3a1e71add 100644 --- a/src/BRepPrim/BRepPrim_OneAxis.cxx +++ b/src/BRepPrim/BRepPrim_OneAxis.cxx @@ -16,24 +16,20 @@ #include -#include #include #include #include #include -#include #include #include #include #include #include #include -#include #include #include #include #include -#include #define NBVERTICES 6 #define VAXISTOP 0 diff --git a/src/BRepPrim/BRepPrim_OneAxis.hxx b/src/BRepPrim/BRepPrim_OneAxis.hxx index 9cb99a347b..ea07e580a1 100644 --- a/src/BRepPrim/BRepPrim_OneAxis.hxx +++ b/src/BRepPrim/BRepPrim_OneAxis.hxx @@ -19,13 +19,10 @@ #include #include -#include #include #include -#include #include -#include #include #include #include diff --git a/src/BRepPrim/BRepPrim_Sphere.cxx b/src/BRepPrim/BRepPrim_Sphere.cxx index de802b37bb..eec0b5141e 100644 --- a/src/BRepPrim/BRepPrim_Sphere.cxx +++ b/src/BRepPrim/BRepPrim_Sphere.cxx @@ -24,7 +24,6 @@ #include #include #include -#include #include // parameters on the meridian diff --git a/src/BRepPrim/BRepPrim_Sphere.hxx b/src/BRepPrim/BRepPrim_Sphere.hxx index 15aa5a9126..3b11fa624a 100644 --- a/src/BRepPrim/BRepPrim_Sphere.hxx +++ b/src/BRepPrim/BRepPrim_Sphere.hxx @@ -21,7 +21,6 @@ #include #include -#include #include class gp_Pnt; class gp_Ax2; diff --git a/src/BRepPrim/BRepPrim_Torus.cxx b/src/BRepPrim/BRepPrim_Torus.cxx index 52dd97c805..49aaeb32e1 100644 --- a/src/BRepPrim/BRepPrim_Torus.cxx +++ b/src/BRepPrim/BRepPrim_Torus.cxx @@ -25,7 +25,6 @@ #include #include #include -#include #include //======================================================================= diff --git a/src/BRepPrim/BRepPrim_Torus.hxx b/src/BRepPrim/BRepPrim_Torus.hxx index 8b2910b695..c040556ec6 100644 --- a/src/BRepPrim/BRepPrim_Torus.hxx +++ b/src/BRepPrim/BRepPrim_Torus.hxx @@ -21,7 +21,6 @@ #include #include -#include #include class gp_Ax2; class gp_Pnt; diff --git a/src/BRepPrim/BRepPrim_Wedge.cxx b/src/BRepPrim/BRepPrim_Wedge.cxx index 3416bd01d8..610b4b69ee 100644 --- a/src/BRepPrim/BRepPrim_Wedge.cxx +++ b/src/BRepPrim/BRepPrim_Wedge.cxx @@ -17,7 +17,6 @@ #include #include -#include //======================================================================= //function : BRepPrim_Wedge diff --git a/src/BRepPrim/BRepPrim_Wedge.hxx b/src/BRepPrim/BRepPrim_Wedge.hxx index bdd822b465..eee8e810d8 100644 --- a/src/BRepPrim/BRepPrim_Wedge.hxx +++ b/src/BRepPrim/BRepPrim_Wedge.hxx @@ -22,7 +22,6 @@ #include #include -#include class gp_Ax2; diff --git a/src/BRepPrimAPI/BRepPrimAPI_MakeBox.cxx b/src/BRepPrimAPI/BRepPrimAPI_MakeBox.cxx index 52cda67cc8..8b20ae7bb7 100644 --- a/src/BRepPrimAPI/BRepPrimAPI_MakeBox.cxx +++ b/src/BRepPrimAPI/BRepPrimAPI_MakeBox.cxx @@ -16,16 +16,10 @@ #include -#include -#include #include #include #include -#include -#include -#include #include -#include #include #include diff --git a/src/BRepPrimAPI/BRepPrimAPI_MakeBox.hxx b/src/BRepPrimAPI/BRepPrimAPI_MakeBox.hxx index 4e9061d512..c677bb32bd 100644 --- a/src/BRepPrimAPI/BRepPrimAPI_MakeBox.hxx +++ b/src/BRepPrimAPI/BRepPrimAPI_MakeBox.hxx @@ -19,11 +19,9 @@ #include #include -#include #include #include -#include class gp_Pnt; class gp_Ax2; class TopoDS_Shell; diff --git a/src/BRepPrimAPI/BRepPrimAPI_MakeCone.cxx b/src/BRepPrimAPI/BRepPrimAPI_MakeCone.cxx index 728bf46885..9228e10aae 100644 --- a/src/BRepPrimAPI/BRepPrimAPI_MakeCone.cxx +++ b/src/BRepPrimAPI/BRepPrimAPI_MakeCone.cxx @@ -15,13 +15,9 @@ // commercial license or contractual agreement. -#include -#include #include #include #include -#include -#include //======================================================================= //function : BRepPrimAPI_MakeCone diff --git a/src/BRepPrimAPI/BRepPrimAPI_MakeCone.hxx b/src/BRepPrimAPI/BRepPrimAPI_MakeCone.hxx index 0b9da1eca7..c57b67013b 100644 --- a/src/BRepPrimAPI/BRepPrimAPI_MakeCone.hxx +++ b/src/BRepPrimAPI/BRepPrimAPI_MakeCone.hxx @@ -23,8 +23,6 @@ #include #include -#include -#include class gp_Ax2; diff --git a/src/BRepPrimAPI/BRepPrimAPI_MakeCylinder.cxx b/src/BRepPrimAPI/BRepPrimAPI_MakeCylinder.cxx index e68e23d72b..3b6a2e4a4b 100644 --- a/src/BRepPrimAPI/BRepPrimAPI_MakeCylinder.cxx +++ b/src/BRepPrimAPI/BRepPrimAPI_MakeCylinder.cxx @@ -15,13 +15,9 @@ // commercial license or contractual agreement. -#include -#include #include #include #include -#include -#include //======================================================================= //function : BRepPrimAPI_MakeCylinder diff --git a/src/BRepPrimAPI/BRepPrimAPI_MakeCylinder.hxx b/src/BRepPrimAPI/BRepPrimAPI_MakeCylinder.hxx index 316fea7a37..ccaaff210a 100644 --- a/src/BRepPrimAPI/BRepPrimAPI_MakeCylinder.hxx +++ b/src/BRepPrimAPI/BRepPrimAPI_MakeCylinder.hxx @@ -23,8 +23,6 @@ #include #include -#include -#include class gp_Ax2; diff --git a/src/BRepPrimAPI/BRepPrimAPI_MakeHalfSpace.hxx b/src/BRepPrimAPI/BRepPrimAPI_MakeHalfSpace.hxx index c4ab4ba7f0..c7df3c9ab6 100644 --- a/src/BRepPrimAPI/BRepPrimAPI_MakeHalfSpace.hxx +++ b/src/BRepPrimAPI/BRepPrimAPI_MakeHalfSpace.hxx @@ -19,7 +19,6 @@ #include #include -#include #include #include diff --git a/src/BRepPrimAPI/BRepPrimAPI_MakeOneAxis.cxx b/src/BRepPrimAPI/BRepPrimAPI_MakeOneAxis.cxx index dc9d9fefe4..51a0b76859 100644 --- a/src/BRepPrimAPI/BRepPrimAPI_MakeOneAxis.cxx +++ b/src/BRepPrimAPI/BRepPrimAPI_MakeOneAxis.cxx @@ -15,10 +15,8 @@ // commercial license or contractual agreement. -#include #include #include -#include #include #include #include diff --git a/src/BRepPrimAPI/BRepPrimAPI_MakeOneAxis.hxx b/src/BRepPrimAPI/BRepPrimAPI_MakeOneAxis.hxx index ce4eb1b293..38e703e1b8 100644 --- a/src/BRepPrimAPI/BRepPrimAPI_MakeOneAxis.hxx +++ b/src/BRepPrimAPI/BRepPrimAPI_MakeOneAxis.hxx @@ -19,10 +19,8 @@ #include #include -#include #include -#include class TopoDS_Face; class TopoDS_Shell; class TopoDS_Solid; diff --git a/src/BRepPrimAPI/BRepPrimAPI_MakePrism.hxx b/src/BRepPrimAPI/BRepPrimAPI_MakePrism.hxx index 7d7550cbd3..81910b59f7 100644 --- a/src/BRepPrimAPI/BRepPrimAPI_MakePrism.hxx +++ b/src/BRepPrimAPI/BRepPrimAPI_MakePrism.hxx @@ -19,11 +19,9 @@ #include #include -#include #include #include -#include #include class TopoDS_Shape; class gp_Vec; diff --git a/src/BRepPrimAPI/BRepPrimAPI_MakeRevol.cxx b/src/BRepPrimAPI/BRepPrimAPI_MakeRevol.cxx index b8e61e9b06..8385f5aa13 100644 --- a/src/BRepPrimAPI/BRepPrimAPI_MakeRevol.cxx +++ b/src/BRepPrimAPI/BRepPrimAPI_MakeRevol.cxx @@ -22,8 +22,6 @@ #include #include #include -#include -#include #include #include #include diff --git a/src/BRepPrimAPI/BRepPrimAPI_MakeRevol.hxx b/src/BRepPrimAPI/BRepPrimAPI_MakeRevol.hxx index 82df13808f..d685b76714 100644 --- a/src/BRepPrimAPI/BRepPrimAPI_MakeRevol.hxx +++ b/src/BRepPrimAPI/BRepPrimAPI_MakeRevol.hxx @@ -25,8 +25,6 @@ #include #include #include -#include -#include class TopoDS_Shape; class gp_Ax1; diff --git a/src/BRepPrimAPI/BRepPrimAPI_MakeRevolution.cxx b/src/BRepPrimAPI/BRepPrimAPI_MakeRevolution.cxx index 6594565734..5c5efecb45 100644 --- a/src/BRepPrimAPI/BRepPrimAPI_MakeRevolution.cxx +++ b/src/BRepPrimAPI/BRepPrimAPI_MakeRevolution.cxx @@ -23,7 +23,6 @@ #include #include #include -#include //======================================================================= //function : Project diff --git a/src/BRepPrimAPI/BRepPrimAPI_MakeRevolution.hxx b/src/BRepPrimAPI/BRepPrimAPI_MakeRevolution.hxx index bc2a048ede..3a3f1c0293 100644 --- a/src/BRepPrimAPI/BRepPrimAPI_MakeRevolution.hxx +++ b/src/BRepPrimAPI/BRepPrimAPI_MakeRevolution.hxx @@ -23,7 +23,6 @@ #include #include -#include #include class Geom_Curve; class gp_Ax2; diff --git a/src/BRepPrimAPI/BRepPrimAPI_MakeSphere.cxx b/src/BRepPrimAPI/BRepPrimAPI_MakeSphere.cxx index d302518252..dbf2fda517 100644 --- a/src/BRepPrimAPI/BRepPrimAPI_MakeSphere.cxx +++ b/src/BRepPrimAPI/BRepPrimAPI_MakeSphere.cxx @@ -16,13 +16,11 @@ #include -#include #include #include #include #include #include -#include //======================================================================= //function : BRepPrimAPI_MakeSphere diff --git a/src/BRepPrimAPI/BRepPrimAPI_MakeSphere.hxx b/src/BRepPrimAPI/BRepPrimAPI_MakeSphere.hxx index f8dfcc2bfe..2542f2c907 100644 --- a/src/BRepPrimAPI/BRepPrimAPI_MakeSphere.hxx +++ b/src/BRepPrimAPI/BRepPrimAPI_MakeSphere.hxx @@ -19,12 +19,9 @@ #include #include -#include #include #include -#include -#include class gp_Pnt; class gp_Ax2; diff --git a/src/BRepPrimAPI/BRepPrimAPI_MakeSweep.hxx b/src/BRepPrimAPI/BRepPrimAPI_MakeSweep.hxx index a1f6559d23..f05da8aca9 100644 --- a/src/BRepPrimAPI/BRepPrimAPI_MakeSweep.hxx +++ b/src/BRepPrimAPI/BRepPrimAPI_MakeSweep.hxx @@ -19,7 +19,6 @@ #include #include -#include #include class TopoDS_Shape; diff --git a/src/BRepPrimAPI/BRepPrimAPI_MakeTorus.cxx b/src/BRepPrimAPI/BRepPrimAPI_MakeTorus.cxx index ce577d5369..69a5b3aed2 100644 --- a/src/BRepPrimAPI/BRepPrimAPI_MakeTorus.cxx +++ b/src/BRepPrimAPI/BRepPrimAPI_MakeTorus.cxx @@ -15,11 +15,8 @@ // commercial license or contractual agreement. -#include -#include #include #include -#include //======================================================================= //function : BRepPrimAPI_MakeTorus diff --git a/src/BRepPrimAPI/BRepPrimAPI_MakeTorus.hxx b/src/BRepPrimAPI/BRepPrimAPI_MakeTorus.hxx index c229971812..820733aaac 100644 --- a/src/BRepPrimAPI/BRepPrimAPI_MakeTorus.hxx +++ b/src/BRepPrimAPI/BRepPrimAPI_MakeTorus.hxx @@ -23,8 +23,6 @@ #include #include -#include -#include class gp_Ax2; diff --git a/src/BRepPrimAPI/BRepPrimAPI_MakeWedge.cxx b/src/BRepPrimAPI/BRepPrimAPI_MakeWedge.cxx index d98e4d25d8..2d83a23cef 100644 --- a/src/BRepPrimAPI/BRepPrimAPI_MakeWedge.cxx +++ b/src/BRepPrimAPI/BRepPrimAPI_MakeWedge.cxx @@ -15,11 +15,8 @@ // commercial license or contractual agreement. -#include #include #include -#include -#include #include #include #include diff --git a/src/BRepPrimAPI/BRepPrimAPI_MakeWedge.hxx b/src/BRepPrimAPI/BRepPrimAPI_MakeWedge.hxx index ea643c0e41..cb0707eb9c 100644 --- a/src/BRepPrimAPI/BRepPrimAPI_MakeWedge.hxx +++ b/src/BRepPrimAPI/BRepPrimAPI_MakeWedge.hxx @@ -23,7 +23,6 @@ #include #include -#include class gp_Ax2; class TopoDS_Shell; class TopoDS_Solid; diff --git a/src/BRepProj/BRepProj_Projection.cxx b/src/BRepProj/BRepProj_Projection.cxx index a448b9300d..d0a3a64bb7 100644 --- a/src/BRepProj/BRepProj_Projection.cxx +++ b/src/BRepProj/BRepProj_Projection.cxx @@ -14,12 +14,9 @@ #include -#include -#include #include #include #include -#include #include #include #include @@ -33,15 +30,10 @@ #include #include #include -#include #include -#include #include -#include #include #include -#include -#include //======================================================================= //function : DistanceOut diff --git a/src/BRepProj/BRepProj_Projection.hxx b/src/BRepProj/BRepProj_Projection.hxx index 1732247227..a224b5f7ac 100644 --- a/src/BRepProj/BRepProj_Projection.hxx +++ b/src/BRepProj/BRepProj_Projection.hxx @@ -21,7 +21,6 @@ #include #include -#include #include #include #include diff --git a/src/BRepSweep/BRepSweep_Builder.cxx b/src/BRepSweep/BRepSweep_Builder.cxx index 70a4e50381..989d6cdd65 100644 --- a/src/BRepSweep/BRepSweep_Builder.cxx +++ b/src/BRepSweep/BRepSweep_Builder.cxx @@ -15,7 +15,6 @@ // commercial license or contractual agreement. -#include #include #include #include diff --git a/src/BRepSweep/BRepSweep_Iterator.cxx b/src/BRepSweep/BRepSweep_Iterator.cxx index 32fc4382f0..c0f0d96f2c 100644 --- a/src/BRepSweep/BRepSweep_Iterator.cxx +++ b/src/BRepSweep/BRepSweep_Iterator.cxx @@ -16,8 +16,6 @@ #include -#include -#include #include //======================================================================= diff --git a/src/BRepSweep/BRepSweep_NumLinearRegularSweep.cxx b/src/BRepSweep/BRepSweep_NumLinearRegularSweep.cxx index a91c49a978..590d80fd11 100644 --- a/src/BRepSweep/BRepSweep_NumLinearRegularSweep.cxx +++ b/src/BRepSweep/BRepSweep_NumLinearRegularSweep.cxx @@ -15,14 +15,11 @@ // commercial license or contractual agreement. -#include #include #include #include -#include #include #include -#include #include #include #include @@ -30,7 +27,6 @@ #include #include #include -#include //======================================================================= //function : BRepSweep_NumLinearRegularSweep diff --git a/src/BRepSweep/BRepSweep_NumLinearRegularSweep.hxx b/src/BRepSweep/BRepSweep_NumLinearRegularSweep.hxx index b105441f9b..86a2a1206e 100644 --- a/src/BRepSweep/BRepSweep_NumLinearRegularSweep.hxx +++ b/src/BRepSweep/BRepSweep_NumLinearRegularSweep.hxx @@ -19,17 +19,14 @@ #include #include -#include #include #include -#include #include #include #include #include #include -#include //! This a generic class is used to build Sweept diff --git a/src/BRepSweep/BRepSweep_Revol.hxx b/src/BRepSweep/BRepSweep_Revol.hxx index 043623bdbe..001dada271 100644 --- a/src/BRepSweep/BRepSweep_Revol.hxx +++ b/src/BRepSweep/BRepSweep_Revol.hxx @@ -23,7 +23,6 @@ #include #include -#include class TopoDS_Shape; class gp_Ax1; class Sweep_NumShape; diff --git a/src/BRepSweep/BRepSweep_Rotation.cxx b/src/BRepSweep/BRepSweep_Rotation.cxx index 2a468000a6..679b850ff7 100644 --- a/src/BRepSweep/BRepSweep_Rotation.cxx +++ b/src/BRepSweep/BRepSweep_Rotation.cxx @@ -45,7 +45,6 @@ #include #include #include -#include #include #include #include diff --git a/src/BRepSweep/BRepSweep_Rotation.hxx b/src/BRepSweep/BRepSweep_Rotation.hxx index 0e157e03aa..fe162223b9 100644 --- a/src/BRepSweep/BRepSweep_Rotation.hxx +++ b/src/BRepSweep/BRepSweep_Rotation.hxx @@ -21,7 +21,6 @@ #include #include -#include #include #include #include diff --git a/src/BRepSweep/BRepSweep_Tool.cxx b/src/BRepSweep/BRepSweep_Tool.cxx index 534e6b0f9a..5cd34b8af1 100644 --- a/src/BRepSweep/BRepSweep_Tool.cxx +++ b/src/BRepSweep/BRepSweep_Tool.cxx @@ -16,7 +16,6 @@ #include -#include #include #include diff --git a/src/BRepSweep/BRepSweep_Tool.hxx b/src/BRepSweep/BRepSweep_Tool.hxx index da74db3ad7..8e2de58612 100644 --- a/src/BRepSweep/BRepSweep_Tool.hxx +++ b/src/BRepSweep/BRepSweep_Tool.hxx @@ -22,7 +22,6 @@ #include #include -#include #include #include class TopoDS_Shape; diff --git a/src/BRepSweep/BRepSweep_Translation.cxx b/src/BRepSweep/BRepSweep_Translation.cxx index 4bb9d92723..388f7a2b71 100644 --- a/src/BRepSweep/BRepSweep_Translation.cxx +++ b/src/BRepSweep/BRepSweep_Translation.cxx @@ -17,14 +17,11 @@ #include #include -#include -#include #include #include #include #include #include -#include #include #include #include @@ -35,7 +32,6 @@ #include #include #include -#include #include #include #include diff --git a/src/BRepSweep/BRepSweep_Trsf.cxx b/src/BRepSweep/BRepSweep_Trsf.cxx index 3b0b3b9bfc..b1649a7dd9 100644 --- a/src/BRepSweep/BRepSweep_Trsf.cxx +++ b/src/BRepSweep/BRepSweep_Trsf.cxx @@ -15,7 +15,6 @@ // commercial license or contractual agreement. -#include #include #include #include diff --git a/src/BRepSweep/BRepSweep_Trsf.hxx b/src/BRepSweep/BRepSweep_Trsf.hxx index 4d40d07650..dcb80b3f62 100644 --- a/src/BRepSweep/BRepSweep_Trsf.hxx +++ b/src/BRepSweep/BRepSweep_Trsf.hxx @@ -19,10 +19,8 @@ #include #include -#include #include -#include #include #include class BRep_Builder; diff --git a/src/BRepTest/BRepTest_BasicCommands.cxx b/src/BRepTest/BRepTest_BasicCommands.cxx index 89574e3008..216dc8ccf4 100644 --- a/src/BRepTest/BRepTest_BasicCommands.cxx +++ b/src/BRepTest/BRepTest_BasicCommands.cxx @@ -33,9 +33,9 @@ #include #include #include +#include #include #include -#include #include #include #include @@ -45,13 +45,11 @@ #include #include -#include #include #include #include #include -#include #include #include #include @@ -60,8 +58,6 @@ #include #include -#include - Standard_IMPORT Draw_Viewer dout; //======================================================================= @@ -850,7 +846,6 @@ static Standard_Integer IsBoxesInterfered(Draw_Interpretor& theDI, //function : gbounding //purpose : //======================================================================= -#include #include #include #include @@ -989,7 +984,6 @@ static Standard_Integer precision(Draw_Interpretor& di,Standard_Integer n,const //purpose : //======================================================================= #include -#include static Standard_Integer reperageshape(Draw_Interpretor& di, Standard_Integer narg , const char** a) { diff --git a/src/BRepTest/BRepTest_ChamferCommands.cxx b/src/BRepTest/BRepTest_ChamferCommands.cxx index 63a3c2a2e2..4e2961c5a2 100644 --- a/src/BRepTest/BRepTest_ChamferCommands.cxx +++ b/src/BRepTest/BRepTest_ChamferCommands.cxx @@ -23,7 +23,6 @@ #include #include #include -#include #include #include diff --git a/src/BRepTest/BRepTest_CheckCommands.cxx b/src/BRepTest/BRepTest_CheckCommands.cxx index 35b1c10a5c..be90986d70 100644 --- a/src/BRepTest/BRepTest_CheckCommands.cxx +++ b/src/BRepTest/BRepTest_CheckCommands.cxx @@ -19,15 +19,9 @@ #include #include #include -#include #include -#include -#include -#include #include -#include #include -#include #include #include #include @@ -35,27 +29,20 @@ #include #include #include -#include -#include -#include #include #include #include -#include #include #include #include #include #include -#include #include #include #include -#include #include #include #include -#include #include //#include diff --git a/src/BRepTest/BRepTest_CurveCommands.cxx b/src/BRepTest/BRepTest_CurveCommands.cxx index 3039254739..37e39897d8 100644 --- a/src/BRepTest/BRepTest_CurveCommands.cxx +++ b/src/BRepTest/BRepTest_CurveCommands.cxx @@ -17,13 +17,8 @@ #include #include #include -#include -#include #include #include -#include -#include -#include #include #include #include @@ -56,7 +51,6 @@ #include #include #include -#include #include #include diff --git a/src/BRepTest/BRepTest_DrawableHistory.hxx b/src/BRepTest/BRepTest_DrawableHistory.hxx index e5d0ebe000..c6ee8ca1f6 100644 --- a/src/BRepTest/BRepTest_DrawableHistory.hxx +++ b/src/BRepTest/BRepTest_DrawableHistory.hxx @@ -17,7 +17,6 @@ #define _BRepTest_DrawableHistory_HeaderFile #include -#include #include diff --git a/src/BRepTest/BRepTest_ExtremaCommands.cxx b/src/BRepTest/BRepTest_ExtremaCommands.cxx index 3be19ae908..ee9d0f4f7d 100644 --- a/src/BRepTest/BRepTest_ExtremaCommands.cxx +++ b/src/BRepTest/BRepTest_ExtremaCommands.cxx @@ -20,7 +20,6 @@ #include #include #include -#include #include #include #include @@ -30,7 +29,6 @@ #include #include #include -#include #include #include diff --git a/src/BRepTest/BRepTest_FeatureCommands.cxx b/src/BRepTest/BRepTest_FeatureCommands.cxx index c3ebfcc734..8b69ec1ba2 100644 --- a/src/BRepTest/BRepTest_FeatureCommands.cxx +++ b/src/BRepTest/BRepTest_FeatureCommands.cxx @@ -19,27 +19,13 @@ #include #include -#include -#include -#include -#include #include -#include -#include -#include -#include -#include -#include #include #include #include -#include -#include -#include //#include -#include #include #include #include @@ -57,7 +43,6 @@ #include #include -#include #include #include #include diff --git a/src/BRepTest/BRepTest_FilletCommands.cxx b/src/BRepTest/BRepTest_FilletCommands.cxx index 281f58e566..b4ef1ea156 100644 --- a/src/BRepTest/BRepTest_FilletCommands.cxx +++ b/src/BRepTest/BRepTest_FilletCommands.cxx @@ -16,26 +16,21 @@ #include #include -#include #include #include #include #include #include #include -#include #include #include #include #include -#include #include -#include #include #include -#include #include #include #include @@ -43,13 +38,9 @@ #include #include #include -#include -#include -#include #include #include #include -#include #include #include #include diff --git a/src/BRepTest/BRepTest_FillingCommands.cxx b/src/BRepTest/BRepTest_FillingCommands.cxx index 0bd777772d..a5e7fb9673 100644 --- a/src/BRepTest/BRepTest_FillingCommands.cxx +++ b/src/BRepTest/BRepTest_FillingCommands.cxx @@ -31,68 +31,38 @@ #include #include #include -#include -#include -#include -#include -#include -#include #include #include -#include #include #include -#include #include -#include #include #include -#include -#include #include -#include -#include #include #include #include #include -#include -#include #include #include #include #include -#include #include -#include #include -#include -#include -#include -#include #include -#include -#include - #include #include #include -#include -#include -#include -#include #include #include -#include -#include #include diff --git a/src/BRepTest/BRepTest_GPropCommands.cxx b/src/BRepTest/BRepTest_GPropCommands.cxx index 90c28f5308..7c9817b60c 100644 --- a/src/BRepTest/BRepTest_GPropCommands.cxx +++ b/src/BRepTest/BRepTest_GPropCommands.cxx @@ -22,16 +22,9 @@ #include #include #include -#include -#include #include #include -#include -#include -#include -#include -#include #ifdef _WIN32 Standard_IMPORT Draw_Viewer dout; diff --git a/src/BRepTest/BRepTest_HistoryCommands.cxx b/src/BRepTest/BRepTest_HistoryCommands.cxx index ab1e401e9b..3006fefc94 100644 --- a/src/BRepTest/BRepTest_HistoryCommands.cxx +++ b/src/BRepTest/BRepTest_HistoryCommands.cxx @@ -24,7 +24,6 @@ #include #include -#include static Standard_Integer SetFillHistory(Draw_Interpretor&, Standard_Integer, const char**); static Standard_Integer SaveHistory (Draw_Interpretor&, Standard_Integer, const char**); diff --git a/src/BRepTest/BRepTest_MatCommands.cxx b/src/BRepTest/BRepTest_MatCommands.cxx index 7a4d8c14ae..04255f2aff 100644 --- a/src/BRepTest/BRepTest_MatCommands.cxx +++ b/src/BRepTest/BRepTest_MatCommands.cxx @@ -17,7 +17,6 @@ #include #include #include -#include #include #include @@ -30,14 +29,10 @@ #include #include #include -#include #include -#include #include -#include #include -#include #include #include diff --git a/src/BRepTest/BRepTest_OtherCommands.cxx b/src/BRepTest/BRepTest_OtherCommands.cxx index 17d5d26ffd..a6e860adee 100644 --- a/src/BRepTest/BRepTest_OtherCommands.cxx +++ b/src/BRepTest/BRepTest_OtherCommands.cxx @@ -25,47 +25,26 @@ #include #include -#include #include #include -#include #include #include -#include #include #include -#include -#include - #include -#include #include #include #include -#include -#include -#include -#include #include -#include -#include -#include -#include #include #include -#include - -#include -#include -#include - #include #include #include diff --git a/src/BRepTest/BRepTest_PrimitiveCommands.cxx b/src/BRepTest/BRepTest_PrimitiveCommands.cxx index 3ad36cedf7..3ca7233d23 100644 --- a/src/BRepTest/BRepTest_PrimitiveCommands.cxx +++ b/src/BRepTest/BRepTest_PrimitiveCommands.cxx @@ -19,15 +19,12 @@ #include #include #include -#include -#include #include #include #include #include #include #include -#include #include #include #include diff --git a/src/BRepTest/BRepTest_ProjectionCommands.cxx b/src/BRepTest/BRepTest_ProjectionCommands.cxx index 72a83082be..ff20ac9977 100644 --- a/src/BRepTest/BRepTest_ProjectionCommands.cxx +++ b/src/BRepTest/BRepTest_ProjectionCommands.cxx @@ -14,17 +14,11 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -#include -#include #include -#include #include #include #include -#include #include -#include -#include //======================================================================= //function : prj diff --git a/src/BRepTest/BRepTest_SurfaceCommands.cxx b/src/BRepTest/BRepTest_SurfaceCommands.cxx index 82eb8550ad..1ef3fd00da 100644 --- a/src/BRepTest/BRepTest_SurfaceCommands.cxx +++ b/src/BRepTest/BRepTest_SurfaceCommands.cxx @@ -23,27 +23,21 @@ #include #include -#include -#include #include #include #include #include #include -#include #include #include #include #include -#include #include #include #include -#include #include #include #include -#include #include #include @@ -51,7 +45,6 @@ #ifdef _WIN32 //#define strcasecmp strcmp Already defined -#include #endif //----------------------------------------------------------------------- diff --git a/src/BRepTest/BRepTest_SweepCommands.cxx b/src/BRepTest/BRepTest_SweepCommands.cxx index 3cf1503ee1..40c0f6f119 100644 --- a/src/BRepTest/BRepTest_SweepCommands.cxx +++ b/src/BRepTest/BRepTest_SweepCommands.cxx @@ -23,7 +23,6 @@ #include #include -#include #include #include #include @@ -35,13 +34,11 @@ #include #include -#include #include #include #include #include -#include #include #include diff --git a/src/BRepTest/BRepTest_TopologyCommands.cxx b/src/BRepTest/BRepTest_TopologyCommands.cxx index 6dd9c0c4b7..22e895fee6 100644 --- a/src/BRepTest/BRepTest_TopologyCommands.cxx +++ b/src/BRepTest/BRepTest_TopologyCommands.cxx @@ -17,31 +17,16 @@ #include #include #include -#include -#include #include -#include -#include -#include #include #include -#include -#include #include -#include -#include -#include -#include #include #include -#include -#include -#include -#include static Standard_Integer halfspace(Draw_Interpretor& di, - Standard_Integer n, const char** a) + Standard_Integer n, const char** a) { if (n < 6) return 1; diff --git a/src/BRepToIGES/BRepToIGES_BREntity.cxx b/src/BRepToIGES/BRepToIGES_BREntity.cxx index 37d1cba74c..2487684fa8 100644 --- a/src/BRepToIGES/BRepToIGES_BREntity.cxx +++ b/src/BRepToIGES/BRepToIGES_BREntity.cxx @@ -22,14 +22,11 @@ #include #include #include -#include -#include #include #include #include #include #include -#include #include #include #include @@ -43,7 +40,6 @@ #include #include #include -#include #include //#include diff --git a/src/BRepToIGES/BRepToIGES_BREntity.hxx b/src/BRepToIGES/BRepToIGES_BREntity.hxx index 86ef7f881e..18247ccf67 100644 --- a/src/BRepToIGES/BRepToIGES_BREntity.hxx +++ b/src/BRepToIGES/BRepToIGES_BREntity.hxx @@ -21,8 +21,6 @@ #include #include -#include -#include #include #include diff --git a/src/BRepToIGES/BRepToIGES_BRShell.cxx b/src/BRepToIGES/BRepToIGES_BRShell.cxx index 34e5f6dce5..be1a0a0623 100644 --- a/src/BRepToIGES/BRepToIGES_BRShell.cxx +++ b/src/BRepToIGES/BRepToIGES_BRShell.cxx @@ -20,7 +20,6 @@ #include #include #include -#include #include #include #include @@ -29,19 +28,12 @@ #include #include #include -#include #include -#include -#include #include -#include #include #include #include #include -#include -#include -#include #include #include #include @@ -51,7 +43,6 @@ #include #include #include -#include #include #include #include @@ -59,7 +50,6 @@ #include #include #include -#include #include #include #include diff --git a/src/BRepToIGES/BRepToIGES_BRSolid.cxx b/src/BRepToIGES/BRepToIGES_BRSolid.cxx index 21ababf37b..16f6ff6328 100644 --- a/src/BRepToIGES/BRepToIGES_BRSolid.cxx +++ b/src/BRepToIGES/BRepToIGES_BRSolid.cxx @@ -16,7 +16,6 @@ #include -#include #include #include #include diff --git a/src/BRepToIGES/BRepToIGES_BRWire.cxx b/src/BRepToIGES/BRepToIGES_BRWire.cxx index 6db3258f44..91be5308af 100644 --- a/src/BRepToIGES/BRepToIGES_BRWire.cxx +++ b/src/BRepToIGES/BRepToIGES_BRWire.cxx @@ -19,14 +19,12 @@ //S4181 pdn implementing of writing IGES elementary surfaces. #include -#include #include #include #include #include #include #include -#include #include #include #include @@ -46,26 +44,19 @@ #include #include #include -#include #include #include #include -#include -#include -#include #include #include #include -#include #include #include #include -#include #include #include #include #include -#include #include #include #include diff --git a/src/BRepToIGES/BRepToIGES_BRWire.hxx b/src/BRepToIGES/BRepToIGES_BRWire.hxx index 600ec0369f..6994a8ad8b 100644 --- a/src/BRepToIGES/BRepToIGES_BRWire.hxx +++ b/src/BRepToIGES/BRepToIGES_BRWire.hxx @@ -22,8 +22,6 @@ #include #include -#include -#include #include class IGESData_IGESEntity; diff --git a/src/BRepToIGESBRep/BRepToIGESBRep_Entity.cxx b/src/BRepToIGESBRep/BRepToIGESBRep_Entity.cxx index d1e166b633..19264ed464 100644 --- a/src/BRepToIGESBRep/BRepToIGESBRep_Entity.cxx +++ b/src/BRepToIGESBRep/BRepToIGESBRep_Entity.cxx @@ -29,49 +29,18 @@ #include #include #include -#include -#include #include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include #include -#include #include -#include -#include -#include -#include -#include #include -#include -#include -#include #include -#include -#include -#include #include #include #include #include #include #include -#include -#include -#include #include -#include -#include -#include -#include #include #include #include @@ -90,7 +59,6 @@ #include #include #include -#include #include #include #include @@ -102,10 +70,6 @@ #include #include #include -#include -#include -#include -#include //#include //#include diff --git a/src/BRepToIGESBRep/BRepToIGESBRep_Entity.hxx b/src/BRepToIGESBRep/BRepToIGESBRep_Entity.hxx index 248eebaff1..60332515c3 100644 --- a/src/BRepToIGESBRep/BRepToIGESBRep_Entity.hxx +++ b/src/BRepToIGESBRep/BRepToIGESBRep_Entity.hxx @@ -25,7 +25,6 @@ #include #include #include -#include #include class IGESSolid_EdgeList; diff --git a/src/BRepTools/BRepTools.cxx b/src/BRepTools/BRepTools.cxx index 90ea3e49a5..37b11db375 100644 --- a/src/BRepTools/BRepTools.cxx +++ b/src/BRepTools/BRepTools.cxx @@ -19,16 +19,10 @@ #include #include #include -#include -#include #include -#include #include -#include -#include #include #include -#include #include #include #include @@ -36,38 +30,27 @@ #include #include #include -#include -#include #include #include #include #include #include -#include #include #include -#include -#include -#include -#include #include -#include #include #include #include #include #include -#include #include #include #include #include #include #include -#include #include #include -#include #include #include diff --git a/src/BRepTools/BRepTools.hxx b/src/BRepTools/BRepTools.hxx index d187da66d5..aad8edf62c 100644 --- a/src/BRepTools/BRepTools.hxx +++ b/src/BRepTools/BRepTools.hxx @@ -23,11 +23,9 @@ #include #include -#include #include #include #include -#include #include #include diff --git a/src/BRepTools/BRepTools_GTrsfModification.cxx b/src/BRepTools/BRepTools_GTrsfModification.cxx index 9123e8fe5d..dfb116dc88 100644 --- a/src/BRepTools/BRepTools_GTrsfModification.cxx +++ b/src/BRepTools/BRepTools_GTrsfModification.cxx @@ -24,21 +24,14 @@ #include #include #include -#include -#include #include #include #include -#include #include -#include #include -#include #include #include #include -#include -#include #include #include #include diff --git a/src/BRepTools/BRepTools_GTrsfModification.hxx b/src/BRepTools/BRepTools_GTrsfModification.hxx index b096fb428b..20c9ca7f72 100644 --- a/src/BRepTools/BRepTools_GTrsfModification.hxx +++ b/src/BRepTools/BRepTools_GTrsfModification.hxx @@ -21,9 +21,7 @@ #include #include -#include #include -#include #include class TopoDS_Face; class Geom_Surface; diff --git a/src/BRepTools/BRepTools_MapOfVertexPnt2d.hxx b/src/BRepTools/BRepTools_MapOfVertexPnt2d.hxx index 3a507c68b6..d622b4c016 100644 --- a/src/BRepTools/BRepTools_MapOfVertexPnt2d.hxx +++ b/src/BRepTools/BRepTools_MapOfVertexPnt2d.hxx @@ -17,7 +17,6 @@ #ifndef BRepTools_MapOfVertexPnt2d_HeaderFile #define BRepTools_MapOfVertexPnt2d_HeaderFile -#include #include #include #include diff --git a/src/BRepTools/BRepTools_Modification.hxx b/src/BRepTools/BRepTools_Modification.hxx index f2df46efb7..dd198429b9 100644 --- a/src/BRepTools/BRepTools_Modification.hxx +++ b/src/BRepTools/BRepTools_Modification.hxx @@ -21,7 +21,6 @@ #include #include -#include #include #include class TopoDS_Face; diff --git a/src/BRepTools/BRepTools_Modifier.cxx b/src/BRepTools/BRepTools_Modifier.cxx index f4cf6f39c2..df686dd4cc 100644 --- a/src/BRepTools/BRepTools_Modifier.cxx +++ b/src/BRepTools/BRepTools_Modifier.cxx @@ -18,9 +18,6 @@ #include #include -#include -#include -#include #include #include #include @@ -30,7 +27,6 @@ #include #include #include -#include #include #if 0 @@ -51,7 +47,6 @@ #include #include -#include #include #include #include diff --git a/src/BRepTools/BRepTools_Modifier.hxx b/src/BRepTools/BRepTools_Modifier.hxx index 021cd4f6b2..6c99ac0c12 100644 --- a/src/BRepTools/BRepTools_Modifier.hxx +++ b/src/BRepTools/BRepTools_Modifier.hxx @@ -26,8 +26,6 @@ #include #include #include -#include -#include #include #include diff --git a/src/BRepTools/BRepTools_NurbsConvertModification.cxx b/src/BRepTools/BRepTools_NurbsConvertModification.cxx index f3941f0174..fff0a4d6b8 100644 --- a/src/BRepTools/BRepTools_NurbsConvertModification.cxx +++ b/src/BRepTools/BRepTools_NurbsConvertModification.cxx @@ -16,30 +16,20 @@ #include -#include #include -#include #include -#include #include -#include #include #include #include -#include #include #include #include #include #include #include -#include #include -#include #include -#include -#include -#include #include #include #include @@ -49,20 +39,13 @@ #include #include #include -#include #include #include -#include #include #include #include -#include #include -#include #include -#include -#include -#include #include IMPLEMENT_STANDARD_RTTIEXT(BRepTools_NurbsConvertModification,BRepTools_Modification) diff --git a/src/BRepTools/BRepTools_NurbsConvertModification.hxx b/src/BRepTools/BRepTools_NurbsConvertModification.hxx index 8e79209702..8bed3a7ae5 100644 --- a/src/BRepTools/BRepTools_NurbsConvertModification.hxx +++ b/src/BRepTools/BRepTools_NurbsConvertModification.hxx @@ -18,13 +18,11 @@ #define _BRepTools_NurbsConvertModification_HeaderFile #include -#include #include #include #include #include -#include #include #include class TopoDS_Face; diff --git a/src/BRepTools/BRepTools_PurgeLocations.cxx b/src/BRepTools/BRepTools_PurgeLocations.cxx index 1bc807ac29..c7359b73eb 100644 --- a/src/BRepTools/BRepTools_PurgeLocations.cxx +++ b/src/BRepTools/BRepTools_PurgeLocations.cxx @@ -15,7 +15,6 @@ #include #include #include -#include #include #include #include diff --git a/src/BRepTools/BRepTools_PurgeLocations.hxx b/src/BRepTools/BRepTools_PurgeLocations.hxx index f25186a233..cdcb562ce6 100644 --- a/src/BRepTools/BRepTools_PurgeLocations.hxx +++ b/src/BRepTools/BRepTools_PurgeLocations.hxx @@ -15,7 +15,6 @@ #define _BRepTools_PurgeLocations_HeaderFile #include -#include #include #include #include diff --git a/src/BRepTools/BRepTools_Quilt.cxx b/src/BRepTools/BRepTools_Quilt.cxx index f31c864840..d36202ab25 100644 --- a/src/BRepTools/BRepTools_Quilt.cxx +++ b/src/BRepTools/BRepTools_Quilt.cxx @@ -30,11 +30,8 @@ #include #include #include -#include #include #include -#include -#include #include //======================================================================= diff --git a/src/BRepTools/BRepTools_Quilt.hxx b/src/BRepTools/BRepTools_Quilt.hxx index f12c7087eb..6e82d35c2e 100644 --- a/src/BRepTools/BRepTools_Quilt.hxx +++ b/src/BRepTools/BRepTools_Quilt.hxx @@ -19,10 +19,8 @@ #include #include -#include #include -#include class TopoDS_Edge; class TopoDS_Vertex; class TopoDS_Shape; diff --git a/src/BRepTools/BRepTools_ReShape.cxx b/src/BRepTools/BRepTools_ReShape.cxx index 63c00a0331..7b282a9850 100644 --- a/src/BRepTools/BRepTools_ReShape.cxx +++ b/src/BRepTools/BRepTools_ReShape.cxx @@ -17,24 +17,17 @@ #include #include -#include -#include #include #include #include #include #include #include -#include #include #include -#include -#include #include #include #include -#include -#include IMPLEMENT_STANDARD_RTTIEXT(BRepTools_ReShape,Standard_Transient) diff --git a/src/BRepTools/BRepTools_ReShape.hxx b/src/BRepTools/BRepTools_ReShape.hxx index 9109072fdf..8a2be07ff6 100644 --- a/src/BRepTools/BRepTools_ReShape.hxx +++ b/src/BRepTools/BRepTools_ReShape.hxx @@ -22,7 +22,6 @@ #include #include #include -#include #include #include diff --git a/src/BRepTools/BRepTools_ShapeSet.cxx b/src/BRepTools/BRepTools_ShapeSet.cxx index 3d3026b56b..4473b78cad 100644 --- a/src/BRepTools/BRepTools_ShapeSet.cxx +++ b/src/BRepTools/BRepTools_ShapeSet.cxx @@ -21,16 +21,11 @@ #include #include #include -#include #include -#include #include #include #include #include -#include -#include -#include #include #include #include @@ -40,15 +35,10 @@ #include #include #include -#include -#include #include #include #include -#include #include -#include -#include #include #include #include diff --git a/src/BRepTools/BRepTools_ShapeSet.hxx b/src/BRepTools/BRepTools_ShapeSet.hxx index 8fc31e52d1..444f0e4ed3 100644 --- a/src/BRepTools/BRepTools_ShapeSet.hxx +++ b/src/BRepTools/BRepTools_ShapeSet.hxx @@ -26,7 +26,6 @@ #include #include #include -#include #include #include #include diff --git a/src/BRepTools/BRepTools_Substitution.cxx b/src/BRepTools/BRepTools_Substitution.cxx index a7e1c34fde..0ee437456f 100644 --- a/src/BRepTools/BRepTools_Substitution.cxx +++ b/src/BRepTools/BRepTools_Substitution.cxx @@ -24,7 +24,6 @@ #include #include #include -#include //======================================================================= //function : BRepTools_Substitution diff --git a/src/BRepTools/BRepTools_Substitution.hxx b/src/BRepTools/BRepTools_Substitution.hxx index 6421529eac..00463bb522 100644 --- a/src/BRepTools/BRepTools_Substitution.hxx +++ b/src/BRepTools/BRepTools_Substitution.hxx @@ -19,11 +19,9 @@ #include #include -#include #include #include -#include class TopoDS_Shape; diff --git a/src/BRepTools/BRepTools_TrsfModification.cxx b/src/BRepTools/BRepTools_TrsfModification.cxx index 6bc92499cd..acf1d6773f 100644 --- a/src/BRepTools/BRepTools_TrsfModification.cxx +++ b/src/BRepTools/BRepTools_TrsfModification.cxx @@ -20,19 +20,15 @@ #include #include #include -#include #include -#include #include #include -#include #include #include #include #include #include #include -#include #include #include #include diff --git a/src/BRepTools/BRepTools_TrsfModification.hxx b/src/BRepTools/BRepTools_TrsfModification.hxx index 5675146b85..f0df27766b 100644 --- a/src/BRepTools/BRepTools_TrsfModification.hxx +++ b/src/BRepTools/BRepTools_TrsfModification.hxx @@ -22,8 +22,6 @@ #include #include -#include -#include #include class TopoDS_Face; class Geom_Surface; diff --git a/src/BRepTools/BRepTools_WireExplorer.cxx b/src/BRepTools/BRepTools_WireExplorer.cxx index be98890d39..0cd69bc486 100644 --- a/src/BRepTools/BRepTools_WireExplorer.cxx +++ b/src/BRepTools/BRepTools_WireExplorer.cxx @@ -24,8 +24,6 @@ #include #include #include -#include -#include #include #include #include @@ -35,10 +33,7 @@ #include #include #include -#include -#include #include -#include #include //======================================================================= diff --git a/src/BRepTools/BRepTools_WireExplorer.hxx b/src/BRepTools/BRepTools_WireExplorer.hxx index 09fb0e9d82..0800a002bd 100644 --- a/src/BRepTools/BRepTools_WireExplorer.hxx +++ b/src/BRepTools/BRepTools_WireExplorer.hxx @@ -19,15 +19,12 @@ #include #include -#include #include #include #include #include #include -#include -#include #include class TopoDS_Wire; diff --git a/src/BRepTopAdaptor/BRepTopAdaptor_FClass2d.hxx b/src/BRepTopAdaptor/BRepTopAdaptor_FClass2d.hxx index 0288f53b3f..0c34b28e9e 100644 --- a/src/BRepTopAdaptor/BRepTopAdaptor_FClass2d.hxx +++ b/src/BRepTopAdaptor/BRepTopAdaptor_FClass2d.hxx @@ -19,14 +19,11 @@ #include #include -#include #include #include -#include #include #include -#include class gp_Pnt2d; diff --git a/src/BRepTopAdaptor/BRepTopAdaptor_HVertex.cxx b/src/BRepTopAdaptor/BRepTopAdaptor_HVertex.cxx index 01260ed326..d8da86887a 100644 --- a/src/BRepTopAdaptor/BRepTopAdaptor_HVertex.cxx +++ b/src/BRepTopAdaptor/BRepTopAdaptor_HVertex.cxx @@ -13,8 +13,6 @@ // commercial license or contractual agreement. -#include -#include #include #include #include diff --git a/src/BRepTopAdaptor/BRepTopAdaptor_HVertex.hxx b/src/BRepTopAdaptor/BRepTopAdaptor_HVertex.hxx index 82e8acba3c..3f71994b3a 100644 --- a/src/BRepTopAdaptor/BRepTopAdaptor_HVertex.hxx +++ b/src/BRepTopAdaptor/BRepTopAdaptor_HVertex.hxx @@ -17,14 +17,12 @@ #ifndef _BRepTopAdaptor_HVertex_HeaderFile #define _BRepTopAdaptor_HVertex_HeaderFile +#include +#include #include #include - -#include -#include -#include #include -#include +#include class gp_Pnt2d; diff --git a/src/BRepTopAdaptor/BRepTopAdaptor_TopolTool.cxx b/src/BRepTopAdaptor/BRepTopAdaptor_TopolTool.cxx index f4001581a2..8be3506a8f 100644 --- a/src/BRepTopAdaptor/BRepTopAdaptor_TopolTool.cxx +++ b/src/BRepTopAdaptor/BRepTopAdaptor_TopolTool.cxx @@ -14,13 +14,8 @@ #include -#include -#include #include -#include #include -#include -#include #include #include #include diff --git a/src/BRepTopAdaptor/BRepTopAdaptor_TopolTool.hxx b/src/BRepTopAdaptor/BRepTopAdaptor_TopolTool.hxx index 1708c09567..f5f17b1847 100644 --- a/src/BRepTopAdaptor/BRepTopAdaptor_TopolTool.hxx +++ b/src/BRepTopAdaptor/BRepTopAdaptor_TopolTool.hxx @@ -22,7 +22,6 @@ #include #include #include -#include #include #include #include diff --git a/src/BSplCLib/BSplCLib.cxx b/src/BSplCLib/BSplCLib.cxx index ed00af0c4c..cae229290b 100644 --- a/src/BSplCLib/BSplCLib.cxx +++ b/src/BSplCLib/BSplCLib.cxx @@ -30,9 +30,6 @@ #include #include #include -#include -#include -#include #include #include #include diff --git a/src/BSplCLib/BSplCLib.hxx b/src/BSplCLib/BSplCLib.hxx index e1e8c9d5fd..92efed9613 100644 --- a/src/BSplCLib/BSplCLib.hxx +++ b/src/BSplCLib/BSplCLib.hxx @@ -17,24 +17,22 @@ #ifndef _BSplCLib_HeaderFile #define _BSplCLib_HeaderFile +#include +#include +#include +#include #include #include #include - -#include -#include #include -#include -#include -#include -#include -#include +#include #include #include -#include -#include -#include +#include #include +#include +#include + class gp_Pnt; class gp_Pnt2d; class gp_Vec; diff --git a/src/BSplCLib/BSplCLib_Cache.cxx b/src/BSplCLib/BSplCLib_Cache.cxx index 2075211c4e..9cde739a15 100644 --- a/src/BSplCLib/BSplCLib_Cache.cxx +++ b/src/BSplCLib/BSplCLib_Cache.cxx @@ -18,7 +18,6 @@ #include #include -#include #include diff --git a/src/BSplCLib/BSplCLib_Cache.hxx b/src/BSplCLib/BSplCLib_Cache.hxx index a4bfd46abb..e203b8368a 100644 --- a/src/BSplCLib/BSplCLib_Cache.hxx +++ b/src/BSplCLib/BSplCLib_Cache.hxx @@ -14,23 +14,8 @@ #ifndef _BSplCLib_Cache_Headerfile #define _BSplCLib_Cache_Headerfile -#include -#include -#include -#include - -#include -#include -#include -#include - -#include -#include -#include -#include -#include - #include +#include //! \brief A cache class for Bezier and B-spline curves. //! diff --git a/src/BSplCLib/BSplCLib_CacheParams.hxx b/src/BSplCLib/BSplCLib_CacheParams.hxx index a25094b251..91e4776981 100644 --- a/src/BSplCLib/BSplCLib_CacheParams.hxx +++ b/src/BSplCLib/BSplCLib_CacheParams.hxx @@ -14,9 +14,6 @@ #ifndef _BSplCLib_CacheParams_Headerfile #define _BSplCLib_CacheParams_Headerfile -#include -#include - #include //! Simple structure containing parameters describing parameterization diff --git a/src/BSplSLib/BSplSLib.hxx b/src/BSplSLib/BSplSLib.hxx index 30c1836088..104a02134d 100644 --- a/src/BSplSLib/BSplSLib.hxx +++ b/src/BSplSLib/BSplSLib.hxx @@ -17,23 +17,18 @@ #ifndef _BSplSLib_HeaderFile #define _BSplSLib_HeaderFile +#include #include #include -#include - -#include -#include -#include +#include #include -#include -#include #include -#include -#include +#include +#include + class gp_Pnt; class gp_Vec; - //! BSplSLib B-spline surface Library //! This package provides an implementation of geometric //! functions for rational and non rational, periodic and non diff --git a/src/BSplSLib/BSplSLib_Cache.cxx b/src/BSplSLib/BSplSLib_Cache.cxx index 7ccce9adee..4849d95c15 100644 --- a/src/BSplSLib/BSplSLib_Cache.cxx +++ b/src/BSplSLib/BSplSLib_Cache.cxx @@ -17,8 +17,6 @@ #include #include -#include -#include #include diff --git a/src/BSplSLib/BSplSLib_Cache.hxx b/src/BSplSLib/BSplSLib_Cache.hxx index 965ba6e8bc..f2ba99424c 100644 --- a/src/BSplSLib/BSplSLib_Cache.hxx +++ b/src/BSplSLib/BSplSLib_Cache.hxx @@ -14,19 +14,7 @@ #ifndef _BSplSLib_Cache_Headerfile #define _BSplSLib_Cache_Headerfile -#include -#include -#include -#include - -#include -#include - -#include -#include #include -#include -#include #include #include diff --git a/src/BSplSLib/BSplSLib_EvaluatorFunction.hxx b/src/BSplSLib/BSplSLib_EvaluatorFunction.hxx index d2f4ffed79..7b3cb057dd 100644 --- a/src/BSplSLib/BSplSLib_EvaluatorFunction.hxx +++ b/src/BSplSLib/BSplSLib_EvaluatorFunction.hxx @@ -24,7 +24,6 @@ #include #endif #ifndef _Standard_PrimitiveTypes_HeaderFile -#include #endif // History - C function pointer converted to a virtual class diff --git a/src/BVH/BVH.cxx b/src/BVH/BVH.cxx index 105f71f5b5..52b9e540da 100644 --- a/src/BVH/BVH.cxx +++ b/src/BVH/BVH.cxx @@ -13,18 +13,12 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -#include -#include -#include -#include #include #include #include #include #include -#include - IMPLEMENT_STANDARD_RTTIEXT(BVH_BuilderTransient, Standard_Transient) IMPLEMENT_STANDARD_RTTIEXT(BVH_TreeBaseTransient, Standard_Transient) IMPLEMENT_STANDARD_RTTIEXT(BVH_ObjectTransient, Standard_Transient) diff --git a/src/Blend/Blend_FuncInv.hxx b/src/Blend/Blend_FuncInv.hxx index d48137bf9d..bfc7a2a7c4 100644 --- a/src/Blend/Blend_FuncInv.hxx +++ b/src/Blend/Blend_FuncInv.hxx @@ -17,6 +17,7 @@ #ifndef _Blend_FuncInv_HeaderFile #define _Blend_FuncInv_HeaderFile +#include #include #include #include diff --git a/src/CDF/CDF_Application.cxx b/src/CDF/CDF_Application.cxx index 39875d9348..410f9bb92b 100644 --- a/src/CDF/CDF_Application.cxx +++ b/src/CDF/CDF_Application.cxx @@ -22,7 +22,6 @@ #include #include #include -#include #include #include #include diff --git a/src/CDF/CDF_Application.hxx b/src/CDF/CDF_Application.hxx index 9c218887bc..950b3713da 100644 --- a/src/CDF/CDF_Application.hxx +++ b/src/CDF/CDF_Application.hxx @@ -23,7 +23,6 @@ #include #include #include -#include #include #include diff --git a/src/CDF/CDF_Directory.hxx b/src/CDF/CDF_Directory.hxx index 27f2ff84fe..5c472ee7db 100644 --- a/src/CDF/CDF_Directory.hxx +++ b/src/CDF/CDF_Directory.hxx @@ -18,11 +18,9 @@ #define _CDF_Directory_HeaderFile #include -#include #include #include -#include #include class CDM_Document; diff --git a/src/CDF/CDF_DirectoryIterator.cxx b/src/CDF/CDF_DirectoryIterator.cxx index a9612a83ab..ab85d7acd8 100644 --- a/src/CDF/CDF_DirectoryIterator.cxx +++ b/src/CDF/CDF_DirectoryIterator.cxx @@ -18,7 +18,6 @@ #include #include #include -#include CDF_DirectoryIterator::CDF_DirectoryIterator(const Handle(CDF_Directory)& aDirectory):myIterator(aDirectory->List()) {} diff --git a/src/CDF/CDF_DirectoryIterator.hxx b/src/CDF/CDF_DirectoryIterator.hxx index 4a163c697b..86640f4baf 100644 --- a/src/CDF/CDF_DirectoryIterator.hxx +++ b/src/CDF/CDF_DirectoryIterator.hxx @@ -22,7 +22,6 @@ #include #include -#include class CDF_Directory; class CDM_Document; diff --git a/src/CDF/CDF_FWOSDriver.cxx b/src/CDF/CDF_FWOSDriver.cxx index 4fd9d7ed1c..2b28131c5d 100644 --- a/src/CDF/CDF_FWOSDriver.cxx +++ b/src/CDF/CDF_FWOSDriver.cxx @@ -13,7 +13,6 @@ #include -#include #include #include #include diff --git a/src/CDF/CDF_FWOSDriver.hxx b/src/CDF/CDF_FWOSDriver.hxx index 585698a83e..7ae928c352 100644 --- a/src/CDF/CDF_FWOSDriver.hxx +++ b/src/CDF/CDF_FWOSDriver.hxx @@ -18,12 +18,10 @@ #define _CDF_FWOSDriver_HeaderFile #include -#include #include #include -#include class TCollection_ExtendedString; class CDM_MetaData; class CDM_Document; diff --git a/src/CDF/CDF_MetaDataDriver.cxx b/src/CDF/CDF_MetaDataDriver.cxx index 812445f603..bdaa54fdae 100644 --- a/src/CDF/CDF_MetaDataDriver.cxx +++ b/src/CDF/CDF_MetaDataDriver.cxx @@ -17,12 +17,9 @@ #include #include -#include #include #include -#include #include -#include #include #include diff --git a/src/CDF/CDF_Store.cxx b/src/CDF/CDF_Store.cxx index 48b4733903..197e312453 100644 --- a/src/CDF/CDF_Store.cxx +++ b/src/CDF/CDF_Store.cxx @@ -20,8 +20,6 @@ #include #include #include -#include -#include #include #include diff --git a/src/CDF/CDF_Store.hxx b/src/CDF/CDF_Store.hxx index 9286300b75..372de7a81c 100644 --- a/src/CDF/CDF_Store.hxx +++ b/src/CDF/CDF_Store.hxx @@ -21,13 +21,9 @@ #include #include -#include #include #include -#include -#include #include -#include #include #include diff --git a/src/CDF/CDF_StoreList.cxx b/src/CDF/CDF_StoreList.cxx index e8b44c3a86..b1d91602aa 100644 --- a/src/CDF/CDF_StoreList.cxx +++ b/src/CDF/CDF_StoreList.cxx @@ -21,8 +21,6 @@ #include #include #include -#include -#include #include #include diff --git a/src/CDF/CDF_StoreList.hxx b/src/CDF/CDF_StoreList.hxx index 1f79e21682..10fb41ebd2 100644 --- a/src/CDF/CDF_StoreList.hxx +++ b/src/CDF/CDF_StoreList.hxx @@ -20,13 +20,10 @@ #include #include -#include #include #include #include -#include #include -#include class CDM_Document; class CDM_MetaData; diff --git a/src/CDM/CDM_Application.cxx b/src/CDM/CDM_Application.cxx index 1f138cb7df..1d842f5189 100644 --- a/src/CDM/CDM_Application.cxx +++ b/src/CDM/CDM_Application.cxx @@ -18,7 +18,6 @@ #include #include #include -#include #include #include #include diff --git a/src/CDM/CDM_Application.hxx b/src/CDM/CDM_Application.hxx index 3e47f24987..0f81748280 100644 --- a/src/CDM/CDM_Application.hxx +++ b/src/CDM/CDM_Application.hxx @@ -18,14 +18,9 @@ #define _CDM_Application_HeaderFile #include -#include #include -#include #include -#include -#include -#include #include #include diff --git a/src/CDM/CDM_Document.cxx b/src/CDM/CDM_Document.cxx index c91c9190df..9efef91453 100644 --- a/src/CDM/CDM_Document.cxx +++ b/src/CDM/CDM_Document.cxx @@ -19,7 +19,6 @@ #include #include #include -#include #include #include #include @@ -29,10 +28,8 @@ #include #include #include -#include #include #include -#include #include #include #include diff --git a/src/CDM/CDM_MapOfDocument.hxx b/src/CDM/CDM_MapOfDocument.hxx index 167dc793a8..613ed2642d 100644 --- a/src/CDM/CDM_MapOfDocument.hxx +++ b/src/CDM/CDM_MapOfDocument.hxx @@ -17,7 +17,6 @@ #ifndef CDM_MapOfDocument_HeaderFile #define CDM_MapOfDocument_HeaderFile -#include #include #include diff --git a/src/CDM/CDM_MetaData.cxx b/src/CDM/CDM_MetaData.cxx index 21e7499479..5c5e273bb0 100644 --- a/src/CDM/CDM_MetaData.cxx +++ b/src/CDM/CDM_MetaData.cxx @@ -19,7 +19,6 @@ #include #include #include -#include #include #include #include diff --git a/src/CDM/CDM_MetaData.hxx b/src/CDM/CDM_MetaData.hxx index 26af074bc7..45d7e1b83d 100644 --- a/src/CDM/CDM_MetaData.hxx +++ b/src/CDM/CDM_MetaData.hxx @@ -20,7 +20,6 @@ #include #include -#include #include #include #include diff --git a/src/CDM/CDM_Reference.hxx b/src/CDM/CDM_Reference.hxx index 3a9c00f2ed..cb3ea8556a 100644 --- a/src/CDM/CDM_Reference.hxx +++ b/src/CDM/CDM_Reference.hxx @@ -22,7 +22,6 @@ #include #include -#include #include class CDM_Document; class CDM_Application; diff --git a/src/CDM/CDM_ReferenceIterator.hxx b/src/CDM/CDM_ReferenceIterator.hxx index 497c4590b4..bd51c6feca 100644 --- a/src/CDM/CDM_ReferenceIterator.hxx +++ b/src/CDM/CDM_ReferenceIterator.hxx @@ -22,7 +22,6 @@ #include #include -#include #include class CDM_Document; diff --git a/src/ChFi2d/ChFi2d_AnaFilletAlgo.cxx b/src/ChFi2d/ChFi2d_AnaFilletAlgo.cxx index 0df834c1bb..3462905295 100644 --- a/src/ChFi2d/ChFi2d_AnaFilletAlgo.cxx +++ b/src/ChFi2d/ChFi2d_AnaFilletAlgo.cxx @@ -14,9 +14,6 @@ #include #include -#include -#include -#include #include diff --git a/src/ChFi2d/ChFi2d_Builder.cxx b/src/ChFi2d/ChFi2d_Builder.cxx index 0e797fe32f..441488344a 100644 --- a/src/ChFi2d/ChFi2d_Builder.cxx +++ b/src/ChFi2d/ChFi2d_Builder.cxx @@ -24,7 +24,6 @@ #include #include #include -#include #include #include #include @@ -38,11 +37,9 @@ #include #include #include -#include #include #include #include -#include #include #include #include @@ -55,7 +52,6 @@ #include #include #include -#include static Standard_Boolean IsIssuedFrom(const TopoDS_Edge& E, const TopTools_IndexedMapOfShape& Map, diff --git a/src/ChFi2d/ChFi2d_Builder.hxx b/src/ChFi2d/ChFi2d_Builder.hxx index 95d01765cd..b32409d644 100644 --- a/src/ChFi2d/ChFi2d_Builder.hxx +++ b/src/ChFi2d/ChFi2d_Builder.hxx @@ -19,14 +19,11 @@ #include #include -#include #include #include #include #include -#include -#include #include class TopoDS_Edge; diff --git a/src/ChFi2d/ChFi2d_Builder_0.cxx b/src/ChFi2d/ChFi2d_Builder_0.cxx index 657ba0c6df..5d12686ec6 100644 --- a/src/ChFi2d/ChFi2d_Builder_0.cxx +++ b/src/ChFi2d/ChFi2d_Builder_0.cxx @@ -42,7 +42,6 @@ #include #include #include -#include #include #include #include diff --git a/src/ChFi2d/ChFi2d_ChamferAPI.cxx b/src/ChFi2d/ChFi2d_ChamferAPI.cxx index 9a0224b433..516092415e 100644 --- a/src/ChFi2d/ChFi2d_ChamferAPI.cxx +++ b/src/ChFi2d/ChFi2d_ChamferAPI.cxx @@ -13,10 +13,8 @@ #include -#include #include #include -#include #include #include #include diff --git a/src/ChFi2d/ChFi2d_FilletAlgo.cxx b/src/ChFi2d/ChFi2d_FilletAlgo.cxx index 547a2b9b5a..f93ed7c1d1 100644 --- a/src/ChFi2d/ChFi2d_FilletAlgo.cxx +++ b/src/ChFi2d/ChFi2d_FilletAlgo.cxx @@ -27,7 +27,6 @@ #include #include -#include #include #include diff --git a/src/ChFi2d/ChFi2d_FilletAlgo.hxx b/src/ChFi2d/ChFi2d_FilletAlgo.hxx index fdd396f57b..042985dd30 100644 --- a/src/ChFi2d/ChFi2d_FilletAlgo.hxx +++ b/src/ChFi2d/ChFi2d_FilletAlgo.hxx @@ -18,7 +18,6 @@ #include #include -#include #include #include #include diff --git a/src/ChFi3d/ChFi3d.cxx b/src/ChFi3d/ChFi3d.cxx index 9c792365f3..d9c03e4d9f 100644 --- a/src/ChFi3d/ChFi3d.cxx +++ b/src/ChFi3d/ChFi3d.cxx @@ -17,16 +17,11 @@ #include #include -#include -#include -#include #include #include #include #include -#include #include -#include #include #include #include diff --git a/src/ChFi3d/ChFi3d.hxx b/src/ChFi3d/ChFi3d.hxx index b36266ee1c..6292eb31af 100644 --- a/src/ChFi3d/ChFi3d.hxx +++ b/src/ChFi3d/ChFi3d.hxx @@ -21,7 +21,6 @@ #include #include -#include #include #include #include diff --git a/src/ChFi3d/ChFi3d_Builder.cxx b/src/ChFi3d/ChFi3d_Builder.cxx index 03444145c8..e56235f70d 100644 --- a/src/ChFi3d/ChFi3d_Builder.cxx +++ b/src/ChFi3d/ChFi3d_Builder.cxx @@ -16,52 +16,28 @@ #include -#include -#include -#include -#include #include -#include -#include -#include -#include -#include -#include -#include -#include -#include #include #include #include -#include #include #include #include #include -#include #include -#include #include #include #include #include -#include #include #include #include -#include #include #include -#include #include -#include #include -#include #include -#include -#include #include -#include #include #include #include @@ -69,7 +45,6 @@ #include #include #include -#include #include #include #include @@ -77,7 +52,6 @@ #include #include #include -#include #include #ifdef OCCT_DEBUG diff --git a/src/ChFi3d/ChFi3d_Builder.hxx b/src/ChFi3d/ChFi3d_Builder.hxx index f24419fca6..2073173217 100644 --- a/src/ChFi3d/ChFi3d_Builder.hxx +++ b/src/ChFi3d/ChFi3d_Builder.hxx @@ -21,7 +21,6 @@ #include #include #include -#include #include #include #include diff --git a/src/ChFi3d/ChFi3d_Builder_0.cxx b/src/ChFi3d/ChFi3d_Builder_0.cxx index 27ea6dd75b..5e64b338a1 100644 --- a/src/ChFi3d/ChFi3d_Builder_0.cxx +++ b/src/ChFi3d/ChFi3d_Builder_0.cxx @@ -18,147 +18,66 @@ // Modified by skv - Fri Oct 24 14:24:47 2003 OCC4077 // Modified by skv - Mon Jun 16 15:50:44 2003 OCC615 -#include -#include +#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include #include -#include -#include - -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include #include #include -#include #include #include #include +#include #include #include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include - - #include -#include - -//#include -//#include -#include - -#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include #include -#include -#include +#include #include -#include -#include -#include #include -#include -#include -#include -#include -#include -#include - +#include +#include +#include +#include +#include +#include #include -#include -#include #include - -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include #include -#include -#include - -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include -#include #ifdef OCCT_DEBUG extern Standard_Boolean ChFi3d_GetcontextFORCEBLEND(); @@ -170,12 +89,6 @@ extern void ChFi3d_SettraceDRAWINT(const Standard_Boolean b); extern void ChFi3d_SettraceDRAWSPINE(const Standard_Boolean b); #endif -#include - -#include -#include -#include - //======================================================================= //function : ChFi3d_InPeriod //purpose : diff --git a/src/ChFi3d/ChFi3d_Builder_0.hxx b/src/ChFi3d/ChFi3d_Builder_0.hxx index e3655b03c9..7cce099556 100644 --- a/src/ChFi3d/ChFi3d_Builder_0.hxx +++ b/src/ChFi3d/ChFi3d_Builder_0.hxx @@ -20,8 +20,6 @@ #include #include #include -#include -#include #include #include #include @@ -33,43 +31,24 @@ #include #include #include -#include #include #include -#include -#include #include -#include #include -#include -#include #include #include #include #include #include #include -#include #include -#include -#include #include #include -#include #include -#include -#include #include #include #include -#include -#include -#include -#include -#include -#include #include -#include #include #ifdef OCCT_DEBUG #include diff --git a/src/ChFi3d/ChFi3d_Builder_1.cxx b/src/ChFi3d/ChFi3d_Builder_1.cxx index 8897fb1f5a..d8f9df9ce1 100644 --- a/src/ChFi3d/ChFi3d_Builder_1.cxx +++ b/src/ChFi3d/ChFi3d_Builder_1.cxx @@ -16,34 +16,20 @@ #include -#include -#include #include #include #include -#include #include -#include -#include -#include -#include -#include -#include -#include #include #include #include #include #include #include -#include #include #include #include -#include #include -#include -#include #include #include #include @@ -59,12 +45,10 @@ #include #include #include -#include #include #include #include #include -#include #include #include #include @@ -76,8 +60,6 @@ #include #include #include -#include -#include #include #ifdef OCCT_DEBUG diff --git a/src/ChFi3d/ChFi3d_Builder_2.cxx b/src/ChFi3d/ChFi3d_Builder_2.cxx index 5330c4d7e8..04f981f39e 100644 --- a/src/ChFi3d/ChFi3d_Builder_2.cxx +++ b/src/ChFi3d/ChFi3d_Builder_2.cxx @@ -16,20 +16,7 @@ #include -#include -#include -#include -#include #include -#include -#include -#include -#include -#include -#include -#include -#include -#include #include #include #include @@ -44,10 +31,7 @@ #include #include #include -#include #include -#include -#include #include #include #include @@ -56,34 +40,23 @@ #include #include #include -#include #include #include #include #include -#include #include -#include #include #include -#include -#include #include #include -#include +#include #include #include #include #include #include #include -#include -#include #include -#include -#include -#include -#include #include #include #include @@ -96,10 +69,8 @@ #include #include #include -#include #include #include -#include #ifdef OCCT_DEBUG #ifdef DRAW diff --git a/src/ChFi3d/ChFi3d_Builder_6.cxx b/src/ChFi3d/ChFi3d_Builder_6.cxx index 3bcd519a36..f22c19b2b2 100644 --- a/src/ChFi3d/ChFi3d_Builder_6.cxx +++ b/src/ChFi3d/ChFi3d_Builder_6.cxx @@ -20,22 +20,11 @@ // ComputeData(), case where BRepBlend_Walking::Continu() can't get up to Target #include -#include -#include -#include -#include #include -#include -#include -#include #include #include #include #include -#include -#include -#include -#include #include #include #include @@ -44,9 +33,7 @@ #include #include #include -#include #include -#include #include #include #include @@ -59,7 +46,6 @@ #include #include #include -#include #include #include #include @@ -71,7 +57,6 @@ #include #include #include -#include #include #include #include @@ -81,9 +66,6 @@ #include #include #include -#include -#include -#include #include #include #include @@ -94,7 +76,6 @@ #include #include #include -#include #include #include diff --git a/src/ChFi3d/ChFi3d_Builder_C1.cxx b/src/ChFi3d/ChFi3d_Builder_C1.cxx index 9d78c53944..8a0da73023 100644 --- a/src/ChFi3d/ChFi3d_Builder_C1.cxx +++ b/src/ChFi3d/ChFi3d_Builder_C1.cxx @@ -18,22 +18,7 @@ // Modified by skv - Thu Aug 21 11:55:58 2008 OCC20222 #include -#include -#include -#include -#include -#include #include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include #include #include #include @@ -46,7 +31,6 @@ #include #include #include -#include #include #include #include @@ -54,10 +38,8 @@ #include #include #include -#include #include #include -#include #include #include #include @@ -71,51 +53,33 @@ #include #include #include -#include #include -#include -#include #include #include #include #include #include #include -#include -#include #include #include #include -#include -#include -#include -#include -#include #include #include -#include #include #include #include #include -#include #include #include #include -#include #include -#include #include -#include -#include -#include #include #include #include #include #include #include -#include #include #include #include @@ -127,7 +91,6 @@ #include #include #include -#include #include #include #include @@ -135,7 +98,6 @@ #include #include #include -#include #ifdef OCCT_DEBUG # ifdef DRAW @@ -154,7 +116,6 @@ extern void ChFi3d_ResultChron(OSD_Chronometer & ch,Standard_Real& time); #endif #include #include -#include #include #include #include diff --git a/src/ChFi3d/ChFi3d_Builder_C2.cxx b/src/ChFi3d/ChFi3d_Builder_C2.cxx index a61a85c00d..37a13afa21 100644 --- a/src/ChFi3d/ChFi3d_Builder_C2.cxx +++ b/src/ChFi3d/ChFi3d_Builder_C2.cxx @@ -16,30 +16,15 @@ #include -#include -#include -#include -#include #include #include -#include -#include -#include -#include -#include -#include -#include -#include -#include #include #include -#include #include #include #include #include #include -#include #include #include #include @@ -51,30 +36,16 @@ #include #include #include -#include #include #include -#include #include -#include -#include -#include #include #include -#include -#include -#include -#include -#include -#include #include -#include -#include #include #include #include #include -#include #include #include #include @@ -87,10 +58,7 @@ #include #include #include -#include -#include #include -#include static void Reduce(const Standard_Real& p1, const Standard_Real& p2, diff --git a/src/ChFi3d/ChFi3d_Builder_CnCrn.cxx b/src/ChFi3d/ChFi3d_Builder_CnCrn.cxx index bc70df03a0..c58f6ec7a7 100644 --- a/src/ChFi3d/ChFi3d_Builder_CnCrn.cxx +++ b/src/ChFi3d/ChFi3d_Builder_CnCrn.cxx @@ -36,34 +36,20 @@ // Traitement des coins #include -#include -#include -#include #include -#include #include -#include -#include -#include -#include -#include #include #include -#include -#include -#include #include #include #include #include #include -#include #include #include #include #include #include -#include #include #include #include @@ -84,15 +70,12 @@ #include #include #include -#include #include -#include #include #include #include #include #include -#include #include #include #include @@ -103,7 +86,6 @@ #include #include #include -#include #include #include #include @@ -111,7 +93,6 @@ #include #include #include -#include #include #include #include @@ -120,7 +101,6 @@ #include #include #include -#include #include #include #include diff --git a/src/ChFi3d/ChFi3d_Builder_NotImp.cxx b/src/ChFi3d/ChFi3d_Builder_NotImp.cxx index 21038bf9df..1edf9acc9d 100644 --- a/src/ChFi3d/ChFi3d_Builder_NotImp.cxx +++ b/src/ChFi3d/ChFi3d_Builder_NotImp.cxx @@ -15,39 +15,15 @@ // commercial license or contractual agreement. -#include -#include -#include -#include #include #include -#include -#include -#include -#include -#include -#include -#include #include #include #include -#include #include #include -#include #include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include #include -#include //======================================================================= //function : SimulSurf diff --git a/src/ChFi3d/ChFi3d_Builder_SpKP.cxx b/src/ChFi3d/ChFi3d_Builder_SpKP.cxx index a1a04de26c..c893b55c79 100644 --- a/src/ChFi3d/ChFi3d_Builder_SpKP.cxx +++ b/src/ChFi3d/ChFi3d_Builder_SpKP.cxx @@ -16,38 +16,19 @@ #include -#include -#include -#include #include #include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include #include #include #include #include #include -#include #include -#include #include #include #include #include -#include -#include #include -#include -#include #include #include #include @@ -55,25 +36,16 @@ #include #include #include -#include -#include #include -#include #include -#include #include #include #include #include #include #include -#include -#include #include -#include -#include #include -#include #include #include #include diff --git a/src/ChFi3d/ChFi3d_ChBuilder.cxx b/src/ChFi3d/ChFi3d_ChBuilder.cxx index dfef8e25d1..078a647231 100644 --- a/src/ChFi3d/ChFi3d_ChBuilder.cxx +++ b/src/ChFi3d/ChFi3d_ChBuilder.cxx @@ -16,12 +16,6 @@ #include -#include -#include -#include -#include -#include -#include #include #include #include @@ -40,7 +34,6 @@ #include #include #include -#include #include #include #include @@ -50,18 +43,15 @@ #include #include #include -#include #include #include #include -#include #include #include #include #include #include #include -#include #include #ifdef OCCT_DEBUG diff --git a/src/ChFi3d/ChFi3d_ChBuilder.hxx b/src/ChFi3d/ChFi3d_ChBuilder.hxx index 2a708db296..f1ce9edbf9 100644 --- a/src/ChFi3d/ChFi3d_ChBuilder.hxx +++ b/src/ChFi3d/ChFi3d_ChBuilder.hxx @@ -17,7 +17,6 @@ #ifndef _ChFi3d_ChBuilder_HeaderFile #define _ChFi3d_ChBuilder_HeaderFile -#include #include #include #include diff --git a/src/ChFi3d/ChFi3d_ChBuilder_C2.cxx b/src/ChFi3d/ChFi3d_ChBuilder_C2.cxx index f21f2ada1a..6420d81384 100644 --- a/src/ChFi3d/ChFi3d_ChBuilder_C2.cxx +++ b/src/ChFi3d/ChFi3d_ChBuilder_C2.cxx @@ -15,20 +15,7 @@ // commercial license or contractual agreement. -#include -#include -#include #include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include //======================================================================= //function : PerformTwoCorner diff --git a/src/ChFi3d/ChFi3d_ChBuilder_C3.cxx b/src/ChFi3d/ChFi3d_ChBuilder_C3.cxx index f7f731f6c7..8167011f30 100644 --- a/src/ChFi3d/ChFi3d_ChBuilder_C3.cxx +++ b/src/ChFi3d/ChFi3d_ChBuilder_C3.cxx @@ -17,59 +17,37 @@ #include #include -#include -#include -#include -#include #include #include #include #include -#include -#include #include -#include #include #include #include #include #include #include -#include -#include -#include -#include #include #include -#include #include #include #include -#include #include #include #include #include +#include #include -#include #include -#include -#include #include #include #include #include -#include -#include -#include #include -#include -#include -#include #include #include #include -#include #include #include #include diff --git a/src/ChFi3d/ChFi3d_Debug.cxx b/src/ChFi3d/ChFi3d_Debug.cxx index d2e0c2affe..3570e34664 100644 --- a/src/ChFi3d/ChFi3d_Debug.cxx +++ b/src/ChFi3d/ChFi3d_Debug.cxx @@ -28,11 +28,9 @@ #include #include #include -#include #include #include #include -#include #ifdef DRAW #include diff --git a/src/ChFi3d/ChFi3d_FilBuilder.cxx b/src/ChFi3d/ChFi3d_FilBuilder.cxx index db74a9b2ed..65164af459 100644 --- a/src/ChFi3d/ChFi3d_FilBuilder.cxx +++ b/src/ChFi3d/ChFi3d_FilBuilder.cxx @@ -17,9 +17,6 @@ // Modified: MPS : (10-04-97) portage WNT pour GetFilletShape #include -#include -#include -#include #include #include #include @@ -42,7 +39,6 @@ #include #include #include -#include #include #include #include @@ -52,7 +48,6 @@ #include #include #include -#include #include #include #include @@ -68,7 +63,6 @@ #include #include #include -#include #ifdef OCCT_DEBUG #include diff --git a/src/ChFi3d/ChFi3d_FilBuilder.hxx b/src/ChFi3d/ChFi3d_FilBuilder.hxx index 17e4083d60..0099b2abeb 100644 --- a/src/ChFi3d/ChFi3d_FilBuilder.hxx +++ b/src/ChFi3d/ChFi3d_FilBuilder.hxx @@ -17,7 +17,6 @@ #ifndef _ChFi3d_FilBuilder_HeaderFile #define _ChFi3d_FilBuilder_HeaderFile -#include #include #include #include diff --git a/src/ChFi3d/ChFi3d_FilBuilder_C2.cxx b/src/ChFi3d/ChFi3d_FilBuilder_C2.cxx index 8b7aa491a9..b54b8f997b 100644 --- a/src/ChFi3d/ChFi3d_FilBuilder_C2.cxx +++ b/src/ChFi3d/ChFi3d_FilBuilder_C2.cxx @@ -17,15 +17,7 @@ #include #include -#include #include -#include -#include -#include -#include -#include -#include -#include #include #include #include @@ -37,8 +29,6 @@ #include #include #include -#include -#include #include #include #include @@ -46,40 +36,22 @@ #include #include #include -#include +#include #include #include -#include #include -#include -#include #include -#include -#include #include #include #include #include #include -#include #include #include #include -#include -#include -#include -#include -#include -#include -#include -#include -#include #include #include #include -#include -#include -#include #include #include #include @@ -92,8 +64,6 @@ #include #include #include -#include -#include #ifdef DRAW #include diff --git a/src/ChFi3d/ChFi3d_FilBuilder_C3.cxx b/src/ChFi3d/ChFi3d_FilBuilder_C3.cxx index 46370db8b8..6403c2141e 100644 --- a/src/ChFi3d/ChFi3d_FilBuilder_C3.cxx +++ b/src/ChFi3d/ChFi3d_FilBuilder_C3.cxx @@ -16,13 +16,6 @@ #include -#include -#include -#include -#include -#include -#include -#include #include #include #include @@ -36,51 +29,27 @@ #include #include #include -#include #include -#include #include #include #include #include -#include #include -#include #include -#include -#include -#include -#include -#include #include -#include -#include -#include -#include #include -#include -#include +#include #include #include -#include #include #include #include -#include -#include -#include -#include #include #include #include -#include #include -#include #include -#include #include -#include -#include #include #include #include diff --git a/src/ChFiDS/ChFiDS_ChamfSpine.hxx b/src/ChFiDS/ChFiDS_ChamfSpine.hxx index be957da658..8632241968 100644 --- a/src/ChFiDS/ChFiDS_ChamfSpine.hxx +++ b/src/ChFiDS/ChFiDS_ChamfSpine.hxx @@ -18,12 +18,9 @@ #define _ChFiDS_ChamfSpine_HeaderFile #include -#include #include -#include #include -#include #include diff --git a/src/ChFiDS/ChFiDS_CircSection.hxx b/src/ChFiDS/ChFiDS_CircSection.hxx index e5e5be4088..88677095d2 100644 --- a/src/ChFiDS/ChFiDS_CircSection.hxx +++ b/src/ChFiDS/ChFiDS_CircSection.hxx @@ -23,7 +23,6 @@ #include #include -#include //! A Section of fillet. diff --git a/src/ChFiDS/ChFiDS_CommonPoint.cxx b/src/ChFiDS/ChFiDS_CommonPoint.cxx index 754fb26a46..e68424220f 100644 --- a/src/ChFiDS/ChFiDS_CommonPoint.cxx +++ b/src/ChFiDS/ChFiDS_CommonPoint.cxx @@ -16,10 +16,7 @@ #include -#include -#include #include -#include #include #include diff --git a/src/ChFiDS/ChFiDS_CommonPoint.hxx b/src/ChFiDS/ChFiDS_CommonPoint.hxx index 15f725ecc1..d61da63b67 100644 --- a/src/ChFiDS/ChFiDS_CommonPoint.hxx +++ b/src/ChFiDS/ChFiDS_CommonPoint.hxx @@ -25,7 +25,6 @@ #include #include #include -#include #include #include diff --git a/src/ChFiDS/ChFiDS_ElSpine.cxx b/src/ChFiDS/ChFiDS_ElSpine.cxx index 8e46350225..a43d69b8bd 100644 --- a/src/ChFiDS/ChFiDS_ElSpine.cxx +++ b/src/ChFiDS/ChFiDS_ElSpine.cxx @@ -18,7 +18,6 @@ #include #include #include -#include #include #include #include @@ -31,9 +30,6 @@ #include #include #include -#include -#include -#include IMPLEMENT_STANDARD_RTTIEXT(ChFiDS_ElSpine, Adaptor3d_Curve) diff --git a/src/ChFiDS/ChFiDS_ElSpine.hxx b/src/ChFiDS/ChFiDS_ElSpine.hxx index 451fda9ef5..ece7ccf4b2 100644 --- a/src/ChFiDS/ChFiDS_ElSpine.hxx +++ b/src/ChFiDS/ChFiDS_ElSpine.hxx @@ -25,8 +25,6 @@ #include #include #include -#include -#include #include #include #include diff --git a/src/ChFiDS/ChFiDS_FilSpine.cxx b/src/ChFiDS/ChFiDS_FilSpine.cxx index 9506dc44b3..bfd3538257 100644 --- a/src/ChFiDS/ChFiDS_FilSpine.cxx +++ b/src/ChFiDS/ChFiDS_FilSpine.cxx @@ -24,7 +24,6 @@ #include #include #include -#include #include #include #include diff --git a/src/ChFiDS/ChFiDS_HData.hxx b/src/ChFiDS/ChFiDS_HData.hxx index f39cfa855d..9e9f76a82d 100644 --- a/src/ChFiDS/ChFiDS_HData.hxx +++ b/src/ChFiDS/ChFiDS_HData.hxx @@ -17,7 +17,6 @@ #ifndef ChFiDS_HData_HeaderFile #define ChFiDS_HData_HeaderFile -#include #include #include diff --git a/src/ChFiDS/ChFiDS_Map.hxx b/src/ChFiDS/ChFiDS_Map.hxx index 9de642c619..1b73eb64c1 100644 --- a/src/ChFiDS/ChFiDS_Map.hxx +++ b/src/ChFiDS/ChFiDS_Map.hxx @@ -25,7 +25,6 @@ #include #include #include -#include class TopoDS_Shape; diff --git a/src/ChFiDS/ChFiDS_Regul.hxx b/src/ChFiDS/ChFiDS_Regul.hxx index 2da4c5e88f..c76f1d5bff 100644 --- a/src/ChFiDS/ChFiDS_Regul.hxx +++ b/src/ChFiDS/ChFiDS_Regul.hxx @@ -21,7 +21,6 @@ #include #include -#include #include diff --git a/src/ChFiDS/ChFiDS_SecHArray1.hxx b/src/ChFiDS/ChFiDS_SecHArray1.hxx index 28ec3b8c93..a41a7904ba 100644 --- a/src/ChFiDS/ChFiDS_SecHArray1.hxx +++ b/src/ChFiDS/ChFiDS_SecHArray1.hxx @@ -17,7 +17,6 @@ #ifndef ChFiDS_SecHArray1_HeaderFile #define ChFiDS_SecHArray1_HeaderFile -#include #include #include diff --git a/src/ChFiDS/ChFiDS_Spine.cxx b/src/ChFiDS/ChFiDS_Spine.cxx index 7b721c21a5..b6c08471e5 100644 --- a/src/ChFiDS/ChFiDS_Spine.cxx +++ b/src/ChFiDS/ChFiDS_Spine.cxx @@ -17,10 +17,6 @@ // Modified by isg, Thu Mar 17 09:21:31 1994 #include -#include -#include -#include -#include #include #include #include diff --git a/src/ChFiDS/ChFiDS_Stripe.hxx b/src/ChFiDS/ChFiDS_Stripe.hxx index bcfda80450..b8289715ad 100644 --- a/src/ChFiDS/ChFiDS_Stripe.hxx +++ b/src/ChFiDS/ChFiDS_Stripe.hxx @@ -20,12 +20,10 @@ #include #include -#include #include #include #include #include -#include class ChFiDS_Spine; class Geom2d_Curve; diff --git a/src/ChFiDS/ChFiDS_StripeMap.cxx b/src/ChFiDS/ChFiDS_StripeMap.cxx index 8c71c09e36..c3970c0fdc 100644 --- a/src/ChFiDS/ChFiDS_StripeMap.cxx +++ b/src/ChFiDS/ChFiDS_StripeMap.cxx @@ -15,7 +15,6 @@ // commercial license or contractual agreement. -#include #include #include diff --git a/src/ChFiDS/ChFiDS_SurfData.cxx b/src/ChFiDS/ChFiDS_SurfData.cxx index f66a5d9430..ab1e1bfb90 100644 --- a/src/ChFiDS/ChFiDS_SurfData.cxx +++ b/src/ChFiDS/ChFiDS_SurfData.cxx @@ -15,8 +15,6 @@ // commercial license or contractual agreement. -#include -#include #include #include #include diff --git a/src/ChFiDS/ChFiDS_SurfData.hxx b/src/ChFiDS/ChFiDS_SurfData.hxx index 3113807f09..3f09cb9b63 100644 --- a/src/ChFiDS/ChFiDS_SurfData.hxx +++ b/src/ChFiDS/ChFiDS_SurfData.hxx @@ -18,14 +18,12 @@ #define _ChFiDS_SurfData_HeaderFile #include -#include #include #include #include #include #include -#include #include #include diff --git a/src/ChFiKPart/ChFiKPart_ComputeData.cxx b/src/ChFiKPart/ChFiKPart_ComputeData.cxx index 1071c71b20..8305e9e80c 100644 --- a/src/ChFiKPart/ChFiKPart_ComputeData.cxx +++ b/src/ChFiKPart/ChFiKPart_ComputeData.cxx @@ -15,7 +15,6 @@ // commercial license or contractual agreement. -#include #include #include #include @@ -35,53 +34,16 @@ #include #include #include -#include -#include -#include -#include -#include -#include #include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include #include #include -#include -#include -#include -#include #include #include -#include -#include -#include -#include -#include -#include #include -#include -#include -#include -#include -#include -#include -#include -#include -#include #include #include #include -#include #include -#include //#include //#include diff --git a/src/ChFiKPart/ChFiKPart_ComputeData_CS.hxx b/src/ChFiKPart/ChFiKPart_ComputeData_CS.hxx index 4eb71729c3..ab010b382c 100644 --- a/src/ChFiKPart/ChFiKPart_ComputeData_CS.hxx +++ b/src/ChFiKPart/ChFiKPart_ComputeData_CS.hxx @@ -18,7 +18,6 @@ #define ChFiKPart_ComputeData_CS_HeaderFile #include -#include #include #include diff --git a/src/ChFiKPart/ChFiKPart_ComputeData_ChAsymPlnCon.cxx b/src/ChFiKPart/ChFiKPart_ComputeData_ChAsymPlnCon.cxx index 54c78ead82..812867bcdd 100644 --- a/src/ChFiKPart/ChFiKPart_ComputeData_ChAsymPlnCon.cxx +++ b/src/ChFiKPart/ChFiKPart_ComputeData_ChAsymPlnCon.cxx @@ -16,7 +16,6 @@ #include -#include #include #include #include diff --git a/src/ChFiKPart/ChFiKPart_ComputeData_ChPlnCon.cxx b/src/ChFiKPart/ChFiKPart_ComputeData_ChPlnCon.cxx index b0f0cb1c2f..a400a735f0 100644 --- a/src/ChFiKPart/ChFiKPart_ComputeData_ChPlnCon.cxx +++ b/src/ChFiKPart/ChFiKPart_ComputeData_ChPlnCon.cxx @@ -23,19 +23,10 @@ #include #include #include -#include -#include -#include -#include -#include -#include #include #include #include -#include -#include #include -#include #include #include #include diff --git a/src/ChFiKPart/ChFiKPart_ComputeData_Fcts.hxx b/src/ChFiKPart/ChFiKPart_ComputeData_Fcts.hxx index 10d774861e..588a643d7b 100644 --- a/src/ChFiKPart/ChFiKPart_ComputeData_Fcts.hxx +++ b/src/ChFiKPart/ChFiKPart_ComputeData_Fcts.hxx @@ -17,11 +17,7 @@ #ifndef _ChFiKPart_ComputeData_Fcts_HeaderFile #define _ChFiKPart_ComputeData_Fcts_HeaderFile -#include -#include #include -#include -#include #include #include #include diff --git a/src/ChFiKPart/ChFiKPart_ComputeData_FilPlnCon.cxx b/src/ChFiKPart/ChFiKPart_ComputeData_FilPlnCon.cxx index ca0df400fb..03b32f2a26 100644 --- a/src/ChFiKPart/ChFiKPart_ComputeData_FilPlnCon.cxx +++ b/src/ChFiKPart/ChFiKPart_ComputeData_FilPlnCon.cxx @@ -16,7 +16,6 @@ #include -#include #include #include #include @@ -25,7 +24,6 @@ #include #include #include -#include #include #include #include @@ -35,7 +33,6 @@ #include #include #include -#include #include #include #include diff --git a/src/ChFiKPart/ChFiKPart_ComputeData_FilPlnPln.cxx b/src/ChFiKPart/ChFiKPart_ComputeData_FilPlnPln.cxx index 096dc16dd7..a377202b87 100644 --- a/src/ChFiKPart/ChFiKPart_ComputeData_FilPlnPln.cxx +++ b/src/ChFiKPart/ChFiKPart_ComputeData_FilPlnPln.cxx @@ -16,7 +16,6 @@ #include -#include #include #include #include @@ -26,9 +25,7 @@ #include #include #include -#include #include -#include #include #include #include diff --git a/src/ChFiKPart/ChFiKPart_ComputeData_Rotule.cxx b/src/ChFiKPart/ChFiKPart_ComputeData_Rotule.cxx index 2e12faab80..57f4432200 100644 --- a/src/ChFiKPart/ChFiKPart_ComputeData_Rotule.cxx +++ b/src/ChFiKPart/ChFiKPart_ComputeData_Rotule.cxx @@ -16,7 +16,6 @@ #include -#include #include #include #include @@ -25,7 +24,6 @@ #include #include #include -#include #include #include #include @@ -33,8 +31,6 @@ #include #include #include -#include -#include #include #include #include diff --git a/src/TopExp/TopExp.hxx b/src/TopExp/TopExp.hxx index bc3b734b9e..33b39ab7e3 100644 --- a/src/TopExp/TopExp.hxx +++ b/src/TopExp/TopExp.hxx @@ -25,9 +25,10 @@ #include #include #include +#include #include + class TopoDS_Shape; -class TopoDS_Vertex; class TopoDS_Edge; class TopoDS_Wire; From 5614b1369a232f43e59cb9be4f5f8efd2075608d Mon Sep 17 00:00:00 2001 From: kgv Date: Tue, 18 Jan 2022 15:28:02 +0300 Subject: [PATCH 199/639] 0032783: Documentation - Doxygen 1.9.3 generates corrupted HTML for dox/samples/ocaf.md Fix incorrect/fragile Markdown syntax in samples/ocaf and user_guides/modeling_data. --- dox/samples/ocaf.md | 807 +++++----- .../modeling_data/modeling_data.md | 1388 +++++++++-------- 2 files changed, 1161 insertions(+), 1034 deletions(-) diff --git a/dox/samples/ocaf.md b/dox/samples/ocaf.md index b839a2b7bb..4d7bb70950 100644 --- a/dox/samples/ocaf.md +++ b/dox/samples/ocaf.md @@ -1,82 +1,76 @@ OCAF: Usage Tutorial {#samples__ocaf} ======== -## Getting Started +## Getting Started + +At the beginning of your development, you first define an application class by inheriting from the Application abstract class. +You only have to create and determine the resources of the application for specifying the format of your documents (you generally use the standard one) and their file extension. + +Then, you design the application data model by organizing attributes you choose among those provided with OCAF. +You can specialize these attributes using the User attribute. For example, if you need a reflection coefficient, +you aggregate a User attribute identified as a reflection coefficient +with a Real attribute containing the value of the coefficient (as such, you don't define a new class). + +If you need application specific data not provided with OCAF, for example, to incorporate a finite element model in the data structure, +you define a new attribute class containing the mesh, and you include its persistent homologue in a new file format. + +Once you have implemented the commands which create and modify the data structure according to your specification, OCAF provides you, without any additional programming: + +* Persistent reference to any data, including geometric elements - several documents can be linked with such reference; +* Document-View association; +* Ready-to-use functions such as: + * Undo-redo; + * Save and open application data. + +Finally, you develop the application's graphical user interface using the toolkit of your choice, for example: +* KDE Qt or GNOME GTK+ on Linux; +* Microsoft Foundation Classes (MFC) on Windows Motif on Sun; +* Other commercial products such as Ilog Views. + +You can also implement the user interface in the Java language using the Swing-based Java Application Desktop component (JAD) provided with OCAF. - At the beginning of your development, you first define an application class by inheriting from the Application abstract class. - You only have to create and determine the resources of the application - for specifying the format of your documents (you generally use the standard one) and their file extension. - - Then, you design the application data model by organizing attributes you choose among those provided with OCAF. - You can specialize these attributes using the User attribute. For example, if you need a reflection coefficient, - you aggregate a User attribute identified as a reflection coefficient - with a Real attribute containing the value of the coefficient (as such, you don't define a new class). - - If you need application specific data not provided with OCAF, for example, - to incorporate a finite element model in the data structure, - you define a new attribute class containing the mesh, - and you include its persistent homologue in a new file format. - - Once you have implemented the commands which create and modify the data structure - according to your specification, OCAF provides you, without any additional programming: - - * Persistent reference to any data, including geometric elements â€" several documents can be linked with such reference; - * Document-View association; - * Ready-to-use functions such as : - * Undo-redo; - * Save and open application data. - - Finally, you develop the application's graphical user interface using the toolkit of your choice, for example: - * KDE Qt or GNOME GTK+ on Linux; - * Microsoft Foundation Classes (MFC) on Windows Motif on Sun; - * Other commercial products such as Ilog Views. - - You can also implement the user interface in the Java language using - the Swing-based Java Application Desktop component (JAD) provided with OCAF. - ## An example of OCAF usage -To create a useful OCAF-based application, it is necessary to redefine two deferred methods: Formats and ResourcesName +To create a useful OCAF-based application, it is necessary to redefine two deferred methods: Formats and ResourcesName -In the Formats method, add the format of the documents, which need to be read by the application and may have been built in other applications. +In the Formats method, add the format of the documents, which need to be read by the application and may have been built in other applications. For example: -~~~~ +~~~~{.cpp} void myApplication::Formats(TColStd_SequenceOfExtendedString& Formats) { Formats.Append(TCollection_ExtendedString ("OCAF-myApplication")); } ~~~~ -In the ResourcesName method, you only define the name of the resource file. This -file contains several definitions for the saving and opening mechanisms associated -with each format and calling of the plug-in file. +In the ResourcesName method, you only define the name of the resource file. +This file contains several definitions for the saving and opening mechanisms associated with each format and calling of the plug-in file. -~~~~ +~~~~{.cpp} Standard_CString myApplication::ResourcesName() { return Standard_CString ("Resources"); } ~~~~ -To obtain the saving and opening mechanisms, it is necessary to set two environment variables: CSF_PluginDefaults, which defines the path of the plug-in file, and CSF_ResourcesDefault, which defines the resource file: +To obtain the saving and opening mechanisms, it is necessary to set two environment variables: CSF_PluginDefaults, which defines the path of the plug-in file, +and CSF_ResourcesDefault, which defines the resource file: -~~~~ - SetEnvironmentVariable ( "CSF_ResourcesDefaults",myDirectory); - SetEnvironmentVariable ( "CSF_PluginDefaults",myDirectory); +~~~~{.cpp} + SetEnvironmentVariable ("CSF_ResourcesDefaults", myDirectory); + SetEnvironmentVariable ("CSF_PluginDefaults", myDirectory); ~~~~ -The plugin and the resource files of the application will be located in myDirector. +The plugin and the resource files of the application will be located in myDirector. The name of the plugin file must be Plugin. ### Resource File -The resource file describes the documents (type and extension) and -the type of data that the application can manipulate +The resource file describes the documents (type and extension) and the type of data that the application can manipulate by identifying the storage and retrieval drivers appropriate for this data. -Each driver is unique and identified by a GUID generated, for example, with the uuidgen tool in Windows. +Each driver is unique and identified by a GUID generated, for example, with the uuidgen tool in Windows. Five drivers are required to use all standard attributes provided within OCAF: @@ -86,8 +80,7 @@ Five drivers are required to use all standard attributes provided within OCAF: * the attribute storage driver (47b0b826-d931-11d1-b5da-00a0c9064368) * the attribute retrieval driver (47b0b827-d931-11d1-b5da-00a0c9064368) -These drivers are provided as plug-ins and are located in the PappStdPlugin library. - +These drivers are provided as plug-ins and are located in the PappStdPlugin library. For example, this is a resource file, which declares a new model document OCAF-MyApplication: @@ -104,12 +97,11 @@ OCAF-MyApplication.AttributeRetrievalPlugin: 47b0b827-d931-11d1-b5da-00a0c906436 ### Plugin File -The plugin file describes the list of required plug-ins to run the application and the -libraries in which plug-ins are located. +The plugin file describes the list of required plug-ins to run the application and the libraries in which plug-ins are located. -You need at least the FWOSPlugin and the plug-in drivers to run an OCAF application. +You need at least the FWOSPlugin and the plug-in drivers to run an OCAF application. -The syntax of each item is Identification.Location Library_Name, where: +The syntax of each item is Identification.Location Library_Name, where: * Identification is GUID. * Location defines the location of the Identification (where its definition is found). * Library_Name is the name (and path to) the library, where the plug-in is located. @@ -125,412 +117,414 @@ ad696002-5b34-11d1-b5ba-00a0c9064368.Location: PAppStdPlugin 47b0b826-d931-11d1-b5da-00a0c9064368.Location: PAppStdPlugin 47b0b827-d931-11d1-b5da-00a0c9064368.Location: PAppStdPlugin ~~~~ - + ## Implementation of Attribute Transformation in a HXX file -~~~~ -\#include +~~~~{.cpp} +#include -\#include -\#include -\#include -\#include +#include +#include +#include +#include //! This attribute implements a transformation data container class MyPackage_Transformation : public TDF_Attribute { -public: - //!@ name Static methods +public: //!@ name Static methods - //! The method returns a unique GUID of this attribute. - //! By means of this GUID this attribute may be identified - //! among other attributes attached to the same label. + //! The method returns a unique GUID of this attribute. + //! By means of this GUID this attribute may be identified + //! among other attributes attached to the same label. Standard_EXPORT static const Standard_GUID& GetID (); - //! Finds or creates the attribute attached to . - //! The found or created attribute is returned. + //! Finds or creates the attribute attached to . + //! The found or created attribute is returned. Standard_EXPORT static Handle(MyPackage_Transformation) Set (const TDF_Label theLabel); - //!@ name Methods for access to the attribute data - - //! The method returns the transformation. - Standard_EXPORT gp_Trsf Get () const; +public: //!@ name Methods for access to the attribute data - //!@ name Methods for setting the data of transformation + //! The method returns the transformation. + Standard_EXPORT gp_Trsf Get () const; - //! The method defines a rotation type of transformation. - Standard_EXPORT void SetRotation (const gp_Ax1& theAxis, Standard_Real theAngle); +public: //!@ name Methods for setting the data of transformation - //! The method defines a translation type of transformation. - Standard_EXPORT void SetTranslation (const gp_Vec& theVector); + //! The method defines a rotation type of transformation. + Standard_EXPORT void SetRotation (const gp_Ax1& theAxis, Standard_Real theAngle); - //! The method defines a point mirror type of transformation (point symmetry). - Standard_EXPORT void SetMirror (const gp_Pnt& thePoint); + //! The method defines a translation type of transformation. + Standard_EXPORT void SetTranslation (const gp_Vec& theVector); - //! The method defines an axis mirror type of transformation (axial symmetry). - Standard_EXPORT void SetMirror (const gp_Ax1& theAxis); + //! The method defines a point mirror type of transformation (point symmetry). + Standard_EXPORT void SetMirror (const gp_Pnt& thePoint); - //! The method defines a point mirror type of transformation (planar symmetry). - Standard_EXPORT void SetMirror (const gp_Ax2& thePlane); + //! The method defines an axis mirror type of transformation (axial symmetry). + Standard_EXPORT void SetMirror (const gp_Ax1& theAxis); - //! The method defines a scale type of transformation. - Standard_EXPORT void SetScale (const gp_Pnt& thePoint, Standard_Real theScale); + //! The method defines a point mirror type of transformation (planar symmetry). + Standard_EXPORT void SetMirror (const gp_Ax2& thePlane); + + //! The method defines a scale type of transformation. + Standard_EXPORT void SetScale (const gp_Pnt& thePoint, Standard_Real theScale); //! The method defines a complex type of transformation from one coordinate system to another. - Standard_EXPORT void SetTransformation (const gp_Ax3& theCoordinateSystem1, const gp_Ax3& theCoordinateSystem2); + Standard_EXPORT void SetTransformation (const gp_Ax3& theCoordinateSystem1, const gp_Ax3& theCoordinateSystem2); + +public: //!@ name Overridden methods from TDF_Attribute - //!@ name Overridden methods from TDF_Attribute - - //! The method returns a unique GUID of the attribute. - //! By means of this GUID this attribute may be identified among other attributes attached to the same label. - Standard_EXPORT const Standard_GUID& ID () const; + //! The method returns a unique GUID of the attribute. + //! By means of this GUID this attribute may be identified among other attributes attached to the same label. + Standard_EXPORT const Standard_GUID& ID () const; - //! The method is called on Undo / Redo. - //! It copies the content of theAttribute into this attribute (copies the fields). - Standard_EXPORT void Restore (const Handle(TDF_Attribute)& theAttribute); + //! The method is called on Undo / Redo. + //! It copies the content of theAttribute into this attribute (copies the fields). + Standard_EXPORT void Restore (const Handle(TDF_Attribute)& theAttribute); - //! It creates a new instance of this attribute. - //! It is called on Copy / Paste, Undo / Redo. + //! It creates a new instance of this attribute. + //! It is called on Copy / Paste, Undo / Redo. Standard_EXPORT Handle(TDF_Attribute) NewEmpty () const; - //! The method is called on Copy / Paste. - //! It copies the content of this attribute into theAttribute (copies the fields). - Standard_EXPORT void Paste (const Handle(TDF_Attribute)& theAttribute, const Handle(TDF_RelocationTable)& theRelocationTable); + //! The method is called on Copy / Paste. + //! It copies the content of this attribute into theAttribute (copies the fields). + Standard_EXPORT void Paste (const Handle(TDF_Attribute)& theAttribute, const Handle(TDF_RelocationTable)& theRelocationTable); - //! Prints the content of this attribute into the stream. + //! Prints the content of this attribute into the stream. Standard_EXPORT Standard_OStream& Dump(Standard_OStream& theOS); - //!@ name Constructor +public: //!@ name Constructor //! The C++ constructor of this attribute class. - //! Usually it is never called outside this class. + //! Usually it is never called outside this class. Standard_EXPORT MyPackage_Transformation(); private: gp_TrsfForm myType; - // Axes (Ax1, Ax2, Ax3) + // Axes (Ax1, Ax2, Ax3) gp_Ax1 myAx1; gp_Ax2 myAx2; gp_Ax3 myFirstAx3; gp_Ax3 mySecondAx3; - // Scalar values + // Scalar values Standard_Real myAngle; Standard_Real myScale; - // Points + // Points gp_Pnt myFirstPoint; gp_Pnt mySecondPoint; -}; +}; ~~~~ ## Implementation of Attribute Transformation in a CPP file ~~~~{.cpp} -\#include - -//======================================================================= -//function : GetID -//purpose : The method returns a unique GUID of this attribute. -// By means of this GUID this attribute may be identified -// among other attributes attached to the same label. -//======================================================================= -const Standard_GUID& MyPackage_Transformation::GetID() -{ - static Standard_GUID ID("4443368E-C808-4468-984D-B26906BA8573"); - return ID; -} - -//======================================================================= -//function : Set -//purpose : Finds or creates the attribute attached to . -// The found or created attribute is returned. -//======================================================================= -Handle(MyPackage_Transformation) MyPackage_Transformation::Set(const TDF_Label& theLabel) -{ - Handle(MyPackage_Transformation) T; - if (!theLabel.FindAttribute(MyPackage_Transformation::GetID(), T)) - { - T = new MyPackage_Transformation(); - theLabel.AddAttribute(T); - } - return T; -} - -//======================================================================= -//function : Get -//purpose : The method returns the transformation. -//======================================================================= -gp_Trsf MyPackage_Transformation::Get() const -{ - gp_Trsf transformation; - switch (myType) - { - case gp_Identity: - { - break; - } - case gp_Rotation: - { - transformation.SetRotation(myAx1, myAngle); - break; - } - case gp_Translation: - { - transformation.SetTranslation(myFirstPoint, mySecondPoint); - break; - } - case gp_PntMirror: - { - transformation.SetMirror(myFirstPoint); - break; - } - case gp_Ax1Mirror: - { - transformation.SetMirror(myAx1); - break; - } - case gp_Ax2Mirror: - { - transformation.SetMirror(myAx2); - break; - } - case gp_Scale: - { - transformation.SetScale(myFirstPoint, myScale); - break; - } - case gp_CompoundTrsf: - { - transformation.SetTransformation(myFirstAx3, mySecondAx3); - break; - } - case gp_Other: - { - break; - } - } - return transformation; -} - -//======================================================================= -//function : SetRotation -//purpose : The method defines a rotation type of transformation. -//======================================================================= -void MyPackage_Transformation::SetRotation(const gp_Ax1& theAxis, const Standard_Real theAngle) -{ - Backup(); - myType = gp_Rotation; - myAx1 = theAxis; - myAngle = theAngle; -} - -//======================================================================= -//function : SetTranslation -//purpose : The method defines a translation type of transformation. -//======================================================================= -void MyPackage_Transformation::SetTranslation(const gp_Vec& theVector) -{ - Backup(); - myType = gp_Translation; - myFirstPoint.SetCoord(0, 0, 0); - mySecondPoint.SetCoord(theVector.X(), theVector.Y(), theVector.Z()); -} - -//======================================================================= -//function : SetMirror -//purpose : The method defines a point mirror type of transformation -// (point symmetry). -//======================================================================= -void MyPackage_Transformation::SetMirror(const gp_Pnt& thePoint) -{ - Backup(); - myType = gp_PntMirror; - myFirstPoint = thePoint; -} - -//======================================================================= -//function : SetMirror -//purpose : The method defines an axis mirror type of transformation -// (axial symmetry). -//======================================================================= -void MyPackage_Transformation::SetMirror(const gp_Ax1& theAxis) -{ - Backup(); - myType = gp_Ax1Mirror; - myAx1 = theAxis; -} - -//======================================================================= -//function : SetMirror -//purpose : The method defines a point mirror type of transformation -// (planar symmetry). -//======================================================================= -void MyPackage_Transformation::SetMirror(const gp_Ax2& thePlane) -{ - Backup(); - myType = gp_Ax2Mirror; - myAx2 = thePlane; -} - -//======================================================================= -//function : SetScale -//purpose : The method defines a scale type of transformation. -//======================================================================= -void MyPackage_Transformation::SetScale(const gp_Pnt& thePoint, const Standard_Real theScale) -{ - Backup(); - myType = gp_Scale; - myFirstPoint = thePoint; - myScale = theScale; -} - -//======================================================================= -//function : SetTransformation -//purpose : The method defines a complex type of transformation -// from one coordinate system to another. -//======================================================================= -void MyPackage_Transformation::SetTransformation(const gp_Ax3& theCoordinateSystem1, - const gp_Ax3& theCoordinateSystem2) -{ - Backup(); - myFirstAx3 = theCoordinateSystem1; - mySecondAx3 = theCoordinateSystem2; -} - -//======================================================================= -//function : ID -//purpose : The method returns a unique GUID of the attribute. -// By means of this GUID this attribute may be identified -// among other attributes attached to the same label. -//======================================================================= -const Standard_GUID& MyPackage_Transformation::ID() const -{ - return GetID(); -} - -//======================================================================= -//function : Restore -//purpose : The method is called on Undo / Redo. -// It copies the content of -// into this attribute (copies the fields). -//======================================================================= -void MyPackage_Transformation::Restore(const Handle(TDF_Attribute)& theAttribute) -{ - Handle(MyPackage_Transformation) theTransformation = Handle(MyPackage_Transformation)::DownCast(theAttribute); - myType = theTransformation->myType; - myAx1 = theTransformation->myAx1; - myAx2 = theTransformation->myAx2; - myFirstAx3 = theTransformation->myFirstAx3; - mySecondAx3 = theTransformation->mySecondAx3; - myAngle = theTransformation->myAngle; - myScale = theTransformation->myScale; - myFirstPoint = theTransformation->myFirstPoint; - mySecondPoint = theTransformation->mySecondPoint; -} - -//======================================================================= -//function : NewEmpty -//purpose : It creates a new instance of this attribute. -// It is called on Copy / Paste, Undo / Redo. -//======================================================================= -Handle(TDF_Attribute) MyPackage_Transformation::NewEmpty() const -{ - return new MyPackage_Transformation(); -} - -//======================================================================= -//function : Paste -//purpose : The method is called on Copy / Paste. -// It copies the content of this attribute into -// (copies the fields). -//======================================================================= -void MyPackage_Transformation::Paste(const Handle(TDF_Attribute)& theAttribute, - const Handle(TDF_RelocationTable)& ) const -{ - Handle(MyPackage_Transformation) theTransformation = Handle(MyPackage_Transformation)::DownCast(theAttribute); - theTransformation->myType = myType; - theTransformation->myAx1 = myAx1; - theTransformation->myAx2 = myAx2; - theTransformation->myFirstAx3 = myFirstAx3; - theTransformation->mySecondAx3 = mySecondAx3; - theTransformation->myAngle = myAngle; - theTransformation->myScale = myScale; - theTransformation->myFirstPoint = myFirstPoint; - theTransformation->mySecondPoint = mySecondPoint; -} - -//======================================================================= -//function : Dump -//purpose : Prints the content of this attribute into the stream. -//======================================================================= -Standard_OStream& MyPackage_Transformation::Dump(Standard_OStream& anOS) const -{ - anOS = "Transformation: "; - switch (myType) - { - case gp_Identity: - { - anOS = "gp_Identity"; - break; - } - case gp_Rotation: - { - anOS = "gp_Rotation"; - break; - } - case gp_Translation: - { - anOS = "gp_Translation"; - break; - } - case gp_PntMirror: - { - anOS = "gp_PntMirror"; - break; - } - case gp_Ax1Mirror: - { - anOS = "gp_Ax1Mirror"; - break; - } - case gp_Ax2Mirror: - { - anOS = "gp_Ax2Mirror"; - break; - } - case gp_Scale: - { - anOS = "gp_Scale"; - break; - } - case gp_CompoundTrsf: - { - anOS = "gp_CompoundTrsf"; - break; - } - case gp_Other: - { - anOS = "gp_Other"; - break; - } - } - return anOS; -} - -//======================================================================= -//function : MyPackage_Transformation -//purpose : A constructor. -//======================================================================= -MyPackage_Transformation::MyPackage_Transformation():myType(gp_Identity){ +#include + +//======================================================================= +//function : GetID +//purpose : The method returns a unique GUID of this attribute. +// By means of this GUID this attribute may be identified +// among other attributes attached to the same label. +//======================================================================= +const Standard_GUID& MyPackage_Transformation::GetID() +{ + static Standard_GUID ID("4443368E-C808-4468-984D-B26906BA8573"); + return ID; +} + +//======================================================================= +//function : Set +//purpose : Finds or creates the attribute attached to . +// The found or created attribute is returned. +//======================================================================= +Handle(MyPackage_Transformation) MyPackage_Transformation::Set(const TDF_Label& theLabel) +{ + Handle(MyPackage_Transformation) T; + if (!theLabel.FindAttribute(MyPackage_Transformation::GetID(), T)) + { + T = new MyPackage_Transformation(); + theLabel.AddAttribute(T); + } + return T; +} + +//======================================================================= +//function : Get +//purpose : The method returns the transformation. +//======================================================================= +gp_Trsf MyPackage_Transformation::Get() const +{ + gp_Trsf transformation; + switch (myType) + { + case gp_Identity: + { + break; + } + case gp_Rotation: + { + transformation.SetRotation(myAx1, myAngle); + break; + } + case gp_Translation: + { + transformation.SetTranslation(myFirstPoint, mySecondPoint); + break; + } + case gp_PntMirror: + { + transformation.SetMirror(myFirstPoint); + break; + } + case gp_Ax1Mirror: + { + transformation.SetMirror(myAx1); + break; + } + case gp_Ax2Mirror: + { + transformation.SetMirror(myAx2); + break; + } + case gp_Scale: + { + transformation.SetScale(myFirstPoint, myScale); + break; + } + case gp_CompoundTrsf: + { + transformation.SetTransformation(myFirstAx3, mySecondAx3); + break; + } + case gp_Other: + { + break; + } + } + return transformation; +} + +//======================================================================= +//function : SetRotation +//purpose : The method defines a rotation type of transformation. +//======================================================================= +void MyPackage_Transformation::SetRotation(const gp_Ax1& theAxis, const Standard_Real theAngle) +{ + Backup(); + myType = gp_Rotation; + myAx1 = theAxis; + myAngle = theAngle; +} + +//======================================================================= +//function : SetTranslation +//purpose : The method defines a translation type of transformation. +//======================================================================= +void MyPackage_Transformation::SetTranslation(const gp_Vec& theVector) +{ + Backup(); + myType = gp_Translation; + myFirstPoint.SetCoord(0, 0, 0); + mySecondPoint.SetCoord(theVector.X(), theVector.Y(), theVector.Z()); +} + +//======================================================================= +//function : SetMirror +//purpose : The method defines a point mirror type of transformation +// (point symmetry). +//======================================================================= +void MyPackage_Transformation::SetMirror(const gp_Pnt& thePoint) +{ + Backup(); + myType = gp_PntMirror; + myFirstPoint = thePoint; +} + +//======================================================================= +//function : SetMirror +//purpose : The method defines an axis mirror type of transformation +// (axial symmetry). +//======================================================================= +void MyPackage_Transformation::SetMirror(const gp_Ax1& theAxis) +{ + Backup(); + myType = gp_Ax1Mirror; + myAx1 = theAxis; +} + +//======================================================================= +//function : SetMirror +//purpose : The method defines a point mirror type of transformation +// (planar symmetry). +//======================================================================= +void MyPackage_Transformation::SetMirror(const gp_Ax2& thePlane) +{ + Backup(); + myType = gp_Ax2Mirror; + myAx2 = thePlane; +} + +//======================================================================= +//function : SetScale +//purpose : The method defines a scale type of transformation. +//======================================================================= +void MyPackage_Transformation::SetScale(const gp_Pnt& thePoint, const Standard_Real theScale) +{ + Backup(); + myType = gp_Scale; + myFirstPoint = thePoint; + myScale = theScale; +} + +//======================================================================= +//function : SetTransformation +//purpose : The method defines a complex type of transformation +// from one coordinate system to another +//======================================================================= +void MyPackage_Transformation::SetTransformation (const gp_Ax3& theCoordinateSystem1, + const gp_Ax3& theCoordinateSystem2) +{ + Backup(); + myFirstAx3 = theCoordinateSystem1; + mySecondAx3 = theCoordinateSystem2; +} + +//======================================================================= +//function : ID +//purpose : The method returns a unique GUID of the attribute. +// By means of this GUID this attribute may be identified +// among other attributes attached to the same label. +//======================================================================= +const Standard_GUID& MyPackage_Transformation::ID() const +{ + return GetID(); +} + +//======================================================================= +//function : Restore +//purpose : The method is called on Undo / Redo. +// It copies the content of +// into this attribute (copies the fields). +//======================================================================= +void MyPackage_Transformation::Restore(const Handle(TDF_Attribute)& theAttribute) +{ + Handle(MyPackage_Transformation) theTransformation = Handle(MyPackage_Transformation)::DownCast(theAttribute); + myType = theTransformation->myType; + myAx1 = theTransformation->myAx1; + myAx2 = theTransformation->myAx2; + myFirstAx3 = theTransformation->myFirstAx3; + mySecondAx3 = theTransformation->mySecondAx3; + myAngle = theTransformation->myAngle; + myScale = theTransformation->myScale; + myFirstPoint = theTransformation->myFirstPoint; + mySecondPoint = theTransformation->mySecondPoint; +} + +//======================================================================= +//function : NewEmpty +//purpose : It creates a new instance of this attribute. +// It is called on Copy / Paste, Undo / Redo. +//======================================================================= +Handle(TDF_Attribute) MyPackage_Transformation::NewEmpty() const +{ + return new MyPackage_Transformation(); +} +//======================================================================= +//function : Paste +//purpose : The method is called on Copy / Paste. +// It copies the content of this attribute into +// (copies the fields). +//======================================================================= +void MyPackage_Transformation::Paste (const Handle(TDF_Attribute)& theAttribute, + const Handle(TDF_RelocationTable)& ) const +{ + Handle(MyPackage_Transformation) theTransformation = Handle(MyPackage_Transformation)::DownCast(theAttribute); + theTransformation->myType = myType; + theTransformation->myAx1 = myAx1; + theTransformation->myAx2 = myAx2; + theTransformation->myFirstAx3 = myFirstAx3; + theTransformation->mySecondAx3 = mySecondAx3; + theTransformation->myAngle = myAngle; + theTransformation->myScale = myScale; + theTransformation->myFirstPoint = myFirstPoint; + theTransformation->mySecondPoint = mySecondPoint; +} + +//======================================================================= +//function : Dump +//purpose : Prints the content of this attribute into the stream. +//======================================================================= +Standard_OStream& MyPackage_Transformation::Dump(Standard_OStream& theOS) const +{ + anOS << "Transformation: "; + switch (myType) + { + case gp_Identity: + { + anOS << "gp_Identity"; + break; + } + case gp_Rotation: + { + anOS << "gp_Rotation"; + break; + } + case gp_Translation: + { + anOS << "gp_Translation"; + break; + } + case gp_PntMirror: + { + anOS << "gp_PntMirror"; + break; + } + case gp_Ax1Mirror: + { + anOS << "gp_Ax1Mirror"; + break; + } + case gp_Ax2Mirror: + { + anOS << "gp_Ax2Mirror"; + break; + } + case gp_Scale: + { + anOS << "gp_Scale"; + break; + } + case gp_CompoundTrsf: + { + anOS << "gp_CompoundTrsf"; + break; + } + case gp_Other: + { + anOS << "gp_Other"; + break; + } + } + return anOS; +} + +//======================================================================= +//function : MyPackage_Transformation +//purpose : A constructor. +//======================================================================= +MyPackage_Transformation::MyPackage_Transformation() +: myType (gp_Identity) +{ + // } ~~~~ -## Implementation of typical actions with standard OCAF attributes. +## Implementation of typical actions with standard OCAF attributes. -There are four sample files provided in the directory 'OpenCasCade/ros/samples/ocafsamples'. They present typical actions with OCAF services (mainly for newcomers). +There are four sample files provided in the directory 'OpenCasCade/ros/samples/ocafsamples'. +They present typical actions with OCAF services (mainly for newcomers). The method *Sample()* of each file is not dedicated for execution 'as is', it is rather a set of logical actions using some OCAF services. ### TDataStd_Sample.cxx @@ -549,7 +543,7 @@ This sample contains templates for typical actions with the following standard O - TDataXtd_Constraint attribute management; - TDataStd_Directory attribute management; - TDataStd_TreeNode attribute management. - + ### TDocStd_Sample.cxx This sample contains template for the following typical actions: - creating application; @@ -560,7 +554,7 @@ This sample contains template for the following typical actions: - closing a document; - opening the document stored in the file; - copying content of a document to another document with possibility to update the copy in the future. - + ### TPrsStd_Sample.cxx This sample contains template for the following typical actions: - starting with data framework; @@ -577,7 +571,7 @@ This sample contains template for the following typical actions: - updating and displaying presentation of the attribute to be displayed; - setting a color to the displayed attribute; - getting transparency of the displayed attribute; -- modify attribute; +- modify attribute; - updating presentation of the attribute in viewer. ### TNaming_Sample.cxx @@ -591,4 +585,3 @@ The following scenario is used: - creating a Fillet (using the selected edges) and pushing the result as a modification of Box1; - creating a Cut (Box1, Box2) as a modification of Box1 and push it in DF; - recovering the result from DF. - diff --git a/dox/user_guides/modeling_data/modeling_data.md b/dox/user_guides/modeling_data/modeling_data.md index 06b55b797d..1e90d98938 100644 --- a/dox/user_guides/modeling_data/modeling_data.md +++ b/dox/user_guides/modeling_data/modeling_data.md @@ -105,75 +105,67 @@ You can also find functions to compute: The following low level services are provided: -* Definition of an array of point constraints: + * Definition of an array of point constraints:
+ The class *MultiLine* allows defining a given number of multi-point constraints in order to build the multi-line, multiple lines passing through ordered multiple point constraints.
+ @figure{/user_guides/modeling_data/images/modeling_data_image004.png,"Definition of a MultiLine using Multiple Point Constraints",240}
+ In this image:
+ * *Pi*, *Qi*, *Ri* ... *Si* can be 2D or 3D points. + * Defined as a group: *Pn*, *Qn*, *Rn,* ... *Sn* form a MultipointConstraint. They possess the same passage, tangency and curvature constraints. + * *P1*, *P2*, ... *Pn*, or the *Q*, *R*, ... or *S* series represent the lines to be approximated. - The class *MultiLine* allows defining a given number of multi-point constraints in order to build the multi-line, multiple lines passing through ordered multiple point constraints. + * Definition of a set of point constraints:
+ The class *MultiPointConstraint* allows defining a multiple point constraint and computing the approximation of sets of points to several curves. - @figure{/user_guides/modeling_data/images/modeling_data_image004.png,"Definition of a MultiLine using Multiple Point Constraints",240} + * Computation of an approximation of a Bezier curve from a set of points:
+ The class *Compute* allows making an approximation of a set of points to a Bezier curve. - In this image: - * *Pi*, *Qi*, *Ri* ... *Si* can be 2D or 3D points. - * Defined as a group: *Pn*, *Qn*, *Rn,* ... *Sn* form a MultipointConstraint. They possess the same passage, tangency and curvature constraints. - * *P1*, *P2*, ... *Pn*, or the *Q*, *R*, ... or *S* series represent the lines to be approximated. + * Computation of an approximation of a BSpline curve from a set of points:
+ The class *BSplineCompute* allows making an approximation of a set of points to a BSpline curve. -* Definition of a set of point constraints: - - The class *MultiPointConstraint* allows defining a multiple point constraint and computing the approximation of sets of points to several curves. - -* Computation of an approximation of a Bezier curve from a set of points: - - The class *Compute* allows making an approximation of a set of points to a Bezier curve - -* Computation of an approximation of a BSpline curve from a set of points: - - The class *BSplineCompute* allows making an approximation of a set of points to a BSpline curve. - -* Definition of Variational Criteria: - -The class *TheVariational* allows fairing the approximation curve to a given number of points using a least squares method in conjunction with a variational criterion, usually the weights at each constraint point. + * Definition of Variational Criteria:
+ The class *TheVariational* allows fairing the approximation curve to a given number of points using a least squares method in conjunction with a variational criterion, usually the weights at each constraint point. #### Approximation by parametric or geometric constraints +*AppParCurves* package provides low-level tools to allow parallel approximation of groups of points into Bezier or B-Spline curve with parametric or geometric constraints, +such as a requirement for the curve to pass through given points, or to have a given tangency or curvature at a particular point. -*AppParCurves* package provides low-level tools to allow parallel approximation of groups of points into Bezier or B-Spline curve with parametric or geometric constraints, such as a requirement for the curve to pass through given points, or to have a given tangency or curvature at a particular point. - -The algorithms used include: -- the least squares method -- a search for the best approximation within a given tolerance value. - -The following low-level services are provided: +The algorithms used include: +- the least squares method +- a search for the best approximation within a given tolerance value. -* Association of an index to an object: +The following low-level services are provided: -The class *ConstraintCouple* allows you associating an index to an object to compute faired curves using *AppDef_TheVariational*. + * Association of an index to an object:
+ The class *ConstraintCouple* allows you associating an index to an object to compute faired curves using *AppDef_TheVariational*. -* Definition of a set of approximations of Bezier curves: + * Definition of a set of approximations of Bezier curves:
+ The class *MultiCurve* allows defining the approximation of a multi-line made up of multiple Bezier curves. -The class *MultiCurve* allows defining the approximation of a multi-line made up of multiple Bezier curves. - -* Definition of a set of approximations of BSpline curves: - -The class *MultiBSpCurve* allows defining the approximation of a multi-line made up of multiple BSpline curves. + * Definition of a set of approximations of BSpline curves:
+ The class *MultiBSpCurve* allows defining the approximation of a multi-line made up of multiple BSpline curves. -* Definition of points making up a set of point constraints + * Definition of points making up a set of point constraints
+ The class *MultiPoint* allows defining groups of 2D or 3D points making up a multi-line. -The class *MultiPoint* allows defining groups of 2D or 3D points making up a multi-line. - #### Example: How to approximate a curve with respect to tangency To approximate a curve with respect to tangency, follow these steps: - 1. Create an object of type AppDef_MultiPointConstraints from the set of points to approximate and use the method SetTang to set the tangency vectors. - 2. Create an object of type AppDef_MultiLine from the AppDef_MultiPointConstraint. - 3. Use AppDef_BSplineCompute, which instantiates Approx_BSplineComputeLine to perform the approximation. + 1. Create an object of type AppDef_MultiPointConstraints from the set of points to approximate and use the method SetTang to set the tangency vectors. + 2. Create an object of type AppDef_MultiLine from the AppDef_MultiPointConstraint. + 3. Use AppDef_BSplineCompute, which instantiates Approx_BSplineComputeLine to perform the approximation. @subsection occt_modat_1_2 Direct Construction -Direct Construction methods from *gce*, *GC* and *GCE2d* packages provide simplified algorithms to build elementary geometric entities such as lines, circles and curves. They complement the reference definitions provided by the *gp*, *Geom* and *Geom2d* packages. +Direct Construction methods from *gce*, *GC* and *GCE2d* packages provide simplified algorithms to build elementary geometric entities such as lines, circles and curves. +They complement the reference definitions provided by the *gp*, *Geom* and *Geom2d* packages. -The algorithms implemented by gce, GCE2d and GC packages are simple: there is no creation of objects defined by advanced positional constraints (for more information on this subject, see *Geom2dGcc* and *GccAna*, which describe geometry by constraints). +The algorithms implemented by gce, GCE2d and GC packages are simple: +there is no creation of objects defined by advanced positional constraints (for more information on this subject, see *Geom2dGcc* and *GccAna*, which describe geometry by constraints). -For example, to construct a circle from a point and a radius using the *gp* package, it is necessary to construct axis *Ax2d* before creating the circle. If *gce* package is used, and *Ox* is taken for the axis, it is possible to create a circle directly from a point and a radius. +For example, to construct a circle from a point and a radius using the *gp* package, it is necessary to construct axis *Ax2d* before creating the circle. +If *gce* package is used, and *Ox* is taken for the axis, it is possible to create a circle directly from a point and a radius. Another example is the class gce_MakeCirc providing a framework for defining eight problems encountered in the geometric construction of circles and implementing the eight related construction algorithms. @@ -185,145 +177,149 @@ The object created (or implemented) is an algorithm which can be consulted to fi If it was unsuccessful, the status gives the reason for the failure. ~~~~{.cpp} - gp_Pnt P1 (0.,0.,0.); - gp_Pnt P2 (0.,10.,0.); - gp_Pnt P3 (10.,0.,0.); - gce_MakeCirc MC (P1,P2,P3); - if (MC.IsDone()) { - const gp_Circ& C = MC.Value(); - } + gp_Pnt P1 (0.,0.,0.); + gp_Pnt P2 (0.,10.,0.); + gp_Pnt P3 (10.,0.,0.); + gce_MakeCirc MC (P1,P2,P3); + if (MC.IsDone()) + { + const gp_Circ& C = MC.Value(); + } ~~~~ -In addition, gce, GCE2d and GC each have a Root class. This class is the root of all classes in the package, which return a status. The returned status (successful -construction or construction error) is described by the enumeration gce_ErrorType. +In addition, gce, GCE2d and GC each have a Root class. +This class is the root of all classes in the package, which return a status. +The returned status (successful construction or construction error) is described by the enumeration gce_ErrorType. Note, that classes, which construct geometric transformations do not return a status, and therefore do not inherit from *Root*. - @subsubsection occt_modat_1_2_1 Simple geometric entities -The following algorithms used to build entities from *gp* package are provided by *gce* package. -- 2D line parallel to another at a distance, -- 2D line parallel to another passing through a point, -- 2D circle passing through two points, -- 2D circle parallel to another at a distance, -- 2D circle parallel to another passing through a point, -- 2D circle passing through three points, -- 2D circle from a center and a radius, -- 2D hyperbola from five points, -- 2D hyperbola from a center and two apexes, -- 2D ellipse from five points, -- 2D ellipse from a center and two apexes, -- 2D parabola from three points, -- 2D parabola from a center and an apex, -- line parallel to another passing through a point, -- line passing through two points, -- circle coaxial to another passing through a point, -- circle coaxial to another at a given distance, -- circle passing through three points, -- circle with its center, radius, and normal to the plane, -- circle with its axis (center + normal), -- hyperbola with its center and two apexes, -- ellipse with its center and two apexes, -- plane passing through three points, -- plane from its normal, -- plane parallel to another plane at a given distance, -- plane parallel to another passing through a point, -- plane from an array of points, -- cylinder from a given axis and a given radius, -- cylinder from a circular base, -- cylinder from three points, -- cylinder parallel to another cylinder at a given distance, -- cylinder parallel to another cylinder passing through a point, -- cone from four points, -- cone from a given axis and two passing points, -- cone from two points (an axis) and two radii, -- cone parallel to another at a given distance, -- cone parallel to another passing through a point, +The following algorithms used to build entities from *gp* package are provided by *gce* package. +- 2D line parallel to another at a distance, +- 2D line parallel to another passing through a point, +- 2D circle passing through two points, +- 2D circle parallel to another at a distance, +- 2D circle parallel to another passing through a point, +- 2D circle passing through three points, +- 2D circle from a center and a radius, +- 2D hyperbola from five points, +- 2D hyperbola from a center and two apexes, +- 2D ellipse from five points, +- 2D ellipse from a center and two apexes, +- 2D parabola from three points, +- 2D parabola from a center and an apex, +- line parallel to another passing through a point, +- line passing through two points, +- circle coaxial to another passing through a point, +- circle coaxial to another at a given distance, +- circle passing through three points, +- circle with its center, radius, and normal to the plane, +- circle with its axis (center + normal), +- hyperbola with its center and two apexes, +- ellipse with its center and two apexes, +- plane passing through three points, +- plane from its normal, +- plane parallel to another plane at a given distance, +- plane parallel to another passing through a point, +- plane from an array of points, +- cylinder from a given axis and a given radius, +- cylinder from a circular base, +- cylinder from three points, +- cylinder parallel to another cylinder at a given distance, +- cylinder parallel to another cylinder passing through a point, +- cone from four points, +- cone from a given axis and two passing points, +- cone from two points (an axis) and two radii, +- cone parallel to another at a given distance, +- cone parallel to another passing through a point, - all transformations (rotations, translations, mirrors,scaling transformations, etc.). -Each class from *gp* package, such as *Circ, Circ2d, Mirror, Mirror2d*, etc., has the corresponding *MakeCirc, MakeCirc2d, MakeMirror, MakeMirror2d*, etc. class from *gce* package. +Each class from *gp* package, such as *Circ, Circ2d, Mirror, Mirror2d*, etc., has the corresponding *MakeCirc, MakeCirc2d, MakeMirror, MakeMirror2d*, etc. class from *gce* package. -It is possible to create a point using a *gce* package class, then question it to recover the corresponding *gp* object. +It is possible to create a point using a *gce* package class, then question it to recover the corresponding *gp* object. ~~~~{.cpp} - gp_Pnt2d Point1,Point2; + gp_Pnt2d Point1,Point2; ... - //Initialization of Point1 and Point2 - gce_MakeLin2d L = gce_MakeLin2d(Point1,Point2); - if (L.Status() == gce_Done() ){ - gp_Lin2d l = L.Value(); + // Initialization of Point1 and Point2 + gce_MakeLin2d L = gce_MakeLin2d(Point1,Point2); + if (L.Status() == gce_Done()) + { + gp_Lin2d l = L.Value(); } ~~~~ -This is useful if you are uncertain as to whether the arguments can create the *gp* object without raising an exception. In the case above, if *Point1* and *Point2* are closer than the tolerance value required by *MakeLin2d*, the function *Status* will return the enumeration *gce_ConfusedPoint*. This tells you why the *gp* object cannot be created. If you know that the points *Point1* and *Point2* are separated by the value exceeding the tolerance value, then you may create the *gp* object directly, as follows: +This is useful if you are uncertain as to whether the arguments can create the *gp* object without raising an exception. +In the case above, if *Point1* and *Point2* are closer than the tolerance value required by *MakeLin2d*, the function *Status* will return the enumeration *gce_ConfusedPoint*. +This tells you why the *gp* object cannot be created. +If you know that the points *Point1* and *Point2* are separated by the value exceeding the tolerance value, then you may create the *gp* object directly, as follows: ~~~~{.cpp} -gp_Lin2d l = gce_MakeLin2d(Point1,Point2); +gp_Lin2d l = gce_MakeLin2d(Point1,Point2); ~~~~ @subsubsection occt_modat_1_2_2 Geometric entities manipulated by handle *GC* and *GCE2d* packages provides an implementation of algorithms used to build entities from *Geom* and *Geom2D* packages. They implement the same algorithms as the *gce* package, and also contain algorithms for trimmed surfaces and curves. -The following algorithms are available: -- arc of a circle trimmed by two points, -- arc of a circle trimmed by two parameters, -- arc of a circle trimmed by one point and one parameter, -- arc of an ellipse from an ellipse trimmed by two points, -- arc of an ellipse from an ellipse trimmed by two parameters, -- arc of an ellipse from an ellipse trimmed by one point and one parameter, -- arc of a parabola from a parabola trimmed by two points, -- arc of a parabola from a parabola trimmed by two parameters, -- arc of a parabola from a parabola trimmed by one point and one parameter, -- arc of a hyperbola from a hyperbola trimmed by two points, -- arc of a hyperbola from a hyperbola trimmed by two parameters, -- arc of a hyperbola from a hyperbola trimmed by one point and one parameter, -- segment of a line from two points, -- segment of a line from two parameters, -- segment of a line from one point and one parameter, -- trimmed cylinder from a circular base and a height, -- trimmed cylinder from three points, -- trimmed cylinder from an axis, a radius, and a height, -- trimmed cone from four points, -- trimmed cone from two points (an axis) and a radius, -- trimmed cone from two coaxial circles. - -Each class from *GCE2d* package, such as *Circle, Ellipse, Mirror*, etc., has the corresponding *MakeCircle, MakeEllipse, MakeMirror*, etc. class from *Geom2d* package. -Besides, the class *MakeArcOfCircle* returns an object of type *TrimmedCurve* from *Geom2d*. - -Each class from *GC* package, such as *Circle, Ellipse, Mirror*, etc., has the corresponding *MakeCircle, MakeEllipse, MakeMirror*, etc. class from *Geom* package. -The following classes return objects of type *TrimmedCurve* from *Geom*: +The following algorithms are available: +- arc of a circle trimmed by two points, +- arc of a circle trimmed by two parameters, +- arc of a circle trimmed by one point and one parameter, +- arc of an ellipse from an ellipse trimmed by two points, +- arc of an ellipse from an ellipse trimmed by two parameters, +- arc of an ellipse from an ellipse trimmed by one point and one parameter, +- arc of a parabola from a parabola trimmed by two points, +- arc of a parabola from a parabola trimmed by two parameters, +- arc of a parabola from a parabola trimmed by one point and one parameter, +- arc of a hyperbola from a hyperbola trimmed by two points, +- arc of a hyperbola from a hyperbola trimmed by two parameters, +- arc of a hyperbola from a hyperbola trimmed by one point and one parameter, +- segment of a line from two points, +- segment of a line from two parameters, +- segment of a line from one point and one parameter, +- trimmed cylinder from a circular base and a height, +- trimmed cylinder from three points, +- trimmed cylinder from an axis, a radius, and a height, +- trimmed cone from four points, +- trimmed cone from two points (an axis) and a radius, +- trimmed cone from two coaxial circles. + +Each class from *GCE2d* package, such as *Circle, Ellipse, Mirror*, etc., has the corresponding *MakeCircle, MakeEllipse, MakeMirror*, etc. class from *Geom2d* package. +Besides, the class *MakeArcOfCircle* returns an object of type *TrimmedCurve* from *Geom2d*. + +Each class from *GC* package, such as *Circle, Ellipse, Mirror*, etc., has the corresponding *MakeCircle, MakeEllipse, MakeMirror*, etc. class from *Geom* package. +The following classes return objects of type *TrimmedCurve* from *Geom*: - *MakeArcOfCircle* -- *MakeArcOfEllipse* -- *MakeArcOfHyperbola* -- *MakeArcOfParabola* -- *MakeSegment* +- *MakeArcOfEllipse* +- *MakeArcOfHyperbola* +- *MakeArcOfParabola* +- *MakeSegment* @subsection occt_modat_1_3 Conversion to and from BSplines The Conversion to and from BSplines component has two distinct purposes: - * Firstly, it provides a homogeneous formulation which can be used to describe any curve or surface. - This is useful for writing algorithms for a single data structure model. - The BSpline formulation can be used to represent most basic geometric objects provided +* Firstly, it provides a homogeneous formulation which can be used to describe any curve or surface. + This is useful for writing algorithms for a single data structure model. + The BSpline formulation can be used to represent most basic geometric objects provided by the components which describe geometric data structures ("Fundamental Geometry Types", "2D Geometry Types" and "3D Geometry Types" components). - * Secondly, it can be used to divide a BSpline curve or surface into a series of curves or surfaces, - thereby providing a higher degree of continuity. This is useful for writing algorithms - which require a specific degree of continuity in the objects to which they are applied. +* Secondly, it can be used to divide a BSpline curve or surface into a series of curves or surfaces, thereby providing a higher degree of continuity. + This is useful for writing algorithms which require a specific degree of continuity in the objects to which they are applied. Discontinuities are situated on the boundaries of objects only. The "Conversion to and from BSplines" component is composed of three packages. The Convert package provides algorithms to convert the following into a BSpline curve or surface: - * a bounded curve based on an elementary 2D curve (line, circle or conic) from the gp package, - * a bounded surface based on an elementary surface (cylinder, cone, sphere or torus) from the gp package, + * a bounded curve based on an elementary 2D curve (line, circle or conic) from the gp package, + * a bounded surface based on an elementary surface (cylinder, cone, sphere or torus) from the gp package, * a series of adjacent 2D or 3D Bezier curves defined by their poles. -These algorithms compute the data needed to define the resulting BSpline curve or surface. -This elementary data (degrees, periodic characteristics, poles and weights, knots and multiplicities) -may then be used directly in an algorithm, or can be used to construct the curve or the surface -by calling the appropriate constructor provided by the classes Geom2d_BSplineCurve, Geom_BSplineCurve or Geom_BSplineSurface. +These algorithms compute the data needed to define the resulting BSpline curve or surface. +This elementary data (degrees, periodic characteristics, poles and weights, knots and multiplicities) +may then be used directly in an algorithm, or can be used to construct the curve or the surface +by calling the appropriate constructor provided by the classes Geom2d_BSplineCurve, Geom_BSplineCurve or Geom_BSplineSurface. The Geom2dConvert package provides the following: @@ -332,7 +328,7 @@ The Geom2dConvert package provides the following: * global functions used to construct the BSpline curves created by this splitting algorithm, or by other types of segmentation of the BSpline curve, * an algorithm which converts a 2D BSpline curve into a series of adjacent Bezier curves. -The GeomConvert package also provides the following: +The GeomConvert package also provides the following: * a global function used to construct a BSpline curve from a bounded curve based on a curve from the Geom package, * a splitting algorithm, which computes the points at which a BSpline curve should be cut in order to obtain arcs with the same degree of continuity, @@ -348,66 +344,69 @@ The GeomConvert package also provides the following: The Points on Curves component comprises high level functions providing an API for complex algorithms that compute points on a 2D or 3D curve. -The following characteristic points exist on parameterized curves in 3d space: -- points equally spaced on a curve, -- points distributed along a curve with equal chords, -- a point at a given distance from another point on a curve. +The following characteristic points exist on parameterized curves in 3d space: +- points equally spaced on a curve, +- points distributed along a curve with equal chords, +- a point at a given distance from another point on a curve. -*GCPnts* package provides algorithms to calculate such points: +*GCPnts* package provides algorithms to calculate such points: - *AbscissaPoint* calculates a point on a curve at a given distance from another point on the curve. - *UniformAbscissa* calculates a set of points at a given abscissa on a curve. -- *UniformDeflection* calculates a set of points at maximum constant deflection between the curve and the polygon that results from the computed points. +- *UniformDeflection* calculates a set of points at maximum constant deflection between the curve and the polygon that results from the computed points. -### Example: Visualizing a curve. +### Example: Visualizing a curve. -Let us take an adapted curve **C**, i.e. an object which is an interface between the services provided by either a 2D curve from the package Geom2d (in case of an Adaptor_Curve2d curve) or a 3D curve from the package Geom (in case of an Adaptor_Curve curve), and the services required on the curve by the computation algorithm. The adapted curve is created in the following way: +Let us take an adapted curve **C**, i.e. an object which is an interface between the services provided by either a 2D curve from the package Geom2d (in case of an Adaptor_Curve2d curve) +or a 3D curve from the package Geom (in case of an Adaptor_Curve curve), and the services required on the curve by the computation algorithm. +The adapted curve is created in the following way: -**2D case :** +**2D case:** ~~~~{.cpp} - Handle(Geom2d_Curve) mycurve = ... ; - Geom2dAdaptor_Curve C (mycurve) ; + Handle(Geom2d_Curve) mycurve = ... ; + Geom2dAdaptor_Curve C (mycurve); ~~~~ -**3D case :** +**3D case:** ~~~~{.cpp} - Handle(Geom_Curve) mycurve = ... ; - GeomAdaptor_Curve C (mycurve) ; + Handle(Geom_Curve) mycurve = ... ; + GeomAdaptor_Curve C (mycurve); ~~~~ The algorithm is then constructed with this object: ~~~~{.cpp} - GCPnts_UniformDeflection myAlgo () ; - Standard_Real Deflection = ... ; - myAlgo.Initialize ( C , Deflection ) ; - if ( myAlgo.IsDone() ) + GCPnts_UniformDeflection myAlgo (); + Standard_Real Deflection = ... ; + myAlgo.Initialize (C, Deflection); + if (myAlgo.IsDone()) { - Standard_Integer nbr = myAlgo.NbPoints() ; - Standard_Real param ; - for ( Standard_Integer i = 1 ; i <= nbr ; i++ ) - { - param = myAlgo.Parameter (i) ; + Standard_Integer nbr = myAlgo.NbPoints(); + Standard_Real param; + for (Standard_Integer i = 1; i <= nbr; i++) + { + param = myAlgo.Parameter (i); ... - } + } } ~~~~ - @subsection occt_modat_1_5 Extrema The classes to calculate the minimum distance between points, curves, and surfaces in 2d and 3d are provided by *GeomAPI* and *Geom2dAPI* packages. -These packages calculate the extrema of distance between: -- point and a curve, -- point and a surface, -- two curves, -- a curve and a surface, -- two surfaces. +These packages calculate the extrema of distance between: +- point and a curve, +- point and a surface, +- two curves, +- a curve and a surface, +- two surfaces. ### Extrema between Point and Curve / Surface -The *GeomAPI_ProjectPointOnCurve* class allows calculation of all extrema between a point and a curve. Extrema are the lengths of the segments orthogonal to the curve. -The *GeomAPI_ProjectPointOnSurface* class allows calculation of all extrema between a point and a surface. Extrema are the lengths of the segments orthogonal to the surface. +The *GeomAPI_ProjectPointOnCurve* class allows calculation of all extrema between a point and a curve. +Extrema are the lengths of the segments orthogonal to the curve. +The *GeomAPI_ProjectPointOnSurface* class allows calculation of all extrema between a point and a surface. +Extrema are the lengths of the segments orthogonal to the surface. These classes use the "Projection" criteria for optimization. ### Extrema between Curves @@ -418,7 +417,8 @@ These classes use Euclidean distance as the criteria for optimization. ### Extrema between Curve and Surface -The *GeomAPI_ExtremaCurveSurface* class allows calculation of one extrema between a 3D curve and a surface. Extrema are the lengths of the segments orthogonal to the curve and the surface. +The *GeomAPI_ExtremaCurveSurface* class allows calculation of one extrema between a 3D curve and a surface. +Extrema are the lengths of the segments orthogonal to the curve and the surface. This class uses the "Projection" criteria for optimization. ### Extrema between Surfaces @@ -435,171 +435,197 @@ In particular, Geom2d package provides classes for: * their positioning in the plane using coordinate systems, * their geometric transformation, by applying translations, rotations, symmetries, scaling transformations and combinations thereof. -The following objects are available: -- point, -- Cartesian point, +The following objects are available: +- point, +- Cartesian point, - vector, -- direction, -- vector with magnitude, -- axis, +- direction, +- vector with magnitude, +- axis, - curve, -- line, -- conic: circle, ellipse, hyperbola, parabola, -- rounded curve: trimmed curve, NURBS curve, Bezier curve, +- line, +- conic: circle, ellipse, hyperbola, parabola, +- rounded curve: trimmed curve, NURBS curve, Bezier curve, - offset curve. -Before creating a geometric object, it is necessary to decide how the object is handled. -The objects provided by *Geom2d* package are handled by reference rather than by value. Copying an instance copies the handle, not the object, so that a change to one instance is reflected in each occurrence of it. -If a set of object instances is needed rather than a single object instance, *TColGeom2d* package can be used. This package provides standard and frequently used instantiations of one-dimensional arrays and sequences for curves from *Geom2d* package. All objects are available in two versions: -- handled by reference and -- handled by value. - -The key characteristic of Geom2d curves is that they are parameterized. -Each class provides functions to work with the parametric equation of the curve, +Before creating a geometric object, it is necessary to decide how the object is handled. +The objects provided by *Geom2d* package are handled by reference rather than by value. +Copying an instance copies the handle, not the object, so that a change to one instance is reflected in each occurrence of it. +If a set of object instances is needed rather than a single object instance, *TColGeom2d* package can be used. +This package provides standard and frequently used instantiations of one-dimensional arrays and sequences for curves from *Geom2d* package. +All objects are available in two versions: +- handled by reference and +- handled by value. + +The key characteristic of Geom2d curves is that they are parameterized. +Each class provides functions to work with the parametric equation of the curve, and, in particular, to compute the point of parameter u on a curve and the derivative vectors of order 1, 2.., N at this point. -As a consequence of the parameterization, a Geom2d curve is naturally oriented. +As a consequence of the parameterization, a Geom2d curve is naturally oriented. Parameterization and orientation differentiate elementary Geom2dcurves from their -equivalent as provided by gp package. Geom2d package provides conversion -functions to transform a Geom2d object into a gp object, and vice-versa, when this is possible. +equivalent as provided by gp package. Geom2d package provides conversion +functions to transform a Geom2d object into a gp object, and vice-versa, when this is possible. -Moreover, Geom2d package provides more complex curves, including Bezier curves, -BSpline curves, trimmed curves and offset curves. +Moreover, Geom2d package provides more complex curves, including Bezier curves, BSpline curves, trimmed curves and offset curves. - Geom2d objects are organized according to an inheritance structure over several levels. +Geom2d objects are organized according to an inheritance structure over several levels. -Thus, an ellipse (specific class Geom2d_Ellipse) is also a conical curve and inherits from the abstract class Geom2d_Conic, while a Bezier curve (concrete class Geom2d_BezierCurve) is also a bounded curve and inherits from the abstract class Geom2d_BoundedCurve; both these examples are also curves (abstract class Geom2d_Curve). Curves, points and vectors inherit from the abstract class Geom2d_Geometry, which describes the properties common to any geometric object from the Geom2d package. +Thus, an ellipse (specific class Geom2d_Ellipse) is also a conical curve and inherits from the abstract class Geom2d_Conic, +while a Bezier curve (concrete class Geom2d_BezierCurve) is also a bounded curve and inherits from the abstract class Geom2d_BoundedCurve; +both these examples are also curves (abstract class Geom2d_Curve). +Curves, points and vectors inherit from the abstract class Geom2d_Geometry, which describes the properties common to any geometric object from the Geom2d package. -This inheritance structure is open and it is possible to describe new objects, which inherit from those provided in the Geom2d package, provided that they respect the behavior of the classes from which they are to inherit. +This inheritance structure is open and it is possible to describe new objects, which inherit from those provided in the Geom2d package, +provided that they respect the behavior of the classes from which they are to inherit. -Finally, Geom2d objects can be shared within more complex data structures. This is why they are used within topological data structures, for example. +Finally, Geom2d objects can be shared within more complex data structures. +This is why they are used within topological data structures, for example. -Geom2dpackage uses the services of the gp package to: +Geom2d package uses the services of the gp package to: * implement elementary algebraic calculus and basic analytic geometry, - * describe geometric transformations which can be applied to Geom2d objects, + * describe geometric transformations which can be applied to Geom2d objects, * describe the elementary data structures of Geom2d objects. -However, the Geom2d package essentially provides data structures and not algorithms. -You can refer to the GCE2d package to find more evolved construction algorithms for Geom2d objects. +However, the Geom2d package essentially provides data structures and not algorithms. +You can refer to the GCE2d package to find more evolved construction algorithms for Geom2d objects. @section occt_modat_3 3D Geometry -The *Geom* package defines geometric objects in 3d space and contains all basic geometric transformations, such as identity, rotation, translation, mirroring, scale transformations, combinations of transformations, etc. as well as special functions depending on the reference definition of the geometric object (e.g. addition of a control point on a B-Spline curve,modification of a curve, etc.). All geometrical entities are STEP processed. +The *Geom* package defines geometric objects in 3d space and contains all basic geometric transformations, such as identity, rotation, translation, mirroring, scale transformations, combinations of transformations, etc. +as well as special functions depending on the reference definition of the geometric object (e.g. addition of a control point on a B-Spline curve,modification of a curve, etc.). +All geometrical entities are STEP processed. In particular, it provides classes for: * description of points, vectors, curves and surfaces, * their positioning in 3D space using axis or coordinate systems, and * their geometric transformation, by applying translations, rotations, symmetries, scaling transformations and combinations thereof. -The following objects are available: -- Point -- Cartesian point +The following objects are available: +- Point +- Cartesian point - Vector - Direction -- Vector with magnitude +- Vector with magnitude - Axis - Curve -- Line -- Conic: circle, ellipse, hyperbola, parabola +- Line +- Conic: circle, ellipse, hyperbola, parabola - Offset curve - Elementary surface: plane, cylinder, cone, sphere, torus - Bounded curve: trimmed curve, NURBS curve, Bezier curve - Bounded surface: rectangular trimmed surface, NURBS surface,Bezier surface - Swept surface: surface of linear extrusion, surface of revolution -- Offset surface. +- Offset surface. The key characteristic of *Geom* curves and surfaces is that they are parameterized. -Each class provides functions to work with the parametric equation of the curve or -surface, and, in particular, to compute: +Each class provides functions to work with the parametric equation of the curve or surface, and, in particular, to compute: * the point of parameter u on a curve, or * the point of parameters (u, v) on a surface. together with the derivative vectors of order 1, 2, ... N at this point. As a consequence of this parameterization, a Geom curve or surface is naturally oriented. -Parameterization and orientation differentiate elementary Geom curves and surfaces from the classes of the same (or similar) names found in gp package. -Geom package also provides conversion functions to transform a Geom object into a gp object, and vice-versa, when such transformation is possible. +Parameterization and orientation differentiate elementary Geom curves and surfaces from the classes of the same (or similar) names found in gp package. +Geom package also provides conversion functions to transform a Geom object into a gp object, and vice-versa, when such transformation is possible. -Moreover, Geom package provides more complex curves and surfaces, including: +Moreover, Geom package provides more complex curves and surfaces, including: * Bezier and BSpline curves and surfaces, * swept surfaces, for example surfaces of revolution and surfaces of linear extrusion, * trimmed curves and surfaces, and * offset curves and surfaces. Geom objects are organized according to an inheritance structure over several levels. -Thus, a sphere (concrete class Geom_SphericalSurface) is also an elementary surface and inherits from the abstract class Geom_ElementarySurface, while a Bezier surface (concrete class Geom_BezierSurface) is also a bounded surface and inherits from the abstract class Geom_BoundedSurface; both these examples are also surfaces (abstract class Geom_Surface). Curves, points and vectors inherit from the abstract class Geom_Geometry, which describes the properties common to any geometric object from the Geom package. +Thus, a sphere (concrete class Geom_SphericalSurface) is also an elementary surface and inherits from the abstract class Geom_ElementarySurface, +while a Bezier surface (concrete class Geom_BezierSurface) is also a bounded surface and inherits from the abstract class Geom_BoundedSurface; +both these examples are also surfaces (abstract class Geom_Surface). +Curves, points and vectors inherit from the abstract class Geom_Geometry, which describes the properties common to any geometric object from the Geom package. -This inheritance structure is open and it is possible to describe new objects, which inherit from those provided in the Geom package, on the condition that they respect the behavior of the classes from which they are to inherit. +This inheritance structure is open and it is possible to describe new objects, which inherit from those provided in the Geom package, +on the condition that they respect the behavior of the classes from which they are to inherit. -Finally, Geom objects can be shared within more complex data structures. This is why they are used within topological data structures, for example. +Finally, Geom objects can be shared within more complex data structures. +This is why they are used within topological data structures, for example. -If a set of object instances is needed rather than a single object instance, *TColGeom* package can be used. This package provides instantiations of one- and two-dimensional arrays and sequences for curves from *Geom* package. All objects are available in two versions: -- handled by reference and -- handled by value. +If a set of object instances is needed rather than a single object instance, *TColGeom* package can be used. +This package provides instantiations of one- and two-dimensional arrays and sequences for curves from *Geom* package. +All objects are available in two versions: +- handled by reference and +- handled by value. -The Geom package uses the services of the gp package to: +The Geom package uses the services of the gp package to: * implement elementary algebraic calculus and basic analytic geometry, * describe geometric transformations which can be applied to Geom objects, * describe the elementary data structures of Geom objects. However, the Geom package essentially provides data structures, not algorithms. -You can refer to the GC package to find more evolved construction algorithms for -Geom objects. - +You can refer to the GC package to find more evolved construction algorithms for Geom objects. @section occt_modat_5 Topology -OCCT Topology allows accessing and manipulating data of objects without dealing with their 2D or 3D representations. Whereas OCCT Geometry provides a description of objects in terms of coordinates or parametric values, Topology describes data structures of objects in parametric space. These descriptions use location in and restriction of parts of this space. +OCCT Topology allows accessing and manipulating data of objects without dealing with their 2D or 3D representations. +Whereas OCCT Geometry provides a description of objects in terms of coordinates or parametric values, Topology describes data structures of objects in parametric space. +These descriptions use location in and restriction of parts of this space. -Topological library allows you to build pure topological data structures. Topology defines relationships between simple geometric entities. In this way, you can model complex shapes as assemblies of simpler entities. Due to a built-in non-manifold (or mixed-dimensional) feature, you can build models mixing: - * 0D entities such as points; - * 1D entities such as curves; - * 2D entities such as surfaces; - * 3D entities such as volumes. +Topological library allows you to build pure topological data structures. +Topology defines relationships between simple geometric entities. +In this way, you can model complex shapes as assemblies of simpler entities. +Due to a built-in non-manifold (or mixed-dimensional) feature, you can build models mixing: + * 0D entities such as points; + * 1D entities such as curves; + * 2D entities such as surfaces; + * 3D entities such as volumes. You can, for example, represent a single object made of several distinct bodies containing embedded curves and surfaces connected or non-connected to an outer boundary. Abstract topological data structure describes a basic entity -- a shape, which can be divided into the following component topologies: - * Vertex -- a zero-dimensional shape corresponding to a point in geometry; + * Vertex -- a zero-dimensional shape corresponding to a point in geometry; * Edge -- a shape corresponding to a curve, and bound by a vertex at each extremity; - * Wire -- a sequence of edges connected by their vertices; + * Wire -- a sequence of edges connected by their vertices; * Face -- part of a plane (in 2D geometry) or a surface (in 3D geometry) bounded by a closed wire; - * Shell -- a collection of faces connected by some edges of their wire boundaries; - * Solid -- a part of 3D space bound by a shell; - * Compound solid -- a collection of solids. + * Shell -- a collection of faces connected by some edges of their wire boundaries; + * Solid -- a part of 3D space bound by a shell; + * Compound solid -- a collection of solids. The wire and the solid can be either infinite or closed. -A face with 3D underlying geometry may also refer to a collection of connected triangles that approximate the underlying surface. The surfaces can be undefined leaving the faces represented by triangles only. If so, the model is purely polyhedral. +A face with 3D underlying geometry may also refer to a collection of connected triangles that approximate the underlying surface. +The surfaces can be undefined leaving the faces represented by triangles only. If so, the model is purely polyhedral. Topology defines the relationship between simple geometric entities, which can thus be linked together to represent complex shapes. -Abstract Topology is provided by six packages. +Abstract Topology is provided by six packages. The first three packages describe the topological data structure used in Open CASCADE Technology: - * TopAbs package provides general resources for topology-driven applications. It contains enumerations that are used to describe basic topological notions: topological shape, orientation and state. It also provides methods to manage these enumerations. - * TopLoc package provides resources to handle 3D local coordinate systems: Datum3Dand Location. Datum3D describes an elementary coordinate system, while Location comprises a series of elementary coordinate systems. - * TopoDS package describes classes to model and build data structures that are purely topological. + * TopAbs package provides general resources for topology-driven applications. + It contains enumerations that are used to describe basic topological notions: topological shape, orientation and state. + It also provides methods to manage these enumerations. + * TopLoc package provides resources to handle 3D local coordinate systems: Datum3D and Location. + Datum3D describes an elementary coordinate system, while Location comprises a series of elementary coordinate systems. + * TopoDS package describes classes to model and build data structures that are purely topological. Three additional packages provide tools to access and manipulate this abstract topology: - * TopTools package provides basic tools to use on topological data structures. - * TopExp package provides classes to explore and manipulate the topological data structures described in the TopoDS package. - * BRepTools package provides classes to explore, manipulate, read and write BRep data structures. These more complex data structures combine topological descriptions with additional geometric information, and include rules for evaluating equivalence of different possible representations of the same object, for example, a point. - + * TopTools package provides basic tools to use on topological data structures. + * TopExp package provides classes to explore and manipulate the topological data structures described in the TopoDS package. + * BRepTools package provides classes to explore, manipulate, read and write BRep data structures. + These more complex data structures combine topological descriptions with additional geometric information, + and include rules for evaluating equivalence of different possible representations of the same object, for example, a point. @subsection occt_modat_5_2 Shape content -The **TopAbs** package provides general enumerations describing the basic concepts of topology and methods to handle these enumerations. It contains no classes. This package has been separated from the rest of the topology because the notions it contains are sufficiently general to be used by all topological tools. This avoids redefinition of enumerations by remaining independent of modeling resources. The TopAbs package defines three notions: -- **Type** *TopAbs_ShapeEnum*; -- **Orientation** *TopAbs_Orientation* ; -- **State** *StateTopAbs_State* +The **TopAbs** package provides general enumerations describing the basic concepts of topology and methods to handle these enumerations. It contains no classes. +This package has been separated from the rest of the topology because the notions it contains are sufficiently general to be used by all topological tools. +This avoids redefinition of enumerations by remaining independent of modeling resources. +The TopAbs package defines three notions: +- **Type** - *TopAbs_ShapeEnum*; +- **Orientation** - *TopAbs_Orientation*; +- **State** - *StateTopAbs_State*. @subsubsection occt_modat_5_2_1 Topological types -TopAbs contains the *TopAbs_ShapeEnum* enumeration,which lists the different topological types: +TopAbs contains the *TopAbs_ShapeEnum* enumeration, which lists the different topological types: - COMPOUND -- a group of any type of topological objects. - COMPSOLID -- a composite solid is a set of solids connected by their faces. It expands the notions of WIRE and SHELL to solids. - SOLID -- a part of space limited by shells. It is three dimensional. @@ -610,27 +636,37 @@ TopAbs contains the *TopAbs_ShapeEnum* enumeration,which lists the different top - VERTEX -- a topological element corresponding to a point. It has zero dimension. - SHAPE -- a generic term covering all of the above. -A topological model can be considered as a graph of objects with adjacency relationships. When modeling a part in 2D or 3D space it must belong to one of the categories listed in the ShapeEnum enumeration. The TopAbspackage lists all the objects, which can be found in any model. It cannot be extended but a subset can be used. For example, the notion of solid is useless in 2D. +A topological model can be considered as a graph of objects with adjacency relationships. +When modeling a part in 2D or 3D space it must belong to one of the categories listed in the ShapeEnum enumeration. +The TopAbspackage lists all the objects, which can be found in any model. +It cannot be extended but a subset can be used. For example, the notion of solid is useless in 2D. -The terms of the enumeration appear in order from the most complex to the most simple, because objects can contain simpler objects in their description. For example, a face references its wires, edges, and vertices. +The terms of the enumeration appear in order from the most complex to the most simple, because objects can contain simpler objects in their description. +For example, a face references its wires, edges, and vertices. @figure{/user_guides/modeling_data/images/modeling_data_image006.png,"ShapeEnum",420} @subsubsection occt_modat_5_2_2 Orientation -The notion of orientation is represented by the **TopAbs_Orientation** enumeration. Orientation is a generalized notion of the sense of direction found in various modelers. This is used when a shape limits a geometric domain; and is closely linked to the notion of boundary. The three cases are the following: -- Curve limited by a vertex. -- Surface limited by an edge. -- Space limited by a face. +The notion of orientation is represented by the **TopAbs_Orientation** enumeration. +Orientation is a generalized notion of the sense of direction found in various modelers. +This is used when a shape limits a geometric domain; and is closely linked to the notion of boundary. +The three cases are the following: +- Curve limited by a vertex. +- Surface limited by an edge. +- Space limited by a face. -In each case the topological form used as the boundary of a geometric domain of a higher dimension defines two local regions of which one is arbitrarily considered as the **default region**. +In each case the topological form used as the boundary of a geometric domain of a higher dimension defines two local regions of which one is arbitrarily considered as the **default region**. -For a curve limited by a vertex the default region is the set of points with parameters greater than the vertex. That is to say it is the part of the curve after the vertex following the natural direction along the curve. +For a curve limited by a vertex the default region is the set of points with parameters greater than the vertex. +That is to say it is the part of the curve after the vertex following the natural direction along the curve. -For a surface limited by an edge the default region is on the left of the edge following its natural direction. More precisely it is the region pointed to by the vector product of the normal vector to the surface and the vector tangent to the curve. +For a surface limited by an edge the default region is on the left of the edge following its natural direction. +More precisely it is the region pointed to by the vector product of the normal vector to the surface and the vector tangent to the curve. -For a space limited by a face the default region is found on the negative side of the normal to the surface. +For a space limited by a face the default region is found on the negative side of the normal to the surface. -Based on this default region the orientation allows definition of the region to be kept, which is called the *interior* or *material*. There are four orientations defining the interior. +Based on this default region the orientation allows definition of the region to be kept, which is called the *interior* or *material*. +There are four orientations defining the interior. | Orientation | Description | | :--------- | :--------------------------------- | @@ -641,7 +677,10 @@ Based on this default region the orientation allows definition of the region to @figure{/user_guides/modeling_data/images/modeling_data_image007.png,"Four Orientations",420} -The notion of orientation is a very general one, and it can be used in any context where regions or boundaries appear. Thus, for example, when describing the intersection of an edge and a contour it is possible to describe not only the vertex of intersection but also how the edge crosses the contour considering it as a boundary. The edge would therefore be divided into two regions: exterior and interior and the intersection vertex would be the boundary. Thus an orientation can be associated with an intersection vertex as in the following figure: +The notion of orientation is a very general one, and it can be used in any context where regions or boundaries appear. +Thus, for example, when describing the intersection of an edge and a contour it is possible to describe not only the vertex of intersection but also how the edge crosses the contour considering it as a boundary. +The edge would therefore be divided into two regions: exterior and interior and the intersection vertex would be the boundary. +Thus an orientation can be associated with an intersection vertex as in the following figure: | Orientation | Association | | :-------- | :-------- | @@ -652,12 +691,11 @@ The notion of orientation is a very general one, and it can be used in any conte @figure{/user_guides/modeling_data/images/modeling_data_image008.png,"Four orientations of intersection vertices",420} - -Along with the Orientation enumeration the *TopAbs* package defines four methods: +Along with the Orientation enumeration the *TopAbs* package defines four methods: @subsubsection occt_modat_5_2_3 State -The **TopAbs_State** enumeration described the position of a vertex or a set of vertices with respect to a region. There are four terms: +The **TopAbs_State** enumeration described the position of a vertex or a set of vertices with respect to a region. There are four terms: |Position | Description | | :------ | :------- | @@ -666,418 +704,492 @@ The **TopAbs_State** enumeration described the position of a vertex or a set of |ON | The point is on the boundary(within tolerance). | |UNKNOWN | The state of the point is indeterminate. | -The UNKNOWN term has been introduced because this enumeration is often used to express the result of a calculation, which can fail. This term can be used when it is impossible to know if a point is inside or outside, which is the case with an open wire or face. +The UNKNOWN term has been introduced because this enumeration is often used to express the result of a calculation, which can fail. +This term can be used when it is impossible to know if a point is inside or outside, which is the case with an open wire or face. @figure{/user_guides/modeling_data/images/modeling_data_image009.png,"The four states",420} -The State enumeration can also be used to specify various parts of an object. The following figure shows the parts of an edge intersecting a face. +The State enumeration can also be used to specify various parts of an object. +The following figure shows the parts of an edge intersecting a face. @figure{/user_guides/modeling_data/images/modeling_data_image010.png,"State specifies the parts of an edge intersecting a face",420} -@subsubsection occt_modat_5_1 Shape Location +@subsubsection occt_modat_5_1 Shape Location -A local coordinate system can be viewed as either of the following: -- A right-handed trihedron with an origin and three orthonormal vectors. The *gp_Ax2* package corresponds to this definition. -- A transformation of a +1 determinant, allowing the transformation of coordinates between local and global references frames. This corresponds to the *gp_Trsf*. +A local coordinate system can be viewed as either of the following: +- A right-handed trihedron with an origin and three orthonormal vectors. The *gp_Ax2* package corresponds to this definition. +- A transformation of a +1 determinant, allowing the transformation of coordinates between local and global references frames. This corresponds to the *gp_Trsf*. -*TopLoc* package distinguishes two notions: -- *TopLoc_Datum3D* class provides the elementary reference coordinate, represented by a right-handed orthonormal system of axes or by a right-handed unitary transformation. -- *TopLoc_Location* class provides the composite reference coordinate made from elementary ones. It is a marker composed of a chain of references to elementary markers. The resulting cumulative transformation is stored in order to avoid recalculating the sum of the transformations for the whole list. +*TopLoc* package distinguishes two notions: +- *TopLoc_Datum3D* class provides the elementary reference coordinate, represented by a right-handed orthonormal system of axes or by a right-handed unitary transformation. +- *TopLoc_Location* class provides the composite reference coordinate made from elementary ones. + It is a marker composed of a chain of references to elementary markers. + The resulting cumulative transformation is stored in order to avoid recalculating the sum of the transformations for the whole list. @figure{/user_guides/modeling_data/images/modeling_data_image005.png,"Structure of TopLoc_Location",420} -Two reference coordinates are equal if they are made up of the same elementary coordinates in the same order. There is no numerical comparison. Two coordinates can thus correspond to the same transformation without being equal if they were not built from the same elementary coordinates. +Two reference coordinates are equal if they are made up of the same elementary coordinates in the same order. +There is no numerical comparison. Two coordinates can thus correspond to the same transformation without being equal if they were not built from the same elementary coordinates. -For example, consider three elementary coordinates: -R1, R2, R3 -The composite coordinates are: -C1 = R1 * R2, -C2 = R2 * R3 -C3 = C1 * R3 -C4 = R1 * C2 +For example, consider three elementary coordinates: +~~~~ +R1, R2, R3; +~~~~ + +The composite coordinates are: +~~~~ +C1 = R1 * R2; +C2 = R2 * R3; +C3 = C1 * R3; +C4 = R1 * C2; +~~~~ -**NOTE** C3 and C4 are equal because they are both R1 * R2 * R3. +**NOTE** C3 and C4 are equal because they are both R1 * R2 * R3. -The *TopLoc* package is chiefly targeted at the topological data structure, but it can be used for other purposes. +The *TopLoc* package is chiefly targeted at the topological data structure, but it can be used for other purposes. Change of coordinates --------------------- -*TopLoc_Datum3D* class represents a change of elementary coordinates. Such changes must be shared so this class inherits from *Standard_Transient*. The coordinate is represented by a transformation *gp_Trsfpackage*. This transformation has no scaling factor. +*TopLoc_Datum3D* class represents a change of elementary coordinates. +Such changes must be shared so this class inherits from *Standard_Transient*. +The coordinate is represented by a transformation *gp_Trsfpackage*. +This transformation has no scaling factor. @subsection occt_modat_5_3 Manipulating shapes and sub-shapes -The *TopoDS* package describes the topological data structure with the following characteristics: -- reference to an abstract shape with neither orientation nor location. -- Access to the data structure through the tool classes. +The *TopoDS* package describes the topological data structure with the following characteristics: +- reference to an abstract shape with neither orientation nor location. +- Access to the data structure through the tool classes. -As stated above, OCCT Topology describes data structures of objects in parametric space. These descriptions use localization in and restriction of parts of this space. The types of shapes, which can be described in these terms, are the vertex, the face and the shape. The vertex is defined in terms of localization in parametric space, and the face and shape, in terms of restriction of this space. +As stated above, OCCT Topology describes data structures of objects in parametric space. +These descriptions use localization in and restriction of parts of this space. +The types of shapes, which can be described in these terms, are the vertex, the face and the shape. +The vertex is defined in terms of localization in parametric space, and the face and shape, in terms of restriction of this space. -OCCT topological descriptions also allow the simple shapes defined in these terms to be combined into sets. For example, a set of edges forms a wire; a set of faces forms a shell, and a set of solids forms a composite solid (CompSolid in Open CASCADE Technology). You can also combine shapes of either sort into compounds. Finally, you can give a shape an orientation and a location. +OCCT topological descriptions also allow the simple shapes defined in these terms to be combined into sets. +For example, a set of edges forms a wire; a set of faces forms a shell, and a set of solids forms a composite solid (CompSolid in Open CASCADE Technology). +You can also combine shapes of either sort into compounds. Finally, you can give a shape an orientation and a location. -Listing shapes in order of complexity from vertex to composite solid leads us to the notion of the data structure as knowledge of how to break a shape down into a set of simpler shapes. This is in fact, the purpose of the *TopoDS* package. +Listing shapes in order of complexity from vertex to composite solid leads us to the notion of the data structure as knowledge of how to break a shape down into a set of simpler shapes. +This is in fact, the purpose of the *TopoDS* package. -The model of a shape is a shareable data structure because it can be used by other shapes. (An edge can be used by more than one face of a solid). A shareable data structure is handled by reference. When a simple reference is insufficient, two pieces of information are added: an orientation and a local coordinate reference. -- An orientation tells how the referenced shape is used in a boundary (*Orientation* from *TopAbs*). -- A local reference coordinate (*Location* from *TopLoc*) allows referencing a shape at a position different from that of its definition. +The model of a shape is a shareable data structure because it can be used by other shapes (an edge can be used by more than one face of a solid). +A shareable data structure is handled by reference. +When a simple reference is insufficient, two pieces of information are added: an orientation and a local coordinate reference. +- An orientation tells how the referenced shape is used in a boundary (*Orientation* from *TopAbs*). +- A local reference coordinate (*Location* from *TopLoc*) allows referencing a shape at a position different from that of its definition. -The **TopoDS_TShape** class is the root of all shape descriptions. It contains a list of shapes. Classes inheriting **TopoDS_TShape** can carry the description of a geometric domain if necessary (for example, a geometric point associated with a TVertex). A **TopoDS_TShape** is a description of a shape in its definition frame of reference. This class is manipulated by reference. +The **TopoDS_TShape** class is the root of all shape descriptions. +It contains a list of shapes. Classes inheriting **TopoDS_TShape** can carry the description of a geometric domain if necessary (for example, a geometric point associated with a TVertex). +A **TopoDS_TShape** is a description of a shape in its definition frame of reference. +This class is manipulated by reference. -The **TopoDS_Shape** class describes a reference to a shape. It contains a reference to an underlying abstract shape, an orientation,and a local reference coordinate. This class is manipulated by value and thus cannot be shared. +The **TopoDS_Shape** class describes a reference to a shape. +It contains a reference to an underlying abstract shape, an orientation, and a local reference coordinate. +This class is manipulated by value and thus cannot be shared. -The class representing the underlying abstract shape is never referenced directly. The *TopoDS_Shape* class is always used to refer to it. +The class representing the underlying abstract shape is never referenced directly. +The *TopoDS_Shape* class is always used to refer to it. -The information specific to each shape (the geometric support) is always added by inheritance to classes deriving from **TopoDS_TShape**. The following figures show the example of a shell formed from two faces connected by an edge. +The information specific to each shape (the geometric support) is always added by inheritance to classes deriving from **TopoDS_TShape**. +The following figures show the example of a shell formed from two faces connected by an edge. @figure{/user_guides/modeling_data/images/modeling_data_image011.png,"Structure of a shell formed from two faces",420} @figure{/user_guides/modeling_data/images/modeling_data_image012.png,"Data structure of the above shell",420} -In the previous diagram, the shell is described by the underlying shape TS, and the faces by TF1 and TF2. There are seven edges from TE1 to TE7 and six vertices from TV1 to TV6. +In the previous diagram, the shell is described by the underlying shape TS, and the faces by TF1 and TF2. +There are seven edges from TE1 to TE7 and six vertices from TV1 to TV6. -The wire TW1 references the edges from TE1 to TE4; TW2 references from TE4 to TE7. +The wire TW1 references the edges from TE1 to TE4; TW2 references from TE4 to TE7. -The vertices are referenced by the edges as follows:TE1(TV1,TV4), TE2(TV1,TV2), TE3(TV2,TV3), TE4(TV3,TV4), TE5(TV4,TV5), TE6(T5,TV6),TE7(TV3,TV6). +The vertices are referenced by the edges as follows:TE1(TV1,TV4), TE2(TV1,TV2), TE3(TV2,TV3), TE4(TV3,TV4), TE5(TV4,TV5), TE6(T5,TV6),TE7(TV3,TV6). -**Note** that this data structure does not contain any *back references*. All references go from more complex underlying shapes to less complex ones. The techniques used to access the information are described later. The data structure is as compact as possible. Sub-objects can be shared among different objects. +**Note** that this data structure does not contain any *back references*. +All references go from more complex underlying shapes to less complex ones. +The techniques used to access the information are described later. +The data structure is as compact as possible. Sub-objects can be shared among different objects. -Two very similar objects, perhaps two versions of the same object, might share identical sub-objects. The usage of local coordinates in the data structure allows the description of a repetitive sub-structure to be shared. +Two very similar objects, perhaps two versions of the same object, might share identical sub-objects. +The usage of local coordinates in the data structure allows the description of a repetitive sub-structure to be shared. -The compact data structure avoids the loss of information associated with copy operations which are usually used in creating a new version of an object or when applying a coordinate change. +The compact data structure avoids the loss of information associated with copy operations which are usually used in creating a new version of an object or when applying a coordinate change. -The following figure shows a data structure containing two versions of a solid. The second version presents a series of identical holes bored at different positions. The data structure is compact and yet keeps all information on the sub-elements. +The following figure shows a data structure containing two versions of a solid. +The second version presents a series of identical holes bored at different positions. +The data structure is compact and yet keeps all information on the sub-elements. -The three references from *TSh2* to the underlying face *TFcyl* have associated local coordinate systems, which correspond to the successive positions of the hole. +The three references from *TSh2* to the underlying face *TFcyl* have associated local coordinate systems, which correspond to the successive positions of the hole. @figure{/user_guides/modeling_data/images/modeling_data_image013.png,"Data structure containing two versions of a solid",420} Classes inheriting TopoDS_Shape ------------------------------ -*TopoDS* is based on class *TopoDS_Shape* and the class defining its underlying shape. This has certain advantages, but the major drawback is that these classes are too general. Different shapes they could represent do not type them (Vertex, Edge, etc.) hence it is impossible to introduce checks to avoid incoherences such as inserting a face in an edge. - - *TopoDS* package offers two sets of classes, one set inheriting the underlying shape with neither orientation nor location and the other inheriting *TopoDS_Shape*, which represent the standard topological shapes enumerated in *TopAbs* package. +*TopoDS* is based on class *TopoDS_Shape* and the class defining its underlying shape. +This has certain advantages, but the major drawback is that these classes are too general. +Different shapes they could represent do not type them (Vertex, Edge, etc.) hence it is impossible to introduce checks to avoid incoherences such as inserting a face in an edge. -The following classes inherit Shape : *TopoDS_Vertex, TopoDS_Edge, TopoDS_Wire, TopoDS_Face, TopoDS_Shell, TopoDS_Solid,TopoDS_CompSolid,* and *TopoDS_Compound*. In spite of the similarity of names with those inheriting from **TopoDS_TShape** there is a profound difference in the way they are used. +*TopoDS* package offers two sets of classes, one set inheriting the underlying shape with neither orientation nor location and the other inheriting *TopoDS_Shape*, +which represent the standard topological shapes enumerated in *TopAbs* package. -*TopoDS_Shape* class and the classes, which inherit from it, are the natural means to manipulate topological objects. *TopoDS_TShape* classes are hidden. *TopoDS_TShape* describes a class in its original local coordinate system without orientation. *TopoDS_Shape* is a reference to *TopoDS_TShape* with an orientation and a local reference. +The following classes inherit Shape: *TopoDS_Vertex, TopoDS_Edge, TopoDS_Wire, TopoDS_Face, TopoDS_Shell, TopoDS_Solid, TopoDS_CompSolid,* and *TopoDS_Compound*. +In spite of the similarity of names with those inheriting from **TopoDS_TShape** there is a profound difference in the way they are used. -*TopoDS_TShape* class is deferred; *TopoDS_Shape* class is not. Using *TopoDS_Shape* class allows manipulation of topological objects without knowing their type. It is a generic form. Purely topological algorithms often use the *TopoDS_Shape* class. +*TopoDS_Shape* class and the classes, which inherit from it, are the natural means to manipulate topological objects. +*TopoDS_TShape* classes are hidden. +*TopoDS_TShape* describes a class in its original local coordinate system without orientation. +*TopoDS_Shape* is a reference to *TopoDS_TShape* with an orientation and a local reference. -*TopoDS_TShape* class is manipulated by reference; TopoDS_Shape class by value. A TopoDS_Shape is nothing more than a reference enhanced with an orientation and a local coordinate. The sharing of *TopoDS_Shapes* is meaningless. What is important is the sharing of the underlying *TopoDS_TShapes*. Assignment or passage in argument does not copy the data structure: this only creates new *TopoDS_Shapes* which refer to the same *TopoDS_TShape*. +*TopoDS_TShape* class is deferred; *TopoDS_Shape* class is not. +Using *TopoDS_Shape* class allows manipulation of topological objects without knowing their type. +It is a generic form. Purely topological algorithms often use the *TopoDS_Shape* class. -Although classes inheriting *TopoDS_TShape* are used for adding extra information, extra fields should not be added in a class inheriting from TopoDS_Shape. Classes inheriting from TopoDS_Shape serve only to specialize a reference in order to benefit from static type control (carried out by the compiler). For example, a routine that receives a *TopoDS_Face* in argument is more precise for the compiler than the one, which receives a *TopoDS_Shape*. It is pointless to derive other classes than those found inTopoDS. All references to a topological data structure are made with the Shape class and its inheritors defined in *TopoDS*. +*TopoDS_TShape* class is manipulated by reference; TopoDS_Shape class by value. +A TopoDS_Shape is nothing more than a reference enhanced with an orientation and a local coordinate. +The sharing of *TopoDS_Shapes* is meaningless. +What is important is the sharing of the underlying *TopoDS_TShapes*. +Assignment or passage in argument does not copy the data structure: this only creates new *TopoDS_Shapes* which refer to the same *TopoDS_TShape*. -There are no constructors for the classes inheriting from the *TopoDS_Shape* class, otherwise the type control would disappear through **implicit casting** (a characteristic of C++). The TopoDS package provides package methods for **casting** an object of the TopoDS_Shape class in one of these sub-classes, with type verification. +Although classes inheriting *TopoDS_TShape* are used for adding extra information, extra fields should not be added in a class inheriting from TopoDS_Shape. +Classes inheriting from TopoDS_Shape serve only to specialize a reference in order to benefit from static type control (carried out by the compiler). +For example, a routine that receives a *TopoDS_Face* in argument is more precise for the compiler than the one, which receives a *TopoDS_Shape*. +It is pointless to derive other classes than those found in TopoDS. +All references to a topological data structure are made with the Shape class and its inheritors defined in *TopoDS*. -The following example shows a routine receiving an argument of the *TopoDS_Shape* type, then putting it into a variable V if it is a vertex or calling the method ProcessEdge if it is an edge. +There are no constructors for the classes inheriting from the *TopoDS_Shape* class, otherwise the type control would disappear through **implicit casting** (a characteristic of C++). +The TopoDS package provides package methods for **casting** an object of the TopoDS_Shape class in one of these sub-classes, with type verification. +The following example shows a routine receiving an argument of the *TopoDS_Shape* type, then putting it into a variable V if it is a vertex or calling the method ProcessEdge if it is an edge. ~~~~{.cpp} - #include - #include - #include + #include + #include + void ProcessEdge (const TopoDS_Edge& theEdge); - void ProcessEdge(const TopoDS_Edge&); - - void Process(const TopoDS_Shape& aShape) { - if (aShape.Shapetype() == TopAbs_VERTEX) { - TopoDS_Vertex V; - V = TopoDS::Vertex(aShape); // Also correct - TopoDS_Vertex V2 = aShape; // Rejected by the compiler - TopoDS_Vertex V3 = TopoDS::Vertex(aShape); // Correct - } - else if (aShape.ShapeType() == TopAbs_EDGE){ - ProcessEdge(aShape) ; // This is rejected - ProcessEdge(TopoDS::Edge(aShape)) ; // Correct + void Process (const TopoDS_Shape& theShape) + { + if (theShape.Shapetype() == TopAbs_VERTEX) + { + TopoDS_Vertex V; + V = TopoDS::Vertex (theShape); // Also correct + TopoDS_Vertex V2 = theShape; // Rejected by the compiler + TopoDS_Vertex V3 = TopoDS::Vertex (theShape); // Correct + } + else if (theShape.ShapeType() == TopAbs_EDGE) + { + ProcessEdge (theShape); // This is rejected + ProcessEdge (TopoDS::Edge (theShape)); // Correct } - else { - cout <<"Neither a vertex nor an edge ?"; - ProcessEdge(TopoDS::Edge(aShape)) ; - // OK for compiler but an exception will be raised at run-time + else + { + std::cout << "Neither a vertex nor an edge?\n"; + ProcessEdge (TopoDS::Edge (theShape)); + // OK for compiler but an exception will be raised at run-time } - } + } ~~~~ - - @subsection occt_modat_5_4 Exploration of Topological Data Structures -The *TopExp* package provides tools for exploring the data structure described with the *TopoDS* package. Exploring a topological structure means finding all sub-objects of a given type, for example, finding all the faces of a solid. - -The TopExp package provides the class *TopExp_Explorer* to find all sub-objects of a given type. An explorer is built with: -- The shape to be explored. -- The type of shapes to be found e.g. VERTEX, EDGE with the exception of SHAPE, which is not allowed. -- The type of Shapes to avoid. e.g. SHELL, EDGE. By default, this type is SHAPE. This default value means that there is no restriction on the exploration. - +The *TopExp* package provides tools for exploring the data structure described with the *TopoDS* package. +Exploring a topological structure means finding all sub-objects of a given type, for example, finding all the faces of a solid. +The TopExp package provides the class *TopExp_Explorer* to find all sub-objects of a given type. +An explorer is built with: +- The shape to be explored. +- The type of shapes to be found e.g. VERTEX, EDGE with the exception of SHAPE, which is not allowed. +- The type of Shapes to avoid. e.g. SHELL, EDGE. By default, this type is SHAPE. + This default value means that there is no restriction on the exploration. -The Explorer visits the whole structure in order to find the shapes of the requested type not contained in the type to avoid. The example below shows how to find all faces in the shape *S*: - +The Explorer visits the whole structure in order to find the shapes of the requested type not contained in the type to avoid. +The example below shows how to find all faces in the shape *S*: ~~~~{.cpp} - void test() { - TopoDS_Shape S; - TopExp_Explorer Ex; - for (Ex.Init(S,TopAbs_FACE); Ex.More(); Ex.Next()) { - ProcessFace(Ex.Current()); - } - } + void test() + { + TopoDS_Shape S; + for (TopExp_Explorer Ex (S, TopAbs_FACE); Ex.More(); Ex.Next()) + { + ProcessFace (Ex.Current()); + } + } ~~~~ -Find all the vertices which are not in an edge +Find all the vertices which are not in an edge ~~~~{.cpp} -for (Ex.Init(S,TopAbs_VERTEX,TopAbs_EDGE); ...) +for (TopExp_Explorer Ex (S, TopAbs_VERTEX, TopAbs_EDGE); Ex.More(); Ex.Next()) {} ~~~~ - -Find all the faces in a SHELL, then all the faces not in a SHELL: - +Find all the faces in a SHELL, then all the faces not in a SHELL: ~~~~{.cpp} - void test() { - TopExp_Explorer Ex1, Ex2; - TopoDS_Shape S; - for (Ex1.Init(S,TopAbs_SHELL);Ex1.More(); Ex1.Next()){ - // visit all shells - for (Ex2.Init(Ex1.Current(),TopAbs_FACE);Ex2.More(); - Ex2.Next()){ - //visit all the faces of the current shell - ProcessFaceinAshell(Ex2.Current()); - ... - } - } - for(Ex1.Init(S,TopAbs_FACE,TopAbs_SHELL);Ex1.More(); Ex1.Next()){ - // visit all faces not ina shell. - ProcessFace(Ex1.Current()); + void test() + { + TopExp_Explorer Ex1, Ex2; + TopoDS_Shape S; + for (Ex1.Init (S, TopAbs_SHELL); Ex1.More(); Ex1.Next()) + { + // visit all shells + for (Ex2.Init (Ex1.Current(), TopAbs_FACE); Ex2.More(); Ex2.Next()) + { + // visit all the faces of the current shell + ProcessFaceinAshell(Ex2.Current()); + ... + } + } + for (Ex1.Init (S, TopAbs_FACE, TopAbs_SHELL); Ex1.More(); Ex1.Next()) + { + // visit all faces not in a shell + ProcessFace (Ex1.Current()); } } ~~~~ -The Explorer presumes that objects contain only objects of an equal or inferior type. For example, if searching for faces it does not look at wires, edges, or vertices to see if they contain faces. +The Explorer presumes that objects contain only objects of an equal or inferior type. +For example, if searching for faces it does not look at wires, edges, or vertices to see if they contain faces. -The *MapShapes* method from *TopExp* package allows filling a Map. An exploration using the Explorer class can visit an object more than once if it is referenced more than once. For example, an edge of a solid is generally referenced by two faces. To process objects only once, they have to be placed in a Map. +The *MapShapes* method from *TopExp* package allows filling a Map. +An exploration using the Explorer class can visit an object more than once if it is referenced more than once. +For example, an edge of a solid is generally referenced by two faces. +To process objects only once, they have to be placed in a Map. -**Example** +**Example** ~~~~{.cpp} - void TopExp::MapShapes (const TopoDS_Shape& S, - const TopAbs_ShapeEnum T, - TopTools_IndexedMapOfShape& M) - { - TopExp_Explorer Ex(S,T); - while (Ex.More()) { - M.Add(Ex.Current()); - Ex.Next(); + void TopExp::MapShapes (const TopoDS_Shape& S, + const TopAbs_ShapeEnum T, + TopTools_IndexedMapOfShape& M) + { + TopExp_Explorer Ex (S, T); + while (Ex.More()) + { + M.Add (Ex.Current()); + Ex.Next(); } } ~~~~ -In the following example all faces and all edges of an object are drawn in accordance with the following rules: -- The faces are represented by a network of *NbIso* iso-parametric lines with *FaceIsoColor* color. +In the following example all faces and all edges of an object are drawn in accordance with the following rules: +- The faces are represented by a network of *NbIso* iso-parametric lines with *FaceIsoColor* color. - The edges are drawn in a color, which indicates the number of faces sharing the edge: - - *FreeEdgeColor* for edges, which do not belong to a face (i.e. wireframe element). - - *BorderEdgeColor* for an edge belonging to a single face. - - *SharedEdgeColor* for an edge belonging to more than one face. -- The methods *DrawEdge* and *DrawFaceIso* are also available to display individual edges and faces. - -The following steps are performed: -1. Storing the edges in a map and create in parallel an array of integers to count the number of faces sharing the edge. This array is initialized to zero. -2. Exploring the faces. Each face is drawn. -3. Exploring the edges and for each of them increment the counter of faces in the array. -4. From the Map of edges, drawing each edge with the color corresponding to the number of faces. + - *FreeEdgeColor* for edges, which do not belong to a face (i.e. wireframe element). + - *BorderEdgeColor* for an edge belonging to a single face. + - *SharedEdgeColor* for an edge belonging to more than one face. +- The methods *DrawEdge* and *DrawFaceIso* are also available to display individual edges and faces. + +The following steps are performed: +1. Storing the edges in a map and create in parallel an array of integers to count the number of faces sharing the edge. + This array is initialized to zero. +2. Exploring the faces. Each face is drawn. +3. Exploring the edges and for each of them increment the counter of faces in the array. +4. From the Map of edges, drawing each edge with the color corresponding to the number of faces. ~~~~{.cpp} - void DrawShape ( const TopoDS_Shape& aShape, - const Standard_Integer nbIsos, - const Color FaceIsocolor, - const Color FreeEdgeColor, - const Color BorderEdgeColor, - const Color SharedEdgeColor) - { - // Store the edges in aMap. - TopTools_IndexedMapOfShape edgemap; - TopExp::MapShapes(aShape,TopAbs_EDGE,edgeMap); - // Create an array set to zero. - TColStd_Array1OfInteger faceCount(1,edgeMap.Extent()); - faceCount.Init (0); - // Explore the faces. - TopExp_Explorer expFace(aShape,TopAbs_FACE); - while (expFace.More()) { - //Draw the current face. - DrawFaceIsos(TopoDS::Face(expFace.Current()),nbIsos,FaceIsoColor); - // Explore the edges of the face. - TopExp_Explorer expEdge(expFace.Current(),TopAbs_EDGE); - while (expEdge.More()) { - //Increment the face count for this edge. - faceCount(edgemap.FindIndex(expEdge.Current()))++; - expEdge.Next(); - } - expFace.Next(); - } - //Draw the edges of theMap - Standard_Integer i; - for (i=1;i<=edgemap.Extent();i++) { - switch (faceCount(i)) { - case 0 : - DrawEdge(TopoDS::Edge(edgemap(i)),FreeEdgeColor); - break; - case 1 : - DrawEdge(TopoDS::Edge(edgemap(i)),BorderEdgeColor); - break; - default : - DrawEdge(TopoDS::Edge(edgemap(i)),SharedEdgeColor); - break; + void DrawShape (const TopoDS_Shape& aShape, + const Standard_Integer nbIsos, + const Quantity_Color FaceIsocolor, + const Quantity_Color FreeEdgeColor, + const Quantity_Color BorderEdgeColor, + const Quantity_Color SharedEdgeColor) + { + // Store the edges in a Map + TopTools_IndexedMapOfShape edgemap; + TopExp::MapShapes (aShape, TopAbs_EDGE, edgeMap); + + // Create an array set to zero + TColStd_Array1OfInteger faceCount (1, edgeMap.Extent()); + faceCount.Init (0); + + // Explore the faces. + TopExp_Explorer expFace(aShape,TopAbs_FACE); + while (expFace.More()) + { + // Draw the current face. + DrawFaceIsos (TopoDS::Face (expFace.Current()), nbIsos, FaceIsoColor); + + // Explore the edges of the face + TopExp_Explorer expEdge (expFace.Current(), TopAbs_EDGE); + while (expEdge.More()) + { + // Increment the face count for this edge + ++faceCount[edgemap.FindIndex (expEdge.Current())]; + expEdge.Next(); } - } - } + expFace.Next(); + } + + // Draw the edges of theMap + for (Standard_Integer i = 1; i <= edgemap.Extent(); i++) + { + switch (faceCount[i]) + { + case 0: + DrawEdge (TopoDS::Edge (edgemap (i)), FreeEdgeColor); + break; + case 1: + DrawEdge (TopoDS::Edge (edgemap (i)), BorderEdgeColor); + break; + default: + DrawEdge (TopoDS::Edge (edgemap (i)), SharedEdgeColor); + break; + } + } + } ~~~~ @subsubsection occt_modat_5_5 Lists and Maps of Shapes -**TopTools** package contains tools for exploiting the *TopoDS* data structure. It is an instantiation of the tools from *TCollection* package with the Shape classes of *TopoDS*. - +**TopTools** package contains tools for exploiting the *TopoDS* data structure. +It is an instantiation of the tools from *TCollection* package with the Shape classes of *TopoDS*. * *TopTools_Array1OfShape, HArray1OfShape* -- instantiation of the *NCollection_Array1* with *TopoDS_Shape*. * *TopTools_SequenceOfShape* -- instantiation of the *NCollection_Sequence* with *TopoDS_Shape*. * *TopTools_MapOfShape* - instantiation of the *NCollection_Map*. Allows the construction of sets of shapes. * *TopTools_IndexedMapOfShape* - instantiation of the *NCollection_IndexedMap*. Allows the construction of tables of shapes and other data structures. -With a *TopTools_Map*, a set of references to Shapes can be kept without duplication. -The following example counts the size of a data structure as a number of *TShapes*. - +With a *TopTools_Map*, a set of references to Shapes can be kept without duplication. +The following example counts the size of a data structure as a number of *TShapes*. ~~~~{.cpp} - #include - Standard_Integer Size(const TopoDS_Shape& aShape) - { - // This is a recursive method. - // The size of a shape is1 + the sizes of the subshapes. - TopoDS_Iterator It; - Standard_Integer size = 1; - for (It.Initialize(aShape);It.More();It.Next()) { - size += Size(It.Value()); - } - return size; - } + #include + Standard_Integer Size (const TopoDS_Shape& aShape) + { + // This is a recursive method. + // The size of a shape is1 + the sizes of the subshapes. + Standard_Integer size = 1; + for (TopoDS_Iterator It (aShape); It.More(); It.Next()) + { + size += Size (It.Value()); + } + return size; + } ~~~~ -This program is incorrect if there is sharing in the data structure. - -Thus for a contour of four edges it should count 1 wire + 4 edges +4 vertices with the result 9, but as the vertices are each shared by two edges this program will return 13. One solution is to put all the Shapes in a Map so as to avoid counting them twice, as in the following example: +This program is incorrect if there is sharing in the data structure. +Thus for a contour of four edges it should count 1 wire + 4 edges +4 vertices with the result 9, but as the vertices are each shared by two edges this program will return 13. +One solution is to put all the Shapes in a Map so as to avoid counting them twice, as in the following example: ~~~~{.cpp} - #include - #include + #include + #include - void MapShapes(const TopoDS_Shape& aShape, - TopTools_MapOfShape& aMap) - { - //This is a recursive auxiliary method. It stores all subShapes of aShape in a Map. - if (aMap.Add(aShape)) { - //Add returns True if aShape was not already in the Map. - TopoDS_Iterator It; - for (It.Initialize(aShape);It.More();It.Next()){ - MapShapes(It.Value(),aMap); - } - } + void MapShapes (const TopoDS_Shape& aShape, + TopTools_MapOfShape& aMap) + { + // This is a recursive auxiliary method. It stores all subShapes of aShape in a Map. + if (aMap.Add (aShape)) + { + // Add returns True if aShape was not already in the Map. + for (TopoDS_Iterator It (aShape); It.More(); It.Next()) + { + MapShapes (It.Value(), aMap); + } + } } - Standard_Integer Size(const TopoDS_Shape& aShape) + Standard_Integer Size (const TopoDS_Shape& aShape) { - // Store Shapes in a Mapand return the size. - TopTools_MapOfShape M; - MapShapes(aShape,M); + // Store Shapes in a Mapand return the size. + TopTools_MapOfShape M; + MapShapes (aShape, M); return M.Extent(); } ~~~~ -**Note** For more details about Maps, refer to the *TCollection* documentation (Foundation Classes Reference Manual). +**Note** For more details about Maps, refer to the *TCollection* documentation (Foundation Classes Reference Manual). -The following example is more ambitious and writes a program which copies a data structure using an *IndexedMap*. The copy is an identical structure but it shares nothing with the original. The principal algorithm is as follows: -- All Shapes in the structure are put into an *IndexedMap*. -- A table of Shapes is created in parallel with the map to receive the copies. -- The structure is copied using the auxiliary recursive function,which copies from the map to the array. +The following example is more ambitious and writes a program which copies a data structure using an *IndexedMap*. +The copy is an identical structure but it shares nothing with the original. +The principal algorithm is as follows: +- All Shapes in the structure are put into an *IndexedMap*. +- A table of Shapes is created in parallel with the map to receive the copies. +- The structure is copied using the auxiliary recursive function,which copies from the map to the array. ~~~~{.cpp} - #include - #include - #include - #include - #include - - TopoDS_Shape Copy(const TopoDS_Shape& aShape, - const TopoDS_Builder& aBuilder) - { - // Copies the wholestructure of aShape using aBuilder. - // Stores all thesub-Shapes in an IndexedMap. - TopTools_IndexedMapOfShape theMap; - TopoDS_Iterator It; - Standard_Integer i; - TopoDS_Shape S; - TopLoc_Location Identity; - S = aShape; - S.Location(Identity); - S.Orientation(TopAbs_FORWARD); - theMap.Add(S); - for (i=1; i<= theMap.Extent(); i++) { - for(It.Initialize(theMap(i)); It.More(); It.Next()) { - S=It.Value(); - S.Location(Identity); - S.Orientation(TopAbs_FORWARD); - theMap.Add(S); + #include + #include + #include + #include + #include + + TopoDS_Shape Copy (const TopoDS_Shape& aShape, + const TopoDS_Builder& aBuilder) + { + // Copies the wholestructure of aShape using aBuilder. + // Stores all thesub-Shapes in an IndexedMap. + TopTools_IndexedMapOfShape theMap; + TopoDS_Iterator It; + TopLoc_Location Identity; + TopoDS_Shape S = aShape; + S.Location (Identity); + S.Orientation(TopAbs_FORWARD); + theMap.Add(S); + for (Standard_Integer i = 1; i <= theMap.Extent(); i++) + { + for (It.Initialize(theMap(i)); It.More(); It.Next()) + { + S = It.Value(); + S.Location(Identity); + S.Orientation (TopAbs_FORWARD); + theMap.Add (S); } - } - } + } + } ~~~~ +In the above example, the index *i* is that of the first object not treated in the Map. +When *i* reaches the same size as the Map this means that everything has been treated. +The treatment consists in inserting in the Map all the sub-objects, if they are not yet in the Map, they are inserted with an index greater than *i*. -In the above example, the index *i* is that of the first object not treated in the Map. When *i* reaches the same size as the Map this means that everything has been treated. The treatment consists in inserting in the Map all the sub-objects, if they are not yet in the Map, they are inserted with an index greater than *i*. - -**Note** that the objects are inserted with a local reference set to the identity and a FORWARD orientation. Only the underlying TShape is of great interest. - +**Note** that the objects are inserted with a local reference set to the identity and a FORWARD orientation. +Only the underlying TShape is of great interest. ~~~~{.cpp} - //Create an array to store the copies. - TopTools_Array1OfShapetheCopies(1,theMap.Extent()); - - // Use a recursivefunction to copy the first element. - void AuxiliaryCopy (Standard_Integer, - const TopTools_IndexedMapOfShape &, - TopTools_Array1OfShape &, - const TopoDS_Builder&); - - AuxiliaryCopy(1,theMap,theCopies,aBuilder); - - // Get the result with thecorrect local reference and orientation. - S = theCopies(1); - S.Location(aShape.Location()); - S.Orientation(aShape.Orientation()); - return S; + // Create an array to store the copies. + TopTools_Array1OfShapetheCopies (1, theMap.Extent()); + + // Use a recursivefunction to copy the first element. + void AuxiliaryCopy (Standard_Integer , + const TopTools_IndexedMapOfShape& , + TopTools_Array1OfShape& , + const TopoDS_Builder& ); + + AuxiliaryCopy (1, theMap, theCopies, aBuilder); + + // Get the result with the correct local reference and orientation. + S = theCopies (1); + S.Location (aShape.Location()); + S.Orientation (aShape.Orientation()); + return S; ~~~~ -Below is the auxiliary function, which copies the element of rank *i* from the map to the table. This method checks if the object has been copied; if not copied, then an empty copy is performed into the table and the copies of all the sub-elements are inserted by finding their rank in the map. - +Below is the auxiliary function, which copies the element of rank *i* from the map to the table. +This method checks if the object has been copied; if not copied, then an empty copy is performed into the table and the copies of all the sub-elements are inserted by finding their rank in the map. ~~~~{.cpp} - void AuxiliaryCopy(Standard_Integer index, - const TopTools_IndexedMapOfShapes& sources, - TopTools_Array1OfShape& copies, - const TopoDS_Builder& aBuilder) - { - //If the copy is a null Shape the copy is not done. - if (copies(index).IsNull()) { - copies(index) =sources(index).EmptyCopied(); - //Insert copies of the sub-shapes. - TopoDS_Iterator It; - TopoDS_Shape S; - TopLoc_Location Identity; - for(It.Initialize(sources(index)),It.More(), It.Next ()) { - S = It.Value(); - S.Location(Identity); - S.Orientation(TopAbs_FORWARD); - AuxiliaryCopy(sources.FindIndex(S),sources,copies,aBuilder); - S.Location(It.Value().Location());S.Orientation(It.Value().Orientation()); aBuilder.Add(copies(index),S); + void AuxiliaryCopy (Standard_Integer index, + const TopTools_IndexedMapOfShapes& sources, + TopTools_Array1OfShape& copies, + const TopoDS_Builder& aBuilder) + { + // If the copy is a null Shape the copy is not done. + if (copies[index].IsNull()) + { + copies[index] = sources(index).EmptyCopied(); + // Insert copies of the sub-shapes. + TopoDS_Shape S; + TopLoc_Location Identity; + for (TopoDS_Iterator It (sources (index)), It.More(), It.Next()) + { + S = It.Value(); + S.Location (Identity); + S.Orientation (TopAbs_FORWARD); + AuxiliaryCopy (sources.FindIndex (S), sources, copies, aBuilder); + S.Location (It.Value().Location()); + S.Orientation (It.Value().Orientation()); + aBuilder.Add (copies[index], S); } } } @@ -1085,40 +1197,41 @@ Below is the auxiliary function, which copies the element of rank *i* from the m **Wire Explorer** -*BRepTools_WireExplorer* class can access edges of a wire in their order of connection. +*BRepTools_WireExplorer* class can access edges of a wire in their order of connection. -For example, in the wire in the image we want to recuperate the edges in the order {e1, e2, e3,e4, e5} : +For example, in the wire in the image we want to recuperate the edges in the order {e1, e2, e3,e4, e5}: @figure{/user_guides/modeling_data/images/modeling_data_image014.png,"A wire composed of 6 edges.",320} *TopExp_Explorer*, however, recuperates the lines in any order. - + ~~~~{.cpp} - TopoDS_Wire W = ...; - BRepTools_WireExplorer Ex; - for(Ex.Init(W); Ex.More(); Ex.Next()) { - ProcessTheCurrentEdge(Ex.Current()); - ProcessTheVertexConnectingTheCurrentEdgeToThePrevious - One(Ex.CurrentVertex()); - } + TopoDS_Wire W = ...; + BRepTools_WireExplorer Ex; + for (Ex.Init (W); Ex.More(); Ex.Next()) + { + ProcessTheCurrentEdge (Ex.Current()); + ProcessTheVertexConnectingTheCurrentEdgeToThePrevious + One (Ex.CurrentVertex()); + } ~~~~ @section occt_modat_4 Properties of Shapes @subsection occt_modat_4_1 Local Properties of Shapes -BRepLProp package provides the Local Properties of Shapes component, +BRepLProp package provides the Local Properties of Shapes component, which contains algorithms computing various local properties on edges and faces in a BRep model. The local properties which may be queried are: - * for a point of parameter u on a curve which supports an edge : + * for a point of parameter u on a curve which supports an edge: * the point, * the derivative vectors, up to the third degree, * the tangent vector, * the normal, * the curvature, and the center of curvature; - * for a point of parameter (u, v) on a surface which supports a face : + * for a point of parameter (u, v) on a surface which supports a face: * the point, * the derivative vectors, up to the second degree, * the tangent vectors to the u and v isoparametric curves, @@ -1126,35 +1239,34 @@ The local properties which may be queried are: * the minimum or maximum curvature, and the corresponding directions of curvature; * the degree of continuity of a curve which supports an edge, built by the concatenation of two other edges, at their junction point. -Analyzed edges and faces are described as BRepAdaptor curves and surfaces, -which provide shapes with an interface for the description of their geometric support. +Analyzed edges and faces are described as BRepAdaptor curves and surfaces, +which provide shapes with an interface for the description of their geometric support. The base point for local properties is defined by its u parameter value on a curve, or its (u, v) parameter values on a surface. @subsection occt_modat_4_2 Local Properties of Curves and Surfaces The "Local Properties of Curves and Surfaces" component provides algorithms for computing various local properties on a Geom curve (in 2D or 3D space) or a surface. It is composed of: - * Geom2dLProp package, which allows computing Derivative and Tangent vectors (normal and curvature) of a parametric point on a 2D curve; - * GeomLProp package, which provides local properties on 3D curves and surfaces - * LProp package, which provides an enumeration used to characterize a particular point on a 2D curve. + * Geom2dLProp package, which allows computing Derivative and Tangent vectors (normal and curvature) of a parametric point on a 2D curve; + * GeomLProp package, which provides local properties on 3D curves and surfaces; + * LProp package, which provides an enumeration used to characterize a particular point on a 2D curve. -Curves are either Geom_Curve curves (in 3D space) or Geom2d_Curve curves (in the plane). -Surfaces are Geom_Surface surfaces. The point on which local properties are calculated -is defined by its u parameter value on a curve, and its (u,v) parameter values on a surface. +Curves are either Geom_Curve curves (in 3D space) or Geom2d_Curve curves (in the plane). +Surfaces are Geom_Surface surfaces. +The point on which local properties are calculated is defined by its u parameter value on a curve, and its (u,v) parameter values on a surface. It is possible to query the same local properties for points as mentioned above, and additionally for 2D curves: * the points corresponding to a minimum or a maximum of curvature; * the inflection points. - - + #### Example: How to check the surface concavity To check the concavity of a surface, proceed as follows: 1. Sample the surface and compute at each point the Gaussian curvature. 2. If the value of the curvature changes of sign, the surface is concave or convex depending on the point of view. - 3. To compute a Gaussian curvature, use the class SLprops from GeomLProp, which instantiates the generic class SLProps from LProp and use the method GaussianCurvature. + 3. To compute a Gaussian curvature, use the class SLprops from GeomLProp, which instantiates the generic class SLProps from LProp and use the method GaussianCurvature. @subsection occt_modat_4_2a Continuity of Curves and Surfaces @@ -1184,26 +1296,30 @@ The following types of surface continuity are supported: @figure{/user_guides/modeling_data/images/modeling_data_continuity_surfaces.svg,"Continuity of Surfaces",420} -Against single surface, the connection of two surfaces (see the figure above) defines its continuity in each intersection point only. Smoothness of connection is a minimal value of continuities on the intersection curve. - +Against single surface, the connection of two surfaces (see the figure above) defines its continuity in each intersection point only. +Smoothness of connection is a minimal value of continuities on the intersection curve. @subsection occt_modat_4_2b Regularity of Shared Edges -Regularity of an edge is a smoothness of connection of two faces sharing this edge. In other words, regularity is a minimal continuity between connected faces in each point on edge. +Regularity of an edge is a smoothness of connection of two faces sharing this edge. +In other words, regularity is a minimal continuity between connected faces in each point on edge. Edge's regularity can be set by *BRep_Builder::Continuity* method. To get the regularity use *BRep_Tool::Continuity* method. -Some algorithms like @ref occt_modalg_6 "Fillet" set regularity of produced edges by their own algorithms. On the other hand, some other algorithms (like @ref specification__boolean_operations "Boolean Operations", @ref occt_user_guides__shape_healing "Shape Healing", etc.) do not set regularity. If the regularity is needed to be set correctly on a shape, the method *BRepLib::EncodeRegularity* can be used. It calculates and sets correct values for all edges of the shape. +Some algorithms like @ref occt_modalg_6 "Fillet" set regularity of produced edges by their own algorithms. +On the other hand, some other algorithms (like @ref specification__boolean_operations "Boolean Operations", @ref occt_user_guides__shape_healing "Shape Healing", etc.) do not set regularity. +If the regularity is needed to be set correctly on a shape, the method *BRepLib::EncodeRegularity* can be used. +It calculates and sets correct values for all edges of the shape. -The regularity flag is extensively used by the following high level algorithms: @ref occt_modalg_6_1_2 "Chamfer", @ref occt_modalg_7_3 "Draft Angle", @ref occt_modalg_10 "Hidden Line Removal", @ref occt_modalg_9_2 "Gluer". +The regularity flag is extensively used by the following high level algorithms: +@ref occt_modalg_6_1_2 "Chamfer", @ref occt_modalg_7_3 "Draft Angle", @ref occt_modalg_10 "Hidden Line Removal", @ref occt_modalg_9_2 "Gluer". - @subsection occt_modat_4_3 Global Properties of Shapes -The Global Properties of Shapes component provides algorithms for computing the global +The Global Properties of Shapes component provides algorithms for computing the global properties of a composite geometric system in 3D space, and frameworks to query the computed results. -The global properties computed for a system are : +The global properties computed for a system are: * mass, * mass center, * matrix of inertia, @@ -1220,95 +1336,104 @@ Geometric systems are generally defined as shapes. Depending on the way they are The global properties of several systems may be brought together to give the global properties of the system composed of the sum of all individual systems. The Global Properties of Shapes component is composed of: -* seven functions for computing global properties of a shape: one function for lines, two functions for surfaces and four functions for volumes. The choice of functions depends on input parameters and algorithms used for computation (BRepGProp global functions), +* seven functions for computing global properties of a shape: one function for lines, two functions for surfaces and four functions for volumes. + The choice of functions depends on input parameters and algorithms used for computation (BRepGProp global functions), * a framework for computing global properties for a set of points (GProp_PGProps), * a general framework to bring together the global properties retained by several more elementary frameworks, and provide a general programming interface to consult computed global properties. Packages *GeomLProp* and *Geom2dLProp* provide algorithms calculating the local properties of curves and surfaces -A curve (for one parameter) has the following local properties: -- Point +A curve (for one parameter) has the following local properties: +- Point - Derivative -- Tangent +- Tangent - Normal - Curvature -- Center of curvature. +- Center of curvature. -A surface (for two parameters U and V) has the following local properties: +A surface (for two parameters U and V) has the following local properties: - point - derivative for U and V) - tangent line (for U and V) - normal -- max curvature -- min curvature +- max curvature +- min curvature - main directions of curvature - mean curvature - Gaussian curvature The following methods are available: -* *CLProps* -- calculates the local properties of a curve (tangency, curvature,normal); -* *CurAndInf2d* -- calculates the maximum and minimum curvatures and the inflection points of 2d curves; -* *SLProps* -- calculates the local properties of a surface (tangency, the normal and curvature). -* *Continuity* -- calculates regularity at the junction of two curves. +* *CLProps* -- calculates the local properties of a curve (tangency, curvature, normal); +* *CurAndInf2d* -- calculates the maximum and minimum curvatures and the inflection points of 2d curves; +* *SLProps* -- calculates the local properties of a surface (tangency, the normal and curvature). +* *Continuity* -- calculates regularity at the junction of two curves. -Note that the B-spline curve and surface are accepted but they are not cut into pieces of the desired continuity. It is the global continuity, which is seen. +Note that the B-spline curve and surface are accepted but they are not cut into pieces of the desired continuity. +It is the global continuity, which is seen. @subsection occt_modat_4_4 Adaptors for Curves and Surfaces -Some Open CASCADE Technology general algorithms may work theoretically on numerous types of curves or surfaces. +Some Open CASCADE Technology general algorithms may work theoretically on numerous types of curves or surfaces. -To do this, they simply get the services required of the analyzed curve or surface through an interface so as to a single API, whatever the type of curve or surface. These interfaces are called adaptors. +To do this, they simply get the services required of the analyzed curve or surface through an interface so as to a single API, whatever the type of curve or surface. +These interfaces are called adaptors. -For example, Adaptor3d_Curve is the abstract class which provides the required services by an algorithm which uses any 3d curve. +For example, Adaptor3d_Curve is the abstract class which provides the required services by an algorithm which uses any 3d curve. - GeomAdaptor package provides interfaces: +GeomAdaptor package provides interfaces: * On a Geom curve; * On a curve lying on a Geom surface; * On a Geom surface; - Geom2dAdaptor package provides interfaces : +Geom2dAdaptor package provides interfaces: * On a Geom2d curve. - BRepAdaptor package provides interfaces: +BRepAdaptor package provides interfaces: * On a Face * On an Edge -When you write an algorithm which operates on geometric objects, use Adaptor3d (or Adaptor2d) objects. +When you write an algorithm which operates on geometric objects, use Adaptor3d (or Adaptor2d) objects. As a result, you can use the algorithm with any kind of object, if you provide for this object an interface derived from *Adaptor3d* or *Adaptor2d*. These interfaces are easy to use: simply create an adapted curve or surface from a *Geom2d* curve, and then use this adapted curve as an argument for the algorithm? which requires it. @section occt_modat_6 Bounding boxes -Bounding boxes are used in many OCCT algorithms. The most common use is as a filter avoiding check of excess interferences between pairs of shapes (check of interferences between bounding boxes is much simpler then between shapes and if they do not interfere then there is no point in searching interferences between the corresponding shapes). -Generally, bounding boxes can be divided into two main types: +Bounding boxes are used in many OCCT algorithms. +The most common use is as a filter avoiding check of excess interferences between pairs of shapes +(check of interferences between bounding boxes is much simpler then between shapes and if they do not interfere then there is no point in searching interferences between the corresponding shapes). +Generally, bounding boxes can be divided into two main types: - axis-aligned bounding box (AABB) is the box whose edges are parallel to the axes of the World Coordinate System (WCS); - oriented BndBox (OBB) is defined in its own coordinate system that can be rotated with respect to the WCS. Indeed, an AABB is a specific case of OBB.
-The image below illustrates the example, when using OBB is better than AABB. +The image below illustrates the example, when using OBB is better than AABB. @figure{/user_guides/modeling_data/images/modeling_data_image015.png,"Illustrating the problem with AABB.",320} -AABBs in this picture are interfered. Therefore, many OCCT algorithms will spend much time to interfere the shapes. However, if we check OBBs, which are not interfered, then searching of interferences between the shapes will not be necessary. At that, creation and analysis of OBBs takes significantly more time than the analogical operations with AABB. +AABBs in this picture are interfered. Therefore, many OCCT algorithms will spend much time to interfere the shapes. +However, if we check OBBs, which are not interfered, then searching of interferences between the shapes will not be necessary. +At that, creation and analysis of OBBs takes significantly more time than the analogical operations with AABB. Later in this section, the bounding boxes having the smallest surface area will be called *optimal*. -In OCCT, bounding boxes are defined in *Bnd* package. *Bnd_Box* class defines AABB, *Bnd_OBB* class defines OBB. These classes contain the following common methods (this list is not complete; see the documentation about the corresponding class for detailed information): +In OCCT, bounding boxes are defined in *Bnd* package. *Bnd_Box* class defines AABB, *Bnd_OBB* class defines OBB. +These classes contain the following common methods (this list is not complete; see the documentation about the corresponding class for detailed information): - *IsVoid* method indicates whether the bounding box is empty (uninitialized). - *SetVoid* method clears the existing bounding box. - *Enlarge(...)* extends the current bounding box. - *Add(...)* extends the bounding box as necessary to include the object (a point, a shape, etc.) passed as the argument. - *IsOut(...)* checks whether the argument is inside/outside of the current BndBox. - + BRepBndLib class contains methods for creation of bounding boxes (both AABB and OBB) from the shapes. @subsection occt_modat_6_1 Brief description of some algorithms working with OBB @subsubsection occt_modat_6_1_1 Creation of OBB from set of points -The algorithm is described in "Fast Computation of Tight Fitting Oriented Bounding Boxes" by Thomas Larsson and Linus Källberg (FastOBBs.pdf). It includes the following steps: +The algorithm is described in "Fast Computation of Tight Fitting Oriented Bounding Boxes" by Thomas Larsson and Linus Källberg (FastOBBs.pdf). +It includes the following steps: 1. Choose \f$ N_{a} (N_{a} \geq 3) \f$ initial axes.
2. Project every given point to the every chosen (in item 1) axis. At that, "minimal" and "maximal" points of every axis (i.e. point having minimal and maximal parameter (correspondingly) of the projection to this axis) are chosen. I.e. \f$ 2*N_{a} \f$ points will be held and this set can contain equal points. Later (unless otherwise specified) in this algorithm we will work with these \f$ 2*N_{a} \f$ points only.
@@ -1328,8 +1453,10 @@ Further, let us consider the triangle \f$ T_{0}\left \langle p_{0}, p_{1}, p_{2} @subsubsection occt_modat_6_1_1_opt Creation of Optimal OBB from set of points For creation of the optimal OBB from set of points the same algorithm as described above is used but with some simplifications in logic and increased computation time. -For the optimal OBB it is necessary to check all possible axes which can be created by the extremal points. And since the extremal points are only valid for the initial axes it is necessary to project the whole set of points on each axis. -This approach usually provides much tighter OBB but the performance is lower. The complexity of the algorithm is still linear and with use of BVH for the set of points it is O(N + C*log(N)). +For the optimal OBB it is necessary to check all possible axes which can be created by the extremal points. +And since the extremal points are only valid for the initial axes it is necessary to project the whole set of points on each axis. +This approach usually provides much tighter OBB but the performance is lower. +The complexity of the algorithm is still linear and with use of BVH for the set of points it is O(N + C*log(N)). Here is the example of optimal and not optimal OBB for the model using the set of 125K nodes: @@ -1340,7 +1467,8 @@ Here is the example of optimal and not optimal OBB for the model using the set o
-Computation of the not optimal OBB in this case took 0.007 sec, optimal - 0.1 sec, which is about 14 times slower. Such performance is comparable to creation of the OBB for this shape by PCA approach (see below) which takes about 0.17 sec. +Computation of the not optimal OBB in this case took 0.007 sec, optimal - 0.1 sec, which is about 14 times slower. +Such performance is comparable to creation of the OBB for this shape by PCA approach (see below) which takes about 0.17 sec. The computation of optimal OBB is controlled by the same *theIsOptimal* flag in the BRepBndLib::AddOBB method as for PCA algorithm. @@ -1359,11 +1487,13 @@ The algorithm contains the following steps: @subsubsection occt_modat_6_1_3 Method IsOut for a point 1. Project the point to each axis. -2. Check, whether the absolute value of the projection parameter greater than the correspond half-dimension. In this case, *IsOut* method will return TRUE. +2. Check, whether the absolute value of the projection parameter greater than the correspond half-dimension. + In this case, *IsOut* method will return TRUE. @subsubsection occt_modat_6_1_4 Method IsOut for another OBB -According to the
"Separating Axis Theorem for Oriented Bounding Boxes", it is necessary to check the 15 separating axes: 6 axes of the boxes and 9 are their cross products.
+According to the "Separating Axis Theorem for Oriented Bounding Boxes", +it is necessary to check the 15 separating axes: 6 axes of the boxes and 9 are their cross products.
The algorithm of analyzing axis \f$ \mathbf{l} \f$ is following: 1. Compute the "length" according to the formula: \f$ L_{j}=\sum_{i=0}^{2}{H_{i}\cdot \left | \overrightarrow{\mathbf{a_{i}}} \cdot \overrightarrow{\mathbf{l}} \right |} \f$. Here, \f$ \mathbf{a_{i}} \f$ is an i-th axis (X-axis, Y-axis, Z-axis) of j-th BndBox (j=1...2). \f$ H_{i} \f$ is a half-dimension along i-th axis. 2. If \f$ \left |\overrightarrow{C_{1}C_{2}} \cdot \overrightarrow{\mathbf{l}} \right | > L_{1}+L_{2} \f$ (where \f$ C_{j} \f$ is the center of j-th OBB) then the considered OBBs are not interfered in terms of the axis \f$ \mathbf{l} \f$. @@ -1376,9 +1506,11 @@ Create a new OBB (see the section @ref occt_modat_6_1_1) based on the source poi @subsection occt_modat_6_2 Add a shape -Method *BRepBndLib::AddOBB(...)* allows creating the bounding box from a complex object *(TopoDS_Shape)*. This method uses both algorithms described in the sections @ref occt_modat_6_1_1 and sections @ref occt_modat_6_1_2. +Method *BRepBndLib::AddOBB(...)* allows creating the bounding box from a complex object *(TopoDS_Shape)*. +This method uses both algorithms described in the sections @ref occt_modat_6_1_1 and sections @ref occt_modat_6_1_2. -The first algorithm is used if the outer shell of the shape can be represented by a set of points contained in it. Namely, only the following elements are the source of set of points: +The first algorithm is used if the outer shell of the shape can be represented by a set of points contained in it. +Namely, only the following elements are the source of set of points: - Nodes of triangulation; - Nodes of *Poly_Polygon3D*; @@ -1390,7 +1522,9 @@ If the required set of points cannot be extracted then the algorithm from sectio The package *BRepBndLib* contains methods *BRepBndLib::Add(...), BRepBndLib::AddClose(...)* and *BRepBndLib::AddOptimal(...)* for creation of AABB of a shape. See the reference manual for the detailed information. -@subsection occt_modat_6_3 Limitations of algorithm for OBB creation. +@subsection occt_modat_6_3 Limitations of algorithm for OBB creation -1. The algorithm described in the section @ref occt_modat_6_1_1 works significantly better (finds resulting OBB with less surface area) and faster than the algorithm from the section @ref occt_modat_6_1_2. Nevertheless, (in general) the result returned by both algorithms is not always optimal (i.e. sometimes another OBB exists with a smaller surface area). Moreover, the first method does not allow computing OBBs of shapes with a complex geometry. +1. The algorithm described in the section @ref occt_modat_6_1_1 works significantly better (finds resulting OBB with less surface area) and faster than the algorithm from the section @ref occt_modat_6_1_2. + Nevertheless, (in general) the result returned by both algorithms is not always optimal (i.e. sometimes another OBB exists with a smaller surface area). + Moreover, the first method does not allow computing OBBs of shapes with a complex geometry. 2. Currently, the algorithm of OBB creation is implemented for objects in 3D space only. From 9eee5ab7e413dccc6db1124327e8841e85854381 Mon Sep 17 00:00:00 2001 From: ifv Date: Thu, 2 Dec 2021 17:02:17 +0300 Subject: [PATCH 200/639] 0032701: Modeling Algorithms - 2d curve has bending near the degenerated edge of the face ApproxInt_Approx, ApproxInt_KnotTools, BRepApprox_Approx, GeomInt_IntSS, IntTools_FaceFace: Analysis of curvature is added for adjusting ParametrizationType IntPatch_Intersection.cxx - adding methods for estimation of UV max step depending on used surfaces GeomInt_IntSS.cxx, IntTools_FaceFace.cxx - using methods for max step estimation Approx_SameParameter.cxx - adding control against big values. BOPAlgo_PaveFiller_6.cxx - adjusting position of faces before intersection --- src/Approx/Approx_SameParameter.cxx | 13 +- src/ApproxInt/ApproxInt_Approx.gxx | 2 +- src/ApproxInt/ApproxInt_KnotTools.cxx | 260 ++++++++++++++++--- src/ApproxInt/ApproxInt_KnotTools.hxx | 19 ++ src/BOPAlgo/BOPAlgo_PaveFiller_6.cxx | 107 +++++++- src/BRepApprox/BRepApprox_Approx.hxx | 5 + src/GeomInt/GeomInt_IntSS.cxx | 4 +- src/GeomInt/GeomInt_IntSS.hxx | 1 - src/GeomInt/GeomInt_IntSS_1.cxx | 33 ++- src/GeomInt/GeomInt_WLApprox.hxx | 6 +- src/IntPatch/IntPatch_Intersection.cxx | 146 ++++++++++- src/IntPatch/IntPatch_Intersection.hxx | 16 +- src/IntPatch/IntPatch_PrmPrmIntersection.cxx | 3 + src/IntPatch/IntPatch_RstInt.cxx | 7 +- src/IntTools/IntTools_FaceFace.cxx | 51 ++-- src/IntWalk/IntWalk_PWalking.cxx | 102 ++++++-- tests/lowalgos/intss/bug24472 | 2 +- tests/lowalgos/intss/bug27190 | 2 +- tests/lowalgos/intss/bug27664_1 | 2 +- tests/lowalgos/intss/bug28764 | 2 +- tests/lowalgos/intss/bug29972_3 | 4 +- tests/lowalgos/intss/bug32701 | 56 ++++ 22 files changed, 742 insertions(+), 101 deletions(-) create mode 100644 tests/lowalgos/intss/bug32701 diff --git a/src/Approx/Approx_SameParameter.cxx b/src/Approx/Approx_SameParameter.cxx index 5e9c451d85..3a13047f2c 100644 --- a/src/Approx/Approx_SameParameter.cxx +++ b/src/Approx/Approx_SameParameter.cxx @@ -166,8 +166,17 @@ static Standard_Real ComputeTolReached(const Handle(Adaptor3d_Curve)& c3d, { Standard_Real t = IntToReal(i) / IntToReal(nbp); Standard_Real u = first * (1.0 - t) + last * t; - gp_Pnt Pc3d = c3d->Value(u); - gp_Pnt Pcons = cons.Value(u); + gp_Pnt Pc3d, Pcons; + try + { + Pc3d = c3d->Value(u); + Pcons = cons.Value(u); + } + catch (Standard_Failure const&) + { + d2 = Precision::Infinite(); + break; + } if (Precision::IsInfinite(Pcons.X()) || Precision::IsInfinite(Pcons.Y()) || Precision::IsInfinite(Pcons.Z())) diff --git a/src/ApproxInt/ApproxInt_Approx.gxx b/src/ApproxInt/ApproxInt_Approx.gxx index 7be8911cf0..b115781ca5 100644 --- a/src/ApproxInt/ApproxInt_Approx.gxx +++ b/src/ApproxInt/ApproxInt_Approx.gxx @@ -91,7 +91,7 @@ static void ComputeTrsf2d(const Handle(TheWLine)& theline, //function : Parameters //purpose : //======================================================================= -static void Parameters(const ApproxInt_TheMultiLine& Line, +void ApproxInt_Approx::Parameters(const ApproxInt_TheMultiLine& Line, const Standard_Integer firstP, const Standard_Integer lastP, const Approx_ParametrizationType Par, diff --git a/src/ApproxInt/ApproxInt_KnotTools.cxx b/src/ApproxInt/ApproxInt_KnotTools.cxx index 2396d2a44f..d7acaf76d5 100644 --- a/src/ApproxInt/ApproxInt_KnotTools.cxx +++ b/src/ApproxInt/ApproxInt_KnotTools.cxx @@ -22,6 +22,8 @@ #include #include #include +#include +#include // (Sqrt(5.0) - 1.0) / 4.0 //static const Standard_Real aSinCoeff = 0.30901699437494742410229341718282; @@ -85,30 +87,35 @@ static Standard_Real EvalCurv(const Standard_Real dim, } //======================================================================= -//function : ComputeKnotInds +//function : BuildCurvature //purpose : //======================================================================= -void ApproxInt_KnotTools::ComputeKnotInds(const NCollection_LocalArray& theCoords, - const Standard_Integer theDim, - const math_Vector& thePars, - NCollection_Sequence& theInds) + +void ApproxInt_KnotTools::BuildCurvature( + const NCollection_LocalArray& theCoords, + const Standard_Integer theDim, + const math_Vector& thePars, + TColStd_Array1OfReal& theCurv, + Standard_Real& theMaxCurv) { - //I: Create discrete curvature. - NCollection_Sequence aFeatureInds; - TColStd_Array1OfReal aCurv(thePars.Lower(), thePars.Upper()); // Arrays are allocated for max theDim = 7: 1 3d curve + 2 2d curves. Standard_Real Val[21], Par[3], Res[21]; Standard_Integer i, j, m, ic; - Standard_Real aMaxCurv = 0.; Standard_Integer dim = theDim; // - i = aCurv.Lower(); - for(j = 0; j < 3; ++j) + theMaxCurv = 0.; + if (theCurv.Length() < 3) { - Standard_Integer k = i+j; - ic = (k - aCurv.Lower()) * dim; + theCurv.Init(0.); + return; + } + i = theCurv.Lower(); + for (j = 0; j < 3; ++j) + { + Standard_Integer k = i + j; + ic = (k - theCurv.Lower()) * dim; Standard_Integer l = dim*j; - for(m = 0; m < dim; ++m) + for (m = 0; m < dim; ++m) { Val[l + m] = theCoords[ic + m]; } @@ -116,21 +123,21 @@ void ApproxInt_KnotTools::ComputeKnotInds(const NCollection_LocalArray aMaxCurv) + if (theCurv(i) > theMaxCurv) { - aMaxCurv = aCurv(i); + theMaxCurv = theCurv(i); } // - for(i = aCurv.Lower()+1; i < aCurv.Upper(); ++i) + for (i = theCurv.Lower() + 1; i < theCurv.Upper(); ++i) { - for(j = 0; j < 3; ++j) + for (j = 0; j < 3; ++j) { - Standard_Integer k = i+j-1; - ic = (k - aCurv.Lower()) * dim; + Standard_Integer k = i + j - 1; + ic = (k - theCurv.Lower()) * dim; Standard_Integer l = dim*j; - for(m = 0; m < dim; ++m) + for (m = 0; m < dim; ++m) { Val[l + m] = theCoords[ic + m]; } @@ -138,20 +145,20 @@ void ApproxInt_KnotTools::ComputeKnotInds(const NCollection_LocalArray aMaxCurv) + theCurv(i) = EvalCurv(dim, &Res[dim], &Res[2 * dim]); + if (theCurv(i) > theMaxCurv) { - aMaxCurv = aCurv(i); + theMaxCurv = theCurv(i); } } // - i = aCurv.Upper(); - for(j = 0; j < 3; ++j) + i = theCurv.Upper(); + for (j = 0; j < 3; ++j) { - Standard_Integer k = i+j-2; - ic = (k - aCurv.Lower()) * dim; + Standard_Integer k = i + j - 2; + ic = (k - theCurv.Lower()) * dim; Standard_Integer l = dim*j; - for(m = 0; m < dim; ++m) + for (m = 0; m < dim; ++m) { Val[l + m] = theCoords[ic + m]; } @@ -159,12 +166,30 @@ void ApproxInt_KnotTools::ComputeKnotInds(const NCollection_LocalArray aMaxCurv) + theCurv(i) = EvalCurv(dim, &Res[dim], &Res[2 * dim]); + if (theCurv(i) > theMaxCurv) { - aMaxCurv = aCurv(i); + theMaxCurv = theCurv(i); } +} + +//======================================================================= +//function : ComputeKnotInds +//purpose : +//======================================================================= +void ApproxInt_KnotTools::ComputeKnotInds(const NCollection_LocalArray& theCoords, + const Standard_Integer theDim, + const math_Vector& thePars, + NCollection_Sequence& theInds) +{ + //I: Create discrete curvature. + NCollection_Sequence aFeatureInds; + TColStd_Array1OfReal aCurv(thePars.Lower(), thePars.Upper()); + Standard_Real aMaxCurv = 0.; + BuildCurvature(theCoords, theDim, thePars, aCurv, aMaxCurv); + // + Standard_Integer i, j, dim = theDim; #ifdef APPROXINT_KNOTTOOLS_DEBUG std::cout << "Discrete curvature array is" << std::endl; for(i = aCurv.Lower(); i <= aCurv.Upper(); ++i) @@ -623,3 +648,172 @@ void ApproxInt_KnotTools::BuildKnots(const TColgp_Array1OfPnt& thePntsXYZ, #endif } +//======================================================================= +//function : MaxParamRatio +//purpose : +//======================================================================= +static Standard_Real MaxParamRatio(const math_Vector& thePars) +{ + Standard_Integer i; + Standard_Real aMaxRatio = 0.; + // + for (i = thePars.Lower() + 1; i < thePars.Upper(); ++i) + { + Standard_Real aRat = (thePars(i + 1) - thePars(i)) / (thePars(i) - thePars(i - 1)); + if (aRat < 1.) + aRat = 1. / aRat; + + aMaxRatio = Max(aMaxRatio, aRat); + } + return aMaxRatio; +} +//======================================================================= +//function : DefineParType +//purpose : +//======================================================================= +Approx_ParametrizationType ApproxInt_KnotTools::DefineParType( + const Handle(IntPatch_WLine)& theWL, + const Standard_Integer theFpar, const Standard_Integer theLpar, + const Standard_Boolean theApproxXYZ, + const Standard_Boolean theApproxU1V1, + const Standard_Boolean theApproxU2V2 +) +{ + if (theLpar - theFpar == 1) + return Approx_IsoParametric; + + const Standard_Integer nbp3d = theApproxXYZ ? 1 : 0, + nbp2d = (theApproxU1V1 ? 1 : 0) + (theApproxU2V2 ? 1 : 0); + + GeomInt_TheMultiLineOfWLApprox aTestLine(theWL, nbp3d, nbp2d, theApproxU1V1, theApproxU2V2, + 0., 0., 0., 0., 0., 0., 0., theApproxU1V1, theFpar, theLpar); + + TColgp_Array1OfPnt aTabPnt3d(1, Max(1, nbp3d)); + TColgp_Array1OfPnt2d aTabPnt2d(1, Max(1, nbp2d)); + TColgp_Array1OfPnt aPntXYZ(theFpar, theLpar); + TColgp_Array1OfPnt2d aPntU1V1(theFpar, theLpar); + TColgp_Array1OfPnt2d aPntU2V2(theFpar, theLpar); + + Standard_Integer i, j; + + for (i = theFpar; i <= theLpar; ++i) + { + if (nbp3d != 0 && nbp2d != 0) aTestLine.Value(i, aTabPnt3d, aTabPnt2d); + else if (nbp2d != 0) aTestLine.Value(i, aTabPnt2d); + else if (nbp3d != 0) aTestLine.Value(i, aTabPnt3d); + // + if (nbp3d > 0) + { + aPntXYZ(i) = aTabPnt3d(1); + } + if (nbp2d > 1) + { + aPntU1V1(i) = aTabPnt2d(1); + aPntU2V2(i) = aTabPnt2d(2); + } + else if (nbp2d > 0) + { + if (theApproxU1V1) + { + aPntU1V1(i) = aTabPnt2d(1); + } + else + { + aPntU2V2(i) = aTabPnt2d(1); + } + } + } + + Standard_Integer aDim = 0; + + if (theApproxXYZ) + aDim += 3; + if (theApproxU1V1) + aDim += 2; + if (theApproxU2V2) + aDim += 2; + + Standard_Integer aLength = theLpar - theFpar + 1; + NCollection_LocalArray aCoords(aLength * aDim); + for (i = theFpar; i <= theLpar; ++i) + { + j = (i - theFpar) * aDim; + if (theApproxXYZ) + { + aCoords[j] = aPntXYZ.Value(i).X(); + ++j; + aCoords[j] = aPntXYZ.Value(i).Y(); + ++j; + aCoords[j] = aPntXYZ.Value(i).Z(); + ++j; + } + if (theApproxU1V1) + { + aCoords[j] = aPntU1V1.Value(i).X(); + ++j; + aCoords[j] = aPntU1V1.Value(i).Y(); + ++j; + } + if (theApproxU2V2) + { + aCoords[j] = aPntU2V2.Value(i).X(); + ++j; + aCoords[j] = aPntU2V2.Value(i).Y(); + ++j; + } + } + + //Analysis of curvature + const Standard_Real aCritRat = 500.; + const Standard_Real aCritParRat = 100.; + math_Vector aPars(theFpar, theLpar); + Approx_ParametrizationType aParType = Approx_ChordLength; + GeomInt_WLApprox::Parameters(aTestLine, theFpar, theLpar, aParType, aPars); + TColStd_Array1OfReal aCurv(aPars.Lower(), aPars.Upper()); + Standard_Real aMaxCurv = 0.; + BuildCurvature(aCoords, aDim, aPars, aCurv, aMaxCurv); + + if (aMaxCurv < Precision::PConfusion() + || Precision::IsPositiveInfinite(aMaxCurv)) + { + //Linear case + return aParType; + } + + Standard_Real aMidCurv = 0.; + Standard_Real eps = Epsilon(1.); + j = 0; + for (i = aCurv.Lower(); i <= aCurv.Upper(); ++i) + { + if (aMaxCurv - aCurv(i) < eps) + { + continue; + } + ++j; + aMidCurv += aCurv(i); + } + + if (j > 1) + { + aMidCurv /= j; + } + + if (aMidCurv <= eps) + return aParType; + + Standard_Real aRat = aMaxCurv / aMidCurv; + + if (aRat > aCritRat) + { + if(aRat > 5.*aCritRat) + aParType = Approx_Centripetal; + else + { + Standard_Real aParRat = MaxParamRatio(aPars); + if (aParRat > aCritParRat) + aParType = Approx_Centripetal; + } + } + + return aParType; +} diff --git a/src/ApproxInt/ApproxInt_KnotTools.hxx b/src/ApproxInt/ApproxInt_KnotTools.hxx index 06ede31915..b54e81e219 100644 --- a/src/ApproxInt/ApproxInt_KnotTools.hxx +++ b/src/ApproxInt/ApproxInt_KnotTools.hxx @@ -35,12 +35,15 @@ #include #include #include +#include class math_Vector; template class NCollection_Sequence; template class NCollection_List; template class NCollection_Vector; +class IntPatch_WLine; + // Corresponds for debug information output. // Debug information is also printed when OCCT_DEBUG defined. //#define APPROXINT_KNOTTOOLS_DEBUG @@ -81,6 +84,22 @@ public: const Standard_Integer theMinNbPnts, NCollection_Vector& theKnots); + //! Builds discrete curvature + Standard_EXPORT static void BuildCurvature( + const NCollection_LocalArray& theCoords, + const Standard_Integer theDim, + const math_Vector& thePars, + TColStd_Array1OfReal& theCurv, + Standard_Real& theMaxCurv); + + //! Defines preferable parametrization type for theWL + Standard_EXPORT static Approx_ParametrizationType DefineParType(const Handle(IntPatch_WLine)& theWL, + const Standard_Integer theFpar, const Standard_Integer theLpar, + const Standard_Boolean theApproxXYZ, + const Standard_Boolean theApproxU1V1, + const Standard_Boolean theApproxU2V2); + + private: //! Compute indices of knots: diff --git a/src/BOPAlgo/BOPAlgo_PaveFiller_6.cxx b/src/BOPAlgo/BOPAlgo_PaveFiller_6.cxx index 4dff51109f..a1c7d2b0e5 100644 --- a/src/BOPAlgo/BOPAlgo_PaveFiller_6.cxx +++ b/src/BOPAlgo/BOPAlgo_PaveFiller_6.cxx @@ -278,6 +278,35 @@ void BOPAlgo_PaveFiller::PerformFF(const Message_ProgressRange& theRange) // Post-processing options Standard_Boolean bSplitCurve = Standard_False; // + // Collect all pairs of Edge/Edge interferences to check if + // some faces have to be moved to obtain more precise intersection + NCollection_DataMap aEEMap; + const BOPDS_VectorOfInterfEE& aVEEs = myDS->InterfEE(); + for (Standard_Integer iEE = 0; iEE < aVEEs.Size(); ++iEE) + { + const BOPDS_Interf& aEE = aVEEs(iEE); + if (!aEE.HasIndexNew()) + { + continue; + } + Standard_Integer nE1, nE2; + aEE.Indices(nE1, nE2); + + const Standard_Integer nVN = aEE.IndexNew(); + + BOPDS_Pair aPair(nE1, nE2); + TColStd_ListOfInteger* pPoints = aEEMap.ChangeSeek(aPair); + if (pPoints) + { + pPoints->Append(nVN); + } + else + { + pPoints = aEEMap.Bound(BOPDS_Pair(nE1, nE2), TColStd_ListOfInteger()); + pPoints->Append(nVN); + } + } + // Prepare the pairs of faces for intersection BOPAlgo_VectorOfFaceFace aVFaceFace; myIterator->Initialize(TopAbs_FACE, TopAbs_FACE); @@ -306,15 +335,87 @@ void BOPAlgo_PaveFiller::PerformFF(const Message_ProgressRange& theRange) continue; } } + + // Check if there is an intersection between edges of the faces. + // If there is an intersection, check if there is a shift between the edges + // (intersection point is on some distance from the edges), and move one of + // the faces to the point of exact edges intersection. This should allow + // obtaining more precise intersection curves between the faces + // (at least the curves should reach the boundary). + // Note, that currently this check considers only closed edges (seam edges). + TopoDS_Face aFShifted1 = aF1, aFShifted2 = aF2; + // Keep shift value to use it as the tolerance for intersection curves + Standard_Real aShiftValue = 0.; + + if (aBAS1.GetType() != GeomAbs_Plane || + aBAS2.GetType() != GeomAbs_Plane) { + + Standard_Boolean isFound = Standard_False; + for (TopExp_Explorer aExp1(aF1, TopAbs_EDGE); !isFound && aExp1.More(); aExp1.Next()) + { + const TopoDS_Edge& aE1 = TopoDS::Edge(aExp1.Current()); + const Standard_Integer nE1 = myDS->Index(aE1); + + for (TopExp_Explorer aExp2(aF2, TopAbs_EDGE); !isFound && aExp2.More(); aExp2.Next()) + { + const TopoDS_Edge& aE2 = TopoDS::Edge(aExp2.Current()); + const Standard_Integer nE2 = myDS->Index(aE2); + + Standard_Boolean bIsClosed1 = BRep_Tool::IsClosed(aE1, aF1); + Standard_Boolean bIsClosed2 = BRep_Tool::IsClosed(aE2, aF2); + if (!bIsClosed1 && !bIsClosed2) + { + continue; + } + + const TColStd_ListOfInteger* pPoints = aEEMap.Seek(BOPDS_Pair(nE1, nE2)); + if (!pPoints) + { + continue; + } + + for (TColStd_ListOfInteger::Iterator itEEP(*pPoints); itEEP.More(); itEEP.Next()) + { + const Standard_Integer& nVN = itEEP.Value(); + const TopoDS_Vertex& aVN = TopoDS::Vertex(myDS->Shape(nVN)); + const gp_Pnt& aPnt = BRep_Tool::Pnt(aVN); + + // Compute points exactly on the edges + GeomAPI_ProjectPointOnCurve& aProjPC1 = myContext->ProjPC(aE1); + GeomAPI_ProjectPointOnCurve& aProjPC2 = myContext->ProjPC(aE2); + aProjPC1.Perform(aPnt); + aProjPC2.Perform(aPnt); + if (!aProjPC1.NbPoints() && !aProjPC2.NbPoints()) + { + continue; + } + gp_Pnt aP1 = aProjPC1.NbPoints() > 0 ? aProjPC1.NearestPoint() : aPnt; + gp_Pnt aP2 = aProjPC2.NbPoints() > 0 ? aProjPC2.NearestPoint() : aPnt; + + Standard_Real aShiftDist = aP1.Distance(aP2); + if (aShiftDist > BRep_Tool::Tolerance(aVN)) + { + // Move one of the faces to the point of exact intersection of edges + gp_Trsf aTrsf; + aTrsf.SetTranslation(bIsClosed1 ? gp_Vec(aP1, aP2) : gp_Vec(aP2, aP1)); + TopLoc_Location aLoc(aTrsf); + (bIsClosed1 ? &aFShifted1 : &aFShifted2)->Move(aLoc); + aShiftValue = aShiftDist; + isFound = Standard_True; + } + } + } + } + } // BOPAlgo_FaceFace& aFaceFace=aVFaceFace.Appended(); // aFaceFace.SetRunParallel (myRunParallel); aFaceFace.SetIndices(nF1, nF2); - aFaceFace.SetFaces(aF1, aF2); + aFaceFace.SetFaces(aFShifted1, aFShifted2); aFaceFace.SetBoxes (myDS->ShapeInfo (nF1).Box(), myDS->ShapeInfo (nF2).Box()); - // compute minimal tolerance for the curves - Standard_Real aTolFF = ToleranceFF(aBAS1, aBAS2); + // Note: in case of faces with closed edges it should not be less than value of the shift + Standard_Real aTolFF = Max(aShiftValue, ToleranceFF(aBAS1, aBAS2)); aFaceFace.SetTolFF(aTolFF); // IntSurf_ListOfPntOn2S aListOfPnts; diff --git a/src/BRepApprox/BRepApprox_Approx.hxx b/src/BRepApprox/BRepApprox_Approx.hxx index 87c91f00a9..f657cea66e 100644 --- a/src/BRepApprox/BRepApprox_Approx.hxx +++ b/src/BRepApprox/BRepApprox_Approx.hxx @@ -105,6 +105,11 @@ public: Standard_EXPORT const AppParCurves_MultiBSpCurve& Value (const Standard_Integer Index) const; + Standard_EXPORT static void Parameters(const BRepApprox_TheMultiLineOfApprox& Line, + const Standard_Integer firstP, + const Standard_Integer lastP, + const Approx_ParametrizationType Par, + math_Vector& TheParameters); diff --git a/src/GeomInt/GeomInt_IntSS.cxx b/src/GeomInt/GeomInt_IntSS.cxx index d78024a950..1417ab4cf5 100644 --- a/src/GeomInt/GeomInt_IntSS.cxx +++ b/src/GeomInt/GeomInt_IntSS.cxx @@ -18,6 +18,7 @@ #include #include +#include //======================================================================= //function : Perform @@ -82,7 +83,7 @@ void GeomInt_IntSS::Perform(const Handle(Geom_Surface)& S1, Standard_Real TolArc = Tol; Standard_Real TolTang = Tol; - Standard_Real UVMaxStep = 0.001; + Standard_Real UVMaxStep = IntPatch_Intersection::DefineUVMaxStep(myHS1, dom1, myHS2, dom2); Standard_Real Deflection = 0.1; myIntersector.SetTolerances(TolArc,TolTang,UVMaxStep,Deflection); @@ -184,3 +185,4 @@ void GeomInt_IntSS::Perform(const Handle(Geom_Surface)& S1, StdFail_NotDone_Raise_if(!myIntersector.IsDone(),"GeomInt_IntSS::LineOnS2"); return slineS2(Index); } + diff --git a/src/GeomInt/GeomInt_IntSS.hxx b/src/GeomInt/GeomInt_IntSS.hxx index 42201856fc..068cc69d4c 100644 --- a/src/GeomInt/GeomInt_IntSS.hxx +++ b/src/GeomInt/GeomInt_IntSS.hxx @@ -106,7 +106,6 @@ public: Standard_EXPORT static Handle(Geom2d_BSplineCurve) MakeBSpline2d(const Handle(IntPatch_WLine)& theWLine, const Standard_Integer ideb, const Standard_Integer ifin, const Standard_Boolean onFirst); - protected: diff --git a/src/GeomInt/GeomInt_IntSS_1.cxx b/src/GeomInt/GeomInt_IntSS_1.cxx index 9ad1877196..d75c6cdc81 100644 --- a/src/GeomInt/GeomInt_IntSS_1.cxx +++ b/src/GeomInt/GeomInt_IntSS_1.cxx @@ -48,6 +48,7 @@ #include #include #include +#include //======================================================================= //function : AdjustUPeriodic @@ -623,12 +624,31 @@ void GeomInt_IntSS::MakeCurve(const Standard_Integer Index, ifprm = (Standard_Integer)fprm; ilprm = (Standard_Integer)lprm; } - //-- lbr : - //-- Si une des surfaces est un plan , on approxime en 2d - //-- sur cette surface et on remonte les points 2d en 3d. + + Standard_Boolean anApprox = myApprox; + Standard_Boolean anApprox1 = myApprox1; + Standard_Boolean anApprox2 = myApprox2; GeomAbs_SurfaceType typs1, typs2; typs1 = myHS1->GetType(); typs2 = myHS2->GetType(); + + if (typs1 == GeomAbs_Plane) { + anApprox = Standard_False; + anApprox1 = Standard_True; + } + else if (typs2 == GeomAbs_Plane) { + anApprox = Standard_False; + anApprox2 = Standard_True; + } + + Approx_ParametrizationType aParType = ApproxInt_KnotTools::DefineParType(WL, ifprm, ilprm, + anApprox, anApprox1, anApprox2); + + theapp3d.SetParameters(myTolApprox, tol2d, 4, 8, 0, 30, myHS1 != myHS2, aParType); + + //-- lbr : + //-- Si une des surfaces est un plan , on approxime en 2d + //-- sur cette surface et on remonte les points 2d en 3d. // if(typs1 == GeomAbs_Plane) { theapp3d.Perform(myHS1, myHS2, WL, Standard_False, @@ -646,12 +666,7 @@ void GeomInt_IntSS::MakeCurve(const Standard_Integer Index, if ((typs1==GeomAbs_BezierSurface || typs1==GeomAbs_BSplineSurface) && (typs2==GeomAbs_BezierSurface || typs2==GeomAbs_BSplineSurface)) { - theapp3d.SetParameters(myTolApprox, tol2d, 4, 8, 0, 30, Standard_True); - //Standard_Boolean bUseSurfaces; - //bUseSurfaces=NotUseSurfacesForApprox(myFace1, myFace2, WL, ifprm, ilprm); - //if (bUseSurfaces) { - //theapp3d.SetParameters(myTolApprox, tol2d, 4, 8, 0, Standard_False); - //} + theapp3d.SetParameters(myTolApprox, tol2d, 4, 8, 0, 30, Standard_True, aParType); } } // diff --git a/src/GeomInt/GeomInt_WLApprox.hxx b/src/GeomInt/GeomInt_WLApprox.hxx index 436c3a28b7..910fddebfe 100644 --- a/src/GeomInt/GeomInt_WLApprox.hxx +++ b/src/GeomInt/GeomInt_WLApprox.hxx @@ -96,7 +96,11 @@ public: Standard_EXPORT const AppParCurves_MultiBSpCurve& Value (const Standard_Integer Index) const; - + Standard_EXPORT static void Parameters(const GeomInt_TheMultiLineOfWLApprox& Line, + const Standard_Integer firstP, + const Standard_Integer lastP, + const Approx_ParametrizationType Par, + math_Vector& TheParameters); protected: diff --git a/src/IntPatch/IntPatch_Intersection.cxx b/src/IntPatch/IntPatch_Intersection.cxx index 1ef65fe6a4..8ed58b152e 100644 --- a/src/IntPatch/IntPatch_Intersection.cxx +++ b/src/IntPatch/IntPatch_Intersection.cxx @@ -35,6 +35,7 @@ #include #include + //====================================================================== // function: SequenceOfLine //====================================================================== @@ -125,7 +126,7 @@ void IntPatch_Intersection::SetTolerances(const Standard_Real TolArc, if(myTolArc>0.5) myTolArc=0.5; if(myTolTang>0.5) myTolTang=0.5; if(myFleche<1.0e-3) myFleche=1e-3; - if(myUVMaxStep<1.0e-3) myUVMaxStep=1e-3; + //if(myUVMaxStep<1.0e-3) myUVMaxStep=1e-3; if(myFleche>10) myFleche=10; if(myUVMaxStep>0.5) myUVMaxStep=0.5; } @@ -1023,7 +1024,6 @@ void IntPatch_Intersection::Perform(const Handle(Adaptor3d_Surface)& theS1, myFleche = 0.01; if(myUVMaxStep <= Precision::PConfusion()) myUVMaxStep = 0.01; - done = Standard_False; spnt.Clear(); slin.Clear(); @@ -1254,15 +1254,16 @@ void IntPatch_Intersection::ParamParamPerfom(const Handle(Adaptor3d_Surface)& t const GeomAbs_SurfaceType typs2) { IntPatch_PrmPrmIntersection interpp; + // if(!theD1->DomainIsInfinite() && !theD2->DomainIsInfinite()) { Standard_Boolean ClearFlag = Standard_True; if(!ListOfPnts.IsEmpty()) { - interpp.Perform(theS1,theD1,theS2,theD2,TolTang,TolArc,myFleche,myUVMaxStep, ListOfPnts); + interpp.Perform(theS1,theD1,theS2,theD2,TolTang,TolArc,myFleche, myUVMaxStep, ListOfPnts); ClearFlag = Standard_False; } - interpp.Perform(theS1,theD1,theS2,theD2,TolTang,TolArc,myFleche,myUVMaxStep,ClearFlag); + interpp.Perform(theS1,theD1,theS2,theD2,TolTang,TolArc,myFleche, myUVMaxStep,ClearFlag); } else if((theD1->DomainIsInfinite()) ^ (theD2->DomainIsInfinite())) { @@ -1275,7 +1276,7 @@ void IntPatch_Intersection::ParamParamPerfom(const Handle(Adaptor3d_Surface)& t const Standard_Real AP = Max(MU, MV); Handle(Adaptor3d_Surface) SS; FUN_TrimInfSurf(pMinXYZ, pMaxXYZ, theS1, AP, SS); - interpp.Perform(SS,theD1,theS2,theD2,TolTang,TolArc,myFleche,myUVMaxStep); + interpp.Perform(SS,theD1,theS2,theD2,TolTang,TolArc,myFleche, myUVMaxStep); } else { @@ -1285,7 +1286,7 @@ void IntPatch_Intersection::ParamParamPerfom(const Handle(Adaptor3d_Surface)& t const Standard_Real AP = Max(MU, MV); Handle(Adaptor3d_Surface) SS; FUN_TrimInfSurf(pMinXYZ, pMaxXYZ, theS2, AP, SS); - interpp.Perform(theS1, theD1, SS, theD2,TolTang, TolArc,myFleche,myUVMaxStep); + interpp.Perform(theS1, theD1, SS, theD2,TolTang, TolArc,myFleche, myUVMaxStep); } }//(theD1->DomainIsInfinite()) ^ (theD2->DomainIsInfinite()) else @@ -1324,7 +1325,7 @@ void IntPatch_Intersection::ParamParamPerfom(const Handle(Adaptor3d_Surface)& t Handle(Adaptor3d_Surface) nS1 = theS1; Handle(Adaptor3d_Surface) nS2 = theS2; FUN_TrimBothSurf(theS1,typs1,theS2,typs2,1.e+8,nS1,nS2); - interpp.Perform(nS1,theD1,nS2,theD2,TolTang,TolArc,myFleche,myUVMaxStep); + interpp.Perform(nS1,theD1,nS2,theD2,TolTang,TolArc,myFleche, myUVMaxStep); }// 'NON - COLLINEAR LINES' }// both domains are infinite @@ -1791,3 +1792,134 @@ void IntPatch_Intersection::Dump(const Standard_Integer /*Mode*/, #endif } + +//======================================================================= +//function : CheckSingularPoints +//purpose : +//======================================================================= +Standard_Boolean IntPatch_Intersection::CheckSingularPoints( + const Handle(Adaptor3d_Surface)& theS1, + const Handle(Adaptor3d_TopolTool)& theD1, + const Handle(Adaptor3d_Surface)& theS2, + Standard_Real& theDist) +{ + theDist = Precision::Infinite(); + Standard_Boolean isSingular = Standard_False; + if (theS1 == theS2) + { + return isSingular; + } + // + const Standard_Integer aNbBndPnts = 5; + const Standard_Real aTol = Precision::Confusion(); + Standard_Integer i; + theD1->Init(); + Standard_Boolean isU = Standard_True; + for (; theD1->More(); theD1->Next()) + { + Handle(Adaptor2d_Curve2d) aBnd = theD1->Value(); + Standard_Real pinf = aBnd->FirstParameter(), psup = aBnd->LastParameter(); + if (Precision::IsNegativeInfinite(pinf) || Precision::IsPositiveInfinite(psup)) + { + continue; + } + Standard_Real t, dt = (psup - pinf) / (aNbBndPnts - 1); + gp_Pnt2d aP1; + gp_Vec2d aDir; + aBnd->D1((pinf + psup) / 2., aP1, aDir); + if (Abs(aDir.X()) > Abs(aDir.Y())) + isU = Standard_True; + else + isU = Standard_False; + gp_Pnt aPP1; + gp_Vec aDU, aDV; + Standard_Real aD1NormMax = 0.; + gp_XYZ aPmid(0., 0., 0.); + Standard_Integer aNb = 0; + for (t = pinf; t <= psup; t += dt) + { + aP1 = aBnd->Value(t); + theS1->D1(aP1.X(), aP1.Y(), aPP1, aDU, aDV); + if (isU) + aD1NormMax = Max(aD1NormMax, aDU.Magnitude()); + else + aD1NormMax = Max(aD1NormMax, aDV.Magnitude()); + + aPmid += aPP1.XYZ(); + aNb++; + + if (aD1NormMax > aTol) + break; + } + + if (aD1NormMax <= aTol) + { + //Singular point aPP1; + aPmid /= aNb; + aPP1.SetXYZ(aPmid); + Standard_Real aTolU = Precision::PConfusion(), aTolV = Precision::PConfusion(); + Extrema_ExtPS aProj(aPP1, *theS2.get(), aTolU, aTolV, Extrema_ExtFlag_MIN); + + if (aProj.IsDone()) + { + Standard_Integer aNbExt = aProj.NbExt(); + for (i = 1; i <= aNbExt; ++i) + { + theDist = Min(theDist, aProj.SquareDistance(i)); + } + } + + } + } + if (!Precision::IsInfinite(theDist)) + { + theDist = Sqrt(theDist); + isSingular = Standard_True; + } + + return isSingular; + +} +//======================================================================= +//function : DefineUVMaxStep +//purpose : +//======================================================================= +Standard_Real IntPatch_Intersection::DefineUVMaxStep( + const Handle(Adaptor3d_Surface)& theS1, + const Handle(Adaptor3d_TopolTool)& theD1, + const Handle(Adaptor3d_Surface)& theS2, + const Handle(Adaptor3d_TopolTool)& theD2) +{ + Standard_Real anUVMaxStep = 0.001; + Standard_Real aDistToSing1 = Precision::Infinite(); + Standard_Real aDistToSing2 = Precision::Infinite(); + const Standard_Real aTolMin = Precision::Confusion(), aTolMax = 1.e-5; + if (theS1 != theS2) + { + Standard_Boolean isSing1 = CheckSingularPoints(theS1, theD1, theS2, aDistToSing1); + if (isSing1) + { + if (aDistToSing1 > aTolMin && aDistToSing1 < aTolMax) + { + anUVMaxStep = 0.0001; + } + else + { + isSing1 = Standard_False; + } + } + if (!isSing1) + { + Standard_Boolean isSing2 = CheckSingularPoints(theS2, theD2, theS1, aDistToSing2); + if (isSing2) + { + if (aDistToSing2 > aTolMin && aDistToSing2 < aTolMax) + { + anUVMaxStep = 0.0001; + } + } + } + } + return anUVMaxStep; +} + diff --git a/src/IntPatch/IntPatch_Intersection.hxx b/src/IntPatch/IntPatch_Intersection.hxx index b73cbdaae2..42661743c7 100644 --- a/src/IntPatch/IntPatch_Intersection.hxx +++ b/src/IntPatch/IntPatch_Intersection.hxx @@ -133,7 +133,21 @@ public: //! Mode for more accurate dumps. Standard_EXPORT void Dump (const Standard_Integer Mode, const Handle(Adaptor3d_Surface)& S1, const Handle(Adaptor3d_TopolTool)& D1, const Handle(Adaptor3d_Surface)& S2, const Handle(Adaptor3d_TopolTool)& D2) const; - + //! Checks if surface theS1 has degenerated boundary (dS/du or dS/dv = 0) and + //! calculates minimal distance between corresponding singular points and surface theS2 + //! If singular point exists the method returns "true" and stores minimal distance in theDist. + Standard_EXPORT static Standard_Boolean CheckSingularPoints( + const Handle(Adaptor3d_Surface)& theS1, + const Handle(Adaptor3d_TopolTool)& theD1, + const Handle(Adaptor3d_Surface)& theS2, + Standard_Real& theDist); + + //! Calculates recommended value for myUVMaxStep depending on surfaces and their domains + Standard_EXPORT static Standard_Real DefineUVMaxStep( + const Handle(Adaptor3d_Surface)& theS1, + const Handle(Adaptor3d_TopolTool)& theD1, + const Handle(Adaptor3d_Surface)& theS2, + const Handle(Adaptor3d_TopolTool)& theD2); protected: diff --git a/src/IntPatch/IntPatch_PrmPrmIntersection.cxx b/src/IntPatch/IntPatch_PrmPrmIntersection.cxx index 3b328c07e6..a96f662f7c 100644 --- a/src/IntPatch/IntPatch_PrmPrmIntersection.cxx +++ b/src/IntPatch/IntPatch_PrmPrmIntersection.cxx @@ -2386,6 +2386,9 @@ void IntPatch_PrmPrmIntersection::Perform (const Handle(Adaptor3d_Surface)& Surf //Try to extend the intersection line to the boundary, //if it is possibly PW.PutToBoundary(Surf1, Surf2); + // + if (PW.NbPoints() < 3) + continue; const Standard_Integer aMinNbPoints = 40; if(PW.NbPoints() < aMinNbPoints) diff --git a/src/IntPatch/IntPatch_RstInt.cxx b/src/IntPatch/IntPatch_RstInt.cxx index c40fd552f3..6c16d7162f 100644 --- a/src/IntPatch/IntPatch_RstInt.cxx +++ b/src/IntPatch/IntPatch_RstInt.cxx @@ -649,8 +649,11 @@ void IntPatch_RstInt::PutVertexOnLine (const Handle(IntPatch_Line)& L, IntCS.ParameterOnSurface(U2,V2); gp_Pnt anOldPnt, aNewPnt; OtherSurf->D0(U,V, anOldPnt); - OtherSurf->D0(U2,V2, aNewPnt); - if (anOldPnt.SquareDistance(aNewPnt) < Precision::SquareConfusion()) + OtherSurf->D0(U2,V2, aNewPnt); + //if (anOldPnt.SquareDistance(aNewPnt) < Precision::SquareConfusion()) + Standard_Real aTolConf = Max(Precision::Confusion(), edgeTol); + + if (anOldPnt.SquareDistance(aNewPnt) < aTolConf * aTolConf) { U2 = U; V2 = V; diff --git a/src/IntTools/IntTools_FaceFace.cxx b/src/IntTools/IntTools_FaceFace.cxx index b2e680f7a6..181d9d47a5 100644 --- a/src/IntTools/IntTools_FaceFace.cxx +++ b/src/IntTools/IntTools_FaceFace.cxx @@ -55,6 +55,7 @@ #include #include #include +#include static void Parameters(const Handle(GeomAdaptor_Surface)&, @@ -502,7 +503,7 @@ void IntTools_FaceFace::Perform (const TopoDS_Face& aF1, Tolerances(myHS1, myHS2, TolTang); { - const Standard_Real UVMaxStep = 0.001; + const Standard_Real UVMaxStep = IntPatch_Intersection::DefineUVMaxStep(myHS1, dom1, myHS2, dom2); const Standard_Real Deflection = 0.1; myIntersector.SetTolerances(TolArc, TolTang, UVMaxStep, Deflection); } @@ -1164,22 +1165,6 @@ void IntTools_FaceFace::MakeCurve(const Standard_Integer Index, tol2d = myTolApprox; } - if(myHS1 == myHS2) { - theapp3d.SetParameters(myTolApprox, tol2d, 4, 8, 0, 30, Standard_False, aParType); - rejectSurface = Standard_True; - } - else { - if(reApprox && !rejectSurface) - theapp3d.SetParameters(myTolApprox, tol2d, 4, 8, 0, 30, Standard_False, aParType); - else { - Standard_Integer iDegMax, iDegMin, iNbIter; - // - ApproxParameters(myHS1, myHS2, iDegMin, iDegMax, iNbIter); - theapp3d.SetParameters(myTolApprox, tol2d, iDegMin, iDegMax, - iNbIter, 30, Standard_True, aParType); - } - } - // Standard_Real aReachedTol = Precision::Confusion(); bIsDecomposited = IntTools_WLineTool:: DecompositionOfWLine(WL, @@ -1227,6 +1212,35 @@ void IntTools_FaceFace::MakeCurve(const Standard_Integer Index, ilprm = (Standard_Integer)lprm; } } + + Standard_Boolean anApprox = myApprox; + if (typs1 == GeomAbs_Plane) { + anApprox = Standard_False; + anApprox1 = Standard_True; + } + else if (typs2 == GeomAbs_Plane) { + anApprox = Standard_False; + anApprox2 = Standard_True; + } + + aParType = ApproxInt_KnotTools::DefineParType(WL, ifprm, ilprm, + anApprox, anApprox1, anApprox2); + if (myHS1 == myHS2) { + theapp3d.SetParameters(myTolApprox, tol2d, 4, 8, 0, 30, Standard_False, aParType); + rejectSurface = Standard_True; + } + else { + if (reApprox && !rejectSurface) + theapp3d.SetParameters(myTolApprox, tol2d, 4, 8, 0, 30, Standard_False, aParType); + else { + Standard_Integer iDegMax, iDegMin, iNbIter; + // + ApproxParameters(myHS1, myHS2, iDegMin, iDegMax, iNbIter); + theapp3d.SetParameters(myTolApprox, tol2d, iDegMin, iDegMax, + iNbIter, 30, Standard_True, aParType); + } + } + //-- lbr : //-- Si une des surfaces est un plan , on approxime en 2d //-- sur cette surface et on remonte les points 2d en 3d. @@ -1892,6 +1906,7 @@ Handle(Geom_Curve) MakeBSpline (const Handle(IntPatch_WLine)& WL, enlarge=Standard_True; } // + if(!isuperiodic && enlarge) { if(!Precision::IsInfinite(theumin) && @@ -1907,6 +1922,7 @@ Handle(Geom_Curve) MakeBSpline (const Handle(IntPatch_WLine)& WL, else theumax = usup; } + // if(!isvperiodic && enlarge) { if(!Precision::IsInfinite(thevmin) && @@ -1924,6 +1940,7 @@ Handle(Geom_Curve) MakeBSpline (const Handle(IntPatch_WLine)& WL, thevmax = vsup; } } + // if(isuperiodic || isvperiodic) { Standard_Boolean correct = Standard_False; diff --git a/src/IntWalk/IntWalk_PWalking.cxx b/src/IntWalk/IntWalk_PWalking.cxx index e9f1efade3..464e42f876 100644 --- a/src/IntWalk/IntWalk_PWalking.cxx +++ b/src/IntWalk/IntWalk_PWalking.cxx @@ -2316,10 +2316,65 @@ Standard_Boolean IntWalk_PWalking::HandleSingleSingularPoint(const Handle(Adapto if (anInt.IsEmpty()) continue; - anInt.Point().Parameters(thePnt(1), thePnt(2), thePnt(3), thePnt(4)); - + Standard_Real aPars[4]; + anInt.Point().Parameters(aPars[0], aPars[1], aPars[2], aPars[3]); + Handle(Adaptor3d_Surface) aSurfs[2] = { theASurf1, theASurf2 }; + //Local resolutions + Standard_Real aTol2 = the3DTol * the3DTol; + gp_Pnt aP; + gp_Vec aDU, aDV; + gp_Pnt aPInt; + Standard_Integer k; + for (k = 0; k < 2; ++k) + { + Standard_Integer iu, iv; + iu = 2*k; + iv = iu + 1; + aSurfs[k]->D1(aPars[iu], aPars[iv], aPInt, aDU, aDV); + Standard_Real aMod = aDU.Magnitude(); + if (aMod > Precision::Confusion()) + { + Standard_Real aTolU = the3DTol / aMod; + if (Abs(aLowBorder[iu] - aPars[iu]) < aTolU) + { + aP = aSurfs[k]->Value(aLowBorder[iu], aPars[iv]); + if (aPInt.SquareDistance(aP) < aTol2) + aPars[iu] = aLowBorder[iu]; + } + else if (Abs(aUppBorder[iu] - aPars[iu]) < aTolU) + { + aP = aSurfs[k]->Value(aUppBorder[iu], aPars[iv]); + if (aPInt.SquareDistance(aP) < aTol2) + aPars[iu] = aUppBorder[iu]; + } + } + aMod = aDV.Magnitude(); + if (aMod > Precision::Confusion()) + { + Standard_Real aTolV = the3DTol / aMod; + if (Abs(aLowBorder[iv] - aPars[iv]) < aTolV) + { + aP = aSurfs[k]->Value(aPars[iu], aLowBorder[iv]); + if (aPInt.SquareDistance(aP) < aTol2) + aPars[iv] = aLowBorder[iv]; + } + else if (Abs(aUppBorder[iv] - aPars[iv]) < aTolV) + { + aP = aSurfs[k]->Value(aPars[iu], aUppBorder[iv]); + if (aPInt.SquareDistance(aP) < aTol2) + aPars[iv] = aUppBorder[iv]; + } + } + } + // + // + Standard_Integer j; + for (j = 1; j <= 4; ++j) + { + thePnt(j) = aPars[j - 1]; + } Standard_Boolean isInDomain = Standard_True; - for (Standard_Integer j = 1; isInDomain && (j <= 4); ++j) + for (j = 1; isInDomain && (j <= 4); ++j) { if ((thePnt(j) - aLowBorder[j - 1] + Precision::PConfusion())* (thePnt(j) - aUppBorder[j - 1] - Precision::PConfusion()) > 0.0) @@ -2461,13 +2516,13 @@ Standard_Boolean IntWalk_PWalking:: { break; } - else if (aPInd == 1) - { - // After insertion, we will obtain - // two coincident points in the line. - // Therefore, insertion is forbidden. - return isOK; - } + //else if (aPInd == 1) + //{ + // // After insertion, we will obtain + // // two coincident points in the line. + // // Therefore, insertion is forbidden. + // return isOK; + //} } for (++aPInd; aPInd <= aNbPnts; aPInd++) @@ -2493,6 +2548,12 @@ Standard_Boolean IntWalk_PWalking:: RemoveAPoint(1); } + aP1.SetXYZ(line->Value(1).Value().XYZ()); + if (aP1.SquareDistance(aPInt) <= Precision::SquareConfusion()) + { + RemoveAPoint(1); + } + line->InsertBefore(1, anIP); isOK = Standard_True; } @@ -2511,13 +2572,13 @@ Standard_Boolean IntWalk_PWalking:: { break; } - else if (aPInd == aNbPnts) - { - // After insertion, we will obtain - // two coincident points in the line. - // Therefore, insertion is forbidden. - return isOK; - } + //else if (aPInd == aNbPnts) + //{ + // // After insertion, we will obtain + // // two coincident points in the line. + // // Therefore, insertion is forbidden. + // return isOK; + //} } for (--aPInd; aPInd > 0; aPInd--) @@ -2543,7 +2604,14 @@ Standard_Boolean IntWalk_PWalking:: RemoveAPoint(aNbPnts); } + Standard_Integer aNbPnts = line->NbPoints(); + aP1.SetXYZ(line->Value(aNbPnts).Value().XYZ()); + if (aP1.SquareDistance(aPInt) <= Precision::SquareConfusion()) + { + RemoveAPoint(aNbPnts); + } line->Add(anIP); + isOK = Standard_True; } diff --git a/tests/lowalgos/intss/bug24472 b/tests/lowalgos/intss/bug24472 index 83b61430fa..8f0f2393b0 100644 --- a/tests/lowalgos/intss/bug24472 +++ b/tests/lowalgos/intss/bug24472 @@ -7,7 +7,7 @@ puts "" ############################### puts "TODO OCC29501 ALL: Error in ii12_22" - +puts "TODO OCC29501 All: Error: The curve ii12_22 is possible" set MaxToler 1.5e-4 restore [locate_data_file bug24472_Pipe_1.brep] b1 diff --git a/tests/lowalgos/intss/bug27190 b/tests/lowalgos/intss/bug27190 index c93004f9c5..9fa84d39cc 100644 --- a/tests/lowalgos/intss/bug27190 +++ b/tests/lowalgos/intss/bug27190 @@ -7,7 +7,7 @@ puts "" ####################################################################### set MaxTol 1.e-3 -set GoodNbCurv 11 +set GoodNbCurv 12 restore [locate_data_file bug27167_pipe.brep] a1 pcylinder a2 100 300 diff --git a/tests/lowalgos/intss/bug27664_1 b/tests/lowalgos/intss/bug27664_1 index 3cddf671ed..e22e1d2592 100644 --- a/tests/lowalgos/intss/bug27664_1 +++ b/tests/lowalgos/intss/bug27664_1 @@ -6,7 +6,7 @@ puts "" # Incomplete intersection curve from the attached shapes ################################################# -set ExpTol 1.1e-7 +set ExpTol 1.e-5 set GoodNbCurv 3 set GoodLength 0.6288896355727489 diff --git a/tests/lowalgos/intss/bug28764 b/tests/lowalgos/intss/bug28764 index 25c5de6a8d..4cdcf383f0 100644 --- a/tests/lowalgos/intss/bug28764 +++ b/tests/lowalgos/intss/bug28764 @@ -18,7 +18,7 @@ fit # Before the fix: Exception in Debug-mode only regexp {Tolerance Reached=+([-0-9.+eE]+)\n+([-0-9.+eE]+)} [bopcurves f_1 f_2 -2d] full Toler NbCurv -checkreal Tolerance $Toler 4.601149532364662e-008 1.0e-7 0.0 +checkreal Tolerance $Toler 2.1053092622220167e-07 1.0e-7 0.0 if {$NbCurv != 1} { puts "Error: Please check NbCurves for intersector" diff --git a/tests/lowalgos/intss/bug29972_3 b/tests/lowalgos/intss/bug29972_3 index 7e465591f2..9f42ea97fb 100644 --- a/tests/lowalgos/intss/bug29972_3 +++ b/tests/lowalgos/intss/bug29972_3 @@ -32,8 +32,8 @@ while { $AllowRepeat != 0 } { puts "Error: Wrong curve's range!" } - xdistcs res_$ic s1 U1 U2 100 2.0e-7 - xdistcs res_$ic s2 U1 U2 100 2.0e-7 + xdistcs res_$ic s1 U1 U2 100 6.0e-7 + xdistcs res_$ic s2 U1 U2 100 6.0e-7 mkedge ee res_$ic baddobjects ee diff --git a/tests/lowalgos/intss/bug32701 b/tests/lowalgos/intss/bug32701 new file mode 100644 index 0000000000..3d7a0562fe --- /dev/null +++ b/tests/lowalgos/intss/bug32701 @@ -0,0 +1,56 @@ +puts "========" +puts "0032701: Modeling Algorithms - 2d curve has bending near the degenerated edge of the face" +puts "========" +puts "" + +restore [locate_data_file bug32701s.brep] s +restore [locate_data_file bug32701t.brep] t + +explode t f + +set log [bopcurves s t_3 -2d] + +regexp {Tolerance Reached=+([-0-9.+eE]+)\n+([-0-9.+eE]+)} $log full Toler NbCurv + +if {$NbCurv != 1} { + puts "Error: Number of curves is wrong" +} + +if { $Toler > 3.0e-5} { + puts "Error: Big tolerance value" +} + +set log [bopcurves s t_4 -2d] + +regexp {Tolerance Reached=+([-0-9.+eE]+)\n+([-0-9.+eE]+)} $log full Toler NbCurv + +if {$NbCurv != 1} { + puts "Error: Number of curves is wrong" +} + +if { $Toler > 8.0e-5} { + puts "Error: Big tolerance value" +} + +bcommon cc s t + +checkshape cc +checkprops cc -s 19899.6 + +##checkview -display cc -2d -path ${imagedir}/${test_image}.png + +bcut cct s t + +checkshape cct +checkprops cct -s 32252.5 + +compound cc cct qq + +checkview -display qq -2d -path ${imagedir}/${test_image}.png + + + + + + + From 223ae699c7a51a3bef9f41296017e08742709fb0 Mon Sep 17 00:00:00 2001 From: kgv Date: Mon, 24 Jan 2022 21:57:26 +0300 Subject: [PATCH 201/639] 0032795: Documentation - clarify indexation range within Poly_Triangulation/Graphic3d_ArrayOfPrimitives classes --- src/Graphic3d/Graphic3d_ArrayOfPrimitives.hxx | 82 +++++++++++++++---- src/Poly/Poly_Triangle.hxx | 2 +- src/Poly/Poly_Triangulation.hxx | 61 ++++++++------ 3 files changed, 106 insertions(+), 39 deletions(-) diff --git a/src/Graphic3d/Graphic3d_ArrayOfPrimitives.hxx b/src/Graphic3d/Graphic3d_ArrayOfPrimitives.hxx index 373789ca78..f889f4dffc 100644 --- a/src/Graphic3d/Graphic3d_ArrayOfPrimitives.hxx +++ b/src/Graphic3d/Graphic3d_ArrayOfPrimitives.hxx @@ -300,12 +300,18 @@ public: } //! Change the vertice of rank theIndex in the array. + //! @param[in] theIndex node index within [1, VertexNumberAllocated()] range + //! @param[in] theVertex 3D coordinates void SetVertice (const Standard_Integer theIndex, const gp_Pnt& theVertex) { SetVertice (theIndex, Standard_ShortReal (theVertex.X()), Standard_ShortReal (theVertex.Y()), Standard_ShortReal (theVertex.Z())); } - //! Change the vertice of rank theIndex in the array. + //! Change the vertice in the array. + //! @param[in] theIndex node index within [1, VertexNumberAllocated()] range + //! @param[in] theX coordinate X + //! @param[in] theY coordinate Y + //! @param[in] theZ coordinate Z void SetVertice (const Standard_Integer theIndex, const Standard_ShortReal theX, const Standard_ShortReal theY, const Standard_ShortReal theZ) { Standard_OutOfRange_Raise_if (theIndex < 1 || theIndex > myAttribs->NbMaxElements(), "BAD VERTEX index"); @@ -319,13 +325,19 @@ public: } } - //! Change the vertex color of rank theIndex in the array. + //! Change the vertex color in the array. + //! @param[in] theIndex node index within [1, VertexNumberAllocated()] range + //! @param[in] theColor node color void SetVertexColor (const Standard_Integer theIndex, const Quantity_Color& theColor) { SetVertexColor (theIndex, theColor.Red(), theColor.Green(), theColor.Blue()); } - //! Change the vertex color of rank theIndex in the array. + //! Change the vertex color in the array. + //! @param[in] theIndex node index within [1, VertexNumberAllocated()] range + //! @param[in] theR red color value within [0, 1] range + //! @param[in] theG green color value within [0, 1] range + //! @param[in] theB blue color value within [0, 1] range void SetVertexColor (const Standard_Integer theIndex, const Standard_Real theR, const Standard_Real theG, const Standard_Real theB) { Standard_OutOfRange_Raise_if (theIndex < 1 || theIndex > myAttribs->NbMaxElements(), "BAD VERTEX index"); @@ -339,7 +351,9 @@ public: myAttribs->NbElements = Max (theIndex, myAttribs->NbElements); } - //! Change the vertex color of rank theIndex in the array. + //! Change the vertex color in the array. + //! @param[in] theIndex node index within [1, VertexNumberAllocated()] range + //! @param[in] theColor node RGBA color values within [0, 255] range void SetVertexColor (const Standard_Integer theIndex, const Graphic3d_Vec4ub& theColor) { @@ -352,10 +366,12 @@ public: myAttribs->NbElements = Max (theIndex, myAttribs->NbElements); } - //! Change the vertex color of rank theIndex> in the array. + //! Change the vertex color in the array. //! @code //! theColor32 = Alpha << 24 + Blue << 16 + Green << 8 + Red //! @endcode + //! @param[in] theIndex node index within [1, VertexNumberAllocated()] range + //! @param[in] theColor32 packed RGBA color values void SetVertexColor (const Standard_Integer theIndex, const Standard_Integer theColor32) { Standard_OutOfRange_Raise_if (theIndex < 1 || theIndex > myAttribs->NbMaxElements(), "BAD VERTEX index"); @@ -365,13 +381,19 @@ public: } } - //! Change the vertex normal of rank theIndex in the array. + //! Change the vertex normal in the array. + //! @param[in] theIndex node index within [1, VertexNumberAllocated()] range + //! @param[in] theNormal normalized surface normal void SetVertexNormal (const Standard_Integer theIndex, const gp_Dir& theNormal) { SetVertexNormal (theIndex, theNormal.X(), theNormal.Y(), theNormal.Z()); } - //! Change the vertex normal of rank theIndex in the array. + //! Change the vertex normal in the array. + //! @param[in] theIndex node index within [1, VertexNumberAllocated()] range + //! @param[in] theNX surface normal X component + //! @param[in] theNY surface normal Y component + //! @param[in] theNZ surface normal Z component void SetVertexNormal (const Standard_Integer theIndex, const Standard_Real theNX, const Standard_Real theNY, const Standard_Real theNZ) { Standard_OutOfRange_Raise_if (theIndex < 1 || theIndex > myAttribs->NbMaxElements(), "BAD VERTEX index"); @@ -385,13 +407,18 @@ public: myAttribs->NbElements = Max (theIndex, myAttribs->NbElements); } - //! Change the vertex texel of rank theIndex in the array. + //! Change the vertex texel in the array. + //! @param[in] theIndex node index within [1, VertexNumberAllocated()] range + //! @param[in] theTexel node UV coordinates void SetVertexTexel (const Standard_Integer theIndex, const gp_Pnt2d& theTexel) { SetVertexTexel (theIndex, theTexel.X(), theTexel.Y()); } - //! Change the vertex texel of rank theIndex in the array. + //! Change the vertex texel in the array. + //! @param[in] theIndex node index within [1, VertexNumberAllocated()] range + //! @param[in] theTX node U coordinate + //! @param[in] theTY node V coordinate void SetVertexTexel (const Standard_Integer theIndex, const Standard_Real theTX, const Standard_Real theTY) { Standard_OutOfRange_Raise_if (theIndex < 1 || theIndex > myAttribs->NbMaxElements(), "BAD VERTEX index"); @@ -404,7 +431,9 @@ public: myAttribs->NbElements = Max (theIndex, myAttribs->NbElements); } - //! Returns the vertice at rank theRank from the vertex table if defined. + //! Returns the vertice from the vertex table if defined. + //! @param[in] theRank node index within [1, VertexNumber()] range + //! @return node 3D coordinates gp_Pnt Vertice (const Standard_Integer theRank) const { Standard_Real anXYZ[3]; @@ -413,6 +442,10 @@ public: } //! Returns the vertice coordinates at rank theRank from the vertex table if defined. + //! @param[in] theRank node index within [1, VertexNumber()] range + //! @param[out] theX node X coordinate value + //! @param[out] theY node Y coordinate value + //! @param[out] theZ node Z coordinate value void Vertice (const Standard_Integer theRank, Standard_Real& theX, Standard_Real& theY, Standard_Real& theZ) const { theX = theY = theZ = 0.0; @@ -424,6 +457,8 @@ public: } //! Returns the vertex color at rank theRank from the vertex table if defined. + //! @param[in] theRank node index within [1, VertexNumber()] range + //! @return node color RGB value Quantity_Color VertexColor (const Standard_Integer theRank) const { Standard_Real anRGB[3]; @@ -431,7 +466,9 @@ public: return Quantity_Color (anRGB[0], anRGB[1], anRGB[2], Quantity_TOC_RGB); } - //! Returns the vertex color at rank theIndex from the vertex table if defined. + //! Returns the vertex color from the vertex table if defined. + //! @param[in] theIndex node index within [1, VertexNumber()] range + //! @param[out] theColor node RGBA color values within [0, 255] range void VertexColor (const Standard_Integer theIndex, Graphic3d_Vec4ub& theColor) const { @@ -439,7 +476,11 @@ public: theColor = *reinterpret_cast(myColData + myColStride * (theIndex - 1)); } - //! Returns the vertex color values at rank theRank from the vertex table if defined. + //! Returns the vertex color values from the vertex table if defined. + //! @param[in] theRank node index within [1, VertexNumber()] range + //! @param[out] theR node red color component value within [0, 1] range + //! @param[out] theG node green color component value within [0, 1] range + //! @param[out] theB node blue color component value within [0, 1] range void VertexColor (const Standard_Integer theRank, Standard_Real& theR, Standard_Real& theG, Standard_Real& theB) const { theR = theG = theB = 0.0; @@ -454,7 +495,9 @@ public: theB = Standard_Real(aColor.b()) / 255.0; } - //! Returns the vertex color values at rank theRank from the vertex table if defined. + //! Returns the vertex color values from the vertex table if defined. + //! @param[in] theRank node index within [1, VertexNumber()] range + //! @param[out] theColor node RGBA color packed into 32-bit integer void VertexColor (const Standard_Integer theRank, Standard_Integer& theColor) const { Standard_OutOfRange_Raise_if (theRank < 1 || theRank > myAttribs->NbElements, "BAD VERTEX index"); @@ -464,7 +507,9 @@ public: } } - //! Returns the vertex normal at rank theRank from the vertex table if defined. + //! Returns the vertex normal from the vertex table if defined. + //! @param[in] theRank node index within [1, VertexNumber()] range + //! @return normalized 3D vector defining surface normal gp_Dir VertexNormal (const Standard_Integer theRank) const { Standard_Real anXYZ[3]; @@ -473,6 +518,10 @@ public: } //! Returns the vertex normal coordinates at rank theRank from the vertex table if defined. + //! @param[in] theRank node index within [1, VertexNumber()] range + //! @param[out] theNX normal X coordinate + //! @param[out] theNY normal Y coordinate + //! @param[out] theNZ normal Z coordinate void VertexNormal (const Standard_Integer theRank, Standard_Real& theNX, Standard_Real& theNY, Standard_Real& theNZ) const { theNX = theNY = theNZ = 0.0; @@ -487,6 +536,8 @@ public: } //! Returns the vertex texture at rank theRank from the vertex table if defined. + //! @param[in] theRank node index within [1, VertexNumber()] range + //! @return UV coordinates gp_Pnt2d VertexTexel (const Standard_Integer theRank) const { Standard_Real anXY[2]; @@ -495,6 +546,9 @@ public: } //! Returns the vertex texture coordinates at rank theRank from the vertex table if defined. + //! @param[in] theRank node index within [1, VertexNumber()] range + //! @param[out] theTX texel U coordinate value + //! @param[out] theTY texel V coordinate value void VertexTexel (const Standard_Integer theRank, Standard_Real& theTX, Standard_Real& theTY) const { theTX = theTY = 0.0; diff --git a/src/Poly/Poly_Triangle.hxx b/src/Poly/Poly_Triangle.hxx index 76e6592eca..95c53584ec 100644 --- a/src/Poly/Poly_Triangle.hxx +++ b/src/Poly/Poly_Triangle.hxx @@ -24,7 +24,7 @@ #include //! Describes a component triangle of a triangulation (Poly_Triangulation object). -//! A Triangle is defined by a triplet of nodes. +//! A Triangle is defined by a triplet of nodes within [1, Poly_Triangulation::NbNodes()] range. //! Each node is an index in the table of nodes specific to an existing //! triangulation of a shape, and represents a point on the surface. class Poly_Triangle diff --git a/src/Poly/Poly_Triangulation.hxx b/src/Poly/Poly_Triangulation.hxx index 28a26dec71..57104eddb4 100644 --- a/src/Poly/Poly_Triangulation.hxx +++ b/src/Poly/Poly_Triangulation.hxx @@ -33,31 +33,24 @@ class Poly_TriangulationParameters; DEFINE_STANDARD_HANDLE(Poly_Triangulation, Standard_Transient) -//! Provides a triangulation for a surface, a set of surfaces, or -//! more generally a shape. -//! A triangulation consists of an approximate representation -//! of the actual shape, using a collection of points and -//! triangles. The points are located on the surface. The -//! edges of the triangles connect adjacent points with a -//! straight line that approximates the true curve on the surface. +//! Provides a triangulation for a surface, a set of surfaces, or more generally a shape. +//! +//! A triangulation consists of an approximate representation of the actual shape, +//! using a collection of points and triangles. +//! The points are located on the surface. +//! The edges of the triangles connect adjacent points with a straight line that approximates the true curve on the surface. +//! //! A triangulation comprises: -//! - A table of 3D nodes (3D points on the surface). -//! - A table of triangles. Each triangle (Poly_Triangle -//! object) comprises a triplet of indices in the table of 3D -//! nodes specific to the triangulation. -//! - A table of 2D nodes (2D points), parallel to the table of -//! 3D nodes. This table is optional. If it exists, the -//! coordinates of a 2D point are the (u, v) parameters -//! of the corresponding 3D point on the surface -//! approximated by the triangulation. -//! - A deflection (optional), which maximizes the distance -//! from a point on the surface to the corresponding point -//! on its approximate triangulation. -//! In many cases, algorithms do not need to work with the -//! exact representation of a surface. A triangular -//! representation induces simpler and more robust adjusting, -//! faster performances, and the results are as good. -//! This is a Transient class. +//! - A table of 3D nodes (3D points on the surface). +//! - A table of triangles. +//! Each triangle (Poly_Triangle object) comprises a triplet of indices in the table of 3D nodes specific to the triangulation. +//! - An optional table of 2D nodes (2D points), parallel to the table of 3D nodes. +//! 2D point are the (u, v) parameters of the corresponding 3D point on the surface approximated by the triangulation. +//! - An optional table of 3D vectors, parallel to the table of 3D nodes, defining normals to the surface at specified 3D point. +//! - An optional deflection, which maximizes the distance from a point on the surface to the corresponding point on its approximate triangulation. +//! +//! In many cases, algorithms do not need to work with the exact representation of a surface. +//! A triangular representation induces simpler and more robust adjusting, faster performances, and the results are as good. class Poly_Triangulation : public Standard_Transient { DEFINE_STANDARD_RTTIEXT(Poly_Triangulation, Standard_Transient) @@ -134,9 +127,13 @@ public: Standard_Boolean HasNormals() const { return !myNormals.IsEmpty(); } //! Returns a node at the given index. + //! @param[in] theIndex node index within [1, NbNodes()] range + //! @return 3D point coordinates gp_Pnt Node (Standard_Integer theIndex) const { return myNodes.Value (theIndex - 1); } //! Sets a node coordinates. + //! @param[in] theIndex node index within [1, NbNodes()] range + //! @param[in] thePnt 3D point coordinates void SetNode (Standard_Integer theIndex, const gp_Pnt& thePnt) { @@ -144,9 +141,13 @@ public: } //! Returns UV-node at the given index. + //! @param[in] theIndex node index within [1, NbNodes()] range + //! @return 2D point defining UV coordinates gp_Pnt2d UVNode (Standard_Integer theIndex) const { return myUVNodes.Value (theIndex - 1); } //! Sets an UV-node coordinates. + //! @param[in] theIndex node index within [1, NbNodes()] range + //! @param[in] thePnt UV coordinates void SetUVNode (Standard_Integer theIndex, const gp_Pnt2d& thePnt) { @@ -154,9 +155,13 @@ public: } //! Returns triangle at the given index. + //! @param[in] theIndex triangle index within [1, NbTriangles()] range + //! @return triangle node indices, with each node defined within [1, NbNodes()] range const Poly_Triangle& Triangle (Standard_Integer theIndex) const { return myTriangles.Value (theIndex); } //! Sets a triangle. + //! @param[in] theIndex triangle index within [1, NbTriangles()] range + //! @param[in] theTriangle triangle node indices, with each node defined within [1, NbNodes()] range void SetTriangle (Standard_Integer theIndex, const Poly_Triangle& theTriangle) { @@ -164,6 +169,8 @@ public: } //! Returns normal at the given index. + //! @param[in] theIndex node index within [1, NbNodes()] range + //! @return normalized 3D vector defining a surface normal gp_Dir Normal (Standard_Integer theIndex) const { const gp_Vec3f& aNorm = myNormals.Value (theIndex - 1); @@ -171,6 +178,8 @@ public: } //! Returns normal at the given index. + //! @param[in] theIndex node index within [1, NbNodes()] range + //! @param[out] theVec3 3D vector defining a surface normal void Normal (Standard_Integer theIndex, gp_Vec3f& theVec3) const { @@ -178,6 +187,8 @@ public: } //! Changes normal at the given index. + //! @param[in] theIndex node index within [1, NbNodes()] range + //! @param[in] theVec3 normalized 3D vector defining a surface normal void SetNormal (const Standard_Integer theIndex, const gp_Vec3f& theNormal) { @@ -185,6 +196,8 @@ public: } //! Changes normal at the given index. + //! @param[in] theIndex node index within [1, NbNodes()] range + //! @param[in] theNormal normalized 3D vector defining a surface normal void SetNormal (const Standard_Integer theIndex, const gp_Dir& theNormal) { From ff77ee8103603979a9b3ce7e695ee17b1bbb4711 Mon Sep 17 00:00:00 2001 From: atychini Date: Fri, 21 Jan 2022 21:55:45 +0300 Subject: [PATCH 202/639] 0032748: Data Exchange, Step Import - xstep.cascade.unit doesn't work [regression since OCCT 7.6.0] Added new condition in STEPControl_ActorRead::Transfer: if StepData_StepModel is not an initialized Unit - we set unit to this step model --- src/STEPControl/STEPControl_ActorRead.cxx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/STEPControl/STEPControl_ActorRead.cxx b/src/STEPControl/STEPControl_ActorRead.cxx index b1443ce6a5..0ce99cd8c6 100644 --- a/src/STEPControl/STEPControl_ActorRead.cxx +++ b/src/STEPControl/STEPControl_ActorRead.cxx @@ -284,6 +284,11 @@ Handle(Transfer_Binder) STEPControl_ActorRead::Transfer { // [BEGIN] Get version of preprocessor (to detect I-Deas case) (ssv; 23.11.2010) Handle(StepData_StepModel) aStepModel = Handle(StepData_StepModel)::DownCast ( TP->Model() ); + if (!aStepModel->IsInitializedUnit()) + { + XSAlgo::AlgoContainer()->PrepareForTransfer(); // update unit info + aStepModel->SetLocalLengthUnit(UnitsMethods::GetCasCadeLengthUnit()); + } Interface_EntityIterator anEntIt = aStepModel->Header(); for ( anEntIt.Start(); anEntIt.More(); anEntIt.Next() ) { DeclareAndCast( HeaderSection_FileName, aFileNameEntity, anEntIt.Value() ); @@ -1614,7 +1619,6 @@ Handle(Transfer_Binder) STEPControl_ActorRead::TransferShape( const Message_ProgressRange& theProgress) { if (start.IsNull()) return NullResult(); - XSAlgo::AlgoContainer()->PrepareForTransfer(); Message_Messenger::StreamBuffer sout = TP->Messenger()->SendInfo(); #ifdef TRANSLOG From 7109a4ae5843002ea7a35ed2b5aafba7ccef13d4 Mon Sep 17 00:00:00 2001 From: aml Date: Wed, 12 Jan 2022 18:48:35 +0300 Subject: [PATCH 203/639] 0032806: Coding - get rid of unused headers [Contap to Extrema] --- src/CPnts/CPnts_AbscissaPoint.cxx | 1 - src/CPnts/CPnts_AbscissaPoint.hxx | 3 -- src/CPnts/CPnts_MyGaussFunction.hxx | 2 -- src/CPnts/CPnts_MyRootFunction.hxx | 3 -- src/CPnts/CPnts_UniformDeflection.cxx | 3 -- src/CPnts/CPnts_UniformDeflection.hxx | 4 --- src/CSLib/CSLib.hxx | 2 -- src/CSLib/CSLib_Class2d.cxx | 1 - src/CSLib/CSLib_Class2d.hxx | 3 -- src/CSLib/CSLib_NormalPolyDef.hxx | 3 -- src/Contap/Contap_ArcFunction.cxx | 3 -- src/Contap/Contap_ArcFunction.hxx | 1 + src/Contap/Contap_ContAna.cxx | 1 - src/Contap/Contap_ContAna.hxx | 13 ++++----- src/Contap/Contap_Contour.cxx | 2 -- src/Contap/Contap_HContTool.cxx | 2 -- src/Contap/Contap_HCurve2dTool.cxx | 7 ----- src/Contap/Contap_HCurve2dTool.hxx | 19 ++++--------- src/Contap/Contap_Line.cxx | 2 -- src/Contap/Contap_Line.hxx | 17 ++++------- src/Contap/Contap_Point.cxx | 3 -- src/Contap/Contap_Point.hxx | 2 -- src/Contap/Contap_SurfFunction.cxx | 2 -- src/Contap/Contap_SurfProps.cxx | 1 - src/Convert/Convert_CircleToBSplineCurve.cxx | 2 -- src/Convert/Convert_CircleToBSplineCurve.hxx | 1 - ...ert_CompBezierCurves2dToBSplineCurve2d.cxx | 2 -- ...ert_CompBezierCurves2dToBSplineCurve2d.hxx | 4 --- ...Convert_CompBezierCurvesToBSplineCurve.cxx | 2 -- ...Convert_CompBezierCurvesToBSplineCurve.hxx | 4 --- src/Convert/Convert_CompPolynomialToPoles.cxx | 1 - src/Convert/Convert_CompPolynomialToPoles.hxx | 1 - src/Convert/Convert_ConeToBSplineSurface.hxx | 1 - src/Convert/Convert_ConicToBSplineCurve.cxx | 2 -- src/Convert/Convert_ConicToBSplineCurve.hxx | 2 -- .../Convert_CylinderToBSplineSurface.hxx | 1 - ...vert_ElementarySurfaceToBSplineSurface.hxx | 2 -- src/Convert/Convert_EllipseToBSplineCurve.cxx | 2 -- src/Convert/Convert_EllipseToBSplineCurve.hxx | 1 - src/Convert/Convert_GridPolynomialToPoles.hxx | 1 - .../Convert_HyperbolaToBSplineCurve.cxx | 2 -- .../Convert_HyperbolaToBSplineCurve.hxx | 1 - .../Convert_ParabolaToBSplineCurve.cxx | 2 -- .../Convert_ParabolaToBSplineCurve.hxx | 1 - src/Convert/Convert_PolynomialCosAndSin.cxx | 11 ++------ .../Convert_SphereToBSplineSurface.hxx | 1 - src/Convert/Convert_TorusToBSplineSurface.hxx | 1 - src/DBRep/DBRep.cxx | 5 ---- src/DBRep/DBRep.hxx | 1 - src/DBRep/DBRep_Debug.cxx | 2 -- src/DBRep/DBRep_DrawableShape.cxx | 10 ------- src/DBRep/DBRep_Edge.hxx | 1 - src/DBRep/DBRep_Face.hxx | 1 - src/DBRep/DBRep_HideData.hxx | 2 -- src/DBRep/DBRep_IsoBuilder.cxx | 1 - src/DBRep/DBRep_IsoBuilder.hxx | 1 - src/DDF/DDF.cxx | 5 ---- src/DDF/DDF.hxx | 1 - src/DDF/DDF_AttributeBrowser.hxx | 1 - src/DDF/DDF_BasicCommands.cxx | 16 ----------- src/DDF/DDF_Browser.cxx | 2 -- src/DDF/DDF_BrowserCommands.cxx | 9 ------ src/DDF/DDF_Data.cxx | 5 ---- src/DDF/DDF_Data.hxx | 1 - src/DDF/DDF_DataCommands.cxx | 5 ---- src/DDF/DDF_Transaction.cxx | 2 -- src/DDF/DDF_Transaction.hxx | 2 -- src/DDF/DDF_TransactionCommands.cxx | 4 --- src/DDataStd/DDataStd.cxx | 1 - src/DDataStd/DDataStd_BasicCommands.cxx | 28 ------------------- src/DDataStd/DDataStd_ConstraintCommands.cxx | 1 - src/DDataStd/DDataStd_DatumCommands.cxx | 10 ------- src/DDataStd/DDataStd_DrawDisplayCommands.cxx | 25 ----------------- src/DDataStd/DDataStd_DrawDriver.cxx | 18 ------------ src/DDataStd/DDataStd_DrawDriver.hxx | 1 - src/DDataStd/DDataStd_DrawPresentation.cxx | 1 - src/DDataStd/DDataStd_DrawPresentation.hxx | 1 - src/DDataStd/DDataStd_NameCommands.cxx | 8 ------ src/DDataStd/DDataStd_NamedShapeCommands.cxx | 3 -- src/DDataStd/DDataStd_ObjectCommands.cxx | 4 --- src/DDataStd/DDataStd_TreeBrowser.cxx | 1 - src/DDataStd/DDataStd_TreeBrowser.hxx | 1 - src/DDataStd/DDataStd_TreeCommands.cxx | 6 ---- src/DDocStd/DDocStd.cxx | 4 --- src/DDocStd/DDocStd.hxx | 1 - src/DDocStd/DDocStd_ApplicationCommands.cxx | 7 ----- src/DDocStd/DDocStd_DocumentCommands.cxx | 16 ----------- src/DDocStd/DDocStd_DrawDocument.cxx | 1 - src/DDocStd/DDocStd_MTMCommands.cxx | 2 -- src/DDocStd/DDocStd_ShapeSchemaCommands.cxx | 1 - src/DDocStd/DDocStd_ToolsCommands.cxx | 4 --- src/DNaming/DNaming.cxx | 13 --------- src/DNaming/DNaming.hxx | 2 -- src/DNaming/DNaming_BasicCommands.cxx | 24 +--------------- .../DNaming_BooleanOperationDriver.cxx | 8 ------ .../DNaming_BooleanOperationDriver.hxx | 1 - src/DNaming/DNaming_BoxDriver.cxx | 1 - src/DNaming/DNaming_BoxDriver.hxx | 1 - src/DNaming/DNaming_CylinderDriver.cxx | 3 -- src/DNaming/DNaming_CylinderDriver.hxx | 1 - src/DNaming/DNaming_FilletDriver.cxx | 4 --- src/DNaming/DNaming_FilletDriver.hxx | 1 - src/DNaming/DNaming_Line3DDriver.cxx | 12 -------- src/DNaming/DNaming_Line3DDriver.hxx | 1 - src/DNaming/DNaming_ModelingCommands.cxx | 12 -------- src/DNaming/DNaming_PointDriver.cxx | 1 - src/DNaming/DNaming_PointDriver.hxx | 1 - src/DNaming/DNaming_PrismDriver.cxx | 7 ----- src/DNaming/DNaming_PrismDriver.hxx | 1 - src/DNaming/DNaming_RevolutionDriver.cxx | 10 ------- src/DNaming/DNaming_RevolutionDriver.hxx | 1 - src/DNaming/DNaming_SelectionCommands.cxx | 11 -------- src/DNaming/DNaming_SelectionDriver.cxx | 7 ----- src/DNaming/DNaming_SelectionDriver.hxx | 2 -- src/DNaming/DNaming_SphereDriver.cxx | 3 -- src/DNaming/DNaming_SphereDriver.hxx | 1 - src/DNaming/DNaming_ToolsCommands.cxx | 9 ------ src/DNaming/DNaming_TransformationDriver.cxx | 10 ------- src/DNaming/DNaming_TransformationDriver.hxx | 1 - src/DPrsStd/DPrsStd.cxx | 6 ---- src/DPrsStd/DPrsStd.hxx | 1 - .../DPrsStd_AISPresentationCommands.cxx | 11 -------- src/DPrsStd/DPrsStd_AISViewerCommands.cxx | 4 --- src/DRAWEXE/DRAWEXE.cxx | 1 - src/Draft/Draft_EdgeInfo.cxx | 1 - src/Draft/Draft_EdgeInfo.hxx | 2 -- src/Draft/Draft_FaceInfo.cxx | 2 -- src/Draft/Draft_Modification.cxx | 5 ---- src/Draft/Draft_Modification.hxx | 2 -- src/Draft/Draft_Modification_1.cxx | 18 ------------ src/Draft/Draft_VertexInfo.cxx | 2 -- src/Draft/Draft_VertexInfo.hxx | 2 -- src/Draw/Draw.cxx | 3 -- src/Draw/Draw_Axis2D.cxx | 1 - src/Draw/Draw_Axis2D.hxx | 1 - src/Draw/Draw_Axis3D.hxx | 1 - src/Draw/Draw_BasicCommands.cxx | 2 -- src/Draw/Draw_Box.hxx | 1 - src/Draw/Draw_Chronometer.hxx | 1 - src/Draw/Draw_Circle2D.hxx | 1 - src/Draw/Draw_Circle3D.hxx | 1 - src/Draw/Draw_Commands.cxx | 2 -- src/Draw/Draw_Display.hxx | 4 --- src/Draw/Draw_Drawable2D.hxx | 1 - src/Draw/Draw_GraphicCommands.cxx | 1 - src/Draw/Draw_Grid.hxx | 2 -- src/Draw/Draw_Interpretor.cxx | 3 -- src/Draw/Draw_Interpretor.hxx | 2 -- src/Draw/Draw_Main.cxx | 7 ----- src/Draw/Draw_Main.hxx | 1 - src/Draw/Draw_MapOfAsciiString.hxx | 1 - src/Draw/Draw_Marker2D.cxx | 1 - src/Draw/Draw_Marker2D.hxx | 3 -- src/Draw/Draw_Marker3D.cxx | 1 - src/Draw/Draw_Marker3D.hxx | 3 -- src/Draw/Draw_MessageCommands.cxx | 3 -- src/Draw/Draw_PloadCommands.cxx | 2 -- src/Draw/Draw_Segment2D.cxx | 1 - src/Draw/Draw_Segment2D.hxx | 1 - src/Draw/Draw_Segment3D.cxx | 1 - src/Draw/Draw_Segment3D.hxx | 1 - src/Draw/Draw_Text2D.cxx | 1 - src/Draw/Draw_Text2D.hxx | 2 -- src/Draw/Draw_Text3D.cxx | 1 - src/Draw/Draw_Text3D.hxx | 3 -- src/Draw/Draw_UnitCommands.cxx | 2 -- src/Draw/Draw_Viewer.cxx | 1 - src/Draw/Draw_Viewer.hxx | 7 ----- src/Draw/Draw_Window.hxx | 2 -- src/DrawDim/DrawDim.cxx | 2 -- src/DrawDim/DrawDim.hxx | 1 - src/DrawDim/DrawDim_Angle.cxx | 1 - src/DrawDim/DrawDim_Dimension.cxx | 2 -- src/DrawDim/DrawDim_Dimension.hxx | 3 -- src/DrawDim/DrawDim_Distance.cxx | 5 ---- src/DrawDim/DrawDim_PlanarAngle.cxx | 9 ------ src/DrawDim/DrawDim_PlanarAngle.hxx | 2 -- src/DrawDim/DrawDim_PlanarDiameter.cxx | 2 -- src/DrawDim/DrawDim_PlanarDiameter.hxx | 1 - src/DrawDim/DrawDim_PlanarDimension.cxx | 1 - src/DrawDim/DrawDim_PlanarDimension.hxx | 1 - .../DrawDim_PlanarDimensionCommands.cxx | 9 ------ src/DrawDim/DrawDim_PlanarDistance.hxx | 1 - src/DrawDim/DrawDim_PlanarRadius.cxx | 3 -- src/DrawDim/DrawDim_PlanarRadius.hxx | 1 - src/DrawFairCurve/DrawFairCurve_Batten.cxx | 1 - src/DrawFairCurve/DrawFairCurve_Batten.hxx | 1 - .../DrawFairCurve_MinimalVariation.cxx | 1 - .../DrawFairCurve_MinimalVariation.hxx | 1 - src/DrawTrSurf/DrawTrSurf.cxx | 3 -- src/DrawTrSurf/DrawTrSurf_Curve.cxx | 1 - src/DrawTrSurf/DrawTrSurf_Curve2d.cxx | 2 -- src/DrawTrSurf/DrawTrSurf_Debug.cxx | 1 - src/DrawTrSurf/DrawTrSurf_Drawable.cxx | 3 +- src/DrawTrSurf/DrawTrSurf_Triangulation.cxx | 2 -- src/DrawTrSurf/DrawTrSurf_Triangulation2D.cxx | 4 --- src/DrawTrSurf/DrawTrSurf_Triangulation2D.hxx | 1 - src/DsgPrs/DsgPrs.cxx | 19 +++++-------- src/DsgPrs/DsgPrs.hxx | 2 -- src/DsgPrs/DsgPrs_AnglePresentation.cxx | 6 ---- src/DsgPrs/DsgPrs_AnglePresentation.hxx | 2 -- src/DsgPrs/DsgPrs_Chamf2dPresentation.cxx | 2 -- src/DsgPrs/DsgPrs_ConcentricPresentation.hxx | 1 - src/DsgPrs/DsgPrs_DatumPrs.cxx | 4 --- src/DsgPrs/DsgPrs_DatumPrs.hxx | 1 - src/DsgPrs/DsgPrs_DiameterPresentation.cxx | 5 ---- src/DsgPrs/DsgPrs_DiameterPresentation.hxx | 1 - .../DsgPrs_EllipseRadiusPresentation.cxx | 9 ------ .../DsgPrs_EllipseRadiusPresentation.hxx | 1 - .../DsgPrs_FilletRadiusPresentation.cxx | 9 ------ .../DsgPrs_FilletRadiusPresentation.hxx | 1 - src/DsgPrs/DsgPrs_FixPresentation.hxx | 1 - src/DsgPrs/DsgPrs_IdenticPresentation.cxx | 1 - src/DsgPrs/DsgPrs_IdenticPresentation.hxx | 1 - src/DsgPrs/DsgPrs_LengthPresentation.cxx | 6 ---- src/DsgPrs/DsgPrs_LengthPresentation.hxx | 1 - src/DsgPrs/DsgPrs_MidPointPresentation.cxx | 5 ---- src/DsgPrs/DsgPrs_MidPointPresentation.hxx | 1 - src/DsgPrs/DsgPrs_OffsetPresentation.cxx | 3 -- src/DsgPrs/DsgPrs_OffsetPresentation.hxx | 1 - src/DsgPrs/DsgPrs_ParalPresentation.cxx | 4 --- src/DsgPrs/DsgPrs_PerpenPresentation.cxx | 27 ++++++------------ src/DsgPrs/DsgPrs_PerpenPresentation.hxx | 1 - src/DsgPrs/DsgPrs_RadiusPresentation.cxx | 6 ---- src/DsgPrs/DsgPrs_RadiusPresentation.hxx | 1 - src/DsgPrs/DsgPrs_ShadedPlanePresentation.cxx | 1 - src/DsgPrs/DsgPrs_ShadedPlanePresentation.hxx | 1 - src/DsgPrs/DsgPrs_ShapeDirPresentation.cxx | 2 -- src/DsgPrs/DsgPrs_SymbPresentation.cxx | 3 -- src/DsgPrs/DsgPrs_SymbPresentation.hxx | 1 - src/DsgPrs/DsgPrs_SymmetricPresentation.cxx | 10 ------- src/DsgPrs/DsgPrs_SymmetricPresentation.hxx | 1 - src/DsgPrs/DsgPrs_TangentPresentation.cxx | 4 --- src/DsgPrs/DsgPrs_TangentPresentation.hxx | 1 - src/DsgPrs/DsgPrs_XYZAxisPresentation.cxx | 1 - src/DsgPrs/DsgPrs_XYZAxisPresentation.hxx | 1 - src/DsgPrs/DsgPrs_XYZPlanePresentation.cxx | 1 - src/DsgPrs/DsgPrs_XYZPlanePresentation.hxx | 1 - src/ElCLib/ElCLib.hxx | 2 -- src/ElSLib/ElSLib.cxx | 5 ---- src/ElSLib/ElSLib.hxx | 2 -- src/Expr/Expr.cxx | 1 - src/Expr/Expr_Absolute.cxx | 3 -- src/Expr/Expr_Absolute.hxx | 3 -- src/Expr/Expr_ArcCosine.cxx | 5 ---- src/Expr/Expr_ArcCosine.hxx | 3 -- src/Expr/Expr_ArcSine.cxx | 5 ---- src/Expr/Expr_ArcSine.hxx | 3 -- src/Expr/Expr_ArcTangent.cxx | 4 --- src/Expr/Expr_ArcTangent.hxx | 3 -- src/Expr/Expr_ArgCosh.cxx | 5 ---- src/Expr/Expr_ArgCosh.hxx | 3 -- src/Expr/Expr_ArgSinh.cxx | 4 --- src/Expr/Expr_ArgSinh.hxx | 3 -- src/Expr/Expr_ArgTanh.cxx | 5 ---- src/Expr/Expr_ArgTanh.hxx | 3 -- src/Expr/Expr_BinaryExpression.cxx | 1 - src/Expr/Expr_BinaryExpression.hxx | 1 - src/Expr/Expr_BinaryFunction.cxx | 5 ---- src/Expr/Expr_BinaryFunction.hxx | 2 -- src/Expr/Expr_Cosh.cxx | 3 -- src/Expr/Expr_Cosh.hxx | 2 -- src/Expr/Expr_Cosine.cxx | 3 -- src/Expr/Expr_Cosine.hxx | 2 -- src/Expr/Expr_Difference.cxx | 3 -- src/Expr/Expr_Difference.hxx | 3 -- src/Expr/Expr_Different.cxx | 1 - src/Expr/Expr_Different.hxx | 2 -- src/Expr/Expr_Division.cxx | 4 --- src/Expr/Expr_Division.hxx | 2 -- src/Expr/Expr_Equal.cxx | 1 - src/Expr/Expr_Equal.hxx | 2 -- src/Expr/Expr_Exponential.cxx | 3 -- src/Expr/Expr_Exponential.hxx | 3 -- src/Expr/Expr_Exponentiate.cxx | 3 -- src/Expr/Expr_Exponentiate.hxx | 2 -- src/Expr/Expr_FunctionDerivative.cxx | 5 ---- src/Expr/Expr_FunctionDerivative.hxx | 1 - src/Expr/Expr_GeneralExpression.cxx | 2 -- src/Expr/Expr_GeneralExpression.hxx | 1 - src/Expr/Expr_GeneralFunction.cxx | 4 --- src/Expr/Expr_GeneralFunction.hxx | 1 - src/Expr/Expr_GeneralRelation.cxx | 3 -- src/Expr/Expr_GeneralRelation.hxx | 1 - src/Expr/Expr_GreaterThan.cxx | 2 -- src/Expr/Expr_GreaterThan.hxx | 1 - src/Expr/Expr_GreaterThanOrEqual.cxx | 2 -- src/Expr/Expr_GreaterThanOrEqual.hxx | 1 - src/Expr/Expr_LessThan.cxx | 2 -- src/Expr/Expr_LessThan.hxx | 1 - src/Expr/Expr_LessThanOrEqual.cxx | 2 -- src/Expr/Expr_LessThanOrEqual.hxx | 1 - src/Expr/Expr_LogOf10.cxx | 3 -- src/Expr/Expr_LogOf10.hxx | 2 -- src/Expr/Expr_LogOfe.cxx | 3 -- src/Expr/Expr_LogOfe.hxx | 2 -- src/Expr/Expr_NamedConstant.hxx | 2 -- src/Expr/Expr_NamedExpression.cxx | 1 - src/Expr/Expr_NamedExpression.hxx | 2 -- src/Expr/Expr_NamedFunction.cxx | 5 ---- src/Expr/Expr_NamedFunction.hxx | 2 -- src/Expr/Expr_NamedUnknown.cxx | 1 - src/Expr/Expr_NamedUnknown.hxx | 2 -- src/Expr/Expr_NumericValue.hxx | 2 -- src/Expr/Expr_PolyExpression.cxx | 3 -- src/Expr/Expr_PolyExpression.hxx | 1 - src/Expr/Expr_PolyFunction.cxx | 5 ---- src/Expr/Expr_PolyFunction.hxx | 2 -- src/Expr/Expr_Product.cxx | 4 --- src/Expr/Expr_Product.hxx | 2 -- src/Expr/Expr_RUIterator.cxx | 3 -- src/Expr/Expr_RUIterator.hxx | 1 - src/Expr/Expr_RelationIterator.cxx | 1 - src/Expr/Expr_Sign.cxx | 2 -- src/Expr/Expr_Sign.hxx | 2 -- src/Expr/Expr_Sine.cxx | 3 -- src/Expr/Expr_Sine.hxx | 2 -- src/Expr/Expr_SingleRelation.cxx | 2 -- src/Expr/Expr_SingleRelation.hxx | 1 - src/Expr/Expr_Sinh.cxx | 3 -- src/Expr/Expr_Sinh.hxx | 2 -- src/Expr/Expr_Square.cxx | 3 -- src/Expr/Expr_Square.hxx | 2 -- src/Expr/Expr_SquareRoot.cxx | 3 -- src/Expr/Expr_SquareRoot.hxx | 2 -- src/Expr/Expr_Sum.cxx | 2 -- src/Expr/Expr_Sum.hxx | 2 -- src/Expr/Expr_SystemRelation.cxx | 3 -- src/Expr/Expr_SystemRelation.hxx | 1 - src/Expr/Expr_Tangent.cxx | 4 --- src/Expr/Expr_Tangent.hxx | 2 -- src/Expr/Expr_Tanh.cxx | 4 --- src/Expr/Expr_Tanh.hxx | 2 -- src/Expr/Expr_UnaryExpression.cxx | 2 -- src/Expr/Expr_UnaryExpression.hxx | 1 - src/Expr/Expr_UnaryFunction.cxx | 3 -- src/Expr/Expr_UnaryFunction.hxx | 2 -- src/Expr/Expr_UnaryMinus.cxx | 3 -- src/Expr/Expr_UnaryMinus.hxx | 2 -- src/Expr/Expr_UnknownIterator.cxx | 3 -- src/Expr/Expr_UnknownIterator.hxx | 1 - src/ExprIntrp/ExprIntrp_Analysis.cxx | 5 ---- src/ExprIntrp/ExprIntrp_Analysis.hxx | 1 - src/ExprIntrp/ExprIntrp_GenExp.hxx | 1 - src/ExprIntrp/ExprIntrp_GenFct.cxx | 1 - src/ExprIntrp/ExprIntrp_GenFct.hxx | 2 -- src/ExprIntrp/ExprIntrp_GenRel.hxx | 1 - src/ExprIntrp/ExprIntrp_Generator.cxx | 3 -- src/ExprIntrp/ExprIntrp_Generator.hxx | 1 - src/ExprIntrp/ExprIntrp_yaccintrf.cxx | 2 -- src/Extrema/Extrema_CCLocFOfLocECC.hxx | 3 -- src/Extrema/Extrema_CCLocFOfLocECC2d.hxx | 3 -- src/Extrema/Extrema_Curve2dTool.hxx | 2 -- src/Extrema/Extrema_CurveTool.cxx | 1 - src/Extrema/Extrema_CurveTool.hxx | 2 -- src/Extrema/Extrema_ECC.hxx | 4 --- src/Extrema/Extrema_ECC2d.hxx | 6 ---- src/Extrema/Extrema_ELPCOfLocateExtPC.hxx | 4 --- src/Extrema/Extrema_ELPCOfLocateExtPC2d.hxx | 4 --- .../Extrema_EPCOfELPCOfLocateExtPC.hxx | 3 -- .../Extrema_EPCOfELPCOfLocateExtPC2d.hxx | 2 -- src/Extrema/Extrema_EPCOfExtPC.hxx | 3 -- src/Extrema/Extrema_EPCOfExtPC2d.hxx | 3 -- src/Extrema/Extrema_ExtCC.cxx | 8 ------ src/Extrema/Extrema_ExtCC.hxx | 5 ---- src/Extrema/Extrema_ExtCC2d.cxx | 8 ------ src/Extrema/Extrema_ExtCC2d.hxx | 4 --- src/Extrema/Extrema_ExtCS.cxx | 7 ----- src/Extrema/Extrema_ExtCS.hxx | 1 - src/Extrema/Extrema_ExtElC.cxx | 4 --- src/Extrema/Extrema_ExtElC.hxx | 3 -- src/Extrema/Extrema_ExtElC2d.cxx | 2 -- src/Extrema/Extrema_ExtElC2d.hxx | 3 -- src/Extrema/Extrema_ExtElCS.hxx | 2 -- src/Extrema/Extrema_ExtPC.hxx | 5 ---- src/Extrema/Extrema_ExtPC2d.hxx | 5 ---- src/Extrema/Extrema_ExtPElC.hxx | 3 -- src/Extrema/Extrema_ExtPElC2d.hxx | 3 -- src/Extrema/Extrema_ExtPElS.hxx | 3 -- src/Extrema/Extrema_ExtPExtS.cxx | 3 -- src/Extrema/Extrema_ExtPRevS.cxx | 1 - src/Extrema/Extrema_ExtPS.cxx | 10 ------- src/Extrema/Extrema_ExtPS.hxx | 1 - src/Extrema/Extrema_ExtSS.cxx | 3 -- src/Extrema/Extrema_ExtSS.hxx | 2 -- src/Extrema/Extrema_FuncExtCS.cxx | 2 -- src/Extrema/Extrema_FuncExtCS.hxx | 4 --- src/Extrema/Extrema_FuncExtSS.cxx | 1 - src/Extrema/Extrema_FuncExtSS.hxx | 4 --- src/Extrema/Extrema_FuncPSDist.hxx | 3 -- src/Extrema/Extrema_FuncPSNorm.cxx | 1 - src/Extrema/Extrema_FuncPSNorm.hxx | 1 - src/Extrema/Extrema_GenExtCS.cxx | 3 -- src/Extrema/Extrema_GenExtPS.cxx | 9 ------ src/Extrema/Extrema_GenExtSS.cxx | 1 - src/Extrema/Extrema_GenLocateExtCS.cxx | 2 -- src/Extrema/Extrema_GenLocateExtCS.hxx | 3 -- src/Extrema/Extrema_GenLocateExtPS.cxx | 2 -- src/Extrema/Extrema_GenLocateExtPS.hxx | 1 - src/Extrema/Extrema_GenLocateExtSS.cxx | 1 - src/Extrema/Extrema_GenLocateExtSS.hxx | 3 -- src/Extrema/Extrema_GlobOptFuncCC.cxx | 2 -- src/Extrema/Extrema_GlobOptFuncCC.hxx | 2 -- src/Extrema/Extrema_GlobOptFuncCQuadric.hxx | 3 -- src/Extrema/Extrema_GlobOptFuncCS.cxx | 2 -- src/Extrema/Extrema_GlobOptFuncCS.hxx | 1 - src/Extrema/Extrema_GlobOptFuncConicS.hxx | 3 -- src/Extrema/Extrema_HArray1OfPOnCurv.hxx | 1 - src/Extrema/Extrema_HArray1OfPOnSurf.hxx | 1 - src/Extrema/Extrema_HUBTreeOfSphere.hxx | 1 - src/Extrema/Extrema_LocECC.hxx | 4 --- src/Extrema/Extrema_LocECC2d.hxx | 4 --- src/Extrema/Extrema_LocEPCOfLocateExtPC.hxx | 3 -- src/Extrema/Extrema_LocEPCOfLocateExtPC2d.hxx | 1 - src/Extrema/Extrema_LocateExtCC.cxx | 1 - src/Extrema/Extrema_LocateExtCC.hxx | 3 -- src/Extrema/Extrema_LocateExtCC2d.cxx | 3 -- src/Extrema/Extrema_LocateExtCC2d.hxx | 1 - src/Extrema/Extrema_LocateExtPC.hxx | 6 ---- src/Extrema/Extrema_LocateExtPC2d.hxx | 4 --- .../Extrema_PCFOfEPCOfELPCOfLocateExtPC.hxx | 4 --- .../Extrema_PCFOfEPCOfELPCOfLocateExtPC2d.hxx | 3 -- src/Extrema/Extrema_PCFOfEPCOfExtPC.hxx | 4 --- src/Extrema/Extrema_PCFOfEPCOfExtPC2d.hxx | 4 --- .../Extrema_PCLocFOfLocEPCOfLocateExtPC.hxx | 4 --- .../Extrema_PCLocFOfLocEPCOfLocateExtPC2d.hxx | 3 -- src/Extrema/Extrema_POnCurv.hxx | 1 - src/Extrema/Extrema_POnCurv2d.hxx | 2 -- src/Extrema/Extrema_POnSurf.hxx | 2 -- src/Extrema/Extrema_POnSurfParams.hxx | 2 -- 430 files changed, 37 insertions(+), 1338 deletions(-) diff --git a/src/CPnts/CPnts_AbscissaPoint.cxx b/src/CPnts/CPnts_AbscissaPoint.cxx index 082a08a161..456f8b03ed 100644 --- a/src/CPnts/CPnts_AbscissaPoint.cxx +++ b/src/CPnts/CPnts_AbscissaPoint.cxx @@ -29,7 +29,6 @@ #include #include #include -#include #include #include #include diff --git a/src/CPnts/CPnts_AbscissaPoint.hxx b/src/CPnts/CPnts_AbscissaPoint.hxx index 74deff54ff..bd6c7a6cdc 100644 --- a/src/CPnts/CPnts_AbscissaPoint.hxx +++ b/src/CPnts/CPnts_AbscissaPoint.hxx @@ -19,10 +19,7 @@ #include #include -#include -#include -#include #include class Adaptor3d_Curve; class Adaptor2d_Curve2d; diff --git a/src/CPnts/CPnts_MyGaussFunction.hxx b/src/CPnts/CPnts_MyGaussFunction.hxx index 3e313590db..0e7b02b130 100644 --- a/src/CPnts/CPnts_MyGaussFunction.hxx +++ b/src/CPnts/CPnts_MyGaussFunction.hxx @@ -22,9 +22,7 @@ #include #include -#include #include -#include #include diff --git a/src/CPnts/CPnts_MyRootFunction.hxx b/src/CPnts/CPnts_MyRootFunction.hxx index 357d35a02c..58be58672c 100644 --- a/src/CPnts/CPnts_MyRootFunction.hxx +++ b/src/CPnts/CPnts_MyRootFunction.hxx @@ -23,11 +23,8 @@ #include #include -#include #include #include -#include -#include //! Implements a function for the Newton algorithm to find the diff --git a/src/CPnts/CPnts_UniformDeflection.cxx b/src/CPnts/CPnts_UniformDeflection.cxx index d3d6225688..f7e1422935 100644 --- a/src/CPnts/CPnts_UniformDeflection.cxx +++ b/src/CPnts/CPnts_UniformDeflection.cxx @@ -45,9 +45,6 @@ #include #include #include -#include -#include -#include #include static inline void D03d(const Standard_Address C, const Standard_Real U, diff --git a/src/CPnts/CPnts_UniformDeflection.hxx b/src/CPnts/CPnts_UniformDeflection.hxx index 11efcc63ed..03b290745a 100644 --- a/src/CPnts/CPnts_UniformDeflection.hxx +++ b/src/CPnts/CPnts_UniformDeflection.hxx @@ -19,11 +19,7 @@ #include #include -#include -#include -#include -#include #include #include class Adaptor3d_Curve; diff --git a/src/CSLib/CSLib.hxx b/src/CSLib/CSLib.hxx index 3021a9d971..df62e65384 100644 --- a/src/CSLib/CSLib.hxx +++ b/src/CSLib/CSLib.hxx @@ -21,11 +21,9 @@ #include #include -#include #include #include #include -#include #include class gp_Vec; class gp_Dir; diff --git a/src/CSLib/CSLib_Class2d.cxx b/src/CSLib/CSLib_Class2d.cxx index ea51544443..9bbe360eb8 100644 --- a/src/CSLib/CSLib_Class2d.cxx +++ b/src/CSLib/CSLib_Class2d.cxx @@ -18,7 +18,6 @@ #include #include -#include static inline Standard_Real Transform2d(const Standard_Real u, diff --git a/src/CSLib/CSLib_Class2d.hxx b/src/CSLib/CSLib_Class2d.hxx index 95ec8e2d29..d5bc8187ed 100644 --- a/src/CSLib/CSLib_Class2d.hxx +++ b/src/CSLib/CSLib_Class2d.hxx @@ -21,9 +21,6 @@ #include #include -#include -#include -#include #include #include #include diff --git a/src/CSLib/CSLib_NormalPolyDef.hxx b/src/CSLib/CSLib_NormalPolyDef.hxx index 93d3ae1384..22713945b3 100644 --- a/src/CSLib/CSLib_NormalPolyDef.hxx +++ b/src/CSLib/CSLib_NormalPolyDef.hxx @@ -21,12 +21,9 @@ #include #include -#include #include #include #include -#include - class CSLib_NormalPolyDef : public math_FunctionWithDerivative diff --git a/src/Contap/Contap_ArcFunction.cxx b/src/Contap/Contap_ArcFunction.cxx index 7b1dd96759..254467a8ac 100644 --- a/src/Contap/Contap_ArcFunction.cxx +++ b/src/Contap/Contap_ArcFunction.cxx @@ -15,14 +15,11 @@ // commercial license or contractual agreement. -#include -#include #include #include #include #include #include -#include #include Contap_ArcFunction::Contap_ArcFunction (): diff --git a/src/Contap/Contap_ArcFunction.hxx b/src/Contap/Contap_ArcFunction.hxx index a9acd69523..3270f1e582 100644 --- a/src/Contap/Contap_ArcFunction.hxx +++ b/src/Contap/Contap_ArcFunction.hxx @@ -17,6 +17,7 @@ #ifndef _Contap_ArcFunction_HeaderFile #define _Contap_ArcFunction_HeaderFile +#include #include #include #include diff --git a/src/Contap/Contap_ContAna.cxx b/src/Contap/Contap_ContAna.cxx index 4c81c24e7a..9e684fbded 100644 --- a/src/Contap/Contap_ContAna.cxx +++ b/src/Contap/Contap_ContAna.cxx @@ -16,7 +16,6 @@ #include -#include #include #include #include diff --git a/src/Contap/Contap_ContAna.hxx b/src/Contap/Contap_ContAna.hxx index f0384bdf0c..094f5a8f04 100644 --- a/src/Contap/Contap_ContAna.hxx +++ b/src/Contap/Contap_ContAna.hxx @@ -17,23 +17,20 @@ #ifndef _Contap_ContAna_HeaderFile #define _Contap_ContAna_HeaderFile +#include +#include +#include +#include #include +#include #include #include -#include -#include -#include -#include -#include -#include -#include class gp_Sphere; class gp_Cylinder; class gp_Cone; class gp_Lin; - //! This class provides the computation of the contours //! for quadric surfaces. class Contap_ContAna diff --git a/src/Contap/Contap_Contour.cxx b/src/Contap/Contap_Contour.cxx index 935bf5f859..90a00e7779 100644 --- a/src/Contap/Contap_Contour.cxx +++ b/src/Contap/Contap_Contour.cxx @@ -18,7 +18,6 @@ #include #include #include -#include #include #include #include @@ -39,7 +38,6 @@ #include #include #include -#include #include #include #include diff --git a/src/Contap/Contap_HContTool.cxx b/src/Contap/Contap_HContTool.cxx index a5032f1f56..b7c9cb38da 100644 --- a/src/Contap/Contap_HContTool.cxx +++ b/src/Contap/Contap_HContTool.cxx @@ -15,8 +15,6 @@ // commercial license or contractual agreement. -#include -#include #include #include #include diff --git a/src/Contap/Contap_HCurve2dTool.cxx b/src/Contap/Contap_HCurve2dTool.cxx index 7eaf179b94..bc89e3af47 100644 --- a/src/Contap/Contap_HCurve2dTool.cxx +++ b/src/Contap/Contap_HCurve2dTool.cxx @@ -15,15 +15,8 @@ // commercial license or contractual agreement. -#include #include #include -#include -#include -#include -#include -#include -#include //============================================================ Standard_Integer Contap_HCurve2dTool::NbSamples (const Handle(Adaptor2d_Curve2d)& C, diff --git a/src/Contap/Contap_HCurve2dTool.hxx b/src/Contap/Contap_HCurve2dTool.hxx index 0d235caa6b..a1fdc58358 100644 --- a/src/Contap/Contap_HCurve2dTool.hxx +++ b/src/Contap/Contap_HCurve2dTool.hxx @@ -17,30 +17,21 @@ #ifndef _Contap_HCurve2dTool_HeaderFile #define _Contap_HCurve2dTool_HeaderFile +#include +#include #include +#include #include #include - -#include -#include #include +#include #include -#include -#include -#include -#include -#include -#include -#include -#include -#include + class gp_Pnt2d; class gp_Vec2d; class Geom2d_BezierCurve; class Geom2d_BSplineCurve; - - class Contap_HCurve2dTool { public: diff --git a/src/Contap/Contap_Line.cxx b/src/Contap/Contap_Line.cxx index 187f6b4b49..f8130a6f68 100644 --- a/src/Contap/Contap_Line.cxx +++ b/src/Contap/Contap_Line.cxx @@ -21,9 +21,7 @@ #include #include #include -#include #include -#include Contap_Line::Contap_Line () { svtx = new Contap_TheHSequenceOfPoint (); diff --git a/src/Contap/Contap_Line.hxx b/src/Contap/Contap_Line.hxx index 8ac4aedb6a..4c5aeb63af 100644 --- a/src/Contap/Contap_Line.hxx +++ b/src/Contap/Contap_Line.hxx @@ -17,27 +17,22 @@ #ifndef _Contap_Line_HeaderFile #define _Contap_Line_HeaderFile +#include +#include +#include +#include +#include #include #include #include - -#include -#include -#include -#include -#include -#include #include -#include -#include + class IntSurf_LineOn2S; class IntSurf_PntOn2S; class gp_Lin; class gp_Circ; class Contap_Point; - - class Contap_Line { public: diff --git a/src/Contap/Contap_Point.cxx b/src/Contap/Contap_Point.cxx index 2549c34b62..59ed466279 100644 --- a/src/Contap/Contap_Point.cxx +++ b/src/Contap/Contap_Point.cxx @@ -15,12 +15,9 @@ // commercial license or contractual agreement. -#include #include #include #include -#include -#include Contap_Point::Contap_Point (): uparam(0.0), vparam(0.0), paraline(0.0), diff --git a/src/Contap/Contap_Point.hxx b/src/Contap/Contap_Point.hxx index 56a550f28e..a17f7cb007 100644 --- a/src/Contap/Contap_Point.hxx +++ b/src/Contap/Contap_Point.hxx @@ -22,8 +22,6 @@ #include #include -#include -#include #include class Adaptor3d_HVertex; diff --git a/src/Contap/Contap_SurfFunction.cxx b/src/Contap/Contap_SurfFunction.cxx index a09efd2c4c..4d2fadd9af 100644 --- a/src/Contap/Contap_SurfFunction.cxx +++ b/src/Contap/Contap_SurfFunction.cxx @@ -16,14 +16,12 @@ // jag 940616 Tolpetit = 1.e-16 -#include #include #include #include #include #include #include -#include #include #include #include diff --git a/src/Contap/Contap_SurfProps.cxx b/src/Contap/Contap_SurfProps.cxx index 81deb40646..f60050dd8c 100644 --- a/src/Contap/Contap_SurfProps.cxx +++ b/src/Contap/Contap_SurfProps.cxx @@ -15,7 +15,6 @@ // commercial license or contractual agreement. -#include #include #include #include diff --git a/src/Convert/Convert_CircleToBSplineCurve.cxx b/src/Convert/Convert_CircleToBSplineCurve.cxx index be06a04952..1890f698bd 100644 --- a/src/Convert/Convert_CircleToBSplineCurve.cxx +++ b/src/Convert/Convert_CircleToBSplineCurve.cxx @@ -22,10 +22,8 @@ #include #include #include -#include #include #include -#include #include //Attention : diff --git a/src/Convert/Convert_CircleToBSplineCurve.hxx b/src/Convert/Convert_CircleToBSplineCurve.hxx index 528298f371..9337d7efbc 100644 --- a/src/Convert/Convert_CircleToBSplineCurve.hxx +++ b/src/Convert/Convert_CircleToBSplineCurve.hxx @@ -23,7 +23,6 @@ #include #include -#include class gp_Circ2d; diff --git a/src/Convert/Convert_CompBezierCurves2dToBSplineCurve2d.cxx b/src/Convert/Convert_CompBezierCurves2dToBSplineCurve2d.cxx index e02aa0b5f5..9582478e01 100644 --- a/src/Convert/Convert_CompBezierCurves2dToBSplineCurve2d.cxx +++ b/src/Convert/Convert_CompBezierCurves2dToBSplineCurve2d.cxx @@ -21,8 +21,6 @@ #include #include #include -#include -#include #include //======================================================================= diff --git a/src/Convert/Convert_CompBezierCurves2dToBSplineCurve2d.hxx b/src/Convert/Convert_CompBezierCurves2dToBSplineCurve2d.hxx index 44d102dce9..7201ac59ad 100644 --- a/src/Convert/Convert_CompBezierCurves2dToBSplineCurve2d.hxx +++ b/src/Convert/Convert_CompBezierCurves2dToBSplineCurve2d.hxx @@ -19,15 +19,11 @@ #include #include -#include #include #include #include #include -#include -#include -#include #include #include #include diff --git a/src/Convert/Convert_CompBezierCurvesToBSplineCurve.cxx b/src/Convert/Convert_CompBezierCurvesToBSplineCurve.cxx index 234c5d4033..8e90f10df9 100644 --- a/src/Convert/Convert_CompBezierCurvesToBSplineCurve.cxx +++ b/src/Convert/Convert_CompBezierCurvesToBSplineCurve.cxx @@ -20,9 +20,7 @@ #include #include #include -#include #include -#include #include //======================================================================= diff --git a/src/Convert/Convert_CompBezierCurvesToBSplineCurve.hxx b/src/Convert/Convert_CompBezierCurvesToBSplineCurve.hxx index 8a76451b8b..adeb2ee599 100644 --- a/src/Convert/Convert_CompBezierCurvesToBSplineCurve.hxx +++ b/src/Convert/Convert_CompBezierCurvesToBSplineCurve.hxx @@ -19,15 +19,11 @@ #include #include -#include #include #include #include #include -#include -#include -#include #include #include #include diff --git a/src/Convert/Convert_CompPolynomialToPoles.cxx b/src/Convert/Convert_CompPolynomialToPoles.cxx index 1399723aef..8d0043c453 100644 --- a/src/Convert/Convert_CompPolynomialToPoles.cxx +++ b/src/Convert/Convert_CompPolynomialToPoles.cxx @@ -29,7 +29,6 @@ #include #include #include -#include #include #include #include diff --git a/src/Convert/Convert_CompPolynomialToPoles.hxx b/src/Convert/Convert_CompPolynomialToPoles.hxx index eb813f0cea..8af181c7a3 100644 --- a/src/Convert/Convert_CompPolynomialToPoles.hxx +++ b/src/Convert/Convert_CompPolynomialToPoles.hxx @@ -25,7 +25,6 @@ #include #include #include -#include #include #include #include diff --git a/src/Convert/Convert_ConeToBSplineSurface.hxx b/src/Convert/Convert_ConeToBSplineSurface.hxx index 9e382ce475..b7af1a3f52 100644 --- a/src/Convert/Convert_ConeToBSplineSurface.hxx +++ b/src/Convert/Convert_ConeToBSplineSurface.hxx @@ -22,7 +22,6 @@ #include #include -#include class gp_Cone; diff --git a/src/Convert/Convert_ConicToBSplineCurve.cxx b/src/Convert/Convert_ConicToBSplineCurve.cxx index b4945f7953..01640adbcf 100644 --- a/src/Convert/Convert_ConicToBSplineCurve.cxx +++ b/src/Convert/Convert_ConicToBSplineCurve.cxx @@ -21,10 +21,8 @@ #include #include #include -#include #include #include -#include #include #include #include diff --git a/src/Convert/Convert_ConicToBSplineCurve.hxx b/src/Convert/Convert_ConicToBSplineCurve.hxx index 1483e567cc..88c219be62 100644 --- a/src/Convert/Convert_ConicToBSplineCurve.hxx +++ b/src/Convert/Convert_ConicToBSplineCurve.hxx @@ -25,8 +25,6 @@ #include #include #include -#include -#include #include class gp_Pnt2d; diff --git a/src/Convert/Convert_CylinderToBSplineSurface.hxx b/src/Convert/Convert_CylinderToBSplineSurface.hxx index 590d93e5e1..034ac1642e 100644 --- a/src/Convert/Convert_CylinderToBSplineSurface.hxx +++ b/src/Convert/Convert_CylinderToBSplineSurface.hxx @@ -22,7 +22,6 @@ #include #include -#include class gp_Cylinder; diff --git a/src/Convert/Convert_ElementarySurfaceToBSplineSurface.hxx b/src/Convert/Convert_ElementarySurfaceToBSplineSurface.hxx index 1259609b58..22b126bd97 100644 --- a/src/Convert/Convert_ElementarySurfaceToBSplineSurface.hxx +++ b/src/Convert/Convert_ElementarySurfaceToBSplineSurface.hxx @@ -25,9 +25,7 @@ #include #include #include -#include #include -#include class gp_Pnt; diff --git a/src/Convert/Convert_EllipseToBSplineCurve.cxx b/src/Convert/Convert_EllipseToBSplineCurve.cxx index 4e8aeb593a..c4e239e632 100644 --- a/src/Convert/Convert_EllipseToBSplineCurve.cxx +++ b/src/Convert/Convert_EllipseToBSplineCurve.cxx @@ -22,10 +22,8 @@ #include #include #include -#include #include #include -#include #include //Attention : diff --git a/src/Convert/Convert_EllipseToBSplineCurve.hxx b/src/Convert/Convert_EllipseToBSplineCurve.hxx index 4d038ba903..3a97ba1403 100644 --- a/src/Convert/Convert_EllipseToBSplineCurve.hxx +++ b/src/Convert/Convert_EllipseToBSplineCurve.hxx @@ -23,7 +23,6 @@ #include #include -#include class gp_Elips2d; diff --git a/src/Convert/Convert_GridPolynomialToPoles.hxx b/src/Convert/Convert_GridPolynomialToPoles.hxx index 71e3a0a564..a7a7c7db09 100644 --- a/src/Convert/Convert_GridPolynomialToPoles.hxx +++ b/src/Convert/Convert_GridPolynomialToPoles.hxx @@ -25,7 +25,6 @@ #include #include #include -#include #include diff --git a/src/Convert/Convert_HyperbolaToBSplineCurve.cxx b/src/Convert/Convert_HyperbolaToBSplineCurve.cxx index 5c17d193f4..af6495a765 100644 --- a/src/Convert/Convert_HyperbolaToBSplineCurve.cxx +++ b/src/Convert/Convert_HyperbolaToBSplineCurve.cxx @@ -16,11 +16,9 @@ #include #include -#include #include #include #include -#include #include #include #include diff --git a/src/Convert/Convert_HyperbolaToBSplineCurve.hxx b/src/Convert/Convert_HyperbolaToBSplineCurve.hxx index 0b1501a05a..7e503c7044 100644 --- a/src/Convert/Convert_HyperbolaToBSplineCurve.hxx +++ b/src/Convert/Convert_HyperbolaToBSplineCurve.hxx @@ -22,7 +22,6 @@ #include #include -#include class gp_Hypr2d; diff --git a/src/Convert/Convert_ParabolaToBSplineCurve.cxx b/src/Convert/Convert_ParabolaToBSplineCurve.cxx index fae6ba5698..a3b653caa7 100644 --- a/src/Convert/Convert_ParabolaToBSplineCurve.cxx +++ b/src/Convert/Convert_ParabolaToBSplineCurve.cxx @@ -16,11 +16,9 @@ #include #include -#include #include #include #include -#include #include #include #include diff --git a/src/Convert/Convert_ParabolaToBSplineCurve.hxx b/src/Convert/Convert_ParabolaToBSplineCurve.hxx index ef0cd30af8..ffc915552f 100644 --- a/src/Convert/Convert_ParabolaToBSplineCurve.hxx +++ b/src/Convert/Convert_ParabolaToBSplineCurve.hxx @@ -22,7 +22,6 @@ #include #include -#include class gp_Parab2d; diff --git a/src/Convert/Convert_PolynomialCosAndSin.cxx b/src/Convert/Convert_PolynomialCosAndSin.cxx index 19147aa09f..a5ea810290 100644 --- a/src/Convert/Convert_PolynomialCosAndSin.cxx +++ b/src/Convert/Convert_PolynomialCosAndSin.cxx @@ -16,23 +16,18 @@ #include -#include #include #include -#include #include #include #include -#include #include -#include - static Standard_Real Locate(const Standard_Real Angfin, - const TColgp_Array1OfPnt2d& TPoles, - const Standard_Real Umin, - const Standard_Real Umax) + const TColgp_Array1OfPnt2d& TPoles, + const Standard_Real Umin, + const Standard_Real Umax) { Standard_Real umin = Umin; Standard_Real umax = Umax; diff --git a/src/Convert/Convert_SphereToBSplineSurface.hxx b/src/Convert/Convert_SphereToBSplineSurface.hxx index 57b139f632..61ed9af536 100644 --- a/src/Convert/Convert_SphereToBSplineSurface.hxx +++ b/src/Convert/Convert_SphereToBSplineSurface.hxx @@ -22,7 +22,6 @@ #include #include -#include #include class gp_Sphere; diff --git a/src/Convert/Convert_TorusToBSplineSurface.hxx b/src/Convert/Convert_TorusToBSplineSurface.hxx index bbce8280a6..e2c06a4a81 100644 --- a/src/Convert/Convert_TorusToBSplineSurface.hxx +++ b/src/Convert/Convert_TorusToBSplineSurface.hxx @@ -22,7 +22,6 @@ #include #include -#include #include class gp_Torus; diff --git a/src/DBRep/DBRep.cxx b/src/DBRep/DBRep.cxx index 9633b081c9..9fc4e74a2d 100644 --- a/src/DBRep/DBRep.cxx +++ b/src/DBRep/DBRep.cxx @@ -24,17 +24,13 @@ #include #include #include -#include #include #include #include #include -#include -#include #include #include #include -#include #include #include #include @@ -44,7 +40,6 @@ #include #include #include -#include #include #include diff --git a/src/DBRep/DBRep.hxx b/src/DBRep/DBRep.hxx index 3d069d0ecb..626b6e0854 100644 --- a/src/DBRep/DBRep.hxx +++ b/src/DBRep/DBRep.hxx @@ -19,7 +19,6 @@ #include #include -#include #include //! Used to display BRep objects using the DrawTrSurf diff --git a/src/DBRep/DBRep_Debug.cxx b/src/DBRep/DBRep_Debug.cxx index 672b2f2252..9744aef31a 100644 --- a/src/DBRep/DBRep_Debug.cxx +++ b/src/DBRep/DBRep_Debug.cxx @@ -15,7 +15,6 @@ // commercial license or contractual agreement. #include -#include #include #include #include @@ -23,7 +22,6 @@ #include #include #include -#include #include // This file defines global functions not declared in any public header, diff --git a/src/DBRep/DBRep_DrawableShape.cxx b/src/DBRep/DBRep_DrawableShape.cxx index b5d661fda8..95308e8ee9 100644 --- a/src/DBRep/DBRep_DrawableShape.cxx +++ b/src/DBRep/DBRep_DrawableShape.cxx @@ -16,8 +16,6 @@ #include -#include -#include #include #include #include @@ -36,9 +34,6 @@ #include #include #include -#include -#include -#include #include #include #include @@ -47,12 +42,8 @@ #include #include #include -#include #include -#include -#include #include -#include #include #include #include @@ -60,7 +51,6 @@ #include #include #include -#include IMPLEMENT_STANDARD_RTTIEXT(DBRep_DrawableShape,Draw_Drawable3D) diff --git a/src/DBRep/DBRep_Edge.hxx b/src/DBRep/DBRep_Edge.hxx index 44ce120627..b3b594abc3 100644 --- a/src/DBRep/DBRep_Edge.hxx +++ b/src/DBRep/DBRep_Edge.hxx @@ -18,7 +18,6 @@ #define _DBRep_Edge_HeaderFile #include -#include #include #include diff --git a/src/DBRep/DBRep_Face.hxx b/src/DBRep/DBRep_Face.hxx index 26f3fe766e..25c9bcbebc 100644 --- a/src/DBRep/DBRep_Face.hxx +++ b/src/DBRep/DBRep_Face.hxx @@ -18,7 +18,6 @@ #define _DBRep_Face_HeaderFile #include -#include #include #include diff --git a/src/DBRep/DBRep_HideData.hxx b/src/DBRep/DBRep_HideData.hxx index c08f2b863c..707c35e419 100644 --- a/src/DBRep/DBRep_HideData.hxx +++ b/src/DBRep/DBRep_HideData.hxx @@ -21,9 +21,7 @@ #include #include -#include #include -#include #include #include #include diff --git a/src/DBRep/DBRep_IsoBuilder.cxx b/src/DBRep/DBRep_IsoBuilder.cxx index 0ee9f47059..03e442b574 100644 --- a/src/DBRep/DBRep_IsoBuilder.cxx +++ b/src/DBRep/DBRep_IsoBuilder.cxx @@ -36,7 +36,6 @@ #include #include #include -#include #include #include diff --git a/src/DBRep/DBRep_IsoBuilder.hxx b/src/DBRep/DBRep_IsoBuilder.hxx index 153dd09c4f..b9a2018d60 100644 --- a/src/DBRep/DBRep_IsoBuilder.hxx +++ b/src/DBRep/DBRep_IsoBuilder.hxx @@ -21,7 +21,6 @@ #include #include -#include #include #include #include diff --git a/src/DDF/DDF.cxx b/src/DDF/DDF.cxx index 90ba1cca81..fe59d15f46 100644 --- a/src/DDF/DDF.cxx +++ b/src/DDF/DDF.cxx @@ -23,11 +23,6 @@ #include #include #include -#include -#include -#include -#include -#include #include #include #include diff --git a/src/DDF/DDF.hxx b/src/DDF/DDF.hxx index 993f02760c..dccd812408 100644 --- a/src/DDF/DDF.hxx +++ b/src/DDF/DDF.hxx @@ -21,7 +21,6 @@ #include #include -#include #include class TDF_Data; class TDF_Label; diff --git a/src/DDF/DDF_AttributeBrowser.hxx b/src/DDF/DDF_AttributeBrowser.hxx index 42eae75a66..fe614d35cd 100644 --- a/src/DDF/DDF_AttributeBrowser.hxx +++ b/src/DDF/DDF_AttributeBrowser.hxx @@ -24,7 +24,6 @@ #ifndef DDF_AttributeBrowser_HeaderFile #define DDF_AttributeBrowser_HeaderFile -#include #include #include diff --git a/src/DDF/DDF_BasicCommands.cxx b/src/DDF/DDF_BasicCommands.cxx index a3994bdedd..bd9201670f 100644 --- a/src/DDF/DDF_BasicCommands.cxx +++ b/src/DDF/DDF_BasicCommands.cxx @@ -23,36 +23,20 @@ #include #include -#include -#include -#include #include -#include #include -#include #include -#include #include -#include -#include -#include - #include -#include -#include -#include #include #include #include -#include -#include #include #include -#include #include #include diff --git a/src/DDF/DDF_Browser.cxx b/src/DDF/DDF_Browser.cxx index d9ee57b68a..af9799913c 100644 --- a/src/DDF/DDF_Browser.cxx +++ b/src/DDF/DDF_Browser.cxx @@ -24,9 +24,7 @@ #include #include #include -#include #include -#include #include #include #include diff --git a/src/DDF/DDF_BrowserCommands.cxx b/src/DDF/DDF_BrowserCommands.cxx index 83e187fde1..8a392bd58c 100644 --- a/src/DDF/DDF_BrowserCommands.cxx +++ b/src/DDF/DDF_BrowserCommands.cxx @@ -17,27 +17,18 @@ #include #include -#include -#include #include -#include #include #include #include #include -#include #include #include -#include #include -#ifdef _MSC_VER -#include -#endif - //======================================================================= //function : DFBrowse //purpose : diff --git a/src/DDF/DDF_Data.cxx b/src/DDF/DDF_Data.cxx index 3f2af36638..dd973ccfb9 100644 --- a/src/DDF/DDF_Data.cxx +++ b/src/DDF/DDF_Data.cxx @@ -22,14 +22,9 @@ #include #include #include -#include #include -#include -#include #include -#include #include -#include #include #include diff --git a/src/DDF/DDF_Data.hxx b/src/DDF/DDF_Data.hxx index 80fc9f0afa..a7b3795eea 100644 --- a/src/DDF/DDF_Data.hxx +++ b/src/DDF/DDF_Data.hxx @@ -17,7 +17,6 @@ #define _DDF_Data_HeaderFile #include -#include #include #include diff --git a/src/DDF/DDF_DataCommands.cxx b/src/DDF/DDF_DataCommands.cxx index 1b78a6bb73..d189c160ed 100644 --- a/src/DDF/DDF_DataCommands.cxx +++ b/src/DDF/DDF_DataCommands.cxx @@ -28,25 +28,20 @@ #include #include -#include #include #include #include #include -#include #include #include -#include #include #include #include #include -#include #include #include -#include //======================================================================= diff --git a/src/DDF/DDF_Transaction.cxx b/src/DDF/DDF_Transaction.cxx index 07cedf674a..26946d1d19 100644 --- a/src/DDF/DDF_Transaction.cxx +++ b/src/DDF/DDF_Transaction.cxx @@ -19,8 +19,6 @@ // 0.0 Nov 4 1997 Creation #include -#include -#include #include #include #include diff --git a/src/DDF/DDF_Transaction.hxx b/src/DDF/DDF_Transaction.hxx index 8a6a47629c..2e33afa2f2 100644 --- a/src/DDF/DDF_Transaction.hxx +++ b/src/DDF/DDF_Transaction.hxx @@ -17,12 +17,10 @@ #define _DDF_Transaction_HeaderFile #include -#include #include #include #include -#include class TDF_Data; class TDF_Delta; diff --git a/src/DDF/DDF_TransactionCommands.cxx b/src/DDF/DDF_TransactionCommands.cxx index 1b1cd0bc07..4359fea098 100644 --- a/src/DDF/DDF_TransactionCommands.cxx +++ b/src/DDF/DDF_TransactionCommands.cxx @@ -22,17 +22,13 @@ #include #include -#include #include -#include #include -#include #include #include #include -#include static DDF_TransactionStack DDF_TStack; static Handle(TDF_Delta) DDF_LastDelta; diff --git a/src/DDataStd/DDataStd.cxx b/src/DDataStd/DDataStd.cxx index 17eed9346e..43c655d098 100644 --- a/src/DDataStd/DDataStd.cxx +++ b/src/DDataStd/DDataStd.cxx @@ -16,7 +16,6 @@ #include -#include #include #include #include diff --git a/src/DDataStd/DDataStd_BasicCommands.cxx b/src/DDataStd/DDataStd_BasicCommands.cxx index 3cc31d1017..03a058eee2 100644 --- a/src/DDataStd/DDataStd_BasicCommands.cxx +++ b/src/DDataStd/DDataStd_BasicCommands.cxx @@ -16,44 +16,25 @@ #include -#include - -#include #include #include -#include #include #include #include #include -#include #include -#include -#include #include #include -#include #include -#include -#include -#include -#include -#include -#include #include -#include -#include -#include - #include #include // LES ATTRIBUTES -#include #include #include #include @@ -74,19 +55,12 @@ #include #include -#include #include -#include #include -#include #include -#include #include -#include #include -#include #include -#include #include #include #include @@ -94,12 +68,10 @@ #include #include #include -#include #include #include #include #include -#include #include #include diff --git a/src/DDataStd/DDataStd_ConstraintCommands.cxx b/src/DDataStd/DDataStd_ConstraintCommands.cxx index 4b616c9f59..f205f92d24 100644 --- a/src/DDataStd/DDataStd_ConstraintCommands.cxx +++ b/src/DDataStd/DDataStd_ConstraintCommands.cxx @@ -27,7 +27,6 @@ #include -#include #include #include #include diff --git a/src/DDataStd/DDataStd_DatumCommands.cxx b/src/DDataStd/DDataStd_DatumCommands.cxx index 407ba64564..9ac1facc15 100644 --- a/src/DDataStd/DDataStd_DatumCommands.cxx +++ b/src/DDataStd/DDataStd_DatumCommands.cxx @@ -25,23 +25,13 @@ #include #include -#include -#include #include -#include -#include -#include -#include -#include #include #include #include -#include #include -#include -#include #include #include diff --git a/src/DDataStd/DDataStd_DrawDisplayCommands.cxx b/src/DDataStd/DDataStd_DrawDisplayCommands.cxx index 9fff964810..5917063b9a 100644 --- a/src/DDataStd/DDataStd_DrawDisplayCommands.cxx +++ b/src/DDataStd/DDataStd_DrawDisplayCommands.cxx @@ -16,41 +16,16 @@ #include #include -#include -#include #include #include #include -#include #include -#include #include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include #include #include -#include -#include -#include -#include #include -#include -#include -#include -#include -#include -#include #include -#include #include #ifndef _WIN32 diff --git a/src/DDataStd/DDataStd_DrawDriver.cxx b/src/DDataStd/DDataStd_DrawDriver.cxx index 2f5654f5e0..65bbcdeaee 100644 --- a/src/DDataStd/DDataStd_DrawDriver.cxx +++ b/src/DDataStd/DDataStd_DrawDriver.cxx @@ -16,16 +16,11 @@ #include -#include -#include #include -#include #include -#include #include #include #include -#include #include #include #include @@ -33,15 +28,7 @@ #include #include #include -#include -#include -#include -#include -#include #include -#include -#include -#include #include #include #include @@ -49,15 +36,10 @@ #include #include #include -#include #include -#include -#include #include -#include #include #include -#include #include IMPLEMENT_STANDARD_RTTIEXT(DDataStd_DrawDriver,Standard_Transient) diff --git a/src/DDataStd/DDataStd_DrawDriver.hxx b/src/DDataStd/DDataStd_DrawDriver.hxx index b5cedf4006..cd971be1c3 100644 --- a/src/DDataStd/DDataStd_DrawDriver.hxx +++ b/src/DDataStd/DDataStd_DrawDriver.hxx @@ -22,7 +22,6 @@ #include #include -#include class Draw_Drawable3D; class TDF_Label; class TDataXtd_Constraint; diff --git a/src/DDataStd/DDataStd_DrawPresentation.cxx b/src/DDataStd/DDataStd_DrawPresentation.cxx index 6f99dac5ad..2a69febaa7 100644 --- a/src/DDataStd/DDataStd_DrawPresentation.cxx +++ b/src/DDataStd/DDataStd_DrawPresentation.cxx @@ -18,7 +18,6 @@ #include #include #include -#include #include #include #include diff --git a/src/DDataStd/DDataStd_DrawPresentation.hxx b/src/DDataStd/DDataStd_DrawPresentation.hxx index 3261fe45b8..793e2d5a6d 100644 --- a/src/DDataStd/DDataStd_DrawPresentation.hxx +++ b/src/DDataStd/DDataStd_DrawPresentation.hxx @@ -20,7 +20,6 @@ #include #include -#include #include class Draw_Drawable3D; class TDF_Label; diff --git a/src/DDataStd/DDataStd_NameCommands.cxx b/src/DDataStd/DDataStd_NameCommands.cxx index 321422749d..4a537a1658 100644 --- a/src/DDataStd/DDataStd_NameCommands.cxx +++ b/src/DDataStd/DDataStd_NameCommands.cxx @@ -15,26 +15,18 @@ // commercial license or contractual agreement. #include -#include #include #include -#include #include #include #include -#include -#include -#include -#include // ATTRIBUTES -#include #include -#include #include diff --git a/src/DDataStd/DDataStd_NamedShapeCommands.cxx b/src/DDataStd/DDataStd_NamedShapeCommands.cxx index 7173f59efe..3c09803752 100644 --- a/src/DDataStd/DDataStd_NamedShapeCommands.cxx +++ b/src/DDataStd/DDataStd_NamedShapeCommands.cxx @@ -24,15 +24,12 @@ #include #include -#include #include // LES ATTRIBUTES -#include #include -#include //======================================================================= diff --git a/src/DDataStd/DDataStd_ObjectCommands.cxx b/src/DDataStd/DDataStd_ObjectCommands.cxx index b5d3d93174..802a99bfd4 100644 --- a/src/DDataStd/DDataStd_ObjectCommands.cxx +++ b/src/DDataStd/DDataStd_ObjectCommands.cxx @@ -21,11 +21,8 @@ #include #include #include -#include #include -#include #include -#include // LES ATTRIBUTES @@ -34,7 +31,6 @@ #include -#include #include diff --git a/src/DDataStd/DDataStd_TreeBrowser.cxx b/src/DDataStd/DDataStd_TreeBrowser.cxx index 11b56ef684..5b6a1afc24 100644 --- a/src/DDataStd/DDataStd_TreeBrowser.cxx +++ b/src/DDataStd/DDataStd_TreeBrowser.cxx @@ -24,7 +24,6 @@ #include #include #include -#include #include #include #include diff --git a/src/DDataStd/DDataStd_TreeBrowser.hxx b/src/DDataStd/DDataStd_TreeBrowser.hxx index 7eea491287..db750d62ac 100644 --- a/src/DDataStd/DDataStd_TreeBrowser.hxx +++ b/src/DDataStd/DDataStd_TreeBrowser.hxx @@ -17,7 +17,6 @@ #define _DDataStd_TreeBrowser_HeaderFile #include -#include #include #include diff --git a/src/DDataStd/DDataStd_TreeCommands.cxx b/src/DDataStd/DDataStd_TreeCommands.cxx index 14c15fd7ae..df300dffd2 100644 --- a/src/DDataStd/DDataStd_TreeCommands.cxx +++ b/src/DDataStd/DDataStd_TreeCommands.cxx @@ -18,18 +18,12 @@ #include #include #include -#include #include -#include #include #include -#include #include -#include #include #include -#include -#include #include #include #include diff --git a/src/DDocStd/DDocStd.cxx b/src/DDocStd/DDocStd.cxx index d517dc716c..a49532ec0a 100644 --- a/src/DDocStd/DDocStd.cxx +++ b/src/DDocStd/DDocStd.cxx @@ -15,16 +15,12 @@ #include -#include #include #include #include -#include #include #include -#include #include -#include #include #include #include diff --git a/src/DDocStd/DDocStd.hxx b/src/DDocStd/DDocStd.hxx index b10d783136..a86456d927 100644 --- a/src/DDocStd/DDocStd.hxx +++ b/src/DDocStd/DDocStd.hxx @@ -21,7 +21,6 @@ #include #include -#include #include class TDocStd_Application; class TDocStd_Document; diff --git a/src/DDocStd/DDocStd_ApplicationCommands.cxx b/src/DDocStd/DDocStd_ApplicationCommands.cxx index 35be9fd189..8c131784f8 100644 --- a/src/DDocStd/DDocStd_ApplicationCommands.cxx +++ b/src/DDocStd/DDocStd_ApplicationCommands.cxx @@ -14,7 +14,6 @@ // commercial license or contractual agreement. #include -#include #include #include #include @@ -23,20 +22,14 @@ #include #include #include -#include -#include #include #include -#include #include #include -#include #include #include -#include #include -#include #include #include diff --git a/src/DDocStd/DDocStd_DocumentCommands.cxx b/src/DDocStd/DDocStd_DocumentCommands.cxx index 462ae50064..4fc1c9348d 100644 --- a/src/DDocStd/DDocStd_DocumentCommands.cxx +++ b/src/DDocStd/DDocStd_DocumentCommands.cxx @@ -17,37 +17,21 @@ #include #include -#include #include -#include #include -#include -#include #include #include -#include -#include #include -#include #include #include #include -#include -#include -#include #include #include -#include -#include #include #include // pour propagate #include -#include -#include -#include - //typedef Standard_Integer (* DFBROWSER_CALL)(const Handle(TDocStd_Document)&); //static DFBROWSER_CALL gDFunc = 0; diff --git a/src/DDocStd/DDocStd_DrawDocument.cxx b/src/DDocStd/DDocStd_DrawDocument.cxx index e8c1bf5293..7e8de054b9 100644 --- a/src/DDocStd/DDocStd_DrawDocument.cxx +++ b/src/DDocStd/DDocStd_DrawDocument.cxx @@ -16,7 +16,6 @@ #include #include #include -#include #include #include #include diff --git a/src/DDocStd/DDocStd_MTMCommands.cxx b/src/DDocStd/DDocStd_MTMCommands.cxx index 50109074c3..f8dfe8f438 100644 --- a/src/DDocStd/DDocStd_MTMCommands.cxx +++ b/src/DDocStd/DDocStd_MTMCommands.cxx @@ -16,7 +16,6 @@ #include #include #include -#include #include #include #include @@ -32,7 +31,6 @@ #include #include #include -#include #include #include #include diff --git a/src/DDocStd/DDocStd_ShapeSchemaCommands.cxx b/src/DDocStd/DDocStd_ShapeSchemaCommands.cxx index 438764a1aa..543130f153 100644 --- a/src/DDocStd/DDocStd_ShapeSchemaCommands.cxx +++ b/src/DDocStd/DDocStd_ShapeSchemaCommands.cxx @@ -15,7 +15,6 @@ #include #include -#include #include #include #include diff --git a/src/DDocStd/DDocStd_ToolsCommands.cxx b/src/DDocStd/DDocStd_ToolsCommands.cxx index 9d925859c9..4afb2efeeb 100644 --- a/src/DDocStd/DDocStd_ToolsCommands.cxx +++ b/src/DDocStd/DDocStd_ToolsCommands.cxx @@ -18,20 +18,16 @@ #include #include #include -#include #include #include -#include #include #include -#include #include #include #include #include #include #include -#include #include diff --git a/src/DNaming/DNaming.cxx b/src/DNaming/DNaming.cxx index bdfecc94b3..b6a9dce174 100644 --- a/src/DNaming/DNaming.cxx +++ b/src/DNaming/DNaming.cxx @@ -22,7 +22,6 @@ #include #include #include -#include #include #include #include @@ -31,12 +30,8 @@ #include #include #include -#include #include #include -#include -#include -#include #include #include #include @@ -45,31 +40,23 @@ #include #include #include -#include -#include #include #include #include #include #include #include -#include #include #include #include #include -#include #include #include -#include -#include #include #include #include #include -#include #include -#include #include //======================================================================= diff --git a/src/DNaming/DNaming.hxx b/src/DNaming/DNaming.hxx index 2cf2f22fac..d5f01e2568 100644 --- a/src/DNaming/DNaming.hxx +++ b/src/DNaming/DNaming.hxx @@ -23,9 +23,7 @@ #include #include -#include #include -#include #include #include class TDataStd_Real; diff --git a/src/DNaming/DNaming_BasicCommands.cxx b/src/DNaming/DNaming_BasicCommands.cxx index c07759e240..6e5c0d431e 100644 --- a/src/DNaming/DNaming_BasicCommands.cxx +++ b/src/DNaming/DNaming_BasicCommands.cxx @@ -17,45 +17,23 @@ #include #include #include -#include -#include -#include #include #include -#include #include -#include #include #include #include #include #include -#include -#include #include #include -#include -#include -#include #include #include #include #include -#include -#include - -#include -#include -#include -#include -#include -#include - -#include -//#ifdef _MSC_VER + #include -//#endif // POP : first Wrong Declaration : now it is correct // second not used diff --git a/src/DNaming/DNaming_BooleanOperationDriver.cxx b/src/DNaming/DNaming_BooleanOperationDriver.cxx index 3caacfaffd..b5722518f2 100644 --- a/src/DNaming/DNaming_BooleanOperationDriver.cxx +++ b/src/DNaming/DNaming_BooleanOperationDriver.cxx @@ -14,15 +14,12 @@ // commercial license or contractual agreement. -#include #include -#include #include #include #include #include #include -#include #include #include #include @@ -31,11 +28,9 @@ #include #include #include -#include #include #include #include -#include #include #include #include @@ -44,13 +39,10 @@ #include #include #include -#include #include #include -#include #include #include -#include #include IMPLEMENT_STANDARD_RTTIEXT(DNaming_BooleanOperationDriver,TFunction_Driver) diff --git a/src/DNaming/DNaming_BooleanOperationDriver.hxx b/src/DNaming/DNaming_BooleanOperationDriver.hxx index 37ae917de4..e82c073521 100644 --- a/src/DNaming/DNaming_BooleanOperationDriver.hxx +++ b/src/DNaming/DNaming_BooleanOperationDriver.hxx @@ -20,7 +20,6 @@ #include #include -#include #include class TFunction_Logbook; class TDF_Label; diff --git a/src/DNaming/DNaming_BoxDriver.cxx b/src/DNaming/DNaming_BoxDriver.cxx index 9bc6b5cf22..4442562855 100644 --- a/src/DNaming/DNaming_BoxDriver.cxx +++ b/src/DNaming/DNaming_BoxDriver.cxx @@ -19,7 +19,6 @@ #include #include #include -#include #include #include #include diff --git a/src/DNaming/DNaming_BoxDriver.hxx b/src/DNaming/DNaming_BoxDriver.hxx index 4b432110fd..6e348e0fd8 100644 --- a/src/DNaming/DNaming_BoxDriver.hxx +++ b/src/DNaming/DNaming_BoxDriver.hxx @@ -20,7 +20,6 @@ #include #include -#include #include class TFunction_Logbook; class TDF_Label; diff --git a/src/DNaming/DNaming_CylinderDriver.cxx b/src/DNaming/DNaming_CylinderDriver.cxx index 6824f13697..dab14cb540 100644 --- a/src/DNaming/DNaming_CylinderDriver.cxx +++ b/src/DNaming/DNaming_CylinderDriver.cxx @@ -19,11 +19,8 @@ #include #include #include -#include -#include #include #include -#include #include #include #include diff --git a/src/DNaming/DNaming_CylinderDriver.hxx b/src/DNaming/DNaming_CylinderDriver.hxx index c93eae2ee5..11f5650c35 100644 --- a/src/DNaming/DNaming_CylinderDriver.hxx +++ b/src/DNaming/DNaming_CylinderDriver.hxx @@ -20,7 +20,6 @@ #include #include -#include #include class TFunction_Logbook; class TDF_Label; diff --git a/src/DNaming/DNaming_FilletDriver.cxx b/src/DNaming/DNaming_FilletDriver.cxx index dc10b47901..bcc9292cbe 100644 --- a/src/DNaming/DNaming_FilletDriver.cxx +++ b/src/DNaming/DNaming_FilletDriver.cxx @@ -20,7 +20,6 @@ #include #include #include -#include #include #include #include @@ -28,15 +27,12 @@ #include #include #include -#include #include -#include #include #include #include #include #include -#include #include #include #include diff --git a/src/DNaming/DNaming_FilletDriver.hxx b/src/DNaming/DNaming_FilletDriver.hxx index 78a2524efc..f0cdcf8e99 100644 --- a/src/DNaming/DNaming_FilletDriver.hxx +++ b/src/DNaming/DNaming_FilletDriver.hxx @@ -20,7 +20,6 @@ #include #include -#include #include class TFunction_Logbook; class TDF_Label; diff --git a/src/DNaming/DNaming_Line3DDriver.cxx b/src/DNaming/DNaming_Line3DDriver.cxx index 70cfad1050..e86a19c5a1 100644 --- a/src/DNaming/DNaming_Line3DDriver.cxx +++ b/src/DNaming/DNaming_Line3DDriver.cxx @@ -21,28 +21,17 @@ #include #include #include -#include -#include #include -#include -#include #include #include -#include #include -#include #include -#include -#include -#include #include -#include #include #include #include #include #include -#include #include #include #include @@ -51,7 +40,6 @@ #include #include #include -#include IMPLEMENT_STANDARD_RTTIEXT(DNaming_Line3DDriver,TFunction_Driver) diff --git a/src/DNaming/DNaming_Line3DDriver.hxx b/src/DNaming/DNaming_Line3DDriver.hxx index 5092901400..33c9320a21 100644 --- a/src/DNaming/DNaming_Line3DDriver.hxx +++ b/src/DNaming/DNaming_Line3DDriver.hxx @@ -20,7 +20,6 @@ #include #include -#include #include #include class TFunction_Logbook; diff --git a/src/DNaming/DNaming_ModelingCommands.cxx b/src/DNaming/DNaming_ModelingCommands.cxx index a8e442a677..b7f6b081c0 100644 --- a/src/DNaming/DNaming_ModelingCommands.cxx +++ b/src/DNaming/DNaming_ModelingCommands.cxx @@ -15,36 +15,26 @@ #include #include -#include #include #include #include #include -#include #include #include #include #include -#include #include -#include #include #include -#include #include -#include #include -#include #include #include -#include #include #include -#include #include -#include #include #include #include @@ -52,9 +42,7 @@ #include #include #include -#include #include -#include #include #include #include diff --git a/src/DNaming/DNaming_PointDriver.cxx b/src/DNaming/DNaming_PointDriver.cxx index 5c0f954e87..a2b2ac47f5 100644 --- a/src/DNaming/DNaming_PointDriver.cxx +++ b/src/DNaming/DNaming_PointDriver.cxx @@ -20,7 +20,6 @@ #include #include #include -#include #include #include #include diff --git a/src/DNaming/DNaming_PointDriver.hxx b/src/DNaming/DNaming_PointDriver.hxx index e763d68bca..7a901706f2 100644 --- a/src/DNaming/DNaming_PointDriver.hxx +++ b/src/DNaming/DNaming_PointDriver.hxx @@ -20,7 +20,6 @@ #include #include -#include #include class TFunction_Logbook; diff --git a/src/DNaming/DNaming_PrismDriver.cxx b/src/DNaming/DNaming_PrismDriver.cxx index dab5cc46a6..82e22359ee 100644 --- a/src/DNaming/DNaming_PrismDriver.cxx +++ b/src/DNaming/DNaming_PrismDriver.cxx @@ -25,14 +25,10 @@ #include #include #include -#include -#include -#include #include #include #include #include -#include #include #include #include @@ -47,10 +43,7 @@ #include #include #include -#include #include -#include -#include #include IMPLEMENT_STANDARD_RTTIEXT(DNaming_PrismDriver,TFunction_Driver) diff --git a/src/DNaming/DNaming_PrismDriver.hxx b/src/DNaming/DNaming_PrismDriver.hxx index d72e96bb8b..d312e6d4a7 100644 --- a/src/DNaming/DNaming_PrismDriver.hxx +++ b/src/DNaming/DNaming_PrismDriver.hxx @@ -20,7 +20,6 @@ #include #include -#include #include class TFunction_Logbook; class TDF_Label; diff --git a/src/DNaming/DNaming_RevolutionDriver.cxx b/src/DNaming/DNaming_RevolutionDriver.cxx index ed061e825e..4382a61f58 100644 --- a/src/DNaming/DNaming_RevolutionDriver.cxx +++ b/src/DNaming/DNaming_RevolutionDriver.cxx @@ -26,14 +26,9 @@ #include #include #include -#include -#include -#include -#include #include #include #include -#include #include #include #include @@ -49,13 +44,8 @@ #include #include #include -#include #include -#include -#include #include -#include -#include #include IMPLEMENT_STANDARD_RTTIEXT(DNaming_RevolutionDriver,TFunction_Driver) diff --git a/src/DNaming/DNaming_RevolutionDriver.hxx b/src/DNaming/DNaming_RevolutionDriver.hxx index 0299431d8f..b401c8ee00 100644 --- a/src/DNaming/DNaming_RevolutionDriver.hxx +++ b/src/DNaming/DNaming_RevolutionDriver.hxx @@ -20,7 +20,6 @@ #include #include -#include #include class TFunction_Logbook; class TDF_Label; diff --git a/src/DNaming/DNaming_SelectionCommands.cxx b/src/DNaming/DNaming_SelectionCommands.cxx index 22267189a4..288d827501 100644 --- a/src/DNaming/DNaming_SelectionCommands.cxx +++ b/src/DNaming/DNaming_SelectionCommands.cxx @@ -18,34 +18,23 @@ #include -#include -#include -#include #include #include -#include -#include -#include #include -#include #include #include #include #include -#include #include #include #include #include #include #include -#include -#include #include #include #include -#include #include #include #include diff --git a/src/DNaming/DNaming_SelectionDriver.cxx b/src/DNaming/DNaming_SelectionDriver.cxx index ee9e8cab22..71dc6c4cb5 100644 --- a/src/DNaming/DNaming_SelectionDriver.cxx +++ b/src/DNaming/DNaming_SelectionDriver.cxx @@ -19,14 +19,11 @@ #include #include #include -#include #include #include #include -#include #include #include -#include #include IMPLEMENT_STANDARD_RTTIEXT(DNaming_SelectionDriver,TFunction_Driver) @@ -78,11 +75,7 @@ static void Write(const TopoDS_Shape& shape, //======================================================================= #include #include -#include -#include -#include #include -#include Standard_Integer DNaming_SelectionDriver::Execute(Handle(TFunction_Logbook)& theLog) const { diff --git a/src/DNaming/DNaming_SelectionDriver.hxx b/src/DNaming/DNaming_SelectionDriver.hxx index 1b4e40dacd..d4d081bf4c 100644 --- a/src/DNaming/DNaming_SelectionDriver.hxx +++ b/src/DNaming/DNaming_SelectionDriver.hxx @@ -17,10 +17,8 @@ #define _DNaming_SelectionDriver_HeaderFile #include -#include #include -#include #include class TFunction_Logbook; diff --git a/src/DNaming/DNaming_SphereDriver.cxx b/src/DNaming/DNaming_SphereDriver.cxx index 50959ea9d0..4784fce9dd 100644 --- a/src/DNaming/DNaming_SphereDriver.cxx +++ b/src/DNaming/DNaming_SphereDriver.cxx @@ -14,7 +14,6 @@ // commercial license or contractual agreement. -#include #include #include #include @@ -22,7 +21,6 @@ #include #include #include -#include #include #include #include @@ -41,7 +39,6 @@ #include #include #include -#include #include IMPLEMENT_STANDARD_RTTIEXT(DNaming_SphereDriver,TFunction_Driver) diff --git a/src/DNaming/DNaming_SphereDriver.hxx b/src/DNaming/DNaming_SphereDriver.hxx index 169292fc6b..1191599740 100644 --- a/src/DNaming/DNaming_SphereDriver.hxx +++ b/src/DNaming/DNaming_SphereDriver.hxx @@ -20,7 +20,6 @@ #include #include -#include #include class TFunction_Logbook; class TDF_Label; diff --git a/src/DNaming/DNaming_ToolsCommands.cxx b/src/DNaming/DNaming_ToolsCommands.cxx index 2154ea7412..6e3b02b682 100644 --- a/src/DNaming/DNaming_ToolsCommands.cxx +++ b/src/DNaming/DNaming_ToolsCommands.cxx @@ -14,24 +14,15 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -#include -#include #include #include #include -#include -#include #include -#include #include #include -#include #include #include -#include -#include #include -#include #include //======================================================================= //function : DNaming_CheckHasSame diff --git a/src/DNaming/DNaming_TransformationDriver.cxx b/src/DNaming/DNaming_TransformationDriver.cxx index f82e921a54..26e286b58e 100644 --- a/src/DNaming/DNaming_TransformationDriver.cxx +++ b/src/DNaming/DNaming_TransformationDriver.cxx @@ -16,7 +16,6 @@ #include #include -#include #include #include #include @@ -28,29 +27,20 @@ #include #include #include -#include #include #include #include #include #include #include -#include #include -#include -#include #include #include #include -#include #include #include -#include -#include -#include #include #include -#include #include IMPLEMENT_STANDARD_RTTIEXT(DNaming_TransformationDriver,TFunction_Driver) diff --git a/src/DNaming/DNaming_TransformationDriver.hxx b/src/DNaming/DNaming_TransformationDriver.hxx index baa0dafe79..7a25f8ee24 100644 --- a/src/DNaming/DNaming_TransformationDriver.hxx +++ b/src/DNaming/DNaming_TransformationDriver.hxx @@ -20,7 +20,6 @@ #include #include -#include #include class TFunction_Logbook; class TDF_Label; diff --git a/src/DPrsStd/DPrsStd.cxx b/src/DPrsStd/DPrsStd.cxx index 8ec61476cb..beacb61c0c 100644 --- a/src/DPrsStd/DPrsStd.cxx +++ b/src/DPrsStd/DPrsStd.cxx @@ -21,14 +21,8 @@ #include #include #include -#include #include #include -#include -#include -#include -#include -#include //======================================================================= //function : AllComands diff --git a/src/DPrsStd/DPrsStd.hxx b/src/DPrsStd/DPrsStd.hxx index 85fa1e2c33..03746938fb 100644 --- a/src/DPrsStd/DPrsStd.hxx +++ b/src/DPrsStd/DPrsStd.hxx @@ -19,7 +19,6 @@ #include #include -#include #include diff --git a/src/DPrsStd/DPrsStd_AISPresentationCommands.cxx b/src/DPrsStd/DPrsStd_AISPresentationCommands.cxx index 1a4c02f3b0..78c888d6b9 100644 --- a/src/DPrsStd/DPrsStd_AISPresentationCommands.cxx +++ b/src/DPrsStd/DPrsStd_AISPresentationCommands.cxx @@ -15,30 +15,19 @@ // commercial license or contractual agreement. #include -#include #include #include -#include -#include #include #include -#include #include #include -#include - - -#include // for AIS #include #include -#include #include -#include -#include #include #include #include diff --git a/src/DPrsStd/DPrsStd_AISViewerCommands.cxx b/src/DPrsStd/DPrsStd_AISViewerCommands.cxx index 95a8460c42..81c7d8a4c2 100644 --- a/src/DPrsStd/DPrsStd_AISViewerCommands.cxx +++ b/src/DPrsStd/DPrsStd_AISViewerCommands.cxx @@ -16,16 +16,12 @@ #include -#include #include #include -#include #include #include #include #include -#include -#include #include #include #include diff --git a/src/DRAWEXE/DRAWEXE.cxx b/src/DRAWEXE/DRAWEXE.cxx index 401e47d09d..6fe12a0c6b 100644 --- a/src/DRAWEXE/DRAWEXE.cxx +++ b/src/DRAWEXE/DRAWEXE.cxx @@ -18,7 +18,6 @@ #include #include #include -#include #include #include #include diff --git a/src/Draft/Draft_EdgeInfo.cxx b/src/Draft/Draft_EdgeInfo.cxx index 9462679cfd..a7dff89e80 100644 --- a/src/Draft/Draft_EdgeInfo.cxx +++ b/src/Draft/Draft_EdgeInfo.cxx @@ -20,7 +20,6 @@ #include #include #include -#include #include //======================================================================= diff --git a/src/Draft/Draft_EdgeInfo.hxx b/src/Draft/Draft_EdgeInfo.hxx index 84d4ad7dea..35043d5611 100644 --- a/src/Draft/Draft_EdgeInfo.hxx +++ b/src/Draft/Draft_EdgeInfo.hxx @@ -21,10 +21,8 @@ #include #include -#include #include #include -#include class Geom_Curve; class Geom2d_Curve; diff --git a/src/Draft/Draft_FaceInfo.cxx b/src/Draft/Draft_FaceInfo.cxx index 4bb0661e4b..4c7fbe42c7 100644 --- a/src/Draft/Draft_FaceInfo.cxx +++ b/src/Draft/Draft_FaceInfo.cxx @@ -16,10 +16,8 @@ #include -#include #include #include -#include #include //======================================================================= diff --git a/src/Draft/Draft_Modification.cxx b/src/Draft/Draft_Modification.cxx index 81a205a93a..b1574f9194 100644 --- a/src/Draft/Draft_Modification.cxx +++ b/src/Draft/Draft_Modification.cxx @@ -18,8 +18,6 @@ #include #include #include -#include -#include #include #include #include @@ -27,7 +25,6 @@ #include #include #include -#include #include #include #include @@ -46,14 +43,12 @@ #include #include #include -#include #include #include #include #include #include #include -#include IMPLEMENT_STANDARD_RTTIEXT(Draft_Modification,BRepTools_Modification) diff --git a/src/Draft/Draft_Modification.hxx b/src/Draft/Draft_Modification.hxx index 22503205b7..82c5b84082 100644 --- a/src/Draft/Draft_Modification.hxx +++ b/src/Draft/Draft_Modification.hxx @@ -23,14 +23,12 @@ #include #include #include -#include #include #include #include #include #include #include -#include #include #include class gp_Dir; diff --git a/src/Draft/Draft_Modification_1.cxx b/src/Draft/Draft_Modification_1.cxx index b2941a5134..f965a8648e 100644 --- a/src/Draft/Draft_Modification_1.cxx +++ b/src/Draft/Draft_Modification_1.cxx @@ -21,22 +21,15 @@ #include #include #include -#include -#include #include -#include -#include #include #include #include #include -#include #include -#include #include #include #include -#include #include #include #include @@ -56,9 +49,6 @@ #include #include #include -#include -#include -#include #include #include #include @@ -69,9 +59,7 @@ #include #include #include -#include #include -#include #include #include #include @@ -80,14 +68,10 @@ #include #include #include -#include #include #include -#include #include -#include #include -#include #include #include #include @@ -97,8 +81,6 @@ #include #include #include -#include -#include #include static Standard_Boolean Choose(const Draft_IndexedDataMapOfFaceFaceInfo&, diff --git a/src/Draft/Draft_VertexInfo.cxx b/src/Draft/Draft_VertexInfo.cxx index 98cb57af6f..87f2dac252 100644 --- a/src/Draft/Draft_VertexInfo.cxx +++ b/src/Draft/Draft_VertexInfo.cxx @@ -16,9 +16,7 @@ #include -#include #include -#include #include #include #include diff --git a/src/Draft/Draft_VertexInfo.hxx b/src/Draft/Draft_VertexInfo.hxx index 7f7348fd63..7665c05e13 100644 --- a/src/Draft/Draft_VertexInfo.hxx +++ b/src/Draft/Draft_VertexInfo.hxx @@ -22,10 +22,8 @@ #include #include -#include #include #include -#include #include class TopoDS_Edge; diff --git a/src/Draw/Draw.cxx b/src/Draw/Draw.cxx index cb43f83d8e..8bf5fbf036 100644 --- a/src/Draw/Draw.cxx +++ b/src/Draw/Draw.cxx @@ -17,12 +17,10 @@ #include #include -#include #include #include #include #include -#include #include #include #include @@ -34,7 +32,6 @@ #include #include #include -#include #include #include #include diff --git a/src/Draw/Draw_Axis2D.cxx b/src/Draw/Draw_Axis2D.cxx index 27b9af7508..a07098bc1a 100644 --- a/src/Draw/Draw_Axis2D.cxx +++ b/src/Draw/Draw_Axis2D.cxx @@ -18,7 +18,6 @@ #include #include #include -#include #include #include #include diff --git a/src/Draw/Draw_Axis2D.hxx b/src/Draw/Draw_Axis2D.hxx index 1449c0199a..b4952b2258 100644 --- a/src/Draw/Draw_Axis2D.hxx +++ b/src/Draw/Draw_Axis2D.hxx @@ -18,7 +18,6 @@ #define _Draw_Axis2D_HeaderFile #include -#include #include #include diff --git a/src/Draw/Draw_Axis3D.hxx b/src/Draw/Draw_Axis3D.hxx index 59c5d7343f..562ad092ad 100644 --- a/src/Draw/Draw_Axis3D.hxx +++ b/src/Draw/Draw_Axis3D.hxx @@ -18,7 +18,6 @@ #define _Draw_Axis3D_HeaderFile #include -#include #include #include diff --git a/src/Draw/Draw_BasicCommands.cxx b/src/Draw/Draw_BasicCommands.cxx index d8d0bb0c69..9160a871e0 100644 --- a/src/Draw/Draw_BasicCommands.cxx +++ b/src/Draw/Draw_BasicCommands.cxx @@ -19,8 +19,6 @@ #include #include #include -#include -#include #include #include #include diff --git a/src/Draw/Draw_Box.hxx b/src/Draw/Draw_Box.hxx index 2e010183c3..09ab5b4344 100644 --- a/src/Draw/Draw_Box.hxx +++ b/src/Draw/Draw_Box.hxx @@ -18,7 +18,6 @@ #define _Draw_Box_HeaderFile #include -#include #include #include diff --git a/src/Draw/Draw_Chronometer.hxx b/src/Draw/Draw_Chronometer.hxx index 6fffffcde7..25b7275ebe 100644 --- a/src/Draw/Draw_Chronometer.hxx +++ b/src/Draw/Draw_Chronometer.hxx @@ -18,7 +18,6 @@ #define _Draw_Chronometer_HeaderFile #include -#include #include #include diff --git a/src/Draw/Draw_Circle2D.hxx b/src/Draw/Draw_Circle2D.hxx index ae9ba4ce36..ed7cd8d84e 100644 --- a/src/Draw/Draw_Circle2D.hxx +++ b/src/Draw/Draw_Circle2D.hxx @@ -18,7 +18,6 @@ #define _Draw_Circle2D_HeaderFile #include -#include #include #include diff --git a/src/Draw/Draw_Circle3D.hxx b/src/Draw/Draw_Circle3D.hxx index 45c664793d..37fa4d23f0 100644 --- a/src/Draw/Draw_Circle3D.hxx +++ b/src/Draw/Draw_Circle3D.hxx @@ -18,7 +18,6 @@ #define _Draw_Circle3D_HeaderFile #include -#include #include #include diff --git a/src/Draw/Draw_Commands.cxx b/src/Draw/Draw_Commands.cxx index cf291fb080..a96d209ded 100644 --- a/src/Draw/Draw_Commands.cxx +++ b/src/Draw/Draw_Commands.cxx @@ -17,8 +17,6 @@ #include #include -#include -#include void Draw::Commands (Draw_Interpretor& theCommands) { diff --git a/src/Draw/Draw_Display.hxx b/src/Draw/Draw_Display.hxx index 7fe68ac8b9..ad1098cc98 100644 --- a/src/Draw/Draw_Display.hxx +++ b/src/Draw/Draw_Display.hxx @@ -19,13 +19,9 @@ #include #include -#include #include -#include -#include #include -#include class Draw_Color; class gp_Pnt; class gp_Pnt2d; diff --git a/src/Draw/Draw_Drawable2D.hxx b/src/Draw/Draw_Drawable2D.hxx index 6ddab1278d..e8c15acb59 100644 --- a/src/Draw/Draw_Drawable2D.hxx +++ b/src/Draw/Draw_Drawable2D.hxx @@ -21,7 +21,6 @@ #include #include -#include class Draw_Drawable2D; diff --git a/src/Draw/Draw_GraphicCommands.cxx b/src/Draw/Draw_GraphicCommands.cxx index d7b7b1b9cf..6f9cd1ef0b 100644 --- a/src/Draw/Draw_GraphicCommands.cxx +++ b/src/Draw/Draw_GraphicCommands.cxx @@ -27,7 +27,6 @@ #include #include #include -#include #include #ifdef _WIN32 diff --git a/src/Draw/Draw_Grid.hxx b/src/Draw/Draw_Grid.hxx index c7ff66a499..cf3177da37 100644 --- a/src/Draw/Draw_Grid.hxx +++ b/src/Draw/Draw_Grid.hxx @@ -20,8 +20,6 @@ #include #include -#include -#include #include class Draw_Display; diff --git a/src/Draw/Draw_Interpretor.cxx b/src/Draw/Draw_Interpretor.cxx index c797aa471e..4fc5d52dd2 100644 --- a/src/Draw/Draw_Interpretor.cxx +++ b/src/Draw/Draw_Interpretor.cxx @@ -20,11 +20,8 @@ #include #include #include -#include #include -#include #include -#include #include #include #include diff --git a/src/Draw/Draw_Interpretor.hxx b/src/Draw/Draw_Interpretor.hxx index aa707f971d..68e86775c2 100644 --- a/src/Draw/Draw_Interpretor.hxx +++ b/src/Draw/Draw_Interpretor.hxx @@ -23,8 +23,6 @@ #include #include #include -#include -#include #include class TCollection_AsciiString; diff --git a/src/Draw/Draw_Main.cxx b/src/Draw/Draw_Main.cxx index 783742a8d8..ad0c6cc7e4 100644 --- a/src/Draw/Draw_Main.cxx +++ b/src/Draw/Draw_Main.cxx @@ -20,20 +20,13 @@ #include #include -#include #include -#include #include #include #ifdef _WIN32 #include -#include - -#include -#include -#include extern Draw_Viewer dout; diff --git a/src/Draw/Draw_Main.hxx b/src/Draw/Draw_Main.hxx index 2ccb4839f2..714060c855 100644 --- a/src/Draw/Draw_Main.hxx +++ b/src/Draw/Draw_Main.hxx @@ -24,7 +24,6 @@ #ifndef Draw_Main_HeaderFile #define Draw_Main_HeaderFile -#include #include #include diff --git a/src/Draw/Draw_MapOfAsciiString.hxx b/src/Draw/Draw_MapOfAsciiString.hxx index 985e0f5f23..1e8504cbeb 100644 --- a/src/Draw/Draw_MapOfAsciiString.hxx +++ b/src/Draw/Draw_MapOfAsciiString.hxx @@ -17,7 +17,6 @@ #ifndef Draw_MapOfAsciiString_HeaderFile #define Draw_MapOfAsciiString_HeaderFile -#include #include #include diff --git a/src/Draw/Draw_Marker2D.cxx b/src/Draw/Draw_Marker2D.cxx index dd8a0bbe56..3b67fd4fe5 100644 --- a/src/Draw/Draw_Marker2D.cxx +++ b/src/Draw/Draw_Marker2D.cxx @@ -15,7 +15,6 @@ // commercial license or contractual agreement. -#include #include #include #include diff --git a/src/Draw/Draw_Marker2D.hxx b/src/Draw/Draw_Marker2D.hxx index 2aadeb5c94..f02a34513c 100644 --- a/src/Draw/Draw_Marker2D.hxx +++ b/src/Draw/Draw_Marker2D.hxx @@ -18,15 +18,12 @@ #define _Draw_Marker2D_HeaderFile #include -#include #include #include #include #include #include -#include -#include class Draw_Display; diff --git a/src/Draw/Draw_Marker3D.cxx b/src/Draw/Draw_Marker3D.cxx index a72b4ba249..65bebcde61 100644 --- a/src/Draw/Draw_Marker3D.cxx +++ b/src/Draw/Draw_Marker3D.cxx @@ -15,7 +15,6 @@ // commercial license or contractual agreement. -#include #include #include #include diff --git a/src/Draw/Draw_Marker3D.hxx b/src/Draw/Draw_Marker3D.hxx index 26ad1977bc..6bfc2460a1 100644 --- a/src/Draw/Draw_Marker3D.hxx +++ b/src/Draw/Draw_Marker3D.hxx @@ -18,14 +18,11 @@ #define _Draw_Marker3D_HeaderFile #include -#include #include #include #include #include -#include -#include #include class Draw_Display; diff --git a/src/Draw/Draw_MessageCommands.cxx b/src/Draw/Draw_MessageCommands.cxx index 1e30955d30..1d4ac34b1c 100644 --- a/src/Draw/Draw_MessageCommands.cxx +++ b/src/Draw/Draw_MessageCommands.cxx @@ -14,14 +14,11 @@ #include #include -#include -#include #include #include #include #include #include -#include //============================================================================== //function : printerType diff --git a/src/Draw/Draw_PloadCommands.cxx b/src/Draw/Draw_PloadCommands.cxx index e34b9167f9..a4dfc746d8 100644 --- a/src/Draw/Draw_PloadCommands.cxx +++ b/src/Draw/Draw_PloadCommands.cxx @@ -17,8 +17,6 @@ #include #include #include -#include -#include #include #include #include diff --git a/src/Draw/Draw_Segment2D.cxx b/src/Draw/Draw_Segment2D.cxx index 692c89542e..d7624126a1 100644 --- a/src/Draw/Draw_Segment2D.cxx +++ b/src/Draw/Draw_Segment2D.cxx @@ -15,7 +15,6 @@ // commercial license or contractual agreement. -#include #include #include #include diff --git a/src/Draw/Draw_Segment2D.hxx b/src/Draw/Draw_Segment2D.hxx index 38126a662c..95f7794276 100644 --- a/src/Draw/Draw_Segment2D.hxx +++ b/src/Draw/Draw_Segment2D.hxx @@ -18,7 +18,6 @@ #define _Draw_Segment2D_HeaderFile #include -#include #include #include diff --git a/src/Draw/Draw_Segment3D.cxx b/src/Draw/Draw_Segment3D.cxx index 1efa98564c..4094d150df 100644 --- a/src/Draw/Draw_Segment3D.cxx +++ b/src/Draw/Draw_Segment3D.cxx @@ -15,7 +15,6 @@ // commercial license or contractual agreement. -#include #include #include #include diff --git a/src/Draw/Draw_Segment3D.hxx b/src/Draw/Draw_Segment3D.hxx index 15ad8cd83b..70df5d8556 100644 --- a/src/Draw/Draw_Segment3D.hxx +++ b/src/Draw/Draw_Segment3D.hxx @@ -18,7 +18,6 @@ #define _Draw_Segment3D_HeaderFile #include -#include #include #include diff --git a/src/Draw/Draw_Text2D.cxx b/src/Draw/Draw_Text2D.cxx index 125a1c6edd..35753a2bb5 100644 --- a/src/Draw/Draw_Text2D.cxx +++ b/src/Draw/Draw_Text2D.cxx @@ -15,7 +15,6 @@ // commercial license or contractual agreement. -#include #include #include #include diff --git a/src/Draw/Draw_Text2D.hxx b/src/Draw/Draw_Text2D.hxx index 593ad5a2a0..45344680ce 100644 --- a/src/Draw/Draw_Text2D.hxx +++ b/src/Draw/Draw_Text2D.hxx @@ -18,14 +18,12 @@ #define _Draw_Text2D_HeaderFile #include -#include #include #include #include #include #include -#include class Draw_Display; diff --git a/src/Draw/Draw_Text3D.cxx b/src/Draw/Draw_Text3D.cxx index f420a75cbb..69ae0674b3 100644 --- a/src/Draw/Draw_Text3D.cxx +++ b/src/Draw/Draw_Text3D.cxx @@ -15,7 +15,6 @@ // commercial license or contractual agreement. -#include #include #include #include diff --git a/src/Draw/Draw_Text3D.hxx b/src/Draw/Draw_Text3D.hxx index 430534df75..f4528733ef 100644 --- a/src/Draw/Draw_Text3D.hxx +++ b/src/Draw/Draw_Text3D.hxx @@ -18,14 +18,11 @@ #define _Draw_Text3D_HeaderFile #include -#include #include #include #include -#include #include -#include class Draw_Display; diff --git a/src/Draw/Draw_UnitCommands.cxx b/src/Draw/Draw_UnitCommands.cxx index 217f9295cf..119ec3e9df 100644 --- a/src/Draw/Draw_UnitCommands.cxx +++ b/src/Draw/Draw_UnitCommands.cxx @@ -20,8 +20,6 @@ #include #include #include -#include -#include #include #include #include diff --git a/src/Draw/Draw_Viewer.cxx b/src/Draw/Draw_Viewer.cxx index 578729cc8b..283c465823 100644 --- a/src/Draw/Draw_Viewer.cxx +++ b/src/Draw/Draw_Viewer.cxx @@ -21,7 +21,6 @@ #include #include #include -#include #define precpers 0.95 #define ButtonPress 4 diff --git a/src/Draw/Draw_Viewer.hxx b/src/Draw/Draw_Viewer.hxx index e8d409994d..89dbac9ed8 100644 --- a/src/Draw/Draw_Viewer.hxx +++ b/src/Draw/Draw_Viewer.hxx @@ -17,15 +17,8 @@ #ifndef Draw_Viewer_HeaderFile #define Draw_Viewer_HeaderFile -#include -#include -#include -#include -#include -#include #include #include -#include #include #include diff --git a/src/Draw/Draw_Window.hxx b/src/Draw/Draw_Window.hxx index a7c767f04e..8e1f5011a7 100644 --- a/src/Draw/Draw_Window.hxx +++ b/src/Draw/Draw_Window.hxx @@ -23,8 +23,6 @@ #include #include -#include -#include #include #include diff --git a/src/DrawDim/DrawDim.cxx b/src/DrawDim/DrawDim.cxx index 2a426a3595..dcc9b10f2a 100644 --- a/src/DrawDim/DrawDim.cxx +++ b/src/DrawDim/DrawDim.cxx @@ -17,7 +17,6 @@ #include #include -#include #include #include #include @@ -30,7 +29,6 @@ #include #include #include -#include #include #include #include diff --git a/src/DrawDim/DrawDim.hxx b/src/DrawDim/DrawDim.hxx index b4179db1a1..9c4bb498cc 100644 --- a/src/DrawDim/DrawDim.hxx +++ b/src/DrawDim/DrawDim.hxx @@ -21,7 +21,6 @@ #include #include -#include #include #include #include diff --git a/src/DrawDim/DrawDim_Angle.cxx b/src/DrawDim/DrawDim_Angle.cxx index d2b33629dc..0ae02bad0c 100644 --- a/src/DrawDim/DrawDim_Angle.cxx +++ b/src/DrawDim/DrawDim_Angle.cxx @@ -16,7 +16,6 @@ #include -#include #include #include #include diff --git a/src/DrawDim/DrawDim_Dimension.cxx b/src/DrawDim/DrawDim_Dimension.cxx index fb145da483..3d4f51c250 100644 --- a/src/DrawDim/DrawDim_Dimension.cxx +++ b/src/DrawDim/DrawDim_Dimension.cxx @@ -15,9 +15,7 @@ // commercial license or contractual agreement. -#include #include -#include #include #include #include diff --git a/src/DrawDim/DrawDim_Dimension.hxx b/src/DrawDim/DrawDim_Dimension.hxx index 84c034448e..8f29c0a933 100644 --- a/src/DrawDim/DrawDim_Dimension.hxx +++ b/src/DrawDim/DrawDim_Dimension.hxx @@ -18,10 +18,7 @@ #define _DrawDim_Dimension_HeaderFile #include -#include -#include -#include #include #include class gp_Pnt; diff --git a/src/DrawDim/DrawDim_Distance.cxx b/src/DrawDim/DrawDim_Distance.cxx index fa459d35ae..8873154fb6 100644 --- a/src/DrawDim/DrawDim_Distance.cxx +++ b/src/DrawDim/DrawDim_Distance.cxx @@ -21,18 +21,13 @@ #include #include #include -#include -#include #include #include -#include #include -#include #include #include #include #include -#include IMPLEMENT_STANDARD_RTTIEXT(DrawDim_Distance,DrawDim_Dimension) diff --git a/src/DrawDim/DrawDim_PlanarAngle.cxx b/src/DrawDim/DrawDim_PlanarAngle.cxx index d88a18689b..6b7e06e48f 100644 --- a/src/DrawDim/DrawDim_PlanarAngle.cxx +++ b/src/DrawDim/DrawDim_PlanarAngle.cxx @@ -16,15 +16,12 @@ #include -#include #include #include #include -#include #include #include #include -#include #include #include #include @@ -36,20 +33,14 @@ #include #include #include -#include -#include #include #include #include #include #include -#include #include -#include -#include #include #include -#include #include #include diff --git a/src/DrawDim/DrawDim_PlanarAngle.hxx b/src/DrawDim/DrawDim_PlanarAngle.hxx index b03cafe6fd..92c4609eed 100644 --- a/src/DrawDim/DrawDim_PlanarAngle.hxx +++ b/src/DrawDim/DrawDim_PlanarAngle.hxx @@ -21,8 +21,6 @@ #include #include -#include -#include #include class TopoDS_Face; class Draw_Display; diff --git a/src/DrawDim/DrawDim_PlanarDiameter.cxx b/src/DrawDim/DrawDim_PlanarDiameter.cxx index a623c3343a..1a862a4079 100644 --- a/src/DrawDim/DrawDim_PlanarDiameter.cxx +++ b/src/DrawDim/DrawDim_PlanarDiameter.cxx @@ -16,7 +16,6 @@ #include -#include #include #include #include @@ -25,7 +24,6 @@ #include #include #include -#include #include #include #include diff --git a/src/DrawDim/DrawDim_PlanarDiameter.hxx b/src/DrawDim/DrawDim_PlanarDiameter.hxx index ad1e6d0cb5..33ffe9f466 100644 --- a/src/DrawDim/DrawDim_PlanarDiameter.hxx +++ b/src/DrawDim/DrawDim_PlanarDiameter.hxx @@ -20,7 +20,6 @@ #include #include -#include #include class TopoDS_Face; class Draw_Display; diff --git a/src/DrawDim/DrawDim_PlanarDimension.cxx b/src/DrawDim/DrawDim_PlanarDimension.cxx index 167262ab5b..9a5b3a5139 100644 --- a/src/DrawDim/DrawDim_PlanarDimension.cxx +++ b/src/DrawDim/DrawDim_PlanarDimension.cxx @@ -17,7 +17,6 @@ #include #include -#include #include #include diff --git a/src/DrawDim/DrawDim_PlanarDimension.hxx b/src/DrawDim/DrawDim_PlanarDimension.hxx index 9ec7aa3606..17b14a50fe 100644 --- a/src/DrawDim/DrawDim_PlanarDimension.hxx +++ b/src/DrawDim/DrawDim_PlanarDimension.hxx @@ -18,7 +18,6 @@ #define _DrawDim_PlanarDimension_HeaderFile #include -#include #include #include diff --git a/src/DrawDim/DrawDim_PlanarDimensionCommands.cxx b/src/DrawDim/DrawDim_PlanarDimensionCommands.cxx index a18884c3b1..154d511b1f 100644 --- a/src/DrawDim/DrawDim_PlanarDimensionCommands.cxx +++ b/src/DrawDim/DrawDim_PlanarDimensionCommands.cxx @@ -20,32 +20,23 @@ #include #include -#include -#include #include #include #include #include #include -#include #include #include #include -#include #include #include #include #include #include #include -#include #include #include -#ifdef _MSC_VER -#include -#endif - //======================================================================= //function : DrawDim_DISTANCE //purpose : diff --git a/src/DrawDim/DrawDim_PlanarDistance.hxx b/src/DrawDim/DrawDim_PlanarDistance.hxx index 050495429b..808fcaa95b 100644 --- a/src/DrawDim/DrawDim_PlanarDistance.hxx +++ b/src/DrawDim/DrawDim_PlanarDistance.hxx @@ -20,7 +20,6 @@ #include #include -#include #include class TopoDS_Face; class Draw_Display; diff --git a/src/DrawDim/DrawDim_PlanarRadius.cxx b/src/DrawDim/DrawDim_PlanarRadius.cxx index d27f176d42..819fa71ab5 100644 --- a/src/DrawDim/DrawDim_PlanarRadius.cxx +++ b/src/DrawDim/DrawDim_PlanarRadius.cxx @@ -16,17 +16,14 @@ #include -#include #include #include #include -#include #include #include #include #include #include -#include #include #include #include diff --git a/src/DrawDim/DrawDim_PlanarRadius.hxx b/src/DrawDim/DrawDim_PlanarRadius.hxx index f16d9b95ef..34ab8c963b 100644 --- a/src/DrawDim/DrawDim_PlanarRadius.hxx +++ b/src/DrawDim/DrawDim_PlanarRadius.hxx @@ -20,7 +20,6 @@ #include #include -#include #include class TopoDS_Face; class Draw_Display; diff --git a/src/DrawFairCurve/DrawFairCurve_Batten.cxx b/src/DrawFairCurve/DrawFairCurve_Batten.cxx index 2083c68d6a..afa2771afa 100644 --- a/src/DrawFairCurve/DrawFairCurve_Batten.cxx +++ b/src/DrawFairCurve/DrawFairCurve_Batten.cxx @@ -16,7 +16,6 @@ #include -#include #include #include #include diff --git a/src/DrawFairCurve/DrawFairCurve_Batten.hxx b/src/DrawFairCurve/DrawFairCurve_Batten.hxx index 35f268fd2a..47157efcdf 100644 --- a/src/DrawFairCurve/DrawFairCurve_Batten.hxx +++ b/src/DrawFairCurve/DrawFairCurve_Batten.hxx @@ -18,7 +18,6 @@ #define _DrawFairCurve_Batten_HeaderFile #include -#include #include #include diff --git a/src/DrawFairCurve/DrawFairCurve_MinimalVariation.cxx b/src/DrawFairCurve/DrawFairCurve_MinimalVariation.cxx index 69e228eff4..fe23fd9e24 100644 --- a/src/DrawFairCurve/DrawFairCurve_MinimalVariation.cxx +++ b/src/DrawFairCurve/DrawFairCurve_MinimalVariation.cxx @@ -13,7 +13,6 @@ // commercial license or contractual agreement. -#include #include #include #include diff --git a/src/DrawFairCurve/DrawFairCurve_MinimalVariation.hxx b/src/DrawFairCurve/DrawFairCurve_MinimalVariation.hxx index 4bb77f6f1c..9a7ee32804 100644 --- a/src/DrawFairCurve/DrawFairCurve_MinimalVariation.hxx +++ b/src/DrawFairCurve/DrawFairCurve_MinimalVariation.hxx @@ -18,7 +18,6 @@ #define _DrawFairCurve_MinimalVariation_HeaderFile #include -#include #include #include diff --git a/src/DrawTrSurf/DrawTrSurf.cxx b/src/DrawTrSurf/DrawTrSurf.cxx index fc629b2e59..cfe5cbdbf7 100644 --- a/src/DrawTrSurf/DrawTrSurf.cxx +++ b/src/DrawTrSurf/DrawTrSurf.cxx @@ -46,14 +46,11 @@ #include #include #include -#include -#include #include #include #include #include #include -#include #include #include #include diff --git a/src/DrawTrSurf/DrawTrSurf_Curve.cxx b/src/DrawTrSurf/DrawTrSurf_Curve.cxx index 3a97655454..826e875ccc 100644 --- a/src/DrawTrSurf/DrawTrSurf_Curve.cxx +++ b/src/DrawTrSurf/DrawTrSurf_Curve.cxx @@ -16,7 +16,6 @@ #include #include -#include #include #include #include diff --git a/src/DrawTrSurf/DrawTrSurf_Curve2d.cxx b/src/DrawTrSurf/DrawTrSurf_Curve2d.cxx index af427ff03b..520426b73b 100644 --- a/src/DrawTrSurf/DrawTrSurf_Curve2d.cxx +++ b/src/DrawTrSurf/DrawTrSurf_Curve2d.cxx @@ -22,8 +22,6 @@ #include #include #include -#include -#include #include #include #include diff --git a/src/DrawTrSurf/DrawTrSurf_Debug.cxx b/src/DrawTrSurf/DrawTrSurf_Debug.cxx index ab1bf497f9..1daa12d677 100644 --- a/src/DrawTrSurf/DrawTrSurf_Debug.cxx +++ b/src/DrawTrSurf/DrawTrSurf_Debug.cxx @@ -18,7 +18,6 @@ #include #include #include -#include #include #include #include diff --git a/src/DrawTrSurf/DrawTrSurf_Drawable.cxx b/src/DrawTrSurf/DrawTrSurf_Drawable.cxx index fa16a78f09..180d0d3ed6 100644 --- a/src/DrawTrSurf/DrawTrSurf_Drawable.cxx +++ b/src/DrawTrSurf/DrawTrSurf_Drawable.cxx @@ -16,13 +16,12 @@ #include -#include #include #include #include #include -#include #include +#include #include #include #include diff --git a/src/DrawTrSurf/DrawTrSurf_Triangulation.cxx b/src/DrawTrSurf/DrawTrSurf_Triangulation.cxx index 52d4ec45f5..87885b04c8 100644 --- a/src/DrawTrSurf/DrawTrSurf_Triangulation.cxx +++ b/src/DrawTrSurf/DrawTrSurf_Triangulation.cxx @@ -18,9 +18,7 @@ #include #include -#include #include -#include #include #include #include diff --git a/src/DrawTrSurf/DrawTrSurf_Triangulation2D.cxx b/src/DrawTrSurf/DrawTrSurf_Triangulation2D.cxx index cb92ecfcd9..0fe1b7ea17 100644 --- a/src/DrawTrSurf/DrawTrSurf_Triangulation2D.cxx +++ b/src/DrawTrSurf/DrawTrSurf_Triangulation2D.cxx @@ -17,16 +17,12 @@ #include #include -#include #include -#include #include -#include #include #include #include #include -#include #include IMPLEMENT_STANDARD_RTTIEXT(DrawTrSurf_Triangulation2D,Draw_Drawable2D) diff --git a/src/DrawTrSurf/DrawTrSurf_Triangulation2D.hxx b/src/DrawTrSurf/DrawTrSurf_Triangulation2D.hxx index 561213acfe..f66522654e 100644 --- a/src/DrawTrSurf/DrawTrSurf_Triangulation2D.hxx +++ b/src/DrawTrSurf/DrawTrSurf_Triangulation2D.hxx @@ -18,7 +18,6 @@ #define _DrawTrSurf_Triangulation2D_HeaderFile #include -#include #include #include diff --git a/src/DsgPrs/DsgPrs.cxx b/src/DsgPrs/DsgPrs.cxx index ee8b6b451b..63f4e5494e 100644 --- a/src/DsgPrs/DsgPrs.cxx +++ b/src/DsgPrs/DsgPrs.cxx @@ -14,14 +14,12 @@ #include -#include #include #include #include #include #include #include -#include #include #include #include @@ -38,22 +36,19 @@ #include #include #include -#include #include #include #include #include -#include -#include void DsgPrs::ComputeSymbol (const Handle(Prs3d_Presentation)& aPresentation, - const Handle(Prs3d_DimensionAspect)& LA, - const gp_Pnt& pt1, - const gp_Pnt& pt2, - const gp_Dir& dir1, - const gp_Dir& dir2, - const DsgPrs_ArrowSide ArrowSide, - const Standard_Boolean drawFromCenter) + const Handle(Prs3d_DimensionAspect)& LA, + const gp_Pnt& pt1, + const gp_Pnt& pt2, + const gp_Dir& dir1, + const gp_Dir& dir2, + const DsgPrs_ArrowSide ArrowSide, + const Standard_Boolean drawFromCenter) { Handle(Graphic3d_Group) aGroup = aPresentation->NewGroup(); diff --git a/src/DsgPrs/DsgPrs.hxx b/src/DsgPrs/DsgPrs.hxx index 0d8dc44f32..12000abd6c 100644 --- a/src/DsgPrs/DsgPrs.hxx +++ b/src/DsgPrs/DsgPrs.hxx @@ -18,8 +18,6 @@ #define _DsgPrs_HeaderFile #include -#include -#include #include #include #include diff --git a/src/DsgPrs/DsgPrs_AnglePresentation.cxx b/src/DsgPrs/DsgPrs_AnglePresentation.cxx index 3d2e0dd8aa..1a8729bf6c 100644 --- a/src/DsgPrs/DsgPrs_AnglePresentation.cxx +++ b/src/DsgPrs/DsgPrs_AnglePresentation.cxx @@ -20,21 +20,15 @@ #include #include #include -#include #include #include #include #include -#include #include #include -#include -#include -#include #include #include #include -#include #include #include #include diff --git a/src/DsgPrs/DsgPrs_AnglePresentation.hxx b/src/DsgPrs/DsgPrs_AnglePresentation.hxx index aeb4d2c5d1..f24538b1a6 100644 --- a/src/DsgPrs/DsgPrs_AnglePresentation.hxx +++ b/src/DsgPrs/DsgPrs_AnglePresentation.hxx @@ -19,12 +19,10 @@ #include #include -#include #include #include #include -#include #include class TCollection_ExtendedString; diff --git a/src/DsgPrs/DsgPrs_Chamf2dPresentation.cxx b/src/DsgPrs/DsgPrs_Chamf2dPresentation.cxx index 884540cd48..5599235485 100644 --- a/src/DsgPrs/DsgPrs_Chamf2dPresentation.cxx +++ b/src/DsgPrs/DsgPrs_Chamf2dPresentation.cxx @@ -19,10 +19,8 @@ #include #include #include -#include #include #include -#include #include #include #include diff --git a/src/DsgPrs/DsgPrs_ConcentricPresentation.hxx b/src/DsgPrs/DsgPrs_ConcentricPresentation.hxx index 893a56852f..1781a6f235 100644 --- a/src/DsgPrs/DsgPrs_ConcentricPresentation.hxx +++ b/src/DsgPrs/DsgPrs_ConcentricPresentation.hxx @@ -19,7 +19,6 @@ #include #include -#include #include #include diff --git a/src/DsgPrs/DsgPrs_DatumPrs.cxx b/src/DsgPrs/DsgPrs_DatumPrs.cxx index c3aefbf702..d40aee4ea3 100644 --- a/src/DsgPrs/DsgPrs_DatumPrs.cxx +++ b/src/DsgPrs/DsgPrs_DatumPrs.cxx @@ -17,10 +17,6 @@ #include #include #include -#include -#include -#include -#include #include #include #include diff --git a/src/DsgPrs/DsgPrs_DatumPrs.hxx b/src/DsgPrs/DsgPrs_DatumPrs.hxx index d5c154ce69..7b07d3afd1 100644 --- a/src/DsgPrs/DsgPrs_DatumPrs.hxx +++ b/src/DsgPrs/DsgPrs_DatumPrs.hxx @@ -14,7 +14,6 @@ #ifndef DsgPrs_DatumPrs_HeaderFile #define DsgPrs_DatumPrs_HeaderFile -#include #include #include #include diff --git a/src/DsgPrs/DsgPrs_DiameterPresentation.cxx b/src/DsgPrs/DsgPrs_DiameterPresentation.cxx index ce6a1ca575..d6312314b2 100644 --- a/src/DsgPrs/DsgPrs_DiameterPresentation.cxx +++ b/src/DsgPrs/DsgPrs_DiameterPresentation.cxx @@ -22,17 +22,12 @@ #include #include #include -#include -#include -#include #include #include -#include #include #include #include #include -#include #include //========================================================================== diff --git a/src/DsgPrs/DsgPrs_DiameterPresentation.hxx b/src/DsgPrs/DsgPrs_DiameterPresentation.hxx index 5cd24f3400..831e8cfb9f 100644 --- a/src/DsgPrs/DsgPrs_DiameterPresentation.hxx +++ b/src/DsgPrs/DsgPrs_DiameterPresentation.hxx @@ -19,7 +19,6 @@ #include #include -#include #include #include diff --git a/src/DsgPrs/DsgPrs_EllipseRadiusPresentation.cxx b/src/DsgPrs/DsgPrs_EllipseRadiusPresentation.cxx index 8267a21809..85a49ceb81 100644 --- a/src/DsgPrs/DsgPrs_EllipseRadiusPresentation.cxx +++ b/src/DsgPrs/DsgPrs_EllipseRadiusPresentation.cxx @@ -19,27 +19,18 @@ #include #include #include -#include #include -#include -#include #include #include -#include #include #include -#include -#include -#include #include #include #include -#include #include #include #include #include -#include #include //======================================================================= diff --git a/src/DsgPrs/DsgPrs_EllipseRadiusPresentation.hxx b/src/DsgPrs/DsgPrs_EllipseRadiusPresentation.hxx index bcd3cb15ce..9d63935afd 100644 --- a/src/DsgPrs/DsgPrs_EllipseRadiusPresentation.hxx +++ b/src/DsgPrs/DsgPrs_EllipseRadiusPresentation.hxx @@ -19,7 +19,6 @@ #include #include -#include #include #include diff --git a/src/DsgPrs/DsgPrs_FilletRadiusPresentation.cxx b/src/DsgPrs/DsgPrs_FilletRadiusPresentation.cxx index 19c260c761..2627f61395 100644 --- a/src/DsgPrs/DsgPrs_FilletRadiusPresentation.cxx +++ b/src/DsgPrs/DsgPrs_FilletRadiusPresentation.cxx @@ -19,25 +19,16 @@ #include #include #include -#include #include -#include #include -#include #include #include -#include -#include -#include #include -#include #include -#include #include #include #include #include -#include #include #include diff --git a/src/DsgPrs/DsgPrs_FilletRadiusPresentation.hxx b/src/DsgPrs/DsgPrs_FilletRadiusPresentation.hxx index e7ed0b6456..068308fe92 100644 --- a/src/DsgPrs/DsgPrs_FilletRadiusPresentation.hxx +++ b/src/DsgPrs/DsgPrs_FilletRadiusPresentation.hxx @@ -19,7 +19,6 @@ #include #include -#include #include #include diff --git a/src/DsgPrs/DsgPrs_FixPresentation.hxx b/src/DsgPrs/DsgPrs_FixPresentation.hxx index 09a5772515..67f82bb73c 100644 --- a/src/DsgPrs/DsgPrs_FixPresentation.hxx +++ b/src/DsgPrs/DsgPrs_FixPresentation.hxx @@ -19,7 +19,6 @@ #include #include -#include #include #include diff --git a/src/DsgPrs/DsgPrs_IdenticPresentation.cxx b/src/DsgPrs/DsgPrs_IdenticPresentation.cxx index a71850ce0a..c5401b1945 100644 --- a/src/DsgPrs/DsgPrs_IdenticPresentation.cxx +++ b/src/DsgPrs/DsgPrs_IdenticPresentation.cxx @@ -33,7 +33,6 @@ #include #include #include -#include #include void DsgPrs_IdenticPresentation::Add( const Handle(Prs3d_Presentation)& aPresentation, diff --git a/src/DsgPrs/DsgPrs_IdenticPresentation.hxx b/src/DsgPrs/DsgPrs_IdenticPresentation.hxx index b407744960..87966fabc0 100644 --- a/src/DsgPrs/DsgPrs_IdenticPresentation.hxx +++ b/src/DsgPrs/DsgPrs_IdenticPresentation.hxx @@ -19,7 +19,6 @@ #include #include -#include #include #include diff --git a/src/DsgPrs/DsgPrs_LengthPresentation.cxx b/src/DsgPrs/DsgPrs_LengthPresentation.cxx index 933e8ba0c5..09e43f7c20 100644 --- a/src/DsgPrs/DsgPrs_LengthPresentation.cxx +++ b/src/DsgPrs/DsgPrs_LengthPresentation.cxx @@ -17,25 +17,19 @@ #include #include #include -#include #include #include #include #include #include #include -#include -#include -#include #include #include #include -#include #include #include #include #include -#include #include void DsgPrs_LengthPresentation::Add (const Handle(Prs3d_Presentation)& aPresentation, diff --git a/src/DsgPrs/DsgPrs_LengthPresentation.hxx b/src/DsgPrs/DsgPrs_LengthPresentation.hxx index 0af13a36e8..8aa94ba10a 100644 --- a/src/DsgPrs/DsgPrs_LengthPresentation.hxx +++ b/src/DsgPrs/DsgPrs_LengthPresentation.hxx @@ -19,7 +19,6 @@ #include #include -#include #include #include diff --git a/src/DsgPrs/DsgPrs_MidPointPresentation.cxx b/src/DsgPrs/DsgPrs_MidPointPresentation.cxx index cd98ec0610..7a8ae0a929 100644 --- a/src/DsgPrs/DsgPrs_MidPointPresentation.cxx +++ b/src/DsgPrs/DsgPrs_MidPointPresentation.cxx @@ -16,17 +16,12 @@ #include #include -#include #include #include -#include #include -#include #include -#include #include #include -#include #include #include #include diff --git a/src/DsgPrs/DsgPrs_MidPointPresentation.hxx b/src/DsgPrs/DsgPrs_MidPointPresentation.hxx index c12af42d88..30e9dd5258 100644 --- a/src/DsgPrs/DsgPrs_MidPointPresentation.hxx +++ b/src/DsgPrs/DsgPrs_MidPointPresentation.hxx @@ -18,7 +18,6 @@ #include #include -#include #include #include diff --git a/src/DsgPrs/DsgPrs_OffsetPresentation.cxx b/src/DsgPrs/DsgPrs_OffsetPresentation.cxx index 22a8c2cd26..54f2a276c3 100644 --- a/src/DsgPrs/DsgPrs_OffsetPresentation.cxx +++ b/src/DsgPrs/DsgPrs_OffsetPresentation.cxx @@ -22,18 +22,15 @@ #include #include #include -#include #include #include #include #include #include -#include #include #include #include #include -#include #include void DsgPrs_OffsetPresentation::Add (const Handle(Prs3d_Presentation)& aPresentation, diff --git a/src/DsgPrs/DsgPrs_OffsetPresentation.hxx b/src/DsgPrs/DsgPrs_OffsetPresentation.hxx index 1ff83b6bb5..ea614a7ac5 100644 --- a/src/DsgPrs/DsgPrs_OffsetPresentation.hxx +++ b/src/DsgPrs/DsgPrs_OffsetPresentation.hxx @@ -19,7 +19,6 @@ #include #include -#include #include #include diff --git a/src/DsgPrs/DsgPrs_ParalPresentation.cxx b/src/DsgPrs/DsgPrs_ParalPresentation.cxx index 83e3b3c7ae..1ca368be20 100644 --- a/src/DsgPrs/DsgPrs_ParalPresentation.cxx +++ b/src/DsgPrs/DsgPrs_ParalPresentation.cxx @@ -22,16 +22,12 @@ #include #include #include -#include -#include #include #include -#include #include #include #include #include -#include #include void DsgPrs_ParalPresentation::Add (const Handle(Prs3d_Presentation)& aPresentation, diff --git a/src/DsgPrs/DsgPrs_PerpenPresentation.cxx b/src/DsgPrs/DsgPrs_PerpenPresentation.cxx index be1028ff2d..f2e3fc7236 100644 --- a/src/DsgPrs/DsgPrs_PerpenPresentation.cxx +++ b/src/DsgPrs/DsgPrs_PerpenPresentation.cxx @@ -18,35 +18,24 @@ #include #include #include -#include -#include -#include -#include #include #include -#include -#include #include #include -#include #include #include -#include #include #include -#include -#include -#include void DsgPrs_PerpenPresentation::Add (const Handle(Prs3d_Presentation)& aPresentation, - const Handle(Prs3d_Drawer)& aDrawer, - const gp_Pnt& pAx1, - const gp_Pnt& pAx2, - const gp_Pnt& pnt1, - const gp_Pnt& pnt2, - const gp_Pnt& OffsetPoint, - const Standard_Boolean intOut1, - const Standard_Boolean intOut2) + const Handle(Prs3d_Drawer)& aDrawer, + const gp_Pnt& pAx1, + const gp_Pnt& pAx2, + const gp_Pnt& pnt1, + const gp_Pnt& pnt2, + const gp_Pnt& OffsetPoint, + const Standard_Boolean intOut1, + const Standard_Boolean intOut2) { Handle(Prs3d_DimensionAspect) LA = aDrawer->DimensionAspect(); LA->LineAspect()->SetTypeOfLine(Aspect_TOL_SOLID); // ou DOT ou DOTDASH diff --git a/src/DsgPrs/DsgPrs_PerpenPresentation.hxx b/src/DsgPrs/DsgPrs_PerpenPresentation.hxx index 799363c437..d4e5614a0f 100644 --- a/src/DsgPrs/DsgPrs_PerpenPresentation.hxx +++ b/src/DsgPrs/DsgPrs_PerpenPresentation.hxx @@ -19,7 +19,6 @@ #include #include -#include #include #include diff --git a/src/DsgPrs/DsgPrs_RadiusPresentation.cxx b/src/DsgPrs/DsgPrs_RadiusPresentation.cxx index b16d0da39c..12296892a4 100644 --- a/src/DsgPrs/DsgPrs_RadiusPresentation.cxx +++ b/src/DsgPrs/DsgPrs_RadiusPresentation.cxx @@ -19,18 +19,12 @@ #include #include #include -#include #include #include #include #include -#include -#include -#include #include -#include #include -#include #include #include #include diff --git a/src/DsgPrs/DsgPrs_RadiusPresentation.hxx b/src/DsgPrs/DsgPrs_RadiusPresentation.hxx index 15afa61f59..8fbefc5d9c 100644 --- a/src/DsgPrs/DsgPrs_RadiusPresentation.hxx +++ b/src/DsgPrs/DsgPrs_RadiusPresentation.hxx @@ -19,7 +19,6 @@ #include #include -#include #include #include diff --git a/src/DsgPrs/DsgPrs_ShadedPlanePresentation.cxx b/src/DsgPrs/DsgPrs_ShadedPlanePresentation.cxx index 73c8971459..4a6a90533a 100644 --- a/src/DsgPrs/DsgPrs_ShadedPlanePresentation.cxx +++ b/src/DsgPrs/DsgPrs_ShadedPlanePresentation.cxx @@ -19,7 +19,6 @@ #include #include #include -#include #include #include #include diff --git a/src/DsgPrs/DsgPrs_ShadedPlanePresentation.hxx b/src/DsgPrs/DsgPrs_ShadedPlanePresentation.hxx index 1e94db7a55..69596372b7 100644 --- a/src/DsgPrs/DsgPrs_ShadedPlanePresentation.hxx +++ b/src/DsgPrs/DsgPrs_ShadedPlanePresentation.hxx @@ -19,7 +19,6 @@ #include #include -#include #include #include diff --git a/src/DsgPrs/DsgPrs_ShapeDirPresentation.cxx b/src/DsgPrs/DsgPrs_ShapeDirPresentation.cxx index 2e8988ba1f..60071354e9 100644 --- a/src/DsgPrs/DsgPrs_ShapeDirPresentation.cxx +++ b/src/DsgPrs/DsgPrs_ShapeDirPresentation.cxx @@ -18,7 +18,6 @@ #include #include #include -#include #include #include #include @@ -29,7 +28,6 @@ #include #include #include -#include #include #include #include diff --git a/src/DsgPrs/DsgPrs_SymbPresentation.cxx b/src/DsgPrs/DsgPrs_SymbPresentation.cxx index 39b42cc6bb..07a353007c 100644 --- a/src/DsgPrs/DsgPrs_SymbPresentation.cxx +++ b/src/DsgPrs/DsgPrs_SymbPresentation.cxx @@ -15,18 +15,15 @@ // commercial license or contractual agreement. -#include #include #include #include #include #include -#include #include #include #include #include -#include #include void DsgPrs_SymbPresentation::Add (const Handle(Prs3d_Presentation)& aPresentation, diff --git a/src/DsgPrs/DsgPrs_SymbPresentation.hxx b/src/DsgPrs/DsgPrs_SymbPresentation.hxx index 34a3d2475a..bd0f540cd1 100644 --- a/src/DsgPrs/DsgPrs_SymbPresentation.hxx +++ b/src/DsgPrs/DsgPrs_SymbPresentation.hxx @@ -19,7 +19,6 @@ #include #include -#include #include #include diff --git a/src/DsgPrs/DsgPrs_SymmetricPresentation.cxx b/src/DsgPrs/DsgPrs_SymmetricPresentation.cxx index 5c1d860895..d8d699143c 100644 --- a/src/DsgPrs/DsgPrs_SymmetricPresentation.cxx +++ b/src/DsgPrs/DsgPrs_SymmetricPresentation.cxx @@ -17,34 +17,24 @@ #include #include -#include #include -#include -#include -#include -#include #include #include #include #include #include #include -#include #include #include #include -#include #include #include #include -#include #include #include -#include #include #include #include -#include //=================================================================== //Function:Add diff --git a/src/DsgPrs/DsgPrs_SymmetricPresentation.hxx b/src/DsgPrs/DsgPrs_SymmetricPresentation.hxx index 854ec89372..10425ea57f 100644 --- a/src/DsgPrs/DsgPrs_SymmetricPresentation.hxx +++ b/src/DsgPrs/DsgPrs_SymmetricPresentation.hxx @@ -19,7 +19,6 @@ #include #include -#include #include #include diff --git a/src/DsgPrs/DsgPrs_TangentPresentation.cxx b/src/DsgPrs/DsgPrs_TangentPresentation.cxx index c3d6bbad6f..2c52fba3fe 100644 --- a/src/DsgPrs/DsgPrs_TangentPresentation.cxx +++ b/src/DsgPrs/DsgPrs_TangentPresentation.cxx @@ -20,14 +20,10 @@ #include #include #include -#include -#include #include #include -#include #include #include -#include #include #include diff --git a/src/DsgPrs/DsgPrs_TangentPresentation.hxx b/src/DsgPrs/DsgPrs_TangentPresentation.hxx index 99067d3361..00c534dcab 100644 --- a/src/DsgPrs/DsgPrs_TangentPresentation.hxx +++ b/src/DsgPrs/DsgPrs_TangentPresentation.hxx @@ -19,7 +19,6 @@ #include #include -#include #include #include diff --git a/src/DsgPrs/DsgPrs_XYZAxisPresentation.cxx b/src/DsgPrs/DsgPrs_XYZAxisPresentation.cxx index fd0b03c9ff..5c994c17a3 100644 --- a/src/DsgPrs/DsgPrs_XYZAxisPresentation.cxx +++ b/src/DsgPrs/DsgPrs_XYZAxisPresentation.cxx @@ -18,7 +18,6 @@ #include #include #include -#include #include #include #include diff --git a/src/DsgPrs/DsgPrs_XYZAxisPresentation.hxx b/src/DsgPrs/DsgPrs_XYZAxisPresentation.hxx index b1f3b580c6..a554b04c5d 100644 --- a/src/DsgPrs/DsgPrs_XYZAxisPresentation.hxx +++ b/src/DsgPrs/DsgPrs_XYZAxisPresentation.hxx @@ -21,7 +21,6 @@ #include #include -#include #include class Prs3d_LineAspect; diff --git a/src/DsgPrs/DsgPrs_XYZPlanePresentation.cxx b/src/DsgPrs/DsgPrs_XYZPlanePresentation.cxx index 74f48370c4..ae7d72fd5d 100644 --- a/src/DsgPrs/DsgPrs_XYZPlanePresentation.cxx +++ b/src/DsgPrs/DsgPrs_XYZPlanePresentation.cxx @@ -19,7 +19,6 @@ #include #include #include -#include #include #include diff --git a/src/DsgPrs/DsgPrs_XYZPlanePresentation.hxx b/src/DsgPrs/DsgPrs_XYZPlanePresentation.hxx index 8becdd159c..a647eda8de 100644 --- a/src/DsgPrs/DsgPrs_XYZPlanePresentation.hxx +++ b/src/DsgPrs/DsgPrs_XYZPlanePresentation.hxx @@ -19,7 +19,6 @@ #include #include -#include #include #include diff --git a/src/ElCLib/ElCLib.hxx b/src/ElCLib/ElCLib.hxx index 8c527b4ee7..426ad590d1 100644 --- a/src/ElCLib/ElCLib.hxx +++ b/src/ElCLib/ElCLib.hxx @@ -21,9 +21,7 @@ #include #include -#include #include -#include #include #include #include diff --git a/src/ElSLib/ElSLib.cxx b/src/ElSLib/ElSLib.cxx index 86d7f591f5..3b61b31408 100644 --- a/src/ElSLib/ElSLib.cxx +++ b/src/ElSLib/ElSLib.cxx @@ -26,13 +26,8 @@ #include #include #include -#include -#include #include -#include #include -#include -#include #include #include #include diff --git a/src/ElSLib/ElSLib.hxx b/src/ElSLib/ElSLib.hxx index a5a91f467f..389cfb38ba 100644 --- a/src/ElSLib/ElSLib.hxx +++ b/src/ElSLib/ElSLib.hxx @@ -21,9 +21,7 @@ #include #include -#include #include -#include #include class gp_Pnt; class gp_Pln; diff --git a/src/Expr/Expr.cxx b/src/Expr/Expr.cxx index d7f6a38c44..7ddb8b80b0 100644 --- a/src/Expr/Expr.cxx +++ b/src/Expr/Expr.cxx @@ -15,7 +15,6 @@ // commercial license or contractual agreement. #include -#include #include #include #include diff --git a/src/Expr/Expr_Absolute.cxx b/src/Expr/Expr_Absolute.cxx index 5eb3dbc0ed..de9bf3e656 100644 --- a/src/Expr/Expr_Absolute.cxx +++ b/src/Expr/Expr_Absolute.cxx @@ -19,13 +19,10 @@ #include #include #include -#include -#include #include #include #include #include -#include #include #include diff --git a/src/Expr/Expr_Absolute.hxx b/src/Expr/Expr_Absolute.hxx index 37e02d5ccb..2f80648265 100644 --- a/src/Expr/Expr_Absolute.hxx +++ b/src/Expr/Expr_Absolute.hxx @@ -18,11 +18,8 @@ #define _Expr_Absolute_HeaderFile #include -#include #include -#include -#include #include #include class Expr_GeneralExpression; diff --git a/src/Expr/Expr_ArcCosine.cxx b/src/Expr/Expr_ArcCosine.cxx index 761d54e7d8..0c8b7d7726 100644 --- a/src/Expr/Expr_ArcCosine.cxx +++ b/src/Expr/Expr_ArcCosine.cxx @@ -18,18 +18,13 @@ #include #include #include -#include -#include #include #include -#include -#include #include #include #include #include #include -#include #include #include diff --git a/src/Expr/Expr_ArcCosine.hxx b/src/Expr/Expr_ArcCosine.hxx index 66eaa81ca3..3e9caa6de2 100644 --- a/src/Expr/Expr_ArcCosine.hxx +++ b/src/Expr/Expr_ArcCosine.hxx @@ -18,11 +18,8 @@ #define _Expr_ArcCosine_HeaderFile #include -#include #include -#include -#include #include #include class Expr_GeneralExpression; diff --git a/src/Expr/Expr_ArcSine.cxx b/src/Expr/Expr_ArcSine.cxx index 3f015d3869..6f93d871f5 100644 --- a/src/Expr/Expr_ArcSine.cxx +++ b/src/Expr/Expr_ArcSine.cxx @@ -17,17 +17,12 @@ #include #include -#include -#include #include #include -#include -#include #include #include #include #include -#include #include #include diff --git a/src/Expr/Expr_ArcSine.hxx b/src/Expr/Expr_ArcSine.hxx index 2c561b647e..cb87cff94c 100644 --- a/src/Expr/Expr_ArcSine.hxx +++ b/src/Expr/Expr_ArcSine.hxx @@ -18,11 +18,8 @@ #define _Expr_ArcSine_HeaderFile #include -#include #include -#include -#include #include #include class Expr_GeneralExpression; diff --git a/src/Expr/Expr_ArcTangent.cxx b/src/Expr/Expr_ArcTangent.cxx index 5ac38e040a..149f5385a8 100644 --- a/src/Expr/Expr_ArcTangent.cxx +++ b/src/Expr/Expr_ArcTangent.cxx @@ -17,16 +17,12 @@ #include #include -#include #include #include -#include -#include #include #include #include #include -#include #include #include diff --git a/src/Expr/Expr_ArcTangent.hxx b/src/Expr/Expr_ArcTangent.hxx index b0e3ec33a2..b983d269b2 100644 --- a/src/Expr/Expr_ArcTangent.hxx +++ b/src/Expr/Expr_ArcTangent.hxx @@ -18,11 +18,8 @@ #define _Expr_ArcTangent_HeaderFile #include -#include #include -#include -#include #include #include class Expr_GeneralExpression; diff --git a/src/Expr/Expr_ArgCosh.cxx b/src/Expr/Expr_ArgCosh.cxx index ecf8cb5db5..48d6192e24 100644 --- a/src/Expr/Expr_ArgCosh.cxx +++ b/src/Expr/Expr_ArgCosh.cxx @@ -18,16 +18,11 @@ #include #include #include -#include -#include #include #include -#include -#include #include #include #include -#include #include #include diff --git a/src/Expr/Expr_ArgCosh.hxx b/src/Expr/Expr_ArgCosh.hxx index a2b8d76e1c..04563a7dc4 100644 --- a/src/Expr/Expr_ArgCosh.hxx +++ b/src/Expr/Expr_ArgCosh.hxx @@ -18,11 +18,8 @@ #define _Expr_ArgCosh_HeaderFile #include -#include #include -#include -#include #include #include class Expr_GeneralExpression; diff --git a/src/Expr/Expr_ArgSinh.cxx b/src/Expr/Expr_ArgSinh.cxx index 7f0c991553..67d1600815 100644 --- a/src/Expr/Expr_ArgSinh.cxx +++ b/src/Expr/Expr_ArgSinh.cxx @@ -17,17 +17,13 @@ #include #include -#include #include #include -#include -#include #include #include #include #include #include -#include #include #include diff --git a/src/Expr/Expr_ArgSinh.hxx b/src/Expr/Expr_ArgSinh.hxx index f97b081a99..04e9a00745 100644 --- a/src/Expr/Expr_ArgSinh.hxx +++ b/src/Expr/Expr_ArgSinh.hxx @@ -18,11 +18,8 @@ #define _Expr_ArgSinh_HeaderFile #include -#include #include -#include -#include #include #include class Expr_GeneralExpression; diff --git a/src/Expr/Expr_ArgTanh.cxx b/src/Expr/Expr_ArgTanh.cxx index 0889483df1..ffe5e1fd3b 100644 --- a/src/Expr/Expr_ArgTanh.cxx +++ b/src/Expr/Expr_ArgTanh.cxx @@ -17,16 +17,11 @@ #include #include -#include -#include #include #include -#include -#include #include #include #include -#include #include #include diff --git a/src/Expr/Expr_ArgTanh.hxx b/src/Expr/Expr_ArgTanh.hxx index 490f2245da..45e45dc10f 100644 --- a/src/Expr/Expr_ArgTanh.hxx +++ b/src/Expr/Expr_ArgTanh.hxx @@ -18,11 +18,8 @@ #define _Expr_ArgTanh_HeaderFile #include -#include #include -#include -#include #include #include class Expr_GeneralExpression; diff --git a/src/Expr/Expr_BinaryExpression.cxx b/src/Expr/Expr_BinaryExpression.cxx index 43083e8971..037e6c22de 100644 --- a/src/Expr/Expr_BinaryExpression.cxx +++ b/src/Expr/Expr_BinaryExpression.cxx @@ -19,7 +19,6 @@ #include #include #include -#include #include #include diff --git a/src/Expr/Expr_BinaryExpression.hxx b/src/Expr/Expr_BinaryExpression.hxx index 017065d84a..3522cba9de 100644 --- a/src/Expr/Expr_BinaryExpression.hxx +++ b/src/Expr/Expr_BinaryExpression.hxx @@ -22,7 +22,6 @@ #include #include -#include class Expr_NamedUnknown; diff --git a/src/Expr/Expr_BinaryFunction.cxx b/src/Expr/Expr_BinaryFunction.cxx index 1557944ca8..222836d94b 100644 --- a/src/Expr/Expr_BinaryFunction.cxx +++ b/src/Expr/Expr_BinaryFunction.cxx @@ -24,17 +24,12 @@ #include #include #include -#include #include #include #include #include -#include -#include #include -#include #include -#include #include #include diff --git a/src/Expr/Expr_BinaryFunction.hxx b/src/Expr/Expr_BinaryFunction.hxx index 32ebf062be..d2d021159a 100644 --- a/src/Expr/Expr_BinaryFunction.hxx +++ b/src/Expr/Expr_BinaryFunction.hxx @@ -21,8 +21,6 @@ #include #include -#include -#include #include #include class Expr_GeneralFunction; diff --git a/src/Expr/Expr_Cosh.cxx b/src/Expr/Expr_Cosh.cxx index 68f97981e8..32b9637202 100644 --- a/src/Expr/Expr_Cosh.cxx +++ b/src/Expr/Expr_Cosh.cxx @@ -20,12 +20,9 @@ #include #include #include -#include -#include #include #include #include -#include #include #include diff --git a/src/Expr/Expr_Cosh.hxx b/src/Expr/Expr_Cosh.hxx index aa0413e01e..b501fb0797 100644 --- a/src/Expr/Expr_Cosh.hxx +++ b/src/Expr/Expr_Cosh.hxx @@ -21,8 +21,6 @@ #include #include -#include -#include #include #include class Expr_GeneralExpression; diff --git a/src/Expr/Expr_Cosine.cxx b/src/Expr/Expr_Cosine.cxx index 79f595f63c..6f3e25af0d 100644 --- a/src/Expr/Expr_Cosine.cxx +++ b/src/Expr/Expr_Cosine.cxx @@ -20,13 +20,10 @@ #include #include #include -#include -#include #include #include #include #include -#include #include #include diff --git a/src/Expr/Expr_Cosine.hxx b/src/Expr/Expr_Cosine.hxx index 63b8166535..7122685310 100644 --- a/src/Expr/Expr_Cosine.hxx +++ b/src/Expr/Expr_Cosine.hxx @@ -21,8 +21,6 @@ #include #include -#include -#include #include #include class Expr_GeneralExpression; diff --git a/src/Expr/Expr_Difference.cxx b/src/Expr/Expr_Difference.cxx index a4bd9bf4cf..a694f1afd9 100644 --- a/src/Expr/Expr_Difference.cxx +++ b/src/Expr/Expr_Difference.cxx @@ -19,12 +19,9 @@ #include #include #include -#include -#include #include #include #include -#include #include #include #include diff --git a/src/Expr/Expr_Difference.hxx b/src/Expr/Expr_Difference.hxx index 527ce3c4ed..696462f5af 100644 --- a/src/Expr/Expr_Difference.hxx +++ b/src/Expr/Expr_Difference.hxx @@ -18,12 +18,9 @@ #define _Expr_Difference_HeaderFile #include -#include #include -#include #include -#include #include #include class Expr_GeneralExpression; diff --git a/src/Expr/Expr_Different.cxx b/src/Expr/Expr_Different.cxx index a2b370577f..c021f6dd5d 100644 --- a/src/Expr/Expr_Different.cxx +++ b/src/Expr/Expr_Different.cxx @@ -19,7 +19,6 @@ #include #include #include -#include #include #include diff --git a/src/Expr/Expr_Different.hxx b/src/Expr/Expr_Different.hxx index cb27fb4bd3..773ac42da1 100644 --- a/src/Expr/Expr_Different.hxx +++ b/src/Expr/Expr_Different.hxx @@ -18,10 +18,8 @@ #define _Expr_Different_HeaderFile #include -#include #include -#include class Expr_GeneralExpression; class Expr_GeneralRelation; class TCollection_AsciiString; diff --git a/src/Expr/Expr_Division.cxx b/src/Expr/Expr_Division.cxx index 8e910b5509..bc9f1a9d6b 100644 --- a/src/Expr/Expr_Division.cxx +++ b/src/Expr/Expr_Division.cxx @@ -20,13 +20,9 @@ #include #include #include -#include -#include #include #include #include -#include -#include #include #include diff --git a/src/Expr/Expr_Division.hxx b/src/Expr/Expr_Division.hxx index 3604bc6d29..46e3055f79 100644 --- a/src/Expr/Expr_Division.hxx +++ b/src/Expr/Expr_Division.hxx @@ -21,8 +21,6 @@ #include #include -#include -#include #include #include class Expr_GeneralExpression; diff --git a/src/Expr/Expr_Equal.cxx b/src/Expr/Expr_Equal.cxx index 63bfed4e5f..3cbaeaf7d8 100644 --- a/src/Expr/Expr_Equal.cxx +++ b/src/Expr/Expr_Equal.cxx @@ -19,7 +19,6 @@ #include #include #include -#include #include #include diff --git a/src/Expr/Expr_Equal.hxx b/src/Expr/Expr_Equal.hxx index 42b7f14531..c9a909d6da 100644 --- a/src/Expr/Expr_Equal.hxx +++ b/src/Expr/Expr_Equal.hxx @@ -18,10 +18,8 @@ #define _Expr_Equal_HeaderFile #include -#include #include -#include class Expr_GeneralExpression; class Expr_GeneralRelation; class TCollection_AsciiString; diff --git a/src/Expr/Expr_Exponential.cxx b/src/Expr/Expr_Exponential.cxx index 461609e52d..c7bc113c2f 100644 --- a/src/Expr/Expr_Exponential.cxx +++ b/src/Expr/Expr_Exponential.cxx @@ -20,11 +20,8 @@ #include #include #include -#include -#include #include #include -#include #include #include diff --git a/src/Expr/Expr_Exponential.hxx b/src/Expr/Expr_Exponential.hxx index 2011b2f9c8..4b1bcfd783 100644 --- a/src/Expr/Expr_Exponential.hxx +++ b/src/Expr/Expr_Exponential.hxx @@ -18,11 +18,8 @@ #define _Expr_Exponential_HeaderFile #include -#include #include -#include -#include #include #include class Expr_GeneralExpression; diff --git a/src/Expr/Expr_Exponentiate.cxx b/src/Expr/Expr_Exponentiate.cxx index 18854cb3d0..391aae76b0 100644 --- a/src/Expr/Expr_Exponentiate.cxx +++ b/src/Expr/Expr_Exponentiate.cxx @@ -21,13 +21,10 @@ #include #include #include -#include -#include #include #include #include #include -#include #include #include diff --git a/src/Expr/Expr_Exponentiate.hxx b/src/Expr/Expr_Exponentiate.hxx index ae29b4d937..ef63bd52a4 100644 --- a/src/Expr/Expr_Exponentiate.hxx +++ b/src/Expr/Expr_Exponentiate.hxx @@ -21,8 +21,6 @@ #include #include -#include -#include #include #include class Expr_GeneralExpression; diff --git a/src/Expr/Expr_FunctionDerivative.cxx b/src/Expr/Expr_FunctionDerivative.cxx index 86f28e7d28..93c8fa3d1b 100644 --- a/src/Expr/Expr_FunctionDerivative.cxx +++ b/src/Expr/Expr_FunctionDerivative.cxx @@ -16,15 +16,10 @@ #include -#include #include #include #include -#include #include -#include -#include -#include #include #include #include diff --git a/src/Expr/Expr_FunctionDerivative.hxx b/src/Expr/Expr_FunctionDerivative.hxx index 9aaeb76f73..c0f6586f5e 100644 --- a/src/Expr/Expr_FunctionDerivative.hxx +++ b/src/Expr/Expr_FunctionDerivative.hxx @@ -25,7 +25,6 @@ #include #include #include -#include class Expr_GeneralExpression; class Expr_NamedUnknown; class TCollection_AsciiString; diff --git a/src/Expr/Expr_GeneralExpression.cxx b/src/Expr/Expr_GeneralExpression.cxx index a3e52c44fc..f20eb3f486 100644 --- a/src/Expr/Expr_GeneralExpression.cxx +++ b/src/Expr/Expr_GeneralExpression.cxx @@ -16,10 +16,8 @@ #include -#include #include #include -#include #include #include #include diff --git a/src/Expr/Expr_GeneralExpression.hxx b/src/Expr/Expr_GeneralExpression.hxx index 6858a41544..8b3938782e 100644 --- a/src/Expr/Expr_GeneralExpression.hxx +++ b/src/Expr/Expr_GeneralExpression.hxx @@ -22,7 +22,6 @@ #include #include -#include #include #include #include diff --git a/src/Expr/Expr_GeneralFunction.cxx b/src/Expr/Expr_GeneralFunction.cxx index c16fb28c20..a142136b67 100644 --- a/src/Expr/Expr_GeneralFunction.cxx +++ b/src/Expr/Expr_GeneralFunction.cxx @@ -17,10 +17,6 @@ #include #include -#include -#include -#include -#include #include #include diff --git a/src/Expr/Expr_GeneralFunction.hxx b/src/Expr/Expr_GeneralFunction.hxx index 3b662fe838..9d7b362e70 100644 --- a/src/Expr/Expr_GeneralFunction.hxx +++ b/src/Expr/Expr_GeneralFunction.hxx @@ -25,7 +25,6 @@ #include #include #include -#include class Expr_NamedUnknown; class TCollection_AsciiString; diff --git a/src/Expr/Expr_GeneralRelation.cxx b/src/Expr/Expr_GeneralRelation.cxx index bace868bfd..c182e90300 100644 --- a/src/Expr/Expr_GeneralRelation.cxx +++ b/src/Expr/Expr_GeneralRelation.cxx @@ -15,11 +15,8 @@ // commercial license or contractual agreement. -#include #include #include -#include -#include #include #include diff --git a/src/Expr/Expr_GeneralRelation.hxx b/src/Expr/Expr_GeneralRelation.hxx index 401e437e33..ca1edc87ac 100644 --- a/src/Expr/Expr_GeneralRelation.hxx +++ b/src/Expr/Expr_GeneralRelation.hxx @@ -21,7 +21,6 @@ #include #include -#include #include class Expr_GeneralExpression; class Expr_NamedUnknown; diff --git a/src/Expr/Expr_GreaterThan.cxx b/src/Expr/Expr_GreaterThan.cxx index b1d8efba88..81c52affc2 100644 --- a/src/Expr/Expr_GreaterThan.cxx +++ b/src/Expr/Expr_GreaterThan.cxx @@ -17,10 +17,8 @@ #include #include -#include #include #include -#include #include #include diff --git a/src/Expr/Expr_GreaterThan.hxx b/src/Expr/Expr_GreaterThan.hxx index 43b3caf87f..6f34785acb 100644 --- a/src/Expr/Expr_GreaterThan.hxx +++ b/src/Expr/Expr_GreaterThan.hxx @@ -21,7 +21,6 @@ #include #include -#include class Expr_GeneralExpression; class Expr_GeneralRelation; class TCollection_AsciiString; diff --git a/src/Expr/Expr_GreaterThanOrEqual.cxx b/src/Expr/Expr_GreaterThanOrEqual.cxx index 3f2e526d60..04a640ecf6 100644 --- a/src/Expr/Expr_GreaterThanOrEqual.cxx +++ b/src/Expr/Expr_GreaterThanOrEqual.cxx @@ -17,10 +17,8 @@ #include #include -#include #include #include -#include #include #include diff --git a/src/Expr/Expr_GreaterThanOrEqual.hxx b/src/Expr/Expr_GreaterThanOrEqual.hxx index 7744899afa..caf4e7b467 100644 --- a/src/Expr/Expr_GreaterThanOrEqual.hxx +++ b/src/Expr/Expr_GreaterThanOrEqual.hxx @@ -21,7 +21,6 @@ #include #include -#include class Expr_GeneralExpression; class Expr_GeneralRelation; class TCollection_AsciiString; diff --git a/src/Expr/Expr_LessThan.cxx b/src/Expr/Expr_LessThan.cxx index b160478a10..f299551548 100644 --- a/src/Expr/Expr_LessThan.cxx +++ b/src/Expr/Expr_LessThan.cxx @@ -17,10 +17,8 @@ #include #include -#include #include #include -#include #include #include diff --git a/src/Expr/Expr_LessThan.hxx b/src/Expr/Expr_LessThan.hxx index 1ec66e6f6e..6a923563f0 100644 --- a/src/Expr/Expr_LessThan.hxx +++ b/src/Expr/Expr_LessThan.hxx @@ -21,7 +21,6 @@ #include #include -#include class Expr_GeneralExpression; class Expr_GeneralRelation; class TCollection_AsciiString; diff --git a/src/Expr/Expr_LessThanOrEqual.cxx b/src/Expr/Expr_LessThanOrEqual.cxx index f97379e63f..08c7fd6ad5 100644 --- a/src/Expr/Expr_LessThanOrEqual.cxx +++ b/src/Expr/Expr_LessThanOrEqual.cxx @@ -17,10 +17,8 @@ #include #include -#include #include #include -#include #include #include diff --git a/src/Expr/Expr_LessThanOrEqual.hxx b/src/Expr/Expr_LessThanOrEqual.hxx index 40aefff65c..8a42e7cefc 100644 --- a/src/Expr/Expr_LessThanOrEqual.hxx +++ b/src/Expr/Expr_LessThanOrEqual.hxx @@ -21,7 +21,6 @@ #include #include -#include class Expr_GeneralExpression; class Expr_GeneralRelation; class TCollection_AsciiString; diff --git a/src/Expr/Expr_LogOf10.cxx b/src/Expr/Expr_LogOf10.cxx index 31c7e13419..b469d4c2f6 100644 --- a/src/Expr/Expr_LogOf10.cxx +++ b/src/Expr/Expr_LogOf10.cxx @@ -20,11 +20,8 @@ #include #include #include -#include -#include #include #include -#include #include #include diff --git a/src/Expr/Expr_LogOf10.hxx b/src/Expr/Expr_LogOf10.hxx index 8c743890be..2d399afd61 100644 --- a/src/Expr/Expr_LogOf10.hxx +++ b/src/Expr/Expr_LogOf10.hxx @@ -21,8 +21,6 @@ #include #include -#include -#include #include #include class Expr_GeneralExpression; diff --git a/src/Expr/Expr_LogOfe.cxx b/src/Expr/Expr_LogOfe.cxx index 9595728ff9..1668a3fc52 100644 --- a/src/Expr/Expr_LogOfe.cxx +++ b/src/Expr/Expr_LogOfe.cxx @@ -21,10 +21,7 @@ #include #include #include -#include -#include #include -#include #include #include diff --git a/src/Expr/Expr_LogOfe.hxx b/src/Expr/Expr_LogOfe.hxx index b98e18defd..ae9880662a 100644 --- a/src/Expr/Expr_LogOfe.hxx +++ b/src/Expr/Expr_LogOfe.hxx @@ -21,8 +21,6 @@ #include #include -#include -#include #include #include class Expr_GeneralExpression; diff --git a/src/Expr/Expr_NamedConstant.hxx b/src/Expr/Expr_NamedConstant.hxx index f3d32a87cc..4fa5cf1c38 100644 --- a/src/Expr/Expr_NamedConstant.hxx +++ b/src/Expr/Expr_NamedConstant.hxx @@ -20,10 +20,8 @@ #include #include -#include #include #include -#include #include #include class TCollection_AsciiString; diff --git a/src/Expr/Expr_NamedExpression.cxx b/src/Expr/Expr_NamedExpression.cxx index 4731c0f52e..7cb228e5b4 100644 --- a/src/Expr/Expr_NamedExpression.cxx +++ b/src/Expr/Expr_NamedExpression.cxx @@ -15,7 +15,6 @@ // commercial license or contractual agreement. -#include #include #include #include diff --git a/src/Expr/Expr_NamedExpression.hxx b/src/Expr/Expr_NamedExpression.hxx index b6beb67f03..04493898d3 100644 --- a/src/Expr/Expr_NamedExpression.hxx +++ b/src/Expr/Expr_NamedExpression.hxx @@ -18,11 +18,9 @@ #define _Expr_NamedExpression_HeaderFile #include -#include #include #include -#include class Expr_NamedExpression; diff --git a/src/Expr/Expr_NamedFunction.cxx b/src/Expr/Expr_NamedFunction.cxx index 78562607ba..4520d90fd2 100644 --- a/src/Expr/Expr_NamedFunction.cxx +++ b/src/Expr/Expr_NamedFunction.cxx @@ -17,15 +17,10 @@ #include #include -#include #include -#include #include #include -#include #include -#include -#include #include #include #include diff --git a/src/Expr/Expr_NamedFunction.hxx b/src/Expr/Expr_NamedFunction.hxx index 9c5090ec74..d1c6fb8b71 100644 --- a/src/Expr/Expr_NamedFunction.hxx +++ b/src/Expr/Expr_NamedFunction.hxx @@ -24,9 +24,7 @@ #include #include #include -#include #include -#include class Expr_GeneralExpression; class Expr_NamedUnknown; diff --git a/src/Expr/Expr_NamedUnknown.cxx b/src/Expr/Expr_NamedUnknown.cxx index 3aef079ef6..355cd35742 100644 --- a/src/Expr/Expr_NamedUnknown.cxx +++ b/src/Expr/Expr_NamedUnknown.cxx @@ -23,7 +23,6 @@ #include #include #include -#include #include #include #include diff --git a/src/Expr/Expr_NamedUnknown.hxx b/src/Expr/Expr_NamedUnknown.hxx index b112b24e53..aae3e7cce3 100644 --- a/src/Expr/Expr_NamedUnknown.hxx +++ b/src/Expr/Expr_NamedUnknown.hxx @@ -21,9 +21,7 @@ #include #include -#include #include -#include #include #include class Expr_GeneralExpression; diff --git a/src/Expr/Expr_NumericValue.hxx b/src/Expr/Expr_NumericValue.hxx index fc987494ab..e77fb1a88d 100644 --- a/src/Expr/Expr_NumericValue.hxx +++ b/src/Expr/Expr_NumericValue.hxx @@ -20,10 +20,8 @@ #include #include -#include #include #include -#include #include #include class Expr_NamedUnknown; diff --git a/src/Expr/Expr_PolyExpression.cxx b/src/Expr/Expr_PolyExpression.cxx index 3bd37ec993..96fd1d7e9c 100644 --- a/src/Expr/Expr_PolyExpression.cxx +++ b/src/Expr/Expr_PolyExpression.cxx @@ -15,13 +15,10 @@ // commercial license or contractual agreement. -#include #include #include #include #include -#include -#include #include IMPLEMENT_STANDARD_RTTIEXT(Expr_PolyExpression,Expr_GeneralExpression) diff --git a/src/Expr/Expr_PolyExpression.hxx b/src/Expr/Expr_PolyExpression.hxx index faeb02ce42..56e2c1b1d8 100644 --- a/src/Expr/Expr_PolyExpression.hxx +++ b/src/Expr/Expr_PolyExpression.hxx @@ -23,7 +23,6 @@ #include #include #include -#include class Expr_NamedUnknown; diff --git a/src/Expr/Expr_PolyFunction.cxx b/src/Expr/Expr_PolyFunction.cxx index 61f1544a8a..68fc1f996d 100644 --- a/src/Expr/Expr_PolyFunction.cxx +++ b/src/Expr/Expr_PolyFunction.cxx @@ -23,18 +23,13 @@ #include #include #include -#include #include #include #include -#include #include #include #include #include -#include -#include -#include #include #include diff --git a/src/Expr/Expr_PolyFunction.hxx b/src/Expr/Expr_PolyFunction.hxx index 294c43168c..4691d52094 100644 --- a/src/Expr/Expr_PolyFunction.hxx +++ b/src/Expr/Expr_PolyFunction.hxx @@ -22,8 +22,6 @@ #include #include -#include -#include #include #include class Expr_GeneralFunction; diff --git a/src/Expr/Expr_Product.cxx b/src/Expr/Expr_Product.cxx index 38f4acd02e..547c79e0b9 100644 --- a/src/Expr/Expr_Product.cxx +++ b/src/Expr/Expr_Product.cxx @@ -23,13 +23,9 @@ #include #include #include -#include -#include #include #include #include -#include -#include #include #include #include diff --git a/src/Expr/Expr_Product.hxx b/src/Expr/Expr_Product.hxx index fea3645e4f..54718cd502 100644 --- a/src/Expr/Expr_Product.hxx +++ b/src/Expr/Expr_Product.hxx @@ -22,8 +22,6 @@ #include #include -#include -#include #include #include class Expr_GeneralExpression; diff --git a/src/Expr/Expr_RUIterator.cxx b/src/Expr/Expr_RUIterator.cxx index a8df5a1c09..36b1d3eed7 100644 --- a/src/Expr/Expr_RUIterator.cxx +++ b/src/Expr/Expr_RUIterator.cxx @@ -16,14 +16,11 @@ #include -#include -#include #include #include #include #include #include -#include Expr_RUIterator::Expr_RUIterator (const Handle(Expr_GeneralRelation)& rel) { diff --git a/src/Expr/Expr_RUIterator.hxx b/src/Expr/Expr_RUIterator.hxx index def5eb7663..77d3c00354 100644 --- a/src/Expr/Expr_RUIterator.hxx +++ b/src/Expr/Expr_RUIterator.hxx @@ -23,7 +23,6 @@ #include #include -#include class Expr_GeneralRelation; class Expr_NamedUnknown; diff --git a/src/Expr/Expr_RelationIterator.cxx b/src/Expr/Expr_RelationIterator.cxx index 28eb3ed49c..a2b1e08b9a 100644 --- a/src/Expr/Expr_RelationIterator.cxx +++ b/src/Expr/Expr_RelationIterator.cxx @@ -15,7 +15,6 @@ // commercial license or contractual agreement. -#include #include #include #include diff --git a/src/Expr/Expr_Sign.cxx b/src/Expr/Expr_Sign.cxx index 2f18b9b868..a2c54a6382 100644 --- a/src/Expr/Expr_Sign.cxx +++ b/src/Expr/Expr_Sign.cxx @@ -18,10 +18,8 @@ #include #include #include -#include #include #include -#include #include #include diff --git a/src/Expr/Expr_Sign.hxx b/src/Expr/Expr_Sign.hxx index 4e7bec12ff..ba4ec62c4a 100644 --- a/src/Expr/Expr_Sign.hxx +++ b/src/Expr/Expr_Sign.hxx @@ -21,8 +21,6 @@ #include #include -#include -#include #include #include class Expr_GeneralExpression; diff --git a/src/Expr/Expr_Sine.cxx b/src/Expr/Expr_Sine.cxx index c05d550304..9cb6fd5073 100644 --- a/src/Expr/Expr_Sine.cxx +++ b/src/Expr/Expr_Sine.cxx @@ -20,12 +20,9 @@ #include #include #include -#include -#include #include #include #include -#include #include #include diff --git a/src/Expr/Expr_Sine.hxx b/src/Expr/Expr_Sine.hxx index 9d8dbe040a..8cc060e744 100644 --- a/src/Expr/Expr_Sine.hxx +++ b/src/Expr/Expr_Sine.hxx @@ -21,8 +21,6 @@ #include #include -#include -#include #include #include class Expr_GeneralExpression; diff --git a/src/Expr/Expr_SingleRelation.cxx b/src/Expr/Expr_SingleRelation.cxx index 7690959249..d1ccfe22a8 100644 --- a/src/Expr/Expr_SingleRelation.cxx +++ b/src/Expr/Expr_SingleRelation.cxx @@ -15,8 +15,6 @@ // commercial license or contractual agreement. -#include -#include #include #include #include diff --git a/src/Expr/Expr_SingleRelation.hxx b/src/Expr/Expr_SingleRelation.hxx index 4bd31cdf30..6669fc539d 100644 --- a/src/Expr/Expr_SingleRelation.hxx +++ b/src/Expr/Expr_SingleRelation.hxx @@ -21,7 +21,6 @@ #include #include -#include #include class Expr_GeneralExpression; class Expr_NamedUnknown; diff --git a/src/Expr/Expr_Sinh.cxx b/src/Expr/Expr_Sinh.cxx index 0e72534e92..b2ad1b33c3 100644 --- a/src/Expr/Expr_Sinh.cxx +++ b/src/Expr/Expr_Sinh.cxx @@ -20,12 +20,9 @@ #include #include #include -#include -#include #include #include #include -#include #include #include diff --git a/src/Expr/Expr_Sinh.hxx b/src/Expr/Expr_Sinh.hxx index b7ee9a4326..8d066dea16 100644 --- a/src/Expr/Expr_Sinh.hxx +++ b/src/Expr/Expr_Sinh.hxx @@ -21,8 +21,6 @@ #include #include -#include -#include #include #include class Expr_GeneralExpression; diff --git a/src/Expr/Expr_Square.cxx b/src/Expr/Expr_Square.cxx index 5a8e136a95..260e08ec1c 100644 --- a/src/Expr/Expr_Square.cxx +++ b/src/Expr/Expr_Square.cxx @@ -19,14 +19,11 @@ #include #include #include -#include -#include #include #include #include #include #include -#include #include #include diff --git a/src/Expr/Expr_Square.hxx b/src/Expr/Expr_Square.hxx index eedd5d1ea0..7585f81753 100644 --- a/src/Expr/Expr_Square.hxx +++ b/src/Expr/Expr_Square.hxx @@ -21,8 +21,6 @@ #include #include -#include -#include #include #include class Expr_GeneralExpression; diff --git a/src/Expr/Expr_SquareRoot.cxx b/src/Expr/Expr_SquareRoot.cxx index d99d65d155..24e5ad560a 100644 --- a/src/Expr/Expr_SquareRoot.cxx +++ b/src/Expr/Expr_SquareRoot.cxx @@ -19,13 +19,10 @@ #include #include #include -#include -#include #include #include #include #include -#include #include #include diff --git a/src/Expr/Expr_SquareRoot.hxx b/src/Expr/Expr_SquareRoot.hxx index 6c3ad7f613..3bf4e404be 100644 --- a/src/Expr/Expr_SquareRoot.hxx +++ b/src/Expr/Expr_SquareRoot.hxx @@ -21,8 +21,6 @@ #include #include -#include -#include #include #include class Expr_GeneralExpression; diff --git a/src/Expr/Expr_Sum.cxx b/src/Expr/Expr_Sum.cxx index 7c651f4e1e..681634495b 100644 --- a/src/Expr/Expr_Sum.cxx +++ b/src/Expr/Expr_Sum.cxx @@ -23,10 +23,8 @@ #include #include #include -#include #include #include -#include #include #include #include diff --git a/src/Expr/Expr_Sum.hxx b/src/Expr/Expr_Sum.hxx index 51f383d8f0..01080dda6b 100644 --- a/src/Expr/Expr_Sum.hxx +++ b/src/Expr/Expr_Sum.hxx @@ -22,9 +22,7 @@ #include #include -#include #include -#include #include #include class Expr_GeneralExpression; diff --git a/src/Expr/Expr_SystemRelation.cxx b/src/Expr/Expr_SystemRelation.cxx index 40241b881a..b92aa46fdb 100644 --- a/src/Expr/Expr_SystemRelation.cxx +++ b/src/Expr/Expr_SystemRelation.cxx @@ -16,13 +16,10 @@ #include -#include #include #include #include #include -#include -#include #include #include diff --git a/src/Expr/Expr_SystemRelation.hxx b/src/Expr/Expr_SystemRelation.hxx index 90e344d817..0af2118e75 100644 --- a/src/Expr/Expr_SystemRelation.hxx +++ b/src/Expr/Expr_SystemRelation.hxx @@ -22,7 +22,6 @@ #include #include -#include #include class Expr_GeneralExpression; class Expr_NamedUnknown; diff --git a/src/Expr/Expr_Tangent.cxx b/src/Expr/Expr_Tangent.cxx index 9ee8572442..52fc71b71b 100644 --- a/src/Expr/Expr_Tangent.cxx +++ b/src/Expr/Expr_Tangent.cxx @@ -18,15 +18,11 @@ #include #include #include -#include #include #include -#include -#include #include #include #include -#include #include #include diff --git a/src/Expr/Expr_Tangent.hxx b/src/Expr/Expr_Tangent.hxx index 1aaae6933f..cdee2399bb 100644 --- a/src/Expr/Expr_Tangent.hxx +++ b/src/Expr/Expr_Tangent.hxx @@ -21,8 +21,6 @@ #include #include -#include -#include #include #include class Expr_GeneralExpression; diff --git a/src/Expr/Expr_Tanh.cxx b/src/Expr/Expr_Tanh.cxx index 788f3ffd7e..8b814c184f 100644 --- a/src/Expr/Expr_Tanh.cxx +++ b/src/Expr/Expr_Tanh.cxx @@ -18,15 +18,11 @@ #include #include #include -#include #include #include -#include -#include #include #include #include -#include #include #include diff --git a/src/Expr/Expr_Tanh.hxx b/src/Expr/Expr_Tanh.hxx index d4a41db63b..b884bed114 100644 --- a/src/Expr/Expr_Tanh.hxx +++ b/src/Expr/Expr_Tanh.hxx @@ -21,8 +21,6 @@ #include #include -#include -#include #include #include class Expr_GeneralExpression; diff --git a/src/Expr/Expr_UnaryExpression.cxx b/src/Expr/Expr_UnaryExpression.cxx index 2dc22f9b26..0b61ba6123 100644 --- a/src/Expr/Expr_UnaryExpression.cxx +++ b/src/Expr/Expr_UnaryExpression.cxx @@ -15,11 +15,9 @@ // commercial license or contractual agreement. -#include #include #include #include -#include #include #include diff --git a/src/Expr/Expr_UnaryExpression.hxx b/src/Expr/Expr_UnaryExpression.hxx index 80aa97dd22..564087703f 100644 --- a/src/Expr/Expr_UnaryExpression.hxx +++ b/src/Expr/Expr_UnaryExpression.hxx @@ -22,7 +22,6 @@ #include #include -#include class Expr_NamedUnknown; diff --git a/src/Expr/Expr_UnaryFunction.cxx b/src/Expr/Expr_UnaryFunction.cxx index a484ab175e..48a33d9fc0 100644 --- a/src/Expr/Expr_UnaryFunction.cxx +++ b/src/Expr/Expr_UnaryFunction.cxx @@ -28,12 +28,9 @@ #include #include #include -#include -#include #include #include #include -#include #include #include diff --git a/src/Expr/Expr_UnaryFunction.hxx b/src/Expr/Expr_UnaryFunction.hxx index 9a310f7b43..5c06f6b847 100644 --- a/src/Expr/Expr_UnaryFunction.hxx +++ b/src/Expr/Expr_UnaryFunction.hxx @@ -21,8 +21,6 @@ #include #include -#include -#include #include #include class Expr_GeneralFunction; diff --git a/src/Expr/Expr_UnaryMinus.cxx b/src/Expr/Expr_UnaryMinus.cxx index 9273ca8cad..ace3787661 100644 --- a/src/Expr/Expr_UnaryMinus.cxx +++ b/src/Expr/Expr_UnaryMinus.cxx @@ -18,11 +18,8 @@ #include #include #include -#include -#include #include #include -#include #include #include #include diff --git a/src/Expr/Expr_UnaryMinus.hxx b/src/Expr/Expr_UnaryMinus.hxx index f00155169e..23d563a6c1 100644 --- a/src/Expr/Expr_UnaryMinus.hxx +++ b/src/Expr/Expr_UnaryMinus.hxx @@ -21,9 +21,7 @@ #include #include -#include #include -#include #include #include class Expr_GeneralExpression; diff --git a/src/Expr/Expr_UnknownIterator.cxx b/src/Expr/Expr_UnknownIterator.cxx index 27bbc35a38..d66cbce9e4 100644 --- a/src/Expr/Expr_UnknownIterator.cxx +++ b/src/Expr/Expr_UnknownIterator.cxx @@ -16,11 +16,8 @@ #include -#include -#include #include #include -#include Expr_UnknownIterator::Expr_UnknownIterator (const Handle(Expr_GeneralExpression)& exp) { diff --git a/src/Expr/Expr_UnknownIterator.hxx b/src/Expr/Expr_UnknownIterator.hxx index b08b230874..12db74fe2a 100644 --- a/src/Expr/Expr_UnknownIterator.hxx +++ b/src/Expr/Expr_UnknownIterator.hxx @@ -23,7 +23,6 @@ #include #include -#include class Expr_GeneralExpression; class Expr_NamedUnknown; diff --git a/src/ExprIntrp/ExprIntrp_Analysis.cxx b/src/ExprIntrp/ExprIntrp_Analysis.cxx index c518424740..ccb40852c6 100644 --- a/src/ExprIntrp/ExprIntrp_Analysis.cxx +++ b/src/ExprIntrp/ExprIntrp_Analysis.cxx @@ -17,11 +17,6 @@ #define _ExprIntrp_Analysis_SourceFile -#include -#include -#include -#include -#include #include #include #include diff --git a/src/ExprIntrp/ExprIntrp_Analysis.hxx b/src/ExprIntrp/ExprIntrp_Analysis.hxx index d5511658ae..3d65665142 100644 --- a/src/ExprIntrp/ExprIntrp_Analysis.hxx +++ b/src/ExprIntrp/ExprIntrp_Analysis.hxx @@ -29,7 +29,6 @@ #include #include #include -#include class ExprIntrp_Generator; class Expr_GeneralExpression; class Expr_GeneralRelation; diff --git a/src/ExprIntrp/ExprIntrp_GenExp.hxx b/src/ExprIntrp/ExprIntrp_GenExp.hxx index 55fa21345c..02478dac01 100644 --- a/src/ExprIntrp/ExprIntrp_GenExp.hxx +++ b/src/ExprIntrp/ExprIntrp_GenExp.hxx @@ -20,7 +20,6 @@ #include #include -#include #include class Expr_GeneralExpression; class TCollection_AsciiString; diff --git a/src/ExprIntrp/ExprIntrp_GenFct.cxx b/src/ExprIntrp/ExprIntrp_GenFct.cxx index 8a6fcf2fd5..410482294f 100644 --- a/src/ExprIntrp/ExprIntrp_GenFct.cxx +++ b/src/ExprIntrp/ExprIntrp_GenFct.cxx @@ -18,7 +18,6 @@ #include #include #include -#include #include #include diff --git a/src/ExprIntrp/ExprIntrp_GenFct.hxx b/src/ExprIntrp/ExprIntrp_GenFct.hxx index b8c134a51f..d891e9528e 100644 --- a/src/ExprIntrp/ExprIntrp_GenFct.hxx +++ b/src/ExprIntrp/ExprIntrp_GenFct.hxx @@ -18,9 +18,7 @@ #define _ExprIntrp_GenFct_HeaderFile #include -#include -#include #include class TCollection_AsciiString; diff --git a/src/ExprIntrp/ExprIntrp_GenRel.hxx b/src/ExprIntrp/ExprIntrp_GenRel.hxx index 8c27cd42e2..6a9f02b8ba 100644 --- a/src/ExprIntrp/ExprIntrp_GenRel.hxx +++ b/src/ExprIntrp/ExprIntrp_GenRel.hxx @@ -20,7 +20,6 @@ #include #include -#include #include class Expr_GeneralRelation; class TCollection_AsciiString; diff --git a/src/ExprIntrp/ExprIntrp_Generator.cxx b/src/ExprIntrp/ExprIntrp_Generator.cxx index 4d9569102e..be648c936d 100644 --- a/src/ExprIntrp/ExprIntrp_Generator.cxx +++ b/src/ExprIntrp/ExprIntrp_Generator.cxx @@ -15,9 +15,6 @@ // commercial license or contractual agreement. -#include -#include -#include #include #include #include diff --git a/src/ExprIntrp/ExprIntrp_Generator.hxx b/src/ExprIntrp/ExprIntrp_Generator.hxx index 858ba9ae94..cd3ff345a7 100644 --- a/src/ExprIntrp/ExprIntrp_Generator.hxx +++ b/src/ExprIntrp/ExprIntrp_Generator.hxx @@ -18,7 +18,6 @@ #define _ExprIntrp_Generator_HeaderFile #include -#include #include #include diff --git a/src/ExprIntrp/ExprIntrp_yaccintrf.cxx b/src/ExprIntrp/ExprIntrp_yaccintrf.cxx index e9f6d3c2b7..2511894316 100644 --- a/src/ExprIntrp/ExprIntrp_yaccintrf.cxx +++ b/src/ExprIntrp/ExprIntrp_yaccintrf.cxx @@ -16,10 +16,8 @@ #include #include #include -#include #include #include -#include #include #include #include diff --git a/src/Extrema/Extrema_CCLocFOfLocECC.hxx b/src/Extrema/Extrema_CCLocFOfLocECC.hxx index 75c9dea247..42ab12c751 100644 --- a/src/Extrema/Extrema_CCLocFOfLocECC.hxx +++ b/src/Extrema/Extrema_CCLocFOfLocECC.hxx @@ -21,13 +21,10 @@ #include #include -#include -#include #include #include #include #include -#include #include #include #include diff --git a/src/Extrema/Extrema_CCLocFOfLocECC2d.hxx b/src/Extrema/Extrema_CCLocFOfLocECC2d.hxx index feae30e7b8..905325bc91 100644 --- a/src/Extrema/Extrema_CCLocFOfLocECC2d.hxx +++ b/src/Extrema/Extrema_CCLocFOfLocECC2d.hxx @@ -21,13 +21,10 @@ #include #include -#include -#include #include #include #include #include -#include #include #include #include diff --git a/src/Extrema/Extrema_Curve2dTool.hxx b/src/Extrema/Extrema_Curve2dTool.hxx index b4497dcc24..3b6908661d 100644 --- a/src/Extrema/Extrema_Curve2dTool.hxx +++ b/src/Extrema/Extrema_Curve2dTool.hxx @@ -27,8 +27,6 @@ #include #include #include -#include -#include #include #include #include diff --git a/src/Extrema/Extrema_CurveTool.cxx b/src/Extrema/Extrema_CurveTool.cxx index 995e311ce0..0f3dd23a02 100644 --- a/src/Extrema/Extrema_CurveTool.cxx +++ b/src/Extrema/Extrema_CurveTool.cxx @@ -20,7 +20,6 @@ #include #include #include -#include #include //======================================================================= diff --git a/src/Extrema/Extrema_CurveTool.hxx b/src/Extrema/Extrema_CurveTool.hxx index 3d7dc48242..55ce1434d2 100644 --- a/src/Extrema/Extrema_CurveTool.hxx +++ b/src/Extrema/Extrema_CurveTool.hxx @@ -21,12 +21,10 @@ #include #include -#include #include #include #include #include -#include #include #include #include diff --git a/src/Extrema/Extrema_ECC.hxx b/src/Extrema/Extrema_ECC.hxx index aecd8220e0..b36cda84ab 100644 --- a/src/Extrema/Extrema_ECC.hxx +++ b/src/Extrema/Extrema_ECC.hxx @@ -21,13 +21,9 @@ #include #include -#include -#include #include #include -#include #include -#include class Adaptor3d_Curve; class Extrema_CurveTool; diff --git a/src/Extrema/Extrema_ECC2d.hxx b/src/Extrema/Extrema_ECC2d.hxx index fd4ad016c6..e2cbb4a5c5 100644 --- a/src/Extrema/Extrema_ECC2d.hxx +++ b/src/Extrema/Extrema_ECC2d.hxx @@ -19,15 +19,9 @@ #include #include -#include -#include -#include #include #include -#include -#include -#include class Adaptor2d_Curve2d; class Extrema_Curve2dTool; diff --git a/src/Extrema/Extrema_ELPCOfLocateExtPC.hxx b/src/Extrema/Extrema_ELPCOfLocateExtPC.hxx index 0e87959d20..f7df76f2c4 100644 --- a/src/Extrema/Extrema_ELPCOfLocateExtPC.hxx +++ b/src/Extrema/Extrema_ELPCOfLocateExtPC.hxx @@ -19,14 +19,10 @@ #include #include -#include -#include #include #include #include -#include -#include #include #include #include diff --git a/src/Extrema/Extrema_ELPCOfLocateExtPC2d.hxx b/src/Extrema/Extrema_ELPCOfLocateExtPC2d.hxx index 7dad307b7c..f70ac62c81 100644 --- a/src/Extrema/Extrema_ELPCOfLocateExtPC2d.hxx +++ b/src/Extrema/Extrema_ELPCOfLocateExtPC2d.hxx @@ -21,14 +21,10 @@ #include #include -#include #include #include -#include #include -#include #include -#include #include #include #include diff --git a/src/Extrema/Extrema_EPCOfELPCOfLocateExtPC.hxx b/src/Extrema/Extrema_EPCOfELPCOfLocateExtPC.hxx index c1492ef44e..9f10c33889 100644 --- a/src/Extrema/Extrema_EPCOfELPCOfLocateExtPC.hxx +++ b/src/Extrema/Extrema_EPCOfELPCOfLocateExtPC.hxx @@ -19,11 +19,8 @@ #include #include -#include -#include #include -#include #include class StdFail_NotDone; class Standard_OutOfRange; diff --git a/src/Extrema/Extrema_EPCOfELPCOfLocateExtPC2d.hxx b/src/Extrema/Extrema_EPCOfELPCOfLocateExtPC2d.hxx index 50d3e4b07c..e79150cc8f 100644 --- a/src/Extrema/Extrema_EPCOfELPCOfLocateExtPC2d.hxx +++ b/src/Extrema/Extrema_EPCOfELPCOfLocateExtPC2d.hxx @@ -22,8 +22,6 @@ #include #include -#include -#include #include class StdFail_NotDone; class Standard_OutOfRange; diff --git a/src/Extrema/Extrema_EPCOfExtPC.hxx b/src/Extrema/Extrema_EPCOfExtPC.hxx index 2c0fe3c968..02fe694dac 100644 --- a/src/Extrema/Extrema_EPCOfExtPC.hxx +++ b/src/Extrema/Extrema_EPCOfExtPC.hxx @@ -19,11 +19,8 @@ #include #include -#include -#include #include -#include #include class StdFail_NotDone; class Standard_OutOfRange; diff --git a/src/Extrema/Extrema_EPCOfExtPC2d.hxx b/src/Extrema/Extrema_EPCOfExtPC2d.hxx index 0fd47f86ad..6c1404a9d8 100644 --- a/src/Extrema/Extrema_EPCOfExtPC2d.hxx +++ b/src/Extrema/Extrema_EPCOfExtPC2d.hxx @@ -19,11 +19,8 @@ #include #include -#include -#include #include -#include #include class StdFail_NotDone; class Standard_OutOfRange; diff --git a/src/Extrema/Extrema_ExtCC.cxx b/src/Extrema/Extrema_ExtCC.cxx index e3bfe4a60e..d19c246472 100644 --- a/src/Extrema/Extrema_ExtCC.cxx +++ b/src/Extrema/Extrema_ExtCC.cxx @@ -23,19 +23,13 @@ #include #include #include -#include #include #include #include #include #include #include -#include -#include -#include #include -#include -#include #include #include #include @@ -44,9 +38,7 @@ #include #include #include -#include #include -#include //======================================================================= //function : Extrema_ExtCC diff --git a/src/Extrema/Extrema_ExtCC.hxx b/src/Extrema/Extrema_ExtCC.hxx index 25877615bd..e5d2d77306 100644 --- a/src/Extrema/Extrema_ExtCC.hxx +++ b/src/Extrema/Extrema_ExtCC.hxx @@ -19,15 +19,10 @@ #include #include -#include #include -#include #include #include -#include -#include -#include #include class Adaptor3d_Curve; diff --git a/src/Extrema/Extrema_ExtCC2d.cxx b/src/Extrema/Extrema_ExtCC2d.cxx index 56ec32728f..bc232fac52 100644 --- a/src/Extrema/Extrema_ExtCC2d.cxx +++ b/src/Extrema/Extrema_ExtCC2d.cxx @@ -20,17 +20,9 @@ #include #include #include -#include #include #include #include -#include -#include -#include -#include -#include -#include -#include #include #include #include diff --git a/src/Extrema/Extrema_ExtCC2d.hxx b/src/Extrema/Extrema_ExtCC2d.hxx index 4a721ca8d0..c69a189d72 100644 --- a/src/Extrema/Extrema_ExtCC2d.hxx +++ b/src/Extrema/Extrema_ExtCC2d.hxx @@ -19,14 +19,10 @@ #include #include -#include -#include #include #include #include -#include -#include #include class Adaptor2d_Curve2d; diff --git a/src/Extrema/Extrema_ExtCS.cxx b/src/Extrema/Extrema_ExtCS.cxx index 5f85ef99d1..0f5a233988 100644 --- a/src/Extrema/Extrema_ExtCS.cxx +++ b/src/Extrema/Extrema_ExtCS.cxx @@ -16,25 +16,18 @@ // Modified by skv - Thu Jul 7 12:29:34 2005 OCC9134 -#include #include #include #include #include #include #include -#include #include #include #include #include -#include -#include #include -#include #include -#include -#include #include #include #include diff --git a/src/Extrema/Extrema_ExtCS.hxx b/src/Extrema/Extrema_ExtCS.hxx index f0f138f81c..d9110ec5a1 100644 --- a/src/Extrema/Extrema_ExtCS.hxx +++ b/src/Extrema/Extrema_ExtCS.hxx @@ -19,7 +19,6 @@ #include #include -#include #include #include diff --git a/src/Extrema/Extrema_ExtElC.cxx b/src/Extrema/Extrema_ExtElC.cxx index e487afb2fe..2da4bf009b 100644 --- a/src/Extrema/Extrema_ExtElC.cxx +++ b/src/Extrema/Extrema_ExtElC.cxx @@ -16,11 +16,9 @@ #include #include #include -#include #include #include #include -#include #include #include #include @@ -31,7 +29,6 @@ #include #include #include -#include #include #include #include @@ -39,7 +36,6 @@ #include #include -#include static void RefineDir(gp_Dir& aDir); diff --git a/src/Extrema/Extrema_ExtElC.hxx b/src/Extrema/Extrema_ExtElC.hxx index 6c88f903be..2a3ab95fa0 100644 --- a/src/Extrema/Extrema_ExtElC.hxx +++ b/src/Extrema/Extrema_ExtElC.hxx @@ -19,11 +19,8 @@ #include #include -#include -#include #include -#include #include class gp_Lin; diff --git a/src/Extrema/Extrema_ExtElC2d.cxx b/src/Extrema/Extrema_ExtElC2d.cxx index 967acf41c5..944526c070 100644 --- a/src/Extrema/Extrema_ExtElC2d.cxx +++ b/src/Extrema/Extrema_ExtElC2d.cxx @@ -24,8 +24,6 @@ #include #include #include -#include -#include #include #include #include diff --git a/src/Extrema/Extrema_ExtElC2d.hxx b/src/Extrema/Extrema_ExtElC2d.hxx index 4baf51d0ea..a9a5bda7fe 100644 --- a/src/Extrema/Extrema_ExtElC2d.hxx +++ b/src/Extrema/Extrema_ExtElC2d.hxx @@ -19,11 +19,8 @@ #include #include -#include -#include #include -#include #include class gp_Lin2d; diff --git a/src/Extrema/Extrema_ExtElCS.hxx b/src/Extrema/Extrema_ExtElCS.hxx index fe61099cf0..65bd8619f4 100644 --- a/src/Extrema/Extrema_ExtElCS.hxx +++ b/src/Extrema/Extrema_ExtElCS.hxx @@ -21,12 +21,10 @@ #include #include -#include #include #include #include #include -#include class gp_Lin; class gp_Pln; diff --git a/src/Extrema/Extrema_ExtPC.hxx b/src/Extrema/Extrema_ExtPC.hxx index ef6fe40d27..e878092a18 100644 --- a/src/Extrema/Extrema_ExtPC.hxx +++ b/src/Extrema/Extrema_ExtPC.hxx @@ -19,14 +19,9 @@ #include #include -#include -#include #include #include -#include -#include -#include #include #include #include diff --git a/src/Extrema/Extrema_ExtPC2d.hxx b/src/Extrema/Extrema_ExtPC2d.hxx index ad0bb85dc5..fd68c8b9f0 100644 --- a/src/Extrema/Extrema_ExtPC2d.hxx +++ b/src/Extrema/Extrema_ExtPC2d.hxx @@ -19,14 +19,9 @@ #include #include -#include -#include #include #include -#include -#include -#include #include #include #include diff --git a/src/Extrema/Extrema_ExtPElC.hxx b/src/Extrema/Extrema_ExtPElC.hxx index 7379d58282..a597b084bb 100644 --- a/src/Extrema/Extrema_ExtPElC.hxx +++ b/src/Extrema/Extrema_ExtPElC.hxx @@ -19,11 +19,8 @@ #include #include -#include -#include #include -#include #include class gp_Pnt; class gp_Lin; diff --git a/src/Extrema/Extrema_ExtPElC2d.hxx b/src/Extrema/Extrema_ExtPElC2d.hxx index dea8be5a2d..bba9efbd23 100644 --- a/src/Extrema/Extrema_ExtPElC2d.hxx +++ b/src/Extrema/Extrema_ExtPElC2d.hxx @@ -19,11 +19,8 @@ #include #include -#include -#include #include -#include #include class gp_Pnt2d; class gp_Lin2d; diff --git a/src/Extrema/Extrema_ExtPElS.hxx b/src/Extrema/Extrema_ExtPElS.hxx index ec00924a51..b3aae2b99a 100644 --- a/src/Extrema/Extrema_ExtPElS.hxx +++ b/src/Extrema/Extrema_ExtPElS.hxx @@ -19,11 +19,8 @@ #include #include -#include -#include #include -#include #include class gp_Pnt; class gp_Cylinder; diff --git a/src/Extrema/Extrema_ExtPExtS.cxx b/src/Extrema/Extrema_ExtPExtS.cxx index 73f71a2c7a..1173a5efdb 100644 --- a/src/Extrema/Extrema_ExtPExtS.cxx +++ b/src/Extrema/Extrema_ExtPExtS.cxx @@ -15,9 +15,6 @@ // commercial license or contractual agreement. #include -#include -#include -#include #include #include #include diff --git a/src/Extrema/Extrema_ExtPRevS.cxx b/src/Extrema/Extrema_ExtPRevS.cxx index dcf52c1b8c..29764f4c03 100644 --- a/src/Extrema/Extrema_ExtPRevS.cxx +++ b/src/Extrema/Extrema_ExtPRevS.cxx @@ -16,7 +16,6 @@ #include -#include #include #include #include diff --git a/src/Extrema/Extrema_ExtPS.cxx b/src/Extrema/Extrema_ExtPS.cxx index 341758fa28..7a09e25bf9 100644 --- a/src/Extrema/Extrema_ExtPS.cxx +++ b/src/Extrema/Extrema_ExtPS.cxx @@ -14,27 +14,17 @@ //----------------------------------------------------------------- -#include -#include -#include #include #include #include #include #include #include -#include #include -#include -#include -#include #include -#include -#include #include #include #include -#include #include //======================================================================= diff --git a/src/Extrema/Extrema_ExtPS.hxx b/src/Extrema/Extrema_ExtPS.hxx index a149355dee..60c9aadade 100644 --- a/src/Extrema/Extrema_ExtPS.hxx +++ b/src/Extrema/Extrema_ExtPS.hxx @@ -24,7 +24,6 @@ #include #include #include -#include #include #include #include diff --git a/src/Extrema/Extrema_ExtSS.cxx b/src/Extrema/Extrema_ExtSS.cxx index b6b002c366..0d0162fa35 100644 --- a/src/Extrema/Extrema_ExtSS.cxx +++ b/src/Extrema/Extrema_ExtSS.cxx @@ -21,9 +21,6 @@ #include #include #include -#include -#include -#include #include #include diff --git a/src/Extrema/Extrema_ExtSS.hxx b/src/Extrema/Extrema_ExtSS.hxx index b26bbcd865..5ec6f7c5fe 100644 --- a/src/Extrema/Extrema_ExtSS.hxx +++ b/src/Extrema/Extrema_ExtSS.hxx @@ -19,11 +19,9 @@ #include #include -#include #include #include -#include #include #include #include diff --git a/src/Extrema/Extrema_FuncExtCS.cxx b/src/Extrema/Extrema_FuncExtCS.cxx index a4889c43b8..78b2146d63 100644 --- a/src/Extrema/Extrema_FuncExtCS.cxx +++ b/src/Extrema/Extrema_FuncExtCS.cxx @@ -15,7 +15,6 @@ // commercial license or contractual agreement. -#include #include #include #include @@ -23,7 +22,6 @@ #include #include #include -#include #include /*----------------------------------------------------------------------------- diff --git a/src/Extrema/Extrema_FuncExtCS.hxx b/src/Extrema/Extrema_FuncExtCS.hxx index c94d729fd7..ef37ca6278 100644 --- a/src/Extrema/Extrema_FuncExtCS.hxx +++ b/src/Extrema/Extrema_FuncExtCS.hxx @@ -19,16 +19,12 @@ #include #include -#include #include -#include #include #include #include -#include #include -#include #include class Adaptor3d_Curve; class Adaptor3d_Surface; diff --git a/src/Extrema/Extrema_FuncExtSS.cxx b/src/Extrema/Extrema_FuncExtSS.cxx index 10ac91d078..1657e169e4 100644 --- a/src/Extrema/Extrema_FuncExtSS.cxx +++ b/src/Extrema/Extrema_FuncExtSS.cxx @@ -20,7 +20,6 @@ #include #include #include -#include #include /*---------------------------------------------------------------------------- diff --git a/src/Extrema/Extrema_FuncExtSS.hxx b/src/Extrema/Extrema_FuncExtSS.hxx index 587825ce4e..1c151d664d 100644 --- a/src/Extrema/Extrema_FuncExtSS.hxx +++ b/src/Extrema/Extrema_FuncExtSS.hxx @@ -19,15 +19,11 @@ #include #include -#include #include -#include #include #include -#include #include -#include #include class Adaptor3d_Surface; class math_Matrix; diff --git a/src/Extrema/Extrema_FuncPSDist.hxx b/src/Extrema/Extrema_FuncPSDist.hxx index 42e9d761ea..b29931ce62 100644 --- a/src/Extrema/Extrema_FuncPSDist.hxx +++ b/src/Extrema/Extrema_FuncPSDist.hxx @@ -21,12 +21,9 @@ #include #include -#include #include -#include #include -#include class math_Vector; diff --git a/src/Extrema/Extrema_FuncPSNorm.cxx b/src/Extrema/Extrema_FuncPSNorm.cxx index c234091f97..649d5da027 100644 --- a/src/Extrema/Extrema_FuncPSNorm.cxx +++ b/src/Extrema/Extrema_FuncPSNorm.cxx @@ -18,7 +18,6 @@ #include #include #include -#include #include #include #include diff --git a/src/Extrema/Extrema_FuncPSNorm.hxx b/src/Extrema/Extrema_FuncPSNorm.hxx index f11f46e3ed..2a57f835f5 100644 --- a/src/Extrema/Extrema_FuncPSNorm.hxx +++ b/src/Extrema/Extrema_FuncPSNorm.hxx @@ -25,7 +25,6 @@ #include #include #include -#include #include class Adaptor3d_Surface; diff --git a/src/Extrema/Extrema_GenExtCS.cxx b/src/Extrema/Extrema_GenExtCS.cxx index bf88033bee..fa17ce9503 100644 --- a/src/Extrema/Extrema_GenExtCS.cxx +++ b/src/Extrema/Extrema_GenExtCS.cxx @@ -16,8 +16,6 @@ #include -#include -#include #include #include #include @@ -31,7 +29,6 @@ #include #include #include -#include #include #include #include diff --git a/src/Extrema/Extrema_GenExtPS.cxx b/src/Extrema/Extrema_GenExtPS.cxx index 43a82c55f7..0f9e57da57 100644 --- a/src/Extrema/Extrema_GenExtPS.cxx +++ b/src/Extrema/Extrema_GenExtPS.cxx @@ -18,9 +18,6 @@ #include -#include -#include -#include #include #include #include @@ -30,21 +27,15 @@ #include #include #include -#include #include -#include -#include #include #include #include #include #include #include -#include #include -#include #include -#include //IMPLEMENT_HARRAY1(Extrema_HArray1OfSphere) class Bnd_SphereUBTreeSelector : public Extrema_UBTreeOfSphere::Selector diff --git a/src/Extrema/Extrema_GenExtSS.cxx b/src/Extrema/Extrema_GenExtSS.cxx index 42dcedd1f8..e8ec2a8e04 100644 --- a/src/Extrema/Extrema_GenExtSS.cxx +++ b/src/Extrema/Extrema_GenExtSS.cxx @@ -23,7 +23,6 @@ #include #include #include -#include #include //! This class represents distance objective function for surface / surface. diff --git a/src/Extrema/Extrema_GenLocateExtCS.cxx b/src/Extrema/Extrema_GenLocateExtCS.cxx index c043128db7..16e38a32a8 100644 --- a/src/Extrema/Extrema_GenLocateExtCS.cxx +++ b/src/Extrema/Extrema_GenLocateExtCS.cxx @@ -15,7 +15,6 @@ // commercial license or contractual agreement. -#include #include #include #include @@ -24,7 +23,6 @@ #include #include #include -#include #include //======================================================================= diff --git a/src/Extrema/Extrema_GenLocateExtCS.hxx b/src/Extrema/Extrema_GenLocateExtCS.hxx index b3fbefbc92..35b1373a56 100644 --- a/src/Extrema/Extrema_GenLocateExtCS.hxx +++ b/src/Extrema/Extrema_GenLocateExtCS.hxx @@ -19,10 +19,7 @@ #include #include -#include -#include -#include #include #include class Adaptor3d_Curve; diff --git a/src/Extrema/Extrema_GenLocateExtPS.cxx b/src/Extrema/Extrema_GenLocateExtPS.cxx index 3e5a8fc65b..fc2035b87c 100644 --- a/src/Extrema/Extrema_GenLocateExtPS.cxx +++ b/src/Extrema/Extrema_GenLocateExtPS.cxx @@ -17,7 +17,6 @@ #include -#include #include #include #include @@ -25,7 +24,6 @@ #include #include #include -#include #include #include diff --git a/src/Extrema/Extrema_GenLocateExtPS.hxx b/src/Extrema/Extrema_GenLocateExtPS.hxx index 68af4751f8..631384a17b 100644 --- a/src/Extrema/Extrema_GenLocateExtPS.hxx +++ b/src/Extrema/Extrema_GenLocateExtPS.hxx @@ -21,7 +21,6 @@ #include #include -#include #include class gp_Pnt; class Adaptor3d_Surface; diff --git a/src/Extrema/Extrema_GenLocateExtSS.cxx b/src/Extrema/Extrema_GenLocateExtSS.cxx index f7e8e21048..48a1441f43 100644 --- a/src/Extrema/Extrema_GenLocateExtSS.cxx +++ b/src/Extrema/Extrema_GenLocateExtSS.cxx @@ -22,7 +22,6 @@ #include #include #include -#include #include //======================================================================= diff --git a/src/Extrema/Extrema_GenLocateExtSS.hxx b/src/Extrema/Extrema_GenLocateExtSS.hxx index d757193b7f..c8ee0429b5 100644 --- a/src/Extrema/Extrema_GenLocateExtSS.hxx +++ b/src/Extrema/Extrema_GenLocateExtSS.hxx @@ -19,10 +19,7 @@ #include #include -#include -#include -#include #include class Adaptor3d_Surface; diff --git a/src/Extrema/Extrema_GlobOptFuncCC.cxx b/src/Extrema/Extrema_GlobOptFuncCC.cxx index 85126c33e7..099f671e87 100644 --- a/src/Extrema/Extrema_GlobOptFuncCC.cxx +++ b/src/Extrema/Extrema_GlobOptFuncCC.cxx @@ -20,8 +20,6 @@ #include #include #include -#include -#include static Standard_Integer _NbVariables() { diff --git a/src/Extrema/Extrema_GlobOptFuncCC.hxx b/src/Extrema/Extrema_GlobOptFuncCC.hxx index 9d52cd00fc..c236c547a0 100644 --- a/src/Extrema/Extrema_GlobOptFuncCC.hxx +++ b/src/Extrema/Extrema_GlobOptFuncCC.hxx @@ -20,8 +20,6 @@ #include #include #include -#include -#include #include //! This class implements function which calculate Eucluidean distance diff --git a/src/Extrema/Extrema_GlobOptFuncCQuadric.hxx b/src/Extrema/Extrema_GlobOptFuncCQuadric.hxx index e4cdb8b5f7..cb32bbed1b 100644 --- a/src/Extrema/Extrema_GlobOptFuncCQuadric.hxx +++ b/src/Extrema/Extrema_GlobOptFuncCQuadric.hxx @@ -15,10 +15,7 @@ #define _Extrema_GlobOptFuncCQuadric_HeaderFile -#include #include -#include -#include #include #include #include diff --git a/src/Extrema/Extrema_GlobOptFuncCS.cxx b/src/Extrema/Extrema_GlobOptFuncCS.cxx index 29462abe13..8c3ba28287 100644 --- a/src/Extrema/Extrema_GlobOptFuncCS.cxx +++ b/src/Extrema/Extrema_GlobOptFuncCS.cxx @@ -18,8 +18,6 @@ #include #include #include -#include -#include //!F(cu, su, sv)=(C^{(x)}(cu)-S^{(x)}(su,sv))^{2}+ // (C^{(y)}(cu)-S^{(y)}(su,sv))^{2}+ diff --git a/src/Extrema/Extrema_GlobOptFuncCS.hxx b/src/Extrema/Extrema_GlobOptFuncCS.hxx index b6f38a9469..2b1d8bc0ed 100644 --- a/src/Extrema/Extrema_GlobOptFuncCS.hxx +++ b/src/Extrema/Extrema_GlobOptFuncCS.hxx @@ -17,7 +17,6 @@ #define _Extrema_GlobOptFuncCS_HeaderFile -#include #include #include #include diff --git a/src/Extrema/Extrema_GlobOptFuncConicS.hxx b/src/Extrema/Extrema_GlobOptFuncConicS.hxx index 296cb67029..8329a0f699 100644 --- a/src/Extrema/Extrema_GlobOptFuncConicS.hxx +++ b/src/Extrema/Extrema_GlobOptFuncConicS.hxx @@ -16,10 +16,7 @@ #define _Extrema_GlobOptFuncConicS_HeaderFile -#include #include -#include -#include #include #include #include diff --git a/src/Extrema/Extrema_HArray1OfPOnCurv.hxx b/src/Extrema/Extrema_HArray1OfPOnCurv.hxx index 4c81810cac..6a6224408a 100644 --- a/src/Extrema/Extrema_HArray1OfPOnCurv.hxx +++ b/src/Extrema/Extrema_HArray1OfPOnCurv.hxx @@ -17,7 +17,6 @@ #ifndef Extrema_HArray1OfPOnCurv_HeaderFile #define Extrema_HArray1OfPOnCurv_HeaderFile -#include #include #include diff --git a/src/Extrema/Extrema_HArray1OfPOnSurf.hxx b/src/Extrema/Extrema_HArray1OfPOnSurf.hxx index 61854e3a7a..e5d2d73cf5 100644 --- a/src/Extrema/Extrema_HArray1OfPOnSurf.hxx +++ b/src/Extrema/Extrema_HArray1OfPOnSurf.hxx @@ -17,7 +17,6 @@ #ifndef Extrema_HArray1OfPOnSurf_HeaderFile #define Extrema_HArray1OfPOnSurf_HeaderFile -#include #include #include diff --git a/src/Extrema/Extrema_HUBTreeOfSphere.hxx b/src/Extrema/Extrema_HUBTreeOfSphere.hxx index 736ad152d0..f306d80302 100644 --- a/src/Extrema/Extrema_HUBTreeOfSphere.hxx +++ b/src/Extrema/Extrema_HUBTreeOfSphere.hxx @@ -16,7 +16,6 @@ #ifndef _Extrema_HUBTreeOfSphere_HeaderFile #define _Extrema_HUBTreeOfSphere_HeaderFile -#include #include #include #include diff --git a/src/Extrema/Extrema_LocECC.hxx b/src/Extrema/Extrema_LocECC.hxx index ba9bbbfb86..d4614d12d9 100644 --- a/src/Extrema/Extrema_LocECC.hxx +++ b/src/Extrema/Extrema_LocECC.hxx @@ -19,12 +19,8 @@ #include #include -#include -#include -#include #include -#include class Standard_DomainError; class StdFail_NotDone; diff --git a/src/Extrema/Extrema_LocECC2d.hxx b/src/Extrema/Extrema_LocECC2d.hxx index 1c05252e7b..723111cc49 100644 --- a/src/Extrema/Extrema_LocECC2d.hxx +++ b/src/Extrema/Extrema_LocECC2d.hxx @@ -19,12 +19,8 @@ #include #include -#include -#include -#include #include -#include class Standard_DomainError; class StdFail_NotDone; diff --git a/src/Extrema/Extrema_LocEPCOfLocateExtPC.hxx b/src/Extrema/Extrema_LocEPCOfLocateExtPC.hxx index 2565f2e683..7a48682718 100644 --- a/src/Extrema/Extrema_LocEPCOfLocateExtPC.hxx +++ b/src/Extrema/Extrema_LocEPCOfLocateExtPC.hxx @@ -19,10 +19,7 @@ #include #include -#include -#include -#include #include class Standard_DomainError; class Standard_TypeMismatch; diff --git a/src/Extrema/Extrema_LocEPCOfLocateExtPC2d.hxx b/src/Extrema/Extrema_LocEPCOfLocateExtPC2d.hxx index aafc6afa44..e498df9f12 100644 --- a/src/Extrema/Extrema_LocEPCOfLocateExtPC2d.hxx +++ b/src/Extrema/Extrema_LocEPCOfLocateExtPC2d.hxx @@ -22,7 +22,6 @@ #include #include -#include #include class Standard_DomainError; class Standard_TypeMismatch; diff --git a/src/Extrema/Extrema_LocateExtCC.cxx b/src/Extrema/Extrema_LocateExtCC.cxx index 488a0599bf..075bb2696c 100644 --- a/src/Extrema/Extrema_LocateExtCC.cxx +++ b/src/Extrema/Extrema_LocateExtCC.cxx @@ -20,7 +20,6 @@ #include #include #include -#include #include Extrema_LocateExtCC::Extrema_LocateExtCC (const Adaptor3d_Curve& C1, diff --git a/src/Extrema/Extrema_LocateExtCC.hxx b/src/Extrema/Extrema_LocateExtCC.hxx index f9e1a953eb..143600b510 100644 --- a/src/Extrema/Extrema_LocateExtCC.hxx +++ b/src/Extrema/Extrema_LocateExtCC.hxx @@ -19,10 +19,7 @@ #include #include -#include -#include -#include #include class Adaptor3d_Curve; diff --git a/src/Extrema/Extrema_LocateExtCC2d.cxx b/src/Extrema/Extrema_LocateExtCC2d.cxx index cf7eab8e32..a219d8666a 100644 --- a/src/Extrema/Extrema_LocateExtCC2d.cxx +++ b/src/Extrema/Extrema_LocateExtCC2d.cxx @@ -16,12 +16,9 @@ #include -#include #include #include -#include -#include #include #include diff --git a/src/Extrema/Extrema_LocateExtCC2d.hxx b/src/Extrema/Extrema_LocateExtCC2d.hxx index 52e6cae3f5..5a2fee58a9 100644 --- a/src/Extrema/Extrema_LocateExtCC2d.hxx +++ b/src/Extrema/Extrema_LocateExtCC2d.hxx @@ -22,7 +22,6 @@ #include #include -#include #include class Adaptor2d_Curve2d; diff --git a/src/Extrema/Extrema_LocateExtPC.hxx b/src/Extrema/Extrema_LocateExtPC.hxx index b646920974..dcee1ca1a8 100644 --- a/src/Extrema/Extrema_LocateExtPC.hxx +++ b/src/Extrema/Extrema_LocateExtPC.hxx @@ -19,17 +19,11 @@ #include #include -#include -#include -#include -#include -#include #include #include #include #include -#include class Standard_DomainError; class StdFail_NotDone; class Adaptor3d_Curve; diff --git a/src/Extrema/Extrema_LocateExtPC2d.hxx b/src/Extrema/Extrema_LocateExtPC2d.hxx index 28274c1755..0a87e7a14b 100644 --- a/src/Extrema/Extrema_LocateExtPC2d.hxx +++ b/src/Extrema/Extrema_LocateExtPC2d.hxx @@ -22,14 +22,10 @@ #include #include -#include -#include #include #include #include #include -#include -#include class Standard_DomainError; class StdFail_NotDone; class Adaptor2d_Curve2d; diff --git a/src/Extrema/Extrema_PCFOfEPCOfELPCOfLocateExtPC.hxx b/src/Extrema/Extrema_PCFOfEPCOfELPCOfLocateExtPC.hxx index 36d79c45f6..5e6877bfcc 100644 --- a/src/Extrema/Extrema_PCFOfEPCOfELPCOfLocateExtPC.hxx +++ b/src/Extrema/Extrema_PCFOfEPCOfELPCOfLocateExtPC.hxx @@ -19,15 +19,11 @@ #include #include -#include #include -#include -#include #include #include #include -#include #include #include class Standard_OutOfRange; diff --git a/src/Extrema/Extrema_PCFOfEPCOfELPCOfLocateExtPC2d.hxx b/src/Extrema/Extrema_PCFOfEPCOfELPCOfLocateExtPC2d.hxx index b2e49b9fea..d0472ef1ce 100644 --- a/src/Extrema/Extrema_PCFOfEPCOfELPCOfLocateExtPC2d.hxx +++ b/src/Extrema/Extrema_PCFOfEPCOfELPCOfLocateExtPC2d.hxx @@ -22,13 +22,10 @@ #include #include -#include -#include #include #include #include #include -#include #include class Standard_OutOfRange; class Standard_TypeMismatch; diff --git a/src/Extrema/Extrema_PCFOfEPCOfExtPC.hxx b/src/Extrema/Extrema_PCFOfEPCOfExtPC.hxx index 287128dee4..b84254134c 100644 --- a/src/Extrema/Extrema_PCFOfEPCOfExtPC.hxx +++ b/src/Extrema/Extrema_PCFOfEPCOfExtPC.hxx @@ -19,15 +19,11 @@ #include #include -#include #include -#include -#include #include #include #include -#include #include #include class Standard_OutOfRange; diff --git a/src/Extrema/Extrema_PCFOfEPCOfExtPC2d.hxx b/src/Extrema/Extrema_PCFOfEPCOfExtPC2d.hxx index d8936cb89a..290e25bcbf 100644 --- a/src/Extrema/Extrema_PCFOfEPCOfExtPC2d.hxx +++ b/src/Extrema/Extrema_PCFOfEPCOfExtPC2d.hxx @@ -19,15 +19,11 @@ #include #include -#include #include -#include -#include #include #include #include -#include #include #include class Standard_OutOfRange; diff --git a/src/Extrema/Extrema_PCLocFOfLocEPCOfLocateExtPC.hxx b/src/Extrema/Extrema_PCLocFOfLocEPCOfLocateExtPC.hxx index b19d3a8fed..7af163ec47 100644 --- a/src/Extrema/Extrema_PCLocFOfLocEPCOfLocateExtPC.hxx +++ b/src/Extrema/Extrema_PCLocFOfLocEPCOfLocateExtPC.hxx @@ -19,15 +19,11 @@ #include #include -#include #include -#include -#include #include #include #include -#include #include #include class Standard_OutOfRange; diff --git a/src/Extrema/Extrema_PCLocFOfLocEPCOfLocateExtPC2d.hxx b/src/Extrema/Extrema_PCLocFOfLocEPCOfLocateExtPC2d.hxx index e264dc23a2..1598ea18ab 100644 --- a/src/Extrema/Extrema_PCLocFOfLocEPCOfLocateExtPC2d.hxx +++ b/src/Extrema/Extrema_PCLocFOfLocEPCOfLocateExtPC2d.hxx @@ -22,13 +22,10 @@ #include #include -#include -#include #include #include #include #include -#include #include class Standard_OutOfRange; class Standard_TypeMismatch; diff --git a/src/Extrema/Extrema_POnCurv.hxx b/src/Extrema/Extrema_POnCurv.hxx index 8a1f36610b..777aecfbb6 100644 --- a/src/Extrema/Extrema_POnCurv.hxx +++ b/src/Extrema/Extrema_POnCurv.hxx @@ -21,7 +21,6 @@ #include #include -#include #include class gp_Pnt; diff --git a/src/Extrema/Extrema_POnCurv2d.hxx b/src/Extrema/Extrema_POnCurv2d.hxx index ed3accf674..2e1f84ff0b 100644 --- a/src/Extrema/Extrema_POnCurv2d.hxx +++ b/src/Extrema/Extrema_POnCurv2d.hxx @@ -19,9 +19,7 @@ #include #include -#include -#include #include class gp_Pnt2d; diff --git a/src/Extrema/Extrema_POnSurf.hxx b/src/Extrema/Extrema_POnSurf.hxx index 56905cec59..714e924aab 100644 --- a/src/Extrema/Extrema_POnSurf.hxx +++ b/src/Extrema/Extrema_POnSurf.hxx @@ -19,9 +19,7 @@ #include #include -#include -#include #include class gp_Pnt; diff --git a/src/Extrema/Extrema_POnSurfParams.hxx b/src/Extrema/Extrema_POnSurfParams.hxx index 0ad1aaaa72..7b35d950ab 100644 --- a/src/Extrema/Extrema_POnSurfParams.hxx +++ b/src/Extrema/Extrema_POnSurfParams.hxx @@ -18,9 +18,7 @@ #include #include -#include -#include #include #include #include From 1eed3c78739f7b5baf94ea0a9f824682b6ea0d07 Mon Sep 17 00:00:00 2001 From: aml Date: Mon, 31 Jan 2022 07:01:49 +0300 Subject: [PATCH 204/639] 0032812: Coding - problem after integration 32806 --- src/DNaming/DNaming_Line3DDriver.cxx | 1 + 1 file changed, 1 insertion(+) diff --git a/src/DNaming/DNaming_Line3DDriver.cxx b/src/DNaming/DNaming_Line3DDriver.cxx index e86a19c5a1..ab3124a521 100644 --- a/src/DNaming/DNaming_Line3DDriver.cxx +++ b/src/DNaming/DNaming_Line3DDriver.cxx @@ -26,6 +26,7 @@ #include #include #include +#include #include #include #include From 59cfb82b02c02821f190aa4879f1fecf945ad842 Mon Sep 17 00:00:00 2001 From: aml Date: Fri, 28 Jan 2022 18:39:49 +0300 Subject: [PATCH 205/639] 0032810: Coding - missing Standard_EXPORT in Standard_ErrorHandler --- src/Standard/Standard_ErrorHandler.hxx | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/src/Standard/Standard_ErrorHandler.hxx b/src/Standard/Standard_ErrorHandler.hxx index 09bdc7bfbf..85b5ff9fe2 100644 --- a/src/Standard/Standard_ErrorHandler.hxx +++ b/src/Standard/Standard_ErrorHandler.hxx @@ -155,13 +155,22 @@ public: DEFINE_STANDARD_ALLOC //! Registers this callback object in the current error handler (if found). - void RegisterCallback(); + #if defined(OCC_CONVERT_SIGNALS) + Standard_EXPORT + #endif + void RegisterCallback(); //! Unregisters this callback object from the error handler. - void UnregisterCallback(); + #if defined(OCC_CONVERT_SIGNALS) + Standard_EXPORT + #endif + void UnregisterCallback(); //! Destructor - virtual ~Callback(); + #if defined(OCC_CONVERT_SIGNALS) + Standard_EXPORT + #endif + virtual ~Callback(); //! The callback function to perform necessary callback action. //! Called by the exception handler when it is being destroyed but @@ -171,7 +180,10 @@ public: protected: //! Empty constructor - Callback(); + #if defined(OCC_CONVERT_SIGNALS) + Standard_EXPORT + #endif + Callback(); private: Standard_Address myHandler; From 0b6a0adb3aa45e0437be8d2e65e9d0f80856df42 Mon Sep 17 00:00:00 2001 From: knosulko Date: Thu, 13 Jan 2022 03:17:50 +0300 Subject: [PATCH 206/639] 0032767: Mesh - incorrect splitting of edges of seams leading to hang [since OCCT 7.4.0] - fix step by parameter of the edge while split curve in case of seam edges --- src/BRepMesh/BRepMesh_ModelPreProcessor.cxx | 85 +++++++++++++++------ tests/bugs/mesh/bug32767 | 9 +++ 2 files changed, 72 insertions(+), 22 deletions(-) create mode 100644 tests/bugs/mesh/bug32767 diff --git a/src/BRepMesh/BRepMesh_ModelPreProcessor.cxx b/src/BRepMesh/BRepMesh_ModelPreProcessor.cxx index 5466059a53..4eefa24287 100644 --- a/src/BRepMesh/BRepMesh_ModelPreProcessor.cxx +++ b/src/BRepMesh/BRepMesh_ModelPreProcessor.cxx @@ -133,7 +133,7 @@ namespace { if (aDEdge->GetCurve()->ParametersNb() == 2) { - if (splitEdge (aDEdge, Abs (getConeStep (aDFace)))) + if (splitEdge (aDEdge, aDFace, Abs (getConeStep (aDFace)))) { TopLoc_Location aLoc; const Handle (Poly_Triangulation)& aTriangulation = @@ -178,48 +178,89 @@ namespace } //! Splits 3D and all pcurves accordingly using the specified step. - Standard_Boolean splitEdge(const IMeshData::IEdgePtr& theDEdge, - const Standard_Real theDU) const + Standard_Boolean splitEdge(const IMeshData::IEdgePtr& theDEdge, + const IMeshData::IFaceHandle& theDFace, + const Standard_Real theDU) const { - if (!splitCurve (theDEdge->GetCurve (), theDU)) + TopoDS_Edge aE = theDEdge->GetEdge(); + const TopoDS_Face& aF = theDFace->GetFace(); + + Standard_Real aFParam, aLParam; + + Handle(Geom_Curve) aHC = BRep_Tool::Curve (aE, aFParam, aLParam); + + const IMeshData::IPCurveHandle& aIPC1 = theDEdge->GetPCurve(0); + const IMeshData::IPCurveHandle& aIPC2 = theDEdge->GetPCurve(1); + + // Calculate the step by parameter of the curve. + const gp_Pnt2d& aFPntOfIPC1 = aIPC1->GetPoint (0); + const gp_Pnt2d& aLPntOfIPC1 = aIPC1->GetPoint (aIPC1->ParametersNb() - 1); + const Standard_Real aMod = Abs (aFPntOfIPC1.Y() - aLPntOfIPC1.Y()); + + if (aMod < gp::Resolution()) + { + return Standard_False; + } + + const Standard_Real aDT = Abs (aLParam - aFParam) / aMod * theDU; + + if (!splitCurve (aHC, theDEdge->GetCurve(), aDT)) + { + return Standard_False; + } + + // Define two pcurves of the seam-edge. + Handle(Geom2d_Curve) aPC1, aPC2; + Standard_Real af, al; + + aE.Orientation (TopAbs_FORWARD); + aPC1 = BRep_Tool::CurveOnSurface (aE, aF, af, al); + + aE.Orientation (TopAbs_REVERSED); + aPC2 = BRep_Tool::CurveOnSurface (aE, aF, af, al); + + if (aPC1.IsNull() || aPC2.IsNull()) { return Standard_False; } - for (Standard_Integer aPCurveIdx = 0; aPCurveIdx < theDEdge->PCurvesNb(); ++aPCurveIdx) + // Select the correct pcurve of the seam-edge. + const gp_Pnt2d& aFPntOfPC1 = aPC1->Value (aPC1->FirstParameter()); + + if (Abs (aLPntOfIPC1.X() - aFPntOfPC1.X()) > Precision::Confusion()) { - splitCurve (theDEdge->GetPCurve (aPCurveIdx), theDU); + std::swap (aPC1, aPC2); } + splitCurve (aPC1, aIPC1, aDT); + splitCurve (aPC2, aIPC2, aDT); + return Standard_True; } //! Splits the given curve using the specified step. - template - Standard_Boolean splitCurve(Curve& theCurve, const Standard_Real theDU) const + template + Standard_Boolean splitCurve(GeomCurve& theGeomCurve, + Curve& theCurve, + const Standard_Real theDT) const { Standard_Boolean isUpdated = Standard_False; - PointType aDir = theCurve->GetPoint(theCurve->ParametersNb() - 1).Coord() - theCurve->GetPoint(0).Coord(); - const Standard_Real aModulus = aDir.Modulus(); - if (aModulus < gp::Resolution()) - { - return isUpdated; - } - aDir /= aModulus; - const Standard_Real aLastParam = theCurve->GetParameter(theCurve->ParametersNb() - 1); - const Standard_Boolean isReversed = theCurve->GetParameter(0) > aLastParam; + const Standard_Real aFirstParam = theCurve->GetParameter (0); + const Standard_Real aLastParam = theCurve->GetParameter (theCurve->ParametersNb() - 1); + const Standard_Boolean isReversed = aFirstParam > aLastParam; + for (Standard_Integer aPointIdx = 1; ; ++aPointIdx) { - const Standard_Real aCurrParam = theCurve->GetParameter(0) + aPointIdx * theDU * (isReversed ? -1.0 : 1.0); - if (( isReversed && (aCurrParam < aLastParam)) || - (!isReversed && !(aCurrParam < aLastParam))) + const Standard_Real aCurrParam = aFirstParam + aPointIdx * theDT * (isReversed ? -1.0 : 1.0); + if (( isReversed && (aCurrParam - aLastParam < Precision::PConfusion())) || + (!isReversed && !(aCurrParam - aLastParam < - Precision::PConfusion()))) { break; } - theCurve->InsertPoint(theCurve->ParametersNb() - 1, - theCurve->GetPoint(0).Translated (aDir * aPointIdx * theDU), + theCurve->InsertPoint (theCurve->ParametersNb() - 1, + theGeomCurve->Value (aCurrParam), aCurrParam); isUpdated = Standard_True; diff --git a/tests/bugs/mesh/bug32767 b/tests/bugs/mesh/bug32767 new file mode 100644 index 0000000000..b5e472cfe6 --- /dev/null +++ b/tests/bugs/mesh/bug32767 @@ -0,0 +1,9 @@ +puts "================" +puts "0032767: Mesh - incorrect splitting of edges of seams leading to hang \[since OCCT 7.4.0\] " +puts "================" +puts "" + +restore [locate_data_file bug32767.brep] s +tclean s +incmesh s 0.01 +checktrinfo s -tri 3220 -nod 1770 -defl 0.018398669654253779 -tol_abs_defl 1e-6 \ No newline at end of file From e1f5ac2c9b9e3d4e4a804871d09083f7a9a11955 Mon Sep 17 00:00:00 2001 From: dpasukhi Date: Mon, 31 Jan 2022 11:09:20 +0300 Subject: [PATCH 207/639] 0032731: Data Exchange, Step Import - Incorrect PMI text location Added new complex Entity for representation of PMI Added moving the presentation with new entity --- src/RWStepAP214/RWStepAP214_GeneralModule.cxx | 20 +++- .../RWStepAP214_ReadWriteModule.cxx | 59 ++++++++++- src/RWStepVisual/FILES | 4 + ..._RWRepositionedTessellatedGeometricSet.cxx | 99 +++++++++++++++++++ ..._RWRepositionedTessellatedGeometricSet.hxx | 50 ++++++++++ ...epVisual_RWRepositionedTessellatedItem.cxx | 58 +++++++++++ ...epVisual_RWRepositionedTessellatedItem.hxx | 46 +++++++++ src/STEPCAFControl/STEPCAFControl_Reader.cxx | 22 ++++- src/StepAP214/StepAP214_Protocol.cxx | 4 + src/StepVisual/FILES | 4 + ...al_RepositionedTessellatedGeometricSet.cxx | 30 ++++++ ...al_RepositionedTessellatedGeometricSet.hxx | 50 ++++++++++ ...StepVisual_RepositionedTessellatedItem.cxx | 29 ++++++ ...StepVisual_RepositionedTessellatedItem.hxx | 49 +++++++++ tests/bugs/step/bug32731 | 17 ++++ 15 files changed, 535 insertions(+), 6 deletions(-) create mode 100644 src/RWStepVisual/RWStepVisual_RWRepositionedTessellatedGeometricSet.cxx create mode 100644 src/RWStepVisual/RWStepVisual_RWRepositionedTessellatedGeometricSet.hxx create mode 100644 src/RWStepVisual/RWStepVisual_RWRepositionedTessellatedItem.cxx create mode 100644 src/RWStepVisual/RWStepVisual_RWRepositionedTessellatedItem.hxx create mode 100644 src/StepVisual/StepVisual_RepositionedTessellatedGeometricSet.cxx create mode 100644 src/StepVisual/StepVisual_RepositionedTessellatedGeometricSet.hxx create mode 100644 src/StepVisual/StepVisual_RepositionedTessellatedItem.cxx create mode 100644 src/StepVisual/StepVisual_RepositionedTessellatedItem.hxx create mode 100644 tests/bugs/step/bug32731 diff --git a/src/RWStepAP214/RWStepAP214_GeneralModule.cxx b/src/RWStepAP214/RWStepAP214_GeneralModule.cxx index cea13b4ee6..3fd6358580 100644 --- a/src/RWStepAP214/RWStepAP214_GeneralModule.cxx +++ b/src/RWStepAP214/RWStepAP214_GeneralModule.cxx @@ -529,6 +529,8 @@ #include #include #include +#include +#include #include #include #include @@ -1088,6 +1090,8 @@ #include #include #include +#include +#include #include #include #include @@ -5890,7 +5894,13 @@ void RWStepAP214_GeneralModule::FillSharedCase(const Standard_Integer CN, tool.Share(anent, iter); } break; - + case 802: + { + DeclareAndCast(StepVisual_RepositionedTessellatedGeometricSet, anEnt, ent); + RWStepVisual_RWRepositionedTessellatedGeometricSet aTool; + aTool.Share(anEnt, iter); + break; + } default : break; } } @@ -8146,6 +8156,12 @@ Standard_Boolean RWStepAP214_GeneralModule::NewVoid case 801: ent = new StepKinematics_MechanismStateRepresentation; break; + case 802: + ent = new StepVisual_RepositionedTessellatedGeometricSet; + break; + case 803: + ent = new StepVisual_RepositionedTessellatedItem; + break; default: return Standard_False; @@ -8826,6 +8842,8 @@ Standard_Integer RWStepAP214_GeneralModule::CategoryNumber case 798: return cataux; case 800: return catsh; case 801: return cataux; + case 802: return cataux; + case 803: return cataux; default : break; } return 0; diff --git a/src/RWStepAP214/RWStepAP214_ReadWriteModule.cxx b/src/RWStepAP214/RWStepAP214_ReadWriteModule.cxx index fbc05b8024..fd15b8f029 100644 --- a/src/RWStepAP214/RWStepAP214_ReadWriteModule.cxx +++ b/src/RWStepAP214/RWStepAP214_ReadWriteModule.cxx @@ -258,6 +258,8 @@ IMPLEMENT_STANDARD_RTTIEXT(RWStepAP214_ReadWriteModule,StepData_ReadWriteModule) #include #include #include +#include +#include #include #include #include @@ -654,6 +656,8 @@ IMPLEMENT_STANDARD_RTTIEXT(RWStepAP214_ReadWriteModule,StepData_ReadWriteModule) #include #include #include +#include +#include #include #include #include @@ -2205,6 +2209,8 @@ static TCollection_AsciiString Reco_AnnotationPlane("ANNOTATION_PLANE"); static TCollection_AsciiString Reco_TessellatedAnnotationOccurrence("TESSELLATED_ANNOTATION_OCCURRENCE"); static TCollection_AsciiString Reco_TessellatedGeometricSet("TESSELLATED_GEOMETRIC_SET"); static TCollection_AsciiString Reco_TessellatedCurveSet("TESSELLATED_CURVE_SET"); +static TCollection_AsciiString Reco_TessellatedItem("TESSELLATED_ITEM"); +static TCollection_AsciiString Reco_RepositionedTessellatedItem("REPOSITIONED_TESSELLATED_ITEM"); static TCollection_AsciiString Reco_CoordinatesList("COORDINATES_LIST"); static TCollection_AsciiString Reco_ConstructiveGeometryRepresentation("CONSTRUCTIVE_GEOMETRY_REPRESENTATION"); static TCollection_AsciiString Reco_ConstructiveGeometryRepresentationRelationship("CONSTRUCTIVE_GEOMETRY_REPRESENTATION_RELATIONSHIP"); @@ -3035,6 +3041,7 @@ RWStepAP214_ReadWriteModule::RWStepAP214_ReadWriteModule () typenums.Bind(Reco_LinearFlexibleLinkRepresentation, 798); typenums.Bind(Reco_KinematicPair, 799); typenums.Bind(Reco_MechanismStateRepresentation, 801); + typenums.Bind(Reco_RepositionedTessellatedItem, 803); // SHORT NAMES @@ -3827,13 +3834,22 @@ Standard_Integer RWStepAP214_ReadWriteModule::CaseStep types(5).IsEqual(StepType(624))))) { return 705; } - if ((types(1).IsEqual(StepType(4))) && + else if ((types(1).IsEqual(StepType(4))) && (types(2).IsEqual(StepType(7))) && (types(3).IsEqual(StepType(144))) && (types(4).IsEqual(StepType(247))) && - (types(5).IsEqual(StepType(270)))) { + (types(5).IsEqual(StepType(270)))) + { return 719; } + else if ((types(1).IsEqual(StepType(144))) && + (types(2).IsEqual(StepType(803))) && + (types(3).IsEqual(StepType(247))) && + (types(4).IsEqual(StepType(709))) && + (types(5).IsEqual(StepType(708)))) + { + return 802; + } } else if (NbComp == 4) { if ((types(1).IsEqual(StepType(161))) && @@ -4903,6 +4919,7 @@ const TCollection_AsciiString& RWStepAP214_ReadWriteModule::StepType case 704: return Reco_AnnotationPlane; case 707 : return Reco_TessellatedAnnotationOccurrence; + case 708 : return Reco_TessellatedItem; case 709 : return Reco_TessellatedGeometricSet; case 710 : return Reco_TessellatedCurveSet; @@ -4996,7 +5013,7 @@ const TCollection_AsciiString& RWStepAP214_ReadWriteModule::StepType case 798: return Reco_LinearFlexibleLinkRepresentation; case 799: return Reco_KinematicPair; case 801: return Reco_MechanismStateRepresentation; - + case 803: return Reco_RepositionedTessellatedItem; default : return PasReco; } } @@ -5327,6 +5344,13 @@ Standard_Boolean RWStepAP214_ReadWriteModule::ComplexType(const Standard_Integer types.Append(StepType(759)); types.Append(StepType(247)); break; + case 802: + types.Append(StepType(144)); + types.Append(StepType(803)); + types.Append(StepType(247)); + types.Append(StepType(709)); + types.Append(StepType(708)); + break; default: return Standard_False; } return Standard_True; @@ -10473,6 +10497,20 @@ void RWStepAP214_ReadWriteModule::ReadStep(const Standard_Integer CN, tool.ReadStep(data, num, ach, anent); } break; + case 802: + { + DeclareAndCast(StepVisual_RepositionedTessellatedGeometricSet, anEnt, ent); + RWStepVisual_RWRepositionedTessellatedGeometricSet aTool; + aTool.ReadStep(data, num, ach, anEnt); + break; + } + case 803: + { + DeclareAndCast(StepVisual_RepositionedTessellatedItem, anEnt, ent); + RWStepVisual_RWRepositionedTessellatedItem aTool; + aTool.ReadStep(data, num, ach, anEnt); + break; + } default: ach->AddFail("Type Mismatch when reading - Entity"); @@ -15896,7 +15934,20 @@ void RWStepAP214_ReadWriteModule::WriteStep(const Standard_Integer CN, tool.WriteStep(SW, anent); } break; - + case 802: + { + DeclareAndCast(StepVisual_RepositionedTessellatedGeometricSet, anEnt, ent); + RWStepVisual_RWRepositionedTessellatedGeometricSet aTool; + aTool.WriteStep(SW, anEnt); + break; + } + case 803: + { + DeclareAndCast(StepVisual_RepositionedTessellatedItem, anEnt, ent); + RWStepVisual_RWRepositionedTessellatedItem aTool; + aTool.WriteStep(SW, anEnt); + break; + } default: return; } diff --git a/src/RWStepVisual/FILES b/src/RWStepVisual/FILES index 739e8d7c9e..5c396ba9ae 100644 --- a/src/RWStepVisual/FILES +++ b/src/RWStepVisual/FILES @@ -106,6 +106,10 @@ RWStepVisual_RWPresentationView.cxx RWStepVisual_RWPresentationView.hxx RWStepVisual_RWPresentedItemRepresentation.cxx RWStepVisual_RWPresentedItemRepresentation.hxx +RWStepVisual_RWRepositionedTessellatedGeometricSet.cxx +RWStepVisual_RWRepositionedTessellatedGeometricSet.hxx +RWStepVisual_RWRepositionedTessellatedItem.cxx +RWStepVisual_RWRepositionedTessellatedItem.hxx RWStepVisual_RWStyledItem.cxx RWStepVisual_RWStyledItem.hxx RWStepVisual_RWSurfaceSideStyle.cxx diff --git a/src/RWStepVisual/RWStepVisual_RWRepositionedTessellatedGeometricSet.cxx b/src/RWStepVisual/RWStepVisual_RWRepositionedTessellatedGeometricSet.cxx new file mode 100644 index 0000000000..6f173e8a19 --- /dev/null +++ b/src/RWStepVisual/RWStepVisual_RWRepositionedTessellatedGeometricSet.cxx @@ -0,0 +1,99 @@ +// Copyright (c) 2022 OPEN CASCADE SAS +// +// This file is part of Open CASCADE Technology software library. +// +// This library is free software; you can redistribute it and/or modify it under +// the terms of the GNU Lesser General Public License version 2.1 as published +// by the Free Software Foundation, with special exception defined in the file +// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT +// distribution for complete text of the license and disclaimer of any warranty. +// +// Alternatively, this file may be used under the terms of Open CASCADE +// commercial license or contractual agreement. + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +//======================================================================= +//function : ReadStep +//purpose : +//======================================================================= +void RWStepVisual_RWRepositionedTessellatedGeometricSet::ReadStep + (const Handle(StepData_StepReaderData)& theData, + const Standard_Integer theNum, + Handle(Interface_Check)& theAch, + const Handle(StepVisual_RepositionedTessellatedGeometricSet)& theEnt) const +{ + Standard_Integer aNum = 0; + theData->NamedForComplex("REPOSITIONED_TESSELLATED_ITEM", theNum, aNum, theAch); + if (!theData->CheckNbParams(aNum, 1, theAch, "location")) + return; + Handle(StepGeom_Axis2Placement3d) aLocation; + theData->ReadEntity(aNum,1,"location",theAch,STANDARD_TYPE(StepGeom_Axis2Placement3d), aLocation); + + theData->NamedForComplex("REPRESENTATION_ITEM", theNum, aNum, theAch); + if (!theData->CheckNbParams(aNum, 1, theAch, "name")) + return; + Handle(TCollection_HAsciiString) aName; + theData->ReadString (aNum, 1, "name", theAch, aName); + + theData->NamedForComplex("TESSELLATED_GEOMETRIC_SET", theNum, aNum, theAch); + NCollection_Handle anItems; + Standard_Integer aNSub2; + if (theData->ReadSubList (aNum,1,"items",theAch,aNSub2)) { + Standard_Integer aNb2 = theData->NbParams(aNSub2); + anItems = new StepVisual_Array1OfTessellatedItem(1, aNb2); + for (Standard_Integer i2 = 1; i2 <= aNb2; i2 ++) { + Handle(StepVisual_TessellatedItem) anItem; + if (theData->ReadEntity (aNSub2,i2,"item",theAch,STANDARD_TYPE(StepVisual_TessellatedItem), anItem)) + anItems->SetValue(i2,anItem); + } + } + theEnt->Init(aName, anItems, aLocation); +} + +//======================================================================= +//function : WriteStep +//purpose : +//======================================================================= +void RWStepVisual_RWRepositionedTessellatedGeometricSet::WriteStep + (StepData_StepWriter& theSW, + const Handle(StepVisual_RepositionedTessellatedGeometricSet)& theEnt) const +{ + theSW.StartEntity("GEOMETRIC_REPRESENTATION_ITEM"); + theSW.StartEntity("REPOSITIONED_TESSELLATED_ITEM"); + theSW.Send(theEnt->Location()); + theSW.StartEntity("REPRESENTATION_ITEM"); + theSW.Send(theEnt->Name()); + theSW.StartEntity("TESSELLATED_GEOMETRIC_SET"); + theSW.OpenSub(); + for(StepVisual_Array1OfTessellatedItem::Iterator anIter(*theEnt->Items()); + anIter.More(); anIter.Next()) + { + theSW.Send(anIter.Value()); + } + theSW.CloseSub(); + theSW.StartEntity("TESSELLATED_ITEM"); +} + +//======================================================================= +//function : Share +//purpose : +//======================================================================= +void RWStepVisual_RWRepositionedTessellatedGeometricSet::Share(const Handle(StepVisual_RepositionedTessellatedGeometricSet)& theEnt, + Interface_EntityIterator& theIter) const +{ + // Own field : children + for (Standard_Integer i = 1; i <= theEnt->Items()->Length(); i++) + theIter.AddItem(theEnt->Items()->Value(i)); + theIter.AddItem(theEnt->Location()); +} diff --git a/src/RWStepVisual/RWStepVisual_RWRepositionedTessellatedGeometricSet.hxx b/src/RWStepVisual/RWStepVisual_RWRepositionedTessellatedGeometricSet.hxx new file mode 100644 index 0000000000..80b8ba04c2 --- /dev/null +++ b/src/RWStepVisual/RWStepVisual_RWRepositionedTessellatedGeometricSet.hxx @@ -0,0 +1,50 @@ +// Copyright (c) 2022 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 _RWStepVisual_RWRepositionedTessellatedGeometricSet_HeaderFile +#define _RWStepVisual_RWRepositionedTessellatedGeometricSet_HeaderFile + +#include +#include + +class StepData_StepReaderData; +class Interface_Check; +class StepVisual_RepositionedTessellatedGeometricSet; +class StepData_StepWriter; +class Interface_EntityIterator; + +//! Read & Write tool for complex RepositionedTessellatedGeometricSet +class RWStepVisual_RWRepositionedTessellatedGeometricSet +{ +public: + + DEFINE_STANDARD_ALLOC + + //! Empty constructor + RWStepVisual_RWRepositionedTessellatedGeometricSet() {}; + + //! Reads RepositionedTessellatedGeometricSet + Standard_EXPORT void ReadStep (const Handle(StepData_StepReaderData)& theData, + const Standard_Integer theNum, + Handle(Interface_Check)& theAch, + const Handle(StepVisual_RepositionedTessellatedGeometricSet)& theEnt) const; + + //! Writes RepositionedTessellatedGeometricSet + Standard_EXPORT void WriteStep (StepData_StepWriter& theSW, + const Handle(StepVisual_RepositionedTessellatedGeometricSet)& theEnt) const; + + //! Fills data for graph (shared items) + Standard_EXPORT void Share (const Handle(StepVisual_RepositionedTessellatedGeometricSet)& theEnt, + Interface_EntityIterator& theIter) const; +}; +#endif // _RWStepVisual_RWRepositionedTessellatedGeometricSet_HeaderFile diff --git a/src/RWStepVisual/RWStepVisual_RWRepositionedTessellatedItem.cxx b/src/RWStepVisual/RWStepVisual_RWRepositionedTessellatedItem.cxx new file mode 100644 index 0000000000..f1e33ebba0 --- /dev/null +++ b/src/RWStepVisual/RWStepVisual_RWRepositionedTessellatedItem.cxx @@ -0,0 +1,58 @@ +// Copyright (c) 2022 OPEN CASCADE SAS +// +// This file is part of Open CASCADE Technology software library. +// +// This library is free software; you can redistribute it and/or modify it under +// the terms of the GNU Lesser General Public License version 2.1 as published +// by the Free Software Foundation, with special exception defined in the file +// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT +// distribution for complete text of the license and disclaimer of any warranty. +// +// Alternatively, this file may be used under the terms of Open CASCADE +// commercial license or contractual agreement. + +#include + +#include +#include +#include +#include +#include + +//======================================================================= +//function : ReadStep +//purpose : +//======================================================================= +void RWStepVisual_RWRepositionedTessellatedItem::ReadStep + (const Handle(StepData_StepReaderData)& theData, + const Standard_Integer theNum, + Handle(Interface_Check)& theAch, + const Handle(StepVisual_RepositionedTessellatedItem)& theEnt) const +{ + // --- Number of Parameter Control --- + if (!theData->CheckNbParams(theNum,2,theAch,"tessellated_item")) + return; + + // --- inherited field : name --- + Handle(TCollection_HAsciiString) aName; + theData->ReadString (theNum,1,"name",theAch,aName); + // --- inherited field : location --- + Handle(StepGeom_Axis2Placement3d) aLocation; + theData->ReadEntity(theNum,2,"location", theAch, STANDARD_TYPE(StepGeom_Axis2Placement3d),aLocation); + + //--- Initialisation of the read entity --- + theEnt->Init(aName, aLocation); +} + +//======================================================================= +//function : WriteStep +//purpose : +//======================================================================= +void RWStepVisual_RWRepositionedTessellatedItem::WriteStep + (StepData_StepWriter& theSW, + const Handle(StepVisual_RepositionedTessellatedItem)& theEnt) const +{ + // --- inherited field name --- + theSW.Send(theEnt->Name()); + theSW.Send(theEnt->Location()); +} diff --git a/src/RWStepVisual/RWStepVisual_RWRepositionedTessellatedItem.hxx b/src/RWStepVisual/RWStepVisual_RWRepositionedTessellatedItem.hxx new file mode 100644 index 0000000000..719db354b1 --- /dev/null +++ b/src/RWStepVisual/RWStepVisual_RWRepositionedTessellatedItem.hxx @@ -0,0 +1,46 @@ +// Copyright (c) 2022 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 _RWStepVisual_RWRepositionedTessellatedItem_HeaderFile +#define _RWStepVisual_RWRepositionedTessellatedItem_HeaderFile + +#include +#include +#include + +class StepData_StepReaderData; +class Interface_Check; +class StepVisual_RepositionedTessellatedItem; +class StepData_StepWriter; + +//! Read & Write tool for RepositionedTessellatedItem +class RWStepVisual_RWRepositionedTessellatedItem +{ +public: + + DEFINE_STANDARD_ALLOC + + //! Empty constructor + RWStepVisual_RWRepositionedTessellatedItem() {}; + + //! Reads RepositionedTessellatedItem + Standard_EXPORT void ReadStep (const Handle(StepData_StepReaderData)& theData, + const Standard_Integer theNum, + Handle(Interface_Check)& theAch, + const Handle(StepVisual_RepositionedTessellatedItem)& theEnt) const; + + //! Writes RepositionedTessellatedItem + Standard_EXPORT void WriteStep (StepData_StepWriter& theSW, + const Handle(StepVisual_RepositionedTessellatedItem)& theEnt) const; +}; +#endif // _RWStepVisual_RWRepositionedTessellatedItem_HeaderFile diff --git a/src/STEPCAFControl/STEPCAFControl_Reader.cxx b/src/STEPCAFControl/STEPCAFControl_Reader.cxx index fedf03721b..753531b91a 100644 --- a/src/STEPCAFControl/STEPCAFControl_Reader.cxx +++ b/src/STEPCAFControl/STEPCAFControl_Reader.cxx @@ -204,6 +204,7 @@ #include #include #include +#include #include #include #include @@ -1868,6 +1869,25 @@ Standard_Boolean readPMIPresentation(const Handle(Standard_Transient)& thePresen Handle(StepVisual_TessellatedGeometricSet) aTessSet = Handle(StepVisual_TessellatedGeometricSet)::DownCast(aTessItem); if (aTessSet.IsNull()) continue; + gp_Trsf aTransf; + if (aTessSet->IsKind(STANDARD_TYPE(StepVisual_RepositionedTessellatedGeometricSet))) + { + Handle(StepVisual_RepositionedTessellatedGeometricSet) aRTGS = + Handle(StepVisual_RepositionedTessellatedGeometricSet)::DownCast(aTessSet); + Handle(Geom_Axis2Placement) aLocation = StepToGeom::MakeAxis2Placement(aRTGS->Location()); + if (!aLocation.IsNull()) + { + const gp_Ax3 anAx3Orig = gp::XOY(); + const gp_Ax3 anAx3Targ(aLocation->Ax2()); + if (anAx3Targ.Location().SquareDistance(anAx3Orig.Location()) >= Precision::SquareConfusion() || + !anAx3Targ.Direction().IsEqual(anAx3Orig.Direction(), Precision::Angular()) || + !anAx3Targ.XDirection().IsEqual(anAx3Orig.XDirection(), Precision::Angular()) || + !anAx3Targ.YDirection().IsEqual(anAx3Orig.YDirection(), Precision::Angular())) + { + aTransf.SetTransformation(anAx3Targ, anAx3Orig); + } + } + } NCollection_Handle aListItems = aTessSet->Items(); Standard_Integer nb = aListItems.IsNull() ? 0 : aListItems->Length(); Handle(StepVisual_TessellatedCurveSet) aTessCurve; @@ -1913,7 +1933,7 @@ Standard_Boolean readPMIPresentation(const Handle(Standard_Transient)& thePresen } aB.Add(aComp, aCurW); } - anAnnotationShape = aComp; + anAnnotationShape = aComp.Moved(aTransf); } if (!anAnnotationShape.IsNull()) { diff --git a/src/StepAP214/StepAP214_Protocol.cxx b/src/StepAP214/StepAP214_Protocol.cxx index 7d69f8e42b..d4c4e3d074 100644 --- a/src/StepAP214/StepAP214_Protocol.cxx +++ b/src/StepAP214/StepAP214_Protocol.cxx @@ -738,6 +738,8 @@ static Standard_CString schemaAP242DIS = "AP242_MANAGED_MODEL_BASED_3D_ENGINEERI #include #include #include +#include +#include #include #include #include @@ -1626,6 +1628,8 @@ StepAP214_Protocol::StepAP214_Protocol () types.Bind(STANDARD_TYPE(StepKinematics_LinearFlexibleLinkRepresentation), 798); types.Bind(STANDARD_TYPE(StepKinematics_ActuatedKinPairAndOrderKinPair), 800); types.Bind(STANDARD_TYPE(StepKinematics_MechanismStateRepresentation), 801); + types.Bind(STANDARD_TYPE(StepVisual_RepositionedTessellatedGeometricSet), 802); + types.Bind(STANDARD_TYPE(StepVisual_RepositionedTessellatedItem), 803); } diff --git a/src/StepVisual/FILES b/src/StepVisual/FILES index b86995588f..83e199d91d 100644 --- a/src/StepVisual/FILES +++ b/src/StepVisual/FILES @@ -197,6 +197,10 @@ StepVisual_PresentedItemRepresentation.cxx StepVisual_PresentedItemRepresentation.hxx StepVisual_RenderingPropertiesSelect.cxx StepVisual_RenderingPropertiesSelect.hxx +StepVisual_RepositionedTessellatedGeometricSet.hxx +StepVisual_RepositionedTessellatedGeometricSet.cxx +StepVisual_RepositionedTessellatedItem.hxx +StepVisual_RepositionedTessellatedItem.cxx StepVisual_ShadingSurfaceMethod.hxx StepVisual_StyleContextSelect.cxx StepVisual_StyleContextSelect.hxx diff --git a/src/StepVisual/StepVisual_RepositionedTessellatedGeometricSet.cxx b/src/StepVisual/StepVisual_RepositionedTessellatedGeometricSet.cxx new file mode 100644 index 0000000000..20ac1d2515 --- /dev/null +++ b/src/StepVisual/StepVisual_RepositionedTessellatedGeometricSet.cxx @@ -0,0 +1,30 @@ +// Copyright (c) 2022 OPEN CASCADE SAS +// +// This file is part of Open CASCADE Technology software library. +// +// This library is free software; you can redistribute it and/or modify it under +// the terms of the GNU Lesser General Public License version 2.1 as published +// by the Free Software Foundation, with special exception defined in the file +// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT +// distribution for complete text of the license and disclaimer of any warranty. +// +// Alternatively, this file may be used under the terms of Open CASCADE +// commercial license or contractual agreement. + +#include + +#include + +IMPLEMENT_STANDARD_RTTIEXT(StepVisual_RepositionedTessellatedGeometricSet, StepVisual_TessellatedGeometricSet) + +//======================================================================= +//function : Init +//purpose : +//======================================================================= +void StepVisual_RepositionedTessellatedGeometricSet::Init(const Handle(TCollection_HAsciiString)& theName, + const NCollection_Handle& theItems, + const Handle(StepGeom_Axis2Placement3d)& theLocation) +{ + StepVisual_TessellatedGeometricSet::Init(theName, theItems); + myLocation = theLocation; +} diff --git a/src/StepVisual/StepVisual_RepositionedTessellatedGeometricSet.hxx b/src/StepVisual/StepVisual_RepositionedTessellatedGeometricSet.hxx new file mode 100644 index 0000000000..c037b015b6 --- /dev/null +++ b/src/StepVisual/StepVisual_RepositionedTessellatedGeometricSet.hxx @@ -0,0 +1,50 @@ +// Copyright (c) 2022 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 _StepVisual_RepositionedTessellatedGeometricSet_HeaderFile +#define _StepVisual_RepositionedTessellatedGeometricSet_HeaderFile + +#include + +class StepGeom_Axis2Placement3d; + +DEFINE_STANDARD_HANDLE(StepVisual_RepositionedTessellatedGeometricSet, StepVisual_TessellatedGeometricSet) + +//! Representation of complex STEP entity RepositionedTessellatedGeometricSet +class StepVisual_RepositionedTessellatedGeometricSet : public StepVisual_TessellatedGeometricSet +{ +public: + + DEFINE_STANDARD_ALLOC + + DEFINE_STANDARD_RTTIEXT(StepVisual_RepositionedTessellatedGeometricSet, StepVisual_TessellatedGeometricSet) + + //! Default constructor + StepVisual_RepositionedTessellatedGeometricSet() {}; + + //! Initialize all fields (own and inherited) + Standard_EXPORT void Init(const Handle(TCollection_HAsciiString)& theName, + const NCollection_Handle& theItems, + const Handle(StepGeom_Axis2Placement3d)& theLocation); + + //! Returns location + Handle(StepGeom_Axis2Placement3d) Location() const { return myLocation; } + + //! Sets location + void SetLocation(const Handle(StepGeom_Axis2Placement3d)& theLocation) { myLocation = theLocation; } + +private: + + Handle(StepGeom_Axis2Placement3d) myLocation; +}; +#endif // StepVisual_RepositionedTessellatedGeometricSet_HeaderFile diff --git a/src/StepVisual/StepVisual_RepositionedTessellatedItem.cxx b/src/StepVisual/StepVisual_RepositionedTessellatedItem.cxx new file mode 100644 index 0000000000..ef05a4ec1f --- /dev/null +++ b/src/StepVisual/StepVisual_RepositionedTessellatedItem.cxx @@ -0,0 +1,29 @@ +// Copyright (c) 2022 OPEN CASCADE SAS +// +// This file is part of Open CASCADE Technology software library. +// +// This library is free software; you can redistribute it and/or modify it under +// the terms of the GNU Lesser General Public License version 2.1 as published +// by the Free Software Foundation, with special exception defined in the file +// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT +// distribution for complete text of the license and disclaimer of any warranty. +// +// Alternatively, this file may be used under the terms of Open CASCADE +// commercial license or contractual agreement. + +#include + +#include + +IMPLEMENT_STANDARD_RTTIEXT(StepVisual_RepositionedTessellatedItem, StepVisual_TessellatedItem) + +//======================================================================= +//function : Init +//purpose : +//======================================================================= +void StepVisual_RepositionedTessellatedItem::Init(const Handle(TCollection_HAsciiString)& theName, + const Handle(StepGeom_Axis2Placement3d)& theLocation) +{ + StepVisual_TessellatedItem::Init(theName); + myLocation = theLocation; +} diff --git a/src/StepVisual/StepVisual_RepositionedTessellatedItem.hxx b/src/StepVisual/StepVisual_RepositionedTessellatedItem.hxx new file mode 100644 index 0000000000..b9b4dec5db --- /dev/null +++ b/src/StepVisual/StepVisual_RepositionedTessellatedItem.hxx @@ -0,0 +1,49 @@ +// Copyright (c) 2022 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 _StepVisual_RepositionedTessellatedItem_HeaderFile +#define _StepVisual_RepositionedTessellatedItem_HeaderFile + +#include + +class StepGeom_Axis2Placement3d; + +DEFINE_STANDARD_HANDLE(StepVisual_RepositionedTessellatedItem, StepVisual_TessellatedItem) + +//! Representation of STEP entity RepositionedTessellatedItem +class StepVisual_RepositionedTessellatedItem : public StepVisual_TessellatedItem +{ +public: + + DEFINE_STANDARD_RTTIEXT(StepVisual_RepositionedTessellatedItem, StepVisual_TessellatedItem) + + DEFINE_STANDARD_ALLOC + + //! Default constructor + StepVisual_RepositionedTessellatedItem() {}; + + //! Initialize all fields (own and inherited) + Standard_EXPORT void Init(const Handle(TCollection_HAsciiString)& theName, + const Handle(StepGeom_Axis2Placement3d)& theLocation); + + //! Returns location + Handle(StepGeom_Axis2Placement3d) Location() const { return myLocation; } + + //! Sets location + void SetLocation(const Handle(StepGeom_Axis2Placement3d)& theLocation) { myLocation = theLocation; } + +private: + + Handle(StepGeom_Axis2Placement3d) myLocation; +}; +#endif // StepVisual_RepositionedTessellatedItem_HeaderFile diff --git a/tests/bugs/step/bug32731 b/tests/bugs/step/bug32731 new file mode 100644 index 0000000000..f5779f111e --- /dev/null +++ b/tests/bugs/step/bug32731 @@ -0,0 +1,17 @@ +puts "=======" +puts "0032731: Data Exchange, Step Import - Incorrect PMI text location" +puts "=======" + +pload OCAF + +Close D -silent + +# Read file +ReadStep D [locate_data_file bug32731_A5E46910589A.stp] + +#Checking +XGetShape repr0 D 0:1:4:106:16 +checkgravitycenter repr0 -l -109.847 153.679 0 1e-7 + +XGetShape repr1 D 0:1:4:56:16 +checkgravitycenter repr1 -l -68.7 123.272 -18.5624 1e-7 From ae38730d3520fc8d0fbe4a3b9a97afd0cebe6df8 Mon Sep 17 00:00:00 2001 From: oan Date: Thu, 3 Feb 2022 13:20:59 +0300 Subject: [PATCH 208/639] 0032813: Units: ToSI and FromSI return cached dimension from previous request when parsing of unit sentence is failed Cache value only if all necessary preparation steps are done. --- src/Units/Units.cxx | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/Units/Units.cxx b/src/Units/Units.cxx index 802121ffe0..202f63c892 100644 --- a/src/Units/Units.cxx +++ b/src/Units/Units.cxx @@ -240,8 +240,6 @@ Standard_Real Units::ToSI(const Standard_Real aData, Handle(Units_Dimensions) &dim) { if(lastunit != aUnit ) { - - lastunit = TCollection_AsciiString(aUnit); Units_UnitSentence unitsentence(aUnit); if(!unitsentence.IsDone()) { #ifdef OCCT_DEBUG @@ -257,6 +255,7 @@ Standard_Real Units::ToSI(const Standard_Real aData, Handle(Units_ShiftedToken)::DownCast(token) ; lastmove = stoken->Move(); } + lastunit = TCollection_AsciiString(aUnit); lastdimension = token->Dimensions(); } dim = lastdimension; @@ -286,7 +285,6 @@ Standard_Real Units::FromSI(const Standard_Real aData, Handle(Units_Dimensions) &dim) { if(lastunit != aUnit) { - lastunit = TCollection_AsciiString(aUnit); Units_UnitSentence unitsentence(aUnit); if(!unitsentence.IsDone()) { #ifdef OCCT_DEBUG @@ -302,6 +300,7 @@ Standard_Real Units::FromSI(const Standard_Real aData, Handle(Units_ShiftedToken)::DownCast(token) ; lastmove = stoken->Move(); } + lastunit = TCollection_AsciiString(aUnit); lastdimension = token->Dimensions(); } dim = lastdimension; From e2d60d0f7f11151d1712bbe769f9b84fafa759e7 Mon Sep 17 00:00:00 2001 From: gka Date: Wed, 8 Nov 2017 17:13:53 +0300 Subject: [PATCH 209/639] 0029325: Modeling Algorithms - add tool BRepLib_PointCloudShape for generation point cloud for specified shape Added PLY writing tools RWPly_CafWriter and RWPly_PlyWriterContext. Added tool BRepLib_PointCloudShape generating point cloud from shape in two ways: - random points on surface with specified density; - points from triangulation nodes. StdPrs_ToolTriangulatedShape::ComputeNormals() has been moved to BRepLib_ToolTriangulatedShape for reusing outside of AIS. Command vpointcloud has been extended to use new generation tool. Command writeply has been added to write triangulation or point set into PLY format. --- adm/UDLIST | 1 + src/BRepLib/BRepLib_PointCloudShape.cxx | 307 +++++++++++++++++ src/BRepLib/BRepLib_PointCloudShape.hxx | 116 +++++++ src/BRepLib/BRepLib_ToolTriangulatedShape.cxx | 83 +++++ src/BRepLib/BRepLib_ToolTriangulatedShape.hxx | 50 +++ src/BRepLib/FILES | 4 + src/RWPly/FILES | 4 + src/RWPly/RWPly_CafWriter.cxx | 302 ++++++++++++++++ src/RWPly/RWPly_CafWriter.hxx | 198 +++++++++++ src/RWPly/RWPly_PlyWriterContext.cxx | 324 ++++++++++++++++++ src/RWPly/RWPly_PlyWriterContext.hxx | 142 ++++++++ src/StdPrs/StdPrs_ToolTriangulatedShape.cxx | 73 ---- src/StdPrs/StdPrs_ToolTriangulatedShape.hxx | 30 +- src/TKRWMesh/PACKAGES | 1 + src/ViewerTest/ViewerTest_ObjectCommands.cxx | 313 ++++++++--------- src/XSDRAWSTLVRML/XSDRAWSTLVRML.cxx | 294 ++++++++++++++++ tests/de_mesh/grids.list | 1 + tests/de_mesh/ply_write/equerre | 14 + tests/de_mesh/ply_write/sangle | 14 + tests/v3d/point_cloud/sphere | 2 +- 20 files changed, 2016 insertions(+), 257 deletions(-) create mode 100644 src/BRepLib/BRepLib_PointCloudShape.cxx create mode 100644 src/BRepLib/BRepLib_PointCloudShape.hxx create mode 100644 src/BRepLib/BRepLib_ToolTriangulatedShape.cxx create mode 100644 src/BRepLib/BRepLib_ToolTriangulatedShape.hxx create mode 100644 src/RWPly/FILES create mode 100644 src/RWPly/RWPly_CafWriter.cxx create mode 100644 src/RWPly/RWPly_CafWriter.hxx create mode 100644 src/RWPly/RWPly_PlyWriterContext.cxx create mode 100644 src/RWPly/RWPly_PlyWriterContext.hxx create mode 100644 tests/de_mesh/ply_write/equerre create mode 100644 tests/de_mesh/ply_write/sangle diff --git a/adm/UDLIST b/adm/UDLIST index 4cc783fdd6..dce2b25de8 100644 --- a/adm/UDLIST +++ b/adm/UDLIST @@ -454,6 +454,7 @@ t TKRWMesh n RWGltf n RWMesh n RWObj +n RWPly n DFBrowser n DFBrowserPane n DFBrowserPaneXDE diff --git a/src/BRepLib/BRepLib_PointCloudShape.cxx b/src/BRepLib/BRepLib_PointCloudShape.cxx new file mode 100644 index 0000000000..0dcb94a095 --- /dev/null +++ b/src/BRepLib/BRepLib_PointCloudShape.cxx @@ -0,0 +1,307 @@ +// Copyright (c) 2021 OPEN CASCADE SAS +// +// This file is part of Open CASCADE Technology software library. +// +// This library is free software; you can redistribute it and/or modify it under +// the terms of the GNU Lesser General Public License version 2.1 as published +// by the Free Software Foundation, with special exception defined in the file +// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT +// distribution for complete text of the license and disclaimer of any warranty. +// +// Alternatively, this file may be used under the terms of Open CASCADE +// commercial license or contractual agreement. + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +// ======================================================================= +// function : BRepLib_PointCloudShape +// purpose : +// ======================================================================= +BRepLib_PointCloudShape::BRepLib_PointCloudShape (const TopoDS_Shape& theShape, + const Standard_Real theTol) +: myShape (theShape), + myDist (0.0), + myTol (theTol), + myNbPoints (0) +{ + // +} + +// ======================================================================= +// function : ~BRepLib_PointCloudShape +// purpose : +// ======================================================================= +BRepLib_PointCloudShape::~BRepLib_PointCloudShape() +{ + // +} + +// ======================================================================= +// function : NbPointsByDensity +// purpose : +// ======================================================================= +Standard_Integer BRepLib_PointCloudShape::NbPointsByDensity (const Standard_Real theDensity) +{ + clear(); + Standard_Real aDensity = (theDensity < Precision::Confusion() ? computeDensity() : theDensity); + if (aDensity < Precision::Confusion()) + { + return 0; + } + + Standard_Integer aNbPoints = 0; + for (TopExp_Explorer aExpF(myShape, TopAbs_FACE); aExpF.More(); aExpF.Next()) + { + Standard_Real anArea = faceArea(aExpF.Current()); + + Standard_Integer aNbPnts = Max ((Standard_Integer)std::ceil(anArea / theDensity), 1); + myFacePoints.Bind(aExpF.Current(), aNbPnts); + aNbPoints+= aNbPnts; + } + return aNbPoints; +} + +// ======================================================================= +// function : GeneratePointsByDensity +// purpose : +// ======================================================================= +Standard_Boolean BRepLib_PointCloudShape::GeneratePointsByDensity (const Standard_Real theDensity) +{ + if (myFacePoints.IsEmpty()) + { + if (NbPointsByDensity (theDensity) == 0) + { + return Standard_False; + } + } + + Standard_Integer aNbAdded = 0; + for (TopExp_Explorer aExpF (myShape, TopAbs_FACE); aExpF.More(); aExpF.Next()) + { + if (addDensityPoints (aExpF.Current())) + { + aNbAdded++; + } + } + return (aNbAdded > 0); +} + +// ======================================================================= +// function : GeneratePointsByTriangulation +// purpose : +// ======================================================================= +Standard_Boolean BRepLib_PointCloudShape::GeneratePointsByTriangulation() +{ + clear(); + + Standard_Integer aNbAdded = 0; + for (TopExp_Explorer aExpF (myShape, TopAbs_FACE); aExpF.More(); aExpF.Next()) + { + if (addTriangulationPoints (aExpF.Current())) + { + aNbAdded++; + } + } + return (aNbAdded > 0); +} + +// ======================================================================= +// function : faceArea +// purpose : +// ======================================================================= +Standard_Real BRepLib_PointCloudShape::faceArea (const TopoDS_Shape& theShape) +{ + Standard_Real anArea = 0.0; + if (myFaceArea.Find (theShape, anArea)) + { + return anArea; + } + + GProp_GProps aFaceProps; + BRepGProp::SurfaceProperties (theShape, aFaceProps); + anArea = aFaceProps.Mass(); + myFaceArea.Bind (theShape, anArea); + return anArea; +} + +// ======================================================================= +// function : computeDensity +// purpose : +// ======================================================================= +Standard_Real BRepLib_PointCloudShape::computeDensity() +{ + // at first step find the face with smallest area + Standard_Real anAreaMin = Precision::Infinite(); + for (TopExp_Explorer aExpF (myShape, TopAbs_FACE); aExpF.More(); aExpF.Next()) + { + Standard_Real anArea = faceArea (aExpF.Current()); + if (anArea < myTol * myTol) + { + continue; + } + + if (anArea < anAreaMin) + { + anAreaMin = anArea; + } + } + return anAreaMin * 0.1; +} + +// ======================================================================= +// function : NbPointsByTriangulation +// purpose : +// ======================================================================= +Standard_Integer BRepLib_PointCloudShape::NbPointsByTriangulation() const +{ + // at first step find the face with smallest area + Standard_Integer aNbPoints = 0; + for (TopExp_Explorer aExpF (myShape, TopAbs_FACE); aExpF.More(); aExpF.Next()) + { + TopLoc_Location aLoc; + Handle(Poly_Triangulation) aTriangulation = BRep_Tool::Triangulation (TopoDS::Face (aExpF.Current()), aLoc); + if (aTriangulation.IsNull()) + { + continue; + } + + aNbPoints += aTriangulation->NbNodes(); + } + return aNbPoints; +} + +// ======================================================================= +// function : addDensityPoints +// purpose : +// ======================================================================= +Standard_Boolean BRepLib_PointCloudShape::addDensityPoints (const TopoDS_Shape& theFace) +{ + //addition of the points with specified density on the face by random way + Standard_Integer aNbPnts = (myFacePoints.IsBound (theFace) ? myFacePoints.Find (theFace) : 0); + if (aNbPnts == 0) + { + return Standard_False; + } + + TopoDS_Face aFace = TopoDS::Face (theFace); + Standard_Real anUMin = 0.0, anUMax = 0.0, aVMin = 0.0, aVMax = 0.0; + BRepTools::UVBounds (aFace, anUMin, anUMax, aVMin, aVMax); + BRepTopAdaptor_FClass2d aClassifier (aFace, Precision::Confusion()); + + TopLoc_Location aLoc = theFace.Location(); + const gp_Trsf& aTrsf = aLoc.Transformation(); + TopLoc_Location aLoc1; + Handle(Geom_Surface) aSurf = BRep_Tool::Surface (aFace, aLoc1); + if (aSurf.IsNull()) + { + return Standard_False; + } + + std::mt19937 aRandomGenerator(0); + std::uniform_real_distribution<> anUDistrib(anUMin, anUMax); + std::uniform_real_distribution<> aVDistrib (aVMin, aVMax); + for (Standard_Integer nbCurPnts = 1; nbCurPnts <= aNbPnts;) + { + const Standard_Real aU = anUDistrib(aRandomGenerator); + const Standard_Real aV = aVDistrib (aRandomGenerator); + gp_Pnt2d aUVNode (aU, aV); + const TopAbs_State aState = aClassifier.Perform (aUVNode); + if (aState == TopAbs_OUT) + { + continue; + } + + nbCurPnts++; + + gp_Pnt aP1; + gp_Vec dU, dV; + aSurf->D1 (aU, aV, aP1, dU, dV); + + gp_Vec aNorm = dU ^ dV; + if (aFace.Orientation() == TopAbs_REVERSED) + { + aNorm.Reverse(); + } + const Standard_Real aNormMod = aNorm.Magnitude(); + if (aNormMod > gp::Resolution()) + { + aNorm /= aNormMod; + } + if (myDist > Precision::Confusion()) + { + std::uniform_real_distribution<> aDistanceDistrib (0.0, myDist); + gp_XYZ aDeflPoint = aP1.XYZ() + aNorm.XYZ() * aDistanceDistrib (aRandomGenerator); + aP1.SetXYZ (aDeflPoint); + } + aP1.Transform (aTrsf); + if (aNormMod > gp::Resolution()) + { + aNorm = gp_Dir (aNorm).Transformed (aTrsf); + } + addPoint (aP1, aNorm, aUVNode, aFace); + } + return Standard_True; +} + +// ======================================================================= +// function : addTriangulationPoints +// purpose : +// ======================================================================= +Standard_Boolean BRepLib_PointCloudShape::addTriangulationPoints (const TopoDS_Shape& theFace) +{ + TopLoc_Location aLoc; + TopoDS_Face aFace = TopoDS::Face (theFace); + Handle(Poly_Triangulation) aTriangulation = BRep_Tool::Triangulation (aFace, aLoc); + if (aTriangulation.IsNull()) + { + return Standard_False; + } + + TopLoc_Location aLoc1; + Handle(Geom_Surface) aSurf = BRep_Tool::Surface (aFace, aLoc1); + const gp_Trsf& aTrsf = aLoc.Transformation(); + + BRepLib_ToolTriangulatedShape::ComputeNormals (aFace, aTriangulation); + Standard_Boolean aHasUVNode = aTriangulation->HasUVNodes(); + for (Standard_Integer aNodeIter = 1; aNodeIter <= aTriangulation->NbNodes(); ++aNodeIter) + { + gp_Pnt aP1 = aTriangulation->Node (aNodeIter); + gp_Dir aNormal = aTriangulation->Normal(aNodeIter); + if (!aLoc.IsIdentity()) + { + aP1 .Transform (aTrsf); + aNormal.Transform (aTrsf); + } + + const gp_Pnt2d anUVNode = aHasUVNode ? aTriangulation->UVNode (aNodeIter) : gp_Pnt2d(); + addPoint (aP1, aNormal, anUVNode, aFace); + } + return Standard_True; +} + +// ======================================================================= +// function : clear +// purpose : +// ======================================================================= +void BRepLib_PointCloudShape::clear() +{ + myFaceArea.Clear(); + myFacePoints.Clear(); +} diff --git a/src/BRepLib/BRepLib_PointCloudShape.hxx b/src/BRepLib/BRepLib_PointCloudShape.hxx new file mode 100644 index 0000000000..a771d5e86a --- /dev/null +++ b/src/BRepLib/BRepLib_PointCloudShape.hxx @@ -0,0 +1,116 @@ +// Copyright (c) 2021 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 _BRepLib_PointCloudShape_HeaderFile +#define _BRepLib_PointCloudShape_HeaderFile + +#include +#include +#include +#include + +//! This tool is intended to get points from shape with specified distance from shape along normal. +//! Can be used to simulation of points obtained in result of laser scan of shape. +//! There are 2 ways for generation points by shape: +//! 1. Generation points with specified density +//! 2. Generation points using triangulation Nodes +//! Generation of points by density using the GeneratePointsByDensity() function is not thread safe. +class BRepLib_PointCloudShape +{ +public: + + DEFINE_STANDARD_ALLOC + + //! Constructor initialized by shape + Standard_EXPORT BRepLib_PointCloudShape (const TopoDS_Shape& theShape = TopoDS_Shape(), + const Standard_Real theTol = Precision::Confusion()); + + //! Virtual destructor + Standard_EXPORT virtual ~BRepLib_PointCloudShape(); + + //! Return loaded shape. + const TopoDS_Shape& Shape() const { return myShape; } + + //! Set shape. + void SetShape (const TopoDS_Shape& theShape) { myShape = theShape; } + + //! Return tolerance. + Standard_Real Tolerance() const { return myTol; } + + //! Set tolerance. + void SetTolerance (Standard_Real theTol) { myTol = theTol; } + + //! Returns value of the distance to define deflection of points from shape along normal to shape; 0.0 by default. + Standard_Real GetDistance() const { return myDist; } + + //! Sets value of the distance to define deflection of points from shape along normal to shape. + //! Negative values of theDist parameter are ignored. + void SetDistance (const Standard_Real theDist) { myDist = theDist; } + + //! Returns size of the point cloud for specified density. + Standard_EXPORT Standard_Integer NbPointsByDensity (const Standard_Real theDensity = 0.0); + + //! Returns size of the point cloud for using triangulation. + Standard_EXPORT Standard_Integer NbPointsByTriangulation() const; + + //! Computes points with specified density for initial shape. + //! If parameter Density is equal to 0 then density will be computed automatically by criterion: + //! - 10 points per minimal unreduced face area. + //! + //! Note: this function should not be called from concurrent threads without external lock. + Standard_EXPORT Standard_Boolean GeneratePointsByDensity (const Standard_Real theDensity = 0.0); + + //! Get points from triangulation existing in the shape. + Standard_EXPORT Standard_Boolean GeneratePointsByTriangulation(); + +protected: + + //! Compute area of the specified face. + Standard_EXPORT Standard_Real faceArea (const TopoDS_Shape& theShape); + + //! Computes default density points per face. + Standard_EXPORT Standard_Real computeDensity(); + + //! Adds points to face in accordance with the specified density randomly in the specified range [0, Dist]. + Standard_EXPORT Standard_Boolean addDensityPoints (const TopoDS_Shape& theFace); + + //! Adds points to face by nodes of the existing triangulation randomly in the specified range [0, Dist]. + Standard_EXPORT Standard_Boolean addTriangulationPoints (const TopoDS_Shape& theFace); + +protected: + + //! Method to clear maps. + Standard_EXPORT virtual void clear(); + + //! Method to add point, normal to surface in this point and face for which point computed. + //! @param[in] thePoint 3D point on the surface + //! @param[in] theNorm surface normal at this point + //! @param[in] theUV surface UV parameters + //! @param[in] theFace surface (face) definition + Standard_EXPORT virtual void addPoint (const gp_Pnt& thePoint, + const gp_Vec& theNorm, + const gp_Pnt2d& theUV, + const TopoDS_Shape& theFace) = 0; + +protected: + + TopoDS_Shape myShape; + Standard_Real myDist; + Standard_Real myTol; + TopTools_DataMapOfShapeReal myFaceArea; + TopTools_DataMapOfShapeInteger myFacePoints; + Standard_Integer myNbPoints; + +}; + +#endif // _BRepLib_PointCloudShape_HeaderFile diff --git a/src/BRepLib/BRepLib_ToolTriangulatedShape.cxx b/src/BRepLib/BRepLib_ToolTriangulatedShape.cxx new file mode 100644 index 0000000000..45d92a3d33 --- /dev/null +++ b/src/BRepLib/BRepLib_ToolTriangulatedShape.cxx @@ -0,0 +1,83 @@ +// Copyright (c) 2021 OPEN CASCADE SAS +// +// This file is part of Open CASCADE Technology software library. +// +// This library is free software; you can redistribute it and/or modify it under +// the terms of the GNU Lesser General Public License version 2.1 as published +// by the Free Software Foundation, with special exception defined in the file +// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT +// distribution for complete text of the license and disclaimer of any warranty. +// +// Alternatively, this file may be used under the terms of Open CASCADE +// commercial license or contractual agreement. + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +// ======================================================================= +// function : ComputeNormals +// purpose : +// ======================================================================= +void BRepLib_ToolTriangulatedShape::ComputeNormals (const TopoDS_Face& theFace, + const Handle(Poly_Triangulation)& theTris, + Poly_Connect& thePolyConnect) +{ + if (theTris.IsNull() + || theTris->HasNormals()) + { + return; + } + + // take in face the surface location + const TopoDS_Face aZeroFace = TopoDS::Face (theFace.Located (TopLoc_Location())); + Handle(Geom_Surface) aSurf = BRep_Tool::Surface (aZeroFace); + if (!theTris->HasUVNodes() || aSurf.IsNull()) + { + // compute normals by averaging triangulation normals sharing the same vertex + Poly::ComputeNormals (theTris); + return; + } + + const Standard_Real aTol = Precision::Confusion(); + Standard_Integer aTri[3]; + gp_Dir aNorm; + theTris->AddNormals(); + for (Standard_Integer aNodeIter = 1; aNodeIter <= theTris->NbNodes(); ++aNodeIter) + { + // try to retrieve normal from real surface first, when UV coordinates are available + if (GeomLib::NormEstim (aSurf, theTris->UVNode (aNodeIter), aTol, aNorm) > 1) + { + if (thePolyConnect.Triangulation() != theTris) + { + thePolyConnect.Load (theTris); + } + + // compute flat normals + gp_XYZ eqPlan (0.0, 0.0, 0.0); + for (thePolyConnect.Initialize (aNodeIter); thePolyConnect.More(); thePolyConnect.Next()) + { + theTris->Triangle (thePolyConnect.Value()).Get (aTri[0], aTri[1], aTri[2]); + const gp_XYZ v1 (theTris->Node (aTri[1]).Coord() - theTris->Node (aTri[0]).Coord()); + const gp_XYZ v2 (theTris->Node (aTri[2]).Coord() - theTris->Node (aTri[1]).Coord()); + const gp_XYZ vv = v1 ^ v2; + const Standard_Real aMod = vv.Modulus(); + if (aMod >= aTol) + { + eqPlan += vv / aMod; + } + } + const Standard_Real aModMax = eqPlan.Modulus(); + aNorm = (aModMax > aTol) ? gp_Dir (eqPlan) : gp::DZ(); + } + + theTris->SetNormal (aNodeIter, aNorm); + } +} diff --git a/src/BRepLib/BRepLib_ToolTriangulatedShape.hxx b/src/BRepLib/BRepLib_ToolTriangulatedShape.hxx new file mode 100644 index 0000000000..ebfb1ae9c6 --- /dev/null +++ b/src/BRepLib/BRepLib_ToolTriangulatedShape.hxx @@ -0,0 +1,50 @@ +// Copyright (c) 2021 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 _BrepLib_ToolTriangulatedShape_HeaderFile +#define _BrepLib_ToolTriangulatedShape_HeaderFile + +#include +#include + +class TopoDS_Face; +class Poly_Triangulation; + +//! Provides methods for calculating normals to Poly_Triangulation of TopoDS_Face. +class BRepLib_ToolTriangulatedShape +{ +public: + + //! Computes nodal normals for Poly_Triangulation structure using UV coordinates and surface. + //! Does nothing if triangulation already defines normals. + //! @param[in] theFace the face + //! @param[in] theTris the definition of a face triangulation + static void ComputeNormals (const TopoDS_Face& theFace, + const Handle(Poly_Triangulation)& theTris) + { + Poly_Connect aPolyConnect; + ComputeNormals (theFace, theTris, aPolyConnect); + } + + //! Computes nodal normals for Poly_Triangulation structure using UV coordinates and surface. + //! Does nothing if triangulation already defines normals. + //! @param[in] theFace the face + //! @param[in] theTris the definition of a face triangulation + //! @param[in,out] thePolyConnect optional, initialized tool for exploring triangulation + Standard_EXPORT static void ComputeNormals (const TopoDS_Face& theFace, + const Handle(Poly_Triangulation)& theTris, + Poly_Connect& thePolyConnect); + +}; + +#endif diff --git a/src/BRepLib/FILES b/src/BRepLib/FILES index cf455709cf..2a967b5023 100755 --- a/src/BRepLib/FILES +++ b/src/BRepLib/FILES @@ -30,8 +30,12 @@ BRepLib_MakeVertex.hxx BRepLib_MakeWire.cxx BRepLib_MakeWire.hxx BRepLib_MakeWire_1.cxx +BRepLib_PointCloudShape.hxx +BRepLib_PointCloudShape.cxx BRepLib_ShapeModification.hxx BRepLib_ShellError.hxx +BRepLib_ToolTriangulatedShape.hxx +BRepLib_ToolTriangulatedShape.cxx BRepLib_ValidateEdge.cxx BRepLib_ValidateEdge.hxx BRepLib_WireError.hxx diff --git a/src/RWPly/FILES b/src/RWPly/FILES new file mode 100644 index 0000000000..9715e07b14 --- /dev/null +++ b/src/RWPly/FILES @@ -0,0 +1,4 @@ +RWPly_CafWriter.cxx +RWPly_CafWriter.hxx +RWPly_PlyWriterContext.cxx +RWPly_PlyWriterContext.hxx diff --git a/src/RWPly/RWPly_CafWriter.cxx b/src/RWPly/RWPly_CafWriter.cxx new file mode 100644 index 0000000000..656671a98b --- /dev/null +++ b/src/RWPly/RWPly_CafWriter.cxx @@ -0,0 +1,302 @@ +// Copyright (c) 2022 OPEN CASCADE SAS +// +// This file is part of Open CASCADE Technology software library. +// +// This library is free software; you can redistribute it and/or modify it under +// the terms of the GNU Lesser General Public License version 2.1 as published +// by the Free Software Foundation, with special exception defined in the file +// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT +// distribution for complete text of the license and disclaimer of any warranty. +// +// Alternatively, this file may be used under the terms of Open CASCADE +// commercial license or contractual agreement. + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +IMPLEMENT_STANDARD_RTTIEXT(RWPly_CafWriter, Standard_Transient) + +//================================================================ +// Function : Constructor +// Purpose : +//================================================================ +RWPly_CafWriter::RWPly_CafWriter (const TCollection_AsciiString& theFile) +: myFile (theFile), + myIsDoublePrec (false), + myHasNormals (true), + myHasColors (true), + myHasTexCoords (false), + myHasPartId (true), + myHasFaceId (false) +{ + // +} + +//================================================================ +// Function : Destructor +// Purpose : +//================================================================ +RWPly_CafWriter::~RWPly_CafWriter() +{ + // +} + +//================================================================ +// Function : toSkipFaceMesh +// Purpose : +//================================================================ +Standard_Boolean RWPly_CafWriter::toSkipFaceMesh (const RWMesh_FaceIterator& theFaceIter) +{ + return theFaceIter.IsEmptyMesh(); +} + +// ======================================================================= +// function : Perform +// purpose : +// ======================================================================= +bool RWPly_CafWriter::Perform (const Handle(TDocStd_Document)& theDocument, + const TColStd_IndexedDataMapOfStringString& theFileInfo, + const Message_ProgressRange& theProgress) +{ + TDF_LabelSequence aRoots; + Handle(XCAFDoc_ShapeTool) aShapeTool = XCAFDoc_DocumentTool::ShapeTool (theDocument->Main()); + aShapeTool->GetFreeShapes (aRoots); + return Perform (theDocument, aRoots, NULL, theFileInfo, theProgress); +} + +// ======================================================================= +// function : Perform +// purpose : +// ======================================================================= +bool RWPly_CafWriter::Perform (const Handle(TDocStd_Document)& theDocument, + const TDF_LabelSequence& theRootLabels, + const TColStd_MapOfAsciiString* theLabelFilter, + const TColStd_IndexedDataMapOfStringString& theFileInfo, + const Message_ProgressRange& theProgress) +{ + TCollection_AsciiString aFolder, aFileName, aFullFileNameBase, aShortFileNameBase, aFileExt; + OSD_Path::FolderAndFileFromPath (myFile, aFolder, aFileName); + OSD_Path::FileNameAndExtension (aFileName, aShortFileNameBase, aFileExt); + + Standard_Real aLengthUnit = 1.; + if (XCAFDoc_DocumentTool::GetLengthUnit(theDocument, aLengthUnit)) + { + myCSTrsf.SetInputLengthUnit(aLengthUnit); + } + + if (theRootLabels.IsEmpty() + || (theLabelFilter != NULL && theLabelFilter->IsEmpty())) + { + Message::SendFail ("Nothing to export into PLY file"); + return false; + } + + Standard_Integer aNbNodesAll = 0, aNbElemsAll = 0; + Standard_Real aNbPEntities = 0; // steps for progress range + for (XCAFPrs_DocumentExplorer aDocExplorer (theDocument, theRootLabels, XCAFPrs_DocumentExplorerFlags_OnlyLeafNodes); + aDocExplorer.More(); aDocExplorer.Next()) + { + const XCAFPrs_DocumentNode& aDocNode = aDocExplorer.Current(); + if (theLabelFilter != NULL + && !theLabelFilter->Contains (aDocNode.Id)) + { + continue; + } + + for (RWMesh_FaceIterator aFaceIter (aDocNode.RefLabel, aDocNode.Location, true, aDocNode.Style); aFaceIter.More(); aFaceIter.Next()) + { + if (toSkipFaceMesh (aFaceIter)) + { + continue; + } + + addFaceInfo (aFaceIter, aNbNodesAll, aNbElemsAll); + aNbPEntities += aNbNodesAll + aNbElemsAll; + } + } + if (aNbNodesAll == 0) + { + Message::SendFail ("No mesh data to save"); + return false; + } + + Standard_CLocaleSentry aLocaleSentry; + RWPly_PlyWriterContext aPlyCtx; + aPlyCtx.SetDoublePrecision (myIsDoublePrec); + aPlyCtx.SetNormals (myHasNormals); + aPlyCtx.SetColors (myHasColors); + aPlyCtx.SetTexCoords (myHasTexCoords); + aPlyCtx.SetSurfaceId (myHasPartId || myHasFaceId); + if (!aPlyCtx.Open (myFile) + || !aPlyCtx.WriteHeader (aNbNodesAll, aNbElemsAll, theFileInfo)) + { + return false; + } + + // simple global progress sentry + const Standard_Real aPatchStep = 2048.0; + Message_LazyProgressScope aPSentry (theProgress, "PLY export", aNbPEntities, aPatchStep); + + bool isDone = true; + for (Standard_Integer aStepIter = 0; aStepIter < 2; ++aStepIter) + { + aPlyCtx.SetSurfaceId (0); + for (XCAFPrs_DocumentExplorer aDocExplorer (theDocument, theRootLabels, XCAFPrs_DocumentExplorerFlags_OnlyLeafNodes); + aDocExplorer.More() && !aPSentry.IsAborted(); aDocExplorer.Next()) + { + const XCAFPrs_DocumentNode& aDocNode = aDocExplorer.Current(); + if (theLabelFilter != NULL + && !theLabelFilter->Contains (aDocNode.Id)) + { + continue; + } + + if (myHasPartId) + { + aPlyCtx.SetSurfaceId (aPlyCtx.SurfaceId() + 1); + } + if (!writeShape (aPlyCtx, aPSentry, aStepIter, aDocNode.RefLabel, aDocNode.Location, aDocNode.Style)) + { + isDone = false; + break; + } + } + } + + const bool isClosed = aPlyCtx.Close(); + if (isDone && !isClosed) + { + Message::SendFail (TCollection_AsciiString ("Failed to write PLY file\n") + myFile); + return false; + } + return isDone && !aPSentry.IsAborted(); +} + +// ======================================================================= +// function : addFaceInfo +// purpose : +// ======================================================================= +void RWPly_CafWriter::addFaceInfo (const RWMesh_FaceIterator& theFace, + Standard_Integer& theNbNodes, + Standard_Integer& theNbElems) +{ + theNbNodes += theFace.NbNodes(); + theNbElems += theFace.NbTriangles(); +} + +// ======================================================================= +// function : writeShape +// purpose : +// ======================================================================= +bool RWPly_CafWriter::writeShape (RWPly_PlyWriterContext& theWriter, + Message_LazyProgressScope& thePSentry, + const Standard_Integer theWriteStep, + const TDF_Label& theLabel, + const TopLoc_Location& theParentTrsf, + const XCAFPrs_Style& theParentStyle) +{ + for (RWMesh_FaceIterator aFaceIter (theLabel, theParentTrsf, true, theParentStyle); aFaceIter.More() && !thePSentry.IsAborted(); aFaceIter.Next()) + { + if (toSkipFaceMesh (aFaceIter)) + { + continue; + } + + if (theWriteStep == 0 + && !writeNodes (theWriter, thePSentry, aFaceIter)) + { + return false; + } + if (theWriteStep == 1 + && !writeIndices (theWriter, thePSentry, aFaceIter)) + { + return false; + } + } + return true; +} + +// ======================================================================= +// function : writeNodes +// purpose : +// ======================================================================= +bool RWPly_CafWriter::writeNodes (RWPly_PlyWriterContext& theWriter, + Message_LazyProgressScope& thePSentry, + const RWMesh_FaceIterator& theFace) +{ + const Standard_Integer aNodeUpper = theFace.NodeUpper(); + Graphic3d_Vec3 aNormVec; + Graphic3d_Vec2 aTexVec; + Graphic3d_Vec4ub aColorVec (255); + if (theFace.HasFaceColor()) + { + //Graphic3d_Vec4 aColorF = Quantity_ColorRGBA::Convert_LinearRGB_To_sRGB (theFace.FaceColor()); + Graphic3d_Vec4 aColorF = theFace.FaceColor(); + aColorVec.SetValues ((unsigned char )int(aColorF.r() * 255.0f), + (unsigned char )int(aColorF.g() * 255.0f), + (unsigned char )int(aColorF.b() * 255.0f), + (unsigned char )int(aColorF.a() * 255.0f)); + } + for (Standard_Integer aNodeIter = theFace.NodeLower(); aNodeIter <= aNodeUpper && thePSentry.More(); ++aNodeIter, thePSentry.Next()) + { + gp_XYZ aNode = theFace.NodeTransformed (aNodeIter).XYZ(); + myCSTrsf.TransformPosition (aNode); + if (theFace.HasNormals()) + { + gp_Dir aNorm = theFace.NormalTransformed (aNodeIter); + aNormVec.SetValues ((float )aNorm.X(), (float )aNorm.Y(), (float )aNorm.Z()); + myCSTrsf.TransformNormal (aNormVec); + } + if (theFace.HasTexCoords()) + { + const gp_Pnt2d aUV = theFace.NodeTexCoord (aNodeIter); + aTexVec.SetValues ((float )aUV.X(), (float )aUV.Y()); + } + + if (!theWriter.WriteVertex (aNode, aNormVec, aTexVec, aColorVec)) + { + return false; + } + } + return true; +} + +// ======================================================================= +// function : writeIndices +// purpose : +// ======================================================================= +bool RWPly_CafWriter::writeIndices (RWPly_PlyWriterContext& theWriter, + Message_LazyProgressScope& thePSentry, + const RWMesh_FaceIterator& theFace) +{ + if (myHasFaceId) + { + theWriter.SetSurfaceId (theWriter.SurfaceId() + 1); + } + + const Standard_Integer anElemLower = theFace.ElemLower(); + const Standard_Integer anElemUpper = theFace.ElemUpper(); + for (Standard_Integer anElemIter = anElemLower; anElemIter <= anElemUpper && thePSentry.More(); ++anElemIter, thePSentry.Next()) + { + const Poly_Triangle aTri = theFace.TriangleOriented (anElemIter); + if (!theWriter.WriteTriangle (Graphic3d_Vec3i (aTri(1), aTri(2), aTri(3)) - Graphic3d_Vec3i (anElemLower))) + { + return false; + } + } + + theWriter.SetVertexOffset (theWriter.VertexOffset() + theFace.NbNodes()); + return true; +} diff --git a/src/RWPly/RWPly_CafWriter.hxx b/src/RWPly/RWPly_CafWriter.hxx new file mode 100644 index 0000000000..6a7d4a489d --- /dev/null +++ b/src/RWPly/RWPly_CafWriter.hxx @@ -0,0 +1,198 @@ +// Copyright (c) 2022 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 _RWPly_CafWriter_HeaderFiler +#define _RWPly_CafWriter_HeaderFiler + +#include +#include +#include +#include +#include +#include + +#include + +class Message_ProgressRange; +class RWMesh_FaceIterator; +class TDocStd_Document; + +class Message_LazyProgressScope; +class RWPly_PlyWriterContext; + +//! PLY writer context from XCAF document. +class RWPly_CafWriter : public Standard_Transient +{ + DEFINE_STANDARD_RTTIEXT(RWPly_CafWriter, Standard_Transient) +public: + + //! Main constructor. + //! @param[in] theFile path to output PLY file + Standard_EXPORT RWPly_CafWriter (const TCollection_AsciiString& theFile); + + //! Destructor. + Standard_EXPORT virtual ~RWPly_CafWriter(); + + //! Return transformation from OCCT to PLY coordinate system. + const RWMesh_CoordinateSystemConverter& CoordinateSystemConverter() const { return myCSTrsf; } + + //! Return transformation from OCCT to PLY coordinate system. + RWMesh_CoordinateSystemConverter& ChangeCoordinateSystemConverter() { return myCSTrsf; } + + //! Set transformation from OCCT to PLY coordinate system. + void SetCoordinateSystemConverter (const RWMesh_CoordinateSystemConverter& theConverter) { myCSTrsf = theConverter; } + + //! Return default material definition to be used for nodes with only color defined. + const XCAFPrs_Style& DefaultStyle() const { return myDefaultStyle; } + + //! Set default material definition to be used for nodes with only color defined. + void SetDefaultStyle (const XCAFPrs_Style& theStyle) { myDefaultStyle = theStyle; } + +public: + + //! Return TRUE if vertex position should be stored with double floating point precision; FALSE by default. + bool IsDoublePrecision() const { return myIsDoublePrec; } + + //! Set if vertex position should be stored with double floating point precision. + void SetDoublePrecision (bool theDoublePrec) { myIsDoublePrec = theDoublePrec; } + + //! Return TRUE if normals should be written; TRUE by default. + bool HasNormals() const { return myHasNormals; } + + //! Set if normals are defined. + void SetNormals (const bool theHasNormals) { myHasNormals = theHasNormals; } + + //! Return TRUE if UV / texture coordinates should be written; FALSE by default. + bool HasTexCoords() const { return myHasTexCoords; } + + //! Set if UV / texture coordinates should be written. + void SetTexCoords (const bool theHasTexCoords) { myHasTexCoords = theHasTexCoords; } + + //! Return TRUE if point colors should be written; TRUE by default. + bool HasColors() const { return myHasColors; } + + //! Set if point colors should be written. + void SetColors (bool theToWrite) { myHasColors = theToWrite; } + + //! Return TRUE if part Id should be written as element attribute; TRUE by default. + bool HasPartId() const { return myHasPartId; } + + //! Set if part Id should be written as element attribute; FALSE by default. + //! Cannot be combined with HasFaceId(). + void SetPartId (bool theSurfId) + { + myHasPartId = theSurfId; + myHasFaceId = myHasFaceId && !myHasPartId; + } + + //! Return TRUE if face Id should be written as element attribute; FALSE by default. + bool HasFaceId() const { return myHasFaceId; } + + //! Set if face Id should be written as element attribute; FALSE by default. + //! Cannot be combined with HasPartId(). + void SetFaceId (bool theSurfId) + { + myHasFaceId = theSurfId; + myHasPartId = myHasPartId && !myHasFaceId; + } + +public: + + //! Write PLY file and associated MTL material file. + //! Triangulation data should be precomputed within shapes! + //! @param[in] theDocument input document + //! @param[in] theRootLabels list of root shapes to export + //! @param[in] theLabelFilter optional filter with document nodes to export, + //! with keys defined by XCAFPrs_DocumentExplorer::DefineChildId() and filled recursively + //! (leaves and parent assembly nodes at all levels); + //! when not NULL, all nodes not included into the map will be ignored + //! @param[in] theFileInfo map with file metadata to put into PLY header section + //! @param[in] theProgress optional progress indicator + //! @return FALSE on file writing failure + Standard_EXPORT virtual bool Perform (const Handle(TDocStd_Document)& theDocument, + const TDF_LabelSequence& theRootLabels, + const TColStd_MapOfAsciiString* theLabelFilter, + const TColStd_IndexedDataMapOfStringString& theFileInfo, + const Message_ProgressRange& theProgress); + + //! Write PLY file and associated MTL material file. + //! Triangulation data should be precomputed within shapes! + //! @param[in] theDocument input document + //! @param[in] theFileInfo map with file metadata to put into PLY header section + //! @param[in] theProgress optional progress indicator + //! @return FALSE on file writing failure + Standard_EXPORT virtual bool Perform (const Handle(TDocStd_Document)& theDocument, + const TColStd_IndexedDataMapOfStringString& theFileInfo, + const Message_ProgressRange& theProgress); + +protected: + + //! Return TRUE if face mesh should be skipped (e.g. because it is invalid or empty). + Standard_EXPORT virtual Standard_Boolean toSkipFaceMesh (const RWMesh_FaceIterator& theFaceIter); + + //! Collect face triangulation info. + //! @param[in] theFace face to process + //! @param[in,out] theNbNodes overall number of triangulation nodes (should be appended) + //! @param[in,out] theNbElems overall number of triangulation elements (should be appended) + Standard_EXPORT virtual void addFaceInfo (const RWMesh_FaceIterator& theFace, + Standard_Integer& theNbNodes, + Standard_Integer& theNbElems); + + //! Write the shape. + //! @param[in] theWriter PLY writer context + //! @param[in] thePSentry progress sentry + //! @param[in] theWriteStep export step, 0 for vertex attributes, 1 for elements + //! @param[in] theLabel document label to process + //! @param[in] theParentTrsf parent node transformation + //! @param[in] theParentStyle parent node style + Standard_EXPORT virtual bool writeShape (RWPly_PlyWriterContext& theWriter, + Message_LazyProgressScope& thePSentry, + const Standard_Integer theWriteStep, + const TDF_Label& theLabel, + const TopLoc_Location& theParentTrsf, + const XCAFPrs_Style& theParentStyle); + + //! Write face triangle vertices and attributes. + //! @param[in] theWriter PLY writer context + //! @param[in] thePSentry progress sentry + //! @param[in] theFace current face + //! @return FALSE on writing file error + Standard_EXPORT virtual bool writeNodes (RWPly_PlyWriterContext& theWriter, + Message_LazyProgressScope& thePSentry, + const RWMesh_FaceIterator& theFace); + + //! Write face triangles indices. + //! @param[in] theWriter PLY writer context + //! @param[in] thePSentry progress sentry + //! @param[in] theFace current face + //! @return FALSE on writing file error + Standard_EXPORT virtual bool writeIndices (RWPly_PlyWriterContext& theWriter, + Message_LazyProgressScope& thePSentry, + const RWMesh_FaceIterator& theFace); + + +protected: + + TCollection_AsciiString myFile; //!< output PLY file + RWMesh_CoordinateSystemConverter myCSTrsf; //!< transformation from OCCT to PLY coordinate system + XCAFPrs_Style myDefaultStyle; //!< default material definition to be used for nodes with only color defined + Standard_Boolean myIsDoublePrec; + Standard_Boolean myHasNormals; + Standard_Boolean myHasColors; + Standard_Boolean myHasTexCoords; + Standard_Boolean myHasPartId; + Standard_Boolean myHasFaceId; + +}; + +#endif // _RWPly_CafWriter_HeaderFiler diff --git a/src/RWPly/RWPly_PlyWriterContext.cxx b/src/RWPly/RWPly_PlyWriterContext.cxx new file mode 100644 index 0000000000..ff94ef4965 --- /dev/null +++ b/src/RWPly/RWPly_PlyWriterContext.cxx @@ -0,0 +1,324 @@ +// Copyright (c) 2022 OPEN CASCADE SAS +// +// This file is part of Open CASCADE Technology software library. +// +// This library is free software; you can redistribute it and/or modify it under +// the terms of the GNU Lesser General Public License version 2.1 as published +// by the Free Software Foundation, with special exception defined in the file +// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT +// distribution for complete text of the license and disclaimer of any warranty. +// +// Alternatively, this file may be used under the terms of Open CASCADE +// commercial license or contractual agreement. + +#include + +#include +#include +#include + +// ======================================================================= +// function : splitLines +// purpose : +// ======================================================================= +static void splitLines (const TCollection_AsciiString& theString, + NCollection_IndexedMap& theLines) +{ + if (theString.IsEmpty()) + { + return; + } + + Standard_Integer aLineFrom = 1; + for (Standard_Integer aCharIter = 1;; ++aCharIter) + { + const char aChar = theString.Value (aCharIter); + if (aChar != '\r' + && aChar != '\n' + && aCharIter != theString.Length()) + { + continue; + } + + if (aLineFrom != aCharIter) + { + TCollection_AsciiString aLine = theString.SubString (aLineFrom, aCharIter); + aLine.RightAdjust(); + theLines.Add (aLine); + } + + if (aCharIter == theString.Length()) + { + break; + } + else if (aChar == '\r' + && theString.Value (aCharIter + 1) == '\n') + { + // CRLF + ++aCharIter; + } + aLineFrom = aCharIter + 1; + } +} + +// ================================================================ +// Function : RWPly_PlyWriterContext +// Purpose : +// ================================================================ +RWPly_PlyWriterContext::RWPly_PlyWriterContext() +: myNbHeaderVerts (0), + myNbHeaderElems (0), + myNbVerts (0), + myNbElems (0), + mySurfId (0), + myVertOffset (0), + myIsDoublePrec (false), + myHasNormals (false), + myHasColors (false), + myHasTexCoords (false), + myHasSurfId (false) +{ + // +} + +// ================================================================ +// Function : ~RWPly_PlyWriterContext +// Purpose : +// ================================================================ +RWPly_PlyWriterContext::~RWPly_PlyWriterContext() +{ + Close(); +} + +// ================================================================ +// Function : Open +// Purpose : +// ================================================================ +bool RWPly_PlyWriterContext::Open (const TCollection_AsciiString& theName, + const std::shared_ptr& theStream) +{ + myName = theName; + myNbHeaderVerts = myNbHeaderElems = 0; + myNbVerts = myNbElems = 0; + if (theStream.get() != nullptr) + { + myStream = theStream; + return true; + } + + const Handle(OSD_FileSystem)& aFileSystem = OSD_FileSystem::DefaultFileSystem(); + myStream = aFileSystem->OpenOStream (theName, std::ios::out | std::ios::binary); + if (myStream.get() == NULL || !myStream->good()) + { + myStream.reset(); + Message::SendFail() << "Error: file cannot be created\n" << theName; + return false; + } + return true; +} + +// ================================================================ +// Function : Close +// Purpose : +// ================================================================ +bool RWPly_PlyWriterContext::Close (bool theIsAborted) +{ + if (myStream.get() == nullptr) + { + return false; + } + + myStream->flush(); + bool aResult = myStream->good(); + if (!aResult) + { + Message::SendFail() << "Error: file cannot be written\n" << myName; + } + else if (!theIsAborted) + { + if (myNbVerts != myNbHeaderVerts) + { + Message::SendFail() << "Error: written less number of vertices (" << myNbVerts << ") than specified in PLY header (" << myNbHeaderVerts << ")"; + } + else if (myNbElems != myNbHeaderElems) + { + Message::SendFail() << "Error: written less number of elements (" << myNbElems << ") than specified in PLY header (" << myNbHeaderElems << ")"; + } + } + myStream.reset(); + return aResult; +} + +// ================================================================ +// Function : WriteHeader +// Purpose : +// ================================================================ +bool RWPly_PlyWriterContext::WriteHeader (const Standard_Integer theNbNodes, + const Standard_Integer theNbElems, + const TColStd_IndexedDataMapOfStringString& theFileInfo) +{ + if (myStream.get() == nullptr) + { + return false; + } + + myNbHeaderVerts = theNbNodes; + myNbHeaderElems = theNbElems; + *myStream << "ply\n" + "format ascii 1.0\n" + "comment Exported by Open CASCADE Technology [dev.opencascade.org]\n"; + for (TColStd_IndexedDataMapOfStringString::Iterator aKeyValueIter (theFileInfo); aKeyValueIter.More(); aKeyValueIter.Next()) + { + NCollection_IndexedMap aKeyLines, aValLines; + splitLines (aKeyValueIter.Key(), aKeyLines); + splitLines (aKeyValueIter.Value(), aValLines); + for (Standard_Integer aLineIter = 1; aLineIter <= aKeyLines.Extent(); ++aLineIter) + { + const TCollection_AsciiString& aLine = aKeyLines.FindKey (aLineIter); + *myStream << (aLineIter > 1 ? "\n" : "") << "comment " << aLine; + } + *myStream << (!aKeyLines.IsEmpty() ? ":" : "comment "); + for (Standard_Integer aLineIter = 1; aLineIter <= aValLines.Extent(); ++aLineIter) + { + const TCollection_AsciiString& aLine = aValLines.FindKey (aLineIter); + *myStream << (aLineIter > 1 ? "\n" : "") << "comment " << aLine; + } + *myStream << "\n"; + } + + *myStream << "element vertex " << theNbNodes<< "\n"; + if (myIsDoublePrec) + { + *myStream << "property double x\n" + "property double y\n" + "property double z\n"; + } + else + { + *myStream << "property float x\n" + "property float y\n" + "property float z\n"; + } + if (myHasNormals) + { + *myStream << "property float nx\n" + "property float ny\n" + "property float nz\n"; + } + if (myHasTexCoords) + { + *myStream << "property float s\n" + "property float t\n"; + } + if (myHasColors) + { + *myStream << "property uchar red\n" + "property uchar green\n" + "property uchar blue\n"; + } + + if (theNbElems > 0) + { + *myStream << "element face " << theNbElems << "\n" + "property list uchar uint vertex_indices\n"; + if (myHasSurfId) + { + *myStream << "property uint SurfaceID\n"; + } + } + + *myStream << "end_header\n"; + return myStream->good(); +} + +// ================================================================ +// Function : WriteVertex +// Purpose : +// ================================================================ +bool RWPly_PlyWriterContext::WriteVertex (const gp_Pnt& thePoint, + const Graphic3d_Vec3& theNorm, + const Graphic3d_Vec2& theUV, + const Graphic3d_Vec4ub& theColor) +{ + if (myStream.get() == nullptr) + { + return false; + } + + if (myIsDoublePrec) + { + *myStream << (double )thePoint.X() << " " << (double )thePoint.Y() << " " << (double )thePoint.Z(); + } + else + { + *myStream << (float )thePoint.X() << " " << (float )thePoint.Y() << " " << (float )thePoint.Z(); + } + if (myHasNormals) + { + *myStream << " " << (float )theNorm.x() << " " << (float )theNorm.y() << " " << (float )theNorm.z(); + } + if (myHasTexCoords) + { + *myStream << " " << (float )theUV.x() << " " << (float )theUV.y(); + } + if (myHasColors) + { + *myStream << " " << (int )theColor.r() << " " << (int )theColor.g() << " " << (int )theColor.b(); + } + *myStream << "\n"; + if (++myNbVerts > myNbHeaderVerts) + { + throw Standard_OutOfRange ("RWPly_PlyWriterContext::WriteVertex() - number of vertices is greater than defined"); + } + return myStream->good(); +} + +// ================================================================ +// Function : WriteTriangle +// Purpose : +// ================================================================ +bool RWPly_PlyWriterContext::WriteTriangle (const Graphic3d_Vec3i& theTri) +{ + if (myStream.get() == nullptr) + { + return false; + } + + const Graphic3d_Vec3i aTri = Graphic3d_Vec3i(myVertOffset) + theTri; + *myStream << "3 " << aTri[0] << " " << aTri[1] << " " << aTri[2]; + if (myHasSurfId) + { + *myStream << " " << mySurfId; + } + *myStream << "\n"; + if (++myNbElems > myNbHeaderElems) + { + throw Standard_OutOfRange ("RWPly_PlyWriterContext::WriteTriangle() - number of elements is greater than defined"); + } + return myStream->good(); +} + +// ================================================================ +// Function : WriteQuad +// Purpose : +// ================================================================ +bool RWPly_PlyWriterContext::WriteQuad (const Graphic3d_Vec4i& theQuad) +{ + if (myStream.get() == nullptr) + { + return false; + } + + const Graphic3d_Vec4i aQuad = Graphic3d_Vec4i(myVertOffset) + theQuad; + *myStream << "4 " << aQuad[0] << " " << aQuad[1] << " " << aQuad[2] << " " << aQuad[3]; + if (myHasSurfId) + { + *myStream << " " << mySurfId; + } + *myStream << "\n"; + if (++myNbElems > myNbHeaderElems) + { + throw Standard_OutOfRange ("RWPly_PlyWriterContext::WriteQuad() - number of elements is greater than defined"); + } + return myStream->good(); +} diff --git a/src/RWPly/RWPly_PlyWriterContext.hxx b/src/RWPly/RWPly_PlyWriterContext.hxx new file mode 100644 index 0000000000..0c037de31f --- /dev/null +++ b/src/RWPly/RWPly_PlyWriterContext.hxx @@ -0,0 +1,142 @@ +// Copyright (c) 2022 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 _RWPly_PlyWriterContext_HeaderFiler +#define _RWPly_PlyWriterContext_HeaderFiler + +#include +#include +#include +#include + +#include + +//! Auxiliary low-level tool writing PLY file. +class RWPly_PlyWriterContext +{ +public: + + //! Empty constructor. + Standard_EXPORT RWPly_PlyWriterContext(); + + //! Destructor, will emit error message if file was not closed. + Standard_EXPORT ~RWPly_PlyWriterContext(); + +public: //! @name vertex attributes parameters + + //! Return TRUE if vertex position should be stored with double floating point precision; FALSE by default. + bool IsDoublePrecision() const { return myIsDoublePrec; } + + //! Set if vertex position should be stored with double floating point precision. + void SetDoublePrecision (bool theDoublePrec) { myIsDoublePrec = theDoublePrec; } + + //! Return TRUE if normals should be written as vertex attribute; FALSE by default. + bool HasNormals() const { return myHasNormals; } + + //! Set if normals should be written. + void SetNormals (const bool theHasNormals) { myHasNormals = theHasNormals; } + + //! Return TRUE if UV / texture coordinates should be written as vertex attribute; FALSE by default. + bool HasTexCoords() const { return myHasTexCoords; } + + //! Set if UV / texture coordinates should be written. + void SetTexCoords (const bool theHasTexCoords) { myHasTexCoords = theHasTexCoords; } + + //! Return TRUE if point colors should be written as vertex attribute; FALSE by default. + bool HasColors() const { return myHasColors; } + + //! Set if point colors should be written. + void SetColors (bool theToWrite) { myHasColors = theToWrite; } + +public: //! @name element attributes parameters + + //! Return TRUE if surface Id should be written as element attribute; FALSE by default. + bool HasSurfaceId() const { return myHasSurfId; } + + //! Set if surface Id should be written as element attribute; FALSE by default. + void SetSurfaceId (bool theSurfId) { myHasSurfId = theSurfId; } + +public: //! @name writing into file + + //! Return TRUE if file has been opened. + bool IsOpened() const { return myStream.get() != nullptr; } + + //! Open file for writing. + Standard_EXPORT bool Open (const TCollection_AsciiString& theName, + const std::shared_ptr& theStream = std::shared_ptr()); + + //! Write the header. + //! @param[in] theNbNodes number of vertex nodes + //! @param[in] theNbElems number of mesh elements + //! @param[in] theFileInfo optional comments + Standard_EXPORT bool WriteHeader (const Standard_Integer theNbNodes, + const Standard_Integer theNbElems, + const TColStd_IndexedDataMapOfStringString& theFileInfo); + + //! Write single point with all attributes. + //! @param[in] thePoint 3D point coordinates + //! @param[in] theNorm surface normal direction at the point + //! @param[in] theUV surface/texture UV coordinates + //! @param[in] theColor RGB color values + Standard_EXPORT bool WriteVertex (const gp_Pnt& thePoint, + const Graphic3d_Vec3& theNorm, + const Graphic3d_Vec2& theUV, + const Graphic3d_Vec4ub& theColor); + + //! Return number of written vertices. + Standard_Integer NbWrittenVertices() const { return myNbVerts; } + + //! Return vertex offset to be applied to element indices; 0 by default. + Standard_Integer VertexOffset() const { return myVertOffset; } + + //! Set vertex offset to be applied to element indices. + void SetVertexOffset (Standard_Integer theOffset) { myVertOffset = theOffset; } + + //! Return surface id to write with element; 0 by default. + Standard_Integer SurfaceId() const { return mySurfId; } + + //! Set surface id to write with element. + void SetSurfaceId (Standard_Integer theSurfId) { mySurfId = theSurfId; } + + //! Writing a triangle. + Standard_EXPORT bool WriteTriangle (const Graphic3d_Vec3i& theTri); + + //! Writing a quad. + Standard_EXPORT bool WriteQuad (const Graphic3d_Vec4i& theQuad); + + //! Return number of written elements. + Standard_Integer NbWrittenElements() const { return myNbElems; } + + //! Correctly close the file. + //! @return FALSE in case of writing error + Standard_EXPORT bool Close (bool theIsAborted = false); + +private: + + std::shared_ptr myStream; + TCollection_AsciiString myName; + Standard_Integer myNbHeaderVerts; + Standard_Integer myNbHeaderElems; + Standard_Integer myNbVerts; + Standard_Integer myNbElems; + Standard_Integer mySurfId; + Standard_Integer myVertOffset; + bool myIsDoublePrec; + bool myHasNormals; + bool myHasColors; + bool myHasTexCoords; + bool myHasSurfId; + +}; + +#endif // _RWPly_PlyWriterContext_HeaderFiler diff --git a/src/StdPrs/StdPrs_ToolTriangulatedShape.cxx b/src/StdPrs/StdPrs_ToolTriangulatedShape.cxx index 2bde8535ff..4dcc091637 100644 --- a/src/StdPrs/StdPrs_ToolTriangulatedShape.cxx +++ b/src/StdPrs/StdPrs_ToolTriangulatedShape.cxx @@ -18,24 +18,11 @@ #include #include -#include #include #include -#include -#include -#include -#include -#include -#include -#include #include #include -#include -#include -#include #include -#include -#include #include #include #include @@ -132,66 +119,6 @@ Standard_Boolean StdPrs_ToolTriangulatedShape::IsClosed (const TopoDS_Shape& the } } -//======================================================================= -//function : ComputeNormals -//purpose : -//======================================================================= -void StdPrs_ToolTriangulatedShape::ComputeNormals (const TopoDS_Face& theFace, - const Handle(Poly_Triangulation)& theTris, - Poly_Connect& thePolyConnect) -{ - if (theTris.IsNull() - || theTris->HasNormals()) - { - return; - } - - // take in face the surface location - const TopoDS_Face aZeroFace = TopoDS::Face (theFace.Located (TopLoc_Location())); - Handle(Geom_Surface) aSurf = BRep_Tool::Surface (aZeroFace); - if (!theTris->HasUVNodes() || aSurf.IsNull()) - { - // compute normals by averaging triangulation normals sharing the same vertex - Poly::ComputeNormals (theTris); - return; - } - - const Standard_Real aTol = Precision::Confusion(); - Standard_Integer aTri[3]; - gp_Dir aNorm; - theTris->AddNormals(); - for (Standard_Integer aNodeIter = 1; aNodeIter <= theTris->NbNodes(); ++aNodeIter) - { - // try to retrieve normal from real surface first, when UV coordinates are available - if (GeomLib::NormEstim (aSurf, theTris->UVNode (aNodeIter), aTol, aNorm) > 1) - { - if (thePolyConnect.Triangulation() != theTris) - { - thePolyConnect.Load (theTris); - } - - // compute flat normals - gp_XYZ eqPlan (0.0, 0.0, 0.0); - for (thePolyConnect.Initialize (aNodeIter); thePolyConnect.More(); thePolyConnect.Next()) - { - theTris->Triangle (thePolyConnect.Value()).Get (aTri[0], aTri[1], aTri[2]); - const gp_XYZ v1 (theTris->Node (aTri[1]).Coord() - theTris->Node (aTri[0]).Coord()); - const gp_XYZ v2 (theTris->Node (aTri[2]).Coord() - theTris->Node (aTri[1]).Coord()); - const gp_XYZ vv = v1 ^ v2; - const Standard_Real aMod = vv.Modulus(); - if (aMod >= aTol) - { - eqPlan += vv / aMod; - } - } - const Standard_Real aModMax = eqPlan.Modulus(); - aNorm = (aModMax > aTol) ? gp_Dir (eqPlan) : gp::DZ(); - } - - theTris->SetNormal (aNodeIter, aNorm); - } -} - //======================================================================= //function : Normal //purpose : diff --git a/src/StdPrs/StdPrs_ToolTriangulatedShape.hxx b/src/StdPrs/StdPrs_ToolTriangulatedShape.hxx index b7ee68550d..7e59fd3cd5 100644 --- a/src/StdPrs/StdPrs_ToolTriangulatedShape.hxx +++ b/src/StdPrs/StdPrs_ToolTriangulatedShape.hxx @@ -14,19 +14,13 @@ #ifndef _StdPrs_ToolTriangulatedShape_HeaderFile #define _StdPrs_ToolTriangulatedShape_HeaderFile -#include -#include -#include -#include -#include +#include #include -class TopoDS_Face; class TopoDS_Shape; class Prs3d_Drawer; -class Poly_Triangulation; -class StdPrs_ToolTriangulatedShape +class StdPrs_ToolTriangulatedShape: public BRepLib_ToolTriangulatedShape { public: @@ -38,26 +32,6 @@ public: //! @return true if shape is closed manifold Solid or compound of such Solids.
Standard_EXPORT static Standard_Boolean IsClosed (const TopoDS_Shape& theShape); - //! Computes nodal normals for Poly_Triangulation structure using UV coordinates and surface. - //! Does nothing if triangulation already defines normals. - //! @param theFace [in] the face - //! @param theTris [in] the definition of a face triangulation - static void ComputeNormals (const TopoDS_Face& theFace, - const Handle(Poly_Triangulation)& theTris) - { - Poly_Connect aPolyConnect; - ComputeNormals (theFace, theTris, aPolyConnect); - } - - //! Computes nodal normals for Poly_Triangulation structure using UV coordinates and surface. - //! Does nothing if triangulation already defines normals. - //! @param theFace [in] the face - //! @param theTris [in] the definition of a face triangulation - //! @param thePolyConnect [in,out] optional, initialized tool for exploring triangulation - Standard_EXPORT static void ComputeNormals (const TopoDS_Face& theFace, - const Handle(Poly_Triangulation)& theTris, - Poly_Connect& thePolyConnect); - //! Evaluate normals for a triangle of a face. //! @param[in] theFace the face. //! @param[in] thePolyConnect the definition of a face triangulation. diff --git a/src/TKRWMesh/PACKAGES b/src/TKRWMesh/PACKAGES index 2296ef2c2e..3b7d934623 100644 --- a/src/TKRWMesh/PACKAGES +++ b/src/TKRWMesh/PACKAGES @@ -1,3 +1,4 @@ RWGltf RWMesh RWObj +RWPly diff --git a/src/ViewerTest/ViewerTest_ObjectCommands.cxx b/src/ViewerTest/ViewerTest_ObjectCommands.cxx index b0ddaab799..63c000d5a9 100644 --- a/src/ViewerTest/ViewerTest_ObjectCommands.cxx +++ b/src/ViewerTest/ViewerTest_ObjectCommands.cxx @@ -40,6 +40,7 @@ #include #include #include +#include #include #include #include @@ -6250,6 +6251,12 @@ static Standard_Integer VPointCloud (Draw_Interpretor& theDI, Standard_Integer theArgNum, const char** theArgs) { + if (theArgNum < 2) + { + Message::SendFail ("Syntax error: wrong number of arguments"); + return 1; + } + Handle(AIS_InteractiveContext) anAISContext = ViewerTest::GetAISContext(); if (anAISContext.IsNull()) { @@ -6257,83 +6264,114 @@ static Standard_Integer VPointCloud (Draw_Interpretor& theDI, return 1; } - // command to execute - enum Command - { - CloudForShape, // generate point cloud for shape - CloudSphere, // generate point cloud for generic sphere - Unknow - }; + TCollection_AsciiString aName; + TopoDS_Shape aShape; - // count number of non-optional command arguments - Command aCmd = Unknow; - Standard_Integer aCmdArgs = 0; - for (Standard_Integer anArgIter = 1; anArgIter < theArgNum; ++anArgIter) - { - Standard_CString anArg = theArgs[anArgIter]; - TCollection_AsciiString aFlag (anArg); - aFlag.LowerCase(); - if (aFlag.IsRealValue (Standard_True) || aFlag.Search ("-") != 1) - { - aCmdArgs++; - } - } - switch (aCmdArgs) - { - case 2 : aCmd = CloudForShape; break; - case 7 : aCmd = CloudSphere; break; - default : - Message::SendFail ("Syntax error: wrong number of arguments! See usage:"); - theDI.PrintHelp (theArgs[0]); - return 1; - } + TCollection_AsciiString aDistribution; + gp_Pnt aDistCenter; + Standard_Real aDistRadius = 0.0; + Standard_Integer aDistNbPoints = 0; // parse options - Standard_Boolean toRandColors = Standard_False; - Standard_Boolean hasNormals = Standard_True; - Standard_Boolean isSetArgNorm = Standard_False; - Standard_Boolean hasUV = Standard_False; + bool toRandColors = false; + bool hasNormals = true, hasUV = false; + bool isDensityPoints = false; + Standard_Real aDensity = 0.0, aDist = 0.0; + Standard_Real aTol = Precision::Confusion(); for (Standard_Integer anArgIter = 1; anArgIter < theArgNum; ++anArgIter) { - Standard_CString anArg = theArgs[anArgIter]; - TCollection_AsciiString aFlag (anArg); + TCollection_AsciiString aFlag (theArgs[anArgIter]); aFlag.LowerCase(); if (aFlag == "-randcolors" || aFlag == "-randcolor") { - if (isSetArgNorm && hasNormals) - { - Message::SendFail ("Syntax error: normals can not be enabled with colors at the same time"); - return 1; - } - toRandColors = Standard_True; - hasNormals = Standard_False; + toRandColors = Draw::ParseOnOffIterator (theArgNum, theArgs, anArgIter); } else if (aFlag == "-normals" || aFlag == "-normal") { - if (toRandColors) - { - Message::SendFail ("Syntax error: normals can not be enabled with colors at the same time"); - return 1; - } - isSetArgNorm = Standard_True; - hasNormals = Standard_True; + hasNormals = Draw::ParseOnOffIterator (theArgNum, theArgs, anArgIter); } else if (aFlag == "-nonormals" || aFlag == "-nonormal") { - isSetArgNorm = Standard_True; - hasNormals = Standard_False; + hasNormals = !Draw::ParseOnOffIterator (theArgNum, theArgs, anArgIter); } else if (aFlag == "-uv" || aFlag == "-texels") { - hasUV = Standard_True; + hasUV = Draw::ParseOnOffIterator (theArgNum, theArgs, anArgIter); + } + else if ((aFlag == "-dist" + || aFlag == "-distance") + && anArgIter + 1 < theArgNum + && Draw::ParseReal (theArgs[anArgIter + 1], aDist)) + { + ++anArgIter; + if (aDist < 0.0) + { + theDI << "Syntax error: -distance value should be >= 0.0"; + return 1; + } + aDist = Max (aDist, Precision::Confusion()); + } + else if ((aFlag == "-dens" + || aFlag == "-density") + && anArgIter + 1 < theArgNum + && Draw::ParseReal (theArgs[anArgIter + 1], aDensity)) + { + ++anArgIter; + isDensityPoints = Standard_True; + if (aDensity <= 0.0) + { + theDI << "Syntax error: -density value should be > 0.0"; + return 1; + } + } + else if ((aFlag == "-tol" + || aFlag == "-tolerance") + && anArgIter + 1 < theArgNum + && Draw::ParseReal (theArgs[anArgIter + 1], aTol)) + { + ++anArgIter; + if (aTol < Precision::Confusion()) + { + theDI << "Syntax error: -tol value should be >= " << Precision::Confusion(); + return 1; + } + } + else if ((aFlag == "-surface" + || aFlag == "-volume") + && anArgIter + 5 < theArgNum) + { + aDistribution = aFlag; + aDistCenter.SetCoord (Draw::Atof (theArgs[anArgIter + 1]), + Draw::Atof (theArgs[anArgIter + 2]), + Draw::Atof (theArgs[anArgIter + 3])); + aDistRadius = Draw::Atof (theArgs[anArgIter + 4]); + aDistNbPoints = Draw::Atoi (theArgs[anArgIter + 5]); + anArgIter += 5; + } + else if (aName.IsEmpty()) + { + aName = theArgs[anArgIter]; + } + else if (aShape.IsNull()) + { + aShape = DBRep::Get (theArgs[anArgIter]); + if (aShape.IsNull()) + { + theDI << "Syntax error: invalid shape '" << theArgs[anArgIter] << "'"; + return 1; + } + } + else + { + theDI << "Syntax error at '" << theArgs[anArgIter] << "'"; + return 1; } } - Standard_CString aName = theArgs[1]; Graphic3d_ArrayFlags aFlags = Graphic3d_ArrayFlags_None; if (hasNormals) { @@ -6350,125 +6388,80 @@ static Standard_Integer VPointCloud (Draw_Interpretor& theDI, // generate arbitrary set of points Handle(Graphic3d_ArrayOfPoints) anArrayPoints; - if (aCmd == CloudForShape) + if (!aShape.IsNull()) { - Standard_CString aShapeName = theArgs[2]; - TopoDS_Shape aShape = DBRep::Get (aShapeName); - - if (aShape.IsNull()) - { - Message::SendFail() << "Error: no shape with name '" << aShapeName << "' found"; - return 1; - } - - // calculate number of points - TopLoc_Location aLocation; - Standard_Integer aNbPoints = 0; - for (TopExp_Explorer aFaceIt (aShape, TopAbs_FACE); aFaceIt.More(); aFaceIt.Next()) - { - const TopoDS_Face& aFace = TopoDS::Face (aFaceIt.Current()); - Handle(Poly_Triangulation) aTriangulation = BRep_Tool::Triangulation (aFace, aLocation); - if (!aTriangulation.IsNull()) - { - aNbPoints += aTriangulation->NbNodes(); - } - } - if (aNbPoints < 3) + class PointCloudPntFiller : public BRepLib_PointCloudShape { - Message::SendFail ("Error: shape should be triangulated"); - return 1; - } - - anArrayPoints = new Graphic3d_ArrayOfPoints (aNbPoints, aFlags); - for (TopExp_Explorer aFaceIt (aShape, TopAbs_FACE); aFaceIt.More(); aFaceIt.Next()) - { - const TopoDS_Face& aFace = TopoDS::Face (aFaceIt.Current()); - Handle(Poly_Triangulation) aTriangulation = BRep_Tool::Triangulation (aFace, aLocation); - if (aTriangulation.IsNull()) - { - continue; - } - - const gp_Trsf& aTrsf = aLocation.Transformation(); - - // extract normals from nodes - TColgp_Array1OfDir aNormals (1, hasNormals ? aTriangulation->NbNodes() : 1); - if (hasNormals) - { - Poly_Connect aPolyConnect (aTriangulation); - StdPrs_ToolTriangulatedShape::Normal (aFace, aPolyConnect, aNormals); - } + public: + PointCloudPntFiller (Standard_Real theTol) : BRepLib_PointCloudShape (TopoDS_Shape(), theTol) {} + void SetPointArray (const Handle(Graphic3d_ArrayOfPoints)& thePoints) { myPoints = thePoints; } - for (Standard_Integer aNodeIter = 1; aNodeIter <= aTriangulation->NbNodes(); ++aNodeIter) + protected: + virtual void addPoint (const gp_Pnt& thePoint, + const gp_Vec& theNorm, + const gp_Pnt2d& theUV, + const TopoDS_Shape& ) Standard_OVERRIDE { - gp_Pnt aPoint = aTriangulation->Node (aNodeIter); - if (!aLocation.IsIdentity()) + const Standard_Integer aPntIndex = myPoints->AddVertex (thePoint, theUV); + if (theNorm.SquareMagnitude() > gp::Resolution()) { - aPoint.Transform (aTrsf); - if (hasNormals) - { - aNormals (aNodeIter).Transform (aTrsf); - } + myPoints->SetVertexNormal (aPntIndex, theNorm); } - - // add vertex into array of points - const Standard_Integer anIndexOfPoint = anArrayPoints->AddVertex (aPoint); - if (toRandColors) + if (myPoints->HasVertexColors()) { - Quantity_Color aColor (360.0 * Standard_Real(anIndexOfPoint) / Standard_Real(aNbPoints), + Quantity_Color aColor (360.0 * Standard_Real(aPntIndex) / Standard_Real(myPoints->VertexNumberAllocated()), 1.0, 0.5, Quantity_TOC_HLS); - anArrayPoints->SetVertexColor (anIndexOfPoint, aColor); - } - - if (hasNormals) - { - anArrayPoints->SetVertexNormal (anIndexOfPoint, aNormals (aNodeIter)); - } - if (hasUV - && aTriangulation->HasUVNodes()) - { - anArrayPoints->SetVertexTexel (anIndexOfPoint, aTriangulation->UVNode (aNodeIter)); + myPoints->SetVertexColor (aPntIndex, aColor); } } - } - } - else if (aCmd == CloudSphere) - { - Standard_Real aCenterX = Draw::Atof (theArgs[2]); - Standard_Real aCenterY = Draw::Atof (theArgs[3]); - Standard_Real aCenterZ = Draw::Atof (theArgs[4]); - Standard_Real aRadius = Draw::Atof (theArgs[5]); - Standard_Integer aNbPoints = Draw::Atoi (theArgs[6]); - TCollection_AsciiString aDistribution = TCollection_AsciiString(theArgs[7]); - aDistribution.LowerCase(); - if ( aDistribution != "surface" && aDistribution != "volume" ) + private: + Handle(Graphic3d_ArrayOfPoints) myPoints; + }; + + PointCloudPntFiller aPoitCloudTool (aTol); + aPoitCloudTool.SetShape (aShape); + aPoitCloudTool.SetDistance (aDist); + + Standard_Integer aNbPoints = isDensityPoints + ? aPoitCloudTool.NbPointsByDensity (aDensity) + : aPoitCloudTool.NbPointsByTriangulation(); + theDI << "Number of the generated points : " << aNbPoints << "\n"; + anArrayPoints = new Graphic3d_ArrayOfPoints (aNbPoints, aFlags); + aPoitCloudTool.SetPointArray (anArrayPoints); + Standard_Boolean isDone = isDensityPoints + ? aPoitCloudTool.GeneratePointsByDensity (aDensity) + : aPoitCloudTool.GeneratePointsByTriangulation(); + if (!isDone) { - Message::SendFail ("Syntax error: wrong arguments. See usage:"); - theDI.PrintHelp (theArgs[0]); + Message::SendFail() << "Error: Point cloud was not generated"; return 1; } - Standard_Boolean isSurface = aDistribution == "surface"; - - gp_Pnt aCenter(aCenterX, aCenterY, aCenterZ); + } + else if (!aDistribution.IsEmpty()) + { + const bool isSurface = aDistribution == "-surface"; - anArrayPoints = new Graphic3d_ArrayOfPoints (aNbPoints, aFlags); - for (Standard_Integer aPntIt = 0; aPntIt < aNbPoints; ++aPntIt) + anArrayPoints = new Graphic3d_ArrayOfPoints (aDistNbPoints, aFlags); + std::mt19937 aRandomGenerator(0); + std::uniform_real_distribution<> anAlphaDistrib(0.0, 2.0 * M_PI); + std::uniform_real_distribution<> aBetaDistrib (0.0, 2.0 * M_PI); + std::uniform_real_distribution<> aRadiusDistrib(0.0, aDistRadius); + for (Standard_Integer aPntIt = 0; aPntIt < aDistNbPoints; ++aPntIt) { - Standard_Real anAlpha = (Standard_Real (rand() % 2000) / 1000.0) * M_PI; - Standard_Real aBeta = (Standard_Real (rand() % 2000) / 1000.0) * M_PI; - Standard_Real aDistance = isSurface ? - aRadius : (Standard_Real (rand() % aNbPoints) / aNbPoints) * aRadius; + Standard_Real anAlpha = anAlphaDistrib(aRandomGenerator); + Standard_Real aBeta = aBetaDistrib (aRandomGenerator); + Standard_Real aDistance = isSurface ? aDistRadius : aRadiusDistrib (aRandomGenerator); gp_Dir aDir (Cos (anAlpha) * Sin (aBeta), Sin (anAlpha), Cos (anAlpha) * Cos (aBeta)); - gp_Pnt aPoint = aCenter.Translated (aDir.XYZ() * aDistance); + gp_Pnt aPoint = aDistCenter.Translated (aDir.XYZ() * aDistance); const Standard_Integer anIndexOfPoint = anArrayPoints->AddVertex (aPoint); if (toRandColors) { - Quantity_Color aColor (360.0 * Standard_Real (anIndexOfPoint) / Standard_Real (aNbPoints), + Quantity_Color aColor (360.0 * Standard_Real (anIndexOfPoint) / Standard_Real (aDistNbPoints), 1.0, 0.5, Quantity_TOC_HLS); anArrayPoints->SetVertexColor (anIndexOfPoint, aColor); } @@ -6484,11 +6477,16 @@ static Standard_Integer VPointCloud (Draw_Interpretor& theDI, } } } + else + { + Message::SendFail ("Error: wrong number of arguments"); + return 1; + } // set array of points in point cloud object Handle(AIS_PointCloud) aPointCloud = new AIS_PointCloud(); aPointCloud->SetPoints (anArrayPoints); - VDisplayAISObject (aName, aPointCloud); + ViewerTest::Display (aName, aPointCloud); return 0; } @@ -7149,18 +7147,23 @@ Prints the default vertex draw mode without -set parameter. )" /* [vvertexmode] */); addCmd ("vpointcloud", VPointCloud, /* [vpointcloud] */ R"( -vpointcloud name shape [-randColor] [-normals] [-noNormals] [-uv] +vpointcloud name shape [-randColor {0|1}]=0 [-normals {0|1}]=1 [-uv {0|1}]=0 + [-distance Value]=0.0 [-density Value] [-tolerance Value] Create an interactive object for arbitrary set of points from triangulated shape. -vpointcloud name x y z r npts {surface|volume} - ... [-randColor] [-normals] [-noNormals] [-uv] +vpointcloud name {-surface|-volume} x y z r npts + [-randColor] [-normals] [-uv] Create arbitrary set of points (npts) randomly distributed on spheric surface or within spheric volume (x y z r). Additional options: - -randColor - generate random color per point - -normals - generate normal per point (default) - -noNormals - do not generate normal per point + -normals generate or not normal per point + -uv generate UV (texel) coordinates per point + -randColor generate random color per point + -distance distance from shape into the range [0, Value]; + -density density of points to generate randomly on surface; + -tolerance cloud generator's tolerance; default value is Precision::Confusion(); + )" /* [vpointcloud] */); addCmd ("vpriority", VPriority, /* [vpriority] */ R"( diff --git a/src/XSDRAWSTLVRML/XSDRAWSTLVRML.cxx b/src/XSDRAWSTLVRML/XSDRAWSTLVRML.cxx index e3d28131c8..d533ca1dec 100644 --- a/src/XSDRAWSTLVRML/XSDRAWSTLVRML.cxx +++ b/src/XSDRAWSTLVRML/XSDRAWSTLVRML.cxx @@ -19,6 +19,7 @@ #include #include #include +#include #include #include #include @@ -45,10 +46,13 @@ #include #include #include +#include #include #include #include #include +#include +#include #include #include #include @@ -62,6 +66,7 @@ #include #include #include +#include #include #include #include @@ -75,6 +80,7 @@ #include #include #include +#include #include #include #include @@ -2055,6 +2061,275 @@ static Standard_Integer meshinfo(Draw_Interpretor& di, return 0; } +//======================================================================= +//function : writeply +//purpose : write PLY file +//======================================================================= +static Standard_Integer WritePly (Draw_Interpretor& theDI, + Standard_Integer theNbArgs, + const char** theArgVec) +{ + Handle(TDocStd_Document) aDoc; + Handle(TDocStd_Application) anApp = DDocStd::GetApplication(); + TCollection_AsciiString aShapeName, aFileName; + + Standard_Real aDist = 0.0; + Standard_Real aDens = Precision::Infinite(); + Standard_Real aTol = Precision::Confusion(); + bool hasColors = true, hasNormals = true, hasTexCoords = false, hasPartId = true, hasFaceId = false; + bool isPntSet = false, isDensityPoints = false; + TColStd_IndexedDataMapOfStringString aFileInfo; + for (Standard_Integer anArgIter = 1; anArgIter < theNbArgs; ++anArgIter) + { + TCollection_AsciiString anArg (theArgVec[anArgIter]); + anArg.LowerCase(); + if (anArg == "-normal") + { + hasNormals = Draw::ParseOnOffIterator (theNbArgs, theArgVec, anArgIter); + } + else if (anArg == "-nonormal") + { + hasNormals = !Draw::ParseOnOffIterator (theNbArgs, theArgVec, anArgIter); + } + else if (anArg == "-color" + || anArg == "-nocolor" + || anArg == "-colors" + || anArg == "-nocolors") + { + hasColors = Draw::ParseOnOffNoIterator (theNbArgs, theArgVec, anArgIter); + } + else if (anArg == "-uv" + || anArg == "-nouv") + { + hasTexCoords = Draw::ParseOnOffNoIterator (theNbArgs, theArgVec, anArgIter); + } + else if (anArg == "-partid") + { + hasPartId = Draw::ParseOnOffNoIterator (theNbArgs, theArgVec, anArgIter); + hasFaceId = hasFaceId && !hasPartId; + } + else if (anArg == "-surfid" + || anArg == "-surfaceid" + || anArg == "-faceid") + { + hasFaceId = Draw::ParseOnOffNoIterator (theNbArgs, theArgVec, anArgIter); + hasPartId = hasPartId && !hasFaceId; + } + else if (anArg == "-pntset" + || anArg == "-pntcloud" + || anArg == "-pointset" + || anArg == "-pointcloud" + || anArg == "-cloud" + || anArg == "-points") + { + isPntSet = Draw::ParseOnOffIterator (theNbArgs, theArgVec, anArgIter); + } + else if ((anArg == "-dist" + || anArg == "-distance") + && anArgIter + 1 < theNbArgs + && Draw::ParseReal (theArgVec[anArgIter + 1], aDist)) + { + ++anArgIter; + isPntSet = true; + if (aDist < 0.0) + { + theDI << "Syntax error: -distance value should be >= 0.0"; + return 1; + } + aDist = Max (aDist, Precision::Confusion()); + } + else if ((anArg == "-dens" + || anArg == "-density") + && anArgIter + 1 < theNbArgs + && Draw::ParseReal (theArgVec[anArgIter + 1], aDens)) + { + ++anArgIter; + isDensityPoints = Standard_True; + isPntSet = true; + if (aDens <= 0.0) + { + theDI << "Syntax error: -density value should be > 0.0"; + return 1; + } + } + else if ((anArg == "-tol" + || anArg == "-tolerance") + && anArgIter + 1 < theNbArgs + && Draw::ParseReal (theArgVec[anArgIter + 1], aTol)) + { + ++anArgIter; + isPntSet = true; + if (aTol < Precision::Confusion()) + { + theDI << "Syntax error: -tol value should be >= " << Precision::Confusion(); + return 1; + } + } + else if (anArg == "-comments" + && anArgIter + 1 < theNbArgs) + { + aFileInfo.Add ("Comments", theArgVec[++anArgIter]); + } + else if (anArg == "-author" + && anArgIter + 1 < theNbArgs) + { + aFileInfo.Add ("Author", theArgVec[++anArgIter]); + } + else if (aDoc.IsNull()) + { + if (aShapeName.IsEmpty()) + { + aShapeName = theArgVec[anArgIter]; + } + + Standard_CString aNameVar = theArgVec[anArgIter]; + DDocStd::GetDocument (aNameVar, aDoc, false); + if (aDoc.IsNull()) + { + TopoDS_Shape aShape = DBRep::Get (aNameVar); + if (!aShape.IsNull()) + { + anApp->NewDocument (TCollection_ExtendedString ("BinXCAF"), aDoc); + Handle(XCAFDoc_ShapeTool) aShapeTool = XCAFDoc_DocumentTool::ShapeTool (aDoc->Main()); + aShapeTool->AddShape (aShape); + } + } + } + else if (aFileName.IsEmpty()) + { + aFileName = theArgVec[anArgIter]; + } + else + { + theDI << "Syntax error at '" << theArgVec[anArgIter] << "'"; + return 1; + } + } + if (aDoc.IsNull() + && !aShapeName.IsEmpty()) + { + theDI << "Syntax error: '" << aShapeName << "' is not a shape nor document"; + return 1; + } + else if (aDoc.IsNull() + || aFileName.IsEmpty()) + { + theDI << "Syntax error: wrong number of arguments"; + return 1; + } + + TDF_LabelSequence aRootLabels; + Handle(XCAFDoc_ShapeTool) aShapeTool = XCAFDoc_DocumentTool::ShapeTool (aDoc->Main()); + aShapeTool->GetFreeShapes (aRootLabels); + if (aRootLabels.IsEmpty()) + { + theDI << "Error: empty document"; + return 1; + } + + if (isPntSet) + { + class PointCloudPlyWriter : public BRepLib_PointCloudShape, public RWPly_PlyWriterContext + { + public: + PointCloudPlyWriter (Standard_Real theTol) + : BRepLib_PointCloudShape (TopoDS_Shape(), theTol) {} + + void AddFaceColor (const TopoDS_Shape& theFace, const Graphic3d_Vec4ub& theColor) + { myFaceColor.Bind (theFace, theColor); } + + protected: + virtual void addPoint (const gp_Pnt& thePoint, + const gp_Vec& theNorm, + const gp_Pnt2d& theUV, + const TopoDS_Shape& theFace) + { + Graphic3d_Vec4ub aColor; + myFaceColor.Find (theFace, aColor); + RWPly_PlyWriterContext::WriteVertex (thePoint, + Graphic3d_Vec3 ((float )theNorm.X(), (float )theNorm.Y(), (float )theNorm.Z()), + Graphic3d_Vec2 ((float )theUV.X(), (float )theUV.Y()), + aColor); + } + + private: + NCollection_DataMap myFaceColor; + }; + + PointCloudPlyWriter aPlyCtx (aTol); + aPlyCtx.SetNormals (hasNormals); + aPlyCtx.SetColors (hasColors); + aPlyCtx.SetTexCoords (hasTexCoords); + + TopoDS_Compound aComp; + BRep_Builder().MakeCompound (aComp); + for (XCAFPrs_DocumentExplorer aDocExplorer (aDoc, aRootLabels, XCAFPrs_DocumentExplorerFlags_OnlyLeafNodes); + aDocExplorer.More(); aDocExplorer.Next()) + { + const XCAFPrs_DocumentNode& aDocNode = aDocExplorer.Current(); + for (RWMesh_FaceIterator aFaceIter (aDocNode.RefLabel, aDocNode.Location, true, aDocNode.Style); aFaceIter.More(); aFaceIter.Next()) + { + BRep_Builder().Add (aComp, aFaceIter.Face()); + Graphic3d_Vec4ub aColorVec (255); + if (aFaceIter.HasFaceColor()) + { + Graphic3d_Vec4 aColorF = aFaceIter.FaceColor(); + aColorVec.SetValues ((unsigned char )int(aColorF.r() * 255.0f), + (unsigned char )int(aColorF.g() * 255.0f), + (unsigned char )int(aColorF.b() * 255.0f), + (unsigned char )int(aColorF.a() * 255.0f)); + } + aPlyCtx.AddFaceColor (aFaceIter.Face(), aColorVec); + } + } + aPlyCtx.SetShape (aComp); + + Standard_Integer aNbPoints = isDensityPoints + ? aPlyCtx.NbPointsByDensity (aDens) + : aPlyCtx.NbPointsByTriangulation(); + if (aNbPoints <= 0) + { + theDI << "Error: unable to generate points"; + return 0; + } + + if (!aPlyCtx.Open (aFileName) + || !aPlyCtx.WriteHeader (aNbPoints, 0, TColStd_IndexedDataMapOfStringString())) + { + theDI << "Error: unable to create file '" << aFileName << "'"; + return 0; + } + + Standard_Boolean isDone = isDensityPoints + ? aPlyCtx.GeneratePointsByDensity (aDens) + : aPlyCtx.GeneratePointsByTriangulation(); + if (!isDone) + { + theDI << "Error: Point cloud was not generated in file '" << aFileName << "'"; + } + else if (!aPlyCtx.Close()) + { + theDI << "Error: Point cloud file '" << aFileName << "' was not written"; + } + else + { + theDI << aNbPoints; + } + } + else + { + Handle(Draw_ProgressIndicator) aProgress = new Draw_ProgressIndicator (theDI, 1); + RWPly_CafWriter aPlyCtx (aFileName); + aPlyCtx.SetNormals (hasNormals); + aPlyCtx.SetColors (hasColors); + aPlyCtx.SetTexCoords (hasTexCoords); + aPlyCtx.SetPartId (hasPartId); + aPlyCtx.SetFaceId (hasFaceId); + aPlyCtx.Perform (aDoc, aFileInfo, aProgress->Start()); + } + return 0; +} + //----------------------------------------------------------------------------- void XSDRAWSTLVRML::InitCommands (Draw_Interpretor& theCommands) @@ -2160,6 +2435,25 @@ void XSDRAWSTLVRML::InitCommands (Draw_Interpretor& theCommands) theCommands.Add ("meshdeform", "display deformed mesh", __FILE__, meshdeform, g ); theCommands.Add ("mesh_edge_width", "set width of edges", __FILE__, mesh_edge_width, g ); theCommands.Add ("meshinfo", "displays the number of nodes and triangles", __FILE__, meshinfo, g ); + theCommands.Add ("WritePly", R"( +WritePly Doc file [-normals {0|1}]=1 [-colors {0|1}]=1 [-uv {0|1}]=0 [-partId {0|1}]=1 [-faceId {0|1}]=0 + [-pointCloud {0|1}]=0 [-distance Value]=0.0 [-density Value] [-tolerance Value] +Write document or triangulated shape into PLY file. + -normals write per-vertex normals + -colors write per-vertex colors + -uv write per-vertex UV coordinates + -partId write per-element part index (alternative to -faceId) + -faceId write per-element face index (alternative to -partId) + +Generate point cloud out of the shape and write it into PLY file. + -pointCloud write point cloud instead without triangulation indices + -distance sets distance from shape into the range [0, Value]; + -density sets density of points to generate randomly on surface; + -tolerance sets tolerance; default value is Precision::Confusion(); +)", __FILE__, WritePly, g); + theCommands.Add ("writeply", + "writeply shape file", + __FILE__, WritePly, g); } //============================================================================== diff --git a/tests/de_mesh/grids.list b/tests/de_mesh/grids.list index 803b947e11..daa57b3c9e 100644 --- a/tests/de_mesh/grids.list +++ b/tests/de_mesh/grids.list @@ -5,3 +5,4 @@ 005 gltf_lateload 006 obj_read 007 obj_write +008 ply_write diff --git a/tests/de_mesh/ply_write/equerre b/tests/de_mesh/ply_write/equerre new file mode 100644 index 0000000000..125607983b --- /dev/null +++ b/tests/de_mesh/ply_write/equerre @@ -0,0 +1,14 @@ +puts "============" +puts "0029325: Modeling Algorithms - add tool BRepLib_PointCloudShape for generation point cloud for specified shape" +puts "============" +puts "" + +pload XDE OCAF MODELING VISUALIZATION + +set aNbPntsExpected 32581 +set aTmpPly ${imagedir}/${casename}_tmp.ply +lappend occ_tmp_files $aTmpPly + +restore [locate_data_file bug29325_EQUERRE.brep] aShape +set aNbPnts [writeply aShape $aTmpPly -pointCloud -dist 0.0 -dens 0.1 -colors 0] +if {$aNbPnts != $aNbPntsExpected} { puts "Error: ($aNbPnts) generated while expected ($aNbPntsExpected)" } diff --git a/tests/de_mesh/ply_write/sangle b/tests/de_mesh/ply_write/sangle new file mode 100644 index 0000000000..453283f5f9 --- /dev/null +++ b/tests/de_mesh/ply_write/sangle @@ -0,0 +1,14 @@ +puts "============" +puts "0029325: Modeling Algorithms - add tool BRepLib_PointCloudShape for generation point cloud for specified shape" +puts "============" +puts "" + +pload XDE OCAF MODELING VISUALIZATION + +set aNbPntsExpected 27890 +set aTmpPly ${imagedir}/${casename}_tmp.ply +lappend occ_tmp_files $aTmpPly + +restore [locate_data_file bug29325_SANGLE_DE_FIXATION.brep] aShape +set aNbPnts [writeply aShape $aTmpPly -pointCloud -dist 0.0 -dens 0.5 -colors 0] +if {$aNbPnts != $aNbPntsExpected} { puts "Error: ($aNbPnts) generated while expected ($aNbPntsExpected)" } diff --git a/tests/v3d/point_cloud/sphere b/tests/v3d/point_cloud/sphere index d62fb79ba9..be868a8d7b 100644 --- a/tests/v3d/point_cloud/sphere +++ b/tests/v3d/point_cloud/sphere @@ -21,7 +21,7 @@ vrotate 0.2 0.0 0.0 vdump $::imagedir/${::casename}_green.png # random colors mode -vpointcloud p s -randcolors +vpointcloud p s -randcolors -nonormals vdump $::imagedir/${::casename}_rand.png # texture mapping From 2922a73ea791eb58216961335fef2daadd101878 Mon Sep 17 00:00:00 2001 From: kgv Date: Wed, 9 Feb 2022 21:16:26 +0300 Subject: [PATCH 210/639] 0032826: Data Exchange - use OSD_FileSystem within RWStl::ReadAscii() and StepFile_Read() --- src/RWStl/RWStl.cxx | 29 ++++++++------------------ src/StepFile/StepFile_Read.cxx | 37 +++++++++++++--------------------- src/StepFile/StepFile_Read.hxx | 3 +++ 3 files changed, 25 insertions(+), 44 deletions(-) diff --git a/src/RWStl/RWStl.cxx b/src/RWStl/RWStl.cxx index 8b703f443e..86eaeb601e 100644 --- a/src/RWStl/RWStl.cxx +++ b/src/RWStl/RWStl.cxx @@ -147,12 +147,6 @@ Handle(Poly_Triangulation) RWStl::ReadFile (const OSD_Path& theFile, Handle(Poly_Triangulation) RWStl::ReadBinary (const OSD_Path& theFile, const Message_ProgressRange& theProgress) { - OSD_File aFile(theFile); - if (!aFile.Exists()) - { - return Handle(Poly_Triangulation)(); - } - TCollection_AsciiString aPath; theFile.SystemName (aPath); @@ -179,31 +173,24 @@ Handle(Poly_Triangulation) RWStl::ReadBinary (const OSD_Path& theFile, Handle(Poly_Triangulation) RWStl::ReadAscii (const OSD_Path& theFile, const Message_ProgressRange& theProgress) { - OSD_File aFile (theFile); - if (!aFile.Exists()) - { - return Handle(Poly_Triangulation)(); - } - TCollection_AsciiString aPath; theFile.SystemName (aPath); - std::filebuf aBuf; - OSD_OpenStream (aBuf, aPath, std::ios::in | std::ios::binary); - if (!aBuf.is_open()) + const Handle(OSD_FileSystem)& aFileSystem = OSD_FileSystem::DefaultFileSystem(); + std::shared_ptr aStream = aFileSystem->OpenIStream (aPath, std::ios::in | std::ios::binary); + if (aStream.get() == NULL) { return Handle(Poly_Triangulation)(); } - Standard_IStream aStream (&aBuf); // get length of file to feed progress indicator - aStream.seekg (0, aStream.end); - std::streampos theEnd = aStream.tellg(); - aStream.seekg (0, aStream.beg); + aStream->seekg (0, aStream->end); + std::streampos theEnd = aStream->tellg(); + aStream->seekg (0, aStream->beg); Reader aReader; Standard_ReadLineBuffer aBuffer (THE_BUFFER_SIZE); - if (!aReader.ReadAscii (aStream, aBuffer, theEnd, theProgress)) + if (!aReader.ReadAscii (*aStream, aBuffer, theEnd, theProgress)) { return Handle(Poly_Triangulation)(); } @@ -351,7 +338,7 @@ Standard_Boolean RWStl::writeBinary (const Handle(Poly_Triangulation)& theMesh, FILE* theFile, const Message_ProgressRange& theProgress) { - char aHeader[80] = "STL Exported by OpenCASCADE [www.opencascade.com]"; + char aHeader[80] = "STL Exported by Open CASCADE Technology [dev.opencascade.org]"; if (fwrite (aHeader, 1, 80, theFile) != 80) { return Standard_False; diff --git a/src/StepFile/StepFile_Read.cxx b/src/StepFile/StepFile_Read.cxx index b2e2a877b7..26319a7c43 100644 --- a/src/StepFile/StepFile_Read.cxx +++ b/src/StepFile/StepFile_Read.cxx @@ -14,22 +14,8 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -// StepFile_Read - -// routine assurant l enchainement des operations de lecture d un fichier -// STEP dans un StepModel, en fonction d une cle de reconnaissance -// Retour de la fonction : -// 0 si OK (le StepModel a ete charge) -// -1 si abandon car fichier pas pu etre ouvert -// 1 si erreur en cours de lecture - -// Compilation conditionnelle : concerne les mesures de performances - -#include -#include - -#include #include + #include #include @@ -49,9 +35,13 @@ #include #include -#include +#include #include +#include "step.tab.hxx" + +#include + #ifdef OCCT_DEBUG #define CHRONOMESURE #endif @@ -73,14 +63,15 @@ static Standard_Integer StepFile_Read (const char* theName, const Handle(StepData_FileRecognizer)& theRecogData) { // if stream is not provided, open file stream here - std::istream *aStreamPtr = theIStream; - std::ifstream aFileStream; - if (!aStreamPtr) { - OSD_OpenStream(aFileStream, theName, std::ios_base::in | std::ios_base::binary); - aStreamPtr = &aFileStream; + std::istream* aStreamPtr = theIStream; + std::shared_ptr aFileStream; + if (aStreamPtr == nullptr) + { + const Handle(OSD_FileSystem)& aFileSystem = OSD_FileSystem::DefaultFileSystem(); + aFileStream = aFileSystem->OpenIStream (theName, std::ios::in | std::ios::binary); + aStreamPtr = aFileStream.get(); } - - if (aStreamPtr->fail()) + if (aStreamPtr == nullptr || aStreamPtr->fail()) { return -1; } diff --git a/src/StepFile/StepFile_Read.hxx b/src/StepFile/StepFile_Read.hxx index 3f51411c5f..56921cbe6e 100644 --- a/src/StepFile/StepFile_Read.hxx +++ b/src/StepFile/StepFile_Read.hxx @@ -17,6 +17,9 @@ #ifndef StepFile_Read_HeaderFile #define StepFile_Read_HeaderFile +#include +#include + #include class StepData_StepModel; From 3d21fe1aeeee8d1aefdf6ff03aab1dca4ae4b310 Mon Sep 17 00:00:00 2001 From: kgv Date: Thu, 10 Feb 2022 00:48:57 +0300 Subject: [PATCH 211/639] 0032827: Configuration - compilation error on Emscripten SDK --- src/DRAWEXE/DRAWEXE.cxx | 1 + 1 file changed, 1 insertion(+) diff --git a/src/DRAWEXE/DRAWEXE.cxx b/src/DRAWEXE/DRAWEXE.cxx index 6fe12a0c6b..401e47d09d 100644 --- a/src/DRAWEXE/DRAWEXE.cxx +++ b/src/DRAWEXE/DRAWEXE.cxx @@ -18,6 +18,7 @@ #include #include #include +#include #include #include #include From 072b4d382ddfbaaaf6521017475dc8f46652c6fa Mon Sep 17 00:00:00 2001 From: kgv Date: Fri, 11 Feb 2022 23:45:11 +0300 Subject: [PATCH 212/639] 0032831: Documentation - drop misleading "FreeType 2.4.10 - 2.5.3" version range Removed duplicating information about supported versions of 3rdparty libraries from `building_3rdparty.md`. --- dox/build/build_3rdparty/building_3rdparty.md | 635 ++++++++---------- 1 file changed, 281 insertions(+), 354 deletions(-) diff --git a/dox/build/build_3rdparty/building_3rdparty.md b/dox/build/build_3rdparty/building_3rdparty.md index e86495c6d9..2eee48c8eb 100644 --- a/dox/build/build_3rdparty/building_3rdparty.md +++ b/dox/build/build_3rdparty/building_3rdparty.md @@ -2,60 +2,48 @@ ============================================== @tableofcontents -On Windows, the easiest way to install third-party libraries is to download archive with pre-built binaries from https://opencascade.com/content/3rd-party-components. -On Linux and OS X, it is recommended to use the version installed in the system natively. +On Windows, the easiest way to install third-party libraries is to download archive with pre-built binaries from https://dev.opencascade.org/resources/download/3rd-party-components. +On Linux and macOS, it is recommended to use the version installed in the system natively. @section dev_guides__building_3rdparty_win_1 Windows -This document presents guidelines for building third-party products used by Open CASCADE Technology (OCCT) and samples on Windows platform. It is assumed that you are already familiar with MS Visual Studio / Visual C++. +This section presents guidelines for building third-party products used by Open CASCADE Technology (OCCT) and samples on Windows platform. +It is assumed that you are already familiar with MS Visual Studio / Visual C++. -You need to use the same version of MS Visual Studio for building all third-party products and OCCT itself, in order to receive a consistent set of run-time binaries. +You need to use the same version of MS Visual Studio for building all third-party products and OCCT itself, in order to receive a consistent set of runtime binaries. -The links for downloading the third-party products are available at https://opencascade.com/content/3rd-party-components. - -There are two types of third-party products used by OCCT: - -* Mandatory products: - * Tcl/Tk 8.5 -- 8.6; - * FreeType 2.4.10 -- 2.5.3. -* Optional products: - * TBB 3.x -- 4.x; - * FreeImage 3.14.1 -- 3.16.0; - * VTK 6.1.0. - -It is recommended to create a separate new folder on your workstation, where you will unpack the downloaded archives of the third-party products, and where you will build these products (for example, *c:\\occ3rdparty*). - -Further in this document, this folder is referred to as *3rdparty*. +It is recommended to create a separate new folder on your workstation, where you will unpack the downloaded archives of the third-party products, and where you will build these products (for example, `c:/occ3rdparty`). +Further in this document, this folder is referred to as `3rdparty`. @subsection dev_guides__building_3rdparty_win_2 Tcl/Tk Tcl/Tk is required for DRAW test harness. **Installation from sources: Tcl** - + Download the necessary archive from https://www.tcl.tk/software/tcltk/download.html and unpack it. -1. In the *win* sub-directory, edit file *buildall.vc.bat*: +1. In the `win` sub-directory, edit file `buildall.vc.bat`: - * Edit the line "call ... vcvars32.bat" to have correct path to the version of Visual Studio to be used for building, for instance: + * Edit the line `"call ... vcvars32.bat"` to have correct path to the version of Visual Studio to be used for building, for instance: call "%VS80COMNTOOLS%\vsvars32.bat" If you are building 64-bit version, set environment accordingly, e.g.: call "%VS80COMNTOOLS%\..\..\VC\vcvarsall.bat" amd64 - - * Define variable *INSTALLDIR* pointing to directory where Tcl/Tk will be installed, e.g.: + + * Define variable `INSTALLDIR` pointing to directory where Tcl/Tk will be installed, e.g.: set INSTALLDIR=D:\OCCT\3rdparty\tcltk-86-32 - * Add option *install* to the first command line calling *nmake*: + * Add option `install` to the first command line calling `nmake`: nmake -nologo -f makefile.vc release htmlhelp install %1 - * Remove second call to *nmake* (building statically linked executable) + * Remove second call to `nmake` (building statically linked executable) -2. Edit file *rules.vc* replacing line +2. Edit file `rules.vc` replacing line SUFX = tsgx @@ -65,21 +53,18 @@ Download the necessary archive from https://www.tcl.tk/software/tcltk/download.h This is to avoid extra prefix 't' in the library name, which is not recognized by default by OCCT build tools. - 3. By default, Tcl uses dynamic version of run-time library (MSVCRT), which must be installed on the system where Tcl will be used. You may wish to link Tcl library with static version of run-time to avoid this dependency. For that: - * Edit file *makefile.vc* replacing strings "crt = -MD" by "crt = -MT" - - * Edit source file *tclMain.c* (located in folder *generic*) commenting out forward declaration of function *isatty()*. + * Edit file `makefile.vc` replacing strings `"crt = -MD"` by `"crt = -MT"` + * Edit source file `tclMain.c` (located in folder `generic`) commenting out forward declaration of function `isatty()`. -4. In the command prompt, run *buildall.vc.bat* +4. In the command prompt, run `buildall.vc.bat`
+ You might need to run this script twice to have `tclsh` executable installed; check subfolder `bin` of specified installation path to verify this. - You might need to run this script twice to have *tclsh* executable installed; check subfolder *bin* of specified installation path to verify this. - -5. For convenience of use, we recommend making a copy of *tclsh* executable created in subfolder *bin* of *INSTALLDIR* and named with Tcl version number suffix, as *tclsh.exe* (with no suffix) +5. For convenience of use, we recommend making a copy of `tclsh` executable created in subfolder `bin` of `INSTALLDIR` and named with Tcl version number suffix, as `tclsh.exe` (with no suffix) > cd D:\OCCT\3rdparty\tcltk-86-32\bin > cp tclsh86.exe tclsh.exe @@ -87,190 +72,153 @@ Download the necessary archive from https://www.tcl.tk/software/tcltk/download.h **Installation from sources: Tk** Download the necessary archive from https://www.tcl.tk/software/tcltk/download.html and unpack it. +Apply the same steps as described for building Tcl above, with the same `INSTALLDIR`. +Note that Tk produces its own executable, called `wish`. -Apply the same steps as described for building Tcl above, with the same INSTALLDIR. -Note that Tk produces its own executable, called *wish*. - -You might need to edit default value of *TCLDIR* variable defined in *buildall.vc.bat* (should be not necessary if you unpack both Tcl and Tk sources in the same folder). +You might need to edit default value of `TCLDIR` variable defined in `buildall.vc.bat` (should be not necessary if you unpack both Tcl and Tk sources in the same folder). @subsection dev_guides__building_3rdparty_win_2_2 FreeType -FreeType is required for text display in a 3D viewer. You can download its sources from https://sourceforge.net/projects/freetype/files/ +FreeType is required for text display in a 3D viewer. +You can download its sources from https://freetype.org/ -### The building procedure +1. Unpack the downloaded archive of FreeType product into the `3rdparty` folder. + As a result, you will get a folder named, for example, `3rdparty/freetype-2.4.10`. + Further in this document, this folder is referred to as `freetype`. -1. Unpack the downloaded archive of FreeType product into the *3rdparty* folder. As a result, you will get a folder named, for example, *3rdparty\\freetype-2.4.10*. Further in this document, this folder is referred to as *freetype*. - -2. Open the solution file *freetype\\builds\\win32\\vc20xx\\freetype.sln* in Visual Studio. Here *vc20xx* stands for your version of Visual Studio. +2. Open the solution file `freetype/builds/win32/vc20xx/freetype.sln` in Visual Studio. + Here `vc20xx` stands for your version of Visual Studio. -3. Select the configuration to build: either Debug or Release. +3. Select the configuration to build: either `Debug` or `Release`. -4. Build the *freetype* project. +4. Build the `freetype` project.
+ As a result, you will get a `freetype` import library (`.lib`) in the `freetype/obj/win32/vc20xx` folder. - As a result, you will get a freetype import library (.lib) in the *freetype\\obj\\win32\\vc20xx* folder. - - -5. If you build FreeType for a 64 bit platform, select in the main menu **Build - Configuration Manager** and add *x64* platform to the solution configuration by copying the settings from Win32 platform: +5. If you build FreeType for a 64 bit platform, select in the main menu `Build - Configuration Manager` + and add `x64` platform to the solution configuration by copying the settings from `Win32` platform: @figure{/build/build_3rdparty/images/3rdparty_image001.png} - Update the value of the Output File for x64 configuration: + Update the value of the Output File for `x64` configuration: @figure{/build/build_3rdparty/images/3rdparty_image003.png} - Build the *freetype* project. - - As a result, you will obtain a 64 bit import library (.lib) file in the *freetype\\x64\\vc20xx* folder. + Build the `freetype` project.
+ As a result, you will obtain a 64 bit import library (`.lib`) file in the `freetype/x64/vc20xx` folder. + To build FreeType as a dynamic library (`.dll`) follow steps 6, 7 and 8 of this procedure. - To build FreeType as a dynamic library (.dll) follow steps 6, 7 and 8 of this procedure. +6. Open menu Project-> Properties-> Configuration Properties-> General and change option `Configuration Type` to `Dynamic Library (.dll)`. +7. Edit file `freetype/include/freetype/config/ftoption.h`:
+ in line 255, uncomment the definition of macro `FT_EXPORT` and change it as follows: -6. Open menu Project-> Properties-> Configuration Properties-> General and change option **Configuration Type** to *Dynamic Library (.dll)*. -7. Edit file *freetype\\include\\freetype\\config\\ftoption.h*: - - in line 255, uncomment the definition of macro *FT_EXPORT* and change it as follows: - - #define FT_EXPORT(x) __declspec(dllexport) x + #define FT_EXPORT(x) __declspec(dllexport) x -8. Build the *freetype* project. +8. Build the `freetype` project.
+ As a result, you will obtain the files of the import library (`.lib`) and the dynamic library (`.dll`) in folders `freetype/objs/release` or `freetype/objs/debug`. + If you build for a 64 bit platform, follow step 5 of the procedure. - As a result, you will obtain the files of the import library (.lib) and the dynamic library (.dll) in folders freetype \\objs\\release or \\objs\\debug . - - If you build for a 64 bit platform, follow step 5 of the procedure. - - To facilitate the use of FreeType libraries in OCCT with minimal adjustment of build procedures, it is recommended to copy the include files and libraries of FreeType into a separate folder, named according to the pattern: *freetype-compiler-bitness-building mode*, where: - * **compiler** is *vc8* or *vc9* or *vc10* or *vc11*; - * **bitness** is *32* or *64*; - * **building mode** is *opt* (for Release) or *deb* (for Debug). - - The *include* subfolder should be copied as is, while libraries should be renamed to *freetype.lib* and *freetype.dll* (suffixes removed) and placed to subdirectories *lib *and *bin*, respectively. If the Debug configuration is built, the Debug libraries should be put into subdirectories *libd* and *bind*. + To facilitate the use of FreeType libraries in OCCT with minimal adjustment of build procedures, + it is recommended to copy the include files and libraries of FreeType into a separate folder, named according to the pattern `freetype-compiler-bitness-building mode`, where: + * `compiler` is `vc8` or `vc9` or `vc10` or `vc11`; + * `bitness` is `32` or `64`; + * `building mode` is `opt` (for `Release`) or `deb` (for `Debug`). + The `include` subfolder should be copied as is, while libraries should be renamed to `freetype.lib` and `freetype.dll` (suffixes removed) and placed to subdirectories `lib` and `bin`, respectively. + If the `Debug` configuration is built, the Debug libraries should be put into subdirectories `libd` and `bind`. @subsection dev_guides__building_3rdparty_win_3_1 TBB -This third-party product is installed with binaries -from the archive that can be downloaded from https://github.com/intel/tbb. -Go to the **Download** page, find the release version you need (e.g. *tbb30_018oss*) and pick the archive for Windows platform. +This third-party product is installed with binaries from the archive that can be downloaded from https://github.com/intel/tbb. +Go to the **Download** page, find the release version you need (e.g. `tbb30_018oss`) and pick the archive for Windows platform. -Unpack the downloaded archive of TBB product into the *3rdparty* folder. +Unpack the downloaded archive of TBB product into the `3rdparty` folder. -Further in this document, this folder is referred to as *tbb*. +Further in this document, this folder is referred to as `tbb`. @subsection dev_guides__building_3rdparty_win_3_3 FreeImage -This third-party product should be built as a dynamically loadable library (.dll file). -You can download its sources from +This third-party product should be built as a dynamically loadable library (`.dll` file). +You can download its sources from https://sourceforge.net/projects/freeimage/files/Source%20Distribution/ -### The building procedure: +1. Unpack the downloaded archive of FreeImage product into `3rdparty` folder.
+ As a result, you should have a folder named `3rdparty/FreeImage`. + Rename it according to the rule: `freeimage-platform-compiler-building mode`, where -1. Unpack the downloaded archive of FreeImage product into *3rdparty* folder. - - As a result, you should have a folder named *3rdparty\\FreeImage*. - - Rename it according to the rule: *freeimage-platform-compiler-building mode*, where - - * **platform** is *win32* or *win64*; - * **compiler** is *vc8* or *vc9* or *vc10* or *vc11*; - * **building mode** is *opt* (for release) or *deb* (for debug) + * `platform` is `win32` or `win64`; + * `compiler` is `vc8` or `vc9` or `vc10` or `vc11`; + * `building mode` is *opt* (for release) or `deb` (for debug) - Further in this document, this folder is referred to as *freeimage*. + Further in this document, this folder is referred to as `freeimage`. -2. Open the solution file *freeimage\\FreeImage.*.sln* in your Visual Studio. - - If you use a Visual Studio version higher than VC++ 2008, apply conversion of the workspace. - Such conversion should be suggested automatically by Visual Studio. - -3. Select a configuration to build. +2. Open the solution file `freeimage/FreeImage.*.sln` in your Visual Studio.
+ If you use a Visual Studio version higher than VC++ 2008, apply conversion of the workspace. + Such conversion should be suggested automatically by Visual Studio. + +3. Select a configuration to build. + - Choose `Release` if you are building Release binaries. + - Choose `Debug` if you are building Debug binaries. - - Choose **Release** if you are building Release binaries. - - Choose **Debug** if you are building Debug binaries. + *Note:* - *Note:* + If you want to build a debug version of FreeImage binaries then you need to rename the following files in FreeImage projects: - If you want to build a debug version of FreeImage binaries then you need to rename the following files in FreeImage and FreeimagePlus projects: - Project -> Properties -> Configuration Properties -> Linker -> General -> Output File - FreeImage*d*.dll to FreeImage.dll - FreeImagePlus*d*.dll to FreeImagePlus.dll + FreeImage*d*.dll to FreeImage.dll Project -> Properties -> Configuration Properties -> Linker -> Debugging-> Generate Program Database File - FreeImage*d*.pdb to FreeImage.pdb - FreeImagePlus*d*.pdb to FreeImagePlus.pdb + FreeImage*d*.pdb to FreeImage.pdb Project -> Properties -> Configuration Properties -> Linker -> Advanced-Import Library - FreeImage*d*.lib to FreeImage.lib - FreeImagePlus*d*.lib to FreeImagePlus.lib + FreeImage*d*.lib to FreeImage.lib - Project -> Properties -> Configuration Properties -> Build Events -> Post -> Build Event -> Command Line + Project -> Properties -> Configuration Properties -> Build Events -> Post -> Build Event -> Command Line - FreeImage*d*.dll to FreeImage.dll - FreeImage*d*.lib to FreeImage.lib - FreeImagePlus*d*.dll to FreeImagePlus.dll - FreeImagePlus*d*.lib to FreeImagePlus.lib + FreeImage*d*.dll to FreeImage.dll + FreeImage*d*.lib to FreeImage.lib - Additionally, rename in project FreeImagePlus - - Project -> Properties -> Configuration Properties -> Linker -> Input -> Additional Dependencies + Additionally, rename in project FreeImagePlus - from FreeImage*d*.lib to FreeImage.lib + Project -> Properties -> Configuration Properties -> Linker -> Input -> Additional Dependencies -4. Select a platform to build. + from FreeImage*d*.lib to FreeImage.lib - - Choose *Win32* if you are building for a 32 bit platform. - - Choose *x64* if you are building for a 64 bit platform. +4. Select a platform to build. + - Choose `Win32` if you are building for a 32 bit platform. + - Choose `x64` if you are building for a 64 bit platform. -5. Start the building process. - - As a result, you should have the library files of FreeImage product in *freeimage\\Dist* folder (*FreeImage.dll* and *FreeImage.lib*) and in *freeimage\\Wrapper\\FreeImagePlus\\dist* folder (*FreeImagePlus.dll* and *FreeImagePlus.lib*). +5. Start the building process.
+ As a result, you should have the library files of FreeImage product in `freeimage/Dist` folder (`FreeImage.dll` and `FreeImage.lib`). @subsection dev_guides__building_3rdparty_win_3_4 VTK -VTK is an open-source, freely available software system for 3D computer graphics, image processing and visualization. VTK Integration Services component provides adaptation functionality for visualization of OCCT topological shapes by means of VTK library. - -### The building procedure: - -1. Download the necessary archive from https://www.vtk.org/VTK/resources/software.html and unpack it into *3rdparty* folder. - - As a result, you will get a folder named, for example, 3rdparty\VTK-6.1.0. +VTK Integration Services component provides adaptation functionality for visualization of OCCT topological shapes by means of VTK library. - Further in this document, this folder is referred to as *VTK*. +1. Download the necessary archive from https://www.vtk.org/VTK/resources/software.html and unpack it into `3rdparty` folder.
+ As a result, you will get a folder named, for example, `3rdparty/VTK-6.1.0`. + Further in this document, this folder is referred to as `VTK`. 2. Use CMake to generate VS projects for building the library: - - Start CMake-GUI and select VTK folder as source path, and the folder of your choice for VS project and intermediate build data. + - Start CMake-GUI and select `VTK` folder as source path, and the folder of your choice for VS project and intermediate build data. - Click **Configure**. - Select the VS version to be used from the ones you have installed (we recommend using VS 2015) and the architecture (32 or 64-bit). - - Generate VS projects with default CMake options. The open solution *VTK.sln* will be generated in the build folder. + - Generate VS projects with default CMake options. The open solution `VTK.sln` will be generated in the build folder. 3. Build project VTK in Release mode. - @section build_3rdparty_linux Linux -This document presents additional guidelines for building third-party -products used by Open CASCADE Technology and samples on Linux platform. - -The links for downloading the third-party products are available on the web site at -https://opencascade.com/content/3rd-party-components. - -There are two types of third-party products, which are necessary to build OCCT: - -* Mandatory products: - * Tcl/Tk 8.5 - 8.6;   - * FreeType 2.4.10 - 2.5.3; -* Optional products: - * TBB 3.x - 4.x; - * FreeImage 3.14.1 - 3.16.0; - * VTK 6.1.0. +This section presents additional guidelines for building third-party products used by Open CASCADE Technology and samples on Linux platform. @subsection dev_guides__building_3rdparty_linux_4 Installation From Official Repositories **Debian-based distributives** -All 3rd-party products required for building of OCCT could be installed -from official repositories. You may install them from console using apt-get utility: +All 3rd-party products required for building of OCCT could be installed from official repositories. +You may install them from console using apt-get utility: sudo apt-get install tcllib tklib tcl-dev tk-dev libfreetype-dev libx11-dev libgl1-mesa-dev libfreeimage-dev sudo apt-get install rapidjson-dev libdraco-dev @@ -279,148 +227,148 @@ Building is possible with C++ compliant compiler: sudo apt-get install g++ -@subsection dev_guides__building_3rdparty_linux_2_1 Tcl/Tk +@subsection dev_guides__building_3rdparty_linux_2_1 Tcl/Tk -Tcl/Tk is required for DRAW test harness. +Tcl/Tk is required for DRAW test harness. **Installation from sources: Tcl** - + Download the necessary archive from https://www.tcl.tk/software/tcltk/download.html and unpack it. - -1. Enter the unix sub-directory of the directory where the Tcl source files are located (TCL_SRC_DIR). - cd TCL_SRC_DIR/unix +1. Enter the `unix` sub-directory of the directory where the Tcl source files are located (`TCL_SRC_DIR`). -2. Run the *configure* command: + cd TCL_SRC_DIR/unix - configure --enable-gcc --enable-shared --enable-threads --prefix=TCL_INSTALL_DIR +2. Run the `configure` command: - For a 64 bit platform also add --enable-64bit option to the command line. - -3. If the configure command has finished successfully, start the building process: - - make + configure --enable-gcc --enable-shared --enable-threads --prefix=TCL_INSTALL_DIR -4. If building is finished successfully, start the installation of Tcl. - All binary and service files of the product will be copied to the directory defined by *TCL_INSTALL_DIR* + For a 64 bit platform also add `--enable-64bit` option to the command line. - make install +3. If the configure command has finished successfully, start the building process: + + make + +4. If building is finished successfully, start the installation of Tcl. + All binary and service files of the product will be copied to the directory defined by `TCL_INSTALL_DIR` + + make install **Installation from sources: Tk** - + Download the necessary archive from https://www.tcl.tk/software/tcltk/download.html and unpack it. -1. Enter the unix sub-directory of the directory where the Tk source files are located (TK_SRC_DIR) +1. Enter the `unix` sub-directory of the directory where the Tk source files are located (`TK_SRC_DIR`) - cd TK_SRC_DIR/unix + cd TK_SRC_DIR/unix -2. Run the configure command, where TCL_LIB_DIR is *TCL_INSTALL_DIR/lib*. +2. Run the `configure` command, where `TCL_LIB_DIR` is `TCL_INSTALL_DIR/lib`. - configure --enable-gcc --enable-shared --enable-threads --with-tcl=TCL_LIB_DIR --prefix=TK_INSTALL_DIR + configure --enable-gcc --enable-shared --enable-threads --with-tcl=TCL_LIB_DIR --prefix=TK_INSTALL_DIR - For a 64 bit platform also add --enable-64bit option to the command line. + For a 64 bit platform also add `--enable-64bit` option to the command line. -3. If the configure command has finished successfully, start the building process: +3. If the configure command has finished successfully, start the building process: - make + make -4. If the building has finished successfully, start the installation of Tk. - All binary and service files of the product will be copied - to the directory defined by *TK_INSTALL_DIR* (usually it is *TCL_INSTALL_DIR*) +4. If the building has finished successfully, start the installation of Tk. + All binary and service files of the product will be copied + to the directory defined by `TK_INSTALL_DIR` (usually it is `TCL_INSTALL_DIR`) - make install + make install @subsection dev_guides__building_3rdparty_linux_2_2 FreeType -FreeType is required for text display in the 3D viewer. -Download the necessary archive from https://sourceforge.net/projects/freetype/files/ and unpack it. - -1. Enter the directory where the source files of FreeType are located (FREETYPE_SRC_DIR). +FreeType is required for text display in the 3D viewer. +Download the necessary archive from https://freetype.org/ and unpack it. + +1. Enter the directory where the source files of FreeType are located (`FREETYPE_SRC_DIR`). cd FREETYPE_SRC_DIR -2. Run the *configure* command: - - configure --prefix=FREETYPE_INSTALL_DIR +2. Run the `configure` command: + + configure --prefix=FREETYPE_INSTALL_DIR - For a 64 bit platform also add CFLAGS='-m64 -fPIC' CPPFLAGS='-m64 -fPIC' option to the command line. - -3. If the *configure* command has finished successfully, start the building process: + For a 64 bit platform also add `CFLAGS='-m64 -fPIC' CPPFLAGS='-m64 -fPIC'` option to the command line. - make +3. If the `configure` command has finished successfully, start the building process: -4. If the building has finished successfully, start the installation of FreeType. - All binary and service files of the product will be copied to the directory defined by *FREETYPE_INSTALL_DIR* - - make install + make + +4. If the building has finished successfully, start the installation of FreeType. + All binary and service files of the product will be copied to the directory defined by `FREETYPE_INSTALL_DIR` + + make install - @subsection dev_guides__building_3rdparty_linux_3_1 TBB -This third-party product is installed with binaries from the archive that can be downloaded from https://github.com/intel/tbb. -Go to the **Download** page, find the release version you need and pick the archive for Linux platform. +This third-party product is installed with binaries from the archive that can be downloaded from https://github.com/intel/tbb. +Go to the **Download** page, find the release version you need and pick the archive for Linux platform. To install, unpack the downloaded archive of TBB product. @subsection dev_guides__building_3rdparty_linux_3_3 FreeImage -Download the necessary archive from https://sourceforge.net/projects/freeimage/files/Source%20Distribution/ -and unpack it. The directory with unpacked sources is further referred to as *FREEIMAGE_SRC_DIR*. - -1. Modify *FREEIMAGE_SRC_DIR/Source/OpenEXR/Imath/ImathMatrix.h*: - In line 60 insert the following: +Download the necessary archive from https://sourceforge.net/projects/freeimage/files/Source%20Distribution/ and unpack it. +The directory with unpacked sources is further referred to as `FREEIMAGE_SRC_DIR`. - #include string.h +1. Modify `FREEIMAGE_SRC_DIR/Source/OpenEXR/Imath/ImathMatrix.h`:
+ In line 60 insert the following: -2. Enter the directory where the source files of FreeImage are located (FREEIMAGE_SRC_DIR). - - cd FREEIMAGE_SRC_DIR + #include string.h -3. Run the building process - - make +2. Enter the directory where the source files of FreeImage are located (`FREEIMAGE_SRC_DIR`). -4. Run the installation process + cd FREEIMAGE_SRC_DIR - a. If you have the permission to write into directories /usr/include and /usr/lib, run the following command: +3. Run the building process + + make + +4. Run the installation process + + a. If you have the permission to write into directories `/usr/include` and `/usr/lib`, run the following command: + + make install + + b. If you do not have this permission, you need to modify file `FREEIMAGE_SRC_DIR/Makefile.gnu`: - make install - b. If you do not have this permission, you need to modify file *FREEIMAGE_SRC_DIR/Makefile.gnu*: - Change lines 7-9 from: - - DESTDIR ?= / - INCDIR ?= $(DESTDIR)/usr/include - INSTALLDIR ?= $(DESTDIR)/usr/lib - to: + DESTDIR ?= / + INCDIR ?= $(DESTDIR)/usr/include + INSTALLDIR ?= $(DESTDIR)/usr/lib - DESTDIR ?= $(DESTDIR) - INCDIR ?= $(DESTDIR)/include - INSTALLDIR ?= $(DESTDIR)/lib + to: - Change lines 65-67 from: + DESTDIR ?= $(DESTDIR) + INCDIR ?= $(DESTDIR)/include + INSTALLDIR ?= $(DESTDIR)/lib + + Change lines 65-67 from: + + install -m 644 -o root -g root $(HEADER) $(INCDIR) + install -m 644 -o root -g root $(STATICLIB) $(INSTALLDIR) + install -m 755 -o root -g root $(SHAREDLIB) $(INSTALLDIR) - install -m 644 -o root -g root $(HEADER) $(INCDIR) - install -m 644 -o root -g root $(STATICLIB) $(INSTALLDIR) - install -m 755 -o root -g root $(SHAREDLIB) $(INSTALLDIR) - to: - install -m 755 $(HEADER) $(INCDIR) - install -m 755 $(STATICLIB) $(INSTALLDIR) + install -m 755 $(HEADER) $(INCDIR) + install -m 755 $(STATICLIB) $(INSTALLDIR) install -m 755 $(SHAREDLIB) $(INSTALLDIR) - Change line 70 from:  + Change line 70 from: ldconfig to: - \#ldconfig - - Then run the installation process by the following command: + \#ldconfig + + Then run the installation process by the following command: - make DESTDIR=FREEIMAGE_INSTALL_DIR install + make DESTDIR=FREEIMAGE_INSTALL_DIR install 5. Clean temporary files @@ -428,201 +376,180 @@ and unpack it. The directory with unpacked sources is further referred to as *F @subsection dev_guides__building_3rdparty_linux_3_4 VTK -You can download VTK sources from https://www.vtk.org/VTK/resources/software.html - -### The building procedure: - Download the necessary archive from https://www.vtk.org/VTK/resources/software.html and unpack it. -1. Install or build *cmake* product from the source file. -2. Start *cmake* in GUI mode with the directory where the source files of *VTK* are located: +1. Install or build `cmake` product from the source file. +2. Start `cmake` in GUI mode with the directory where the source files of *VTK* are located: ccmake VTK_SRC_DIR - * Press [c] to make the initial configuration - * Define the necessary options in *VTK_INSTALL_PREFIX* - * Press [c] to make the final configuration - * Press [g] to generate Makefile and exit + * Press `[c]` to make the initial configuration + * Define the necessary options in `VTK_INSTALL_PREFIX` + * Press `[c]` to make the final configuration + * Press `[g]` to generate `Makefile` and exit 3. Start the building of VTK: make -4. Start the installation of VTK. Binaries will be installed according to the *VTK_INSTALL_PREFIX* option. +4. Start the installation of VTK. Binaries will be installed according to the `VTK_INSTALL_PREFIX` option. make install @section build_3rdparty_macos Mac OS X -This document presents additional guidelines for building third-party products -used by Open CASCADE Technology and samples on Mac OS X platform (10.6.4 and later). +This section presents additional guidelines for building third-party products +used by Open CASCADE Technology and samples on Mac OS X platform (10.6.4 and later). -The links for downloading the third-party products are available at https://opencascade.com/content/3rd-party-components. +@subsection dev_guides__building_3rdparty_osx_2_1 Tcl/Tk -There are two types of third-party products, which are necessary to build OCCT: - -* Mandatory products: - * Tcl/Tk 8.5 - 8.6; - * FreeType 2.4.10 - 2.5.3. -* Optional products: - * TBB 3.x - 4.x; - * FreeImage 3.14.1 - 3.16.0 - - -@subsection dev_guides__building_3rdparty_osx_2_1 Tcl/Tk 8.5 - -Tcl/Tk is required for DRAW test harness. Version 8.5 or 8.6 can be used with OCCT. +Tcl/Tk is required for DRAW test harness. -**Installation from sources: Tcl 8.5** +**Installation from sources: Tcl** Download the necessary archive from https://www.tcl.tk/software/tcltk/download.html and unpack it. -1. Enter the *macosx* sub-directory of the directory where the Tcl source files are located (TCL_SRC_DIR). +1. Enter the `macosx` sub-directory of the directory where the Tcl source files are located (`TCL_SRC_DIR`). - cd TCL_SRC_DIR/macosx + cd TCL_SRC_DIR/macosx -2. Run the *configure* command +2. Run the `configure` command - configure --enable-gcc --enable-shared --enable-threads --prefix=TCL_INSTALL_DIR + configure --enable-gcc --enable-shared --enable-threads --prefix=TCL_INSTALL_DIR - For a 64 bit platform also add --enable-64bit option to the command line. + For a 64 bit platform also add `--enable-64bit` option to the command line. -3. If the *configure* command has finished successfully, start the building process +3. If the `configure` command has finished successfully, start the building process - make - -4. If building is finished successfully, start the installation of Tcl. - All binary and service files of the product will be copied to the directory defined by *TCL_INSTALL_DIR*. + make - make install +4. If building is finished successfully, start the installation of Tcl. + All binary and service files of the product will be copied to the directory defined by `TCL_INSTALL_DIR`. -**Installation from sources: Tk 8.5** + make install + +**Installation from sources: Tk** Download the necessary archive from https://www.tcl.tk/software/tcltk/download.html and unpack it. -1. Enter the *macosx* sub-directory of the directory where the source files of Tk are located (TK_SRC_DIR). +1. Enter the `macosx` sub-directory of the directory where the source files of Tk are located (`TK_SRC_DIR`). - cd TK_SRC_DIR/macosx + cd TK_SRC_DIR/macosx -2. Run the *configure* command, where TCL_LIB_DIR is TCL_INSTALL_DIR/lib +2. Run the `configure` command, where `TCL_LIB_DIR` is `TCL_INSTALL_DIR/lib` - configure --enable-gcc --enable-shared --enable-threads --with-tcl=TCL_LIB_DIR --prefix=TK_INSTALL_DIR + configure --enable-gcc --enable-shared --enable-threads --with-tcl=TCL_LIB_DIR --prefix=TK_INSTALL_DIR - For a 64 bit platform also add --enable-64bit option to the command line. + For a 64 bit platform also add `--enable-64bit` option to the command line. -3. If the *configure* command has finished successfully, start the building process: +3. If the `configure` command has finished successfully, start the building process: - make + make -4. If the building has finished successfully, start the installation of Tk. All binary and service files of the product will be copied to the directory defined by *TK_INSTALL_DIR* (usually it is TCL_INSTALL_DIR) +4. If the building has finished successfully, start the installation of Tk. + All binary and service files of the product will be copied to the directory defined by `TK_INSTALL_DIR` (usually it is `TCL_INSTALL_DIR`). - make install + make install -@subsection dev_guides__building_3rdparty_osx_2_2 FreeType 2.4.10 - -FreeType is required for text display in the 3D viewer. +@subsection dev_guides__building_3rdparty_osx_2_2 FreeType -Download the necessary archive from https://sourceforge.net/projects/freetype/files/ and unpack it. +FreeType is required for text display in the 3D viewer. +Download the necessary archive from https://freetype.org/ and unpack it. -1. Enter the directory where the source files of FreeType are located (FREETYPE_SRC_DIR). +1. Enter the directory where the source files of FreeType are located (`FREETYPE_SRC_DIR`). - cd FREETYPE_SRC_DIR + cd FREETYPE_SRC_DIR -2. Run the *configure* command - - configure --prefix=FREETYPE_INSTALL_DIR +2. Run the `configure` command + + configure --prefix=FREETYPE_INSTALL_DIR + + For a 64 bit platform also add `CFLAGS='-m64 -fPIC' CPPFLAGS='-m64 -fPIC'` option to the command line. - For a 64 bit platform also add CFLAGS='-m64 -fPIC' CPPFLAGS='-m64 -fPIC' option to the command line. +3. If the `configure` command has finished successfully, start the building process -3. If the *configure* command has finished successfully, start the building process + make - make +4. If building has finished successfully, start the installation of FreeType. + All binary and service files of the product will be copied to the directory defined by `FREETYPE_INSTALL_DIR`. -4. If building has finished successfully, start the installation of FreeType. - All binary and service files of the product will be copied to the directory defined by *FREETYPE_INSTALL_DIR*. + make install - make install - -@subsection dev_guides__building_3rdparty_osx_3_1 TBB 3.x or 4.x +@subsection dev_guides__building_3rdparty_osx_3_1 TBB -This third-party product is installed with binaries from the archive -that can be downloaded from https://github.com/intel/tbb. -Go to the **Download** page, find the release version you need (e.g. *tbb30_018oss*) -and pick the archive for Mac OS X platform. -To install, unpack the downloaded archive of TBB 3.0 product (*tbb30_018oss_osx.tgz*). +This third-party product is installed with binaries from the archive that can be downloaded from https://github.com/intel/tbb. +Go to the **Download** page, find the release version you need (e.g. `tbb30_018oss`) and pick the archive for Mac OS X platform. +To install, unpack the downloaded archive of TBB product (`tbb30_018oss_osx.tgz`). -@subsection dev_guides__building_3rdparty_osx_3_3 FreeImage 3.14.1 or 3.15.x +@subsection dev_guides__building_3rdparty_osx_3_3 FreeImage -Download the necessary archive from +Download the necessary archive from https://sourceforge.net/projects/freeimage/files/Source%20Distribution/ -and unpack it. The directory with unpacked sources is further referred to as *FREEIMAGE_SRC_DIR*. +and unpack it. The directory with unpacked sources is further referred to as `FREEIMAGE_SRC_DIR`. -Note that for building FreeImage on Mac OS X 10.7 you should replace *Makefile.osx* -in *FREEIMAGE_SRC_DIR* by the corrected file, which you can find in attachment to issue #22811 in OCCT Mantis bug tracker -(https://tracker.dev.opencascade.org/file_download.php?file_id=6937&type=bug). +Note that for building FreeImage on Mac OS X 10.7 you should replace `Makefile.osx` +in `FREEIMAGE_SRC_DIR` by the corrected file, which you can find in attachment to issue [`#22811`](https://tracker.dev.opencascade.org/file_download.php?file_id=6937&type=bug) in OCCT Mantis bug tracker. -1. If you build FreeImage 3.15.x you can skip this step. - Modify FREEIMAGE_SRC_DIR/Source/OpenEXR/Imath/ImathMatrix.h: - - In line 60 insert the following: +1. If you build FreeImage 3.15.x you can skip this step. - #include string.h + Modify `FREEIMAGE_SRC_DIR/Source/OpenEXR/Imath/ImathMatrix.h:`
+ In line 60 insert the following: - Modify FREEIMAGE_SRC_DIR/Source/FreeImage/PluginTARGA.cpp: - - In line 320 replace: + #include string.h - SwapShort(value); + Modify `FREEIMAGE_SRC_DIR/Source/FreeImage/PluginTARGA.cpp`:
+ In line 320 replace: - with: + SwapShort(value); - SwapShort(&value); + with: -2. Enter the directory where the source files of FreeImage are located (FREEIMAGE_SRC_DIR). + SwapShort(&value); - cd FREEIMAGE_SRC_DIR +2. Enter the directory where the source files of FreeImage are located (`FREEIMAGE_SRC_DIR`). + + cd FREEIMAGE_SRC_DIR 3. Run the building process - make + make -4. Run the installation process - - 1. If you have the permission to write into /usr/local/include and /usr/local/lib directories, run the following command: +4. Run the installation process - make install + 1. If you have the permission to write into `/usr/local/include` and `/usr/local/lib` directories, run the following command: - 2. If you do not have this permission, you need to modify file *FREEIMAGE_SRC_DIR/Makefile.osx*: + make install - Change line 49 from:    + 2. If you do not have this permission, you need to modify file `FREEIMAGE_SRC_DIR/Makefile.osx`:
+ Change line 49 from: PREFIX ?= /usr/local to: - - PREFIX ?= $(PREFIX) - -   Change lines 65-69 from: - - install -d -m 755 -o root -g wheel $(INCDIR) $(INSTALLDIR) - install -m 644 -o root -g wheel $(HEADER) $(INCDIR) - install -m 644 -o root -g wheel $(SHAREDLIB) $(STATICLIB) $(INSTALLDIR) - ranlib -sf $(INSTALLDIR)/$(STATICLIB) - ln -sf $(SHAREDLIB) $(INSTALLDIR)/$(LIBNAME) - - to: - - install -d $(INCDIR) $(INSTALLDIR) - install -m 755 $(HEADER) $(INCDIR) - install -m 755 $(STATICLIB) $(INSTALLDIR) - install -m 755 $(SHAREDLIB) $(INSTALLDIR) - ln -sf $(SHAREDLIB) $(INSTALLDIR)/$(VERLIBNAME) + + PREFIX ?= $(PREFIX) + +   Change lines 65-69 from: + + install -d -m 755 -o root -g wheel $(INCDIR) $(INSTALLDIR) + install -m 644 -o root -g wheel $(HEADER) $(INCDIR) + install -m 644 -o root -g wheel $(SHAREDLIB) $(STATICLIB) $(INSTALLDIR) + ranlib -sf $(INSTALLDIR)/$(STATICLIB) + ln -sf $(SHAREDLIB) $(INSTALLDIR)/$(LIBNAME) + + to: + + install -d $(INCDIR) $(INSTALLDIR) + install -m 755 $(HEADER) $(INCDIR) + install -m 755 $(STATICLIB) $(INSTALLDIR) + install -m 755 $(SHAREDLIB) $(INSTALLDIR) + ln -sf $(SHAREDLIB) $(INSTALLDIR)/$(VERLIBNAME) ln -sf $(VERLIBNAME) $(INSTALLDIR)/$(LIBNAME) - Then run the installation process by the following command: - - make PREFIX=FREEIMAGE_INSTALL_DIR install - -5. Clean temporary files - + Then run the installation process by the following command: + + make PREFIX=FREEIMAGE_INSTALL_DIR install + +5. Clean temporary files + make clean From f91202f3ee09879e1b3a69ca7df8cde8e311ff1a Mon Sep 17 00:00:00 2001 From: Chris Hennes Date: Sat, 12 Feb 2022 18:52:19 -0600 Subject: [PATCH 213/639] 0031585: Access Violation while creating fillet - ChiFi3d_Builder::PerformIntersectionAtEnd There is one case in PerformIntersectionAtEnd that did not test whether an array access exceeded the length of the array, in rare cases resulting in a segmentation fault. That error-handling behavior is replaced by the exception code used elsewhere in the function. For consistency, the code is copied exactly as implemented elsewhere. This code has the same effect as that proposed by the bug submitter. --- src/ChFi3d/ChFi3d_Builder_C1.cxx | 1 + 1 file changed, 1 insertion(+) diff --git a/src/ChFi3d/ChFi3d_Builder_C1.cxx b/src/ChFi3d/ChFi3d_Builder_C1.cxx index 8a0da73023..d4e48a4c90 100644 --- a/src/ChFi3d/ChFi3d_Builder_C1.cxx +++ b/src/ChFi3d/ChFi3d_Builder_C1.cxx @@ -1997,6 +1997,7 @@ void ChFi3d_Builder::PerformIntersectionAtEnd(const Standard_Integer Index) if ((possible1 && possible2) || (!possible1 && !possible2) || (nbarete > 4)) { while (!trouve) { nb++; + if (nb>=nn) throw Standard_Failure("IntersectionAtEnd : the max number of faces reached"); if (nb!=1) F3=Face[nb-2]; Face[nb-1]=F3; if (CV1.Arc().IsSame(edgelibre1)) From b66cf6dae5b39ae74d8e1bc7f99bc9a235084560 Mon Sep 17 00:00:00 2001 From: aml Date: Wed, 12 Jan 2022 19:28:12 +0300 Subject: [PATCH 214/639] 0032832: Coding - get rid of unused headers [FairCurve to GeomAPI] --- src/FEmTool/FEmTool_Assembly.cxx | 2 - src/FEmTool/FEmTool_Assembly.hxx | 1 - src/FEmTool/FEmTool_Curve.cxx | 2 - src/FEmTool/FEmTool_ElementaryCriterion.cxx | 2 - src/FEmTool/FEmTool_ElementaryCriterion.hxx | 1 - src/FEmTool/FEmTool_ElementsOfRefMatrix.hxx | 1 - src/FEmTool/FEmTool_LinearFlexion.cxx | 1 - src/FEmTool/FEmTool_LinearFlexion.hxx | 1 - src/FEmTool/FEmTool_LinearJerk.cxx | 1 - src/FEmTool/FEmTool_LinearJerk.hxx | 1 - src/FEmTool/FEmTool_LinearTension.cxx | 1 - src/FEmTool/FEmTool_LinearTension.hxx | 1 - src/FEmTool/FEmTool_ProfileMatrix.hxx | 2 - src/FEmTool/FEmTool_SparseMatrix.cxx | 1 - src/FEmTool/FEmTool_SparseMatrix.hxx | 2 - src/FSD/FSD_BinaryFile.hxx | 1 - src/FSD/FSD_FStream.hxx | 1 - src/FairCurve/FairCurve_Batten.cxx | 1 - src/FairCurve/FairCurve_Batten.hxx | 2 - .../FairCurve_DistributionOfJerk.cxx | 1 - .../FairCurve_DistributionOfJerk.hxx | 1 - .../FairCurve_DistributionOfSagging.cxx | 1 - .../FairCurve_DistributionOfSagging.hxx | 1 - .../FairCurve_DistributionOfTension.cxx | 1 - .../FairCurve_DistributionOfTension.hxx | 2 - src/FairCurve/FairCurve_Energy.hxx | 2 - src/FairCurve/FairCurve_EnergyOfBatten.cxx | 1 - src/FairCurve/FairCurve_EnergyOfBatten.hxx | 1 - src/FairCurve/FairCurve_EnergyOfMVC.hxx | 2 - src/FairCurve/FairCurve_MinimalVariation.cxx | 4 -- src/FairCurve/FairCurve_MinimalVariation.hxx | 4 -- src/FairCurve/FairCurve_Newton.hxx | 3 -- src/FilletSurf/FilletSurf_Builder.cxx | 1 - src/FilletSurf/FilletSurf_InternalBuilder.cxx | 10 +---- src/FilletSurf/FilletSurf_InternalBuilder.hxx | 2 - src/Font/Font_FontMgr.cxx | 1 - src/Font/Font_FontMgr.hxx | 2 - src/Font/Font_SystemFont.hxx | 1 - src/GC/GC_MakeConicalSurface.cxx | 1 - src/GC/GC_MakeMirror.cxx | 4 -- src/GC/GC_MakePlane.cxx | 2 - src/GC/GC_MakeRotation.cxx | 1 - src/GC/GC_MakeTrimmedCylinder.cxx | 1 - src/GC/GC_Root.hxx | 2 - src/GCE2d/GCE2d_Root.hxx | 2 - src/GCPnts/GCPnts_DistFunction.hxx | 1 - src/GCPnts/GCPnts_DistFunction2d.hxx | 1 - src/GCPnts/GCPnts_QuasiUniformAbscissa.cxx | 2 - src/GCPnts/GCPnts_TangentialDeflection.cxx | 3 -- src/GCPnts/GCPnts_TangentialDeflection.hxx | 1 - src/GCPnts/GCPnts_UniformDeflection.cxx | 3 -- src/GccAna/GccAna_Circ2d2TanOn.cxx | 2 - src/GccAna/GccAna_Circ2d2TanOn.hxx | 3 -- src/GccAna/GccAna_Circ2d2TanOn_1.cxx | 2 - src/GccAna/GccAna_Circ2d2TanOn_10.cxx | 4 -- src/GccAna/GccAna_Circ2d2TanOn_11.cxx | 5 --- src/GccAna/GccAna_Circ2d2TanOn_2.cxx | 4 -- src/GccAna/GccAna_Circ2d2TanOn_3.cxx | 5 --- src/GccAna/GccAna_Circ2d2TanOn_4.cxx | 5 --- src/GccAna/GccAna_Circ2d2TanOn_5.cxx | 4 -- src/GccAna/GccAna_Circ2d2TanOn_6.cxx | 5 --- src/GccAna/GccAna_Circ2d2TanOn_7.cxx | 2 - src/GccAna/GccAna_Circ2d2TanOn_8.cxx | 7 ---- src/GccAna/GccAna_Circ2d2TanOn_9.cxx | 3 -- src/GccAna/GccAna_Circ2d2TanRad.cxx | 2 - src/GccAna/GccAna_Circ2d2TanRad.hxx | 3 -- src/GccAna/GccAna_Circ2d2TanRad_1.cxx | 2 - src/GccAna/GccAna_Circ2d2TanRad_2.cxx | 3 -- src/GccAna/GccAna_Circ2d2TanRad_3.cxx | 3 -- src/GccAna/GccAna_Circ2d2TanRad_4.cxx | 4 -- src/GccAna/GccAna_Circ2d2TanRad_5.cxx | 5 --- src/GccAna/GccAna_Circ2d3Tan.cxx | 10 ----- src/GccAna/GccAna_Circ2d3Tan.hxx | 3 -- src/GccAna/GccAna_Circ2d3Tan_1.cxx | 3 -- src/GccAna/GccAna_Circ2d3Tan_2.cxx | 3 -- src/GccAna/GccAna_Circ2d3Tan_3.cxx | 3 -- src/GccAna/GccAna_Circ2d3Tan_4.cxx | 6 --- src/GccAna/GccAna_Circ2d3Tan_5.cxx | 3 -- src/GccAna/GccAna_Circ2d3Tan_6.cxx | 4 -- src/GccAna/GccAna_Circ2d3Tan_7.cxx | 6 --- src/GccAna/GccAna_Circ2d3Tan_8.cxx | 4 -- src/GccAna/GccAna_Circ2d3Tan_9.cxx | 5 --- src/GccAna/GccAna_Circ2dBisec.cxx | 5 --- src/GccAna/GccAna_Circ2dTanCen.cxx | 1 - src/GccAna/GccAna_Circ2dTanCen.hxx | 3 -- src/GccAna/GccAna_Circ2dTanOnRad.cxx | 1 - src/GccAna/GccAna_Circ2dTanOnRad.hxx | 3 -- src/GccAna/GccAna_Circ2dTanOnRad_1.cxx | 3 -- src/GccAna/GccAna_Circ2dTanOnRad_2.cxx | 4 -- src/GccAna/GccAna_Circ2dTanOnRad_3.cxx | 3 -- src/GccAna/GccAna_Circ2dTanOnRad_4.cxx | 3 -- src/GccAna/GccAna_Circ2dTanOnRad_5.cxx | 4 -- src/GccAna/GccAna_CircLin2dBisec.cxx | 1 - src/GccAna/GccAna_CircPnt2dBisec.cxx | 3 -- src/GccAna/GccAna_Lin2d2Tan.hxx | 3 -- src/GccAna/GccAna_Lin2dBisec.cxx | 1 - src/GccAna/GccAna_Lin2dBisec.hxx | 3 -- src/GccAna/GccAna_Lin2dTanObl.cxx | 1 - src/GccAna/GccAna_Lin2dTanObl.hxx | 3 -- src/GccAna/GccAna_Lin2dTanPar.cxx | 1 - src/GccAna/GccAna_Lin2dTanPar.hxx | 3 -- src/GccAna/GccAna_Lin2dTanPer.cxx | 2 - src/GccAna/GccAna_Lin2dTanPer.hxx | 3 -- src/GccAna/GccAna_LinPnt2dBisec.cxx | 3 -- src/GccAna/GccAna_Pnt2dBisec.cxx | 2 - src/GccAna/GccAna_Pnt2dBisec.hxx | 2 - src/GccInt/GccInt_BCirc.cxx | 1 - src/GccInt/GccInt_BCirc.hxx | 1 - src/GccInt/GccInt_BElips.cxx | 1 - src/GccInt/GccInt_BElips.hxx | 1 - src/GccInt/GccInt_BHyper.cxx | 1 - src/GccInt/GccInt_BHyper.hxx | 1 - src/GccInt/GccInt_BLine.cxx | 1 - src/GccInt/GccInt_BLine.hxx | 1 - src/GccInt/GccInt_BParab.cxx | 1 - src/GccInt/GccInt_BParab.hxx | 1 - src/GccInt/GccInt_BPoint.cxx | 1 - src/GccInt/GccInt_BPoint.hxx | 1 - src/GccInt/GccInt_Bisec.cxx | 1 - src/Geom/Geom_Axis1Placement.hxx | 1 - src/Geom/Geom_Axis2Placement.cxx | 1 - src/Geom/Geom_Axis2Placement.hxx | 2 - src/Geom/Geom_AxisPlacement.cxx | 1 - src/Geom/Geom_AxisPlacement.hxx | 1 - src/Geom/Geom_BSplineCurve.cxx | 4 -- src/Geom/Geom_BSplineCurve.hxx | 2 - src/Geom/Geom_BSplineCurve_1.cxx | 3 -- src/Geom/Geom_BSplineSurface.cxx | 5 --- src/Geom/Geom_BSplineSurface.hxx | 2 - src/Geom/Geom_BSplineSurface_1.cxx | 2 - src/Geom/Geom_BezierCurve.hxx | 4 -- src/Geom/Geom_BezierSurface.hxx | 2 - src/Geom/Geom_CartesianPoint.hxx | 1 - src/Geom/Geom_Circle.hxx | 2 - src/Geom/Geom_ConicalSurface.cxx | 1 - src/Geom/Geom_ConicalSurface.hxx | 2 - src/Geom/Geom_Curve.cxx | 2 - src/Geom/Geom_Curve.hxx | 1 - src/Geom/Geom_CylindricalSurface.cxx | 1 - src/Geom/Geom_CylindricalSurface.hxx | 2 - src/Geom/Geom_Direction.hxx | 1 - src/Geom/Geom_Ellipse.hxx | 2 - src/Geom/Geom_HSequenceOfBSplineSurface.hxx | 1 - src/Geom/Geom_Hyperbola.cxx | 1 - src/Geom/Geom_Hyperbola.hxx | 2 - src/Geom/Geom_Line.cxx | 1 - src/Geom/Geom_Line.hxx | 2 - src/Geom/Geom_OffsetCurve.cxx | 7 ---- src/Geom/Geom_OffsetCurve.hxx | 2 - src/Geom/Geom_OffsetSurface.cxx | 13 ------- src/Geom/Geom_OffsetSurface.hxx | 3 -- src/Geom/Geom_OsculatingSurface.cxx | 3 -- src/Geom/Geom_OsculatingSurface.hxx | 1 - src/Geom/Geom_Parabola.cxx | 1 - src/Geom/Geom_Parabola.hxx | 2 - src/Geom/Geom_Plane.cxx | 4 -- src/Geom/Geom_Plane.hxx | 2 - src/Geom/Geom_RectangularTrimmedSurface.cxx | 9 ----- src/Geom/Geom_RectangularTrimmedSurface.hxx | 2 - src/Geom/Geom_SphericalSurface.hxx | 2 - src/Geom/Geom_Surface.cxx | 2 - src/Geom/Geom_SurfaceOfLinearExtrusion.cxx | 9 ----- src/Geom/Geom_SurfaceOfLinearExtrusion.hxx | 2 - src/Geom/Geom_SurfaceOfRevolution.cxx | 1 - src/Geom/Geom_SurfaceOfRevolution.hxx | 2 - src/Geom/Geom_ToroidalSurface.cxx | 1 - src/Geom/Geom_ToroidalSurface.hxx | 2 - src/Geom/Geom_Transformation.hxx | 1 - src/Geom/Geom_TrimmedCurve.cxx | 7 ---- src/Geom/Geom_TrimmedCurve.hxx | 2 - src/Geom/Geom_Vector.cxx | 3 -- src/Geom/Geom_Vector.hxx | 1 - src/Geom/Geom_VectorWithMagnitude.cxx | 1 - src/Geom/Geom_VectorWithMagnitude.hxx | 1 - src/Geom2d/Geom2d_AxisPlacement.hxx | 1 - src/Geom2d/Geom2d_BSplineCurve.cxx | 5 --- src/Geom2d/Geom2d_BSplineCurve.hxx | 2 - src/Geom2d/Geom2d_BSplineCurve_1.cxx | 3 -- src/Geom2d/Geom2d_BezierCurve.cxx | 1 - src/Geom2d/Geom2d_BezierCurve.hxx | 4 -- src/Geom2d/Geom2d_CartesianPoint.hxx | 1 - src/Geom2d/Geom2d_Circle.hxx | 2 - src/Geom2d/Geom2d_Curve.cxx | 1 - src/Geom2d/Geom2d_Curve.hxx | 1 - src/Geom2d/Geom2d_Direction.hxx | 1 - src/Geom2d/Geom2d_Ellipse.cxx | 1 - src/Geom2d/Geom2d_Ellipse.hxx | 2 - src/Geom2d/Geom2d_Geometry.cxx | 1 - src/Geom2d/Geom2d_Hyperbola.cxx | 2 - src/Geom2d/Geom2d_Hyperbola.hxx | 2 - src/Geom2d/Geom2d_Line.cxx | 1 - src/Geom2d/Geom2d_Line.hxx | 2 - src/Geom2d/Geom2d_OffsetCurve.cxx | 7 ---- src/Geom2d/Geom2d_OffsetCurve.hxx | 2 - src/Geom2d/Geom2d_Parabola.cxx | 1 - src/Geom2d/Geom2d_Parabola.hxx | 2 - src/Geom2d/Geom2d_Transformation.cxx | 2 - src/Geom2d/Geom2d_Transformation.hxx | 2 - src/Geom2d/Geom2d_TrimmedCurve.cxx | 7 ---- src/Geom2d/Geom2d_TrimmedCurve.hxx | 2 - src/Geom2d/Geom2d_Vector.cxx | 2 - src/Geom2d/Geom2d_Vector.hxx | 1 - src/Geom2d/Geom2d_VectorWithMagnitude.cxx | 1 - src/Geom2d/Geom2d_VectorWithMagnitude.hxx | 1 - src/Geom2dAPI/Geom2dAPI_ExtremaCurveCurve.cxx | 3 -- src/Geom2dAPI/Geom2dAPI_ExtremaCurveCurve.hxx | 1 - src/Geom2dAPI/Geom2dAPI_InterCurveCurve.hxx | 2 - src/Geom2dAPI/Geom2dAPI_Interpolate.hxx | 2 - src/Geom2dAPI/Geom2dAPI_PointsToBSpline.cxx | 1 - src/Geom2dAPI/Geom2dAPI_PointsToBSpline.hxx | 2 - .../Geom2dAPI_ProjectPointOnCurve.cxx | 2 - .../Geom2dAPI_ProjectPointOnCurve.hxx | 1 - src/Geom2dAdaptor/Geom2dAdaptor.cxx | 4 -- src/Geom2dAdaptor/Geom2dAdaptor_Curve.cxx | 7 ---- src/Geom2dAdaptor/Geom2dAdaptor_Curve.hxx | 1 - src/Geom2dConvert/Geom2dConvert.cxx | 2 - .../Geom2dConvert_ApproxCurve.cxx | 1 - ...eom2dConvert_BSplineCurveKnotSplitting.cxx | 1 - ...eom2dConvert_BSplineCurveToBezierCurve.cxx | 1 - ...eom2dConvert_BSplineCurveToBezierCurve.hxx | 1 - .../Geom2dConvert_CompCurveToBSplineCurve.hxx | 2 - src/Geom2dEvaluator/Geom2dEvaluator.hxx | 2 - .../Geom2dEvaluator_OffsetCurve.hxx | 1 - src/Geom2dGcc/Geom2dGcc.cxx | 1 - src/Geom2dGcc/Geom2dGcc_Circ2d2TanOn.cxx | 1 - src/Geom2dGcc/Geom2dGcc_Circ2d2TanOn.hxx | 2 - src/Geom2dGcc/Geom2dGcc_Circ2d2TanOnGeo.cxx | 1 - src/Geom2dGcc/Geom2dGcc_Circ2d2TanOnGeo.hxx | 3 -- src/Geom2dGcc/Geom2dGcc_Circ2d2TanOnIter.cxx | 1 - src/Geom2dGcc/Geom2dGcc_Circ2d2TanOnIter.hxx | 3 -- src/Geom2dGcc/Geom2dGcc_Circ2d2TanRad.cxx | 1 - src/Geom2dGcc/Geom2dGcc_Circ2d2TanRad.hxx | 2 - src/Geom2dGcc/Geom2dGcc_Circ2d2TanRadGeo.cxx | 1 - src/Geom2dGcc/Geom2dGcc_Circ2d2TanRadGeo.hxx | 3 -- src/Geom2dGcc/Geom2dGcc_Circ2d3Tan.cxx | 1 - src/Geom2dGcc/Geom2dGcc_Circ2d3Tan.hxx | 2 - src/Geom2dGcc/Geom2dGcc_Circ2d3TanIter.cxx | 1 - src/Geom2dGcc/Geom2dGcc_Circ2d3TanIter.hxx | 3 -- src/Geom2dGcc/Geom2dGcc_Circ2dTanCen.cxx | 2 - src/Geom2dGcc/Geom2dGcc_Circ2dTanCen.hxx | 2 - src/Geom2dGcc/Geom2dGcc_Circ2dTanCenGeo.hxx | 3 -- src/Geom2dGcc/Geom2dGcc_Circ2dTanOnRad.cxx | 1 - src/Geom2dGcc/Geom2dGcc_Circ2dTanOnRad.hxx | 2 - src/Geom2dGcc/Geom2dGcc_Circ2dTanOnRadGeo.cxx | 3 -- src/Geom2dGcc/Geom2dGcc_Circ2dTanOnRadGeo.hxx | 3 -- src/Geom2dGcc/Geom2dGcc_CurveTool.cxx | 4 -- src/Geom2dGcc/Geom2dGcc_CurveTool.hxx | 2 - src/Geom2dGcc/Geom2dGcc_FunctionTanCirCu.cxx | 3 -- src/Geom2dGcc/Geom2dGcc_FunctionTanCirCu.hxx | 2 - src/Geom2dGcc/Geom2dGcc_FunctionTanCuCu.cxx | 2 - src/Geom2dGcc/Geom2dGcc_FunctionTanCuCu.hxx | 3 -- src/Geom2dGcc/Geom2dGcc_FunctionTanCuCuCu.cxx | 1 - src/Geom2dGcc/Geom2dGcc_FunctionTanCuCuCu.hxx | 3 -- .../Geom2dGcc_FunctionTanCuCuOnCu.cxx | 1 - .../Geom2dGcc_FunctionTanCuCuOnCu.hxx | 4 -- src/Geom2dGcc/Geom2dGcc_FunctionTanCuPnt.cxx | 3 -- src/Geom2dGcc/Geom2dGcc_FunctionTanCuPnt.hxx | 2 - src/Geom2dGcc/Geom2dGcc_FunctionTanObl.cxx | 1 - src/Geom2dGcc/Geom2dGcc_FunctionTanObl.hxx | 2 - src/Geom2dGcc/Geom2dGcc_IsParallel.hxx | 1 - src/Geom2dGcc/Geom2dGcc_Lin2d2Tan.cxx | 2 - src/Geom2dGcc/Geom2dGcc_Lin2d2Tan.hxx | 3 -- src/Geom2dGcc/Geom2dGcc_Lin2d2TanIter.cxx | 1 - src/Geom2dGcc/Geom2dGcc_Lin2d2TanIter.hxx | 3 -- src/Geom2dGcc/Geom2dGcc_Lin2dTanObl.cxx | 3 -- src/Geom2dGcc/Geom2dGcc_Lin2dTanObl.hxx | 3 -- src/Geom2dGcc/Geom2dGcc_Lin2dTanOblIter.cxx | 1 - src/Geom2dGcc/Geom2dGcc_Lin2dTanOblIter.hxx | 3 -- src/Geom2dGcc/Geom2dGcc_QCurve.cxx | 1 - src/Geom2dGcc/Geom2dGcc_QualifiedCurve.cxx | 1 - src/Geom2dHatch/Geom2dHatch_Classifier.hxx | 3 -- src/Geom2dHatch/Geom2dHatch_Elements.cxx | 7 ---- src/Geom2dHatch/Geom2dHatch_Elements.hxx | 2 - .../Geom2dHatch_FClass2dOfClassifier.hxx | 3 -- src/Geom2dHatch/Geom2dHatch_Hatcher.cxx | 3 -- src/Geom2dHatch/Geom2dHatch_Hatching.cxx | 2 - src/Geom2dHatch/Geom2dHatch_Hatching.hxx | 2 - src/Geom2dHatch/Geom2dHatch_Intersector.cxx | 1 - src/Geom2dHatch/Geom2dHatch_Intersector.hxx | 2 - src/Geom2dHatch/Geom2dHatch_MapOfElements.hxx | 1 - ...ctionPointOfTheIntPCurvePCurveOfGInter.hxx | 2 - src/Geom2dInt/Geom2dInt_GInter.hxx | 3 -- src/Geom2dInt/Geom2dInt_Geom2dCurveTool.cxx | 4 -- src/Geom2dInt/Geom2dInt_Geom2dCurveTool.hxx | 3 -- .../Geom2dInt_IntConicCurveOfGInter.hxx | 3 -- ...eIntersectorOfTheIntConicCurveOfGInter.hxx | 2 - ...FOfTheLocateExtPCOfTheProjPCurOfGInter.hxx | 3 -- ...t_TheCurveLocatorOfTheProjPCurOfGInter.hxx | 1 - ...eenPCurvesOfTheIntPCurvePCurveOfGInter.hxx | 2 - .../Geom2dInt_TheIntConicCurveOfGInter.hxx | 2 - .../Geom2dInt_TheIntPCurvePCurveOfGInter.hxx | 3 -- ...eIntersectorOfTheIntConicCurveOfGInter.hxx | 3 -- ...nt_TheLocateExtPCOfTheProjPCurOfGInter.hxx | 1 - ...ePolygon2dOfTheIntPCurvePCurveOfGInter.hxx | 2 - .../Geom2dInt_TheProjPCurOfGInter.hxx | 2 - src/Geom2dLProp/Geom2dLProp_CurAndInf2d.cxx | 6 --- src/Geom2dLProp/Geom2dLProp_CurAndInf2d.hxx | 1 - src/Geom2dLProp/Geom2dLProp_Curve2dTool.hxx | 1 - src/Geom2dLProp/Geom2dLProp_FuncCurExt.cxx | 2 - src/Geom2dLProp/Geom2dLProp_FuncCurExt.hxx | 2 - src/Geom2dLProp/Geom2dLProp_FuncCurNul.cxx | 2 - src/Geom2dLProp/Geom2dLProp_FuncCurNul.hxx | 2 - .../Geom2dLProp_NumericCurInf2d.hxx | 2 - src/Geom2dToIGES/Geom2dToIGES_Geom2dCurve.cxx | 37 ------------------- src/Geom2dToIGES/Geom2dToIGES_Geom2dCurve.hxx | 1 - .../Geom2dToIGES_Geom2dEntity.cxx | 1 - .../Geom2dToIGES_Geom2dEntity.hxx | 1 - src/Geom2dToIGES/Geom2dToIGES_Geom2dPoint.cxx | 1 - .../Geom2dToIGES_Geom2dVector.cxx | 1 - src/GeomAPI/GeomAPI.cxx | 10 ----- src/GeomAPI/GeomAPI_ExtremaCurveCurve.cxx | 2 - src/GeomAPI/GeomAPI_ExtremaCurveCurve.hxx | 2 - src/GeomAPI/GeomAPI_ExtremaCurveSurface.cxx | 2 - src/GeomAPI/GeomAPI_ExtremaCurveSurface.hxx | 1 - src/GeomAPI/GeomAPI_ExtremaSurfaceSurface.cxx | 1 - src/GeomAPI/GeomAPI_ExtremaSurfaceSurface.hxx | 1 - src/GeomAPI/GeomAPI_IntCS.cxx | 3 -- src/GeomAPI/GeomAPI_IntCS.hxx | 1 - src/GeomAPI/GeomAPI_IntSS.hxx | 2 - src/GeomAPI/GeomAPI_Interpolate.cxx | 1 - src/GeomAPI/GeomAPI_Interpolate.hxx | 3 -- src/GeomAPI/GeomAPI_PointsToBSpline.cxx | 1 - src/GeomAPI/GeomAPI_PointsToBSpline.hxx | 2 - .../GeomAPI_PointsToBSplineSurface.cxx | 3 -- .../GeomAPI_PointsToBSplineSurface.hxx | 2 - src/GeomAPI/GeomAPI_ProjectPointOnCurve.cxx | 2 - src/GeomAPI/GeomAPI_ProjectPointOnCurve.hxx | 1 - src/GeomAPI/GeomAPI_ProjectPointOnSurf.cxx | 2 - src/GeomAPI/GeomAPI_ProjectPointOnSurf.hxx | 2 - src/GeomAdaptor/GeomAdaptor.cxx | 2 - src/GeomAdaptor/GeomAdaptor_Curve.cxx | 5 --- src/GeomAdaptor/GeomAdaptor_Surface.cxx | 7 ---- .../GeomAdaptor_SurfaceOfLinearExtrusion.hxx | 1 - .../GeomAdaptor_SurfaceOfRevolution.hxx | 2 - src/gce/gce_MakeCirc.cxx | 1 - src/gce/gce_MakeCirc.hxx | 2 - src/gce/gce_MakeCirc2d.hxx | 3 -- src/gce/gce_MakeCone.hxx | 1 - src/gce/gce_MakeCylinder.hxx | 1 - src/gce/gce_MakeDir.hxx | 1 - src/gce/gce_MakeDir2d.hxx | 1 - src/gce/gce_MakeElips.hxx | 1 - src/gce/gce_MakeElips2d.hxx | 1 - src/gce/gce_MakeHypr.hxx | 1 - src/gce/gce_MakeHypr2d.hxx | 1 - src/gce/gce_MakeLin2d.hxx | 1 - src/gce/gce_MakeMirror.cxx | 4 -- src/gce/gce_MakeParab.cxx | 1 - src/gce/gce_MakeParab.hxx | 1 - src/gce/gce_MakeParab2d.hxx | 1 - src/gce/gce_MakePln.hxx | 1 - src/gce/gce_MakeRotation.cxx | 1 - src/gce/gce_MakeRotation.hxx | 1 - src/gce/gce_MakeRotation2d.hxx | 1 - src/gce/gce_MakeScale.hxx | 1 - src/gce/gce_MakeScale2d.hxx | 1 - 356 files changed, 1 insertion(+), 832 deletions(-) diff --git a/src/FEmTool/FEmTool_Assembly.cxx b/src/FEmTool/FEmTool_Assembly.cxx index cdc624c091..699698212f 100644 --- a/src/FEmTool/FEmTool_Assembly.cxx +++ b/src/FEmTool/FEmTool_Assembly.cxx @@ -16,11 +16,9 @@ #include -#include #include #include #include -#include #include #include #include diff --git a/src/FEmTool/FEmTool_Assembly.hxx b/src/FEmTool/FEmTool_Assembly.hxx index 4b995700ad..92ce2ad9a3 100644 --- a/src/FEmTool/FEmTool_Assembly.hxx +++ b/src/FEmTool/FEmTool_Assembly.hxx @@ -23,7 +23,6 @@ #include #include -#include #include #include #include diff --git a/src/FEmTool/FEmTool_Curve.cxx b/src/FEmTool/FEmTool_Curve.cxx index 8e41745978..4f6d668231 100644 --- a/src/FEmTool/FEmTool_Curve.cxx +++ b/src/FEmTool/FEmTool_Curve.cxx @@ -20,10 +20,8 @@ #include #include -#include #include #include -#include #include IMPLEMENT_STANDARD_RTTIEXT(FEmTool_Curve,Standard_Transient) diff --git a/src/FEmTool/FEmTool_ElementaryCriterion.cxx b/src/FEmTool/FEmTool_ElementaryCriterion.cxx index dfaa48ca97..10c3126152 100644 --- a/src/FEmTool/FEmTool_ElementaryCriterion.cxx +++ b/src/FEmTool/FEmTool_ElementaryCriterion.cxx @@ -17,8 +17,6 @@ #include #include -#include -#include #include IMPLEMENT_STANDARD_RTTIEXT(FEmTool_ElementaryCriterion,Standard_Transient) diff --git a/src/FEmTool/FEmTool_ElementaryCriterion.hxx b/src/FEmTool/FEmTool_ElementaryCriterion.hxx index 84dac329ee..6234dbc883 100644 --- a/src/FEmTool/FEmTool_ElementaryCriterion.hxx +++ b/src/FEmTool/FEmTool_ElementaryCriterion.hxx @@ -18,7 +18,6 @@ #define _FEmTool_ElementaryCriterion_HeaderFile #include -#include #include #include diff --git a/src/FEmTool/FEmTool_ElementsOfRefMatrix.hxx b/src/FEmTool/FEmTool_ElementsOfRefMatrix.hxx index 1c2ffb36a3..33d750ca45 100644 --- a/src/FEmTool/FEmTool_ElementsOfRefMatrix.hxx +++ b/src/FEmTool/FEmTool_ElementsOfRefMatrix.hxx @@ -23,7 +23,6 @@ #include #include -#include #include class PLib_Base; diff --git a/src/FEmTool/FEmTool_LinearFlexion.cxx b/src/FEmTool/FEmTool_LinearFlexion.cxx index 8f84c22b6a..48e99903df 100644 --- a/src/FEmTool/FEmTool_LinearFlexion.cxx +++ b/src/FEmTool/FEmTool_LinearFlexion.cxx @@ -24,7 +24,6 @@ #include #include #include -#include #include #include #include diff --git a/src/FEmTool/FEmTool_LinearFlexion.hxx b/src/FEmTool/FEmTool_LinearFlexion.hxx index 2d75d5aee3..a3f1b6f121 100644 --- a/src/FEmTool/FEmTool_LinearFlexion.hxx +++ b/src/FEmTool/FEmTool_LinearFlexion.hxx @@ -25,7 +25,6 @@ #include #include #include -#include #include diff --git a/src/FEmTool/FEmTool_LinearJerk.cxx b/src/FEmTool/FEmTool_LinearJerk.cxx index 4bd01941a5..6d19603443 100644 --- a/src/FEmTool/FEmTool_LinearJerk.cxx +++ b/src/FEmTool/FEmTool_LinearJerk.cxx @@ -24,7 +24,6 @@ #include #include #include -#include #include #include #include diff --git a/src/FEmTool/FEmTool_LinearJerk.hxx b/src/FEmTool/FEmTool_LinearJerk.hxx index f169800d1e..de338dde25 100644 --- a/src/FEmTool/FEmTool_LinearJerk.hxx +++ b/src/FEmTool/FEmTool_LinearJerk.hxx @@ -25,7 +25,6 @@ #include #include #include -#include #include diff --git a/src/FEmTool/FEmTool_LinearTension.cxx b/src/FEmTool/FEmTool_LinearTension.cxx index bd136f44a2..62d60082a5 100644 --- a/src/FEmTool/FEmTool_LinearTension.cxx +++ b/src/FEmTool/FEmTool_LinearTension.cxx @@ -24,7 +24,6 @@ #include #include #include -#include #include #include #include diff --git a/src/FEmTool/FEmTool_LinearTension.hxx b/src/FEmTool/FEmTool_LinearTension.hxx index 04f4ac1529..07f985b3b6 100644 --- a/src/FEmTool/FEmTool_LinearTension.hxx +++ b/src/FEmTool/FEmTool_LinearTension.hxx @@ -25,7 +25,6 @@ #include #include #include -#include #include diff --git a/src/FEmTool/FEmTool_ProfileMatrix.hxx b/src/FEmTool/FEmTool_ProfileMatrix.hxx index 0ebb45b79e..1a0333e040 100644 --- a/src/FEmTool/FEmTool_ProfileMatrix.hxx +++ b/src/FEmTool/FEmTool_ProfileMatrix.hxx @@ -18,12 +18,10 @@ #define _FEmTool_ProfileMatrix_HeaderFile #include -#include #include #include #include -#include #include #include #include diff --git a/src/FEmTool/FEmTool_SparseMatrix.cxx b/src/FEmTool/FEmTool_SparseMatrix.cxx index 41c18033c9..9740b37aae 100644 --- a/src/FEmTool/FEmTool_SparseMatrix.cxx +++ b/src/FEmTool/FEmTool_SparseMatrix.cxx @@ -17,6 +17,5 @@ #include #include -#include IMPLEMENT_STANDARD_RTTIEXT(FEmTool_SparseMatrix,Standard_Transient) \ No newline at end of file diff --git a/src/FEmTool/FEmTool_SparseMatrix.hxx b/src/FEmTool/FEmTool_SparseMatrix.hxx index 0d87e3acc2..387b245cf1 100644 --- a/src/FEmTool/FEmTool_SparseMatrix.hxx +++ b/src/FEmTool/FEmTool_SparseMatrix.hxx @@ -18,12 +18,10 @@ #define _FEmTool_SparseMatrix_HeaderFile #include -#include #include #include #include -#include #include diff --git a/src/FSD/FSD_BinaryFile.hxx b/src/FSD/FSD_BinaryFile.hxx index 0d859369a8..504aaa19b9 100644 --- a/src/FSD/FSD_BinaryFile.hxx +++ b/src/FSD/FSD_BinaryFile.hxx @@ -23,7 +23,6 @@ #include #include #include -#include #include #include #include diff --git a/src/FSD/FSD_FStream.hxx b/src/FSD/FSD_FStream.hxx index 9a81de07cc..6844241584 100644 --- a/src/FSD/FSD_FStream.hxx +++ b/src/FSD/FSD_FStream.hxx @@ -15,7 +15,6 @@ #ifndef _FSD_FStream_HeaderFile #define _FSD_FStream_HeaderFile -#include #include typedef std::fstream FSD_FStream; diff --git a/src/FairCurve/FairCurve_Batten.cxx b/src/FairCurve/FairCurve_Batten.cxx index 4a438529d4..0685b6c89d 100644 --- a/src/FairCurve/FairCurve_Batten.cxx +++ b/src/FairCurve/FairCurve_Batten.cxx @@ -22,7 +22,6 @@ #include #include -#include #include #include #include diff --git a/src/FairCurve/FairCurve_Batten.hxx b/src/FairCurve/FairCurve_Batten.hxx index df8a53dda5..64e623fd16 100644 --- a/src/FairCurve/FairCurve_Batten.hxx +++ b/src/FairCurve/FairCurve_Batten.hxx @@ -23,8 +23,6 @@ #include #include -#include -#include #include #include #include diff --git a/src/FairCurve/FairCurve_DistributionOfJerk.cxx b/src/FairCurve/FairCurve_DistributionOfJerk.cxx index 0a9d15ec62..9e20c93d6a 100644 --- a/src/FairCurve/FairCurve_DistributionOfJerk.cxx +++ b/src/FairCurve/FairCurve_DistributionOfJerk.cxx @@ -23,7 +23,6 @@ #include -#include #include #include #include diff --git a/src/FairCurve/FairCurve_DistributionOfJerk.hxx b/src/FairCurve/FairCurve_DistributionOfJerk.hxx index 448ca36465..1f4d4d5ff7 100644 --- a/src/FairCurve/FairCurve_DistributionOfJerk.hxx +++ b/src/FairCurve/FairCurve_DistributionOfJerk.hxx @@ -26,7 +26,6 @@ #include #include #include -#include #include diff --git a/src/FairCurve/FairCurve_DistributionOfSagging.cxx b/src/FairCurve/FairCurve_DistributionOfSagging.cxx index e600810e02..7f33c9563f 100644 --- a/src/FairCurve/FairCurve_DistributionOfSagging.cxx +++ b/src/FairCurve/FairCurve_DistributionOfSagging.cxx @@ -20,7 +20,6 @@ #include -#include #include #include #include diff --git a/src/FairCurve/FairCurve_DistributionOfSagging.hxx b/src/FairCurve/FairCurve_DistributionOfSagging.hxx index a379fc12f6..349a22a4be 100644 --- a/src/FairCurve/FairCurve_DistributionOfSagging.hxx +++ b/src/FairCurve/FairCurve_DistributionOfSagging.hxx @@ -26,7 +26,6 @@ #include #include #include -#include #include diff --git a/src/FairCurve/FairCurve_DistributionOfTension.cxx b/src/FairCurve/FairCurve_DistributionOfTension.cxx index a98a17c7f2..20c0626c1e 100644 --- a/src/FairCurve/FairCurve_DistributionOfTension.cxx +++ b/src/FairCurve/FairCurve_DistributionOfTension.cxx @@ -20,7 +20,6 @@ #include -#include #include #include #include diff --git a/src/FairCurve/FairCurve_DistributionOfTension.hxx b/src/FairCurve/FairCurve_DistributionOfTension.hxx index b57e8be6c2..1076b7ebe0 100644 --- a/src/FairCurve/FairCurve_DistributionOfTension.hxx +++ b/src/FairCurve/FairCurve_DistributionOfTension.hxx @@ -21,13 +21,11 @@ #include #include -#include #include #include #include #include #include -#include #include diff --git a/src/FairCurve/FairCurve_Energy.hxx b/src/FairCurve/FairCurve_Energy.hxx index 95d4c922fc..6efdfd8f7a 100644 --- a/src/FairCurve/FairCurve_Energy.hxx +++ b/src/FairCurve/FairCurve_Energy.hxx @@ -23,9 +23,7 @@ #include #include -#include #include -#include #include #include class math_Matrix; diff --git a/src/FairCurve/FairCurve_EnergyOfBatten.cxx b/src/FairCurve/FairCurve_EnergyOfBatten.cxx index d314e82a33..2ccce31225 100644 --- a/src/FairCurve/FairCurve_EnergyOfBatten.cxx +++ b/src/FairCurve/FairCurve_EnergyOfBatten.cxx @@ -20,7 +20,6 @@ #endif -#include #include #include #include diff --git a/src/FairCurve/FairCurve_EnergyOfBatten.hxx b/src/FairCurve/FairCurve_EnergyOfBatten.hxx index 821a425ebe..cb9b5ea3e4 100644 --- a/src/FairCurve/FairCurve_EnergyOfBatten.hxx +++ b/src/FairCurve/FairCurve_EnergyOfBatten.hxx @@ -22,7 +22,6 @@ #include #include -#include #include #include #include diff --git a/src/FairCurve/FairCurve_EnergyOfMVC.hxx b/src/FairCurve/FairCurve_EnergyOfMVC.hxx index 08c1f89d6d..85e5519299 100644 --- a/src/FairCurve/FairCurve_EnergyOfMVC.hxx +++ b/src/FairCurve/FairCurve_EnergyOfMVC.hxx @@ -21,7 +21,6 @@ #include #include -#include #include #include #include @@ -31,7 +30,6 @@ #include #include #include -#include #include // resolve name collisions with X11 headers diff --git a/src/FairCurve/FairCurve_MinimalVariation.cxx b/src/FairCurve/FairCurve_MinimalVariation.cxx index 2dbac56425..2d12de07f3 100644 --- a/src/FairCurve/FairCurve_MinimalVariation.cxx +++ b/src/FairCurve/FairCurve_MinimalVariation.cxx @@ -21,7 +21,6 @@ #include -#include #include #include #include @@ -30,9 +29,6 @@ #include #include #include -#include -#include -#include #include #include #include diff --git a/src/FairCurve/FairCurve_MinimalVariation.hxx b/src/FairCurve/FairCurve_MinimalVariation.hxx index 40f9b8cc64..c20429c069 100644 --- a/src/FairCurve/FairCurve_MinimalVariation.hxx +++ b/src/FairCurve/FairCurve_MinimalVariation.hxx @@ -19,13 +19,9 @@ #include #include -#include -#include #include -#include #include -#include #include class gp_Pnt2d; class gp_Vec2d; diff --git a/src/FairCurve/FairCurve_Newton.hxx b/src/FairCurve/FairCurve_Newton.hxx index c45c8a7a52..2b8a7c96ca 100644 --- a/src/FairCurve/FairCurve_Newton.hxx +++ b/src/FairCurve/FairCurve_Newton.hxx @@ -21,10 +21,7 @@ #include #include -#include #include -#include -#include class math_MultipleVarFunctionWithHessian; diff --git a/src/FilletSurf/FilletSurf_Builder.cxx b/src/FilletSurf/FilletSurf_Builder.cxx index e1a9359bcc..c937b50ad9 100644 --- a/src/FilletSurf/FilletSurf_Builder.cxx +++ b/src/FilletSurf/FilletSurf_Builder.cxx @@ -14,7 +14,6 @@ // Modified: Portage NT 7-5-97 DPF (return) -#include #include #include #include diff --git a/src/FilletSurf/FilletSurf_InternalBuilder.cxx b/src/FilletSurf/FilletSurf_InternalBuilder.cxx index ba089a19f3..fb1c98ed0f 100644 --- a/src/FilletSurf/FilletSurf_InternalBuilder.cxx +++ b/src/FilletSurf/FilletSurf_InternalBuilder.cxx @@ -16,7 +16,6 @@ #include #include -#include #include #include #include @@ -31,16 +30,12 @@ #include #include #include -#include -#include #include #include #include #include #include #include -#include -#include #include #include #include @@ -49,22 +44,19 @@ #include #include #include -#include #include #include #include #include #include -#include #include #include #include #include #include -#include static Standard_Boolean isinlist(const TopoDS_Shape& E, - const TopTools_ListOfShape& L){ + const TopTools_ListOfShape& L){ TopTools_ListIteratorOfListOfShape It; for (It.Initialize(L); It.More(); It.Next()){ if(E.IsSame(It.Value())) return 1; diff --git a/src/FilletSurf/FilletSurf_InternalBuilder.hxx b/src/FilletSurf/FilletSurf_InternalBuilder.hxx index cd61b6d8c7..471db2044b 100644 --- a/src/FilletSurf/FilletSurf_InternalBuilder.hxx +++ b/src/FilletSurf/FilletSurf_InternalBuilder.hxx @@ -18,8 +18,6 @@ #define _FilletSurf_InternalBuilder_HeaderFile #include -#include -#include #include #include #include diff --git a/src/Font/Font_FontMgr.cxx b/src/Font/Font_FontMgr.cxx index 3e31c207eb..4bceb727a0 100644 --- a/src/Font/Font_FontMgr.cxx +++ b/src/Font/Font_FontMgr.cxx @@ -21,7 +21,6 @@ #include #include #include -#include #include #include #include diff --git a/src/Font/Font_FontMgr.hxx b/src/Font/Font_FontMgr.hxx index 6d78fd6635..137f1db1ce 100644 --- a/src/Font/Font_FontMgr.hxx +++ b/src/Font/Font_FontMgr.hxx @@ -18,8 +18,6 @@ #include #include -#include -#include #include #include #include diff --git a/src/Font/Font_SystemFont.hxx b/src/Font/Font_SystemFont.hxx index b7ab594504..ac3c6fca8b 100644 --- a/src/Font/Font_SystemFont.hxx +++ b/src/Font/Font_SystemFont.hxx @@ -18,7 +18,6 @@ #include #include -#include #include #include diff --git a/src/GC/GC_MakeConicalSurface.cxx b/src/GC/GC_MakeConicalSurface.cxx index 0c7df9f247..45b77e30a3 100644 --- a/src/GC/GC_MakeConicalSurface.cxx +++ b/src/GC/GC_MakeConicalSurface.cxx @@ -19,7 +19,6 @@ #include #include #include -#include #include #include #include diff --git a/src/GC/GC_MakeMirror.cxx b/src/GC/GC_MakeMirror.cxx index 6db7983019..c7809b4a01 100644 --- a/src/GC/GC_MakeMirror.cxx +++ b/src/GC/GC_MakeMirror.cxx @@ -17,11 +17,7 @@ #include #include -#include -#include -#include #include -#include #include #include #include diff --git a/src/GC/GC_MakePlane.cxx b/src/GC/GC_MakePlane.cxx index 398d758398..9b35311500 100644 --- a/src/GC/GC_MakePlane.cxx +++ b/src/GC/GC_MakePlane.cxx @@ -20,8 +20,6 @@ #include #include #include -#include -#include #include #include #include diff --git a/src/GC/GC_MakeRotation.cxx b/src/GC/GC_MakeRotation.cxx index eb96267c53..a896954b37 100644 --- a/src/GC/GC_MakeRotation.cxx +++ b/src/GC/GC_MakeRotation.cxx @@ -17,7 +17,6 @@ #include #include -#include #include #include #include diff --git a/src/GC/GC_MakeTrimmedCylinder.cxx b/src/GC/GC_MakeTrimmedCylinder.cxx index e13106bf81..a70485281e 100644 --- a/src/GC/GC_MakeTrimmedCylinder.cxx +++ b/src/GC/GC_MakeTrimmedCylinder.cxx @@ -21,7 +21,6 @@ #include #include #include -#include #include #include #include diff --git a/src/GC/GC_Root.hxx b/src/GC/GC_Root.hxx index 64e7c84f2d..f362b5d181 100644 --- a/src/GC/GC_Root.hxx +++ b/src/GC/GC_Root.hxx @@ -19,10 +19,8 @@ #include #include -#include #include -#include // resolve name collisions with X11 headers #ifdef Status diff --git a/src/GCE2d/GCE2d_Root.hxx b/src/GCE2d/GCE2d_Root.hxx index f7981efa27..c05cbe1aab 100644 --- a/src/GCE2d/GCE2d_Root.hxx +++ b/src/GCE2d/GCE2d_Root.hxx @@ -19,10 +19,8 @@ #include #include -#include #include -#include // resolve name collisions with X11 headers #ifdef Status diff --git a/src/GCPnts/GCPnts_DistFunction.hxx b/src/GCPnts/GCPnts_DistFunction.hxx index 2206c4bff1..e944c418ae 100644 --- a/src/GCPnts/GCPnts_DistFunction.hxx +++ b/src/GCPnts/GCPnts_DistFunction.hxx @@ -14,7 +14,6 @@ #ifndef _GCPnts_DistFunction_HeaderFile #define _GCPnts_DistFunction_HeaderFile -#include #include #include #include diff --git a/src/GCPnts/GCPnts_DistFunction2d.hxx b/src/GCPnts/GCPnts_DistFunction2d.hxx index 87a43e0aa8..8dd4684a6e 100644 --- a/src/GCPnts/GCPnts_DistFunction2d.hxx +++ b/src/GCPnts/GCPnts_DistFunction2d.hxx @@ -14,7 +14,6 @@ #ifndef _GCPnts_DistFunction2d_HeaderFile #define _GCPnts_DistFunction2d_HeaderFile -#include #include #include #include diff --git a/src/GCPnts/GCPnts_QuasiUniformAbscissa.cxx b/src/GCPnts/GCPnts_QuasiUniformAbscissa.cxx index 0ba5633794..e4bc426f51 100644 --- a/src/GCPnts/GCPnts_QuasiUniformAbscissa.cxx +++ b/src/GCPnts/GCPnts_QuasiUniformAbscissa.cxx @@ -16,11 +16,9 @@ #include #include -#include #include #include #include -#include //======================================================================= //function : GCPnts_QuasiUniformAbscissa diff --git a/src/GCPnts/GCPnts_TangentialDeflection.cxx b/src/GCPnts/GCPnts_TangentialDeflection.cxx index a14bc515fd..e13d3095a9 100644 --- a/src/GCPnts/GCPnts_TangentialDeflection.cxx +++ b/src/GCPnts/GCPnts_TangentialDeflection.cxx @@ -23,13 +23,10 @@ #include #include #include -#include -#include #include #include #include #include -#include #include namespace diff --git a/src/GCPnts/GCPnts_TangentialDeflection.hxx b/src/GCPnts/GCPnts_TangentialDeflection.hxx index b84917835c..9fdd0748be 100644 --- a/src/GCPnts/GCPnts_TangentialDeflection.hxx +++ b/src/GCPnts/GCPnts_TangentialDeflection.hxx @@ -20,7 +20,6 @@ #include #include #include -#include #include #include #include diff --git a/src/GCPnts/GCPnts_UniformDeflection.cxx b/src/GCPnts/GCPnts_UniformDeflection.cxx index 85a8f45d2c..71b89f6e3e 100644 --- a/src/GCPnts/GCPnts_UniformDeflection.cxx +++ b/src/GCPnts/GCPnts_UniformDeflection.cxx @@ -19,10 +19,7 @@ #include #include #include -#include -#include #include -#include #include // mask the return of a Adaptor2d_Curve2d as a gp_Pnt diff --git a/src/GccAna/GccAna_Circ2d2TanOn.cxx b/src/GccAna/GccAna_Circ2d2TanOn.cxx index abf9ab6002..bb64297cc6 100644 --- a/src/GccAna/GccAna_Circ2d2TanOn.cxx +++ b/src/GccAna/GccAna_Circ2d2TanOn.cxx @@ -18,8 +18,6 @@ #include #include #include -#include -#include #include #include #include diff --git a/src/GccAna/GccAna_Circ2d2TanOn.hxx b/src/GccAna/GccAna_Circ2d2TanOn.hxx index 42fb3b44c3..bc8327e355 100644 --- a/src/GccAna/GccAna_Circ2d2TanOn.hxx +++ b/src/GccAna/GccAna_Circ2d2TanOn.hxx @@ -19,16 +19,13 @@ #include #include -#include -#include #include #include #include #include #include #include -#include #include class GccEnt_QualifiedCirc; class gp_Lin2d; diff --git a/src/GccAna/GccAna_Circ2d2TanOn_1.cxx b/src/GccAna/GccAna_Circ2d2TanOn_1.cxx index 1b38e0c2bb..cd00d7991b 100644 --- a/src/GccAna/GccAna_Circ2d2TanOn_1.cxx +++ b/src/GccAna/GccAna_Circ2d2TanOn_1.cxx @@ -31,8 +31,6 @@ #include #include #include -#include -#include //========================================================================= // Creation of a circle tangent to Circle C1 and a straight line L2. + diff --git a/src/GccAna/GccAna_Circ2d2TanOn_10.cxx b/src/GccAna/GccAna_Circ2d2TanOn_10.cxx index 479ff663c6..8301c13285 100644 --- a/src/GccAna/GccAna_Circ2d2TanOn_10.cxx +++ b/src/GccAna/GccAna_Circ2d2TanOn_10.cxx @@ -19,9 +19,7 @@ #include #include #include -#include #include -#include #include #include #include @@ -32,8 +30,6 @@ #include #include #include -#include -#include //========================================================================= // Creation of a circle tangent to straight line L1 and a point Point2. + diff --git a/src/GccAna/GccAna_Circ2d2TanOn_11.cxx b/src/GccAna/GccAna_Circ2d2TanOn_11.cxx index ee46517b5d..af13ab9075 100644 --- a/src/GccAna/GccAna_Circ2d2TanOn_11.cxx +++ b/src/GccAna/GccAna_Circ2d2TanOn_11.cxx @@ -24,10 +24,7 @@ #include #include -#include #include -#include -#include #include #include #include @@ -35,8 +32,6 @@ #include #include #include -#include -#include //========================================================================= // Creation of a circle passing by : 2 points Point1 and Point2. + diff --git a/src/GccAna/GccAna_Circ2d2TanOn_2.cxx b/src/GccAna/GccAna_Circ2d2TanOn_2.cxx index e731cc3ae4..1b108a6479 100644 --- a/src/GccAna/GccAna_Circ2d2TanOn_2.cxx +++ b/src/GccAna/GccAna_Circ2d2TanOn_2.cxx @@ -19,9 +19,7 @@ #include #include #include -#include #include -#include #include #include #include @@ -29,8 +27,6 @@ #include #include #include -#include -#include GccAna_Circ2d2TanOn:: GccAna_Circ2d2TanOn (const GccEnt_QualifiedLin& Qualified1 , diff --git a/src/GccAna/GccAna_Circ2d2TanOn_3.cxx b/src/GccAna/GccAna_Circ2d2TanOn_3.cxx index eea687fb57..b3c3b3f6e3 100644 --- a/src/GccAna/GccAna_Circ2d2TanOn_3.cxx +++ b/src/GccAna/GccAna_Circ2d2TanOn_3.cxx @@ -20,10 +20,7 @@ #include #include #include -#include -#include #include -#include #include #include #include @@ -33,8 +30,6 @@ #include #include #include -#include -#include #include //========================================================================= diff --git a/src/GccAna/GccAna_Circ2d2TanOn_4.cxx b/src/GccAna/GccAna_Circ2d2TanOn_4.cxx index ab9edd8d4e..cfb375ceaf 100644 --- a/src/GccAna/GccAna_Circ2d2TanOn_4.cxx +++ b/src/GccAna/GccAna_Circ2d2TanOn_4.cxx @@ -19,11 +19,8 @@ #include #include #include -#include #include -#include #include -#include #include #include #include @@ -34,8 +31,6 @@ #include #include #include -#include -#include //========================================================================= // Creation of a circle Tangent to : 1 straight line L1. + diff --git a/src/GccAna/GccAna_Circ2d2TanOn_5.cxx b/src/GccAna/GccAna_Circ2d2TanOn_5.cxx index d9239f0d00..ce0b51c26e 100644 --- a/src/GccAna/GccAna_Circ2d2TanOn_5.cxx +++ b/src/GccAna/GccAna_Circ2d2TanOn_5.cxx @@ -18,8 +18,6 @@ #include #include #include -#include -#include #include #include #include @@ -27,8 +25,6 @@ #include #include #include -#include -#include //========================================================================= // Creation of a circle passing by : 2 points Point1 and Point2. + diff --git a/src/GccAna/GccAna_Circ2d2TanOn_6.cxx b/src/GccAna/GccAna_Circ2d2TanOn_6.cxx index b0dc38b7f3..15f05f1a2b 100644 --- a/src/GccAna/GccAna_Circ2d2TanOn_6.cxx +++ b/src/GccAna/GccAna_Circ2d2TanOn_6.cxx @@ -20,20 +20,15 @@ #include #include #include -#include -#include #include #include #include #include #include -#include #include #include #include #include -#include -#include #include //========================================================================= diff --git a/src/GccAna/GccAna_Circ2d2TanOn_7.cxx b/src/GccAna/GccAna_Circ2d2TanOn_7.cxx index 4bf679a631..1aebb7f3c4 100644 --- a/src/GccAna/GccAna_Circ2d2TanOn_7.cxx +++ b/src/GccAna/GccAna_Circ2d2TanOn_7.cxx @@ -31,8 +31,6 @@ #include #include #include -#include -#include #include GccAna_Circ2d2TanOn:: diff --git a/src/GccAna/GccAna_Circ2d2TanOn_8.cxx b/src/GccAna/GccAna_Circ2d2TanOn_8.cxx index 207edb3e90..d0202cd17c 100644 --- a/src/GccAna/GccAna_Circ2d2TanOn_8.cxx +++ b/src/GccAna/GccAna_Circ2d2TanOn_8.cxx @@ -27,23 +27,16 @@ #include #include #include -#include -#include #include -#include #include #include #include #include -#include #include #include #include #include #include -#include -#include -#include #include GccAna_Circ2d2TanOn:: diff --git a/src/GccAna/GccAna_Circ2d2TanOn_9.cxx b/src/GccAna/GccAna_Circ2d2TanOn_9.cxx index 58cfae8585..f6fbd8e694 100644 --- a/src/GccAna/GccAna_Circ2d2TanOn_9.cxx +++ b/src/GccAna/GccAna_Circ2d2TanOn_9.cxx @@ -19,7 +19,6 @@ #include #include #include -#include #include #include #include @@ -29,8 +28,6 @@ #include #include #include -#include -#include GccAna_Circ2d2TanOn:: GccAna_Circ2d2TanOn (const GccEnt_QualifiedLin& Qualified1 , diff --git a/src/GccAna/GccAna_Circ2d2TanRad.cxx b/src/GccAna/GccAna_Circ2d2TanRad.cxx index d283037333..5ae0bbf172 100644 --- a/src/GccAna/GccAna_Circ2d2TanRad.cxx +++ b/src/GccAna/GccAna_Circ2d2TanRad.cxx @@ -17,10 +17,8 @@ #include #include #include -#include #include #include -#include #include #include #include diff --git a/src/GccAna/GccAna_Circ2d2TanRad.hxx b/src/GccAna/GccAna_Circ2d2TanRad.hxx index ca99acce75..034838f38c 100644 --- a/src/GccAna/GccAna_Circ2d2TanRad.hxx +++ b/src/GccAna/GccAna_Circ2d2TanRad.hxx @@ -19,16 +19,13 @@ #include #include -#include -#include #include #include #include #include #include #include -#include #include class GccEnt_QualifiedCirc; class GccEnt_QualifiedLin; diff --git a/src/GccAna/GccAna_Circ2d2TanRad_1.cxx b/src/GccAna/GccAna_Circ2d2TanRad_1.cxx index bab390c906..2efc85ccf7 100644 --- a/src/GccAna/GccAna_Circ2d2TanRad_1.cxx +++ b/src/GccAna/GccAna_Circ2d2TanRad_1.cxx @@ -27,8 +27,6 @@ #include #include #include -#include -#include #include // circular tangent to a circle, a line and a given radius diff --git a/src/GccAna/GccAna_Circ2d2TanRad_2.cxx b/src/GccAna/GccAna_Circ2d2TanRad_2.cxx index c881049d19..58baf5735c 100644 --- a/src/GccAna/GccAna_Circ2d2TanRad_2.cxx +++ b/src/GccAna/GccAna_Circ2d2TanRad_2.cxx @@ -19,7 +19,6 @@ #include #include #include -#include #include #include #include @@ -27,8 +26,6 @@ #include #include #include -#include -#include // circulare tangent to a circle a point and a given radius //============================================================= diff --git a/src/GccAna/GccAna_Circ2d2TanRad_3.cxx b/src/GccAna/GccAna_Circ2d2TanRad_3.cxx index c27f1add14..86adbf9a99 100644 --- a/src/GccAna/GccAna_Circ2d2TanRad_3.cxx +++ b/src/GccAna/GccAna_Circ2d2TanRad_3.cxx @@ -20,7 +20,6 @@ #include #include #include -#include #include #include #include @@ -29,8 +28,6 @@ #include #include #include -#include -#include #include // circular tangent to a line and a point and a given radius diff --git a/src/GccAna/GccAna_Circ2d2TanRad_4.cxx b/src/GccAna/GccAna_Circ2d2TanRad_4.cxx index 093b9db4cf..7457bd1e23 100644 --- a/src/GccAna/GccAna_Circ2d2TanRad_4.cxx +++ b/src/GccAna/GccAna_Circ2d2TanRad_4.cxx @@ -18,9 +18,7 @@ #include #include #include -#include #include -#include #include #include #include @@ -29,8 +27,6 @@ #include #include #include -#include -#include #include // circular tangent to two lines of given radius diff --git a/src/GccAna/GccAna_Circ2d2TanRad_5.cxx b/src/GccAna/GccAna_Circ2d2TanRad_5.cxx index 7dd0c90269..a3e4c2faac 100644 --- a/src/GccAna/GccAna_Circ2d2TanRad_5.cxx +++ b/src/GccAna/GccAna_Circ2d2TanRad_5.cxx @@ -18,17 +18,12 @@ #include #include #include -#include -#include #include #include -#include #include #include #include #include -#include -#include // Circle passing by two points of given radius. // ============================================== diff --git a/src/GccAna/GccAna_Circ2d3Tan.cxx b/src/GccAna/GccAna_Circ2d3Tan.cxx index a194cadc63..b5aee4627a 100644 --- a/src/GccAna/GccAna_Circ2d3Tan.cxx +++ b/src/GccAna/GccAna_Circ2d3Tan.cxx @@ -15,22 +15,12 @@ #include #include -#include #include #include -#include -#include -#include -#include -#include -#include #include #include #include #include -#include -#include -#include #include #include #include diff --git a/src/GccAna/GccAna_Circ2d3Tan.hxx b/src/GccAna/GccAna_Circ2d3Tan.hxx index b3a86d6e27..1744d05f93 100644 --- a/src/GccAna/GccAna_Circ2d3Tan.hxx +++ b/src/GccAna/GccAna_Circ2d3Tan.hxx @@ -19,16 +19,13 @@ #include #include -#include -#include #include #include #include #include #include #include -#include #include class GccEnt_QualifiedCirc; class GccEnt_QualifiedLin; diff --git a/src/GccAna/GccAna_Circ2d3Tan_1.cxx b/src/GccAna/GccAna_Circ2d3Tan_1.cxx index 4550d81446..a335d2639c 100644 --- a/src/GccAna/GccAna_Circ2d3Tan_1.cxx +++ b/src/GccAna/GccAna_Circ2d3Tan_1.cxx @@ -19,7 +19,6 @@ #include #include #include -#include #include #include #include @@ -30,8 +29,6 @@ #include #include #include -#include -#include #include //========================================================================= diff --git a/src/GccAna/GccAna_Circ2d3Tan_2.cxx b/src/GccAna/GccAna_Circ2d3Tan_2.cxx index 289fb31236..efb7cdb5da 100644 --- a/src/GccAna/GccAna_Circ2d3Tan_2.cxx +++ b/src/GccAna/GccAna_Circ2d3Tan_2.cxx @@ -20,7 +20,6 @@ #include #include #include -#include #include #include #include @@ -30,8 +29,6 @@ #include #include #include -#include -#include #include //========================================================================= diff --git a/src/GccAna/GccAna_Circ2d3Tan_3.cxx b/src/GccAna/GccAna_Circ2d3Tan_3.cxx index e1ad96d04a..612f395ce3 100644 --- a/src/GccAna/GccAna_Circ2d3Tan_3.cxx +++ b/src/GccAna/GccAna_Circ2d3Tan_3.cxx @@ -17,7 +17,6 @@ #include #include #include -#include #include #include #include @@ -25,8 +24,6 @@ #include #include #include -#include -#include #include //========================================================================= diff --git a/src/GccAna/GccAna_Circ2d3Tan_4.cxx b/src/GccAna/GccAna_Circ2d3Tan_4.cxx index fa145171d2..1a94950251 100644 --- a/src/GccAna/GccAna_Circ2d3Tan_4.cxx +++ b/src/GccAna/GccAna_Circ2d3Tan_4.cxx @@ -20,11 +20,7 @@ #include #include #include -#include -#include #include -#include -#include #include #include #include @@ -33,8 +29,6 @@ #include #include #include -#include -#include #include static Standard_Integer MaxSol = 20; diff --git a/src/GccAna/GccAna_Circ2d3Tan_5.cxx b/src/GccAna/GccAna_Circ2d3Tan_5.cxx index 03f444d068..35d1c4bb82 100644 --- a/src/GccAna/GccAna_Circ2d3Tan_5.cxx +++ b/src/GccAna/GccAna_Circ2d3Tan_5.cxx @@ -21,7 +21,6 @@ #include #include #include -#include #include #include #include @@ -31,8 +30,6 @@ #include #include #include -#include -#include #include //=========================================================================== diff --git a/src/GccAna/GccAna_Circ2d3Tan_6.cxx b/src/GccAna/GccAna_Circ2d3Tan_6.cxx index 4e795a9025..2e8b628783 100644 --- a/src/GccAna/GccAna_Circ2d3Tan_6.cxx +++ b/src/GccAna/GccAna_Circ2d3Tan_6.cxx @@ -18,9 +18,7 @@ #include #include #include -#include #include -#include #include #include #include @@ -30,8 +28,6 @@ #include #include #include -#include -#include //========================================================================= // Creation of a circle tangent to two straight lines and a point. + diff --git a/src/GccAna/GccAna_Circ2d3Tan_7.cxx b/src/GccAna/GccAna_Circ2d3Tan_7.cxx index 5e521f345d..f1c443e8ba 100644 --- a/src/GccAna/GccAna_Circ2d3Tan_7.cxx +++ b/src/GccAna/GccAna_Circ2d3Tan_7.cxx @@ -19,11 +19,7 @@ #include #include #include -#include -#include #include -#include -#include #include #include #include @@ -33,8 +29,6 @@ #include #include #include -#include -#include #include //======================================================================= diff --git a/src/GccAna/GccAna_Circ2d3Tan_8.cxx b/src/GccAna/GccAna_Circ2d3Tan_8.cxx index 6c23405567..3028077dad 100644 --- a/src/GccAna/GccAna_Circ2d3Tan_8.cxx +++ b/src/GccAna/GccAna_Circ2d3Tan_8.cxx @@ -15,11 +15,9 @@ #include #include -#include #include #include #include -#include #include #include #include @@ -31,8 +29,6 @@ #include #include #include -#include -#include //========================================================================= // Creation of a circle tangent to a straight line and two points. + diff --git a/src/GccAna/GccAna_Circ2d3Tan_9.cxx b/src/GccAna/GccAna_Circ2d3Tan_9.cxx index bd0a584a2e..04da6202d2 100644 --- a/src/GccAna/GccAna_Circ2d3Tan_9.cxx +++ b/src/GccAna/GccAna_Circ2d3Tan_9.cxx @@ -15,18 +15,13 @@ #include #include -#include #include -#include -#include #include #include #include #include #include #include -#include -#include //========================================================================= // Creation of a circle passing by three points. + diff --git a/src/GccAna/GccAna_Circ2dBisec.cxx b/src/GccAna/GccAna_Circ2dBisec.cxx index d687166e75..6b44e754d0 100644 --- a/src/GccAna/GccAna_Circ2dBisec.cxx +++ b/src/GccAna/GccAna_Circ2dBisec.cxx @@ -25,16 +25,11 @@ #include #include #include -#include -#include #include #include #include -#include -#include #include #include -#include #include #include diff --git a/src/GccAna/GccAna_Circ2dTanCen.cxx b/src/GccAna/GccAna_Circ2dTanCen.cxx index 869c9ea6a6..7930dd2595 100644 --- a/src/GccAna/GccAna_Circ2dTanCen.cxx +++ b/src/GccAna/GccAna_Circ2dTanCen.cxx @@ -25,7 +25,6 @@ #include #include #include -#include #include #include diff --git a/src/GccAna/GccAna_Circ2dTanCen.hxx b/src/GccAna/GccAna_Circ2dTanCen.hxx index f50fe4a698..ac2ab019ba 100644 --- a/src/GccAna/GccAna_Circ2dTanCen.hxx +++ b/src/GccAna/GccAna_Circ2dTanCen.hxx @@ -19,16 +19,13 @@ #include #include -#include -#include #include #include #include #include #include #include -#include #include class GccEnt_QualifiedCirc; class gp_Pnt2d; diff --git a/src/GccAna/GccAna_Circ2dTanOnRad.cxx b/src/GccAna/GccAna_Circ2dTanOnRad.cxx index 2ae5977c1d..584b6bbd9d 100644 --- a/src/GccAna/GccAna_Circ2dTanOnRad.cxx +++ b/src/GccAna/GccAna_Circ2dTanOnRad.cxx @@ -26,7 +26,6 @@ #include #include #include -#include #include #include #include diff --git a/src/GccAna/GccAna_Circ2dTanOnRad.hxx b/src/GccAna/GccAna_Circ2dTanOnRad.hxx index 98005feff4..5d7d47375f 100644 --- a/src/GccAna/GccAna_Circ2dTanOnRad.hxx +++ b/src/GccAna/GccAna_Circ2dTanOnRad.hxx @@ -19,16 +19,13 @@ #include #include -#include -#include #include #include #include #include #include #include -#include #include class GccEnt_QualifiedCirc; class gp_Lin2d; diff --git a/src/GccAna/GccAna_Circ2dTanOnRad_1.cxx b/src/GccAna/GccAna_Circ2dTanOnRad_1.cxx index 966c646a82..325db04ed2 100644 --- a/src/GccAna/GccAna_Circ2dTanOnRad_1.cxx +++ b/src/GccAna/GccAna_Circ2dTanOnRad_1.cxx @@ -16,7 +16,6 @@ #include #include #include -#include #include #include #include @@ -25,8 +24,6 @@ #include #include #include -#include -#include #include //========================================================================= diff --git a/src/GccAna/GccAna_Circ2dTanOnRad_2.cxx b/src/GccAna/GccAna_Circ2dTanOnRad_2.cxx index e5508a28f8..46cead1237 100644 --- a/src/GccAna/GccAna_Circ2dTanOnRad_2.cxx +++ b/src/GccAna/GccAna_Circ2dTanOnRad_2.cxx @@ -16,16 +16,12 @@ #include #include #include -#include -#include #include #include #include #include #include #include -#include -#include //========================================================================= // typedef of handled objects : + diff --git a/src/GccAna/GccAna_Circ2dTanOnRad_3.cxx b/src/GccAna/GccAna_Circ2dTanOnRad_3.cxx index bfe6e81ae3..1257b06dd9 100644 --- a/src/GccAna/GccAna_Circ2dTanOnRad_3.cxx +++ b/src/GccAna/GccAna_Circ2dTanOnRad_3.cxx @@ -17,7 +17,6 @@ #include #include #include -#include #include #include #include @@ -25,8 +24,6 @@ #include #include #include -#include -#include #include //========================================================================= diff --git a/src/GccAna/GccAna_Circ2dTanOnRad_4.cxx b/src/GccAna/GccAna_Circ2dTanOnRad_4.cxx index 28c8931e47..9b4b8cef02 100644 --- a/src/GccAna/GccAna_Circ2dTanOnRad_4.cxx +++ b/src/GccAna/GccAna_Circ2dTanOnRad_4.cxx @@ -16,7 +16,6 @@ #include #include #include -#include #include #include #include @@ -25,8 +24,6 @@ #include #include #include -#include -#include //========================================================================= // Circle tangent to straight line Qualified1 (L1). + diff --git a/src/GccAna/GccAna_Circ2dTanOnRad_5.cxx b/src/GccAna/GccAna_Circ2dTanOnRad_5.cxx index 83f8255d26..76191c16b4 100644 --- a/src/GccAna/GccAna_Circ2dTanOnRad_5.cxx +++ b/src/GccAna/GccAna_Circ2dTanOnRad_5.cxx @@ -16,8 +16,6 @@ #include #include #include -#include -#include #include #include #include @@ -25,8 +23,6 @@ #include #include #include -#include -#include //========================================================================= // Circle tangent to a point Point1. + diff --git a/src/GccAna/GccAna_CircLin2dBisec.cxx b/src/GccAna/GccAna_CircLin2dBisec.cxx index e7a0dea5c0..dfa5f6736b 100644 --- a/src/GccAna/GccAna_CircLin2dBisec.cxx +++ b/src/GccAna/GccAna_CircLin2dBisec.cxx @@ -19,7 +19,6 @@ //========================================================================= #include -#include #include #include #include diff --git a/src/GccAna/GccAna_CircPnt2dBisec.cxx b/src/GccAna/GccAna_CircPnt2dBisec.cxx index 6965d1e06a..cbcb635f34 100644 --- a/src/GccAna/GccAna_CircPnt2dBisec.cxx +++ b/src/GccAna/GccAna_CircPnt2dBisec.cxx @@ -24,13 +24,10 @@ #include #include #include -#include #include #include #include #include -#include -#include #include #include diff --git a/src/GccAna/GccAna_Lin2d2Tan.hxx b/src/GccAna/GccAna_Lin2d2Tan.hxx index 152e355852..7273e865a5 100644 --- a/src/GccAna/GccAna_Lin2d2Tan.hxx +++ b/src/GccAna/GccAna_Lin2d2Tan.hxx @@ -19,15 +19,12 @@ #include #include -#include -#include #include #include #include #include #include -#include #include class gp_Pnt2d; class GccEnt_QualifiedCirc; diff --git a/src/GccAna/GccAna_Lin2dBisec.cxx b/src/GccAna/GccAna_Lin2dBisec.cxx index 0ac9cb4803..c79118a629 100644 --- a/src/GccAna/GccAna_Lin2dBisec.cxx +++ b/src/GccAna/GccAna_Lin2dBisec.cxx @@ -19,7 +19,6 @@ #include #include #include -#include #include #include #include diff --git a/src/GccAna/GccAna_Lin2dBisec.hxx b/src/GccAna/GccAna_Lin2dBisec.hxx index 01272df343..1a3bca7383 100644 --- a/src/GccAna/GccAna_Lin2dBisec.hxx +++ b/src/GccAna/GccAna_Lin2dBisec.hxx @@ -19,14 +19,11 @@ #include #include -#include -#include #include #include #include #include -#include class gp_Lin2d; class gp_Pnt2d; diff --git a/src/GccAna/GccAna_Lin2dTanObl.cxx b/src/GccAna/GccAna_Lin2dTanObl.cxx index db4ed1f4c8..6fc1e64c0c 100644 --- a/src/GccAna/GccAna_Lin2dTanObl.cxx +++ b/src/GccAna/GccAna_Lin2dTanObl.cxx @@ -25,7 +25,6 @@ #include #include #include -#include #include #include #include diff --git a/src/GccAna/GccAna_Lin2dTanObl.hxx b/src/GccAna/GccAna_Lin2dTanObl.hxx index 1ea203567e..4602145d93 100644 --- a/src/GccAna/GccAna_Lin2dTanObl.hxx +++ b/src/GccAna/GccAna_Lin2dTanObl.hxx @@ -19,15 +19,12 @@ #include #include -#include -#include #include #include #include #include #include -#include #include class gp_Pnt2d; class gp_Lin2d; diff --git a/src/GccAna/GccAna_Lin2dTanPar.cxx b/src/GccAna/GccAna_Lin2dTanPar.cxx index e839f4e4c2..cedf004aab 100644 --- a/src/GccAna/GccAna_Lin2dTanPar.cxx +++ b/src/GccAna/GccAna_Lin2dTanPar.cxx @@ -25,7 +25,6 @@ #include #include #include -#include #include #include #include diff --git a/src/GccAna/GccAna_Lin2dTanPar.hxx b/src/GccAna/GccAna_Lin2dTanPar.hxx index c9df854f1e..2c6529879b 100644 --- a/src/GccAna/GccAna_Lin2dTanPar.hxx +++ b/src/GccAna/GccAna_Lin2dTanPar.hxx @@ -19,16 +19,13 @@ #include #include -#include -#include #include #include #include #include #include #include -#include class gp_Pnt2d; class gp_Lin2d; class GccEnt_QualifiedCirc; diff --git a/src/GccAna/GccAna_Lin2dTanPer.cxx b/src/GccAna/GccAna_Lin2dTanPer.cxx index 63560f2fc6..fc30993b7d 100644 --- a/src/GccAna/GccAna_Lin2dTanPer.cxx +++ b/src/GccAna/GccAna_Lin2dTanPer.cxx @@ -25,11 +25,9 @@ #include #include #include -#include #include #include #include -#include #include #include diff --git a/src/GccAna/GccAna_Lin2dTanPer.hxx b/src/GccAna/GccAna_Lin2dTanPer.hxx index c186713985..c387af2538 100644 --- a/src/GccAna/GccAna_Lin2dTanPer.hxx +++ b/src/GccAna/GccAna_Lin2dTanPer.hxx @@ -19,16 +19,13 @@ #include #include -#include -#include #include #include #include #include #include #include -#include class gp_Pnt2d; class gp_Lin2d; class gp_Circ2d; diff --git a/src/GccAna/GccAna_LinPnt2dBisec.cxx b/src/GccAna/GccAna_LinPnt2dBisec.cxx index 6ffc603356..c16390be45 100644 --- a/src/GccAna/GccAna_LinPnt2dBisec.cxx +++ b/src/GccAna/GccAna_LinPnt2dBisec.cxx @@ -19,16 +19,13 @@ //========================================================================= #include -#include #include #include -#include #include #include #include #include #include -#include #include //========================================================================= diff --git a/src/GccAna/GccAna_Pnt2dBisec.cxx b/src/GccAna/GccAna_Pnt2dBisec.cxx index 2f4423ca31..74d0cf1dce 100644 --- a/src/GccAna/GccAna_Pnt2dBisec.cxx +++ b/src/GccAna/GccAna_Pnt2dBisec.cxx @@ -20,12 +20,10 @@ #include #include -#include #include #include #include #include -#include #include //========================================================================= diff --git a/src/GccAna/GccAna_Pnt2dBisec.hxx b/src/GccAna/GccAna_Pnt2dBisec.hxx index 28e5583b2c..7cf57078d4 100644 --- a/src/GccAna/GccAna_Pnt2dBisec.hxx +++ b/src/GccAna/GccAna_Pnt2dBisec.hxx @@ -19,9 +19,7 @@ #include #include -#include -#include #include class gp_Pnt2d; diff --git a/src/GccInt/GccInt_BCirc.cxx b/src/GccInt/GccInt_BCirc.cxx index fc39d280fc..6b18a6f0cd 100644 --- a/src/GccInt/GccInt_BCirc.cxx +++ b/src/GccInt/GccInt_BCirc.cxx @@ -17,7 +17,6 @@ #include #include -#include #include IMPLEMENT_STANDARD_RTTIEXT(GccInt_BCirc,GccInt_Bisec) diff --git a/src/GccInt/GccInt_BCirc.hxx b/src/GccInt/GccInt_BCirc.hxx index bb113c00fb..9c6311d69c 100644 --- a/src/GccInt/GccInt_BCirc.hxx +++ b/src/GccInt/GccInt_BCirc.hxx @@ -18,7 +18,6 @@ #define _GccInt_BCirc_HeaderFile #include -#include #include #include diff --git a/src/GccInt/GccInt_BElips.cxx b/src/GccInt/GccInt_BElips.cxx index ec68d651e5..120e3bc600 100644 --- a/src/GccInt/GccInt_BElips.cxx +++ b/src/GccInt/GccInt_BElips.cxx @@ -17,7 +17,6 @@ #include #include -#include #include IMPLEMENT_STANDARD_RTTIEXT(GccInt_BElips,GccInt_Bisec) diff --git a/src/GccInt/GccInt_BElips.hxx b/src/GccInt/GccInt_BElips.hxx index 9f856dd6bd..bbf6d0d1b7 100644 --- a/src/GccInt/GccInt_BElips.hxx +++ b/src/GccInt/GccInt_BElips.hxx @@ -18,7 +18,6 @@ #define _GccInt_BElips_HeaderFile #include -#include #include #include diff --git a/src/GccInt/GccInt_BHyper.cxx b/src/GccInt/GccInt_BHyper.cxx index 82a08083f3..5b894c1b00 100644 --- a/src/GccInt/GccInt_BHyper.cxx +++ b/src/GccInt/GccInt_BHyper.cxx @@ -17,7 +17,6 @@ #include #include -#include #include IMPLEMENT_STANDARD_RTTIEXT(GccInt_BHyper,GccInt_Bisec) diff --git a/src/GccInt/GccInt_BHyper.hxx b/src/GccInt/GccInt_BHyper.hxx index 06e3f62f0a..6d3cafa10f 100644 --- a/src/GccInt/GccInt_BHyper.hxx +++ b/src/GccInt/GccInt_BHyper.hxx @@ -18,7 +18,6 @@ #define _GccInt_BHyper_HeaderFile #include -#include #include #include diff --git a/src/GccInt/GccInt_BLine.cxx b/src/GccInt/GccInt_BLine.cxx index 65b56f0552..9e7f12db52 100644 --- a/src/GccInt/GccInt_BLine.cxx +++ b/src/GccInt/GccInt_BLine.cxx @@ -17,7 +17,6 @@ #include #include -#include #include IMPLEMENT_STANDARD_RTTIEXT(GccInt_BLine,GccInt_Bisec) diff --git a/src/GccInt/GccInt_BLine.hxx b/src/GccInt/GccInt_BLine.hxx index dcdaef676d..0c4718b5b8 100644 --- a/src/GccInt/GccInt_BLine.hxx +++ b/src/GccInt/GccInt_BLine.hxx @@ -18,7 +18,6 @@ #define _GccInt_BLine_HeaderFile #include -#include #include #include diff --git a/src/GccInt/GccInt_BParab.cxx b/src/GccInt/GccInt_BParab.cxx index 74ff3ff098..6fc6294ad1 100644 --- a/src/GccInt/GccInt_BParab.cxx +++ b/src/GccInt/GccInt_BParab.cxx @@ -17,7 +17,6 @@ #include #include -#include #include IMPLEMENT_STANDARD_RTTIEXT(GccInt_BParab,GccInt_Bisec) diff --git a/src/GccInt/GccInt_BParab.hxx b/src/GccInt/GccInt_BParab.hxx index 4e26bf5b4c..3cb662a1f0 100644 --- a/src/GccInt/GccInt_BParab.hxx +++ b/src/GccInt/GccInt_BParab.hxx @@ -18,7 +18,6 @@ #define _GccInt_BParab_HeaderFile #include -#include #include #include diff --git a/src/GccInt/GccInt_BPoint.cxx b/src/GccInt/GccInt_BPoint.cxx index 02772295da..c354572b1b 100644 --- a/src/GccInt/GccInt_BPoint.cxx +++ b/src/GccInt/GccInt_BPoint.cxx @@ -17,7 +17,6 @@ #include #include -#include #include IMPLEMENT_STANDARD_RTTIEXT(GccInt_BPoint,GccInt_Bisec) diff --git a/src/GccInt/GccInt_BPoint.hxx b/src/GccInt/GccInt_BPoint.hxx index 7d28748e62..5fbcb4d3ba 100644 --- a/src/GccInt/GccInt_BPoint.hxx +++ b/src/GccInt/GccInt_BPoint.hxx @@ -18,7 +18,6 @@ #define _GccInt_BPoint_HeaderFile #include -#include #include #include diff --git a/src/GccInt/GccInt_Bisec.cxx b/src/GccInt/GccInt_Bisec.cxx index c61ada995e..03dada7a10 100644 --- a/src/GccInt/GccInt_Bisec.cxx +++ b/src/GccInt/GccInt_Bisec.cxx @@ -22,7 +22,6 @@ #include #include #include -#include #include #include diff --git a/src/Geom/Geom_Axis1Placement.hxx b/src/Geom/Geom_Axis1Placement.hxx index 2104db170e..86ef0c1c33 100644 --- a/src/Geom/Geom_Axis1Placement.hxx +++ b/src/Geom/Geom_Axis1Placement.hxx @@ -18,7 +18,6 @@ #define _Geom_Axis1Placement_HeaderFile #include -#include #include class gp_Ax1; diff --git a/src/Geom/Geom_Axis2Placement.cxx b/src/Geom/Geom_Axis2Placement.cxx index 036e88fcee..081862e4c4 100644 --- a/src/Geom/Geom_Axis2Placement.cxx +++ b/src/Geom/Geom_Axis2Placement.cxx @@ -21,7 +21,6 @@ #include #include #include -#include #include IMPLEMENT_STANDARD_RTTIEXT(Geom_Axis2Placement,Geom_AxisPlacement) diff --git a/src/Geom/Geom_Axis2Placement.hxx b/src/Geom/Geom_Axis2Placement.hxx index 06048cc038..f04a234c98 100644 --- a/src/Geom/Geom_Axis2Placement.hxx +++ b/src/Geom/Geom_Axis2Placement.hxx @@ -18,9 +18,7 @@ #define _Geom_Axis2Placement_HeaderFile #include -#include -#include #include class gp_Ax2; class gp_Pnt; diff --git a/src/Geom/Geom_AxisPlacement.cxx b/src/Geom/Geom_AxisPlacement.cxx index 78d25142bd..f5761fafe2 100644 --- a/src/Geom/Geom_AxisPlacement.cxx +++ b/src/Geom/Geom_AxisPlacement.cxx @@ -19,7 +19,6 @@ #include #include #include -#include #include IMPLEMENT_STANDARD_RTTIEXT(Geom_AxisPlacement,Geom_Geometry) diff --git a/src/Geom/Geom_AxisPlacement.hxx b/src/Geom/Geom_AxisPlacement.hxx index e889bd6567..2794e9669c 100644 --- a/src/Geom/Geom_AxisPlacement.hxx +++ b/src/Geom/Geom_AxisPlacement.hxx @@ -18,7 +18,6 @@ #define _Geom_AxisPlacement_HeaderFile #include -#include #include #include diff --git a/src/Geom/Geom_BSplineCurve.cxx b/src/Geom/Geom_BSplineCurve.cxx index 54212d5d13..83cd011545 100644 --- a/src/Geom/Geom_BSplineCurve.cxx +++ b/src/Geom/Geom_BSplineCurve.cxx @@ -31,8 +31,6 @@ #include -#include -#include #include #include #include @@ -42,12 +40,10 @@ #include #include #include -#include #include #include #include #include -#include #include #include diff --git a/src/Geom/Geom_BSplineCurve.hxx b/src/Geom/Geom_BSplineCurve.hxx index 83a8a73297..7648d32b36 100644 --- a/src/Geom/Geom_BSplineCurve.hxx +++ b/src/Geom/Geom_BSplineCurve.hxx @@ -21,14 +21,12 @@ #include #include -#include #include #include #include #include #include #include -#include #include #include #include diff --git a/src/Geom/Geom_BSplineCurve_1.cxx b/src/Geom/Geom_BSplineCurve_1.cxx index b1d55bcb77..f6ce2327d3 100644 --- a/src/Geom/Geom_BSplineCurve_1.cxx +++ b/src/Geom/Geom_BSplineCurve_1.cxx @@ -16,17 +16,14 @@ #include #include -#include #include #include #include #include #include #include -#include #include #include -#include #include #include diff --git a/src/Geom/Geom_BSplineSurface.cxx b/src/Geom/Geom_BSplineSurface.cxx index 7b5c9f5ef3..8b9c07b093 100644 --- a/src/Geom/Geom_BSplineSurface.cxx +++ b/src/Geom/Geom_BSplineSurface.cxx @@ -26,21 +26,16 @@ #include #include #include -#include #include #include #include #include #include -#include #include #include -#include #include -#include #include #include -#include #include IMPLEMENT_STANDARD_RTTIEXT(Geom_BSplineSurface,Geom_BoundedSurface) diff --git a/src/Geom/Geom_BSplineSurface.hxx b/src/Geom/Geom_BSplineSurface.hxx index 5f6dd3b467..81382433c2 100644 --- a/src/Geom/Geom_BSplineSurface.hxx +++ b/src/Geom/Geom_BSplineSurface.hxx @@ -21,7 +21,6 @@ #include #include -#include #include #include #include @@ -29,7 +28,6 @@ #include #include #include -#include #include #include #include diff --git a/src/Geom/Geom_BSplineSurface_1.cxx b/src/Geom/Geom_BSplineSurface_1.cxx index 99508553a4..8e49da6c3c 100644 --- a/src/Geom/Geom_BSplineSurface_1.cxx +++ b/src/Geom/Geom_BSplineSurface_1.cxx @@ -28,9 +28,7 @@ #include #include #include -#include #include -#include #include #include #include diff --git a/src/Geom/Geom_BezierCurve.hxx b/src/Geom/Geom_BezierCurve.hxx index 9989ce0977..9ca5b83e8b 100644 --- a/src/Geom/Geom_BezierCurve.hxx +++ b/src/Geom/Geom_BezierCurve.hxx @@ -18,16 +18,12 @@ #define _Geom_BezierCurve_HeaderFile #include -#include -#include #include -#include #include #include #include #include -#include #include #include diff --git a/src/Geom/Geom_BezierSurface.hxx b/src/Geom/Geom_BezierSurface.hxx index be548dbe5a..244078d86d 100644 --- a/src/Geom/Geom_BezierSurface.hxx +++ b/src/Geom/Geom_BezierSurface.hxx @@ -20,10 +20,8 @@ #include #include -#include #include #include -#include #include #include #include diff --git a/src/Geom/Geom_CartesianPoint.hxx b/src/Geom/Geom_CartesianPoint.hxx index 50f234df4a..11aa9b5ff5 100644 --- a/src/Geom/Geom_CartesianPoint.hxx +++ b/src/Geom/Geom_CartesianPoint.hxx @@ -18,7 +18,6 @@ #define _Geom_CartesianPoint_HeaderFile #include -#include #include #include diff --git a/src/Geom/Geom_Circle.hxx b/src/Geom/Geom_Circle.hxx index 0de456a877..164afed6ff 100644 --- a/src/Geom/Geom_Circle.hxx +++ b/src/Geom/Geom_Circle.hxx @@ -20,9 +20,7 @@ #include #include -#include #include -#include #include class gp_Circ; class gp_Ax2; diff --git a/src/Geom/Geom_ConicalSurface.cxx b/src/Geom/Geom_ConicalSurface.cxx index 8bac5ada60..5f4b684e3f 100644 --- a/src/Geom/Geom_ConicalSurface.cxx +++ b/src/Geom/Geom_ConicalSurface.cxx @@ -28,7 +28,6 @@ #include #include #include -#include #include #include #include diff --git a/src/Geom/Geom_ConicalSurface.hxx b/src/Geom/Geom_ConicalSurface.hxx index bb53ad9bb6..3bce2e8c0d 100644 --- a/src/Geom/Geom_ConicalSurface.hxx +++ b/src/Geom/Geom_ConicalSurface.hxx @@ -20,9 +20,7 @@ #include #include -#include #include -#include #include class gp_Ax3; class gp_Cone; diff --git a/src/Geom/Geom_Curve.cxx b/src/Geom/Geom_Curve.cxx index b70753015e..1c8d3dee9b 100644 --- a/src/Geom/Geom_Curve.cxx +++ b/src/Geom/Geom_Curve.cxx @@ -20,9 +20,7 @@ #include #include #include -#include #include -#include #include IMPLEMENT_STANDARD_RTTIEXT(Geom_Curve,Geom_Geometry) diff --git a/src/Geom/Geom_Curve.hxx b/src/Geom/Geom_Curve.hxx index 352a37f1cc..3845c6c1e9 100644 --- a/src/Geom/Geom_Curve.hxx +++ b/src/Geom/Geom_Curve.hxx @@ -22,7 +22,6 @@ #include #include -#include #include #include class gp_Trsf; diff --git a/src/Geom/Geom_CylindricalSurface.cxx b/src/Geom/Geom_CylindricalSurface.cxx index cd5ba15feb..becb5f047d 100644 --- a/src/Geom/Geom_CylindricalSurface.cxx +++ b/src/Geom/Geom_CylindricalSurface.cxx @@ -27,7 +27,6 @@ #include #include #include -#include #include #include #include diff --git a/src/Geom/Geom_CylindricalSurface.hxx b/src/Geom/Geom_CylindricalSurface.hxx index dc4a79969e..c2a4eb9652 100644 --- a/src/Geom/Geom_CylindricalSurface.hxx +++ b/src/Geom/Geom_CylindricalSurface.hxx @@ -20,9 +20,7 @@ #include #include -#include #include -#include #include class gp_Ax3; class gp_Cylinder; diff --git a/src/Geom/Geom_Direction.hxx b/src/Geom/Geom_Direction.hxx index 8528220026..2b5d177889 100644 --- a/src/Geom/Geom_Direction.hxx +++ b/src/Geom/Geom_Direction.hxx @@ -18,7 +18,6 @@ #define _Geom_Direction_HeaderFile #include -#include #include #include diff --git a/src/Geom/Geom_Ellipse.hxx b/src/Geom/Geom_Ellipse.hxx index c5232a5f31..e3ff63d070 100644 --- a/src/Geom/Geom_Ellipse.hxx +++ b/src/Geom/Geom_Ellipse.hxx @@ -20,9 +20,7 @@ #include #include -#include #include -#include #include class gp_Elips; class gp_Ax2; diff --git a/src/Geom/Geom_HSequenceOfBSplineSurface.hxx b/src/Geom/Geom_HSequenceOfBSplineSurface.hxx index 17d8cf913f..c8a33f34b0 100644 --- a/src/Geom/Geom_HSequenceOfBSplineSurface.hxx +++ b/src/Geom/Geom_HSequenceOfBSplineSurface.hxx @@ -17,7 +17,6 @@ #ifndef Geom_HSequenceOfBSplineSurface_HeaderFile #define Geom_HSequenceOfBSplineSurface_HeaderFile -#include #include #include diff --git a/src/Geom/Geom_Hyperbola.cxx b/src/Geom/Geom_Hyperbola.cxx index 81bae59597..486979a410 100644 --- a/src/Geom/Geom_Hyperbola.cxx +++ b/src/Geom/Geom_Hyperbola.cxx @@ -16,7 +16,6 @@ #include -#include #include #include #include diff --git a/src/Geom/Geom_Hyperbola.hxx b/src/Geom/Geom_Hyperbola.hxx index 46a6225959..3a558d5b0d 100644 --- a/src/Geom/Geom_Hyperbola.hxx +++ b/src/Geom/Geom_Hyperbola.hxx @@ -20,9 +20,7 @@ #include #include -#include #include -#include #include class gp_Hypr; class gp_Ax2; diff --git a/src/Geom/Geom_Line.cxx b/src/Geom/Geom_Line.cxx index 047e6d7ba1..1a40f28cc4 100644 --- a/src/Geom/Geom_Line.cxx +++ b/src/Geom/Geom_Line.cxx @@ -16,7 +16,6 @@ #include -#include #include #include #include diff --git a/src/Geom/Geom_Line.hxx b/src/Geom/Geom_Line.hxx index 39023ca541..57cded0e27 100644 --- a/src/Geom/Geom_Line.hxx +++ b/src/Geom/Geom_Line.hxx @@ -22,8 +22,6 @@ #include #include -#include -#include #include #include class gp_Lin; diff --git a/src/Geom/Geom_OffsetCurve.cxx b/src/Geom/Geom_OffsetCurve.cxx index 7ec994565c..5633738533 100644 --- a/src/Geom/Geom_OffsetCurve.cxx +++ b/src/Geom/Geom_OffsetCurve.cxx @@ -20,17 +20,11 @@ #include #include -#include #include -#include #include -#include -#include #include -#include #include #include -#include #include #include #include @@ -38,7 +32,6 @@ #include #include #include -#include #include #include #include diff --git a/src/Geom/Geom_OffsetCurve.hxx b/src/Geom/Geom_OffsetCurve.hxx index 9647a29723..d8cee4e6ae 100644 --- a/src/Geom/Geom_OffsetCurve.hxx +++ b/src/Geom/Geom_OffsetCurve.hxx @@ -21,10 +21,8 @@ #include #include -#include #include #include -#include #include #include diff --git a/src/Geom/Geom_OffsetSurface.cxx b/src/Geom/Geom_OffsetSurface.cxx index bb11c54962..19c62e901c 100644 --- a/src/Geom/Geom_OffsetSurface.cxx +++ b/src/Geom/Geom_OffsetSurface.cxx @@ -20,13 +20,8 @@ // Modified 18/11/96 : JPI : inversion de l'offsetValue dans UReverse et Vreverse #include -#include -#include -#include -#include #include #include -#include #include #include #include @@ -45,34 +40,26 @@ #include #include #include -#include #include -#include -#include #include #include #include -#include #include #include #include #include #include -#include #include #include -#include #include #include #include #include #include -#include #include #include #include #include -#include IMPLEMENT_STANDARD_RTTIEXT(Geom_OffsetSurface,Geom_Surface) diff --git a/src/Geom/Geom_OffsetSurface.hxx b/src/Geom/Geom_OffsetSurface.hxx index 4e63f80053..3d3a48d305 100644 --- a/src/Geom/Geom_OffsetSurface.hxx +++ b/src/Geom/Geom_OffsetSurface.hxx @@ -20,11 +20,8 @@ #include #include -#include -#include #include #include -#include #include #include class Geom_Curve; diff --git a/src/Geom/Geom_OsculatingSurface.cxx b/src/Geom/Geom_OsculatingSurface.cxx index 96e4b34cce..e0c7cb701d 100644 --- a/src/Geom/Geom_OsculatingSurface.cxx +++ b/src/Geom/Geom_OsculatingSurface.cxx @@ -15,12 +15,9 @@ #include #include #include -#include #include #include #include -#include -#include #include #include #include diff --git a/src/Geom/Geom_OsculatingSurface.hxx b/src/Geom/Geom_OsculatingSurface.hxx index 7e6fe0d109..81fe316741 100644 --- a/src/Geom/Geom_OsculatingSurface.hxx +++ b/src/Geom/Geom_OsculatingSurface.hxx @@ -25,7 +25,6 @@ #include #include #include -#include #include #include #include diff --git a/src/Geom/Geom_Parabola.cxx b/src/Geom/Geom_Parabola.cxx index 1167691430..7f0f269069 100644 --- a/src/Geom/Geom_Parabola.cxx +++ b/src/Geom/Geom_Parabola.cxx @@ -16,7 +16,6 @@ #include -#include #include #include #include diff --git a/src/Geom/Geom_Parabola.hxx b/src/Geom/Geom_Parabola.hxx index 0d36ece8f2..b197f74cf3 100644 --- a/src/Geom/Geom_Parabola.hxx +++ b/src/Geom/Geom_Parabola.hxx @@ -20,9 +20,7 @@ #include #include -#include #include -#include #include class gp_Parab; class gp_Ax2; diff --git a/src/Geom/Geom_Plane.cxx b/src/Geom/Geom_Plane.cxx index 740a19c29a..f62b368e7e 100644 --- a/src/Geom/Geom_Plane.cxx +++ b/src/Geom/Geom_Plane.cxx @@ -16,15 +16,12 @@ #include -#include -#include #include #include #include #include #include #include -#include #include #include #include @@ -32,7 +29,6 @@ #include #include #include -#include #include #include diff --git a/src/Geom/Geom_Plane.hxx b/src/Geom/Geom_Plane.hxx index fb2ccd198e..f4a3537178 100644 --- a/src/Geom/Geom_Plane.hxx +++ b/src/Geom/Geom_Plane.hxx @@ -21,8 +21,6 @@ #include #include -#include -#include #include class gp_Ax3; class gp_Pln; diff --git a/src/Geom/Geom_RectangularTrimmedSurface.cxx b/src/Geom/Geom_RectangularTrimmedSurface.cxx index 835bdaeaeb..096b8e02d2 100644 --- a/src/Geom/Geom_RectangularTrimmedSurface.cxx +++ b/src/Geom/Geom_RectangularTrimmedSurface.cxx @@ -19,29 +19,20 @@ #include #include -#include -#include #include -#include #include #include -#include #include -#include #include #include -#include -#include #include #include -#include #include #include #include #include #include #include -#include #include #include diff --git a/src/Geom/Geom_RectangularTrimmedSurface.hxx b/src/Geom/Geom_RectangularTrimmedSurface.hxx index 8c8a693cfe..940efe4a60 100644 --- a/src/Geom/Geom_RectangularTrimmedSurface.hxx +++ b/src/Geom/Geom_RectangularTrimmedSurface.hxx @@ -20,8 +20,6 @@ #include #include -#include -#include #include #include #include diff --git a/src/Geom/Geom_SphericalSurface.hxx b/src/Geom/Geom_SphericalSurface.hxx index 2297ea176a..c54aac557d 100644 --- a/src/Geom/Geom_SphericalSurface.hxx +++ b/src/Geom/Geom_SphericalSurface.hxx @@ -20,9 +20,7 @@ #include #include -#include #include -#include #include class gp_Ax3; class gp_Sphere; diff --git a/src/Geom/Geom_Surface.cxx b/src/Geom/Geom_Surface.cxx index a29226a6b1..b85f0db838 100644 --- a/src/Geom/Geom_Surface.cxx +++ b/src/Geom/Geom_Surface.cxx @@ -22,9 +22,7 @@ #include #include #include -#include #include -#include #include IMPLEMENT_STANDARD_RTTIEXT(Geom_Surface,Geom_Geometry) diff --git a/src/Geom/Geom_SurfaceOfLinearExtrusion.cxx b/src/Geom/Geom_SurfaceOfLinearExtrusion.cxx index b4b8f40a47..a6c708b463 100644 --- a/src/Geom/Geom_SurfaceOfLinearExtrusion.cxx +++ b/src/Geom/Geom_SurfaceOfLinearExtrusion.cxx @@ -18,25 +18,16 @@ #include #include #include -#include -#include #include -#include #include -#include #include -#include -#include #include -#include #include -#include #include #include #include #include #include -#include #include #include #include diff --git a/src/Geom/Geom_SurfaceOfLinearExtrusion.hxx b/src/Geom/Geom_SurfaceOfLinearExtrusion.hxx index 3c94122077..d0bf91c825 100644 --- a/src/Geom/Geom_SurfaceOfLinearExtrusion.hxx +++ b/src/Geom/Geom_SurfaceOfLinearExtrusion.hxx @@ -22,8 +22,6 @@ #include #include -#include -#include #include class Geom_Curve; class gp_Dir; diff --git a/src/Geom/Geom_SurfaceOfRevolution.cxx b/src/Geom/Geom_SurfaceOfRevolution.cxx index 8a6431608a..c9a0192d74 100644 --- a/src/Geom/Geom_SurfaceOfRevolution.cxx +++ b/src/Geom/Geom_SurfaceOfRevolution.cxx @@ -36,7 +36,6 @@ #include #include #include -#include #include #include #include diff --git a/src/Geom/Geom_SurfaceOfRevolution.hxx b/src/Geom/Geom_SurfaceOfRevolution.hxx index 0cd518e2c1..0368698f28 100644 --- a/src/Geom/Geom_SurfaceOfRevolution.hxx +++ b/src/Geom/Geom_SurfaceOfRevolution.hxx @@ -23,8 +23,6 @@ #include #include #include -#include -#include #include class Geom_Curve; class gp_Ax1; diff --git a/src/Geom/Geom_ToroidalSurface.cxx b/src/Geom/Geom_ToroidalSurface.cxx index 40ed734c2a..ebc6579bc4 100644 --- a/src/Geom/Geom_ToroidalSurface.cxx +++ b/src/Geom/Geom_ToroidalSurface.cxx @@ -23,7 +23,6 @@ #include #include #include -#include #include #include #include diff --git a/src/Geom/Geom_ToroidalSurface.hxx b/src/Geom/Geom_ToroidalSurface.hxx index 496d07a9f9..3fdf97f4a3 100644 --- a/src/Geom/Geom_ToroidalSurface.hxx +++ b/src/Geom/Geom_ToroidalSurface.hxx @@ -20,10 +20,8 @@ #include #include -#include #include #include -#include #include class gp_Ax3; class gp_Torus; diff --git a/src/Geom/Geom_Transformation.hxx b/src/Geom/Geom_Transformation.hxx index 04d127a1d9..ca6aa16a32 100644 --- a/src/Geom/Geom_Transformation.hxx +++ b/src/Geom/Geom_Transformation.hxx @@ -19,7 +19,6 @@ #include #include -#include #include #include #include diff --git a/src/Geom/Geom_TrimmedCurve.cxx b/src/Geom/Geom_TrimmedCurve.cxx index b77b2f3b78..4f8a948fd8 100644 --- a/src/Geom/Geom_TrimmedCurve.cxx +++ b/src/Geom/Geom_TrimmedCurve.cxx @@ -18,24 +18,17 @@ #include #include #include -#include #include -#include #include -#include -#include #include -#include #include #include -#include #include #include #include #include #include #include -#include #include #include diff --git a/src/Geom/Geom_TrimmedCurve.hxx b/src/Geom/Geom_TrimmedCurve.hxx index 5de8f516a1..69570d6697 100644 --- a/src/Geom/Geom_TrimmedCurve.hxx +++ b/src/Geom/Geom_TrimmedCurve.hxx @@ -20,9 +20,7 @@ #include #include -#include #include -#include #include #include class Geom_Curve; diff --git a/src/Geom/Geom_Vector.cxx b/src/Geom/Geom_Vector.cxx index 097d29e1e5..61d7b1c1b4 100644 --- a/src/Geom/Geom_Vector.cxx +++ b/src/Geom/Geom_Vector.cxx @@ -17,9 +17,6 @@ #include #include -#include -#include -#include #include IMPLEMENT_STANDARD_RTTIEXT(Geom_Vector,Geom_Geometry) diff --git a/src/Geom/Geom_Vector.hxx b/src/Geom/Geom_Vector.hxx index 8a1b97001f..a39a1287db 100644 --- a/src/Geom/Geom_Vector.hxx +++ b/src/Geom/Geom_Vector.hxx @@ -18,7 +18,6 @@ #define _Geom_Vector_HeaderFile #include -#include #include #include diff --git a/src/Geom/Geom_VectorWithMagnitude.cxx b/src/Geom/Geom_VectorWithMagnitude.cxx index a69f7eef93..6ce3cbef5c 100644 --- a/src/Geom/Geom_VectorWithMagnitude.cxx +++ b/src/Geom/Geom_VectorWithMagnitude.cxx @@ -21,7 +21,6 @@ #include #include #include -#include #include IMPLEMENT_STANDARD_RTTIEXT(Geom_VectorWithMagnitude,Geom_Vector) diff --git a/src/Geom/Geom_VectorWithMagnitude.hxx b/src/Geom/Geom_VectorWithMagnitude.hxx index 171f685883..f55b4d2706 100644 --- a/src/Geom/Geom_VectorWithMagnitude.hxx +++ b/src/Geom/Geom_VectorWithMagnitude.hxx @@ -21,7 +21,6 @@ #include #include -#include class gp_Vec; class gp_Pnt; class gp_Trsf; diff --git a/src/Geom2d/Geom2d_AxisPlacement.hxx b/src/Geom2d/Geom2d_AxisPlacement.hxx index 2712b78a15..477b4dd8b8 100644 --- a/src/Geom2d/Geom2d_AxisPlacement.hxx +++ b/src/Geom2d/Geom2d_AxisPlacement.hxx @@ -18,7 +18,6 @@ #define _Geom2d_AxisPlacement_HeaderFile #include -#include #include #include diff --git a/src/Geom2d/Geom2d_BSplineCurve.cxx b/src/Geom2d/Geom2d_BSplineCurve.cxx index a5ccd50fdf..9a16ecda5e 100644 --- a/src/Geom2d/Geom2d_BSplineCurve.cxx +++ b/src/Geom2d/Geom2d_BSplineCurve.cxx @@ -30,23 +30,18 @@ #include -#include -#include #include #include #include #include #include -#include #include #include #include -#include #include #include #include #include -#include #include IMPLEMENT_STANDARD_RTTIEXT(Geom2d_BSplineCurve,Geom2d_BoundedCurve) diff --git a/src/Geom2d/Geom2d_BSplineCurve.hxx b/src/Geom2d/Geom2d_BSplineCurve.hxx index 6b99369f65..e186a653f3 100644 --- a/src/Geom2d/Geom2d_BSplineCurve.hxx +++ b/src/Geom2d/Geom2d_BSplineCurve.hxx @@ -21,14 +21,12 @@ #include #include -#include #include #include #include #include #include #include -#include #include #include #include diff --git a/src/Geom2d/Geom2d_BSplineCurve_1.cxx b/src/Geom2d/Geom2d_BSplineCurve_1.cxx index 43b1d32fde..0f2dffc95c 100644 --- a/src/Geom2d/Geom2d_BSplineCurve_1.cxx +++ b/src/Geom2d/Geom2d_BSplineCurve_1.cxx @@ -16,17 +16,14 @@ #include #include -#include #include #include #include #include #include #include -#include #include #include -#include #include #include diff --git a/src/Geom2d/Geom2d_BezierCurve.cxx b/src/Geom2d/Geom2d_BezierCurve.cxx index 663376e213..8e64d899cc 100644 --- a/src/Geom2d/Geom2d_BezierCurve.cxx +++ b/src/Geom2d/Geom2d_BezierCurve.cxx @@ -34,7 +34,6 @@ #include #include #include -#include #include #include #include diff --git a/src/Geom2d/Geom2d_BezierCurve.hxx b/src/Geom2d/Geom2d_BezierCurve.hxx index 3b25e5eee3..5a1b0b51ef 100644 --- a/src/Geom2d/Geom2d_BezierCurve.hxx +++ b/src/Geom2d/Geom2d_BezierCurve.hxx @@ -18,16 +18,12 @@ #define _Geom2d_BezierCurve_HeaderFile #include -#include -#include #include -#include #include #include #include #include -#include #include #include diff --git a/src/Geom2d/Geom2d_CartesianPoint.hxx b/src/Geom2d/Geom2d_CartesianPoint.hxx index 5cabc66ff8..7e98ab04a1 100644 --- a/src/Geom2d/Geom2d_CartesianPoint.hxx +++ b/src/Geom2d/Geom2d_CartesianPoint.hxx @@ -18,7 +18,6 @@ #define _Geom2d_CartesianPoint_HeaderFile #include -#include #include #include diff --git a/src/Geom2d/Geom2d_Circle.hxx b/src/Geom2d/Geom2d_Circle.hxx index 3555ea44dd..56f4604390 100644 --- a/src/Geom2d/Geom2d_Circle.hxx +++ b/src/Geom2d/Geom2d_Circle.hxx @@ -20,9 +20,7 @@ #include #include -#include #include -#include #include class gp_Circ2d; class gp_Ax2d; diff --git a/src/Geom2d/Geom2d_Curve.cxx b/src/Geom2d/Geom2d_Curve.cxx index d39e731ec9..85adf8bf06 100644 --- a/src/Geom2d/Geom2d_Curve.cxx +++ b/src/Geom2d/Geom2d_Curve.cxx @@ -22,7 +22,6 @@ #include #include #include -#include #include IMPLEMENT_STANDARD_RTTIEXT(Geom2d_Curve,Geom2d_Geometry) diff --git a/src/Geom2d/Geom2d_Curve.hxx b/src/Geom2d/Geom2d_Curve.hxx index 5f753ee59f..7ec2c165a2 100644 --- a/src/Geom2d/Geom2d_Curve.hxx +++ b/src/Geom2d/Geom2d_Curve.hxx @@ -22,7 +22,6 @@ #include #include -#include #include #include class gp_Trsf2d; diff --git a/src/Geom2d/Geom2d_Direction.hxx b/src/Geom2d/Geom2d_Direction.hxx index e5677ecb81..7e9d912a8b 100644 --- a/src/Geom2d/Geom2d_Direction.hxx +++ b/src/Geom2d/Geom2d_Direction.hxx @@ -18,7 +18,6 @@ #define _Geom2d_Direction_HeaderFile #include -#include #include #include diff --git a/src/Geom2d/Geom2d_Ellipse.cxx b/src/Geom2d/Geom2d_Ellipse.cxx index feb26e0011..3ea205600d 100644 --- a/src/Geom2d/Geom2d_Ellipse.cxx +++ b/src/Geom2d/Geom2d_Ellipse.cxx @@ -18,7 +18,6 @@ #include #include #include -#include #include #include #include diff --git a/src/Geom2d/Geom2d_Ellipse.hxx b/src/Geom2d/Geom2d_Ellipse.hxx index 77119ecb2c..ad20d79c9f 100644 --- a/src/Geom2d/Geom2d_Ellipse.hxx +++ b/src/Geom2d/Geom2d_Ellipse.hxx @@ -20,9 +20,7 @@ #include #include -#include #include -#include #include class gp_Elips2d; class gp_Ax2d; diff --git a/src/Geom2d/Geom2d_Geometry.cxx b/src/Geom2d/Geom2d_Geometry.cxx index c2515d923e..683bed5a09 100644 --- a/src/Geom2d/Geom2d_Geometry.cxx +++ b/src/Geom2d/Geom2d_Geometry.cxx @@ -20,7 +20,6 @@ #include #include #include -#include #include IMPLEMENT_STANDARD_RTTIEXT(Geom2d_Geometry,Standard_Transient) diff --git a/src/Geom2d/Geom2d_Hyperbola.cxx b/src/Geom2d/Geom2d_Hyperbola.cxx index 6256918abd..24b818a58a 100644 --- a/src/Geom2d/Geom2d_Hyperbola.cxx +++ b/src/Geom2d/Geom2d_Hyperbola.cxx @@ -16,9 +16,7 @@ #include -#include #include -#include #include #include #include diff --git a/src/Geom2d/Geom2d_Hyperbola.hxx b/src/Geom2d/Geom2d_Hyperbola.hxx index be65633829..113ea18093 100644 --- a/src/Geom2d/Geom2d_Hyperbola.hxx +++ b/src/Geom2d/Geom2d_Hyperbola.hxx @@ -20,9 +20,7 @@ #include #include -#include #include -#include #include class gp_Hypr2d; class gp_Ax2d; diff --git a/src/Geom2d/Geom2d_Line.cxx b/src/Geom2d/Geom2d_Line.cxx index dc2a7b17da..4e4f80c5f1 100644 --- a/src/Geom2d/Geom2d_Line.cxx +++ b/src/Geom2d/Geom2d_Line.cxx @@ -16,7 +16,6 @@ #include -#include #include #include #include diff --git a/src/Geom2d/Geom2d_Line.hxx b/src/Geom2d/Geom2d_Line.hxx index 3ede3c2244..cbc9a084a3 100644 --- a/src/Geom2d/Geom2d_Line.hxx +++ b/src/Geom2d/Geom2d_Line.hxx @@ -22,8 +22,6 @@ #include #include -#include -#include #include #include class gp_Lin2d; diff --git a/src/Geom2d/Geom2d_OffsetCurve.cxx b/src/Geom2d/Geom2d_OffsetCurve.cxx index e8e7328489..27ad6f6e88 100644 --- a/src/Geom2d/Geom2d_OffsetCurve.cxx +++ b/src/Geom2d/Geom2d_OffsetCurve.cxx @@ -18,17 +18,11 @@ #include #include -#include #include -#include #include -#include -#include #include -#include #include #include -#include #include #include #include @@ -36,7 +30,6 @@ #include #include #include -#include #include #include #include diff --git a/src/Geom2d/Geom2d_OffsetCurve.hxx b/src/Geom2d/Geom2d_OffsetCurve.hxx index 5bf41d7686..5c92a9a5aa 100644 --- a/src/Geom2d/Geom2d_OffsetCurve.hxx +++ b/src/Geom2d/Geom2d_OffsetCurve.hxx @@ -20,10 +20,8 @@ #include #include -#include #include #include -#include #include #include diff --git a/src/Geom2d/Geom2d_Parabola.cxx b/src/Geom2d/Geom2d_Parabola.cxx index 513ec27266..2e143a4e24 100644 --- a/src/Geom2d/Geom2d_Parabola.cxx +++ b/src/Geom2d/Geom2d_Parabola.cxx @@ -16,7 +16,6 @@ #include -#include #include #include #include diff --git a/src/Geom2d/Geom2d_Parabola.hxx b/src/Geom2d/Geom2d_Parabola.hxx index 8d5d99c477..9ac7188501 100644 --- a/src/Geom2d/Geom2d_Parabola.hxx +++ b/src/Geom2d/Geom2d_Parabola.hxx @@ -20,9 +20,7 @@ #include #include -#include #include -#include #include class gp_Parab2d; class gp_Ax2d; diff --git a/src/Geom2d/Geom2d_Transformation.cxx b/src/Geom2d/Geom2d_Transformation.cxx index c4499624f6..7ad08e4681 100644 --- a/src/Geom2d/Geom2d_Transformation.cxx +++ b/src/Geom2d/Geom2d_Transformation.cxx @@ -20,8 +20,6 @@ #include #include #include -#include -#include #include IMPLEMENT_STANDARD_RTTIEXT(Geom2d_Transformation,Standard_Transient) diff --git a/src/Geom2d/Geom2d_Transformation.hxx b/src/Geom2d/Geom2d_Transformation.hxx index 78634612d9..9cbf753da9 100644 --- a/src/Geom2d/Geom2d_Transformation.hxx +++ b/src/Geom2d/Geom2d_Transformation.hxx @@ -18,12 +18,10 @@ #define _Geom2d_Transformation_HeaderFile #include -#include #include #include #include -#include #include #include class gp_Pnt2d; diff --git a/src/Geom2d/Geom2d_TrimmedCurve.cxx b/src/Geom2d/Geom2d_TrimmedCurve.cxx index d049e3f7c4..ca5d521034 100644 --- a/src/Geom2d/Geom2d_TrimmedCurve.cxx +++ b/src/Geom2d/Geom2d_TrimmedCurve.cxx @@ -18,24 +18,17 @@ #include #include #include -#include #include -#include #include -#include -#include #include -#include #include #include -#include #include #include #include #include #include #include -#include #include #include diff --git a/src/Geom2d/Geom2d_TrimmedCurve.hxx b/src/Geom2d/Geom2d_TrimmedCurve.hxx index 28165b8a1f..561635afda 100644 --- a/src/Geom2d/Geom2d_TrimmedCurve.hxx +++ b/src/Geom2d/Geom2d_TrimmedCurve.hxx @@ -20,9 +20,7 @@ #include #include -#include #include -#include #include #include class Geom2d_Curve; diff --git a/src/Geom2d/Geom2d_Vector.cxx b/src/Geom2d/Geom2d_Vector.cxx index 4ee9d4b747..49fe676379 100644 --- a/src/Geom2d/Geom2d_Vector.cxx +++ b/src/Geom2d/Geom2d_Vector.cxx @@ -17,8 +17,6 @@ #include #include -#include -#include #include IMPLEMENT_STANDARD_RTTIEXT(Geom2d_Vector,Geom2d_Geometry) diff --git a/src/Geom2d/Geom2d_Vector.hxx b/src/Geom2d/Geom2d_Vector.hxx index 8df9b7709a..4359e70fa1 100644 --- a/src/Geom2d/Geom2d_Vector.hxx +++ b/src/Geom2d/Geom2d_Vector.hxx @@ -18,7 +18,6 @@ #define _Geom2d_Vector_HeaderFile #include -#include #include #include diff --git a/src/Geom2d/Geom2d_VectorWithMagnitude.cxx b/src/Geom2d/Geom2d_VectorWithMagnitude.cxx index 147cc66c5a..c8ef5777ac 100644 --- a/src/Geom2d/Geom2d_VectorWithMagnitude.cxx +++ b/src/Geom2d/Geom2d_VectorWithMagnitude.cxx @@ -21,7 +21,6 @@ #include #include #include -#include #include IMPLEMENT_STANDARD_RTTIEXT(Geom2d_VectorWithMagnitude,Geom2d_Vector) diff --git a/src/Geom2d/Geom2d_VectorWithMagnitude.hxx b/src/Geom2d/Geom2d_VectorWithMagnitude.hxx index 5b0b2dc6aa..0b380d9cd6 100644 --- a/src/Geom2d/Geom2d_VectorWithMagnitude.hxx +++ b/src/Geom2d/Geom2d_VectorWithMagnitude.hxx @@ -21,7 +21,6 @@ #include #include -#include class gp_Vec2d; class gp_Pnt2d; class gp_Trsf2d; diff --git a/src/Geom2dAPI/Geom2dAPI_ExtremaCurveCurve.cxx b/src/Geom2dAPI/Geom2dAPI_ExtremaCurveCurve.cxx index d33f9cdd58..683f2d4bd5 100644 --- a/src/Geom2dAPI/Geom2dAPI_ExtremaCurveCurve.cxx +++ b/src/Geom2dAPI/Geom2dAPI_ExtremaCurveCurve.cxx @@ -17,11 +17,8 @@ #include #include -#include -#include #include #include -#include #include #include diff --git a/src/Geom2dAPI/Geom2dAPI_ExtremaCurveCurve.hxx b/src/Geom2dAPI/Geom2dAPI_ExtremaCurveCurve.hxx index d583cce0ec..d1fb57e7cb 100644 --- a/src/Geom2dAPI/Geom2dAPI_ExtremaCurveCurve.hxx +++ b/src/Geom2dAPI/Geom2dAPI_ExtremaCurveCurve.hxx @@ -21,7 +21,6 @@ #include #include -#include #include #include #include diff --git a/src/Geom2dAPI/Geom2dAPI_InterCurveCurve.hxx b/src/Geom2dAPI/Geom2dAPI_InterCurveCurve.hxx index 02913838e7..e5ab9e572c 100644 --- a/src/Geom2dAPI/Geom2dAPI_InterCurveCurve.hxx +++ b/src/Geom2dAPI/Geom2dAPI_InterCurveCurve.hxx @@ -21,9 +21,7 @@ #include #include -#include #include -#include #include class Geom2d_Curve; class gp_Pnt2d; diff --git a/src/Geom2dAPI/Geom2dAPI_Interpolate.hxx b/src/Geom2dAPI/Geom2dAPI_Interpolate.hxx index fc9730d03e..f2f573be83 100644 --- a/src/Geom2dAPI/Geom2dAPI_Interpolate.hxx +++ b/src/Geom2dAPI/Geom2dAPI_Interpolate.hxx @@ -21,9 +21,7 @@ #include #include -#include #include -#include #include #include #include diff --git a/src/Geom2dAPI/Geom2dAPI_PointsToBSpline.cxx b/src/Geom2dAPI/Geom2dAPI_PointsToBSpline.cxx index eeec7014d7..6c3f7c90f2 100644 --- a/src/Geom2dAPI/Geom2dAPI_PointsToBSpline.cxx +++ b/src/Geom2dAPI/Geom2dAPI_PointsToBSpline.cxx @@ -16,7 +16,6 @@ #include -#include #include #include #include diff --git a/src/Geom2dAPI/Geom2dAPI_PointsToBSpline.hxx b/src/Geom2dAPI/Geom2dAPI_PointsToBSpline.hxx index 3a260c8bdf..1538278620 100644 --- a/src/Geom2dAPI/Geom2dAPI_PointsToBSpline.hxx +++ b/src/Geom2dAPI/Geom2dAPI_PointsToBSpline.hxx @@ -21,11 +21,9 @@ #include #include -#include #include #include #include -#include #include #include class Geom2d_BSplineCurve; diff --git a/src/Geom2dAPI/Geom2dAPI_ProjectPointOnCurve.cxx b/src/Geom2dAPI/Geom2dAPI_ProjectPointOnCurve.cxx index dcf2d9c0dd..1e9703b676 100644 --- a/src/Geom2dAPI/Geom2dAPI_ProjectPointOnCurve.cxx +++ b/src/Geom2dAPI/Geom2dAPI_ProjectPointOnCurve.cxx @@ -16,8 +16,6 @@ #include -#include -#include #include #include #include diff --git a/src/Geom2dAPI/Geom2dAPI_ProjectPointOnCurve.hxx b/src/Geom2dAPI/Geom2dAPI_ProjectPointOnCurve.hxx index 31672e2b9e..a3f00ad3fa 100644 --- a/src/Geom2dAPI/Geom2dAPI_ProjectPointOnCurve.hxx +++ b/src/Geom2dAPI/Geom2dAPI_ProjectPointOnCurve.hxx @@ -21,7 +21,6 @@ #include #include -#include #include #include #include diff --git a/src/Geom2dAdaptor/Geom2dAdaptor.cxx b/src/Geom2dAdaptor/Geom2dAdaptor.cxx index c206365c77..e53085cd50 100644 --- a/src/Geom2dAdaptor/Geom2dAdaptor.cxx +++ b/src/Geom2dAdaptor/Geom2dAdaptor.cxx @@ -27,11 +27,7 @@ #include #include #include -#include -#include #include -#include -#include //======================================================================= //function : MakeCurve diff --git a/src/Geom2dAdaptor/Geom2dAdaptor_Curve.cxx b/src/Geom2dAdaptor/Geom2dAdaptor_Curve.cxx index b3ce81771b..80d97ed1fb 100644 --- a/src/Geom2dAdaptor/Geom2dAdaptor_Curve.cxx +++ b/src/Geom2dAdaptor/Geom2dAdaptor_Curve.cxx @@ -37,10 +37,8 @@ #include #include #include -#include #include #include -#include #include #include #include @@ -49,16 +47,11 @@ #include #include #include -#include #include #include #include -#include -#include -#include #include #include -#include //#include static const Standard_Real PosTol = Precision::PConfusion() / 2; diff --git a/src/Geom2dAdaptor/Geom2dAdaptor_Curve.hxx b/src/Geom2dAdaptor/Geom2dAdaptor_Curve.hxx index 14ec6b5e9b..18753f24e1 100644 --- a/src/Geom2dAdaptor/Geom2dAdaptor_Curve.hxx +++ b/src/Geom2dAdaptor/Geom2dAdaptor_Curve.hxx @@ -24,7 +24,6 @@ #include #include #include -#include #include #include diff --git a/src/Geom2dConvert/Geom2dConvert.cxx b/src/Geom2dConvert/Geom2dConvert.cxx index e796882e15..dd3ba3da94 100644 --- a/src/Geom2dConvert/Geom2dConvert.cxx +++ b/src/Geom2dConvert/Geom2dConvert.cxx @@ -14,7 +14,6 @@ #include -#include #include #include #include @@ -40,7 +39,6 @@ #include #include #include -#include #include #include #include diff --git a/src/Geom2dConvert/Geom2dConvert_ApproxCurve.cxx b/src/Geom2dConvert/Geom2dConvert_ApproxCurve.cxx index 91c29f42c0..54831879a2 100644 --- a/src/Geom2dConvert/Geom2dConvert_ApproxCurve.cxx +++ b/src/Geom2dConvert/Geom2dConvert_ApproxCurve.cxx @@ -25,7 +25,6 @@ #include #include #include -#include #include #include diff --git a/src/Geom2dConvert/Geom2dConvert_BSplineCurveKnotSplitting.cxx b/src/Geom2dConvert/Geom2dConvert_BSplineCurveKnotSplitting.cxx index 45f390d3b3..319cfc7277 100644 --- a/src/Geom2dConvert/Geom2dConvert_BSplineCurveKnotSplitting.cxx +++ b/src/Geom2dConvert/Geom2dConvert_BSplineCurveKnotSplitting.cxx @@ -18,7 +18,6 @@ #include #include #include -#include #include typedef TColStd_Array1OfInteger Array1OfInteger; diff --git a/src/Geom2dConvert/Geom2dConvert_BSplineCurveToBezierCurve.cxx b/src/Geom2dConvert/Geom2dConvert_BSplineCurveToBezierCurve.cxx index 360582a96e..4c9a94e089 100644 --- a/src/Geom2dConvert/Geom2dConvert_BSplineCurveToBezierCurve.cxx +++ b/src/Geom2dConvert/Geom2dConvert_BSplineCurveToBezierCurve.cxx @@ -18,7 +18,6 @@ #include #include #include -#include #include #include #include diff --git a/src/Geom2dConvert/Geom2dConvert_BSplineCurveToBezierCurve.hxx b/src/Geom2dConvert/Geom2dConvert_BSplineCurveToBezierCurve.hxx index 456c336257..500f89e669 100644 --- a/src/Geom2dConvert/Geom2dConvert_BSplineCurveToBezierCurve.hxx +++ b/src/Geom2dConvert/Geom2dConvert_BSplineCurveToBezierCurve.hxx @@ -21,7 +21,6 @@ #include #include -#include #include #include #include diff --git a/src/Geom2dConvert/Geom2dConvert_CompCurveToBSplineCurve.hxx b/src/Geom2dConvert/Geom2dConvert_CompCurveToBSplineCurve.hxx index 6e6f7a8c66..39b3482b73 100644 --- a/src/Geom2dConvert/Geom2dConvert_CompCurveToBSplineCurve.hxx +++ b/src/Geom2dConvert/Geom2dConvert_CompCurveToBSplineCurve.hxx @@ -21,9 +21,7 @@ #include #include -#include #include -#include class Geom2d_BSplineCurve; class Geom2d_BoundedCurve; diff --git a/src/Geom2dEvaluator/Geom2dEvaluator.hxx b/src/Geom2dEvaluator/Geom2dEvaluator.hxx index 2aa1d6b18d..74163218be 100644 --- a/src/Geom2dEvaluator/Geom2dEvaluator.hxx +++ b/src/Geom2dEvaluator/Geom2dEvaluator.hxx @@ -19,8 +19,6 @@ #include #include -#include -#include class gp_Pnt2d; class gp_Vec2d; diff --git a/src/Geom2dEvaluator/Geom2dEvaluator_OffsetCurve.hxx b/src/Geom2dEvaluator/Geom2dEvaluator_OffsetCurve.hxx index 209255983a..065f5d4ca3 100644 --- a/src/Geom2dEvaluator/Geom2dEvaluator_OffsetCurve.hxx +++ b/src/Geom2dEvaluator/Geom2dEvaluator_OffsetCurve.hxx @@ -15,7 +15,6 @@ #ifndef _Geom2dEvaluator_OffsetCurve_HeaderFile #define _Geom2dEvaluator_OffsetCurve_HeaderFile -#include #include #include diff --git a/src/Geom2dGcc/Geom2dGcc.cxx b/src/Geom2dGcc/Geom2dGcc.cxx index 38151e7e9f..20b9181e83 100644 --- a/src/Geom2dGcc/Geom2dGcc.cxx +++ b/src/Geom2dGcc/Geom2dGcc.cxx @@ -14,7 +14,6 @@ #include -#include #include Geom2dGcc_QualifiedCurve diff --git a/src/Geom2dGcc/Geom2dGcc_Circ2d2TanOn.cxx b/src/Geom2dGcc/Geom2dGcc_Circ2d2TanOn.cxx index fe9e471da1..de5dc5f3a7 100644 --- a/src/Geom2dGcc/Geom2dGcc_Circ2d2TanOn.cxx +++ b/src/Geom2dGcc/Geom2dGcc_Circ2d2TanOn.cxx @@ -22,7 +22,6 @@ #include #include #include -#include #include #include #include diff --git a/src/Geom2dGcc/Geom2dGcc_Circ2d2TanOn.hxx b/src/Geom2dGcc/Geom2dGcc_Circ2d2TanOn.hxx index 0dd0847022..a002cf647b 100644 --- a/src/Geom2dGcc/Geom2dGcc_Circ2d2TanOn.hxx +++ b/src/Geom2dGcc/Geom2dGcc_Circ2d2TanOn.hxx @@ -21,14 +21,12 @@ #include #include -#include #include #include #include #include #include #include -#include #include class Geom2dGcc_QualifiedCurve; class Geom2dAdaptor_Curve; diff --git a/src/Geom2dGcc/Geom2dGcc_Circ2d2TanOnGeo.cxx b/src/Geom2dGcc/Geom2dGcc_Circ2d2TanOnGeo.cxx index 56637117fa..d42931436e 100644 --- a/src/Geom2dGcc/Geom2dGcc_Circ2d2TanOnGeo.cxx +++ b/src/Geom2dGcc/Geom2dGcc_Circ2d2TanOnGeo.cxx @@ -37,7 +37,6 @@ #include #include #include -#include #include #include #include diff --git a/src/Geom2dGcc/Geom2dGcc_Circ2d2TanOnGeo.hxx b/src/Geom2dGcc/Geom2dGcc_Circ2d2TanOnGeo.hxx index c137355797..49918e2cde 100644 --- a/src/Geom2dGcc/Geom2dGcc_Circ2d2TanOnGeo.hxx +++ b/src/Geom2dGcc/Geom2dGcc_Circ2d2TanOnGeo.hxx @@ -19,16 +19,13 @@ #include #include -#include -#include #include #include #include #include #include #include -#include #include class GccEnt_QualifiedCirc; class Geom2dAdaptor_Curve; diff --git a/src/Geom2dGcc/Geom2dGcc_Circ2d2TanOnIter.cxx b/src/Geom2dGcc/Geom2dGcc_Circ2d2TanOnIter.cxx index 3834572c8b..2b608c7575 100644 --- a/src/Geom2dGcc/Geom2dGcc_Circ2d2TanOnIter.cxx +++ b/src/Geom2dGcc/Geom2dGcc_Circ2d2TanOnIter.cxx @@ -28,7 +28,6 @@ #include #include #include -#include #include #include #include diff --git a/src/Geom2dGcc/Geom2dGcc_Circ2d2TanOnIter.hxx b/src/Geom2dGcc/Geom2dGcc_Circ2d2TanOnIter.hxx index d68f91755f..d4fef7800a 100644 --- a/src/Geom2dGcc/Geom2dGcc_Circ2d2TanOnIter.hxx +++ b/src/Geom2dGcc/Geom2dGcc_Circ2d2TanOnIter.hxx @@ -19,13 +19,10 @@ #include #include -#include -#include #include #include #include -#include class GccEnt_QualifiedCirc; class Geom2dGcc_QCurve; class gp_Lin2d; diff --git a/src/Geom2dGcc/Geom2dGcc_Circ2d2TanRad.cxx b/src/Geom2dGcc/Geom2dGcc_Circ2d2TanRad.cxx index 243d696a07..55336cd687 100644 --- a/src/Geom2dGcc/Geom2dGcc_Circ2d2TanRad.cxx +++ b/src/Geom2dGcc/Geom2dGcc_Circ2d2TanRad.cxx @@ -22,7 +22,6 @@ #include #include #include -#include #include #include #include diff --git a/src/Geom2dGcc/Geom2dGcc_Circ2d2TanRad.hxx b/src/Geom2dGcc/Geom2dGcc_Circ2d2TanRad.hxx index bec9d8da4c..be67bd2893 100644 --- a/src/Geom2dGcc/Geom2dGcc_Circ2d2TanRad.hxx +++ b/src/Geom2dGcc/Geom2dGcc_Circ2d2TanRad.hxx @@ -21,14 +21,12 @@ #include #include -#include #include #include #include #include #include #include -#include #include class Geom2dGcc_QualifiedCurve; class Geom2d_Point; diff --git a/src/Geom2dGcc/Geom2dGcc_Circ2d2TanRadGeo.cxx b/src/Geom2dGcc/Geom2dGcc_Circ2d2TanRadGeo.cxx index a4f665a139..379a9d767d 100644 --- a/src/Geom2dGcc/Geom2dGcc_Circ2d2TanRadGeo.cxx +++ b/src/Geom2dGcc/Geom2dGcc_Circ2d2TanRadGeo.cxx @@ -18,7 +18,6 @@ #include #include #include -#include #include #include #include diff --git a/src/Geom2dGcc/Geom2dGcc_Circ2d2TanRadGeo.hxx b/src/Geom2dGcc/Geom2dGcc_Circ2d2TanRadGeo.hxx index b1c74894b1..717543ea1b 100644 --- a/src/Geom2dGcc/Geom2dGcc_Circ2d2TanRadGeo.hxx +++ b/src/Geom2dGcc/Geom2dGcc_Circ2d2TanRadGeo.hxx @@ -19,16 +19,13 @@ #include #include -#include -#include #include #include #include #include #include #include -#include #include class GccEnt_QualifiedCirc; class Geom2dGcc_QCurve; diff --git a/src/Geom2dGcc/Geom2dGcc_Circ2d3Tan.cxx b/src/Geom2dGcc/Geom2dGcc_Circ2d3Tan.cxx index 7301427491..666a977b0c 100644 --- a/src/Geom2dGcc/Geom2dGcc_Circ2d3Tan.cxx +++ b/src/Geom2dGcc/Geom2dGcc_Circ2d3Tan.cxx @@ -21,7 +21,6 @@ #include #include #include -#include #include #include #include diff --git a/src/Geom2dGcc/Geom2dGcc_Circ2d3Tan.hxx b/src/Geom2dGcc/Geom2dGcc_Circ2d3Tan.hxx index 9f43634de9..afd1e639c3 100644 --- a/src/Geom2dGcc/Geom2dGcc_Circ2d3Tan.hxx +++ b/src/Geom2dGcc/Geom2dGcc_Circ2d3Tan.hxx @@ -22,8 +22,6 @@ #include #include -#include -#include #include #include #include diff --git a/src/Geom2dGcc/Geom2dGcc_Circ2d3TanIter.cxx b/src/Geom2dGcc/Geom2dGcc_Circ2d3TanIter.cxx index 38aca83e11..e6a575da70 100644 --- a/src/Geom2dGcc/Geom2dGcc_Circ2d3TanIter.cxx +++ b/src/Geom2dGcc/Geom2dGcc_Circ2d3TanIter.cxx @@ -39,7 +39,6 @@ #include #include #include -#include #include Geom2dGcc_Circ2d3TanIter:: diff --git a/src/Geom2dGcc/Geom2dGcc_Circ2d3TanIter.hxx b/src/Geom2dGcc/Geom2dGcc_Circ2d3TanIter.hxx index 6ebb8caef8..6f5b51b6eb 100644 --- a/src/Geom2dGcc/Geom2dGcc_Circ2d3TanIter.hxx +++ b/src/Geom2dGcc/Geom2dGcc_Circ2d3TanIter.hxx @@ -19,13 +19,10 @@ #include #include -#include -#include #include #include #include -#include class GccEnt_QualifiedCirc; class Geom2dGcc_QCurve; class GccEnt_QualifiedLin; diff --git a/src/Geom2dGcc/Geom2dGcc_Circ2dTanCen.cxx b/src/Geom2dGcc/Geom2dGcc_Circ2dTanCen.cxx index df9c9383db..5995429e38 100644 --- a/src/Geom2dGcc/Geom2dGcc_Circ2dTanCen.cxx +++ b/src/Geom2dGcc/Geom2dGcc_Circ2dTanCen.cxx @@ -18,11 +18,9 @@ #include #include #include -#include #include #include #include -#include #include #include #include diff --git a/src/Geom2dGcc/Geom2dGcc_Circ2dTanCen.hxx b/src/Geom2dGcc/Geom2dGcc_Circ2dTanCen.hxx index 691ed0877f..a08a1c9fbe 100644 --- a/src/Geom2dGcc/Geom2dGcc_Circ2dTanCen.hxx +++ b/src/Geom2dGcc/Geom2dGcc_Circ2dTanCen.hxx @@ -21,14 +21,12 @@ #include #include -#include #include #include #include #include #include #include -#include #include class Geom2dGcc_QualifiedCurve; class Geom2d_Point; diff --git a/src/Geom2dGcc/Geom2dGcc_Circ2dTanCenGeo.hxx b/src/Geom2dGcc/Geom2dGcc_Circ2dTanCenGeo.hxx index 6da68a6017..9c3913368b 100644 --- a/src/Geom2dGcc/Geom2dGcc_Circ2dTanCenGeo.hxx +++ b/src/Geom2dGcc/Geom2dGcc_Circ2dTanCenGeo.hxx @@ -19,15 +19,12 @@ #include #include -#include -#include #include #include #include #include #include -#include #include class Geom2dGcc_QCurve; class gp_Pnt2d; diff --git a/src/Geom2dGcc/Geom2dGcc_Circ2dTanOnRad.cxx b/src/Geom2dGcc/Geom2dGcc_Circ2dTanOnRad.cxx index 53f2844da8..a95e2bf171 100644 --- a/src/Geom2dGcc/Geom2dGcc_Circ2dTanOnRad.cxx +++ b/src/Geom2dGcc/Geom2dGcc_Circ2dTanOnRad.cxx @@ -22,7 +22,6 @@ #include #include #include -#include #include #include #include diff --git a/src/Geom2dGcc/Geom2dGcc_Circ2dTanOnRad.hxx b/src/Geom2dGcc/Geom2dGcc_Circ2dTanOnRad.hxx index 940c25090e..99c9786e60 100644 --- a/src/Geom2dGcc/Geom2dGcc_Circ2dTanOnRad.hxx +++ b/src/Geom2dGcc/Geom2dGcc_Circ2dTanOnRad.hxx @@ -21,14 +21,12 @@ #include #include -#include #include #include #include #include #include #include -#include #include class Geom2dGcc_QualifiedCurve; class Geom2dAdaptor_Curve; diff --git a/src/Geom2dGcc/Geom2dGcc_Circ2dTanOnRadGeo.cxx b/src/Geom2dGcc/Geom2dGcc_Circ2dTanOnRadGeo.cxx index fdfb1845d4..cc18fc187d 100644 --- a/src/Geom2dGcc/Geom2dGcc_Circ2dTanOnRadGeo.cxx +++ b/src/Geom2dGcc/Geom2dGcc_Circ2dTanOnRadGeo.cxx @@ -26,8 +26,6 @@ #include #include #include -#include -#include #include #include #include @@ -38,7 +36,6 @@ #include #include #include -#include #include #include #include diff --git a/src/Geom2dGcc/Geom2dGcc_Circ2dTanOnRadGeo.hxx b/src/Geom2dGcc/Geom2dGcc_Circ2dTanOnRadGeo.hxx index da11c57749..30deec4989 100644 --- a/src/Geom2dGcc/Geom2dGcc_Circ2dTanOnRadGeo.hxx +++ b/src/Geom2dGcc/Geom2dGcc_Circ2dTanOnRadGeo.hxx @@ -19,16 +19,13 @@ #include #include -#include -#include #include #include #include #include #include #include -#include #include class Geom2dGcc_QCurve; class gp_Lin2d; diff --git a/src/Geom2dGcc/Geom2dGcc_CurveTool.cxx b/src/Geom2dGcc/Geom2dGcc_CurveTool.cxx index d2b5dc5e09..91a391edda 100644 --- a/src/Geom2dGcc/Geom2dGcc_CurveTool.cxx +++ b/src/Geom2dGcc/Geom2dGcc_CurveTool.cxx @@ -13,13 +13,9 @@ // commercial license or contractual agreement. -#include -#include #include #include -#include #include -#include #include //Template a respecter diff --git a/src/Geom2dGcc/Geom2dGcc_CurveTool.hxx b/src/Geom2dGcc/Geom2dGcc_CurveTool.hxx index de3f7a7158..ac3859a978 100644 --- a/src/Geom2dGcc/Geom2dGcc_CurveTool.hxx +++ b/src/Geom2dGcc/Geom2dGcc_CurveTool.hxx @@ -19,9 +19,7 @@ #include #include -#include -#include #include class Geom2dAdaptor_Curve; class gp_Pnt2d; diff --git a/src/Geom2dGcc/Geom2dGcc_FunctionTanCirCu.cxx b/src/Geom2dGcc/Geom2dGcc_FunctionTanCirCu.cxx index b39698ed21..48ff699727 100644 --- a/src/Geom2dGcc/Geom2dGcc_FunctionTanCirCu.cxx +++ b/src/Geom2dGcc/Geom2dGcc_FunctionTanCirCu.cxx @@ -15,13 +15,10 @@ // commercial license or contractual agreement. -#include #include #include #include -#include #include -#include #include //========================================================================= diff --git a/src/Geom2dGcc/Geom2dGcc_FunctionTanCirCu.hxx b/src/Geom2dGcc/Geom2dGcc_FunctionTanCirCu.hxx index 6bc9206af0..aee1b640a7 100644 --- a/src/Geom2dGcc/Geom2dGcc_FunctionTanCirCu.hxx +++ b/src/Geom2dGcc/Geom2dGcc_FunctionTanCirCu.hxx @@ -23,9 +23,7 @@ #include #include -#include #include -#include //! This abstract class describes a Function of 1 Variable diff --git a/src/Geom2dGcc/Geom2dGcc_FunctionTanCuCu.cxx b/src/Geom2dGcc/Geom2dGcc_FunctionTanCuCu.cxx index 11a1b0428f..751574095c 100644 --- a/src/Geom2dGcc/Geom2dGcc_FunctionTanCuCu.cxx +++ b/src/Geom2dGcc/Geom2dGcc_FunctionTanCuCu.cxx @@ -16,14 +16,12 @@ #include -#include #include #include #include #include #include #include -#include void Geom2dGcc_FunctionTanCuCu:: InitDerivative(const math_Vector& X, diff --git a/src/Geom2dGcc/Geom2dGcc_FunctionTanCuCu.hxx b/src/Geom2dGcc/Geom2dGcc_FunctionTanCuCu.hxx index 99334ed89d..cf78b6efea 100644 --- a/src/Geom2dGcc/Geom2dGcc_FunctionTanCuCu.hxx +++ b/src/Geom2dGcc/Geom2dGcc_FunctionTanCuCu.hxx @@ -19,15 +19,12 @@ #include #include -#include #include #include #include #include #include -#include -#include class gp_Pnt2d; class gp_Vec2d; class math_Matrix; diff --git a/src/Geom2dGcc/Geom2dGcc_FunctionTanCuCuCu.cxx b/src/Geom2dGcc/Geom2dGcc_FunctionTanCuCuCu.cxx index d517da0a9a..2f47c8ad9d 100644 --- a/src/Geom2dGcc/Geom2dGcc_FunctionTanCuCuCu.cxx +++ b/src/Geom2dGcc/Geom2dGcc_FunctionTanCuCuCu.cxx @@ -16,7 +16,6 @@ #include -#include #include #include #include diff --git a/src/Geom2dGcc/Geom2dGcc_FunctionTanCuCuCu.hxx b/src/Geom2dGcc/Geom2dGcc_FunctionTanCuCuCu.hxx index a643f76ac9..e592a4af0b 100644 --- a/src/Geom2dGcc/Geom2dGcc_FunctionTanCuCuCu.hxx +++ b/src/Geom2dGcc/Geom2dGcc_FunctionTanCuCuCu.hxx @@ -19,7 +19,6 @@ #include #include -#include #include #include @@ -27,8 +26,6 @@ #include #include #include -#include -#include class gp_Pnt2d; class gp_Vec2d; class math_Matrix; diff --git a/src/Geom2dGcc/Geom2dGcc_FunctionTanCuCuOnCu.cxx b/src/Geom2dGcc/Geom2dGcc_FunctionTanCuCuOnCu.cxx index ab40ca508e..5559051f77 100644 --- a/src/Geom2dGcc/Geom2dGcc_FunctionTanCuCuOnCu.cxx +++ b/src/Geom2dGcc/Geom2dGcc_FunctionTanCuCuOnCu.cxx @@ -16,7 +16,6 @@ #include -#include #include #include #include diff --git a/src/Geom2dGcc/Geom2dGcc_FunctionTanCuCuOnCu.hxx b/src/Geom2dGcc/Geom2dGcc_FunctionTanCuCuOnCu.hxx index 4ce527c7fd..0084933128 100644 --- a/src/Geom2dGcc/Geom2dGcc_FunctionTanCuCuOnCu.hxx +++ b/src/Geom2dGcc/Geom2dGcc_FunctionTanCuCuOnCu.hxx @@ -19,18 +19,14 @@ #include #include -#include #include #include #include #include -#include #include #include #include -#include -#include class gp_Vec2d; class math_Matrix; diff --git a/src/Geom2dGcc/Geom2dGcc_FunctionTanCuPnt.cxx b/src/Geom2dGcc/Geom2dGcc_FunctionTanCuPnt.cxx index 2d51bb7e5b..7e85bcedbb 100644 --- a/src/Geom2dGcc/Geom2dGcc_FunctionTanCuPnt.cxx +++ b/src/Geom2dGcc/Geom2dGcc_FunctionTanCuPnt.cxx @@ -15,12 +15,9 @@ // commercial license or contractual agreement. -#include #include #include -#include #include -#include #include //========================================================================= diff --git a/src/Geom2dGcc/Geom2dGcc_FunctionTanCuPnt.hxx b/src/Geom2dGcc/Geom2dGcc_FunctionTanCuPnt.hxx index 48a30e77ef..58242b34ba 100644 --- a/src/Geom2dGcc/Geom2dGcc_FunctionTanCuPnt.hxx +++ b/src/Geom2dGcc/Geom2dGcc_FunctionTanCuPnt.hxx @@ -24,8 +24,6 @@ #include #include #include -#include -#include //! This abstract class describes a Function of 1 Variable diff --git a/src/Geom2dGcc/Geom2dGcc_FunctionTanObl.cxx b/src/Geom2dGcc/Geom2dGcc_FunctionTanObl.cxx index b84c53d76c..b23d1bdc64 100644 --- a/src/Geom2dGcc/Geom2dGcc_FunctionTanObl.cxx +++ b/src/Geom2dGcc/Geom2dGcc_FunctionTanObl.cxx @@ -15,7 +15,6 @@ // commercial license or contractual agreement. -#include #include #include #include diff --git a/src/Geom2dGcc/Geom2dGcc_FunctionTanObl.hxx b/src/Geom2dGcc/Geom2dGcc_FunctionTanObl.hxx index 0b232b713a..41e1f093b9 100644 --- a/src/Geom2dGcc/Geom2dGcc_FunctionTanObl.hxx +++ b/src/Geom2dGcc/Geom2dGcc_FunctionTanObl.hxx @@ -24,8 +24,6 @@ #include #include #include -#include -#include //! This class describe a function of a single variable. diff --git a/src/Geom2dGcc/Geom2dGcc_IsParallel.hxx b/src/Geom2dGcc/Geom2dGcc_IsParallel.hxx index 10ade736a8..333cd8c66e 100644 --- a/src/Geom2dGcc/Geom2dGcc_IsParallel.hxx +++ b/src/Geom2dGcc/Geom2dGcc_IsParallel.hxx @@ -18,7 +18,6 @@ #define _Geom2dGcc_IsParallel_HeaderFile #include -#include #include #include diff --git a/src/Geom2dGcc/Geom2dGcc_Lin2d2Tan.cxx b/src/Geom2dGcc/Geom2dGcc_Lin2d2Tan.cxx index 3720101784..14ad20d020 100644 --- a/src/Geom2dGcc/Geom2dGcc_Lin2d2Tan.cxx +++ b/src/Geom2dGcc/Geom2dGcc_Lin2d2Tan.cxx @@ -19,7 +19,6 @@ #include #include #include -#include #include #include #include @@ -27,7 +26,6 @@ #include #include #include -#include #include #include diff --git a/src/Geom2dGcc/Geom2dGcc_Lin2d2Tan.hxx b/src/Geom2dGcc/Geom2dGcc_Lin2d2Tan.hxx index df623aea3c..30476ebc59 100644 --- a/src/Geom2dGcc/Geom2dGcc_Lin2d2Tan.hxx +++ b/src/Geom2dGcc/Geom2dGcc_Lin2d2Tan.hxx @@ -19,15 +19,12 @@ #include #include -#include -#include #include #include #include #include #include -#include #include class Geom2dGcc_QualifiedCurve; class gp_Pnt2d; diff --git a/src/Geom2dGcc/Geom2dGcc_Lin2d2TanIter.cxx b/src/Geom2dGcc/Geom2dGcc_Lin2d2TanIter.cxx index 082fcf3fa8..980c01b718 100644 --- a/src/Geom2dGcc/Geom2dGcc_Lin2d2TanIter.cxx +++ b/src/Geom2dGcc/Geom2dGcc_Lin2d2TanIter.cxx @@ -34,7 +34,6 @@ #include #include #include -#include #include #include diff --git a/src/Geom2dGcc/Geom2dGcc_Lin2d2TanIter.hxx b/src/Geom2dGcc/Geom2dGcc_Lin2d2TanIter.hxx index 066f4bd82c..f4ba606d65 100644 --- a/src/Geom2dGcc/Geom2dGcc_Lin2d2TanIter.hxx +++ b/src/Geom2dGcc/Geom2dGcc_Lin2d2TanIter.hxx @@ -19,13 +19,10 @@ #include #include -#include -#include #include #include #include -#include class Geom2dGcc_QCurve; class GccEnt_QualifiedCirc; diff --git a/src/Geom2dGcc/Geom2dGcc_Lin2dTanObl.cxx b/src/Geom2dGcc/Geom2dGcc_Lin2dTanObl.cxx index aab019cf02..560614e6c7 100644 --- a/src/Geom2dGcc/Geom2dGcc_Lin2dTanObl.cxx +++ b/src/Geom2dGcc/Geom2dGcc_Lin2dTanObl.cxx @@ -19,16 +19,13 @@ #include #include #include -#include #include -#include #include #include #include #include #include #include -#include #include #include diff --git a/src/Geom2dGcc/Geom2dGcc_Lin2dTanObl.hxx b/src/Geom2dGcc/Geom2dGcc_Lin2dTanObl.hxx index b970733cd1..789a88297e 100644 --- a/src/Geom2dGcc/Geom2dGcc_Lin2dTanObl.hxx +++ b/src/Geom2dGcc/Geom2dGcc_Lin2dTanObl.hxx @@ -19,15 +19,12 @@ #include #include -#include -#include #include #include #include #include #include -#include #include class Geom2dGcc_QualifiedCurve; class gp_Lin2d; diff --git a/src/Geom2dGcc/Geom2dGcc_Lin2dTanOblIter.cxx b/src/Geom2dGcc/Geom2dGcc_Lin2dTanOblIter.cxx index 8799b6a07f..802c7db4db 100644 --- a/src/Geom2dGcc/Geom2dGcc_Lin2dTanOblIter.cxx +++ b/src/Geom2dGcc/Geom2dGcc_Lin2dTanOblIter.cxx @@ -24,7 +24,6 @@ #include #include #include -#include #include #include #include diff --git a/src/Geom2dGcc/Geom2dGcc_Lin2dTanOblIter.hxx b/src/Geom2dGcc/Geom2dGcc_Lin2dTanOblIter.hxx index 0f05b663b8..fc698baa9a 100644 --- a/src/Geom2dGcc/Geom2dGcc_Lin2dTanOblIter.hxx +++ b/src/Geom2dGcc/Geom2dGcc_Lin2dTanOblIter.hxx @@ -19,13 +19,10 @@ #include #include -#include -#include #include #include #include -#include class Geom2dGcc_QCurve; diff --git a/src/Geom2dGcc/Geom2dGcc_QCurve.cxx b/src/Geom2dGcc/Geom2dGcc_QCurve.cxx index 6e09cc5b2b..b760d1f80d 100644 --- a/src/Geom2dGcc/Geom2dGcc_QCurve.cxx +++ b/src/Geom2dGcc/Geom2dGcc_QCurve.cxx @@ -13,7 +13,6 @@ // commercial license or contractual agreement. -#include #include //#include diff --git a/src/Geom2dGcc/Geom2dGcc_QualifiedCurve.cxx b/src/Geom2dGcc/Geom2dGcc_QualifiedCurve.cxx index 5392507352..383a63d0f9 100644 --- a/src/Geom2dGcc/Geom2dGcc_QualifiedCurve.cxx +++ b/src/Geom2dGcc/Geom2dGcc_QualifiedCurve.cxx @@ -13,7 +13,6 @@ // commercial license or contractual agreement. -#include #include Geom2dGcc_QualifiedCurve:: diff --git a/src/Geom2dHatch/Geom2dHatch_Classifier.hxx b/src/Geom2dHatch/Geom2dHatch_Classifier.hxx index 025c184775..13fee08517 100644 --- a/src/Geom2dHatch/Geom2dHatch_Classifier.hxx +++ b/src/Geom2dHatch/Geom2dHatch_Classifier.hxx @@ -19,13 +19,10 @@ #include #include -#include #include #include -#include #include -#include #include class Standard_DomainError; class Geom2dHatch_Elements; diff --git a/src/Geom2dHatch/Geom2dHatch_Elements.cxx b/src/Geom2dHatch/Geom2dHatch_Elements.cxx index 37fc2d0634..5b4b63235d 100644 --- a/src/Geom2dHatch/Geom2dHatch_Elements.cxx +++ b/src/Geom2dHatch/Geom2dHatch_Elements.cxx @@ -16,17 +16,10 @@ // Modified by skv - Fri Jul 14 17:03:47 2006 OCC12627 -#include -#include #include -#include #include #include #include -#include -#include -#include -#include #include #include diff --git a/src/Geom2dHatch/Geom2dHatch_Elements.hxx b/src/Geom2dHatch/Geom2dHatch_Elements.hxx index 38253f4316..01271cddcf 100644 --- a/src/Geom2dHatch/Geom2dHatch_Elements.hxx +++ b/src/Geom2dHatch/Geom2dHatch_Elements.hxx @@ -23,9 +23,7 @@ #include #include -#include #include -#include #include class Geom2dHatch_Element; class gp_Pnt2d; diff --git a/src/Geom2dHatch/Geom2dHatch_FClass2dOfClassifier.hxx b/src/Geom2dHatch/Geom2dHatch_FClass2dOfClassifier.hxx index f4e25ee368..acefb8d2f3 100644 --- a/src/Geom2dHatch/Geom2dHatch_FClass2dOfClassifier.hxx +++ b/src/Geom2dHatch/Geom2dHatch_FClass2dOfClassifier.hxx @@ -19,11 +19,8 @@ #include #include -#include -#include #include -#include #include #include #include diff --git a/src/Geom2dHatch/Geom2dHatch_Hatcher.cxx b/src/Geom2dHatch/Geom2dHatch_Hatcher.cxx index 8e5c0401e4..0f84262502 100644 --- a/src/Geom2dHatch/Geom2dHatch_Hatcher.cxx +++ b/src/Geom2dHatch/Geom2dHatch_Hatcher.cxx @@ -22,15 +22,12 @@ #include #include #include -#include #include #include #include #include #include #include -#include -#include #include #include #include diff --git a/src/Geom2dHatch/Geom2dHatch_Hatching.cxx b/src/Geom2dHatch/Geom2dHatch_Hatching.cxx index 39b5d496ae..b24291c999 100644 --- a/src/Geom2dHatch/Geom2dHatch_Hatching.cxx +++ b/src/Geom2dHatch/Geom2dHatch_Hatching.cxx @@ -15,13 +15,11 @@ // commercial license or contractual agreement. -#include #include #include #include #include #include -#include #define RAISE_IF_NOSUCHOBJECT 0 diff --git a/src/Geom2dHatch/Geom2dHatch_Hatching.hxx b/src/Geom2dHatch/Geom2dHatch_Hatching.hxx index 307657c513..b0495c0670 100644 --- a/src/Geom2dHatch/Geom2dHatch_Hatching.hxx +++ b/src/Geom2dHatch/Geom2dHatch_Hatching.hxx @@ -26,8 +26,6 @@ #include #include #include -#include -#include class gp_Pnt2d; diff --git a/src/Geom2dHatch/Geom2dHatch_Intersector.cxx b/src/Geom2dHatch/Geom2dHatch_Intersector.cxx index 13622c0770..3719ed8c1c 100644 --- a/src/Geom2dHatch/Geom2dHatch_Intersector.cxx +++ b/src/Geom2dHatch/Geom2dHatch_Intersector.cxx @@ -17,7 +17,6 @@ #include #include -#include #include #include #include diff --git a/src/Geom2dHatch/Geom2dHatch_Intersector.hxx b/src/Geom2dHatch/Geom2dHatch_Intersector.hxx index cf3180fd62..9c857f4c57 100644 --- a/src/Geom2dHatch/Geom2dHatch_Intersector.hxx +++ b/src/Geom2dHatch/Geom2dHatch_Intersector.hxx @@ -19,9 +19,7 @@ #include #include -#include -#include #include class Geom2dAdaptor_Curve; class gp_Lin2d; diff --git a/src/Geom2dHatch/Geom2dHatch_MapOfElements.hxx b/src/Geom2dHatch/Geom2dHatch_MapOfElements.hxx index 029b631b81..8d9911077c 100644 --- a/src/Geom2dHatch/Geom2dHatch_MapOfElements.hxx +++ b/src/Geom2dHatch/Geom2dHatch_MapOfElements.hxx @@ -17,7 +17,6 @@ #ifndef Geom2dHatch_MapOfElements_HeaderFile #define Geom2dHatch_MapOfElements_HeaderFile -#include #include #include #include diff --git a/src/Geom2dInt/Geom2dInt_ExactIntersectionPointOfTheIntPCurvePCurveOfGInter.hxx b/src/Geom2dInt/Geom2dInt_ExactIntersectionPointOfTheIntPCurvePCurveOfGInter.hxx index 877727c999..b640668d39 100644 --- a/src/Geom2dInt/Geom2dInt_ExactIntersectionPointOfTheIntPCurvePCurveOfGInter.hxx +++ b/src/Geom2dInt/Geom2dInt_ExactIntersectionPointOfTheIntPCurvePCurveOfGInter.hxx @@ -22,8 +22,6 @@ #include #include -#include -#include #include #include class Adaptor2d_Curve2d; diff --git a/src/Geom2dInt/Geom2dInt_GInter.hxx b/src/Geom2dInt/Geom2dInt_GInter.hxx index 5d0babdc03..8acfd124a8 100644 --- a/src/Geom2dInt/Geom2dInt_GInter.hxx +++ b/src/Geom2dInt/Geom2dInt_GInter.hxx @@ -19,14 +19,11 @@ #include #include -#include -#include #include #include #include #include -#include #include #include class Standard_ConstructionError; diff --git a/src/Geom2dInt/Geom2dInt_Geom2dCurveTool.cxx b/src/Geom2dInt/Geom2dInt_Geom2dCurveTool.cxx index d9c7adec21..00005128b2 100644 --- a/src/Geom2dInt/Geom2dInt_Geom2dCurveTool.cxx +++ b/src/Geom2dInt/Geom2dInt_Geom2dCurveTool.cxx @@ -15,13 +15,9 @@ // commercial license or contractual agreement. -#include #include -#include #include #include -#include -#include #include //============================================================ diff --git a/src/Geom2dInt/Geom2dInt_Geom2dCurveTool.hxx b/src/Geom2dInt/Geom2dInt_Geom2dCurveTool.hxx index e445ff4696..884f19b825 100644 --- a/src/Geom2dInt/Geom2dInt_Geom2dCurveTool.hxx +++ b/src/Geom2dInt/Geom2dInt_Geom2dCurveTool.hxx @@ -19,16 +19,13 @@ #include #include -#include #include -#include #include #include #include #include #include -#include #include #include #include diff --git a/src/Geom2dInt/Geom2dInt_IntConicCurveOfGInter.hxx b/src/Geom2dInt/Geom2dInt_IntConicCurveOfGInter.hxx index a4caae5b8e..b784f6eb18 100644 --- a/src/Geom2dInt/Geom2dInt_IntConicCurveOfGInter.hxx +++ b/src/Geom2dInt/Geom2dInt_IntConicCurveOfGInter.hxx @@ -19,13 +19,10 @@ #include #include -#include -#include #include #include #include -#include class Standard_ConstructionError; class IntCurve_IConicTool; class Adaptor2d_Curve2d; diff --git a/src/Geom2dInt/Geom2dInt_MyImpParToolOfTheIntersectorOfTheIntConicCurveOfGInter.hxx b/src/Geom2dInt/Geom2dInt_MyImpParToolOfTheIntersectorOfTheIntConicCurveOfGInter.hxx index 25cf921a80..764a9ef18f 100644 --- a/src/Geom2dInt/Geom2dInt_MyImpParToolOfTheIntersectorOfTheIntConicCurveOfGInter.hxx +++ b/src/Geom2dInt/Geom2dInt_MyImpParToolOfTheIntersectorOfTheIntConicCurveOfGInter.hxx @@ -21,11 +21,9 @@ #include #include -#include #include #include #include -#include class IntCurve_IConicTool; class Adaptor2d_Curve2d; class Geom2dInt_Geom2dCurveTool; diff --git a/src/Geom2dInt/Geom2dInt_PCLocFOfTheLocateExtPCOfTheProjPCurOfGInter.hxx b/src/Geom2dInt/Geom2dInt_PCLocFOfTheLocateExtPCOfTheProjPCurOfGInter.hxx index 5cb5537326..5927bb0513 100644 --- a/src/Geom2dInt/Geom2dInt_PCLocFOfTheLocateExtPCOfTheProjPCurOfGInter.hxx +++ b/src/Geom2dInt/Geom2dInt_PCLocFOfTheLocateExtPCOfTheProjPCurOfGInter.hxx @@ -22,13 +22,10 @@ #include #include -#include -#include #include #include #include #include -#include #include class Standard_OutOfRange; class Standard_TypeMismatch; diff --git a/src/Geom2dInt/Geom2dInt_TheCurveLocatorOfTheProjPCurOfGInter.hxx b/src/Geom2dInt/Geom2dInt_TheCurveLocatorOfTheProjPCurOfGInter.hxx index a479f41a92..d6c0658d5a 100644 --- a/src/Geom2dInt/Geom2dInt_TheCurveLocatorOfTheProjPCurOfGInter.hxx +++ b/src/Geom2dInt/Geom2dInt_TheCurveLocatorOfTheProjPCurOfGInter.hxx @@ -21,7 +21,6 @@ #include #include -#include #include class Adaptor2d_Curve2d; class Geom2dInt_Geom2dCurveTool; diff --git a/src/Geom2dInt/Geom2dInt_TheDistBetweenPCurvesOfTheIntPCurvePCurveOfGInter.hxx b/src/Geom2dInt/Geom2dInt_TheDistBetweenPCurvesOfTheIntPCurvePCurveOfGInter.hxx index 25721da15a..263ac8315f 100644 --- a/src/Geom2dInt/Geom2dInt_TheDistBetweenPCurvesOfTheIntPCurvePCurveOfGInter.hxx +++ b/src/Geom2dInt/Geom2dInt_TheDistBetweenPCurvesOfTheIntPCurvePCurveOfGInter.hxx @@ -21,9 +21,7 @@ #include #include -#include #include -#include #include #include class Adaptor2d_Curve2d; diff --git a/src/Geom2dInt/Geom2dInt_TheIntConicCurveOfGInter.hxx b/src/Geom2dInt/Geom2dInt_TheIntConicCurveOfGInter.hxx index 544320b13d..406c096d19 100644 --- a/src/Geom2dInt/Geom2dInt_TheIntConicCurveOfGInter.hxx +++ b/src/Geom2dInt/Geom2dInt_TheIntConicCurveOfGInter.hxx @@ -19,10 +19,8 @@ #include #include -#include #include -#include class IntCurve_IConicTool; class Adaptor2d_Curve2d; class Geom2dInt_Geom2dCurveTool; diff --git a/src/Geom2dInt/Geom2dInt_TheIntPCurvePCurveOfGInter.hxx b/src/Geom2dInt/Geom2dInt_TheIntPCurvePCurveOfGInter.hxx index 7f587e858e..cb67428da8 100644 --- a/src/Geom2dInt/Geom2dInt_TheIntPCurvePCurveOfGInter.hxx +++ b/src/Geom2dInt/Geom2dInt_TheIntPCurvePCurveOfGInter.hxx @@ -19,13 +19,10 @@ #include #include -#include #include #include -#include #include -#include class Adaptor2d_Curve2d; class Geom2dInt_Geom2dCurveTool; class Geom2dInt_TheProjPCurOfGInter; diff --git a/src/Geom2dInt/Geom2dInt_TheIntersectorOfTheIntConicCurveOfGInter.hxx b/src/Geom2dInt/Geom2dInt_TheIntersectorOfTheIntConicCurveOfGInter.hxx index 7c112b3b0e..9f526cfdbc 100644 --- a/src/Geom2dInt/Geom2dInt_TheIntersectorOfTheIntConicCurveOfGInter.hxx +++ b/src/Geom2dInt/Geom2dInt_TheIntersectorOfTheIntConicCurveOfGInter.hxx @@ -19,11 +19,8 @@ #include #include -#include #include -#include -#include #include class Standard_ConstructionError; class IntCurve_IConicTool; diff --git a/src/Geom2dInt/Geom2dInt_TheLocateExtPCOfTheProjPCurOfGInter.hxx b/src/Geom2dInt/Geom2dInt_TheLocateExtPCOfTheProjPCurOfGInter.hxx index 56f5200057..3eaddfd5e8 100644 --- a/src/Geom2dInt/Geom2dInt_TheLocateExtPCOfTheProjPCurOfGInter.hxx +++ b/src/Geom2dInt/Geom2dInt_TheLocateExtPCOfTheProjPCurOfGInter.hxx @@ -22,7 +22,6 @@ #include #include -#include #include class Standard_DomainError; class Standard_TypeMismatch; diff --git a/src/Geom2dInt/Geom2dInt_ThePolygon2dOfTheIntPCurvePCurveOfGInter.hxx b/src/Geom2dInt/Geom2dInt_ThePolygon2dOfTheIntPCurvePCurveOfGInter.hxx index de9c6a78f2..1c8fdffad0 100644 --- a/src/Geom2dInt/Geom2dInt_ThePolygon2dOfTheIntPCurvePCurveOfGInter.hxx +++ b/src/Geom2dInt/Geom2dInt_ThePolygon2dOfTheIntPCurvePCurveOfGInter.hxx @@ -21,8 +21,6 @@ #include #include -#include -#include #include #include #include diff --git a/src/Geom2dInt/Geom2dInt_TheProjPCurOfGInter.hxx b/src/Geom2dInt/Geom2dInt_TheProjPCurOfGInter.hxx index 63671301ef..b49553e98a 100644 --- a/src/Geom2dInt/Geom2dInt_TheProjPCurOfGInter.hxx +++ b/src/Geom2dInt/Geom2dInt_TheProjPCurOfGInter.hxx @@ -19,9 +19,7 @@ #include #include -#include -#include class Adaptor2d_Curve2d; class Geom2dInt_Geom2dCurveTool; class Geom2dInt_TheCurveLocatorOfTheProjPCurOfGInter; diff --git a/src/Geom2dLProp/Geom2dLProp_CurAndInf2d.cxx b/src/Geom2dLProp/Geom2dLProp_CurAndInf2d.cxx index ffbebafdb7..40fefd9d95 100644 --- a/src/Geom2dLProp/Geom2dLProp_CurAndInf2d.cxx +++ b/src/Geom2dLProp/Geom2dLProp_CurAndInf2d.cxx @@ -15,15 +15,9 @@ // commercial license or contractual agreement. -#include #include #include #include -#include -#include -#include -#include -#include #include #include diff --git a/src/Geom2dLProp/Geom2dLProp_CurAndInf2d.hxx b/src/Geom2dLProp/Geom2dLProp_CurAndInf2d.hxx index 8792e05e29..98efe03fdf 100644 --- a/src/Geom2dLProp/Geom2dLProp_CurAndInf2d.hxx +++ b/src/Geom2dLProp/Geom2dLProp_CurAndInf2d.hxx @@ -21,7 +21,6 @@ #include #include -#include #include class Geom2d_Curve; diff --git a/src/Geom2dLProp/Geom2dLProp_Curve2dTool.hxx b/src/Geom2dLProp/Geom2dLProp_Curve2dTool.hxx index dbecf01616..d273fa6900 100644 --- a/src/Geom2dLProp/Geom2dLProp_Curve2dTool.hxx +++ b/src/Geom2dLProp/Geom2dLProp_Curve2dTool.hxx @@ -21,7 +21,6 @@ #include #include -#include #include class Geom2d_Curve; class gp_Pnt2d; diff --git a/src/Geom2dLProp/Geom2dLProp_FuncCurExt.cxx b/src/Geom2dLProp/Geom2dLProp_FuncCurExt.cxx index ebc1ddf2ee..7bf424e19c 100644 --- a/src/Geom2dLProp/Geom2dLProp_FuncCurExt.cxx +++ b/src/Geom2dLProp/Geom2dLProp_FuncCurExt.cxx @@ -18,9 +18,7 @@ #include #include #include -#include #include -#include //============================================================================= //function : diff --git a/src/Geom2dLProp/Geom2dLProp_FuncCurExt.hxx b/src/Geom2dLProp/Geom2dLProp_FuncCurExt.hxx index 1a3e203aa9..73450e7cf9 100644 --- a/src/Geom2dLProp/Geom2dLProp_FuncCurExt.hxx +++ b/src/Geom2dLProp/Geom2dLProp_FuncCurExt.hxx @@ -21,9 +21,7 @@ #include #include -#include #include -#include class Geom2d_Curve; diff --git a/src/Geom2dLProp/Geom2dLProp_FuncCurNul.cxx b/src/Geom2dLProp/Geom2dLProp_FuncCurNul.cxx index 4eb568bcdb..40fbe1049c 100644 --- a/src/Geom2dLProp/Geom2dLProp_FuncCurNul.cxx +++ b/src/Geom2dLProp/Geom2dLProp_FuncCurNul.cxx @@ -18,9 +18,7 @@ #include #include #include -#include #include -#include //============================================================================= //function : diff --git a/src/Geom2dLProp/Geom2dLProp_FuncCurNul.hxx b/src/Geom2dLProp/Geom2dLProp_FuncCurNul.hxx index 1d8708f1a7..779dd88899 100644 --- a/src/Geom2dLProp/Geom2dLProp_FuncCurNul.hxx +++ b/src/Geom2dLProp/Geom2dLProp_FuncCurNul.hxx @@ -22,8 +22,6 @@ #include #include -#include -#include class Geom2d_Curve; diff --git a/src/Geom2dLProp/Geom2dLProp_NumericCurInf2d.hxx b/src/Geom2dLProp/Geom2dLProp_NumericCurInf2d.hxx index cf7472ec5f..b0551263f5 100644 --- a/src/Geom2dLProp/Geom2dLProp_NumericCurInf2d.hxx +++ b/src/Geom2dLProp/Geom2dLProp_NumericCurInf2d.hxx @@ -21,8 +21,6 @@ #include #include -#include -#include class Geom2d_Curve; class LProp_CurAndInf; diff --git a/src/Geom2dToIGES/Geom2dToIGES_Geom2dCurve.cxx b/src/Geom2dToIGES/Geom2dToIGES_Geom2dCurve.cxx index 34122da84d..8872d3acea 100644 --- a/src/Geom2dToIGES/Geom2dToIGES_Geom2dCurve.cxx +++ b/src/Geom2dToIGES/Geom2dToIGES_Geom2dCurve.cxx @@ -17,52 +17,15 @@ //#53 rln 24.12.98 CCI60005 //#57 rln 25.12.98 avoid code duplication -#include #include -#include -#include #include -#include -#include -#include -#include -#include -#include #include #include -#include #include #include -#include -#include -#include #include -#include -#include -#include -#include -#include -#include -#include -#include #include -#include -#include -#include -#include -#include #include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include //#include //============================================================================= diff --git a/src/Geom2dToIGES/Geom2dToIGES_Geom2dCurve.hxx b/src/Geom2dToIGES/Geom2dToIGES_Geom2dCurve.hxx index 7ae9bb524c..9af58b6199 100644 --- a/src/Geom2dToIGES/Geom2dToIGES_Geom2dCurve.hxx +++ b/src/Geom2dToIGES/Geom2dToIGES_Geom2dCurve.hxx @@ -22,7 +22,6 @@ #include #include -#include class IGESData_IGESEntity; class Geom2d_Curve; diff --git a/src/Geom2dToIGES/Geom2dToIGES_Geom2dEntity.cxx b/src/Geom2dToIGES/Geom2dToIGES_Geom2dEntity.cxx index b696f1f583..a743604248 100644 --- a/src/Geom2dToIGES/Geom2dToIGES_Geom2dEntity.cxx +++ b/src/Geom2dToIGES/Geom2dToIGES_Geom2dEntity.cxx @@ -19,7 +19,6 @@ #include #include #include -#include #include //======================================================================= diff --git a/src/Geom2dToIGES/Geom2dToIGES_Geom2dEntity.hxx b/src/Geom2dToIGES/Geom2dToIGES_Geom2dEntity.hxx index b65e6f56ea..61001d82bc 100644 --- a/src/Geom2dToIGES/Geom2dToIGES_Geom2dEntity.hxx +++ b/src/Geom2dToIGES/Geom2dToIGES_Geom2dEntity.hxx @@ -21,7 +21,6 @@ #include #include -#include class IGESData_IGESModel; diff --git a/src/Geom2dToIGES/Geom2dToIGES_Geom2dPoint.cxx b/src/Geom2dToIGES/Geom2dToIGES_Geom2dPoint.cxx index 5ec97cdb44..dcfba1763b 100644 --- a/src/Geom2dToIGES/Geom2dToIGES_Geom2dPoint.cxx +++ b/src/Geom2dToIGES/Geom2dToIGES_Geom2dPoint.cxx @@ -17,7 +17,6 @@ #include #include -#include #include #include #include diff --git a/src/Geom2dToIGES/Geom2dToIGES_Geom2dVector.cxx b/src/Geom2dToIGES/Geom2dToIGES_Geom2dVector.cxx index cf123bbce2..2a45a26d8e 100644 --- a/src/Geom2dToIGES/Geom2dToIGES_Geom2dVector.cxx +++ b/src/Geom2dToIGES/Geom2dToIGES_Geom2dVector.cxx @@ -18,7 +18,6 @@ #include #include #include -#include #include #include #include diff --git a/src/GeomAPI/GeomAPI.cxx b/src/GeomAPI/GeomAPI.cxx index 8d97fc0e57..8133938168 100644 --- a/src/GeomAPI/GeomAPI.cxx +++ b/src/GeomAPI/GeomAPI.cxx @@ -22,24 +22,14 @@ #include #include #include -#include -#include #include -#include -#include -#include -#include #include -#include #include #include #include -#include #include #include #include -#include -#include //======================================================================= //function : To2d diff --git a/src/GeomAPI/GeomAPI_ExtremaCurveCurve.cxx b/src/GeomAPI/GeomAPI_ExtremaCurveCurve.cxx index ba64d0f9f0..b25ebf8667 100644 --- a/src/GeomAPI/GeomAPI_ExtremaCurveCurve.cxx +++ b/src/GeomAPI/GeomAPI_ExtremaCurveCurve.cxx @@ -16,8 +16,6 @@ #include -#include -#include #include #include #include diff --git a/src/GeomAPI/GeomAPI_ExtremaCurveCurve.hxx b/src/GeomAPI/GeomAPI_ExtremaCurveCurve.hxx index fc6f80df04..d385e637de 100644 --- a/src/GeomAPI/GeomAPI_ExtremaCurveCurve.hxx +++ b/src/GeomAPI/GeomAPI_ExtremaCurveCurve.hxx @@ -21,11 +21,9 @@ #include #include -#include #include #include #include -#include #include class Geom_Curve; diff --git a/src/GeomAPI/GeomAPI_ExtremaCurveSurface.cxx b/src/GeomAPI/GeomAPI_ExtremaCurveSurface.cxx index 6dd37749b3..c77fdb07a0 100644 --- a/src/GeomAPI/GeomAPI_ExtremaCurveSurface.cxx +++ b/src/GeomAPI/GeomAPI_ExtremaCurveSurface.cxx @@ -18,8 +18,6 @@ #include #include #include -#include -#include #include #include #include diff --git a/src/GeomAPI/GeomAPI_ExtremaCurveSurface.hxx b/src/GeomAPI/GeomAPI_ExtremaCurveSurface.hxx index f510428f00..c1fbe59061 100644 --- a/src/GeomAPI/GeomAPI_ExtremaCurveSurface.hxx +++ b/src/GeomAPI/GeomAPI_ExtremaCurveSurface.hxx @@ -21,7 +21,6 @@ #include #include -#include #include #include class Geom_Curve; diff --git a/src/GeomAPI/GeomAPI_ExtremaSurfaceSurface.cxx b/src/GeomAPI/GeomAPI_ExtremaSurfaceSurface.cxx index 05cf69b7ee..8a844f4491 100644 --- a/src/GeomAPI/GeomAPI_ExtremaSurfaceSurface.cxx +++ b/src/GeomAPI/GeomAPI_ExtremaSurfaceSurface.cxx @@ -17,7 +17,6 @@ #include #include -#include #include #include #include diff --git a/src/GeomAPI/GeomAPI_ExtremaSurfaceSurface.hxx b/src/GeomAPI/GeomAPI_ExtremaSurfaceSurface.hxx index 9758318b6c..4e74c68710 100644 --- a/src/GeomAPI/GeomAPI_ExtremaSurfaceSurface.hxx +++ b/src/GeomAPI/GeomAPI_ExtremaSurfaceSurface.hxx @@ -21,7 +21,6 @@ #include #include -#include #include #include class Geom_Surface; diff --git a/src/GeomAPI/GeomAPI_IntCS.cxx b/src/GeomAPI/GeomAPI_IntCS.cxx index 85c38de8e4..e16db5cf4e 100644 --- a/src/GeomAPI/GeomAPI_IntCS.cxx +++ b/src/GeomAPI/GeomAPI_IntCS.cxx @@ -16,7 +16,6 @@ #include -#include #include #include #include @@ -24,8 +23,6 @@ #include #include #include -#include -#include //======================================================================= //function : GeomAPI_IntCS diff --git a/src/GeomAPI/GeomAPI_IntCS.hxx b/src/GeomAPI/GeomAPI_IntCS.hxx index b665740d39..43705963b0 100644 --- a/src/GeomAPI/GeomAPI_IntCS.hxx +++ b/src/GeomAPI/GeomAPI_IntCS.hxx @@ -22,7 +22,6 @@ #include #include -#include #include class Geom_Curve; class Geom_Surface; diff --git a/src/GeomAPI/GeomAPI_IntSS.hxx b/src/GeomAPI/GeomAPI_IntSS.hxx index fd9170f5ab..86ee7d533c 100644 --- a/src/GeomAPI/GeomAPI_IntSS.hxx +++ b/src/GeomAPI/GeomAPI_IntSS.hxx @@ -22,8 +22,6 @@ #include #include -#include -#include #include class StdFail_NotDone; class Standard_OutOfRange; diff --git a/src/GeomAPI/GeomAPI_Interpolate.cxx b/src/GeomAPI/GeomAPI_Interpolate.cxx index 5ff2d37666..4f0ebf5913 100644 --- a/src/GeomAPI/GeomAPI_Interpolate.cxx +++ b/src/GeomAPI/GeomAPI_Interpolate.cxx @@ -17,7 +17,6 @@ // 08-Aug-95 : xab : interpolation uses BSplCLib::Interpolate #include -#include #include #include #include diff --git a/src/GeomAPI/GeomAPI_Interpolate.hxx b/src/GeomAPI/GeomAPI_Interpolate.hxx index de8b77b277..9531a6baeb 100644 --- a/src/GeomAPI/GeomAPI_Interpolate.hxx +++ b/src/GeomAPI/GeomAPI_Interpolate.hxx @@ -21,9 +21,6 @@ #include #include -#include -#include -#include #include #include #include diff --git a/src/GeomAPI/GeomAPI_PointsToBSpline.cxx b/src/GeomAPI/GeomAPI_PointsToBSpline.cxx index 17074224d5..5c4bc6161d 100644 --- a/src/GeomAPI/GeomAPI_PointsToBSpline.cxx +++ b/src/GeomAPI/GeomAPI_PointsToBSpline.cxx @@ -16,7 +16,6 @@ #include -#include #include #include #include diff --git a/src/GeomAPI/GeomAPI_PointsToBSpline.hxx b/src/GeomAPI/GeomAPI_PointsToBSpline.hxx index 43c9fe691c..5938653fa4 100644 --- a/src/GeomAPI/GeomAPI_PointsToBSpline.hxx +++ b/src/GeomAPI/GeomAPI_PointsToBSpline.hxx @@ -21,11 +21,9 @@ #include #include -#include #include #include #include -#include #include #include class Geom_BSplineCurve; diff --git a/src/GeomAPI/GeomAPI_PointsToBSplineSurface.cxx b/src/GeomAPI/GeomAPI_PointsToBSplineSurface.cxx index c1a2c35f03..90be6e5266 100644 --- a/src/GeomAPI/GeomAPI_PointsToBSplineSurface.cxx +++ b/src/GeomAPI/GeomAPI_PointsToBSplineSurface.cxx @@ -16,8 +16,6 @@ #include -#include -#include #include #include #include @@ -31,7 +29,6 @@ #include #include #include -#include #include #include #include diff --git a/src/GeomAPI/GeomAPI_PointsToBSplineSurface.hxx b/src/GeomAPI/GeomAPI_PointsToBSplineSurface.hxx index 27710066d3..95efa4f815 100644 --- a/src/GeomAPI/GeomAPI_PointsToBSplineSurface.hxx +++ b/src/GeomAPI/GeomAPI_PointsToBSplineSurface.hxx @@ -21,11 +21,9 @@ #include #include -#include #include #include #include -#include #include #include class Geom_BSplineSurface; diff --git a/src/GeomAPI/GeomAPI_ProjectPointOnCurve.cxx b/src/GeomAPI/GeomAPI_ProjectPointOnCurve.cxx index e33be83b33..1b15896797 100644 --- a/src/GeomAPI/GeomAPI_ProjectPointOnCurve.cxx +++ b/src/GeomAPI/GeomAPI_ProjectPointOnCurve.cxx @@ -16,8 +16,6 @@ #include -#include -#include #include #include #include diff --git a/src/GeomAPI/GeomAPI_ProjectPointOnCurve.hxx b/src/GeomAPI/GeomAPI_ProjectPointOnCurve.hxx index 5a03eaa0cc..6f2deabaac 100644 --- a/src/GeomAPI/GeomAPI_ProjectPointOnCurve.hxx +++ b/src/GeomAPI/GeomAPI_ProjectPointOnCurve.hxx @@ -21,7 +21,6 @@ #include #include -#include #include #include #include diff --git a/src/GeomAPI/GeomAPI_ProjectPointOnSurf.cxx b/src/GeomAPI/GeomAPI_ProjectPointOnSurf.cxx index 7c1c1e343e..c04bcce8af 100644 --- a/src/GeomAPI/GeomAPI_ProjectPointOnSurf.cxx +++ b/src/GeomAPI/GeomAPI_ProjectPointOnSurf.cxx @@ -16,8 +16,6 @@ #include -#include -#include #include #include #include diff --git a/src/GeomAPI/GeomAPI_ProjectPointOnSurf.hxx b/src/GeomAPI/GeomAPI_ProjectPointOnSurf.hxx index 1101d02511..9d08f3762c 100644 --- a/src/GeomAPI/GeomAPI_ProjectPointOnSurf.hxx +++ b/src/GeomAPI/GeomAPI_ProjectPointOnSurf.hxx @@ -21,13 +21,11 @@ #include #include -#include #include #include #include #include #include -#include class gp_Pnt; class Geom_Surface; diff --git a/src/GeomAdaptor/GeomAdaptor.cxx b/src/GeomAdaptor/GeomAdaptor.cxx index 48e801974c..6d6f30d4ae 100644 --- a/src/GeomAdaptor/GeomAdaptor.cxx +++ b/src/GeomAdaptor/GeomAdaptor.cxx @@ -17,11 +17,9 @@ #include #include -#include #include #include #include -#include #include #include #include diff --git a/src/GeomAdaptor/GeomAdaptor_Curve.cxx b/src/GeomAdaptor/GeomAdaptor_Curve.cxx index 7115a0f80f..c1ed8ab277 100644 --- a/src/GeomAdaptor/GeomAdaptor_Curve.cxx +++ b/src/GeomAdaptor/GeomAdaptor_Curve.cxx @@ -37,7 +37,6 @@ #include #include #include -#include #include #include #include @@ -47,16 +46,12 @@ #include #include #include -#include #include #include #include -#include -#include #include #include #include -#include //#include static const Standard_Real PosTol = Precision::PConfusion() / 2; diff --git a/src/GeomAdaptor/GeomAdaptor_Surface.cxx b/src/GeomAdaptor/GeomAdaptor_Surface.cxx index 3c912b8a61..816af616f9 100644 --- a/src/GeomAdaptor/GeomAdaptor_Surface.cxx +++ b/src/GeomAdaptor/GeomAdaptor_Surface.cxx @@ -28,7 +28,6 @@ #include #include #include -#include #include #include #include @@ -46,26 +45,20 @@ #include #include #include -#include #include #include #include -#include #include #include #include #include -#include #include #include -#include #include #include #include -#include #include #include -#include static const Standard_Real PosTol = Precision::PConfusion()*0.5; diff --git a/src/GeomAdaptor/GeomAdaptor_SurfaceOfLinearExtrusion.hxx b/src/GeomAdaptor/GeomAdaptor_SurfaceOfLinearExtrusion.hxx index be44b0205e..ba83ba5c57 100644 --- a/src/GeomAdaptor/GeomAdaptor_SurfaceOfLinearExtrusion.hxx +++ b/src/GeomAdaptor/GeomAdaptor_SurfaceOfLinearExtrusion.hxx @@ -17,7 +17,6 @@ #ifndef _GeomAdaptor_SurfaceOfLinearExtrusion_HeaderFile #define _GeomAdaptor_SurfaceOfLinearExtrusion_HeaderFile -#include #include class gp_Pln; diff --git a/src/GeomAdaptor/GeomAdaptor_SurfaceOfRevolution.hxx b/src/GeomAdaptor/GeomAdaptor_SurfaceOfRevolution.hxx index 5df18d9164..b6a1aad2eb 100644 --- a/src/GeomAdaptor/GeomAdaptor_SurfaceOfRevolution.hxx +++ b/src/GeomAdaptor/GeomAdaptor_SurfaceOfRevolution.hxx @@ -17,8 +17,6 @@ #ifndef _GeomAdaptor_SurfaceOfRevolution_HeaderFile #define _GeomAdaptor_SurfaceOfRevolution_HeaderFile -#include -#include #include class gp_Pln; diff --git a/src/gce/gce_MakeCirc.cxx b/src/gce/gce_MakeCirc.cxx index 99e32446b7..3e74a49982 100644 --- a/src/gce/gce_MakeCirc.cxx +++ b/src/gce/gce_MakeCirc.cxx @@ -24,7 +24,6 @@ #include #include #include -#include #include #include #include diff --git a/src/gce/gce_MakeCirc.hxx b/src/gce/gce_MakeCirc.hxx index f679deaab6..60f117f6fe 100644 --- a/src/gce/gce_MakeCirc.hxx +++ b/src/gce/gce_MakeCirc.hxx @@ -19,11 +19,9 @@ #include #include -#include #include #include -#include class gp_Ax2; class gp_Pnt; class gp_Dir; diff --git a/src/gce/gce_MakeCirc2d.hxx b/src/gce/gce_MakeCirc2d.hxx index c3d9649309..1c5e0e9cb5 100644 --- a/src/gce/gce_MakeCirc2d.hxx +++ b/src/gce/gce_MakeCirc2d.hxx @@ -19,12 +19,9 @@ #include #include -#include #include #include -#include -#include class gp_Ax2d; class gp_Ax22d; class gp_Pnt2d; diff --git a/src/gce/gce_MakeCone.hxx b/src/gce/gce_MakeCone.hxx index f4fe0d18d3..130c2ffa70 100644 --- a/src/gce/gce_MakeCone.hxx +++ b/src/gce/gce_MakeCone.hxx @@ -23,7 +23,6 @@ #include #include -#include class gp_Ax2; class gp_Pnt; class gp_Ax1; diff --git a/src/gce/gce_MakeCylinder.hxx b/src/gce/gce_MakeCylinder.hxx index 4fcfb65494..5f9a355389 100644 --- a/src/gce/gce_MakeCylinder.hxx +++ b/src/gce/gce_MakeCylinder.hxx @@ -23,7 +23,6 @@ #include #include -#include class gp_Ax2; class gp_Pnt; class gp_Ax1; diff --git a/src/gce/gce_MakeDir.hxx b/src/gce/gce_MakeDir.hxx index a90b37879e..c03bab9a46 100644 --- a/src/gce/gce_MakeDir.hxx +++ b/src/gce/gce_MakeDir.hxx @@ -23,7 +23,6 @@ #include #include -#include class gp_Vec; class gp_XYZ; class gp_Pnt; diff --git a/src/gce/gce_MakeDir2d.hxx b/src/gce/gce_MakeDir2d.hxx index 577b90910e..3efe877e8f 100644 --- a/src/gce/gce_MakeDir2d.hxx +++ b/src/gce/gce_MakeDir2d.hxx @@ -23,7 +23,6 @@ #include #include -#include class gp_Vec2d; class gp_XY; class gp_Pnt2d; diff --git a/src/gce/gce_MakeElips.hxx b/src/gce/gce_MakeElips.hxx index a7fa27a8bf..020f30fced 100644 --- a/src/gce/gce_MakeElips.hxx +++ b/src/gce/gce_MakeElips.hxx @@ -23,7 +23,6 @@ #include #include -#include class gp_Ax2; class gp_Pnt; diff --git a/src/gce/gce_MakeElips2d.hxx b/src/gce/gce_MakeElips2d.hxx index 27248b780f..00391db05e 100644 --- a/src/gce/gce_MakeElips2d.hxx +++ b/src/gce/gce_MakeElips2d.hxx @@ -23,7 +23,6 @@ #include #include -#include #include class gp_Ax2d; class gp_Ax22d; diff --git a/src/gce/gce_MakeHypr.hxx b/src/gce/gce_MakeHypr.hxx index fa4676eb15..8002ff56a2 100644 --- a/src/gce/gce_MakeHypr.hxx +++ b/src/gce/gce_MakeHypr.hxx @@ -23,7 +23,6 @@ #include #include -#include class gp_Ax2; class gp_Pnt; diff --git a/src/gce/gce_MakeHypr2d.hxx b/src/gce/gce_MakeHypr2d.hxx index b9e57e89d7..df37b74daa 100644 --- a/src/gce/gce_MakeHypr2d.hxx +++ b/src/gce/gce_MakeHypr2d.hxx @@ -23,7 +23,6 @@ #include #include -#include #include class gp_Pnt2d; class gp_Ax2d; diff --git a/src/gce/gce_MakeLin2d.hxx b/src/gce/gce_MakeLin2d.hxx index 725f5323a7..eab47a0d21 100644 --- a/src/gce/gce_MakeLin2d.hxx +++ b/src/gce/gce_MakeLin2d.hxx @@ -23,7 +23,6 @@ #include #include -#include class gp_Ax2d; class gp_Pnt2d; class gp_Dir2d; diff --git a/src/gce/gce_MakeMirror.cxx b/src/gce/gce_MakeMirror.cxx index bb7974f5db..44e44eedf7 100644 --- a/src/gce/gce_MakeMirror.cxx +++ b/src/gce/gce_MakeMirror.cxx @@ -16,11 +16,7 @@ #include -#include -#include -#include #include -#include #include #include #include diff --git a/src/gce/gce_MakeParab.cxx b/src/gce/gce_MakeParab.cxx index 53b5f13039..411aec2d3b 100644 --- a/src/gce/gce_MakeParab.cxx +++ b/src/gce/gce_MakeParab.cxx @@ -16,7 +16,6 @@ #include -#include #include #include #include diff --git a/src/gce/gce_MakeParab.hxx b/src/gce/gce_MakeParab.hxx index 3ddddb5783..a113ad1162 100644 --- a/src/gce/gce_MakeParab.hxx +++ b/src/gce/gce_MakeParab.hxx @@ -23,7 +23,6 @@ #include #include -#include class gp_Ax2; class gp_Ax1; class gp_Pnt; diff --git a/src/gce/gce_MakeParab2d.hxx b/src/gce/gce_MakeParab2d.hxx index 662ccc8bf8..fc6b11c64f 100644 --- a/src/gce/gce_MakeParab2d.hxx +++ b/src/gce/gce_MakeParab2d.hxx @@ -23,7 +23,6 @@ #include #include -#include #include class gp_Ax2d; class gp_Ax22d; diff --git a/src/gce/gce_MakePln.hxx b/src/gce/gce_MakePln.hxx index 2dccea06f7..af8c0a3aa2 100644 --- a/src/gce/gce_MakePln.hxx +++ b/src/gce/gce_MakePln.hxx @@ -23,7 +23,6 @@ #include #include -#include class gp_Ax2; class gp_Pnt; class gp_Dir; diff --git a/src/gce/gce_MakeRotation.cxx b/src/gce/gce_MakeRotation.cxx index 481118b34f..075be97f71 100644 --- a/src/gce/gce_MakeRotation.cxx +++ b/src/gce/gce_MakeRotation.cxx @@ -16,7 +16,6 @@ #include -#include #include #include #include diff --git a/src/gce/gce_MakeRotation.hxx b/src/gce/gce_MakeRotation.hxx index 46624a9f08..52ab600dfa 100644 --- a/src/gce/gce_MakeRotation.hxx +++ b/src/gce/gce_MakeRotation.hxx @@ -22,7 +22,6 @@ #include #include -#include class gp_Lin; class gp_Ax1; class gp_Pnt; diff --git a/src/gce/gce_MakeRotation2d.hxx b/src/gce/gce_MakeRotation2d.hxx index 53a679ba8a..6b8e4f049a 100644 --- a/src/gce/gce_MakeRotation2d.hxx +++ b/src/gce/gce_MakeRotation2d.hxx @@ -22,7 +22,6 @@ #include #include -#include class gp_Pnt2d; diff --git a/src/gce/gce_MakeScale.hxx b/src/gce/gce_MakeScale.hxx index 23600230eb..672a9548fb 100644 --- a/src/gce/gce_MakeScale.hxx +++ b/src/gce/gce_MakeScale.hxx @@ -22,7 +22,6 @@ #include #include -#include class gp_Pnt; diff --git a/src/gce/gce_MakeScale2d.hxx b/src/gce/gce_MakeScale2d.hxx index 44f9878efa..6c86c0617a 100644 --- a/src/gce/gce_MakeScale2d.hxx +++ b/src/gce/gce_MakeScale2d.hxx @@ -22,7 +22,6 @@ #include #include -#include class gp_Pnt2d; From 08984eda3d915d1192517f5dabd204bdbe3b4ff1 Mon Sep 17 00:00:00 2001 From: aml Date: Wed, 16 Feb 2022 12:59:22 +0300 Subject: [PATCH 215/639] 0032838: Coding - get rid of unused forward declarations (misc) --- src/Law/Law.hxx | 10 ---------- src/Law/Law_BSpFunc.hxx | 2 -- src/Law/Law_BSpline.hxx | 6 ------ src/Law/Law_BSplineKnotSplitting.hxx | 2 -- src/Law/Law_Composite.hxx | 2 -- src/Law/Law_Constant.hxx | 2 -- src/Law/Law_Function.hxx | 1 - src/Law/Law_Interpolate.hxx | 2 -- src/Law/Law_Linear.hxx | 2 -- src/STEPSelections/STEPSelections_AssemblyExplorer.hxx | 1 - src/STEPSelections/STEPSelections_AssemblyLink.hxx | 1 - src/SWDRAW/SWDRAW.hxx | 8 -------- src/gp/gp_Mat.hxx | 2 -- 13 files changed, 41 deletions(-) diff --git a/src/Law/Law.hxx b/src/Law/Law.hxx index 3cc8ed2129..5f42e46b5c 100644 --- a/src/Law/Law.hxx +++ b/src/Law/Law.hxx @@ -31,16 +31,6 @@ class Law_BSpFunc; class Law_Linear; class Law_BSpline; class Adaptor3d_Curve; -class Law_BSpline; -class Law_Interpolate; -class Law_Function; -class Law_Constant; -class Law_Linear; -class Law_BSpFunc; -class Law_S; -class Law_Interpol; -class Law_Composite; -class Law_BSplineKnotSplitting; //! Multiple services concerning 1d functions. diff --git a/src/Law/Law_BSpFunc.hxx b/src/Law/Law_BSpFunc.hxx index 06967499e8..ae3c410d58 100644 --- a/src/Law/Law_BSpFunc.hxx +++ b/src/Law/Law_BSpFunc.hxx @@ -26,8 +26,6 @@ #include #include class Law_BSpline; -class Standard_OutOfRange; -class Law_Function; class Law_BSpFunc; diff --git a/src/Law/Law_BSpline.hxx b/src/Law/Law_BSpline.hxx index d8548612b4..268da912c6 100644 --- a/src/Law/Law_BSpline.hxx +++ b/src/Law/Law_BSpline.hxx @@ -30,12 +30,6 @@ #include #include #include -class Standard_ConstructionError; -class Standard_DimensionError; -class Standard_DomainError; -class Standard_OutOfRange; -class Standard_RangeError; -class Standard_NoSuchObject; class Law_BSpline; diff --git a/src/Law/Law_BSplineKnotSplitting.hxx b/src/Law/Law_BSplineKnotSplitting.hxx index 8da0998ecc..c1e55bd977 100644 --- a/src/Law/Law_BSplineKnotSplitting.hxx +++ b/src/Law/Law_BSplineKnotSplitting.hxx @@ -24,8 +24,6 @@ #include #include #include -class Standard_DimensionError; -class Standard_RangeError; class Law_BSpline; diff --git a/src/Law/Law_Composite.hxx b/src/Law/Law_Composite.hxx index ed72b6c9b9..2a7d0f0a6d 100644 --- a/src/Law/Law_Composite.hxx +++ b/src/Law/Law_Composite.hxx @@ -27,8 +27,6 @@ #include #include #include -class Law_Function; -class Standard_OutOfRange; class Law_Composite; diff --git a/src/Law/Law_Constant.hxx b/src/Law/Law_Constant.hxx index 42e1776852..4a37fc4ec2 100644 --- a/src/Law/Law_Constant.hxx +++ b/src/Law/Law_Constant.hxx @@ -25,8 +25,6 @@ #include #include #include -class Standard_OutOfRange; -class Law_Function; class Law_Constant; diff --git a/src/Law/Law_Function.hxx b/src/Law/Law_Function.hxx index c5305d8b25..58dd86cd91 100644 --- a/src/Law/Law_Function.hxx +++ b/src/Law/Law_Function.hxx @@ -25,7 +25,6 @@ #include #include #include -class Standard_OutOfRange; class Law_Function; diff --git a/src/Law/Law_Interpolate.hxx b/src/Law/Law_Interpolate.hxx index 68147a8a5f..26de82850d 100644 --- a/src/Law/Law_Interpolate.hxx +++ b/src/Law/Law_Interpolate.hxx @@ -27,8 +27,6 @@ #include #include class Law_BSpline; -class StdFail_NotDone; -class Standard_ConstructionError; //! This class is used to interpolate a BsplineCurve diff --git a/src/Law/Law_Linear.hxx b/src/Law/Law_Linear.hxx index 45d930448d..f86535d4aa 100644 --- a/src/Law/Law_Linear.hxx +++ b/src/Law/Law_Linear.hxx @@ -25,8 +25,6 @@ #include #include #include -class Standard_OutOfRange; -class Law_Function; class Law_Linear; diff --git a/src/STEPSelections/STEPSelections_AssemblyExplorer.hxx b/src/STEPSelections/STEPSelections_AssemblyExplorer.hxx index 7780aa67bf..5d1142bb4d 100644 --- a/src/STEPSelections/STEPSelections_AssemblyExplorer.hxx +++ b/src/STEPSelections/STEPSelections_AssemblyExplorer.hxx @@ -26,7 +26,6 @@ #include #include #include -class Interface_Graph; class StepShape_ShapeDefinitionRepresentation; class StepBasic_ProductDefinition; class STEPSelections_AssemblyComponent; diff --git a/src/STEPSelections/STEPSelections_AssemblyLink.hxx b/src/STEPSelections/STEPSelections_AssemblyLink.hxx index 570ac6d4b7..72c54a35ff 100644 --- a/src/STEPSelections/STEPSelections_AssemblyLink.hxx +++ b/src/STEPSelections/STEPSelections_AssemblyLink.hxx @@ -22,7 +22,6 @@ #include class StepRepr_NextAssemblyUsageOccurrence; -class Standard_Transient; class STEPSelections_AssemblyComponent; diff --git a/src/SWDRAW/SWDRAW.hxx b/src/SWDRAW/SWDRAW.hxx index 4ea68bdb3f..5a9134bc55 100644 --- a/src/SWDRAW/SWDRAW.hxx +++ b/src/SWDRAW/SWDRAW.hxx @@ -23,14 +23,6 @@ #include #include -class SWDRAW_ShapeTool; -class SWDRAW_ShapeAnalysis; -class SWDRAW_ShapeCustom; -class SWDRAW_ShapeExtend; -class SWDRAW_ShapeFix; -class SWDRAW_ShapeUpgrade; -class SWDRAW_ShapeProcess; -class SWDRAW_ShapeProcessAPI; //! Provides DRAW interface to the functionalities of Shape Healing diff --git a/src/gp/gp_Mat.hxx b/src/gp/gp_Mat.hxx index 1f89cb789b..cb662288db 100644 --- a/src/gp/gp_Mat.hxx +++ b/src/gp/gp_Mat.hxx @@ -21,8 +21,6 @@ #include class gp_XYZ; -class gp_Trsf; -class gp_GTrsf; //! Describes a three column, three row matrix. //! This sort of object is used in various vectorial or matrix computations. From 2d0dd76414ee99a2bdeaf83d21661e5b328550d5 Mon Sep 17 00:00:00 2001 From: jgv Date: Mon, 14 Feb 2022 16:36:39 +0300 Subject: [PATCH 216/639] 0032715: Modelling Algorithms - UnifySameDomain does incomplete union Add the case of closed, smooth but not periodic surface (unification of faces lying on it if the flag "myConcatBSplines" is true - modify the underlying surface to make it periodic). --- src/BRepLib/BRepLib.cxx | 100 +++++++++---- src/BRepLib/BRepLib.hxx | 9 +- src/ChFi3d/ChFi3d.cxx | 67 ++++++--- .../ShapeUpgrade_UnifySameDomain.cxx | 135 +++++++++++++++--- tests/bugs/heal/{bug29382 => bug29382_1} | 0 tests/bugs/heal/bug29382_2 | 24 ++++ tests/bugs/heal/bug29382_3 | 24 ++++ 7 files changed, 300 insertions(+), 59 deletions(-) rename tests/bugs/heal/{bug29382 => bug29382_1} (100%) create mode 100644 tests/bugs/heal/bug29382_2 create mode 100644 tests/bugs/heal/bug29382_3 diff --git a/src/BRepLib/BRepLib.cxx b/src/BRepLib/BRepLib.cxx index b956633f1c..a381c6c48c 100644 --- a/src/BRepLib/BRepLib.cxx +++ b/src/BRepLib/BRepLib.cxx @@ -1960,6 +1960,12 @@ class SurfaceProperties return aDeriv.Transformed(mySurfaceTrsf); } + gp_Dir Normal() + { + gp_Dir aNormal = mySurfaceProps.Normal(); + return aNormal.Transformed(mySurfaceTrsf); + } + // Calculate principal curvatures, which consist of minimal and maximal normal curvatures and // the directions on the tangent plane (principal direction) where the extremums are reached void Curvature(gp_Dir& thePrincipalDir1, Standard_Real& theCurvature1, @@ -1998,32 +2004,63 @@ class SurfaceProperties //purpose : check the angle at the border between two squares. // Two shares should have a shared front edge. //======================================================================= -static GeomAbs_Shape tgtfaces(const TopoDS_Edge& Ed, - const TopoDS_Face& F1, - const TopoDS_Face& F2, - const Standard_Real theAngleTol) +GeomAbs_Shape BRepLib::ContinuityOfFaces(const TopoDS_Edge& theEdge, + const TopoDS_Face& theFace1, + const TopoDS_Face& theFace2, + const Standard_Real theAngleTol) { - Standard_Boolean isSeam = F1.IsEqual(F2); - - TopoDS_Edge E = Ed; + Standard_Boolean isSeam = theFace1.IsEqual(theFace2); - // Check if pcurves exist on both faces of edge - Standard_Real aFirst,aLast; - E.Orientation(TopAbs_FORWARD); - Handle(Geom2d_Curve) aCurve1 = BRep_Tool::CurveOnSurface(E, F1, aFirst, aLast); - if(aCurve1.IsNull()) - return GeomAbs_C0; + TopoDS_Edge anEdgeInFace1, anEdgeInFace2; + Handle(Geom2d_Curve) aCurve1, aCurve2; + + Standard_Real aFirst, aLast; + + if (!theFace1.IsSame (theFace2) && + BRep_Tool::IsClosed (theEdge, theFace1) && + BRep_Tool::IsClosed (theEdge, theFace2)) + { + //Find the edge in the face 1: this edge will have correct orientation + TopoDS_Face aFace1 = theFace1; + aFace1.Orientation (TopAbs_FORWARD); + TopExp_Explorer anExplo (aFace1, TopAbs_EDGE); + for (; anExplo.More(); anExplo.Next()) + { + const TopoDS_Edge& anEdge = TopoDS::Edge (anExplo.Current()); + if (anEdge.IsSame (theEdge)) + { + anEdgeInFace1 = anEdge; + break; + } + } + if (anEdgeInFace1.IsNull()) + return GeomAbs_C0; + + aCurve1 = BRep_Tool::CurveOnSurface (anEdgeInFace1, aFace1, aFirst, aLast); + TopoDS_Face aFace2 = theFace2; + aFace2.Orientation (TopAbs_FORWARD); + anEdgeInFace2 = anEdgeInFace1; + anEdgeInFace2.Reverse(); + aCurve2 = BRep_Tool::CurveOnSurface (anEdgeInFace2, aFace2, aFirst, aLast); + } + else + { + // Obtaining of pcurves of edge on two faces. + anEdgeInFace1 = anEdgeInFace2 = theEdge; + aCurve1 = BRep_Tool::CurveOnSurface (anEdgeInFace1, theFace1, aFirst, aLast); + //For the case of seam edge + if (theFace1.IsSame(theFace2)) + anEdgeInFace2.Reverse(); + aCurve2 = BRep_Tool::CurveOnSurface (anEdgeInFace2, theFace2, aFirst, aLast); + } - if (isSeam) - E.Orientation(TopAbs_REVERSED); - Handle(Geom2d_Curve) aCurve2 = BRep_Tool::CurveOnSurface(E, F2, aFirst, aLast); - if(aCurve2.IsNull()) + if (aCurve1.IsNull() || aCurve2.IsNull()) return GeomAbs_C0; TopLoc_Location aLoc1, aLoc2; - Handle(Geom_Surface) aSurface1 = BRep_Tool::Surface(F1, aLoc1); + Handle(Geom_Surface) aSurface1 = BRep_Tool::Surface (theFace1, aLoc1); const gp_Trsf& aSurf1Trsf = aLoc1.Transformation(); - Handle(Geom_Surface) aSurface2 = BRep_Tool::Surface(F2, aLoc2); + Handle(Geom_Surface) aSurface2 = BRep_Tool::Surface (theFace2, aLoc2); const gp_Trsf& aSurf2Trsf = aLoc2.Transformation(); if (aSurface1->IsKind(STANDARD_TYPE(Geom_RectangularTrimmedSurface))) @@ -2040,11 +2077,11 @@ static GeomAbs_Shape tgtfaces(const TopoDS_Edge& Ed, return GeomAbs_CN; } - SurfaceProperties aSP1(aSurface1, aSurf1Trsf, aCurve1, F1.Orientation() == TopAbs_REVERSED); - SurfaceProperties aSP2(aSurface2, aSurf2Trsf, aCurve2, F2.Orientation() == TopAbs_REVERSED); + SurfaceProperties aSP1(aSurface1, aSurf1Trsf, aCurve1, theFace1.Orientation() == TopAbs_REVERSED); + SurfaceProperties aSP2(aSurface2, aSurf2Trsf, aCurve2, theFace2.Orientation() == TopAbs_REVERSED); Standard_Real f, l, eps; - BRep_Tool::Range(E,f,l); + BRep_Tool::Range (theEdge,f,l); Extrema_LocateExtPC ext; Handle(BRepAdaptor_Curve) aHC2; @@ -2055,7 +2092,6 @@ static GeomAbs_Shape tgtfaces(const TopoDS_Edge& Ed, const Standard_Real anAngleTol2 = theAngleTol * theAngleTol; gp_Vec aDer1, aDer2; - gp_Vec aNorm1; Standard_Real aSqLen1, aSqLen2; gp_Dir aCrvDir1[2], aCrvDir2[2]; Standard_Real aCrvLen1[2], aCrvLen2[2]; @@ -2083,13 +2119,26 @@ static GeomAbs_Shape tgtfaces(const TopoDS_Edge& Ed, aDer2 = aSP2.Derivative(); aSqLen2 = aDer2.SquareMagnitude(); Standard_Boolean isSmoothSuspect = (aDer1.CrossSquareMagnitude(aDer2) <= anAngleTol2 * aSqLen1 * aSqLen2); + if (isSmoothSuspect) + { + gp_Dir aNormal1 = aSP1.Normal(); + if (theFace1.Orientation() == TopAbs_REVERSED) + aNormal1.Reverse(); + gp_Dir aNormal2 = aSP2.Normal(); + if (theFace2.Orientation() == TopAbs_REVERSED) + aNormal2.Reverse(); + + if (aNormal1 * aNormal2 < 0.) + return GeomAbs_C0; + } + if (!isSmoothSuspect) { // Refine by projection if (aHC2.IsNull()) { // adaptor for pcurve on the second surface - aHC2 = new BRepAdaptor_Curve (E, F2); + aHC2 = new BRepAdaptor_Curve (anEdgeInFace2, theFace2); ext.Initialize(*aHC2, f, l, Precision::PConfusion()); } ext.Perform(aSP1.Value(), u); @@ -2285,9 +2334,8 @@ void BRepLib::EncodeRegularity(TopoDS_Edge& E, BRep_Builder B; if(BRep_Tool::Continuity(E,F1,F2)<=GeomAbs_C0){ try { - GeomAbs_Shape aCont = tgtfaces(E, F1, F2, TolAng); + GeomAbs_Shape aCont = ContinuityOfFaces(E, F1, F2, TolAng); B.Continuity(E,F1,F2,aCont); - } catch(Standard_Failure const&) { diff --git a/src/BRepLib/BRepLib.hxx b/src/BRepLib/BRepLib.hxx index 85d8c6d267..1acb765bfc 100644 --- a/src/BRepLib/BRepLib.hxx +++ b/src/BRepLib/BRepLib.hxx @@ -202,7 +202,14 @@ public: //! orientation to have matter in the solid. Returns //! False if the solid is unOrientable (open or incoherent) Standard_EXPORT static Standard_Boolean OrientClosedSolid (TopoDS_Solid& solid); - + + //! Returns the order of continuity between two faces + //! connected by an edge + Standard_EXPORT static GeomAbs_Shape ContinuityOfFaces(const TopoDS_Edge& theEdge, + const TopoDS_Face& theFace1, + const TopoDS_Face& theFace2, + const Standard_Real theAngleTol); + //! Encodes the Regularity of edges on a Shape. //! Warning: is an angular tolerance, expressed in Rad. //! Warning: If the edges's regularity are coded before, nothing diff --git a/src/ChFi3d/ChFi3d.cxx b/src/ChFi3d/ChFi3d.cxx index d9c03e4d9f..82d87ebd62 100644 --- a/src/ChFi3d/ChFi3d.cxx +++ b/src/ChFi3d/ChFi3d.cxx @@ -134,12 +134,12 @@ ChFiDS_TypeOfConcavity ChFi3d::DefineConnectType(const TopoDS_Edge& E, //function : IsTangentFaces //purpose : //======================================================================= -Standard_Boolean ChFi3d::IsTangentFaces(const TopoDS_Edge& theEdge, - const TopoDS_Face& theFace1, - const TopoDS_Face& theFace2, - const GeomAbs_Shape Order) +Standard_Boolean ChFi3d::IsTangentFaces(const TopoDS_Edge& theEdge, + const TopoDS_Face& theFace1, + const TopoDS_Face& theFace2, + const GeomAbs_Shape theOrder) { - if (Order == GeomAbs_G1 && BRep_Tool::Continuity(theEdge, theFace1, theFace2) != GeomAbs_C0) + if (theOrder == GeomAbs_G1 && BRep_Tool::Continuity(theEdge, theFace1, theFace2) != GeomAbs_C0) return Standard_True; Standard_Real TolC0 = Max(0.001, 1.5*BRep_Tool::Tolerance(theEdge)); @@ -147,15 +147,46 @@ Standard_Boolean ChFi3d::IsTangentFaces(const TopoDS_Edge& theEdge, Standard_Real aFirst; Standard_Real aLast; - // Obtaining of pcurves of edge on two faces. - const Handle(Geom2d_Curve) aC2d1 = BRep_Tool::CurveOnSurface - (theEdge, theFace1, aFirst, aLast); - //For the case of seam edge - TopoDS_Edge EE = theEdge; - if (theFace1.IsSame(theFace2)) - EE.Reverse(); - const Handle(Geom2d_Curve) aC2d2 = BRep_Tool::CurveOnSurface - (EE, theFace2, aFirst, aLast); + Handle(Geom2d_Curve) aC2d1, aC2d2; + + if (!theFace1.IsSame (theFace2) && + BRep_Tool::IsClosed (theEdge, theFace1) && + BRep_Tool::IsClosed (theEdge, theFace2)) + { + //Find the edge in the face 1: this edge will have correct orientation + TopoDS_Edge anEdgeInFace1; + TopoDS_Face aFace1 = theFace1; + aFace1.Orientation (TopAbs_FORWARD); + TopExp_Explorer anExplo (aFace1, TopAbs_EDGE); + for (; anExplo.More(); anExplo.Next()) + { + const TopoDS_Edge& anEdge = TopoDS::Edge (anExplo.Current()); + if (anEdge.IsSame (theEdge)) + { + anEdgeInFace1 = anEdge; + break; + } + } + if (anEdgeInFace1.IsNull()) + return Standard_False; + + aC2d1 = BRep_Tool::CurveOnSurface (anEdgeInFace1, aFace1, aFirst, aLast); + TopoDS_Face aFace2 = theFace2; + aFace2.Orientation (TopAbs_FORWARD); + anEdgeInFace1.Reverse(); + aC2d2 = BRep_Tool::CurveOnSurface (anEdgeInFace1, aFace2, aFirst, aLast); + } + else + { + // Obtaining of pcurves of edge on two faces. + aC2d1 = BRep_Tool::CurveOnSurface (theEdge, theFace1, aFirst, aLast); + //For the case of seam edge + TopoDS_Edge EE = theEdge; + if (theFace1.IsSame(theFace2)) + EE.Reverse(); + aC2d2 = BRep_Tool::CurveOnSurface (EE, theFace2, aFirst, aLast); + } + if (aC2d1.IsNull() || aC2d2.IsNull()) return Standard_False; @@ -186,15 +217,19 @@ Standard_Boolean ChFi3d::IsTangentFaces(const TopoDS_Edge& theEdge, if (i == aNbSamples) aPar = aLast; LocalAnalysis_SurfaceContinuity aCont(aC2d1, aC2d2, aPar, - aSurf1, aSurf2, Order, + aSurf1, aSurf2, theOrder, 0.001, TolC0, 0.1, 0.1, 0.1); if (!aCont.IsDone()) { + if (theOrder == GeomAbs_C2 && + aCont.StatusError() == LocalAnalysis_NullSecondDerivative) + continue; + nbNotDone++; continue; } - if (Order == GeomAbs_G1) + if (theOrder == GeomAbs_G1) { if (!aCont.IsG1()) return Standard_False; diff --git a/src/ShapeUpgrade/ShapeUpgrade_UnifySameDomain.cxx b/src/ShapeUpgrade/ShapeUpgrade_UnifySameDomain.cxx index f9185088b2..bd314351b5 100644 --- a/src/ShapeUpgrade/ShapeUpgrade_UnifySameDomain.cxx +++ b/src/ShapeUpgrade/ShapeUpgrade_UnifySameDomain.cxx @@ -46,6 +46,7 @@ #include #include #include +#include #include #include #include @@ -1212,7 +1213,31 @@ static Standard_Boolean GetNormalToSurface(const TopoDS_Face& theFace, { Standard_Real f, l; // get 2d curve to get point in 2d - const Handle(Geom2d_Curve)& aC2d = BRep_Tool::CurveOnSurface(theEdge, theFace, f, l); + Handle(Geom2d_Curve) aC2d; + if (BRep_Tool::IsClosed(theEdge, theFace)) + { + //Find the edge in the face: it will have correct orientation + TopoDS_Edge anEdgeInFace; + TopoDS_Face aFace = theFace; + aFace.Orientation (TopAbs_FORWARD); + TopExp_Explorer anExplo (aFace, TopAbs_EDGE); + for (; anExplo.More(); anExplo.Next()) + { + const TopoDS_Edge& anEdge = TopoDS::Edge (anExplo.Current()); + if (anEdge.IsSame (theEdge)) + { + anEdgeInFace = anEdge; + break; + } + } + if (anEdgeInFace.IsNull()) + return Standard_False; + + aC2d = BRep_Tool::CurveOnSurface (anEdgeInFace, aFace, f, l); + } + else + aC2d = BRep_Tool::CurveOnSurface(theEdge, theFace, f, l); + if (aC2d.IsNull()) { return Standard_False; } @@ -2965,29 +2990,107 @@ void ShapeUpgrade_UnifySameDomain::IntUnifyFaces(const TopoDS_Shape& theInpShape TopTools_IndexedDataMapOfShapeListOfShape VEmap; for (Standard_Integer ind = 1; ind <= edges.Length(); ind++) TopExp::MapShapesAndUniqueAncestors(edges(ind), TopAbs_VERTEX, TopAbs_EDGE, VEmap); - - //Perform relocating to new U-origin - //Define boundaries in 2d space of RefFace - if (Uperiod != 0.) + + //Try to find seam edge and an edge that is not seam but has 2 pcurves on the surface + Standard_Boolean SeamFound = Standard_False; + TopoDS_Edge EdgeWith2pcurves; + for (Standard_Integer ii = 1; ii <= faces.Length(); ii++) { - //try to find a real seam edge - if it exists, do nothing - Standard_Boolean SeamFound = Standard_False; - for (Standard_Integer ii = 1; ii <= faces.Length(); ii++) + const TopoDS_Face& face_ii = TopoDS::Face(faces(ii)); + TopoDS_Wire anOuterWire = BRepTools::OuterWire(face_ii); + TopoDS_Iterator itw(anOuterWire); + for (; itw.More(); itw.Next()) { - const TopoDS_Face& face_ii = TopoDS::Face(faces(ii)); - TopoDS_Wire anOuterWire = BRepTools::OuterWire(face_ii); - TopoDS_Iterator itw(anOuterWire); - for (; itw.More(); itw.Next()) + const TopoDS_Edge& anEdge = TopoDS::Edge(itw.Value()); + if (BRep_Tool::IsClosed (anEdge, face_ii)) { - const TopoDS_Edge& anEdge = TopoDS::Edge(itw.Value()); if (BRepTools::IsReallyClosed(anEdge, face_ii)) - { SeamFound = Standard_True; - break; + else + EdgeWith2pcurves = anEdge; + } + } + } + + Standard_Boolean aIsEdgeWith2pcurvesSmooth = Standard_False; + if (myConcatBSplines && !EdgeWith2pcurves.IsNull() && !SeamFound) + { + const TopTools_ListOfShape& aFaceList = theGMapEdgeFaces.FindFromKey (EdgeWith2pcurves); + const TopoDS_Face& aFace1 = TopoDS::Face (aFaceList.First()); + const TopoDS_Face& aFace2 = TopoDS::Face (aFaceList.Last()); + GeomAbs_Shape anOrderOfCont = BRepLib::ContinuityOfFaces (EdgeWith2pcurves, + aFace1, aFace2, + myAngTol); + aIsEdgeWith2pcurvesSmooth = (anOrderOfCont >= GeomAbs_G1); + } + + if (aIsEdgeWith2pcurvesSmooth) + { + Handle(Geom2d_Curve) aPC1, aPC2; + Standard_Real aFirst, aLast; + aPC1 = BRep_Tool::CurveOnSurface (EdgeWith2pcurves, F_RefFace, aFirst, aLast); + EdgeWith2pcurves.Reverse(); + aPC2 = BRep_Tool::CurveOnSurface (EdgeWith2pcurves, F_RefFace, aFirst, aLast); + gp_Pnt2d aPnt1 = aPC1->Value (aFirst); + gp_Pnt2d aPnt2 = aPC2->Value (aFirst); + Standard_Boolean anIsUclosed = (Abs(aPnt1.X() - aPnt2.X()) > Abs(aPnt1.Y() - aPnt2.Y())); + Standard_Boolean aToMakeUPeriodic = Standard_False, aToMakeVPeriodic = Standard_False; + if (anIsUclosed && Uperiod == 0.) + aToMakeUPeriodic = Standard_True; + if (!anIsUclosed && Vperiod == 0.) + aToMakeVPeriodic = Standard_True; + + if (aToMakeUPeriodic || aToMakeVPeriodic) + { + Handle(Geom_BSplineSurface) aBSplineSurface = Handle(Geom_BSplineSurface)::DownCast(aBaseSurface); + if (aBSplineSurface.IsNull()) + { + Standard_Real aTol = 1.e-4; + GeomAbs_Shape aUCont = GeomAbs_C1, aVCont = GeomAbs_C1; + Standard_Integer degU = 14, degV = 14; + Standard_Integer nmax = 16; + Standard_Integer aPrec = 1; + GeomConvert_ApproxSurface Approximator(aBaseSurface,aTol,aUCont,aVCont,degU,degV,nmax,aPrec); + aBSplineSurface = Approximator.Surface(); + } + + if (aToMakeUPeriodic) + { + aBSplineSurface->SetUPeriodic(); + Uperiod = aBSplineSurface->UPeriod(); + } + if (aToMakeVPeriodic) + { + aBSplineSurface->SetVPeriodic(); + Vperiod = aBSplineSurface->VPeriod(); + } + + //Update ref face and pcurves if the surface changed + if (aBSplineSurface != aBaseSurface) + { + TopoDS_Face OldRefFace = RefFace; + Handle(Geom2d_Curve) NullPCurve; + RefFace.Nullify(); + BB.MakeFace(RefFace, aBSplineSurface, aBaseLocation, 0.); + for (Standard_Integer ii = 1; ii <= edges.Length(); ii++) + { + TopoDS_Edge anEdge = TopoDS::Edge(edges(ii)); + Handle(Geom2d_Curve) aPCurve = BRep_Tool::CurveOnSurface (anEdge, OldRefFace, aFirst, aLast); + if (MapEdgesWithTemporaryPCurves.Contains(anEdge)) + BB.UpdateEdge(anEdge, NullPCurve, OldRefFace, 0.); + BB.UpdateEdge(anEdge, aPCurve, RefFace, 0.); } + F_RefFace = RefFace; + F_RefFace.Orientation(TopAbs_FORWARD); } } - + } //if (myConcatBSplines && !EdgeWith2pcurves.IsNull() && !SeamFound) + + //Perform relocating to new U-origin + //Define boundaries in 2d space of RefFace + if (Uperiod != 0.) + { + //if seam edge exists, do nothing if (!SeamFound) { //try to find the origin of U in 2d space diff --git a/tests/bugs/heal/bug29382 b/tests/bugs/heal/bug29382_1 similarity index 100% rename from tests/bugs/heal/bug29382 rename to tests/bugs/heal/bug29382_1 diff --git a/tests/bugs/heal/bug29382_2 b/tests/bugs/heal/bug29382_2 new file mode 100644 index 0000000000..e9a6d47353 --- /dev/null +++ b/tests/bugs/heal/bug29382_2 @@ -0,0 +1,24 @@ +puts "================================================================================" +puts "OCC29382: ShapeUpgrade_UnifySameDomain algorithm incorrectly processes the shape" +puts "================================================================================" +puts "" + +restore [locate_data_file bug29382_Group_3.brep] a + +unifysamedom result a +b + +checkshape result +checkshape a + +checknbshapes result -solid 3 -shell 3 -face 16 -wire 16 -edge 30 -vertex 18 + +set tolres [checkmaxtol result] + +if { ${tolres} > 1.8066863810061599e-05} { + puts "Error: bad tolerance of result" +} + +explode result +checkprops result_1 -v 4.41996e-06 +checkprops result_2 -v 1.30453e-06 +checkprops result_3 -v 1.16532e-06 diff --git a/tests/bugs/heal/bug29382_3 b/tests/bugs/heal/bug29382_3 new file mode 100644 index 0000000000..6fcd5a6f57 --- /dev/null +++ b/tests/bugs/heal/bug29382_3 @@ -0,0 +1,24 @@ +puts "================================================================================" +puts "OCC29382: ShapeUpgrade_UnifySameDomain algorithm incorrectly processes the shape" +puts "================================================================================" +puts "" + +beziercurve a 5 0 0 0 1 0 0 2 2 0 0 0.5 0 0 0 0 +mkedge a a +wire a a +mkplane a a +prism a a 0 0 1 +box b -0.3 -0.2 0 1 0.4 1 +bcommon shape a b + +unifysamedom result shape +b + +checkshape result + +checknbshapes result -solid 1 -shell 1 -face 5 -wire 5 -edge 9 -vertex 5 + +set tolres [checkmaxtol result] + +if { ${tolres} > 6.e-6} { + puts "Error: bad tolerance of result" +} From 8dee83b0f34237ace6e0d45caab468751a37b148 Mon Sep 17 00:00:00 2001 From: vro Date: Thu, 17 Feb 2022 08:35:26 +0300 Subject: [PATCH 217/639] 0032840: Application Framework, copying of a scaled shape fails A flag not to raise an exception is set for a copying shape. A reason: if a shape is already in the model, the user should have an opportunity to copy it. Modified files: TNaming_CopyShape.cxx, the method Translate(). A false-flag is used on copying of location of the shape. --- src/TNaming/TNaming_CopyShape.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/TNaming/TNaming_CopyShape.cxx b/src/TNaming/TNaming_CopyShape.cxx index 75da8c2afc..4ebb16a607 100644 --- a/src/TNaming/TNaming_CopyShape.cxx +++ b/src/TNaming/TNaming_CopyShape.cxx @@ -128,7 +128,7 @@ void TNaming_CopyShape::Translate( const TopoDS_Shape& aShape, } aResult.Orientation(aShape.Orientation()); - aResult.Location(TNaming_CopyShape::Translate(aShape.Location(), aMap)); + aResult.Location(TNaming_CopyShape::Translate(aShape.Location(), aMap), false); TrTool->UpdateShape(aShape,aResult); // #ifdef OCCT_DEBUG // if(fShar) { From 600ee856316c1a9eb340779b32de511b74465896 Mon Sep 17 00:00:00 2001 From: jgv Date: Tue, 15 Feb 2022 00:41:00 +0300 Subject: [PATCH 218/639] 0032814: Modeling algorithms - Unifysamedom produces invalid result Minor correction in ShapeUpgrade_UnifySameDomain::IntUnifyFaces: correct collecting splitting vertices in the new wire --- .../ShapeUpgrade_UnifySameDomain.cxx | 18 ++++++++++++++- tests/bugs/heal/bug32814_1 | 23 +++++++++++++++++++ tests/bugs/heal/bug32814_2 | 23 +++++++++++++++++++ 3 files changed, 63 insertions(+), 1 deletion(-) create mode 100644 tests/bugs/heal/bug32814_1 create mode 100644 tests/bugs/heal/bug32814_2 diff --git a/src/ShapeUpgrade/ShapeUpgrade_UnifySameDomain.cxx b/src/ShapeUpgrade/ShapeUpgrade_UnifySameDomain.cxx index bd314351b5..f52a1315f4 100644 --- a/src/ShapeUpgrade/ShapeUpgrade_UnifySameDomain.cxx +++ b/src/ShapeUpgrade/ShapeUpgrade_UnifySameDomain.cxx @@ -103,6 +103,19 @@ IMPLEMENT_STANDARD_RTTIEXT(ShapeUpgrade_UnifySameDomain,Standard_Transient) +static Standard_Boolean IsOnSingularity(const TopTools_ListOfShape& theEdgeList) +{ + TopTools_ListIteratorOfListOfShape anItl (theEdgeList); + for (; anItl.More(); anItl.Next()) + { + const TopoDS_Edge& anEdge = TopoDS::Edge (anItl.Value()); + if (BRep_Tool::Degenerated (anEdge)) + return Standard_True; + } + + return Standard_False; +} + static void SplitWire (const TopoDS_Wire& theWire, const TopoDS_Face& theFace, const TopTools_IndexedMapOfShape& theVmap, @@ -3292,6 +3305,10 @@ void ShapeUpgrade_UnifySameDomain::IntUnifyFaces(const TopoDS_Shape& theInpShape if (NextEdge.IsNull()) { Standard_Boolean EndOfWire = Standard_False; + + Standard_Boolean anIsOnSingularity = IsOnSingularity (Elist); + if (!anIsOnSingularity && Elist.Extent() > 1) + SplittingVertices.Add (CurVertex); TopTools_ListOfShape TmpElist, TrueElist; // will be the list of candidates to become @@ -3311,7 +3328,6 @@ void ShapeUpgrade_UnifySameDomain::IntUnifyFaces(const TopoDS_Shape& theInpShape else { //we must choose the closest direction - the biggest angle - SplittingVertices.Add (CurVertex); Standard_Real MaxAngle = RealFirst(); TopoDS_Edge TrueEdge; Handle(Geom2d_Curve) CurPCurve = BRep_Tool::CurveOnSurface(CurEdge, F_RefFace, fpar, lpar); diff --git a/tests/bugs/heal/bug32814_1 b/tests/bugs/heal/bug32814_1 new file mode 100644 index 0000000000..d4225f42a7 --- /dev/null +++ b/tests/bugs/heal/bug32814_1 @@ -0,0 +1,23 @@ +puts "==============================================" +puts "OCC32814: Unifysamedom produces invalid result" +puts "==============================================" +puts "" + +restore [locate_data_file bug32814_1.brep] s + +unifysamedom result s -a 1e-4 + +checkshape result +bopargcheck result + +checknbshapes result -t -face 7 -wire 13 -edge 70 -vertex 64 + +set tolres [checkmaxtol result] + +if { ${tolres} > 1.e-7} { + puts "Error: bad tolerance of result" +} + +checkprops result -s 5.54082e+06 + +checkview -display result -2d -path ${imagedir}/${test_image}.png \ No newline at end of file diff --git a/tests/bugs/heal/bug32814_2 b/tests/bugs/heal/bug32814_2 new file mode 100644 index 0000000000..96f6b4dd78 --- /dev/null +++ b/tests/bugs/heal/bug32814_2 @@ -0,0 +1,23 @@ +puts "==============================================" +puts "OCC32814: Unifysamedom produces invalid result" +puts "==============================================" +puts "" + +restore [locate_data_file bug32814_2.brep] s + +unifysamedom result s + +checkshape result +bopargcheck result + +checknbshapes result -t -solid 1 -shell 1 -face 78 -wire 110 -edge 220 -vertex 136 + +set tolres [checkmaxtol result] + +if { ${tolres} > 2.e-7} { + puts "Error: bad tolerance of result" +} + +checkprops result -s 1.61456e+06 -v 3e+07 + +checkview -display result -2d -path ${imagedir}/${test_image}.png \ No newline at end of file From cfde7eebb37b82900f29fd5da99a008bac8d5aa3 Mon Sep 17 00:00:00 2001 From: knosulko Date: Mon, 15 Nov 2021 17:02:03 +0300 Subject: [PATCH 219/639] 0024418: Modeling Algorithms - Wrong section curves when intersecting analytical surfaces IntPatch_ALineToWLine.cxx - setting minimal number of points in a WLine depending on step size IntPatch_WLineTool.cxx - fix WLines connecting check condition test cases has been changed according to new behavior --- src/IntPatch/IntPatch_ALineToWLine.cxx | 64 +++++++++++++++++++++- src/IntPatch/IntPatch_WLineTool.cxx | 76 +++++++++++++++++++++++--- tests/bugs/modalg_1/bug10606_1 | 2 +- tests/bugs/modalg_1/bug10606_2 | 2 +- tests/bugs/modalg_1/bug10606_3 | 2 +- tests/bugs/modalg_1/bug10606_4 | 2 +- tests/bugs/modalg_1/bug10606_5 | 2 +- tests/bugs/modalg_1/bug10842_5 | 2 +- tests/bugs/modalg_2/bug20964_1 | 2 +- tests/bugs/modalg_2/bug20964_2 | 2 +- tests/bugs/modalg_2/bug20964_3 | 2 +- tests/bugs/modalg_2/bug20964_4 | 2 +- tests/bugs/modalg_2/bug20964_5 | 2 +- tests/bugs/modalg_5/bug25715_3 | 4 +- tests/bugs/modalg_6/bug28626_3 | 2 +- tests/lowalgos/intss/bug24418_1 | 2 - 16 files changed, 143 insertions(+), 27 deletions(-) diff --git a/src/IntPatch/IntPatch_ALineToWLine.cxx b/src/IntPatch/IntPatch_ALineToWLine.cxx index 59cbff38ae..8d9480f3b0 100644 --- a/src/IntPatch/IntPatch_ALineToWLine.cxx +++ b/src/IntPatch/IntPatch_ALineToWLine.cxx @@ -433,10 +433,32 @@ void IntPatch_ALineToWLine::MakeWLine(const Handle(IntPatch_ALine)& theALine, if(aStep < Epsilon(theLPar)) break; + Standard_Boolean isStepReduced = Standard_False; + Standard_Real aLPar = theLPar; + + for (Standard_Integer i = aVertexParams.Lower(); i <= aVertexParams.Upper(); i++) + { + if (hasVertexBeenChecked(i)) + continue; + + aLPar = aVertexParams(i); + if (Abs(aLPar - aParameter) < aPrmTol) + continue; + + break; + } + + if ((aStep - (aLPar - aParameter) > aPrmTol) && + (Abs(aLPar - aParameter) > aPrmTol)) + { + aStep = Max((aLPar - aParameter) / 5, 1.e-5); + isStepReduced = Standard_True; + } + Standard_Integer aNewVertID = 0; aLinOn2S = new IntSurf_LineOn2S; - const Standard_Real aStepMin = 0.1*aStep, aStepMax = 10.0*aStep; + Standard_Real aStepMin = 0.1 * aStep, aStepMax = 10.0 * aStep; Standard_Boolean isLast = Standard_False; Standard_Real aPrevParam = aParameter; @@ -586,8 +608,12 @@ void IntPatch_ALineToWLine::MakeWLine(const Handle(IntPatch_ALine)& theALine, { if (isPointValid) { - StepComputing(theALine, aPOn2S, theLPar, aParameter, aTgMagn, - aStepMin, aStepMax, myTol3D, aStep); + if (!isStepReduced) + { + StepComputing(theALine, aPOn2S, theLPar, aParameter, aTgMagn, + aStepMin, aStepMax, myTol3D, aStep); + } + AddPointIntoLine(aLinOn2S, anArrPeriods, aPOn2S); aPrevLPoint = aPOn2S; } @@ -694,6 +720,38 @@ void IntPatch_ALineToWLine::MakeWLine(const Handle(IntPatch_ALine)& theALine, if ((aPrePointExist != IntPatch_SPntNone) && (aLinOn2S->NbPoints() > 1)) break; + + if (isStepReduced) + { + isStepReduced = Standard_False; + + aStep = (theLPar - aParameter) / (Standard_Real)(myNbPointsInWline - 1); + if(aStep < Epsilon(theLPar)) + break; + + aLPar = aVertexParams(aNbVert); + for (Standard_Integer i = aVertexParams.Lower(); i <= aVertexParams.Upper(); i++) + { + if (hasVertexBeenChecked(i)) + continue; + + aLPar = aVertexParams(i); + if (Abs(aLPar - aParameter) < aPrmTol) + continue; + + break; + } + + if ((aStep - (aLPar - aParameter) > aPrmTol) && + (Abs(aLPar - aParameter) > aPrmTol)) + { + aStep = Max((aLPar - aParameter) / 5, 1.e-5); + isStepReduced = Standard_True; + } + + aStepMin = 0.1 * aStep; + aStepMax = 10.0 * aStep; + } }//for(; !isLast; aParameter += aStep) if(aLinOn2S->NbPoints() < 2) diff --git a/src/IntPatch/IntPatch_WLineTool.cxx b/src/IntPatch/IntPatch_WLineTool.cxx index 5e9e0103cc..9132bf33e0 100644 --- a/src/IntPatch/IntPatch_WLineTool.cxx +++ b/src/IntPatch/IntPatch_WLineTool.cxx @@ -1717,6 +1717,38 @@ void IntPatch_WLineTool::JoinWLines(IntPatch_SequenceOfLine& theSlin, } } +//======================================================================= +//function : IsNeedSkipWL +//purpose : Detect is WLine need to skip. +//======================================================================= +static Standard_Boolean IsNeedSkipWL(const Handle(IntPatch_WLine)& theWL, + const Bnd_Box2d& theBoxS1, + const Bnd_Box2d& theBoxS2, + const Standard_Real* const theArrPeriods) +{ + Standard_Real aFirstp, aLastp; + Standard_Integer aNbVtx = theWL->NbVertex(); + Standard_Boolean isNeedSkip = Standard_True; + + for (Standard_Integer i = 1; i < aNbVtx; i++) { + aFirstp = theWL->Vertex (i).ParameterOnLine(); + aLastp = theWL->Vertex (i + 1).ParameterOnLine(); + + Standard_Real aU1, aV1, aU2, aV2; + const Standard_Integer pmid = (Standard_Integer)((aFirstp + aLastp) / 2); + const IntSurf_PntOn2S& aPmid = theWL->Point (pmid); + aPmid.Parameters (aU1, aV1, aU2, aV2); + + if (!IsOutOfDomain (theBoxS1, theBoxS2, aPmid, theArrPeriods)) + { + isNeedSkip = Standard_False; + break; + } + } + + return isNeedSkip; +} + //======================================================================= //function : ExtendTwoWLines //purpose : Performs extending theWLine1 and theWLine2 through their @@ -1737,8 +1769,17 @@ void IntPatch_WLineTool:: gp_Vec aVec1, aVec2, aVec3; + unsigned int hasBeenJoinedCounter = 0; + for(Standard_Integer aNumOfLine1 = 1; aNumOfLine1 <= theSlin.Length(); aNumOfLine1++) { + if (hasBeenJoinedCounter > 0) + { + aNumOfLine1--; + } + + hasBeenJoinedCounter = 0; + Handle(IntPatch_WLine) aWLine1 (Handle(IntPatch_WLine):: DownCast(theSlin.Value(aNumOfLine1))); @@ -1761,6 +1802,11 @@ void IntPatch_WLineTool:: const IntSurf_PntOn2S& aPntLWL1 = aWLine1->Point(aNbPntsWL1); const IntSurf_PntOn2S& aPntLm1WL1 = aWLine1->Point(aNbPntsWL1-1); + if (IsNeedSkipWL(aWLine1, theBoxS1, theBoxS2, theArrPeriods)) + { + continue; + } + //Enable/Disable of some ckeck. Bit-mask is used for it. //E.g. if 1st point of aWLine1 matches with //1st point of aWLine2 then we do not need in check @@ -1781,16 +1827,24 @@ void IntPatch_WLineTool:: const IntSurf_PntOn2S& aPntFWL2 = aWLine2->Point(1); const IntSurf_PntOn2S& aPntLWL2 = aWLine2->Point(aWLine2->NbPnts()); - if( aPntFWL1.IsSame(aPntFWL2, theToler3D) || - aPntFWL1.IsSame(aPntLWL2, theToler3D) ) + if (!(aPntFWL1.IsSame(aPntFWL2, theToler3D, Precision::PConfusion())) && + !(aPntFWL1.IsSame(aPntLWL2, theToler3D, Precision::PConfusion()))) { - aCheckResult |= IntPatchWT_DisFirstFirst | IntPatchWT_DisFirstLast; + if (aPntFWL1.IsSame(aPntFWL2, theToler3D) || + aPntFWL1.IsSame(aPntLWL2, theToler3D)) + { + aCheckResult |= IntPatchWT_DisFirstFirst | IntPatchWT_DisFirstLast; + } } - if( aPntLWL1.IsSame(aPntFWL2, theToler3D) || - aPntLWL1.IsSame(aPntFWL2, theToler3D)) + if (!(aPntLWL1.IsSame(aPntFWL2, theToler3D, Precision::PConfusion())) && + !(aPntLWL1.IsSame(aPntLWL2, theToler3D, Precision::PConfusion()))) { - aCheckResult |= IntPatchWT_DisLastFirst | IntPatchWT_DisLastLast; + if (aPntLWL1.IsSame(aPntFWL2, theToler3D) || + aPntLWL1.IsSame(aPntLWL2, theToler3D)) + { + aCheckResult |= IntPatchWT_DisLastFirst | IntPatchWT_DisLastLast; + } } if (!theListOfCriticalPoints.IsEmpty()) @@ -1862,8 +1916,13 @@ void IntPatch_WLineTool:: const IntSurf_PntOn2S& aPntLWL2 = aWLine2->Point(aNbPntsWL2); const IntSurf_PntOn2S& aPntLm1WL2 = aWLine2->Point(aNbPntsWL2-1); - - //if(!(aCheckResult & IntPatchWT_DisFirstFirst)) + + if (IsNeedSkipWL(aWLine2, theBoxS1, theBoxS2, theArrPeriods)) + { + continue; + } + + if(!(aCheckResult & IntPatchWT_DisFirstFirst)) {// First/First aVec1.SetXYZ(aPntFp1WL1.Value().XYZ() - aPntFWL1.Value().XYZ()); aVec2.SetXYZ(aPntFWL2.Value().XYZ() - aPntFp1WL2.Value().XYZ()); @@ -1909,6 +1968,7 @@ void IntPatch_WLineTool:: if(hasBeenJoined) { + hasBeenJoinedCounter++; theSlin.Remove(aNumOfLine2); aNumOfLine2--; } diff --git a/tests/bugs/modalg_1/bug10606_1 b/tests/bugs/modalg_1/bug10606_1 index b54e243bfb..d6b7c4e0b9 100755 --- a/tests/bugs/modalg_1/bug10606_1 +++ b/tests/bugs/modalg_1/bug10606_1 @@ -22,5 +22,5 @@ checkprops result -s 66.672 checkshape result # Analysis of "nbshapes res" -checknbshapes result -vertex 6 -edge 8 -wire 2 -face 2 -shell 1 -solid 1 -compsolid 0 -compound 1 -shape 21 +checknbshapes result -vertex 5 -edge 7 -wire 2 -face 2 -shell 1 -solid 1 -compsolid 0 -compound 1 -shape 19 checkview -display result -2d -path ${imagedir}/${test_image}.png diff --git a/tests/bugs/modalg_1/bug10606_2 b/tests/bugs/modalg_1/bug10606_2 index fb9d06c59e..a8a1b8e52e 100755 --- a/tests/bugs/modalg_1/bug10606_2 +++ b/tests/bugs/modalg_1/bug10606_2 @@ -22,5 +22,5 @@ checkprops result -s 1450.22 checkshape result # Analysis of "nbshapes res" -checknbshapes result -vertex 6 -edge 8 -wire 4 -face 4 -shell 1 -solid 1 -compsolid 0 -compound 1 -shape 25 +checknbshapes result -vertex 5 -edge 7 -wire 4 -face 4 -shell 1 -solid 1 -compsolid 0 -compound 1 -shape 23 checkview -display result -2d -path ${imagedir}/${test_image}.png diff --git a/tests/bugs/modalg_1/bug10606_3 b/tests/bugs/modalg_1/bug10606_3 index e3b85ede1c..e93912ca41 100755 --- a/tests/bugs/modalg_1/bug10606_3 +++ b/tests/bugs/modalg_1/bug10606_3 @@ -22,5 +22,5 @@ checkprops result -s 761.355 checkshape result # Analysis of "nbshapes res" -checknbshapes result -vertex 6 -edge 8 -wire 3 -face 3 -shell 1 -solid 1 -compsolid 0 -compound 1 -shape 23 +checknbshapes result -vertex 5 -edge 7 -wire 3 -face 3 -shell 1 -solid 1 -compsolid 0 -compound 1 -shape 21 checkview -display result -2d -path ${imagedir}/${test_image}.png diff --git a/tests/bugs/modalg_1/bug10606_4 b/tests/bugs/modalg_1/bug10606_4 index 4e482e6203..fd7e0db5dd 100755 --- a/tests/bugs/modalg_1/bug10606_4 +++ b/tests/bugs/modalg_1/bug10606_4 @@ -22,5 +22,5 @@ checkprops result -s 755.54 checkshape result # Analysis of "nbshapes res" -checknbshapes result -vertex 6 -edge 8 -wire 3 -face 3 -shell 1 -solid 1 -compsolid 0 -compound 1 -shape 23 +checknbshapes result -vertex 5 -edge 7 -wire 3 -face 3 -shell 1 -solid 1 -compsolid 0 -compound 1 -shape 21 checkview -display result -2d -path ${imagedir}/${test_image}.png diff --git a/tests/bugs/modalg_1/bug10606_5 b/tests/bugs/modalg_1/bug10606_5 index 93e561ba85..494b5a317f 100755 --- a/tests/bugs/modalg_1/bug10606_5 +++ b/tests/bugs/modalg_1/bug10606_5 @@ -22,5 +22,5 @@ checkprops result -l 18.3861 checkshape result checksection result # Analysis of "nbshapes res" -checknbshapes result -vertex 4 -edge 4 -wire 0 -face 0 -shell 0 -solid 0 -compsolid 0 -compound 1 -shape 9 +checknbshapes result -vertex 3 -edge 3 -wire 0 -face 0 -shell 0 -solid 0 -compsolid 0 -compound 1 -shape 7 checkview -display result -2d -path ${imagedir}/${test_image}.png diff --git a/tests/bugs/modalg_1/bug10842_5 b/tests/bugs/modalg_1/bug10842_5 index 26ec4e68ee..6257e9a92a 100755 --- a/tests/bugs/modalg_1/bug10842_5 +++ b/tests/bugs/modalg_1/bug10842_5 @@ -22,5 +22,5 @@ checkprops result -l 122.816 checkshape result checksection result # Analysis of "nbshapes res" -checknbshapes result -vertex 6 -edge 6 -wire 0 -face 0 -shell 0 -solid 0 -compsolid 0 -compound 1 -shape 13 +checknbshapes result -vertex 5 -edge 5 -wire 0 -face 0 -shell 0 -solid 0 -compsolid 0 -compound 1 -shape 11 checkview -display result -2d -path ${imagedir}/${test_image}.png diff --git a/tests/bugs/modalg_2/bug20964_1 b/tests/bugs/modalg_2/bug20964_1 index 5498d877c7..defacfb9ab 100755 --- a/tests/bugs/modalg_2/bug20964_1 +++ b/tests/bugs/modalg_2/bug20964_1 @@ -33,6 +33,6 @@ Number of shapes in .* " checknbshapes result -ref $NbShapesRef -checkmaxtol result -ref 0.013928665225777443 +checkmaxtol result -ref 2.0849512334752456e-05 checkview -display result -2d -path ${imagedir}/${test_image}.png diff --git a/tests/bugs/modalg_2/bug20964_2 b/tests/bugs/modalg_2/bug20964_2 index 3b80f1addb..e21e43dab4 100755 --- a/tests/bugs/modalg_2/bug20964_2 +++ b/tests/bugs/modalg_2/bug20964_2 @@ -33,7 +33,7 @@ Number of shapes in .* checknbshapes result -ref $NbShapesRef -checkmaxtol result -ref 0.013928665225777443 +checkmaxtol result -ref 2.0849512334752456e-05 checkview -display result -2d -path ${imagedir}/${test_image}_axo.png diff --git a/tests/bugs/modalg_2/bug20964_3 b/tests/bugs/modalg_2/bug20964_3 index 54e744cd78..960c5b9cb1 100755 --- a/tests/bugs/modalg_2/bug20964_3 +++ b/tests/bugs/modalg_2/bug20964_3 @@ -33,7 +33,7 @@ Number of shapes in .* checknbshapes result -ref $NbShapesRef -checkmaxtol result -ref 0.013928665225777443 +checkmaxtol result -ref 2.0849512334752456e-05 checkview -display result -2d -path ${imagedir}/${test_image}_axo.png diff --git a/tests/bugs/modalg_2/bug20964_4 b/tests/bugs/modalg_2/bug20964_4 index d803d4e56b..9ad925f323 100755 --- a/tests/bugs/modalg_2/bug20964_4 +++ b/tests/bugs/modalg_2/bug20964_4 @@ -32,7 +32,7 @@ Number of shapes in .* " checknbshapes result -ref $NbShapesRef -checkmaxtol result -ref 0.013928665225777443 +checkmaxtol result -ref 2.0849512334752456e-05 checkview -display result -2d -path ${imagedir}/${test_image}_axo.png diff --git a/tests/bugs/modalg_2/bug20964_5 b/tests/bugs/modalg_2/bug20964_5 index 4601eaf834..11abf56981 100755 --- a/tests/bugs/modalg_2/bug20964_5 +++ b/tests/bugs/modalg_2/bug20964_5 @@ -33,7 +33,7 @@ Number of shapes in .* checknbshapes result -ref $NbShapesRef -checkmaxtol result -ref 0.013928665225777443 +checkmaxtol result -ref 2.0849512334752456e-05 checkview -display result -2d -path ${imagedir}/${test_image}_axo.png diff --git a/tests/bugs/modalg_5/bug25715_3 b/tests/bugs/modalg_5/bug25715_3 index f48acb8d9f..851f92dedd 100644 --- a/tests/bugs/modalg_5/bug25715_3 +++ b/tests/bugs/modalg_5/bug25715_3 @@ -1,4 +1,3 @@ -puts "TODO OCC24418 ALL: Error : is WRONG because number of" puts "==========" puts "OCC25715" puts "==========" @@ -11,6 +10,7 @@ puts "" restore [locate_data_file bug25715_p02c3s1.brep] s1 restore [locate_data_file bug25715_p02c3s3.brep] s3 bfuse result s1 s3 +unifysamedom result result +b -checknbshapes result -vertex 8 -edge 14 -wire 6 -face 5 -shell 1 -solid 1 -compsolid 0 -compound 1 -shape 36 +checknbshapes result -vertex 6 -edge 9 -wire 5 -face 4 -shell 1 -solid 1 -compsolid 0 -compound 1 -shape 27 checkview -display result -2d -path ${imagedir}/${test_image}.png diff --git a/tests/bugs/modalg_6/bug28626_3 b/tests/bugs/modalg_6/bug28626_3 index 893aa7d0f8..1a25d0ec8c 100644 --- a/tests/bugs/modalg_6/bug28626_3 +++ b/tests/bugs/modalg_6/bug28626_3 @@ -20,7 +20,7 @@ bopsection result checkshape result -checknbshapes result -edge 5 -vertex 6 +checknbshapes result -edge 4 -vertex 5 checkmaxtol result -ref 6.02982e-007 diff --git a/tests/lowalgos/intss/bug24418_1 b/tests/lowalgos/intss/bug24418_1 index 6c058615df..e85f3cee76 100644 --- a/tests/lowalgos/intss/bug24418_1 +++ b/tests/lowalgos/intss/bug24418_1 @@ -1,5 +1,3 @@ -puts "TODO OCC24418 ALL: Error in ii_2: T=" - puts "========" puts "OCC24418" puts "========" From b91e601442d983e76c63bb54039193e9f35e94d8 Mon Sep 17 00:00:00 2001 From: vro Date: Fri, 18 Feb 2022 18:08:24 +0300 Subject: [PATCH 220/639] 0032785: Application Framework - CDF_Store::SetFolder incorrectly processes relative paths on Linux The code is simplified - it checks the last character and if it is a folder separator, it removes it. Modified file: - CDF_Store.cxx, the method SetFolder(). 0032785: Application Framework - CDF_Store::SetFolder incorrectly processes relative paths on Linux The code is simplified - it checks the last character and if it is a folder separator, it removes it. Modified file: - CDF_Store.cxx, the method SetFolder(). 0032785: Application Framework - CDF_Store::SetFolder incorrectly processes relative paths on Linux The code is simplified - it checks the last character and if it is a folder separator, it removes it. // Also, variable 'l' is renamed to 'aLen'. // And a check on the number of characters is added to avoid removal of the root folder ('/'). Modified file: - CDF_Store.cxx, the method SetFolder(). --- src/CDF/CDF_Store.cxx | 18 +++++------------- 1 file changed, 5 insertions(+), 13 deletions(-) diff --git a/src/CDF/CDF_Store.cxx b/src/CDF/CDF_Store.cxx index 197e312453..78260c2245 100644 --- a/src/CDF/CDF_Store.cxx +++ b/src/CDF/CDF_Store.cxx @@ -78,19 +78,11 @@ Standard_Boolean CDF_Store::SetFolder(const Standard_ExtString aFolder) { Standard_Boolean CDF_Store::SetFolder(const TCollection_ExtendedString& aFolder) { TCollection_ExtendedString theFolder(aFolder); - Standard_Integer l = theFolder.Length(); - - // if the last character is the folder separator (which is always the first character) - // it is removed. - // This is correct for Unix systems but not for Windows! VMS and MAC? Thomas Haller, 23.11.01 - if(l > 1) { -#ifndef _WIN32 - if(theFolder.Value(l) == theFolder.Value(1)) theFolder.Trunc(l-1); -#else - if (theFolder.Value(l) == '/' || theFolder.Value(l) == '\\') - theFolder.Trunc(l-1); -#endif - } + Standard_Integer aLen = theFolder.Length(); + + // if the last character is the folder separator, remove it. + if (aLen > 1 && (theFolder.Value(aLen) == '/' || theFolder.Value(aLen) == '\\')) + theFolder.Trunc(aLen-1); if(theMetaDataDriver->FindFolder(theFolder)) { myCurrentDocument->SetRequestedFolder(theFolder); From 5a846a5d2c8d71c3b78114b1faa19ef5b03c19b7 Mon Sep 17 00:00:00 2001 From: vro Date: Mon, 21 Feb 2022 10:41:05 +0300 Subject: [PATCH 221/639] 0029219: Application Framework - XML document is written with CRLF on Windows The last symbol of a line is synchronized with external products. Also, XML ends by LF now. Modified: XML: XmlLDrivers_DocumentStorageDriver::Write() ends by LF BREP: BRepTools::Write(), Draw_VariableCommands::save() ends by LF STEP: StepSelect_WorkLibrary::WriteFile() ends by LF IGES: IGESSelect_WorkLibrary::WriteFile(), IGESControl_Writer::Write(), XSDRAWIGES::WriteShape() ends by LF VRML: VrmlAPI_Writer::write_v2() ends by LF 0029219: Application Framework - XML document is written with CRLF on Windows The last symbol of a line is synchronized with external products. Also, XML ends by LF now. Modified: XML: XmlLDrivers_DocumentStorageDriver::Write() ends by LF BREP: BRepTools::Write(), Draw_VariableCommands::save() ends by LF STEP: StepSelect_WorkLibrary::WriteFile() ends by LF IGES: IGESSelect_WorkLibrary::WriteFile(), IGESControl_Writer::Write(), XSDRAWIGES::WriteShape() ends by LF VRML: VrmlAPI_Writer::write_v2() ends by LF STL: RWStl::WriteAscii() ends by CR LF (to synchronize with Blender) 0029219: Application Framework - XML document is written with CRLF on Windows The last symbol of a line is synchronized with external products. Also, XML ends by LF now. Modified: XML: XmlLDrivers_DocumentStorageDriver::Write() ends by LF BREP: BRepTools::Write(), Draw_VariableCommands::save() ends by LF STEP: StepSelect_WorkLibrary::WriteFile() ends by LF IGES: IGESSelect_WorkLibrary::WriteFile(), IGESControl_Writer::Write(), XSDRAWIGES::WriteShape() ends by LF VRML: VrmlAPI_Writer::write_v2() ends by LF --- src/BRepTools/BRepTools.cxx | 2 +- src/Draw/Draw_VariableCommands.cxx | 2 +- src/IGESControl/IGESControl_Writer.cxx | 2 +- src/IGESSelect/IGESSelect_WorkLibrary.cxx | 2 +- src/StepSelect/StepSelect_WorkLibrary.cxx | 2 +- src/VrmlAPI/VrmlAPI_Writer.cxx | 6 +++--- src/XSDRAWIGES/XSDRAWIGES.cxx | 2 +- src/XmlLDrivers/XmlLDrivers_DocumentStorageDriver.cxx | 2 +- 8 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/BRepTools/BRepTools.cxx b/src/BRepTools/BRepTools.cxx index 37b11db375..de3716bd97 100644 --- a/src/BRepTools/BRepTools.cxx +++ b/src/BRepTools/BRepTools.cxx @@ -695,7 +695,7 @@ Standard_Boolean BRepTools::Write (const TopoDS_Shape& theShape, const Message_ProgressRange& theProgress) { const Handle(OSD_FileSystem)& aFileSystem = OSD_FileSystem::DefaultFileSystem(); - std::shared_ptr aStream = aFileSystem->OpenOStream (theFile, std::ios::out); + std::shared_ptr aStream = aFileSystem->OpenOStream (theFile, std::ios::out | std::ios::binary); if (aStream.get() == NULL || !aStream->good()) { return Standard_False; diff --git a/src/Draw/Draw_VariableCommands.cxx b/src/Draw/Draw_VariableCommands.cxx index 8f0b4f68ec..473b212887 100644 --- a/src/Draw/Draw_VariableCommands.cxx +++ b/src/Draw/Draw_VariableCommands.cxx @@ -92,7 +92,7 @@ static Standard_Integer save (Draw_Interpretor& theDI, const char* aName = theArgVec[2]; const Handle(OSD_FileSystem)& aFileSystem = OSD_FileSystem::DefaultFileSystem(); - std::shared_ptr aStream = aFileSystem->OpenOStream (aName, std::ios::out); + std::shared_ptr aStream = aFileSystem->OpenOStream (aName, std::ios::out | std::ios::binary); aStream->precision (15); if (aStream.get() == NULL || !aStream->good()) { diff --git a/src/IGESControl/IGESControl_Writer.cxx b/src/IGESControl/IGESControl_Writer.cxx index 735f49ac06..c59f645a27 100644 --- a/src/IGESControl/IGESControl_Writer.cxx +++ b/src/IGESControl/IGESControl_Writer.cxx @@ -254,7 +254,7 @@ Standard_Boolean IGESControl_Writer::Write (const Standard_CString file, const Standard_Boolean fnes) { const Handle(OSD_FileSystem)& aFileSystem = OSD_FileSystem::DefaultFileSystem(); - std::shared_ptr aStream = aFileSystem->OpenOStream (file, std::ios::out); + std::shared_ptr aStream = aFileSystem->OpenOStream (file, std::ios::out | std::ios::binary); if (aStream.get() == NULL) { return Standard_False; diff --git a/src/IGESSelect/IGESSelect_WorkLibrary.cxx b/src/IGESSelect/IGESSelect_WorkLibrary.cxx index 50f583078c..9bfbbd2107 100644 --- a/src/IGESSelect/IGESSelect_WorkLibrary.cxx +++ b/src/IGESSelect/IGESSelect_WorkLibrary.cxx @@ -102,7 +102,7 @@ static Handle(IGESData_FileProtocol) IGESProto; if (igesmod.IsNull() || prot.IsNull()) return Standard_False; const Handle(OSD_FileSystem)& aFileSystem = OSD_FileSystem::DefaultFileSystem(); - std::shared_ptr aStream = aFileSystem->OpenOStream (ctx.FileName(), std::ios::out); + std::shared_ptr aStream = aFileSystem->OpenOStream (ctx.FileName(), std::ios::out | std::ios::binary); if (aStream.get() == NULL) { ctx.CCheck(0)->AddFail("IGES File could not be created"); diff --git a/src/StepSelect/StepSelect_WorkLibrary.cxx b/src/StepSelect/StepSelect_WorkLibrary.cxx index 6f672e13e3..66e8ee006c 100644 --- a/src/StepSelect/StepSelect_WorkLibrary.cxx +++ b/src/StepSelect/StepSelect_WorkLibrary.cxx @@ -99,7 +99,7 @@ Standard_Boolean StepSelect_WorkLibrary::WriteFile if (stepmodel.IsNull() || stepro.IsNull()) return Standard_False; const Handle(OSD_FileSystem)& aFileSystem = OSD_FileSystem::DefaultFileSystem(); - std::shared_ptr aStream = aFileSystem->OpenOStream (ctx.FileName(), std::ios::out | std::ios::trunc); + std::shared_ptr aStream = aFileSystem->OpenOStream (ctx.FileName(), std::ios::out | std::ios::binary | std::ios::trunc); if (aStream.get() == NULL) { ctx.CCheck(0)->AddFail("Step File could not be created"); diff --git a/src/VrmlAPI/VrmlAPI_Writer.cxx b/src/VrmlAPI/VrmlAPI_Writer.cxx index 0275a949de..f4a4f49a80 100644 --- a/src/VrmlAPI/VrmlAPI_Writer.cxx +++ b/src/VrmlAPI/VrmlAPI_Writer.cxx @@ -226,7 +226,7 @@ Standard_Boolean VrmlAPI_Writer::write_v1(const TopoDS_Shape& aShape,const Stand OSD_Path thePath(aFile); TCollection_AsciiString theFile;thePath.SystemName(theFile); const Handle(OSD_FileSystem)& aFileSystem = OSD_FileSystem::DefaultFileSystem(); - std::shared_ptr anOutFile = aFileSystem->OpenOStream (theFile, std::ios::out); + std::shared_ptr anOutFile = aFileSystem->OpenOStream (theFile, std::ios::out | std::ios::binary); if (anOutFile.get() == NULL) { return Standard_False; @@ -370,7 +370,7 @@ Standard_Boolean VrmlAPI_Writer::write_v2(const TopoDS_Shape& aShape,const Stand aConv.Convert(anExtFace, anExtEdge); const Handle(OSD_FileSystem)& aFileSystem = OSD_FileSystem::DefaultFileSystem(); - std::shared_ptr anOutStream = aFileSystem->OpenOStream (aFile, std::ios::out); + std::shared_ptr anOutStream = aFileSystem->OpenOStream (aFile, std::ios::out | std::ios::binary); if (anOutStream.get() != NULL) { *anOutStream << aScene; @@ -395,7 +395,7 @@ Standard_Boolean VrmlAPI_Writer::WriteDoc( aConv.ConvertDocument(theDoc); const Handle(OSD_FileSystem)& aFileSystem = OSD_FileSystem::DefaultFileSystem(); - std::shared_ptr anOutStream = aFileSystem->OpenOStream (theFile, std::ios::out); + std::shared_ptr anOutStream = aFileSystem->OpenOStream (theFile, std::ios::out | std::ios::binary); if (anOutStream.get() != NULL) { *anOutStream << aScene; diff --git a/src/XSDRAWIGES/XSDRAWIGES.cxx b/src/XSDRAWIGES/XSDRAWIGES.cxx index b0117bf3cb..571a2d74d2 100644 --- a/src/XSDRAWIGES/XSDRAWIGES.cxx +++ b/src/XSDRAWIGES/XSDRAWIGES.cxx @@ -76,7 +76,7 @@ void WriteShape(const TopoDS_Shape& shape, const Standard_Integer number) { char fname[110]; sprintf(fname, "Shape_%d",number); - std::ofstream f(fname,std::ios::out); + std::ofstream f(fname,std::ios::out | std::ios::binary); std::cout << "Output file name : " << fname << std::endl; f << "DBRep_DrawableShape\n"; diff --git a/src/XmlLDrivers/XmlLDrivers_DocumentStorageDriver.cxx b/src/XmlLDrivers/XmlLDrivers_DocumentStorageDriver.cxx index 271d4dcdd7..bd6a537ac7 100644 --- a/src/XmlLDrivers/XmlLDrivers_DocumentStorageDriver.cxx +++ b/src/XmlLDrivers/XmlLDrivers_DocumentStorageDriver.cxx @@ -99,7 +99,7 @@ void XmlLDrivers_DocumentStorageDriver::Write (const Handle(CDM_Document)& myFileName = theFileName; const Handle(OSD_FileSystem)& aFileSystem = OSD_FileSystem::DefaultFileSystem(); - std::shared_ptr aFileStream = aFileSystem->OpenOStream (theFileName, std::ios::out); + std::shared_ptr aFileStream = aFileSystem->OpenOStream (theFileName, std::ios::out | std::ios::binary); if (aFileStream.get() != NULL && aFileStream->good()) { Write (theDocument, *aFileStream, theRange); From e61aa824dbdbe2cdbdf3606827c136f3f70de90f Mon Sep 17 00:00:00 2001 From: kgv Date: Wed, 23 Feb 2022 20:50:40 +0300 Subject: [PATCH 222/639] 0032854: Documentation - minor clean-up of User Guide for XDE module Applied minor formatting improvements to `xde.md`. Fixed small misprints and artifacts in text. Removed redundant section "Working with XDE". --- dox/user_guides/xde/xde.md | 1360 ++++++++++++++++++++---------------- 1 file changed, 768 insertions(+), 592 deletions(-) diff --git a/dox/user_guides/xde/xde.md b/dox/user_guides/xde/xde.md index 333b4de86e..72056a2e63 100644 --- a/dox/user_guides/xde/xde.md +++ b/dox/user_guides/xde/xde.md @@ -1,123 +1,143 @@ - Extended Data Exchange (XDE) {#occt_user_guides__xde} +Extended Data Exchange (XDE) {#occt_user_guides__xde} ============================ @tableofcontents @section occt_xde_1 Introduction -This manual explains how to use the Extended Data Exchange (XDE). It provides basic documentation on setting up and using XDE. +This manual explains how to use the **eXtended Data Exchange** (XDE). +It provides basic documentation on setting up and using XDE. -The Extended Data Exchange (XDE) module allows extending the scope of exchange by translating additional data attached to geometric BREP data, thereby improving the interoperability with external software. +The Extended Data Exchange (XDE) module allows extending the scope of exchange by translating additional data attached to geometric BREP data, thereby improving the interoperability with external software. -Data types such as colors, layers, assembly descriptions and validation properties (i.e. center of gravity, etc.) are supported. These data are stored together with shapes in an XCAF document. It is also possible to add a new types of data taking the existing tools as prototypes. +Data types such as colors, layers, assembly descriptions and validation properties (i.e. center of gravity, etc.) are supported. +These data are stored together with shapes in an XCAF document. +It is also possible to add a new types of data taking the existing tools as prototypes. -Finally, the XDE provides reader and writer tools for reading and writing the data supported by XCAF to and from IGES and STEP files. +Finally, the XDE provides reader and writer tools for reading and writing the data supported by XCAF to and from IGES and STEP files. @figure{/user_guides/xde/images/646_xde_11_400.png,"Shape imported using XDE",240} -The XDE component requires @ref occt_user_guides__shape_healing "Shape Healing" toolkit for operation. +The XDE component requires @ref occt_user_guides__shape_healing "Shape Healing" toolkit for operation. @subsection occt_xde_1_1 Basic terms -For better understanding of XDE, certain key terms are defined: +For better understanding of XDE, certain key terms are defined: * **Shape** -- a standalone shape, which does not belong to the assembly structure. * **Instance** -- a replication of another shape with a location that can be the same location or a different one. -* **Assembly** -- a construction that is either a root or a sub-assembly. +* **Assembly** -- a construction that is either a root or a sub-assembly. @subsection occt_xde_1_2 XDE Organization -The basis of XDE, called XCAF, is a framework based on OCAF (Open CASCADE Technology Application Framework) and is intended to be used with assemblies and with various kinds of attached data (attributes). Attributes can be Individual attributes for a shape, specifying some characteristics of a shape, or they can be Grouping attributes, specifying that a shape belongs to a given group whose definition is specified apart from the shapes. +The basis of XDE, called XCAF, is a framework based on @ref occt_user_guides__ocaf "OCAF" (Open CASCADE Technology Application Framework) and is intended to be used with assemblies and with various kinds of attached data (attributes). +Attributes can be Individual attributes for a shape, specifying some characteristics of a shape, or they can be Grouping attributes, specifying that a shape belongs to a given group whose definition is specified apart from the shapes. -XDE works in an OCAF document with a specific organization defined in a dedicated XCAF module. This organization is used by various functions of XDE to exchange standardized data other than shapes and geometry. +XDE works in an OCAF document with a specific organization defined in a dedicated XCAF module. +This organization is used by various functions of XDE to exchange standardized data other than shapes and geometry. -The Assembly Structure and attributes assigned to shapes are stored in the OCAF tree. It is possible to obtain TopoDS representation for each level of the assembly in the form of *TopoDS_Compound* or *TopoDS_Shape* using the API. +The Assembly Structure and attributes assigned to shapes are stored in the OCAF tree. +It is possible to obtain `TopoDS` representation for each level of the assembly in the form of `TopoDS_Compound` or `TopoDS_Shape` using the API. -Basic elements used by XDE are introduced in the XCAF sub-module by the package XCAFDoc. These elements consist in descriptions of commonly used data structures (apart from the shapes themselves) in normalized data exchanges. They are not attached to specific applications and do not bring specific semantics, but are structured according to the use and needs of data exchanges. -The Document used by XDE usually starts as a *TDocStd_Document*. +Basic elements used by XDE are introduced in the XCAF sub-module by the package `XCAFDoc`. +These elements consist in descriptions of commonly used data structures (apart from the shapes themselves) in normalized data exchanges. +They are not attached to specific applications and do not bring specific semantics, but are structured according to the use and needs of data exchanges. +The Document used by XDE usually starts as a `TDocStd_Document`. @subsection occt_xde_1_3 Assemblies -XDE supports assemblies by separating shape definitions and their locations. Shapes are simple OCAF objects without a location definition. An assembly consists of several components. Each of these components references one and the same specified shape with different locations. All this provides an increased flexibility in working on multi-level assemblies. -For example, a mechanical assembly can be defined as follows: -@figure{/user_guides/xde/images/xde_image003.png,"Assembly Description",240} +XDE supports assemblies by separating shape definitions and their locations. +Shapes are simple OCAF objects without a location definition. +An assembly consists of several components. +Each of these components references one and the same specified shape with different locations. +All this provides an increased flexibility in working on multi-level assemblies. +For example, a mechanical assembly can be defined as follows: +@figure{/user_guides/xde/images/xde_image003.png,"Assembly Description",240} @figure{/user_guides/xde/images/xde_image004.png,"Assembly View",240} +XDE defines the specific organization of the assembly content. +Shapes are stored on sub-labels of label `0:1:1`. +There can be one or more roots (called free shapes) whether they are true trees or simple shapes. +A shape can be considered to be an Assembly (such as `AS1` under `0:1:1:1` in Figure1) if it is defined with Components (sub-shapes, located or not). -XDE defines the specific organization of the assembly content. Shapes are stored on sub-labels of label 0:1:1. There can be one or more roots (called free shapes) whether they are true trees or simple shapes. A shape can be considered to be an Assembly (such as AS1 under 0:1:1:1 in Figure1) if it is defined with Components (sub-shapes, located or not). - -*XCAFDoc_ShapeTool* is a tool that allows managing the Shape section of the XCAF document. This tool is implemented as an attribute and located at the root label of the shape section. +`XCAFDoc_ShapeTool` is a tool that allows managing the Shape section of the XCAF document. +This tool is implemented as an attribute and located at the root label of the shape section. @subsection occt_xde_1_4 Validation Properties -Validation properties are geometric characteristics of Shapes (volume, centroid, surface area) written to STEP files by the sending system. These characteristics are read by the receiving system to validate the quality of the translation. This is done by comparing the values computed by the original system with the same values computed by the receiving system on the resulting model. -Advanced Data Exchange supports both reading and writing of validation properties, and provides a tool to check them. - -@figure{/user_guides/xde/images/xde_image005.png,"Validation Property Descriptions",240} +Validation properties are geometric characteristics of Shapes (volume, centroid, surface area) written to STEP files by the sending system. +These characteristics are read by the receiving system to validate the quality of the translation. +This is done by comparing the values computed by the original system with the same values computed by the receiving system on the resulting model. -Check logs contain deviations of computed values from the values stored in a STEP file. A typical example appears as follows: - -| Label | Area defect | Volume defect | dX | dY | DZ | Name | -| :---- | :----- | :----- | :----- | :---- | :---- | :---- | -| 0:1:1:1 | 312.6 (0%) | -181.7 (0%) | 0.00 | 0.00 | 0.00 | "S1" | -| 0:1:1:2 | -4.6 (0%) | -191.2 (0%) | -0.00 | 0.00 | -0.00 | "MAINBODY" | -| 0:1:1:3 | -2.3 (0%) | -52.5 (0%) | -0.00 | 0.00 | 0.00 | "MAIN_BODY_BACK" | -| 0:1:1:4 | -2.3 (0%) | -51.6 (0%) | 0.00 | 0.00 | -0.00 | "MAIN_BODY_FRONT" | -| 0:1:1:5 | 2.0 (0%) | 10.0 (0%) | -0.00 | 0.00 | -0.00 | "HEAD" | -| 0:1:1:6 | 0.4 (0%) | 0.0 (0%) | 0.00 | -0.00 | -0.00 | "HEAD_FRONT" | -| 0:1:1:7 | 0.4 (0%) | 0.0 (0%) | 0.00 | -0.00 | -0.00 | "HEAD_BACK" | -| 0:1:1:8 | -320.6 (0%) | 10.9 (0%) | -0.00 | 0.00 | 0.00 | "TAIL" | -| 0:1:1:9 | 0.0 (0%) | 0.0 (0%) | -0.00 | -0.00 | 0.00 | "TAIL_MIDDLE" | -| 0:1:1:10 | -186.2 (0%) | 4.8 (0%) | -0.00 | 0.00 | -0.00 | "TAIL_TURBINE" | -| 0:1:1:11 | 0.3 (0%) | -0.0 (0%) | -0.00 | -0.00 | 0.00 | "FOOT" | -| 0:1:1:12 | 0.0 (0%) | -0.0 (0%) | 0.00 | -0.00 | -0.00 |"FOOT_FRONT" | -| 0:1:1:13 | 0.0 (0%) | 0.0 (0%) | -0.00 | 0.00 | 0.00 | "FOOT_BACK" | +Advanced Data Exchange supports both reading and writing of validation properties, and provides a tool to check them. +@figure{/user_guides/xde/images/xde_image005.png,"Validation Property Descriptions",240} -In our example, it can be seen that no errors were detected for either area, volume or positioning data. +Check logs contain deviations of computed values from the values stored in a STEP file. +A typical example appears as follows: + +| Label | Area defect | Volume defect | dX | dY | dZ | Name | +| :--------- | :---------- | :------------ | :---- | :---- | :---- | :---------------- | +| `0:1:1:1` | 312.6 (0%) | -181.7 (0%) | 0.00 | 0.00 | 0.00 | "S1" | +| `0:1:1:2` | -4.6 (0%) | -191.2 (0%) | -0.00 | 0.00 | -0.00 | "MAINBODY" | +| `0:1:1:3` | -2.3 (0%) | -52.5 (0%) | -0.00 | 0.00 | 0.00 | "MAIN_BODY_BACK" | +| `0:1:1:4` | -2.3 (0%) | -51.6 (0%) | 0.00 | 0.00 | -0.00 | "MAIN_BODY_FRONT" | +| `0:1:1:5` | 2.0 (0%) | 10.0 (0%) | -0.00 | 0.00 | -0.00 | "HEAD" | +| `0:1:1:6` | 0.4 (0%) | 0.0 (0%) | 0.00 | -0.00 | -0.00 | "HEAD_FRONT" | +| `0:1:1:7` | 0.4 (0%) | 0.0 (0%) | 0.00 | -0.00 | -0.00 | "HEAD_BACK" | +| `0:1:1:8` | -320.6 (0%) | 10.9 (0%) | -0.00 | 0.00 | 0.00 | "TAIL" | +| `0:1:1:9` | 0.0 (0%) | 0.0 (0%) | -0.00 | -0.00 | 0.00 | "TAIL_MIDDLE" | +| `0:1:1:10` | -186.2 (0%) | 4.8 (0%) | -0.00 | 0.00 | -0.00 | "TAIL_TURBINE" | +| `0:1:1:11` | 0.3 (0%) | -0.0 (0%) | -0.00 | -0.00 | 0.00 | "FOOT" | +| `0:1:1:12` | 0.0 (0%) | -0.0 (0%) | 0.00 | -0.00 | -0.00 | "FOOT_FRONT" | +| `0:1:1:13` | 0.0 (0%) | 0.0 (0%) | -0.00 | 0.00 | 0.00 | "FOOT_BACK" | + +In our example, it can be seen that no errors were detected for either area, volume or positioning data. @subsection occt_xde_1_5 Names -XDE supports reading and writing the names of shapes to and from IGES and STEP file formats. This functionality can be switched off if you do not need this type of data, thereby reducing the size of the document. +XDE supports reading and writing the names of shapes to and from IGES and STEP file formats. +This functionality can be switched off if you do not need this type of data, thereby reducing the size of the document. @figure{/user_guides/xde/images/614_xde_04_400.png,"Instance Names",360} @subsection occt_xde_1_6 Colors and Layers -XDE can read and write colors and layers assigned to shapes or their subparts (down to the level of faces and edges) to and from both IGES and STEP formats. Three types of colors are defined in the enumeration *XCAFDoc_ColorType*: - * generic color (XCAFDoc_ColorGen) - * surface color (XCAFDoc_ColorSurf) - * curve color (XCAFDoc_ColorCurv) - - @figure{/user_guides/xde/images/xde_image006.png,"Colors and Layers",240} + +XDE can read and write colors and layers assigned to shapes or their subparts (down to the level of faces and edges) to and from both IGES and STEP formats. +Three types of colors are defined in the enumeration `XCAFDoc_ColorType`: + * generic color (`XCAFDoc_ColorGen`) + * surface color (`XCAFDoc_ColorSurf`) + * curve color (`XCAFDoc_ColorCurv`) + +@figure{/user_guides/xde/images/xde_image006.png,"Colors and Layers",240} @subsection occt_xde_1_7 Geometric Dimensions & Tolerances (GD\&T) -GD\&T are a type of Product and Manufacturing Information (PMI) that can be either computed automatically by a CAD system, -or entered manually by the user. For detailed information use CAx-IF Recommended Practices -for the Representation and Presentation of Product Manufacturing Information (PMI) (AP242) +GD\&T are a type of **Product and Manufacturing Information** (**PMI**) that can be either computed automatically by a CAD system, or entered manually by the user. +For detailed information use [CAx-IF Recommended Practices for the Representation and Presentation of Product Manufacturing Information (PMI) (AP242)](https://www.cax-if.org/documents/rec_pracs_pmi_v40.pdf). XDE can read and write GD\&T data of the following types: -* dimensions, such as distance, length, radius and so on; -* geometric tolerances; -* datums, i.e theoretically exact geometric references, such as point, line or plane, to which toleranced features are related. + * dimensions, such as distance, length, radius and so on; + * geometric tolerances; + * datums, i.e theoretically exact geometric references, such as point, line or plane, to which toleranced features are related. XDE supports two presentations of GD\&T data: -* semantic presentation, i.e. data is stored in a machine-consumable way and includes all information required to understand the - specification without the aid of any presentation elements; -* tessellated presentation, i.e. data is displayed in a human-readable way. + * semantic presentation, i.e. data is stored in a machine-consumable way and includes all information required to understand the specification without the aid of any presentation elements; + * tessellated presentation, i.e. data is displayed in a human-readable way. @subsection occt_xde_1_8 Clipping planes -XDE supports reading from STEP and storing named planes used for clipping. +XDE supports reading from STEP and storing named planes used for clipping. Currently, XDE supports saving of clipping planes in XBF format only. XDE provides capabilities for adding, editing and removing clipping planes. @subsection occt_xde_1_9 Saved views -XDE supports reading from STEP views. Views allow saving information about camera parameters (position, direction, zoom factor, etc.) -and visible shapes, PMIs, used clipping planes and notes. Currently, XDE supports saving of clipping planes in XBF format only. +XDE supports reading from STEP views. +Views allow saving information about camera parameters (position, direction, zoom factor, etc.) and visible shapes, PMIs, used clipping planes and notes. +Currently, XDE supports saving of clipping planes in XBF format only. XDE provides the following view management capabilities: * add/remove views; @@ -125,8 +145,10 @@ XDE provides the following view management capabilities: * set visible shapes, PMIs, used clipping planes and notes. @subsection occt_xde_1_10 Custom notes - -Custom notes is a kind of application-specific data attached to assembly items, their attributes and sub-shapes. Basically, there are simple textual comments, binary data and other application-specific data. Each note is provided with a timestamp and the user who created it. + +Custom notes is a kind of application-specific data attached to assembly items, their attributes and sub-shapes. +Basically, there are simple textual comments, binary data and other application-specific data. +Each note is provided with a timestamp and the user who created it. Notes API provides the following functionality: * Returns the total number of notes and annotated items; @@ -145,558 +167,658 @@ Notes API provides the following functionality: * Deletes note(s) and removes them from annotated items; * Gets / deletes orphan notes. -@section occt_xde_2 Working with XDE +@section occt_xde_2_1 Getting started -@subsection occt_xde_2_1 Getting started - -As explained in the last chapter, XDE uses *TDocStd_Documents* as a starting point. The general purpose of XDE is: +As explained in the last chapter, XDE uses `TDocStd_Documents` as a starting point. The general purpose of XDE is: * Checking if an existing document is fit for XDE; * Getting an application and initialized document; * Initializing a document to fit it for XDE; * Adding, setting and finding data; * Querying and managing shapes; * Attaching properties to shapes. - -The Document used by XDE usually starts as a *TDocStd_Document*. -@subsubsection occt_xde_2_1_1 Environment variables -To use XDE you have to set the environment variables properly. Make sure that two important environment variables are set as follows: - * *CSF_PluginDefaults* points to sources of \%CASROOT%/src/XCAFResources ($CASROOT/src/XCAFResources). - * *CSF_XCAFDefaults* points to sources of \%CASROOT%/src/XCAFResources ($CASROOT/src/XCAFResources). +The Document used by XDE usually starts as a `TDocStd_Document`. + +@subsection occt_xde_2_1_1 Environment variables + +To use XDE you have to set the environment variables properly. +Make sure that two important environment variables are set as follows: + * `CSF_PluginDefaults` points to sources of `$CASROOT/src/XCAFResources`. + * `CSF_XCAFDefaults` points to sources of `$CASROOT/src/XCAFResources`. -@subsubsection occt_xde_2_1_2 General Check -Before working with shapes, properties, and other types of information, the global organization of an XDE Document can be queried or completed to determine if an existing Document is actually structured for use with XDE. +@subsection occt_xde_2_1_2 General Check -To find out if an existing *TDocStd_Document* is suitable for XDE, use: +Before working with shapes, properties, and other types of information, the global organization of an XDE Document can be queried or completed to determine if an existing Document is actually structured for use with XDE. + +To find out if an existing `TDocStd_Document` is suitable for XDE, use: ~~~~{.cpp} -Handle(TDocStd_Document) doc... -if ( XCAFDoc_DocumentTool::IsXCAFDocument (doc) ) { .. yes .. } +Handle(TDocStd_Document) theDoc; +if (XCAFDoc_DocumentTool::IsXCAFDocument (theDoc)) { .. yes .. } ~~~~ -If the Document is suitable for XDE, you can perform operations and queries explained in this guide. However, if a Document is not fully structured for XDE, it must be initialized. +If the Document is suitable for XDE, you can perform operations and queries explained in this guide. +However, if a Document is not fully structured for XDE, it must be initialized. + +@subsection occt_xde_2_1_3 Get an Application or an Initialized Document -@subsubsection occt_xde_2_1_3 Get an Application or an Initialized Document -If you want to retrieve an existing application or an existing document (known to be correctly structured for XDE), use: +If you want to retrieve an existing application or an existing document (known to be correctly structured for XDE), use: ~~~~{.cpp} -Handle(TDocStd_Document) aDoc; +Handle(TDocStd_Document) aDoc; Handle(XCAFApp_Application) anApp = XCAFApp_Application::GetApplication(); -anApp->NewDocument(;MDTV-XCAF;,aDoc); +BinXCAFDrivers::DefineFormat (anApp); +XmlXCAFDrivers::DefineFormat (anApp); +anApp->NewDocument ("BinXCAF", aDoc); ~~~~ -@subsection occt_xde_2_2 Shapes and Assemblies +@section occt_xde_2_2 Shapes and Assemblies -@subsubsection occt_xde_2_2_1 Initialize an XDE Document (Shapes) -An XDE Document begins with a *TDocStd_Document*. Assuming you have a *TDocStd_Document* already created, you can ensure that it is correctly structured for XDE by initializing the XDE structure as follows: +@subsection occt_xde_2_2_1 Initialize an XDE Document (Shapes) + +An XDE Document begins with a `TDocStd_Document`. +Assuming you have a `TDocStd_Document` already created, you can ensure that it is correctly structured for XDE by initializing the XDE structure as follows: ~~~~{.cpp} -Handle(TDocStd_Document) doc... -Handle (XCAFDoc_ShapeTool) myAssembly = -XCAFDoc_DocumentTool::ShapeTool (Doc->Main()); -TDF_Label aLabel = myAssembly->NewShape() +Handle(TDocStd_Document) theDoc = ...; +Handle(XCAFDoc_ShapeTool) myAssembly = XCAFDoc_DocumentTool::ShapeTool (theDoc->Main()); +TDF_Label aLabel = myAssembly->NewShape(); ~~~~ -**Note** that the method *XCAFDoc_DocumentTool::ShapeTool* returns the *XCAFDoc_ShapeTool*. The first time this method is used, it creates the *XCAFDoc_ShapeTool*. In our example, a handle is used for the *TDocStd_Document*. +**Note** that the method `XCAFDoc_DocumentTool::ShapeTool` returns the `XCAFDoc_ShapeTool`. +The first time this method is used, it creates the `XCAFDoc_ShapeTool`. +In our example, a handle is used for the `TDocStd_Document`. + +@subsection occt_xde_2_2_2 Get a Node considered as an Assembly -@subsubsection occt_xde_2_2_2 Get a Node considered as an Assembly -To get a node considered as an Assembly from an XDE structure, you can use the Label of the node. Assuming that you have a properly initialized *TDocStd_Document*, use: +To get a node considered as an Assembly from an XDE structure, you can use the Label of the node. +Assuming that you have a properly initialized `TDocStd_Document`, use: ~~~~{.cpp} -Handle(TDocStd_Document) doc... +Handle(TDocStd_Document) theDoc = ...; Handle(XCAFDoc_ShapeTool) myAssembly = XCAFDoc_DocumentTool::ShapeTool (aLabel); ~~~~ -In the previous example, you can also get the Main Item of an XDE document, which records the root shape representation (as a Compound if it is an Assembly) by using *ShapeTool(Doc->Main())* instead of *ShapeTool(aLabel)*. +In the previous example, you can also get the Main Item of an XDE document, which records the root shape representation +(as a Compound if it is an Assembly) by using `XCAFDoc_DocumentTool::ShapeTool(theDoc->Main())` instead of `XCAFDoc_DocumentTool::ShapeTool(aLabel)`. -You can then query or edit this Assembly node, the Main Item or another one (*myAssembly* in our examples). +You can then query or edit this Assembly node, the Main Item or another one (`myAssembly` in our examples). -**Note** that for the examples in the rest of this guide, *myAssembly* is always presumed to be accessed this way, so this information will not be repeated. +**Note** that for the examples in the rest of this guide, `myAssembly` is always presumed to be accessed this way, so this information will not be repeated. -@subsubsection occt_xde_2_2_3 Updating the Assemblies after Filling or Editing -Some actions in this chapter affect the content of the document, considered as an Assembly. As a result, you will sometimes need to update various representations (including the compounds). +@subsection occt_xde_2_2_3 Updating the Assemblies after Filling or Editing -To update the representations, use: +Some actions in this chapter affect the content of the document, considered as an Assembly. +As a result, you will sometimes need to update various representations (including the compounds). + +To update the representations, use: ~~~~{.cpp} -myAssembly->UpdateAssemblies(); +myAssembly->UpdateAssemblies(); ~~~~ This call performs a top-down update of the Assembly compounds stored in the document. **Note** that you have to run this method manually to actualize your Assemblies after any low-level modifications on shapes. -@subsubsection occt_xde_2_2_4 Adding or Setting Top Level Shapes +@subsection occt_xde_2_2_4 Adding or Setting Top Level Shapes -Shapes can be added as top-level shapes. Top level means that they can be added to an upper level assembly or added on their own at the highest level as a component or referred by a located instance. Therefore two types of top-level shapes can be added: - * shapes with upper level references - * free shapes (that correspond to roots) without any upper reference +Shapes can be added as top-level shapes. +Top level means that they can be added to an upper level assembly or added on their own at the highest level as a component or referred by a located instance. +Therefore two types of top-level shapes can be added: + * shapes with upper level references; + * free shapes (that correspond to roots) without any upper reference. **Note** that several top-level shapes can be added to the same component. - -A shape to be added can be defined as a compound (if required), with the following interpretations: - * If the Shape is a compound, according to the user choice, it may or may not be interpreted as representing an Assembly. If it is an Assembly, each of its sub-shapes defines a sub-label. - * If the Shape is not a compound, it is taken as a whole, without breaking it down. - -To break down a Compound in the assembly structure, use: + +A shape to be added can be defined as a compound (if required), with the following interpretations: + * If the Shape is a compound, according to the user choice, it may or may not be interpreted as representing an Assembly. + If it is an Assembly, each of its sub-shapes defines a sub-label. + * If the Shape is not a compound, it is taken as a whole, without breaking it down. + +To break down a Compound in the assembly structure, use: ~~~~{.cpp} -Standard_Boolean makeAssembly; -// True to interpret a Compound as an Assembly, -// False to take it as a whole -aLabel = myAssembly->AddShape(aShape, makeAssembly); +// True to interpret a Compound as an Assembly, False to take it as a whole +bool toMakeAssembly = ...; +TDF_Label aLabel = myAssembly->AddShape (aShape, toMakeAssembly); ~~~~ -Each node of the assembly therefore refers to its sub-shapes. +Each node of the assembly therefore refers to its sub-shapes. + +Concerning located instances of sub-shapes, the corresponding shapes (without location) appear at distinct sub-labels. +They are referred to by a shape instance, which associates a location. -Concerning located instances of sub-shapes, the corresponding shapes, (without location) appear at distinct sub-labels. They are referred to by a shape instance, which associates a location. +@subsection occt_xde_2_2_5 Setting a given Shape at a given Label -@subsubsection occt_xde_2_2_5 Setting a given Shape at a given Label -A top-level shape can be changed. In this example, no interpretation of compound is performed: +A top-level shape can be changed. +In this example, no interpretation of compound is performed: ~~~~{.cpp} -Standard_CString LabelString ...; -// identifies the Label (form ;0:i:j...;) -TDF_Label aLabel...; -// A label must be present -myAssembly->SetShape(aLabel, aShape); +// identifies the Label (form 0:i:j...) +// a label must be present +TDF_Label aLabel = ...; +TopoDS_Shape aShape = ...; +myAssembly->SetShape (aLabel, aShape); ~~~~ -@subsubsection occt_xde_2_2_6 Getting a Shape from a Label -To get a shape from its Label from the top-level, use: +@subsection occt_xde_2_2_6 Getting a Shape from a Label + +To get a shape from its Label from the top-level, use: ~~~~{.cpp} -TDF_Label aLabel... -// A label must be present -if (aLabel.IsNull()) { - // no such label : abandon +TDF_Label aLabel = ...; +// a label must be present +if (aLabel.IsNull()) +{ + // no such label: abandon } -TopoDS_Shape aShape; -aShape = myAssembly->GetShape(aLabel); -if (aShape.IsNull()) { +TopoDS_Shape aShape = myAssembly->GetShape (aLabel); +if (aShape.IsNull()) +{ // this label is not for a Shape } ~~~~ -**Note** that if the label corresponds to an assembly, the result is a compound. +**Note** that if the label corresponds to an assembly, the result is a compound. + +@subsection occt_xde_2_2_7 Getting a Label from a Shape -@subsubsection occt_xde_2_2_7 Getting a Label from a Shape -To get a Label, which is attached to a Shape from the top-level, use: +To get a Label, which is attached to a Shape from the top-level, use: ~~~~{.cpp} -Standard_Boolean findInstance = Standard_False; -// (this is default value) -aLabel = myAssembly->FindShape(aShape [,findInstance]); -if (aLabel.IsNull()) { +bool toFindInstance = false; // this is default value +TDF_Label aLabel = myAssembly->FindShape(aShape [,toFindInstance]); +if (aLabel.IsNull()) +{ // no label found for this shape } ~~~~ -If *findInstance* is True, a search is made for the shape with the same location. If it is False (default value), a search is made among original, non-located shapes. +If `toFindInstance` is `True`, a search is made for the shape with the same location. +If it is `False` (default value), a search is made among original, non-located shapes. + +@subsection occt_xde_2_2_8 Other Queries on a Label -@subsubsection occt_xde_2_2_8 Other Queries on a Label +Various other queries can be made from a Label within the Main Item of XDE: -Various other queries can be made from a Label within the Main Item of XDE: #### Main Shapes -To determine if a Shape is recorded (or not), use: +To determine if a Shape is recorded (or not), use: ~~~~{.cpp} -if ( myAssembly->IsShape(aLabel) ) { .. yes .. } +if (myAssembly->IsShape (aLabel)) { .. yes .. } ~~~~ -To determine if the shape is top-level, i.e. was added by the *AddShape* method, use: +To determine if the shape is top-level, i.e. was added by the `XCAFDoc_ShapeTool::AddShape` method, use: ~~~~{.cpp} -if ( myAssembly->IsTopLevel(aLabel) ) { .. yes .. } +if (myAssembly->IsTopLevel (aLabel)) { .. yes .. } ~~~~ -To get a list of top-level shapes added by the *AddShape* method, use: +To get a list of top-level shapes added by the `XCAFDoc_ShapeTool::AddShape` method, use: ~~~~{.cpp} -TDF_LabelSequence frshapes; -myAssembly->GetShapes(frshapes); +TDF_LabelSequence aFreeShapes; +myAssembly->GetShapes (aFreeShapes); ~~~~ -To get all free shapes at once if the list above has only one item, use: +To get all free shapes at once if the list above has only one item, use: ~~~~{.cpp} -TopoDS_Shape result = myAssembly->GetShape(frshapes.Value(1)); +TopoDS_Shape result = myAssembly->GetShape (aFreeShapes.First()); ~~~~ -If there is more than one item, you must create and fill a compound, use: +If there is more than one item, you must create and fill a compound, use: ~~~~{.cpp} -TopoDS_Compound C; -BRep_Builder B; -B.MakeCompound(C); -for(Standard_Integer i=1; i=frshapes.Length(); i++) { - TopoDS_Shape S = myAssembly->GetShape(frshapes.Value(i)); - B.Add(C,S); -} +TopoDS_Compound aComp; +BRep_Builder aBuilder; +aBuilder.MakeCompound (aComp); +for (TDF_LabelSequence::Iterator aLabIter (aFreeShapes); aLabIter.More(); aLabIter.Next()) +{ + TopoDS_Shape aShape = myAssembly->GetShape (aLabIter.Value()); + aBuilder.Add (aComp, aShape); +} ~~~~ -In our example, the result is the compound C. -To determine if a shape is a free shape (no reference or super-assembly), use: +In our example, the result is the compound `aComp`. +To determine if a shape is a free shape (no reference or super-assembly), use: ~~~~{.cpp} -if ( myAssembly->IsFree(aLabel) ) { .. yes .. } +if (myAssembly->IsFree (aLabel)) { .. yes .. } ~~~~ -To get a list of Free Shapes (roots), use: +To get a list of Free Shapes (roots), use: ~~~~{.cpp} -TDF_LabelSequence frshapes; -myAssembly->GetFreeShapes(frshapes); +TDF_LabelSequence aFreeShapes; +myAssembly->GetFreeShapes (aFreeShapes); ~~~~ -To get the shapes, which use a given shape as a component, use: +To get the shapes, which use a given shape as a component, use: ~~~~{.cpp} -TDF_LabelSequence users; -Standard_Integer nbusers = myAssembly->GetUsers(aLabel,users); +TDF_LabelSequence aUsers; +Standard_Integer aNbUsers = myAssembly->GetUsers (aLabel, aUsers); ~~~~ -The count of users is contained with *nbusers*. It contains 0 if there are no users. +The count of `aUsers` is contained with `aNbUsers`. It contains `0` if there are no users. #### Assembly and Components -To determine if a label is attached to the main part or to a sub-part (component), use: + +To determine if a label is attached to the main part or to a sub-part (component), use: ~~~~{.cpp} -if (myAssembly->IsComponent(aLabel)) { .. yes .. } +if (myAssembly->IsComponent (aLabel)) { .. yes .. } ~~~~ -To determine whether a label is a node of a (sub-) assembly or a simple shape, use: + +To determine whether a label is a node of a (sub-) assembly or a simple shape, use: ~~~~{.cpp} -if ( myAssembly->IsAssembly(aLabel) ) { .. yes .. } +if (myAssembly->IsAssembly (aLabel)) { .. yes .. } ~~~~ -If the label is a node of a (sub-) assembly, you can get the count of components, use: +If the label is a node of a (sub-) assembly, you can get the count of components, use: ~~~~{.cpp} -Standard_Boolean subchilds = Standard_False; //default -Standard_Integer nbc = myAssembly->NbComponents (aLabel [,subchilds]); +bool subchilds = false; // default +Standard_Integer nbc = myAssembly->NbComponents (aLabel [,subchilds]); ~~~~ -If *subchilds* is True, commands also consider sub-levels. By default, only level one is checked. +If `subchilds` is `True`, commands also consider sub-levels. By default, only level one is checked. -To get component Labels themselves, use: +To get component Labels themselves, use: ~~~~{.cpp} -Standard_Boolean subchilds = Standard_False; //default -TDF_LabelSequence comps; -Standard_Boolean isassembly = myAssembly->GetComponents -(aLabel,comps[,subchilds]); +bool subchilds = false; // default +TDF_LabelSequence aComps; +bool isassembly = myAssembly->GetComponents (aLabel, aComps [,subchilds]); ~~~~ -@subsubsection occt_xde_2_2_9 Instances and References for Components -To determine if a label is a simple shape, use: + +@subsection occt_xde_2_2_9 Instances and References for Components + +To determine if a label is a simple shape, use: ~~~~{.cpp} -if ( myAssembly->IsSimpleShape(aLabel) ) { .. yes .. } +if (myAssembly->IsSimpleShape (aLabel)) { .. yes .. } ~~~~ -To determine if a label is a located reference to another one, use: + +To determine if a label is a located reference to another one, use: ~~~~{.cpp} -if ( myAssembly->IsReference(aLabel) ) { .. yes .. } +if (myAssembly->IsReference (aLabel)) { .. yes .. } ~~~~ -If the label is a located reference, you can get the location, use: + +If the label is a located reference, you can get the location, use: ~~~~{.cpp} -TopLoc_Location loc = myAssembly->GetLocation (aLabel); +TopLoc_Location aLoc = myAssembly->GetLocation (aLabel); ~~~~ -To get the label of a referenced original shape (also tests if it is a reference), use: + +To get the label of a referenced original shape (also tests if it is a reference), use: ~~~~{.cpp} -Standard_Boolean isref = myAssembly->GetReferredShape -(aLabel, refLabel); +TDF_Label aRefLabel; +bool isRef = myAssembly->GetReferredShape (aLabel, aRefLabel); ~~~~ -**Note** *isref* returns False if *aLabel* is not for a reference. +**Note** `isRef` returns `False` if `aLabel` is not for a reference. + +@section occt_xde_2_3 Editing Shapes -@subsection occt_xde_2_3 Editing Shapes -In addition to the previously described *AddShape* and *SetShape*, several shape edits are possible. +In addition to the previously described `AddShape` and `SetShape`, several shape edits are possible. -To remove a Shape, and all its sub-labels, use: +To remove a Shape, and all its sub-labels, use: ~~~~{.cpp} -Standard_Boolean remsh = myAssembly->RemoveShape(aLabel); -// remsh is returned True if done +bool isRemoved = myAssembly->RemoveShape (aLabel); +// isRemoved is returned True if done ~~~~ This operation will fail if the shape is neither free nor top level. -To add a Component to the Assembly, from a new shape, use: +To add a Component to the Assembly, from a new shape, use: ~~~~{.cpp} -Standard_Boolean expand = Standard_False; //default -TDF_Label aLabel = myAssembly->AddComponent (aShape [,expand]); +bool toExpand = false; // default +TDF_Label aLabel = myAssembly->AddComponent (aShape [,toExpand]); ~~~~ -If *expand* is True and *aShape* is a Compound, *aShape* is broken down to produce sub-components, one for each of its sub-shapes. +If `toExpand` is `True` and `aShape` is a Compound, `aShape` is broken down to produce sub-components, one for each of its sub-shapes. -To add a component to the assembly, from a previously recorded shape (the new component is defined by the label of the reference shape, and its location), use: +To add a component to the assembly, from a previously recorded shape (the new component is defined by the label of the reference shape, and its location), use: ~~~~{.cpp} -TDF_Label refLabel ...; // the label of reference shape -TopLoc_Location loc ...; // the desired location -TDF_Label aLabel = myAssembly->AddComponent (refLabel, loc); +TDF_Label aRefLabel = ...; // the label of reference shape +TopLoc_Location aLoc = ...; // the desired location +TDF_Label aLabel = myAssembly->AddComponent (aRefLabel, aLoc); ~~~~ -To remove a component from the assembly, use: + +To remove a component from the assembly, use: ~~~~{.cpp} -myAssembly->RemoveComponent (aLabel); +myAssembly->RemoveComponent (aLabel); ~~~~ -@subsection occt_xde_2_4 Management of Sub-Shapes -In addition to components of a (sub-)assembly, it is possible to have individual identification of some sub-shapes inside any shape. Therefore, you can attach specific attributes such as Colors. Some additional actions can be performed on sub-shapes that are neither top-level, nor components: -To add a sub-shape to a given Label, use: +@section occt_xde_2_4 Management of Sub-Shapes + +In addition to components of a (sub-)assembly, it is possible to have individual identification of some sub-shapes inside any shape. +Therefore, you can attach specific attributes such as Colors. +Some additional actions can be performed on sub-shapes that are neither top-level, nor components. +To add a sub-shape to a given Label, use: ~~~~{.cpp} -TDF_Label subLabel = myAssembly->AddSubShape (aLabel, subShape); +TDF_Label aSubLabel = myAssembly->AddSubShape (aLabel, aSubShape); ~~~~ -To find the Label attached to a given sub-shape, use: +To find the Label attached to a given sub-shape, use: ~~~~{.cpp} -TDF_Label subLabel; // new label to be computed -if ( myAssembly-> FindSubShape (aLabel, subShape, subLabel)) { .. yes .. } +TDF_Label aSubLabel; // new label to be computed +if (myAssembly-> FindSubShape (aLabel, aSubShape, aSubLabel)) { .. yes .. } ~~~~ -If the sub-shape is found (yes), *subLabel* is filled by the correct value. +If the sub-shape is found (yes), `aSubLabel` is filled by the correct value. -To find the top-level simple shape (not a compound whether free or not), which contains a given sub-shape, use: +To find the top-level simple shape (not a compound whether free or not), which contains a given sub-shape, use: ~~~~{.cpp} -TDF_Label mainLabel = myAssembly->FindMainShape(subShape); +TDF_Label aMainLabel = myAssembly->FindMainShape (aSubShape); ~~~~ -**Note** that there should be only one shape for a valid model. In any case, the search stops on the first one found. +**Note** that there should be only one shape for a valid model. +In any case, the search stops on the first one found. -To get the sub-shapes of a shape, which are recorded under a label, use: +To get the sub-shapes of a shape, which are recorded under a label, use: ~~~~{.cpp} -TDF_LabelSequence subs; -Standard_Boolean hassubs = myAssembly->GetSubShapes (aLabel,subs); +TDF_LabelSequence aSubshapes; +bool hasSubshapes = myAssembly->GetSubShapes (aLabel, aSubShapes); ~~~~ -@subsection occt_xde_2_5 Properties -Some properties can be attached directly to shapes. These properties are: - * Name (standard definition from OCAF) - * Centroid (for validation of transfer) - * Volume (for validation of transfer) - * Area (for validation of transfer) -Some other properties can also be attached, and are also managed by distinct tools for Colors and Layers. Colors and Layers are managed as an alternative way of organizing data (by providing a way of identifying groups of shapes). -Colors are put into a table of colors while shapes refer to this table. There are two ways of attaching a color to a shape: - * By attaching an item from the table. + +@section occt_xde_2_5 Properties + +Some properties can be attached directly to shapes. These properties are: + * Name (standard definition from OCAF); + * Centroid (for validation of transfer); + * Volume (for validation of transfer); + * Area (for validation of transfer). + +Some other properties can also be attached, and are also managed by distinct tools for Colors and Layers. +Colors and Layers are managed as an alternative way of organizing data (by providing a way of identifying groups of shapes). +Colors are put into a table of colors while shapes refer to this table. + +There are two ways of attaching a color to a shape: + * By attaching an item from the table; * Adding the color directly. -When the color is added directly, a search is performed in the table of contents to determine if it contains the requested color. Once this search and initialize operation is done, the first way of attaching a color to a shape is used. -@subsubsection occt_xde_2_5_1 Name -Name is implemented and used as a *TDataStd_Name*, which can be attached to any label. Before proceeding, consider that: - * In IGES, every entity can have a name with an optional numeric part called a Subscript Label. For example, *MYCURVE* is a name, and *MYCURVE(60)* is a name with a Subscript Label. - * In STEP, there are two levels: Part Names and Entity Names: - * Part Names are attached to ;main shapes; such as parts and assemblies. These Part Names are specifically supported by XDE. - * Entity Names can be attached to every Geometric Entity. This option is rarely used, as it tends to overload the exploitation of the data structure. Only some specific cases justify using this option: for example, when the sending system can really ensure the stability of an entity name after each STEP writing. If such stability is ensured, you can use this option to send an Identifier for external applications using a database. + +When the color is added directly, a search is performed in the table of contents to determine if it contains the requested color. +Once this search and initialize operation is done, the first way of attaching a color to a shape is used. + +@subsection occt_xde_2_5_1 Name + +Name is implemented and used as a `TDataStd_Name`, which can be attached to any label. +Before proceeding, consider that: + * In IGES, every entity can have a name with an optional numeric part called a Subscript Label. + For example, `MYCURVE` is a name, and `MYCURVE(60)` is a name with a Subscript Label. + * In STEP, there are two levels: Part Names and Entity Names: + * Part Names are attached to "main shapes" such as parts and assemblies. + These Part Names are specifically supported by XDE. + * Entity Names can be attached to every Geometric Entity. + This option is rarely used, as it tends to overload the exploitation of the data structure. + Only some specific cases justify using this option: for example, when the sending system can really ensure the stability of an entity name after each STEP writing. + If such stability is ensured, you can use this option to send an Identifier for external applications using a database. + **Note** that both IGES or STEP files handle names as pure ASCII strings. - -These considerations are not specific to XDE. What is specific to data exchange is the way names are attached to entities. -To get the name attached to a label (as a reminder using OCAF), use: +These considerations are not specific to XDE. +What is specific to data exchange is the way names are attached to entities. + +To get the name attached to a label (as a reminder using OCAF), use: ~~~~{.cpp} -Handle(TDataStd_Name) N; -if ( !aLabel.FindAttribute(TDataStd_Name::GetID(),N)) { - // no name is attached -} -TCollection_ExtendedString name = N->Get(); +Handle(TDataStd_Name) aNameAttr; +if (!aLabel.FindAttribute (TDataStd_Name::GetID(), aNameAttr)) +{ + // no name is attached +} +TCollection_ExtendedString aName = aNameAttr->Get(); ~~~~ -Don't forget to consider Extended String as ASCII, for the exchange file. +Don't forget to consider Extended String as ASCII, for the exchange file. -To set a name to a label (as a reminder using OCAF), use: +To set a name to a label (as a reminder using OCAF), use: ~~~~{.cpp} -TCollection_ExtendedString aName ...; -// contains the desired name for this Label (ASCII) -TDataStd_Name::Set (aLabel, aName); +TCollection_ExtendedString aName = ...; +// contains the desired name for this Label (ASCII) +TDataStd_Name::Set (aLabel, aName); ~~~~ -@subsubsection occt_xde_2_5_2 Centroid -A Centroid is defined by a Point to fix its position. It is handled as a property, item of the class *XCAFDoc_Centroid*, sub-class of *TDF_Attribute*. However, global methods give access to the position itself. +@subsection occt_xde_2_5_2 Centroid + +A Centroid is defined by a Point to fix its position. +It is handled as a property, item of the class `XCAFDoc_Centroid`, sub-class of `TDF_Attribute`. +However, global methods give access to the position itself. -This notion has been introduced in STEP, together with that of Volume, and Area, as defining the Validation Properties: this feature allows exchanging the geometries and some basic attached values, in order to perform a synthetic checking on how they are maintained after reading and converting the exchange file. This exchange depends on reliable exchanges of Geometry and Topology. Otherwise, these values can be considered irrelevant. +This notion has been introduced in STEP, together with that of Volume, and Area, as defining the Validation Properties: +this feature allows exchanging the geometries and some basic attached values, in order to perform a synthetic checking on how they are maintained after reading and converting the exchange file. +This exchange depends on reliable exchanges of Geometry and Topology. +Otherwise, these values can be considered irrelevant. -A centroid can be determined at any level of an assembly, thereby allowing a check of both individual simple shapes and their combinations including locations. +A centroid can be determined at any level of an assembly, thereby allowing a check of both individual simple shapes and their combinations including locations. -To get a Centroid attached to a Shape, use: +To get a Centroid attached to a Shape, use: ~~~~{.cpp} -gp_Pnt pos; -Handle(XCAFDoc_Centroid) C; -aLabel.FindAttribute ( XCAFDoc_Centroid::GetID(), C ); -if ( !C.IsNull() ) pos = C->Get(); +gp_Pnt aPos; +Handle(XCAFDoc_Centroid) aCentAttr; +aLabel.FindAttribute (XCAFDoc_Centroid::GetID(), aCentAttr); +if (!aCentAttr.IsNull()) aPos = aCentAttr->Get(); ~~~~ -To set a Centroid to a Shape, use: +To set a Centroid to a Shape, use: ~~~~{.cpp} -gp_Pnt pos (X,Y,Z); -// the position previously computed for the centroid -XCAFDoc_Centroid::Set ( aLabel, pos ); +gp_Pnt aPos (X, Y, Z); +// the position previously computed for the centroid +XCAFDoc_Centroid::Set (aLabel, aPos); ~~~~ -@subsubsection occt_xde_2_5_3 Area -An Area is defined by a Real, it corresponds to the computed Area of a Shape, provided that it contains surfaces. It is handled as a property, item of the class *XCAFDoc_Area*, sub-class of *TDF_Attribute*. -This notion has been introduced in STEP but it is usually disregarded for a Solid, as Volume is used instead. In addition, it is attached to simple shapes, not to assemblies. +@subsection occt_xde_2_5_3 Area -To get an area attached to a Shape, use: -~~~~{.cpp} -Standard_Real area; -Handle(XCAFDoc_Area) A; -L.FindAttribute ( XCAFDoc_Area::GetID(), A ); -if ( !A.IsNull() ) area = A->Get(); +An Area is defined by a Real, it corresponds to the computed Area of a Shape, provided that it contains surfaces. +It is handled as a property, item of the class `XCAFDoc_Area`, sub-class of `TDF_Attribute`. +This notion has been introduced in STEP but it is usually disregarded for a Solid, as Volume is used instead. +In addition, it is attached to simple shapes, not to assemblies. -To set an area value to a Shape, use: -Standard_Real area ...; -// value previously computed for the area -XCAFDoc_Area::Set ( aLabel, area ); +To get an area attached to a Shape, use: +~~~~{.cpp} +Standard_Real anArea = 0.0; +Handle(XCAFDoc_Area) anAreaAttr; +aLabel.FindAttribute (XCAFDoc_Area::GetID(), anAreaAttr); +if (!anAreaAttr.IsNull()) anArea = anAreaAttr->Get(); ~~~~ -@subsubsection occt_xde_2_5_4 Volume -A Volume is defined by a Real and corresponds to the computed volume of a Shape, provided that it contains solids. It is handled as a property, an item of the class *XCAFDoc_Volume*, sub-class of *TDF_Attribute*. -This notion has been introduced in STEP. It may be attached to simple shapes or their assemblies for computing cumulated volumes and centers of gravity. -To get a Volume attached to a Shape, use: +To set an area value to a Shape, use: ~~~~{.cpp} -Standard_Real volume; -Handle(XCAFDoc_Volume) V; -L.FindAttribute ( XCAFDoc_Volume::GetID(), V ); -if ( !V.IsNull() ) volume = V->Get(); +// value previously computed for the area +Standard_Real anArea = ...; +XCAFDoc_Area::Set (aLabel, anArea); ~~~~ -To set a volume value to a Shape, use: +@subsection occt_xde_2_5_4 Volume + +A Volume is defined by a Real and corresponds to the computed volume of a Shape, provided that it contains solids. +It is handled as a property, an item of the class `XCAFDoc_Volume`, sub-class of `TDF_Attribute`. +This notion has been introduced in STEP. +It may be attached to simple shapes or their assemblies for computing cumulated volumes and centers of gravity. + +To get a Volume attached to a Shape, use: ~~~~{.cpp} -Standard_Real volume ...; -// value previously computed for the volume -XCAFDoc_Volume::Set ( aLabel, volume ); +Standard_Real aVolume = 0.0; +Handle(XCAFDoc_Volume) aVolAttr; +aLabel.FindAttribute (XCAFDoc_Volume::GetID(), aVolAttr); +if (!aVolAttr.IsNull()) aVolume = aVolAttr->Get(); ~~~~ -@subsection occt_xde_2_6 Colors and Layers -XDE can read and write colors and layers assigned to shapes or their subparts (down to level of faces and edges) to and from both IGES and STEP formats. +To set a volume value to a Shape, use: +~~~~{.cpp} +// value previously computed for the volume +Standard_Real aVolume = ...; +XCAFDoc_Volume::Set (aLabel, aVolume); +~~~~ -@figure{/user_guides/xde/images/239_xde_12_400.png,"Motor Head",240} +@section occt_xde_2_6 Colors and Layers -In an XDE document, colors are managed by the class *XCAFDoc_ColorTool*. It works basing on the same principles as ShapeTool works with Shapes. This tool can be provided on the Main Label or on any sub-label. The Property itself is defined as an *XCAFDoc_Color*, sub-class of *TDF_Attribute*. - -Colors are stored in a child of the starting document label: it is the second level (0.1.2), while Shapes are at the first level. Each color then corresponds to a dedicated label, the property itself is a Quantity_Color, which has a name and value for Red, Green, Blue. A Color may be attached to Surfaces (flat colors) or to Curves (wireframe colors), or to both. A Color may be attached to a sub-shape. In such a case, the sub-shape (and its own sub-shapes) takes its own Color as a priority. +XDE can read and write colors and layers assigned to shapes or their subparts (down to level of faces and edges) to and from both IGES and STEP formats. -Layers are handled using the same principles as Colors. In all operations described below you can simply replace **Color** with **Layer** when dealing with Layers. Layers are supported by the class *XCAFDoc_LayerTool*. +@figure{/user_guides/xde/images/239_xde_12_400.png,"Motor Head",240} -The class of the property is *XCAFDoc_Layer*, sub-class of *TDF_Attribute* while its definition is a *TCollection_ExtendedString*. Integers are generally used when dealing with Layers. The general cases are: - * IGES has *LevelList* as a list of Layer Numbers (not often used) +In an XDE document, colors are managed by the class `XCAFDoc_ColorTool`. +It works basing on the same principles as ShapeTool works with Shapes. +This tool can be provided on the Main Label or on any sub-label. +The Property itself is defined as an `XCAFDoc_Color`, sub-class of `TDF_Attribute`. + +Colors are stored in a child of the starting document label: it is the second level (`0.1.2`), while Shapes are at the first level. +Each color then corresponds to a dedicated label, the property itself is a `Quantity_Color`, which has a name and value for Red, Green, Blue. +A Color may be attached to Surfaces (flat colors) or to Curves (wireframe colors), or to both. +A Color may be attached to a sub-shape. +In such a case, the sub-shape (and its own sub-shapes) takes its own Color as a priority. + +Layers are handled using the same principles as Colors. +In all operations described below you can simply replace **Color** with **Layer** when dealing with Layers. +Layers are supported by the class `XCAFDoc_LayerTool`. + +The class of the property is `XCAFDoc_Layer`, sub-class of `TDF_Attribute` while its definition is a `TCollection_ExtendedString`. +Integers are generally used when dealing with Layers. +The general cases are: + * IGES has *LevelList* as a list of Layer Numbers (not often used); * STEP identifies a Layer (not by a Number, but by a String), to be more general. -Colors and Shapes are related to by Tree Nodes. +Colors and Shapes are related to by Tree Nodes. -These definitions are common to various exchange formats, at least for STEP and IGES. +These definitions are common to various exchange formats, at least for STEP and IGES. -@subsubsection occt_xde_2_6_1 Initialization -To query, edit, or initialize a Document to handle Colors of XCAF, use: +@subsection occt_xde_2_6_1 Initialization + +To query, edit, or initialize a Document to handle Colors of XCAF, use: ~~~~{.cpp} -Handle(XCAFDoc_ColorTool) myColors = -XCAFDoc_DocumentTool::ColorTool(Doc->Main ()); +Handle(XCAFDoc_ColorTool) myColors = XCAFDoc_DocumentTool::ColorTool (theDoc->Main()); ~~~~ -This call can be used at any time. The first time it is used, a relevant structure is added to the document. This definition is used for all the following color calls and will not be repeated for these. +This call can be used at any time. +The first time it is used, a relevant structure is added to the document. +This definition is used for all the following color calls and will not be repeated for these. + +@subsection occt_xde_2_6_2 Adding a Color -@subsubsection occt_xde_2_6_2 Adding a Color -There are two ways to add a color. You can: - * add a new Color defined as *Quantity_Color* and then directly set it to a Shape (anonymous Color) +There are two ways to add a color. You can: + * add a new Color defined as `Quantity_Color` and then directly set it to a Shape (anonymous Color); * define a new Property Color, add it to the list of Colors, and then set it to various shapes. -When the Color is added by its value *Quantity_Color*, it is added only if it has not yet been recorded (same RGB values) in the Document. + +When the Color is added by its value `Quantity_Color`, it is added only if it has not yet been recorded (same RGB values) in the Document. To set a Color to a Shape using a label, use: ~~~~{.cpp} -Quantity_Color Col (red,green,blue); -XCAFDoc_ColorType ctype ..; -// can take one of these values : -// XCAFDoc_ColorGen : all types of geometries -// XCAFDoc_ColorSurf : surfaces only -// XCAFDoc_ColorCurv : curves only -myColors->SetColor ( aLabel, Col, ctype ); +Quantity_Color aCol (red, green, blue); +// Can take one of these values: +// XCAFDoc_ColorGen - all types of geometries; +// XCAFDoc_ColorSurf - surfaces only; +// XCAFDoc_ColorCurv - curves only. +XCAFDoc_ColorType aColType = ...; +myColors->SetColor (aLabel, aCol, aColType); ~~~~ -Alternately, the Shape can be designated directly, without using its label, use: + +Alternately, the Shape can be designated directly, without using its label, use: ~~~~{.cpp} -myColors->SetColor ( aShape, Col, ctype ); -// Creating and Adding a Color, explicitly -Quantity_Color Col (red,green,blue); -TDF_Label ColLabel = myColors->AddColor ( Col ); +myColors->SetColor (aShape, aCol, aColType); +// creating and Adding a Color, explicitly +Quantity_Color aCol (red, green, blue); +TDF_Label aColLabel = myColors->AddColor (aCol); ~~~~ -**Note** that this Color can then be named, allowing later retrieval by its Name instead of its Value. +**Note** that this Color can then be named, allowing later retrieval by its Name instead of its Value. -To set a Color, identified by its Label and already recorded, to a Shape, use: +To set a Color, identified by its Label and already recorded, to a Shape, use: ~~~~{.cpp} -XCAFDoc_ColorType ctype ..; // see above -if ( myColors->SetColors ( aLabel, ColLabel, ctype) ) {.. it is done .. } +XCAFDoc_ColorType aColType = ...; // see above +if (myColors->SetColors (aLabel, aColLabel, aColType)) {.. it is done .. } ~~~~ -In this example, *aLabel* can be replaced by *aShape* directly. +In this example, `aLabel` can be replaced by `aShape` directly. -@subsubsection occt_xde_2_6_3 Queries on Colors -Various queries can be performed on colors. However, only specific queries are included in this section, not general queries using names. +@subsection occt_xde_2_6_3 Queries on Colors -To determine if a Color is attached to a Shape, for a given color type (ctype), use: +Various queries can be performed on colors. +However, only specific queries are included in this section, not general queries using names. + +To determine if a Color is attached to a Shape, for a given color type (`aColType`), use: ~~~~{.cpp} -if ( myColors->IsSet (aLabel , ctype)) { - // yes, there is one .. +if (myColors->IsSet (aLabel, aColType)) +{ + // yes, there is one .. } ~~~~ -In this example, *aLabel* can be replaced by *aShape* directly. -To get the Color attached to a Shape (for any color type), use: +In this example, `aLabel` can be replaced by `aShape` directly. + +To get the Color attached to a Shape (for any color type), use: ~~~~{.cpp} -Quantity_Color col; +Quantity_Color aCol; // will receive the recorded value (if there is some) -if ( !myColors->GetColor(aLabel, col) ) { -// sorry, no color .. +if (!myColors->GetColor (aLabel, aCol)) +{ + // sorry, no color .. } ~~~~ -Color name can also be queried from *col.StringName* or *col.Name*. -In this example, *aLabel* can be replaced by *aShape* directly. +Color name can also be queried from `aCol.StringName` or `aCol.Name`. +In this example, `aLabel` can be replaced by `aShape` directly. -To get the Color attached to a Shape, with a specific color type, use: +To get the Color attached to a Shape, with a specific color type, use: ~~~~{.cpp} -XCAFDoc_ColorType ctype ..; -Quantity_Color col; -// will receive the recorded value (if there is some) -if ( !myColors->GetColor(aLabel, ctype, col) ) { -// sorry, no color .. +XCAFDoc_ColorType aColType = ...; +Quantity_Color aCol; +// will receive the recorded value (if there is some) +if (!myColors->GetColor (aLabel, aColType, aCol)) +{ + // sorry, no color .. } ~~~~ - -To get all the Colors recorded in the Document, use: - +To get all the Colors recorded in the Document, use: ~~~~{.cpp} -Quantity_Color col; // to receive the values -TDF_LabelSequence ColLabels; -myColors->GetColors(ColLabels); -Standard_Integer i, nbc = ColLabels.Length(); -for (i = 1; i = nbc; i ++) { - aLabel = Labels.Value(i); - if ( !myColors->GetColor(aLabel, col) ) continue; - // col receives the color n0 i .. +TDF_LabelSequence aColLabels; +myColors->GetColors (aColLabels); +for (TDF_LabelSequence::Iterator aColIter (aColLabels); aColIter.More(); aColIter.Next()) +{ + Quantity_Color aCol; // to receive the values + TDF_Label aColLabel = aColIter.Value(); + if (!myColors->GetColor (aColLabel, aCol)) { continue; } } ~~~~ -To find a Color from its Value, use: +To find a Color from its Value, use: ~~~~{.cpp} -Quantity_Color Col (red,green,blue); -TDF_Label ColLabel = myColors-FindColor (Col); -if ( !ColLabel.IsNull() ) { .. found .. } +Quantity_Color aCol (red, green, blue); +TDF_Label aColLabel = myColors->FindColor (aCol); +if (!aColLabel.IsNull()) { .. found .. } ~~~~ -@subsubsection occt_xde_2_6_4 Editing Colors -Besides adding colors, the following attribute edits can be made: +@subsection occt_xde_2_6_4 Editing Colors + +Besides adding colors, the following attribute edits can be made: -To unset a Color on a Shape, use: +To unset a Color on a Shape, use: ~~~~{.cpp} -XCAFDoc_ColorType ctype ...; // desired type (XCAFDoc_ColorGen for all ) -myColors->UnSetColor (aLabel,ctype); +XCAFDoc_ColorType aColType = ...; +myColors->UnSetColor (aLabel, aColType); ~~~~ -To remove a Color and all the references to it (so that the related shapes will become colorless), use: + +To remove a Color and all the references to it (so that the related shapes will become colorless), use: ~~~~{.cpp} -myColors->RemoveColor(ColLabel); +myColors->RemoveColor (aColLabel); ~~~~ -@subsection occt_xde_2_7 Geometric Dimensions & Tolerances (GD\&T) +@section occt_xde_2_7 Geometric Dimensions & Tolerances (GD\&T) -XDE can read and write GD\&T assigned to shapes or their subparts (down to the level of faces and edges) to and from STEP formats. +XDE can read and write GD\&T assigned to shapes or their subparts (down to the level of faces and edges) to and from STEP formats. -In an XDE document, GD\&T are managed by the class *XCAFDoc_DimTolTool*. It works basing on the same principles as ShapeTool works with Shapes. This tool can be provided on the Main Label or on any sub-label. The GD\&T entities themselves are defined as the following sub-classes of *TDF_Attribute*: - * *XCAFDoc_Dimension* - for dimensions; - * *XCAFDoc_GeomTolerance* - for geometric tolerances; - * *XCAFDoc_Datum* - for geometric tolerance Datums. -A GD\&T type is identified by the attributes listed above, i.e. *XCAFDoc_DimTolTool* methods working with particular entity types check -for presence of the corresponding attributes in passed labels. One can use methods of *XCAFDoc_DimTolTool* beginning with 'Is' for this purpose. - -GD\&T entities are stored in a child of the starting document label 0.1.4. +In an XDE document, GD\&T are managed by the class `XCAFDoc_DimTolTool`. +It works basing on the same principles as ShapeTool works with Shapes. +This tool can be provided on the Main Label or on any sub-label. +The GD\&T entities themselves are defined as the following sub-classes of `TDF_Attribute`: + * `XCAFDoc_Dimension` - for dimensions; + * `XCAFDoc_GeomTolerance` - for geometric tolerances; + * `XCAFDoc_Datum` - for geometric tolerance Datums. + +A GD\&T type is identified by the attributes listed above, i.e. `XCAFDoc_DimTolTool` methods working with particular entity types check +for presence of the corresponding attributes in passed labels. +One can use methods of `XCAFDoc_DimTolTool` beginning with 'Is' for this purpose. + +GD\&T entities are stored in a child of the starting document label `0.1.4`. Each GD\&T entity then corresponds to the dedicated label, the property itself is one of access classes: - * *XCAFDimTolObject_DimensionObject* - for dimensions; - * *XCAFDimTolObject_GeomToleranceObject* - for geometric tolerances; - * *XCAFDimTolObject_DatumObject* - for geometric tolerance Datums. + * `XCAFDimTolObject_DimensionObject` - for dimensions; + * `XCAFDimTolObject_GeomToleranceObject` - for geometric tolerances; + * `XCAFDimTolObject_DatumObject` - for geometric tolerance Datums. -GD\&Ts and Shapes are related by Graph Nodes. +GD\&Ts and Shapes are related by Graph Nodes. -These definitions are common to various exchange formats, at least for STEP. +These definitions are common to various exchange formats, at least for STEP. -@subsubsection occt_xde_2_7_1 Initialization -To query, edit, or initialize a Document to handle GD\&Ts of XCAF, use: +@subsection occt_xde_2_7_1 Initialization + +To query, edit, or initialize a Document to handle GD\&Ts of XCAF, use: ~~~~{.cpp} -Handle(XCAFDoc_DimTolTool) myDimTolTool = -XCAFDoc_DocumentTool::DimTolTool(Doc->Main()); +Handle(XCAFDoc_DimTolTool) myDimTolTool = XCAFDoc_DocumentTool::DimTolTool (theDoc->Main()); ~~~~ -This call can be used at any time. When it is used for the first time, a relevant structure is added to the document. This definition is used for all later GD\&T calls and is not repeated for them. -@subsubsection occt_xde_2_7_2 Adding a GD\&T -*XCAFDoc_DimTolTool* provides methods to create GD\&T 'empty' entities: - * *AddDimension* - for a new dimension; - * *AddGeomTolerance* - for a new geometric tolerance; - * *AddDatum* - for a new geometric tolerance datum. +This call can be used at any time. +When it is used for the first time, a relevant structure is added to the document. +This definition is used for all later GD\&T calls and is not repeated for them. + +@subsection occt_xde_2_7_2 Adding a GD\&T -All methods create a sub-label for the corresponding GD\&T entity of the tool master label and attach an attribute specific for the -created entity. +`XCAFDoc_DimTolTool` provides methods to create GD\&T 'empty' entities: + * `XCAFDoc_DimTolTool::AddDimension` - for a new dimension; + * `XCAFDoc_DimTolTool::AddGeomTolerance` - for a new geometric tolerance; + * `XCAFDoc_DimTolTool::AddDatum` - for a new geometric tolerance datum. + +All methods create a sub-label for the corresponding GD\&T entity of the tool master label and attach an attribute specific for the created entity. Here is an example of adding a new dimension: ~~~~{.cpp} @@ -706,14 +828,16 @@ if (!aDimLabel.IsNull()) // error processing } ~~~~ + A similar approach can be used for other GD\&T types. -@subsubsection occt_xde_2_7_3 Editing a GD\&T -A newly added GD\&T entity is empty. To set its data a corresponding access object should be used as it is demonstrated -below, where the dimension becomes a linear distance between two points. +@subsection occt_xde_2_7_3 Editing a GD\&T + +A newly added GD\&T entity is empty. +To set its data a corresponding access object should be used as it is demonstrated below, where the dimension becomes a linear distance between two points. ~~~~{.cpp} Handle(XCAFDoc_Dimension) aDimAttr; -aDimLabel.FindAttribute(XCAFDoc_Dimension::GetID(), aDimAttr); +aDimLabel.FindAttribute (XCAFDoc_Dimension::GetID(), aDimAttr); if (!aDimAttr.IsNull()) { Handle(XCAFDimTolObjects_DimensionObject) aDimObject = aDimAttr->GetObject(); @@ -722,95 +846,107 @@ if (!aDimAttr.IsNull()) aDimObject->SetPoint(thePnt1); // the first reference point aDimObject->SetPoint2(thePnt2); // the second reference point aDimObject->SetValue(theValue); // the distance value - //... + // ... aDimAttr->SetObject(aDimObject); } ~~~~ + A similar approach can be used for other GD\&T types. -@subsubsection occt_xde_2_7_4 Linking GD\&Ts +@subsection occt_xde_2_7_4 Linking GD\&Ts + To link a GD\&T entity with other OCAF labels (e.g. representing shapes) one should use the following methods: - * *SetDimension* - for dimensions; - * *SetGeomTolerance* - for geometric tolerances; - * *SetDatum* - for geometric tolerance datums. + * `XCAFDoc_DimTolTool::SetDimension` - for dimensions; + * `XCAFDoc_DimTolTool::SetGeomTolerance` - for geometric tolerances; + * `XCAFDoc_DimTolTool::SetDatum` - for geometric tolerance datums. -These methods can take a single label or a sequence of labels. All previous links will be removed. +These methods can take a single label or a sequence of labels. +All previous links will be removed. The example below demonstrates linking of a dimension to sequences of shape labels: ~~~~{.cpp} TDF_LabelSequence aShapes1, aShapes2; -aShapes1.Append(aShape11); +aShapes1.Append (aShape11); //... -aShapes2.Append(aShape21); +aShapes2.Append (aShape21); //... -aDGTTool->SetDimension(aShapes1, aShapes2, aDimLabel); +aDGTTool->SetDimension (aShapes1, aShapes2, aDimLabel); ~~~~ -In addition, a special method *SetDatumToGeomTol* should be used to link a datum with a geometric tolerance. +In addition, a special method `XCAFDoc_DimTolTool::SetDatumToGeomTol` should be used to link a datum with a geometric tolerance. + +@subsection occt_xde_2_7_5 Finding GD\&Ts and reference shapes -@subsubsection occt_xde_2_7_5 Finding GD\&Ts and reference shapes +`XCAFDimTolObjects_Tool` class provides basic capabilities for searching GD\&Ts linked to shapes. +The tool provides sequences of dimensions, geometric tolerances and datums linked with a shape. +A series of related datums is also returned for geometric tolerances. -*XCAFDimTolObjects_Tool* class provides basic capabilities for searching GD\&Ts linked to shapes. -The tool provides sequences of dimensions, geometric tolerances and datums linked with a shape. A series of related datums is also returned for geometric tolerances. +To get reference shapes for a GD\&T entity one can use `XCAFDoc_DimTolTool::GetRefShapeLabel`. -To get reference shapes for a GD\&T entity one can use *GetRefShapeLabel* from *XCAFDoc_DimTolTool*. +`XCAFDoc_DimTolTool` provides methods to get lists of all dimensions, geometric tolerances and datums. -*XCAFDoc_DimTolTool* provides methods to get lists of all dimensions, geometric tolerances and datums. +@subsection occt_xde_2_7_6 Storing custom data -@subsubsection occt_xde_2_7_6 Storing custom data -Every GD\&T entity in XDE is represented as a label with attached attribute identifying entity type. All specific data is -stored in sub-labels in standard OCAF attributes, such as *TDataStd_Integer*, *TDataStd_IntegerArray*, *TDataStd_RealArray* and so on. -Sub-label tags are reserved for internal use and cannot be used for storing custom data. The following tag ranges are reserved for -GD\&T entities: +Every GD\&T entity in XDE is represented as a label with attached attribute identifying entity type. +All specific data is stored in sub-labels in standard OCAF attributes, such as `TDataStd_Integer`, `TDataStd_IntegerArray`, `TDataStd_RealArray` and so on. +Sub-label tags are reserved for internal use and cannot be used for storing custom data. +The following tag ranges are reserved for GD\&T entities: * 1 - 17 - for dimensions; * 1 - 17 - for geometric tolerances; * 1 - 19 - for datums. + Custom data can be stored in labels with tags beyond the ranges listed above. -@subsection occt_xde_2_8 Clipping planes +@section occt_xde_2_8 Clipping planes -In an XDE document, Clipping planes are managed by the class *XCAFDoc_ClippingPlaneTool*. It works basing on the same principles as ShapeTool works with Shapes. This tool can be provided on the Main Label or on any sub-label. Clipping planes are stored in a child of the starting document label 0.1.8, where planes themselves are defined as *TDataXtd_Plane* attribute. *TDataStd_Name* attribute is used for naming. +In an XDE document, Clipping planes are managed by the class `XCAFDoc_ClippingPlaneTool`. +It works basing on the same principles as ShapeTool works with Shapes. +This tool can be provided on the Main Label or on any sub-label. +Clipping planes are stored in a child of the starting document label `0.1.8`, where planes themselves are defined as `TDataXtd_Plane` attribute. +`TDataStd_Name` attribute is used for naming. -To query, edit, or initialize a Document to handle clipping planes of XCAF, use: +To query, edit, or initialize a Document to handle clipping planes of XCAF, use: ~~~~{.cpp} -Handle(XCAFDoc_ClippingPlaneTool) myClipPlaneTool = -XCAFDoc_DocumentTool::ClippingPlaneTool(Doc->Main()); +Handle(XCAFDoc_ClippingPlaneTool) myClipPlaneTool = XCAFDoc_DocumentTool::ClippingPlaneTool (theDoc->Main()); ~~~~ -This call can be used at any time. When it is used for the first time, a relevant structure is added to the document. -To add a clipping plane use one of overloaded methods *AddClippingPlane*, e.g.: +This call can be used at any time. +When it is used for the first time, a relevant structure is added to the document. + +To add a clipping plane use one of overloaded methods `XCAFDoc_ClippingPlaneTool::AddClippingPlane`, e.g.: ~~~~{.cpp} -gp_Pln aPln = ... -Standard_Boolean aCapping = ... -TDF_Label aClipPlnLbl = myClipPlaneTool->AddClippingPlane(aPln, "Name of plane", aCapping); +gp_Pln aPln = ...; +Standard_Boolean aCapping = ...; +TDF_Label aClipPlnLbl = myClipPlaneTool->AddClippingPlane (aPln, "Name of plane", aCapping); if (aClipPlnLbl.IsNull()) { // error processing } ~~~~ -To remove a plane use *RemoveClippingPlane* method, e.g.: +To remove a plane use `XCAFDoc_ClippingPlaneTool::RemoveClippingPlane` method, e.g.: ~~~~{.cpp} -if (!myClipPlaneTool->RemoveClippingPlane(aClipPlnLbl)) +if (!myClipPlaneTool->RemoveClippingPlane (aClipPlnLbl)) { // not removed } ~~~~ + The plane will not be removed if it is referenced in at least one view. -To change the clipping plane and its name use *UpdateClippingPlane* method, e.g.: +To change the clipping plane and its name use `XCAFDoc_ClippingPlaneTool::UpdateClippingPlane` method, e.g.: ~~~~{.cpp} -gp_Pln aPln = ... -myClipPlaneTool->UpdateClippingPlane(aClipPlnLbl, aPln, "New name of plane"); +gp_Pln aPln = ...; +myClipPlaneTool->UpdateClippingPlane (aClipPlnLbl, aPln, "New name of plane"); ~~~~ -Capping property can be changed using *SetCapping* method, e.g.: +Capping property can be changed using `XCAFDoc_ClippingPlaneTool::SetCapping` method, e.g.: ~~~~{.cpp} -Standard_Boolean aCapping = ... -myClipPlaneTool->SetCapping(aClipPlnLbl, aCapping); +Standard_Boolean aCapping = ...; +myClipPlaneTool->SetCapping (aClipPlnLbl, aCapping); ~~~~ -*XCAFDoc_ClippingPlaneTool* can be used to get all clipping plane labels and to check if a label belongs to the *ClippingPlane table*, e.g.: +`XCAFDoc_ClippingPlaneTool` can be used to get all clipping plane labels and to check if a label belongs to the *ClippingPlane table*, e.g.: ~~~~{.cpp} TDF_LabelSequence aClipPlaneLbls; myClipPlaneTool->GetClippingPlanes(aClipPlaneLbls); @@ -832,18 +968,23 @@ for (TDF_LabelSequence::Iterator anIt(aClipPlaneLbls); anIt.More(); anIt.Next()) } ~~~~ -@subsection occt_xde_2_9 Saved views +@section occt_xde_2_9 Saved views -In an XDE document, Views are managed by the class *XCAFDoc_ViewTool*. It works basing on the same principles as ShapeTool works with Shapes. This tool can be provided on the Main Label or on any sub-label. Views are stored in a child of the starting document label 0.1.7, where a view itself is defined as *XCAFDoc_View* sub-class of *TDF_Attribute*. Views and selected shapes, clipping planes, GD\&Ts and notes are related by Graph Nodes. +In an XDE document, Views are managed by the class `XCAFDoc_ViewTool`. +It works basing on the same principles as ShapeTool works with Shapes. +This tool can be provided on the Main Label or on any sub-label. +Views are stored in a child of the starting document label `0.1.7`, where a view itself is defined as `XCAFDoc_View` sub-class of `TDF_Attribute`. +Views and selected shapes, clipping planes, GD\&Ts and notes are related by Graph Nodes. -To query, edit, or initialize a Document to handle views of XCAF, use: +To query, edit, or initialize a Document to handle views of XCAF, use: ~~~~{.cpp} -Handle(XCAFDoc_ViewTool) myViewTool = -XCAFDoc_DocumentTool::ViewTool(Doc->Main()); +Handle(XCAFDoc_ViewTool) myViewTool = XCAFDoc_DocumentTool::ViewTool (theDoc->Main()); ~~~~ -This call can be used at any time. When it is used for the first time, a relevant structure is added to the document. -To add a view use *AddView* method and an access *XCAFView_Object* object to set camera parameters, e.g.: +This call can be used at any time. +When it is used for the first time, a relevant structure is added to the document. + +To add a view use `XCAFDoc_ViewTool::AddView` method and an access `XCAFView_Object` object to set camera parameters, e.g.: ~~~~{.cpp} TDF_Label aViewLbl = myViewTool->AddView(); if (aViewLbl.IsNull()) @@ -864,8 +1005,8 @@ if (!aViewAttr.IsNull()) } ~~~~ -To set shapes, clipping planes, GD\&Ts and notes selected for the view use one of overloaded *SetView* methods of *XCAFDoc_ViewTool*. -To set only clipping planes one should use *SetClippingPlanes* method. +To set shapes, clipping planes, GD\&Ts and notes selected for the view use one of overloaded `SetView` methods of `XCAFDoc_ViewTool`. +To set only clipping planes one should use `XCAFDoc_ViewTool::SetClippingPlanes` method. ~~~~{.cpp} TDF_LabelSequence aShapes; ... TDF_LabelSequence aGDTs; ... @@ -874,7 +1015,7 @@ TDF_LabelSequence aClippingPlanes; ... myViewTool->SetClippingPlanes(aClippingPlanes, aViewLbl); ~~~~ -To remove a view use *RemoveView* method. +To remove a view use `XCAFDoc_ViewTool::RemoveView` method. To get all view labels and check if a label belongs to the View table use: ~~~~{.cpp} @@ -892,73 +1033,83 @@ for (TDF_LabelSequence::Iterator anIt(aViewLbls); anIt.More(); anIt.Next()) ~~~~ To get shapes, clipping planes, GD\&Ts or notes associated with a particular view use the following methods: - * *GetRefShapeLabel* - returns a sequence of associated shape labels; - * *GetRefGDTLabel* - returns a sequence of associated GDT labels; - * *GetRefClippingPlaneLabel* - returns a sequence of associated clipping plane labels; - * *GetRefNoteLabel* - returns a sequence of associated note labels; - * *GetRefAnnotationLabel* - returns a sequence of associated annotated labels. + * `XCAFDoc_ViewTool::GetRefShapeLabel` - returns a sequence of associated shape labels; + * `XCAFDoc_ViewTool::GetRefGDTLabel` - returns a sequence of associated GDT labels; + * `XCAFDoc_ViewTool::GetRefClippingPlaneLabel` - returns a sequence of associated clipping plane labels; + * `XCAFDoc_ViewTool::GetRefNoteLabel` - returns a sequence of associated note labels; + * `XCAFDoc_ViewTool::GetRefAnnotationLabel` - returns a sequence of associated annotated labels. And vice versa, to get views that display a particular clipping plane, GD\&T or note use the following methods: - * *GetViewLabelsForShape* - returns a sequence of view labels associated with a shape; - * *GetViewLabelsForGDT* - returns a sequence of view labels associated with a GD\&T; - * *GetViewLabelsForClippingPlane* - returns a sequence of view labels associated with a clipping plane; - * *GetViewLabelsForNote* - returns a sequence of view labels associated with a note; - * *GetViewLabelsForAnnotation* - returns a sequence of view labels associated with an annotated label. + * `XCAFDoc_ViewTool::GetViewLabelsForShape` - returns a sequence of view labels associated with a shape; + * `XCAFDoc_ViewTool::GetViewLabelsForGDT` - returns a sequence of view labels associated with a GD\&T; + * `XCAFDoc_ViewTool::GetViewLabelsForClippingPlane` - returns a sequence of view labels associated with a clipping plane; + * `XCAFDoc_ViewTool::GetViewLabelsForNote` - returns a sequence of view labels associated with a note; + * `XCAFDoc_ViewTool::GetViewLabelsForAnnotation` - returns a sequence of view labels associated with an annotated label. -@subsection occt_xde_2_10 Custom notes +@section occt_xde_2_10 Custom notes -In an XDE document, custom notes are managed by the class *XCAFDoc_NotesTool*. -It works basing on the same principles as ShapeTool works with Shapes. -This tool can be provided on the Main Label or on any sub-label. -The Property itself is defined as sub-class of *XCAFDoc_Note* abstract class, which is a sub-class of *TDF_Attribute* one. +In an XDE document, custom notes are managed by the class `XCAFDoc_NotesTool`. +It works basing on the same principles as ShapeTool works with Shapes. +This tool can be provided on the Main Label or on any sub-label. +The Property itself is defined as sub-class of `XCAFDoc_Note` abstract class, which is a sub-class of `TDF_Attribute` one. -Custom notes are stored in a child of the *XCAFDoc_NotesTool* label, at label 0.1.9.1. Each note then corresponds to a dedicated label. A note may be attached to a document item identified by a label, a sub-shape identified by integer index or an attribute identified by GUID. Annotations are stored in a child of the *XCAFDoc_NotesTool* label, at label 0.1.9.2. -Notes binding is done through *XCAFDoc_GraphNode* attribute. +Custom notes are stored in a child of the `XCAFDoc_NotesTool` label, at label `0.1.9.1`. +Each note then corresponds to a dedicated label. +A note may be attached to a document item identified by a label, a sub-shape identified by integer index or an attribute identified by GUID. +Annotations are stored in a child of the `XCAFDoc_NotesTool` label, at label `0.1.9.2`. +Notes binding is done through `XCAFDoc_GraphNode` attribute. @figure{/user_guides/xde/images/xde_notes001.png,"Structure of notes part of XCAF document",240} - -@subsubsection occt_xde_2_10_1 Initialization -To query, edit, or initialize a Document to handle custom notes of XCAF, use: +@subsection occt_xde_2_10_1 Initialization + +To query, edit, or initialize a Document to handle custom notes of XCAF, use: ~~~~{.cpp} -Handle(XCAFDoc_NotesTool) myNotes = -XCAFDoc_DocumentTool::NotesTool(Doc->Main ()); +Handle(XCAFDoc_NotesTool) myNotes = XCAFDoc_DocumentTool::NotesTool (theDoc->Main()); ~~~~ -This call can be used at any time. The first time it is used, a relevant structure is added to the document. This definition is used for all later notes calls and will not be repeated for them. + +This call can be used at any time. +The first time it is used, a relevant structure is added to the document. +This definition is used for all later notes calls and will not be repeated for them. -@subsubsection occt_xde_2_10_2 Creating Notes +@subsection occt_xde_2_10_2 Creating Notes -Before annotating a Document item a note must be created using one of the following methods of *XCAFDoc_NotesTool* class: -- *CreateComment* : creates a note with a textual comment; -- *CreateBinData* : creates a note with arbitrary binary data, e.g. contents of a file. +Before annotating a Document item a note must be created using one of the following methods of `XCAFDoc_NotesTool` class: +- `XCAFDoc_NotesTool::CreateComment`: creates a note with a textual comment; +- `XCAFDoc_NotesTool::CreateBinData`: creates a note with arbitrary binary data, e.g. contents of a file. -Both methods return an instance of *XCAFDoc_Note* class. +Both methods return an instance of `XCAFDoc_Note` class. ~~~~{.cpp} -Handle(XCAFDoc_NotesTool) myNotes = ... -Handle(XCAFDoc_Note) myNote = myNotes->CreateComment("User", "Timestamp", "Hello, World!"); +Handle(XCAFDoc_NotesTool) myNotes = ...; +Handle(XCAFDoc_Note) myNote = myNotes->CreateComment ("User", "Timestamp", "Hello, World!"); ~~~~ -This code adds a child label to label 0.1.9.1 with *XCAFDoc_NoteComment* attribute. -@subsubsection occt_xde_2_10_3 Editing a Note -An instance of *XCAFDoc_Note* class can be used for note editing. +This code adds a child label to label `0.1.9.1` with `XCAFDoc_NoteComment` attribute. + +@subsection occt_xde_2_10_3 Editing a Note + +An instance of `XCAFDoc_Note` class can be used for note editing. One may change common note data. ~~~~{.cpp} myNote->Set("New User", "New Timestamp"); ~~~~ -To change specific data one needs to down cast *myNote* handle to the appropriate sub-class: + +To change specific data one needs to down cast `myNote` handle to the appropriate sub-class: ~~~~{.cpp} Handle(XCAFDoc_NoteComment) myCommentNote = Handle(XCAFDoc_NoteComment)::DownCast(myNote); -if (!myCommentNote.IsNull()) { +if (!myCommentNote.IsNull()) +{ myCommentNote->Set("New comment"); } ~~~~ + In order to edit auxiliary note data such as text and attachment position, plane for rendering and tessellated presentation, -one should use a transfer object *XCAFNoteObjects_NoteObject* by GetObject and SetObject methods of *XCAFDoc_Note* class. -*XCAFNoteObjects_NoteObject* class provides the following functionality: -- HasPlane, GetPlane and SetPlane methods test, get and set plane for note rendering -- HasPoint, GetPoint and SetPoint methods test, get and set note attachment position on the annotated object -- HasPointText, GetPointText, SetPointText methods test, get and set test position -- GetPresentation and SetPresentation methods allow to test for and specify tessellated presentation +one should use a transfer object `XCAFNoteObjects_NoteObject` by GetObject and SetObject methods of `XCAFDoc_Note` class. +`XCAFNoteObjects_NoteObject` class provides the following functionality: +- `HasPlane`, `GetPlane` and `SetPlane` methods test, get and set plane for note rendering; +- `HasPoint`, `GetPoint` and `SetPoint` methods test, get and set note attachment position on the annotated object; +- `HasPointText`, `GetPointText`, `SetPointText` methods test, get and set test position; +- `GetPresentation` and `SetPresentation` methods allow to test for and specify tessellated presentation. After getting, the transfer object can be edited and set back to the note: ~~~~{.cpp} @@ -973,56 +1124,59 @@ if (!aNoteObj.IsNull()) } ~~~~ -@subsubsection occt_xde_2_10_4 Adding Notes +@subsection occt_xde_2_10_4 Adding Notes -Once a note has been created it can be bound to a Document item using the following *XCAFDoc_NotesTool* methods: -- *AddNote* : binds a note to a label; -- *AddNoteToAttr* : binds a note to a label's attribute; -- *AddNoteToSubshape* : binds a note to a sub-shape. +Once a note has been created it can be bound to a Document item using the following `XCAFDoc_NotesTool` methods: +- `XCAFDoc_NotesTool::AddNote`: binds a note to a label; +- `XCAFDoc_NotesTool::AddNoteToAttr`: binds a note to a label's attribute; +- `XCAFDoc_NotesTool::AddNoteToSubshape`: binds a note to a sub-shape. -All methods return a pointer to *XCAFDoc_AssemblyItemRef* attribute identifying the annotated item. +All methods return a pointer to `XCAFDoc_AssemblyItemRef` attribute identifying the annotated item. ~~~~{.cpp} -Handle(XCAFDoc_NotesTool) myNotes = ... -Handle(XCAFDoc_Note) myNote = ... -TDF_Label theLabel; ... +Handle(XCAFDoc_NotesTool) myNotes = ...; +Handle(XCAFDoc_Note) myNote = ...; +TDF_Label theLabel = ...; Handle(XCAFDoc_AssemblyItemRef) myRef = myNotes->AddNote(myNote->Label(), theLabel); -Standard_GUID theAttrGUID; ... +Standard_GUID theAttrGUID = ...; Handle(XCAFDoc_AssemblyItemRef) myRefAttr = myNotes->AddNoteToAttr(myNote->Label(), theAttrGUID); Standard_Integer theSubshape = 1; Handle(XCAFDoc_AssemblyItemRef) myRefSubshape = myNotes->AddNoteToSubshape(myNote->Label(), theSubshape); ~~~~ -This code adds three child labels with *XCAFDoc_AssemblyItemRef* attribute to label 0.1.9.2. *XCAFDoc_GraphNode* attributes are added to the child labels and note labels. -@subsubsection occt_xde_2_10_5 Finding Notes +This code adds three child labels with `XCAFDoc_AssemblyItemRef` attribute to label `0.1.9.2`. +`XCAFDoc_GraphNode` attributes are added to the child labels and note labels. + +@subsection occt_xde_2_10_5 Finding Notes -To find annotation labels under label 0.1.9.2 use the following *XCAFDoc_NotesTool* methods: -- *FindAnnotatedItem* : returns an annotation label for a label; -- *FindAnnotatedItemAttr* : returns an annotation label for a label's attribute; -- *FindAnnotatedItemSubshape* : returns an annotation label for a sub-shape. +To find annotation labels under label `0.1.9.2` use the following `XCAFDoc_NotesTool` methods: +- `XCAFDoc_NotesTool::FindAnnotatedItem`: returns an annotation label for a label; +- `XCAFDoc_NotesTool::FindAnnotatedItemAttr`: returns an annotation label for a label's attribute; +- `XCAFDoc_NotesTool::FindAnnotatedItemSubshape`: returns an annotation label for a sub-shape. ~~~~{.cpp} -Handle(XCAFDoc_NotesTool) myNotes = ... -TDF_Label theLabel; ... +Handle(XCAFDoc_NotesTool) myNotes = ...; +TDF_Label theLabel = ...; TDF_Label myLabel = myNotes->FindAnnotatedItem(theLabel); -Standard_GUID theAttrGUID; ... +Standard_GUID theAttrGUID = ...; TDF_Label myLabelAttr = myNotes->FindAnnotatedItemAttr(theLabel, theAttrGUID); Standard_Integer theSubshape = 1; TDF_Label myLabelSubshape = myNotes->FindAnnotatedItemSubshape(theLabel, theSubshape); ~~~~ + Null label will be returned if there is no corresponding annotation. -To get all notes of the Document item use the following *XCAFDoc_NotesTool* methods: -- *GetNotes* : outputs a sequence of note labels bound to a label; -- *GetAttrNotes* : outputs a sequence of note labels bound to a label's attribute; -- *GetAttrSubshape* : outputs a sequence of note labels bound to a sub-shape. +To get all notes of the Document item use the following `XCAFDoc_NotesTool` methods: +- `XCAFDoc_NotesTool::GetNotes`: outputs a sequence of note labels bound to a label; +- `XCAFDoc_NotesTool::GetAttrNotes`: outputs a sequence of note labels bound to a label's attribute; +- `XCAFDoc_NotesTool::GetAttrSubshape`: outputs a sequence of note labels bound to a sub-shape. All these methods return the number of notes. ~~~~{.cpp} -Handle(XCAFDoc_NotesTool) myNotes = ... -TDF_Label theLabel; ... +Handle(XCAFDoc_NotesTool) myNotes = ...; +TDF_Label theLabel = ...; TDF_LabelSequence theNotes; myNotes->GetNotes(theLabel, theNotes); -Standard_GUID theAttrGUID; ... +Standard_GUID theAttrGUID = ...; TDF_LabelSequence theNotesAttr; myNotes->GetAttrNotes(theLabel, theAttrGUID, theNotesAttr); Standard_Integer theSubshape = 1; @@ -1030,18 +1184,18 @@ TDF_LabelSequence theNotesSubshape; myNotes->GetAttrSubshape(theLabel, theSubshape, theNotesSubshape); ~~~~ -@subsubsection occt_xde_2_10_6 Removing Notes +@subsection occt_xde_2_10_6 Removing Notes -To remove a note use one of the following *XCAFDoc_NotesTool* methods: -- *RemoveNote* : unbinds a note from a label; -- *RemoveAttrNote* : unbinds a note from a label's attribute; -- *RemoveSubshapeNote* : unbinds a note from a sub-shape. +To remove a note use one of the following `XCAFDoc_NotesTool` methods: +- `XCAFDoc_NotesTool::RemoveNote`: unbinds a note from a label; +- `XCAFDoc_NotesTool::RemoveAttrNote`: unbinds a note from a label's attribute; +- `XCAFDoc_NotesTool::RemoveSubshapeNote`: unbinds a note from a sub-shape. ~~~~{.cpp} -Handle(XCAFDoc_Note) myNote = ... -TDF_Label theLabel; ... +Handle(XCAFDoc_Note) myNote = ...; +TDF_Label theLabel = ...; myNotes->RemoveNote(myNote->Label(), theLabel); -Standard_GUID theAttrGUID; ... +Standard_GUID theAttrGUID = ...; myRefAttr = myNotes->RemoveAttrNote(myNote->Label(), theAttrGUID); Standard_Integer theSubshape = 1; myNotes->RemoveSubshapeNote(myNote->Label(), theSubshape); @@ -1049,92 +1203,114 @@ myNotes->RemoveSubshapeNote(myNote->Label(), theSubshape); A note will not be deleted automatically. Counterpart methods to remove all notes are available, too. -@subsubsection occt_xde_2_10_7 Deleting Notes +@subsection occt_xde_2_10_7 Deleting Notes -To delete note(s) use the following *XCAFDoc_NotesTool* methods: -- *DeleteNote* : deletes a single note; -- *DeleteNotes* : deletes a sequence of notes; -- *DeleteAllNotes* : deletes all Document notes; -- *DeleteOrphanNotes* : deletes notes not bound to Document items. +To delete note(s) use the following `XCAFDoc_NotesTool` methods: +- `XCAFDoc_NotesTool::DeleteNote`: deletes a single note; +- `XCAFDoc_NotesTool::DeleteNotes`: deletes a sequence of notes; +- `XCAFDoc_NotesTool::DeleteAllNotes`: deletes all Document notes; +- `XCAFDoc_NotesTool::DeleteOrphanNotes`: deletes notes not bound to Document items. All these methods except for the last one break all links with Document items as well. -@subsection occt_xde_2_11 Reading and Writing STEP or IGES -Note that saving and restoring the document itself are standard OCAF operations. As the various previously described definitions enter into this frame, they will not be explained any further. -The same can be said for Viewing: presentations can be defined from Shapes and Colors. - -There are several important points to consider: - * Previously defined Readers and Writers for dealing with Shapes only, whether Standard or Advanced, remain unchanged in their form and in their dependencies. In addition, functions other than mapping are also unchanged. - * XDE provides mapping with data other than Shapes. Names, Colors, Layers, GD\&T, Clipping planes, Views, Validation Properties (Centroid, Volume, Area), and Assembly Structure are hierarchic with rigid motion. Currently, Clipping planes and Views writing supported for XBF format only. - * XDE mapping is relevant for use within the Advanced level of Data Exchanges, rather than Standard ones, because a higher level of information is better suited to a higher quality of shapes. In addition, this allows to avoid the multiplicity of combinations between various options. Note that this choice is not one of architecture but of practical usage and packaging. - * Reader and Writer classes for XDE are generally used like those for Shapes. However, their use is adapted to manage a Document rather than a Shape. - -The packages to manage this are *IGESCAFControl* for IGES, and *STEPCAFControl* for STEP. - -@subsubsection occt_xde_2_11_1 Reading a STEP file -To read a STEP file by itself, use: - -~~~~{.cpp} -STEPCAFControl_Reader reader; -IFSelect_ReturnStatus readstat = reader.ReadFile(filename); -// The various ways of reading a file are available here too : -// to read it by the reader, to take it from a WorkSession ... -Handle(TDocStd_Document) doc... -// the document referred to is already defined and -// properly initialized. -// Now, the transfer itself -if ( !reader.Transfer ( doc ) ) { - cout;Cannot read any relevant data from the STEP file;endl; - // abandon .. -} -// Here, the Document has been filled from a STEP file, -// it is ready to use -~~~~ - -In addition, the reader provides methods that are applicable to document transfers and for directly querying of the data produced. -@subsubsection occt_xde_2_11_2 Writing a STEP file -To write a STEP file by itself, use: - -~~~~{.cpp} -STEPControl_StepModelType mode = -STEPControl_AsIs; -// Asis is the recommended value, others are available -// Firstly, perform the conversion to STEP entities -STEPCAFControl_Writer writer; -//(the user can work with an already prepared WorkSession or create a //new one) -Standard_Boolean scratch = Standard_False; -STEPCAFControl_Writer writer ( WS, scratch ); -// Translating document (conversion) to STEP -if ( ! writer.Transfer ( Doc, mode ) ) { - cout;The document cannot be translated or gives no result;endl; +@section occt_xde_2_11 Reading and Writing STEP or IGES + +Note that saving and restoring the document itself are standard OCAF operations. +As the various previously described definitions enter into this frame, they will not be explained any further. +The same can be said for Viewing: presentations can be defined from Shapes and Colors. + +There are several important points to consider: + * Previously defined Readers and Writers for dealing with Shapes only, whether Standard or Advanced, remain unchanged in their form and in their dependencies. + In addition, functions other than mapping are also unchanged. + * XDE provides mapping with data other than Shapes. + Names, Colors, Layers, GD\&T, Clipping planes, Views, Validation Properties (Centroid, Volume, Area), and Assembly Structure are hierarchic with rigid motion. + Currently, Clipping planes and Views writing supported for XBF format only. + * XDE mapping is relevant for use within the Advanced level of Data Exchanges, rather than Standard ones, because a higher level of information is better suited to a higher quality of shapes. + In addition, this allows to avoid the multiplicity of combinations between various options. + Note that this choice is not one of architecture but of practical usage and packaging. + * Reader and Writer classes for XDE are generally used like those for Shapes. + However, their use is adapted to manage a Document rather than a Shape. + +The packages to manage this are `IGESCAFControl` for IGES, and `STEPCAFControl` for STEP. + +@subsection occt_xde_2_11_1 Reading a STEP file + +To read a STEP file by itself, use: + +~~~~{.cpp} +const char* theFilename = ...; +STEPCAFControl_Reader aReader; +IFSelect_ReturnStatus aReadStat = aReader.ReadFile (theFilename); +if (aReadStat != IFSelect_RetDone) { .. reader/parser error .. } +// the various ways of reading a file are available here too: +// to read it by the reader, to take it from a WorkSession ... +Handle(TDocStd_Document) aDoc = ...; +// the document referred to is already defined and properly initialized; now, the transfer itself +if (!aReader.Transfer (aDoc)) +{ + Message::SendFail() << "Cannot read any relevant data from the STEP file"; + // abandon .. +} +// here, the Document has been filled from a STEP file, it is ready to use +~~~~ + +In addition, the reader provides methods that are applicable to document transfers and for directly querying of the data produced. + +@subsection occt_xde_2_11_2 Writing a STEP file + +To write a STEP file by itself, use: + +~~~~{.cpp} +// AsIs is the recommended value, others are available; +STEPControl_StepModelType aMode = STEPControl_AsIs; + +// the user can work with an already prepared WorkSession or create a new one +//bool aScratch = false; +//STEPCAFControl_Writer aWriter (WS, aScratch); +STEPCAFControl_Writer aWriter; + +// firstly, perform the conversion to STEP entities +if (!aWriter.Transfer (aDoc, aMode)) +{ + Message::SendFail() << "The document cannot be translated or gives no result"; // abandon .. -} -// Writing the File -IFSelect_ReturnStatus stat = writer.Write(file-name); +} + +// writing the File +const char* theFilename = ...; +IFSelect_ReturnStatus aStat = aWriter.Write (theFilename); +if (aStat != IFSelect_RetDone) { .. writing failed .. } ~~~~ -@subsubsection occt_xde_2_11_3 Reading an IGES File -Use the same procedure as for a STEP file but with IGESCAFControl instead of STEPCAFControl. -@subsubsection occt_xde_2_11_4 Writing an IGES File -Use the same procedure as for a STEP file but with IGESCAFControl instead of STEPCAFControl. +@subsection occt_xde_2_11_3 Reading an IGES File + +Use the same procedure as for a STEP file but with `IGESCAFControl` instead of `STEPCAFControl`. + +@subsection occt_xde_2_11_4 Writing an IGES File + +Use the same procedure as for a STEP file but with `IGESCAFControl` instead of `STEPCAFControl`. -@subsection occt_xde_2_12 Using an XDE Document -There are several ways of exploiting XDE data from an application, you can: +@section occt_xde_2_12 Using an XDE Document + +There are several ways of exploiting XDE data from an application, you can: 1. Get the data relevant for the application by mapping XDE/Appli, then discard the XDE data once it has been used. 2. Create a reference from the Application Document to the XDE Document, to have its data available as external data. 3. Embed XDE data inside the Application Document (see the following section for details). 4. Directly exploit XDE data such as when using file checkers. -@subsubsection occt_xde_2_12_1 XDE Data inside an Application Document -To have XCAF data elsewhere than under label 0.1, you use the DocLabel of XDE. The method DocLabel from XCAFDoc_DocumentTool determines the relevant Label for XCAF. However, note that the default is 0.1. +@subsection occt_xde_2_12_1 XDE Data inside an Application Document -In addition, as XDE data is defined and managed in a modular way, you can consider exclusively Assembly Structure, only Colors, and so on. +To have XCAF data elsewhere than under label `0.1`, you use the DocLabel of XDE. +The method `XCAFDoc_DocumentTool::DocLabel` determines the relevant Label for XCAF. +However, note that the default is `0.1`. -As XDE provides an extension of the data structure, for relevant data in standardized exchanges, note the following: - * This data structure is fitted for data exchange, rather than for use by the final application. +In addition, as XDE data is defined and managed in a modular way, you can consider exclusively Assembly Structure, only Colors, and so on. + +As XDE provides an extension of the data structure, for relevant data in standardized exchanges, note the following: + * This data structure is fitted for data exchange, rather than for use by the final application; * The provided definitions are general, for common use and therefore do not bring strongly specific semantics. - -As a result, if an application works on Assemblies, on Colors or Layers, on Validation Properties (as defined in STEP), it can rely on all or a part of the XDE definitions, and include them in its own data structure. -In addition, if an application has a data structure far from these notions, it can get data (such as Colors and Names on Shapes) according to its needs, but without having to consider the whole. +As a result, if an application works on Assemblies, on Colors or Layers, on Validation Properties (as defined in STEP), +it can rely on all or a part of the XDE definitions, and include them in its own data structure. +In addition, if an application has a data structure far from these notions, it can get data (such as Colors and Names on Shapes) according to its needs, but without having to consider the whole. From b9184c271493f25ae444304a62f35d9c236c6f12 Mon Sep 17 00:00:00 2001 From: kgv Date: Sat, 26 Feb 2022 21:52:21 +0300 Subject: [PATCH 223/639] 0032834: Configuration, CMake - DESTDIR ignored for OpenCASCADECompileDefinitionsAndFlags-${CMAKE_INSTALL_CONFIG_NAME_LOWER}.cmake Replace redundant configure_file() with normal file copy for installing OpenCASCADECompileDefinitionsAndFlags- files. --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 4b255ca7b5..e6ad20280a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1225,7 +1225,7 @@ foreach (OCCT_CONFIGURATION ${CMAKE_CONFIGURATION_TYPES}) endforeach() # install OpenCASCADE config file with compile definitions and C/C++ flags ONLY for current configuration install (CODE "string (TOLOWER \"\${CMAKE_INSTALL_CONFIG_NAME}\" CMAKE_INSTALL_CONFIG_NAME_LOWER)") -install (CODE "configure_file(\"${CMAKE_BINARY_DIR}/OpenCASCADECompileDefinitionsAndFlags-\${CMAKE_INSTALL_CONFIG_NAME_LOWER}.cmake\" \"${INSTALL_DIR}/${INSTALL_DIR_CMAKE}/OpenCASCADECompileDefinitionsAndFlags-\${CMAKE_INSTALL_CONFIG_NAME_LOWER}.cmake\" COPYONLY)") +install (CODE "file(INSTALL FILES \"${CMAKE_BINARY_DIR}/OpenCASCADECompileDefinitionsAndFlags-\${CMAKE_INSTALL_CONFIG_NAME_LOWER}.cmake\" DESTINATION \"${INSTALL_DIR}/${INSTALL_DIR_CMAKE}/\" TYPE FILE)") foreach (OCCT_MODULE ${OCCT_MODULES}) if (BUILD_MODULE_${OCCT_MODULE}) From 5c48956f8e3b146b57d025e7d4114d58d17fa4c0 Mon Sep 17 00:00:00 2001 From: ifv Date: Tue, 1 Feb 2022 12:17:52 +0300 Subject: [PATCH 224/639] 0032849: Modeling Algorithms - Intersection algorithm returns incomplete result. GeomInt/GeomInt_IntSS.cxx, IntTools/IntTools_FaceFace.cxx - setting deflection 0.01 for case of two bspline surfaces IntPolyh/IntPolyh_Intersection.cxx, IntPolyh/IntPolyh_Intersection.hxx - status IsParallel is added BndLib/BndLib_Add3dCurve.cxx, IntTools/IntTools_TopolTool.cxx - fix small bugs Correction of test scripts according to current behavior of algorithms lowalgos/intss/bug32849 - test case added --- src/BndLib/BndLib_Add3dCurve.cxx | 2 +- src/GeomInt/GeomInt_IntSS.cxx | 7 ++- src/IntPolyh/IntPolyh_Intersection.cxx | 17 +++--- src/IntPolyh/IntPolyh_Intersection.hxx | 10 ++++ src/IntTools/IntTools_FaceFace.cxx | 6 +- src/IntTools/IntTools_TopolTool.cxx | 2 +- src/QABugs/QABugs_20.cxx | 81 ++++++++++++++++++++++++++ tests/boolean/bfuse_complex/R9 | 2 - tests/boolean/bfuse_complex/S1 | 2 - tests/bugs/modalg_1/bug12918 | 2 - tests/bugs/modalg_4/bug697_2 | 2 - tests/bugs/modalg_4/bug697_4 | 2 - tests/bugs/modalg_4/bug697_7 | 2 - tests/bugs/modalg_4/bug697_8 | 2 - tests/bugs/modalg_5/bug22829 | 2 - tests/bugs/modalg_5/bug24003 | 2 - tests/bugs/modalg_5/bug25625 | 2 - tests/bugs/modalg_6/bug24161 | 2 - tests/bugs/modalg_6/bug28283 | 2 - tests/bugs/modalg_7/bug21134 | 1 - tests/bugs/modalg_7/bug25082_1 | 1 - tests/bugs/modalg_7/bug25082_2 | 1 - tests/bugs/modalg_7/bug28150_1 | 2 - tests/bugs/modalg_7/bug29900 | 2 - tests/bugs/modalg_7/bug30559 | 2 - tests/bugs/modalg_7/bug30760 | 2 - tests/bugs/modalg_7/bug31890 | 2 - tests/bugs/moddata_1/bug150_1 | 1 - tests/bugs/moddata_1/bug150_2 | 1 - tests/lowalgos/intss/begin | 30 ---------- tests/lowalgos/intss/bug24472 | 17 ++++-- tests/lowalgos/intss/bug25952_1 | 3 +- tests/lowalgos/intss/bug25952_2 | 4 +- tests/lowalgos/intss/bug25952_3 | 3 +- tests/lowalgos/intss/bug28493 | 4 +- tests/lowalgos/intss/bug32607 | 4 +- tests/lowalgos/intss/bug32849 | 30 ++++++++++ tests/perf/modalg/bug10160_1 | 1 - tests/perf/modalg/bug10160_2 | 1 - tests/perf/modalg/bug10160_3 | 1 - tests/perf/modalg/bug10160_4 | 1 - tests/perf/modalg/bug29329 | 1 - 42 files changed, 168 insertions(+), 96 deletions(-) create mode 100644 tests/lowalgos/intss/bug32849 diff --git a/src/BndLib/BndLib_Add3dCurve.cxx b/src/BndLib/BndLib_Add3dCurve.cxx index e26d6a93f1..5a763ddc41 100644 --- a/src/BndLib/BndLib_Add3dCurve.cxx +++ b/src/BndLib/BndLib_Add3dCurve.cxx @@ -217,7 +217,7 @@ void BndLib_Add3dCurve::Add( const Adaptor3d_Curve& C, if(Bsaux->LastParameter() < U2 ) u2 = Bsaux->LastParameter(); // modified by NIZHNY-EAP Fri Dec 3 14:29:18 1999 ___END___ } - Standard_Real aSegmentTol = Precision::PConfusion(); + Standard_Real aSegmentTol = 2. * Precision::PConfusion(); if (Abs(u2 - u1) < aSegmentTol) aSegmentTol = Abs(u2 - u1) * 0.01; Bsaux->Segment(u1, u2, aSegmentTol); diff --git a/src/GeomInt/GeomInt_IntSS.cxx b/src/GeomInt/GeomInt_IntSS.cxx index 1417ab4cf5..ce061d207a 100644 --- a/src/GeomInt/GeomInt_IntSS.cxx +++ b/src/GeomInt/GeomInt_IntSS.cxx @@ -80,11 +80,16 @@ void GeomInt_IntSS::Perform(const Handle(Geom_Surface)& S1, Handle(Adaptor3d_TopolTool) dom1 = new Adaptor3d_TopolTool(myHS1); Handle(Adaptor3d_TopolTool) dom2 = new Adaptor3d_TopolTool(myHS2); myLConstruct.Load(dom1,dom2,myHS1,myHS2); - + Standard_Real TolArc = Tol; Standard_Real TolTang = Tol; Standard_Real UVMaxStep = IntPatch_Intersection::DefineUVMaxStep(myHS1, dom1, myHS2, dom2); Standard_Real Deflection = 0.1; + if (myHS1->GetType() == GeomAbs_BSplineSurface && myHS2->GetType() == GeomAbs_BSplineSurface) + { + Deflection /= 10.; + } + myIntersector.SetTolerances(TolArc,TolTang,UVMaxStep,Deflection); diff --git a/src/IntPolyh/IntPolyh_Intersection.cxx b/src/IntPolyh/IntPolyh_Intersection.cxx index 74ab7292c7..0c8b2d59cd 100644 --- a/src/IntPolyh/IntPolyh_Intersection.cxx +++ b/src/IntPolyh/IntPolyh_Intersection.cxx @@ -29,12 +29,8 @@ #include -static Standard_Boolean IsAdvRequired(IntPolyh_PMaillageAffinage& theMaillage); - static Standard_Integer ComputeIntersection(IntPolyh_PMaillageAffinage& theMaillage); -static Standard_Boolean AnalyzeIntersection(IntPolyh_PMaillageAffinage& theMaillage); - //======================================================================= //function : IntPolyh_Intersection //purpose : @@ -49,6 +45,7 @@ IntPolyh_Intersection::IntPolyh_Intersection(const Handle(Adaptor3d_Surface)& th myNbSU2 = 10; myNbSV2 = 10; myIsDone = Standard_False; + myIsParallel = Standard_False; mySectionLines.Init(1000); myTangentZones.Init(10000); Perform(); @@ -72,6 +69,7 @@ IntPolyh_Intersection::IntPolyh_Intersection(const Handle(Adaptor3d_Surface)& th myNbSU2 = theNbSU2; myNbSV2 = theNbSV2; myIsDone = Standard_False; + myIsParallel = Standard_False; mySectionLines.Init(1000); myTangentZones.Init(10000); Perform(); @@ -95,6 +93,7 @@ IntPolyh_Intersection::IntPolyh_Intersection(const Handle(Adaptor3d_Surface)& th myNbSU2 = theUPars2.Length(); myNbSV2 = theVPars2.Length(); myIsDone = Standard_False; + myIsParallel = Standard_False; mySectionLines.Init(1000); myTangentZones.Init(10000); Perform(theUPars1, theVPars1, theUPars2, theVPars2); @@ -442,7 +441,7 @@ void IntPolyh_Intersection::MergeCouples(IntPolyh_ListOfCouples &anArrayFF, // too small (less than 5 deg), the advanced intersection is required. // Otherwise, the standard intersection is considered satisfactory. //======================================================================= -Standard_Boolean IsAdvRequired(IntPolyh_PMaillageAffinage& theMaillage) +Standard_Boolean IntPolyh_Intersection::IsAdvRequired(IntPolyh_PMaillageAffinage& theMaillage) { if (!theMaillage) return Standard_True; @@ -452,7 +451,7 @@ Standard_Boolean IsAdvRequired(IntPolyh_PMaillageAffinage& theMaillage) // Number of interfering pairs Standard_Integer aNbCouples = Couples.Extent(); // Flag to define whether advanced intersection is required or not - Standard_Boolean isAdvReq = (aNbCouples == 0); + Standard_Boolean isAdvReq = (aNbCouples == 0) && !IsParallel(); if (isAdvReq) // No interfering triangles are found -> perform advanced intersection return isAdvReq; @@ -507,7 +506,7 @@ Standard_Integer ComputeIntersection(IntPolyh_PMaillageAffinage& theMaillage) //function : AnalyzeIntersection //purpose : Analyzes the intersection on the number of interfering triangles //======================================================================= -Standard_Boolean AnalyzeIntersection(IntPolyh_PMaillageAffinage& theMaillage) +Standard_Boolean IntPolyh_Intersection::AnalyzeIntersection(IntPolyh_PMaillageAffinage& theMaillage) { if (!theMaillage) return Standard_False; @@ -528,7 +527,9 @@ Standard_Boolean AnalyzeIntersection(IntPolyh_PMaillageAffinage& theMaillage) if (npara >= theMaillage->GetArrayOfTriangles(1).NbItems() || npara >= theMaillage->GetArrayOfTriangles(2).NbItems()) { - return Standard_False; + Couples.Clear(); + myIsParallel = Standard_True; + return Standard_True; } } return Standard_True; diff --git a/src/IntPolyh/IntPolyh_Intersection.hxx b/src/IntPolyh/IntPolyh_Intersection.hxx index 776f39e1cb..ab37543f24 100644 --- a/src/IntPolyh/IntPolyh_Intersection.hxx +++ b/src/IntPolyh/IntPolyh_Intersection.hxx @@ -83,6 +83,12 @@ public: //! @name Getting the results return myIsDone; } + //! Returns state of the operation + Standard_Boolean IsParallel() const + { + return myIsParallel; + } + //! Returns the number of section lines Standard_Integer NbSectionLines() const { @@ -186,6 +192,9 @@ private: //! @name Performing the intersection IntPolyh_ListOfCouples& theArrayRF, IntPolyh_ListOfCouples& theArrayRR) const; + Standard_Boolean AnalyzeIntersection(IntPolyh_PMaillageAffinage& theMaillage); + Standard_Boolean IsAdvRequired(IntPolyh_PMaillageAffinage& theMaillage); + private: //! @name Fields @@ -200,6 +209,7 @@ private: //! @name Fields Standard_Boolean myIsDone; //!< State of the operation IntPolyh_ArrayOfSectionLines mySectionLines; //!< Section lines IntPolyh_ArrayOfTangentZones myTangentZones; //!< Tangent zones + Standard_Boolean myIsParallel; }; #endif // _IntPolyh_Intersection_HeaderFile diff --git a/src/IntTools/IntTools_FaceFace.cxx b/src/IntTools/IntTools_FaceFace.cxx index 181d9d47a5..443783c26e 100644 --- a/src/IntTools/IntTools_FaceFace.cxx +++ b/src/IntTools/IntTools_FaceFace.cxx @@ -504,7 +504,11 @@ void IntTools_FaceFace::Perform (const TopoDS_Face& aF1, { const Standard_Real UVMaxStep = IntPatch_Intersection::DefineUVMaxStep(myHS1, dom1, myHS2, dom2); - const Standard_Real Deflection = 0.1; + Standard_Real Deflection = 0.1; + if (aType1 == GeomAbs_BSplineSurface && aType2 == GeomAbs_BSplineSurface) + { + Deflection /= 10.; + } myIntersector.SetTolerances(TolArc, TolTang, UVMaxStep, Deflection); } diff --git a/src/IntTools/IntTools_TopolTool.cxx b/src/IntTools/IntTools_TopolTool.cxx index ca5c30a0a3..7bbe6b734a 100644 --- a/src/IntTools/IntTools_TopolTool.cxx +++ b/src/IntTools/IntTools_TopolTool.cxx @@ -448,5 +448,5 @@ void IntTools_TopolTool::SamplePnts(const Standard_Real theDefl, myV0 = myVPars->Value(1); myDU = (myUPars->Value(myNbSmplU) - myU0)/(myNbSmplU-1); - myDV = (myVPars->Value(myNbSmplV) - myU0)/(myNbSmplV-1); + myDV = (myVPars->Value(myNbSmplV) - myV0)/(myNbSmplV-1); } diff --git a/src/QABugs/QABugs_20.cxx b/src/QABugs/QABugs_20.cxx index 4248cd2b2e..d31af7ef8b 100644 --- a/src/QABugs/QABugs_20.cxx +++ b/src/QABugs/QABugs_20.cxx @@ -4183,6 +4183,82 @@ static Standard_Integer OCC32744(Draw_Interpretor& theDi, Standard_Integer theNb return 0; } +//======================================================================= +//function : QACheckBends +//purpose : +//Checks whether the Curve has a loop/bend +//Use: QACheckBends curve [CosMaxAngle [NbPoints]] +//NbPoints sets the interval of discretization; +//CosMaxAngle sets the maximal rotation angle between two adjacent segments. +//This value must be equal to the cosine of this angle. +//======================================================================= +static Standard_Integer QACheckBends(Draw_Interpretor& theDI, + Standard_Integer theNArg, + const char ** theArgVal) +{ + // Checks whether theCurve has a loop / bend + + if (theNArg < 2) + { + theDI << "Use: " << theArgVal[0] << " QACheckBends curve [CosMaxAngle [theNbPoints]]" << "\n"; + return 1; + } + + + Handle(Geom_Curve) aCurve = DrawTrSurf::GetCurve(theArgVal[1]); + + if(aCurve.IsNull()) + { + theDI << " " << theArgVal[1] << " : NULL curve" << "\n"; + return 0; + } + + Standard_Real aCosMaxAngle = .8; + Standard_Integer aNbPoints = 1000; + + if (theNArg > 2) + { + aCosMaxAngle = Draw::Atof(theArgVal[2]); + } + + if (theNArg > 3) + { + aNbPoints = Draw::Atoi(theArgVal[3]); + } + + + Standard_Real U1 = aCurve->FirstParameter(), U2 = aCurve->LastParameter(); + if (Precision::IsInfinite(U1) || Precision::IsInfinite(U2)) + { + theDI << "Infinite interval : " << U1 << " " << U2 << "\n"; + return 0; + } + + + Standard_Real delta = (U2 - U1) / aNbPoints; + gp_Pnt aP; + gp_Vec aDC1, aDC2; + aCurve->D1(U1, aP, aDC1); + gp_Dir aD1(aDC1); + Standard_Real p; + for (p = U1; p <= U2; p += delta) + { + aCurve->D1(p, aP, aDC2); + gp_Dir aD2(aDC2); + Standard_Real aCos = aD1*aD2; + + if (aCos < aCosMaxAngle) + { + theDI << "Error: The curve " << theArgVal[1] << " is possible to have a bend at parameter " << p << ". Please check carefully \n"; + } + + aD1 = aD2; + } + + return 0; +} + + void QABugs::Commands_20(Draw_Interpretor& theCommands) { const char *group = "QABugs"; @@ -4275,5 +4351,10 @@ void QABugs::Commands_20(Draw_Interpretor& theCommands) { __FILE__, OCC32744, group); + theCommands.Add("QACheckBends", + "QACheckBends curve [CosMaxAngle [theNbPoints]]", + __FILE__, + QACheckBends, group); + return; } diff --git a/tests/boolean/bfuse_complex/R9 b/tests/boolean/bfuse_complex/R9 index 930619b38b..afa58fec04 100644 --- a/tests/boolean/bfuse_complex/R9 +++ b/tests/boolean/bfuse_complex/R9 @@ -1,5 +1,3 @@ -puts "TODO CR29596 ALL: Warning: Intersection of pair of shapes has failed" - #jmu #pro18457 #cascade 2.1 diff --git a/tests/boolean/bfuse_complex/S1 b/tests/boolean/bfuse_complex/S1 index ea5f89f8b3..f9e33f53a1 100644 --- a/tests/boolean/bfuse_complex/S1 +++ b/tests/boolean/bfuse_complex/S1 @@ -1,5 +1,3 @@ -puts "TODO CR29596 ALL: Warning: Intersection of pair of shapes has failed" - puts "PRO15946" puts "Fuse" puts "" diff --git a/tests/bugs/modalg_1/bug12918 b/tests/bugs/modalg_1/bug12918 index 79cd27df43..89036d6ee5 100755 --- a/tests/bugs/modalg_1/bug12918 +++ b/tests/bugs/modalg_1/bug12918 @@ -1,5 +1,3 @@ -puts "TODO CR29596 ALL: Warning: Intersection of pair of shapes has failed" - puts "============" puts "OCC12918" puts "============" diff --git a/tests/bugs/modalg_4/bug697_2 b/tests/bugs/modalg_4/bug697_2 index cbe47324fb..f3fbf27ced 100755 --- a/tests/bugs/modalg_4/bug697_2 +++ b/tests/bugs/modalg_4/bug697_2 @@ -1,5 +1,3 @@ -puts "TODO CR29596 ALL: Warning: Intersection of pair of shapes has failed" - puts "============" puts "OCC697" puts "============" diff --git a/tests/bugs/modalg_4/bug697_4 b/tests/bugs/modalg_4/bug697_4 index b1fa3326aa..ee86ee2fb4 100755 --- a/tests/bugs/modalg_4/bug697_4 +++ b/tests/bugs/modalg_4/bug697_4 @@ -1,5 +1,3 @@ -puts "TODO CR29596 ALL: Warning: Intersection of pair of shapes has failed" - puts "============" puts "OCC697" puts "============" diff --git a/tests/bugs/modalg_4/bug697_7 b/tests/bugs/modalg_4/bug697_7 index 5d696c848e..4462acb572 100755 --- a/tests/bugs/modalg_4/bug697_7 +++ b/tests/bugs/modalg_4/bug697_7 @@ -1,5 +1,3 @@ -puts "TODO CR29596 ALL: Warning: Intersection of pair of shapes has failed" - puts "============" puts "OCC697" puts "============" diff --git a/tests/bugs/modalg_4/bug697_8 b/tests/bugs/modalg_4/bug697_8 index d8e513d0b9..fc23c71d0a 100755 --- a/tests/bugs/modalg_4/bug697_8 +++ b/tests/bugs/modalg_4/bug697_8 @@ -1,5 +1,3 @@ -puts "TODO CR29596 ALL: Warning: Intersection of pair of shapes has failed" - puts "============" puts "OCC697" puts "============" diff --git a/tests/bugs/modalg_5/bug22829 b/tests/bugs/modalg_5/bug22829 index 53082db257..ff6e94fcf3 100644 --- a/tests/bugs/modalg_5/bug22829 +++ b/tests/bugs/modalg_5/bug22829 @@ -1,5 +1,3 @@ -puts "TODO CR29596 ALL: Warning: Intersection of pair of shapes has failed" - puts "==========" puts "OCC22829" puts "==========" diff --git a/tests/bugs/modalg_5/bug24003 b/tests/bugs/modalg_5/bug24003 index 56a68b2f3c..824ee6eeff 100644 --- a/tests/bugs/modalg_5/bug24003 +++ b/tests/bugs/modalg_5/bug24003 @@ -1,5 +1,3 @@ -puts "TODO CR29596 ALL: Warning: Intersection of pair of shapes has failed" - puts "================" puts "OCC24003" puts "================" diff --git a/tests/bugs/modalg_5/bug25625 b/tests/bugs/modalg_5/bug25625 index 423856aa6a..5f57714343 100644 --- a/tests/bugs/modalg_5/bug25625 +++ b/tests/bugs/modalg_5/bug25625 @@ -1,5 +1,3 @@ -puts "TODO CR29596 ALL: Warning: Intersection of pair of shapes has failed" - puts "================" puts "OCC25625" puts "================" diff --git a/tests/bugs/modalg_6/bug24161 b/tests/bugs/modalg_6/bug24161 index d815d352c8..2fb91b73c6 100644 --- a/tests/bugs/modalg_6/bug24161 +++ b/tests/bugs/modalg_6/bug24161 @@ -1,5 +1,3 @@ -puts "TODO CR29596 ALL: Warning: Intersection of pair of shapes has failed" - puts "==========" puts "OCC24161" puts "==========" diff --git a/tests/bugs/modalg_6/bug28283 b/tests/bugs/modalg_6/bug28283 index 7acd975afc..f800db33e6 100644 --- a/tests/bugs/modalg_6/bug28283 +++ b/tests/bugs/modalg_6/bug28283 @@ -1,5 +1,3 @@ -puts "TODO CR29596 ALL: Warning: Intersection of pair of shapes has failed" - puts "========" puts "OCC28283" puts "========" diff --git a/tests/bugs/modalg_7/bug21134 b/tests/bugs/modalg_7/bug21134 index 11c20d5c09..0bd45a2e87 100755 --- a/tests/bugs/modalg_7/bug21134 +++ b/tests/bugs/modalg_7/bug21134 @@ -1,4 +1,3 @@ -puts "TODO CR29596 ALL: Warning: Intersection of pair of shapes has failed" puts "TODO OCC21134 ALL: Error: checkshape command does not return faulty shapes" puts "============" diff --git a/tests/bugs/modalg_7/bug25082_1 b/tests/bugs/modalg_7/bug25082_1 index b668247366..fc97644ddf 100644 --- a/tests/bugs/modalg_7/bug25082_1 +++ b/tests/bugs/modalg_7/bug25082_1 @@ -3,7 +3,6 @@ puts "0025082: bopcommon returns different result on Windows and Linux system" puts "========" puts "" -puts "TODO CR29596 ALL: Warning: Intersection of pair of shapes has failed" restore [locate_data_file bug25054_shape1.brep] b1 restore [locate_data_file bug25054_shape2.brep] b2 diff --git a/tests/bugs/modalg_7/bug25082_2 b/tests/bugs/modalg_7/bug25082_2 index bd42246f82..03b35ef05a 100644 --- a/tests/bugs/modalg_7/bug25082_2 +++ b/tests/bugs/modalg_7/bug25082_2 @@ -3,7 +3,6 @@ puts "0025082: bopcommon returns different result on Windows and Linux system" puts "========" puts "" -puts "TODO CR29596 ALL: Warning: Intersection of pair of shapes has failed" restore [locate_data_file bug25054_shape1.brep] b1 restore [locate_data_file bug25054_shape2.brep] b2 diff --git a/tests/bugs/modalg_7/bug28150_1 b/tests/bugs/modalg_7/bug28150_1 index 56b22c2e74..bee594973e 100644 --- a/tests/bugs/modalg_7/bug28150_1 +++ b/tests/bugs/modalg_7/bug28150_1 @@ -1,5 +1,3 @@ -puts "TODO CR29596 ALL: Warning: Intersection of pair of shapes has failed" - puts "========" puts "OCC28150" puts "========" diff --git a/tests/bugs/modalg_7/bug29900 b/tests/bugs/modalg_7/bug29900 index 6afc847d18..5a4f51c08a 100644 --- a/tests/bugs/modalg_7/bug29900 +++ b/tests/bugs/modalg_7/bug29900 @@ -1,5 +1,3 @@ -puts "TODO CR29596 All: Intersection of pair of shapes has failed" - puts "========" puts "OCC29900: Invalid result of FUSE operation" puts "========" diff --git a/tests/bugs/modalg_7/bug30559 b/tests/bugs/modalg_7/bug30559 index b09929176a..e6c5960014 100644 --- a/tests/bugs/modalg_7/bug30559 +++ b/tests/bugs/modalg_7/bug30559 @@ -1,5 +1,3 @@ -puts "TODO CR29596 ALL: Warning: Intersection of pair of shapes has failed" - puts "=============================================================================================" puts "0030559: BOP Fuse: result is inconsistent" puts "=============================================================================================" diff --git a/tests/bugs/modalg_7/bug30760 b/tests/bugs/modalg_7/bug30760 index 71f5a27170..647670cc7b 100644 --- a/tests/bugs/modalg_7/bug30760 +++ b/tests/bugs/modalg_7/bug30760 @@ -1,5 +1,3 @@ -puts "TODO CR29596 ALL: Warning: Intersection of pair of shapes has failed" - puts "========" puts "30760: Modeling Algorithms - Intersection fails in Occt 7.3.0" puts "========" diff --git a/tests/bugs/modalg_7/bug31890 b/tests/bugs/modalg_7/bug31890 index f6d37c0c6e..02516c912c 100644 --- a/tests/bugs/modalg_7/bug31890 +++ b/tests/bugs/modalg_7/bug31890 @@ -1,5 +1,3 @@ -puts "TODO CR29596 ALL: Warning: Intersection of pair of shapes has failed" - puts "==========================================" puts "0031890: Invalid result of common fuse BOP" puts "==========================================" diff --git a/tests/bugs/moddata_1/bug150_1 b/tests/bugs/moddata_1/bug150_1 index 8274144020..e36e12482b 100755 --- a/tests/bugs/moddata_1/bug150_1 +++ b/tests/bugs/moddata_1/bug150_1 @@ -1,4 +1,3 @@ -puts "TODO CR29596 ALL: Warning: Intersection of pair of shapes has failed" puts "TODO OCC12345 ALL: Faulty shapes in variables faulty_1 to faulty_" puts "================" diff --git a/tests/bugs/moddata_1/bug150_2 b/tests/bugs/moddata_1/bug150_2 index 42588b65f7..9bc333192b 100755 --- a/tests/bugs/moddata_1/bug150_2 +++ b/tests/bugs/moddata_1/bug150_2 @@ -1,4 +1,3 @@ -puts "TODO CR29596 ALL: Warning: Intersection of pair of shapes has failed" puts "TODO OCC12345 ALL: Faulty shapes in variables faulty_1 to faulty_" puts "================" diff --git a/tests/lowalgos/intss/begin b/tests/lowalgos/intss/begin index a73c682a6e..8b4c1d235a 100644 --- a/tests/lowalgos/intss/begin +++ b/tests/lowalgos/intss/begin @@ -1,33 +1,3 @@ -# Checks whether theCurve has a loop/bend -# Use: CheckLoops curve CosMaxAngle [theNbPoints]} -# theNbPoints sets the interval of discretization; -# theCosMaxAngle sets the maximal rotation angle between two adjacent segments. This value must be equal to the cosine of this angle. - -help CheckLoops {curve CosMaxAngle theNbPoints } -proc CheckLoops {theCurve {theCosMaxAngle 0.8} {theNbPoints 1000.0}} { - upvar #0 $theCurve aCurve - bounds aCurve U1 U2 - - set delta [dval (U2-U1)/$theNbPoints] - cvalue aCurve [dval U1] xp yp zp dx1 dy1 dz1 - - for {set p [dval U1]} {$p <= [dval U2]} {set p [expr $p + $delta]} { - cvalue aCurve $p xp yp zp dx2 dy2 dz2 - - #Check if the angle between the vectors {dx1 dy1 dz1} and {dx2 dy2 dz2} is less than 30deg. - set nv1 [ dval dx1*dx1+dy1*dy1+dz1*dz1 ] - set nv2 [ dval dx2*dx2+dy2*dy2+dz2*dz2 ] - set dp [ dval dx1*dx2+dy2*dy2+dz1*dz2 ] - - if {$dp < [ expr $theCosMaxAngle * sqrt($nv1 * $nv2) ] } { - puts "Error: The curve $theCurve is possible to have a bend at parameter $p. Please check carefully" - } - - dset dx1 dx2 - dset dy1 dy2 - dset dz1 dz2 - } -} # General check of the result of geometrical intersection help CheckIntersectionResult { surf1 surf2 ListOfCurves NbPoints TolerS1 TolerS2 } diff --git a/tests/lowalgos/intss/bug24472 b/tests/lowalgos/intss/bug24472 index 8f0f2393b0..57f0002ba1 100644 --- a/tests/lowalgos/intss/bug24472 +++ b/tests/lowalgos/intss/bug24472 @@ -6,8 +6,11 @@ puts "" ## Wrong section curves ############################### -puts "TODO OCC29501 ALL: Error in ii12_22" -puts "TODO OCC29501 All: Error: The curve ii12_22 is possible" +puts "TODO OCC29501 All: Error: The curve ii13_20 is possible" +puts "TODO OCC29501 All: Error: The curve ii13_48 is possible" + +pload QAcommands + set MaxToler 1.5e-4 restore [locate_data_file bug24472_Pipe_1.brep] b1 @@ -26,6 +29,9 @@ puts "First test" intersect ii12 s1 s2 foreach c [directory ii12*] { + + puts "Curve $c" + bounds $c U1 U2 if {[dval U2-U1] < 1.0e-9} { @@ -33,7 +39,7 @@ foreach c [directory ii12*] { } # cos(~75.5deg) - CheckLoops $c 0.25 + QACheckBends $c 0.25 xdistcs $c s1 U1 U2 10 $MaxToler xdistcs $c s2 U1 U2 10 $MaxToler @@ -55,6 +61,9 @@ puts "Third test" intersect ii13 s1 s3 foreach c [directory ii13*] { + + puts "Curve $c" + bounds $c U1 U2 if {[dval U2-U1] < 1.0e-9} { @@ -62,7 +71,7 @@ foreach c [directory ii13*] { } # cos(~75.5deg) - CheckLoops $c 0.25 + QACheckBends $c 0.25 xdistcs $c s1 U1 U2 10 $MaxToler xdistcs $c s2 U1 U2 10 $MaxToler diff --git a/tests/lowalgos/intss/bug25952_1 b/tests/lowalgos/intss/bug25952_1 index 41c36f6beb..f9da92fbb8 100644 --- a/tests/lowalgos/intss/bug25952_1 +++ b/tests/lowalgos/intss/bug25952_1 @@ -3,6 +3,7 @@ puts "0025952: Wrong intersection curve" puts "========" puts "" +pload QAcommands puts "TODO OCC25952 ALL: Error: The curve c_1 is possible to have a bend at" restore [locate_data_file bug25952_shape.brep] q @@ -17,7 +18,7 @@ if {$NbCurv != 1} { puts "Error: Please check NbCurves for intersector" } else { checklength c_1 -l 0.00068663591416249451 - CheckLoops c_1 + QACheckBends c_1 } smallview diff --git a/tests/lowalgos/intss/bug25952_2 b/tests/lowalgos/intss/bug25952_2 index 307a89f1d4..7e28e594e8 100644 --- a/tests/lowalgos/intss/bug25952_2 +++ b/tests/lowalgos/intss/bug25952_2 @@ -2,7 +2,7 @@ puts "========" puts "0025952: Wrong intersection curve" puts "========" puts "" - +pload QAcommands puts "TODO OCC25952 ALL: Error: The curve res_1 is possible to have a bend at parameter" set aGoodNbCurves 1 @@ -35,7 +35,7 @@ while { $AllowRepeat != 0 } { set AllowRepeat 0 } else { lappend CurvesList res_$ic - CheckLoops res_$ic + QACheckBends res_$ic incr ic } } diff --git a/tests/lowalgos/intss/bug25952_3 b/tests/lowalgos/intss/bug25952_3 index 411cf51c9d..7b441adf04 100644 --- a/tests/lowalgos/intss/bug25952_3 +++ b/tests/lowalgos/intss/bug25952_3 @@ -3,6 +3,7 @@ puts "0025952: Wrong intersection curve" puts "========" puts "" +pload QAcommands puts "TODO OCC26510 ALL: Error: 1 curve is expected but 0 ones are found" set aGoodNbCurves 1 @@ -33,7 +34,7 @@ while { $AllowRepeat != 0 } { set AllowRepeat 0 } else { lappend CurvesList res_$ic - CheckLoops res_$ic + QACheckBends res_$ic incr ic } } diff --git a/tests/lowalgos/intss/bug28493 b/tests/lowalgos/intss/bug28493 index f05c911fdb..ce87d71f7e 100644 --- a/tests/lowalgos/intss/bug28493 +++ b/tests/lowalgos/intss/bug28493 @@ -3,6 +3,8 @@ puts "0028493: Intersection algorithm produces curve with loop" puts "========" puts "" +pload QAcommands + foreach a [directory c*] {unset $a} restore [locate_data_file bug28491_H0.brep] h0 @@ -25,7 +27,7 @@ for { set ic 1 } { $ic <= $NbCurv } {incr ic} { continue } - CheckLoops c_$ic 0.86602540378443864676372317075294 + QACheckBends c_$ic 0.86602540378443864676372317075294 } smallview diff --git a/tests/lowalgos/intss/bug32607 b/tests/lowalgos/intss/bug32607 index 746f547d71..d75e78c1c4 100644 --- a/tests/lowalgos/intss/bug32607 +++ b/tests/lowalgos/intss/bug32607 @@ -3,6 +3,8 @@ puts "0032607: Modeling Algorithms - BOPAlgo_BOP returns incomplete result" puts "========" puts "" +pload QAcommands + restore [locate_data_file bug32607.brep] s explode s @@ -13,7 +15,7 @@ if {$NbCurv != 1} { puts "Error: Please check NbCurves for intersector" } else { checklength c_1 -l 14.469397997508448 - CheckLoops c_1 + QACheckBends c_1 } smallview diff --git a/tests/lowalgos/intss/bug32849 b/tests/lowalgos/intss/bug32849 new file mode 100644 index 0000000000..6b2c0f09ef --- /dev/null +++ b/tests/lowalgos/intss/bug32849 @@ -0,0 +1,30 @@ +puts "========" +puts "0032849: Modeling Algorithms - Intersection algorithm returns incomplete result" +puts "========" +puts "" + +restore [locate_data_file bug32849_s1] s1 +restore [locate_data_file bug32849_s2] s2 + +mkface f1 s1; +mkface f2 s2; + +set log [bopcurves f1 f2 -2d] + +regexp {Tolerance Reached=+([-0-9.+eE]+)\n+([-0-9.+eE]+)} $log full Toler NbCurv + +if {$NbCurv != 2} { + puts "Error: Number of curves is wrong" +} + +if { $Toler > 1.0e-8} { + puts "Error: Big tolerance value" +} + + + + + + + + diff --git a/tests/perf/modalg/bug10160_1 b/tests/perf/modalg/bug10160_1 index 56726c3c3e..58d1cdc0e9 100644 --- a/tests/perf/modalg/bug10160_1 +++ b/tests/perf/modalg/bug10160_1 @@ -1,4 +1,3 @@ -puts "TODO CR29596 ALL: Warning: Intersection of pair of shapes has failed" puts "TODO OCC11111 ALL: Error : is WRONG because number of " puts "============" diff --git a/tests/perf/modalg/bug10160_2 b/tests/perf/modalg/bug10160_2 index 9219b0c69c..d0a8479441 100644 --- a/tests/perf/modalg/bug10160_2 +++ b/tests/perf/modalg/bug10160_2 @@ -1,4 +1,3 @@ -puts "TODO CR29596 ALL: Warning: Intersection of pair of shapes has failed" puts "TODO OCC11111 ALL: Error : is WRONG because number of " puts "============" diff --git a/tests/perf/modalg/bug10160_3 b/tests/perf/modalg/bug10160_3 index 3f9fcba28b..fccaad46e7 100644 --- a/tests/perf/modalg/bug10160_3 +++ b/tests/perf/modalg/bug10160_3 @@ -1,4 +1,3 @@ -puts "TODO CR29596 ALL: Warning: Intersection of pair of shapes has failed" puts "TODO OCC11111 ALL: Error : is WRONG because number of " puts "============" diff --git a/tests/perf/modalg/bug10160_4 b/tests/perf/modalg/bug10160_4 index c22f43bcb1..198e23f601 100644 --- a/tests/perf/modalg/bug10160_4 +++ b/tests/perf/modalg/bug10160_4 @@ -1,4 +1,3 @@ -puts "TODO CR29596 ALL: Warning: Intersection of pair of shapes has failed" puts "TODO OCC11111 ALL: Error : is WRONG because number of " puts "============" diff --git a/tests/perf/modalg/bug29329 b/tests/perf/modalg/bug29329 index 680a82304d..6d862b65b3 100644 --- a/tests/perf/modalg/bug29329 +++ b/tests/perf/modalg/bug29329 @@ -3,7 +3,6 @@ puts "0029329: Modeling Algorithms - Low performance of the General Fuse algorit puts "========" puts "" -puts "TODO CR29596 ALL: Warning: Intersection of pair of shapes has failed" restore [locate_data_file bug29329_objects.brep] a restore [locate_data_file bug29329_tools.brep] b From 75e2ba16951821ab6b435929272445d993845235 Mon Sep 17 00:00:00 2001 From: kgv Date: Sat, 26 Feb 2022 19:29:44 +0300 Subject: [PATCH 225/639] 0032856: Configuration, CMake - SONAME should include minor version in addition to major to reflect ABI compatibility Added option BUILD_SOVERSION_NUMBERS to manage SOVERSION length. Default option value is set to 2 (major.minor) instead of previously used 1 (major), excluding Android/Emscripten/Windows platforms that use 0 by default. --- CMakeLists.txt | 14 ++++++++++++++ adm/cmake/occt_toolkit.cmake | 17 ++++++++++------- adm/cmake/vardescr.cmake | 3 +++ adm/qmake/OccToolkit.pri | 12 +++++++++++- 4 files changed, 38 insertions(+), 8 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index e6ad20280a..23dd2d377b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -56,6 +56,20 @@ set_property (GLOBAL PROPERTY OCC_VERSION_MAJOR ${OCC_VERSION_MAJOR}) set_property (GLOBAL PROPERTY OCC_VERSION_MINOR ${OCC_VERSION_MINOR}) set_property (GLOBAL PROPERTY OCC_VERSION_MAINTENANCE ${OCC_VERSION_MAINTENANCE}) +# set soversion variable determining compatibility version on platforms with symlinks +# 0 - for empty, 1 - for major, 2 - for major.minor, 3 - for major.minor.maintenance +if (NOT BUILD_SOVERSION_NUMBERS) + set (BUILD_SOVERSION_NUMBERS "0" CACHE STRING "${BUILD_SOVERSION_NUMBERS_DESCR}" FORCE) + SET_PROPERTY(CACHE BUILD_SOVERSION_NUMBERS PROPERTY STRINGS 0 1 2 3) + + # update default state of soversion on different platforms + if (WIN32 OR ANDROID OR EMSCRIPTEN) + set (BUILD_SOVERSION_NUMBERS 0) + else() + set (BUILD_SOVERSION_NUMBERS 2) + endif() +endif() + set (INSTALL_TEST_CASES OFF CACHE BOOL "${INSTALL_TEST_CASES_DESCR}") # Regeneration of OCCT resource files diff --git a/adm/cmake/occt_toolkit.cmake b/adm/cmake/occt_toolkit.cmake index 2f96c6f148..b3c83067b8 100644 --- a/adm/cmake/occt_toolkit.cmake +++ b/adm/cmake/occt_toolkit.cmake @@ -280,14 +280,17 @@ get_property (OCC_VERSION_MAJOR GLOBAL PROPERTY OCC_VERSION_MAJOR) get_property (OCC_VERSION_MINOR GLOBAL PROPERTY OCC_VERSION_MINOR) get_property (OCC_VERSION_MAINTENANCE GLOBAL PROPERTY OCC_VERSION_MAINTENANCE) -if (ANDROID) - # do not append version to the filename - set_target_properties (${PROJECT_NAME} PROPERTIES COMPILE_FLAGS "${PRECOMPILED_DEFS}") -else() - set_target_properties (${PROJECT_NAME} PROPERTIES COMPILE_FLAGS "${PRECOMPILED_DEFS}" - SOVERSION "${OCC_VERSION_MAJOR}" - VERSION "${OCC_VERSION_MAJOR}.${OCC_VERSION_MINOR}.${OCC_VERSION_MAINTENANCE}") +set (OCC_SOVERSION "") +if (BUILD_SOVERSION_NUMBERS GREATER 2) + set (OCC_SOVERSION "${OCC_VERSION_MAJOR}.${OCC_VERSION_MINOR}.${OCC_VERSION_MAINTENANCE}") +elseif (BUILD_SOVERSION_NUMBERS GREATER 1) + set (OCC_SOVERSION "${OCC_VERSION_MAJOR}.${OCC_VERSION_MINOR}") +elseif (BUILD_SOVERSION_NUMBERS GREATER 0) + set (OCC_SOVERSION "${OCC_VERSION_MAJOR}") endif() +set_target_properties (${PROJECT_NAME} PROPERTIES COMPILE_FLAGS "${PRECOMPILED_DEFS}" + SOVERSION "${OCC_SOVERSION}" + VERSION "${OCC_VERSION_MAJOR}.${OCC_VERSION_MINOR}.${OCC_VERSION_MAINTENANCE}") set (USED_TOOLKITS_BY_CURRENT_PROJECT) set (USED_EXTERNAL_LIBS_BY_CURRENT_PROJECT) diff --git a/adm/cmake/vardescr.cmake b/adm/cmake/vardescr.cmake index 0733af0ac2..8212a0308b 100644 --- a/adm/cmake/vardescr.cmake +++ b/adm/cmake/vardescr.cmake @@ -28,6 +28,9 @@ Applies only for Debug configuration.") set (BUILD_SHARED_LIBRARY_NAME_POSTFIX_DESCR "Append the postfix to names of output libraries") +set (BUILD_SOVERSION_NUMBERS_DESCR +"Version numbers to put into SONAME: 0 - for empty, 1 - for major, 2 - for major.minor, 3 - for major.minor.maintenance") + set (BUILD_RELEASE_DISABLE_EXCEPTIONS_DESCR "Disables exceptions like Standard_OutOfRange in Release builds. Defines No_Exception macros for Release builds when enabled (default). diff --git a/adm/qmake/OccToolkit.pri b/adm/qmake/OccToolkit.pri index 9bc54d1cdb..3f18edb1cf 100644 --- a/adm/qmake/OccToolkit.pri +++ b/adm/qmake/OccToolkit.pri @@ -132,21 +132,31 @@ for (aPackage, aPackages) { } } -# extend clean with versioned .so files !win32 { aVerList = $$split(VERSION, ".") aVerMaj = $$member(aVerList, 0) aVerMin = $$member(aVerList, 1) aVerMic = $$member(aVerList, 2) + equals(TEMPLATE, app) { QMAKE_CLEAN += $$DESTDIR/$${TARGET} } else { mac { + # override qmake soname versionong logic + QMAKE_LFLAGS_SONAME = + QMAKE_LFLAGS += -Wl,-soname=lib$${TARGET}.dylib.$${aVerMaj}.$${aVerMin} + + # extend clean with versioned .dylib files QMAKE_CLEAN += $$DESTDIR/lib$${TARGET}.dylib QMAKE_CLEAN += $$DESTDIR/lib$${TARGET}.$${aVerMaj}.dylib QMAKE_CLEAN += $$DESTDIR/lib$${TARGET}.$${aVerMaj}.$${aVerMin}.dylib QMAKE_CLEAN += $$DESTDIR/lib$${TARGET}.$${aVerMaj}.$${aVerMin}.$${aVerMic}.dylib } else { + # override qmake soname versionong logic + QMAKE_LFLAGS_SONAME = + QMAKE_LFLAGS += -Wl,-soname=lib$${TARGET}.so.$${aVerMaj}.$${aVerMin} + + # extend clean with versioned .so files QMAKE_CLEAN += $$DESTDIR/lib$${TARGET}.so QMAKE_CLEAN += $$DESTDIR/lib$${TARGET}.so.$${aVerMaj} QMAKE_CLEAN += $$DESTDIR/lib$${TARGET}.so.$${aVerMaj}.$${aVerMin} From b5204c6c377888fb47c37b5c91b784379da5f4d5 Mon Sep 17 00:00:00 2001 From: kgv Date: Wed, 2 Mar 2022 08:18:29 +0300 Subject: [PATCH 226/639] 0032860: Coding Rules, Extrema_GenExtPS - add exported destructor Added eplicit destructors to classes Extrema_GenExtCS, Extrema_GenExtPS and Extrema_GenExtSS. --- src/Extrema/Extrema_GenExtCS.cxx | 9 +++++++++ src/Extrema/Extrema_GenExtCS.hxx | 7 +++++-- src/Extrema/Extrema_GenExtPS.cxx | 12 ++++++++++++ src/Extrema/Extrema_GenExtPS.hxx | 6 +++++- src/Extrema/Extrema_GenExtSS.cxx | 9 +++++++++ src/Extrema/Extrema_GenExtSS.hxx | 7 +++++-- 6 files changed, 45 insertions(+), 5 deletions(-) diff --git a/src/Extrema/Extrema_GenExtCS.cxx b/src/Extrema/Extrema_GenExtCS.cxx index fa17ce9503..c6a8f5089b 100644 --- a/src/Extrema/Extrema_GenExtCS.cxx +++ b/src/Extrema/Extrema_GenExtCS.cxx @@ -120,6 +120,15 @@ Extrema_GenExtCS::Extrema_GenExtCS() { } +// ======================================================================= +// function : ~Extrema_GenExtCS +// purpose : +// ======================================================================= +Extrema_GenExtCS::~Extrema_GenExtCS() +{ + // +} + //======================================================================= //function : Extrema_GenExtCS //purpose : diff --git a/src/Extrema/Extrema_GenExtCS.hxx b/src/Extrema/Extrema_GenExtCS.hxx index 6b141077d2..cd460ba7f2 100644 --- a/src/Extrema/Extrema_GenExtCS.hxx +++ b/src/Extrema/Extrema_GenExtCS.hxx @@ -35,9 +35,12 @@ public: DEFINE_STANDARD_ALLOC - + //! Empty constructor. Standard_EXPORT Extrema_GenExtCS(); - + + //! Destructor. + Standard_EXPORT ~Extrema_GenExtCS(); + //! It calculates all the distances. //! The function F(u,v)=distance(S1(u1,v1),S2(u2,v2)) has an //! extremum when gradient(F)=0. The algorithm searches diff --git a/src/Extrema/Extrema_GenExtPS.cxx b/src/Extrema/Extrema_GenExtPS.cxx index 0f9e57da57..3770bb1b64 100644 --- a/src/Extrema/Extrema_GenExtPS.cxx +++ b/src/Extrema/Extrema_GenExtPS.cxx @@ -224,7 +224,19 @@ Extrema_GenExtPS::Extrema_GenExtPS() myAlgo = Extrema_ExtAlgo_Grad; } +// ======================================================================= +// function : ~Extrema_GenExtPS +// purpose : +// ======================================================================= +Extrema_GenExtPS::~Extrema_GenExtPS() +{ + // +} +// ======================================================================= +// function : Extrema_GenExtPS +// purpose : +// ======================================================================= Extrema_GenExtPS::Extrema_GenExtPS (const gp_Pnt& P, const Adaptor3d_Surface& S, const Standard_Integer NbU, diff --git a/src/Extrema/Extrema_GenExtPS.hxx b/src/Extrema/Extrema_GenExtPS.hxx index fc14c4874d..61d3b8c769 100644 --- a/src/Extrema/Extrema_GenExtPS.hxx +++ b/src/Extrema/Extrema_GenExtPS.hxx @@ -37,8 +37,12 @@ public: DEFINE_STANDARD_ALLOC + //! Empty constructor. Standard_EXPORT Extrema_GenExtPS(); - + + //! Destructor. + Standard_EXPORT ~Extrema_GenExtPS(); + //! It calculates all the distances. //! The function F(u,v)=distance(P,S(u,v)) has an //! extremum when gradient(F)=0. The algorithm searches diff --git a/src/Extrema/Extrema_GenExtSS.cxx b/src/Extrema/Extrema_GenExtSS.cxx index e8ec2a8e04..b56eca7397 100644 --- a/src/Extrema/Extrema_GenExtSS.cxx +++ b/src/Extrema/Extrema_GenExtSS.cxx @@ -118,6 +118,15 @@ Extrema_GenExtSS::Extrema_GenExtSS() myInit = Standard_False; } +// ======================================================================= +// function : ~Extrema_GenExtSS +// purpose : +// ======================================================================= +Extrema_GenExtSS::~Extrema_GenExtSS() +{ + // +} + //======================================================================= //function : Extrema_GenExtSS //purpose : diff --git a/src/Extrema/Extrema_GenExtSS.hxx b/src/Extrema/Extrema_GenExtSS.hxx index c8fb24a06a..d02f5c2575 100644 --- a/src/Extrema/Extrema_GenExtSS.hxx +++ b/src/Extrema/Extrema_GenExtSS.hxx @@ -36,9 +36,12 @@ public: DEFINE_STANDARD_ALLOC - + //! Empty constructor. Standard_EXPORT Extrema_GenExtSS(); - + + //! Destructor. + Standard_EXPORT ~Extrema_GenExtSS(); + //! It calculates all the distances. //! The function F(u,v)=distance(S1(u1,v1),S2(u2,v2)) has an //! extremum when gradient(F)=0. The algorithm searches From b9a372bbcd588538e24282f5a98b4426d209b3c3 Mon Sep 17 00:00:00 2001 From: kgv Date: Tue, 1 Mar 2022 22:34:31 +0300 Subject: [PATCH 227/639] 0032841: Visualization - add 16-bit grayscale pixel format to Image_PixMap Added Image_Format_Gray16 pixel format definition, which could be uploaded into GL_R16 texture. Added Image_Format_GrayF_half mapped to GL_R16F texture. --- src/Image/Image_AlienPixMap.cxx | 12 ++++++++- src/Image/Image_Format.hxx | 6 +++-- src/Image/Image_PixMap.cxx | 42 ++++++++++++++++++++++++++++- src/Image/Image_PixMap.hxx | 40 +++++++++------------------ src/Media/Media_Frame.cxx | 5 ++++ src/OpenGl/OpenGl_Context.cxx | 6 +++++ src/OpenGl/OpenGl_Context.hxx | 1 + src/OpenGl/OpenGl_FrameBuffer.cxx | 12 +++++++++ src/OpenGl/OpenGl_GlFunctions.cxx | 2 ++ src/OpenGl/OpenGl_GlTypes.hxx | 3 +++ src/OpenGl/OpenGl_TextureFormat.cxx | 38 +++++++++++++++++++++++++- 11 files changed, 135 insertions(+), 32 deletions(-) diff --git a/src/Image/Image_AlienPixMap.cxx b/src/Image/Image_AlienPixMap.cxx index fafaf56d6c..99b84acebd 100644 --- a/src/Image/Image_AlienPixMap.cxx +++ b/src/Image/Image_AlienPixMap.cxx @@ -66,6 +66,8 @@ namespace case FIT_RGBF: return Image_Format_RGBF; case FIT_RGBAF: return Image_Format_RGBAF; case FIT_FLOAT: return Image_Format_GrayF; + case FIT_INT16: + case FIT_UINT16: return Image_Format_Gray16; case FIT_BITMAP: { switch (theColorTypeFI) @@ -118,6 +120,8 @@ namespace case Image_Format_Gray: case Image_Format_Alpha: return FIT_BITMAP; + case Image_Format_Gray16: + return FIT_UINT16; default: return FIT_UNKNOWN; } @@ -304,6 +308,10 @@ namespace { return Image_Format_Gray; } + else if (theFormat == GUID_WICPixelFormat16bppGray) + { + return Image_Format_Gray16; + } return Image_Format_UNKNOWN; } @@ -318,6 +326,7 @@ namespace case Image_Format_BGR: return GUID_WICPixelFormat24bppBGR; case Image_Format_Gray: return GUID_WICPixelFormat8bppGray; case Image_Format_Alpha: return GUID_WICPixelFormat8bppGray; // GUID_WICPixelFormat8bppAlpha + case Image_Format_Gray16: return GUID_WICPixelFormat16bppGray; case Image_Format_GrayF: // GUID_WICPixelFormat32bppGrayFloat case Image_Format_AlphaF: case Image_Format_RGBAF: // GUID_WICPixelFormat128bppRGBAFloat @@ -1081,7 +1090,8 @@ bool Image_AlienPixMap::Save (const TCollection_AsciiString& theFileName) { aFileFormat = GUID_ContainerFormatJpeg; } - else if (aFileNameLower.EndsWith (".tiff")) + else if (aFileNameLower.EndsWith (".tiff") + || aFileNameLower.EndsWith (".tif")) { aFileFormat = GUID_ContainerFormatTiff; } diff --git a/src/Image/Image_Format.hxx b/src/Image/Image_Format.hxx index 6c94daa3da..c087093cf4 100644 --- a/src/Image/Image_Format.hxx +++ b/src/Image/Image_Format.hxx @@ -33,9 +33,11 @@ enum Image_Format Image_Format_BGRF, //!< same as RGBF but with different components order Image_Format_RGBAF, //!< 4 floats (16-bytes) RGBA image plane Image_Format_BGRAF, //!< same as RGBAF but with different components order - Image_Format_RGF_half, //!< 2 half-floats (4-bytes) RG image plane + Image_Format_GrayF_half, //!< 1 half-float (2-bytes) intensity of color + Image_Format_RGF_half, //!< 2 half-floats (4-bytes) RG image plane Image_Format_RGBAF_half, //!< 4 half-floats (8-bytes) RGBA image plane + Image_Format_Gray16, //!< 2 bytes per pixel (unsigned short integer), intensity of the color }; -enum { Image_Format_NB = Image_Format_RGBAF_half + 1 }; +enum { Image_Format_NB = Image_Format_Gray16 + 1 }; #endif // _Image_Format_HeaderFile diff --git a/src/Image/Image_PixMap.cxx b/src/Image/Image_PixMap.cxx index 02d7bdad7d..d1ddea2237 100644 --- a/src/Image/Image_PixMap.cxx +++ b/src/Image/Image_PixMap.cxx @@ -62,8 +62,10 @@ namespace ImageFormatInfo(BGRF, 3, sizeof(float) * 3), ImageFormatInfo(RGBAF, 4, sizeof(float) * 4), ImageFormatInfo(BGRAF, 4, sizeof(float) * 4), + ImageFormatInfo(GrayF_half, 1, sizeof(uint16_t) * 1), ImageFormatInfo(RGF_half, 2, sizeof(uint16_t) * 2), ImageFormatInfo(RGBAF_half, 4, sizeof(uint16_t) * 4), + ImageFormatInfo(Gray16, 1, 2), CompressedImageFormatInfo(RGB_S3TC_DXT1, 3, 1), // DXT1 uses circa half a byte per pixel (64 bits per 4x4 block) CompressedImageFormatInfo(RGBA_S3TC_DXT1, 4, 1), CompressedImageFormatInfo(RGBA_S3TC_DXT3, 4, 1), // DXT3/5 uses circa 1 byte per pixel (128 bits per 4x4 block) @@ -296,6 +298,11 @@ Quantity_ColorRGBA Image_PixMap::PixelColor (const Standard_Integer theX, const Image_ColorBGRF& aPixel = Value (theY, theX); return Quantity_ColorRGBA (NCollection_Vec4 (aPixel.r(), aPixel.g(), aPixel.b(), 1.0f)); // opaque } + case Image_Format_GrayF_half: + { + const uint16_t& aPixel = Value (theY, theX); + return Quantity_ColorRGBA (NCollection_Vec4 (ConvertFromHalfFloat (aPixel), 0.0f, 0.0f, 1.0f)); + } case Image_Format_RGF_half: { const NCollection_Vec2& aPixel = Value> (theY, theX); @@ -366,13 +373,20 @@ Quantity_ColorRGBA Image_PixMap::PixelColor (const Standard_Integer theX, case Image_Format_Gray: { const Standard_Byte& aPixel = Value (theY, theX); - return Quantity_ColorRGBA (float(aPixel) / 255.0f, float(aPixel) / 255.0f, float(aPixel) / 255.0f, 1.0f); // opaque + const float anIntensity = float(aPixel) / 255.0f; + return Quantity_ColorRGBA (anIntensity, anIntensity, anIntensity, 1.0f); // opaque } case Image_Format_Alpha: { const Standard_Byte& aPixel = Value (theY, theX); return Quantity_ColorRGBA (1.0f, 1.0f, 1.0f, float(aPixel) / 255.0f); } + case Image_Format_Gray16: + { + const uint16_t& aPixel = Value (theY, theX); + const float anIntensity = float(aPixel) / 65535.0f; + return Quantity_ColorRGBA (anIntensity, anIntensity, anIntensity, 1.0f); // opaque + } case Image_Format_UNKNOWN: { break; @@ -453,6 +467,12 @@ void Image_PixMap::SetPixelColor (const Standard_Integer theX, aPixel.b() = aColor.b(); return; } + case Image_Format_GrayF_half: + { + uint16_t& aPixel = ChangeValue (theY, theX); + aPixel = ConvertToHalfFloat (aColor.r()); + return; + } case Image_Format_RGF_half: { NCollection_Vec2& aPixel = ChangeValue> (theY, theX); @@ -585,6 +605,11 @@ void Image_PixMap::SetPixelColor (const Standard_Integer theX, ChangeValue (theY, theX) = Standard_Byte(aColor.a() * 255.0f); return; } + case Image_Format_Gray16: + { + ChangeValue (theY, theX) = uint16_t(aColor.r() * 65535.0f); + return; + } case Image_Format_UNKNOWN: { return; @@ -686,6 +711,21 @@ void Image_PixMap::ToBlackWhite (Image_PixMap& theImage) } break; } + case Image_Format_Gray16: + { + for (Standard_Size aRow = 0; aRow < theImage.SizeY(); ++aRow) + { + for (Standard_Size aCol = 0; aCol < theImage.SizeX(); ++aCol) + { + uint16_t& aPixel = theImage.ChangeValue (aRow, aCol); + if (aPixel != 0) + { + aPixel = 65535; + } + } + } + break; + } case Image_Format_RGB: case Image_Format_BGR: case Image_Format_RGB32: diff --git a/src/Image/Image_PixMap.hxx b/src/Image/Image_PixMap.hxx index f155a660ab..46e0dd2f7b 100644 --- a/src/Image/Image_PixMap.hxx +++ b/src/Image/Image_PixMap.hxx @@ -62,6 +62,7 @@ public: public: // high-level API + //! Return pixel format. Image_Format Format() const { return myImgFormat; } //! Override pixel format specified by InitXXX() methods. @@ -70,41 +71,26 @@ public: // high-level API //! (e.g. ImgGray and ImgAlpha). Standard_EXPORT void SetFormat (const Image_Format thePixelFormat); - //! @return image width in pixels - inline Standard_Size Width() const - { - return myData.SizeX; - } + //! Return image width in pixels + Standard_Size Width() const { return myData.SizeX; } - //! @return image height in pixels - inline Standard_Size Height() const - { - return myData.SizeY; - } + //! Return image height in pixels + Standard_Size Height() const { return myData.SizeY; } - //! @return image width in pixels - inline Standard_Size SizeX() const - { - return myData.SizeX; - } + //! Return image width in pixels + Standard_Size SizeX() const { return myData.SizeX; } - //! @return image height in pixels - inline Standard_Size SizeY() const - { - return myData.SizeY; - } + //! Return image height in pixels + Standard_Size SizeY() const { return myData.SizeY; } - //! @return width / height. - inline Standard_Real Ratio() const + //! Return width / height. + Standard_Real Ratio() const { return (SizeY() > 0) ? (Standard_Real(SizeX()) / Standard_Real(SizeY())) : 1.0; } - //! @return true if data is NULL. - bool IsEmpty() const - { - return myData.IsEmpty(); - } + //! Return true if data is NULL. + bool IsEmpty() const { return myData.IsEmpty(); } //! Empty constructor. Initialize the NULL image plane. Standard_EXPORT Image_PixMap(); diff --git a/src/Media/Media_Frame.cxx b/src/Media/Media_Frame.cxx index 94d8843c52..bcd80e596d 100644 --- a/src/Media/Media_Frame.cxx +++ b/src/Media/Media_Frame.cxx @@ -56,6 +56,8 @@ Image_Format Media_Frame::FormatFFmpeg2Occt (int theFormat) return Image_Format_BGR; case AV_PIX_FMT_GRAY8: return Image_Format_Gray; + case AV_PIX_FMT_GRAY16: + return Image_Format_Gray16; default: return Image_Format_UNKNOWN; } @@ -90,6 +92,8 @@ int Media_Frame::FormatOcct2FFmpeg (Image_Format theFormat) return AV_PIX_FMT_GRAY8; case Image_Format_Alpha: return AV_PIX_FMT_GRAY8; + case Image_Format_Gray16: + return AV_PIX_FMT_GRAY16; case Image_Format_GrayF: case Image_Format_AlphaF: case Image_Format_RGF: @@ -97,6 +101,7 @@ int Media_Frame::FormatOcct2FFmpeg (Image_Format theFormat) case Image_Format_RGBF: case Image_Format_BGRAF: case Image_Format_BGRF: + case Image_Format_GrayF_half: case Image_Format_RGF_half: case Image_Format_RGBAF_half: case Image_Format_UNKNOWN: diff --git a/src/OpenGl/OpenGl_Context.cxx b/src/OpenGl/OpenGl_Context.cxx index 0f269886e9..645f672655 100644 --- a/src/OpenGl/OpenGl_Context.cxx +++ b/src/OpenGl/OpenGl_Context.cxx @@ -176,6 +176,7 @@ OpenGl_Context::OpenGl_Context (const Handle(OpenGl_Caps)& theCaps) extDrawBuffers (Standard_False), extGS (NULL), extBgra(Standard_False), + extTexR16(Standard_False), extAnis(Standard_False), extPDS (Standard_False), atiMem (Standard_False), @@ -1552,6 +1553,10 @@ void OpenGl_Context::init (const Standard_Boolean theIsCoreProfile) mySupportedFormats->Add (Image_Format_BGR32); mySupportedFormats->Add (Image_Format_BGRA); } + if (extTexR16) + { + mySupportedFormats->Add (Image_Format_Gray16); + } if (arbTexFloat) { mySupportedFormats->Add (Image_Format_GrayF); @@ -1567,6 +1572,7 @@ void OpenGl_Context::init (const Standard_Boolean theIsCoreProfile) mySupportedFormats->Add (Image_Format_RGF); if (hasHalfFloatBuffer != OpenGl_FeatureNotAvailable) { + mySupportedFormats->Add (Image_Format_GrayF_half); mySupportedFormats->Add (Image_Format_RGF_half); } } diff --git a/src/OpenGl/OpenGl_Context.hxx b/src/OpenGl/OpenGl_Context.hxx index b49f9cfcba..b7c3972f79 100644 --- a/src/OpenGl/OpenGl_Context.hxx +++ b/src/OpenGl/OpenGl_Context.hxx @@ -1069,6 +1069,7 @@ public: //! @name extensions Standard_Boolean extDrawBuffers; //!< GL_EXT_draw_buffers OpenGl_ExtGS* extGS; //!< GL_EXT_geometry_shader4 Standard_Boolean extBgra; //!< GL_EXT_bgra or GL_EXT_texture_format_BGRA8888 on OpenGL ES + Standard_Boolean extTexR16; //!< GL_EXT_texture_norm16 on OpenGL ES; always available on desktop Standard_Boolean extAnis; //!< GL_EXT_texture_filter_anisotropic Standard_Boolean extPDS; //!< GL_EXT_packed_depth_stencil Standard_Boolean atiMem; //!< GL_ATI_meminfo diff --git a/src/OpenGl/OpenGl_FrameBuffer.cxx b/src/OpenGl/OpenGl_FrameBuffer.cxx index 2d7d0328cb..ca907ab854 100644 --- a/src/OpenGl/OpenGl_FrameBuffer.cxx +++ b/src/OpenGl/OpenGl_FrameBuffer.cxx @@ -983,6 +983,17 @@ Standard_Boolean OpenGl_FrameBuffer::BufferDump (const Handle(OpenGl_Context)& t aType = GL_UNSIGNED_BYTE; break; } + case Image_Format_Gray16: + { + if (theGlCtx->GraphicsLibrary() == Aspect_GraphicsLibrary_OpenGLES) + { + return false; + } + + aFormat = theBufferType == Graphic3d_BT_Depth ? GL_DEPTH_COMPONENT : GL_RED; + aType = GL_UNSIGNED_SHORT; + break; + } case Image_Format_GrayF: { if (theGlCtx->GraphicsLibrary() == Aspect_GraphicsLibrary_OpenGLES) @@ -1090,6 +1101,7 @@ Standard_Boolean OpenGl_FrameBuffer::BufferDump (const Handle(OpenGl_Context)& t case Image_Format_Alpha: case Image_Format_AlphaF: return Standard_False; // GL_ALPHA is no more supported in core context + case Image_Format_GrayF_half: case Image_Format_RGF_half: case Image_Format_UNKNOWN: return Standard_False; diff --git a/src/OpenGl/OpenGl_GlFunctions.cxx b/src/OpenGl/OpenGl_GlFunctions.cxx index 3eda7a2cb4..e3b45a46d0 100644 --- a/src/OpenGl/OpenGl_GlFunctions.cxx +++ b/src/OpenGl/OpenGl_GlFunctions.cxx @@ -1733,6 +1733,7 @@ void OpenGl_GlFunctions::load (OpenGl_Context& theCtx, theCtx.arbTexRG = isGlGreaterEqualShort (3, 0) || checkExtensionShort ("GL_EXT_texture_rg"); theCtx.extBgra = checkExtensionShort ("GL_EXT_texture_format_BGRA8888"); + theCtx.extTexR16 = checkExtensionShort ("GL_EXT_texture_norm16"); theCtx.extAnis = checkExtensionShort ("GL_EXT_texture_filter_anisotropic"); theCtx.extPDS = isGlGreaterEqualShort (3, 0) || checkExtensionShort ("GL_OES_packed_depth_stencil"); @@ -2160,6 +2161,7 @@ void OpenGl_GlFunctions::load (OpenGl_Context& theCtx, || checkExtensionShort ("NV_depth_clamp"); theCtx.extBgra = isGlGreaterEqualShort (1, 2) || checkExtensionShort ("GL_EXT_bgra"); + theCtx.extTexR16 = true; theCtx.extAnis = checkExtensionShort ("GL_EXT_texture_filter_anisotropic"); theCtx.extPDS = checkExtensionShort ("GL_EXT_packed_depth_stencil"); theCtx.atiMem = checkExtensionShort ("GL_ATI_meminfo"); diff --git a/src/OpenGl/OpenGl_GlTypes.hxx b/src/OpenGl/OpenGl_GlTypes.hxx index 165a367848..25138e4fd1 100644 --- a/src/OpenGl/OpenGl_GlTypes.hxx +++ b/src/OpenGl/OpenGl_GlTypes.hxx @@ -333,6 +333,9 @@ typedef double GLclampd; #define GL_RGB8 0x8051 #define GL_RGBA8 0x8058 +// only in desktop OpenGL +#define GL_LUMINANCE16 0x8042 + // in core since OpenGL ES 3.0, extension GL_OES_rgb8_rgba8 #define GL_LUMINANCE8 0x8040 // GL_EXT_texture_format_BGRA8888 diff --git a/src/OpenGl/OpenGl_TextureFormat.cxx b/src/OpenGl/OpenGl_TextureFormat.cxx index 31f62cc39f..bbd24dfc7a 100644 --- a/src/OpenGl/OpenGl_TextureFormat.cxx +++ b/src/OpenGl/OpenGl_TextureFormat.cxx @@ -72,6 +72,7 @@ TCollection_AsciiString OpenGl_TextureFormat::FormatFormat (GLint theInternalFor case 0x803C: return "GL_ALPHA8"; case 0x803E: return "GL_ALPHA16"; case GL_LUMINANCE: return "GL_LUMINANCE"; + case GL_LUMINANCE16: return "GL_LUMINANCE16"; case GL_LUMINANCE_ALPHA: return "GL_LUMINANCE_ALPHA"; // case GL_DEPTH_COMPONENT: return "GL_DEPTH_COMPONENT"; @@ -219,6 +220,19 @@ OpenGl_TextureFormat OpenGl_TextureFormat::FindFormat (const Handle(OpenGl_Conte aFormat.SetDataType (GL_FLOAT); return aFormat; } + case Image_Format_GrayF_half: + { + aFormat.SetNbComponents (1); + aFormat.SetInternalFormat (GL_R16F); + aFormat.SetPixelFormat (GL_RED); + aFormat.SetDataType (GL_HALF_FLOAT); + if (theCtx->hasHalfFloatBuffer == OpenGl_FeatureInExtensions + && theCtx->GraphicsLibrary() == Aspect_GraphicsLibrary_OpenGLES) + { + aFormat.SetDataType (GL_HALF_FLOAT_OES); + } + return aFormat; + } case Image_Format_RGF_half: { aFormat.SetNbComponents (2); @@ -443,6 +457,28 @@ OpenGl_TextureFormat OpenGl_TextureFormat::FindFormat (const Handle(OpenGl_Conte aFormat.SetDataType (GL_UNSIGNED_BYTE); return aFormat; } + case Image_Format_Gray16: + { + if (!theCtx->extTexR16) + { + return OpenGl_TextureFormat(); + } + + aFormat.SetNbComponents (1); + if (useRedRedAlpha + || theCtx->GraphicsLibrary() == Aspect_GraphicsLibrary_OpenGLES) + { + aFormat.SetInternalFormat (GL_R16); + aFormat.SetPixelFormat (GL_RED); + } + else + { + aFormat.SetInternalFormat (GL_LUMINANCE16); + aFormat.SetPixelFormat (GL_LUMINANCE); + } + aFormat.SetDataType (GL_UNSIGNED_SHORT); + return aFormat; + } case Image_Format_UNKNOWN: { return OpenGl_TextureFormat(); @@ -509,7 +545,7 @@ OpenGl_TextureFormat OpenGl_TextureFormat::FindSizedFormat (const Handle(OpenGl_ aFormat.SetInternalFormat (theSizedFormat); aFormat.SetPixelFormat (GL_RED); aFormat.SetDataType (GL_HALF_FLOAT); - aFormat.SetImageFormat (Image_Format_GrayF); + aFormat.SetImageFormat (Image_Format_GrayF_half); if (theCtx->hasHalfFloatBuffer == OpenGl_FeatureInExtensions) { aFormat.SetDataType (theCtx->GraphicsLibrary() == Aspect_GraphicsLibrary_OpenGLES From a9e5f65041b05e43937095c82ab180fccd544579 Mon Sep 17 00:00:00 2001 From: kgv Date: Wed, 2 Mar 2022 08:58:10 +0300 Subject: [PATCH 228/639] 0032837: Documentation, Geom_Surface - add references to GeomLib::NormEstim() for Normal computations References to GeomLib::NormEstim() have been put to Geom_Surface, Adaptor3d_Surface and BRepAdaptor_Surface. Improved documentation of GeomLib::NormEstim(). --- src/Adaptor3d/Adaptor3d_Surface.hxx | 15 +- src/BRepAdaptor/BRepAdaptor_Surface.hxx | 15 +- src/Geom/Geom_Surface.hxx | 131 +++++++------- src/GeomLib/GeomLib.cxx | 218 +++++++++++++----------- src/GeomLib/GeomLib.hxx | 15 +- 5 files changed, 209 insertions(+), 185 deletions(-) diff --git a/src/Adaptor3d/Adaptor3d_Surface.hxx b/src/Adaptor3d/Adaptor3d_Surface.hxx index 5972b5ff76..1c4d1618a5 100644 --- a/src/Adaptor3d/Adaptor3d_Surface.hxx +++ b/src/Adaptor3d/Adaptor3d_Surface.hxx @@ -114,19 +114,20 @@ public: Standard_EXPORT virtual Standard_Boolean IsVPeriodic() const; Standard_EXPORT virtual Standard_Real VPeriod() const; - + //! Computes the point of parameters U,V on the surface. + //! Tip: use GeomLib::NormEstim() to calculate surface normal at specified (U, V) point. Standard_EXPORT virtual gp_Pnt Value (const Standard_Real U, const Standard_Real V) const; - + //! Computes the point of parameters U,V on the surface. Standard_EXPORT virtual void D0 (const Standard_Real U, const Standard_Real V, gp_Pnt& P) const; - //! Computes the point and the first derivatives on - //! the surface. - //! Raised if the continuity of the current - //! intervals is not C1. + //! Computes the point and the first derivatives on the surface. + //! Raised if the continuity of the current intervals is not C1. + //! + //! Tip: use GeomLib::NormEstim() to calculate surface normal at specified (U, V) point. Standard_EXPORT virtual void D1 (const Standard_Real U, const Standard_Real V, gp_Pnt& P, gp_Vec& D1U, gp_Vec& D1V) const; - + //! Computes the point, the first and second //! derivatives on the surface. //! Raised if the continuity of the current diff --git a/src/BRepAdaptor/BRepAdaptor_Surface.hxx b/src/BRepAdaptor/BRepAdaptor_Surface.hxx index ed06ef1b8a..9ac8e979d8 100644 --- a/src/BRepAdaptor/BRepAdaptor_Surface.hxx +++ b/src/BRepAdaptor/BRepAdaptor_Surface.hxx @@ -141,17 +141,18 @@ public: virtual Standard_Real VPeriod() const Standard_OVERRIDE { return mySurf.VPeriod(); } //! Computes the point of parameters U,V on the surface. + //! Tip: use GeomLib::NormEstim() to calculate surface normal at specified (U, V) point. Standard_EXPORT gp_Pnt Value (const Standard_Real U, const Standard_Real V) const Standard_OVERRIDE; - + //! Computes the point of parameters U,V on the surface. Standard_EXPORT void D0 (const Standard_Real U, const Standard_Real V, gp_Pnt& P) const Standard_OVERRIDE; - - //! Computes the point and the first derivatives on - //! the surface. - //! Raised if the continuity of the current - //! intervals is not C1. + + //! Computes the point and the first derivatives on the surface. + //! Raised if the continuity of the current intervals is not C1. + //! + //! Tip: use GeomLib::NormEstim() to calculate surface normal at specified (U, V) point. Standard_EXPORT void D1 (const Standard_Real U, const Standard_Real V, gp_Pnt& P, gp_Vec& D1U, gp_Vec& D1V) const Standard_OVERRIDE; - + //! Computes the point, the first and second //! derivatives on the surface. //! Raised if the continuity of the current diff --git a/src/Geom/Geom_Surface.hxx b/src/Geom/Geom_Surface.hxx index 05432d7e19..f117172642 100644 --- a/src/Geom/Geom_Surface.hxx +++ b/src/Geom/Geom_Surface.hxx @@ -27,29 +27,24 @@ class gp_Vec; class Geom_Surface; DEFINE_STANDARD_HANDLE(Geom_Surface, Geom_Geometry) -//! Describes the common behavior of surfaces in 3D -//! space. The Geom package provides many -//! implementations of concrete derived surfaces, such as -//! planes, cylinders, cones, spheres and tori, surfaces of -//! linear extrusion, surfaces of revolution, Bezier and -//! BSpline surfaces, and so on. -//! The key characteristic of these surfaces is that they -//! are parameterized. Geom_Surface demonstrates: -//! - how to work with the parametric equation of a -//! surface to compute the point of parameters (u, -//! v), and, at this point, the 1st, 2nd ... Nth derivative, +//! Describes the common behavior of surfaces in 3D space. +//! The Geom package provides many implementations of concrete derived surfaces, +//! such as planes, cylinders, cones, spheres and tori, surfaces of linear extrusion, +//! surfaces of revolution, Bezier and BSpline surfaces, and so on. +//! The key characteristic of these surfaces is that they are parameterized. +//! Geom_Surface demonstrates: +//! - how to work with the parametric equation of a surface +//! to compute the point of parameters (u, v), and, at this point, the 1st, 2nd ... Nth derivative; //! - how to find global information about a surface in -//! each parametric direction (for example, level of -//! continuity, whether the surface is closed, its -//! periodicity, the bounds of the parameters and so on), and -//! - how the parameters change when geometric -//! transformations are applied to the surface, or the -//! orientation is modified. -//! Note that all surfaces must have a geometric -//! continuity, and any surface is at least "C0". Generally, -//! continuity is checked at construction time or when the -//! curve is edited. Where this is not the case, the -//! documentation makes this explicit. +//! each parametric direction (for example, level of continuity, whether the surface is closed, +//! its periodicity, the bounds of the parameters and so on); +//! - how the parameters change when geometric transformations are applied to the surface, +//! or the orientation is modified. +//! +//! Note that all surfaces must have a geometric continuity, and any surface is at least "C0". +//! Generally, continuity is checked at construction time or when the curve is edited. +//! Where this is not the case, the documentation makes this explicit. +//! //! Warning //! The Geom package does not prevent the construction of //! surfaces with null areas, or surfaces which self-intersect. @@ -142,47 +137,42 @@ public: //! equal to Precision::Infinite: instead of Standard_Real::LastReal. Standard_EXPORT virtual void Bounds (Standard_Real& U1, Standard_Real& U2, Standard_Real& V1, Standard_Real& V2) const = 0; - //! Checks whether this surface is closed in the u - //! parametric direction. - //! Returns true if, in the u parametric direction: taking - //! uFirst and uLast as the parametric bounds in - //! the u parametric direction, for each parameter v, the - //! distance between the points P(uFirst, v) and + //! Checks whether this surface is closed in the u parametric direction. + //! Returns true if, in the u parametric direction: + //! taking uFirst and uLast as the parametric bounds in + //! the u parametric direction, for each parameter v, + //! the distance between the points P(uFirst, v) and //! P(uLast, v) is less than or equal to gp::Resolution(). Standard_EXPORT virtual Standard_Boolean IsUClosed() const = 0; - //! Checks whether this surface is closed in the u - //! parametric direction. - //! Returns true if, in the v parametric - //! direction: taking vFirst and vLast as the - //! parametric bounds in the v parametric direction, for - //! each parameter u, the distance between the points - //! P(u, vFirst) and P(u, vLast) is less than - //! or equal to gp::Resolution(). + //! Checks whether this surface is closed in the u parametric direction. + //! Returns true if, in the v parametric direction: + //! taking vFirst and vLast as the parametric bounds in the v parametric direction, + //! for each parameter u, the distance between the points + //! P(u, vFirst) and P(u, vLast) is less than or equal to gp::Resolution(). Standard_EXPORT virtual Standard_Boolean IsVClosed() const = 0; - //! Checks if this surface is periodic in the u - //! parametric direction. Returns true if: + //! Checks if this surface is periodic in the u parametric direction. + //! Returns true if: //! - this surface is closed in the u parametric direction, and //! - there is a constant T such that the distance - //! between the points P (u, v) and P (u + T, - //! v) (or the points P (u, v) and P (u, v + - //! T)) is less than or equal to gp::Resolution(). + //! between the points P (u, v) and P (u + T, v) + //! (or the points P (u, v) and P (u, v + T)) is less than or equal to gp::Resolution(). + //! //! Note: T is the parametric period in the u parametric direction. Standard_EXPORT virtual Standard_Boolean IsUPeriodic() const = 0; - //! Returns the period of this surface in the u - //! parametric direction. - //! raises if the surface is not uperiodic. + //! Returns the period of this surface in the u parametric direction. + //! Raises if the surface is not uperiodic. Standard_EXPORT virtual Standard_Real UPeriod() const; - //! Checks if this surface is periodic in the v - //! parametric direction. Returns true if: + //! Checks if this surface is periodic in the v parametric direction. + //! Returns true if: //! - this surface is closed in the v parametric direction, and //! - there is a constant T such that the distance - //! between the points P (u, v) and P (u + T, - //! v) (or the points P (u, v) and P (u, v + - //! T)) is less than or equal to gp::Resolution(). + //! between the points P (u, v) and P (u + T, v) + //! (or the points P (u, v) and P (u, v + T)) is less than or equal to gp::Resolution(). + //! //! Note: T is the parametric period in the v parametric direction. Standard_EXPORT virtual Standard_Boolean IsVPeriodic() const = 0; @@ -197,25 +187,24 @@ public: Standard_EXPORT virtual Handle(Geom_Curve) VIso (const Standard_Real V) const = 0; //! Returns the Global Continuity of the surface in direction U and V : - //! C0 : only geometric continuity, - //! C1 : continuity of the first derivative all along the surface, - //! C2 : continuity of the second derivative all along the surface, - //! C3 : continuity of the third derivative all along the surface, - //! G1 : tangency continuity all along the surface, - //! G2 : curvature continuity all along the surface, - //! CN : the order of continuity is infinite. - //! Example : + //! - C0: only geometric continuity, + //! - C1: continuity of the first derivative all along the surface, + //! - C2: continuity of the second derivative all along the surface, + //! - C3: continuity of the third derivative all along the surface, + //! - G1: tangency continuity all along the surface, + //! - G2: curvature continuity all along the surface, + //! - CN: the order of continuity is infinite. + //! + //! Example: //! If the surface is C1 in the V parametric direction and C2 //! in the U parametric direction Shape = C1. Standard_EXPORT virtual GeomAbs_Shape Continuity() const = 0; - //! Returns the order of continuity of the surface in the - //! U parametric direction. + //! Returns the order of continuity of the surface in the U parametric direction. //! Raised if N < 0. Standard_EXPORT virtual Standard_Boolean IsCNu (const Standard_Integer N) const = 0; - //! Returns the order of continuity of the surface in the - //! V parametric direction. + //! Returns the order of continuity of the surface in the V parametric direction. //! Raised if N < 0. Standard_EXPORT virtual Standard_Boolean IsCNv (const Standard_Integer N) const = 0; @@ -226,9 +215,10 @@ public: Standard_EXPORT virtual void D0 (const Standard_Real U, const Standard_Real V, gp_Pnt& P) const = 0; - //! Computes the point P and the first derivatives in the - //! directions U and V at this point. + //! Computes the point P and the first derivatives in the directions U and V at this point. //! Raised if the continuity of the surface is not C1. + //! + //! Tip: use GeomLib::NormEstim() to calculate surface normal at specified (U, V) point. Standard_EXPORT virtual void D1 (const Standard_Real U, const Standard_Real V, gp_Pnt& P, gp_Vec& D1U, gp_Vec& D1V) const = 0; //! Computes the point P, the first and the second derivatives in @@ -241,21 +231,18 @@ public: //! Raised if the continuity of the surface is not C2. Standard_EXPORT virtual void D3 (const Standard_Real U, const Standard_Real V, gp_Pnt& P, gp_Vec& D1U, gp_Vec& D1V, gp_Vec& D2U, gp_Vec& D2V, gp_Vec& D2UV, gp_Vec& D3U, gp_Vec& D3V, gp_Vec& D3UUV, gp_Vec& D3UVV) const = 0; - //! ---Purpose ; - //! Computes the derivative of order Nu in the direction U and Nv - //! in the direction V at the point P(U, V). + //! Computes the derivative of order Nu in the direction U and Nv in the direction V at the point P(U, V). //! - //! Raised if the continuity of the surface is not CNu in the U - //! direction or not CNv in the V direction. + //! Raised if the continuity of the surface is not CNu in the U direction or not CNv in the V direction. //! Raised if Nu + Nv < 1 or Nu < 0 or Nv < 0. Standard_EXPORT virtual gp_Vec DN (const Standard_Real U, const Standard_Real V, const Standard_Integer Nu, const Standard_Integer Nv) const = 0; - //! Computes the point of parameter U on the surface. + //! Computes the point of parameter (U, V) on the surface. //! - //! It is implemented with D0 + //! It is implemented with D0. + //! Tip: use GeomLib::NormEstim() to calculate surface normal at specified (U, V) point. //! - //! Raised only for an "OffsetSurface" if it is not possible to - //! compute the current point. + //! Raised only for an "OffsetSurface" if it is not possible to compute the current point. Standard_EXPORT gp_Pnt Value (const Standard_Real U, const Standard_Real V) const; //! Dumps the content of me into the stream diff --git a/src/GeomLib/GeomLib.cxx b/src/GeomLib/GeomLib.cxx index e1646bc098..e9dab9d188 100644 --- a/src/GeomLib/GeomLib.cxx +++ b/src/GeomLib/GeomLib.cxx @@ -2371,119 +2371,143 @@ void GeomLib::CancelDenominatorDerivative(Handle(Geom_BSplineSurface) & //======================================================================= //function : NormEstim -//purpose : +//purpose : //======================================================================= - -Standard_Integer GeomLib::NormEstim(const Handle(Geom_Surface)& S, - const gp_Pnt2d& UV, - const Standard_Real Tol, gp_Dir& N) +Standard_Integer GeomLib::NormEstim (const Handle(Geom_Surface)& theSurf, + const gp_Pnt2d& theUV, + const Standard_Real theTol, + gp_Dir& theNorm) { - gp_Vec DU, DV; - gp_Pnt DummyPnt; - Standard_Real aTol2 = Square(Tol); + const Standard_Real aTol2 = Square (theTol); - S->D1(UV.X(), UV.Y(), DummyPnt, DU, DV); + gp_Vec DU, DV; + gp_Pnt aDummyPnt; + theSurf->D1 (theUV.X(), theUV.Y(), aDummyPnt, DU, DV); - Standard_Real MDU = DU.SquareMagnitude(), MDV = DV.SquareMagnitude(); + const Standard_Real MDU = DU.SquareMagnitude(), MDV = DV.SquareMagnitude(); + if (MDU >= aTol2 + && MDV >= aTol2) + { + gp_Vec aNorm = DU ^ DV; + Standard_Real aMagn = aNorm.SquareMagnitude(); + if (aMagn < aTol2) + { + return 3; + } - if(MDU >= aTol2 && MDV >= aTol2) { - gp_Vec Norm = DU^DV; - Standard_Real Magn = Norm.SquareMagnitude(); - if(Magn < aTol2) return 3; + theNorm.SetXYZ (aNorm.XYZ()); + return 0; + } - //Magn = sqrt(Magn); - N.SetXYZ(Norm.XYZ()); + gp_Vec D2U, D2V, D2UV; + Standard_Boolean isDone = false; + CSLib_NormalStatus aStatus; + gp_Dir aNormal; - return 0; + theSurf->D2 (theUV.X(), theUV.Y(), aDummyPnt, DU, DV, D2U, D2V, D2UV); + CSLib::Normal (DU, DV, D2U, D2V, D2UV, theTol, isDone, aStatus, aNormal); + if (!isDone) + { + // computation is impossible + return aStatus == CSLib_D1NIsNull ? 2 : 3; } - else { - gp_Vec D2U, D2V, D2UV; - Standard_Boolean isDone; - CSLib_NormalStatus aStatus; - gp_Dir aNormal; - - S->D2(UV.X(), UV.Y(), DummyPnt, DU, DV, D2U, D2V, D2UV); - CSLib::Normal(DU, DV, D2U, D2V, D2UV, Tol, isDone, aStatus, aNormal); - - if (isDone) { - Standard_Real Umin, Umax, Vmin, Vmax; - Standard_Real step = 1.0e-5; - Standard_Real eps = 1.0e-16; - Standard_Real sign = -1.0; - - S->Bounds(Umin, Umax, Vmin, Vmax); - - // check for cone apex singularity point - if ((UV.Y() > Vmin + step) && (UV.Y() < Vmax - step)) - { - gp_Dir aNormal1, aNormal2; - Standard_Real aConeSingularityAngleEps = 1.0e-4; - S->D1(UV.X(), UV.Y() - sign * step, DummyPnt, DU, DV); - if ((DU.XYZ().SquareModulus() > eps) && (DV.XYZ().SquareModulus() > eps)) { - aNormal1 = DU^DV; - S->D1(UV.X(), UV.Y() + sign * step, DummyPnt, DU, DV); - if ((DU.XYZ().SquareModulus() > eps) && (DV.XYZ().SquareModulus() > eps)) { - aNormal2 = DU^DV; - if (aNormal1.IsOpposite(aNormal2, aConeSingularityAngleEps)) - return 2; - } - } - } - // Along V - if(MDU < aTol2 && MDV >= aTol2) { - if ((Vmax - UV.Y()) > (UV.Y() - Vmin)) - sign = 1.0; - S->D1(UV.X(), UV.Y() + sign * step, DummyPnt, DU, DV); - gp_Vec Norm = DU^DV; - if (Norm.SquareMagnitude() < eps) { - Standard_Real sign1 = -1.0; - if ((Umax - UV.X()) > (UV.X() - Umin)) - sign1 = 1.0; - S->D1(UV.X() + sign1 * step, UV.Y() + sign * step, DummyPnt, DU, DV); - Norm = DU^DV; - } - if ((Norm.SquareMagnitude() >= eps) && (Norm.Dot(aNormal) < 0.0)) - aNormal.Reverse(); - } + Standard_Real Umin, Umax, Vmin, Vmax; + Standard_Real step = 1.0e-5; + Standard_Real eps = 1.0e-16; + Standard_Real sign = -1.0; + theSurf->Bounds (Umin, Umax, Vmin, Vmax); - // Along U - if(MDV < aTol2 && MDU >= aTol2) { - if ((Umax - UV.X()) > (UV.X() - Umin)) - sign = 1.0; - S->D1(UV.X() + sign * step, UV.Y(), DummyPnt, DU, DV); - gp_Vec Norm = DU^DV; - if (Norm.SquareMagnitude() < eps) { - Standard_Real sign1 = -1.0; - if ((Vmax - UV.Y()) > (UV.Y() - Vmin)) - sign1 = 1.0; - S->D1(UV.X() + sign * step, UV.Y() + sign1 * step, DummyPnt, DU, DV); - Norm = DU^DV; - } - if ((Norm.SquareMagnitude() >= eps) && (Norm.Dot(aNormal) < 0.0)) - aNormal.Reverse(); - } + // check for cone apex singularity point + if ((theUV.Y() > Vmin + step) + && (theUV.Y() < Vmax - step)) + { + gp_Dir aNormal1, aNormal2; + Standard_Real aConeSingularityAngleEps = 1.0e-4; + theSurf->D1(theUV.X(), theUV.Y() - sign * step, aDummyPnt, DU, DV); + if ((DU.XYZ().SquareModulus() > eps) && (DV.XYZ().SquareModulus() > eps)) + { + aNormal1 = DU ^ DV; + theSurf->D1 (theUV.X(), theUV.Y() + sign * step, aDummyPnt, DU, DV); + if ((DU.XYZ().SquareModulus() > eps) + && (DV.XYZ().SquareModulus() > eps)) + { + aNormal2 = DU^DV; + if (aNormal1.IsOpposite (aNormal2, aConeSingularityAngleEps)) + { + return 2; + } + } + } + } + + // Along V + if (MDU < aTol2 + && MDV >= aTol2) + { + if ((Vmax - theUV.Y()) > (theUV.Y() - Vmin)) + { + sign = 1.0; + } - // quasysingular - if ((aStatus == CSLib_D1NuIsNull) || (aStatus == CSLib_D1NvIsNull) || - (aStatus == CSLib_D1NuIsParallelD1Nv)) { - N.SetXYZ(aNormal.XYZ()); - return 1; + theSurf->D1 (theUV.X(), theUV.Y() + sign * step, aDummyPnt, DU, DV); + gp_Vec Norm = DU ^ DV; + if (Norm.SquareMagnitude() < eps) + { + Standard_Real sign1 = -1.0; + if ((Umax - theUV.X()) > (theUV.X() - Umin)) + { + sign1 = 1.0; } - // conical - if (aStatus == CSLib_InfinityOfSolutions) - return 2; + theSurf->D1 (theUV.X() + sign1 * step, theUV.Y() + sign * step, aDummyPnt, DU, DV); + Norm = DU ^ DV; } - // computation is impossible - else { - // conical - if (aStatus == CSLib_D1NIsNull) { - return 2; + if (Norm.SquareMagnitude() >= eps + && Norm.Dot (aNormal) < 0.0) + { + aNormal.Reverse(); + } + } + + // Along U + if (MDV < aTol2 + && MDU >= aTol2) + { + if ((Umax - theUV.X()) > (theUV.X() - Umin)) + { + sign = 1.0; + } + + theSurf->D1 (theUV.X() + sign * step, theUV.Y(), aDummyPnt, DU, DV); + gp_Vec Norm = DU ^ DV; + if (Norm.SquareMagnitude() < eps) + { + Standard_Real sign1 = -1.0; + if ((Vmax - theUV.Y()) > (theUV.Y() - Vmin)) + { + sign1 = 1.0; } - return 3; + + theSurf->D1 (theUV.X() + sign * step, theUV.Y() + sign1 * step, aDummyPnt, DU, DV); + Norm = DU ^ DV; + } + if (Norm.SquareMagnitude() >= eps + && Norm.Dot (aNormal) < 0.0) + { + aNormal.Reverse(); } } - return 3; + + // quasysingular + if (aStatus == CSLib_D1NuIsNull + || aStatus == CSLib_D1NvIsNull + || aStatus == CSLib_D1NuIsParallelD1Nv) + { + theNorm.SetXYZ (aNormal.XYZ()); + return 1; + } + + return aStatus == CSLib_InfinityOfSolutions ? 2 : 3; } //======================================================================= diff --git a/src/GeomLib/GeomLib.hxx b/src/GeomLib/GeomLib.hxx index 97c3ee446e..71e817bb90 100644 --- a/src/GeomLib/GeomLib.hxx +++ b/src/GeomLib/GeomLib.hxx @@ -183,8 +183,19 @@ public: //! Cancel,on the boundaries,the denominator first derivative //! in the directions wished by the user and set its value to 1. Standard_EXPORT static void CancelDenominatorDerivative (Handle(Geom_BSplineSurface)& BSurf, const Standard_Boolean UDirection, const Standard_Boolean VDirection); - - Standard_EXPORT static Standard_Integer NormEstim (const Handle(Geom_Surface)& S, const gp_Pnt2d& UV, const Standard_Real Tol, gp_Dir& N); + + //! Estimate surface normal at the given (U, V) point. + //! @param[in] theSurf input surface + //! @param[in] theUV (U, V) point coordinates on the surface + //! @param[in] theTol estimation tolerance + //! @param[out] theNorm computed normal + //! @return 0 if normal estimated from D1, + //! 1 if estimated from D2 (quasysingular), + //! >=2 in case of failure (undefined or infinite solutions) + Standard_EXPORT static Standard_Integer NormEstim (const Handle(Geom_Surface)& theSurf, + const gp_Pnt2d& theUV, + const Standard_Real theTol, + gp_Dir& theNorm); //! This method defines if opposite boundaries of surface //! coincide with given tolerance From 633084b80933b05fe384fc581ed2e7f7d06c0fe7 Mon Sep 17 00:00:00 2001 From: kgv Date: Wed, 2 Mar 2022 15:21:22 +0300 Subject: [PATCH 229/639] 0032862: Visualization, Graphic3d_TextureMap - add 3D texture definition Image_PixMap has been extended to support definition of 3D bitmap (as an array of 2D slices). Graphic3d_TypeOfTexture enumeration values have been renamed to include full enum prefix. Added Graphic3d_TypeOfTexture_3D redirecting to GL_TEXTURE_3D. OpenGl_Texture::Init() has been extended to allow initialization of 3D texture. Graphic3d_Texture2Dmanual merged into Graphic3d_Texture2D and marked as deprecated alias. Graphic3d_TOT_2D_MIPMAP has been deprecated in favor of dedicated Graphic3d_TextureRoot::SetMipMaps(). Added Graphic3d_Texture3D class. vtexture - added argument -3d for uploading 3D texture. --- samples/OCCTOverview/code/Sample2D_Image.cxx | 6 +- src/AIS/AIS_TexturedShape.cxx | 8 +- src/AIS/AIS_TexturedShape.hxx | 4 +- src/AIS/AIS_XRTrackedDevice.cxx | 4 +- src/D3DHost/D3DHost_FrameBuffer.cxx | 2 +- src/Graphic3d/FILES | 3 +- src/Graphic3d/Graphic3d_CubeMap.cxx | 37 ++ src/Graphic3d/Graphic3d_CubeMap.hxx | 23 +- src/Graphic3d/Graphic3d_MediaTexture.cxx | 2 +- src/Graphic3d/Graphic3d_Texture1Dmanual.cxx | 10 +- src/Graphic3d/Graphic3d_Texture1Dmanual.hxx | 36 +- src/Graphic3d/Graphic3d_Texture1Dsegment.cxx | 6 +- src/Graphic3d/Graphic3d_Texture2D.cxx | 49 +++ src/Graphic3d/Graphic3d_Texture2D.hxx | 19 +- src/Graphic3d/Graphic3d_Texture2Dmanual.cxx | 58 --- src/Graphic3d/Graphic3d_Texture2Dmanual.hxx | 25 +- src/Graphic3d/Graphic3d_Texture2Dplane.cxx | 15 +- src/Graphic3d/Graphic3d_Texture3D.cxx | 127 +++++++ src/Graphic3d/Graphic3d_Texture3D.hxx | 51 +++ src/Graphic3d/Graphic3d_TextureEnv.cxx | 9 +- src/Graphic3d/Graphic3d_TextureRoot.cxx | 10 +- src/Graphic3d/Graphic3d_TextureRoot.hxx | 8 +- src/Graphic3d/Graphic3d_TypeOfTexture.hxx | 24 +- src/Image/Image_PixMap.cxx | 359 ++++++++++-------- src/Image/Image_PixMap.hxx | 338 ++++++++++++----- src/Image/Image_PixMapData.hxx | 120 +++++-- src/MeshVS/MeshVS_NodalColorPrsBuilder.cxx | 8 +- src/OpenGl/OpenGl_AspectsSprite.cxx | 4 +- src/OpenGl/OpenGl_Context.cxx | 4 +- src/OpenGl/OpenGl_Font.cxx | 2 +- src/OpenGl/OpenGl_FrameBuffer.cxx | 6 +- src/OpenGl/OpenGl_PBREnvironment.cxx | 6 +- src/OpenGl/OpenGl_Sampler.cxx | 12 +- src/OpenGl/OpenGl_Texture.cxx | 360 +++++++++++-------- src/OpenGl/OpenGl_Texture.hxx | 39 +- src/OpenGl/OpenGl_TileSampler.cxx | 2 +- src/OpenGl/OpenGl_View.cxx | 8 +- src/OpenGl/OpenGl_View_Raytrace.cxx | 4 +- src/QABugs/QABugs_1.cxx | 2 +- src/V3d/V3d_View.cxx | 2 +- src/ViewerTest/ViewerTest.cxx | 74 ++-- src/ViewerTest/ViewerTest_OpenGlCommands.cxx | 10 + src/ViewerTest/ViewerTest_ViewerCommands.cxx | 8 +- src/XCAFPrs/XCAFPrs_Texture.cxx | 4 +- src/XCAFPrs/XCAFPrs_Texture.hxx | 4 +- tests/opengl/data/textures/cubemap_jpg | 2 - tests/opengl/data/textures/texture_3d | 60 ++++ 47 files changed, 1319 insertions(+), 655 deletions(-) delete mode 100644 src/Graphic3d/Graphic3d_Texture2Dmanual.cxx create mode 100644 src/Graphic3d/Graphic3d_Texture3D.cxx create mode 100644 src/Graphic3d/Graphic3d_Texture3D.hxx create mode 100644 tests/opengl/data/textures/texture_3d diff --git a/samples/OCCTOverview/code/Sample2D_Image.cxx b/samples/OCCTOverview/code/Sample2D_Image.cxx index 3e833ee206..e86f849365 100644 --- a/samples/OCCTOverview/code/Sample2D_Image.cxx +++ b/samples/OCCTOverview/code/Sample2D_Image.cxx @@ -26,9 +26,7 @@ #include #include #include -#include -#include -#include +#include #include #include #include @@ -81,7 +79,7 @@ void Sample2D_Image::SetContext (const Handle(AIS_InteractiveContext)& theContex this->Set(TopoDS_Shape(myFace)); myDrawer->SetShadingAspect(new Prs3d_ShadingAspect()); - Handle(Graphic3d_Texture2Dmanual) aTexture = new Graphic3d_Texture2Dmanual(myFilename); + Handle(Graphic3d_Texture2D) aTexture = new Graphic3d_Texture2D (myFilename); aTexture->DisableModulate(); myDrawer->ShadingAspect()->Aspect()->SetTextureMap (aTexture); myDrawer->ShadingAspect()->Aspect()->SetTextureMapOn(); diff --git a/src/AIS/AIS_TexturedShape.cxx b/src/AIS/AIS_TexturedShape.cxx index 46e2dc6aa0..1cb792082f 100644 --- a/src/AIS/AIS_TexturedShape.cxx +++ b/src/AIS/AIS_TexturedShape.cxx @@ -22,7 +22,7 @@ #include #include #include -#include +#include #include #include #include @@ -278,17 +278,17 @@ void AIS_TexturedShape::updateAttributes (const Handle(Prs3d_Presentation)& theP TCollection_AsciiString aTextureDesc; if (!myTexturePixMap.IsNull()) { - myTexture = new Graphic3d_Texture2Dmanual (myTexturePixMap); + myTexture = new Graphic3d_Texture2D (myTexturePixMap); aTextureDesc = " (custom image)"; } else if (myPredefTexture != Graphic3d_NOT_2D_UNKNOWN) { - myTexture = new Graphic3d_Texture2Dmanual (myPredefTexture); + myTexture = new Graphic3d_Texture2D (myPredefTexture); aTextureDesc = TCollection_AsciiString(" (predefined texture ") + myTexture->GetId() + ")"; } else { - myTexture = new Graphic3d_Texture2Dmanual (myTextureFile.ToCString()); + myTexture = new Graphic3d_Texture2D (myTextureFile.ToCString()); aTextureDesc = TCollection_AsciiString(" (") + myTextureFile + ")"; } diff --git a/src/AIS/AIS_TexturedShape.hxx b/src/AIS/AIS_TexturedShape.hxx index 270470f3a1..c814e3d475 100644 --- a/src/AIS/AIS_TexturedShape.hxx +++ b/src/AIS/AIS_TexturedShape.hxx @@ -26,7 +26,7 @@ #include class Graphic3d_AspectFillArea3d; -class Graphic3d_Texture2Dmanual; +class Graphic3d_Texture2D; //! This class allows to map textures on shapes. //! Presentations modes AIS_WireFrame (0) and AIS_Shaded (1) behave in the same manner as in AIS_Shape, @@ -184,7 +184,7 @@ protected: //! @name overridden methods protected: //! @name presentation fields - Handle(Graphic3d_Texture2Dmanual) myTexture; + Handle(Graphic3d_Texture2D) myTexture; Handle(Graphic3d_AspectFillArea3d) myAspect; protected: //! @name texture source fields diff --git a/src/AIS/AIS_XRTrackedDevice.cxx b/src/AIS/AIS_XRTrackedDevice.cxx index af435d50b6..e64ec1d582 100644 --- a/src/AIS/AIS_XRTrackedDevice.cxx +++ b/src/AIS/AIS_XRTrackedDevice.cxx @@ -23,14 +23,14 @@ #include //! Texture holder. -class AIS_XRTrackedDevice::XRTexture : public Graphic3d_Texture2Dmanual +class AIS_XRTrackedDevice::XRTexture : public Graphic3d_Texture2D { public: //! Constructor. XRTexture (const Handle(Image_Texture)& theImageSource, const Graphic3d_TextureUnit theUnit = Graphic3d_TextureUnit_BaseColor) - : Graphic3d_Texture2Dmanual (""), myImageSource (theImageSource) + : Graphic3d_Texture2D (""), myImageSource (theImageSource) { if (!theImageSource->TextureId().IsEmpty()) { diff --git a/src/D3DHost/D3DHost_FrameBuffer.cxx b/src/D3DHost/D3DHost_FrameBuffer.cxx index 209f57b04d..60aef01396 100644 --- a/src/D3DHost/D3DHost_FrameBuffer.cxx +++ b/src/D3DHost/D3DHost_FrameBuffer.cxx @@ -195,7 +195,7 @@ Standard_Boolean D3DHost_FrameBuffer::InitD3dInterop (const Handle(OpenGl_Contex const OpenGl_TextureFormat aDepthFormat = OpenGl_TextureFormat::FindSizedFormat (theCtx, myDepthFormat); if (aDepthFormat.IsValid() - && !myDepthStencilTexture->Init (theCtx, aDepthFormat, Graphic3d_Vec2i (aSizeX, aSizeY), Graphic3d_TOT_2D)) + && !myDepthStencilTexture->Init (theCtx, aDepthFormat, Graphic3d_Vec2i (aSizeX, aSizeY), Graphic3d_TypeOfTexture_2D)) { Release (theCtx.get()); theCtx->PushMessage (GL_DEBUG_SOURCE_APPLICATION, GL_DEBUG_TYPE_ERROR, 0, GL_DEBUG_SEVERITY_HIGH, diff --git a/src/Graphic3d/FILES b/src/Graphic3d/FILES index 71ca2e7dff..ec1f20b4df 100755 --- a/src/Graphic3d/FILES +++ b/src/Graphic3d/FILES @@ -154,10 +154,11 @@ Graphic3d_Texture1Dsegment.cxx Graphic3d_Texture1Dsegment.hxx Graphic3d_Texture2D.cxx Graphic3d_Texture2D.hxx -Graphic3d_Texture2Dmanual.cxx Graphic3d_Texture2Dmanual.hxx Graphic3d_Texture2Dplane.cxx Graphic3d_Texture2Dplane.hxx +Graphic3d_Texture3D.cxx +Graphic3d_Texture3D.hxx Graphic3d_TextureEnv.cxx Graphic3d_TextureEnv.hxx Graphic3d_TextureMap.cxx diff --git a/src/Graphic3d/Graphic3d_CubeMap.cxx b/src/Graphic3d/Graphic3d_CubeMap.cxx index f4c95aa738..4d2abb1b84 100644 --- a/src/Graphic3d/Graphic3d_CubeMap.cxx +++ b/src/Graphic3d/Graphic3d_CubeMap.cxx @@ -15,3 +15,40 @@ #include IMPLEMENT_STANDARD_RTTIEXT(Graphic3d_CubeMap, Graphic3d_TextureMap) + +// ======================================================================= +// function : Graphic3d_CubeMap +// purpose : +// ======================================================================= +Graphic3d_CubeMap::Graphic3d_CubeMap (const TCollection_AsciiString& theFileName, + Standard_Boolean theToGenerateMipmaps) +: Graphic3d_TextureMap (theFileName, Graphic3d_TypeOfTexture_CUBEMAP), + myCurrentSide (Graphic3d_CMS_POS_X), + myEndIsReached (false), + myZIsInverted (false) +{ + myHasMipmaps = theToGenerateMipmaps; +} + +// ======================================================================= +// function : Graphic3d_CubeMap +// purpose : +// ======================================================================= +Graphic3d_CubeMap::Graphic3d_CubeMap (const Handle(Image_PixMap)& thePixmap, + Standard_Boolean theToGenerateMipmaps) +: Graphic3d_TextureMap (thePixmap, Graphic3d_TypeOfTexture_CUBEMAP), + myCurrentSide (Graphic3d_CMS_POS_X), + myEndIsReached (false), + myZIsInverted (false) +{ + myHasMipmaps = theToGenerateMipmaps; +} + +// ======================================================================= +// function : ~Graphic3d_CubeMap +// purpose : +// ======================================================================= +Graphic3d_CubeMap::~Graphic3d_CubeMap() +{ + // +} diff --git a/src/Graphic3d/Graphic3d_CubeMap.hxx b/src/Graphic3d/Graphic3d_CubeMap.hxx index 52473ee244..0566c97c84 100644 --- a/src/Graphic3d/Graphic3d_CubeMap.hxx +++ b/src/Graphic3d/Graphic3d_CubeMap.hxx @@ -26,24 +26,12 @@ class Graphic3d_CubeMap : public Graphic3d_TextureMap public: //! Constructor defining loading cubemap from file. - Graphic3d_CubeMap (const TCollection_AsciiString& theFileName, - Standard_Boolean theToGenerateMipmaps = Standard_False) : - Graphic3d_TextureMap (theFileName, Graphic3d_TOT_CUBEMAP), - myCurrentSide (Graphic3d_CMS_POS_X), - myEndIsReached (false), - myZIsInverted (false), - myHasMipmaps (theToGenerateMipmaps) - {} + Standard_EXPORT Graphic3d_CubeMap (const TCollection_AsciiString& theFileName, + Standard_Boolean theToGenerateMipmaps = Standard_False); //! Constructor defining direct cubemap initialization from PixMap. - Graphic3d_CubeMap (const Handle(Image_PixMap)& thePixmap = Handle(Image_PixMap)(), - Standard_Boolean theToGenerateMipmaps = Standard_False) : - Graphic3d_TextureMap (thePixmap, Graphic3d_TOT_CUBEMAP), - myCurrentSide (Graphic3d_CMS_POS_X), - myEndIsReached (false), - myZIsInverted (false), - myHasMipmaps (theToGenerateMipmaps) - {} + Standard_EXPORT Graphic3d_CubeMap (const Handle(Image_PixMap)& thePixmap = Handle(Image_PixMap)(), + Standard_Boolean theToGenerateMipmaps = Standard_False); //! Returns whether the iterator has reached the end (true if it hasn't). Standard_Boolean More() const { return !myEndIsReached; } @@ -100,14 +88,13 @@ public: } //! Empty destructor. - ~Graphic3d_CubeMap() {} + Standard_EXPORT virtual ~Graphic3d_CubeMap(); protected: Graphic3d_CubeMapSide myCurrentSide; //!< Iterator state Standard_Boolean myEndIsReached; //!< Indicates whether end of iteration has been reached or hasn't Standard_Boolean myZIsInverted; //!< Indicates whether Z axis is inverted that allows to synchronize vertical flip of cubemap - Standard_Boolean myHasMipmaps; //!< Indicates whether mipmaps of cubemap will be generated or not }; diff --git a/src/Graphic3d/Graphic3d_MediaTexture.cxx b/src/Graphic3d/Graphic3d_MediaTexture.cxx index 15dde8ee76..1683203ea2 100644 --- a/src/Graphic3d/Graphic3d_MediaTexture.cxx +++ b/src/Graphic3d/Graphic3d_MediaTexture.cxx @@ -42,7 +42,7 @@ IMPLEMENT_STANDARD_RTTIEXT(Graphic3d_MediaTexture, Graphic3d_Texture2D) // ================================================================ Graphic3d_MediaTexture::Graphic3d_MediaTexture (const Handle(Standard_HMutex)& theMutex, Standard_Integer thePlane) -: Graphic3d_Texture2D ("", Graphic3d_TOT_2D), +: Graphic3d_Texture2D ("", Graphic3d_TypeOfTexture_2D), myMutex (theMutex), myPlane (thePlane) { diff --git a/src/Graphic3d/Graphic3d_Texture1Dmanual.cxx b/src/Graphic3d/Graphic3d_Texture1Dmanual.cxx index c7992d5ef4..aa73878ef0 100644 --- a/src/Graphic3d/Graphic3d_Texture1Dmanual.cxx +++ b/src/Graphic3d/Graphic3d_Texture1Dmanual.cxx @@ -14,10 +14,8 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. - #include -#include -#include + #include IMPLEMENT_STANDARD_RTTIEXT(Graphic3d_Texture1Dmanual,Graphic3d_Texture1D) @@ -27,7 +25,7 @@ IMPLEMENT_STANDARD_RTTIEXT(Graphic3d_Texture1Dmanual,Graphic3d_Texture1D) // purpose : // ======================================================================= Graphic3d_Texture1Dmanual::Graphic3d_Texture1Dmanual (const TCollection_AsciiString& theFileName) -: Graphic3d_Texture1D (theFileName, Graphic3d_TOT_1D) +: Graphic3d_Texture1D (theFileName, Graphic3d_TypeOfTexture_1D) { // } @@ -37,7 +35,7 @@ Graphic3d_Texture1Dmanual::Graphic3d_Texture1Dmanual (const TCollection_AsciiStr // purpose : // ======================================================================= Graphic3d_Texture1Dmanual::Graphic3d_Texture1Dmanual (const Graphic3d_NameOfTexture1D theNOT) -: Graphic3d_Texture1D (theNOT, Graphic3d_TOT_1D) +: Graphic3d_Texture1D (theNOT, Graphic3d_TypeOfTexture_1D) { // } @@ -47,7 +45,7 @@ Graphic3d_Texture1Dmanual::Graphic3d_Texture1Dmanual (const Graphic3d_NameOfText // purpose : // ======================================================================= Graphic3d_Texture1Dmanual::Graphic3d_Texture1Dmanual (const Handle(Image_PixMap)& thePixMap) -: Graphic3d_Texture1D (thePixMap, Graphic3d_TOT_1D) +: Graphic3d_Texture1D (thePixMap, Graphic3d_TypeOfTexture_1D) { // } diff --git a/src/Graphic3d/Graphic3d_Texture1Dmanual.hxx b/src/Graphic3d/Graphic3d_Texture1Dmanual.hxx index dacc01948e..835bd91132 100644 --- a/src/Graphic3d/Graphic3d_Texture1Dmanual.hxx +++ b/src/Graphic3d/Graphic3d_Texture1Dmanual.hxx @@ -17,55 +17,27 @@ #ifndef _Graphic3d_Texture1Dmanual_HeaderFile #define _Graphic3d_Texture1Dmanual_HeaderFile -#include -#include - #include #include -class TCollection_AsciiString; - -class Graphic3d_Texture1Dmanual; DEFINE_STANDARD_HANDLE(Graphic3d_Texture1Dmanual, Graphic3d_Texture1D) //! This class provides the implementation of a manual 1D texture. -//! you MUST provides texture coordinates on your facets if you want to see your texture. +//! you MUST provide texture coordinates on your facets if you want to see your texture. class Graphic3d_Texture1Dmanual : public Graphic3d_Texture1D { - + DEFINE_STANDARD_RTTIEXT(Graphic3d_Texture1Dmanual, Graphic3d_Texture1D) public: - //! Creates a texture from the file FileName. Standard_EXPORT Graphic3d_Texture1Dmanual(const TCollection_AsciiString& theFileName); - + //! Create a texture from a predefined texture name set. Standard_EXPORT Graphic3d_Texture1Dmanual(const Graphic3d_NameOfTexture1D theNOT); - + //! Creates a texture from the pixmap. Standard_EXPORT Graphic3d_Texture1Dmanual(const Handle(Image_PixMap)& thePixMap); - - - - DEFINE_STANDARD_RTTIEXT(Graphic3d_Texture1Dmanual,Graphic3d_Texture1D) - -protected: - - - - -private: - - - - }; - - - - - - #endif // _Graphic3d_Texture1Dmanual_HeaderFile diff --git a/src/Graphic3d/Graphic3d_Texture1Dsegment.cxx b/src/Graphic3d/Graphic3d_Texture1Dsegment.cxx index 41e134f867..89c6aa9e82 100644 --- a/src/Graphic3d/Graphic3d_Texture1Dsegment.cxx +++ b/src/Graphic3d/Graphic3d_Texture1Dsegment.cxx @@ -28,7 +28,7 @@ IMPLEMENT_STANDARD_RTTIEXT(Graphic3d_Texture1Dsegment,Graphic3d_Texture1D) // purpose : // ======================================================================= Graphic3d_Texture1Dsegment::Graphic3d_Texture1Dsegment (const TCollection_AsciiString& theFileName) -: Graphic3d_Texture1D (theFileName, Graphic3d_TOT_1D), +: Graphic3d_Texture1D (theFileName, Graphic3d_TypeOfTexture_1D), myX1 (0.0f), myY1 (0.0f), myZ1 (0.0f), @@ -47,7 +47,7 @@ Graphic3d_Texture1Dsegment::Graphic3d_Texture1Dsegment (const TCollection_AsciiS // purpose : // ======================================================================= Graphic3d_Texture1Dsegment::Graphic3d_Texture1Dsegment (const Graphic3d_NameOfTexture1D theNOT) -: Graphic3d_Texture1D (theNOT, Graphic3d_TOT_1D), +: Graphic3d_Texture1D (theNOT, Graphic3d_TypeOfTexture_1D), myX1 (0.0f), myY1 (0.0f), myZ1 (0.0f), @@ -66,7 +66,7 @@ Graphic3d_Texture1Dsegment::Graphic3d_Texture1Dsegment (const Graphic3d_NameOfTe // purpose : // ======================================================================= Graphic3d_Texture1Dsegment::Graphic3d_Texture1Dsegment (const Handle(Image_PixMap)& thePixMap) -: Graphic3d_Texture1D (thePixMap, Graphic3d_TOT_1D), +: Graphic3d_Texture1D (thePixMap, Graphic3d_TypeOfTexture_1D), myX1 (0.0f), myY1 (0.0f), myZ1 (0.0f), diff --git a/src/Graphic3d/Graphic3d_Texture2D.cxx b/src/Graphic3d/Graphic3d_Texture2D.cxx index be3a4944d8..bee71e8d42 100644 --- a/src/Graphic3d/Graphic3d_Texture2D.cxx +++ b/src/Graphic3d/Graphic3d_Texture2D.cxx @@ -16,6 +16,7 @@ #include +#include #include IMPLEMENT_STANDARD_RTTIEXT(Graphic3d_Texture2D,Graphic3d_TextureMap) @@ -46,6 +47,20 @@ static const char *NameOfTexture2d_to_FileName[] = "2d_chess.rgba" }; +// ======================================================================= +// function : Graphic3d_Texture2D +// purpose : +// ======================================================================= +Graphic3d_Texture2D::Graphic3d_Texture2D (const TCollection_AsciiString& theFileName) +: Graphic3d_TextureMap (theFileName, Graphic3d_TypeOfTexture_2D), + myName (Graphic3d_NOT_2D_UNKNOWN) +{ + myHasMipmaps = true; + myParams->SetModulate (true); + myParams->SetRepeat (true); + myParams->SetFilter (Graphic3d_TOTF_TRILINEAR); +} + // ======================================================================= // function : Graphic3d_Texture2D // purpose : @@ -55,6 +70,25 @@ Graphic3d_Texture2D::Graphic3d_Texture2D (const TCollection_AsciiString& theFile : Graphic3d_TextureMap (theFileName, theType), myName (Graphic3d_NOT_2D_UNKNOWN) { + // +} + +// ======================================================================= +// function : Graphic3d_Texture2D +// purpose : +// ======================================================================= +Graphic3d_Texture2D::Graphic3d_Texture2D (const Graphic3d_NameOfTexture2D theNOT) +: Graphic3d_TextureMap (NameOfTexture2d_to_FileName[theNOT], Graphic3d_TypeOfTexture_2D), + myName (theNOT) +{ + myPath.SetTrek (Graphic3d_TextureRoot::TexturesFolder()); + myTexId = TCollection_AsciiString ("Graphic3d_Texture2D_") + + NameOfTexture2d_to_FileName[theNOT]; + + myHasMipmaps = true; + myParams->SetModulate (true); + myParams->SetRepeat (true); + myParams->SetFilter (Graphic3d_TOTF_TRILINEAR); } // ======================================================================= @@ -71,6 +105,20 @@ Graphic3d_Texture2D::Graphic3d_Texture2D (const Graphic3d_NameOfTexture2D theNOT + NameOfTexture2d_to_FileName[theNOT]; } +// ======================================================================= +// function : Graphic3d_Texture2D +// purpose : +// ======================================================================= +Graphic3d_Texture2D::Graphic3d_Texture2D (const Handle(Image_PixMap)& thePixMap) +: Graphic3d_TextureMap (thePixMap, Graphic3d_TypeOfTexture_2D), + myName (Graphic3d_NOT_2D_UNKNOWN) +{ + myHasMipmaps = true; + myParams->SetModulate (true); + myParams->SetRepeat (true); + myParams->SetFilter (Graphic3d_TOTF_TRILINEAR); +} + // ======================================================================= // function : Graphic3d_Texture2D // purpose : @@ -80,6 +128,7 @@ Graphic3d_Texture2D::Graphic3d_Texture2D (const Handle(Image_PixMap)& thePixM : Graphic3d_TextureMap (thePixMap, theType), myName (Graphic3d_NOT_2D_UNKNOWN) { + // } // ======================================================================= diff --git a/src/Graphic3d/Graphic3d_Texture2D.hxx b/src/Graphic3d/Graphic3d_Texture2D.hxx index 1a64bfcaed..7a9f84db90 100644 --- a/src/Graphic3d/Graphic3d_Texture2D.hxx +++ b/src/Graphic3d/Graphic3d_Texture2D.hxx @@ -34,6 +34,18 @@ public: public: + //! Creates a texture from a file. + //! MipMaps levels will be automatically generated if needed. + Standard_EXPORT Graphic3d_Texture2D (const TCollection_AsciiString& theFileName); + + //! Creates a texture from a predefined texture name set. + //! MipMaps levels will be automatically generated if needed. + Standard_EXPORT Graphic3d_Texture2D (const Graphic3d_NameOfTexture2D theNOT); + + //! Creates a texture from the pixmap. + //! MipMaps levels will be automatically generated if needed. + Standard_EXPORT Graphic3d_Texture2D (const Handle(Image_PixMap)& thePixMap); + //! Returns the name of the predefined textures or NOT_2D_UNKNOWN //! when the name is given as a filename. Standard_EXPORT Graphic3d_NameOfTexture2D Name() const; @@ -42,13 +54,6 @@ public: //! Note that this method does not invalidate already uploaded resources - consider calling ::UpdateRevision() if needed. Standard_EXPORT void SetImage (const Handle(Image_PixMap)& thePixMap); - //! Return true if mip-maps should be used. - Standard_Boolean HasMipMaps() const { return myType == Graphic3d_TOT_2D_MIPMAP; } - - //! Set if mip-maps should be used (generated if needed). - //! Note that this method should be called before loading / using the texture. - void SetMipMaps (const Standard_Boolean theToUse) { myType = theToUse ? Graphic3d_TOT_2D_MIPMAP : Graphic3d_TOT_2D; } - protected: Standard_EXPORT Graphic3d_Texture2D(const TCollection_AsciiString& theFileName, const Graphic3d_TypeOfTexture theType); diff --git a/src/Graphic3d/Graphic3d_Texture2Dmanual.cxx b/src/Graphic3d/Graphic3d_Texture2Dmanual.cxx deleted file mode 100644 index d15d21bbd5..0000000000 --- a/src/Graphic3d/Graphic3d_Texture2Dmanual.cxx +++ /dev/null @@ -1,58 +0,0 @@ -// Created on: 1997-07-28 -// Created by: Pierre CHALAMET -// Copyright (c) 1997-1999 Matra Datavision -// Copyright (c) 1999-2014 OPEN CASCADE SAS -// -// This file is part of Open CASCADE Technology software library. -// -// This library is free software; you can redistribute it and/or modify it under -// the terms of the GNU Lesser General Public License version 2.1 as published -// by the Free Software Foundation, with special exception defined in the file -// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT -// distribution for complete text of the license and disclaimer of any warranty. -// -// Alternatively, this file may be used under the terms of Open CASCADE -// commercial license or contractual agreement. - -#include - -#include -#include - -IMPLEMENT_STANDARD_RTTIEXT(Graphic3d_Texture2Dmanual,Graphic3d_Texture2D) - -// ======================================================================= -// function : Graphic3d_Texture2Dmanual -// purpose : -// ======================================================================= -Graphic3d_Texture2Dmanual::Graphic3d_Texture2Dmanual (const TCollection_AsciiString& theFileName) -: Graphic3d_Texture2D (theFileName, Graphic3d_TOT_2D_MIPMAP) -{ - myParams->SetModulate (Standard_True); - myParams->SetRepeat (Standard_True); - myParams->SetFilter (Graphic3d_TOTF_TRILINEAR); -} - -// ======================================================================= -// function : Graphic3d_Texture2Dmanual -// purpose : -// ======================================================================= -Graphic3d_Texture2Dmanual::Graphic3d_Texture2Dmanual (const Graphic3d_NameOfTexture2D theNOT) -: Graphic3d_Texture2D (theNOT, Graphic3d_TOT_2D_MIPMAP) -{ - myParams->SetModulate (Standard_True); - myParams->SetRepeat (Standard_True); - myParams->SetFilter (Graphic3d_TOTF_TRILINEAR); -} - -// ======================================================================= -// function : Graphic3d_Texture2Dmanual -// purpose : -// ======================================================================= -Graphic3d_Texture2Dmanual::Graphic3d_Texture2Dmanual (const Handle(Image_PixMap)& thePixMap) -: Graphic3d_Texture2D (thePixMap, Graphic3d_TOT_2D_MIPMAP) -{ - myParams->SetModulate (Standard_True); - myParams->SetRepeat (Standard_True); - myParams->SetFilter (Graphic3d_TOTF_TRILINEAR); -} diff --git a/src/Graphic3d/Graphic3d_Texture2Dmanual.hxx b/src/Graphic3d/Graphic3d_Texture2Dmanual.hxx index 4389c23dec..76c00d226e 100644 --- a/src/Graphic3d/Graphic3d_Texture2Dmanual.hxx +++ b/src/Graphic3d/Graphic3d_Texture2Dmanual.hxx @@ -20,28 +20,7 @@ #include #include -//! This class defined a manual texture 2D -//! facets MUST define texture coordinate -//! if you want to see somethings on. -class Graphic3d_Texture2Dmanual : public Graphic3d_Texture2D -{ - DEFINE_STANDARD_RTTIEXT(Graphic3d_Texture2Dmanual,Graphic3d_Texture2D) -public: - - //! Creates a texture from a file. - //! MipMaps levels will be automatically generated if needed. - Standard_EXPORT Graphic3d_Texture2Dmanual(const TCollection_AsciiString& theFileName); - - //! Creates a texture from a predefined texture name set. - //! MipMaps levels will be automatically generated if needed. - Standard_EXPORT Graphic3d_Texture2Dmanual(const Graphic3d_NameOfTexture2D theNOT); - - //! Creates a texture from the pixmap. - //! MipMaps levels will be automatically generated if needed. - Standard_EXPORT Graphic3d_Texture2Dmanual(const Handle(Image_PixMap)& thePixMap); - -}; - -DEFINE_STANDARD_HANDLE(Graphic3d_Texture2Dmanual, Graphic3d_Texture2D) +Standard_DEPRECATED ("Deprecated alias to Graphic3d_Texture2D") +typedef Graphic3d_Texture2D Graphic3d_Texture2Dmanual; #endif // _Graphic3d_Texture2Dmanual_HeaderFile diff --git a/src/Graphic3d/Graphic3d_Texture2Dplane.cxx b/src/Graphic3d/Graphic3d_Texture2Dplane.cxx index 9e599a8dee..075ed4429a 100644 --- a/src/Graphic3d/Graphic3d_Texture2Dplane.cxx +++ b/src/Graphic3d/Graphic3d_Texture2Dplane.cxx @@ -28,11 +28,8 @@ IMPLEMENT_STANDARD_RTTIEXT(Graphic3d_Texture2Dplane,Graphic3d_Texture2D) // purpose : // ======================================================================= Graphic3d_Texture2Dplane::Graphic3d_Texture2Dplane (const TCollection_AsciiString& theFileName) -: Graphic3d_Texture2D (theFileName, Graphic3d_TOT_2D_MIPMAP) +: Graphic3d_Texture2D (theFileName) { - myParams->SetModulate (Standard_True); - myParams->SetRepeat (Standard_True); - myParams->SetFilter (Graphic3d_TOTF_TRILINEAR); myParams->SetGenMode (Graphic3d_TOTM_OBJECT, Graphic3d_Vec4 (1.0f, 0.0f, 0.0f, 0.0f), Graphic3d_Vec4 (0.0f, 1.0f, 0.0f, 0.0f)); @@ -43,11 +40,8 @@ Graphic3d_Texture2Dplane::Graphic3d_Texture2Dplane (const TCollection_AsciiStrin // purpose : // ======================================================================= Graphic3d_Texture2Dplane::Graphic3d_Texture2Dplane (const Graphic3d_NameOfTexture2D theNOT) -: Graphic3d_Texture2D (theNOT, Graphic3d_TOT_2D_MIPMAP) +: Graphic3d_Texture2D (theNOT) { - myParams->SetModulate (Standard_True); - myParams->SetRepeat (Standard_True); - myParams->SetFilter (Graphic3d_TOTF_TRILINEAR); myParams->SetGenMode (Graphic3d_TOTM_OBJECT, Graphic3d_Vec4 (1.0f, 0.0f, 0.0f, 0.0f), Graphic3d_Vec4 (0.0f, 1.0f, 0.0f, 0.0f)); @@ -58,11 +52,8 @@ Graphic3d_Texture2Dplane::Graphic3d_Texture2Dplane (const Graphic3d_NameOfTextur // purpose : // ======================================================================= Graphic3d_Texture2Dplane::Graphic3d_Texture2Dplane (const Handle(Image_PixMap)& thePixMap) -: Graphic3d_Texture2D (thePixMap, Graphic3d_TOT_2D_MIPMAP) +: Graphic3d_Texture2D (thePixMap) { - myParams->SetModulate (Standard_True); - myParams->SetRepeat (Standard_True); - myParams->SetFilter (Graphic3d_TOTF_TRILINEAR); myParams->SetGenMode (Graphic3d_TOTM_OBJECT, Graphic3d_Vec4 (1.0f, 0.0f, 0.0f, 0.0f), Graphic3d_Vec4 (0.0f, 1.0f, 0.0f, 0.0f)); diff --git a/src/Graphic3d/Graphic3d_Texture3D.cxx b/src/Graphic3d/Graphic3d_Texture3D.cxx new file mode 100644 index 0000000000..f74849b164 --- /dev/null +++ b/src/Graphic3d/Graphic3d_Texture3D.cxx @@ -0,0 +1,127 @@ +// Copyright (c) 2022 OPEN CASCADE SAS +// +// This file is part of Open CASCADE Technology software library. +// +// This library is free software; you can redistribute it and/or modify it under +// the terms of the GNU Lesser General Public License version 2.1 as published +// by the Free Software Foundation, with special exception defined in the file +// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT +// distribution for complete text of the license and disclaimer of any warranty. +// +// Alternatively, this file may be used under the terms of Open CASCADE +// commercial license or contractual agreement. + +#include + +#include +#include +#include + +IMPLEMENT_STANDARD_RTTIEXT(Graphic3d_Texture3D, Graphic3d_TextureMap) + +// ======================================================================= +// function : Graphic3d_Texture3D +// purpose : +// ======================================================================= +Graphic3d_Texture3D::Graphic3d_Texture3D (const TCollection_AsciiString& theFileName) +: Graphic3d_TextureMap (theFileName, Graphic3d_TypeOfTexture_3D) +{ + myParams->SetFilter (Graphic3d_TOTF_TRILINEAR); +} + +// ======================================================================= +// function : Graphic3d_Texture3D +// purpose : +// ======================================================================= +Graphic3d_Texture3D::Graphic3d_Texture3D (const Handle(Image_PixMap)& thePixMap) +: Graphic3d_TextureMap (thePixMap, Graphic3d_TypeOfTexture_3D) +{ + myParams->SetFilter (Graphic3d_TOTF_TRILINEAR); +} + +// ======================================================================= +// function : Graphic3d_Texture3D +// purpose : +// ======================================================================= +Graphic3d_Texture3D::Graphic3d_Texture3D (const NCollection_Array1& theFiles) +: Graphic3d_TextureMap ("", Graphic3d_TypeOfTexture_3D) +{ + myParams->SetFilter (Graphic3d_TOTF_TRILINEAR); + myPaths.Resize (theFiles.Lower(), theFiles.Upper(), false); + myPaths.Assign (theFiles); +} + +// ======================================================================= +// function : ~Graphic3d_Texture3D +// purpose : +// ======================================================================= +Graphic3d_Texture3D::~Graphic3d_Texture3D() +{ + // +} + +// ======================================================================= +// function : SetImage +// purpose : +// ======================================================================= +void Graphic3d_Texture3D::SetImage (const Handle(Image_PixMap)& thePixMap) +{ + myPixMap = thePixMap; + myPath = OSD_Path(); + + NCollection_Array1 anArr; + myPaths.Move (anArr); +} + +// ======================================================================= +// function : GetImage +// purpose : +// ======================================================================= +Handle(Image_PixMap) Graphic3d_Texture3D::GetImage (const Handle(Image_SupportedFormats)& theSupported) +{ + if (myPaths.IsEmpty() + || !myPixMap.IsNull()) + { + return base_type::GetImage (theSupported); + } + + Handle(Image_PixMap) anImage3D; + const Standard_Integer aNbSlices = myPaths.Length(); + for (Standard_Integer aSlice = 0; aSlice < aNbSlices; ++aSlice) + { + const TCollection_AsciiString& aSlicePath = myPaths[myPaths.Lower() + aSlice]; + Handle(Image_AlienPixMap) anImage = new Image_AlienPixMap(); + if (!anImage->Load (aSlicePath)) + { + Message::SendFail() << "Graphic3d_Texture3D::GetImage() failed to load slice " << aSlice << " from '" << aSlicePath << "'"; + return Handle(Image_PixMap)(); + } + + convertToCompatible (theSupported, anImage); + if (anImage3D.IsNull()) + { + myIsTopDown = anImage->IsTopDown(); + anImage3D = new Image_PixMap(); + anImage3D->SetTopDown (myIsTopDown); + if (!anImage3D->InitTrash3D (anImage->Format(), + NCollection_Vec3 (anImage->SizeX(), anImage->SizeY(), aNbSlices), + anImage->SizeRowBytes())) + { + Message::SendFail() << "Graphic3d_Texture3D::GetImage() failed to allocate 3D image " << (int )anImage->SizeX() << "x" << (int )anImage->SizeY() << "x" << aNbSlices; + return Handle(Image_PixMap)(); + } + } + if (anImage->Format() != anImage3D->Format() + || anImage->SizeX() != anImage3D->SizeX() + || anImage->SizeY() != anImage3D->SizeY() + || anImage->SizeRowBytes() != anImage3D->SizeRowBytes()) + { + Message::SendFail() << "Graphic3d_Texture3D::GetImage() slice " << aSlice << " from '" << aSlicePath << "' have different dimensions"; + return Handle(Image_PixMap)(); + } + + memcpy (anImage3D->ChangeSlice (aSlice), anImage->Data(), anImage->SizeBytes()); + } + + return anImage3D; +} diff --git a/src/Graphic3d/Graphic3d_Texture3D.hxx b/src/Graphic3d/Graphic3d_Texture3D.hxx new file mode 100644 index 0000000000..51cb02eaa1 --- /dev/null +++ b/src/Graphic3d/Graphic3d_Texture3D.hxx @@ -0,0 +1,51 @@ +// Copyright (c) 2022 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 _Graphic3d_Texture3D_HeaderFile +#define _Graphic3d_Texture3D_HeaderFile + +#include +#include + +//! This abstract class for managing 3D textures. +class Graphic3d_Texture3D : public Graphic3d_TextureMap +{ + DEFINE_STANDARD_RTTIEXT(Graphic3d_Texture3D, Graphic3d_TextureMap) +public: + + //! Creates a texture from a file. + Standard_EXPORT Graphic3d_Texture3D (const TCollection_AsciiString& theFileName); + + //! Creates a texture from the pixmap. + Standard_EXPORT Graphic3d_Texture3D (const Handle(Image_PixMap)& thePixMap); + + //! Creates a texture from a file. + Standard_EXPORT Graphic3d_Texture3D (const NCollection_Array1& theFiles); + + //! Destructor. + Standard_EXPORT virtual ~Graphic3d_Texture3D(); + + //! Assign new image to the texture. + //! Note that this method does not invalidate already uploaded resources - consider calling ::UpdateRevision() if needed. + Standard_EXPORT void SetImage (const Handle(Image_PixMap)& thePixMap); + + //! Load and return image. + Standard_EXPORT virtual Handle(Image_PixMap) GetImage (const Handle(Image_SupportedFormats)& theSupported) Standard_OVERRIDE; + +protected: + + NCollection_Array1 myPaths; + +}; + +#endif // _Graphic3d_Texture3D_HeaderFile diff --git a/src/Graphic3d/Graphic3d_TextureEnv.cxx b/src/Graphic3d/Graphic3d_TextureEnv.cxx index c11f14197b..e2ac2025d5 100644 --- a/src/Graphic3d/Graphic3d_TextureEnv.cxx +++ b/src/Graphic3d/Graphic3d_TextureEnv.cxx @@ -42,9 +42,10 @@ static const char *NameOfTextureEnv_to_FileName[] = // purpose : // ======================================================================= Graphic3d_TextureEnv::Graphic3d_TextureEnv (const TCollection_AsciiString& theFileName) -: Graphic3d_TextureRoot (theFileName, Graphic3d_TOT_2D_MIPMAP), +: Graphic3d_TextureRoot (theFileName, Graphic3d_TypeOfTexture_2D), myName (Graphic3d_NOT_ENV_UNKNOWN) { + myHasMipmaps = true; myParams->SetFilter (Graphic3d_TOTF_TRILINEAR); myParams->SetGenMode (Graphic3d_TOTM_SPHERE, Graphic3d_Vec4 (1.0f, 0.0f, 0.0f, 0.0f), @@ -56,9 +57,10 @@ Graphic3d_TextureEnv::Graphic3d_TextureEnv (const TCollection_AsciiString& theFi // purpose : // ======================================================================= Graphic3d_TextureEnv::Graphic3d_TextureEnv (const Graphic3d_NameOfTextureEnv theNOT) -: Graphic3d_TextureRoot (NameOfTextureEnv_to_FileName[theNOT], Graphic3d_TOT_2D_MIPMAP), +: Graphic3d_TextureRoot (NameOfTextureEnv_to_FileName[theNOT], Graphic3d_TypeOfTexture_2D), myName (theNOT) { + myHasMipmaps = true; myPath.SetTrek (Graphic3d_TextureRoot::TexturesFolder()); myTexId = TCollection_AsciiString ("Graphic3d_TextureEnv_") + NameOfTextureEnv_to_FileName[theNOT]; @@ -74,9 +76,10 @@ Graphic3d_TextureEnv::Graphic3d_TextureEnv (const Graphic3d_NameOfTextureEnv the // purpose : // ======================================================================= Graphic3d_TextureEnv::Graphic3d_TextureEnv (const Handle(Image_PixMap)& thePixMap) -: Graphic3d_TextureRoot (thePixMap, Graphic3d_TOT_2D_MIPMAP), +: Graphic3d_TextureRoot (thePixMap, Graphic3d_TypeOfTexture_2D), myName (Graphic3d_NOT_ENV_UNKNOWN) { + myHasMipmaps = true; myParams->SetFilter (Graphic3d_TOTF_TRILINEAR); myParams->SetGenMode (Graphic3d_TOTM_SPHERE, Graphic3d_Vec4 (1.0f, 0.0f, 0.0f, 0.0f), diff --git a/src/Graphic3d/Graphic3d_TextureRoot.cxx b/src/Graphic3d/Graphic3d_TextureRoot.cxx index a89f32dabe..027a5ebe4e 100644 --- a/src/Graphic3d/Graphic3d_TextureRoot.cxx +++ b/src/Graphic3d/Graphic3d_TextureRoot.cxx @@ -92,9 +92,10 @@ Graphic3d_TextureRoot::Graphic3d_TextureRoot (const TCollection_AsciiString& the : myParams (new Graphic3d_TextureParams()), myPath (theFileName), myRevision (0), - myType (theType), + myType (theType == Graphic3d_TOT_2D_MIPMAP ? Graphic3d_TypeOfTexture_2D : theType), myIsColorMap (true), - myIsTopDown (true) + myIsTopDown (true), + myHasMipmaps (theType == Graphic3d_TOT_2D_MIPMAP) { generateId(); } @@ -108,9 +109,10 @@ Graphic3d_TextureRoot::Graphic3d_TextureRoot (const Handle(Image_PixMap)& theP : myParams (new Graphic3d_TextureParams()), myPixMap (thePixMap), myRevision (0), - myType (theType), + myType (theType == Graphic3d_TOT_2D_MIPMAP ? Graphic3d_TypeOfTexture_2D : theType), myIsColorMap (true), - myIsTopDown (true) + myIsTopDown (true), + myHasMipmaps (theType == Graphic3d_TOT_2D_MIPMAP) { generateId(); } diff --git a/src/Graphic3d/Graphic3d_TextureRoot.hxx b/src/Graphic3d/Graphic3d_TextureRoot.hxx index fb155c4268..82d8e791e2 100644 --- a/src/Graphic3d/Graphic3d_TextureRoot.hxx +++ b/src/Graphic3d/Graphic3d_TextureRoot.hxx @@ -113,6 +113,12 @@ public: //! Set flag indicating color nature of values within the texture. void SetColorMap (Standard_Boolean theIsColor) { myIsColorMap = theIsColor; } + //! Returns whether mipmaps should be generated or not. + Standard_Boolean HasMipmaps() const { return myHasMipmaps; } + + //! Sets whether to generate mipmaps or not. + void SetMipmapsGeneration (Standard_Boolean theToGenerateMipmaps) { myHasMipmaps = theToGenerateMipmaps; } + //! Returns whether row's memory layout is top-down. Standard_Boolean IsTopDown() const { return myIsTopDown; } @@ -148,7 +154,7 @@ protected: Graphic3d_TypeOfTexture myType; //!< texture type Standard_Boolean myIsColorMap; //!< flag indicating color nature of values within the texture Standard_Boolean myIsTopDown; //!< Stores rows's memory layout - + Standard_Boolean myHasMipmaps; //!< Indicates whether mipmaps should be generated or not }; diff --git a/src/Graphic3d/Graphic3d_TypeOfTexture.hxx b/src/Graphic3d/Graphic3d_TypeOfTexture.hxx index c457e94de8..180004ac30 100644 --- a/src/Graphic3d/Graphic3d_TypeOfTexture.hxx +++ b/src/Graphic3d/Graphic3d_TypeOfTexture.hxx @@ -20,10 +20,26 @@ //! Type of the texture file format. enum Graphic3d_TypeOfTexture { -Graphic3d_TOT_1D, -Graphic3d_TOT_2D, -Graphic3d_TOT_2D_MIPMAP, -Graphic3d_TOT_CUBEMAP + //! 1D texture (array). + //! Note that this texture type might be unsupported by graphics API (emulated by 2D texture with 1 pixel height). + Graphic3d_TypeOfTexture_1D, + + //! 2D texture (image plane). + Graphic3d_TypeOfTexture_2D, + + //! 3D texture (a set of image planes). + Graphic3d_TypeOfTexture_3D, + + //! Cubemap texture (6 image planes defining cube sides). + Graphic3d_TypeOfTexture_CUBEMAP, + + //! Obsolete type - Graphic3d_TextureRoot::SetMipmapsGeneration() should be used instead. + Graphic3d_TOT_2D_MIPMAP, + + // old aliases + Graphic3d_TOT_1D = Graphic3d_TypeOfTexture_1D, + Graphic3d_TOT_2D = Graphic3d_TypeOfTexture_2D, + Graphic3d_TOT_CUBEMAP = Graphic3d_TypeOfTexture_CUBEMAP }; #endif // _Graphic3d_TypeOfTexture_HeaderFile diff --git a/src/Image/Image_PixMap.cxx b/src/Image/Image_PixMap.cxx index d1ddea2237..c99971aefa 100644 --- a/src/Image/Image_PixMap.cxx +++ b/src/Image/Image_PixMap.cxx @@ -73,7 +73,8 @@ namespace }; } -IMPLEMENT_STANDARD_RTTIEXT(Image_PixMap,Standard_Transient) +IMPLEMENT_STANDARD_RTTIEXT(Image_PixMapData, NCollection_Buffer) +IMPLEMENT_STANDARD_RTTIEXT(Image_PixMap, Standard_Transient) // ======================================================================= // function : DefaultAllocator @@ -153,64 +154,101 @@ void Image_PixMap::SetFormat (Image_Format thePixelFormat) } // ======================================================================= -// function : InitWrapper +// function : InitWrapper3D // purpose : // ======================================================================= -bool Image_PixMap::InitWrapper (Image_Format thePixelFormat, - Standard_Byte* theDataPtr, - const Standard_Size theSizeX, - const Standard_Size theSizeY, - const Standard_Size theSizeRowBytes) +bool Image_PixMap::InitWrapper3D (Image_Format thePixelFormat, + Standard_Byte* theDataPtr, + const NCollection_Vec3& theSizeXYZ, + const Standard_Size theSizeRowBytes) { Clear(); myImgFormat = thePixelFormat; - if ((theSizeX == 0) || (theSizeY == 0) || (theDataPtr == NULL)) + if (theSizeXYZ.x() == 0 + || theSizeXYZ.y() == 0 + || theSizeXYZ.z() == 0 + || theDataPtr == nullptr) { return false; } Handle(NCollection_BaseAllocator) anEmptyAlloc; myData.Init (anEmptyAlloc, Image_PixMap::SizePixelBytes (thePixelFormat), - theSizeX, theSizeY, theSizeRowBytes, theDataPtr); + theSizeXYZ, theSizeRowBytes, theDataPtr); return true; } // ======================================================================= -// function : InitTrash +// function : InitWrapper // purpose : // ======================================================================= -bool Image_PixMap::InitTrash (Image_Format thePixelFormat, - const Standard_Size theSizeX, - const Standard_Size theSizeY, - const Standard_Size theSizeRowBytes) +bool Image_PixMap::InitWrapper (Image_Format thePixelFormat, + Standard_Byte* theDataPtr, + const Standard_Size theSizeX, + const Standard_Size theSizeY, + const Standard_Size theSizeRowBytes) +{ + return InitWrapper3D (thePixelFormat, theDataPtr, NCollection_Vec3 (theSizeX, theSizeY, 1), theSizeRowBytes); +} + +// ======================================================================= +// function : InitTrash3D +// purpose : +// ======================================================================= +bool Image_PixMap::InitTrash3D (Image_Format thePixelFormat, + const NCollection_Vec3& theSizeXYZ, + const Standard_Size theSizeRowBytes) { Clear(); myImgFormat = thePixelFormat; - if ((theSizeX == 0) || (theSizeY == 0)) + if (theSizeXYZ.x() == 0 + || theSizeXYZ.y() == 0 + || theSizeXYZ.z() == 0) { return false; } // use argument only if it greater - const Standard_Size aSizeRowBytes = std::max (theSizeRowBytes, theSizeX * SizePixelBytes (thePixelFormat)); + const Standard_Size aSizeRowBytes = std::max (theSizeRowBytes, theSizeXYZ.x() * SizePixelBytes (thePixelFormat)); myData.Init (DefaultAllocator(), Image_PixMap::SizePixelBytes (thePixelFormat), - theSizeX, theSizeY, aSizeRowBytes, NULL); + theSizeXYZ, aSizeRowBytes, NULL); return !myData.IsEmpty(); } // ======================================================================= -// function : InitZero +// function : InitTrash // purpose : // ======================================================================= -bool Image_PixMap::InitZero (Image_Format thePixelFormat, - const Standard_Size theSizeX, - const Standard_Size theSizeY, - const Standard_Size theSizeRowBytes, - const Standard_Byte theValue) +bool Image_PixMap::InitTrash (Image_Format thePixelFormat, + const Standard_Size theSizeX, + const Standard_Size theSizeY, + const Standard_Size theSizeRowBytes) { - if (!InitTrash (thePixelFormat, theSizeX, theSizeY, theSizeRowBytes)) + return InitTrash3D (thePixelFormat, NCollection_Vec3 (theSizeX, theSizeY, 1), theSizeRowBytes); +} + +// ======================================================================= +// function : InitZero3D +// purpose : +// ======================================================================= +bool Image_PixMap::InitZero3D (Image_Format thePixelFormat, + const NCollection_Vec3& theSizeXYZ, + const Standard_Size theSizeRowBytes, + const Standard_Byte theValue) +{ + if (theSizeXYZ.z() > 1) { - return false; + if (!InitTrash3D (thePixelFormat, theSizeXYZ, theSizeRowBytes)) + { + return false; + } + } + else + { + if (!InitTrash (thePixelFormat, theSizeXYZ.x(), theSizeXYZ.y(), theSizeRowBytes)) + { + return false; + } } memset (myData.ChangeData(), (int )theValue, SizeBytes()); return true; @@ -227,12 +265,24 @@ bool Image_PixMap::InitCopy (const Image_PixMap& theCopy) // self-copying disallowed return false; } - if (InitTrash (theCopy.myImgFormat, theCopy.SizeX(), theCopy.SizeY(), theCopy.SizeRowBytes())) + + if (theCopy.SizeZ() > 1) + { + if (!InitTrash3D (theCopy.myImgFormat, theCopy.SizeXYZ(), theCopy.SizeRowBytes())) + { + return false; + } + } + else { - memcpy (myData.ChangeData(), theCopy.myData.Data(), theCopy.SizeBytes()); - return true; + if (!InitTrash (theCopy.myImgFormat, theCopy.SizeX(), theCopy.SizeY(), theCopy.SizeRowBytes())) + { + return false; + } } - return false; + + memcpy (myData.ChangeData(), theCopy.myData.Data(), theCopy.SizeBytes()); + return true; } // ======================================================================= @@ -243,80 +293,73 @@ void Image_PixMap::Clear() { Handle(NCollection_BaseAllocator) anEmptyAlloc; myData.Init (anEmptyAlloc, Image_PixMap::SizePixelBytes (myImgFormat), - 0, 0, 0, NULL); + NCollection_Vec3 (0), 0, nullptr); } // ======================================================================= -// function : PixelColor +// function : ColorFromRawPixel // purpose : // ======================================================================= -Quantity_ColorRGBA Image_PixMap::PixelColor (const Standard_Integer theX, - const Standard_Integer theY, - const Standard_Boolean theToLinearize) const +Quantity_ColorRGBA Image_PixMap::ColorFromRawPixel (const Standard_Byte* theRawValue, + const Image_Format theFormat, + const Standard_Boolean theToLinearize) { - if (IsEmpty() - || theX < 0 || (Standard_Size )theX >= SizeX() - || theY < 0 || (Standard_Size )theY >= SizeY()) - { - return Quantity_ColorRGBA (0.0f, 0.0f, 0.0f, 0.0f); // transparent - } - - switch (myImgFormat) + switch (theFormat) { case Image_Format_GrayF: { - const Standard_ShortReal& aPixel = Value (theY, theX); + const Standard_ShortReal& aPixel = *reinterpret_cast (theRawValue); return Quantity_ColorRGBA (NCollection_Vec4 (aPixel, aPixel, aPixel, 1.0f)); // opaque } case Image_Format_AlphaF: { - const Standard_ShortReal& aPixel = Value (theY, theX); + const Standard_ShortReal& aPixel = *reinterpret_cast (theRawValue); return Quantity_ColorRGBA (NCollection_Vec4 (1.0f, 1.0f, 1.0f, aPixel)); } case Image_Format_RGF: { - const Image_ColorRGF& aPixel = Value (theY, theX); + const Image_ColorRGF& aPixel = *reinterpret_cast (theRawValue); return Quantity_ColorRGBA (NCollection_Vec4 (aPixel.r(), aPixel.g(), 0.0f, 1.0f)); } case Image_Format_RGBAF: { - const Image_ColorRGBAF& aPixel = Value (theY, theX); + const Image_ColorRGBAF& aPixel = *reinterpret_cast (theRawValue); return Quantity_ColorRGBA (NCollection_Vec4 (aPixel.r(), aPixel.g(), aPixel.b(), aPixel.a())); } case Image_Format_BGRAF: { - const Image_ColorBGRAF& aPixel = Value (theY, theX); + const Image_ColorBGRAF& aPixel = *reinterpret_cast (theRawValue); return Quantity_ColorRGBA (NCollection_Vec4 (aPixel.r(), aPixel.g(), aPixel.b(), aPixel.a())); } case Image_Format_RGBF: { - const Image_ColorRGBF& aPixel = Value (theY, theX); + const Image_ColorRGBF& aPixel = *reinterpret_cast (theRawValue); return Quantity_ColorRGBA (NCollection_Vec4 (aPixel.r(), aPixel.g(), aPixel.b(), 1.0f)); // opaque } case Image_Format_BGRF: { - const Image_ColorBGRF& aPixel = Value (theY, theX); + const Image_ColorBGRF& aPixel = *reinterpret_cast (theRawValue); return Quantity_ColorRGBA (NCollection_Vec4 (aPixel.r(), aPixel.g(), aPixel.b(), 1.0f)); // opaque } case Image_Format_GrayF_half: { - const uint16_t& aPixel = Value (theY, theX); + const uint16_t& aPixel = *reinterpret_cast (theRawValue); return Quantity_ColorRGBA (NCollection_Vec4 (ConvertFromHalfFloat (aPixel), 0.0f, 0.0f, 1.0f)); } case Image_Format_RGF_half: { - const NCollection_Vec2& aPixel = Value> (theY, theX); + const NCollection_Vec2& aPixel = *reinterpret_cast*> (theRawValue); return Quantity_ColorRGBA (NCollection_Vec4 (ConvertFromHalfFloat (aPixel.x()), ConvertFromHalfFloat (aPixel.y()), 0.0f, 1.0f)); } case Image_Format_RGBAF_half: { - const NCollection_Vec4& aPixel = Value> (theY, theX); + const NCollection_Vec4& aPixel = *reinterpret_cast*> (theRawValue); return Quantity_ColorRGBA (NCollection_Vec4 (ConvertFromHalfFloat (aPixel.r()), ConvertFromHalfFloat (aPixel.g()), ConvertFromHalfFloat (aPixel.b()), ConvertFromHalfFloat (aPixel.a()))); } case Image_Format_RGBA: { - const Image_ColorRGBA& aPixel = Value (theY, theX); + const Image_ColorRGBA& aPixel = *reinterpret_cast (theRawValue); return theToLinearize ? Quantity_ColorRGBA (Quantity_Color::Convert_sRGB_To_LinearRGB (float(aPixel.r()) / 255.0f), Quantity_Color::Convert_sRGB_To_LinearRGB (float(aPixel.g()) / 255.0f), @@ -326,7 +369,7 @@ Quantity_ColorRGBA Image_PixMap::PixelColor (const Standard_Integer theX, } case Image_Format_BGRA: { - const Image_ColorBGRA& aPixel = Value (theY, theX); + const Image_ColorBGRA& aPixel = *reinterpret_cast (theRawValue); return theToLinearize ? Quantity_ColorRGBA (Quantity_Color::Convert_sRGB_To_LinearRGB (float(aPixel.r()) / 255.0f), Quantity_Color::Convert_sRGB_To_LinearRGB (float(aPixel.g()) / 255.0f), @@ -336,7 +379,7 @@ Quantity_ColorRGBA Image_PixMap::PixelColor (const Standard_Integer theX, } case Image_Format_RGB32: { - const Image_ColorRGB32& aPixel = Value (theY, theX); + const Image_ColorRGB32& aPixel = *reinterpret_cast (theRawValue); return theToLinearize ? Quantity_ColorRGBA (Quantity_Color::Convert_sRGB_To_LinearRGB (float(aPixel.r()) / 255.0f), Quantity_Color::Convert_sRGB_To_LinearRGB (float(aPixel.g()) / 255.0f), @@ -345,7 +388,7 @@ Quantity_ColorRGBA Image_PixMap::PixelColor (const Standard_Integer theX, } case Image_Format_BGR32: { - const Image_ColorBGR32& aPixel = Value (theY, theX); + const Image_ColorBGR32& aPixel = *reinterpret_cast (theRawValue); return theToLinearize ? Quantity_ColorRGBA (Quantity_Color::Convert_sRGB_To_LinearRGB (float(aPixel.r()) / 255.0f), Quantity_Color::Convert_sRGB_To_LinearRGB (float(aPixel.g()) / 255.0f), @@ -354,7 +397,7 @@ Quantity_ColorRGBA Image_PixMap::PixelColor (const Standard_Integer theX, } case Image_Format_RGB: { - const Image_ColorRGB& aPixel = Value (theY, theX); + const Image_ColorRGB& aPixel = *reinterpret_cast (theRawValue); return theToLinearize ? Quantity_ColorRGBA (Quantity_Color::Convert_sRGB_To_LinearRGB (float(aPixel.r()) / 255.0f), Quantity_Color::Convert_sRGB_To_LinearRGB (float(aPixel.g()) / 255.0f), @@ -363,7 +406,7 @@ Quantity_ColorRGBA Image_PixMap::PixelColor (const Standard_Integer theX, } case Image_Format_BGR: { - const Image_ColorBGR& aPixel = Value (theY, theX); + const Image_ColorBGR& aPixel = *reinterpret_cast (theRawValue); return theToLinearize ? Quantity_ColorRGBA (Quantity_Color::Convert_sRGB_To_LinearRGB (float(aPixel.r()) / 255.0f), Quantity_Color::Convert_sRGB_To_LinearRGB (float(aPixel.g()) / 255.0f), @@ -372,18 +415,18 @@ Quantity_ColorRGBA Image_PixMap::PixelColor (const Standard_Integer theX, } case Image_Format_Gray: { - const Standard_Byte& aPixel = Value (theY, theX); + const Standard_Byte& aPixel = *reinterpret_cast (theRawValue); const float anIntensity = float(aPixel) / 255.0f; return Quantity_ColorRGBA (anIntensity, anIntensity, anIntensity, 1.0f); // opaque } case Image_Format_Alpha: { - const Standard_Byte& aPixel = Value (theY, theX); + const Standard_Byte& aPixel = *reinterpret_cast (theRawValue); return Quantity_ColorRGBA (1.0f, 1.0f, 1.0f, float(aPixel) / 255.0f); } case Image_Format_Gray16: { - const uint16_t& aPixel = Value (theY, theX); + const uint16_t& aPixel = *reinterpret_cast (theRawValue); const float anIntensity = float(aPixel) / 65535.0f; return Quantity_ColorRGBA (anIntensity, anIntensity, anIntensity, 1.0f); // opaque } @@ -398,44 +441,37 @@ Quantity_ColorRGBA Image_PixMap::PixelColor (const Standard_Integer theX, } // ======================================================================= -// function : SetPixelColor +// function : ColorToRawPixel // purpose : // ======================================================================= -void Image_PixMap::SetPixelColor (const Standard_Integer theX, - const Standard_Integer theY, - const Quantity_ColorRGBA& theColor, - const Standard_Boolean theToDeLinearize) +void Image_PixMap::ColorToRawPixel (Standard_Byte* theRawValue, + const Image_Format theFormat, + const Quantity_ColorRGBA& theColor, + const Standard_Boolean theToDeLinearize) { - if (IsEmpty() - || theX < 0 || Standard_Size(theX) >= SizeX() - || theY < 0 || Standard_Size(theY) >= SizeY()) - { - return; - } - const NCollection_Vec4& aColor = theColor; - switch (myImgFormat) + switch (theFormat) { case Image_Format_GrayF: { - ChangeValue (theY, theX) = aColor.r(); + *reinterpret_cast (theRawValue) = aColor.r(); return; } case Image_Format_AlphaF: { - ChangeValue (theY, theX) = aColor.a(); + *reinterpret_cast (theRawValue) = aColor.a(); return; } case Image_Format_RGF: { - Image_ColorRGF& aPixel = ChangeValue (theY, theX); + Image_ColorRGF& aPixel = *reinterpret_cast (theRawValue); aPixel.r() = aColor.r(); aPixel.g() = aColor.g(); return; } case Image_Format_RGBAF: { - Image_ColorRGBAF& aPixel = ChangeValue (theY, theX); + Image_ColorRGBAF& aPixel = *reinterpret_cast (theRawValue); aPixel.r() = aColor.r(); aPixel.g() = aColor.g(); aPixel.b() = aColor.b(); @@ -444,7 +480,7 @@ void Image_PixMap::SetPixelColor (const Standard_Integer theX, } case Image_Format_BGRAF: { - Image_ColorBGRAF& aPixel = ChangeValue (theY, theX); + Image_ColorBGRAF& aPixel = *reinterpret_cast (theRawValue); aPixel.r() = aColor.r(); aPixel.g() = aColor.g(); aPixel.b() = aColor.b(); @@ -453,7 +489,7 @@ void Image_PixMap::SetPixelColor (const Standard_Integer theX, } case Image_Format_RGBF: { - Image_ColorRGBF& aPixel = ChangeValue (theY, theX); + Image_ColorRGBF& aPixel = *reinterpret_cast (theRawValue); aPixel.r() = aColor.r(); aPixel.g() = aColor.g(); aPixel.b() = aColor.b(); @@ -461,7 +497,7 @@ void Image_PixMap::SetPixelColor (const Standard_Integer theX, } case Image_Format_BGRF: { - Image_ColorBGRF& aPixel = ChangeValue (theY, theX); + Image_ColorBGRF& aPixel = *reinterpret_cast (theRawValue); aPixel.r() = aColor.r(); aPixel.g() = aColor.g(); aPixel.b() = aColor.b(); @@ -469,20 +505,20 @@ void Image_PixMap::SetPixelColor (const Standard_Integer theX, } case Image_Format_GrayF_half: { - uint16_t& aPixel = ChangeValue (theY, theX); + uint16_t& aPixel = *reinterpret_cast (theRawValue); aPixel = ConvertToHalfFloat (aColor.r()); return; } case Image_Format_RGF_half: { - NCollection_Vec2& aPixel = ChangeValue> (theY, theX); + NCollection_Vec2& aPixel = *reinterpret_cast*> (theRawValue); aPixel.x() = ConvertToHalfFloat (aColor.r()); aPixel.y() = ConvertToHalfFloat (aColor.g()); return; } case Image_Format_RGBAF_half: { - NCollection_Vec4& aPixel = ChangeValue> (theY, theX); + NCollection_Vec4& aPixel = *reinterpret_cast*> (theRawValue); aPixel.r() = ConvertToHalfFloat (aColor.r()); aPixel.g() = ConvertToHalfFloat (aColor.g()); aPixel.b() = ConvertToHalfFloat (aColor.b()); @@ -491,7 +527,7 @@ void Image_PixMap::SetPixelColor (const Standard_Integer theX, } case Image_Format_RGBA: { - Image_ColorRGBA& aPixel = ChangeValue (theY, theX); + Image_ColorRGBA& aPixel = *reinterpret_cast (theRawValue); if (theToDeLinearize) { aPixel.r() = Standard_Byte(Quantity_Color::Convert_LinearRGB_To_sRGB (aColor.r()) * 255.0f); @@ -509,7 +545,7 @@ void Image_PixMap::SetPixelColor (const Standard_Integer theX, } case Image_Format_BGRA: { - Image_ColorBGRA& aPixel = ChangeValue (theY, theX); + Image_ColorBGRA& aPixel = *reinterpret_cast (theRawValue); if (theToDeLinearize) { aPixel.r() = Standard_Byte(Quantity_Color::Convert_LinearRGB_To_sRGB (aColor.r()) * 255.0f); @@ -527,7 +563,7 @@ void Image_PixMap::SetPixelColor (const Standard_Integer theX, } case Image_Format_RGB32: { - Image_ColorRGB32& aPixel = ChangeValue (theY, theX); + Image_ColorRGB32& aPixel = *reinterpret_cast (theRawValue); if (theToDeLinearize) { aPixel.r() = Standard_Byte(Quantity_Color::Convert_LinearRGB_To_sRGB (aColor.r()) * 255.0f); @@ -545,7 +581,7 @@ void Image_PixMap::SetPixelColor (const Standard_Integer theX, } case Image_Format_BGR32: { - Image_ColorBGR32& aPixel = ChangeValue (theY, theX); + Image_ColorBGR32& aPixel = *reinterpret_cast (theRawValue); if (theToDeLinearize) { aPixel.r() = Standard_Byte(Quantity_Color::Convert_LinearRGB_To_sRGB (aColor.r()) * 255.0f); @@ -563,7 +599,7 @@ void Image_PixMap::SetPixelColor (const Standard_Integer theX, } case Image_Format_RGB: { - Image_ColorRGB& aPixel = ChangeValue (theY, theX); + Image_ColorRGB& aPixel = *reinterpret_cast (theRawValue); if (theToDeLinearize) { aPixel.r() = Standard_Byte(Quantity_Color::Convert_LinearRGB_To_sRGB (aColor.r()) * 255.0f); @@ -580,7 +616,7 @@ void Image_PixMap::SetPixelColor (const Standard_Integer theX, } case Image_Format_BGR: { - Image_ColorBGR& aPixel = ChangeValue (theY, theX); + Image_ColorBGR& aPixel = *reinterpret_cast (theRawValue); if (theToDeLinearize) { aPixel.r() = Standard_Byte(Quantity_Color::Convert_LinearRGB_To_sRGB (aColor.r()) * 255.0f); @@ -597,17 +633,17 @@ void Image_PixMap::SetPixelColor (const Standard_Integer theX, } case Image_Format_Gray: { - ChangeValue (theY, theX) = Standard_Byte(aColor.r() * 255.0f); + *reinterpret_cast(theRawValue) = Standard_Byte(aColor.r() * 255.0f); return; } case Image_Format_Alpha: { - ChangeValue (theY, theX) = Standard_Byte(aColor.a() * 255.0f); + *reinterpret_cast(theRawValue) = Standard_Byte(aColor.a() * 255.0f); return; } case Image_Format_Gray16: { - ChangeValue (theY, theX) = uint16_t(aColor.r() * 65535.0f); + *reinterpret_cast(theRawValue) = uint16_t(aColor.r() * 65535.0f); return; } case Image_Format_UNKNOWN: @@ -632,18 +668,21 @@ bool Image_PixMap::SwapRgbaBgra (Image_PixMap& theImage) { const bool toResetAlpha = theImage.Format() == Image_Format_BGR32 || theImage.Format() == Image_Format_RGB32; - for (Standard_Size aRow = 0; aRow < theImage.SizeY(); ++aRow) + for (Standard_Size aSlice = 0; aSlice < theImage.SizeZ(); ++aSlice) { - for (Standard_Size aCol = 0; aCol < theImage.SizeX(); ++aCol) + for (Standard_Size aRow = 0; aRow < theImage.SizeY(); ++aRow) { - Image_ColorRGBA& aPixel = theImage.ChangeValue (aRow, aCol); - Image_ColorBGRA aPixelCopy = theImage.Value (aRow, aCol); - aPixel.r() = aPixelCopy.r(); - aPixel.g() = aPixelCopy.g(); - aPixel.b() = aPixelCopy.b(); - if (toResetAlpha) + for (Standard_Size aCol = 0; aCol < theImage.SizeX(); ++aCol) { - aPixel.a() = 255; + Image_ColorRGBA& aPixel = theImage.ChangeValueXYZ (aCol, aRow, aSlice); + Image_ColorBGRA aPixelCopy = theImage.ValueXYZ (aCol, aRow, aSlice); + aPixel.r() = aPixelCopy.r(); + aPixel.g() = aPixelCopy.g(); + aPixel.b() = aPixelCopy.b(); + if (toResetAlpha) + { + aPixel.a() = 255; + } } } } @@ -652,15 +691,18 @@ bool Image_PixMap::SwapRgbaBgra (Image_PixMap& theImage) case Image_Format_BGR: case Image_Format_RGB: { - for (Standard_Size aRow = 0; aRow < theImage.SizeY(); ++aRow) + for (Standard_Size aSlice = 0; aSlice < theImage.SizeZ(); ++aSlice) { - for (Standard_Size aCol = 0; aCol < theImage.SizeX(); ++aCol) + for (Standard_Size aRow = 0; aRow < theImage.SizeY(); ++aRow) { - Image_ColorRGB& aPixel = theImage.ChangeValue (aRow, aCol); - Image_ColorBGR aPixelCopy = theImage.Value (aRow, aCol); - aPixel.r() = aPixelCopy.r(); - aPixel.g() = aPixelCopy.g(); - aPixel.b() = aPixelCopy.b(); + for (Standard_Size aCol = 0; aCol < theImage.SizeX(); ++aCol) + { + Image_ColorRGB& aPixel = theImage.ChangeValueXYZ (aCol, aRow, aSlice); + Image_ColorBGR aPixelCopy = theImage.ValueXYZ (aCol, aRow, aSlice); + aPixel.r() = aPixelCopy.r(); + aPixel.g() = aPixelCopy.g(); + aPixel.b() = aPixelCopy.b(); + } } } return true; @@ -670,15 +712,18 @@ bool Image_PixMap::SwapRgbaBgra (Image_PixMap& theImage) case Image_Format_BGRAF: case Image_Format_RGBAF: { - for (Standard_Size aRow = 0; aRow < theImage.SizeY(); ++aRow) + for (Standard_Size aSlice = 0; aSlice < theImage.SizeZ(); ++aSlice) { - for (Standard_Size aCol = 0; aCol < theImage.SizeX(); ++aCol) + for (Standard_Size aRow = 0; aRow < theImage.SizeY(); ++aRow) { - Image_ColorRGBF& aPixel = theImage.ChangeValue (aRow, aCol); - Image_ColorBGRF aPixelCopy = theImage.Value (aRow, aCol); - aPixel.r() = aPixelCopy.r(); - aPixel.g() = aPixelCopy.g(); - aPixel.b() = aPixelCopy.b(); + for (Standard_Size aCol = 0; aCol < theImage.SizeX(); ++aCol) + { + Image_ColorRGBF& aPixel = theImage.ChangeValueXYZ (aCol, aRow, aSlice); + Image_ColorBGRF aPixelCopy = theImage.ValueXYZ (aCol, aRow, aSlice); + aPixel.r() = aPixelCopy.r(); + aPixel.g() = aPixelCopy.g(); + aPixel.b() = aPixelCopy.b(); + } } } return true; @@ -698,14 +743,17 @@ void Image_PixMap::ToBlackWhite (Image_PixMap& theImage) case Image_Format_Gray: case Image_Format_Alpha: { - for (Standard_Size aRow = 0; aRow < theImage.SizeY(); ++aRow) + for (Standard_Size aSlice = 0; aSlice < theImage.SizeZ(); ++aSlice) { - for (Standard_Size aCol = 0; aCol < theImage.SizeX(); ++aCol) + for (Standard_Size aRow = 0; aRow < theImage.SizeY(); ++aRow) { - unsigned char& aPixel = theImage.ChangeValue (aRow, aCol); - if (aPixel != 0) + for (Standard_Size aCol = 0; aCol < theImage.SizeX(); ++aCol) { - aPixel = 255; + uint8_t& aPixel = theImage.ChangeValueXYZ (aCol, aRow, aSlice); + if (aPixel != 0) + { + aPixel = 255; + } } } } @@ -713,14 +761,17 @@ void Image_PixMap::ToBlackWhite (Image_PixMap& theImage) } case Image_Format_Gray16: { - for (Standard_Size aRow = 0; aRow < theImage.SizeY(); ++aRow) + for (Standard_Size aSlice = 0; aSlice < theImage.SizeZ(); ++aSlice) { - for (Standard_Size aCol = 0; aCol < theImage.SizeX(); ++aCol) + for (Standard_Size aRow = 0; aRow < theImage.SizeY(); ++aRow) { - uint16_t& aPixel = theImage.ChangeValue (aRow, aCol); - if (aPixel != 0) + for (Standard_Size aCol = 0; aCol < theImage.SizeX(); ++aCol) { - aPixel = 65535; + uint16_t& aPixel = theImage.ChangeValueXYZ (aCol, aRow, aSlice); + if (aPixel != 0) + { + aPixel = 65535; + } } } } @@ -733,17 +784,20 @@ void Image_PixMap::ToBlackWhite (Image_PixMap& theImage) case Image_Format_RGBA: case Image_Format_BGRA: { - const NCollection_Vec3 aWhite24 (255, 255, 255); - for (Standard_Size aRow = 0; aRow < theImage.SizeY(); ++aRow) + const NCollection_Vec3 aWhite24 (255, 255, 255); + for (Standard_Size aSlice = 0; aSlice < theImage.SizeZ(); ++aSlice) { - for (Standard_Size aCol = 0; aCol < theImage.SizeX(); ++aCol) + for (Standard_Size aRow = 0; aRow < theImage.SizeY(); ++aRow) { - NCollection_Vec3& aPixel = theImage.ChangeValue< NCollection_Vec3 > (aRow, aCol); - if (aPixel[0] != 0 - || aPixel[1] != 0 - || aPixel[2] != 0) + for (Standard_Size aCol = 0; aCol < theImage.SizeX(); ++aCol) { - aPixel = aWhite24; + NCollection_Vec3& aPixel = theImage.ChangeValueXYZ< NCollection_Vec3 > (aCol, aRow, aSlice); + if (aPixel[0] != 0 + || aPixel[1] != 0 + || aPixel[2] != 0) + { + aPixel = aWhite24; + } } } } @@ -752,17 +806,21 @@ void Image_PixMap::ToBlackWhite (Image_PixMap& theImage) default: { const Quantity_ColorRGBA aWhiteRgba (1.0f, 1.0f, 1.0f, 1.0f); - for (Standard_Size aRow = 0; aRow < theImage.SizeY(); ++aRow) + for (Standard_Size aSlice = 0; aSlice < theImage.SizeZ(); ++aSlice) { - for (Standard_Size aCol = 0; aCol < theImage.SizeX(); ++aCol) + for (Standard_Size aRow = 0; aRow < theImage.SizeY(); ++aRow) { - const Quantity_ColorRGBA aPixelRgba = theImage.PixelColor (Standard_Integer(aCol), Standard_Integer(aRow)); - const NCollection_Vec4& aPixel = aPixelRgba; - if (aPixel[0] != 0.0f - || aPixel[1] != 0.0f - || aPixel[2] != 0.0f) + for (Standard_Size aCol = 0; aCol < theImage.SizeX(); ++aCol) { - theImage.SetPixelColor (int(aCol), int(aRow), aWhiteRgba); + Standard_Byte* aRawPixel = theImage.ChangeRawValueXYZ (aCol, aRow, aSlice); + const Quantity_ColorRGBA aPixelRgba = ColorFromRawPixel (aRawPixel, theImage.Format()); + const NCollection_Vec4& aPixel = aPixelRgba; + if (aPixel[0] != 0.0f + || aPixel[1] != 0.0f + || aPixel[2] != 0.0f) + { + ColorToRawPixel (aRawPixel, theImage.Format(), aWhiteRgba); + } } } } @@ -772,7 +830,7 @@ void Image_PixMap::ToBlackWhite (Image_PixMap& theImage) } // ======================================================================= -// function : InitCopy +// function : FlipY // purpose : // ======================================================================= bool Image_PixMap::FlipY (Image_PixMap& theImage) @@ -793,13 +851,16 @@ bool Image_PixMap::FlipY (Image_PixMap& theImage) // for odd height middle row should be left as is Standard_Size aNbRowsHalf = theImage.SizeY() / 2; - for (Standard_Size aRowT = 0, aRowB = theImage.SizeY() - 1; aRowT < aNbRowsHalf; ++aRowT, --aRowB) + for (Standard_Size aSlice = 0; aSlice < theImage.SizeZ(); ++aSlice) { - Standard_Byte* aTop = theImage.ChangeRow (aRowT); - Standard_Byte* aBot = theImage.ChangeRow (aRowB); - memcpy (aTmp.ChangeData(), aTop, aRowSize); - memcpy (aTop, aBot, aRowSize); - memcpy (aBot, aTmp.Data(), aRowSize); + for (Standard_Size aRowT = 0, aRowB = theImage.SizeY() - 1; aRowT < aNbRowsHalf; ++aRowT, --aRowB) + { + Standard_Byte* aTop = theImage.ChangeSliceRow (aSlice, aRowT); + Standard_Byte* aBot = theImage.ChangeSliceRow (aSlice, aRowB); + memcpy (aTmp.ChangeData(), aTop, aRowSize); + memcpy (aTop, aBot, aRowSize); + memcpy (aBot, aTmp.Data(), aRowSize); + } } return true; } diff --git a/src/Image/Image_PixMap.hxx b/src/Image/Image_PixMap.hxx index 46e0dd2f7b..b4bef537b0 100644 --- a/src/Image/Image_PixMap.hxx +++ b/src/Image/Image_PixMap.hxx @@ -35,6 +35,9 @@ public: return !aUnion.myChar[0]; } + //! Return bytes reserved for one pixel (may include extra bytes for alignment). + Standard_EXPORT static Standard_Size SizePixelBytes (const Image_Format thePixelFormat); + //! Auxiliary method for swapping bytes between RGB and BGR formats. //! This method modifies the image data but does not change pixel format! //! Method will fail if pixel format is not one of the following: @@ -60,6 +63,25 @@ public: //! Return string representation of compressed pixel format. Standard_EXPORT static Standard_CString ImageFormatToString (Image_CompressedFormat theFormat); + //! Convert raw pixel value into Quantity_ColorRGBA. This function is relatively slow. + //! @param[in] theRawValue pointer to pixel definition + //! @param[in] theFormat pixel format + //! @param[in] theToLinearize when TRUE, the color stored in non-linear color space (e.g. Image_Format_RGB) will be linearized + //! @return the pixel color + Standard_EXPORT static Quantity_ColorRGBA ColorFromRawPixel (const Standard_Byte* theRawValue, + const Image_Format theFormat, + const Standard_Boolean theToLinearize = false); + + //! Set raw pixel value from Quantity_ColorRGBA. This function is relatively slow. + //! @param[out] theRawValue pointer to pixel definition to modify + //! @param[in] theFormat pixel format + //! @param[in] theColor color value to convert from + //! @param[in] theToDeLinearize when TRUE, the gamma correction will be applied for storing in non-linear color space (e.g. Image_Format_RGB) + Standard_EXPORT static void ColorToRawPixel (Standard_Byte* theRawValue, + const Image_Format theFormat, + const Quantity_ColorRGBA& theColor, + const Standard_Boolean theToDeLinearize = false); + public: // high-level API //! Return pixel format. @@ -71,18 +93,30 @@ public: // high-level API //! (e.g. ImgGray and ImgAlpha). Standard_EXPORT void SetFormat (const Image_Format thePixelFormat); - //! Return image width in pixels + //! Return image width in pixels. Standard_Size Width() const { return myData.SizeX; } - //! Return image height in pixels + //! Return image height in pixels. Standard_Size Height() const { return myData.SizeY; } - //! Return image width in pixels + //! Return image depth in pixels. + Standard_Size Depth() const { return myData.SizeZ; } + + //! Return image width in pixels. Standard_Size SizeX() const { return myData.SizeX; } - //! Return image height in pixels + //! Return image height in pixels. Standard_Size SizeY() const { return myData.SizeY; } + //! Return image depth in pixels. + Standard_Size SizeZ() const { return myData.SizeZ; } + + //! Return image width x height x depth in pixels. + NCollection_Vec3 SizeXYZ() const + { + return NCollection_Vec3 (myData.SizeX, myData.SizeY, myData.SizeZ); + } + //! Return width / height. Standard_Real Ratio() const { @@ -100,38 +134,60 @@ public: // high-level API //! Returns the pixel color. This function is relatively slow. //! Beware that this method takes coordinates in opposite order in contrast to ::Value() and ::ChangeValue(). - //! @param theX [in] column index from left - //! @param theY [in] row index from top - //! @param theToLinearize [in] when TRUE, the color stored in non-linear color space (e.g. Image_Format_RGB) will be linearized + //! @param[in] theX column index from left, starting from 0 + //! @param[in] theY row index from top, starting from 0 + //! @param[in] theToLinearize when TRUE, the color stored in non-linear color space (e.g. Image_Format_RGB) will be linearized //! @return the pixel color - Standard_EXPORT Quantity_ColorRGBA PixelColor (const Standard_Integer theX, - const Standard_Integer theY, - const Standard_Boolean theToLinearize = Standard_False) const; + Quantity_ColorRGBA PixelColor (Standard_Integer theX, + Standard_Integer theY, + Standard_Boolean theToLinearize = false) const + { + if (IsEmpty() + || theX < 0 || (Standard_Size )theX >= SizeX() + || theY < 0 || (Standard_Size )theY >= SizeY()) + { + return Quantity_ColorRGBA (0.0f, 0.0f, 0.0f, 0.0f); // transparent + } + + const Standard_Byte* aRawPixel = RawValueXY (theX, theY); + return ColorFromRawPixel (aRawPixel, myImgFormat, theToLinearize); + } //! Sets the pixel color. This function is relatively slow. //! Beware that this method takes coordinates in opposite order in contrast to ::Value() and ::ChangeValue(). - //! @param theX [in] column index from left - //! @param theY [in] row index from top - //! @param theColor [in] color to store - //! @param theToDeLinearize [in] when TRUE, the gamma correction will be applied for storing in non-linear color space (e.g. Image_Format_RGB) + //! @param[in] theX column index from left + //! @param[in] theY row index from top + //! @param[in] theColor color to store + //! @param[in] theToDeLinearize when TRUE, the gamma correction will be applied for storing in non-linear color space (e.g. Image_Format_RGB) void SetPixelColor (const Standard_Integer theX, const Standard_Integer theY, const Quantity_Color& theColor, - const Standard_Boolean theToDeLinearize = Standard_False) + const Standard_Boolean theToDeLinearize = false) { SetPixelColor (theX, theY, Quantity_ColorRGBA (theColor, 1.0f), theToDeLinearize); } //! Sets the pixel color. This function is relatively slow. //! Beware that this method takes coordinates in opposite order in contrast to ::Value() and ::ChangeValue(). - //! @param theX [in] column index from left - //! @param theY [in] row index from top - //! @param theColor [in] color to store - //! @param theToDeLinearize [in] when TRUE, the gamma correction will be applied for storing in non-linear color space (e.g. Image_Format_RGB) - Standard_EXPORT void SetPixelColor (const Standard_Integer theX, - const Standard_Integer theY, - const Quantity_ColorRGBA& theColor, - const Standard_Boolean theToDeLinearize = Standard_False); + //! @param[in] theX column index from left + //! @param[in] theY row index from top + //! @param[in] theColor color to store + //! @param[in] theToDeLinearize when TRUE, the gamma correction will be applied for storing in non-linear color space (e.g. Image_Format_RGB) + void SetPixelColor (const Standard_Integer theX, + const Standard_Integer theY, + const Quantity_ColorRGBA& theColor, + const Standard_Boolean theToDeLinearize = false) + { + if (IsEmpty() + || theX < 0 || Standard_Size(theX) >= SizeX() + || theY < 0 || Standard_Size(theY) >= SizeY()) + { + return; + } + + Standard_Byte* aRawPixel = ChangeRawValueXY (theX, theY); + ColorToRawPixel (aRawPixel, myImgFormat, theColor, theToDeLinearize); + } //! Initialize image plane as wrapper over alien data. //! Data will not be copied! Notice that caller should ensure @@ -156,15 +212,42 @@ public: // high-level API //! Initialize image plane with required dimensions. //! Buffer will be zeroed (black color for most formats). - Standard_EXPORT bool InitZero (Image_Format thePixelFormat, - const Standard_Size theSizeX, - const Standard_Size theSizeY, - const Standard_Size theSizeRowBytes = 0, - const Standard_Byte theValue = 0); + bool InitZero (Image_Format thePixelFormat, + const Standard_Size theSizeX, + const Standard_Size theSizeY, + const Standard_Size theSizeRowBytes = 0, + const Standard_Byte theValue = 0) + { + return InitZero3D (thePixelFormat, NCollection_Vec3 (theSizeX, theSizeY, 1), theSizeRowBytes, theValue); + } //! Method correctly deallocate internal buffer. Standard_EXPORT virtual void Clear(); +public: + + //! Initialize 2D/3D image as wrapper over alien data. + //! Data will not be copied! Notice that caller should ensure + //! that data pointer will not be released during this wrapper lifetime. + //! You may call InitCopy() to perform data copying. + Standard_EXPORT virtual bool InitWrapper3D (Image_Format thePixelFormat, + Standard_Byte* theDataPtr, + const NCollection_Vec3& theSizeXYZ, + const Standard_Size theSizeRowBytes = 0); + + //! Initialize 2D/3D image with required dimensions. + //! Memory will be left uninitialized (performance trick). + Standard_EXPORT virtual bool InitTrash3D (Image_Format thePixelFormat, + const NCollection_Vec3& theSizeXYZ, + const Standard_Size theSizeRowBytes = 0); + + //! Initialize 2D/3D image with required dimensions. + //! Buffer will be zeroed (black color for most formats). + Standard_EXPORT bool InitZero3D (Image_Format thePixelFormat, + const NCollection_Vec3& theSizeXYZ, + const Standard_Size theSizeRowBytes = 0, + const Standard_Byte theValue = 0); + public: //! @name low-level API for batch-processing (pixels reading / comparison / modification) //! Returns TRUE if image data is stored from Top to the Down. @@ -176,117 +259,210 @@ public: //! @name low-level API for batch-processing (pixels reading / compariso //! convert input row-index to apply this flag! //! You should use this flag only if interconnect with alien APIs and buffers. //! @return true if image data is top-down - inline bool IsTopDown() const - { - return myData.TopToDown == 1; - } + bool IsTopDown() const { return myData.TopToDown == 1; } //! Setup scanlines order in memory - top-down or bottom-up. //! Drawers should explicitly specify this value if current state IsTopDown() was ignored! //! @param theIsTopDown top-down flag - inline void SetTopDown (const bool theIsTopDown) - { - myData.SetTopDown (theIsTopDown); - } + void SetTopDown (const bool theIsTopDown) { myData.SetTopDown (theIsTopDown); } //! Returns +1 if scanlines ordered in Top->Down order in memory and -1 otherwise. //! @return scanline increment for Top->Down iteration - inline Standard_Size TopDownInc() const + Standard_Size TopDownInc() const { return myData.TopToDown; } + + //! Return data pointer for low-level operations (copying entire buffer, parsing with extra tools etc.). + const Standard_Byte* Data() const { return myData.Data(); } + + //! Return data pointer for low-level operations (copying entire buffer, parsing with extra tools etc.). + Standard_Byte* ChangeData() { return myData.ChangeData(); } + + //! Return data pointer to requested row (first column). + //! Indexation starts from 0. + const Standard_Byte* Row (Standard_Size theRow) const { return myData.Row (theRow); } + + //! Return data pointer to requested row (first column). + //! Indexation starts from 0. + Standard_Byte* ChangeRow (Standard_Size theRow) { return myData.ChangeRow (theRow); } + + //! Return data pointer to requested 2D slice. + //! Indexation starts from 0. + const Standard_Byte* Slice (Standard_Size theSlice) const { return myData.Slice (theSlice); } + + //! Return data pointer to requested 2D slice. + //! Indexation starts from 0. + Standard_Byte* ChangeSlice (Standard_Size theSlice) { return myData.ChangeSlice (theSlice); } + + //! Return data pointer to requested row (first column). + //! Indexation starts from 0. + const Standard_Byte* SliceRow (Standard_Size theSlice, + Standard_Size theRow) const { - return myData.TopToDown; + return myData.SliceRow (theSlice, theRow); } - //! @return data pointer for low-level operations (copying entire buffer, parsing with extra tools etc.). - inline const Standard_Byte* Data() const + //! Return data pointer to requested row (first column). + //! Indexation starts from 0. + Standard_Byte* ChangeSliceRow (Standard_Size theSlice, + Standard_Size theRow) { - return myData.Data(); + return myData.ChangeSliceRow (theSlice, theRow); } - //! @return data pointer for low-level operations (copying entire buffer, parsing with extra tools etc.). - inline Standard_Byte* ChangeData() + //! Return bytes reserved for one pixel (may include extra bytes for alignment). + Standard_Size SizePixelBytes() const { return myData.SizeBPP; } + + //! Return bytes reserved per row. + //! Could be larger than needed to store packed row (extra bytes for alignment etc.). + Standard_Size SizeRowBytes() const { return myData.SizeRowBytes; } + + //! Return the extra bytes in the row. + Standard_Size RowExtraBytes() const { - return myData.ChangeData(); + return SizeRowBytes() - SizeX() * SizePixelBytes(); } - //! @return data pointer to requested row (first column). - inline const Standard_Byte* Row (const Standard_Size theRow) const + //! Compute the maximal row alignment for current row size. + //! @return maximal row alignment in bytes (up to 16 bytes). + Standard_Size MaxRowAligmentBytes() const { return myData.MaxRowAligmentBytes(); } + + //! Return number of bytes per 2D slice. + Standard_Size SizeSliceBytes() const { return myData.SizeSliceBytes; } + + //! Return buffer size + Standard_Size SizeBytes() const { return myData.Size(); } + +public: + + //! Access image pixel with specified color type. + //! Indexation starts from 0. + //! This method does not perform any type checks - use on own risk (check Format() before)! + //! WARNING: Input parameters are defined in the decreasing majority following memory layout - e.g. row first, column next. + template + const ColorType_t& Value (Standard_Size theRow, + Standard_Size theCol) const { - return myData.Row (theRow); + return *reinterpret_cast(myData.Value (theRow, theCol)); } - //! @return data pointer to requested row (first column). - inline Standard_Byte* ChangeRow (const Standard_Size theRow) + //! Access image pixel with specified color type. + //! Indexation starts from 0. + //! This method does not perform any type checks - use on own risk (check Format() before)! + //! WARNING: Input parameters are defined in the decreasing majority following memory layout - e.g. row first, column next. + template + ColorType_t& ChangeValue (Standard_Size theRow, + Standard_Size theCol) { - return myData.ChangeRow (theRow); + return *reinterpret_cast(myData.ChangeValue (theRow, theCol)); } - //! @return bytes reserved for one pixel (may include extra bytes for alignment). - inline Standard_Size SizePixelBytes() const + //! Access image pixel as raw data pointer. + //! Indexation starts from 0. + //! This method does not perform any type checks - use on own risk (check Format() before)! + //! WARNING: Input parameters are defined in the decreasing majority following memory layout - e.g. row first, column next. + const Standard_Byte* RawValue (Standard_Size theRow, + Standard_Size theCol) const { - return myData.SizeBPP; + return myData.Value (theRow, theCol); } - //! @return bytes reserved for one pixel (may include extra bytes for alignment). - Standard_EXPORT static Standard_Size SizePixelBytes (const Image_Format thePixelFormat); + //! Access image pixel as raw data pointer. + //! Indexation starts from 0. + //! This method does not perform any type checks - use on own risk (check Format() before)! + //! WARNING: Input parameters are defined in the decreasing majority following memory layout - e.g. row first, column next. + Standard_Byte* ChangeRawValue (Standard_Size theRow, + Standard_Size theCol) + { + return myData.ChangeValue (theRow, theCol); + } - //! @return bytes reserved per row. - //! Could be larger than needed to store packed row (extra bytes for alignment etc.). - inline Standard_Size SizeRowBytes() const + //! Access image pixel with specified color type. + //! Indexation starts from 0. + //! This method does not perform any type checks - use on own risk (check Format() before)! + //! WARNING: Input parameters are defined in traditional X, Y order. + template + const ColorType_t& ValueXY (Standard_Size theX, + Standard_Size theY) const { - return myData.SizeRowBytes; + return *reinterpret_cast(myData.ValueXY (theX, theY)); } - //! @return the extra bytes in the row. - inline Standard_Size RowExtraBytes() const + //! Access image pixel with specified color type. + //! Indexation starts from 0. + //! This method does not perform any type checks - use on own risk (check Format() before)! + //! WARNING: Input parameters are defined in traditional X, Y order. + template + ColorType_t& ChangeValueXY (Standard_Size theX, + Standard_Size theY) { - return SizeRowBytes() - SizeX() * SizePixelBytes(); + return *reinterpret_cast(myData.ChangeValueXY (theX, theY)); } - //! Compute the maximal row alignment for current row size. - //! @return maximal row alignment in bytes (up to 16 bytes). - inline Standard_Size MaxRowAligmentBytes() const + //! Access image pixel as raw data pointer. + //! Indexation starts from 0. + //! This method does not perform any type checks - use on own risk (check Format() before)! + //! WARNING: Input parameters are defined in traditional X, Y order. + const Standard_Byte* RawValueXY (Standard_Size theX, + Standard_Size theY) const { - return myData.MaxRowAligmentBytes(); + return myData.ValueXY (theX, theY); } - //! @return buffer size - inline Standard_Size SizeBytes() const + //! Access image pixel as raw data pointer. + //! Indexation starts from 0. + //! This method does not perform any type checks - use on own risk (check Format() before)! + //! WARNING: Input parameters are defined in traditional X, Y order. + Standard_Byte* ChangeRawValueXY (Standard_Size theX, + Standard_Size theY) { - return myData.Size(); + return myData.ChangeValueXY (theX, theY); } +public: + //! Access image pixel with specified color type. + //! Indexation starts from 0. //! This method does not perform any type checks - use on own risk (check Format() before)! + //! WARNING: Input parameters are defined in traditional X, Y, Z order. template - inline const ColorType_t& Value (const Standard_Size theRow, - const Standard_Size theCol) const + const ColorType_t& ValueXYZ (Standard_Size theX, + Standard_Size theY, + Standard_Size theZ) const { - return *reinterpret_cast(myData.Value (theRow, theCol)); + return *reinterpret_cast(myData.ValueXYZ (theX, theY, theZ)); } //! Access image pixel with specified color type. + //! Indexation starts from 0. //! This method does not perform any type checks - use on own risk (check Format() before)! + //! WARNING: Input parameters are defined in traditional X, Y, Z order. template - inline ColorType_t& ChangeValue (const Standard_Size theRow, - const Standard_Size theCol) + ColorType_t& ChangeValueXYZ (Standard_Size theX, + Standard_Size theY, + Standard_Size theZ) { - return *reinterpret_cast(myData.ChangeValue (theRow, theCol)); + return *reinterpret_cast(myData.ChangeValueXYZ (theX, theY, theZ)); } //! Access image pixel as raw data pointer. + //! Indexation starts from 0. //! This method does not perform any type checks - use on own risk (check Format() before)! - const Standard_Byte* RawValue (Standard_Size theRow, - Standard_Size theCol) const + //! WARNING: Input parameters are defined in traditional X, Y, Z order. + const Standard_Byte* RawValueXYZ (Standard_Size theX, + Standard_Size theY, + Standard_Size theZ) const { - return myData.Value (theRow, theCol); + return myData.ValueXYZ (theX, theY, theZ); } //! Access image pixel as raw data pointer. + //! Indexation starts from 0. //! This method does not perform any type checks - use on own risk (check Format() before)! - Standard_Byte* ChangeRawValue (Standard_Size theRow, - Standard_Size theCol) + //! WARNING: Input parameters are defined in traditional X, Y, Z order. + Standard_Byte* ChangeRawValueXYZ (Standard_Size theX, + Standard_Size theY, + Standard_Size theZ) { - return myData.ChangeValue (theRow, theCol); + return myData.ChangeValueXYZ (theX, theY, theZ); } public: diff --git a/src/Image/Image_PixMapData.hxx b/src/Image/Image_PixMapData.hxx index b9050be1ed..fb78060a73 100644 --- a/src/Image/Image_PixMapData.hxx +++ b/src/Image/Image_PixMapData.hxx @@ -18,6 +18,7 @@ #include #include +#include //! Structure to manage image buffer. class Image_PixMapData : public NCollection_Buffer @@ -31,7 +32,9 @@ public: SizeBPP (0), SizeX (0), SizeY (0), + SizeZ (0), SizeRowBytes (0), + SizeSliceBytes (0), TopToDown (Standard_Size(-1)) { // @@ -44,16 +47,28 @@ public: const Standard_Size theSizeY, const Standard_Size theSizeRowBytes, Standard_Byte* theDataPtr) + { + return Init (theAlloc, theSizeBPP, NCollection_Vec3 (theSizeX, theSizeY, 1), theSizeRowBytes, theDataPtr); + } + + //! Initializer. + bool Init (const Handle(NCollection_BaseAllocator)& theAlloc, + const Standard_Size theSizeBPP, + const NCollection_Vec3& theSizeXYZ, + const Standard_Size theSizeRowBytes, + Standard_Byte* theDataPtr) { SetAllocator (theAlloc); // will free old data as well myData = theDataPtr; myTopRowPtr = NULL; SizeBPP = theSizeBPP; - SizeX = theSizeX; - SizeY = theSizeY; - SizeRowBytes = theSizeRowBytes != 0 ? theSizeRowBytes : (theSizeX * theSizeBPP); - mySize = SizeRowBytes * SizeY; + SizeX = theSizeXYZ.x(); + SizeY = theSizeXYZ.y(); + SizeZ = theSizeXYZ.z(); + SizeRowBytes = theSizeRowBytes != 0 ? theSizeRowBytes : (SizeX * theSizeBPP); + SizeSliceBytes = SizeRowBytes * SizeY; + mySize = SizeSliceBytes * SizeZ; if (myData == NULL) { Allocate (mySize); @@ -71,35 +86,93 @@ public: } } - //! @return data pointer to requested row (first column). - inline const Standard_Byte* Row (const Standard_Size theRow) const + //! Return data pointer to requested row (first column). + const Standard_Byte* Row (const Standard_Size theRow) const { return myTopRowPtr + ptrdiff_t(SizeRowBytes * theRow * TopToDown); } - //! @return data pointer to requested row (first column). - inline Standard_Byte* ChangeRow (const Standard_Size theRow) + //! Return data pointer to requested row (first column). + Standard_Byte* ChangeRow (const Standard_Size theRow) { return myTopRowPtr + ptrdiff_t(SizeRowBytes * theRow * TopToDown); } - //! @return data pointer to requested position. - inline const Standard_Byte* Value (const Standard_Size theRow, - const Standard_Size theCol) const + //! Return data pointer to requested position. + const Standard_Byte* Value (const Standard_Size theRow, + const Standard_Size theCol) const { return myTopRowPtr + ptrdiff_t(SizeRowBytes * theRow * TopToDown) + SizeBPP * theCol; } - //! @return data pointer to requested position. - inline Standard_Byte* ChangeValue (const Standard_Size theRow, - const Standard_Size theCol) + //! Return data pointer to requested position. + Standard_Byte* ChangeValue (Standard_Size theRow, + Standard_Size theCol) { return myTopRowPtr + ptrdiff_t(SizeRowBytes * theRow * TopToDown) + SizeBPP * theCol; } + //! Return data pointer to requested position. + const Standard_Byte* ValueXY (Standard_Size theX, + Standard_Size theY) const + { + return myTopRowPtr + ptrdiff_t(SizeRowBytes * theY * TopToDown) + SizeBPP * theX; + } + + //! Return data pointer to requested position. + Standard_Byte* ChangeValueXY (Standard_Size theX, + Standard_Size theY) + { + return myTopRowPtr + ptrdiff_t(SizeRowBytes * theY * TopToDown) + SizeBPP * theX; + } + +public: + + //! Return data pointer to requested 2D slice. + const Standard_Byte* Slice (Standard_Size theSlice) const + { + return myData + ptrdiff_t(SizeSliceBytes * theSlice); + } + + //! Return data pointer to requested 2D slice. + Standard_Byte* ChangeSlice (Standard_Size theSlice) + { + return myData + ptrdiff_t(SizeSliceBytes * theSlice); + } + + //! Return data pointer to requested row (first column). + const Standard_Byte* SliceRow (Standard_Size theSlice, + Standard_Size theRow) const + { + return myTopRowPtr + ptrdiff_t(SizeRowBytes * theRow * TopToDown) + ptrdiff_t(SizeSliceBytes * theSlice); + } + + //! Return data pointer to requested row (first column). + Standard_Byte* ChangeSliceRow (Standard_Size theSlice, + Standard_Size theRow) + { + return myTopRowPtr + ptrdiff_t(SizeRowBytes * theRow * TopToDown) + ptrdiff_t(SizeSliceBytes * theSlice); + } + + //! Return data pointer to requested position. + const Standard_Byte* ValueXYZ (Standard_Size theX, + Standard_Size theY, + Standard_Size theZ) const + { + return myTopRowPtr + ptrdiff_t(SizeRowBytes * theY * TopToDown) + SizeBPP * theX + ptrdiff_t(SizeSliceBytes * theZ); + } + + //! Return data pointer to requested position. + Standard_Byte* ChangeValueXYZ (Standard_Size theX, + Standard_Size theY, + Standard_Size theZ) + { + return myTopRowPtr + ptrdiff_t(SizeRowBytes * theY * TopToDown) + SizeBPP * theX + ptrdiff_t(SizeSliceBytes * theZ); + } + //! Compute the maximal row alignment for current row size. //! @return maximal row alignment in bytes (up to 16 bytes). - inline Standard_Size MaxRowAligmentBytes() const + Standard_Size MaxRowAligmentBytes() const { Standard_Size anAlignment = 2; for (; anAlignment <= 16; anAlignment <<= 1) @@ -115,7 +188,7 @@ public: //! Setup scanlines order in memory - top-down or bottom-up. //! Drawers should explicitly specify this value if current state IsTopDown() was ignored! //! @param theIsTopDown top-down flag - inline void SetTopDown (const bool theIsTopDown) + void SetTopDown (const bool theIsTopDown) { TopToDown = (theIsTopDown ? 1 : Standard_Size(-1)); myTopRowPtr = ((TopToDown == 1 || myData == NULL) @@ -128,16 +201,17 @@ protected: public: - Standard_Size SizeBPP; //!< bytes per pixel - Standard_Size SizeX; //!< width in pixels - Standard_Size SizeY; //!< height in pixels - Standard_Size SizeRowBytes; //!< number of bytes per line (in most cases equal to 3 * sizeX) - Standard_Size TopToDown; //!< image scanlines direction in memory from Top to the Down - + Standard_Size SizeBPP; //!< bytes per pixel + Standard_Size SizeX; //!< width in pixels + Standard_Size SizeY; //!< height in pixels + Standard_Size SizeZ; //!< depth in pixels + Standard_Size SizeRowBytes; //!< number of bytes per line (in most cases equal to 3 * sizeX) + Standard_Size SizeSliceBytes; //!< number of bytes per 2D slice + Standard_Size TopToDown; //!< image scanlines direction in memory from Top to the Down public: - DEFINE_STANDARD_RTTI_INLINE(Image_PixMapData,NCollection_Buffer) // Type definition + DEFINE_STANDARD_RTTIEXT(Image_PixMapData, NCollection_Buffer) }; diff --git a/src/MeshVS/MeshVS_NodalColorPrsBuilder.cxx b/src/MeshVS/MeshVS_NodalColorPrsBuilder.cxx index 328a32d0c7..6fdac7b109 100644 --- a/src/MeshVS/MeshVS_NodalColorPrsBuilder.cxx +++ b/src/MeshVS/MeshVS_NodalColorPrsBuilder.cxx @@ -70,9 +70,10 @@ class MeshVS_ImageTexture2D : public Graphic3d_Texture2D { public: - MeshVS_ImageTexture2D (const Handle(Image_PixMap)& theImg) : Graphic3d_Texture2D (theImg, Graphic3d_TOT_2D) + MeshVS_ImageTexture2D (const Handle(Image_PixMap)& theImg) + : Graphic3d_Texture2D (theImg, Graphic3d_TypeOfTexture_2D) { - myParams->SetModulate (Standard_True); + myParams->SetModulate (true); myParams->SetFilter (Graphic3d_TOTF_BILINEAR); } @@ -81,9 +82,6 @@ class MeshVS_ImageTexture2D : public Graphic3d_Texture2D DEFINE_STANDARD_RTTI_INLINE(MeshVS_ImageTexture2D,Graphic3d_Texture2D) }; -DEFINE_STANDARD_HANDLE (MeshVS_ImageTexture2D, Graphic3d_Texture2D) - - //================================================================ // Function : getNearestPow2 // Purpose : Returns the nearest power of two greater than the diff --git a/src/OpenGl/OpenGl_AspectsSprite.cxx b/src/OpenGl/OpenGl_AspectsSprite.cxx index bf9a21df3e..fe9309b44f 100644 --- a/src/OpenGl/OpenGl_AspectsSprite.cxx +++ b/src/OpenGl/OpenGl_AspectsSprite.cxx @@ -261,13 +261,13 @@ void OpenGl_AspectsSprite::build (const Handle(OpenGl_Context)& theCtx, if (!hadAlreadyRGBA) { - aSprite->Init (theCtx, *anImage, Graphic3d_TOT_2D, true); + aSprite->Init (theCtx, *anImage, Graphic3d_TypeOfTexture_2D, true); } if (!hadAlreadyAlpha) { if (Handle(Image_PixMap) anImageA = aSprite->GetFormat() != GL_ALPHA ? aNewMarkerImage->GetImageAlpha() : Handle(Image_PixMap)()) { - aSpriteA->Init (theCtx, *anImageA, Graphic3d_TOT_2D, true); + aSpriteA->Init (theCtx, *anImageA, Graphic3d_TypeOfTexture_2D, true); } } } diff --git a/src/OpenGl/OpenGl_Context.cxx b/src/OpenGl/OpenGl_Context.cxx index 645f672655..d501804256 100644 --- a/src/OpenGl/OpenGl_Context.cxx +++ b/src/OpenGl/OpenGl_Context.cxx @@ -2136,13 +2136,13 @@ Handle(OpenGl_TextureSet) OpenGl_Context::BindTextures (const Handle(OpenGl_Text myTextureRgbaWhite = new OpenGl_Texture(); Image_PixMap anImage; anImage.InitZero (Image_Format_RGBA, 2, 2, 0, (Standard_Byte )0); - if (!myTextureRgbaBlack->Init (this, OpenGl_TextureFormat::Create(), Graphic3d_Vec2i (2, 2), Graphic3d_TOT_2D, &anImage)) + if (!myTextureRgbaBlack->Init (this, OpenGl_TextureFormat::Create(), Graphic3d_Vec2i (2, 2), Graphic3d_TypeOfTexture_2D, &anImage)) { PushMessage (GL_DEBUG_SOURCE_APPLICATION, GL_DEBUG_TYPE_PORTABILITY, 0, GL_DEBUG_SEVERITY_HIGH, "Error: unable to create unit mock PBR texture map."); } anImage.InitZero (Image_Format_RGBA, 2, 2, 0, (Standard_Byte )255); - if (!myTextureRgbaWhite->Init (this, OpenGl_TextureFormat::Create(), Graphic3d_Vec2i (2, 2), Graphic3d_TOT_2D, &anImage)) + if (!myTextureRgbaWhite->Init (this, OpenGl_TextureFormat::Create(), Graphic3d_Vec2i (2, 2), Graphic3d_TypeOfTexture_2D, &anImage)) { PushMessage (GL_DEBUG_SOURCE_APPLICATION, GL_DEBUG_TYPE_PORTABILITY, 0, GL_DEBUG_SEVERITY_HIGH, "Error: unable to create normal mock PBR texture map."); diff --git a/src/OpenGl/OpenGl_Font.cxx b/src/OpenGl/OpenGl_Font.cxx index 384c4754a6..2a9b759f44 100755 --- a/src/OpenGl/OpenGl_Font.cxx +++ b/src/OpenGl/OpenGl_Font.cxx @@ -147,7 +147,7 @@ bool OpenGl_Font::createTexture (const Handle(OpenGl_Context)& theCtx) Image_PixMap aBlackImg; if (!aBlackImg.InitZero (Image_Format_Alpha, Standard_Size(aTextureSizeX), Standard_Size(aTextureSizeY)) - || !aTexture->Init (theCtx, aBlackImg, Graphic3d_TOT_2D, true)) // myTextureFormat + || !aTexture->Init (theCtx, aBlackImg, Graphic3d_TypeOfTexture_2D, true)) // myTextureFormat { theCtx->PushMessage (GL_DEBUG_SOURCE_APPLICATION, GL_DEBUG_TYPE_ERROR, 0, GL_DEBUG_SEVERITY_HIGH, TCollection_AsciiString ("New texture initialization of size ") diff --git a/src/OpenGl/OpenGl_FrameBuffer.cxx b/src/OpenGl/OpenGl_FrameBuffer.cxx index ca907ab854..066118c772 100644 --- a/src/OpenGl/OpenGl_FrameBuffer.cxx +++ b/src/OpenGl/OpenGl_FrameBuffer.cxx @@ -277,7 +277,7 @@ Standard_Boolean OpenGl_FrameBuffer::Init (const Handle(OpenGl_Context)& theGlCo const GLint aColorFormat = myColorFormats (aColorBufferIdx); const OpenGl_TextureFormat aFormat = OpenGl_TextureFormat::FindSizedFormat (theGlContext, aColorFormat); if (!aFormat.IsValid() - || !aColorTexture->Init (theGlContext, aFormat, Graphic3d_Vec2i (aSizeX, aSizeY), Graphic3d_TOT_2D)) + || !aColorTexture->Init (theGlContext, aFormat, Graphic3d_Vec2i (aSizeX, aSizeY), Graphic3d_TypeOfTexture_2D)) { Release (theGlContext.get()); return Standard_False; @@ -415,7 +415,7 @@ Standard_Boolean OpenGl_FrameBuffer::Init (const Handle(OpenGl_Context)& theGlCo const GLint aColorFormat = myColorFormats (aColorBufferIdx); const OpenGl_TextureFormat aFormat = OpenGl_TextureFormat::FindSizedFormat (theGlContext, aColorFormat); if (!aFormat.IsValid() - || !aColorTexture->Init (theGlContext, aFormat, Graphic3d_Vec2i (aSizeX, aSizeY), Graphic3d_TOT_2D)) + || !aColorTexture->Init (theGlContext, aFormat, Graphic3d_Vec2i (aSizeX, aSizeY), Graphic3d_TypeOfTexture_2D)) { Release (theGlContext.operator->()); return Standard_False; @@ -426,7 +426,7 @@ Standard_Boolean OpenGl_FrameBuffer::Init (const Handle(OpenGl_Context)& theGlCo // instead of just trying to create such texture const OpenGl_TextureFormat aDepthFormat = OpenGl_TextureFormat::FindSizedFormat (theGlContext, myDepthFormat); if (aDepthFormat.IsValid() - && !myDepthStencilTexture->Init (theGlContext, aDepthFormat, Graphic3d_Vec2i (aSizeX, aSizeY), Graphic3d_TOT_2D)) + && !myDepthStencilTexture->Init (theGlContext, aDepthFormat, Graphic3d_Vec2i (aSizeX, aSizeY), Graphic3d_TypeOfTexture_2D)) { theGlContext->PushMessage (GL_DEBUG_SOURCE_APPLICATION, GL_DEBUG_TYPE_PORTABILITY, 0, GL_DEBUG_SEVERITY_HIGH, "Warning! Depth textures are not supported by hardware!"); diff --git a/src/OpenGl/OpenGl_PBREnvironment.cxx b/src/OpenGl/OpenGl_PBREnvironment.cxx index 80da3218dd..13c6d407c7 100644 --- a/src/OpenGl/OpenGl_PBREnvironment.cxx +++ b/src/OpenGl/OpenGl_PBREnvironment.cxx @@ -290,7 +290,7 @@ bool OpenGl_PBREnvironment::initTextures (const Handle(OpenGl_Context)& theCtx) // NVIDIA's driver didn't work properly with 3 channel texture for diffuse SH coefficients so that alpha channel has been added if (!myIBLMaps[OpenGl_TypeOfIBLMap_DiffuseSH].Init (theCtx, OpenGl_TextureFormat::FindFormat (theCtx, Image_Format_RGBAF, false), - Graphic3d_Vec2i (9, 1), Graphic3d_TOT_2D)) + Graphic3d_Vec2i (9, 1), Graphic3d_TypeOfTexture_2D)) { Message::SendFail() << "OpenGl_PBREnvironment, DiffuseSH texture creation failed"; return false; @@ -305,7 +305,7 @@ bool OpenGl_PBREnvironment::initTextures (const Handle(OpenGl_Context)& theCtx) if (!myIBLMaps[OpenGl_TypeOfIBLMap_DiffuseFallback].Init (theCtx, OpenGl_TextureFormat::FindFormat (theCtx, Image_Format_RGBA, false), - Graphic3d_Vec2i (10, 4), Graphic3d_TOT_2D)) + Graphic3d_Vec2i (10, 4), Graphic3d_TypeOfTexture_2D)) { Message::SendFail() << "OpenGl_PBREnvironment, DiffuseFallback texture creation failed"; return false; @@ -432,7 +432,7 @@ bool OpenGl_PBREnvironment::processDiffIBLMap (const Handle(OpenGl_Context)& the { if (!myIBLMaps[OpenGl_TypeOfIBLMap_DiffuseSH].Init (theCtx, OpenGl_TextureFormat::FindFormat (theCtx, Image_Format_RGBAF, false), - Graphic3d_Vec2i (9, 1), Graphic3d_TOT_2D, &anImageF)) + Graphic3d_Vec2i (9, 1), Graphic3d_TypeOfTexture_2D, &anImageF)) { Message::SendFail() << "OpenGl_PBREnvironment, DiffuseSH texture update failed"; return false; diff --git a/src/OpenGl/OpenGl_Sampler.cxx b/src/OpenGl/OpenGl_Sampler.cxx index 45fe965044..40075fa429 100644 --- a/src/OpenGl/OpenGl_Sampler.cxx +++ b/src/OpenGl/OpenGl_Sampler.cxx @@ -378,7 +378,11 @@ void OpenGl_Sampler::applyGlobalTextureParams (const Handle(OpenGl_Context)& the theCtx->core11fwd->glEnable (GL_TEXTURE_2D); break; } - default: break; + case GL_TEXTURE_3D: + default: + { + break; + } } } @@ -428,6 +432,10 @@ void OpenGl_Sampler::resetGlobalTextureParams (const Handle(OpenGl_Context)& the theCtx->core11fwd->glDisable (GL_TEXTURE_2D); break; } - default: break; + case GL_TEXTURE_3D: + default: + { + break; + } } } diff --git a/src/OpenGl/OpenGl_Texture.cxx b/src/OpenGl/OpenGl_Texture.cxx index 655e02001a..19e1359115 100644 --- a/src/OpenGl/OpenGl_Texture.cxx +++ b/src/OpenGl/OpenGl_Texture.cxx @@ -69,12 +69,6 @@ static Standard_Integer computeUpperMipMapLevel (Standard_Integer theSize) } } -//! Compute the upper mipmap level for complete mipmap set (e.g. till the 1x1 level). -static Standard_Integer computeUpperMipMapLevel (Standard_Integer theSizeX, Standard_Integer theSizeY) -{ - return computeUpperMipMapLevel (Max (theSizeX, theSizeY)); -} - //! Compute size of the smallest defined mipmap level (for verbose messages). static Graphic3d_Vec2i computeSmallestMipMapSize (const Graphic3d_Vec2i& theBaseSize, Standard_Integer theMaxLevel) { @@ -105,9 +99,6 @@ OpenGl_Texture::OpenGl_Texture (const TCollection_AsciiString& theResourceId, myRevision (0), myTextureId (NO_TEXTURE), myTarget (GL_TEXTURE_2D), - mySizeX (0), - mySizeY (0), - mySizeZ (0), myTextFormat (GL_RGBA), mySizedFormat(GL_RGBA8), myNbSamples (1), @@ -169,7 +160,7 @@ void OpenGl_Texture::Release (OpenGl_Context* theGlCtx) theGlCtx->core11fwd->glDeleteTextures (1, &myTextureId); } myTextureId = NO_TEXTURE; - mySizeX = mySizeY = mySizeZ = 0; + mySize.SetValues (0, 0, 0); } // ======================================================================= @@ -231,12 +222,13 @@ bool OpenGl_Texture::InitSamplerObject (const Handle(OpenGl_Context)& theCtx) // ======================================================================= bool OpenGl_Texture::Init (const Handle(OpenGl_Context)& theCtx, const OpenGl_TextureFormat& theFormat, - const Graphic3d_Vec2i& theSizeXY, + const Graphic3d_Vec3i& theSizeXYZ, const Graphic3d_TypeOfTexture theType, const Image_PixMap* theImage) { - if (theSizeXY.x() < 1 - || theSizeXY.y() < 1) + if (theSizeXYZ.x() < 1 + || theSizeXYZ.y() < 1 + || theSizeXYZ.z() < 1) { theCtx->PushMessage (GL_DEBUG_SOURCE_APPLICATION, GL_DEBUG_TYPE_ERROR, 0, GL_DEBUG_SEVERITY_HIGH, TCollection_AsciiString ("Error: texture of 0 size cannot be created [") + myResourceId +"]"); @@ -244,16 +236,39 @@ bool OpenGl_Texture::Init (const Handle(OpenGl_Context)& theCtx, return false; } - const GLenum aTarget = (theType == Graphic3d_TOT_1D - && theCtx->GraphicsLibrary() != Aspect_GraphicsLibrary_OpenGLES) - ? GL_TEXTURE_1D - : GL_TEXTURE_2D; + GLenum aTarget = GL_TEXTURE_2D; + switch (theType) + { + case Graphic3d_TypeOfTexture_1D: + { + aTarget = theCtx->GraphicsLibrary() != Aspect_GraphicsLibrary_OpenGLES + ? GL_TEXTURE_1D + : GL_TEXTURE_2D; + break; + } + case Graphic3d_TypeOfTexture_2D: + case Graphic3d_TOT_2D_MIPMAP: + { + aTarget = GL_TEXTURE_2D; + break; + } + case Graphic3d_TypeOfTexture_3D: + { + aTarget = GL_TEXTURE_3D; + break; + } + case Graphic3d_TypeOfTexture_CUBEMAP: + { + aTarget = GL_TEXTURE_CUBE_MAP; + break; + } + } const bool toPatchExisting = IsValid() && myTextFormat == theFormat.PixelFormat() && myTarget == aTarget - && HasMipmaps() == (theType == Graphic3d_TOT_2D_MIPMAP) - && mySizeX == theSizeXY.x() - && (mySizeY == theSizeXY.y() || theType == Graphic3d_TOT_1D); + && mySize.x() == theSizeXYZ.x() + && (mySize.y() == theSizeXYZ.y() || theType == Graphic3d_TypeOfTexture_1D) + && mySize.z() == theSizeXYZ.z(); if (!Create (theCtx)) { Release (theCtx.get()); @@ -271,9 +286,7 @@ bool OpenGl_Texture::Init (const Handle(OpenGl_Context)& theCtx, myIsAlpha = theFormat.PixelFormat() == GL_ALPHA; } - myMaxMipLevel = theType == Graphic3d_TOT_2D_MIPMAP && theCtx->arbFBO != NULL - ? computeUpperMipMapLevel (theSizeXY.x(), theSizeXY.y()) - : 0; + myMaxMipLevel = 0; myTextFormat = theFormat.PixelFormat(); mySizedFormat = theFormat.InternalFormat(); myNbSamples = 1; @@ -293,12 +306,12 @@ bool OpenGl_Texture::Init (const Handle(OpenGl_Context)& theCtx, return false; } - const GLsizei aMaxSize = theCtx->MaxTextureSize(); - if (theSizeXY.x() > aMaxSize - || theSizeXY.y() > aMaxSize) + const Standard_Integer aMaxSize = theCtx->MaxTextureSize(); + if (theSizeXYZ.maxComp() > aMaxSize) { theCtx->PushMessage (GL_DEBUG_SOURCE_APPLICATION, GL_DEBUG_TYPE_ERROR, 0, GL_DEBUG_SEVERITY_HIGH, - TCollection_AsciiString ("Error: Texture dimension - ") + theSizeXY.x() + "x" + theSizeXY.y() + TCollection_AsciiString ("Error: Texture dimension - ") + theSizeXYZ.x() + "x" + theSizeXYZ.y() + + (theSizeXYZ.z() > 1 ? TCollection_AsciiString ("x") + theSizeXYZ.z() : TCollection_AsciiString()) + " exceeds hardware limits (" + aMaxSize + "x" + aMaxSize + ")" + " [" + myResourceId +"]"); Release (theCtx.get()); @@ -312,34 +325,18 @@ bool OpenGl_Texture::Init (const Handle(OpenGl_Context)& theCtx, // however some hardware (NV30 - GeForce FX, RadeOn 9xxx and Xxxx) supports GLSL but not NPOT! // Trying to create NPOT textures on such hardware will not fail // but driver will fall back into software rendering, - const GLsizei aWidthP2 = OpenGl_Context::GetPowerOfTwo (theSizeXY.x(), aMaxSize); - const GLsizei aHeightP2 = OpenGl_Context::GetPowerOfTwo (theSizeXY.y(), aMaxSize); - if (theSizeXY.x() != aWidthP2 - || (theType != Graphic3d_TOT_1D && theSizeXY.y() != aHeightP2)) + const Graphic3d_Vec2i aSizeP2 (OpenGl_Context::GetPowerOfTwo (theSizeXYZ.x(), aMaxSize), + OpenGl_Context::GetPowerOfTwo (theSizeXYZ.y(), aMaxSize)); + if (theSizeXYZ.x() != aSizeP2.x() + || (theType != Graphic3d_TypeOfTexture_1D && theSizeXYZ.y() != aSizeP2.y())) { theCtx->PushMessage (GL_DEBUG_SOURCE_APPLICATION, GL_DEBUG_TYPE_PORTABILITY, 0, GL_DEBUG_SEVERITY_HIGH, - TCollection_AsciiString ("Error: NPOT Textures (") + theSizeXY.x() + "x" + theSizeXY.y() + ")" + TCollection_AsciiString ("Error: NPOT Textures (") + theSizeXYZ.x() + "x" + theSizeXYZ.y() + ")" " are not supported by hardware [" + myResourceId +"]"); Release (theCtx.get()); return false; } } - else if (theCtx->GraphicsLibrary() == Aspect_GraphicsLibrary_OpenGLES - && !theCtx->IsGlGreaterEqual (3, 0) - && theType == Graphic3d_TOT_2D_MIPMAP) - { - // Mipmap NPOT textures are not supported by OpenGL ES 2.0. - const GLsizei aWidthP2 = OpenGl_Context::GetPowerOfTwo (theSizeXY.x(), aMaxSize); - const GLsizei aHeightP2 = OpenGl_Context::GetPowerOfTwo (theSizeXY.y(), aMaxSize); - if (theSizeXY.x() != aWidthP2 - || theSizeXY.y() != aHeightP2) - { - theCtx->PushMessage (GL_DEBUG_SOURCE_APPLICATION, GL_DEBUG_TYPE_PORTABILITY, 0, GL_DEBUG_SEVERITY_HIGH, - TCollection_AsciiString ("Warning: Mipmap NPOT Textures (") + theSizeXY.x() + "x" + theSizeXY.y() + ")" - " are not supported by OpenGL ES 2.0 [" + myResourceId +"]"); - myMaxMipLevel = 0; - } - } GLint aTestWidth = 0, aTestHeight = 0; GLvoid* aDataPtr = (theImage != NULL) ? (GLvoid* )theImage->Data() : NULL; @@ -370,7 +367,7 @@ bool OpenGl_Texture::Init (const Handle(OpenGl_Context)& theCtx, myTarget = aTarget; switch (theType) { - case Graphic3d_TOT_1D: + case Graphic3d_TypeOfTexture_1D: { if (theCtx->GraphicsLibrary() == Aspect_GraphicsLibrary_OpenGLES) { @@ -385,14 +382,13 @@ bool OpenGl_Texture::Init (const Handle(OpenGl_Context)& theCtx, if (toPatchExisting) { theCtx->core11fwd->glTexSubImage1D (GL_TEXTURE_1D, 0, 0, - theSizeXY.x(), theFormat.PixelFormat(), theFormat.DataType(), aDataPtr); - Unbind (theCtx); - return true; + theSizeXYZ.x(), theFormat.PixelFormat(), theFormat.DataType(), aDataPtr); + break; } // use proxy to check texture could be created or not theCtx->core11fwd->glTexImage1D (GL_PROXY_TEXTURE_1D, 0, anIntFormat, - theSizeXY.x(), 0, + theSizeXYZ.x(), 0, theFormat.PixelFormat(), theFormat.DataType(), NULL); theCtx->core11fwd->glGetTexLevelParameteriv (GL_PROXY_TEXTURE_1D, 0, GL_TEXTURE_WIDTH, &aTestWidth); theCtx->core11fwd->glGetTexLevelParameteriv (GL_PROXY_TEXTURE_1D, 0, GL_TEXTURE_INTERNAL_FORMAT, &mySizedFormat); @@ -405,7 +401,7 @@ bool OpenGl_Texture::Init (const Handle(OpenGl_Context)& theCtx, } theCtx->core11fwd->glTexImage1D (GL_TEXTURE_1D, 0, anIntFormat, - theSizeXY.x(), 0, + theSizeXYZ.x(), 0, theFormat.PixelFormat(), theFormat.DataType(), aDataPtr); if (theCtx->core11fwd->glGetError() != GL_NO_ERROR) { @@ -414,13 +410,10 @@ bool OpenGl_Texture::Init (const Handle(OpenGl_Context)& theCtx, return false; } - mySizeX = theSizeXY.x(); - mySizeY = 1; - - Unbind (theCtx); - return true; + mySize.SetValues (theSizeXYZ.x(), 1, 1); + break; } - case Graphic3d_TOT_2D: + case Graphic3d_TypeOfTexture_2D: case Graphic3d_TOT_2D_MIPMAP: { Bind (theCtx); @@ -429,28 +422,16 @@ bool OpenGl_Texture::Init (const Handle(OpenGl_Context)& theCtx, { theCtx->core11fwd->glTexSubImage2D (GL_TEXTURE_2D, 0, 0, 0, - theSizeXY.x(), theSizeXY.y(), + theSizeXYZ.x(), theSizeXYZ.y(), theFormat.PixelFormat(), theFormat.DataType(), aDataPtr); - - if (myMaxMipLevel > 0) - { - // generate mipmaps - theCtx->arbFBO->glGenerateMipmap (GL_TEXTURE_2D); - if (theCtx->core11fwd->glGetError() != GL_NO_ERROR) - { - myMaxMipLevel = 0; - } - } - - Unbind (theCtx); - return true; + break; } if (theCtx->GraphicsLibrary() == Aspect_GraphicsLibrary_OpenGL) { // use proxy to check texture could be created or not theCtx->core11fwd->glTexImage2D (GL_PROXY_TEXTURE_2D, 0, anIntFormat, - theSizeXY.x(), theSizeXY.y(), 0, + theSizeXYZ.x(), theSizeXYZ.y(), 0, theFormat.PixelFormat(), theFormat.DataType(), NULL); theCtx->core11fwd->glGetTexLevelParameteriv (GL_PROXY_TEXTURE_2D, 0, GL_TEXTURE_WIDTH, &aTestWidth); theCtx->core11fwd->glGetTexLevelParameteriv (GL_PROXY_TEXTURE_2D, 0, GL_TEXTURE_HEIGHT, &aTestHeight); @@ -465,13 +446,13 @@ bool OpenGl_Texture::Init (const Handle(OpenGl_Context)& theCtx, } theCtx->core11fwd->glTexImage2D (GL_TEXTURE_2D, 0, anIntFormat, - theSizeXY.x(), theSizeXY.y(), 0, + theSizeXYZ.x(), theSizeXYZ.y(), 0, theFormat.PixelFormat(), theFormat.DataType(), aDataPtr); GLenum anErr = theCtx->core11fwd->glGetError(); if (anErr != GL_NO_ERROR) { theCtx->PushMessage (GL_DEBUG_SOURCE_APPLICATION, GL_DEBUG_TYPE_ERROR, 0, GL_DEBUG_SEVERITY_HIGH, - TCollection_AsciiString ("Error: 2D texture ") + theSizeXY.x() + "x" + theSizeXY.y() + TCollection_AsciiString ("Error: 2D texture ") + theSizeXYZ.x() + "x" + theSizeXYZ.y() + " IF: " + OpenGl_TextureFormat::FormatFormat (anIntFormat) + " PF: " + OpenGl_TextureFormat::FormatFormat (theFormat.PixelFormat()) + " DT: " + OpenGl_TextureFormat::FormatDataType (theFormat.DataType()) @@ -482,38 +463,63 @@ bool OpenGl_Texture::Init (const Handle(OpenGl_Context)& theCtx, return false; } - mySizeX = theSizeXY.x(); - mySizeY = theSizeXY.y(); + mySize.SetValues (theSizeXYZ.xy(), 1); + break; + } + case Graphic3d_TypeOfTexture_3D: + { + if (theCtx->Functions()->glTexImage3D == nullptr) + { + theCtx->PushMessage (GL_DEBUG_SOURCE_APPLICATION, GL_DEBUG_TYPE_ERROR, 0, GL_DEBUG_SEVERITY_HIGH, + "Error: three-dimensional textures are not supported by hardware."); + Unbind (theCtx); + Release (theCtx.get()); + return false; + } - if (myMaxMipLevel > 0) + Bind (theCtx); + applyDefaultSamplerParams (theCtx); + if (theCtx->GraphicsLibrary() == Aspect_GraphicsLibrary_OpenGL) { - // generate mipmaps - //glHint (GL_GENERATE_MIPMAP_HINT, GL_NICEST); - theCtx->arbFBO->glGenerateMipmap (GL_TEXTURE_2D); - anErr = theCtx->core11fwd->glGetError(); - if (anErr != GL_NO_ERROR) + theCtx->Functions()->glTexImage3D (GL_PROXY_TEXTURE_3D, 0, anIntFormat, + theSizeXYZ.x(), theSizeXYZ.y(), theSizeXYZ.z(), 0, + theFormat.PixelFormat(), theFormat.DataType(), nullptr); + + NCollection_Vec3 aTestSizeXYZ; + theCtx->core11fwd->glGetTexLevelParameteriv (GL_PROXY_TEXTURE_3D, 0, GL_TEXTURE_WIDTH, &aTestSizeXYZ.x()); + theCtx->core11fwd->glGetTexLevelParameteriv (GL_PROXY_TEXTURE_3D, 0, GL_TEXTURE_HEIGHT, &aTestSizeXYZ.y()); + theCtx->core11fwd->glGetTexLevelParameteriv (GL_PROXY_TEXTURE_3D, 0, GL_TEXTURE_DEPTH, &aTestSizeXYZ.z()); + theCtx->core11fwd->glGetTexLevelParameteriv (GL_PROXY_TEXTURE_3D, 0, GL_TEXTURE_INTERNAL_FORMAT, &mySizedFormat); + if (aTestSizeXYZ.x() == 0 || aTestSizeXYZ.y() == 0 || aTestSizeXYZ.z() == 0) { - myMaxMipLevel = 0; - if (theCtx->GraphicsLibrary() == Aspect_GraphicsLibrary_OpenGLES - && (theFormat.InternalFormat() == GL_RGB8 - || theFormat.InternalFormat() == GL_SRGB8)) - { - theCtx->PushMessage (GL_DEBUG_SOURCE_APPLICATION, GL_DEBUG_TYPE_PORTABILITY, 0, GL_DEBUG_SEVERITY_HIGH, - TCollection_AsciiString ("Warning: generating mipmaps requires color-renderable format, while giving ") - + OpenGl_TextureFormat::FormatFormat (anIntFormat) + " [" + myResourceId +"]"); - } - else - { - theCtx->PushMessage (GL_DEBUG_SOURCE_APPLICATION, GL_DEBUG_TYPE_PORTABILITY, 0, GL_DEBUG_SEVERITY_HIGH, - TCollection_AsciiString ("Warning: generating mipmaps has failed [") + myResourceId +"]"); - } + Unbind (theCtx); + Release (theCtx.get()); + return false; } } - Unbind (theCtx); - return true; + theCtx->Functions()->glTexImage3D (GL_TEXTURE_3D, 0, anIntFormat, + theSizeXYZ.x(), theSizeXYZ.y(), theSizeXYZ.z(), 0, + theFormat.PixelFormat(), theFormat.DataType(), aDataPtr); + GLenum anErr = theCtx->core11fwd->glGetError(); + if (anErr != GL_NO_ERROR) + { + theCtx->PushMessage (GL_DEBUG_SOURCE_APPLICATION, GL_DEBUG_TYPE_ERROR, 0, GL_DEBUG_SEVERITY_HIGH, + TCollection_AsciiString ("Error: 3D texture ") + theSizeXYZ.x() + "x" + theSizeXYZ.y() + "x" + theSizeXYZ.z() + + " IF: " + OpenGl_TextureFormat::FormatFormat (anIntFormat) + + " PF: " + OpenGl_TextureFormat::FormatFormat (theFormat.PixelFormat()) + + " DT: " + OpenGl_TextureFormat::FormatDataType (theFormat.DataType()) + + " can not be created with error " + OpenGl_Context::FormatGlError (anErr) + + " [" + myResourceId +"]"); + Unbind (theCtx); + Release (theCtx.get()); + return false; + } + + mySize = theSizeXYZ; + break; } - case Graphic3d_TOT_CUBEMAP: + case Graphic3d_TypeOfTexture_CUBEMAP: { Unbind (theCtx); Release (theCtx.get()); @@ -521,8 +527,82 @@ bool OpenGl_Texture::Init (const Handle(OpenGl_Context)& theCtx, } } - Release (theCtx.get()); - return false; + Unbind (theCtx); + return true; +} + +// ======================================================================= +// function : GenerateMipmaps +// purpose : +// ======================================================================= +bool OpenGl_Texture::GenerateMipmaps (const Handle(OpenGl_Context)& theCtx) +{ + if (theCtx->arbFBO == nullptr + || !IsValid()) + { + return false; + } + + myMaxMipLevel = computeUpperMipMapLevel (mySize.maxComp()); + + const Standard_Integer aMaxSize = theCtx->MaxTextureSize(); + if (theCtx->GraphicsLibrary() == Aspect_GraphicsLibrary_OpenGLES + && !theCtx->IsGlGreaterEqual (3, 0)) + { + // Mipmap NPOT textures are not supported by OpenGL ES 2.0. + const Graphic3d_Vec2i aSizeP2 (OpenGl_Context::GetPowerOfTwo (mySize.x(), aMaxSize), + OpenGl_Context::GetPowerOfTwo (mySize.y(), aMaxSize)); + if (mySize.xy() != aSizeP2) + { + theCtx->PushMessage (GL_DEBUG_SOURCE_APPLICATION, GL_DEBUG_TYPE_PORTABILITY, 0, GL_DEBUG_SEVERITY_HIGH, + TCollection_AsciiString ("Warning: Mipmap NPOT Textures (") + mySize.x() + "x" + mySize.y() + ")" + " are not supported by OpenGL ES 2.0 [" + myResourceId +"]"); + myMaxMipLevel = 0; + } + } + + if (myMaxMipLevel <= 0) + { + return false; + } + + //glHint (GL_GENERATE_MIPMAP_HINT, GL_NICEST); + Bind (theCtx); + if (theCtx->HasTextureBaseLevel() + && !mySampler->isValidSampler()) + { + const Standard_Integer aMaxLevel = Min (myMaxMipLevel, mySampler->Parameters()->MaxLevel()); + mySampler->SetParameter (theCtx, myTarget, GL_TEXTURE_MAX_LEVEL, aMaxLevel); + } + theCtx->arbFBO->glGenerateMipmap (myTarget); + GLenum anErr = theCtx->core11fwd->glGetError(); + if (anErr != GL_NO_ERROR) + { + myMaxMipLevel = 0; + if (theCtx->HasTextureBaseLevel() + && !mySampler->isValidSampler()) + { + mySampler->SetParameter (theCtx, myTarget, GL_TEXTURE_MAX_LEVEL, 0); + } + + if (theCtx->GraphicsLibrary() == Aspect_GraphicsLibrary_OpenGLES + && (mySizedFormat == GL_RGB8 + || mySizedFormat == GL_SRGB8)) + { + theCtx->PushMessage (GL_DEBUG_SOURCE_APPLICATION, GL_DEBUG_TYPE_PORTABILITY, 0, GL_DEBUG_SEVERITY_HIGH, + TCollection_AsciiString ("Warning: generating mipmaps requires color-renderable format, while giving ") + + OpenGl_TextureFormat::FormatFormat (mySizedFormat) + " [" + myResourceId +"]"); + } + else + { + theCtx->PushMessage (GL_DEBUG_SOURCE_APPLICATION, GL_DEBUG_TYPE_PORTABILITY, 0, GL_DEBUG_SEVERITY_HIGH, + TCollection_AsciiString ("Warning: generating mipmaps has failed [") + myResourceId +"]"); + } + } + + applyDefaultSamplerParams (theCtx); + Unbind (theCtx); + return true; } // ======================================================================= @@ -550,16 +630,15 @@ bool OpenGl_Texture::Init (const Handle(OpenGl_Context)& theCtx, return false; } - return Init (theCtx, aFormat, Graphic3d_Vec2i ((Standard_Integer)theImage.SizeX(), (Standard_Integer)theImage.SizeY()), - theType, &theImage); + return Init (theCtx, aFormat, Graphic3d_Vec3i (theImage.SizeXYZ()), theType, &theImage); } // ======================================================================= // function : Init // purpose : // ======================================================================= -bool OpenGl_Texture::Init (const Handle(OpenGl_Context)& theCtx, - const Handle(Graphic3d_TextureMap)& theTextureMap) +bool OpenGl_Texture::Init (const Handle(OpenGl_Context)& theCtx, + const Handle(Graphic3d_TextureRoot)& theTextureMap) { if (theTextureMap.IsNull()) { @@ -568,7 +647,7 @@ bool OpenGl_Texture::Init (const Handle(OpenGl_Context)& theCtx, switch (theTextureMap->Type()) { - case Graphic3d_TOT_CUBEMAP: + case Graphic3d_TypeOfTexture_CUBEMAP: { return InitCubeMap (theCtx, Handle(Graphic3d_CubeMap)::DownCast(theTextureMap), 0, Image_Format_RGB, false, theTextureMap->IsColorMap()); @@ -589,7 +668,15 @@ bool OpenGl_Texture::Init (const Handle(OpenGl_Context)& theCtx, { return false; } - return Init (theCtx, *anImage, theTextureMap->Type(), theTextureMap->IsColorMap()); + if (!Init (theCtx, *anImage, theTextureMap->Type(), theTextureMap->IsColorMap())) + { + return false; + } + if (theTextureMap->HasMipmaps()) + { + GenerateMipmaps (theCtx); + } + return true; } } } @@ -641,23 +728,22 @@ bool OpenGl_Texture::InitCompressed (const Handle(OpenGl_Context)& theCtx, myTextFormat = aFormat.Format(); mySizedFormat = aFormat.Internal(); myIsTopDown = theImage.IsTopDown(); - mySizeX = theImage.SizeX(); - mySizeY = theImage.SizeY(); + mySize.SetValues (theImage.SizeX(), theImage.SizeY(), 1); myMaxMipLevel = Max (theImage.MipMaps().Size() - 1, 0); if (myMaxMipLevel > 0 && !theImage.IsCompleteMipMapSet()) { - const Graphic3d_Vec2i aMipSize = computeSmallestMipMapSize (Graphic3d_Vec2i (mySizeX, mySizeY), myMaxMipLevel); + const Graphic3d_Vec2i aMipSize = computeSmallestMipMapSize (mySize.xy(), myMaxMipLevel); if (!theCtx->HasTextureBaseLevel()) { myMaxMipLevel = 0; theCtx->PushMessage (GL_DEBUG_SOURCE_APPLICATION, GL_DEBUG_TYPE_PERFORMANCE, 0, GL_DEBUG_SEVERITY_MEDIUM, - TCollection_AsciiString ("Warning: compressed 2D texture ") + myResourceId + " " + mySizeX + "x" + mySizeY + TCollection_AsciiString ("Warning: compressed 2D texture ") + myResourceId + " " + mySize.x() + "x" + mySize.y() + " has smallest mipmap " + aMipSize.x() + "x" + aMipSize.y() + "; mipmaps will be ignored"); } else { - Message::SendTrace (TCollection_AsciiString ("Warning: compressed 2D texture ") + myResourceId + " " + mySizeX + "x" + mySizeY + Message::SendTrace (TCollection_AsciiString ("Warning: compressed 2D texture ") + myResourceId + " " + mySize.x() + "x" + mySize.y() + " has smallest mipmap " + aMipSize.x() + "x" + aMipSize.y()); } } @@ -762,8 +848,7 @@ bool OpenGl_Texture::Init2DMultisample (const Handle(OpenGl_Context)& theCtx, return false; } - mySizeX = theSizeX; - mySizeY = theSizeY; + mySize.SetValues (theSizeX, theSizeY, 1); Unbind (theCtx); return true; @@ -824,8 +909,7 @@ bool OpenGl_Texture::InitRectangle (const Handle(OpenGl_Context)& theCtx, return false; } - mySizeX = aSizeX; - mySizeY = aSizeY; + mySize.SetValues (aSizeX, aSizeY, 1); Unbind (theCtx); return true; } @@ -912,9 +996,7 @@ bool OpenGl_Texture::Init3D (const Handle(OpenGl_Context)& theCtx, return false; } - mySizeX = aSizeXYZ.x(); - mySizeY = aSizeXYZ.y(); - mySizeZ = aSizeXYZ.z(); + mySize = aSizeXYZ; Unbind (theCtx); return true; @@ -940,6 +1022,7 @@ bool OpenGl_Texture::InitCubeMap (const Handle(OpenGl_Context)& theCtx, Handle(Image_PixMap) anImage; Handle(Image_CompressedPixMap) aCompImage; OpenGl_TextureFormat aFormat; + myMaxMipLevel = 0; if (!theCubeMap.IsNull()) { theCubeMap->Reset(); @@ -997,15 +1080,10 @@ bool OpenGl_Texture::InitCubeMap (const Handle(OpenGl_Context)& theCtx, theSize = anImage->SizeX(); theFormat = anImage->Format(); theToGenMipmap = theCubeMap->HasMipmaps(); - myMaxMipLevel = theToGenMipmap ? computeUpperMipMapLevel ((Standard_Integer )theSize) : 0; } myIsTopDown = theCubeMap->IsTopDown(); } - else - { - myMaxMipLevel = theToGenMipmap ? computeUpperMipMapLevel ((Standard_Integer )theSize) : 0; - } if (!aFormat.IsValid()) { @@ -1036,8 +1114,7 @@ bool OpenGl_Texture::InitCubeMap (const Handle(OpenGl_Context)& theCtx, myTarget = GL_TEXTURE_CUBE_MAP; myNbSamples = 1; - mySizeX = (GLsizei )theSize; - mySizeY = (GLsizei )theSize; + mySize.SetValues ((GLsizei )theSize, (GLsizei )theSize, 1); myTextFormat = aFormat.Format(); mySizedFormat = aFormat.Internal(); @@ -1069,7 +1146,7 @@ bool OpenGl_Texture::InitCubeMap (const Handle(OpenGl_Context)& theCtx, } if (!aCompImage.IsNull()) { - Graphic3d_Vec2i aMipSizeXY (mySizeX, mySizeY); + Graphic3d_Vec2i aMipSizeXY = mySize.xy(); aData = aCompImage->FaceData()->Data(); for (Standard_Integer aMipIter = 0; aMipIter <= myMaxMipLevel; ++aMipIter) { @@ -1167,16 +1244,7 @@ bool OpenGl_Texture::InitCubeMap (const Handle(OpenGl_Context)& theCtx, if (theToGenMipmap && theCtx->arbFBO != NULL) { - theCtx->arbFBO->glGenerateMipmap (myTarget); - const GLenum anErr = theCtx->core11fwd->glGetError(); - if (anErr != GL_NO_ERROR) - { - theCtx->PushMessage (GL_DEBUG_SOURCE_APPLICATION, GL_DEBUG_TYPE_ERROR, 0, GL_DEBUG_SEVERITY_HIGH, - TCollection_AsciiString ("Unable to generate mipmap of cubemap with format ") - + OpenGl_TextureFormat::FormatFormat (anIntFormat) - + ", error " + OpenGl_Context::FormatGlError (anErr)); - myMaxMipLevel = 0; - } + GenerateMipmaps (theCtx); } Unbind (theCtx.get()); @@ -1250,14 +1318,14 @@ Standard_Size OpenGl_Texture::EstimatedDataSize() const return 0; } - Standard_Size aSize = PixelSizeOfPixelFormat (mySizedFormat) * mySizeX * myNbSamples; - if (mySizeY != 0) + Standard_Size aSize = PixelSizeOfPixelFormat (mySizedFormat) * mySize.x() * myNbSamples; + if (mySize.y() != 0) { - aSize *= Standard_Size(mySizeY); + aSize *= Standard_Size(mySize.y()); } - if (mySizeZ != 0) + if (mySize.z() != 0) { - aSize *= Standard_Size(mySizeZ); + aSize *= Standard_Size(mySize.z()); } if (myTarget == GL_TEXTURE_CUBE_MAP) { @@ -1294,7 +1362,7 @@ bool OpenGl_Texture::ImageDump (Image_PixMap& theImage, } GLenum aTarget = myTarget; - Graphic3d_Vec2i aSize (mySizeX, mySizeY); + Graphic3d_Vec2i aSize = mySize.xy(); if (myTarget == GL_TEXTURE_CUBE_MAP) { aTarget = GL_TEXTURE_CUBE_MAP_POSITIVE_X + theCubeSide; diff --git a/src/OpenGl/OpenGl_Texture.hxx b/src/OpenGl/OpenGl_Texture.hxx index 17aa05ab22..dee0ddd0f2 100644 --- a/src/OpenGl/OpenGl_Texture.hxx +++ b/src/OpenGl/OpenGl_Texture.hxx @@ -53,11 +53,17 @@ public: //! @return target to which the texture is bound (GL_TEXTURE_1D, GL_TEXTURE_2D) unsigned int GetTarget() const { return myTarget; } - //! @return texture width (0 LOD) - GLsizei SizeX() const { return mySizeX; } + //! Return texture dimensions (0 LOD) + const Graphic3d_Vec3i& Size() const { return mySize; } - //! @return texture height (0 LOD) - GLsizei SizeY() const { return mySizeY; } + //! Return texture width (0 LOD) + Standard_Integer SizeX() const { return mySize.x(); } + + //! Return texture height (0 LOD) + Standard_Integer SizeY() const { return mySize.y(); } + + //! Return texture depth (0 LOD) + Standard_Integer SizeZ() const { return mySize.z(); } //! @return texture ID unsigned int TextureId() const { return myTextureId; } @@ -140,15 +146,30 @@ public: //! Notice that texture will be unbound after this call. Standard_EXPORT bool Init (const Handle(OpenGl_Context)& theCtx, const OpenGl_TextureFormat& theFormat, - const Graphic3d_Vec2i& theSizeXY, + const Graphic3d_Vec3i& theSizeXYZ, const Graphic3d_TypeOfTexture theType, const Image_PixMap* theImage = NULL); + //! Initialize the 2D texture with specified format, size and texture type. + //! If theImage is empty the texture data will contain trash. + //! Notice that texture will be unbound after this call. + bool Init (const Handle(OpenGl_Context)& theCtx, + const OpenGl_TextureFormat& theFormat, + const Graphic3d_Vec2i& theSizeXY, + const Graphic3d_TypeOfTexture theType, + const Image_PixMap* theImage = NULL) + { + return Init (theCtx, theFormat, Graphic3d_Vec3i (theSizeXY, 1), theType, theImage); + } + //! Initialize the texture with Graphic3d_TextureMap. //! It is an universal way to initialize. //! Suitable initialization method will be chosen. - Standard_EXPORT bool Init (const Handle(OpenGl_Context)& theCtx, - const Handle(Graphic3d_TextureMap)& theTextureMap); + Standard_EXPORT bool Init (const Handle(OpenGl_Context)& theCtx, + const Handle(Graphic3d_TextureRoot)& theTextureMap); + + //! Generate mipmaps. + Standard_EXPORT bool GenerateMipmaps (const Handle(OpenGl_Context)& theCtx); //! Initialize the texture with Image_CompressedPixMap. Standard_EXPORT bool InitCompressed (const Handle(OpenGl_Context)& theCtx, @@ -302,9 +323,7 @@ protected: Standard_Size myRevision; //!< revision of associated data source unsigned int myTextureId; //!< GL resource ID unsigned int myTarget; //!< GL_TEXTURE_1D/GL_TEXTURE_2D/GL_TEXTURE_3D - Standard_Integer mySizeX; //!< texture width - Standard_Integer mySizeY; //!< texture height - Standard_Integer mySizeZ; //!< texture depth + Graphic3d_Vec3i mySize; //!< texture width x height x depth unsigned int myTextFormat; //!< texture format - GL_RGB, GL_RGBA,... Standard_Integer mySizedFormat;//!< internal (sized) texture format Standard_Integer myNbSamples; //!< number of MSAA samples diff --git a/src/OpenGl/OpenGl_TileSampler.cxx b/src/OpenGl/OpenGl_TileSampler.cxx index 3d988e4d1f..caa13711a6 100644 --- a/src/OpenGl/OpenGl_TileSampler.cxx +++ b/src/OpenGl/OpenGl_TileSampler.cxx @@ -302,7 +302,7 @@ bool OpenGl_TileSampler::upload (const Handle(OpenGl_Context)& theContext, if (!theOffsetsTexture->Init (theContext, OpenGl_TextureFormat::FindSizedFormat (theContext, GL_RG32I), Graphic3d_Vec2i ((int )anOffsets.SizeX, (int )anOffsets.SizeY), - Graphic3d_TOT_2D)) + Graphic3d_TypeOfTexture_2D)) { hasErrors = true; } diff --git a/src/OpenGl/OpenGl_View.cxx b/src/OpenGl/OpenGl_View.cxx index 97a98a6737..54cc8b48b2 100644 --- a/src/OpenGl/OpenGl_View.cxx +++ b/src/OpenGl/OpenGl_View.cxx @@ -343,10 +343,8 @@ void OpenGl_View::initTextureEnv (const Handle(OpenGl_Context)& theContext) } Handle(OpenGl_Texture) aTextureEnv = new OpenGl_Texture (myTextureEnvData->GetId(), myTextureEnvData->GetParams()); - if (Handle(Image_PixMap) anImage = myTextureEnvData->GetImage (theContext->SupportedTextureFormats())) - { - aTextureEnv->Init (theContext, *anImage, myTextureEnvData->Type(), true); - } + aTextureEnv->Init (theContext, myTextureEnvData); + myTextureEnv = new OpenGl_TextureSet (aTextureEnv); myTextureEnv->ChangeTextureSetBits() = Graphic3d_TextureSetBits_BaseColor; } @@ -1391,7 +1389,7 @@ bool OpenGl_View::prepareFrameBuffers (Graphic3d_Camera::Projection& theProj) aParams->SetTextureUnit (aCtx->PBREnvLUTTexUnit()); anEnvLUT = new OpenGl_Texture(THE_SHARED_ENV_LUT_KEY, aParams); if (!aTexFormat.IsValid() - || !anEnvLUT->Init (aCtx, aTexFormat, Graphic3d_Vec2i((Standard_Integer)Textures_EnvLUTSize), Graphic3d_TOT_2D, aPixMap.get())) + || !anEnvLUT->Init (aCtx, aTexFormat, Graphic3d_Vec2i((Standard_Integer)Textures_EnvLUTSize), Graphic3d_TypeOfTexture_2D, aPixMap.get())) { aCtx->PushMessage (GL_DEBUG_SOURCE_APPLICATION, GL_DEBUG_TYPE_ERROR, 0, GL_DEBUG_SEVERITY_HIGH, "Failed allocation of LUT for PBR"); anEnvLUT.Nullify(); diff --git a/src/OpenGl/OpenGl_View_Raytrace.cxx b/src/OpenGl/OpenGl_View_Raytrace.cxx index d36c0c5aba..299b7b014b 100644 --- a/src/OpenGl/OpenGl_View_Raytrace.cxx +++ b/src/OpenGl/OpenGl_View_Raytrace.cxx @@ -1949,13 +1949,13 @@ Standard_Boolean OpenGl_View::updateRaytraceBuffers (const Standard_Integer myRaytraceVisualErrorTexture[aViewIter]->Init (theGlContext, OpenGl_TextureFormat::FindSizedFormat (theGlContext, GL_R32I), Graphic3d_Vec2i (myTileSampler.NbTilesX(), myTileSampler.NbTilesY()), - Graphic3d_TOT_2D); + Graphic3d_TypeOfTexture_2D); if (!myRaytraceParameters.AdaptiveScreenSamplingAtomic) { myRaytraceTileSamplesTexture[aViewIter]->Init (theGlContext, OpenGl_TextureFormat::FindSizedFormat (theGlContext, GL_R32I), Graphic3d_Vec2i (myTileSampler.NbTilesX(), myTileSampler.NbTilesY()), - Graphic3d_TOT_2D); + Graphic3d_TypeOfTexture_2D); } } else // non-adaptive mode diff --git a/src/QABugs/QABugs_1.cxx b/src/QABugs/QABugs_1.cxx index b15836c6f4..f58eff1888 100644 --- a/src/QABugs/QABugs_1.cxx +++ b/src/QABugs/QABugs_1.cxx @@ -508,7 +508,7 @@ static Standard_Integer OCC30182 (Draw_Interpretor& , Standard_Integer theNbArgs const Handle(Graphic3d_AspectFillArea3d)& anAspect = aPrs->Attributes()->ShadingAspect()->Aspect(); anAspect->SetShadingModel (Graphic3d_TypeOfShadingModel_Unlit); anAspect->SetTextureMapOn (true); - anAspect->SetTextureMap (new Graphic3d_Texture2Dmanual (anImage)); + anAspect->SetTextureMap (new Graphic3d_Texture2D (anImage)); if (anImage->IsTopDown()) { anAspect->TextureMap()->GetParams()->SetTranslation(Graphic3d_Vec2 (0.0f, -1.0f)); diff --git a/src/V3d/V3d_View.cxx b/src/V3d/V3d_View.cxx index ecd4c1d6b4..7f8eb4afec 100644 --- a/src/V3d/V3d_View.cxx +++ b/src/V3d/V3d_View.cxx @@ -479,7 +479,7 @@ void V3d_View::SetBackgroundImage (const Standard_CString theFileName, const Aspect_FillMethod theFillStyle, const Standard_Boolean theToUpdate) { - Handle(Graphic3d_Texture2D) aTextureMap = new Graphic3d_Texture2Dmanual (theFileName); + Handle(Graphic3d_Texture2D) aTextureMap = new Graphic3d_Texture2D (theFileName); aTextureMap->DisableModulate(); SetBackgroundImage (aTextureMap, theFillStyle, theToUpdate); } diff --git a/src/ViewerTest/ViewerTest.cxx b/src/ViewerTest/ViewerTest.cxx index 533ffb7a4a..35e392a98b 100644 --- a/src/ViewerTest/ViewerTest.cxx +++ b/src/ViewerTest/ViewerTest.cxx @@ -48,7 +48,8 @@ #include #include #include -#include +#include +#include #include #include #include @@ -4145,13 +4146,8 @@ Standard_Integer VTexture (Draw_Interpretor& theDi, Standard_Integer theArgsNb, return 1; } - int toModulate = -1; - int toSetSRgb = -1; - bool toSetFilter = false; - bool toSetAniso = false; - bool toSetTrsfAngle = false; - bool toSetTrsfTrans = false; - bool toSetTrsfScale = false; + int toModulate = -1, toSetSRgb = -1; + bool toSetFilter = false, toSetAniso = false, toSetTrsfAngle = false, toSetTrsfTrans = false, toSetTrsfScale = false; Standard_ShortReal aTrsfRotAngle = 0.0f; Graphic3d_Vec2 aTrsfTrans (0.0f, 0.0f); Graphic3d_Vec2 aTrsfScale (1.0f, 1.0f); @@ -4161,12 +4157,8 @@ Standard_Integer VTexture (Draw_Interpretor& theDi, Standard_Integer theArgsNb, Handle(AIS_InteractiveObject) aTexturedIO; Handle(AIS_Shape) aTexturedShape; Handle(Graphic3d_TextureSet) aTextureSetOld; - NCollection_Vector aTextureVecNew; - bool toSetGenRepeat = false; - bool toSetGenScale = false; - bool toSetGenOrigin = false; - bool toSetImage = false; - bool toComputeUV = false; + NCollection_Vector aTextureVecNew; + bool toSetGenRepeat = false, toSetGenScale = false, toSetGenOrigin = false, toSetImage = false, toComputeUV = false; const TCollection_AsciiString aCommandName (theArgVec[0]); bool toSetDefaults = aCommandName == "vtexdefault"; @@ -4441,6 +4433,38 @@ Standard_Integer VTexture (Draw_Interpretor& theDi, Standard_Integer theArgsNb, aTexturedIO->Attributes()->ShadingAspect()->Aspect()->SetTextureSet (aMedia); aTextureSetOld.Nullify(); } + else if (aCommandName == "vtexture" + && aTextureVecNew.IsEmpty() + && aNameCase == "-3d") + { + TColStd_SequenceOfAsciiString aSlicesSeq; + for (; anArgIter + 1 < theArgsNb; ++anArgIter) + { + TCollection_AsciiString aSlicePath (theArgVec[anArgIter + 1]); + if (aSlicePath.StartsWith ("-")) + { + break; + } + + aSlicesSeq.Append (aSlicePath); + } + + if (aSlicesSeq.Size() < 2) + { + Message::SendFail() << "Syntax error at '" << aNameCase << "'"; + return 1; + } + NCollection_Array1 aSlices; + aSlices.Resize (0, aSlicesSeq.Size() - 1, false); + Standard_Integer aSliceIndex = 0; + for (const TCollection_AsciiString& aSliceIter : aSlicesSeq) + { + aSlices[aSliceIndex++] = aSliceIter; + } + + toSetImage = true; + aTextureVecNew.SetValue (0, new Graphic3d_Texture3D (aSlices)); + } else if (aCommandName == "vtexture" && (aTextureVecNew.IsEmpty() || aNameCase.StartsWith ("-tex"))) @@ -4483,7 +4507,7 @@ Standard_Integer VTexture (Draw_Interpretor& theDi, Standard_Integer theArgsNb, Message::SendFail() << "Syntax error: texture with ID " << aValue << " is undefined!"; return 1; } - aTextureVecNew.SetValue (aTexIndex, new Graphic3d_Texture2Dmanual (Graphic3d_NameOfTexture2D (aValue))); + aTextureVecNew.SetValue (aTexIndex, new Graphic3d_Texture2D (Graphic3d_NameOfTexture2D (aValue))); } else if (aTexName == "?") { @@ -4507,11 +4531,11 @@ Standard_Integer VTexture (Draw_Interpretor& theDi, Standard_Integer theArgsNb, Message::SendFail() << "Syntax error: non-existing image file has been specified '" << aTexName << "'."; return 1; } - aTextureVecNew.SetValue (aTexIndex, new Graphic3d_Texture2Dmanual (aTexName)); + aTextureVecNew.SetValue (aTexIndex, new Graphic3d_Texture2D (aTexName)); } else { - aTextureVecNew.SetValue (aTexIndex, Handle(Graphic3d_Texture2Dmanual)()); + aTextureVecNew.SetValue (aTexIndex, Handle(Graphic3d_TextureMap)()); } if (aTextureVecNew.Value (aTexIndex)) @@ -4537,7 +4561,7 @@ Standard_Integer VTexture (Draw_Interpretor& theDi, Standard_Integer theArgsNb, aTextureSetNew = new Graphic3d_TextureSet (aTextureVecNew.Size()); for (Standard_Integer aTexIter = 0; aTexIter < aTextureSetNew->Size(); ++aTexIter) { - Handle(Graphic3d_Texture2Dmanual)& aTextureNew = aTextureVecNew.ChangeValue (aTexIter); + Handle(Graphic3d_TextureMap)& aTextureNew = aTextureVecNew.ChangeValue (aTexIter); Handle(Graphic3d_TextureRoot) aTextureOld; if (!aTextureSetOld.IsNull() && aTexIter < aTextureSetOld->Size()) @@ -4549,17 +4573,21 @@ Standard_Integer VTexture (Draw_Interpretor& theDi, Standard_Integer theArgsNb, && !aTextureNew.IsNull()) { *aTextureNew->GetParams() = *aTextureOld->GetParams(); - if (Handle(Graphic3d_Texture2Dmanual) anOldManualTex = Handle(Graphic3d_Texture2Dmanual)::DownCast (aTextureOld)) + + Handle(Graphic3d_Texture2D) aTex2dNew = Handle(Graphic3d_Texture2D)::DownCast (aTextureNew); + Handle(Graphic3d_Texture2D) aTex2dOld = Handle(Graphic3d_Texture2D)::DownCast (aTextureOld); + if (!aTex2dOld.IsNull() + && !aTex2dNew.IsNull()) { TCollection_AsciiString aFilePathOld, aFilePathNew; aTextureOld->Path().SystemName (aFilePathOld); aTextureNew->Path().SystemName (aFilePathNew); - if (aTextureNew->Name() == anOldManualTex->Name() + if (aTex2dNew->Name() == aTex2dOld->Name() && aFilePathOld == aFilePathNew - && (!aFilePathNew.IsEmpty() || aTextureNew->Name() != Graphic3d_NOT_2D_UNKNOWN)) + && (!aFilePathNew.IsEmpty() || aTex2dNew->Name() != Graphic3d_NOT_2D_UNKNOWN)) { --aNbChanged; - aTextureNew = anOldManualTex; + aTextureNew = aTex2dOld; } } } @@ -6816,6 +6844,7 @@ Sets default deflection coefficient (0.0008) that defines the quality of the sha addCmd ("vtexture", VTexture, /* [vtexture] */ R"( vtexture [-noupdate|-update] name [ImageFile|IdOfTexture|off] [-tex0 Image0] [-tex1 Image1] [...] + [-3d Image0 Image1 ... ImageN] [-origin {u v|off}] [-scale {u v|off}] [-repeat {u v|off}] [-trsfTrans du dv] [-trsfScale su sv] [-trsfAngle Angle] [-modulate {on|off}] [-srgb {on|off}]=on @@ -6836,6 +6865,7 @@ The options are: -setFilter Setup texture filter -setAnisoFilter Setup anisotropic filter for texture with mip-levels -default Sets texture mapping default parameters + -3d Load 3D texture from the list of 2D image files )" /* [vtexture] */); addCmd ("vtexscale", VTexture, /* [vtexscale] */ R"( diff --git a/src/ViewerTest/ViewerTest_OpenGlCommands.cxx b/src/ViewerTest/ViewerTest_OpenGlCommands.cxx index fd57606da1..d3ff434e14 100644 --- a/src/ViewerTest/ViewerTest_OpenGlCommands.cxx +++ b/src/ViewerTest/ViewerTest_OpenGlCommands.cxx @@ -411,6 +411,15 @@ static Standard_Integer VShaderProg (Draw_Interpretor& , } aProgram->SetHeader (aHeader); } + else if (!aProgram.IsNull() + && (anArg == "-defaultsampler" + || anArg == "-defampler" + || anArg == "-nodefaultsampler" + || anArg == "-nodefsampler")) + { + bool toUseDefSampler = Draw::ParseOnOffNoIterator (theArgNb, theArgVec, anArgIter); + aProgram->SetDefaultSampler (toUseDefSampler); + } else if (!anArg.StartsWith ("-") && GetMapOfAIS().IsBound2 (theArgVec[anArgIter])) { @@ -1187,6 +1196,7 @@ vshader name -vert VertexShader -frag FragmentShader [-geom GeometryShader] [-header VersionHeader] [-tessControl TessControlShader -tessEval TessEvaluationShader] [-uniform Name FloatValue] + [-defaultSampler {0|1}]=1 Assign custom GLSL program to presentation aspects. )" /* [vshader] */); diff --git a/src/ViewerTest/ViewerTest_ViewerCommands.cxx b/src/ViewerTest/ViewerTest_ViewerCommands.cxx index 3bf244970b..e660e85026 100644 --- a/src/ViewerTest/ViewerTest_ViewerCommands.cxx +++ b/src/ViewerTest/ViewerTest_ViewerCommands.cxx @@ -55,7 +55,7 @@ #include #include #include -#include +#include #include #include #include @@ -3069,7 +3069,7 @@ static int VBackground (Draw_Interpretor& theDI, if (!anImagePath.IsEmpty()) { - Handle(Graphic3d_Texture2D) aTextureMap = new Graphic3d_Texture2Dmanual (anImagePath); + Handle(Graphic3d_Texture2D) aTextureMap = new Graphic3d_Texture2D (anImagePath); aTextureMap->DisableModulate(); aTextureMap->SetColorMap (isSRgb); if (!aTextureMap->IsDone()) @@ -5897,7 +5897,7 @@ class ViewerTest_ImagePrs : public AIS_InteractiveObject aMat.SetSpecularColor (Quantity_NOC_BLACK); aMat.SetEmissiveColor (Quantity_NOC_BLACK); aFillAspect->SetFrontMaterial (aMat); - aFillAspect->SetTextureMap (new Graphic3d_Texture2Dmanual (theImage)); + aFillAspect->SetTextureMap (new Graphic3d_Texture2D (theImage)); aFillAspect->SetTextureMapOn(); } { @@ -8609,7 +8609,7 @@ static int VClipPlane (Draw_Interpretor& theDi, Standard_Integer theArgsNb, cons } TCollection_AsciiString aTextureName (aChangeArgs[1]); - Handle(Graphic3d_Texture2Dmanual) aTexture = new Graphic3d_Texture2Dmanual(aTextureName); + Handle(Graphic3d_Texture2D) aTexture = new Graphic3d_Texture2D (aTextureName); if (!aTexture->IsDone()) { aClipPlane->SetCappingTexture (NULL); diff --git a/src/XCAFPrs/XCAFPrs_Texture.cxx b/src/XCAFPrs/XCAFPrs_Texture.cxx index 3c5519cadc..178e28b7b1 100644 --- a/src/XCAFPrs/XCAFPrs_Texture.cxx +++ b/src/XCAFPrs/XCAFPrs_Texture.cxx @@ -15,7 +15,7 @@ #include -IMPLEMENT_STANDARD_RTTIEXT(XCAFPrs_Texture, Graphic3d_Texture2Dmanual) +IMPLEMENT_STANDARD_RTTIEXT(XCAFPrs_Texture, Graphic3d_Texture2D) //======================================================================= //function : XCAFPrs_Texture @@ -23,7 +23,7 @@ IMPLEMENT_STANDARD_RTTIEXT(XCAFPrs_Texture, Graphic3d_Texture2Dmanual) //======================================================================= XCAFPrs_Texture::XCAFPrs_Texture (const Image_Texture& theImageSource, const Graphic3d_TextureUnit theUnit) -: Graphic3d_Texture2Dmanual (""), +: Graphic3d_Texture2D (""), myImageSource (theImageSource) { if (!myImageSource.TextureId().IsEmpty()) diff --git a/src/XCAFPrs/XCAFPrs_Texture.hxx b/src/XCAFPrs/XCAFPrs_Texture.hxx index f950139efd..8c86b52625 100644 --- a/src/XCAFPrs/XCAFPrs_Texture.hxx +++ b/src/XCAFPrs/XCAFPrs_Texture.hxx @@ -21,9 +21,9 @@ #include //! Texture holder. -class XCAFPrs_Texture : public Graphic3d_Texture2Dmanual +class XCAFPrs_Texture : public Graphic3d_Texture2D { - DEFINE_STANDARD_RTTIEXT(XCAFPrs_Texture, Graphic3d_Texture2Dmanual) + DEFINE_STANDARD_RTTIEXT(XCAFPrs_Texture, Graphic3d_Texture2D) public: //! Constructor. diff --git a/tests/opengl/data/textures/cubemap_jpg b/tests/opengl/data/textures/cubemap_jpg index 31aa2ff052..a84122c665 100644 --- a/tests/opengl/data/textures/cubemap_jpg +++ b/tests/opengl/data/textures/cubemap_jpg @@ -17,8 +17,6 @@ vinit v -w 512 -h 512 vcamera -fovy 100 if { [checkplatform -windows] && [vdriver -default] == "TKOpenGles" } { # Mipmaps cannot be generated for GL_SRGB8 texture format - puts "TODO OCC30807 ALL: TKOpenGl | Type: Error" - puts "TODO OCC30807 ALL: Unable to generate mipmap of cubemap" } vbackground -cubemap $aCubeMap_posx $aCubeMap_negx $aCubeMap_posy $aCubeMap_negy $aCubeMap_posz $aCubeMap_negz diff --git a/tests/opengl/data/textures/texture_3d b/tests/opengl/data/textures/texture_3d new file mode 100644 index 0000000000..7abd9bae66 --- /dev/null +++ b/tests/opengl/data/textures/texture_3d @@ -0,0 +1,60 @@ +puts "========" +puts "0032862: Visualization, Graphic3d_TextureMap - add 3D texture definition" +puts "========" + +pload MODELING VISUALIZATION + +set aTex1 [locate_data_file SF_CubeMap_posx.jpg] +set aTex2 [locate_data_file SF_CubeMap_negx.jpg] +set aTex3 [locate_data_file SF_CubeMap_posy.jpg] +set aTex4 [locate_data_file SF_CubeMap_negy.jpg] +set aTex5 [locate_data_file SF_CubeMap_posz.jpg] +set aTex6 [locate_data_file SF_CubeMap_negz.jpg] + +set aShaderVert " +THE_SHADER_OUT vec3 TexCoord; +uniform float uSlice; +void main() { + float aNbSlices = 6.0; + TexCoord = occVertex.xyz; + if (uSlice >= 0.0) { TexCoord = vec3(occTexCoord.xy, uSlice * 1.0 / aNbSlices + 0.5 / aNbSlices); } + if (occTextureTrsf_Scale().y < 0.0) { TexCoord.y = 1.0 - TexCoord.y; } + gl_Position = occProjectionMatrix * occWorldViewMatrix * occModelWorldMatrix * occVertex; +}" + +set aShaderFrag " +#ifdef GL_ES + uniform mediump sampler3D occSampler0; +#else + uniform sampler3D occSampler0; +#endif +THE_SHADER_IN vec3 TexCoord; +void main() { + occFragColor = occTexture3D(occSampler0, TexCoord); +}" + +set aGlslVer "#version 110" +if { [vdriver -default] == "TKOpenGles" } { set aGlslVer "#version 300 es" } + +# draw a box +box b 1.0 1.0 1.0 +vclear +vclose ALL +vinit View1 +vaxo +vdisplay -dispMode 1 b +vfit +vrotate 0.2 0.0 0.0 + +# load 3D texture +vtexture b -3d $aTex1 $aTex2 $aTex3 $aTex4 $aTex5 $aTex6 + +# texture slices +foreach aSliceIter {0 1 2 3 4 5} { + vshaderprog b -vert $aShaderVert -frag $aShaderFrag -defaultSampler 0 -uniform "uSlice" ${aSliceIter} -header "$aGlslVer" + vdump $::imagedir/${::casename}_s${aSliceIter}.png +} + +# texture interpolation +vshaderprog b -vert $aShaderVert -frag $aShaderFrag -defaultSampler 0 -uniform "uSlice" -1 -header "$aGlslVer" +vdump $::imagedir/${::casename}_def.png From acce2c1448254a2e57cc940dc479a795dcc3f5f0 Mon Sep 17 00:00:00 2001 From: vro Date: Tue, 22 Feb 2022 17:00:09 +0300 Subject: [PATCH 230/639] 0032796: Modeling Data - Calculation of distance between two circles crashes Modified: - Extrema_ExtCC.cxx, the method PrepareParallelResult() - angular tolerance is increased. Added: - A test: lowalgos extcc bug32796 --- src/Extrema/Extrema_ExtCC.cxx | 3 +-- tests/lowalgos/extcc/bug32796 | 15 +++++++++++++++ 2 files changed, 16 insertions(+), 2 deletions(-) create mode 100644 tests/lowalgos/extcc/bug32796 diff --git a/src/Extrema/Extrema_ExtCC.cxx b/src/Extrema/Extrema_ExtCC.cxx index d19c246472..389e2a0dde 100644 --- a/src/Extrema/Extrema_ExtCC.cxx +++ b/src/Extrema/Extrema_ExtCC.cxx @@ -663,7 +663,7 @@ void Extrema_ExtCC::PrepareParallelResult(const Standard_Real theUt11, // myIsParallel = TRUE and only the least distance will be returned. //4. Arcs are not parallel. Then several (or single) extremas will be returned. - if (aRng.Delta() > Precision::Angular()) + if (aRng.Delta() > Precision::Confusion()) { Standard_Real aPar = 0.0; aRng.GetIntermediatePoint(0.5, aPar); @@ -703,7 +703,6 @@ void Extrema_ExtCC::PrepareParallelResult(const Standard_Real theUt11, break; } } - //Nearer solution can be found } else if (!aRng.IsVoid()) diff --git a/tests/lowalgos/extcc/bug32796 b/tests/lowalgos/extcc/bug32796 new file mode 100644 index 0000000000..bc862c10d7 --- /dev/null +++ b/tests/lowalgos/extcc/bug32796 @@ -0,0 +1,15 @@ +puts "============" +puts "OCC32796: Modeling Data - Calculation of distance between two circles crashes" +puts "============" +puts "" + +restore [locate_data_file bug32796e1.brep] e1 +restore [locate_data_file bug32796e2.brep] e2 +mkcurve c1 e1 +mkcurve c2 e2 + +if [catch { extrema c1 c2 }] { + puts "Calculation of distance between two circles crashes" +} else { + puts "Calculation of distance between two circles is OK" +} From 8ca58a51a710e3024b0c6bcf21c01fc2181a6cf8 Mon Sep 17 00:00:00 2001 From: kgv Date: Mon, 7 Mar 2022 02:13:22 +0300 Subject: [PATCH 231/639] 0032866: Visualization, TKOpenGles - FitAll() is broken when performance counters are displayed OpenGl_View::MinMaxValues() - added missing theToIncludeAuxiliary check. --- src/OpenGl/OpenGl_View.cxx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/OpenGl/OpenGl_View.cxx b/src/OpenGl/OpenGl_View.cxx index 54cc8b48b2..375e366f02 100644 --- a/src/OpenGl/OpenGl_View.cxx +++ b/src/OpenGl/OpenGl_View.cxx @@ -805,7 +805,9 @@ Bnd_Box OpenGl_View::MinMaxValues (const Standard_Boolean theToIncludeAuxiliary) Bnd_Box aBox = base_type::MinMaxValues (theToIncludeAuxiliary); // make sure that stats overlay isn't clamped on hardware with unavailable depth clamping - if (myRenderParams.ToShowStats && !myWorkspace->GetGlContext()->arbDepthClamp) + if (theToIncludeAuxiliary + && myRenderParams.ToShowStats + && !myWorkspace->GetGlContext()->arbDepthClamp) { Bnd_Box aStatsBox (gp_Pnt (float(myWindow->Width() / 2.0), float(myWindow->Height() / 2.0), 0.0), gp_Pnt (float(myWindow->Width() / 2.0), float(myWindow->Height() / 2.0), 0.0)); From 802180e1a5f3e9fd61b6bb4bda67764dc9c41aca Mon Sep 17 00:00:00 2001 From: jgv Date: Sat, 12 Mar 2022 22:35:55 +0300 Subject: [PATCH 232/639] 0032719: Modelling Algorithms - UnifySameDomain result has incorrect triangulation Correct method ShapeUpgrade_UnifySameDomain::UnionPCurves: reparametrize unified pcurves to fit the new range of 3D-curve. --- .../ShapeUpgrade_UnifySameDomain.cxx | 96 +++++++++---------- tests/bugs/heal/bug32719 | 20 ++++ 2 files changed, 68 insertions(+), 48 deletions(-) create mode 100644 tests/bugs/heal/bug32719 diff --git a/src/ShapeUpgrade/ShapeUpgrade_UnifySameDomain.cxx b/src/ShapeUpgrade/ShapeUpgrade_UnifySameDomain.cxx index f52a1315f4..f48c390f0f 100644 --- a/src/ShapeUpgrade/ShapeUpgrade_UnifySameDomain.cxx +++ b/src/ShapeUpgrade/ShapeUpgrade_UnifySameDomain.cxx @@ -23,6 +23,7 @@ #include #include #include +#include #include #include #include @@ -1614,9 +1615,6 @@ void ShapeUpgrade_UnifySameDomain::UnionPCurves(const TopTools_SequenceOfShape& if (isFound) continue; - Standard_Real aFirst, aLast; - Handle(Geom2d_Curve) aPCurve = BRep_Tool::CurveOnSurface (aFirstEdge, aFace, aFirst, aLast); - aFaceSeq.Append (aFace); } @@ -1661,6 +1659,9 @@ void ShapeUpgrade_UnifySameDomain::UnionPCurves(const TopTools_SequenceOfShape& if (aPCurveSeq.IsEmpty()) { Handle(Geom2d_Curve) aCopyPCurve = Handle(Geom2d_Curve)::DownCast(aPCurve->Copy()); + if (aCopyPCurve->IsKind(STANDARD_TYPE(Geom2d_TrimmedCurve))) + aCopyPCurve = (Handle(Geom2d_TrimmedCurve)::DownCast(aCopyPCurve))->BasisCurve(); + aPCurveSeq.Append(aCopyPCurve); aFirstsSeq.Append(aFirst); aLastsSeq.Append(aLast); @@ -1735,6 +1736,9 @@ void ShapeUpgrade_UnifySameDomain::UnionPCurves(const TopTools_SequenceOfShape& else { Handle(Geom2d_Curve) aCopyPCurve = Handle(Geom2d_Curve)::DownCast(aPCurve->Copy()); + if (aCopyPCurve->IsKind(STANDARD_TYPE(Geom2d_TrimmedCurve))) + aCopyPCurve = (Handle(Geom2d_TrimmedCurve)::DownCast(aCopyPCurve))->BasisCurve(); + aPCurveSeq.Append(aCopyPCurve); aFirstsSeq.Append(aFirst); aLastsSeq.Append(aLast); @@ -1855,57 +1859,53 @@ void ShapeUpgrade_UnifySameDomain::UnionPCurves(const TopTools_SequenceOfShape& } } - //Reparametrize 3d curve if needed + //Reparametrize pcurves if needed if (!ResPCurves.IsEmpty()) { - if (Abs (aFirst3d - ResFirsts(1)) > aMaxTol || - Abs (aLast3d - ResLasts(1)) > aMaxTol) + for (Standard_Integer ii = 1; ii <= ResPCurves.Length(); ii++) { - GeomAdaptor_Curve aGAcurve (aCurve); - GeomAbs_CurveType aType = aGAcurve.GetType(); - if (aType == GeomAbs_Line) - { - gp_Lin aLin = aGAcurve.Line(); - gp_Dir aDir = aLin.Direction(); - gp_Pnt aPnt = aGAcurve.Value (aFirst3d); - gp_Vec anOffset = -aDir; - anOffset *= ResFirsts(1); - aPnt.Translate (anOffset); - Handle(Geom_Line) aLine = new Geom_Line (aPnt, aDir); - aBuilder.UpdateEdge (theEdge, aLine, aTolEdge); - aBuilder.Range(theEdge, ResFirsts(1), ResLasts(1)); - } - else if (aType == GeomAbs_Circle) - { - gp_Circ aCirc = aGAcurve.Circle(); - Standard_Real aRadius = aCirc.Radius(); - gp_Ax2 aPosition = aCirc.Position(); - gp_Ax1 anAxis = aPosition.Axis(); - Standard_Real anOffset = aFirst3d - ResFirsts(1); - aPosition.Rotate (anAxis, anOffset); - Handle(Geom_Circle) aCircle = new Geom_Circle (aPosition, aRadius); - aBuilder.UpdateEdge (theEdge, aCircle, aTolEdge); - aBuilder.Range(theEdge, ResFirsts(1), ResLasts(1)); - } - else //general case + if (Abs (aFirst3d - ResFirsts(ii)) > aMaxTol || + Abs (aLast3d - ResLasts(ii)) > aMaxTol) { - for (Standard_Integer ii = 1; ii <= ResPCurves.Length(); ii++) + Geom2dAdaptor_Curve aGAcurve (ResPCurves(ii)); + GeomAbs_CurveType aType = aGAcurve.GetType(); + if (aType == GeomAbs_Line) { - if (Abs (aFirst3d - ResFirsts(ii)) > Precision::Confusion() || - Abs (aLast3d - ResLasts(ii)) > Precision::Confusion()) - { - Handle(Geom2d_TrimmedCurve) aTrPCurve = - new Geom2d_TrimmedCurve (ResPCurves(ii), ResFirsts(ii), ResLasts(ii)); - Handle(Geom2d_BSplineCurve) aBSplinePCurve = Geom2dConvert::CurveToBSplineCurve(aTrPCurve); - TColStd_Array1OfReal aKnots (1, aBSplinePCurve->NbKnots()); - aBSplinePCurve->Knots (aKnots); - BSplCLib::Reparametrize (aFirst3d, aLast3d, aKnots); - aBSplinePCurve->SetKnots (aKnots); - ResPCurves(ii) = aBSplinePCurve; - } + gp_Lin2d aLin2d = aGAcurve.Line(); + gp_Dir2d aDir2d = aLin2d.Direction(); + gp_Pnt2d aPnt2d = aGAcurve.Value(ResFirsts(ii)); + gp_Vec2d anOffset = -aDir2d; + anOffset *= aFirst3d; + aPnt2d.Translate (anOffset); + Handle(Geom2d_Line) aNewLine2d = new Geom2d_Line (aPnt2d, aDir2d); + ResPCurves(ii) = aNewLine2d; } - } - } + else if (aType == GeomAbs_Circle) + { + gp_Circ2d aCirc2d = aGAcurve.Circle(); + Standard_Real aRadius = aCirc2d.Radius(); + gp_Ax22d aPosition = aCirc2d.Position(); + gp_Pnt2d aLocation = aCirc2d.Location(); + Standard_Real anOffset = ResFirsts(ii) - aFirst3d; + aPosition.Rotate (aLocation, anOffset); + Handle(Geom2d_Circle) aNewCircle2d = new Geom2d_Circle (aPosition, aRadius); + ResPCurves(ii) = aNewCircle2d; + } + else //general case + { + Handle(Geom2d_TrimmedCurve) aTrPCurve = + new Geom2d_TrimmedCurve (ResPCurves(ii), ResFirsts(ii), ResLasts(ii)); + Handle(Geom2d_BSplineCurve) aBSplinePCurve = Geom2dConvert::CurveToBSplineCurve(aTrPCurve); + TColStd_Array1OfReal aKnots (1, aBSplinePCurve->NbKnots()); + aBSplinePCurve->Knots (aKnots); + BSplCLib::Reparametrize (aFirst3d, aLast3d, aKnots); + aBSplinePCurve->SetKnots (aKnots); + ResPCurves(ii) = aBSplinePCurve; + } + ResFirsts(ii) = aFirst3d; + ResLasts(ii) = aLast3d; + } //if ranges > aMaxTol + } //for (Standard_Integer ii = 1; ii <= ResPCurves.Length(); ii++) } for (Standard_Integer j = 1; j <= ResPCurves.Length(); j++) diff --git a/tests/bugs/heal/bug32719 b/tests/bugs/heal/bug32719 new file mode 100644 index 0000000000..69d6292bb0 --- /dev/null +++ b/tests/bugs/heal/bug32719 @@ -0,0 +1,20 @@ +puts "============================================================" +puts "OCC32719: UnifySameDomain result has incorrect triangulation" +puts "============================================================" +puts "" + +restore [locate_data_file bug32719.brep] a + +unifysamedom result a + +checkshape result + +checknbshapes result -t -solid 4 -shell 4 -face 20 -wire 20 -edge 32 -vertex 16 + +set tolres [checkmaxtol result] + +if { ${tolres} > 6.e-6} { + puts "Error: bad tolerance of result" +} + +checkprops result -s 0.0222593 -v 5.17261e-05 From 7573a45deb1a2d84632e7bbd373222288de682eb Mon Sep 17 00:00:00 2001 From: mpv Date: Mon, 14 Mar 2022 18:03:59 +0300 Subject: [PATCH 233/639] 0032870: Tests - bugs/caf/bug31918_1 is unstable Improved the test stability: created 10 iterations of measurements and take the minimum to minimize the affect of other processes and threads; increased the compare range of the quarter and the whole of the document load. --- tests/bugs/caf/bug31918_1 | 39 +++++++++++++++++++++++++-------------- 1 file changed, 25 insertions(+), 14 deletions(-) diff --git a/tests/bugs/caf/bug31918_1 b/tests/bugs/caf/bug31918_1 index 35e358f766..131529f2fe 100644 --- a/tests/bugs/caf/bug31918_1 +++ b/tests/bugs/caf/bug31918_1 @@ -27,27 +27,37 @@ CommitCommand D0 SaveAs D0 ${docname} Close D0 -set whole_time [lindex [time { - Open ${docname} D1 - Close D1 -} 20] 0] +# Computes the elapsed time of open and close document with a given arguments (as text). +# It launches 10 iteration, 10 actions in each. Returns time of average time of the minimum-time iteration. +proc action_time args { + global docname + set min_time 1000000 + for {set iter 0} {$iter < 10} {incr iter} { + set iter_time [lindex [time { + Open ${docname} D {*}$args + Close D + } 10] 0] + puts "Iteration time $iter_time mcs" + if {$iter_time < $min_time} { + set min_time $iter_time + } + } + + return $min_time +} + +set whole_time [action_time] puts "Whole document open time $whole_time mcs" -set quater_time [lindex [time { - Open ${docname} D2 -read0:2 - Close D2 -} 20] 0] +set quater_time [action_time -read0:2] puts "Quater of document open time $quater_time mcs" -# Check that open of quater of the document is at least twice faster than open of whole. -if { [expr $quater_time * 2] > $whole_time } { +# Check that open of quater of the document is significantly faster than open of whole. +if { [expr $quater_time * 1.75] > $whole_time } { puts "Error : loading of quater of the document content too slow relatively to the whole document load" } -set four_quaters_time [lindex [time { - Open ${docname} D3 -read0:1 -read0:2 -read0:3 -read0:4 - Close D3 -} 20] 0] +set four_quaters_time [action_time -read0:1 -read0:2 -read0:3 -read0:4] puts "Four quaters of document open time $four_quaters_time mcs" # Check that open of four quaters of the document is not too much slower than opening of the whole document. @@ -69,6 +79,7 @@ if {![catch {Attributes D4 0:1:1:13}] || ![catch {Attributes D4 0:1:3:14}] || ![ puts "Error : loading of document skipping arrays and sub-trees contains invalid attributes list" } +# check for appending arrays to the document from the file set append_arrays_time [lindex [time { Open ${docname} D4 -append -readTDataStd_IntegerArray -read0:2 -read0:3 }] 0] From 9140163ba8726a0a2ff30c459668f9c9ff78ddd0 Mon Sep 17 00:00:00 2001 From: azv Date: Fri, 19 Feb 2021 22:34:56 +0300 Subject: [PATCH 234/639] 0032066: Modeling Algorithms - Incorrect result of Boolean CUT operation Do not limit the normalization factor of the highly anisotropic parametric space when filtering start points in the algorithm of walking line construction. Additionally check the knots are in the increasing orders when merging two B-spline curves --- .../GeomConvert_CompCurveToBSplineCurve.cxx | 11 ++------ src/IntWalk/IntWalk_IWalking_2.gxx | 11 ++++++-- tests/bugs/modalg_7/bug32066 | 26 +++++++++++++++++++ tests/hlr/exact_hlr/bug27979_6 | 2 +- 4 files changed, 38 insertions(+), 12 deletions(-) create mode 100644 tests/bugs/modalg_7/bug32066 diff --git a/src/GeomConvert/GeomConvert_CompCurveToBSplineCurve.cxx b/src/GeomConvert/GeomConvert_CompCurveToBSplineCurve.cxx index addfba1ec8..93dc628426 100644 --- a/src/GeomConvert/GeomConvert_CompCurveToBSplineCurve.cxx +++ b/src/GeomConvert/GeomConvert_CompCurveToBSplineCurve.cxx @@ -132,7 +132,7 @@ void GeomConvert_CompCurveToBSplineCurve::Add( if (SecondCurve->Degree() < Deg) { SecondCurve->IncreaseDegree(Deg); } // Declarationd - Standard_Real L1, L2, U_de_raccord; + Standard_Real L1, L2; Standard_Integer ii, jj; Standard_Real Ratio=1, Ratio1, Ratio2, Delta1, Delta2; Standard_Integer NbP1 = FirstCurve->NbPoles(), NbP2 = SecondCurve->NbPoles(); @@ -159,7 +159,6 @@ void GeomConvert_CompCurveToBSplineCurve::Add( Delta1 = 0; Ratio2 = 1/Ratio; Delta2 = Ratio2*SecondCurve->Knot(1) - FirstCurve->Knot(NbK1); - U_de_raccord = FirstCurve->LastParameter(); } else { // On ne bouge pas la seconde courbe @@ -167,12 +166,11 @@ void GeomConvert_CompCurveToBSplineCurve::Add( Delta1 = Ratio1*FirstCurve->Knot(NbK1) - SecondCurve->Knot(1); Ratio2 = 1; Delta2 = 0; - U_de_raccord = SecondCurve->FirstParameter(); } // Les Noeuds Standard_Real eps; - for (ii=1; iiKnot(ii) - Delta1; if(ii > 1) { eps = Epsilon (Abs(Noeuds(ii-1))); @@ -183,11 +181,6 @@ void GeomConvert_CompCurveToBSplineCurve::Add( } Mults(ii) = FirstCurve->Multiplicity(ii); } - Noeuds(NbK1) = U_de_raccord; - eps = Epsilon (Abs(Noeuds(NbK1-1))); - if(Noeuds(NbK1) - Noeuds(NbK1-1) <= eps) { - Noeuds(NbK1) += eps; - } Mults(NbK1) = FirstCurve->Degree(); for (ii=2, jj=NbK1+1; ii<=NbK2; ii++, jj++) { Noeuds(jj) = Ratio2*SecondCurve->Knot(ii) - Delta2; diff --git a/src/IntWalk/IntWalk_IWalking_2.gxx b/src/IntWalk/IntWalk_IWalking_2.gxx index 2e5d7f0cdd..4e9933ad8c 100644 --- a/src/IntWalk/IntWalk_IWalking_2.gxx +++ b/src/IntWalk/IntWalk_IWalking_2.gxx @@ -400,8 +400,15 @@ Standard_Boolean IntWalk_IWalking::TestArretPassage //Normalizing factor. If it is less than 1.0 then the range will be expanded. //This is no good for computation. Therefore, it is limited. - const Standard_Real deltau = mySRangeU.IsVoid() ? UM - Um : Max(mySRangeU.Delta(), 1.0); - const Standard_Real deltav = mySRangeV.IsVoid() ? VM - Vm : Max(mySRangeV.Delta(), 1.0); + //Do not limit this factor in case of highly anisotropic parametrization + //(parametric space is considerably larger in one direction than another). + const Standard_Boolean isHighlyAnisotropic = Max(tolu, tolv) > 1000. * Min(tolu, tolv); + const Standard_Real deltau = mySRangeU.IsVoid() ? UM - Um + : (isHighlyAnisotropic ? mySRangeU.Delta() + : Max(mySRangeU.Delta(), 1.0)); + const Standard_Real deltav = mySRangeV.IsVoid() ? VM - Vm + : (isHighlyAnisotropic ? mySRangeV.Delta() + : Max(mySRangeV.Delta(), 1.0)); Up/=deltau; UV1/=deltau; Vp/=deltav; UV2/=deltav; diff --git a/tests/bugs/modalg_7/bug32066 b/tests/bugs/modalg_7/bug32066 new file mode 100644 index 0000000000..5f0b0c080b --- /dev/null +++ b/tests/bugs/modalg_7/bug32066 @@ -0,0 +1,26 @@ +puts "=======================================================" +puts "0032066: Modeling Algorithms - Incorrect result of Boolean CUT operation" +puts "=======================================================" +puts "" + +restore [locate_data_file bug32066_solid.brep] s + +restore [locate_data_file bug32066_hole_2547.brep] h1 +restore [locate_data_file bug32066_hole_2562.brep] h2 +restore [locate_data_file bug32066_hole_2563.brep] h3 +restore [locate_data_file bug32066_hole_2564.brep] h4 + +bclearobjects +bcleartools +baddobjects s +baddtools h1 h2 h3 h4 +bfillds + +bbop r 2 + +checkshape r + +checknbshapes r -wire 73 -face 65 -shell 1 -solid 1 -t +checkprops r -s 3.45489e+07 -v 1.54742e+08 + +checkview -display r -2d -path ${imagedir}/${test_image}.png diff --git a/tests/hlr/exact_hlr/bug27979_6 b/tests/hlr/exact_hlr/bug27979_6 index c758e0c073..19e579ab70 100644 --- a/tests/hlr/exact_hlr/bug27979_6 +++ b/tests/hlr/exact_hlr/bug27979_6 @@ -1,4 +1,4 @@ -puts "TODO OCC30286 ALL: Error : The length of result shape is 227257, expected 11." +puts "TODO OCC30286 ALL: Error : The length of result shape is" puts "========================================================================" puts "OCC27979: Parasolid converted BREP shows weird lines on hidden line Algo" From 452ba192d5cd1ebcab77a397f310e60f6092d0fe Mon Sep 17 00:00:00 2001 From: atychini Date: Mon, 7 Feb 2022 15:57:38 +0300 Subject: [PATCH 235/639] 0032817: Data Exchange - Step export - writing untrimmed Curve Incorrect curve handling. If curve doesn't have trims and vertexes, we handle it such as trimmed curve, but it should be a simple curve. Curves with only one vertex and one trim should handle by another way, such as a curve that has trims but doesn't have vertexes. So I added conditions which handles these cases --- .../TopoDSToStep_WireframeBuilder.cxx | 242 ++++++++++-------- tests/bugs/step/bug32817_1 | 13 + tests/bugs/step/bug32817_2 | 13 + tests/bugs/step/bug32817_3 | 13 + 4 files changed, 173 insertions(+), 108 deletions(-) create mode 100644 tests/bugs/step/bug32817_1 create mode 100644 tests/bugs/step/bug32817_2 create mode 100644 tests/bugs/step/bug32817_3 diff --git a/src/TopoDSToStep/TopoDSToStep_WireframeBuilder.cxx b/src/TopoDSToStep/TopoDSToStep_WireframeBuilder.cxx index ed6f735337..9fd8d9dafb 100644 --- a/src/TopoDSToStep/TopoDSToStep_WireframeBuilder.cxx +++ b/src/TopoDSToStep/TopoDSToStep_WireframeBuilder.cxx @@ -151,166 +151,192 @@ static Handle(StepGeom_TrimmedCurve) MakeTrimmedCurve (const Handle(StepGeom_Cur } Standard_Boolean TopoDSToStep_WireframeBuilder:: - GetTrimmedCurveFromEdge(const TopoDS_Edge& theEdge, - const TopoDS_Face& aFace, - MoniTool_DataMapOfShapeTransient& aMap, - Handle(TColStd_HSequenceOfTransient)& curveList) const + GetTrimmedCurveFromEdge(const TopoDS_Edge& theEdge, + const TopoDS_Face& theFace, + MoniTool_DataMapOfShapeTransient& theMap, + Handle(TColStd_HSequenceOfTransient)& theCurveList) const { - if (theEdge.Orientation() == TopAbs_INTERNAL || - theEdge.Orientation() == TopAbs_EXTERNAL ) { + if (theEdge.Orientation() == TopAbs_INTERNAL || + theEdge.Orientation() == TopAbs_EXTERNAL ) + { #ifdef OCCT_DEBUG std::cout <<"Warning: TopoDSToStep_WireframeBuilder::GetTrimmedCurveFromEdge: Edge is internal or external; dropped" << std::endl; #endif return Standard_False; } //szv#4:S4163:12Mar99 SGI warns - TopoDS_Shape sh = theEdge.Oriented(TopAbs_FORWARD); - TopoDS_Edge anEdge = TopoDS::Edge ( sh ); + TopoDS_Shape aSh = theEdge.Oriented(TopAbs_FORWARD); + TopoDS_Edge anEdge = TopoDS::Edge ( aSh ); // resulting curve - Handle(StepGeom_Curve) Gpms; - - if ( aMap.IsBound(anEdge)) { - Gpms = Handle(StepGeom_Curve)::DownCast ( aMap.Find(anEdge) ); - if ( Gpms.IsNull() ) return Standard_False; -//?? curveList->Append(Gpms); - return Standard_True; + Handle(StepGeom_Curve) aSGC; + if (const Handle(Standard_Transient)* aTransient = theMap.Seek(anEdge)) + { + aSGC = Handle(StepGeom_Curve)::DownCast(*aTransient); } - BRepAdaptor_Curve CA; - try { + BRepAdaptor_Curve aCA; + try + { OCC_CATCH_SIGNALS - CA.Initialize (anEdge); + aCA.Initialize (anEdge); } - catch (Standard_NullObject const&) { + catch (Standard_NullObject const&) + { return Standard_False; } - // Vertices - TopoDS_Vertex Vfirst, Vlast; - Handle(StepGeom_CartesianPoint) pmsP1, pmsP2; - for (TopoDS_Iterator It(anEdge);It.More();It.Next()) { - // Translates the Edge Vertices - TopoDS_Vertex V = TopoDS::Vertex(It.Value()); - gp_Pnt gpP = BRep_Tool::Pnt(V); - if ( V.Orientation() == TopAbs_FORWARD ) { - Vfirst = V; + TopoDS_Vertex aVFirst, aVLast; + Handle(StepGeom_CartesianPoint) aSGCP1, aSGCP2; + for (TopExp_Explorer anExp(anEdge, TopAbs_VERTEX); anExp.More(); anExp.Next()) + { + TopoDS_Vertex aVertex = TopoDS::Vertex(anExp.Value()); + gp_Pnt aGpP = BRep_Tool::Pnt(aVertex); + if (aVertex.Orientation() == TopAbs_FORWARD) + { + aVFirst = aVertex; // 1.point for trimming - GeomToStep_MakeCartesianPoint gtpP(gpP); - pmsP1 = gtpP.Value(); + GeomToStep_MakeCartesianPoint aGTSMCP(aGpP); + aSGCP1 = aGTSMCP.Value(); } - if ( V.Orientation() == TopAbs_REVERSED ) { - Vlast = V; + if (aVertex.Orientation() == TopAbs_REVERSED) + { + aVLast = aVertex; // 2.point for trimming - GeomToStep_MakeCartesianPoint gtpP(gpP); - pmsP2 = gtpP.Value(); + GeomToStep_MakeCartesianPoint aGTSMCP(aGpP); + aSGCP2 = aGTSMCP.Value(); } } - - // --------------------------------------- - // Translate 3D representation of the Edge - // --------------------------------------- - - - // Handle(Geom_Curve) C = CA.Curve().Curve(); - - // UPDATE FMA 26-02-96 - // General remark : this full code should be deaply reworked - // Too many objects are not used ! - Standard_Real First, Last; - Handle(Geom_Curve) C = BRep_Tool::Curve(anEdge, First, Last); - if ( ! C.IsNull() ) { - if (C->IsKind(STANDARD_TYPE(Geom_TrimmedCurve))) - C = Handle(Geom_TrimmedCurve)::DownCast(C)->BasisCurve(); - GeomToStep_MakeCurve gtpC(C); + Standard_Real aFirst, aLast; + Handle(Geom_Curve) aC = BRep_Tool::Curve(anEdge, aFirst, aLast); - if(!gtpC.IsDone()) + if (!aC.IsNull()) + { + if (aC->IsKind(STANDARD_TYPE(Geom_TrimmedCurve))) + { + aC = Handle(Geom_TrimmedCurve)::DownCast(aC)->BasisCurve(); + } + GeomToStep_MakeCurve aGTSMC(aC); + if (!aGTSMC.IsDone()) + { return Standard_False; - - Handle(StepGeom_Curve) pmsC = gtpC.Value(); + } + Handle(StepGeom_Curve) aPMSC = aGTSMC.Value(); // trim the curve - Standard_Real trim1 = CA.FirstParameter(); - Standard_Real trim2 = CA.LastParameter(); -/* //:j1 abv 22 Oct 98: radians are used in the produced STEP file (at least by default) - if(C->IsKind(STANDARD_TYPE(Geom_Circle)) || - C->IsKind(STANDARD_TYPE(Geom_Ellipse))) { - Standard_Real fact = 180. / M_PI; - trim1 = trim1 * fact; - trim2 = trim2 * fact; + Standard_Real aTrim1 = aCA.FirstParameter(); + Standard_Real aTrim2 = aCA.LastParameter(); + + if (aVFirst.IsNull() && aVLast.IsNull() && Precision::IsInfinite(aFirst) && Precision::IsInfinite(aLast)) + { + GeomToStep_MakeCurve aCurveMaker(aC); + if (aCurveMaker.IsDone()) + { + aSGC = aCurveMaker.Value(); + theCurveList->Append(aSGC); + return Standard_True; + } + return Standard_False; + } + if (aVFirst.IsNull()) + { + GeomToStep_MakeCartesianPoint aGTSMCP(aCA.Value(aFirst)); + aSGCP1 = aGTSMCP.Value(); } -*/ - Gpms = MakeTrimmedCurve (pmsC, pmsP1, pmsP2, trim1, trim2, Standard_True ); -// (anEdge.Orientation() == TopAbs_FORWARD)); + if (aVLast.IsNull()) + { + GeomToStep_MakeCartesianPoint aGTSMCP(aCA.Value(aLast)); + aSGCP2 = aGTSMCP.Value(); + } + + /* //:j1 abv 22 Oct 98: radians are used in the produced STEP file (at least by default) + if(C->IsKind(STANDARD_TYPE(Geom_Circle)) || + C->IsKind(STANDARD_TYPE(Geom_Ellipse))) { + Standard_Real fact = 180. / M_PI; + trim1 = trim1 * fact; + trim2 = trim2 * fact; + } + */ + aSGC = MakeTrimmedCurve(aPMSC, aSGCP1, aSGCP2, aTrim1, aTrim2, Standard_True); } - else { + else + { // ------------------------- // a 3D Curve is constructed // ------------------------- - Standard_Boolean iaplan = Standard_False; - if ( ! aFace.IsNull() ) { - Standard_Real cf, cl; - Handle(Geom2d_Curve) C2d = BRep_Tool::CurveOnSurface(anEdge, aFace, cf, cl); - Handle(Geom_Surface) S = BRep_Tool::Surface(aFace); - if (S->IsKind(STANDARD_TYPE(Geom_Plane)) && - C2d->IsKind(STANDARD_TYPE(Geom2d_Line))) iaplan = Standard_True; + Standard_Boolean aIPlan = Standard_False; + if (!theFace.IsNull()) + { + Standard_Real aCF, aCL; + Handle(Geom2d_Curve) aC2d = BRep_Tool::CurveOnSurface(anEdge, theFace, aCF, aCL); + Handle(Geom_Surface) aS = BRep_Tool::Surface(theFace); + if (aS->IsKind(STANDARD_TYPE(Geom_Plane)) && aC2d->IsKind(STANDARD_TYPE(Geom2d_Line))) + { + aIPlan = Standard_True; + } } // to be modified : cf and cl are the topological trimming parameter // these are computed after ! (U1 and U2) -> cf and cl instead - if (iaplan) { - gp_Pnt Pnt1 = CA.Value(CA.FirstParameter()), Pnt2 = CA.Value(CA.LastParameter()); - gp_Vec V ( Pnt1, Pnt2 ); - Standard_Real length = V.Magnitude(); - if ( length >= Precision::Confusion() ) { - Handle(Geom_Line) L = new Geom_Line(Pnt1, gp_Dir(V)); - GeomToStep_MakeLine gtpL(L); - Gpms = gtpL.Value(); - Gpms = MakeTrimmedCurve (gtpL.Value(), pmsP1, pmsP2, 0, length, Standard_True ); -// (anEdge.Orientation() == TopAbs_FORWARD)); + if (aIPlan) + { + gp_Pnt aPnt1 = aCA.Value(aCA.FirstParameter()), aPnt2 = aCA.Value(aCA.LastParameter()); + gp_Vec aV(aPnt1, aPnt2); + Standard_Real aLength = aV.Magnitude(); + if (aLength >= Precision::Confusion()) + { + Handle(Geom_Line) aL = new Geom_Line(aPnt1, gp_Dir(aV)); + GeomToStep_MakeLine aGTSML(aL); + aSGC = aGTSML.Value(); + aSGC = MakeTrimmedCurve(aGTSML.Value(), aSGCP1, aSGCP2, 0, aLength, Standard_True); } #ifdef OCCT_DEBUG else std::cout << "Warning: TopoDSToStep_WireframeBuilder::GetTrimmedCurveFromEdge: Null-length curve not mapped" << std::endl; #endif } - else { - TColgp_Array1OfPnt Points(1,Nbpt); - TColStd_Array1OfReal Knots(1,Nbpt); - TColStd_Array1OfInteger Mult(1,Nbpt); - Standard_Real U1 = CA.FirstParameter(); - Standard_Real U2 = CA.LastParameter(); - for ( Standard_Integer i=1; i<=Nbpt; i++ ) { - Standard_Real U = U1 + (i-1)*(U2 - U1)/(Nbpt - 1); - gp_Pnt P = CA.Value(U); - Points.SetValue(i,P); - Knots.SetValue(i,U); - Mult.SetValue(i,1); + else + { + TColgp_Array1OfPnt aPoints(1, Nbpt); + TColStd_Array1OfReal aKnots(1, Nbpt); + TColStd_Array1OfInteger aMult(1, Nbpt); + Standard_Real aU1 = aCA.FirstParameter(); + Standard_Real aU2 = aCA.LastParameter(); + for (Standard_Integer i = 1; i <= Nbpt; i++) + { + Standard_Real aU = aU1 + (i - 1) * (aU2 - aU1) / (Nbpt - 1); + gp_Pnt aP = aCA.Value(aU); + aPoints.SetValue(i, aP); + aKnots.SetValue(i, aU); + aMult.SetValue(i, 1); } - Points.SetValue(1, BRep_Tool::Pnt(Vfirst)); - Points.SetValue(Nbpt, BRep_Tool::Pnt(Vlast)); - Mult.SetValue(1,2); - Mult.SetValue(Nbpt,2); - Handle(Geom_Curve) Bs = - new Geom_BSplineCurve(Points, Knots, Mult, 1); - GeomToStep_MakeCurve gtpC(Bs); - Gpms = gtpC.Value(); + aPoints.SetValue(1, BRep_Tool::Pnt(aVFirst)); + aPoints.SetValue(Nbpt, BRep_Tool::Pnt(aVLast)); + aMult.SetValue(1, 2); + aMult.SetValue(Nbpt, 2); + Handle(Geom_Curve) aBSCurve = new Geom_BSplineCurve(aPoints, aKnots, aMult, 1); + GeomToStep_MakeCurve aGTSMC(aBSCurve); + aSGC = aGTSMC.Value(); } } - if( Gpms.IsNull() ) return Standard_False; - aMap.Bind(anEdge, Gpms); - curveList->Append(Gpms); + if (aSGC.IsNull()) + { + return Standard_False; + } + + theMap.Bind(anEdge, aSGC); + theCurveList->Append(aSGC); return Standard_True; } Standard_Boolean TopoDSToStep_WireframeBuilder:: GetTrimmedCurveFromFace(const TopoDS_Face& aFace, - MoniTool_DataMapOfShapeTransient& aMap, - Handle(TColStd_HSequenceOfTransient)& aCurveList) const + MoniTool_DataMapOfShapeTransient& aMap, + Handle(TColStd_HSequenceOfTransient)& aCurveList) const { TopoDS_Shape curShape; TopoDS_Edge curEdge; diff --git a/tests/bugs/step/bug32817_1 b/tests/bugs/step/bug32817_1 new file mode 100644 index 0000000000..20c191ea8c --- /dev/null +++ b/tests/bugs/step/bug32817_1 @@ -0,0 +1,13 @@ +puts "================" +puts "0032817: Data Exchange - Step export - writing untrimmed Curve" +puts "================" + +pload XDE + +catch {Close D} +XNewDoc D +line l1 0 0 0 0 1 0 +mkedge e1 l1 +XAddShape D e1 +WriteStep D $imagedir/${casename}.stp +file delete $imagedir/${casename}.stp diff --git a/tests/bugs/step/bug32817_2 b/tests/bugs/step/bug32817_2 new file mode 100644 index 0000000000..147f5c6ba1 --- /dev/null +++ b/tests/bugs/step/bug32817_2 @@ -0,0 +1,13 @@ +puts "================" +puts "0032817: Data Exchange - Step export - writing untrimmed Curve" +puts "================" + +pload XDE + +catch {Close D} +XNewDoc D +line l1 0 0 0 0 1 0 +mkedge e1 l1 10 2e+100 +XAddShape D e1 +WriteStep D $imagedir/${casename}.stp +file delete $imagedir/${casename}.stp diff --git a/tests/bugs/step/bug32817_3 b/tests/bugs/step/bug32817_3 new file mode 100644 index 0000000000..9c4df939f0 --- /dev/null +++ b/tests/bugs/step/bug32817_3 @@ -0,0 +1,13 @@ +puts "================" +puts "0032817: Data Exchange - Step export - writing untrimmed Curve" +puts "================" + +pload XDE + +catch {Close D} +XNewDoc D +line l1 0 0 0 1 1 0 +mkedge e1 l1 -2e+100 10 +XAddShape D e1 +WriteStep D $imagedir/${casename}.stp +file delete $imagedir/${casename}.stp From e720157864e4bb408d607298610b464977491228 Mon Sep 17 00:00:00 2001 From: mpv Date: Thu, 10 Mar 2022 11:57:41 +0300 Subject: [PATCH 236/639] 0032442: Application Framework - Problems of testing on MacOS arm64 platform Fixed the problem of reading XML files on MacOS. 'errno' was not reseted even the 'strtol' function produced a good value. So, now it is erased forcibly before the call. --- src/LDOM/LDOMBasicString.cxx | 4 ++++ src/OSD/OSD_Directory.cxx | 1 + 2 files changed, 5 insertions(+) diff --git a/src/LDOM/LDOMBasicString.cxx b/src/LDOM/LDOMBasicString.cxx index 09843e7330..7fa4fec88f 100644 --- a/src/LDOM/LDOMBasicString.cxx +++ b/src/LDOM/LDOMBasicString.cxx @@ -184,6 +184,7 @@ Standard_Boolean LDOMBasicString::equals (const LDOMBasicString& anOther) const case LDOM_AsciiDocClear: case LDOM_AsciiHashed: { + errno = 0; long aLongOther = strtol ((const char *) anOther.myVal.ptr, NULL, 10); return (errno == 0 && aLongOther == long(myVal.i)); } @@ -197,6 +198,7 @@ Standard_Boolean LDOMBasicString::equals (const LDOMBasicString& anOther) const { case LDOM_Integer: { + errno = 0; long aLong = strtol ((const char *) myVal.ptr, NULL, 10); return (errno == 0 && aLong == long(anOther.myVal.i)); } @@ -273,6 +275,7 @@ LDOMBasicString::operator TCollection_ExtendedString () const buf[1] = ptr[1]; buf[2] = ptr[2]; buf[3] = ptr[3]; + errno = 0; aResult[j++] = Standard_ExtCharacter (strtol (&buf[0], NULL, 16)); if (errno) { delete [] aResult; @@ -306,6 +309,7 @@ Standard_Boolean LDOMBasicString::GetInteger (Standard_Integer& aResult) const case LDOM_AsciiHashed: { char * ptr; + errno = 0; long aValue = strtol ((const char *)myVal.ptr, &ptr, 10); if (ptr == myVal.ptr || errno == ERANGE || errno == EINVAL) return Standard_False; diff --git a/src/OSD/OSD_Directory.cxx b/src/OSD/OSD_Directory.cxx index 589e5eac06..af5b7e13f4 100644 --- a/src/OSD/OSD_Directory.cxx +++ b/src/OSD/OSD_Directory.cxx @@ -114,6 +114,7 @@ void OSD_Directory::Build (const OSD_Protection& theProtect) _osd_wnt_set_error (myError, OSD_WDirectory); } #else + errno = 0; TCollection_AsciiString aBuffer; mode_t anInternalProt = (mode_t )theProtect.Internal(); myPath.SystemName (aBuffer); From 3425e83f4b01fcbbac16ed226f8f104a0032bcd8 Mon Sep 17 00:00:00 2001 From: AndreiLA Date: Thu, 17 Mar 2022 15:10:01 +0300 Subject: [PATCH 237/639] 0023820: Wrong result of projection algorithm when a polygon geometry is projected on a set of multiple faces The tests are added to verify the correctness of the projection algorithm's work in two cases. --- tests/bugs/modalg_5/bug23820_1 | 24 ++++++++++++++++++++++++ tests/bugs/modalg_5/bug23820_2 | 24 ++++++++++++++++++++++++ 2 files changed, 48 insertions(+) create mode 100644 tests/bugs/modalg_5/bug23820_1 create mode 100644 tests/bugs/modalg_5/bug23820_2 diff --git a/tests/bugs/modalg_5/bug23820_1 b/tests/bugs/modalg_5/bug23820_1 new file mode 100644 index 0000000000..071ab360b9 --- /dev/null +++ b/tests/bugs/modalg_5/bug23820_1 @@ -0,0 +1,24 @@ + +############################################################# +## OCC23820: Test of the wire projection on the complicated +## shell of several faces without parameter +############################################################# + +pload MODELING + +vertex v1 297.706909179688 19.969066619873 9.07486343383789 +vertex v2 282.750762939453 24.8436107635498 6.85506725311279 +vertex v3 284.397491455078 7.2792820930481 -0.00160308415070176 +vertex v4 301.926666259766 5.67953395843506 0.0583421923220158 +edge e1 v1 v2 +edge e2 v2 v3 +edge e3 v3 v4 +edge e4 v4 v1 +wire w e1 e2 e3 e4 + +restore [locate_data_file bug23820_non_planar.brep] shell + +nproject result w shell + +checknbshapes result -vertex 24 -edge 14 -wire 0 -face 0 -shell 0 -solid 0 -compsolid 0 -compound 1 -shape 39 +checkprops result -l 83.0174 diff --git a/tests/bugs/modalg_5/bug23820_2 b/tests/bugs/modalg_5/bug23820_2 new file mode 100644 index 0000000000..76a59c1fd9 --- /dev/null +++ b/tests/bugs/modalg_5/bug23820_2 @@ -0,0 +1,24 @@ + +############################################################# +## OCC23820: Test of the wire projection on the complicated +## shell of several faces with a certain parameter +############################################################# + +pload MODELING + +vertex v1 297.706909179688 19.969066619873 9.07486343383789 +vertex v2 282.750762939453 24.8436107635498 6.85506725311279 +vertex v3 284.397491455078 7.2792820930481 -0.00160308415070176 +vertex v4 301.926666259766 5.67953395843506 0.0583421923220158 +edge e1 v1 v2 +edge e2 v2 v3 +edge e3 v3 v4 +edge e4 v4 v1 +wire w e1 e2 e3 e4 + +restore [locate_data_file bug23820_non_planar.brep] shell + +nproject result w shell -d 2.0 + +checknbshapes result -vertex 12 -edge 6 -wire 0 -face 0 -shell 0 -solid 0 -compsolid 0 -compound 1 -shape 19 +checkprops result -l 73.9585 From 9b337ad8e559ab283086f57eedec7fca4b951642 Mon Sep 17 00:00:00 2001 From: azv Date: Fri, 18 Mar 2022 23:46:44 +0300 Subject: [PATCH 238/639] 0032874: IsParallel() method of Extrema_ExtCC does not give same results in OCC 7.6.0 vs OCC 7.5.0 Improve tolerance criteria to check values of extremas for equality: use multiplier, which depends on the value, instead of magic number --- src/Extrema/Extrema_ExtCC.cxx | 4 ++-- tests/bugs/modalg_7/bug32874 | 25 +++++++++++++++++++++++++ 2 files changed, 27 insertions(+), 2 deletions(-) create mode 100644 tests/bugs/modalg_7/bug32874 diff --git a/src/Extrema/Extrema_ExtCC.cxx b/src/Extrema/Extrema_ExtCC.cxx index 389e2a0dde..d6eb92a41c 100644 --- a/src/Extrema/Extrema_ExtCC.cxx +++ b/src/Extrema/Extrema_ExtCC.cxx @@ -678,7 +678,7 @@ void Extrema_ExtCC::PrepareParallelResult(const Standard_Real theUt11, aMinSqD = Min(aMinSqD, ExtPCir.SquareDistance(anExtID)); } - if (aMinSqD <= aMinSquareDist + 10.* Epsilon(1. + aMinSqD)) + if (aMinSqD <= aMinSquareDist + (1. + aMinSqD) * Epsilon(1. + aMinSqD)) { ClearSolutions(); mySqDist.Append(aMinSqD); @@ -778,7 +778,7 @@ void Extrema_ExtCC::PrepareParallelResult(const Standard_Real theUt11, imin = k; } } - if (aDmin <= aMinSquareDist + 10.* Epsilon(1. + aDmin)) + if (aDmin <= aMinSquareDist + (1. + aDmin) * Epsilon(1. + aDmin)) { if (imin == 0) { diff --git a/tests/bugs/modalg_7/bug32874 b/tests/bugs/modalg_7/bug32874 new file mode 100644 index 0000000000..e1085f1c37 --- /dev/null +++ b/tests/bugs/modalg_7/bug32874 @@ -0,0 +1,25 @@ +puts "=================================================" +puts "0032874: IsParallel() method of Extrema_ExtCC does not give same results in OCC 7.6.0 vs OCC 7.5.0" +puts "=================================================" +puts "" + +set distExpected 10 +circle c1 0 0 0 100 +circle c2 0 0 0 100+$distExpected + +set nbSteps 72 +for {set i 1} {$i < $nbSteps} {incr i} { + trim cc1 c1 0 2.*pi/$nbSteps*$i + trim cc2 c2 0 2.*pi/$nbSteps*$i + + set extr [extrema cc1 cc2] + if {[regexp {Infinite number of extremas, distance = ([-0-9.+eE]+)} $extr full dist]} { + if {[expr abs($dist - $distExpected)] < 1.e-7} { + puts "OK" + } else { + puts "Error: wrong distance $dist instead of $distExpected expected" + } + } else { + puts "Error: non-parallel curves" + } +} From 5ae6f08cc67e6e40fd220c0f989a6c85d1a343e7 Mon Sep 17 00:00:00 2001 From: knosulko Date: Wed, 16 Mar 2022 13:13:15 +0300 Subject: [PATCH 239/639] 0024772: Modeling Algorithms - Intersection of cylinder and cone produces incorrect results GeomInt/GeomInt_IntSS.cxx - handle flat cone case IntPatch/IntPatch_Intersection.hxx, IntPatch/IntPatch_Intersection.cxx - method for preparing surfaces is added bugs/lowalgos/intss/bug24772 - test case is changed according new behavior --- src/Adaptor3d/Adaptor3d_TopolTool.cxx | 64 ++++++++++++---------- src/Adaptor3d/Adaptor3d_TopolTool.hxx | 6 +++ src/GeomInt/GeomInt_IntSS.cxx | 74 ++++++++++++++++++++------ src/IntPatch/IntPatch_Intersection.cxx | 69 ++++++++++++++++++++++++ src/IntPatch/IntPatch_Intersection.hxx | 10 ++++ tests/lowalgos/intss/bug24772 | 55 +++++++++++++------ 6 files changed, 217 insertions(+), 61 deletions(-) diff --git a/src/Adaptor3d/Adaptor3d_TopolTool.cxx b/src/Adaptor3d/Adaptor3d_TopolTool.cxx index d52e5525d6..807291d755 100644 --- a/src/Adaptor3d/Adaptor3d_TopolTool.cxx +++ b/src/Adaptor3d/Adaptor3d_TopolTool.cxx @@ -30,34 +30,6 @@ IMPLEMENT_STANDARD_RTTIEXT(Adaptor3d_TopolTool,Standard_Transient) #define myInfinite Precision::Infinite() -static void GetConeApexParam(const gp_Cone& C, Standard_Real& U, Standard_Real& V) -{ - const gp_Ax3& Pos = C.Position(); - Standard_Real Radius = C.RefRadius(); - Standard_Real SAngle = C.SemiAngle(); - const gp_Pnt& P = C.Apex(); - - gp_Trsf T; - T.SetTransformation (Pos); - gp_Pnt Ploc = P.Transformed (T); - - if(Ploc.X() ==0.0 && Ploc.Y()==0.0 ) { - U = 0.0; - } - else if ( -Radius > Ploc.Z()* Tan(SAngle) ) { - // the point is at the `wrong` side of the apex - U = atan2(-Ploc.Y(), -Ploc.X()); - } - else { - U = atan2(Ploc.Y(),Ploc.X()); - } - if (U < -1.e-16) U += (M_PI+M_PI); - else if (U < 0) U = 0; - - V = sin(SAngle) * ( Ploc.X() * cos(U) + Ploc.Y() * sin(U) - Radius) - + cos(SAngle) * Ploc.Z(); -} - Adaptor3d_TopolTool::Adaptor3d_TopolTool () : myNbSamplesU(-1), @@ -1376,3 +1348,39 @@ Standard_Boolean Adaptor3d_TopolTool::IsUniformSampling() const return Standard_False; return Standard_True; } + +//======================================================================= +//function : GetConeApexParam +//purpose : Computes the cone's apex parameters +//======================================================================= +void Adaptor3d_TopolTool::GetConeApexParam (const gp_Cone& theC, Standard_Real& theU, Standard_Real& theV) +{ + const gp_Ax3& Pos = theC.Position(); + Standard_Real Radius = theC.RefRadius(); + Standard_Real SAngle = theC.SemiAngle(); + const gp_Pnt& P = theC.Apex(); + + gp_Trsf T; + T.SetTransformation(Pos); + gp_Pnt Ploc = P.Transformed(T); + + if (Ploc.X() == 0.0 && Ploc.Y() == 0.0) + { + theU = 0.0; + } + else if (-Radius > Ploc.Z() * Tan(SAngle)) + { + // the point is at the `wrong` side of the apex + theU = atan2(-Ploc.Y(), -Ploc.X()); + } + else + { + theU = atan2(Ploc.Y(), Ploc.X()); + } + + if (theU < -1.e-16) theU += (M_PI + M_PI); + else if (theU < 0) theU = 0; + + theV = sin(SAngle) * (Ploc.X() * cos(theU) + Ploc.Y() * sin(theU) - Radius) + + cos(SAngle) * Ploc.Z(); +} diff --git a/src/Adaptor3d/Adaptor3d_TopolTool.hxx b/src/Adaptor3d/Adaptor3d_TopolTool.hxx index 8426e761dd..439b16e129 100644 --- a/src/Adaptor3d/Adaptor3d_TopolTool.hxx +++ b/src/Adaptor3d/Adaptor3d_TopolTool.hxx @@ -146,6 +146,12 @@ public: //! Returns true if provide uniform sampling of points. Standard_EXPORT virtual Standard_Boolean IsUniformSampling() const; + //! Computes the cone's apex parameters. + //! @param[in] theC conical surface + //! @param[in] theU U parameter of cone's apex + //! @param[in] theV V parameter of cone's apex + Standard_EXPORT static void GetConeApexParam (const gp_Cone& theC, Standard_Real& theU, Standard_Real& theV); + DEFINE_STANDARD_RTTIEXT(Adaptor3d_TopolTool,Standard_Transient) protected: diff --git a/src/GeomInt/GeomInt_IntSS.cxx b/src/GeomInt/GeomInt_IntSS.cxx index ce061d207a..600fb45bb4 100644 --- a/src/GeomInt/GeomInt_IntSS.cxx +++ b/src/GeomInt/GeomInt_IntSS.cxx @@ -77,38 +77,78 @@ void GeomInt_IntSS::Perform(const Handle(Geom_Surface)& S1, myTolReached2d = myTolReached3d = 0.0; myNbrestr = 0; sline.Clear(); - Handle(Adaptor3d_TopolTool) dom1 = new Adaptor3d_TopolTool(myHS1); - Handle(Adaptor3d_TopolTool) dom2 = new Adaptor3d_TopolTool(myHS2); - myLConstruct.Load(dom1,dom2,myHS1,myHS2); Standard_Real TolArc = Tol; Standard_Real TolTang = Tol; - Standard_Real UVMaxStep = IntPatch_Intersection::DefineUVMaxStep(myHS1, dom1, myHS2, dom2); Standard_Real Deflection = 0.1; if (myHS1->GetType() == GeomAbs_BSplineSurface && myHS2->GetType() == GeomAbs_BSplineSurface) { Deflection /= 10.; } + Handle(Adaptor3d_TopolTool) dom1 = new Adaptor3d_TopolTool (myHS1); + Handle(Adaptor3d_TopolTool) dom2 = new Adaptor3d_TopolTool (myHS2); - myIntersector.SetTolerances(TolArc,TolTang,UVMaxStep,Deflection); + NCollection_Vector< Handle(Adaptor3d_Surface)> aVecHS1; + NCollection_Vector< Handle(Adaptor3d_Surface)> aVecHS2; - if(myHS1 == myHS2) { - myIntersector.Perform(myHS1,dom1,TolArc,TolTang); - } - else if (!useStart) { - myIntersector.Perform(myHS1,dom1,myHS2,dom2,TolArc,TolTang); + if (myHS1 == myHS2) + { + aVecHS1.Append (myHS1); + aVecHS2.Append (myHS2); } - else { - myIntersector.Perform(myHS1,dom1,myHS2,dom2,U1,V1,U2,V2,TolArc,TolTang); + else + { + myIntersector.PrepareSurfaces (myHS1, dom1, myHS2, dom2, Tol, aVecHS1, aVecHS2); } - // ============================================================ - if (myIntersector.IsDone()) { - const Standard_Integer nblin = myIntersector.NbLines(); - for (Standard_Integer i=1; i<= nblin; i++) + for (Standard_Integer aNumOfHS1 = 0; aNumOfHS1 < aVecHS1.Length(); aNumOfHS1++) + { + const Handle(Adaptor3d_Surface)& aHS1 = aVecHS1.Value (aNumOfHS1); + + for (Standard_Integer aNumOfHS2 = 0; aNumOfHS2 < aVecHS2.Length(); aNumOfHS2++) { - MakeCurve(i,dom1,dom2,Tol,Approx,ApproxS1,ApproxS2); + const Handle(Adaptor3d_Surface)& aHS2 = aVecHS2.Value (aNumOfHS2); + + Handle(Adaptor3d_TopolTool) aDom1 = new Adaptor3d_TopolTool (aHS1); + Handle(Adaptor3d_TopolTool) aDom2 = new Adaptor3d_TopolTool (aHS2); + + myLConstruct.Load (aDom1 ,aDom2, + Handle(GeomAdaptor_Surface)::DownCast (aHS1), + Handle(GeomAdaptor_Surface)::DownCast (aHS2)); + + Standard_Real UVMaxStep = IntPatch_Intersection::DefineUVMaxStep (aHS1, aDom1, aHS2, aDom2); + + myIntersector.SetTolerances (TolArc, TolTang, UVMaxStep, Deflection); + + if (aHS1 == aHS2) + { + myIntersector.Perform (aHS1, aDom1, TolArc, TolTang); + } + else if (!useStart) + { + myIntersector.Perform (aHS1, aDom1, aHS2, aDom2, TolArc, TolTang); + } + else + { + TopAbs_State aState1 = aDom1->Classify (gp_Pnt2d (U1, V1), Tol); + TopAbs_State aState2 = aDom2->Classify (gp_Pnt2d (U2, V2), Tol); + + if ((aState1 == TopAbs_IN || aState1 == TopAbs_ON) && + (aState2 == TopAbs_IN || aState2 == TopAbs_ON)) + { + myIntersector.Perform (aHS1, aDom1, aHS2, aDom2, U1, V1, U2, V2, TolArc, TolTang); + } + } + + // ============================================================ + if (myIntersector.IsDone()) { + const Standard_Integer nblin = myIntersector.NbLines(); + for (Standard_Integer i = 1; i <= nblin; i++) + { + MakeCurve (i, aDom1, aDom2, Tol, Approx, ApproxS1, ApproxS2); + } + } } } } diff --git a/src/IntPatch/IntPatch_Intersection.cxx b/src/IntPatch/IntPatch_Intersection.cxx index 8ed58b152e..08db1dccd8 100644 --- a/src/IntPatch/IntPatch_Intersection.cxx +++ b/src/IntPatch/IntPatch_Intersection.cxx @@ -1923,3 +1923,72 @@ Standard_Real IntPatch_Intersection::DefineUVMaxStep( return anUVMaxStep; } +//======================================================================= +//function : splitCone +//purpose : Splits cone by the apex +//======================================================================= +static void splitCone( + const Handle(Adaptor3d_Surface)& theS, + const Handle(Adaptor3d_TopolTool)& theD, + const Standard_Real theTol, + NCollection_Vector< Handle(Adaptor3d_Surface)>& theVecHS) +{ + if (theS->GetType() != GeomAbs_Cone) + { + throw Standard_NoSuchObject("IntPatch_Intersection : Surface is not Cone"); + } + + gp_Cone aCone = theS->Cone(); + + Standard_Real aU0, aV0; + Adaptor3d_TopolTool::GetConeApexParam (aCone, aU0, aV0); + + TopAbs_State aState = theD->Classify (gp_Pnt2d (aU0, aV0), theTol); + + if (aState == TopAbs_IN || aState == TopAbs_ON) + { + const Handle(Adaptor3d_Surface) aHSDn = theS->VTrim (theS->FirstVParameter(), aV0, Precision::PConfusion()); + const Handle(Adaptor3d_Surface) aHSUp = theS->VTrim (aV0, theS->LastVParameter(), Precision::PConfusion()); + + theVecHS.Append (aHSDn); + theVecHS.Append (aHSUp); + } + else + { + theVecHS.Append (theS); + } +} + +//======================================================================= +//function : PrepareSurfaces +//purpose : Prepares surfaces for intersection +//======================================================================= +void IntPatch_Intersection::PrepareSurfaces( + const Handle(Adaptor3d_Surface)& theS1, + const Handle(Adaptor3d_TopolTool)& theD1, + const Handle(Adaptor3d_Surface)& theS2, + const Handle(Adaptor3d_TopolTool)& theD2, + const Standard_Real theTol, + NCollection_Vector< Handle(Adaptor3d_Surface)>& theVecHS1, + NCollection_Vector< Handle(Adaptor3d_Surface)>& theVecHS2) +{ + if ((theS1->GetType() == GeomAbs_Cone) && (Abs (M_PI / 2. - Abs (theS1->Cone().SemiAngle())) < theTol)) + { + splitCone (theS1, theD1, theTol, theVecHS1); + } + else + { + theVecHS1.Append (theS1); + } + + if ((theS2->GetType() == GeomAbs_Cone) && (Abs (M_PI / 2. - Abs (theS2->Cone().SemiAngle())) < theTol)) + { + splitCone (theS2, theD2, theTol, theVecHS2); + } + else + { + theVecHS2.Append (theS2); + } +} + + diff --git a/src/IntPatch/IntPatch_Intersection.hxx b/src/IntPatch/IntPatch_Intersection.hxx index 42661743c7..aeb80faf7b 100644 --- a/src/IntPatch/IntPatch_Intersection.hxx +++ b/src/IntPatch/IntPatch_Intersection.hxx @@ -22,6 +22,7 @@ #include #include #include +#include class Adaptor3d_TopolTool; @@ -149,6 +150,15 @@ public: const Handle(Adaptor3d_Surface)& theS2, const Handle(Adaptor3d_TopolTool)& theD2); + //! Prepares surfaces for intersection + Standard_EXPORT static void PrepareSurfaces( + const Handle(Adaptor3d_Surface)& theS1, + const Handle(Adaptor3d_TopolTool)& theD1, + const Handle(Adaptor3d_Surface)& theS2, + const Handle(Adaptor3d_TopolTool)& theD2, + const Standard_Real Tol, + NCollection_Vector< Handle(Adaptor3d_Surface)>& theSeqHS1, + NCollection_Vector< Handle(Adaptor3d_Surface)>& theSeqHS2); protected: diff --git a/tests/lowalgos/intss/bug24772 b/tests/lowalgos/intss/bug24772 index fa20fad11e..5caedb23f3 100644 --- a/tests/lowalgos/intss/bug24772 +++ b/tests/lowalgos/intss/bug24772 @@ -8,38 +8,61 @@ puts "" restore [locate_data_file bug24772_s1.draw] s1 restore [locate_data_file bug24772_s2.draw] s2 +restore [locate_data_file bug24772_s3.draw] s3 smallview +X+Y fit zoom 6 -set bug_info [intersect r s1 s2] +# case of unmatched axes +set bug_info_1 [intersect r1 s1 s2] -if {[llength $bug_info] != 4} { -# puts "ERROR: OCC24722 is reproduced." +# case of matched axes +set bug_info_2 [intersect r2 s2 s3] + +if {[llength $bug_info_1] != 3} { + puts "ERROR: OCC24722 is reproduced." } else { - # snapshot r_1 + # snapshot r1_1 clear display s1 display s2 - display r_1 - xwd $imagedir/${casename}_r_1.png - # snapshot r_2 + display r1_1 + xwd $imagedir/${casename}_r1_1.png + # snapshot r1_2 clear display s1 display s2 - display r_2 - xwd $imagedir/${casename}_r_2.png - # snapshot r_3 + display r1_2 + xwd $imagedir/${casename}_r1_2.png + # snapshot r1_3 clear display s1 display s2 - display r_3 - xwd $imagedir/${casename}_r_3.png - # snapshot r_4 + display r1_3 + xwd $imagedir/${casename}_r1_3.png +} + + +if {[llength $bug_info_2] != 3} { + puts "ERROR: OCC24722 is reproduced." +} else { + # snapshot r2_1 + clear + display s2 + display s3 + display r2_1 + xwd $imagedir/${casename}_r2_1.png + # snapshot r2_2 + clear + display s2 + display s3 + display r2_2 + xwd $imagedir/${casename}_r2_2.png + # snapshot r2_3 clear - display s1 display s2 - display r_4 - xwd $imagedir/${casename}_r_4.png + display s3 + display r2_3 + xwd $imagedir/${casename}_r2_3.png } From e4753a7d1658331a79025964d1c55f2a6d999c6c Mon Sep 17 00:00:00 2001 From: azv Date: Thu, 24 Mar 2022 22:21:06 +0300 Subject: [PATCH 240/639] 0032863: Cone surface returns wrong v derivative * Fix error on computing V first derivative on a cone (take into account the slope of the conical generatrix). * Add DRAW command 'sderivative' to compute certain derivative on a surface. --- src/ElSLib/ElSLib.cxx | 2 + .../GeomliteTest_SurfaceCommands.cxx | 39 +++++++++++++++++ tests/bugs/modalg_7/bug32863 | 43 +++++++++++++++++++ 3 files changed, 84 insertions(+) create mode 100644 tests/bugs/modalg_7/bug32863 diff --git a/src/ElSLib/ElSLib.cxx b/src/ElSLib/ElSLib.cxx index 3b61b31408..f13c9243f6 100644 --- a/src/ElSLib/ElSLib.cxx +++ b/src/ElSLib/ElSLib.cxx @@ -176,6 +176,8 @@ gp_Vec ElSLib::ConeDN (const Standard_Real U, } else if(Nv == 1) { Xdir.Multiply(sin(SAngle)); + if (Nu == 0) + Xdir.Add(Pos.Direction().XYZ() * cos(SAngle)); return gp_Vec(Xdir); } return gp_Vec(0.0,0.0,0.0); diff --git a/src/GeomliteTest/GeomliteTest_SurfaceCommands.cxx b/src/GeomliteTest/GeomliteTest_SurfaceCommands.cxx index 62caa72ca2..340554b77e 100644 --- a/src/GeomliteTest/GeomliteTest_SurfaceCommands.cxx +++ b/src/GeomliteTest/GeomliteTest_SurfaceCommands.cxx @@ -941,6 +941,36 @@ static Standard_Integer value (Draw_Interpretor& , return 0; } +//======================================================================= +//function : derivative +//purpose : +//======================================================================= + +static Standard_Integer derivative(Draw_Interpretor&, + Standard_Integer theArgc, + const char** theArgv) +{ + if (theArgc != 9) + return 1; + + Handle(Geom_Surface) aSurf = DrawTrSurf::GetSurface(theArgv[1]); + if (aSurf.IsNull()) + return 1; + + Standard_Real aU = Draw::Atof(theArgv[2]); + Standard_Real aV = Draw::Atof(theArgv[3]); + Standard_Integer aNu = Draw::Atoi(theArgv[4]); + Standard_Integer aNv = Draw::Atoi(theArgv[5]); + + gp_Vec aDeriv = aSurf->DN(aU, aV, aNu, aNv); + + Draw::Set(theArgv[6], aDeriv.X()); + Draw::Set(theArgv[7], aDeriv.Y()); + Draw::Set(theArgv[8], aDeriv.Z()); + + return 0; +} + //======================================================================= //function : movepole //purpose : @@ -1851,6 +1881,15 @@ void GeomliteTest::SurfaceCommands(Draw_Interpretor& theCommands) __FILE__, value,g); + theCommands.Add("sderivative", + "sderivative surfname U V NU NV X Y Z\n" + " surfname : name of surface\n" + " U V : coordinates on probe point on surface\n" + " NU NV : order of derivative along U and V\n" + " X Y Z : output coordinates of the derivative", + __FILE__, + derivative, g); + theCommands.Add("parameters", "parameters surf/curve X Y [Z] Tol U [V] : {X Y Z} point, {U V} output parameter(s)", __FILE__, diff --git a/tests/bugs/modalg_7/bug32863 b/tests/bugs/modalg_7/bug32863 new file mode 100644 index 0000000000..3094c941c0 --- /dev/null +++ b/tests/bugs/modalg_7/bug32863 @@ -0,0 +1,43 @@ +puts "=================================================" +puts "0032863: Cone surface returns wrong v derivative " +puts "=================================================" +puts "" + +cone c 0.2 2.0 + +set u 5.23290599890759 +set v 5.06498283391571 + +# reference data +svalue c $u $v x y z dux duy duz dvx dvy dvz d2ux d2uy d2uz d2vx d2vy d2vz d2uvx d2uvy d2uvz +set dxRef [list [dval x] [dval dux] [dval dvx] [dval d2ux] [dval d2uvx] [dval d2vx]] +set dyRef [list [dval y] [dval duy] [dval dvy] [dval d2uy] [dval d2uvy] [dval d2vy]] +set dzRef [list [dval z] [dval duz] [dval dvz] [dval d2uz] [dval d2uvz] [dval d2vz]] + +# compute derivatives till the second order +puts "=======================================" +set tolerance 1.e-7 +for {set order 1} {$order <= 2} {incr order} { + for {set nv 0} {$nv <= $order} {incr nv} { + set nu [expr $order - $nv] + + set offset [expr $order * ($order + 1) / 2 + $nv] + set ref_dx [lindex $dxRef $offset] + set ref_dy [lindex $dyRef $offset] + set ref_dz [lindex $dzRef $offset] + + sderivative c $u $v $nu $nv dx dy dz + set dx [dval dx] + set dy [dval dy] + set dz [dval dz] + + puts "" + puts "Order of derivative: Nu = $nu, Nv = $nv" + puts "Expected ($ref_dx, $ref_dy, $ref_dz)" + puts "Actual ($dx, $dy, $dz)" + checkreal "dX " $dx $ref_dx $tolerance $tolerance + checkreal "dY " $dy $ref_dy $tolerance $tolerance + checkreal "dZ " $dz $ref_dz $tolerance $tolerance + puts "=======================================" + } +} From ab279b126bf64a3da3cf7c624de8f3f31d25a309 Mon Sep 17 00:00:00 2001 From: abulyche Date: Wed, 15 Dec 2021 01:58:57 +0300 Subject: [PATCH 241/639] 0029745: Modeling Data - GeomAdaptor_Surface::VIntervals fails on periodic surfaces Fixed GeomAdaptor_Curve::LocalContinuity() for periodic curves. Fixed GeomAdaptor_Curve::NbIntervals() for periodic curves. Fixed GeomAdaptor_Curve::Intervals() for periodic curves. Improved definition of length in tests. Update Geom2dAdaptor_Curve to the same behavior. --- src/Geom2dAdaptor/Geom2dAdaptor_Curve.cxx | 826 ++++++++++++++++---- src/GeomAdaptor/GeomAdaptor_Curve.cxx | 891 ++++++++++++++++++---- src/QABugs/QABugs_20.cxx | 76 ++ tests/bugs/modalg_6/bug25908 | 6 +- tests/bugs/modalg_6/bug27884 | 4 +- tests/bugs/moddata_3/bug29745 | 37 + tests/hlr/exact_hlr/A1 | 2 +- tests/hlr/exact_hlr/C20 | 2 +- tests/hlr/exact_hlr/D4 | 2 +- tests/hlr/exact_hlr/D5 | 2 +- 10 files changed, 1552 insertions(+), 296 deletions(-) create mode 100644 tests/bugs/moddata_3/bug29745 diff --git a/src/Geom2dAdaptor/Geom2dAdaptor_Curve.cxx b/src/Geom2dAdaptor/Geom2dAdaptor_Curve.cxx index 80d97ed1fb..f6727ca8e7 100644 --- a/src/Geom2dAdaptor/Geom2dAdaptor_Curve.cxx +++ b/src/Geom2dAdaptor/Geom2dAdaptor_Curve.cxx @@ -58,6 +58,65 @@ static const Standard_Real PosTol = Precision::PConfusion() / 2; IMPLEMENT_STANDARD_RTTIEXT(Geom2dAdaptor_Curve, Adaptor2d_Curve2d) +static void DefinFPeriod(const Standard_Real theLower, + const Standard_Real theUpper, + const Standard_Real theEps, + const Standard_Real thePeriod, + Standard_Real &theCurFirst, + Standard_Integer &theFPer); + +static void DefinLPeriod(const Standard_Real theLower, + const Standard_Real theUpper, + const Standard_Real theEps, + const Standard_Real thePeriod, + Standard_Real &theCurLast, + Standard_Integer &theLPer); + +static Standard_Integer LocalNbIntervals(const TColStd_Array1OfReal& theTK, + const TColStd_Array1OfInteger& theTM, + const TColStd_Array1OfInteger& theInter, + const Standard_Integer theCurDegree, + const Standard_Integer theNb, + const Standard_Integer theNbInt, + const Standard_Real theFirst, + const Standard_Real theLast, + const Standard_Real theEps, + const Standard_Boolean thePeriodicCur, + Standard_Integer theNbIntervals, + Standard_Real theLower = 0, + Standard_Real thePeriod = 0, + Standard_Integer theIndex1 = 0, + Standard_Integer theIndex2 = 0); + +static void WriteIntervals(const TColStd_Array1OfReal &theTK, + const TColStd_Array1OfInteger &theInter, + const Standard_Integer theNbInt, + const Standard_Integer theIndex1, + const Standard_Integer theIndex2, + const Standard_Real theCurPeriod, + const Standard_Boolean theFlagForFirst, + TColStd_Array1OfReal &theT, + TColStd_Array1OfInteger &theFinalIntervals, + Standard_Integer &theNbIntervals, + Standard_Integer &theCurInt); + +static void SpreadInt(const TColStd_Array1OfReal &theTK, + const TColStd_Array1OfInteger &theTM, + const TColStd_Array1OfInteger &theInter, + const Standard_Integer theCurDegree, + const Standard_Integer theNb, + const Standard_Integer theFPer, + const Standard_Integer theLPer, + const Standard_Integer theNbInt, + const Standard_Real theLower, + const Standard_Real theFirst, + const Standard_Real theLast, + const Standard_Real thePeriod, + const Standard_Real theLastParam, + const Standard_Real theEps, + TColStd_Array1OfReal &theT, + Standard_Integer &theNbIntervals); + //======================================================================= //function : ShallowCopy //purpose : @@ -115,7 +174,7 @@ GeomAbs_Shape Geom2dAdaptor_Curve::LocalContinuity(const Standard_Real U1, if ( myBSplineCurve->IsPeriodic() && Index1 == Nb ) Index1 = 1; - if ( Index2 - Index1 <= 0) { + if ((Index2 - Index1 <= 0) && (!myBSplineCurve->IsPeriodic())) { MultMax = 100; // CN entre 2 Noeuds consecutifs } else { @@ -295,6 +354,158 @@ GeomAbs_Shape Geom2dAdaptor_Curve::Continuity() const } } +//======================================================================= +//function : DefinFPeriod +//purpose : +//======================================================================= + +void DefinFPeriod(const Standard_Real theLower, + const Standard_Real theUpper, + const Standard_Real theEps, + const Standard_Real thePeriod, + Standard_Real &theCurFirst, + Standard_Integer &theFPer) +{ + if (theCurFirst >= theLower) + { + while (theCurFirst >= theUpper) + { + theCurFirst = theCurFirst - thePeriod; + theFPer++; + } + if (Abs(theUpper - theCurFirst) <= theEps) + { + theFPer++; + theCurFirst = theLower; + } + } + else + { + while (theCurFirst < theLower) + { + theCurFirst = theCurFirst + thePeriod; + if (Abs(theLower - theCurFirst) > theEps) + { + theFPer--; + } + } + + if (Abs(theUpper - theCurFirst) <= theEps) + { + theCurFirst = theLower; + } + } +} + +//======================================================================= +//function : DefinLPeriod +//purpose : +//======================================================================= + +void DefinLPeriod(const Standard_Real theLower, + const Standard_Real theUpper, + const Standard_Real theEps, + const Standard_Real thePeriod, + Standard_Real &theCurLast, + Standard_Integer &theLPer) +{ + if (theCurLast >= theLower) + { + if ((theCurLast >= theUpper) && (Abs(theCurLast - theUpper) <= theEps)) + { + theCurLast = theUpper; + } + else + { + while (theCurLast >= theUpper) + { + theCurLast = theCurLast - thePeriod; + theLPer++; + } + if (Abs(theUpper - theCurLast) <= theEps) + { + theCurLast = theLower; + } + } + } + else + { + while (theCurLast < theLower) + { + theCurLast = theCurLast + thePeriod; + if (Abs(theLower - theCurLast) > theEps) + { + theLPer--; + } + } + if (Abs(theUpper - theCurLast) <= theEps) + { + theCurLast = theLower; + } + } +} + +//======================================================================= +//function : LocalNbIntervals +//purpose : +//======================================================================= + +Standard_Integer LocalNbIntervals(const TColStd_Array1OfReal& theTK, + const TColStd_Array1OfInteger& theTM, + const TColStd_Array1OfInteger& theInter, + const Standard_Integer theCurDegree, + const Standard_Integer theNb, + const Standard_Integer theNbInt, + const Standard_Real theFirst, + const Standard_Real theLast, + const Standard_Real theEps, + const Standard_Boolean thePeriodicCur, + Standard_Integer theNbIntervals, + Standard_Real theLower, + Standard_Real thePeriod, + Standard_Integer theIndex1, + Standard_Integer theIndex2) +{ + Standard_Real aNewFirst = theFirst; + Standard_Real aNewLast = theLast; + if (theIndex1 == 0) + { + BSplCLib::LocateParameter(theCurDegree, theTK, theTM, theFirst, + thePeriodicCur, 1, theNb, theIndex1, aNewFirst); + } + if (theIndex2 == 0) + { + BSplCLib::LocateParameter(theCurDegree, theTK, theTM, theLast, + thePeriodicCur, 1, theNb, theIndex2, aNewLast); + } + // Protection against theFirst = UFirst - eps, which located as ULast - eps + if (thePeriodicCur && ((aNewLast - aNewFirst) < Precision::PConfusion())) + { + if (Abs(aNewLast - theLower) < Precision::PConfusion()) + { + aNewLast += thePeriod; + } + else + { + aNewFirst -= thePeriod; + } + } + + if (Abs(aNewFirst - theTK(theIndex1 + 1)) < theEps) + { + theIndex1++; + } + if ((aNewLast - theTK(theIndex2)) > theEps) + { + theIndex2++; + } + for (Standard_Integer i = 1; i <= theNbInt; i++) + { + if (theInter(i) > theIndex1 && theInter(i) < theIndex2) theNbIntervals++; + } + return theNbIntervals; +} + //======================================================================= //function : NbIntervals //purpose : @@ -306,77 +517,179 @@ Standard_Integer Geom2dAdaptor_Curve::NbIntervals(const GeomAbs_Shape S) const Standard_Integer NbSplit; if (myTypeCurve == GeomAbs_BSplineCurve) { Standard_Integer FirstIndex = myBSplineCurve->FirstUKnotIndex(); - Standard_Integer LastIndex = myBSplineCurve->LastUKnotIndex(); - TColStd_Array1OfInteger Inter (1, LastIndex-FirstIndex+1); - if ( S > Continuity()) { + Standard_Integer LastIndex = myBSplineCurve->LastUKnotIndex(); + TColStd_Array1OfInteger Inter(1, LastIndex - FirstIndex + 1); + Standard_Boolean aContPer = (S >= Continuity()) && myBSplineCurve->IsPeriodic(); + Standard_Boolean aContNotPer = (S > Continuity()) && !myBSplineCurve->IsPeriodic(); + if (aContPer || aContNotPer) { Standard_Integer Cont; - switch ( S) { + switch (S) { case GeomAbs_G1: case GeomAbs_G2: - throw Standard_DomainError("Geom2dAdaptor_Curve::NbIntervals"); - break; + throw Standard_DomainError("Geom2dAdaptor_Curve::NbIntervals"); + break; case GeomAbs_C0: - myNbIntervals = 1; - break; + myNbIntervals = 1; + break; case GeomAbs_C1: case GeomAbs_C2: - case GeomAbs_C3: - case GeomAbs_CN: - { - if ( S == GeomAbs_C1) Cont = 1; - else if ( S == GeomAbs_C2) Cont = 2; - else if ( S == GeomAbs_C3) Cont = 3; - else Cont = myBSplineCurve->Degree(); - Standard_Integer Degree = myBSplineCurve->Degree(); - Standard_Integer NbKnots = myBSplineCurve->NbKnots(); - TColStd_Array1OfInteger Mults (1, NbKnots); - myBSplineCurve->Multiplicities (Mults); - NbSplit = 1; - Standard_Integer Index = FirstIndex; - Inter (NbSplit) = Index; + case GeomAbs_C3: + case GeomAbs_CN: + { + if (S == GeomAbs_C1) Cont = 1; + else if (S == GeomAbs_C2) Cont = 2; + else if (S == GeomAbs_C3) Cont = 3; + else Cont = myBSplineCurve->Degree(); + Standard_Integer Degree = myBSplineCurve->Degree(); + Standard_Integer NbKnots = myBSplineCurve->NbKnots(); + TColStd_Array1OfInteger Mults(1, NbKnots); + myBSplineCurve->Multiplicities(Mults); + NbSplit = 1; + Standard_Integer Index = FirstIndex; + Inter(NbSplit) = Index; + Index++; + NbSplit++; + while (Index < LastIndex) + { + if (Degree - Mults(Index) < Cont) + { + Inter(NbSplit) = Index; + NbSplit++; + } Index++; - NbSplit++; - while (Index < LastIndex) + } + Inter(NbSplit) = Index; + + Standard_Integer NbInt = NbSplit - 1; + + Standard_Integer Nb = myBSplineCurve->NbKnots(); + TColStd_Array1OfReal TK(1, Nb); + TColStd_Array1OfInteger TM(1, Nb); + myBSplineCurve->Knots(TK); + myBSplineCurve->Multiplicities(TM); + Standard_Real Eps = Min(Resolution(Precision::Confusion()), + Precision::PConfusion()); + + myNbIntervals = 1; + + if (!myBSplineCurve->IsPeriodic()) + { + myNbIntervals = LocalNbIntervals(TK, TM, Inter, Degree, Nb, NbInt, + myFirst, myLast, Eps, Standard_False, myNbIntervals); + } + else + { + Standard_Real aCurFirst = myFirst; + Standard_Real aCurLast = myLast; + + Standard_Real aLower = myBSplineCurve->FirstParameter(); + Standard_Real anUpper = myBSplineCurve->LastParameter(); + + if ((Abs(aCurFirst - aLower) < Eps) && (aCurFirst < aLower)) + { + aCurFirst = aLower; + } + if ((Abs(aCurLast - anUpper) < Eps) && (aCurLast < anUpper)) + { + aCurLast = anUpper; + } + + Standard_Real aPeriod = myBSplineCurve->Period(); + Standard_Integer aLPer = 1; Standard_Integer aFPer = 1; + + if ((Abs(aLower - myFirst) < Eps) && (aCurFirst < aLower)) + { + aCurFirst = aLower; + } + else + { + DefinFPeriod(aLower, anUpper, + Eps, aPeriod, aCurFirst, aFPer); + } + DefinLPeriod(aLower, anUpper, + Eps, aPeriod, aCurLast, aLPer); + + if ((Abs(aLower - myFirst) < Eps) && (Abs(anUpper - myLast) < Eps)) + { + myNbIntervals = NbInt; + } + else + { + Standard_Integer aSumPer = Abs(aLPer - aFPer); + + Standard_Real aFirst = 0; + if (aLower < 0 && anUpper == 0) + { + if (Abs(aCurLast) < Eps) + { + aCurLast = 0; + } + aFirst = aLower; + } + + if (aSumPer <= 1) + { + if ((Abs(myFirst - TK(Nb) - aPeriod * (aFPer - 1)) <= Eps) && (myLast < (TK(Nb) + aPeriod * (aLPer - 1)))) + { + myNbIntervals = LocalNbIntervals(TK, TM, Inter, Degree, Nb, NbInt, + myFirst, myLast, Eps, Standard_True, myNbIntervals, aLower, aPeriod); + return myNbIntervals; + } + if ((Abs(myFirst - aLower) < Eps) && (Abs(myLast - anUpper) < Eps)) + { + myNbIntervals = LocalNbIntervals(TK, TM, Inter, Degree, Nb, NbInt, + myFirst, myLast, Eps, Standard_True, myNbIntervals, aLower, aPeriod); + return myNbIntervals; + } + } + + if (aSumPer != 0) { - if (Degree - Mults (Index) < Cont) - { - Inter (NbSplit) = Index; - NbSplit++; - } - Index++; - } - Inter (NbSplit) = Index; - - Standard_Integer NbInt = NbSplit-1; - - Standard_Integer Nb = myBSplineCurve->NbKnots(); - Standard_Integer Index1 = 0; - Standard_Integer Index2 = 0; - Standard_Real newFirst, newLast; - TColStd_Array1OfReal TK(1,Nb); - TColStd_Array1OfInteger TM(1,Nb); - myBSplineCurve->Knots(TK); - myBSplineCurve->Multiplicities(TM); - BSplCLib::LocateParameter(myBSplineCurve->Degree(),TK,TM,myFirst, - myBSplineCurve->IsPeriodic(), - 1,Nb,Index1,newFirst); - BSplCLib::LocateParameter(myBSplineCurve->Degree(),TK,TM,myLast, - myBSplineCurve->IsPeriodic(), - 1,Nb,Index2,newLast); - - // On decale eventuellement les indices - // On utilise une "petite" tolerance, la resolution ne doit - // servir que pour les tres longue courbes....(PRO9248) - Standard_Real Eps = Min(Resolution(Precision::Confusion()), - Precision::PConfusion()); - if ( Abs(newFirst-TK(Index1+1))< Eps) Index1++; - if ( newLast-TK(Index2)> Eps) Index2++; - - myNbIntervals = 1; - for ( Standard_Integer i=1; i<=NbInt; i++) - if (Inter(i)>Index1 && Inter(i) Eps) + { + aLInt = LocalNbIntervals(TK, TM, Inter, Degree, Nb, NbInt, + aFirst, aCurLast, Eps, Standard_True, aLInt, aLower, aPeriod, 1); + } + else + { + aLInt = LocalNbIntervals(TK, TM, Inter, Degree, Nb, NbInt, + aFirst, aCurLast, Eps, Standard_True, aLInt, aLower, aPeriod); + } + } + + myNbIntervals = aFInt + aLInt + aPInt * (aSumPer - 1); + } + else + { + myNbIntervals = LocalNbIntervals(TK, TM, Inter, Degree, Nb, NbInt, + aCurFirst, aCurLast, Eps, Standard_True, myNbIntervals, aLower, aPeriod); + } + } } - break; + } + break; } } } @@ -399,6 +712,204 @@ Standard_Integer Geom2dAdaptor_Curve::NbIntervals(const GeomAbs_Shape S) const return myNbIntervals; } +//======================================================================= +//function : WriteIntervals +//purpose : +//======================================================================= + +void WriteIntervals(const TColStd_Array1OfReal &theTK, + const TColStd_Array1OfInteger &theInter, + const Standard_Integer theNbInt, + const Standard_Integer theIndex1, + const Standard_Integer theIndex2, + const Standard_Real theCurPeriod, + const Standard_Boolean theFlagForFirst, + TColStd_Array1OfReal &theT, + TColStd_Array1OfInteger &theFinalIntervals, + Standard_Integer &theNbIntervals, + Standard_Integer &theCurInt) +{ + if (theFlagForFirst) + { + for (Standard_Integer anId = 1; anId <= theNbInt; anId++) + { + if (theInter(anId) > theIndex1 && theInter(anId) <= theIndex2) + { + theNbIntervals++; + theFinalIntervals(theNbIntervals) = theInter(anId); + } + } + } + else + { + for (Standard_Integer anId = 1; anId <= theNbInt; anId++) + { + if (theInter(anId) > theIndex1 && theInter(anId) < theIndex2) + { + theNbIntervals++; + theFinalIntervals(theNbIntervals) = theInter(anId); + } + } + } + + theFinalIntervals(theNbIntervals + 1) = theIndex2; + + for (Standard_Integer anId = theCurInt; anId <= theNbIntervals + 1; anId++) + { + theT(anId) = theTK(theFinalIntervals(anId)) + theCurPeriod; + theCurInt++; + } +} + +//======================================================================= +//function : SpreadInt +//purpose : +//======================================================================= +void SpreadInt(const TColStd_Array1OfReal &theTK, + const TColStd_Array1OfInteger &theTM, + const TColStd_Array1OfInteger &theInter, + const Standard_Integer theCurDegree, + const Standard_Integer theNb, + const Standard_Integer theFPer, + const Standard_Integer theLPer, + const Standard_Integer theNbInt, + const Standard_Real theLower, + const Standard_Real theFirst, + const Standard_Real theLast, + const Standard_Real thePeriod, + const Standard_Real theLastParam, + const Standard_Real theEps, + TColStd_Array1OfReal &theT, + Standard_Integer &theNbIntervals) +{ + Standard_Integer anIndex1 = 0; + Standard_Integer anIndex2 = 0; + Standard_Real aNewFirst, aNewLast; + Standard_Integer anUpper; + BSplCLib::LocateParameter(theCurDegree, theTK, theTM, theFirst, + Standard_True, 1, theNb, anIndex1, aNewFirst); + BSplCLib::LocateParameter(theCurDegree, theTK, theTM, theLastParam, + Standard_True, 1, theNb, anIndex2, aNewLast); + + if (Abs(aNewFirst - theTK(anIndex1 + 1)) < theEps) + { + anIndex1++; + } + if ((aNewLast - theTK(anIndex2)) > theEps) + { + anIndex2++; + } + theNbIntervals = 1; + + if (anIndex1 == theNb) + { + anIndex1 = 1; + } + + // Count the max number of boundaries of intervals + if (Abs(theLPer - theFPer) > 1) + { + anUpper = theNb - anIndex1 + anIndex2 + (theLPer - theFPer - 1) * theNb + 1; + } + else + { + anUpper = theNb - anIndex1 + anIndex2 + 1; + } + + if (theLPer == theFPer) + { + anUpper = theInter.Upper(); + } + TColStd_Array1OfInteger aFinalIntervals(1, anUpper); + aFinalIntervals(1) = anIndex1; + + // If first and last are in the same period + if ((Abs(theLPer - theFPer) == 0)) + { + Standard_Integer aCurInt = 1; + Standard_Real aCurPeriod = theFPer * thePeriod; + + if (theFirst == aNewFirst && theLast == aNewLast) + { + aCurPeriod = 0; + } + WriteIntervals(theTK, theInter, theNbInt, anIndex1, + anIndex2, aCurPeriod, Standard_False, theT, aFinalIntervals, theNbIntervals, aCurInt); + return; + } + + // If the first and the last are in neighboring periods + if (Abs(theLPer - theFPer) == 1) + { + Standard_Integer aCurInt = 1; + + if (Abs(theLastParam - theLower) < theEps) + { + WriteIntervals(theTK, theInter, theNbInt, anIndex1, + theNb, theFPer * thePeriod, Standard_True, theT, aFinalIntervals, theNbIntervals, aCurInt); + return; + } + else + { + // For period with first + WriteIntervals(theTK, theInter, theNbInt, anIndex1, + theNb, theFPer * thePeriod, Standard_True, theT, aFinalIntervals, theNbIntervals, aCurInt); + // For period with last + theNbIntervals++; + WriteIntervals(theTK, theInter, theNbInt, 1, + anIndex2, theLPer * thePeriod, Standard_False, theT, aFinalIntervals, theNbIntervals, aCurInt); + return; + } + } + // If the first and the last are far apart + if (Abs(theLPer - theFPer) > 1) + { + Standard_Integer aCurInt = 1; + if (Abs(theLastParam - theLower) < theEps) + { + WriteIntervals(theTK, theInter, theNbInt, anIndex1, + theNb, theFPer * thePeriod, Standard_True, theT, aFinalIntervals, theNbIntervals, aCurInt); + + Standard_Integer aNbPer = Abs(theLPer - theFPer); + Standard_Integer aCurPer = theFPer + 1; + + while (aNbPer > 1) + { + theNbIntervals++; + WriteIntervals(theTK, theInter, theNbInt, 1, + theNb, aCurPer * thePeriod, Standard_True, theT, aFinalIntervals, theNbIntervals, aCurInt); + + aNbPer--; + aCurPer++; + } + return; + } + else + { + // For period with first + WriteIntervals(theTK, theInter, theNbInt, anIndex1, + theNb, theFPer * thePeriod, Standard_True, theT, aFinalIntervals, theNbIntervals, aCurInt); + + Standard_Integer aNbPer = Abs(theLPer - theFPer); + Standard_Integer aCurPer = theFPer + 1; + while (aNbPer > 1) + { + theNbIntervals++; + WriteIntervals(theTK, theInter, theNbInt, 1, + theNb, aCurPer * thePeriod, Standard_True, theT, aFinalIntervals, theNbIntervals, aCurInt); + + aNbPer--; + aCurPer++; + } + // For period with last + theNbIntervals++; + WriteIntervals(theTK, theInter, theNbInt, 1, + anIndex2, theLPer * thePeriod, Standard_False, theT, aFinalIntervals, theNbIntervals, aCurInt); + return; + } + } +} + //======================================================================= //function : Intervals //purpose : @@ -413,7 +924,9 @@ void Geom2dAdaptor_Curve::Intervals(TColStd_Array1OfReal& T, Standard_Integer FirstIndex = myBSplineCurve->FirstUKnotIndex(); Standard_Integer LastIndex = myBSplineCurve->LastUKnotIndex(); TColStd_Array1OfInteger Inter (1, LastIndex-FirstIndex+1); - if ( S > Continuity()) { + Standard_Boolean aContPer = (S >= Continuity()) && myBSplineCurve->IsPeriodic(); + Standard_Boolean aContNotPer = (S > Continuity()) && !myBSplineCurve->IsPeriodic(); + if (aContPer || aContNotPer) { Standard_Integer Cont; switch ( S) { case GeomAbs_G1: @@ -427,72 +940,127 @@ void Geom2dAdaptor_Curve::Intervals(TColStd_Array1OfReal& T, case GeomAbs_C2: case GeomAbs_C3: case GeomAbs_CN: - { - if ( S == GeomAbs_C1) Cont = 1; - else if ( S == GeomAbs_C2) Cont = 2; - else if ( S == GeomAbs_C3) Cont = 3; - else Cont = myBSplineCurve->Degree(); - Standard_Integer Degree = myBSplineCurve->Degree(); - Standard_Integer NbKnots = myBSplineCurve->NbKnots(); - TColStd_Array1OfInteger Mults (1, NbKnots); - myBSplineCurve->Multiplicities (Mults); - NbSplit = 1; - Standard_Integer Index = FirstIndex; - Inter (NbSplit) = Index; + { + if (S == GeomAbs_C1) Cont = 1; + else if (S == GeomAbs_C2) Cont = 2; + else if (S == GeomAbs_C3) Cont = 3; + else Cont = myBSplineCurve->Degree(); + Standard_Integer Degree = myBSplineCurve->Degree(); + Standard_Integer NbKnots = myBSplineCurve->NbKnots(); + TColStd_Array1OfInteger Mults(1, NbKnots); + myBSplineCurve->Multiplicities(Mults); + NbSplit = 1; + Standard_Integer Index = FirstIndex; + Inter(NbSplit) = Index; + Index++; + NbSplit++; + while (Index < LastIndex) + { + if (Degree - Mults(Index) < Cont) + { + Inter(NbSplit) = Index; + NbSplit++; + } Index++; - NbSplit++; - while (Index < LastIndex) - { - if (Degree - Mults (Index) < Cont) - { - Inter (NbSplit) = Index; - NbSplit++; - } - Index++; - } - Inter (NbSplit) = Index; - Standard_Integer NbInt = NbSplit-1; - - Standard_Integer Nb = myBSplineCurve->NbKnots(); - Standard_Integer Index1 = 0; - Standard_Integer Index2 = 0; - Standard_Real newFirst, newLast; - TColStd_Array1OfReal TK(1,Nb); - TColStd_Array1OfInteger TM(1,Nb); - myBSplineCurve->Knots(TK); - myBSplineCurve->Multiplicities(TM); - BSplCLib::LocateParameter(myBSplineCurve->Degree(),TK,TM,myFirst, - myBSplineCurve->IsPeriodic(), - 1,Nb,Index1,newFirst); - BSplCLib::LocateParameter(myBSplineCurve->Degree(),TK,TM,myLast, - myBSplineCurve->IsPeriodic(), - 1,Nb,Index2,newLast); - - - // On decale eventuellement les indices - // On utilise une "petite" tolerance, la resolution ne doit - // servir que pour les tres longue courbes....(PRO9248) - Standard_Real Eps = Min(Resolution(Precision::Confusion()), - Precision::PConfusion()); - if ( Abs(newFirst-TK(Index1+1))< Eps) Index1++; - if ( newLast-TK(Index2)> Eps) Index2++; - - Inter( 1) = Index1; - myNbIntervals = 1; - for ( Standard_Integer i=1; i<=NbInt; i++) { - if (Inter(i) > Index1 && Inter(i)NbKnots(); + Standard_Integer Index1 = 0; + Standard_Integer Index2 = 0; + Standard_Real newFirst, newLast; + TColStd_Array1OfReal TK(1, Nb); + TColStd_Array1OfInteger TM(1, Nb); + myBSplineCurve->Knots(TK); + myBSplineCurve->Multiplicities(TM); + Standard_Real Eps = Min(Resolution(Precision::Confusion()), + Precision::PConfusion()); + + if (!myBSplineCurve->IsPeriodic()) + { + BSplCLib::LocateParameter(myBSplineCurve->Degree(), TK, TM, myFirst, + myBSplineCurve->IsPeriodic(), + 1, Nb, Index1, newFirst); + BSplCLib::LocateParameter(myBSplineCurve->Degree(), TK, TM, myLast, + myBSplineCurve->IsPeriodic(), + 1, Nb, Index2, newLast); + + + // On decale eventuellement les indices + // On utilise une "petite" tolerance, la resolution ne doit + // servir que pour les tres longue courbes....(PRO9248) + if (Abs(newFirst - TK(Index1 + 1)) < Eps) Index1++; + if (newLast - TK(Index2) > Eps) Index2++; + + Inter(1) = Index1; + myNbIntervals = 1; + for (Standard_Integer i = 1; i <= NbInt; i++) { + if (Inter(i) > Index1 && Inter(i) < Index2) { + myNbIntervals++; + Inter(myNbIntervals) = Inter(i); + } + } + Inter(myNbIntervals + 1) = Index2; + + Standard_Integer ii = T.Lower() - 1; + for (Standard_Integer I = 1; I <= myNbIntervals + 1; I++) { + T(ii + I) = TK(Inter(I)); + } + } + else + { + Standard_Real aFirst = myFirst; + Standard_Real aLast = myLast; + + Standard_Real aCurFirst = aFirst; + Standard_Real aCurLast = aLast; + + Standard_Real aPeriod = myBSplineCurve->Period(); + Standard_Real aLower = myBSplineCurve->FirstParameter(); + Standard_Real anUpper = myBSplineCurve->LastParameter(); + + Standard_Integer aLPer = 0; Standard_Integer aFPer = 0; + + if (Abs(myFirst - aLower) <= Eps) + { + aCurFirst = aLower; + aFirst = aCurFirst; + } + if (Abs(myLast - anUpper) <= Eps) + { + aCurLast = anUpper; + aLast = aCurLast; + } + + if ((Abs(aLower - myFirst) < Eps) && (aCurFirst < aLower)) + { + aCurFirst = aLower; + } + else + { + DefinFPeriod(aLower, anUpper, + Eps, aPeriod, aCurFirst, aFPer); + } + DefinLPeriod(aLower, anUpper, + Eps, aPeriod, aCurLast, aLPer); + + if (myFirst == aLower) + { + aFPer = 0; + } + + SpreadInt(TK, TM, Inter, myBSplineCurve->Degree(), Nb, aFPer, aLPer, NbInt, aLower, myFirst, myLast, aPeriod, + aCurLast, Eps, T, myNbIntervals); + T(T.Lower()) = aFirst; + T(T.Lower() + myNbIntervals) = aLast; + return; + + } + } + T(T.Lower()) = myFirst; + T(T.Lower() + myNbIntervals) = myLast; + return; } } } diff --git a/src/GeomAdaptor/GeomAdaptor_Curve.cxx b/src/GeomAdaptor/GeomAdaptor_Curve.cxx index c1ed8ab277..24aacacb77 100644 --- a/src/GeomAdaptor/GeomAdaptor_Curve.cxx +++ b/src/GeomAdaptor/GeomAdaptor_Curve.cxx @@ -58,6 +58,65 @@ static const Standard_Real PosTol = Precision::PConfusion() / 2; IMPLEMENT_STANDARD_RTTIEXT(GeomAdaptor_Curve, Adaptor3d_Curve) +static void DefinFPeriod(const Standard_Real theLower, + const Standard_Real theUpper, + const Standard_Real theEps, + const Standard_Real thePeriod, + Standard_Real &theCurFirst, + Standard_Integer &theFPer); + +static void DefinLPeriod(const Standard_Real theLower, + const Standard_Real theUpper, + const Standard_Real theEps, + const Standard_Real thePeriod, + Standard_Real &theCurLast, + Standard_Integer &theLPer); + +static Standard_Integer LocalNbIntervals(const TColStd_Array1OfReal& theTK, + const TColStd_Array1OfInteger& theTM, + const TColStd_Array1OfInteger& theInter, + const Standard_Integer theCurDegree, + const Standard_Integer theNb, + const Standard_Integer theNbInt, + const Standard_Real theFirst, + const Standard_Real theLast, + const Standard_Real theEps, + const Standard_Boolean thePeriodicCur, + Standard_Integer theNbIntervals, + Standard_Real theLower = 0, + Standard_Real thePeriod = 0, + Standard_Integer theIndex1 = 0, + Standard_Integer theIndex2 = 0); + +static void WriteIntervals(const TColStd_Array1OfReal &theTK, + const TColStd_Array1OfInteger &theInter, + const Standard_Integer theNbInt, + const Standard_Integer theIndex1, + const Standard_Integer theIndex2, + const Standard_Real theCurPeriod, + const Standard_Boolean theFlagForFirst, + TColStd_Array1OfReal &theT, + TColStd_Array1OfInteger &theFinalIntervals, + Standard_Integer &theNbIntervals, + Standard_Integer &theCurInt); + +static void SpreadInt(const TColStd_Array1OfReal &theTK, + const TColStd_Array1OfInteger &theTM, + const TColStd_Array1OfInteger &theInter, + const Standard_Integer theCurDegree, + const Standard_Integer theNb, + const Standard_Integer theFPer, + const Standard_Integer theLPer, + const Standard_Integer theNbInt, + const Standard_Real theLower, + const Standard_Real theFirst, + const Standard_Real theLast, + const Standard_Real thePeriod, + const Standard_Real theLastParam, + const Standard_Real theEps, + TColStd_Array1OfReal &theT, + Standard_Integer &theNbIntervals); + //======================================================================= //function : ShallowCopy //purpose : @@ -114,7 +173,7 @@ GeomAbs_Shape GeomAdaptor_Curve::LocalContinuity(const Standard_Real U1, if ( (myBSplineCurve->IsPeriodic()) && (Index1 == Nb) ) Index1 = 1; - if ( Index2 - Index1 <= 0) { + if ((Index2 - Index1 <= 0) && (!myBSplineCurve->IsPeriodic())) { MultMax = 100; // CN entre 2 Noeuds consecutifs } else { @@ -251,6 +310,159 @@ GeomAbs_Shape GeomAdaptor_Curve::Continuity() const return GeomAbs_CN; } +//======================================================================= +//function : DefinFPeriod +//purpose : +//======================================================================= + +void DefinFPeriod(const Standard_Real theLower, + const Standard_Real theUpper, + const Standard_Real theEps, + const Standard_Real thePeriod, + Standard_Real &theCurFirst, + Standard_Integer &theFPer) +{ + if (theCurFirst >= theLower) + { + while (theCurFirst >= theUpper) + { + theCurFirst = theCurFirst - thePeriod; + theFPer++; + } + if (Abs(theUpper - theCurFirst) <= theEps) + { + theFPer++; + theCurFirst = theLower; + } + } + else + { + while (theCurFirst < theLower) + { + theCurFirst = theCurFirst + thePeriod; + if ((Abs(theLower - theCurFirst)) > theEps) + { + theFPer--; + } + } + + if (Abs(theUpper - theCurFirst) <= theEps) + { + theCurFirst = theLower; + } + } +} + +//======================================================================= +//function : DefinLPeriod +//purpose : +//======================================================================= + +void DefinLPeriod(const Standard_Real theLower, + const Standard_Real theUpper, + const Standard_Real theEps, + const Standard_Real thePeriod, + Standard_Real &theCurLast, + Standard_Integer &theLPer) +{ + if (theCurLast >= theLower) + { + if ((theCurLast >= theUpper) && (Abs(theCurLast - theUpper) <= theEps)) + { + theCurLast = theUpper; + } + else + { + while (theCurLast >= theUpper) + { + theCurLast = theCurLast - thePeriod; + theLPer++; + } + if (Abs(theUpper - theCurLast) <= theEps) + { + theCurLast = theLower; + } + } + } + else + { + while (theCurLast < theLower) + { + theCurLast = theCurLast + thePeriod; + if (Abs(theLower - theCurLast) > theEps) + { + theLPer--; + } + } + if ((theUpper - theCurLast) <= theEps) + { + theCurLast = theLower; + } + } +} + +//======================================================================= +//function : LocalNbIntervals +//purpose : +//======================================================================= + +Standard_Integer LocalNbIntervals(const TColStd_Array1OfReal& theTK, + const TColStd_Array1OfInteger& theTM, + const TColStd_Array1OfInteger& theInter, + const Standard_Integer theCurDegree, + const Standard_Integer theNb, + const Standard_Integer theNbInt, + const Standard_Real theFirst, + const Standard_Real theLast, + const Standard_Real theEps, + const Standard_Boolean thePeriodicCur, + Standard_Integer theNbIntervals, + Standard_Real theLower, + Standard_Real thePeriod, + Standard_Integer theIndex1, + Standard_Integer theIndex2) +{ + Standard_Real aNewFirst = theFirst; + Standard_Real aNewLast = theLast; + if (theIndex1 == 0) + { + BSplCLib::LocateParameter(theCurDegree, theTK, theTM, theFirst, + thePeriodicCur, 1, theNb, theIndex1, aNewFirst); + } + if (theIndex2 == 0) + { + BSplCLib::LocateParameter(theCurDegree, theTK, theTM, theLast, + thePeriodicCur, 1, theNb, theIndex2, aNewLast); + } + // Protection against theFirst = UFirst - eps, which located as ULast - eps + if (thePeriodicCur && ((aNewLast - aNewFirst) < Precision::PConfusion())) + { + if (Abs(aNewLast - theLower) < Precision::PConfusion()) + { + aNewLast += thePeriod; + } + else + { + aNewFirst -= thePeriod; + } + } + + if (Abs(aNewFirst - theTK(theIndex1 + 1)) < theEps) + { + theIndex1++; + } + if ((aNewLast - theTK(theIndex2)) > theEps) + { + theIndex2++; + } + for (Standard_Integer i = 1; i <= theNbInt; i++) + { + if (theInter(i) > theIndex1 && theInter(i) < theIndex2) theNbIntervals++; + } + return theNbIntervals; +} + + //======================================================================= //function : NbIntervals //purpose : @@ -262,11 +474,14 @@ Standard_Integer GeomAdaptor_Curve::NbIntervals(const GeomAbs_Shape S) const Standard_Integer NbSplit; if (myTypeCurve == GeomAbs_BSplineCurve) { Standard_Integer FirstIndex = myBSplineCurve->FirstUKnotIndex(); - Standard_Integer LastIndex = myBSplineCurve->LastUKnotIndex(); - TColStd_Array1OfInteger Inter (1, LastIndex-FirstIndex+1); - if ( S > Continuity()) { + Standard_Integer LastIndex = myBSplineCurve->LastUKnotIndex(); + TColStd_Array1OfInteger Inter(1, LastIndex - FirstIndex + 1); + Standard_Boolean aContPer = (S >= Continuity()) && myBSplineCurve->IsPeriodic(); + Standard_Boolean aContNotPer = (S > Continuity()) && !myBSplineCurve->IsPeriodic(); + + if(aContPer || aContNotPer) { Standard_Integer Cont; - switch ( S) { + switch (S) { case GeomAbs_G1: case GeomAbs_G2: throw Standard_DomainError("GeomAdaptor_Curve::NbIntervals"); @@ -276,68 +491,168 @@ Standard_Integer GeomAdaptor_Curve::NbIntervals(const GeomAbs_Shape S) const break; case GeomAbs_C1: case GeomAbs_C2: - case GeomAbs_C3: - case GeomAbs_CN: + case GeomAbs_C3: + case GeomAbs_CN: + { + if (S == GeomAbs_C1) Cont = 1; + else if (S == GeomAbs_C2) Cont = 2; + else if (S == GeomAbs_C3) Cont = 3; + else Cont = myBSplineCurve->Degree(); + Standard_Integer Degree = myBSplineCurve->Degree(); + Standard_Integer NbKnots = myBSplineCurve->NbKnots(); + TColStd_Array1OfInteger Mults(1, NbKnots); + myBSplineCurve->Multiplicities(Mults); + NbSplit = 1; + Standard_Integer Index = FirstIndex; + Inter(NbSplit) = Index; + Index++; + NbSplit++; + while (Index < LastIndex) { - if ( S == GeomAbs_C1) Cont = 1; - else if ( S == GeomAbs_C2) Cont = 2; - else if ( S == GeomAbs_C3) Cont = 3; - else Cont = myBSplineCurve->Degree(); - Standard_Integer Degree = myBSplineCurve->Degree(); - Standard_Integer NbKnots = myBSplineCurve->NbKnots(); - TColStd_Array1OfInteger Mults (1, NbKnots); - myBSplineCurve->Multiplicities (Mults); - NbSplit = 1; - Standard_Integer Index = FirstIndex; - Inter (NbSplit) = Index; + if (Degree - Mults(Index) < Cont) + { + Inter(NbSplit) = Index; + NbSplit++; + } Index++; - NbSplit++; - while (Index < LastIndex) - { - if (Degree - Mults (Index) < Cont) - { - Inter (NbSplit) = Index; - NbSplit++; - } - Index++; - } - Inter (NbSplit) = Index; - - Standard_Integer NbInt = NbSplit-1; - - Standard_Integer Nb = myBSplineCurve->NbKnots(); - Standard_Integer Index1 = 0; - Standard_Integer Index2 = 0; - Standard_Real newFirst, newLast; - const TColStd_Array1OfReal& TK = myBSplineCurve->Knots(); - const TColStd_Array1OfInteger& TM = myBSplineCurve->Multiplicities(); - BSplCLib::LocateParameter(myBSplineCurve->Degree(),TK,TM,myFirst, - myBSplineCurve->IsPeriodic(), - 1,Nb,Index1,newFirst); - BSplCLib::LocateParameter(myBSplineCurve->Degree(),TK,TM,myLast, - myBSplineCurve->IsPeriodic(), - 1,Nb,Index2,newLast); - // Protection against myFirst = UFirst - eps, which located as ULast - eps - if (myBSplineCurve->IsPeriodic() && (newLast - newFirst) < Precision::PConfusion()) + } + Inter(NbSplit) = Index; + + Standard_Integer NbInt = NbSplit - 1; + + Standard_Integer Nb = myBSplineCurve->NbKnots(); + Standard_Integer Index1 = 0; + Standard_Integer Index2 = 0; + const TColStd_Array1OfReal& TK = myBSplineCurve->Knots(); + const TColStd_Array1OfInteger& TM = myBSplineCurve->Multiplicities(); + Standard_Real Eps = Min(Resolution(Precision::Confusion()), + Precision::PConfusion()); + + myNbIntervals = 1; + + if (!myBSplineCurve->IsPeriodic()) + { + myNbIntervals = LocalNbIntervals(TK, TM, Inter, Degree, Nb, NbInt, + myFirst, myLast, Eps, Standard_False, myNbIntervals); + } + else + { + Standard_Real aCurFirst = myFirst; + Standard_Real aCurLast = myLast; + Standard_Real aLower = myBSplineCurve->FirstParameter(); + Standard_Real anUpper = myBSplineCurve->LastParameter(); + + if ((Abs(aCurFirst - aLower) < Eps) && (aCurFirst < aLower)) + { + aCurFirst = aLower; + } + if ((Abs(aCurLast - anUpper) < Eps) && (aCurLast < anUpper)) + { + aCurLast = anUpper; + } + + Standard_Real aPeriod = myBSplineCurve->Period(); + Standard_Integer aLPer = 1; Standard_Integer aFPer = 1; + if ((Abs(aLower - myFirst) < Eps) && (aCurFirst < aLower)) { - if (Abs(newLast - myBSplineCurve->FirstParameter()) < Precision::PConfusion()) - newLast += myBSplineCurve->Period(); + aCurFirst = aLower; + } + else + { + DefinFPeriod(aLower, anUpper, + Eps, aPeriod, aCurFirst, aFPer); + } + DefinLPeriod(aLower, anUpper, + Eps, aPeriod, aCurLast, aLPer); + + Standard_Real aNewFirst; + Standard_Real aNewLast; + BSplCLib::LocateParameter(myBSplineCurve->Degree(), TK, TM, myFirst, + Standard_True, 1, Nb, Index1, aNewFirst); + BSplCLib::LocateParameter(myBSplineCurve->Degree(), TK, TM, myLast, + Standard_True, 1, Nb, Index2, aNewLast); + if ((aNewFirst == myFirst && aNewLast == myLast) && (aFPer != aLPer)) + { + myNbIntervals = LocalNbIntervals(TK, TM, Inter, Degree, Nb, NbInt, + myFirst, myLast, Eps, Standard_True, myNbIntervals, aLower, aPeriod); + } + else + { + Standard_Integer aSumPer = Abs(aLPer - aFPer); + + Standard_Real aFirst = 0; + if (aLower < 0 && anUpper == 0) + { + if (Abs(aCurLast) < Eps) + { + aCurLast = 0; + } + aFirst = aLower; + } + + if (aSumPer <= 1) + { + if ((Abs(myFirst - TK(Nb) - aPeriod * (aFPer - 1)) <= Eps) && (myLast < (TK(Nb) + aPeriod * (aLPer - 1)))) + { + myNbIntervals = LocalNbIntervals(TK, TM, Inter, Degree, Nb, NbInt, + myFirst, myLast, Eps, Standard_True, myNbIntervals, aLower, aPeriod); + return myNbIntervals; + } + if ((Abs(myFirst - aLower) < Eps) && (Abs(myLast - anUpper) < Eps)) + { + myNbIntervals = LocalNbIntervals(TK, TM, Inter, Degree, Nb, NbInt, + myFirst, myLast, Eps, Standard_True, myNbIntervals, aLower, aPeriod); + return myNbIntervals; + } + } + + if (aSumPer != 0) + { + Standard_Integer aFInt = 0; + Standard_Integer aLInt = 0; + Standard_Integer aPInt = NbInt; + + if ((aCurFirst != aPeriod) || ((aCurFirst != anUpper) && (Abs(myFirst) < Eps))) + { + aFInt = 1; + } + if ((aCurLast != aLower) && (aCurLast != anUpper)) + { + aLInt = 1; + } + + aFInt = LocalNbIntervals(TK, TM, Inter, Degree, Nb, NbInt, + aCurFirst, anUpper, Eps, Standard_True, aFInt, aLower, aPeriod); + + if (aCurLast == anUpper) + { + aLInt = NbInt; + } + else + { + if (Abs(aCurLast - aFirst) > Eps) + { + aLInt = LocalNbIntervals(TK, TM, Inter, Degree, Nb, NbInt, + aFirst, aCurLast, Eps, Standard_True, aLInt, aLower, aPeriod, 1); + } + else + { + aLInt = LocalNbIntervals(TK, TM, Inter, Degree, Nb, NbInt, + aFirst, aCurLast, Eps, Standard_True, aLInt, aLower, aPeriod); + } + } + + myNbIntervals = aFInt + aLInt + aPInt * (aSumPer - 1); + } else - newFirst -= myBSplineCurve->Period(); + { + myNbIntervals = LocalNbIntervals(TK, TM, Inter, Degree, Nb, NbInt, + aCurFirst, aCurLast, Eps, Standard_True, myNbIntervals, aLower, aPeriod); + } } - // On decale eventuellement les indices - // On utilise une "petite" tolerance, la resolution ne doit - // servir que pour les tres longue courbes....(PRO9248) - Standard_Real Eps = Min(Resolution(Precision::Confusion()), - Precision::PConfusion()); - if ( Abs(newFirst-TK(Index1+1))< Eps) Index1++; - if ( newLast-TK(Index2)> Eps) Index2++; - - myNbIntervals = 1; - for ( Standard_Integer i=1; i<=NbInt; i++) - if (Inter(i)>Index1 && Inter(i) theIndex1 && theInter(anId) <= theIndex2) + { + theNbIntervals++; + theFinalIntervals(theNbIntervals) = theInter(anId); + } + } + } + else + { + for (Standard_Integer anId = 1; anId <= theNbInt; anId++) + { + if (theInter(anId) > theIndex1 && theInter(anId) < theIndex2) + { + theNbIntervals++; + theFinalIntervals(theNbIntervals) = theInter(anId); + } + } + } + + theFinalIntervals(theNbIntervals + 1) = theIndex2; + + for (Standard_Integer anId = theCurInt; anId <= theNbIntervals + 1; anId++) + { + theT(anId) = theTK(theFinalIntervals(anId)) + theCurPeriod; + theCurInt++; + } +} + +//======================================================================= +//function : SpreadInt +//purpose : +//======================================================================= + +void SpreadInt(const TColStd_Array1OfReal &theTK, + const TColStd_Array1OfInteger &theTM, + const TColStd_Array1OfInteger &theInter, + const Standard_Integer theCurDegree, + const Standard_Integer theNb, + const Standard_Integer theFPer, + const Standard_Integer theLPer, + const Standard_Integer theNbInt, + const Standard_Real theLower, + const Standard_Real theFirst, + const Standard_Real theLast, + const Standard_Real thePeriod, + const Standard_Real theLastParam, + const Standard_Real theEps, + TColStd_Array1OfReal &theT, + Standard_Integer &theNbIntervals) +{ + Standard_Integer anIndex1 = 0; + Standard_Integer anIndex2 = 0; + Standard_Real aNewFirst, aNewLast; + Standard_Integer anUpper; + BSplCLib::LocateParameter(theCurDegree, theTK, theTM, theFirst, + Standard_True, 1, theNb, anIndex1, aNewFirst); + BSplCLib::LocateParameter(theCurDegree, theTK, theTM, theLastParam, + Standard_True, 1, theNb, anIndex2, aNewLast); + + if (Abs(aNewFirst - theTK(anIndex1 + 1)) < theEps) + { + anIndex1++; + } + if ((aNewLast - theTK(anIndex2)) > theEps) + { + anIndex2++; + } + theNbIntervals = 1; + + if (anIndex1 == theNb) + { + anIndex1 = 1; + } + + // Count the max number of boundaries of intervals + if (Abs(theLPer - theFPer) > 1) + { + anUpper = theNb - anIndex1 + anIndex2 + (theLPer - theFPer - 1) * theNb + 1; + } + else + { + anUpper = theNb - anIndex1 + anIndex2 + 1; + } + + if (theLPer == theFPer) + { + anUpper = theInter.Upper(); + } + TColStd_Array1OfInteger aFinalIntervals(1, anUpper); + aFinalIntervals(1) = anIndex1; + + // If first and last are in the same period + if ((Abs(theLPer - theFPer) == 0)) + { + Standard_Integer aCurInt = 1; + Standard_Real aCurPeriod = theFPer * thePeriod; + + if (theFirst == aNewFirst && theLast == aNewLast) + { + aCurPeriod = 0; + } + WriteIntervals(theTK, theInter, theNbInt, anIndex1, + anIndex2, aCurPeriod, Standard_False, theT, aFinalIntervals, theNbIntervals, aCurInt); + return; + } + + // If the first and the last are in neighboring periods + if (Abs(theLPer - theFPer) == 1) + { + Standard_Integer aCurInt = 1; + + if (Abs(theLastParam - theLower) < theEps) + { + WriteIntervals(theTK, theInter, theNbInt, anIndex1, + theNb, theFPer * thePeriod, Standard_True, theT, aFinalIntervals, theNbIntervals, aCurInt); + return; + } + else + { + // For period with first + WriteIntervals(theTK, theInter, theNbInt, anIndex1, + theNb, theFPer * thePeriod, Standard_True, theT, aFinalIntervals, theNbIntervals, aCurInt); + // For period with last + theNbIntervals++; + WriteIntervals(theTK, theInter, theNbInt, 1, + anIndex2, theLPer * thePeriod, Standard_False, theT, aFinalIntervals, theNbIntervals, aCurInt); + return; + } + } + // If the first and the last are far apart + if (Abs(theLPer - theFPer) > 1) + { + Standard_Integer aCurInt = 1; + + if (Abs(theLastParam - theLower) < theEps) + { + WriteIntervals(theTK, theInter, theNbInt, anIndex1, + theNb, theFPer * thePeriod, Standard_True, theT, aFinalIntervals, theNbIntervals, aCurInt); + + Standard_Integer aNbPer = Abs(theLPer - theFPer); + Standard_Integer aCurPer = theFPer + 1; + + while (aNbPer > 1) + { + theNbIntervals++; + WriteIntervals(theTK, theInter, theNbInt, 1, + theNb, aCurPer * thePeriod, Standard_True, theT, aFinalIntervals, theNbIntervals, aCurInt); + + aNbPer--; + aCurPer++; + } + return; + } + else + { + // For period with first + WriteIntervals(theTK, theInter, theNbInt, anIndex1, + theNb, theFPer * thePeriod, Standard_True, theT, aFinalIntervals, theNbIntervals, aCurInt); + + Standard_Integer aNbPer = Abs(theLPer - theFPer); + Standard_Integer aCurPer = theFPer + 1; + while (aNbPer > 1) + { + theNbIntervals++; + WriteIntervals(theTK, theInter, theNbInt, 1, + theNb, aCurPer * thePeriod, Standard_True, theT, aFinalIntervals, theNbIntervals, aCurInt); + + aNbPer--; + aCurPer++; + } + // For period with last + theNbIntervals++; + WriteIntervals(theTK, theInter, theNbInt, 1, + anIndex2, theLPer * thePeriod, Standard_False, theT, aFinalIntervals, theNbIntervals, aCurInt); + return; + } + } +} + //======================================================================= //function : Intervals //purpose : @@ -385,106 +900,166 @@ void GeomAdaptor_Curve::Intervals(TColStd_Array1OfReal& T, Standard_Integer NbSplit; Standard_Real FirstParam = myFirst, LastParam = myLast; - if (myTypeCurve == GeomAbs_BSplineCurve) - { - Standard_Integer FirstIndex = myBSplineCurve->FirstUKnotIndex(); - Standard_Integer LastIndex = myBSplineCurve->LastUKnotIndex(); - TColStd_Array1OfInteger Inter (1, LastIndex-FirstIndex+1); - - if ( S > Continuity()) { - Standard_Integer Cont; - switch ( S) { - case GeomAbs_G1: - case GeomAbs_G2: - throw Standard_DomainError("Geom2dAdaptor_Curve::NbIntervals"); - break; - case GeomAbs_C0: - myNbIntervals = 1; - break; - case GeomAbs_C1: - case GeomAbs_C2: - case GeomAbs_C3: - case GeomAbs_CN: - { - if ( S == GeomAbs_C1) Cont = 1; - else if ( S == GeomAbs_C2) Cont = 2; - else if ( S == GeomAbs_C3) Cont = 3; - else Cont = myBSplineCurve->Degree(); - Standard_Integer Degree = myBSplineCurve->Degree(); - Standard_Integer NbKnots = myBSplineCurve->NbKnots(); - TColStd_Array1OfInteger Mults (1, NbKnots); - myBSplineCurve->Multiplicities (Mults); - NbSplit = 1; - Standard_Integer Index = FirstIndex; - Inter (NbSplit) = Index; - Index++; - NbSplit++; - while (Index < LastIndex) - { - if (Degree - Mults (Index) < Cont) - { - Inter (NbSplit) = Index; - NbSplit++; - } - Index++; - } - Inter (NbSplit) = Index; - Standard_Integer NbInt = NbSplit-1; - // GeomConvert_BSplineCurveKnotSplitting Convector(myBspl, Cont); - // Standard_Integer NbInt = Convector.NbSplits()-1; - // TColStd_Array1OfInteger Inter(1,NbInt+1); - // Convector.Splitting( Inter); - - Standard_Integer Nb = myBSplineCurve->NbKnots(); - Standard_Integer Index1 = 0; - Standard_Integer Index2 = 0; - Standard_Real newFirst, newLast; - const TColStd_Array1OfReal& TK = myBSplineCurve->Knots(); - const TColStd_Array1OfInteger& TM = myBSplineCurve->Multiplicities(); - BSplCLib::LocateParameter(myBSplineCurve->Degree(),TK,TM,myFirst, - myBSplineCurve->IsPeriodic(), - 1,Nb,Index1,newFirst); - BSplCLib::LocateParameter(myBSplineCurve->Degree(),TK,TM,myLast, - myBSplineCurve->IsPeriodic(), - 1,Nb,Index2,newLast); - FirstParam = newFirst; - LastParam = newLast; - // Protection against myFirst = UFirst - eps, which located as ULast - eps - if (myBSplineCurve->IsPeriodic() && (LastParam - FirstParam) < Precision::PConfusion()) - { - if (Abs(LastParam - myBSplineCurve->FirstParameter()) < Precision::PConfusion()) - LastParam += myBSplineCurve->Period(); - else - FirstParam -= myBSplineCurve->Period(); + if (myTypeCurve == GeomAbs_BSplineCurve) + { + Standard_Integer FirstIndex = myBSplineCurve->FirstUKnotIndex(); + Standard_Integer LastIndex = myBSplineCurve->LastUKnotIndex(); + TColStd_Array1OfInteger Inter(1, LastIndex - FirstIndex + 1); + Standard_Boolean aContPer = (S >= Continuity()) && myBSplineCurve->IsPeriodic(); + Standard_Boolean aContNotPer = (S > Continuity()) && !myBSplineCurve->IsPeriodic(); + + if (aContPer || aContNotPer) { + Standard_Integer Cont; + switch (S) { + case GeomAbs_G1: + case GeomAbs_G2: + throw Standard_DomainError("Geom2dAdaptor_Curve::NbIntervals"); + break; + case GeomAbs_C0: + myNbIntervals = 1; + break; + case GeomAbs_C1: + case GeomAbs_C2: + case GeomAbs_C3: + case GeomAbs_CN: + { + if (S == GeomAbs_C1) Cont = 1; + else if (S == GeomAbs_C2) Cont = 2; + else if (S == GeomAbs_C3) Cont = 3; + else Cont = myBSplineCurve->Degree(); + Standard_Integer Degree = myBSplineCurve->Degree(); + Standard_Integer NbKnots = myBSplineCurve->NbKnots(); + TColStd_Array1OfInteger Mults(1, NbKnots); + myBSplineCurve->Multiplicities(Mults); + NbSplit = 1; + Standard_Integer Index = FirstIndex; + Inter(NbSplit) = Index; + Index++; + NbSplit++; + while (Index < LastIndex) + { + if (Degree - Mults(Index) < Cont) + { + Inter(NbSplit) = Index; + NbSplit++; + } + Index++; + } + Inter(NbSplit) = Index; + Standard_Integer NbInt = NbSplit - 1; + // GeomConvert_BSplineCurveKnotSplitting Convector(myBspl, Cont); + // Standard_Integer NbInt = Convector.NbSplits()-1; + // TColStd_Array1OfInteger Inter(1,NbInt+1); + // Convector.Splitting( Inter); + + Standard_Integer Nb = myBSplineCurve->NbKnots(); + Standard_Integer Index1 = 0; + Standard_Integer Index2 = 0; + Standard_Real newFirst, newLast; + const TColStd_Array1OfReal& TK = myBSplineCurve->Knots(); + const TColStd_Array1OfInteger& TM = myBSplineCurve->Multiplicities(); + Standard_Real Eps = Min(Resolution(Precision::Confusion()), + Precision::PConfusion()); + + if (!myBSplineCurve->IsPeriodic() || ((Abs(myFirst - myBSplineCurve->FirstParameter()) < Eps) && + (Abs(myLast - myBSplineCurve->LastParameter()) < Eps))) + { + BSplCLib::LocateParameter(myBSplineCurve->Degree(), TK, TM, myFirst, + myBSplineCurve->IsPeriodic(), + 1, Nb, Index1, newFirst); + BSplCLib::LocateParameter(myBSplineCurve->Degree(), TK, TM, myLast, + myBSplineCurve->IsPeriodic(), + 1, Nb, Index2, newLast); + FirstParam = newFirst; + LastParam = newLast; + // Protection against myFirst = UFirst - eps, which located as ULast - eps + if (myBSplineCurve->IsPeriodic() && (LastParam - FirstParam) < Precision::PConfusion()) + { + if (Abs(LastParam - myBSplineCurve->FirstParameter()) < Precision::PConfusion()) + LastParam += myBSplineCurve->Period(); + else + FirstParam -= myBSplineCurve->Period(); + } + // On decale eventuellement les indices + // On utilise une "petite" tolerance, la resolution ne doit + // servir que pour les tres longue courbes....(PRO9248) + + if (Abs(FirstParam - TK(Index1 + 1)) < Eps) Index1++; + if (LastParam - TK(Index2) > Eps) Index2++; + + myNbIntervals = 1; + + TColStd_Array1OfInteger aFinalIntervals(1, Inter.Upper()); + aFinalIntervals(1) = Index1; + for (Standard_Integer i = 1; i <= NbInt; i++) { + if (Inter(i) > Index1 && Inter(i) < Index2) { + myNbIntervals++; + aFinalIntervals(myNbIntervals) = Inter(i); } - // On decale eventuellement les indices - // On utilise une "petite" tolerance, la resolution ne doit - // servir que pour les tres longue courbes....(PRO9248) - Standard_Real Eps = Min(Resolution(Precision::Confusion()), - Precision::PConfusion()); - if ( Abs(FirstParam-TK(Index1+1))< Eps) Index1++; - if ( LastParam-TK(Index2)> Eps) Index2++; - - myNbIntervals = 1; - - TColStd_Array1OfInteger aFinalIntervals(1, Inter.Upper()); - aFinalIntervals(1) = Index1; - for ( Standard_Integer i=1; i<=NbInt; i++) { - if (Inter(i) > Index1 && Inter(i)Period(); + Standard_Real aLower = myBSplineCurve->FirstParameter(); + Standard_Real anUpper = myBSplineCurve->LastParameter(); + + Standard_Integer aLPer = 0; Standard_Integer aFPer = 0; + + if (Abs(myFirst - aLower) <= Eps) + { + aCurFirst = aLower; + aFirst = aCurFirst; + } + + if (Abs(myLast - anUpper) <= Eps) + { + aCurLast = anUpper; + aLast = aCurLast; + } + + if ((Abs(aLower - myFirst) < Eps) && (aCurFirst < aLower)) + { + aCurFirst = aLower; + } + else + { + DefinFPeriod(aLower, anUpper, + Eps, aPeriod, aCurFirst, aFPer); + } + DefinLPeriod(aLower, anUpper, + Eps, aPeriod, aCurLast, aLPer); + + if (myFirst == aLower) + { + aFPer = 0; + } + + SpreadInt(TK, TM, Inter, myBSplineCurve->Degree(), Nb, aFPer, aLPer, NbInt, aLower, myFirst, myLast, aPeriod, + aCurLast, Eps, T, myNbIntervals); + + T(T.Lower()) = aFirst; + T(T.Lower() + myNbIntervals) = aLast; + return; + } + } + T(T.Lower()) = myFirst; + T(T.Lower() + myNbIntervals) = myLast; + return; } } + } else if (myTypeCurve == GeomAbs_OffsetCurve){ GeomAbs_Shape BaseS=GeomAbs_C0; diff --git a/src/QABugs/QABugs_20.cxx b/src/QABugs/QABugs_20.cxx index d31af7ef8b..59b2ab1db4 100644 --- a/src/QABugs/QABugs_20.cxx +++ b/src/QABugs/QABugs_20.cxx @@ -3093,6 +3093,80 @@ static Standard_Integer OCC30391(Draw_Interpretor& theDI, return 0; } +//======================================================================= +//function : OCC29745 +//purpose : +//======================================================================= +static Standard_Integer OCC29745(Draw_Interpretor& theDI, Standard_Integer theArgc, const char** theArgv) +{ + if (theArgc != 5) + { + theDI << "Usage : OCC29745 curve2d/3d continuity t1 t2"; + return 1; + } + + Handle(Geom_Curve) aC3d; + Handle(Geom2d_Curve) aC2d; + + aC3d = DrawTrSurf::GetCurve(theArgv[1]); + if (aC3d.IsNull()) + { + aC2d = DrawTrSurf::GetCurve2d(theArgv[1]); + if (aC2d.IsNull()) + { + theDI << "Null curve" << "\n"; + return 1; + } + } + + Standard_Integer i = Draw::Atoi(theArgv[2]); + GeomAbs_Shape aCont = GeomAbs_C0; + if (i <= 0) + aCont = GeomAbs_C0; + else if (i == 1) + aCont = GeomAbs_C1; + else if (i == 2) + aCont = GeomAbs_C2; + else if (i == 3) + aCont = GeomAbs_C3; + else if (i >= 4) + aCont = GeomAbs_CN; + + Standard_Real t1 = Draw::Atof(theArgv[3]); + Standard_Real t2 = Draw::Atof(theArgv[4]); + + GeomAdaptor_Curve aGAC3d; + Geom2dAdaptor_Curve aGAC2d; + Standard_Integer aNbInts; + if (aC2d.IsNull()) + { + aGAC3d.Load(aC3d, t1, t2); + aNbInts = aGAC3d.NbIntervals(aCont); + } + else + { + aGAC2d.Load(aC2d, t1, t2); + aNbInts = aGAC2d.NbIntervals(aCont); + } + + TColStd_HArray1OfReal anInters(1, aNbInts + 1); + if (aC2d.IsNull()) + { + aGAC3d.Intervals(anInters, aCont); + } + else + { + aGAC2d.Intervals(anInters, aCont); + } + + theDI << "NbIntervals: " << aNbInts << "; "; + for (i = anInters.Lower(); i <= anInters.Upper(); ++i) + { + theDI << anInters(i) << " "; + } + return 0; +} + #include #include #include @@ -4298,6 +4372,8 @@ void QABugs::Commands_20(Draw_Interpretor& theCommands) { theCommands.Add("OCC29807", "OCC29807 surface1 surface2 u1 v1 u2 v2", __FILE__, OCC29807, group); theCommands.Add("OCC29311", "OCC29311 shape counter nbiter: check performance of OBB calculation", __FILE__, OCC29311, group); theCommands.Add("OCC30391", "OCC30391 result face LenBeforeUfirst LenAfterUlast LenBeforeVfirst LenAfterVlast", __FILE__, OCC30391, group); + theCommands.Add("OCC29745", "OCC29745 spreading of intervals of continuity on periodic curves", + __FILE__, OCC29745, group); theCommands.Add("OCC29195", "OCC29195 [nbRep] doc1 [doc2 [doc3 [doc4]]]", __FILE__, OCC29195, group); theCommands.Add("OCC30435", "OCC30435 result curve inverse nbit", __FILE__, OCC30435, group); theCommands.Add("OCC30747", "OCC30747: create a closed curve", __FILE__, OCC30747, group); diff --git a/tests/bugs/modalg_6/bug25908 b/tests/bugs/modalg_6/bug25908 index c39131f747..1794cd0c53 100755 --- a/tests/bugs/modalg_6/bug25908 +++ b/tests/bugs/modalg_6/bug25908 @@ -20,15 +20,15 @@ compound vl v1l vnl vol vil result set nbshapes_expected " Number of shapes in shape - VERTEX : 103 - EDGE : 52 + VERTEX : 109 + EDGE : 55 WIRE : 0 FACE : 0 SHELL : 0 SOLID : 0 COMPSOLID : 0 COMPOUND : 1 - SHAPE : 156 + SHAPE : 165 " checknbshapes result -ref ${nbshapes_expected} -t -m "HLRToShape" diff --git a/tests/bugs/modalg_6/bug27884 b/tests/bugs/modalg_6/bug27884 index 0127894c05..e8bf7ec226 100644 --- a/tests/bugs/modalg_6/bug27884 +++ b/tests/bugs/modalg_6/bug27884 @@ -11,7 +11,7 @@ circle c 1 0 0 150 set res1 [OCC27884 c 400 0] regexp {Improving time: +([-0-9.+eE]+) %} $res1 full time1 -if { $time1 <= 5 } { +if { $time1 <= 4 } { puts "Error: algorithm slowed down" } @@ -19,7 +19,7 @@ if { $time1 <= 5 } { set res2 [OCC27884 c 250 1] regexp {Improving time: +([-0-9.+eE]+) %} $res2 full time2 -if { $time2 <= 5 } { +if { $time2 <= 3 } { puts "Error: algorithm slowed down" } diff --git a/tests/bugs/moddata_3/bug29745 b/tests/bugs/moddata_3/bug29745 new file mode 100644 index 0000000000..34203783ee --- /dev/null +++ b/tests/bugs/moddata_3/bug29745 @@ -0,0 +1,37 @@ +puts "=================================================================" +puts "OCC29745: Modeling Data - GeomAdaptor_Surface::VIntervals fails on periodic surfaces" +puts "=================================================================" +puts "" + +pload QAcommands + +restore [locate_data_file bug29745_1] bc +restore [locate_data_file bug29745_2] bc1 + + +set ref1 {NbIntervals: 2; 0 0.5 1 } +set data1 [OCC29745 bc1 1 0 1] + +if {[string compare $ref1 $data1] == 0} { + puts "OCC29745 OK" +} else { + puts "OCC29745 Faulty" +} + +set ref2 {NbIntervals: 3; 0.10000000000000001 0.5 1 1.1000000000000001 } +set data2 [OCC29745 bc1 1 0.1 1.1] + +if {[string compare $ref2 $data2] == 0} { + puts "OCC29745 OK" +} else { + puts "OCC29745 Faulty" +} + +set ref3 {NbIntervals: 3; 0 4.1887902047863896 6.2831853071795898 7 } +set data3 [OCC29745 bc 1 0 7] + +if {[string compare $ref3 $data3] == 0} { + puts "OCC29745 OK" +} else { + puts "OCC29745 Faulty" +} diff --git a/tests/hlr/exact_hlr/A1 b/tests/hlr/exact_hlr/A1 index f3f8d3c64e..cd1893cef8 100644 --- a/tests/hlr/exact_hlr/A1 +++ b/tests/hlr/exact_hlr/A1 @@ -4,7 +4,7 @@ puts "=====================================" puts "" set viewname "" -set length 6.34984 +set length 6.34983 restore [locate_data_file bug27341_hlrsave.brep] a COMPUTE_HLR $viewname $algotype diff --git a/tests/hlr/exact_hlr/C20 b/tests/hlr/exact_hlr/C20 index 741d9a04e6..e99fad93e3 100644 --- a/tests/hlr/exact_hlr/C20 +++ b/tests/hlr/exact_hlr/C20 @@ -1,4 +1,4 @@ -puts "TODO OCC30286 ALL: Error : The length of result shape is 1736.91, expected 1704.87" +puts "TODO OCC30286 ALL: Error : The length of result shape is 1736.86, expected 1704.87" set viewname "vright" set length 1704.87 diff --git a/tests/hlr/exact_hlr/D4 b/tests/hlr/exact_hlr/D4 index e76af23e10..7564077b92 100644 --- a/tests/hlr/exact_hlr/D4 +++ b/tests/hlr/exact_hlr/D4 @@ -4,7 +4,7 @@ puts "============" puts "" set viewname "vfront" -set length 484.485 +set length 484.427 restore [locate_data_file bug25908_hlr-bspline-clone2-tcl-h1.brep] a COMPUTE_HLR $viewname $algotype diff --git a/tests/hlr/exact_hlr/D5 b/tests/hlr/exact_hlr/D5 index 072138288b..d1c7497ba1 100644 --- a/tests/hlr/exact_hlr/D5 +++ b/tests/hlr/exact_hlr/D5 @@ -4,7 +4,7 @@ puts "============" puts "" set viewname "vback" -set length 544.616 +set length 544.507 restore [locate_data_file bug25908_hlr-bspline-clone2-tcl-h1.brep] a COMPUTE_HLR $viewname $algotype From 2491eec38b451da5bf60120d3f16ac1187c24423 Mon Sep 17 00:00:00 2001 From: kgv Date: Wed, 30 Mar 2022 21:38:14 +0300 Subject: [PATCH 242/639] 0032897: Tests - include elapsed time into test log Added "ELAPSED TIME" to test case log. Improved syntax of chrono/dchrono command: added -elapsed, -userCPU, -sysCPU options printing individual values in seconds. OSD_Chronometer::IsThisThreadOnly() - added missing accessors to the property. --- src/Draw/Draw_BasicCommands.cxx | 281 ++++++++++++++++------------- src/Draw/Draw_Chronometer.cxx | 45 ++--- src/Draw/Draw_Chronometer.hxx | 41 +---- src/DrawResources/TestCommands.tcl | 8 +- src/OSD/OSD_Chronometer.cxx | 16 +- src/OSD/OSD_Chronometer.hxx | 8 + tests/perf/mesh/bug27626 | 16 +- tests/perf/modalg/bug25742_2 | 8 +- 8 files changed, 210 insertions(+), 213 deletions(-) diff --git a/src/Draw/Draw_BasicCommands.cxx b/src/Draw/Draw_BasicCommands.cxx index 9160a871e0..f115d05982 100644 --- a/src/Draw/Draw_BasicCommands.cxx +++ b/src/Draw/Draw_BasicCommands.cxx @@ -75,146 +75,150 @@ static OSD_Timer aTimer; extern Standard_Boolean Draw_Chrono; -static Standard_Integer chronom(Draw_Interpretor& di, - Standard_Integer n,const char** a) +static Standard_Integer dchronom (Draw_Interpretor& theDI, + Standard_Integer theNbArgs, + const char** theArgVec) { - if ((n == 1) || (*a[1] == '0') || (*a[1] == '1')) { - if (n == 1) + if (theNbArgs == 1 + || (theNbArgs == 2 + && (*theArgVec[1] == '0' + || *theArgVec[1] == '1'))) + { + if (theNbArgs == 1) + { Draw_Chrono = !Draw_Chrono; + } else - Draw_Chrono = (*a[1] == '1'); + { + Draw_Chrono = (*theArgVec[1] == '1'); + } - if (Draw_Chrono) di << "Chronometers activated.\n"; - else di << "Chronometers deactivated.\n"; + theDI << (Draw_Chrono + ? "Chronometers activated.\n" + : "Chronometers deactivated.\n"); + return 0; } - else { - Handle(Draw_Drawable3D) D = Draw::Get(a[1]); - Handle(Draw_Chronometer) C; - if (!D.IsNull()) { - C = Handle(Draw_Chronometer)::DownCast(D); + + const char* aTimerName = theArgVec[1]; + Handle(Draw_Chronometer) aChronom; + if (Handle(Draw_Drawable3D) aDrawable = Draw::Get (aTimerName)) + { + aChronom = Handle(Draw_Chronometer)::DownCast (aDrawable); + } + if (aChronom.IsNull()) + { + aChronom = new Draw_Chronometer(); + Draw::Set (aTimerName, aChronom, false); + } + + if (theNbArgs <= 2) + { + aChronom->Timer().Reset(); + return 0; + } + + const bool toShowCout = (TCollection_AsciiString (theArgVec[0]) == "chrono"); + int aNbPuts = false; + for (Standard_Integer anIter = 2; anIter < theNbArgs; ++anIter) + { + TCollection_AsciiString anArg (theArgVec[anIter]); + anArg.LowerCase(); + if (anArg == "-reset" + || anArg == "reset") + { + aChronom->Timer().Reset(); + } + else if (anArg == "-restart" + || anArg == "restart") + { + aChronom->Timer().Restart(); } - if (C.IsNull()) { - C = new Draw_Chronometer(); - Draw::Set(a[1],C,Standard_False); + else if (anArg == "-start" + || anArg == "-resume" + || anArg == "start") + { + aChronom->Timer().Start(); } - if (n <= 2) { - C->Timer().Reset(); + else if (anArg == "-stop" + || anArg == "-pause" + || anArg == "stop") + { + aChronom->Timer().Stop(); } - else { - for (Standard_Integer anIter = 2; anIter < n; ++anIter) + else if (anArg == "-show" + || anArg == "show") + { + if (toShowCout) + { + aChronom->Timer().Show (std::cout); + } + else { - TCollection_AsciiString anArg (a[anIter]); - anArg.LowerCase(); - - if (anArg == "reset") - { - C->Timer().Reset(); - } - else if (anArg == "restart") - { - C->Timer().Restart(); - } - else if (anArg == "start") - { - C->Timer().Start(); - } - else if (anArg == "stop") - { - C->Timer().Stop(); - } - else if (anArg == "show") - { - C->Timer().Show(); - } - else if (anArg == "counter") - { - Standard_Real aSeconds,aCPUtime; - Standard_Integer aMinutes, aHours; - C->Timer().Show(aSeconds,aMinutes,aHours,aCPUtime); - std::cout << "COUNTER " << a[++anIter] << ": " << aCPUtime << "\n"; - } - else - { - std::cerr << "Unknown argument '" << a[anIter] << "'!\n"; - } + Standard_SStream aStream; + aChronom->Timer().Show (aStream); + theDI << aStream; } } - } - return 0; -} - -static Standard_Integer dchronom(Draw_Interpretor& theDI, - Standard_Integer n,const char** a) -{ - if ((n == 1) || (*a[1] == '0') || (*a[1] == '1')) { - if (n == 1) - Draw_Chrono = !Draw_Chrono; - else - Draw_Chrono = (*a[1] == '1'); - - if (Draw_Chrono) theDI << "Chronometers activated.\n"; - else theDI << "Chronometers deactivated.\n"; - } - else { - Handle(Draw_Drawable3D) D = Draw::Get(a[1]); - Handle(Draw_Chronometer) C; - if (!D.IsNull()) { - C = Handle(Draw_Chronometer)::DownCast(D); + else if (anIter + 1 < theNbArgs + && (anArg == "-counter" + || anArg == "counter")) + { + Standard_Real aSeconds = 0.0, aCPUtime = 0.0; + Standard_Integer aMinutes = 0, aHours = 0; + aChronom->Timer().Show (aSeconds, aMinutes, aHours, aCPUtime); + if (toShowCout) + { + std::cout << "COUNTER " << theArgVec[++anIter] << ": " << aCPUtime << "\n"; + } + else + { + theDI << "COUNTER " << theArgVec[++anIter] << ": " << aCPUtime << "\n"; + } } - if (C.IsNull()) { - C = new Draw_Chronometer(); - Draw::Set(a[1],C,Standard_False); + else if (anArg == "-elapsed") + { + if (++aNbPuts > 1) { theDI << " "; } + theDI << aChronom->Timer().ElapsedTime(); } - if (n <= 2) { - C->Timer().Reset(); + else if (anArg == "-cpu" + || anArg == "-usercpu" + || anArg == "-cpuuser") + { + if (++aNbPuts > 1) { theDI << " "; } + theDI << aChronom->Timer().UserTimeCPU(); } - else { - for (Standard_Integer anIter = 2; anIter < n; ++anIter) - { - TCollection_AsciiString anArg (a[anIter]); - anArg.LowerCase(); - - if (anArg == "reset") - { - C->Timer().Reset(); - } - else if (anArg == "restart") - { - C->Timer().Restart(); - } - else if (anArg == "start") - { - C->Timer().Start(); - } - else if (anArg == "stop") - { - C->Timer().Stop(); - } - else if (anArg == "show") - { - Standard_SStream ss; - C->Timer().Show(ss); - theDI << ss; - } - else if (anArg == "counter") - { - Standard_Real aSeconds,aCPUtime; - Standard_Integer aMinutes, aHours; - C->Timer().Show(aSeconds,aMinutes,aHours,aCPUtime); - theDI << "COUNTER " << a[++anIter] << ": " << aCPUtime << "\n"; - } - else - { - theDI << "Unknown argument '" << a[anIter] << "'!\n"; - } - } + else if (anArg == "-systemcpu" + || anArg == "-syscpu" + || anArg == "-cpusystem" + || anArg == "-cpusys") + { + if (++aNbPuts > 1) { theDI << " "; } + theDI << aChronom->Timer().SystemTimeCPU(); + } + else if (anArg == "-thread" + || anArg == "-threadonly") + { + bool isThreadOnly = Draw::ParseOnOffIterator (theNbArgs, theArgVec, anIter); + aChronom->Timer().Stop(); + aChronom->Timer().Reset(); + aChronom->Timer().SetThisThreadOnly (isThreadOnly); + } + else if (anArg == "-process") + { + bool isProcessTime = Draw::ParseOnOffIterator (theNbArgs, theArgVec, anIter); + aChronom->Timer().Stop(); + aChronom->Timer().Reset(); + aChronom->Timer().SetThisThreadOnly (!isProcessTime); + } + else + { + theDI << "Syntax error at '" << theArgVec[anIter] << "'\n"; + return 1; } } return 0; } - - //======================================================================= //function : ifbatch //purpose : @@ -878,7 +882,8 @@ static int dmeminfo (Draw_Interpretor& theDI, } else { - std::cerr << "Unknown argument '" << theArgVec[anIter] << "'!\n"; + theDI << "Syntax error at '" << theArgVec[anIter] << "'!\n"; + return 1; } } @@ -1304,11 +1309,33 @@ void Draw::BasicCommands(Draw_Interpretor& theCommands) __FILE__,Draw_wait,g); theCommands.Add("cpulimit","cpulimit [nbseconds], no args remove limits", __FILE__,cpulimit,g); - theCommands.Add("chrono","chrono [name action [action...]] \n Operates named timer.\n" - " Supported actions: reset, start, stop, restart, show, counter [text].\n" - " Without arguments enables / disables global timer for all DRAW commands.", - __FILE__,chronom,g); - theCommands.Add("dchrono","see help of chrono command", + + const char* aChronoHelp = + "chrono Name [-start] [-stop] [-reset] [-restart] [-counter Text]" + "\n\t\t: [-show] [-elapsed] [-userCPU] [-sysCPU]" + "\n\t\t: [-thread|-process {0|1}]" + "\n\t\t: Operates named timer:" + "\n\t\t: -start starts (resumes) timer" + "\n\t\t: -stop stops (pauses) timer" + "\n\t\t: -reset resets timer progress" + "\n\t\t: -restart resets and starts timer" + "\n\t\t: -show prints timer progress" + "\n\t\t: ('dchrono' puts into Tcl, 'chrono' puts into std::cout)" + "\n\t\t: -elapsed prints elapsed time in seconds" + "\n\t\t: -userCPU prints user CPU time in seconds" + "\n\t\t: -sysCPU prints system CPU time in seconds" + "\n\t\t: -counter prints 'COUNTER '" + "\n\t\t: -thread stops timer and sets measuring of CPU time for this thread only (FALSE by default)" + "\n\t\t: -process stops timer and sets measuring of CPU time for all threads (TRUE by default)" + "\n\t\t: Without arguments enables / disables global timer for all DRAW commands." + "\n\t\t: chrono {0|1}" + "\n\t\t: Typical usage:" + "\n\t\t: chrono t -restart" + "\n\t\t: " + "\n\t\t: chrono t -stop -show"; + theCommands.Add("chrono", aChronoHelp, + __FILE__,dchronom,g); + theCommands.Add("dchrono", aChronoHelp, __FILE__,dchronom,g); theCommands.Add("mallochook", "debug memory allocation/deallocation, w/o args for help", diff --git a/src/Draw/Draw_Chronometer.cxx b/src/Draw/Draw_Chronometer.cxx index 4792f22d40..95360b27ce 100644 --- a/src/Draw/Draw_Chronometer.cxx +++ b/src/Draw/Draw_Chronometer.cxx @@ -14,69 +14,50 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. - #include + #include -#include -#include -#include -IMPLEMENT_STANDARD_RTTIEXT(Draw_Chronometer,Draw_Drawable3D) +IMPLEMENT_STANDARD_RTTIEXT(Draw_Chronometer, Draw_Drawable3D) //======================================================================= //function : Draw_Chronometer -//purpose : +//purpose : //======================================================================= Draw_Chronometer::Draw_Chronometer() { + // } - -//======================================================================= -//function : Timer -//purpose : -//======================================================================= - -OSD_Timer& Draw_Chronometer::Timer() -{ - return myTimer; -} - - - //======================================================================= //function : DrawOn -//purpose : +//purpose : //======================================================================= - -void Draw_Chronometer::DrawOn(Draw_Display&)const +void Draw_Chronometer::DrawOn (Draw_Display& ) const { + // } - //======================================================================= //function : Copy -//purpose : +//purpose : //======================================================================= - -Handle(Draw_Drawable3D) Draw_Chronometer::Copy()const +Handle(Draw_Drawable3D) Draw_Chronometer::Copy() const { Handle(Draw_Chronometer) C = new Draw_Chronometer(); return C; } - //======================================================================= //function : Dump -//purpose : +//purpose : //======================================================================= - -void Draw_Chronometer::Dump(Standard_OStream& S)const +void Draw_Chronometer::Dump (Standard_OStream& S) const { - S << "Chronometer : "; + S << "Chronometer, "; + myTimer.Show (S); } - //======================================================================= //function : Whatis //purpose : diff --git a/src/Draw/Draw_Chronometer.hxx b/src/Draw/Draw_Chronometer.hxx index 25b7275ebe..3ab1b51cbf 100644 --- a/src/Draw/Draw_Chronometer.hxx +++ b/src/Draw/Draw_Chronometer.hxx @@ -17,32 +17,25 @@ #ifndef _Draw_Chronometer_HeaderFile #define _Draw_Chronometer_HeaderFile -#include - -#include #include -#include -#include -class Draw_Display; - +#include -class Draw_Chronometer; DEFINE_STANDARD_HANDLE(Draw_Chronometer, Draw_Drawable3D) //! Class to store chronometer variables. class Draw_Chronometer : public Draw_Drawable3D { - + DEFINE_STANDARD_RTTIEXT(Draw_Chronometer, Draw_Drawable3D) public: - Standard_EXPORT Draw_Chronometer(); - - Standard_EXPORT OSD_Timer& Timer(); - - //! Does nothhing, + + //! Return timer. + OSD_Timer& Timer() { return myTimer; } + + //! Does nothing, Standard_EXPORT void DrawOn (Draw_Display& dis) const Standard_OVERRIDE; - + //! For variable copy. Standard_EXPORT virtual Handle(Draw_Drawable3D) Copy() const Standard_OVERRIDE; @@ -52,28 +45,10 @@ public: //! For variable whatis command. Standard_EXPORT virtual void Whatis (Draw_Interpretor& I) const Standard_OVERRIDE; - - - - DEFINE_STANDARD_RTTIEXT(Draw_Chronometer,Draw_Drawable3D) - -protected: - - - - private: - OSD_Timer myTimer; - }; - - - - - - #endif // _Draw_Chronometer_HeaderFile diff --git a/src/DrawResources/TestCommands.tcl b/src/DrawResources/TestCommands.tcl index 1a28ba29c2..f120af32bf 100644 --- a/src/DrawResources/TestCommands.tcl +++ b/src/DrawResources/TestCommands.tcl @@ -1402,10 +1402,10 @@ proc _run_test {scriptsdir group gridname casefile echo} { append stats "MEMORY DELTA: [expr ($memuse - $membase) / 1024] KiB\n" } uplevel dchrono _timer stop - set time [uplevel dchrono _timer show] - if { [regexp -nocase {CPU user time:[ \t]*([0-9.e-]+)} $time res cpu_usr] } { - append stats "TOTAL CPU TIME: $cpu_usr sec\n" - } + set cpu_usr [uplevel dchrono _timer -userCPU] + set elps [uplevel dchrono _timer -elapsed] + append stats "TOTAL CPU TIME: $cpu_usr sec\n" + append stats "ELAPSED TIME: $elps sec\n" if { $dlog_exists && ! $echo } { dlog add $stats } else { diff --git a/src/OSD/OSD_Chronometer.cxx b/src/OSD/OSD_Chronometer.cxx index 24b1cad3ed..9a95197797 100644 --- a/src/OSD/OSD_Chronometer.cxx +++ b/src/OSD/OSD_Chronometer.cxx @@ -14,8 +14,9 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. - #include + +#include #include #ifndef _WIN32 @@ -182,6 +183,19 @@ OSD_Chronometer::~OSD_Chronometer() { } +//======================================================================= +//function : SetThisThreadOnly +//purpose : +//======================================================================= +void OSD_Chronometer::SetThisThreadOnly (Standard_Boolean theIsThreadOnly) +{ + if (!myIsStopped) + { + throw Standard_ProgramError ("OSD_Chronometer::SetThreadOnly() called for started Timer"); + } + myIsThreadOnly = theIsThreadOnly; +} + //======================================================================= //function : Reset //purpose : diff --git a/src/OSD/OSD_Chronometer.hxx b/src/OSD/OSD_Chronometer.hxx index 9753497f0d..98b8793ba0 100644 --- a/src/OSD/OSD_Chronometer.hxx +++ b/src/OSD/OSD_Chronometer.hxx @@ -91,6 +91,14 @@ public: return aSysTime; } + //! Return TRUE if current thread CPU time should be measured, + //! and FALSE to measure all threads CPU time; FALSE by default, + Standard_Boolean IsThisThreadOnly() const { return myIsThreadOnly; } + + //! Set if current thread (TRUE) or all threads (FALSE) CPU time should be measured. + //! Will raise exception if Timer is in started state. + Standard_EXPORT void SetThisThreadOnly (Standard_Boolean theIsThreadOnly); + //! Returns the current CPU user time in a variable. //! The chronometer can be running (laps Time) or stopped. void Show (Standard_Real& theUserSeconds) const { theUserSeconds = UserTimeCPU(); } diff --git a/tests/perf/mesh/bug27626 b/tests/perf/mesh/bug27626 index 4d90dbf925..7eec1325ea 100644 --- a/tests/perf/mesh/bug27626 +++ b/tests/perf/mesh/bug27626 @@ -1,10 +1,8 @@ puts "==========" -puts "OCC27626" +puts "OCC27626: Attempt to display shape in 3d leads to very long calculation loop" puts "==========" puts "" -####################################################################### -# Attempt to display shape in 3d leads to very long calculation loop -####################################################################### + pload XDE igesread [locate_data_file bug27626_badfil.igs] a * @@ -12,15 +10,9 @@ tclean a vinit vsetdispmode 1 -dchrono h restart -# -# DISPLAY OPERATION ----- START -# +dchrono h -restart vdisplay a -# -# DISPLAY OPERATION ----- FINISH -# -dchrono h stop counterv display +dchrono h -stop -counter display vfit checkview -screenshot -3d -path ${imagedir}/${test_image}.png diff --git a/tests/perf/modalg/bug25742_2 b/tests/perf/modalg/bug25742_2 index f636f2683c..f9b3384fbd 100755 --- a/tests/perf/modalg/bug25742_2 +++ b/tests/perf/modalg/bug25742_2 @@ -35,18 +35,18 @@ donly b1_4 fit display b2_1 -dchrono h restart +dchrono h -restart bopcurves b1_4 b2_1 -2d -dchrono h stop bopcurves counter bopcurves +dchrono h -stop -counter bopcurves checkview -screenshot -2d -path ${imagedir}/${test_image}_1.png mksurface s1 b1_4 mksurface s2 b2_1 -dchrono h2 restart +dchrono h2 -restart set CurveNumb [intersect resi s1 s2] -dchrono h2 stop counter CurveNumb +dchrono h2 -stop -counter CurveNumb if { [llength ${CurveNumb}] < 1 } { puts "Error : Bad intersection" From 1f000e597469b177172c2321368a4db60eae8c9f Mon Sep 17 00:00:00 2001 From: AndreyLA Date: Tue, 8 Feb 2022 18:53:18 +0300 Subject: [PATCH 243/639] 0031009: Modeling Algorithms - leak reported by Clang address sanitizer in IntCurvesFace_ShapeIntersector Refactor IntCurvesFace_ShapeIntersector. Use handles and std::unique_ptr instead of raw pointers. --- src/IntCurvesFace/FILES | 1 - .../IntCurvesFace_Intersector.cxx | 147 ++++----- .../IntCurvesFace_Intersector.hxx | 24 +- .../IntCurvesFace_ShapeIntersector.cxx | 300 +++++++++--------- .../IntCurvesFace_ShapeIntersector.hxx | 114 ++++--- .../IntCurvesFace_ShapeIntersector.lxx | 71 ----- 6 files changed, 287 insertions(+), 370 deletions(-) delete mode 100644 src/IntCurvesFace/IntCurvesFace_ShapeIntersector.lxx diff --git a/src/IntCurvesFace/FILES b/src/IntCurvesFace/FILES index f5dd47dae8..218dca7d5b 100644 --- a/src/IntCurvesFace/FILES +++ b/src/IntCurvesFace/FILES @@ -3,4 +3,3 @@ IntCurvesFace_Intersector.hxx IntCurvesFace_Intersector.lxx IntCurvesFace_ShapeIntersector.cxx IntCurvesFace_ShapeIntersector.hxx -IntCurvesFace_ShapeIntersector.lxx diff --git a/src/IntCurvesFace/IntCurvesFace_Intersector.cxx b/src/IntCurvesFace/IntCurvesFace_Intersector.cxx index 5ae6228f2d..78f47c648d 100644 --- a/src/IntCurvesFace/IntCurvesFace_Intersector.cxx +++ b/src/IntCurvesFace/IntCurvesFace_Intersector.cxx @@ -43,6 +43,9 @@ #include #include #include + +IMPLEMENT_STANDARD_RTTIEXT(IntCurvesFace_Intersector, Standard_Transient) + // static void ComputeSamplePars(const Handle(Adaptor3d_Surface)& Hsurface, const Standard_Integer nbsu, @@ -134,8 +137,6 @@ IntCurvesFace_Intersector::IntCurvesFace_Intersector(const TopoDS_Face& Face, done(Standard_False), myReady(Standard_False), nbpnt(0), - PtrOnPolyhedron(NULL), - PtrOnBndBounding(NULL), myUseBoundTol (UseBToler), myIsParallel(Standard_False) { @@ -201,14 +202,12 @@ IntCurvesFace_Intersector::IntCurvesFace_Intersector(const TopoDS_Face& Face, { Handle(TColStd_HArray1OfReal) UPars, VPars; ComputeSamplePars(Hsurface, nbsu, nbsv, UPars, VPars); - PtrOnPolyhedron = (IntCurveSurface_ThePolyhedronOfHInter *) - new IntCurveSurface_ThePolyhedronOfHInter(Hsurface, UPars->ChangeArray1(), - VPars->ChangeArray1()); + myPolyhedron.reset(new IntCurveSurface_ThePolyhedronOfHInter(Hsurface, UPars->ChangeArray1(), + VPars->ChangeArray1())); } else { - PtrOnPolyhedron = (IntCurveSurface_ThePolyhedronOfHInter *) - new IntCurveSurface_ThePolyhedronOfHInter(Hsurface,nbsu,nbsv,U0,V0,U1,V1); + myPolyhedron.reset(new IntCurveSurface_ThePolyhedronOfHInter(Hsurface,nbsu,nbsv,U0,V0,U1,V1)); } } myReady = Standard_True; @@ -218,8 +217,8 @@ IntCurvesFace_Intersector::IntCurvesFace_Intersector(const TopoDS_Face& Face, //purpose : //======================================================================= void IntCurvesFace_Intersector::InternalCall(const IntCurveSurface_HInter &HICS, - const Standard_Real parinf, - const Standard_Real parsup) + const Standard_Real parinf, + const Standard_Real parsup) { if(HICS.IsDone() && HICS.NbPoints() > 0) { //Calculate tolerance for 2d classifier @@ -282,7 +281,6 @@ void IntCurvesFace_Intersector::InternalCall(const IntCurveSurface_HInter &HICS, Standard_Real W = HICSW; IntCurveSurface_TransitionOnCurve transition = HICSPointindex.Transition(); gp_Pnt pnt = HICSPointindex.Pnt(); - // state = currentstate; // Modified by skv - Wed Sep 3 16:14:10 2003 OCC578 Begin Standard_Integer anIntState = (currentstate == TopAbs_IN) ? 0 : 1; // Modified by skv - Wed Sep 3 16:14:11 2003 OCC578 End @@ -340,8 +338,8 @@ void IntCurvesFace_Intersector::InternalCall(const IntCurveSurface_HInter &HICS, //purpose : //======================================================================= void IntCurvesFace_Intersector::Perform(const gp_Lin& L, - const Standard_Real ParMin, - const Standard_Real ParMax) + const Standard_Real ParMin, + const Standard_Real ParMax) { done = Standard_False; if (!myReady) @@ -360,7 +358,7 @@ void IntCurvesFace_Intersector::Perform(const gp_Lin& L, Standard_Real parinf=ParMin; Standard_Real parsup=ParMax; // - if(PtrOnPolyhedron == NULL) { + if(!myPolyhedron) { HICS.Perform(HLL,Hsurface); } else { @@ -368,7 +366,7 @@ void IntCurvesFace_Intersector::Perform(const gp_Lin& L, Bnd_Box boxLine; bndTool.LinBox (L, - ((IntCurveSurface_ThePolyhedronOfHInter *)PtrOnPolyhedron)->Bounding(), + myPolyhedron->Bounding(), boxLine); if(bndTool.NbSegments() == 0) return; @@ -381,8 +379,8 @@ void IntCurvesFace_Intersector::Perform(const gp_Lin& L, if((psup - pinf)<1e-10) { pinf-=1e-10; psup+=1e-10; } if(nbseg==1) { parinf=pinf; parsup=psup; } else { - if(parinf>pinf) parinf = pinf; - if(parsuppinf) parinf = pinf; + if(parsupParMax) { return; } @@ -391,28 +389,26 @@ void IntCurvesFace_Intersector::Perform(const gp_Lin& L, if(parsup>ParMax) parsup=ParMax; if(parinf>(parsup-1e-9)) return; IntCurveSurface_ThePolygonOfHInter polygon(HLL, - parinf, - parsup, - 2); + parinf, + parsup, + 2); #if OPTIMISATION - if(PtrOnBndBounding==NULL) { - PtrOnBndBounding = (Bnd_BoundSortBox *) new Bnd_BoundSortBox(); - IntCurveSurface_ThePolyhedronOfHInter *thePolyh= - (IntCurveSurface_ThePolyhedronOfHInter *)PtrOnPolyhedron; - ((Bnd_BoundSortBox *)(PtrOnBndBounding))-> - Initialize(IntCurveSurface_ThePolyhedronToolOfHInter::Bounding(*thePolyh), - IntCurveSurface_ThePolyhedronToolOfHInter::ComponentsBounding(*thePolyh)); + if(!myBndBounding) + { + myBndBounding.reset(new Bnd_BoundSortBox()); + myBndBounding->Initialize(IntCurveSurface_ThePolyhedronToolOfHInter::Bounding(*myPolyhedron), + IntCurveSurface_ThePolyhedronToolOfHInter::ComponentsBounding(*myPolyhedron)); } HICS.Perform(HLL, - polygon, - Hsurface, - *((IntCurveSurface_ThePolyhedronOfHInter *)PtrOnPolyhedron), - *((Bnd_BoundSortBox *)PtrOnBndBounding)); + polygon, + Hsurface, + *myPolyhedron, + *myBndBounding); #else HICS.Perform(HLL, - polygon, - Hsurface, - *((IntCurveSurface_ThePolyhedronOfHInter *)PtrOnPolyhedron)); + polygon, + Hsurface, + *myPolyhedron); #endif } @@ -423,8 +419,8 @@ void IntCurvesFace_Intersector::Perform(const gp_Lin& L, //purpose : //======================================================================= void IntCurvesFace_Intersector::Perform(const Handle(Adaptor3d_Curve)& HCu, - const Standard_Real ParMin, - const Standard_Real ParMax) + const Standard_Real ParMin, + const Standard_Real ParMax) { done = Standard_False; if (!myReady) @@ -443,10 +439,12 @@ void IntCurvesFace_Intersector::Perform(const Handle(Adaptor3d_Curve)& HCu, Standard_Real parinf=ParMin; Standard_Real parsup=ParMax; - if(PtrOnPolyhedron == NULL) { + if(!myPolyhedron) + { HICS.Perform(HCu,Hsurface); } - else { + else + { parinf = IntCurveSurface_TheHCurveTool::FirstParameter(HCu); parsup = IntCurveSurface_TheHCurveTool::LastParameter(HCu); if(parinfInitialize(IntCurveSurface_ThePolyhedronToolOfHInter::Bounding(*thePolyh), - IntCurveSurface_ThePolyhedronToolOfHInter::ComponentsBounding(*thePolyh)); + if(!myBndBounding) { + myBndBounding.reset(new Bnd_BoundSortBox()); + myBndBounding->Initialize(IntCurveSurface_ThePolyhedronToolOfHInter::Bounding(*myPolyhedron), + IntCurveSurface_ThePolyhedronToolOfHInter::ComponentsBounding(*myPolyhedron)); } HICS.Perform(HCu, - polygon, - Hsurface, - *((IntCurveSurface_ThePolyhedronOfHInter *)PtrOnPolyhedron), - *((Bnd_BoundSortBox *)PtrOnBndBounding)); + polygon, + Hsurface, + *myPolyhedron, + *myBndBounding); #else HICS.Perform(HCu, - polygon, - Hsurface, - *((IntCurveSurface_ThePolyhedronOfHInter *)PtrOnPolyhedron)); + polygon, + Hsurface, + *myPolyhedron); #endif } InternalCall(HICS,parinf,parsup); @@ -483,37 +480,33 @@ void IntCurvesFace_Intersector::Perform(const Handle(Adaptor3d_Curve)& HCu, //============================================================================ Bnd_Box IntCurvesFace_Intersector::Bounding() const { - if(PtrOnPolyhedron !=NULL) { - return(((IntCurveSurface_ThePolyhedronOfHInter *)PtrOnPolyhedron)->Bounding()); + if(myPolyhedron) + { + return myPolyhedron->Bounding(); } - else { + else + { Bnd_Box B; - return(B); + return B; } } -TopAbs_State IntCurvesFace_Intersector::ClassifyUVPoint(const gp_Pnt2d& Puv) const { + +TopAbs_State IntCurvesFace_Intersector::ClassifyUVPoint(const gp_Pnt2d& Puv) const +{ TopAbs_State state = myTopolTool->Classify(Puv,1e-7); - return(state); -} -//============================================================================ -void IntCurvesFace_Intersector::Destroy() { - if(PtrOnPolyhedron !=NULL) { - delete (IntCurveSurface_ThePolyhedronOfHInter *)PtrOnPolyhedron; - PtrOnPolyhedron = NULL; - } - if(PtrOnBndBounding !=NULL) { - delete (Bnd_BoundSortBox *)PtrOnBndBounding; - PtrOnBndBounding=NULL; - } + return state; } - void IntCurvesFace_Intersector::SetUseBoundToler(Standard_Boolean UseBToler) - { - myUseBoundTol = UseBToler; - } +void IntCurvesFace_Intersector::SetUseBoundToler(Standard_Boolean UseBToler) +{ + myUseBoundTol = UseBToler; +} - Standard_Boolean IntCurvesFace_Intersector::GetUseBoundToler() const - { - return myUseBoundTol; - } +Standard_Boolean IntCurvesFace_Intersector::GetUseBoundToler() const +{ + return myUseBoundTol; +} +IntCurvesFace_Intersector::~IntCurvesFace_Intersector() +{ +} diff --git a/src/IntCurvesFace/IntCurvesFace_Intersector.hxx b/src/IntCurvesFace/IntCurvesFace_Intersector.hxx index c1af3ff4ea..b7ec31eeb3 100644 --- a/src/IntCurvesFace/IntCurvesFace_Intersector.hxx +++ b/src/IntCurvesFace/IntCurvesFace_Intersector.hxx @@ -18,14 +18,18 @@ #define _IntCurvesFace_Intersector_HeaderFile #include +#include #include #include +#include #include #include #include #include #include +#include + class BRepTopAdaptor_TopolTool; class gp_Lin; class gp_Pnt; @@ -33,8 +37,13 @@ class IntCurveSurface_HInter; class gp_Pnt2d; class Bnd_Box; -class IntCurvesFace_Intersector +DEFINE_STANDARD_HANDLE(IntCurvesFace_Intersector, Standard_Transient) + + +class IntCurvesFace_Intersector : public Standard_Transient { + DEFINE_STANDARD_RTTIEXT(IntCurvesFace_Intersector, Standard_Transient) + public: DEFINE_STANDARD_ALLOC @@ -123,14 +132,7 @@ public: //! Returns the boundary tolerance flag Standard_EXPORT Standard_Boolean GetUseBoundToler() const; - Standard_EXPORT void Destroy(); -~IntCurvesFace_Intersector() -{ - Destroy(); -} - - - + Standard_EXPORT virtual ~IntCurvesFace_Intersector(); protected: @@ -153,8 +155,8 @@ private: Standard_Boolean myReady; Standard_Integer nbpnt; TopoDS_Face face; - Standard_Address PtrOnPolyhedron; - Standard_Address PtrOnBndBounding; + std::unique_ptr myPolyhedron; + std::unique_ptr myBndBounding; Standard_Boolean myUseBoundTol; Standard_Boolean myIsParallel; //Curve is "parallel" face surface //This case is recognized only for some pairs diff --git a/src/IntCurvesFace/IntCurvesFace_ShapeIntersector.cxx b/src/IntCurvesFace/IntCurvesFace_ShapeIntersector.cxx index d99f3fd3ce..ea40cebe30 100644 --- a/src/IntCurvesFace/IntCurvesFace_ShapeIntersector.cxx +++ b/src/IntCurvesFace/IntCurvesFace_ShapeIntersector.cxx @@ -30,202 +30,186 @@ #include #include -//-- ================================================================================ -IntCurvesFace_ShapeIntersector::IntCurvesFace_ShapeIntersector() { - nbfaces=0; - done=Standard_False; - PtrJetons=NULL; - PtrJetonsIndex=NULL; + +IntCurvesFace_ShapeIntersector::IntCurvesFace_ShapeIntersector() +: myIsDone(Standard_False), + myNbFaces(0) +{ } -//-- ================================================================================ -void IntCurvesFace_ShapeIntersector::Load(const TopoDS_Shape& shape, - const Standard_Real tol) { - PtrJetons=NULL; - PtrJetonsIndex=NULL; - if(nbfaces) { - Destroy(); - } + +void IntCurvesFace_ShapeIntersector::Load(const TopoDS_Shape& theShape, + const Standard_Real theTol) +{ TopExp_Explorer Ex; Standard_Integer i; - for(nbfaces=0,i=0,Ex.Init(shape,TopAbs_FACE); Ex.More(); i++,Ex.Next()) { - nbfaces++; - TopoDS_Face currentface = TopoDS::Face(Ex.Current()); - PtrIntersector.Append((void *)(new IntCurvesFace_Intersector(currentface,tol))); - } -} -//-- ================================================================================ -void IntCurvesFace_ShapeIntersector::Destroy() { - if(PtrJetons) { - delete ((Standard_Integer *)PtrJetons); - PtrJetons=NULL; + for(myNbFaces = 0, i = 0, Ex.Init(theShape, TopAbs_FACE); Ex.More(); ++i, Ex.Next()) + { + ++myNbFaces; + TopoDS_Face aCurrentFace = TopoDS::Face(Ex.Current()); + myIntersector.Append(new IntCurvesFace_Intersector(aCurrentFace, theTol)); } - if(PtrJetonsIndex) { - delete ((Standard_Integer *)PtrJetonsIndex); - PtrJetonsIndex=NULL; - } - for(Standard_Integer i=1; i<=nbfaces; i++) { - IntCurvesFace_Intersector *Ptr = (IntCurvesFace_Intersector *)PtrIntersector.ChangeValue(i); - delete Ptr; - } - done=Standard_False; - nbfaces=0; - PtrIntersector.Clear(); - IndexPt.Clear(); IndexFace.Clear(); IndexIntPnt.Clear();IndexPar.Clear(); } -//-- ================================================================================ -void IntCurvesFace_ShapeIntersector::Perform(const gp_Lin& L, - const Standard_Real ParMin, - const Standard_Real ParMax) { - done = Standard_False; - for(Standard_Integer i=1; i<=nbfaces; i++) { - IntCurvesFace_Intersector *Ptr = (IntCurvesFace_Intersector *)PtrIntersector.ChangeValue(i); - Ptr->Perform(L,ParMin,ParMax); + +void IntCurvesFace_ShapeIntersector::Perform(const gp_Lin& theL, + const Standard_Real theParMin, + const Standard_Real theParMax) +{ + myIsDone = Standard_False; + for(Standard_Integer i = 1; i <= myNbFaces; ++i) + { + myIntersector.ChangeValue(i)->Perform(theL, theParMin, theParMax); } SortResult(); } -//-- ================================================================================ -void IntCurvesFace_ShapeIntersector::PerformNearest(const gp_Lin& L, - const Standard_Real ParMin, - const Standard_Real _ParMax) { - - Standard_Integer i; - Standard_Integer* _PtrJetons=(Standard_Integer *)PtrJetons; - Standard_Integer* _PtrJetonsIndex=(Standard_Integer *)PtrJetonsIndex; - - if(nbfaces>2) { - if(PtrJetons==NULL) { - PtrJetons = (void *) new Standard_Integer [nbfaces]; - PtrJetonsIndex = (void *) new Standard_Integer [nbfaces]; - Standard_Integer *Ptr =(Standard_Integer *)PtrJetons; - Standard_Integer *PtrI=(Standard_Integer *)PtrJetonsIndex; - for(i=0;i 2) + { + if (myPtrNums.IsEmpty()) + { + myPtrNums = TColStd_HArray1OfInteger(0, myNbFaces - 1); + myPtrIndexNums = TColStd_HArray1OfInteger(0, myNbFaces - 1); + for(; i < myNbFaces; ++i) + { + myPtrNums.ChangeValue(i) = 0; + myPtrIndexNums.ChangeValue(i) = i + 1; } - _PtrJetons=(Standard_Integer *)PtrJetons; - _PtrJetonsIndex=(Standard_Integer *)PtrJetonsIndex; } } - - Standard_Integer Indexface=-1; - Standard_Real ParMax=_ParMax; - - - done = Standard_False; - for(Standard_Integer ii=1; ii<=nbfaces; ii++) { - if(_PtrJetons) { - i=_PtrJetonsIndex[ii-1]; + Standard_Integer anIndexFace = -1; + Standard_Real aParMax=theParMax; + myIsDone = Standard_False; + for(Standard_Integer ii = 1; ii <= myNbFaces; ++ii) + { + if (!myPtrNums.IsEmpty()) + { + i = myPtrIndexNums.Value(ii - 1); } - else { - i=ii; + else + { + i = ii; } - - IntCurvesFace_Intersector *Ptr = (IntCurvesFace_Intersector *)PtrIntersector.ChangeValue(i); - if(ParMinPerform(L,ParMin,ParMax); - if(Ptr->IsDone()) { - Standard_Integer n=Ptr->NbPnt(); - for(Standard_Integer j=1;j<=n;j++) { - Standard_Real w=Ptr->WParameter(j); - if(wPerform(theL, theParMin,aParMax); + if(anIntersector->IsDone()) + { + Standard_Integer n = anIntersector->NbPnt(); + for(Standard_Integer j = 1; j <= n; ++j) + { + Standard_Real w = anIntersector->WParameter(j); + if(w < aParMax) + { + aParMax = w; + anIndexFace = ii - 1; + } + } } - else { - done = Standard_False; - return; + else + { + myIsDone = Standard_False; + return; } } } - if(PtrJetons && Indexface>=0) { - _PtrJetons[Indexface]++; - + if (!myPtrNums.IsEmpty() && anIndexFace >= 0) + { + myPtrNums.ChangeValue(anIndexFace) += 1; Standard_Integer im1; - for(im1=Indexface-1,i=Indexface; i>=1 && _PtrJetons[i]>_PtrJetons[i-1]; i--,im1--) { - Standard_Integer t=_PtrJetonsIndex[i]; - _PtrJetonsIndex[i]=_PtrJetonsIndex[im1]; - _PtrJetonsIndex[im1]=t; - t=_PtrJetons[i]; - _PtrJetons[i]=_PtrJetons[im1]; - _PtrJetons[im1]=t; + for (im1 = anIndexFace - 1, i = anIndexFace; i >= 1 && myPtrNums.Value(i) > myPtrNums.Value(im1); --i, --im1) + { + std::swap(myPtrIndexNums.ChangeValue(i), myPtrIndexNums.ChangeValue(im1)); + std::swap(myPtrNums.ChangeValue(i), myPtrNums.ChangeValue(im1)); } - //--for(Standard_Integer dd=0; dd",dd,_PtrJetons[dd],_PtrJetonsIndex[dd]); } } - //--printf("\n"); } SortResult(); } -//-- ================================================================================ -void IntCurvesFace_ShapeIntersector::Perform(const Handle(Adaptor3d_Curve)& HCu, - const Standard_Real ParMin, - const Standard_Real ParMax) { - done = Standard_False; - for(Standard_Integer i=1; i<=nbfaces; i++) { - IntCurvesFace_Intersector *Ptr = (IntCurvesFace_Intersector *)PtrIntersector.ChangeValue(i); - Ptr->Perform(HCu,ParMin,ParMax); + +void IntCurvesFace_ShapeIntersector::Perform(const Handle(Adaptor3d_Curve)& theHCurve, + const Standard_Real theParMin, + const Standard_Real theParMax) +{ + myIsDone = Standard_False; + for(Standard_Integer i = 1; i <= myNbFaces; ++i) + { + Handle(IntCurvesFace_Intersector) anIntersector = myIntersector.ChangeValue(i); + anIntersector->Perform(theHCurve, theParMin, theParMax); } SortResult(); } //-- ================================================================================ -//-- PtrIntersector : Sequence d addresses -//-- IndexPt : 1 2 3 .... n points avant le tri -//-- IndexFace : Numero de la face (de l intersector) du point IndexPt(i) -//-- IndexIntPnt : Numero du point IndexPt(i) dans l'intersector IndexFace(IndexPt(i)) -//-- IndexPar : W parameter du point IndexPt(i) +//-- myIntersector : Sequence of the addresses +//-- myIndexPt : 1 2 3 .... n Points before the sorting +//-- myNumberFace : Number of the face (of the intersector) of the point myIndexPt(i) +//-- myNumberIntPnt : Number of the point myIndexPt(i) of the intersection myNumberFace(myIndexPt(i)) +//-- myIndexPar : Parameter W of point myIndexPt(i) //-- -//-- En resume, pour chaque point indice par K = IndexPt(i) on a -//-- * la face a laquelle il appartient : IndexFace(K) -//-- * le numero du point dans l'intersecteur FaceCurve : IndexIntPnt(K) -//-- * le parametre W du point sur la courbe : IndexPar(K) +//-- To sum up, for each point index of K = myIndexPt(i) on a +//-- * the face to which it belongs : myNumberFace(K) +//-- * the number of the point in the intersection for FaceCurve : myNumberIntPnt(K) +//-- * the parameter W of the point on the curve : myIndexPar(K) //-- -//-- SortResult Trie les points par ordre croissant de W -//-- (remet a jour le tableau d index TabPt(.)) +//-- SortResult Sorts the points in ascending order of W +//-- (updating the index table TabPt(.)) //-- //-- ================================================================================ -void IntCurvesFace_ShapeIntersector::SortResult() { - done = Standard_True; - Standard_Integer nbpnt=0; - IndexPt.Clear(); IndexFace.Clear(); IndexIntPnt.Clear();IndexPar.Clear(); - //-- ----------------------------------------------------- - //-- r e c u p e r a t i o n d e s r e s u l t a t s - //-- - for(Standard_Integer f=1; f<=nbfaces; f++) { - IntCurvesFace_Intersector *Ptr = (IntCurvesFace_Intersector *)PtrIntersector.ChangeValue(f); - if(Ptr->IsDone()) { - Standard_Integer n=Ptr->NbPnt(); - for(Standard_Integer j=1;j<=n;j++) { - IndexPt.Append(++nbpnt); - IndexFace.Append(f); - IndexIntPnt.Append(j); - IndexPar.Append(Ptr->WParameter(j)); +void IntCurvesFace_ShapeIntersector::SortResult() +{ + myIsDone = Standard_True; + Standard_Integer aNbPnt=0; + myIndexPt.Clear(); + myIndexFace.Clear(); + myIndexIntPnt.Clear(); + myIndexPar.Clear(); + + //Retrieval of the results + for(Standard_Integer f = 1; f <= myNbFaces; ++f) + { + Handle(IntCurvesFace_Intersector) anIntersector = myIntersector.ChangeValue(f); + if(anIntersector->IsDone()) + { + Standard_Integer n = anIntersector->NbPnt(); + for(Standard_Integer j = 1; j <= n; ++j) + { + myIndexPt.Append(++aNbPnt); + myIndexFace.Append(f); + myIndexIntPnt.Append(j); + myIndexPar.Append(anIntersector->WParameter(j)); } } - else { - done = Standard_False; + else + { + myIsDone = Standard_False; return; } } - //-- ----------------------------------------------------- - //-- t r i s e l o n l e p a r a m e t r e w - //-- - Standard_Boolean triok; - do { - triok=Standard_True; - for(Standard_Integer ind0=1;ind0 IndexPar(indp1)) { - IndexPt(ind0) =indp1; - IndexPt(ind0+1)=ind; - triok=Standard_False; + + //Sort according to parameter w + Standard_Boolean isOK; + do + { + isOK = Standard_True; + for(Standard_Integer ind0 = 1; ind0 < aNbPnt; ind0++) + { + Standard_Integer ind = myIndexPt(ind0); + Standard_Integer indp1 = myIndexPt(ind0 + 1); + if(myIndexPar(ind) > myIndexPar(indp1)) + { + myIndexPt(ind0) = indp1; + myIndexPt(ind0 + 1) = ind; + isOK = Standard_False; } } } - while(triok==Standard_False); + while(!isOK); +} + +IntCurvesFace_ShapeIntersector::~IntCurvesFace_ShapeIntersector() +{ } -//-- ================================================================================ -//-- Creation le 28 jan 98 -//-- diff --git a/src/IntCurvesFace/IntCurvesFace_ShapeIntersector.hxx b/src/IntCurvesFace/IntCurvesFace_ShapeIntersector.hxx index 5f5e11fe25..1009b94a00 100644 --- a/src/IntCurvesFace/IntCurvesFace_ShapeIntersector.hxx +++ b/src/IntCurvesFace/IntCurvesFace_ShapeIntersector.hxx @@ -23,12 +23,12 @@ #include #include -#include -#include +#include #include #include #include #include +#include #include class Adaptor3d_Curve; @@ -52,7 +52,7 @@ public: //! segment L and the loaded shape. //! //! PInf is the smallest parameter on the line - //! PSup is the highest parammter on the line + //! PSup is the highest parameter on the line //! //! For an infinite line PInf and PSup can be //! +/- RealLast. @@ -62,92 +62,102 @@ public: //! segment L and the loaded shape. //! //! PInf is the smallest parameter on the line - //! PSup is the highest parammter on the line + //! PSup is the highest parameter on the line //! //! For an infinite line PInf and PSup can be //! +/- RealLast. Standard_EXPORT void PerformNearest (const gp_Lin& L, const Standard_Real PInf, const Standard_Real PSup); //! same method for a HCurve from Adaptor3d. - //! PInf an PSup can also be - and + INF. + //! PInf an PSup can also be -INF and +INF. Standard_EXPORT void Perform (const Handle(Adaptor3d_Curve)& HCu, const Standard_Real PInf, const Standard_Real PSup); - //! True is returned when the intersection have been computed. - Standard_Boolean IsDone() const; - - Standard_Integer NbPnt() const; + //! True when the intersection has been computed. + Standard_Boolean IsDone() const + { + return myIsDone; + } + //! Returns the number of the intersection points + Standard_Integer NbPnt() const + { + return myIndexPt.Length(); + } //! Returns the U parameter of the ith intersection point //! on the surface. - Standard_Real UParameter (const Standard_Integer I) const; - + Standard_Real UParameter (const Standard_Integer I) const + { + Handle(IntCurvesFace_Intersector) anIntAdaptor = myIntersector(myIndexFace(myIndexPt(I))); + return anIntAdaptor->UParameter(myIndexIntPnt(myIndexPt(I))); + } + //! Returns the V parameter of the ith intersection point //! on the surface. - Standard_Real VParameter (const Standard_Integer I) const; + Standard_Real VParameter (const Standard_Integer I) const + { + Handle(IntCurvesFace_Intersector) anIntAdaptor = myIntersector(myIndexFace(myIndexPt(I))); + return anIntAdaptor->VParameter(myIndexIntPnt(myIndexPt(I))); + } //! Returns the parameter of the ith intersection point //! on the line. - Standard_Real WParameter (const Standard_Integer I) const; + Standard_Real WParameter (const Standard_Integer I) const + { + Handle(IntCurvesFace_Intersector) anIntAdaptor = myIntersector(myIndexFace(myIndexPt(I))); + return anIntAdaptor->WParameter(myIndexIntPnt(myIndexPt(I))); + } //! Returns the geometric point of the ith intersection //! between the line and the surface. - const gp_Pnt& Pnt (const Standard_Integer I) const; + const gp_Pnt& Pnt (const Standard_Integer I) const + { + Handle(IntCurvesFace_Intersector) anIntAdaptor = myIntersector(myIndexFace(myIndexPt(I))); + return anIntAdaptor->Pnt(myIndexIntPnt(myIndexPt(I))); + } //! Returns the ith transition of the line on the surface. - IntCurveSurface_TransitionOnCurve Transition (const Standard_Integer I) const; + IntCurveSurface_TransitionOnCurve Transition (const Standard_Integer I) const + { + Handle(IntCurvesFace_Intersector) anIntAdaptor = myIntersector(myIndexFace(myIndexPt(I))); + return anIntAdaptor->Transition(myIndexIntPnt(myIndexPt(I))); + } //! Returns the ith state of the point on the face. //! The values can be either TopAbs_IN //! ( the point is in the face) //! or TopAbs_ON //! ( the point is on a boundary of the face). - TopAbs_State State (const Standard_Integer I) const; + TopAbs_State State(const Standard_Integer I) const + { + Handle(IntCurvesFace_Intersector) anIntAdaptor = myIntersector(myIndexFace(myIndexPt(I))); + return anIntAdaptor->State(myIndexIntPnt(myIndexPt(I))); + } //! Returns the significant face used to determine //! the intersection. - const TopoDS_Face& Face (const Standard_Integer I) const; + const TopoDS_Face& Face(const Standard_Integer I) const + { + Handle(IntCurvesFace_Intersector) anIntAdaptor = myIntersector(myIndexFace(myIndexPt(I))); + return anIntAdaptor->Face(); + } //! Internal method. Sort the result on the Curve //! parameter. Standard_EXPORT void SortResult(); - Standard_EXPORT void Destroy(); -~IntCurvesFace_ShapeIntersector() -{ - Destroy(); -} - - - - -protected: - - - - + Standard_EXPORT virtual ~IntCurvesFace_ShapeIntersector(); private: - - - - Standard_Boolean done; - Standard_Integer nbfaces; - Standard_Address PtrJetons; - Standard_Address PtrJetonsIndex; - BRepTopAdaptor_SeqOfPtr PtrIntersector; - TColStd_SequenceOfInteger IndexPt; - TColStd_SequenceOfInteger IndexFace; - TColStd_SequenceOfInteger IndexIntPnt; - TColStd_SequenceOfReal IndexPar; - - + + Standard_Boolean myIsDone; + Standard_Integer myNbFaces; + TColStd_Array1OfInteger myPtrNums; + TColStd_Array1OfInteger myPtrIndexNums; + NCollection_Sequence myIntersector; + TColStd_SequenceOfInteger myIndexPt; + TColStd_SequenceOfInteger myIndexFace; + TColStd_SequenceOfInteger myIndexIntPnt; + TColStd_SequenceOfReal myIndexPar; }; - -#include - - - - - #endif // _IntCurvesFace_ShapeIntersector_HeaderFile diff --git a/src/IntCurvesFace/IntCurvesFace_ShapeIntersector.lxx b/src/IntCurvesFace/IntCurvesFace_ShapeIntersector.lxx deleted file mode 100644 index 66e5db930a..0000000000 --- a/src/IntCurvesFace/IntCurvesFace_ShapeIntersector.lxx +++ /dev/null @@ -1,71 +0,0 @@ -// Created on: 1998-01-28 -// Created by: Laurent BUCHARD -// Copyright (c) 1998-1999 Matra Datavision -// Copyright (c) 1999-2014 OPEN CASCADE SAS -// -// This file is part of Open CASCADE Technology software library. -// -// This library is free software; you can redistribute it and/or modify it under -// the terms of the GNU Lesser General Public License version 2.1 as published -// by the Free Software Foundation, with special exception defined in the file -// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT -// distribution for complete text of the license and disclaimer of any warranty. -// -// Alternatively, this file may be used under the terms of Open CASCADE -// commercial license or contractual agreement. - -#include - - -inline Standard_Integer IntCurvesFace_ShapeIntersector::NbPnt() const { - return(IndexPt.Length()); -} - -inline Standard_Real IntCurvesFace_ShapeIntersector::UParameter(const Standard_Integer i) const { - IntCurvesFace_Intersector *Ptr = - (IntCurvesFace_Intersector *)(PtrIntersector(IndexFace(IndexPt(i)))); - return(Ptr->UParameter(IndexIntPnt(IndexPt(i)))); -} - -inline Standard_Real IntCurvesFace_ShapeIntersector::VParameter(const Standard_Integer i) const { - IntCurvesFace_Intersector *Ptr = - (IntCurvesFace_Intersector *)(PtrIntersector(IndexFace(IndexPt(i)))); - return(Ptr->VParameter(IndexIntPnt(IndexPt(i)))); -} - -inline Standard_Real IntCurvesFace_ShapeIntersector::WParameter(const Standard_Integer i) const { - IntCurvesFace_Intersector *Ptr = - (IntCurvesFace_Intersector *)(PtrIntersector(IndexFace(IndexPt(i)))); - return(Ptr->WParameter(IndexIntPnt(IndexPt(i)))); -} - -inline const gp_Pnt& IntCurvesFace_ShapeIntersector::Pnt(const Standard_Integer i) const { - IntCurvesFace_Intersector *Ptr = - (IntCurvesFace_Intersector *)(PtrIntersector(IndexFace(IndexPt(i)))); - return(Ptr->Pnt(IndexIntPnt(IndexPt(i)))); -} - -inline IntCurveSurface_TransitionOnCurve IntCurvesFace_ShapeIntersector::Transition(const Standard_Integer i) const { - IntCurvesFace_Intersector *Ptr = - (IntCurvesFace_Intersector *)(PtrIntersector(IndexFace(IndexPt(i)))); - return(Ptr->Transition(IndexIntPnt(IndexPt(i)))); -} - -inline TopAbs_State IntCurvesFace_ShapeIntersector::State(const Standard_Integer i) const { - IntCurvesFace_Intersector *Ptr = - (IntCurvesFace_Intersector *)(PtrIntersector(IndexFace(IndexPt(i)))); - return(Ptr->State(IndexIntPnt(IndexPt(i)))); -} - - -inline const TopoDS_Face& IntCurvesFace_ShapeIntersector::Face(const Standard_Integer i) const { - IntCurvesFace_Intersector *Ptr = - (IntCurvesFace_Intersector *)(PtrIntersector(IndexFace(IndexPt(i)))); - return(Ptr->Face()); -} - -inline Standard_Boolean IntCurvesFace_ShapeIntersector::IsDone() const { - return(done); -} - - From 1f37f1d50a91cda73f8a4445525abb3e60a31f84 Mon Sep 17 00:00:00 2001 From: ifv Date: Thu, 3 Mar 2022 15:05:23 +0300 Subject: [PATCH 244/639] 0031661: Modeling Data - Exception when projecting parabola or hyperbola to plane ProjLib/ProjLib_ProjectOnPlane.cxx - formatting 0031661: Modeling Data - Algorithm crashes when projecting parabola or hyperbola to plane ProjLib/ProjLib_ProjectOnPlane.cxx - building of analytical parabola and hyperbola is added bugs/moddata_3/bug31661_* - new test cases are added --- src/ProjLib/ProjLib_ProjectOnPlane.cxx | 1629 ++++++++++++++---------- src/ProjLib/ProjLib_ProjectOnPlane.hxx | 5 +- tests/bugs/moddata_3/bug31661_1 | 26 + tests/bugs/moddata_3/bug31661_2 | 26 + 4 files changed, 1012 insertions(+), 674 deletions(-) create mode 100644 tests/bugs/moddata_3/bug31661_1 create mode 100644 tests/bugs/moddata_3/bug31661_2 diff --git a/src/ProjLib/ProjLib_ProjectOnPlane.cxx b/src/ProjLib/ProjLib_ProjectOnPlane.cxx index 07d3292333..4330a8666c 100644 --- a/src/ProjLib/ProjLib_ProjectOnPlane.cxx +++ b/src/ProjLib/ProjLib_ProjectOnPlane.cxx @@ -47,8 +47,14 @@ #include #include #include +#include +#include +#include +#include +#include - +const Standard_Real aParabolaLimit = 20000.; +const Standard_Real aHyperbolaLimit = 10.; //======================================================================= //function : OnPlane_Value @@ -56,18 +62,18 @@ //======================================================================= static gp_Pnt OnPlane_Value(const Standard_Real U, - const Handle(Adaptor3d_Curve)& aCurvePtr, - const gp_Ax3& Pl, - const gp_Dir& D) + const Handle(Adaptor3d_Curve)& aCurvePtr, + const gp_Ax3& Pl, + const gp_Dir& D) { // PO . Z / Z = Pl.Direction() // Proj(u) = P(u) + ------- * D avec \ O = Pl.Location() // D . Z gp_Pnt Point = aCurvePtr->Value(U); - - gp_Vec PO(Point,Pl.Location()); - + + gp_Vec PO(Point, Pl.Location()); + Standard_Real Alpha = PO * gp_Vec(Pl.Direction()); Alpha /= D * Pl.Direction(); Point.SetXYZ(Point.XYZ() + Alpha * D.XYZ()); @@ -81,25 +87,25 @@ static gp_Pnt OnPlane_Value(const Standard_Real U, //======================================================================= static gp_Vec OnPlane_DN(const Standard_Real U, - const Standard_Integer DerivativeRequest, - const Handle(Adaptor3d_Curve)& aCurvePtr, - const gp_Ax3& Pl, - const gp_Dir& D) + const Standard_Integer DerivativeRequest, + const Handle(Adaptor3d_Curve)& aCurvePtr, + const gp_Ax3& Pl, + const gp_Dir& D) { // PO . Z / Z = Pl.Direction() // Proj(u) = P(u) + ------- * D avec \ O = Pl.Location() // D . Z - gp_Vec Vector = aCurvePtr->DN(U,DerivativeRequest); + gp_Vec Vector = aCurvePtr->DN(U, DerivativeRequest); gp_Dir Z = Pl.Direction(); - + Standard_Real - Alpha = Vector * gp_Vec(Z); - Alpha /= D * Z; + Alpha = Vector * gp_Vec(Z); + Alpha /= D * Z; - Vector.SetXYZ( Vector.XYZ() - Alpha * D.XYZ()); - return Vector ; + Vector.SetXYZ(Vector.XYZ() - Alpha * D.XYZ()); + return Vector; } //======================================================================= @@ -108,27 +114,27 @@ static gp_Vec OnPlane_DN(const Standard_Real U, //======================================================================= static Standard_Boolean OnPlane_D1(const Standard_Real U, - gp_Pnt& P, - gp_Vec& V, - const Handle(Adaptor3d_Curve)& aCurvePtr, - const gp_Ax3& Pl, - const gp_Dir& D) + gp_Pnt& P, + gp_Vec& V, + const Handle(Adaptor3d_Curve)& aCurvePtr, + const gp_Ax3& Pl, + const gp_Dir& D) { Standard_Real Alpha; gp_Pnt Point; gp_Vec Vector; - + gp_Dir Z = Pl.Direction(); aCurvePtr->D1(U, Point, Vector); // evaluate the point as in `OnPlane_Value` - gp_Vec PO(Point,Pl.Location()); - Alpha = PO * gp_Vec(Z); + gp_Vec PO(Point, Pl.Location()); + Alpha = PO * gp_Vec(Z); Alpha /= D * Z; P.SetXYZ(Point.XYZ() + Alpha * D.XYZ()); - + // evaluate the derivative. // // d(Proj) d(P) 1 d(P) @@ -136,10 +142,10 @@ static Standard_Boolean OnPlane_D1(const Standard_Real U, // dU dU ( D . Z) dU // - Alpha = Vector * gp_Vec(Z); - Alpha /= D * Z; + Alpha = Vector * gp_Vec(Z); + Alpha /= D * Z; - V.SetXYZ( Vector.XYZ() - Alpha * D.XYZ()); + V.SetXYZ(Vector.XYZ() - Alpha * D.XYZ()); return Standard_True; } @@ -149,25 +155,25 @@ static Standard_Boolean OnPlane_D1(const Standard_Real U, //======================================================================= static Standard_Boolean OnPlane_D2(const Standard_Real U, - gp_Pnt& P, - gp_Vec& V1, - gp_Vec& V2, - const Handle(Adaptor3d_Curve) & aCurvePtr, - const gp_Ax3& Pl, - const gp_Dir& D) + gp_Pnt& P, + gp_Vec& V1, + gp_Vec& V2, + const Handle(Adaptor3d_Curve) & aCurvePtr, + const gp_Ax3& Pl, + const gp_Dir& D) { Standard_Real Alpha; gp_Pnt Point; gp_Vec Vector1, - Vector2; - + Vector2; + gp_Dir Z = Pl.Direction(); aCurvePtr->D2(U, Point, Vector1, Vector2); // evaluate the point as in `OnPlane_Value` - gp_Vec PO(Point,Pl.Location()); - Alpha = PO * gp_Vec(Z); + gp_Vec PO(Point, Pl.Location()); + Alpha = PO * gp_Vec(Z); Alpha /= D * Z; P.SetXYZ(Point.XYZ() + Alpha * D.XYZ()); @@ -178,15 +184,15 @@ static Standard_Boolean OnPlane_D2(const Standard_Real U, // dU dU ( D . Z) dU // - Alpha = Vector1 * gp_Vec(Z); - Alpha /= D * Z; + Alpha = Vector1 * gp_Vec(Z); + Alpha /= D * Z; - V1.SetXYZ( Vector1.XYZ() - Alpha * D.XYZ()); + V1.SetXYZ(Vector1.XYZ() - Alpha * D.XYZ()); - Alpha = Vector2 * gp_Vec(Z); - Alpha /= D * Z; + Alpha = Vector2 * gp_Vec(Z); + Alpha /= D * Z; - V2.SetXYZ( Vector2.XYZ() - Alpha * D.XYZ()); + V2.SetXYZ(Vector2.XYZ() - Alpha * D.XYZ()); return Standard_True; } @@ -196,30 +202,30 @@ static Standard_Boolean OnPlane_D2(const Standard_Real U, //======================================================================= static Standard_Boolean OnPlane_D3(const Standard_Real U, - gp_Pnt& P, - gp_Vec& V1, - gp_Vec& V2, - gp_Vec& V3, - const Handle(Adaptor3d_Curve)& aCurvePtr, - const gp_Ax3& Pl, - const gp_Dir& D) + gp_Pnt& P, + gp_Vec& V1, + gp_Vec& V2, + gp_Vec& V3, + const Handle(Adaptor3d_Curve)& aCurvePtr, + const gp_Ax3& Pl, + const gp_Dir& D) { Standard_Real Alpha; gp_Pnt Point; gp_Vec Vector1, - Vector2, - Vector3; - + Vector2, + Vector3; + gp_Dir Z = Pl.Direction(); aCurvePtr->D3(U, Point, Vector1, Vector2, Vector3); // evaluate the point as in `OnPlane_Value` - gp_Vec PO(Point,Pl.Location()); - Alpha = PO * gp_Vec(Z); + gp_Vec PO(Point, Pl.Location()); + Alpha = PO * gp_Vec(Z); Alpha /= D * Z; P.SetXYZ(Point.XYZ() + Alpha * D.XYZ()); - + // evaluate the derivative. // // d(Proj) d(P) 1 d(P) @@ -227,19 +233,19 @@ static Standard_Boolean OnPlane_D3(const Standard_Real U, // dU dU ( D . Z) dU // - Alpha = Vector1 * gp_Vec(Z); - Alpha /= D * Z; + Alpha = Vector1 * gp_Vec(Z); + Alpha /= D * Z; - V1.SetXYZ( Vector1.XYZ() - Alpha * D.XYZ()); + V1.SetXYZ(Vector1.XYZ() - Alpha * D.XYZ()); - Alpha = Vector2 * gp_Vec(Z); - Alpha /= D * Z; + Alpha = Vector2 * gp_Vec(Z); + Alpha /= D * Z; - V2.SetXYZ( Vector2.XYZ() - Alpha * D.XYZ()); - Alpha = Vector3 * gp_Vec(Z); - Alpha /= D * Z; + V2.SetXYZ(Vector2.XYZ() - Alpha * D.XYZ()); + Alpha = Vector3 * gp_Vec(Z); + Alpha /= D * Z; - V3.SetXYZ( Vector3.XYZ() - Alpha * D.XYZ()); + V3.SetXYZ(Vector3.XYZ() - Alpha * D.XYZ()); return Standard_True; } @@ -255,43 +261,76 @@ class ProjLib_OnPlane : public AppCont_Function gp_Ax3 myPlane; gp_Dir myDirection; -public : +public: - ProjLib_OnPlane(const Handle(Adaptor3d_Curve)& C, - const gp_Ax3& Pl, - const gp_Dir& D) -: myCurve(C), - myPlane(Pl), - myDirection(D) + ProjLib_OnPlane(const Handle(Adaptor3d_Curve)& C, + const gp_Ax3& Pl, + const gp_Dir& D) + : myCurve(C), + myPlane(Pl), + myDirection(D) { myNbPnt = 1; myNbPnt2d = 0; } Standard_Real FirstParameter() const - {return myCurve->FirstParameter();} - + { + return myCurve->FirstParameter(); + } + Standard_Real LastParameter() const - {return myCurve->LastParameter();} + { + return myCurve->LastParameter(); + } + + Standard_Boolean Value(const Standard_Real theT, + NCollection_Array1& /*thePnt2d*/, + NCollection_Array1& thePnt) const + { + thePnt(1) = OnPlane_Value(theT, myCurve, myPlane, myDirection); + return Standard_True; + } - Standard_Boolean Value(const Standard_Real theT, - NCollection_Array1& /*thePnt2d*/, - NCollection_Array1& thePnt) const - { - thePnt(1) = OnPlane_Value(theT, myCurve, myPlane, myDirection); - return Standard_True; - } - Standard_Boolean D1(const Standard_Real theT, - NCollection_Array1& /*theVec2d*/, - NCollection_Array1& theVec) const + NCollection_Array1& /*theVec2d*/, + NCollection_Array1& theVec) const { gp_Pnt aDummyPnt; - return OnPlane_D1(theT, aDummyPnt, theVec(1),myCurve,myPlane,myDirection); + return OnPlane_D1(theT, aDummyPnt, theVec(1), myCurve, myPlane, myDirection); } }; +//======================================================================= +// class : ProjLib_MaxCurvature +//purpose : Use to search apex of parabola or hyperbola, which is its projection +// on a plane. Apex is point with maximal curvature +//======================================================================= + +class ProjLib_MaxCurvature : public math_Function + +{ + +public: + + ProjLib_MaxCurvature(LProp3d_CLProps& theProps): + myProps(&theProps) + { + } + + virtual Standard_Boolean Value(const Standard_Real X, Standard_Real& F) + { + myProps->SetParameter(X); + F = -myProps->Curvature(); + return Standard_True; + } + +private: + + LProp3d_CLProps* myProps; + +}; //=====================================================================// @@ -309,20 +348,30 @@ public : //purpose : //======================================================================= -static void PerformApprox (const Handle(Adaptor3d_Curve)& C, - const gp_Ax3& Pl, - const gp_Dir& D, - Handle(Geom_BSplineCurve) &BSplineCurvePtr) +static void PerformApprox(const Handle(Adaptor3d_Curve)& C, + const gp_Ax3& Pl, + const gp_Dir& D, + Handle(Geom_BSplineCurve) &BSplineCurvePtr) { - ProjLib_OnPlane F(C,Pl,D); + ProjLib_OnPlane F(C, Pl, D); Standard_Integer Deg1, Deg2; Deg1 = 8; Deg2 = 8; - - Approx_FitAndDivide Fit(Deg1,Deg2,Precision::Approximation(), - Precision::PApproximation(),Standard_True); - Fit.SetMaxSegments(100); + if (C->GetType() == GeomAbs_Parabola) + { + Deg1 = 2; Deg2 = 2; + } + Standard_Integer aNbSegm = 100; + if (C->GetType() == GeomAbs_Hyperbola) + { + Deg1 = 14; + Deg2 = 14; + aNbSegm = 1000; + } + Approx_FitAndDivide Fit(Deg1, Deg2, Precision::Approximation(), + Precision::PApproximation(), Standard_True); + Fit.SetMaxSegments(aNbSegm); Fit.Perform(F); if (!Fit.IsAllApproximated()) { @@ -331,64 +380,77 @@ static void PerformApprox (const Handle(Adaptor3d_Curve)& C, Standard_Integer i; Standard_Integer NbCurves = Fit.NbMultiCurves(); Standard_Integer MaxDeg = 0; - + // Pour transformer la MultiCurve en BSpline, il faut que toutes // les Bezier la constituant aient le meme degre -> Calcul de MaxDeg - Standard_Integer NbPoles = 1; + Standard_Integer NbPoles = 1; for (i = 1; i <= NbCurves; i++) { Standard_Integer Deg = Fit.Value(i).Degree(); - MaxDeg = Max ( MaxDeg, Deg); + MaxDeg = Max(MaxDeg, Deg); } NbPoles = MaxDeg * NbCurves + 1; //Poles sur la BSpline - TColgp_Array1OfPnt Poles( 1, NbPoles); - - TColgp_Array1OfPnt TempPoles( 1, MaxDeg + 1); //pour augmentation du degre - - TColStd_Array1OfReal Knots( 1, NbCurves + 1); //Noeuds de la BSpline - + TColgp_Array1OfPnt Poles(1, NbPoles); + + TColgp_Array1OfPnt TempPoles(1, MaxDeg + 1); //pour augmentation du degre + + TColStd_Array1OfReal Knots(1, NbCurves + 1); //Noeuds de la BSpline + Standard_Integer Compt = 1; + Standard_Real anErrMax = 0., anErr3d, anErr2d; for (i = 1; i <= Fit.NbMultiCurves(); i++) { - Fit.Parameters(i, Knots(i), Knots(i+1)); - - AppParCurves_MultiCurve MC = Fit.Value( i); //Charge la Ieme Curve - TColgp_Array1OfPnt LocalPoles( 1, MC.Degree() + 1);//Recupere les poles + Fit.Parameters(i, Knots(i), Knots(i + 1)); + Fit.Error(i, anErr3d, anErr2d); + anErrMax = Max(anErrMax, anErr3d); + AppParCurves_MultiCurve MC = Fit.Value(i); //Charge la Ieme Curve + TColgp_Array1OfPnt LocalPoles(1, MC.Degree() + 1);//Recupere les poles MC.Curve(1, LocalPoles); - + //Augmentation eventuelle du degre - if (MaxDeg > MC.Degree() ) { + if (MaxDeg > MC.Degree()) { BSplCLib::IncreaseDegree(MaxDeg, LocalPoles, BSplCLib::NoWeights(), - TempPoles, BSplCLib::NoWeights()); + TempPoles, BSplCLib::NoWeights()); //mise a jour des poles de la PCurve - for (Standard_Integer j = 1 ; j <= MaxDeg + 1; j++) { - Poles.SetValue( Compt, TempPoles( j)); - Compt++; + for (Standard_Integer j = 1; j <= MaxDeg + 1; j++) { + Poles.SetValue(Compt, TempPoles(j)); + Compt++; } } else { //mise a jour des poles de la PCurve - for (Standard_Integer j = 1 ; j <= MaxDeg + 1; j++) { - Poles.SetValue( Compt, LocalPoles( j)); - Compt++; + for (Standard_Integer j = 1; j <= MaxDeg + 1; j++) { + Poles.SetValue(Compt, LocalPoles(j)); + Compt++; } - } - + } + Compt--; } - + //mise a jour des fields de ProjLib_Approx - Standard_Integer - NbKnots = NbCurves + 1; + Standard_Integer + NbKnots = NbCurves + 1; TColStd_Array1OfInteger Mults(1, NbKnots); - Mults.SetValue( 1, MaxDeg + 1); - for ( i = 2; i <= NbCurves; i++) { - Mults.SetValue( i, MaxDeg); + Mults.SetValue(1, MaxDeg + 1); + for (i = 2; i <= NbCurves; i++) { + Mults.SetValue(i, MaxDeg); + } + Mults.SetValue(NbKnots, MaxDeg + 1); + BSplineCurvePtr = + new Geom_BSplineCurve(Poles, Knots, Mults, MaxDeg, Standard_False); + + //Try to smooth + Standard_Integer m1 = MaxDeg - 1; + for (i = 2; i < NbKnots; ++i) + { + if (BSplineCurvePtr->Multiplicity(i) == MaxDeg) + { + BSplineCurvePtr->RemoveKnot(i, m1, anErrMax); + } } - Mults.SetValue( NbKnots, MaxDeg + 1); - BSplineCurvePtr = - new Geom_BSplineCurve(Poles,Knots,Mults,MaxDeg,Standard_False); + } @@ -398,12 +460,12 @@ static void PerformApprox (const Handle(Adaptor3d_Curve)& C, //======================================================================= ProjLib_ProjectOnPlane::ProjLib_ProjectOnPlane() : -myKeepParam(Standard_False), -myFirstPar(0.), -myLastPar(0.), -myTolerance(0.), -myType (GeomAbs_OtherCurve), -myIsApprox (Standard_False) + myKeepParam(Standard_False), + myFirstPar(0.), + myLastPar(0.), + myTolerance(0.), + myType(GeomAbs_OtherCurve), + myIsApprox(Standard_False) { } @@ -412,15 +474,15 @@ myIsApprox (Standard_False) //purpose : //======================================================================= -ProjLib_ProjectOnPlane::ProjLib_ProjectOnPlane(const gp_Ax3& Pl) : -myPlane (Pl) , -myDirection (Pl.Direction()) , -myKeepParam(Standard_False), -myFirstPar(0.), -myLastPar(0.), -myTolerance(0.), -myType (GeomAbs_OtherCurve), -myIsApprox (Standard_False) +ProjLib_ProjectOnPlane::ProjLib_ProjectOnPlane(const gp_Ax3& Pl) : + myPlane(Pl), + myDirection(Pl.Direction()), + myKeepParam(Standard_False), + myFirstPar(0.), + myLastPar(0.), + myTolerance(0.), + myType(GeomAbs_OtherCurve), + myIsApprox(Standard_False) { } @@ -430,20 +492,20 @@ myIsApprox (Standard_False) //======================================================================= ProjLib_ProjectOnPlane::ProjLib_ProjectOnPlane(const gp_Ax3& Pl, - const gp_Dir& D ) : -myPlane (Pl) , -myDirection (D) , -myKeepParam(Standard_False), -myFirstPar(0.), -myLastPar(0.), -myTolerance(0.), -myType (GeomAbs_OtherCurve), -myIsApprox (Standard_False) + const gp_Dir& D) : + myPlane(Pl), + myDirection(D), + myKeepParam(Standard_False), + myFirstPar(0.), + myLastPar(0.), + myTolerance(0.), + myType(GeomAbs_OtherCurve), + myIsApprox(Standard_False) { -// if ( Abs(D * Pl.Direction()) < Precision::Confusion()) { -// throw Standard_ConstructionError -// ("ProjLib_ProjectOnPlane: The Direction and the Plane are parallel"); -// } + // if ( Abs(D * Pl.Direction()) < Precision::Confusion()) { + // throw Standard_ConstructionError + // ("ProjLib_ProjectOnPlane: The Direction and the Plane are parallel"); + // } } //======================================================================= @@ -482,14 +544,14 @@ Handle(Adaptor3d_Curve) ProjLib_ProjectOnPlane::ShallowCopy() const //======================================================================= static gp_Pnt ProjectPnt(const gp_Ax3& ThePlane, - const gp_Dir& TheDir, - const gp_Pnt& Point) + const gp_Dir& TheDir, + const gp_Pnt& Point) { - gp_Vec PO(Point,ThePlane.Location()); + gp_Vec PO(Point, ThePlane.Location()); Standard_Real Alpha = PO * gp_Vec(ThePlane.Direction()); Alpha /= TheDir * ThePlane.Direction(); - + gp_Pnt P; P.SetXYZ(Point.XYZ() + Alpha * TheDir.XYZ()); @@ -504,13 +566,13 @@ static gp_Pnt ProjectPnt(const gp_Ax3& ThePlane, //======================================================================= static gp_Vec ProjectVec(const gp_Ax3& ThePlane, - const gp_Dir& TheDir, - const gp_Vec& Vec) + const gp_Dir& TheDir, + const gp_Vec& Vec) { gp_Vec D = Vec; gp_Vec Z = ThePlane.Direction(); - D -= ( (Vec * Z) / (TheDir * Z)) * TheDir; + D -= ((Vec * Z) / (TheDir * Z)) * TheDir; return D; } @@ -521,461 +583,463 @@ static gp_Vec ProjectVec(const gp_Ax3& ThePlane, //======================================================================= void ProjLib_ProjectOnPlane::Load(const Handle(Adaptor3d_Curve)& C, - const Standard_Real Tolerance, - const Standard_Boolean KeepParametrization) - + const Standard_Real Tolerance, + const Standard_Boolean KeepParametrization) + { - myCurve = C; - myType = GeomAbs_OtherCurve; - myIsApprox = Standard_False; - myTolerance = Tolerance ; + myCurve = C; + myType = GeomAbs_OtherCurve; + myIsApprox = Standard_False; + myTolerance = Tolerance; Handle(Geom_BSplineCurve) ApproxCurve; Handle(GeomAdaptor_Curve) aGAHCurve; Handle(Geom_Line) GeomLinePtr; - Handle(Geom_Circle) GeomCirclePtr ; - Handle(Geom_Ellipse) GeomEllipsePtr ; - Handle(Geom_Hyperbola) GeomHyperbolaPtr ; + Handle(Geom_Circle) GeomCirclePtr; + Handle(Geom_Ellipse) GeomEllipsePtr; + Handle(Geom_Hyperbola) GeomHyperbolaPtr; + Handle(Geom_Parabola) GeomParabolaPtr; - gp_Lin aLine; + gp_Lin aLine; gp_Elips Elips; -// gp_Hypr Hypr ; + // gp_Hypr Hypr ; - Standard_Integer num_knots ; + Standard_Integer num_knots; GeomAbs_CurveType Type = C->GetType(); gp_Ax2 Axis; - Standard_Real R1 =0., R2 =0.; + Standard_Real R1 = 0., R2 = 0.; myKeepParam = KeepParametrization; - switch ( Type) { - case GeomAbs_Line: - { - // P(u) = O + u * Xc - // ==> Q(u) = f(P(u)) - // = f(O) + u * f(Xc) - - gp_Lin L = myCurve->Line(); - gp_Vec Xc = ProjectVec(myPlane,myDirection,gp_Vec(L.Direction())); - - if ( Xc.Magnitude() < Precision::Confusion()) { // line orthog au plan - myType = GeomAbs_BSplineCurve; - gp_Pnt P = ProjectPnt(myPlane,myDirection,L.Location()); - TColStd_Array1OfInteger Mults(1,2); Mults.Init(2); - TColgp_Array1OfPnt Poles(1,2); Poles.Init(P); - TColStd_Array1OfReal Knots(1,2); - Knots(1) = myCurve->FirstParameter(); - Knots(2) = myCurve->LastParameter(); - Handle(Geom_BSplineCurve) BSP = - new Geom_BSplineCurve(Poles,Knots,Mults,1); - -// Modified by Sergey KHROMOV - Tue Jan 29 16:57:29 2002 Begin - GeomAdaptor_Curve aGACurve(BSP); - myResult = new GeomAdaptor_Curve(aGACurve); -// Modified by Sergey KHROMOV - Tue Jan 29 16:57:30 2002 End - } - else if ( Abs( Xc.Magnitude() - 1.) < Precision::Confusion()) { - myType = GeomAbs_Line; - gp_Pnt P = ProjectPnt(myPlane,myDirection,L.Location()); - myFirstPar = myCurve->FirstParameter(); - myLastPar = myCurve->LastParameter(); - aLine = gp_Lin(P,gp_Dir(Xc)); - GeomLinePtr = new Geom_Line(aLine); - -// Modified by Sergey KHROMOV - Tue Jan 29 16:57:29 2002 Begin - GeomAdaptor_Curve aGACurve(GeomLinePtr, - myCurve->FirstParameter(), - myCurve->LastParameter() ); - myResult = new GeomAdaptor_Curve(aGACurve); -// Modified by Sergey KHROMOV - Tue Jan 29 16:57:30 2002 End + switch (Type) { + case GeomAbs_Line: + { + // P(u) = O + u * Xc + // ==> Q(u) = f(P(u)) + // = f(O) + u * f(Xc) + + gp_Lin L = myCurve->Line(); + gp_Vec Xc = ProjectVec(myPlane, myDirection, gp_Vec(L.Direction())); + + if (Xc.Magnitude() < Precision::Confusion()) { // line orthog au plan + myType = GeomAbs_BSplineCurve; + gp_Pnt P = ProjectPnt(myPlane, myDirection, L.Location()); + TColStd_Array1OfInteger Mults(1, 2); Mults.Init(2); + TColgp_Array1OfPnt Poles(1, 2); Poles.Init(P); + TColStd_Array1OfReal Knots(1, 2); + Knots(1) = myCurve->FirstParameter(); + Knots(2) = myCurve->LastParameter(); + Handle(Geom_BSplineCurve) BSP = + new Geom_BSplineCurve(Poles, Knots, Mults, 1); + + // Modified by Sergey KHROMOV - Tue Jan 29 16:57:29 2002 Begin + GeomAdaptor_Curve aGACurve(BSP); + myResult = new GeomAdaptor_Curve(aGACurve); + // Modified by Sergey KHROMOV - Tue Jan 29 16:57:30 2002 End + } + else if (Abs(Xc.Magnitude() - 1.) < Precision::Confusion()) { + myType = GeomAbs_Line; + gp_Pnt P = ProjectPnt(myPlane, myDirection, L.Location()); + myFirstPar = myCurve->FirstParameter(); + myLastPar = myCurve->LastParameter(); + aLine = gp_Lin(P, gp_Dir(Xc)); + GeomLinePtr = new Geom_Line(aLine); + + // Modified by Sergey KHROMOV - Tue Jan 29 16:57:29 2002 Begin + GeomAdaptor_Curve aGACurve(GeomLinePtr, + myCurve->FirstParameter(), + myCurve->LastParameter()); + myResult = new GeomAdaptor_Curve(aGACurve); + // Modified by Sergey KHROMOV - Tue Jan 29 16:57:30 2002 End + } + else { + myType = GeomAbs_Line; + gp_Pnt P = ProjectPnt(myPlane, myDirection, L.Location()); + aLine = gp_Lin(P, gp_Dir(Xc)); + Standard_Real Udeb, Ufin; + + // eval the first and last parameters of the projected curve + Udeb = myCurve->FirstParameter(); + Ufin = myCurve->LastParameter(); + gp_Pnt P1 = ProjectPnt(myPlane, myDirection, + myCurve->Value(Udeb)); + gp_Pnt P2 = ProjectPnt(myPlane, myDirection, + myCurve->Value(Ufin)); + myFirstPar = gp_Vec(aLine.Direction()).Dot(gp_Vec(P, P1)); + myLastPar = gp_Vec(aLine.Direction()).Dot(gp_Vec(P, P2)); + GeomLinePtr = new Geom_Line(aLine); + if (!myKeepParam) { + // Modified by Sergey KHROMOV - Tue Jan 29 16:57:29 2002 Begin + GeomAdaptor_Curve aGACurve(GeomLinePtr, + myFirstPar, + myLastPar); + myResult = new GeomAdaptor_Curve(aGACurve); + // Modified by Sergey KHROMOV - Tue Jan 29 16:57:30 2002 End } else { - myType = GeomAbs_Line; - gp_Pnt P = ProjectPnt(myPlane,myDirection,L.Location()); - aLine = gp_Lin(P,gp_Dir(Xc)); - Standard_Real Udeb, Ufin; - - // eval the first and last parameters of the projected curve - Udeb = myCurve->FirstParameter(); - Ufin = myCurve->LastParameter(); - gp_Pnt P1 = ProjectPnt(myPlane,myDirection, - myCurve->Value(Udeb)); - gp_Pnt P2 = ProjectPnt(myPlane,myDirection, - myCurve->Value(Ufin)); - myFirstPar = gp_Vec(aLine.Direction()).Dot(gp_Vec(P,P1)); - myLastPar = gp_Vec(aLine.Direction()).Dot(gp_Vec(P,P2)); - GeomLinePtr = new Geom_Line(aLine); - if (!myKeepParam) { -// Modified by Sergey KHROMOV - Tue Jan 29 16:57:29 2002 Begin - GeomAdaptor_Curve aGACurve(GeomLinePtr, - myFirstPar, - myLastPar) ; - myResult = new GeomAdaptor_Curve(aGACurve); -// Modified by Sergey KHROMOV - Tue Jan 29 16:57:30 2002 End - } - else { - myType = GeomAbs_BSplineCurve; - // - // make a linear BSpline of degree 1 between the end points of - // the projected line - // - Handle(Geom_TrimmedCurve) NewTrimCurvePtr = - new Geom_TrimmedCurve(GeomLinePtr, - myFirstPar, - myLastPar) ; - - Handle(Geom_BSplineCurve) NewCurvePtr = - GeomConvert::CurveToBSplineCurve(NewTrimCurvePtr) ; - num_knots = NewCurvePtr->NbKnots() ; - TColStd_Array1OfReal BsplineKnots(1,num_knots) ; - NewCurvePtr->Knots(BsplineKnots) ; - - BSplCLib::Reparametrize(myCurve->FirstParameter(), - myCurve->LastParameter(), - BsplineKnots) ; - - NewCurvePtr->SetKnots(BsplineKnots) ; -// Modified by Sergey KHROMOV - Tue Jan 29 16:57:29 2002 Begin - GeomAdaptor_Curve aGACurve(NewCurvePtr); - myResult = new GeomAdaptor_Curve(aGACurve); -// Modified by Sergey KHROMOV - Tue Jan 29 16:57:30 2002 End - } + myType = GeomAbs_BSplineCurve; + // + // make a linear BSpline of degree 1 between the end points of + // the projected line + // + Handle(Geom_TrimmedCurve) NewTrimCurvePtr = + new Geom_TrimmedCurve(GeomLinePtr, + myFirstPar, + myLastPar); + + Handle(Geom_BSplineCurve) NewCurvePtr = + GeomConvert::CurveToBSplineCurve(NewTrimCurvePtr); + num_knots = NewCurvePtr->NbKnots(); + TColStd_Array1OfReal BsplineKnots(1, num_knots); + NewCurvePtr->Knots(BsplineKnots); + + BSplCLib::Reparametrize(myCurve->FirstParameter(), + myCurve->LastParameter(), + BsplineKnots); + + NewCurvePtr->SetKnots(BsplineKnots); + // Modified by Sergey KHROMOV - Tue Jan 29 16:57:29 2002 Begin + GeomAdaptor_Curve aGACurve(NewCurvePtr); + myResult = new GeomAdaptor_Curve(aGACurve); + // Modified by Sergey KHROMOV - Tue Jan 29 16:57:30 2002 End } - break; } + break; + } case GeomAbs_Circle: - { - // Pour le cercle et l ellipse on a les relations suivantes: - // ( Rem : pour le cercle R1 = R2 = R) - // P(u) = O + R1 * Cos(u) * Xc + R2 * Sin(u) * Yc - // ==> Q(u) = f(P(u)) - // = f(O) + R1 * Cos(u) * f(Xc) + R2 * Sin(u) * f(Yc) - - gp_Circ Circ = myCurve->Circle(); - Axis = Circ.Position(); - R1 = R2 = Circ.Radius(); + { + // Pour le cercle et l ellipse on a les relations suivantes: + // ( Rem : pour le cercle R1 = R2 = R) + // P(u) = O + R1 * Cos(u) * Xc + R2 * Sin(u) * Yc + // ==> Q(u) = f(P(u)) + // = f(O) + R1 * Cos(u) * f(Xc) + R2 * Sin(u) * f(Yc) - } - Standard_FALLTHROUGH + gp_Circ Circ = myCurve->Circle(); + Axis = Circ.Position(); + R1 = R2 = Circ.Radius(); + + } + Standard_FALLTHROUGH case GeomAbs_Ellipse: + { + if (Type == GeomAbs_Ellipse) { + gp_Elips E = myCurve->Ellipse(); + Axis = E.Position(); + R1 = E.MajorRadius(); + R2 = E.MinorRadius(); + } + + // Common Code for CIRCLE & ELLIPSE begin here + gp_Dir X = Axis.XDirection(); + gp_Dir Y = Axis.YDirection(); + gp_Vec VDx = ProjectVec(myPlane, myDirection, X); + gp_Vec VDy = ProjectVec(myPlane, myDirection, Y); + gp_Dir Dx, Dy; + + Standard_Real Tol2 = myTolerance*myTolerance; + if (VDx.SquareMagnitude() < Tol2 || + VDy.SquareMagnitude() < Tol2 || + VDx.CrossSquareMagnitude(VDy) < Tol2) { - if ( Type == GeomAbs_Ellipse) { - gp_Elips E = myCurve->Ellipse(); - Axis = E.Position(); - R1 = E.MajorRadius(); - R2 = E.MinorRadius(); - } + myIsApprox = Standard_True; + } - // Common Code for CIRCLE & ELLIPSE begin here - gp_Dir X = Axis.XDirection(); - gp_Dir Y = Axis.YDirection(); - gp_Vec VDx = ProjectVec(myPlane,myDirection,X); - gp_Vec VDy = ProjectVec(myPlane,myDirection,Y); - gp_Dir Dx,Dy; - - Standard_Real Tol2 = myTolerance*myTolerance; - if (VDx.SquareMagnitude() < Tol2 || - VDy.SquareMagnitude() < Tol2 || - VDx.CrossSquareMagnitude(VDy) < Tol2) + if (!myIsApprox) + { + Dx = gp_Dir(VDx); + Dy = gp_Dir(VDy); + gp_Pnt O = Axis.Location(); + gp_Pnt P = ProjectPnt(myPlane, myDirection, O); + gp_Pnt Px = ProjectPnt(myPlane, myDirection, O.Translated(R1*gp_Vec(X))); + gp_Pnt Py = ProjectPnt(myPlane, myDirection, O.Translated(R2*gp_Vec(Y))); + Standard_Real Major = P.Distance(Px); + Standard_Real Minor = P.Distance(Py); + + if (myKeepParam) { - myIsApprox = Standard_True; + myIsApprox = !gp_Dir(VDx).IsNormal(gp_Dir(VDy), Precision::Angular()); } - - if (!myIsApprox) + else { - Dx = gp_Dir(VDx); - Dy = gp_Dir(VDy); - gp_Pnt O = Axis.Location(); - gp_Pnt P = ProjectPnt(myPlane,myDirection,O); - gp_Pnt Px = ProjectPnt(myPlane,myDirection,O.Translated(R1*gp_Vec(X))); - gp_Pnt Py = ProjectPnt(myPlane,myDirection,O.Translated(R2*gp_Vec(Y))); - Standard_Real Major = P.Distance(Px); - Standard_Real Minor = P.Distance(Py); - - if (myKeepParam) + // Since it is not necessary to keep the same parameter for the point on the original and on the projected curves, + // we will use the following approach to find axes of the projected ellipse and provide the canonical curve: + // https://www.geometrictools.com/Documentation/ParallelProjectionEllipse.pdf + math_Matrix aMatrA(1, 2, 1, 2); + // A = Jp^T * Pr(Je), where + // Pr(Je) - projection of axes of original ellipse to the target plane + // Jp - X and Y axes of the target plane + aMatrA(1, 1) = myPlane.XDirection().XYZ().Dot(VDx.XYZ()); + aMatrA(1, 2) = myPlane.XDirection().XYZ().Dot(VDy.XYZ()); + aMatrA(2, 1) = myPlane.YDirection().XYZ().Dot(VDx.XYZ()); + aMatrA(2, 2) = myPlane.YDirection().XYZ().Dot(VDy.XYZ()); + + math_Matrix aMatrDelta2(1, 2, 1, 2, 0.0); + // | 1/MajorRad^2 0 | + // Delta^2 = | | + // | 0 1/MajorRad^2 | + aMatrDelta2(1, 1) = 1.0 / (R1 * R1); + aMatrDelta2(2, 2) = 1.0 / (R2 * R2); + + math_Matrix aMatrAInv = aMatrA.Inverse(); + math_Matrix aMatrM = aMatrAInv.Transposed() * aMatrDelta2 * aMatrAInv; + + // perform eigenvalues calculation + math_Jacobi anEigenCalc(aMatrM); + if (anEigenCalc.IsDone()) { - myIsApprox = !gp_Dir(VDx).IsNormal(gp_Dir(VDy), Precision::Angular()); + // radii of the projected ellipse + Minor = 1.0 / Sqrt(anEigenCalc.Value(1)); + Major = 1.0 / Sqrt(anEigenCalc.Value(2)); + + // calculate the rotation angle for the plane axes to meet the correct axes of the projected ellipse + // (swap eigenvectors in respect to major and minor axes) + const math_Matrix& anEigenVec = anEigenCalc.Vectors(); + gp_Trsf2d aTrsfInPlane; + aTrsfInPlane.SetValues(anEigenVec(1, 2), anEigenVec(1, 1), 0.0, + anEigenVec(2, 2), anEigenVec(2, 1), 0.0); + gp_Trsf aRot; + aRot.SetRotation(gp_Ax1(P, myPlane.Direction()), aTrsfInPlane.RotationPart()); + + Dx = myPlane.XDirection().Transformed(aRot); + Dy = myPlane.YDirection().Transformed(aRot); } else { - // Since it is not necessary to keep the same parameter for the point on the original and on the projected curves, - // we will use the following approach to find axes of the projected ellipse and provide the canonical curve: - // https://www.geometrictools.com/Documentation/ParallelProjectionEllipse.pdf - math_Matrix aMatrA(1, 2, 1, 2); - // A = Jp^T * Pr(Je), where - // Pr(Je) - projection of axes of original ellipse to the target plane - // Jp - X and Y axes of the target plane - aMatrA(1, 1) = myPlane.XDirection().XYZ().Dot(VDx.XYZ()); - aMatrA(1, 2) = myPlane.XDirection().XYZ().Dot(VDy.XYZ()); - aMatrA(2, 1) = myPlane.YDirection().XYZ().Dot(VDx.XYZ()); - aMatrA(2, 2) = myPlane.YDirection().XYZ().Dot(VDy.XYZ()); - - math_Matrix aMatrDelta2(1, 2, 1, 2, 0.0); - // | 1/MajorRad^2 0 | - // Delta^2 = | | - // | 0 1/MajorRad^2 | - aMatrDelta2(1, 1) = 1.0 / (R1 * R1); - aMatrDelta2(2, 2) = 1.0 / (R2 * R2); - - math_Matrix aMatrAInv = aMatrA.Inverse(); - math_Matrix aMatrM = aMatrAInv.Transposed() * aMatrDelta2 * aMatrAInv; - - // perform eigenvalues calculation - math_Jacobi anEigenCalc(aMatrM); - if (anEigenCalc.IsDone()) - { - // radii of the projected ellipse - Minor = 1.0 / Sqrt(anEigenCalc.Value(1)); - Major = 1.0 / Sqrt(anEigenCalc.Value(2)); - - // calculate the rotation angle for the plane axes to meet the correct axes of the projected ellipse - // (swap eigenvectors in respect to major and minor axes) - const math_Matrix& anEigenVec = anEigenCalc.Vectors(); - gp_Trsf2d aTrsfInPlane; - aTrsfInPlane.SetValues(anEigenVec(1, 2), anEigenVec(1, 1), 0.0, - anEigenVec(2, 2), anEigenVec(2, 1), 0.0); - gp_Trsf aRot; - aRot.SetRotation(gp_Ax1(P, myPlane.Direction()), aTrsfInPlane.RotationPart()); - - Dx = myPlane.XDirection().Transformed(aRot); - Dy = myPlane.YDirection().Transformed(aRot); - } - else - { - myIsApprox = Standard_True; - } - } - - if (!myIsApprox) - { - gp_Ax2 Axe(P, Dx^Dy, Dx); - - if (Abs(Major - Minor) < Precision::Confusion()) { - myType = GeomAbs_Circle; - gp_Circ Circ(Axe, Major); - GeomCirclePtr = new Geom_Circle(Circ); -// Modified by Sergey KHROMOV - Tue Jan 29 16:57:29 2002 Begin - GeomAdaptor_Curve aGACurve(GeomCirclePtr); - myResult = new GeomAdaptor_Curve(aGACurve); -// Modified by Sergey KHROMOV - Tue Jan 29 16:57:30 2002 End - } - else if ( Major > Minor) { - myType = GeomAbs_Ellipse; - Elips = gp_Elips( Axe, Major, Minor); - - GeomEllipsePtr = new Geom_Ellipse(Elips); -// Modified by Sergey KHROMOV - Tue Jan 29 16:57:29 2002 Begin - GeomAdaptor_Curve aGACurve(GeomEllipsePtr); - myResult = new GeomAdaptor_Curve(aGACurve); -// Modified by Sergey KHROMOV - Tue Jan 29 16:57:30 2002 End - } - else { - myIsApprox = Standard_True; - } + myIsApprox = Standard_True; } } - // No way to build the canonical curve, approximate as B-spline - if (myIsApprox) - { - myType = GeomAbs_BSplineCurve; - PerformApprox(myCurve,myPlane,myDirection,ApproxCurve); -// Modified by Sergey KHROMOV - Tue Jan 29 16:57:29 2002 Begin - GeomAdaptor_Curve aGACurve(ApproxCurve); - myResult = new GeomAdaptor_Curve(aGACurve); -// Modified by Sergey KHROMOV - Tue Jan 29 16:57:30 2002 End - } - else if (GeomCirclePtr || GeomEllipsePtr) + if (!myIsApprox) { - Handle(Geom_Curve) aResultCurve = GeomCirclePtr; - if (aResultCurve.IsNull()) - aResultCurve = GeomEllipsePtr; - // start and end parameters of the projected curve - Standard_Real aParFirst = myCurve->FirstParameter(); - Standard_Real aParLast = myCurve->LastParameter(); - gp_Pnt aPntFirst = ProjectPnt(myPlane, myDirection, myCurve->Value(aParFirst)); - gp_Pnt aPntLast = ProjectPnt(myPlane, myDirection, myCurve->Value(aParLast)); - GeomLib_Tool::Parameter(aResultCurve, aPntFirst, Precision::Confusion(), myFirstPar); - GeomLib_Tool::Parameter(aResultCurve, aPntLast, Precision::Confusion(), myLastPar); - while (myLastPar <= myFirstPar) - myLastPar += myResult->Period(); + gp_Ax2 Axe(P, Dx^Dy, Dx); + + if (Abs(Major - Minor) < Precision::Confusion()) { + myType = GeomAbs_Circle; + gp_Circ Circ(Axe, Major); + GeomCirclePtr = new Geom_Circle(Circ); + // Modified by Sergey KHROMOV - Tue Jan 29 16:57:29 2002 Begin + GeomAdaptor_Curve aGACurve(GeomCirclePtr); + myResult = new GeomAdaptor_Curve(aGACurve); + // Modified by Sergey KHROMOV - Tue Jan 29 16:57:30 2002 End + } + else if (Major > Minor) { + myType = GeomAbs_Ellipse; + Elips = gp_Elips(Axe, Major, Minor); + + GeomEllipsePtr = new Geom_Ellipse(Elips); + // Modified by Sergey KHROMOV - Tue Jan 29 16:57:29 2002 Begin + GeomAdaptor_Curve aGACurve(GeomEllipsePtr); + myResult = new GeomAdaptor_Curve(aGACurve); + // Modified by Sergey KHROMOV - Tue Jan 29 16:57:30 2002 End + } + else { + myIsApprox = Standard_True; + } } } - break; - case GeomAbs_Parabola: + + // No way to build the canonical curve, approximate as B-spline + if (myIsApprox) { - myKeepParam = Standard_True; - // P(u) = O + (u*u)/(4*f) * Xc + u * Yc - // ==> Q(u) = f(P(u)) - // = f(O) + (u*u)/(4*f) * f(Xc) + u * f(Yc) - - gp_Parab Parab = myCurve->Parabola(); - gp_Ax2 AxeRef = Parab.Position(); - gp_Vec Xc = ProjectVec(myPlane,myDirection,gp_Vec(AxeRef.XDirection())); - gp_Vec Yc = ProjectVec(myPlane,myDirection,gp_Vec(AxeRef.YDirection())); - - // fix for case when no one action is done. 28.03.2002 - Standard_Boolean alocalIsDone = Standard_False; - - if ( Abs( Yc.Magnitude() - 1.) < Precision::Confusion()) { - gp_Pnt P = ProjectPnt(myPlane,myDirection,AxeRef.Location()); - if ( Xc.Magnitude() < Precision::Confusion()) { - myType = GeomAbs_Line; - aLine = gp_Lin( P, gp_Dir(Yc)); - - GeomLinePtr = new Geom_Line(aLine) ; -// Modified by Sergey KHROMOV - Tue Jan 29 16:57:29 2002 Begin - GeomAdaptor_Curve aGACurve(GeomLinePtr); - myResult = new GeomAdaptor_Curve(aGACurve); -// Modified by Sergey KHROMOV - Tue Jan 29 16:57:30 2002 End - alocalIsDone = Standard_True; - } - else if ( Xc.IsNormal(Yc,Precision::Angular())) { - myType = GeomAbs_Parabola; - Standard_Real F = Parab.Focal() / Xc.Magnitude(); - gp_Parab aParab = gp_Parab( gp_Ax2(P,Xc^Yc,Xc), F); - Handle(Geom_Parabola) GeomParabolaPtr = - new Geom_Parabola(aParab) ; -// Modified by Sergey KHROMOV - Tue Jan 29 16:57:29 2002 Begin - GeomAdaptor_Curve aGACurve(GeomParabolaPtr); - myResult = new GeomAdaptor_Curve(aGACurve); -// Modified by Sergey KHROMOV - Tue Jan 29 16:57:30 2002 End - alocalIsDone = Standard_True; - } - } - if (!alocalIsDone)/*else*/ { - myIsApprox = Standard_True; - myType = GeomAbs_BSplineCurve; - PerformApprox(myCurve,myPlane,myDirection,ApproxCurve); -// Modified by Sergey KHROMOV - Tue Jan 29 16:57:29 2002 Begin - GeomAdaptor_Curve aGACurve(ApproxCurve); - myResult = new GeomAdaptor_Curve(aGACurve); -// Modified by Sergey KHROMOV - Tue Jan 29 16:57:30 2002 End - } + myType = GeomAbs_BSplineCurve; + PerformApprox(myCurve, myPlane, myDirection, ApproxCurve); + // Modified by Sergey KHROMOV - Tue Jan 29 16:57:29 2002 Begin + GeomAdaptor_Curve aGACurve(ApproxCurve); + myResult = new GeomAdaptor_Curve(aGACurve); + // Modified by Sergey KHROMOV - Tue Jan 29 16:57:30 2002 End } - break; - case GeomAbs_Hyperbola: + else if (GeomCirclePtr || GeomEllipsePtr) { - myKeepParam = Standard_True; - // P(u) = O + R1 * Cosh(u) * Xc + R2 * Sinh(u) * Yc - // ==> Q(u) = f(P(u)) - // = f(O) + R1 * Cosh(u) * f(Xc) + R2 * Sinh(u) * f(Yc) + Handle(Geom_Curve) aResultCurve = GeomCirclePtr; + if (aResultCurve.IsNull()) + aResultCurve = GeomEllipsePtr; + // start and end parameters of the projected curve + Standard_Real aParFirst = myCurve->FirstParameter(); + Standard_Real aParLast = myCurve->LastParameter(); + gp_Pnt aPntFirst = ProjectPnt(myPlane, myDirection, myCurve->Value(aParFirst)); + gp_Pnt aPntLast = ProjectPnt(myPlane, myDirection, myCurve->Value(aParLast)); + GeomLib_Tool::Parameter(aResultCurve, aPntFirst, Precision::Confusion(), myFirstPar); + GeomLib_Tool::Parameter(aResultCurve, aPntLast, Precision::Confusion(), myLastPar); + while (myLastPar <= myFirstPar) + myLastPar += myResult->Period(); + } + } + break; + case GeomAbs_Parabola: + { + // P(u) = O + (u*u)/(4*f) * Xc + u * Yc + // ==> Q(u) = f(P(u)) + // = f(O) + (u*u)/(4*f) * f(Xc) + u * f(Yc) - gp_Hypr Hypr = myCurve->Hyperbola(); - gp_Ax2 AxeRef = Hypr.Position(); - gp_Vec Xc = ProjectVec(myPlane,myDirection,gp_Vec(AxeRef.XDirection())); - gp_Vec Yc = ProjectVec(myPlane,myDirection,gp_Vec(AxeRef.YDirection())); - gp_Pnt P = ProjectPnt(myPlane,myDirection,AxeRef.Location()); - Standard_Real aR1 = Hypr.MajorRadius(); - Standard_Real aR2 = Hypr.MinorRadius(); - gp_Dir Z = myPlane.Direction(); + gp_Parab Parab = myCurve->Parabola(); + gp_Ax2 AxeRef = Parab.Position(); + gp_Vec Xc = ProjectVec(myPlane, myDirection, gp_Vec(AxeRef.XDirection())); + gp_Vec Yc = ProjectVec(myPlane, myDirection, gp_Vec(AxeRef.YDirection())); + gp_Pnt P = ProjectPnt(myPlane, myDirection, AxeRef.Location()); - if ( Xc.Magnitude() < Precision::Confusion()) { - myType = GeomAbs_Hyperbola; - gp_Dir X = gp_Dir(Yc) ^ Z; - Hypr = gp_Hypr(gp_Ax2( P, Z, X), 0., aR2 * Yc.Magnitude()); - GeomHyperbolaPtr = - new Geom_Hyperbola(Hypr) ; -// Modified by Sergey KHROMOV - Tue Jan 29 16:57:29 2002 Begin - GeomAdaptor_Curve aGACurve(GeomHyperbolaPtr); - myResult = new GeomAdaptor_Curve(aGACurve); -// Modified by Sergey KHROMOV - Tue Jan 29 16:57:30 2002 End - } - else if ( Yc.Magnitude() < Precision::Confusion()) { - myType = GeomAbs_Hyperbola; - Hypr = - gp_Hypr(gp_Ax2(P, Z, gp_Dir(Xc)), aR1 * Xc.Magnitude(), 0.); - GeomHyperbolaPtr = - new Geom_Hyperbola(Hypr) ; -// Modified by Sergey KHROMOV - Tue Jan 29 16:57:29 2002 Begin - GeomAdaptor_Curve aGACurve(GeomHyperbolaPtr); - myResult = new GeomAdaptor_Curve(aGACurve); -// Modified by Sergey KHROMOV - Tue Jan 29 16:57:30 2002 End - } - else if ( Xc.IsNormal(Yc,Precision::Angular())) { - myType = GeomAbs_Hyperbola; - Hypr = gp_Hypr( gp_Ax2( P, gp_Dir( Xc ^ Yc), gp_Dir( Xc)), - aR1 * Xc.Magnitude(), aR2 * Yc.Magnitude() ); - GeomHyperbolaPtr = - new Geom_Hyperbola(Hypr) ; -// Modified by Sergey KHROMOV - Tue Jan 29 16:57:29 2002 Begin - GeomAdaptor_Curve aGACurve(GeomHyperbolaPtr); - myResult = new GeomAdaptor_Curve(aGACurve); -// Modified by Sergey KHROMOV - Tue Jan 29 16:57:30 2002 End - } - else { - myIsApprox = Standard_True; - myType = GeomAbs_BSplineCurve; - PerformApprox(myCurve,myPlane,myDirection,ApproxCurve); -// Modified by Sergey KHROMOV - Tue Jan 29 16:57:29 2002 Begin - GeomAdaptor_Curve aGACurve(ApproxCurve); - myResult = new GeomAdaptor_Curve(aGACurve); -// Modified by Sergey KHROMOV - Tue Jan 29 16:57:30 2002 End - } + myIsApprox = Standard_False; + + if ((Abs(Yc.Magnitude() - 1.) < Precision::Confusion()) && + (Xc.Magnitude() < Precision::Confusion())) + { + myType = GeomAbs_Line; + aLine = gp_Lin(P, gp_Dir(Yc)); + GeomLinePtr = new Geom_Line(aLine); } - break; - case GeomAbs_BezierCurve: + else if (Xc.IsNormal(Yc, Precision::Angular())) { + myType = GeomAbs_Parabola; + Standard_Real F = Parab.Focal() / Xc.Magnitude(); + gp_Parab aProjParab = gp_Parab(gp_Ax2(P, Xc^Yc, Xc), F); + GeomParabolaPtr = + new Geom_Parabola(aProjParab); + } + else if (Yc.Magnitude() < Precision::Confusion() || + Yc.IsParallel(Xc, Precision::Angular())) { - Handle(Geom_BezierCurve) BezierCurvePtr = - myCurve->Bezier() ; - Standard_Integer NbPoles = - BezierCurvePtr->NbPoles() ; - - Handle(Geom_BezierCurve) ProjCu = - Handle(Geom_BezierCurve)::DownCast(BezierCurvePtr->Copy()); - - myKeepParam = Standard_True; - myIsApprox = Standard_False; - myType = Type; - for ( Standard_Integer i = 1; i <= NbPoles; i++) { - ProjCu->SetPole - (i,ProjectPnt(myPlane,myDirection,BezierCurvePtr->Pole(i))); - } - -// Modified by Sergey KHROMOV - Tue Jan 29 16:57:29 2002 Begin - GeomAdaptor_Curve aGACurve(ProjCu); - myResult = new GeomAdaptor_Curve(aGACurve); -// Modified by Sergey KHROMOV - Tue Jan 29 16:57:30 2002 End + myIsApprox = Standard_True; } - break ; - case GeomAbs_BSplineCurve: + else if(!myKeepParam) { - Handle(Geom_BSplineCurve) BSplineCurvePtr = - myCurve->BSpline() ; - // - // make a copy of the curve and projects its poles - // - Handle(Geom_BSplineCurve) ProjectedBSplinePtr = - Handle(Geom_BSplineCurve)::DownCast(BSplineCurvePtr->Copy()) ; - - myKeepParam = Standard_True; - myIsApprox = Standard_False; - myType = Type; - for ( Standard_Integer i = 1; i <= BSplineCurvePtr->NbPoles(); i++) { - ProjectedBSplinePtr->SetPole - (i,ProjectPnt(myPlane,myDirection,BSplineCurvePtr->Pole(i))); - } - -// Modified by Sergey KHROMOV - Tue Jan 29 16:57:29 2002 Begin - GeomAdaptor_Curve aGACurve(ProjectedBSplinePtr); - myResult = new GeomAdaptor_Curve(aGACurve); -// Modified by Sergey KHROMOV - Tue Jan 29 16:57:30 2002 End + // Try building parabola with help of apex position + myIsApprox = !BuildParabolaByApex(GeomParabolaPtr); } - break; - default: + else { - myKeepParam = Standard_True; myIsApprox = Standard_True; - myType = GeomAbs_BSplineCurve; - PerformApprox(myCurve,myPlane,myDirection,ApproxCurve); -// Modified by Sergey KHROMOV - Tue Jan 29 16:57:29 2002 Begin - GeomAdaptor_Curve aGACurve(ApproxCurve); - myResult = new GeomAdaptor_Curve(aGACurve); -// Modified by Sergey KHROMOV - Tue Jan 29 16:57:30 2002 End } - break; + + if (!myIsApprox) + { + GetTrimmedResult(GeomParabolaPtr); + } + else + { + BuildByApprox(aParabolaLimit); + } + } + break; + case GeomAbs_Hyperbola: + { + // P(u) = O + R1 * Cosh(u) * Xc + R2 * Sinh(u) * Yc + // ==> Q(u) = f(P(u)) + // = f(O) + R1 * Cosh(u) * f(Xc) + R2 * Sinh(u) * f(Yc) + + gp_Hypr Hypr = myCurve->Hyperbola(); + gp_Ax2 AxeRef = Hypr.Position(); + gp_Vec Xc = ProjectVec(myPlane, myDirection, gp_Vec(AxeRef.XDirection())); + gp_Vec Yc = ProjectVec(myPlane, myDirection, gp_Vec(AxeRef.YDirection())); + gp_Pnt P = ProjectPnt(myPlane, myDirection, AxeRef.Location()); + Standard_Real aR1 = Hypr.MajorRadius(); + Standard_Real aR2 = Hypr.MinorRadius(); + gp_Dir Z = myPlane.Direction(); + myIsApprox = Standard_False; + + if (Xc.Magnitude() < Precision::Confusion()) { + myType = GeomAbs_Hyperbola; + gp_Dir X = gp_Dir(Yc) ^ Z; + Hypr = gp_Hypr(gp_Ax2(P, Z, X), 0., aR2 * Yc.Magnitude()); + GeomHyperbolaPtr = + new Geom_Hyperbola(Hypr); + } + else if (Yc.Magnitude() < Precision::Confusion()) { + myType = GeomAbs_Hyperbola; + Hypr = + gp_Hypr(gp_Ax2(P, Z, gp_Dir(Xc)), aR1 * Xc.Magnitude(), 0.); + GeomHyperbolaPtr = + new Geom_Hyperbola(Hypr); + } + else if (Xc.IsNormal(Yc, Precision::Angular())) { + myType = GeomAbs_Hyperbola; + Hypr = gp_Hypr(gp_Ax2(P, gp_Dir(Xc ^ Yc), gp_Dir(Xc)), + aR1 * Xc.Magnitude(), aR2 * Yc.Magnitude()); + GeomHyperbolaPtr = + new Geom_Hyperbola(Hypr); + } + else if (Yc.Magnitude() < Precision::Confusion() || + Yc.IsParallel(Xc, Precision::Angular())) + { + myIsApprox = Standard_True; + } + else if(!myKeepParam) + { + myIsApprox = !BuildHyperbolaByApex(GeomHyperbolaPtr); + } + else + { + myIsApprox = Standard_True; + } + if ( !myIsApprox ) + { + GetTrimmedResult(GeomHyperbolaPtr); + } + else + { + BuildByApprox(aHyperbolaLimit); + } + } + break; + case GeomAbs_BezierCurve: + { + Handle(Geom_BezierCurve) BezierCurvePtr = + myCurve->Bezier(); + Standard_Integer NbPoles = + BezierCurvePtr->NbPoles(); + + Handle(Geom_BezierCurve) ProjCu = + Handle(Geom_BezierCurve)::DownCast(BezierCurvePtr->Copy()); + + myKeepParam = Standard_True; + myIsApprox = Standard_False; + myType = Type; + for (Standard_Integer i = 1; i <= NbPoles; i++) { + ProjCu->SetPole + (i, ProjectPnt(myPlane, myDirection, BezierCurvePtr->Pole(i))); + } + + // Modified by Sergey KHROMOV - Tue Jan 29 16:57:29 2002 Begin + GeomAdaptor_Curve aGACurve(ProjCu); + myResult = new GeomAdaptor_Curve(aGACurve); + // Modified by Sergey KHROMOV - Tue Jan 29 16:57:30 2002 End + } + break; + case GeomAbs_BSplineCurve: + { + Handle(Geom_BSplineCurve) BSplineCurvePtr = + myCurve->BSpline(); + // + // make a copy of the curve and projects its poles + // + Handle(Geom_BSplineCurve) ProjectedBSplinePtr = + Handle(Geom_BSplineCurve)::DownCast(BSplineCurvePtr->Copy()); + + myKeepParam = Standard_True; + myIsApprox = Standard_False; + myType = Type; + for (Standard_Integer i = 1; i <= BSplineCurvePtr->NbPoles(); i++) { + ProjectedBSplinePtr->SetPole + (i, ProjectPnt(myPlane, myDirection, BSplineCurvePtr->Pole(i))); + } + + // Modified by Sergey KHROMOV - Tue Jan 29 16:57:29 2002 Begin + GeomAdaptor_Curve aGACurve(ProjectedBSplinePtr); + myResult = new GeomAdaptor_Curve(aGACurve); + // Modified by Sergey KHROMOV - Tue Jan 29 16:57:30 2002 End + } + break; + default: + { + myKeepParam = Standard_True; + myIsApprox = Standard_True; + myType = GeomAbs_BSplineCurve; + PerformApprox(myCurve, myPlane, myDirection, ApproxCurve); + // Modified by Sergey KHROMOV - Tue Jan 29 16:57:29 2002 Begin + GeomAdaptor_Curve aGACurve(ApproxCurve); + myResult = new GeomAdaptor_Curve(aGACurve); + // Modified by Sergey KHROMOV - Tue Jan 29 16:57:30 2002 End + } + break; } } @@ -984,7 +1048,7 @@ void ProjLib_ProjectOnPlane::Load(const Handle(Adaptor3d_Curve)& C, //purpose : //======================================================================= -const gp_Ax3& ProjLib_ProjectOnPlane::GetPlane() const +const gp_Ax3& ProjLib_ProjectOnPlane::GetPlane() const { return myPlane; } @@ -994,7 +1058,7 @@ const gp_Ax3& ProjLib_ProjectOnPlane::GetPlane() const //purpose : //======================================================================= -const gp_Dir& ProjLib_ProjectOnPlane::GetDirection() const +const gp_Dir& ProjLib_ProjectOnPlane::GetDirection() const { return myDirection; } @@ -1025,9 +1089,9 @@ const Handle(GeomAdaptor_Curve)& ProjLib_ProjectOnPlane::GetResult() const //purpose : //======================================================================= -Standard_Real ProjLib_ProjectOnPlane::FirstParameter() const +Standard_Real ProjLib_ProjectOnPlane::FirstParameter() const { - if ( myKeepParam || myIsApprox) + if (myKeepParam || myIsApprox) return myCurve->FirstParameter(); else return myFirstPar; @@ -1039,9 +1103,9 @@ Standard_Real ProjLib_ProjectOnPlane::FirstParameter() const //purpose : //======================================================================= -Standard_Real ProjLib_ProjectOnPlane::LastParameter() const +Standard_Real ProjLib_ProjectOnPlane::LastParameter() const { - if ( myKeepParam || myIsApprox) + if (myKeepParam || myIsApprox) return myCurve->LastParameter(); else return myLastPar; @@ -1055,7 +1119,7 @@ Standard_Real ProjLib_ProjectOnPlane::LastParameter() const GeomAbs_Shape ProjLib_ProjectOnPlane::Continuity() const { - return myCurve->Continuity() ; + return myCurve->Continuity(); } @@ -1066,7 +1130,7 @@ GeomAbs_Shape ProjLib_ProjectOnPlane::Continuity() const Standard_Integer ProjLib_ProjectOnPlane::NbIntervals(const GeomAbs_Shape S) const { - return myCurve->NbIntervals(S) ; + return myCurve->NbIntervals(S); } @@ -1075,10 +1139,10 @@ Standard_Integer ProjLib_ProjectOnPlane::NbIntervals(const GeomAbs_Shape S) cons //purpose : //======================================================================= -void ProjLib_ProjectOnPlane::Intervals(TColStd_Array1OfReal& T, - const GeomAbs_Shape S) const +void ProjLib_ProjectOnPlane::Intervals(TColStd_Array1OfReal& T, + const GeomAbs_Shape S) const { - myCurve->Intervals(T,S) ; + myCurve->Intervals(T, S); } //======================================================================= @@ -1086,20 +1150,20 @@ void ProjLib_ProjectOnPlane::Intervals(TColStd_Array1OfReal& T, //purpose : //======================================================================= -Handle(Adaptor3d_Curve) +Handle(Adaptor3d_Curve) ProjLib_ProjectOnPlane::Trim(const Standard_Real First, - const Standard_Real Last, - const Standard_Real Tolerance) const + const Standard_Real Last, + const Standard_Real Tolerance) const { - if (myType != GeomAbs_OtherCurve){ - return myResult->Trim(First,Last,Tolerance) ; + if (myType != GeomAbs_OtherCurve) { + return myResult->Trim(First, Last, Tolerance); } else { - throw Standard_NotImplemented ("ProjLib_ProjectOnPlane::Trim() - curve of unsupported type"); + throw Standard_NotImplemented("ProjLib_ProjectOnPlane::Trim() - curve of unsupported type"); } } - + //======================================================================= //function : IsClosed //purpose : @@ -1107,7 +1171,7 @@ ProjLib_ProjectOnPlane::Trim(const Standard_Real First, Standard_Boolean ProjLib_ProjectOnPlane::IsClosed() const { - return myCurve->IsClosed() ; + return myCurve->IsClosed(); } @@ -1118,9 +1182,9 @@ Standard_Boolean ProjLib_ProjectOnPlane::IsClosed() const Standard_Boolean ProjLib_ProjectOnPlane::IsPeriodic() const { - if ( myIsApprox) + if (myIsApprox) return Standard_False; - else + else return myCurve->IsPeriodic(); } @@ -1132,13 +1196,13 @@ Standard_Boolean ProjLib_ProjectOnPlane::IsPeriodic() const Standard_Real ProjLib_ProjectOnPlane::Period() const { - if ( !IsPeriodic()) { + if (!IsPeriodic()) { throw Standard_NoSuchObject("ProjLib_ProjectOnPlane::Period"); } - - if ( myIsApprox) + + if (myIsApprox) return Standard_False; - else + else return myCurve->Period(); } @@ -1148,19 +1212,19 @@ Standard_Real ProjLib_ProjectOnPlane::Period() const //purpose : //======================================================================= -gp_Pnt ProjLib_ProjectOnPlane::Value(const Standard_Real U) const +gp_Pnt ProjLib_ProjectOnPlane::Value(const Standard_Real U) const { - if (myType != GeomAbs_OtherCurve) { + if (myType != GeomAbs_OtherCurve) { return myResult->Value(U); } else { return OnPlane_Value(U, - myCurve, - myPlane, - myDirection); - + myCurve, + myPlane, + myDirection); + } -} +} //======================================================================= @@ -1168,16 +1232,16 @@ gp_Pnt ProjLib_ProjectOnPlane::Value(const Standard_Real U) const //purpose : //======================================================================= -void ProjLib_ProjectOnPlane::D0(const Standard_Real U , gp_Pnt& P) const +void ProjLib_ProjectOnPlane::D0(const Standard_Real U, gp_Pnt& P) const { if (myType != GeomAbs_OtherCurve) { - myResult->D0(U,P) ; + myResult->D0(U, P); } else { P = OnPlane_Value(U, - myCurve, - myPlane, - myDirection); + myCurve, + myPlane, + myDirection); } } @@ -1188,19 +1252,19 @@ void ProjLib_ProjectOnPlane::D0(const Standard_Real U , gp_Pnt& P) const //======================================================================= void ProjLib_ProjectOnPlane::D1(const Standard_Real U, - gp_Pnt& P , - gp_Vec& V ) const + gp_Pnt& P, + gp_Vec& V) const { if (myType != GeomAbs_OtherCurve) { - myResult->D1(U,P,V) ; + myResult->D1(U, P, V); } else { OnPlane_D1(U, - P, - V, - myCurve, - myPlane, - myDirection); + P, + V, + myCurve, + myPlane, + myDirection); } } @@ -1210,22 +1274,22 @@ void ProjLib_ProjectOnPlane::D1(const Standard_Real U, //purpose : //======================================================================= -void ProjLib_ProjectOnPlane::D2(const Standard_Real U, - gp_Pnt& P, - gp_Vec& V1, - gp_Vec& V2) const +void ProjLib_ProjectOnPlane::D2(const Standard_Real U, + gp_Pnt& P, + gp_Vec& V1, + gp_Vec& V2) const { - if (myType != GeomAbs_OtherCurve) { - myResult->D2(U,P,V1,V2) ; + if (myType != GeomAbs_OtherCurve) { + myResult->D2(U, P, V1, V2); } else { OnPlane_D2(U, - P, - V1, - V2, - myCurve, - myPlane, - myDirection); + P, + V1, + V2, + myCurve, + myPlane, + myDirection); } } @@ -1235,24 +1299,24 @@ void ProjLib_ProjectOnPlane::D2(const Standard_Real U, //purpose : //======================================================================= -void ProjLib_ProjectOnPlane::D3(const Standard_Real U, - gp_Pnt& P, - gp_Vec& V1, - gp_Vec& V2, - gp_Vec& V3) const +void ProjLib_ProjectOnPlane::D3(const Standard_Real U, + gp_Pnt& P, + gp_Vec& V1, + gp_Vec& V2, + gp_Vec& V3) const { - if (myType != GeomAbs_OtherCurve) { - myResult->D3(U,P,V1,V2,V3) ; + if (myType != GeomAbs_OtherCurve) { + myResult->D3(U, P, V1, V2, V3); } - else { + else { OnPlane_D3(U, - P, - V1, - V2, - V3, - myCurve, - myPlane, - myDirection); + P, + V1, + V2, + V3, + myCurve, + myPlane, + myDirection); } } @@ -1262,20 +1326,20 @@ void ProjLib_ProjectOnPlane::D3(const Standard_Real U, //purpose : //======================================================================= -gp_Vec ProjLib_ProjectOnPlane::DN(const Standard_Real U, - const Standard_Integer DerivativeRequest) - const +gp_Vec ProjLib_ProjectOnPlane::DN(const Standard_Real U, + const Standard_Integer DerivativeRequest) + const { if (myType != GeomAbs_OtherCurve) { - return myResult->DN(U,DerivativeRequest) ; + return myResult->DN(U, DerivativeRequest); } else { return OnPlane_DN(U, - DerivativeRequest, - myCurve, - myPlane, - myDirection); - } + DerivativeRequest, + myCurve, + myPlane, + myDirection); + } } @@ -1285,16 +1349,16 @@ gp_Vec ProjLib_ProjectOnPlane::DN(const Standard_Real U, //======================================================================= Standard_Real ProjLib_ProjectOnPlane::Resolution -(const Standard_Real Tolerance) const +(const Standard_Real Tolerance) const { if (myType != GeomAbs_OtherCurve) { - return myResult->Resolution(Tolerance) ; + return myResult->Resolution(Tolerance); } else { return 0; } } - + //======================================================================= //function : GetType @@ -1359,7 +1423,7 @@ gp_Hypr ProjLib_ProjectOnPlane::Hyperbola() const if (myType != GeomAbs_Hyperbola) throw Standard_NoSuchObject("ProjLib_ProjectOnPlane:Hyperbola"); - return myResult->Hyperbola() ; + return myResult->Hyperbola(); } @@ -1372,8 +1436,8 @@ gp_Parab ProjLib_ProjectOnPlane::Parabola() const { if (myType != GeomAbs_Parabola) throw Standard_NoSuchObject("ProjLib_ProjectOnPlane:Parabola"); - - return myResult->Parabola() ; + + return myResult->Parabola(); } //======================================================================= @@ -1384,10 +1448,10 @@ gp_Parab ProjLib_ProjectOnPlane::Parabola() const Standard_Integer ProjLib_ProjectOnPlane::Degree() const { if ((GetType() != GeomAbs_BSplineCurve) && - (GetType() != GeomAbs_BezierCurve)) + (GetType() != GeomAbs_BezierCurve)) throw Standard_NoSuchObject("ProjLib_ProjectOnPlane:Degree"); - if ( myIsApprox) + if (myIsApprox) return myResult->Degree(); else return myCurve->Degree(); @@ -1398,13 +1462,13 @@ Standard_Integer ProjLib_ProjectOnPlane::Degree() const //purpose : //======================================================================= -Standard_Boolean ProjLib_ProjectOnPlane::IsRational() const +Standard_Boolean ProjLib_ProjectOnPlane::IsRational() const { if ((GetType() != GeomAbs_BSplineCurve) && - (GetType() != GeomAbs_BezierCurve)) + (GetType() != GeomAbs_BezierCurve)) throw Standard_NoSuchObject("ProjLib_ProjectOnPlane:IsRational"); - - if ( myIsApprox) + + if (myIsApprox) return myResult->IsRational(); else return myCurve->IsRational(); @@ -1418,10 +1482,10 @@ Standard_Boolean ProjLib_ProjectOnPlane::IsRational() const Standard_Integer ProjLib_ProjectOnPlane::NbPoles() const { if ((GetType() != GeomAbs_BSplineCurve) && - (GetType() != GeomAbs_BezierCurve)) + (GetType() != GeomAbs_BezierCurve)) throw Standard_NoSuchObject("ProjLib_ProjectOnPlane:NbPoles"); - - if ( myIsApprox) + + if (myIsApprox) return myResult->NbPoles(); else return myCurve->NbPoles(); @@ -1432,12 +1496,12 @@ Standard_Integer ProjLib_ProjectOnPlane::NbPoles() const //purpose : //======================================================================= -Standard_Integer ProjLib_ProjectOnPlane::NbKnots() const +Standard_Integer ProjLib_ProjectOnPlane::NbKnots() const { - if ( GetType() != GeomAbs_BSplineCurve) + if (GetType() != GeomAbs_BSplineCurve) throw Standard_NoSuchObject("ProjLib_ProjectOnPlane:NbKnots"); - - if ( myIsApprox) + + if (myIsApprox) return myResult->NbKnots(); else return myCurve->NbKnots(); @@ -1454,11 +1518,11 @@ Handle(Geom_BezierCurve) ProjLib_ProjectOnPlane::Bezier() const if (myType != GeomAbs_BezierCurve) throw Standard_NoSuchObject("ProjLib_ProjectOnPlane:Bezier"); - return myResult->Bezier() ; + return myResult->Bezier(); } //======================================================================= -//function : Bezier +//function : BSpline //purpose : //======================================================================= @@ -1467,6 +1531,225 @@ Handle(Geom_BSplineCurve) ProjLib_ProjectOnPlane::BSpline() const if (myType != GeomAbs_BSplineCurve) throw Standard_NoSuchObject("ProjLib_ProjectOnPlane:BSpline"); - return myResult->BSpline() ; + return myResult->BSpline(); +} + +//======================================================================= +//function : GetTrimmedResult +//purpose : +//======================================================================= + +void ProjLib_ProjectOnPlane::GetTrimmedResult(const Handle(Geom_Curve)& theProjCurve) +{ + gp_Lin aLin; + gp_Parab aParab; + gp_Hypr aHypr; + if (myType == GeomAbs_Line) + { + aLin = Handle(Geom_Line)::DownCast(theProjCurve)->Lin(); + } + else if (myType == GeomAbs_Parabola) + { + aParab = Handle(Geom_Parabola)::DownCast(theProjCurve)->Parab(); + } + else if (myType == GeomAbs_Hyperbola) + { + aHypr = Handle(Geom_Hyperbola)::DownCast(theProjCurve)->Hypr(); + } + + myFirstPar = theProjCurve->FirstParameter(); + myLastPar = theProjCurve->LastParameter(); + if (!Precision::IsInfinite(myCurve->FirstParameter())) + { + gp_Pnt aP = myCurve->Value(myCurve->FirstParameter()); + aP = ProjectPnt(myPlane, myDirection, aP); + if (myType == GeomAbs_Line) + { + myFirstPar = ElCLib::Parameter(aLin, aP); + } + else if (myType == GeomAbs_Parabola) + { + myFirstPar = ElCLib::Parameter(aParab, aP); + } + else if (myType == GeomAbs_Hyperbola) + { + myFirstPar = ElCLib::Parameter(aHypr, aP); + } + else + { + GeomLib_Tool::Parameter(theProjCurve, aP, Precision::Confusion(), myFirstPar); + } + } + if (!Precision::IsInfinite(myCurve->LastParameter())) + { + gp_Pnt aP = myCurve->Value(myCurve->LastParameter()); + aP = ProjectPnt(myPlane, myDirection, aP); + if (myType == GeomAbs_Line) + { + myLastPar = ElCLib::Parameter(aLin, aP); + } + else if (myType == GeomAbs_Parabola) + { + myLastPar = ElCLib::Parameter(aParab, aP); + } + else if (myType == GeomAbs_Hyperbola) + { + myLastPar = ElCLib::Parameter(aHypr, aP); + } + else + { + GeomLib_Tool::Parameter(theProjCurve, aP, Precision::Confusion(), myLastPar); + } + } + myResult = new GeomAdaptor_Curve(theProjCurve, myFirstPar, myLastPar); + +} + +//======================================================================= +//function : BuildParabolaByApex +//purpose : +//======================================================================= + +Standard_Boolean ProjLib_ProjectOnPlane::BuildParabolaByApex(Handle(Geom_Curve)& theGeomParabolaPtr) +{ + // + //Searching parabola apex as point with maximal curvature + Standard_Real aF = myCurve->Parabola().Focal(); + GeomAbs_CurveType aCurType = myType; + myType = GeomAbs_OtherCurve; //To provide correct calculation of derivativesb by projection for + //copy of instance; + Handle(Adaptor3d_Curve) aProjCrv = ShallowCopy(); + myType = aCurType; + LProp3d_CLProps aProps(aProjCrv, 2, Precision::Confusion()); + ProjLib_MaxCurvature aMaxCur(aProps); + math_BrentMinimum aSolver(Precision::PConfusion()); + aSolver.Perform(aMaxCur, -10.*aF, 0., 10.*aF); + + if (!aSolver.IsDone()) + { + return Standard_False; + } + + Standard_Real aT; + aT = aSolver.Location(); + aProps.SetParameter(aT); + gp_Pnt aP0 = aProps.Value(); + gp_Vec aDY = aProps.D1(); + gp_Dir anYDir(aDY); + gp_Dir anXDir; + Standard_Real aCurv = aProps.Curvature(); + if (Precision::IsInfinite(aCurv) || aCurv < Precision::Confusion()) + { + return Standard_False; + } + aProps.Normal(anXDir); + // + gp_Lin anXLine(aP0, anXDir); + gp_Pnt aP1 = Value(aT + 10.*aF); + // + Standard_Real anX = ElCLib::LineParameter(anXLine.Position(), aP1); + Standard_Real anY = anXLine.Distance(aP1); + Standard_Real aNewF = anY * anY / 4. / anX; + gp_Dir anN = anXDir^anYDir; + gp_Ax2 anA2(aP0, anN, anXDir); + gce_MakeParab aMkParab(anA2, aNewF); + if (!aMkParab.IsDone()) + { + return Standard_False; + } + + gp_Parab aProjParab = aMkParab.Value(); + + myType = GeomAbs_Parabola; + theGeomParabolaPtr = new Geom_Parabola(aProjParab); + //GetTrimmedResult(theGeomParabolaPtr); + + return Standard_True; +} + +//======================================================================= +//function : BuildHyperbolaByApex +//purpose : +//======================================================================= + +Standard_Boolean ProjLib_ProjectOnPlane::BuildHyperbolaByApex(Handle(Geom_Curve)& theGeomHyperbolaPtr) +{ + //Try to build hyperbola with help of apex position + GeomAbs_CurveType aCurType = myType; + myType = GeomAbs_OtherCurve; //To provide correct calculation of derivativesb by projection for + //copy of instance; + Handle(Adaptor3d_Curve) aProjCrv = ShallowCopy(); + myType = aCurType; + //Searching hyperbola apex as point with maximal curvature + LProp3d_CLProps aProps(aProjCrv, 2, Precision::Confusion()); + ProjLib_MaxCurvature aMaxCur(aProps); + math_BrentMinimum aSolver(Precision::PConfusion()); + aSolver.Perform(aMaxCur, -5., 0., 5.); + + if (aSolver.IsDone()) + { + Standard_Real aT; + aT = aSolver.Location(); + aProps.SetParameter(aT); + Standard_Real aCurv = aProps.Curvature(); + if (Precision::IsInfinite(aCurv) || aCurv < Precision::Confusion()) + { + return Standard_False; + } + else + { + gp_Hypr Hypr = myCurve->Hyperbola(); + gp_Ax2 AxeRef = Hypr.Position(); + gp_Pnt P = ProjectPnt(myPlane, myDirection, AxeRef.Location()); + gp_Dir Z = myPlane.Direction(); + gp_Pnt aP0 = aProps.Value(); + gp_Dir anXDir = gce_MakeDir(P, aP0); + gp_Dir anYDir = gce_MakeDir(aProps.D1()); + // + Standard_Real aMajRad = P.Distance(aP0); + gp_Pnt aP1 = Value(aT + 1.); + gp_Vec aV(P, aP1); + Standard_Real anX = aV * anXDir; + Standard_Real anY = aV * anYDir; + Standard_Real aMinRad = anY / Sqrt(anX * anX / aMajRad / aMajRad - 1.); + gp_Ax2 anA2(P, Z, anXDir); + gp_Hypr anHypr(anA2, aMajRad, aMinRad); + theGeomHyperbolaPtr = + new Geom_Hyperbola(anHypr); + myType = GeomAbs_Hyperbola; + } + } + else + { + return Standard_False; + } + return Standard_True; } +//======================================================================= +//function : BuilByApprox +//purpose : +//======================================================================= + +void ProjLib_ProjectOnPlane::BuildByApprox(const Standard_Real theLimitParameter) +{ + myType = GeomAbs_BSplineCurve; + Handle(Geom_BSplineCurve) anApproxCurve; + if (Precision::IsInfinite(myCurve->FirstParameter()) || + Precision::IsInfinite(myCurve->LastParameter())) + { + //To avoid exception in approximation + Standard_Real f = Max(-theLimitParameter, myCurve->FirstParameter()); + Standard_Real l = Min(theLimitParameter, myCurve->LastParameter()); + Handle(Adaptor3d_Curve) aTrimCurve = myCurve->Trim(f, l, Precision::Confusion()); + PerformApprox(aTrimCurve, myPlane, myDirection, anApproxCurve); + } + else + { + PerformApprox(myCurve, myPlane, myDirection, anApproxCurve); + } + myFirstPar = anApproxCurve->FirstParameter(); + myLastPar = anApproxCurve->LastParameter(); + GeomAdaptor_Curve aGACurve(anApproxCurve); + myResult = new GeomAdaptor_Curve(aGACurve); +} \ No newline at end of file diff --git a/src/ProjLib/ProjLib_ProjectOnPlane.hxx b/src/ProjLib/ProjLib_ProjectOnPlane.hxx index d885bb5ee8..ec94cbb7b1 100644 --- a/src/ProjLib/ProjLib_ProjectOnPlane.hxx +++ b/src/ProjLib/ProjLib_ProjectOnPlane.hxx @@ -192,9 +192,12 @@ public: protected: + void GetTrimmedResult(const Handle(Geom_Curve)& theProjCurve); + Standard_Boolean BuildParabolaByApex(Handle(Geom_Curve)& theGeomParabolaPtr); + Standard_Boolean BuildHyperbolaByApex(Handle(Geom_Curve)& theGeomParabolaPtr); - + void BuildByApprox(const Standard_Real theLimitParameter); private: diff --git a/tests/bugs/moddata_3/bug31661_1 b/tests/bugs/moddata_3/bug31661_1 new file mode 100644 index 0000000000..b30ef8fe2a --- /dev/null +++ b/tests/bugs/moddata_3/bug31661_1 @@ -0,0 +1,26 @@ +puts "" +puts "==========================================================================" +puts "OCC31661: Modeling Data - Algorithm crashes when projecting parabola or hyperbola to plane" +puts "==========================================================================" +puts "" + +parabola p 0 0 0 1 1 1 2 0 -2 10 +plane pln 0 0 0 0 0 1 +projonplane r p pln 0 + +if {![regexp {Parabola} [dump r]]} { + puts "ERROR: Projected curve is not a parabola" +} + +trim p p -100 100 +projonplane rp p pln 0 + +if {![regexp {Parabola} [dump rp]]} { + puts "ERROR: Projected curve is not a parabola" +} + +checklength rp -l 408.40363195229503 +bounds rp t1 t2 +checkreal t1 [dval t1] -91.077748943768597 1.e-7 1.e-7 +checkreal t2 [dval t2] 72.221567418462357 1.e-7 1.e-7 + diff --git a/tests/bugs/moddata_3/bug31661_2 b/tests/bugs/moddata_3/bug31661_2 new file mode 100644 index 0000000000..0e601af77e --- /dev/null +++ b/tests/bugs/moddata_3/bug31661_2 @@ -0,0 +1,26 @@ +puts "" +puts "==========================================================================" +puts "OCC31661: Modeling Data - Algorithm crashes when projecting parabola or hyperbola to plane" +puts "==========================================================================" +puts "" + +hyperbola h 0 0 0 1 1 1 2 0 -2 10 10 +plane pln 0 0 0 0 0 1 +projonplane rh h pln 0 + +if {![regexp {Hyperbola} [dump rh]]} { + puts "ERROR: Projected curve is not a hyperbola" +} + +trim h h -5 5 +projonplane rh h pln 0 + +if {![regexp {Hyperbola} [dump rh]]} { + puts "ERROR: Projected curve is not a hyperbola" +} + +checklength rh -l 1664.3732976598988 +bounds rh t1 t2 +checkreal t1 [dval t1] -5.23179933356147 1.e-7 1.e-7 +checkreal t2 [dval t2] 4.76820064934972 1.e-7 1.e-7 + From e3fd3d83dab0e5b1f6c53243ce0dc3e56e2bdef1 Mon Sep 17 00:00:00 2001 From: sshutina Date: Mon, 4 Apr 2022 22:53:18 +0300 Subject: [PATCH 245/639] 0032861: Visualization - Separate rotate and move the object behavior in AIS_ViewController Added the flag in Dragging structure that defines perform dragging (ToMove). --- src/AIS/AIS_MouseGesture.hxx | 2 + src/AIS/AIS_ViewController.cxx | 82 +++++++++++++++++++++++---- src/AIS/AIS_ViewController.hxx | 2 + src/AIS/AIS_ViewInputBuffer.hxx | 4 +- tests/v3d/manipulator/drag_in_2d_view | 31 ++++++++++ 5 files changed, 109 insertions(+), 12 deletions(-) create mode 100644 tests/v3d/manipulator/drag_in_2d_view diff --git a/src/AIS/AIS_MouseGesture.hxx b/src/AIS/AIS_MouseGesture.hxx index 121b746c04..b972e84451 100644 --- a/src/AIS/AIS_MouseGesture.hxx +++ b/src/AIS/AIS_MouseGesture.hxx @@ -34,6 +34,8 @@ enum AIS_MouseGesture AIS_MouseGesture_Pan, //!< view panning gesture AIS_MouseGesture_RotateOrbit, //!< orbit rotation gesture AIS_MouseGesture_RotateView, //!< view rotation gesture + AIS_MouseGesture_Drag, //!< object dragging; + //! press button to start, move mouse to define rectangle, release to finish }; //! Map defining mouse gestures. diff --git a/src/AIS/AIS_ViewController.cxx b/src/AIS/AIS_ViewController.cxx index b923079fa4..62cc3d9ea5 100644 --- a/src/AIS/AIS_ViewController.cxx +++ b/src/AIS/AIS_ViewController.cxx @@ -92,6 +92,7 @@ AIS_ViewController::AIS_ViewController() myTouchPanThresholdPx (4.0f), myTouchZoomThresholdPx (6.0f), myTouchZoomRatio (0.13f), + myTouchDraggingThresholdPx (6.0f), // myNbTouchesLast (0), myUpdateStartPointPan (true), @@ -133,6 +134,8 @@ AIS_ViewController::AIS_ViewController() myMouseGestureMap.Bind (Aspect_VKeyMouse_MiddleButton, AIS_MouseGesture_Pan); myMouseGestureMap.Bind (Aspect_VKeyMouse_MiddleButton | Aspect_VKeyFlags_CTRL, AIS_MouseGesture_Pan); + myMouseGestureMapDrag.Bind (Aspect_VKeyMouse_LeftButton, AIS_MouseGesture_Drag); + myXRTeleportHaptic.Duration = 3600.0f; myXRTeleportHaptic.Frequency = 0.1f; myXRTeleportHaptic.Amplitude = 0.2f; @@ -261,12 +264,21 @@ void AIS_ViewController::flushBuffers (const Handle(AIS_InteractiveContext)& , myUI.Dragging.ToStop = false; myGL.Dragging.ToStop = true; } - else if (myUI.Dragging.ToStart) + else { - myUI.Dragging.ToStart = false; - myGL.Dragging.ToStart = true; - myGL.Dragging.PointStart = myUI.Dragging.PointStart; + if (myUI.Dragging.ToStart) + { + myUI.Dragging.ToStart = false; + myGL.Dragging.ToStart = true; + myGL.Dragging.PointStart = myUI.Dragging.PointStart; + } + if (myUI.Dragging.ToMove) + { + myUI.Dragging.ToMove = false; + myGL.Dragging.ToMove = true; + } } + myGL.Dragging.PointTo = myUI.Dragging.PointTo; if (myUI.OrbitRotation.ToStart) @@ -351,6 +363,7 @@ void AIS_ViewController::flushGestures (const Handle(AIS_InteractiveContext)& , const Graphic3d_Vec2d aRotDelta = aTouch.To - myGL.OrbitRotation.PointStart; myGL.OrbitRotation.ToRotate = true; myGL.OrbitRotation.PointTo = myGL.OrbitRotation.PointStart + aRotDelta * aRotAccel; + myGL.Dragging.ToMove = true; myGL.Dragging.PointTo.SetValues ((int )aTouch.To.x(), (int )aTouch.To.y()); } else @@ -358,6 +371,7 @@ void AIS_ViewController::flushGestures (const Handle(AIS_InteractiveContext)& , const Graphic3d_Vec2d aRotDelta = aTouch.To - myGL.ViewRotation.PointStart; myGL.ViewRotation.ToRotate = true; myGL.ViewRotation.PointTo = myGL.ViewRotation.PointStart + aRotDelta * aRotAccel; + myGL.Dragging.ToMove = true; myGL.Dragging.PointTo.SetValues ((int )aTouch.To.x(), (int )aTouch.To.y()); } @@ -780,6 +794,19 @@ bool AIS_ViewController::UpdateMouseButtons (const Graphic3d_Vec2i& thePoint, UpdatePolySelection (thePoint, true); break; } + case AIS_MouseGesture_Drag: + { + if (myToAllowDragging) + { + myUI.Dragging.ToStart = true; + myUI.Dragging.PointStart = thePoint; + } + else + { + myMouseActiveGesture = AIS_MouseGesture_NONE; + } + break; + } case AIS_MouseGesture_NONE: { break; @@ -787,12 +814,19 @@ bool AIS_ViewController::UpdateMouseButtons (const Graphic3d_Vec2i& thePoint, } } - if (theButtons == Aspect_VKeyMouse_LeftButton - && theModifiers == Aspect_VKeyFlags_NONE - && myToAllowDragging) + AIS_MouseGesture aSecGesture = AIS_MouseGesture_NONE; + if (myMouseGestureMapDrag.Find (theButtons | theModifiers, aSecGesture)) { - myUI.Dragging.ToStart = true; - myUI.Dragging.PointStart = thePoint; + if (aSecGesture == AIS_MouseGesture_Drag + && myToAllowDragging) + { + myUI.Dragging.ToStart = true; + myUI.Dragging.PointStart = thePoint; + if (myMouseActiveGesture == AIS_MouseGesture_NONE) + { + myMouseActiveGesture = aSecGesture; + } + } } } @@ -932,6 +966,8 @@ bool AIS_ViewController::UpdateMousePosition (const Graphic3d_Vec2i& thePoint, myUI.ViewRotation.PointTo = Graphic3d_Vec2d (myMousePressPoint.x(), myMousePressPoint.y()) + Graphic3d_Vec2d (aRotDelta.x(), aRotDelta.y()) * aRotAccel; } + + myUI.Dragging.ToMove = true; myUI.Dragging.PointTo = thePoint; myMouseProgressPoint = thePoint; @@ -991,6 +1027,31 @@ bool AIS_ViewController::UpdateMousePosition (const Graphic3d_Vec2i& thePoint, } break; } + case AIS_MouseGesture_Drag: + { + if (!myToAllowDragging) + { + break; + } + + const double aDragTol = theIsEmulated + ? double(myTouchToleranceScale) * myTouchDraggingThresholdPx + : 0.0; + if (double (Abs (aDelta.x()) + Abs (aDelta.y())) > aDragTol) + { + const double aRotAccel = myNavigationMode == AIS_NavigationMode_FirstPersonWalk ? myMouseAccel : myOrbitAccel; + const Graphic3d_Vec2i aRotDelta = thePoint - myMousePressPoint; + myUI.ViewRotation.ToRotate = true; + myUI.ViewRotation.PointTo = Graphic3d_Vec2d (myMousePressPoint.x(), myMousePressPoint.y()) + + Graphic3d_Vec2d (aRotDelta.x(), aRotDelta.y()) * aRotAccel; + myUI.Dragging.ToMove = true; + myUI.Dragging.PointTo = thePoint; + + myMouseProgressPoint = thePoint; + toUpdateView = true; + } + break; + } default: { break; @@ -2913,8 +2974,7 @@ void AIS_ViewController::handleDynamicHighlight (const Handle(AIS_InteractiveCon myGL.OrbitRotation.ToRotate = false; myGL.ViewRotation .ToRotate = false; } - else if (myGL.OrbitRotation.ToRotate - || myGL.ViewRotation.ToRotate) + else if (myGL.Dragging.ToMove) { OnObjectDragged (theCtx, theView, AIS_DragAction_Update); myGL.OrbitRotation.ToRotate = false; diff --git a/src/AIS/AIS_ViewController.hxx b/src/AIS/AIS_ViewController.hxx index 21e9ccdde0..98f1938726 100644 --- a/src/AIS/AIS_ViewController.hxx +++ b/src/AIS/AIS_ViewController.hxx @@ -757,6 +757,7 @@ protected: //! @name mouse input variables Standard_ShortReal myScrollZoomRatio; //!< distance ratio for mapping mouse scroll event to zoom; 15.0 by default AIS_MouseGestureMap myMouseGestureMap; //!< map defining mouse gestures + AIS_MouseGestureMap myMouseGestureMapDrag; //!< secondary map defining mouse gestures for dragging AIS_MouseGesture myMouseActiveGesture; //!< initiated mouse gesture (by pressing mouse button) AIS_MouseSelectionSchemeMap myMouseSelectionSchemes; //!< map defining selection schemes bound to mouse + modifiers @@ -777,6 +778,7 @@ protected: //! @name multi-touch input variables Standard_ShortReal myTouchPanThresholdPx; //!< threshold for starting two-touch panning gesture in pixels; 4 by default Standard_ShortReal myTouchZoomThresholdPx; //!< threshold for starting two-touch zoom (pitch) gesture in pixels; 6 by default Standard_ShortReal myTouchZoomRatio; //!< distance ratio for mapping two-touch zoom (pitch) gesture from pixels to zoom; 0.13 by default + Standard_ShortReal myTouchDraggingThresholdPx; //!< distance for starting one-touch dragging gesture in pixels; 6 by default Aspect_Touch myTouchClick; //!< single touch position for handling clicks OSD_Timer myTouchDoubleTapTimer; //!< timer for handling double tap diff --git a/src/AIS/AIS_ViewInputBuffer.hxx b/src/AIS/AIS_ViewInputBuffer.hxx index 9db6fa4279..afcc4feb0d 100644 --- a/src/AIS/AIS_ViewInputBuffer.hxx +++ b/src/AIS/AIS_ViewInputBuffer.hxx @@ -87,12 +87,13 @@ public: struct _draggingParams { bool ToStart; //!< start dragging + bool ToMove; //!< perform dragging bool ToStop; //!< stop dragging bool ToAbort; //!< abort dragging (restore previous position) Graphic3d_Vec2i PointStart; //!< drag start point Graphic3d_Vec2i PointTo; //!< drag end point - _draggingParams() : ToStart (false), ToStop (false), ToAbort (false) {} + _draggingParams() : ToStart (false), ToMove (false), ToStop (false), ToAbort (false) {} } Dragging; struct _orbitRotation @@ -141,6 +142,7 @@ public: Panning.ToStart = false; Panning.ToPan = false; Dragging.ToStart = false; + Dragging.ToMove = false; Dragging.ToStop = false; Dragging.ToAbort = false; OrbitRotation.ToStart = false; diff --git a/tests/v3d/manipulator/drag_in_2d_view b/tests/v3d/manipulator/drag_in_2d_view new file mode 100644 index 0000000000..9eef222bb6 --- /dev/null +++ b/tests/v3d/manipulator/drag_in_2d_view @@ -0,0 +1,31 @@ +puts "==============================================" +puts "0032861: Visualization - Separate rotate and move the object behavior in AIS_ViewController" +puts "==============================================" +puts "" + +pload MODELING VISUALIZATION + +vinit View1 -2d +box b 10 10 10 +vdisplay b +vaxo +vfit +vzoom 0.5 +vmanipulator m -attach b + +vdump $imagedir/${casename}_1.png + +set mouse_pick {226 214} +set mouse_drag {306 265} + +# note: mouse events cannot be emulated here, so the original bug cannot be reproduced by this test case +vmoveto {*}$mouse_pick +vselect {*}$mouse_pick +vmanipulator m -startTransform {*}$mouse_pick +vmanipulator m -transform {*}$mouse_drag +vmanipulator m -stopTransform +vselect 0 0 +vmoveto {*}$mouse_drag +vdump $imagedir/${casename}_2.png + +set aNewLoc [vlocation b -location] From b2ec2f5d42a53644a78a724843f67b2b2994d70a Mon Sep 17 00:00:00 2001 From: mgerus Date: Mon, 4 Apr 2022 10:00:24 +0300 Subject: [PATCH 246/639] 0031361: Modeling algorithms - An exception arise when building tube * Add status flag to GeomFill_Pipe * Add myIsPerform flag to GeomFill_Pipe * Add checking vectors in GeomFill_CorrectedFrenet * Add boolean return to SetCurve virtual methods * Add test case --- src/GeomFill/GeomFill_ConstantBiNormal.cxx | 8 +- src/GeomFill/GeomFill_ConstantBiNormal.hxx | 4 +- src/GeomFill/GeomFill_CorrectedFrenet.cxx | 58 ++++++------ src/GeomFill/GeomFill_CorrectedFrenet.hxx | 4 +- src/GeomFill/GeomFill_CurveAndTrihedron.cxx | 4 +- src/GeomFill/GeomFill_CurveAndTrihedron.hxx | 4 +- src/GeomFill/GeomFill_DiscreteTrihedron.cxx | 33 +++---- src/GeomFill/GeomFill_DiscreteTrihedron.hxx | 4 +- src/GeomFill/GeomFill_Frenet.cxx | 3 +- src/GeomFill/GeomFill_Frenet.hxx | 4 +- src/GeomFill/GeomFill_GuideTrihedronAC.cxx | 3 +- src/GeomFill/GeomFill_GuideTrihedronAC.hxx | 4 +- src/GeomFill/GeomFill_GuideTrihedronPlan.cxx | 3 +- src/GeomFill/GeomFill_GuideTrihedronPlan.hxx | 4 +- src/GeomFill/GeomFill_LocationDraft.cxx | 5 +- src/GeomFill/GeomFill_LocationDraft.hxx | 4 +- src/GeomFill/GeomFill_LocationGuide.cxx | 3 +- src/GeomFill/GeomFill_LocationGuide.hxx | 4 +- src/GeomFill/GeomFill_LocationLaw.hxx | 5 +- src/GeomFill/GeomFill_Pipe.cxx | 89 +++++++++++-------- src/GeomFill/GeomFill_Pipe.hxx | 12 +-- src/GeomFill/GeomFill_Pipe.lxx | 3 +- src/GeomFill/GeomFill_TrihedronLaw.cxx | 3 +- src/GeomFill/GeomFill_TrihedronLaw.hxx | 5 +- .../GeometryTest_SurfaceCommands.cxx | 4 +- tests/bugs/modalg_7/bug31361 | 11 +++ 26 files changed, 173 insertions(+), 115 deletions(-) create mode 100644 tests/bugs/modalg_7/bug31361 diff --git a/src/GeomFill/GeomFill_ConstantBiNormal.cxx b/src/GeomFill/GeomFill_ConstantBiNormal.cxx index 1873a29388..f7c73f2c5e 100644 --- a/src/GeomFill/GeomFill_ConstantBiNormal.cxx +++ b/src/GeomFill/GeomFill_ConstantBiNormal.cxx @@ -66,12 +66,14 @@ GeomFill_ConstantBiNormal::GeomFill_ConstantBiNormal(const gp_Dir& BiNormal) : B return copy; } - void GeomFill_ConstantBiNormal::SetCurve(const Handle(Adaptor3d_Curve)& C) + Standard_Boolean GeomFill_ConstantBiNormal::SetCurve(const Handle(Adaptor3d_Curve)& C) { + Standard_Boolean isOK = Standard_False; GeomFill_TrihedronLaw::SetCurve(C); - if (! C.IsNull()) { - frenet->SetCurve(C); + if (! C.IsNull()) { + isOK = frenet->SetCurve(C); } + return isOK; } Standard_Boolean GeomFill_ConstantBiNormal::D0(const Standard_Real Param,gp_Vec& Tangent,gp_Vec& Normal,gp_Vec& BiNormal) diff --git a/src/GeomFill/GeomFill_ConstantBiNormal.hxx b/src/GeomFill/GeomFill_ConstantBiNormal.hxx index eae75c66cf..79a77d2ba7 100644 --- a/src/GeomFill/GeomFill_ConstantBiNormal.hxx +++ b/src/GeomFill/GeomFill_ConstantBiNormal.hxx @@ -45,7 +45,9 @@ public: Standard_EXPORT virtual Handle(GeomFill_TrihedronLaw) Copy() const Standard_OVERRIDE; - Standard_EXPORT virtual void SetCurve (const Handle(Adaptor3d_Curve)& C) Standard_OVERRIDE; + //! initialize curve of trihedron law + //! @return Standard_True in case if execution end correctly + Standard_EXPORT virtual Standard_Boolean SetCurve (const Handle(Adaptor3d_Curve)& C) Standard_OVERRIDE; //! Computes Triedrhon on curve at parameter Standard_EXPORT virtual Standard_Boolean D0 (const Standard_Real Param, gp_Vec& Tangent, gp_Vec& Normal, gp_Vec& BiNormal) Standard_OVERRIDE; diff --git a/src/GeomFill/GeomFill_CorrectedFrenet.cxx b/src/GeomFill/GeomFill_CorrectedFrenet.cxx index e650e345f0..a16f352aec 100644 --- a/src/GeomFill/GeomFill_CorrectedFrenet.cxx +++ b/src/GeomFill/GeomFill_CorrectedFrenet.cxx @@ -337,34 +337,36 @@ Handle(GeomFill_TrihedronLaw) GeomFill_CorrectedFrenet::Copy() const return copy; } - void GeomFill_CorrectedFrenet::SetCurve(const Handle(Adaptor3d_Curve)& C) +Standard_Boolean GeomFill_CorrectedFrenet::SetCurve(const Handle(Adaptor3d_Curve)& C) { - GeomFill_TrihedronLaw::SetCurve(C); - if (! C.IsNull()) { + if (! C.IsNull()) + { frenet->SetCurve(C); GeomAbs_CurveType type; type = C->GetType(); - switch (type) { + switch (type) + { case GeomAbs_Circle: case GeomAbs_Ellipse: case GeomAbs_Hyperbola: case GeomAbs_Parabola: case GeomAbs_Line: - { - // No probleme isFrenet - isFrenet = Standard_True; - break; - } - default : - { - // We have to search singularities - isFrenet = Standard_True; - Init(); - } + { + // No probleme isFrenet + isFrenet = Standard_True; + break; + } + default : + { + // We have to search singularities + isFrenet = Standard_True; + Init(); + } } } + return isFrenet; } @@ -438,16 +440,20 @@ Handle(GeomFill_TrihedronLaw) GeomFill_CorrectedFrenet::Copy() const TLaw = EvolAroundT; //OCC78 Standard_Integer iEnd = SeqPoles.Length(); - HArrPoles = new TColStd_HArray1OfReal(1, iEnd); - HArrAngle = new TColStd_HArray1OfReal(1, iEnd); - HArrTangent = new TColgp_HArray1OfVec(1, iEnd); - HArrNormal = new TColgp_HArray1OfVec(1, iEnd); - for(i = 1; i <= iEnd; i++){ - HArrPoles->ChangeValue(i) = SeqPoles(i); - HArrAngle->ChangeValue(i) = SeqAngle(i); - HArrTangent->ChangeValue(i) = SeqTangent(i); - HArrNormal->ChangeValue(i) = SeqNormal(i); - }; + if (iEnd != 0) + { + HArrPoles = new TColStd_HArray1OfReal(1, iEnd); + HArrAngle = new TColStd_HArray1OfReal(1, iEnd); + HArrTangent = new TColgp_HArray1OfVec(1, iEnd); + HArrNormal = new TColgp_HArray1OfVec(1, iEnd); + for (i = 1; i <= iEnd; i++) { + HArrPoles->ChangeValue(i) = SeqPoles(i); + HArrAngle->ChangeValue(i) = SeqAngle(i); + HArrTangent->ChangeValue(i) = SeqTangent(i); + HArrNormal->ChangeValue(i) = SeqNormal(i); + }; + } + #ifdef DRAW if (Affich) { @@ -612,7 +618,7 @@ Standard_Real GeomFill_CorrectedFrenet::CalcAngleAT(const gp_Vec& Tangent, const Standard_Real angle; gp_Vec Normal_rot, cross; angle = Tangent.Angle(prevTangent); - if (Abs(angle) > Precision::Angular()) { + if (Abs(angle) > Precision::Angular() && Abs(angle) < M_PI - Precision::Angular()) { cross = Tangent.Crossed(prevTangent).Normalized(); Normal_rot = Normal + sin(angle)*cross.Crossed(Normal) + (1 - cos(angle))*cross.Crossed(cross.Crossed(Normal)); diff --git a/src/GeomFill/GeomFill_CorrectedFrenet.hxx b/src/GeomFill/GeomFill_CorrectedFrenet.hxx index eccd1595a1..4e51bea896 100644 --- a/src/GeomFill/GeomFill_CorrectedFrenet.hxx +++ b/src/GeomFill/GeomFill_CorrectedFrenet.hxx @@ -52,7 +52,9 @@ public: Standard_EXPORT virtual Handle(GeomFill_TrihedronLaw) Copy() const Standard_OVERRIDE; - Standard_EXPORT virtual void SetCurve (const Handle(Adaptor3d_Curve)& C) Standard_OVERRIDE; + //! initialize curve of frenet law + //! @return Standard_True in case if execution end correctly + Standard_EXPORT virtual Standard_Boolean SetCurve (const Handle(Adaptor3d_Curve)& C) Standard_OVERRIDE; Standard_EXPORT virtual void SetInterval (const Standard_Real First, const Standard_Real Last) Standard_OVERRIDE; diff --git a/src/GeomFill/GeomFill_CurveAndTrihedron.cxx b/src/GeomFill/GeomFill_CurveAndTrihedron.cxx index fce6abc5b3..dfee3a53b2 100644 --- a/src/GeomFill/GeomFill_CurveAndTrihedron.cxx +++ b/src/GeomFill/GeomFill_CurveAndTrihedron.cxx @@ -63,11 +63,11 @@ Handle(GeomFill_LocationLaw) GeomFill_CurveAndTrihedron::Copy() const //Function: SetCurve //Purpose : //================================================================== - void GeomFill_CurveAndTrihedron::SetCurve(const Handle(Adaptor3d_Curve)& C) + Standard_Boolean GeomFill_CurveAndTrihedron::SetCurve(const Handle(Adaptor3d_Curve)& C) { myCurve = C; myTrimmed = C; - myLaw->SetCurve(C); + return myLaw->SetCurve(C); } const Handle(Adaptor3d_Curve)& GeomFill_CurveAndTrihedron::GetCurve() const diff --git a/src/GeomFill/GeomFill_CurveAndTrihedron.hxx b/src/GeomFill/GeomFill_CurveAndTrihedron.hxx index c035a47b6a..c2d4a74aea 100644 --- a/src/GeomFill/GeomFill_CurveAndTrihedron.hxx +++ b/src/GeomFill/GeomFill_CurveAndTrihedron.hxx @@ -52,7 +52,9 @@ public: Standard_EXPORT GeomFill_CurveAndTrihedron(const Handle(GeomFill_TrihedronLaw)& Trihedron); - Standard_EXPORT virtual void SetCurve (const Handle(Adaptor3d_Curve)& C) Standard_OVERRIDE; + //! initialize curve of trihedron law + //! @return Standard_True in case if execution end correctly + Standard_EXPORT virtual Standard_Boolean SetCurve (const Handle(Adaptor3d_Curve)& C) Standard_OVERRIDE; Standard_EXPORT virtual const Handle(Adaptor3d_Curve)& GetCurve() const Standard_OVERRIDE; diff --git a/src/GeomFill/GeomFill_DiscreteTrihedron.cxx b/src/GeomFill/GeomFill_DiscreteTrihedron.cxx index 50f80df654..129aa83e0b 100755 --- a/src/GeomFill/GeomFill_DiscreteTrihedron.cxx +++ b/src/GeomFill/GeomFill_DiscreteTrihedron.cxx @@ -61,33 +61,36 @@ Handle(GeomFill_TrihedronLaw) GeomFill_DiscreteTrihedron::Copy() const //purpose : //======================================================================= -void GeomFill_DiscreteTrihedron::SetCurve(const Handle(Adaptor3d_Curve)& C) +Standard_Boolean GeomFill_DiscreteTrihedron::SetCurve(const Handle(Adaptor3d_Curve)& C) { GeomFill_TrihedronLaw::SetCurve(C); - if (! C.IsNull()) { + if (! C.IsNull()) + { GeomAbs_CurveType type; type = C->GetType(); - switch (type) { + switch (type) + { case GeomAbs_Circle: case GeomAbs_Ellipse: case GeomAbs_Hyperbola: case GeomAbs_Parabola: case GeomAbs_Line: - { - // No problem - myUseFrenet = Standard_True; - myFrenet->SetCurve(C); - break; - } + { + // No problem + myUseFrenet = Standard_True; + myFrenet->SetCurve(C); + break; + } default : - { - myUseFrenet = Standard_False; - // We have to fill and - Init(); - break; - } + { + myUseFrenet = Standard_False; + // We have to fill and + Init(); + break; + } } } + return myUseFrenet; } //======================================================================= diff --git a/src/GeomFill/GeomFill_DiscreteTrihedron.hxx b/src/GeomFill/GeomFill_DiscreteTrihedron.hxx index 2c19b64260..54c4785687 100644 --- a/src/GeomFill/GeomFill_DiscreteTrihedron.hxx +++ b/src/GeomFill/GeomFill_DiscreteTrihedron.hxx @@ -51,7 +51,9 @@ public: Standard_EXPORT void Init(); - Standard_EXPORT virtual void SetCurve (const Handle(Adaptor3d_Curve)& C) Standard_OVERRIDE; + //! initialize curve of trihedron law + //! @return Standard_True in case if execution end correctly + Standard_EXPORT virtual Standard_Boolean SetCurve (const Handle(Adaptor3d_Curve)& C) Standard_OVERRIDE; //! compute Trihedron on curve at parameter Standard_EXPORT virtual Standard_Boolean D0 (const Standard_Real Param, gp_Vec& Tangent, gp_Vec& Normal, gp_Vec& BiNormal) Standard_OVERRIDE; diff --git a/src/GeomFill/GeomFill_Frenet.cxx b/src/GeomFill/GeomFill_Frenet.cxx index a541ddcf34..7f7af57828 100644 --- a/src/GeomFill/GeomFill_Frenet.cxx +++ b/src/GeomFill/GeomFill_Frenet.cxx @@ -117,7 +117,7 @@ Handle(GeomFill_TrihedronLaw) GeomFill_Frenet::Copy() const //purpose : //======================================================================= - void GeomFill_Frenet::SetCurve(const Handle(Adaptor3d_Curve)& C) +Standard_Boolean GeomFill_Frenet::SetCurve(const Handle(Adaptor3d_Curve)& C) { GeomFill_TrihedronLaw::SetCurve(C); if (! C.IsNull()) { @@ -141,6 +141,7 @@ Handle(GeomFill_TrihedronLaw) GeomFill_Frenet::Copy() const } } } + return Standard_True; } //======================================================================= diff --git a/src/GeomFill/GeomFill_Frenet.hxx b/src/GeomFill/GeomFill_Frenet.hxx index 45560697b7..b87b8ed937 100644 --- a/src/GeomFill/GeomFill_Frenet.hxx +++ b/src/GeomFill/GeomFill_Frenet.hxx @@ -47,7 +47,9 @@ public: Standard_EXPORT void Init(); - Standard_EXPORT virtual void SetCurve (const Handle(Adaptor3d_Curve)& C) Standard_OVERRIDE; + //! initialize curve of frenet law + //! @return Standard_True + Standard_EXPORT virtual Standard_Boolean SetCurve (const Handle(Adaptor3d_Curve)& C) Standard_OVERRIDE; //! compute Triedrhon on curve at parameter Standard_EXPORT virtual Standard_Boolean D0 (const Standard_Real Param, gp_Vec& Tangent, gp_Vec& Normal, gp_Vec& BiNormal) Standard_OVERRIDE; diff --git a/src/GeomFill/GeomFill_GuideTrihedronAC.cxx b/src/GeomFill/GeomFill_GuideTrihedronAC.cxx index 909bee101b..f5c4cd054d 100644 --- a/src/GeomFill/GeomFill_GuideTrihedronAC.cxx +++ b/src/GeomFill/GeomFill_GuideTrihedronAC.cxx @@ -292,7 +292,7 @@ GeomFill_GuideTrihedronAC::GeomFill_GuideTrihedronAC(const Handle(Adaptor3d_Curv //function : SetCurve //purpose : //======================================================================= - void GeomFill_GuideTrihedronAC::SetCurve(const Handle(Adaptor3d_Curve)& C) + Standard_Boolean GeomFill_GuideTrihedronAC::SetCurve(const Handle(Adaptor3d_Curve)& C) { myCurve = C; myTrimmed = C; @@ -301,6 +301,7 @@ GeomFill_GuideTrihedronAC::GeomFill_GuideTrihedronAC(const Handle(Adaptor3d_Curv L = myCurveAC->GetLength(); // CorrectOrient(myGuide); } + return Standard_True; } diff --git a/src/GeomFill/GeomFill_GuideTrihedronAC.hxx b/src/GeomFill/GeomFill_GuideTrihedronAC.hxx index b9a66f6e05..be3e8957c4 100644 --- a/src/GeomFill/GeomFill_GuideTrihedronAC.hxx +++ b/src/GeomFill/GeomFill_GuideTrihedronAC.hxx @@ -44,7 +44,9 @@ public: Standard_EXPORT GeomFill_GuideTrihedronAC(const Handle(Adaptor3d_Curve)& guide); - Standard_EXPORT virtual void SetCurve (const Handle(Adaptor3d_Curve)& C) Standard_OVERRIDE; + //! initialize curve of trihedron law + //! @return Standard_True + Standard_EXPORT virtual Standard_Boolean SetCurve (const Handle(Adaptor3d_Curve)& C) Standard_OVERRIDE; Standard_EXPORT virtual Handle(GeomFill_TrihedronLaw) Copy() const Standard_OVERRIDE; diff --git a/src/GeomFill/GeomFill_GuideTrihedronPlan.cxx b/src/GeomFill/GeomFill_GuideTrihedronPlan.cxx index 2030c32f28..ed8458a869 100644 --- a/src/GeomFill/GeomFill_GuideTrihedronPlan.cxx +++ b/src/GeomFill/GeomFill_GuideTrihedronPlan.cxx @@ -197,10 +197,11 @@ GeomFill_GuideTrihedronPlan::GeomFill_GuideTrihedronPlan (const Handle(Adaptor3d //function : SetCurve //purpose : calculation of trihedron //======================================================================= -void GeomFill_GuideTrihedronPlan::SetCurve(const Handle(Adaptor3d_Curve)& C) +Standard_Boolean GeomFill_GuideTrihedronPlan::SetCurve(const Handle(Adaptor3d_Curve)& C) { myCurve = C; if (!myCurve.IsNull()) Init(); + return Standard_True; } //======================================================================= diff --git a/src/GeomFill/GeomFill_GuideTrihedronPlan.hxx b/src/GeomFill/GeomFill_GuideTrihedronPlan.hxx index 7d3577dcba..6a72aad644 100644 --- a/src/GeomFill/GeomFill_GuideTrihedronPlan.hxx +++ b/src/GeomFill/GeomFill_GuideTrihedronPlan.hxx @@ -48,7 +48,9 @@ public: Standard_EXPORT GeomFill_GuideTrihedronPlan(const Handle(Adaptor3d_Curve)& theGuide); - Standard_EXPORT virtual void SetCurve (const Handle(Adaptor3d_Curve)& thePath) Standard_OVERRIDE; + //! initialize curve of trihedron law + //! @return Standard_True in case if execution end correctly + Standard_EXPORT virtual Standard_Boolean SetCurve (const Handle(Adaptor3d_Curve)& thePath) Standard_OVERRIDE; Standard_EXPORT virtual Handle(GeomFill_TrihedronLaw) Copy() const Standard_OVERRIDE; diff --git a/src/GeomFill/GeomFill_LocationDraft.cxx b/src/GeomFill/GeomFill_LocationDraft.cxx index b2a874dc26..93fb2d8f93 100644 --- a/src/GeomFill/GeomFill_LocationDraft.cxx +++ b/src/GeomFill/GeomFill_LocationDraft.cxx @@ -105,13 +105,14 @@ GeomFill_LocationDraft::GeomFill_LocationDraft //Purpose : Calcul des poles sur la surfaces d'arret (intersection // entre la generatrice et la surface en myNbPts points de la section) //================================================================== - void GeomFill_LocationDraft::SetCurve(const Handle(Adaptor3d_Curve)& C) + Standard_Boolean GeomFill_LocationDraft::SetCurve(const Handle(Adaptor3d_Curve)& C) { myCurve = C; myTrimmed = C; - myLaw->SetCurve(C); + Standard_Boolean isOK = myLaw->SetCurve(C); Prepare(); + return isOK; } //================================================================== diff --git a/src/GeomFill/GeomFill_LocationDraft.hxx b/src/GeomFill/GeomFill_LocationDraft.hxx index 7a1afa8439..d8fea7cdac 100644 --- a/src/GeomFill/GeomFill_LocationDraft.hxx +++ b/src/GeomFill/GeomFill_LocationDraft.hxx @@ -46,7 +46,9 @@ public: Standard_EXPORT void SetAngle (const Standard_Real Angle); - Standard_EXPORT virtual void SetCurve (const Handle(Adaptor3d_Curve)& C) Standard_OVERRIDE; + //! calculation of poles on locking surfaces (the intersection between the generatrixand the surface at the cross - section points myNbPts) + //! @return Standard_True in case if execution end correctly + Standard_EXPORT virtual Standard_Boolean SetCurve (const Handle(Adaptor3d_Curve)& C) Standard_OVERRIDE; Standard_EXPORT virtual const Handle(Adaptor3d_Curve)& GetCurve() const Standard_OVERRIDE; diff --git a/src/GeomFill/GeomFill_LocationGuide.cxx b/src/GeomFill/GeomFill_LocationGuide.cxx index 17c2aca807..23d29741b8 100644 --- a/src/GeomFill/GeomFill_LocationGuide.cxx +++ b/src/GeomFill/GeomFill_LocationGuide.cxx @@ -537,7 +537,7 @@ static void InGoodPeriod(const Standard_Real Prec, //Purpose : Calcul des poles sur la surface d'arret (intersection // courbe guide / surface de revolution en myNbPts points) //================================================================== - void GeomFill_LocationGuide::SetCurve(const Handle(Adaptor3d_Curve)& C) +Standard_Boolean GeomFill_LocationGuide::SetCurve(const Handle(Adaptor3d_Curve)& C) { Standard_Real LastAngle; myCurve = C; @@ -550,6 +550,7 @@ static void InGoodPeriod(const Standard_Real Prec, if (rotation) SetRotation(myPoles2d->Value(1,1).X(), LastAngle); } + return myStatus == GeomFill_PipeOk; } //================================================================== diff --git a/src/GeomFill/GeomFill_LocationGuide.hxx b/src/GeomFill/GeomFill_LocationGuide.hxx index 12a7a47850..ea2c23c210 100644 --- a/src/GeomFill/GeomFill_LocationGuide.hxx +++ b/src/GeomFill/GeomFill_LocationGuide.hxx @@ -56,7 +56,9 @@ public: Standard_EXPORT void EraseRotation(); - Standard_EXPORT virtual void SetCurve (const Handle(Adaptor3d_Curve)& C) Standard_OVERRIDE; + //! calculating poles on a surface (courbe guide / the surface of rotation in points myNbPts) + //! @return Standard_True + Standard_EXPORT virtual Standard_Boolean SetCurve (const Handle(Adaptor3d_Curve)& C) Standard_OVERRIDE; Standard_EXPORT virtual const Handle(Adaptor3d_Curve)& GetCurve() const Standard_OVERRIDE; diff --git a/src/GeomFill/GeomFill_LocationLaw.hxx b/src/GeomFill/GeomFill_LocationLaw.hxx index 38f020a9cd..b10cda48de 100644 --- a/src/GeomFill/GeomFill_LocationLaw.hxx +++ b/src/GeomFill/GeomFill_LocationLaw.hxx @@ -38,9 +38,8 @@ class GeomFill_LocationLaw : public Standard_Transient { public: - - - Standard_EXPORT virtual void SetCurve (const Handle(Adaptor3d_Curve)& C) = 0; + //! initialize curve of location law + Standard_EXPORT virtual Standard_Boolean SetCurve (const Handle(Adaptor3d_Curve)& C) = 0; Standard_EXPORT virtual const Handle(Adaptor3d_Curve)& GetCurve() const = 0; diff --git a/src/GeomFill/GeomFill_Pipe.cxx b/src/GeomFill/GeomFill_Pipe.cxx index 6a25780047..bd7c1e16b9 100644 --- a/src/GeomFill/GeomFill_Pipe.cxx +++ b/src/GeomFill/GeomFill_Pipe.cxx @@ -205,7 +205,7 @@ static Standard_Boolean CheckSense(const TColGeom_SequenceOfCurve& Seq1, //purpose : constructor with no parameters. //======================================================================= -GeomFill_Pipe::GeomFill_Pipe() : myIsDone(Standard_False),myExchUV(Standard_False),myKPart(Standard_False) +GeomFill_Pipe::GeomFill_Pipe() : myStatus(GeomFill_PipeNotOk), myExchUV(Standard_False),myKPart(Standard_False) { Init(); } @@ -218,7 +218,7 @@ GeomFill_Pipe::GeomFill_Pipe() : myIsDone(Standard_False),myExchUV(Standard_Fals GeomFill_Pipe::GeomFill_Pipe(const Handle(Geom_Curve)& Path, const Standard_Real Radius) - : myIsDone(Standard_False),myExchUV(Standard_False),myKPart(Standard_False) + : myStatus(GeomFill_PipeNotOk), myExchUV(Standard_False),myKPart(Standard_False) { Init(); Init(Path, Radius); @@ -232,7 +232,7 @@ GeomFill_Pipe::GeomFill_Pipe(const Handle(Geom_Curve)& Path, GeomFill_Pipe::GeomFill_Pipe(const Handle(Geom_Curve)& Path, const Handle(Geom_Curve)& FirstSect, const GeomFill_Trihedron Option) - : myIsDone(Standard_False),myExchUV(Standard_False),myKPart(Standard_False) + : myStatus(GeomFill_PipeNotOk), myExchUV(Standard_False),myKPart(Standard_False) { Init(); Init(Path, FirstSect, Option); @@ -246,7 +246,7 @@ GeomFill_Pipe::GeomFill_Pipe(const Handle(Geom_Curve)& Path, GeomFill_Pipe::GeomFill_Pipe(const Handle(Geom2d_Curve)& Path, const Handle(Geom_Surface)& Support, const Handle(Geom_Curve)& FirstSect) - : myIsDone(Standard_False),myExchUV(Standard_False),myKPart(Standard_False) + : myStatus(GeomFill_PipeNotOk), myExchUV(Standard_False),myKPart(Standard_False) { Init(); Init(Path, Support, FirstSect); @@ -260,7 +260,7 @@ GeomFill_Pipe::GeomFill_Pipe(const Handle(Geom2d_Curve)& Path, GeomFill_Pipe::GeomFill_Pipe(const Handle(Geom_Curve)& Path, const Handle(Geom_Curve)& FirstSect, const Handle(Geom_Curve)& LastSect) - : myIsDone(Standard_False),myExchUV(Standard_False),myKPart(Standard_False) + : myStatus(GeomFill_PipeNotOk), myExchUV(Standard_False),myKPart(Standard_False) { Init(); Init(Path, FirstSect, LastSect); @@ -274,7 +274,7 @@ GeomFill_Pipe::GeomFill_Pipe(const Handle(Geom_Curve)& Path, GeomFill_Pipe::GeomFill_Pipe(const Handle(Geom_Curve)& Path, const TColGeom_SequenceOfCurve& NSections) - : myIsDone(Standard_False),myExchUV(Standard_False),myKPart(Standard_False) + : myStatus(GeomFill_PipeNotOk), myExchUV(Standard_False),myKPart(Standard_False) { Init(); Init(Path, NSections); @@ -288,7 +288,7 @@ GeomFill_Pipe::GeomFill_Pipe(const Handle(Geom_Curve)& Path, GeomFill_Pipe::GeomFill_Pipe(const Handle(Geom_Curve)& Path, const Handle(Geom_Curve)& Curve1, const gp_Dir& Direction) - : myIsDone(Standard_False),myExchUV(Standard_False), myKPart(Standard_False) + : myStatus(GeomFill_PipeNotOk), myExchUV(Standard_False), myKPart(Standard_False) { Init(Path, Curve1, Direction); } @@ -301,7 +301,7 @@ GeomFill_Pipe::GeomFill_Pipe(const Handle(Geom_Curve)& Path, const Handle(Geom_Curve)& Curve1, const Handle(Geom_Curve)& Curve2, const Standard_Real Radius) - : myIsDone(Standard_False),myExchUV(Standard_False),myKPart(Standard_False) + : myStatus(GeomFill_PipeNotOk), myExchUV(Standard_False),myKPart(Standard_False) { Init(); Handle(GeomAdaptor_Curve) AdpPath = @@ -324,7 +324,7 @@ GeomFill_Pipe::GeomFill_Pipe(const Handle(Adaptor3d_Curve)& Path, const Handle(Adaptor3d_Curve)& Curve1, const Handle(Adaptor3d_Curve)& Curve2, const Standard_Real Radius) - : myIsDone(Standard_False),myExchUV(Standard_False),myKPart(Standard_False) + : myStatus(GeomFill_PipeNotOk), myExchUV(Standard_False),myKPart(Standard_False) { Init(); Init(Path,Curve1,Curve2,Radius); @@ -344,7 +344,7 @@ GeomFill_Pipe::GeomFill_Pipe(const Handle(Geom_Curve)& Path, const Handle(Geom_Curve)& FirstSect, const Standard_Boolean byACR, const Standard_Boolean rotat) - : myIsDone(Standard_False),myExchUV(Standard_False),myKPart(Standard_False) + : myStatus(GeomFill_PipeNotOk), myExchUV(Standard_False),myKPart(Standard_False) // Path : trajectoire // Guide : courbe guide // FirstSect : section @@ -751,31 +751,37 @@ void GeomFill_Pipe::Init(const Handle(Geom_Curve)& Path, if (!TLaw.IsNull()) { myLoc = new (GeomFill_CurveAndTrihedron) (TLaw); - myLoc->SetCurve(myAdpPath); - TColGeom_SequenceOfCurve SeqC; - TColStd_SequenceOfReal SeqP; - SeqC.Clear(); - SeqP.Clear(); - // sequence des sections - GeomFill_SectionPlacement Pl1(myLoc, FirstSect); - Pl1.Perform(first,Precision::Confusion()); - SeqC.Append(Pl1.Section(Standard_False)); - GeomFill_SectionPlacement Pl2(myLoc, LastSect); - Pl2.Perform(first,Precision::Confusion()); - SeqC.Append(Pl2.Section(Standard_False)); - // sequence des parametres associes - SeqP.Append(first); - SeqP.Append(last); - - // verification de l'orientation - TColGeom_SequenceOfCurve NewSeq; - if (CheckSense(SeqC,NewSeq)) SeqC = NewSeq; - // creation de la NSections - Standard_Real deb,fin; - deb = SeqC.First()->FirstParameter(); - fin = SeqC.First()->LastParameter(); - mySec = new (GeomFill_NSections) (SeqC,SeqP,deb,fin,first,last); + if (!(myLoc->SetCurve(myAdpPath))) + { + myStatus = GeomFill_ImpossibleContact; + return; + } + + TColGeom_SequenceOfCurve SeqC; + TColStd_SequenceOfReal SeqP; + SeqC.Clear(); + SeqP.Clear(); + // sequence of sections + GeomFill_SectionPlacement Pl1(myLoc, FirstSect); + Pl1.Perform(first, Precision::Confusion()); + SeqC.Append(Pl1.Section(Standard_False)); + GeomFill_SectionPlacement Pl2(myLoc, LastSect); + Pl2.Perform(first, Precision::Confusion()); + SeqC.Append(Pl2.Section(Standard_False)); + // sequence of associated parameters + SeqP.Append(first); + SeqP.Append(last); + + // orientation verification + TColGeom_SequenceOfCurve NewSeq; + if (CheckSense(SeqC, NewSeq)) SeqC = NewSeq; + + // creation of the NSections + Standard_Real deb, fin; + deb = SeqC.First()->FirstParameter(); + fin = SeqC.First()->LastParameter(); + mySec = new (GeomFill_NSections) (SeqC, SeqP, deb, fin, first, last); } } @@ -831,6 +837,11 @@ void GeomFill_Pipe::Perform(const Standard_Real Tol, const Standard_Integer DegMax, const Standard_Integer NbMaxSegment) { + if (myStatus == GeomFill_ImpossibleContact) + { + return; + } + GeomAbs_Shape TheConti; switch (Conti) { case GeomAbs_C0: @@ -884,7 +895,7 @@ void GeomFill_Pipe::Perform(const Standard_Real Tol, App.UDegree(), App.VDegree()); myError = App.MaxErrorOnSurf(); - myIsDone = Standard_True; + myStatus = GeomFill_PipeOk; } //else { // throw Standard_ConstructionError("GeomFill_Pipe::Perform : Cannot make a surface"); @@ -898,7 +909,7 @@ void GeomFill_Pipe::Perform(const Standard_Real Tol, if (Sweep.IsDone()) { mySurface = Sweep.Surface(); myError = Sweep.ErrorOnSurface(); - myIsDone = Standard_True; + myStatus = GeomFill_PipeOk; } //else { // throw Standard_ConstructionError("GeomFill_Pipe::Perform : Cannot make a surface"); @@ -975,7 +986,7 @@ Standard_Boolean GeomFill_Pipe::KPartT4() myAdpPath->FirstParameter(), myAdpPath->LastParameter()); Ok = Standard_True; //C'est bien un cylindre - myIsDone = Standard_True; + myStatus = GeomFill_PipeOk; } // ----------- Cas du tore ---------------------------------- else if (myAdpPath->GetType() == GeomAbs_Circle && @@ -1038,7 +1049,7 @@ Standard_Boolean GeomFill_Pipe::KPartT4() myAdpPath->FirstParameter(),myAdpPath->LastParameter(),VV1,VV2); myExchUV = Standard_True; Ok = Standard_True; - myIsDone = Standard_True; + myStatus = GeomFill_PipeOk; } return Ok; @@ -1137,6 +1148,6 @@ void GeomFill_Pipe::ApproxSurf(const Standard_Boolean WithParameters) { App.VDegree()); Standard_Real t2d; App.TolReached(myError, t2d); - myIsDone = Standard_True; + myStatus = GeomFill_PipeOk; } } diff --git a/src/GeomFill/GeomFill_Pipe.hxx b/src/GeomFill/GeomFill_Pipe.hxx index 0679fe099b..4a88b3e168 100644 --- a/src/GeomFill/GeomFill_Pipe.hxx +++ b/src/GeomFill/GeomFill_Pipe.hxx @@ -21,6 +21,7 @@ #include #include #include +#include class Geom_Surface; class GeomFill_LocationLaw; @@ -249,7 +250,11 @@ public: //! Returns whether approximation was done. Standard_Boolean IsDone() const; - + //! Returns execution status + GeomFill_PipeError GetStatus() const + { + return myStatus; + } protected: @@ -271,8 +276,7 @@ private: Standard_EXPORT Standard_Boolean KPartT4(); - - Standard_Boolean myIsDone; + GeomFill_PipeError myStatus;//!< Execution status Standard_Real myRadius; Standard_Real myError; Handle(Adaptor3d_Curve) myAdpPath; @@ -285,8 +289,6 @@ private: Standard_Boolean myExchUV; Standard_Boolean myKPart; Standard_Boolean myPolynomial; - - }; diff --git a/src/GeomFill/GeomFill_Pipe.lxx b/src/GeomFill/GeomFill_Pipe.lxx index 1344d09a2f..07cd0fa9b4 100644 --- a/src/GeomFill/GeomFill_Pipe.lxx +++ b/src/GeomFill/GeomFill_Pipe.lxx @@ -70,6 +70,5 @@ inline Standard_Real GeomFill_Pipe::ErrorOnSurf() const //======================================================================= inline Standard_Boolean GeomFill_Pipe::IsDone() const { - return myIsDone; + return myStatus == GeomFill_PipeOk; } - diff --git a/src/GeomFill/GeomFill_TrihedronLaw.cxx b/src/GeomFill/GeomFill_TrihedronLaw.cxx index 1a62448f68..853e513e37 100644 --- a/src/GeomFill/GeomFill_TrihedronLaw.cxx +++ b/src/GeomFill/GeomFill_TrihedronLaw.cxx @@ -24,10 +24,11 @@ IMPLEMENT_STANDARD_RTTIEXT(GeomFill_TrihedronLaw,Standard_Transient) -void GeomFill_TrihedronLaw::SetCurve(const Handle(Adaptor3d_Curve)& C) +Standard_Boolean GeomFill_TrihedronLaw::SetCurve(const Handle(Adaptor3d_Curve)& C) { myCurve = C; myTrimmed = myCurve; + return Standard_True; } //================================================================== diff --git a/src/GeomFill/GeomFill_TrihedronLaw.hxx b/src/GeomFill/GeomFill_TrihedronLaw.hxx index 2e9972743a..87e59f3da7 100644 --- a/src/GeomFill/GeomFill_TrihedronLaw.hxx +++ b/src/GeomFill/GeomFill_TrihedronLaw.hxx @@ -34,8 +34,9 @@ class GeomFill_TrihedronLaw : public Standard_Transient public: - - Standard_EXPORT virtual void SetCurve (const Handle(Adaptor3d_Curve)& C); + //! initialize curve of trihedron law + //! @return Standard_True + Standard_EXPORT virtual Standard_Boolean SetCurve (const Handle(Adaptor3d_Curve)& C); Standard_EXPORT virtual Handle(GeomFill_TrihedronLaw) Copy() const = 0; diff --git a/src/GeometryTest/GeometryTest_SurfaceCommands.cxx b/src/GeometryTest/GeometryTest_SurfaceCommands.cxx index 5415293acc..766031a3eb 100644 --- a/src/GeometryTest/GeometryTest_SurfaceCommands.cxx +++ b/src/GeometryTest/GeometryTest_SurfaceCommands.cxx @@ -237,8 +237,8 @@ static Standard_Integer tuyau (Draw_Interpretor& di, Pipe.Perform(1.e-4, Standard_False, Cont); if (!Pipe.IsDone()) { - di << "GeomFill_Pipe cannot make a surface\n"; - return 1; + di << "Error: GeomFill_Pipe cannot make a surface\n"; + return 0; } Standard_Real Accuracy = Pipe.ErrorOnSurf(); diff --git a/tests/bugs/modalg_7/bug31361 b/tests/bugs/modalg_7/bug31361 new file mode 100644 index 0000000000..4a143b7cc2 --- /dev/null +++ b/tests/bugs/modalg_7/bug31361 @@ -0,0 +1,11 @@ +puts "=================================================" +puts "0031361: Modeling algorithms - A crash arise when building tube" +puts "=================================================" +puts "" + +puts "REQUIRED ALL: Error: GeomFill_Pipe cannot make a surface" + +circle c1 0 0 0 10 +circle c2 0 100 0 10 +beziercurve curve 4 0 0 0 100 0 0 100 100 0 0 100 0 +tuyau t curve c1 c2 From fe12f15cb498db130c72aeaf0dbb688c3b0abb2f Mon Sep 17 00:00:00 2001 From: AndreyLA Date: Thu, 24 Mar 2022 17:36:11 +0300 Subject: [PATCH 247/639] 0024657: 2dintersect returns different number of intersect points in curve intersecting the polygon points is never replaced by line Test for 2d intersection is added --- tests/bugs/modalg_5/bug24657 | 45 ++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 tests/bugs/modalg_5/bug24657 diff --git a/tests/bugs/modalg_5/bug24657 b/tests/bugs/modalg_5/bug24657 new file mode 100644 index 0000000000..fba2aa6452 --- /dev/null +++ b/tests/bugs/modalg_5/bug24657 @@ -0,0 +1,45 @@ +puts "============" +puts "0024657: 2dintersect returns different number of intersect points" +puts "===========" +puts "" + +restore [locate_data_file bug24657.brep] a + +explode a e + +# Initialize two 2d pcurves +pcurve p4 a_4 a +pcurve p5 a_5 a + +# Recieve an output strings of the intersection operation +set inter1 [2dintersect p4 p5 -tol 1.e-7] +set inter2 [2dintersect p5 p4 -tol 1.e-7] + +# Check if the number of intersections is equal to 1 +set int1 [regexp -all {Intersection point} ${inter1}] +set int2 [regexp -all {Intersection point} ${inter2}] + +if { ${int1} != ${int2} || ${int1} != 1} { + puts "Error : The intersection points number is different!" +} + +# Verify the coordinates of the intersection points +regexp -all {Intersection point 1 : ([-0-9.+eE]+) ([-0-9.+eE]+)} $inter1 full x1 y1 +regexp -all {Intersection point 1 : ([-0-9.+eE]+) ([-0-9.+eE]+)} $inter2 full x2 y2 +if { [expr abs($x1 - $x2)] > 1.e-7 || [expr abs($y1 - $y2) ] > 1.e-7} { + puts "Error : The intersection points do not match!" +} + +regexp -all {parameter on the fist: ([-0-9.+eE]+) parameter on the second: ([-0-9.+eE]+)} $inter1 full par11 par12 +regexp -all {parameter on the fist: ([-0-9.+eE]+) parameter on the second: ([-0-9.+eE]+)} $inter2 full par21 par22 + +if { [expr abs($par11 - $par22)] > 1.e-7 || [expr abs($par21 - $par12) ] > 1.e-7} { + puts "Error : The intersection points parameters do not match!" +} + +#v2d2 +view 1 -2D- 728 20 400 400 + +2dfit + +xwd ${imagedir}/${test_image}.png From ad3825f82153789430b34da3b7fcda1b242edc20 Mon Sep 17 00:00:00 2001 From: azv Date: Tue, 5 Apr 2022 08:55:29 +0300 Subject: [PATCH 248/639] 0030160: DBRep_IsoBuilder builds wrong isolines for planar faces Add test case --- tests/bugs/grids.list | 23 ++++++++++++----------- tests/bugs/modalg_8/bug30160 | 19 +++++++++++++++++++ 2 files changed, 31 insertions(+), 11 deletions(-) create mode 100644 tests/bugs/modalg_8/bug30160 diff --git a/tests/bugs/grids.list b/tests/bugs/grids.list index beba144d4a..ffe5f34afc 100755 --- a/tests/bugs/grids.list +++ b/tests/bugs/grids.list @@ -9,14 +9,15 @@ 009 modalg_5 010 modalg_6 011 modalg_7 -012 moddata_1 -013 moddata_2 -014 moddata_3 -015 step -016 caf -017 mesh -018 heal -019 stlvrml -020 splitshape -021 splitshape_1 -022 filling +012 modalg_8 +013 moddata_1 +014 moddata_2 +015 moddata_3 +016 step +017 caf +018 mesh +019 heal +020 stlvrml +021 splitshape +022 splitshape_1 +023 filling diff --git a/tests/bugs/modalg_8/bug30160 b/tests/bugs/modalg_8/bug30160 new file mode 100644 index 0000000000..0b1813c25b --- /dev/null +++ b/tests/bugs/modalg_8/bug30160 @@ -0,0 +1,19 @@ +puts "=================================================" +puts "0030160: DBRep_IsoBuilder builds wrong isolines for planar faces" +puts "=================================================" +puts "" + +restore [locate_data_file OCC1477_bsplinewire_c0.brep] sp +restore [locate_data_file OCC1477_profile1_circle.brep] pr +wire pr pr + +mksweep sp +addsweep pr -T -R +buildsweep res -R -S +checkshape res + +explode res f +renamevar res_4 result +isos result 50 +checkprops result -s 208.267 +checkview -display result -2d -path ${imagedir}/${test_image}.png From 5078d0d84e453836e006d7ffdfe23f29af09d266 Mon Sep 17 00:00:00 2001 From: kgv Date: Wed, 6 Apr 2022 01:26:00 +0300 Subject: [PATCH 249/639] 0032912: Visualization - crash when displaying an OBJ file with missing texture file Fix NULL dereference within Graphic3d_TextureRoot::convertToCompatible() due to wrong order of checks. --- src/Graphic3d/Graphic3d_TextureRoot.cxx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Graphic3d/Graphic3d_TextureRoot.cxx b/src/Graphic3d/Graphic3d_TextureRoot.cxx index 027a5ebe4e..3595871c03 100644 --- a/src/Graphic3d/Graphic3d_TextureRoot.cxx +++ b/src/Graphic3d/Graphic3d_TextureRoot.cxx @@ -216,9 +216,9 @@ Handle(Image_PixMap) Graphic3d_TextureRoot::GetImage (const Handle(Image_Support void Graphic3d_TextureRoot::convertToCompatible (const Handle(Image_SupportedFormats)& theSupported, const Handle(Image_PixMap)& theImage) { - if (theSupported.IsNull() - || theSupported->IsSupported (theImage->Format()) - || theImage.IsNull()) + if (theImage.IsNull() + || theSupported.IsNull() + || theSupported->IsSupported (theImage->Format())) { return; } From a793b75e21053455300fd711b1c4487480adc918 Mon Sep 17 00:00:00 2001 From: azv Date: Wed, 6 Apr 2022 22:49:01 +0300 Subject: [PATCH 250/639] 0032809: Sweep algorithm with Round Corner mode failed Fix indentation within GeomFill_Sweep.cxx 0032809: Sweep algorithm with Round Corner mode failed Add fix what repair shipping at corner after circle edge at path Add fix test for bug 24909_3 --- src/BRepFill/BRepFill_Sweep.cxx | 6 +- src/GeomFill/GeomFill_Sweep.cxx | 1031 +++++++++++++++---------------- tests/pipe/bugs/bug24909_3 | 8 +- tests/pipe/bugs/bug32809 | 16 + tests/pipe/bugs/end | 1 + 5 files changed, 540 insertions(+), 522 deletions(-) create mode 100644 tests/pipe/bugs/bug32809 create mode 100644 tests/pipe/bugs/end diff --git a/src/BRepFill/BRepFill_Sweep.cxx b/src/BRepFill/BRepFill_Sweep.cxx index d26a35f807..a74fdfc452 100644 --- a/src/BRepFill/BRepFill_Sweep.cxx +++ b/src/BRepFill/BRepFill_Sweep.cxx @@ -861,7 +861,8 @@ static Standard_Boolean Filling(const TopoDS_Shape& EF, Prof2 = BRep_Tool::Curve(E2, f2, l2); // Indeed, both Prof1 and Prof2 are the same curves but in different positions - + // Prof1's param domain may equals to Prof2's param domain *(-1), which means EF.Orientation() == EL.Orientation() + Standard_Boolean bSameCurveDomain = EF.Orientation() != EL.Orientation(); gp_Pnt P1, P2, P; // Choose the angle of opening @@ -887,7 +888,8 @@ static Standard_Boolean Filling(const TopoDS_Shape& EF, } } - const gp_Pnt aP2 = Prof2->Value(aPrm[aMaxIdx]).Transformed(aTf); + const Standard_Real aPrm2[] = { f2, 0.5*(f2 + l2), l2 }; + const gp_Pnt aP2 = Prof2->Value(aPrm2[bSameCurveDomain ? aMaxIdx : 2 - aMaxIdx]).Transformed(aTf); const gp_Vec2d aV1(aP1[aMaxIdx].Z(), aP1[aMaxIdx].X()); const gp_Vec2d aV2(aP2.Z(), aP2.X()); if (aV1.SquareMagnitude() <= gp::Resolution() || diff --git a/src/GeomFill/GeomFill_Sweep.cxx b/src/GeomFill/GeomFill_Sweep.cxx index 95804f3d26..4336c619b6 100644 --- a/src/GeomFill/GeomFill_Sweep.cxx +++ b/src/GeomFill/GeomFill_Sweep.cxx @@ -76,34 +76,34 @@ //======================================================================= class GeomFill_Sweep_Eval : public AdvApprox_EvaluatorFunction { - public: - GeomFill_Sweep_Eval (GeomFill_LocFunction& theTool) +public: + GeomFill_Sweep_Eval(GeomFill_LocFunction& theTool) : theAncore(theTool) {} - - virtual void Evaluate (Standard_Integer *Dimension, - Standard_Real StartEnd[2], - Standard_Real *Parameter, - Standard_Integer *DerivativeRequest, - Standard_Real *Result, // [Dimension] - Standard_Integer *ErrorCode); - - private: + + virtual void Evaluate(Standard_Integer *Dimension, + Standard_Real StartEnd[2], + Standard_Real *Parameter, + Standard_Integer *DerivativeRequest, + Standard_Real *Result, // [Dimension] + Standard_Integer *ErrorCode); + +private: GeomFill_LocFunction& theAncore; }; -void GeomFill_Sweep_Eval::Evaluate (Standard_Integer *,/*Dimension*/ - Standard_Real StartEnd[2], - Standard_Real *Parameter, - Standard_Integer *DerivativeRequest, - Standard_Real *Result,// [Dimension] - Standard_Integer *ErrorCode) +void GeomFill_Sweep_Eval::Evaluate(Standard_Integer *,/*Dimension*/ + Standard_Real StartEnd[2], + Standard_Real *Parameter, + Standard_Integer *DerivativeRequest, + Standard_Real *Result,// [Dimension] + Standard_Integer *ErrorCode) { - theAncore.DN (*Parameter, - StartEnd[0], - StartEnd[1], - *DerivativeRequest, - Result[0], - ErrorCode[0]); + theAncore.DN(*Parameter, + StartEnd[0], + StartEnd[1], + *DerivativeRequest, + Result[0], + ErrorCode[0]); } //=============================================================== @@ -111,12 +111,12 @@ void GeomFill_Sweep_Eval::Evaluate (Standard_Integer *,/*Dimension*/ // Purpose : //=============================================================== GeomFill_Sweep::GeomFill_Sweep(const Handle(GeomFill_LocationLaw)& Location, - const Standard_Boolean WithKpart) + const Standard_Boolean WithKpart) { done = Standard_False; - myLoc = Location; - myKPart = WithKpart; + myLoc = Location; + myKPart = WithKpart; SetTolerance(1.e-4); myForceApproxC1 = Standard_False; @@ -129,13 +129,13 @@ GeomFill_Sweep::GeomFill_Sweep(const Handle(GeomFill_LocationLaw)& Location, // Function : SetDomain // Purpose : //=============================================================== - void GeomFill_Sweep::SetDomain(const Standard_Real LocFirst, - const Standard_Real LocLast, - const Standard_Real SectionFirst, - const Standard_Real SectionLast) +void GeomFill_Sweep::SetDomain(const Standard_Real LocFirst, + const Standard_Real LocLast, + const Standard_Real SectionFirst, + const Standard_Real SectionLast) { First = LocFirst; - Last = LocLast; + Last = LocLast; SFirst = SectionFirst; SLast = SectionLast; } @@ -144,14 +144,14 @@ GeomFill_Sweep::GeomFill_Sweep(const Handle(GeomFill_LocationLaw)& Location, // Function : SetTolerance // Purpose : //=============================================================== - void GeomFill_Sweep::SetTolerance(const Standard_Real Tolerance3d, - const Standard_Real BoundTolerance, - const Standard_Real Tolerance2d, - const Standard_Real ToleranceAngular) +void GeomFill_Sweep::SetTolerance(const Standard_Real Tolerance3d, + const Standard_Real BoundTolerance, + const Standard_Real Tolerance2d, + const Standard_Real ToleranceAngular) { Tol3d = Tolerance3d; BoundTol = BoundTolerance; - Tol2d =Tolerance2d; + Tol2d = Tolerance2d; TolAngular = ToleranceAngular; } @@ -161,7 +161,7 @@ GeomFill_Sweep::GeomFill_Sweep(const Handle(GeomFill_LocationLaw)& Location, // a C1-continuous surface if a swept surface proved // to be C0. //======================================================================= - void GeomFill_Sweep::SetForceApproxC1(const Standard_Boolean ForceApproxC1) +void GeomFill_Sweep::SetForceApproxC1(const Standard_Boolean ForceApproxC1) { myForceApproxC1 = ForceApproxC1; } @@ -171,7 +171,7 @@ GeomFill_Sweep::GeomFill_Sweep(const Handle(GeomFill_LocationLaw)& Location, // Function : ExchangeUV // Purpose : //=============================================================== - Standard_Boolean GeomFill_Sweep::ExchangeUV() const +Standard_Boolean GeomFill_Sweep::ExchangeUV() const { return myExchUV; } @@ -180,7 +180,7 @@ GeomFill_Sweep::GeomFill_Sweep(const Handle(GeomFill_LocationLaw)& Location, // Function : UReversed // Purpose : //=============================================================== - Standard_Boolean GeomFill_Sweep::UReversed() const +Standard_Boolean GeomFill_Sweep::UReversed() const { return isUReversed; } @@ -189,7 +189,7 @@ GeomFill_Sweep::GeomFill_Sweep(const Handle(GeomFill_LocationLaw)& Location, // Function : VReversed // Purpose : //=============================================================== - Standard_Boolean GeomFill_Sweep::VReversed() const +Standard_Boolean GeomFill_Sweep::VReversed() const { return isVReversed; } @@ -198,51 +198,51 @@ GeomFill_Sweep::GeomFill_Sweep(const Handle(GeomFill_LocationLaw)& Location, // Function : Build // Purpose : //=============================================================== - void GeomFill_Sweep::Build(const Handle(GeomFill_SectionLaw)& Section, - const GeomFill_ApproxStyle Methode, - const GeomAbs_Shape Continuity, - const Standard_Integer Degmax, - const Standard_Integer Segmax) +void GeomFill_Sweep::Build(const Handle(GeomFill_SectionLaw)& Section, + const GeomFill_ApproxStyle Methode, + const GeomAbs_Shape Continuity, + const Standard_Integer Degmax, + const Standard_Integer Segmax) { // Inits done = Standard_False; myExchUV = Standard_False; isUReversed = isVReversed = Standard_False; - mySec = Section; + mySec = Section; - if ((SFirst == SLast) && (SLast == 30.081996)) { + if ((SFirst == SLast) && (SLast == 30.081996)) { mySec->GetDomain(SFirst, SLast); } - - Standard_Boolean isKPart = Standard_False, - isProduct = Standard_False; - - // Traitement des KPart - if (myKPart) isKPart = BuildKPart(); - - if (!isKPart) - { - myExchUV = Standard_False; - isUReversed = isVReversed = Standard_False; - } - - // Traitement des produits Formelles - if ((!isKPart) && (Methode == GeomFill_Location)) { - Handle(Geom_BSplineSurface) BS; - BS = mySec->BSplineSurface(); - if (! BS.IsNull()) { + + Standard_Boolean isKPart = Standard_False, + isProduct = Standard_False; + + // Traitement des KPart + if (myKPart) isKPart = BuildKPart(); + + if (!isKPart) + { + myExchUV = Standard_False; + isUReversed = isVReversed = Standard_False; + } + + // Traitement des produits Formelles + if ((!isKPart) && (Methode == GeomFill_Location)) { + Handle(Geom_BSplineSurface) BS; + BS = mySec->BSplineSurface(); + if (!BS.IsNull()) { // Approx de la loi // isProduct = BuildProduct(Continuity, Degmax, Segmax); - } - } + } + } - if (isKPart || isProduct) { - // Approx du 2d - done = Build2d(Continuity, Degmax, Segmax); - } + if (isKPart || isProduct) { + // Approx du 2d + done = Build2d(Continuity, Degmax, Segmax); + } else { - // Approx globale - done = BuildAll(Continuity, Degmax, Segmax); + // Approx globale + done = BuildAll(Continuity, Degmax, Segmax); } } @@ -250,12 +250,9 @@ GeomFill_Sweep::GeomFill_Sweep(const Handle(GeomFill_LocationLaw)& Location, // Function ::Build2d // Purpose :A venir... //=============================================================== -// Standard_Boolean GeomFill_Sweep::Build2d(const GeomAbs_Shape Continuity, - Standard_Boolean GeomFill_Sweep::Build2d(const GeomAbs_Shape , -// const Standard_Integer Degmax, - const Standard_Integer , -// const Standard_Integer Segmax) - const Standard_Integer ) +Standard_Boolean GeomFill_Sweep::Build2d(const GeomAbs_Shape, + const Standard_Integer, + const Standard_Integer) { Standard_Boolean Ok = Standard_False; if (myLoc->Nb2dCurves() == 0) { @@ -268,20 +265,20 @@ GeomFill_Sweep::GeomFill_Sweep(const Handle(GeomFill_LocationLaw)& Location, // Function : BuildAll // Purpose : //=============================================================== - Standard_Boolean GeomFill_Sweep::BuildAll(const GeomAbs_Shape Continuity, - const Standard_Integer Degmax, - const Standard_Integer Segmax) +Standard_Boolean GeomFill_Sweep::BuildAll(const GeomAbs_Shape Continuity, + const Standard_Integer Degmax, + const Standard_Integer Segmax) { Standard_Boolean Ok = Standard_False; - Handle(GeomFill_SweepFunction) Func + Handle(GeomFill_SweepFunction) Func = new (GeomFill_SweepFunction) (mySec, myLoc, First, SFirst, - (SLast-SFirst)/(Last-First) ); - Approx_SweepApproximation Approx( Func ); + (SLast - SFirst) / (Last - First)); + Approx_SweepApproximation Approx(Func); - Approx.Perform(First, Last, - Tol3d, BoundTol, Tol2d, TolAngular, - Continuity, Degmax, Segmax); + Approx.Perform(First, Last, + Tol3d, BoundTol, Tol2d, TolAngular, + Continuity, Degmax, Segmax); if (Approx.IsDone()) { Ok = Standard_True; @@ -289,29 +286,29 @@ GeomFill_Sweep::GeomFill_Sweep(const Handle(GeomFill_LocationLaw)& Location, #ifdef OCCT_DEBUG Approx.Dump(std::cout); #endif - + // La surface - Standard_Integer UDegree,VDegree,NbUPoles, - NbVPoles,NbUKnots,NbVKnots; - Approx.SurfShape(UDegree,VDegree,NbUPoles, - NbVPoles,NbUKnots,NbVKnots); - - TColgp_Array2OfPnt Poles(1,NbUPoles, 1,NbVPoles); - TColStd_Array2OfReal Weights(1,NbUPoles, 1,NbVPoles); - TColStd_Array1OfReal UKnots(1, NbUKnots),VKnots(1, NbVKnots); + Standard_Integer UDegree, VDegree, NbUPoles, + NbVPoles, NbUKnots, NbVKnots; + Approx.SurfShape(UDegree, VDegree, NbUPoles, + NbVPoles, NbUKnots, NbVKnots); + + TColgp_Array2OfPnt Poles(1, NbUPoles, 1, NbVPoles); + TColStd_Array2OfReal Weights(1, NbUPoles, 1, NbVPoles); + TColStd_Array1OfReal UKnots(1, NbUKnots), VKnots(1, NbVKnots); TColStd_Array1OfInteger UMults(1, NbUKnots), VMults(1, NbVKnots); Approx.Surface(Poles, Weights, - UKnots,VKnots, - UMults,VMults); + UKnots, VKnots, + UMults, VMults); mySurface = new (Geom_BSplineSurface) (Poles, Weights, - UKnots,VKnots, - UMults,VMults, - Approx.UDegree(), Approx.VDegree(), - mySec->IsUPeriodic()); - SError = Approx. MaxErrorOnSurf(); + UKnots, VKnots, + UMults, VMults, + Approx.UDegree(), Approx.VDegree(), + mySec->IsUPeriodic()); + SError = Approx.MaxErrorOnSurf(); if (myForceApproxC1 && !mySurface->IsCNv(1)) { @@ -319,48 +316,48 @@ GeomFill_Sweep::GeomFill_Sweep(const Handle(GeomFill_LocationLaw)& Location, GeomAbs_Shape theUCont = GeomAbs_C1, theVCont = GeomAbs_C1; Standard_Integer degU = 14, degV = 14; Standard_Integer nmax = 16; - Standard_Integer thePrec = 1; - - GeomConvert_ApproxSurface ConvertApprox(mySurface,theTol,theUCont,theVCont, - degU,degV,nmax,thePrec); + Standard_Integer thePrec = 1; + + GeomConvert_ApproxSurface ConvertApprox(mySurface, theTol, theUCont, theVCont, + degU, degV, nmax, thePrec); if (ConvertApprox.HasResult()) { mySurface = ConvertApprox.Surface(); myCurve2d = new (TColGeom2d_HArray1OfCurve) (1, 2); - CError = new (TColStd_HArray2OfReal) (1,2, 1,2); + CError = new (TColStd_HArray2OfReal) (1, 2, 1, 2); + + Handle(Geom_BSplineSurface) BSplSurf(Handle(Geom_BSplineSurface)::DownCast(mySurface)); - Handle(Geom_BSplineSurface) BSplSurf (Handle(Geom_BSplineSurface)::DownCast(mySurface)); - gp_Dir2d D(0., 1.); gp_Pnt2d P(BSplSurf->UKnot(1), 0); Handle(Geom2d_Line) LC1 = new (Geom2d_Line) (P, D); Handle(Geom2d_TrimmedCurve) TC1 = new (Geom2d_TrimmedCurve) (LC1, 0, BSplSurf->VKnot(BSplSurf->NbVKnots())); - + myCurve2d->SetValue(1, TC1); CError->SetValue(1, 1, 0.); CError->SetValue(2, 1, 0.); - + P.SetCoord(BSplSurf->UKnot(BSplSurf->NbUKnots()), 0); Handle(Geom2d_Line) LC2 = new (Geom2d_Line) (P, D); - Handle(Geom2d_TrimmedCurve) TC2 = + Handle(Geom2d_TrimmedCurve) TC2 = new (Geom2d_TrimmedCurve) (LC2, 0, BSplSurf->VKnot(BSplSurf->NbVKnots())); - + myCurve2d->SetValue(myCurve2d->Length(), TC2); CError->SetValue(1, myCurve2d->Length(), 0.); CError->SetValue(2, myCurve2d->Length(), 0.); - + SError = theTol; } } //if (!mySurface->IsCNv(1)) - + // Les Courbes 2d if (myCurve2d.IsNull()) { - myCurve2d = new (TColGeom2d_HArray1OfCurve) (1, 2+myLoc->TraceNumber()); - CError = new (TColStd_HArray2OfReal) (1,2, 1, 2+myLoc->TraceNumber()); - Standard_Integer kk,ii, ifin = 1, ideb; - + myCurve2d = new (TColGeom2d_HArray1OfCurve) (1, 2 + myLoc->TraceNumber()); + CError = new (TColStd_HArray2OfReal) (1, 2, 1, 2 + myLoc->TraceNumber()); + Standard_Integer kk, ii, ifin = 1, ideb; + if (myLoc->HasFirstRestriction()) { ideb = 1; } @@ -369,44 +366,44 @@ GeomFill_Sweep::GeomFill_Sweep(const Handle(GeomFill_LocationLaw)& Location, } ifin += myLoc->TraceNumber(); if (myLoc->HasLastRestriction()) ifin++; - - for (ii=ideb, kk=1; ii<=ifin; ii++, kk++) { - Handle(Geom2d_BSplineCurve) C + + for (ii = ideb, kk = 1; ii <= ifin; ii++, kk++) { + Handle(Geom2d_BSplineCurve) C = new (Geom2d_BSplineCurve) (Approx.Curve2dPoles(kk), Approx.Curves2dKnots(), Approx.Curves2dMults(), Approx.Curves2dDegree()); myCurve2d->SetValue(ii, C); - CError->SetValue(1, ii, Approx.Max2dError(kk)); - CError->SetValue(2, ii, Approx.Max2dError(kk)); + CError->SetValue(1, ii, Approx.Max2dError(kk)); + CError->SetValue(2, ii, Approx.Max2dError(kk)); } - + // Si les courbes de restriction, ne sont pas calcules, on prend // les iso Bords. - if (! myLoc->HasFirstRestriction()) { + if (!myLoc->HasFirstRestriction()) { gp_Dir2d D(0., 1.); gp_Pnt2d P(UKnots(UKnots.Lower()), 0); Handle(Geom2d_Line) LC = new (Geom2d_Line) (P, D); Handle(Geom2d_TrimmedCurve) TC = new (Geom2d_TrimmedCurve) (LC, First, Last); - + myCurve2d->SetValue(1, TC); CError->SetValue(1, 1, 0.); CError->SetValue(2, 1, 0.); } - - if (! myLoc->HasLastRestriction()) { + + if (!myLoc->HasLastRestriction()) { gp_Dir2d D(0., 1.); gp_Pnt2d P(UKnots(UKnots.Upper()), 0); Handle(Geom2d_Line) LC = new (Geom2d_Line) (P, D); - Handle(Geom2d_TrimmedCurve) TC = + Handle(Geom2d_TrimmedCurve) TC = new (Geom2d_TrimmedCurve) (LC, First, Last); myCurve2d->SetValue(myCurve2d->Length(), TC); CError->SetValue(1, myCurve2d->Length(), 0.); CError->SetValue(2, myCurve2d->Length(), 0.); } } //if (myCurve2d.IsNull()) - } + } return Ok; } @@ -414,47 +411,44 @@ GeomFill_Sweep::GeomFill_Sweep(const Handle(GeomFill_LocationLaw)& Location, // Function : BuildProduct // Purpose : A venir... //=============================================================== - Standard_Boolean GeomFill_Sweep::BuildProduct(const GeomAbs_Shape Continuity, - const Standard_Integer Degmax, - const Standard_Integer Segmax) +Standard_Boolean GeomFill_Sweep::BuildProduct(const GeomAbs_Shape Continuity, + const Standard_Integer Degmax, + const Standard_Integer Segmax) { Standard_Boolean Ok = Standard_False; - Handle(Geom_BSplineSurface) BSurf; - BSurf = Handle(Geom_BSplineSurface)::DownCast( - mySec->BSplineSurface()->Copy()); + Handle(Geom_BSplineSurface) BSurf = Handle(Geom_BSplineSurface)::DownCast(mySec->BSplineSurface()->Copy()); if (BSurf.IsNull()) return Ok; // Ce mode de construction est impossible - Standard_Integer NbIntervalC2, NbIntervalC3; + Standard_Integer NbIntervalC2, NbIntervalC3; GeomFill_LocFunction Func(myLoc); NbIntervalC2 = myLoc->NbIntervals(GeomAbs_C2); NbIntervalC3 = myLoc->NbIntervals(GeomAbs_C3); - TColStd_Array1OfReal Param_de_decoupeC2 (1, NbIntervalC2+1); + TColStd_Array1OfReal Param_de_decoupeC2(1, NbIntervalC2 + 1); myLoc->Intervals(Param_de_decoupeC2, GeomAbs_C2); - TColStd_Array1OfReal Param_de_decoupeC3 (1, NbIntervalC3+1); + TColStd_Array1OfReal Param_de_decoupeC3(1, NbIntervalC3 + 1); myLoc->Intervals(Param_de_decoupeC3, GeomAbs_C3); - AdvApprox_PrefAndRec Preferentiel(Param_de_decoupeC2, - Param_de_decoupeC3); - - Handle(TColStd_HArray1OfReal) ThreeDTol = new (TColStd_HArray1OfReal) (1,4); + AdvApprox_PrefAndRec Preferentiel(Param_de_decoupeC2, Param_de_decoupeC3); + + Handle(TColStd_HArray1OfReal) ThreeDTol = new (TColStd_HArray1OfReal) (1, 4); ThreeDTol->Init(Tol3d); // A Affiner... - GeomFill_Sweep_Eval eval (Func); + GeomFill_Sweep_Eval eval(Func); AdvApprox_ApproxAFunction Approx(0, 0, 4, - ThreeDTol, - ThreeDTol, - ThreeDTol, - First, - Last, - Continuity, - Degmax, - Segmax, - eval, - Preferentiel); + ThreeDTol, + ThreeDTol, + ThreeDTol, + First, + Last, + Continuity, + Degmax, + Segmax, + eval, + Preferentiel); #ifdef OCCT_DEBUG Approx.Dump(std::cout); #endif @@ -468,13 +462,13 @@ GeomFill_Sweep::GeomFill_Sweep(const Handle(GeomFill_LocationLaw)& Location, // Produit Tensoriel for (ii=1; ii<=nbpoles; ii++) { TM(ii).SetCols(ResPoles->Value(ii,2).XYZ(), - ResPoles->Value(ii,3).XYZ(), - ResPoles->Value(ii,4).XYZ()); + ResPoles->Value(ii,3).XYZ(), + ResPoles->Value(ii,4).XYZ()); TR(ii) = ResPoles->Value(ii,1); } GeomLib::TensorialProduct(BSurf, TM, TR, - Approx.Knots()->Array1(), - Approx.Multiplicities()->Array1()); + Approx.Knots()->Array1(), + Approx.Multiplicities()->Array1()); // Somme TColgp_Array1OfPnt TPoles(1, nbpoles); @@ -483,16 +477,16 @@ GeomFill_Sweep::GeomFill_Sweep(const Handle(GeomFill_LocationLaw)& Location, } Handle(Geom_BsplineCurve) BS = new (Geom_BsplineCurve) (Poles, - Approx.Knots()->Array1(), - Approx.Multiplicities()->Array1(), - Approx.Degree()); + Approx.Knots()->Array1(), + Approx.Multiplicities()->Array1(), + Approx.Degree()); for (ii=1; ii<=BSurf->NbVKnots(); ii++) BS->InsertKnot( BSurf->VKnot(ii), - BSurf->VMultiplicity(ii), - Precision::Confusion()); + BSurf->VMultiplicity(ii), + Precision::Confusion()); TColgp_Array2OfPnt SurfPoles (1, BSurf->NbUPoles()); for (ii=1; - + */ mySurface = BSurf; } @@ -505,9 +499,9 @@ GeomFill_Sweep::GeomFill_Sweep(const Handle(GeomFill_LocationLaw)& Location, // * the type of section should be a line // * theLoc should represent a translation. -static Standard_Boolean IsSweepParallelSpine (const Handle(GeomFill_LocationLaw) &theLoc, - const Handle(GeomFill_SectionLaw) &theSec, - const Standard_Real theTol) +static Standard_Boolean IsSweepParallelSpine(const Handle(GeomFill_LocationLaw) &theLoc, + const Handle(GeomFill_SectionLaw) &theSec, + const Standard_Real theTol) { // Get the first and last transformations of the location Standard_Real aFirst; @@ -522,25 +516,25 @@ static Standard_Boolean IsSweepParallelSpine (const Handle(GeomFill_LocationLaw) theLoc->GetDomain(aFirst, aLast); -// Get the first transformation + // Get the first transformation theLoc->D0(aFirst, M, VBegin); GTfBegin.SetVectorialPart(M); GTfBegin.SetTranslationPart(VBegin.XYZ()); - TfBegin.SetValues(GTfBegin(1,1), GTfBegin(1,2), GTfBegin(1,3), GTfBegin(1,4), - GTfBegin(2,1), GTfBegin(2,2), GTfBegin(2,3), GTfBegin(2,4), - GTfBegin(3,1), GTfBegin(3,2), GTfBegin(3,3), GTfBegin(3,4)); + TfBegin.SetValues(GTfBegin(1, 1), GTfBegin(1, 2), GTfBegin(1, 3), GTfBegin(1, 4), + GTfBegin(2, 1), GTfBegin(2, 2), GTfBegin(2, 3), GTfBegin(2, 4), + GTfBegin(3, 1), GTfBegin(3, 2), GTfBegin(3, 3), GTfBegin(3, 4)); -// Get the last transformation + // Get the last transformation theLoc->D0(aLast, M, VEnd); GTfEnd.SetVectorialPart(M); GTfEnd.SetTranslationPart(VEnd.XYZ()); - TfEnd.SetValues(GTfEnd(1,1), GTfEnd(1,2), GTfEnd(1,3), GTfEnd(1,4), - GTfEnd(2,1), GTfEnd(2,2), GTfEnd(2,3), GTfEnd(2,4), - GTfEnd(3,1), GTfEnd(3,2), GTfEnd(3,3), GTfEnd(3,4)); + TfEnd.SetValues(GTfEnd(1, 1), GTfEnd(1, 2), GTfEnd(1, 3), GTfEnd(1, 4), + GTfEnd(2, 1), GTfEnd(2, 2), GTfEnd(2, 3), GTfEnd(2, 4), + GTfEnd(3, 1), GTfEnd(3, 2), GTfEnd(3, 3), GTfEnd(3, 4)); Handle(Geom_Surface) aSurf = theSec->BSplineSurface(); Standard_Real Umin; @@ -566,8 +560,8 @@ static Standard_Boolean IsSweepParallelSpine (const Handle(GeomFill_LocationLaw) aPntLastSec.Transform(TfEnd); - gp_Pnt aPntFirstSec = ElCLib::Value( UFirst, L ); - gp_Vec aVecSec( aPntFirstSec, aPntLastSec ); + gp_Pnt aPntFirstSec = ElCLib::Value(UFirst, L); + gp_Vec aVecSec(aPntFirstSec, aPntLastSec); gp_Vec aVecSpine = VEnd - VBegin; Standard_Boolean isParallel = aVecSec.IsParallel(aVecSpine, theTol); @@ -580,7 +574,7 @@ static Standard_Boolean IsSweepParallelSpine (const Handle(GeomFill_LocationLaw) // Function : BuildKPart // Purpose : //=============================================================== - Standard_Boolean GeomFill_Sweep::BuildKPart() +Standard_Boolean GeomFill_Sweep::BuildKPart() { Standard_Boolean Ok = Standard_False; Standard_Boolean isUPeriodic = Standard_False; @@ -592,9 +586,9 @@ static Standard_Boolean IsSweepParallelSpine (const Handle(GeomFill_LocationLaw) GeomAbs_CurveType SectionType; gp_Vec V; gp_Mat M; - Standard_Real levier, error = 0 ; - Standard_Real UFirst=0, VFirst=First, ULast=0, VLast=Last; - Standard_Real Tol = Min (Tol3d, BoundTol); + Standard_Real levier, error = 0; + Standard_Real UFirst = 0, VFirst = First, ULast = 0, VLast = Last; + Standard_Real Tol = Min(Tol3d, BoundTol); // (1) Trajectoire Rectilignes ------------------------- if (myLoc->IsTranslation(error)) { @@ -610,9 +604,9 @@ static Standard_Boolean IsSweepParallelSpine (const Handle(GeomFill_LocationLaw) Tf.SetTranslationPart(V.XYZ()); try { // Pas joli mais il n'y as pas d'autre moyens de tester SetValues OCC_CATCH_SIGNALS - Tf2.SetValues(Tf(1,1), Tf(1,2), Tf(1,3), Tf(1,4), - Tf(2,1), Tf(2,2), Tf(2,3), Tf(2,4), - Tf(3,1), Tf(3,2), Tf(3,3), Tf(3,4)); + Tf2.SetValues(Tf(1, 1), Tf(1, 2), Tf(1, 3), Tf(1, 4), + Tf(2, 1), Tf(2, 2), Tf(2, 3), Tf(2, 4), + Tf(3, 1), Tf(3, 2), Tf(3, 3), Tf(3, 4)); } catch (Standard_ConstructionError const&) { IsTrsf = Standard_False; @@ -628,147 +622,147 @@ static Standard_Boolean IsSweepParallelSpine (const Handle(GeomFill_LocationLaw) GeomAdaptor_Curve AC(Section); SectionType = AC.GetType(); UFirst = AC.FirstParameter(); - ULast = AC.LastParameter(); - // (1.1.a) Cas Plan - if ( (SectionType == GeomAbs_Line) && IsTrsf) { -// Modified by skv - Thu Feb 5 11:39:06 2004 OCC5073 Begin - if (!IsSweepParallelSpine(myLoc, mySec, Tol)) - return Standard_False; -// Modified by skv - Thu Feb 5 11:39:08 2004 OCC5073 End - gp_Lin L = AC.Line(); + ULast = AC.LastParameter(); + // (1.1.a) Cas Plan + if ((SectionType == GeomAbs_Line) && IsTrsf) { + // Modified by skv - Thu Feb 5 11:39:06 2004 OCC5073 Begin + if (!IsSweepParallelSpine(myLoc, mySec, Tol)) + return Standard_False; + // Modified by skv - Thu Feb 5 11:39:08 2004 OCC5073 End + gp_Lin L = AC.Line(); L.Transform(Tf2); - DS.SetXYZ(L.Position().Direction().XYZ()); - DS.Normalize(); + DS.SetXYZ(L.Position().Direction().XYZ()); + DS.Normalize(); levier = Abs(DS.Dot(DP)); - SError = error + levier * Abs(Last-First); - if (SError <= Tol) { - Ok = Standard_True; - gp_Ax2 AxisOfPlane (L.Location(), DS^DP, DS); - S = new (Geom_Plane) (AxisOfPlane); - } - else SError = 0.; + SError = error + levier * Abs(Last - First); + if (SError <= Tol) { + Ok = Standard_True; + gp_Ax2 AxisOfPlane(L.Location(), DS^DP, DS); + S = new (Geom_Plane) (AxisOfPlane); + } + else SError = 0.; } - - // (1.1.b) Cas Cylindrique - if ( (SectionType == GeomAbs_Circle) && IsTrsf) { + + // (1.1.b) Cas Cylindrique + if ((SectionType == GeomAbs_Circle) && IsTrsf) { const Standard_Real TolProd = 1.e-6; - - gp_Circ C = AC.Circle(); - C.Transform(Tf2); - - DS.SetXYZ (C.Position().Direction().XYZ()); - DS.Normalize(); + + gp_Circ C = AC.Circle(); + C.Transform(Tf2); + + DS.SetXYZ(C.Position().Direction().XYZ()); + DS.Normalize(); levier = Abs(DS.CrossMagnitude(DP)) * C.Radius(); SError = levier * Abs(Last - First); - if (SError <= TolProd) { - Ok = Standard_True; - gp_Ax3 axe (C.Location(), DP, C.Position().XDirection()); - S = new (Geom_CylindricalSurface) - (axe, C.Radius()); - if (C.Position().Direction(). - IsOpposite(axe.Direction(), 0.1) ) { - Standard_Real f, l; - // L'orientation parametrique est inversee - l = 2*M_PI - UFirst; - f = 2*M_PI - ULast; - UFirst = f; - ULast = l; - isUReversed = Standard_True; - } - } - else SError = 0.; + if (SError <= TolProd) { + Ok = Standard_True; + gp_Ax3 axe(C.Location(), DP, C.Position().XDirection()); + S = new (Geom_CylindricalSurface) + (axe, C.Radius()); + if (C.Position().Direction(). + IsOpposite(axe.Direction(), 0.1)) { + Standard_Real f, l; + // L'orientation parametrique est inversee + l = 2 * M_PI - UFirst; + f = 2 * M_PI - ULast; + UFirst = f; + ULast = l; + isUReversed = Standard_True; + } + } + else SError = 0.; } - // (1.1.c) C'est bien une extrusion + // (1.1.c) C'est bien une extrusion if (!Ok) { - if (IsTrsf) { - Section->Transform(Tf2); - S = new (Geom_SurfaceOfLinearExtrusion) - (Section, DP); - SError = 0.; - Ok = Standard_True; - } - else { // extrusion sur BSpline - - } + if (IsTrsf) { + Section->Transform(Tf2); + S = new (Geom_SurfaceOfLinearExtrusion) + (Section, DP); + SError = 0.; + Ok = Standard_True; + } + else { // extrusion sur BSpline + + } + } + } + + // (1.2) Cas conique + else if (mySec->IsConicalLaw(error)) { + + gp_Pnt P1, P2, Centre0, Centre1, Centre2; + gp_Vec dsection; + Handle(Geom_Curve) Section; + GeomAdaptor_Curve AC; + gp_Circ C; + Standard_Real R1, R2; + + + Section = mySec->CirclSection(SLast); + Section->Transform(Tf2); + Section->Translate(Last*DP); + AC.Load(Section); + C = AC.Circle(); + Centre2 = C.Location(); + AC.D1(0, P2, dsection); + R2 = C.Radius(); + + Section = mySec->CirclSection(SFirst); + Section->Transform(Tf2); + Section->Translate(First*DP); + AC.Load(Section); + C = AC.Circle(); + Centre1 = C.Location(); + P1 = AC.Value(0); + R1 = C.Radius(); + + Section = mySec->CirclSection(SFirst - First*(SLast - SFirst) / (Last - First)); + Section->Transform(Tf2); + AC.Load(Section); + C = AC.Circle(); + Centre0 = C.Location(); + + Standard_Real Angle; + gp_Vec N(Centre1, P1); + if (N.Magnitude() < 1.e-9) { + gp_Vec Bis(Centre2, P2); + N = Bis; + } + gp_Vec L(P1, P2), Dir(Centre1, Centre2); + + Angle = L.Angle(Dir); + if ((Angle > 0.01) && (Angle < M_PI / 2 - 0.01)) { + if (R2 < R1) Angle = -Angle; + SError = error; + gp_Ax3 Axis(Centre0, Dir, N); + S = new (Geom_ConicalSurface) + (Axis, Angle, C.Radius()); + // Calcul du glissement parametrique + VFirst = First / Cos(Angle); + VLast = Last / Cos(Angle); + + // Bornes en U + UFirst = AC.FirstParameter(); + ULast = AC.LastParameter(); + gp_Vec diso; + gp_Pnt pbis; + S->VIso(VLast)->D1(0, pbis, diso); + if (diso.Magnitude() > 1.e-9 && dsection.Magnitude() > 1.e-9) + isUReversed = diso.IsOpposite(dsection, 0.1); + if (isUReversed) { + Standard_Real f, l; + // L'orientation parametrique est inversee + l = 2 * M_PI - UFirst; + f = 2 * M_PI - ULast; + UFirst = f; + ULast = l; + } + + // C'est un cone + Ok = Standard_True; } } - - // (1.2) Cas conique - else if (mySec->IsConicalLaw(error)) { - - gp_Pnt P1, P2, Centre0, Centre1, Centre2; - gp_Vec dsection; - Handle(Geom_Curve) Section; - GeomAdaptor_Curve AC; - gp_Circ C; - Standard_Real R1, R2; - - - Section = mySec->CirclSection(SLast); - Section->Transform(Tf2); - Section->Translate(Last*DP); - AC.Load(Section); - C = AC.Circle(); - Centre2 = C.Location(); - AC.D1(0, P2, dsection); - R2 = C.Radius(); - - Section = mySec->CirclSection(SFirst); - Section->Transform(Tf2); - Section->Translate(First*DP); - AC.Load(Section); - C = AC.Circle(); - Centre1 = C.Location(); - P1 = AC.Value(0); - R1 = C.Radius(); - - Section = mySec->CirclSection(SFirst - First*(SLast-SFirst)/(Last-First)); - Section->Transform(Tf2); - AC.Load(Section); - C = AC.Circle(); - Centre0 = C.Location(); - - Standard_Real Angle; - gp_Vec N(Centre1, P1); - if (N.Magnitude() < 1.e-9) { - gp_Vec Bis(Centre2, P2); - N = Bis; - } - gp_Vec L(P1, P2), Dir(Centre1,Centre2); - - Angle = L.Angle(Dir); - if ((Angle > 0.01) && (Angle < M_PI/2-0.01)) { - if (R2VIso(VLast)->D1(0, pbis, diso); - if (diso.Magnitude()>1.e-9 && dsection.Magnitude()>1.e-9) - isUReversed = diso.IsOpposite(dsection, 0.1); - if (isUReversed ) { - Standard_Real f, l; - // L'orientation parametrique est inversee - l = 2*M_PI - UFirst; - f = 2*M_PI - ULast; - UFirst = f; - ULast = l; - } - - // C'est un cone - Ok = Standard_True; - } - } } // (2) Trajectoire Circulaire @@ -776,7 +770,7 @@ static Standard_Boolean IsSweepParallelSpine (const Handle(GeomFill_LocationLaw) if (mySec->IsConstant(error)) { // La trajectoire gp_Pnt Centre; - isVPeriodic = (Abs(Last-First -2*M_PI) < 1.e-15); + isVPeriodic = (Abs(Last - First - 2 * M_PI) < 1.e-15); Standard_Real RotRadius; gp_Vec DP, DS, DN; myLoc->D0(0.1, M, DS); @@ -784,7 +778,7 @@ static Standard_Boolean IsSweepParallelSpine (const Handle(GeomFill_LocationLaw) myLoc->Rotation(Centre); DP = DS - V; - DS.SetXYZ(V.XYZ() - Centre.XYZ()); + DS.SetXYZ(V.XYZ() - Centre.XYZ()); RotRadius = DS.Magnitude(); if (RotRadius > 1.e-15) DS.Normalize(); else return Standard_False; // Pas de KPart, rotation degeneree @@ -799,12 +793,12 @@ static Standard_Boolean IsSweepParallelSpine (const Handle(GeomFill_LocationLaw) Tf.SetTranslationPart(V.XYZ()); // try { // Pas joli mais il n'y as pas d'autre moyens de tester SetValues // OCC_CATCH_SIGNALS - Tf2.SetValues(Tf(1,1), Tf(1,2), Tf(1,3), Tf(1,4), - Tf(2,1), Tf(2,2), Tf(2,3), Tf(2,4), - Tf(3,1), Tf(3,2), Tf(3,3), Tf(3,4)); + Tf2.SetValues(Tf(1, 1), Tf(1, 2), Tf(1, 3), Tf(1, 4), + Tf(2, 1), Tf(2, 2), Tf(2, 3), Tf(2, 4), + Tf(3, 1), Tf(3, 2), Tf(3, 3), Tf(3, 4)); // } // catch (Standard_ConstructionError) { -// IsTrsf = Standard_False; +// IsTrsf = Standard_False; // } // La section Handle(Geom_Curve) Section; @@ -812,46 +806,46 @@ static Standard_Boolean IsSweepParallelSpine (const Handle(GeomFill_LocationLaw) GeomAdaptor_Curve AC(Section); SectionType = AC.GetType(); UFirst = AC.FirstParameter(); - ULast = AC.LastParameter(); + ULast = AC.LastParameter(); // (2.1) Tore/Sphere ? if ((SectionType == GeomAbs_Circle) && IsTrsf) { - gp_Circ C = AC.Circle(); + gp_Circ C = AC.Circle(); Standard_Real Radius; - Standard_Boolean IsGoodSide = Standard_True; - C.Transform(Tf2); - gp_Vec DC; + Standard_Boolean IsGoodSide = Standard_True; + C.Transform(Tf2); + gp_Vec DC; // On calcul le centre eventuel DC.SetXYZ(C.Location().XYZ() - Centre.XYZ()); - Centre.ChangeCoord() += (DC.Dot(DN))*DN.XYZ(); - DC.SetXYZ(C.Location().XYZ() - Centre.XYZ()); + Centre.ChangeCoord() += (DC.Dot(DN))*DN.XYZ(); + DC.SetXYZ(C.Location().XYZ() - Centre.XYZ()); Radius = DC.Magnitude(); //grand Rayon du tore - if ((Radius > Tol) && (DC.Dot(DS) < 0)) IsGoodSide = Standard_False; - if (Radius < Tol/100) DC = DS; // Pour definir le tore - - // On verifie d'abord que le plan de la section est // a - // l'axe de rotation - gp_Vec NC; - NC.SetXYZ (C.Position().Direction().XYZ()); - NC.Normalize(); - error = Abs(NC.Dot(DN)); - // Puis on evalue l'erreur commise sur la section, + if ((Radius > Tol) && (DC.Dot(DS) < 0)) IsGoodSide = Standard_False; + if (Radius < Tol / 100) DC = DS; // Pour definir le tore + + // On verifie d'abord que le plan de la section est // a + // l'axe de rotation + gp_Vec NC; + NC.SetXYZ(C.Position().Direction().XYZ()); + NC.Normalize(); + error = Abs(NC.Dot(DN)); + // Puis on evalue l'erreur commise sur la section, // en pivotant son plan ( pour contenir l'axe de rotation) error += Abs(NC.Dot(DS)); error *= C.Radius(); - if (error <= Tol) { - SError = error; - error += Radius; + if (error <= Tol) { + SError = error; + error += Radius; if (Radius <= Tol) { - // (2.1.a) Sphere - Standard_Real f = UFirst , l = ULast, aRadius = 0.0; - SError = error; - Centre.BaryCenter(1.0, C.Location(), 1.0); - gp_Ax3 AxisOfSphere(Centre, DN, DS); + // (2.1.a) Sphere + Standard_Real f = UFirst, l = ULast, aRadius = 0.0; + SError = error; + Centre.BaryCenter(1.0, C.Location(), 1.0); + gp_Ax3 AxisOfSphere(Centre, DN, DS); aRadius = C.Radius(); - gp_Sphere theSphere( AxisOfSphere, aRadius ); - S = new Geom_SphericalSurface(theSphere); - // Pour les spheres on ne peut pas controler le parametre + gp_Sphere theSphere(AxisOfSphere, aRadius); + S = new Geom_SphericalSurface(theSphere); + // Pour les spheres on ne peut pas controler le parametre // V (donc U car myExchUV = Standard_True) // Il faut donc modifier UFirst, ULast... Standard_Real fpar = AC.FirstParameter(); @@ -859,7 +853,7 @@ static Standard_Boolean IsSweepParallelSpine (const Handle(GeomFill_LocationLaw) Handle(Geom_Curve) theSection = new Geom_TrimmedCurve(Section, fpar, lpar); theSection->Transform(Tf2); gp_Pnt FirstPoint = theSection->Value(theSection->FirstParameter()); - gp_Pnt LastPoint = theSection->Value(theSection->LastParameter()); + gp_Pnt LastPoint = theSection->Value(theSection->LastParameter()); Standard_Real UfirstOnSec, VfirstOnSec, UlastOnSec, VlastOnSec; ElSLib::Parameters(theSphere, FirstPoint, UfirstOnSec, VfirstOnSec); ElSLib::Parameters(theSphere, LastPoint, UlastOnSec, VlastOnSec); @@ -870,165 +864,168 @@ static Standard_Boolean IsSweepParallelSpine (const Handle(GeomFill_LocationLaw) } else { - // L'orientation parametrique est inversee + // L'orientation parametrique est inversee f = VlastOnSec; l = VfirstOnSec; - isUReversed = Standard_True; - } + isUReversed = Standard_True; + } if (Abs(l - f) <= Precision::PConfusion() || - Abs(UlastOnSec - UfirstOnSec) > M_PI_2) + Abs(UlastOnSec - UfirstOnSec) > M_PI_2) { // l == f - "degenerated" surface // UlastOnSec - UfirstOnSec > M_PI_2 - "twisted" surface, // it is impossible to represent with help of trimmed sphere - isUReversed = Standard_False; + isUReversed = Standard_False; return Ok; } - if ( (f >= -M_PI/2) && (l <= M_PI/2)) { - Ok = Standard_True; - myExchUV = Standard_True; - UFirst = f; - ULast = l; - } - else { // On restaure ce qu'il faut - isUReversed = Standard_False; - } - } - else if (IsGoodSide) { - // (2.1.b) Tore - gp_Ax3 AxisOfTore(Centre, DN, DC); - S = new (Geom_ToroidalSurface) (AxisOfTore, - Radius , C.Radius()); - - // Pour les tores on ne peut pas controler le parametre + if ((f >= -M_PI / 2) && (l <= M_PI / 2)) { + Ok = Standard_True; + myExchUV = Standard_True; + UFirst = f; + ULast = l; + } + else { // On restaure ce qu'il faut + isUReversed = Standard_False; + } + } + else if (IsGoodSide) { + // (2.1.b) Tore + gp_Ax3 AxisOfTore(Centre, DN, DC); + S = new (Geom_ToroidalSurface) (AxisOfTore, + Radius, C.Radius()); + + // Pour les tores on ne peut pas controler le parametre // V (donc U car myExchUV = Standard_True) // Il faut donc modifier UFirst, ULast... - Handle(Geom_Circle) Iso; - Iso = Handle(Geom_Circle)::DownCast(S->UIso(0.)); - gp_Ax2 axeiso; - axeiso = Iso->Circ().Position(); - - if (C.Position().Direction(). - IsOpposite(axeiso.Direction(), 0.1) ) { - Standard_Real f, l; - // L'orientation parametrique est inversee - l = 2*M_PI - UFirst; - f = 2*M_PI - ULast; - UFirst = f; - ULast = l; - isUReversed = Standard_True; - } - // On calcul le "glissement" parametrique. - Standard_Real rot; - rot = C.Position().XDirection().AngleWithRef - (axeiso.XDirection(), axeiso.Direction()); - UFirst -= rot; - ULast -= rot; - - myExchUV = Standard_True; + Handle(Geom_Circle) Iso; + Iso = Handle(Geom_Circle)::DownCast(S->UIso(0.)); + gp_Ax2 axeiso; + axeiso = Iso->Circ().Position(); + + if (C.Position().Direction(). + IsOpposite(axeiso.Direction(), 0.1)) { + Standard_Real f, l; + // L'orientation parametrique est inversee + l = 2 * M_PI - UFirst; + f = 2 * M_PI - ULast; + UFirst = f; + ULast = l; + isUReversed = Standard_True; + } + // On calcul le "glissement" parametrique. + Standard_Real rot; + rot = C.Position().XDirection().AngleWithRef + (axeiso.XDirection(), axeiso.Direction()); + UFirst -= rot; + ULast -= rot; + + myExchUV = Standard_True; // Attention l'arete de couture dans le cas periodique // n'est peut etre pas a la bonne place... - if (isUPeriodic && Abs(UFirst)>Precision::PConfusion()) - isUPeriodic = Standard_False; //Pour trimmer la surface... - Ok = Standard_True; - } - } - else { - SError = 0.; - } + if (isUPeriodic && Abs(UFirst) > Precision::PConfusion()) + isUPeriodic = Standard_False; //Pour trimmer la surface... + Ok = Standard_True; + } + } + else { + SError = 0.; + } } // (2.2) Cone / Cylindre - if ((SectionType == GeomAbs_Line) && IsTrsf) { - gp_Lin L = AC.Line(); - L.Transform(Tf2); - gp_Vec DL; - DL.SetXYZ(L.Direction().XYZ()); - levier = Max(Abs(AC.FirstParameter()), AC.LastParameter()); - // si la line est ortogonale au cercle de rotation - SError = error + levier * Abs(DL.Dot(DP)); - if (SError <= Tol) { + if ((SectionType == GeomAbs_Line) && IsTrsf) { + gp_Lin L = AC.Line(); + L.Transform(Tf2); + gp_Vec DL; + DL.SetXYZ(L.Direction().XYZ()); + levier = Max(Abs(AC.FirstParameter()), AC.LastParameter()); + // si la line est ortogonale au cercle de rotation + SError = error + levier * Abs(DL.Dot(DP)); + if (SError <= Tol) { Standard_Boolean reverse; - gp_Lin Dir(Centre, DN); - Standard_Real aux; - aux = DL.Dot(DN); - reverse = (aux < 0); // On choisit ici le sens de parametrisation - + gp_Lin Dir(Centre, DN); + Standard_Real aux; + aux = DL.Dot(DN); + reverse = (aux < 0); // On choisit ici le sens de parametrisation + // Calcul du centre du vecteur supportant la "XDirection" - gp_Pnt CentreOfSurf; - gp_Vec O1O2(Centre, L.Location()), trans; - trans = DN; - trans *= DN.Dot(O1O2); - CentreOfSurf = Centre.Translated(trans); + gp_Pnt CentreOfSurf; + gp_Vec O1O2(Centre, L.Location()), trans; + trans = DN; + trans *= DN.Dot(O1O2); + CentreOfSurf = Centre.Translated(trans); DS.SetXYZ(L.Location().XYZ() - CentreOfSurf.XYZ()); - error = SError; - error += (DL.XYZ()).CrossMagnitude(DN.XYZ())*levier; - if (error <= Tol) { - // (2.2.a) Cylindre + error = SError; + error += (DL.XYZ()).CrossMagnitude(DN.XYZ())*levier; + if (error <= Tol) { + // (2.2.a) Cylindre // si la line est orthogonale au plan de rotation - SError = error; - // - gp_Ax3 Axis(CentreOfSurf, Dir.Direction()); - if (DS.SquareMagnitude() > gp::Resolution()) - { - Axis.SetXDirection(DS); - } - S = new (Geom_CylindricalSurface) - (Axis, L.Distance(CentreOfSurf)); - Ok = Standard_True; + SError = error; + // + gp_Ax3 Axis(CentreOfSurf, Dir.Direction()); + if (DS.SquareMagnitude() > gp::Resolution()) + { + Axis.SetXDirection(DS); + } + S = new (Geom_CylindricalSurface) + (Axis, L.Distance(CentreOfSurf)); + Ok = Standard_True; myExchUV = Standard_True; - } - else { - // On evalue l'angle du cone - Standard_Real Angle = Abs(Dir.Angle(L)); - if (Angle > M_PI/2) Angle = M_PI -Angle; + } + else { + // On evalue l'angle du cone + Standard_Real Angle = Abs(Dir.Angle(L)); + if (Angle > M_PI / 2) Angle = M_PI - Angle; if (reverse) Angle = -Angle; - aux = DS.Dot(DL); - if (aux < 0) { - Angle = - Angle; - } - if (Abs(Abs(Angle) - M_PI/2) > 0.01) { - // (2.2.b) Cone - // si les 2 droites ne sont pas orthogonales - Standard_Real Radius = CentreOfSurf.Distance(L.Location()); - gp_Ax3 Axis(CentreOfSurf, Dir.Direction(), DS); - S = new (Geom_ConicalSurface) - (Axis, Angle, Radius); - myExchUV = Standard_True; - Ok = Standard_True; - } - else { - // On n'as pas conclue, on remet l'erreur a 0. - SError = 0.; - } - } - if (Ok && reverse) { - // On reverse le parametre - Standard_Real uf, ul; - Handle(Geom_Line) CL = new (Geom_Line)(L); - uf = CL->ReversedParameter(ULast); - ul = CL->ReversedParameter(UFirst); - UFirst = uf; - ULast = ul; - isUReversed = Standard_True; - } - } - else SError = 0.; + aux = DS.Dot(DL); + if (aux < 0) { + Angle = -Angle; + } + if (Abs(Abs(Angle) - M_PI / 2) > 0.01) { + // (2.2.b) Cone + // si les 2 droites ne sont pas orthogonales + Standard_Real Radius = CentreOfSurf.Distance(L.Location()); + gp_Ax3 Axis(CentreOfSurf, Dir.Direction(), DS); + S = new (Geom_ConicalSurface) + (Axis, Angle, Radius); + myExchUV = Standard_True; + Ok = Standard_True; + } + else { + // On n'as pas conclue, on remet l'erreur a 0. + SError = 0.; + } + } + if (Ok && reverse) { + // On reverse le parametre + Standard_Real uf, ul; + Handle(Geom_Line) CL = new (Geom_Line)(L); + uf = CL->ReversedParameter(ULast); + ul = CL->ReversedParameter(UFirst); + + // Following the example of the code for the sphere: + // "we cannot control U because myExchUV = Standard_True, + // so it is necessary to change UFirst and ULast" + UFirst = ul; + ULast = uf; + } + } + else SError = 0.; } - + // (2.3) Revolution if (!Ok) { - if (IsTrsf) { - Section->Transform(Tf2); - gp_Ax1 Axis (Centre, DN); - S = new (Geom_SurfaceOfRevolution) - (Section, Axis); - myExchUV = Standard_True; - SError = 0.; - Ok = Standard_True; - } + if (IsTrsf) { + Section->Transform(Tf2); + gp_Ax1 Axis(Centre, DN); + S = new (Geom_SurfaceOfRevolution) + (Section, Axis); + myExchUV = Standard_True; + SError = 0.; + Ok = Standard_True; + } } } } @@ -1045,37 +1042,37 @@ static Standard_Boolean IsSweepParallelSpine (const Handle(GeomFill_LocationLaw) if (!isUPeriodic && !isVPeriodic) mySurface = new (Geom_RectangularTrimmedSurface) - (S, UFirst, ULast, VFirst, VLast); + (S, UFirst, ULast, VFirst, VLast); else if (isUPeriodic) { if (isVPeriodic) mySurface = S; else mySurface = new (Geom_RectangularTrimmedSurface) - (S, VFirst, VLast, Standard_False); + (S, VFirst, VLast, Standard_False); } else mySurface = new (Geom_RectangularTrimmedSurface) - (S,UFirst, ULast, Standard_True); + (S, UFirst, ULast, Standard_True); #ifdef OCCT_DEBUG - if (isUPeriodic && !mySurface->IsUPeriodic()) - std::cout<<"Pb de periodicite en U" << std::endl; - if (isUPeriodic && !mySurface->IsUClosed()) - std::cout<<"Pb de fermeture en U" << std::endl; - if (isVPeriodic && !mySurface->IsVPeriodic()) - std::cout << "Pb de periodicite en V" << std::endl; - if (isVPeriodic && !mySurface->IsVClosed()) - std::cout<<"Pb de fermeture en V" << std::endl; + if (isUPeriodic && !mySurface->IsUPeriodic()) + std::cout << "Pb de periodicite en U" << std::endl; + if (isUPeriodic && !mySurface->IsUClosed()) + std::cout << "Pb de fermeture en U" << std::endl; + if (isVPeriodic && !mySurface->IsVPeriodic()) + std::cout << "Pb de periodicite en V" << std::endl; + if (isVPeriodic && !mySurface->IsVClosed()) + std::cout << "Pb de fermeture en V" << std::endl; #endif } return Ok; -} + } //=============================================================== // Function : IsDone // Purpose : //=============================================================== - Standard_Boolean GeomFill_Sweep::IsDone() const +Standard_Boolean GeomFill_Sweep::IsDone() const { return done; } @@ -1084,7 +1081,7 @@ static Standard_Boolean IsSweepParallelSpine (const Handle(GeomFill_LocationLaw) // Function :ErrorOnSurface // Purpose : //=============================================================== - Standard_Real GeomFill_Sweep::ErrorOnSurface() const +Standard_Real GeomFill_Sweep::ErrorOnSurface() const { return SError; } @@ -1093,39 +1090,39 @@ static Standard_Boolean IsSweepParallelSpine (const Handle(GeomFill_LocationLaw) // Function ::ErrorOnRestriction // Purpose : //=============================================================== - void GeomFill_Sweep::ErrorOnRestriction(const Standard_Boolean IsFirst, - Standard_Real& UError, - Standard_Real& VError) const +void GeomFill_Sweep::ErrorOnRestriction(const Standard_Boolean IsFirst, + Standard_Real& UError, + Standard_Real& VError) const { Standard_Integer ind; - if (IsFirst) ind=1; + if (IsFirst) ind = 1; else ind = myCurve2d->Length(); - UError = CError->Value(1, ind); - VError = CError->Value(2, ind); + UError = CError->Value(1, ind); + VError = CError->Value(2, ind); } //=============================================================== // Function :ErrorOnTrace // Purpose : //=============================================================== - void GeomFill_Sweep::ErrorOnTrace(const Standard_Integer IndexOfTrace, - Standard_Real& UError, - Standard_Real& VError) const +void GeomFill_Sweep::ErrorOnTrace(const Standard_Integer IndexOfTrace, + Standard_Real& UError, + Standard_Real& VError) const { - Standard_Integer ind = IndexOfTrace+1; + Standard_Integer ind = IndexOfTrace + 1; if (IndexOfTrace > myLoc->TraceNumber()) throw Standard_OutOfRange(" GeomFill_Sweep::ErrorOnTrace"); - UError = CError->Value(1, ind); - VError = CError->Value(2, ind); + UError = CError->Value(1, ind); + VError = CError->Value(2, ind); } //=============================================================== // Function :Surface // Purpose : //=============================================================== - Handle(Geom_Surface) GeomFill_Sweep::Surface() const +Handle(Geom_Surface) GeomFill_Sweep::Surface() const { return mySurface; } @@ -1134,19 +1131,18 @@ static Standard_Boolean IsSweepParallelSpine (const Handle(GeomFill_LocationLaw) // Function ::Restriction // Purpose : //=============================================================== - Handle(Geom2d_Curve) GeomFill_Sweep::Restriction(const Standard_Boolean IsFirst) const +Handle(Geom2d_Curve) GeomFill_Sweep::Restriction(const Standard_Boolean IsFirst) const { if (IsFirst) return myCurve2d->Value(1); return myCurve2d->Value(myCurve2d->Length()); - } //=============================================================== // Function : // Purpose : //=============================================================== - Standard_Integer GeomFill_Sweep::NumberOfTrace() const +Standard_Integer GeomFill_Sweep::NumberOfTrace() const { return myLoc->TraceNumber(); } @@ -1155,11 +1151,10 @@ static Standard_Boolean IsSweepParallelSpine (const Handle(GeomFill_LocationLaw) // Function : // Purpose : //=============================================================== - Handle(Geom2d_Curve) - GeomFill_Sweep::Trace(const Standard_Integer IndexOfTrace) const +Handle(Geom2d_Curve) GeomFill_Sweep::Trace(const Standard_Integer IndexOfTrace) const { - Standard_Integer ind = IndexOfTrace+1; + Standard_Integer ind = IndexOfTrace + 1; if (IndexOfTrace > myLoc->TraceNumber()) throw Standard_OutOfRange(" GeomFill_Sweep::Trace"); - return myCurve2d->Value(ind); + return myCurve2d->Value(ind); } diff --git a/tests/pipe/bugs/bug24909_3 b/tests/pipe/bugs/bug24909_3 index 3a118e626a..e40ef32e21 100755 --- a/tests/pipe/bugs/bug24909_3 +++ b/tests/pipe/bugs/bug24909_3 @@ -1,4 +1,4 @@ -puts "TODO OCC24909 ALL: TEST INCOMPLETE" +puts "TODO OCC24909 ALL: Error: sweep failed" puts "========" puts "OCC24909" @@ -28,4 +28,8 @@ trotate Circle001 0 0 0 0.577350269189625731 0.577350269189625731 0.577350269189 ttranslate Circle001 0 -71 203.5 addsweep Circle001 -buildsweep Sweep001 -C -S +set result [buildsweep Sweep001 -C -S] + +if {[regexp "Not Done" $result]} { + puts "Error: sweep failed" +} \ No newline at end of file diff --git a/tests/pipe/bugs/bug32809 b/tests/pipe/bugs/bug32809 new file mode 100644 index 0000000000..3e8cb1687b --- /dev/null +++ b/tests/pipe/bugs/bug32809 @@ -0,0 +1,16 @@ +puts "========" +puts "bug32809: Sweep algorithm with Round Corner doesnot work" +puts "========" +puts "" + +restore [locate_data_file bug32809_path.brep] p +restore [locate_data_file bug32809_profile.brep] pr + +mksweep p +setsweep -CF +addsweep pr + +buildsweep result -R -S + +checkshape result +checknbshapes result -vertex 140 -edge 285 -wire 140 -face 140 -shell 1 diff --git a/tests/pipe/bugs/end b/tests/pipe/bugs/end new file mode 100644 index 0000000000..014cb9024b --- /dev/null +++ b/tests/pipe/bugs/end @@ -0,0 +1 @@ +puts "TEST COMPLETED" \ No newline at end of file From 1fff4ad5a7bbdf8786b529a4043550f9990b6fb0 Mon Sep 17 00:00:00 2001 From: mpv Date: Wed, 6 Apr 2022 11:08:20 +0300 Subject: [PATCH 251/639] 0032870: Tests - bugs/caf/bug31918_1 is unstable # Make the compared values more stable. --- tests/bugs/caf/bug31918_1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/bugs/caf/bug31918_1 b/tests/bugs/caf/bug31918_1 index 131529f2fe..ec7a26ba1d 100644 --- a/tests/bugs/caf/bug31918_1 +++ b/tests/bugs/caf/bug31918_1 @@ -53,7 +53,7 @@ set quater_time [action_time -read0:2] puts "Quater of document open time $quater_time mcs" # Check that open of quater of the document is significantly faster than open of whole. -if { [expr $quater_time * 1.75] > $whole_time } { +if { [expr $quater_time * 1.5] > $whole_time } { puts "Error : loading of quater of the document content too slow relatively to the whole document load" } From ee6581adbea1b030be8c10ea3763341efdc94a69 Mon Sep 17 00:00:00 2001 From: azv Date: Thu, 7 Apr 2022 14:28:03 +0300 Subject: [PATCH 252/639] 0032874: IsParallel() method of Extrema_ExtCC does not give same results in OCC 7.6.0 vs OCC 7.5.0 Use precision depending on radii of participating circles. --- src/Extrema/Extrema_ExtCC.cxx | 7 +++-- tests/bugs/modalg_7/{bug32874 => bug32874_1} | 0 tests/bugs/modalg_7/bug32874_2 | 29 +++++++++++++++++++ tests/bugs/modalg_7/bug32874_3 | 30 ++++++++++++++++++++ tests/bugs/modalg_7/bug32874_4 | 30 ++++++++++++++++++++ tests/bugs/modalg_7/bug32874_5 | 30 ++++++++++++++++++++ 6 files changed, 124 insertions(+), 2 deletions(-) rename tests/bugs/modalg_7/{bug32874 => bug32874_1} (100%) create mode 100644 tests/bugs/modalg_7/bug32874_2 create mode 100644 tests/bugs/modalg_7/bug32874_3 create mode 100644 tests/bugs/modalg_7/bug32874_4 create mode 100644 tests/bugs/modalg_7/bug32874_5 diff --git a/src/Extrema/Extrema_ExtCC.cxx b/src/Extrema/Extrema_ExtCC.cxx index d6eb92a41c..def27cbe5e 100644 --- a/src/Extrema/Extrema_ExtCC.cxx +++ b/src/Extrema/Extrema_ExtCC.cxx @@ -602,6 +602,9 @@ void Extrema_ExtCC::PrepareParallelResult(const Standard_Real theUt11, const Bnd_Range aRange(theUt21, theUt22); Bnd_Range aProjRng1; + // Precision of the calculation depends on circles radii + const Standard_Real aPrecision = Max(Epsilon(myC[0]->Circle().Radius()), Epsilon(myC[1]->Circle().Radius())); + // Project arc of the 1st circle between points theUt11 and theUt12 to the // 2nd circle. It is necessary to chose correct arc from two possible ones. @@ -678,7 +681,7 @@ void Extrema_ExtCC::PrepareParallelResult(const Standard_Real theUt11, aMinSqD = Min(aMinSqD, ExtPCir.SquareDistance(anExtID)); } - if (aMinSqD <= aMinSquareDist + (1. + aMinSqD) * Epsilon(1. + aMinSqD)) + if (aMinSqD <= aMinSquareDist + (1. + aMinSqD) * aPrecision) { ClearSolutions(); mySqDist.Append(aMinSqD); @@ -778,7 +781,7 @@ void Extrema_ExtCC::PrepareParallelResult(const Standard_Real theUt11, imin = k; } } - if (aDmin <= aMinSquareDist + (1. + aDmin) * Epsilon(1. + aDmin)) + if (aDmin <= aMinSquareDist + (1. + aDmin) * aPrecision) { if (imin == 0) { diff --git a/tests/bugs/modalg_7/bug32874 b/tests/bugs/modalg_7/bug32874_1 similarity index 100% rename from tests/bugs/modalg_7/bug32874 rename to tests/bugs/modalg_7/bug32874_1 diff --git a/tests/bugs/modalg_7/bug32874_2 b/tests/bugs/modalg_7/bug32874_2 new file mode 100644 index 0000000000..0ee16c9efa --- /dev/null +++ b/tests/bugs/modalg_7/bug32874_2 @@ -0,0 +1,29 @@ +puts "=================================================" +puts "0032874: IsParallel() method of Extrema_ExtCC does not give same results in OCC 7.6.0 vs OCC 7.5.0" +puts "=================================================" +puts "" + +set distExpected 3.5 +circle c1 0 0 0 100 +circle c2 0 0 0 100+$distExpected + +set start {0.0 0.5*pi pi 1.5*pi 2.0*pi} +set delta {pi/4.0 pi/3.0 pi/2.0 0.55*pi 0.99*pi pi 1.1*pi} + +foreach f $start { + foreach d $delta { + trim cc1 c1 $f $f+$d + trim cc2 c2 $f $f+$d + + set extr [extrema cc1 cc2] + if {[regexp {Infinite number of extremas, distance = ([-0-9.+eE]+)} $extr full dist]} { + if {[expr abs($dist - $distExpected)] < 1.e-7} { + puts "OK" + } else { + puts "Error: wrong distance $dist instead of $distExpected expected" + } + } else { + puts "Error: non-parallel curves" + } + } +} diff --git a/tests/bugs/modalg_7/bug32874_3 b/tests/bugs/modalg_7/bug32874_3 new file mode 100644 index 0000000000..8ff06ca948 --- /dev/null +++ b/tests/bugs/modalg_7/bug32874_3 @@ -0,0 +1,30 @@ +puts "=================================================" +puts "0032874: IsParallel() method of Extrema_ExtCC does not give same results in OCC 7.6.0 vs OCC 7.5.0" +puts "=================================================" +puts "" + +set radius 0.001 +set distExpected 0.00001 +circle c1 0 0 0 $radius +circle c2 0 0 0 $radius+$distExpected + +set start {0.0 0.5*pi pi 1.5*pi 2.0*pi} +set delta {pi/4.0 pi/3.0 pi/2.0 0.55*pi 0.99*pi pi 1.1*pi} + +foreach f $start { + foreach d $delta { + trim cc1 c1 $f $f+$d + trim cc2 c2 $f $f+$d + + set extr [extrema cc1 cc2] + if {[regexp {Infinite number of extremas, distance = ([-0-9.+eE]+)} $extr full dist]} { + if {[expr abs($dist - $distExpected)] < 1.e-7} { + puts "OK" + } else { + puts "Error: wrong distance $dist instead of $distExpected expected" + } + } else { + puts "Error: non-parallel curves" + } + } +} diff --git a/tests/bugs/modalg_7/bug32874_4 b/tests/bugs/modalg_7/bug32874_4 new file mode 100644 index 0000000000..9fc0988886 --- /dev/null +++ b/tests/bugs/modalg_7/bug32874_4 @@ -0,0 +1,30 @@ +puts "=================================================" +puts "0032874: IsParallel() method of Extrema_ExtCC does not give same results in OCC 7.6.0 vs OCC 7.5.0" +puts "=================================================" +puts "" + +set radius 0.001 +set distExpected 1000.0 +circle c1 0 0 0 $radius +circle c2 0 0 0 $radius+$distExpected + +set start {0.0 0.5*pi pi 1.5*pi 2.0*pi} +set delta {pi/4.0 pi/3.0 pi/2.0 0.55*pi 0.99*pi pi 1.1*pi} + +foreach f $start { + foreach d $delta { + trim cc1 c1 $f $f+$d + trim cc2 c2 $f $f+$d + + set extr [extrema cc1 cc2] + if {[regexp {Infinite number of extremas, distance = ([-0-9.+eE]+)} $extr full dist]} { + if {[expr abs($dist - $distExpected)] < 1.e-7} { + puts "OK" + } else { + puts "Error: wrong distance $dist instead of $distExpected expected" + } + } else { + puts "Error: non-parallel curves" + } + } +} diff --git a/tests/bugs/modalg_7/bug32874_5 b/tests/bugs/modalg_7/bug32874_5 new file mode 100644 index 0000000000..4cb2e68340 --- /dev/null +++ b/tests/bugs/modalg_7/bug32874_5 @@ -0,0 +1,30 @@ +puts "=================================================" +puts "0032874: IsParallel() method of Extrema_ExtCC does not give same results in OCC 7.6.0 vs OCC 7.5.0" +puts "=================================================" +puts "" + +set radius 1000.0 +set distExpected 1.e-5 +circle c1 0 0 0 $radius +circle c2 0 0 0 $radius-$distExpected + +set start {0.0 0.5*pi pi 1.5*pi 2.0*pi} +set delta {pi/4.0 pi/3.0 pi/2.0 0.55*pi 0.99*pi pi 1.1*pi} + +foreach f $start { + foreach d $delta { + trim cc1 c1 $f $f+$d + trim cc2 c2 $f $f+$d + + set extr [extrema cc1 cc2] + if {[regexp {Infinite number of extremas, distance = ([-0-9.+eE]+)} $extr full dist]} { + if {[expr abs($dist - $distExpected)] < 1.e-7} { + puts "OK" + } else { + puts "Error: wrong distance $dist instead of $distExpected expected" + } + } else { + puts "Error: non-parallel curves" + } + } +} From 878ea8cd2b3b7c3b3b0c8a48a0649af85729968c Mon Sep 17 00:00:00 2001 From: ddzama Date: Thu, 31 Mar 2022 07:26:39 +0300 Subject: [PATCH 253/639] 0032910: Coding Rules - fix uninitialized class fields in constructor initialization block reported by VS2019/C++20 Microsoft Visual Studio Professional 2019 Version 16.11.11 std=c++20 Get rid of warnings about uninitialized class fields in constructor initialization block. --- src/NCollection/NCollection_BaseVector.hxx | 3 ++- src/SelectMgr/SelectMgr_BVHThreadPool.hxx | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/NCollection/NCollection_BaseVector.hxx b/src/NCollection/NCollection_BaseVector.hxx index db68b8613d..7c8941818a 100755 --- a/src/NCollection/NCollection_BaseVector.hxx +++ b/src/NCollection/NCollection_BaseVector.hxx @@ -69,7 +69,8 @@ protected: { protected: Iterator() - : myICurBlock (0), + : myVector (nullptr), + myICurBlock (0), myIEndBlock (0), myCurIndex (0), myEndIndex (0) {} diff --git a/src/SelectMgr/SelectMgr_BVHThreadPool.hxx b/src/SelectMgr/SelectMgr_BVHThreadPool.hxx index 84d8ab3765..3dd7afd0ad 100644 --- a/src/SelectMgr/SelectMgr_BVHThreadPool.hxx +++ b/src/SelectMgr/SelectMgr_BVHThreadPool.hxx @@ -42,6 +42,8 @@ public: BVHThread() : OSD_Thread(), + myPool(nullptr), + myMutex(), myToCatchFpe (Standard_False) { From d31e5dbbb4da27d08e1a4d4faffd77d4ec6ed6a9 Mon Sep 17 00:00:00 2001 From: ddzama Date: Thu, 31 Mar 2022 09:19:35 +0300 Subject: [PATCH 254/639] 0032916: Coding Rules - eliminate MSVS warning C26451 on VS2019/C++20 (Arithmetic overflow: Using operator '+' on a 4 byte value...) Microsoft Visual Studio Professional 2019 Version 16.11.11 std=c++20 Get rid of `Warning C26451 Arithmetic overflow: Using operator '+' on a 4 byte value and then casting the result to a 8 byte value. Cast the value to the wider type before calling operator '+' to avoid overflow (io.2)` --- src/QANCollection/QANCollection_Stl.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/QANCollection/QANCollection_Stl.cxx b/src/QANCollection/QANCollection_Stl.cxx index c40c421e8d..656fbbfdbd 100644 --- a/src/QANCollection/QANCollection_Stl.cxx +++ b/src/QANCollection/QANCollection_Stl.cxx @@ -1115,7 +1115,7 @@ void TestPerformanceMapAccess(Draw_Interpretor& di) aTimer.Reset(); aTimer.Start(); { - for (Standard_Integer anIdx = 0; anIdx < 10000; ++anIdx) + for (size_t anIdx = 0; anIdx < 10000; ++anIdx) { if (aSet.find (aVec[anIdx + 1000]) == aSet.end()) aResult = Standard_False; @@ -1136,7 +1136,7 @@ void TestPerformanceMapAccess(Draw_Interpretor& di) aTimer.Reset(); aTimer.Start(); { - for (Standard_Integer anIdx = 0; anIdx < 10000; ++anIdx) + for (size_t anIdx = 0; anIdx < 10000; ++anIdx) { if (!aCollec->Contains (aVec[anIdx + 1000])) aResult = Standard_False; From e455c54bf0282a20931166b63a2fff0cbf670327 Mon Sep 17 00:00:00 2001 From: ddzama Date: Thu, 31 Mar 2022 10:46:02 +0300 Subject: [PATCH 255/639] 0032918: Coding Rules - suppress MSVS warnings from 3rdparty `rapidjson` on VS2019/C++20 Microsoft Visual Studio Professional 2019 Version 16.11.11 std=c++20 Disable warning messages, occures in rapidjson library. --- src/RWGltf/RWGltf_GltfJsonParser.hxx | 4 +++- src/RWGltf/RWGltf_GltfOStreamWriter.hxx | 3 +++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/RWGltf/RWGltf_GltfJsonParser.hxx b/src/RWGltf/RWGltf_GltfJsonParser.hxx index 234f4bf661..6b078ed12e 100644 --- a/src/RWGltf/RWGltf_GltfJsonParser.hxx +++ b/src/RWGltf/RWGltf_GltfJsonParser.hxx @@ -43,12 +43,14 @@ #ifdef HAVE_RAPIDJSON //#define RAPIDJSON_ASSERT + #include #include #include #include #include #include - + #include + typedef rapidjson::Document::ValueType RWGltf_JsonValue; #endif diff --git a/src/RWGltf/RWGltf_GltfOStreamWriter.hxx b/src/RWGltf/RWGltf_GltfOStreamWriter.hxx index 1746997acd..a10ac96942 100644 --- a/src/RWGltf/RWGltf_GltfOStreamWriter.hxx +++ b/src/RWGltf/RWGltf_GltfOStreamWriter.hxx @@ -14,8 +14,11 @@ #ifndef _RWGltf_GltfOStreamWriter_HeaderFile #define _RWGltf_GltfOStreamWriter_HeaderFile +// disable warnings, occures in rapidjson +#include #include #include +#include //! rapidjson::Writer wrapper for forward declaration. class RWGltf_GltfOStreamWriter : public rapidjson::Writer From 7021de2fe7a69d4c788ccf43b8b096dbcc8597c8 Mon Sep 17 00:00:00 2001 From: ddzama Date: Wed, 30 Mar 2022 12:30:01 +0300 Subject: [PATCH 256/639] 0032909: Coding Rules - replace (removed from C++17) `std::random_shuffle` with `std::shuffle` for random permutation algorithm Since C++17 the accessible version of permutation function left the function: template< class RandomIt, class URBG > void shuffle( RandomIt first, RandomIt last, URBG&& g ); See details and example of use: https://en.cppreference.com/w/cpp/algorithm/random_shuffle --- src/QANCollection/QANCollection_Stl.cxx | 31 +++++++++++-------------- 1 file changed, 14 insertions(+), 17 deletions(-) diff --git a/src/QANCollection/QANCollection_Stl.cxx b/src/QANCollection/QANCollection_Stl.cxx index 656fbbfdbd..81528e633d 100644 --- a/src/QANCollection/QANCollection_Stl.cxx +++ b/src/QANCollection/QANCollection_Stl.cxx @@ -38,18 +38,11 @@ #include #include #include +#include //! Size of test data sets. const int THE_TEST_SIZE = 5000; -namespace { - // Auxiliary class to use in std::random_shuffle() - struct RandomGenerator { - RandomGenerator () { srand(1); } - ptrdiff_t operator () (ptrdiff_t upper) const { return rand() % upper; } - }; -} - template struct CollectionFiller { @@ -951,11 +944,13 @@ void TestPerformanceRandomIterator(Draw_Interpretor& di) aTimer.Reset(); aTimer.Start(); { - RandomGenerator aRandomGen; + std::random_device ran_dev; + std::mt19937 gen(ran_dev()); + gen.seed(0x03ac38f2); for (Standard_Integer anIdx = 0; anIdx < 10; ++anIdx) { - std::sort (aVector->begin(), aVector->end()); - std::random_shuffle (aVector->begin(), aVector->end(), aRandomGen); + std::sort (aVector->begin(), aVector->end()); + std::shuffle (aVector->begin(), aVector->end(), gen); } } aTimer.Stop(); @@ -965,11 +960,13 @@ void TestPerformanceRandomIterator(Draw_Interpretor& di) aTimer.Reset(); aTimer.Start(); { - RandomGenerator aRandomGen; + std::random_device ran_dev; + std::mt19937 gen(ran_dev()); + gen.seed(0x03ac38f2); for (Standard_Integer anIdx = 0; anIdx < 10; ++anIdx) { - std::sort (aCollec->begin(), aCollec->end()); - std::random_shuffle (aCollec->begin(), aCollec->end(), aRandomGen); + std::sort (aCollec->begin(), aCollec->end()); + std::shuffle (aCollec->begin(), aCollec->end(), gen); } } aTimer.Stop(); @@ -981,7 +978,7 @@ void TestPerformanceRandomIterator(Draw_Interpretor& di) // check that result is the same if ( ! std::equal (aVector->begin(), aVector->end(), aCollec->begin()) ) - di << "Error: sequences are not the same at the end!\n"; + di << "Error: sequences are not the same at the end (random iterator)!\n"; delete aVector; delete aCollec; @@ -1033,7 +1030,7 @@ void TestPerformanceForwardIterator(Draw_Interpretor& di) // check that result is the same if ( ! std::equal (aVector->begin(), aVector->end(), aCollec->begin()) ) - di << "Error: sequences are not the same at the end!\n"; + di << "Error: sequences are not the same at the end (forward iterator)!\n"; delete aVector; delete aCollec; @@ -1085,7 +1082,7 @@ void TestPerformanceBidirIterator(Draw_Interpretor& di) // check that result is the same if ( ! std::equal (aVector->begin(), aVector->end(), aCollec->begin()) ) - di << "Error: sequences are not the same at the end!\n"; + di << "Error: sequences are not the same at the end (bidir iterator)!\n"; delete aVector; delete aCollec; From 08d9c0ae45d7f300d4b30dc9a9e327392a84b81a Mon Sep 17 00:00:00 2001 From: kgv Date: Sat, 9 Apr 2022 15:04:23 +0300 Subject: [PATCH 257/639] 0032926: Coding, StdPrs_ToolTriangulatedShape::Normal() - range of "for" not correspond to the NCollection index which run in "for" Obsolete method has been removed. --- dox/upgrade/upgrade.md | 5 ++++ src/StdPrs/StdPrs_ToolTriangulatedShape.cxx | 30 --------------------- src/StdPrs/StdPrs_ToolTriangulatedShape.hxx | 12 ++------- 3 files changed, 7 insertions(+), 40 deletions(-) diff --git a/dox/upgrade/upgrade.md b/dox/upgrade/upgrade.md index 72720303c3..329bbacb9f 100644 --- a/dox/upgrade/upgrade.md +++ b/dox/upgrade/upgrade.md @@ -2333,3 +2333,8 @@ Applications extending OCCT 3D Viewer and calling OpenGL functions directly (lik This header, as well as `OpenGl_GlCore20.hxx` and similar, no more include system OpenGL / OpenGL ES headers to define function table. Application code calling OpenGL functions directly should be changed to either use `OpenGl_Context::core11fwd` (as designed) or to include system OpenGL headers in advance (with help of `OpenGl_GlNative.hxx`). + +@subsection upgrade_occt770_tooltriangulatedshape StdPrs_ToolTriangulatedShape + +Method `StdPrs_ToolTriangulatedShape::Normal()` has been removed. +Please use `BRepLib_ToolTriangulatedShape::ComputeNormals()` to fill in normal attributes in triangulation and fetch them directly using `Poly_Triangulation::Normal()`. diff --git a/src/StdPrs/StdPrs_ToolTriangulatedShape.cxx b/src/StdPrs/StdPrs_ToolTriangulatedShape.cxx index 4dcc091637..109417b4cf 100644 --- a/src/StdPrs/StdPrs_ToolTriangulatedShape.cxx +++ b/src/StdPrs/StdPrs_ToolTriangulatedShape.cxx @@ -119,36 +119,6 @@ Standard_Boolean StdPrs_ToolTriangulatedShape::IsClosed (const TopoDS_Shape& the } } -//======================================================================= -//function : Normal -//purpose : -//======================================================================= -void StdPrs_ToolTriangulatedShape::Normal (const TopoDS_Face& theFace, - Poly_Connect& thePolyConnect, - TColgp_Array1OfDir& theNormals) -{ - const Handle(Poly_Triangulation)& aPolyTri = thePolyConnect.Triangulation(); - if (!aPolyTri->HasNormals()) - { - ComputeNormals (theFace, aPolyTri, thePolyConnect); - } - - gp_Vec3f aNormal; - for (Standard_Integer aNodeIter = 1; aNodeIter <= aPolyTri->NbNodes(); ++aNodeIter) - { - aPolyTri->Normal (aNodeIter, aNormal); - theNormals.ChangeValue (aNodeIter).SetCoord (aNormal.x(), aNormal.y(), aNormal.z()); - } - - if (theFace.Orientation() == TopAbs_REVERSED) - { - for (Standard_Integer aNodeIter = 1; aNodeIter <= aPolyTri->NbNodes(); ++aNodeIter) - { - theNormals.ChangeValue (aNodeIter).Reverse(); - } - } -} - //======================================================================= //function : GetDeflection //purpose : diff --git a/src/StdPrs/StdPrs_ToolTriangulatedShape.hxx b/src/StdPrs/StdPrs_ToolTriangulatedShape.hxx index 7e59fd3cd5..1f75067ca1 100644 --- a/src/StdPrs/StdPrs_ToolTriangulatedShape.hxx +++ b/src/StdPrs/StdPrs_ToolTriangulatedShape.hxx @@ -32,14 +32,6 @@ public: //! @return true if shape is closed manifold Solid or compound of such Solids.
Standard_EXPORT static Standard_Boolean IsClosed (const TopoDS_Shape& theShape); - //! Evaluate normals for a triangle of a face. - //! @param[in] theFace the face. - //! @param[in] thePolyConnect the definition of a face triangulation. - //! @param[out] theNormals the array of normals for each triangle. - Standard_EXPORT static void Normal (const TopoDS_Face& theFace, - Poly_Connect& thePolyConnect, - TColgp_Array1OfDir& theNormals); - //! Computes the absolute deflection value depending on the type of deflection in theDrawer: //!
    //!
  • Aspect_TOD_RELATIVE: the absolute deflection is computed using the relative @@ -49,7 +41,7 @@ public: //! In case of the type of deflection in theDrawer computed relative deflection for shape is stored as absolute deflection. //! It is necessary to use it later on for sub-shapes. //! This function should always be used to compute the deflection value for building - //! discrete representations of the shape (triangualtion, wireframe) to avoid incosistencies + //! discrete representations of the shape (triangulation, wireframe) to avoid inconsistencies //! between different representations of the shape and undesirable visual artifacts. Standard_EXPORT static Standard_Real GetDeflection (const TopoDS_Shape& theShape, const Handle(Prs3d_Drawer)& theDrawer); @@ -63,7 +55,7 @@ public: //! Validates triangulation within the shape and performs tessellation if necessary. //! @param theShape [in] the shape. //! @param theDrawer [in] the display settings. - //! @return true if tesselation was recomputed and false otherwise. + //! @return true if tessellation was recomputed and false otherwise. Standard_EXPORT static Standard_Boolean Tessellate (const TopoDS_Shape& theShape, const Handle(Prs3d_Drawer)& theDrawer); From fc41d3b1c01a8d483f92a92e66d048adbcba09b5 Mon Sep 17 00:00:00 2001 From: ifv Date: Sun, 10 Apr 2022 16:56:46 +0300 Subject: [PATCH 258/639] 0032842: Modeling Data - a regression in conversion of a face to bspline GeomConvert/GeomConvert_1.cxx - forbid using CheckAndSegment if trim is out of base period when converting trimmed torus tests/bugs/moddata_3/bug32842 - test case added --- src/GeomConvert/GeomConvert_1.cxx | 10 ++++++++-- tests/bugs/moddata_3/bug32842 | 17 +++++++++++++++++ 2 files changed, 25 insertions(+), 2 deletions(-) create mode 100644 tests/bugs/moddata_3/bug32842 diff --git a/src/GeomConvert/GeomConvert_1.cxx b/src/GeomConvert/GeomConvert_1.cxx index ec702460b2..b901da74df 100644 --- a/src/GeomConvert/GeomConvert_1.cxx +++ b/src/GeomConvert/GeomConvert_1.cxx @@ -477,7 +477,13 @@ Handle(Geom_BSplineSurface) GeomConvert::SurfaceToBSplineSurface Handle(Geom_ToroidalSurface)::DownCast(Surf); gp_Torus Tr = TheElSurf->Torus(); - if (isUClosed) { + // + // if isUClosed = true and U trim does not coinside with first period of torus, + // method CheckAndSegment shifts position of U seam boundary of surface. + // probably bug? So, for this case we must build not periodic surface. + Standard_Boolean isUFirstPeriod = !(UFirst < 0. || ULast > 2.*M_PI); + Standard_Boolean isVFirstPeriod = !(VFirst < 0. || VLast > 2.*M_PI); + if (isUClosed && isUFirstPeriod) { Convert_TorusToBSplineSurface Convert (Tr, VFirst, VLast, Standard_False); TheSurface = BSplineSurfaceBuilder (Convert); @@ -487,7 +493,7 @@ Handle(Geom_BSplineSurface) GeomConvert::SurfaceToBSplineSurface TheSurface->CheckAndSegment(UFirst, ULast, VFirst, VLast); } } - else if (Strim->IsVClosed()) { + else if (Strim->IsVClosed() && isVFirstPeriod) { Convert_TorusToBSplineSurface Convert (Tr, UFirst, ULast); TheSurface = BSplineSurfaceBuilder (Convert); Standard_Integer aNbK = TheSurface->NbVKnots(); diff --git a/tests/bugs/moddata_3/bug32842 b/tests/bugs/moddata_3/bug32842 new file mode 100644 index 0000000000..2dd884d377 --- /dev/null +++ b/tests/bugs/moddata_3/bug32842 @@ -0,0 +1,17 @@ +puts "===========================================================" +puts "0032842: Modeling Data - a regression in conversion of a face to bspline" +puts "===========================================================" +puts "" + +restore [locate_data_file bug32842.brep] s +nurbsconvert bs s +explode bs e +pcurve pc2 bs_2 bs +bounds pc2 t1 t2 +2dcvalue pc2 t1 x1 y1 +2dcvalue pc2 t2 x2 y2 +mksurface surf bs +bounds surf u1 u2 v1 v2 + +checkreal "U21" [dval (u2-x1)] 0 1.e-7 1.e-7 +checkreal "U22" [dval (u2-x2)] 0 1.e-7 1.e-7 From 1caf5fd3170e088c72e6521be87afbec24d421e6 Mon Sep 17 00:00:00 2001 From: kgv Date: Fri, 8 Apr 2022 21:11:59 +0300 Subject: [PATCH 259/639] 0032924: Configuration, CMake - export INTERFACE_INCLUDE_DIRECTORIES within targets Add 'INCLUDES' property within INSTALL targets. --- adm/cmake/occt_toolkit.cmake | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/adm/cmake/occt_toolkit.cmake b/adm/cmake/occt_toolkit.cmake index b3c83067b8..ed5f142a1d 100644 --- a/adm/cmake/occt_toolkit.cmake +++ b/adm/cmake/occt_toolkit.cmake @@ -255,7 +255,8 @@ else() EXPORT OpenCASCADE${CURRENT_MODULE}Targets RUNTIME DESTINATION "${INSTALL_DIR_BIN}\${OCCT_INSTALL_BIN_LETTER}" ARCHIVE DESTINATION "${INSTALL_DIR_LIB}\${OCCT_INSTALL_BIN_LETTER}" - LIBRARY DESTINATION "${INSTALL_DIR_LIB}\${OCCT_INSTALL_BIN_LETTER}") + LIBRARY DESTINATION "${INSTALL_DIR_LIB}\${OCCT_INSTALL_BIN_LETTER}" + INCLUDES DESTINATION ${INSTALL_DIR_INCLUDE}) if (NOT WIN32) if (BUILD_SHARED_LIBS AND NOT "${BUILD_SHARED_LIBRARY_NAME_POSTFIX}" STREQUAL "") From 179fb3466168cea55c96450a4328ac21d2a656ab Mon Sep 17 00:00:00 2001 From: atychini Date: Fri, 4 Feb 2022 19:14:16 +0300 Subject: [PATCH 260/639] 0029435: Data Exchange - Exporting wires consisting of more than one edge results in loss of color data in IGES Colors wasn't read correctly because of incorrect curve transfers in IGESToBRep_TopoCurve.cxx I added new calls to SetShapeResult() at the necessary places. Also in the IGESCAFControl_Writer.cxx I added new condition because of the possible NULL exception. --- src/IGESCAFControl/IGESCAFControl_Writer.cxx | 2 +- src/IGESToBRep/IGESToBRep_TopoCurve.cxx | 8 ++--- tests/bugs/iges/bug26047 | 2 +- tests/bugs/iges/bug29435 | 34 ++++++++++++++++++ tests/bugs/iges/bug29435_1 | 36 ++++++++++++++++++++ tests/de/iges_1/A1 | 2 +- tests/de/iges_1/A2 | 2 +- tests/de/iges_1/A6 | 2 +- tests/de/iges_1/A7 | 2 +- tests/de/iges_1/A8 | 2 +- tests/de/iges_1/B1 | 2 +- tests/de/iges_1/B2 | 2 +- tests/de/iges_1/B3 | 2 +- tests/de/iges_1/B4 | 7 ++-- tests/de/iges_1/B5 | 2 +- tests/de/iges_1/B6 | 2 +- tests/de/iges_1/B7 | 2 +- tests/de/iges_1/B8 | 2 +- tests/de/iges_1/B9 | 2 +- tests/de/iges_1/C1 | 2 +- tests/de/iges_1/C3 | 2 +- tests/de/iges_1/C5 | 2 +- tests/de/iges_1/C7 | 7 ++-- tests/de/iges_1/C8 | 5 +-- tests/de/iges_1/D1 | 2 +- tests/de/iges_1/D3 | 2 +- tests/de/iges_1/D4 | 2 +- tests/de/iges_1/D5 | 2 +- tests/de/iges_1/D6 | 2 +- tests/de/iges_1/D7 | 5 +-- tests/de/iges_1/D8 | 2 +- tests/de/iges_1/E2 | 2 +- tests/de/iges_1/E3 | 2 +- tests/de/iges_1/E4 | 2 +- tests/de/iges_1/E5 | 2 +- tests/de/iges_1/E6 | 2 +- tests/de/iges_1/E7 | 2 +- tests/de/iges_1/E9 | 2 +- tests/de/iges_1/F1 | 2 +- tests/de/iges_1/F2 | 2 +- tests/de/iges_1/F4 | 2 +- tests/de/iges_1/F5 | 4 +-- tests/de/iges_1/F6 | 2 +- tests/de/iges_1/F7 | 2 +- tests/de/iges_1/F9 | 2 +- tests/de/iges_1/G1 | 2 +- tests/de/iges_1/G7 | 4 +-- tests/de/iges_1/G8 | 2 +- tests/de/iges_1/G9 | 2 +- tests/de/iges_1/H1 | 4 +-- tests/de/iges_1/H2 | 2 +- tests/de/iges_1/H4 | 2 +- tests/de/iges_1/H5 | 4 +-- tests/de/iges_1/H6 | 4 +-- tests/de/iges_1/H7 | 4 +-- tests/de/iges_1/H8 | 2 +- tests/de/iges_1/H9 | 2 +- tests/de/iges_1/I1 | 4 +-- tests/de/iges_1/I2 | 2 +- tests/de/iges_1/I3 | 2 +- tests/de/iges_1/I4 | 4 +-- tests/de/iges_1/I5 | 9 ++--- tests/de/iges_1/I6 | 2 +- tests/de/iges_1/I7 | 2 +- tests/de/iges_1/I8 | 4 +-- tests/de/iges_1/I9 | 2 +- tests/de/iges_1/J1 | 2 +- tests/de/iges_1/J2 | 4 +-- tests/de/iges_1/J3 | 4 +-- tests/de/iges_1/J4 | 7 ++-- tests/de/iges_1/J5 | 2 +- tests/de/iges_1/J6 | 5 +-- tests/de/iges_1/J7 | 2 +- tests/de/iges_1/J8 | 2 +- tests/de/iges_1/K1 | 4 +-- tests/de/iges_1/K2 | 2 +- tests/de/iges_1/K3 | 4 +-- tests/de/iges_1/K4 | 4 +-- tests/de/iges_1/K5 | 2 +- tests/de/iges_1/K6 | 2 +- tests/de/iges_1/K7 | 2 +- tests/de/iges_1/K9 | 7 ++-- tests/de/iges_1/L1 | 4 +-- tests/de/iges_1/L2 | 4 +-- tests/de/iges_1/L3 | 2 +- tests/de/iges_1/L4 | 4 +-- tests/de/iges_1/L6 | 4 +-- tests/de/iges_1/L7 | 2 +- tests/de/iges_1/L8 | 2 +- tests/de/iges_1/L9 | 4 +-- tests/de/iges_1/M1 | 6 ++-- tests/de/iges_1/M2 | 4 +-- tests/de/iges_1/M3 | 2 +- tests/de/iges_1/M4 | 2 +- tests/de/iges_1/M5 | 6 ++-- tests/de/iges_1/M6 | 9 ++--- tests/de/iges_1/M7 | 4 +-- tests/de/iges_1/M8 | 2 +- tests/de/iges_1/M9 | 4 +-- tests/de/iges_1/N1 | 4 +-- tests/de/iges_1/N2 | 2 +- tests/de/iges_1/N3 | 2 +- tests/de/iges_1/N4 | 4 +-- tests/de/iges_1/N5 | 4 +-- tests/de/iges_1/N6 | 2 +- tests/de/iges_1/N7 | 4 +-- tests/de/iges_1/O1 | 6 ++-- tests/de/iges_1/O2 | 2 +- tests/de/iges_1/O3 | 11 +++--- tests/de/iges_1/O4 | 6 ++-- tests/de/iges_1/O5 | 2 +- tests/de/iges_1/O6 | 4 +-- tests/de/iges_1/O7 | 4 +-- tests/de/iges_1/O8 | 4 +-- tests/de/iges_1/O9 | 4 +-- tests/de/iges_1/P1 | 4 +-- tests/de/iges_1/P2 | 11 +++--- tests/de/iges_1/P3 | 2 +- tests/de/iges_1/P4 | 4 +-- tests/de/iges_1/P5 | 6 ++-- tests/de/iges_1/P6 | 4 +-- tests/de/iges_1/P7 | 6 ++-- tests/de/iges_1/P9 | 4 +-- tests/de/iges_1/Q1 | 2 +- tests/de/iges_1/Q2 | 2 +- tests/de/iges_1/Q3 | 9 +++-- tests/de/iges_1/Q4 | 9 +++-- tests/de/iges_1/Q5 | 11 +++--- tests/de/iges_1/Q6 | 8 ++--- tests/de/iges_1/Q7 | 4 +-- tests/de/iges_1/Q8 | 2 +- tests/de/iges_1/Q9 | 2 +- tests/de/iges_1/R1 | 4 +-- tests/de/iges_1/R2 | 2 +- tests/de/iges_1/R3 | 7 ++-- tests/de/iges_1/R4 | 4 +-- tests/de/iges_1/R5 | 2 +- tests/de/iges_1/R6 | 4 +-- tests/de/iges_1/R7 | 4 +-- tests/de/iges_1/R8 | 6 ++-- tests/de/iges_2/A1 | 2 +- tests/de/iges_2/A2 | 2 +- tests/de/iges_2/A3 | 2 +- tests/de/iges_2/A4 | 4 +-- tests/de/iges_2/A5 | 4 +-- tests/de/iges_2/A6 | 2 +- tests/de/iges_2/A7 | 4 +-- tests/de/iges_2/A8 | 4 +-- tests/de/iges_2/A9 | 6 ++-- tests/de/iges_2/B1 | 8 ++--- tests/de/iges_2/B2 | 4 +-- tests/de/iges_2/B3 | 2 +- tests/de/iges_2/B4 | 6 ++-- tests/de/iges_2/B5 | 4 +-- tests/de/iges_2/B6 | 4 +-- tests/de/iges_2/B7 | 4 +-- tests/de/iges_2/B8 | 5 +-- tests/de/iges_2/C1 | 4 +-- tests/de/iges_2/C2 | 4 +-- tests/de/iges_2/C3 | 4 +-- tests/de/iges_2/C4 | 11 +++--- tests/de/iges_2/C5 | 2 +- tests/de/iges_2/C7 | 4 +-- tests/de/iges_2/C8 | 2 +- tests/de/iges_2/C9 | 4 +-- tests/de/iges_2/D1 | 2 +- tests/de/iges_2/D2 | 4 +-- tests/de/iges_2/D3 | 6 ++-- tests/de/iges_2/D4 | 9 +++-- tests/de/iges_2/D5 | 11 +++--- tests/de/iges_2/D6 | 4 +-- tests/de/iges_2/D7 | 4 +-- tests/de/iges_2/D8 | 12 +++---- tests/de/iges_2/D9 | 2 +- tests/de/iges_2/E1 | 2 +- tests/de/iges_2/E2 | 4 +-- tests/de/iges_2/E3 | 2 +- tests/de/iges_2/E4 | 6 ++-- tests/de/iges_2/E5 | 4 +-- tests/de/iges_2/E6 | 4 +-- tests/de/iges_2/E7 | 4 +-- tests/de/iges_2/E8 | 9 +++-- tests/de/iges_2/E9 | 2 +- tests/de/iges_2/F1 | 4 +-- tests/de/iges_2/F2 | 9 +++-- tests/de/iges_2/F3 | 8 ++--- tests/de/iges_2/F4 | 4 +-- tests/de/iges_2/F5 | 4 +-- tests/de/iges_2/F6 | 4 +-- tests/de/iges_2/F7 | 4 +-- tests/de/iges_2/F8 | 2 +- tests/de/iges_2/F9 | 6 ++-- tests/de/iges_2/G1 | 9 ++--- tests/de/iges_2/G2 | 4 +-- tests/de/iges_2/G3 | 2 +- tests/de/iges_2/G5 | 4 +-- tests/de/iges_2/G6 | 2 +- tests/de/iges_2/G7 | 4 +-- tests/de/iges_2/G8 | 2 +- tests/de/iges_2/G9 | 4 +-- tests/de/iges_2/H2 | 9 +++-- tests/de/iges_2/H3 | 6 ++-- tests/de/iges_2/H4 | 13 ++++--- tests/de/iges_2/H5 | 4 +-- tests/de/iges_2/H6 | 4 +-- tests/de/iges_2/H7 | 2 +- tests/de/iges_2/H8 | 2 +- tests/de/iges_2/H9 | 5 +-- tests/de/iges_2/I1 | 8 ++--- tests/de/iges_2/I2 | 2 +- tests/de/iges_2/I3 | 8 ++--- tests/de/iges_2/I4 | 4 +-- tests/de/iges_2/I5 | 6 ++-- tests/de/iges_2/I6 | 6 ++-- tests/de/iges_2/I7 | 7 ++-- tests/de/iges_2/I8 | 2 +- tests/de/iges_2/I9 | 4 +-- tests/de/iges_2/J1 | 2 +- tests/de/iges_3/A1 | 8 ++--- tests/de/iges_3/A2 | 4 +-- tests/de/iges_3/A3 | 8 ++--- tests/de/iges_3/A4 | 4 +-- tests/de/iges_3/A5 | 7 ++-- tests/de/iges_3/A6 | 7 ++-- tests/de/iges_3/A7 | 4 +-- tests/de/iges_3/A8 | 4 +-- tests/de/iges_3/A9 | 6 ++-- tests/de/iges_3/B1 | 4 +-- tests/de/iges_3/B2 | 2 +- 229 files changed, 526 insertions(+), 448 deletions(-) create mode 100644 tests/bugs/iges/bug29435 create mode 100644 tests/bugs/iges/bug29435_1 diff --git a/src/IGESCAFControl/IGESCAFControl_Writer.cxx b/src/IGESCAFControl/IGESCAFControl_Writer.cxx index 819420a7a0..36854a6fc0 100644 --- a/src/IGESCAFControl/IGESCAFControl_Writer.cxx +++ b/src/IGESCAFControl/IGESCAFControl_Writer.cxx @@ -102,7 +102,7 @@ namespace } } - if (!hasReferredShape && !hasComponents) + if (!hasReferredShape && !hasComponents && !thePrevName.IsNull()) { TopoDS_Shape aShape; if (!XCAFDoc_ShapeTool::GetShape (theLabel, aShape)) return; diff --git a/src/IGESToBRep/IGESToBRep_TopoCurve.cxx b/src/IGESToBRep/IGESToBRep_TopoCurve.cxx index 400ba756e5..7cd9b07ac7 100644 --- a/src/IGESToBRep/IGESToBRep_TopoCurve.cxx +++ b/src/IGESToBRep/IGESToBRep_TopoCurve.cxx @@ -391,7 +391,7 @@ TopoDS_Shape IGESToBRep_TopoCurve::Transfer2dCompositeCurve // SendWarning(start,Msg1036); // AddWarning(start, "The Trsf cannot be applied to the entity."); //} - return res; + return res; } //======================================================================= @@ -704,7 +704,7 @@ TopoDS_Shape IGESToBRep_TopoCurve::TransferOffsetCurve } //AddWarning(start, "Transformation skipped (not a similarity)"); } - + SetShapeResult(start, res); return res; } @@ -798,6 +798,7 @@ TopoDS_Shape IGESToBRep_TopoCurve::Transfer2dOffsetCurve res = sfw->Wire(); } } + SetShapeResult(start, res); return res; } @@ -1041,7 +1042,7 @@ TopoDS_Shape IGESToBRep_TopoCurve::TransferTopoBasicCurve if (start->IsKind(STANDARD_TYPE(IGESGeom_CircularArc)) && Handle(IGESGeom_CircularArc)::DownCast (start)->IsClosed()) TheBadCase = Standard_True; - + SetShapeResult(start, myshape); return myedge; } @@ -1214,7 +1215,6 @@ TopoDS_Shape IGESToBRep_TopoCurve::Transfer2dTopoBasicCurve if (start->IsKind(STANDARD_TYPE(IGESGeom_CircularArc)) && Handle(IGESGeom_CircularArc)::DownCast (start)->IsClosed()) TheBadCase = Standard_True; - return myedge; } diff --git a/tests/bugs/iges/bug26047 b/tests/bugs/iges/bug26047 index 30afb375ed..bbddc1d3d4 100644 --- a/tests/bugs/iges/bug26047 +++ b/tests/bugs/iges/bug26047 @@ -87,6 +87,6 @@ if { "$aColorOrig" == "$aColorNew" } { set xst [ XStat D_Copy 1] regexp {Number +of +labels +with +color +link += +([-0-9.+eE]+)} $xst full nbshcolor_Copy -if {$nbshcolor_Copy != 31} { +if {$nbshcolor_Copy != 33} { puts "Error: incorrect count of color links to shapes" } diff --git a/tests/bugs/iges/bug29435 b/tests/bugs/iges/bug29435 new file mode 100644 index 0000000000..f1f27a21ad --- /dev/null +++ b/tests/bugs/iges/bug29435 @@ -0,0 +1,34 @@ +puts "============" +puts "0029435: Data Exchange, Exporting wires consisting of more than one edge results in loss of color data in IGES" +puts "============" + +pload XDE +catch { Close D } +catch { Close D1 } + +vertex v1 -25 0 0 +vertex v2 -25 -7.5 0 +edge e1 v1 v2 + +point p2 -25 -7.5 0 +point p3 0 -15 0 +point p4 25 -7.5 0 +catch {gcarc arc cir p2 p3 p4} +mkedge e2 arc + +wire w1 e1 e2 + +XNewDoc D +XAddShape D w1 1 +XSetColor D 0:1:1:1 128 128 0 + +WriteIges D $imagedir/${casename}.igs +ReadIges D1 $imagedir/${casename}.igs + +set color_orig [XGetAllColors D] +set color_comp [XGetAllColors D1] + +if { $color_orig != $color_comp } { + puts "Error: incorrect color transfer" +} +file delete $imagedir/${casename}.igs diff --git a/tests/bugs/iges/bug29435_1 b/tests/bugs/iges/bug29435_1 new file mode 100644 index 0000000000..d384decd1a --- /dev/null +++ b/tests/bugs/iges/bug29435_1 @@ -0,0 +1,36 @@ +puts "============" +puts "0029435: Data Exchange, Exporting wires consisting of more than one edge results in loss of color data in IGES" +puts "============" + +pload XDE MODELING VISUALIZATION +catch { Close D } +catch { Close D1 } + +vertex v1 -25 0 0 +vertex v2 -25 -7.5 0 +edge e1 v1 v2 + +point p2 -25 -7.5 0 +point p3 0 -15 0 +point p4 25 -7.5 0 +catch {gcarc arc cir p2 p3 p4} +mkedge e2 arc + +wire w1 e1 e2 + +XNewDoc D +XAddShape D w1 1 +XExpand D 0 0:1:1:1 +XSetColor D 0:1:1:2 0 128 0 +XSetColor D 0:1:1:3 128 0 0 + +WriteIges D $imagedir/${casename}.igs +ReadIges D1 $imagedir/${casename}.igs + +set color_orig [XGetAllColors D] +set color_comp [XGetAllColors D1] + +if { $color_orig != $color_comp } { + puts "Error: incorrect color transfer" +} +file delete $imagedir/${casename}.igs diff --git a/tests/de/iges_1/A1 b/tests/de/iges_1/A1 index 4f84162b38..47e04a513c 100644 --- a/tests/de/iges_1/A1 +++ b/tests/de/iges_1/A1 @@ -7,7 +7,7 @@ TPSTAT : Faulties = 0 ( 0 ) Warnings = 352 ( 9135 ) Summary = 352 ( 9 CHECKSHAPE : Wires = 1 ( 1 ) Faces = 1 ( 1 ) Shells = 0 ( 0 ) Solids = 0 ( 0 ) NBSHAPES : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 673 ( 673 ) STATSHAPE : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 673 ( 673 ) FreeWire = 0 ( 0 ) -TOLERANCE : MaxTol = 0.1926431182 ( 0.1926431182 ) AvgTol = 0.0001428985226 ( 0.0001426024625 ) +TOLERANCE : MaxTol = 0.1926431182 ( 0.1926431182 ) AvgTol = 0.0001428004407 ( 0.0001426024625 ) LABELS : N0Labels = 1 ( 1 ) N1Labels = 0 ( 0 ) N2Labels = 0 ( 0 ) TotalLabels = 1 ( 1 ) NameLabels = 1 ( 1 ) ColorLabels = 0 ( 0 ) LayerLabels = 0 ( 0 ) PROPS : Centroid = 0 ( 0 ) Volume = 0 ( 0 ) Area = 0 ( 0 ) NCOLORS : NColors = 0 ( 0 ) diff --git a/tests/de/iges_1/A2 b/tests/de/iges_1/A2 index c927fd8c73..ca1adace86 100644 --- a/tests/de/iges_1/A2 +++ b/tests/de/iges_1/A2 @@ -1,7 +1,7 @@ # !!!! This file is generated automatically, do not edit manually! See end script set filename buc40130.igs -# set min as local length unit +# set min as local lenght unit set lengthunit_start "min" set ref_data { diff --git a/tests/de/iges_1/A6 b/tests/de/iges_1/A6 index bfe2242f2c..ffcb761244 100644 --- a/tests/de/iges_1/A6 +++ b/tests/de/iges_1/A6 @@ -7,7 +7,7 @@ TPSTAT : Faulties = 0 ( 0 ) Warnings = 1 ( 28 ) Summary = 1 ( 28 ) CHECKSHAPE : Wires = 0 ( 0 ) Faces = 0 ( 0 ) Shells = 0 ( 0 ) Solids = 0 ( 0 ) NBSHAPES : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 1416 ( 1416 ) STATSHAPE : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 1416 ( 1416 ) FreeWire = 0 ( 0 ) -TOLERANCE : MaxTol = 0.9671829226 ( 0.9671829226 ) AvgTol = 0.01310885057 ( 0.01311108309 ) +TOLERANCE : MaxTol = 0.9671829226 ( 0.9671829226 ) AvgTol = 0.01310885056 ( 0.01311108309 ) LABELS : N0Labels = 1 ( 1 ) N1Labels = 0 ( 0 ) N2Labels = 0 ( 0 ) TotalLabels = 1 ( 1 ) NameLabels = 1 ( 1 ) ColorLabels = 0 ( 0 ) LayerLabels = 0 ( 0 ) PROPS : Centroid = 0 ( 0 ) Volume = 0 ( 0 ) Area = 0 ( 0 ) NCOLORS : NColors = 0 ( 0 ) diff --git a/tests/de/iges_1/A7 b/tests/de/iges_1/A7 index d0649cf874..6b0bcfb0b5 100644 --- a/tests/de/iges_1/A7 +++ b/tests/de/iges_1/A7 @@ -10,7 +10,7 @@ TPSTAT : Faulties = 0 ( 0 ) Warnings = 0 ( 26 ) Summary = 0 ( 26 ) CHECKSHAPE : Wires = 0 ( 0 ) Faces = 0 ( 0 ) Shells = 0 ( 0 ) Solids = 0 ( 0 ) NBSHAPES : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 455 ( 455 ) STATSHAPE : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 455 ( 455 ) FreeWire = 0 ( 0 ) -TOLERANCE : MaxTol = 0.007446262663 ( 0.007330725585 ) AvgTol = 1.640369768e-005 ( 1.01902787e-005 ) +TOLERANCE : MaxTol = 0.007446262663 ( 0.007330725585 ) AvgTol = 1.640370482e-05 ( 1.01902787e-05 ) LABELS : N0Labels = 455 ( 455 ) N1Labels = 0 ( 0 ) N2Labels = 0 ( 0 ) TotalLabels = 455 ( 455 ) NameLabels = 455 ( 455 ) ColorLabels = 0 ( 0 ) LayerLabels = 0 ( 0 ) PROPS : Centroid = 0 ( 0 ) Volume = 0 ( 0 ) Area = 0 ( 0 ) NCOLORS : NColors = 0 ( 0 ) diff --git a/tests/de/iges_1/A8 b/tests/de/iges_1/A8 index b4acd3a6d9..6ba3beeea2 100644 --- a/tests/de/iges_1/A8 +++ b/tests/de/iges_1/A8 @@ -7,7 +7,7 @@ TPSTAT : Faulties = 0 ( 0 ) Warnings = 0 ( 10 ) Summary = 0 ( 10 ) CHECKSHAPE : Wires = 0 ( 0 ) Faces = 0 ( 0 ) Shells = 0 ( 0 ) Solids = 0 ( 0 ) NBSHAPES : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 954 ( 954 ) STATSHAPE : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 954 ( 954 ) FreeWire = 0 ( 0 ) -TOLERANCE : MaxTol = 0.9723189972 ( 0.9723189972 ) AvgTol = 0.007899106621 ( 0.007903239656 ) +TOLERANCE : MaxTol = 0.9723189972 ( 0.9723189972 ) AvgTol = 0.007899106609 ( 0.007903239656 ) LABELS : N0Labels = 1 ( 1 ) N1Labels = 0 ( 0 ) N2Labels = 0 ( 0 ) TotalLabels = 1 ( 1 ) NameLabels = 1 ( 1 ) ColorLabels = 0 ( 0 ) LayerLabels = 0 ( 0 ) PROPS : Centroid = 0 ( 0 ) Volume = 0 ( 0 ) Area = 0 ( 0 ) NCOLORS : NColors = 0 ( 0 ) diff --git a/tests/de/iges_1/B1 b/tests/de/iges_1/B1 index d1ceceacee..9149bf67dc 100644 --- a/tests/de/iges_1/B1 +++ b/tests/de/iges_1/B1 @@ -7,7 +7,7 @@ TPSTAT : Faulties = 0 ( 0 ) Warnings = 0 ( 4 ) Summary = 0 ( 4 ) CHECKSHAPE : Wires = 0 ( 0 ) Faces = 0 ( 0 ) Shells = 0 ( 0 ) Solids = 0 ( 0 ) NBSHAPES : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 1137 ( 1137 ) STATSHAPE : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 1137 ( 1137 ) FreeWire = 0 ( 0 ) -TOLERANCE : MaxTol = 0.9916912901 ( 0.9916912901 ) AvgTol = 0.04552760559 ( 0.04552924379 ) +TOLERANCE : MaxTol = 0.9916912901 ( 0.9916912901 ) AvgTol = 0.0455276023 ( 0.04552924379 ) LABELS : N0Labels = 1 ( 1 ) N1Labels = 0 ( 0 ) N2Labels = 0 ( 0 ) TotalLabels = 1 ( 1 ) NameLabels = 1 ( 1 ) ColorLabels = 0 ( 0 ) LayerLabels = 0 ( 0 ) PROPS : Centroid = 0 ( 0 ) Volume = 0 ( 0 ) Area = 0 ( 0 ) NCOLORS : NColors = 0 ( 0 ) diff --git a/tests/de/iges_1/B2 b/tests/de/iges_1/B2 index 33da506bce..ee4f57e76a 100644 --- a/tests/de/iges_1/B2 +++ b/tests/de/iges_1/B2 @@ -7,7 +7,7 @@ TPSTAT : Faulties = 0 ( 0 ) Warnings = 0 ( 0 ) Summary = 0 ( 0 ) CHECKSHAPE : Wires = 0 ( 0 ) Faces = 0 ( 0 ) Shells = 0 ( 0 ) Solids = 0 ( 0 ) NBSHAPES : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 7 ( 7 ) STATSHAPE : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 7 ( 7 ) FreeWire = 0 ( 0 ) -TOLERANCE : MaxTol = 1e-007 ( 1e-007 ) AvgTol = 1e-007 ( 1e-007 ) +TOLERANCE : MaxTol = 1e-07 ( 1e-07 ) AvgTol = 1e-07 ( 1e-07 ) LABELS : N0Labels = 7 ( 7 ) N1Labels = 0 ( 0 ) N2Labels = 0 ( 0 ) TotalLabels = 7 ( 7 ) NameLabels = 7 ( 7 ) ColorLabels = 7 ( 7 ) LayerLabels = 7 ( 7 ) PROPS : Centroid = 0 ( 0 ) Volume = 0 ( 0 ) Area = 0 ( 0 ) NCOLORS : NColors = 1 ( 1 ) diff --git a/tests/de/iges_1/B3 b/tests/de/iges_1/B3 index 57f7b77a0f..d680f15a1f 100644 --- a/tests/de/iges_1/B3 +++ b/tests/de/iges_1/B3 @@ -7,7 +7,7 @@ TPSTAT : Faulties = 0 ( 2 ) Warnings = 49 ( 109 ) Summary = 49 ( 111 CHECKSHAPE : Wires = 0 ( 0 ) Faces = 0 ( 0 ) Shells = 0 ( 0 ) Solids = 0 ( 0 ) NBSHAPES : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 102 ( 102 ) STATSHAPE : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 102 ( 102 ) FreeWire = 0 ( 0 ) -TOLERANCE : MaxTol = 0.9428103106 ( 0.9428103191 ) AvgTol = 0.0470388193 ( 0.04704464574 ) +TOLERANCE : MaxTol = 0.9428103106 ( 0.9428103191 ) AvgTol = 0.04703871978 ( 0.04704464574 ) LABELS : N0Labels = 102 ( 102 ) N1Labels = 0 ( 0 ) N2Labels = 0 ( 0 ) TotalLabels = 102 ( 102 ) NameLabels = 102 ( 102 ) ColorLabels = 0 ( 0 ) LayerLabels = 102 ( 102 ) PROPS : Centroid = 0 ( 0 ) Volume = 0 ( 0 ) Area = 0 ( 0 ) NCOLORS : NColors = 0 ( 0 ) diff --git a/tests/de/iges_1/B4 b/tests/de/iges_1/B4 index 9c480c2486..96cd13e732 100644 --- a/tests/de/iges_1/B4 +++ b/tests/de/iges_1/B4 @@ -1,7 +1,10 @@ # !!!! This file is generated automatically, do not edit manually! See end script +puts "TODO CR23096 ALL: LABELS : Faulty" + + set filename t500core.igs -# set min as local length unit +# set min as local lenght unit set lengthunit_start "min" set ref_data { @@ -11,7 +14,7 @@ CHECKSHAPE : Wires = 5 ( 5 ) Faces = 5 ( 5 ) Shells = 0 ( 0 ) So NBSHAPES : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 674 ( 674 ) STATSHAPE : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 674 ( 674 ) FreeWire = 0 ( 0 ) TOLERANCE : MaxTol = 0.9933031338 ( 0.9932065271 ) AvgTol = 0.0725721901 ( 0.07359500431 ) -LABELS : N0Labels = 702 ( 702 ) N1Labels = 0 ( 0 ) N2Labels = 0 ( 0 ) TotalLabels = 702 ( 702 ) NameLabels = 702 ( 702 ) ColorLabels = 16 ( 16 ) LayerLabels = 702 ( 702 ) +LABELS : N0Labels = 702 ( 702 ) N1Labels = 0 ( 1977 ) N2Labels = 0 ( 0 ) TotalLabels = 702 ( 2679 ) NameLabels = 702 ( 702 ) ColorLabels = 16 ( 1993 ) LayerLabels = 702 ( 2679 ) PROPS : Centroid = 0 ( 0 ) Volume = 0 ( 0 ) Area = 0 ( 0 ) NCOLORS : NColors = 1 ( 1 ) COLORS : Colors = WHITE ( WHITE ) diff --git a/tests/de/iges_1/B5 b/tests/de/iges_1/B5 index 21c15b8bca..e00a14281d 100644 --- a/tests/de/iges_1/B5 +++ b/tests/de/iges_1/B5 @@ -7,7 +7,7 @@ TPSTAT : Faulties = 0 ( 0 ) Warnings = 0 ( 0 ) Summary = 0 ( 0 ) CHECKSHAPE : Wires = 0 ( 0 ) Faces = 0 ( 0 ) Shells = 0 ( 0 ) Solids = 0 ( 0 ) NBSHAPES : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 266 ( 266 ) STATSHAPE : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 266 ( 266 ) FreeWire = 0 ( 0 ) -TOLERANCE : MaxTol = 0.9647320607 ( 0.9647320724 ) AvgTol = 0.09372541107 ( 0.09372566113 ) +TOLERANCE : MaxTol = 0.9647320607 ( 0.9647320724 ) AvgTol = 0.09372539022 ( 0.09372566113 ) LABELS : N0Labels = 266 ( 266 ) N1Labels = 0 ( 0 ) N2Labels = 0 ( 0 ) TotalLabels = 266 ( 266 ) NameLabels = 266 ( 266 ) ColorLabels = 0 ( 0 ) LayerLabels = 0 ( 0 ) PROPS : Centroid = 0 ( 0 ) Volume = 0 ( 0 ) Area = 0 ( 0 ) NCOLORS : NColors = 0 ( 0 ) diff --git a/tests/de/iges_1/B6 b/tests/de/iges_1/B6 index ea22afef41..b40c82a477 100644 --- a/tests/de/iges_1/B6 +++ b/tests/de/iges_1/B6 @@ -11,7 +11,7 @@ TPSTAT : Faulties = 0 ( 10 ) Warnings = 308 ( 102 ) Summary = 308 ( 1 CHECKSHAPE : Wires = 0 ( 0 ) Faces = 0 ( 0 ) Shells = 0 ( 2 ) Solids = 0 ( 2 ) NBSHAPES : Solid = 0 ( 30 ) Shell = 0 ( 30 ) Face = 390 ( 390 ) STATSHAPE : Solid = 0 ( 30 ) Shell = 0 ( 30 ) Face = 390 ( 390 ) FreeWire = 0 ( 0 ) -TOLERANCE : MaxTol = 0.03576190045 ( 0.03576190009 ) AvgTol = 8.622709676e-005 ( 0.0003710475458 ) +TOLERANCE : MaxTol = 0.03576190045 ( 0.03576190009 ) AvgTol = 8.622070887e-005 ( 0.0003710475458 ) LABELS : N0Labels = 108 ( 108 ) N1Labels = 0 ( 0 ) N2Labels = 0 ( 0 ) TotalLabels = 108 ( 108 ) NameLabels = 108 ( 108 ) ColorLabels = 0 ( 0 ) LayerLabels = 0 ( 0 ) PROPS : Centroid = 0 ( 0 ) Volume = 0 ( 0 ) Area = 0 ( 0 ) NCOLORS : NColors = 0 ( 0 ) diff --git a/tests/de/iges_1/B7 b/tests/de/iges_1/B7 index 6f0c3cb48d..19cdf03959 100644 --- a/tests/de/iges_1/B7 +++ b/tests/de/iges_1/B7 @@ -7,7 +7,7 @@ TPSTAT : Faulties = 0 ( 0 ) Warnings = 2 ( 5 ) Summary = 2 ( 5 ) CHECKSHAPE : Wires = 0 ( 0 ) Faces = 0 ( 0 ) Shells = 0 ( 0 ) Solids = 0 ( 0 ) NBSHAPES : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 277 ( 277 ) STATSHAPE : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 277 ( 277 ) FreeWire = 0 ( 0 ) -TOLERANCE : MaxTol = 5.931727679e-005 ( 5.926478162e-005 ) AvgTol = 2.259319372e-006 ( 9.456854522e-006 ) +TOLERANCE : MaxTol = 5.931727677e-05 ( 5.926478166e-05 ) AvgTol = 2.259319204e-06 ( 9.456854522e-06 ) LABELS : N0Labels = 277 ( 277 ) N1Labels = 0 ( 0 ) N2Labels = 0 ( 0 ) TotalLabels = 277 ( 277 ) NameLabels = 277 ( 277 ) ColorLabels = 0 ( 0 ) LayerLabels = 0 ( 0 ) PROPS : Centroid = 0 ( 0 ) Volume = 0 ( 0 ) Area = 0 ( 0 ) NCOLORS : NColors = 0 ( 0 ) diff --git a/tests/de/iges_1/B8 b/tests/de/iges_1/B8 index e9c3cf2353..6a9b1f61f6 100644 --- a/tests/de/iges_1/B8 +++ b/tests/de/iges_1/B8 @@ -7,7 +7,7 @@ TPSTAT : Faulties = 0 ( 0 ) Warnings = 136 ( 143 ) Summary = 136 ( 14 CHECKSHAPE : Wires = 0 ( 0 ) Faces = 0 ( 0 ) Shells = 0 ( 0 ) Solids = 0 ( 0 ) NBSHAPES : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 1071 ( 1071 ) STATSHAPE : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 1071 ( 1071 ) FreeWire = 0 ( 0 ) -TOLERANCE : MaxTol = 0.9959055336 ( 0.995905536 ) AvgTol = 0.05477449409 ( 0.05477464144 ) +TOLERANCE : MaxTol = 0.9959055336 ( 0.995905536 ) AvgTol = 0.05477449407 ( 0.05477464144 ) LABELS : N0Labels = 1071 ( 1071 ) N1Labels = 0 ( 0 ) N2Labels = 0 ( 0 ) TotalLabels = 1071 ( 1071 ) NameLabels = 1071 ( 1071 ) ColorLabels = 0 ( 0 ) LayerLabels = 0 ( 0 ) PROPS : Centroid = 0 ( 0 ) Volume = 0 ( 0 ) Area = 0 ( 0 ) NCOLORS : NColors = 0 ( 0 ) diff --git a/tests/de/iges_1/B9 b/tests/de/iges_1/B9 index 25ae34ccc6..4ebd2a3e26 100644 --- a/tests/de/iges_1/B9 +++ b/tests/de/iges_1/B9 @@ -10,7 +10,7 @@ TPSTAT : Faulties = 0 ( 2 ) Warnings = 33 ( 18 ) Summary = 33 ( 20 ) CHECKSHAPE : Wires = 0 ( 0 ) Faces = 0 ( 0 ) Shells = 0 ( 0 ) Solids = 0 ( 0 ) NBSHAPES : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 2430 ( 2430 ) STATSHAPE : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 2430 ( 2430 ) FreeWire = 0 ( 0 ) -TOLERANCE : MaxTol = 0.9991343001 ( 0.9991342868 ) AvgTol = 0.02628258114 ( 0.02628281314 ) +TOLERANCE : MaxTol = 0.9991343001 ( 0.9991342868 ) AvgTol = 0.02628258144 ( 0.02628281314 ) LABELS : N0Labels = 2430 ( 2430 ) N1Labels = 0 ( 0 ) N2Labels = 0 ( 0 ) TotalLabels = 2430 ( 2430 ) NameLabels = 2430 ( 2430 ) ColorLabels = 0 ( 0 ) LayerLabels = 0 ( 0 ) PROPS : Centroid = 0 ( 0 ) Volume = 0 ( 0 ) Area = 0 ( 0 ) NCOLORS : NColors = 0 ( 0 ) diff --git a/tests/de/iges_1/C1 b/tests/de/iges_1/C1 index e123e888fa..d6cda05102 100644 --- a/tests/de/iges_1/C1 +++ b/tests/de/iges_1/C1 @@ -7,7 +7,7 @@ TPSTAT : Faulties = 0 ( 0 ) Warnings = 0 ( 6 ) Summary = 0 ( 6 ) CHECKSHAPE : Wires = 0 ( 0 ) Faces = 0 ( 0 ) Shells = 0 ( 0 ) Solids = 0 ( 0 ) NBSHAPES : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 34 ( 34 ) STATSHAPE : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 34 ( 34 ) FreeWire = 0 ( 0 ) -TOLERANCE : MaxTol = 0.9671317357 ( 0.9671317236 ) AvgTol = 0.04927116121 ( 0.04927208372 ) +TOLERANCE : MaxTol = 0.9671317357 ( 0.9671317236 ) AvgTol = 0.04927126943 ( 0.04927208372 ) LABELS : N0Labels = 2 ( 2 ) N1Labels = 0 ( 0 ) N2Labels = 0 ( 0 ) TotalLabels = 2 ( 2 ) NameLabels = 2 ( 2 ) ColorLabels = 0 ( 0 ) LayerLabels = 0 ( 0 ) PROPS : Centroid = 0 ( 0 ) Volume = 0 ( 0 ) Area = 0 ( 0 ) NCOLORS : NColors = 0 ( 0 ) diff --git a/tests/de/iges_1/C3 b/tests/de/iges_1/C3 index 6ca7cf7488..e54c67c3e8 100644 --- a/tests/de/iges_1/C3 +++ b/tests/de/iges_1/C3 @@ -7,7 +7,7 @@ TPSTAT : Faulties = 0 ( 0 ) Warnings = 6 ( 24 ) Summary = 6 ( 24 ) CHECKSHAPE : Wires = 0 ( 0 ) Faces = 0 ( 0 ) Shells = 0 ( 0 ) Solids = 0 ( 0 ) NBSHAPES : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 48 ( 48 ) STATSHAPE : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 48 ( 48 ) FreeWire = 0 ( 0 ) -TOLERANCE : MaxTol = 0.9965425609 ( 0.9965425534 ) AvgTol = 0.01070529537 ( 0.01071062866 ) +TOLERANCE : MaxTol = 0.9965425609 ( 0.9965425534 ) AvgTol = 0.0107051528 ( 0.01071062866 ) LABELS : N0Labels = 1 ( 1 ) N1Labels = 0 ( 0 ) N2Labels = 0 ( 0 ) TotalLabels = 1 ( 1 ) NameLabels = 1 ( 1 ) ColorLabels = 0 ( 0 ) LayerLabels = 0 ( 0 ) PROPS : Centroid = 0 ( 0 ) Volume = 0 ( 0 ) Area = 0 ( 0 ) NCOLORS : NColors = 0 ( 0 ) diff --git a/tests/de/iges_1/C5 b/tests/de/iges_1/C5 index 1afa4cfbc7..7ec1b27de3 100644 --- a/tests/de/iges_1/C5 +++ b/tests/de/iges_1/C5 @@ -7,7 +7,7 @@ TPSTAT : Faulties = 0 ( 0 ) Warnings = 0 ( 0 ) Summary = 0 ( 0 ) CHECKSHAPE : Wires = 0 ( 0 ) Faces = 0 ( 0 ) Shells = 0 ( 0 ) Solids = 0 ( 0 ) NBSHAPES : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 14 ( 14 ) STATSHAPE : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 14 ( 14 ) FreeWire = 0 ( 0 ) -TOLERANCE : MaxTol = 4.00004e-005 ( 4.00004e-005 ) AvgTol = 3.127856609e-006 ( 3.127856609e-006 ) +TOLERANCE : MaxTol = 4.00004e-05 ( 4.00004e-05 ) AvgTol = 3.127856609e-06 ( 3.127856609e-06 ) LABELS : N0Labels = 1 ( 1 ) N1Labels = 0 ( 0 ) N2Labels = 0 ( 0 ) TotalLabels = 1 ( 1 ) NameLabels = 1 ( 1 ) ColorLabels = 0 ( 0 ) LayerLabels = 0 ( 0 ) PROPS : Centroid = 0 ( 0 ) Volume = 0 ( 0 ) Area = 0 ( 0 ) NCOLORS : NColors = 0 ( 0 ) diff --git a/tests/de/iges_1/C7 b/tests/de/iges_1/C7 index ea25c7c056..928a582a5a 100644 --- a/tests/de/iges_1/C7 +++ b/tests/de/iges_1/C7 @@ -1,4 +1,7 @@ # !!!! This file is generated automatically, do not edit manually! See end script +puts "TODO CR23096 ALL: LABELS : Faulty" + + set filename CTS21136.igs set ref_data { @@ -7,8 +10,8 @@ TPSTAT : Faulties = 0 ( 0 ) Warnings = 106 ( 536 ) Summary = 106 ( 53 CHECKSHAPE : Wires = 0 ( 0 ) Faces = 0 ( 0 ) Shells = 0 ( 0 ) Solids = 0 ( 0 ) NBSHAPES : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 206 ( 206 ) STATSHAPE : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 206 ( 206 ) FreeWire = 0 ( 0 ) -TOLERANCE : MaxTol = 0.2688118771 ( 0.2688118774 ) AvgTol = 0.0006731605747 ( 0.0006730231846 ) -LABELS : N0Labels = 210 ( 210 ) N1Labels = 0 ( 0 ) N2Labels = 0 ( 0 ) TotalLabels = 210 ( 210 ) NameLabels = 210 ( 210 ) ColorLabels = 210 ( 210 ) LayerLabels = 210 ( 210 ) +TOLERANCE : MaxTol = 0.2688118771 ( 0.2688118774 ) AvgTol = 0.0006737414948 ( 0.0006736040557 ) +LABELS : N0Labels = 210 ( 210 ) N1Labels = 0 ( 722 ) N2Labels = 0 ( 0 ) TotalLabels = 210 ( 932 ) NameLabels = 210 ( 210 ) ColorLabels = 210 ( 932 ) LayerLabels = 210 ( 932 ) PROPS : Centroid = 0 ( 0 ) Volume = 0 ( 0 ) Area = 0 ( 0 ) NCOLORS : NColors = 7 ( 7 ) COLORS : Colors = BURLYWOOD1 DARKORANGE DEEPSKYBLUE1 GRAY79 MAGENTA MEDIUMSPRINGGREEN WHITE ( BURLYWOOD1 DARKORANGE DEEPSKYBLUE1 GRAY79 MAGENTA MEDIUMSPRINGGREEN WHITE ) diff --git a/tests/de/iges_1/C8 b/tests/de/iges_1/C8 index e693b94838..d6d7290958 100644 --- a/tests/de/iges_1/C8 +++ b/tests/de/iges_1/C8 @@ -1,5 +1,6 @@ # !!!! This file is generated automatically, do not edit manually! See end script -puts "TODO CR30889 ALL: TPSTAT : Faulty" +puts "TODO CR23096 ALL: TPSTAT : Faulty" + set filename CTS21866.igs @@ -9,7 +10,7 @@ TPSTAT : Faulties = 0 ( 0 ) Warnings = 92 ( 91 ) Summary = 92 ( 91 ) CHECKSHAPE : Wires = 0 ( 0 ) Faces = 0 ( 0 ) Shells = 0 ( 0 ) Solids = 0 ( 0 ) NBSHAPES : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 1459 ( 1459 ) STATSHAPE : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 1459 ( 1459 ) FreeWire = 0 ( 0 ) -TOLERANCE : MaxTol = 0.9346509485 ( 0.9346509437 ) AvgTol = 0.02356720346 ( 0.02356775059 ) +TOLERANCE : MaxTol = 0.9346509485 ( 0.9346509437 ) AvgTol = 0.0235672036 ( 0.02356775059 ) LABELS : N0Labels = 1459 ( 1459 ) N1Labels = 0 ( 0 ) N2Labels = 0 ( 0 ) TotalLabels = 1459 ( 1459 ) NameLabels = 1459 ( 1459 ) ColorLabels = 0 ( 0 ) LayerLabels = 0 ( 0 ) PROPS : Centroid = 0 ( 0 ) Volume = 0 ( 0 ) Area = 0 ( 0 ) NCOLORS : NColors = 0 ( 0 ) diff --git a/tests/de/iges_1/D1 b/tests/de/iges_1/D1 index c62b49c917..ff3954a26c 100644 --- a/tests/de/iges_1/D1 +++ b/tests/de/iges_1/D1 @@ -10,7 +10,7 @@ TPSTAT : Faulties = 0 ( 0 ) Warnings = 5 ( 4 ) Summary = 5 ( 4 ) CHECKSHAPE : Wires = 0 ( 0 ) Faces = 0 ( 0 ) Shells = 0 ( 0 ) Solids = 0 ( 0 ) NBSHAPES : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 1029 ( 1029 ) STATSHAPE : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 1029 ( 1029 ) FreeWire = 0 ( 0 ) -TOLERANCE : MaxTol = 0.9998969699 ( 0.9998969699 ) AvgTol = 0.03184824261 ( 0.0318753182 ) +TOLERANCE : MaxTol = 0.9998969699 ( 0.9998969699 ) AvgTol = 0.03184823131 ( 0.0318752683 ) LABELS : N0Labels = 1 ( 1 ) N1Labels = 0 ( 0 ) N2Labels = 0 ( 0 ) TotalLabels = 1 ( 1 ) NameLabels = 1 ( 1 ) ColorLabels = 0 ( 0 ) LayerLabels = 0 ( 0 ) PROPS : Centroid = 0 ( 0 ) Volume = 0 ( 0 ) Area = 0 ( 0 ) NCOLORS : NColors = 0 ( 0 ) diff --git a/tests/de/iges_1/D3 b/tests/de/iges_1/D3 index da9f058c01..13afff119a 100644 --- a/tests/de/iges_1/D3 +++ b/tests/de/iges_1/D3 @@ -7,7 +7,7 @@ TPSTAT : Faulties = 0 ( 0 ) Warnings = 0 ( 2 ) Summary = 0 ( 2 ) CHECKSHAPE : Wires = 0 ( 0 ) Faces = 0 ( 0 ) Shells = 0 ( 0 ) Solids = 0 ( 0 ) NBSHAPES : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 537 ( 537 ) STATSHAPE : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 537 ( 537 ) FreeWire = 0 ( 0 ) -TOLERANCE : MaxTol = 0.915878389 ( 0.9159699741 ) AvgTol = 0.08054961053 ( 0.08054975206 ) +TOLERANCE : MaxTol = 0.915878389 ( 0.9159699741 ) AvgTol = 0.08054960721 ( 0.08054975206 ) LABELS : N0Labels = 537 ( 537 ) N1Labels = 0 ( 0 ) N2Labels = 0 ( 0 ) TotalLabels = 537 ( 537 ) NameLabels = 537 ( 537 ) ColorLabels = 0 ( 0 ) LayerLabels = 0 ( 0 ) PROPS : Centroid = 0 ( 0 ) Volume = 0 ( 0 ) Area = 0 ( 0 ) NCOLORS : NColors = 0 ( 0 ) diff --git a/tests/de/iges_1/D4 b/tests/de/iges_1/D4 index 20b7c2e01d..6abfb07ffd 100644 --- a/tests/de/iges_1/D4 +++ b/tests/de/iges_1/D4 @@ -7,7 +7,7 @@ TPSTAT : Faulties = 0 ( 0 ) Warnings = 0 ( 0 ) Summary = 0 ( 0 ) CHECKSHAPE : Wires = 0 ( 0 ) Faces = 0 ( 0 ) Shells = 0 ( 0 ) Solids = 0 ( 0 ) NBSHAPES : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 0 ( 0 ) STATSHAPE : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 0 ( 0 ) FreeWire = 1 ( 1 ) -TOLERANCE : MaxTol = 1e-007 ( 1e-007 ) AvgTol = 1e-007 ( 1e-007 ) +TOLERANCE : MaxTol = 1e-07 ( 1e-07 ) AvgTol = 1e-07 ( 1e-07 ) LABELS : N0Labels = 1 ( 1 ) N1Labels = 0 ( 0 ) N2Labels = 0 ( 0 ) TotalLabels = 1 ( 1 ) NameLabels = 1 ( 1 ) ColorLabels = 0 ( 0 ) LayerLabels = 0 ( 0 ) PROPS : Centroid = 0 ( 0 ) Volume = 0 ( 0 ) Area = 0 ( 0 ) NCOLORS : NColors = 0 ( 0 ) diff --git a/tests/de/iges_1/D5 b/tests/de/iges_1/D5 index 1627dc0975..e5a5d98269 100644 --- a/tests/de/iges_1/D5 +++ b/tests/de/iges_1/D5 @@ -7,7 +7,7 @@ TPSTAT : Faulties = 0 ( 0 ) Warnings = 0 ( 0 ) Summary = 0 ( 0 ) CHECKSHAPE : Wires = 0 ( 0 ) Faces = 0 ( 0 ) Shells = 0 ( 0 ) Solids = 0 ( 0 ) NBSHAPES : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 1 ( 1 ) STATSHAPE : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 1 ( 1 ) FreeWire = 0 ( 0 ) -TOLERANCE : MaxTol = 2.287521125e-007 ( 2.287522163e-007 ) AvgTol = 1.556878583e-007 ( 1.550159842e-007 ) +TOLERANCE : MaxTol = 2.287521125e-07 ( 2.287522163e-07 ) AvgTol = 1.556878583e-07 ( 1.550159842e-07 ) LABELS : N0Labels = 1 ( 1 ) N1Labels = 0 ( 0 ) N2Labels = 0 ( 0 ) TotalLabels = 1 ( 1 ) NameLabels = 1 ( 1 ) ColorLabels = 0 ( 0 ) LayerLabels = 0 ( 0 ) PROPS : Centroid = 0 ( 0 ) Volume = 0 ( 0 ) Area = 0 ( 0 ) NCOLORS : NColors = 0 ( 0 ) diff --git a/tests/de/iges_1/D6 b/tests/de/iges_1/D6 index bb8df81698..00c0c3b14d 100644 --- a/tests/de/iges_1/D6 +++ b/tests/de/iges_1/D6 @@ -7,7 +7,7 @@ TPSTAT : Faulties = 0 ( 0 ) Warnings = 0 ( 321 ) Summary = 0 ( 321 ) CHECKSHAPE : Wires = 0 ( 0 ) Faces = 0 ( 0 ) Shells = 0 ( 0 ) Solids = 0 ( 0 ) NBSHAPES : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 192 ( 192 ) STATSHAPE : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 192 ( 192 ) FreeWire = 0 ( 0 ) -TOLERANCE : MaxTol = 1.001437005e-005 ( 1e-005 ) AvgTol = 1.823424033e-006 ( 9.520967742e-006 ) +TOLERANCE : MaxTol = 1.001437005e-05 ( 1e-05 ) AvgTol = 1.763057704e-06 ( 9.520967742e-06 ) LABELS : N0Labels = 198 ( 198 ) N1Labels = 0 ( 0 ) N2Labels = 0 ( 0 ) TotalLabels = 198 ( 198 ) NameLabels = 198 ( 198 ) ColorLabels = 0 ( 0 ) LayerLabels = 0 ( 0 ) PROPS : Centroid = 0 ( 0 ) Volume = 0 ( 0 ) Area = 0 ( 0 ) NCOLORS : NColors = 0 ( 0 ) diff --git a/tests/de/iges_1/D7 b/tests/de/iges_1/D7 index 1c0b212c56..7a1a819c00 100644 --- a/tests/de/iges_1/D7 +++ b/tests/de/iges_1/D7 @@ -1,5 +1,6 @@ # !!!! This file is generated automatically, do not edit manually! See end script puts "TODO CR23096 ALL: TPSTAT : Faulty" +puts "TODO CR23096 ALL: COLORS : Faulty" set filename CTS21884.igs @@ -13,8 +14,8 @@ STATSHAPE : Solid = 0 ( 1 ) Shell = 0 ( 1 ) Face = 180 ( 180 ) TOLERANCE : MaxTol = 0.04953179108 ( 0.04952683977 ) AvgTol = 0.005022179244 ( 0.01224474253 ) LABELS : N0Labels = 1 ( 1 ) N1Labels = 180 ( 180 ) N2Labels = 0 ( 0 ) TotalLabels = 181 ( 181 ) NameLabels = 181 ( 181 ) ColorLabels = 180 ( 180 ) LayerLabels = 0 ( 0 ) PROPS : Centroid = 0 ( 0 ) Volume = 0 ( 0 ) Area = 0 ( 0 ) -NCOLORS : NColors = 1 ( 1 ) -COLORS : Colors = WHITE ( WHITE ) +NCOLORS : NColors = 1 ( 2 ) +COLORS : Colors = WHITE ( CYAN WHITE ) NLAYERS : NLayers = 0 ( 0 ) LAYERS : Layers = ( ) diff --git a/tests/de/iges_1/D8 b/tests/de/iges_1/D8 index b3e556bdd2..740175c44e 100644 --- a/tests/de/iges_1/D8 +++ b/tests/de/iges_1/D8 @@ -7,7 +7,7 @@ TPSTAT : Faulties = 0 ( 0 ) Warnings = 0 ( 1 ) Summary = 0 ( 1 ) CHECKSHAPE : Wires = 0 ( 0 ) Faces = 0 ( 0 ) Shells = 0 ( 0 ) Solids = 0 ( 0 ) NBSHAPES : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 189 ( 189 ) STATSHAPE : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 189 ( 189 ) FreeWire = 0 ( 0 ) -TOLERANCE : MaxTol = 0.9674930965 ( 0.9674931058 ) AvgTol = 0.07394156078 ( 0.07394139392 ) +TOLERANCE : MaxTol = 0.9674930965 ( 0.9674931058 ) AvgTol = 0.07394152732 ( 0.07394137168 ) LABELS : N0Labels = 1 ( 1 ) N1Labels = 0 ( 0 ) N2Labels = 0 ( 0 ) TotalLabels = 1 ( 1 ) NameLabels = 1 ( 1 ) ColorLabels = 0 ( 0 ) LayerLabels = 0 ( 0 ) PROPS : Centroid = 0 ( 0 ) Volume = 0 ( 0 ) Area = 0 ( 0 ) NCOLORS : NColors = 0 ( 0 ) diff --git a/tests/de/iges_1/E2 b/tests/de/iges_1/E2 index 127d8e0a08..e3c50b3fc5 100644 --- a/tests/de/iges_1/E2 +++ b/tests/de/iges_1/E2 @@ -7,7 +7,7 @@ TPSTAT : Faulties = 0 ( 0 ) Warnings = 8 ( 205 ) Summary = 8 ( 205 ) CHECKSHAPE : Wires = 0 ( 0 ) Faces = 0 ( 0 ) Shells = 0 ( 0 ) Solids = 0 ( 0 ) NBSHAPES : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 309 ( 309 ) STATSHAPE : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 309 ( 309 ) FreeWire = 0 ( 0 ) -TOLERANCE : MaxTol = 0.9528326294 ( 0.952832627 ) AvgTol = 0.02908510937 ( 0.02909176809 ) +TOLERANCE : MaxTol = 0.9528326294 ( 0.952832627 ) AvgTol = 0.02908508281 ( 0.02909145501 ) LABELS : N0Labels = 309 ( 309 ) N1Labels = 0 ( 0 ) N2Labels = 0 ( 0 ) TotalLabels = 309 ( 309 ) NameLabels = 309 ( 309 ) ColorLabels = 309 ( 309 ) LayerLabels = 0 ( 0 ) PROPS : Centroid = 0 ( 0 ) Volume = 0 ( 0 ) Area = 0 ( 0 ) NCOLORS : NColors = 1 ( 1 ) diff --git a/tests/de/iges_1/E3 b/tests/de/iges_1/E3 index 558fc98fd2..de7eb38477 100644 --- a/tests/de/iges_1/E3 +++ b/tests/de/iges_1/E3 @@ -7,7 +7,7 @@ TPSTAT : Faulties = 0 ( 0 ) Warnings = 0 ( 0 ) Summary = 0 ( 0 ) CHECKSHAPE : Wires = 0 ( 0 ) Faces = 0 ( 0 ) Shells = 0 ( 0 ) Solids = 0 ( 0 ) NBSHAPES : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 12 ( 12 ) STATSHAPE : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 12 ( 12 ) FreeWire = 0 ( 0 ) -TOLERANCE : MaxTol = 0.015577035 ( 0.015577035 ) AvgTol = 0.00522937151 ( 0.00522974902 ) +TOLERANCE : MaxTol = 0.015577035 ( 0.015577035 ) AvgTol = 0.005229227375 ( 0.00522974902 ) LABELS : N0Labels = 1 ( 1 ) N1Labels = 0 ( 0 ) N2Labels = 0 ( 0 ) TotalLabels = 1 ( 1 ) NameLabels = 1 ( 1 ) ColorLabels = 0 ( 0 ) LayerLabels = 0 ( 0 ) PROPS : Centroid = 0 ( 0 ) Volume = 0 ( 0 ) Area = 0 ( 0 ) NCOLORS : NColors = 0 ( 0 ) diff --git a/tests/de/iges_1/E4 b/tests/de/iges_1/E4 index 33aff9fae0..cc56cbec20 100644 --- a/tests/de/iges_1/E4 +++ b/tests/de/iges_1/E4 @@ -7,7 +7,7 @@ TPSTAT : Faulties = 0 ( 0 ) Warnings = 0 ( 0 ) Summary = 0 ( 0 ) CHECKSHAPE : Wires = 0 ( 0 ) Faces = 0 ( 0 ) Shells = 0 ( 0 ) Solids = 0 ( 0 ) NBSHAPES : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 12 ( 12 ) STATSHAPE : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 12 ( 12 ) FreeWire = 0 ( 0 ) -TOLERANCE : MaxTol = 1e-007 ( 1e-007 ) AvgTol = 1e-007 ( 1e-007 ) +TOLERANCE : MaxTol = 1e-07 ( 1e-07 ) AvgTol = 1e-07 ( 1e-07 ) LABELS : N0Labels = 12 ( 12 ) N1Labels = 0 ( 0 ) N2Labels = 0 ( 0 ) TotalLabels = 12 ( 12 ) NameLabels = 12 ( 12 ) ColorLabels = 12 ( 12 ) LayerLabels = 0 ( 0 ) PROPS : Centroid = 0 ( 0 ) Volume = 0 ( 0 ) Area = 0 ( 0 ) NCOLORS : NColors = 1 ( 1 ) diff --git a/tests/de/iges_1/E5 b/tests/de/iges_1/E5 index 00a473d5c5..ed23bc547a 100644 --- a/tests/de/iges_1/E5 +++ b/tests/de/iges_1/E5 @@ -7,7 +7,7 @@ TPSTAT : Faulties = 0 ( 0 ) Warnings = 0 ( 0 ) Summary = 0 ( 0 ) CHECKSHAPE : Wires = 0 ( 0 ) Faces = 0 ( 0 ) Shells = 0 ( 0 ) Solids = 0 ( 0 ) NBSHAPES : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 2 ( 2 ) STATSHAPE : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 2 ( 2 ) FreeWire = 0 ( 0 ) -TOLERANCE : MaxTol = 1e-007 ( 1e-007 ) AvgTol = 1e-007 ( 1e-007 ) +TOLERANCE : MaxTol = 1e-07 ( 1e-07 ) AvgTol = 1e-07 ( 1e-07 ) LABELS : N0Labels = 2 ( 2 ) N1Labels = 0 ( 0 ) N2Labels = 0 ( 0 ) TotalLabels = 2 ( 2 ) NameLabels = 2 ( 2 ) ColorLabels = 2 ( 2 ) LayerLabels = 0 ( 0 ) PROPS : Centroid = 0 ( 0 ) Volume = 0 ( 0 ) Area = 0 ( 0 ) NCOLORS : NColors = 1 ( 1 ) diff --git a/tests/de/iges_1/E6 b/tests/de/iges_1/E6 index 292198b2c5..d0548cdb78 100644 --- a/tests/de/iges_1/E6 +++ b/tests/de/iges_1/E6 @@ -7,7 +7,7 @@ TPSTAT : Faulties = 0 ( 0 ) Warnings = 0 ( 0 ) Summary = 0 ( 0 ) CHECKSHAPE : Wires = 0 ( 0 ) Faces = 0 ( 0 ) Shells = 0 ( 0 ) Solids = 0 ( 0 ) NBSHAPES : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 1 ( 1 ) STATSHAPE : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 1 ( 1 ) FreeWire = 0 ( 0 ) -TOLERANCE : MaxTol = 1e-007 ( 1e-007 ) AvgTol = 1e-007 ( 1e-007 ) +TOLERANCE : MaxTol = 1e-07 ( 1e-07 ) AvgTol = 1e-07 ( 1e-07 ) LABELS : N0Labels = 1 ( 1 ) N1Labels = 0 ( 0 ) N2Labels = 0 ( 0 ) TotalLabels = 1 ( 1 ) NameLabels = 1 ( 1 ) ColorLabels = 1 ( 1 ) LayerLabels = 0 ( 0 ) PROPS : Centroid = 0 ( 0 ) Volume = 0 ( 0 ) Area = 0 ( 0 ) NCOLORS : NColors = 1 ( 1 ) diff --git a/tests/de/iges_1/E7 b/tests/de/iges_1/E7 index b7b18e894a..84d6d57c60 100644 --- a/tests/de/iges_1/E7 +++ b/tests/de/iges_1/E7 @@ -7,7 +7,7 @@ TPSTAT : Faulties = 0 ( 0 ) Warnings = 0 ( 0 ) Summary = 0 ( 0 ) CHECKSHAPE : Wires = 0 ( 0 ) Faces = 0 ( 0 ) Shells = 0 ( 0 ) Solids = 0 ( 0 ) NBSHAPES : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 13 ( 13 ) STATSHAPE : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 13 ( 13 ) FreeWire = 0 ( 0 ) -TOLERANCE : MaxTol = 1e-007 ( 1e-007 ) AvgTol = 1e-007 ( 1e-007 ) +TOLERANCE : MaxTol = 1e-07 ( 1e-07 ) AvgTol = 1e-07 ( 1e-07 ) LABELS : N0Labels = 1 ( 1 ) N1Labels = 0 ( 0 ) N2Labels = 0 ( 0 ) TotalLabels = 1 ( 1 ) NameLabels = 1 ( 1 ) ColorLabels = 0 ( 0 ) LayerLabels = 0 ( 0 ) PROPS : Centroid = 0 ( 0 ) Volume = 0 ( 0 ) Area = 0 ( 0 ) NCOLORS : NColors = 0 ( 0 ) diff --git a/tests/de/iges_1/E9 b/tests/de/iges_1/E9 index 3a4a1bd3d8..99a1859153 100644 --- a/tests/de/iges_1/E9 +++ b/tests/de/iges_1/E9 @@ -7,7 +7,7 @@ TPSTAT : Faulties = 0 ( 0 ) Warnings = 0 ( 0 ) Summary = 0 ( 0 ) CHECKSHAPE : Wires = 0 ( 0 ) Faces = 0 ( 0 ) Shells = 0 ( 0 ) Solids = 0 ( 0 ) NBSHAPES : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 130 ( 130 ) STATSHAPE : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 130 ( 130 ) FreeWire = 0 ( 0 ) -TOLERANCE : MaxTol = 1e-007 ( 1e-007 ) AvgTol = 1e-007 ( 1e-007 ) +TOLERANCE : MaxTol = 1e-07 ( 1e-07 ) AvgTol = 1e-07 ( 1e-07 ) LABELS : N0Labels = 1 ( 1 ) N1Labels = 0 ( 0 ) N2Labels = 0 ( 0 ) TotalLabels = 1 ( 1 ) NameLabels = 1 ( 1 ) ColorLabels = 0 ( 0 ) LayerLabels = 0 ( 0 ) PROPS : Centroid = 0 ( 0 ) Volume = 0 ( 0 ) Area = 0 ( 0 ) NCOLORS : NColors = 0 ( 0 ) diff --git a/tests/de/iges_1/F1 b/tests/de/iges_1/F1 index 316a40bce5..b8bc1b08f4 100644 --- a/tests/de/iges_1/F1 +++ b/tests/de/iges_1/F1 @@ -7,7 +7,7 @@ TPSTAT : Faulties = 0 ( 0 ) Warnings = 0 ( 0 ) Summary = 0 ( 0 ) CHECKSHAPE : Wires = 0 ( 0 ) Faces = 0 ( 0 ) Shells = 0 ( 0 ) Solids = 0 ( 0 ) NBSHAPES : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 6 ( 6 ) STATSHAPE : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 6 ( 6 ) FreeWire = 0 ( 0 ) -TOLERANCE : MaxTol = 1e-007 ( 1e-007 ) AvgTol = 1e-007 ( 1e-007 ) +TOLERANCE : MaxTol = 1e-07 ( 1e-07 ) AvgTol = 1e-07 ( 1e-07 ) LABELS : N0Labels = 1 ( 1 ) N1Labels = 0 ( 0 ) N2Labels = 0 ( 0 ) TotalLabels = 1 ( 1 ) NameLabels = 1 ( 1 ) ColorLabels = 0 ( 0 ) LayerLabels = 0 ( 0 ) PROPS : Centroid = 0 ( 0 ) Volume = 0 ( 0 ) Area = 0 ( 0 ) NCOLORS : NColors = 0 ( 0 ) diff --git a/tests/de/iges_1/F2 b/tests/de/iges_1/F2 index 01122d5c3e..5d232cafb2 100644 --- a/tests/de/iges_1/F2 +++ b/tests/de/iges_1/F2 @@ -7,7 +7,7 @@ TPSTAT : Faulties = 0 ( 0 ) Warnings = 0 ( 0 ) Summary = 0 ( 0 ) CHECKSHAPE : Wires = 0 ( 0 ) Faces = 0 ( 0 ) Shells = 0 ( 0 ) Solids = 0 ( 0 ) NBSHAPES : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 68 ( 68 ) STATSHAPE : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 68 ( 68 ) FreeWire = 0 ( 0 ) -TOLERANCE : MaxTol = 1e-007 ( 1e-007 ) AvgTol = 1e-007 ( 1e-007 ) +TOLERANCE : MaxTol = 1e-07 ( 1e-07 ) AvgTol = 1e-07 ( 1e-07 ) LABELS : N0Labels = 1 ( 1 ) N1Labels = 0 ( 0 ) N2Labels = 0 ( 0 ) TotalLabels = 1 ( 1 ) NameLabels = 1 ( 1 ) ColorLabels = 0 ( 0 ) LayerLabels = 0 ( 0 ) PROPS : Centroid = 0 ( 0 ) Volume = 0 ( 0 ) Area = 0 ( 0 ) NCOLORS : NColors = 0 ( 0 ) diff --git a/tests/de/iges_1/F4 b/tests/de/iges_1/F4 index 5e10eb4d94..fde96e8399 100644 --- a/tests/de/iges_1/F4 +++ b/tests/de/iges_1/F4 @@ -7,7 +7,7 @@ TPSTAT : Faulties = 0 ( 0 ) Warnings = 0 ( 26 ) Summary = 0 ( 26 ) CHECKSHAPE : Wires = 0 ( 0 ) Faces = 0 ( 0 ) Shells = 0 ( 0 ) Solids = 0 ( 0 ) NBSHAPES : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 23 ( 23 ) STATSHAPE : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 23 ( 23 ) FreeWire = 0 ( 0 ) -TOLERANCE : MaxTol = 0.7088972898 ( 0.7088972898 ) AvgTol = 0.007706834255 ( 0.007716106329 ) +TOLERANCE : MaxTol = 0.7088972898 ( 0.7088972898 ) AvgTol = 0.007706834255 ( 0.007714069568 ) LABELS : N0Labels = 23 ( 23 ) N1Labels = 0 ( 0 ) N2Labels = 0 ( 0 ) TotalLabels = 23 ( 23 ) NameLabels = 23 ( 23 ) ColorLabels = 23 ( 23 ) LayerLabels = 0 ( 0 ) PROPS : Centroid = 0 ( 0 ) Volume = 0 ( 0 ) Area = 0 ( 0 ) NCOLORS : NColors = 1 ( 1 ) diff --git a/tests/de/iges_1/F5 b/tests/de/iges_1/F5 index 8519283126..a345027671 100644 --- a/tests/de/iges_1/F5 +++ b/tests/de/iges_1/F5 @@ -3,11 +3,11 @@ set filename upm_italie.igs set ref_data { DATA : Faulties = 0 ( 0 ) Warnings = 0 ( 0 ) Summary = 0 ( 0 ) -TPSTAT : Faulties = 0 ( 0 ) Warnings = 34 ( 35 ) Summary = 34 ( 35 ) +TPSTAT : Faulties = 0 ( 0 ) Warnings = 35 ( 35 ) Summary = 35 ( 35 ) CHECKSHAPE : Wires = 0 ( 0 ) Faces = 0 ( 0 ) Shells = 0 ( 0 ) Solids = 0 ( 0 ) NBSHAPES : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 530 ( 530 ) STATSHAPE : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 530 ( 530 ) FreeWire = 2 ( 2 ) -TOLERANCE : MaxTol = 0.0469660729 ( 0.0469660729 ) AvgTol = 0.0008698532271 ( 0.0008698588026 ) +TOLERANCE : MaxTol = 0.0469660729 ( 0.0469660729 ) AvgTol = 0.0008698587781 ( 0.0008698588026 ) LABELS : N0Labels = 1 ( 1 ) N1Labels = 0 ( 0 ) N2Labels = 0 ( 0 ) TotalLabels = 1 ( 1 ) NameLabels = 1 ( 1 ) ColorLabels = 0 ( 0 ) LayerLabels = 0 ( 0 ) PROPS : Centroid = 0 ( 0 ) Volume = 0 ( 0 ) Area = 0 ( 0 ) NCOLORS : NColors = 0 ( 0 ) diff --git a/tests/de/iges_1/F6 b/tests/de/iges_1/F6 index 9047ae8d42..1336a5a739 100644 --- a/tests/de/iges_1/F6 +++ b/tests/de/iges_1/F6 @@ -10,7 +10,7 @@ TPSTAT : Faulties = 0 ( 0 ) Warnings = 5 ( 0 ) Summary = 5 ( 0 ) CHECKSHAPE : Wires = 0 ( 0 ) Faces = 0 ( 0 ) Shells = 0 ( 0 ) Solids = 0 ( 0 ) NBSHAPES : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 0 ( 0 ) STATSHAPE : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 0 ( 0 ) FreeWire = 2 ( 2 ) -TOLERANCE : MaxTol = 1.946144384e-005 ( 1.946144167e-005 ) AvgTol = 3.118935701e-006 ( 3.98657152e-006 ) +TOLERANCE : MaxTol = 1.946144384e-05 ( 1.946144167e-05 ) AvgTol = 3.118935701e-06 ( 3.98657152e-06 ) LABELS : N0Labels = 1 ( 1 ) N1Labels = 0 ( 0 ) N2Labels = 0 ( 0 ) TotalLabels = 1 ( 1 ) NameLabels = 1 ( 1 ) ColorLabels = 0 ( 0 ) LayerLabels = 0 ( 0 ) PROPS : Centroid = 0 ( 0 ) Volume = 0 ( 0 ) Area = 0 ( 0 ) NCOLORS : NColors = 0 ( 0 ) diff --git a/tests/de/iges_1/F7 b/tests/de/iges_1/F7 index 9b5a0971b5..89968aecb1 100644 --- a/tests/de/iges_1/F7 +++ b/tests/de/iges_1/F7 @@ -7,7 +7,7 @@ TPSTAT : Faulties = 0 ( 0 ) Warnings = 0 ( 87 ) Summary = 0 ( 87 ) CHECKSHAPE : Wires = 0 ( 0 ) Faces = 0 ( 0 ) Shells = 0 ( 0 ) Solids = 0 ( 0 ) NBSHAPES : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 65 ( 65 ) STATSHAPE : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 65 ( 65 ) FreeWire = 0 ( 0 ) -TOLERANCE : MaxTol = 4.714980615e-005 ( 4.713077152e-005 ) AvgTol = 4.184005069e-006 ( 4.220814103e-006 ) +TOLERANCE : MaxTol = 4.714980615e-05 ( 4.713077152e-05 ) AvgTol = 4.184005069e-06 ( 4.220814103e-06 ) LABELS : N0Labels = 65 ( 65 ) N1Labels = 0 ( 0 ) N2Labels = 0 ( 0 ) TotalLabels = 65 ( 65 ) NameLabels = 65 ( 65 ) ColorLabels = 0 ( 0 ) LayerLabels = 65 ( 65 ) PROPS : Centroid = 0 ( 0 ) Volume = 0 ( 0 ) Area = 0 ( 0 ) NCOLORS : NColors = 0 ( 0 ) diff --git a/tests/de/iges_1/F9 b/tests/de/iges_1/F9 index cb2c36dfc3..7c864b23aa 100644 --- a/tests/de/iges_1/F9 +++ b/tests/de/iges_1/F9 @@ -7,7 +7,7 @@ TPSTAT : Faulties = 0 ( 0 ) Warnings = 7 ( 10 ) Summary = 7 ( 10 ) CHECKSHAPE : Wires = 0 ( 0 ) Faces = 0 ( 0 ) Shells = 0 ( 0 ) Solids = 0 ( 0 ) NBSHAPES : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 622 ( 622 ) STATSHAPE : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 622 ( 622 ) FreeWire = 0 ( 0 ) -TOLERANCE : MaxTol = 0.9474413117 ( 0.9474413171 ) AvgTol = 0.04457091758 ( 0.04457487011 ) +TOLERANCE : MaxTol = 0.9474413117 ( 0.9474413171 ) AvgTol = 0.04457091645 ( 0.04457487011 ) LABELS : N0Labels = 622 ( 622 ) N1Labels = 0 ( 0 ) N2Labels = 0 ( 0 ) TotalLabels = 622 ( 622 ) NameLabels = 622 ( 622 ) ColorLabels = 0 ( 0 ) LayerLabels = 0 ( 0 ) PROPS : Centroid = 0 ( 0 ) Volume = 0 ( 0 ) Area = 0 ( 0 ) NCOLORS : NColors = 0 ( 0 ) diff --git a/tests/de/iges_1/G1 b/tests/de/iges_1/G1 index e7f02e7862..b28f7cc1ba 100644 --- a/tests/de/iges_1/G1 +++ b/tests/de/iges_1/G1 @@ -7,7 +7,7 @@ TPSTAT : Faulties = 0 ( 0 ) Warnings = 2 ( 2 ) Summary = 2 ( 2 ) CHECKSHAPE : Wires = 0 ( 0 ) Faces = 0 ( 0 ) Shells = 0 ( 0 ) Solids = 0 ( 0 ) NBSHAPES : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 228 ( 228 ) STATSHAPE : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 228 ( 228 ) FreeWire = 0 ( 0 ) -TOLERANCE : MaxTol = 0.9908409583 ( 0.9908409583 ) AvgTol = 0.05061444142 ( 0.05061547001 ) +TOLERANCE : MaxTol = 0.9908409583 ( 0.9908409583 ) AvgTol = 0.05061440182 ( 0.05061547001 ) LABELS : N0Labels = 1 ( 1 ) N1Labels = 0 ( 0 ) N2Labels = 0 ( 0 ) TotalLabels = 1 ( 1 ) NameLabels = 1 ( 1 ) ColorLabels = 0 ( 0 ) LayerLabels = 0 ( 0 ) PROPS : Centroid = 0 ( 0 ) Volume = 0 ( 0 ) Area = 0 ( 0 ) NCOLORS : NColors = 0 ( 0 ) diff --git a/tests/de/iges_1/G7 b/tests/de/iges_1/G7 index 485da98c16..ac5360338e 100755 --- a/tests/de/iges_1/G7 +++ b/tests/de/iges_1/G7 @@ -11,8 +11,8 @@ TPSTAT : Faulties = 0 ( 0 ) Warnings = 6 ( 0 ) Summary = 6 ( 0 ) CHECKSHAPE : Wires = 0 ( 0 ) Faces = 0 ( 0 ) Shells = 0 ( 0 ) Solids = 0 ( 0 ) NBSHAPES : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 410 ( 410 ) STATSHAPE : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 410 ( 410 ) FreeWire = 410 ( 410 ) -TOLERANCE : MaxTol = 0.6309534605 ( 0.6309534603 ) AvgTol = 0.01007170672 ( 0.0100718085 ) -LABELS : N0Labels = 1 ( 1 ) N1Labels = 1651 ( 2079 ) N2Labels = 0 ( 0 ) TotalLabels = 1652 ( 2080 ) NameLabels = 1652 ( 2053 ) ColorLabels = 1651 ( 2079 ) LayerLabels = 0 ( 0 ) +TOLERANCE : MaxTol = 0.6309534605 ( 0.6309534603 ) AvgTol = 0.01007170646 ( 0.0100718085 ) +LABELS : N0Labels = 1 ( 1 ) N1Labels = 1026 ( 2194 ) N2Labels = 0 ( 0 ) TotalLabels = 1027 ( 2195 ) NameLabels = 1027 ( 1428 ) ColorLabels = 1026 ( 2194 ) LayerLabels = 0 ( 0 ) PROPS : Centroid = 0 ( 0 ) Volume = 0 ( 0 ) Area = 0 ( 0 ) NCOLORS : NColors = 1 ( 1 ) COLORS : Colors = WHITE ( WHITE ) diff --git a/tests/de/iges_1/G8 b/tests/de/iges_1/G8 index a6a1e23bca..60f9cda3c5 100644 --- a/tests/de/iges_1/G8 +++ b/tests/de/iges_1/G8 @@ -7,7 +7,7 @@ TPSTAT : Faulties = 0 ( 0 ) Warnings = 0 ( 76 ) Summary = 0 ( 76 ) CHECKSHAPE : Wires = 0 ( 0 ) Faces = 0 ( 0 ) Shells = 0 ( 0 ) Solids = 0 ( 0 ) NBSHAPES : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 79 ( 79 ) STATSHAPE : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 79 ( 79 ) FreeWire = 0 ( 0 ) -TOLERANCE : MaxTol = 6.019859301e-006 ( 1e-005 ) AvgTol = 2.732867219e-007 ( 7.554593913e-006 ) +TOLERANCE : MaxTol = 6.019859301e-06 ( 1e-05 ) AvgTol = 2.732866732e-07 ( 7.554593913e-06 ) LABELS : N0Labels = 79 ( 79 ) N1Labels = 0 ( 0 ) N2Labels = 0 ( 0 ) TotalLabels = 79 ( 79 ) NameLabels = 79 ( 79 ) ColorLabels = 0 ( 0 ) LayerLabels = 0 ( 0 ) PROPS : Centroid = 0 ( 0 ) Volume = 0 ( 0 ) Area = 0 ( 0 ) NCOLORS : NColors = 0 ( 0 ) diff --git a/tests/de/iges_1/G9 b/tests/de/iges_1/G9 index e1893861ba..20eecf42ce 100755 --- a/tests/de/iges_1/G9 +++ b/tests/de/iges_1/G9 @@ -10,7 +10,7 @@ TPSTAT : Faulties = 0 ( 0 ) Warnings = 165 ( 4158 ) Summary = 165 ( 4 CHECKSHAPE : Wires = 0 ( 0 ) Faces = 0 ( 0 ) Shells = 0 ( 0 ) Solids = 0 ( 0 ) NBSHAPES : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 448 ( 448 ) STATSHAPE : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 448 ( 448 ) FreeWire = 0 ( 0 ) -TOLERANCE : MaxTol = 0.08683083502 ( 0.04341528762 ) AvgTol = 0.0008699009572 ( 0.000787655961 ) +TOLERANCE : MaxTol = 0.08683083502 ( 0.04341528762 ) AvgTol = 0.0008696507533 ( 0.000787655961 ) LABELS : N0Labels = 1 ( 1 ) N1Labels = 0 ( 0 ) N2Labels = 0 ( 0 ) TotalLabels = 1 ( 1 ) NameLabels = 1 ( 1 ) ColorLabels = 0 ( 0 ) LayerLabels = 0 ( 0 ) PROPS : Centroid = 0 ( 0 ) Volume = 0 ( 0 ) Area = 0 ( 0 ) NCOLORS : NColors = 0 ( 0 ) diff --git a/tests/de/iges_1/H1 b/tests/de/iges_1/H1 index 1a49faf499..136c9c5a12 100644 --- a/tests/de/iges_1/H1 +++ b/tests/de/iges_1/H1 @@ -10,8 +10,8 @@ TPSTAT : Faulties = 0 ( 0 ) Warnings = 2 ( 119 ) Summary = 2 ( 119 ) CHECKSHAPE : Wires = 0 ( 0 ) Faces = 0 ( 0 ) Shells = 0 ( 0 ) Solids = 0 ( 0 ) NBSHAPES : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 48 ( 48 ) STATSHAPE : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 48 ( 48 ) FreeWire = 0 ( 0 ) -TOLERANCE : MaxTol = 0.4654616407 ( 0.4654616407 ) AvgTol = 0.01534289116 ( 0.01534994104 ) -LABELS : N0Labels = 1 ( 1 ) N1Labels = 48 ( 304 ) N2Labels = 0 ( 0 ) TotalLabels = 49 ( 305 ) NameLabels = 49 ( 72 ) ColorLabels = 48 ( 304 ) LayerLabels = 0 ( 0 ) +TOLERANCE : MaxTol = 0.4654616407 ( 0.4654616407 ) AvgTol = 0.01534276289 ( 0.01534994104 ) +LABELS : N0Labels = 1 ( 1 ) N1Labels = 48 ( 391 ) N2Labels = 0 ( 0 ) TotalLabels = 49 ( 392 ) NameLabels = 49 ( 72 ) ColorLabels = 48 ( 391 ) LayerLabels = 0 ( 0 ) PROPS : Centroid = 0 ( 0 ) Volume = 0 ( 0 ) Area = 0 ( 0 ) NCOLORS : NColors = 4 ( 4 ) COLORS : Colors = BLUE DARKGREEN WHITE YELLOW ( BLUE DARKGREEN WHITE YELLOW ) diff --git a/tests/de/iges_1/H2 b/tests/de/iges_1/H2 index 22d26a5218..067d8f7f4c 100644 --- a/tests/de/iges_1/H2 +++ b/tests/de/iges_1/H2 @@ -11,7 +11,7 @@ CHECKSHAPE : Wires = 0 ( 0 ) Faces = 0 ( 0 ) Shells = 0 ( 0 ) So NBSHAPES : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 98 ( 98 ) STATSHAPE : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 98 ( 98 ) FreeWire = 0 ( 0 ) TOLERANCE : MaxTol = 0.03645053132 ( 0.03645054227 ) AvgTol = 0.0005450433774 ( 0.0005479624657 ) -LABELS : N0Labels = 124 ( 124 ) N1Labels = 0 ( 87 ) N2Labels = 0 ( 0 ) TotalLabels = 124 ( 211 ) NameLabels = 124 ( 124 ) ColorLabels = 124 ( 211 ) LayerLabels = 124 ( 211 ) +LABELS : N0Labels = 124 ( 124 ) N1Labels = 66 ( 181 ) N2Labels = 0 ( 0 ) TotalLabels = 190 ( 305 ) NameLabels = 124 ( 124 ) ColorLabels = 190 ( 305 ) LayerLabels = 190 ( 305 ) PROPS : Centroid = 0 ( 0 ) Volume = 0 ( 0 ) Area = 0 ( 0 ) NCOLORS : NColors = 1 ( 1 ) COLORS : Colors = GREEN ( GREEN ) diff --git a/tests/de/iges_1/H4 b/tests/de/iges_1/H4 index d6d59444bf..cdc62be0be 100644 --- a/tests/de/iges_1/H4 +++ b/tests/de/iges_1/H4 @@ -10,7 +10,7 @@ TPSTAT : Faulties = 0 ( 0 ) Warnings = 2 ( 13 ) Summary = 2 ( 13 ) CHECKSHAPE : Wires = 2 ( 1 ) Faces = 2 ( 1 ) Shells = 0 ( 0 ) Solids = 0 ( 0 ) NBSHAPES : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 1477 ( 1477 ) STATSHAPE : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 1477 ( 1477 ) FreeWire = 0 ( 0 ) -TOLERANCE : MaxTol = 0.9794963919 ( 0.9794963919 ) AvgTol = 0.03860116877 ( 0.03861778166 ) +TOLERANCE : MaxTol = 0.9794963919 ( 0.9794963919 ) AvgTol = 0.03860116691 ( 0.03861778166 ) LABELS : N0Labels = 1 ( 1 ) N1Labels = 0 ( 0 ) N2Labels = 0 ( 0 ) TotalLabels = 1 ( 1 ) NameLabels = 1 ( 1 ) ColorLabels = 0 ( 0 ) LayerLabels = 0 ( 0 ) PROPS : Centroid = 0 ( 0 ) Volume = 0 ( 0 ) Area = 0 ( 0 ) NCOLORS : NColors = 0 ( 0 ) diff --git a/tests/de/iges_1/H5 b/tests/de/iges_1/H5 index 4cf0d1c823..9ddf585b26 100755 --- a/tests/de/iges_1/H5 +++ b/tests/de/iges_1/H5 @@ -10,8 +10,8 @@ TPSTAT : Faulties = 0 ( 53 ) Warnings = 72 ( 167 ) Summary = 72 ( 220 CHECKSHAPE : Wires = 0 ( 0 ) Faces = 0 ( 0 ) Shells = 0 ( 0 ) Solids = 0 ( 0 ) NBSHAPES : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 42 ( 42 ) STATSHAPE : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 42 ( 42 ) FreeWire = 8 ( 58 ) -TOLERANCE : MaxTol = 0.01444583491 ( 0.01444583491 ) AvgTol = 0.0002992099519 ( 0.0003004298617 ) -LABELS : N0Labels = 3 ( 6 ) N1Labels = 193 ( 264 ) N2Labels = 0 ( 0 ) TotalLabels = 196 ( 270 ) NameLabels = 144 ( 230 ) ColorLabels = 193 ( 261 ) LayerLabels = 192 ( 209 ) +TOLERANCE : MaxTol = 0.01444583491 ( 0.01444583491 ) AvgTol = 0.0002992098795 ( 0.0003004298617 ) +LABELS : N0Labels = 3 ( 6 ) N1Labels = 197 ( 306 ) N2Labels = 0 ( 0 ) TotalLabels = 200 ( 312 ) NameLabels = 94 ( 180 ) ColorLabels = 197 ( 303 ) LayerLabels = 192 ( 251 ) PROPS : Centroid = 0 ( 0 ) Volume = 0 ( 0 ) Area = 0 ( 0 ) NCOLORS : NColors = 6 ( 6 ) COLORS : Colors = BLUE CYAN MAGENTA2 RED TURQUOISE3 WHITE ( BLUE CYAN MAGENTA2 RED TURQUOISE3 WHITE ) diff --git a/tests/de/iges_1/H6 b/tests/de/iges_1/H6 index 9f9427d2da..5b917bc5ed 100644 --- a/tests/de/iges_1/H6 +++ b/tests/de/iges_1/H6 @@ -10,8 +10,8 @@ TPSTAT : Faulties = 0 ( 5 ) Warnings = 106 ( 832 ) Summary = 106 ( 83 CHECKSHAPE : Wires = 0 ( 0 ) Faces = 0 ( 0 ) Shells = 0 ( 0 ) Solids = 0 ( 0 ) NBSHAPES : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 208 ( 208 ) STATSHAPE : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 208 ( 208 ) FreeWire = 0 ( 32 ) -TOLERANCE : MaxTol = 0.9049033554 ( 0.9049033554 ) AvgTol = 0.01221723065 ( 0.01221855818 ) -LABELS : N0Labels = 1 ( 1 ) N1Labels = 246 ( 2191 ) N2Labels = 0 ( 0 ) TotalLabels = 247 ( 2192 ) NameLabels = 247 ( 374 ) ColorLabels = 246 ( 2191 ) LayerLabels = 241 ( 2186 ) +TOLERANCE : MaxTol = 0.9049033554 ( 0.9049033554 ) AvgTol = 0.01221722752 ( 0.01221855818 ) +LABELS : N0Labels = 1 ( 1 ) N1Labels = 246 ( 2694 ) N2Labels = 0 ( 0 ) TotalLabels = 247 ( 2695 ) NameLabels = 215 ( 342 ) ColorLabels = 246 ( 2694 ) LayerLabels = 241 ( 2689 ) PROPS : Centroid = 0 ( 0 ) Volume = 0 ( 0 ) Area = 0 ( 0 ) NCOLORS : NColors = 5 ( 5 ) COLORS : Colors = CYAN GREEN RED WHITE YELLOW ( CYAN GREEN RED WHITE YELLOW ) diff --git a/tests/de/iges_1/H7 b/tests/de/iges_1/H7 index ef988babdf..cffd1c0fe7 100755 --- a/tests/de/iges_1/H7 +++ b/tests/de/iges_1/H7 @@ -10,8 +10,8 @@ TPSTAT : Faulties = 0 ( 53 ) Warnings = 3 ( 637 ) Summary = 3 ( 690 ) CHECKSHAPE : Wires = 0 ( 0 ) Faces = 0 ( 0 ) Shells = 0 ( 0 ) Solids = 0 ( 0 ) NBSHAPES : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 1766 ( 1766 ) STATSHAPE : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 1766 ( 1766 ) FreeWire = 0 ( 2 ) -TOLERANCE : MaxTol = 0.1881003203 ( 0.1881003203 ) AvgTol = 0.000455843831 ( 0.0004561112402 ) -LABELS : N0Labels = 3 ( 6 ) N1Labels = 1868 ( 3154 ) N2Labels = 0 ( 0 ) TotalLabels = 1871 ( 3160 ) NameLabels = 1819 ( 2019 ) ColorLabels = 1868 ( 3151 ) LayerLabels = 1868 ( 3100 ) +TOLERANCE : MaxTol = 0.1881003203 ( 0.1881003203 ) AvgTol = 0.0004558431471 ( 0.0004561112402 ) +LABELS : N0Labels = 3 ( 6 ) N1Labels = 1868 ( 3534 ) N2Labels = 0 ( 0 ) TotalLabels = 1871 ( 3540 ) NameLabels = 1817 ( 2017 ) ColorLabels = 1868 ( 3531 ) LayerLabels = 1868 ( 3480 ) PROPS : Centroid = 0 ( 0 ) Volume = 0 ( 0 ) Area = 0 ( 0 ) NCOLORS : NColors = 5 ( 5 ) COLORS : Colors = BLUE MAGENTA2 ORANGE RED WHITE ( BLUE MAGENTA2 ORANGE RED WHITE ) diff --git a/tests/de/iges_1/H8 b/tests/de/iges_1/H8 index 9584ff2a71..cb75c585ea 100644 --- a/tests/de/iges_1/H8 +++ b/tests/de/iges_1/H8 @@ -11,7 +11,7 @@ CHECKSHAPE : Wires = 0 ( 0 ) Faces = 0 ( 0 ) Shells = 0 ( 0 ) So NBSHAPES : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 208 ( 208 ) STATSHAPE : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 208 ( 208 ) FreeWire = 0 ( 0 ) TOLERANCE : MaxTol = 0.1393674657 ( 0.1393674657 ) AvgTol = 0.003094503419 ( 0.003090745184 ) -LABELS : N0Labels = 1 ( 1 ) N1Labels = 214 ( 3725 ) N2Labels = 0 ( 0 ) TotalLabels = 215 ( 3726 ) NameLabels = 215 ( 330 ) ColorLabels = 214 ( 3725 ) LayerLabels = 209 ( 3720 ) +LABELS : N0Labels = 1 ( 1 ) N1Labels = 214 ( 3801 ) N2Labels = 0 ( 0 ) TotalLabels = 215 ( 3802 ) NameLabels = 215 ( 330 ) ColorLabels = 214 ( 3801 ) LayerLabels = 209 ( 3796 ) PROPS : Centroid = 0 ( 0 ) Volume = 0 ( 0 ) Area = 0 ( 0 ) NCOLORS : NColors = 5 ( 5 ) COLORS : Colors = CYAN GREEN RED WHITE YELLOW ( CYAN GREEN RED WHITE YELLOW ) diff --git a/tests/de/iges_1/H9 b/tests/de/iges_1/H9 index c37838dd03..be5588691a 100644 --- a/tests/de/iges_1/H9 +++ b/tests/de/iges_1/H9 @@ -11,7 +11,7 @@ CHECKSHAPE : Wires = 0 ( 0 ) Faces = 0 ( 0 ) Shells = 0 ( 0 ) So NBSHAPES : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 22 ( 22 ) STATSHAPE : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 22 ( 22 ) FreeWire = 6 ( 6 ) TOLERANCE : MaxTol = 0.9257818164 ( 0.9257819919 ) AvgTol = 0.02303074348 ( 0.02303069465 ) -LABELS : N0Labels = 1 ( 1 ) N1Labels = 131 ( 244 ) N2Labels = 0 ( 0 ) TotalLabels = 132 ( 245 ) NameLabels = 132 ( 149 ) ColorLabels = 131 ( 244 ) LayerLabels = 131 ( 244 ) +LABELS : N0Labels = 1 ( 1 ) N1Labels = 136 ( 311 ) N2Labels = 0 ( 0 ) TotalLabels = 137 ( 312 ) NameLabels = 132 ( 149 ) ColorLabels = 136 ( 311 ) LayerLabels = 131 ( 311 ) PROPS : Centroid = 0 ( 0 ) Volume = 0 ( 0 ) Area = 0 ( 0 ) NCOLORS : NColors = 4 ( 4 ) COLORS : Colors = BLUE GREEN STEELBLUE2 VIOLETRED2 ( BLUE GREEN STEELBLUE2 VIOLETRED2 ) diff --git a/tests/de/iges_1/I1 b/tests/de/iges_1/I1 index e6946a16c5..d1a14fb12d 100644 --- a/tests/de/iges_1/I1 +++ b/tests/de/iges_1/I1 @@ -10,8 +10,8 @@ TPSTAT : Faulties = 0 ( 0 ) Warnings = 57 ( 658 ) Summary = 57 ( 658 CHECKSHAPE : Wires = 0 ( 0 ) Faces = 0 ( 0 ) Shells = 0 ( 0 ) Solids = 0 ( 0 ) NBSHAPES : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 218 ( 218 ) STATSHAPE : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 218 ( 218 ) FreeWire = 77 ( 108 ) -TOLERANCE : MaxTol = 0.1504135906 ( 0.1504135906 ) AvgTol = 0.0004235230718 ( 0.0004485369972 ) -LABELS : N0Labels = 2 ( 2 ) N1Labels = 1279 ( 3474 ) N2Labels = 0 ( 0 ) TotalLabels = 1281 ( 3476 ) NameLabels = 1281 ( 1491 ) ColorLabels = 1280 ( 3475 ) LayerLabels = 284 ( 2422 ) +TOLERANCE : MaxTol = 0.1504135906 ( 0.1504135906 ) AvgTol = 0.0004235229655 ( 0.0004485369972 ) +LABELS : N0Labels = 2 ( 2 ) N1Labels = 1019 ( 3449 ) N2Labels = 0 ( 0 ) TotalLabels = 1021 ( 3451 ) NameLabels = 945 ( 1155 ) ColorLabels = 1020 ( 3450 ) LayerLabels = 237 ( 2579 ) PROPS : Centroid = 0 ( 0 ) Volume = 0 ( 0 ) Area = 0 ( 0 ) NCOLORS : NColors = 4 ( 4 ) COLORS : Colors = GREEN MAGENTA WHITE YELLOW ( GREEN MAGENTA WHITE YELLOW ) diff --git a/tests/de/iges_1/I2 b/tests/de/iges_1/I2 index f7613a907d..3b19f5ab86 100644 --- a/tests/de/iges_1/I2 +++ b/tests/de/iges_1/I2 @@ -11,7 +11,7 @@ CHECKSHAPE : Wires = 0 ( 0 ) Faces = 0 ( 0 ) Shells = 0 ( 0 ) So NBSHAPES : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 120 ( 120 ) STATSHAPE : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 120 ( 120 ) FreeWire = 31 ( 31 ) TOLERANCE : MaxTol = 0.763617442 ( 0.7636174422 ) AvgTol = 0.001290751445 ( 0.001290629985 ) -LABELS : N0Labels = 1051 ( 1051 ) N1Labels = 0 ( 13 ) N2Labels = 0 ( 0 ) TotalLabels = 1051 ( 1064 ) NameLabels = 1051 ( 1051 ) ColorLabels = 971 ( 1064 ) LayerLabels = 971 ( 1051 ) +LABELS : N0Labels = 1051 ( 1051 ) N1Labels = 5 ( 15 ) N2Labels = 0 ( 0 ) TotalLabels = 1056 ( 1066 ) NameLabels = 1051 ( 1051 ) ColorLabels = 976 ( 1066 ) LayerLabels = 971 ( 1053 ) PROPS : Centroid = 0 ( 0 ) Volume = 0 ( 0 ) Area = 0 ( 0 ) NCOLORS : NColors = 8 ( 8 ) COLORS : Colors = BLACK BLUE CYAN GREEN MAGENTA RED WHITE YELLOW ( BLACK BLUE CYAN GREEN MAGENTA RED WHITE YELLOW ) diff --git a/tests/de/iges_1/I3 b/tests/de/iges_1/I3 index 5d97b5502a..0c9fc44f9c 100755 --- a/tests/de/iges_1/I3 +++ b/tests/de/iges_1/I3 @@ -10,7 +10,7 @@ TPSTAT : Faulties = 0 ( 0 ) Warnings = 0 ( 8 ) Summary = 0 ( 8 ) CHECKSHAPE : Wires = 0 ( 0 ) Faces = 0 ( 0 ) Shells = 0 ( 0 ) Solids = 0 ( 0 ) NBSHAPES : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 1 ( 1 ) STATSHAPE : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 1 ( 1 ) FreeWire = 0 ( 0 ) -TOLERANCE : MaxTol = 1e-007 ( 1.000369935e-007 ) AvgTol = 1e-007 ( 1.000003506e-007 ) +TOLERANCE : MaxTol = 1e-07 ( 1.000369935e-07 ) AvgTol = 1e-07 ( 1.000003506e-07 ) LABELS : N0Labels = 1 ( 1 ) N1Labels = 0 ( 121 ) N2Labels = 0 ( 0 ) TotalLabels = 1 ( 122 ) NameLabels = 1 ( 1 ) ColorLabels = 1 ( 122 ) LayerLabels = 0 ( 0 ) PROPS : Centroid = 0 ( 0 ) Volume = 0 ( 0 ) Area = 0 ( 0 ) NCOLORS : NColors = 1 ( 1 ) diff --git a/tests/de/iges_1/I4 b/tests/de/iges_1/I4 index 39732353b8..5546a1a396 100644 --- a/tests/de/iges_1/I4 +++ b/tests/de/iges_1/I4 @@ -10,8 +10,8 @@ TPSTAT : Faulties = 0 ( 0 ) Warnings = 232 ( 515 ) Summary = 232 ( 51 CHECKSHAPE : Wires = 0 ( 0 ) Faces = 0 ( 0 ) Shells = 0 ( 0 ) Solids = 0 ( 0 ) NBSHAPES : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 146 ( 146 ) STATSHAPE : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 146 ( 146 ) FreeWire = 5 ( 5 ) -TOLERANCE : MaxTol = 0.02364292093 ( 0.0236405571 ) AvgTol = 9.639867981e-005 ( 9.641748471e-005 ) -LABELS : N0Labels = 285 ( 287 ) N1Labels = 0 ( 0 ) N2Labels = 0 ( 0 ) TotalLabels = 285 ( 287 ) NameLabels = 285 ( 287 ) ColorLabels = 279 ( 285 ) LayerLabels = 279 ( 285 ) +TOLERANCE : MaxTol = 0.02364292093 ( 0.0236405571 ) AvgTol = 9.639867981e-05 ( 9.641748471e-05 ) +LABELS : N0Labels = 285 ( 287 ) N1Labels = 1 ( 0 ) N2Labels = 0 ( 0 ) TotalLabels = 286 ( 287 ) NameLabels = 285 ( 287 ) ColorLabels = 280 ( 285 ) LayerLabels = 279 ( 285 ) PROPS : Centroid = 0 ( 0 ) Volume = 0 ( 0 ) Area = 0 ( 0 ) NCOLORS : NColors = 2 ( 2 ) COLORS : Colors = MAGENTA WHITE ( MAGENTA WHITE ) diff --git a/tests/de/iges_1/I5 b/tests/de/iges_1/I5 index dafbee1bbb..2b72df26e2 100644 --- a/tests/de/iges_1/I5 +++ b/tests/de/iges_1/I5 @@ -1,5 +1,6 @@ # !!!! This file is generated automatically, do not edit manually! See end script puts "TODO CR23096 ALL: LABELS : Faulty" +puts "TODO CR23096 ALL: LAYERS : Faulty" set filename BUC61004-1.igs @@ -10,12 +11,12 @@ TPSTAT : Faulties = 0 ( 4 ) Warnings = 0 ( 312 ) Summary = 0 ( 316 ) CHECKSHAPE : Wires = 0 ( 0 ) Faces = 0 ( 0 ) Shells = 0 ( 0 ) Solids = 0 ( 0 ) NBSHAPES : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 241 ( 241 ) STATSHAPE : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 241 ( 241 ) FreeWire = 0 ( 0 ) -TOLERANCE : MaxTol = 9.452110698e-006 ( 1e-005 ) AvgTol = 1.74434884e-007 ( 8.133454698e-006 ) -LABELS : N0Labels = 241 ( 241 ) N1Labels = 0 ( 83 ) N2Labels = 0 ( 0 ) TotalLabels = 241 ( 324 ) NameLabels = 241 ( 241 ) ColorLabels = 241 ( 324 ) LayerLabels = 241 ( 324 ) +TOLERANCE : MaxTol = 8.265823485e-06 ( 1e-05 ) AvgTol = 1.446359158e-07 ( 8.133454698e-06 ) +LABELS : N0Labels = 241 ( 241 ) N1Labels = 0 ( 101 ) N2Labels = 0 ( 0 ) TotalLabels = 241 ( 342 ) NameLabels = 241 ( 241 ) ColorLabels = 241 ( 342 ) LayerLabels = 241 ( 342 ) PROPS : Centroid = 0 ( 0 ) Volume = 0 ( 0 ) Area = 0 ( 0 ) NCOLORS : NColors = 2 ( 2 ) COLORS : Colors = WHITE YELLOW ( WHITE YELLOW ) -NLAYERS : NLayers = 1 ( 1 ) -LAYERS : Layers = 10 ( 10 ) +NLAYERS : NLayers = 1 ( 2 ) +LAYERS : Layers = 10 ( 10 40 ) } diff --git a/tests/de/iges_1/I6 b/tests/de/iges_1/I6 index bd98274ece..376ca651e1 100644 --- a/tests/de/iges_1/I6 +++ b/tests/de/iges_1/I6 @@ -11,7 +11,7 @@ CHECKSHAPE : Wires = 0 ( 0 ) Faces = 0 ( 0 ) Shells = 0 ( 0 ) So NBSHAPES : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 180 ( 180 ) STATSHAPE : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 180 ( 180 ) FreeWire = 1 ( 1 ) TOLERANCE : MaxTol = 0.0305692698 ( 0.03056926518 ) AvgTol = 0.00147298413 ( 0.001472983156 ) -LABELS : N0Labels = 296 ( 296 ) N1Labels = 0 ( 1 ) N2Labels = 0 ( 0 ) TotalLabels = 296 ( 297 ) NameLabels = 296 ( 297 ) ColorLabels = 293 ( 294 ) LayerLabels = 31 ( 31 ) +LABELS : N0Labels = 296 ( 296 ) N1Labels = 1 ( 1 ) N2Labels = 0 ( 0 ) TotalLabels = 297 ( 297 ) NameLabels = 296 ( 297 ) ColorLabels = 294 ( 294 ) LayerLabels = 31 ( 31 ) PROPS : Centroid = 0 ( 0 ) Volume = 0 ( 0 ) Area = 0 ( 0 ) NCOLORS : NColors = 4 ( 4 ) COLORS : Colors = BLUE CYAN GREEN YELLOW ( BLUE CYAN GREEN YELLOW ) diff --git a/tests/de/iges_1/I7 b/tests/de/iges_1/I7 index 06d29e224b..82406e0aac 100644 --- a/tests/de/iges_1/I7 +++ b/tests/de/iges_1/I7 @@ -7,7 +7,7 @@ TPSTAT : Faulties = 0 ( 0 ) Warnings = 1 ( 21 ) Summary = 1 ( 21 ) CHECKSHAPE : Wires = 0 ( 0 ) Faces = 0 ( 0 ) Shells = 0 ( 0 ) Solids = 0 ( 0 ) NBSHAPES : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 1 ( 1 ) STATSHAPE : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 1 ( 1 ) FreeWire = 0 ( 0 ) -TOLERANCE : MaxTol = 1e-007 ( 1e-007 ) AvgTol = 1e-007 ( 1e-007 ) +TOLERANCE : MaxTol = 1e-07 ( 1e-07 ) AvgTol = 1e-07 ( 1e-07 ) LABELS : N0Labels = 1 ( 1 ) N1Labels = 0 ( 0 ) N2Labels = 0 ( 0 ) TotalLabels = 1 ( 1 ) NameLabels = 1 ( 1 ) ColorLabels = 1 ( 1 ) LayerLabels = 0 ( 0 ) PROPS : Centroid = 0 ( 0 ) Volume = 0 ( 0 ) Area = 0 ( 0 ) NCOLORS : NColors = 1 ( 1 ) diff --git a/tests/de/iges_1/I8 b/tests/de/iges_1/I8 index cdcf2557bc..2c829f154d 100644 --- a/tests/de/iges_1/I8 +++ b/tests/de/iges_1/I8 @@ -10,8 +10,8 @@ TPSTAT : Faulties = 0 ( 0 ) Warnings = 481 ( 6296 ) Summary = 481 ( 6 CHECKSHAPE : Wires = 0 ( 2 ) Faces = 0 ( 3 ) Shells = 0 ( 0 ) Solids = 0 ( 0 ) NBSHAPES : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 3647 ( 3647 ) STATSHAPE : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 3647 ( 3647 ) FreeWire = 180 ( 289 ) -TOLERANCE : MaxTol = 0.9982953477 ( 0.9982953477 ) AvgTol = 0.01534268303 ( 0.01547482548 ) -LABELS : N0Labels = 403 ( 403 ) N1Labels = 3841 ( 15575 ) N2Labels = 0 ( 0 ) TotalLabels = 4244 ( 15978 ) NameLabels = 4242 ( 6516 ) ColorLabels = 4090 ( 15977 ) LayerLabels = 4090 ( 15977 ) +TOLERANCE : MaxTol = 0.9982953477 ( 0.9982953477 ) AvgTol = 0.01534180332 ( 0.01547477008 ) +LABELS : N0Labels = 403 ( 403 ) N1Labels = 3828 ( 23548 ) N2Labels = 0 ( 0 ) TotalLabels = 4231 ( 23951 ) NameLabels = 4117 ( 6391 ) ColorLabels = 4077 ( 23950 ) LayerLabels = 4035 ( 23950 ) PROPS : Centroid = 0 ( 0 ) Volume = 0 ( 0 ) Area = 0 ( 0 ) NCOLORS : NColors = 5 ( 5 ) COLORS : Colors = BLUE CHARTREUSE CYAN DARKKHAKI LIGHTPINK1 ( BLUE CHARTREUSE CYAN DARKKHAKI LIGHTPINK1 ) diff --git a/tests/de/iges_1/I9 b/tests/de/iges_1/I9 index 68948cee34..53410a91d3 100644 --- a/tests/de/iges_1/I9 +++ b/tests/de/iges_1/I9 @@ -10,7 +10,7 @@ TPSTAT : Faulties = 0 ( 0 ) Warnings = 0 ( 39 ) Summary = 0 ( 39 ) CHECKSHAPE : Wires = 0 ( 0 ) Faces = 0 ( 0 ) Shells = 0 ( 0 ) Solids = 0 ( 0 ) NBSHAPES : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 327 ( 327 ) STATSHAPE : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 327 ( 327 ) FreeWire = 0 ( 0 ) -TOLERANCE : MaxTol = 0.000190478139 ( 9.082153585e-005 ) AvgTol = 9.791389143e-006 ( 2.775931887e-006 ) +TOLERANCE : MaxTol = 0.0001904781389 ( 9.082153585e-05 ) AvgTol = 9.79139513e-06 ( 2.775931888e-06 ) LABELS : N0Labels = 326 ( 326 ) N1Labels = 0 ( 0 ) N2Labels = 0 ( 0 ) TotalLabels = 326 ( 326 ) NameLabels = 326 ( 326 ) ColorLabels = 0 ( 0 ) LayerLabels = 0 ( 0 ) PROPS : Centroid = 0 ( 0 ) Volume = 0 ( 0 ) Area = 0 ( 0 ) NCOLORS : NColors = 0 ( 0 ) diff --git a/tests/de/iges_1/J1 b/tests/de/iges_1/J1 index 54a706f7b2..b753cbcd5b 100644 --- a/tests/de/iges_1/J1 +++ b/tests/de/iges_1/J1 @@ -10,7 +10,7 @@ TPSTAT : Faulties = 0 ( 0 ) Warnings = 0 ( 0 ) Summary = 0 ( 0 ) CHECKSHAPE : Wires = 0 ( 0 ) Faces = 0 ( 0 ) Shells = 0 ( 0 ) Solids = 0 ( 0 ) NBSHAPES : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 1 ( 1 ) STATSHAPE : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 1 ( 1 ) FreeWire = 0 ( 0 ) -TOLERANCE : MaxTol = 1.029699982e-007 ( 1e-007 ) AvgTol = 1.01142307e-007 ( 1e-007 ) +TOLERANCE : MaxTol = 1.029699982e-07 ( 1e-07 ) AvgTol = 1.01142307e-07 ( 1e-07 ) LABELS : N0Labels = 1 ( 2 ) N1Labels = 0 ( 0 ) N2Labels = 0 ( 0 ) TotalLabels = 1 ( 2 ) NameLabels = 1 ( 2 ) ColorLabels = 0 ( 0 ) LayerLabels = 0 ( 0 ) PROPS : Centroid = 0 ( 0 ) Volume = 0 ( 0 ) Area = 0 ( 0 ) NCOLORS : NColors = 0 ( 0 ) diff --git a/tests/de/iges_1/J2 b/tests/de/iges_1/J2 index fc03f6d8ba..02081cee99 100644 --- a/tests/de/iges_1/J2 +++ b/tests/de/iges_1/J2 @@ -10,8 +10,8 @@ TPSTAT : Faulties = 0 ( 0 ) Warnings = 169 ( 1113 ) Summary = 169 ( 1 CHECKSHAPE : Wires = 0 ( 0 ) Faces = 0 ( 0 ) Shells = 0 ( 0 ) Solids = 0 ( 0 ) NBSHAPES : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 900 ( 900 ) STATSHAPE : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 900 ( 900 ) FreeWire = 0 ( 0 ) -TOLERANCE : MaxTol = 0.004034169186 ( 0.004034577888 ) AvgTol = 7.709490681e-006 ( 1.210856965e-005 ) -LABELS : N0Labels = 900 ( 900 ) N1Labels = 0 ( 970 ) N2Labels = 0 ( 0 ) TotalLabels = 900 ( 1870 ) NameLabels = 900 ( 900 ) ColorLabels = 900 ( 1870 ) LayerLabels = 900 ( 1870 ) +TOLERANCE : MaxTol = 0.004034169186 ( 0.004034577888 ) AvgTol = 7.709490681e-06 ( 1.210856965e-05 ) +LABELS : N0Labels = 900 ( 900 ) N1Labels = 10 ( 4173 ) N2Labels = 0 ( 0 ) TotalLabels = 910 ( 5073 ) NameLabels = 900 ( 900 ) ColorLabels = 910 ( 5073 ) LayerLabels = 910 ( 5073 ) PROPS : Centroid = 0 ( 0 ) Volume = 0 ( 0 ) Area = 0 ( 0 ) NCOLORS : NColors = 1 ( 1 ) COLORS : Colors = YELLOW ( YELLOW ) diff --git a/tests/de/iges_1/J3 b/tests/de/iges_1/J3 index f2fcd1ce62..f3c95bf728 100644 --- a/tests/de/iges_1/J3 +++ b/tests/de/iges_1/J3 @@ -10,8 +10,8 @@ TPSTAT : Faulties = 0 ( 0 ) Warnings = 54 ( 1095 ) Summary = 54 ( 109 CHECKSHAPE : Wires = 0 ( 0 ) Faces = 0 ( 0 ) Shells = 0 ( 0 ) Solids = 0 ( 0 ) NBSHAPES : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 1038 ( 1038 ) STATSHAPE : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 1038 ( 1038 ) FreeWire = 0 ( 0 ) -TOLERANCE : MaxTol = 0.5433123157 ( 0.8329982221 ) AvgTol = 0.002232604726 ( 0.002439058312 ) -LABELS : N0Labels = 1038 ( 1038 ) N1Labels = 0 ( 1537 ) N2Labels = 0 ( 0 ) TotalLabels = 1038 ( 2575 ) NameLabels = 1038 ( 1038 ) ColorLabels = 1038 ( 2575 ) LayerLabels = 1038 ( 2575 ) +TOLERANCE : MaxTol = 0.5433123157 ( 0.8329982221 ) AvgTol = 0.002232604695 ( 0.002439058305 ) +LABELS : N0Labels = 1038 ( 1038 ) N1Labels = 19 ( 4816 ) N2Labels = 0 ( 0 ) TotalLabels = 1057 ( 5854 ) NameLabels = 1038 ( 1038 ) ColorLabels = 1057 ( 5854 ) LayerLabels = 1057 ( 5854 ) PROPS : Centroid = 0 ( 0 ) Volume = 0 ( 0 ) Area = 0 ( 0 ) NCOLORS : NColors = 2 ( 2 ) COLORS : Colors = GREEN RED ( GREEN RED ) diff --git a/tests/de/iges_1/J4 b/tests/de/iges_1/J4 index effd4ae08e..aadc995907 100644 --- a/tests/de/iges_1/J4 +++ b/tests/de/iges_1/J4 @@ -1,5 +1,6 @@ # !!!! This file is generated automatically, do not edit manually! See end script puts "TODO CR23096 ALL: LABELS : Faulty" +puts "TODO CR23096 ALL: COLORS : Faulty" set filename CTS18847.igs @@ -10,11 +11,11 @@ TPSTAT : Faulties = 0 ( 0 ) Warnings = 63 ( 63 ) Summary = 63 ( 63 ) CHECKSHAPE : Wires = 0 ( 0 ) Faces = 0 ( 0 ) Shells = 0 ( 0 ) Solids = 0 ( 0 ) NBSHAPES : Solid = 0 ( 1 ) Shell = 0 ( 1 ) Face = 117 ( 117 ) STATSHAPE : Solid = 0 ( 1 ) Shell = 0 ( 1 ) Face = 117 ( 117 ) FreeWire = 0 ( 0 ) -TOLERANCE : MaxTol = 0.1300697138 ( 0.1300697287 ) AvgTol = 0.002196731047 ( 0.00567483205 ) +TOLERANCE : MaxTol = 0.1300697138 ( 0.1300697287 ) AvgTol = 0.002196731047 ( 0.005674805066 ) LABELS : N0Labels = 1 ( 1 ) N1Labels = 117 ( 0 ) N2Labels = 0 ( 0 ) TotalLabels = 118 ( 1 ) NameLabels = 1 ( 1 ) ColorLabels = 117 ( 1 ) LayerLabels = 117 ( 1 ) PROPS : Centroid = 0 ( 0 ) Volume = 0 ( 0 ) Area = 0 ( 0 ) -NCOLORS : NColors = 1 ( 1 ) -COLORS : Colors = DEEPSKYBLUE1 ( DEEPSKYBLUE1 ) +NCOLORS : NColors = 1 ( 2 ) +COLORS : Colors = DEEPSKYBLUE1 ( DEEPSKYBLUE1 WHITE ) NLAYERS : NLayers = 1 ( 1 ) LAYERS : Layers = 2 ( 2 ) diff --git a/tests/de/iges_1/J5 b/tests/de/iges_1/J5 index 18438471df..29eddb829f 100644 --- a/tests/de/iges_1/J5 +++ b/tests/de/iges_1/J5 @@ -10,7 +10,7 @@ TPSTAT : Faulties = 0 ( 0 ) Warnings = 0 ( 3 ) Summary = 0 ( 3 ) CHECKSHAPE : Wires = 0 ( 0 ) Faces = 0 ( 0 ) Shells = 0 ( 0 ) Solids = 0 ( 0 ) NBSHAPES : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 396 ( 396 ) STATSHAPE : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 396 ( 396 ) FreeWire = 0 ( 0 ) -TOLERANCE : MaxTol = 0.9967131592 ( 0.9967131592 ) AvgTol = 0.05132242238 ( 0.05132318968 ) +TOLERANCE : MaxTol = 0.9967131592 ( 0.9967131592 ) AvgTol = 0.05132242103 ( 0.05132318832 ) LABELS : N0Labels = 1 ( 1 ) N1Labels = 396 ( 37 ) N2Labels = 0 ( 0 ) TotalLabels = 397 ( 38 ) NameLabels = 1 ( 1 ) ColorLabels = 396 ( 38 ) LayerLabels = 0 ( 0 ) PROPS : Centroid = 0 ( 0 ) Volume = 0 ( 0 ) Area = 0 ( 0 ) NCOLORS : NColors = 2 ( 2 ) diff --git a/tests/de/iges_1/J6 b/tests/de/iges_1/J6 index b5d18d3eaf..d5703226d8 100644 --- a/tests/de/iges_1/J6 +++ b/tests/de/iges_1/J6 @@ -1,4 +1,5 @@ # !!!! This file is generated automatically, do not edit manually! See end script +puts "TODO CR23096 ALL: LABELS : Faulty" puts "TODO CR23096 ALL: COLORS : Faulty" @@ -10,8 +11,8 @@ TPSTAT : Faulties = 0 ( 0 ) Warnings = 160 ( 856 ) Summary = 160 ( 85 CHECKSHAPE : Wires = 0 ( 0 ) Faces = 0 ( 0 ) Shells = 0 ( 0 ) Solids = 0 ( 0 ) NBSHAPES : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 282 ( 282 ) STATSHAPE : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 282 ( 282 ) FreeWire = 0 ( 0 ) -TOLERANCE : MaxTol = 0.820956344 ( 0.821038439 ) AvgTol = 0.008029334484 ( 0.008105972337 ) -LABELS : N0Labels = 289 ( 289 ) N1Labels = 0 ( 0 ) N2Labels = 0 ( 0 ) TotalLabels = 289 ( 289 ) NameLabels = 289 ( 289 ) ColorLabels = 101 ( 101 ) LayerLabels = 288 ( 288 ) +TOLERANCE : MaxTol = 0.820956344 ( 0.821038439 ) AvgTol = 0.008018002254 ( 0.008094646991 ) +LABELS : N0Labels = 289 ( 289 ) N1Labels = 0 ( 896 ) N2Labels = 0 ( 0 ) TotalLabels = 289 ( 1185 ) NameLabels = 289 ( 289 ) ColorLabels = 101 ( 997 ) LayerLabels = 288 ( 1184 ) PROPS : Centroid = 0 ( 0 ) Volume = 0 ( 0 ) Area = 0 ( 0 ) NCOLORS : NColors = 2 ( 8 ) COLORS : Colors = RED WHITE ( BURLYWOOD1 DARKORANGE DEEPSKYBLUE1 LEMONCHIFFON1 MAGENTA MEDIUMSPRINGGREEN RED WHITE ) diff --git a/tests/de/iges_1/J7 b/tests/de/iges_1/J7 index ce3d72465c..b9f9c3a60f 100644 --- a/tests/de/iges_1/J7 +++ b/tests/de/iges_1/J7 @@ -11,7 +11,7 @@ CHECKSHAPE : Wires = 0 ( 0 ) Faces = 0 ( 0 ) Shells = 0 ( 0 ) So NBSHAPES : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 331 ( 331 ) STATSHAPE : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 331 ( 331 ) FreeWire = 70 ( 116 ) TOLERANCE : MaxTol = 0.6112323056 ( 0.6112323056 ) AvgTol = 0.0009101512481 ( 0.001289214856 ) -LABELS : N0Labels = 1 ( 1 ) N1Labels = 481 ( 739 ) N2Labels = 0 ( 0 ) TotalLabels = 482 ( 740 ) NameLabels = 482 ( 559 ) ColorLabels = 481 ( 739 ) LayerLabels = 479 ( 737 ) +LABELS : N0Labels = 1 ( 1 ) N1Labels = 493 ( 737 ) N2Labels = 0 ( 0 ) TotalLabels = 494 ( 738 ) NameLabels = 430 ( 507 ) ColorLabels = 493 ( 737 ) LayerLabels = 427 ( 735 ) PROPS : Centroid = 0 ( 0 ) Volume = 0 ( 0 ) Area = 0 ( 0 ) NCOLORS : NColors = 8 ( 8 ) COLORS : Colors = BLUE CYAN DARKORANGE GOLD3 PALETURQUOISE2 RED WHITE YELLOW ( BLUE CYAN DARKORANGE GOLD3 PALETURQUOISE2 RED WHITE YELLOW ) diff --git a/tests/de/iges_1/J8 b/tests/de/iges_1/J8 index 2dd2583998..7b6d7950c8 100644 --- a/tests/de/iges_1/J8 +++ b/tests/de/iges_1/J8 @@ -11,7 +11,7 @@ CHECKSHAPE : Wires = 0 ( 0 ) Faces = 0 ( 0 ) Shells = 0 ( 0 ) So NBSHAPES : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 308 ( 308 ) STATSHAPE : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 308 ( 308 ) FreeWire = 6 ( 7 ) TOLERANCE : MaxTol = 0.9778021574 ( 0.9778021574 ) AvgTol = 0.0358027395 ( 0.0357973111 ) -LABELS : N0Labels = 1 ( 1 ) N1Labels = 1089 ( 2056 ) N2Labels = 0 ( 0 ) TotalLabels = 1090 ( 2057 ) NameLabels = 1090 ( 1285 ) ColorLabels = 1089 ( 2056 ) LayerLabels = 168 ( 311 ) +LABELS : N0Labels = 1 ( 1 ) N1Labels = 1093 ( 2685 ) N2Labels = 0 ( 0 ) TotalLabels = 1094 ( 2686 ) NameLabels = 1087 ( 1282 ) ColorLabels = 1093 ( 2685 ) LayerLabels = 166 ( 341 ) PROPS : Centroid = 0 ( 0 ) Volume = 0 ( 0 ) Area = 0 ( 0 ) NCOLORS : NColors = 6 ( 6 ) COLORS : Colors = BLUE GREEN MAGENTA RED WHITE YELLOW ( BLUE GREEN MAGENTA RED WHITE YELLOW ) diff --git a/tests/de/iges_1/K1 b/tests/de/iges_1/K1 index 99a2a8d331..f208a24240 100644 --- a/tests/de/iges_1/K1 +++ b/tests/de/iges_1/K1 @@ -10,8 +10,8 @@ TPSTAT : Faulties = 0 ( 0 ) Warnings = 0 ( 218 ) Summary = 0 ( 218 ) CHECKSHAPE : Wires = 0 ( 0 ) Faces = 0 ( 0 ) Shells = 0 ( 0 ) Solids = 0 ( 0 ) NBSHAPES : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 0 ( 0 ) STATSHAPE : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 0 ( 0 ) FreeWire = 218 ( 218 ) -TOLERANCE : MaxTol = 1e-007 ( 1e-007 ) AvgTol = 1e-007 ( 1e-007 ) -LABELS : N0Labels = 1819 ( 1819 ) N1Labels = 0 ( 0 ) N2Labels = 0 ( 0 ) TotalLabels = 1819 ( 1819 ) NameLabels = 1819 ( 1819 ) ColorLabels = 1601 ( 1819 ) LayerLabels = 0 ( 0 ) +TOLERANCE : MaxTol = 1e-07 ( 1e-07 ) AvgTol = 1e-07 ( 1e-07 ) +LABELS : N0Labels = 1819 ( 1819 ) N1Labels = 210 ( 0 ) N2Labels = 0 ( 0 ) TotalLabels = 2029 ( 1819 ) NameLabels = 1819 ( 1819 ) ColorLabels = 1811 ( 1819 ) LayerLabels = 0 ( 0 ) PROPS : Centroid = 0 ( 0 ) Volume = 0 ( 0 ) Area = 0 ( 0 ) NCOLORS : NColors = 6 ( 6 ) COLORS : Colors = BLUE GREEN MAGENTA RED WHITE YELLOW ( BLUE GREEN MAGENTA RED WHITE YELLOW ) diff --git a/tests/de/iges_1/K2 b/tests/de/iges_1/K2 index 7b1dddcb5a..5794f11e4d 100644 --- a/tests/de/iges_1/K2 +++ b/tests/de/iges_1/K2 @@ -11,7 +11,7 @@ CHECKSHAPE : Wires = 0 ( 0 ) Faces = 0 ( 0 ) Shells = 0 ( 0 ) So NBSHAPES : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 568 ( 568 ) STATSHAPE : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 568 ( 568 ) FreeWire = 0 ( 0 ) TOLERANCE : MaxTol = 0.4977710304 ( 0.4977710286 ) AvgTol = 0.001985043383 ( 0.001988149118 ) -LABELS : N0Labels = 568 ( 569 ) N1Labels = 0 ( 1210 ) N2Labels = 0 ( 0 ) TotalLabels = 568 ( 1779 ) NameLabels = 568 ( 569 ) ColorLabels = 568 ( 1778 ) LayerLabels = 568 ( 1778 ) +LABELS : N0Labels = 568 ( 569 ) N1Labels = 0 ( 2775 ) N2Labels = 0 ( 0 ) TotalLabels = 568 ( 3344 ) NameLabels = 568 ( 569 ) ColorLabels = 568 ( 3343 ) LayerLabels = 568 ( 3343 ) PROPS : Centroid = 0 ( 0 ) Volume = 0 ( 0 ) Area = 0 ( 0 ) NCOLORS : NColors = 1 ( 1 ) COLORS : Colors = YELLOW ( YELLOW ) diff --git a/tests/de/iges_1/K3 b/tests/de/iges_1/K3 index 17e031426d..3333a4fd8d 100644 --- a/tests/de/iges_1/K3 +++ b/tests/de/iges_1/K3 @@ -10,8 +10,8 @@ TPSTAT : Faulties = 0 ( 0 ) Warnings = 345 ( 5241 ) Summary = 345 ( 5 CHECKSHAPE : Wires = 8 ( 12 ) Faces = 12 ( 12 ) Shells = 0 ( 0 ) Solids = 0 ( 0 ) NBSHAPES : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 5163 ( 5163 ) STATSHAPE : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 5163 ( 5163 ) FreeWire = 10 ( 10 ) -TOLERANCE : MaxTol = 0.9874083984 ( 0.9875071265 ) AvgTol = 0.01115260658 ( 0.01115854425 ) -LABELS : N0Labels = 5392 ( 5458 ) N1Labels = 18 ( 4541 ) N2Labels = 0 ( 0 ) TotalLabels = 5410 ( 9999 ) NameLabels = 5392 ( 5458 ) ColorLabels = 5391 ( 9933 ) LayerLabels = 5391 ( 9933 ) +TOLERANCE : MaxTol = 0.9874083984 ( 0.9875071265 ) AvgTol = 0.01115260676 ( 0.01115854425 ) +LABELS : N0Labels = 5392 ( 5458 ) N1Labels = 302 ( 18481 ) N2Labels = 0 ( 0 ) TotalLabels = 5694 ( 23939 ) NameLabels = 5392 ( 5458 ) ColorLabels = 5675 ( 23873 ) LayerLabels = 5663 ( 23873 ) PROPS : Centroid = 0 ( 0 ) Volume = 0 ( 0 ) Area = 0 ( 0 ) NCOLORS : NColors = 4 ( 4 ) COLORS : Colors = BLACK BLUE CYAN GREEN ( BLACK BLUE CYAN GREEN ) diff --git a/tests/de/iges_1/K4 b/tests/de/iges_1/K4 index 592909a36a..53b822b560 100644 --- a/tests/de/iges_1/K4 +++ b/tests/de/iges_1/K4 @@ -6,11 +6,11 @@ set filename GER60736.igs set ref_data { DATA : Faulties = 0 ( 0 ) Warnings = 0 ( 1 ) Summary = 0 ( 1 ) -TPSTAT : Faulties = 0 ( 0 ) Warnings = 550 ( 814 ) Summary = 550 ( 814 ) +TPSTAT : Faulties = 0 ( 0 ) Warnings = 630 ( 814 ) Summary = 630 ( 814 ) CHECKSHAPE : Wires = 0 ( 0 ) Faces = 0 ( 0 ) Shells = 0 ( 0 ) Solids = 0 ( 0 ) NBSHAPES : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 406 ( 406 ) STATSHAPE : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 406 ( 406 ) FreeWire = 0 ( 0 ) -TOLERANCE : MaxTol = 1.005912368e-005 ( 1.005909788e-005 ) AvgTol = 6.288457741e-007 ( 9.442593263e-006 ) +TOLERANCE : MaxTol = 1e-05 ( 1e-05 ) AvgTol = 6.331036165e-07 ( 9.442558346e-06 ) LABELS : N0Labels = 406 ( 406 ) N1Labels = 0 ( 282 ) N2Labels = 0 ( 0 ) TotalLabels = 406 ( 688 ) NameLabels = 406 ( 406 ) ColorLabels = 406 ( 688 ) LayerLabels = 406 ( 688 ) PROPS : Centroid = 0 ( 0 ) Volume = 0 ( 0 ) Area = 0 ( 0 ) NCOLORS : NColors = 6 ( 6 ) diff --git a/tests/de/iges_1/K5 b/tests/de/iges_1/K5 index 9a94beca91..f71fac3e3a 100644 --- a/tests/de/iges_1/K5 +++ b/tests/de/iges_1/K5 @@ -11,7 +11,7 @@ TPSTAT : Faulties = 0 ( 0 ) Warnings = 223 ( 59 ) Summary = 223 ( 59 CHECKSHAPE : Wires = 0 ( 0 ) Faces = 0 ( 0 ) Shells = 0 ( 0 ) Solids = 0 ( 0 ) NBSHAPES : Solid = 0 ( 1 ) Shell = 0 ( 1 ) Face = 258 ( 258 ) STATSHAPE : Solid = 0 ( 1 ) Shell = 0 ( 1 ) Face = 258 ( 258 ) FreeWire = 0 ( 0 ) -TOLERANCE : MaxTol = 0.03577771363 ( 0.05584689429 ) AvgTol = 0.001023334702 ( 0.004315163006 ) +TOLERANCE : MaxTol = 0.03577771363 ( 0.05584633879 ) AvgTol = 0.001023334702 ( 0.004315134008 ) LABELS : N0Labels = 188 ( 188 ) N1Labels = 258 ( 0 ) N2Labels = 0 ( 0 ) TotalLabels = 446 ( 188 ) NameLabels = 188 ( 188 ) ColorLabels = 445 ( 188 ) LayerLabels = 445 ( 188 ) PROPS : Centroid = 0 ( 0 ) Volume = 0 ( 0 ) Area = 0 ( 0 ) NCOLORS : NColors = 1 ( 1 ) diff --git a/tests/de/iges_1/K6 b/tests/de/iges_1/K6 index 23cc9cd4f5..c11b393fc8 100644 --- a/tests/de/iges_1/K6 +++ b/tests/de/iges_1/K6 @@ -7,7 +7,7 @@ TPSTAT : Faulties = 0 ( 0 ) Warnings = 0 ( 0 ) Summary = 0 ( 0 ) CHECKSHAPE : Wires = 0 ( 0 ) Faces = 0 ( 0 ) Shells = 0 ( 0 ) Solids = 0 ( 0 ) NBSHAPES : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 442 ( 442 ) STATSHAPE : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 442 ( 442 ) FreeWire = 0 ( 0 ) -TOLERANCE : MaxTol = 1e-007 ( 1e-007 ) AvgTol = 1e-007 ( 1e-007 ) +TOLERANCE : MaxTol = 1e-07 ( 1e-07 ) AvgTol = 1e-07 ( 1e-07 ) LABELS : N0Labels = 442 ( 442 ) N1Labels = 0 ( 0 ) N2Labels = 0 ( 0 ) TotalLabels = 442 ( 442 ) NameLabels = 442 ( 442 ) ColorLabels = 0 ( 0 ) LayerLabels = 0 ( 0 ) PROPS : Centroid = 0 ( 0 ) Volume = 0 ( 0 ) Area = 0 ( 0 ) NCOLORS : NColors = 0 ( 0 ) diff --git a/tests/de/iges_1/K7 b/tests/de/iges_1/K7 index 3a17ab99d7..6244a17a93 100644 --- a/tests/de/iges_1/K7 +++ b/tests/de/iges_1/K7 @@ -7,7 +7,7 @@ TPSTAT : Faulties = 0 ( 0 ) Warnings = 0 ( 0 ) Summary = 0 ( 0 ) CHECKSHAPE : Wires = 0 ( 0 ) Faces = 0 ( 0 ) Shells = 0 ( 0 ) Solids = 0 ( 0 ) NBSHAPES : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 844 ( 844 ) STATSHAPE : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 844 ( 844 ) FreeWire = 0 ( 0 ) -TOLERANCE : MaxTol = 1e-007 ( 1e-007 ) AvgTol = 1e-007 ( 1e-007 ) +TOLERANCE : MaxTol = 1e-07 ( 1e-07 ) AvgTol = 1e-07 ( 1e-07 ) LABELS : N0Labels = 844 ( 844 ) N1Labels = 0 ( 0 ) N2Labels = 0 ( 0 ) TotalLabels = 844 ( 844 ) NameLabels = 844 ( 844 ) ColorLabels = 0 ( 0 ) LayerLabels = 0 ( 0 ) PROPS : Centroid = 0 ( 0 ) Volume = 0 ( 0 ) Area = 0 ( 0 ) NCOLORS : NColors = 0 ( 0 ) diff --git a/tests/de/iges_1/K9 b/tests/de/iges_1/K9 index d70f21e8be..9ad37fe40e 100644 --- a/tests/de/iges_1/K9 +++ b/tests/de/iges_1/K9 @@ -1,6 +1,7 @@ # !!!! This file is generated automatically, do not edit manually! See end script puts "TODO CR23096 ALL: LABELS : Faulty" - + + set LinuxFaulties {STATSHAPE} set filename Inner.igs @@ -11,8 +12,8 @@ TPSTAT : Faulties = 0 ( 0 ) Warnings = 35 ( 887 ) Summary = 35 ( 887 CHECKSHAPE : Wires = 0 ( 0 ) Faces = 0 ( 0 ) Shells = 0 ( 0 ) Solids = 0 ( 0 ) NBSHAPES : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 392 ( 392 ) STATSHAPE : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 392 ( 392 ) FreeWire = 97 ( 121 ) -TOLERANCE : MaxTol = 0.9393822539 ( 0.9393822539 ) AvgTol = 0.01258755368 ( 0.01256114362 ) -LABELS : N0Labels = 1 ( 1 ) N1Labels = 1695 ( 3509 ) N2Labels = 0 ( 0 ) TotalLabels = 1696 ( 3510 ) NameLabels = 1696 ( 1972 ) ColorLabels = 1695 ( 3509 ) LayerLabels = 0 ( 0 ) +TOLERANCE : MaxTol = 0.9393822539 ( 0.9393822539 ) AvgTol = 0.01258754851 ( 0.01256114362 ) +LABELS : N0Labels = 1 ( 1 ) N1Labels = 812 ( 3079 ) N2Labels = 0 ( 0 ) TotalLabels = 813 ( 3080 ) NameLabels = 716 ( 992 ) ColorLabels = 812 ( 3079 ) LayerLabels = 0 ( 0 ) PROPS : Centroid = 0 ( 0 ) Volume = 0 ( 0 ) Area = 0 ( 0 ) NCOLORS : NColors = 4 ( 4 ) COLORS : Colors = BLUE GREEN WHITE YELLOW ( BLUE GREEN WHITE YELLOW ) diff --git a/tests/de/iges_1/L1 b/tests/de/iges_1/L1 index badbff95c4..561d01412a 100644 --- a/tests/de/iges_1/L1 +++ b/tests/de/iges_1/L1 @@ -10,8 +10,8 @@ TPSTAT : Faulties = 0 ( 0 ) Warnings = 0 ( 94 ) Summary = 0 ( 94 ) CHECKSHAPE : Wires = 0 ( 0 ) Faces = 0 ( 0 ) Shells = 0 ( 0 ) Solids = 0 ( 0 ) NBSHAPES : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 90 ( 90 ) STATSHAPE : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 90 ( 90 ) FreeWire = 0 ( 0 ) -TOLERANCE : MaxTol = 0.0004488397396 ( 0.0004487950678 ) AvgTol = 6.030363325e-006 ( 6.029819044e-006 ) -LABELS : N0Labels = 3 ( 6 ) N1Labels = 90 ( 90 ) N2Labels = 0 ( 0 ) TotalLabels = 93 ( 96 ) NameLabels = 3 ( 6 ) ColorLabels = 90 ( 90 ) LayerLabels = 0 ( 0 ) +TOLERANCE : MaxTol = 0.0004488397396 ( 0.0004487950678 ) AvgTol = 6.030363325e-06 ( 6.029819044e-06 ) +LABELS : N0Labels = 3 ( 6 ) N1Labels = 94 ( 90 ) N2Labels = 0 ( 0 ) TotalLabels = 97 ( 96 ) NameLabels = 3 ( 6 ) ColorLabels = 94 ( 90 ) LayerLabels = 0 ( 0 ) PROPS : Centroid = 0 ( 0 ) Volume = 0 ( 0 ) Area = 0 ( 0 ) NCOLORS : NColors = 2 ( 2 ) COLORS : Colors = GRAY31 GRAY66 ( GRAY31 GRAY66 ) diff --git a/tests/de/iges_1/L2 b/tests/de/iges_1/L2 index 66d8cdb2ff..4c8273c50f 100644 --- a/tests/de/iges_1/L2 +++ b/tests/de/iges_1/L2 @@ -10,8 +10,8 @@ TPSTAT : Faulties = 0 ( 2 ) Warnings = 274 ( 1846 ) Summary = 274 ( 1 CHECKSHAPE : Wires = 0 ( 0 ) Faces = 0 ( 0 ) Shells = 0 ( 0 ) Solids = 0 ( 0 ) NBSHAPES : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 1041 ( 1041 ) STATSHAPE : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 1041 ( 1041 ) FreeWire = 90 ( 90 ) -TOLERANCE : MaxTol = 0.90877121 ( 0.9087712052 ) AvgTol = 0.01342759475 ( 0.01342779368 ) -LABELS : N0Labels = 1571 ( 1571 ) N1Labels = 0 ( 615 ) N2Labels = 0 ( 0 ) TotalLabels = 1571 ( 2186 ) NameLabels = 1571 ( 2173 ) ColorLabels = 1481 ( 2186 ) LayerLabels = 1481 ( 2186 ) +TOLERANCE : MaxTol = 0.90877121 ( 0.9087712052 ) AvgTol = 0.01342759474 ( 0.01342779368 ) +LABELS : N0Labels = 1571 ( 1571 ) N1Labels = 80 ( 4094 ) N2Labels = 0 ( 0 ) TotalLabels = 1651 ( 5665 ) NameLabels = 1571 ( 2173 ) ColorLabels = 1561 ( 5665 ) LayerLabels = 1525 ( 5665 ) PROPS : Centroid = 0 ( 0 ) Volume = 0 ( 0 ) Area = 0 ( 0 ) NCOLORS : NColors = 4 ( 4 ) COLORS : Colors = GREEN MAGENTA RED YELLOW ( GREEN MAGENTA RED YELLOW ) diff --git a/tests/de/iges_1/L3 b/tests/de/iges_1/L3 index bc87e4f99d..d1f0656a89 100644 --- a/tests/de/iges_1/L3 +++ b/tests/de/iges_1/L3 @@ -11,7 +11,7 @@ CHECKSHAPE : Wires = 0 ( 0 ) Faces = 0 ( 0 ) Shells = 0 ( 0 ) So NBSHAPES : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 313 ( 313 ) STATSHAPE : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 313 ( 313 ) FreeWire = 15 ( 15 ) TOLERANCE : MaxTol = 0.9840868681 ( 0.9840868681 ) AvgTol = 0.04921761999 ( 0.04923582333 ) -LABELS : N0Labels = 516 ( 516 ) N1Labels = 0 ( 229 ) N2Labels = 0 ( 0 ) TotalLabels = 516 ( 745 ) NameLabels = 516 ( 745 ) ColorLabels = 501 ( 745 ) LayerLabels = 501 ( 745 ) +LABELS : N0Labels = 516 ( 516 ) N1Labels = 7 ( 1332 ) N2Labels = 0 ( 0 ) TotalLabels = 523 ( 1848 ) NameLabels = 516 ( 745 ) ColorLabels = 508 ( 1848 ) LayerLabels = 501 ( 1848 ) PROPS : Centroid = 0 ( 0 ) Volume = 0 ( 0 ) Area = 0 ( 0 ) NCOLORS : NColors = 2 ( 2 ) COLORS : Colors = RED YELLOW ( RED YELLOW ) diff --git a/tests/de/iges_1/L4 b/tests/de/iges_1/L4 index eff410316c..c82316cf6a 100644 --- a/tests/de/iges_1/L4 +++ b/tests/de/iges_1/L4 @@ -10,8 +10,8 @@ TPSTAT : Faulties = 0 ( 0 ) Warnings = 18 ( 67 ) Summary = 18 ( 67 ) CHECKSHAPE : Wires = 0 ( 0 ) Faces = 0 ( 0 ) Shells = 0 ( 0 ) Solids = 0 ( 0 ) NBSHAPES : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 230 ( 230 ) STATSHAPE : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 230 ( 230 ) FreeWire = 1 ( 1 ) -TOLERANCE : MaxTol = 0.06012224669 ( 0.1346852729 ) AvgTol = 0.001347526782 ( 0.001524974893 ) -LABELS : N0Labels = 292 ( 292 ) N1Labels = 0 ( 0 ) N2Labels = 0 ( 0 ) TotalLabels = 292 ( 292 ) NameLabels = 292 ( 292 ) ColorLabels = 291 ( 292 ) LayerLabels = 247 ( 248 ) +TOLERANCE : MaxTol = 0.06012224686 ( 0.1346852729 ) AvgTol = 0.001347527212 ( 0.001524974821 ) +LABELS : N0Labels = 292 ( 292 ) N1Labels = 1 ( 731 ) N2Labels = 0 ( 0 ) TotalLabels = 293 ( 1023 ) NameLabels = 292 ( 292 ) ColorLabels = 292 ( 1023 ) LayerLabels = 247 ( 979 ) PROPS : Centroid = 0 ( 0 ) Volume = 0 ( 0 ) Area = 0 ( 0 ) NCOLORS : NColors = 4 ( 4 ) COLORS : Colors = BURLYWOOD1 DEEPSKYBLUE1 RED WHITE ( BURLYWOOD1 DEEPSKYBLUE1 RED WHITE ) diff --git a/tests/de/iges_1/L6 b/tests/de/iges_1/L6 index 7186b9b342..1289021244 100644 --- a/tests/de/iges_1/L6 +++ b/tests/de/iges_1/L6 @@ -10,8 +10,8 @@ TPSTAT : Faulties = 0 ( 0 ) Warnings = 0 ( 270 ) Summary = 0 ( 270 ) CHECKSHAPE : Wires = 0 ( 0 ) Faces = 0 ( 0 ) Shells = 0 ( 0 ) Solids = 0 ( 0 ) NBSHAPES : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 186 ( 186 ) STATSHAPE : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 186 ( 186 ) FreeWire = 0 ( 0 ) -TOLERANCE : MaxTol = 0.04931043567 ( 0.04931014771 ) AvgTol = 0.0003784701943 ( 0.0003861054137 ) -LABELS : N0Labels = 186 ( 186 ) N1Labels = 0 ( 569 ) N2Labels = 0 ( 0 ) TotalLabels = 186 ( 755 ) NameLabels = 186 ( 186 ) ColorLabels = 186 ( 755 ) LayerLabels = 0 ( 0 ) +TOLERANCE : MaxTol = 0.04931043567 ( 0.04931014771 ) AvgTol = 0.000378468014 ( 0.0003861054137 ) +LABELS : N0Labels = 186 ( 186 ) N1Labels = 0 ( 842 ) N2Labels = 0 ( 0 ) TotalLabels = 186 ( 1028 ) NameLabels = 186 ( 186 ) ColorLabels = 186 ( 1028 ) LayerLabels = 0 ( 0 ) PROPS : Centroid = 0 ( 0 ) Volume = 0 ( 0 ) Area = 0 ( 0 ) NCOLORS : NColors = 1 ( 1 ) COLORS : Colors = WHITE ( WHITE ) diff --git a/tests/de/iges_1/L7 b/tests/de/iges_1/L7 index 92862df485..95d09a8bf4 100755 --- a/tests/de/iges_1/L7 +++ b/tests/de/iges_1/L7 @@ -11,7 +11,7 @@ CHECKSHAPE : Wires = 0 ( 0 ) Faces = 0 ( 0 ) Shells = 0 ( 0 ) So NBSHAPES : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 115 ( 115 ) STATSHAPE : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 115 ( 115 ) FreeWire = 4 ( 4 ) TOLERANCE : MaxTol = 0.4134968839 ( 0.4134968924 ) AvgTol = 0.006591900949 ( 0.00663549168 ) -LABELS : N0Labels = 278 ( 286 ) N1Labels = 6 ( 159 ) N2Labels = 0 ( 0 ) TotalLabels = 284 ( 445 ) NameLabels = 278 ( 286 ) ColorLabels = 270 ( 437 ) LayerLabels = 270 ( 437 ) +LABELS : N0Labels = 278 ( 286 ) N1Labels = 10 ( 635 ) N2Labels = 0 ( 0 ) TotalLabels = 288 ( 921 ) NameLabels = 278 ( 286 ) ColorLabels = 274 ( 913 ) LayerLabels = 270 ( 913 ) PROPS : Centroid = 0 ( 0 ) Volume = 0 ( 0 ) Area = 0 ( 0 ) NCOLORS : NColors = 1 ( 1 ) COLORS : Colors = RED ( RED ) diff --git a/tests/de/iges_1/L8 b/tests/de/iges_1/L8 index a21fbea802..37083f5af2 100755 --- a/tests/de/iges_1/L8 +++ b/tests/de/iges_1/L8 @@ -12,7 +12,7 @@ CHECKSHAPE : Wires = 3 ( 5 ) Faces = 1 ( 1 ) Shells = 0 ( 0 ) So NBSHAPES : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 61 ( 61 ) STATSHAPE : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 61 ( 61 ) FreeWire = 0 ( 0 ) TOLERANCE : MaxTol = 0.3140268251 ( 0.3140268243 ) AvgTol = 0.0004719499868 ( 0.0004897135517 ) -LABELS : N0Labels = 61 ( 61 ) N1Labels = 0 ( 1080 ) N2Labels = 0 ( 0 ) TotalLabels = 61 ( 1141 ) NameLabels = 61 ( 61 ) ColorLabels = 61 ( 1141 ) LayerLabels = 0 ( 0 ) +LABELS : N0Labels = 61 ( 61 ) N1Labels = 0 ( 1212 ) N2Labels = 0 ( 0 ) TotalLabels = 61 ( 1273 ) NameLabels = 61 ( 61 ) ColorLabels = 61 ( 1273 ) LayerLabels = 0 ( 0 ) PROPS : Centroid = 0 ( 0 ) Volume = 0 ( 0 ) Area = 0 ( 0 ) NCOLORS : NColors = 3 ( 3 ) COLORS : Colors = CYAN GREEN WHITE ( CYAN GREEN WHITE ) diff --git a/tests/de/iges_1/L9 b/tests/de/iges_1/L9 index 691baae531..d267129f67 100644 --- a/tests/de/iges_1/L9 +++ b/tests/de/iges_1/L9 @@ -10,8 +10,8 @@ TPSTAT : Faulties = 0 ( 0 ) Warnings = 345 ( 734 ) Summary = 345 ( 73 CHECKSHAPE : Wires = 0 ( 0 ) Faces = 0 ( 0 ) Shells = 0 ( 0 ) Solids = 0 ( 0 ) NBSHAPES : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 2297 ( 2297 ) STATSHAPE : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 2297 ( 2297 ) FreeWire = 0 ( 0 ) -TOLERANCE : MaxTol = 0.2778575821 ( 0.2778575802 ) AvgTol = 0.00112790974 ( 0.00112004948 ) -LABELS : N0Labels = 2329 ( 2329 ) N1Labels = 0 ( 0 ) N2Labels = 0 ( 0 ) TotalLabels = 2329 ( 2329 ) NameLabels = 2329 ( 2329 ) ColorLabels = 2319 ( 2329 ) LayerLabels = 2319 ( 2329 ) +TOLERANCE : MaxTol = 0.2778575821 ( 0.2778575802 ) AvgTol = 0.001127909739 ( 0.00112004948 ) +LABELS : N0Labels = 2329 ( 2329 ) N1Labels = 0 ( 8643 ) N2Labels = 0 ( 0 ) TotalLabels = 2329 ( 10972 ) NameLabels = 2329 ( 2329 ) ColorLabels = 2319 ( 10972 ) LayerLabels = 2319 ( 10972 ) PROPS : Centroid = 0 ( 0 ) Volume = 0 ( 0 ) Area = 0 ( 0 ) NCOLORS : NColors = 8 ( 8 ) COLORS : Colors = CYAN CYAN2 GREEN LEMONCHIFFON1 MAGENTA MAGENTA2 WHITE YELLOW ( CYAN CYAN2 GREEN LEMONCHIFFON1 MAGENTA MAGENTA2 WHITE YELLOW ) diff --git a/tests/de/iges_1/M1 b/tests/de/iges_1/M1 index 9485be290c..845d7b6e46 100644 --- a/tests/de/iges_1/M1 +++ b/tests/de/iges_1/M1 @@ -8,12 +8,12 @@ set filename y306351fM.igs set ref_data { DATA : Faulties = 0 ( 1 ) Warnings = 0 ( 0 ) Summary = 0 ( 1 ) -TPSTAT : Faulties = 0 ( 0 ) Warnings = 180 ( 951 ) Summary = 180 ( 951 ) +TPSTAT : Faulties = 0 ( 0 ) Warnings = 183 ( 951 ) Summary = 183 ( 951 ) CHECKSHAPE : Wires = 0 ( 0 ) Faces = 0 ( 1 ) Shells = 0 ( 0 ) Solids = 0 ( 0 ) NBSHAPES : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 392 ( 390 ) STATSHAPE : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 392 ( 390 ) FreeWire = 20 ( 20 ) -TOLERANCE : MaxTol = 1e-005 ( 1.00030003e-005 ) AvgTol = 1.800814403e-007 ( 7.374328322e-006 ) -LABELS : N0Labels = 1528 ( 1528 ) N1Labels = 0 ( 1296 ) N2Labels = 0 ( 0 ) TotalLabels = 1528 ( 2824 ) NameLabels = 1528 ( 1528 ) ColorLabels = 1507 ( 2824 ) LayerLabels = 1504 ( 2820 ) +TOLERANCE : MaxTol = 1e-05 ( 1.00030003e-05 ) AvgTol = 1.900914531e-07 ( 7.374328322e-06 ) +LABELS : N0Labels = 1528 ( 1528 ) N1Labels = 20 ( 1296 ) N2Labels = 0 ( 0 ) TotalLabels = 1548 ( 2824 ) NameLabels = 1528 ( 1528 ) ColorLabels = 1527 ( 2824 ) LayerLabels = 1504 ( 2820 ) PROPS : Centroid = 0 ( 0 ) Volume = 0 ( 0 ) Area = 0 ( 0 ) NCOLORS : NColors = 3 ( 3 ) COLORS : Colors = BLUE CYAN WHITE ( BLUE CYAN WHITE ) diff --git a/tests/de/iges_1/M2 b/tests/de/iges_1/M2 index fad5784d39..8888f85e01 100644 --- a/tests/de/iges_1/M2 +++ b/tests/de/iges_1/M2 @@ -10,8 +10,8 @@ TPSTAT : Faulties = 0 ( 0 ) Warnings = 72 ( 497 ) Summary = 72 ( 497 CHECKSHAPE : Wires = 0 ( 0 ) Faces = 0 ( 0 ) Shells = 0 ( 0 ) Solids = 0 ( 0 ) NBSHAPES : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 215 ( 215 ) STATSHAPE : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 215 ( 215 ) FreeWire = 0 ( 4 ) -TOLERANCE : MaxTol = 0.6931734571 ( 0.6931734576 ) AvgTol = 0.009873722918 ( 0.009848531139 ) -LABELS : N0Labels = 1 ( 1 ) N1Labels = 223 ( 1192 ) N2Labels = 0 ( 0 ) TotalLabels = 224 ( 1193 ) NameLabels = 224 ( 332 ) ColorLabels = 223 ( 1192 ) LayerLabels = 223 ( 1192 ) +TOLERANCE : MaxTol = 0.6931734571 ( 0.6931734576 ) AvgTol = 0.009873721107 ( 0.009848531139 ) +LABELS : N0Labels = 1 ( 1 ) N1Labels = 219 ( 1696 ) N2Labels = 0 ( 0 ) TotalLabels = 220 ( 1697 ) NameLabels = 220 ( 328 ) ColorLabels = 219 ( 1696 ) LayerLabels = 219 ( 1696 ) PROPS : Centroid = 0 ( 0 ) Volume = 0 ( 0 ) Area = 0 ( 0 ) NCOLORS : NColors = 2 ( 2 ) COLORS : Colors = GREEN WHITE ( GREEN WHITE ) diff --git a/tests/de/iges_1/M3 b/tests/de/iges_1/M3 index 22fd31d530..4e119a4b29 100644 --- a/tests/de/iges_1/M3 +++ b/tests/de/iges_1/M3 @@ -11,7 +11,7 @@ CHECKSHAPE : Wires = 0 ( 0 ) Faces = 0 ( 0 ) Shells = 0 ( 0 ) So NBSHAPES : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 178 ( 178 ) STATSHAPE : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 178 ( 178 ) FreeWire = 0 ( 0 ) TOLERANCE : MaxTol = 0.4113920266 ( 0.4113920255 ) AvgTol = 0.004712367758 ( 0.00474257079 ) -LABELS : N0Labels = 1 ( 1 ) N1Labels = 179 ( 553 ) N2Labels = 0 ( 0 ) TotalLabels = 180 ( 554 ) NameLabels = 180 ( 332 ) ColorLabels = 179 ( 553 ) LayerLabels = 0 ( 0 ) +LABELS : N0Labels = 1 ( 1 ) N1Labels = 178 ( 1163 ) N2Labels = 0 ( 0 ) TotalLabels = 179 ( 1164 ) NameLabels = 179 ( 331 ) ColorLabels = 178 ( 1163 ) LayerLabels = 0 ( 0 ) PROPS : Centroid = 0 ( 0 ) Volume = 0 ( 0 ) Area = 0 ( 0 ) NCOLORS : NColors = 1 ( 1 ) COLORS : Colors = WHITE ( WHITE ) diff --git a/tests/de/iges_1/M4 b/tests/de/iges_1/M4 index 7f3b91be9c..ca8e0dd9d7 100644 --- a/tests/de/iges_1/M4 +++ b/tests/de/iges_1/M4 @@ -10,7 +10,7 @@ TPSTAT : Faulties = 0 ( 0 ) Warnings = 0 ( 28 ) Summary = 0 ( 28 ) CHECKSHAPE : Wires = 0 ( 0 ) Faces = 0 ( 0 ) Shells = 0 ( 0 ) Solids = 0 ( 0 ) NBSHAPES : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 322 ( 322 ) STATSHAPE : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 322 ( 322 ) FreeWire = 0 ( 0 ) -TOLERANCE : MaxTol = 2.657548494e-005 ( 1e-005 ) AvgTol = 7.614147437e-007 ( 1.244067797e-006 ) +TOLERANCE : MaxTol = 2.657548494e-05 ( 1e-05 ) AvgTol = 7.614151387e-07 ( 1.244067797e-06 ) LABELS : N0Labels = 321 ( 321 ) N1Labels = 0 ( 0 ) N2Labels = 0 ( 0 ) TotalLabels = 321 ( 321 ) NameLabels = 321 ( 321 ) ColorLabels = 0 ( 0 ) LayerLabels = 0 ( 0 ) PROPS : Centroid = 0 ( 0 ) Volume = 0 ( 0 ) Area = 0 ( 0 ) NCOLORS : NColors = 0 ( 0 ) diff --git a/tests/de/iges_1/M5 b/tests/de/iges_1/M5 index 1c0198a397..22fda968ca 100644 --- a/tests/de/iges_1/M5 +++ b/tests/de/iges_1/M5 @@ -6,12 +6,12 @@ set filename PRO9505.igs set ref_data { DATA : Faulties = 0 ( 0 ) Warnings = 0 ( 1 ) Summary = 0 ( 1 ) -TPSTAT : Faulties = 0 ( 0 ) Warnings = 43 ( 194 ) Summary = 43 ( 194 ) +TPSTAT : Faulties = 0 ( 0 ) Warnings = 55 ( 194 ) Summary = 55 ( 194 ) CHECKSHAPE : Wires = 0 ( 0 ) Faces = 0 ( 0 ) Shells = 0 ( 0 ) Solids = 0 ( 0 ) NBSHAPES : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 126 ( 126 ) STATSHAPE : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 126 ( 126 ) FreeWire = 0 ( 0 ) -TOLERANCE : MaxTol = 0.956222643 ( 0.956222643 ) AvgTol = 0.02522387789 ( 0.02522525371 ) -LABELS : N0Labels = 126 ( 126 ) N1Labels = 0 ( 129 ) N2Labels = 0 ( 0 ) TotalLabels = 126 ( 255 ) NameLabels = 126 ( 255 ) ColorLabels = 126 ( 255 ) LayerLabels = 0 ( 0 ) +TOLERANCE : MaxTol = 0.956222643 ( 0.956222643 ) AvgTol = 0.02522385151 ( 0.0252252553 ) +LABELS : N0Labels = 126 ( 126 ) N1Labels = 0 ( 699 ) N2Labels = 0 ( 0 ) TotalLabels = 126 ( 825 ) NameLabels = 126 ( 255 ) ColorLabels = 126 ( 825 ) LayerLabels = 0 ( 0 ) PROPS : Centroid = 0 ( 0 ) Volume = 0 ( 0 ) Area = 0 ( 0 ) NCOLORS : NColors = 1 ( 1 ) COLORS : Colors = GREEN ( GREEN ) diff --git a/tests/de/iges_1/M6 b/tests/de/iges_1/M6 index 2142d02daa..1c082bac3c 100755 --- a/tests/de/iges_1/M6 +++ b/tests/de/iges_1/M6 @@ -1,5 +1,6 @@ # !!!! This file is generated automatically, do not edit manually! See end script puts "TODO CR23096 ALL: LABELS : Faulty" +puts "TODO CR23096 ALL: COLORS : Faulty" set filename Radhaus.igs @@ -10,11 +11,11 @@ TPSTAT : Faulties = 0 ( 0 ) Warnings = 153 ( 2069 ) Summary = 153 ( 2 CHECKSHAPE : Wires = 0 ( 0 ) Faces = 0 ( 0 ) Shells = 0 ( 0 ) Solids = 0 ( 0 ) NBSHAPES : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 532 ( 532 ) STATSHAPE : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 532 ( 532 ) FreeWire = 0 ( 0 ) -TOLERANCE : MaxTol = 0.888818095 ( 0.8888180952 ) AvgTol = 0.02520544 ( 0.02520812283 ) -LABELS : N0Labels = 1 ( 1 ) N1Labels = 534 ( 4073 ) N2Labels = 0 ( 0 ) TotalLabels = 535 ( 4074 ) NameLabels = 535 ( 833 ) ColorLabels = 534 ( 4073 ) LayerLabels = 532 ( 4071 ) +TOLERANCE : MaxTol = 0.888818095 ( 0.8888180952 ) AvgTol = 0.02520540155 ( 0.02520812283 ) +LABELS : N0Labels = 1 ( 1 ) N1Labels = 532 ( 4846 ) N2Labels = 0 ( 0 ) TotalLabels = 533 ( 4847 ) NameLabels = 533 ( 831 ) ColorLabels = 532 ( 4846 ) LayerLabels = 532 ( 4844 ) PROPS : Centroid = 0 ( 0 ) Volume = 0 ( 0 ) Area = 0 ( 0 ) -NCOLORS : NColors = 2 ( 2 ) -COLORS : Colors = BLUE WHITE ( BLUE WHITE ) +NCOLORS : NColors = 1 ( 2 ) +COLORS : Colors = BLUE ( BLUE WHITE ) NLAYERS : NLayers = 6 ( 6 ) LAYERS : Layers = 193 198 223 233 243 253 ( 193 198 223 233 243 253 ) diff --git a/tests/de/iges_1/M7 b/tests/de/iges_1/M7 index eadaf5ffaa..34d955e9a9 100644 --- a/tests/de/iges_1/M7 +++ b/tests/de/iges_1/M7 @@ -10,8 +10,8 @@ TPSTAT : Faulties = 0 ( 0 ) Warnings = 5 ( 8 ) Summary = 5 ( 8 ) CHECKSHAPE : Wires = 0 ( 0 ) Faces = 0 ( 0 ) Shells = 0 ( 0 ) Solids = 0 ( 0 ) NBSHAPES : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 1521 ( 1521 ) STATSHAPE : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 1521 ( 1521 ) FreeWire = 20 ( 20 ) -TOLERANCE : MaxTol = 0.99945453 ( 0.9994545568 ) AvgTol = 0.05493282944 ( 0.0549332116 ) -LABELS : N0Labels = 1502 ( 1502 ) N1Labels = 60 ( 473 ) N2Labels = 0 ( 0 ) TotalLabels = 1562 ( 1975 ) NameLabels = 1562 ( 1580 ) ColorLabels = 1561 ( 1974 ) LayerLabels = 0 ( 0 ) +TOLERANCE : MaxTol = 0.99945453 ( 0.9994545568 ) AvgTol = 0.05493266383 ( 0.0549332116 ) +LABELS : N0Labels = 1502 ( 1502 ) N1Labels = 30 ( 4747 ) N2Labels = 0 ( 0 ) TotalLabels = 1532 ( 6249 ) NameLabels = 1532 ( 1550 ) ColorLabels = 1531 ( 6248 ) LayerLabels = 0 ( 0 ) PROPS : Centroid = 0 ( 0 ) Volume = 0 ( 0 ) Area = 0 ( 0 ) NCOLORS : NColors = 1 ( 1 ) COLORS : Colors = GOLD ( GOLD ) diff --git a/tests/de/iges_1/M8 b/tests/de/iges_1/M8 index f832aa527c..3f961f52bc 100644 --- a/tests/de/iges_1/M8 +++ b/tests/de/iges_1/M8 @@ -10,7 +10,7 @@ TPSTAT : Faulties = 0 ( 0 ) Warnings = 0 ( 0 ) Summary = 0 ( 0 ) CHECKSHAPE : Wires = 0 ( 0 ) Faces = 0 ( 0 ) Shells = 0 ( 0 ) Solids = 0 ( 0 ) NBSHAPES : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 0 ( 0 ) STATSHAPE : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 0 ( 0 ) FreeWire = 0 ( 0 ) -TOLERANCE : MaxTol = 1e-007 ( 1e-007 ) AvgTol = 1e-007 ( 1e-007 ) +TOLERANCE : MaxTol = 1e-07 ( 1e-07 ) AvgTol = 1e-07 ( 1e-07 ) LABELS : N0Labels = 88 ( 88 ) N1Labels = 0 ( 0 ) N2Labels = 0 ( 0 ) TotalLabels = 88 ( 88 ) NameLabels = 88 ( 88 ) ColorLabels = 41 ( 88 ) LayerLabels = 0 ( 0 ) PROPS : Centroid = 0 ( 0 ) Volume = 0 ( 0 ) Area = 0 ( 0 ) NCOLORS : NColors = 1 ( 1 ) diff --git a/tests/de/iges_1/M9 b/tests/de/iges_1/M9 index 1b4dca8325..42c7bc37eb 100644 --- a/tests/de/iges_1/M9 +++ b/tests/de/iges_1/M9 @@ -1,7 +1,7 @@ # !!!! This file is generated automatically, do not edit manually! See end script set filename ardi1.igs -# set in as local length unit +# set in as local lenght unit set lengthunit_start "in" set ref_data { @@ -10,7 +10,7 @@ TPSTAT : Faulties = 0 ( 0 ) Warnings = 2 ( 6 ) Summary = 2 ( 6 ) CHECKSHAPE : Wires = 0 ( 0 ) Faces = 0 ( 0 ) Shells = 0 ( 0 ) Solids = 0 ( 0 ) NBSHAPES : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 4 ( 4 ) STATSHAPE : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 4 ( 4 ) FreeWire = 0 ( 0 ) -TOLERANCE : MaxTol = 1.000100001e-007 ( 1.000100001e-007 ) AvgTol = 1.000015385e-007 ( 1.000015385e-007 ) +TOLERANCE : MaxTol = 1.000100001e-07 ( 1.000100001e-07 ) AvgTol = 1.000015385e-07 ( 1.000015385e-07 ) LABELS : N0Labels = 4 ( 4 ) N1Labels = 0 ( 0 ) N2Labels = 0 ( 0 ) TotalLabels = 4 ( 4 ) NameLabels = 4 ( 4 ) ColorLabels = 0 ( 0 ) LayerLabels = 0 ( 0 ) PROPS : Centroid = 0 ( 0 ) Volume = 0 ( 0 ) Area = 0 ( 0 ) NCOLORS : NColors = 0 ( 0 ) diff --git a/tests/de/iges_1/N1 b/tests/de/iges_1/N1 index 954d7e9ad0..0d9358464d 100644 --- a/tests/de/iges_1/N1 +++ b/tests/de/iges_1/N1 @@ -10,8 +10,8 @@ TPSTAT : Faulties = 0 ( 0 ) Warnings = 0 ( 1 ) Summary = 0 ( 1 ) CHECKSHAPE : Wires = 0 ( 0 ) Faces = 0 ( 0 ) Shells = 0 ( 0 ) Solids = 0 ( 0 ) NBSHAPES : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 0 ( 0 ) STATSHAPE : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 0 ( 0 ) FreeWire = 1 ( 1 ) -TOLERANCE : MaxTol = 1e-007 ( 1e-007 ) AvgTol = 1e-007 ( 1e-007 ) -LABELS : N0Labels = 148 ( 148 ) N1Labels = 0 ( 0 ) N2Labels = 0 ( 0 ) TotalLabels = 148 ( 148 ) NameLabels = 148 ( 148 ) ColorLabels = 135 ( 148 ) LayerLabels = 135 ( 148 ) +TOLERANCE : MaxTol = 1e-07 ( 1e-07 ) AvgTol = 1e-07 ( 1e-07 ) +LABELS : N0Labels = 148 ( 148 ) N1Labels = 1 ( 0 ) N2Labels = 0 ( 0 ) TotalLabels = 149 ( 148 ) NameLabels = 148 ( 148 ) ColorLabels = 136 ( 148 ) LayerLabels = 135 ( 148 ) PROPS : Centroid = 0 ( 0 ) Volume = 0 ( 0 ) Area = 0 ( 0 ) NCOLORS : NColors = 4 ( 4 ) COLORS : Colors = CYAN GREEN MAGENTA YELLOW ( CYAN GREEN MAGENTA YELLOW ) diff --git a/tests/de/iges_1/N2 b/tests/de/iges_1/N2 index 4bee4599a4..44157924fd 100644 --- a/tests/de/iges_1/N2 +++ b/tests/de/iges_1/N2 @@ -11,7 +11,7 @@ TPSTAT : Faulties = 0 ( 0 ) Warnings = 876 ( 220 ) Summary = 876 ( 22 CHECKSHAPE : Wires = 0 ( 0 ) Faces = 0 ( 0 ) Shells = 0 ( 0 ) Solids = 0 ( 0 ) NBSHAPES : Solid = 0 ( 1 ) Shell = 0 ( 1 ) Face = 471 ( 471 ) STATSHAPE : Solid = 0 ( 1 ) Shell = 0 ( 1 ) Face = 471 ( 471 ) FreeWire = 0 ( 0 ) -TOLERANCE : MaxTol = 0.01171108481 ( 0.01550345628 ) AvgTol = 0.0001752008386 ( 0.001202555083 ) +TOLERANCE : MaxTol = 0.01171108481 ( 0.01550330124 ) AvgTol = 0.0001752008386 ( 0.00120254956 ) LABELS : N0Labels = 7 ( 7 ) N1Labels = 471 ( 0 ) N2Labels = 0 ( 0 ) TotalLabels = 478 ( 7 ) NameLabels = 7 ( 7 ) ColorLabels = 477 ( 7 ) LayerLabels = 0 ( 0 ) PROPS : Centroid = 0 ( 0 ) Volume = 0 ( 0 ) Area = 0 ( 0 ) NCOLORS : NColors = 2 ( 2 ) diff --git a/tests/de/iges_1/N3 b/tests/de/iges_1/N3 index a969ee593d..93f80d4a04 100644 --- a/tests/de/iges_1/N3 +++ b/tests/de/iges_1/N3 @@ -11,7 +11,7 @@ CHECKSHAPE : Wires = 0 ( 0 ) Faces = 0 ( 0 ) Shells = 0 ( 0 ) So NBSHAPES : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 523 ( 523 ) STATSHAPE : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 523 ( 523 ) FreeWire = 0 ( 0 ) TOLERANCE : MaxTol = 0.1109937052 ( 0.111004803 ) AvgTol = 0.001890307695 ( 0.001893544034 ) -LABELS : N0Labels = 523 ( 523 ) N1Labels = 0 ( 593 ) N2Labels = 0 ( 0 ) TotalLabels = 523 ( 1116 ) NameLabels = 523 ( 641 ) ColorLabels = 523 ( 1116 ) LayerLabels = 523 ( 1116 ) +LABELS : N0Labels = 523 ( 523 ) N1Labels = 248 ( 1310 ) N2Labels = 0 ( 0 ) TotalLabels = 771 ( 1833 ) NameLabels = 523 ( 641 ) ColorLabels = 771 ( 1833 ) LayerLabels = 771 ( 1833 ) PROPS : Centroid = 0 ( 0 ) Volume = 0 ( 0 ) Area = 0 ( 0 ) NCOLORS : NColors = 3 ( 3 ) COLORS : Colors = BLACK GREEN RED ( BLACK GREEN RED ) diff --git a/tests/de/iges_1/N4 b/tests/de/iges_1/N4 index e76d645314..e5baa5a2d6 100644 --- a/tests/de/iges_1/N4 +++ b/tests/de/iges_1/N4 @@ -10,8 +10,8 @@ TPSTAT : Faulties = 0 ( 0 ) Warnings = 1 ( 14 ) Summary = 1 ( 14 ) CHECKSHAPE : Wires = 0 ( 0 ) Faces = 0 ( 0 ) Shells = 0 ( 0 ) Solids = 0 ( 0 ) NBSHAPES : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 50 ( 50 ) STATSHAPE : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 50 ( 50 ) FreeWire = 0 ( 0 ) -TOLERANCE : MaxTol = 8.101203376e-006 ( 1e-005 ) AvgTol = 7.842895251e-007 ( 3.006925488e-006 ) -LABELS : N0Labels = 50 ( 50 ) N1Labels = 0 ( 72 ) N2Labels = 0 ( 0 ) TotalLabels = 50 ( 122 ) NameLabels = 50 ( 50 ) ColorLabels = 50 ( 122 ) LayerLabels = 50 ( 122 ) +TOLERANCE : MaxTol = 8.101203376e-06 ( 1e-05 ) AvgTol = 7.842895251e-07 ( 3.006925488e-06 ) +LABELS : N0Labels = 50 ( 50 ) N1Labels = 16 ( 78 ) N2Labels = 0 ( 0 ) TotalLabels = 66 ( 128 ) NameLabels = 50 ( 50 ) ColorLabels = 66 ( 128 ) LayerLabels = 66 ( 128 ) PROPS : Centroid = 0 ( 0 ) Volume = 0 ( 0 ) Area = 0 ( 0 ) NCOLORS : NColors = 1 ( 1 ) COLORS : Colors = GREEN ( GREEN ) diff --git a/tests/de/iges_1/N5 b/tests/de/iges_1/N5 index 3579f466d6..890b77f7f6 100644 --- a/tests/de/iges_1/N5 +++ b/tests/de/iges_1/N5 @@ -11,8 +11,8 @@ TPSTAT : Faulties = 0 ( 0 ) Warnings = 12 ( 432 ) Summary = 12 ( 432 CHECKSHAPE : Wires = 0 ( 0 ) Faces = 0 ( 0 ) Shells = 0 ( 0 ) Solids = 0 ( 0 ) NBSHAPES : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 240 ( 240 ) STATSHAPE : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 240 ( 240 ) FreeWire = 135 ( 139 ) -TOLERANCE : MaxTol = 0.03614106888 ( 0.03613204275 ) AvgTol = 0.0001689040536 ( 0.000170731592 ) -LABELS : N0Labels = 1 ( 1 ) N1Labels = 969 ( 3028 ) N2Labels = 0 ( 0 ) TotalLabels = 970 ( 3029 ) NameLabels = 970 ( 1302 ) ColorLabels = 969 ( 3028 ) LayerLabels = 0 ( 0 ) +TOLERANCE : MaxTol = 0.03614106888 ( 0.03613204275 ) AvgTol = 0.0001689040122 ( 0.000170731592 ) +LABELS : N0Labels = 1 ( 1 ) N1Labels = 472 ( 2374 ) N2Labels = 0 ( 0 ) TotalLabels = 473 ( 2375 ) NameLabels = 338 ( 636 ) ColorLabels = 472 ( 2374 ) LayerLabels = 0 ( 0 ) PROPS : Centroid = 0 ( 0 ) Volume = 0 ( 0 ) Area = 0 ( 0 ) NCOLORS : NColors = 1 ( 1 ) COLORS : Colors = WHITE ( WHITE ) diff --git a/tests/de/iges_1/N6 b/tests/de/iges_1/N6 index 8495267196..7d7601bb96 100644 --- a/tests/de/iges_1/N6 +++ b/tests/de/iges_1/N6 @@ -11,7 +11,7 @@ CHECKSHAPE : Wires = 0 ( 0 ) Faces = 0 ( 0 ) Shells = 0 ( 0 ) So NBSHAPES : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 30 ( 30 ) STATSHAPE : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 30 ( 30 ) FreeWire = 0 ( 0 ) TOLERANCE : MaxTol = 0.01590471793 ( 0.01590471327 ) AvgTol = 0.0001153880222 ( 0.0001201847625 ) -LABELS : N0Labels = 30 ( 30 ) N1Labels = 0 ( 12 ) N2Labels = 0 ( 0 ) TotalLabels = 30 ( 42 ) NameLabels = 30 ( 32 ) ColorLabels = 30 ( 42 ) LayerLabels = 30 ( 42 ) +LABELS : N0Labels = 30 ( 30 ) N1Labels = 0 ( 30 ) N2Labels = 0 ( 0 ) TotalLabels = 30 ( 60 ) NameLabels = 30 ( 32 ) ColorLabels = 30 ( 60 ) LayerLabels = 30 ( 60 ) PROPS : Centroid = 0 ( 0 ) Volume = 0 ( 0 ) Area = 0 ( 0 ) NCOLORS : NColors = 2 ( 2 ) COLORS : Colors = GREEN RED ( GREEN RED ) diff --git a/tests/de/iges_1/N7 b/tests/de/iges_1/N7 index 52e59ae98b..9b26c631bb 100644 --- a/tests/de/iges_1/N7 +++ b/tests/de/iges_1/N7 @@ -10,8 +10,8 @@ TPSTAT : Faulties = 0 ( 0 ) Warnings = 2 ( 36 ) Summary = 2 ( 36 ) CHECKSHAPE : Wires = 0 ( 0 ) Faces = 0 ( 0 ) Shells = 0 ( 0 ) Solids = 0 ( 0 ) NBSHAPES : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 123 ( 123 ) STATSHAPE : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 123 ( 123 ) FreeWire = 7 ( 7 ) -TOLERANCE : MaxTol = 0.01306151266 ( 0.01306151266 ) AvgTol = 4.924660224e-005 ( 4.969340655e-005 ) -LABELS : N0Labels = 1 ( 1 ) N1Labels = 675 ( 1417 ) N2Labels = 0 ( 0 ) TotalLabels = 676 ( 1418 ) NameLabels = 676 ( 745 ) ColorLabels = 675 ( 1417 ) LayerLabels = 584 ( 1236 ) +TOLERANCE : MaxTol = 0.01306151266 ( 0.01306151266 ) AvgTol = 4.924660224e-05 ( 4.969340655e-05 ) +LABELS : N0Labels = 1 ( 1 ) N1Labels = 208 ( 954 ) N2Labels = 0 ( 0 ) TotalLabels = 209 ( 955 ) NameLabels = 202 ( 266 ) ColorLabels = 208 ( 954 ) LayerLabels = 155 ( 822 ) PROPS : Centroid = 0 ( 0 ) Volume = 0 ( 0 ) Area = 0 ( 0 ) NCOLORS : NColors = 2 ( 2 ) COLORS : Colors = WHITE YELLOW ( WHITE YELLOW ) diff --git a/tests/de/iges_1/O1 b/tests/de/iges_1/O1 index 4a32b9c44b..25dde97606 100644 --- a/tests/de/iges_1/O1 +++ b/tests/de/iges_1/O1 @@ -6,12 +6,12 @@ set filename TibTray_Size3.igs set ref_data { DATA : Faulties = 0 ( 0 ) Warnings = 0 ( 1 ) Summary = 0 ( 1 ) -TPSTAT : Faulties = 0 ( 0 ) Warnings = 168 ( 315 ) Summary = 168 ( 315 ) +TPSTAT : Faulties = 0 ( 0 ) Warnings = 205 ( 315 ) Summary = 205 ( 315 ) CHECKSHAPE : Wires = 0 ( 0 ) Faces = 0 ( 0 ) Shells = 0 ( 0 ) Solids = 0 ( 0 ) NBSHAPES : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 212 ( 212 ) STATSHAPE : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 212 ( 212 ) FreeWire = 6 ( 6 ) -TOLERANCE : MaxTol = 0.9221308818 ( 0.9221308818 ) AvgTol = 0.01482053616 ( 0.01482175825 ) -LABELS : N0Labels = 244 ( 244 ) N1Labels = 0 ( 216 ) N2Labels = 0 ( 0 ) TotalLabels = 244 ( 460 ) NameLabels = 244 ( 460 ) ColorLabels = 238 ( 460 ) LayerLabels = 0 ( 0 ) +TOLERANCE : MaxTol = 0.9221308818 ( 0.9221308818 ) AvgTol = 0.01482078545 ( 0.01482175825 ) +LABELS : N0Labels = 244 ( 244 ) N1Labels = 3 ( 1191 ) N2Labels = 0 ( 0 ) TotalLabels = 247 ( 1435 ) NameLabels = 244 ( 460 ) ColorLabels = 241 ( 1435 ) LayerLabels = 0 ( 0 ) PROPS : Centroid = 0 ( 0 ) Volume = 0 ( 0 ) Area = 0 ( 0 ) NCOLORS : NColors = 6 ( 6 ) COLORS : Colors = DEEPSKYBLUE2 MAGENTA ORANGE ORANGERED RED YELLOW ( DEEPSKYBLUE2 MAGENTA ORANGE ORANGERED RED YELLOW ) diff --git a/tests/de/iges_1/O2 b/tests/de/iges_1/O2 index b34afd6d69..95acc850d5 100644 --- a/tests/de/iges_1/O2 +++ b/tests/de/iges_1/O2 @@ -10,7 +10,7 @@ TPSTAT : Faulties = 0 ( 0 ) Warnings = 19 ( 485 ) Summary = 19 ( 485 CHECKSHAPE : Wires = 0 ( 0 ) Faces = 0 ( 0 ) Shells = 0 ( 0 ) Solids = 0 ( 0 ) NBSHAPES : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 239 ( 239 ) STATSHAPE : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 239 ( 239 ) FreeWire = 0 ( 0 ) -TOLERANCE : MaxTol = 0.000988505444 ( 0.0009885051926 ) AvgTol = 5.77847939e-005 ( 5.822742726e-005 ) +TOLERANCE : MaxTol = 0.000988505444 ( 0.0009885051926 ) AvgTol = 5.778597891e-05 ( 5.822742726e-05 ) LABELS : N0Labels = 237 ( 237 ) N1Labels = 0 ( 0 ) N2Labels = 0 ( 0 ) TotalLabels = 237 ( 237 ) NameLabels = 237 ( 237 ) ColorLabels = 0 ( 0 ) LayerLabels = 236 ( 237 ) PROPS : Centroid = 0 ( 0 ) Volume = 0 ( 0 ) Area = 0 ( 0 ) NCOLORS : NColors = 0 ( 0 ) diff --git a/tests/de/iges_1/O3 b/tests/de/iges_1/O3 index d8060b5cb9..98ca2c7d73 100755 --- a/tests/de/iges_1/O3 +++ b/tests/de/iges_1/O3 @@ -1,20 +1,21 @@ # !!!! This file is generated automatically, do not edit manually! See end script puts "TODO CR23096 ALL: LABELS : Faulty" +puts "TODO CR23096 ALL: COLORS : Faulty" set filename UKI60106.igs set ref_data { DATA : Faulties = 0 ( 0 ) Warnings = 0 ( 0 ) Summary = 0 ( 0 ) -TPSTAT : Faulties = 0 ( 0 ) Warnings = 72 ( 612 ) Summary = 72 ( 612 ) +TPSTAT : Faulties = 0 ( 0 ) Warnings = 70 ( 614 ) Summary = 70 ( 614 ) CHECKSHAPE : Wires = 1 ( 3 ) Faces = 1 ( 2 ) Shells = 0 ( 0 ) Solids = 0 ( 0 ) NBSHAPES : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 457 ( 457 ) STATSHAPE : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 457 ( 457 ) FreeWire = 26 ( 26 ) -TOLERANCE : MaxTol = 0.9874160851 ( 0.98741607 ) AvgTol = 0.01694436711 ( 0.0170526461 ) -LABELS : N0Labels = 1706 ( 1706 ) N1Labels = 0 ( 0 ) N2Labels = 0 ( 0 ) TotalLabels = 1706 ( 1706 ) NameLabels = 1706 ( 1706 ) ColorLabels = 1680 ( 1706 ) LayerLabels = 1680 ( 1706 ) +TOLERANCE : MaxTol = 0.9874160851 ( 0.98741607 ) AvgTol = 0.0167012413 ( 0.0167443192 ) +LABELS : N0Labels = 1706 ( 1706 ) N1Labels = 23 ( 2418 ) N2Labels = 0 ( 0 ) TotalLabels = 1729 ( 4124 ) NameLabels = 1706 ( 1706 ) ColorLabels = 1703 ( 4124 ) LayerLabels = 1680 ( 4124 ) PROPS : Centroid = 0 ( 0 ) Volume = 0 ( 0 ) Area = 0 ( 0 ) -NCOLORS : NColors = 4 ( 4 ) -COLORS : Colors = DARKORANGE DARKVIOLET GRAY57 ORCHID1 ( DARKORANGE DARKVIOLET GRAY57 ORCHID1 ) +NCOLORS : NColors = 4 ( 5 ) +COLORS : Colors = DARKORANGE DARKVIOLET GRAY57 ORCHID1 ( DARKORANGE DARKVIOLET GRAY57 ORCHID1 WHITE ) NLAYERS : NLayers = 3 ( 3 ) LAYERS : Layers = 1 24 25 ( 1 24 25 ) diff --git a/tests/de/iges_1/O4 b/tests/de/iges_1/O4 index d0a83de12f..7273d30f3d 100644 --- a/tests/de/iges_1/O4 +++ b/tests/de/iges_1/O4 @@ -6,12 +6,12 @@ set filename UKI60556.igs set ref_data { DATA : Faulties = 0 ( 0 ) Warnings = 0 ( 1 ) Summary = 0 ( 1 ) -TPSTAT : Faulties = 0 ( 0 ) Warnings = 448 ( 1005 ) Summary = 448 ( 1005 ) +TPSTAT : Faulties = 0 ( 0 ) Warnings = 473 ( 1005 ) Summary = 473 ( 1005 ) CHECKSHAPE : Wires = 0 ( 0 ) Faces = 0 ( 0 ) Shells = 0 ( 0 ) Solids = 0 ( 0 ) NBSHAPES : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 300 ( 300 ) STATSHAPE : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 300 ( 300 ) FreeWire = 119 ( 139 ) -TOLERANCE : MaxTol = 1e-005 ( 0.06099237775 ) AvgTol = 3.184878471e-007 ( 1.621424764e-005 ) -LABELS : N0Labels = 432 ( 432 ) N1Labels = 12 ( 845 ) N2Labels = 0 ( 0 ) TotalLabels = 444 ( 1277 ) NameLabels = 432 ( 687 ) ColorLabels = 320 ( 1277 ) LayerLabels = 320 ( 1277 ) +TOLERANCE : MaxTol = 1e-05 ( 0.06099237775 ) AvgTol = 3.144800928e-07 ( 1.621424764e-05 ) +LABELS : N0Labels = 432 ( 432 ) N1Labels = 115 ( 863 ) N2Labels = 0 ( 0 ) TotalLabels = 547 ( 1295 ) NameLabels = 432 ( 687 ) ColorLabels = 423 ( 1295 ) LayerLabels = 320 ( 1295 ) PROPS : Centroid = 0 ( 0 ) Volume = 0 ( 0 ) Area = 0 ( 0 ) NCOLORS : NColors = 6 ( 6 ) COLORS : Colors = CYAN GREEN MAGENTA RED WHITE YELLOW ( CYAN GREEN MAGENTA RED WHITE YELLOW ) diff --git a/tests/de/iges_1/O5 b/tests/de/iges_1/O5 index ba8c2104ac..17153c754d 100755 --- a/tests/de/iges_1/O5 +++ b/tests/de/iges_1/O5 @@ -7,7 +7,7 @@ TPSTAT : Faulties = 0 ( 0 ) Warnings = 252 ( 6395 ) Summary = 252 ( 6 CHECKSHAPE : Wires = 0 ( 0 ) Faces = 0 ( 0 ) Shells = 0 ( 0 ) Solids = 0 ( 0 ) NBSHAPES : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 685 ( 685 ) STATSHAPE : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 685 ( 685 ) FreeWire = 0 ( 0 ) -TOLERANCE : MaxTol = 0.03464832644 ( 0.08716146716 ) AvgTol = 0.0001786183125 ( 0.0002065396413 ) +TOLERANCE : MaxTol = 0.03464832644 ( 0.08716146716 ) AvgTol = 0.0001784469506 ( 0.0002065396414 ) LABELS : N0Labels = 1 ( 1 ) N1Labels = 0 ( 0 ) N2Labels = 0 ( 0 ) TotalLabels = 1 ( 1 ) NameLabels = 1 ( 1 ) ColorLabels = 0 ( 0 ) LayerLabels = 0 ( 0 ) PROPS : Centroid = 0 ( 0 ) Volume = 0 ( 0 ) Area = 0 ( 0 ) NCOLORS : NColors = 0 ( 0 ) diff --git a/tests/de/iges_1/O6 b/tests/de/iges_1/O6 index 2e7b86a78d..00d8ecf193 100644 --- a/tests/de/iges_1/O6 +++ b/tests/de/iges_1/O6 @@ -10,8 +10,8 @@ TPSTAT : Faulties = 0 ( 1 ) Warnings = 0 ( 16 ) Summary = 0 ( 17 ) CHECKSHAPE : Wires = 0 ( 0 ) Faces = 0 ( 0 ) Shells = 0 ( 0 ) Solids = 0 ( 0 ) NBSHAPES : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 0 ( 0 ) STATSHAPE : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 0 ( 0 ) FreeWire = 16 ( 16 ) -TOLERANCE : MaxTol = 1e-007 ( 1e-007 ) AvgTol = 1e-007 ( 1e-007 ) -LABELS : N0Labels = 4160 ( 4160 ) N1Labels = 286 ( 562 ) N2Labels = 0 ( 0 ) TotalLabels = 4446 ( 4722 ) NameLabels = 4160 ( 4160 ) ColorLabels = 3040 ( 3061 ) LayerLabels = 4382 ( 4402 ) +TOLERANCE : MaxTol = 1e-07 ( 1e-07 ) AvgTol = 1e-07 ( 1e-07 ) +LABELS : N0Labels = 4160 ( 4160 ) N1Labels = 302 ( 562 ) N2Labels = 0 ( 0 ) TotalLabels = 4462 ( 4722 ) NameLabels = 4160 ( 4160 ) ColorLabels = 3056 ( 3061 ) LayerLabels = 4382 ( 4402 ) PROPS : Centroid = 0 ( 0 ) Volume = 0 ( 0 ) Area = 0 ( 0 ) NCOLORS : NColors = 6 ( 6 ) COLORS : Colors = BLUE CYAN GREEN MAGENTA RED YELLOW ( BLUE CYAN GREEN MAGENTA RED YELLOW ) diff --git a/tests/de/iges_1/O7 b/tests/de/iges_1/O7 index d2cb4344b6..849fea0a45 100644 --- a/tests/de/iges_1/O7 +++ b/tests/de/iges_1/O7 @@ -10,8 +10,8 @@ TPSTAT : Faulties = 0 ( 0 ) Warnings = 0 ( 68 ) Summary = 0 ( 68 ) CHECKSHAPE : Wires = 0 ( 0 ) Faces = 0 ( 0 ) Shells = 0 ( 0 ) Solids = 0 ( 0 ) NBSHAPES : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 0 ( 0 ) STATSHAPE : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 0 ( 0 ) FreeWire = 68 ( 68 ) -TOLERANCE : MaxTol = 1e-007 ( 1e-007 ) AvgTol = 1e-007 ( 1e-007 ) -LABELS : N0Labels = 3170 ( 3170 ) N1Labels = 524 ( 526 ) N2Labels = 0 ( 0 ) TotalLabels = 3694 ( 3696 ) NameLabels = 3170 ( 3170 ) ColorLabels = 2514 ( 2564 ) LayerLabels = 3596 ( 3662 ) +TOLERANCE : MaxTol = 1e-07 ( 1e-07 ) AvgTol = 1e-07 ( 1e-07 ) +LABELS : N0Labels = 3170 ( 3170 ) N1Labels = 545 ( 526 ) N2Labels = 0 ( 0 ) TotalLabels = 3715 ( 3696 ) NameLabels = 3170 ( 3170 ) ColorLabels = 2535 ( 2564 ) LayerLabels = 3596 ( 3662 ) PROPS : Centroid = 0 ( 0 ) Volume = 0 ( 0 ) Area = 0 ( 0 ) NCOLORS : NColors = 6 ( 6 ) COLORS : Colors = BLUE CYAN GREEN MAGENTA RED YELLOW ( BLUE CYAN GREEN MAGENTA RED YELLOW ) diff --git a/tests/de/iges_1/O8 b/tests/de/iges_1/O8 index 9deb6c5c93..1b5cb81b55 100644 --- a/tests/de/iges_1/O8 +++ b/tests/de/iges_1/O8 @@ -10,8 +10,8 @@ TPSTAT : Faulties = 0 ( 39 ) Warnings = 0 ( 12 ) Summary = 0 ( 51 ) CHECKSHAPE : Wires = 0 ( 0 ) Faces = 0 ( 0 ) Shells = 0 ( 0 ) Solids = 0 ( 0 ) NBSHAPES : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 0 ( 0 ) STATSHAPE : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 0 ( 0 ) FreeWire = 9 ( 9 ) -TOLERANCE : MaxTol = 1e-007 ( 1e-007 ) AvgTol = 1e-007 ( 1e-007 ) -LABELS : N0Labels = 4555 ( 4555 ) N1Labels = 328 ( 884 ) N2Labels = 0 ( 0 ) TotalLabels = 4883 ( 5439 ) NameLabels = 4555 ( 4555 ) ColorLabels = 3752 ( 4340 ) LayerLabels = 4851 ( 4868 ) +TOLERANCE : MaxTol = 1e-07 ( 1e-07 ) AvgTol = 1e-07 ( 1e-07 ) +LABELS : N0Labels = 4555 ( 4555 ) N1Labels = 337 ( 884 ) N2Labels = 0 ( 0 ) TotalLabels = 4892 ( 5439 ) NameLabels = 4555 ( 4555 ) ColorLabels = 3761 ( 4340 ) LayerLabels = 4851 ( 4868 ) PROPS : Centroid = 0 ( 0 ) Volume = 0 ( 0 ) Area = 0 ( 0 ) NCOLORS : NColors = 6 ( 6 ) COLORS : Colors = BLUE CYAN GREEN MAGENTA RED YELLOW ( BLUE CYAN GREEN MAGENTA RED YELLOW ) diff --git a/tests/de/iges_1/O9 b/tests/de/iges_1/O9 index 87883ff99a..f3a546eea3 100644 --- a/tests/de/iges_1/O9 +++ b/tests/de/iges_1/O9 @@ -10,8 +10,8 @@ TPSTAT : Faulties = 0 ( 34 ) Warnings = 0 ( 14 ) Summary = 0 ( 48 ) CHECKSHAPE : Wires = 0 ( 0 ) Faces = 0 ( 0 ) Shells = 0 ( 0 ) Solids = 0 ( 0 ) NBSHAPES : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 0 ( 0 ) STATSHAPE : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 0 ( 0 ) FreeWire = 13 ( 13 ) -TOLERANCE : MaxTol = 1e-007 ( 1e-007 ) AvgTol = 1e-007 ( 1e-007 ) -LABELS : N0Labels = 3397 ( 3397 ) N1Labels = 134 ( 134 ) N2Labels = 0 ( 0 ) TotalLabels = 3531 ( 3531 ) NameLabels = 3397 ( 3397 ) ColorLabels = 2538 ( 2578 ) LayerLabels = 3467 ( 3500 ) +TOLERANCE : MaxTol = 1e-07 ( 1e-07 ) AvgTol = 1e-07 ( 1e-07 ) +LABELS : N0Labels = 3397 ( 3397 ) N1Labels = 145 ( 134 ) N2Labels = 0 ( 0 ) TotalLabels = 3542 ( 3531 ) NameLabels = 3397 ( 3397 ) ColorLabels = 2549 ( 2578 ) LayerLabels = 3467 ( 3500 ) PROPS : Centroid = 0 ( 0 ) Volume = 0 ( 0 ) Area = 0 ( 0 ) NCOLORS : NColors = 6 ( 6 ) COLORS : Colors = BLUE CYAN GREEN MAGENTA RED YELLOW ( BLUE CYAN GREEN MAGENTA RED YELLOW ) diff --git a/tests/de/iges_1/P1 b/tests/de/iges_1/P1 index 552e5eab57..cd9f7a7572 100644 --- a/tests/de/iges_1/P1 +++ b/tests/de/iges_1/P1 @@ -10,8 +10,8 @@ TPSTAT : Faulties = 0 ( 44 ) Warnings = 0 ( 24 ) Summary = 0 ( 68 ) CHECKSHAPE : Wires = 0 ( 0 ) Faces = 0 ( 0 ) Shells = 0 ( 0 ) Solids = 0 ( 0 ) NBSHAPES : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 0 ( 0 ) STATSHAPE : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 0 ( 0 ) FreeWire = 17 ( 17 ) -TOLERANCE : MaxTol = 1e-007 ( 1e-007 ) AvgTol = 1e-007 ( 1e-007 ) -LABELS : N0Labels = 2998 ( 2998 ) N1Labels = 195 ( 202 ) N2Labels = 0 ( 0 ) TotalLabels = 3193 ( 3200 ) NameLabels = 2998 ( 2998 ) ColorLabels = 2187 ( 2225 ) LayerLabels = 3162 ( 3184 ) +TOLERANCE : MaxTol = 1e-07 ( 1e-07 ) AvgTol = 1e-07 ( 1e-07 ) +LABELS : N0Labels = 2998 ( 2998 ) N1Labels = 212 ( 202 ) N2Labels = 0 ( 0 ) TotalLabels = 3210 ( 3200 ) NameLabels = 2998 ( 2998 ) ColorLabels = 2204 ( 2225 ) LayerLabels = 3162 ( 3184 ) PROPS : Centroid = 0 ( 0 ) Volume = 0 ( 0 ) Area = 0 ( 0 ) NCOLORS : NColors = 6 ( 6 ) COLORS : Colors = BLUE CYAN GREEN MAGENTA RED YELLOW ( BLUE CYAN GREEN MAGENTA RED YELLOW ) diff --git a/tests/de/iges_1/P2 b/tests/de/iges_1/P2 index b022d830c7..c90f572f6e 100755 --- a/tests/de/iges_1/P2 +++ b/tests/de/iges_1/P2 @@ -1,21 +1,22 @@ # !!!! This file is generated automatically, do not edit manually! See end script puts "TODO CR23096 ALL: TPSTAT : Faulty" puts "TODO CR23096 ALL: LABELS : Faulty" +puts "TODO CR23096 ALL: COLORS : Faulty" set filename USA60293.igs set ref_data { DATA : Faulties = 0 ( 0 ) Warnings = 0 ( 0 ) Summary = 0 ( 0 ) -TPSTAT : Faulties = 0 ( 0 ) Warnings = 92 ( 56 ) Summary = 92 ( 56 ) +TPSTAT : Faulties = 0 ( 0 ) Warnings = 90 ( 56 ) Summary = 90 ( 56 ) CHECKSHAPE : Wires = 0 ( 0 ) Faces = 0 ( 0 ) Shells = 0 ( 0 ) Solids = 0 ( 0 ) NBSHAPES : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 793 ( 793 ) STATSHAPE : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 793 ( 793 ) FreeWire = 0 ( 0 ) -TOLERANCE : MaxTol = 0.9292857408 ( 0.9292857413 ) AvgTol = 0.05474067589 ( 0.0547279268 ) -LABELS : N0Labels = 800 ( 800 ) N1Labels = 2 ( 1047 ) N2Labels = 0 ( 0 ) TotalLabels = 802 ( 1847 ) NameLabels = 800 ( 800 ) ColorLabels = 801 ( 1847 ) LayerLabels = 0 ( 0 ) +TOLERANCE : MaxTol = 0.9292857408 ( 0.9292857413 ) AvgTol = 0.05474058349 ( 0.0547279268 ) +LABELS : N0Labels = 800 ( 800 ) N1Labels = 3 ( 2558 ) N2Labels = 0 ( 0 ) TotalLabels = 803 ( 3358 ) NameLabels = 800 ( 800 ) ColorLabels = 802 ( 3358 ) LayerLabels = 0 ( 0 ) PROPS : Centroid = 0 ( 0 ) Volume = 0 ( 0 ) Area = 0 ( 0 ) -NCOLORS : NColors = 9 ( 9 ) -COLORS : Colors = BLUE BURLYWOOD2 CYAN GREEN LIGHTSTEELBLUE ORCHID2 RED SEAGREEN2 YELLOW ( BLUE BURLYWOOD2 CYAN GREEN LIGHTSTEELBLUE ORCHID2 RED SEAGREEN2 YELLOW ) +NCOLORS : NColors = 9 ( 10 ) +COLORS : Colors = BLUE BURLYWOOD2 CYAN GREEN LIGHTSTEELBLUE ORCHID2 RED SEAGREEN2 YELLOW ( BLUE BURLYWOOD2 CYAN GREEN LIGHTSTEELBLUE ORCHID2 RED SEAGREEN2 WHITE YELLOW ) NLAYERS : NLayers = 0 ( 0 ) LAYERS : Layers = ( ) diff --git a/tests/de/iges_1/P3 b/tests/de/iges_1/P3 index 279d72398a..860f606cc7 100644 --- a/tests/de/iges_1/P3 +++ b/tests/de/iges_1/P3 @@ -10,7 +10,7 @@ TPSTAT : Faulties = 0 ( 0 ) Warnings = 0 ( 0 ) Summary = 0 ( 0 ) CHECKSHAPE : Wires = 0 ( 0 ) Faces = 0 ( 0 ) Shells = 0 ( 0 ) Solids = 0 ( 0 ) NBSHAPES : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 1 ( 1 ) STATSHAPE : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 1 ( 1 ) FreeWire = 0 ( 0 ) -TOLERANCE : MaxTol = 6.578968715e-006 ( 1e-005 ) AvgTol = 3.112871011e-006 ( 9.238461538e-006 ) +TOLERANCE : MaxTol = 1e-07 ( 1e-05 ) AvgTol = 1e-07 ( 9.238461538e-06 ) LABELS : N0Labels = 1 ( 1 ) N1Labels = 0 ( 1 ) N2Labels = 0 ( 0 ) TotalLabels = 1 ( 2 ) NameLabels = 1 ( 1 ) ColorLabels = 1 ( 2 ) LayerLabels = 1 ( 2 ) PROPS : Centroid = 0 ( 0 ) Volume = 0 ( 0 ) Area = 0 ( 0 ) NCOLORS : NColors = 1 ( 1 ) diff --git a/tests/de/iges_1/P4 b/tests/de/iges_1/P4 index e1a2700955..978cd3bdb7 100644 --- a/tests/de/iges_1/P4 +++ b/tests/de/iges_1/P4 @@ -11,8 +11,8 @@ TPSTAT : Faulties = 0 ( 0 ) Warnings = 89 ( 80 ) Summary = 89 ( 80 ) CHECKSHAPE : Wires = 1 ( 1 ) Faces = 1 ( 1 ) Shells = 0 ( 0 ) Solids = 0 ( 0 ) NBSHAPES : Solid = 0 ( 1 ) Shell = 0 ( 1 ) Face = 320 ( 320 ) STATSHAPE : Solid = 0 ( 1 ) Shell = 0 ( 1 ) Face = 320 ( 320 ) FreeWire = 0 ( 0 ) -TOLERANCE : MaxTol = 0.9408369253 ( 1.136317349 ) AvgTol = 0.0339727389 ( 0.0379721236 ) -LABELS : N0Labels = 521 ( 521 ) N1Labels = 18 ( 0 ) N2Labels = 0 ( 0 ) TotalLabels = 539 ( 521 ) NameLabels = 521 ( 521 ) ColorLabels = 537 ( 521 ) LayerLabels = 455 ( 439 ) +TOLERANCE : MaxTol = 0.9408369253 ( 1.136317349 ) AvgTol = 0.0339727389 ( 0.03797212283 ) +LABELS : N0Labels = 521 ( 521 ) N1Labels = 18 ( 1635 ) N2Labels = 0 ( 0 ) TotalLabels = 539 ( 2156 ) NameLabels = 521 ( 521 ) ColorLabels = 537 ( 2156 ) LayerLabels = 455 ( 1834 ) PROPS : Centroid = 0 ( 0 ) Volume = 0 ( 0 ) Area = 0 ( 0 ) NCOLORS : NColors = 4 ( 4 ) COLORS : Colors = LEMONCHIFFON1 LIGHTSTEELBLUE2 RED WHITE ( LEMONCHIFFON1 LIGHTSTEELBLUE2 RED WHITE ) diff --git a/tests/de/iges_1/P5 b/tests/de/iges_1/P5 index cd42baca1b..112474192b 100755 --- a/tests/de/iges_1/P5 +++ b/tests/de/iges_1/P5 @@ -6,12 +6,12 @@ set filename brazo1.igs set ref_data { DATA : Faulties = 0 ( 2 ) Warnings = 0 ( 0 ) Summary = 0 ( 2 ) -TPSTAT : Faulties = 0 ( 0 ) Warnings = 138 ( 476 ) Summary = 138 ( 476 ) +TPSTAT : Faulties = 0 ( 0 ) Warnings = 136 ( 476 ) Summary = 136 ( 476 ) CHECKSHAPE : Wires = 4 ( 8 ) Faces = 4 ( 8 ) Shells = 0 ( 0 ) Solids = 0 ( 0 ) NBSHAPES : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 223 ( 223 ) STATSHAPE : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 223 ( 223 ) FreeWire = 0 ( 0 ) -TOLERANCE : MaxTol = 0.991254355 ( 0.991254355 ) AvgTol = 0.01156050183 ( 0.01226830477 ) -LABELS : N0Labels = 223 ( 223 ) N1Labels = 0 ( 242 ) N2Labels = 0 ( 0 ) TotalLabels = 223 ( 465 ) NameLabels = 223 ( 388 ) ColorLabels = 223 ( 465 ) LayerLabels = 223 ( 465 ) +TOLERANCE : MaxTol = 0.991254355 ( 0.991254355 ) AvgTol = 0.01155914695 ( 0.01225799391 ) +LABELS : N0Labels = 223 ( 223 ) N1Labels = 2 ( 605 ) N2Labels = 0 ( 0 ) TotalLabels = 225 ( 828 ) NameLabels = 223 ( 388 ) ColorLabels = 225 ( 828 ) LayerLabels = 225 ( 828 ) PROPS : Centroid = 0 ( 0 ) Volume = 0 ( 0 ) Area = 0 ( 0 ) NCOLORS : NColors = 3 ( 3 ) COLORS : Colors = BLUE MAGENTA YELLOW ( BLUE MAGENTA YELLOW ) diff --git a/tests/de/iges_1/P6 b/tests/de/iges_1/P6 index 1e96ccc8bc..7b92652221 100644 --- a/tests/de/iges_1/P6 +++ b/tests/de/iges_1/P6 @@ -10,8 +10,8 @@ TPSTAT : Faulties = 0 ( 4 ) Warnings = 122 ( 2490 ) Summary = 122 ( 2 CHECKSHAPE : Wires = 0 ( 0 ) Faces = 0 ( 0 ) Shells = 0 ( 0 ) Solids = 0 ( 0 ) NBSHAPES : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 478 ( 478 ) STATSHAPE : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 478 ( 478 ) FreeWire = 11 ( 11 ) -TOLERANCE : MaxTol = 0.7255001399 ( 0.7254994252 ) AvgTol = 0.00150384607 ( 0.001491267869 ) -LABELS : N0Labels = 1 ( 1 ) N1Labels = 856 ( 1636 ) N2Labels = 0 ( 0 ) TotalLabels = 857 ( 1637 ) NameLabels = 857 ( 1390 ) ColorLabels = 856 ( 1636 ) LayerLabels = 856 ( 1636 ) +TOLERANCE : MaxTol = 0.7255001399 ( 0.7254994252 ) AvgTol = 0.001503585591 ( 0.001491267869 ) +LABELS : N0Labels = 1 ( 1 ) N1Labels = 867 ( 2264 ) N2Labels = 0 ( 0 ) TotalLabels = 868 ( 2265 ) NameLabels = 857 ( 1390 ) ColorLabels = 867 ( 2264 ) LayerLabels = 856 ( 2264 ) PROPS : Centroid = 0 ( 0 ) Volume = 0 ( 0 ) Area = 0 ( 0 ) NCOLORS : NColors = 10 ( 10 ) COLORS : Colors = BLUE CYAN GREEN MAGENTA MAGENTA3 RED TURQUOISE4 WHITE YELLOW YELLOW4 ( BLUE CYAN GREEN MAGENTA MAGENTA3 RED TURQUOISE4 WHITE YELLOW YELLOW4 ) diff --git a/tests/de/iges_1/P7 b/tests/de/iges_1/P7 index 412488d5f5..0704ce46b4 100644 --- a/tests/de/iges_1/P7 +++ b/tests/de/iges_1/P7 @@ -6,12 +6,12 @@ set filename igsFB2.igs set ref_data { DATA : Faulties = 0 ( 0 ) Warnings = 0 ( 0 ) Summary = 0 ( 0 ) -TPSTAT : Faulties = 0 ( 0 ) Warnings = 97 ( 771 ) Summary = 97 ( 771 ) +TPSTAT : Faulties = 0 ( 0 ) Warnings = 156 ( 771 ) Summary = 156 ( 771 ) CHECKSHAPE : Wires = 0 ( 0 ) Faces = 0 ( 0 ) Shells = 0 ( 0 ) Solids = 0 ( 0 ) NBSHAPES : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 770 ( 770 ) STATSHAPE : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 770 ( 770 ) FreeWire = 36 ( 36 ) -TOLERANCE : MaxTol = 0.9845041621 ( 0.9845038147 ) AvgTol = 0.009927113128 ( 0.009919810177 ) -LABELS : N0Labels = 880 ( 880 ) N1Labels = 0 ( 2244 ) N2Labels = 0 ( 0 ) TotalLabels = 880 ( 3124 ) NameLabels = 880 ( 1500 ) ColorLabels = 844 ( 3124 ) LayerLabels = 844 ( 3124 ) +TOLERANCE : MaxTol = 0.9845041621 ( 0.9845038147 ) AvgTol = 0.009927186145 ( 0.009919810177 ) +LABELS : N0Labels = 880 ( 880 ) N1Labels = 8 ( 4727 ) N2Labels = 0 ( 0 ) TotalLabels = 888 ( 5607 ) NameLabels = 880 ( 1500 ) ColorLabels = 852 ( 5607 ) LayerLabels = 844 ( 5607 ) PROPS : Centroid = 0 ( 0 ) Volume = 0 ( 0 ) Area = 0 ( 0 ) NCOLORS : NColors = 1 ( 1 ) COLORS : Colors = BLACK ( BLACK ) diff --git a/tests/de/iges_1/P9 b/tests/de/iges_1/P9 index 1ccf8bcaa2..88aea06594 100644 --- a/tests/de/iges_1/P9 +++ b/tests/de/iges_1/P9 @@ -10,8 +10,8 @@ TPSTAT : Faulties = 0 ( 0 ) Warnings = 37 ( 188 ) Summary = 37 ( 188 CHECKSHAPE : Wires = 0 ( 0 ) Faces = 0 ( 0 ) Shells = 0 ( 0 ) Solids = 0 ( 0 ) NBSHAPES : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 114 ( 114 ) STATSHAPE : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 114 ( 114 ) FreeWire = 23 ( 23 ) -TOLERANCE : MaxTol = 0.1830141575 ( 0.1830141765 ) AvgTol = 0.003295423033 ( 0.003365600588 ) -LABELS : N0Labels = 412 ( 412 ) N1Labels = 2 ( 0 ) N2Labels = 0 ( 0 ) TotalLabels = 414 ( 412 ) NameLabels = 412 ( 412 ) ColorLabels = 389 ( 410 ) LayerLabels = 389 ( 410 ) +TOLERANCE : MaxTol = 0.1830141575 ( 0.1830141765 ) AvgTol = 0.00332247891 ( 0.003332381642 ) +LABELS : N0Labels = 412 ( 412 ) N1Labels = 23 ( 484 ) N2Labels = 0 ( 0 ) TotalLabels = 435 ( 896 ) NameLabels = 412 ( 412 ) ColorLabels = 410 ( 894 ) LayerLabels = 389 ( 894 ) PROPS : Centroid = 0 ( 0 ) Volume = 0 ( 0 ) Area = 0 ( 0 ) NCOLORS : NColors = 5 ( 5 ) COLORS : Colors = DARKORANGE DARKVIOLET GRAY57 GREEN WHITE ( DARKORANGE DARKVIOLET GRAY57 GREEN WHITE ) diff --git a/tests/de/iges_1/Q1 b/tests/de/iges_1/Q1 index e17fed410e..f3a487c184 100644 --- a/tests/de/iges_1/Q1 +++ b/tests/de/iges_1/Q1 @@ -10,7 +10,7 @@ TPSTAT : Faulties = 0 ( 0 ) Warnings = 82 ( 1042 ) Summary = 82 ( 104 CHECKSHAPE : Wires = 0 ( 0 ) Faces = 0 ( 0 ) Shells = 0 ( 0 ) Solids = 0 ( 0 ) NBSHAPES : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 152 ( 152 ) STATSHAPE : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 152 ( 152 ) FreeWire = 0 ( 0 ) -TOLERANCE : MaxTol = 1.340794119e-005 ( 1e-005 ) AvgTol = 3.186484738e-006 ( 9.90797456e-006 ) +TOLERANCE : MaxTol = 1.340794119e-05 ( 1e-05 ) AvgTol = 3.186484738e-06 ( 9.90797456e-06 ) LABELS : N0Labels = 152 ( 152 ) N1Labels = 0 ( 0 ) N2Labels = 0 ( 0 ) TotalLabels = 152 ( 152 ) NameLabels = 152 ( 152 ) ColorLabels = 152 ( 152 ) LayerLabels = 0 ( 0 ) PROPS : Centroid = 0 ( 0 ) Volume = 0 ( 0 ) Area = 0 ( 0 ) NCOLORS : NColors = 1 ( 1 ) diff --git a/tests/de/iges_1/Q2 b/tests/de/iges_1/Q2 index 0c87aa178b..d6829a3cbd 100644 --- a/tests/de/iges_1/Q2 +++ b/tests/de/iges_1/Q2 @@ -11,7 +11,7 @@ CHECKSHAPE : Wires = 0 ( 0 ) Faces = 0 ( 0 ) Shells = 0 ( 0 ) So NBSHAPES : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 106 ( 106 ) STATSHAPE : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 106 ( 106 ) FreeWire = 0 ( 0 ) TOLERANCE : MaxTol = 0.2569678523 ( 0.2569678511 ) AvgTol = 0.002441727472 ( 0.002442511333 ) -LABELS : N0Labels = 378 ( 378 ) N1Labels = 0 ( 74 ) N2Labels = 0 ( 0 ) TotalLabels = 378 ( 452 ) NameLabels = 378 ( 378 ) ColorLabels = 374 ( 452 ) LayerLabels = 374 ( 452 ) +LABELS : N0Labels = 378 ( 378 ) N1Labels = 25 ( 393 ) N2Labels = 0 ( 0 ) TotalLabels = 403 ( 771 ) NameLabels = 378 ( 378 ) ColorLabels = 399 ( 771 ) LayerLabels = 399 ( 771 ) PROPS : Centroid = 0 ( 0 ) Volume = 0 ( 0 ) Area = 0 ( 0 ) NCOLORS : NColors = 2 ( 2 ) COLORS : Colors = GREEN YELLOW ( GREEN YELLOW ) diff --git a/tests/de/iges_1/Q3 b/tests/de/iges_1/Q3 index 514455023a..5f1daa2726 100644 --- a/tests/de/iges_1/Q3 +++ b/tests/de/iges_1/Q3 @@ -1,7 +1,6 @@ # !!!! This file is generated automatically, do not edit manually! See end script puts "TODO CR23096 ALL: CHECKSHAPE : Faulty" puts "TODO CR23096 ALL: LABELS : Faulty" -puts "TODO CR23096 ALL: COLORS : Faulty" set filename 919-001-T02-04-CP-VL.igs @@ -12,11 +11,11 @@ TPSTAT : Faulties = 0 ( 0 ) Warnings = 101 ( 1430 ) Summary = 101 ( 1 CHECKSHAPE : Wires = 0 ( 0 ) Faces = 1 ( 0 ) Shells = 0 ( 0 ) Solids = 0 ( 0 ) NBSHAPES : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 899 ( 899 ) STATSHAPE : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 899 ( 899 ) FreeWire = 366 ( 366 ) -TOLERANCE : MaxTol = 0.3151652209 ( 0.3151652209 ) AvgTol = 0.0007056492386 ( 0.0007458036021 ) -LABELS : N0Labels = 1 ( 1 ) N1Labels = 3581 ( 9530 ) N2Labels = 0 ( 0 ) TotalLabels = 3582 ( 9531 ) NameLabels = 3582 ( 4454 ) ColorLabels = 3581 ( 9530 ) LayerLabels = 3581 ( 9530 ) +TOLERANCE : MaxTol = 0.3151652209 ( 0.3151652209 ) AvgTol = 0.0007056394047 ( 0.0007458036021 ) +LABELS : N0Labels = 1 ( 1 ) N1Labels = 1391 ( 7379 ) N2Labels = 0 ( 0 ) TotalLabels = 1392 ( 7380 ) NameLabels = 1026 ( 1858 ) ColorLabels = 1391 ( 7379 ) LayerLabels = 1025 ( 7379 ) PROPS : Centroid = 0 ( 0 ) Volume = 0 ( 0 ) Area = 0 ( 0 ) -NCOLORS : NColors = 1 ( 2 ) -COLORS : Colors = TURQUOISE ( TURQUOISE WHITE ) +NCOLORS : NColors = 2 ( 2 ) +COLORS : Colors = TURQUOISE WHITE ( TURQUOISE WHITE ) NLAYERS : NLayers = 1 ( 1 ) LAYERS : Layers = 1 ( 1 ) diff --git a/tests/de/iges_1/Q4 b/tests/de/iges_1/Q4 index eecfb87c29..d0f71797b0 100644 --- a/tests/de/iges_1/Q4 +++ b/tests/de/iges_1/Q4 @@ -1,6 +1,5 @@ # !!!! This file is generated automatically, do not edit manually! See end script puts "TODO CR23096 ALL: LABELS : Faulty" -puts "TODO CR23096 ALL: COLORS : Faulty" set filename 919-001-T02-04-FT-VL.igs @@ -11,11 +10,11 @@ TPSTAT : Faulties = 0 ( 0 ) Warnings = 129 ( 797 ) Summary = 129 ( 79 CHECKSHAPE : Wires = 0 ( 0 ) Faces = 0 ( 0 ) Shells = 0 ( 0 ) Solids = 0 ( 0 ) NBSHAPES : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 426 ( 426 ) STATSHAPE : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 426 ( 426 ) FreeWire = 265 ( 265 ) -TOLERANCE : MaxTol = 0.09805261731 ( 0.09805261731 ) AvgTol = 0.0005287075191 ( 0.0005263102411 ) -LABELS : N0Labels = 1 ( 1 ) N1Labels = 1739 ( 5445 ) N2Labels = 0 ( 0 ) TotalLabels = 1740 ( 5446 ) NameLabels = 1740 ( 2237 ) ColorLabels = 1739 ( 5445 ) LayerLabels = 1739 ( 5445 ) +TOLERANCE : MaxTol = 0.09805261731 ( 0.09805261731 ) AvgTol = 0.0005287073987 ( 0.0005263102411 ) +LABELS : N0Labels = 1 ( 1 ) N1Labels = 748 ( 4222 ) N2Labels = 0 ( 0 ) TotalLabels = 749 ( 4223 ) NameLabels = 484 ( 946 ) ColorLabels = 748 ( 4222 ) LayerLabels = 483 ( 4222 ) PROPS : Centroid = 0 ( 0 ) Volume = 0 ( 0 ) Area = 0 ( 0 ) -NCOLORS : NColors = 1 ( 2 ) -COLORS : Colors = TURQUOISE ( TURQUOISE WHITE ) +NCOLORS : NColors = 2 ( 2 ) +COLORS : Colors = TURQUOISE WHITE ( TURQUOISE WHITE ) NLAYERS : NLayers = 1 ( 1 ) LAYERS : Layers = 1 ( 1 ) diff --git a/tests/de/iges_1/Q5 b/tests/de/iges_1/Q5 index 918c8dcafa..fea5571b24 100644 --- a/tests/de/iges_1/Q5 +++ b/tests/de/iges_1/Q5 @@ -1,6 +1,5 @@ # !!!! This file is generated automatically, do not edit manually! See end script puts "TODO CR23096 ALL: LABELS : Faulty" -puts "TODO CR23096 ALL: COLORS : Faulty" set filename 919-004-T02-01-FT-VL.igs @@ -10,12 +9,12 @@ DATA : Faulties = 0 ( 0 ) Warnings = 0 ( 0 ) Summary = 0 ( 0 ) TPSTAT : Faulties = 0 ( 0 ) Warnings = 117 ( 825 ) Summary = 117 ( 825 ) CHECKSHAPE : Wires = 0 ( 0 ) Faces = 0 ( 0 ) Shells = 0 ( 0 ) Solids = 0 ( 0 ) NBSHAPES : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 406 ( 406 ) -STATSHAPE : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 406 ( 406 ) FreeWire = 275 ( 275 ) -TOLERANCE : MaxTol = 0.08309604195 ( 0.08309604195 ) AvgTol = 0.0004559018929 ( 0.0004699766623 ) -LABELS : N0Labels = 2 ( 2 ) N1Labels = 1614 ( 5216 ) N2Labels = 0 ( 0 ) TotalLabels = 1616 ( 5218 ) NameLabels = 1614 ( 2096 ) ColorLabels = 1614 ( 5217 ) LayerLabels = 1614 ( 5217 ) +STATSHAPE : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 406 ( 406 ) FreeWire = 275 ( 278 ) +TOLERANCE : MaxTol = 0.08309604195 ( 0.08309604195 ) AvgTol = 0.0004558987831 ( 0.0004699766623 ) +LABELS : N0Labels = 2 ( 2 ) N1Labels = 700 ( 4059 ) N2Labels = 0 ( 0 ) TotalLabels = 702 ( 4061 ) NameLabels = 426 ( 897 ) ColorLabels = 700 ( 4060 ) LayerLabels = 426 ( 4060 ) PROPS : Centroid = 0 ( 0 ) Volume = 0 ( 0 ) Area = 0 ( 0 ) -NCOLORS : NColors = 1 ( 2 ) -COLORS : Colors = TURQUOISE ( TURQUOISE WHITE ) +NCOLORS : NColors = 2 ( 2 ) +COLORS : Colors = TURQUOISE WHITE ( TURQUOISE WHITE ) NLAYERS : NLayers = 1 ( 1 ) LAYERS : Layers = 1 ( 1 ) diff --git a/tests/de/iges_1/Q6 b/tests/de/iges_1/Q6 index 3d6902f3be..5de92faafd 100644 --- a/tests/de/iges_1/Q6 +++ b/tests/de/iges_1/Q6 @@ -1,6 +1,5 @@ # !!!! This file is generated automatically, do not edit manually! See end script puts "TODO CR23096 ALL: LABELS : Faulty" -puts "TODO CR23096 ALL: COLORS : Faulty" set filename Amino_komatsu.igs @@ -12,10 +11,11 @@ CHECKSHAPE : Wires = 1 ( 1 ) Faces = 1 ( 1 ) Shells = 0 ( 0 ) So NBSHAPES : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 181 ( 181 ) STATSHAPE : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 181 ( 181 ) FreeWire = 3 ( 3 ) TOLERANCE : MaxTol = 0.1814235482 ( 0.1814235485 ) AvgTol = 0.00374562953 ( 0.003756748249 ) -LABELS : N0Labels = 184 ( 359 ) N1Labels = 0 ( 139 ) N2Labels = 0 ( 0 ) TotalLabels = 184 ( 498 ) NameLabels = 184 ( 440 ) ColorLabels = 181 ( 323 ) LayerLabels = 181 ( 323 ) +LABELS : N0Labels = 184 ( 359 ) N1Labels = 4 ( 139 ) N2Labels = 0 ( 0 ) TotalLabels = 188 ( 498 ) NameLabels = 184 ( 440 ) ColorLabels = 185 ( 323 ) LayerLabels = 181 ( 323 ) PROPS : Centroid = 0 ( 0 ) Volume = 0 ( 0 ) Area = 0 ( 0 ) -NCOLORS : NColors = 1 ( 3 ) -COLORS : Colors = WHITE ( BLACK WHITE YELLOW ) +NCOLORS : NColors = 3 ( 3 ) +COLORS : Colors = BLACK WHITE YELLOW ( BLACK WHITE YELLOW ) NLAYERS : NLayers = 4 ( 4 ) LAYERS : Layers = 241 5 6 8 ( 241 5 6 8 ) + } diff --git a/tests/de/iges_1/Q7 b/tests/de/iges_1/Q7 index ae274835bb..91fed9b09a 100644 --- a/tests/de/iges_1/Q7 +++ b/tests/de/iges_1/Q7 @@ -11,8 +11,8 @@ TPSTAT : Faulties = 0 ( 0 ) Warnings = 0 ( 127 ) Summary = 0 ( 127 ) CHECKSHAPE : Wires = 0 ( 0 ) Faces = 0 ( 0 ) Shells = 0 ( 0 ) Solids = 0 ( 0 ) NBSHAPES : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 236 ( 236 ) STATSHAPE : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 236 ( 236 ) FreeWire = 0 ( 0 ) -TOLERANCE : MaxTol = 0.9002295152 ( 0.9002295152 ) AvgTol = 0.05182124498 ( 0.05182067882 ) -LABELS : N0Labels = 1 ( 1 ) N1Labels = 237 ( 584 ) N2Labels = 0 ( 0 ) TotalLabels = 238 ( 585 ) NameLabels = 238 ( 284 ) ColorLabels = 237 ( 584 ) LayerLabels = 234 ( 581 ) +TOLERANCE : MaxTol = 0.9002295152 ( 0.9002295152 ) AvgTol = 0.05182123214 ( 0.05182066623 ) +LABELS : N0Labels = 1 ( 1 ) N1Labels = 237 ( 776 ) N2Labels = 0 ( 0 ) TotalLabels = 238 ( 777 ) NameLabels = 238 ( 284 ) ColorLabels = 237 ( 776 ) LayerLabels = 234 ( 773 ) PROPS : Centroid = 0 ( 0 ) Volume = 0 ( 0 ) Area = 0 ( 0 ) NCOLORS : NColors = 8 ( 11 ) COLORS : Colors = CYAN GREEN GREEN4 MAGENTA MAGENTA3 RED3 TURQUOISE3 WHITE ( BLUE CYAN GREEN GREEN4 MAGENTA MAGENTA3 RED RED3 TURQUOISE3 WHITE YELLOW ) diff --git a/tests/de/iges_1/Q8 b/tests/de/iges_1/Q8 index 21219394a6..feb33a331d 100644 --- a/tests/de/iges_1/Q8 +++ b/tests/de/iges_1/Q8 @@ -11,7 +11,7 @@ TPSTAT : Faulties = 0 ( 3 ) Warnings = 0 ( 5 ) Summary = 0 ( 8 ) CHECKSHAPE : Wires = 0 ( 0 ) Faces = 0 ( 0 ) Shells = 0 ( 0 ) Solids = 0 ( 0 ) NBSHAPES : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 24 ( 24 ) STATSHAPE : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 24 ( 24 ) FreeWire = 5 ( 5 ) -TOLERANCE : MaxTol = 1e-005 ( 1e-007 ) AvgTol = 4.588000486e-006 ( 1e-007 ) +TOLERANCE : MaxTol = 1e-05 ( 1e-07 ) AvgTol = 4.588000486e-06 ( 1e-07 ) LABELS : N0Labels = 30 ( 36 ) N1Labels = 0 ( 0 ) N2Labels = 0 ( 0 ) TotalLabels = 30 ( 36 ) NameLabels = 30 ( 36 ) ColorLabels = 0 ( 0 ) LayerLabels = 0 ( 0 ) PROPS : Centroid = 0 ( 0 ) Volume = 0 ( 0 ) Area = 0 ( 0 ) NCOLORS : NColors = 0 ( 0 ) diff --git a/tests/de/iges_1/Q9 b/tests/de/iges_1/Q9 index fdaea4efc5..cec6d3d965 100644 --- a/tests/de/iges_1/Q9 +++ b/tests/de/iges_1/Q9 @@ -12,7 +12,7 @@ TPSTAT : Faulties = 0 ( 0 ) Warnings = 3 ( 3 ) Summary = 3 ( 3 ) CHECKSHAPE : Wires = 0 ( 0 ) Faces = 0 ( 0 ) Shells = 0 ( 0 ) Solids = 0 ( 0 ) NBSHAPES : Solid = 0 ( 1 ) Shell = 0 ( 1 ) Face = 106 ( 106 ) STATSHAPE : Solid = 0 ( 1 ) Shell = 0 ( 1 ) Face = 106 ( 106 ) FreeWire = 0 ( 0 ) -TOLERANCE : MaxTol = 0.009362458835 ( 0.009359156996 ) AvgTol = 0.0001377400205 ( 0.0002960765184 ) +TOLERANCE : MaxTol = 0.009362458835 ( 0.009359156996 ) AvgTol = 0.0001377400205 ( 0.0002960752277 ) LABELS : N0Labels = 1 ( 1 ) N1Labels = 0 ( 0 ) N2Labels = 0 ( 0 ) TotalLabels = 1 ( 1 ) NameLabels = 1 ( 1 ) ColorLabels = 0 ( 0 ) LayerLabels = 0 ( 1 ) PROPS : Centroid = 0 ( 0 ) Volume = 0 ( 0 ) Area = 0 ( 0 ) NCOLORS : NColors = 0 ( 0 ) diff --git a/tests/de/iges_1/R1 b/tests/de/iges_1/R1 index ba1901687b..95478294e1 100755 --- a/tests/de/iges_1/R1 +++ b/tests/de/iges_1/R1 @@ -12,8 +12,8 @@ TPSTAT : Faulties = 2 ( 0 ) Warnings = 21 ( 329 ) Summary = 23 ( 329 CHECKSHAPE : Wires = 0 ( 0 ) Faces = 0 ( 0 ) Shells = 0 ( 0 ) Solids = 0 ( 0 ) NBSHAPES : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 135 ( 135 ) STATSHAPE : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 135 ( 135 ) FreeWire = 0 ( 0 ) -TOLERANCE : MaxTol = 1.202431555 ( 12.54323842 ) AvgTol = 0.02377410886 ( 0.1727738837 ) -LABELS : N0Labels = 1 ( 1 ) N1Labels = 138 ( 1033 ) N2Labels = 0 ( 0 ) TotalLabels = 139 ( 1034 ) NameLabels = 139 ( 205 ) ColorLabels = 138 ( 1033 ) LayerLabels = 138 ( 1033 ) +TOLERANCE : MaxTol = 0.9794163281 ( 12.54323842 ) AvgTol = 0.0206120339 ( 0.1727738837 ) +LABELS : N0Labels = 1 ( 1 ) N1Labels = 138 ( 1074 ) N2Labels = 0 ( 0 ) TotalLabels = 139 ( 1075 ) NameLabels = 139 ( 205 ) ColorLabels = 138 ( 1074 ) LayerLabels = 138 ( 1074 ) PROPS : Centroid = 0 ( 0 ) Volume = 0 ( 0 ) Area = 0 ( 0 ) NCOLORS : NColors = 4 ( 4 ) COLORS : Colors = GOLD3 MAGENTA4 PLUM1 YELLOW2 ( GOLD3 MAGENTA4 PLUM1 YELLOW2 ) diff --git a/tests/de/iges_1/R2 b/tests/de/iges_1/R2 index fd67569b85..d009f5b510 100644 --- a/tests/de/iges_1/R2 +++ b/tests/de/iges_1/R2 @@ -12,7 +12,7 @@ TPSTAT : Faulties = 0 ( 0 ) Warnings = 3 ( 3 ) Summary = 3 ( 3 ) CHECKSHAPE : Wires = 0 ( 0 ) Faces = 0 ( 0 ) Shells = 0 ( 0 ) Solids = 0 ( 0 ) NBSHAPES : Solid = 0 ( 1 ) Shell = 0 ( 1 ) Face = 106 ( 106 ) STATSHAPE : Solid = 0 ( 1 ) Shell = 0 ( 1 ) Face = 106 ( 106 ) FreeWire = 0 ( 0 ) -TOLERANCE : MaxTol = 0.00938336572 ( 0.009380052786 ) AvgTol = 0.0001381647011 ( 0.0002969872299 ) +TOLERANCE : MaxTol = 0.00938336572 ( 0.009380052786 ) AvgTol = 0.0001381647011 ( 0.0002969859246 ) LABELS : N0Labels = 1 ( 1 ) N1Labels = 0 ( 0 ) N2Labels = 0 ( 0 ) TotalLabels = 1 ( 1 ) NameLabels = 1 ( 1 ) ColorLabels = 0 ( 0 ) LayerLabels = 0 ( 1 ) PROPS : Centroid = 0 ( 0 ) Volume = 0 ( 0 ) Area = 0 ( 0 ) NCOLORS : NColors = 0 ( 0 ) diff --git a/tests/de/iges_1/R3 b/tests/de/iges_1/R3 index 56b737f189..81a56dbbad 100644 --- a/tests/de/iges_1/R3 +++ b/tests/de/iges_1/R3 @@ -1,6 +1,5 @@ # !!!! This file is generated automatically, do not edit manually! See end script puts "TODO CR23096 ALL: LABELS : Faulty" -puts "TODO CR23096 ALL: COLORS : Faulty" set filename BUC50028.igs @@ -12,10 +11,10 @@ CHECKSHAPE : Wires = 0 ( 1 ) Faces = 0 ( 1 ) Shells = 0 ( 0 ) So NBSHAPES : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 872 ( 872 ) STATSHAPE : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 872 ( 872 ) FreeWire = 39 ( 39 ) TOLERANCE : MaxTol = 0.9989623361 ( 0.9989623361 ) AvgTol = 0.009368708841 ( 0.00936977479 ) -LABELS : N0Labels = 1063 ( 1063 ) N1Labels = 0 ( 1675 ) N2Labels = 0 ( 0 ) TotalLabels = 1063 ( 2738 ) NameLabels = 1063 ( 1644 ) ColorLabels = 1024 ( 2738 ) LayerLabels = 1024 ( 2738 ) +LABELS : N0Labels = 1063 ( 1063 ) N1Labels = 37 ( 2847 ) N2Labels = 0 ( 0 ) TotalLabels = 1100 ( 3910 ) NameLabels = 1063 ( 1644 ) ColorLabels = 1061 ( 3910 ) LayerLabels = 1024 ( 3910 ) PROPS : Centroid = 0 ( 0 ) Volume = 0 ( 0 ) Area = 0 ( 0 ) -NCOLORS : NColors = 4 ( 5 ) -COLORS : Colors = BLUE MAGENTA RED WHITE ( BLUE GREEN MAGENTA RED WHITE ) +NCOLORS : NColors = 5 ( 5 ) +COLORS : Colors = BLUE GREEN MAGENTA RED WHITE ( BLUE GREEN MAGENTA RED WHITE ) NLAYERS : NLayers = 5 ( 5 ) LAYERS : Layers = 1 10 12 2 4 ( 1 10 12 2 4 ) diff --git a/tests/de/iges_1/R4 b/tests/de/iges_1/R4 index 026c6c40b3..b8537d605f 100644 --- a/tests/de/iges_1/R4 +++ b/tests/de/iges_1/R4 @@ -11,8 +11,8 @@ TPSTAT : Faulties = 0 ( 0 ) Warnings = 22 ( 389 ) Summary = 22 ( 389 CHECKSHAPE : Wires = 0 ( 0 ) Faces = 0 ( 0 ) Shells = 0 ( 0 ) Solids = 0 ( 0 ) NBSHAPES : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 771 ( 771 ) STATSHAPE : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 771 ( 771 ) FreeWire = 0 ( 0 ) -TOLERANCE : MaxTol = 0.9439922076 ( 0.944086605 ) AvgTol = 0.00596714602 ( 0.005985964057 ) -LABELS : N0Labels = 2062 ( 2062 ) N1Labels = 6 ( 1161 ) N2Labels = 0 ( 0 ) TotalLabels = 2068 ( 3223 ) NameLabels = 2062 ( 2062 ) ColorLabels = 2037 ( 3223 ) LayerLabels = 2037 ( 3223 ) +TOLERANCE : MaxTol = 0.9439922076 ( 0.944086605 ) AvgTol = 0.005967146019 ( 0.005985964057 ) +LABELS : N0Labels = 2062 ( 2062 ) N1Labels = 132 ( 3600 ) N2Labels = 0 ( 0 ) TotalLabels = 2194 ( 5662 ) NameLabels = 2062 ( 2062 ) ColorLabels = 2163 ( 5662 ) LayerLabels = 2163 ( 5662 ) PROPS : Centroid = 0 ( 0 ) Volume = 0 ( 0 ) Area = 0 ( 0 ) NCOLORS : NColors = 3 ( 4 ) COLORS : Colors = BLACK MAGENTA RED ( BLACK MAGENTA RED WHITE ) diff --git a/tests/de/iges_1/R5 b/tests/de/iges_1/R5 index c67dd275f8..af4db1e59d 100644 --- a/tests/de/iges_1/R5 +++ b/tests/de/iges_1/R5 @@ -12,7 +12,7 @@ CHECKSHAPE : Wires = 0 ( 0 ) Faces = 0 ( 0 ) Shells = 0 ( 0 ) So NBSHAPES : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 328 ( 328 ) STATSHAPE : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 328 ( 328 ) FreeWire = 53 ( 53 ) TOLERANCE : MaxTol = 0.4274072109 ( 0.4274072101 ) AvgTol = 0.001825084321 ( 0.001863351234 ) -LABELS : N0Labels = 10 ( 10 ) N1Labels = 1565 ( 2865 ) N2Labels = 0 ( 0 ) TotalLabels = 1575 ( 2875 ) NameLabels = 1575 ( 1851 ) ColorLabels = 1570 ( 2870 ) LayerLabels = 1570 ( 2870 ) +LABELS : N0Labels = 10 ( 10 ) N1Labels = 1234 ( 2561 ) N2Labels = 0 ( 0 ) TotalLabels = 1244 ( 2571 ) NameLabels = 1202 ( 1473 ) ColorLabels = 1239 ( 2566 ) LayerLabels = 1197 ( 2566 ) PROPS : Centroid = 0 ( 0 ) Volume = 0 ( 0 ) Area = 0 ( 0 ) NCOLORS : NColors = 8 ( 8 ) COLORS : Colors = BLUE GREEN GREEN4 MEDIUMORCHID RED TURQUOISE1 WHITE YELLOW ( BLUE GREEN GREEN4 MEDIUMORCHID RED TURQUOISE1 WHITE YELLOW ) diff --git a/tests/de/iges_1/R6 b/tests/de/iges_1/R6 index 98968d7402..04a1016525 100755 --- a/tests/de/iges_1/R6 +++ b/tests/de/iges_1/R6 @@ -12,8 +12,8 @@ TPSTAT : Faulties = 40 ( 181 ) Warnings = 83 ( 1168 ) Summary = 123 ( CHECKSHAPE : Wires = 0 ( 0 ) Faces = 0 ( 0 ) Shells = 0 ( 0 ) Solids = 0 ( 0 ) NBSHAPES : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 527 ( 527 ) STATSHAPE : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 527 ( 527 ) FreeWire = 57 ( 57 ) -TOLERANCE : MaxTol = 0.5505691323 ( 0.5505691341 ) AvgTol = 0.008350603222 ( 0.008374961542 ) -LABELS : N0Labels = 8 ( 8 ) N1Labels = 1544 ( 3130 ) N2Labels = 0 ( 0 ) TotalLabels = 1552 ( 3138 ) NameLabels = 1552 ( 1918 ) ColorLabels = 1544 ( 3130 ) LayerLabels = 1544 ( 3128 ) +TOLERANCE : MaxTol = 0.5505691323 ( 0.5505691341 ) AvgTol = 0.008350513911 ( 0.008374961542 ) +LABELS : N0Labels = 8 ( 8 ) N1Labels = 1598 ( 4138 ) N2Labels = 0 ( 0 ) TotalLabels = 1606 ( 4146 ) NameLabels = 1552 ( 1918 ) ColorLabels = 1598 ( 4138 ) LayerLabels = 1544 ( 4136 ) PROPS : Centroid = 0 ( 0 ) Volume = 0 ( 0 ) Area = 0 ( 0 ) NCOLORS : NColors = 10 ( 10 ) COLORS : Colors = BLUE CYAN GREEN MAGENTA MAGENTA3 MEDIUMPURPLE1 RED WHITE YELLOW YELLOW3 ( BLUE CYAN GREEN MAGENTA MAGENTA3 MEDIUMPURPLE1 RED WHITE YELLOW YELLOW3 ) diff --git a/tests/de/iges_1/R7 b/tests/de/iges_1/R7 index c2765cdd0e..95442190ad 100644 --- a/tests/de/iges_1/R7 +++ b/tests/de/iges_1/R7 @@ -11,8 +11,8 @@ TPSTAT : Faulties = 0 ( 0 ) Warnings = 6 ( 63 ) Summary = 6 ( 63 ) CHECKSHAPE : Wires = 0 ( 0 ) Faces = 0 ( 0 ) Shells = 0 ( 0 ) Solids = 0 ( 0 ) NBSHAPES : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 120 ( 120 ) STATSHAPE : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 120 ( 120 ) FreeWire = 31 ( 31 ) -TOLERANCE : MaxTol = 1.421161348e-006 ( 1e-005 ) AvgTol = 1.219850404e-007 ( 3.646635411e-006 ) -LABELS : N0Labels = 1051 ( 1051 ) N1Labels = 0 ( 448 ) N2Labels = 0 ( 0 ) TotalLabels = 1051 ( 1499 ) NameLabels = 1051 ( 1051 ) ColorLabels = 822 ( 1300 ) LayerLabels = 971 ( 1499 ) +TOLERANCE : MaxTol = 1.421161348e-06 ( 1e-05 ) AvgTol = 1.219933752e-07 ( 3.646635411e-06 ) +LABELS : N0Labels = 1051 ( 1051 ) N1Labels = 4 ( 448 ) N2Labels = 0 ( 0 ) TotalLabels = 1055 ( 1499 ) NameLabels = 1051 ( 1051 ) ColorLabels = 826 ( 1300 ) LayerLabels = 971 ( 1499 ) PROPS : Centroid = 0 ( 0 ) Volume = 0 ( 0 ) Area = 0 ( 0 ) NCOLORS : NColors = 2 ( 3 ) COLORS : Colors = CYAN WHITE ( CYAN RED WHITE ) diff --git a/tests/de/iges_1/R8 b/tests/de/iges_1/R8 index e99e0d4890..2e1a52a6aa 100755 --- a/tests/de/iges_1/R8 +++ b/tests/de/iges_1/R8 @@ -11,9 +11,9 @@ DATA : Faulties = 0 ( 2 ) Warnings = 0 ( 0 ) Summary = 0 ( 2 ) TPSTAT : Faulties = 3 ( 59 ) Warnings = 2206 ( 4736 ) Summary = 2209 ( 4795 ) CHECKSHAPE : Wires = 8 ( 18 ) Faces = 7 ( 13 ) Shells = 0 ( 0 ) Solids = 0 ( 0 ) NBSHAPES : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 3350 ( 2837 ) -STATSHAPE : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 3350 ( 3349 ) FreeWire = 6 ( 6 ) -TOLERANCE : MaxTol = 3.742696236 ( 5.769095076 ) AvgTol = 0.01622288473 ( 0.01748586758 ) -LABELS : N0Labels = 11 ( 11 ) N1Labels = 2891 ( 6329 ) N2Labels = 0 ( 0 ) TotalLabels = 2902 ( 6340 ) NameLabels = 2900 ( 5879 ) ColorLabels = 2891 ( 6329 ) LayerLabels = 2411 ( 5260 ) +STATSHAPE : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 3350 ( 3349 ) FreeWire = 6 ( 41 ) +TOLERANCE : MaxTol = 3.742696236 ( 5.769095076 ) AvgTol = 0.01622288457 ( 0.01748590233 ) +LABELS : N0Labels = 11 ( 11 ) N1Labels = 2898 ( 17842 ) N2Labels = 0 ( 0 ) TotalLabels = 2909 ( 17853 ) NameLabels = 2900 ( 5879 ) ColorLabels = 2898 ( 17842 ) LayerLabels = 2411 ( 14961 ) PROPS : Centroid = 0 ( 0 ) Volume = 0 ( 0 ) Area = 0 ( 0 ) NCOLORS : NColors = 4 ( 4 ) COLORS : Colors = BLACK BLUE RED YELLOW ( BLACK BLUE RED YELLOW ) diff --git a/tests/de/iges_2/A1 b/tests/de/iges_2/A1 index f390f4ef44..cd714485a8 100644 --- a/tests/de/iges_2/A1 +++ b/tests/de/iges_2/A1 @@ -11,7 +11,7 @@ TPSTAT : Faulties = 0 ( 0 ) Warnings = 6 ( 12 ) Summary = 6 ( 12 ) CHECKSHAPE : Wires = 1 ( 3 ) Faces = 1 ( 3 ) Shells = 0 ( 0 ) Solids = 0 ( 0 ) NBSHAPES : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 1147 ( 1145 ) STATSHAPE : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 1147 ( 1145 ) FreeWire = 0 ( 0 ) -TOLERANCE : MaxTol = 0.9825787092 ( 0.9825787092 ) AvgTol = 0.04100809275 ( 0.04103794258 ) +TOLERANCE : MaxTol = 0.9825787092 ( 0.9825787092 ) AvgTol = 0.04100808955 ( 0.04103794258 ) LABELS : N0Labels = 1 ( 1 ) N1Labels = 0 ( 0 ) N2Labels = 0 ( 0 ) TotalLabels = 1 ( 1 ) NameLabels = 1 ( 1 ) ColorLabels = 0 ( 0 ) LayerLabels = 0 ( 0 ) PROPS : Centroid = 0 ( 0 ) Volume = 0 ( 0 ) Area = 0 ( 0 ) NCOLORS : NColors = 0 ( 0 ) diff --git a/tests/de/iges_2/A2 b/tests/de/iges_2/A2 index 2213edc136..3623b0c23a 100755 --- a/tests/de/iges_2/A2 +++ b/tests/de/iges_2/A2 @@ -13,7 +13,7 @@ CHECKSHAPE : Wires = 0 ( 0 ) Faces = 0 ( 0 ) Shells = 0 ( 0 ) So NBSHAPES : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 218 ( 218 ) STATSHAPE : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 218 ( 218 ) FreeWire = 0 ( 0 ) TOLERANCE : MaxTol = 0.07760384877 ( 0.07760384877 ) AvgTol = 0.001773555527 ( 0.001789794199 ) -LABELS : N0Labels = 1 ( 1 ) N1Labels = 230 ( 883 ) N2Labels = 0 ( 0 ) TotalLabels = 231 ( 884 ) NameLabels = 231 ( 369 ) ColorLabels = 230 ( 883 ) LayerLabels = 230 ( 883 ) +LABELS : N0Labels = 1 ( 1 ) N1Labels = 230 ( 1434 ) N2Labels = 0 ( 0 ) TotalLabels = 231 ( 1435 ) NameLabels = 231 ( 369 ) ColorLabels = 230 ( 1434 ) LayerLabels = 230 ( 1434 ) PROPS : Centroid = 0 ( 0 ) Volume = 0 ( 0 ) Area = 0 ( 0 ) NCOLORS : NColors = 1 ( 1 ) COLORS : Colors = YELLOW ( YELLOW ) diff --git a/tests/de/iges_2/A3 b/tests/de/iges_2/A3 index 7d988fe77c..e06a8ad5f1 100644 --- a/tests/de/iges_2/A3 +++ b/tests/de/iges_2/A3 @@ -12,7 +12,7 @@ CHECKSHAPE : Wires = 0 ( 0 ) Faces = 0 ( 0 ) Shells = 0 ( 0 ) So NBSHAPES : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 56 ( 56 ) STATSHAPE : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 56 ( 56 ) FreeWire = 38 ( 38 ) TOLERANCE : MaxTol = 0.4238514895 ( 0.4238514534 ) AvgTol = 0.006092757679 ( 0.006092602268 ) -LABELS : N0Labels = 1 ( 1 ) N1Labels = 252 ( 542 ) N2Labels = 0 ( 0 ) TotalLabels = 253 ( 543 ) NameLabels = 253 ( 331 ) ColorLabels = 252 ( 542 ) LayerLabels = 178 ( 206 ) +LABELS : N0Labels = 1 ( 1 ) N1Labels = 288 ( 672 ) N2Labels = 0 ( 0 ) TotalLabels = 289 ( 673 ) NameLabels = 253 ( 331 ) ColorLabels = 288 ( 672 ) LayerLabels = 178 ( 206 ) PROPS : Centroid = 0 ( 0 ) Volume = 0 ( 0 ) Area = 0 ( 0 ) NCOLORS : NColors = 4 ( 5 ) COLORS : Colors = BLUE MAGENTA RED WHITE ( BLUE MAGENTA RED WHITE YELLOW ) diff --git a/tests/de/iges_2/A4 b/tests/de/iges_2/A4 index b379b6056f..60c41cd942 100644 --- a/tests/de/iges_2/A4 +++ b/tests/de/iges_2/A4 @@ -11,8 +11,8 @@ TPSTAT : Faulties = 0 ( 9 ) Warnings = 110 ( 1087 ) Summary = 110 ( 1 CHECKSHAPE : Wires = 0 ( 0 ) Faces = 0 ( 0 ) Shells = 0 ( 0 ) Solids = 0 ( 0 ) NBSHAPES : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 622 ( 312 ) STATSHAPE : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 622 ( 622 ) FreeWire = 816 ( 816 ) -TOLERANCE : MaxTol = 0.6427268663 ( 4.45211637 ) AvgTol = 0.01239718283 ( 0.01385833784 ) -LABELS : N0Labels = 7 ( 7 ) N1Labels = 379 ( 3264 ) N2Labels = 0 ( 0 ) TotalLabels = 386 ( 3271 ) NameLabels = 386 ( 1010 ) ColorLabels = 381 ( 3266 ) LayerLabels = 0 ( 0 ) +TOLERANCE : MaxTol = 0.6427268663 ( 4.45211637 ) AvgTol = 0.01239718282 ( 0.01385833784 ) +LABELS : N0Labels = 7 ( 7 ) N1Labels = 787 ( 3264 ) N2Labels = 0 ( 0 ) TotalLabels = 794 ( 3271 ) NameLabels = 386 ( 1010 ) ColorLabels = 789 ( 3266 ) LayerLabels = 0 ( 0 ) PROPS : Centroid = 0 ( 0 ) Volume = 0 ( 0 ) Area = 0 ( 0 ) NCOLORS : NColors = 1 ( 1 ) COLORS : Colors = WHITE ( WHITE ) diff --git a/tests/de/iges_2/A5 b/tests/de/iges_2/A5 index 414c4ba27c..04011e2d45 100644 --- a/tests/de/iges_2/A5 +++ b/tests/de/iges_2/A5 @@ -11,8 +11,8 @@ TPSTAT : Faulties = 0 ( 733 ) Warnings = 68 ( 4336 ) Summary = 68 ( 5 CHECKSHAPE : Wires = 0 ( 0 ) Faces = 0 ( 0 ) Shells = 0 ( 0 ) Solids = 0 ( 0 ) NBSHAPES : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 2263 ( 2263 ) STATSHAPE : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 2263 ( 2263 ) FreeWire = 2854 ( 2907 ) -TOLERANCE : MaxTol = 0.7925892163 ( 0.7925891552 ) AvgTol = 0.001587411539 ( 0.001648585557 ) -LABELS : N0Labels = 28 ( 28 ) N1Labels = 13487 ( 17629 ) N2Labels = 0 ( 0 ) TotalLabels = 13515 ( 17657 ) NameLabels = 13515 ( 17494 ) ColorLabels = 13489 ( 17629 ) LayerLabels = 13438 ( 17573 ) +TOLERANCE : MaxTol = 0.7925892163 ( 0.7925891552 ) AvgTol = 0.001587386005 ( 0.001648585553 ) +LABELS : N0Labels = 28 ( 28 ) N1Labels = 16279 ( 19400 ) N2Labels = 0 ( 0 ) TotalLabels = 16307 ( 19428 ) NameLabels = 13464 ( 17443 ) ColorLabels = 16281 ( 19400 ) LayerLabels = 13440 ( 19344 ) PROPS : Centroid = 0 ( 0 ) Volume = 0 ( 0 ) Area = 0 ( 0 ) NCOLORS : NColors = 18 ( 18 ) COLORS : Colors = BLUE CYAN DARKKHAKI DARKSEAGREEN2 DEEPSKYBLUE2 DODGERBLUE2 GOLD3 GREEN GREEN4 KHAKI1 LIGHTPINK1 LIGHTSEAGREEN ORANGE PALEVIOLETRED4 PLUM1 RED WHITE YELLOW ( BLUE CYAN DARKKHAKI DARKSEAGREEN2 DEEPSKYBLUE2 DODGERBLUE2 GOLD3 GREEN GREEN4 KHAKI1 LIGHTPINK1 LIGHTSEAGREEN ORANGE PALEVIOLETRED4 PLUM1 RED WHITE YELLOW ) diff --git a/tests/de/iges_2/A6 b/tests/de/iges_2/A6 index eef7b0c516..cd13ab4a7a 100755 --- a/tests/de/iges_2/A6 +++ b/tests/de/iges_2/A6 @@ -12,7 +12,7 @@ TPSTAT : Faulties = 0 ( 0 ) Warnings = 565 ( 57 ) Summary = 565 ( 57 CHECKSHAPE : Wires = 0 ( 0 ) Faces = 0 ( 0 ) Shells = 0 ( 0 ) Solids = 0 ( 0 ) NBSHAPES : Solid = 0 ( 5 ) Shell = 0 ( 5 ) Face = 93 ( 93 ) STATSHAPE : Solid = 0 ( 5 ) Shell = 0 ( 5 ) Face = 93 ( 93 ) FreeWire = 0 ( 0 ) -TOLERANCE : MaxTol = 1e-005 ( 0.9051733624 ) AvgTol = 9.894427245e-006 ( 0.243781117 ) +TOLERANCE : MaxTol = 1e-05 ( 0.9051733624 ) AvgTol = 9.894427245e-06 ( 0.2437792354 ) LABELS : N0Labels = 1 ( 8 ) N1Labels = 93 ( 11 ) N2Labels = 0 ( 0 ) TotalLabels = 94 ( 19 ) NameLabels = 1 ( 14 ) ColorLabels = 93 ( 12 ) LayerLabels = 0 ( 0 ) PROPS : Centroid = 0 ( 0 ) Volume = 0 ( 0 ) Area = 0 ( 0 ) NCOLORS : NColors = 5 ( 6 ) diff --git a/tests/de/iges_2/A7 b/tests/de/iges_2/A7 index 0841e3e1bb..49f1808c38 100644 --- a/tests/de/iges_2/A7 +++ b/tests/de/iges_2/A7 @@ -12,8 +12,8 @@ TPSTAT : Faulties = 0 ( 49 ) Warnings = 45 ( 1060 ) Summary = 45 ( 11 CHECKSHAPE : Wires = 1 ( 0 ) Faces = 1 ( 0 ) Shells = 0 ( 0 ) Solids = 0 ( 0 ) NBSHAPES : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 539 ( 539 ) STATSHAPE : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 539 ( 539 ) FreeWire = 19 ( 21 ) -TOLERANCE : MaxTol = 0.7510769849 ( 0.7510769849 ) AvgTol = 0.006912656008 ( 0.007275663147 ) -LABELS : N0Labels = 65 ( 65 ) N1Labels = 2112 ( 4443 ) N2Labels = 0 ( 0 ) TotalLabels = 2177 ( 4508 ) NameLabels = 2177 ( 2778 ) ColorLabels = 2123 ( 4458 ) LayerLabels = 0 ( 0 ) +TOLERANCE : MaxTol = 0.7510769849 ( 0.7510769849 ) AvgTol = 0.006912649549 ( 0.007275663147 ) +LABELS : N0Labels = 65 ( 65 ) N1Labels = 2114 ( 5314 ) N2Labels = 0 ( 0 ) TotalLabels = 2179 ( 5379 ) NameLabels = 2175 ( 2776 ) ColorLabels = 2125 ( 5329 ) LayerLabels = 0 ( 0 ) PROPS : Centroid = 0 ( 0 ) Volume = 0 ( 0 ) Area = 0 ( 0 ) NCOLORS : NColors = 3 ( 4 ) COLORS : Colors = BLUE WHITE YELLOW ( BLUE GREEN WHITE YELLOW ) diff --git a/tests/de/iges_2/A8 b/tests/de/iges_2/A8 index 6b18a948dc..f9b198f517 100644 --- a/tests/de/iges_2/A8 +++ b/tests/de/iges_2/A8 @@ -11,8 +11,8 @@ TPSTAT : Faulties = 0 ( 0 ) Warnings = 25 ( 339 ) Summary = 25 ( 339 CHECKSHAPE : Wires = 0 ( 0 ) Faces = 0 ( 0 ) Shells = 0 ( 0 ) Solids = 0 ( 0 ) NBSHAPES : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 157 ( 157 ) STATSHAPE : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 157 ( 157 ) FreeWire = 34 ( 34 ) -TOLERANCE : MaxTol = 0.9504514132 ( 1.074871981 ) AvgTol = 0.0174083729 ( 0.01759673602 ) -LABELS : N0Labels = 1 ( 1 ) N1Labels = 545 ( 1285 ) N2Labels = 0 ( 0 ) TotalLabels = 546 ( 1286 ) NameLabels = 546 ( 645 ) ColorLabels = 545 ( 1285 ) LayerLabels = 0 ( 0 ) +TOLERANCE : MaxTol = 0.9504514132 ( 1.074871981 ) AvgTol = 0.0174081633 ( 0.01759673602 ) +LABELS : N0Labels = 1 ( 1 ) N1Labels = 579 ( 1497 ) N2Labels = 0 ( 0 ) TotalLabels = 580 ( 1498 ) NameLabels = 546 ( 645 ) ColorLabels = 579 ( 1497 ) LayerLabels = 0 ( 0 ) PROPS : Centroid = 0 ( 0 ) Volume = 0 ( 0 ) Area = 0 ( 0 ) NCOLORS : NColors = 6 ( 7 ) COLORS : Colors = GREEN GREEN4 MAGENTA WHITE YELLOW YELLOW3 ( BLUE GREEN GREEN4 MAGENTA WHITE YELLOW YELLOW3 ) diff --git a/tests/de/iges_2/A9 b/tests/de/iges_2/A9 index 58b7bcf1f7..9905a76202 100755 --- a/tests/de/iges_2/A9 +++ b/tests/de/iges_2/A9 @@ -13,9 +13,9 @@ DATA : Faulties = 0 ( 0 ) Warnings = 0 ( 0 ) Summary = 0 ( 0 ) TPSTAT : Faulties = 0 ( 0 ) Warnings = 75 ( 15 ) Summary = 75 ( 15 ) CHECKSHAPE : Wires = 2 ( 1 ) Faces = 2 ( 1 ) Shells = 0 ( 0 ) Solids = 0 ( 0 ) NBSHAPES : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 2344 ( 1106 ) -STATSHAPE : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 2344 ( 2342 ) FreeWire = 2328 ( 2328 ) -TOLERANCE : MaxTol = 0.9711309062 ( 0.9711309063 ) AvgTol = 0.01917042498 ( 0.01948768236 ) -LABELS : N0Labels = 250 ( 250 ) N1Labels = 2268 ( 3204 ) N2Labels = 0 ( 0 ) TotalLabels = 2518 ( 3454 ) NameLabels = 2518 ( 3454 ) ColorLabels = 2512 ( 3448 ) LayerLabels = 0 ( 0 ) +STATSHAPE : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 2344 ( 2342 ) FreeWire = 2328 ( 4220 ) +TOLERANCE : MaxTol = 0.9711309062 ( 0.9711309063 ) AvgTol = 0.01917041579 ( 0.02395374369 ) +LABELS : N0Labels = 250 ( 250 ) N1Labels = 2268 ( 4296 ) N2Labels = 0 ( 0 ) TotalLabels = 2518 ( 4546 ) NameLabels = 2518 ( 3454 ) ColorLabels = 2512 ( 4540 ) LayerLabels = 0 ( 0 ) PROPS : Centroid = 0 ( 0 ) Volume = 0 ( 0 ) Area = 0 ( 0 ) NCOLORS : NColors = 4 ( 4 ) COLORS : Colors = CYAN LIGHTPINK PALEGOLDENROD ROSYBROWN ( CYAN LIGHTPINK PALEGOLDENROD ROSYBROWN ) diff --git a/tests/de/iges_2/B1 b/tests/de/iges_2/B1 index d9717d3478..0549bf1f4f 100755 --- a/tests/de/iges_2/B1 +++ b/tests/de/iges_2/B1 @@ -11,12 +11,12 @@ TPSTAT : Faulties = 0 ( 480 ) Warnings = 321 ( 4694 ) Summary = 321 ( CHECKSHAPE : Wires = 0 ( 0 ) Faces = 0 ( 0 ) Shells = 0 ( 0 ) Solids = 0 ( 0 ) NBSHAPES : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 732 ( 732 ) STATSHAPE : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 732 ( 732 ) FreeWire = 1612 ( 1613 ) -TOLERANCE : MaxTol = 0.6032674714 ( 0.6032674714 ) AvgTol = 0.001484585226 ( 0.001489802052 ) -LABELS : N0Labels = 4 ( 7 ) N1Labels = 11017 ( 18087 ) N2Labels = 0 ( 0 ) TotalLabels = 11021 ( 18094 ) NameLabels = 10620 ( 13085 ) ColorLabels = 11018 ( 18086 ) LayerLabels = 10917 ( 17934 ) +TOLERANCE : MaxTol = 0.6032674714 ( 0.6032674714 ) AvgTol = 0.001484584911 ( 0.001489802052 ) +LABELS : N0Labels = 4 ( 7 ) N1Labels = 10485 ( 16435 ) N2Labels = 0 ( 0 ) TotalLabels = 10489 ( 16442 ) NameLabels = 8504 ( 10969 ) ColorLabels = 10486 ( 16434 ) LayerLabels = 8801 ( 16282 ) PROPS : Centroid = 0 ( 0 ) Volume = 0 ( 0 ) Area = 0 ( 0 ) NCOLORS : NColors = 17 ( 17 ) COLORS : Colors = BLUE CYAN DARKGOLDENROD1 DARKSLATEGRAY1 GREEN GREEN4 LIGHTPINK1 MAGENTA MEDIUMPURPLE1 MEDIUMSPRINGGREEN PURPLE RED RED3 ROYALBLUE2 SEAGREEN2 WHITE YELLOW ( BLUE CYAN DARKGOLDENROD1 DARKSLATEGRAY1 GREEN GREEN4 LIGHTPINK1 MAGENTA MEDIUMPURPLE1 MEDIUMSPRINGGREEN PURPLE RED RED3 ROYALBLUE2 SEAGREEN2 WHITE YELLOW ) -NLAYERS : NLayers = 16 ( 17 ) -LAYERS : Layers = 1 101 102 104 106 107 108 152 154 156 158 2 240 255 6 7 ( 1 101 102 104 106 107 108 152 154 156 158 2 239 240 255 6 7 ) +NLAYERS : NLayers = 13 ( 17 ) +LAYERS : Layers = 102 104 106 107 108 152 154 156 158 2 240 255 7 ( 1 101 102 104 106 107 108 152 154 156 158 2 239 240 255 6 7 ) } diff --git a/tests/de/iges_2/B2 b/tests/de/iges_2/B2 index e1326c3f39..83e5911876 100644 --- a/tests/de/iges_2/B2 +++ b/tests/de/iges_2/B2 @@ -11,8 +11,8 @@ TPSTAT : Faulties = 0 ( 0 ) Warnings = 56 ( 425 ) Summary = 56 ( 425 CHECKSHAPE : Wires = 0 ( 0 ) Faces = 0 ( 0 ) Shells = 0 ( 0 ) Solids = 0 ( 0 ) NBSHAPES : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 1892 ( 1892 ) STATSHAPE : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 1892 ( 1892 ) FreeWire = 54 ( 54 ) -TOLERANCE : MaxTol = 0.5322014093 ( 0.5322014093 ) AvgTol = 0.002295472796 ( 0.002300296014 ) -LABELS : N0Labels = 7 ( 7 ) N1Labels = 1982 ( 2455 ) N2Labels = 0 ( 0 ) TotalLabels = 1989 ( 2462 ) NameLabels = 1989 ( 2062 ) ColorLabels = 1982 ( 2455 ) LayerLabels = 1982 ( 2455 ) +TOLERANCE : MaxTol = 0.5322014093 ( 0.5322014093 ) AvgTol = 0.002295472768 ( 0.002300296012 ) +LABELS : N0Labels = 7 ( 7 ) N1Labels = 2036 ( 2542 ) N2Labels = 0 ( 0 ) TotalLabels = 2043 ( 2549 ) NameLabels = 1989 ( 2062 ) ColorLabels = 2036 ( 2542 ) LayerLabels = 1982 ( 2542 ) PROPS : Centroid = 0 ( 0 ) Volume = 0 ( 0 ) Area = 0 ( 0 ) NCOLORS : NColors = 3 ( 4 ) COLORS : Colors = GRAY67 GREEN YELLOW ( GRAY67 GREEN MAGENTA YELLOW ) diff --git a/tests/de/iges_2/B3 b/tests/de/iges_2/B3 index 23bff17a40..75f8faef25 100644 --- a/tests/de/iges_2/B3 +++ b/tests/de/iges_2/B3 @@ -11,7 +11,7 @@ TPSTAT : Faulties = 0 ( 0 ) Warnings = 5 ( 219 ) Summary = 5 ( 219 ) CHECKSHAPE : Wires = 0 ( 0 ) Faces = 0 ( 0 ) Shells = 0 ( 0 ) Solids = 0 ( 0 ) NBSHAPES : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 4004 ( 4004 ) STATSHAPE : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 4004 ( 4004 ) FreeWire = 0 ( 0 ) -TOLERANCE : MaxTol = 0.01077402956 ( 0.005387073003 ) AvgTol = 4.984658154e-006 ( 9.179911224e-006 ) +TOLERANCE : MaxTol = 0.01077402956 ( 0.005387073003 ) AvgTol = 4.655384424e-06 ( 9.179906173e-06 ) LABELS : N0Labels = 4004 ( 4004 ) N1Labels = 0 ( 916 ) N2Labels = 0 ( 0 ) TotalLabels = 4004 ( 4920 ) NameLabels = 4004 ( 4004 ) ColorLabels = 248 ( 1164 ) LayerLabels = 3366 ( 4282 ) PROPS : Centroid = 0 ( 0 ) Volume = 0 ( 0 ) Area = 0 ( 0 ) NCOLORS : NColors = 3 ( 3 ) diff --git a/tests/de/iges_2/B4 b/tests/de/iges_2/B4 index a058c239ec..e590b8ec7c 100644 --- a/tests/de/iges_2/B4 +++ b/tests/de/iges_2/B4 @@ -7,12 +7,12 @@ set filename Case.igs set ref_data { DATA : Faulties = 0 ( 0 ) Warnings = 0 ( 0 ) Summary = 0 ( 0 ) -TPSTAT : Faulties = 0 ( 0 ) Warnings = 267 ( 552 ) Summary = 267 ( 552 ) +TPSTAT : Faulties = 0 ( 0 ) Warnings = 268 ( 552 ) Summary = 268 ( 552 ) CHECKSHAPE : Wires = 0 ( 0 ) Faces = 0 ( 0 ) Shells = 0 ( 0 ) Solids = 0 ( 0 ) NBSHAPES : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 208 ( 208 ) STATSHAPE : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 208 ( 208 ) FreeWire = 0 ( 0 ) -TOLERANCE : MaxTol = 0.7043468651 ( 0.7043466394 ) AvgTol = 0.006003712839 ( 0.006001242372 ) -LABELS : N0Labels = 1 ( 2 ) N1Labels = 208 ( 208 ) N2Labels = 0 ( 0 ) TotalLabels = 209 ( 210 ) NameLabels = 1 ( 2 ) ColorLabels = 208 ( 209 ) LayerLabels = 0 ( 0 ) +TOLERANCE : MaxTol = 0.7043468651 ( 0.7043466394 ) AvgTol = 0.006003712781 ( 0.006001242372 ) +LABELS : N0Labels = 1 ( 2 ) N1Labels = 239 ( 208 ) N2Labels = 0 ( 0 ) TotalLabels = 240 ( 210 ) NameLabels = 1 ( 2 ) ColorLabels = 239 ( 209 ) LayerLabels = 0 ( 0 ) PROPS : Centroid = 0 ( 0 ) Volume = 0 ( 0 ) Area = 0 ( 0 ) NCOLORS : NColors = 1 ( 2 ) COLORS : Colors = DEEPSKYBLUE1 ( DEEPSKYBLUE1 WHITE ) diff --git a/tests/de/iges_2/B5 b/tests/de/iges_2/B5 index 7cee417d1f..9816f3918a 100644 --- a/tests/de/iges_2/B5 +++ b/tests/de/iges_2/B5 @@ -11,8 +11,8 @@ TPSTAT : Faulties = 0 ( 13 ) Warnings = 290 ( 688 ) Summary = 290 ( 7 CHECKSHAPE : Wires = 0 ( 0 ) Faces = 0 ( 0 ) Shells = 0 ( 0 ) Solids = 0 ( 0 ) NBSHAPES : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 200 ( 200 ) STATSHAPE : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 200 ( 200 ) FreeWire = 0 ( 0 ) -TOLERANCE : MaxTol = 4.399371441e-006 ( 1.000236438e-007 ) AvgTol = 7.221372722e-007 ( 1.000013342e-007 ) -LABELS : N0Labels = 22 ( 23 ) N1Labels = 271 ( 279 ) N2Labels = 0 ( 0 ) TotalLabels = 293 ( 302 ) NameLabels = 22 ( 23 ) ColorLabels = 289 ( 290 ) LayerLabels = 289 ( 290 ) +TOLERANCE : MaxTol = 4.399371441e-06 ( 1.000236438e-07 ) AvgTol = 7.221372722e-07 ( 1.000013342e-07 ) +LABELS : N0Labels = 22 ( 23 ) N1Labels = 295 ( 279 ) N2Labels = 0 ( 0 ) TotalLabels = 317 ( 302 ) NameLabels = 22 ( 23 ) ColorLabels = 313 ( 290 ) LayerLabels = 289 ( 290 ) PROPS : Centroid = 0 ( 0 ) Volume = 0 ( 0 ) Area = 0 ( 0 ) NCOLORS : NColors = 2 ( 2 ) COLORS : Colors = RED WHITE ( RED WHITE ) diff --git a/tests/de/iges_2/B6 b/tests/de/iges_2/B6 index a1e05d6888..cf1e75e242 100755 --- a/tests/de/iges_2/B6 +++ b/tests/de/iges_2/B6 @@ -3,11 +3,11 @@ set filename D44-11325-6a.igs set ref_data { DATA : Faulties = 0 ( 0 ) Warnings = 0 ( 0 ) Summary = 0 ( 0 ) -TPSTAT : Faulties = 0 ( 0 ) Warnings = 96 ( 192 ) Summary = 96 ( 192 ) +TPSTAT : Faulties = 0 ( 0 ) Warnings = 124 ( 192 ) Summary = 124 ( 192 ) CHECKSHAPE : Wires = 2 ( 2 ) Faces = 2 ( 2 ) Shells = 0 ( 0 ) Solids = 0 ( 0 ) NBSHAPES : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 569 ( 569 ) STATSHAPE : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 569 ( 569 ) FreeWire = 0 ( 0 ) -TOLERANCE : MaxTol = 0.7161069967 ( 0.7585238415 ) AvgTol = 0.006791986417 ( 0.006958568353 ) +TOLERANCE : MaxTol = 0.7161069967 ( 0.7585238415 ) AvgTol = 0.006788946843 ( 0.006955835734 ) LABELS : N0Labels = 568 ( 568 ) N1Labels = 2 ( 2 ) N2Labels = 0 ( 0 ) TotalLabels = 570 ( 570 ) NameLabels = 568 ( 568 ) ColorLabels = 569 ( 569 ) LayerLabels = 569 ( 569 ) PROPS : Centroid = 0 ( 0 ) Volume = 0 ( 0 ) Area = 0 ( 0 ) NCOLORS : NColors = 1 ( 1 ) diff --git a/tests/de/iges_2/B7 b/tests/de/iges_2/B7 index df0882a338..18834d2f50 100644 --- a/tests/de/iges_2/B7 +++ b/tests/de/iges_2/B7 @@ -11,8 +11,8 @@ TPSTAT : Faulties = 0 ( 0 ) Warnings = 178 ( 454 ) Summary = 178 ( 45 CHECKSHAPE : Wires = 0 ( 0 ) Faces = 0 ( 0 ) Shells = 0 ( 0 ) Solids = 0 ( 0 ) NBSHAPES : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 304 ( 304 ) STATSHAPE : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 304 ( 304 ) FreeWire = 0 ( 0 ) -TOLERANCE : MaxTol = 0.4659394289 ( 0.4659394289 ) AvgTol = 0.01079422073 ( 0.01079529744 ) -LABELS : N0Labels = 1 ( 1 ) N1Labels = 304 ( 1400 ) N2Labels = 0 ( 0 ) TotalLabels = 305 ( 1401 ) NameLabels = 305 ( 429 ) ColorLabels = 304 ( 1400 ) LayerLabels = 304 ( 1400 ) +TOLERANCE : MaxTol = 0.4659394289 ( 0.4659394289 ) AvgTol = 0.01079422061 ( 0.01079529744 ) +LABELS : N0Labels = 1 ( 1 ) N1Labels = 304 ( 1854 ) N2Labels = 0 ( 0 ) TotalLabels = 305 ( 1855 ) NameLabels = 305 ( 429 ) ColorLabels = 304 ( 1854 ) LayerLabels = 304 ( 1854 ) PROPS : Centroid = 0 ( 0 ) Volume = 0 ( 0 ) Area = 0 ( 0 ) NCOLORS : NColors = 2 ( 3 ) COLORS : Colors = RED WHITE ( RED WHITE YELLOW ) diff --git a/tests/de/iges_2/B8 b/tests/de/iges_2/B8 index 6b680a7f6c..2426ff4ef1 100644 --- a/tests/de/iges_2/B8 +++ b/tests/de/iges_2/B8 @@ -11,11 +11,12 @@ TPSTAT : Faulties = 0 ( 0 ) Warnings = 293 ( 5002 ) Summary = 293 ( 5 CHECKSHAPE : Wires = 8 ( 11 ) Faces = 8 ( 7 ) Shells = 0 ( 0 ) Solids = 0 ( 0 ) NBSHAPES : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 4729 ( 4729 ) STATSHAPE : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 4729 ( 4729 ) FreeWire = 18 ( 18 ) -TOLERANCE : MaxTol = 0.9804479161 ( 0.9805459497 ) AvgTol = 0.01154139976 ( 0.01155171873 ) -LABELS : N0Labels = 5089 ( 5165 ) N1Labels = 26 ( 3936 ) N2Labels = 0 ( 0 ) TotalLabels = 5115 ( 9101 ) NameLabels = 5089 ( 5165 ) ColorLabels = 5086 ( 9025 ) LayerLabels = 5086 ( 9025 ) +TOLERANCE : MaxTol = 0.9804479161 ( 0.9805459497 ) AvgTol = 0.01154139982 ( 0.01155171873 ) +LABELS : N0Labels = 5089 ( 5165 ) N1Labels = 80 ( 15756 ) N2Labels = 0 ( 0 ) TotalLabels = 5169 ( 20921 ) NameLabels = 5089 ( 5165 ) ColorLabels = 5140 ( 20845 ) LayerLabels = 5122 ( 20845 ) PROPS : Centroid = 0 ( 0 ) Volume = 0 ( 0 ) Area = 0 ( 0 ) NCOLORS : NColors = 3 ( 3 ) COLORS : Colors = BLUE CYAN GREEN ( BLUE CYAN GREEN ) NLAYERS : NLayers = 3 ( 3 ) LAYERS : Layers = 1 200 51 ( 1 200 51 ) + } diff --git a/tests/de/iges_2/C1 b/tests/de/iges_2/C1 index a9069f5a73..594b55c701 100644 --- a/tests/de/iges_2/C1 +++ b/tests/de/iges_2/C1 @@ -11,8 +11,8 @@ TPSTAT : Faulties = 0 ( 7 ) Warnings = 10 ( 142 ) Summary = 10 ( 149 CHECKSHAPE : Wires = 0 ( 0 ) Faces = 0 ( 0 ) Shells = 0 ( 0 ) Solids = 0 ( 0 ) NBSHAPES : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 28 ( 28 ) STATSHAPE : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 28 ( 28 ) FreeWire = 20 ( 20 ) -TOLERANCE : MaxTol = 0.09192532719 ( 0.09192532719 ) AvgTol = 0.0005521202193 ( 0.0005526017996 ) -LABELS : N0Labels = 1 ( 1 ) N1Labels = 1153 ( 1298 ) N2Labels = 0 ( 0 ) TotalLabels = 1154 ( 1299 ) NameLabels = 1154 ( 1195 ) ColorLabels = 1153 ( 1298 ) LayerLabels = 1153 ( 1298 ) +TOLERANCE : MaxTol = 0.09192532719 ( 0.09192532719 ) AvgTol = 0.0005521171736 ( 0.0005524808205 ) +LABELS : N0Labels = 1 ( 1 ) N1Labels = 1109 ( 1273 ) N2Labels = 0 ( 0 ) TotalLabels = 1110 ( 1274 ) NameLabels = 1090 ( 1131 ) ColorLabels = 1109 ( 1273 ) LayerLabels = 1089 ( 1273 ) PROPS : Centroid = 0 ( 0 ) Volume = 0 ( 0 ) Area = 0 ( 0 ) NCOLORS : NColors = 5 ( 6 ) COLORS : Colors = BLUE CYAN GOLDENROD2 GREEN YELLOW ( BLUE CYAN GOLDENROD2 GREEN RED YELLOW ) diff --git a/tests/de/iges_2/C2 b/tests/de/iges_2/C2 index 71dfc185fa..f78cd01f00 100644 --- a/tests/de/iges_2/C2 +++ b/tests/de/iges_2/C2 @@ -12,8 +12,8 @@ TPSTAT : Faulties = 2 ( 0 ) Warnings = 91 ( 292 ) Summary = 93 ( 292 CHECKSHAPE : Wires = 8 ( 15 ) Faces = 8 ( 13 ) Shells = 0 ( 0 ) Solids = 0 ( 0 ) NBSHAPES : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 419 ( 419 ) STATSHAPE : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 419 ( 419 ) FreeWire = 4 ( 4 ) -TOLERANCE : MaxTol = 4.548618897 ( 4.543567878 ) AvgTol = 0.03326761265 ( 0.03597535474 ) -LABELS : N0Labels = 457 ( 457 ) N1Labels = 0 ( 0 ) N2Labels = 0 ( 0 ) TotalLabels = 457 ( 457 ) NameLabels = 457 ( 457 ) ColorLabels = 451 ( 455 ) LayerLabels = 453 ( 457 ) +TOLERANCE : MaxTol = 4.548618897 ( 4.543567878 ) AvgTol = 0.03326761002 ( 0.03597535474 ) +LABELS : N0Labels = 457 ( 457 ) N1Labels = 4 ( 1259 ) N2Labels = 0 ( 0 ) TotalLabels = 461 ( 1716 ) NameLabels = 457 ( 457 ) ColorLabels = 455 ( 1714 ) LayerLabels = 453 ( 1716 ) PROPS : Centroid = 0 ( 0 ) Volume = 0 ( 0 ) Area = 0 ( 0 ) NCOLORS : NColors = 2 ( 2 ) COLORS : Colors = RED WHITE ( RED WHITE ) diff --git a/tests/de/iges_2/C3 b/tests/de/iges_2/C3 index e0830b59d7..2490b54ca1 100644 --- a/tests/de/iges_2/C3 +++ b/tests/de/iges_2/C3 @@ -11,8 +11,8 @@ TPSTAT : Faulties = 0 ( 0 ) Warnings = 11 ( 190 ) Summary = 11 ( 190 CHECKSHAPE : Wires = 0 ( 0 ) Faces = 0 ( 0 ) Shells = 0 ( 0 ) Solids = 0 ( 0 ) NBSHAPES : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 309 ( 309 ) STATSHAPE : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 309 ( 309 ) FreeWire = 22 ( 22 ) -TOLERANCE : MaxTol = 0.75178756 ( 0.7517875657 ) AvgTol = 0.001674555166 ( 0.00167906973 ) -LABELS : N0Labels = 2030 ( 2204 ) N1Labels = 8 ( 673 ) N2Labels = 0 ( 0 ) TotalLabels = 2038 ( 2877 ) NameLabels = 2030 ( 2204 ) ColorLabels = 2006 ( 2703 ) LayerLabels = 2006 ( 2703 ) +TOLERANCE : MaxTol = 0.75178756 ( 0.7517875657 ) AvgTol = 0.001674553855 ( 0.00167906973 ) +LABELS : N0Labels = 2030 ( 2204 ) N1Labels = 30 ( 1187 ) N2Labels = 0 ( 0 ) TotalLabels = 2060 ( 3391 ) NameLabels = 2030 ( 2204 ) ColorLabels = 2028 ( 3217 ) LayerLabels = 2006 ( 3217 ) PROPS : Centroid = 0 ( 0 ) Volume = 0 ( 0 ) Area = 0 ( 0 ) NCOLORS : NColors = 12 ( 12 ) COLORS : Colors = GRAY61 GREEN LIGHTSALMON2 MAGENTA MAGENTA3 RED ROSYBROWN SPRINGGREEN4 TURQUOISE TURQUOISE2 WHITE YELLOW ( GRAY61 GREEN LIGHTSALMON2 MAGENTA MAGENTA3 RED ROSYBROWN SPRINGGREEN4 TURQUOISE TURQUOISE2 WHITE YELLOW ) diff --git a/tests/de/iges_2/C4 b/tests/de/iges_2/C4 index 79d3fe465d..1991a1b0e7 100644 --- a/tests/de/iges_2/C4 +++ b/tests/de/iges_2/C4 @@ -1,21 +1,22 @@ # !!!! This file is generated automatically, do not edit manually! See end script puts "TODO CR23096 ALL: TOLERANCE : Faulty" puts "TODO CR23096 ALL: LABELS : Faulty" +puts "TODO CR23096 ALL: COLORS : Faulty" set filename PRO14323.igs set ref_data { DATA : Faulties = 0 ( 0 ) Warnings = 0 ( 0 ) Summary = 0 ( 0 ) -TPSTAT : Faulties = 0 ( 0 ) Warnings = 32 ( 319 ) Summary = 32 ( 319 ) +TPSTAT : Faulties = 0 ( 0 ) Warnings = 31 ( 318 ) Summary = 31 ( 318 ) CHECKSHAPE : Wires = 0 ( 1 ) Faces = 1 ( 1 ) Shells = 0 ( 0 ) Solids = 0 ( 0 ) NBSHAPES : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 153 ( 153 ) STATSHAPE : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 153 ( 153 ) FreeWire = 21 ( 21 ) -TOLERANCE : MaxTol = 0.9672552763 ( 0.776676229 ) AvgTol = 0.01571417252 ( 0.01646993877 ) -LABELS : N0Labels = 564 ( 564 ) N1Labels = 0 ( 0 ) N2Labels = 0 ( 0 ) TotalLabels = 564 ( 564 ) NameLabels = 564 ( 564 ) ColorLabels = 543 ( 564 ) LayerLabels = 543 ( 564 ) +TOLERANCE : MaxTol = 0.9672552763 ( 0.776676229 ) AvgTol = 0.0152617674 ( 0.01601202399 ) +LABELS : N0Labels = 564 ( 564 ) N1Labels = 20 ( 732 ) N2Labels = 0 ( 0 ) TotalLabels = 584 ( 1296 ) NameLabels = 564 ( 564 ) ColorLabels = 563 ( 1296 ) LayerLabels = 543 ( 1296 ) PROPS : Centroid = 0 ( 0 ) Volume = 0 ( 0 ) Area = 0 ( 0 ) -NCOLORS : NColors = 2 ( 2 ) -COLORS : Colors = CYAN GRAY57 ( CYAN GRAY57 ) +NCOLORS : NColors = 2 ( 3 ) +COLORS : Colors = CYAN GRAY57 ( CYAN GRAY57 WHITE ) NLAYERS : NLayers = 2 ( 2 ) LAYERS : Layers = 1 25 ( 1 25 ) diff --git a/tests/de/iges_2/C5 b/tests/de/iges_2/C5 index a773052085..7c95405ff3 100644 --- a/tests/de/iges_2/C5 +++ b/tests/de/iges_2/C5 @@ -11,7 +11,7 @@ TPSTAT : Faulties = 0 ( 0 ) Warnings = 7 ( 2820 ) Summary = 7 ( 2820 CHECKSHAPE : Wires = 1 ( 6 ) Faces = 1 ( 6 ) Shells = 0 ( 0 ) Solids = 0 ( 0 ) NBSHAPES : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 3786 ( 3786 ) STATSHAPE : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 3786 ( 3786 ) FreeWire = 0 ( 0 ) -TOLERANCE : MaxTol = 0.08172710091 ( 0.05040240237 ) AvgTol = 0.0006058177695 ( 0.0006024184165 ) +TOLERANCE : MaxTol = 0.08172710091 ( 0.05040240237 ) AvgTol = 0.0006058177629 ( 0.0006024184155 ) LABELS : N0Labels = 3785 ( 3785 ) N1Labels = 2 ( 0 ) N2Labels = 0 ( 0 ) TotalLabels = 3787 ( 3785 ) NameLabels = 3785 ( 3785 ) ColorLabels = 3786 ( 3785 ) LayerLabels = 3786 ( 3785 ) PROPS : Centroid = 0 ( 0 ) Volume = 0 ( 0 ) Area = 0 ( 0 ) NCOLORS : NColors = 6 ( 6 ) diff --git a/tests/de/iges_2/C7 b/tests/de/iges_2/C7 index 7c4494c4dd..45599c711a 100755 --- a/tests/de/iges_2/C7 +++ b/tests/de/iges_2/C7 @@ -11,8 +11,8 @@ TPSTAT : Faulties = 2 ( 212 ) Warnings = 6 ( 559 ) Summary = 8 ( 771 CHECKSHAPE : Wires = 0 ( 0 ) Faces = 0 ( 0 ) Shells = 0 ( 0 ) Solids = 0 ( 0 ) NBSHAPES : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 9 ( 9 ) STATSHAPE : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 9 ( 9 ) FreeWire = 477 ( 477 ) -TOLERANCE : MaxTol = 0.002386883227 ( 0.002386886993 ) AvgTol = 1.573802585e-006 ( 1.573804825e-006 ) -LABELS : N0Labels = 2053 ( 2148 ) N1Labels = 381 ( 253 ) N2Labels = 0 ( 0 ) TotalLabels = 2434 ( 2401 ) NameLabels = 2053 ( 2148 ) ColorLabels = 1932 ( 2306 ) LayerLabels = 1932 ( 2306 ) +TOLERANCE : MaxTol = 0.002386883227 ( 0.002386886993 ) AvgTol = 1.573802585e-06 ( 1.573804825e-06 ) +LABELS : N0Labels = 2053 ( 2148 ) N1Labels = 419 ( 259 ) N2Labels = 0 ( 0 ) TotalLabels = 2472 ( 2407 ) NameLabels = 2053 ( 2148 ) ColorLabels = 1970 ( 2312 ) LayerLabels = 1932 ( 2312 ) PROPS : Centroid = 0 ( 0 ) Volume = 0 ( 0 ) Area = 0 ( 0 ) NCOLORS : NColors = 13 ( 13 ) COLORS : Colors = BLUE CYAN CYAN3 DARKORANGE2 DEEPPINK4 GREEN GREEN4 LIGHTPINK2 MAGENTA MATRAGRAY RED SIENNA3 YELLOW ( BLUE CYAN CYAN3 DARKORANGE2 DEEPPINK4 GREEN GREEN4 LIGHTPINK2 MAGENTA MATRAGRAY RED SIENNA3 YELLOW ) diff --git a/tests/de/iges_2/C8 b/tests/de/iges_2/C8 index 6721e4f155..21f89a3743 100755 --- a/tests/de/iges_2/C8 +++ b/tests/de/iges_2/C8 @@ -11,7 +11,7 @@ TPSTAT : Faulties = 0 ( 0 ) Warnings = 0 ( 0 ) Summary = 0 ( 0 ) CHECKSHAPE : Wires = 0 ( 0 ) Faces = 0 ( 0 ) Shells = 0 ( 0 ) Solids = 0 ( 0 ) NBSHAPES : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 0 ( 0 ) STATSHAPE : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 0 ( 0 ) FreeWire = 0 ( 0 ) -TOLERANCE : MaxTol = 1e-007 ( 1e-007 ) AvgTol = 1e-007 ( 1e-007 ) +TOLERANCE : MaxTol = 1e-07 ( 1e-07 ) AvgTol = 1e-07 ( 1e-07 ) LABELS : N0Labels = 1 ( 3 ) N1Labels = 46 ( 47 ) N2Labels = 0 ( 0 ) TotalLabels = 47 ( 50 ) NameLabels = 1 ( 50 ) ColorLabels = 46 ( 46 ) LayerLabels = 0 ( 47 ) PROPS : Centroid = 0 ( 0 ) Volume = 0 ( 0 ) Area = 0 ( 0 ) NCOLORS : NColors = 2 ( 2 ) diff --git a/tests/de/iges_2/C9 b/tests/de/iges_2/C9 index 78fa20b366..c3bf1b53b3 100755 --- a/tests/de/iges_2/C9 +++ b/tests/de/iges_2/C9 @@ -12,8 +12,8 @@ TPSTAT : Faulties = 4 ( 0 ) Warnings = 0 ( 3 ) Summary = 4 ( 3 ) CHECKSHAPE : Wires = 0 ( 0 ) Faces = 0 ( 0 ) Shells = 0 ( 0 ) Solids = 0 ( 0 ) NBSHAPES : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 15 ( 15 ) STATSHAPE : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 15 ( 15 ) FreeWire = 1 ( 1 ) -TOLERANCE : MaxTol = 0.0007118427497 ( 0.0007117688754 ) AvgTol = 1.660862318e-005 ( 1.660574276e-005 ) -LABELS : N0Labels = 1 ( 1 ) N1Labels = 68 ( 137 ) N2Labels = 0 ( 0 ) TotalLabels = 69 ( 138 ) NameLabels = 69 ( 76 ) ColorLabels = 68 ( 137 ) LayerLabels = 0 ( 0 ) +TOLERANCE : MaxTol = 0.0007118427497 ( 0.0007117688754 ) AvgTol = 1.660862318e-05 ( 1.660574276e-05 ) +LABELS : N0Labels = 1 ( 1 ) N1Labels = 25 ( 93 ) N2Labels = 0 ( 0 ) TotalLabels = 26 ( 94 ) NameLabels = 25 ( 32 ) ColorLabels = 25 ( 93 ) LayerLabels = 0 ( 0 ) PROPS : Centroid = 0 ( 0 ) Volume = 0 ( 0 ) Area = 0 ( 0 ) NCOLORS : NColors = 1 ( 1 ) COLORS : Colors = WHITE ( WHITE ) diff --git a/tests/de/iges_2/D1 b/tests/de/iges_2/D1 index 4a11b3037f..8427d9311c 100755 --- a/tests/de/iges_2/D1 +++ b/tests/de/iges_2/D1 @@ -13,7 +13,7 @@ CHECKSHAPE : Wires = 0 ( 0 ) Faces = 0 ( 0 ) Shells = 0 ( 0 ) So NBSHAPES : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 169 ( 169 ) STATSHAPE : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 169 ( 169 ) FreeWire = 49 ( 49 ) TOLERANCE : MaxTol = 0.1765497108 ( 0.1765497101 ) AvgTol = 0.0004121043216 ( 0.000415773091 ) -LABELS : N0Labels = 1 ( 1 ) N1Labels = 981 ( 2201 ) N2Labels = 0 ( 0 ) TotalLabels = 982 ( 2202 ) NameLabels = 982 ( 1142 ) ColorLabels = 981 ( 2201 ) LayerLabels = 981 ( 2201 ) +LABELS : N0Labels = 1 ( 1 ) N1Labels = 444 ( 1645 ) N2Labels = 0 ( 0 ) TotalLabels = 445 ( 1646 ) NameLabels = 396 ( 553 ) ColorLabels = 444 ( 1645 ) LayerLabels = 395 ( 1645 ) PROPS : Centroid = 0 ( 0 ) Volume = 0 ( 0 ) Area = 0 ( 0 ) NCOLORS : NColors = 6 ( 6 ) COLORS : Colors = BLUE CYAN GREEN MAGENTA WHITE YELLOW ( BLUE CYAN GREEN MAGENTA WHITE YELLOW ) diff --git a/tests/de/iges_2/D2 b/tests/de/iges_2/D2 index 6a88d20125..303b233260 100644 --- a/tests/de/iges_2/D2 +++ b/tests/de/iges_2/D2 @@ -7,11 +7,11 @@ set filename UK4.igs set ref_data { DATA : Faulties = 0 ( 0 ) Warnings = 0 ( 1 ) Summary = 0 ( 1 ) -TPSTAT : Faulties = 0 ( 0 ) Warnings = 138 ( 695 ) Summary = 138 ( 695 ) +TPSTAT : Faulties = 0 ( 0 ) Warnings = 150 ( 695 ) Summary = 150 ( 695 ) CHECKSHAPE : Wires = 0 ( 1 ) Faces = 0 ( 1 ) Shells = 0 ( 0 ) Solids = 0 ( 0 ) NBSHAPES : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 272 ( 271 ) STATSHAPE : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 272 ( 271 ) FreeWire = 0 ( 0 ) -TOLERANCE : MaxTol = 0.7291364392 ( 0.7291361907 ) AvgTol = 0.01261526391 ( 0.01261915338 ) +TOLERANCE : MaxTol = 0.7291364392 ( 0.7291361907 ) AvgTol = 0.01261530853 ( 0.01261915338 ) LABELS : N0Labels = 271 ( 271 ) N1Labels = 0 ( 0 ) N2Labels = 0 ( 0 ) TotalLabels = 271 ( 271 ) NameLabels = 271 ( 271 ) ColorLabels = 0 ( 0 ) LayerLabels = 271 ( 271 ) PROPS : Centroid = 0 ( 0 ) Volume = 0 ( 0 ) Area = 0 ( 0 ) NCOLORS : NColors = 0 ( 0 ) diff --git a/tests/de/iges_2/D3 b/tests/de/iges_2/D3 index c759221d97..fda41e4522 100644 --- a/tests/de/iges_2/D3 +++ b/tests/de/iges_2/D3 @@ -7,12 +7,12 @@ set filename UKI60107-5.igs set ref_data { DATA : Faulties = 0 ( 12 ) Warnings = 0 ( 0 ) Summary = 0 ( 12 ) -TPSTAT : Faulties = 2 ( 0 ) Warnings = 64 ( 134 ) Summary = 66 ( 134 ) +TPSTAT : Faulties = 2 ( 0 ) Warnings = 218 ( 134 ) Summary = 220 ( 134 ) CHECKSHAPE : Wires = 1 ( 1 ) Faces = 1 ( 1 ) Shells = 0 ( 0 ) Solids = 0 ( 0 ) NBSHAPES : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 93 ( 93 ) STATSHAPE : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 93 ( 93 ) FreeWire = 2 ( 2 ) -TOLERANCE : MaxTol = 7.725102137e-006 ( 1e-005 ) AvgTol = 2.262720869e-007 ( 9.344523314e-006 ) -LABELS : N0Labels = 513 ( 513 ) N1Labels = 0 ( 15 ) N2Labels = 0 ( 0 ) TotalLabels = 513 ( 528 ) NameLabels = 513 ( 513 ) ColorLabels = 402 ( 422 ) LayerLabels = 508 ( 528 ) +TOLERANCE : MaxTol = 1e-05 ( 1e-05 ) AvgTol = 4.819041503e-07 ( 9.344523314e-06 ) +LABELS : N0Labels = 513 ( 513 ) N1Labels = 2 ( 15 ) N2Labels = 0 ( 0 ) TotalLabels = 515 ( 528 ) NameLabels = 513 ( 513 ) ColorLabels = 404 ( 422 ) LayerLabels = 508 ( 528 ) PROPS : Centroid = 0 ( 0 ) Volume = 0 ( 0 ) Area = 0 ( 0 ) NCOLORS : NColors = 5 ( 5 ) COLORS : Colors = GREEN MAGENTA RED WHITE YELLOW ( GREEN MAGENTA RED WHITE YELLOW ) diff --git a/tests/de/iges_2/D4 b/tests/de/iges_2/D4 index 7afe7cf116..ebc1d79d9c 100644 --- a/tests/de/iges_2/D4 +++ b/tests/de/iges_2/D4 @@ -1,7 +1,6 @@ # !!!! This file is generated automatically, do not edit manually! See end script puts "TODO CR23096 ALL: transfer failed : entity skipped." puts "TODO CR23096 ALL: LABELS : Faulty" -puts "TODO CR23096 ALL: COLORS : Faulty" set filename UKI60878.igs @@ -12,11 +11,11 @@ TPSTAT : Faulties = 0 ( 2 ) Warnings = 37 ( 380 ) Summary = 37 ( 382 CHECKSHAPE : Wires = 0 ( 0 ) Faces = 0 ( 0 ) Shells = 0 ( 0 ) Solids = 0 ( 0 ) NBSHAPES : Solid = 0 ( 0 ) Shell = 0 ( 1 ) Face = 136 ( 136 ) STATSHAPE : Solid = 0 ( 0 ) Shell = 0 ( 1 ) Face = 136 ( 136 ) FreeWire = 169 ( 169 ) -TOLERANCE : MaxTol = 0.8737801249 ( 0.873776131 ) AvgTol = 0.01399319445 ( 0.01399287032 ) -LABELS : N0Labels = 416 ( 416 ) N1Labels = 2 ( 0 ) N2Labels = 0 ( 0 ) TotalLabels = 418 ( 416 ) NameLabels = 416 ( 416 ) ColorLabels = 247 ( 416 ) LayerLabels = 247 ( 416 ) +TOLERANCE : MaxTol = 0.8737801249 ( 0.873776131 ) AvgTol = 0.01396134299 ( 0.01396106119 ) +LABELS : N0Labels = 416 ( 416 ) N1Labels = 171 ( 0 ) N2Labels = 0 ( 0 ) TotalLabels = 587 ( 416 ) NameLabels = 416 ( 416 ) ColorLabels = 416 ( 416 ) LayerLabels = 247 ( 416 ) PROPS : Centroid = 0 ( 0 ) Volume = 0 ( 0 ) Area = 0 ( 0 ) -NCOLORS : NColors = 4 ( 5 ) -COLORS : Colors = CYAN GRAY33 GRAY6 YELLOW ( CYAN GRAY33 GRAY6 WHITE YELLOW ) +NCOLORS : NColors = 5 ( 5 ) +COLORS : Colors = CYAN GRAY33 GRAY6 WHITE YELLOW ( CYAN GRAY33 GRAY6 WHITE YELLOW ) NLAYERS : NLayers = 2 ( 2 ) LAYERS : Layers = 10 2 ( 10 2 ) diff --git a/tests/de/iges_2/D5 b/tests/de/iges_2/D5 index 8defd52a31..8e23f4ce83 100644 --- a/tests/de/iges_2/D5 +++ b/tests/de/iges_2/D5 @@ -1,21 +1,20 @@ # !!!! This file is generated automatically, do not edit manually! See end script puts "TODO CR23096 ALL: LABELS : Faulty" -puts "TODO CR23096 ALL: COLORS : Faulty" set filename UKI60997.igs set ref_data { DATA : Faulties = 0 ( 0 ) Warnings = 0 ( 1 ) Summary = 0 ( 1 ) -TPSTAT : Faulties = 0 ( 0 ) Warnings = 44 ( 72 ) Summary = 44 ( 72 ) +TPSTAT : Faulties = 0 ( 0 ) Warnings = 50 ( 72 ) Summary = 50 ( 72 ) CHECKSHAPE : Wires = 0 ( 0 ) Faces = 0 ( 0 ) Shells = 0 ( 0 ) Solids = 0 ( 0 ) NBSHAPES : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 25 ( 25 ) STATSHAPE : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 25 ( 25 ) FreeWire = 1 ( 1 ) -TOLERANCE : MaxTol = 0.5931853741 ( 0.5931853741 ) AvgTol = 0.01696808086 ( 0.01696902111 ) -LABELS : N0Labels = 26 ( 26 ) N1Labels = 0 ( 31 ) N2Labels = 0 ( 0 ) TotalLabels = 26 ( 57 ) NameLabels = 26 ( 57 ) ColorLabels = 25 ( 57 ) LayerLabels = 0 ( 0 ) +TOLERANCE : MaxTol = 0.5931853741 ( 0.5931853741 ) AvgTol = 0.01696838021 ( 0.01696902111 ) +LABELS : N0Labels = 26 ( 26 ) N1Labels = 2 ( 81 ) N2Labels = 0 ( 0 ) TotalLabels = 28 ( 107 ) NameLabels = 26 ( 57 ) ColorLabels = 27 ( 107 ) LayerLabels = 0 ( 0 ) PROPS : Centroid = 0 ( 0 ) Volume = 0 ( 0 ) Area = 0 ( 0 ) -NCOLORS : NColors = 3 ( 4 ) -COLORS : Colors = ORANGE ORANGERED RED ( GREEN ORANGE ORANGERED RED ) +NCOLORS : NColors = 4 ( 4 ) +COLORS : Colors = GREEN ORANGE ORANGERED RED ( GREEN ORANGE ORANGERED RED ) NLAYERS : NLayers = 0 ( 0 ) LAYERS : Layers = ( ) diff --git a/tests/de/iges_2/D6 b/tests/de/iges_2/D6 index 3cd385c9c1..9712e514ad 100644 --- a/tests/de/iges_2/D6 +++ b/tests/de/iges_2/D6 @@ -11,8 +11,8 @@ TPSTAT : Faulties = 0 ( 0 ) Warnings = 0 ( 11 ) Summary = 0 ( 11 ) CHECKSHAPE : Wires = 0 ( 0 ) Faces = 0 ( 0 ) Shells = 0 ( 0 ) Solids = 0 ( 0 ) NBSHAPES : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 11 ( 11 ) STATSHAPE : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 11 ( 11 ) FreeWire = 0 ( 0 ) -TOLERANCE : MaxTol = 1e-005 ( 1.210776757e-007 ) AvgTol = 1.545256205e-006 ( 1.010720359e-007 ) -LABELS : N0Labels = 11 ( 11 ) N1Labels = 0 ( 13 ) N2Labels = 0 ( 0 ) TotalLabels = 11 ( 24 ) NameLabels = 11 ( 24 ) ColorLabels = 11 ( 24 ) LayerLabels = 0 ( 0 ) +TOLERANCE : MaxTol = 1e-05 ( 1.210776757e-07 ) AvgTol = 1.545256205e-06 ( 1.010720359e-07 ) +LABELS : N0Labels = 11 ( 11 ) N1Labels = 4 ( 13 ) N2Labels = 0 ( 0 ) TotalLabels = 15 ( 24 ) NameLabels = 11 ( 24 ) ColorLabels = 15 ( 24 ) LayerLabels = 0 ( 0 ) PROPS : Centroid = 0 ( 0 ) Volume = 0 ( 0 ) Area = 0 ( 0 ) NCOLORS : NColors = 1 ( 1 ) COLORS : Colors = ORANGERED ( ORANGERED ) diff --git a/tests/de/iges_2/D7 b/tests/de/iges_2/D7 index 58ea5c82f6..caf3709193 100644 --- a/tests/de/iges_2/D7 +++ b/tests/de/iges_2/D7 @@ -11,8 +11,8 @@ TPSTAT : Faulties = 0 ( 90 ) Warnings = 0 ( 67 ) Summary = 0 ( 157 ) CHECKSHAPE : Wires = 0 ( 0 ) Faces = 0 ( 0 ) Shells = 0 ( 0 ) Solids = 0 ( 0 ) NBSHAPES : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 0 ( 0 ) STATSHAPE : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 0 ( 0 ) FreeWire = 22 ( 22 ) -TOLERANCE : MaxTol = 1e-007 ( 1e-007 ) AvgTol = 1e-007 ( 1e-007 ) -LABELS : N0Labels = 2969 ( 2969 ) N1Labels = 535 ( 419 ) N2Labels = 0 ( 0 ) TotalLabels = 3504 ( 3388 ) NameLabels = 2969 ( 2969 ) ColorLabels = 2305 ( 2287 ) LayerLabels = 3288 ( 3308 ) +TOLERANCE : MaxTol = 1e-07 ( 1e-07 ) AvgTol = 1e-07 ( 1e-07 ) +LABELS : N0Labels = 2969 ( 2969 ) N1Labels = 549 ( 419 ) N2Labels = 0 ( 0 ) TotalLabels = 3518 ( 3388 ) NameLabels = 2969 ( 2969 ) ColorLabels = 2319 ( 2287 ) LayerLabels = 3288 ( 3308 ) PROPS : Centroid = 0 ( 0 ) Volume = 0 ( 0 ) Area = 0 ( 0 ) NCOLORS : NColors = 6 ( 6 ) COLORS : Colors = BLUE CYAN GREEN MAGENTA RED YELLOW ( BLUE CYAN GREEN MAGENTA RED YELLOW ) diff --git a/tests/de/iges_2/D8 b/tests/de/iges_2/D8 index 72da01df46..3a56dce2b8 100644 --- a/tests/de/iges_2/D8 +++ b/tests/de/iges_2/D8 @@ -1,20 +1,20 @@ # !!!! This file is generated automatically, do not edit manually! See end script puts "TODO CR23096 ALL: LABELS : Faulty" -puts "TODO CR23096 ALL: COLORS : Faulty" + set filename USA60231.igs set ref_data { DATA : Faulties = 0 ( 1 ) Warnings = 0 ( 0 ) Summary = 0 ( 1 ) -TPSTAT : Faulties = 0 ( 0 ) Warnings = 650 ( 1843 ) Summary = 650 ( 1843 ) +TPSTAT : Faulties = 0 ( 0 ) Warnings = 665 ( 1843 ) Summary = 665 ( 1843 ) CHECKSHAPE : Wires = 0 ( 0 ) Faces = 0 ( 0 ) Shells = 0 ( 0 ) Solids = 0 ( 0 ) NBSHAPES : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 692 ( 692 ) STATSHAPE : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 692 ( 692 ) FreeWire = 5 ( 5 ) -TOLERANCE : MaxTol = 1.089725986e-005 ( 1.089659658e-005 ) AvgTol = 1.975349505e-006 ( 9.653139925e-006 ) -LABELS : N0Labels = 693 ( 693 ) N1Labels = 10 ( 1399 ) N2Labels = 0 ( 0 ) TotalLabels = 703 ( 2092 ) NameLabels = 693 ( 1341 ) ColorLabels = 692 ( 2092 ) LayerLabels = 692 ( 2092 ) +TOLERANCE : MaxTol = 1.089725986e-005 ( 1.089659658e-005 ) AvgTol = 1.339226067e-006 ( 9.653139925e-006 ) +LABELS : N0Labels = 693 ( 693 ) N1Labels = 12 ( 1399 ) N2Labels = 0 ( 0 ) TotalLabels = 705 ( 2092 ) NameLabels = 693 ( 1341 ) ColorLabels = 694 ( 2092 ) LayerLabels = 692 ( 2092 ) PROPS : Centroid = 0 ( 0 ) Volume = 0 ( 0 ) Area = 0 ( 0 ) -NCOLORS : NColors = 3 ( 4 ) -COLORS : Colors = CYAN WHITE YELLOW ( CYAN GREEN3 WHITE YELLOW ) +NCOLORS : NColors = 4 ( 4 ) +COLORS : Colors = CYAN GREEN3 WHITE YELLOW ( CYAN GREEN3 WHITE YELLOW ) NLAYERS : NLayers = 2 ( 2 ) LAYERS : Layers = 10 3 ( 10 3 ) diff --git a/tests/de/iges_2/D9 b/tests/de/iges_2/D9 index f9b2feeca0..8036679463 100644 --- a/tests/de/iges_2/D9 +++ b/tests/de/iges_2/D9 @@ -11,7 +11,7 @@ TPSTAT : Faulties = 0 ( 0 ) Warnings = 127 ( 4244 ) Summary = 127 ( 4 CHECKSHAPE : Wires = 0 ( 0 ) Faces = 0 ( 0 ) Shells = 0 ( 0 ) Solids = 0 ( 0 ) NBSHAPES : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 440 ( 440 ) STATSHAPE : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 440 ( 440 ) FreeWire = 20 ( 20 ) -TOLERANCE : MaxTol = 0.07954526757 ( 0.04419037521 ) AvgTol = 0.0008416415666 ( 0.000715264452 ) +TOLERANCE : MaxTol = 0.07954526757 ( 0.04419037521 ) AvgTol = 0.0008415706687 ( 0.000715264452 ) LABELS : N0Labels = 47 ( 47 ) N1Labels = 426 ( 426 ) N2Labels = 0 ( 0 ) TotalLabels = 473 ( 473 ) NameLabels = 473 ( 473 ) ColorLabels = 439 ( 439 ) LayerLabels = 452 ( 472 ) PROPS : Centroid = 0 ( 0 ) Volume = 0 ( 0 ) Area = 0 ( 0 ) NCOLORS : NColors = 5 ( 5 ) diff --git a/tests/de/iges_2/E1 b/tests/de/iges_2/E1 index 6e493054d0..adcacf65f8 100644 --- a/tests/de/iges_2/E1 +++ b/tests/de/iges_2/E1 @@ -12,7 +12,7 @@ CHECKSHAPE : Wires = 0 ( 0 ) Faces = 0 ( 0 ) Shells = 0 ( 0 ) So NBSHAPES : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 12 ( 6 ) STATSHAPE : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 12 ( 12 ) FreeWire = 40 ( 40 ) TOLERANCE : MaxTol = 0.2600681266 ( 7.241845164 ) AvgTol = 0.03211270001 ( 0.4065212776 ) -LABELS : N0Labels = 7 ( 7 ) N1Labels = 44 ( 98 ) N2Labels = 0 ( 0 ) TotalLabels = 51 ( 105 ) NameLabels = 51 ( 97 ) ColorLabels = 50 ( 104 ) LayerLabels = 0 ( 0 ) +LABELS : N0Labels = 7 ( 7 ) N1Labels = 83 ( 98 ) N2Labels = 0 ( 0 ) TotalLabels = 90 ( 105 ) NameLabels = 51 ( 97 ) ColorLabels = 89 ( 104 ) LayerLabels = 0 ( 0 ) PROPS : Centroid = 0 ( 0 ) Volume = 0 ( 0 ) Area = 0 ( 0 ) NCOLORS : NColors = 2 ( 2 ) COLORS : Colors = RED WHITE ( RED WHITE ) diff --git a/tests/de/iges_2/E2 b/tests/de/iges_2/E2 index 388c30cb30..03ff5cdac6 100644 --- a/tests/de/iges_2/E2 +++ b/tests/de/iges_2/E2 @@ -11,8 +11,8 @@ TPSTAT : Faulties = 0 ( 0 ) Warnings = 32 ( 2377 ) Summary = 32 ( 237 CHECKSHAPE : Wires = 0 ( 0 ) Faces = 0 ( 0 ) Shells = 0 ( 0 ) Solids = 0 ( 0 ) NBSHAPES : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 27 ( 27 ) STATSHAPE : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 27 ( 27 ) FreeWire = 99 ( 99 ) -TOLERANCE : MaxTol = 0.5378466765 ( 0.5378466739 ) AvgTol = 0.002037884252 ( 0.002051361294 ) -LABELS : N0Labels = 1 ( 1 ) N1Labels = 72 ( 171 ) N2Labels = 0 ( 0 ) TotalLabels = 73 ( 172 ) NameLabels = 73 ( 172 ) ColorLabels = 72 ( 171 ) LayerLabels = 72 ( 171 ) +TOLERANCE : MaxTol = 0.5378466765 ( 0.5378466739 ) AvgTol = 0.002037876373 ( 0.002051361294 ) +LABELS : N0Labels = 1 ( 1 ) N1Labels = 171 ( 182 ) N2Labels = 0 ( 0 ) TotalLabels = 172 ( 183 ) NameLabels = 73 ( 172 ) ColorLabels = 171 ( 182 ) LayerLabels = 72 ( 182 ) PROPS : Centroid = 0 ( 0 ) Volume = 0 ( 0 ) Area = 0 ( 0 ) NCOLORS : NColors = 3 ( 3 ) COLORS : Colors = GREEN RED YELLOW ( GREEN RED YELLOW ) diff --git a/tests/de/iges_2/E3 b/tests/de/iges_2/E3 index eb7d209fb3..f9e3a1dfe4 100644 --- a/tests/de/iges_2/E3 +++ b/tests/de/iges_2/E3 @@ -12,7 +12,7 @@ CHECKSHAPE : Wires = 0 ( 0 ) Faces = 0 ( 0 ) Shells = 0 ( 0 ) So NBSHAPES : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 208 ( 208 ) STATSHAPE : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 208 ( 208 ) FreeWire = 0 ( 0 ) TOLERANCE : MaxTol = 0.08196317057 ( 0.08606507237 ) AvgTol = 0.003601440065 ( 0.004429819317 ) -LABELS : N0Labels = 1 ( 1 ) N1Labels = 214 ( 1233 ) N2Labels = 0 ( 0 ) TotalLabels = 215 ( 1234 ) NameLabels = 215 ( 311 ) ColorLabels = 214 ( 1233 ) LayerLabels = 214 ( 1233 ) +LABELS : N0Labels = 1 ( 1 ) N1Labels = 214 ( 1260 ) N2Labels = 0 ( 0 ) TotalLabels = 215 ( 1261 ) NameLabels = 215 ( 311 ) ColorLabels = 214 ( 1260 ) LayerLabels = 214 ( 1260 ) PROPS : Centroid = 0 ( 0 ) Volume = 0 ( 0 ) Area = 0 ( 0 ) NCOLORS : NColors = 4 ( 5 ) COLORS : Colors = BLUE GRAY73 WHITE YELLOW ( BLUE GRAY73 GREEN WHITE YELLOW ) diff --git a/tests/de/iges_2/E4 b/tests/de/iges_2/E4 index 45c4189691..a83b2aee76 100644 --- a/tests/de/iges_2/E4 +++ b/tests/de/iges_2/E4 @@ -12,10 +12,10 @@ CHECKSHAPE : Wires = 0 ( 0 ) Faces = 0 ( 0 ) Shells = 0 ( 0 ) So NBSHAPES : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 47 ( 47 ) STATSHAPE : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 47 ( 47 ) FreeWire = 1 ( 1 ) TOLERANCE : MaxTol = 0.4901518209 ( 0.4901518209 ) AvgTol = 0.01741051483 ( 0.0174182959 ) -LABELS : N0Labels = 48 ( 48 ) N1Labels = 0 ( 394 ) N2Labels = 0 ( 0 ) TotalLabels = 48 ( 442 ) NameLabels = 48 ( 77 ) ColorLabels = 47 ( 442 ) LayerLabels = 47 ( 442 ) +LABELS : N0Labels = 48 ( 48 ) N1Labels = 1 ( 486 ) N2Labels = 0 ( 0 ) TotalLabels = 49 ( 534 ) NameLabels = 48 ( 77 ) ColorLabels = 48 ( 534 ) LayerLabels = 47 ( 457 ) PROPS : Centroid = 0 ( 0 ) Volume = 0 ( 0 ) Area = 0 ( 0 ) -NCOLORS : NColors = 1 ( 2 ) -COLORS : Colors = MAGENTA ( MAGENTA YELLOW ) +NCOLORS : NColors = 1 ( 3 ) +COLORS : Colors = MAGENTA ( GREEN MAGENTA YELLOW ) NLAYERS : NLayers = 1 ( 1 ) LAYERS : Layers = 2 ( 2 ) diff --git a/tests/de/iges_2/E5 b/tests/de/iges_2/E5 index 06fa2abaeb..478e0cf8f7 100644 --- a/tests/de/iges_2/E5 +++ b/tests/de/iges_2/E5 @@ -7,11 +7,11 @@ set filename ims007.igs set ref_data { DATA : Faulties = 0 ( 0 ) Warnings = 0 ( 1 ) Summary = 0 ( 1 ) -TPSTAT : Faulties = 0 ( 0 ) Warnings = 1381 ( 3541 ) Summary = 1381 ( 3541 ) +TPSTAT : Faulties = 0 ( 0 ) Warnings = 1396 ( 3541 ) Summary = 1396 ( 3541 ) CHECKSHAPE : Wires = 0 ( 0 ) Faces = 0 ( 0 ) Shells = 0 ( 0 ) Solids = 0 ( 0 ) NBSHAPES : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 1193 ( 1193 ) STATSHAPE : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 1193 ( 1193 ) FreeWire = 614 ( 614 ) -TOLERANCE : MaxTol = 0.9901746983 ( 0.9902737158 ) AvgTol = 0.009634546854 ( 0.00963536588 ) +TOLERANCE : MaxTol = 0.9901746983 ( 0.9902737158 ) AvgTol = 0.009634549413 ( 0.00963536588 ) LABELS : N0Labels = 6194 ( 6194 ) N1Labels = 0 ( 0 ) N2Labels = 0 ( 0 ) TotalLabels = 6194 ( 6194 ) NameLabels = 6194 ( 6194 ) ColorLabels = 0 ( 1 ) LayerLabels = 0 ( 0 ) PROPS : Centroid = 0 ( 0 ) Volume = 0 ( 0 ) Area = 0 ( 0 ) NCOLORS : NColors = 0 ( 1 ) diff --git a/tests/de/iges_2/E6 b/tests/de/iges_2/E6 index 9ba4a812cc..37cef5bddc 100644 --- a/tests/de/iges_2/E6 +++ b/tests/de/iges_2/E6 @@ -10,8 +10,8 @@ TPSTAT : Faulties = 0 ( 0 ) Warnings = 14 ( 524 ) Summary = 14 ( 524 CHECKSHAPE : Wires = 0 ( 0 ) Faces = 0 ( 0 ) Shells = 0 ( 0 ) Solids = 0 ( 0 ) NBSHAPES : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 1177 ( 1177 ) STATSHAPE : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 1177 ( 1177 ) FreeWire = 5 ( 5 ) -TOLERANCE : MaxTol = 0.8261873294 ( 0.8261873283 ) AvgTol = 0.01075754234 ( 0.01076339151 ) -LABELS : N0Labels = 1884 ( 1885 ) N1Labels = 0 ( 1036 ) N2Labels = 0 ( 0 ) TotalLabels = 1884 ( 2921 ) NameLabels = 1884 ( 1885 ) ColorLabels = 1873 ( 2920 ) LayerLabels = 1873 ( 2920 ) +TOLERANCE : MaxTol = 0.8261873294 ( 0.8261873283 ) AvgTol = 0.01075754232 ( 0.01076339151 ) +LABELS : N0Labels = 1884 ( 1885 ) N1Labels = 40 ( 4420 ) N2Labels = 0 ( 0 ) TotalLabels = 1924 ( 6305 ) NameLabels = 1884 ( 1885 ) ColorLabels = 1913 ( 6304 ) LayerLabels = 1908 ( 6304 ) PROPS : Centroid = 0 ( 0 ) Volume = 0 ( 0 ) Area = 0 ( 0 ) NCOLORS : NColors = 7 ( 7 ) COLORS : Colors = BLACK BLUE CYAN GREEN RED WHITE YELLOW ( BLACK BLUE CYAN GREEN RED WHITE YELLOW ) diff --git a/tests/de/iges_2/E7 b/tests/de/iges_2/E7 index 14e3de14fd..40623b36ac 100644 --- a/tests/de/iges_2/E7 +++ b/tests/de/iges_2/E7 @@ -12,8 +12,8 @@ TPSTAT : Faulties = 0 ( 0 ) Warnings = 72 ( 1081 ) Summary = 72 ( 108 CHECKSHAPE : Wires = 0 ( 1 ) Faces = 1 ( 1 ) Shells = 0 ( 0 ) Solids = 0 ( 0 ) NBSHAPES : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 1628 ( 1628 ) STATSHAPE : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 1628 ( 1628 ) FreeWire = 16 ( 17 ) -TOLERANCE : MaxTol = 0.9993613167 ( 0.9993613167 ) AvgTol = 0.01637963794 ( 0.01644107279 ) -LABELS : N0Labels = 3 ( 3 ) N1Labels = 1632 ( 3631 ) N2Labels = 0 ( 0 ) TotalLabels = 1635 ( 3634 ) NameLabels = 1635 ( 2037 ) ColorLabels = 1632 ( 3633 ) LayerLabels = 1632 ( 3633 ) +TOLERANCE : MaxTol = 0.9993613167 ( 0.9993613167 ) AvgTol = 0.01637963521 ( 0.01644107279 ) +LABELS : N0Labels = 3 ( 3 ) N1Labels = 1642 ( 5023 ) N2Labels = 0 ( 0 ) TotalLabels = 1645 ( 5026 ) NameLabels = 1632 ( 2034 ) ColorLabels = 1642 ( 5025 ) LayerLabels = 1630 ( 5025 ) PROPS : Centroid = 0 ( 0 ) Volume = 0 ( 0 ) Area = 0 ( 0 ) NCOLORS : NColors = 3 ( 4 ) COLORS : Colors = BLUE GREEN MAGENTA ( BLUE GREEN MAGENTA RED ) diff --git a/tests/de/iges_2/E8 b/tests/de/iges_2/E8 index a010fc4b59..f8bcdfeb98 100644 --- a/tests/de/iges_2/E8 +++ b/tests/de/iges_2/E8 @@ -1,6 +1,5 @@ # !!!! This file is generated automatically, do not edit manually! See end script puts "TODO CR23096 ALL: LABELS : Faulty" -puts "TODO CR23096 ALL: COLORS : Faulty" puts "TODO CR23096 ALL: LAYERS : Faulty" @@ -12,11 +11,11 @@ TPSTAT : Faulties = 0 ( 0 ) Warnings = 37 ( 556 ) Summary = 37 ( 556 CHECKSHAPE : Wires = 0 ( 0 ) Faces = 0 ( 0 ) Shells = 0 ( 0 ) Solids = 0 ( 0 ) NBSHAPES : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 105 ( 105 ) STATSHAPE : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 105 ( 105 ) FreeWire = 138 ( 262 ) -TOLERANCE : MaxTol = 0.7848432514 ( 0.7848432514 ) AvgTol = 0.01536876498 ( 0.0170408413 ) -LABELS : N0Labels = 1 ( 1 ) N1Labels = 530 ( 1068 ) N2Labels = 0 ( 0 ) TotalLabels = 531 ( 1069 ) NameLabels = 531 ( 738 ) ColorLabels = 530 ( 1068 ) LayerLabels = 494 ( 1010 ) +TOLERANCE : MaxTol = 0.7848432514 ( 0.7848432514 ) AvgTol = 0.015368765 ( 0.0170395238 ) +LABELS : N0Labels = 1 ( 1 ) N1Labels = 476 ( 1139 ) N2Labels = 0 ( 0 ) TotalLabels = 477 ( 1140 ) NameLabels = 342 ( 549 ) ColorLabels = 476 ( 1139 ) LayerLabels = 336 ( 1081 ) PROPS : Centroid = 0 ( 0 ) Volume = 0 ( 0 ) Area = 0 ( 0 ) -NCOLORS : NColors = 6 ( 7 ) -COLORS : Colors = BLUE CYAN GREEN MAGENTA WHITE YELLOW ( BLUE CYAN GREEN MAGENTA RED WHITE YELLOW ) +NCOLORS : NColors = 7 ( 7 ) +COLORS : Colors = BLUE CYAN GREEN MAGENTA RED WHITE YELLOW ( BLUE CYAN GREEN MAGENTA RED WHITE YELLOW ) NLAYERS : NLayers = 11 ( 12 ) LAYERS : Layers = 10 110 111 121 131 2 3 5 51 7 9 ( 10 110 111 121 131 2 3 5 51 6 7 9 ) diff --git a/tests/de/iges_2/E9 b/tests/de/iges_2/E9 index cfd677df1b..e514e0ff43 100644 --- a/tests/de/iges_2/E9 +++ b/tests/de/iges_2/E9 @@ -13,7 +13,7 @@ TPSTAT : Faulties = 0 ( 0 ) Warnings = 8 ( 7 ) Summary = 8 ( 7 ) CHECKSHAPE : Wires = 1 ( 0 ) Faces = 1 ( 0 ) Shells = 0 ( 0 ) Solids = 0 ( 0 ) NBSHAPES : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 1480 ( 1479 ) STATSHAPE : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 1480 ( 1479 ) FreeWire = 0 ( 0 ) -TOLERANCE : MaxTol = 0.9794963919 ( 0.9794963919 ) AvgTol = 0.04036783943 ( 0.04038000265 ) +TOLERANCE : MaxTol = 0.9794963919 ( 0.9794963919 ) AvgTol = 0.04036783908 ( 0.04038000265 ) LABELS : N0Labels = 1 ( 1 ) N1Labels = 0 ( 0 ) N2Labels = 0 ( 0 ) TotalLabels = 1 ( 1 ) NameLabels = 1 ( 1 ) ColorLabels = 0 ( 0 ) LayerLabels = 0 ( 0 ) PROPS : Centroid = 0 ( 0 ) Volume = 0 ( 0 ) Area = 0 ( 0 ) NCOLORS : NColors = 0 ( 0 ) diff --git a/tests/de/iges_2/F1 b/tests/de/iges_2/F1 index e9cd002b01..f6b1790343 100755 --- a/tests/de/iges_2/F1 +++ b/tests/de/iges_2/F1 @@ -13,8 +13,8 @@ TPSTAT : Faulties = 44 ( 0 ) Warnings = 405 ( 1296 ) Summary = 449 ( CHECKSHAPE : Wires = 0 ( 0 ) Faces = 1 ( 1 ) Shells = 0 ( 0 ) Solids = 0 ( 0 ) NBSHAPES : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 270 ( 270 ) STATSHAPE : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 270 ( 270 ) FreeWire = 108 ( 108 ) -TOLERANCE : MaxTol = 2.113937626e+017 ( 2.113937968e+017 ) AvgTol = 9.737589861e+013 ( 9.762248147e+013 ) -LABELS : N0Labels = 7 ( 7 ) N1Labels = 450 ( 2042 ) N2Labels = 0 ( 0 ) TotalLabels = 457 ( 2049 ) NameLabels = 457 ( 698 ) ColorLabels = 450 ( 2043 ) LayerLabels = 449 ( 2042 ) +TOLERANCE : MaxTol = 2.113937626e+17 ( 2.113937968e+17 ) AvgTol = 9.737589861e+13 ( 9.762248147e+13 ) +LABELS : N0Labels = 7 ( 7 ) N1Labels = 450 ( 2375 ) N2Labels = 0 ( 0 ) TotalLabels = 457 ( 2382 ) NameLabels = 457 ( 698 ) ColorLabels = 450 ( 2376 ) LayerLabels = 449 ( 2375 ) PROPS : Centroid = 0 ( 0 ) Volume = 0 ( 0 ) Area = 0 ( 0 ) NCOLORS : NColors = 7 ( 7 ) COLORS : Colors = BLUE GREEN MAGENTA RED RED3 WHITE YELLOW ( BLUE GREEN MAGENTA RED RED3 WHITE YELLOW ) diff --git a/tests/de/iges_2/F2 b/tests/de/iges_2/F2 index 565bbfd334..09d41529bc 100755 --- a/tests/de/iges_2/F2 +++ b/tests/de/iges_2/F2 @@ -1,6 +1,5 @@ # !!!! This file is generated automatically, do not edit manually! See end script puts "TODO CR23096 ALL: LABELS : Faulty" -puts "TODO CR23096 ALL: COLORS : Faulty" puts "TODO CR23096 ALL: LAYERS : Faulty" @@ -12,11 +11,11 @@ TPSTAT : Faulties = 0 ( 369 ) Warnings = 24 ( 983 ) Summary = 24 ( 13 CHECKSHAPE : Wires = 0 ( 0 ) Faces = 0 ( 0 ) Shells = 0 ( 0 ) Solids = 0 ( 0 ) NBSHAPES : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 73 ( 73 ) STATSHAPE : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 73 ( 73 ) FreeWire = 409 ( 414 ) -TOLERANCE : MaxTol = 0.6679845366 ( 0.6679845366 ) AvgTol = 0.004409841859 ( 0.004584996449 ) -LABELS : N0Labels = 4 ( 7 ) N1Labels = 804 ( 1805 ) N2Labels = 0 ( 0 ) TotalLabels = 808 ( 1812 ) NameLabels = 744 ( 1292 ) ColorLabels = 804 ( 1802 ) LayerLabels = 272 ( 884 ) +TOLERANCE : MaxTol = 0.6679845366 ( 0.6679845366 ) AvgTol = 0.00440983996 ( 0.004584996449 ) +LABELS : N0Labels = 4 ( 7 ) N1Labels = 1000 ( 1924 ) N2Labels = 0 ( 0 ) TotalLabels = 1004 ( 1931 ) NameLabels = 740 ( 1288 ) ColorLabels = 1000 ( 1921 ) LayerLabels = 271 ( 983 ) PROPS : Centroid = 0 ( 0 ) Volume = 0 ( 0 ) Area = 0 ( 0 ) -NCOLORS : NColors = 6 ( 7 ) -COLORS : Colors = CYAN GREEN MAGENTA MAGENTA4 RED WHITE ( BLUE CYAN GREEN MAGENTA MAGENTA4 RED WHITE ) +NCOLORS : NColors = 7 ( 7 ) +COLORS : Colors = BLUE CYAN GREEN MAGENTA MAGENTA4 RED WHITE ( BLUE CYAN GREEN MAGENTA MAGENTA4 RED WHITE ) NLAYERS : NLayers = 7 ( 10 ) LAYERS : Layers = 200 214 240 255 4 51 7 ( 192 200 214 221 239 240 255 4 51 7 ) diff --git a/tests/de/iges_2/F3 b/tests/de/iges_2/F3 index 6c5248fd03..d2a1a34601 100755 --- a/tests/de/iges_2/F3 +++ b/tests/de/iges_2/F3 @@ -12,11 +12,11 @@ TPSTAT : Faulties = 0 ( 367 ) Warnings = 64 ( 1209 ) Summary = 64 ( 1 CHECKSHAPE : Wires = 0 ( 0 ) Faces = 0 ( 0 ) Shells = 0 ( 0 ) Solids = 0 ( 0 ) NBSHAPES : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 211 ( 211 ) STATSHAPE : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 211 ( 211 ) FreeWire = 255 ( 267 ) -TOLERANCE : MaxTol = 0.9498862984 ( 0.9498862984 ) AvgTol = 0.00820696295 ( 0.008218042456 ) -LABELS : N0Labels = 3 ( 6 ) N1Labels = 454 ( 1943 ) N2Labels = 0 ( 0 ) TotalLabels = 457 ( 1949 ) NameLabels = 393 ( 870 ) ColorLabels = 454 ( 1940 ) LayerLabels = 450 ( 1923 ) +TOLERANCE : MaxTol = 0.9498862984 ( 0.9498862984 ) AvgTol = 0.008206959878 ( 0.008218042456 ) +LABELS : N0Labels = 3 ( 6 ) N1Labels = 487 ( 2305 ) N2Labels = 0 ( 0 ) TotalLabels = 490 ( 2311 ) NameLabels = 381 ( 858 ) ColorLabels = 487 ( 2302 ) LayerLabels = 438 ( 2285 ) PROPS : Centroid = 0 ( 0 ) Volume = 0 ( 0 ) Area = 0 ( 0 ) -NCOLORS : NColors = 5 ( 7 ) -COLORS : Colors = CYAN GREEN MAGENTA RED WHITE ( BLUE CYAN GREEN MAGENTA RED WHITE YELLOW ) +NCOLORS : NColors = 6 ( 7 ) +COLORS : Colors = BLUE CYAN GREEN MAGENTA RED WHITE ( BLUE CYAN GREEN MAGENTA RED WHITE YELLOW ) NLAYERS : NLayers = 4 ( 6 ) LAYERS : Layers = 200 240 255 4 ( 192 200 239 240 255 4 ) diff --git a/tests/de/iges_2/F4 b/tests/de/iges_2/F4 index e4c24b7f81..1a3d71c432 100755 --- a/tests/de/iges_2/F4 +++ b/tests/de/iges_2/F4 @@ -12,8 +12,8 @@ TPSTAT : Faulties = 30 ( 36 ) Warnings = 599 ( 1854 ) Summary = 629 ( CHECKSHAPE : Wires = 5 ( 6 ) Faces = 5 ( 6 ) Shells = 0 ( 0 ) Solids = 0 ( 0 ) NBSHAPES : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 3499 ( 3499 ) STATSHAPE : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 3499 ( 3499 ) FreeWire = 0 ( 0 ) -TOLERANCE : MaxTol = 0.9816000285 ( 5.284023931 ) AvgTol = 0.02484144483 ( 0.02770136168 ) -LABELS : N0Labels = 12 ( 32 ) N1Labels = 3661 ( 3676 ) N2Labels = 0 ( 0 ) TotalLabels = 3673 ( 3708 ) NameLabels = 12 ( 3696 ) ColorLabels = 3661 ( 3672 ) LayerLabels = 0 ( 0 ) +TOLERANCE : MaxTol = 0.9816000285 ( 5.284023931 ) AvgTol = 0.02484144483 ( 0.02770132808 ) +LABELS : N0Labels = 12 ( 32 ) N1Labels = 3758 ( 12361 ) N2Labels = 0 ( 0 ) TotalLabels = 3770 ( 12393 ) NameLabels = 12 ( 3696 ) ColorLabels = 3758 ( 12357 ) LayerLabels = 0 ( 0 ) PROPS : Centroid = 0 ( 0 ) Volume = 0 ( 0 ) Area = 0 ( 0 ) NCOLORS : NColors = 10 ( 11 ) COLORS : Colors = BLUE DEEPSKYBLUE2 DODGERBLUE2 GREEN MAGENTA ORANGE ORANGERED RED TURQUOISE4 WHITE ( BLUE DEEPSKYBLUE2 DODGERBLUE2 GREEN MAGENTA ORANGE ORANGERED RED TURQUOISE4 WHITE YELLOW ) diff --git a/tests/de/iges_2/F5 b/tests/de/iges_2/F5 index da0abdaba0..2d11bed8a0 100755 --- a/tests/de/iges_2/F5 +++ b/tests/de/iges_2/F5 @@ -13,8 +13,8 @@ TPSTAT : Faulties = 6 ( 126 ) Warnings = 18 ( 676 ) Summary = 24 ( 80 CHECKSHAPE : Wires = 0 ( 0 ) Faces = 0 ( 0 ) Shells = 0 ( 0 ) Solids = 0 ( 0 ) NBSHAPES : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 91 ( 91 ) STATSHAPE : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 91 ( 91 ) FreeWire = 304 ( 372 ) -TOLERANCE : MaxTol = 0.0779303086 ( 0.07793030858 ) AvgTol = 6.708091639e-005 ( 0.0001034077705 ) -LABELS : N0Labels = 4 ( 39 ) N1Labels = 2431 ( 4252 ) N2Labels = 0 ( 0 ) TotalLabels = 2435 ( 4291 ) NameLabels = 2357 ( 2885 ) ColorLabels = 2431 ( 4217 ) LayerLabels = 220 ( 515 ) +TOLERANCE : MaxTol = 0.0779303086 ( 0.07793030858 ) AvgTol = 6.707077371e-05 ( 0.0001034077705 ) +LABELS : N0Labels = 4 ( 39 ) N1Labels = 2577 ( 4193 ) N2Labels = 0 ( 0 ) TotalLabels = 2581 ( 4232 ) NameLabels = 2199 ( 2722 ) ColorLabels = 2577 ( 4158 ) LayerLabels = 96 ( 464 ) PROPS : Centroid = 0 ( 0 ) Volume = 0 ( 0 ) Area = 0 ( 0 ) NCOLORS : NColors = 6 ( 7 ) COLORS : Colors = BLUE GREEN MAGENTA RED WHITE YELLOW ( BLUE CYAN GREEN MAGENTA RED WHITE YELLOW ) diff --git a/tests/de/iges_2/F6 b/tests/de/iges_2/F6 index e4ff862a15..afbedadbc6 100755 --- a/tests/de/iges_2/F6 +++ b/tests/de/iges_2/F6 @@ -12,8 +12,8 @@ TPSTAT : Faulties = 0 ( 146 ) Warnings = 0 ( 153 ) Summary = 0 ( 299 CHECKSHAPE : Wires = 0 ( 0 ) Faces = 0 ( 0 ) Shells = 0 ( 0 ) Solids = 0 ( 0 ) NBSHAPES : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 0 ( 0 ) STATSHAPE : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 0 ( 0 ) FreeWire = 7 ( 7 ) -TOLERANCE : MaxTol = 1e-007 ( 1e-007 ) AvgTol = 1e-007 ( 1e-007 ) -LABELS : N0Labels = 5 ( 17 ) N1Labels = 284 ( 298 ) N2Labels = 0 ( 0 ) TotalLabels = 289 ( 315 ) NameLabels = 5 ( 28 ) ColorLabels = 284 ( 309 ) LayerLabels = 0 ( 309 ) +TOLERANCE : MaxTol = 1e-07 ( 1e-07 ) AvgTol = 1e-07 ( 1e-07 ) +LABELS : N0Labels = 5 ( 17 ) N1Labels = 291 ( 298 ) N2Labels = 0 ( 0 ) TotalLabels = 296 ( 315 ) NameLabels = 5 ( 28 ) ColorLabels = 291 ( 309 ) LayerLabels = 0 ( 309 ) PROPS : Centroid = 0 ( 0 ) Volume = 0 ( 0 ) Area = 0 ( 0 ) NCOLORS : NColors = 2 ( 5 ) COLORS : Colors = RED WHITE ( CYAN GREEN RED WHITE YELLOW ) diff --git a/tests/de/iges_2/F7 b/tests/de/iges_2/F7 index 06fc384985..69d54fd8e4 100644 --- a/tests/de/iges_2/F7 +++ b/tests/de/iges_2/F7 @@ -12,8 +12,8 @@ TPSTAT : Faulties = 0 ( 6 ) Warnings = 1 ( 6 ) Summary = 1 ( 12 ) CHECKSHAPE : Wires = 6 ( 3 ) Faces = 6 ( 3 ) Shells = 0 ( 0 ) Solids = 0 ( 0 ) NBSHAPES : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 114 ( 114 ) STATSHAPE : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 114 ( 114 ) FreeWire = 2 ( 2 ) -TOLERANCE : MaxTol = 1380.000139 ( 0.0004988991064 ) AvgTol = 2.59888767 ( 2.124164932e-005 ) -LABELS : N0Labels = 122 ( 122 ) N1Labels = 0 ( 0 ) N2Labels = 0 ( 0 ) TotalLabels = 122 ( 122 ) NameLabels = 122 ( 122 ) ColorLabels = 120 ( 122 ) LayerLabels = 0 ( 0 ) +TOLERANCE : MaxTol = 1380.000139 ( 0.0004988991064 ) AvgTol = 2.59888767 ( 2.124164932e-05 ) +LABELS : N0Labels = 122 ( 122 ) N1Labels = 1 ( 1 ) N2Labels = 0 ( 0 ) TotalLabels = 123 ( 123 ) NameLabels = 122 ( 122 ) ColorLabels = 121 ( 123 ) LayerLabels = 0 ( 0 ) PROPS : Centroid = 0 ( 0 ) Volume = 0 ( 0 ) Area = 0 ( 0 ) NCOLORS : NColors = 4 ( 4 ) COLORS : Colors = BLACK LIGHTSTEELBLUE1 PALEGOLDENROD WHITE ( BLACK LIGHTSTEELBLUE1 PALEGOLDENROD WHITE ) diff --git a/tests/de/iges_2/F8 b/tests/de/iges_2/F8 index 103ed61ff6..d50d99960e 100755 --- a/tests/de/iges_2/F8 +++ b/tests/de/iges_2/F8 @@ -14,7 +14,7 @@ CHECKSHAPE : Wires = 0 ( 0 ) Faces = 0 ( 0 ) Shells = 0 ( 0 ) So NBSHAPES : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 107 ( 107 ) STATSHAPE : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 107 ( 107 ) FreeWire = 9 ( 9 ) TOLERANCE : MaxTol = 0.07760384877 ( 0.07760384877 ) AvgTol = 0.001993343793 ( 0.002045379681 ) -LABELS : N0Labels = 19 ( 19 ) N1Labels = 347 ( 612 ) N2Labels = 0 ( 0 ) TotalLabels = 366 ( 631 ) NameLabels = 366 ( 433 ) ColorLabels = 357 ( 629 ) LayerLabels = 357 ( 629 ) +LABELS : N0Labels = 19 ( 19 ) N1Labels = 197 ( 695 ) N2Labels = 0 ( 0 ) TotalLabels = 216 ( 714 ) NameLabels = 214 ( 281 ) ColorLabels = 207 ( 712 ) LayerLabels = 205 ( 712 ) PROPS : Centroid = 0 ( 0 ) Volume = 0 ( 0 ) Area = 0 ( 0 ) NCOLORS : NColors = 5 ( 6 ) COLORS : Colors = BLUE GREEN MAGENTA2 WHITE YELLOW ( BLUE GREEN MAGENTA2 RED WHITE YELLOW ) diff --git a/tests/de/iges_2/F9 b/tests/de/iges_2/F9 index 2acfc66642..6929c05c86 100644 --- a/tests/de/iges_2/F9 +++ b/tests/de/iges_2/F9 @@ -11,9 +11,9 @@ DATA : Faulties = 0 ( 1 ) Warnings = 0 ( 0 ) Summary = 0 ( 1 ) TPSTAT : Faulties = 0 ( 2 ) Warnings = 310 ( 2179 ) Summary = 310 ( 2181 ) CHECKSHAPE : Wires = 0 ( 3 ) Faces = 0 ( 3 ) Shells = 0 ( 0 ) Solids = 0 ( 0 ) NBSHAPES : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 1457 ( 1455 ) -STATSHAPE : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 1457 ( 1455 ) FreeWire = 516 ( 528 ) -TOLERANCE : MaxTol = 0.3053256329 ( 0.4653265763 ) AvgTol = 0.0008083715719 ( 0.0008564004 ) -LABELS : N0Labels = 5 ( 5 ) N1Labels = 5689 ( 14639 ) N2Labels = 0 ( 0 ) TotalLabels = 5694 ( 14644 ) NameLabels = 5694 ( 7040 ) ColorLabels = 5689 ( 14643 ) LayerLabels = 5689 ( 14643 ) +STATSHAPE : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 1457 ( 1455 ) FreeWire = 516 ( 540 ) +TOLERANCE : MaxTol = 0.3053256329 ( 0.4653265763 ) AvgTol = 0.0008083596177 ( 0.0008564004 ) +LABELS : N0Labels = 5 ( 5 ) N1Labels = 2121 ( 11722 ) N2Labels = 0 ( 0 ) TotalLabels = 2126 ( 11727 ) NameLabels = 1614 ( 2894 ) ColorLabels = 2121 ( 11726 ) LayerLabels = 1609 ( 11726 ) PROPS : Centroid = 0 ( 0 ) Volume = 0 ( 0 ) Area = 0 ( 0 ) NCOLORS : NColors = 2 ( 2 ) COLORS : Colors = TURQUOISE WHITE ( TURQUOISE WHITE ) diff --git a/tests/de/iges_2/G1 b/tests/de/iges_2/G1 index 124680ac08..012652fefe 100755 --- a/tests/de/iges_2/G1 +++ b/tests/de/iges_2/G1 @@ -4,16 +4,17 @@ puts "TODO CR23096 ALL: CHECKSHAPE : Faulty" puts "TODO CR23096 ALL: NBSHAPES : Faulty" puts "TODO CR23096 ALL: LABELS : Faulty" + set filename Henri.igs set ref_data { DATA : Faulties = 0 ( 0 ) Warnings = 0 ( 0 ) Summary = 0 ( 0 ) -TPSTAT : Faulties = 0 ( 0 ) Warnings = 72 ( 54 ) Summary = 72 ( 54 ) +TPSTAT : Faulties = 0 ( 0 ) Warnings = 69 ( 54 ) Summary = 69 ( 54 ) CHECKSHAPE : Wires = 8 ( 3 ) Faces = 8 ( 3 ) Shells = 0 ( 0 ) Solids = 0 ( 0 ) NBSHAPES : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 3592 ( 2312 ) -STATSHAPE : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 3592 ( 3592 ) FreeWire = 4024 ( 4024 ) -TOLERANCE : MaxTol = 0.9133007093 ( 0.9133008813 ) AvgTol = 0.005631548694 ( 0.005952104345 ) -LABELS : N0Labels = 24 ( 24 ) N1Labels = 5153 ( 6559 ) N2Labels = 0 ( 0 ) TotalLabels = 5177 ( 6583 ) NameLabels = 5177 ( 6583 ) ColorLabels = 5153 ( 6559 ) LayerLabels = 0 ( 0 ) +STATSHAPE : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 3592 ( 3592 ) FreeWire = 4024 ( 6082 ) +TOLERANCE : MaxTol = 0.9133007093 ( 0.9133008813 ) AvgTol = 0.005631512248 ( 0.006706357817 ) +LABELS : N0Labels = 24 ( 24 ) N1Labels = 4094 ( 6591 ) N2Labels = 0 ( 0 ) TotalLabels = 4118 ( 6615 ) NameLabels = 4118 ( 5524 ) ColorLabels = 4094 ( 6591 ) LayerLabels = 0 ( 0 ) PROPS : Centroid = 0 ( 0 ) Volume = 0 ( 0 ) Area = 0 ( 0 ) NCOLORS : NColors = 6 ( 6 ) COLORS : Colors = ANTIQUEWHITE4 CHARTREUSE DARKORANGE2 GREENYELLOW STEELBLUE2 WHEAT3 ( ANTIQUEWHITE4 CHARTREUSE DARKORANGE2 GREENYELLOW STEELBLUE2 WHEAT3 ) diff --git a/tests/de/iges_2/G2 b/tests/de/iges_2/G2 index b20d62ad94..697ae2ed6a 100644 --- a/tests/de/iges_2/G2 +++ b/tests/de/iges_2/G2 @@ -12,8 +12,8 @@ TPSTAT : Faulties = 2 ( 0 ) Warnings = 170 ( 940 ) Summary = 172 ( 94 CHECKSHAPE : Wires = 8 ( 8 ) Faces = 5 ( 5 ) Shells = 0 ( 0 ) Solids = 0 ( 0 ) NBSHAPES : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 346 ( 346 ) STATSHAPE : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 346 ( 346 ) FreeWire = 84 ( 84 ) -TOLERANCE : MaxTol = 0.4314224119 ( 0.2157335194 ) AvgTol = 0.001277618654 ( 0.001254883151 ) -LABELS : N0Labels = 560 ( 560 ) N1Labels = 94 ( 90 ) N2Labels = 0 ( 0 ) TotalLabels = 654 ( 650 ) NameLabels = 648 ( 650 ) ColorLabels = 554 ( 640 ) LayerLabels = 554 ( 640 ) +TOLERANCE : MaxTol = 0.4314224119 ( 0.2157335194 ) AvgTol = 0.001277618614 ( 0.001254883151 ) +LABELS : N0Labels = 560 ( 560 ) N1Labels = 150 ( 90 ) N2Labels = 0 ( 0 ) TotalLabels = 710 ( 650 ) NameLabels = 648 ( 650 ) ColorLabels = 610 ( 640 ) LayerLabels = 554 ( 640 ) PROPS : Centroid = 0 ( 0 ) Volume = 0 ( 0 ) Area = 0 ( 0 ) NCOLORS : NColors = 3 ( 3 ) COLORS : Colors = CYAN GREEN RED ( CYAN GREEN RED ) diff --git a/tests/de/iges_2/G3 b/tests/de/iges_2/G3 index 3aa2940fc6..c0af1086e3 100644 --- a/tests/de/iges_2/G3 +++ b/tests/de/iges_2/G3 @@ -11,7 +11,7 @@ TPSTAT : Faulties = 0 ( 0 ) Warnings = 58 ( 135 ) Summary = 58 ( 135 CHECKSHAPE : Wires = 0 ( 0 ) Faces = 0 ( 0 ) Shells = 0 ( 0 ) Solids = 0 ( 0 ) NBSHAPES : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 783 ( 783 ) STATSHAPE : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 783 ( 783 ) FreeWire = 0 ( 0 ) -TOLERANCE : MaxTol = 1e-007 ( 1e-007 ) AvgTol = 1e-007 ( 1e-007 ) +TOLERANCE : MaxTol = 1e-07 ( 1e-07 ) AvgTol = 1e-07 ( 1e-07 ) LABELS : N0Labels = 784 ( 784 ) N1Labels = 0 ( 0 ) N2Labels = 0 ( 0 ) TotalLabels = 784 ( 784 ) NameLabels = 784 ( 784 ) ColorLabels = 783 ( 784 ) LayerLabels = 783 ( 784 ) PROPS : Centroid = 0 ( 0 ) Volume = 0 ( 0 ) Area = 0 ( 0 ) NCOLORS : NColors = 1 ( 2 ) diff --git a/tests/de/iges_2/G5 b/tests/de/iges_2/G5 index 1c13348135..9f26f44263 100644 --- a/tests/de/iges_2/G5 +++ b/tests/de/iges_2/G5 @@ -11,8 +11,8 @@ TPSTAT : Faulties = 0 ( 0 ) Warnings = 43 ( 1740 ) Summary = 43 ( 174 CHECKSHAPE : Wires = 7 ( 7 ) Faces = 7 ( 7 ) Shells = 0 ( 0 ) Solids = 0 ( 0 ) NBSHAPES : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 1424 ( 1424 ) STATSHAPE : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 1424 ( 1424 ) FreeWire = 23 ( 23 ) -TOLERANCE : MaxTol = 0.01698924283 ( 0.03769875288 ) AvgTol = 0.0002758460767 ( 0.0003813154776 ) -LABELS : N0Labels = 1784 ( 1784 ) N1Labels = 0 ( 1660 ) N2Labels = 0 ( 0 ) TotalLabels = 1784 ( 3444 ) NameLabels = 1784 ( 1784 ) ColorLabels = 1761 ( 3444 ) LayerLabels = 1761 ( 1784 ) +TOLERANCE : MaxTol = 0.01698924283 ( 0.03769875288 ) AvgTol = 0.0002758462031 ( 0.0003813005409 ) +LABELS : N0Labels = 1784 ( 1784 ) N1Labels = 23 ( 8694 ) N2Labels = 0 ( 0 ) TotalLabels = 1807 ( 10478 ) NameLabels = 1784 ( 1784 ) ColorLabels = 1784 ( 10478 ) LayerLabels = 1761 ( 5183 ) PROPS : Centroid = 0 ( 0 ) Volume = 0 ( 0 ) Area = 0 ( 0 ) NCOLORS : NColors = 7 ( 8 ) COLORS : Colors = BLUE CYAN GREEN MAGENTA RED WHITE YELLOW ( BLACK BLUE CYAN GREEN MAGENTA RED WHITE YELLOW ) diff --git a/tests/de/iges_2/G6 b/tests/de/iges_2/G6 index 56dc17e0ba..e4fcd65b34 100644 --- a/tests/de/iges_2/G6 +++ b/tests/de/iges_2/G6 @@ -11,7 +11,7 @@ TPSTAT : Faulties = 0 ( 0 ) Warnings = 33 ( 8228 ) Summary = 33 ( 822 CHECKSHAPE : Wires = 0 ( 0 ) Faces = 0 ( 0 ) Shells = 0 ( 0 ) Solids = 0 ( 0 ) NBSHAPES : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 127 ( 127 ) STATSHAPE : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 127 ( 127 ) FreeWire = 8189 ( 8189 ) -TOLERANCE : MaxTol = 1e-007 ( 1e-007 ) AvgTol = 1e-007 ( 1e-007 ) +TOLERANCE : MaxTol = 1e-07 ( 1e-07 ) AvgTol = 1e-07 ( 1e-07 ) LABELS : N0Labels = 42695 ( 42695 ) N1Labels = 0 ( 0 ) N2Labels = 0 ( 0 ) TotalLabels = 42695 ( 42695 ) NameLabels = 42695 ( 42695 ) ColorLabels = 0 ( 0 ) LayerLabels = 33059 ( 42695 ) PROPS : Centroid = 0 ( 0 ) Volume = 0 ( 0 ) Area = 0 ( 0 ) NCOLORS : NColors = 0 ( 0 ) diff --git a/tests/de/iges_2/G7 b/tests/de/iges_2/G7 index 6155cdf9f1..be3b2e40d3 100644 --- a/tests/de/iges_2/G7 +++ b/tests/de/iges_2/G7 @@ -14,8 +14,8 @@ TPSTAT : Faulties = 0 ( 0 ) Warnings = 83 ( 1468 ) Summary = 83 ( 146 CHECKSHAPE : Wires = 2 ( 0 ) Faces = 2 ( 1 ) Shells = 0 ( 0 ) Solids = 0 ( 0 ) NBSHAPES : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 1569 ( 1568 ) STATSHAPE : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 1569 ( 1568 ) FreeWire = 0 ( 14 ) -TOLERANCE : MaxTol = 0.9978911708 ( 0.9978911666 ) AvgTol = 0.01213233025 ( 0.01215982172 ) -LABELS : N0Labels = 1 ( 1 ) N1Labels = 1596 ( 5187 ) N2Labels = 0 ( 0 ) TotalLabels = 1597 ( 5188 ) NameLabels = 1597 ( 2711 ) ColorLabels = 1596 ( 5187 ) LayerLabels = 1596 ( 5187 ) +TOLERANCE : MaxTol = 0.9978911708 ( 0.9978911666 ) AvgTol = 0.01212120142 ( 0.01214370912 ) +LABELS : N0Labels = 1 ( 1 ) N1Labels = 1582 ( 9402 ) N2Labels = 0 ( 0 ) TotalLabels = 1583 ( 9403 ) NameLabels = 1583 ( 2697 ) ColorLabels = 1582 ( 9402 ) LayerLabels = 1582 ( 9402 ) PROPS : Centroid = 0 ( 0 ) Volume = 0 ( 0 ) Area = 0 ( 0 ) NCOLORS : NColors = 2 ( 7 ) COLORS : Colors = BLUE WHITE ( BLUE CYAN GREEN MAGENTA RED WHITE YELLOW ) diff --git a/tests/de/iges_2/G8 b/tests/de/iges_2/G8 index eb408ac2f2..c1a2f6f4fb 100644 --- a/tests/de/iges_2/G8 +++ b/tests/de/iges_2/G8 @@ -13,7 +13,7 @@ CHECKSHAPE : Wires = 0 ( 0 ) Faces = 0 ( 0 ) Shells = 0 ( 0 ) So NBSHAPES : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 253 ( 253 ) STATSHAPE : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 253 ( 253 ) FreeWire = 7 ( 10 ) TOLERANCE : MaxTol = 0.04838312754 ( 0.0483782783 ) AvgTol = 0.002925043567 ( 0.002891369257 ) -LABELS : N0Labels = 8 ( 8 ) N1Labels = 269 ( 2700 ) N2Labels = 0 ( 0 ) TotalLabels = 277 ( 2708 ) NameLabels = 277 ( 384 ) ColorLabels = 272 ( 2706 ) LayerLabels = 272 ( 2706 ) +LABELS : N0Labels = 8 ( 8 ) N1Labels = 273 ( 2703 ) N2Labels = 0 ( 0 ) TotalLabels = 281 ( 2711 ) NameLabels = 277 ( 384 ) ColorLabels = 276 ( 2709 ) LayerLabels = 274 ( 2709 ) PROPS : Centroid = 0 ( 0 ) Volume = 0 ( 0 ) Area = 0 ( 0 ) NCOLORS : NColors = 3 ( 4 ) COLORS : Colors = BLUE WHITE YELLOW ( BLUE GREEN WHITE YELLOW ) diff --git a/tests/de/iges_2/G9 b/tests/de/iges_2/G9 index 980629099a..731b5bf7c1 100755 --- a/tests/de/iges_2/G9 +++ b/tests/de/iges_2/G9 @@ -12,9 +12,9 @@ DATA : Faulties = 14 ( 0 ) Warnings = 0 ( 0 ) Summary = 14 ( 0 ) TPSTAT : Faulties = 28 ( 16 ) Warnings = 48 ( 3035 ) Summary = 76 ( 3051 ) CHECKSHAPE : Wires = 0 ( 0 ) Faces = 0 ( 0 ) Shells = 0 ( 0 ) Solids = 0 ( 0 ) NBSHAPES : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 2639 ( 2634 ) -STATSHAPE : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 2639 ( 2639 ) FreeWire = 1027 ( 1027 ) +STATSHAPE : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 2639 ( 2639 ) FreeWire = 1027 ( 1109 ) TOLERANCE : MaxTol = 0.05705560511 ( 0.05705560511 ) AvgTol = 0.0002633894999 ( 0.0002621190848 ) -LABELS : N0Labels = 54 ( 54 ) N1Labels = 10590 ( 27260 ) N2Labels = 0 ( 0 ) TotalLabels = 10644 ( 27314 ) NameLabels = 10644 ( 13414 ) ColorLabels = 10590 ( 27312 ) LayerLabels = 7 ( 18 ) +LABELS : N0Labels = 54 ( 54 ) N1Labels = 4920 ( 20380 ) N2Labels = 0 ( 0 ) TotalLabels = 4974 ( 20434 ) NameLabels = 3983 ( 6534 ) ColorLabels = 4920 ( 20432 ) LayerLabels = 6 ( 17 ) PROPS : Centroid = 0 ( 0 ) Volume = 0 ( 0 ) Area = 0 ( 0 ) NCOLORS : NColors = 8 ( 8 ) COLORS : Colors = BLUE CYAN GREEN GREEN3 MAGENTA RED WHITE YELLOW ( BLUE CYAN GREEN GREEN3 MAGENTA RED WHITE YELLOW ) diff --git a/tests/de/iges_2/H2 b/tests/de/iges_2/H2 index 920620c3d5..4b293f1bd6 100644 --- a/tests/de/iges_2/H2 +++ b/tests/de/iges_2/H2 @@ -1,6 +1,5 @@ # !!!! This file is generated automatically, do not edit manually! See end script puts "TODO CR23096 ALL: LABELS : Faulty" -puts "TODO CR23096 ALL: COLORS : Faulty" puts "TODO CR23096 ALL: LAYERS : Faulty" @@ -12,11 +11,11 @@ TPSTAT : Faulties = 0 ( 0 ) Warnings = 0 ( 139 ) Summary = 0 ( 139 ) CHECKSHAPE : Wires = 0 ( 0 ) Faces = 0 ( 0 ) Shells = 0 ( 0 ) Solids = 0 ( 0 ) NBSHAPES : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 0 ( 0 ) STATSHAPE : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 0 ( 0 ) FreeWire = 139 ( 139 ) -TOLERANCE : MaxTol = 1e-007 ( 1e-007 ) AvgTol = 1e-007 ( 1e-007 ) -LABELS : N0Labels = 139 ( 139 ) N1Labels = 0 ( 0 ) N2Labels = 0 ( 0 ) TotalLabels = 139 ( 139 ) NameLabels = 139 ( 139 ) ColorLabels = 0 ( 139 ) LayerLabels = 0 ( 139 ) +TOLERANCE : MaxTol = 1e-07 ( 1e-07 ) AvgTol = 1e-07 ( 1e-07 ) +LABELS : N0Labels = 139 ( 139 ) N1Labels = 139 ( 0 ) N2Labels = 0 ( 0 ) TotalLabels = 278 ( 139 ) NameLabels = 139 ( 139 ) ColorLabels = 139 ( 139 ) LayerLabels = 0 ( 139 ) PROPS : Centroid = 0 ( 0 ) Volume = 0 ( 0 ) Area = 0 ( 0 ) -NCOLORS : NColors = 0 ( 1 ) -COLORS : Colors = ( CYAN ) +NCOLORS : NColors = 1 ( 1 ) +COLORS : Colors = CYAN ( CYAN ) NLAYERS : NLayers = 0 ( 139 ) LAYERS : Layers = ( 10 100 101 102 103 104 105 106 107 108 109 11 110 111 112 113 114 115 116 117 118 119 12 120 121 122 123 124 125 126 127 128 129 13 130 131 132 133 134 135 136 137 138 139 14 140 15 16 17 18 19 2 20 21 22 23 24 25 26 27 28 29 3 30 31 32 33 34 35 36 37 38 39 4 40 41 42 43 44 45 46 47 48 49 5 50 51 52 53 54 55 56 57 58 59 6 60 61 62 63 64 65 66 67 68 69 7 70 71 72 73 74 75 76 77 78 79 8 80 81 82 83 84 85 86 87 88 89 9 90 91 92 93 94 95 96 97 98 99 ) diff --git a/tests/de/iges_2/H3 b/tests/de/iges_2/H3 index 933b88f554..ff40e7653d 100755 --- a/tests/de/iges_2/H3 +++ b/tests/de/iges_2/H3 @@ -14,11 +14,11 @@ CHECKSHAPE : Wires = 0 ( 0 ) Faces = 0 ( 0 ) Shells = 0 ( 0 ) So NBSHAPES : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 159 ( 159 ) STATSHAPE : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 159 ( 159 ) FreeWire = 189 ( 284 ) TOLERANCE : MaxTol = 0.6023944505 ( 0.6023945025 ) AvgTol = 0.007298259627 ( 0.008822195946 ) -LABELS : N0Labels = 8 ( 11 ) N1Labels = 949 ( 1809 ) N2Labels = 0 ( 0 ) TotalLabels = 957 ( 1820 ) NameLabels = 955 ( 1263 ) ColorLabels = 949 ( 1807 ) LayerLabels = 917 ( 1774 ) +LABELS : N0Labels = 8 ( 11 ) N1Labels = 959 ( 2069 ) N2Labels = 0 ( 0 ) TotalLabels = 967 ( 2080 ) NameLabels = 797 ( 1105 ) ColorLabels = 959 ( 2067 ) LayerLabels = 780 ( 2034 ) PROPS : Centroid = 0 ( 0 ) Volume = 0 ( 0 ) Area = 0 ( 0 ) NCOLORS : NColors = 12 ( 14 ) COLORS : Colors = BLUE CHOCOLATE2 DARKGOLDENROD4 DEEPSKYBLUE2 GOLD4 GREEN KHAKI1 KHAKI2 LEMONCHIFFON1 RED WHITE YELLOW ( BLUE CHOCOLATE2 DARKGOLDENROD4 DEEPSKYBLUE2 FIREBRICK4 GOLD4 GREEN KHAKI1 KHAKI2 LEMONCHIFFON1 RED TURQUOISE4 WHITE YELLOW ) -NLAYERS : NLayers = 10 ( 13 ) -LAYERS : Layers = 12 13 23 249 252 50 52 54 60 71 ( 12 13 23 244 246 249 252 50 52 54 60 70 71 ) +NLAYERS : NLayers = 11 ( 14 ) +LAYERS : Layers = 11 12 13 23 249 252 50 52 54 60 71 ( 11 12 13 23 244 246 249 252 50 52 54 60 70 71 ) } diff --git a/tests/de/iges_2/H4 b/tests/de/iges_2/H4 index 6b926c3cd0..8004aca500 100755 --- a/tests/de/iges_2/H4 +++ b/tests/de/iges_2/H4 @@ -1,7 +1,6 @@ # !!!! This file is generated automatically, do not edit manually! See end script puts "TODO CR23096 ALL: DATA : Faulty" puts "TODO CR23096 ALL: LABELS : Faulty" -puts "TODO CR23096 ALL: COLORS : Faulty" puts "TODO CR23096 ALL: LAYERS : Faulty" @@ -13,12 +12,12 @@ TPSTAT : Faulties = 16 ( 149 ) Warnings = 60 ( 1010 ) Summary = 76 ( CHECKSHAPE : Wires = 0 ( 0 ) Faces = 0 ( 1 ) Shells = 0 ( 0 ) Solids = 0 ( 0 ) NBSHAPES : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 124 ( 124 ) STATSHAPE : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 124 ( 124 ) FreeWire = 219 ( 254 ) -TOLERANCE : MaxTol = 0.9970503224 ( 0.9970502696 ) AvgTol = 0.01722883807 ( 0.02186287305 ) -LABELS : N0Labels = 9 ( 9 ) N1Labels = 896 ( 1691 ) N2Labels = 0 ( 0 ) TotalLabels = 905 ( 1700 ) NameLabels = 905 ( 1233 ) ColorLabels = 896 ( 1692 ) LayerLabels = 864 ( 1659 ) +TOLERANCE : MaxTol = 0.9970503224 ( 0.9970502696 ) AvgTol = 0.01722883745 ( 0.02186287305 ) +LABELS : N0Labels = 9 ( 9 ) N1Labels = 910 ( 1755 ) N2Labels = 0 ( 0 ) TotalLabels = 919 ( 1764 ) NameLabels = 722 ( 1050 ) ColorLabels = 910 ( 1756 ) LayerLabels = 683 ( 1723 ) PROPS : Centroid = 0 ( 0 ) Volume = 0 ( 0 ) Area = 0 ( 0 ) -NCOLORS : NColors = 6 ( 7 ) -COLORS : Colors = BLUE LEMONCHIFFON1 RED RED4 WHITE YELLOW ( BLUE GREEN LEMONCHIFFON1 RED RED4 WHITE YELLOW ) -NLAYERS : NLayers = 12 ( 16 ) -LAYERS : Layers = 11 12 13 20 249 252 50 52 54 55 60 71 ( 10 11 12 13 20 246 249 252 50 52 54 55 60 65 70 71 ) +NCOLORS : NColors = 7 ( 7 ) +COLORS : Colors = BLUE GREEN LEMONCHIFFON1 RED RED4 WHITE YELLOW ( BLUE GREEN LEMONCHIFFON1 RED RED4 WHITE YELLOW ) +NLAYERS : NLayers = 13 ( 16 ) +LAYERS : Layers = 11 12 13 20 249 252 50 52 54 55 60 65 71 ( 10 11 12 13 20 246 249 252 50 52 54 55 60 65 70 71 ) } diff --git a/tests/de/iges_2/H5 b/tests/de/iges_2/H5 index a396834c4d..6000cedf65 100755 --- a/tests/de/iges_2/H5 +++ b/tests/de/iges_2/H5 @@ -13,8 +13,8 @@ TPSTAT : Faulties = 2 ( 0 ) Warnings = 20 ( 335 ) Summary = 22 ( 335 CHECKSHAPE : Wires = 0 ( 0 ) Faces = 0 ( 0 ) Shells = 0 ( 0 ) Solids = 0 ( 0 ) NBSHAPES : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 149 ( 149 ) STATSHAPE : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 149 ( 149 ) FreeWire = 14 ( 14 ) -TOLERANCE : MaxTol = 0.7457094468 ( 0.7457094468 ) AvgTol = 0.02275001022 ( 0.02302998404 ) -LABELS : N0Labels = 2 ( 2 ) N1Labels = 164 ( 766 ) N2Labels = 0 ( 0 ) TotalLabels = 166 ( 768 ) NameLabels = 164 ( 259 ) ColorLabels = 164 ( 766 ) LayerLabels = 162 ( 764 ) +TOLERANCE : MaxTol = 0.7457094468 ( 0.7457094468 ) AvgTol = 0.02274997804 ( 0.02302998404 ) +LABELS : N0Labels = 2 ( 2 ) N1Labels = 167 ( 1008 ) N2Labels = 0 ( 0 ) TotalLabels = 169 ( 1010 ) NameLabels = 153 ( 248 ) ColorLabels = 167 ( 1008 ) LayerLabels = 151 ( 1006 ) PROPS : Centroid = 0 ( 0 ) Volume = 0 ( 0 ) Area = 0 ( 0 ) NCOLORS : NColors = 2 ( 3 ) COLORS : Colors = MAGENTA WHITE ( CYAN MAGENTA WHITE ) diff --git a/tests/de/iges_2/H6 b/tests/de/iges_2/H6 index 5f9f857a21..12d9d380ec 100755 --- a/tests/de/iges_2/H6 +++ b/tests/de/iges_2/H6 @@ -11,8 +11,8 @@ TPSTAT : Faulties = 0 ( 93 ) Warnings = 4 ( 129 ) Summary = 4 ( 222 ) CHECKSHAPE : Wires = 0 ( 0 ) Faces = 0 ( 0 ) Shells = 0 ( 0 ) Solids = 0 ( 0 ) NBSHAPES : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 4 ( 4 ) STATSHAPE : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 4 ( 4 ) FreeWire = 7 ( 7 ) -TOLERANCE : MaxTol = 1e-007 ( 1e-007 ) AvgTol = 1e-007 ( 1e-007 ) -LABELS : N0Labels = 5 ( 12 ) N1Labels = 106 ( 70 ) N2Labels = 0 ( 0 ) TotalLabels = 111 ( 82 ) NameLabels = 28 ( 82 ) ColorLabels = 106 ( 50 ) LayerLabels = 106 ( 49 ) +TOLERANCE : MaxTol = 1e-07 ( 1e-07 ) AvgTol = 1e-07 ( 1e-07 ) +LABELS : N0Labels = 5 ( 12 ) N1Labels = 113 ( 70 ) N2Labels = 0 ( 0 ) TotalLabels = 118 ( 82 ) NameLabels = 28 ( 82 ) ColorLabels = 113 ( 50 ) LayerLabels = 106 ( 49 ) PROPS : Centroid = 0 ( 0 ) Volume = 0 ( 0 ) Area = 0 ( 0 ) NCOLORS : NColors = 4 ( 5 ) COLORS : Colors = GOLD3 GREEN LIGHTSEAGREEN YELLOW ( GOLD3 GREEN LIGHTSEAGREEN RED YELLOW ) diff --git a/tests/de/iges_2/H7 b/tests/de/iges_2/H7 index edb7c373d6..50f2469a5d 100644 --- a/tests/de/iges_2/H7 +++ b/tests/de/iges_2/H7 @@ -13,7 +13,7 @@ CHECKSHAPE : Wires = 0 ( 0 ) Faces = 0 ( 0 ) Shells = 0 ( 0 ) So NBSHAPES : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 373 ( 373 ) STATSHAPE : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 373 ( 373 ) FreeWire = 1 ( 1 ) TOLERANCE : MaxTol = 0.5291749398 ( 0.5291749268 ) AvgTol = 0.008496021304 ( 0.00849604451 ) -LABELS : N0Labels = 1597 ( 1597 ) N1Labels = 0 ( 0 ) N2Labels = 0 ( 0 ) TotalLabels = 1597 ( 1597 ) NameLabels = 1597 ( 1597 ) ColorLabels = 1580 ( 1597 ) LayerLabels = 1580 ( 1597 ) +LABELS : N0Labels = 1597 ( 1597 ) N1Labels = 1 ( 1680 ) N2Labels = 0 ( 0 ) TotalLabels = 1598 ( 3277 ) NameLabels = 1597 ( 1597 ) ColorLabels = 1581 ( 3277 ) LayerLabels = 1580 ( 3277 ) PROPS : Centroid = 0 ( 0 ) Volume = 0 ( 0 ) Area = 0 ( 0 ) NCOLORS : NColors = 11 ( 12 ) COLORS : Colors = BURLYWOOD1 CHARTREUSE CYAN DARKORANGE GREEN KHAKI1 LIGHTSALMON1 LIGHTSTEELBLUE2 ORCHID1 WHITE YELLOW ( BURLYWOOD1 CHARTREUSE CYAN DARKORANGE DEEPSKYBLUE1 GREEN KHAKI1 LIGHTSALMON1 LIGHTSTEELBLUE2 ORCHID1 WHITE YELLOW ) diff --git a/tests/de/iges_2/H8 b/tests/de/iges_2/H8 index 36f928f872..2ae0ffce39 100644 --- a/tests/de/iges_2/H8 +++ b/tests/de/iges_2/H8 @@ -12,7 +12,7 @@ TPSTAT : Faulties = 0 ( 0 ) Warnings = 0 ( 0 ) Summary = 0 ( 0 ) CHECKSHAPE : Wires = 0 ( 0 ) Faces = 0 ( 0 ) Shells = 0 ( 0 ) Solids = 0 ( 0 ) NBSHAPES : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 1 ( 1 ) STATSHAPE : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 1 ( 1 ) FreeWire = 0 ( 0 ) -TOLERANCE : MaxTol = 1e-007 ( 1e-007 ) AvgTol = 1e-007 ( 1e-007 ) +TOLERANCE : MaxTol = 1e-07 ( 1e-07 ) AvgTol = 1e-07 ( 1e-07 ) LABELS : N0Labels = 5705 ( 5705 ) N1Labels = 0 ( 0 ) N2Labels = 0 ( 0 ) TotalLabels = 5705 ( 5705 ) NameLabels = 5705 ( 5705 ) ColorLabels = 4 ( 5705 ) LayerLabels = 0 ( 5700 ) PROPS : Centroid = 0 ( 0 ) Volume = 0 ( 0 ) Area = 0 ( 0 ) NCOLORS : NColors = 2 ( 3 ) diff --git a/tests/de/iges_2/H9 b/tests/de/iges_2/H9 index e66e62c1a0..e1e17aa967 100755 --- a/tests/de/iges_2/H9 +++ b/tests/de/iges_2/H9 @@ -3,6 +3,7 @@ puts "TODO CR23096 ALL: TOLERANCE : Faulty" puts "TODO CR23096 ALL: LABELS : Faulty" puts "TODO CR23096 ALL: COLORS : Faulty" + set filename coque-sup.igs set ref_data { @@ -11,8 +12,8 @@ TPSTAT : Faulties = 0 ( 2 ) Warnings = 1956 ( 4570 ) Summary = 1956 ( CHECKSHAPE : Wires = 1 ( 2 ) Faces = 3 ( 3 ) Shells = 0 ( 0 ) Solids = 0 ( 0 ) NBSHAPES : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 1628 ( 1628 ) STATSHAPE : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 1628 ( 1628 ) FreeWire = 22 ( 26 ) -TOLERANCE : MaxTol = 9.510579727e+086 ( 8.081584677e+086 ) AvgTol = 8.579374427e+082 ( 6.555234696e+083 ) -LABELS : N0Labels = 6 ( 6 ) N1Labels = 1643 ( 9836 ) N2Labels = 0 ( 0 ) TotalLabels = 1649 ( 9842 ) NameLabels = 1649 ( 2893 ) ColorLabels = 1645 ( 9841 ) LayerLabels = 489 ( 4144 ) +TOLERANCE : MaxTol = 9.510579727e+86 ( 8.081584677e+86 ) AvgTol = 8.579374427e+82 ( 6.555234696e+83 ) +LABELS : N0Labels = 6 ( 6 ) N1Labels = 1634 ( 12839 ) N2Labels = 0 ( 0 ) TotalLabels = 1640 ( 12845 ) NameLabels = 1635 ( 2879 ) ColorLabels = 1636 ( 12844 ) LayerLabels = 489 ( 4555 ) PROPS : Centroid = 0 ( 0 ) Volume = 0 ( 0 ) Area = 0 ( 0 ) NCOLORS : NColors = 4 ( 5 ) COLORS : Colors = BLUE CYAN GOLD3 GREEN ( BLUE CYAN GOLD3 GREEN YELLOW ) diff --git a/tests/de/iges_2/I1 b/tests/de/iges_2/I1 index 25e462adb7..8e1171e8a9 100644 --- a/tests/de/iges_2/I1 +++ b/tests/de/iges_2/I1 @@ -12,12 +12,12 @@ TPSTAT : Faulties = 0 ( 0 ) Warnings = 330 ( 1392 ) Summary = 330 ( 1 CHECKSHAPE : Wires = 0 ( 0 ) Faces = 0 ( 0 ) Shells = 0 ( 0 ) Solids = 0 ( 0 ) NBSHAPES : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 152 ( 152 ) STATSHAPE : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 152 ( 152 ) FreeWire = 305 ( 441 ) -TOLERANCE : MaxTol = 0.9892459055 ( 0.9892459128 ) AvgTol = 0.004744883275 ( 0.01318545034 ) -LABELS : N0Labels = 10 ( 10 ) N1Labels = 553 ( 1961 ) N2Labels = 0 ( 0 ) TotalLabels = 563 ( 1971 ) NameLabels = 563 ( 909 ) ColorLabels = 553 ( 1970 ) LayerLabels = 533 ( 1938 ) +TOLERANCE : MaxTol = 0.9892459055 ( 0.9892459128 ) AvgTol = 0.004743958393 ( 0.01318545018 ) +LABELS : N0Labels = 10 ( 10 ) N1Labels = 797 ( 2177 ) N2Labels = 0 ( 0 ) TotalLabels = 807 ( 2187 ) NameLabels = 563 ( 909 ) ColorLabels = 797 ( 2186 ) LayerLabels = 552 ( 2153 ) PROPS : Centroid = 0 ( 0 ) Volume = 0 ( 0 ) Area = 0 ( 0 ) NCOLORS : NColors = 6 ( 8 ) COLORS : Colors = BLACK BLUE GREEN RED WHITE YELLOW ( BLACK BLUE CYAN GREEN MAGENTA RED WHITE YELLOW ) -NLAYERS : NLayers = 11 ( 13 ) -LAYERS : Layers = 1 101 103 2 3 32 4 52 61 70 77 ( 1 101 102 103 2 3 30 32 4 52 61 70 77 ) +NLAYERS : NLayers = 11 ( 14 ) +LAYERS : Layers = 1 101 103 2 3 32 4 52 61 70 77 ( 1 101 102 103 2 3 30 32 4 51 52 61 70 77 ) } diff --git a/tests/de/iges_2/I2 b/tests/de/iges_2/I2 index 6233f68d4e..41cf07248e 100644 --- a/tests/de/iges_2/I2 +++ b/tests/de/iges_2/I2 @@ -12,7 +12,7 @@ TPSTAT : Faulties = 0 ( 0 ) Warnings = 10 ( 24 ) Summary = 10 ( 24 ) CHECKSHAPE : Wires = 0 ( 0 ) Faces = 0 ( 0 ) Shells = 0 ( 0 ) Solids = 0 ( 0 ) NBSHAPES : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 12 ( 12 ) STATSHAPE : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 12 ( 12 ) FreeWire = 0 ( 0 ) -TOLERANCE : MaxTol = 1e-005 ( 1e-005 ) AvgTol = 3.090234205e-007 ( 4.295805207e-006 ) +TOLERANCE : MaxTol = 1e-05 ( 1e-05 ) AvgTol = 3.011594576e-07 ( 4.295805207e-06 ) LABELS : N0Labels = 212 ( 212 ) N1Labels = 0 ( 72 ) N2Labels = 0 ( 0 ) TotalLabels = 212 ( 284 ) NameLabels = 212 ( 212 ) ColorLabels = 211 ( 284 ) LayerLabels = 211 ( 284 ) PROPS : Centroid = 0 ( 0 ) Volume = 0 ( 0 ) Area = 0 ( 0 ) NCOLORS : NColors = 4 ( 5 ) diff --git a/tests/de/iges_2/I3 b/tests/de/iges_2/I3 index 4fdf5d7275..d6f4c20f0f 100644 --- a/tests/de/iges_2/I3 +++ b/tests/de/iges_2/I3 @@ -13,11 +13,11 @@ TPSTAT : Faulties = 0 ( 0 ) Warnings = 19 ( 268 ) Summary = 19 ( 268 CHECKSHAPE : Wires = 0 ( 0 ) Faces = 0 ( 0 ) Shells = 0 ( 0 ) Solids = 0 ( 0 ) NBSHAPES : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 78 ( 78 ) STATSHAPE : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 78 ( 78 ) FreeWire = 75 ( 334 ) -TOLERANCE : MaxTol = 0.2587117061 ( 0.2578045038 ) AvgTol = 0.001366109261 ( 0.001652733346 ) -LABELS : N0Labels = 1 ( 1 ) N1Labels = 880 ( 1545 ) N2Labels = 0 ( 0 ) TotalLabels = 881 ( 1546 ) NameLabels = 881 ( 1008 ) ColorLabels = 880 ( 1545 ) LayerLabels = 858 ( 1518 ) +TOLERANCE : MaxTol = 0.2587117061 ( 0.2578045038 ) AvgTol = 0.001366109272 ( 0.001652733346 ) +LABELS : N0Labels = 1 ( 1 ) N1Labels = 521 ( 1435 ) N2Labels = 0 ( 0 ) TotalLabels = 522 ( 1436 ) NameLabels = 457 ( 584 ) ColorLabels = 521 ( 1435 ) LayerLabels = 453 ( 1408 ) PROPS : Centroid = 0 ( 0 ) Volume = 0 ( 0 ) Area = 0 ( 0 ) -NCOLORS : NColors = 5 ( 7 ) -COLORS : Colors = DODGERBLUE2 GREEN MAGENTA3 TURQUOISE2 WHITE ( DODGERBLUE2 GRAY80 GREEN MAGENTA3 TURQUOISE2 WHITE YELLOW3 ) +NCOLORS : NColors = 6 ( 7 ) +COLORS : Colors = DODGERBLUE2 GRAY80 GREEN MAGENTA3 TURQUOISE2 WHITE ( DODGERBLUE2 GRAY80 GREEN MAGENTA3 TURQUOISE2 WHITE YELLOW3 ) NLAYERS : NLayers = 8 ( 10 ) LAYERS : Layers = 1 10 12 13 16 19 4 5 ( 1 10 12 13 16 19 191 210 4 5 ) diff --git a/tests/de/iges_2/I4 b/tests/de/iges_2/I4 index 43904eca82..2a872cad96 100644 --- a/tests/de/iges_2/I4 +++ b/tests/de/iges_2/I4 @@ -12,8 +12,8 @@ TPSTAT : Faulties = 0 ( 0 ) Warnings = 0 ( 111 ) Summary = 0 ( 111 ) CHECKSHAPE : Wires = 0 ( 0 ) Faces = 0 ( 0 ) Shells = 0 ( 0 ) Solids = 0 ( 0 ) NBSHAPES : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 96 ( 96 ) STATSHAPE : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 96 ( 96 ) FreeWire = 14 ( 14 ) -TOLERANCE : MaxTol = 0.9808242672 ( 0.9808242374 ) AvgTol = 0.004978176876 ( 0.00497512858 ) -LABELS : N0Labels = 4 ( 4 ) N1Labels = 422 ( 771 ) N2Labels = 0 ( 0 ) TotalLabels = 426 ( 775 ) NameLabels = 426 ( 528 ) ColorLabels = 422 ( 771 ) LayerLabels = 422 ( 771 ) +TOLERANCE : MaxTol = 0.9808242672 ( 0.9808242374 ) AvgTol = 0.004978176887 ( 0.00497512858 ) +LABELS : N0Labels = 4 ( 4 ) N1Labels = 376 ( 781 ) N2Labels = 0 ( 0 ) TotalLabels = 380 ( 785 ) NameLabels = 367 ( 469 ) ColorLabels = 376 ( 781 ) LayerLabels = 363 ( 781 ) PROPS : Centroid = 0 ( 0 ) Volume = 0 ( 0 ) Area = 0 ( 0 ) NCOLORS : NColors = 6 ( 8 ) COLORS : Colors = BLUE GREEN3 RED TURQUOISE1 WHITE YELLOW ( BLUE GREEN3 GREEN4 MEDIUMORCHID RED TURQUOISE1 WHITE YELLOW ) diff --git a/tests/de/iges_2/I5 b/tests/de/iges_2/I5 index 89f0791656..024c2da15e 100755 --- a/tests/de/iges_2/I5 +++ b/tests/de/iges_2/I5 @@ -14,10 +14,10 @@ CHECKSHAPE : Wires = 0 ( 0 ) Faces = 0 ( 0 ) Shells = 0 ( 0 ) So NBSHAPES : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 854 ( 702 ) STATSHAPE : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 854 ( 854 ) FreeWire = 9 ( 31 ) TOLERANCE : MaxTol = 0.9589015104 ( 0.9589015104 ) AvgTol = 0.01827506851 ( 0.01834335655 ) -LABELS : N0Labels = 33 ( 33 ) N1Labels = 4502 ( 6695 ) N2Labels = 0 ( 0 ) TotalLabels = 4535 ( 6728 ) NameLabels = 4535 ( 4624 ) ColorLabels = 4522 ( 6715 ) LayerLabels = 4281 ( 6430 ) +LABELS : N0Labels = 33 ( 33 ) N1Labels = 4473 ( 6741 ) N2Labels = 0 ( 0 ) TotalLabels = 4506 ( 6774 ) NameLabels = 4497 ( 4586 ) ColorLabels = 4493 ( 6761 ) LayerLabels = 4275 ( 6496 ) PROPS : Centroid = 0 ( 0 ) Volume = 0 ( 0 ) Area = 0 ( 0 ) -NCOLORS : NColors = 8 ( 9 ) -COLORS : Colors = BLUE CYAN GREEN GREEN3 MAGENTA RED WHITE YELLOW ( BLUE CYAN GRAY80 GREEN GREEN3 MAGENTA RED WHITE YELLOW ) +NCOLORS : NColors = 7 ( 9 ) +COLORS : Colors = BLUE CYAN GREEN MAGENTA RED WHITE YELLOW ( BLUE CYAN GRAY80 GREEN GREEN3 MAGENTA RED WHITE YELLOW ) NLAYERS : NLayers = 6 ( 6 ) LAYERS : Layers = 10 200 201 3 40 45 ( 10 200 201 3 40 45 ) diff --git a/tests/de/iges_2/I6 b/tests/de/iges_2/I6 index 36d40f5303..05d13b2b33 100644 --- a/tests/de/iges_2/I6 +++ b/tests/de/iges_2/I6 @@ -13,10 +13,10 @@ CHECKSHAPE : Wires = 0 ( 0 ) Faces = 0 ( 0 ) Shells = 0 ( 0 ) So NBSHAPES : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 49 ( 49 ) STATSHAPE : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 49 ( 49 ) FreeWire = 146 ( 146 ) TOLERANCE : MaxTol = 0.03734358068 ( 0.03734358027 ) AvgTol = 0.0003219431442 ( 0.0003209232303 ) -LABELS : N0Labels = 1 ( 1 ) N1Labels = 158 ( 421 ) N2Labels = 0 ( 0 ) TotalLabels = 159 ( 422 ) NameLabels = 159 ( 334 ) ColorLabels = 158 ( 421 ) LayerLabels = 0 ( 96 ) +LABELS : N0Labels = 1 ( 1 ) N1Labels = 164 ( 421 ) N2Labels = 0 ( 0 ) TotalLabels = 165 ( 422 ) NameLabels = 159 ( 334 ) ColorLabels = 164 ( 421 ) LayerLabels = 0 ( 96 ) PROPS : Centroid = 0 ( 0 ) Volume = 0 ( 0 ) Area = 0 ( 0 ) -NCOLORS : NColors = 2 ( 4 ) -COLORS : Colors = MAGENTA YELLOW ( BLUE MAGENTA RED YELLOW ) +NCOLORS : NColors = 3 ( 4 ) +COLORS : Colors = MAGENTA RED YELLOW ( BLUE MAGENTA RED YELLOW ) NLAYERS : NLayers = 0 ( 1 ) LAYERS : Layers = ( 60 ) diff --git a/tests/de/iges_2/I7 b/tests/de/iges_2/I7 index 3f4ef19a88..a9924b1c16 100644 --- a/tests/de/iges_2/I7 +++ b/tests/de/iges_2/I7 @@ -1,7 +1,6 @@ # !!!! This file is generated automatically, do not edit manually! See end script puts "TODO CR23096 ALL: CHECKSHAPE : Faulty" puts "TODO CR23096 ALL: LABELS : Faulty" -puts "TODO CR23096 ALL: COLORS : Faulty" set filename ims016.igs @@ -13,10 +12,10 @@ CHECKSHAPE : Wires = 2 ( 0 ) Faces = 2 ( 0 ) Shells = 0 ( 0 ) So NBSHAPES : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 138 ( 138 ) STATSHAPE : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 138 ( 138 ) FreeWire = 6 ( 6 ) TOLERANCE : MaxTol = 0.2092687841 ( 0.2092687804 ) AvgTol = 0.001094782521 ( 0.0009882759182 ) -LABELS : N0Labels = 503 ( 503 ) N1Labels = 0 ( 200 ) N2Labels = 0 ( 0 ) TotalLabels = 503 ( 703 ) NameLabels = 503 ( 503 ) ColorLabels = 470 ( 703 ) LayerLabels = 313 ( 344 ) +LABELS : N0Labels = 503 ( 503 ) N1Labels = 36 ( 230 ) N2Labels = 0 ( 0 ) TotalLabels = 539 ( 733 ) NameLabels = 503 ( 503 ) ColorLabels = 506 ( 733 ) LayerLabels = 313 ( 344 ) PROPS : Centroid = 0 ( 0 ) Volume = 0 ( 0 ) Area = 0 ( 0 ) -NCOLORS : NColors = 6 ( 7 ) -COLORS : Colors = CYAN GREEN MAGENTA RED WHITE YELLOW ( BLACK CYAN GREEN MAGENTA RED WHITE YELLOW ) +NCOLORS : NColors = 7 ( 7 ) +COLORS : Colors = BLACK CYAN GREEN MAGENTA RED WHITE YELLOW ( BLACK CYAN GREEN MAGENTA RED WHITE YELLOW ) NLAYERS : NLayers = 8 ( 8 ) LAYERS : Layers = 1 101 102 103 104 106 107 200 ( 1 101 102 103 104 106 107 200 ) diff --git a/tests/de/iges_2/I8 b/tests/de/iges_2/I8 index 1b5c8f1f62..e1271cbd68 100755 --- a/tests/de/iges_2/I8 +++ b/tests/de/iges_2/I8 @@ -15,7 +15,7 @@ CHECKSHAPE : Wires = 0 ( 0 ) Faces = 0 ( 0 ) Shells = 0 ( 0 ) So NBSHAPES : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 186 ( 186 ) STATSHAPE : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 186 ( 186 ) FreeWire = 200 ( 290 ) TOLERANCE : MaxTol = 0.5957823778 ( 0.5957823778 ) AvgTol = 0.00246270621 ( 0.002802769554 ) -LABELS : N0Labels = 2 ( 2 ) N1Labels = 657 ( 1428 ) N2Labels = 0 ( 0 ) TotalLabels = 659 ( 1430 ) NameLabels = 659 ( 1008 ) ColorLabels = 657 ( 1428 ) LayerLabels = 440 ( 1106 ) +LABELS : N0Labels = 2 ( 2 ) N1Labels = 582 ( 1628 ) N2Labels = 0 ( 0 ) TotalLabels = 584 ( 1630 ) NameLabels = 384 ( 733 ) ColorLabels = 582 ( 1628 ) LayerLabels = 368 ( 1335 ) PROPS : Centroid = 0 ( 0 ) Volume = 0 ( 0 ) Area = 0 ( 0 ) NCOLORS : NColors = 9 ( 10 ) COLORS : Colors = BLUE BURLYWOOD1 CYAN DEEPSKYBLUE1 GREEN MAGENTA RED WHITE YELLOW ( BLUE BURLYWOOD1 CYAN DEEPSKYBLUE1 GREEN LEMONCHIFFON1 MAGENTA RED WHITE YELLOW ) diff --git a/tests/de/iges_2/I9 b/tests/de/iges_2/I9 index 4e4dd321ca..81fcfe09e2 100644 --- a/tests/de/iges_2/I9 +++ b/tests/de/iges_2/I9 @@ -13,8 +13,8 @@ TPSTAT : Faulties = 0 ( 201 ) Warnings = 12 ( 506 ) Summary = 12 ( 70 CHECKSHAPE : Wires = 1 ( 0 ) Faces = 1 ( 0 ) Shells = 0 ( 0 ) Solids = 0 ( 0 ) NBSHAPES : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 117 ( 117 ) STATSHAPE : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 117 ( 117 ) FreeWire = 60 ( 93 ) -TOLERANCE : MaxTol = 0.7859817704 ( 0.7859817704 ) AvgTol = 0.005734028784 ( 0.006595335419 ) -LABELS : N0Labels = 2 ( 2 ) N1Labels = 2639 ( 3369 ) N2Labels = 0 ( 0 ) TotalLabels = 2641 ( 3371 ) NameLabels = 2641 ( 2850 ) ColorLabels = 2639 ( 3369 ) LayerLabels = 2607 ( 3332 ) +TOLERANCE : MaxTol = 0.7859817704 ( 0.7859817704 ) AvgTol = 0.005734027954 ( 0.006595335419 ) +LABELS : N0Labels = 2 ( 2 ) N1Labels = 2484 ( 3290 ) N2Labels = 0 ( 0 ) TotalLabels = 2486 ( 3292 ) NameLabels = 2438 ( 2645 ) ColorLabels = 2484 ( 3290 ) LayerLabels = 2432 ( 3253 ) PROPS : Centroid = 0 ( 0 ) Volume = 0 ( 0 ) Area = 0 ( 0 ) NCOLORS : NColors = 7 ( 9 ) COLORS : Colors = CYAN DARKOLIVEGREEN2 GRAY67 LIGHTSKYBLUE1 MAGENTA3 MEDIUMPURPLE1 TAN1 ( CYAN DARKOLIVEGREEN2 GRAY67 HONEYDEW LIGHTSKYBLUE1 MAGENTA3 MEDIUMPURPLE1 PALETURQUOISE1 TAN1 ) diff --git a/tests/de/iges_2/J1 b/tests/de/iges_2/J1 index 40be648cf8..954e8da983 100644 --- a/tests/de/iges_2/J1 +++ b/tests/de/iges_2/J1 @@ -14,7 +14,7 @@ CHECKSHAPE : Wires = 0 ( 2 ) Faces = 0 ( 2 ) Shells = 0 ( 0 ) So NBSHAPES : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 636 ( 628 ) STATSHAPE : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 636 ( 628 ) FreeWire = 51 ( 87 ) TOLERANCE : MaxTol = 0.9940193324 ( 0.9940193324 ) AvgTol = 0.01619162226 ( 0.01618234278 ) -LABELS : N0Labels = 1 ( 1 ) N1Labels = 711 ( 11812 ) N2Labels = 0 ( 0 ) TotalLabels = 712 ( 11813 ) NameLabels = 708 ( 765 ) ColorLabels = 711 ( 11812 ) LayerLabels = 0 ( 0 ) +LABELS : N0Labels = 1 ( 1 ) N1Labels = 716 ( 11818 ) N2Labels = 0 ( 0 ) TotalLabels = 717 ( 11819 ) NameLabels = 662 ( 719 ) ColorLabels = 716 ( 11818 ) LayerLabels = 0 ( 0 ) PROPS : Centroid = 0 ( 0 ) Volume = 0 ( 0 ) Area = 0 ( 0 ) NCOLORS : NColors = 3 ( 5 ) COLORS : Colors = BLUE RED WHITE ( BLUE GREEN RED TURQUOISE2 WHITE ) diff --git a/tests/de/iges_3/A1 b/tests/de/iges_3/A1 index 1334bd0dd6..e80c2f7a37 100644 --- a/tests/de/iges_3/A1 +++ b/tests/de/iges_3/A1 @@ -13,11 +13,11 @@ TPSTAT : Faulties = 0 ( 0 ) Warnings = 1002 ( 2775 ) Summary = 1002 ( CHECKSHAPE : Wires = 2 ( 2 ) Faces = 4 ( 4 ) Shells = 0 ( 0 ) Solids = 0 ( 0 ) NBSHAPES : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 1127 ( 1125 ) STATSHAPE : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 1127 ( 1125 ) FreeWire = 26 ( 26 ) -TOLERANCE : MaxTol = 0.08512566596 ( 0.08512566591 ) AvgTol = 0.005308547569 ( 0.00530936624 ) -LABELS : N0Labels = 1155 ( 1155 ) N1Labels = 0 ( 1498 ) N2Labels = 0 ( 0 ) TotalLabels = 1155 ( 2653 ) NameLabels = 1155 ( 2265 ) ColorLabels = 1125 ( 2653 ) LayerLabels = 1125 ( 1125 ) +TOLERANCE : MaxTol = 0.08512566596 ( 0.08512566591 ) AvgTol = 0.005308549978 ( 0.00530936624 ) +LABELS : N0Labels = 1155 ( 1155 ) N1Labels = 25 ( 1498 ) N2Labels = 0 ( 0 ) TotalLabels = 1180 ( 2653 ) NameLabels = 1155 ( 2265 ) ColorLabels = 1150 ( 2653 ) LayerLabels = 1125 ( 1125 ) PROPS : Centroid = 0 ( 0 ) Volume = 0 ( 0 ) Area = 0 ( 0 ) -NCOLORS : NColors = 1 ( 4 ) -COLORS : Colors = GREEN ( GREEN MAGENTA RED YELLOW ) +NCOLORS : NColors = 3 ( 4 ) +COLORS : Colors = GREEN MAGENTA YELLOW ( GREEN MAGENTA RED YELLOW ) NLAYERS : NLayers = 2 ( 2 ) LAYERS : Layers = 16 18 ( 16 18 ) diff --git a/tests/de/iges_3/A2 b/tests/de/iges_3/A2 index a283bf5c6f..f55f13864e 100755 --- a/tests/de/iges_3/A2 +++ b/tests/de/iges_3/A2 @@ -17,8 +17,8 @@ TPSTAT : Faulties = 4 ( 33 ) Warnings = 391 ( 320 ) Summary = 395 ( 3 CHECKSHAPE : Wires = 1 ( 1 ) Faces = 3 ( 2 ) Shells = 0 ( 0 ) Solids = 0 ( 0 ) NBSHAPES : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 421 ( 159 ) STATSHAPE : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 421 ( 419 ) FreeWire = 66 ( 114 ) -TOLERANCE : MaxTol = 3.181671016 ( 2716.882548 ) AvgTol = 0.008547432223 ( 3.678737419 ) -LABELS : N0Labels = 3 ( 3 ) N1Labels = 325 ( 1841 ) N2Labels = 0 ( 0 ) TotalLabels = 328 ( 1844 ) NameLabels = 328 ( 425 ) ColorLabels = 325 ( 1841 ) LayerLabels = 193 ( 1576 ) +TOLERANCE : MaxTol = 1.590835832 ( 2716.882548 ) AvgTol = 0.006724915687 ( 3.678737419 ) +LABELS : N0Labels = 3 ( 3 ) N1Labels = 224 ( 1781 ) N2Labels = 0 ( 0 ) TotalLabels = 227 ( 1784 ) NameLabels = 215 ( 312 ) ColorLabels = 224 ( 1781 ) LayerLabels = 157 ( 1551 ) PROPS : Centroid = 0 ( 0 ) Volume = 0 ( 0 ) Area = 0 ( 0 ) NCOLORS : NColors = 6 ( 7 ) COLORS : Colors = GREEN MATRABLUE RED RED4 WHITE YELLOW ( GREEN MAGENTA MATRABLUE RED RED4 WHITE YELLOW ) diff --git a/tests/de/iges_3/A3 b/tests/de/iges_3/A3 index 4fe48b2974..1208331b30 100755 --- a/tests/de/iges_3/A3 +++ b/tests/de/iges_3/A3 @@ -14,11 +14,11 @@ TPSTAT : Faulties = 2 ( 0 ) Warnings = 15 ( 318 ) Summary = 17 ( 318 CHECKSHAPE : Wires = 0 ( 0 ) Faces = 0 ( 0 ) Shells = 0 ( 0 ) Solids = 0 ( 0 ) NBSHAPES : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 79 ( 79 ) STATSHAPE : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 79 ( 79 ) FreeWire = 79 ( 230 ) -TOLERANCE : MaxTol = 0.06847151261 ( 0.8635005927 ) AvgTol = 0.001341967645 ( 0.003542904808 ) -LABELS : N0Labels = 1 ( 1 ) N1Labels = 596 ( 1177 ) N2Labels = 0 ( 0 ) TotalLabels = 597 ( 1178 ) NameLabels = 597 ( 745 ) ColorLabels = 596 ( 1177 ) LayerLabels = 577 ( 1158 ) +TOLERANCE : MaxTol = 0.06847151261 ( 0.8635005927 ) AvgTol = 0.001341967636 ( 0.003542904808 ) +LABELS : N0Labels = 1 ( 1 ) N1Labels = 358 ( 1049 ) N2Labels = 0 ( 0 ) TotalLabels = 359 ( 1050 ) NameLabels = 288 ( 434 ) ColorLabels = 358 ( 1049 ) LayerLabels = 283 ( 1039 ) PROPS : Centroid = 0 ( 0 ) Volume = 0 ( 0 ) Area = 0 ( 0 ) -NCOLORS : NColors = 5 ( 7 ) -COLORS : Colors = DODGERBLUE2 GREEN MAGENTA3 TURQUOISE2 WHITE ( DODGERBLUE2 GRAY80 GREEN MAGENTA3 TURQUOISE2 WHITE YELLOW3 ) +NCOLORS : NColors = 6 ( 7 ) +COLORS : Colors = DODGERBLUE2 GRAY80 GREEN MAGENTA3 TURQUOISE2 WHITE ( DODGERBLUE2 GRAY80 GREEN MAGENTA3 TURQUOISE2 WHITE YELLOW3 ) NLAYERS : NLayers = 8 ( 10 ) LAYERS : Layers = 1 10 13 16 19 31 4 5 ( 1 10 13 16 19 191 210 31 4 5 ) diff --git a/tests/de/iges_3/A4 b/tests/de/iges_3/A4 index 77afbac78d..b4e015193d 100755 --- a/tests/de/iges_3/A4 +++ b/tests/de/iges_3/A4 @@ -15,8 +15,8 @@ TPSTAT : Faulties = 12 ( 238 ) Warnings = 473 ( 2625 ) Summary = 485 CHECKSHAPE : Wires = 4 ( 4 ) Faces = 4 ( 4 ) Shells = 0 ( 0 ) Solids = 0 ( 0 ) NBSHAPES : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 1346 ( 1345 ) STATSHAPE : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 1346 ( 1345 ) FreeWire = 96 ( 170 ) -TOLERANCE : MaxTol = 0.8099726869 ( 1.367966665 ) AvgTol = 0.008043603037 ( 0.008389705625 ) -LABELS : N0Labels = 27 ( 27 ) N1Labels = 2100 ( 6248 ) N2Labels = 0 ( 0 ) TotalLabels = 2127 ( 6275 ) NameLabels = 2127 ( 2596 ) ColorLabels = 2114 ( 6274 ) LayerLabels = 2114 ( 6274 ) +TOLERANCE : MaxTol = 0.8099726869 ( 1.367966665 ) AvgTol = 0.008043601785 ( 0.008389705625 ) +LABELS : N0Labels = 27 ( 27 ) N1Labels = 2035 ( 7105 ) N2Labels = 0 ( 0 ) TotalLabels = 2062 ( 7132 ) NameLabels = 1971 ( 2440 ) ColorLabels = 2049 ( 7131 ) LayerLabels = 1958 ( 7131 ) PROPS : Centroid = 0 ( 0 ) Volume = 0 ( 0 ) Area = 0 ( 0 ) NCOLORS : NColors = 11 ( 12 ) COLORS : Colors = BLUE CYAN CYAN2 DARKGOLDENROD GREEN MAGENTA PALEVIOLETRED1 RED TURQUOISE2 WHITE YELLOW ( BLUE CYAN CYAN2 DARKGOLDENROD GRAY53 GREEN MAGENTA PALEVIOLETRED1 RED TURQUOISE2 WHITE YELLOW ) diff --git a/tests/de/iges_3/A5 b/tests/de/iges_3/A5 index 28764f8b5b..db087f538c 100644 --- a/tests/de/iges_3/A5 +++ b/tests/de/iges_3/A5 @@ -4,16 +4,17 @@ puts "TODO CR23096 ALL: STATSHAPE : Faulty" puts "TODO CR23096 ALL: TOLERANCE : Faulty" puts "TODO CR23096 ALL: LABELS : Faulty" + set filename USA60022.igs set ref_data { DATA : Faulties = 0 ( 0 ) Warnings = 0 ( 1 ) Summary = 0 ( 1 ) -TPSTAT : Faulties = 0 ( 0 ) Warnings = 153 ( 2003 ) Summary = 153 ( 2003 ) +TPSTAT : Faulties = 0 ( 0 ) Warnings = 176 ( 2003 ) Summary = 176 ( 2003 ) CHECKSHAPE : Wires = 7 ( 14 ) Faces = 9 ( 15 ) Shells = 0 ( 0 ) Solids = 0 ( 0 ) NBSHAPES : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 666 ( 634 ) STATSHAPE : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 666 ( 634 ) FreeWire = 0 ( 0 ) -TOLERANCE : MaxTol = 6.4081268 ( 1.331845935 ) AvgTol = 0.002669846957 ( 0.002299131368 ) -LABELS : N0Labels = 1 ( 1 ) N1Labels = 634 ( 634 ) N2Labels = 0 ( 0 ) TotalLabels = 635 ( 635 ) NameLabels = 635 ( 635 ) ColorLabels = 634 ( 635 ) LayerLabels = 634 ( 635 ) +TOLERANCE : MaxTol = 6.4081268 ( 1.331845935 ) AvgTol = 0.002669862916 ( 0.002299131368 ) +LABELS : N0Labels = 1 ( 1 ) N1Labels = 635 ( 634 ) N2Labels = 0 ( 0 ) TotalLabels = 636 ( 635 ) NameLabels = 635 ( 635 ) ColorLabels = 635 ( 635 ) LayerLabels = 634 ( 635 ) PROPS : Centroid = 0 ( 0 ) Volume = 0 ( 0 ) Area = 0 ( 0 ) NCOLORS : NColors = 2 ( 2 ) COLORS : Colors = GREEN RED ( GREEN RED ) diff --git a/tests/de/iges_3/A6 b/tests/de/iges_3/A6 index e08ca631f2..bb182f4875 100755 --- a/tests/de/iges_3/A6 +++ b/tests/de/iges_3/A6 @@ -2,7 +2,6 @@ puts "TODO CR23096 ALL: DATA : Faulty" puts "TODO CR23096 ALL: TPSTAT : Faulty" puts "TODO CR23096 ALL: LABELS : Faulty" -puts "TODO CR23096 ALL: COLORS : Faulty" puts "TODO CR23096 ALL: LAYERS : Faulty" @@ -15,10 +14,10 @@ CHECKSHAPE : Wires = 0 ( 0 ) Faces = 0 ( 0 ) Shells = 0 ( 0 ) So NBSHAPES : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 145 ( 145 ) STATSHAPE : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 145 ( 145 ) FreeWire = 64 ( 64 ) TOLERANCE : MaxTol = 0.09719916174 ( 0.09719915743 ) AvgTol = 0.001636220412 ( 0.001630657269 ) -LABELS : N0Labels = 2 ( 2 ) N1Labels = 346 ( 756 ) N2Labels = 0 ( 0 ) TotalLabels = 348 ( 758 ) NameLabels = 348 ( 478 ) ColorLabels = 347 ( 757 ) LayerLabels = 336 ( 744 ) +LABELS : N0Labels = 2 ( 2 ) N1Labels = 412 ( 756 ) N2Labels = 0 ( 0 ) TotalLabels = 414 ( 758 ) NameLabels = 348 ( 478 ) ColorLabels = 413 ( 757 ) LayerLabels = 337 ( 744 ) PROPS : Centroid = 0 ( 0 ) Volume = 0 ( 0 ) Area = 0 ( 0 ) -NCOLORS : NColors = 2 ( 3 ) -COLORS : Colors = RED WHITE ( RED WHITE YELLOW ) +NCOLORS : NColors = 3 ( 3 ) +COLORS : Colors = RED WHITE YELLOW ( RED WHITE YELLOW ) NLAYERS : NLayers = 6 ( 7 ) LAYERS : Layers = 1 2 242 243 244 3 ( 1 11 2 242 243 244 3 ) diff --git a/tests/de/iges_3/A7 b/tests/de/iges_3/A7 index dc7d5a48d5..d934bdcf4d 100644 --- a/tests/de/iges_3/A7 +++ b/tests/de/iges_3/A7 @@ -10,8 +10,8 @@ TPSTAT : Faulties = 0 ( 569 ) Warnings = 154 ( 8440 ) Summary = 154 ( CHECKSHAPE : Wires = 0 ( 0 ) Faces = 0 ( 0 ) Shells = 0 ( 0 ) Solids = 0 ( 0 ) NBSHAPES : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 9171 ( 9171 ) STATSHAPE : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 9171 ( 9171 ) FreeWire = 998 ( 1096 ) -TOLERANCE : MaxTol = 0.6305328468 ( 0.6305328468 ) AvgTol = 0.0003777026259 ( 0.0003780893559 ) -LABELS : N0Labels = 1 ( 1 ) N1Labels = 31624 ( 37142 ) N2Labels = 0 ( 0 ) TotalLabels = 31625 ( 37143 ) NameLabels = 31621 ( 36777 ) ColorLabels = 31624 ( 37142 ) LayerLabels = 29174 ( 34054 ) +TOLERANCE : MaxTol = 0.6305328468 ( 0.6305328468 ) AvgTol = 0.000377702607 ( 0.0003780893559 ) +LABELS : N0Labels = 1 ( 1 ) N1Labels = 32515 ( 54384 ) N2Labels = 0 ( 0 ) TotalLabels = 32516 ( 54385 ) NameLabels = 31523 ( 36679 ) ColorLabels = 32515 ( 54384 ) LayerLabels = 29174 ( 49746 ) PROPS : Centroid = 0 ( 0 ) Volume = 0 ( 0 ) Area = 0 ( 0 ) NCOLORS : NColors = 4 ( 4 ) COLORS : Colors = GOLD3 MAGENTA WHITE YELLOW ( GOLD3 MAGENTA WHITE YELLOW ) diff --git a/tests/de/iges_3/A8 b/tests/de/iges_3/A8 index db7b46cb21..bb4eb84ba6 100755 --- a/tests/de/iges_3/A8 +++ b/tests/de/iges_3/A8 @@ -11,8 +11,8 @@ TPSTAT : Faulties = 2 ( 19 ) Warnings = 97 ( 1155 ) Summary = 99 ( 11 CHECKSHAPE : Wires = 0 ( 1 ) Faces = 0 ( 1 ) Shells = 0 ( 0 ) Solids = 0 ( 0 ) NBSHAPES : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 436 ( 436 ) STATSHAPE : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 436 ( 436 ) FreeWire = 15 ( 15 ) -TOLERANCE : MaxTol = 0.8904045146 ( 0.8904045345 ) AvgTol = 0.01244635993 ( 0.01248091559 ) -LABELS : N0Labels = 1 ( 1 ) N1Labels = 501 ( 2306 ) N2Labels = 0 ( 0 ) TotalLabels = 502 ( 2307 ) NameLabels = 502 ( 770 ) ColorLabels = 501 ( 2306 ) LayerLabels = 443 ( 2228 ) +TOLERANCE : MaxTol = 0.8904045146 ( 0.8904045345 ) AvgTol = 0.01244635964 ( 0.01248091559 ) +LABELS : N0Labels = 1 ( 1 ) N1Labels = 514 ( 3187 ) N2Labels = 0 ( 0 ) TotalLabels = 515 ( 3188 ) NameLabels = 502 ( 770 ) ColorLabels = 514 ( 3187 ) LayerLabels = 443 ( 3109 ) PROPS : Centroid = 0 ( 0 ) Volume = 0 ( 0 ) Area = 0 ( 0 ) NCOLORS : NColors = 4 ( 4 ) COLORS : Colors = BLUE GREEN RED WHITE ( BLUE GREEN RED WHITE ) diff --git a/tests/de/iges_3/A9 b/tests/de/iges_3/A9 index 38541bf533..55a9d4513a 100644 --- a/tests/de/iges_3/A9 +++ b/tests/de/iges_3/A9 @@ -6,12 +6,12 @@ set filename BUC60291.igs set ref_data { DATA : Faulties = 0 ( 0 ) Warnings = 0 ( 0 ) Summary = 0 ( 0 ) -TPSTAT : Faulties = 0 ( 0 ) Warnings = 5748 ( 31179 ) Summary = 5748 ( 31179 ) +TPSTAT : Faulties = 0 ( 0 ) Warnings = 5748 ( 31168 ) Summary = 5748 ( 31168 ) CHECKSHAPE : Wires = 0 ( 0 ) Faces = 0 ( 0 ) Shells = 0 ( 0 ) Solids = 0 ( 0 ) NBSHAPES : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 6500 ( 6500 ) STATSHAPE : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 6500 ( 6500 ) FreeWire = 0 ( 0 ) -TOLERANCE : MaxTol = 0.9560441943 ( 0.9560441934 ) AvgTol = 0.001956455229 ( 0.001954596039 ) -LABELS : N0Labels = 6500 ( 6500 ) N1Labels = 0 ( 25582 ) N2Labels = 0 ( 0 ) TotalLabels = 6500 ( 32082 ) NameLabels = 6500 ( 6500 ) ColorLabels = 6500 ( 32082 ) LayerLabels = 6500 ( 32082 ) +TOLERANCE : MaxTol = 0.9560441943 ( 0.9560441934 ) AvgTol = 0.001955325174 ( 0.001953471486 ) +LABELS : N0Labels = 6500 ( 6500 ) N1Labels = 0 ( 29980 ) N2Labels = 0 ( 0 ) TotalLabels = 6500 ( 36480 ) NameLabels = 6500 ( 6500 ) ColorLabels = 6500 ( 36480 ) LayerLabels = 6500 ( 36480 ) PROPS : Centroid = 0 ( 0 ) Volume = 0 ( 0 ) Area = 0 ( 0 ) NCOLORS : NColors = 1 ( 1 ) COLORS : Colors = YELLOW ( YELLOW ) diff --git a/tests/de/iges_3/B1 b/tests/de/iges_3/B1 index d2d374e779..83f8e40dfa 100644 --- a/tests/de/iges_3/B1 +++ b/tests/de/iges_3/B1 @@ -11,8 +11,8 @@ TPSTAT : Faulties = 0 ( 0 ) Warnings = 12 ( 1168 ) Summary = 12 ( 116 CHECKSHAPE : Wires = 16 ( 16 ) Faces = 24 ( 24 ) Shells = 0 ( 0 ) Solids = 0 ( 0 ) NBSHAPES : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 224 ( 224 ) STATSHAPE : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 224 ( 224 ) FreeWire = 0 ( 0 ) -TOLERANCE : MaxTol = 0.3297745494 ( 0.0412874456 ) AvgTol = 7.221653678e-005 ( 3.712938892e-005 ) -LABELS : N0Labels = 224 ( 224 ) N1Labels = 0 ( 21432 ) N2Labels = 0 ( 0 ) TotalLabels = 224 ( 21656 ) NameLabels = 224 ( 224 ) ColorLabels = 224 ( 21656 ) LayerLabels = 0 ( 0 ) +TOLERANCE : MaxTol = 0.3297745494 ( 0.0412874456 ) AvgTol = 7.219207892e-05 ( 3.712938892e-05 ) +LABELS : N0Labels = 224 ( 224 ) N1Labels = 0 ( 21524 ) N2Labels = 0 ( 0 ) TotalLabels = 224 ( 21748 ) NameLabels = 224 ( 224 ) ColorLabels = 224 ( 21748 ) LayerLabels = 0 ( 0 ) PROPS : Centroid = 0 ( 0 ) Volume = 0 ( 0 ) Area = 0 ( 0 ) NCOLORS : NColors = 1 ( 1 ) COLORS : Colors = YELLOW ( YELLOW ) diff --git a/tests/de/iges_3/B2 b/tests/de/iges_3/B2 index 862b7a6bc4..ce13d0db24 100755 --- a/tests/de/iges_3/B2 +++ b/tests/de/iges_3/B2 @@ -12,7 +12,7 @@ TPSTAT : Faulties = 0 ( 0 ) Warnings = 883 ( 1953 ) Summary = 883 ( 1 CHECKSHAPE : Wires = 4 ( 2 ) Faces = 2 ( 2 ) Shells = 0 ( 0 ) Solids = 0 ( 0 ) NBSHAPES : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 1223 ( 1223 ) STATSHAPE : Solid = 0 ( 0 ) Shell = 0 ( 0 ) Face = 1223 ( 1223 ) FreeWire = 0 ( 0 ) -TOLERANCE : MaxTol = 0.002714431471 ( 0.001436622896 ) AvgTol = 1.621537502e-006 ( 9.779578932e-006 ) +TOLERANCE : MaxTol = 0.002714431471 ( 0.001436622896 ) AvgTol = 1.591279644e-06 ( 9.779578932e-06 ) LABELS : N0Labels = 1215 ( 1215 ) N1Labels = 0 ( 0 ) N2Labels = 0 ( 0 ) TotalLabels = 1215 ( 1215 ) NameLabels = 1215 ( 1215 ) ColorLabels = 0 ( 0 ) LayerLabels = 1207 ( 1215 ) PROPS : Centroid = 0 ( 0 ) Volume = 0 ( 0 ) Area = 0 ( 0 ) NCOLORS : NColors = 0 ( 0 ) From 879768fbf2e2c09089d7cd64a8f93b3c9c47d09c Mon Sep 17 00:00:00 2001 From: kgv Date: Mon, 11 Apr 2022 20:00:39 +0300 Subject: [PATCH 261/639] 0032886: Visualization, V3d_View - introduce interface for creating a subview V3d_View/Graphic3d_CView pair has been extended to define subview within the other V3d_View instance. The initialization is done in form of V3d_View::SetWindow() taking parent V3d_View instance on input. Subview definition includes dimensions defined as a fraction of a parent view and offset from a corner. This scheme allows splitting window into several subviews automatically occupying entire viewport, like splitting window into two vertial subviews (100%x50% + 100%x50%), three horizontal subviews (33%x100% + 30%x100% + 30%x100%), 1 + 2 stacked subviews (50%x100% + 50%x50% + 50%x50%), as well as thumbnail-alike subviews displayed on top of another larger view. OpenGl_View::Redraw() blits content of subviews into the window within immediate redraw step. AIS_ViewController::FlushViewEvents() has been extended to re-calculate mouse input into local subview coordinates. AIS_ViewController::handleViewRedraw() first redraws subviews and then parent views. Introduced new callback AIS_ViewController::OnSubviewChanged() to switch input focus to another subview on mouse click, implemented by ViewerTest_EventManager (has to be done at application level). vinit command has been extended with parameters -subview and -parent to create a subview. In addition, view dimension arguments now can be defined as a fraction of screen size instead of pixels. --- src/AIS/AIS_ViewController.cxx | 173 +++++- src/AIS/AIS_ViewController.hxx | 6 + src/Aspect/Aspect_Window.hxx | 68 ++- src/D3DHost/D3DHost_View.cxx | 5 +- src/D3DHost/D3DHost_View.hxx | 8 +- src/DPrsStd/DPrsStd_AISViewerCommands.cxx | 2 +- src/Graphic3d/Graphic3d_CView.cxx | 157 +++++- src/Graphic3d/Graphic3d_CView.hxx | 107 +++- src/OpenGl/OpenGl_GraphicDriver.cxx | 8 +- src/OpenGl/OpenGl_GraphicDriver.hxx | 8 +- src/OpenGl/OpenGl_View.cxx | 171 +++++- src/OpenGl/OpenGl_View.hxx | 9 +- src/OpenGl/OpenGl_Window.cxx | 78 +-- src/OpenGl/OpenGl_Window.hxx | 52 +- src/OpenGl/OpenGl_Window_1.mm | 90 ++-- src/V3d/V3d_View.cxx | 152 +++++- src/V3d/V3d_View.hxx | 45 +- src/V3d/V3d_Viewer.cxx | 56 +- src/V3d/V3d_Viewer.hxx | 2 +- src/ViewerTest/ViewerTest.cxx | 29 +- src/ViewerTest/ViewerTest.hxx | 77 ++- src/ViewerTest/ViewerTest_AutoUpdater.cxx | 10 + src/ViewerTest/ViewerTest_EventManager.cxx | 89 +++- src/ViewerTest/ViewerTest_EventManager.hxx | 9 + src/ViewerTest/ViewerTest_OpenGlCommands.cxx | 5 +- src/ViewerTest/ViewerTest_ViewerCommands.cxx | 527 +++++++++++-------- src/XDEDRAW/XDEDRAW.cxx | 4 +- tests/opengl/data/general/multiview1 | 34 ++ tests/opengl/data/general/multiview1ssaa | 36 ++ tests/opengl/data/general/multiview2 | 40 ++ tests/opengl/data/general/multiview3 | 32 ++ tests/opengl/data/general/multiview4 | 26 + tests/opengl/data/general/multiview5 | 26 + tests/opengl/data/general/multiview6 | 53 ++ 34 files changed, 1702 insertions(+), 492 deletions(-) create mode 100644 tests/opengl/data/general/multiview1 create mode 100644 tests/opengl/data/general/multiview1ssaa create mode 100644 tests/opengl/data/general/multiview2 create mode 100644 tests/opengl/data/general/multiview3 create mode 100644 tests/opengl/data/general/multiview4 create mode 100644 tests/opengl/data/general/multiview5 create mode 100644 tests/opengl/data/general/multiview6 diff --git a/src/AIS/AIS_ViewController.cxx b/src/AIS/AIS_ViewController.cxx index 62cc3d9ea5..e8738defb3 100644 --- a/src/AIS/AIS_ViewController.cxx +++ b/src/AIS/AIS_ViewController.cxx @@ -184,6 +184,53 @@ void AIS_ViewController::FlushViewEvents (const Handle(AIS_InteractiveContext)& { flushBuffers (theCtx, theView); flushGestures(theCtx, theView); + + if (theView->IsSubview()) + { + // move input coordinates inside the view + const Graphic3d_Vec2i aDelta = theView->View()->SubviewTopLeft(); + if (myGL.MoveTo.ToHilight || myGL.Dragging.ToStart) + { + myGL.MoveTo.Point -= aDelta; + } + if (myGL.Panning.ToStart) + { + myGL.Panning.PointStart -= aDelta; + } + if (myGL.Dragging.ToStart) + { + myGL.Dragging.PointStart -= aDelta; + } + if (myGL.Dragging.ToMove) + { + myGL.Dragging.PointTo -= aDelta; + } + if (myGL.OrbitRotation.ToStart) + { + myGL.OrbitRotation.PointStart -= Graphic3d_Vec2d (aDelta); + } + if (myGL.OrbitRotation.ToRotate) + { + myGL.OrbitRotation.PointTo -= Graphic3d_Vec2d (aDelta); + } + if (myGL.ViewRotation.ToStart) + { + myGL.ViewRotation.PointStart -= Graphic3d_Vec2d (aDelta); + } + if (myGL.ViewRotation.ToRotate) + { + myGL.ViewRotation.PointTo -= Graphic3d_Vec2d (aDelta); + } + for (Graphic3d_Vec2i& aPntIter : myGL.Selection.Points) + { + aPntIter -= aDelta; + } + for (Aspect_ScrollDelta& aZoomIter : myGL.ZoomActions) + { + aZoomIter.Point -= aDelta; + } + } + if (theToHandle) { HandleViewEvents (theCtx, theView); @@ -2627,6 +2674,17 @@ void AIS_ViewController::OnSelectionChanged (const Handle(AIS_InteractiveContext // } +// ======================================================================= +// function : OnSubviewChanged +// purpose : +// ======================================================================= +void AIS_ViewController::OnSubviewChanged (const Handle(AIS_InteractiveContext)& , + const Handle(V3d_View)& , + const Handle(V3d_View)& ) +{ + // +} + // ======================================================================= // function : OnObjectDragged // purpose : @@ -3002,6 +3060,8 @@ void AIS_ViewController::handleMoveTo (const Handle(AIS_InteractiveContext)& the void AIS_ViewController::handleViewRedraw (const Handle(AIS_InteractiveContext)& , const Handle(V3d_View)& theView) { + Handle(V3d_View) aParentView = theView->IsSubview() ? theView->ParentView() : theView; + // manage animation state if (!myViewAnimation.IsNull() && !myViewAnimation->IsStopped()) @@ -3029,31 +3089,82 @@ void AIS_ViewController::handleViewRedraw (const Handle(AIS_InteractiveContext)& myToAskNextFrame = true; } - for (V3d_ListOfViewIterator aViewIter (theView->Viewer()->ActiveViewIterator()); aViewIter.More(); aViewIter.Next()) + for (int aSubViewPass = 0; aSubViewPass < 2; ++aSubViewPass) { - const Handle(V3d_View)& aView = aViewIter.Value(); - if (aView->IsInvalidated() - || (myToAskNextFrame && aView == theView)) + const bool isSubViewPass = (aSubViewPass == 0); + for (V3d_ListOfViewIterator aViewIter (theView->Viewer()->ActiveViewIterator()); aViewIter.More(); aViewIter.Next()) { - if (aView->ComputedMode()) + const Handle(V3d_View)& aView = aViewIter.Value(); + if (isSubViewPass + && !aView->IsSubview()) { - aView->Update(); + for (const Handle(V3d_View)& aSubviewIter : aView->Subviews()) + { + if (aSubviewIter->Viewer() != theView->Viewer()) + { + if (aSubviewIter->IsInvalidated()) + { + if (aSubviewIter->ComputedMode()) + { + aSubviewIter->Update(); + } + else + { + aSubviewIter->Redraw(); + } + } + else if (aSubviewIter->IsInvalidatedImmediate()) + { + aSubviewIter->RedrawImmediate(); + } + } + } + continue; } - else + else if (!isSubViewPass + && aView->IsSubview()) { - aView->Redraw(); + continue; + } + + if (aView->IsInvalidated() + || (myToAskNextFrame && aView == theView)) + { + if (aView->ComputedMode()) + { + aView->Update(); + } + else + { + aView->Redraw(); + } + + if (aView->IsSubview()) + { + aView->ParentView()->InvalidateImmediate(); + } + } + else if (aView->IsInvalidatedImmediate()) + { + if (aView->IsSubview()) + { + aView->ParentView()->InvalidateImmediate(); + } + + aView->RedrawImmediate(); } } - else if (aView->IsInvalidatedImmediate()) - { - aView->RedrawImmediate(); - } + } + if (theView->IsSubview() + && theView->Viewer() != aParentView->Viewer()) + { + aParentView->RedrawImmediate(); } if (myToAskNextFrame) { // ask more frames - theView->Window()->InvalidateContent (Handle(Aspect_DisplayConnection)()); + aParentView->Window()->InvalidateContent (Handle(Aspect_DisplayConnection)()); } } @@ -3298,6 +3409,36 @@ void AIS_ViewController::HandleViewEvents (const Handle(AIS_InteractiveContext)& { const bool wasImmediateUpdate = theView->SetImmediateUpdate (false); + Handle(V3d_View) aPickedView; + if (theView->IsSubview() + || !theView->Subviews().IsEmpty()) + { + // activate another subview on mouse click + bool toPickSubview = false; + Graphic3d_Vec2i aClickPoint; + if (myGL.Selection.Tool == AIS_ViewSelectionTool_Picking + && !myGL.Selection.Points.IsEmpty()) + { + aClickPoint = myGL.Selection.Points.Last(); + toPickSubview = true; + } + else if (!myGL.ZoomActions.IsEmpty()) + { + //aClickPoint = myGL.ZoomActions.Last().Point; + //toPickSubview = true; + } + + if (toPickSubview) + { + if (theView->IsSubview()) + { + aClickPoint += theView->View()->SubviewTopLeft(); + } + Handle(V3d_View) aParent = !theView->IsSubview() ? theView : theView->ParentView(); + aPickedView = aParent->PickSubview (aClickPoint); + } + } + handleViewOrientationKeys (theCtx, theView); const AIS_WalkDelta aWalk = handleNavigationKeys (theCtx, theView); handleXRInput (theCtx, theView, aWalk); @@ -3315,6 +3456,12 @@ void AIS_ViewController::HandleViewEvents (const Handle(AIS_InteractiveContext)& theView->SetImmediateUpdate (wasImmediateUpdate); + if (!aPickedView.IsNull() + && aPickedView != theView) + { + OnSubviewChanged (theCtx, theView, aPickedView); + } + // make sure to not process the same events twice myGL.Reset(); myToAskNextFrame = false; diff --git a/src/AIS/AIS_ViewController.hxx b/src/AIS/AIS_ViewController.hxx index 98f1938726..0215bdde6b 100644 --- a/src/AIS/AIS_ViewController.hxx +++ b/src/AIS/AIS_ViewController.hxx @@ -492,6 +492,12 @@ public: const Handle(V3d_View)& theView, AIS_DragAction theAction); + //! Callback called by HandleViewEvents() on Selection of another (sub)view. + //! This method is expected to be called from rendering thread. + Standard_EXPORT virtual void OnSubviewChanged (const Handle(AIS_InteractiveContext)& theCtx, + const Handle(V3d_View)& theOldView, + const Handle(V3d_View)& theNewView); + //! Pick closest point under mouse cursor. //! This method is expected to be called from rendering thread. //! @param thePnt [out] result point diff --git a/src/Aspect/Aspect_Window.hxx b/src/Aspect/Aspect_Window.hxx index c7153f0bfd..a849aaea73 100644 --- a/src/Aspect/Aspect_Window.hxx +++ b/src/Aspect/Aspect_Window.hxx @@ -40,18 +40,58 @@ class Aspect_Window : public Standard_Transient DEFINE_STANDARD_RTTIEXT(Aspect_Window, Standard_Transient) public: + //! Returns True if the window is virtual + Standard_EXPORT Standard_Boolean IsVirtual() const; + + //! Setup the virtual state + Standard_EXPORT void SetVirtual (const Standard_Boolean theVirtual); + + //! Returns window top-left corner. + Graphic3d_Vec2i TopLeft() const + { + Graphic3d_Vec2i aTopLeft, aBotRight; + Position (aTopLeft.x(), aTopLeft.y(), aBotRight.x(), aBotRight.y()); + return aTopLeft; + } + + //! Returns window dimensions. + Graphic3d_Vec2i Dimensions() const + { + Graphic3d_Vec2i aSize; + Size (aSize.x(), aSize.y()); + return aSize; + } + + //! Returns connection to Display or NULL. + const Handle(Aspect_DisplayConnection)& DisplayConnection() const { return myDisplay; } + + //! Returns the window background. + Standard_EXPORT Aspect_Background Background() const; + + //! Returns the current image background fill mode. + Standard_EXPORT Aspect_FillMethod BackgroundFillMethod() const; + + //! Returns the window gradient background. + Standard_EXPORT Aspect_GradientBackground GradientBackground() const; + //! Modifies the window background. - Standard_EXPORT void SetBackground (const Aspect_Background& ABack); + Standard_EXPORT void SetBackground (const Aspect_Background& theBack); //! Modifies the window background. - Standard_EXPORT void SetBackground (const Quantity_Color& color); + Standard_EXPORT void SetBackground (const Quantity_Color& theColor); //! Modifies the window gradient background. - Standard_EXPORT void SetBackground (const Aspect_GradientBackground& ABackground); + Standard_EXPORT void SetBackground (const Aspect_GradientBackground& theBackground); //! Modifies the window gradient background. Standard_EXPORT void SetBackground (const Quantity_Color& theFirstColor, const Quantity_Color& theSecondColor, const Aspect_GradientFillMethod theFillMethod); +public: + + //! Returns True if the window is opened + //! and False if the window is closed. + Standard_EXPORT virtual Standard_Boolean IsMapped() const = 0; + //! Opens the window . Standard_EXPORT virtual void Map() const = 0; @@ -65,25 +105,6 @@ public: //! and returns TRUE if the window is mapped at screen. Standard_EXPORT virtual Standard_Boolean DoMapping() const = 0; - //! Returns the window background. - Standard_EXPORT Aspect_Background Background() const; - - //! Returns the current image background fill mode. - Standard_EXPORT Aspect_FillMethod BackgroundFillMethod() const; - - //! Returns the window gradient background. - Standard_EXPORT Aspect_GradientBackground GradientBackground() const; - - //! Returns True if the window is opened - //! and False if the window is closed. - Standard_EXPORT virtual Standard_Boolean IsMapped() const = 0; - - //! Returns True if the window is virtual - Standard_EXPORT Standard_Boolean IsVirtual() const; - - //! Setup the virtual state - Standard_EXPORT void SetVirtual (const Standard_Boolean theVirtual); - //! Returns The Window RATIO equal to the physical //! WIDTH/HEIGHT dimensions Standard_EXPORT virtual Standard_Real Ratio() const = 0; @@ -103,9 +124,6 @@ public: //! Returns native Window FB config (GLXFBConfig on Xlib) Standard_EXPORT virtual Aspect_FBConfig NativeFBConfig() const = 0; - //! Returns connection to Display or NULL. - const Handle(Aspect_DisplayConnection)& DisplayConnection() const { return myDisplay; } - //! Sets window title. virtual void SetTitle (const TCollection_AsciiString& theTitle) { (void )theTitle; } diff --git a/src/D3DHost/D3DHost_View.cxx b/src/D3DHost/D3DHost_View.cxx index 6e38676919..af3306d140 100644 --- a/src/D3DHost/D3DHost_View.cxx +++ b/src/D3DHost/D3DHost_View.cxx @@ -128,7 +128,8 @@ IDirect3DSurface9* D3DHost_View::D3dColorSurface() const // function : SetWindow // purpose : // ======================================================================= -void D3DHost_View::SetWindow (const Handle(Aspect_Window)& theWindow, +void D3DHost_View::SetWindow (const Handle(Graphic3d_CView)& theParentVIew, + const Handle(Aspect_Window)& theWindow, const Aspect_RenderingContext theContext) { if (!myD3dWglFbo.IsNull()) @@ -142,7 +143,7 @@ void D3DHost_View::SetWindow (const Handle(Aspect_Window)& theWindow, myD3dDevice = NULL; } - OpenGl_View::SetWindow (theWindow, theContext); + OpenGl_View::SetWindow (theParentVIew, theWindow, theContext); if (!myWindow.IsNull()) { diff --git a/src/D3DHost/D3DHost_View.hxx b/src/D3DHost/D3DHost_View.hxx index 39c307851a..dc53f62af9 100644 --- a/src/D3DHost/D3DHost_View.hxx +++ b/src/D3DHost/D3DHost_View.hxx @@ -44,12 +44,8 @@ public: Standard_EXPORT virtual void ReleaseGlResources (const Handle(OpenGl_Context)& theCtx) Standard_OVERRIDE; //! Creates and maps rendering window to the view. - //! @param theWindow [in] the window. - //! @param theContext [in] the rendering context. If NULL the context will be created internally. - //! @param theDisplayCB [in] the display callback function. If is not a NULL value, then the callback will be - //! invoked at the end of the OCC graphic traversal and just before the swap of buffers. - //! @param theClientData [in] the client data for the callback. - Standard_EXPORT virtual void SetWindow (const Handle(Aspect_Window)& theWindow, + Standard_EXPORT virtual void SetWindow (const Handle(Graphic3d_CView)& theParentVIew, + const Handle(Aspect_Window)& theWindow, const Aspect_RenderingContext theContext) Standard_OVERRIDE; //! Resizes the window. diff --git a/src/DPrsStd/DPrsStd_AISViewerCommands.cxx b/src/DPrsStd/DPrsStd_AISViewerCommands.cxx index 81c7d8a4c2..343caa2468 100644 --- a/src/DPrsStd/DPrsStd_AISViewerCommands.cxx +++ b/src/DPrsStd/DPrsStd_AISViewerCommands.cxx @@ -56,7 +56,7 @@ static Standard_Integer DPrsStd_AISInitViewer (Draw_Interpretor& theDI, TCollection_AsciiString aViewName = TCollection_AsciiString ("Driver1/Document_") + theArgVec[1] + "/View1"; if (!TPrsStd_AISViewer::Find (aRoot, aDocViewer)) { - ViewerTest::ViewerInit (0, 0, 0, 0, aViewName.ToCString(), ""); + ViewerTest::ViewerInit (aViewName); aDocViewer = TPrsStd_AISViewer::New (aRoot, ViewerTest::GetAISContext()); } diff --git a/src/Graphic3d/Graphic3d_CView.cxx b/src/Graphic3d/Graphic3d_CView.cxx index 07077415ff..c114c66a21 100644 --- a/src/Graphic3d/Graphic3d_CView.cxx +++ b/src/Graphic3d/Graphic3d_CView.cxx @@ -13,6 +13,7 @@ #include +#include #include #include #include @@ -26,18 +27,27 @@ IMPLEMENT_STANDARD_RTTIEXT(Graphic3d_CView,Graphic3d_DataStructureManager) //purpose : //======================================================================= Graphic3d_CView::Graphic3d_CView (const Handle(Graphic3d_StructureManager)& theMgr) -: myBgColor (Quantity_NOC_BLACK), - myBackgroundType (Graphic3d_TOB_NONE), - myToUpdateSkydome (Standard_False), - myStructureManager (theMgr), - myCamera (new Graphic3d_Camera()), - myHiddenObjects (new Graphic3d_NMapOfTransient()), - myIsInComputedMode (Standard_False), - myIsActive (Standard_False), - myIsRemoved (Standard_False), - myBackfacing (Graphic3d_TypeOfBackfacingModel_Auto), - myVisualization (Graphic3d_TOV_WIREFRAME), - myUnitFactor (1.0) +: myId (0), + // + myParentView (nullptr), + myIsSubviewComposer (Standard_False), + mySubviewCorner (Aspect_TOTP_LEFT_UPPER), + mySubviewSize (1.0, 1.0), + // + myStructureManager (theMgr), + myCamera (new Graphic3d_Camera()), + myHiddenObjects (new Graphic3d_NMapOfTransient()), + myIsInComputedMode (Standard_False), + myIsActive (Standard_False), + myIsRemoved (Standard_False), + myBackfacing (Graphic3d_TypeOfBackfacingModel_Auto), + myVisualization (Graphic3d_TOV_WIREFRAME), + // + myBgColor (Quantity_NOC_BLACK), + myBackgroundType (Graphic3d_TOB_NONE), + myToUpdateSkydome (Standard_False), + // + myUnitFactor (1.0) { myId = myStructureManager->Identification (this); } @@ -161,8 +171,21 @@ void Graphic3d_CView::Remove() return; } - Graphic3d_MapOfStructure aDisplayedStructs (myStructsDisplayed); + if (myParentView != nullptr) + { + myParentView->RemoveSubview (this); + myParentView = nullptr; + } + { + NCollection_Sequence aSubviews = mySubviews; + mySubviews.Clear(); + for (const Handle(Graphic3d_CView)& aViewIter : aSubviews) + { + aViewIter->Remove(); + } + } + Graphic3d_MapOfStructure aDisplayedStructs (myStructsDisplayed); for (Graphic3d_MapIteratorOfMapOfStructure aStructIter (aDisplayedStructs); aStructIter.More(); aStructIter.Next()) { Erase (aStructIter.Value()); @@ -181,6 +204,114 @@ void Graphic3d_CView::Remove() myIsRemoved = Standard_True; } +// ======================================================================== +// function : AddSubview +// purpose : +// ======================================================================== +void Graphic3d_CView::AddSubview (const Handle(Graphic3d_CView)& theView) +{ + mySubviews.Append (theView); +} + +// ======================================================================== +// function : RemoveSubview +// purpose : +// ======================================================================== +bool Graphic3d_CView::RemoveSubview (const Graphic3d_CView* theView) +{ + for (NCollection_Sequence::Iterator aViewIter (mySubviews); aViewIter.More(); aViewIter.Next()) + { + if (aViewIter.Value() == theView) + { + mySubviews.Remove (aViewIter); + return true; + } + } + return false; +} + +// ======================================================================== +// function : Resized +// purpose : +// ======================================================================== +void Graphic3d_CView::Resized() +{ + if (IsSubview()) + { + Handle(Aspect_NeutralWindow) aWindow = Handle(Aspect_NeutralWindow)::DownCast(Window()); + SubviewResized (aWindow); + } +} + +//! Calculate offset in pixels from fraction. +static int getSubViewOffset (double theOffset, int theWinSize) +{ + if (theOffset >= 1.0) + { + return int(theOffset); + } + else + { + return int(theOffset * theWinSize); + } +} + +// ======================================================================== +// function : SubviewResized +// purpose : +// ======================================================================== +void Graphic3d_CView::SubviewResized (const Handle(Aspect_NeutralWindow)& theWindow) +{ + if (!IsSubview() + || theWindow.IsNull()) + { + return; + } + + const Graphic3d_Vec2i aWinSize (myParentView->Window()->Dimensions()); + Graphic3d_Vec2i aViewSize (Graphic3d_Vec2d(aWinSize) * mySubviewSize); + if (mySubviewSize.x() > 1.0) + { + aViewSize.x() = (int)mySubviewSize.x(); + } + if (mySubviewSize.y() > 1.0) + { + aViewSize.y() = (int)mySubviewSize.y(); + } + + Graphic3d_Vec2i anOffset (getSubViewOffset (mySubviewOffset.x(), aWinSize.x()), + getSubViewOffset (mySubviewOffset.y(), aWinSize.y())); + mySubviewTopLeft = (aWinSize - aViewSize) / 2; // Aspect_TOTP_CENTER + if ((mySubviewCorner & Aspect_TOTP_LEFT) != 0) + { + mySubviewTopLeft.x() = anOffset.x(); + } + else if ((mySubviewCorner & Aspect_TOTP_RIGHT) != 0) + { + mySubviewTopLeft.x() = Max (aWinSize.x() - anOffset.x() - aViewSize.x(), 0); + } + + if ((mySubviewCorner & Aspect_TOTP_TOP) != 0) + { + mySubviewTopLeft.y() = anOffset.y(); + } + else if ((mySubviewCorner & Aspect_TOTP_BOTTOM) != 0) + { + mySubviewTopLeft.y() = Max (aWinSize.y() - anOffset.y() - aViewSize.y(), 0); + } + + mySubviewTopLeft += mySubviewMargins; + aViewSize -= mySubviewMargins * 2; + + const int aRight = Min(mySubviewTopLeft.x() + aViewSize.x(), aWinSize.x()); + aViewSize.x() = aRight - mySubviewTopLeft.x(); + + const int aBot = Min(mySubviewTopLeft.y() + aViewSize.y(), aWinSize.y()); + aViewSize.y() = aBot - mySubviewTopLeft.y(); + + theWindow->SetSize (aViewSize.x(), aViewSize.y()); +} + // ======================================================================== // function : SetComputedMode // purpose : diff --git a/src/Graphic3d/Graphic3d_CView.hxx b/src/Graphic3d/Graphic3d_CView.hxx index 43e3675fc3..fe29afeb38 100644 --- a/src/Graphic3d/Graphic3d_CView.hxx +++ b/src/Graphic3d/Graphic3d_CView.hxx @@ -48,6 +48,7 @@ #include #include +class Aspect_NeutralWindow; class Aspect_XRSession; class Graphic3d_CView; class Graphic3d_Layer; @@ -239,7 +240,7 @@ public: virtual Standard_Boolean IsInvalidated() = 0; //! Handle changing size of the rendering window. - virtual void Resized() = 0; + Standard_EXPORT virtual void Resized() = 0; //! @param theDrawToFrontBuffer Advanced option to modify rendering mode: //! 1. TRUE. Drawing immediate mode structures directly to the front buffer over the scene image. @@ -256,10 +257,12 @@ public: virtual Standard_Boolean SetImmediateModeDrawToFront (const Standard_Boolean theDrawToFrontBuffer) = 0; //! Creates and maps rendering window to the view. - //! @param theWindow [in] the window. - //! @param theContext [in] the rendering context. If NULL the context will be created internally. - virtual void SetWindow (const Handle(Aspect_Window)& theWindow, - const Aspect_RenderingContext theContext = NULL) = 0; + //! @param[in] theParentVIew parent view or NULL + //! @param[in] theWindow the window + //! @param[in] theContext the rendering context; if NULL the context will be created internally + virtual void SetWindow (const Handle(Graphic3d_CView)& theParentVIew, + const Handle(Aspect_Window)& theWindow, + const Aspect_RenderingContext theContext) = 0; //! Returns the window associated to the view. virtual Handle(Aspect_Window) Window() const = 0; @@ -554,6 +557,70 @@ public: //! @name obsolete Graduated Trihedron functionality //! Dumps the content of me into the stream Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const Standard_OVERRIDE; +public: //! @name subview properties + + //! Return TRUE if this is a subview of another view. + bool IsSubview() const { return myParentView != nullptr; } + + //! Return parent View or NULL if this is not a subview. + Graphic3d_CView* ParentView() { return myParentView; } + + //! Return TRUE if this is view performs rendering of subviews and nothing else; FALSE by default. + //! By default, view with subviews will render main scene and blit subviews on top of it. + //! Rendering of main scene might become redundant in case if subviews cover entire window of parent view. + //! This flag allows to disable rendering of the main scene in such scenarios + //! without creation of a dedicated V3d_Viewer instance just for composing subviews. + bool IsSubviewComposer() const { return myIsSubviewComposer; } + + //! Set if this view should perform composing of subviews and nothing else. + void SetSubviewComposer (bool theIsComposer) { myIsSubviewComposer = theIsComposer; } + + //! Return subview list. + const NCollection_Sequence& Subviews() const { return mySubviews; } + + //! Add subview to the list. + Standard_EXPORT void AddSubview (const Handle(Graphic3d_CView)& theView); + + //! Remove subview from the list. + Standard_EXPORT bool RemoveSubview (const Graphic3d_CView* theView); + + //! Return subview position within parent view; Aspect_TOTP_LEFT_UPPER by default. + Aspect_TypeOfTriedronPosition SubviewCorner() const { return mySubviewCorner; } + + //! Set subview position within parent view. + void SetSubviewCorner (Aspect_TypeOfTriedronPosition thePos) { mySubviewCorner = thePos; } + + //! Return subview top-left position relative to parent view in pixels. + const Graphic3d_Vec2i& SubviewTopLeft() const { return mySubviewTopLeft; } + + //! Return TRUE if subview size is set as proportions relative to parent view. + bool IsSubViewRelativeSize() const { return mySubviewSize.x() <= 1.0 && mySubviewSize.y() <= 1.0; } + + //! Return subview dimensions; (1.0, 1.0) by default. + //! Values >= 2 define size in pixels; + //! Values <= 1.0 define size as fraction of parent view. + const Graphic3d_Vec2d& SubviewSize() const { return mySubviewSize; } + + //! Set subview size relative to parent view. + void SetSubviewSize (const Graphic3d_Vec2d& theSize) { mySubviewSize = theSize; } + + //! Return corner offset within parent view; (0.0,0.0) by default. + //! Values >= 2 define offset in pixels; + //! Values <= 1.0 define offset as fraction of parent view dimensions. + const Graphic3d_Vec2d& SubviewOffset() const { return mySubviewOffset; } + + //! Set corner offset within parent view. + void SetSubviewOffset (const Graphic3d_Vec2d& theOffset) { mySubviewOffset = theOffset; } + + //! Return subview margins in pixels; (0,0) by default + const Graphic3d_Vec2i& SubviewMargins() const { return mySubviewMargins; } + + //! Set subview margins in pixels. + void SetSubviewMargins (const Graphic3d_Vec2i& theMargins) { mySubviewMargins = theMargins; } + + //! Update subview position and dimensions. + Standard_EXPORT void SubviewResized (const Handle(Aspect_NeutralWindow)& theWindow); + private: //! Adds the structure to display lists of the view. @@ -576,14 +643,14 @@ protected: Standard_Integer myId; Graphic3d_RenderingParams myRenderParams; - Quantity_ColorRGBA myBgColor; - Handle(Graphic3d_TextureMap) myBackgroundImage; - Handle(Graphic3d_CubeMap) myCubeMapBackground; //!< Cubemap displayed at background - Handle(Graphic3d_CubeMap) myCubeMapIBL; //!< Cubemap used for environment lighting - Handle(Graphic3d_TextureEnv) myTextureEnvData; - Graphic3d_TypeOfBackground myBackgroundType; //!< Current type of background - Aspect_SkydomeBackground mySkydomeAspect; - Standard_Boolean myToUpdateSkydome; + NCollection_Sequence mySubviews; //!< list of child views + Graphic3d_CView* myParentView; //!< back-pointer to the parent view + Standard_Boolean myIsSubviewComposer; //!< flag to skip rendering of viewer contents + Aspect_TypeOfTriedronPosition mySubviewCorner; //!< position within parent view + Graphic3d_Vec2i mySubviewTopLeft; //!< subview top-left position relative to parent view + Graphic3d_Vec2i mySubviewMargins; //!< subview margins in pixels + Graphic3d_Vec2d mySubviewSize; //!< subview size + Graphic3d_Vec2d mySubviewOffset; //!< subview corner offset within parent view Handle(Graphic3d_StructureManager) myStructureManager; Handle(Graphic3d_Camera) myCamera; @@ -597,6 +664,16 @@ protected: Graphic3d_TypeOfBackfacingModel myBackfacing; Graphic3d_TypeOfVisualization myVisualization; + Quantity_ColorRGBA myBgColor; + Handle(Graphic3d_TextureMap) myBackgroundImage; + Handle(Graphic3d_CubeMap) myCubeMapBackground; //!< Cubemap displayed at background + Handle(Graphic3d_CubeMap) myCubeMapIBL; //!< Cubemap used for environment lighting + Handle(Graphic3d_TextureEnv) myTextureEnvData; + Graphic3d_GraduatedTrihedron myGTrihedronData; + Graphic3d_TypeOfBackground myBackgroundType; //!< Current type of background + Aspect_SkydomeBackground mySkydomeAspect; + Standard_Boolean myToUpdateSkydome; + Handle(Aspect_XRSession) myXRSession; Handle(Graphic3d_Camera) myBackXRCamera; //!< camera projection parameters to restore after closing XR session (FOV, aspect and similar) Handle(Graphic3d_Camera) myBaseXRCamera; //!< neutral camera orientation defining coordinate system in which head tracking is defined @@ -604,10 +681,6 @@ protected: Handle(Graphic3d_Camera) myPosedXRCameraCopy; //!< neutral camera orientation copy at the beginning of processing input Standard_Real myUnitFactor; //!< unit scale factor defined as scale factor for m (meters) -protected: - - Graphic3d_GraduatedTrihedron myGTrihedronData; - }; #endif // _Graphic3d_CView_HeaderFile diff --git a/src/OpenGl/OpenGl_GraphicDriver.cxx b/src/OpenGl/OpenGl_GraphicDriver.cxx index 8e348d9406..ebd29d5c9b 100644 --- a/src/OpenGl/OpenGl_GraphicDriver.cxx +++ b/src/OpenGl/OpenGl_GraphicDriver.cxx @@ -868,14 +868,16 @@ void OpenGl_GraphicDriver::RemoveView (const Handle(Graphic3d_CView)& theView) } // ======================================================================= -// function : Window +// function : CreateRenderWindow // purpose : // ======================================================================= -Handle(OpenGl_Window) OpenGl_GraphicDriver::CreateRenderWindow (const Handle(Aspect_Window)& theWindow, +Handle(OpenGl_Window) OpenGl_GraphicDriver::CreateRenderWindow (const Handle(Aspect_Window)& theNativeWindow, + const Handle(Aspect_Window)& theSizeWindow, const Aspect_RenderingContext theContext) { Handle(OpenGl_Context) aShareCtx = GetSharedContext(); - Handle(OpenGl_Window) aWindow = new OpenGl_Window (this, theWindow, theContext, myCaps, aShareCtx); + Handle(OpenGl_Window) aWindow = new OpenGl_Window(); + aWindow->Init (this, theNativeWindow, theSizeWindow, theContext, myCaps, aShareCtx); return aWindow; } diff --git a/src/OpenGl/OpenGl_GraphicDriver.hxx b/src/OpenGl/OpenGl_GraphicDriver.hxx index 64e0518e61..1bde0b43dd 100644 --- a/src/OpenGl/OpenGl_GraphicDriver.hxx +++ b/src/OpenGl/OpenGl_GraphicDriver.hxx @@ -88,7 +88,13 @@ public: Standard_EXPORT virtual void RemoveView (const Handle(Graphic3d_CView)& theView) Standard_OVERRIDE; - Standard_EXPORT virtual Handle(OpenGl_Window) CreateRenderWindow (const Handle(Aspect_Window)& theWindow, const Aspect_RenderingContext theContext); + //! Create OpenGL window from native window. + //! @param[in] theNativeWindow native window holder + //! @param[in] theSizeWindow object defining window dimensions + //! @param[in] theContext existing native rendering context + Standard_EXPORT virtual Handle(OpenGl_Window) CreateRenderWindow (const Handle(Aspect_Window)& theNativeWindow, + const Handle(Aspect_Window)& theSizeWindow, + const Aspect_RenderingContext theContext); public: diff --git a/src/OpenGl/OpenGl_View.cxx b/src/OpenGl/OpenGl_View.cxx index 375e366f02..f3bcbc9bde 100644 --- a/src/OpenGl/OpenGl_View.cxx +++ b/src/OpenGl/OpenGl_View.cxx @@ -15,8 +15,8 @@ #include +#include #include -#include #include #include #include @@ -366,20 +366,57 @@ Standard_Boolean OpenGl_View::SetImmediateModeDrawToFront (const Standard_Boolea // ======================================================================= Handle(Aspect_Window) OpenGl_View::Window() const { - return myWindow->PlatformWindow(); + return myWindow->SizeWindow(); } // ======================================================================= // function : SetWindow // purpose : // ======================================================================= -void OpenGl_View::SetWindow (const Handle(Aspect_Window)& theWindow, +void OpenGl_View::SetWindow (const Handle(Graphic3d_CView)& theParentVIew, + const Handle(Aspect_Window)& theWindow, const Aspect_RenderingContext theContext) { - myWindow = myDriver->CreateRenderWindow (theWindow, theContext); - Standard_ASSERT_RAISE (!myWindow.IsNull(), - "OpenGl_View::SetWindow, " - "Failed to create OpenGl window."); + if (theContext != nullptr + && !theParentVIew.IsNull()) + { + throw Standard_ProgramError ("OpenGl_View::SetWindow(), internal error"); + } + + if (myParentView != nullptr) + { + myParentView->RemoveSubview (this); + myParentView = nullptr; + } + + OpenGl_View* aParentView = dynamic_cast (theParentVIew.get()); + if (!theParentVIew.IsNull()) + { + if (aParentView == nullptr + || aParentView->GlWindow().IsNull() + || aParentView->GlWindow()->GetGlContext().IsNull()) + { + throw Standard_ProgramError ("OpenGl_View::SetWindow(), internal error"); + } + + myParentView = aParentView; + myParentView->AddSubview (this); + + Handle(Aspect_NeutralWindow) aSubWindow = Handle(Aspect_NeutralWindow)::DownCast(theWindow); + SubviewResized (aSubWindow); + + const Handle(OpenGl_Window)& aParentGlWindow = aParentView->GlWindow(); + Aspect_RenderingContext aRendCtx = aParentGlWindow->GetGlContext()->RenderingContext(); + myWindow = myDriver->CreateRenderWindow (aParentGlWindow->PlatformWindow(), theWindow, aRendCtx); + } + else + { + myWindow = myDriver->CreateRenderWindow (theWindow, theWindow, theContext); + } + if (myWindow.IsNull()) + { + throw Standard_ProgramError ("OpenGl_View::SetWindow, Failed to create OpenGl window"); + } myWorkspace = new OpenGl_Workspace (this, myWindow); myWorldViewProjState.Reset(); @@ -414,10 +451,11 @@ void OpenGl_View::SetWindow (const Handle(Aspect_Window)& theWindow, // ======================================================================= void OpenGl_View::Resized() { - if (myWindow.IsNull()) - return; - - myWindow->Resize(); + base_type::Resized(); + if (!myWindow.IsNull()) + { + myWindow->Resize(); + } } // ======================================================================= @@ -1157,9 +1195,10 @@ bool OpenGl_View::prepareFrameBuffers (Graphic3d_Camera::Projection& theProj) const bool hasTextureMsaa = aCtx->HasTextureMultisampling(); bool toUseOit = myRenderParams.TransparencyMethod != Graphic3d_RTM_BLEND_UNORDERED + && !myIsSubviewComposer && checkOitCompatibility (aCtx, aNbSamples > 0); - const bool toInitImmediateFbo = myTransientDrawToFront + const bool toInitImmediateFbo = myTransientDrawToFront && !myIsSubviewComposer && (!aCtx->caps->useSystemBuffer || (toUseOit && HasImmediateStructures())); if ( aFrameBuffer == NULL @@ -1662,7 +1701,7 @@ void OpenGl_View::Redraw() OpenGl_FrameBuffer* aFrameBuffer = myFBO.get(); bool toSwap = aCtx->IsRender() && !aCtx->caps->buffersNoSwap - && aFrameBuffer == NULL + && aFrameBuffer == nullptr && (!IsActiveXR() || myRenderParams.ToMirrorComposer); if ( aFrameBuffer == NULL && !aCtx->DefaultFrameBuffer().IsNull() @@ -1738,7 +1777,9 @@ void OpenGl_View::Redraw() { toSwap = false; } - else if (aStereoMode == Graphic3d_StereoMode_SoftPageFlip && toSwap) + else if (aStereoMode == Graphic3d_StereoMode_SoftPageFlip + && toSwap + && myParentView == nullptr) { aCtx->SwapBuffers(); } @@ -1863,7 +1904,8 @@ void OpenGl_View::Redraw() } // Swap the buffers - if (toSwap) + if (toSwap + && myParentView == nullptr) { aCtx->SwapBuffers(); if (!myMainSceneFbos[0]->IsValid()) @@ -1969,8 +2011,9 @@ void OpenGl_View::RedrawImmediate() Standard_True) || toSwap; if (aStereoMode == Graphic3d_StereoMode_SoftPageFlip && toSwap - && myFBO.get() == NULL - && !aCtx->caps->buffersNoSwap) + && myFBO.get() == nullptr + && !aCtx->caps->buffersNoSwap + && myParentView == nullptr) { aCtx->SwapBuffers(); } @@ -2035,7 +2078,8 @@ void OpenGl_View::RedrawImmediate() if (toSwap && myFBO.get() == NULL - && !aCtx->caps->buffersNoSwap) + && !aCtx->caps->buffersNoSwap + && myParentView == nullptr) { aCtx->SwapBuffers(); } @@ -2159,9 +2203,91 @@ bool OpenGl_View::redrawImmediate (const Graphic3d_Camera::Projection theProject render (theProjection, theDrawFbo, theOitAccumFbo, Standard_True); + blitSubviews (theProjection, theDrawFbo); + return !toCopyBackToFront; } +// ======================================================================= +// function : blitSubviews +// purpose : +// ======================================================================= +bool OpenGl_View::blitSubviews (const Graphic3d_Camera::Projection , + OpenGl_FrameBuffer* theDrawFbo) +{ + const Handle(OpenGl_Context)& aCtx = myWorkspace->GetGlContext(); + if (aCtx->arbFBOBlit == nullptr) + { + return false; + } + + bool isChanged = false; + for (const Handle(Graphic3d_CView)& aChildIter : mySubviews) + { + OpenGl_View* aSubView = dynamic_cast (aChildIter.get()); + const Handle(OpenGl_FrameBuffer)& aChildFbo = !aSubView->myImmediateSceneFbos[0].IsNull() + ? aSubView->myImmediateSceneFbos[0] + : aSubView->myMainSceneFbos[0]; + if (aChildFbo.IsNull() || !aChildFbo->IsValid()) + { + continue; + } + + aChildFbo->BindReadBuffer (aCtx); + if (theDrawFbo != NULL + && theDrawFbo->IsValid()) + { + theDrawFbo->BindDrawBuffer (aCtx); + } + else + { + aCtx->arbFBO->glBindFramebuffer (GL_DRAW_FRAMEBUFFER, OpenGl_FrameBuffer::NO_FRAMEBUFFER); + aCtx->SetFrameBufferSRGB (false); + } + + Graphic3d_Vec2i aWinSize (aCtx->Viewport()[2], aCtx->Viewport()[3]); //aSubView->GlWindow()->PlatformWindow()->Dimensions(); + Graphic3d_Vec2i aSubViewSize = aChildFbo->GetVPSize(); + Graphic3d_Vec2i aSubViewPos = aSubView->SubviewTopLeft(); + Graphic3d_Vec2i aDestSize = aSubViewSize; + if (aSubView->RenderingParams().RenderResolutionScale != 1.0f) + { + aDestSize = Graphic3d_Vec2i (Graphic3d_Vec2d(aDestSize) / Graphic3d_Vec2d(aSubView->RenderingParams().RenderResolutionScale)); + } + aSubViewPos.y() = aWinSize.y() - aDestSize.y() - aSubViewPos.y(); + + const GLint aFilterGl = aDestSize == aSubViewSize ? GL_NEAREST : GL_LINEAR; + aCtx->arbFBOBlit->glBlitFramebuffer (0, 0, aSubViewSize.x(), aSubViewSize.y(), + aSubViewPos.x(), aSubViewPos.y(), aSubViewPos.x() + aDestSize.x(), aSubViewPos.y() + aDestSize.y(), + GL_COLOR_BUFFER_BIT, aFilterGl); + const int anErr = aCtx->core11fwd->glGetError(); + if (anErr != GL_NO_ERROR) + { + TCollection_ExtendedString aMsg = TCollection_ExtendedString() + "FBO blitting has failed [Error " + OpenGl_Context::FormatGlError (anErr) + "]\n" + + " Please check your graphics driver settings or try updating driver."; + if (aChildFbo->NbSamples() != 0) + { + myToDisableMSAA = true; + aMsg += "\n MSAA settings should not be overridden by driver!"; + } + aCtx->PushMessage (GL_DEBUG_SOURCE_APPLICATION, GL_DEBUG_TYPE_ERROR, 0, GL_DEBUG_SEVERITY_HIGH, aMsg); + } + + if (theDrawFbo != NULL + && theDrawFbo->IsValid()) + { + theDrawFbo->BindBuffer (aCtx); + } + else + { + aCtx->arbFBO->glBindFramebuffer (GL_FRAMEBUFFER, OpenGl_FrameBuffer::NO_FRAMEBUFFER); + aCtx->SetFrameBufferSRGB (false); + } + isChanged = true; + } + + return isChanged; +} + //======================================================================= //function : renderShadowMap //purpose : @@ -2409,9 +2535,16 @@ void OpenGl_View::renderStructs (Graphic3d_Camera::Projection theProjection, OpenGl_FrameBuffer* theOitAccumFbo, const Standard_Boolean theToDrawImmediate) { + if (myIsSubviewComposer) + { + return; + } + myZLayers.UpdateCulling (myWorkspace, theToDrawImmediate); - if ( myZLayers.NbStructures() <= 0 ) + if (myZLayers.NbStructures() <= 0) + { return; + } Handle(OpenGl_Context) aCtx = myWorkspace->GetGlContext(); Standard_Boolean toRenderGL = theToDrawImmediate || diff --git a/src/OpenGl/OpenGl_View.hxx b/src/OpenGl/OpenGl_View.hxx index 4f5781aa64..138c0c1c4b 100644 --- a/src/OpenGl/OpenGl_View.hxx +++ b/src/OpenGl/OpenGl_View.hxx @@ -85,9 +85,8 @@ public: Standard_EXPORT Standard_Boolean SetImmediateModeDrawToFront (const Standard_Boolean theDrawToFrontBuffer) Standard_OVERRIDE; //! Creates and maps rendering window to the view. - //! @param theWindow [in] the window. - //! @param theContext [in] the rendering context. If NULL the context will be created internally. - Standard_EXPORT virtual void SetWindow (const Handle(Aspect_Window)& theWindow, + Standard_EXPORT virtual void SetWindow (const Handle(Graphic3d_CView)& theParentVIew, + const Handle(Aspect_Window)& theWindow, const Aspect_RenderingContext theContext) Standard_OVERRIDE; //! Returns window associated with the view. @@ -345,6 +344,10 @@ protected: //! @name low-level redrawing sub-routines OpenGl_FrameBuffer* theOitAccumFbo, const Standard_Boolean theIsPartialUpdate = Standard_False); + //! Blit subviews into this view. + Standard_EXPORT bool blitSubviews (const Graphic3d_Camera::Projection theProjection, + OpenGl_FrameBuffer* theDrawFbo); + //! Blit image from/to specified buffers. Standard_EXPORT bool blitBuffers (OpenGl_FrameBuffer* theReadFbo, OpenGl_FrameBuffer* theDrawFbo, diff --git a/src/OpenGl/OpenGl_Window.cxx b/src/OpenGl/OpenGl_Window.cxx index 16545d39fc..601396f81c 100644 --- a/src/OpenGl/OpenGl_Window.cxx +++ b/src/OpenGl/OpenGl_Window.cxx @@ -169,17 +169,31 @@ namespace // function : OpenGl_Window // purpose : // ======================================================================= -OpenGl_Window::OpenGl_Window (const Handle(OpenGl_GraphicDriver)& theDriver, - const Handle(Aspect_Window)& thePlatformWindow, - Aspect_RenderingContext theGContext, - const Handle(OpenGl_Caps)& theCaps, - const Handle(OpenGl_Context)& theShareCtx) -: myGlContext (new OpenGl_Context (theCaps)), - myOwnGContext (theGContext == 0), - myPlatformWindow (thePlatformWindow), - mySwapInterval (theCaps->swapInterval) +OpenGl_Window::OpenGl_Window() +: myOwnGContext (false), + mySwapInterval (0) { - myPlatformWindow->Size (myWidth, myHeight); + // +} + +// ======================================================================= +// function : Init +// purpose : +// ======================================================================= +void OpenGl_Window::Init (const Handle(OpenGl_GraphicDriver)& theDriver, + const Handle(Aspect_Window)& thePlatformWindow, + const Handle(Aspect_Window)& theSizeWindow, + Aspect_RenderingContext theGContext, + const Handle(OpenGl_Caps)& theCaps, + const Handle(OpenGl_Context)& theShareCtx) +{ + myGlContext = new OpenGl_Context (theCaps); + myOwnGContext = (theGContext == 0); + myPlatformWindow = thePlatformWindow; + mySizeWindow = theSizeWindow; + mySwapInterval = theCaps->swapInterval; + + mySizeWindow->Size (mySize.x(), mySize.y()); Standard_Boolean isCoreProfile = Standard_False; @@ -193,7 +207,6 @@ OpenGl_Window::OpenGl_Window (const Handle(OpenGl_GraphicDriver)& theDriver, && (EGLContext )theGContext == EGL_NO_CONTEXT)) { throw Aspect_GraphicDeviceDefinitionError("OpenGl_Window, EGL does not provide compatible configurations!"); - return; } EGLSurface anEglSurf = EGL_NO_SURFACE; @@ -225,8 +238,8 @@ OpenGl_Window::OpenGl_Window (const Handle(OpenGl_GraphicDriver)& theDriver, #if !defined(__EMSCRIPTEN__) // eglCreatePbufferSurface() is not implemented by Emscripten EGL const int aSurfAttribs[] = { - EGL_WIDTH, myWidth, - EGL_HEIGHT, myHeight, + EGL_WIDTH, mySize.x(), + EGL_HEIGHT, mySize.y(), // EGL_KHR_gl_colorspace extension specifies if OpenGL should write into window buffer as into sRGB or RGB framebuffer //EGL_GL_COLORSPACE_KHR, !theCaps->sRGBDisable ? EGL_GL_COLORSPACE_SRGB_KHR : EGL_GL_COLORSPACE_LINEAR_KHR, EGL_NONE @@ -258,8 +271,8 @@ OpenGl_Window::OpenGl_Window (const Handle(OpenGl_GraphicDriver)& theDriver, #if !defined(__EMSCRIPTEN__) // eglCreatePbufferSurface() is not implemented by Emscripten EGL const int aSurfAttribs[] = { - EGL_WIDTH, myWidth, - EGL_HEIGHT, myHeight, + EGL_WIDTH, mySize.x(), + EGL_HEIGHT, mySize.y(), // EGL_KHR_gl_colorspace extension specifies if OpenGL should write into window buffer as into sRGB or RGB framebuffer //EGL_GL_COLORSPACE_KHR, !theCaps->sRGBDisable ? EGL_GL_COLORSPACE_SRGB_KHR : EGL_GL_COLORSPACE_LINEAR_KHR, EGL_NONE @@ -322,7 +335,6 @@ OpenGl_Window::OpenGl_Window (const Handle(OpenGl_GraphicDriver)& theDriver, TCollection_AsciiString aMsg ("OpenGl_Window::CreateWindow: ChoosePixelFormat failed. Error code: "); aMsg += (int )GetLastError(); throw Aspect_GraphicDeviceDefinitionError(aMsg.ToCString()); - return; } DescribePixelFormat (aWindowDC, aPixelFrmtId, sizeof(aPixelFrmt), &aPixelFrmt); @@ -435,7 +447,6 @@ OpenGl_Window::OpenGl_Window (const Handle(OpenGl_GraphicDriver)& theDriver, TCollection_AsciiString aMsg("OpenGl_Window::CreateWindow: SetPixelFormat failed. Error code: "); aMsg += (int )GetLastError(); throw Aspect_GraphicDeviceDefinitionError(aMsg.ToCString()); - return; } // create GL context with extra options @@ -526,7 +537,6 @@ OpenGl_Window::OpenGl_Window (const Handle(OpenGl_GraphicDriver)& theDriver, TCollection_AsciiString aMsg ("OpenGl_Window::CreateWindow: wglCreateContext failed. Error code: "); aMsg += (int )GetLastError(); throw Aspect_GraphicDeviceDefinitionError(aMsg.ToCString()); - return; } } @@ -536,7 +546,6 @@ OpenGl_Window::OpenGl_Window (const Handle(OpenGl_GraphicDriver)& theDriver, TCollection_AsciiString aMsg ("OpenGl_Window::CreateWindow: wglShareLists failed. Error code: "); aMsg += (int )GetLastError(); throw Aspect_GraphicDeviceDefinitionError(aMsg.ToCString()); - return; } myGlContext->Init ((Aspect_Handle )aWindow, (Aspect_Handle )aWindowDC, (Aspect_RenderingContext )aGContext, isCoreProfile); @@ -557,12 +566,10 @@ OpenGl_Window::OpenGl_Window (const Handle(OpenGl_GraphicDriver)& theDriver, if (aVis.get() == NULL) { throw Aspect_GraphicDeviceDefinitionError("OpenGl_Window::CreateWindow: XGetVisualInfo is unable to choose needed configuration in existing OpenGL context. "); - return; } else if (glXGetConfig (aDisp, aVis.get(), GLX_USE_GL, &isGl) != 0 || !isGl) { throw Aspect_GraphicDeviceDefinitionError("OpenGl_Window::CreateWindow: window Visual does not support GL rendering!"); - return; } // create new context @@ -635,7 +642,6 @@ OpenGl_Window::OpenGl_Window (const Handle(OpenGl_GraphicDriver)& theDriver, if (aGContext == NULL) { throw Aspect_GraphicDeviceDefinitionError("OpenGl_Window::CreateWindow: glXCreateContext failed."); - return; } } @@ -675,7 +681,7 @@ OpenGl_Window::OpenGl_Window (const Handle(OpenGl_GraphicDriver)& theDriver, #endif myGlContext->Share (theShareCtx); myGlContext->SetSwapInterval (mySwapInterval); - Init(); + init(); } // ======================================================================= @@ -758,29 +764,29 @@ Standard_Boolean OpenGl_Window::Activate() // ======================================================================= void OpenGl_Window::Resize() { - Standard_Integer aWidth = 0, aHeight = 0; - myPlatformWindow->Size (aWidth, aHeight); - if (myWidth == aWidth - && myHeight == aHeight) + Graphic3d_Vec2i aWinSize; + mySizeWindow->Size (aWinSize.x(), aWinSize.y()); + if (mySize == aWinSize) { // if the size is not changed - do nothing return; } - myWidth = aWidth; - myHeight = aHeight; + mySize = aWinSize; - Init(); + init(); } // ======================================================================= -// function : Init +// function : init // purpose : // ======================================================================= -void OpenGl_Window::Init() +void OpenGl_Window::init() { if (!Activate()) + { return; + } #if defined(HAVE_EGL) if ((EGLSurface )myGlContext->myWindow == EGL_NO_SURFACE) @@ -800,7 +806,7 @@ void OpenGl_Window::Init() OpenGl_ColorFormats aColorFormats; aColorFormats.Append (GL_RGBA8); - if (!aDefFbo->InitRenderBuffer (myGlContext, Graphic3d_Vec2i (myWidth, myHeight), aColorFormats, GL_DEPTH24_STENCIL8)) + if (!aDefFbo->InitRenderBuffer (myGlContext, mySize, aColorFormats, GL_DEPTH24_STENCIL8)) { TCollection_AsciiString aMsg ("OpenGl_Window::CreateWindow: default FBO creation failed"); throw Aspect_GraphicDeviceDefinitionError(aMsg.ToCString()); @@ -810,8 +816,8 @@ void OpenGl_Window::Init() } else if (!myPlatformWindow->IsVirtual()) { - eglQuerySurface ((EGLDisplay )myGlContext->myDisplay, (EGLSurface )myGlContext->myWindow, EGL_WIDTH, &myWidth); - eglQuerySurface ((EGLDisplay )myGlContext->myDisplay, (EGLSurface )myGlContext->myWindow, EGL_HEIGHT, &myHeight); + eglQuerySurface ((EGLDisplay )myGlContext->myDisplay, (EGLSurface )myGlContext->myWindow, EGL_WIDTH, &mySize.x()); + eglQuerySurface ((EGLDisplay )myGlContext->myDisplay, (EGLSurface )myGlContext->myWindow, EGL_HEIGHT, &mySize.y()); } #else // @@ -819,7 +825,7 @@ void OpenGl_Window::Init() myGlContext->core11fwd->glDisable (GL_DITHER); myGlContext->core11fwd->glDisable (GL_SCISSOR_TEST); - const Standard_Integer aViewport[4] = { 0, 0, myWidth, myHeight }; + const Standard_Integer aViewport[4] = { 0, 0, mySize.x(), mySize.y() }; myGlContext->ResizeViewport (aViewport); myGlContext->SetDrawBuffer (GL_BACK); if (myGlContext->core11ffp != NULL) diff --git a/src/OpenGl/OpenGl_Window.hxx b/src/OpenGl/OpenGl_Window.hxx index a9c85ac210..daceafb742 100644 --- a/src/OpenGl/OpenGl_Window.hxx +++ b/src/OpenGl/OpenGl_Window.hxx @@ -37,21 +37,26 @@ class OpenGl_Context; class OpenGl_GraphicDriver; -class OpenGl_Window; DEFINE_STANDARD_HANDLE(OpenGl_Window,Standard_Transient) //! This class represents low-level wrapper over window with GL context. //! The window itself should be provided to constructor. class OpenGl_Window : public Standard_Transient { + DEFINE_STANDARD_RTTIEXT(OpenGl_Window, Standard_Transient) public: - //! Main constructor - prepare GL context for specified window. - Standard_EXPORT OpenGl_Window (const Handle(OpenGl_GraphicDriver)& theDriver, - const Handle(Aspect_Window)& thePlatformWindow, - Aspect_RenderingContext theGContext, - const Handle(OpenGl_Caps)& theCaps, - const Handle(OpenGl_Context)& theShareCtx); + //! Empty constructor. + Standard_EXPORT OpenGl_Window(); + + //! Initialize the new window - prepare GL context for specified window. + //! Throws exception in case of failure. + Standard_EXPORT void Init (const Handle(OpenGl_GraphicDriver)& theDriver, + const Handle(Aspect_Window)& thePlatformWindow, + const Handle(Aspect_Window)& theSizeWindow, + Aspect_RenderingContext theGContext, + const Handle(OpenGl_Caps)& theCaps, + const Handle(OpenGl_Context)& theShareCtx); //! Destructor Standard_EXPORT virtual ~OpenGl_Window(); @@ -59,15 +64,17 @@ public: //! Resizes the window. Standard_EXPORT virtual void Resize(); - Handle(Aspect_Window) PlatformWindow() { return myPlatformWindow; } + //! Return platform window. + const Handle(Aspect_Window)& PlatformWindow() { return myPlatformWindow; } - Standard_Integer Width() const { return myWidth; } - Standard_Integer Height() const { return myHeight; } + //! Return window object defining dimensions. + const Handle(Aspect_Window)& SizeWindow() { return mySizeWindow; } - const Handle(OpenGl_Context)& GetGlContext() const { return myGlContext; } + Standard_Integer Width() const { return mySize.x(); } + Standard_Integer Height() const { return mySize.y(); } - //! Activates GL context and setup viewport. - Standard_EXPORT void Init(); + //! Return OpenGL context. + const Handle(OpenGl_Context)& GetGlContext() const { return myGlContext; } //! Makes GL context for this window active in current thread Standard_EXPORT virtual Standard_Boolean Activate(); @@ -75,28 +82,27 @@ public: //! Sets swap interval for this window according to the context's settings. Standard_EXPORT void SetSwapInterval (Standard_Boolean theToForceNoSync); +protected: + + //! Activates GL context and setup viewport. + Standard_EXPORT void init(); + protected: Handle(OpenGl_Context) myGlContext; - Standard_Boolean myOwnGContext; //!< set to TRUE if GL context was not created by this class + Standard_Boolean myOwnGContext; //!< set to TRUE if GL context was not created by this class Handle(Aspect_Window) myPlatformWindow; //!< software platform window wrapper + Handle(Aspect_Window) mySizeWindow; //!< window object defining dimensions #if defined(__APPLE__) #if defined(TARGET_OS_IPHONE) && TARGET_OS_IPHONE UIView* myUIView; #endif - Standard_Integer myWidthPt; //!< window width in logical units - Standard_Integer myHeightPt; //!< window height in logical units + Graphic3d_Vec2i mySizePt; //!< window width x height in logical units #endif - Standard_Integer myWidth; //!< window width in pixels - Standard_Integer myHeight; //!< window height in pixels + Graphic3d_Vec2i mySize; //!< window width x height in pixels Standard_Integer mySwapInterval;//!< last assigned swap interval (VSync) for this window -public: - - DEFINE_STANDARD_RTTIEXT(OpenGl_Window,Standard_Transient) // Type definition - DEFINE_STANDARD_ALLOC - }; #endif //_OpenGl_Window_Header diff --git a/src/OpenGl/OpenGl_Window_1.mm b/src/OpenGl/OpenGl_Window_1.mm index af552243a5..f1cc8c19d5 100644 --- a/src/OpenGl/OpenGl_Window_1.mm +++ b/src/OpenGl/OpenGl_Window_1.mm @@ -56,25 +56,38 @@ - (NSSize )convertSizeToBacking: (NSSize )theSize; // function : OpenGl_Window // purpose : // ======================================================================= -OpenGl_Window::OpenGl_Window (const Handle(OpenGl_GraphicDriver)& theDriver, - const Handle(Aspect_Window)& thePlatformWindow, - Aspect_RenderingContext theGContext, - const Handle(OpenGl_Caps)& theCaps, - const Handle(OpenGl_Context)& theShareCtx) -: myGlContext (new OpenGl_Context (theCaps)), - myOwnGContext (theGContext == 0), - myPlatformWindow (thePlatformWindow), +OpenGl_Window::OpenGl_Window() +: myOwnGContext (false), + mySwapInterval (0) +{ + // +} + +// ======================================================================= +// function : Init +// purpose : +// ======================================================================= +void OpenGl_Window::Init (const Handle(OpenGl_GraphicDriver)& theDriver, + const Handle(Aspect_Window)& thePlatformWindow, + const Handle(Aspect_Window)& theSizeWindow, + Aspect_RenderingContext theGContext, + const Handle(OpenGl_Caps)& theCaps, + const Handle(OpenGl_Context)& theShareCtx) +{ + myGlContext = new OpenGl_Context (theCaps); + myOwnGContext = (theGContext == 0); + myPlatformWindow = thePlatformWindow; + mySizeWindow = theSizeWindow; #if defined(__APPLE__) && defined(TARGET_OS_IPHONE) && TARGET_OS_IPHONE - myUIView (NULL), + myUIView = NULL; #endif - mySwapInterval (theCaps->swapInterval) -{ + mySwapInterval = theCaps->swapInterval; + (void )theDriver; - myPlatformWindow->Size (myWidth, myHeight); + mySizeWindow->Size (mySize.x(), mySize.y()); #if defined(__APPLE__) - myWidthPt = myWidth; - myHeightPt = myHeight; + mySizePt = mySize; #endif #if defined(TARGET_OS_IPHONE) && TARGET_OS_IPHONE @@ -102,7 +115,6 @@ const Handle(OpenGl_Context)& theShareCtx) { TCollection_AsciiString aMsg ("OpenGl_Window::CreateWindow: EAGLContext creation failed"); throw Aspect_GraphicDeviceDefinitionError(aMsg.ToCString()); - return; } } @@ -114,7 +126,6 @@ const Handle(OpenGl_Context)& theShareCtx) { TCollection_AsciiString aMsg ("OpenGl_Window::CreateWindow: EAGLContext can not be assigned"); throw Aspect_GraphicDeviceDefinitionError(aMsg.ToCString()); - return; } myGlContext->Init (aGLContext, Standard_False); @@ -199,7 +210,6 @@ const Handle(OpenGl_Context)& theShareCtx) { TCollection_AsciiString aMsg ("OpenGl_Window::CreateWindow: NSOpenGLContext creation failed"); throw Aspect_GraphicDeviceDefinitionError(aMsg.ToCString()); - return; } if (aTryStereo == 0 @@ -227,7 +237,7 @@ const Handle(OpenGl_Context)& theShareCtx) myGlContext->Share (theShareCtx); myGlContext->SetSwapInterval (mySwapInterval); - Init(); + init(); } // ======================================================================= @@ -266,9 +276,9 @@ const Handle(OpenGl_Context)& theShareCtx) // If the size is not changed - do nothing Standard_Integer aWidthPt = 0; Standard_Integer aHeightPt = 0; - myPlatformWindow->Size (aWidthPt, aHeightPt); - if (myWidthPt == aWidthPt - && myHeightPt == aHeightPt) + mySizeWindow->Size (aWidthPt, aHeightPt); + if (mySizePt.x() == aWidthPt + && mySizePt.y() == aHeightPt) { #if defined(TARGET_OS_IPHONE) && TARGET_OS_IPHONE return; @@ -285,25 +295,25 @@ const Handle(OpenGl_Context)& theShareCtx) NSRect aBounds = [aView bounds]; NSSize aRes = [aView convertSizeToBacking: aBounds.size]; - if (myWidth == Standard_Integer(aRes.width) - && myHeight == Standard_Integer(aRes.height)) + if (mySize.x() == Standard_Integer(aRes.width) + && mySize.y() == Standard_Integer(aRes.height)) { return; } #endif } - myWidthPt = aWidthPt; - myHeightPt = aHeightPt; + mySizePt.x() = aWidthPt; + mySizePt.y() = aHeightPt; - Init(); + init(); } // ======================================================================= -// function : Init +// function : init // purpose : // ======================================================================= -void OpenGl_Window::Init() +void OpenGl_Window::init() { if (!Activate()) { @@ -329,11 +339,11 @@ const Handle(OpenGl_Context)& theShareCtx) myGlContext->Functions()->glGenRenderbuffers (1, &aWinRBColor); myGlContext->Functions()->glBindRenderbuffer (GL_RENDERBUFFER, aWinRBColor); [aGLCtx renderbufferStorage: GL_RENDERBUFFER fromDrawable: anEaglLayer]; - myGlContext->Functions()->glGetRenderbufferParameteriv (GL_RENDERBUFFER, GL_RENDERBUFFER_WIDTH, &myWidth); - myGlContext->Functions()->glGetRenderbufferParameteriv (GL_RENDERBUFFER, GL_RENDERBUFFER_HEIGHT, &myHeight); + myGlContext->Functions()->glGetRenderbufferParameteriv (GL_RENDERBUFFER, GL_RENDERBUFFER_WIDTH, &mySize.x()); + myGlContext->Functions()->glGetRenderbufferParameteriv (GL_RENDERBUFFER, GL_RENDERBUFFER_HEIGHT, &mySize.y()); myGlContext->Functions()->glBindRenderbuffer (GL_RENDERBUFFER, 0); - if (!aDefFbo->InitWithRB (myGlContext, Graphic3d_Vec2i (myWidth, myHeight), GL_RGBA8, GL_DEPTH24_STENCIL8, aWinRBColor)) + if (!aDefFbo->InitWithRB (myGlContext, mySize, GL_RGBA8, GL_DEPTH24_STENCIL8, aWinRBColor)) { TCollection_AsciiString aMsg ("OpenGl_Window::CreateWindow: default FBO creation failed"); throw Aspect_GraphicDeviceDefinitionError(aMsg.ToCString()); @@ -349,8 +359,8 @@ const Handle(OpenGl_Context)& theShareCtx) return; } - myWidth = aDefFbo->GetVPSizeX(); - myHeight = aDefFbo->GetVPSizeY(); + mySize.x() = aDefFbo->GetVPSizeX(); + mySize.y() = aDefFbo->GetVPSizeY(); } myGlContext->SetDefaultFrameBuffer (aDefFbo); aDefFbo->BindBuffer (myGlContext); @@ -368,21 +378,21 @@ const Handle(OpenGl_Context)& theShareCtx) if ([aView respondsToSelector: @selector(convertSizeToBacking:)]) { NSSize aRes = [aView convertSizeToBacking: aBounds.size]; - myWidth = Standard_Integer(aRes.width); - myHeight = Standard_Integer(aRes.height); + mySize.x() = Standard_Integer(aRes.width); + mySize.y() = Standard_Integer(aRes.height); } else { - myWidth = Standard_Integer(aBounds.size.width); - myHeight = Standard_Integer(aBounds.size.height); + mySize.x() = Standard_Integer(aBounds.size.width); + mySize.y() = Standard_Integer(aBounds.size.height); } - myWidthPt = Standard_Integer(aBounds.size.width); - myHeightPt = Standard_Integer(aBounds.size.height); + mySizePt.x() = Standard_Integer(aBounds.size.width); + mySizePt.y() = Standard_Integer(aBounds.size.height); #endif myGlContext->core11fwd->glDisable (GL_DITHER); myGlContext->core11fwd->glDisable (GL_SCISSOR_TEST); - myGlContext->core11fwd->glViewport (0, 0, myWidth, myHeight); + myGlContext->core11fwd->glViewport (0, 0, mySize.x(), mySize.y()); if (myGlContext->GraphicsLibrary() != Aspect_GraphicsLibrary_OpenGLES) { myGlContext->core11fwd->glDrawBuffer (GL_BACK); diff --git a/src/V3d/V3d_View.cxx b/src/V3d/V3d_View.cxx index 7f8eb4afec..f6050cf34b 100644 --- a/src/V3d/V3d_View.cxx +++ b/src/V3d/V3d_View.cxx @@ -16,6 +16,7 @@ #include #include #include +#include #include #include #include @@ -142,6 +143,27 @@ V3d_View::V3d_View (const Handle(V3d_Viewer)& theViewer, const Handle(V3d_View)& //============================================================================= V3d_View::~V3d_View() { + if (myParentView != nullptr) + { + myParentView->RemoveSubview (this); + myParentView = nullptr; + } + { + NCollection_Sequence aSubviews = mySubviews; + mySubviews.Clear(); + for (const Handle(V3d_View)& aViewIter : aSubviews) + { + //aViewIter->Remove(); + aViewIter->myParentView = nullptr; + aViewIter->MyWindow.Nullify(); + aViewIter->myView->Remove(); + if (aViewIter->MyViewer != nullptr) + { + aViewIter->MyViewer->SetViewOff (aViewIter); + } + } + } + if (!myView->IsRemoved()) { myView->Remove(); @@ -164,7 +186,7 @@ void V3d_View::SetMagnify (const Handle(Aspect_Window)& theWindow, Standard_Real aU1, aV1, aU2, aV2; thePreviousView->Convert (theX1, theY1, aU1, aV1); thePreviousView->Convert (theX2, theY2, aU2, aV2); - myView->SetWindow (theWindow); + myView->SetWindow (Handle(Graphic3d_CView)(), theWindow, nullptr); FitAll (aU1, aV1, aU2, aV2); MyViewer->SetViewOn (this); MyWindow = theWindow; @@ -185,10 +207,14 @@ void V3d_View::SetWindow (const Handle(Aspect_Window)& theWindow, { return; } + if (myParentView != nullptr) + { + throw Standard_ProgramError ("V3d_View::SetWindow() called twice"); + } // method V3d_View::SetWindow() should assign the field MyWindow before calling Redraw() MyWindow = theWindow; - myView->SetWindow (theWindow, theContext); + myView->SetWindow (Handle(Graphic3d_CView)(), theWindow, theContext); MyViewer->SetViewOn (this); SetRatio(); if (myImmediateUpdate) @@ -197,6 +223,49 @@ void V3d_View::SetWindow (const Handle(Aspect_Window)& theWindow, } } +//============================================================================= +//function : SetWindow +//purpose : +//============================================================================= +void V3d_View::SetWindow (const Handle(V3d_View)& theParentView, + const Graphic3d_Vec2d& theSize, + Aspect_TypeOfTriedronPosition theCorner, + const Graphic3d_Vec2d& theOffset, + const Graphic3d_Vec2i& theMargins) +{ + if (myView->IsRemoved()) + { + return; + } + + Handle(V3d_View) aParentView = !theParentView->IsSubview() + ? theParentView + : theParentView->ParentView(); + if (aParentView != myParentView) + { + if (myParentView != nullptr) + { + throw Standard_ProgramError ("V3d_View::SetWindow() called twice"); + } + + myParentView = aParentView.get(); + aParentView->AddSubview (this); + } + + Handle(Aspect_NeutralWindow) aWindow = new Aspect_NeutralWindow(); + aWindow->SetVirtual (true); + aWindow->SetSize (4, 4); + myView->SetSubviewCorner (theCorner); + myView->SetSubviewSize (theSize); + myView->SetSubviewOffset (theOffset); + myView->SetSubviewMargins (theMargins); + + MyWindow = aWindow; + myView->SetWindow (aParentView->View(), aWindow, 0); + MyViewer->SetViewOn (this); + SetRatio(); +} + //============================================================================= //function : Remove //purpose : @@ -212,10 +281,83 @@ void V3d_View::Remove() myTrihedron->Erase(); } - MyViewer->DelView (this); + if (myParentView != nullptr) + { + myParentView->RemoveSubview (this); + myParentView = nullptr; + } + { + NCollection_Sequence aSubviews = mySubviews; + mySubviews.Clear(); + for (const Handle(V3d_View)& aViewIter : aSubviews) + { + aViewIter->Remove(); + } + } + + if (MyViewer != nullptr) + { + MyViewer->DelView (this); + MyViewer = nullptr; + } myView->Remove(); - Handle(Aspect_Window)& aWin = const_cast (MyWindow); - aWin.Nullify(); + MyWindow.Nullify(); +} + +// ======================================================================= +// function : AddSubview +// purpose : +// ======================================================================= +void V3d_View::AddSubview (const Handle(V3d_View)& theView) +{ + mySubviews.Append (theView); +} + +// ======================================================================= +// function : RemoveSubview +// purpose : +// ======================================================================= +bool V3d_View::RemoveSubview (const V3d_View* theView) +{ + for (NCollection_Sequence::Iterator aViewIter (mySubviews); aViewIter.More(); aViewIter.Next()) + { + if (aViewIter.Value() == theView) + { + mySubviews.Remove (aViewIter); + return true; + } + } + return false; +} + +// ============================================================================= +// function : PickSubview +// purpose : +// ============================================================================= +Handle(V3d_View) V3d_View::PickSubview (const Graphic3d_Vec2i& thePnt) const +{ + if (thePnt.x() < 0 + || thePnt.x() >= MyWindow->Dimensions().x() + || thePnt.y() < 0 + || thePnt.y() >= MyWindow->Dimensions().y()) + { + return Handle(V3d_View)(); + } + + // iterate in opposite direction - from front to bottom views + for (Standard_Integer aSubviewIter = mySubviews.Upper(); aSubviewIter >= mySubviews.Lower(); --aSubviewIter) + { + const Handle(V3d_View)& aSubview = mySubviews.Value (aSubviewIter); + if (thePnt.x() >= aSubview->View()->SubviewTopLeft().x() + && thePnt.x() < (aSubview->View()->SubviewTopLeft().x() + aSubview->Window()->Dimensions().x()) + && thePnt.y() >= aSubview->View()->SubviewTopLeft().y() + && thePnt.y() < (aSubview->View()->SubviewTopLeft().y() + aSubview->Window()->Dimensions().y())) + { + return aSubview; + } + } + + return this; } //============================================================================= diff --git a/src/V3d/V3d_View.hxx b/src/V3d/V3d_View.hxx index aa4159e1a2..abea2dd347 100644 --- a/src/V3d/V3d_View.hxx +++ b/src/V3d/V3d_View.hxx @@ -76,7 +76,7 @@ DEFINE_STANDARD_HANDLE(V3d_View, Standard_Transient) //! View->Move(15.,-5.,0.,False) (Next motion) class V3d_View : public Standard_Transient { - + DEFINE_STANDARD_RTTIEXT(V3d_View, Standard_Transient) public: //! Initializes the view. @@ -97,6 +97,25 @@ public: Standard_EXPORT void SetWindow (const Handle(Aspect_Window)& theWindow, const Aspect_RenderingContext theContext = NULL); + //! Activates the view as subview of another view. + //! @param[in] theParentView parent view to put subview into + //! @param[in] theSize subview dimensions; + //! values >= 2 define size in pixels, + //! values <= 1.0 define size as a fraction of parent view + //! @param[in] theCorner corner within parent view + //! @param[in] theOffset offset from the corner; + //! values >= 1 define offset in pixels, + //! values < 1.0 define offset as a fraction of parent view + //! @param[in] theMargins subview margins in pixels + //! + //! Example: to split parent view horizontally into 2 subview, + //! define one subview with Size=(0.5,1.0),Offset=(0.0,0.0), and 2nd with Size=(0.5,1.0),Offset=(5.0,0.0); + Standard_EXPORT void SetWindow (const Handle(V3d_View)& theParentView, + const Graphic3d_Vec2d& theSize, + Aspect_TypeOfTriedronPosition theCorner = Aspect_TOTP_LEFT_UPPER, + const Graphic3d_Vec2d& theOffset = Graphic3d_Vec2d(), + const Graphic3d_Vec2i& theMargins = Graphic3d_Vec2i()); + Standard_EXPORT void SetMagnify (const Handle(Aspect_Window)& theWindow, const Handle(V3d_View)& thePreviousView, const Standard_Integer theX1, @@ -953,7 +972,25 @@ public: //! Dumps the content of me into the stream Standard_EXPORT void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const; - DEFINE_STANDARD_RTTIEXT(V3d_View,Standard_Transient) +public: //! @name subvew management + + //! Return TRUE if this is a subview of another view. + bool IsSubview() const { return myParentView != nullptr; } + + //! Return parent View or NULL if this is not a subview. + V3d_View* ParentView() { return myParentView; } + + //! Return subview list. + const NCollection_Sequence& Subviews() const { return mySubviews; } + + //! Pick subview from the given 2D point. + Standard_EXPORT Handle(V3d_View) PickSubview (const Graphic3d_Vec2i& thePnt) const; + + //! Add subview to the list. + Standard_EXPORT void AddSubview (const Handle(V3d_View)& theView); + + //! Remove subview from the list. + Standard_EXPORT bool RemoveSubview (const V3d_View* theView); public: //! @name deprecated methods @@ -1033,6 +1070,10 @@ protected: private: V3d_Viewer* MyViewer; + + NCollection_Sequence mySubviews; + V3d_View* myParentView; + V3d_ListOfLight myActiveLights; gp_Dir myDefaultViewAxis; gp_Pnt myDefaultViewPoint; diff --git a/src/V3d/V3d_Viewer.cxx b/src/V3d/V3d_Viewer.cxx index ad6467fab4..d1ac7efdf4 100644 --- a/src/V3d/V3d_Viewer.cxx +++ b/src/V3d/V3d_Viewer.cxx @@ -143,9 +143,23 @@ void V3d_Viewer::SetViewOff (const Handle(V3d_View)& theView) // ======================================================================== void V3d_Viewer::Redraw() const { - for (V3d_ListOfView::Iterator aDefViewIter (myDefinedViews); aDefViewIter.More(); aDefViewIter.Next()) + for (int aSubViewPass = 0; aSubViewPass < 2; ++aSubViewPass) { - aDefViewIter.Value()->Redraw(); + // redraw subviews first + const bool isSubViewPass = (aSubViewPass == 0); + for (const Handle(V3d_View)& aViewIter : myDefinedViews) + { + if (isSubViewPass + && aViewIter->IsSubview()) + { + aViewIter->Redraw(); + } + else if (!isSubViewPass + && !aViewIter->IsSubview()) + { + aViewIter->Redraw(); + } + } } } @@ -155,9 +169,23 @@ void V3d_Viewer::Redraw() const // ======================================================================== void V3d_Viewer::RedrawImmediate() const { - for (V3d_ListOfView::Iterator aDefViewIter (myDefinedViews); aDefViewIter.More(); aDefViewIter.Next()) + for (int aSubViewPass = 0; aSubViewPass < 2; ++aSubViewPass) { - aDefViewIter.Value()->RedrawImmediate(); + // redraw subviews first + const bool isSubViewPass = (aSubViewPass == 0); + for (const Handle(V3d_View)& aViewIter : myDefinedViews) + { + if (isSubViewPass + && aViewIter->IsSubview()) + { + aViewIter->RedrawImmediate(); + } + else if (!isSubViewPass + && !aViewIter->IsSubview()) + { + aViewIter->RedrawImmediate(); + } + } } } @@ -232,10 +260,24 @@ void V3d_Viewer::AddView (const Handle(V3d_View)& theView) // function : DelView // purpose : // ======================================================================== -void V3d_Viewer::DelView (const Handle(V3d_View)& theView) +void V3d_Viewer::DelView (const V3d_View* theView) { - myActiveViews.Remove (theView); - myDefinedViews.Remove (theView); + for (V3d_ListOfView::Iterator aViewIter (myActiveViews); aViewIter.More(); aViewIter.Next()) + { + if (aViewIter.Value() == theView) + { + myActiveViews.Remove (aViewIter); + break; + } + } + for (V3d_ListOfView::Iterator aViewIter (myDefinedViews); aViewIter.More(); aViewIter.Next()) + { + if (aViewIter.Value() == theView) + { + myDefinedViews.Remove (aViewIter); + break; + } + } } //======================================================================= diff --git a/src/V3d/V3d_Viewer.hxx b/src/V3d/V3d_Viewer.hxx index de405d822a..12bcca7689 100644 --- a/src/V3d/V3d_Viewer.hxx +++ b/src/V3d/V3d_Viewer.hxx @@ -482,7 +482,7 @@ private: Standard_EXPORT void AddView (const Handle(V3d_View)& theView); //! Delete View in Sequence Of Views. - Standard_EXPORT void DelView (const Handle(V3d_View)& theView); + Standard_EXPORT void DelView (const V3d_View* theView); private: diff --git a/src/ViewerTest/ViewerTest.cxx b/src/ViewerTest/ViewerTest.cxx index 35e392a98b..983e07ea79 100644 --- a/src/ViewerTest/ViewerTest.cxx +++ b/src/ViewerTest/ViewerTest.cxx @@ -4776,11 +4776,14 @@ inline Standard_Boolean parseTrsfPersFlag (const TCollection_AsciiString& theFla return Standard_True; } -//! Auxiliary method to parse transformation persistence flags -inline Standard_Boolean parseTrsfPersCorner (const TCollection_AsciiString& theString, - Aspect_TypeOfTriedronPosition& theCorner) +// ============================================================================= +// function : ParseCorner +// purpose : +// ============================================================================= +Standard_Boolean ViewerTest::ParseCorner (Standard_CString theArg, + Aspect_TypeOfTriedronPosition& theCorner) { - TCollection_AsciiString aString (theString); + TCollection_AsciiString aString (theArg); aString.LowerCase(); if (aString == "center") { @@ -4806,25 +4809,33 @@ inline Standard_Boolean parseTrsfPersCorner (const TCollection_AsciiString& theS } else if (aString == "topleft" || aString == "leftupper" - || aString == "upperleft") + || aString == "upperleft" + || aString == "left_upper" + || aString == "upper_left") { theCorner = Aspect_TOTP_LEFT_UPPER; } else if (aString == "bottomleft" || aString == "leftlower" - || aString == "lowerleft") + || aString == "lowerleft" + || aString == "left_lower" + || aString == "lower_left") { theCorner = Aspect_TOTP_LEFT_LOWER; } else if (aString == "topright" || aString == "rightupper" - || aString == "upperright") + || aString == "upperright" + || aString == "right_upper" + || aString == "upper_right") { theCorner = Aspect_TOTP_RIGHT_UPPER; } else if (aString == "bottomright" || aString == "lowerright" - || aString == "rightlower") + || aString == "rightlower" + || aString == "right_lower" + || aString == "lower_right") { theCorner = Aspect_TOTP_RIGHT_LOWER; } @@ -4964,7 +4975,7 @@ static int VDisplay2 (Draw_Interpretor& theDI, if (anArgIter + 1 < theArgNb) { Aspect_TypeOfTriedronPosition aCorner = Aspect_TOTP_CENTER; - if (parseTrsfPersCorner (theArgVec[anArgIter + 1], aCorner)) + if (ViewerTest::ParseCorner (theArgVec[anArgIter + 1], aCorner)) { ++anArgIter; aTrsfPers->SetCorner2d (aCorner); diff --git a/src/ViewerTest/ViewerTest.hxx b/src/ViewerTest/ViewerTest.hxx index 7f0804cbc7..77a0cce553 100644 --- a/src/ViewerTest/ViewerTest.hxx +++ b/src/ViewerTest/ViewerTest.hxx @@ -18,8 +18,10 @@ #include #include #include +#include #include #include +#include #include #include #include @@ -36,6 +38,23 @@ class ViewerTest_EventManager; class TopoDS_Shape; class WNT_WClass; +//! Parameters for creating new view. +struct ViewerTest_VinitParams +{ + TCollection_AsciiString ViewName; + TCollection_AsciiString DisplayName; + Handle(V3d_View) ViewToClone; + Handle(V3d_View) ParentView; + Graphic3d_Vec2d Offset; + Graphic3d_Vec2d Size; + Aspect_TypeOfTriedronPosition Corner; + Graphic3d_Vec2i SubviewMargins; + Standard_Boolean IsVirtual; + Standard_Boolean IsComposer; + + ViewerTest_VinitParams() : Corner (Aspect_TOTP_LEFT_UPPER), IsVirtual (false), IsComposer (false) {} +}; + class ViewerTest { public: @@ -45,25 +64,39 @@ public: //! Loads all Draw commands of V2d & V3d. Used for plugin. Standard_EXPORT static void Factory (Draw_Interpretor& theDI); - //! Creates view with default or custom name - //! and adds this name in map to manage multiple views. + + + //! Creates view with default or custom name and adds this name in map to manage multiple views. //! Implemented in ViewerTest_ViewerCommands.cxx. - //! @param thePxLeft left position of newly created window - //! @param thePxTop top position of newly created window - //! @param thePxWidth width of newly created window - //! @param thePxHeight height of newly created window - //! @param theViewName name of newly created View - //! @oaram theDisplayName display name - //! @param theViewToClone when specified, the new View will copy properties of existing one - //! @param theIsVirtual force creation of virtual off-screen window within interactive session - Standard_EXPORT static TCollection_AsciiString ViewerInit (const Standard_Integer thePxLeft = 0, - const Standard_Integer thePxTop = 0, - const Standard_Integer thePxWidth = 0, - const Standard_Integer thePxHeight = 0, - const TCollection_AsciiString& theViewName = "", - const TCollection_AsciiString& theDisplayName = "", - const Handle(V3d_View)& theViewToClone = Handle(V3d_View)(), - const Standard_Boolean theIsVirtual = false); + Standard_EXPORT static TCollection_AsciiString ViewerInit (const ViewerTest_VinitParams& theParams); + + //! Creates view. + static TCollection_AsciiString ViewerInit (const TCollection_AsciiString& theViewName = "") + { + ViewerTest_VinitParams aParams; + aParams.ViewName = theViewName; + return ViewerInit (aParams); + } + + //! Creates view. + static TCollection_AsciiString ViewerInit (const Standard_Integer thePxLeft, + const Standard_Integer thePxTop, + const Standard_Integer thePxWidth, + const Standard_Integer thePxHeight, + const TCollection_AsciiString& theViewName, + const TCollection_AsciiString& theDisplayName = "", + const Handle(V3d_View)& theViewToClone = Handle(V3d_View)(), + const Standard_Boolean theIsVirtual = false) + { + ViewerTest_VinitParams aParams; + aParams.Offset.SetValues ((float )thePxLeft, (float)thePxTop); + aParams.Size.SetValues ((float)thePxWidth, (float)thePxHeight); + aParams.ViewName = theViewName; + aParams.DisplayName = theDisplayName; + aParams.ViewToClone = theViewToClone; + aParams.IsVirtual = theIsVirtual; + return ViewerInit (aParams); + } Standard_EXPORT static void RemoveViewName (const TCollection_AsciiString& theName); @@ -72,6 +105,10 @@ public: Standard_EXPORT static TCollection_AsciiString GetCurrentViewName(); + //! Make the view active + Standard_EXPORT static void ActivateView (const Handle(V3d_View)& theView, + Standard_Boolean theToUpdate); + //! Removes view and clear all maps //! with information about its resources if necessary Standard_EXPORT static void RemoveView (const TCollection_AsciiString& theViewName, @@ -207,6 +244,10 @@ public: return parseZLayer (theArg, true, theLayer); } + //! Auxiliary method to parse transformation persistence flags + Standard_EXPORT static Standard_Boolean ParseCorner (Standard_CString theArg, + Aspect_TypeOfTriedronPosition& theCorner); + public: //! @name deprecated methods //! Parses RGB(A) color argument(s) specified within theArgVec[0], theArgVec[1], theArgVec[2] and theArgVec[3]. diff --git a/src/ViewerTest/ViewerTest_AutoUpdater.cxx b/src/ViewerTest/ViewerTest_AutoUpdater.cxx index 61f45871fa..7194a1ac56 100644 --- a/src/ViewerTest/ViewerTest_AutoUpdater.cxx +++ b/src/ViewerTest/ViewerTest_AutoUpdater.cxx @@ -108,10 +108,20 @@ void ViewerTest_AutoUpdater::Update() if (!myContext.IsNull()) { myContext->UpdateCurrentViewer(); + if (!myView.IsNull() + && myView->IsSubview() + && myView->ParentView()->Viewer() != myContext->CurrentViewer()) + { + myView->ParentView()->RedrawImmediate(); + } } else if (!myView.IsNull()) { myView->Redraw(); + if (myView->IsSubview()) + { + myView->ParentView()->RedrawImmediate(); + } } } } diff --git a/src/ViewerTest/ViewerTest_EventManager.cxx b/src/ViewerTest/ViewerTest_EventManager.cxx index 772dd1f984..37c192af28 100644 --- a/src/ViewerTest/ViewerTest_EventManager.cxx +++ b/src/ViewerTest/ViewerTest_EventManager.cxx @@ -145,6 +145,30 @@ bool ViewerTest_EventManager::UpdateMouseClick (const Graphic3d_Vec2i& thePoint, return AIS_ViewController::UpdateMouseClick (thePoint, theButton, theModifiers, theIsDoubleClick); } +//======================================================================= +//function : UpdateMouseButtons +//purpose : +//======================================================================= +bool ViewerTest_EventManager::UpdateMouseScroll (const Aspect_ScrollDelta& theDelta) +{ + if (!myView.IsNull() + && (myView->IsSubview() + || !myView->Subviews().IsEmpty())) + { + Handle(V3d_View) aParent = !myView->IsSubview() ? myView : myView->ParentView(); + Handle(V3d_View) aPickedView = aParent->PickSubview (theDelta.Point); + if (!aPickedView.IsNull() + && aPickedView != myView) + { + // switch input focus to another subview + OnSubviewChanged (myCtx, myView, aPickedView); + return true; + } + } + + return AIS_ViewController::UpdateMouseScroll (theDelta); +} + //======================================================================= //function : UpdateMouseButtons //purpose : @@ -154,6 +178,22 @@ bool ViewerTest_EventManager::UpdateMouseButtons (const Graphic3d_Vec2i& thePoin Aspect_VKeyFlags theModifiers, bool theIsEmulated) { + if (!myView.IsNull() + && myMousePressed == Aspect_VKeyMouse_NONE + && theButtons != Aspect_VKeyMouse_NONE + && (myView->IsSubview() + || !myView->Subviews().IsEmpty())) + { + Handle(V3d_View) aParent = !myView->IsSubview() ? myView : myView->ParentView(); + Handle(V3d_View) aPickedView = aParent->PickSubview (thePoint); + if (!aPickedView.IsNull() + && aPickedView != myView) + { + // switch input focus to another subview + OnSubviewChanged (myCtx, myView, aPickedView); + } + } + SetAllowRotation (!ViewerTest_V3dView::IsCurrentViewIn2DMode()); if (theButtons == Aspect_VKeyMouse_LeftButton) @@ -232,22 +272,45 @@ void ViewerTest_EventManager::handleViewRedraw (const Handle(AIS_InteractiveCont //============================================================================== void ViewerTest_EventManager::ProcessConfigure (bool theIsResized) { - if (!myView.IsNull()) + if (myView.IsNull()) { - if (!theIsResized - // track window moves to reverse stereo pair - && myView->RenderingParams().StereoMode != Graphic3d_StereoMode_RowInterlaced - && myView->RenderingParams().StereoMode != Graphic3d_StereoMode_ColumnInterlaced - && myView->RenderingParams().StereoMode != Graphic3d_StereoMode_ChessBoard) - { - return; - } + return; + } - myView->Window()->DoResize(); - myView->MustBeResized(); - myView->Invalidate(); - FlushViewEvents (myCtx, myView, true); + if (!theIsResized + // track window moves to reverse stereo pair + && myView->RenderingParams().StereoMode != Graphic3d_StereoMode_RowInterlaced + && myView->RenderingParams().StereoMode != Graphic3d_StereoMode_ColumnInterlaced + && myView->RenderingParams().StereoMode != Graphic3d_StereoMode_ChessBoard) + { + return; + } + + Handle(V3d_View) aParent = !myView->IsSubview() + ? myView + : myView->ParentView(); + aParent->Window()->DoResize(); + aParent->MustBeResized(); + aParent->Invalidate(); + for (const Handle(V3d_View)& aChildIter : aParent->Subviews()) + { + aChildIter->Window()->DoResize(); + aChildIter->MustBeResized(); + aChildIter->Invalidate(); } + + FlushViewEvents (myCtx, myView, true); +} + +//============================================================================== +//function : OnSubviewChanged +//purpose : +//============================================================================== +void ViewerTest_EventManager::OnSubviewChanged (const Handle(AIS_InteractiveContext)& , + const Handle(V3d_View)& , + const Handle(V3d_View)& theNewView) +{ + ViewerTest::ActivateView (theNewView, false); } //============================================================================== diff --git a/src/ViewerTest/ViewerTest_EventManager.hxx b/src/ViewerTest/ViewerTest_EventManager.hxx index 0bfbe32727..39398a23c5 100644 --- a/src/ViewerTest/ViewerTest_EventManager.hxx +++ b/src/ViewerTest/ViewerTest_EventManager.hxx @@ -79,6 +79,9 @@ public: myPickPntArgVec[2] = theArgZ; } + //! Update mouse scroll event. + Standard_EXPORT virtual bool UpdateMouseScroll (const Aspect_ScrollDelta& theDelta) Standard_OVERRIDE; + //! Handle mouse button click event. Standard_EXPORT virtual bool UpdateMouseClick (const Graphic3d_Vec2i& thePoint, Aspect_VKeyMouse theButton, @@ -116,6 +119,12 @@ public: //! Handle KeyPress event. Standard_EXPORT void ProcessKeyPress (Aspect_VKey theKey); + //! Callback called on Selection of another (sub)view. + //! This method is expected to be called from rendering thread. + Standard_EXPORT virtual void OnSubviewChanged (const Handle(AIS_InteractiveContext)& theCtx, + const Handle(V3d_View)& theOldView, + const Handle(V3d_View)& theNewView) Standard_OVERRIDE; + protected: //! Register hot-keys for specified Action. diff --git a/src/ViewerTest/ViewerTest_OpenGlCommands.cxx b/src/ViewerTest/ViewerTest_OpenGlCommands.cxx index d3ff434e14..1e4b15f9d0 100644 --- a/src/ViewerTest/ViewerTest_OpenGlCommands.cxx +++ b/src/ViewerTest/ViewerTest_OpenGlCommands.cxx @@ -932,7 +932,10 @@ static Standard_Integer VListColors (Draw_Interpretor& theDI, Handle(V3d_View) aView; if (!aDumpFile.IsEmpty()) { - ViewerTest::ViewerInit (0, 0, anImgParams.Width, anImgParams.Height, "TmpDriver/TmpViewer/TmpView"); + ViewerTest_VinitParams aParams; + aParams.Size.SetValues ((float )anImgParams.Width, (float)anImgParams.Height); + aParams.ViewName = "TmpDriver/TmpViewer/TmpView"; + ViewerTest::ViewerInit (aParams); aView = ViewerTest::CurrentView(); aView->SetImmediateUpdate (false); aView->SetBgGradientStyle (Aspect_GradientFillMethod_None, false); diff --git a/src/ViewerTest/ViewerTest_ViewerCommands.cxx b/src/ViewerTest/ViewerTest_ViewerCommands.cxx index e660e85026..29f6e79c3f 100644 --- a/src/ViewerTest/ViewerTest_ViewerCommands.cxx +++ b/src/ViewerTest/ViewerTest_ViewerCommands.cxx @@ -477,28 +477,23 @@ TCollection_AsciiString ViewerTest::GetCurrentViewName () //purpose : Create the window viewer and initialize all the global variable //============================================================================== -TCollection_AsciiString ViewerTest::ViewerInit (const Standard_Integer thePxLeft, - const Standard_Integer thePxTop, - const Standard_Integer thePxWidth, - const Standard_Integer thePxHeight, - const TCollection_AsciiString& theViewName, - const TCollection_AsciiString& theDisplayName, - const Handle(V3d_View)& theViewToClone, - const Standard_Boolean theIsVirtual) +TCollection_AsciiString ViewerTest::ViewerInit (const ViewerTest_VinitParams& theParams) { // Default position and dimension of the viewer window. // Note that left top corner is set to be sufficiently small to have // window fit in the small screens (actual for remote desktops, see #23003). // The position corresponds to the window's client area, thus some // gap is added for window frame to be visible. - Standard_Integer aPxLeft = 20, aPxTop = 40; - Standard_Integer aPxWidth = 409, aPxHeight = 409; + Graphic3d_Vec2d aPxTopLeft (20, 40); + Graphic3d_Vec2d aPxSize (409, 409); Standard_Boolean isDefViewSize = Standard_True; Standard_Boolean toCreateViewer = Standard_False; - const Standard_Boolean isVirtual = Draw_VirtualWindows || theIsVirtual; - if (!theViewToClone.IsNull()) + const Standard_Boolean isVirtual = Draw_VirtualWindows || theParams.IsVirtual; + if (!theParams.ViewToClone.IsNull()) { - theViewToClone->Window()->Size (aPxWidth, aPxHeight); + Graphic3d_Vec2i aCloneSize; + theParams.ViewToClone->Window()->Size (aCloneSize.x(), aCloneSize.y()); + aPxSize = Graphic3d_Vec2d (aCloneSize); isDefViewSize = Standard_False; #if !defined(__EMSCRIPTEN__) (void )isDefViewSize; @@ -522,40 +517,21 @@ TCollection_AsciiString ViewerTest::ViewerInit (const Standard_Integer thePxLeft } Handle(Graphic3d_GraphicDriver) aGraphicDriver; - ViewerTest_Names aViewNames(theViewName); + ViewerTest_Names aViewNames (theParams.ViewName); if (ViewerTest_myViews.IsBound1 (aViewNames.GetViewName())) { aViewNames.SetViewName (aViewNames.GetViewerName() + "/" + CreateName(ViewerTest_myViews, "View")); } - if (thePxLeft != 0) - { - aPxLeft = thePxLeft; - } - if (thePxTop != 0) - { - aPxTop = thePxTop; - } - if (thePxWidth != 0) - { - isDefViewSize = Standard_False; - aPxWidth = thePxWidth; - } - if (thePxHeight != 0) - { - isDefViewSize = Standard_False; - aPxHeight = thePxHeight; - } - // Get graphic driver (create it or get from another view) const bool isNewDriver = !ViewerTest_myDrivers.IsBound1 (aViewNames.GetDriverName()); if (isNewDriver) { // Get connection string #if defined(HAVE_XLIB) - if (!theDisplayName.IsEmpty()) + if (!theParams.DisplayName.IsEmpty()) { - SetDisplayConnection (new Aspect_DisplayConnection (theDisplayName)); + SetDisplayConnection (new Aspect_DisplayConnection (theParams.DisplayName)); } else { @@ -569,7 +545,6 @@ TCollection_AsciiString ViewerTest::ViewerInit (const Standard_Integer thePxLeft SetDisplayConnection (new Aspect_DisplayConnection (aDispX)); } #else - (void)theDisplayName; // avoid warning on unused argument SetDisplayConnection (new Aspect_DisplayConnection ()); #endif @@ -588,53 +563,89 @@ TCollection_AsciiString ViewerTest::ViewerInit (const Standard_Integer thePxLeft aGraphicDriver = ViewerTest_myDrivers.Find1 (aViewNames.GetDriverName()); } - //Dispose the window if input parameters are default - if (!ViewerTest_myViews.IsEmpty() && thePxLeft == 0 && thePxTop == 0) - { - Standard_Integer aTop = 0, - aLeft = 0, - aRight = 0, - aBottom = 0, - aScreenWidth = 0, - aScreenHeight = 0; - - // Get screen resolution + // Get screen resolution + Graphic3d_Vec2i aScreenSize; #if defined(_WIN32) - RECT aWindowSize; - GetClientRect(GetDesktopWindow(), &aWindowSize); - aScreenHeight = aWindowSize.bottom; - aScreenWidth = aWindowSize.right; + RECT aWindowSize; + GetClientRect(GetDesktopWindow(), &aWindowSize); + aScreenSize.SetValues (aWindowSize.right, aWindowSize.bottom); #elif defined(HAVE_XLIB) - ::Display* aDispX = (::Display* )GetDisplayConnection()->GetDisplayAspect(); - Screen* aScreen = DefaultScreenOfDisplay(aDispX); - aScreenWidth = WidthOfScreen(aScreen); - aScreenHeight = HeightOfScreen(aScreen); + ::Display* aDispX = (::Display* )GetDisplayConnection()->GetDisplayAspect(); + Screen* aScreen = DefaultScreenOfDisplay(aDispX); + aScreenSize.x() = WidthOfScreen(aScreen); + aScreenSize.y() = HeightOfScreen(aScreen); #elif defined(__APPLE__) - GetCocoaScreenResolution (aScreenWidth, aScreenHeight); + GetCocoaScreenResolution (aScreenSize.x(), aScreenSize.y()); #else - // not implemented + // not implemented #endif - TCollection_AsciiString anOverlappedViewId(""); + if (!theParams.ParentView.IsNull()) + { + aPxTopLeft.SetValues (0, 0); + } + if (theParams.Offset.x() != 0) + { + aPxTopLeft.x() = theParams.Offset.x(); + } + if (theParams.Offset.y() != 0) + { + aPxTopLeft.y() = theParams.Offset.y(); + } + if (theParams.Size.x() != 0) + { + isDefViewSize = Standard_False; + aPxSize.x() = theParams.Size.x(); + if (aPxSize.x() <= 1.0 + && aScreenSize.x() > 0 + && theParams.ParentView.IsNull()) + { + aPxSize.x() = aPxSize.x() * double(aScreenSize.x()); + } + } + if (theParams.Size.y() != 0) + { + isDefViewSize = Standard_False; + aPxSize.y() = theParams.Size.y(); + if (aPxSize.y() <= 1.0 + && aScreenSize.y() > 0 + && theParams.ParentView.IsNull()) + { + aPxSize.y() = aPxSize.y() * double(aScreenSize.y()); + } + } - while (IsWindowOverlapped (aPxLeft, aPxTop, aPxLeft + aPxWidth, aPxTop + aPxHeight, anOverlappedViewId)) + //Dispose the window if input parameters are default + if (!ViewerTest_myViews.IsEmpty() + && theParams.ParentView.IsNull() + && theParams.Offset.x() == 0 + && theParams.Offset.y() == 0) + { + Standard_Integer aTop = 0, aLeft = 0, aRight = 0, aBottom = 0; + TCollection_AsciiString anOverlappedViewId(""); + while (IsWindowOverlapped ((int )aPxTopLeft.x(), (int )aPxTopLeft.y(), + (int )aPxTopLeft.x() + (int )aPxSize.x(), + (int )aPxTopLeft.y() + (int )aPxSize.y(), anOverlappedViewId)) { ViewerTest_myViews.Find1(anOverlappedViewId)->Window()->Position (aLeft, aTop, aRight, aBottom); - if (IsWindowOverlapped (aRight + 20, aPxTop, aRight + 20 + aPxWidth, aPxTop + aPxHeight, anOverlappedViewId) - && aRight + 2*aPxWidth + 40 > aScreenWidth) + if (IsWindowOverlapped (aRight + 20, (int )aPxTopLeft.y(), aRight + 20 + (int )aPxSize.x(), + (int )aPxTopLeft.y() + (int )aPxSize.y(), anOverlappedViewId) + && aRight + 2 * aPxSize.x() + 40 > aScreenSize.x()) { - if (aBottom + aPxHeight + 40 > aScreenHeight) + if (aBottom + aPxSize.y() + 40 > aScreenSize.y()) { - aPxLeft = 20; - aPxTop = 40; + aPxTopLeft.x() = 20; + aPxTopLeft.y() = 40; break; } - aPxLeft = 20; - aPxTop = aBottom + 40; + aPxTopLeft.x() = 20; + aPxTopLeft.y() = aBottom + 40; } else - aPxLeft = aRight + 20; + { + aPxTopLeft.x() = aRight + 20; + } } } @@ -688,61 +699,76 @@ TCollection_AsciiString ViewerTest::ViewerInit (const Standard_Integer thePxLeft } // Create window -#if defined(_WIN32) - VT_GetWindow() = new WNT_Window (aTitle.ToCString(), WClass(), - isVirtual ? WS_POPUP : WS_OVERLAPPEDWINDOW, - aPxLeft, aPxTop, - aPxWidth, aPxHeight, - Quantity_NOC_BLACK); - VT_GetWindow()->RegisterRawInputDevices (WNT_Window::RawInputMask_SpaceMouse); -#elif defined(HAVE_XLIB) - VT_GetWindow() = new Xw_Window (aGraphicDriver->GetDisplayConnection(), - aTitle.ToCString(), - aPxLeft, aPxTop, - aPxWidth, aPxHeight); -#elif defined(__APPLE__) - VT_GetWindow() = new Cocoa_Window (aTitle.ToCString(), - aPxLeft, aPxTop, - aPxWidth, aPxHeight); - ViewerTest_SetCocoaEventManagerView (VT_GetWindow()); -#elif defined(__EMSCRIPTEN__) - // current EGL implementation in Emscripten supports only one global WebGL canvas returned by Module.canvas property; - // the code should be revised for handling multiple canvas elements (which is technically also possible) - TCollection_AsciiString aCanvasId = getModuleCanvasId(); - if (!aCanvasId.IsEmpty()) + if (!theParams.ParentView.IsNull()) { - aCanvasId = TCollection_AsciiString("#") + aCanvasId; + VT_GetWindow() = Handle(ViewerTest_Window)::DownCast (theParams.ParentView->Window()); } - - VT_GetWindow() = new Wasm_Window (aCanvasId); - Graphic3d_Vec2i aRealSize; - VT_GetWindow()->Size (aRealSize.x(), aRealSize.y()); - if (!isDefViewSize || (aRealSize.x() <= 0 && aRealSize.y() <= 0)) + else { - // Wasm_Window wraps an existing HTML element without creating a new one. - // Keep size defined on a web page instead of defaulting to 409x409 (as in case of other platform), - // but resize canvas if vinit has been called with explicitly specified dimensions. - VT_GetWindow()->SetSizeLogical (Graphic3d_Vec2d (aPxWidth, aPxHeight)); + #if defined(_WIN32) + VT_GetWindow() = new WNT_Window (aTitle.ToCString(), WClass(), + isVirtual ? WS_POPUP : WS_OVERLAPPEDWINDOW, + (int )aPxTopLeft.x(), (int )aPxTopLeft.y(), + (int )aPxSize.x(), (int )aPxSize.y(), + Quantity_NOC_BLACK); + VT_GetWindow()->RegisterRawInputDevices (WNT_Window::RawInputMask_SpaceMouse); + #elif defined(HAVE_XLIB) + VT_GetWindow() = new Xw_Window (aGraphicDriver->GetDisplayConnection(), + aTitle.ToCString(), + (int )aPxTopLeft.x(), (int )aPxTopLeft.y(), + (int )aPxSize.x(), (int )aPxSize.y()); + #elif defined(__APPLE__) + VT_GetWindow() = new Cocoa_Window (aTitle.ToCString(), + (int )aPxTopLeft.x(), (int )aPxTopLeft.y(), + (int )aPxSize.x(), (int )aPxSize.y()); + ViewerTest_SetCocoaEventManagerView (VT_GetWindow()); + #elif defined(__EMSCRIPTEN__) + // current EGL implementation in Emscripten supports only one global WebGL canvas returned by Module.canvas property; + // the code should be revised for handling multiple canvas elements (which is technically also possible) + TCollection_AsciiString aCanvasId = getModuleCanvasId(); + if (!aCanvasId.IsEmpty()) + { + aCanvasId = TCollection_AsciiString("#") + aCanvasId; + } + + VT_GetWindow() = new Wasm_Window (aCanvasId); + Graphic3d_Vec2i aRealSize; + VT_GetWindow()->Size (aRealSize.x(), aRealSize.y()); + if (!isDefViewSize || (aRealSize.x() <= 0 && aRealSize.y() <= 0)) + { + // Wasm_Window wraps an existing HTML element without creating a new one. + // Keep size defined on a web page instead of defaulting to 409x409 (as in case of other platform), + // but resize canvas if vinit has been called with explicitly specified dimensions. + VT_GetWindow()->SetSizeLogical (Graphic3d_Vec2d (aPxSize)); + } + #else + // not implemented + VT_GetWindow() = new Aspect_NeutralWindow(); + VT_GetWindow()->SetSize ((int )aPxSize.x(), (int )aPxSize.y()); + #endif + VT_GetWindow()->SetVirtual (isVirtual); } -#else - // not implemented - VT_GetWindow() = new Aspect_NeutralWindow(); - VT_GetWindow()->SetSize (aPxWidth, aPxHeight); -#endif - VT_GetWindow()->SetVirtual (isVirtual); // View setup Handle(V3d_View) aView; - if (!theViewToClone.IsNull()) + if (!theParams.ViewToClone.IsNull()) { - aView = new ViewerTest_V3dView (a3DViewer, theViewToClone); + aView = new ViewerTest_V3dView (a3DViewer, theParams.ViewToClone); } else { aView = new ViewerTest_V3dView (a3DViewer, a3DViewer->DefaultTypeOfView()); } - aView->SetWindow (VT_GetWindow()); + aView->View()->SetSubviewComposer (theParams.IsComposer); + if (!theParams.ParentView.IsNull()) + { + aView->SetWindow (theParams.ParentView, aPxSize, theParams.Corner, aPxTopLeft, theParams.SubviewMargins); + } + else + { + aView->SetWindow (VT_GetWindow()); + } ViewerTest::GetAISContext()->RedrawImmediate (a3DViewer); ViewerTest::CurrentView(aView); @@ -952,10 +978,7 @@ static int VDriver (Draw_Interpretor& theDi, Standard_Integer theArgsNb, const c //============================================================================== static int VInit (Draw_Interpretor& theDi, Standard_Integer theArgsNb, const char** theArgVec) { - TCollection_AsciiString aViewName, aDisplayName; - Standard_Integer aPxLeft = 0, aPxTop = 0, aPxWidth = 0, aPxHeight = 0; - Standard_Boolean isVirtual = false; - Handle(V3d_View) aCopyFrom; + ViewerTest_VinitParams aParams; TCollection_AsciiString aName, aValue; int is2dMode = -1, aDpiAware = -1; for (Standard_Integer anArgIt = 1; anArgIt < theArgsNb; ++anArgIt) @@ -966,91 +989,128 @@ static int VInit (Draw_Interpretor& theDi, Standard_Integer theArgsNb, const cha if (anArgIt + 1 < theArgsNb && anArgCase == "-name") { - aViewName = theArgVec[++anArgIt]; + aParams.ViewName = theArgVec[++anArgIt]; } else if (anArgIt + 1 < theArgsNb && (anArgCase == "-left" - || anArgCase == "-l")) + || anArgCase == "-l") + && Draw::ParseReal (theArgVec[anArgIt + 1], aParams.Offset.x())) { - aPxLeft = Draw::Atoi (theArgVec[++anArgIt]); + ++anArgIt; } else if (anArgIt + 1 < theArgsNb && (anArgCase == "-top" - || anArgCase == "-t")) + || anArgCase == "-t") + && Draw::ParseReal (theArgVec[anArgIt + 1], aParams.Offset.y())) { - aPxTop = Draw::Atoi (theArgVec[++anArgIt]); + ++anArgIt; } else if (anArgIt + 1 < theArgsNb && (anArgCase == "-width" - || anArgCase == "-w")) + || anArgCase == "-w") + && Draw::ParseReal (theArgVec[anArgIt + 1], aParams.Size.x())) { - aPxWidth = Draw::Atoi (theArgVec[++anArgIt]); + ++anArgIt; } else if (anArgIt + 1 < theArgsNb && (anArgCase == "-height" - || anArgCase == "-h")) + || anArgCase == "-h") + && Draw::ParseReal (theArgVec[anArgIt + 1], aParams.Size.y())) { - aPxHeight = Draw::Atoi (theArgVec[++anArgIt]); + ++anArgIt; + } + else if (anArgIt + 1 < theArgsNb + && (anArgCase == "-pos" + || anArgCase == "-position" + || anArgCase == "-corner") + && ViewerTest::ParseCorner (theArgVec[anArgIt + 1], aParams.Corner)) + { + ++anArgIt; + } + else if (anArgIt + 2 < theArgsNb + && anArgCase == "-margins" + && Draw::ParseInteger (theArgVec[anArgIt + 1], aParams.SubviewMargins.x()) + && Draw::ParseInteger (theArgVec[anArgIt + 2], aParams.SubviewMargins.y())) + { + anArgIt += 2; } else if (anArgCase == "-virtual" || anArgCase == "-offscreen") { - isVirtual = true; - if (anArgIt + 1 < theArgsNb - && Draw::ParseOnOff (theArgVec[anArgIt + 1], isVirtual)) - { - ++anArgIt; - } + aParams.IsVirtual = Draw::ParseOnOffIterator (theArgsNb, theArgVec, anArgIt);; + } + else if (anArgCase == "-composer") + { + aParams.IsComposer = Draw::ParseOnOffIterator (theArgsNb, theArgVec, anArgIt); } else if (anArgCase == "-exitonclose") { - ViewerTest_EventManager::ToExitOnCloseView() = true; - if (anArgIt + 1 < theArgsNb - && Draw::ParseOnOff (theArgVec[anArgIt + 1], ViewerTest_EventManager::ToExitOnCloseView())) - { - ++anArgIt; - } + ViewerTest_EventManager::ToExitOnCloseView() = Draw::ParseOnOffIterator (theArgsNb, theArgVec, anArgIt);; } else if (anArgCase == "-closeonescape" || anArgCase == "-closeonesc") { - ViewerTest_EventManager::ToCloseViewOnEscape() = true; - if (anArgIt + 1 < theArgsNb - && Draw::ParseOnOff (theArgVec[anArgIt + 1], ViewerTest_EventManager::ToCloseViewOnEscape())) - { - ++anArgIt; - } + ViewerTest_EventManager::ToCloseViewOnEscape() = Draw::ParseOnOffIterator (theArgsNb, theArgVec, anArgIt);; } else if (anArgCase == "-2d_mode" || anArgCase == "-2dmode" || anArgCase == "-2d") { - bool toEnable = true; - if (anArgIt + 1 < theArgsNb - && Draw::ParseOnOff (theArgVec[anArgIt + 1], toEnable)) - { - ++anArgIt; - } + bool toEnable = Draw::ParseOnOffIterator (theArgsNb, theArgVec, anArgIt);; is2dMode = toEnable ? 1 : 0; } else if (anArgIt + 1 < theArgsNb && (anArgCase == "-disp" || anArgCase == "-display")) { - aDisplayName = theArgVec[++anArgIt]; + aParams.DisplayName = theArgVec[++anArgIt]; } else if (anArgCase == "-dpiaware") { aDpiAware = Draw::ParseOnOffIterator (theArgsNb, theArgVec, anArgIt) ? 1 : 0; } else if (!ViewerTest::CurrentView().IsNull() - && aCopyFrom.IsNull() + && aParams.ViewToClone.IsNull() && (anArgCase == "-copy" || anArgCase == "-clone" || anArgCase == "-cloneactive" || anArgCase == "-cloneactiveview")) { - aCopyFrom = ViewerTest::CurrentView(); + aParams.ViewToClone = ViewerTest::CurrentView(); + } + else if (!ViewerTest::CurrentView().IsNull() + && aParams.ParentView.IsNull() + && anArgCase == "-subview") + { + aParams.ParentView = ViewerTest::CurrentView(); + if (aParams.ParentView.IsNull()) + { + Message::SendFail() << "Syntax error: cannot create of subview without parent"; + return 1; + } + if (aParams.ParentView->IsSubview()) + { + aParams.ParentView = aParams.ParentView->ParentView(); + } + } + else if (!ViewerTest::CurrentView().IsNull() + && aParams.ParentView.IsNull() + && anArgCase == "-parent" + && anArgIt + 1 < theArgsNb) + { + TCollection_AsciiString aParentStr (theArgVec[++anArgIt]); + ViewerTest_Names aViewNames (aParentStr); + if (!ViewerTest_myViews.IsBound1 (aViewNames.GetViewName())) + { + Message::SendFail() << "Syntax error: parent view '" << aParentStr << "' not found"; + return 1; + } + + aParams.ParentView = ViewerTest_myViews.Find1(aViewNames.GetViewName()); + if (aParams.ParentView->IsSubview()) + { + aParams.ParentView = aParams.ParentView->ParentView(); + } } // old syntax else if (ViewerTest::SplitParameter (anArg, aName, aValue)) @@ -1058,32 +1118,32 @@ static int VInit (Draw_Interpretor& theDi, Standard_Integer theArgsNb, const cha aName.LowerCase(); if (aName == "name") { - aViewName = aValue; + aParams.ViewName = aValue; } else if (aName == "l" || aName == "left") { - aPxLeft = aValue.IntegerValue(); + aParams.Offset.x() = (float)aValue.RealValue(); } else if (aName == "t" || aName == "top") { - aPxTop = aValue.IntegerValue(); + aParams.Offset.y() = (float)aValue.RealValue(); } else if (aName == "disp" || aName == "display") { - aDisplayName = aValue; + aParams.DisplayName = aValue; } else if (aName == "w" || aName == "width") { - aPxWidth = aValue.IntegerValue(); + aParams.Size.x() = (float )aValue.RealValue(); } else if (aName == "h" || aName == "height") { - aPxHeight = aValue.IntegerValue(); + aParams.Size.y() = (float)aValue.RealValue(); } else { @@ -1091,9 +1151,9 @@ static int VInit (Draw_Interpretor& theDi, Standard_Integer theArgsNb, const cha return 1; } } - else if (aViewName.IsEmpty()) + else if (aParams.ViewName.IsEmpty()) { - aViewName = anArg; + aParams.ViewName = anArg; } else { @@ -1134,15 +1194,15 @@ static int VInit (Draw_Interpretor& theDi, Standard_Integer theArgsNb, const cha #else (void )aDpiAware; #if !defined(HAVE_XLIB) - if (!aDisplayName.IsEmpty()) + if (!aParams.DisplayName.IsEmpty()) { - aDisplayName.Clear(); + aParams.DisplayName.Clear(); Message::SendWarning() << "Warning: display parameter will be ignored.\n"; } #endif #endif - ViewerTest_Names aViewNames (aViewName); + ViewerTest_Names aViewNames (aParams.ViewName); if (ViewerTest_myViews.IsBound1 (aViewNames.GetViewName())) { TCollection_AsciiString aCommand = TCollection_AsciiString ("vactivate ") + aViewNames.GetViewName(); @@ -1154,8 +1214,7 @@ static int VInit (Draw_Interpretor& theDi, Standard_Integer theArgsNb, const cha return 0; } - TCollection_AsciiString aViewId = ViewerTest::ViewerInit (aPxLeft, aPxTop, aPxWidth, aPxHeight, - aViewName, aDisplayName, aCopyFrom, isVirtual); + TCollection_AsciiString aViewId = ViewerTest::ViewerInit (aParams); if (is2dMode != -1) { ViewerTest_V3dView::SetCurrentView2DMode (is2dMode == 1); @@ -1422,29 +1481,59 @@ static TCollection_AsciiString FindViewIdByWindowHandle (Aspect_Drawable theWind void ActivateView (const TCollection_AsciiString& theViewName, Standard_Boolean theToUpdate = Standard_True) { - const Handle(V3d_View) aView = ViewerTest_myViews.Find1(theViewName); - if (aView.IsNull()) + if (const Handle(V3d_View) aView = ViewerTest_myViews.Find1(theViewName)) + { + ViewerTest::ActivateView (aView, theToUpdate); + } +} + +//============================================================================== +//function : ActivateView +//purpose : +//============================================================================== +void ViewerTest::ActivateView (const Handle(V3d_View)& theView, + Standard_Boolean theToUpdate) +{ + Handle(V3d_View) aView = theView; + const TCollection_AsciiString* aViewName = ViewerTest_myViews.Seek2 (aView); + if (aViewName == nullptr) { return; } Handle(AIS_InteractiveContext) anAISContext = FindContextByView(aView); - if (!anAISContext.IsNull()) + if (anAISContext.IsNull()) + { + return; + } + + if (const Handle(V3d_View)& aCurrentView = ViewerTest::CurrentView()) { - if (const Handle(V3d_View)& aCurrentView = ViewerTest::CurrentView()) + if (!aCurrentView->Window().IsNull()) { aCurrentView->Window()->SetTitle (TCollection_AsciiString ("3D View - ") + ViewerTest_myViews.Find2 (aCurrentView)); } + } - ViewerTest::CurrentView (aView); - ViewerTest::SetAISContext (anAISContext); - aView->Window()->SetTitle (TCollection_AsciiString("3D View - ") + theViewName + "(*)"); - VT_GetWindow() = Handle(ViewerTest_Window)::DownCast(ViewerTest::CurrentView()->Window()); - SetDisplayConnection(ViewerTest::CurrentView()->Viewer()->Driver()->GetDisplayConnection()); - if (theToUpdate) - { - ViewerTest::CurrentView()->Redraw(); - } + ViewerTest::CurrentView (aView); + ViewerTest::SetAISContext (anAISContext); + if (aView->IsSubview()) + { + aView->ParentView()->Window()->SetTitle (TCollection_AsciiString("3D View - ") + *aViewName + "(*)"); + VT_GetWindow() = Handle(ViewerTest_Window)::DownCast(aView->View()->ParentView()->Window()); + } + else + { + VT_GetWindow() = Handle(ViewerTest_Window)::DownCast(aView->Window()); + } + if (!VT_GetWindow().IsNull()) + { + VT_GetWindow()->SetTitle (TCollection_AsciiString("3D View - ") + *aViewName + "(*)"); + } + SetDisplayConnection(aView->Viewer()->Driver()->GetDisplayConnection()); + if (theToUpdate) + { + aView->Redraw(); } } @@ -1476,22 +1565,33 @@ void ViewerTest::RemoveView (const TCollection_AsciiString& theViewName, const S return; } + Handle(V3d_View) aView = ViewerTest_myViews.Find1(theViewName); + Handle(AIS_InteractiveContext) aCurrentContext = FindContextByView(aView); + ViewerTest_ContinuousRedrawer& aRedrawer = ViewerTest_ContinuousRedrawer::Instance(); + aRedrawer.Stop (aView); + if (!aView->Subviews().IsEmpty()) + { + NCollection_Sequence aSubviews = aView->Subviews(); + for (const Handle(V3d_View)& aSubviewIter : aSubviews) + { + RemoveView (aSubviewIter, isContextRemoved); + } + } + // Activate another view if it's active now if (ViewerTest_myViews.Find1(theViewName) == ViewerTest::CurrentView()) { if (ViewerTest_myViews.Extent() > 1) { - TCollection_AsciiString aNewViewName; for (NCollection_DoubleMap ::Iterator anIter (ViewerTest_myViews); anIter.More(); anIter.Next()) { if (anIter.Key1() != theViewName) { - aNewViewName = anIter.Key1(); + ActivateView (anIter.Value(), true); break; } } - ActivateView (aNewViewName); } else { @@ -1506,14 +1606,11 @@ void ViewerTest::RemoveView (const TCollection_AsciiString& theViewName, const S } // Delete view - Handle(V3d_View) aView = ViewerTest_myViews.Find1(theViewName); - Handle(AIS_InteractiveContext) aCurrentContext = FindContextByView(aView); - ViewerTest_ContinuousRedrawer& aRedrawer = ViewerTest_ContinuousRedrawer::Instance(); - aRedrawer.Stop (aView); - - // Remove view resources ViewerTest_myViews.UnBind1(theViewName); - aView->Window()->Unmap(); + if (!aView->Window().IsNull()) + { + aView->Window()->Unmap(); + } aView->Remove(); #if defined(HAVE_XLIB) @@ -3196,47 +3293,13 @@ static int VZBuffTrihedron (Draw_Interpretor& /*theDI*/, { if (++anArgIter >= theArgNb) { - Message::SendFail() << "Error: wrong syntax at '" << anArg << "'"; + Message::SendFail() << "Syntax error at '" << anArg << "'"; return 1; } - TCollection_AsciiString aPosName (theArgVec[anArgIter]); - aPosName.LowerCase(); - if (aPosName == "center") - { - aPosition = Aspect_TOTP_CENTER; - } - else if (aPosName == "left_lower" - || aPosName == "lower_left" - || aPosName == "leftlower" - || aPosName == "lowerleft") - { - aPosition = Aspect_TOTP_LEFT_LOWER; - } - else if (aPosName == "left_upper" - || aPosName == "upper_left" - || aPosName == "leftupper" - || aPosName == "upperleft") - { - aPosition = Aspect_TOTP_LEFT_UPPER; - } - else if (aPosName == "right_lower" - || aPosName == "lower_right" - || aPosName == "rightlower" - || aPosName == "lowerright") - { - aPosition = Aspect_TOTP_RIGHT_LOWER; - } - else if (aPosName == "right_upper" - || aPosName == "upper_right" - || aPosName == "rightupper" - || aPosName == "upperright") - { - aPosition = Aspect_TOTP_RIGHT_UPPER; - } - else + if (!ViewerTest::ParseCorner (theArgVec[anArgIter], aPosition)) { - Message::SendFail() << "Error: wrong syntax at '" << anArg << "' - unknown position '" << aPosName << "'"; + Message::SendFail() << "Syntax error at '" << anArg << "' - unknown position '" << theArgVec[anArgIter] << "'"; return 1; } } @@ -6158,15 +6221,13 @@ static int VDiffImage (Draw_Interpretor& theDI, Standard_Integer theArgNb, const theDI.Eval (aCommand.ToCString()); } - Standard_Integer aPxLeft = 0; - Standard_Integer aPxTop = 0; - Standard_Integer aWinSizeX = int(anImgRef->SizeX() * 2); - Standard_Integer aWinSizeY = !aDiff.IsNull() && !aPrsNameDiff.IsEmpty() - ? int(anImgRef->SizeY() * 2) - : int(anImgRef->SizeY()); - TCollection_AsciiString aDisplayName; - TCollection_AsciiString aViewId = ViewerTest::ViewerInit (aPxLeft, aPxTop, aWinSizeX, aWinSizeY, - aViewName, aDisplayName); + ViewerTest_VinitParams aParams; + aParams.ViewName = aViewName; + aParams.Size.x() = float(anImgRef->SizeX() * 2); + aParams.Size.y() = !aDiff.IsNull() && !aPrsNameDiff.IsEmpty() + ? float(anImgRef->SizeY() * 2) + : float(anImgRef->SizeY()); + TCollection_AsciiString aViewId = ViewerTest::ViewerInit (aParams); Standard_Real aRatio = anImgRef->Ratio(); Standard_Real aSizeX = 1.0; @@ -13801,8 +13862,9 @@ Makes specified driver active when ActiveName argument is specified. addCmd ("vinit", VInit, /* [vinit] */ R"( vinit [-name viewName] [-left leftPx] [-top topPx] [-width widthPx] [-height heightPx] - [-exitOnClose] [-closeOnEscape] [-cloneActive] [-virtual {on|off}=off] [-2d_mode {on|off}=off] - [-display displayName] [-dpiAware {on|off}] + [-exitOnClose] [-closeOnEscape] [-cloneActive] [-virtual {0|1}]=0 [-2d_mode {0|1}]=0 + [-display displayName] [-dpiAware {0|1}]=0 + [-subview] [-parent OtherView] [-composer {0|1}]=0 [-margins DX DY]=0 Creates new View window with specified name viewName. By default the new view is created in the viewer and in graphic driver shared with active view. -name {driverName/viewerName/viewName | viewerName/viewName | viewName} @@ -13817,6 +13879,7 @@ Display name will be used within creation of graphic driver, when specified. -exitOnClose when specified, closing the view will exit application. -closeOnEscape when specified, view will be closed on pressing Escape. -virtual create an offscreen window within interactive session + -subview create a subview within another view -2d_mode when on, view will not react on rotate scene events -dpiAware override dpi aware hint (Windows platform) Additional commands for operations with views: vclose, vactivate, vviewlist. diff --git a/src/XDEDRAW/XDEDRAW.cxx b/src/XDEDRAW/XDEDRAW.cxx index bb35bd39b5..083ed649d4 100644 --- a/src/XDEDRAW/XDEDRAW.cxx +++ b/src/XDEDRAW/XDEDRAW.cxx @@ -585,7 +585,7 @@ static Standard_Integer show (Draw_Interpretor& di, Standard_Integer argc, const TCollection_AsciiString aViewName = TCollection_AsciiString ("Driver1/Document_") + argv[1] + "/View1"; if (!TPrsStd_AISViewer::Find (aRoot, aDocViewer)) { - ViewerTest::ViewerInit (0, 0, 0, 0, aViewName.ToCString(), ""); + ViewerTest::ViewerInit (aViewName); aDocViewer = TPrsStd_AISViewer::New (aRoot, ViewerTest::GetAISContext()); } @@ -1322,7 +1322,7 @@ static Standard_Integer testDoc (Draw_Interpretor&, aD1->Open(anApp); TCollection_AsciiString aViewName ("Driver1/DummyDocument/View1"); - ViewerTest::ViewerInit (0, 0, 0, 0, aViewName.ToCString(), ""); + ViewerTest::ViewerInit (aViewName); TPrsStd_AISViewer::New (aD1->GetData()->Root(), ViewerTest::GetAISContext()); // get shape tool for shape verification diff --git a/tests/opengl/data/general/multiview1 b/tests/opengl/data/general/multiview1 new file mode 100644 index 0000000000..a783aec3d2 --- /dev/null +++ b/tests/opengl/data/general/multiview1 @@ -0,0 +1,34 @@ +puts "========" +puts "0032886: Visualization, V3d_View - introduce interface for creating a subview" +puts "V1/RootView + V2/ViewLeft + V3/ViewRight" +puts "========" + +pload MODELING VISUALIZATION +vinit V1/RootView -width 1024 -height 512 -composer 0 +vbackground GRAY20 + +vinit V2/ViewLeft -subView -width 0.5 -height 1.0 +vbackground GRAY30 + +box b 1 2 3 +vdisplay -dispMode 1 b +vaspects b -faceBoundaryDraw 1 +vfit +vviewcube vc + +vinit V3/ViewRight -parent V1/RootView -width 0.5 -height 1.0 -left 0.5 +vbackground GRAY40 +psphere s 1 +vdisplay -dispMode 1 s +vaspects s -material SILVER +vfit +vzbufftrihedron + +vactivate V1/RootView +vdump $::imagedir/${::casename}.png + +vactivate V2/ViewLeft +vdump $::imagedir/${::casename}_left.png + +vactivate V3/ViewRight +vdump $::imagedir/${::casename}_right.png diff --git a/tests/opengl/data/general/multiview1ssaa b/tests/opengl/data/general/multiview1ssaa new file mode 100644 index 0000000000..f6d88d431f --- /dev/null +++ b/tests/opengl/data/general/multiview1ssaa @@ -0,0 +1,36 @@ +puts "========" +puts "0032886: Visualization, V3d_View - introduce interface for creating a subview" +puts "V1/RootView + V2/ViewLeft + V3/ViewRight + SSAA" +puts "========" + +pload MODELING VISUALIZATION +vinit V1/RootView -width 1024 -height 512 -composer 1 +vbackground GRAY20 + +vinit V2/ViewLeft -subView -width 0.5 -height 1.0 +vrenderparams -rendScale 2 +vbackground GRAY30 + +box b 1 2 3 +vdisplay -dispMode 1 b +vaspects b -faceBoundaryDraw 1 +vfit +vviewcube vc + +vinit V3/ViewRight -parent V1/RootView -width 0.5 -height 1.0 -left 0.5 +vrenderparams -rendScale 2 +vbackground GRAY40 +psphere s 1 +vdisplay -dispMode 1 s +vaspects s -material SILVER +vfit +vzbufftrihedron + +vactivate V1/RootView +vdump $::imagedir/${::casename}.png + +vactivate V2/ViewLeft +vdump $::imagedir/${::casename}_left.png + +vactivate V3/ViewRight +vdump $::imagedir/${::casename}_right.png diff --git a/tests/opengl/data/general/multiview2 b/tests/opengl/data/general/multiview2 new file mode 100644 index 0000000000..35f819ef08 --- /dev/null +++ b/tests/opengl/data/general/multiview2 @@ -0,0 +1,40 @@ +puts "========" +puts "0032886: Visualization, V3d_View - introduce interface for creating a subview" +puts "V1/RootView + V2/ViewLeft + V2/ViewRightTop + V2/ViewRightBottom" +puts "========" + +pload MODELING VISUALIZATION +vinit V1/RootView -width 768 -height 512 -composer 1 +vbackground GRAY20 + +vinit V2/ViewLeft -parent V1/RootView -width 0.5 -height 1.0 +vbackground GRAY30 +vaxo +vcamera -persp +box b 1 2 3 +vdisplay -dispMode 1 b +vaspects b -faceBoundaryDraw 1 +vfit +vzbufftrihedron + +vinit V2/ViewRightTop -parent V1/RootView -width 0.5 -height 0.5 -corner topRight +vbackground GRAY40 +vaxo +vfit + +vinit V2/ViewRightBottom -parent V1/RootView -width 0.5 -height 0.5 -corner bottomRight +vbackground GRAY50 +vaxo +vfit + +vactivate V1/RootView +vdump $::imagedir/${::casename}.png + +vactivate V2/ViewLeft +vdump $::imagedir/${::casename}_left.png + +vactivate V2/ViewRightTop +vdump $::imagedir/${::casename}_righttop.png + +vactivate V2/ViewRightBottom +vdump $::imagedir/${::casename}_rightbottom.png diff --git a/tests/opengl/data/general/multiview3 b/tests/opengl/data/general/multiview3 new file mode 100644 index 0000000000..73b3efb7ef --- /dev/null +++ b/tests/opengl/data/general/multiview3 @@ -0,0 +1,32 @@ +puts "========" +puts "0032886: Visualization, V3d_View - introduce interface for creating a subview" +puts "V1/RootView + V2/View + V2/ThumbView at corner" +puts "========" + +pload MODELING VISUALIZATION +vinit V1/RootView -width 380 -height 520 +vbackground GRAY20 + +vinit V2/View -parent V1/RootView -width 1.0 -height 1.0 +vbackground GRAY30 +vaxo +vcamera -persp +box b 1 2 3 +vdisplay -dispMode 1 b +vaspects b -faceBoundaryDraw 1 +vfit +vzbufftrihedron + +vinit V2/ThumbView -parent V1/RootView -width 0.25 -height 0.25 -corner bottomRight -top 10 -left 10 +vbackground GRAY40 +vaxo +vfit + +vactivate V1/RootView +vdump $::imagedir/${::casename}.png + +vactivate V2/View +vdump $::imagedir/${::casename}_view.png + +vactivate V2/ThumbView +vdump $::imagedir/${::casename}_thumb.png diff --git a/tests/opengl/data/general/multiview4 b/tests/opengl/data/general/multiview4 new file mode 100644 index 0000000000..15c4496edc --- /dev/null +++ b/tests/opengl/data/general/multiview4 @@ -0,0 +1,26 @@ +puts "========" +puts "0032886: Visualization, V3d_View - introduce interface for creating a subview" +puts "V1/RootView + V1/ThumbView at corner" +puts "========" + +pload MODELING VISUALIZATION +vinit V1/RootView -width 380 -height 520 -composer 0 +vbackground GRAY20 +vaxo +vcamera -persp +box b 1 2 3 +vdisplay -dispMode 1 b +vaspects b -faceBoundaryDraw 1 +vfit +vzbufftrihedron + +vinit V1/ThumbView -parent V1/RootView -width 0.25 -height 0.25 -corner bottomRight -top 10 -left 10 +vbackground GRAY40 +vaxo +vfit + +vactivate V1/RootView +vdump $::imagedir/${::casename}.png + +vactivate V1/ThumbView +vdump $::imagedir/${::casename}_thumb.png diff --git a/tests/opengl/data/general/multiview5 b/tests/opengl/data/general/multiview5 new file mode 100644 index 0000000000..efdb643446 --- /dev/null +++ b/tests/opengl/data/general/multiview5 @@ -0,0 +1,26 @@ +puts "========" +puts "0032886: Visualization, V3d_View - introduce interface for creating a subview" +puts "V1/CompView + V1/ThumbView at corner" +puts "========" + +pload MODELING VISUALIZATION +vinit V1/CompView -width 380 -height 520 -composer 1 +vbackground GRAY20 +vaxo +vcamera -persp +box b 1 2 3 +vdisplay -dispMode 1 b +vaspects b -faceBoundaryDraw 1 +vfit +vzbufftrihedron + +vinit V1/ThumbView -parent V1/CompView -width 0.25 -height 0.25 -corner bottomRight -top 10 -left 10 +vbackground GRAY40 +vaxo +vfit + +vactivate V1/CompView +vdump $::imagedir/${::casename}.png + +vactivate V1/ThumbView +vdump $::imagedir/${::casename}_thumb.png diff --git a/tests/opengl/data/general/multiview6 b/tests/opengl/data/general/multiview6 new file mode 100644 index 0000000000..dac9621b23 --- /dev/null +++ b/tests/opengl/data/general/multiview6 @@ -0,0 +1,53 @@ +puts "========" +puts "0032886: Visualization, V3d_View - introduce interface for creating a subview" +puts "V1/CompView + V2/ViewLeft + V2/ViewRightTop + V2/ViewRightBottom + margins" +puts "========" + +pload MODELING VISUALIZATION +vinit V1/CompView -width 768 -height 512 -composer 1 +vbackground GRAY20 + +vinit V2/ViewLeft -parent V1/CompView -width 0.5 -height 1.0 -margins 2 2 +vbackground GRAY30 +vaxo +vcamera -persp +box b 1 2 3 +vdisplay -dispMode 1 b +vaspects b -faceBoundaryDraw 1 +vfit +vviewcube vc + +vinit V2/ViewRightTop -parent V1/CompView -width 0.5 -height 0.5 -corner topRight -margins 2 2 +vbackground GRAY40 +vaxo +vfit +verase vc -view + +vinit V3/ViewRightBottom -parent V1/CompView -width 0.5 -height 0.5 -corner bottomRight -margins 2 2 +vbackground GRAY50 +psphere s 1 +vdisplay -dispMode 1 s +vaspects s -material SILVER +vaxo +vfit +vzbufftrihedron + +vinit V3/ThumbView -parent V1/CompView -width 100 -height 150 -corner topLeft -top 10 -left 10 -margins 2 2 +vbackground GRAY40 +vaxo +vfit + +vactivate V1/CompView +vdump $::imagedir/${::casename}.png + +vactivate V2/ViewLeft +vdump $::imagedir/${::casename}_left.png + +vactivate V2/ViewRightTop +vdump $::imagedir/${::casename}_righttop.png + +vactivate V3/ThumbView +vdump $::imagedir/${::casename}_thumb.png + +vactivate V3/ViewRightBottom +vdump $::imagedir/${::casename}_rightbottom.png From d8bfee7b03e3f6c9f8f2799c3a782e28d393c83b Mon Sep 17 00:00:00 2001 From: azv Date: Sat, 16 Apr 2022 22:29:47 +0300 Subject: [PATCH 262/639] 0031437: Modeling Data - Offset surface throws exception when trying to evaluate at singularity point Add test case to prove the exception is avoided. --- tests/bugs/moddata_3/bug31437 | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 tests/bugs/moddata_3/bug31437 diff --git a/tests/bugs/moddata_3/bug31437 b/tests/bugs/moddata_3/bug31437 new file mode 100644 index 0000000000..d3de16e574 --- /dev/null +++ b/tests/bugs/moddata_3/bug31437 @@ -0,0 +1,21 @@ +puts "========" +puts "0031437: Offset surface throws e x c e p t i o n when trying to evaluate at singularity point" +puts "========" +puts "" + +restore [locate_data_file bug31437.draw] s + +set dist 2.5 +offset result s -$dist + +svalue s 0 1 x1 y1 z1 +svalue result 0 1 x2 y2 z2 + +set curDist2 [expr ([dval x1] - [dval x2])**2 + ([dval y1] - [dval y2])**2 + ([dval z1] - [dval z2])**2] +if {abs($curDist2 - $dist**2) < 1.e-7} { + puts "OK: offset correct" +} else { + puts "Error: offset is wrong" +} + +checkview -display result -2d -path ${imagedir}/${test_image}.png From 7090725e2b20d77075e4bff422ccec8a78d5bba1 Mon Sep 17 00:00:00 2001 From: kgv Date: Mon, 18 Apr 2022 04:27:35 +0300 Subject: [PATCH 263/639] 0032935: Visualization, TKOpenGles - use size window within OpenGl_Window::init() --- src/OpenGl/OpenGl_Window.cxx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/OpenGl/OpenGl_Window.cxx b/src/OpenGl/OpenGl_Window.cxx index 601396f81c..e3d22a91e4 100644 --- a/src/OpenGl/OpenGl_Window.cxx +++ b/src/OpenGl/OpenGl_Window.cxx @@ -814,7 +814,8 @@ void OpenGl_Window::init() myGlContext->SetDefaultFrameBuffer (aDefFbo); aDefFbo->BindBuffer (myGlContext); } - else if (!myPlatformWindow->IsVirtual()) + else if (!myPlatformWindow->IsVirtual() + && mySizeWindow == myPlatformWindow) { eglQuerySurface ((EGLDisplay )myGlContext->myDisplay, (EGLSurface )myGlContext->myWindow, EGL_WIDTH, &mySize.x()); eglQuerySurface ((EGLDisplay )myGlContext->myDisplay, (EGLSurface )myGlContext->myWindow, EGL_HEIGHT, &mySize.y()); From d7f5072158dd4ecc79f302af42bee8a6f785eed8 Mon Sep 17 00:00:00 2001 From: ifv Date: Mon, 21 Mar 2022 16:55:55 +0300 Subject: [PATCH 264/639] 0032882: Modeling Data - Extrema curve/curve cannot find all solutions Extrema/Extrema_GenExtCC.gxx - estimation of Lipchitz constant is improved Extrema_GlobOptFuncCC.cxx - function value is changed LocOpe/LocOpe_WiresOnShape.cxx - small correction to fix regression lowalgos/extcc/bug32882 - new test case is added some test were updated according new behavior of extrema algo --- src/Extrema/Extrema_GenExtCC.gxx | 51 +++- src/Extrema/Extrema_GlobOptFuncCC.cxx | 15 +- src/IntTools/IntTools_FaceFace.cxx | 4 +- src/IntTools/IntTools_WLineTool.cxx | 354 +------------------------- src/IntTools/IntTools_WLineTool.hxx | 1 - src/LocOpe/LocOpe_WiresOnShape.cxx | 34 ++- tests/bugs/modalg_5/bug23706_10 | 2 +- tests/bugs/modalg_5/bug23706_11 | 9 +- tests/bugs/modalg_6/bug27665 | 2 +- tests/lowalgos/extcc/bug29858_03 | 17 +- tests/lowalgos/extcc/bug32882 | 36 +++ 11 files changed, 144 insertions(+), 381 deletions(-) create mode 100644 tests/lowalgos/extcc/bug32882 diff --git a/src/Extrema/Extrema_GenExtCC.gxx b/src/Extrema/Extrema_GenExtCC.gxx index 969a5b85ae..33826fc5c8 100644 --- a/src/Extrema/Extrema_GenExtCC.gxx +++ b/src/Extrema/Extrema_GenExtCC.gxx @@ -163,7 +163,6 @@ static Standard_Real ProjPOnC(const Pnt& theP, if (aD < aDist) aDist = aD; } - aDist = sqrt(aDist); } return aDist; } @@ -340,10 +339,20 @@ void Extrema_GenExtCC::Perform() aNbInter[1] = anIntervals2->Length() - 1; } } + if (C1.IsClosed() && aNbInter[0] == 1) + { + ChangeIntervals(anIntervals1, 3); + aNbInter[0] = anIntervals1->Length() - 1; + } + if (C2.IsClosed() && aNbInter[1] == 1) + { + ChangeIntervals(anIntervals2, 3); + aNbInter[1] = anIntervals2->Length() - 1; + } // Lipchitz constant computation. const Standard_Real aMaxLC = 10000.; - Standard_Real aLC = 9.0; // Default value. + Standard_Real aLC = 100.0; // Default value. const Standard_Real aMaxDer1 = 1.0 / C1.Resolution(1.0); const Standard_Real aMaxDer2 = 1.0 / C2.Resolution(1.0); Standard_Real aMaxDer = Max(aMaxDer1, aMaxDer2) * Sqrt(2.0); @@ -383,6 +392,43 @@ void Extrema_GenExtCC::Perform() } Extrema_GlobOptFuncCCC2 aFunc (C1, C2); + if (aLC < aMaxLC || aMaxDer > aMaxLC) + { + //Estimation of Lipschitz constant by gradient of optimization function + //using sampling in parameter space. + math_Vector aT(1, 2), aG(1, 2); + Standard_Real aF, aMaxG = 0.; + Standard_Real t1, t2, dt1, dt2; + Standard_Integer n1 = 21, n2 = 21, i1, i2; + dt1 = (C1.LastParameter() - C1.FirstParameter()) / (n1 - 1); + dt2 = (C2.LastParameter() - C2.FirstParameter()) / (n2 - 1); + for (i1 = 1, t1 = C1.FirstParameter(); i1 <= n1; ++i1, t1 += dt1) + { + aT(1) = t1; + for (i2 = 1, t2 = C2.FirstParameter(); i2 <= n2; ++i2, t2 += dt2) + { + aT(2) = t2; + aFunc.Values(aT, aF, aG); + Standard_Real aMod = aG(1)*aG(1) + aG(2)*aG(2); + aMaxG = Max(aMaxG, aMod); + } + } + aMaxG = Sqrt(aMaxG); + if (aMaxG > aMaxDer) + { + aLC = Min(aMaxG, aMaxLC); + isConstLockedFlag = Standard_True; + } + if (aMaxG > 100. * aMaxLC) + { + aLC = 100. * aMaxLC; + isConstLockedFlag = Standard_True; + } + else if (aMaxG < 0.1 * aMaxDer) + { + isConstLockedFlag = Standard_True; + } + } math_GlobOptMin aFinder(&aFunc, myLowBorder, myUppBorder, aLC); aFinder.SetLipConstState(isConstLockedFlag); aFinder.SetContinuity(aContinuity == GeomAbs_C2 ? 2 : 1); @@ -518,7 +564,6 @@ void Extrema_GenExtCC::Perform() aVec(2) = (aCurrent.Y() + aNext.Y()) * 0.5; aFunc.Value(aVec, aVal); - if (Abs(aVal - aF) < Precision::Confusion()) { // It seems the parallel segment is found. diff --git a/src/Extrema/Extrema_GlobOptFuncCC.cxx b/src/Extrema/Extrema_GlobOptFuncCC.cxx index 099f671e87..93b5fd60b0 100644 --- a/src/Extrema/Extrema_GlobOptFuncCC.cxx +++ b/src/Extrema/Extrema_GlobOptFuncCC.cxx @@ -43,7 +43,7 @@ static Standard_Boolean _Value(const Adaptor3d_Curve& C1, return Standard_False; } - F = C2.Value(v).Distance(C1.Value(u)); + F = C2.Value(v).SquareDistance(C1.Value(u)); return Standard_True; } @@ -64,7 +64,7 @@ static Standard_Boolean _Value(const Adaptor2d_Curve2d& C1, return Standard_False; } - F = C2.Value(v).Distance(C1.Value(u)); + F = C2.Value(v).SquareDistance(C1.Value(u)); return Standard_True; } @@ -89,13 +89,14 @@ static Standard_Boolean _Gradient(const Adaptor3d_Curve& C1, C1.D1(X(1), C1D0, C1D1); C2.D1(X(2), C2D0, C2D1); - + G(1) = - (C2D0.X() - C1D0.X()) * C1D1.X() - (C2D0.Y() - C1D0.Y()) * C1D1.Y() - (C2D0.Z() - C1D0.Z()) * C1D1.Z(); G(2) = (C2D0.X() - C1D0.X()) * C2D1.X() + (C2D0.Y() - C1D0.Y()) * C2D1.Y() + (C2D0.Z() - C1D0.Z()) * C2D1.Z(); + G *= 2.; return Standard_True; } @@ -121,8 +122,11 @@ static Standard_Boolean _Gradient(const Adaptor2d_Curve2d& C1, G(1) = - (C2D0.X() - C1D0.X()) * C1D1.X() - (C2D0.Y() - C1D0.Y()) * C1D1.Y(); + G(2) = (C2D0.X() - C1D0.X()) * C2D1.X() + (C2D0.Y() - C1D0.Y()) * C2D1.Y(); + G *= 2.; + return Standard_True; } @@ -166,6 +170,7 @@ static Standard_Boolean _Hessian (const Adaptor3d_Curve& C1, + (C2D0.X() - C1D0.X()) * C2D2.X() + (C2D0.Y() - C1D0.Y()) * C2D2.Y() + (C2D0.Z() - C1D0.Z()) * C2D2.Z(); + H *= 2.; return Standard_True; } @@ -204,10 +209,11 @@ static Standard_Boolean _Hessian (const Adaptor2d_Curve2d& C1, + C2D1.Y() * C2D1.Y() + (C2D0.X() - C1D0.X()) * C2D2.X() + (C2D0.Y() - C1D0.Y()) * C2D2.Y(); + H *= 2.; return Standard_True; } -// C0 +//C0 //======================================================================= //function : Extrema_GlobOptFuncCCC0 @@ -415,6 +421,5 @@ Standard_Boolean Extrema_GlobOptFuncCCC2::Values(const math_Vector& X,Standard_R else isHessianComputed = _Hessian(*myC1_2d, *myC2_2d, X, H); - return (Value(X, F) && Gradient(X, G) && isHessianComputed); } diff --git a/src/IntTools/IntTools_FaceFace.cxx b/src/IntTools/IntTools_FaceFace.cxx index 443783c26e..5e638519ff 100644 --- a/src/IntTools/IntTools_FaceFace.cxx +++ b/src/IntTools/IntTools_FaceFace.cxx @@ -1169,7 +1169,6 @@ void IntTools_FaceFace::MakeCurve(const Standard_Integer Index, tol2d = myTolApprox; } - Standard_Real aReachedTol = Precision::Confusion(); bIsDecomposited = IntTools_WLineTool:: DecompositionOfWLine(WL, myHS1, @@ -1180,7 +1179,6 @@ void IntTools_FaceFace::MakeCurve(const Standard_Integer Index, bAvoidLineConstructor, myTol, aSeqOfL, - aReachedTol, myContext); // aNbSeqOfL=aSeqOfL.Length(); @@ -1188,7 +1186,7 @@ void IntTools_FaceFace::MakeCurve(const Standard_Integer Index, Standard_Real aTolC = 0.; if (bIsDecomposited) { nbiter=aNbSeqOfL; - aTolC = aReachedTol; + aTolC = Precision::Confusion(); } else { nbiter=1; diff --git a/src/IntTools/IntTools_WLineTool.cxx b/src/IntTools/IntTools_WLineTool.cxx index 8e589ffcc8..8d8e1a6b31 100644 --- a/src/IntTools/IntTools_WLineTool.cxx +++ b/src/IntTools/IntTools_WLineTool.cxx @@ -228,203 +228,6 @@ Standard_Boolean IntTools_WLineTool::NotUseSurfacesForApprox(const TopoDS_Face& /////////////////////// DecompositionOfWLine //////////////////////////// -//======================================================================= -//function : CheckTangentZonesExist -//purpose : static subfunction in ComputeTangentZones -//======================================================================= -static -Standard_Boolean CheckTangentZonesExist(const Handle(GeomAdaptor_Surface)& theSurface1, - const Handle(GeomAdaptor_Surface)& theSurface2) -{ - if ( ( theSurface1->GetType() != GeomAbs_Torus ) || - ( theSurface2->GetType() != GeomAbs_Torus ) ) - return Standard_False; - - gp_Torus aTor1 = theSurface1->Torus(); - gp_Torus aTor2 = theSurface2->Torus(); - - if ( aTor1.Location().Distance( aTor2.Location() ) > Precision::Confusion() ) - return Standard_False; - - if ( ( fabs( aTor1.MajorRadius() - aTor2.MajorRadius() ) > Precision::Confusion() ) || - ( fabs( aTor1.MinorRadius() - aTor2.MinorRadius() ) > Precision::Confusion() ) ) - return Standard_False; - - if ( ( aTor1.MajorRadius() < aTor1.MinorRadius() ) || - ( aTor2.MajorRadius() < aTor2.MinorRadius() ) ) - return Standard_False; - - return Standard_True; -} - - -//======================================================================= -//function : ComputeTangentZones -//purpose : static subfunction in DecompositionOfWLine -//======================================================================= -static -Standard_Integer ComputeTangentZones( const Handle(GeomAdaptor_Surface)& theSurface1, - const Handle(GeomAdaptor_Surface)& theSurface2, - const TopoDS_Face& theFace1, - const TopoDS_Face& theFace2, - Handle(TColgp_HArray1OfPnt2d)& theResultOnS1, - Handle(TColgp_HArray1OfPnt2d)& theResultOnS2, - Handle(TColStd_HArray1OfReal)& theResultRadius, - const Handle(IntTools_Context)& aContext) -{ - Standard_Integer aResult = 0; - if ( !CheckTangentZonesExist( theSurface1, theSurface2 ) ) - return aResult; - - - TColgp_SequenceOfPnt2d aSeqResultS1, aSeqResultS2; - TColStd_SequenceOfReal aSeqResultRad; - - gp_Torus aTor1 = theSurface1->Torus(); - gp_Torus aTor2 = theSurface2->Torus(); - - gp_Ax2 anax1( aTor1.Location(), aTor1.Axis().Direction() ); - gp_Ax2 anax2( aTor2.Location(), aTor2.Axis().Direction() ); - Standard_Integer j = 0; - - for ( j = 0; j < 2; j++ ) { - Standard_Real aCoef = ( j == 0 ) ? -1 : 1; - Standard_Real aRadius1 = fabs(aTor1.MajorRadius() + aCoef * aTor1.MinorRadius()); - Standard_Real aRadius2 = fabs(aTor2.MajorRadius() + aCoef * aTor2.MinorRadius()); - - gp_Circ aCircle1( anax1, aRadius1 ); - gp_Circ aCircle2( anax2, aRadius2 ); - - // roughly compute radius of tangent zone for perpendicular case - Standard_Real aCriteria = Precision::Confusion() * 0.5; - - Standard_Real aT1 = aCriteria; - Standard_Real aT2 = aCriteria; - if ( j == 0 ) { - // internal tangency - Standard_Real aR = ( aRadius1 > aTor2.MinorRadius() ) ? aRadius1 : aTor2.MinorRadius(); - //aT1 = aCriteria * aCriteria + aR * aR - ( aR - aCriteria ) * ( aR - aCriteria ); - aT1 = 2. * aR * aCriteria; - aT2 = aT1; - } - else { - // external tangency - Standard_Real aRb = ( aRadius1 > aTor2.MinorRadius() ) ? aRadius1 : aTor2.MinorRadius(); - Standard_Real aRm = ( aRadius1 < aTor2.MinorRadius() ) ? aRadius1 : aTor2.MinorRadius(); - Standard_Real aDelta = aRb - aCriteria; - aDelta *= aDelta; - aDelta -= aRm * aRm; - aDelta /= 2. * (aRb - aRm); - aDelta -= 0.5 * (aRb - aRm); - - aT1 = 2. * aRm * (aRm - aDelta); - aT2 = aT1; - } - aCriteria = ( aT1 > aT2) ? aT1 : aT2; - if ( aCriteria > 0 ) - aCriteria = sqrt( aCriteria ); - - if ( aCriteria > 0.5 * aTor1.MinorRadius() ) { - // too big zone -> drop to minimum - aCriteria = Precision::Confusion(); - } - - GeomAdaptor_Curve aC1( new Geom_Circle(aCircle1) ); - GeomAdaptor_Curve aC2( new Geom_Circle(aCircle2) ); - Extrema_ExtCC anExtrema(aC1, aC2, 0, 2. * M_PI, 0, 2. * M_PI, - Precision::PConfusion(), Precision::PConfusion()); - - if ( anExtrema.IsDone() ) { - - Standard_Integer i = 0; - for ( i = 1; i <= anExtrema.NbExt(); i++ ) { - if ( anExtrema.SquareDistance(i) > aCriteria * aCriteria ) - continue; - - Extrema_POnCurv P1, P2; - anExtrema.Points( i, P1, P2 ); - - Standard_Boolean bFoundResult = Standard_True; - gp_Pnt2d pr1, pr2; - - Standard_Integer surfit = 0; - for ( surfit = 0; surfit < 2; surfit++ ) { - GeomAPI_ProjectPointOnSurf& aProjector = - (surfit == 0) ? aContext->ProjPS(theFace1) : aContext->ProjPS(theFace2); - - gp_Pnt aP3d = (surfit == 0) ? P1.Value() : P2.Value(); - aProjector.Perform(aP3d); - - if(!aProjector.IsDone()) - bFoundResult = Standard_False; - else { - if(aProjector.LowerDistance() > aCriteria) { - bFoundResult = Standard_False; - } - else { - Standard_Real foundU = 0, foundV = 0; - aProjector.LowerDistanceParameters(foundU, foundV); - if ( surfit == 0 ) - pr1 = gp_Pnt2d( foundU, foundV ); - else - pr2 = gp_Pnt2d( foundU, foundV ); - } - } - } - if ( bFoundResult ) { - aSeqResultS1.Append( pr1 ); - aSeqResultS2.Append( pr2 ); - aSeqResultRad.Append( aCriteria ); - - // torus is u and v periodic - const Standard_Real twoPI = M_PI + M_PI; - Standard_Real arr1tmp[2] = {pr1.X(), pr1.Y()}; - Standard_Real arr2tmp[2] = {pr2.X(), pr2.Y()}; - - // iteration on period bounds - for ( Standard_Integer k1 = 0; k1 < 2; k1++ ) { - Standard_Real aBound = ( k1 == 0 ) ? 0 : twoPI; - Standard_Real aShift = ( k1 == 0 ) ? twoPI : -twoPI; - - // iteration on surfaces - for ( Standard_Integer k2 = 0; k2 < 2; k2++ ) { - Standard_Real* arr1 = ( k2 == 0 ) ? arr1tmp : arr2tmp; - Standard_Real* arr2 = ( k2 != 0 ) ? arr1tmp : arr2tmp; - TColgp_SequenceOfPnt2d& aSeqS1 = ( k2 == 0 ) ? aSeqResultS1 : aSeqResultS2; - TColgp_SequenceOfPnt2d& aSeqS2 = ( k2 != 0 ) ? aSeqResultS1 : aSeqResultS2; - - if (fabs(arr1[0] - aBound) < Precision::PConfusion()) { - aSeqS1.Append( gp_Pnt2d( arr1[0] + aShift, arr1[1] ) ); - aSeqS2.Append( gp_Pnt2d( arr2[0], arr2[1] ) ); - aSeqResultRad.Append( aCriteria ); - } - if (fabs(arr1[1] - aBound) < Precision::PConfusion()) { - aSeqS1.Append( gp_Pnt2d( arr1[0], arr1[1] + aShift) ); - aSeqS2.Append( gp_Pnt2d( arr2[0], arr2[1] ) ); - aSeqResultRad.Append( aCriteria ); - } - } - } // - } - } - } - } - aResult = aSeqResultRad.Length(); - - if ( aResult > 0 ) { - theResultOnS1 = new TColgp_HArray1OfPnt2d( 1, aResult ); - theResultOnS2 = new TColgp_HArray1OfPnt2d( 1, aResult ); - theResultRadius = new TColStd_HArray1OfReal( 1, aResult ); - - for ( Standard_Integer i = 1 ; i <= aResult; i++ ) { - theResultOnS1->SetValue( i, aSeqResultS1.Value(i) ); - theResultOnS2->SetValue( i, aSeqResultS2.Value(i) ); - theResultRadius->SetValue( i, aSeqResultRad.Value(i) ); - } - } - return aResult; -} - //======================================================================= //function : IsPointOnBoundary //purpose : static subfunction in DecompositionOfWLine @@ -456,27 +259,6 @@ Standard_Boolean IsPointOnBoundary(const Standard_Real theParameter, return bRet; } -//======================================================================= -//function : IsInsideTanZone -//purpose : Check if point is inside a radial tangent zone. -// static subfunction in DecompositionOfWLine and FindPoint -//======================================================================= -static -Standard_Boolean IsInsideTanZone(const gp_Pnt2d& thePoint, - const gp_Pnt2d& theTanZoneCenter, - const Standard_Real theZoneRadius, - Handle(GeomAdaptor_Surface) theGASurface) -{ - Standard_Real aUResolution = theGASurface->UResolution( theZoneRadius ); - Standard_Real aVResolution = theGASurface->VResolution( theZoneRadius ); - Standard_Real aRadiusSQR = ( aUResolution < aVResolution ) ? aUResolution : aVResolution; - aRadiusSQR *= aRadiusSQR; - if ( thePoint.SquareDistance( theTanZoneCenter ) <= aRadiusSQR ) - return Standard_True; - - return Standard_False; -} - //======================================================================= //function : AdjustByNeighbour //purpose : static subfunction in DecompositionOfWLine @@ -651,72 +433,6 @@ Standard_Boolean FindPoint(const gp_Pnt2d& theFirstPoint, return Standard_False; } -//======================================================================= -//function : FindPoint -//purpose : Find point on the boundary of radial tangent zone -// static subfunction in DecompositionOfWLine -//======================================================================= -static -Standard_Boolean FindPoint(const gp_Pnt2d& theFirstPoint, - const gp_Pnt2d& theLastPoint, - const Standard_Real theUmin, - const Standard_Real theUmax, - const Standard_Real theVmin, - const Standard_Real theVmax, - const gp_Pnt2d& theTanZoneCenter, - const Standard_Real theZoneRadius, - Handle(GeomAdaptor_Surface) theGASurface, - gp_Pnt2d& theNewPoint) { - theNewPoint = theLastPoint; - - if ( !IsInsideTanZone( theLastPoint, theTanZoneCenter, theZoneRadius, theGASurface) ) - return Standard_False; - - Standard_Real aUResolution = theGASurface->UResolution( theZoneRadius ); - Standard_Real aVResolution = theGASurface->VResolution( theZoneRadius ); - - Standard_Real aRadius = ( aUResolution < aVResolution ) ? aUResolution : aVResolution; - gp_Ax22d anAxis( theTanZoneCenter, gp_Dir2d(1, 0), gp_Dir2d(0, 1) ); - gp_Circ2d aCircle( anAxis, aRadius ); - - // - gp_Vec2d aDir( theLastPoint.XY() - theFirstPoint.XY() ); - Standard_Real aLength = aDir.Magnitude(); - if ( aLength <= gp::Resolution() ) - return Standard_False; - gp_Lin2d aLine( theFirstPoint, aDir ); - - // - Handle(Geom2d_Line) aCLine = new Geom2d_Line( aLine ); - Handle(Geom2d_TrimmedCurve) aC1 = new Geom2d_TrimmedCurve( aCLine, 0, aLength ); - Handle(Geom2d_Circle) aC2 = new Geom2d_Circle( aCircle ); - - Standard_Real aTol = aRadius * 0.001; - aTol = ( aTol < Precision::PConfusion() ) ? Precision::PConfusion() : aTol; - - Geom2dAPI_InterCurveCurve anIntersector; - anIntersector.Init( aC1, aC2, aTol ); - - if ( anIntersector.NbPoints() == 0 ) - return Standard_False; - - Standard_Boolean aFound = Standard_False; - Standard_Real aMinDist = aLength * aLength; - Standard_Integer i = 0; - for ( i = 1; i <= anIntersector.NbPoints(); i++ ) { - gp_Pnt2d aPInt = anIntersector.Point( i ); - if ( aPInt.SquareDistance( theFirstPoint ) < aMinDist ) { - if ( ( aPInt.X() >= theUmin ) && ( aPInt.X() <= theUmax ) && - ( aPInt.Y() >= theVmin ) && ( aPInt.Y() <= theVmax ) ) { - theNewPoint = aPInt; - aFound = Standard_True; - } - } - } - - return aFound; -} - //======================================================================= //function : DecompositionOfWLine //purpose : @@ -731,7 +447,6 @@ Standard_Boolean IntTools_WLineTool:: const Standard_Boolean theAvoidLConstructor, const Standard_Real theTol, IntPatch_SequenceOfLine& theNewLines, - Standard_Real& theReachedTol3d, const Handle(IntTools_Context)& aContext) { Standard_Boolean bRet, bAvoidLineConstructor; @@ -757,13 +472,7 @@ Standard_Boolean IntTools_WLineTool:: TColStd_Array1OfListOfInteger anArrayOfLines(1, aNbPnts); TColStd_Array1OfInteger anArrayOfLineType(1, aNbPnts); TColStd_ListOfInteger aListOfPointIndex; - - Handle(TColgp_HArray1OfPnt2d) aTanZoneS1; - Handle(TColgp_HArray1OfPnt2d) aTanZoneS2; - Handle(TColStd_HArray1OfReal) aTanZoneRadius; - Standard_Integer aNbZone = ComputeTangentZones( theSurface1, theSurface2, theFace1, theFace2, - aTanZoneS1, aTanZoneS2, aTanZoneRadius, aContext); - + // nblines=0; aTol=Precision::Confusion(); @@ -834,24 +543,6 @@ Standard_Boolean IntTools_WLineTool:: bIsCurrentPointOnBoundary = Standard_True; break; } - else { - // check if a point belong to a tangent zone. Begin - Standard_Integer zIt = 0; - for ( zIt = 1; zIt <= aNbZone; zIt++ ) { - gp_Pnt2d aPZone = (i == 0) ? aTanZoneS1->Value(zIt) : aTanZoneS2->Value(zIt); - Standard_Real aZoneRadius = aTanZoneRadius->Value(zIt); - - if ( IsInsideTanZone(gp_Pnt2d( U, V ), aPZone, aZoneRadius, aGASurface ) ) { - // set boundary flag to split the curve by a tangent zone - bIsPointOnBoundary = Standard_True; - bIsCurrentPointOnBoundary = Standard_True; - if ( theReachedTol3d < aZoneRadius ) { - theReachedTol3d = aZoneRadius; - } - break; - } - } - } }//for(j = 0; j < 2; j++) { if(bIsCurrentPointOnBoundary){ @@ -930,7 +621,7 @@ Standard_Boolean IntTools_WLineTool:: Standard_Integer nbboundaries = 0; Standard_Boolean bIsNearBoundary = Standard_False; - Standard_Integer aZoneIndex = 0; + //Standard_Integer aZoneIndex = 0; Standard_Integer bIsUBoundary = Standard_False; // use if nbboundaries == 1 Standard_Integer bIsFirstBoundary = Standard_False; // use if nbboundaries == 1 @@ -980,32 +671,6 @@ Standard_Boolean IntTools_WLineTool:: } } - // check if a point belong to a tangent zone. Begin - for ( Standard_Integer zIt = 1; zIt <= aNbZone; zIt++ ) { - gp_Pnt2d aPZone = (surfit == 0) ? aTanZoneS1->Value(zIt) : aTanZoneS2->Value(zIt); - Standard_Real aZoneRadius = aTanZoneRadius->Value(zIt); - - Standard_Integer aneighbourpointindex1 = (j == 0) ? iFirst : iLast; - const IntSurf_PntOn2S& aNeighbourPoint = theWLine->Point(aneighbourpointindex1); - Standard_Real nU1, nV1; - - if(surfit == 0) - aNeighbourPoint.ParametersOnS1(nU1, nV1); - else - aNeighbourPoint.ParametersOnS2(nU1, nV1); - gp_Pnt2d ap1(nU1, nV1); - gp_Pnt2d ap2 = AdjustByNeighbour( ap1, gp_Pnt2d( U, V ), aGASurface ); - - - if ( IsInsideTanZone( ap2, aPZone, aZoneRadius, aGASurface ) ) { - aZoneIndex = zIt; - bIsNearBoundary = Standard_True; - if ( theReachedTol3d < aZoneRadius ) { - theReachedTol3d = aZoneRadius; - } - } - } - // check if a point belong to a tangent zone. End Standard_Boolean bComputeLineEnd = Standard_False; if(nbboundaries == 2) { @@ -1144,20 +809,7 @@ Standard_Boolean IntTools_WLineTool:: gp_Pnt2d ap1(nU1, nV1); gp_Pnt2d ap2; - - if ( aZoneIndex ) { - // exclude point from a tangent zone - anewpoint = AdjustByNeighbour( ap1, anewpoint, aGASurface ); - gp_Pnt2d aPZone = (surfit == 0) ? aTanZoneS1->Value(aZoneIndex) : aTanZoneS2->Value(aZoneIndex); - Standard_Real aZoneRadius = aTanZoneRadius->Value(aZoneIndex); - - if ( FindPoint(ap1, anewpoint, umin, umax, vmin, vmax, - aPZone, aZoneRadius, aGASurface, ap2) ) { - anewpoint = ap2; - found = Standard_True; - } - } - else if ( aGASurface->IsUPeriodic() || aGASurface->IsVPeriodic() ) { + if ( aGASurface->IsUPeriodic() || aGASurface->IsVPeriodic() ) { // re-compute point near boundary if shifted on a period ap2 = AdjustByNeighbour( ap1, anewpoint, aGASurface ); diff --git a/src/IntTools/IntTools_WLineTool.hxx b/src/IntTools/IntTools_WLineTool.hxx index 89bb5a446a..a70fe4d503 100644 --- a/src/IntTools/IntTools_WLineTool.hxx +++ b/src/IntTools/IntTools_WLineTool.hxx @@ -46,7 +46,6 @@ public: const Standard_Boolean theAvoidLConstructor, const Standard_Real theTol, IntPatch_SequenceOfLine& theNewLines, - Standard_Real& theReachedTol3d, const Handle(IntTools_Context)& ); }; diff --git a/src/LocOpe/LocOpe_WiresOnShape.cxx b/src/LocOpe/LocOpe_WiresOnShape.cxx index d3fbe5ef25..3ccfa9f8dc 100644 --- a/src/LocOpe/LocOpe_WiresOnShape.cxx +++ b/src/LocOpe/LocOpe_WiresOnShape.cxx @@ -1295,6 +1295,10 @@ void FindInternalIntersections(const TopoDS_Edge& theEdge, Standard_Real aTolV[2]; aTolV[0] =BRep_Tool::Tolerance(theVertices[0]); aTolV[1] =BRep_Tool::Tolerance(theVertices[1]); + Standard_Real ext = 16.; // = 4 * 4 - to avoid creating microedges, area around vertices is increased + // up to 4 vertex tolerance. Such approach is usual for other topological + // algorithms, for example, Boolean Operations. + Standard_Real aTolVExt[2] = { ext * aTolV[0] * aTolV[0], ext * aTolV[1] * aTolV[1] }; BRepAdaptor_Curve2d thePCurve(theEdge, theFace); Bnd_Box2d theBox; @@ -1304,6 +1308,9 @@ void FindInternalIntersections(const TopoDS_Edge& theEdge, Standard_Real aFpar, aLpar; const Handle(Geom_Curve)& theCurve = BRep_Tool::Curve(theEdge, thePar[0], thePar[1]); GeomAdaptor_Curve theGAcurve(theCurve, thePar[0], thePar[1]); + Standard_Real aTolV2d[2] = { theGAcurve.Resolution(aTolV[0]), theGAcurve.Resolution(aTolV[1]) }; + aTolV2d[0] = Max(aTolV2d[0], Precision::PConfusion()); + aTolV2d[1] = Max(aTolV2d[1], Precision::PConfusion()); Standard_Real aDistMax = Precision::Confusion() * Precision::Confusion(); TopExp_Explorer Explo(theFace, TopAbs_EDGE); for (; Explo.More(); Explo.Next()) @@ -1330,6 +1337,23 @@ void FindInternalIntersections(const TopoDS_Edge& theEdge, isOverlapped = Standard_True; return; } + // Check extremity distances + Standard_Real dists[4]; + gp_Pnt aP11, aP12, aP21, aP22; + anExtrema.TrimmedSquareDistances(dists[0], dists[1], dists[2], dists[3], + aP11, aP12, aP21, aP22); + for (i = 0; i < 4; ++i) + { + if (i < 2) + j = 0; + else + j = 1; + if (dists[i] < aTolVExt[j] / ext) + { + return; + } + } + for (i = 1; i <= aNbExt; i++) { Standard_Real aDist = anExtrema.SquareDistance(i); @@ -1342,7 +1366,7 @@ void FindInternalIntersections(const TopoDS_Edge& theEdge, Standard_Real anIntPar = aPOnC2.Parameter(); for (j = 0; j < 2; j++) //try to find intersection on an extremity of "theEdge" { - if (Abs(theIntPar - thePar[j]) <= Precision::PConfusion()) + if (Abs(theIntPar - thePar[j]) <= aTolV2d[j]) break; } //intersection found in the middle of the edge @@ -1351,10 +1375,10 @@ void FindInternalIntersections(const TopoDS_Edge& theEdge, gp_Pnt aPoint = aCurve->Value(anIntPar); gp_Pnt aPointInt = theCurve->Value(theIntPar); - if (aPointInt.SquareDistance(thePnt[0]) > aTolV[0] * aTolV[0] && - aPointInt.SquareDistance(thePnt[1]) > aTolV[1] * aTolV[1] && - aPoint.SquareDistance(thePnt[0]) > aTolV[0] * aTolV[0] && - aPoint.SquareDistance(thePnt[1]) > aTolV[1] * aTolV[1]) + if (aPointInt.SquareDistance(thePnt[0]) > aTolVExt[0] && + aPointInt.SquareDistance(thePnt[1]) > aTolVExt[1] && + aPoint.SquareDistance(thePnt[0]) > aTolVExt[0] && + aPoint.SquareDistance(thePnt[1]) > aTolVExt[1]) { SplitPars.Append(theIntPar); if( aDist > aDistMax) diff --git a/tests/bugs/modalg_5/bug23706_10 b/tests/bugs/modalg_5/bug23706_10 index d80c11f0e4..6a5d69e19d 100755 --- a/tests/bugs/modalg_5/bug23706_10 +++ b/tests/bugs/modalg_5/bug23706_10 @@ -13,7 +13,7 @@ set info [extrema r3 r4] if {[regexp "ext_1" $info]} { set dist [lindex [length ext_1] end] - if { $dist > 4.0e-13 } { + if { $dist > 5.0e-11 } { puts "Error: Extrema distance is too big" } } else { diff --git a/tests/bugs/modalg_5/bug23706_11 b/tests/bugs/modalg_5/bug23706_11 index b1afdfe5a0..9df8d5c5f4 100755 --- a/tests/bugs/modalg_5/bug23706_11 +++ b/tests/bugs/modalg_5/bug23706_11 @@ -10,8 +10,11 @@ bsplinecurve r1 2 5 1 3 2 1 3 1 4 1 5 3 2 5 3 1 3 7 3 1 4 8 3 1 4 8 3 1 5 9 3 1 bsplinecurve r2 2 5 2 3 2.5 1 3 1 3.5 1 4 3 -1 2 3 1 1 11 3 1 3 9 3 1 3 9 3 1 3 9 3 1 5 7 3 1 7 4 3 1 set info [extrema r1 r2] -if { [llength $info] != 1 } { - puts "Error : Extrema is wrong" +if {[regexp "ext_1" $info]} { + set dist [lindex [length ext_1] end] + if { $dist > 1.0e-8 } { + puts "Error: Extrema distance is too big" + } } else { - puts "OK: Extrema is valid" + puts "Error: Extrema is not found" } diff --git a/tests/bugs/modalg_6/bug27665 b/tests/bugs/modalg_6/bug27665 index 85fe8294f2..7fa5fc9be7 100644 --- a/tests/bugs/modalg_6/bug27665 +++ b/tests/bugs/modalg_6/bug27665 @@ -5,7 +5,7 @@ puts "" ################################################# # BrepExrtrema_DistShapeShape bad performance on OCCT 6.7.0 ################################################# -cpulimit 100 +cpulimit 500 restore [locate_data_file bug27665_wircmpd.brep] w explode w diff --git a/tests/lowalgos/extcc/bug29858_03 b/tests/lowalgos/extcc/bug29858_03 index 7058727e53..51702e229d 100644 --- a/tests/lowalgos/extcc/bug29858_03 +++ b/tests/lowalgos/extcc/bug29858_03 @@ -18,11 +18,12 @@ mkcurve c2 e2 set info [extrema c1 c2] # Check result -regexp {Extrema 1 is point : +([-0-9.+eE]+) +([-0-9.+eE]+) +([-0-9.+eE]+)} $info full x y z -# Point check -set good_x 0.0 -set good_y 0.070710562195021642 -set good_z -0.65305318986891325 -checkreal "Intersection point x:" ${x} ${good_x} 0.01 0.01 -checkreal "Intersection point y:" ${y} ${good_y} 0.01 0.01 -checkreal "Intersection point z:" ${z} ${good_z} 0.01 0.01 \ No newline at end of file +if {[regexp "ext_1" $info]} { + set dist [lindex [length ext_1] end] + if { $dist > 1.0e-10 } { + puts "Error: Extrema distance is too big" + } +} else { + puts "Error: Extrema is not found" +} + diff --git a/tests/lowalgos/extcc/bug32882 b/tests/lowalgos/extcc/bug32882 new file mode 100644 index 0000000000..9e91bbedf6 --- /dev/null +++ b/tests/lowalgos/extcc/bug32882 @@ -0,0 +1,36 @@ +puts "========" +puts "OCC32882: Modeling Data - Extrema curve/curve cannot find all solutions" +puts "========" +puts "" + + +# Read input +restore [locate_data_file bug32882.brep] cc +explode cc + +# Extract geometry from topology +mkcurve c1 cc_1 +mkcurve c2 cc_2 +mkcurve c3 cc_3 + +# Run extrema c1/c3 +set info [extrema c1 c3] + +# Check number of solution +if { [llength $info] != 3 } { + puts "Error: Invalid extrema number in extrema c1-c3 output" +} + +# Check result +checklength ext_1 -l 2.929642751e-14 -eps .01 +checklength ext_2 -l 3.480934286e-14 -eps .01 +checklength ext_3 -l 3.177643716e-14 -eps .01 + +# Run extrema c3/c2 +set info [extrema c3 c2] +# Check number of solutions +if { [llength $info] != 2 } { + puts "Error: Invalid extrema number in extrema c3-c2 output" +} +checklength ext_1 -l 5.684341886e-14 -eps .01 +checklength ext_2 -l 2.929642751e-14 -eps .01 From 1f45f213585eaf349bf41c2219c83fd9af8bae1f Mon Sep 17 00:00:00 2001 From: jgv Date: Wed, 30 Mar 2022 04:28:02 +0300 Subject: [PATCH 265/639] 0032721: Modeling Algorithms - BOP wrong results on a cone and an extrusion 1. Modify method IntPatch_ALineToWLine::MakeWLine: add correction of end points of each line on 2 surfaces if an end point is a pole on a surface. 2. Modify method IntPatch_WLine::ComputeVertexParameters: adjust a point on curve to corresponding vertex the following way: set 3D point as the point of the vertex and 2D points as the points of the point on curve. --- src/IntPatch/IntPatch_ALineToWLine.cxx | 132 ++++++++++++++++++++++--- src/IntPatch/IntPatch_ALineToWLine.hxx | 8 ++ src/IntPatch/IntPatch_WLine.cxx | 39 ++++++-- src/IntSurf/IntSurf_LineOn2S.hxx | 7 +- src/IntSurf/IntSurf_LineOn2S.lxx | 6 ++ tests/bugs/modalg_7/bug29807_b3a | 2 - tests/bugs/modalg_7/bug29807_b5a | 3 - tests/bugs/modalg_8/bug32721 | 35 +++++++ tests/lowalgos/intss/bug29807_i1002 | 4 +- tests/lowalgos/intss/bug29807_i1003 | 4 +- tests/lowalgos/intss/bug29807_i1004 | 4 +- tests/lowalgos/intss/bug29807_i1005 | 4 +- tests/lowalgos/intss/bug29807_i3002 | 4 +- tests/lowalgos/intss/bug29807_i3004 | 4 +- tests/lowalgos/intss/bug29807_i3005 | 4 +- 15 files changed, 230 insertions(+), 30 deletions(-) create mode 100644 tests/bugs/modalg_8/bug32721 diff --git a/src/IntPatch/IntPatch_ALineToWLine.cxx b/src/IntPatch/IntPatch_ALineToWLine.cxx index 8d9480f3b0..001d901a59 100644 --- a/src/IntPatch/IntPatch_ALineToWLine.cxx +++ b/src/IntPatch/IntPatch_ALineToWLine.cxx @@ -29,7 +29,7 @@ //function : AddPointIntoLine //purpose : //======================================================================= -static inline void AddPointIntoLine(Handle(IntSurf_LineOn2S) theLine, +static inline void AddPointIntoLine(Handle(IntSurf_LineOn2S)& theLine, const Standard_Real* const theArrPeriods, IntSurf_PntOn2S &thePoint, IntPatch_Point* theVertex = 0) @@ -252,6 +252,69 @@ void IntPatch_ALineToWLine::SetTolOpenDomain(const Standard_Real aTol) return myTolOpenDomain; } +//======================================================================= +//function : CorrectEndPoint +//purpose : +//======================================================================= +void IntPatch_ALineToWLine::CorrectEndPoint(Handle(IntSurf_LineOn2S)& theLine, + const Standard_Integer theIndex) const +{ + const Standard_Real aTol = 1.e-5; + const Standard_Real aSqTol = 1.e-10; + + //Perform linear extrapolation from two previous points + Standard_Integer anIndFirst, anIndSecond; + if (theIndex == 1) + { + anIndFirst = 3; + anIndSecond = 2; + } + else + { + anIndFirst = theIndex - 2; + anIndSecond = theIndex - 1; + } + IntSurf_PntOn2S aPntOn2S = theLine->Value(theIndex); + + for (Standard_Integer ii = 1; ii <= 2; ii++) + { + Standard_Boolean anIsOnFirst = (ii == 1); + + const IntSurf_Quadric& aQuad = (ii == 1)? myQuad1 : myQuad2; + if (aQuad.TypeQuadric() == GeomAbs_Cone) + { + const gp_Cone aCone = aQuad.Cone(); + const gp_Pnt anApex = aCone.Apex(); + if (anApex.SquareDistance (aPntOn2S.Value()) > aSqTol) + continue; + } + else if (aQuad.TypeQuadric() == GeomAbs_Sphere) + { + Standard_Real aU, aV; + aPntOn2S.ParametersOnSurface(anIsOnFirst, aU, aV); + if (Abs(aV - M_PI/2) > aTol && + Abs(aV + M_PI/2) > aTol) + continue; + } + else + continue; + + gp_Pnt2d PrevPrevP2d = theLine->Value(anIndFirst).ValueOnSurface(anIsOnFirst); + gp_Pnt2d PrevP2d = theLine->Value (anIndSecond).ValueOnSurface(anIsOnFirst); + gp_Dir2d aDir = gp_Vec2d(PrevPrevP2d, PrevP2d); + Standard_Real aX0 = PrevPrevP2d.X(), aY0 = PrevPrevP2d.Y(); + Standard_Real aXend, aYend; + aPntOn2S.ParametersOnSurface(anIsOnFirst, aXend, aYend); + + if (Abs(aDir.Y()) < gp::Resolution()) + continue; + + Standard_Real aNewXend = aDir.X()/aDir.Y() * (aYend - aY0) + aX0; + + theLine->SetUV (theIndex, anIsOnFirst, aNewXend, aYend); + } +} + //======================================================================= //function : GetSectionRadius //purpose : @@ -331,24 +394,27 @@ void IntPatch_ALineToWLine::MakeWLine(const Handle(IntPatch_ALine)& theALine, #if 0 //To draw ALine as a wire DRAW-object use the following code. { - static int zzz = 0; - zzz++; + static int ind = 0; + ind++; - bool flShow = /*(zzz == 1)*/false; + bool flShow = true; if (flShow) { std::cout << " +++ DUMP ALine (begin) +++++" << std::endl; - Standard_Integer aI = 0; - const Standard_Real aStep = (theLPar - theFPar) / 9999.0; - for (Standard_Real aPrm = theFPar; aPrm < theLPar; aPrm += aStep) + const Standard_Integer NbSamples = 20; + const Standard_Real aStep = (theLPar - theFPar) / NbSamples; + char* name = new char[100]; + + for (Standard_Integer ii = 0; ii <= NbSamples; ii++) { + Standard_Real aPrm = theFPar + ii * aStep; const gp_Pnt aPP(theALine->Value(aPrm)); - std::cout << "vertex v" << ++aI << " " << aPP.X() << " " << aPP.Y() << " " << aPP.Z() << std::endl; - } + std::cout << "vertex v" << ii << " " << aPP.X() << " " << aPP.Y() << " " << aPP.Z() << std::endl; - gp_Pnt aPP(theALine->Value(theLPar)); - std::cout << "vertex v" << ++aI << " " << 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; } } @@ -457,6 +523,8 @@ void IntPatch_ALineToWLine::MakeWLine(const Handle(IntPatch_ALine)& theALine, Standard_Integer aNewVertID = 0; aLinOn2S = new IntSurf_LineOn2S; + Standard_Boolean anIsFirstDegenerated = Standard_False, + anIsLastDegenerated = Standard_False; Standard_Real aStepMin = 0.1 * aStep, aStepMax = 10.0 * aStep; @@ -489,6 +557,9 @@ void IntPatch_ALineToWLine::MakeWLine(const Handle(IntPatch_ALine)& theALine, { // We cannot compute 2D-parameters of // aPOn2S correctly. + + if (anIsLastDegenerated) //the current last point is wrong + aLinOn2S->RemovePoint (aLinOn2S->NbPoints()); isPointValid = Standard_False; } @@ -617,6 +688,27 @@ void IntPatch_ALineToWLine::MakeWLine(const Handle(IntPatch_ALine)& theALine, AddPointIntoLine(aLinOn2S, anArrPeriods, aPOn2S); aPrevLPoint = aPOn2S; } + else + { + //add point, set correxponding status: to be corrected later + Standard_Boolean ToAdd = Standard_False; + if (aLinOn2S->NbPoints() == 0) + { + anIsFirstDegenerated = Standard_True; + ToAdd = Standard_True; + } + else if (aLinOn2S->NbPoints() > 1) + { + anIsLastDegenerated = Standard_True; + ToAdd = Standard_True; + } + + if (ToAdd) + { + AddPointIntoLine(aLinOn2S, anArrPeriods, aPOn2S); + aPrevLPoint = aPOn2S; + } + } continue; } @@ -656,6 +748,15 @@ void IntPatch_ALineToWLine::MakeWLine(const Handle(IntPatch_ALine)& theALine, aPrePointExist = IsPoleOrSeam(myS1, myS2, aPrefIso, aLinOn2S, aVtx, anArrPeriods, aTol, aSingularSurfaceID); + if (aPrePointExist == IntPatch_SPntPole || + aPrePointExist == IntPatch_SPntPoleSeamU) + { + //set correxponding status: to be corrected later + if (aLinOn2S->NbPoints() == 1) + anIsFirstDegenerated = Standard_True; + else + anIsLastDegenerated = Standard_True; + } const Standard_Real aCurVertParam = aVtx.ParameterOnLine(); if(aPrePointExist != IntPatch_SPntNone) @@ -760,6 +861,15 @@ void IntPatch_ALineToWLine::MakeWLine(const Handle(IntPatch_ALine)& theALine, continue; } + //Correct first and last points if needed + if (aLinOn2S->NbPoints() >= 3) + { + if (anIsFirstDegenerated) + CorrectEndPoint (aLinOn2S, 1); + if (anIsLastDegenerated) + CorrectEndPoint (aLinOn2S, aLinOn2S->NbPoints()); + } + //----------------------------------------------------------------- //-- W L i n e c r e a t i o n --- //----------------------------------------------------------------- diff --git a/src/IntPatch/IntPatch_ALineToWLine.hxx b/src/IntPatch/IntPatch_ALineToWLine.hxx index ce150e9c24..10161fdcfc 100644 --- a/src/IntPatch/IntPatch_ALineToWLine.hxx +++ b/src/IntPatch/IntPatch_ALineToWLine.hxx @@ -20,6 +20,7 @@ #include #include #include +#include class IntPatch_ALine; class IntSurf_PntOn2S; @@ -90,6 +91,13 @@ protected: //! This check is made for cone and sphere only. Standard_EXPORT Standard_Real GetSectionRadius(const gp_Pnt& thePnt3d) const; + //! Corrects the U-parameter of an end point (first or last) of the line + //! if this end point is a pole. + //! The line must contain at least 3 points. + //! This is made for cone and sphere only. + Standard_EXPORT void CorrectEndPoint(Handle(IntSurf_LineOn2S)& theLine, + const Standard_Integer theIndex) const; + private: diff --git a/src/IntPatch/IntPatch_WLine.cxx b/src/IntPatch/IntPatch_WLine.cxx index e2d1b72edf..44713bc935 100644 --- a/src/IntPatch/IntPatch_WLine.cxx +++ b/src/IntPatch/IntPatch_WLine.cxx @@ -471,8 +471,7 @@ void IntPatch_WLine::ComputeVertexParameters( const Standard_Real RTol) //---------------------------------------------------- //-- On detecte les points confondus dans la LineOn2S - Standard_Real dmini = Precision::Confusion(); - dmini*=dmini; + Standard_Real dmini = Precision::SquareConfusion(); for(i=2; (i<=nbponline) && (nbponline > 2); i++) { const IntSurf_PntOn2S& aPnt1=curv->Value(i-1); const IntSurf_PntOn2S& aPnt2=curv->Value(i); @@ -516,7 +515,20 @@ void IntPatch_WLine::ComputeVertexParameters( const Standard_Real RTol) IntSurf_PntOn2S POn2S = svtx.Value(i).PntOn2S(); RecadreMemePeriode(POn2S,curv->Value(1),U1Period(),V1Period(),U2Period(),V2Period()); - curv->Value(1,POn2S); + if (myCreationWay == IntPatch_WLImpImp) + { + //Adjust first point of curve to corresponding vertex the following way: + //set 3D point as the point of the vertex and 2D points as the points of the point on curve. + curv->SetPoint (1, POn2S.Value()); + Standard_Real mu1,mv1,mu2,mv2; + curv->Value(1).Parameters(mu1,mv1,mu2,mv2); + svtx.ChangeValue(i).SetParameter(1); + svtx.ChangeValue(i).SetParameters(mu1,mv1,mu2,mv2); + } + else + { + curv->Value(1,POn2S); + } //--curv->Value(1,svtx.Value(i).PntOn2S()); svtx.ChangeValue(i).SetParameter(1.0); @@ -551,6 +563,9 @@ void IntPatch_WLine::ComputeVertexParameters( const Standard_Real RTol) //--------------------------------------------------------- Standard_Boolean Substitution = Standard_False; //-- for(k=indicevertexonline+1; !Substitution && k>=indicevertexonline-1;k--) { avant le 9 oct 97 + Standard_Real mu1,mv1,mu2,mv2; + curv->Value(indicevertexonline).Parameters(mu1,mv1,mu2,mv2); + for(k=indicevertexonline+1; k>=indicevertexonline-1;k--) { if(k>0 && k<=nbponline) { if(CompareVertexAndPoint(P,curv->Value(k).Value(),vTol)) { @@ -560,9 +575,21 @@ void IntPatch_WLine::ComputeVertexParameters( const Standard_Real RTol) //------------------------------------------------------- IntSurf_PntOn2S POn2S = svtx.Value(i).PntOn2S(); RecadreMemePeriode(POn2S,curv->Value(k),U1Period(),V1Period(),U2Period(),V2Period()); - curv->Value(k,POn2S); - Standard_Real mu1,mv1,mu2,mv2; - POn2S.Parameters(mu1,mv1,mu2,mv2); + + if (myCreationWay == IntPatch_WLImpImp) + { + //Adjust a point of curve to corresponding vertex the following way: + //set 3D point as the point of the vertex and 2D points as the points + //of the point on curve with index + curv->SetPoint (k, POn2S.Value()); + curv->SetUV (k, Standard_True, mu1, mv1); + curv->SetUV (k, Standard_False, mu2, mv2); + } + else + { + curv->Value(k,POn2S); + POn2S.Parameters(mu1,mv1,mu2,mv2); + } svtx.ChangeValue(i).SetParameter(k); svtx.ChangeValue(i).SetParameters(mu1,mv1,mu2,mv2); Substitution = Standard_True; diff --git a/src/IntSurf/IntSurf_LineOn2S.hxx b/src/IntSurf/IntSurf_LineOn2S.hxx index d9575557e6..b44dc77838 100644 --- a/src/IntSurf/IntSurf_LineOn2S.hxx +++ b/src/IntSurf/IntSurf_LineOn2S.hxx @@ -62,9 +62,14 @@ public: //! Replaces the point of range Index in the line. void Value (const Standard_Integer Index, const IntSurf_PntOn2S& P); + //! Sets the 3D point of the Index-th PntOn2S + Standard_EXPORT void SetPoint(const Standard_Integer Index, const gp_Pnt& thePnt); + //! Sets the parametric coordinates on one of the surfaces //! of the point of range Index in the line. - Standard_EXPORT void SetUV(const Standard_Integer Index, const Standard_Boolean OnFirst, const Standard_Real U, const Standard_Real V); + Standard_EXPORT void SetUV(const Standard_Integer Index, + const Standard_Boolean OnFirst, + const Standard_Real U, const Standard_Real V); void Clear(); diff --git a/src/IntSurf/IntSurf_LineOn2S.lxx b/src/IntSurf/IntSurf_LineOn2S.lxx index 76e96da10f..a13c159186 100644 --- a/src/IntSurf/IntSurf_LineOn2S.lxx +++ b/src/IntSurf/IntSurf_LineOn2S.lxx @@ -38,6 +38,12 @@ inline void IntSurf_LineOn2S::Value(const Standard_Integer Index, mySeq(Index) = P; } +inline void IntSurf_LineOn2S::SetPoint(const Standard_Integer Index, + const gp_Pnt& thePnt) +{ + mySeq(Index).SetValue (thePnt); +} + inline void IntSurf_LineOn2S::Clear () { mySeq.Clear(); diff --git a/tests/bugs/modalg_7/bug29807_b3a b/tests/bugs/modalg_7/bug29807_b3a index fc86cbe0ab..276e92e105 100644 --- a/tests/bugs/modalg_7/bug29807_b3a +++ b/tests/bugs/modalg_7/bug29807_b3a @@ -3,8 +3,6 @@ puts "0029807: Impossible to cut cone from prism" puts "========" puts "" -puts "TODO OCC29922 ALL: Error: Degenerated edge is not found" - restore [locate_data_file bug29807-obj.brep] b1 restore [locate_data_file bug29807-tool.brep] b2 diff --git a/tests/bugs/modalg_7/bug29807_b5a b/tests/bugs/modalg_7/bug29807_b5a index 9fd83f0560..3921b20638 100644 --- a/tests/bugs/modalg_7/bug29807_b5a +++ b/tests/bugs/modalg_7/bug29807_b5a @@ -3,9 +3,6 @@ puts "0029807: Impossible to cut cone from prism" puts "========" puts "" -puts "TODO OCC29860 ALL: Error : is WRONG because number of WIRE entities in shape \"result\" is 10" -puts "TODO OCC29860 ALL: Error : is WRONG because number of FACE entities in shape \"result\" is 10" - restore [locate_data_file bug29807-obj.brep] b1 restore [locate_data_file bug29807-tool.brep] b2 diff --git a/tests/bugs/modalg_8/bug32721 b/tests/bugs/modalg_8/bug32721 new file mode 100644 index 0000000000..42d2499ed2 --- /dev/null +++ b/tests/bugs/modalg_8/bug32721 @@ -0,0 +1,35 @@ +puts "======================================================" +puts "OCC32721: BOP wrong results on a cone and an extrusion" +puts "======================================================" +puts "" + +restore [locate_data_file bug32721.brep] prism +pcone cone 6 0 10 + +bop cone prism +bopfuse r1 +bopcommon r2 +bopcut r3 +boptuc r4 + +checkshape r1 +checknbshapes r1 -t -vertex 8 -edge 17 -wire 8 -face 8 -shell 1 -solid 1 +checkshape r2 +checknbshapes r2 -t -vertex 3 -edge 7 -wire 4 -face 4 -shell 1 -solid 1 +checkshape r3 +checknbshapes r3 -t -vertex 4 -edge 10 -wire 4 -face 4 -shell 1 -solid 1 +checkshape r4 +checknbshapes r4 -t -vertex 7 -edge 14 -wire 8 -face 8 -shell 2 -solid 2 + +set tolres [checkmaxtol r1] + +if { ${tolres} > 0.0002} { + puts "Error: bad tolerance of result" +} + +checkprops r1 -s 388.634 -v 406.357 +checkprops r2 -s 57.8605 -v 22.8116 +checkprops r3 -s 358.735 -v 354.179 +checkprops r4 -s 87.7592 -v 29.3659 + +checkview -display r1 -2d -path ${imagedir}/${test_image}.png \ No newline at end of file diff --git a/tests/lowalgos/intss/bug29807_i1002 b/tests/lowalgos/intss/bug29807_i1002 index 544cbab320..1a4df76d3d 100644 --- a/tests/lowalgos/intss/bug29807_i1002 +++ b/tests/lowalgos/intss/bug29807_i1002 @@ -17,7 +17,9 @@ fit regexp {Tolerance Reached=+([-0-9.+eE]+)\n+([-0-9.+eE]+)} [bopcurves b1_5 b2_2 -2d] full Toler NbCurv -checkreal Tolerance $Toler 0.00039718358540697849 0.0 0.01 +if { ${Toler} > 0.0004} { + puts "Error: bad tolerance of result" +} if {$NbCurv != 2} { puts "Error: Please check NbCurves for intersector" diff --git a/tests/lowalgos/intss/bug29807_i1003 b/tests/lowalgos/intss/bug29807_i1003 index 10e841e39a..d14684addb 100644 --- a/tests/lowalgos/intss/bug29807_i1003 +++ b/tests/lowalgos/intss/bug29807_i1003 @@ -17,7 +17,9 @@ fit regexp {Tolerance Reached=+([-0-9.+eE]+)\n+([-0-9.+eE]+)} [bopcurves b1_5 b2_2 -2d] full Toler NbCurv -checkreal Tolerance $Toler 5.0314111870170835e-005 0.0 0.01 +if { ${Toler} > 5.1e-5} { + puts "Error: bad tolerance of result" +} if {$NbCurv != 2} { puts "Error: Please check NbCurves for intersector" diff --git a/tests/lowalgos/intss/bug29807_i1004 b/tests/lowalgos/intss/bug29807_i1004 index 2704a41f7f..08c0682884 100644 --- a/tests/lowalgos/intss/bug29807_i1004 +++ b/tests/lowalgos/intss/bug29807_i1004 @@ -18,7 +18,9 @@ fit regexp {Tolerance Reached=+([-0-9.+eE]+)\n+([-0-9.+eE]+)} [bopcurves b1_5 b2_2 -2d] full Toler NbCurv -checkreal Tolerance $Toler 0.00011289757099748416 0.0 0.01 +if { ${Toler} > 0.000113} { + puts "Error: bad tolerance of result" +} if {$NbCurv != 2} { puts "Error: Please check NbCurves for intersector" diff --git a/tests/lowalgos/intss/bug29807_i1005 b/tests/lowalgos/intss/bug29807_i1005 index dea1d945d0..73cc268543 100644 --- a/tests/lowalgos/intss/bug29807_i1005 +++ b/tests/lowalgos/intss/bug29807_i1005 @@ -18,7 +18,9 @@ fit regexp {Tolerance Reached=+([-0-9.+eE]+)\n+([-0-9.+eE]+)} [bopcurves b1_5 b2_2 -2d] full Toler NbCurv -checkreal Tolerance $Toler 7.7125880147734232e-007 0.0 0.01 +if { ${Toler} > 8e-7} { + puts "Error: bad tolerance of result" +} if {$NbCurv != 2} { puts "Error: Please check NbCurves for intersector" diff --git a/tests/lowalgos/intss/bug29807_i3002 b/tests/lowalgos/intss/bug29807_i3002 index 627752d213..2495218d98 100644 --- a/tests/lowalgos/intss/bug29807_i3002 +++ b/tests/lowalgos/intss/bug29807_i3002 @@ -16,7 +16,9 @@ fit regexp {Tolerance Reached=+([-0-9.+eE]+)\n+([-0-9.+eE]+)} [bopcurves b1_5 f2 -2d] full Toler NbCurv -checkreal Tolerance $Toler 0.00039718358530349535 0.0 0.01 +if { ${Toler} > 0.0004} { + puts "Error: bad tolerance of result" +} if {$NbCurv != 2} { puts "Error: Please check NbCurves for intersector" diff --git a/tests/lowalgos/intss/bug29807_i3004 b/tests/lowalgos/intss/bug29807_i3004 index 67c2287e47..5ab01f619f 100644 --- a/tests/lowalgos/intss/bug29807_i3004 +++ b/tests/lowalgos/intss/bug29807_i3004 @@ -17,7 +17,9 @@ fit regexp {Tolerance Reached=+([-0-9.+eE]+)\n+([-0-9.+eE]+)} [bopcurves b1_5 f2 -2d] full Toler NbCurv -checkreal Tolerance $Toler 0.00011289757087827709 0.0 0.01 +if { ${Toler} > 0.000113} { + puts "Error: bad tolerance of result" +} if {$NbCurv != 2} { puts "Error: Please check NbCurves for intersector" diff --git a/tests/lowalgos/intss/bug29807_i3005 b/tests/lowalgos/intss/bug29807_i3005 index c774db5095..5298494d18 100644 --- a/tests/lowalgos/intss/bug29807_i3005 +++ b/tests/lowalgos/intss/bug29807_i3005 @@ -17,7 +17,9 @@ fit regexp {Tolerance Reached=+([-0-9.+eE]+)\n+([-0-9.+eE]+)} [bopcurves b1_5 f2 -2d] full Toler NbCurv -checkreal Tolerance $Toler 7.7124681583892622e-007 0.0 0.01 +if { ${Toler} > 8e-7} { + puts "Error: bad tolerance of result" +} if {$NbCurv != 2} { puts "Error: Please check NbCurves for intersector" From 8af9bbd59aecf24c765e7ea0eeeb8c9dd5c1f8db Mon Sep 17 00:00:00 2001 From: ddzama Date: Wed, 30 Mar 2022 09:24:49 +0300 Subject: [PATCH 266/639] 0032906: Coding Rules - get rid of std::iterator inheritance (deprecated since C++17) --- src/NCollection/NCollection_StlIterator.hxx | 12 ++++++++---- src/OSD/OSD_Parallel.hxx | 11 +++++++++-- 2 files changed, 17 insertions(+), 6 deletions(-) diff --git a/src/NCollection/NCollection_StlIterator.hxx b/src/NCollection/NCollection_StlIterator.hxx index 78fa3cf150..735ba0e862 100644 --- a/src/NCollection/NCollection_StlIterator.hxx +++ b/src/NCollection/NCollection_StlIterator.hxx @@ -26,13 +26,17 @@ //! iterator requires Offset and Differ methods. See NCollection_Vector as //! example of declaring custom STL iterators. template -class NCollection_StlIterator : - public std::iterator::type, - typename std::conditional::type> +class NCollection_StlIterator { public: + // Since C++20 inheritance from std::iterator is deprecated, so define predefined types manually: + using iterator_category = Category; + using value_type = ItemType; + using difference_type = ptrdiff_t; + using pointer = typename std::conditional::type; + using reference = typename std::conditional::type; + //! Default constructor NCollection_StlIterator () {} diff --git a/src/OSD/OSD_Parallel.hxx b/src/OSD/OSD_Parallel.hxx index b3dd8d0d47..2dab32050f 100644 --- a/src/OSD/OSD_Parallel.hxx +++ b/src/OSD/OSD_Parallel.hxx @@ -118,12 +118,19 @@ protected: //! iteration over objects subject to parallel processing. //! It stores pointer to instance of polymorphic iterator inheriting from //! IteratorInterface, which contains actual type-specific iterator. - class UniversalIterator : + class UniversalIterator // Note that TBB requires that value_type of iterator be copyable, // thus we use its own type for that - public std::iterator { public: + + // Since C++20 inheritance from std::iterator is deprecated, so define predefined types manually: + using iterator_category = std::forward_iterator_tag; + using value_type = UniversalIterator; + using difference_type = ptrdiff_t; + using pointer = UniversalIterator*; + using reference = UniversalIterator&; + UniversalIterator() {} UniversalIterator(IteratorInterface* theOther) From 51db8cab7b64c84b38b63983167e9b3bd720c7cb Mon Sep 17 00:00:00 2001 From: jgv Date: Thu, 21 Apr 2022 10:02:51 +0300 Subject: [PATCH 267/639] 0032864: Modeling Algorithms - Normal projection of a wire on a cylinder produces wrong result Minor correction in method BRepAlgo_NormalProjection::Build: correct mixed up first and last parameters of the projected curve. --- src/BRepAlgo/BRepAlgo_NormalProjection.cxx | 2 +- tests/bugs/modalg_8/bug32864 | 21 +++++++++++++++++++++ 2 files changed, 22 insertions(+), 1 deletion(-) create mode 100644 tests/bugs/modalg_8/bug32864 diff --git a/src/BRepAlgo/BRepAlgo_NormalProjection.cxx b/src/BRepAlgo/BRepAlgo_NormalProjection.cxx index bd31fde08b..65bc1922e0 100644 --- a/src/BRepAlgo/BRepAlgo_NormalProjection.cxx +++ b/src/BRepAlgo/BRepAlgo_NormalProjection.cxx @@ -334,7 +334,7 @@ void BRepAlgo_NormalProjection::SetDefaultParams() if(Only2d && Only3d) { BRepLib_MakeEdge MKed(GeomAdaptor::MakeCurve(hcur->Curve()), - Ufin, Udeb); + Udeb, Ufin); prj = MKed.Edge(); BB.UpdateEdge(TopoDS::Edge(prj), PCur2d, diff --git a/tests/bugs/modalg_8/bug32864 b/tests/bugs/modalg_8/bug32864 new file mode 100644 index 0000000000..fd3afdb019 --- /dev/null +++ b/tests/bugs/modalg_8/bug32864 @@ -0,0 +1,21 @@ +puts "=========================================================================" +puts "OCC32864: Normal projection of a wire on a cylinder produces wrong result" +puts "=========================================================================" +puts "" + +restore [locate_data_file bug32864.brep] a +explode a + +nproject result a_2 a_1 + +checkshape result + +checknbshapes result -t -edge 8 -vertex 16 + +set tolres [checkmaxtol result] + +if { ${tolres} > 0.0001} { + puts "Error: bad tolerance of result" +} + +checkprops result -l 37.1616 From a0b4fff17a6ad88f569052733d24723dd53e0919 Mon Sep 17 00:00:00 2001 From: ifv Date: Sun, 17 Apr 2022 15:38:34 +0300 Subject: [PATCH 268/639] 0028866: Modeling Data - Problem with GeomAPI_ProjectPointOnSurf Extrema/Extrema_GenExtPS.cxx - adaptive setting of sample points is implemented bugs/moddata_3/bug28866 - test case added --- src/Extrema/Extrema_GenExtPS.cxx | 115 +++++++++++++++++++++++++++---- tests/bugs/moddata_3/bug28866 | 28 ++++++++ 2 files changed, 131 insertions(+), 12 deletions(-) create mode 100644 tests/bugs/moddata_3/bug28866 diff --git a/src/Extrema/Extrema_GenExtPS.cxx b/src/Extrema/Extrema_GenExtPS.cxx index 3770bb1b64..ed2b6373bc 100644 --- a/src/Extrema/Extrema_GenExtPS.cxx +++ b/src/Extrema/Extrema_GenExtPS.cxx @@ -715,23 +715,114 @@ void Extrema_GenExtPS::BuildGrid(const gp_Pnt &thePoint) } } -// Parametrization of the sample +static Standard_Real LengthOfIso(const Adaptor3d_Surface& theS, const GeomAbs_IsoType theIso, + const Standard_Real thePar1, const Standard_Real thePar2, + const Standard_Integer theNbPnts, const Standard_Real thePar) +{ + Standard_Real aLen = 0.; + Standard_Integer i; + Standard_Real dPar = (thePar2 - thePar1) / (theNbPnts - 1); + gp_Pnt aP1, aP2; + Standard_Real aPar = thePar1 + dPar; + if(theIso == GeomAbs_IsoU) + { + aP1 = theS.Value(thePar, thePar1); + } + else + { + aP1 = theS.Value(thePar1, thePar); + } + + for (i = 2; i <= theNbPnts; ++i) + { + if (theIso == GeomAbs_IsoU) + { + aP2 = theS.Value(thePar, aPar); + } + else + { + aP2 = theS.Value(aPar, thePar); + } + aLen += aP1.Distance(aP2); + aP1 = aP2; + aPar += dPar; + } + return aLen; +} +static void CorrectNbSamples(const Adaptor3d_Surface& theS, + const Standard_Real theU1, const Standard_Real theU2, Standard_Integer& theNbU, + const Standard_Real theV1, const Standard_Real theV2, Standard_Integer& theNbV) +{ + Standard_Real aMinLen = 1.e-3; + Standard_Integer nbp = Min(23, theNbV); + Standard_Real aLenU1 = LengthOfIso(theS, GeomAbs_IsoU, theV1, theV2, nbp, theU1); + if (aLenU1 <= aMinLen) + { + Standard_Real aL = LengthOfIso(theS, GeomAbs_IsoU, theV1, theV2, nbp, .7*theU1 + 0.3*theU2); + aLenU1 = Max(aL, aLenU1); + } + Standard_Real aLenU2 = LengthOfIso(theS, GeomAbs_IsoU, theV1, theV2, nbp, theU2); + if (aLenU2 <= aMinLen) + { + Standard_Real aL = LengthOfIso(theS, GeomAbs_IsoU, theV1, theV2, nbp, .3*theU1 + 0.7*theU2); + aLenU2 = Max(aL, aLenU2); + } + nbp = Min(23, theNbV); + Standard_Real aLenV1 = LengthOfIso(theS, GeomAbs_IsoV, theU1, theU2, nbp, theV1); + if (aLenV1 <= aMinLen) + { + Standard_Real aL = LengthOfIso(theS, GeomAbs_IsoV, theU1, theU2, nbp, .7*theV1 + 0.3*theV2); + aLenV1 = Max(aL, aLenV1); + } + Standard_Real aLenV2 = LengthOfIso(theS, GeomAbs_IsoV, theU1, theU2, nbp, theV2); + if (aLenV2 <= aMinLen) + { + Standard_Real aL = LengthOfIso(theS, GeomAbs_IsoV, theU1, theU2, nbp, .3*theV1 + 0.7*theV2); + aLenV2 = Max(aL, aLenV2); + } + // + Standard_Real aStepV1 = aLenU1 / theNbV; + Standard_Real aStepV2 = aLenU2 / theNbV; + Standard_Real aStepU1 = aLenV1 / theNbU; + Standard_Real aStepU2 = aLenV2 / theNbU; + + Standard_Real aMaxStepV = Max(aStepV1, aStepV2); + Standard_Real aMaxStepU = Max(aStepU1, aStepU2); + // + Standard_Real aRatio = aMaxStepV / aMaxStepU; + if (aRatio > 10.) + { + Standard_Integer aMult = RealToInt(Log(aRatio) ); + if(aMult > 1) + theNbV *= aMult; + } + else if (aRatio < 0.1) + { + Standard_Integer aMult = RealToInt( - Log(aRatio)); + if(aMult > 1) + theNbV *= aMult; + } + +} void Extrema_GenExtPS::BuildTree() { // if tree already exists, assume it is already correctly filled - if ( ! mySphereUBTree.IsNull() ) + if (!mySphereUBTree.IsNull()) return; - if (myS->GetType() == GeomAbs_BSplineSurface) { - Handle(Geom_BSplineSurface) aBspl = myS->BSpline(); - Standard_Integer aUValue = aBspl->UDegree() * aBspl->NbUKnots(); - Standard_Integer aVValue = aBspl->VDegree() * aBspl->NbVKnots(); - if (aUValue > myusample) - myusample = aUValue; - if (aVValue > myvsample) - myvsample = aVValue; - } - + if (myS->GetType() == GeomAbs_BSplineSurface) { + Handle(Geom_BSplineSurface) aBspl = myS->BSpline(); + Standard_Integer aUValue = aBspl->UDegree() * aBspl->NbUKnots(); + Standard_Integer aVValue = aBspl->VDegree() * aBspl->NbVKnots(); + // 300 is value, which is used for singular points (see Extrema_ExtPS.cxx::Initialize(...)) + if (aUValue > myusample) + myusample = Min(aUValue, 300); + if (aVValue > myvsample) + myvsample = Min(aVValue, 300); + } + // + CorrectNbSamples(*myS, myumin, myusup, myusample, myvmin, myvsup, myvsample); + // Standard_Real PasU = myusup - myumin; Standard_Real PasV = myvsup - myvmin; Standard_Real U0 = PasU / myusample / 100.; diff --git a/tests/bugs/moddata_3/bug28866 b/tests/bugs/moddata_3/bug28866 new file mode 100644 index 0000000000..ab59a6b276 --- /dev/null +++ b/tests/bugs/moddata_3/bug28866 @@ -0,0 +1,28 @@ +puts "========" +puts "0028866: Modeling Data - Problem with GeomAPI_ProjectPointOnSurf" +puts "========" +puts "" + +restore [locate_data_file bug28866.brep] f + +set CMP_TOL 5.0e-7 + +point p1 -0.028128 -0.836810 -0.019004 +point p2 -0.028128 0.836810 -0.019004 +point p3 -0.040434 -0.836810 -0.019022 +point p4 -0.040434 0.836810 -0.019022 +point p5 -0.031644 -0.819230 -0.018362 +point p6 -0.045708 0.835050 -0.018969 +point p7 0.086142 -0.606510 -0.009508 + +set pnts {"p1" "p2" "p3" "p4" "p5" "p6" "p7"} + +foreach pnt ${pnts} { + set log [projponf f $pnt -min -t] + regexp {proj dist = ([-0-9.+eE]+)} ${log} full distmax + if { ${distmax} > ${CMP_TOL} } { + puts "Error: Wrong distanse ($pnt)" + } else { + puts "OK: Good distanse ($pnt)" + } +} From e9a13cf1234fa07afbceeca7e4ce5dd482792ffd Mon Sep 17 00:00:00 2001 From: snn Date: Wed, 20 Apr 2022 14:56:21 +0300 Subject: [PATCH 269/639] 0032914: Data Exchange - Some parts of compound are lost while writing STEP in nonmanifold mode Code related to supporting of single SDR for a non-manifold group, which prevents writing all translation results except the first one, is removed. SDRs with null used representation object are excluded from writing. --- src/STEPControl/STEPControl_ActorWrite.cxx | 19 ++++++++----------- tests/bugs/step/bug32914 | 19 +++++++++++++++++++ 2 files changed, 27 insertions(+), 11 deletions(-) create mode 100644 tests/bugs/step/bug32914 diff --git a/src/STEPControl/STEPControl_ActorWrite.cxx b/src/STEPControl/STEPControl_ActorWrite.cxx index e83fd17279..97fa556e28 100644 --- a/src/STEPControl/STEPControl_ActorWrite.cxx +++ b/src/STEPControl/STEPControl_ActorWrite.cxx @@ -1243,8 +1243,8 @@ Handle(Transfer_Binder) STEPControl_ActorWrite::TransferShape Handle(StepRepr_HArray1OfRepresentationItem) newItems = new StepRepr_HArray1OfRepresentationItem(1, oldItems->Length() + 1); Standard_Integer el = 1; - for (Standard_Integer i = 1; i <= oldItems->Length(); i++) - newItems->SetValue( el++, oldItems->Value(i) ); + for (Standard_Integer i = 1; i <= oldItems->Length(); i++) + newItems->SetValue(el++, oldItems->Value(i)); newItems->SetValue( el, items->Value( items->Length() ) ); shapeRep->SetItems(newItems); } @@ -1278,7 +1278,7 @@ Handle(Transfer_Binder) STEPControl_ActorWrite::TransferShape return resbind; } else return FP->Find(start); -} + } //======================================================================= //function : TransferCompound @@ -1383,11 +1383,7 @@ Handle(Transfer_Binder) STEPControl_ActorWrite::TransferCompound Handle(Transfer_SimpleBinderOfTransient) bx = Handle(Transfer_SimpleBinderOfTransient)::DownCast(bnd); if ( !bx.IsNull() ) { - // Single SDR is created for a non-manifold group (ssv: 12.11.2010) - if (!isManifold && i > 1) - break; - else - binder->AddResult( TransientResult( bx->Result() ) ); + binder->AddResult( TransientResult( bx->Result() ) ); } bnd = bnd->NextResult(); } @@ -1468,9 +1464,10 @@ Handle(Transfer_Binder) STEPControl_ActorWrite::TransferSubShape Handle(Transfer_Binder) resprod = TransientResult(sdr); //KA - OCC7141(skl 10.11.2004) bool isJustTransferred = false; if ( ! iasdr || resbind.IsNull() ) { - resbind = TransferShape(mapper, sdr, FP, shapeGroup, isManifold, theProgress); - if (resbind.IsNull()) - return resbind; + Handle(Transfer_Binder) resbind1 = TransferShape(mapper, sdr, FP, shapeGroup, isManifold, theProgress); + if (resbind1.IsNull() || sdr->UsedRepresentation().IsNull()) + return Handle(Transfer_Binder)(); + resbind = resbind1; Handle(Transfer_Binder) oldbind = FP->Find ( mapper ); if ( ! oldbind.IsNull() && !resbind.IsNull()) resbind->AddResult ( oldbind ); isJustTransferred = true; diff --git a/tests/bugs/step/bug32914 b/tests/bugs/step/bug32914 new file mode 100644 index 0000000000..cfa6536e26 --- /dev/null +++ b/tests/bugs/step/bug32914 @@ -0,0 +1,19 @@ +puts "===================================================" +puts " 0032914: Data Exchange - Some parts of compound are lost while writing STEP in nonmanifold mode " +puts "===================================================" +puts "" + +set BugNumber OCC32914 + +set filepath [locate_data_file ${BugNumber}.brep] + +restore ${filepath} s + +param write.step.nonmanifold 1 +stepwrite 0 s ${imagedir}/${BugNumber}.step + +testreadstep ${imagedir}/${BugNumber}.step result + +checknbshapes result -vertex 16 -edge 17 -wire 7 -face 7 -shell 2 -solid 0 -compsolid 0 -compound 4 -shape 53 + +checkview -display result -2d -path ${imagedir}/${test_image}.png From 9416ba5fb0b8982c7df80bb19374a33ba2319eb3 Mon Sep 17 00:00:00 2001 From: ddzama Date: Wed, 30 Mar 2022 10:06:01 +0300 Subject: [PATCH 270/639] 0032907: Coding Rules - eliminate MSVC warning C5054 on VS2019/C++20 (operator &,|: deprecated between enumerations of different types) operator `&`,`|`: deprecated between enumerations of different types --- src/AIS/AIS_ViewController.cxx | 49 +++++---- src/HLRAlgo/HLRAlgo_EdgesBlock.hxx | 2 +- src/HLRBRep/HLRBRep_FaceData.lxx | 84 +++++++-------- src/Message/Message_ExecStatus.hxx | 115 ++++++++++----------- src/Standard/Standard_TypeDef.hxx | 1 + src/ViewerTest/ViewerTest_EventManager.cxx | 58 ++++++----- 6 files changed, 165 insertions(+), 144 deletions(-) diff --git a/src/AIS/AIS_ViewController.cxx b/src/AIS/AIS_ViewController.cxx index e8738defb3..171b48e1e8 100644 --- a/src/AIS/AIS_ViewController.cxx +++ b/src/AIS/AIS_ViewController.cxx @@ -117,24 +117,37 @@ AIS_ViewController::AIS_ViewController() myRubberBand->SetDisplayMode (0); myRubberBand->SetMutable (true); - myMouseGestureMap.Bind (Aspect_VKeyMouse_LeftButton, AIS_MouseGesture_RotateOrbit); - myMouseGestureMap.Bind (Aspect_VKeyMouse_LeftButton | Aspect_VKeyFlags_CTRL, AIS_MouseGesture_Zoom); - myMouseGestureMap.Bind (Aspect_VKeyMouse_LeftButton | Aspect_VKeyFlags_SHIFT, AIS_MouseGesture_Pan); - myMouseGestureMap.Bind (Aspect_VKeyMouse_LeftButton | Aspect_VKeyFlags_ALT, AIS_MouseGesture_SelectRectangle); - myMouseGestureMap.Bind (Aspect_VKeyMouse_LeftButton | Aspect_VKeyFlags_ALT | Aspect_VKeyFlags_SHIFT, AIS_MouseGesture_SelectRectangle); - - myMouseSelectionSchemes.Bind (Aspect_VKeyMouse_LeftButton, AIS_SelectionScheme_Replace); - myMouseSelectionSchemes.Bind (Aspect_VKeyMouse_LeftButton | Aspect_VKeyFlags_ALT, AIS_SelectionScheme_Replace); - myMouseSelectionSchemes.Bind (Aspect_VKeyMouse_LeftButton | Aspect_VKeyFlags_SHIFT, AIS_SelectionScheme_XOR); - myMouseSelectionSchemes.Bind (Aspect_VKeyMouse_LeftButton | Aspect_VKeyFlags_ALT | Aspect_VKeyFlags_SHIFT, AIS_SelectionScheme_XOR); - - myMouseGestureMap.Bind (Aspect_VKeyMouse_RightButton, AIS_MouseGesture_Zoom); - myMouseGestureMap.Bind (Aspect_VKeyMouse_RightButton | Aspect_VKeyFlags_CTRL, AIS_MouseGesture_RotateOrbit); - - myMouseGestureMap.Bind (Aspect_VKeyMouse_MiddleButton, AIS_MouseGesture_Pan); - myMouseGestureMap.Bind (Aspect_VKeyMouse_MiddleButton | Aspect_VKeyFlags_CTRL, AIS_MouseGesture_Pan); - - myMouseGestureMapDrag.Bind (Aspect_VKeyMouse_LeftButton, AIS_MouseGesture_Drag); + myMouseGestureMap.Bind ((Standard_UInteger )Aspect_VKeyMouse_LeftButton, + AIS_MouseGesture_RotateOrbit); + myMouseGestureMap.Bind ((Standard_UInteger )Aspect_VKeyMouse_LeftButton | (Standard_UInteger )Aspect_VKeyFlags_CTRL, + AIS_MouseGesture_Zoom); + myMouseGestureMap.Bind ((Standard_UInteger )Aspect_VKeyMouse_LeftButton | (Standard_UInteger )Aspect_VKeyFlags_SHIFT, + AIS_MouseGesture_Pan); + myMouseGestureMap.Bind ((Standard_UInteger )Aspect_VKeyMouse_LeftButton | (Standard_UInteger )Aspect_VKeyFlags_ALT, + AIS_MouseGesture_SelectRectangle); + myMouseGestureMap.Bind ((Standard_UInteger )Aspect_VKeyMouse_LeftButton | (Standard_UInteger )Aspect_VKeyFlags_ALT | (Standard_UInteger )Aspect_VKeyFlags_SHIFT, + AIS_MouseGesture_SelectRectangle); + + myMouseSelectionSchemes.Bind ((Standard_UInteger )Aspect_VKeyMouse_LeftButton, + AIS_SelectionScheme_Replace); + myMouseSelectionSchemes.Bind ((Standard_UInteger )Aspect_VKeyMouse_LeftButton | (Standard_UInteger )Aspect_VKeyFlags_ALT, + AIS_SelectionScheme_Replace); + myMouseSelectionSchemes.Bind ((Standard_UInteger )Aspect_VKeyMouse_LeftButton | (Standard_UInteger )Aspect_VKeyFlags_SHIFT, + AIS_SelectionScheme_XOR); + myMouseSelectionSchemes.Bind ((Standard_UInteger )Aspect_VKeyMouse_LeftButton | (Standard_UInteger )Aspect_VKeyFlags_ALT | (Standard_UInteger )Aspect_VKeyFlags_SHIFT, + AIS_SelectionScheme_XOR); + + myMouseGestureMap.Bind ((Standard_UInteger )Aspect_VKeyMouse_RightButton, + AIS_MouseGesture_Zoom); + myMouseGestureMap.Bind ((Standard_UInteger )Aspect_VKeyMouse_RightButton | (Standard_UInteger )Aspect_VKeyFlags_CTRL, + AIS_MouseGesture_RotateOrbit); + + myMouseGestureMap.Bind ((Standard_UInteger )Aspect_VKeyMouse_MiddleButton, + AIS_MouseGesture_Pan); + myMouseGestureMap.Bind ((Standard_UInteger )Aspect_VKeyMouse_MiddleButton | (Standard_UInteger )Aspect_VKeyFlags_CTRL, + AIS_MouseGesture_Pan); + + myMouseGestureMapDrag.Bind (Aspect_VKeyMouse_LeftButton, AIS_MouseGesture_Drag); myXRTeleportHaptic.Duration = 3600.0f; myXRTeleportHaptic.Frequency = 0.1f; diff --git a/src/HLRAlgo/HLRAlgo_EdgesBlock.hxx b/src/HLRAlgo/HLRAlgo_EdgesBlock.hxx index 003156e003..24cc56c10d 100644 --- a/src/HLRAlgo/HLRAlgo_EdgesBlock.hxx +++ b/src/HLRAlgo/HLRAlgo_EdgesBlock.hxx @@ -96,7 +96,7 @@ public: void Orientation (const Standard_Integer I, const TopAbs_Orientation Or) { myFlags(I) &= ~EMaskOrient; - myFlags(I) |= (Or & EMaskOrient); + myFlags(I) |= ((Standard_Integer)Or & (Standard_Integer)EMaskOrient); } TopAbs_Orientation Orientation (const Standard_Integer I) const diff --git a/src/HLRBRep/HLRBRep_FaceData.lxx b/src/HLRBRep/HLRBRep_FaceData.lxx index d36d5172ec..889fed1706 100644 --- a/src/HLRBRep/HLRBRep_FaceData.lxx +++ b/src/HLRBRep/HLRBRep_FaceData.lxx @@ -20,7 +20,7 @@ //======================================================================= inline Standard_Boolean HLRBRep_FaceData::Selected() const -{ return (myFlags & FMaskSelected) != 0; } +{ return (myFlags & (Standard_Integer)FMaskSelected) != 0; } //======================================================================= //function : Selected @@ -29,8 +29,8 @@ inline Standard_Boolean HLRBRep_FaceData::Selected() const inline void HLRBRep_FaceData::Selected(const Standard_Boolean B) { - if (B) myFlags |= FMaskSelected; - else myFlags &= ~FMaskSelected; + if (B) myFlags |= (Standard_Integer)FMaskSelected; + else myFlags &= ~((Standard_Integer)FMaskSelected); } //======================================================================= @@ -39,7 +39,7 @@ inline void HLRBRep_FaceData::Selected(const Standard_Boolean B) //======================================================================= inline Standard_Boolean HLRBRep_FaceData::Back() const -{ return (myFlags & FMaskBack) != 0; } +{ return (myFlags & (Standard_Integer)FMaskBack) != 0; } //======================================================================= //function : Back @@ -48,8 +48,8 @@ inline Standard_Boolean HLRBRep_FaceData::Back() const inline void HLRBRep_FaceData::Back(const Standard_Boolean B) { - if (B) myFlags |= FMaskBack; - else myFlags &= ~FMaskBack; + if (B) myFlags |= (Standard_Integer)FMaskBack; + else myFlags &= ~((Standard_Integer)FMaskBack); } //======================================================================= @@ -58,7 +58,7 @@ inline void HLRBRep_FaceData::Back(const Standard_Boolean B) //======================================================================= inline Standard_Boolean HLRBRep_FaceData::Side() const -{ return (myFlags & FMaskSide) != 0; } +{ return (myFlags & (Standard_Integer)FMaskSide) != 0; } //======================================================================= //function : Side @@ -67,8 +67,8 @@ inline Standard_Boolean HLRBRep_FaceData::Side() const inline void HLRBRep_FaceData::Side(const Standard_Boolean B) { - if (B) myFlags |= FMaskSide; - else myFlags &= ~FMaskSide; + if (B) myFlags |= (Standard_Integer)FMaskSide; + else myFlags &= ~((Standard_Integer)FMaskSide); } //======================================================================= @@ -77,7 +77,7 @@ inline void HLRBRep_FaceData::Side(const Standard_Boolean B) //======================================================================= inline Standard_Boolean HLRBRep_FaceData::Closed() const -{ return (myFlags & FMaskClosed) != 0; } +{ return (myFlags & (Standard_Integer)FMaskClosed) != 0; } //======================================================================= //function : Closed @@ -86,8 +86,8 @@ inline Standard_Boolean HLRBRep_FaceData::Closed() const inline void HLRBRep_FaceData::Closed(const Standard_Boolean B) { - if (B) myFlags |= FMaskClosed; - else myFlags &= ~FMaskClosed; + if (B) myFlags |= (Standard_Integer)FMaskClosed; + else myFlags &= ~((Standard_Integer)FMaskClosed); } //======================================================================= @@ -96,7 +96,7 @@ inline void HLRBRep_FaceData::Closed(const Standard_Boolean B) //======================================================================= inline Standard_Boolean HLRBRep_FaceData::Hiding() const -{ return (myFlags & FMaskHiding) != 0; } +{ return (myFlags & (Standard_Integer)FMaskHiding) != 0; } //======================================================================= //function : Hiding @@ -105,8 +105,8 @@ inline Standard_Boolean HLRBRep_FaceData::Hiding() const inline void HLRBRep_FaceData::Hiding(const Standard_Boolean B) { - if (B) myFlags |= FMaskHiding; - else myFlags &= ~FMaskHiding; + if (B) myFlags |= (Standard_Integer)FMaskHiding; + else myFlags &= ~((Standard_Integer)FMaskHiding); } //======================================================================= @@ -115,7 +115,7 @@ inline void HLRBRep_FaceData::Hiding(const Standard_Boolean B) //======================================================================= inline Standard_Boolean HLRBRep_FaceData::Simple() const -{ return (myFlags & FMaskSimple) != 0; } +{ return (myFlags & (Standard_Integer)FMaskSimple) != 0; } //======================================================================= //function : Simple @@ -124,8 +124,8 @@ inline Standard_Boolean HLRBRep_FaceData::Simple() const inline void HLRBRep_FaceData::Simple(const Standard_Boolean B) { - if (B) myFlags |= FMaskSimple; - else myFlags &= ~FMaskSimple; + if (B) myFlags |= (Standard_Integer)FMaskSimple; + else myFlags &= ~((Standard_Integer)FMaskSimple); } //======================================================================= @@ -134,7 +134,7 @@ inline void HLRBRep_FaceData::Simple(const Standard_Boolean B) //======================================================================= inline Standard_Boolean HLRBRep_FaceData::Cut() const -{ return (myFlags & FMaskCut) != 0; } +{ return (myFlags & (Standard_Integer)FMaskCut) != 0; } //======================================================================= //function : Cut @@ -143,8 +143,8 @@ inline Standard_Boolean HLRBRep_FaceData::Cut() const inline void HLRBRep_FaceData::Cut(const Standard_Boolean B) { - if (B) myFlags |= FMaskCut; - else myFlags &= ~FMaskCut; + if (B) myFlags |= (Standard_Integer)FMaskCut; + else myFlags &= ~((Standard_Integer)FMaskCut); } //======================================================================= @@ -153,7 +153,7 @@ inline void HLRBRep_FaceData::Cut(const Standard_Boolean B) //======================================================================= inline Standard_Boolean HLRBRep_FaceData::WithOutL() const -{ return (myFlags & FMaskWithOutL) != 0; } +{ return (myFlags & (Standard_Integer)FMaskWithOutL) != 0; } //======================================================================= //function : WithOutL @@ -162,8 +162,8 @@ inline Standard_Boolean HLRBRep_FaceData::WithOutL() const inline void HLRBRep_FaceData::WithOutL(const Standard_Boolean B) { - if (B) myFlags |= FMaskWithOutL; - else myFlags &= ~FMaskWithOutL; + if (B) myFlags |= (Standard_Integer)FMaskWithOutL; + else myFlags &= ~((Standard_Integer)FMaskWithOutL); } //======================================================================= @@ -172,7 +172,7 @@ inline void HLRBRep_FaceData::WithOutL(const Standard_Boolean B) //======================================================================= inline Standard_Boolean HLRBRep_FaceData::Plane() const -{ return (myFlags & FMaskPlane) != 0; } +{ return (myFlags & (Standard_Integer)FMaskPlane) != 0; } //======================================================================= //function : Plane @@ -181,8 +181,8 @@ inline Standard_Boolean HLRBRep_FaceData::Plane() const inline void HLRBRep_FaceData::Plane(const Standard_Boolean B) { - if (B) myFlags |= FMaskPlane; - else myFlags &= ~FMaskPlane; + if (B) myFlags |= (Standard_Integer)FMaskPlane; + else myFlags &= ~((Standard_Integer)FMaskPlane); } //======================================================================= @@ -191,7 +191,7 @@ inline void HLRBRep_FaceData::Plane(const Standard_Boolean B) //======================================================================= inline Standard_Boolean HLRBRep_FaceData::Cylinder() const -{ return (myFlags & FMaskCylinder) != 0; } +{ return (myFlags & (Standard_Integer)FMaskCylinder) != 0; } //======================================================================= //function : Cylinder @@ -200,8 +200,8 @@ inline Standard_Boolean HLRBRep_FaceData::Cylinder() const inline void HLRBRep_FaceData::Cylinder(const Standard_Boolean B) { - if (B) myFlags |= FMaskCylinder; - else myFlags &= ~FMaskCylinder; + if (B) myFlags |= (Standard_Integer)FMaskCylinder; + else myFlags &= ~((Standard_Integer)FMaskCylinder); } //======================================================================= @@ -210,7 +210,7 @@ inline void HLRBRep_FaceData::Cylinder(const Standard_Boolean B) //======================================================================= inline Standard_Boolean HLRBRep_FaceData::Cone() const -{ return (myFlags & FMaskCone) != 0; } +{ return (myFlags & (Standard_Integer)FMaskCone) != 0; } //======================================================================= //function : Cone @@ -219,8 +219,8 @@ inline Standard_Boolean HLRBRep_FaceData::Cone() const inline void HLRBRep_FaceData::Cone(const Standard_Boolean B) { - if (B) myFlags |= FMaskCone; - else myFlags &= ~FMaskCone; + if (B) myFlags |= (Standard_Integer)FMaskCone; + else myFlags &= ~((Standard_Integer)FMaskCone); } //======================================================================= @@ -229,7 +229,7 @@ inline void HLRBRep_FaceData::Cone(const Standard_Boolean B) //======================================================================= inline Standard_Boolean HLRBRep_FaceData::Sphere() const -{ return (myFlags & FMaskSphere) != 0; } +{ return (myFlags & (Standard_Integer)FMaskSphere) != 0; } //======================================================================= //function : Sphere @@ -238,8 +238,8 @@ inline Standard_Boolean HLRBRep_FaceData::Sphere() const inline void HLRBRep_FaceData::Sphere(const Standard_Boolean B) { - if (B) myFlags |= FMaskSphere; - else myFlags &= ~FMaskSphere; + if (B) myFlags |= (Standard_Integer)FMaskSphere; + else myFlags &= ~((Standard_Integer)FMaskSphere); } //======================================================================= @@ -248,7 +248,7 @@ inline void HLRBRep_FaceData::Sphere(const Standard_Boolean B) //======================================================================= inline Standard_Boolean HLRBRep_FaceData::Torus() const -{ return (myFlags & FMaskTorus) != 0; } +{ return (myFlags & (Standard_Integer)FMaskTorus) != 0; } //======================================================================= //function : Torus @@ -257,8 +257,8 @@ inline Standard_Boolean HLRBRep_FaceData::Torus() const inline void HLRBRep_FaceData::Torus(const Standard_Boolean B) { - if (B) myFlags |= FMaskTorus; - else myFlags &= ~FMaskTorus; + if (B) myFlags |= (Standard_Integer)FMaskTorus; + else myFlags &= ~((Standard_Integer)FMaskTorus); } //======================================================================= @@ -283,7 +283,7 @@ inline void HLRBRep_FaceData::Size(const Standard_Real S) //======================================================================= inline TopAbs_Orientation HLRBRep_FaceData::Orientation() const -{ return ((TopAbs_Orientation)(myFlags & EMaskOrient)); } +{ return ((TopAbs_Orientation)(myFlags & (Standard_Integer)EMaskOrient)); } //======================================================================= //function : Orientation @@ -292,8 +292,8 @@ inline TopAbs_Orientation HLRBRep_FaceData::Orientation() const inline void HLRBRep_FaceData::Orientation(const TopAbs_Orientation O) { - myFlags &= ~EMaskOrient; - myFlags |= (O & EMaskOrient); + myFlags &= ~(Standard_Integer)EMaskOrient; + myFlags |= ((Standard_Integer)O & (Standard_Integer)EMaskOrient); } //======================================================================= diff --git a/src/Message/Message_ExecStatus.hxx b/src/Message/Message_ExecStatus.hxx index 42eb19c6b9..ce147252bd 100644 --- a/src/Message/Message_ExecStatus.hxx +++ b/src/Message/Message_ExecStatus.hxx @@ -31,86 +31,84 @@ * * The flags are grouped in semantic groups: * - No flags means nothing done - * - Done flags correspond to some operation succesffuly completed + * - Done flags correspond to some operation successfully completed * - Warning flags correspond to warning messages on some * potentially wrong situation, not harming algorithm execution * - Alarm flags correspond to more severe warnings about incorrect * user data, while not breaking algorithm execution * - Fail flags correspond to cases when algorithm failed to complete */ - class Message_ExecStatus { - - private: +private: //! Mask to separate bits indicating status type and index within the type - enum StatusMask { - MType = 0x0000ff00, - MIndex = 0x000000ff + enum StatusMask + { + MType = 0x0000ff00, + MIndex = 0x000000ff }; - static inline int getBitFlag (int status) + + static inline int getBitFlag (int theStatus) { - return 0x1 << (status & MIndex); + return 0x1 << (theStatus & MIndex); } - - public: + +public: //!@name Creation and simple operations with statuses //!@{ //! Create empty execution status - Message_ExecStatus () - : myDone( Message_None), myWarn( Message_None), - myAlarm( Message_None), myFail( Message_None) + Message_ExecStatus() + : myDone (Message_None), myWarn (Message_None), + myAlarm (Message_None), myFail (Message_None) {} //! Initialise the execution status - Message_ExecStatus ( Message_Status status ) - : myDone( Message_None), myWarn( Message_None), - myAlarm( Message_None), myFail( Message_None) + Message_ExecStatus (Message_Status theStatus) + : myDone (Message_None), myWarn (Message_None), + myAlarm (Message_None), myFail (Message_None) { - Set( status ); + Set (theStatus); } //! Sets a status flag - void Set (Message_Status status) - { - switch( status & MType ) + void Set (Message_Status theStatus) + { + switch (TypeOfStatus (theStatus)) { - case Message_DONE: myDone |= (getBitFlag( status )); break; - case Message_WARN: myWarn |= (getBitFlag( status )); break; - case Message_ALARM:myAlarm |= (getBitFlag( status )); break; - case Message_FAIL: myFail |= (getBitFlag( status )); break; - default: break; + case Message_DONE: myDone |= (getBitFlag (theStatus)); break; + case Message_WARN: myWarn |= (getBitFlag (theStatus)); break; + case Message_ALARM: myAlarm |= (getBitFlag (theStatus)); break; + case Message_FAIL: myFail |= (getBitFlag (theStatus)); break; } } //! Check status for being set - Standard_Boolean IsSet (Message_Status status) const + Standard_Boolean IsSet (Message_Status theStatus) const { - switch( status & MType ) + switch (TypeOfStatus (theStatus)) { - case Message_DONE: return ( myDone & getBitFlag( status ) ? Standard_True : Standard_False ); - case Message_WARN: return ( myWarn & getBitFlag( status ) ? Standard_True : Standard_False ); - case Message_ALARM:return ( myAlarm & getBitFlag( status ) ? Standard_True : Standard_False ); - case Message_FAIL: return ( myFail & getBitFlag( status ) ? Standard_True : Standard_False ); - default: return Standard_False; + case Message_DONE: return (myDone & getBitFlag (theStatus)) != 0; + case Message_WARN: return (myWarn & getBitFlag (theStatus)) != 0; + case Message_ALARM: return (myAlarm & getBitFlag (theStatus)) != 0; + case Message_FAIL: return (myFail & getBitFlag (theStatus)) != 0; } + return Standard_False; } - + //! Clear one status - void Clear (Message_Status status) + void Clear (Message_Status theStatus) { - switch( status & MType ) + switch (TypeOfStatus (theStatus)) { - case Message_DONE: myDone &= ~(getBitFlag( status )); return; - case Message_WARN: myWarn &= ~(getBitFlag( status )); return; - case Message_ALARM:myAlarm &= ~(getBitFlag( status )); return; - case Message_FAIL: myFail &= ~(getBitFlag( status )); return; - default: return; + case Message_DONE: myDone &= ~(getBitFlag (theStatus)); return; + case Message_WARN: myWarn &= ~(getBitFlag (theStatus)); return; + case Message_ALARM:myAlarm &= ~(getBitFlag (theStatus)); return; + case Message_FAIL: myFail &= ~(getBitFlag (theStatus)); return; } } - + //!@} //!@name Advanced: Group operations (useful for analysis) @@ -121,7 +119,7 @@ class Message_ExecStatus Standard_Boolean IsFail () const { return myFail != Message_None; } Standard_Boolean IsWarn () const { return myWarn != Message_None; } Standard_Boolean IsAlarm () const { return myAlarm != Message_None; } - + //! Set all statuses of each type void SetAllDone () { myDone = ~0; } void SetAllWarn () { myWarn = ~0; } @@ -139,7 +137,7 @@ class Message_ExecStatus { myDone = myWarn = myAlarm = myFail = Message_None; } - + //! Add statuses to me from theOther execution status void Add ( const Message_ExecStatus& theOther ) { @@ -164,11 +162,11 @@ class Message_ExecStatus //@} - public: +public: //!@name Advanced: Iteration and analysis of status flags //!@{ - + //! Definitions of range of available statuses enum StatusRange { @@ -179,29 +177,29 @@ class Message_ExecStatus }; //! Returns index of status in whole range [FirstStatus, LastStatus] - static Standard_Integer StatusIndex( Message_Status status ) + static Standard_Integer StatusIndex (Message_Status theStatus) { - switch( status & MType ) + switch (TypeOfStatus (theStatus)) { - case Message_DONE: return 0 * StatusesPerType + LocalStatusIndex(status); - case Message_WARN: return 1 * StatusesPerType + LocalStatusIndex(status); - case Message_ALARM: return 2 * StatusesPerType + LocalStatusIndex(status); - case Message_FAIL: return 3 * StatusesPerType + LocalStatusIndex(status); - default: return 0; + case Message_DONE: return 0 * StatusesPerType + LocalStatusIndex(theStatus); + case Message_WARN: return 1 * StatusesPerType + LocalStatusIndex(theStatus); + case Message_ALARM: return 2 * StatusesPerType + LocalStatusIndex(theStatus); + case Message_FAIL: return 3 * StatusesPerType + LocalStatusIndex(theStatus); } + return 0; } //! Returns index of status inside type of status (Done or Warn or, etc) //! in range [1, StatusesPerType] - static Standard_Integer LocalStatusIndex( Message_Status status ) + static Standard_Integer LocalStatusIndex (Message_Status theStatus) { - return (status & MIndex) + 1; + return ((Standard_UInteger )theStatus & (Standard_UInteger )MIndex) + 1; } //! Returns status type (DONE, WARN, ALARM, or FAIL) - static Message_StatusType TypeOfStatus( Message_Status status ) + static Message_StatusType TypeOfStatus (Message_Status theStatus) { - return (Message_StatusType)(status & MType); + return (Message_StatusType )((Standard_UInteger )theStatus & (Standard_UInteger )MType); } //! Returns status with index theIndex in whole range [FirstStatus, LastStatus] @@ -221,8 +219,7 @@ class Message_ExecStatus //!@} - private: - // ---------- PRIVATE FIELDS ---------- +private: Standard_Integer myDone; Standard_Integer myWarn; Standard_Integer myAlarm; diff --git a/src/Standard/Standard_TypeDef.hxx b/src/Standard/Standard_TypeDef.hxx index 81d6e5f1e1..4b23181ed4 100755 --- a/src/Standard/Standard_TypeDef.hxx +++ b/src/Standard/Standard_TypeDef.hxx @@ -59,6 +59,7 @@ #include typedef int Standard_Integer; +typedef unsigned int Standard_UInteger; typedef double Standard_Real; typedef bool Standard_Boolean; typedef float Standard_ShortReal; diff --git a/src/ViewerTest/ViewerTest_EventManager.cxx b/src/ViewerTest/ViewerTest_EventManager.cxx index 37c192af28..d3fae9c88e 100644 --- a/src/ViewerTest/ViewerTest_EventManager.cxx +++ b/src/ViewerTest/ViewerTest_EventManager.cxx @@ -88,27 +88,37 @@ ViewerTest_EventManager::ViewerTest_EventManager (const Handle(V3d_View)& { myViewAnimation = GlobalViewAnimation(); - addActionHotKeys (Aspect_VKey_NavForward, Aspect_VKey_W, Aspect_VKey_W | Aspect_VKeyFlags_SHIFT); - addActionHotKeys (Aspect_VKey_NavBackward , Aspect_VKey_S, Aspect_VKey_S | Aspect_VKeyFlags_SHIFT); - addActionHotKeys (Aspect_VKey_NavSlideLeft, Aspect_VKey_A, Aspect_VKey_A | Aspect_VKeyFlags_SHIFT); - addActionHotKeys (Aspect_VKey_NavSlideRight, Aspect_VKey_D, Aspect_VKey_D | Aspect_VKeyFlags_SHIFT); - addActionHotKeys (Aspect_VKey_NavRollCCW, Aspect_VKey_Q, Aspect_VKey_Q | Aspect_VKeyFlags_SHIFT); - addActionHotKeys (Aspect_VKey_NavRollCW, Aspect_VKey_E, Aspect_VKey_E | Aspect_VKeyFlags_SHIFT); - - addActionHotKeys (Aspect_VKey_NavSpeedIncrease, Aspect_VKey_Plus, Aspect_VKey_Plus | Aspect_VKeyFlags_SHIFT, - Aspect_VKey_Equal, - Aspect_VKey_NumpadAdd, Aspect_VKey_NumpadAdd | Aspect_VKeyFlags_SHIFT); - addActionHotKeys (Aspect_VKey_NavSpeedDecrease, Aspect_VKey_Minus, Aspect_VKey_Minus | Aspect_VKeyFlags_SHIFT, - Aspect_VKey_NumpadSubtract, Aspect_VKey_NumpadSubtract | Aspect_VKeyFlags_SHIFT); - - addActionHotKeys (Aspect_VKey_NavLookUp, Aspect_VKey_Up); - addActionHotKeys (Aspect_VKey_NavLookDown, Aspect_VKey_Down); - addActionHotKeys (Aspect_VKey_NavLookLeft, Aspect_VKey_Left); - addActionHotKeys (Aspect_VKey_NavLookRight, Aspect_VKey_Right); - addActionHotKeys (Aspect_VKey_NavSlideLeft, Aspect_VKey_Left | Aspect_VKeyFlags_SHIFT); - addActionHotKeys (Aspect_VKey_NavSlideRight, Aspect_VKey_Right | Aspect_VKeyFlags_SHIFT); - addActionHotKeys (Aspect_VKey_NavSlideUp, Aspect_VKey_Up | Aspect_VKeyFlags_SHIFT); - addActionHotKeys (Aspect_VKey_NavSlideDown, Aspect_VKey_Down | Aspect_VKeyFlags_SHIFT); + addActionHotKeys (Aspect_VKey_NavForward, (Standard_UInteger )Aspect_VKey_W, + (Standard_UInteger )Aspect_VKey_W | (Standard_UInteger )Aspect_VKeyFlags_SHIFT); + addActionHotKeys (Aspect_VKey_NavBackward , (Standard_UInteger )Aspect_VKey_S, + (Standard_UInteger )Aspect_VKey_S | (Standard_UInteger )Aspect_VKeyFlags_SHIFT); + addActionHotKeys (Aspect_VKey_NavSlideLeft, (Standard_UInteger )Aspect_VKey_A, + (Standard_UInteger )Aspect_VKey_A | (Standard_UInteger )Aspect_VKeyFlags_SHIFT); + addActionHotKeys (Aspect_VKey_NavSlideRight, (Standard_UInteger )Aspect_VKey_D, + (Standard_UInteger )Aspect_VKey_D | (Standard_UInteger )Aspect_VKeyFlags_SHIFT); + addActionHotKeys (Aspect_VKey_NavRollCCW, (Standard_UInteger )Aspect_VKey_Q, + (Standard_UInteger )Aspect_VKey_Q | (Standard_UInteger )Aspect_VKeyFlags_SHIFT); + addActionHotKeys (Aspect_VKey_NavRollCW, (Standard_UInteger )Aspect_VKey_E, + (Standard_UInteger )Aspect_VKey_E | (Standard_UInteger )Aspect_VKeyFlags_SHIFT); + + addActionHotKeys (Aspect_VKey_NavSpeedIncrease, (Standard_UInteger )Aspect_VKey_Plus, + (Standard_UInteger )Aspect_VKey_Plus | (Standard_UInteger )Aspect_VKeyFlags_SHIFT, + (Standard_UInteger )Aspect_VKey_Equal, + (Standard_UInteger )Aspect_VKey_NumpadAdd, + (Standard_UInteger )Aspect_VKey_NumpadAdd | (Standard_UInteger )Aspect_VKeyFlags_SHIFT); + addActionHotKeys (Aspect_VKey_NavSpeedDecrease, (Standard_UInteger )Aspect_VKey_Minus, + (Standard_UInteger )Aspect_VKey_Minus | (Standard_UInteger )Aspect_VKeyFlags_SHIFT, + (Standard_UInteger )Aspect_VKey_NumpadSubtract, + (Standard_UInteger )Aspect_VKey_NumpadSubtract | (Standard_UInteger )Aspect_VKeyFlags_SHIFT); + + addActionHotKeys (Aspect_VKey_NavLookUp, (Standard_UInteger )Aspect_VKey_Up); + addActionHotKeys (Aspect_VKey_NavLookDown, (Standard_UInteger )Aspect_VKey_Down); + addActionHotKeys (Aspect_VKey_NavLookLeft, (Standard_UInteger )Aspect_VKey_Left); + addActionHotKeys (Aspect_VKey_NavLookRight, (Standard_UInteger )Aspect_VKey_Right); + addActionHotKeys (Aspect_VKey_NavSlideLeft, (Standard_UInteger )Aspect_VKey_Left | (Standard_UInteger)Aspect_VKeyFlags_SHIFT); + addActionHotKeys (Aspect_VKey_NavSlideRight, (Standard_UInteger )Aspect_VKey_Right | (Standard_UInteger)Aspect_VKeyFlags_SHIFT); + addActionHotKeys (Aspect_VKey_NavSlideUp, (Standard_UInteger )Aspect_VKey_Up | (Standard_UInteger)Aspect_VKeyFlags_SHIFT); + addActionHotKeys (Aspect_VKey_NavSlideDown, (Standard_UInteger )Aspect_VKey_Down | (Standard_UInteger)Aspect_VKeyFlags_SHIFT); // window could be actually not yet set to the View //SetupWindowCallbacks (theView->Window()); @@ -508,11 +518,11 @@ void ViewerTest_EventManager::ProcessKeyPress (Aspect_VKey theKey) myCtx->UpdateCurrentViewer(); break; } - case Aspect_VKey_S | Aspect_VKeyFlags_CTRL: - case Aspect_VKey_W | Aspect_VKeyFlags_CTRL: + case (Standard_UInteger)Aspect_VKey_S | (Standard_UInteger)Aspect_VKeyFlags_CTRL: + case (Standard_UInteger)Aspect_VKey_W | (Standard_UInteger)Aspect_VKeyFlags_CTRL: { Standard_Integer aDispMode = AIS_Shaded; - if (theKey == (Aspect_VKey_S | Aspect_VKeyFlags_CTRL)) + if (theKey == ((Standard_UInteger)Aspect_VKey_S | (Standard_UInteger)Aspect_VKeyFlags_CTRL)) { aDispMode = AIS_Shaded; std::cout << "setup Shaded display mode\n"; From 4e1b5fcbf0cd7ec736e4d9c0d5683dd013c752a1 Mon Sep 17 00:00:00 2001 From: ddzama Date: Tue, 29 Mar 2022 16:32:46 +0300 Subject: [PATCH 271/639] 0032903: Coding Rules - eliminate MSVC warning C26451 on VS2019/C++20 Put explicit type casting to avoid: Warning C26451 Arithmetic overflow: Using operator '-' on a 4 byte value and then casting the result to a 8 byte value. Cast the value to the wider type before calling operator '-' to avoid overflow (io.2). --- src/AIS/AIS_ViewController.cxx | 15 +++++++----- src/Graphic3d/Graphic3d_ArrayOfPrimitives.hxx | 24 +++++++++---------- src/Message/Message_ProgressScope.hxx | 2 +- src/Standard/Standard_Real.hxx | 10 ++++---- 4 files changed, 28 insertions(+), 23 deletions(-) diff --git a/src/AIS/AIS_ViewController.cxx b/src/AIS/AIS_ViewController.cxx index 171b48e1e8..8ce7822d48 100644 --- a/src/AIS/AIS_ViewController.cxx +++ b/src/AIS/AIS_ViewController.cxx @@ -1010,7 +1010,8 @@ bool AIS_ViewController::UpdateMousePosition (const Graphic3d_Vec2i& thePoint, const double aRotTol = theIsEmulated ? double(myTouchToleranceScale) * myTouchRotationThresholdPx : 0.0; - if (double (Abs (aDelta.x()) + Abs (aDelta.y())) > aRotTol) + const Graphic3d_Vec2d aDeltaF (aDelta); + if (Abs (aDeltaF.x()) + Abs (aDeltaF.y()) > aRotTol) { const double aRotAccel = myNavigationMode == AIS_NavigationMode_FirstPersonWalk ? myMouseAccel : myOrbitAccel; const Graphic3d_Vec2i aRotDelta = thePoint - myMousePressPoint; @@ -1063,7 +1064,8 @@ bool AIS_ViewController::UpdateMousePosition (const Graphic3d_Vec2i& thePoint, const double aPanTol = theIsEmulated ? double(myTouchToleranceScale) * myTouchPanThresholdPx : 0.0; - if (double (Abs (aDelta.x()) + Abs (aDelta.y())) > aPanTol) + const Graphic3d_Vec2d aDeltaF (aDelta); + if (Abs (aDeltaF.x()) + Abs (aDeltaF.y()) > aPanTol) { if (myUpdateStartPointPan) { @@ -1629,10 +1631,11 @@ void AIS_ViewController::handleZoom (const Handle(V3d_View)& theView, Graphic3d_Vec2i aWinSize; theView->Window()->Size (aWinSize.x(), aWinSize.y()); - const Graphic3d_Vec2d aPanFromCenterPx (double(theParams.Point.x()) - 0.5 * double(aWinSize.x()), - double(aWinSize.y() - theParams.Point.y() - 1) - 0.5 * double(aWinSize.y())); - aDxy.x() += -aViewDims1.X() * aPanFromCenterPx.x() / double(aWinSize.x()); - aDxy.y() += -aViewDims1.Y() * aPanFromCenterPx.y() / double(aWinSize.y()); + const Graphic3d_Vec2d aWinSizeF (aWinSize); + const Graphic3d_Vec2d aPanFromCenterPx (double(theParams.Point.x()) - 0.5 * aWinSizeF.x(), + aWinSizeF.y() - double(theParams.Point.y()) - 1.0 - 0.5 * aWinSizeF.y()); + aDxy.x() += -aViewDims1.X() * aPanFromCenterPx.x() / aWinSizeF.x(); + aDxy.y() += -aViewDims1.Y() * aPanFromCenterPx.y() / aWinSizeF.y(); } //theView->Translate (aCam, aDxy.x(), aDxy.y()); diff --git a/src/Graphic3d/Graphic3d_ArrayOfPrimitives.hxx b/src/Graphic3d/Graphic3d_ArrayOfPrimitives.hxx index f889f4dffc..4d1daa5e49 100644 --- a/src/Graphic3d/Graphic3d_ArrayOfPrimitives.hxx +++ b/src/Graphic3d/Graphic3d_ArrayOfPrimitives.hxx @@ -315,7 +315,7 @@ public: void SetVertice (const Standard_Integer theIndex, const Standard_ShortReal theX, const Standard_ShortReal theY, const Standard_ShortReal theZ) { Standard_OutOfRange_Raise_if (theIndex < 1 || theIndex > myAttribs->NbMaxElements(), "BAD VERTEX index"); - Graphic3d_Vec3& aVec = *reinterpret_cast (myAttribs->ChangeData() + myPosStride * (theIndex - 1)); + Graphic3d_Vec3& aVec = *reinterpret_cast (myAttribs->ChangeData() + myPosStride * ((Standard_Size)theIndex - 1)); aVec.x() = theX; aVec.y() = theY; aVec.z() = theZ; @@ -343,7 +343,7 @@ public: Standard_OutOfRange_Raise_if (theIndex < 1 || theIndex > myAttribs->NbMaxElements(), "BAD VERTEX index"); if (myColData != NULL) { - Graphic3d_Vec4ub* aColorPtr = reinterpret_cast(myColData + myColStride * (theIndex - 1)); + Graphic3d_Vec4ub* aColorPtr = reinterpret_cast(myColData + myColStride * ((Standard_Size)theIndex - 1)); aColorPtr->SetValues (Standard_Byte(theR * 255.0), Standard_Byte(theG * 255.0), Standard_Byte(theB * 255.0), 255); @@ -360,7 +360,7 @@ public: Standard_OutOfRange_Raise_if (theIndex < 1 || theIndex > myAttribs->NbMaxElements(), "BAD VERTEX index"); if (myColData != NULL) { - Graphic3d_Vec4ub* aColorPtr = reinterpret_cast(myColData + myColStride * (theIndex - 1)); + Graphic3d_Vec4ub* aColorPtr = reinterpret_cast(myColData + myColStride * ((Standard_Size)theIndex - 1)); (*aColorPtr) = theColor; } myAttribs->NbElements = Max (theIndex, myAttribs->NbElements); @@ -377,7 +377,7 @@ public: Standard_OutOfRange_Raise_if (theIndex < 1 || theIndex > myAttribs->NbMaxElements(), "BAD VERTEX index"); if (myColData != NULL) { - *reinterpret_cast(myColData + myColStride * (theIndex - 1)) = theColor32; + *reinterpret_cast(myColData + myColStride * ((Standard_Size)theIndex - 1)) = theColor32; } } @@ -399,7 +399,7 @@ public: Standard_OutOfRange_Raise_if (theIndex < 1 || theIndex > myAttribs->NbMaxElements(), "BAD VERTEX index"); if (myNormData != NULL) { - Graphic3d_Vec3& aVec = *reinterpret_cast(myNormData + myNormStride * (theIndex - 1)); + Graphic3d_Vec3& aVec = *reinterpret_cast(myNormData + myNormStride * ((Standard_Size)theIndex - 1)); aVec.x() = Standard_ShortReal (theNX); aVec.y() = Standard_ShortReal (theNY); aVec.z() = Standard_ShortReal (theNZ); @@ -424,7 +424,7 @@ public: Standard_OutOfRange_Raise_if (theIndex < 1 || theIndex > myAttribs->NbMaxElements(), "BAD VERTEX index"); if (myTexData != NULL) { - Graphic3d_Vec2& aVec = *reinterpret_cast(myTexData + myTexStride * (theIndex - 1)); + Graphic3d_Vec2& aVec = *reinterpret_cast(myTexData + myTexStride * ((Standard_Size)theIndex - 1)); aVec.x() = Standard_ShortReal (theTX); aVec.y() = Standard_ShortReal (theTY); } @@ -450,7 +450,7 @@ public: { theX = theY = theZ = 0.0; Standard_OutOfRange_Raise_if (theRank < 1 || theRank > myAttribs->NbElements, "BAD VERTEX index"); - const Graphic3d_Vec3& aVec = *reinterpret_cast (myAttribs->Data() + myPosStride * (theRank - 1)); + const Graphic3d_Vec3& aVec = *reinterpret_cast (myAttribs->Data() + myPosStride * ((Standard_Size)theRank - 1)); theX = Standard_Real(aVec.x()); theY = Standard_Real(aVec.y()); theZ = Standard_Real(aVec.z()); @@ -473,7 +473,7 @@ public: Graphic3d_Vec4ub& theColor) const { Standard_OutOfRange_Raise_if (myColData == NULL || theIndex < 1 || theIndex > myAttribs->NbElements, "BAD VERTEX index"); - theColor = *reinterpret_cast(myColData + myColStride * (theIndex - 1)); + theColor = *reinterpret_cast(myColData + myColStride * ((Standard_Size)theIndex - 1)); } //! Returns the vertex color values from the vertex table if defined. @@ -489,7 +489,7 @@ public: { return; } - const Graphic3d_Vec4ub& aColor = *reinterpret_cast(myColData + myColStride * (theRank - 1)); + const Graphic3d_Vec4ub& aColor = *reinterpret_cast(myColData + myColStride * ((Standard_Size)theRank - 1)); theR = Standard_Real(aColor.r()) / 255.0; theG = Standard_Real(aColor.g()) / 255.0; theB = Standard_Real(aColor.b()) / 255.0; @@ -503,7 +503,7 @@ public: Standard_OutOfRange_Raise_if (theRank < 1 || theRank > myAttribs->NbElements, "BAD VERTEX index"); if (myColData != NULL) { - theColor = *reinterpret_cast(myColData + myColStride * (theRank - 1)); + theColor = *reinterpret_cast(myColData + myColStride * ((Standard_Size)theRank - 1)); } } @@ -528,7 +528,7 @@ public: Standard_OutOfRange_Raise_if (theRank < 1 || theRank > myAttribs->NbElements, "BAD VERTEX index"); if (myNormData != NULL) { - const Graphic3d_Vec3& aVec = *reinterpret_cast(myNormData + myNormStride * (theRank - 1)); + const Graphic3d_Vec3& aVec = *reinterpret_cast(myNormData + myNormStride * ((Standard_Size)theRank - 1)); theNX = Standard_Real(aVec.x()); theNY = Standard_Real(aVec.y()); theNZ = Standard_Real(aVec.z()); @@ -555,7 +555,7 @@ public: Standard_OutOfRange_Raise_if (theRank < 1 || theRank > myAttribs->NbElements, "BAD VERTEX index"); if (myTexData != NULL) { - const Graphic3d_Vec2& aVec = *reinterpret_cast(myTexData + myTexStride * (theRank - 1)); + const Graphic3d_Vec2& aVec = *reinterpret_cast(myTexData + myTexStride * ((Standard_Size)theRank - 1)); theTX = Standard_Real(aVec.x()); theTY = Standard_Real(aVec.y()); } diff --git a/src/Message/Message_ProgressScope.hxx b/src/Message/Message_ProgressScope.hxx index 5652e6859b..1041f401d1 100644 --- a/src/Message/Message_ProgressScope.hxx +++ b/src/Message/Message_ProgressScope.hxx @@ -271,7 +271,7 @@ public: //! @name Preparation methods if (!theName.IsEmpty()) { myIsOwnName = true; - myName = (char* )Standard::Allocate (theName.Length() + 1); + myName = (char* )Standard::Allocate (Standard_Size(theName.Length()) + Standard_Size(1)); char* aName = (char* )myName; memcpy (aName, theName.ToCString(), theName.Length()); aName[theName.Length()] = '\0'; diff --git a/src/Standard/Standard_Real.hxx b/src/Standard/Standard_Real.hxx index 767c9c18e3..43a95d717d 100644 --- a/src/Standard/Standard_Real.hxx +++ b/src/Standard/Standard_Real.hxx @@ -253,14 +253,16 @@ inline Standard_Real RealPart (const Standard_Real Value) // If input value is out of valid range for integers, // minimal or maximal possible integer is returned. //------------------------------------------------------------------- -inline Standard_Integer RealToInt (const Standard_Real Value) +inline Standard_Integer RealToInt (const Standard_Real theValue) { // Note that on WNT under MS VC++ 8.0 conversion of double value less // than INT_MIN or greater than INT_MAX to integer will cause signal // "Floating point multiple trap" (OCC17861) - return Value < INT_MIN ? INT_MIN - : Value > INT_MAX ? INT_MAX - : (Standard_Integer)Value; + return theValue < static_cast(INT_MIN) + ? static_cast(INT_MIN) + : (theValue > static_cast(INT_MAX) + ? static_cast(INT_MAX) + : static_cast(theValue)); } // ======================================================================= From 7b3f255f237c406cd56cd3b7fb4125c9ec76b34d Mon Sep 17 00:00:00 2001 From: ddzama Date: Thu, 31 Mar 2022 09:21:08 +0300 Subject: [PATCH 272/639] 0032917: Coding Rules - eliminate MSVS warning C26440 on VS2019/C++20 (If your function may not throw, declare it noexcept) Microsoft Visual Studio Professional 2019 Version 16.11.11 std=c++20 Get rid of warning C26440: "If your function may not throw, declare it noexcept" "If code is not supposed to cause any exceptions, it should be marked as such by using the 'noexcept' specifier. This would help to simplify error handling on the client code side, as well as enable compiler to do additional optimizations." --- src/NCollection/NCollection_AliasedArray.hxx | 2 +- src/Poly/Poly_ArrayOfNodes.hxx | 4 ++-- src/Poly/Poly_ArrayOfUVNodes.hxx | 4 ++-- src/Standard/Standard_Handle.hxx | 4 ++-- src/TCollection/TCollection_AsciiString.hxx | 4 ++-- src/TCollection/TCollection_ExtendedString.hxx | 4 ++-- src/TopLoc/TopLoc_SListOfItemLocation.hxx | 4 ++-- 7 files changed, 13 insertions(+), 13 deletions(-) diff --git a/src/NCollection/NCollection_AliasedArray.hxx b/src/NCollection/NCollection_AliasedArray.hxx index a13a000861..d3b297795c 100644 --- a/src/NCollection/NCollection_AliasedArray.hxx +++ b/src/NCollection/NCollection_AliasedArray.hxx @@ -65,7 +65,7 @@ public: } //! Move constructor - NCollection_AliasedArray (NCollection_AliasedArray&& theOther) + NCollection_AliasedArray (NCollection_AliasedArray&& theOther) noexcept : myData (theOther.myData), myStride (theOther.myStride), mySize (theOther.mySize), myDeletable (theOther.myDeletable) { theOther.myDeletable = false; diff --git a/src/Poly/Poly_ArrayOfNodes.hxx b/src/Poly/Poly_ArrayOfNodes.hxx index c65b8842c9..94f26b887d 100644 --- a/src/Poly/Poly_ArrayOfNodes.hxx +++ b/src/Poly/Poly_ArrayOfNodes.hxx @@ -85,14 +85,14 @@ public: Poly_ArrayOfNodes& operator= (const Poly_ArrayOfNodes& theOther) { return Assign (theOther); } //! Move constructor - Poly_ArrayOfNodes (Poly_ArrayOfNodes&& theOther) + Poly_ArrayOfNodes (Poly_ArrayOfNodes&& theOther) noexcept : NCollection_AliasedArray (std::move (theOther)) { // } //! Move assignment operator; @sa Move() - Poly_ArrayOfNodes& operator= (Poly_ArrayOfNodes&& theOther) + Poly_ArrayOfNodes& operator= (Poly_ArrayOfNodes&& theOther) noexcept { return Move (theOther); } diff --git a/src/Poly/Poly_ArrayOfUVNodes.hxx b/src/Poly/Poly_ArrayOfUVNodes.hxx index 8ec30bc466..682be382d2 100644 --- a/src/Poly/Poly_ArrayOfUVNodes.hxx +++ b/src/Poly/Poly_ArrayOfUVNodes.hxx @@ -85,14 +85,14 @@ public: Poly_ArrayOfUVNodes& operator= (const Poly_ArrayOfUVNodes& theOther) { return Assign (theOther); } //! Move constructor - Poly_ArrayOfUVNodes (Poly_ArrayOfUVNodes&& theOther) + Poly_ArrayOfUVNodes (Poly_ArrayOfUVNodes&& theOther) noexcept : NCollection_AliasedArray (std::move (theOther)) { // } //! Move assignment operator; @sa Move() - Poly_ArrayOfUVNodes& operator= (Poly_ArrayOfUVNodes&& theOther) + Poly_ArrayOfUVNodes& operator= (Poly_ArrayOfUVNodes&& theOther) noexcept { return Move (theOther); } diff --git a/src/Standard/Standard_Handle.hxx b/src/Standard/Standard_Handle.hxx index 763f83a997..723dd90324 100644 --- a/src/Standard/Standard_Handle.hxx +++ b/src/Standard/Standard_Handle.hxx @@ -71,7 +71,7 @@ namespace opencascade { } //! Move constructor - handle (handle&& theHandle) : entity(theHandle.entity) + handle (handle&& theHandle) noexcept : entity(theHandle.entity) { theHandle.entity = 0; } @@ -112,7 +112,7 @@ namespace opencascade { } //! Move operator - handle& operator= (handle&& theHandle) + handle& operator= (handle&& theHandle) noexcept { std::swap (this->entity, theHandle.entity); return *this; diff --git a/src/TCollection/TCollection_AsciiString.hxx b/src/TCollection/TCollection_AsciiString.hxx index 8f277b1221..d2592e9a08 100644 --- a/src/TCollection/TCollection_AsciiString.hxx +++ b/src/TCollection/TCollection_AsciiString.hxx @@ -77,7 +77,7 @@ public: Standard_EXPORT TCollection_AsciiString(const TCollection_AsciiString& astring); //! Move constructor - TCollection_AsciiString (TCollection_AsciiString&& theOther) + TCollection_AsciiString (TCollection_AsciiString&& theOther) noexcept : mystring (theOther.mystring), mylength (theOther.mylength) { @@ -279,7 +279,7 @@ void operator = (const TCollection_AsciiString& fromwhere) Standard_EXPORT void Swap (TCollection_AsciiString& theOther); //! Move assignment operator - TCollection_AsciiString& operator= (TCollection_AsciiString&& theOther) { Swap (theOther); return *this; } + TCollection_AsciiString& operator= (TCollection_AsciiString&& theOther) noexcept { Swap (theOther); return *this; } //! Frees memory allocated by AsciiString. Standard_EXPORT ~TCollection_AsciiString(); diff --git a/src/TCollection/TCollection_ExtendedString.hxx b/src/TCollection/TCollection_ExtendedString.hxx index be5c3f97b3..1786028e79 100644 --- a/src/TCollection/TCollection_ExtendedString.hxx +++ b/src/TCollection/TCollection_ExtendedString.hxx @@ -98,7 +98,7 @@ public: Standard_EXPORT TCollection_ExtendedString(const TCollection_ExtendedString& astring); //! Move constructor - TCollection_ExtendedString (TCollection_ExtendedString&& theOther) + TCollection_ExtendedString (TCollection_ExtendedString&& theOther) noexcept : mystring (theOther.mystring), mylength (theOther.mylength) { @@ -153,7 +153,7 @@ void operator = (const TCollection_ExtendedString& fromwhere) Standard_EXPORT void Swap (TCollection_ExtendedString& theOther); //! Move assignment operator - TCollection_ExtendedString& operator= (TCollection_ExtendedString&& theOther) { Swap (theOther); return *this; } + TCollection_ExtendedString& operator= (TCollection_ExtendedString&& theOther) noexcept { Swap (theOther); return *this; } //! Frees memory allocated by ExtendedString. Standard_EXPORT ~TCollection_ExtendedString(); diff --git a/src/TopLoc/TopLoc_SListOfItemLocation.hxx b/src/TopLoc/TopLoc_SListOfItemLocation.hxx index ce6b3d356d..a0093d5c69 100644 --- a/src/TopLoc/TopLoc_SListOfItemLocation.hxx +++ b/src/TopLoc/TopLoc_SListOfItemLocation.hxx @@ -70,13 +70,13 @@ public: } //! Move constructor - TopLoc_SListOfItemLocation (TopLoc_SListOfItemLocation&& theOther) + TopLoc_SListOfItemLocation (TopLoc_SListOfItemLocation&& theOther) noexcept : myNode(std::move (theOther.myNode)) { } //! Move operator - TopLoc_SListOfItemLocation& operator= (TopLoc_SListOfItemLocation&& theOther) + TopLoc_SListOfItemLocation& operator= (TopLoc_SListOfItemLocation&& theOther) noexcept { myNode = std::move (theOther.myNode); return *this; From 82598ec0f23c9698ef113e008283b5aca5d8efcf Mon Sep 17 00:00:00 2001 From: aml Date: Fri, 14 Jan 2022 16:37:13 +0300 Subject: [PATCH 273/639] 0032951: Coding - get rid of unused headers [GeomConvert to IGESBasic] --- samples/OCCTOverview/code/Sample2D_Face.h | 1 + samples/OCCTOverview/code/Sample2D_Markers.h | 1 + src/AIS/AIS_LightSource.hxx | 2 ++ src/AIS/AIS_TexturedShape.hxx | 1 + src/AIS/AIS_XRTrackedDevice.cxx | 1 + src/GProp/GProp.cxx | 3 -- src/GProp/GProp_CelGProps.cxx | 2 -- src/GProp/GProp_CelGProps.hxx | 2 -- src/GProp/GProp_GProps.cxx | 1 - src/GProp/GProp_GProps.hxx | 2 -- src/GProp/GProp_PEquation.cxx | 1 - src/GProp/GProp_PEquation.hxx | 3 -- src/GProp/GProp_PGProps.cxx | 3 -- src/GProp/GProp_PGProps.hxx | 1 - src/GProp/GProp_PrincipalProps.cxx | 3 -- src/GProp/GProp_PrincipalProps.hxx | 1 - src/GProp/GProp_SelGProps.cxx | 1 - src/GProp/GProp_SelGProps.hxx | 2 -- src/GProp/GProp_UndefinedAxis.hxx | 1 - src/GProp/GProp_VelGProps.cxx | 2 -- src/GProp/GProp_VelGProps.hxx | 2 -- src/GeomConvert/GeomConvert.cxx | 4 --- src/GeomConvert/GeomConvert_1.cxx | 6 ---- src/GeomConvert/GeomConvert_ApproxCurve.cxx | 2 -- src/GeomConvert/GeomConvert_ApproxSurface.cxx | 1 - .../GeomConvert_BSplineCurveKnotSplitting.cxx | 1 - .../GeomConvert_BSplineCurveToBezierCurve.cxx | 1 - .../GeomConvert_BSplineCurveToBezierCurve.hxx | 1 - ...eomConvert_BSplineSurfaceKnotSplitting.cxx | 1 - ...mConvert_BSplineSurfaceToBezierSurface.cxx | 1 - ...mConvert_BSplineSurfaceToBezierSurface.hxx | 1 - ...ert_CompBezierSurfacesToBSplineSurface.cxx | 1 - ...ert_CompBezierSurfacesToBSplineSurface.hxx | 2 -- .../GeomConvert_CompCurveToBSplineCurve.hxx | 2 -- src/GeomConvert/GeomConvert_Units.cxx | 2 -- src/GeomConvert/GeomConvert_Units.hxx | 1 - .../GeomEvaluator_OffsetCurve.hxx | 1 - src/GeomFill/GeomFill.cxx | 1 - src/GeomFill/GeomFill_AppSurf.hxx | 2 -- src/GeomFill/GeomFill_AppSweep.hxx | 2 -- src/GeomFill/GeomFill_BoundWithSurf.hxx | 2 -- src/GeomFill/GeomFill_Boundary.hxx | 1 - src/GeomFill/GeomFill_CircularBlendFunc.cxx | 1 - src/GeomFill/GeomFill_CircularBlendFunc.hxx | 2 -- src/GeomFill/GeomFill_ConstantBiNormal.cxx | 2 -- src/GeomFill/GeomFill_ConstantBiNormal.hxx | 2 -- src/GeomFill/GeomFill_ConstrainedFilling.cxx | 3 -- src/GeomFill/GeomFill_ConstrainedFilling.hxx | 2 -- src/GeomFill/GeomFill_Coons.hxx | 1 - src/GeomFill/GeomFill_CoonsAlgPatch.cxx | 1 - src/GeomFill/GeomFill_CoonsAlgPatch.hxx | 1 - src/GeomFill/GeomFill_CorrectedFrenet.cxx | 3 -- src/GeomFill/GeomFill_CorrectedFrenet.hxx | 3 -- src/GeomFill/GeomFill_CurveAndTrihedron.cxx | 1 - src/GeomFill/GeomFill_CurveAndTrihedron.hxx | 4 --- src/GeomFill/GeomFill_Darboux.cxx | 3 -- src/GeomFill/GeomFill_Darboux.hxx | 2 -- src/GeomFill/GeomFill_DegeneratedBound.hxx | 2 -- src/GeomFill/GeomFill_DiscreteTrihedron.cxx | 1 - src/GeomFill/GeomFill_DiscreteTrihedron.hxx | 3 -- src/GeomFill/GeomFill_DraftTrihedron.cxx | 1 - src/GeomFill/GeomFill_DraftTrihedron.hxx | 3 -- src/GeomFill/GeomFill_EvolvedSection.cxx | 5 --- src/GeomFill/GeomFill_EvolvedSection.hxx | 2 -- src/GeomFill/GeomFill_Filling.cxx | 1 - src/GeomFill/GeomFill_Fixed.cxx | 1 - src/GeomFill/GeomFill_Fixed.hxx | 3 -- src/GeomFill/GeomFill_Frenet.cxx | 1 - src/GeomFill/GeomFill_Frenet.hxx | 3 -- src/GeomFill/GeomFill_FunctionDraft.cxx | 2 -- src/GeomFill/GeomFill_FunctionGuide.cxx | 6 ---- src/GeomFill/GeomFill_FunctionGuide.hxx | 1 - src/GeomFill/GeomFill_Generator.cxx | 2 -- src/GeomFill/GeomFill_Generator.hxx | 1 - src/GeomFill/GeomFill_GuideTrihedronAC.cxx | 4 --- src/GeomFill/GeomFill_GuideTrihedronAC.hxx | 2 -- src/GeomFill/GeomFill_GuideTrihedronPlan.cxx | 3 -- src/GeomFill/GeomFill_GuideTrihedronPlan.hxx | 3 -- .../GeomFill_HArray1OfLocationLaw.hxx | 1 - src/GeomFill/GeomFill_HArray1OfSectionLaw.hxx | 1 - src/GeomFill/GeomFill_LocFunction.hxx | 2 -- src/GeomFill/GeomFill_LocationDraft.cxx | 3 -- src/GeomFill/GeomFill_LocationGuide.cxx | 7 ---- src/GeomFill/GeomFill_LocationGuide.hxx | 3 -- src/GeomFill/GeomFill_LocationLaw.cxx | 1 - src/GeomFill/GeomFill_NSections.cxx | 5 --- src/GeomFill/GeomFill_NSections.hxx | 2 -- src/GeomFill/GeomFill_Pipe.cxx | 10 ------ src/GeomFill/GeomFill_PlanFunc.hxx | 2 -- src/GeomFill/GeomFill_PolynomialConvertor.cxx | 1 - src/GeomFill/GeomFill_PolynomialConvertor.hxx | 4 --- src/GeomFill/GeomFill_Profiler.cxx | 1 - src/GeomFill/GeomFill_Profiler.hxx | 2 -- .../GeomFill_QuasiAngularConvertor.cxx | 3 -- .../GeomFill_QuasiAngularConvertor.hxx | 3 -- src/GeomFill/GeomFill_SectionGenerator.hxx | 2 -- src/GeomFill/GeomFill_SectionLaw.cxx | 1 - src/GeomFill/GeomFill_SectionLaw.hxx | 2 -- src/GeomFill/GeomFill_SectionPlacement.hxx | 2 -- src/GeomFill/GeomFill_SimpleBound.hxx | 2 -- src/GeomFill/GeomFill_SnglrFunc.cxx | 2 -- src/GeomFill/GeomFill_SnglrFunc.hxx | 2 -- src/GeomFill/GeomFill_Sweep.cxx | 3 -- src/GeomFill/GeomFill_Sweep.hxx | 2 -- src/GeomFill/GeomFill_SweepFunction.cxx | 1 - src/GeomFill/GeomFill_SweepFunction.hxx | 2 -- .../GeomFill_SweepSectionGenerator.cxx | 2 -- src/GeomFill/GeomFill_Tensor.cxx | 6 ++-- src/GeomFill/GeomFill_Tensor.hxx | 2 -- src/GeomFill/GeomFill_TgtField.hxx | 1 - src/GeomFill/GeomFill_TgtOnCoons.hxx | 1 - src/GeomFill/GeomFill_TrihedronLaw.cxx | 2 -- src/GeomFill/GeomFill_TrihedronWithGuide.cxx | 3 -- src/GeomFill/GeomFill_TrihedronWithGuide.hxx | 2 -- src/GeomFill/GeomFill_UniformSection.cxx | 3 -- src/GeomFill/GeomFill_UniformSection.hxx | 2 -- src/GeomInt/GeomInt.cxx | 1 - ...BSplGradientOfTheComputeLineOfWLApprox.hxx | 3 -- ...BSplGradientOfTheComputeLineOfWLApprox.hxx | 4 --- ...BSplGradientOfTheComputeLineOfWLApprox.hxx | 1 - ...adientOfTheComputeLineBezierOfWLApprox.hxx | 3 -- ...yGradientbisOfTheComputeLineOfWLApprox.hxx | 3 -- src/GeomInt/GeomInt_IntSS.hxx | 1 - src/GeomInt/GeomInt_LineConstructor.cxx | 3 -- ...BSplGradientOfTheComputeLineOfWLApprox.hxx | 1 - ...adientOfTheComputeLineBezierOfWLApprox.hxx | 1 - ...yGradientbisOfTheComputeLineOfWLApprox.hxx | 1 - ...adientOfTheComputeLineBezierOfWLApprox.hxx | 4 --- ...yGradientbisOfTheComputeLineOfWLApprox.hxx | 4 --- ...adientOfTheComputeLineBezierOfWLApprox.hxx | 1 - ...yGradientbisOfTheComputeLineOfWLApprox.hxx | 1 - ...adientOfTheComputeLineBezierOfWLApprox.hxx | 1 - ...yGradientbisOfTheComputeLineOfWLApprox.hxx | 1 - ...GeomInt_TheComputeLineBezierOfWLApprox.hxx | 2 -- .../GeomInt_TheComputeLineOfWLApprox.hxx | 2 -- .../GeomInt_TheMultiLineToolOfWLApprox.hxx | 6 ---- src/GeomLProp/GeomLProp.hxx | 2 -- src/GeomLProp/GeomLProp_CurveTool.hxx | 1 - src/GeomLProp/GeomLProp_SLProps.hxx | 2 -- src/GeomLProp/GeomLProp_SurfaceTool.hxx | 1 - src/GeomLib/GeomLib.cxx | 8 ----- src/GeomLib/GeomLib_Check2dBSplineCurve.cxx | 2 -- src/GeomLib/GeomLib_Check2dBSplineCurve.hxx | 3 -- src/GeomLib/GeomLib_CheckBSplineCurve.cxx | 1 - src/GeomLib/GeomLib_CheckBSplineCurve.hxx | 3 -- src/GeomLib/GeomLib_CheckCurveOnSurface.cxx | 6 ---- src/GeomLib/GeomLib_DenominatorMultiplier.cxx | 2 -- src/GeomLib/GeomLib_Interpolate.cxx | 7 ---- src/GeomLib/GeomLib_Interpolate.hxx | 1 - src/GeomLib/GeomLib_IsPlanarSurface.cxx | 2 -- src/GeomLib/GeomLib_IsPlanarSurface.hxx | 2 -- src/GeomLib/GeomLib_LogSample.hxx | 2 -- src/GeomLib/GeomLib_MakeCurvefromApprox.hxx | 1 - src/GeomLib/GeomLib_PolyFunc.hxx | 2 -- src/GeomLib/GeomLib_Tool.cxx | 1 - src/GeomPlate/GeomPlate_Aij.hxx | 1 - src/GeomPlate/GeomPlate_BuildAveragePlane.cxx | 2 -- src/GeomPlate/GeomPlate_BuildAveragePlane.hxx | 2 -- src/GeomPlate/GeomPlate_BuildPlateSurface.cxx | 4 --- src/GeomPlate/GeomPlate_BuildPlateSurface.hxx | 2 -- src/GeomPlate/GeomPlate_CurveConstraint.cxx | 9 ----- src/GeomPlate/GeomPlate_HArray1OfHCurve.hxx | 1 - .../GeomPlate_HSequenceOfPointConstraint.hxx | 1 - src/GeomPlate/GeomPlate_MakeApprox.cxx | 4 --- src/GeomPlate/GeomPlate_MakeApprox.hxx | 1 - src/GeomPlate/GeomPlate_PlateG0Criterion.cxx | 2 -- src/GeomPlate/GeomPlate_PlateG0Criterion.hxx | 3 -- src/GeomPlate/GeomPlate_PlateG1Criterion.cxx | 2 -- src/GeomPlate/GeomPlate_PlateG1Criterion.hxx | 3 -- src/GeomPlate/GeomPlate_PointConstraint.cxx | 7 ---- src/GeomPlate/GeomPlate_PointConstraint.hxx | 2 -- src/GeomPlate/GeomPlate_Surface.cxx | 5 --- src/GeomPlate/GeomPlate_Surface.hxx | 2 -- src/GeomProjLib/GeomProjLib.cxx | 6 ---- src/GeomToIGES/GeomToIGES_GeomCurve.cxx | 9 ----- src/GeomToIGES/GeomToIGES_GeomCurve.hxx | 1 - src/GeomToIGES/GeomToIGES_GeomPoint.cxx | 2 -- src/GeomToIGES/GeomToIGES_GeomSurface.cxx | 10 ------ src/GeomToIGES/GeomToIGES_GeomSurface.hxx | 2 -- src/GeomToIGES/GeomToIGES_GeomVector.cxx | 9 ----- .../GeomToStep_MakeAxis2Placement3d.cxx | 1 - src/GeomToStep/GeomToStep_MakePlane.cxx | 1 - src/GeomToStep/GeomToStep_MakePolyline.cxx | 1 - .../GeomToStep_MakeSurfaceOfRevolution.cxx | 1 - src/GeomTools/GeomTools.cxx | 1 - src/GeomTools/GeomTools_Curve2dSet.cxx | 1 - src/GeomTools/GeomTools_Curve2dSet.hxx | 1 - src/GeomTools/GeomTools_CurveSet.cxx | 1 - src/GeomTools/GeomTools_CurveSet.hxx | 1 - src/GeomTools/GeomTools_SurfaceSet.cxx | 3 -- src/GeomTools/GeomTools_SurfaceSet.hxx | 1 - .../GeomTools_UndefinedTypeHandler.cxx | 1 - .../GeomTools_UndefinedTypeHandler.hxx | 1 - src/GeometryTest/GeometryTest_APICommands.cxx | 3 -- .../GeometryTest_ConstraintCommands.cxx | 13 ------- .../GeometryTest_ContinuityCommands.cxx | 3 -- .../GeometryTest_CurveCommands.cxx | 36 ------------------- .../GeometryTest_FairCurveCommands.cxx | 4 --- .../GeometryTest_PolyCommands.cxx | 2 -- .../GeometryTest_SurfaceCommands.cxx | 15 -------- .../GeometryTest_TestProjCommands.cxx | 4 --- .../GeomliteTest_API2dCommands.cxx | 2 -- .../GeomliteTest_ApproxCommands.cxx | 18 +--------- .../GeomliteTest_CurveCommands.cxx | 24 ------------- .../GeomliteTest_ModificationCommands.cxx | 2 -- .../GeomliteTest_SurfaceCommands.cxx | 14 -------- src/Graphic3d/Graphic3d_Aspects.hxx | 4 --- .../Graphic3d_BvhCStructureSetTrsfPers.hxx | 2 -- src/Graphic3d/Graphic3d_CStructure.cxx | 1 - src/Graphic3d/Graphic3d_CStructure.hxx | 3 -- src/Graphic3d/Graphic3d_CView.hxx | 8 ----- src/Graphic3d/Graphic3d_ClipPlane.hxx | 1 - src/Graphic3d/Graphic3d_DisplayPriority.hxx | 2 -- .../Graphic3d_GraduatedTrihedron.hxx | 1 - src/Graphic3d/Graphic3d_GraphicDriver.hxx | 3 -- src/Graphic3d/Graphic3d_Group.cxx | 11 ------ src/Graphic3d/Graphic3d_Group.hxx | 3 -- src/Graphic3d/Graphic3d_Layer.hxx | 2 -- src/Graphic3d/Graphic3d_LightSet.hxx | 1 - .../Graphic3d_MapOfAspectsToAspects.hxx | 1 - src/Graphic3d/Graphic3d_MaterialAspect.cxx | 1 - src/Graphic3d/Graphic3d_MediaTexture.hxx | 2 -- src/Graphic3d/Graphic3d_PBRMaterial.hxx | 1 - src/Graphic3d/Graphic3d_RenderingParams.hxx | 1 + .../Graphic3d_SequenceOfHClipPlane.hxx | 1 - src/Graphic3d/Graphic3d_ShaderManager.cxx | 1 + src/Graphic3d/Graphic3d_ShaderProgram.cxx | 1 + src/Graphic3d/Graphic3d_ShaderProgram.hxx | 1 - src/Graphic3d/Graphic3d_ShaderVariable.cxx | 2 -- src/Graphic3d/Graphic3d_Structure.cxx | 3 -- src/Graphic3d/Graphic3d_Structure.hxx | 3 -- src/Graphic3d/Graphic3d_StructureManager.hxx | 2 -- src/Graphic3d/Graphic3d_Texture1D.hxx | 1 - src/Graphic3d/Graphic3d_Texture1Dsegment.hxx | 2 -- src/Graphic3d/Graphic3d_Texture2Dplane.hxx | 2 -- src/Graphic3d/Graphic3d_TextureEnv.hxx | 1 - src/Graphic3d/Graphic3d_TextureParams.hxx | 1 - src/Graphic3d/Graphic3d_TextureRoot.cxx | 1 - src/Graphic3d/Graphic3d_TransformPers.hxx | 1 - src/Graphic3d/Graphic3d_TransformUtils.hxx | 1 - src/Graphic3d/Graphic3d_Vertex.hxx | 1 - src/HLRAlgo/HLRAlgo_BiPoint.hxx | 1 - src/HLRAlgo/HLRAlgo_Coincidence.hxx | 2 -- src/HLRAlgo/HLRAlgo_EdgeIterator.hxx | 4 --- src/HLRAlgo/HLRAlgo_EdgeStatus.cxx | 1 - src/HLRAlgo/HLRAlgo_EdgeStatus.hxx | 4 --- src/HLRAlgo/HLRAlgo_EdgesBlock.hxx | 1 - src/HLRAlgo/HLRAlgo_HArray1OfPHDat.hxx | 1 - src/HLRAlgo/HLRAlgo_HArray1OfPINod.hxx | 1 - src/HLRAlgo/HLRAlgo_HArray1OfPISeg.hxx | 1 - src/HLRAlgo/HLRAlgo_HArray1OfTData.hxx | 1 - src/HLRAlgo/HLRAlgo_Interference.hxx | 1 - src/HLRAlgo/HLRAlgo_Intersection.hxx | 2 -- src/HLRAlgo/HLRAlgo_PolyAlgo.hxx | 1 - src/HLRAlgo/HLRAlgo_PolyData.hxx | 3 -- src/HLRAlgo/HLRAlgo_PolyHidingData.hxx | 2 -- src/HLRAlgo/HLRAlgo_PolyInternalData.hxx | 8 +---- src/HLRAlgo/HLRAlgo_PolyInternalNode.hxx | 1 - src/HLRAlgo/HLRAlgo_PolyInternalSegment.hxx | 1 - src/HLRAlgo/HLRAlgo_PolyShellData.hxx | 1 - src/HLRAlgo/HLRAlgo_Projector.cxx | 2 -- src/HLRAlgo/HLRAlgo_Projector.hxx | 3 -- src/HLRAlgo/HLRAlgo_TriangleData.hxx | 1 - src/HLRAppli/HLRAppli_ReflectLines.cxx | 1 - src/HLRBRep/HLRBRep_Algo.hxx | 1 - src/HLRBRep/HLRBRep_AreaLimit.hxx | 1 - src/HLRBRep/HLRBRep_BCurveTool.cxx | 8 ----- src/HLRBRep/HLRBRep_BCurveTool.hxx | 2 -- src/HLRBRep/HLRBRep_BSurfaceTool.cxx | 8 ----- src/HLRBRep/HLRBRep_BiPnt2D.hxx | 3 -- src/HLRBRep/HLRBRep_BiPoint.hxx | 3 -- src/HLRBRep/HLRBRep_CInter.hxx | 4 --- src/HLRBRep/HLRBRep_CLProps.hxx | 3 -- src/HLRBRep/HLRBRep_CLPropsATool.hxx | 1 - src/HLRBRep/HLRBRep_Curve.cxx | 10 ------ src/HLRBRep/HLRBRep_Curve.hxx | 15 ++++---- src/HLRBRep/HLRBRep_CurveTool.cxx | 11 ------ src/HLRBRep/HLRBRep_CurveTool.hxx | 2 -- src/HLRBRep/HLRBRep_EdgeBuilder.hxx | 1 - src/HLRBRep/HLRBRep_EdgeData.cxx | 2 -- src/HLRBRep/HLRBRep_EdgeData.hxx | 4 --- src/HLRBRep/HLRBRep_EdgeFaceTool.cxx | 1 - src/HLRBRep/HLRBRep_EdgeFaceTool.hxx | 3 -- src/HLRBRep/HLRBRep_EdgeIList.cxx | 2 -- src/HLRBRep/HLRBRep_EdgeInterferenceTool.cxx | 3 -- src/HLRBRep/HLRBRep_EdgeInterferenceTool.hxx | 2 -- ...ctionPointOfTheIntPCurvePCurveOfCInter.hxx | 3 -- src/HLRBRep/HLRBRep_FaceData.cxx | 1 - src/HLRBRep/HLRBRep_FaceData.hxx | 3 -- src/HLRBRep/HLRBRep_FaceIterator.cxx | 2 -- src/HLRBRep/HLRBRep_FaceIterator.hxx | 1 - src/HLRBRep/HLRBRep_HLRToShape.hxx | 1 - src/HLRBRep/HLRBRep_Hider.cxx | 5 --- src/HLRBRep/HLRBRep_IntConicCurveOfCInter.hxx | 2 -- src/HLRBRep/HLRBRep_InterCSurf.hxx | 3 -- src/HLRBRep/HLRBRep_InternalAlgo.cxx | 1 - src/HLRBRep/HLRBRep_InternalAlgo.hxx | 1 - src/HLRBRep/HLRBRep_Intersector.cxx | 3 -- src/HLRBRep/HLRBRep_Intersector.hxx | 5 --- src/HLRBRep/HLRBRep_LineTool.hxx | 3 -- ...eIntersectorOfTheIntConicCurveOfCInter.hxx | 2 -- ...FOfTheLocateExtPCOfTheProjPCurOfCInter.hxx | 3 -- src/HLRBRep/HLRBRep_PolyAlgo.cxx | 5 --- src/HLRBRep/HLRBRep_PolyHLRToShape.cxx | 2 -- src/HLRBRep/HLRBRep_PolyHLRToShape.hxx | 1 - src/HLRBRep/HLRBRep_SLProps.hxx | 4 --- src/HLRBRep/HLRBRep_SLPropsATool.hxx | 2 -- src/HLRBRep/HLRBRep_ShapeToHLR.cxx | 5 --- src/HLRBRep/HLRBRep_ShapeToHLR.hxx | 1 - src/HLRBRep/HLRBRep_Surface.cxx | 11 ------ src/HLRBRep/HLRBRep_Surface.hxx | 4 --- src/HLRBRep/HLRBRep_SurfaceTool.cxx | 8 ----- .../HLRBRep_TheCSFunctionOfInterCSurf.hxx | 3 -- ...p_TheCurveLocatorOfTheProjPCurOfCInter.hxx | 2 -- ...eenPCurvesOfTheIntPCurvePCurveOfCInter.hxx | 2 -- src/HLRBRep/HLRBRep_TheExactInterCSurf.hxx | 2 -- .../HLRBRep_TheIntConicCurveOfCInter.hxx | 3 -- .../HLRBRep_TheIntPCurvePCurveOfCInter.hxx | 4 --- .../HLRBRep_TheInterferenceOfInterCSurf.hxx | 2 -- ...eIntersectorOfTheIntConicCurveOfCInter.hxx | 3 -- ...ep_TheLocateExtPCOfTheProjPCurOfCInter.hxx | 2 -- ...ePolygon2dOfTheIntPCurvePCurveOfCInter.hxx | 3 -- .../HLRBRep_ThePolygonOfInterCSurf.hxx | 2 -- .../HLRBRep_ThePolygonToolOfInterCSurf.hxx | 1 - .../HLRBRep_ThePolyhedronOfInterCSurf.hxx | 2 -- src/HLRBRep/HLRBRep_TheProjPCurOfCInter.hxx | 1 - .../HLRBRep_TheQuadCurvExactInterCSurf.hxx | 3 -- ...adCurvFuncOfTheQuadCurvExactInterCSurf.hxx | 1 - src/HLRBRep/HLRBRep_VertexList.cxx | 2 -- src/HLRTest/HLRTest.cxx | 5 --- src/HLRTest/HLRTest.hxx | 1 - src/HLRTest/HLRTest_DrawableEdgeTool.hxx | 1 - src/HLRTest/HLRTest_DrawablePolyEdgeTool.cxx | 2 -- src/HLRTest/HLRTest_DrawablePolyEdgeTool.hxx | 1 - src/HLRTopoBRep/HLRTopoBRep_DSFiller.cxx | 7 ---- src/HLRTopoBRep/HLRTopoBRep_DSFiller.hxx | 3 -- src/HLRTopoBRep/HLRTopoBRep_Data.cxx | 1 - src/HLRTopoBRep/HLRTopoBRep_Data.hxx | 2 -- src/HLRTopoBRep/HLRTopoBRep_FaceIsoLiner.cxx | 3 -- src/HLRTopoBRep/HLRTopoBRep_FaceIsoLiner.hxx | 1 - src/HLRTopoBRep/HLRTopoBRep_OutLiner.cxx | 2 -- src/HLRTopoBRep/HLRTopoBRep_VData.hxx | 1 - src/Hatch/Hatch_Hatcher.cxx | 1 - src/Hatch/Hatch_Hatcher.hxx | 3 -- src/Hatch/Hatch_Line.cxx | 1 - src/Hatch/Hatch_Line.hxx | 3 -- src/Hatch/Hatch_Parameter.hxx | 3 -- src/HatchGen/HatchGen_Domain.cxx | 1 - src/HatchGen/HatchGen_Domain.hxx | 2 -- src/HatchGen/HatchGen_IntersectionPoint.hxx | 1 - src/HatchGen/HatchGen_PointOnElement.hxx | 1 - src/HatchGen/HatchGen_PointOnHatching.cxx | 2 -- src/HatchGen/HatchGen_PointOnHatching.hxx | 2 -- .../HeaderSection_FileDescription.hxx | 1 - src/HeaderSection/HeaderSection_FileName.hxx | 1 - .../HeaderSection_FileSchema.hxx | 1 - src/HeaderSection/HeaderSection_Protocol.hxx | 2 -- src/Hermit/Hermit.cxx | 3 -- src/Hermit/Hermit.hxx | 1 - src/IFGraph/IFGraph_Compare.hxx | 1 - src/IFGraph/IFGraph_ConnectedComponants.hxx | 2 -- src/IFGraph/IFGraph_SCRoots.hxx | 2 -- src/IFGraph/IFGraph_SubPartsIterator.cxx | 1 - src/IFSelect/IFSelect.hxx | 1 - src/IFSelect/IFSelect_Act.cxx | 1 - src/IFSelect/IFSelect_Act.hxx | 3 -- src/IFSelect/IFSelect_Activator.cxx | 1 - src/IFSelect/IFSelect_Activator.hxx | 4 --- src/IFSelect/IFSelect_AppliedModifiers.hxx | 2 -- src/IFSelect/IFSelect_BasicDumper.cxx | 1 - src/IFSelect/IFSelect_BasicDumper.hxx | 1 - src/IFSelect/IFSelect_CheckCounter.cxx | 1 - src/IFSelect/IFSelect_CheckCounter.hxx | 2 -- src/IFSelect/IFSelect_ContextModif.hxx | 1 - src/IFSelect/IFSelect_ContextWrite.cxx | 1 - src/IFSelect/IFSelect_ContextWrite.hxx | 2 -- src/IFSelect/IFSelect_DispGlobal.hxx | 1 - src/IFSelect/IFSelect_DispPerCount.cxx | 1 - src/IFSelect/IFSelect_DispPerCount.hxx | 1 - src/IFSelect/IFSelect_DispPerFiles.cxx | 1 - src/IFSelect/IFSelect_DispPerFiles.hxx | 1 - src/IFSelect/IFSelect_DispPerOne.hxx | 1 - src/IFSelect/IFSelect_DispPerSignature.cxx | 1 - src/IFSelect/IFSelect_DispPerSignature.hxx | 2 -- src/IFSelect/IFSelect_Dispatch.cxx | 2 -- src/IFSelect/IFSelect_Dispatch.hxx | 1 - src/IFSelect/IFSelect_EditForm.cxx | 2 -- src/IFSelect/IFSelect_EditForm.hxx | 4 --- src/IFSelect/IFSelect_Editor.cxx | 1 - src/IFSelect/IFSelect_Editor.hxx | 2 -- src/IFSelect/IFSelect_Functions.cxx | 6 ---- src/IFSelect/IFSelect_Functions.hxx | 1 - src/IFSelect/IFSelect_GeneralModifier.hxx | 1 - src/IFSelect/IFSelect_GraphCounter.cxx | 1 - src/IFSelect/IFSelect_GraphCounter.hxx | 2 -- src/IFSelect/IFSelect_HSeqOfSelection.hxx | 1 - src/IFSelect/IFSelect_IntParam.hxx | 2 -- src/IFSelect/IFSelect_ListEditor.hxx | 2 -- src/IFSelect/IFSelect_ModelCopier.cxx | 1 - src/IFSelect/IFSelect_ModelCopier.hxx | 2 -- src/IFSelect/IFSelect_ModifReorder.hxx | 1 - src/IFSelect/IFSelect_Modifier.hxx | 1 - src/IFSelect/IFSelect_PacketList.hxx | 4 --- src/IFSelect/IFSelect_ParamEditor.hxx | 2 -- src/IFSelect/IFSelect_SelectAnyList.cxx | 1 - src/IFSelect/IFSelect_SelectAnyList.hxx | 1 - src/IFSelect/IFSelect_SelectAnyType.hxx | 1 - src/IFSelect/IFSelect_SelectCombine.hxx | 1 - src/IFSelect/IFSelect_SelectControl.hxx | 1 - src/IFSelect/IFSelect_SelectDeduct.cxx | 1 - src/IFSelect/IFSelect_SelectDeduct.hxx | 1 - src/IFSelect/IFSelect_SelectDiff.hxx | 1 - src/IFSelect/IFSelect_SelectErrorEntities.hxx | 1 - src/IFSelect/IFSelect_SelectExplore.hxx | 1 - src/IFSelect/IFSelect_SelectExtract.hxx | 1 - src/IFSelect/IFSelect_SelectFlag.hxx | 3 -- src/IFSelect/IFSelect_SelectInList.cxx | 1 - .../IFSelect_SelectIncorrectEntities.hxx | 1 - src/IFSelect/IFSelect_SelectPointed.cxx | 1 - src/IFSelect/IFSelect_SelectPointed.hxx | 2 -- src/IFSelect/IFSelect_SelectRange.cxx | 1 - src/IFSelect/IFSelect_SelectRange.hxx | 1 - src/IFSelect/IFSelect_SelectRootComps.hxx | 1 - src/IFSelect/IFSelect_SelectRoots.hxx | 1 - src/IFSelect/IFSelect_SelectSent.hxx | 1 - src/IFSelect/IFSelect_SelectShared.cxx | 1 - src/IFSelect/IFSelect_SelectSharing.cxx | 1 - src/IFSelect/IFSelect_SelectSignature.hxx | 4 --- src/IFSelect/IFSelect_SelectSignedShared.hxx | 3 -- src/IFSelect/IFSelect_SelectSignedSharing.hxx | 3 -- src/IFSelect/IFSelect_SelectSuite.cxx | 3 -- src/IFSelect/IFSelect_SelectSuite.hxx | 1 - .../IFSelect_SelectUnknownEntities.hxx | 1 - src/IFSelect/IFSelect_Selection.cxx | 2 -- src/IFSelect/IFSelect_Selection.hxx | 1 - src/IFSelect/IFSelect_SelectionIterator.hxx | 1 - src/IFSelect/IFSelect_SessionDumper.hxx | 1 - src/IFSelect/IFSelect_SessionFile.cxx | 4 --- src/IFSelect/IFSelect_SessionFile.hxx | 2 -- src/IFSelect/IFSelect_SessionPilot.cxx | 4 --- src/IFSelect/IFSelect_SessionPilot.hxx | 5 --- src/IFSelect/IFSelect_ShareOut.cxx | 4 --- src/IFSelect/IFSelect_ShareOut.hxx | 1 - src/IFSelect/IFSelect_ShareOutResult.cxx | 3 -- src/IFSelect/IFSelect_ShareOutResult.hxx | 2 -- src/IFSelect/IFSelect_SignAncestor.hxx | 2 -- src/IFSelect/IFSelect_SignCategory.hxx | 2 -- src/IFSelect/IFSelect_SignCounter.hxx | 2 -- src/IFSelect/IFSelect_SignMultiple.cxx | 1 - src/IFSelect/IFSelect_SignMultiple.hxx | 3 -- src/IFSelect/IFSelect_SignType.hxx | 3 -- src/IFSelect/IFSelect_SignValidity.hxx | 2 -- src/IFSelect/IFSelect_Signature.hxx | 3 -- src/IFSelect/IFSelect_SignatureList.hxx | 5 --- src/IFSelect/IFSelect_TransformStandard.hxx | 1 - src/IFSelect/IFSelect_Transformer.cxx | 1 - src/IFSelect/IFSelect_Transformer.hxx | 1 - src/IFSelect/IFSelect_WorkLibrary.hxx | 2 -- src/IFSelect/IFSelect_WorkSession.cxx | 17 --------- src/IFSelect/IFSelect_WorkSession.hxx | 6 ---- src/IGESAppli/IGESAppli_DrilledHole.hxx | 2 -- src/IGESAppli/IGESAppli_ElementResults.hxx | 1 - src/IGESAppli/IGESAppli_FiniteElement.cxx | 1 - src/IGESAppli/IGESAppli_FiniteElement.hxx | 1 - src/IGESAppli/IGESAppli_Flow.cxx | 2 -- src/IGESAppli/IGESAppli_Flow.hxx | 2 -- src/IGESAppli/IGESAppli_FlowLineSpec.cxx | 1 - src/IGESAppli/IGESAppli_FlowLineSpec.hxx | 1 - src/IGESAppli/IGESAppli_GeneralModule.hxx | 1 - .../IGESAppli_HArray1OfFiniteElement.hxx | 1 - src/IGESAppli/IGESAppli_HArray1OfNode.hxx | 1 - src/IGESAppli/IGESAppli_LevelFunction.hxx | 1 - .../IGESAppli_LevelToPWBLayerMap.cxx | 1 - .../IGESAppli_LevelToPWBLayerMap.hxx | 1 - src/IGESAppli/IGESAppli_LineWidening.hxx | 1 - src/IGESAppli/IGESAppli_NodalConstraint.cxx | 1 - src/IGESAppli/IGESAppli_NodalConstraint.hxx | 1 - src/IGESAppli/IGESAppli_NodalDisplAndRot.cxx | 2 -- src/IGESAppli/IGESAppli_NodalDisplAndRot.hxx | 1 - src/IGESAppli/IGESAppli_NodalResults.cxx | 1 - src/IGESAppli/IGESAppli_NodalResults.hxx | 1 - src/IGESAppli/IGESAppli_Node.cxx | 2 -- src/IGESAppli/IGESAppli_PWBArtworkStackup.cxx | 1 - src/IGESAppli/IGESAppli_PWBArtworkStackup.hxx | 1 - src/IGESAppli/IGESAppli_PWBDrilledHole.hxx | 1 - src/IGESAppli/IGESAppli_PartNumber.hxx | 1 - src/IGESAppli/IGESAppli_PinNumber.hxx | 1 - src/IGESAppli/IGESAppli_PipingFlow.cxx | 1 - src/IGESAppli/IGESAppli_PipingFlow.hxx | 2 -- src/IGESAppli/IGESAppli_Protocol.hxx | 1 - src/IGESAppli/IGESAppli_ReadWriteModule.cxx | 1 - .../IGESAppli_ReferenceDesignator.hxx | 1 - src/IGESAppli/IGESAppli_RegionRestriction.hxx | 1 - src/IGESAppli/IGESAppli_SpecificModule.hxx | 1 - src/IGESAppli/IGESAppli_ToolDrilledHole.cxx | 2 -- src/IGESAppli/IGESAppli_ToolDrilledHole.hxx | 1 - .../IGESAppli_ToolElementResults.cxx | 2 -- src/IGESAppli/IGESAppli_ToolFlow.cxx | 2 -- src/IGESAppli/IGESAppli_ToolFlow.hxx | 1 - src/IGESAppli/IGESAppli_ToolFlowLineSpec.cxx | 3 -- src/IGESAppli/IGESAppli_ToolLevelFunction.cxx | 3 -- src/IGESAppli/IGESAppli_ToolLevelFunction.hxx | 1 - .../IGESAppli_ToolLevelToPWBLayerMap.cxx | 1 - src/IGESAppli/IGESAppli_ToolLineWidening.cxx | 1 - src/IGESAppli/IGESAppli_ToolLineWidening.hxx | 1 - .../IGESAppli_ToolNodalConstraint.cxx | 1 - src/IGESAppli/IGESAppli_ToolNodalResults.cxx | 4 --- src/IGESAppli/IGESAppli_ToolNode.cxx | 1 - .../IGESAppli_ToolPWBArtworkStackup.cxx | 3 -- .../IGESAppli_ToolPWBDrilledHole.cxx | 2 -- .../IGESAppli_ToolPWBDrilledHole.hxx | 1 - src/IGESAppli/IGESAppli_ToolPartNumber.cxx | 2 -- src/IGESAppli/IGESAppli_ToolPartNumber.hxx | 1 - src/IGESAppli/IGESAppli_ToolPinNumber.cxx | 3 -- src/IGESAppli/IGESAppli_ToolPinNumber.hxx | 1 - src/IGESAppli/IGESAppli_ToolPipingFlow.hxx | 1 - .../IGESAppli_ToolReferenceDesignator.cxx | 3 -- .../IGESAppli_ToolReferenceDesignator.hxx | 1 - .../IGESAppli_ToolRegionRestriction.cxx | 2 -- .../IGESAppli_ToolRegionRestriction.hxx | 1 - src/IGESBasic/IGESBasic_AssocGroupType.hxx | 1 - src/IGESBasic/IGESBasic_ExternalRefFile.hxx | 1 - .../IGESBasic_ExternalRefFileIndex.cxx | 1 - .../IGESBasic_ExternalRefFileIndex.hxx | 1 - .../IGESBasic_ExternalRefFileName.hxx | 2 -- .../IGESBasic_ExternalRefLibName.hxx | 1 - src/IGESBasic/IGESBasic_ExternalRefName.hxx | 1 - .../IGESBasic_ExternalReferenceFile.cxx | 1 - .../IGESBasic_ExternalReferenceFile.hxx | 1 - src/IGESBasic/IGESBasic_GeneralModule.cxx | 1 - src/IGESBasic/IGESBasic_GeneralModule.hxx | 1 - src/IGESBasic/IGESBasic_Group.hxx | 2 -- src/IGESBasic/IGESBasic_GroupWithoutBackP.cxx | 1 - src/IGESBasic/IGESBasic_GroupWithoutBackP.hxx | 1 - .../IGESBasic_HArray1OfHArray1OfXY.hxx | 1 - .../IGESBasic_HArray2OfHArray1OfReal.hxx | 1 - src/IGESBasic/IGESBasic_Hierarchy.hxx | 1 - src/IGESBasic/IGESBasic_Name.hxx | 1 - src/IGESBasic/IGESBasic_OrderedGroup.cxx | 1 - src/IGESBasic/IGESBasic_OrderedGroup.hxx | 1 - .../IGESBasic_OrderedGroupWithoutBackP.cxx | 1 - .../IGESBasic_OrderedGroupWithoutBackP.hxx | 1 - src/IGESBasic/IGESBasic_Protocol.cxx | 2 -- src/IGESBasic/IGESBasic_Protocol.hxx | 1 - src/IGESBasic/IGESBasic_ReadWriteModule.cxx | 2 -- src/IGESBasic/IGESBasic_SingleParent.cxx | 1 - src/IGESBasic/IGESBasic_SingleParent.hxx | 1 - src/IGESBasic/IGESBasic_SingularSubfigure.hxx | 2 -- src/IGESBasic/IGESBasic_SpecificModule.cxx | 1 - src/IGESBasic/IGESBasic_SpecificModule.hxx | 1 - src/IGESBasic/IGESBasic_SubfigureDef.hxx | 1 - .../IGESBasic_ToolAssocGroupType.cxx | 3 -- .../IGESBasic_ToolAssocGroupType.hxx | 1 - .../IGESBasic_ToolExternalRefFile.cxx | 3 -- .../IGESBasic_ToolExternalRefFileName.cxx | 3 -- .../IGESBasic_ToolExternalRefLibName.cxx | 3 -- .../IGESBasic_ToolExternalRefName.cxx | 3 -- .../IGESBasic_ToolExternalReferenceFile.cxx | 1 - src/IGESBasic/IGESBasic_ToolGroup.hxx | 1 - .../IGESBasic_ToolGroupWithoutBackP.hxx | 1 - src/IGESBasic/IGESBasic_ToolHierarchy.cxx | 2 -- src/IGESBasic/IGESBasic_ToolHierarchy.hxx | 1 - src/IGESBasic/IGESBasic_ToolName.cxx | 3 -- src/IGESBasic/IGESBasic_ToolName.hxx | 1 - src/IGESBasic/IGESBasic_ToolOrderedGroup.hxx | 1 - ...IGESBasic_ToolOrderedGroupWithoutBackP.hxx | 1 - src/IGESBasic/IGESBasic_ToolSingleParent.hxx | 1 - .../IGESBasic_ToolSingularSubfigure.cxx | 3 -- src/V3d/V3d_View.hxx | 1 + src/gp/gp.cxx | 1 - src/gp/gp_Ax1.cxx | 2 -- src/gp/gp_Ax2.cxx | 2 -- src/gp/gp_Ax22d.cxx | 1 - src/gp/gp_Ax22d.hxx | 1 - src/gp/gp_Ax2d.cxx | 1 - src/gp/gp_Ax3.cxx | 1 - src/gp/gp_Circ.cxx | 3 -- src/gp/gp_Circ2d.cxx | 3 -- src/gp/gp_Cone.cxx | 2 -- src/gp/gp_Cylinder.cxx | 2 -- src/gp/gp_Dir.cxx | 2 -- src/gp/gp_Dir2d.cxx | 2 -- src/gp/gp_Elips.cxx | 3 -- src/gp/gp_Elips2d.cxx | 11 +++--- src/gp/gp_GTrsf2d.cxx | 3 +- src/gp/gp_GTrsf2d.hxx | 1 - src/gp/gp_Hypr.cxx | 4 --- src/gp/gp_Hypr2d.cxx | 12 +++---- src/gp/gp_Lin.cxx | 1 - src/gp/gp_Lin.hxx | 1 - src/gp/gp_Lin2d.cxx | 1 - src/gp/gp_Mat.cxx | 1 - src/gp/gp_Parab.cxx | 3 -- src/gp/gp_Parab.hxx | 1 - src/gp/gp_Parab2d.cxx | 1 - src/gp/gp_Pln.cxx | 3 -- src/gp/gp_Pln.hxx | 1 - src/gp/gp_Pnt.cxx | 1 - src/gp/gp_Pnt.hxx | 1 - src/gp/gp_Pnt2d.cxx | 1 - src/gp/gp_Pnt2d.hxx | 2 -- src/gp/gp_Sphere.cxx | 2 -- src/gp/gp_Torus.cxx | 3 -- src/gp/gp_Torus.hxx | 1 - src/gp/gp_Trsf.cxx | 2 -- src/gp/gp_Trsf.hxx | 1 - src/gp/gp_Trsf2d.cxx | 1 - src/gp/gp_Trsf2d.hxx | 1 - src/gp/gp_Vec.cxx | 4 --- src/gp/gp_Vec.hxx | 3 -- src/gp/gp_Vec2d.cxx | 3 -- src/gp/gp_Vec2d.hxx | 2 -- src/gp/gp_XY.cxx | 2 -- 613 files changed, 31 insertions(+), 1395 deletions(-) diff --git a/samples/OCCTOverview/code/Sample2D_Face.h b/samples/OCCTOverview/code/Sample2D_Face.h index 45afc3d49f..8222593f9a 100644 --- a/samples/OCCTOverview/code/Sample2D_Face.h +++ b/samples/OCCTOverview/code/Sample2D_Face.h @@ -25,6 +25,7 @@ #include #include #include +#include #include #include diff --git a/samples/OCCTOverview/code/Sample2D_Markers.h b/samples/OCCTOverview/code/Sample2D_Markers.h index f29719ddbe..f0252669f4 100644 --- a/samples/OCCTOverview/code/Sample2D_Markers.h +++ b/samples/OCCTOverview/code/Sample2D_Markers.h @@ -24,6 +24,7 @@ #include #include +#include //! AIS AIS interactive object for sample 2D marker class Sample2D_Markers : public AIS_InteractiveObject diff --git a/src/AIS/AIS_LightSource.hxx b/src/AIS/AIS_LightSource.hxx index 3816b73a4a..feb5570abe 100644 --- a/src/AIS/AIS_LightSource.hxx +++ b/src/AIS/AIS_LightSource.hxx @@ -17,6 +17,8 @@ #define _AIS_LightSource_HeaderFile #include +#include +#include #include class Select3D_SensitiveSphere; diff --git a/src/AIS/AIS_TexturedShape.hxx b/src/AIS/AIS_TexturedShape.hxx index c814e3d475..acd3650d41 100644 --- a/src/AIS/AIS_TexturedShape.hxx +++ b/src/AIS/AIS_TexturedShape.hxx @@ -18,6 +18,7 @@ #include #include +#include #include #include #include diff --git a/src/AIS/AIS_XRTrackedDevice.cxx b/src/AIS/AIS_XRTrackedDevice.cxx index e64ec1d582..9835b152d0 100644 --- a/src/AIS/AIS_XRTrackedDevice.cxx +++ b/src/AIS/AIS_XRTrackedDevice.cxx @@ -15,6 +15,7 @@ #include #include +#include #include #include #include diff --git a/src/GProp/GProp.cxx b/src/GProp/GProp.cxx index 29869b049b..ee952f12fa 100644 --- a/src/GProp/GProp.cxx +++ b/src/GProp/GProp.cxx @@ -14,11 +14,8 @@ #include -#include -#include #include #include -#include void GProp::HOperator ( diff --git a/src/GProp/GProp_CelGProps.cxx b/src/GProp/GProp_CelGProps.cxx index 6ea12e4d56..25d2e939dd 100644 --- a/src/GProp/GProp_CelGProps.cxx +++ b/src/GProp/GProp_CelGProps.cxx @@ -14,11 +14,9 @@ #include -#include #include #include #include -#include #include #include #include diff --git a/src/GProp/GProp_CelGProps.hxx b/src/GProp/GProp_CelGProps.hxx index fe4172bdd9..3b1a5f3afe 100644 --- a/src/GProp/GProp_CelGProps.hxx +++ b/src/GProp/GProp_CelGProps.hxx @@ -19,10 +19,8 @@ #include #include -#include #include -#include class gp_Circ; class gp_Pnt; class gp_Lin; diff --git a/src/GProp/GProp_GProps.cxx b/src/GProp/GProp_GProps.cxx index 9f71597b8d..27752b18fc 100644 --- a/src/GProp/GProp_GProps.cxx +++ b/src/GProp/GProp_GProps.cxx @@ -13,7 +13,6 @@ // commercial license or contractual agreement. -#include #include #include #include diff --git a/src/GProp/GProp_GProps.hxx b/src/GProp/GProp_GProps.hxx index 8071319d4c..4b2c88de51 100644 --- a/src/GProp/GProp_GProps.hxx +++ b/src/GProp/GProp_GProps.hxx @@ -19,10 +19,8 @@ #include #include -#include #include -#include #include class gp_Ax1; class GProp_PrincipalProps; diff --git a/src/GProp/GProp_PEquation.cxx b/src/GProp/GProp_PEquation.cxx index 5d042cfd88..5bc27e66a7 100644 --- a/src/GProp/GProp_PEquation.cxx +++ b/src/GProp/GProp_PEquation.cxx @@ -13,7 +13,6 @@ // commercial license or contractual agreement. -#include #include #include #include diff --git a/src/GProp/GProp_PEquation.hxx b/src/GProp/GProp_PEquation.hxx index c2570937a2..1bdf818950 100644 --- a/src/GProp/GProp_PEquation.hxx +++ b/src/GProp/GProp_PEquation.hxx @@ -19,14 +19,11 @@ #include #include -#include #include #include #include #include -#include -#include class gp_Pln; class gp_Lin; diff --git a/src/GProp/GProp_PGProps.cxx b/src/GProp/GProp_PGProps.cxx index a1d0a0f2c9..5045926e3c 100644 --- a/src/GProp/GProp_PGProps.cxx +++ b/src/GProp/GProp_PGProps.cxx @@ -13,9 +13,6 @@ // commercial license or contractual agreement. -#include -#include -#include #include #include #include diff --git a/src/GProp/GProp_PGProps.hxx b/src/GProp/GProp_PGProps.hxx index b6a794191f..bfd18aa22a 100644 --- a/src/GProp/GProp_PGProps.hxx +++ b/src/GProp/GProp_PGProps.hxx @@ -22,7 +22,6 @@ #include #include -#include #include #include #include diff --git a/src/GProp/GProp_PrincipalProps.cxx b/src/GProp/GProp_PrincipalProps.cxx index 1167d535f9..28d8f10b17 100644 --- a/src/GProp/GProp_PrincipalProps.cxx +++ b/src/GProp/GProp_PrincipalProps.cxx @@ -13,10 +13,7 @@ // commercial license or contractual agreement. -#include -#include #include -#include typedef gp_Vec Vec; typedef gp_Pnt Pnt; diff --git a/src/GProp/GProp_PrincipalProps.hxx b/src/GProp/GProp_PrincipalProps.hxx index 1eaa64cf7e..b53f6c3f2d 100644 --- a/src/GProp/GProp_PrincipalProps.hxx +++ b/src/GProp/GProp_PrincipalProps.hxx @@ -21,7 +21,6 @@ #include #include -#include #include #include #include diff --git a/src/GProp/GProp_SelGProps.cxx b/src/GProp/GProp_SelGProps.cxx index edcb3d631e..57356e2afd 100644 --- a/src/GProp/GProp_SelGProps.cxx +++ b/src/GProp/GProp_SelGProps.cxx @@ -23,7 +23,6 @@ #include #include #include -#include GProp_SelGProps::GProp_SelGProps(){} diff --git a/src/GProp/GProp_SelGProps.hxx b/src/GProp/GProp_SelGProps.hxx index 9378651cc7..0876976c47 100644 --- a/src/GProp/GProp_SelGProps.hxx +++ b/src/GProp/GProp_SelGProps.hxx @@ -19,10 +19,8 @@ #include #include -#include #include -#include class gp_Cylinder; class gp_Pnt; class gp_Cone; diff --git a/src/GProp/GProp_UndefinedAxis.hxx b/src/GProp/GProp_UndefinedAxis.hxx index 6aa342ed63..ca0f18fea4 100644 --- a/src/GProp/GProp_UndefinedAxis.hxx +++ b/src/GProp/GProp_UndefinedAxis.hxx @@ -18,7 +18,6 @@ #define _GProp_UndefinedAxis_HeaderFile #include -#include #include #include diff --git a/src/GProp/GProp_VelGProps.cxx b/src/GProp/GProp_VelGProps.cxx index 54c4019cea..efa5962096 100644 --- a/src/GProp/GProp_VelGProps.cxx +++ b/src/GProp/GProp_VelGProps.cxx @@ -13,7 +13,6 @@ // commercial license or contractual agreement. -#include #include #include #include @@ -24,7 +23,6 @@ #include #include #include -#include GProp_VelGProps::GProp_VelGProps(){} diff --git a/src/GProp/GProp_VelGProps.hxx b/src/GProp/GProp_VelGProps.hxx index 270d301adf..d5c48e4b6b 100644 --- a/src/GProp/GProp_VelGProps.hxx +++ b/src/GProp/GProp_VelGProps.hxx @@ -19,10 +19,8 @@ #include #include -#include #include -#include class gp_Cylinder; class gp_Pnt; class gp_Cone; diff --git a/src/GeomConvert/GeomConvert.cxx b/src/GeomConvert/GeomConvert.cxx index c288f02b47..b607fd0b5d 100644 --- a/src/GeomConvert/GeomConvert.cxx +++ b/src/GeomConvert/GeomConvert.cxx @@ -14,7 +14,6 @@ #include -#include #include #include #include @@ -24,7 +23,6 @@ #include #include #include -#include #include #include #include @@ -34,7 +32,6 @@ #include #include #include -#include #include #include #include @@ -44,7 +41,6 @@ #include #include #include -#include #include #include #include diff --git a/src/GeomConvert/GeomConvert_1.cxx b/src/GeomConvert/GeomConvert_1.cxx index b901da74df..c3a6b3a85b 100644 --- a/src/GeomConvert/GeomConvert_1.cxx +++ b/src/GeomConvert/GeomConvert_1.cxx @@ -14,7 +14,6 @@ #include -#include #include #include #include @@ -22,7 +21,6 @@ #include #include #include -#include #include #include #include @@ -41,22 +39,18 @@ #include #include #include -#include #include #include #include #include #include #include -#include #include #include #include #include #include #include -#include -#include typedef Geom_Surface Surface; typedef Geom_BSplineSurface BSplineSurface; diff --git a/src/GeomConvert/GeomConvert_ApproxCurve.cxx b/src/GeomConvert/GeomConvert_ApproxCurve.cxx index 4bdc187ddc..3c4da08d27 100644 --- a/src/GeomConvert/GeomConvert_ApproxCurve.cxx +++ b/src/GeomConvert/GeomConvert_ApproxCurve.cxx @@ -25,8 +25,6 @@ #include #include #include -#include -#include #include #include diff --git a/src/GeomConvert/GeomConvert_ApproxSurface.cxx b/src/GeomConvert/GeomConvert_ApproxSurface.cxx index bcff1d586a..545c7dd1e3 100644 --- a/src/GeomConvert/GeomConvert_ApproxSurface.cxx +++ b/src/GeomConvert/GeomConvert_ApproxSurface.cxx @@ -21,7 +21,6 @@ #include #include #include -#include #include #include #include diff --git a/src/GeomConvert/GeomConvert_BSplineCurveKnotSplitting.cxx b/src/GeomConvert/GeomConvert_BSplineCurveKnotSplitting.cxx index 8b77635fd9..6b4082b422 100644 --- a/src/GeomConvert/GeomConvert_BSplineCurveKnotSplitting.cxx +++ b/src/GeomConvert/GeomConvert_BSplineCurveKnotSplitting.cxx @@ -18,7 +18,6 @@ #include #include #include -#include #include typedef TColStd_Array1OfInteger Array1OfInteger; diff --git a/src/GeomConvert/GeomConvert_BSplineCurveToBezierCurve.cxx b/src/GeomConvert/GeomConvert_BSplineCurveToBezierCurve.cxx index 0d13164875..93b1c1b492 100644 --- a/src/GeomConvert/GeomConvert_BSplineCurveToBezierCurve.cxx +++ b/src/GeomConvert/GeomConvert_BSplineCurveToBezierCurve.cxx @@ -18,7 +18,6 @@ #include #include #include -#include #include #include #include diff --git a/src/GeomConvert/GeomConvert_BSplineCurveToBezierCurve.hxx b/src/GeomConvert/GeomConvert_BSplineCurveToBezierCurve.hxx index f29a7f14cb..e037dba828 100644 --- a/src/GeomConvert/GeomConvert_BSplineCurveToBezierCurve.hxx +++ b/src/GeomConvert/GeomConvert_BSplineCurveToBezierCurve.hxx @@ -21,7 +21,6 @@ #include #include -#include #include #include #include diff --git a/src/GeomConvert/GeomConvert_BSplineSurfaceKnotSplitting.cxx b/src/GeomConvert/GeomConvert_BSplineSurfaceKnotSplitting.cxx index b5118b4437..49852e2144 100644 --- a/src/GeomConvert/GeomConvert_BSplineSurfaceKnotSplitting.cxx +++ b/src/GeomConvert/GeomConvert_BSplineSurfaceKnotSplitting.cxx @@ -18,7 +18,6 @@ #include #include #include -#include #include typedef TColStd_Array1OfInteger Array1OfInteger; diff --git a/src/GeomConvert/GeomConvert_BSplineSurfaceToBezierSurface.cxx b/src/GeomConvert/GeomConvert_BSplineSurfaceToBezierSurface.cxx index 56c6b52537..917cdb35b5 100644 --- a/src/GeomConvert/GeomConvert_BSplineSurfaceToBezierSurface.cxx +++ b/src/GeomConvert/GeomConvert_BSplineSurfaceToBezierSurface.cxx @@ -18,7 +18,6 @@ #include #include #include -#include #include #include #include diff --git a/src/GeomConvert/GeomConvert_BSplineSurfaceToBezierSurface.hxx b/src/GeomConvert/GeomConvert_BSplineSurfaceToBezierSurface.hxx index f27d73f4ff..ceb5014aa4 100644 --- a/src/GeomConvert/GeomConvert_BSplineSurfaceToBezierSurface.hxx +++ b/src/GeomConvert/GeomConvert_BSplineSurfaceToBezierSurface.hxx @@ -21,7 +21,6 @@ #include #include -#include #include #include #include diff --git a/src/GeomConvert/GeomConvert_CompBezierSurfacesToBSplineSurface.cxx b/src/GeomConvert/GeomConvert_CompBezierSurfacesToBSplineSurface.cxx index 8fb8a84614..532c9ed409 100644 --- a/src/GeomConvert/GeomConvert_CompBezierSurfacesToBSplineSurface.cxx +++ b/src/GeomConvert/GeomConvert_CompBezierSurfacesToBSplineSurface.cxx @@ -24,7 +24,6 @@ #include #include #include -#include #include #include #include diff --git a/src/GeomConvert/GeomConvert_CompBezierSurfacesToBSplineSurface.hxx b/src/GeomConvert/GeomConvert_CompBezierSurfacesToBSplineSurface.hxx index 431f58af36..95af63b920 100644 --- a/src/GeomConvert/GeomConvert_CompBezierSurfacesToBSplineSurface.hxx +++ b/src/GeomConvert/GeomConvert_CompBezierSurfacesToBSplineSurface.hxx @@ -25,9 +25,7 @@ #include #include #include -#include #include -#include #include #include diff --git a/src/GeomConvert/GeomConvert_CompCurveToBSplineCurve.hxx b/src/GeomConvert/GeomConvert_CompCurveToBSplineCurve.hxx index fa3d6fdef1..6e93517899 100644 --- a/src/GeomConvert/GeomConvert_CompCurveToBSplineCurve.hxx +++ b/src/GeomConvert/GeomConvert_CompCurveToBSplineCurve.hxx @@ -21,9 +21,7 @@ #include #include -#include #include -#include #include class Geom_BSplineCurve; class Geom_BoundedCurve; diff --git a/src/GeomConvert/GeomConvert_Units.cxx b/src/GeomConvert/GeomConvert_Units.cxx index a36ddcbb3f..e908cd31d5 100644 --- a/src/GeomConvert/GeomConvert_Units.cxx +++ b/src/GeomConvert/GeomConvert_Units.cxx @@ -12,8 +12,6 @@ // commercial license or contractual agreement. #include -#include -#include #include #include #include diff --git a/src/GeomConvert/GeomConvert_Units.hxx b/src/GeomConvert/GeomConvert_Units.hxx index 49e72967e4..36241fe843 100644 --- a/src/GeomConvert/GeomConvert_Units.hxx +++ b/src/GeomConvert/GeomConvert_Units.hxx @@ -14,7 +14,6 @@ #ifndef _GeomConvert_Units_HeaderFile #define _GeomConvert_Units_HeaderFile -#include #include class Geom2d_Curve; class Geom_Surface; diff --git a/src/GeomEvaluator/GeomEvaluator_OffsetCurve.hxx b/src/GeomEvaluator/GeomEvaluator_OffsetCurve.hxx index c16b1d34d5..f66cdf69c7 100644 --- a/src/GeomEvaluator/GeomEvaluator_OffsetCurve.hxx +++ b/src/GeomEvaluator/GeomEvaluator_OffsetCurve.hxx @@ -15,7 +15,6 @@ #ifndef _GeomEvaluator_OffsetCurve_HeaderFile #define _GeomEvaluator_OffsetCurve_HeaderFile -#include #include #include #include diff --git a/src/GeomFill/GeomFill.cxx b/src/GeomFill/GeomFill.cxx index cd0f04fa9f..a972879a86 100644 --- a/src/GeomFill/GeomFill.cxx +++ b/src/GeomFill/GeomFill.cxx @@ -16,7 +16,6 @@ #include -#include #include #include #include diff --git a/src/GeomFill/GeomFill_AppSurf.hxx b/src/GeomFill/GeomFill_AppSurf.hxx index 3344ce73d6..183426bc7b 100644 --- a/src/GeomFill/GeomFill_AppSurf.hxx +++ b/src/GeomFill/GeomFill_AppSurf.hxx @@ -21,9 +21,7 @@ #include #include -#include #include -#include #include #include #include diff --git a/src/GeomFill/GeomFill_AppSweep.hxx b/src/GeomFill/GeomFill_AppSweep.hxx index fe13656b9b..c9fa39e7ac 100644 --- a/src/GeomFill/GeomFill_AppSweep.hxx +++ b/src/GeomFill/GeomFill_AppSweep.hxx @@ -21,9 +21,7 @@ #include #include -#include #include -#include #include #include #include diff --git a/src/GeomFill/GeomFill_BoundWithSurf.hxx b/src/GeomFill/GeomFill_BoundWithSurf.hxx index cfe9112757..3ecbdef8ea 100644 --- a/src/GeomFill/GeomFill_BoundWithSurf.hxx +++ b/src/GeomFill/GeomFill_BoundWithSurf.hxx @@ -18,12 +18,10 @@ #define _GeomFill_BoundWithSurf_HeaderFile #include -#include #include #include #include -#include class Law_Function; class gp_Pnt; class gp_Vec; diff --git a/src/GeomFill/GeomFill_Boundary.hxx b/src/GeomFill/GeomFill_Boundary.hxx index ab10eb9e37..7318907beb 100644 --- a/src/GeomFill/GeomFill_Boundary.hxx +++ b/src/GeomFill/GeomFill_Boundary.hxx @@ -22,7 +22,6 @@ #include #include -#include class gp_Pnt; class gp_Vec; diff --git a/src/GeomFill/GeomFill_CircularBlendFunc.cxx b/src/GeomFill/GeomFill_CircularBlendFunc.cxx index 670a90776a..9bc250383b 100644 --- a/src/GeomFill/GeomFill_CircularBlendFunc.cxx +++ b/src/GeomFill/GeomFill_CircularBlendFunc.cxx @@ -21,7 +21,6 @@ #include #include #include -#include #include #include #include diff --git a/src/GeomFill/GeomFill_CircularBlendFunc.hxx b/src/GeomFill/GeomFill_CircularBlendFunc.hxx index 52dde69ccc..015d3edbeb 100644 --- a/src/GeomFill/GeomFill_CircularBlendFunc.hxx +++ b/src/GeomFill/GeomFill_CircularBlendFunc.hxx @@ -21,10 +21,8 @@ #include #include -#include #include #include -#include #include #include #include diff --git a/src/GeomFill/GeomFill_ConstantBiNormal.cxx b/src/GeomFill/GeomFill_ConstantBiNormal.cxx index f7c73f2c5e..3a1f076c05 100644 --- a/src/GeomFill/GeomFill_ConstantBiNormal.cxx +++ b/src/GeomFill/GeomFill_ConstantBiNormal.cxx @@ -24,8 +24,6 @@ #include #include #include -#include -#include #include IMPLEMENT_STANDARD_RTTIEXT(GeomFill_ConstantBiNormal,GeomFill_TrihedronLaw) diff --git a/src/GeomFill/GeomFill_ConstantBiNormal.hxx b/src/GeomFill/GeomFill_ConstantBiNormal.hxx index 79a77d2ba7..708f896b39 100644 --- a/src/GeomFill/GeomFill_ConstantBiNormal.hxx +++ b/src/GeomFill/GeomFill_ConstantBiNormal.hxx @@ -22,8 +22,6 @@ #include #include -#include -#include #include #include #include diff --git a/src/GeomFill/GeomFill_ConstrainedFilling.cxx b/src/GeomFill/GeomFill_ConstrainedFilling.cxx index d3335f3f4c..d48c72cf7a 100644 --- a/src/GeomFill/GeomFill_ConstrainedFilling.cxx +++ b/src/GeomFill/GeomFill_ConstrainedFilling.cxx @@ -19,19 +19,16 @@ #include #include #include -#include #include #include #include #include -#include #include #include #include #include #include #include -#include #include #include #include diff --git a/src/GeomFill/GeomFill_ConstrainedFilling.hxx b/src/GeomFill/GeomFill_ConstrainedFilling.hxx index dede9948eb..1f5305c804 100644 --- a/src/GeomFill/GeomFill_ConstrainedFilling.hxx +++ b/src/GeomFill/GeomFill_ConstrainedFilling.hxx @@ -22,10 +22,8 @@ #include #include -#include #include #include -#include #include #include #include diff --git a/src/GeomFill/GeomFill_Coons.hxx b/src/GeomFill/GeomFill_Coons.hxx index 46d7dc2fa0..86b678203d 100644 --- a/src/GeomFill/GeomFill_Coons.hxx +++ b/src/GeomFill/GeomFill_Coons.hxx @@ -19,7 +19,6 @@ #include #include -#include #include #include diff --git a/src/GeomFill/GeomFill_CoonsAlgPatch.cxx b/src/GeomFill/GeomFill_CoonsAlgPatch.cxx index 6cfef9e598..da2ba69d55 100644 --- a/src/GeomFill/GeomFill_CoonsAlgPatch.cxx +++ b/src/GeomFill/GeomFill_CoonsAlgPatch.cxx @@ -20,7 +20,6 @@ #include #include #include -#include #include #include diff --git a/src/GeomFill/GeomFill_CoonsAlgPatch.hxx b/src/GeomFill/GeomFill_CoonsAlgPatch.hxx index 304571416d..1c92edb05e 100644 --- a/src/GeomFill/GeomFill_CoonsAlgPatch.hxx +++ b/src/GeomFill/GeomFill_CoonsAlgPatch.hxx @@ -22,7 +22,6 @@ #include #include -#include #include class GeomFill_Boundary; class Law_Function; diff --git a/src/GeomFill/GeomFill_CorrectedFrenet.cxx b/src/GeomFill/GeomFill_CorrectedFrenet.cxx index a16f352aec..609d0bb8e2 100644 --- a/src/GeomFill/GeomFill_CorrectedFrenet.cxx +++ b/src/GeomFill/GeomFill_CorrectedFrenet.cxx @@ -27,7 +27,6 @@ #include #include #include -#include #include #include #include @@ -37,8 +36,6 @@ #include #include #include -#include -#include #include #include #include diff --git a/src/GeomFill/GeomFill_CorrectedFrenet.hxx b/src/GeomFill/GeomFill_CorrectedFrenet.hxx index 4e51bea896..dc7a19a051 100644 --- a/src/GeomFill/GeomFill_CorrectedFrenet.hxx +++ b/src/GeomFill/GeomFill_CorrectedFrenet.hxx @@ -18,10 +18,7 @@ #define _GeomFill_CorrectedFrenet_HeaderFile #include -#include -#include -#include #include #include #include diff --git a/src/GeomFill/GeomFill_CurveAndTrihedron.cxx b/src/GeomFill/GeomFill_CurveAndTrihedron.cxx index dfee3a53b2..6519752729 100644 --- a/src/GeomFill/GeomFill_CurveAndTrihedron.cxx +++ b/src/GeomFill/GeomFill_CurveAndTrihedron.cxx @@ -25,7 +25,6 @@ #include #include #include -#include #include #include diff --git a/src/GeomFill/GeomFill_CurveAndTrihedron.hxx b/src/GeomFill/GeomFill_CurveAndTrihedron.hxx index c2d4a74aea..d7b9890f2c 100644 --- a/src/GeomFill/GeomFill_CurveAndTrihedron.hxx +++ b/src/GeomFill/GeomFill_CurveAndTrihedron.hxx @@ -18,11 +18,7 @@ #define _GeomFill_CurveAndTrihedron_HeaderFile #include -#include -#include -#include -#include #include #include #include diff --git a/src/GeomFill/GeomFill_Darboux.cxx b/src/GeomFill/GeomFill_Darboux.cxx index f9d862741f..7310d3d50a 100644 --- a/src/GeomFill/GeomFill_Darboux.cxx +++ b/src/GeomFill/GeomFill_Darboux.cxx @@ -16,7 +16,6 @@ #include -#include #include #include #include @@ -27,8 +26,6 @@ #include #include #include -#include -#include #include #include diff --git a/src/GeomFill/GeomFill_Darboux.hxx b/src/GeomFill/GeomFill_Darboux.hxx index dc02c8e676..3740ee7120 100644 --- a/src/GeomFill/GeomFill_Darboux.hxx +++ b/src/GeomFill/GeomFill_Darboux.hxx @@ -18,10 +18,8 @@ #define _GeomFill_Darboux_HeaderFile #include -#include #include -#include #include #include #include diff --git a/src/GeomFill/GeomFill_DegeneratedBound.hxx b/src/GeomFill/GeomFill_DegeneratedBound.hxx index 4df63c8caa..1266bc6da5 100644 --- a/src/GeomFill/GeomFill_DegeneratedBound.hxx +++ b/src/GeomFill/GeomFill_DegeneratedBound.hxx @@ -18,12 +18,10 @@ #define _GeomFill_DegeneratedBound_HeaderFile #include -#include #include #include #include -#include class gp_Vec; diff --git a/src/GeomFill/GeomFill_DiscreteTrihedron.cxx b/src/GeomFill/GeomFill_DiscreteTrihedron.cxx index 129aa83e0b..9738fec8ee 100755 --- a/src/GeomFill/GeomFill_DiscreteTrihedron.cxx +++ b/src/GeomFill/GeomFill_DiscreteTrihedron.cxx @@ -22,7 +22,6 @@ #include #include #include -#include #include #include #include diff --git a/src/GeomFill/GeomFill_DiscreteTrihedron.hxx b/src/GeomFill/GeomFill_DiscreteTrihedron.hxx index 54c4785687..813d2ad025 100644 --- a/src/GeomFill/GeomFill_DiscreteTrihedron.hxx +++ b/src/GeomFill/GeomFill_DiscreteTrihedron.hxx @@ -17,12 +17,9 @@ #define _GeomFill_DiscreteTrihedron_HeaderFile #include -#include -#include #include #include -#include #include #include #include diff --git a/src/GeomFill/GeomFill_DraftTrihedron.cxx b/src/GeomFill/GeomFill_DraftTrihedron.cxx index d260c364ce..f15c9d59b8 100644 --- a/src/GeomFill/GeomFill_DraftTrihedron.cxx +++ b/src/GeomFill/GeomFill_DraftTrihedron.cxx @@ -21,7 +21,6 @@ #include #include #include -#include #include #include diff --git a/src/GeomFill/GeomFill_DraftTrihedron.hxx b/src/GeomFill/GeomFill_DraftTrihedron.hxx index 972064131b..1e51da1002 100644 --- a/src/GeomFill/GeomFill_DraftTrihedron.hxx +++ b/src/GeomFill/GeomFill_DraftTrihedron.hxx @@ -18,12 +18,9 @@ #define _GeomFill_DraftTrihedron_HeaderFile #include -#include -#include #include #include -#include #include #include #include diff --git a/src/GeomFill/GeomFill_EvolvedSection.cxx b/src/GeomFill/GeomFill_EvolvedSection.cxx index d2056596eb..d9570def03 100644 --- a/src/GeomFill/GeomFill_EvolvedSection.cxx +++ b/src/GeomFill/GeomFill_EvolvedSection.cxx @@ -15,22 +15,17 @@ // commercial license or contractual agreement. -#include #include -#include #include #include #include -#include #include #include #include #include #include #include -#include #include -#include #include #include diff --git a/src/GeomFill/GeomFill_EvolvedSection.hxx b/src/GeomFill/GeomFill_EvolvedSection.hxx index b8451d2819..71e48bac87 100644 --- a/src/GeomFill/GeomFill_EvolvedSection.hxx +++ b/src/GeomFill/GeomFill_EvolvedSection.hxx @@ -20,9 +20,7 @@ #include #include -#include #include -#include #include #include #include diff --git a/src/GeomFill/GeomFill_Filling.cxx b/src/GeomFill/GeomFill_Filling.cxx index 3cc847a62e..1541344431 100644 --- a/src/GeomFill/GeomFill_Filling.cxx +++ b/src/GeomFill/GeomFill_Filling.cxx @@ -17,7 +17,6 @@ #include #include -#include //======================================================================= //function : GeomFill_Filling diff --git a/src/GeomFill/GeomFill_Fixed.cxx b/src/GeomFill/GeomFill_Fixed.cxx index 25ee897f60..7fd725e072 100644 --- a/src/GeomFill/GeomFill_Fixed.cxx +++ b/src/GeomFill/GeomFill_Fixed.cxx @@ -20,7 +20,6 @@ #include #include #include -#include #include IMPLEMENT_STANDARD_RTTIEXT(GeomFill_Fixed,GeomFill_TrihedronLaw) diff --git a/src/GeomFill/GeomFill_Fixed.hxx b/src/GeomFill/GeomFill_Fixed.hxx index d69972269d..e116822da8 100644 --- a/src/GeomFill/GeomFill_Fixed.hxx +++ b/src/GeomFill/GeomFill_Fixed.hxx @@ -18,11 +18,8 @@ #define _GeomFill_Fixed_HeaderFile #include -#include -#include #include -#include #include #include #include diff --git a/src/GeomFill/GeomFill_Frenet.cxx b/src/GeomFill/GeomFill_Frenet.cxx index 7f7af57828..ff4f83319b 100644 --- a/src/GeomFill/GeomFill_Frenet.cxx +++ b/src/GeomFill/GeomFill_Frenet.cxx @@ -25,7 +25,6 @@ #include #include #include -#include #include #include #include diff --git a/src/GeomFill/GeomFill_Frenet.hxx b/src/GeomFill/GeomFill_Frenet.hxx index b87b8ed937..ff090618d7 100644 --- a/src/GeomFill/GeomFill_Frenet.hxx +++ b/src/GeomFill/GeomFill_Frenet.hxx @@ -18,11 +18,8 @@ #define _GeomFill_Frenet_HeaderFile #include -#include -#include #include -#include #include #include #include diff --git a/src/GeomFill/GeomFill_FunctionDraft.cxx b/src/GeomFill/GeomFill_FunctionDraft.cxx index 49aa485ee8..90983835c1 100644 --- a/src/GeomFill/GeomFill_FunctionDraft.cxx +++ b/src/GeomFill/GeomFill_FunctionDraft.cxx @@ -15,8 +15,6 @@ // commercial license or contractual agreement. -#include -#include #include #include #include diff --git a/src/GeomFill/GeomFill_FunctionGuide.cxx b/src/GeomFill/GeomFill_FunctionGuide.cxx index 517cb6728e..8097e8225a 100644 --- a/src/GeomFill/GeomFill_FunctionGuide.cxx +++ b/src/GeomFill/GeomFill_FunctionGuide.cxx @@ -16,15 +16,12 @@ #include -#include #include #include -#include #include #include #include #include -#include #include #include #include @@ -34,9 +31,6 @@ #include #include #include -#include -#include -#include //#include //============================================== diff --git a/src/GeomFill/GeomFill_FunctionGuide.hxx b/src/GeomFill/GeomFill_FunctionGuide.hxx index 16cb4a8e3b..e31812c1ec 100644 --- a/src/GeomFill/GeomFill_FunctionGuide.hxx +++ b/src/GeomFill/GeomFill_FunctionGuide.hxx @@ -23,7 +23,6 @@ #include #include -#include #include #include #include diff --git a/src/GeomFill/GeomFill_Generator.cxx b/src/GeomFill/GeomFill_Generator.cxx index bf8d1ad096..57ab6e06f5 100644 --- a/src/GeomFill/GeomFill_Generator.cxx +++ b/src/GeomFill/GeomFill_Generator.cxx @@ -19,8 +19,6 @@ #include #include #include -#include -#include #include #include #include diff --git a/src/GeomFill/GeomFill_Generator.hxx b/src/GeomFill/GeomFill_Generator.hxx index 19fd5d1e0f..a02c5eaaac 100644 --- a/src/GeomFill/GeomFill_Generator.hxx +++ b/src/GeomFill/GeomFill_Generator.hxx @@ -22,7 +22,6 @@ #include #include -#include class Geom_Surface; diff --git a/src/GeomFill/GeomFill_GuideTrihedronAC.cxx b/src/GeomFill/GeomFill_GuideTrihedronAC.cxx index f5c4cd054d..2a519c1ba0 100644 --- a/src/GeomFill/GeomFill_GuideTrihedronAC.cxx +++ b/src/GeomFill/GeomFill_GuideTrihedronAC.cxx @@ -17,18 +17,14 @@ #include #include -#include #include #include #include #include #include -#include #include #include #include -#include -#include #include #include diff --git a/src/GeomFill/GeomFill_GuideTrihedronAC.hxx b/src/GeomFill/GeomFill_GuideTrihedronAC.hxx index be3e8957c4..993229397d 100644 --- a/src/GeomFill/GeomFill_GuideTrihedronAC.hxx +++ b/src/GeomFill/GeomFill_GuideTrihedronAC.hxx @@ -20,9 +20,7 @@ #include #include -#include #include -#include #include #include #include diff --git a/src/GeomFill/GeomFill_GuideTrihedronPlan.cxx b/src/GeomFill/GeomFill_GuideTrihedronPlan.cxx index ed8458a869..963054a935 100644 --- a/src/GeomFill/GeomFill_GuideTrihedronPlan.cxx +++ b/src/GeomFill/GeomFill_GuideTrihedronPlan.cxx @@ -19,7 +19,6 @@ #include #include #include -#include #include #include #include @@ -33,8 +32,6 @@ #include #include #include -#include -#include #include IMPLEMENT_STANDARD_RTTIEXT(GeomFill_GuideTrihedronPlan,GeomFill_TrihedronWithGuide) diff --git a/src/GeomFill/GeomFill_GuideTrihedronPlan.hxx b/src/GeomFill/GeomFill_GuideTrihedronPlan.hxx index 6a72aad644..edb2d58862 100644 --- a/src/GeomFill/GeomFill_GuideTrihedronPlan.hxx +++ b/src/GeomFill/GeomFill_GuideTrihedronPlan.hxx @@ -18,14 +18,11 @@ #define _GeomFill_GuideTrihedronPlan_HeaderFile #include -#include #include #include #include -#include #include -#include #include #include #include diff --git a/src/GeomFill/GeomFill_HArray1OfLocationLaw.hxx b/src/GeomFill/GeomFill_HArray1OfLocationLaw.hxx index 10fc933b98..62c61e8041 100644 --- a/src/GeomFill/GeomFill_HArray1OfLocationLaw.hxx +++ b/src/GeomFill/GeomFill_HArray1OfLocationLaw.hxx @@ -17,7 +17,6 @@ #ifndef GeomFill_HArray1OfLocationLaw_HeaderFile #define GeomFill_HArray1OfLocationLaw_HeaderFile -#include #include #include diff --git a/src/GeomFill/GeomFill_HArray1OfSectionLaw.hxx b/src/GeomFill/GeomFill_HArray1OfSectionLaw.hxx index c3b91ecab9..6b93a74f4c 100644 --- a/src/GeomFill/GeomFill_HArray1OfSectionLaw.hxx +++ b/src/GeomFill/GeomFill_HArray1OfSectionLaw.hxx @@ -17,7 +17,6 @@ #ifndef GeomFill_HArray1OfSectionLaw_HeaderFile #define GeomFill_HArray1OfSectionLaw_HeaderFile -#include #include #include diff --git a/src/GeomFill/GeomFill_LocFunction.hxx b/src/GeomFill/GeomFill_LocFunction.hxx index 1c39b55487..b6431082de 100644 --- a/src/GeomFill/GeomFill_LocFunction.hxx +++ b/src/GeomFill/GeomFill_LocFunction.hxx @@ -23,8 +23,6 @@ #include #include -#include -#include #include class GeomFill_LocationLaw; diff --git a/src/GeomFill/GeomFill_LocationDraft.cxx b/src/GeomFill/GeomFill_LocationDraft.cxx index 93fb2d8f93..da90acc850 100644 --- a/src/GeomFill/GeomFill_LocationDraft.cxx +++ b/src/GeomFill/GeomFill_LocationDraft.cxx @@ -19,9 +19,7 @@ #include #include #include -#include #include -#include #include #include #include @@ -40,7 +38,6 @@ #include #include #include -#include #include IMPLEMENT_STANDARD_RTTIEXT(GeomFill_LocationDraft,GeomFill_LocationLaw) diff --git a/src/GeomFill/GeomFill_LocationGuide.cxx b/src/GeomFill/GeomFill_LocationGuide.cxx index 23d29741b8..ea04ee4ccb 100644 --- a/src/GeomFill/GeomFill_LocationGuide.cxx +++ b/src/GeomFill/GeomFill_LocationGuide.cxx @@ -17,21 +17,16 @@ #include #include -#include #include #include #include #include #include -#include #include #include -#include -#include #include #include #include -#include #include #include #include @@ -39,7 +34,6 @@ #include #include #include -#include #include #include #include @@ -54,7 +48,6 @@ #include #include #include -#include #include #include #include diff --git a/src/GeomFill/GeomFill_LocationGuide.hxx b/src/GeomFill/GeomFill_LocationGuide.hxx index ea2c23c210..06dceceb2b 100644 --- a/src/GeomFill/GeomFill_LocationGuide.hxx +++ b/src/GeomFill/GeomFill_LocationGuide.hxx @@ -18,15 +18,12 @@ #define _GeomFill_LocationGuide_HeaderFile #include -#include #include #include -#include #include #include #include -#include #include #include #include diff --git a/src/GeomFill/GeomFill_LocationLaw.cxx b/src/GeomFill/GeomFill_LocationLaw.cxx index 137d056cf1..c69e8a5329 100644 --- a/src/GeomFill/GeomFill_LocationLaw.cxx +++ b/src/GeomFill/GeomFill_LocationLaw.cxx @@ -21,7 +21,6 @@ #include #include #include -#include #include IMPLEMENT_STANDARD_RTTIEXT(GeomFill_LocationLaw,Standard_Transient) diff --git a/src/GeomFill/GeomFill_NSections.cxx b/src/GeomFill/GeomFill_NSections.cxx index 14e4dc66d0..9fd91d3fca 100644 --- a/src/GeomFill/GeomFill_NSections.cxx +++ b/src/GeomFill/GeomFill_NSections.cxx @@ -22,10 +22,7 @@ #include -#include -#include #include -#include #include #include #include @@ -42,9 +39,7 @@ #include #include #include -#include #include -#include #include #include diff --git a/src/GeomFill/GeomFill_NSections.hxx b/src/GeomFill/GeomFill_NSections.hxx index 72fd35130f..b5dc687b48 100644 --- a/src/GeomFill/GeomFill_NSections.hxx +++ b/src/GeomFill/GeomFill_NSections.hxx @@ -18,14 +18,12 @@ #define _GeomFill_NSections_HeaderFile #include -#include #include #include #include #include #include -#include #include #include #include diff --git a/src/GeomFill/GeomFill_Pipe.cxx b/src/GeomFill/GeomFill_Pipe.cxx index bd7c1e16b9..af4aa4e1d3 100644 --- a/src/GeomFill/GeomFill_Pipe.cxx +++ b/src/GeomFill/GeomFill_Pipe.cxx @@ -28,24 +28,15 @@ #include #include #include -#include #include -#include #include #include -#include #include #include #include -#include #include -#include #include -#include #include -#include -#include -#include #include #include #include @@ -61,7 +52,6 @@ #include #include #include -#include #include #include #include diff --git a/src/GeomFill/GeomFill_PlanFunc.hxx b/src/GeomFill/GeomFill_PlanFunc.hxx index 34aca13cb0..2e5e382a10 100644 --- a/src/GeomFill/GeomFill_PlanFunc.hxx +++ b/src/GeomFill/GeomFill_PlanFunc.hxx @@ -24,8 +24,6 @@ #include #include #include -#include -#include class gp_Vec; diff --git a/src/GeomFill/GeomFill_PolynomialConvertor.cxx b/src/GeomFill/GeomFill_PolynomialConvertor.cxx index f66ec7c009..8bbb524127 100644 --- a/src/GeomFill/GeomFill_PolynomialConvertor.cxx +++ b/src/GeomFill/GeomFill_PolynomialConvertor.cxx @@ -22,7 +22,6 @@ #include #include #include -#include #include #include #include diff --git a/src/GeomFill/GeomFill_PolynomialConvertor.hxx b/src/GeomFill/GeomFill_PolynomialConvertor.hxx index 20995e413e..107c538184 100644 --- a/src/GeomFill/GeomFill_PolynomialConvertor.hxx +++ b/src/GeomFill/GeomFill_PolynomialConvertor.hxx @@ -19,12 +19,8 @@ #include #include -#include -#include -#include #include -#include #include #include class gp_Pnt; diff --git a/src/GeomFill/GeomFill_Profiler.cxx b/src/GeomFill/GeomFill_Profiler.cxx index 40a973bb30..8a9c143b6a 100644 --- a/src/GeomFill/GeomFill_Profiler.cxx +++ b/src/GeomFill/GeomFill_Profiler.cxx @@ -16,7 +16,6 @@ #include -#include #include #include #include diff --git a/src/GeomFill/GeomFill_Profiler.hxx b/src/GeomFill/GeomFill_Profiler.hxx index 4739858774..3f04302e7f 100644 --- a/src/GeomFill/GeomFill_Profiler.hxx +++ b/src/GeomFill/GeomFill_Profiler.hxx @@ -22,8 +22,6 @@ #include #include -#include -#include #include #include #include diff --git a/src/GeomFill/GeomFill_QuasiAngularConvertor.cxx b/src/GeomFill/GeomFill_QuasiAngularConvertor.cxx index ad72be825b..555cdcb971 100644 --- a/src/GeomFill/GeomFill_QuasiAngularConvertor.cxx +++ b/src/GeomFill/GeomFill_QuasiAngularConvertor.cxx @@ -17,15 +17,12 @@ #include #include -#include #include #include #include #include #include #include -#include -#include #include #define NullAngle 1.e-6 diff --git a/src/GeomFill/GeomFill_QuasiAngularConvertor.hxx b/src/GeomFill/GeomFill_QuasiAngularConvertor.hxx index e185e17fcb..1f69756b1f 100644 --- a/src/GeomFill/GeomFill_QuasiAngularConvertor.hxx +++ b/src/GeomFill/GeomFill_QuasiAngularConvertor.hxx @@ -19,12 +19,9 @@ #include #include -#include -#include #include #include -#include #include #include #include diff --git a/src/GeomFill/GeomFill_SectionGenerator.hxx b/src/GeomFill/GeomFill_SectionGenerator.hxx index 9799b0e490..fa4561367e 100644 --- a/src/GeomFill/GeomFill_SectionGenerator.hxx +++ b/src/GeomFill/GeomFill_SectionGenerator.hxx @@ -26,12 +26,10 @@ #include #include #include -#include #include #include #include #include -#include //! gives the functions needed for instantiation from diff --git a/src/GeomFill/GeomFill_SectionLaw.cxx b/src/GeomFill/GeomFill_SectionLaw.cxx index 3af57adde8..02c8bd893b 100644 --- a/src/GeomFill/GeomFill_SectionLaw.cxx +++ b/src/GeomFill/GeomFill_SectionLaw.cxx @@ -21,7 +21,6 @@ #include #include #include -#include #include IMPLEMENT_STANDARD_RTTIEXT(GeomFill_SectionLaw,Standard_Transient) diff --git a/src/GeomFill/GeomFill_SectionLaw.hxx b/src/GeomFill/GeomFill_SectionLaw.hxx index 5df2d6f07c..dec90fb964 100644 --- a/src/GeomFill/GeomFill_SectionLaw.hxx +++ b/src/GeomFill/GeomFill_SectionLaw.hxx @@ -21,8 +21,6 @@ #include #include -#include -#include #include #include #include diff --git a/src/GeomFill/GeomFill_SectionPlacement.hxx b/src/GeomFill/GeomFill_SectionPlacement.hxx index b7b6e6fe32..6baba63bd5 100644 --- a/src/GeomFill/GeomFill_SectionPlacement.hxx +++ b/src/GeomFill/GeomFill_SectionPlacement.hxx @@ -21,9 +21,7 @@ #include #include -#include #include -#include #include #include #include diff --git a/src/GeomFill/GeomFill_SimpleBound.hxx b/src/GeomFill/GeomFill_SimpleBound.hxx index 34546d60f3..664ec3f96d 100644 --- a/src/GeomFill/GeomFill_SimpleBound.hxx +++ b/src/GeomFill/GeomFill_SimpleBound.hxx @@ -21,8 +21,6 @@ #include #include -#include -#include class Law_Function; class gp_Pnt; diff --git a/src/GeomFill/GeomFill_SnglrFunc.cxx b/src/GeomFill/GeomFill_SnglrFunc.cxx index 337f52e50a..4ddf307edf 100644 --- a/src/GeomFill/GeomFill_SnglrFunc.cxx +++ b/src/GeomFill/GeomFill_SnglrFunc.cxx @@ -20,9 +20,7 @@ #include #include #include -#include #include -#include GeomFill_SnglrFunc::GeomFill_SnglrFunc(const Handle(Adaptor3d_Curve)& HC) : myHCurve(HC), ratio(1) diff --git a/src/GeomFill/GeomFill_SnglrFunc.hxx b/src/GeomFill/GeomFill_SnglrFunc.hxx index 168416c520..5fee316795 100644 --- a/src/GeomFill/GeomFill_SnglrFunc.hxx +++ b/src/GeomFill/GeomFill_SnglrFunc.hxx @@ -21,12 +21,10 @@ #include #include -#include #include #include #include #include -#include #include class gp_Pnt; diff --git a/src/GeomFill/GeomFill_Sweep.cxx b/src/GeomFill/GeomFill_Sweep.cxx index 4336c619b6..99611f10c7 100644 --- a/src/GeomFill/GeomFill_Sweep.cxx +++ b/src/GeomFill/GeomFill_Sweep.cxx @@ -61,10 +61,7 @@ #include #include #include -#include -#include #include -#include #include #include #include diff --git a/src/GeomFill/GeomFill_Sweep.hxx b/src/GeomFill/GeomFill_Sweep.hxx index 00a313a648..4851e5f6ad 100644 --- a/src/GeomFill/GeomFill_Sweep.hxx +++ b/src/GeomFill/GeomFill_Sweep.hxx @@ -21,8 +21,6 @@ #include #include -#include -#include #include #include #include diff --git a/src/GeomFill/GeomFill_SweepFunction.cxx b/src/GeomFill/GeomFill_SweepFunction.cxx index 609581b344..59c2c61365 100644 --- a/src/GeomFill/GeomFill_SweepFunction.cxx +++ b/src/GeomFill/GeomFill_SweepFunction.cxx @@ -27,7 +27,6 @@ #include #include #include -#include #include #include diff --git a/src/GeomFill/GeomFill_SweepFunction.hxx b/src/GeomFill/GeomFill_SweepFunction.hxx index 99cf37ff09..2cbc23692c 100644 --- a/src/GeomFill/GeomFill_SweepFunction.hxx +++ b/src/GeomFill/GeomFill_SweepFunction.hxx @@ -20,11 +20,9 @@ #include #include -#include #include #include #include -#include #include #include #include diff --git a/src/GeomFill/GeomFill_SweepSectionGenerator.cxx b/src/GeomFill/GeomFill_SweepSectionGenerator.cxx index e3514cdfb5..dfd65583c6 100644 --- a/src/GeomFill/GeomFill_SweepSectionGenerator.cxx +++ b/src/GeomFill/GeomFill_SweepSectionGenerator.cxx @@ -18,7 +18,6 @@ #include #include #include -#include #include #include #include @@ -28,7 +27,6 @@ #include #include #include -#include #include #include #include diff --git a/src/GeomFill/GeomFill_Tensor.cxx b/src/GeomFill/GeomFill_Tensor.cxx index 43b6f6c219..166287161f 100644 --- a/src/GeomFill/GeomFill_Tensor.cxx +++ b/src/GeomFill/GeomFill_Tensor.cxx @@ -17,12 +17,10 @@ #include #include -#include -#include GeomFill_Tensor::GeomFill_Tensor(const Standard_Integer NbRow, - const Standard_Integer NbCol, - const Standard_Integer NbMat) : + const Standard_Integer NbCol, + const Standard_Integer NbMat) : Tab(1,NbRow*NbMat*NbCol), nbrow( NbRow ), nbcol( NbCol ), diff --git a/src/GeomFill/GeomFill_Tensor.hxx b/src/GeomFill/GeomFill_Tensor.hxx index 97d9e47a85..4b8ad69d8e 100644 --- a/src/GeomFill/GeomFill_Tensor.hxx +++ b/src/GeomFill/GeomFill_Tensor.hxx @@ -22,8 +22,6 @@ #include #include -#include -#include #include class math_Matrix; diff --git a/src/GeomFill/GeomFill_TgtField.hxx b/src/GeomFill/GeomFill_TgtField.hxx index 1e8970e356..d00391ae0e 100644 --- a/src/GeomFill/GeomFill_TgtField.hxx +++ b/src/GeomFill/GeomFill_TgtField.hxx @@ -21,7 +21,6 @@ #include #include -#include #include class Law_BSpline; class gp_Vec; diff --git a/src/GeomFill/GeomFill_TgtOnCoons.hxx b/src/GeomFill/GeomFill_TgtOnCoons.hxx index f2dc6cafa2..8c9d497679 100644 --- a/src/GeomFill/GeomFill_TgtOnCoons.hxx +++ b/src/GeomFill/GeomFill_TgtOnCoons.hxx @@ -22,7 +22,6 @@ #include #include -#include class GeomFill_CoonsAlgPatch; class gp_Vec; diff --git a/src/GeomFill/GeomFill_TrihedronLaw.cxx b/src/GeomFill/GeomFill_TrihedronLaw.cxx index 853e513e37..20d08d9104 100644 --- a/src/GeomFill/GeomFill_TrihedronLaw.cxx +++ b/src/GeomFill/GeomFill_TrihedronLaw.cxx @@ -15,11 +15,9 @@ // commercial license or contractual agreement. -#include #include #include #include -#include #include IMPLEMENT_STANDARD_RTTIEXT(GeomFill_TrihedronLaw,Standard_Transient) diff --git a/src/GeomFill/GeomFill_TrihedronWithGuide.cxx b/src/GeomFill/GeomFill_TrihedronWithGuide.cxx index 3f9c68be1f..f1c51179cc 100644 --- a/src/GeomFill/GeomFill_TrihedronWithGuide.cxx +++ b/src/GeomFill/GeomFill_TrihedronWithGuide.cxx @@ -15,11 +15,8 @@ // commercial license or contractual agreement. -#include #include #include -#include -#include #include IMPLEMENT_STANDARD_RTTIEXT(GeomFill_TrihedronWithGuide,GeomFill_TrihedronLaw) diff --git a/src/GeomFill/GeomFill_TrihedronWithGuide.hxx b/src/GeomFill/GeomFill_TrihedronWithGuide.hxx index 7ce3d68f0f..ca224f5fdc 100644 --- a/src/GeomFill/GeomFill_TrihedronWithGuide.hxx +++ b/src/GeomFill/GeomFill_TrihedronWithGuide.hxx @@ -18,9 +18,7 @@ #define _GeomFill_TrihedronWithGuide_HeaderFile #include -#include -#include #include #include diff --git a/src/GeomFill/GeomFill_UniformSection.cxx b/src/GeomFill/GeomFill_UniformSection.cxx index a055716906..1d153407ed 100644 --- a/src/GeomFill/GeomFill_UniformSection.cxx +++ b/src/GeomFill/GeomFill_UniformSection.cxx @@ -15,19 +15,16 @@ // commercial license or contractual agreement. -#include #include #include #include #include #include -#include #include #include #include #include #include -#include #include #include #include diff --git a/src/GeomFill/GeomFill_UniformSection.hxx b/src/GeomFill/GeomFill_UniformSection.hxx index c486b19f4c..8b33e2efe7 100644 --- a/src/GeomFill/GeomFill_UniformSection.hxx +++ b/src/GeomFill/GeomFill_UniformSection.hxx @@ -20,9 +20,7 @@ #include #include -#include #include -#include #include #include #include diff --git a/src/GeomInt/GeomInt.cxx b/src/GeomInt/GeomInt.cxx index ad6bb2b777..a788e4352a 100644 --- a/src/GeomInt/GeomInt.cxx +++ b/src/GeomInt/GeomInt.cxx @@ -15,7 +15,6 @@ // commercial license or contractual agreement. #include -#include //======================================================================= //function : AdjustPeriodic diff --git a/src/GeomInt/GeomInt_BSpGradient_BFGSOfMyBSplGradientOfTheComputeLineOfWLApprox.hxx b/src/GeomInt/GeomInt_BSpGradient_BFGSOfMyBSplGradientOfTheComputeLineOfWLApprox.hxx index 20826171ab..f3ef63e18c 100644 --- a/src/GeomInt/GeomInt_BSpGradient_BFGSOfMyBSplGradientOfTheComputeLineOfWLApprox.hxx +++ b/src/GeomInt/GeomInt_BSpGradient_BFGSOfMyBSplGradientOfTheComputeLineOfWLApprox.hxx @@ -21,11 +21,8 @@ #include #include -#include #include #include -#include -#include class GeomInt_TheMultiLineOfWLApprox; class GeomInt_TheMultiLineToolOfWLApprox; class GeomInt_MyBSplGradientOfTheComputeLineOfWLApprox; diff --git a/src/GeomInt/GeomInt_BSpParFunctionOfMyBSplGradientOfTheComputeLineOfWLApprox.hxx b/src/GeomInt/GeomInt_BSpParFunctionOfMyBSplGradientOfTheComputeLineOfWLApprox.hxx index 666b528f1d..7affb98854 100644 --- a/src/GeomInt/GeomInt_BSpParFunctionOfMyBSplGradientOfTheComputeLineOfWLApprox.hxx +++ b/src/GeomInt/GeomInt_BSpParFunctionOfMyBSplGradientOfTheComputeLineOfWLApprox.hxx @@ -21,13 +21,9 @@ #include #include -#include #include -#include #include -#include #include -#include #include #include #include diff --git a/src/GeomInt/GeomInt_BSpParLeastSquareOfMyBSplGradientOfTheComputeLineOfWLApprox.hxx b/src/GeomInt/GeomInt_BSpParLeastSquareOfMyBSplGradientOfTheComputeLineOfWLApprox.hxx index 333837bc8d..8ca41f32e5 100644 --- a/src/GeomInt/GeomInt_BSpParLeastSquareOfMyBSplGradientOfTheComputeLineOfWLApprox.hxx +++ b/src/GeomInt/GeomInt_BSpParLeastSquareOfMyBSplGradientOfTheComputeLineOfWLApprox.hxx @@ -30,7 +30,6 @@ #include #include #include -#include #include #include class StdFail_NotDone; diff --git a/src/GeomInt/GeomInt_Gradient_BFGSOfMyGradientOfTheComputeLineBezierOfWLApprox.hxx b/src/GeomInt/GeomInt_Gradient_BFGSOfMyGradientOfTheComputeLineBezierOfWLApprox.hxx index 2847349d0d..6b6df9f0ae 100644 --- a/src/GeomInt/GeomInt_Gradient_BFGSOfMyGradientOfTheComputeLineBezierOfWLApprox.hxx +++ b/src/GeomInt/GeomInt_Gradient_BFGSOfMyGradientOfTheComputeLineBezierOfWLApprox.hxx @@ -21,11 +21,8 @@ #include #include -#include #include #include -#include -#include class GeomInt_TheMultiLineOfWLApprox; class GeomInt_TheMultiLineToolOfWLApprox; class GeomInt_MyGradientOfTheComputeLineBezierOfWLApprox; diff --git a/src/GeomInt/GeomInt_Gradient_BFGSOfMyGradientbisOfTheComputeLineOfWLApprox.hxx b/src/GeomInt/GeomInt_Gradient_BFGSOfMyGradientbisOfTheComputeLineOfWLApprox.hxx index c9a2215e66..5f9b254dad 100644 --- a/src/GeomInt/GeomInt_Gradient_BFGSOfMyGradientbisOfTheComputeLineOfWLApprox.hxx +++ b/src/GeomInt/GeomInt_Gradient_BFGSOfMyGradientbisOfTheComputeLineOfWLApprox.hxx @@ -21,11 +21,8 @@ #include #include -#include #include #include -#include -#include class GeomInt_TheMultiLineOfWLApprox; class GeomInt_TheMultiLineToolOfWLApprox; class GeomInt_MyGradientbisOfTheComputeLineOfWLApprox; diff --git a/src/GeomInt/GeomInt_IntSS.hxx b/src/GeomInt/GeomInt_IntSS.hxx index 068cc69d4c..943a59bf27 100644 --- a/src/GeomInt/GeomInt_IntSS.hxx +++ b/src/GeomInt/GeomInt_IntSS.hxx @@ -18,7 +18,6 @@ #define _GeomInt_IntSS_HeaderFile #include -#include #include #include #include diff --git a/src/GeomInt/GeomInt_LineConstructor.cxx b/src/GeomInt/GeomInt_LineConstructor.cxx index 036bd653a0..9862f6fe1b 100644 --- a/src/GeomInt/GeomInt_LineConstructor.cxx +++ b/src/GeomInt/GeomInt_LineConstructor.cxx @@ -20,11 +20,9 @@ #include #include #include -#include #include #include #include -#include #include #include #include @@ -37,7 +35,6 @@ #include #include #include -#include #include #include #include diff --git a/src/GeomInt/GeomInt_MyBSplGradientOfTheComputeLineOfWLApprox.hxx b/src/GeomInt/GeomInt_MyBSplGradientOfTheComputeLineOfWLApprox.hxx index f011a6fb6a..1526a0113e 100644 --- a/src/GeomInt/GeomInt_MyBSplGradientOfTheComputeLineOfWLApprox.hxx +++ b/src/GeomInt/GeomInt_MyBSplGradientOfTheComputeLineOfWLApprox.hxx @@ -24,7 +24,6 @@ #include #include #include -#include #include #include #include diff --git a/src/GeomInt/GeomInt_MyGradientOfTheComputeLineBezierOfWLApprox.hxx b/src/GeomInt/GeomInt_MyGradientOfTheComputeLineBezierOfWLApprox.hxx index bdcfe5f03f..3f4df6ef37 100644 --- a/src/GeomInt/GeomInt_MyGradientOfTheComputeLineBezierOfWLApprox.hxx +++ b/src/GeomInt/GeomInt_MyGradientOfTheComputeLineBezierOfWLApprox.hxx @@ -24,7 +24,6 @@ #include #include #include -#include #include #include class Standard_OutOfRange; diff --git a/src/GeomInt/GeomInt_MyGradientbisOfTheComputeLineOfWLApprox.hxx b/src/GeomInt/GeomInt_MyGradientbisOfTheComputeLineOfWLApprox.hxx index 48673ce7fe..f9715b0cfe 100644 --- a/src/GeomInt/GeomInt_MyGradientbisOfTheComputeLineOfWLApprox.hxx +++ b/src/GeomInt/GeomInt_MyGradientbisOfTheComputeLineOfWLApprox.hxx @@ -24,7 +24,6 @@ #include #include #include -#include #include #include class Standard_OutOfRange; diff --git a/src/GeomInt/GeomInt_ParFunctionOfMyGradientOfTheComputeLineBezierOfWLApprox.hxx b/src/GeomInt/GeomInt_ParFunctionOfMyGradientOfTheComputeLineBezierOfWLApprox.hxx index 81db734bbc..fa12c897c1 100644 --- a/src/GeomInt/GeomInt_ParFunctionOfMyGradientOfTheComputeLineBezierOfWLApprox.hxx +++ b/src/GeomInt/GeomInt_ParFunctionOfMyGradientOfTheComputeLineBezierOfWLApprox.hxx @@ -21,13 +21,9 @@ #include #include -#include #include -#include #include -#include #include -#include #include #include #include diff --git a/src/GeomInt/GeomInt_ParFunctionOfMyGradientbisOfTheComputeLineOfWLApprox.hxx b/src/GeomInt/GeomInt_ParFunctionOfMyGradientbisOfTheComputeLineOfWLApprox.hxx index 4ba5f81ef5..887557f2a6 100644 --- a/src/GeomInt/GeomInt_ParFunctionOfMyGradientbisOfTheComputeLineOfWLApprox.hxx +++ b/src/GeomInt/GeomInt_ParFunctionOfMyGradientbisOfTheComputeLineOfWLApprox.hxx @@ -21,13 +21,9 @@ #include #include -#include #include -#include #include -#include #include -#include #include #include #include diff --git a/src/GeomInt/GeomInt_ParLeastSquareOfMyGradientOfTheComputeLineBezierOfWLApprox.hxx b/src/GeomInt/GeomInt_ParLeastSquareOfMyGradientOfTheComputeLineBezierOfWLApprox.hxx index 3de34d0009..e8188acbdb 100644 --- a/src/GeomInt/GeomInt_ParLeastSquareOfMyGradientOfTheComputeLineBezierOfWLApprox.hxx +++ b/src/GeomInt/GeomInt_ParLeastSquareOfMyGradientOfTheComputeLineBezierOfWLApprox.hxx @@ -30,7 +30,6 @@ #include #include #include -#include #include #include class StdFail_NotDone; diff --git a/src/GeomInt/GeomInt_ParLeastSquareOfMyGradientbisOfTheComputeLineOfWLApprox.hxx b/src/GeomInt/GeomInt_ParLeastSquareOfMyGradientbisOfTheComputeLineOfWLApprox.hxx index 6ed4fb4209..93790ed65e 100644 --- a/src/GeomInt/GeomInt_ParLeastSquareOfMyGradientbisOfTheComputeLineOfWLApprox.hxx +++ b/src/GeomInt/GeomInt_ParLeastSquareOfMyGradientbisOfTheComputeLineOfWLApprox.hxx @@ -30,7 +30,6 @@ #include #include #include -#include #include #include class StdFail_NotDone; diff --git a/src/GeomInt/GeomInt_ResConstraintOfMyGradientOfTheComputeLineBezierOfWLApprox.hxx b/src/GeomInt/GeomInt_ResConstraintOfMyGradientOfTheComputeLineBezierOfWLApprox.hxx index 9c8be59fd2..368d14cf9f 100644 --- a/src/GeomInt/GeomInt_ResConstraintOfMyGradientOfTheComputeLineBezierOfWLApprox.hxx +++ b/src/GeomInt/GeomInt_ResConstraintOfMyGradientOfTheComputeLineBezierOfWLApprox.hxx @@ -21,7 +21,6 @@ #include #include -#include #include #include #include diff --git a/src/GeomInt/GeomInt_ResConstraintOfMyGradientbisOfTheComputeLineOfWLApprox.hxx b/src/GeomInt/GeomInt_ResConstraintOfMyGradientbisOfTheComputeLineOfWLApprox.hxx index e9398dcb73..8eee067719 100644 --- a/src/GeomInt/GeomInt_ResConstraintOfMyGradientbisOfTheComputeLineOfWLApprox.hxx +++ b/src/GeomInt/GeomInt_ResConstraintOfMyGradientbisOfTheComputeLineOfWLApprox.hxx @@ -21,7 +21,6 @@ #include #include -#include #include #include #include diff --git a/src/GeomInt/GeomInt_TheComputeLineBezierOfWLApprox.hxx b/src/GeomInt/GeomInt_TheComputeLineBezierOfWLApprox.hxx index ef76a5e12d..5678085182 100644 --- a/src/GeomInt/GeomInt_TheComputeLineBezierOfWLApprox.hxx +++ b/src/GeomInt/GeomInt_TheComputeLineBezierOfWLApprox.hxx @@ -24,14 +24,12 @@ #include #include #include -#include #include #include #include #include #include #include -#include #include #include #include diff --git a/src/GeomInt/GeomInt_TheComputeLineOfWLApprox.hxx b/src/GeomInt/GeomInt_TheComputeLineOfWLApprox.hxx index b60dad6b80..1279f2b041 100644 --- a/src/GeomInt/GeomInt_TheComputeLineOfWLApprox.hxx +++ b/src/GeomInt/GeomInt_TheComputeLineOfWLApprox.hxx @@ -22,13 +22,11 @@ #include #include -#include #include #include #include #include #include -#include #include #include #include diff --git a/src/GeomInt/GeomInt_TheMultiLineToolOfWLApprox.hxx b/src/GeomInt/GeomInt_TheMultiLineToolOfWLApprox.hxx index 43f73a2c6e..bdc8dfbac3 100644 --- a/src/GeomInt/GeomInt_TheMultiLineToolOfWLApprox.hxx +++ b/src/GeomInt/GeomInt_TheMultiLineToolOfWLApprox.hxx @@ -21,14 +21,8 @@ #include #include -#include #include -#include #include -#include -#include -#include -#include class GeomInt_TheMultiLineOfWLApprox; class ApproxInt_SvSurfaces; diff --git a/src/GeomLProp/GeomLProp.hxx b/src/GeomLProp/GeomLProp.hxx index 19279e329b..11771c5018 100644 --- a/src/GeomLProp/GeomLProp.hxx +++ b/src/GeomLProp/GeomLProp.hxx @@ -22,8 +22,6 @@ #include #include -#include -#include class Geom_Curve; diff --git a/src/GeomLProp/GeomLProp_CurveTool.hxx b/src/GeomLProp/GeomLProp_CurveTool.hxx index 89902cdd4c..fc9d5093ea 100644 --- a/src/GeomLProp/GeomLProp_CurveTool.hxx +++ b/src/GeomLProp/GeomLProp_CurveTool.hxx @@ -21,7 +21,6 @@ #include #include -#include #include class Geom_Curve; class gp_Pnt; diff --git a/src/GeomLProp/GeomLProp_SLProps.hxx b/src/GeomLProp/GeomLProp_SLProps.hxx index 3817b1d746..463660f226 100644 --- a/src/GeomLProp/GeomLProp_SLProps.hxx +++ b/src/GeomLProp/GeomLProp_SLProps.hxx @@ -21,13 +21,11 @@ #include #include -#include #include #include #include #include #include -#include class Geom_Surface; class LProp_BadContinuity; class Standard_DomainError; diff --git a/src/GeomLProp/GeomLProp_SurfaceTool.hxx b/src/GeomLProp/GeomLProp_SurfaceTool.hxx index 243458f84d..64c0f8ebc6 100644 --- a/src/GeomLProp/GeomLProp_SurfaceTool.hxx +++ b/src/GeomLProp/GeomLProp_SurfaceTool.hxx @@ -21,7 +21,6 @@ #include #include -#include #include class Geom_Surface; class gp_Pnt; diff --git a/src/GeomLib/GeomLib.cxx b/src/GeomLib/GeomLib.cxx index e9dab9d188..fcb2305344 100644 --- a/src/GeomLib/GeomLib.cxx +++ b/src/GeomLib/GeomLib.cxx @@ -43,20 +43,14 @@ #include -#include #include #include #include -#include #include -#include -#include -#include #include #include #include #include -#include #include #include #include @@ -71,7 +65,6 @@ #include #include #include -#include #include #include #include @@ -268,7 +261,6 @@ static void ComputeLambda(const math_Matrix& Constraint, } #include -#include //======================================================================= //function : RemovePointsFromArray //purpose : diff --git a/src/GeomLib/GeomLib_Check2dBSplineCurve.cxx b/src/GeomLib/GeomLib_Check2dBSplineCurve.cxx index 958c9996bb..ef25c17506 100644 --- a/src/GeomLib/GeomLib_Check2dBSplineCurve.cxx +++ b/src/GeomLib/GeomLib_Check2dBSplineCurve.cxx @@ -20,8 +20,6 @@ #include #include #include -#include -#include //======================================================================= //function : GeomLib_Check2dBSplineCurve diff --git a/src/GeomLib/GeomLib_Check2dBSplineCurve.hxx b/src/GeomLib/GeomLib_Check2dBSplineCurve.hxx index 38d77cda7a..e2c933263f 100644 --- a/src/GeomLib/GeomLib_Check2dBSplineCurve.hxx +++ b/src/GeomLib/GeomLib_Check2dBSplineCurve.hxx @@ -21,9 +21,6 @@ #include #include -#include -#include -#include class Geom2d_BSplineCurve; diff --git a/src/GeomLib/GeomLib_CheckBSplineCurve.cxx b/src/GeomLib/GeomLib_CheckBSplineCurve.cxx index cc6ab66efa..43cc8992b0 100644 --- a/src/GeomLib/GeomLib_CheckBSplineCurve.cxx +++ b/src/GeomLib/GeomLib_CheckBSplineCurve.cxx @@ -19,7 +19,6 @@ #include #include #include -#include #include //======================================================================= diff --git a/src/GeomLib/GeomLib_CheckBSplineCurve.hxx b/src/GeomLib/GeomLib_CheckBSplineCurve.hxx index 95019151d8..8c2c3047e8 100644 --- a/src/GeomLib/GeomLib_CheckBSplineCurve.hxx +++ b/src/GeomLib/GeomLib_CheckBSplineCurve.hxx @@ -21,9 +21,6 @@ #include #include -#include -#include -#include class Geom_BSplineCurve; diff --git a/src/GeomLib/GeomLib_CheckCurveOnSurface.cxx b/src/GeomLib/GeomLib_CheckCurveOnSurface.cxx index 6f68afd05f..3e5df1ae20 100644 --- a/src/GeomLib/GeomLib_CheckCurveOnSurface.cxx +++ b/src/GeomLib/GeomLib_CheckCurveOnSurface.cxx @@ -14,19 +14,13 @@ #include -#include #include #include -#include #include -#include #include -#include #include #include -#include #include -#include #include #include #include diff --git a/src/GeomLib/GeomLib_DenominatorMultiplier.cxx b/src/GeomLib/GeomLib_DenominatorMultiplier.cxx index ec55f88408..4f56a3d549 100644 --- a/src/GeomLib/GeomLib_DenominatorMultiplier.cxx +++ b/src/GeomLib/GeomLib_DenominatorMultiplier.cxx @@ -21,8 +21,6 @@ #include #include #include -#include -#include #include #include #include diff --git a/src/GeomLib/GeomLib_Interpolate.cxx b/src/GeomLib/GeomLib_Interpolate.cxx index 6231ecaa8b..43c2524e98 100644 --- a/src/GeomLib/GeomLib_Interpolate.cxx +++ b/src/GeomLib/GeomLib_Interpolate.cxx @@ -18,17 +18,10 @@ #include #include #include -#include -#include -#include -#include #include #include #include -#include #include -#include -#include //======================================================================= //function : GeomLib_Interpolate diff --git a/src/GeomLib/GeomLib_Interpolate.hxx b/src/GeomLib/GeomLib_Interpolate.hxx index f5f86ab477..b822790b77 100644 --- a/src/GeomLib/GeomLib_Interpolate.hxx +++ b/src/GeomLib/GeomLib_Interpolate.hxx @@ -21,7 +21,6 @@ #include #include -#include #include #include #include diff --git a/src/GeomLib/GeomLib_IsPlanarSurface.cxx b/src/GeomLib/GeomLib_IsPlanarSurface.cxx index e6765e03f2..b0c04de57c 100644 --- a/src/GeomLib/GeomLib_IsPlanarSurface.cxx +++ b/src/GeomLib/GeomLib_IsPlanarSurface.cxx @@ -21,8 +21,6 @@ #include #include #include -#include -#include #include #include #include diff --git a/src/GeomLib/GeomLib_IsPlanarSurface.hxx b/src/GeomLib/GeomLib_IsPlanarSurface.hxx index 0eb71a42bb..5c0f54660f 100644 --- a/src/GeomLib/GeomLib_IsPlanarSurface.hxx +++ b/src/GeomLib/GeomLib_IsPlanarSurface.hxx @@ -22,8 +22,6 @@ #include #include -#include -#include class Geom_Surface; diff --git a/src/GeomLib/GeomLib_LogSample.hxx b/src/GeomLib/GeomLib_LogSample.hxx index cbf26f458f..f399b41f03 100644 --- a/src/GeomLib/GeomLib_LogSample.hxx +++ b/src/GeomLib/GeomLib_LogSample.hxx @@ -23,8 +23,6 @@ #include #include -#include - class GeomLib_LogSample : public math_FunctionSample diff --git a/src/GeomLib/GeomLib_MakeCurvefromApprox.hxx b/src/GeomLib/GeomLib_MakeCurvefromApprox.hxx index 76e0f42c07..095f61b996 100644 --- a/src/GeomLib/GeomLib_MakeCurvefromApprox.hxx +++ b/src/GeomLib/GeomLib_MakeCurvefromApprox.hxx @@ -22,7 +22,6 @@ #include #include -#include #include class Geom2d_BSplineCurve; class Geom_BSplineCurve; diff --git a/src/GeomLib/GeomLib_PolyFunc.hxx b/src/GeomLib/GeomLib_PolyFunc.hxx index 5cbb80bc9a..06375955aa 100644 --- a/src/GeomLib/GeomLib_PolyFunc.hxx +++ b/src/GeomLib/GeomLib_PolyFunc.hxx @@ -23,8 +23,6 @@ #include #include -#include -#include //! Polynomial Function diff --git a/src/GeomLib/GeomLib_Tool.cxx b/src/GeomLib/GeomLib_Tool.cxx index 03e7cff0aa..2c38aed268 100644 --- a/src/GeomLib/GeomLib_Tool.cxx +++ b/src/GeomLib/GeomLib_Tool.cxx @@ -22,7 +22,6 @@ #include #include #include -#include #include // The functions Parameter(s) are used to compute parameter(s) of point diff --git a/src/GeomPlate/GeomPlate_Aij.hxx b/src/GeomPlate/GeomPlate_Aij.hxx index b9fc196ed4..cbfabc2753 100644 --- a/src/GeomPlate/GeomPlate_Aij.hxx +++ b/src/GeomPlate/GeomPlate_Aij.hxx @@ -21,7 +21,6 @@ #include #include -#include #include diff --git a/src/GeomPlate/GeomPlate_BuildAveragePlane.cxx b/src/GeomPlate/GeomPlate_BuildAveragePlane.cxx index c058110ec1..557906d138 100644 --- a/src/GeomPlate/GeomPlate_BuildAveragePlane.cxx +++ b/src/GeomPlate/GeomPlate_BuildAveragePlane.cxx @@ -27,12 +27,10 @@ #include #include #include -#include #include #include #include #include -#include #include #include #include diff --git a/src/GeomPlate/GeomPlate_BuildAveragePlane.hxx b/src/GeomPlate/GeomPlate_BuildAveragePlane.hxx index b8fd059f58..0a27e51848 100644 --- a/src/GeomPlate/GeomPlate_BuildAveragePlane.hxx +++ b/src/GeomPlate/GeomPlate_BuildAveragePlane.hxx @@ -22,12 +22,10 @@ #include #include -#include #include #include #include #include -#include #include class Geom_Plane; class Geom_Line; diff --git a/src/GeomPlate/GeomPlate_BuildPlateSurface.cxx b/src/GeomPlate/GeomPlate_BuildPlateSurface.cxx index 3a2ff0939a..9f018a8a4d 100644 --- a/src/GeomPlate/GeomPlate_BuildPlateSurface.cxx +++ b/src/GeomPlate/GeomPlate_BuildPlateSurface.cxx @@ -49,20 +49,16 @@ #include #include #include -#include #include #include #include #include #include #include -#include #include #include -#include #include #include -#include #include #include #include diff --git a/src/GeomPlate/GeomPlate_BuildPlateSurface.hxx b/src/GeomPlate/GeomPlate_BuildPlateSurface.hxx index 1335089838..db8e144d76 100644 --- a/src/GeomPlate/GeomPlate_BuildPlateSurface.hxx +++ b/src/GeomPlate/GeomPlate_BuildPlateSurface.hxx @@ -19,13 +19,11 @@ #include #include -#include #include #include #include #include -#include #include #include #include diff --git a/src/GeomPlate/GeomPlate_CurveConstraint.cxx b/src/GeomPlate/GeomPlate_CurveConstraint.cxx index 752cacc7ff..d3a0cbbf29 100644 --- a/src/GeomPlate/GeomPlate_CurveConstraint.cxx +++ b/src/GeomPlate/GeomPlate_CurveConstraint.cxx @@ -18,27 +18,18 @@ // ne traite que les GeomAdaptor_Surface; // plus de reference a BRepAdaptor -#include -#include -#include -#include #include -#include #include #include #include #include -#include #include #include -#include #include #include #include #include -#include #include -#include #include IMPLEMENT_STANDARD_RTTIEXT(GeomPlate_CurveConstraint,Standard_Transient) diff --git a/src/GeomPlate/GeomPlate_HArray1OfHCurve.hxx b/src/GeomPlate/GeomPlate_HArray1OfHCurve.hxx index 4899757c68..cadf7ebf89 100644 --- a/src/GeomPlate/GeomPlate_HArray1OfHCurve.hxx +++ b/src/GeomPlate/GeomPlate_HArray1OfHCurve.hxx @@ -17,7 +17,6 @@ #ifndef GeomPlate_HArray1OfHCurve_HeaderFile #define GeomPlate_HArray1OfHCurve_HeaderFile -#include #include #include diff --git a/src/GeomPlate/GeomPlate_HSequenceOfPointConstraint.hxx b/src/GeomPlate/GeomPlate_HSequenceOfPointConstraint.hxx index 3981e26b6d..a0097c097b 100644 --- a/src/GeomPlate/GeomPlate_HSequenceOfPointConstraint.hxx +++ b/src/GeomPlate/GeomPlate_HSequenceOfPointConstraint.hxx @@ -17,7 +17,6 @@ #ifndef GeomPlate_HSequenceOfPointConstraint_HeaderFile #define GeomPlate_HSequenceOfPointConstraint_HeaderFile -#include #include #include diff --git a/src/GeomPlate/GeomPlate_MakeApprox.cxx b/src/GeomPlate/GeomPlate_MakeApprox.cxx index 9e3f870348..5de1d888b9 100644 --- a/src/GeomPlate/GeomPlate_MakeApprox.cxx +++ b/src/GeomPlate/GeomPlate_MakeApprox.cxx @@ -16,10 +16,7 @@ #include -#include -#include #include -#include #include #include #include @@ -33,7 +30,6 @@ #include #include #include -#include #include #include diff --git a/src/GeomPlate/GeomPlate_MakeApprox.hxx b/src/GeomPlate/GeomPlate_MakeApprox.hxx index 5656e40af5..455dc1729f 100644 --- a/src/GeomPlate/GeomPlate_MakeApprox.hxx +++ b/src/GeomPlate/GeomPlate_MakeApprox.hxx @@ -21,7 +21,6 @@ #include #include -#include #include #include class GeomPlate_Surface; diff --git a/src/GeomPlate/GeomPlate_PlateG0Criterion.cxx b/src/GeomPlate/GeomPlate_PlateG0Criterion.cxx index f5c9ef3a0d..d7f8a1bc23 100644 --- a/src/GeomPlate/GeomPlate_PlateG0Criterion.cxx +++ b/src/GeomPlate/GeomPlate_PlateG0Criterion.cxx @@ -21,11 +21,9 @@ // de la distance au carre) #include -#include #include #include #include -#include #include #include #include diff --git a/src/GeomPlate/GeomPlate_PlateG0Criterion.hxx b/src/GeomPlate/GeomPlate_PlateG0Criterion.hxx index ee49b89edc..25d943e901 100644 --- a/src/GeomPlate/GeomPlate_PlateG0Criterion.hxx +++ b/src/GeomPlate/GeomPlate_PlateG0Criterion.hxx @@ -19,15 +19,12 @@ #include #include -#include #include #include #include -#include #include #include -#include class AdvApp2Var_Patch; class AdvApp2Var_Context; diff --git a/src/GeomPlate/GeomPlate_PlateG1Criterion.cxx b/src/GeomPlate/GeomPlate_PlateG1Criterion.cxx index 44cbbd4377..324b068e64 100644 --- a/src/GeomPlate/GeomPlate_PlateG1Criterion.cxx +++ b/src/GeomPlate/GeomPlate_PlateG1Criterion.cxx @@ -16,10 +16,8 @@ #include -#include #include #include -#include #include #include #include diff --git a/src/GeomPlate/GeomPlate_PlateG1Criterion.hxx b/src/GeomPlate/GeomPlate_PlateG1Criterion.hxx index acef5c8a3f..a82db47c8b 100644 --- a/src/GeomPlate/GeomPlate_PlateG1Criterion.hxx +++ b/src/GeomPlate/GeomPlate_PlateG1Criterion.hxx @@ -19,15 +19,12 @@ #include #include -#include #include #include #include -#include #include #include -#include class AdvApp2Var_Patch; class AdvApp2Var_Context; diff --git a/src/GeomPlate/GeomPlate_PointConstraint.cxx b/src/GeomPlate/GeomPlate_PointConstraint.cxx index 99cfc80350..74d31c34cc 100644 --- a/src/GeomPlate/GeomPlate_PointConstraint.cxx +++ b/src/GeomPlate/GeomPlate_PointConstraint.cxx @@ -15,20 +15,13 @@ // commercial license or contractual agreement. -#include -#include #include #include -#include #include -#include #include -#include #include #include -#include #include -#include #include IMPLEMENT_STANDARD_RTTIEXT(GeomPlate_PointConstraint,Standard_Transient) diff --git a/src/GeomPlate/GeomPlate_PointConstraint.hxx b/src/GeomPlate/GeomPlate_PointConstraint.hxx index 3f4d4bccfa..43b1fa76c4 100644 --- a/src/GeomPlate/GeomPlate_PointConstraint.hxx +++ b/src/GeomPlate/GeomPlate_PointConstraint.hxx @@ -24,9 +24,7 @@ #include #include #include -#include #include -#include #include class Geom_Surface; diff --git a/src/GeomPlate/GeomPlate_Surface.cxx b/src/GeomPlate/GeomPlate_Surface.cxx index bbca7908ed..4bfd203df7 100644 --- a/src/GeomPlate/GeomPlate_Surface.cxx +++ b/src/GeomPlate/GeomPlate_Surface.cxx @@ -24,9 +24,6 @@ #include #include -#include -#include -#include #include #include #include @@ -34,8 +31,6 @@ #include #include #include -#include -#include #include IMPLEMENT_STANDARD_RTTIEXT(GeomPlate_Surface,Geom_Surface) diff --git a/src/GeomPlate/GeomPlate_Surface.hxx b/src/GeomPlate/GeomPlate_Surface.hxx index 6f7e283b83..90dbc25da8 100644 --- a/src/GeomPlate/GeomPlate_Surface.hxx +++ b/src/GeomPlate/GeomPlate_Surface.hxx @@ -21,9 +21,7 @@ #include #include -#include #include -#include #include #include #include diff --git a/src/GeomProjLib/GeomProjLib.cxx b/src/GeomProjLib/GeomProjLib.cxx index 365dc0d058..06ebc0ccb1 100644 --- a/src/GeomProjLib/GeomProjLib.cxx +++ b/src/GeomProjLib/GeomProjLib.cxx @@ -39,7 +39,6 @@ #include #include #include -#include #include #include #include @@ -47,11 +46,6 @@ #include #include #include -#include -#include -#include -#include -#include #include #ifdef DRAW diff --git a/src/GeomToIGES/GeomToIGES_GeomCurve.cxx b/src/GeomToIGES/GeomToIGES_GeomCurve.cxx index 423ceed56d..b0c4c47b60 100644 --- a/src/GeomToIGES/GeomToIGES_GeomCurve.cxx +++ b/src/GeomToIGES/GeomToIGES_GeomCurve.cxx @@ -24,7 +24,6 @@ #include #include #include -#include #include #include #include @@ -41,7 +40,6 @@ #include #include #include -#include #include #include #include @@ -54,22 +52,15 @@ #include #include #include -#include -#include #include #include -#include #include -#include -#include #include #include -#include #include #include #include #include -#include #include #include #include diff --git a/src/GeomToIGES/GeomToIGES_GeomCurve.hxx b/src/GeomToIGES/GeomToIGES_GeomCurve.hxx index 6eebea1dab..bd5b4dec5f 100644 --- a/src/GeomToIGES/GeomToIGES_GeomCurve.hxx +++ b/src/GeomToIGES/GeomToIGES_GeomCurve.hxx @@ -22,7 +22,6 @@ #include #include -#include class IGESData_IGESEntity; class Geom_Curve; class Geom_BoundedCurve; diff --git a/src/GeomToIGES/GeomToIGES_GeomPoint.cxx b/src/GeomToIGES/GeomToIGES_GeomPoint.cxx index b948f4f232..8f6255f784 100644 --- a/src/GeomToIGES/GeomToIGES_GeomPoint.cxx +++ b/src/GeomToIGES/GeomToIGES_GeomPoint.cxx @@ -17,12 +17,10 @@ #include #include -#include #include #include #include #include -#include //============================================================================= // GeomToIGES_GeomPoint diff --git a/src/GeomToIGES/GeomToIGES_GeomSurface.cxx b/src/GeomToIGES/GeomToIGES_GeomSurface.cxx index 7ca12a35a8..147fb8f4e1 100644 --- a/src/GeomToIGES/GeomToIGES_GeomSurface.cxx +++ b/src/GeomToIGES/GeomToIGES_GeomSurface.cxx @@ -21,19 +21,16 @@ #include #include #include -#include #include #include #include #include #include -#include #include #include #include #include #include -#include #include #include #include @@ -48,7 +45,6 @@ #include #include #include -#include #include #include #include @@ -59,21 +55,16 @@ #include #include #include -#include -#include #include #include -#include #include #include #include -#include #include #include #include #include #include -#include #include #include #include @@ -87,7 +78,6 @@ #include #include #include -#include #include #include #include diff --git a/src/GeomToIGES/GeomToIGES_GeomSurface.hxx b/src/GeomToIGES/GeomToIGES_GeomSurface.hxx index 28e7da67dc..2b2b8d071a 100644 --- a/src/GeomToIGES/GeomToIGES_GeomSurface.hxx +++ b/src/GeomToIGES/GeomToIGES_GeomSurface.hxx @@ -21,8 +21,6 @@ #include #include -#include -#include #include class IGESData_IGESEntity; class Geom_Surface; diff --git a/src/GeomToIGES/GeomToIGES_GeomVector.cxx b/src/GeomToIGES/GeomToIGES_GeomVector.cxx index bf6d669453..11e0cfe8f3 100644 --- a/src/GeomToIGES/GeomToIGES_GeomVector.cxx +++ b/src/GeomToIGES/GeomToIGES_GeomVector.cxx @@ -18,19 +18,10 @@ #include #include #include -#include #include -#include -#include -#include -#include #include -#include -#include #include #include -#include -#include #include //============================================================================= diff --git a/src/GeomToStep/GeomToStep_MakeAxis2Placement3d.cxx b/src/GeomToStep/GeomToStep_MakeAxis2Placement3d.cxx index c8abefb6ff..f0675809a5 100644 --- a/src/GeomToStep/GeomToStep_MakeAxis2Placement3d.cxx +++ b/src/GeomToStep/GeomToStep_MakeAxis2Placement3d.cxx @@ -19,7 +19,6 @@ #include #include #include -#include #include #include #include diff --git a/src/GeomToStep/GeomToStep_MakePlane.cxx b/src/GeomToStep/GeomToStep_MakePlane.cxx index 58c6898c55..9f4aa34491 100644 --- a/src/GeomToStep/GeomToStep_MakePlane.cxx +++ b/src/GeomToStep/GeomToStep_MakePlane.cxx @@ -18,7 +18,6 @@ #include #include #include -#include #include #include #include diff --git a/src/GeomToStep/GeomToStep_MakePolyline.cxx b/src/GeomToStep/GeomToStep_MakePolyline.cxx index e08d202465..48afe4d030 100644 --- a/src/GeomToStep/GeomToStep_MakePolyline.cxx +++ b/src/GeomToStep/GeomToStep_MakePolyline.cxx @@ -20,7 +20,6 @@ #include #include #include -#include #include #include #include diff --git a/src/GeomToStep/GeomToStep_MakeSurfaceOfRevolution.cxx b/src/GeomToStep/GeomToStep_MakeSurfaceOfRevolution.cxx index 9a2193ff38..8f8bc1d59f 100644 --- a/src/GeomToStep/GeomToStep_MakeSurfaceOfRevolution.cxx +++ b/src/GeomToStep/GeomToStep_MakeSurfaceOfRevolution.cxx @@ -19,7 +19,6 @@ #include #include #include -#include #include #include #include diff --git a/src/GeomTools/GeomTools.cxx b/src/GeomTools/GeomTools.cxx index 01215f875e..767fa178a2 100644 --- a/src/GeomTools/GeomTools.cxx +++ b/src/GeomTools/GeomTools.cxx @@ -17,7 +17,6 @@ #include #include -#include #include #include #include diff --git a/src/GeomTools/GeomTools_Curve2dSet.cxx b/src/GeomTools/GeomTools_Curve2dSet.cxx index d83bd2064a..b8553f8beb 100644 --- a/src/GeomTools/GeomTools_Curve2dSet.cxx +++ b/src/GeomTools/GeomTools_Curve2dSet.cxx @@ -36,7 +36,6 @@ #include #include #include -#include #include #include #include diff --git a/src/GeomTools/GeomTools_Curve2dSet.hxx b/src/GeomTools/GeomTools_Curve2dSet.hxx index bcaf670194..0b5fdd272c 100644 --- a/src/GeomTools/GeomTools_Curve2dSet.hxx +++ b/src/GeomTools/GeomTools_Curve2dSet.hxx @@ -25,7 +25,6 @@ #include #include #include -#include #include class Geom2d_Curve; diff --git a/src/GeomTools/GeomTools_CurveSet.cxx b/src/GeomTools/GeomTools_CurveSet.cxx index 0a32f59ee4..a6e8a3e8da 100644 --- a/src/GeomTools/GeomTools_CurveSet.cxx +++ b/src/GeomTools/GeomTools_CurveSet.cxx @@ -36,7 +36,6 @@ #include #include #include -#include #include #include #include diff --git a/src/GeomTools/GeomTools_CurveSet.hxx b/src/GeomTools/GeomTools_CurveSet.hxx index a87af4bce4..33be969751 100644 --- a/src/GeomTools/GeomTools_CurveSet.hxx +++ b/src/GeomTools/GeomTools_CurveSet.hxx @@ -25,7 +25,6 @@ #include #include #include -#include #include class Geom_Curve; diff --git a/src/GeomTools/GeomTools_SurfaceSet.cxx b/src/GeomTools/GeomTools_SurfaceSet.cxx index 03dadb6a97..2dcc11cbd1 100644 --- a/src/GeomTools/GeomTools_SurfaceSet.cxx +++ b/src/GeomTools/GeomTools_SurfaceSet.cxx @@ -16,7 +16,6 @@ #include -#include #include #include #include @@ -39,9 +38,7 @@ #include #include #include -#include #include -#include #include #include #include diff --git a/src/GeomTools/GeomTools_SurfaceSet.hxx b/src/GeomTools/GeomTools_SurfaceSet.hxx index c77ae388e1..997b66421f 100644 --- a/src/GeomTools/GeomTools_SurfaceSet.hxx +++ b/src/GeomTools/GeomTools_SurfaceSet.hxx @@ -25,7 +25,6 @@ #include #include #include -#include #include class Geom_Surface; diff --git a/src/GeomTools/GeomTools_UndefinedTypeHandler.cxx b/src/GeomTools/GeomTools_UndefinedTypeHandler.cxx index c997e4eb6a..62672d5f04 100644 --- a/src/GeomTools/GeomTools_UndefinedTypeHandler.cxx +++ b/src/GeomTools/GeomTools_UndefinedTypeHandler.cxx @@ -16,7 +16,6 @@ #include -#include #include #include #include diff --git a/src/GeomTools/GeomTools_UndefinedTypeHandler.hxx b/src/GeomTools/GeomTools_UndefinedTypeHandler.hxx index 7261ad384b..9d4e370a4f 100644 --- a/src/GeomTools/GeomTools_UndefinedTypeHandler.hxx +++ b/src/GeomTools/GeomTools_UndefinedTypeHandler.hxx @@ -22,7 +22,6 @@ #include #include -#include #include #include class Geom_Curve; diff --git a/src/GeometryTest/GeometryTest_APICommands.cxx b/src/GeometryTest/GeometryTest_APICommands.cxx index 4a0979f225..8e742ae691 100644 --- a/src/GeometryTest/GeometryTest_APICommands.cxx +++ b/src/GeometryTest/GeometryTest_APICommands.cxx @@ -16,8 +16,6 @@ #include #include -#include -#include #include #include #include @@ -31,7 +29,6 @@ #include #include #include -#include #include #include #include diff --git a/src/GeometryTest/GeometryTest_ConstraintCommands.cxx b/src/GeometryTest/GeometryTest_ConstraintCommands.cxx index f1e050243c..4946ed3d8a 100644 --- a/src/GeometryTest/GeometryTest_ConstraintCommands.cxx +++ b/src/GeometryTest/GeometryTest_ConstraintCommands.cxx @@ -27,8 +27,6 @@ #include #include #include -#include -#include #include #include #include @@ -37,7 +35,6 @@ #include #include #include -#include #include #include #include @@ -46,25 +43,15 @@ #include #include #include -#include #include #include -#include -#include -#include #include #include -#include -#include #include #include -#include -#include -#include #include #include -#include #ifdef _WIN32 Standard_IMPORT Draw_Viewer dout; #endif diff --git a/src/GeometryTest/GeometryTest_ContinuityCommands.cxx b/src/GeometryTest/GeometryTest_ContinuityCommands.cxx index 36782bb2d9..709d76dd2a 100644 --- a/src/GeometryTest/GeometryTest_ContinuityCommands.cxx +++ b/src/GeometryTest/GeometryTest_ContinuityCommands.cxx @@ -17,10 +17,7 @@ #include #include #include -#include -#include #include -#include #include #include #include diff --git a/src/GeometryTest/GeometryTest_CurveCommands.cxx b/src/GeometryTest/GeometryTest_CurveCommands.cxx index cfc04e62b1..2e52fc6d11 100644 --- a/src/GeometryTest/GeometryTest_CurveCommands.cxx +++ b/src/GeometryTest/GeometryTest_CurveCommands.cxx @@ -19,18 +19,13 @@ #include #include #include -#include -#include -#include #include -#include #include #include #include #include #include #include -#include #include #include @@ -42,15 +37,9 @@ #include #include -#include -#include -#include #include -#include #include -#include -#include #include #include #include @@ -70,9 +59,6 @@ #include #include -#include -#include -#include #include @@ -82,52 +68,30 @@ #include #include -#include -#include -#include #include -#include -#include - -#include -#include -#include #include -#include #include -#include #include -#include - #include -#include #include -#include -#include #include #include -#include #include #include -#include #include #include -#include #include #include #include #include -#include //epa test #include #include #include -#include -#include #include #include #include diff --git a/src/GeometryTest/GeometryTest_FairCurveCommands.cxx b/src/GeometryTest/GeometryTest_FairCurveCommands.cxx index 48e7c8a40b..a689277a92 100644 --- a/src/GeometryTest/GeometryTest_FairCurveCommands.cxx +++ b/src/GeometryTest/GeometryTest_FairCurveCommands.cxx @@ -16,17 +16,13 @@ #include -#include #include #include #include -#include -#include #include #include #include -#include //======================================================================= Standard_Boolean IsGoodNumber(Standard_Integer argc, Standard_Integer waiting, Draw_Interpretor& di) //======================================================================= diff --git a/src/GeometryTest/GeometryTest_PolyCommands.cxx b/src/GeometryTest/GeometryTest_PolyCommands.cxx index 9d582b7635..da714fa42a 100644 --- a/src/GeometryTest/GeometryTest_PolyCommands.cxx +++ b/src/GeometryTest/GeometryTest_PolyCommands.cxx @@ -17,8 +17,6 @@ #include #include -#include -#include #include #include #include diff --git a/src/GeometryTest/GeometryTest_SurfaceCommands.cxx b/src/GeometryTest/GeometryTest_SurfaceCommands.cxx index 766031a3eb..b2809ce6fd 100644 --- a/src/GeometryTest/GeometryTest_SurfaceCommands.cxx +++ b/src/GeometryTest/GeometryTest_SurfaceCommands.cxx @@ -26,12 +26,9 @@ #include #include -#include -#include #include #include -#include #include @@ -39,15 +36,6 @@ #include #include -#include -#include -#include -#include -#include -#include -#include -#include - #include #include @@ -58,9 +46,6 @@ #include -#include -#include - #ifdef _MSC_VER #include //#define strcasecmp strcmp Already defined diff --git a/src/GeometryTest/GeometryTest_TestProjCommands.cxx b/src/GeometryTest/GeometryTest_TestProjCommands.cxx index f9bd631f19..dfb09217a3 100644 --- a/src/GeometryTest/GeometryTest_TestProjCommands.cxx +++ b/src/GeometryTest/GeometryTest_TestProjCommands.cxx @@ -14,12 +14,8 @@ // commercial license or contractual agreement. #include -#include -#include -#include #include -#include #include #include #include diff --git a/src/GeomliteTest/GeomliteTest_API2dCommands.cxx b/src/GeomliteTest/GeomliteTest_API2dCommands.cxx index 70799afc2f..46a4b68239 100644 --- a/src/GeomliteTest/GeomliteTest_API2dCommands.cxx +++ b/src/GeomliteTest/GeomliteTest_API2dCommands.cxx @@ -19,7 +19,6 @@ #include #include -#include #include #include #include @@ -33,7 +32,6 @@ #include #include #include -#include #include #include #include diff --git a/src/GeomliteTest/GeomliteTest_ApproxCommands.cxx b/src/GeomliteTest/GeomliteTest_ApproxCommands.cxx index 1d403cca29..c88e2e4c2e 100644 --- a/src/GeomliteTest/GeomliteTest_ApproxCommands.cxx +++ b/src/GeomliteTest/GeomliteTest_ApproxCommands.cxx @@ -24,14 +24,11 @@ #include #include #include -#include #include #include -#include #include #include #include -#include #include #include @@ -43,26 +40,13 @@ #include #include #include -#include -#include -#include -#include -#include - -#include -#include -#include + #include #include #include #include #include #include -#include - -#ifdef _MSC_VER -#include -#endif #ifdef _WIN32 Standard_IMPORT Draw_Viewer dout; diff --git a/src/GeomliteTest/GeomliteTest_CurveCommands.cxx b/src/GeomliteTest/GeomliteTest_CurveCommands.cxx index bf805179cc..578bf3295c 100644 --- a/src/GeomliteTest/GeomliteTest_CurveCommands.cxx +++ b/src/GeomliteTest/GeomliteTest_CurveCommands.cxx @@ -21,8 +21,6 @@ #include #include #include -#include -#include #include #include #include @@ -34,13 +32,7 @@ #include #include -#include - #include -#include -#include -#include -#include #include #include @@ -48,11 +40,9 @@ #include #include #include -#include #include #include -#include #include #include @@ -73,26 +63,13 @@ #include #include -#include -#include - #include #include -#include -#include -#include -#include -#include - -#include #include -#include -#include #include -#include #include #include #include @@ -106,7 +83,6 @@ #include #include -#include #include #include #include diff --git a/src/GeomliteTest/GeomliteTest_ModificationCommands.cxx b/src/GeomliteTest/GeomliteTest_ModificationCommands.cxx index 4b96e552d1..0523f1e93d 100644 --- a/src/GeomliteTest/GeomliteTest_ModificationCommands.cxx +++ b/src/GeomliteTest/GeomliteTest_ModificationCommands.cxx @@ -16,12 +16,10 @@ #include #include -#include #include #include #include -#include #include #include diff --git a/src/GeomliteTest/GeomliteTest_SurfaceCommands.cxx b/src/GeomliteTest/GeomliteTest_SurfaceCommands.cxx index 340554b77e..4becc6f98a 100644 --- a/src/GeomliteTest/GeomliteTest_SurfaceCommands.cxx +++ b/src/GeomliteTest/GeomliteTest_SurfaceCommands.cxx @@ -21,8 +21,6 @@ #include #include -#include -#include #include #include @@ -30,8 +28,6 @@ #include #include #include -#include -#include #include #include #include @@ -40,17 +36,10 @@ #include #include -#include -#include #include #include -#include -#include -#include - -#include #include #include #include @@ -58,7 +47,6 @@ #include #include #include -#include #include #include @@ -77,8 +65,6 @@ #include #include #include -#include -#include #include #include diff --git a/src/Graphic3d/Graphic3d_Aspects.hxx b/src/Graphic3d/Graphic3d_Aspects.hxx index dd2b45df72..c438255cd9 100644 --- a/src/Graphic3d/Graphic3d_Aspects.hxx +++ b/src/Graphic3d/Graphic3d_Aspects.hxx @@ -14,21 +14,17 @@ #ifndef _Graphic3d_Aspects_HeaderFile #define _Graphic3d_Aspects_HeaderFile -#include #include #include #include -#include #include #include -#include #include #include #include #include #include #include -#include #include #include #include diff --git a/src/Graphic3d/Graphic3d_BvhCStructureSetTrsfPers.hxx b/src/Graphic3d/Graphic3d_BvhCStructureSetTrsfPers.hxx index 78a12d799a..8af7ba5e18 100644 --- a/src/Graphic3d/Graphic3d_BvhCStructureSetTrsfPers.hxx +++ b/src/Graphic3d/Graphic3d_BvhCStructureSetTrsfPers.hxx @@ -16,8 +16,6 @@ #ifndef _Graphic3d_BvhCStructureSetTrsfPers_HeaderFile #define _Graphic3d_BvhCStructureSetTrsfPers_HeaderFile -#include -#include #include #include #include diff --git a/src/Graphic3d/Graphic3d_CStructure.cxx b/src/Graphic3d/Graphic3d_CStructure.cxx index cf7b7c6b64..bc9b09ca08 100644 --- a/src/Graphic3d/Graphic3d_CStructure.cxx +++ b/src/Graphic3d/Graphic3d_CStructure.cxx @@ -15,7 +15,6 @@ #include #include -#include #include #include diff --git a/src/Graphic3d/Graphic3d_CStructure.hxx b/src/Graphic3d/Graphic3d_CStructure.hxx index 8c37f5172d..8138cd165f 100644 --- a/src/Graphic3d/Graphic3d_CStructure.hxx +++ b/src/Graphic3d/Graphic3d_CStructure.hxx @@ -15,15 +15,12 @@ #ifndef _Graphic3d_CStructure_HeaderFile #define _Graphic3d_CStructure_HeaderFile -#include #include -#include #include #include #include #include #include -#include #include #include #include diff --git a/src/Graphic3d/Graphic3d_CView.hxx b/src/Graphic3d/Graphic3d_CView.hxx index fe29afeb38..ac687ce8f4 100644 --- a/src/Graphic3d/Graphic3d_CView.hxx +++ b/src/Graphic3d/Graphic3d_CView.hxx @@ -14,25 +14,18 @@ #ifndef _Graphic3d_CView_HeaderFile #define _Graphic3d_CView_HeaderFile -#include #include #include #include #include -#include #include -#include -#include #include #include #include -#include #include #include -#include #include #include -#include #include #include #include @@ -43,7 +36,6 @@ #include #include #include -#include #include #include #include diff --git a/src/Graphic3d/Graphic3d_ClipPlane.hxx b/src/Graphic3d/Graphic3d_ClipPlane.hxx index 5d168aaf30..b678862be0 100755 --- a/src/Graphic3d/Graphic3d_ClipPlane.hxx +++ b/src/Graphic3d/Graphic3d_ClipPlane.hxx @@ -16,7 +16,6 @@ #ifndef _Graphic3d_ClipPlane_HeaderFile #define _Graphic3d_ClipPlane_HeaderFile -#include #include #include #include diff --git a/src/Graphic3d/Graphic3d_DisplayPriority.hxx b/src/Graphic3d/Graphic3d_DisplayPriority.hxx index 81015503b8..b832b5b73f 100644 --- a/src/Graphic3d/Graphic3d_DisplayPriority.hxx +++ b/src/Graphic3d/Graphic3d_DisplayPriority.hxx @@ -15,8 +15,6 @@ #ifndef _Graphic3d_DisplayPriority_HeaderFile #define _Graphic3d_DisplayPriority_HeaderFile -#include - //! Structure priority - range (do not change this range!). //! Values are between 0 and 10, with 5 used by default. //! A structure of priority 10 is displayed the last and appears over the others (considering depth test). diff --git a/src/Graphic3d/Graphic3d_GraduatedTrihedron.hxx b/src/Graphic3d/Graphic3d_GraduatedTrihedron.hxx index 9cbe30c285..3a0a626495 100644 --- a/src/Graphic3d/Graphic3d_GraduatedTrihedron.hxx +++ b/src/Graphic3d/Graphic3d_GraduatedTrihedron.hxx @@ -19,7 +19,6 @@ #include #include #include -#include #include #include #include diff --git a/src/Graphic3d/Graphic3d_GraphicDriver.hxx b/src/Graphic3d/Graphic3d_GraphicDriver.hxx index 2d3aa21bde..4d4ff77134 100644 --- a/src/Graphic3d/Graphic3d_GraphicDriver.hxx +++ b/src/Graphic3d/Graphic3d_GraphicDriver.hxx @@ -18,13 +18,10 @@ #define _Graphic3d_GraphicDriver_HeaderFile #include -#include #include #include #include #include -#include -#include #include class Aspect_DisplayConnection; diff --git a/src/Graphic3d/Graphic3d_Group.cxx b/src/Graphic3d/Graphic3d_Group.cxx index 7b5cf7bf70..a6884572d0 100644 --- a/src/Graphic3d/Graphic3d_Group.cxx +++ b/src/Graphic3d/Graphic3d_Group.cxx @@ -19,20 +19,9 @@ #include #include #include -#include -#include -#include -#include -#include #include -#include -#include #include #include -#include -#include -#include -#include #include #include #include diff --git a/src/Graphic3d/Graphic3d_Group.hxx b/src/Graphic3d/Graphic3d_Group.hxx index 47db10e404..eb9aca4f98 100644 --- a/src/Graphic3d/Graphic3d_Group.hxx +++ b/src/Graphic3d/Graphic3d_Group.hxx @@ -18,10 +18,7 @@ #define _Graphic3d_Group_HeaderFile #include -#include #include -#include -#include #include #include #include diff --git a/src/Graphic3d/Graphic3d_Layer.hxx b/src/Graphic3d/Graphic3d_Layer.hxx index 7a480075b7..c73419b977 100644 --- a/src/Graphic3d/Graphic3d_Layer.hxx +++ b/src/Graphic3d/Graphic3d_Layer.hxx @@ -17,13 +17,11 @@ #include #include #include -#include #include #include #include #include #include -#include #include diff --git a/src/Graphic3d/Graphic3d_LightSet.hxx b/src/Graphic3d/Graphic3d_LightSet.hxx index e853ee056d..584cb4c3fd 100644 --- a/src/Graphic3d/Graphic3d_LightSet.hxx +++ b/src/Graphic3d/Graphic3d_LightSet.hxx @@ -14,7 +14,6 @@ #ifndef _Graphic3d_LightSet_HeaderFile #define _Graphic3d_LightSet_HeaderFile -#include #include //! Class defining the set of light sources. diff --git a/src/Graphic3d/Graphic3d_MapOfAspectsToAspects.hxx b/src/Graphic3d/Graphic3d_MapOfAspectsToAspects.hxx index d0a8e967b2..d6692d6278 100644 --- a/src/Graphic3d/Graphic3d_MapOfAspectsToAspects.hxx +++ b/src/Graphic3d/Graphic3d_MapOfAspectsToAspects.hxx @@ -15,7 +15,6 @@ #define _Graphic3d_MapOfAspectsToAspects_Header #include -#include class Graphic3d_Aspects; typedef NCollection_DataMap Graphic3d_MapOfAspectsToAspects; diff --git a/src/Graphic3d/Graphic3d_MaterialAspect.cxx b/src/Graphic3d/Graphic3d_MaterialAspect.cxx index 7bb778bd93..b04be8d98b 100644 --- a/src/Graphic3d/Graphic3d_MaterialAspect.cxx +++ b/src/Graphic3d/Graphic3d_MaterialAspect.cxx @@ -15,7 +15,6 @@ #include #include -#include #include namespace diff --git a/src/Graphic3d/Graphic3d_MediaTexture.hxx b/src/Graphic3d/Graphic3d_MediaTexture.hxx index 8fb1ecb365..a1e77e52f8 100644 --- a/src/Graphic3d/Graphic3d_MediaTexture.hxx +++ b/src/Graphic3d/Graphic3d_MediaTexture.hxx @@ -16,8 +16,6 @@ #define _Graphic3d_MediaTexture_HeaderFile #include -#include -#include #include class Media_Frame; diff --git a/src/Graphic3d/Graphic3d_PBRMaterial.hxx b/src/Graphic3d/Graphic3d_PBRMaterial.hxx index ceba0add61..ea91abeecd 100644 --- a/src/Graphic3d/Graphic3d_PBRMaterial.hxx +++ b/src/Graphic3d/Graphic3d_PBRMaterial.hxx @@ -19,7 +19,6 @@ #include #include #include -#include #include //! Class implementing Metallic-Roughness physically based material definition diff --git a/src/Graphic3d/Graphic3d_RenderingParams.hxx b/src/Graphic3d/Graphic3d_RenderingParams.hxx index e299663032..d0ce9217c2 100644 --- a/src/Graphic3d/Graphic3d_RenderingParams.hxx +++ b/src/Graphic3d/Graphic3d_RenderingParams.hxx @@ -17,6 +17,7 @@ #define _Graphic3d_RenderingParams_HeaderFile #include +#include #include #include #include diff --git a/src/Graphic3d/Graphic3d_SequenceOfHClipPlane.hxx b/src/Graphic3d/Graphic3d_SequenceOfHClipPlane.hxx index 16bab8d1fd..4da27478cb 100755 --- a/src/Graphic3d/Graphic3d_SequenceOfHClipPlane.hxx +++ b/src/Graphic3d/Graphic3d_SequenceOfHClipPlane.hxx @@ -16,7 +16,6 @@ #ifndef _Graphic3d_SequenceOfHClipPlane_HeaderFile #define _Graphic3d_SequenceOfHClipPlane_HeaderFile -#include #include //! Class defines a Clipping Volume as a logical OR (disjunction) operation between Graphic3d_ClipPlane in sequence. diff --git a/src/Graphic3d/Graphic3d_ShaderManager.cxx b/src/Graphic3d/Graphic3d_ShaderManager.cxx index b78d99a00d..9edd8e1443 100644 --- a/src/Graphic3d/Graphic3d_ShaderManager.cxx +++ b/src/Graphic3d/Graphic3d_ShaderManager.cxx @@ -15,6 +15,7 @@ #include #include +#include #include #include "../Shaders/Shaders_DirectionalLightShadow_glsl.pxx" diff --git a/src/Graphic3d/Graphic3d_ShaderProgram.cxx b/src/Graphic3d/Graphic3d_ShaderProgram.cxx index 8fac2414a8..c4575849f4 100755 --- a/src/Graphic3d/Graphic3d_ShaderProgram.cxx +++ b/src/Graphic3d/Graphic3d_ShaderProgram.cxx @@ -17,6 +17,7 @@ #include #include +#include #include #include #include diff --git a/src/Graphic3d/Graphic3d_ShaderProgram.hxx b/src/Graphic3d/Graphic3d_ShaderProgram.hxx index baf36dd283..5432d1eb8c 100755 --- a/src/Graphic3d/Graphic3d_ShaderProgram.hxx +++ b/src/Graphic3d/Graphic3d_ShaderProgram.hxx @@ -21,7 +21,6 @@ #include #include #include -#include #include //! List of shader objects. diff --git a/src/Graphic3d/Graphic3d_ShaderVariable.cxx b/src/Graphic3d/Graphic3d_ShaderVariable.cxx index 7d1e77d754..f76f6649ca 100755 --- a/src/Graphic3d/Graphic3d_ShaderVariable.cxx +++ b/src/Graphic3d/Graphic3d_ShaderVariable.cxx @@ -13,8 +13,6 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -#include - #include diff --git a/src/Graphic3d/Graphic3d_Structure.cxx b/src/Graphic3d/Graphic3d_Structure.cxx index 92b56ada60..eace8db06f 100644 --- a/src/Graphic3d/Graphic3d_Structure.cxx +++ b/src/Graphic3d/Graphic3d_Structure.cxx @@ -17,15 +17,12 @@ #include #include -#include #include #include -#include #include #include #include #include -#include #include diff --git a/src/Graphic3d/Graphic3d_Structure.hxx b/src/Graphic3d/Graphic3d_Structure.hxx index 905628df50..026e28c59c 100644 --- a/src/Graphic3d/Graphic3d_Structure.hxx +++ b/src/Graphic3d/Graphic3d_Structure.hxx @@ -17,8 +17,6 @@ #ifndef _Graphic3d_Structure_HeaderFile #define _Graphic3d_Structure_HeaderFile -#include -#include #include #include #include @@ -26,7 +24,6 @@ #include #include #include -#include #include #include diff --git a/src/Graphic3d/Graphic3d_StructureManager.hxx b/src/Graphic3d/Graphic3d_StructureManager.hxx index 906abfef5b..e1dd1452ac 100644 --- a/src/Graphic3d/Graphic3d_StructureManager.hxx +++ b/src/Graphic3d/Graphic3d_StructureManager.hxx @@ -18,7 +18,6 @@ #define _Graphic3d_StructureManager_HeaderFile #include -#include #include #include #include @@ -28,7 +27,6 @@ #include #include #include -#include #include #include #include diff --git a/src/Graphic3d/Graphic3d_Texture1D.hxx b/src/Graphic3d/Graphic3d_Texture1D.hxx index fb95a81bcf..3ed305383e 100644 --- a/src/Graphic3d/Graphic3d_Texture1D.hxx +++ b/src/Graphic3d/Graphic3d_Texture1D.hxx @@ -18,7 +18,6 @@ #define _Graphic3d_Texture1D_HeaderFile #include -#include #include #include diff --git a/src/Graphic3d/Graphic3d_Texture1Dsegment.hxx b/src/Graphic3d/Graphic3d_Texture1Dsegment.hxx index bc47bffe70..eb9ffdb487 100644 --- a/src/Graphic3d/Graphic3d_Texture1Dsegment.hxx +++ b/src/Graphic3d/Graphic3d_Texture1Dsegment.hxx @@ -18,9 +18,7 @@ #define _Graphic3d_Texture1Dsegment_HeaderFile #include -#include -#include #include #include class TCollection_AsciiString; diff --git a/src/Graphic3d/Graphic3d_Texture2Dplane.hxx b/src/Graphic3d/Graphic3d_Texture2Dplane.hxx index bef96ac7a3..65d6847b83 100644 --- a/src/Graphic3d/Graphic3d_Texture2Dplane.hxx +++ b/src/Graphic3d/Graphic3d_Texture2Dplane.hxx @@ -18,12 +18,10 @@ #define _Graphic3d_Texture2Dplane_HeaderFile #include -#include #include #include #include -#include class TCollection_AsciiString; diff --git a/src/Graphic3d/Graphic3d_TextureEnv.hxx b/src/Graphic3d/Graphic3d_TextureEnv.hxx index b55e320f23..06c8f5885c 100644 --- a/src/Graphic3d/Graphic3d_TextureEnv.hxx +++ b/src/Graphic3d/Graphic3d_TextureEnv.hxx @@ -18,7 +18,6 @@ #define _Graphic3d_TextureEnv_HeaderFile #include -#include #include #include diff --git a/src/Graphic3d/Graphic3d_TextureParams.hxx b/src/Graphic3d/Graphic3d_TextureParams.hxx index 672275bf0e..e31d1ccbd3 100644 --- a/src/Graphic3d/Graphic3d_TextureParams.hxx +++ b/src/Graphic3d/Graphic3d_TextureParams.hxx @@ -21,7 +21,6 @@ #include #include #include -#include #include #include #include diff --git a/src/Graphic3d/Graphic3d_TextureRoot.cxx b/src/Graphic3d/Graphic3d_TextureRoot.cxx index 3595871c03..e488e06c2b 100644 --- a/src/Graphic3d/Graphic3d_TextureRoot.cxx +++ b/src/Graphic3d/Graphic3d_TextureRoot.cxx @@ -25,7 +25,6 @@ #include #include #include -#include #include IMPLEMENT_STANDARD_RTTIEXT(Graphic3d_TextureRoot, Standard_Transient) diff --git a/src/Graphic3d/Graphic3d_TransformPers.hxx b/src/Graphic3d/Graphic3d_TransformPers.hxx index ed60b613d9..e0db73b4e8 100644 --- a/src/Graphic3d/Graphic3d_TransformPers.hxx +++ b/src/Graphic3d/Graphic3d_TransformPers.hxx @@ -17,7 +17,6 @@ #define _Graphic3d_TransformPers_HeaderFile #include -#include #include #include #include diff --git a/src/Graphic3d/Graphic3d_TransformUtils.hxx b/src/Graphic3d/Graphic3d_TransformUtils.hxx index 68b829a1d5..470f505519 100644 --- a/src/Graphic3d/Graphic3d_TransformUtils.hxx +++ b/src/Graphic3d/Graphic3d_TransformUtils.hxx @@ -17,7 +17,6 @@ #include #include -#include // M_PI //! Helper class that implements transformation matrix functionality. namespace Graphic3d_TransformUtils diff --git a/src/Graphic3d/Graphic3d_Vertex.hxx b/src/Graphic3d/Graphic3d_Vertex.hxx index 09c92d9d4b..e30326f981 100644 --- a/src/Graphic3d/Graphic3d_Vertex.hxx +++ b/src/Graphic3d/Graphic3d_Vertex.hxx @@ -20,7 +20,6 @@ #include #include #include -#include #include //! This class represents a graphical 3D point. diff --git a/src/HLRAlgo/HLRAlgo_BiPoint.hxx b/src/HLRAlgo/HLRAlgo_BiPoint.hxx index a340d9038a..58a13760fd 100644 --- a/src/HLRAlgo/HLRAlgo_BiPoint.hxx +++ b/src/HLRAlgo/HLRAlgo_BiPoint.hxx @@ -21,7 +21,6 @@ #include #include -#include #include #include #include diff --git a/src/HLRAlgo/HLRAlgo_Coincidence.hxx b/src/HLRAlgo/HLRAlgo_Coincidence.hxx index 246f53863f..b6e1fc3a9c 100644 --- a/src/HLRAlgo/HLRAlgo_Coincidence.hxx +++ b/src/HLRAlgo/HLRAlgo_Coincidence.hxx @@ -19,10 +19,8 @@ #include #include -#include #include -#include #include //! The Coincidence class is used in an Inteference to diff --git a/src/HLRAlgo/HLRAlgo_EdgeIterator.hxx b/src/HLRAlgo/HLRAlgo_EdgeIterator.hxx index dd3232987d..0ef402a83b 100644 --- a/src/HLRAlgo/HLRAlgo_EdgeIterator.hxx +++ b/src/HLRAlgo/HLRAlgo_EdgeIterator.hxx @@ -21,10 +21,6 @@ #include #include -#include -#include -#include -#include class HLRAlgo_EdgeStatus; diff --git a/src/HLRAlgo/HLRAlgo_EdgeStatus.cxx b/src/HLRAlgo/HLRAlgo_EdgeStatus.cxx index d6feb9319f..c5a6e447b4 100644 --- a/src/HLRAlgo/HLRAlgo_EdgeStatus.cxx +++ b/src/HLRAlgo/HLRAlgo_EdgeStatus.cxx @@ -20,7 +20,6 @@ #include -#include //======================================================================= //function : HLRAlgo_EdgeStatus diff --git a/src/HLRAlgo/HLRAlgo_EdgeStatus.hxx b/src/HLRAlgo/HLRAlgo_EdgeStatus.hxx index b3b725f158..065b3ebc8f 100644 --- a/src/HLRAlgo/HLRAlgo_EdgeStatus.hxx +++ b/src/HLRAlgo/HLRAlgo_EdgeStatus.hxx @@ -21,11 +21,7 @@ #include #include -#include -#include -#include #include -#include //! This class describes the Hidden Line status of an diff --git a/src/HLRAlgo/HLRAlgo_EdgesBlock.hxx b/src/HLRAlgo/HLRAlgo_EdgesBlock.hxx index 24cc56c10d..ad41eb8e19 100644 --- a/src/HLRAlgo/HLRAlgo_EdgesBlock.hxx +++ b/src/HLRAlgo/HLRAlgo_EdgesBlock.hxx @@ -25,7 +25,6 @@ #include #include #include -#include class HLRAlgo_EdgesBlock; diff --git a/src/HLRAlgo/HLRAlgo_HArray1OfPHDat.hxx b/src/HLRAlgo/HLRAlgo_HArray1OfPHDat.hxx index 9562583a4b..45ad1f2147 100644 --- a/src/HLRAlgo/HLRAlgo_HArray1OfPHDat.hxx +++ b/src/HLRAlgo/HLRAlgo_HArray1OfPHDat.hxx @@ -17,7 +17,6 @@ #ifndef HLRAlgo_HArray1OfPHDat_HeaderFile #define HLRAlgo_HArray1OfPHDat_HeaderFile -#include #include #include diff --git a/src/HLRAlgo/HLRAlgo_HArray1OfPINod.hxx b/src/HLRAlgo/HLRAlgo_HArray1OfPINod.hxx index 5d4c418648..1865bfbf5b 100644 --- a/src/HLRAlgo/HLRAlgo_HArray1OfPINod.hxx +++ b/src/HLRAlgo/HLRAlgo_HArray1OfPINod.hxx @@ -17,7 +17,6 @@ #ifndef HLRAlgo_HArray1OfPINod_HeaderFile #define HLRAlgo_HArray1OfPINod_HeaderFile -#include #include #include diff --git a/src/HLRAlgo/HLRAlgo_HArray1OfPISeg.hxx b/src/HLRAlgo/HLRAlgo_HArray1OfPISeg.hxx index 54ab83de36..1472b17191 100644 --- a/src/HLRAlgo/HLRAlgo_HArray1OfPISeg.hxx +++ b/src/HLRAlgo/HLRAlgo_HArray1OfPISeg.hxx @@ -17,7 +17,6 @@ #ifndef HLRAlgo_HArray1OfPISeg_HeaderFile #define HLRAlgo_HArray1OfPISeg_HeaderFile -#include #include #include diff --git a/src/HLRAlgo/HLRAlgo_HArray1OfTData.hxx b/src/HLRAlgo/HLRAlgo_HArray1OfTData.hxx index c3a9689061..64d73f3baf 100644 --- a/src/HLRAlgo/HLRAlgo_HArray1OfTData.hxx +++ b/src/HLRAlgo/HLRAlgo_HArray1OfTData.hxx @@ -17,7 +17,6 @@ #ifndef HLRAlgo_HArray1OfTData_HeaderFile #define HLRAlgo_HArray1OfTData_HeaderFile -#include #include #include diff --git a/src/HLRAlgo/HLRAlgo_Interference.hxx b/src/HLRAlgo/HLRAlgo_Interference.hxx index 2ca06765c4..f2df941fc3 100644 --- a/src/HLRAlgo/HLRAlgo_Interference.hxx +++ b/src/HLRAlgo/HLRAlgo_Interference.hxx @@ -19,7 +19,6 @@ #include #include -#include #include #include diff --git a/src/HLRAlgo/HLRAlgo_Intersection.hxx b/src/HLRAlgo/HLRAlgo_Intersection.hxx index d6a71bb172..6a3b2eea8f 100644 --- a/src/HLRAlgo/HLRAlgo_Intersection.hxx +++ b/src/HLRAlgo/HLRAlgo_Intersection.hxx @@ -22,8 +22,6 @@ #include #include -#include -#include #include #include diff --git a/src/HLRAlgo/HLRAlgo_PolyAlgo.hxx b/src/HLRAlgo/HLRAlgo_PolyAlgo.hxx index 583027c5eb..b858e2eb37 100644 --- a/src/HLRAlgo/HLRAlgo_PolyAlgo.hxx +++ b/src/HLRAlgo/HLRAlgo_PolyAlgo.hxx @@ -17,7 +17,6 @@ #ifndef _HLRAlgo_PolyAlgo_HeaderFile #define _HLRAlgo_PolyAlgo_HeaderFile -#include #include #include diff --git a/src/HLRAlgo/HLRAlgo_PolyData.hxx b/src/HLRAlgo/HLRAlgo_PolyData.hxx index bfcc6fa5be..ef4f3a46fb 100644 --- a/src/HLRAlgo/HLRAlgo_PolyData.hxx +++ b/src/HLRAlgo/HLRAlgo_PolyData.hxx @@ -26,9 +26,6 @@ #include #include #include -#include -#include -#include #include class HLRAlgo_EdgeStatus; diff --git a/src/HLRAlgo/HLRAlgo_PolyHidingData.hxx b/src/HLRAlgo/HLRAlgo_PolyHidingData.hxx index 1a03ef49af..65b06b060b 100644 --- a/src/HLRAlgo/HLRAlgo_PolyHidingData.hxx +++ b/src/HLRAlgo/HLRAlgo_PolyHidingData.hxx @@ -19,10 +19,8 @@ #include #include -#include #include -#include //! Data structure of a set of Hiding Triangles. diff --git a/src/HLRAlgo/HLRAlgo_PolyInternalData.hxx b/src/HLRAlgo/HLRAlgo_PolyInternalData.hxx index 5840b3f3b7..c1942d8610 100644 --- a/src/HLRAlgo/HLRAlgo_PolyInternalData.hxx +++ b/src/HLRAlgo/HLRAlgo_PolyInternalData.hxx @@ -18,18 +18,12 @@ #define _HLRAlgo_PolyInternalData_HeaderFile #include -#include - #include -#include #include #include #include #include -#include -#include -#include -#include +#include class HLRAlgo_PolyInternalData; diff --git a/src/HLRAlgo/HLRAlgo_PolyInternalNode.hxx b/src/HLRAlgo/HLRAlgo_PolyInternalNode.hxx index 024ab84589..33d8979f30 100644 --- a/src/HLRAlgo/HLRAlgo_PolyInternalNode.hxx +++ b/src/HLRAlgo/HLRAlgo_PolyInternalNode.hxx @@ -18,7 +18,6 @@ #define _HLRAlgo_PolyInternalNode_HeaderFile #include -#include #include #include diff --git a/src/HLRAlgo/HLRAlgo_PolyInternalSegment.hxx b/src/HLRAlgo/HLRAlgo_PolyInternalSegment.hxx index 1e648fab01..4f44fe7859 100644 --- a/src/HLRAlgo/HLRAlgo_PolyInternalSegment.hxx +++ b/src/HLRAlgo/HLRAlgo_PolyInternalSegment.hxx @@ -19,7 +19,6 @@ #include #include -#include #include diff --git a/src/HLRAlgo/HLRAlgo_PolyShellData.hxx b/src/HLRAlgo/HLRAlgo_PolyShellData.hxx index ca5c031656..04bcf21adc 100644 --- a/src/HLRAlgo/HLRAlgo_PolyShellData.hxx +++ b/src/HLRAlgo/HLRAlgo_PolyShellData.hxx @@ -17,7 +17,6 @@ #ifndef _HLRAlgo_PolyShellData_HeaderFile #define _HLRAlgo_PolyShellData_HeaderFile -#include #include #include #include diff --git a/src/HLRAlgo/HLRAlgo_Projector.cxx b/src/HLRAlgo/HLRAlgo_Projector.cxx index d51bff6f1f..e787c701a6 100644 --- a/src/HLRAlgo/HLRAlgo_Projector.cxx +++ b/src/HLRAlgo/HLRAlgo_Projector.cxx @@ -19,7 +19,6 @@ #endif -#include #include #include #include @@ -29,7 +28,6 @@ #include #include #include -#include // formula for derivating a perspective, from Mathematica // X'[t] X[t] Z'[t] diff --git a/src/HLRAlgo/HLRAlgo_Projector.hxx b/src/HLRAlgo/HLRAlgo_Projector.hxx index 20a3d96a81..baec03ebba 100644 --- a/src/HLRAlgo/HLRAlgo_Projector.hxx +++ b/src/HLRAlgo/HLRAlgo_Projector.hxx @@ -19,11 +19,8 @@ #include #include -#include #include -#include -#include #include #include class gp_Ax2; diff --git a/src/HLRAlgo/HLRAlgo_TriangleData.hxx b/src/HLRAlgo/HLRAlgo_TriangleData.hxx index d2e88ae81e..94e2eb05e4 100644 --- a/src/HLRAlgo/HLRAlgo_TriangleData.hxx +++ b/src/HLRAlgo/HLRAlgo_TriangleData.hxx @@ -19,7 +19,6 @@ #include #include -#include #include diff --git a/src/HLRAppli/HLRAppli_ReflectLines.cxx b/src/HLRAppli/HLRAppli_ReflectLines.cxx index b63708e2d4..de98a22477 100644 --- a/src/HLRAppli/HLRAppli_ReflectLines.cxx +++ b/src/HLRAppli/HLRAppli_ReflectLines.cxx @@ -17,7 +17,6 @@ #include #include #include -#include #include #include diff --git a/src/HLRBRep/HLRBRep_Algo.hxx b/src/HLRBRep/HLRBRep_Algo.hxx index 99532cfd98..e7fcc60e8c 100644 --- a/src/HLRBRep/HLRBRep_Algo.hxx +++ b/src/HLRBRep/HLRBRep_Algo.hxx @@ -18,7 +18,6 @@ #define _HLRBRep_Algo_HeaderFile #include -#include #include #include diff --git a/src/HLRBRep/HLRBRep_AreaLimit.hxx b/src/HLRBRep/HLRBRep_AreaLimit.hxx index b4f73e0038..f33bde03c9 100644 --- a/src/HLRBRep/HLRBRep_AreaLimit.hxx +++ b/src/HLRBRep/HLRBRep_AreaLimit.hxx @@ -21,7 +21,6 @@ #include #include -#include #include #include diff --git a/src/HLRBRep/HLRBRep_BCurveTool.cxx b/src/HLRBRep/HLRBRep_BCurveTool.cxx index 69b8397ebd..c00ed13cab 100644 --- a/src/HLRBRep/HLRBRep_BCurveTool.cxx +++ b/src/HLRBRep/HLRBRep_BCurveTool.cxx @@ -15,17 +15,9 @@ // commercial license or contractual agreement. -#include #include #include -#include -#include -#include -#include #include -#include -#include -#include #include #include diff --git a/src/HLRBRep/HLRBRep_BCurveTool.hxx b/src/HLRBRep/HLRBRep_BCurveTool.hxx index a0302c1c62..e460e74fa6 100644 --- a/src/HLRBRep/HLRBRep_BCurveTool.hxx +++ b/src/HLRBRep/HLRBRep_BCurveTool.hxx @@ -21,11 +21,9 @@ #include #include -#include #include #include #include -#include #include #include #include diff --git a/src/HLRBRep/HLRBRep_BSurfaceTool.cxx b/src/HLRBRep/HLRBRep_BSurfaceTool.cxx index 8575c7d497..e4db3314e0 100644 --- a/src/HLRBRep/HLRBRep_BSurfaceTool.cxx +++ b/src/HLRBRep/HLRBRep_BSurfaceTool.cxx @@ -15,15 +15,7 @@ #include -#include -#include #include -#include -#include -#include -#include -#include -#include //======================================================================= //function : NbSamplesU diff --git a/src/HLRBRep/HLRBRep_BiPnt2D.hxx b/src/HLRBRep/HLRBRep_BiPnt2D.hxx index 502265c4ae..48e43d5874 100644 --- a/src/HLRBRep/HLRBRep_BiPnt2D.hxx +++ b/src/HLRBRep/HLRBRep_BiPnt2D.hxx @@ -19,12 +19,9 @@ #include #include -#include #include #include -#include -#include //! Contains the colors of a shape. class HLRBRep_BiPnt2D diff --git a/src/HLRBRep/HLRBRep_BiPoint.hxx b/src/HLRBRep/HLRBRep_BiPoint.hxx index 909994f1f0..8ea065c8df 100644 --- a/src/HLRBRep/HLRBRep_BiPoint.hxx +++ b/src/HLRBRep/HLRBRep_BiPoint.hxx @@ -19,12 +19,9 @@ #include #include -#include #include #include -#include -#include class TopoDS_Shape; class gp_Pnt; diff --git a/src/HLRBRep/HLRBRep_CInter.hxx b/src/HLRBRep/HLRBRep_CInter.hxx index 77003b6d3d..891e299c01 100644 --- a/src/HLRBRep/HLRBRep_CInter.hxx +++ b/src/HLRBRep/HLRBRep_CInter.hxx @@ -19,15 +19,11 @@ #include #include -#include -#include #include #include #include #include -#include -#include #include #include class Standard_ConstructionError; diff --git a/src/HLRBRep/HLRBRep_CLProps.hxx b/src/HLRBRep/HLRBRep_CLProps.hxx index f2d27253cb..156984020b 100644 --- a/src/HLRBRep/HLRBRep_CLProps.hxx +++ b/src/HLRBRep/HLRBRep_CLProps.hxx @@ -19,15 +19,12 @@ #include #include -#include -#include #include #include #include #include #include -#include class LProp_BadContinuity; class Standard_DomainError; class Standard_OutOfRange; diff --git a/src/HLRBRep/HLRBRep_CLPropsATool.hxx b/src/HLRBRep/HLRBRep_CLPropsATool.hxx index 979eb71498..fef5155370 100644 --- a/src/HLRBRep/HLRBRep_CLPropsATool.hxx +++ b/src/HLRBRep/HLRBRep_CLPropsATool.hxx @@ -22,7 +22,6 @@ #include #include -#include class gp_Pnt2d; class gp_Vec2d; diff --git a/src/HLRBRep/HLRBRep_Curve.cxx b/src/HLRBRep/HLRBRep_Curve.cxx index 34fdf31259..ab1869b36f 100644 --- a/src/HLRBRep/HLRBRep_Curve.cxx +++ b/src/HLRBRep/HLRBRep_Curve.cxx @@ -15,18 +15,10 @@ // commercial license or contractual agreement. -#include #include #include #include -#include -#include #include -#include -#include -#include -#include -#include #include #include #include @@ -38,8 +30,6 @@ #include #include #include -#include -#include #include #include #include diff --git a/src/HLRBRep/HLRBRep_Curve.hxx b/src/HLRBRep/HLRBRep_Curve.hxx index e347b50f4b..81d7a19b22 100644 --- a/src/HLRBRep/HLRBRep_Curve.hxx +++ b/src/HLRBRep/HLRBRep_Curve.hxx @@ -17,21 +17,18 @@ #ifndef _HLRBRep_Curve_HeaderFile #define _HLRBRep_Curve_HeaderFile +#include +#include +#include +#include #include #include #include - -#include -#include -#include -#include -#include -#include #include -#include -#include #include #include +#include + class TopoDS_Edge; class gp_Pnt; class gp_Vec; diff --git a/src/HLRBRep/HLRBRep_CurveTool.cxx b/src/HLRBRep/HLRBRep_CurveTool.cxx index 49706e1cfc..f3ead85f3e 100644 --- a/src/HLRBRep/HLRBRep_CurveTool.cxx +++ b/src/HLRBRep/HLRBRep_CurveTool.cxx @@ -15,18 +15,7 @@ // commercial license or contractual agreement. -#include -#include -#include -#include -#include -#include -#include #include -#include -#include -#include -#include //======================================================================= //function : NbSamples diff --git a/src/HLRBRep/HLRBRep_CurveTool.hxx b/src/HLRBRep/HLRBRep_CurveTool.hxx index b39d051658..147b8659d8 100644 --- a/src/HLRBRep/HLRBRep_CurveTool.hxx +++ b/src/HLRBRep/HLRBRep_CurveTool.hxx @@ -27,8 +27,6 @@ #include #include #include -#include -#include #include #include #include diff --git a/src/HLRBRep/HLRBRep_EdgeBuilder.hxx b/src/HLRBRep/HLRBRep_EdgeBuilder.hxx index d9463dae4a..2ebcec31d2 100644 --- a/src/HLRBRep/HLRBRep_EdgeBuilder.hxx +++ b/src/HLRBRep/HLRBRep_EdgeBuilder.hxx @@ -23,7 +23,6 @@ #include #include -#include #include class HLRBRep_AreaLimit; class HLRBRep_VertexList; diff --git a/src/HLRBRep/HLRBRep_EdgeData.cxx b/src/HLRBRep/HLRBRep_EdgeData.cxx index da7d9f4cc4..192fa61c1a 100644 --- a/src/HLRBRep/HLRBRep_EdgeData.cxx +++ b/src/HLRBRep/HLRBRep_EdgeData.cxx @@ -16,8 +16,6 @@ #include -#include -#include #include #include diff --git a/src/HLRBRep/HLRBRep_EdgeData.hxx b/src/HLRBRep/HLRBRep_EdgeData.hxx index 7e02f72ff5..4153a6c963 100644 --- a/src/HLRBRep/HLRBRep_EdgeData.hxx +++ b/src/HLRBRep/HLRBRep_EdgeData.hxx @@ -21,14 +21,10 @@ #include #include -#include -#include #include #include #include -#include -#include class TopoDS_Edge; // resolve name collisions with X11 headers diff --git a/src/HLRBRep/HLRBRep_EdgeFaceTool.cxx b/src/HLRBRep/HLRBRep_EdgeFaceTool.cxx index f589eedd45..a2984bcc3e 100644 --- a/src/HLRBRep/HLRBRep_EdgeFaceTool.cxx +++ b/src/HLRBRep/HLRBRep_EdgeFaceTool.cxx @@ -21,7 +21,6 @@ #include #include #include -#include #include #include #include diff --git a/src/HLRBRep/HLRBRep_EdgeFaceTool.hxx b/src/HLRBRep/HLRBRep_EdgeFaceTool.hxx index ada1c999b1..cd7feae0d1 100644 --- a/src/HLRBRep/HLRBRep_EdgeFaceTool.hxx +++ b/src/HLRBRep/HLRBRep_EdgeFaceTool.hxx @@ -19,11 +19,8 @@ #include #include -#include -#include #include -#include class gp_Dir; diff --git a/src/HLRBRep/HLRBRep_EdgeIList.cxx b/src/HLRBRep/HLRBRep_EdgeIList.cxx index c539b7dfc7..b416ea7fe1 100644 --- a/src/HLRBRep/HLRBRep_EdgeIList.cxx +++ b/src/HLRBRep/HLRBRep_EdgeIList.cxx @@ -19,8 +19,6 @@ #endif -#include -#include #include #include #include diff --git a/src/HLRBRep/HLRBRep_EdgeInterferenceTool.cxx b/src/HLRBRep/HLRBRep_EdgeInterferenceTool.cxx index b6c8a43963..f888d8a4f4 100644 --- a/src/HLRBRep/HLRBRep_EdgeInterferenceTool.cxx +++ b/src/HLRBRep/HLRBRep_EdgeInterferenceTool.cxx @@ -19,9 +19,6 @@ #endif -#include -#include -#include #include #include diff --git a/src/HLRBRep/HLRBRep_EdgeInterferenceTool.hxx b/src/HLRBRep/HLRBRep_EdgeInterferenceTool.hxx index 8fd7a962b6..7633bcbed8 100644 --- a/src/HLRBRep/HLRBRep_EdgeInterferenceTool.hxx +++ b/src/HLRBRep/HLRBRep_EdgeInterferenceTool.hxx @@ -23,9 +23,7 @@ #include #include -#include #include -#include class HLRBRep_Data; class gp_Dir; class HLRAlgo_Interference; diff --git a/src/HLRBRep/HLRBRep_ExactIntersectionPointOfTheIntPCurvePCurveOfCInter.hxx b/src/HLRBRep/HLRBRep_ExactIntersectionPointOfTheIntPCurvePCurveOfCInter.hxx index 87224a53cd..c345d67071 100644 --- a/src/HLRBRep/HLRBRep_ExactIntersectionPointOfTheIntPCurvePCurveOfCInter.hxx +++ b/src/HLRBRep/HLRBRep_ExactIntersectionPointOfTheIntPCurvePCurveOfCInter.hxx @@ -22,11 +22,8 @@ #include #include -#include -#include #include #include -#include class HLRBRep_CurveTool; class HLRBRep_TheProjPCurOfCInter; class HLRBRep_TheIntPCurvePCurveOfCInter; diff --git a/src/HLRBRep/HLRBRep_FaceData.cxx b/src/HLRBRep/HLRBRep_FaceData.cxx index d3610aa8ac..703a2fdff9 100644 --- a/src/HLRBRep/HLRBRep_FaceData.cxx +++ b/src/HLRBRep/HLRBRep_FaceData.cxx @@ -16,7 +16,6 @@ #include -#include #include #include #include diff --git a/src/HLRBRep/HLRBRep_FaceData.hxx b/src/HLRBRep/HLRBRep_FaceData.hxx index da2ce8f9f7..497772349f 100644 --- a/src/HLRBRep/HLRBRep_FaceData.hxx +++ b/src/HLRBRep/HLRBRep_FaceData.hxx @@ -21,10 +21,7 @@ #include #include -#include #include -#include -#include #include #include class HLRAlgo_WiresBlock; diff --git a/src/HLRBRep/HLRBRep_FaceIterator.cxx b/src/HLRBRep/HLRBRep_FaceIterator.cxx index 44aaf5308f..cf8075c6c6 100644 --- a/src/HLRBRep/HLRBRep_FaceIterator.cxx +++ b/src/HLRBRep/HLRBRep_FaceIterator.cxx @@ -19,8 +19,6 @@ #endif -#include -#include #include #include diff --git a/src/HLRBRep/HLRBRep_FaceIterator.hxx b/src/HLRBRep/HLRBRep_FaceIterator.hxx index f7c90ea542..dacea08a9b 100644 --- a/src/HLRBRep/HLRBRep_FaceIterator.hxx +++ b/src/HLRBRep/HLRBRep_FaceIterator.hxx @@ -22,7 +22,6 @@ #include #include -#include #include class HLRAlgo_WiresBlock; class HLRAlgo_EdgesBlock; diff --git a/src/HLRBRep/HLRBRep_HLRToShape.hxx b/src/HLRBRep/HLRBRep_HLRToShape.hxx index d88d2ab0a8..9a0d26efab 100644 --- a/src/HLRBRep/HLRBRep_HLRToShape.hxx +++ b/src/HLRBRep/HLRBRep_HLRToShape.hxx @@ -23,7 +23,6 @@ #include #include -#include #include class HLRBRep_Algo; class TopoDS_Shape; diff --git a/src/HLRBRep/HLRBRep_Hider.cxx b/src/HLRBRep/HLRBRep_Hider.cxx index d561da612e..b97392a3f1 100644 --- a/src/HLRBRep/HLRBRep_Hider.cxx +++ b/src/HLRBRep/HLRBRep_Hider.cxx @@ -18,14 +18,9 @@ #include -#include -#include -#include -#include #include #include #include -#include #include #include #include diff --git a/src/HLRBRep/HLRBRep_IntConicCurveOfCInter.hxx b/src/HLRBRep/HLRBRep_IntConicCurveOfCInter.hxx index 28930fad76..6d0264fafd 100644 --- a/src/HLRBRep/HLRBRep_IntConicCurveOfCInter.hxx +++ b/src/HLRBRep/HLRBRep_IntConicCurveOfCInter.hxx @@ -21,11 +21,9 @@ #include #include -#include #include #include #include -#include #include class Standard_ConstructionError; class IntCurve_IConicTool; diff --git a/src/HLRBRep/HLRBRep_InterCSurf.hxx b/src/HLRBRep/HLRBRep_InterCSurf.hxx index 49b2b202b3..0472a6d127 100644 --- a/src/HLRBRep/HLRBRep_InterCSurf.hxx +++ b/src/HLRBRep/HLRBRep_InterCSurf.hxx @@ -19,11 +19,8 @@ #include #include -#include #include -#include -#include #include #include class gp_Lin; diff --git a/src/HLRBRep/HLRBRep_InternalAlgo.cxx b/src/HLRBRep/HLRBRep_InternalAlgo.cxx index 50b5504059..d8f2b9d141 100644 --- a/src/HLRBRep/HLRBRep_InternalAlgo.cxx +++ b/src/HLRBRep/HLRBRep_InternalAlgo.cxx @@ -16,7 +16,6 @@ #include -#include #include #include #include diff --git a/src/HLRBRep/HLRBRep_InternalAlgo.hxx b/src/HLRBRep/HLRBRep_InternalAlgo.hxx index 3a1822d582..68f1bc0213 100644 --- a/src/HLRBRep/HLRBRep_InternalAlgo.hxx +++ b/src/HLRBRep/HLRBRep_InternalAlgo.hxx @@ -23,7 +23,6 @@ #include #include #include -#include #include #include class HLRBRep_Data; diff --git a/src/HLRBRep/HLRBRep_Intersector.cxx b/src/HLRBRep/HLRBRep_Intersector.cxx index bb48231ef2..e4a95f5037 100644 --- a/src/HLRBRep/HLRBRep_Intersector.cxx +++ b/src/HLRBRep/HLRBRep_Intersector.cxx @@ -21,9 +21,7 @@ #include #include -#include #include -#include #include #include #include @@ -39,7 +37,6 @@ #include #include -#include //#define PERF #ifdef PERF diff --git a/src/HLRBRep/HLRBRep_Intersector.hxx b/src/HLRBRep/HLRBRep_Intersector.hxx index 2731ca69e2..077498a74a 100644 --- a/src/HLRBRep/HLRBRep_Intersector.hxx +++ b/src/HLRBRep/HLRBRep_Intersector.hxx @@ -19,15 +19,10 @@ #include #include -#include -#include #include #include #include -#include -#include -#include class gp_Lin; class IntCurveSurface_IntersectionPoint; class IntRes2d_IntersectionSegment; diff --git a/src/HLRBRep/HLRBRep_LineTool.hxx b/src/HLRBRep/HLRBRep_LineTool.hxx index a265bc0bd9..4a3571c8ce 100644 --- a/src/HLRBRep/HLRBRep_LineTool.hxx +++ b/src/HLRBRep/HLRBRep_LineTool.hxx @@ -26,8 +26,6 @@ #include #include #include -#include -#include #include #include #include @@ -40,7 +38,6 @@ class Standard_OutOfRange; class Standard_NoSuchObject; class Standard_DomainError; -class gp_Lin; class gp_Pnt; class gp_Vec; class Geom_BezierCurve; diff --git a/src/HLRBRep/HLRBRep_MyImpParToolOfTheIntersectorOfTheIntConicCurveOfCInter.hxx b/src/HLRBRep/HLRBRep_MyImpParToolOfTheIntersectorOfTheIntConicCurveOfCInter.hxx index 2b8b5c4d5e..1f27d41b48 100644 --- a/src/HLRBRep/HLRBRep_MyImpParToolOfTheIntersectorOfTheIntConicCurveOfCInter.hxx +++ b/src/HLRBRep/HLRBRep_MyImpParToolOfTheIntersectorOfTheIntConicCurveOfCInter.hxx @@ -21,11 +21,9 @@ #include #include -#include #include #include #include -#include class IntCurve_IConicTool; class HLRBRep_CurveTool; diff --git a/src/HLRBRep/HLRBRep_PCLocFOfTheLocateExtPCOfTheProjPCurOfCInter.hxx b/src/HLRBRep/HLRBRep_PCLocFOfTheLocateExtPCOfTheProjPCurOfCInter.hxx index b4aa907724..9abfaed615 100644 --- a/src/HLRBRep/HLRBRep_PCLocFOfTheLocateExtPCOfTheProjPCurOfCInter.hxx +++ b/src/HLRBRep/HLRBRep_PCLocFOfTheLocateExtPCOfTheProjPCurOfCInter.hxx @@ -22,13 +22,10 @@ #include #include -#include -#include #include #include #include #include -#include #include class Standard_OutOfRange; class Standard_TypeMismatch; diff --git a/src/HLRBRep/HLRBRep_PolyAlgo.cxx b/src/HLRBRep/HLRBRep_PolyAlgo.cxx index 272619ce92..ebcc46fd3a 100644 --- a/src/HLRBRep/HLRBRep_PolyAlgo.cxx +++ b/src/HLRBRep/HLRBRep_PolyAlgo.cxx @@ -24,15 +24,12 @@ #include #include #include -#include #include #include -#include #include #include #include #include -#include #include #include #include @@ -42,7 +39,6 @@ #include #include #include -#include #include #include #include @@ -50,7 +46,6 @@ #include #include #include -#include IMPLEMENT_STANDARD_RTTIEXT(HLRBRep_PolyAlgo,Standard_Transient) diff --git a/src/HLRBRep/HLRBRep_PolyHLRToShape.cxx b/src/HLRBRep/HLRBRep_PolyHLRToShape.cxx index 771e082913..e064eaab37 100644 --- a/src/HLRBRep/HLRBRep_PolyHLRToShape.cxx +++ b/src/HLRBRep/HLRBRep_PolyHLRToShape.cxx @@ -20,8 +20,6 @@ #include #include #include -#include -#include #include #include #include diff --git a/src/HLRBRep/HLRBRep_PolyHLRToShape.hxx b/src/HLRBRep/HLRBRep_PolyHLRToShape.hxx index 7b86b1b2ad..806a4b379d 100644 --- a/src/HLRBRep/HLRBRep_PolyHLRToShape.hxx +++ b/src/HLRBRep/HLRBRep_PolyHLRToShape.hxx @@ -22,7 +22,6 @@ #include #include -#include #include #include class HLRBRep_PolyAlgo; diff --git a/src/HLRBRep/HLRBRep_SLProps.hxx b/src/HLRBRep/HLRBRep_SLProps.hxx index 10703a7281..bbfff0bf15 100644 --- a/src/HLRBRep/HLRBRep_SLProps.hxx +++ b/src/HLRBRep/HLRBRep_SLProps.hxx @@ -19,16 +19,12 @@ #include #include -#include -#include -#include #include #include #include #include #include -#include class LProp_BadContinuity; class Standard_DomainError; class Standard_OutOfRange; diff --git a/src/HLRBRep/HLRBRep_SLPropsATool.hxx b/src/HLRBRep/HLRBRep_SLPropsATool.hxx index fecf37162d..727e856e96 100644 --- a/src/HLRBRep/HLRBRep_SLPropsATool.hxx +++ b/src/HLRBRep/HLRBRep_SLPropsATool.hxx @@ -21,9 +21,7 @@ #include #include -#include #include -#include class gp_Pnt; class gp_Vec; diff --git a/src/HLRBRep/HLRBRep_ShapeToHLR.cxx b/src/HLRBRep/HLRBRep_ShapeToHLR.cxx index 052579682c..84e00fff85 100644 --- a/src/HLRBRep/HLRBRep_ShapeToHLR.cxx +++ b/src/HLRBRep/HLRBRep_ShapeToHLR.cxx @@ -21,13 +21,9 @@ #include #include -#include -#include -#include #include #include #include -#include #include #include #include @@ -35,7 +31,6 @@ #include #include #include -#include #include #include diff --git a/src/HLRBRep/HLRBRep_ShapeToHLR.hxx b/src/HLRBRep/HLRBRep_ShapeToHLR.hxx index 2bf844c6fc..27cc9cccbb 100644 --- a/src/HLRBRep/HLRBRep_ShapeToHLR.hxx +++ b/src/HLRBRep/HLRBRep_ShapeToHLR.hxx @@ -24,7 +24,6 @@ #include #include #include -#include class HLRBRep_Data; class HLRTopoBRep_OutLiner; class HLRAlgo_Projector; diff --git a/src/HLRBRep/HLRBRep_Surface.cxx b/src/HLRBRep/HLRBRep_Surface.cxx index 628b9e15c0..7022dd87d0 100644 --- a/src/HLRBRep/HLRBRep_Surface.cxx +++ b/src/HLRBRep/HLRBRep_Surface.cxx @@ -15,21 +15,10 @@ // commercial license or contractual agreement. -#include -#include -#include -#include -#include -#include #include #include #include -#include -#include #include -#include -#include -#include #include #include #include diff --git a/src/HLRBRep/HLRBRep_Surface.hxx b/src/HLRBRep/HLRBRep_Surface.hxx index e8b49933d5..682092cde2 100644 --- a/src/HLRBRep/HLRBRep_Surface.hxx +++ b/src/HLRBRep/HLRBRep_Surface.hxx @@ -21,13 +21,9 @@ #include #include -#include #include #include -#include -#include -#include #include #include #include diff --git a/src/HLRBRep/HLRBRep_SurfaceTool.cxx b/src/HLRBRep/HLRBRep_SurfaceTool.cxx index 1b66c45be2..7b3158059c 100644 --- a/src/HLRBRep/HLRBRep_SurfaceTool.cxx +++ b/src/HLRBRep/HLRBRep_SurfaceTool.cxx @@ -15,15 +15,7 @@ #include -#include -#include #include -#include -#include -#include -#include -#include -#include Standard_Integer HLRBRep_SurfaceTool::NbSamplesU(const Standard_Address S) { Standard_Integer nbs; diff --git a/src/HLRBRep/HLRBRep_TheCSFunctionOfInterCSurf.hxx b/src/HLRBRep/HLRBRep_TheCSFunctionOfInterCSurf.hxx index 9c5f113925..986544bcc2 100644 --- a/src/HLRBRep/HLRBRep_TheCSFunctionOfInterCSurf.hxx +++ b/src/HLRBRep/HLRBRep_TheCSFunctionOfInterCSurf.hxx @@ -21,12 +21,9 @@ #include #include -#include #include #include -#include #include -#include #include #include class HLRBRep_SurfaceTool; diff --git a/src/HLRBRep/HLRBRep_TheCurveLocatorOfTheProjPCurOfCInter.hxx b/src/HLRBRep/HLRBRep_TheCurveLocatorOfTheProjPCurOfCInter.hxx index 6a1fc8779f..fb8f3054b7 100644 --- a/src/HLRBRep/HLRBRep_TheCurveLocatorOfTheProjPCurOfCInter.hxx +++ b/src/HLRBRep/HLRBRep_TheCurveLocatorOfTheProjPCurOfCInter.hxx @@ -21,8 +21,6 @@ #include #include -#include -#include #include class HLRBRep_CurveTool; class Extrema_POnCurv2d; diff --git a/src/HLRBRep/HLRBRep_TheDistBetweenPCurvesOfTheIntPCurvePCurveOfCInter.hxx b/src/HLRBRep/HLRBRep_TheDistBetweenPCurvesOfTheIntPCurvePCurveOfCInter.hxx index cc7af050fc..50aa81f775 100644 --- a/src/HLRBRep/HLRBRep_TheDistBetweenPCurvesOfTheIntPCurvePCurveOfCInter.hxx +++ b/src/HLRBRep/HLRBRep_TheDistBetweenPCurvesOfTheIntPCurvePCurveOfCInter.hxx @@ -21,9 +21,7 @@ #include #include -#include #include -#include #include #include class HLRBRep_CurveTool; diff --git a/src/HLRBRep/HLRBRep_TheExactInterCSurf.hxx b/src/HLRBRep/HLRBRep_TheExactInterCSurf.hxx index 7cbb3db484..b169a379d1 100644 --- a/src/HLRBRep/HLRBRep_TheExactInterCSurf.hxx +++ b/src/HLRBRep/HLRBRep_TheExactInterCSurf.hxx @@ -23,8 +23,6 @@ #include #include -#include -#include class StdFail_NotDone; class Standard_DomainError; class HLRBRep_SurfaceTool; diff --git a/src/HLRBRep/HLRBRep_TheIntConicCurveOfCInter.hxx b/src/HLRBRep/HLRBRep_TheIntConicCurveOfCInter.hxx index 636da739ea..183256231b 100644 --- a/src/HLRBRep/HLRBRep_TheIntConicCurveOfCInter.hxx +++ b/src/HLRBRep/HLRBRep_TheIntConicCurveOfCInter.hxx @@ -19,11 +19,8 @@ #include #include -#include #include -#include -#include class IntCurve_IConicTool; class HLRBRep_CurveTool; class HLRBRep_TheProjPCurOfCInter; diff --git a/src/HLRBRep/HLRBRep_TheIntPCurvePCurveOfCInter.hxx b/src/HLRBRep/HLRBRep_TheIntPCurvePCurveOfCInter.hxx index bf7df7bb7b..51f1979cc7 100644 --- a/src/HLRBRep/HLRBRep_TheIntPCurvePCurveOfCInter.hxx +++ b/src/HLRBRep/HLRBRep_TheIntPCurvePCurveOfCInter.hxx @@ -19,14 +19,10 @@ #include #include -#include #include #include -#include -#include #include -#include class HLRBRep_CurveTool; class HLRBRep_TheProjPCurOfCInter; class HLRBRep_ThePolygon2dOfTheIntPCurvePCurveOfCInter; diff --git a/src/HLRBRep/HLRBRep_TheInterferenceOfInterCSurf.hxx b/src/HLRBRep/HLRBRep_TheInterferenceOfInterCSurf.hxx index bfc8a94045..7d385f9fd6 100644 --- a/src/HLRBRep/HLRBRep_TheInterferenceOfInterCSurf.hxx +++ b/src/HLRBRep/HLRBRep_TheInterferenceOfInterCSurf.hxx @@ -22,10 +22,8 @@ #include #include -#include #include #include -#include class HLRBRep_ThePolygonOfInterCSurf; class HLRBRep_ThePolygonToolOfInterCSurf; class HLRBRep_ThePolyhedronOfInterCSurf; diff --git a/src/HLRBRep/HLRBRep_TheIntersectorOfTheIntConicCurveOfCInter.hxx b/src/HLRBRep/HLRBRep_TheIntersectorOfTheIntConicCurveOfCInter.hxx index ac664bb3bb..35786957d5 100644 --- a/src/HLRBRep/HLRBRep_TheIntersectorOfTheIntConicCurveOfCInter.hxx +++ b/src/HLRBRep/HLRBRep_TheIntersectorOfTheIntConicCurveOfCInter.hxx @@ -19,11 +19,8 @@ #include #include -#include #include -#include -#include #include #include class Standard_ConstructionError; diff --git a/src/HLRBRep/HLRBRep_TheLocateExtPCOfTheProjPCurOfCInter.hxx b/src/HLRBRep/HLRBRep_TheLocateExtPCOfTheProjPCurOfCInter.hxx index 504125543b..d4f9164766 100644 --- a/src/HLRBRep/HLRBRep_TheLocateExtPCOfTheProjPCurOfCInter.hxx +++ b/src/HLRBRep/HLRBRep_TheLocateExtPCOfTheProjPCurOfCInter.hxx @@ -22,9 +22,7 @@ #include #include -#include #include -#include class Standard_DomainError; class Standard_TypeMismatch; class StdFail_NotDone; diff --git a/src/HLRBRep/HLRBRep_ThePolygon2dOfTheIntPCurvePCurveOfCInter.hxx b/src/HLRBRep/HLRBRep_ThePolygon2dOfTheIntPCurvePCurveOfCInter.hxx index 5e36c61693..4642440fa1 100644 --- a/src/HLRBRep/HLRBRep_ThePolygon2dOfTheIntPCurvePCurveOfCInter.hxx +++ b/src/HLRBRep/HLRBRep_ThePolygon2dOfTheIntPCurvePCurveOfCInter.hxx @@ -21,14 +21,11 @@ #include #include -#include -#include #include #include #include #include #include -#include class Standard_OutOfRange; class HLRBRep_CurveTool; class IntRes2d_Domain; diff --git a/src/HLRBRep/HLRBRep_ThePolygonOfInterCSurf.hxx b/src/HLRBRep/HLRBRep_ThePolygonOfInterCSurf.hxx index 2206eddd2d..bdc3fef184 100644 --- a/src/HLRBRep/HLRBRep_ThePolygonOfInterCSurf.hxx +++ b/src/HLRBRep/HLRBRep_ThePolygonOfInterCSurf.hxx @@ -22,10 +22,8 @@ #include #include -#include #include #include -#include #include #include class Standard_OutOfRange; diff --git a/src/HLRBRep/HLRBRep_ThePolygonToolOfInterCSurf.hxx b/src/HLRBRep/HLRBRep_ThePolygonToolOfInterCSurf.hxx index 1301ec04c3..e5227fe1d2 100644 --- a/src/HLRBRep/HLRBRep_ThePolygonToolOfInterCSurf.hxx +++ b/src/HLRBRep/HLRBRep_ThePolygonToolOfInterCSurf.hxx @@ -23,7 +23,6 @@ #include #include -#include class Standard_OutOfRange; class gp_Pnt; class HLRBRep_ThePolygonOfInterCSurf; diff --git a/src/HLRBRep/HLRBRep_ThePolyhedronOfInterCSurf.hxx b/src/HLRBRep/HLRBRep_ThePolyhedronOfInterCSurf.hxx index 87555f2456..3c43944fb7 100644 --- a/src/HLRBRep/HLRBRep_ThePolyhedronOfInterCSurf.hxx +++ b/src/HLRBRep/HLRBRep_ThePolyhedronOfInterCSurf.hxx @@ -24,9 +24,7 @@ #include #include #include -#include #include -#include #include class Standard_OutOfRange; class HLRBRep_SurfaceTool; diff --git a/src/HLRBRep/HLRBRep_TheProjPCurOfCInter.hxx b/src/HLRBRep/HLRBRep_TheProjPCurOfCInter.hxx index b584470036..1148ec6ab6 100644 --- a/src/HLRBRep/HLRBRep_TheProjPCurOfCInter.hxx +++ b/src/HLRBRep/HLRBRep_TheProjPCurOfCInter.hxx @@ -21,7 +21,6 @@ #include #include -#include #include class HLRBRep_CurveTool; class HLRBRep_TheCurveLocatorOfTheProjPCurOfCInter; diff --git a/src/HLRBRep/HLRBRep_TheQuadCurvExactInterCSurf.hxx b/src/HLRBRep/HLRBRep_TheQuadCurvExactInterCSurf.hxx index ae08524ee0..b0f801c19b 100644 --- a/src/HLRBRep/HLRBRep_TheQuadCurvExactInterCSurf.hxx +++ b/src/HLRBRep/HLRBRep_TheQuadCurvExactInterCSurf.hxx @@ -21,11 +21,8 @@ #include #include -#include #include -#include #include -#include class HLRBRep_SurfaceTool; class gp_Lin; class HLRBRep_LineTool; diff --git a/src/HLRBRep/HLRBRep_TheQuadCurvFuncOfTheQuadCurvExactInterCSurf.hxx b/src/HLRBRep/HLRBRep_TheQuadCurvFuncOfTheQuadCurvExactInterCSurf.hxx index fcc5974121..9d204673f9 100644 --- a/src/HLRBRep/HLRBRep_TheQuadCurvFuncOfTheQuadCurvExactInterCSurf.hxx +++ b/src/HLRBRep/HLRBRep_TheQuadCurvFuncOfTheQuadCurvExactInterCSurf.hxx @@ -25,7 +25,6 @@ #include #include #include -#include class IntSurf_Quadric; class gp_Lin; class HLRBRep_LineTool; diff --git a/src/HLRBRep/HLRBRep_VertexList.cxx b/src/HLRBRep/HLRBRep_VertexList.cxx index b970594d70..170043755f 100644 --- a/src/HLRBRep/HLRBRep_VertexList.cxx +++ b/src/HLRBRep/HLRBRep_VertexList.cxx @@ -19,8 +19,6 @@ #endif -#include -#include #include #include #include diff --git a/src/HLRTest/HLRTest.cxx b/src/HLRTest/HLRTest.cxx index f44e722cc5..7dd633a738 100644 --- a/src/HLRTest/HLRTest.cxx +++ b/src/HLRTest/HLRTest.cxx @@ -17,19 +17,14 @@ #include #include -#include #include -#include -#include #include #include #include #include #include #include -#include #include -#include #include static Handle(HLRBRep_Algo) hider; diff --git a/src/HLRTest/HLRTest.hxx b/src/HLRTest/HLRTest.hxx index 030ec0a670..118b74d3ef 100644 --- a/src/HLRTest/HLRTest.hxx +++ b/src/HLRTest/HLRTest.hxx @@ -21,7 +21,6 @@ #include #include -#include #include #include class HLRAlgo_Projector; diff --git a/src/HLRTest/HLRTest_DrawableEdgeTool.hxx b/src/HLRTest/HLRTest_DrawableEdgeTool.hxx index 13bda2481e..a981c3a287 100644 --- a/src/HLRTest/HLRTest_DrawableEdgeTool.hxx +++ b/src/HLRTest/HLRTest_DrawableEdgeTool.hxx @@ -20,7 +20,6 @@ #include #include -#include #include #include class HLRBRep_Algo; diff --git a/src/HLRTest/HLRTest_DrawablePolyEdgeTool.cxx b/src/HLRTest/HLRTest_DrawablePolyEdgeTool.cxx index 7eeda8245f..7f01f3c113 100644 --- a/src/HLRTest/HLRTest_DrawablePolyEdgeTool.cxx +++ b/src/HLRTest/HLRTest_DrawablePolyEdgeTool.cxx @@ -20,8 +20,6 @@ #include #include #include -#include -#include #include #include #include diff --git a/src/HLRTest/HLRTest_DrawablePolyEdgeTool.hxx b/src/HLRTest/HLRTest_DrawablePolyEdgeTool.hxx index f310527a33..0dac8c4b09 100644 --- a/src/HLRTest/HLRTest_DrawablePolyEdgeTool.hxx +++ b/src/HLRTest/HLRTest_DrawablePolyEdgeTool.hxx @@ -20,7 +20,6 @@ #include #include -#include #include #include #include diff --git a/src/HLRTopoBRep/HLRTopoBRep_DSFiller.cxx b/src/HLRTopoBRep/HLRTopoBRep_DSFiller.cxx index ea0a8477ca..2f01a26096 100644 --- a/src/HLRTopoBRep/HLRTopoBRep_DSFiller.cxx +++ b/src/HLRTopoBRep/HLRTopoBRep_DSFiller.cxx @@ -17,20 +17,14 @@ #include #include -#include #include #include -#include -#include #include #include -#include -#include #include #include #include #include -#include #include #include #include @@ -60,7 +54,6 @@ #include #include #include -#include //======================================================================= //function : Insert diff --git a/src/HLRTopoBRep/HLRTopoBRep_DSFiller.hxx b/src/HLRTopoBRep/HLRTopoBRep_DSFiller.hxx index 1b1227d0cb..37215ffd2f 100644 --- a/src/HLRTopoBRep/HLRTopoBRep_DSFiller.hxx +++ b/src/HLRTopoBRep/HLRTopoBRep_DSFiller.hxx @@ -19,12 +19,9 @@ #include #include -#include #include #include -#include -#include class TopoDS_Shape; class Contap_Contour; class HLRTopoBRep_Data; diff --git a/src/HLRTopoBRep/HLRTopoBRep_Data.cxx b/src/HLRTopoBRep/HLRTopoBRep_Data.cxx index d1ab8b447f..7f3a5e43d5 100644 --- a/src/HLRTopoBRep/HLRTopoBRep_Data.cxx +++ b/src/HLRTopoBRep/HLRTopoBRep_Data.cxx @@ -23,7 +23,6 @@ #include #include #include -#include //======================================================================= //function : HLRTopoBRep_Data diff --git a/src/HLRTopoBRep/HLRTopoBRep_Data.hxx b/src/HLRTopoBRep/HLRTopoBRep_Data.hxx index 7f3215bea6..77f8cca7fe 100644 --- a/src/HLRTopoBRep/HLRTopoBRep_Data.hxx +++ b/src/HLRTopoBRep/HLRTopoBRep_Data.hxx @@ -25,12 +25,10 @@ #include #include #include -#include #include #include #include #include -#include class TopoDS_Edge; class TopoDS_Face; class TopoDS_Shape; diff --git a/src/HLRTopoBRep/HLRTopoBRep_FaceIsoLiner.cxx b/src/HLRTopoBRep/HLRTopoBRep_FaceIsoLiner.cxx index 360ccecfc2..6151e40bc4 100644 --- a/src/HLRTopoBRep/HLRTopoBRep_FaceIsoLiner.cxx +++ b/src/HLRTopoBRep/HLRTopoBRep_FaceIsoLiner.cxx @@ -26,14 +26,12 @@ #include #include #include -#include #include #include #include #include #include #include -#include #include #include #include @@ -41,7 +39,6 @@ #include #include #include -#include //#include const Standard_Real IntersectorConfusion = 1.e-10; diff --git a/src/HLRTopoBRep/HLRTopoBRep_FaceIsoLiner.hxx b/src/HLRTopoBRep/HLRTopoBRep_FaceIsoLiner.hxx index 2c053ec963..577b362885 100644 --- a/src/HLRTopoBRep/HLRTopoBRep_FaceIsoLiner.hxx +++ b/src/HLRTopoBRep/HLRTopoBRep_FaceIsoLiner.hxx @@ -22,7 +22,6 @@ #include #include -#include class TopoDS_Face; class HLRTopoBRep_Data; class TopoDS_Vertex; diff --git a/src/HLRTopoBRep/HLRTopoBRep_OutLiner.cxx b/src/HLRTopoBRep/HLRTopoBRep_OutLiner.cxx index 9e3d2c8144..e6b0880098 100644 --- a/src/HLRTopoBRep/HLRTopoBRep_OutLiner.cxx +++ b/src/HLRTopoBRep/HLRTopoBRep_OutLiner.cxx @@ -23,7 +23,6 @@ #include #include #include -#include #include #include #include @@ -36,7 +35,6 @@ #include #include #include -#include IMPLEMENT_STANDARD_RTTIEXT(HLRTopoBRep_OutLiner,Standard_Transient) diff --git a/src/HLRTopoBRep/HLRTopoBRep_VData.hxx b/src/HLRTopoBRep/HLRTopoBRep_VData.hxx index 0a604f5132..4cf92899c1 100644 --- a/src/HLRTopoBRep/HLRTopoBRep_VData.hxx +++ b/src/HLRTopoBRep/HLRTopoBRep_VData.hxx @@ -21,7 +21,6 @@ #include #include -#include #include diff --git a/src/Hatch/Hatch_Hatcher.cxx b/src/Hatch/Hatch_Hatcher.cxx index 67d1d093b5..830f318caf 100644 --- a/src/Hatch/Hatch_Hatcher.cxx +++ b/src/Hatch/Hatch_Hatcher.cxx @@ -16,7 +16,6 @@ #include -#include #include #include #include diff --git a/src/Hatch/Hatch_Hatcher.hxx b/src/Hatch/Hatch_Hatcher.hxx index 708a8c3020..e5af52520f 100644 --- a/src/Hatch/Hatch_Hatcher.hxx +++ b/src/Hatch/Hatch_Hatcher.hxx @@ -19,11 +19,8 @@ #include #include -#include -#include #include -#include #include #include class gp_Lin2d; diff --git a/src/Hatch/Hatch_Line.cxx b/src/Hatch/Hatch_Line.cxx index 44f59536de..8a4d90448c 100644 --- a/src/Hatch/Hatch_Line.cxx +++ b/src/Hatch/Hatch_Line.cxx @@ -15,7 +15,6 @@ // commercial license or contractual agreement. -#include #include #include #include diff --git a/src/Hatch/Hatch_Line.hxx b/src/Hatch/Hatch_Line.hxx index 1e2c184dfc..3371dce42f 100644 --- a/src/Hatch/Hatch_Line.hxx +++ b/src/Hatch/Hatch_Line.hxx @@ -24,9 +24,6 @@ #include #include #include -#include -#include -#include //! Stores a Line in the Hatcher. Represented by : diff --git a/src/Hatch/Hatch_Parameter.hxx b/src/Hatch/Hatch_Parameter.hxx index 8e74c0fc1a..e9ed9e9195 100644 --- a/src/Hatch/Hatch_Parameter.hxx +++ b/src/Hatch/Hatch_Parameter.hxx @@ -19,10 +19,7 @@ #include #include -#include -#include -#include #include diff --git a/src/HatchGen/HatchGen_Domain.cxx b/src/HatchGen/HatchGen_Domain.cxx index 893e7fcdb0..c0d0a33933 100644 --- a/src/HatchGen/HatchGen_Domain.cxx +++ b/src/HatchGen/HatchGen_Domain.cxx @@ -17,7 +17,6 @@ #include #include -#include #include //======================================================================= diff --git a/src/HatchGen/HatchGen_Domain.hxx b/src/HatchGen/HatchGen_Domain.hxx index 6d55a2a249..b2734c958d 100644 --- a/src/HatchGen/HatchGen_Domain.hxx +++ b/src/HatchGen/HatchGen_Domain.hxx @@ -23,8 +23,6 @@ #include #include -#include - class HatchGen_Domain diff --git a/src/HatchGen/HatchGen_IntersectionPoint.hxx b/src/HatchGen/HatchGen_IntersectionPoint.hxx index 7c961d23a6..258bae37a7 100644 --- a/src/HatchGen/HatchGen_IntersectionPoint.hxx +++ b/src/HatchGen/HatchGen_IntersectionPoint.hxx @@ -21,7 +21,6 @@ #include #include -#include #include #include #include diff --git a/src/HatchGen/HatchGen_PointOnElement.hxx b/src/HatchGen/HatchGen_PointOnElement.hxx index 2c37569057..4bcda96b4f 100644 --- a/src/HatchGen/HatchGen_PointOnElement.hxx +++ b/src/HatchGen/HatchGen_PointOnElement.hxx @@ -25,7 +25,6 @@ #include #include #include -#include class IntRes2d_IntersectionPoint; diff --git a/src/HatchGen/HatchGen_PointOnHatching.cxx b/src/HatchGen/HatchGen_PointOnHatching.cxx index f8655fd122..3afd2bb334 100644 --- a/src/HatchGen/HatchGen_PointOnHatching.cxx +++ b/src/HatchGen/HatchGen_PointOnHatching.cxx @@ -15,10 +15,8 @@ // commercial license or contractual agreement. -#include #include #include -#include #include #define RAISE_IF_NOSUCHOBJECT 0 diff --git a/src/HatchGen/HatchGen_PointOnHatching.hxx b/src/HatchGen/HatchGen_PointOnHatching.hxx index e3ec0458df..53bb24ee08 100644 --- a/src/HatchGen/HatchGen_PointOnHatching.hxx +++ b/src/HatchGen/HatchGen_PointOnHatching.hxx @@ -23,8 +23,6 @@ #include #include -#include -#include #include class IntRes2d_IntersectionPoint; class HatchGen_PointOnElement; diff --git a/src/HeaderSection/HeaderSection_FileDescription.hxx b/src/HeaderSection/HeaderSection_FileDescription.hxx index b708f531e8..c2cd6a7983 100644 --- a/src/HeaderSection/HeaderSection_FileDescription.hxx +++ b/src/HeaderSection/HeaderSection_FileDescription.hxx @@ -18,7 +18,6 @@ #define _HeaderSection_FileDescription_HeaderFile #include -#include #include #include diff --git a/src/HeaderSection/HeaderSection_FileName.hxx b/src/HeaderSection/HeaderSection_FileName.hxx index 62661fc4e9..1c9872ba2f 100644 --- a/src/HeaderSection/HeaderSection_FileName.hxx +++ b/src/HeaderSection/HeaderSection_FileName.hxx @@ -18,7 +18,6 @@ #define _HeaderSection_FileName_HeaderFile #include -#include #include #include diff --git a/src/HeaderSection/HeaderSection_FileSchema.hxx b/src/HeaderSection/HeaderSection_FileSchema.hxx index 96bb99dd38..bf0683bb67 100644 --- a/src/HeaderSection/HeaderSection_FileSchema.hxx +++ b/src/HeaderSection/HeaderSection_FileSchema.hxx @@ -18,7 +18,6 @@ #define _HeaderSection_FileSchema_HeaderFile #include -#include #include #include diff --git a/src/HeaderSection/HeaderSection_Protocol.hxx b/src/HeaderSection/HeaderSection_Protocol.hxx index 4ee81ac65d..3a4a69abd0 100644 --- a/src/HeaderSection/HeaderSection_Protocol.hxx +++ b/src/HeaderSection/HeaderSection_Protocol.hxx @@ -22,8 +22,6 @@ #include #include -#include -#include class HeaderSection_Protocol; diff --git a/src/Hermit/Hermit.cxx b/src/Hermit/Hermit.cxx index 2447336f9b..eeb22232ee 100644 --- a/src/Hermit/Hermit.cxx +++ b/src/Hermit/Hermit.cxx @@ -20,15 +20,12 @@ #include #include #include -#include #include -#include #include #include #include #include #include -#include #include #include diff --git a/src/Hermit/Hermit.hxx b/src/Hermit/Hermit.hxx index 80fec1b6b6..47c910ad38 100644 --- a/src/Hermit/Hermit.hxx +++ b/src/Hermit/Hermit.hxx @@ -21,7 +21,6 @@ #include #include -#include class Geom2d_BSplineCurve; class Geom_BSplineCurve; diff --git a/src/IFGraph/IFGraph_Compare.hxx b/src/IFGraph/IFGraph_Compare.hxx index d6440959e9..e7d9b5c303 100644 --- a/src/IFGraph/IFGraph_Compare.hxx +++ b/src/IFGraph/IFGraph_Compare.hxx @@ -23,7 +23,6 @@ #include #include -#include class Standard_Transient; class Interface_EntityIterator; diff --git a/src/IFGraph/IFGraph_ConnectedComponants.hxx b/src/IFGraph/IFGraph_ConnectedComponants.hxx index 30398c72f1..a29fe82d96 100644 --- a/src/IFGraph/IFGraph_ConnectedComponants.hxx +++ b/src/IFGraph/IFGraph_ConnectedComponants.hxx @@ -19,10 +19,8 @@ #include #include -#include #include -#include class Interface_Graph; //! determines Connected Components in a Graph. diff --git a/src/IFGraph/IFGraph_SCRoots.hxx b/src/IFGraph/IFGraph_SCRoots.hxx index 1b217eb64a..cd5941cdc1 100644 --- a/src/IFGraph/IFGraph_SCRoots.hxx +++ b/src/IFGraph/IFGraph_SCRoots.hxx @@ -19,10 +19,8 @@ #include #include -#include #include -#include class Interface_Graph; diff --git a/src/IFGraph/IFGraph_SubPartsIterator.cxx b/src/IFGraph/IFGraph_SubPartsIterator.cxx index ad73079d21..52ee0f2e6b 100644 --- a/src/IFGraph/IFGraph_SubPartsIterator.cxx +++ b/src/IFGraph/IFGraph_SubPartsIterator.cxx @@ -13,7 +13,6 @@ #include -#include #include #include #include diff --git a/src/IFSelect/IFSelect.hxx b/src/IFSelect/IFSelect.hxx index 2d88cfbae3..57774b9a4e 100644 --- a/src/IFSelect/IFSelect.hxx +++ b/src/IFSelect/IFSelect.hxx @@ -22,7 +22,6 @@ #include #include -#include class IFSelect_WorkSession; diff --git a/src/IFSelect/IFSelect_Act.cxx b/src/IFSelect/IFSelect_Act.cxx index aacb291d77..43020e3119 100644 --- a/src/IFSelect/IFSelect_Act.cxx +++ b/src/IFSelect/IFSelect_Act.cxx @@ -14,7 +14,6 @@ #include #include -#include #include #include diff --git a/src/IFSelect/IFSelect_Act.hxx b/src/IFSelect/IFSelect_Act.hxx index 2dd391fc74..861237d067 100644 --- a/src/IFSelect/IFSelect_Act.hxx +++ b/src/IFSelect/IFSelect_Act.hxx @@ -18,12 +18,9 @@ #define _IFSelect_Act_HeaderFile #include -#include -#include #include #include -#include #include #include class IFSelect_SessionPilot; diff --git a/src/IFSelect/IFSelect_Activator.cxx b/src/IFSelect/IFSelect_Activator.cxx index fe2e447b05..52f268a78d 100644 --- a/src/IFSelect/IFSelect_Activator.cxx +++ b/src/IFSelect/IFSelect_Activator.cxx @@ -15,7 +15,6 @@ #include #include #include -#include #include #include #include diff --git a/src/IFSelect/IFSelect_Activator.hxx b/src/IFSelect/IFSelect_Activator.hxx index aa576abd60..3110505589 100644 --- a/src/IFSelect/IFSelect_Activator.hxx +++ b/src/IFSelect/IFSelect_Activator.hxx @@ -18,13 +18,9 @@ #define _IFSelect_Activator_HeaderFile #include -#include -#include #include #include -#include -#include #include #include class IFSelect_SessionPilot; diff --git a/src/IFSelect/IFSelect_AppliedModifiers.hxx b/src/IFSelect/IFSelect_AppliedModifiers.hxx index fd17585a6c..ce04998743 100644 --- a/src/IFSelect/IFSelect_AppliedModifiers.hxx +++ b/src/IFSelect/IFSelect_AppliedModifiers.hxx @@ -18,13 +18,11 @@ #define _IFSelect_AppliedModifiers_HeaderFile #include -#include #include #include #include #include -#include #include class IFSelect_GeneralModifier; diff --git a/src/IFSelect/IFSelect_BasicDumper.cxx b/src/IFSelect/IFSelect_BasicDumper.cxx index 7883f84f5e..26a04db161 100644 --- a/src/IFSelect/IFSelect_BasicDumper.cxx +++ b/src/IFSelect/IFSelect_BasicDumper.cxx @@ -34,7 +34,6 @@ #include #include #include -#include #include #include #include diff --git a/src/IFSelect/IFSelect_BasicDumper.hxx b/src/IFSelect/IFSelect_BasicDumper.hxx index f89baf13ab..6f7ba52ca6 100644 --- a/src/IFSelect/IFSelect_BasicDumper.hxx +++ b/src/IFSelect/IFSelect_BasicDumper.hxx @@ -21,7 +21,6 @@ #include #include -#include class IFSelect_SessionFile; class Standard_Transient; class TCollection_AsciiString; diff --git a/src/IFSelect/IFSelect_CheckCounter.cxx b/src/IFSelect/IFSelect_CheckCounter.cxx index fa683f23c9..6c3802c4e5 100644 --- a/src/IFSelect/IFSelect_CheckCounter.cxx +++ b/src/IFSelect/IFSelect_CheckCounter.cxx @@ -13,7 +13,6 @@ #include -#include #include #include #include diff --git a/src/IFSelect/IFSelect_CheckCounter.hxx b/src/IFSelect/IFSelect_CheckCounter.hxx index a22733b061..28d14510e1 100644 --- a/src/IFSelect/IFSelect_CheckCounter.hxx +++ b/src/IFSelect/IFSelect_CheckCounter.hxx @@ -18,10 +18,8 @@ #define _IFSelect_CheckCounter_HeaderFile #include -#include #include -#include class MoniTool_SignText; class Interface_CheckIterator; class Interface_InterfaceModel; diff --git a/src/IFSelect/IFSelect_ContextModif.hxx b/src/IFSelect/IFSelect_ContextModif.hxx index 06a98bf776..50c77d53a3 100644 --- a/src/IFSelect/IFSelect_ContextModif.hxx +++ b/src/IFSelect/IFSelect_ContextModif.hxx @@ -26,7 +26,6 @@ #include #include #include -#include class Interface_Protocol; class Interface_CopyControl; class Interface_CopyTool; diff --git a/src/IFSelect/IFSelect_ContextWrite.cxx b/src/IFSelect/IFSelect_ContextWrite.cxx index 2269f53d0f..c4bbcf1e03 100644 --- a/src/IFSelect/IFSelect_ContextWrite.cxx +++ b/src/IFSelect/IFSelect_ContextWrite.cxx @@ -17,7 +17,6 @@ #include #include #include -#include #include #include #include diff --git a/src/IFSelect/IFSelect_ContextWrite.hxx b/src/IFSelect/IFSelect_ContextWrite.hxx index 287c66ab61..05dca8c386 100644 --- a/src/IFSelect/IFSelect_ContextWrite.hxx +++ b/src/IFSelect/IFSelect_ContextWrite.hxx @@ -21,11 +21,9 @@ #include #include -#include #include #include #include -#include class Interface_InterfaceModel; class Interface_Protocol; class IFSelect_AppliedModifiers; diff --git a/src/IFSelect/IFSelect_DispGlobal.hxx b/src/IFSelect/IFSelect_DispGlobal.hxx index 2ca327d20d..84fabe19e6 100644 --- a/src/IFSelect/IFSelect_DispGlobal.hxx +++ b/src/IFSelect/IFSelect_DispGlobal.hxx @@ -21,7 +21,6 @@ #include #include -#include #include class TCollection_AsciiString; class Interface_Graph; diff --git a/src/IFSelect/IFSelect_DispPerCount.cxx b/src/IFSelect/IFSelect_DispPerCount.cxx index d013045df2..e15b42af6c 100644 --- a/src/IFSelect/IFSelect_DispPerCount.cxx +++ b/src/IFSelect/IFSelect_DispPerCount.cxx @@ -19,7 +19,6 @@ #include #include #include -#include #include #include #include diff --git a/src/IFSelect/IFSelect_DispPerCount.hxx b/src/IFSelect/IFSelect_DispPerCount.hxx index 82e78e87ad..a12bd91390 100644 --- a/src/IFSelect/IFSelect_DispPerCount.hxx +++ b/src/IFSelect/IFSelect_DispPerCount.hxx @@ -22,7 +22,6 @@ #include #include -#include class IFSelect_IntParam; class TCollection_AsciiString; class Interface_Graph; diff --git a/src/IFSelect/IFSelect_DispPerFiles.cxx b/src/IFSelect/IFSelect_DispPerFiles.cxx index 8107729786..b37d770de5 100644 --- a/src/IFSelect/IFSelect_DispPerFiles.cxx +++ b/src/IFSelect/IFSelect_DispPerFiles.cxx @@ -19,7 +19,6 @@ #include #include #include -#include #include #include #include diff --git a/src/IFSelect/IFSelect_DispPerFiles.hxx b/src/IFSelect/IFSelect_DispPerFiles.hxx index efe1755911..02f4258a4c 100644 --- a/src/IFSelect/IFSelect_DispPerFiles.hxx +++ b/src/IFSelect/IFSelect_DispPerFiles.hxx @@ -22,7 +22,6 @@ #include #include -#include class IFSelect_IntParam; class TCollection_AsciiString; class Interface_Graph; diff --git a/src/IFSelect/IFSelect_DispPerOne.hxx b/src/IFSelect/IFSelect_DispPerOne.hxx index 1dffd834a4..2d889111c3 100644 --- a/src/IFSelect/IFSelect_DispPerOne.hxx +++ b/src/IFSelect/IFSelect_DispPerOne.hxx @@ -21,7 +21,6 @@ #include #include -#include #include class TCollection_AsciiString; class Interface_Graph; diff --git a/src/IFSelect/IFSelect_DispPerSignature.cxx b/src/IFSelect/IFSelect_DispPerSignature.cxx index 9668d042a4..fda05474fd 100644 --- a/src/IFSelect/IFSelect_DispPerSignature.cxx +++ b/src/IFSelect/IFSelect_DispPerSignature.cxx @@ -18,7 +18,6 @@ #include #include #include -#include #include #include #include diff --git a/src/IFSelect/IFSelect_DispPerSignature.hxx b/src/IFSelect/IFSelect_DispPerSignature.hxx index ff37907d7d..94622de19e 100644 --- a/src/IFSelect/IFSelect_DispPerSignature.hxx +++ b/src/IFSelect/IFSelect_DispPerSignature.hxx @@ -21,8 +21,6 @@ #include #include -#include -#include #include class IFSelect_SignCounter; class TCollection_AsciiString; diff --git a/src/IFSelect/IFSelect_Dispatch.cxx b/src/IFSelect/IFSelect_Dispatch.cxx index d34d8d0503..db9b00d002 100644 --- a/src/IFSelect/IFSelect_Dispatch.cxx +++ b/src/IFSelect/IFSelect_Dispatch.cxx @@ -15,11 +15,9 @@ #include #include #include -#include #include #include #include -#include #include #include #include diff --git a/src/IFSelect/IFSelect_Dispatch.hxx b/src/IFSelect/IFSelect_Dispatch.hxx index 82b0b7d4ab..11c8126ffa 100644 --- a/src/IFSelect/IFSelect_Dispatch.hxx +++ b/src/IFSelect/IFSelect_Dispatch.hxx @@ -21,7 +21,6 @@ #include #include -#include #include class TCollection_HAsciiString; class IFSelect_Selection; diff --git a/src/IFSelect/IFSelect_EditForm.cxx b/src/IFSelect/IFSelect_EditForm.cxx index 2177a56c21..7065164e56 100644 --- a/src/IFSelect/IFSelect_EditForm.cxx +++ b/src/IFSelect/IFSelect_EditForm.cxx @@ -18,8 +18,6 @@ #include #include #include -#include -#include #include #include #include diff --git a/src/IFSelect/IFSelect_EditForm.hxx b/src/IFSelect/IFSelect_EditForm.hxx index 5d4469ea4b..857715a5b9 100644 --- a/src/IFSelect/IFSelect_EditForm.hxx +++ b/src/IFSelect/IFSelect_EditForm.hxx @@ -18,15 +18,11 @@ #define _IFSelect_EditForm_HeaderFile #include -#include -#include -#include #include #include #include #include -#include #include #include class IFSelect_Editor; diff --git a/src/IFSelect/IFSelect_Editor.cxx b/src/IFSelect/IFSelect_Editor.cxx index 6c224be4a3..49c9464c19 100644 --- a/src/IFSelect/IFSelect_Editor.cxx +++ b/src/IFSelect/IFSelect_Editor.cxx @@ -18,7 +18,6 @@ #include #include #include -#include #include #include #include diff --git a/src/IFSelect/IFSelect_Editor.hxx b/src/IFSelect/IFSelect_Editor.hxx index b85ed01d42..6cd9960bc1 100644 --- a/src/IFSelect/IFSelect_Editor.hxx +++ b/src/IFSelect/IFSelect_Editor.hxx @@ -25,9 +25,7 @@ #include #include #include -#include #include -#include #include #include #include diff --git a/src/IFSelect/IFSelect_Functions.cxx b/src/IFSelect/IFSelect_Functions.cxx index ce9c0f5235..4a89cb7a9b 100644 --- a/src/IFSelect/IFSelect_Functions.cxx +++ b/src/IFSelect/IFSelect_Functions.cxx @@ -15,7 +15,6 @@ #include #include -#include #include #include #include @@ -24,13 +23,10 @@ #include #include #include -#include #include #include #include -#include #include -#include #include #include #include @@ -51,7 +47,6 @@ #include #include #include -#include #include #include #include @@ -74,7 +69,6 @@ #include #include #include -#include #include // Decomposition of a file name in its parts : prefix, root, suffix diff --git a/src/IFSelect/IFSelect_Functions.hxx b/src/IFSelect/IFSelect_Functions.hxx index e17dfa008e..4c9887f562 100644 --- a/src/IFSelect/IFSelect_Functions.hxx +++ b/src/IFSelect/IFSelect_Functions.hxx @@ -24,7 +24,6 @@ #include #include #include -#include class Standard_Transient; class IFSelect_WorkSession; class IFSelect_Dispatch; diff --git a/src/IFSelect/IFSelect_GeneralModifier.hxx b/src/IFSelect/IFSelect_GeneralModifier.hxx index 44b4e46242..0a53c8ba73 100644 --- a/src/IFSelect/IFSelect_GeneralModifier.hxx +++ b/src/IFSelect/IFSelect_GeneralModifier.hxx @@ -20,7 +20,6 @@ #include #include -#include #include class IFSelect_Selection; class IFSelect_Dispatch; diff --git a/src/IFSelect/IFSelect_GraphCounter.cxx b/src/IFSelect/IFSelect_GraphCounter.cxx index a5aa6f8824..36a7300621 100644 --- a/src/IFSelect/IFSelect_GraphCounter.cxx +++ b/src/IFSelect/IFSelect_GraphCounter.cxx @@ -20,7 +20,6 @@ #include #include -#include IMPLEMENT_STANDARD_RTTIEXT(IFSelect_GraphCounter,IFSelect_SignCounter) IFSelect_GraphCounter::IFSelect_GraphCounter diff --git a/src/IFSelect/IFSelect_GraphCounter.hxx b/src/IFSelect/IFSelect_GraphCounter.hxx index 60a01c626b..ca522b523b 100644 --- a/src/IFSelect/IFSelect_GraphCounter.hxx +++ b/src/IFSelect/IFSelect_GraphCounter.hxx @@ -18,10 +18,8 @@ #define _IFSelect_GraphCounter_HeaderFile #include -#include #include -#include #include class IFSelect_SelectDeduct; class Interface_Graph; diff --git a/src/IFSelect/IFSelect_HSeqOfSelection.hxx b/src/IFSelect/IFSelect_HSeqOfSelection.hxx index a85ebd3146..e2cdd5c46f 100644 --- a/src/IFSelect/IFSelect_HSeqOfSelection.hxx +++ b/src/IFSelect/IFSelect_HSeqOfSelection.hxx @@ -17,7 +17,6 @@ #ifndef IFSelect_HSeqOfSelection_HeaderFile #define IFSelect_HSeqOfSelection_HeaderFile -#include #include #include diff --git a/src/IFSelect/IFSelect_IntParam.hxx b/src/IFSelect/IFSelect_IntParam.hxx index ae61944699..4d48a064d9 100644 --- a/src/IFSelect/IFSelect_IntParam.hxx +++ b/src/IFSelect/IFSelect_IntParam.hxx @@ -18,12 +18,10 @@ #define _IFSelect_IntParam_HeaderFile #include -#include #include #include #include -#include class IFSelect_IntParam; DEFINE_STANDARD_HANDLE(IFSelect_IntParam, Standard_Transient) diff --git a/src/IFSelect/IFSelect_ListEditor.hxx b/src/IFSelect/IFSelect_ListEditor.hxx index ac71d7b701..7c8608f200 100644 --- a/src/IFSelect/IFSelect_ListEditor.hxx +++ b/src/IFSelect/IFSelect_ListEditor.hxx @@ -18,13 +18,11 @@ #define _IFSelect_ListEditor_HeaderFile #include -#include #include #include #include #include -#include class Interface_TypedValue; class Interface_InterfaceModel; class TCollection_HAsciiString; diff --git a/src/IFSelect/IFSelect_ModelCopier.cxx b/src/IFSelect/IFSelect_ModelCopier.cxx index 7b9ce4922f..79ddb58d50 100644 --- a/src/IFSelect/IFSelect_ModelCopier.cxx +++ b/src/IFSelect/IFSelect_ModelCopier.cxx @@ -35,7 +35,6 @@ #include #include #include -#include #include IMPLEMENT_STANDARD_RTTIEXT(IFSelect_ModelCopier,Standard_Transient) diff --git a/src/IFSelect/IFSelect_ModelCopier.hxx b/src/IFSelect/IFSelect_ModelCopier.hxx index 5363202c2d..694e81c4ff 100644 --- a/src/IFSelect/IFSelect_ModelCopier.hxx +++ b/src/IFSelect/IFSelect_ModelCopier.hxx @@ -26,9 +26,7 @@ #include #include #include -#include #include -#include class IFSelect_ShareOut; class TCollection_AsciiString; class Interface_InterfaceModel; diff --git a/src/IFSelect/IFSelect_ModifReorder.hxx b/src/IFSelect/IFSelect_ModifReorder.hxx index b974c6bf2a..d07a99c8f4 100644 --- a/src/IFSelect/IFSelect_ModifReorder.hxx +++ b/src/IFSelect/IFSelect_ModifReorder.hxx @@ -20,7 +20,6 @@ #include #include -#include #include class IFSelect_ContextModif; class Interface_InterfaceModel; diff --git a/src/IFSelect/IFSelect_Modifier.hxx b/src/IFSelect/IFSelect_Modifier.hxx index 3f15356c80..9e98826452 100644 --- a/src/IFSelect/IFSelect_Modifier.hxx +++ b/src/IFSelect/IFSelect_Modifier.hxx @@ -21,7 +21,6 @@ #include #include -#include class IFSelect_ContextModif; class Interface_InterfaceModel; class Interface_Protocol; diff --git a/src/IFSelect/IFSelect_PacketList.hxx b/src/IFSelect/IFSelect_PacketList.hxx index 0f7759c9a9..3b01d8e9bb 100644 --- a/src/IFSelect/IFSelect_PacketList.hxx +++ b/src/IFSelect/IFSelect_PacketList.hxx @@ -18,15 +18,11 @@ #define _IFSelect_PacketList_HeaderFile #include -#include -#include #include #include -#include #include #include -#include #include class Interface_InterfaceModel; class Interface_EntityIterator; diff --git a/src/IFSelect/IFSelect_ParamEditor.hxx b/src/IFSelect/IFSelect_ParamEditor.hxx index 2e207e1fc4..c80c8cd152 100644 --- a/src/IFSelect/IFSelect_ParamEditor.hxx +++ b/src/IFSelect/IFSelect_ParamEditor.hxx @@ -23,8 +23,6 @@ #include #include #include -#include -#include #include class Interface_TypedValue; class IFSelect_EditForm; diff --git a/src/IFSelect/IFSelect_SelectAnyList.cxx b/src/IFSelect/IFSelect_SelectAnyList.cxx index a4c8c9fa94..c9686867dd 100644 --- a/src/IFSelect/IFSelect_SelectAnyList.cxx +++ b/src/IFSelect/IFSelect_SelectAnyList.cxx @@ -17,7 +17,6 @@ #include #include #include -#include #include #include #include diff --git a/src/IFSelect/IFSelect_SelectAnyList.hxx b/src/IFSelect/IFSelect_SelectAnyList.hxx index debe894608..c47868da70 100644 --- a/src/IFSelect/IFSelect_SelectAnyList.hxx +++ b/src/IFSelect/IFSelect_SelectAnyList.hxx @@ -22,7 +22,6 @@ #include #include -#include class IFSelect_IntParam; class Interface_EntityIterator; class Standard_Transient; diff --git a/src/IFSelect/IFSelect_SelectAnyType.hxx b/src/IFSelect/IFSelect_SelectAnyType.hxx index 865cf1ff32..28eb5ee658 100644 --- a/src/IFSelect/IFSelect_SelectAnyType.hxx +++ b/src/IFSelect/IFSelect_SelectAnyType.hxx @@ -22,7 +22,6 @@ #include #include -#include #include class Standard_Transient; class Interface_InterfaceModel; diff --git a/src/IFSelect/IFSelect_SelectCombine.hxx b/src/IFSelect/IFSelect_SelectCombine.hxx index 794383dccc..b6c2031f06 100644 --- a/src/IFSelect/IFSelect_SelectCombine.hxx +++ b/src/IFSelect/IFSelect_SelectCombine.hxx @@ -23,7 +23,6 @@ #include #include #include -#include class IFSelect_SelectionIterator; diff --git a/src/IFSelect/IFSelect_SelectControl.hxx b/src/IFSelect/IFSelect_SelectControl.hxx index 2eeaac20ab..3951bda112 100644 --- a/src/IFSelect/IFSelect_SelectControl.hxx +++ b/src/IFSelect/IFSelect_SelectControl.hxx @@ -21,7 +21,6 @@ #include #include -#include class IFSelect_SelectionIterator; diff --git a/src/IFSelect/IFSelect_SelectDeduct.cxx b/src/IFSelect/IFSelect_SelectDeduct.cxx index ce5c55b892..62701357f6 100644 --- a/src/IFSelect/IFSelect_SelectDeduct.cxx +++ b/src/IFSelect/IFSelect_SelectDeduct.cxx @@ -18,7 +18,6 @@ #include #include #include -#include #include IMPLEMENT_STANDARD_RTTIEXT(IFSelect_SelectDeduct,IFSelect_Selection) diff --git a/src/IFSelect/IFSelect_SelectDeduct.hxx b/src/IFSelect/IFSelect_SelectDeduct.hxx index e5f8dbb955..c23fe4c8f1 100644 --- a/src/IFSelect/IFSelect_SelectDeduct.hxx +++ b/src/IFSelect/IFSelect_SelectDeduct.hxx @@ -21,7 +21,6 @@ #include #include -#include class IFSelect_SelectPointed; class Interface_EntityIterator; class Interface_Graph; diff --git a/src/IFSelect/IFSelect_SelectDiff.hxx b/src/IFSelect/IFSelect_SelectDiff.hxx index 4709c1cf28..5c9e610c85 100644 --- a/src/IFSelect/IFSelect_SelectDiff.hxx +++ b/src/IFSelect/IFSelect_SelectDiff.hxx @@ -21,7 +21,6 @@ #include #include -#include class Interface_EntityIterator; class Interface_Graph; class TCollection_AsciiString; diff --git a/src/IFSelect/IFSelect_SelectErrorEntities.hxx b/src/IFSelect/IFSelect_SelectErrorEntities.hxx index b3fde551d2..7614310097 100644 --- a/src/IFSelect/IFSelect_SelectErrorEntities.hxx +++ b/src/IFSelect/IFSelect_SelectErrorEntities.hxx @@ -21,7 +21,6 @@ #include #include -#include #include class Standard_Transient; class Interface_InterfaceModel; diff --git a/src/IFSelect/IFSelect_SelectExplore.hxx b/src/IFSelect/IFSelect_SelectExplore.hxx index 85004e6198..d0ad35944f 100644 --- a/src/IFSelect/IFSelect_SelectExplore.hxx +++ b/src/IFSelect/IFSelect_SelectExplore.hxx @@ -22,7 +22,6 @@ #include #include -#include class Interface_EntityIterator; class Interface_Graph; class Standard_Transient; diff --git a/src/IFSelect/IFSelect_SelectExtract.hxx b/src/IFSelect/IFSelect_SelectExtract.hxx index 066b780d6f..8da3cd95cf 100644 --- a/src/IFSelect/IFSelect_SelectExtract.hxx +++ b/src/IFSelect/IFSelect_SelectExtract.hxx @@ -20,7 +20,6 @@ #include #include -#include #include #include class Interface_EntityIterator; diff --git a/src/IFSelect/IFSelect_SelectFlag.hxx b/src/IFSelect/IFSelect_SelectFlag.hxx index 719123af87..35de262a7b 100644 --- a/src/IFSelect/IFSelect_SelectFlag.hxx +++ b/src/IFSelect/IFSelect_SelectFlag.hxx @@ -18,12 +18,9 @@ #define _IFSelect_SelectFlag_HeaderFile #include -#include #include #include -#include -#include #include class Interface_EntityIterator; class Interface_Graph; diff --git a/src/IFSelect/IFSelect_SelectInList.cxx b/src/IFSelect/IFSelect_SelectInList.cxx index 1caec0752c..be4e750aee 100644 --- a/src/IFSelect/IFSelect_SelectInList.cxx +++ b/src/IFSelect/IFSelect_SelectInList.cxx @@ -14,7 +14,6 @@ #include #include -#include #include #include diff --git a/src/IFSelect/IFSelect_SelectIncorrectEntities.hxx b/src/IFSelect/IFSelect_SelectIncorrectEntities.hxx index 6400ceef05..64b5fe7189 100644 --- a/src/IFSelect/IFSelect_SelectIncorrectEntities.hxx +++ b/src/IFSelect/IFSelect_SelectIncorrectEntities.hxx @@ -18,7 +18,6 @@ #define _IFSelect_SelectIncorrectEntities_HeaderFile #include -#include #include diff --git a/src/IFSelect/IFSelect_SelectPointed.cxx b/src/IFSelect/IFSelect_SelectPointed.cxx index a043635ffb..7524af418a 100644 --- a/src/IFSelect/IFSelect_SelectPointed.cxx +++ b/src/IFSelect/IFSelect_SelectPointed.cxx @@ -17,7 +17,6 @@ #include #include #include -#include #include #include #include diff --git a/src/IFSelect/IFSelect_SelectPointed.hxx b/src/IFSelect/IFSelect_SelectPointed.hxx index 6757980de0..8d853d1532 100644 --- a/src/IFSelect/IFSelect_SelectPointed.hxx +++ b/src/IFSelect/IFSelect_SelectPointed.hxx @@ -20,8 +20,6 @@ #include #include -#include -#include #include #include #include diff --git a/src/IFSelect/IFSelect_SelectRange.cxx b/src/IFSelect/IFSelect_SelectRange.cxx index 55d4ef54a9..1512d09b3c 100644 --- a/src/IFSelect/IFSelect_SelectRange.cxx +++ b/src/IFSelect/IFSelect_SelectRange.cxx @@ -15,7 +15,6 @@ #include #include #include -#include #include #include #include diff --git a/src/IFSelect/IFSelect_SelectRange.hxx b/src/IFSelect/IFSelect_SelectRange.hxx index bc594b6b22..3c915eb791 100644 --- a/src/IFSelect/IFSelect_SelectRange.hxx +++ b/src/IFSelect/IFSelect_SelectRange.hxx @@ -21,7 +21,6 @@ #include #include -#include #include class IFSelect_IntParam; class Standard_Transient; diff --git a/src/IFSelect/IFSelect_SelectRootComps.hxx b/src/IFSelect/IFSelect_SelectRootComps.hxx index 52d07fdc3f..ed47750d9c 100644 --- a/src/IFSelect/IFSelect_SelectRootComps.hxx +++ b/src/IFSelect/IFSelect_SelectRootComps.hxx @@ -21,7 +21,6 @@ #include #include -#include #include class Interface_EntityIterator; class Interface_Graph; diff --git a/src/IFSelect/IFSelect_SelectRoots.hxx b/src/IFSelect/IFSelect_SelectRoots.hxx index c685ca7566..3a1c6d7474 100644 --- a/src/IFSelect/IFSelect_SelectRoots.hxx +++ b/src/IFSelect/IFSelect_SelectRoots.hxx @@ -21,7 +21,6 @@ #include #include -#include #include class Interface_EntityIterator; class Interface_Graph; diff --git a/src/IFSelect/IFSelect_SelectSent.hxx b/src/IFSelect/IFSelect_SelectSent.hxx index eb90d48a45..c2dc361239 100644 --- a/src/IFSelect/IFSelect_SelectSent.hxx +++ b/src/IFSelect/IFSelect_SelectSent.hxx @@ -21,7 +21,6 @@ #include #include -#include #include class Interface_EntityIterator; class Interface_Graph; diff --git a/src/IFSelect/IFSelect_SelectShared.cxx b/src/IFSelect/IFSelect_SelectShared.cxx index 3085d52c3f..59e5d7f6d2 100644 --- a/src/IFSelect/IFSelect_SelectShared.cxx +++ b/src/IFSelect/IFSelect_SelectShared.cxx @@ -13,7 +13,6 @@ #include -#include #include #include #include diff --git a/src/IFSelect/IFSelect_SelectSharing.cxx b/src/IFSelect/IFSelect_SelectSharing.cxx index 9336cade6b..0bc3715a40 100644 --- a/src/IFSelect/IFSelect_SelectSharing.cxx +++ b/src/IFSelect/IFSelect_SelectSharing.cxx @@ -13,7 +13,6 @@ #include -#include #include #include #include diff --git a/src/IFSelect/IFSelect_SelectSignature.hxx b/src/IFSelect/IFSelect_SelectSignature.hxx index 99afaae66e..ffbd37bd68 100644 --- a/src/IFSelect/IFSelect_SelectSignature.hxx +++ b/src/IFSelect/IFSelect_SelectSignature.hxx @@ -18,15 +18,11 @@ #define _IFSelect_SelectSignature_HeaderFile #include -#include -#include #include #include #include #include -#include -#include class IFSelect_Signature; class IFSelect_SignCounter; class Standard_Transient; diff --git a/src/IFSelect/IFSelect_SelectSignedShared.hxx b/src/IFSelect/IFSelect_SelectSignedShared.hxx index 60f0980699..fe1fb67f6a 100644 --- a/src/IFSelect/IFSelect_SelectSignedShared.hxx +++ b/src/IFSelect/IFSelect_SelectSignedShared.hxx @@ -18,12 +18,9 @@ #define _IFSelect_SelectSignedShared_HeaderFile #include -#include #include -#include #include -#include #include class IFSelect_Signature; class Standard_Transient; diff --git a/src/IFSelect/IFSelect_SelectSignedSharing.hxx b/src/IFSelect/IFSelect_SelectSignedSharing.hxx index 4a55fedd39..95820e094e 100644 --- a/src/IFSelect/IFSelect_SelectSignedSharing.hxx +++ b/src/IFSelect/IFSelect_SelectSignedSharing.hxx @@ -18,12 +18,9 @@ #define _IFSelect_SelectSignedSharing_HeaderFile #include -#include #include -#include #include -#include #include class IFSelect_Signature; class Standard_Transient; diff --git a/src/IFSelect/IFSelect_SelectSuite.cxx b/src/IFSelect/IFSelect_SelectSuite.cxx index 12d8b5250e..81a4e94ab3 100644 --- a/src/IFSelect/IFSelect_SelectSuite.cxx +++ b/src/IFSelect/IFSelect_SelectSuite.cxx @@ -12,13 +12,10 @@ // commercial license or contractual agreement. -#include -#include #include #include #include #include -#include #include #include diff --git a/src/IFSelect/IFSelect_SelectSuite.hxx b/src/IFSelect/IFSelect_SelectSuite.hxx index 72008b83d8..9e5907e60f 100644 --- a/src/IFSelect/IFSelect_SelectSuite.hxx +++ b/src/IFSelect/IFSelect_SelectSuite.hxx @@ -23,7 +23,6 @@ #include #include #include -#include #include #include class IFSelect_Selection; diff --git a/src/IFSelect/IFSelect_SelectUnknownEntities.hxx b/src/IFSelect/IFSelect_SelectUnknownEntities.hxx index ab9643ca02..7a2c2d7ff1 100644 --- a/src/IFSelect/IFSelect_SelectUnknownEntities.hxx +++ b/src/IFSelect/IFSelect_SelectUnknownEntities.hxx @@ -21,7 +21,6 @@ #include #include -#include #include class Standard_Transient; class Interface_InterfaceModel; diff --git a/src/IFSelect/IFSelect_Selection.cxx b/src/IFSelect/IFSelect_Selection.cxx index cf4ff89c7c..0fcc5ef743 100644 --- a/src/IFSelect/IFSelect_Selection.cxx +++ b/src/IFSelect/IFSelect_Selection.cxx @@ -14,10 +14,8 @@ #include #include -#include #include #include -#include #include #include diff --git a/src/IFSelect/IFSelect_Selection.hxx b/src/IFSelect/IFSelect_Selection.hxx index 14cb0d2fcf..00e386f4ce 100644 --- a/src/IFSelect/IFSelect_Selection.hxx +++ b/src/IFSelect/IFSelect_Selection.hxx @@ -21,7 +21,6 @@ #include #include -#include class Interface_EntityIterator; class Interface_Graph; class IFSelect_SelectionIterator; diff --git a/src/IFSelect/IFSelect_SelectionIterator.hxx b/src/IFSelect/IFSelect_SelectionIterator.hxx index 05f59dfd9c..60b8a79878 100644 --- a/src/IFSelect/IFSelect_SelectionIterator.hxx +++ b/src/IFSelect/IFSelect_SelectionIterator.hxx @@ -24,7 +24,6 @@ #include #include #include -#include class IFSelect_Selection; //! Defines an Iterator on a list of Selections diff --git a/src/IFSelect/IFSelect_SessionDumper.hxx b/src/IFSelect/IFSelect_SessionDumper.hxx index 84ccb4dd46..1c89af0096 100644 --- a/src/IFSelect/IFSelect_SessionDumper.hxx +++ b/src/IFSelect/IFSelect_SessionDumper.hxx @@ -21,7 +21,6 @@ #include #include -#include class IFSelect_SessionFile; class TCollection_AsciiString; diff --git a/src/IFSelect/IFSelect_SessionFile.cxx b/src/IFSelect/IFSelect_SessionFile.cxx index 98bd57b777..0f60292faf 100644 --- a/src/IFSelect/IFSelect_SessionFile.cxx +++ b/src/IFSelect/IFSelect_SessionFile.cxx @@ -13,12 +13,8 @@ #include -#include -#include #include -#include #include -#include #include #include #include diff --git a/src/IFSelect/IFSelect_SessionFile.hxx b/src/IFSelect/IFSelect_SessionFile.hxx index 9c6236dfc7..930efc0859 100644 --- a/src/IFSelect/IFSelect_SessionFile.hxx +++ b/src/IFSelect/IFSelect_SessionFile.hxx @@ -22,13 +22,11 @@ #include #include -#include #include #include #include #include #include -#include class IFSelect_WorkSession; class Standard_Transient; diff --git a/src/IFSelect/IFSelect_SessionPilot.cxx b/src/IFSelect/IFSelect_SessionPilot.cxx index 407f274334..acf782e10e 100644 --- a/src/IFSelect/IFSelect_SessionPilot.cxx +++ b/src/IFSelect/IFSelect_SessionPilot.cxx @@ -12,15 +12,11 @@ // commercial license or contractual agreement. -#include -#include #include #include #include #include #include -#include -#include #include #include #include diff --git a/src/IFSelect/IFSelect_SessionPilot.hxx b/src/IFSelect/IFSelect_SessionPilot.hxx index 7b62f8d405..34d4849a83 100644 --- a/src/IFSelect/IFSelect_SessionPilot.hxx +++ b/src/IFSelect/IFSelect_SessionPilot.hxx @@ -18,16 +18,11 @@ #define _IFSelect_SessionPilot_HeaderFile #include -#include -#include #include #include #include -#include -#include #include -#include #include #include class IFSelect_WorkSession; diff --git a/src/IFSelect/IFSelect_ShareOut.cxx b/src/IFSelect/IFSelect_ShareOut.cxx index 396bffe3b5..3b979ee5d8 100644 --- a/src/IFSelect/IFSelect_ShareOut.cxx +++ b/src/IFSelect/IFSelect_ShareOut.cxx @@ -13,15 +13,11 @@ #include -#include #include #include -#include #include -#include #include #include -#include #include #include diff --git a/src/IFSelect/IFSelect_ShareOut.hxx b/src/IFSelect/IFSelect_ShareOut.hxx index e27a7183f6..7125efb9c7 100644 --- a/src/IFSelect/IFSelect_ShareOut.hxx +++ b/src/IFSelect/IFSelect_ShareOut.hxx @@ -24,7 +24,6 @@ #include #include #include -#include class TCollection_HAsciiString; class IFSelect_Dispatch; class IFSelect_GeneralModifier; diff --git a/src/IFSelect/IFSelect_ShareOutResult.cxx b/src/IFSelect/IFSelect_ShareOutResult.cxx index 0ab0b04d38..e1159e3f18 100644 --- a/src/IFSelect/IFSelect_ShareOutResult.cxx +++ b/src/IFSelect/IFSelect_ShareOutResult.cxx @@ -13,16 +13,13 @@ #include -#include #include #include #include #include #include #include -#include #include -#include #include IFSelect_ShareOutResult::IFSelect_ShareOutResult diff --git a/src/IFSelect/IFSelect_ShareOutResult.hxx b/src/IFSelect/IFSelect_ShareOutResult.hxx index 06a4ae4396..59c1efff44 100644 --- a/src/IFSelect/IFSelect_ShareOutResult.hxx +++ b/src/IFSelect/IFSelect_ShareOutResult.hxx @@ -21,9 +21,7 @@ #include #include -#include #include -#include #include #include class IFSelect_ShareOut; diff --git a/src/IFSelect/IFSelect_SignAncestor.hxx b/src/IFSelect/IFSelect_SignAncestor.hxx index d8d7da35ff..688ce6e460 100644 --- a/src/IFSelect/IFSelect_SignAncestor.hxx +++ b/src/IFSelect/IFSelect_SignAncestor.hxx @@ -18,10 +18,8 @@ #define _IFSelect_SignAncestor_HeaderFile #include -#include #include -#include class Standard_Transient; class Interface_InterfaceModel; class TCollection_AsciiString; diff --git a/src/IFSelect/IFSelect_SignCategory.hxx b/src/IFSelect/IFSelect_SignCategory.hxx index 705569bc29..98f510d8b9 100644 --- a/src/IFSelect/IFSelect_SignCategory.hxx +++ b/src/IFSelect/IFSelect_SignCategory.hxx @@ -18,10 +18,8 @@ #define _IFSelect_SignCategory_HeaderFile #include -#include #include -#include class Standard_Transient; class Interface_InterfaceModel; diff --git a/src/IFSelect/IFSelect_SignCounter.hxx b/src/IFSelect/IFSelect_SignCounter.hxx index 342d0893ba..7bf1d74d0b 100644 --- a/src/IFSelect/IFSelect_SignCounter.hxx +++ b/src/IFSelect/IFSelect_SignCounter.hxx @@ -20,12 +20,10 @@ #include #include -#include #include #include #include #include -#include class IFSelect_Signature; class IFSelect_Selection; class Standard_Transient; diff --git a/src/IFSelect/IFSelect_SignMultiple.cxx b/src/IFSelect/IFSelect_SignMultiple.cxx index 50094ad13c..3b5c691eb4 100644 --- a/src/IFSelect/IFSelect_SignMultiple.cxx +++ b/src/IFSelect/IFSelect_SignMultiple.cxx @@ -12,7 +12,6 @@ // commercial license or contractual agreement. -#include #include #include #include diff --git a/src/IFSelect/IFSelect_SignMultiple.hxx b/src/IFSelect/IFSelect_SignMultiple.hxx index 0b1dbe4a27..c0e2925242 100644 --- a/src/IFSelect/IFSelect_SignMultiple.hxx +++ b/src/IFSelect/IFSelect_SignMultiple.hxx @@ -18,14 +18,11 @@ #define _IFSelect_SignMultiple_HeaderFile #include -#include #include #include #include -#include #include -#include class Standard_Transient; class Interface_InterfaceModel; class TCollection_AsciiString; diff --git a/src/IFSelect/IFSelect_SignType.hxx b/src/IFSelect/IFSelect_SignType.hxx index 5d871f5c1c..4776b6ae33 100644 --- a/src/IFSelect/IFSelect_SignType.hxx +++ b/src/IFSelect/IFSelect_SignType.hxx @@ -18,11 +18,8 @@ #define _IFSelect_SignType_HeaderFile #include -#include -#include #include -#include class Standard_Transient; class Interface_InterfaceModel; diff --git a/src/IFSelect/IFSelect_SignValidity.hxx b/src/IFSelect/IFSelect_SignValidity.hxx index 60f592a780..2a41de18a8 100644 --- a/src/IFSelect/IFSelect_SignValidity.hxx +++ b/src/IFSelect/IFSelect_SignValidity.hxx @@ -18,10 +18,8 @@ #define _IFSelect_SignValidity_HeaderFile #include -#include #include -#include class Standard_Transient; class Interface_InterfaceModel; diff --git a/src/IFSelect/IFSelect_Signature.hxx b/src/IFSelect/IFSelect_Signature.hxx index 3e4d35c263..e99b7cbc7e 100644 --- a/src/IFSelect/IFSelect_Signature.hxx +++ b/src/IFSelect/IFSelect_Signature.hxx @@ -18,14 +18,11 @@ #define _IFSelect_Signature_HeaderFile #include -#include #include #include #include #include -#include -#include class Standard_Transient; class Interface_InterfaceModel; diff --git a/src/IFSelect/IFSelect_SignatureList.hxx b/src/IFSelect/IFSelect_SignatureList.hxx index 4ff8d4986d..110e5e6cf2 100644 --- a/src/IFSelect/IFSelect_SignatureList.hxx +++ b/src/IFSelect/IFSelect_SignatureList.hxx @@ -18,17 +18,12 @@ #define _IFSelect_SignatureList_HeaderFile #include -#include -#include #include -#include #include -#include #include #include #include -#include #include class TCollection_HAsciiString; class Interface_InterfaceModel; diff --git a/src/IFSelect/IFSelect_TransformStandard.hxx b/src/IFSelect/IFSelect_TransformStandard.hxx index 91da146dae..1143572d27 100644 --- a/src/IFSelect/IFSelect_TransformStandard.hxx +++ b/src/IFSelect/IFSelect_TransformStandard.hxx @@ -20,7 +20,6 @@ #include #include -#include #include #include #include diff --git a/src/IFSelect/IFSelect_Transformer.cxx b/src/IFSelect/IFSelect_Transformer.cxx index d84c26db1e..aef80c0abc 100644 --- a/src/IFSelect/IFSelect_Transformer.cxx +++ b/src/IFSelect/IFSelect_Transformer.cxx @@ -19,7 +19,6 @@ #include #include #include -#include IMPLEMENT_STANDARD_RTTIEXT(IFSelect_Transformer,Standard_Transient) diff --git a/src/IFSelect/IFSelect_Transformer.hxx b/src/IFSelect/IFSelect_Transformer.hxx index fe812d8ae0..1ba50749b0 100644 --- a/src/IFSelect/IFSelect_Transformer.hxx +++ b/src/IFSelect/IFSelect_Transformer.hxx @@ -21,7 +21,6 @@ #include #include -#include class Interface_Graph; class Interface_Protocol; class Interface_CheckIterator; diff --git a/src/IFSelect/IFSelect_WorkLibrary.hxx b/src/IFSelect/IFSelect_WorkLibrary.hxx index b129d6871d..3804f3ddc0 100644 --- a/src/IFSelect/IFSelect_WorkLibrary.hxx +++ b/src/IFSelect/IFSelect_WorkLibrary.hxx @@ -23,8 +23,6 @@ #include #include #include -#include -#include class Interface_InterfaceModel; class Interface_Protocol; class IFSelect_ContextWrite; diff --git a/src/IFSelect/IFSelect_WorkSession.cxx b/src/IFSelect/IFSelect_WorkSession.cxx index 85998aebd2..0de1d2a60f 100644 --- a/src/IFSelect/IFSelect_WorkSession.cxx +++ b/src/IFSelect/IFSelect_WorkSession.cxx @@ -16,39 +16,24 @@ #include #include -#include -#include -#include -#include #include -#include -#include #include #include #include #include #include -#include -#include -#include #include -#include -#include #include #include #include #include -#include #include #include -#include #include #include -#include #include #include #include -#include #include #include #include @@ -59,7 +44,6 @@ #include #include #include -#include #include #include #include @@ -68,7 +52,6 @@ #include #include #include -#include #include #include #include diff --git a/src/IFSelect/IFSelect_WorkSession.hxx b/src/IFSelect/IFSelect_WorkSession.hxx index 14f2f0b08b..c529b7d99e 100644 --- a/src/IFSelect/IFSelect_WorkSession.hxx +++ b/src/IFSelect/IFSelect_WorkSession.hxx @@ -20,7 +20,6 @@ #include #include -#include #include #include #include @@ -32,14 +31,9 @@ #include #include #include -#include -#include #include #include -#include -#include #include -#include class IFSelect_ShareOut; class IFSelect_WorkLibrary; class Interface_Protocol; diff --git a/src/IGESAppli/IGESAppli_DrilledHole.hxx b/src/IGESAppli/IGESAppli_DrilledHole.hxx index c533f9084e..2c46b51d0e 100644 --- a/src/IGESAppli/IGESAppli_DrilledHole.hxx +++ b/src/IGESAppli/IGESAppli_DrilledHole.hxx @@ -18,12 +18,10 @@ #define _IGESAppli_DrilledHole_HeaderFile #include -#include #include #include #include -#include class IGESAppli_DrilledHole; diff --git a/src/IGESAppli/IGESAppli_ElementResults.hxx b/src/IGESAppli/IGESAppli_ElementResults.hxx index 030c1cf391..6539f1832b 100644 --- a/src/IGESAppli/IGESAppli_ElementResults.hxx +++ b/src/IGESAppli/IGESAppli_ElementResults.hxx @@ -18,7 +18,6 @@ #define _IGESAppli_ElementResults_HeaderFile #include -#include #include #include diff --git a/src/IGESAppli/IGESAppli_FiniteElement.cxx b/src/IGESAppli/IGESAppli_FiniteElement.cxx index 0035a1083c..c0c3e667ad 100644 --- a/src/IGESAppli/IGESAppli_FiniteElement.cxx +++ b/src/IGESAppli/IGESAppli_FiniteElement.cxx @@ -20,7 +20,6 @@ #include #include #include -#include #include #include diff --git a/src/IGESAppli/IGESAppli_FiniteElement.hxx b/src/IGESAppli/IGESAppli_FiniteElement.hxx index 4782f02abb..3a9ed075c8 100644 --- a/src/IGESAppli/IGESAppli_FiniteElement.hxx +++ b/src/IGESAppli/IGESAppli_FiniteElement.hxx @@ -18,7 +18,6 @@ #define _IGESAppli_FiniteElement_HeaderFile #include -#include #include #include diff --git a/src/IGESAppli/IGESAppli_Flow.cxx b/src/IGESAppli/IGESAppli_Flow.cxx index 7a3c4b451d..efe614cc26 100644 --- a/src/IGESAppli/IGESAppli_Flow.cxx +++ b/src/IGESAppli/IGESAppli_Flow.cxx @@ -20,8 +20,6 @@ #include #include #include -#include -#include #include #include diff --git a/src/IGESAppli/IGESAppli_Flow.hxx b/src/IGESAppli/IGESAppli_Flow.hxx index 3d479f8852..ccc9a91d0a 100644 --- a/src/IGESAppli/IGESAppli_Flow.hxx +++ b/src/IGESAppli/IGESAppli_Flow.hxx @@ -18,7 +18,6 @@ #define _IGESAppli_Flow_HeaderFile #include -#include #include #include @@ -26,7 +25,6 @@ #include #include #include -#include class IGESDraw_ConnectPoint; class TCollection_HAsciiString; class IGESGraph_TextDisplayTemplate; diff --git a/src/IGESAppli/IGESAppli_FlowLineSpec.cxx b/src/IGESAppli/IGESAppli_FlowLineSpec.cxx index 569acdaadc..697dba0827 100644 --- a/src/IGESAppli/IGESAppli_FlowLineSpec.cxx +++ b/src/IGESAppli/IGESAppli_FlowLineSpec.cxx @@ -18,7 +18,6 @@ #include #include -#include #include #include diff --git a/src/IGESAppli/IGESAppli_FlowLineSpec.hxx b/src/IGESAppli/IGESAppli_FlowLineSpec.hxx index 97050df9e4..0218b79edb 100644 --- a/src/IGESAppli/IGESAppli_FlowLineSpec.hxx +++ b/src/IGESAppli/IGESAppli_FlowLineSpec.hxx @@ -18,7 +18,6 @@ #define _IGESAppli_FlowLineSpec_HeaderFile #include -#include #include #include diff --git a/src/IGESAppli/IGESAppli_GeneralModule.hxx b/src/IGESAppli/IGESAppli_GeneralModule.hxx index 535bb5b34a..6438a2ea75 100644 --- a/src/IGESAppli/IGESAppli_GeneralModule.hxx +++ b/src/IGESAppli/IGESAppli_GeneralModule.hxx @@ -22,7 +22,6 @@ #include #include -#include class IGESData_IGESEntity; class Interface_EntityIterator; class IGESData_DirChecker; diff --git a/src/IGESAppli/IGESAppli_HArray1OfFiniteElement.hxx b/src/IGESAppli/IGESAppli_HArray1OfFiniteElement.hxx index 0bab1cdbdb..88431bd80e 100644 --- a/src/IGESAppli/IGESAppli_HArray1OfFiniteElement.hxx +++ b/src/IGESAppli/IGESAppli_HArray1OfFiniteElement.hxx @@ -17,7 +17,6 @@ #ifndef IGESAppli_HArray1OfFiniteElement_HeaderFile #define IGESAppli_HArray1OfFiniteElement_HeaderFile -#include #include #include diff --git a/src/IGESAppli/IGESAppli_HArray1OfNode.hxx b/src/IGESAppli/IGESAppli_HArray1OfNode.hxx index 23ceae72d8..aad822f6c7 100644 --- a/src/IGESAppli/IGESAppli_HArray1OfNode.hxx +++ b/src/IGESAppli/IGESAppli_HArray1OfNode.hxx @@ -17,7 +17,6 @@ #ifndef IGESAppli_HArray1OfNode_HeaderFile #define IGESAppli_HArray1OfNode_HeaderFile -#include #include #include diff --git a/src/IGESAppli/IGESAppli_LevelFunction.hxx b/src/IGESAppli/IGESAppli_LevelFunction.hxx index fd98e0def3..0d04296976 100644 --- a/src/IGESAppli/IGESAppli_LevelFunction.hxx +++ b/src/IGESAppli/IGESAppli_LevelFunction.hxx @@ -18,7 +18,6 @@ #define _IGESAppli_LevelFunction_HeaderFile #include -#include #include #include diff --git a/src/IGESAppli/IGESAppli_LevelToPWBLayerMap.cxx b/src/IGESAppli/IGESAppli_LevelToPWBLayerMap.cxx index 78c5b482e8..6552811e85 100644 --- a/src/IGESAppli/IGESAppli_LevelToPWBLayerMap.cxx +++ b/src/IGESAppli/IGESAppli_LevelToPWBLayerMap.cxx @@ -18,7 +18,6 @@ #include #include -#include #include #include diff --git a/src/IGESAppli/IGESAppli_LevelToPWBLayerMap.hxx b/src/IGESAppli/IGESAppli_LevelToPWBLayerMap.hxx index 2604d9c991..69576a480d 100644 --- a/src/IGESAppli/IGESAppli_LevelToPWBLayerMap.hxx +++ b/src/IGESAppli/IGESAppli_LevelToPWBLayerMap.hxx @@ -18,7 +18,6 @@ #define _IGESAppli_LevelToPWBLayerMap_HeaderFile #include -#include #include #include diff --git a/src/IGESAppli/IGESAppli_LineWidening.hxx b/src/IGESAppli/IGESAppli_LineWidening.hxx index f2457351a3..19edd83a0a 100644 --- a/src/IGESAppli/IGESAppli_LineWidening.hxx +++ b/src/IGESAppli/IGESAppli_LineWidening.hxx @@ -18,7 +18,6 @@ #define _IGESAppli_LineWidening_HeaderFile #include -#include #include #include diff --git a/src/IGESAppli/IGESAppli_NodalConstraint.cxx b/src/IGESAppli/IGESAppli_NodalConstraint.cxx index b436fe5475..7d9b50fc66 100644 --- a/src/IGESAppli/IGESAppli_NodalConstraint.cxx +++ b/src/IGESAppli/IGESAppli_NodalConstraint.cxx @@ -20,7 +20,6 @@ #include #include #include -#include #include IMPLEMENT_STANDARD_RTTIEXT(IGESAppli_NodalConstraint,IGESData_IGESEntity) diff --git a/src/IGESAppli/IGESAppli_NodalConstraint.hxx b/src/IGESAppli/IGESAppli_NodalConstraint.hxx index e67a3b567d..40d130a865 100644 --- a/src/IGESAppli/IGESAppli_NodalConstraint.hxx +++ b/src/IGESAppli/IGESAppli_NodalConstraint.hxx @@ -18,7 +18,6 @@ #define _IGESAppli_NodalConstraint_HeaderFile #include -#include #include #include diff --git a/src/IGESAppli/IGESAppli_NodalDisplAndRot.cxx b/src/IGESAppli/IGESAppli_NodalDisplAndRot.cxx index b9b073d23b..9b6a0d861c 100644 --- a/src/IGESAppli/IGESAppli_NodalDisplAndRot.cxx +++ b/src/IGESAppli/IGESAppli_NodalDisplAndRot.cxx @@ -16,13 +16,11 @@ //-------------------------------------------------------------------- //-------------------------------------------------------------------- -#include #include #include #include #include #include -#include #include #include diff --git a/src/IGESAppli/IGESAppli_NodalDisplAndRot.hxx b/src/IGESAppli/IGESAppli_NodalDisplAndRot.hxx index 66748c696a..08bd9afdec 100644 --- a/src/IGESAppli/IGESAppli_NodalDisplAndRot.hxx +++ b/src/IGESAppli/IGESAppli_NodalDisplAndRot.hxx @@ -18,7 +18,6 @@ #define _IGESAppli_NodalDisplAndRot_HeaderFile #include -#include #include #include diff --git a/src/IGESAppli/IGESAppli_NodalResults.cxx b/src/IGESAppli/IGESAppli_NodalResults.cxx index 35328e297c..de7bdbab31 100644 --- a/src/IGESAppli/IGESAppli_NodalResults.cxx +++ b/src/IGESAppli/IGESAppli_NodalResults.cxx @@ -22,7 +22,6 @@ #include #include #include -#include IMPLEMENT_STANDARD_RTTIEXT(IGESAppli_NodalResults,IGESData_IGESEntity) diff --git a/src/IGESAppli/IGESAppli_NodalResults.hxx b/src/IGESAppli/IGESAppli_NodalResults.hxx index 728a9b50ec..b7f6b72b63 100644 --- a/src/IGESAppli/IGESAppli_NodalResults.hxx +++ b/src/IGESAppli/IGESAppli_NodalResults.hxx @@ -18,7 +18,6 @@ #define _IGESAppli_NodalResults_HeaderFile #include -#include #include #include diff --git a/src/IGESAppli/IGESAppli_Node.cxx b/src/IGESAppli/IGESAppli_Node.cxx index 4ba0822c03..879435977e 100644 --- a/src/IGESAppli/IGESAppli_Node.cxx +++ b/src/IGESAppli/IGESAppli_Node.cxx @@ -20,9 +20,7 @@ #include #include #include -#include #include -#include #include IMPLEMENT_STANDARD_RTTIEXT(IGESAppli_Node,IGESData_IGESEntity) diff --git a/src/IGESAppli/IGESAppli_PWBArtworkStackup.cxx b/src/IGESAppli/IGESAppli_PWBArtworkStackup.cxx index bbcee3be12..fcd0381c71 100644 --- a/src/IGESAppli/IGESAppli_PWBArtworkStackup.cxx +++ b/src/IGESAppli/IGESAppli_PWBArtworkStackup.cxx @@ -18,7 +18,6 @@ #include #include -#include #include #include diff --git a/src/IGESAppli/IGESAppli_PWBArtworkStackup.hxx b/src/IGESAppli/IGESAppli_PWBArtworkStackup.hxx index 62083d959c..19aa5ee3a8 100644 --- a/src/IGESAppli/IGESAppli_PWBArtworkStackup.hxx +++ b/src/IGESAppli/IGESAppli_PWBArtworkStackup.hxx @@ -18,7 +18,6 @@ #define _IGESAppli_PWBArtworkStackup_HeaderFile #include -#include #include #include diff --git a/src/IGESAppli/IGESAppli_PWBDrilledHole.hxx b/src/IGESAppli/IGESAppli_PWBDrilledHole.hxx index 12e74f0ad7..a71c024559 100644 --- a/src/IGESAppli/IGESAppli_PWBDrilledHole.hxx +++ b/src/IGESAppli/IGESAppli_PWBDrilledHole.hxx @@ -18,7 +18,6 @@ #define _IGESAppli_PWBDrilledHole_HeaderFile #include -#include #include #include diff --git a/src/IGESAppli/IGESAppli_PartNumber.hxx b/src/IGESAppli/IGESAppli_PartNumber.hxx index b2767e3df6..36081c6c04 100644 --- a/src/IGESAppli/IGESAppli_PartNumber.hxx +++ b/src/IGESAppli/IGESAppli_PartNumber.hxx @@ -18,7 +18,6 @@ #define _IGESAppli_PartNumber_HeaderFile #include -#include #include #include diff --git a/src/IGESAppli/IGESAppli_PinNumber.hxx b/src/IGESAppli/IGESAppli_PinNumber.hxx index 3b7c5024b0..6b3cb593b2 100644 --- a/src/IGESAppli/IGESAppli_PinNumber.hxx +++ b/src/IGESAppli/IGESAppli_PinNumber.hxx @@ -18,7 +18,6 @@ #define _IGESAppli_PinNumber_HeaderFile #include -#include #include #include diff --git a/src/IGESAppli/IGESAppli_PipingFlow.cxx b/src/IGESAppli/IGESAppli_PipingFlow.cxx index cda846b8aa..92c40aaa5e 100644 --- a/src/IGESAppli/IGESAppli_PipingFlow.cxx +++ b/src/IGESAppli/IGESAppli_PipingFlow.cxx @@ -21,7 +21,6 @@ #include #include #include -#include #include #include diff --git a/src/IGESAppli/IGESAppli_PipingFlow.hxx b/src/IGESAppli/IGESAppli_PipingFlow.hxx index 8905e7e0fe..db0d635fd2 100644 --- a/src/IGESAppli/IGESAppli_PipingFlow.hxx +++ b/src/IGESAppli/IGESAppli_PipingFlow.hxx @@ -18,7 +18,6 @@ #define _IGESAppli_PipingFlow_HeaderFile #include -#include #include #include @@ -26,7 +25,6 @@ #include #include #include -#include class IGESDraw_ConnectPoint; class TCollection_HAsciiString; class IGESGraph_TextDisplayTemplate; diff --git a/src/IGESAppli/IGESAppli_Protocol.hxx b/src/IGESAppli/IGESAppli_Protocol.hxx index 09c80a659b..11cf4b9e58 100644 --- a/src/IGESAppli/IGESAppli_Protocol.hxx +++ b/src/IGESAppli/IGESAppli_Protocol.hxx @@ -22,7 +22,6 @@ #include #include -#include class Interface_Protocol; diff --git a/src/IGESAppli/IGESAppli_ReadWriteModule.cxx b/src/IGESAppli/IGESAppli_ReadWriteModule.cxx index 1f9c037903..f0adc9efc0 100644 --- a/src/IGESAppli/IGESAppli_ReadWriteModule.cxx +++ b/src/IGESAppli/IGESAppli_ReadWriteModule.cxx @@ -56,7 +56,6 @@ #include #include #include -#include #include IMPLEMENT_STANDARD_RTTIEXT(IGESAppli_ReadWriteModule,IGESData_ReadWriteModule) diff --git a/src/IGESAppli/IGESAppli_ReferenceDesignator.hxx b/src/IGESAppli/IGESAppli_ReferenceDesignator.hxx index e899522362..eae63e2659 100644 --- a/src/IGESAppli/IGESAppli_ReferenceDesignator.hxx +++ b/src/IGESAppli/IGESAppli_ReferenceDesignator.hxx @@ -18,7 +18,6 @@ #define _IGESAppli_ReferenceDesignator_HeaderFile #include -#include #include #include diff --git a/src/IGESAppli/IGESAppli_RegionRestriction.hxx b/src/IGESAppli/IGESAppli_RegionRestriction.hxx index 8f952f6722..25f5977c96 100644 --- a/src/IGESAppli/IGESAppli_RegionRestriction.hxx +++ b/src/IGESAppli/IGESAppli_RegionRestriction.hxx @@ -18,7 +18,6 @@ #define _IGESAppli_RegionRestriction_HeaderFile #include -#include #include #include diff --git a/src/IGESAppli/IGESAppli_SpecificModule.hxx b/src/IGESAppli/IGESAppli_SpecificModule.hxx index 0577a9b78b..3163c44ecf 100644 --- a/src/IGESAppli/IGESAppli_SpecificModule.hxx +++ b/src/IGESAppli/IGESAppli_SpecificModule.hxx @@ -22,7 +22,6 @@ #include #include -#include class IGESData_IGESEntity; class IGESData_IGESDumper; diff --git a/src/IGESAppli/IGESAppli_ToolDrilledHole.cxx b/src/IGESAppli/IGESAppli_ToolDrilledHole.cxx index 8c2d0dd440..2cdb2e93c4 100644 --- a/src/IGESAppli/IGESAppli_ToolDrilledHole.cxx +++ b/src/IGESAppli/IGESAppli_ToolDrilledHole.cxx @@ -29,8 +29,6 @@ #include #include #include -#include -#include IGESAppli_ToolDrilledHole::IGESAppli_ToolDrilledHole () { } diff --git a/src/IGESAppli/IGESAppli_ToolDrilledHole.hxx b/src/IGESAppli/IGESAppli_ToolDrilledHole.hxx index 1150564106..a0674ef822 100644 --- a/src/IGESAppli/IGESAppli_ToolDrilledHole.hxx +++ b/src/IGESAppli/IGESAppli_ToolDrilledHole.hxx @@ -21,7 +21,6 @@ #include #include -#include #include class IGESAppli_DrilledHole; class IGESData_IGESReaderData; diff --git a/src/IGESAppli/IGESAppli_ToolElementResults.cxx b/src/IGESAppli/IGESAppli_ToolElementResults.cxx index 346bed01c3..2514b4cb70 100644 --- a/src/IGESAppli/IGESAppli_ToolElementResults.cxx +++ b/src/IGESAppli/IGESAppli_ToolElementResults.cxx @@ -36,8 +36,6 @@ #include #include #include -#include -#include #include #include diff --git a/src/IGESAppli/IGESAppli_ToolFlow.cxx b/src/IGESAppli/IGESAppli_ToolFlow.cxx index 114047bc41..3690bc5743 100644 --- a/src/IGESAppli/IGESAppli_ToolFlow.cxx +++ b/src/IGESAppli/IGESAppli_ToolFlow.cxx @@ -37,8 +37,6 @@ #include #include #include -#include -#include #include IGESAppli_ToolFlow::IGESAppli_ToolFlow () { } diff --git a/src/IGESAppli/IGESAppli_ToolFlow.hxx b/src/IGESAppli/IGESAppli_ToolFlow.hxx index c66bf98329..fd5224a3db 100644 --- a/src/IGESAppli/IGESAppli_ToolFlow.hxx +++ b/src/IGESAppli/IGESAppli_ToolFlow.hxx @@ -21,7 +21,6 @@ #include #include -#include #include class IGESAppli_Flow; class IGESData_IGESReaderData; diff --git a/src/IGESAppli/IGESAppli_ToolFlowLineSpec.cxx b/src/IGESAppli/IGESAppli_ToolFlowLineSpec.cxx index 4252be197d..3b7bedbdbf 100644 --- a/src/IGESAppli/IGESAppli_ToolFlowLineSpec.cxx +++ b/src/IGESAppli/IGESAppli_ToolFlowLineSpec.cxx @@ -29,10 +29,7 @@ #include #include #include -#include #include -#include -#include #include IGESAppli_ToolFlowLineSpec::IGESAppli_ToolFlowLineSpec () { } diff --git a/src/IGESAppli/IGESAppli_ToolLevelFunction.cxx b/src/IGESAppli/IGESAppli_ToolLevelFunction.cxx index e83878ad0e..73bbf8e9b2 100644 --- a/src/IGESAppli/IGESAppli_ToolLevelFunction.cxx +++ b/src/IGESAppli/IGESAppli_ToolLevelFunction.cxx @@ -28,10 +28,7 @@ #include #include #include -#include #include -#include -#include #include IGESAppli_ToolLevelFunction::IGESAppli_ToolLevelFunction () { } diff --git a/src/IGESAppli/IGESAppli_ToolLevelFunction.hxx b/src/IGESAppli/IGESAppli_ToolLevelFunction.hxx index 89ef3a8e82..cb22a3e8ef 100644 --- a/src/IGESAppli/IGESAppli_ToolLevelFunction.hxx +++ b/src/IGESAppli/IGESAppli_ToolLevelFunction.hxx @@ -21,7 +21,6 @@ #include #include -#include #include class IGESAppli_LevelFunction; class IGESData_IGESReaderData; diff --git a/src/IGESAppli/IGESAppli_ToolLevelToPWBLayerMap.cxx b/src/IGESAppli/IGESAppli_ToolLevelToPWBLayerMap.cxx index 6d8593341a..e1b6f13287 100644 --- a/src/IGESAppli/IGESAppli_ToolLevelToPWBLayerMap.cxx +++ b/src/IGESAppli/IGESAppli_ToolLevelToPWBLayerMap.cxx @@ -29,7 +29,6 @@ #include #include #include -#include #include #include #include diff --git a/src/IGESAppli/IGESAppli_ToolLineWidening.cxx b/src/IGESAppli/IGESAppli_ToolLineWidening.cxx index 46ea98c935..cf9f0d9b20 100644 --- a/src/IGESAppli/IGESAppli_ToolLineWidening.cxx +++ b/src/IGESAppli/IGESAppli_ToolLineWidening.cxx @@ -29,7 +29,6 @@ #include #include #include -#include IGESAppli_ToolLineWidening::IGESAppli_ToolLineWidening () { } diff --git a/src/IGESAppli/IGESAppli_ToolLineWidening.hxx b/src/IGESAppli/IGESAppli_ToolLineWidening.hxx index f5b2c2893d..a2c8ce57c1 100644 --- a/src/IGESAppli/IGESAppli_ToolLineWidening.hxx +++ b/src/IGESAppli/IGESAppli_ToolLineWidening.hxx @@ -21,7 +21,6 @@ #include #include -#include #include class IGESAppli_LineWidening; class IGESData_IGESReaderData; diff --git a/src/IGESAppli/IGESAppli_ToolNodalConstraint.cxx b/src/IGESAppli/IGESAppli_ToolNodalConstraint.cxx index 890526555a..f955023752 100644 --- a/src/IGESAppli/IGESAppli_ToolNodalConstraint.cxx +++ b/src/IGESAppli/IGESAppli_ToolNodalConstraint.cxx @@ -33,7 +33,6 @@ #include #include #include -#include #include IGESAppli_ToolNodalConstraint::IGESAppli_ToolNodalConstraint () { } diff --git a/src/IGESAppli/IGESAppli_ToolNodalResults.cxx b/src/IGESAppli/IGESAppli_ToolNodalResults.cxx index 3c51f6012e..d59ba94d24 100644 --- a/src/IGESAppli/IGESAppli_ToolNodalResults.cxx +++ b/src/IGESAppli/IGESAppli_ToolNodalResults.cxx @@ -21,7 +21,6 @@ #include #include #include -#include #include #include #include @@ -33,10 +32,7 @@ #include #include #include -#include -#include #include -#include #include IGESAppli_ToolNodalResults::IGESAppli_ToolNodalResults () { } diff --git a/src/IGESAppli/IGESAppli_ToolNode.cxx b/src/IGESAppli/IGESAppli_ToolNode.cxx index de6db18512..cb3a0a0e10 100644 --- a/src/IGESAppli/IGESAppli_ToolNode.cxx +++ b/src/IGESAppli/IGESAppli_ToolNode.cxx @@ -33,7 +33,6 @@ #include #include #include -#include IGESAppli_ToolNode::IGESAppli_ToolNode () { } diff --git a/src/IGESAppli/IGESAppli_ToolPWBArtworkStackup.cxx b/src/IGESAppli/IGESAppli_ToolPWBArtworkStackup.cxx index 68425daff3..f9692abdfb 100644 --- a/src/IGESAppli/IGESAppli_ToolPWBArtworkStackup.cxx +++ b/src/IGESAppli/IGESAppli_ToolPWBArtworkStackup.cxx @@ -28,10 +28,7 @@ #include #include #include -#include #include -#include -#include #include #include diff --git a/src/IGESAppli/IGESAppli_ToolPWBDrilledHole.cxx b/src/IGESAppli/IGESAppli_ToolPWBDrilledHole.cxx index cab5650619..3a655c7303 100644 --- a/src/IGESAppli/IGESAppli_ToolPWBDrilledHole.cxx +++ b/src/IGESAppli/IGESAppli_ToolPWBDrilledHole.cxx @@ -28,8 +28,6 @@ #include #include #include -#include -#include IGESAppli_ToolPWBDrilledHole::IGESAppli_ToolPWBDrilledHole () { } diff --git a/src/IGESAppli/IGESAppli_ToolPWBDrilledHole.hxx b/src/IGESAppli/IGESAppli_ToolPWBDrilledHole.hxx index 8cc2f9fffb..59c3c7431f 100644 --- a/src/IGESAppli/IGESAppli_ToolPWBDrilledHole.hxx +++ b/src/IGESAppli/IGESAppli_ToolPWBDrilledHole.hxx @@ -21,7 +21,6 @@ #include #include -#include #include class IGESAppli_PWBDrilledHole; class IGESData_IGESReaderData; diff --git a/src/IGESAppli/IGESAppli_ToolPartNumber.cxx b/src/IGESAppli/IGESAppli_ToolPartNumber.cxx index d63f1c8cd6..1819b16444 100644 --- a/src/IGESAppli/IGESAppli_ToolPartNumber.cxx +++ b/src/IGESAppli/IGESAppli_ToolPartNumber.cxx @@ -28,9 +28,7 @@ #include #include #include -#include #include -#include #include IGESAppli_ToolPartNumber::IGESAppli_ToolPartNumber () { } diff --git a/src/IGESAppli/IGESAppli_ToolPartNumber.hxx b/src/IGESAppli/IGESAppli_ToolPartNumber.hxx index 47f45ee310..baf76b0ab0 100644 --- a/src/IGESAppli/IGESAppli_ToolPartNumber.hxx +++ b/src/IGESAppli/IGESAppli_ToolPartNumber.hxx @@ -21,7 +21,6 @@ #include #include -#include #include class IGESAppli_PartNumber; class IGESData_IGESReaderData; diff --git a/src/IGESAppli/IGESAppli_ToolPinNumber.cxx b/src/IGESAppli/IGESAppli_ToolPinNumber.cxx index 4f33ce8601..16b29dc81b 100644 --- a/src/IGESAppli/IGESAppli_ToolPinNumber.cxx +++ b/src/IGESAppli/IGESAppli_ToolPinNumber.cxx @@ -29,10 +29,7 @@ #include #include #include -#include #include -#include -#include #include IGESAppli_ToolPinNumber::IGESAppli_ToolPinNumber () { } diff --git a/src/IGESAppli/IGESAppli_ToolPinNumber.hxx b/src/IGESAppli/IGESAppli_ToolPinNumber.hxx index ab82b96de2..053e01a64e 100644 --- a/src/IGESAppli/IGESAppli_ToolPinNumber.hxx +++ b/src/IGESAppli/IGESAppli_ToolPinNumber.hxx @@ -21,7 +21,6 @@ #include #include -#include #include class IGESAppli_PinNumber; class IGESData_IGESReaderData; diff --git a/src/IGESAppli/IGESAppli_ToolPipingFlow.hxx b/src/IGESAppli/IGESAppli_ToolPipingFlow.hxx index cc0c7ed747..05aa5f3082 100644 --- a/src/IGESAppli/IGESAppli_ToolPipingFlow.hxx +++ b/src/IGESAppli/IGESAppli_ToolPipingFlow.hxx @@ -21,7 +21,6 @@ #include #include -#include #include class IGESAppli_PipingFlow; class IGESData_IGESReaderData; diff --git a/src/IGESAppli/IGESAppli_ToolReferenceDesignator.cxx b/src/IGESAppli/IGESAppli_ToolReferenceDesignator.cxx index 887ba489f1..fc4f815bf6 100644 --- a/src/IGESAppli/IGESAppli_ToolReferenceDesignator.cxx +++ b/src/IGESAppli/IGESAppli_ToolReferenceDesignator.cxx @@ -29,10 +29,7 @@ #include #include #include -#include #include -#include -#include #include IGESAppli_ToolReferenceDesignator::IGESAppli_ToolReferenceDesignator () { } diff --git a/src/IGESAppli/IGESAppli_ToolReferenceDesignator.hxx b/src/IGESAppli/IGESAppli_ToolReferenceDesignator.hxx index 21f6ac20fe..aeca37de83 100644 --- a/src/IGESAppli/IGESAppli_ToolReferenceDesignator.hxx +++ b/src/IGESAppli/IGESAppli_ToolReferenceDesignator.hxx @@ -21,7 +21,6 @@ #include #include -#include #include class IGESAppli_ReferenceDesignator; class IGESData_IGESReaderData; diff --git a/src/IGESAppli/IGESAppli_ToolRegionRestriction.cxx b/src/IGESAppli/IGESAppli_ToolRegionRestriction.cxx index 549544b6ac..a89ed2bf78 100644 --- a/src/IGESAppli/IGESAppli_ToolRegionRestriction.cxx +++ b/src/IGESAppli/IGESAppli_ToolRegionRestriction.cxx @@ -29,8 +29,6 @@ #include #include #include -#include -#include IGESAppli_ToolRegionRestriction::IGESAppli_ToolRegionRestriction () { } diff --git a/src/IGESAppli/IGESAppli_ToolRegionRestriction.hxx b/src/IGESAppli/IGESAppli_ToolRegionRestriction.hxx index b9d9d42342..c19f3516a8 100644 --- a/src/IGESAppli/IGESAppli_ToolRegionRestriction.hxx +++ b/src/IGESAppli/IGESAppli_ToolRegionRestriction.hxx @@ -21,7 +21,6 @@ #include #include -#include #include class IGESAppli_RegionRestriction; class IGESData_IGESReaderData; diff --git a/src/IGESBasic/IGESBasic_AssocGroupType.hxx b/src/IGESBasic/IGESBasic_AssocGroupType.hxx index 59c3e49543..b24e890156 100644 --- a/src/IGESBasic/IGESBasic_AssocGroupType.hxx +++ b/src/IGESBasic/IGESBasic_AssocGroupType.hxx @@ -18,7 +18,6 @@ #define _IGESBasic_AssocGroupType_HeaderFile #include -#include #include #include diff --git a/src/IGESBasic/IGESBasic_ExternalRefFile.hxx b/src/IGESBasic/IGESBasic_ExternalRefFile.hxx index c75ee13dc8..59307ef641 100644 --- a/src/IGESBasic/IGESBasic_ExternalRefFile.hxx +++ b/src/IGESBasic/IGESBasic_ExternalRefFile.hxx @@ -18,7 +18,6 @@ #define _IGESBasic_ExternalRefFile_HeaderFile #include -#include #include class TCollection_HAsciiString; diff --git a/src/IGESBasic/IGESBasic_ExternalRefFileIndex.cxx b/src/IGESBasic/IGESBasic_ExternalRefFileIndex.cxx index 5a19ea3169..bb8e588321 100644 --- a/src/IGESBasic/IGESBasic_ExternalRefFileIndex.cxx +++ b/src/IGESBasic/IGESBasic_ExternalRefFileIndex.cxx @@ -19,7 +19,6 @@ #include #include #include -#include #include #include diff --git a/src/IGESBasic/IGESBasic_ExternalRefFileIndex.hxx b/src/IGESBasic/IGESBasic_ExternalRefFileIndex.hxx index 33b2eeef48..218a89a6e8 100644 --- a/src/IGESBasic/IGESBasic_ExternalRefFileIndex.hxx +++ b/src/IGESBasic/IGESBasic_ExternalRefFileIndex.hxx @@ -18,7 +18,6 @@ #define _IGESBasic_ExternalRefFileIndex_HeaderFile #include -#include #include #include diff --git a/src/IGESBasic/IGESBasic_ExternalRefFileName.hxx b/src/IGESBasic/IGESBasic_ExternalRefFileName.hxx index 11407191c0..7c45f37cd1 100644 --- a/src/IGESBasic/IGESBasic_ExternalRefFileName.hxx +++ b/src/IGESBasic/IGESBasic_ExternalRefFileName.hxx @@ -18,10 +18,8 @@ #define _IGESBasic_ExternalRefFileName_HeaderFile #include -#include #include -#include class TCollection_HAsciiString; diff --git a/src/IGESBasic/IGESBasic_ExternalRefLibName.hxx b/src/IGESBasic/IGESBasic_ExternalRefLibName.hxx index 539b845180..af8d2e5943 100644 --- a/src/IGESBasic/IGESBasic_ExternalRefLibName.hxx +++ b/src/IGESBasic/IGESBasic_ExternalRefLibName.hxx @@ -18,7 +18,6 @@ #define _IGESBasic_ExternalRefLibName_HeaderFile #include -#include #include class TCollection_HAsciiString; diff --git a/src/IGESBasic/IGESBasic_ExternalRefName.hxx b/src/IGESBasic/IGESBasic_ExternalRefName.hxx index 1dbc312606..1ef4055aff 100644 --- a/src/IGESBasic/IGESBasic_ExternalRefName.hxx +++ b/src/IGESBasic/IGESBasic_ExternalRefName.hxx @@ -18,7 +18,6 @@ #define _IGESBasic_ExternalRefName_HeaderFile #include -#include #include class TCollection_HAsciiString; diff --git a/src/IGESBasic/IGESBasic_ExternalReferenceFile.cxx b/src/IGESBasic/IGESBasic_ExternalReferenceFile.cxx index 6578414c40..64e60ce6ef 100644 --- a/src/IGESBasic/IGESBasic_ExternalReferenceFile.cxx +++ b/src/IGESBasic/IGESBasic_ExternalReferenceFile.cxx @@ -18,7 +18,6 @@ #include #include -#include #include #include diff --git a/src/IGESBasic/IGESBasic_ExternalReferenceFile.hxx b/src/IGESBasic/IGESBasic_ExternalReferenceFile.hxx index 6f91ca8d05..c5a86a72d3 100644 --- a/src/IGESBasic/IGESBasic_ExternalReferenceFile.hxx +++ b/src/IGESBasic/IGESBasic_ExternalReferenceFile.hxx @@ -18,7 +18,6 @@ #define _IGESBasic_ExternalReferenceFile_HeaderFile #include -#include #include #include diff --git a/src/IGESBasic/IGESBasic_GeneralModule.cxx b/src/IGESBasic/IGESBasic_GeneralModule.cxx index f6dbdab81f..6ef157a254 100644 --- a/src/IGESBasic/IGESBasic_GeneralModule.cxx +++ b/src/IGESBasic/IGESBasic_GeneralModule.cxx @@ -20,7 +20,6 @@ #include #include #include -#include #include #include #include diff --git a/src/IGESBasic/IGESBasic_GeneralModule.hxx b/src/IGESBasic/IGESBasic_GeneralModule.hxx index d11fe6c0fc..09df3f8551 100644 --- a/src/IGESBasic/IGESBasic_GeneralModule.hxx +++ b/src/IGESBasic/IGESBasic_GeneralModule.hxx @@ -22,7 +22,6 @@ #include #include -#include class IGESData_IGESEntity; class Interface_EntityIterator; class IGESData_DirChecker; diff --git a/src/IGESBasic/IGESBasic_Group.hxx b/src/IGESBasic/IGESBasic_Group.hxx index fe8bb6fb9c..702026e7d1 100644 --- a/src/IGESBasic/IGESBasic_Group.hxx +++ b/src/IGESBasic/IGESBasic_Group.hxx @@ -18,12 +18,10 @@ #define _IGESBasic_Group_HeaderFile #include -#include #include #include #include -#include class Standard_Transient; diff --git a/src/IGESBasic/IGESBasic_GroupWithoutBackP.cxx b/src/IGESBasic/IGESBasic_GroupWithoutBackP.cxx index 7bdebc8ee7..4f77073db4 100644 --- a/src/IGESBasic/IGESBasic_GroupWithoutBackP.cxx +++ b/src/IGESBasic/IGESBasic_GroupWithoutBackP.cxx @@ -17,7 +17,6 @@ //-------------------------------------------------------------------- #include -#include #include IMPLEMENT_STANDARD_RTTIEXT(IGESBasic_GroupWithoutBackP,IGESBasic_Group) diff --git a/src/IGESBasic/IGESBasic_GroupWithoutBackP.hxx b/src/IGESBasic/IGESBasic_GroupWithoutBackP.hxx index 3e6c8a6220..0ea2701ea7 100644 --- a/src/IGESBasic/IGESBasic_GroupWithoutBackP.hxx +++ b/src/IGESBasic/IGESBasic_GroupWithoutBackP.hxx @@ -18,7 +18,6 @@ #define _IGESBasic_GroupWithoutBackP_HeaderFile #include -#include #include diff --git a/src/IGESBasic/IGESBasic_HArray1OfHArray1OfXY.hxx b/src/IGESBasic/IGESBasic_HArray1OfHArray1OfXY.hxx index 3cfb448c7d..a8d75201d4 100644 --- a/src/IGESBasic/IGESBasic_HArray1OfHArray1OfXY.hxx +++ b/src/IGESBasic/IGESBasic_HArray1OfHArray1OfXY.hxx @@ -18,7 +18,6 @@ #define _IGESBasic_HArray1OfHArray1OfXY_HeaderFile #include -#include #include #include diff --git a/src/IGESBasic/IGESBasic_HArray2OfHArray1OfReal.hxx b/src/IGESBasic/IGESBasic_HArray2OfHArray1OfReal.hxx index 1a92dd30f3..ad158c8634 100644 --- a/src/IGESBasic/IGESBasic_HArray2OfHArray1OfReal.hxx +++ b/src/IGESBasic/IGESBasic_HArray2OfHArray1OfReal.hxx @@ -17,7 +17,6 @@ #ifndef IGESBasic_HArray2OfHArray1OfReal_HeaderFile #define IGESBasic_HArray2OfHArray1OfReal_HeaderFile -#include #include #include diff --git a/src/IGESBasic/IGESBasic_Hierarchy.hxx b/src/IGESBasic/IGESBasic_Hierarchy.hxx index 7e76ec559b..4493ab1f63 100644 --- a/src/IGESBasic/IGESBasic_Hierarchy.hxx +++ b/src/IGESBasic/IGESBasic_Hierarchy.hxx @@ -18,7 +18,6 @@ #define _IGESBasic_Hierarchy_HeaderFile #include -#include #include #include diff --git a/src/IGESBasic/IGESBasic_Name.hxx b/src/IGESBasic/IGESBasic_Name.hxx index 3cd66b1e22..03a6092328 100644 --- a/src/IGESBasic/IGESBasic_Name.hxx +++ b/src/IGESBasic/IGESBasic_Name.hxx @@ -18,7 +18,6 @@ #define _IGESBasic_Name_HeaderFile #include -#include #include #include diff --git a/src/IGESBasic/IGESBasic_OrderedGroup.cxx b/src/IGESBasic/IGESBasic_OrderedGroup.cxx index 1ca58f5aa0..919adb41c2 100644 --- a/src/IGESBasic/IGESBasic_OrderedGroup.cxx +++ b/src/IGESBasic/IGESBasic_OrderedGroup.cxx @@ -17,7 +17,6 @@ //-------------------------------------------------------------------- #include -#include #include IMPLEMENT_STANDARD_RTTIEXT(IGESBasic_OrderedGroup,IGESBasic_Group) diff --git a/src/IGESBasic/IGESBasic_OrderedGroup.hxx b/src/IGESBasic/IGESBasic_OrderedGroup.hxx index 0f7202dff4..1143e256d4 100644 --- a/src/IGESBasic/IGESBasic_OrderedGroup.hxx +++ b/src/IGESBasic/IGESBasic_OrderedGroup.hxx @@ -18,7 +18,6 @@ #define _IGESBasic_OrderedGroup_HeaderFile #include -#include #include diff --git a/src/IGESBasic/IGESBasic_OrderedGroupWithoutBackP.cxx b/src/IGESBasic/IGESBasic_OrderedGroupWithoutBackP.cxx index 7355454b70..928da0ff82 100644 --- a/src/IGESBasic/IGESBasic_OrderedGroupWithoutBackP.cxx +++ b/src/IGESBasic/IGESBasic_OrderedGroupWithoutBackP.cxx @@ -17,7 +17,6 @@ //-------------------------------------------------------------------- #include -#include #include IMPLEMENT_STANDARD_RTTIEXT(IGESBasic_OrderedGroupWithoutBackP,IGESBasic_Group) diff --git a/src/IGESBasic/IGESBasic_OrderedGroupWithoutBackP.hxx b/src/IGESBasic/IGESBasic_OrderedGroupWithoutBackP.hxx index c7f65e7a76..2465c741e4 100644 --- a/src/IGESBasic/IGESBasic_OrderedGroupWithoutBackP.hxx +++ b/src/IGESBasic/IGESBasic_OrderedGroupWithoutBackP.hxx @@ -18,7 +18,6 @@ #define _IGESBasic_OrderedGroupWithoutBackP_HeaderFile #include -#include #include diff --git a/src/IGESBasic/IGESBasic_Protocol.cxx b/src/IGESBasic/IGESBasic_Protocol.cxx index 5a26492c24..2f30ee3bf4 100644 --- a/src/IGESBasic/IGESBasic_Protocol.cxx +++ b/src/IGESBasic/IGESBasic_Protocol.cxx @@ -19,7 +19,6 @@ #include #include #include -#include #include #include #include @@ -30,7 +29,6 @@ #include #include #include -#include #include #include diff --git a/src/IGESBasic/IGESBasic_Protocol.hxx b/src/IGESBasic/IGESBasic_Protocol.hxx index 136e95c5cf..e25a2f724d 100644 --- a/src/IGESBasic/IGESBasic_Protocol.hxx +++ b/src/IGESBasic/IGESBasic_Protocol.hxx @@ -22,7 +22,6 @@ #include #include -#include class Interface_Protocol; diff --git a/src/IGESBasic/IGESBasic_ReadWriteModule.cxx b/src/IGESBasic/IGESBasic_ReadWriteModule.cxx index f174d13ae4..0ea617ff77 100644 --- a/src/IGESBasic/IGESBasic_ReadWriteModule.cxx +++ b/src/IGESBasic/IGESBasic_ReadWriteModule.cxx @@ -19,7 +19,6 @@ #include #include #include -#include #include #include #include @@ -50,7 +49,6 @@ #include #include #include -#include #include IMPLEMENT_STANDARD_RTTIEXT(IGESBasic_ReadWriteModule,IGESData_ReadWriteModule) diff --git a/src/IGESBasic/IGESBasic_SingleParent.cxx b/src/IGESBasic/IGESBasic_SingleParent.cxx index 79d895a9ed..81d470cf1a 100644 --- a/src/IGESBasic/IGESBasic_SingleParent.cxx +++ b/src/IGESBasic/IGESBasic_SingleParent.cxx @@ -19,7 +19,6 @@ #include #include #include -#include #include IMPLEMENT_STANDARD_RTTIEXT(IGESBasic_SingleParent,IGESData_SingleParentEntity) diff --git a/src/IGESBasic/IGESBasic_SingleParent.hxx b/src/IGESBasic/IGESBasic_SingleParent.hxx index 40b24c9022..d9556ecef1 100644 --- a/src/IGESBasic/IGESBasic_SingleParent.hxx +++ b/src/IGESBasic/IGESBasic_SingleParent.hxx @@ -18,7 +18,6 @@ #define _IGESBasic_SingleParent_HeaderFile #include -#include #include #include diff --git a/src/IGESBasic/IGESBasic_SingularSubfigure.hxx b/src/IGESBasic/IGESBasic_SingularSubfigure.hxx index 0873c80aef..a9869bc912 100644 --- a/src/IGESBasic/IGESBasic_SingularSubfigure.hxx +++ b/src/IGESBasic/IGESBasic_SingularSubfigure.hxx @@ -21,8 +21,6 @@ #include #include -#include -#include #include class IGESBasic_SubfigureDef; diff --git a/src/IGESBasic/IGESBasic_SpecificModule.cxx b/src/IGESBasic/IGESBasic_SpecificModule.cxx index 0aba6b73bb..7e91b046a9 100644 --- a/src/IGESBasic/IGESBasic_SpecificModule.cxx +++ b/src/IGESBasic/IGESBasic_SpecificModule.cxx @@ -19,7 +19,6 @@ #include #include #include -#include #include #include #include diff --git a/src/IGESBasic/IGESBasic_SpecificModule.hxx b/src/IGESBasic/IGESBasic_SpecificModule.hxx index cef0f17d99..e70cc2858d 100644 --- a/src/IGESBasic/IGESBasic_SpecificModule.hxx +++ b/src/IGESBasic/IGESBasic_SpecificModule.hxx @@ -22,7 +22,6 @@ #include #include -#include class IGESData_IGESEntity; class IGESData_IGESDumper; diff --git a/src/IGESBasic/IGESBasic_SubfigureDef.hxx b/src/IGESBasic/IGESBasic_SubfigureDef.hxx index 7a649d076d..90ae05108f 100644 --- a/src/IGESBasic/IGESBasic_SubfigureDef.hxx +++ b/src/IGESBasic/IGESBasic_SubfigureDef.hxx @@ -18,7 +18,6 @@ #define _IGESBasic_SubfigureDef_HeaderFile #include -#include #include #include diff --git a/src/IGESBasic/IGESBasic_ToolAssocGroupType.cxx b/src/IGESBasic/IGESBasic_ToolAssocGroupType.cxx index e4675e8fc4..de350a5f3d 100644 --- a/src/IGESBasic/IGESBasic_ToolAssocGroupType.cxx +++ b/src/IGESBasic/IGESBasic_ToolAssocGroupType.cxx @@ -28,10 +28,7 @@ #include #include #include -#include #include -#include -#include #include IGESBasic_ToolAssocGroupType::IGESBasic_ToolAssocGroupType () { } diff --git a/src/IGESBasic/IGESBasic_ToolAssocGroupType.hxx b/src/IGESBasic/IGESBasic_ToolAssocGroupType.hxx index d15030a897..fc2a686334 100644 --- a/src/IGESBasic/IGESBasic_ToolAssocGroupType.hxx +++ b/src/IGESBasic/IGESBasic_ToolAssocGroupType.hxx @@ -21,7 +21,6 @@ #include #include -#include #include class IGESBasic_AssocGroupType; class IGESData_IGESReaderData; diff --git a/src/IGESBasic/IGESBasic_ToolExternalRefFile.cxx b/src/IGESBasic/IGESBasic_ToolExternalRefFile.cxx index a2d1ab6da9..2662a4f3ff 100644 --- a/src/IGESBasic/IGESBasic_ToolExternalRefFile.cxx +++ b/src/IGESBasic/IGESBasic_ToolExternalRefFile.cxx @@ -28,10 +28,7 @@ #include #include #include -#include #include -#include -#include #include IGESBasic_ToolExternalRefFile::IGESBasic_ToolExternalRefFile () { } diff --git a/src/IGESBasic/IGESBasic_ToolExternalRefFileName.cxx b/src/IGESBasic/IGESBasic_ToolExternalRefFileName.cxx index 2c89dbe46e..800c34d1cd 100644 --- a/src/IGESBasic/IGESBasic_ToolExternalRefFileName.cxx +++ b/src/IGESBasic/IGESBasic_ToolExternalRefFileName.cxx @@ -28,10 +28,7 @@ #include #include #include -#include #include -#include -#include #include IGESBasic_ToolExternalRefFileName::IGESBasic_ToolExternalRefFileName () { } diff --git a/src/IGESBasic/IGESBasic_ToolExternalRefLibName.cxx b/src/IGESBasic/IGESBasic_ToolExternalRefLibName.cxx index 119516de1f..7c5ac68d79 100644 --- a/src/IGESBasic/IGESBasic_ToolExternalRefLibName.cxx +++ b/src/IGESBasic/IGESBasic_ToolExternalRefLibName.cxx @@ -28,10 +28,7 @@ #include #include #include -#include #include -#include -#include #include IGESBasic_ToolExternalRefLibName::IGESBasic_ToolExternalRefLibName () { } diff --git a/src/IGESBasic/IGESBasic_ToolExternalRefName.cxx b/src/IGESBasic/IGESBasic_ToolExternalRefName.cxx index ab4daea9d3..4689f71ae6 100644 --- a/src/IGESBasic/IGESBasic_ToolExternalRefName.cxx +++ b/src/IGESBasic/IGESBasic_ToolExternalRefName.cxx @@ -28,10 +28,7 @@ #include #include #include -#include #include -#include -#include #include IGESBasic_ToolExternalRefName::IGESBasic_ToolExternalRefName () { } diff --git a/src/IGESBasic/IGESBasic_ToolExternalReferenceFile.cxx b/src/IGESBasic/IGESBasic_ToolExternalReferenceFile.cxx index bdb3af00aa..bb73a6da09 100644 --- a/src/IGESBasic/IGESBasic_ToolExternalReferenceFile.cxx +++ b/src/IGESBasic/IGESBasic_ToolExternalReferenceFile.cxx @@ -29,7 +29,6 @@ #include #include #include -#include #include #include #include diff --git a/src/IGESBasic/IGESBasic_ToolGroup.hxx b/src/IGESBasic/IGESBasic_ToolGroup.hxx index 6f9c763823..ab2aef0aa7 100644 --- a/src/IGESBasic/IGESBasic_ToolGroup.hxx +++ b/src/IGESBasic/IGESBasic_ToolGroup.hxx @@ -21,7 +21,6 @@ #include #include -#include #include class IGESBasic_Group; class IGESData_IGESReaderData; diff --git a/src/IGESBasic/IGESBasic_ToolGroupWithoutBackP.hxx b/src/IGESBasic/IGESBasic_ToolGroupWithoutBackP.hxx index a9851b5841..ee6c243ba5 100644 --- a/src/IGESBasic/IGESBasic_ToolGroupWithoutBackP.hxx +++ b/src/IGESBasic/IGESBasic_ToolGroupWithoutBackP.hxx @@ -21,7 +21,6 @@ #include #include -#include #include class IGESBasic_GroupWithoutBackP; class IGESData_IGESReaderData; diff --git a/src/IGESBasic/IGESBasic_ToolHierarchy.cxx b/src/IGESBasic/IGESBasic_ToolHierarchy.cxx index 41ab2f7cc2..e1622e7166 100644 --- a/src/IGESBasic/IGESBasic_ToolHierarchy.cxx +++ b/src/IGESBasic/IGESBasic_ToolHierarchy.cxx @@ -28,8 +28,6 @@ #include #include #include -#include -#include IGESBasic_ToolHierarchy::IGESBasic_ToolHierarchy () { } diff --git a/src/IGESBasic/IGESBasic_ToolHierarchy.hxx b/src/IGESBasic/IGESBasic_ToolHierarchy.hxx index cf353edc4a..412d4c9646 100644 --- a/src/IGESBasic/IGESBasic_ToolHierarchy.hxx +++ b/src/IGESBasic/IGESBasic_ToolHierarchy.hxx @@ -21,7 +21,6 @@ #include #include -#include #include class IGESBasic_Hierarchy; class IGESData_IGESReaderData; diff --git a/src/IGESBasic/IGESBasic_ToolName.cxx b/src/IGESBasic/IGESBasic_ToolName.cxx index 5d30351eb5..49a26cf61d 100644 --- a/src/IGESBasic/IGESBasic_ToolName.cxx +++ b/src/IGESBasic/IGESBasic_ToolName.cxx @@ -28,10 +28,7 @@ #include #include #include -#include #include -#include -#include #include IGESBasic_ToolName::IGESBasic_ToolName () { } diff --git a/src/IGESBasic/IGESBasic_ToolName.hxx b/src/IGESBasic/IGESBasic_ToolName.hxx index 9ab40e0ba3..7e488c6ef0 100644 --- a/src/IGESBasic/IGESBasic_ToolName.hxx +++ b/src/IGESBasic/IGESBasic_ToolName.hxx @@ -21,7 +21,6 @@ #include #include -#include #include class IGESBasic_Name; class IGESData_IGESReaderData; diff --git a/src/IGESBasic/IGESBasic_ToolOrderedGroup.hxx b/src/IGESBasic/IGESBasic_ToolOrderedGroup.hxx index 0a63ce4678..ea52f6ecbe 100644 --- a/src/IGESBasic/IGESBasic_ToolOrderedGroup.hxx +++ b/src/IGESBasic/IGESBasic_ToolOrderedGroup.hxx @@ -21,7 +21,6 @@ #include #include -#include #include class IGESBasic_OrderedGroup; class IGESData_IGESReaderData; diff --git a/src/IGESBasic/IGESBasic_ToolOrderedGroupWithoutBackP.hxx b/src/IGESBasic/IGESBasic_ToolOrderedGroupWithoutBackP.hxx index 540302f5ea..1a23850d03 100644 --- a/src/IGESBasic/IGESBasic_ToolOrderedGroupWithoutBackP.hxx +++ b/src/IGESBasic/IGESBasic_ToolOrderedGroupWithoutBackP.hxx @@ -21,7 +21,6 @@ #include #include -#include #include class IGESBasic_OrderedGroupWithoutBackP; class IGESData_IGESReaderData; diff --git a/src/IGESBasic/IGESBasic_ToolSingleParent.hxx b/src/IGESBasic/IGESBasic_ToolSingleParent.hxx index 485b3e523e..b6d382c177 100644 --- a/src/IGESBasic/IGESBasic_ToolSingleParent.hxx +++ b/src/IGESBasic/IGESBasic_ToolSingleParent.hxx @@ -21,7 +21,6 @@ #include #include -#include #include class IGESBasic_SingleParent; class IGESData_IGESReaderData; diff --git a/src/IGESBasic/IGESBasic_ToolSingularSubfigure.cxx b/src/IGESBasic/IGESBasic_ToolSingularSubfigure.cxx index 5b20a230b8..49dd355ae0 100644 --- a/src/IGESBasic/IGESBasic_ToolSingularSubfigure.cxx +++ b/src/IGESBasic/IGESBasic_ToolSingularSubfigure.cxx @@ -16,7 +16,6 @@ //-------------------------------------------------------------------- //-------------------------------------------------------------------- -#include #include #include #include @@ -34,9 +33,7 @@ #include #include #include -#include #include -#include // MGE 03/08/98 IGESBasic_ToolSingularSubfigure::IGESBasic_ToolSingularSubfigure () { } diff --git a/src/V3d/V3d_View.hxx b/src/V3d/V3d_View.hxx index abea2dd347..797ca06f44 100644 --- a/src/V3d/V3d_View.hxx +++ b/src/V3d/V3d_View.hxx @@ -35,6 +35,7 @@ #include #include #include +#include #include #include #include diff --git a/src/gp/gp.cxx b/src/gp/gp.cxx index 96ebebcf2c..c41449ba54 100644 --- a/src/gp/gp.cxx +++ b/src/gp/gp.cxx @@ -14,7 +14,6 @@ #include -#include #include #include #include diff --git a/src/gp/gp_Ax1.cxx b/src/gp/gp_Ax1.cxx index 892b453022..7b2945089c 100644 --- a/src/gp/gp_Ax1.cxx +++ b/src/gp/gp_Ax1.cxx @@ -21,11 +21,9 @@ #include -#include #include #include #include -#include #include #include diff --git a/src/gp/gp_Ax2.cxx b/src/gp/gp_Ax2.cxx index b1747c521e..9f92929a27 100644 --- a/src/gp/gp_Ax2.cxx +++ b/src/gp/gp_Ax2.cxx @@ -21,11 +21,9 @@ #include -#include #include #include #include -#include #include #include #include diff --git a/src/gp/gp_Ax22d.cxx b/src/gp/gp_Ax22d.cxx index 68ce5642ee..8c28993667 100644 --- a/src/gp/gp_Ax22d.cxx +++ b/src/gp/gp_Ax22d.cxx @@ -24,7 +24,6 @@ #include #include #include -#include #include void gp_Ax22d::Mirror (const gp_Pnt2d& P) diff --git a/src/gp/gp_Ax22d.hxx b/src/gp/gp_Ax22d.hxx index 53a3933823..6e5b9ab442 100644 --- a/src/gp/gp_Ax22d.hxx +++ b/src/gp/gp_Ax22d.hxx @@ -20,7 +20,6 @@ #include #include #include -#include //! Describes a coordinate system in a plane (2D space). //! A coordinate system is defined by: diff --git a/src/gp/gp_Ax2d.cxx b/src/gp/gp_Ax2d.cxx index ae3902b74c..6b1b22bc21 100644 --- a/src/gp/gp_Ax2d.cxx +++ b/src/gp/gp_Ax2d.cxx @@ -23,7 +23,6 @@ #include #include #include -#include #include #include diff --git a/src/gp/gp_Ax3.cxx b/src/gp/gp_Ax3.cxx index d02c31bc50..accc434efd 100644 --- a/src/gp/gp_Ax3.cxx +++ b/src/gp/gp_Ax3.cxx @@ -20,7 +20,6 @@ #include #include #include -#include #include #include #include diff --git a/src/gp/gp_Circ.cxx b/src/gp/gp_Circ.cxx index baae99e6a7..88a39a3dfb 100644 --- a/src/gp/gp_Circ.cxx +++ b/src/gp/gp_Circ.cxx @@ -17,9 +17,6 @@ #include #include #include -#include -#include -#include void gp_Circ::Mirror (const gp_Pnt& P) { pos.Mirror(P); } diff --git a/src/gp/gp_Circ2d.cxx b/src/gp/gp_Circ2d.cxx index 0a24ad35a4..dea2671bff 100644 --- a/src/gp/gp_Circ2d.cxx +++ b/src/gp/gp_Circ2d.cxx @@ -19,9 +19,6 @@ #include #include #include -#include -#include -#include void gp_Circ2d::Mirror (const gp_Pnt2d& P) { pos.Mirror(P); } diff --git a/src/gp/gp_Cone.cxx b/src/gp/gp_Cone.cxx index a213943b8c..34860509c7 100644 --- a/src/gp/gp_Cone.cxx +++ b/src/gp/gp_Cone.cxx @@ -22,8 +22,6 @@ #include #include #include -#include -#include void gp_Cone::Coefficients (Standard_Real& A1, Standard_Real& A2, Standard_Real& A3, diff --git a/src/gp/gp_Cylinder.cxx b/src/gp/gp_Cylinder.cxx index 2511c7f209..9ae5053f47 100644 --- a/src/gp/gp_Cylinder.cxx +++ b/src/gp/gp_Cylinder.cxx @@ -23,8 +23,6 @@ #include #include #include -#include -#include void gp_Cylinder::Coefficients (Standard_Real& A1, Standard_Real& A2, Standard_Real& A3, diff --git a/src/gp/gp_Dir.cxx b/src/gp/gp_Dir.cxx index 1f18618551..f5997d04ef 100644 --- a/src/gp/gp_Dir.cxx +++ b/src/gp/gp_Dir.cxx @@ -16,10 +16,8 @@ #include -#include #include #include -#include #include #include #include diff --git a/src/gp/gp_Dir2d.cxx b/src/gp/gp_Dir2d.cxx index 6c3b481502..60fdc20dc2 100644 --- a/src/gp/gp_Dir2d.cxx +++ b/src/gp/gp_Dir2d.cxx @@ -18,9 +18,7 @@ #include #include -#include #include -#include #include #include #include diff --git a/src/gp/gp_Elips.cxx b/src/gp/gp_Elips.cxx index e9b063252d..d36cfc9d73 100644 --- a/src/gp/gp_Elips.cxx +++ b/src/gp/gp_Elips.cxx @@ -19,9 +19,6 @@ #include #include #include -#include -#include -#include void gp_Elips::Mirror (const gp_Pnt& P) { pos.Mirror(P); } diff --git a/src/gp/gp_Elips2d.cxx b/src/gp/gp_Elips2d.cxx index 97c41946d5..338c87a7b7 100644 --- a/src/gp/gp_Elips2d.cxx +++ b/src/gp/gp_Elips2d.cxx @@ -21,14 +21,13 @@ #include #include #include -#include void gp_Elips2d::Coefficients (Standard_Real& A, - Standard_Real& B, - Standard_Real& C, - Standard_Real& D, - Standard_Real& E, - Standard_Real& F) const + Standard_Real& B, + Standard_Real& C, + Standard_Real& D, + Standard_Real& E, + Standard_Real& F) const { Standard_Real DMin = minorRadius * minorRadius; Standard_Real DMaj = majorRadius * majorRadius; diff --git a/src/gp/gp_GTrsf2d.cxx b/src/gp/gp_GTrsf2d.cxx index 90270fc8b9..864f7d481f 100644 --- a/src/gp/gp_GTrsf2d.cxx +++ b/src/gp/gp_GTrsf2d.cxx @@ -20,10 +20,9 @@ #include #include #include -#include void gp_GTrsf2d::SetAffinity (const gp_Ax2d& A, - const Standard_Real Ratio) + const Standard_Real Ratio) { shape = gp_Other; scale = 0.0; diff --git a/src/gp/gp_GTrsf2d.hxx b/src/gp/gp_GTrsf2d.hxx index 423c8fdb73..06811f3e87 100644 --- a/src/gp/gp_GTrsf2d.hxx +++ b/src/gp/gp_GTrsf2d.hxx @@ -19,7 +19,6 @@ #include #include #include -#include #include diff --git a/src/gp/gp_Hypr.cxx b/src/gp/gp_Hypr.cxx index a1040f91a8..d11649b19c 100644 --- a/src/gp/gp_Hypr.cxx +++ b/src/gp/gp_Hypr.cxx @@ -19,10 +19,6 @@ #include #include #include -#include -#include -#include -#include void gp_Hypr::Mirror (const gp_Pnt& P) { pos.Mirror(P); } diff --git a/src/gp/gp_Hypr2d.cxx b/src/gp/gp_Hypr2d.cxx index ad69890040..b5a7d00b67 100644 --- a/src/gp/gp_Hypr2d.cxx +++ b/src/gp/gp_Hypr2d.cxx @@ -21,15 +21,13 @@ #include #include #include -#include -#include void gp_Hypr2d::Coefficients (Standard_Real& A, - Standard_Real& B, - Standard_Real& C, - Standard_Real& D, - Standard_Real& E, - Standard_Real& F) const + Standard_Real& B, + Standard_Real& C, + Standard_Real& D, + Standard_Real& E, + Standard_Real& F) const { Standard_Real DMin = minorRadius * minorRadius; Standard_Real DMaj = majorRadius * majorRadius; diff --git a/src/gp/gp_Lin.cxx b/src/gp/gp_Lin.cxx index 775fd23c84..a291af2482 100644 --- a/src/gp/gp_Lin.cxx +++ b/src/gp/gp_Lin.cxx @@ -24,7 +24,6 @@ #include #include #include -#include Standard_Real gp_Lin::Distance (const gp_Lin& Other) const { diff --git a/src/gp/gp_Lin.hxx b/src/gp/gp_Lin.hxx index 55527b47f4..dc7e847ba7 100644 --- a/src/gp/gp_Lin.hxx +++ b/src/gp/gp_Lin.hxx @@ -21,7 +21,6 @@ #include #include #include -#include //! Describes a line in 3D space. //! A line is positioned in space with an axis (a gp_Ax1 diff --git a/src/gp/gp_Lin2d.cxx b/src/gp/gp_Lin2d.cxx index 9fd5cdc227..c4cacac855 100644 --- a/src/gp/gp_Lin2d.cxx +++ b/src/gp/gp_Lin2d.cxx @@ -24,7 +24,6 @@ #include #include #include -#include #include //======================================================================= diff --git a/src/gp/gp_Mat.cxx b/src/gp/gp_Mat.cxx index 4e4a64cea6..7070a5a69d 100644 --- a/src/gp/gp_Mat.cxx +++ b/src/gp/gp_Mat.cxx @@ -20,7 +20,6 @@ #include #include -#include #include #include #include diff --git a/src/gp/gp_Parab.cxx b/src/gp/gp_Parab.cxx index 0882d8aff1..366b85240c 100644 --- a/src/gp/gp_Parab.cxx +++ b/src/gp/gp_Parab.cxx @@ -19,9 +19,6 @@ #include #include #include -#include -#include -#include void gp_Parab::Mirror (const gp_Pnt& P) { pos.Mirror (P); } diff --git a/src/gp/gp_Parab.hxx b/src/gp/gp_Parab.hxx index 2bb548a520..c6989ecb2e 100644 --- a/src/gp/gp_Parab.hxx +++ b/src/gp/gp_Parab.hxx @@ -16,7 +16,6 @@ #define _gp_Parab_HeaderFile #include -#include #include #include #include diff --git a/src/gp/gp_Parab2d.cxx b/src/gp/gp_Parab2d.cxx index c3b41eec29..db2a22d211 100644 --- a/src/gp/gp_Parab2d.cxx +++ b/src/gp/gp_Parab2d.cxx @@ -21,7 +21,6 @@ #include #include #include -#include gp_Parab2d::gp_Parab2d (const gp_Ax2d& theDirectrix, const gp_Pnt2d& theFocus, diff --git a/src/gp/gp_Pln.cxx b/src/gp/gp_Pln.cxx index 2c6ce80e0d..8248ee7eff 100644 --- a/src/gp/gp_Pln.cxx +++ b/src/gp/gp_Pln.cxx @@ -21,14 +21,11 @@ #include -#include #include #include #include #include -#include #include -#include #include #include #include diff --git a/src/gp/gp_Pln.hxx b/src/gp/gp_Pln.hxx index 18a6590c2e..291d40ac68 100644 --- a/src/gp/gp_Pln.hxx +++ b/src/gp/gp_Pln.hxx @@ -21,7 +21,6 @@ #include #include #include -#include //! Describes a plane. //! A plane is positioned in space with a coordinate system diff --git a/src/gp/gp_Pnt.cxx b/src/gp/gp_Pnt.cxx index 94b38b69f0..38a09b5b19 100644 --- a/src/gp/gp_Pnt.cxx +++ b/src/gp/gp_Pnt.cxx @@ -20,7 +20,6 @@ #include -#include #include #include #include diff --git a/src/gp/gp_Pnt.hxx b/src/gp/gp_Pnt.hxx index fb73a06663..09667d182d 100644 --- a/src/gp/gp_Pnt.hxx +++ b/src/gp/gp_Pnt.hxx @@ -20,7 +20,6 @@ #include #include #include -#include #include class gp_Ax1; diff --git a/src/gp/gp_Pnt2d.cxx b/src/gp/gp_Pnt2d.cxx index de1149fae4..8ba95bc272 100644 --- a/src/gp/gp_Pnt2d.cxx +++ b/src/gp/gp_Pnt2d.cxx @@ -20,7 +20,6 @@ #include #include -#include #include #include #include diff --git a/src/gp/gp_Pnt2d.hxx b/src/gp/gp_Pnt2d.hxx index c68c77b262..d6310620c1 100644 --- a/src/gp/gp_Pnt2d.hxx +++ b/src/gp/gp_Pnt2d.hxx @@ -21,7 +21,6 @@ #include #include -#include #include class gp_Ax2d; @@ -179,7 +178,6 @@ private: }; #include -#include #include //======================================================================= diff --git a/src/gp/gp_Sphere.cxx b/src/gp/gp_Sphere.cxx index 0ce1aad59a..240e6cc52c 100644 --- a/src/gp/gp_Sphere.cxx +++ b/src/gp/gp_Sphere.cxx @@ -19,8 +19,6 @@ #include #include #include -#include -#include void gp_Sphere::Coefficients (Standard_Real& A1, Standard_Real& A2, Standard_Real& A3, diff --git a/src/gp/gp_Torus.cxx b/src/gp/gp_Torus.cxx index 3fde34cc81..2c74c744e6 100644 --- a/src/gp/gp_Torus.cxx +++ b/src/gp/gp_Torus.cxx @@ -14,14 +14,11 @@ #include -#include #include #include #include #include #include -#include -#include #include void gp_Torus::Coefficients (TColStd_Array1OfReal& theCoef) const diff --git a/src/gp/gp_Torus.hxx b/src/gp/gp_Torus.hxx index eb888a2323..b4e497b488 100644 --- a/src/gp/gp_Torus.hxx +++ b/src/gp/gp_Torus.hxx @@ -18,7 +18,6 @@ #include #include #include -#include #include //! Describes a torus. diff --git a/src/gp/gp_Trsf.cxx b/src/gp/gp_Trsf.cxx index 376e6fd405..3e1ff120db 100644 --- a/src/gp/gp_Trsf.cxx +++ b/src/gp/gp_Trsf.cxx @@ -22,8 +22,6 @@ #include #include -#include -#include #include #include #include diff --git a/src/gp/gp_Trsf.hxx b/src/gp/gp_Trsf.hxx index 5e726f54f9..0ad0014b75 100644 --- a/src/gp/gp_Trsf.hxx +++ b/src/gp/gp_Trsf.hxx @@ -19,7 +19,6 @@ #include #include #include -#include #include #include #include diff --git a/src/gp/gp_Trsf2d.cxx b/src/gp/gp_Trsf2d.cxx index 04586fa11c..1caec6706d 100644 --- a/src/gp/gp_Trsf2d.cxx +++ b/src/gp/gp_Trsf2d.cxx @@ -27,7 +27,6 @@ #include #include #include -#include void gp_Trsf2d::SetMirror (const gp_Ax2d& A) { diff --git a/src/gp/gp_Trsf2d.hxx b/src/gp/gp_Trsf2d.hxx index 6448d82fa0..30c754c954 100644 --- a/src/gp/gp_Trsf2d.hxx +++ b/src/gp/gp_Trsf2d.hxx @@ -18,7 +18,6 @@ #include #include #include -#include #include class gp_Trsf; diff --git a/src/gp/gp_Vec.cxx b/src/gp/gp_Vec.cxx index b77e7a1780..1a2f514072 100644 --- a/src/gp/gp_Vec.cxx +++ b/src/gp/gp_Vec.cxx @@ -21,14 +21,10 @@ #include #include -#include #include #include -#include #include -#include #include -#include #include #include #include diff --git a/src/gp/gp_Vec.hxx b/src/gp/gp_Vec.hxx index cf17c857b0..232ecf2558 100644 --- a/src/gp/gp_Vec.hxx +++ b/src/gp/gp_Vec.hxx @@ -17,9 +17,7 @@ #include #include -#include #include -#include class gp_Dir; class gp_Pnt; @@ -422,7 +420,6 @@ private: }; -#include #include #include #include diff --git a/src/gp/gp_Vec2d.cxx b/src/gp/gp_Vec2d.cxx index 227e5191b5..5273845c3f 100644 --- a/src/gp/gp_Vec2d.cxx +++ b/src/gp/gp_Vec2d.cxx @@ -21,12 +21,9 @@ #include #include #include -#include #include #include #include -#include -#include Standard_Boolean gp_Vec2d::IsEqual (const gp_Vec2d& Other, diff --git a/src/gp/gp_Vec2d.hxx b/src/gp/gp_Vec2d.hxx index b1225f0ead..1dd92941f7 100644 --- a/src/gp/gp_Vec2d.hxx +++ b/src/gp/gp_Vec2d.hxx @@ -17,8 +17,6 @@ #include #include -#include -#include class gp_Dir2d; class gp_Pnt2d; diff --git a/src/gp/gp_XY.cxx b/src/gp/gp_XY.cxx index bbe51b26e2..6b9d06520c 100644 --- a/src/gp/gp_XY.cxx +++ b/src/gp/gp_XY.cxx @@ -14,8 +14,6 @@ #include -#include -#include #include Standard_Boolean gp_XY::IsEqual (const gp_XY& Other, From e976df232941aae838b8c3dcf4b9f79f79bea705 Mon Sep 17 00:00:00 2001 From: ddzama Date: Mon, 4 Apr 2022 07:29:42 +0300 Subject: [PATCH 274/639] 0032920: Coding - fix checking of std::stringstream buffer size on VS2019/C++20 Use tellp() instead of in_avail() for testing non-empty std::stringstream state. --- src/Message/Message_Messenger.hxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Message/Message_Messenger.hxx b/src/Message/Message_Messenger.hxx index a804a6c527..3ee2ea3d3a 100644 --- a/src/Message/Message_Messenger.hxx +++ b/src/Message/Message_Messenger.hxx @@ -72,7 +72,7 @@ public: void Flush(Standard_Boolean doForce = Standard_False) { myStream.flush(); - if (doForce || myStream.rdbuf()->in_avail() > 0) + if (doForce || myStream.tellp() != std::streampos(0)) { if (myMessenger) { From 267738fc4075b1c5dcf57ed77467c2f7552ecaf6 Mon Sep 17 00:00:00 2001 From: kgv Date: Wed, 4 May 2022 12:54:52 +0300 Subject: [PATCH 275/639] 0032959: Visualization, OpenVR - add Oculus Touch controller bindings --- src/XRResources/FILES | 1 + src/XRResources/occtvr_bindings_touch.json | 160 +++++++++++++++++++++ 2 files changed, 161 insertions(+) create mode 100644 src/XRResources/occtvr_bindings_touch.json diff --git a/src/XRResources/FILES b/src/XRResources/FILES index 43ea04e5b0..817f962b6d 100644 --- a/src/XRResources/FILES +++ b/src/XRResources/FILES @@ -3,6 +3,7 @@ srcinc:::occtvr_bindings_generic.json srcinc:::occtvr_bindings_holographic_hmd.json srcinc:::occtvr_bindings_index_hmd.json srcinc:::occtvr_bindings_rift.json +srcinc:::occtvr_bindings_touch.json srcinc:::occtvr_bindings_vive.json srcinc:::occtvr_bindings_vive_controller.json srcinc:::occtvr_bindings_vive_cosmos.json diff --git a/src/XRResources/occtvr_bindings_touch.json b/src/XRResources/occtvr_bindings_touch.json new file mode 100644 index 0000000000..723d0d9888 --- /dev/null +++ b/src/XRResources/occtvr_bindings_touch.json @@ -0,0 +1,160 @@ +{ + "action_manifest_version" : 0, + "alias_info" : {}, + "bindings" : { + "/actions/generic_left" : { + "haptics" : [ + { + "output" : "/actions/generic_left/out/haptic", + "path" : "/user/hand/left/output/haptic" + } + ], + "sources" : [ + { + "inputs" : { + "click" : { + "output" : "/actions/generic_left/in/appmenu_click" + } + }, + "mode" : "button", + "path" : "/user/hand/left/input/application_menu" + }, + { + "inputs" : { + "click" : { + "output" : "/actions/generic_left/in/trackpad_click" + }, + "position" : { + "output" : "/actions/generic_left/in/trackpad_position" + }, + "touch" : { + "output" : "/actions/generic_left/in/trackpad_touch" + } + }, + "mode" : "trackpad", + "path" : "/user/hand/left/input/trackpad" + }, + { + "inputs" : { + "click" : { + "output" : "/actions/generic_left/in/sysmenu_click" + } + }, + "mode" : "button", + "path" : "/user/hand/left/input/system" + }, + { + "inputs" : { + "click" : { + "output" : "/actions/generic_left/in/trigger_click" + }, + "pull" : { + "output" : "/actions/generic_left/in/trigger_pull" + } + }, + "mode" : "trigger", + "path" : "/user/hand/left/input/trigger" + }, + { + "inputs" : { + "click" : { + "output" : "/actions/generic_left/in/appmenu_click" + } + }, + "mode" : "button", + "path" : "/user/hand/left/input/x" + }, + { + "inputs" : { + "click" : { + "output" : "/actions/generic_left/in/trackpad_click" + }, + "position" : { + "output" : "/actions/generic_left/in/trackpad_position" + }, + "touch" : { + "output" : "/actions/generic_left/in/trackpad_touch" + } + }, + "mode" : "joystick", + "path" : "/user/hand/left/input/joystick" + } + ] + }, + "/actions/generic_right" : { + "haptics" : [ + { + "output" : "/actions/generic_right/out/haptic", + "path" : "/user/hand/right/output/haptic" + } + ], + "sources" : [ + { + "inputs" : { + "click" : { + "output" : "/actions/generic_right/in/appmenu_click" + } + }, + "mode" : "button", + "path" : "/user/hand/right/input/application_menu" + }, + { + "inputs" : { + "click" : { + "output" : "/actions/generic_right/in/trackpad_click" + }, + "position" : { + "output" : "/actions/generic_right/in/trackpad_position" + }, + "touch" : { + "output" : "/actions/generic_right/in/trackpad_touch" + } + }, + "mode" : "trackpad", + "path" : "/user/hand/right/input/trackpad" + }, + { + "inputs" : { + "click" : { + "output" : "/actions/generic_right/in/trigger_click" + }, + "pull" : { + "output" : "/actions/generic_right/in/trigger_pull" + } + }, + "mode" : "trigger", + "path" : "/user/hand/right/input/trigger" + }, + { + "inputs" : { + "click" : { + "output" : "/actions/generic_right/in/thumbstick_click" + }, + "position" : { + "output" : "/actions/generic_right/in/thumbstick_position" + }, + "touch" : { + "output" : "/actions/generic_right/in/thumbstick_touch" + } + }, + "mode" : "joystick", + "path" : "/user/hand/right/input/joystick" + }, + { + "inputs" : { + "touch" : { + "output" : "/actions/generic_right/in/grip_click" + } + }, + "mode" : "trigger", + "path" : "/user/hand/right/input/grip" + } + ] + } + }, + "category" : "steamvr_input", + "controller_type" : "oculus_touch", + "description" : "Standard Open CASCADE Technology VR bindings for an oculus touch controller", + "options" : {}, + "simulated_actions" : [] +} From 034d1403b1cb4b439376a3f579bae6e4bdc6bbad Mon Sep 17 00:00:00 2001 From: aml Date: Fri, 29 Apr 2022 15:21:24 +0300 Subject: [PATCH 276/639] 0032953: Coding - add missing references where applicable --- src/Adaptor3d/Adaptor3d_CurveOnSurface.cxx | 8 +++--- src/Approx/Approx_SameParameter.cxx | 2 +- src/BOPAlgo/BOPAlgo_PaveFiller.hxx | 2 +- src/BOPAlgo/BOPAlgo_PaveFiller_6.cxx | 2 +- src/BRepLib/BRepLib_FindSurface.cxx | 8 +++--- .../BRepPrimAPI_MakeRevolution.cxx | 2 +- src/BinTools/BinTools_ShapeSetBase.cxx | 2 +- src/BinTools/BinTools_ShapeSetBase.hxx | 2 +- src/Bnd/Bnd_Box.cxx | 2 +- src/Bnd/Bnd_Box.hxx | 2 +- src/BndLib/BndLib_AddSurface.cxx | 2 +- src/ChFi3d/ChFi3d_Builder_C1.cxx | 12 ++++----- src/ChFi3d/ChFi3d_ChBuilder_C3.cxx | 8 +++--- src/GeomTools/GeomTools_CurveSet.cxx | 12 ++++----- src/GeomTools/GeomTools_SurfaceSet.cxx | 12 ++++----- src/IntAna2d/IntAna2d_Outils.cxx | 5 +++- src/IntAna2d/IntAna2d_Outils.hxx | 5 ++-- src/IntCurve/IntCurve_IntConicConic.cxx | 14 +++++----- src/ProjLib/ProjLib_Plane.cxx | 3 ++- src/ProjLib/ProjLib_Sphere.cxx | 3 ++- .../STEPCAFControl_GDTProperty.cxx | 4 +-- .../STEPCAFControl_GDTProperty.hxx | 4 +-- src/STEPCAFControl/STEPCAFControl_Writer.cxx | 18 ++++++------- src/STEPCAFControl/STEPCAFControl_Writer.hxx | 26 +++++++++++++------ .../ShapeAnalysis_BoxBndTree.hxx | 2 +- src/ShapeAnalysis/ShapeAnalysis_Curve.cxx | 2 +- src/ShapeAnalysis/ShapeAnalysis_Wire.cxx | 12 ++++----- src/ShapeFix/ShapeFix.cxx | 4 +-- src/ShapeFix/ShapeFix_ComposeShell.cxx | 20 +++++++------- src/TopOpeBRep/TopOpeBRep_FacesFiller.cxx | 2 +- .../TopOpeBRepBuild_GridSS.cxx | 2 +- src/ViewerTest/ViewerTest_ObjectCommands.cxx | 4 +-- .../XCAFDimTolObjects_DimensionObject.hxx | 4 +-- .../XCAFDimTolObjects_GeomToleranceObject.cxx | 2 +- .../XCAFDimTolObjects_GeomToleranceObject.hxx | 2 +- src/XCAFDoc/XCAFDoc_ClippingPlaneTool.cxx | 10 +++---- src/XCAFDoc/XCAFDoc_ClippingPlaneTool.hxx | 10 +++---- src/XCAFView/XCAFView_Object.hxx | 8 +++--- src/XDEDRAW/XDEDRAW_Props.cxx | 5 +++- 39 files changed, 134 insertions(+), 115 deletions(-) diff --git a/src/Adaptor3d/Adaptor3d_CurveOnSurface.cxx b/src/Adaptor3d/Adaptor3d_CurveOnSurface.cxx index 787af3564e..9bf807c227 100644 --- a/src/Adaptor3d/Adaptor3d_CurveOnSurface.cxx +++ b/src/Adaptor3d/Adaptor3d_CurveOnSurface.cxx @@ -99,10 +99,10 @@ static gp_Parab to3d(const gp_Pln& Pl, const gp_Parab2d& P) return gp_Parab(to3d(Pl,P.Axis()),P.Focal()); } -static gp_Vec SetLinearForm(const gp_Vec2d DW, const gp_Vec2d D2W,const gp_Vec2d D3W, - const gp_Vec D1U, const gp_Vec D1V, const gp_Vec D2U, - const gp_Vec D2V, const gp_Vec D2UV, const gp_Vec D3U, - const gp_Vec D3V, const gp_Vec D3UUV,const gp_Vec D3UVV) +static gp_Vec SetLinearForm(const gp_Vec2d& DW, const gp_Vec2d& D2W, const gp_Vec2d& D3W, + const gp_Vec& D1U, const gp_Vec& D1V, const gp_Vec& D2U, + const gp_Vec& D2V, const gp_Vec& D2UV, const gp_Vec& D3U, + const gp_Vec& D3V, const gp_Vec& D3UUV,const gp_Vec& D3UVV) {gp_Vec V31, V32, V33, V34,V3 ; V31.SetLinearForm(DW.X(),D1U, D2W.X()*DW.X(),D2U, diff --git a/src/Approx/Approx_SameParameter.cxx b/src/Approx/Approx_SameParameter.cxx index 3a13047f2c..a4e467e611 100644 --- a/src/Approx/Approx_SameParameter.cxx +++ b/src/Approx/Approx_SameParameter.cxx @@ -108,7 +108,7 @@ void Approx_SameParameter_Evaluator::Evaluate (Standard_Integer *,/*Dimension*/ //purpose : //======================================================================= static void ProjectPointOnCurve(const Standard_Real InitValue, - const gp_Pnt APoint, + const gp_Pnt& APoint, const Standard_Real Tolerance, const Standard_Integer NumIteration, const Adaptor3d_Curve& Curve, diff --git a/src/BOPAlgo/BOPAlgo_PaveFiller.hxx b/src/BOPAlgo/BOPAlgo_PaveFiller.hxx index 431accaa9e..cd2275d994 100644 --- a/src/BOPAlgo/BOPAlgo_PaveFiller.hxx +++ b/src/BOPAlgo/BOPAlgo_PaveFiller.hxx @@ -525,7 +525,7 @@ protected: Standard_EXPORT void UpdateEdgeTolerance(const Standard_Integer nE, const Standard_Real aTolNew); - Standard_EXPORT void RemovePaveBlocks(const TColStd_MapOfInteger theEdges); + Standard_EXPORT void RemovePaveBlocks(const TColStd_MapOfInteger& theEdges); Standard_EXPORT void CorrectToleranceOfSE(); diff --git a/src/BOPAlgo/BOPAlgo_PaveFiller_6.cxx b/src/BOPAlgo/BOPAlgo_PaveFiller_6.cxx index a1c7d2b0e5..a4e454665d 100644 --- a/src/BOPAlgo/BOPAlgo_PaveFiller_6.cxx +++ b/src/BOPAlgo/BOPAlgo_PaveFiller_6.cxx @@ -3394,7 +3394,7 @@ void BOPAlgo_PaveFiller::UpdatePaveBlocks //function : RemovePaveBlocks //purpose : //======================================================================= -void BOPAlgo_PaveFiller::RemovePaveBlocks(const TColStd_MapOfInteger theEdges) +void BOPAlgo_PaveFiller::RemovePaveBlocks(const TColStd_MapOfInteger& theEdges) { // Remove all pave blocks referring to input edges: // diff --git a/src/BRepLib/BRepLib_FindSurface.cxx b/src/BRepLib/BRepLib_FindSurface.cxx index 5b3cbf38b2..15ae27de86 100644 --- a/src/BRepLib/BRepLib_FindSurface.cxx +++ b/src/BRepLib/BRepLib_FindSurface.cxx @@ -205,10 +205,10 @@ static void fillParams (const TColStd_Array1OfReal& theKnots, theParams.Append (theParMax); } -static void fillPoints (const BRepAdaptor_Curve& theCurve, - const NCollection_Vector theParams, - TColgp_SequenceOfPnt& thePoints, - TColStd_SequenceOfReal& theWeights) +static void fillPoints (const BRepAdaptor_Curve& theCurve, + const NCollection_Vector& theParams, + TColgp_SequenceOfPnt& thePoints, + TColStd_SequenceOfReal& theWeights) { Standard_Real aDistPrev = 0., aDistNext; gp_Pnt aPPrev (theCurve.Value (theParams (0))), aPNext; diff --git a/src/BRepPrimAPI/BRepPrimAPI_MakeRevolution.cxx b/src/BRepPrimAPI/BRepPrimAPI_MakeRevolution.cxx index 5c5efecb45..b22ae54c39 100644 --- a/src/BRepPrimAPI/BRepPrimAPI_MakeRevolution.cxx +++ b/src/BRepPrimAPI/BRepPrimAPI_MakeRevolution.cxx @@ -29,7 +29,7 @@ //purpose : //======================================================================= static Handle(Geom2d_Curve) Project(const Handle(Geom_Curve)& M, - const gp_Ax3 Axis) + const gp_Ax3& Axis) { Handle(Geom2d_Curve) C; C = GeomProjLib::Curve2d(M,new Geom_Plane(Axis)); diff --git a/src/BinTools/BinTools_ShapeSetBase.cxx b/src/BinTools/BinTools_ShapeSetBase.cxx index dcc9b4268d..0486760768 100644 --- a/src/BinTools/BinTools_ShapeSetBase.cxx +++ b/src/BinTools/BinTools_ShapeSetBase.cxx @@ -28,7 +28,7 @@ const Standard_CString BinTools_ShapeSetBase::THE_ASCII_VERSIONS[BinTools_Format //function : operator << (gp_Pnt) //purpose : //======================================================================= -Standard_OStream& operator << (Standard_OStream& OS, const gp_Pnt P) +Standard_OStream& operator << (Standard_OStream& OS, const gp_Pnt& P) { BinTools::PutReal (OS, P.X()); BinTools::PutReal (OS, P.Y()); diff --git a/src/BinTools/BinTools_ShapeSetBase.hxx b/src/BinTools/BinTools_ShapeSetBase.hxx index 551218a9b1..9782195bba 100644 --- a/src/BinTools/BinTools_ShapeSetBase.hxx +++ b/src/BinTools/BinTools_ShapeSetBase.hxx @@ -27,7 +27,7 @@ class TopoDS_Shape; class gp_Pnt; //! Writes to the stream a gp_Pnt data -Standard_OStream& operator << (Standard_OStream& OS, const gp_Pnt P); +Standard_OStream& operator << (Standard_OStream& OS, const gp_Pnt& P); //! Computes a hash code for the given value of the uint64_t type, in range [1, theUpperBound] inline Standard_Integer HashCode (const uint64_t theValue, const Standard_Integer theUpperBound) diff --git a/src/Bnd/Bnd_Box.cxx b/src/Bnd/Bnd_Box.cxx index fb0c1495fa..eba846a5f5 100644 --- a/src/Bnd/Bnd_Box.cxx +++ b/src/Bnd/Bnd_Box.cxx @@ -46,7 +46,7 @@ Bnd_Box::Bnd_Box() //function : Bnd_Box //purpose : //======================================================================= -Bnd_Box::Bnd_Box (const gp_Pnt theMin, const gp_Pnt theMax) +Bnd_Box::Bnd_Box (const gp_Pnt& theMin, const gp_Pnt& theMax) : Gap (0.0) { SetVoid(); diff --git a/src/Bnd/Bnd_Box.hxx b/src/Bnd/Bnd_Box.hxx index 9080207e0f..f9390cb87f 100644 --- a/src/Bnd/Bnd_Box.hxx +++ b/src/Bnd/Bnd_Box.hxx @@ -71,7 +71,7 @@ public: //! Creates a bounding box, it contains: //! - minimum/maximum point of bounding box, //! The constructed box is qualified Void. Its gap is null. - Standard_EXPORT Bnd_Box (const gp_Pnt theMin, const gp_Pnt theMax); + Standard_EXPORT Bnd_Box (const gp_Pnt& theMin, const gp_Pnt& theMax); //! Sets this bounding box so that it covers the whole of 3D space. //! It is infinitely long in all directions. diff --git a/src/BndLib/BndLib_AddSurface.cxx b/src/BndLib/BndLib_AddSurface.cxx index fa219167fb..b1ba162eac 100644 --- a/src/BndLib/BndLib_AddSurface.cxx +++ b/src/BndLib/BndLib_AddSurface.cxx @@ -798,7 +798,7 @@ class SurfMaxMinCoord : public math_MultipleVarFunction private: SurfMaxMinCoord & operator = (const SurfMaxMinCoord & theOther); - Standard_Boolean CheckInputData(const math_Vector theParams) + Standard_Boolean CheckInputData(const math_Vector& theParams) { if (theParams(1) < myUMin || theParams(1) > myUMax || diff --git a/src/ChFi3d/ChFi3d_Builder_C1.cxx b/src/ChFi3d/ChFi3d_Builder_C1.cxx index d4e48a4c90..93f20646ac 100644 --- a/src/ChFi3d/ChFi3d_Builder_C1.cxx +++ b/src/ChFi3d/ChFi3d_Builder_C1.cxx @@ -1502,12 +1502,12 @@ static Standard_Boolean containE(const TopoDS_Face & F1, // from , check points between and //======================================================================= -static Standard_Boolean IsShrink(const Geom2dAdaptor_Curve PC, - const Standard_Real Pf, - const Standard_Real Pl, - const Standard_Real Param, - const Standard_Boolean isU, - const Standard_Real tol) +static Standard_Boolean IsShrink(const Geom2dAdaptor_Curve& PC, + const Standard_Real Pf, + const Standard_Real Pl, + const Standard_Real Param, + const Standard_Boolean isU, + const Standard_Real tol) { switch (PC.GetType()) { case GeomAbs_Line: { diff --git a/src/ChFi3d/ChFi3d_ChBuilder_C3.cxx b/src/ChFi3d/ChFi3d_ChBuilder_C3.cxx index 8167011f30..9bd677069d 100644 --- a/src/ChFi3d/ChFi3d_ChBuilder_C3.cxx +++ b/src/ChFi3d/ChFi3d_ChBuilder_C3.cxx @@ -60,10 +60,10 @@ // la distance de PntD par rapport au plan passant par les trois // points PntA, PntB, PntC //======================================================================= -static Standard_Boolean CoPlanar(const gp_Pnt PntA, - const gp_Pnt PntB, - const gp_Pnt PntC, - const gp_Pnt PntD) +static Standard_Boolean CoPlanar(const gp_Pnt& PntA, + const gp_Pnt& PntB, + const gp_Pnt& PntC, + const gp_Pnt& PntD) { gp_Vec vecAB(PntA, PntB); gp_Vec vecAC(PntA, PntC); diff --git a/src/GeomTools/GeomTools_CurveSet.cxx b/src/GeomTools/GeomTools_CurveSet.cxx index a6e8a3e8da..76f053cfb9 100644 --- a/src/GeomTools/GeomTools_CurveSet.cxx +++ b/src/GeomTools/GeomTools_CurveSet.cxx @@ -114,9 +114,9 @@ Standard_Integer GeomTools_CurveSet::Index //purpose : //======================================================================= -static void Print(const gp_Pnt P, - Standard_OStream& OS, - const Standard_Boolean compact) +static void Print(const gp_Pnt& P, + Standard_OStream& OS, + const Standard_Boolean compact) { OS << P.X(); if (!compact) OS << ","; @@ -133,9 +133,9 @@ static void Print(const gp_Pnt P, //purpose : //======================================================================= -static void Print(const gp_Dir D, - Standard_OStream& OS, - const Standard_Boolean compact) +static void Print(const gp_Dir& D, + Standard_OStream& OS, + const Standard_Boolean compact) { OS << D.X(); if (!compact) OS << ","; diff --git a/src/GeomTools/GeomTools_SurfaceSet.cxx b/src/GeomTools/GeomTools_SurfaceSet.cxx index 2dcc11cbd1..707cfde1d9 100644 --- a/src/GeomTools/GeomTools_SurfaceSet.cxx +++ b/src/GeomTools/GeomTools_SurfaceSet.cxx @@ -118,9 +118,9 @@ Standard_Integer GeomTools_SurfaceSet::Index //purpose : //======================================================================= -static void Print(const gp_Pnt P, - Standard_OStream& OS, - const Standard_Boolean compact) +static void Print(const gp_Pnt& P, + Standard_OStream& OS, + const Standard_Boolean compact) { OS << P.X(); if (!compact) OS << ","; @@ -137,9 +137,9 @@ static void Print(const gp_Pnt P, //purpose : //======================================================================= -static void Print(const gp_Dir D, - Standard_OStream& OS, - const Standard_Boolean compact) +static void Print(const gp_Dir& D, + Standard_OStream& OS, + const Standard_Boolean compact) { OS << D.X(); if (!compact) OS << ","; diff --git a/src/IntAna2d/IntAna2d_Outils.cxx b/src/IntAna2d/IntAna2d_Outils.cxx index 8216bc3f3b..d5b960ad24 100644 --- a/src/IntAna2d/IntAna2d_Outils.cxx +++ b/src/IntAna2d/IntAna2d_Outils.cxx @@ -267,7 +267,10 @@ void Traitement_Points_Confondus(Standard_Integer& nb_pts, } //----------------------------------------------------------------------------- -void Coord_Ancien_Repere(Standard_Real& x1,Standard_Real& y1,const gp_Ax2d Dir1) { +void Coord_Ancien_Repere(Standard_Real& x1, + Standard_Real& y1, + const gp_Ax2d& Dir1) +{ Standard_Real t11,t12,t21,t22,t13,t23; Standard_Real x0,y0; diff --git a/src/IntAna2d/IntAna2d_Outils.hxx b/src/IntAna2d/IntAna2d_Outils.hxx index 43ef3cef2d..6d11e2c0a7 100644 --- a/src/IntAna2d/IntAna2d_Outils.hxx +++ b/src/IntAna2d/IntAna2d_Outils.hxx @@ -55,8 +55,9 @@ Standard_Boolean Points_Confondus(const Standard_Real xa,const Standard_Real ya, void Traitement_Points_Confondus(Standard_Integer& nb_pts ,IntAna2d_IntPoint *pts); -void Coord_Ancien_Repere(Standard_Real& Ancien_X,Standard_Real& Ancien_Y - ,const gp_Ax2d Axe_Nouveau_Repere); +void Coord_Ancien_Repere(Standard_Real& Ancien_X, + Standard_Real& Ancien_Y, + const gp_Ax2d& Axe_Nouveau_Repere); #endif diff --git a/src/IntCurve/IntCurve_IntConicConic.cxx b/src/IntCurve/IntCurve_IntConicConic.cxx index 0d7ac3a759..97796b007d 100644 --- a/src/IntCurve/IntCurve_IntConicConic.cxx +++ b/src/IntCurve/IntCurve_IntConicConic.cxx @@ -56,13 +56,13 @@ static inline Standard_Boolean BOUNDED_DOMAIN(const IntRes2d_Domain& domain) return (domain.HasFirstPoint() && domain.HasLastPoint()); } -static Standard_Boolean SET_BOUNDED_DOMAIN(const IntRes2d_Domain domain, - Standard_Real& binf, - Standard_Real& tolinf, - gp_Pnt2d& Pntinf, - Standard_Real& bsup, - Standard_Real& tolsup, - gp_Pnt2d& Pntsup) +static Standard_Boolean SET_BOUNDED_DOMAIN(const IntRes2d_Domain& domain, + Standard_Real& binf, + Standard_Real& tolinf, + gp_Pnt2d& Pntinf, + Standard_Real& bsup, + Standard_Real& tolsup, + gp_Pnt2d& Pntsup) { if(domain.HasFirstPoint()) { if(binf //#include -Standard_EXPORT Standard_Boolean FUN_projPonL(const gp_Pnt& P,const TopOpeBRep_LineInter L,const TopOpeBRep_FacesFiller& FF, +Standard_EXPORT Standard_Boolean FUN_projPonL(const gp_Pnt& P,const TopOpeBRep_LineInter& L,const TopOpeBRep_FacesFiller& FF, Standard_Real& paramL) { Standard_Boolean paramLdef = Standard_False; diff --git a/src/TopOpeBRepBuild/TopOpeBRepBuild_GridSS.cxx b/src/TopOpeBRepBuild/TopOpeBRepBuild_GridSS.cxx index 5442620774..315117e45c 100644 --- a/src/TopOpeBRepBuild/TopOpeBRepBuild_GridSS.cxx +++ b/src/TopOpeBRepBuild/TopOpeBRepBuild_GridSS.cxx @@ -99,7 +99,7 @@ Standard_EXPORT void TopOpeBRepDS_SetThePCurve //(const TopoDS_Face& fF,const TopoDS_Edge& E,Standard_Real& splitpar); //--------------------------------------------- -static Standard_Integer FUN_getG(const gp_Pnt P,const TopOpeBRepDS_ListOfInterference& LI,const Handle(TopOpeBRepDS_HDataStructure) HDS,Standard_Integer& iEinterf) +static Standard_Integer FUN_getG(const gp_Pnt& P,const TopOpeBRepDS_ListOfInterference& LI,const Handle(TopOpeBRepDS_HDataStructure) HDS,Standard_Integer& iEinterf) //--------------------------------------------- { TopOpeBRepDS_ListIteratorOfListOfInterference ILI(LI); diff --git a/src/ViewerTest/ViewerTest_ObjectCommands.cxx b/src/ViewerTest/ViewerTest_ObjectCommands.cxx index 63c000d5a9..d2f9763539 100644 --- a/src/ViewerTest/ViewerTest_ObjectCommands.cxx +++ b/src/ViewerTest/ViewerTest_ObjectCommands.cxx @@ -1965,7 +1965,7 @@ class FilledCircle : public AIS_InteractiveObject // CASCADE RTTI DEFINE_STANDARD_RTTI_INLINE(FilledCircle, AIS_InteractiveObject); - FilledCircle (gp_Pnt theCenter, Standard_Real theRadius); + FilledCircle (const gp_Pnt& theCenter, Standard_Real theRadius); FilledCircle (Handle(Geom_Circle) theCircle); private: @@ -1987,7 +1987,7 @@ class FilledCircle : public AIS_InteractiveObject }; -FilledCircle::FilledCircle(gp_Pnt theCenter, Standard_Real theRadius) +FilledCircle::FilledCircle(const gp_Pnt& theCenter, Standard_Real theRadius) { myCircle = CreateCircle(theCenter, theRadius); myFilledStatus = Standard_True; diff --git a/src/XCAFDimTolObjects/XCAFDimTolObjects_DimensionObject.hxx b/src/XCAFDimTolObjects/XCAFDimTolObjects_DimensionObject.hxx index e9783f7b05..cccfdc3bc4 100644 --- a/src/XCAFDimTolObjects/XCAFDimTolObjects_DimensionObject.hxx +++ b/src/XCAFDimTolObjects/XCAFDimTolObjects_DimensionObject.hxx @@ -222,13 +222,13 @@ public: //! Set connection point (for dimesional_size), //! Set connection point for the first shape (for dimensional_location). - void SetPoint(const gp_Pnt thePnt) { + void SetPoint(const gp_Pnt& thePnt) { myPnt1 = thePnt; myHasPoint1 = Standard_True; } // Set connection point for the second shape (for dimensional_location only). - void SetPoint2(const gp_Pnt thePnt) { + void SetPoint2(const gp_Pnt& thePnt) { myPnt2 = thePnt; myHasPoint2 = Standard_True; } diff --git a/src/XCAFDimTolObjects/XCAFDimTolObjects_GeomToleranceObject.cxx b/src/XCAFDimTolObjects/XCAFDimTolObjects_GeomToleranceObject.cxx index 14d7207cf3..c405b343d7 100644 --- a/src/XCAFDimTolObjects/XCAFDimTolObjects_GeomToleranceObject.cxx +++ b/src/XCAFDimTolObjects/XCAFDimTolObjects_GeomToleranceObject.cxx @@ -254,7 +254,7 @@ Standard_Real XCAFDimTolObjects_GeomToleranceObject::GetMaxValueModifier() cons //purpose : //======================================================================= -void XCAFDimTolObjects_GeomToleranceObject::SetAxis (const gp_Ax2 theAxis) +void XCAFDimTolObjects_GeomToleranceObject::SetAxis(const gp_Ax2& theAxis) { myAxis = theAxis; myHasAxis = Standard_True; diff --git a/src/XCAFDimTolObjects/XCAFDimTolObjects_GeomToleranceObject.hxx b/src/XCAFDimTolObjects/XCAFDimTolObjects_GeomToleranceObject.hxx index 8bb6e1effa..15e746518c 100644 --- a/src/XCAFDimTolObjects/XCAFDimTolObjects_GeomToleranceObject.hxx +++ b/src/XCAFDimTolObjects/XCAFDimTolObjects_GeomToleranceObject.hxx @@ -105,7 +105,7 @@ public: //! Returns the maximal upper tolerance. Standard_EXPORT Standard_Real GetMaxValueModifier() const; - Standard_EXPORT void SetAxis (const gp_Ax2 theAxis); + Standard_EXPORT void SetAxis (const gp_Ax2& theAxis); Standard_EXPORT gp_Ax2 GetAxis() const; diff --git a/src/XCAFDoc/XCAFDoc_ClippingPlaneTool.cxx b/src/XCAFDoc/XCAFDoc_ClippingPlaneTool.cxx index 7d009481de..e0a23ed09f 100644 --- a/src/XCAFDoc/XCAFDoc_ClippingPlaneTool.cxx +++ b/src/XCAFDoc/XCAFDoc_ClippingPlaneTool.cxx @@ -100,7 +100,7 @@ Standard_Boolean XCAFDoc_ClippingPlaneTool::GetClippingPlane(const TDF_Label& th //purpose : //======================================================================= -TDF_Label XCAFDoc_ClippingPlaneTool::AddClippingPlane(const gp_Pln thePlane, const TCollection_ExtendedString theName) const +TDF_Label XCAFDoc_ClippingPlaneTool::AddClippingPlane(const gp_Pln& thePlane, const TCollection_ExtendedString theName) const { TDF_Label aLabel; TDF_LabelSequence aClippingPlanes; @@ -137,7 +137,7 @@ TDF_Label XCAFDoc_ClippingPlaneTool::AddClippingPlane(const gp_Pln thePlane, con //purpose : //======================================================================= -TDF_Label XCAFDoc_ClippingPlaneTool::AddClippingPlane(const gp_Pln thePlane, const Handle(TCollection_HAsciiString)& theName) const +TDF_Label XCAFDoc_ClippingPlaneTool::AddClippingPlane(const gp_Pln& thePlane, const Handle(TCollection_HAsciiString)& theName) const { TCollection_ExtendedString anExtName = TCollection_ExtendedString(theName->String()); return AddClippingPlane(thePlane, anExtName); @@ -149,7 +149,7 @@ TDF_Label XCAFDoc_ClippingPlaneTool::AddClippingPlane(const gp_Pln thePlane, con //purpose : //======================================================================= -TDF_Label XCAFDoc_ClippingPlaneTool::AddClippingPlane(const gp_Pln thePlane, const TCollection_ExtendedString theName, const Standard_Boolean theCapping) const +TDF_Label XCAFDoc_ClippingPlaneTool::AddClippingPlane(const gp_Pln& thePlane, const TCollection_ExtendedString theName, const Standard_Boolean theCapping) const { TDF_Label aLabel = AddClippingPlane(thePlane, theName); Standard_Integer aCappingVal = (theCapping) ? 1 : 0; @@ -163,7 +163,7 @@ TDF_Label XCAFDoc_ClippingPlaneTool::AddClippingPlane(const gp_Pln thePlane, con //purpose : //======================================================================= -TDF_Label XCAFDoc_ClippingPlaneTool::AddClippingPlane(const gp_Pln thePlane, const Handle(TCollection_HAsciiString)& theName, const Standard_Boolean theCapping) const +TDF_Label XCAFDoc_ClippingPlaneTool::AddClippingPlane(const gp_Pln& thePlane, const Handle(TCollection_HAsciiString)& theName, const Standard_Boolean theCapping) const { TCollection_ExtendedString anExtName = TCollection_ExtendedString(theName->String()); return AddClippingPlane(thePlane, anExtName, theCapping); @@ -206,7 +206,7 @@ void XCAFDoc_ClippingPlaneTool::GetClippingPlanes(TDF_LabelSequence& theLabels) //======================================================================= void XCAFDoc_ClippingPlaneTool::UpdateClippingPlane(const TDF_Label& theLabel, - const gp_Pln thePlane, const TCollection_ExtendedString theName) const + const gp_Pln& thePlane, const TCollection_ExtendedString theName) const { if (theLabel.Father() != Label()) return; diff --git a/src/XCAFDoc/XCAFDoc_ClippingPlaneTool.hxx b/src/XCAFDoc/XCAFDoc_ClippingPlaneTool.hxx index c4d19dfe88..980fec6346 100644 --- a/src/XCAFDoc/XCAFDoc_ClippingPlaneTool.hxx +++ b/src/XCAFDoc/XCAFDoc_ClippingPlaneTool.hxx @@ -60,22 +60,22 @@ public: //! Adds a clipping plane definition to a ClippingPlane table and returns //! its label (returns existing label if the same clipping plane //! is already defined) - Standard_EXPORT TDF_Label AddClippingPlane(const gp_Pln thePlane, const TCollection_ExtendedString theName, const Standard_Boolean theCapping) const; + Standard_EXPORT TDF_Label AddClippingPlane(const gp_Pln& thePlane, const TCollection_ExtendedString theName, const Standard_Boolean theCapping) const; //! Adds a clipping plane definition to a ClippingPlane table and returns //! its label (returns existing label if the same clipping plane //! is already defined) - Standard_EXPORT TDF_Label AddClippingPlane(const gp_Pln thePlane, const Handle(TCollection_HAsciiString)& theName, const Standard_Boolean theCapping) const; + Standard_EXPORT TDF_Label AddClippingPlane(const gp_Pln& thePlane, const Handle(TCollection_HAsciiString)& theName, const Standard_Boolean theCapping) const; //! Adds a clipping plane definition to a ClippingPlane table and returns //! its label (returns existing label if the same clipping plane //! is already defined) - Standard_EXPORT TDF_Label AddClippingPlane(const gp_Pln thePlane, const TCollection_ExtendedString theName) const; + Standard_EXPORT TDF_Label AddClippingPlane(const gp_Pln& thePlane, const TCollection_ExtendedString theName) const; //! Adds a clipping plane definition to a ClippingPlane table and returns //! its label (returns existing label if the same clipping plane //! is already defined) - Standard_EXPORT TDF_Label AddClippingPlane(const gp_Pln thePlane, const Handle(TCollection_HAsciiString)& theName) const; + Standard_EXPORT TDF_Label AddClippingPlane(const gp_Pln& thePlane, const Handle(TCollection_HAsciiString)& theName) const; //! Removes clipping plane from the ClippingPlane table //! Return false and do nothing if clipping plane is referenced in at least one View @@ -87,7 +87,7 @@ public: //! Sets new value of plane and name to the given clipping plane label //! or do nothing, if the given label is not a clipping plane label - Standard_EXPORT void UpdateClippingPlane(const TDF_Label& theLabelL, const gp_Pln thePlane, const TCollection_ExtendedString theName) const; + Standard_EXPORT void UpdateClippingPlane(const TDF_Label& theLabelL, const gp_Pln& thePlane, const TCollection_ExtendedString theName) const; //! Set new value of capping for given clipping plane label Standard_EXPORT void SetCapping(const TDF_Label& theClippingPlaneL, const Standard_Boolean theCapping); diff --git a/src/XCAFView/XCAFView_Object.hxx b/src/XCAFView/XCAFView_Object.hxx index 5085da4f87..5a94e91884 100644 --- a/src/XCAFView/XCAFView_Object.hxx +++ b/src/XCAFView/XCAFView_Object.hxx @@ -60,7 +60,7 @@ public: return myType; } - void SetProjectionPoint(gp_Pnt thePoint) + void SetProjectionPoint(const gp_Pnt& thePoint) { myProjectionPoint = thePoint; } @@ -70,7 +70,7 @@ public: return myProjectionPoint; } - void SetViewDirection(gp_Dir theDirection) + void SetViewDirection(const gp_Dir& theDirection) { myViewDirection = theDirection; } @@ -80,7 +80,7 @@ public: return myViewDirection; } - void SetUpDirection(gp_Dir theDirection) + void SetUpDirection(const gp_Dir& theDirection) { myUpDirection = theDirection; } @@ -200,7 +200,7 @@ public: return myGDTPoints->Length(); } - void SetGDTPoint(const Standard_Integer theIndex, const gp_Pnt thePoint) + void SetGDTPoint(const Standard_Integer theIndex, const gp_Pnt& thePoint) { if (myGDTPoints.IsNull()) return; diff --git a/src/XDEDRAW/XDEDRAW_Props.cxx b/src/XDEDRAW/XDEDRAW_Props.cxx index f8d674d141..3e87e312b1 100644 --- a/src/XDEDRAW/XDEDRAW_Props.cxx +++ b/src/XDEDRAW/XDEDRAW_Props.cxx @@ -101,7 +101,10 @@ static double TetraVol(gp_Pnt RefPoint, gp_Pnt Som1, gp_Pnt Som2, gp_Pnt Som3) //function : TetraCen //purpose : auxiliary //======================================================================= -static gp_XYZ TetraCen(gp_Pnt RefPoint, gp_Pnt Som1, gp_Pnt Som2, gp_Pnt Som3) +static gp_XYZ TetraCen(const gp_Pnt& RefPoint, + const gp_Pnt& Som1, + const gp_Pnt& Som2, + const gp_Pnt& Som3) { gp_XYZ curCentr, plnPnt; plnPnt = ( Som1.XYZ() + Som2.XYZ() + Som3.XYZ() )/3; From 5dd4cb6e60bb93728d489f48010bb02b3aef74c5 Mon Sep 17 00:00:00 2001 From: aml Date: Wed, 4 May 2022 11:11:00 +0300 Subject: [PATCH 277/639] 0032958: Coding - problem compile OCCT on Debian80-64 and MacOS-x86_64 with debugging mode Add missing include. --- src/GeomFill/GeomFill_Pipe.cxx | 1 + 1 file changed, 1 insertion(+) diff --git a/src/GeomFill/GeomFill_Pipe.cxx b/src/GeomFill/GeomFill_Pipe.cxx index af4aa4e1d3..2f9c759747 100644 --- a/src/GeomFill/GeomFill_Pipe.cxx +++ b/src/GeomFill/GeomFill_Pipe.cxx @@ -29,6 +29,7 @@ #include #include #include +#include #include #include #include From 1966e6af07edf3f2887ece0add02a7d6ca354513 Mon Sep 17 00:00:00 2001 From: ddzama Date: Thu, 31 Mar 2022 16:18:19 +0300 Subject: [PATCH 278/639] 0032919: Coding Rules - suppress useless MSVC warning C26812 on VS2019/C++20 (prefer 'enum class' over 'enum') CMake and genproj scripts have been updated to suppress this misleading warning that cannot be fixed without breaking existing API. --- adm/cmake/occt_defs_flags.cmake | 3 +++ adm/templates/template.vc10 | 8 ++++---- adm/templates/template.vc10x | 8 ++++---- 3 files changed, 11 insertions(+), 8 deletions(-) diff --git a/adm/cmake/occt_defs_flags.cmake b/adm/cmake/occt_defs_flags.cmake index d1c8172bdd..dc20cc283b 100644 --- a/adm/cmake/occt_defs_flags.cmake +++ b/adm/cmake/occt_defs_flags.cmake @@ -25,6 +25,9 @@ if (NOT CMAKE_SIZEOF_VOID_P EQUAL 8) endif() if (MSVC) + # suppress C26812 on VS2019/C++20 (prefer 'enum class' over 'enum') + set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /fp:precise /wd\"26812\"") + # suppress warning on using portable non-secure functions in favor of non-portable secure ones add_definitions (-D_CRT_SECURE_NO_WARNINGS -D_CRT_NONSTDC_NO_DEPRECATE) else() set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fexceptions -fPIC") diff --git a/adm/templates/template.vc10 b/adm/templates/template.vc10 index 158733423c..282b75f90a 100644 --- a/adm/templates/template.vc10 +++ b/adm/templates/template.vc10 @@ -100,7 +100,7 @@ .\..\..\..\win32\__VCVER__\obj\__TKNAM__/ Level4 true - %(DisableSpecificWarnings) + 26812 Precise NotUsing __VCMPL32__ @@ -148,7 +148,7 @@ true ProgramDatabase Default - %(DisableSpecificWarnings) + 26812 EnableFastChecks Precise NotUsing @@ -196,7 +196,7 @@ .\..\..\..\win64\__VCVER__\obj\__TKNAM__/ Level4 true - %(DisableSpecificWarnings) + 26812 Precise NotUsing __VCMPL64__ @@ -244,7 +244,7 @@ true ProgramDatabase Default - %(DisableSpecificWarnings) + 26812 EnableFastChecks Precise NotUsing diff --git a/adm/templates/template.vc10x b/adm/templates/template.vc10x index 07f9c750fe..843376b2cd 100644 --- a/adm/templates/template.vc10x +++ b/adm/templates/template.vc10x @@ -95,7 +95,7 @@ .\..\..\..\win32\__VCVER__\obj\__XQTNAM__/ Level4 true - %(DisableSpecificWarnings) + 26812 Precise__VCMPL32__ @@ -140,7 +140,7 @@ true ProgramDatabase Default - %(DisableSpecificWarnings) + 26812 EnableFastChecks Precise__VCMPL32__ @@ -185,7 +185,7 @@ .\..\..\..\win64\__VCVER__\obj\__XQTNAM__/ Level4 true - %(DisableSpecificWarnings) + 26812 Precise__VCMPL64__ @@ -229,7 +229,7 @@ true ProgramDatabase Default - %(DisableSpecificWarnings) + 26812 EnableFastChecks Precise__VCMPL64__ From 73035770f6fced4ec7dc7e6a0276ee894daa479a Mon Sep 17 00:00:00 2001 From: ddzama Date: Wed, 30 Mar 2022 11:40:11 +0300 Subject: [PATCH 279/639] 0032908: Coding Rules - fix E0349 MSVC compilation error on VS2019/C++20 Get rid of raw C strings in error code to avoid error 0349. Use std::string instead. --- src/XSDRAW/XSDRAW.cxx | 28 ++++++++++++++++++---------- 1 file changed, 18 insertions(+), 10 deletions(-) diff --git a/src/XSDRAW/XSDRAW.cxx b/src/XSDRAW/XSDRAW.cxx index 27f24e5b65..c4638e2427 100644 --- a/src/XSDRAW/XSDRAW.cxx +++ b/src/XSDRAW/XSDRAW.cxx @@ -40,7 +40,8 @@ #include #include -#include +#include +#include //#include static int deja = 0, dejald = 0; //unused variable @@ -256,16 +257,23 @@ void XSDRAW::LoadDraw (Draw_Interpretor& theCommands) Handle(TColStd_HSequenceOfTransient) XSDRAW::GetList (const Standard_CString first, const Standard_CString second) { - Handle(TColStd_HSequenceOfTransient) list; - if (!first || first[0] == '\0') { - char ligne[80]; ligne[0] = '\0'; char truc; -// std::cin.clear(); std::cin.get (ligne,79,'\n'); - std::cin >> ligne; Standard_Size ln = strlen(ligne); - char *ff = &ligne[0], *ss = NULL; - std::cin.get(truc); if (truc != '\n') { std::cin>>&ligne[ln+1]; ss = &ligne[ln+1]; } - return XSDRAW::GetList (ff,ss); + if ( !first || first[0] == '\0' ) + { + std::string aLineFirst; + std::cin >> aLineFirst; + + char terminateSymbol = '\0'; + std::cin.get(terminateSymbol); + + if ( terminateSymbol == '\n' ) + return XSDRAW::GetList (aLineFirst.c_str(), nullptr); + else + { + std::string aLineSecond; + std::cin >> aLineSecond; + return XSDRAW::GetList (aLineFirst.c_str(), aLineSecond.c_str()); + } } -// return IFSelect_Functions::GiveList (Session(),first,second); return IFSelect_Functions::GiveList (Session(),first,second); } From d2c11b791c97b52c6aacd9a38b5a619ec90f37ac Mon Sep 17 00:00:00 2001 From: aml Date: Fri, 14 Jan 2022 18:05:42 +0300 Subject: [PATCH 280/639] 0032961: Coding - get rid of unused headers [IGESAppli to IGESToBRep] --- src/IGESAppli/IGESAppli_ToolDrilledHole.cxx | 1 - src/IGESAppli/IGESAppli_ToolElementResults.cxx | 1 - src/IGESAppli/IGESAppli_ToolFiniteElement.cxx | 1 - src/IGESAppli/IGESAppli_ToolFlow.cxx | 1 - src/IGESAppli/IGESAppli_ToolFlowLineSpec.cxx | 1 - src/IGESAppli/IGESAppli_ToolLevelFunction.cxx | 1 - .../IGESAppli_ToolLevelToPWBLayerMap.cxx | 1 - src/IGESAppli/IGESAppli_ToolLineWidening.cxx | 1 - src/IGESAppli/IGESAppli_ToolNodalConstraint.cxx | 1 - src/IGESAppli/IGESAppli_ToolNodalDisplAndRot.cxx | 1 - src/IGESAppli/IGESAppli_ToolNodalResults.cxx | 1 - src/IGESAppli/IGESAppli_ToolNode.cxx | 1 - src/IGESAppli/IGESAppli_ToolPWBArtworkStackup.cxx | 1 - src/IGESAppli/IGESAppli_ToolPWBDrilledHole.cxx | 1 - src/IGESAppli/IGESAppli_ToolPartNumber.cxx | 1 - src/IGESAppli/IGESAppli_ToolPinNumber.cxx | 1 - src/IGESAppli/IGESAppli_ToolPipingFlow.cxx | 1 - .../IGESAppli_ToolReferenceDesignator.cxx | 1 - src/IGESAppli/IGESAppli_ToolRegionRestriction.cxx | 1 - src/IGESBasic/IGESBasic_SubfigureDef.cxx | 1 - src/IGESBasic/IGESBasic_ToolAssocGroupType.cxx | 1 - src/IGESBasic/IGESBasic_ToolExternalRefFile.cxx | 1 - .../IGESBasic_ToolExternalRefFileIndex.cxx | 1 - .../IGESBasic_ToolExternalRefFileName.cxx | 1 - .../IGESBasic_ToolExternalRefLibName.cxx | 1 - src/IGESBasic/IGESBasic_ToolExternalRefName.cxx | 1 - .../IGESBasic_ToolExternalReferenceFile.cxx | 1 - src/IGESBasic/IGESBasic_ToolGroup.cxx | 1 - src/IGESBasic/IGESBasic_ToolGroupWithoutBackP.cxx | 1 - src/IGESBasic/IGESBasic_ToolHierarchy.cxx | 1 - src/IGESBasic/IGESBasic_ToolName.cxx | 1 - src/IGESBasic/IGESBasic_ToolOrderedGroup.cxx | 1 - .../IGESBasic_ToolOrderedGroupWithoutBackP.cxx | 1 - src/IGESBasic/IGESBasic_ToolSingleParent.cxx | 1 - src/IGESBasic/IGESBasic_ToolSingularSubfigure.cxx | 1 - src/IGESBasic/IGESBasic_ToolSubfigureDef.cxx | 1 - src/IGESCAFControl/IGESCAFControl.hxx | 1 - src/IGESCAFControl/IGESCAFControl_Reader.cxx | 4 ---- src/IGESCAFControl/IGESCAFControl_Writer.cxx | 8 -------- src/IGESCAFControl/IGESCAFControl_Writer.hxx | 1 - src/IGESControl/IGESControl_ActorWrite.cxx | 2 -- src/IGESControl/IGESControl_ActorWrite.hxx | 1 - src/IGESControl/IGESControl_Controller.cxx | 2 -- src/IGESControl/IGESControl_Controller.hxx | 1 - src/IGESControl/IGESControl_IGESBoundary.cxx | 5 ----- src/IGESControl/IGESControl_IGESBoundary.hxx | 1 - src/IGESControl/IGESControl_Reader.cxx | 8 -------- src/IGESControl/IGESControl_Reader.hxx | 1 - src/IGESControl/IGESControl_Writer.cxx | 5 ----- src/IGESControl/IGESControl_Writer.hxx | 1 - src/IGESConvGeom/IGESConvGeom.cxx | 2 -- src/IGESConvGeom/IGESConvGeom_GeomBuilder.cxx | 2 -- src/IGESConvGeom/IGESConvGeom_GeomBuilder.hxx | 2 -- src/IGESData/IGESData.cxx | 2 -- src/IGESData/IGESData_BasicEditor.cxx | 3 --- src/IGESData/IGESData_BasicEditor.hxx | 1 - src/IGESData/IGESData_ColorEntity.hxx | 1 - src/IGESData/IGESData_DefSwitch.hxx | 1 - src/IGESData/IGESData_DefaultGeneral.cxx | 1 - src/IGESData/IGESData_DefaultGeneral.hxx | 2 -- src/IGESData/IGESData_DefaultSpecific.cxx | 2 -- src/IGESData/IGESData_DefaultSpecific.hxx | 1 - src/IGESData/IGESData_DirChecker.cxx | 1 - src/IGESData/IGESData_DirChecker.hxx | 1 - src/IGESData/IGESData_DirPart.hxx | 3 --- src/IGESData/IGESData_FileRecognizer.hxx | 1 - src/IGESData/IGESData_FreeFormatEntity.cxx | 2 -- src/IGESData/IGESData_FreeFormatEntity.hxx | 3 --- src/IGESData/IGESData_GeneralModule.cxx | 2 -- src/IGESData/IGESData_GeneralModule.hxx | 1 - src/IGESData/IGESData_GlobalSection.cxx | 2 -- src/IGESData/IGESData_GlobalSection.hxx | 1 - src/IGESData/IGESData_HArray1OfIGESEntity.hxx | 1 - src/IGESData/IGESData_IGESDumper.cxx | 1 - src/IGESData/IGESData_IGESEntity.cxx | 3 --- src/IGESData/IGESData_IGESEntity.hxx | 4 ---- src/IGESData/IGESData_IGESModel.cxx | 3 --- src/IGESData/IGESData_IGESModel.hxx | 1 - src/IGESData/IGESData_IGESReaderData.cxx | 5 ----- src/IGESData/IGESData_IGESReaderData.hxx | 1 - src/IGESData/IGESData_IGESReaderTool.cxx | 2 -- src/IGESData/IGESData_IGESReaderTool.hxx | 2 -- src/IGESData/IGESData_IGESType.hxx | 1 - src/IGESData/IGESData_IGESWriter.cxx | 10 ---------- src/IGESData/IGESData_IGESWriter.hxx | 3 --- src/IGESData/IGESData_LabelDisplayEntity.hxx | 1 - src/IGESData/IGESData_LevelListEntity.hxx | 2 -- src/IGESData/IGESData_LineFontEntity.hxx | 1 - src/IGESData/IGESData_NameEntity.hxx | 1 - src/IGESData/IGESData_ParamCursor.hxx | 1 - src/IGESData/IGESData_ParamReader.cxx | 3 --- src/IGESData/IGESData_ParamReader.hxx | 5 ++--- src/IGESData/IGESData_Protocol.cxx | 1 - src/IGESData/IGESData_Protocol.hxx | 2 -- src/IGESData/IGESData_ReadWriteModule.cxx | 3 --- src/IGESData/IGESData_SingleParentEntity.cxx | 1 - src/IGESData/IGESData_SingleParentEntity.hxx | 1 - src/IGESData/IGESData_SpecificLib.hxx | 1 - src/IGESData/IGESData_SpecificModule.hxx | 1 - src/IGESData/IGESData_ToolLocation.cxx | 2 -- src/IGESData/IGESData_ToolLocation.hxx | 2 -- src/IGESData/IGESData_UndefinedEntity.cxx | 2 -- src/IGESData/IGESData_UndefinedEntity.hxx | 1 - src/IGESData/IGESData_ViewKindEntity.hxx | 2 -- src/IGESData/IGESData_WriterLib.hxx | 1 - src/IGESDefs/IGESDefs_AssociativityDef.cxx | 1 - src/IGESDefs/IGESDefs_AssociativityDef.hxx | 1 - src/IGESDefs/IGESDefs_AttributeDef.cxx | 2 -- src/IGESDefs/IGESDefs_AttributeDef.hxx | 2 -- src/IGESDefs/IGESDefs_AttributeTable.cxx | 2 -- src/IGESDefs/IGESDefs_AttributeTable.hxx | 2 -- src/IGESDefs/IGESDefs_GeneralModule.cxx | 1 - src/IGESDefs/IGESDefs_GeneralModule.hxx | 1 - src/IGESDefs/IGESDefs_GenericData.cxx | 4 ---- src/IGESDefs/IGESDefs_GenericData.hxx | 2 -- src/IGESDefs/IGESDefs_HArray1OfTabularData.hxx | 1 - src/IGESDefs/IGESDefs_MacroDef.cxx | 1 - src/IGESDefs/IGESDefs_MacroDef.hxx | 1 - src/IGESDefs/IGESDefs_Protocol.hxx | 1 - src/IGESDefs/IGESDefs_ReadWriteModule.cxx | 2 -- src/IGESDefs/IGESDefs_SpecificModule.cxx | 1 - src/IGESDefs/IGESDefs_TabularData.cxx | 1 - src/IGESDefs/IGESDefs_TabularData.hxx | 2 -- src/IGESDefs/IGESDefs_ToolAssociativityDef.cxx | 2 -- src/IGESDefs/IGESDefs_ToolAttributeDef.cxx | 4 ---- src/IGESDefs/IGESDefs_ToolAttributeTable.cxx | 3 --- src/IGESDefs/IGESDefs_ToolGenericData.cxx | 5 ----- src/IGESDefs/IGESDefs_ToolMacroDef.cxx | 3 --- src/IGESDefs/IGESDefs_ToolTabularData.cxx | 2 -- src/IGESDefs/IGESDefs_ToolUnitsData.cxx | 3 --- src/IGESDefs/IGESDefs_UnitsData.cxx | 1 - src/IGESDefs/IGESDefs_UnitsData.hxx | 1 - src/IGESDimen/IGESDimen_AngularDimension.hxx | 2 -- src/IGESDimen/IGESDimen_CenterLine.cxx | 1 - src/IGESDimen/IGESDimen_CenterLine.hxx | 2 -- src/IGESDimen/IGESDimen_CurveDimension.cxx | 4 ---- src/IGESDimen/IGESDimen_CurveDimension.hxx | 2 -- src/IGESDimen/IGESDimen_DiameterDimension.hxx | 1 - src/IGESDimen/IGESDimen_DimensionDisplayData.cxx | 1 - src/IGESDimen/IGESDimen_DimensionDisplayData.hxx | 1 - src/IGESDimen/IGESDimen_DimensionTolerance.hxx | 2 -- src/IGESDimen/IGESDimen_DimensionUnits.hxx | 1 - src/IGESDimen/IGESDimen_DimensionedGeometry.cxx | 2 -- src/IGESDimen/IGESDimen_DimensionedGeometry.hxx | 1 - src/IGESDimen/IGESDimen_FlagNote.cxx | 1 - src/IGESDimen/IGESDimen_FlagNote.hxx | 1 - src/IGESDimen/IGESDimen_GeneralLabel.cxx | 1 - src/IGESDimen/IGESDimen_GeneralLabel.hxx | 1 - src/IGESDimen/IGESDimen_GeneralModule.cxx | 1 - src/IGESDimen/IGESDimen_GeneralModule.hxx | 1 - src/IGESDimen/IGESDimen_GeneralNote.hxx | 3 --- src/IGESDimen/IGESDimen_GeneralSymbol.cxx | 1 - src/IGESDimen/IGESDimen_GeneralSymbol.hxx | 1 - src/IGESDimen/IGESDimen_HArray1OfGeneralNote.hxx | 1 - src/IGESDimen/IGESDimen_HArray1OfLeaderArrow.hxx | 1 - src/IGESDimen/IGESDimen_LeaderArrow.hxx | 1 - src/IGESDimen/IGESDimen_LinearDimension.hxx | 1 - .../IGESDimen_NewDimensionedGeometry.cxx | 2 -- .../IGESDimen_NewDimensionedGeometry.hxx | 1 - src/IGESDimen/IGESDimen_NewGeneralNote.cxx | 2 -- src/IGESDimen/IGESDimen_NewGeneralNote.hxx | 2 -- src/IGESDimen/IGESDimen_OrdinateDimension.hxx | 1 - src/IGESDimen/IGESDimen_PointDimension.cxx | 1 - src/IGESDimen/IGESDimen_Protocol.hxx | 1 - src/IGESDimen/IGESDimen_RadiusDimension.hxx | 1 - src/IGESDimen/IGESDimen_ReadWriteModule.cxx | 2 -- src/IGESDimen/IGESDimen_Section.hxx | 1 - src/IGESDimen/IGESDimen_SectionedArea.cxx | 2 -- src/IGESDimen/IGESDimen_SectionedArea.hxx | 2 -- src/IGESDimen/IGESDimen_SpecificModule.cxx | 1 - src/IGESDimen/IGESDimen_SpecificModule.hxx | 1 - src/IGESDimen/IGESDimen_ToolAngularDimension.cxx | 1 - src/IGESDimen/IGESDimen_ToolBasicDimension.cxx | 1 - src/IGESDimen/IGESDimen_ToolBasicDimension.hxx | 1 - src/IGESDimen/IGESDimen_ToolCenterLine.cxx | 2 -- src/IGESDimen/IGESDimen_ToolCenterLine.hxx | 1 - src/IGESDimen/IGESDimen_ToolCurveDimension.cxx | 4 ---- src/IGESDimen/IGESDimen_ToolDiameterDimension.cxx | 1 - .../IGESDimen_ToolDimensionDisplayData.cxx | 3 --- .../IGESDimen_ToolDimensionDisplayData.hxx | 1 - .../IGESDimen_ToolDimensionTolerance.cxx | 3 --- .../IGESDimen_ToolDimensionTolerance.hxx | 1 - src/IGESDimen/IGESDimen_ToolDimensionUnits.cxx | 3 --- src/IGESDimen/IGESDimen_ToolDimensionUnits.hxx | 1 - .../IGESDimen_ToolDimensionedGeometry.cxx | 4 ---- .../IGESDimen_ToolDimensionedGeometry.hxx | 1 - src/IGESDimen/IGESDimen_ToolFlagNote.cxx | 1 - src/IGESDimen/IGESDimen_ToolGeneralLabel.cxx | 2 -- src/IGESDimen/IGESDimen_ToolGeneralNote.cxx | 1 - src/IGESDimen/IGESDimen_ToolGeneralSymbol.cxx | 4 ---- src/IGESDimen/IGESDimen_ToolLeaderArrow.cxx | 2 -- src/IGESDimen/IGESDimen_ToolLinearDimension.cxx | 2 -- .../IGESDimen_ToolNewDimensionedGeometry.cxx | 3 --- .../IGESDimen_ToolNewDimensionedGeometry.hxx | 1 - src/IGESDimen/IGESDimen_ToolNewGeneralNote.cxx | 3 --- src/IGESDimen/IGESDimen_ToolOrdinateDimension.cxx | 3 --- src/IGESDimen/IGESDimen_ToolPointDimension.cxx | 4 ---- src/IGESDimen/IGESDimen_ToolRadiusDimension.cxx | 1 - src/IGESDimen/IGESDimen_ToolSection.cxx | 2 -- src/IGESDimen/IGESDimen_ToolSection.hxx | 1 - src/IGESDimen/IGESDimen_ToolSectionedArea.cxx | 3 --- src/IGESDimen/IGESDimen_ToolWitnessLine.cxx | 2 -- src/IGESDimen/IGESDimen_ToolWitnessLine.hxx | 1 - src/IGESDimen/IGESDimen_WitnessLine.cxx | 1 - src/IGESDimen/IGESDimen_WitnessLine.hxx | 1 - src/IGESDraw/IGESDraw_CircArraySubfigure.cxx | 2 -- src/IGESDraw/IGESDraw_CircArraySubfigure.hxx | 2 -- src/IGESDraw/IGESDraw_ConnectPoint.cxx | 1 - src/IGESDraw/IGESDraw_ConnectPoint.hxx | 1 - src/IGESDraw/IGESDraw_Drawing.cxx | 3 --- src/IGESDraw/IGESDraw_Drawing.hxx | 2 -- src/IGESDraw/IGESDraw_DrawingWithRotation.cxx | 3 --- src/IGESDraw/IGESDraw_DrawingWithRotation.hxx | 2 -- src/IGESDraw/IGESDraw_GeneralModule.cxx | 2 -- src/IGESDraw/IGESDraw_GeneralModule.hxx | 1 - src/IGESDraw/IGESDraw_HArray1OfConnectPoint.hxx | 1 - src/IGESDraw/IGESDraw_HArray1OfViewKindEntity.hxx | 1 - src/IGESDraw/IGESDraw_LabelDisplay.cxx | 4 ---- src/IGESDraw/IGESDraw_NetworkSubfigure.cxx | 2 -- src/IGESDraw/IGESDraw_NetworkSubfigure.hxx | 1 - src/IGESDraw/IGESDraw_NetworkSubfigureDef.cxx | 3 --- src/IGESDraw/IGESDraw_NetworkSubfigureDef.hxx | 2 -- src/IGESDraw/IGESDraw_PerspectiveView.cxx | 2 -- src/IGESDraw/IGESDraw_PerspectiveView.hxx | 2 -- src/IGESDraw/IGESDraw_Planar.cxx | 2 -- src/IGESDraw/IGESDraw_Planar.hxx | 2 -- src/IGESDraw/IGESDraw_Protocol.cxx | 1 - src/IGESDraw/IGESDraw_Protocol.hxx | 1 - src/IGESDraw/IGESDraw_ReadWriteModule.cxx | 3 --- src/IGESDraw/IGESDraw_RectArraySubfigure.cxx | 2 -- src/IGESDraw/IGESDraw_RectArraySubfigure.hxx | 2 -- src/IGESDraw/IGESDraw_SegmentedViewsVisible.cxx | 3 --- src/IGESDraw/IGESDraw_SegmentedViewsVisible.hxx | 2 -- src/IGESDraw/IGESDraw_SpecificModule.cxx | 2 -- src/IGESDraw/IGESDraw_SpecificModule.hxx | 1 - src/IGESDraw/IGESDraw_ToolCircArraySubfigure.cxx | 2 -- src/IGESDraw/IGESDraw_ToolConnectPoint.cxx | 2 -- src/IGESDraw/IGESDraw_ToolDrawing.cxx | 5 ----- src/IGESDraw/IGESDraw_ToolDrawing.hxx | 1 - src/IGESDraw/IGESDraw_ToolDrawingWithRotation.cxx | 5 ----- src/IGESDraw/IGESDraw_ToolDrawingWithRotation.hxx | 1 - src/IGESDraw/IGESDraw_ToolLabelDisplay.cxx | 8 -------- src/IGESDraw/IGESDraw_ToolNetworkSubfigure.cxx | 3 --- src/IGESDraw/IGESDraw_ToolNetworkSubfigureDef.cxx | 6 ------ src/IGESDraw/IGESDraw_ToolPerspectiveView.cxx | 2 -- src/IGESDraw/IGESDraw_ToolPlanar.cxx | 4 ---- src/IGESDraw/IGESDraw_ToolPlanar.hxx | 1 - src/IGESDraw/IGESDraw_ToolRectArraySubfigure.cxx | 2 -- .../IGESDraw_ToolSegmentedViewsVisible.cxx | 4 ---- src/IGESDraw/IGESDraw_ToolView.cxx | 2 -- src/IGESDraw/IGESDraw_ToolViewsVisible.cxx | 6 ------ src/IGESDraw/IGESDraw_ToolViewsVisible.hxx | 1 - .../IGESDraw_ToolViewsVisibleWithAttr.cxx | 4 ---- .../IGESDraw_ToolViewsVisibleWithAttr.hxx | 1 - src/IGESDraw/IGESDraw_View.cxx | 2 -- src/IGESDraw/IGESDraw_View.hxx | 2 -- src/IGESDraw/IGESDraw_ViewsVisible.cxx | 3 --- src/IGESDraw/IGESDraw_ViewsVisible.hxx | 2 -- src/IGESDraw/IGESDraw_ViewsVisibleWithAttr.cxx | 4 ---- src/IGESDraw/IGESDraw_ViewsVisibleWithAttr.hxx | 2 -- src/IGESFile/IGESFile_Read.cxx | 3 --- src/IGESGeom/IGESGeom_BSplineCurve.hxx | 2 -- src/IGESGeom/IGESGeom_BSplineSurface.hxx | 2 -- src/IGESGeom/IGESGeom_Boundary.cxx | 1 - src/IGESGeom/IGESGeom_BoundedSurface.cxx | 3 --- src/IGESGeom/IGESGeom_BoundedSurface.hxx | 1 - src/IGESGeom/IGESGeom_CircularArc.hxx | 2 -- src/IGESGeom/IGESGeom_CompositeCurve.cxx | 2 -- src/IGESGeom/IGESGeom_CompositeCurve.hxx | 1 - src/IGESGeom/IGESGeom_ConicArc.cxx | 1 - src/IGESGeom/IGESGeom_ConicArc.hxx | 2 -- src/IGESGeom/IGESGeom_CopiousData.cxx | 2 -- src/IGESGeom/IGESGeom_CopiousData.hxx | 2 -- src/IGESGeom/IGESGeom_CurveOnSurface.cxx | 1 - src/IGESGeom/IGESGeom_CurveOnSurface.hxx | 1 - src/IGESGeom/IGESGeom_Flash.cxx | 1 - src/IGESGeom/IGESGeom_Flash.hxx | 2 -- src/IGESGeom/IGESGeom_GeneralModule.cxx | 2 -- src/IGESGeom/IGESGeom_GeneralModule.hxx | 1 - src/IGESGeom/IGESGeom_HArray1OfBoundary.hxx | 1 - src/IGESGeom/IGESGeom_HArray1OfCurveOnSurface.hxx | 1 - .../IGESGeom_HArray1OfTransformationMatrix.hxx | 1 - src/IGESGeom/IGESGeom_OffsetCurve.cxx | 1 - src/IGESGeom/IGESGeom_OffsetCurve.hxx | 2 -- src/IGESGeom/IGESGeom_OffsetSurface.cxx | 1 - src/IGESGeom/IGESGeom_OffsetSurface.hxx | 1 - src/IGESGeom/IGESGeom_Plane.cxx | 1 - src/IGESGeom/IGESGeom_Plane.hxx | 2 -- src/IGESGeom/IGESGeom_Point.hxx | 1 - src/IGESGeom/IGESGeom_Protocol.cxx | 2 -- src/IGESGeom/IGESGeom_Protocol.hxx | 1 - src/IGESGeom/IGESGeom_ReadWriteModule.cxx | 4 ---- src/IGESGeom/IGESGeom_RuledSurface.cxx | 1 - src/IGESGeom/IGESGeom_RuledSurface.hxx | 2 -- src/IGESGeom/IGESGeom_SpecificModule.cxx | 3 --- src/IGESGeom/IGESGeom_SpecificModule.hxx | 1 - src/IGESGeom/IGESGeom_SplineCurve.cxx | 1 - src/IGESGeom/IGESGeom_SplineCurve.hxx | 1 - src/IGESGeom/IGESGeom_SplineSurface.cxx | 1 - src/IGESGeom/IGESGeom_SplineSurface.hxx | 2 -- src/IGESGeom/IGESGeom_SurfaceOfRevolution.cxx | 1 - src/IGESGeom/IGESGeom_SurfaceOfRevolution.hxx | 1 - src/IGESGeom/IGESGeom_TabulatedCylinder.cxx | 1 - src/IGESGeom/IGESGeom_ToolBSplineCurve.cxx | 3 --- src/IGESGeom/IGESGeom_ToolBSplineSurface.cxx | 3 --- src/IGESGeom/IGESGeom_ToolBoundary.cxx | 1 - src/IGESGeom/IGESGeom_ToolBoundary.hxx | 1 - src/IGESGeom/IGESGeom_ToolBoundedSurface.cxx | 4 ---- src/IGESGeom/IGESGeom_ToolCircularArc.cxx | 2 -- src/IGESGeom/IGESGeom_ToolCompositeCurve.cxx | 4 ---- src/IGESGeom/IGESGeom_ToolConicArc.cxx | 2 -- src/IGESGeom/IGESGeom_ToolConicArc.hxx | 1 - src/IGESGeom/IGESGeom_ToolCopiousData.cxx | 4 ---- src/IGESGeom/IGESGeom_ToolCurveOnSurface.cxx | 4 ---- src/IGESGeom/IGESGeom_ToolCurveOnSurface.hxx | 1 - src/IGESGeom/IGESGeom_ToolDirection.cxx | 2 -- src/IGESGeom/IGESGeom_ToolFlash.cxx | 2 -- src/IGESGeom/IGESGeom_ToolFlash.hxx | 1 - src/IGESGeom/IGESGeom_ToolLine.cxx | 3 --- src/IGESGeom/IGESGeom_ToolOffsetCurve.cxx | 3 --- src/IGESGeom/IGESGeom_ToolOffsetCurve.hxx | 1 - src/IGESGeom/IGESGeom_ToolOffsetSurface.cxx | 3 --- src/IGESGeom/IGESGeom_ToolPlane.cxx | 3 --- src/IGESGeom/IGESGeom_ToolPoint.cxx | 2 -- src/IGESGeom/IGESGeom_ToolRuledSurface.cxx | 4 ---- src/IGESGeom/IGESGeom_ToolSplineCurve.cxx | 3 --- src/IGESGeom/IGESGeom_ToolSplineSurface.cxx | 2 -- src/IGESGeom/IGESGeom_ToolSurfaceOfRevolution.cxx | 3 --- src/IGESGeom/IGESGeom_ToolTabulatedCylinder.cxx | 2 -- .../IGESGeom_ToolTransformationMatrix.cxx | 3 --- .../IGESGeom_ToolTransformationMatrix.hxx | 1 - src/IGESGeom/IGESGeom_ToolTrimmedSurface.cxx | 5 ----- src/IGESGeom/IGESGeom_TransformationMatrix.hxx | 1 - src/IGESGeom/IGESGeom_TrimmedSurface.cxx | 3 --- src/IGESGeom/IGESGeom_TrimmedSurface.hxx | 2 -- src/IGESGraph/IGESGraph_Color.hxx | 2 -- src/IGESGraph/IGESGraph_DefinitionLevel.cxx | 1 - src/IGESGraph/IGESGraph_DefinitionLevel.hxx | 1 - src/IGESGraph/IGESGraph_DrawingSize.hxx | 1 - src/IGESGraph/IGESGraph_DrawingUnits.hxx | 1 - src/IGESGraph/IGESGraph_GeneralModule.cxx | 1 - src/IGESGraph/IGESGraph_GeneralModule.hxx | 1 - src/IGESGraph/IGESGraph_HArray1OfColor.hxx | 1 - .../IGESGraph_HArray1OfTextDisplayTemplate.hxx | 1 - src/IGESGraph/IGESGraph_HArray1OfTextFontDef.hxx | 1 - src/IGESGraph/IGESGraph_HighLight.hxx | 2 -- src/IGESGraph/IGESGraph_IntercharacterSpacing.hxx | 1 - src/IGESGraph/IGESGraph_LineFontDefPattern.cxx | 1 - src/IGESGraph/IGESGraph_LineFontDefPattern.hxx | 2 -- src/IGESGraph/IGESGraph_LineFontDefTemplate.hxx | 1 - src/IGESGraph/IGESGraph_LineFontPredefined.hxx | 1 - src/IGESGraph/IGESGraph_NominalSize.hxx | 2 -- src/IGESGraph/IGESGraph_Pick.hxx | 2 -- src/IGESGraph/IGESGraph_Protocol.hxx | 1 - src/IGESGraph/IGESGraph_ReadWriteModule.cxx | 2 -- src/IGESGraph/IGESGraph_SpecificModule.cxx | 1 - src/IGESGraph/IGESGraph_SpecificModule.hxx | 1 - src/IGESGraph/IGESGraph_TextDisplayTemplate.hxx | 2 -- src/IGESGraph/IGESGraph_TextFontDef.cxx | 1 - src/IGESGraph/IGESGraph_TextFontDef.hxx | 1 - src/IGESGraph/IGESGraph_ToolColor.cxx | 3 --- src/IGESGraph/IGESGraph_ToolDefinitionLevel.cxx | 3 --- src/IGESGraph/IGESGraph_ToolDrawingSize.cxx | 3 --- src/IGESGraph/IGESGraph_ToolDrawingSize.hxx | 1 - src/IGESGraph/IGESGraph_ToolDrawingUnits.cxx | 3 --- src/IGESGraph/IGESGraph_ToolDrawingUnits.hxx | 1 - src/IGESGraph/IGESGraph_ToolHighLight.cxx | 3 --- src/IGESGraph/IGESGraph_ToolHighLight.hxx | 1 - .../IGESGraph_ToolIntercharacterSpacing.cxx | 3 --- .../IGESGraph_ToolIntercharacterSpacing.hxx | 1 - .../IGESGraph_ToolLineFontDefPattern.cxx | 3 --- .../IGESGraph_ToolLineFontDefTemplate.cxx | 2 -- .../IGESGraph_ToolLineFontPredefined.cxx | 3 --- .../IGESGraph_ToolLineFontPredefined.hxx | 1 - src/IGESGraph/IGESGraph_ToolNominalSize.cxx | 3 --- src/IGESGraph/IGESGraph_ToolNominalSize.hxx | 1 - src/IGESGraph/IGESGraph_ToolPick.cxx | 3 --- src/IGESGraph/IGESGraph_ToolPick.hxx | 1 - .../IGESGraph_ToolTextDisplayTemplate.cxx | 2 -- src/IGESGraph/IGESGraph_ToolTextFontDef.cxx | 3 --- src/IGESGraph/IGESGraph_ToolUniformRectGrid.cxx | 1 - src/IGESGraph/IGESGraph_ToolUniformRectGrid.hxx | 1 - src/IGESGraph/IGESGraph_UniformRectGrid.hxx | 1 - src/IGESSelect/IGESSelect_Activator.cxx | 4 ---- src/IGESSelect/IGESSelect_Activator.hxx | 1 - src/IGESSelect/IGESSelect_AddFileComment.hxx | 1 - src/IGESSelect/IGESSelect_ChangeLevelList.cxx | 1 - src/IGESSelect/IGESSelect_ChangeLevelList.hxx | 1 - src/IGESSelect/IGESSelect_ChangeLevelNumber.cxx | 1 - src/IGESSelect/IGESSelect_ChangeLevelNumber.hxx | 1 - src/IGESSelect/IGESSelect_DispPerDrawing.hxx | 1 - src/IGESSelect/IGESSelect_DispPerSingleView.hxx | 1 - src/IGESSelect/IGESSelect_Dumper.hxx | 1 - src/IGESSelect/IGESSelect_EditDirPart.hxx | 1 - src/IGESSelect/IGESSelect_EditHeader.cxx | 1 - src/IGESSelect/IGESSelect_EditHeader.hxx | 1 - src/IGESSelect/IGESSelect_FloatFormat.hxx | 3 --- src/IGESSelect/IGESSelect_IGESTypeForm.cxx | 1 - src/IGESSelect/IGESSelect_IGESTypeForm.hxx | 1 - src/IGESSelect/IGESSelect_ModelModifier.hxx | 1 - src/IGESSelect/IGESSelect_RebuildDrawings.cxx | 5 ----- src/IGESSelect/IGESSelect_RebuildGroups.cxx | 1 - src/IGESSelect/IGESSelect_RemoveCurves.cxx | 2 -- src/IGESSelect/IGESSelect_RemoveCurves.hxx | 1 - src/IGESSelect/IGESSelect_SelectBasicGeom.cxx | 4 ---- src/IGESSelect/IGESSelect_SelectBasicGeom.hxx | 1 - src/IGESSelect/IGESSelect_SelectBypassGroup.cxx | 5 ----- src/IGESSelect/IGESSelect_SelectBypassGroup.hxx | 1 - .../IGESSelect_SelectBypassSubfigure.cxx | 1 - .../IGESSelect_SelectBypassSubfigure.hxx | 1 - src/IGESSelect/IGESSelect_SelectDrawingFrom.cxx | 1 - src/IGESSelect/IGESSelect_SelectDrawingFrom.hxx | 1 - src/IGESSelect/IGESSelect_SelectFaces.hxx | 1 - src/IGESSelect/IGESSelect_SelectFromDrawing.cxx | 2 -- .../IGESSelect_SelectFromSingleView.cxx | 2 -- src/IGESSelect/IGESSelect_SelectLevelNumber.cxx | 1 - src/IGESSelect/IGESSelect_SelectLevelNumber.hxx | 1 - src/IGESSelect/IGESSelect_SelectName.hxx | 1 - src/IGESSelect/IGESSelect_SelectPCurves.cxx | 4 ---- src/IGESSelect/IGESSelect_SelectPCurves.hxx | 1 - .../IGESSelect_SelectSingleViewFrom.cxx | 1 - .../IGESSelect_SelectSingleViewFrom.hxx | 1 - src/IGESSelect/IGESSelect_SelectSubordinate.hxx | 1 - src/IGESSelect/IGESSelect_SelectVisibleStatus.hxx | 1 - src/IGESSelect/IGESSelect_SetGlobalParameter.cxx | 1 - src/IGESSelect/IGESSelect_SetLabel.hxx | 1 - src/IGESSelect/IGESSelect_SetVersion5.cxx | 1 - src/IGESSelect/IGESSelect_SignColor.cxx | 1 - src/IGESSelect/IGESSelect_SignLevelNumber.cxx | 1 - src/IGESSelect/IGESSelect_SignLevelNumber.hxx | 1 - src/IGESSelect/IGESSelect_SignStatus.hxx | 1 - src/IGESSelect/IGESSelect_SplineToBSpline.cxx | 1 - src/IGESSelect/IGESSelect_SplineToBSpline.hxx | 1 - src/IGESSelect/IGESSelect_UpdateCreationDate.cxx | 2 -- src/IGESSelect/IGESSelect_UpdateFileName.cxx | 1 - src/IGESSelect/IGESSelect_UpdateLastChange.cxx | 2 -- src/IGESSelect/IGESSelect_ViewSorter.cxx | 1 - src/IGESSelect/IGESSelect_ViewSorter.hxx | 1 - src/IGESSelect/IGESSelect_WorkLibrary.cxx | 3 --- src/IGESSelect/IGESSelect_WorkLibrary.hxx | 2 -- src/IGESSolid/IGESSolid_Block.cxx | 1 - src/IGESSolid/IGESSolid_Block.hxx | 1 - src/IGESSolid/IGESSolid_BooleanTree.cxx | 2 -- src/IGESSolid/IGESSolid_BooleanTree.hxx | 2 -- src/IGESSolid/IGESSolid_ConeFrustum.cxx | 1 - src/IGESSolid/IGESSolid_ConeFrustum.hxx | 1 - src/IGESSolid/IGESSolid_ConicalSurface.hxx | 2 -- src/IGESSolid/IGESSolid_Cylinder.cxx | 1 - src/IGESSolid/IGESSolid_Cylinder.hxx | 1 - src/IGESSolid/IGESSolid_CylindricalSurface.hxx | 2 -- src/IGESSolid/IGESSolid_EdgeList.cxx | 2 -- src/IGESSolid/IGESSolid_EdgeList.hxx | 1 - src/IGESSolid/IGESSolid_Ellipsoid.cxx | 1 - src/IGESSolid/IGESSolid_Ellipsoid.hxx | 1 - src/IGESSolid/IGESSolid_Face.cxx | 2 -- src/IGESSolid/IGESSolid_Face.hxx | 2 -- src/IGESSolid/IGESSolid_GeneralModule.cxx | 3 --- src/IGESSolid/IGESSolid_GeneralModule.hxx | 1 - src/IGESSolid/IGESSolid_HArray1OfFace.hxx | 1 - src/IGESSolid/IGESSolid_HArray1OfLoop.hxx | 1 - src/IGESSolid/IGESSolid_HArray1OfShell.hxx | 1 - src/IGESSolid/IGESSolid_HArray1OfVertexList.hxx | 1 - src/IGESSolid/IGESSolid_Loop.cxx | 1 - src/IGESSolid/IGESSolid_Loop.hxx | 1 - src/IGESSolid/IGESSolid_ManifoldSolid.cxx | 1 - src/IGESSolid/IGESSolid_ManifoldSolid.hxx | 2 -- src/IGESSolid/IGESSolid_PlaneSurface.hxx | 1 - src/IGESSolid/IGESSolid_Protocol.cxx | 1 - src/IGESSolid/IGESSolid_Protocol.hxx | 1 - src/IGESSolid/IGESSolid_ReadWriteModule.cxx | 4 ---- src/IGESSolid/IGESSolid_RightAngularWedge.cxx | 1 - src/IGESSolid/IGESSolid_RightAngularWedge.hxx | 1 - src/IGESSolid/IGESSolid_Shell.cxx | 2 -- src/IGESSolid/IGESSolid_Shell.hxx | 2 -- src/IGESSolid/IGESSolid_SolidAssembly.cxx | 3 --- src/IGESSolid/IGESSolid_SolidAssembly.hxx | 2 -- src/IGESSolid/IGESSolid_SolidInstance.cxx | 1 - src/IGESSolid/IGESSolid_SolidInstance.hxx | 2 -- .../IGESSolid_SolidOfLinearExtrusion.cxx | 2 -- .../IGESSolid_SolidOfLinearExtrusion.hxx | 1 - src/IGESSolid/IGESSolid_SolidOfRevolution.cxx | 2 -- src/IGESSolid/IGESSolid_SolidOfRevolution.hxx | 2 -- src/IGESSolid/IGESSolid_SpecificModule.cxx | 3 --- src/IGESSolid/IGESSolid_Sphere.hxx | 1 - src/IGESSolid/IGESSolid_SphericalSurface.hxx | 2 -- src/IGESSolid/IGESSolid_ToolBlock.cxx | 1 - src/IGESSolid/IGESSolid_ToolBooleanTree.cxx | 2 -- src/IGESSolid/IGESSolid_ToolConeFrustum.cxx | 1 - src/IGESSolid/IGESSolid_ToolConicalSurface.cxx | 3 --- src/IGESSolid/IGESSolid_ToolCylinder.cxx | 1 - .../IGESSolid_ToolCylindricalSurface.cxx | 3 --- src/IGESSolid/IGESSolid_ToolEdgeList.cxx | 4 ---- src/IGESSolid/IGESSolid_ToolEllipsoid.cxx | 1 - src/IGESSolid/IGESSolid_ToolFace.cxx | 3 --- src/IGESSolid/IGESSolid_ToolLoop.cxx | 1 - src/IGESSolid/IGESSolid_ToolManifoldSolid.cxx | 3 --- src/IGESSolid/IGESSolid_ToolPlaneSurface.cxx | 3 --- src/IGESSolid/IGESSolid_ToolRightAngularWedge.cxx | 1 - src/IGESSolid/IGESSolid_ToolSelectedComponent.cxx | 1 - src/IGESSolid/IGESSolid_ToolShell.cxx | 5 ----- src/IGESSolid/IGESSolid_ToolSolidAssembly.cxx | 6 ------ src/IGESSolid/IGESSolid_ToolSolidInstance.cxx | 4 ---- .../IGESSolid_ToolSolidOfLinearExtrusion.cxx | 2 -- src/IGESSolid/IGESSolid_ToolSolidOfRevolution.cxx | 2 -- src/IGESSolid/IGESSolid_ToolSphere.cxx | 1 - src/IGESSolid/IGESSolid_ToolSphericalSurface.cxx | 3 --- src/IGESSolid/IGESSolid_ToolToroidalSurface.cxx | 2 -- src/IGESSolid/IGESSolid_ToolTorus.cxx | 1 - src/IGESSolid/IGESSolid_ToolVertexList.cxx | 3 --- src/IGESSolid/IGESSolid_TopoBuilder.cxx | 4 ---- src/IGESSolid/IGESSolid_ToroidalSurface.hxx | 2 -- src/IGESSolid/IGESSolid_Torus.cxx | 1 - src/IGESSolid/IGESSolid_Torus.hxx | 1 - src/IGESSolid/IGESSolid_VertexList.cxx | 1 - src/IGESToBRep/IGESToBRep.cxx | 12 ------------ src/IGESToBRep/IGESToBRep_Actor.cxx | 3 --- src/IGESToBRep/IGESToBRep_Actor.hxx | 2 -- src/IGESToBRep/IGESToBRep_BRepEntity.cxx | 8 -------- src/IGESToBRep/IGESToBRep_BRepEntity.hxx | 2 -- src/IGESToBRep/IGESToBRep_BasicCurve.cxx | 9 --------- src/IGESToBRep/IGESToBRep_BasicCurve.hxx | 2 -- src/IGESToBRep/IGESToBRep_BasicSurface.cxx | 5 ----- src/IGESToBRep/IGESToBRep_BasicSurface.hxx | 2 -- src/IGESToBRep/IGESToBRep_CurveAndSurface.cxx | 4 ---- src/IGESToBRep/IGESToBRep_CurveAndSurface.hxx | 2 -- src/IGESToBRep/IGESToBRep_IGESBoundary.cxx | 4 ---- src/IGESToBRep/IGESToBRep_IGESBoundary.hxx | 2 -- src/IGESToBRep/IGESToBRep_Reader.cxx | 13 ------------- src/IGESToBRep/IGESToBRep_Reader.hxx | 2 -- src/IGESToBRep/IGESToBRep_TopoCurve.cxx | 10 ---------- src/IGESToBRep/IGESToBRep_TopoCurve.hxx | 2 -- src/IGESToBRep/IGESToBRep_TopoSurface.cxx | 15 --------------- src/IGESToBRep/IGESToBRep_TopoSurface.hxx | 2 -- 533 files changed, 2 insertions(+), 1034 deletions(-) diff --git a/src/IGESAppli/IGESAppli_ToolDrilledHole.cxx b/src/IGESAppli/IGESAppli_ToolDrilledHole.cxx index 2cdb2e93c4..251b82445b 100644 --- a/src/IGESAppli/IGESAppli_ToolDrilledHole.cxx +++ b/src/IGESAppli/IGESAppli_ToolDrilledHole.cxx @@ -23,7 +23,6 @@ #include #include #include -#include #include #include #include diff --git a/src/IGESAppli/IGESAppli_ToolElementResults.cxx b/src/IGESAppli/IGESAppli_ToolElementResults.cxx index 2514b4cb70..d490868eee 100644 --- a/src/IGESAppli/IGESAppli_ToolElementResults.cxx +++ b/src/IGESAppli/IGESAppli_ToolElementResults.cxx @@ -28,7 +28,6 @@ #include #include #include -#include #include #include #include diff --git a/src/IGESAppli/IGESAppli_ToolFiniteElement.cxx b/src/IGESAppli/IGESAppli_ToolFiniteElement.cxx index 022942667d..cc1477807c 100644 --- a/src/IGESAppli/IGESAppli_ToolFiniteElement.cxx +++ b/src/IGESAppli/IGESAppli_ToolFiniteElement.cxx @@ -25,7 +25,6 @@ #include #include #include -#include #include #include #include diff --git a/src/IGESAppli/IGESAppli_ToolFlow.cxx b/src/IGESAppli/IGESAppli_ToolFlow.cxx index 3690bc5743..783a2f8968 100644 --- a/src/IGESAppli/IGESAppli_ToolFlow.cxx +++ b/src/IGESAppli/IGESAppli_ToolFlow.cxx @@ -25,7 +25,6 @@ #include #include #include -#include #include #include #include diff --git a/src/IGESAppli/IGESAppli_ToolFlowLineSpec.cxx b/src/IGESAppli/IGESAppli_ToolFlowLineSpec.cxx index 3b7bedbdbf..6515469bf3 100644 --- a/src/IGESAppli/IGESAppli_ToolFlowLineSpec.cxx +++ b/src/IGESAppli/IGESAppli_ToolFlowLineSpec.cxx @@ -23,7 +23,6 @@ #include #include #include -#include #include #include #include diff --git a/src/IGESAppli/IGESAppli_ToolLevelFunction.cxx b/src/IGESAppli/IGESAppli_ToolLevelFunction.cxx index 73bbf8e9b2..88fc86befe 100644 --- a/src/IGESAppli/IGESAppli_ToolLevelFunction.cxx +++ b/src/IGESAppli/IGESAppli_ToolLevelFunction.cxx @@ -23,7 +23,6 @@ #include #include #include -#include #include #include #include diff --git a/src/IGESAppli/IGESAppli_ToolLevelToPWBLayerMap.cxx b/src/IGESAppli/IGESAppli_ToolLevelToPWBLayerMap.cxx index e1b6f13287..395231afc2 100644 --- a/src/IGESAppli/IGESAppli_ToolLevelToPWBLayerMap.cxx +++ b/src/IGESAppli/IGESAppli_ToolLevelToPWBLayerMap.cxx @@ -23,7 +23,6 @@ #include #include #include -#include #include #include #include diff --git a/src/IGESAppli/IGESAppli_ToolLineWidening.cxx b/src/IGESAppli/IGESAppli_ToolLineWidening.cxx index cf9f0d9b20..a1bbd73f40 100644 --- a/src/IGESAppli/IGESAppli_ToolLineWidening.cxx +++ b/src/IGESAppli/IGESAppli_ToolLineWidening.cxx @@ -23,7 +23,6 @@ #include #include #include -#include #include #include #include diff --git a/src/IGESAppli/IGESAppli_ToolNodalConstraint.cxx b/src/IGESAppli/IGESAppli_ToolNodalConstraint.cxx index f955023752..45f7b52cc7 100644 --- a/src/IGESAppli/IGESAppli_ToolNodalConstraint.cxx +++ b/src/IGESAppli/IGESAppli_ToolNodalConstraint.cxx @@ -24,7 +24,6 @@ #include #include #include -#include #include #include #include diff --git a/src/IGESAppli/IGESAppli_ToolNodalDisplAndRot.cxx b/src/IGESAppli/IGESAppli_ToolNodalDisplAndRot.cxx index 0eaecb9e20..2528bb9b26 100644 --- a/src/IGESAppli/IGESAppli_ToolNodalDisplAndRot.cxx +++ b/src/IGESAppli/IGESAppli_ToolNodalDisplAndRot.cxx @@ -27,7 +27,6 @@ #include #include #include -#include #include #include #include diff --git a/src/IGESAppli/IGESAppli_ToolNodalResults.cxx b/src/IGESAppli/IGESAppli_ToolNodalResults.cxx index d59ba94d24..4665cc048f 100644 --- a/src/IGESAppli/IGESAppli_ToolNodalResults.cxx +++ b/src/IGESAppli/IGESAppli_ToolNodalResults.cxx @@ -24,7 +24,6 @@ #include #include #include -#include #include #include #include diff --git a/src/IGESAppli/IGESAppli_ToolNode.cxx b/src/IGESAppli/IGESAppli_ToolNode.cxx index cb3a0a0e10..841ab972a9 100644 --- a/src/IGESAppli/IGESAppli_ToolNode.cxx +++ b/src/IGESAppli/IGESAppli_ToolNode.cxx @@ -24,7 +24,6 @@ #include #include #include -#include #include #include #include diff --git a/src/IGESAppli/IGESAppli_ToolPWBArtworkStackup.cxx b/src/IGESAppli/IGESAppli_ToolPWBArtworkStackup.cxx index f9692abdfb..e8cc239b82 100644 --- a/src/IGESAppli/IGESAppli_ToolPWBArtworkStackup.cxx +++ b/src/IGESAppli/IGESAppli_ToolPWBArtworkStackup.cxx @@ -23,7 +23,6 @@ #include #include #include -#include #include #include #include diff --git a/src/IGESAppli/IGESAppli_ToolPWBDrilledHole.cxx b/src/IGESAppli/IGESAppli_ToolPWBDrilledHole.cxx index 3a655c7303..ca35badc5a 100644 --- a/src/IGESAppli/IGESAppli_ToolPWBDrilledHole.cxx +++ b/src/IGESAppli/IGESAppli_ToolPWBDrilledHole.cxx @@ -22,7 +22,6 @@ #include #include #include -#include #include #include #include diff --git a/src/IGESAppli/IGESAppli_ToolPartNumber.cxx b/src/IGESAppli/IGESAppli_ToolPartNumber.cxx index 1819b16444..e5a1536d82 100644 --- a/src/IGESAppli/IGESAppli_ToolPartNumber.cxx +++ b/src/IGESAppli/IGESAppli_ToolPartNumber.cxx @@ -23,7 +23,6 @@ #include #include #include -#include #include #include #include diff --git a/src/IGESAppli/IGESAppli_ToolPinNumber.cxx b/src/IGESAppli/IGESAppli_ToolPinNumber.cxx index 16b29dc81b..8912ed7270 100644 --- a/src/IGESAppli/IGESAppli_ToolPinNumber.cxx +++ b/src/IGESAppli/IGESAppli_ToolPinNumber.cxx @@ -24,7 +24,6 @@ #include #include #include -#include #include #include #include diff --git a/src/IGESAppli/IGESAppli_ToolPipingFlow.cxx b/src/IGESAppli/IGESAppli_ToolPipingFlow.cxx index f4de6a4e0c..a4e7cd01f2 100644 --- a/src/IGESAppli/IGESAppli_ToolPipingFlow.cxx +++ b/src/IGESAppli/IGESAppli_ToolPipingFlow.cxx @@ -25,7 +25,6 @@ #include #include #include -#include #include #include #include diff --git a/src/IGESAppli/IGESAppli_ToolReferenceDesignator.cxx b/src/IGESAppli/IGESAppli_ToolReferenceDesignator.cxx index fc4f815bf6..789a313217 100644 --- a/src/IGESAppli/IGESAppli_ToolReferenceDesignator.cxx +++ b/src/IGESAppli/IGESAppli_ToolReferenceDesignator.cxx @@ -24,7 +24,6 @@ #include #include #include -#include #include #include #include diff --git a/src/IGESAppli/IGESAppli_ToolRegionRestriction.cxx b/src/IGESAppli/IGESAppli_ToolRegionRestriction.cxx index a89ed2bf78..e974c4563b 100644 --- a/src/IGESAppli/IGESAppli_ToolRegionRestriction.cxx +++ b/src/IGESAppli/IGESAppli_ToolRegionRestriction.cxx @@ -23,7 +23,6 @@ #include #include #include -#include #include #include #include diff --git a/src/IGESBasic/IGESBasic_SubfigureDef.cxx b/src/IGESBasic/IGESBasic_SubfigureDef.cxx index fb0f44220e..f29cc9abd5 100644 --- a/src/IGESBasic/IGESBasic_SubfigureDef.cxx +++ b/src/IGESBasic/IGESBasic_SubfigureDef.cxx @@ -19,7 +19,6 @@ #include #include #include -#include #include #include #include diff --git a/src/IGESBasic/IGESBasic_ToolAssocGroupType.cxx b/src/IGESBasic/IGESBasic_ToolAssocGroupType.cxx index de350a5f3d..9c79ca3d88 100644 --- a/src/IGESBasic/IGESBasic_ToolAssocGroupType.cxx +++ b/src/IGESBasic/IGESBasic_ToolAssocGroupType.cxx @@ -23,7 +23,6 @@ #include #include #include -#include #include #include #include diff --git a/src/IGESBasic/IGESBasic_ToolExternalRefFile.cxx b/src/IGESBasic/IGESBasic_ToolExternalRefFile.cxx index 2662a4f3ff..5a1483cfd7 100644 --- a/src/IGESBasic/IGESBasic_ToolExternalRefFile.cxx +++ b/src/IGESBasic/IGESBasic_ToolExternalRefFile.cxx @@ -23,7 +23,6 @@ #include #include #include -#include #include #include #include diff --git a/src/IGESBasic/IGESBasic_ToolExternalRefFileIndex.cxx b/src/IGESBasic/IGESBasic_ToolExternalRefFileIndex.cxx index c35321386e..88478bf2c6 100644 --- a/src/IGESBasic/IGESBasic_ToolExternalRefFileIndex.cxx +++ b/src/IGESBasic/IGESBasic_ToolExternalRefFileIndex.cxx @@ -25,7 +25,6 @@ #include #include #include -#include #include #include #include diff --git a/src/IGESBasic/IGESBasic_ToolExternalRefFileName.cxx b/src/IGESBasic/IGESBasic_ToolExternalRefFileName.cxx index 800c34d1cd..6d1e20c740 100644 --- a/src/IGESBasic/IGESBasic_ToolExternalRefFileName.cxx +++ b/src/IGESBasic/IGESBasic_ToolExternalRefFileName.cxx @@ -23,7 +23,6 @@ #include #include #include -#include #include #include #include diff --git a/src/IGESBasic/IGESBasic_ToolExternalRefLibName.cxx b/src/IGESBasic/IGESBasic_ToolExternalRefLibName.cxx index 7c5ac68d79..ee24ab565b 100644 --- a/src/IGESBasic/IGESBasic_ToolExternalRefLibName.cxx +++ b/src/IGESBasic/IGESBasic_ToolExternalRefLibName.cxx @@ -23,7 +23,6 @@ #include #include #include -#include #include #include #include diff --git a/src/IGESBasic/IGESBasic_ToolExternalRefName.cxx b/src/IGESBasic/IGESBasic_ToolExternalRefName.cxx index 4689f71ae6..1c0135ea15 100644 --- a/src/IGESBasic/IGESBasic_ToolExternalRefName.cxx +++ b/src/IGESBasic/IGESBasic_ToolExternalRefName.cxx @@ -23,7 +23,6 @@ #include #include #include -#include #include #include #include diff --git a/src/IGESBasic/IGESBasic_ToolExternalReferenceFile.cxx b/src/IGESBasic/IGESBasic_ToolExternalReferenceFile.cxx index bb73a6da09..806b576b20 100644 --- a/src/IGESBasic/IGESBasic_ToolExternalReferenceFile.cxx +++ b/src/IGESBasic/IGESBasic_ToolExternalReferenceFile.cxx @@ -23,7 +23,6 @@ #include #include #include -#include #include #include #include diff --git a/src/IGESBasic/IGESBasic_ToolGroup.cxx b/src/IGESBasic/IGESBasic_ToolGroup.cxx index 7fb5a56d65..3fa773db3b 100644 --- a/src/IGESBasic/IGESBasic_ToolGroup.cxx +++ b/src/IGESBasic/IGESBasic_ToolGroup.cxx @@ -25,7 +25,6 @@ #include #include #include -#include #include #include #include diff --git a/src/IGESBasic/IGESBasic_ToolGroupWithoutBackP.cxx b/src/IGESBasic/IGESBasic_ToolGroupWithoutBackP.cxx index 1cf7838161..2e05a72237 100644 --- a/src/IGESBasic/IGESBasic_ToolGroupWithoutBackP.cxx +++ b/src/IGESBasic/IGESBasic_ToolGroupWithoutBackP.cxx @@ -25,7 +25,6 @@ #include #include #include -#include #include #include #include diff --git a/src/IGESBasic/IGESBasic_ToolHierarchy.cxx b/src/IGESBasic/IGESBasic_ToolHierarchy.cxx index e1622e7166..e0bcae04dd 100644 --- a/src/IGESBasic/IGESBasic_ToolHierarchy.cxx +++ b/src/IGESBasic/IGESBasic_ToolHierarchy.cxx @@ -22,7 +22,6 @@ #include #include #include -#include #include #include #include diff --git a/src/IGESBasic/IGESBasic_ToolName.cxx b/src/IGESBasic/IGESBasic_ToolName.cxx index 49a26cf61d..cbcfd4d795 100644 --- a/src/IGESBasic/IGESBasic_ToolName.cxx +++ b/src/IGESBasic/IGESBasic_ToolName.cxx @@ -23,7 +23,6 @@ #include #include #include -#include #include #include #include diff --git a/src/IGESBasic/IGESBasic_ToolOrderedGroup.cxx b/src/IGESBasic/IGESBasic_ToolOrderedGroup.cxx index 75d29fd55a..1d04c44925 100644 --- a/src/IGESBasic/IGESBasic_ToolOrderedGroup.cxx +++ b/src/IGESBasic/IGESBasic_ToolOrderedGroup.cxx @@ -25,7 +25,6 @@ #include #include #include -#include #include #include #include diff --git a/src/IGESBasic/IGESBasic_ToolOrderedGroupWithoutBackP.cxx b/src/IGESBasic/IGESBasic_ToolOrderedGroupWithoutBackP.cxx index 516bd58648..cd890e737c 100644 --- a/src/IGESBasic/IGESBasic_ToolOrderedGroupWithoutBackP.cxx +++ b/src/IGESBasic/IGESBasic_ToolOrderedGroupWithoutBackP.cxx @@ -25,7 +25,6 @@ #include #include #include -#include #include #include #include diff --git a/src/IGESBasic/IGESBasic_ToolSingleParent.cxx b/src/IGESBasic/IGESBasic_ToolSingleParent.cxx index 4ea052a72a..a163f1171c 100644 --- a/src/IGESBasic/IGESBasic_ToolSingleParent.cxx +++ b/src/IGESBasic/IGESBasic_ToolSingleParent.cxx @@ -25,7 +25,6 @@ #include #include #include -#include #include #include #include diff --git a/src/IGESBasic/IGESBasic_ToolSingularSubfigure.cxx b/src/IGESBasic/IGESBasic_ToolSingularSubfigure.cxx index 49dd355ae0..04029a4ee9 100644 --- a/src/IGESBasic/IGESBasic_ToolSingularSubfigure.cxx +++ b/src/IGESBasic/IGESBasic_ToolSingularSubfigure.cxx @@ -25,7 +25,6 @@ #include #include #include -#include #include #include #include diff --git a/src/IGESBasic/IGESBasic_ToolSubfigureDef.cxx b/src/IGESBasic/IGESBasic_ToolSubfigureDef.cxx index 696c7d7d50..8588168c08 100644 --- a/src/IGESBasic/IGESBasic_ToolSubfigureDef.cxx +++ b/src/IGESBasic/IGESBasic_ToolSubfigureDef.cxx @@ -25,7 +25,6 @@ #include #include #include -#include #include #include #include diff --git a/src/IGESCAFControl/IGESCAFControl.hxx b/src/IGESCAFControl/IGESCAFControl.hxx index 8641ed15a3..33a5c2cc9d 100644 --- a/src/IGESCAFControl/IGESCAFControl.hxx +++ b/src/IGESCAFControl/IGESCAFControl.hxx @@ -20,7 +20,6 @@ #include #include -#include class Quantity_Color; diff --git a/src/IGESCAFControl/IGESCAFControl_Reader.cxx b/src/IGESCAFControl/IGESCAFControl_Reader.cxx index 649fdfaa80..6b99cad0c3 100644 --- a/src/IGESCAFControl/IGESCAFControl_Reader.cxx +++ b/src/IGESCAFControl/IGESCAFControl_Reader.cxx @@ -25,22 +25,18 @@ #include #include #include -#include #include #include -#include #include #include #include #include #include -#include #include #include #include #include #include -#include #include #include #include diff --git a/src/IGESCAFControl/IGESCAFControl_Writer.cxx b/src/IGESCAFControl/IGESCAFControl_Writer.cxx index 36854a6fc0..706a3e93d7 100644 --- a/src/IGESCAFControl/IGESCAFControl_Writer.cxx +++ b/src/IGESCAFControl/IGESCAFControl_Writer.cxx @@ -15,9 +15,7 @@ #include #include -#include #include -#include #include #include #include @@ -28,24 +26,18 @@ #include #include #include -#include #include -#include #include #include #include -#include #include #include #include #include #include -#include -#include #include #include #include -#include #include #include #include diff --git a/src/IGESCAFControl/IGESCAFControl_Writer.hxx b/src/IGESCAFControl/IGESCAFControl_Writer.hxx index b5d31f66c0..3e4a9e0b52 100644 --- a/src/IGESCAFControl/IGESCAFControl_Writer.hxx +++ b/src/IGESCAFControl/IGESCAFControl_Writer.hxx @@ -20,7 +20,6 @@ #include #include -#include #include #include #include diff --git a/src/IGESControl/IGESControl_ActorWrite.cxx b/src/IGESControl/IGESControl_ActorWrite.cxx index 836803c232..98a187746a 100644 --- a/src/IGESControl/IGESControl_ActorWrite.cxx +++ b/src/IGESControl/IGESControl_ActorWrite.cxx @@ -12,9 +12,7 @@ // commercial license or contractual agreement. -#include #include -#include #include #include #include diff --git a/src/IGESControl/IGESControl_ActorWrite.hxx b/src/IGESControl/IGESControl_ActorWrite.hxx index e6a17a8ea8..9b27e13e4e 100644 --- a/src/IGESControl/IGESControl_ActorWrite.hxx +++ b/src/IGESControl/IGESControl_ActorWrite.hxx @@ -21,7 +21,6 @@ #include #include -#include class Transfer_Finder; class Transfer_Binder; class Transfer_FinderProcess; diff --git a/src/IGESControl/IGESControl_Controller.cxx b/src/IGESControl/IGESControl_Controller.cxx index 633bd37675..9875e726db 100644 --- a/src/IGESControl/IGESControl_Controller.cxx +++ b/src/IGESControl/IGESControl_Controller.cxx @@ -18,7 +18,6 @@ #include #include #include -#include #include #include #include @@ -61,7 +60,6 @@ #include #include #include -#include #include #include #include diff --git a/src/IGESControl/IGESControl_Controller.hxx b/src/IGESControl/IGESControl_Controller.hxx index 89b9b706bc..f0d1e2e616 100644 --- a/src/IGESControl/IGESControl_Controller.hxx +++ b/src/IGESControl/IGESControl_Controller.hxx @@ -20,7 +20,6 @@ #include #include -#include #include #include #include diff --git a/src/IGESControl/IGESControl_IGESBoundary.cxx b/src/IGESControl/IGESControl_IGESBoundary.cxx index 3169a9a38a..bdcae284d9 100644 --- a/src/IGESControl/IGESControl_IGESBoundary.cxx +++ b/src/IGESControl/IGESControl_IGESBoundary.cxx @@ -16,8 +16,6 @@ #include #include -#include -#include #include #include #include @@ -31,11 +29,8 @@ #include #include #include -#include #include -#include #include -#include #include #include #include diff --git a/src/IGESControl/IGESControl_IGESBoundary.hxx b/src/IGESControl/IGESControl_IGESBoundary.hxx index 838508b2d7..1fb1962f0e 100644 --- a/src/IGESControl/IGESControl_IGESBoundary.hxx +++ b/src/IGESControl/IGESControl_IGESBoundary.hxx @@ -20,7 +20,6 @@ #include #include -#include #include #include class IGESToBRep_CurveAndSurface; diff --git a/src/IGESControl/IGESControl_Reader.cxx b/src/IGESControl/IGESControl_Reader.cxx index 8d4142b79d..d9346bb415 100644 --- a/src/IGESControl/IGESControl_Reader.cxx +++ b/src/IGESControl/IGESControl_Reader.cxx @@ -23,8 +23,6 @@ #include #include #include -#include -#include #include #include #include @@ -33,16 +31,10 @@ #include #include #include -#include -#include -#include -#include #include #include #include -#include #include -#include #include #include #include diff --git a/src/IGESControl/IGESControl_Reader.hxx b/src/IGESControl/IGESControl_Reader.hxx index 8914615936..b473549a4f 100644 --- a/src/IGESControl/IGESControl_Reader.hxx +++ b/src/IGESControl/IGESControl_Reader.hxx @@ -21,7 +21,6 @@ #include #include -#include #include #include #include diff --git a/src/IGESControl/IGESControl_Writer.cxx b/src/IGESControl/IGESControl_Writer.cxx index c59f645a27..b22ec97e11 100644 --- a/src/IGESControl/IGESControl_Writer.cxx +++ b/src/IGESControl/IGESControl_Writer.cxx @@ -18,11 +18,7 @@ #include #include #include -#include #include -#include -#include -#include #include #include #include @@ -42,7 +38,6 @@ #include #include #include -#include #include #include #include diff --git a/src/IGESControl/IGESControl_Writer.hxx b/src/IGESControl/IGESControl_Writer.hxx index 5f74b9696b..60fb9d8d73 100644 --- a/src/IGESControl/IGESControl_Writer.hxx +++ b/src/IGESControl/IGESControl_Writer.hxx @@ -23,7 +23,6 @@ #include #include -#include #include #include #include diff --git a/src/IGESConvGeom/IGESConvGeom.cxx b/src/IGESConvGeom/IGESConvGeom.cxx index 5b6cae001f..a89315088e 100644 --- a/src/IGESConvGeom/IGESConvGeom.cxx +++ b/src/IGESConvGeom/IGESConvGeom.cxx @@ -21,7 +21,6 @@ #include #include #include -#include #include #include #include @@ -29,7 +28,6 @@ #include #include #include -#include #include #include #include diff --git a/src/IGESConvGeom/IGESConvGeom_GeomBuilder.cxx b/src/IGESConvGeom/IGESConvGeom_GeomBuilder.cxx index 7cd2c62725..ddf9f9f86a 100644 --- a/src/IGESConvGeom/IGESConvGeom_GeomBuilder.cxx +++ b/src/IGESConvGeom/IGESConvGeom_GeomBuilder.cxx @@ -14,7 +14,6 @@ #include #include -#include #include #include #include @@ -22,7 +21,6 @@ #include #include #include -#include #include #include #include diff --git a/src/IGESConvGeom/IGESConvGeom_GeomBuilder.hxx b/src/IGESConvGeom/IGESConvGeom_GeomBuilder.hxx index 57f67d80fc..2642105d04 100644 --- a/src/IGESConvGeom/IGESConvGeom_GeomBuilder.hxx +++ b/src/IGESConvGeom/IGESConvGeom_GeomBuilder.hxx @@ -24,8 +24,6 @@ #include #include #include -#include -#include class gp_XY; class gp_XYZ; class IGESGeom_CopiousData; diff --git a/src/IGESData/IGESData.cxx b/src/IGESData/IGESData.cxx index fd0a585335..6263a39eef 100644 --- a/src/IGESData/IGESData.cxx +++ b/src/IGESData/IGESData.cxx @@ -14,13 +14,11 @@ #include #include #include -#include #include #include #include #include #include -#include #include #include #include diff --git a/src/IGESData/IGESData_BasicEditor.cxx b/src/IGESData/IGESData_BasicEditor.cxx index 28b1b561d9..d7b7bebd15 100644 --- a/src/IGESData/IGESData_BasicEditor.cxx +++ b/src/IGESData/IGESData_BasicEditor.cxx @@ -26,12 +26,9 @@ #include #include #include -#include -#include #include #include #include -#include #include #include diff --git a/src/IGESData/IGESData_BasicEditor.hxx b/src/IGESData/IGESData_BasicEditor.hxx index ba58609407..563b8c2b49 100644 --- a/src/IGESData/IGESData_BasicEditor.hxx +++ b/src/IGESData/IGESData_BasicEditor.hxx @@ -26,7 +26,6 @@ #include #include #include -#include class IGESData_Protocol; class IGESData_IGESModel; class IGESData_IGESEntity; diff --git a/src/IGESData/IGESData_ColorEntity.hxx b/src/IGESData/IGESData_ColorEntity.hxx index ed16df1575..cdab388e22 100644 --- a/src/IGESData/IGESData_ColorEntity.hxx +++ b/src/IGESData/IGESData_ColorEntity.hxx @@ -18,7 +18,6 @@ #define _IGESData_ColorEntity_HeaderFile #include -#include #include diff --git a/src/IGESData/IGESData_DefSwitch.hxx b/src/IGESData/IGESData_DefSwitch.hxx index 19ac25467a..8eb699900e 100644 --- a/src/IGESData/IGESData_DefSwitch.hxx +++ b/src/IGESData/IGESData_DefSwitch.hxx @@ -21,7 +21,6 @@ #include #include -#include #include //! description of a directory component which can be either diff --git a/src/IGESData/IGESData_DefaultGeneral.cxx b/src/IGESData/IGESData_DefaultGeneral.cxx index 4576785537..0b768b9413 100644 --- a/src/IGESData/IGESData_DefaultGeneral.cxx +++ b/src/IGESData/IGESData_DefaultGeneral.cxx @@ -28,7 +28,6 @@ #include #include #include -#include IMPLEMENT_STANDARD_RTTIEXT(IGESData_DefaultGeneral,IGESData_GeneralModule) diff --git a/src/IGESData/IGESData_DefaultGeneral.hxx b/src/IGESData/IGESData_DefaultGeneral.hxx index 2621a84862..b05d04bb88 100644 --- a/src/IGESData/IGESData_DefaultGeneral.hxx +++ b/src/IGESData/IGESData_DefaultGeneral.hxx @@ -18,11 +18,9 @@ #define _IGESData_DefaultGeneral_HeaderFile #include -#include #include #include -#include class IGESData_IGESEntity; class Interface_EntityIterator; class IGESData_DirChecker; diff --git a/src/IGESData/IGESData_DefaultSpecific.cxx b/src/IGESData/IGESData_DefaultSpecific.cxx index 93d97d22b6..1b3efde211 100644 --- a/src/IGESData/IGESData_DefaultSpecific.cxx +++ b/src/IGESData/IGESData_DefaultSpecific.cxx @@ -15,8 +15,6 @@ #include #include #include -#include -#include #include #include #include diff --git a/src/IGESData/IGESData_DefaultSpecific.hxx b/src/IGESData/IGESData_DefaultSpecific.hxx index a96846b0ab..9772f24c6b 100644 --- a/src/IGESData/IGESData_DefaultSpecific.hxx +++ b/src/IGESData/IGESData_DefaultSpecific.hxx @@ -18,7 +18,6 @@ #define _IGESData_DefaultSpecific_HeaderFile #include -#include #include #include diff --git a/src/IGESData/IGESData_DirChecker.cxx b/src/IGESData/IGESData_DirChecker.cxx index f4d9d2e787..ebae091768 100644 --- a/src/IGESData/IGESData_DirChecker.cxx +++ b/src/IGESData/IGESData_DirChecker.cxx @@ -13,7 +13,6 @@ #include -#include #include #include #include diff --git a/src/IGESData/IGESData_DirChecker.hxx b/src/IGESData/IGESData_DirChecker.hxx index 8356e4e04e..8bc4dd8e94 100644 --- a/src/IGESData/IGESData_DirChecker.hxx +++ b/src/IGESData/IGESData_DirChecker.hxx @@ -21,7 +21,6 @@ #include #include -#include #include #include class Interface_Check; diff --git a/src/IGESData/IGESData_DirPart.hxx b/src/IGESData/IGESData_DirPart.hxx index 6fe8348730..7c3a2af72b 100644 --- a/src/IGESData/IGESData_DirPart.hxx +++ b/src/IGESData/IGESData_DirPart.hxx @@ -21,9 +21,6 @@ #include #include -#include -#include -#include class IGESData_IGESType; //! literal/numeric description of an entity's directory section, taken from file diff --git a/src/IGESData/IGESData_FileRecognizer.hxx b/src/IGESData/IGESData_FileRecognizer.hxx index fcd84bd119..25ff62890f 100644 --- a/src/IGESData/IGESData_FileRecognizer.hxx +++ b/src/IGESData/IGESData_FileRecognizer.hxx @@ -20,7 +20,6 @@ #include #include -#include #include class IGESData_IGESEntity; class Standard_NoSuchObject; diff --git a/src/IGESData/IGESData_FreeFormatEntity.cxx b/src/IGESData/IGESData_FreeFormatEntity.cxx index f72bb423fa..de82a64a1b 100644 --- a/src/IGESData/IGESData_FreeFormatEntity.cxx +++ b/src/IGESData/IGESData_FreeFormatEntity.cxx @@ -15,10 +15,8 @@ #include #include #include -#include #include #include -#include #include #include diff --git a/src/IGESData/IGESData_FreeFormatEntity.hxx b/src/IGESData/IGESData_FreeFormatEntity.hxx index 9f5410431b..53e42160e8 100644 --- a/src/IGESData/IGESData_FreeFormatEntity.hxx +++ b/src/IGESData/IGESData_FreeFormatEntity.hxx @@ -18,14 +18,11 @@ #define _IGESData_FreeFormatEntity_HeaderFile #include -#include #include #include #include -#include #include -#include #include class IGESData_IGESEntity; class TCollection_HAsciiString; diff --git a/src/IGESData/IGESData_GeneralModule.cxx b/src/IGESData/IGESData_GeneralModule.cxx index e480f669bb..6920274416 100644 --- a/src/IGESData/IGESData_GeneralModule.cxx +++ b/src/IGESData/IGESData_GeneralModule.cxx @@ -20,13 +20,11 @@ #include #include #include -#include #include #include #include #include #include -#include #include #include #include diff --git a/src/IGESData/IGESData_GeneralModule.hxx b/src/IGESData/IGESData_GeneralModule.hxx index fcf88a2fd1..f453756877 100644 --- a/src/IGESData/IGESData_GeneralModule.hxx +++ b/src/IGESData/IGESData_GeneralModule.hxx @@ -22,7 +22,6 @@ #include #include -#include class Standard_Transient; class Interface_EntityIterator; class IGESData_IGESEntity; diff --git a/src/IGESData/IGESData_GlobalSection.cxx b/src/IGESData/IGESData_GlobalSection.cxx index dfcb3aa0fe..d63d9542b4 100644 --- a/src/IGESData/IGESData_GlobalSection.cxx +++ b/src/IGESData/IGESData_GlobalSection.cxx @@ -17,11 +17,9 @@ #include #include #include -#include #include #include #include -#include #include #include #include diff --git a/src/IGESData/IGESData_GlobalSection.hxx b/src/IGESData/IGESData_GlobalSection.hxx index 8d47f3003e..169f12eca4 100644 --- a/src/IGESData/IGESData_GlobalSection.hxx +++ b/src/IGESData/IGESData_GlobalSection.hxx @@ -21,7 +21,6 @@ #include #include -#include #include #include #include diff --git a/src/IGESData/IGESData_HArray1OfIGESEntity.hxx b/src/IGESData/IGESData_HArray1OfIGESEntity.hxx index 66d050ae84..ec3fd80e11 100644 --- a/src/IGESData/IGESData_HArray1OfIGESEntity.hxx +++ b/src/IGESData/IGESData_HArray1OfIGESEntity.hxx @@ -17,7 +17,6 @@ #ifndef IGESData_HArray1OfIGESEntity_HeaderFile #define IGESData_HArray1OfIGESEntity_HeaderFile -#include #include #include diff --git a/src/IGESData/IGESData_IGESDumper.cxx b/src/IGESData/IGESData_IGESDumper.cxx index ee2efa3166..ec6c749a26 100644 --- a/src/IGESData/IGESData_IGESDumper.cxx +++ b/src/IGESData/IGESData_IGESDumper.cxx @@ -25,7 +25,6 @@ #include #include #include -#include #include #include #include diff --git a/src/IGESData/IGESData_IGESEntity.cxx b/src/IGESData/IGESData_IGESEntity.cxx index 8ea215f354..ef6b0d9884 100644 --- a/src/IGESData/IGESData_IGESEntity.cxx +++ b/src/IGESData/IGESData_IGESEntity.cxx @@ -15,7 +15,6 @@ #include #include #include -#include #include #include #include @@ -23,7 +22,6 @@ #include #include #include -#include #include #include #include @@ -31,7 +29,6 @@ #include #include #include -#include #include #include #include diff --git a/src/IGESData/IGESData_IGESEntity.hxx b/src/IGESData/IGESData_IGESEntity.hxx index c754186caf..c950038f4b 100644 --- a/src/IGESData/IGESData_IGESEntity.hxx +++ b/src/IGESData/IGESData_IGESEntity.hxx @@ -22,15 +22,11 @@ #include #include -#include -#include #include #include -#include #include #include #include -#include class TCollection_HAsciiString; class IGESData_IGESType; class IGESData_LineFontEntity; diff --git a/src/IGESData/IGESData_IGESModel.cxx b/src/IGESData/IGESData_IGESModel.cxx index 1856b5ba72..091495345f 100644 --- a/src/IGESData/IGESData_IGESModel.cxx +++ b/src/IGESData/IGESData_IGESModel.cxx @@ -16,12 +16,9 @@ //#13 smh 13.01.2000 : Parsing long year date #include -#include #include #include -#include #include -#include #include #include #include diff --git a/src/IGESData/IGESData_IGESModel.hxx b/src/IGESData/IGESData_IGESModel.hxx index c3224269cb..1e30288963 100644 --- a/src/IGESData/IGESData_IGESModel.hxx +++ b/src/IGESData/IGESData_IGESModel.hxx @@ -17,7 +17,6 @@ #ifndef _IGESData_IGESModel_HeaderFile #define _IGESData_IGESModel_HeaderFile -#include #include #include diff --git a/src/IGESData/IGESData_IGESReaderData.cxx b/src/IGESData/IGESData_IGESReaderData.cxx index d5ef0b39c2..df6e0d3785 100644 --- a/src/IGESData/IGESData_IGESReaderData.cxx +++ b/src/IGESData/IGESData_IGESReaderData.cxx @@ -13,16 +13,11 @@ #include -#include -#include #include #include #include #include #include -#include -#include -#include #include #include #include diff --git a/src/IGESData/IGESData_IGESReaderData.hxx b/src/IGESData/IGESData_IGESReaderData.hxx index 84275d955c..a930d835a2 100644 --- a/src/IGESData/IGESData_IGESReaderData.hxx +++ b/src/IGESData/IGESData_IGESReaderData.hxx @@ -25,7 +25,6 @@ #include #include #include -#include #include #include #include diff --git a/src/IGESData/IGESData_IGESReaderTool.cxx b/src/IGESData/IGESData_IGESReaderTool.cxx index 512a542a2f..b6c6653e91 100644 --- a/src/IGESData/IGESData_IGESReaderTool.cxx +++ b/src/IGESData/IGESData_IGESReaderTool.cxx @@ -13,7 +13,6 @@ #include -#include #include #include #include @@ -30,7 +29,6 @@ #include #include #include -#include #include #include #include diff --git a/src/IGESData/IGESData_IGESReaderTool.hxx b/src/IGESData/IGESData_IGESReaderTool.hxx index d17918a352..95f3e7ea53 100644 --- a/src/IGESData/IGESData_IGESReaderTool.hxx +++ b/src/IGESData/IGESData_IGESReaderTool.hxx @@ -26,9 +26,7 @@ #include #include #include -#include #include -#include class Interface_ParamList; class IGESData_FileRecognizer; class Interface_Check; diff --git a/src/IGESData/IGESData_IGESType.hxx b/src/IGESData/IGESData_IGESType.hxx index 54d7122f33..823a3941ba 100644 --- a/src/IGESData/IGESData_IGESType.hxx +++ b/src/IGESData/IGESData_IGESType.hxx @@ -21,7 +21,6 @@ #include #include -#include #include diff --git a/src/IGESData/IGESData_IGESWriter.cxx b/src/IGESData/IGESData_IGESWriter.cxx index 17e0716db8..3cedb50b36 100644 --- a/src/IGESData/IGESData_IGESWriter.cxx +++ b/src/IGESData/IGESData_IGESWriter.cxx @@ -16,24 +16,15 @@ #include #include #include -#include -#include #include #include #include -#include -#include -#include #include #include -#include #include -#include #include #include -#include #include -#include #include #include #include @@ -42,7 +33,6 @@ #include #include #include -#include #include #include diff --git a/src/IGESData/IGESData_IGESWriter.hxx b/src/IGESData/IGESData_IGESWriter.hxx index 7cc2107742..d32f90809e 100644 --- a/src/IGESData/IGESData_IGESWriter.hxx +++ b/src/IGESData/IGESData_IGESWriter.hxx @@ -22,7 +22,6 @@ #include #include -#include #include #include #include @@ -30,8 +29,6 @@ #include #include #include -#include -#include #include class IGESData_IGESModel; diff --git a/src/IGESData/IGESData_LabelDisplayEntity.hxx b/src/IGESData/IGESData_LabelDisplayEntity.hxx index 29ad6942fd..ea257e9898 100644 --- a/src/IGESData/IGESData_LabelDisplayEntity.hxx +++ b/src/IGESData/IGESData_LabelDisplayEntity.hxx @@ -18,7 +18,6 @@ #define _IGESData_LabelDisplayEntity_HeaderFile #include -#include #include diff --git a/src/IGESData/IGESData_LevelListEntity.hxx b/src/IGESData/IGESData_LevelListEntity.hxx index 8dd88188c5..3dea6fccc4 100644 --- a/src/IGESData/IGESData_LevelListEntity.hxx +++ b/src/IGESData/IGESData_LevelListEntity.hxx @@ -18,11 +18,9 @@ #define _IGESData_LevelListEntity_HeaderFile #include -#include #include #include -#include class IGESData_LevelListEntity; diff --git a/src/IGESData/IGESData_LineFontEntity.hxx b/src/IGESData/IGESData_LineFontEntity.hxx index 38be576995..dc7d1a22f9 100644 --- a/src/IGESData/IGESData_LineFontEntity.hxx +++ b/src/IGESData/IGESData_LineFontEntity.hxx @@ -18,7 +18,6 @@ #define _IGESData_LineFontEntity_HeaderFile #include -#include #include diff --git a/src/IGESData/IGESData_NameEntity.hxx b/src/IGESData/IGESData_NameEntity.hxx index 1c621f5666..be36aeafb4 100644 --- a/src/IGESData/IGESData_NameEntity.hxx +++ b/src/IGESData/IGESData_NameEntity.hxx @@ -18,7 +18,6 @@ #define _IGESData_NameEntity_HeaderFile #include -#include #include class TCollection_HAsciiString; diff --git a/src/IGESData/IGESData_ParamCursor.hxx b/src/IGESData/IGESData_ParamCursor.hxx index ae4b0e9ff7..9dd84d3f90 100644 --- a/src/IGESData/IGESData_ParamCursor.hxx +++ b/src/IGESData/IGESData_ParamCursor.hxx @@ -21,7 +21,6 @@ #include #include -#include #include diff --git a/src/IGESData/IGESData_ParamReader.cxx b/src/IGESData/IGESData_ParamReader.cxx index 66b63e4b19..84e675ba35 100644 --- a/src/IGESData/IGESData_ParamReader.cxx +++ b/src/IGESData/IGESData_ParamReader.cxx @@ -15,7 +15,6 @@ #include #include -#include #include #include #include @@ -23,9 +22,7 @@ #include #include #include -#include #include -#include #include #include #include diff --git a/src/IGESData/IGESData_ParamReader.hxx b/src/IGESData/IGESData_ParamReader.hxx index 16f84c791a..de5f6fa951 100644 --- a/src/IGESData/IGESData_ParamReader.hxx +++ b/src/IGESData/IGESData_ParamReader.hxx @@ -23,21 +23,20 @@ #include #include -#include #include #include -#include #include +#include #include #include #include #include #include + class Interface_ParamList; class Interface_Check; class IGESData_IGESEntity; class IGESData_IGESReaderData; -class IGESData_ParamCursor; class Message_Msg; class gp_XY; class gp_XYZ; diff --git a/src/IGESData/IGESData_Protocol.cxx b/src/IGESData/IGESData_Protocol.cxx index c40e5396c6..99891d3aa5 100644 --- a/src/IGESData/IGESData_Protocol.cxx +++ b/src/IGESData/IGESData_Protocol.cxx @@ -13,7 +13,6 @@ #include -#include #include #include #include diff --git a/src/IGESData/IGESData_Protocol.hxx b/src/IGESData/IGESData_Protocol.hxx index 82a9ab1493..747b498f1f 100644 --- a/src/IGESData/IGESData_Protocol.hxx +++ b/src/IGESData/IGESData_Protocol.hxx @@ -22,8 +22,6 @@ #include #include -#include -#include class Interface_InterfaceModel; class Standard_Transient; diff --git a/src/IGESData/IGESData_ReadWriteModule.cxx b/src/IGESData/IGESData_ReadWriteModule.cxx index b3889c4262..675cfbd0ec 100644 --- a/src/IGESData/IGESData_ReadWriteModule.cxx +++ b/src/IGESData/IGESData_ReadWriteModule.cxx @@ -12,16 +12,13 @@ // commercial license or contractual agreement. -#include #include #include #include -#include #include #include #include #include -#include #include #include diff --git a/src/IGESData/IGESData_SingleParentEntity.cxx b/src/IGESData/IGESData_SingleParentEntity.cxx index 465f8cb0cb..5f8239e7f9 100644 --- a/src/IGESData/IGESData_SingleParentEntity.cxx +++ b/src/IGESData/IGESData_SingleParentEntity.cxx @@ -12,7 +12,6 @@ // commercial license or contractual agreement. -#include #include #include #include diff --git a/src/IGESData/IGESData_SingleParentEntity.hxx b/src/IGESData/IGESData_SingleParentEntity.hxx index fb881dcdfb..bfab90cd5a 100644 --- a/src/IGESData/IGESData_SingleParentEntity.hxx +++ b/src/IGESData/IGESData_SingleParentEntity.hxx @@ -18,7 +18,6 @@ #define _IGESData_SingleParentEntity_HeaderFile #include -#include #include #include diff --git a/src/IGESData/IGESData_SpecificLib.hxx b/src/IGESData/IGESData_SpecificLib.hxx index 99454e5adb..2bebad887b 100644 --- a/src/IGESData/IGESData_SpecificLib.hxx +++ b/src/IGESData/IGESData_SpecificLib.hxx @@ -21,7 +21,6 @@ #include #include -#include #include class IGESData_NodeOfSpecificLib; class Standard_NoSuchObject; diff --git a/src/IGESData/IGESData_SpecificModule.hxx b/src/IGESData/IGESData_SpecificModule.hxx index 6f7a3a7d55..cdad99c873 100644 --- a/src/IGESData/IGESData_SpecificModule.hxx +++ b/src/IGESData/IGESData_SpecificModule.hxx @@ -22,7 +22,6 @@ #include #include -#include class IGESData_IGESEntity; class IGESData_IGESDumper; diff --git a/src/IGESData/IGESData_ToolLocation.cxx b/src/IGESData/IGESData_ToolLocation.cxx index 5b6cfa968c..c5c2f279be 100644 --- a/src/IGESData/IGESData_ToolLocation.cxx +++ b/src/IGESData/IGESData_ToolLocation.cxx @@ -18,10 +18,8 @@ #include #include #include -#include #include #include -#include #include #include #include diff --git a/src/IGESData/IGESData_ToolLocation.hxx b/src/IGESData/IGESData_ToolLocation.hxx index e7f4900ee8..690fa524ed 100644 --- a/src/IGESData/IGESData_ToolLocation.hxx +++ b/src/IGESData/IGESData_ToolLocation.hxx @@ -20,11 +20,9 @@ #include #include -#include #include #include #include -#include class IGESData_IGESModel; class IGESData_Protocol; class IGESData_IGESEntity; diff --git a/src/IGESData/IGESData_UndefinedEntity.cxx b/src/IGESData/IGESData_UndefinedEntity.cxx index d3f321644c..a2e4d37fc5 100644 --- a/src/IGESData/IGESData_UndefinedEntity.cxx +++ b/src/IGESData/IGESData_UndefinedEntity.cxx @@ -13,7 +13,6 @@ #include -#include #include #include #include @@ -28,7 +27,6 @@ #include #include #include -#include #include IMPLEMENT_STANDARD_RTTIEXT(IGESData_UndefinedEntity,IGESData_IGESEntity) diff --git a/src/IGESData/IGESData_UndefinedEntity.hxx b/src/IGESData/IGESData_UndefinedEntity.hxx index cadc43bbd1..e9ec647117 100644 --- a/src/IGESData/IGESData_UndefinedEntity.hxx +++ b/src/IGESData/IGESData_UndefinedEntity.hxx @@ -22,7 +22,6 @@ #include #include -#include #include #include class Interface_UndefinedContent; diff --git a/src/IGESData/IGESData_ViewKindEntity.hxx b/src/IGESData/IGESData_ViewKindEntity.hxx index 8be4c5c8e9..df33e03bf0 100644 --- a/src/IGESData/IGESData_ViewKindEntity.hxx +++ b/src/IGESData/IGESData_ViewKindEntity.hxx @@ -18,10 +18,8 @@ #define _IGESData_ViewKindEntity_HeaderFile #include -#include #include -#include #include diff --git a/src/IGESData/IGESData_WriterLib.hxx b/src/IGESData/IGESData_WriterLib.hxx index d4f394f611..7b6025d8fb 100644 --- a/src/IGESData/IGESData_WriterLib.hxx +++ b/src/IGESData/IGESData_WriterLib.hxx @@ -21,7 +21,6 @@ #include #include -#include #include class IGESData_NodeOfWriterLib; class Standard_NoSuchObject; diff --git a/src/IGESDefs/IGESDefs_AssociativityDef.cxx b/src/IGESDefs/IGESDefs_AssociativityDef.cxx index b1c3e19edd..809a1d0811 100644 --- a/src/IGESDefs/IGESDefs_AssociativityDef.cxx +++ b/src/IGESDefs/IGESDefs_AssociativityDef.cxx @@ -19,7 +19,6 @@ #include #include #include -#include #include IMPLEMENT_STANDARD_RTTIEXT(IGESDefs_AssociativityDef,IGESData_IGESEntity) diff --git a/src/IGESDefs/IGESDefs_AssociativityDef.hxx b/src/IGESDefs/IGESDefs_AssociativityDef.hxx index 2235919094..8ae2c85586 100644 --- a/src/IGESDefs/IGESDefs_AssociativityDef.hxx +++ b/src/IGESDefs/IGESDefs_AssociativityDef.hxx @@ -23,7 +23,6 @@ #include #include #include -#include class IGESBasic_HArray1OfHArray1OfInteger; diff --git a/src/IGESDefs/IGESDefs_AttributeDef.cxx b/src/IGESDefs/IGESDefs_AttributeDef.cxx index c7354b53f2..bdbada3b78 100644 --- a/src/IGESDefs/IGESDefs_AttributeDef.cxx +++ b/src/IGESDefs/IGESDefs_AttributeDef.cxx @@ -25,8 +25,6 @@ #include #include #include -#include -#include #include #include #include diff --git a/src/IGESDefs/IGESDefs_AttributeDef.hxx b/src/IGESDefs/IGESDefs_AttributeDef.hxx index 5b7468199b..d14e954336 100644 --- a/src/IGESDefs/IGESDefs_AttributeDef.hxx +++ b/src/IGESDefs/IGESDefs_AttributeDef.hxx @@ -24,8 +24,6 @@ #include #include #include -#include -#include class TCollection_HAsciiString; class IGESDefs_HArray1OfHArray1OfTextDisplayTemplate; class IGESGraph_TextDisplayTemplate; diff --git a/src/IGESDefs/IGESDefs_AttributeTable.cxx b/src/IGESDefs/IGESDefs_AttributeTable.cxx index 5080ef71ef..10775f8900 100644 --- a/src/IGESDefs/IGESDefs_AttributeTable.cxx +++ b/src/IGESDefs/IGESDefs_AttributeTable.cxx @@ -23,8 +23,6 @@ #include #include #include -#include -#include #include #include #include diff --git a/src/IGESDefs/IGESDefs_AttributeTable.hxx b/src/IGESDefs/IGESDefs_AttributeTable.hxx index 5c0554ef30..8ad47d4197 100644 --- a/src/IGESDefs/IGESDefs_AttributeTable.hxx +++ b/src/IGESDefs/IGESDefs_AttributeTable.hxx @@ -23,8 +23,6 @@ #include #include #include -#include -#include class IGESDefs_AttributeDef; class Standard_Transient; class TCollection_HAsciiString; diff --git a/src/IGESDefs/IGESDefs_GeneralModule.cxx b/src/IGESDefs/IGESDefs_GeneralModule.cxx index ca93a5d001..e7eb6d998e 100644 --- a/src/IGESDefs/IGESDefs_GeneralModule.cxx +++ b/src/IGESDefs/IGESDefs_GeneralModule.cxx @@ -13,7 +13,6 @@ #include -#include #include #include #include diff --git a/src/IGESDefs/IGESDefs_GeneralModule.hxx b/src/IGESDefs/IGESDefs_GeneralModule.hxx index bcc00c72de..10c10667f7 100644 --- a/src/IGESDefs/IGESDefs_GeneralModule.hxx +++ b/src/IGESDefs/IGESDefs_GeneralModule.hxx @@ -22,7 +22,6 @@ #include #include -#include class IGESData_IGESEntity; class Interface_EntityIterator; class IGESData_DirChecker; diff --git a/src/IGESDefs/IGESDefs_GenericData.cxx b/src/IGESDefs/IGESDefs_GenericData.cxx index 38545ba641..0bb16059af 100644 --- a/src/IGESDefs/IGESDefs_GenericData.cxx +++ b/src/IGESDefs/IGESDefs_GenericData.cxx @@ -17,14 +17,10 @@ //-------------------------------------------------------------------- // rln 11.05.2000 BUC60660 -#include -#include #include #include #include #include -#include -#include #include #include #include diff --git a/src/IGESDefs/IGESDefs_GenericData.hxx b/src/IGESDefs/IGESDefs_GenericData.hxx index b004b7fdd1..1c66935033 100644 --- a/src/IGESDefs/IGESDefs_GenericData.hxx +++ b/src/IGESDefs/IGESDefs_GenericData.hxx @@ -18,14 +18,12 @@ #define _IGESDefs_GenericData_HeaderFile #include -#include #include #include #include #include #include -#include class TCollection_HAsciiString; class Standard_Transient; diff --git a/src/IGESDefs/IGESDefs_HArray1OfTabularData.hxx b/src/IGESDefs/IGESDefs_HArray1OfTabularData.hxx index 2e4f16ff10..2f64944037 100644 --- a/src/IGESDefs/IGESDefs_HArray1OfTabularData.hxx +++ b/src/IGESDefs/IGESDefs_HArray1OfTabularData.hxx @@ -17,7 +17,6 @@ #ifndef IGESDefs_HArray1OfTabularData_HeaderFile #define IGESDefs_HArray1OfTabularData_HeaderFile -#include #include #include diff --git a/src/IGESDefs/IGESDefs_MacroDef.cxx b/src/IGESDefs/IGESDefs_MacroDef.cxx index 688147dbf4..edfbd57f0a 100644 --- a/src/IGESDefs/IGESDefs_MacroDef.cxx +++ b/src/IGESDefs/IGESDefs_MacroDef.cxx @@ -18,7 +18,6 @@ #include #include -#include #include #include diff --git a/src/IGESDefs/IGESDefs_MacroDef.hxx b/src/IGESDefs/IGESDefs_MacroDef.hxx index 321550aa94..76a1ad0dc3 100644 --- a/src/IGESDefs/IGESDefs_MacroDef.hxx +++ b/src/IGESDefs/IGESDefs_MacroDef.hxx @@ -18,7 +18,6 @@ #define _IGESDefs_MacroDef_HeaderFile #include -#include #include #include diff --git a/src/IGESDefs/IGESDefs_Protocol.hxx b/src/IGESDefs/IGESDefs_Protocol.hxx index 7bdc365120..549c58a51a 100644 --- a/src/IGESDefs/IGESDefs_Protocol.hxx +++ b/src/IGESDefs/IGESDefs_Protocol.hxx @@ -22,7 +22,6 @@ #include #include -#include class Interface_Protocol; diff --git a/src/IGESDefs/IGESDefs_ReadWriteModule.cxx b/src/IGESDefs/IGESDefs_ReadWriteModule.cxx index 58e1940be5..b32cd0956d 100644 --- a/src/IGESDefs/IGESDefs_ReadWriteModule.cxx +++ b/src/IGESDefs/IGESDefs_ReadWriteModule.cxx @@ -12,7 +12,6 @@ // commercial license or contractual agreement. -#include #include #include #include @@ -32,7 +31,6 @@ #include #include #include -#include #include IMPLEMENT_STANDARD_RTTIEXT(IGESDefs_ReadWriteModule,IGESData_ReadWriteModule) diff --git a/src/IGESDefs/IGESDefs_SpecificModule.cxx b/src/IGESDefs/IGESDefs_SpecificModule.cxx index 89c6364280..23a350936e 100644 --- a/src/IGESDefs/IGESDefs_SpecificModule.cxx +++ b/src/IGESDefs/IGESDefs_SpecificModule.cxx @@ -13,7 +13,6 @@ #include -#include #include #include #include diff --git a/src/IGESDefs/IGESDefs_TabularData.cxx b/src/IGESDefs/IGESDefs_TabularData.cxx index af04ab69df..2a6f0687e0 100644 --- a/src/IGESDefs/IGESDefs_TabularData.cxx +++ b/src/IGESDefs/IGESDefs_TabularData.cxx @@ -21,7 +21,6 @@ #include #include #include -#include #include #include diff --git a/src/IGESDefs/IGESDefs_TabularData.hxx b/src/IGESDefs/IGESDefs_TabularData.hxx index 083971b4f3..064c4b9ec8 100644 --- a/src/IGESDefs/IGESDefs_TabularData.hxx +++ b/src/IGESDefs/IGESDefs_TabularData.hxx @@ -23,8 +23,6 @@ #include #include #include -#include -#include #include class IGESBasic_HArray1OfHArray1OfReal; diff --git a/src/IGESDefs/IGESDefs_ToolAssociativityDef.cxx b/src/IGESDefs/IGESDefs_ToolAssociativityDef.cxx index d4c2a7f357..0af582ca1b 100644 --- a/src/IGESDefs/IGESDefs_ToolAssociativityDef.cxx +++ b/src/IGESDefs/IGESDefs_ToolAssociativityDef.cxx @@ -22,14 +22,12 @@ #include #include #include -#include #include #include #include #include #include #include -#include #include #include #include diff --git a/src/IGESDefs/IGESDefs_ToolAttributeDef.cxx b/src/IGESDefs/IGESDefs_ToolAttributeDef.cxx index 524fb1474a..d6215e9e04 100644 --- a/src/IGESDefs/IGESDefs_ToolAttributeDef.cxx +++ b/src/IGESDefs/IGESDefs_ToolAttributeDef.cxx @@ -18,12 +18,9 @@ #include #include -#include #include -#include #include #include -#include #include #include #include @@ -37,7 +34,6 @@ #include #include #include -#include #include #include #include diff --git a/src/IGESDefs/IGESDefs_ToolAttributeTable.cxx b/src/IGESDefs/IGESDefs_ToolAttributeTable.cxx index f43dbce920..2f9ca93198 100644 --- a/src/IGESDefs/IGESDefs_ToolAttributeTable.cxx +++ b/src/IGESDefs/IGESDefs_ToolAttributeTable.cxx @@ -18,11 +18,9 @@ #include #include -#include #include #include #include -#include #include #include #include @@ -34,7 +32,6 @@ #include #include #include -#include #include #include #include diff --git a/src/IGESDefs/IGESDefs_ToolGenericData.cxx b/src/IGESDefs/IGESDefs_ToolGenericData.cxx index b13a0e552f..e3f4f14199 100644 --- a/src/IGESDefs/IGESDefs_ToolGenericData.cxx +++ b/src/IGESDefs/IGESDefs_ToolGenericData.cxx @@ -18,23 +18,18 @@ #include #include -#include #include -#include #include #include -#include #include #include #include #include #include #include -#include #include #include #include -#include #include #include #include diff --git a/src/IGESDefs/IGESDefs_ToolMacroDef.cxx b/src/IGESDefs/IGESDefs_ToolMacroDef.cxx index 6f0049bfc0..f3b942df64 100644 --- a/src/IGESDefs/IGESDefs_ToolMacroDef.cxx +++ b/src/IGESDefs/IGESDefs_ToolMacroDef.cxx @@ -21,7 +21,6 @@ #include #include #include -#include #include #include #include @@ -29,10 +28,8 @@ #include #include #include -#include #include #include -#include #include IGESDefs_ToolMacroDef::IGESDefs_ToolMacroDef () { } diff --git a/src/IGESDefs/IGESDefs_ToolTabularData.cxx b/src/IGESDefs/IGESDefs_ToolTabularData.cxx index c187b69283..39b183931c 100644 --- a/src/IGESDefs/IGESDefs_ToolTabularData.cxx +++ b/src/IGESDefs/IGESDefs_ToolTabularData.cxx @@ -24,14 +24,12 @@ #include #include #include -#include #include #include #include #include #include #include -#include #include #include #include diff --git a/src/IGESDefs/IGESDefs_ToolUnitsData.cxx b/src/IGESDefs/IGESDefs_ToolUnitsData.cxx index f42cbf7eba..e6811be80b 100644 --- a/src/IGESDefs/IGESDefs_ToolUnitsData.cxx +++ b/src/IGESDefs/IGESDefs_ToolUnitsData.cxx @@ -21,7 +21,6 @@ #include #include #include -#include #include #include #include @@ -29,9 +28,7 @@ #include #include #include -#include #include -#include #include #include diff --git a/src/IGESDefs/IGESDefs_UnitsData.cxx b/src/IGESDefs/IGESDefs_UnitsData.cxx index b1f4c05327..6156e9c718 100644 --- a/src/IGESDefs/IGESDefs_UnitsData.cxx +++ b/src/IGESDefs/IGESDefs_UnitsData.cxx @@ -18,7 +18,6 @@ #include #include -#include #include #include diff --git a/src/IGESDefs/IGESDefs_UnitsData.hxx b/src/IGESDefs/IGESDefs_UnitsData.hxx index 9e54babe13..49fab42c87 100644 --- a/src/IGESDefs/IGESDefs_UnitsData.hxx +++ b/src/IGESDefs/IGESDefs_UnitsData.hxx @@ -18,7 +18,6 @@ #define _IGESDefs_UnitsData_HeaderFile #include -#include #include #include diff --git a/src/IGESDimen/IGESDimen_AngularDimension.hxx b/src/IGESDimen/IGESDimen_AngularDimension.hxx index 345d459e7c..6797c9169e 100644 --- a/src/IGESDimen/IGESDimen_AngularDimension.hxx +++ b/src/IGESDimen/IGESDimen_AngularDimension.hxx @@ -21,9 +21,7 @@ #include #include -#include #include -#include class IGESDimen_GeneralNote; class IGESDimen_WitnessLine; class IGESDimen_LeaderArrow; diff --git a/src/IGESDimen/IGESDimen_CenterLine.cxx b/src/IGESDimen/IGESDimen_CenterLine.cxx index 14e496d9b0..311e399fef 100644 --- a/src/IGESDimen/IGESDimen_CenterLine.cxx +++ b/src/IGESDimen/IGESDimen_CenterLine.cxx @@ -21,7 +21,6 @@ #include #include #include -#include #include IMPLEMENT_STANDARD_RTTIEXT(IGESDimen_CenterLine,IGESData_IGESEntity) diff --git a/src/IGESDimen/IGESDimen_CenterLine.hxx b/src/IGESDimen/IGESDimen_CenterLine.hxx index b59b6a5e45..66e7489034 100644 --- a/src/IGESDimen/IGESDimen_CenterLine.hxx +++ b/src/IGESDimen/IGESDimen_CenterLine.hxx @@ -21,10 +21,8 @@ #include #include -#include #include #include -#include class gp_Pnt; diff --git a/src/IGESDimen/IGESDimen_CurveDimension.cxx b/src/IGESDimen/IGESDimen_CurveDimension.cxx index 8e90c85043..e3d6f2a2a0 100644 --- a/src/IGESDimen/IGESDimen_CurveDimension.cxx +++ b/src/IGESDimen/IGESDimen_CurveDimension.cxx @@ -16,14 +16,10 @@ //-------------------------------------------------------------------- //-------------------------------------------------------------------- -#include -#include -#include #include #include #include #include -#include #include IMPLEMENT_STANDARD_RTTIEXT(IGESDimen_CurveDimension,IGESData_IGESEntity) diff --git a/src/IGESDimen/IGESDimen_CurveDimension.hxx b/src/IGESDimen/IGESDimen_CurveDimension.hxx index 5e53b29fff..72f14dfcf3 100644 --- a/src/IGESDimen/IGESDimen_CurveDimension.hxx +++ b/src/IGESDimen/IGESDimen_CurveDimension.hxx @@ -18,10 +18,8 @@ #define _IGESDimen_CurveDimension_HeaderFile #include -#include #include -#include class IGESDimen_GeneralNote; class IGESDimen_LeaderArrow; class IGESDimen_WitnessLine; diff --git a/src/IGESDimen/IGESDimen_DiameterDimension.hxx b/src/IGESDimen/IGESDimen_DiameterDimension.hxx index 06d7d0226c..d438388610 100644 --- a/src/IGESDimen/IGESDimen_DiameterDimension.hxx +++ b/src/IGESDimen/IGESDimen_DiameterDimension.hxx @@ -22,7 +22,6 @@ #include #include -#include class IGESDimen_GeneralNote; class IGESDimen_LeaderArrow; class gp_Pnt2d; diff --git a/src/IGESDimen/IGESDimen_DimensionDisplayData.cxx b/src/IGESDimen/IGESDimen_DimensionDisplayData.cxx index b3ecd8b66f..350e0d08c2 100644 --- a/src/IGESDimen/IGESDimen_DimensionDisplayData.cxx +++ b/src/IGESDimen/IGESDimen_DimensionDisplayData.cxx @@ -18,7 +18,6 @@ #include #include -#include #include #include diff --git a/src/IGESDimen/IGESDimen_DimensionDisplayData.hxx b/src/IGESDimen/IGESDimen_DimensionDisplayData.hxx index 0a78f38997..c1385c7d3e 100644 --- a/src/IGESDimen/IGESDimen_DimensionDisplayData.hxx +++ b/src/IGESDimen/IGESDimen_DimensionDisplayData.hxx @@ -18,7 +18,6 @@ #define _IGESDimen_DimensionDisplayData_HeaderFile #include -#include #include #include diff --git a/src/IGESDimen/IGESDimen_DimensionTolerance.hxx b/src/IGESDimen/IGESDimen_DimensionTolerance.hxx index 640876854e..74c013dc65 100644 --- a/src/IGESDimen/IGESDimen_DimensionTolerance.hxx +++ b/src/IGESDimen/IGESDimen_DimensionTolerance.hxx @@ -18,11 +18,9 @@ #define _IGESDimen_DimensionTolerance_HeaderFile #include -#include #include #include -#include #include diff --git a/src/IGESDimen/IGESDimen_DimensionUnits.hxx b/src/IGESDimen/IGESDimen_DimensionUnits.hxx index 6f780ef2d9..ff4e2154c9 100644 --- a/src/IGESDimen/IGESDimen_DimensionUnits.hxx +++ b/src/IGESDimen/IGESDimen_DimensionUnits.hxx @@ -18,7 +18,6 @@ #define _IGESDimen_DimensionUnits_HeaderFile #include -#include #include #include diff --git a/src/IGESDimen/IGESDimen_DimensionedGeometry.cxx b/src/IGESDimen/IGESDimen_DimensionedGeometry.cxx index deccd2f72c..717fec35aa 100644 --- a/src/IGESDimen/IGESDimen_DimensionedGeometry.cxx +++ b/src/IGESDimen/IGESDimen_DimensionedGeometry.cxx @@ -16,10 +16,8 @@ //-------------------------------------------------------------------- //-------------------------------------------------------------------- -#include #include #include -#include #include IMPLEMENT_STANDARD_RTTIEXT(IGESDimen_DimensionedGeometry,IGESData_IGESEntity) diff --git a/src/IGESDimen/IGESDimen_DimensionedGeometry.hxx b/src/IGESDimen/IGESDimen_DimensionedGeometry.hxx index f88721c77e..a007ad48a6 100644 --- a/src/IGESDimen/IGESDimen_DimensionedGeometry.hxx +++ b/src/IGESDimen/IGESDimen_DimensionedGeometry.hxx @@ -18,7 +18,6 @@ #define _IGESDimen_DimensionedGeometry_HeaderFile #include -#include #include #include diff --git a/src/IGESDimen/IGESDimen_FlagNote.cxx b/src/IGESDimen/IGESDimen_FlagNote.cxx index ca892f7ba6..b7d6392480 100644 --- a/src/IGESDimen/IGESDimen_FlagNote.cxx +++ b/src/IGESDimen/IGESDimen_FlagNote.cxx @@ -23,7 +23,6 @@ #include #include #include -#include #include IMPLEMENT_STANDARD_RTTIEXT(IGESDimen_FlagNote,IGESData_IGESEntity) diff --git a/src/IGESDimen/IGESDimen_FlagNote.hxx b/src/IGESDimen/IGESDimen_FlagNote.hxx index d79b31ef77..c70c9fc14b 100644 --- a/src/IGESDimen/IGESDimen_FlagNote.hxx +++ b/src/IGESDimen/IGESDimen_FlagNote.hxx @@ -21,7 +21,6 @@ #include #include -#include #include #include #include diff --git a/src/IGESDimen/IGESDimen_GeneralLabel.cxx b/src/IGESDimen/IGESDimen_GeneralLabel.cxx index a1bc1b7807..a6a8a6b4d1 100644 --- a/src/IGESDimen/IGESDimen_GeneralLabel.cxx +++ b/src/IGESDimen/IGESDimen_GeneralLabel.cxx @@ -20,7 +20,6 @@ #include #include #include -#include #include IMPLEMENT_STANDARD_RTTIEXT(IGESDimen_GeneralLabel,IGESData_IGESEntity) diff --git a/src/IGESDimen/IGESDimen_GeneralLabel.hxx b/src/IGESDimen/IGESDimen_GeneralLabel.hxx index bd33117742..336dca324c 100644 --- a/src/IGESDimen/IGESDimen_GeneralLabel.hxx +++ b/src/IGESDimen/IGESDimen_GeneralLabel.hxx @@ -18,7 +18,6 @@ #define _IGESDimen_GeneralLabel_HeaderFile #include -#include #include #include diff --git a/src/IGESDimen/IGESDimen_GeneralModule.cxx b/src/IGESDimen/IGESDimen_GeneralModule.cxx index 35dd928001..202ba65220 100644 --- a/src/IGESDimen/IGESDimen_GeneralModule.cxx +++ b/src/IGESDimen/IGESDimen_GeneralModule.cxx @@ -13,7 +13,6 @@ #include -#include #include #include #include diff --git a/src/IGESDimen/IGESDimen_GeneralModule.hxx b/src/IGESDimen/IGESDimen_GeneralModule.hxx index 389c749b6e..fbfe5eec95 100644 --- a/src/IGESDimen/IGESDimen_GeneralModule.hxx +++ b/src/IGESDimen/IGESDimen_GeneralModule.hxx @@ -22,7 +22,6 @@ #include #include -#include class IGESData_IGESEntity; class Interface_EntityIterator; class IGESData_DirChecker; diff --git a/src/IGESDimen/IGESDimen_GeneralNote.hxx b/src/IGESDimen/IGESDimen_GeneralNote.hxx index 28e50ecb8f..7e8370723f 100644 --- a/src/IGESDimen/IGESDimen_GeneralNote.hxx +++ b/src/IGESDimen/IGESDimen_GeneralNote.hxx @@ -20,15 +20,12 @@ #include #include -#include #include #include #include #include #include #include -#include -#include class IGESGraph_TextFontDef; class gp_Pnt; class TCollection_HAsciiString; diff --git a/src/IGESDimen/IGESDimen_GeneralSymbol.cxx b/src/IGESDimen/IGESDimen_GeneralSymbol.cxx index 81293bab4f..5749187be0 100644 --- a/src/IGESDimen/IGESDimen_GeneralSymbol.cxx +++ b/src/IGESDimen/IGESDimen_GeneralSymbol.cxx @@ -16,7 +16,6 @@ //-------------------------------------------------------------------- //-------------------------------------------------------------------- -#include #include #include #include diff --git a/src/IGESDimen/IGESDimen_GeneralSymbol.hxx b/src/IGESDimen/IGESDimen_GeneralSymbol.hxx index 5a1fbf57c0..39c8753965 100644 --- a/src/IGESDimen/IGESDimen_GeneralSymbol.hxx +++ b/src/IGESDimen/IGESDimen_GeneralSymbol.hxx @@ -24,7 +24,6 @@ #include #include #include -#include class IGESDimen_GeneralNote; class IGESDimen_LeaderArrow; diff --git a/src/IGESDimen/IGESDimen_HArray1OfGeneralNote.hxx b/src/IGESDimen/IGESDimen_HArray1OfGeneralNote.hxx index b749b61295..9422dd0ea0 100644 --- a/src/IGESDimen/IGESDimen_HArray1OfGeneralNote.hxx +++ b/src/IGESDimen/IGESDimen_HArray1OfGeneralNote.hxx @@ -17,7 +17,6 @@ #ifndef IGESDimen_HArray1OfGeneralNote_HeaderFile #define IGESDimen_HArray1OfGeneralNote_HeaderFile -#include #include #include diff --git a/src/IGESDimen/IGESDimen_HArray1OfLeaderArrow.hxx b/src/IGESDimen/IGESDimen_HArray1OfLeaderArrow.hxx index 9dafba8a25..17db362f56 100644 --- a/src/IGESDimen/IGESDimen_HArray1OfLeaderArrow.hxx +++ b/src/IGESDimen/IGESDimen_HArray1OfLeaderArrow.hxx @@ -17,7 +17,6 @@ #ifndef IGESDimen_HArray1OfLeaderArrow_HeaderFile #define IGESDimen_HArray1OfLeaderArrow_HeaderFile -#include #include #include diff --git a/src/IGESDimen/IGESDimen_LeaderArrow.hxx b/src/IGESDimen/IGESDimen_LeaderArrow.hxx index 0551cf04d4..b46076a775 100644 --- a/src/IGESDimen/IGESDimen_LeaderArrow.hxx +++ b/src/IGESDimen/IGESDimen_LeaderArrow.hxx @@ -20,7 +20,6 @@ #include #include -#include #include #include #include diff --git a/src/IGESDimen/IGESDimen_LinearDimension.hxx b/src/IGESDimen/IGESDimen_LinearDimension.hxx index 2ae46e72ae..bb540740e3 100644 --- a/src/IGESDimen/IGESDimen_LinearDimension.hxx +++ b/src/IGESDimen/IGESDimen_LinearDimension.hxx @@ -22,7 +22,6 @@ #include #include -#include class IGESDimen_GeneralNote; class IGESDimen_LeaderArrow; class IGESDimen_WitnessLine; diff --git a/src/IGESDimen/IGESDimen_NewDimensionedGeometry.cxx b/src/IGESDimen/IGESDimen_NewDimensionedGeometry.cxx index 4705cc35e9..6f55684d16 100644 --- a/src/IGESDimen/IGESDimen_NewDimensionedGeometry.cxx +++ b/src/IGESDimen/IGESDimen_NewDimensionedGeometry.cxx @@ -18,11 +18,9 @@ #include #include -#include #include #include #include -#include #include IMPLEMENT_STANDARD_RTTIEXT(IGESDimen_NewDimensionedGeometry,IGESData_IGESEntity) diff --git a/src/IGESDimen/IGESDimen_NewDimensionedGeometry.hxx b/src/IGESDimen/IGESDimen_NewDimensionedGeometry.hxx index 962bc828ca..083246e785 100644 --- a/src/IGESDimen/IGESDimen_NewDimensionedGeometry.hxx +++ b/src/IGESDimen/IGESDimen_NewDimensionedGeometry.hxx @@ -21,7 +21,6 @@ #include #include -#include #include #include #include diff --git a/src/IGESDimen/IGESDimen_NewGeneralNote.cxx b/src/IGESDimen/IGESDimen_NewGeneralNote.cxx index da15024a20..55dd6b7647 100644 --- a/src/IGESDimen/IGESDimen_NewGeneralNote.cxx +++ b/src/IGESDimen/IGESDimen_NewGeneralNote.cxx @@ -19,10 +19,8 @@ #include #include #include -#include #include #include -#include #include #include diff --git a/src/IGESDimen/IGESDimen_NewGeneralNote.hxx b/src/IGESDimen/IGESDimen_NewGeneralNote.hxx index 8ed4c7bcaa..1e3e1555eb 100644 --- a/src/IGESDimen/IGESDimen_NewGeneralNote.hxx +++ b/src/IGESDimen/IGESDimen_NewGeneralNote.hxx @@ -20,7 +20,6 @@ #include #include -#include #include #include #include @@ -29,7 +28,6 @@ #include #include #include -#include class gp_Pnt; class TCollection_HAsciiString; diff --git a/src/IGESDimen/IGESDimen_OrdinateDimension.hxx b/src/IGESDimen/IGESDimen_OrdinateDimension.hxx index e0c9816a42..016e32bacf 100644 --- a/src/IGESDimen/IGESDimen_OrdinateDimension.hxx +++ b/src/IGESDimen/IGESDimen_OrdinateDimension.hxx @@ -20,7 +20,6 @@ #include #include -#include #include class IGESDimen_GeneralNote; class IGESDimen_WitnessLine; diff --git a/src/IGESDimen/IGESDimen_PointDimension.cxx b/src/IGESDimen/IGESDimen_PointDimension.cxx index a999f7d9f9..7c3ca5e7f9 100644 --- a/src/IGESDimen/IGESDimen_PointDimension.cxx +++ b/src/IGESDimen/IGESDimen_PointDimension.cxx @@ -16,7 +16,6 @@ //-------------------------------------------------------------------- //-------------------------------------------------------------------- -#include #include #include #include diff --git a/src/IGESDimen/IGESDimen_Protocol.hxx b/src/IGESDimen/IGESDimen_Protocol.hxx index 705e069f5f..231fa6afda 100644 --- a/src/IGESDimen/IGESDimen_Protocol.hxx +++ b/src/IGESDimen/IGESDimen_Protocol.hxx @@ -22,7 +22,6 @@ #include #include -#include class Interface_Protocol; diff --git a/src/IGESDimen/IGESDimen_RadiusDimension.hxx b/src/IGESDimen/IGESDimen_RadiusDimension.hxx index 11be872653..1b5505165c 100644 --- a/src/IGESDimen/IGESDimen_RadiusDimension.hxx +++ b/src/IGESDimen/IGESDimen_RadiusDimension.hxx @@ -23,7 +23,6 @@ #include #include #include -#include class IGESDimen_GeneralNote; class IGESDimen_LeaderArrow; class gp_Pnt2d; diff --git a/src/IGESDimen/IGESDimen_ReadWriteModule.cxx b/src/IGESDimen/IGESDimen_ReadWriteModule.cxx index 6c1c6be7d0..cd8cd3ee30 100644 --- a/src/IGESDimen/IGESDimen_ReadWriteModule.cxx +++ b/src/IGESDimen/IGESDimen_ReadWriteModule.cxx @@ -12,7 +12,6 @@ // commercial license or contractual agreement. -#include #include #include #include @@ -64,7 +63,6 @@ #include #include #include -#include #include IMPLEMENT_STANDARD_RTTIEXT(IGESDimen_ReadWriteModule,IGESData_ReadWriteModule) diff --git a/src/IGESDimen/IGESDimen_Section.hxx b/src/IGESDimen/IGESDimen_Section.hxx index a62d5e00cd..a42f000ff6 100644 --- a/src/IGESDimen/IGESDimen_Section.hxx +++ b/src/IGESDimen/IGESDimen_Section.hxx @@ -21,7 +21,6 @@ #include #include -#include #include #include class gp_Pnt; diff --git a/src/IGESDimen/IGESDimen_SectionedArea.cxx b/src/IGESDimen/IGESDimen_SectionedArea.cxx index f0dd3f8b48..50e4e566c0 100644 --- a/src/IGESDimen/IGESDimen_SectionedArea.cxx +++ b/src/IGESDimen/IGESDimen_SectionedArea.cxx @@ -19,10 +19,8 @@ #include #include #include -#include #include #include -#include #include IMPLEMENT_STANDARD_RTTIEXT(IGESDimen_SectionedArea,IGESData_IGESEntity) diff --git a/src/IGESDimen/IGESDimen_SectionedArea.hxx b/src/IGESDimen/IGESDimen_SectionedArea.hxx index 116c4da430..607d54fbe2 100644 --- a/src/IGESDimen/IGESDimen_SectionedArea.hxx +++ b/src/IGESDimen/IGESDimen_SectionedArea.hxx @@ -22,10 +22,8 @@ #include #include -#include #include #include -#include class gp_Pnt; diff --git a/src/IGESDimen/IGESDimen_SpecificModule.cxx b/src/IGESDimen/IGESDimen_SpecificModule.cxx index 184674b0c8..89c1f8f8c9 100644 --- a/src/IGESDimen/IGESDimen_SpecificModule.cxx +++ b/src/IGESDimen/IGESDimen_SpecificModule.cxx @@ -13,7 +13,6 @@ #include -#include #include #include #include diff --git a/src/IGESDimen/IGESDimen_SpecificModule.hxx b/src/IGESDimen/IGESDimen_SpecificModule.hxx index 64d51a2af5..6ada7c390b 100644 --- a/src/IGESDimen/IGESDimen_SpecificModule.hxx +++ b/src/IGESDimen/IGESDimen_SpecificModule.hxx @@ -22,7 +22,6 @@ #include #include -#include class IGESData_IGESEntity; class IGESData_IGESDumper; diff --git a/src/IGESDimen/IGESDimen_ToolAngularDimension.cxx b/src/IGESDimen/IGESDimen_ToolAngularDimension.cxx index 01bd4ed74f..ffda840618 100644 --- a/src/IGESDimen/IGESDimen_ToolAngularDimension.cxx +++ b/src/IGESDimen/IGESDimen_ToolAngularDimension.cxx @@ -23,7 +23,6 @@ #include #include #include -#include #include #include #include diff --git a/src/IGESDimen/IGESDimen_ToolBasicDimension.cxx b/src/IGESDimen/IGESDimen_ToolBasicDimension.cxx index 7ca95b5a0c..705065f8b0 100644 --- a/src/IGESDimen/IGESDimen_ToolBasicDimension.cxx +++ b/src/IGESDimen/IGESDimen_ToolBasicDimension.cxx @@ -23,7 +23,6 @@ #include #include #include -#include #include #include #include diff --git a/src/IGESDimen/IGESDimen_ToolBasicDimension.hxx b/src/IGESDimen/IGESDimen_ToolBasicDimension.hxx index 980dca08b3..b97dd280dc 100644 --- a/src/IGESDimen/IGESDimen_ToolBasicDimension.hxx +++ b/src/IGESDimen/IGESDimen_ToolBasicDimension.hxx @@ -21,7 +21,6 @@ #include #include -#include #include class IGESDimen_BasicDimension; class IGESData_IGESReaderData; diff --git a/src/IGESDimen/IGESDimen_ToolCenterLine.cxx b/src/IGESDimen/IGESDimen_ToolCenterLine.cxx index e67cfbd9fc..b9beb41dd4 100644 --- a/src/IGESDimen/IGESDimen_ToolCenterLine.cxx +++ b/src/IGESDimen/IGESDimen_ToolCenterLine.cxx @@ -24,14 +24,12 @@ #include #include #include -#include #include #include #include #include #include #include -#include #include #include #include diff --git a/src/IGESDimen/IGESDimen_ToolCenterLine.hxx b/src/IGESDimen/IGESDimen_ToolCenterLine.hxx index 87221e0bae..6ac5ac1e3d 100644 --- a/src/IGESDimen/IGESDimen_ToolCenterLine.hxx +++ b/src/IGESDimen/IGESDimen_ToolCenterLine.hxx @@ -21,7 +21,6 @@ #include #include -#include #include class IGESDimen_CenterLine; class IGESData_IGESReaderData; diff --git a/src/IGESDimen/IGESDimen_ToolCurveDimension.cxx b/src/IGESDimen/IGESDimen_ToolCurveDimension.cxx index 75490ef5c9..8de88a2e67 100644 --- a/src/IGESDimen/IGESDimen_ToolCurveDimension.cxx +++ b/src/IGESDimen/IGESDimen_ToolCurveDimension.cxx @@ -18,10 +18,8 @@ #include #include -#include #include #include -#include #include #include #include @@ -34,8 +32,6 @@ #include #include #include -#include -#include IGESDimen_ToolCurveDimension::IGESDimen_ToolCurveDimension () { } diff --git a/src/IGESDimen/IGESDimen_ToolDiameterDimension.cxx b/src/IGESDimen/IGESDimen_ToolDiameterDimension.cxx index 04aafef618..6a2ebf953d 100644 --- a/src/IGESDimen/IGESDimen_ToolDiameterDimension.cxx +++ b/src/IGESDimen/IGESDimen_ToolDiameterDimension.cxx @@ -23,7 +23,6 @@ #include #include #include -#include #include #include #include diff --git a/src/IGESDimen/IGESDimen_ToolDimensionDisplayData.cxx b/src/IGESDimen/IGESDimen_ToolDimensionDisplayData.cxx index 3d339a67ee..d239362753 100644 --- a/src/IGESDimen/IGESDimen_ToolDimensionDisplayData.cxx +++ b/src/IGESDimen/IGESDimen_ToolDimensionDisplayData.cxx @@ -21,17 +21,14 @@ #include #include #include -#include #include #include #include #include #include #include -#include #include #include -#include #include #include diff --git a/src/IGESDimen/IGESDimen_ToolDimensionDisplayData.hxx b/src/IGESDimen/IGESDimen_ToolDimensionDisplayData.hxx index 8c303d369b..6382b2beb7 100644 --- a/src/IGESDimen/IGESDimen_ToolDimensionDisplayData.hxx +++ b/src/IGESDimen/IGESDimen_ToolDimensionDisplayData.hxx @@ -21,7 +21,6 @@ #include #include -#include #include class IGESDimen_DimensionDisplayData; class IGESData_IGESReaderData; diff --git a/src/IGESDimen/IGESDimen_ToolDimensionTolerance.cxx b/src/IGESDimen/IGESDimen_ToolDimensionTolerance.cxx index 47a0f5af18..195d146f8a 100644 --- a/src/IGESDimen/IGESDimen_ToolDimensionTolerance.cxx +++ b/src/IGESDimen/IGESDimen_ToolDimensionTolerance.cxx @@ -20,7 +20,6 @@ #include #include #include -#include #include #include #include @@ -28,8 +27,6 @@ #include #include #include -#include -#include IGESDimen_ToolDimensionTolerance::IGESDimen_ToolDimensionTolerance () { } diff --git a/src/IGESDimen/IGESDimen_ToolDimensionTolerance.hxx b/src/IGESDimen/IGESDimen_ToolDimensionTolerance.hxx index f83cfff28f..0c30eaf465 100644 --- a/src/IGESDimen/IGESDimen_ToolDimensionTolerance.hxx +++ b/src/IGESDimen/IGESDimen_ToolDimensionTolerance.hxx @@ -21,7 +21,6 @@ #include #include -#include #include class IGESDimen_DimensionTolerance; class IGESData_IGESReaderData; diff --git a/src/IGESDimen/IGESDimen_ToolDimensionUnits.cxx b/src/IGESDimen/IGESDimen_ToolDimensionUnits.cxx index 653bf09d8d..3ae37b44fa 100644 --- a/src/IGESDimen/IGESDimen_ToolDimensionUnits.cxx +++ b/src/IGESDimen/IGESDimen_ToolDimensionUnits.cxx @@ -21,17 +21,14 @@ #include #include #include -#include #include #include #include #include #include #include -#include #include #include -#include #include IGESDimen_ToolDimensionUnits::IGESDimen_ToolDimensionUnits () { } diff --git a/src/IGESDimen/IGESDimen_ToolDimensionUnits.hxx b/src/IGESDimen/IGESDimen_ToolDimensionUnits.hxx index 355315afc7..80eef58557 100644 --- a/src/IGESDimen/IGESDimen_ToolDimensionUnits.hxx +++ b/src/IGESDimen/IGESDimen_ToolDimensionUnits.hxx @@ -21,7 +21,6 @@ #include #include -#include #include class IGESDimen_DimensionUnits; class IGESData_IGESReaderData; diff --git a/src/IGESDimen/IGESDimen_ToolDimensionedGeometry.cxx b/src/IGESDimen/IGESDimen_ToolDimensionedGeometry.cxx index b67e7e3271..6ed01db491 100644 --- a/src/IGESDimen/IGESDimen_ToolDimensionedGeometry.cxx +++ b/src/IGESDimen/IGESDimen_ToolDimensionedGeometry.cxx @@ -18,12 +18,9 @@ #include #include -#include #include -#include #include #include -#include #include #include #include @@ -32,7 +29,6 @@ #include #include #include -#include IGESDimen_ToolDimensionedGeometry::IGESDimen_ToolDimensionedGeometry () { } diff --git a/src/IGESDimen/IGESDimen_ToolDimensionedGeometry.hxx b/src/IGESDimen/IGESDimen_ToolDimensionedGeometry.hxx index 27ddaa9412..d49086e87e 100644 --- a/src/IGESDimen/IGESDimen_ToolDimensionedGeometry.hxx +++ b/src/IGESDimen/IGESDimen_ToolDimensionedGeometry.hxx @@ -21,7 +21,6 @@ #include #include -#include #include class IGESDimen_DimensionedGeometry; class IGESData_IGESReaderData; diff --git a/src/IGESDimen/IGESDimen_ToolFlagNote.cxx b/src/IGESDimen/IGESDimen_ToolFlagNote.cxx index 355525a5bc..5dffe106fd 100644 --- a/src/IGESDimen/IGESDimen_ToolFlagNote.cxx +++ b/src/IGESDimen/IGESDimen_ToolFlagNote.cxx @@ -22,7 +22,6 @@ #include #include #include -#include #include #include #include diff --git a/src/IGESDimen/IGESDimen_ToolGeneralLabel.cxx b/src/IGESDimen/IGESDimen_ToolGeneralLabel.cxx index a90e2d516b..ca2f17d19c 100644 --- a/src/IGESDimen/IGESDimen_ToolGeneralLabel.cxx +++ b/src/IGESDimen/IGESDimen_ToolGeneralLabel.cxx @@ -21,7 +21,6 @@ #include #include #include -#include #include #include #include @@ -34,7 +33,6 @@ #include #include #include -#include IGESDimen_ToolGeneralLabel::IGESDimen_ToolGeneralLabel () { } diff --git a/src/IGESDimen/IGESDimen_ToolGeneralNote.cxx b/src/IGESDimen/IGESDimen_ToolGeneralNote.cxx index 4f72799f3c..834f632d5c 100644 --- a/src/IGESDimen/IGESDimen_ToolGeneralNote.cxx +++ b/src/IGESDimen/IGESDimen_ToolGeneralNote.cxx @@ -23,7 +23,6 @@ #include #include #include -#include #include #include #include diff --git a/src/IGESDimen/IGESDimen_ToolGeneralSymbol.cxx b/src/IGESDimen/IGESDimen_ToolGeneralSymbol.cxx index b313127b14..139969f747 100644 --- a/src/IGESDimen/IGESDimen_ToolGeneralSymbol.cxx +++ b/src/IGESDimen/IGESDimen_ToolGeneralSymbol.cxx @@ -18,12 +18,9 @@ #include #include -#include #include -#include #include #include -#include #include #include #include @@ -36,7 +33,6 @@ #include #include #include -#include IGESDimen_ToolGeneralSymbol::IGESDimen_ToolGeneralSymbol () { } diff --git a/src/IGESDimen/IGESDimen_ToolLeaderArrow.cxx b/src/IGESDimen/IGESDimen_ToolLeaderArrow.cxx index 8745ad73b9..47962c0c0d 100644 --- a/src/IGESDimen/IGESDimen_ToolLeaderArrow.cxx +++ b/src/IGESDimen/IGESDimen_ToolLeaderArrow.cxx @@ -23,14 +23,12 @@ #include #include #include -#include #include #include #include #include #include #include -#include #include #include #include diff --git a/src/IGESDimen/IGESDimen_ToolLinearDimension.cxx b/src/IGESDimen/IGESDimen_ToolLinearDimension.cxx index b539708969..2f641358f0 100644 --- a/src/IGESDimen/IGESDimen_ToolLinearDimension.cxx +++ b/src/IGESDimen/IGESDimen_ToolLinearDimension.cxx @@ -20,7 +20,6 @@ #include #include #include -#include #include #include #include @@ -32,7 +31,6 @@ #include #include #include -#include IGESDimen_ToolLinearDimension::IGESDimen_ToolLinearDimension () { } diff --git a/src/IGESDimen/IGESDimen_ToolNewDimensionedGeometry.cxx b/src/IGESDimen/IGESDimen_ToolNewDimensionedGeometry.cxx index 9f9299f029..be0ba61d96 100644 --- a/src/IGESDimen/IGESDimen_ToolNewDimensionedGeometry.cxx +++ b/src/IGESDimen/IGESDimen_ToolNewDimensionedGeometry.cxx @@ -20,12 +20,9 @@ #include #include #include -#include #include -#include #include #include -#include #include #include #include diff --git a/src/IGESDimen/IGESDimen_ToolNewDimensionedGeometry.hxx b/src/IGESDimen/IGESDimen_ToolNewDimensionedGeometry.hxx index 91966cad68..25254680fe 100644 --- a/src/IGESDimen/IGESDimen_ToolNewDimensionedGeometry.hxx +++ b/src/IGESDimen/IGESDimen_ToolNewDimensionedGeometry.hxx @@ -21,7 +21,6 @@ #include #include -#include #include class IGESDimen_NewDimensionedGeometry; class IGESData_IGESReaderData; diff --git a/src/IGESDimen/IGESDimen_ToolNewGeneralNote.cxx b/src/IGESDimen/IGESDimen_ToolNewGeneralNote.cxx index 2dbbd06afb..3dbd10f733 100644 --- a/src/IGESDimen/IGESDimen_ToolNewGeneralNote.cxx +++ b/src/IGESDimen/IGESDimen_ToolNewGeneralNote.cxx @@ -19,12 +19,9 @@ #include #include #include -#include #include -#include #include #include -#include #include #include #include diff --git a/src/IGESDimen/IGESDimen_ToolOrdinateDimension.cxx b/src/IGESDimen/IGESDimen_ToolOrdinateDimension.cxx index 9b53b23102..efeed470ce 100644 --- a/src/IGESDimen/IGESDimen_ToolOrdinateDimension.cxx +++ b/src/IGESDimen/IGESDimen_ToolOrdinateDimension.cxx @@ -20,7 +20,6 @@ #include #include #include -#include #include #include #include @@ -32,8 +31,6 @@ #include #include #include -#include -#include IGESDimen_ToolOrdinateDimension::IGESDimen_ToolOrdinateDimension () { } diff --git a/src/IGESDimen/IGESDimen_ToolPointDimension.cxx b/src/IGESDimen/IGESDimen_ToolPointDimension.cxx index 55d019f4ac..7bc0217f30 100644 --- a/src/IGESDimen/IGESDimen_ToolPointDimension.cxx +++ b/src/IGESDimen/IGESDimen_ToolPointDimension.cxx @@ -18,10 +18,8 @@ #include #include -#include #include #include -#include #include #include #include @@ -32,8 +30,6 @@ #include #include #include -#include -#include IGESDimen_ToolPointDimension::IGESDimen_ToolPointDimension () { } diff --git a/src/IGESDimen/IGESDimen_ToolRadiusDimension.cxx b/src/IGESDimen/IGESDimen_ToolRadiusDimension.cxx index 903ba2c55e..e3adab3419 100644 --- a/src/IGESDimen/IGESDimen_ToolRadiusDimension.cxx +++ b/src/IGESDimen/IGESDimen_ToolRadiusDimension.cxx @@ -23,7 +23,6 @@ #include #include #include -#include #include #include #include diff --git a/src/IGESDimen/IGESDimen_ToolSection.cxx b/src/IGESDimen/IGESDimen_ToolSection.cxx index 1a1d223f6f..36eaf5f38c 100644 --- a/src/IGESDimen/IGESDimen_ToolSection.cxx +++ b/src/IGESDimen/IGESDimen_ToolSection.cxx @@ -24,14 +24,12 @@ #include #include #include -#include #include #include #include #include #include #include -#include #include #include #include diff --git a/src/IGESDimen/IGESDimen_ToolSection.hxx b/src/IGESDimen/IGESDimen_ToolSection.hxx index 4cbd876025..a5eb9d7390 100644 --- a/src/IGESDimen/IGESDimen_ToolSection.hxx +++ b/src/IGESDimen/IGESDimen_ToolSection.hxx @@ -21,7 +21,6 @@ #include #include -#include #include class IGESDimen_Section; class IGESData_IGESReaderData; diff --git a/src/IGESDimen/IGESDimen_ToolSectionedArea.cxx b/src/IGESDimen/IGESDimen_ToolSectionedArea.cxx index e02ca96da6..8840c0818b 100644 --- a/src/IGESDimen/IGESDimen_ToolSectionedArea.cxx +++ b/src/IGESDimen/IGESDimen_ToolSectionedArea.cxx @@ -20,12 +20,9 @@ #include #include #include -#include #include -#include #include #include -#include #include #include #include diff --git a/src/IGESDimen/IGESDimen_ToolWitnessLine.cxx b/src/IGESDimen/IGESDimen_ToolWitnessLine.cxx index 4f38fc646a..836ae65554 100644 --- a/src/IGESDimen/IGESDimen_ToolWitnessLine.cxx +++ b/src/IGESDimen/IGESDimen_ToolWitnessLine.cxx @@ -24,14 +24,12 @@ #include #include #include -#include #include #include #include #include #include #include -#include #include #include #include diff --git a/src/IGESDimen/IGESDimen_ToolWitnessLine.hxx b/src/IGESDimen/IGESDimen_ToolWitnessLine.hxx index 87542f1eba..ce4032c647 100644 --- a/src/IGESDimen/IGESDimen_ToolWitnessLine.hxx +++ b/src/IGESDimen/IGESDimen_ToolWitnessLine.hxx @@ -21,7 +21,6 @@ #include #include -#include #include class IGESDimen_WitnessLine; class IGESData_IGESReaderData; diff --git a/src/IGESDimen/IGESDimen_WitnessLine.cxx b/src/IGESDimen/IGESDimen_WitnessLine.cxx index 23e9dc6a3a..8811d8c940 100644 --- a/src/IGESDimen/IGESDimen_WitnessLine.cxx +++ b/src/IGESDimen/IGESDimen_WitnessLine.cxx @@ -21,7 +21,6 @@ #include #include #include -#include #include IMPLEMENT_STANDARD_RTTIEXT(IGESDimen_WitnessLine,IGESData_IGESEntity) diff --git a/src/IGESDimen/IGESDimen_WitnessLine.hxx b/src/IGESDimen/IGESDimen_WitnessLine.hxx index 136f2f4845..ef88e14afc 100644 --- a/src/IGESDimen/IGESDimen_WitnessLine.hxx +++ b/src/IGESDimen/IGESDimen_WitnessLine.hxx @@ -21,7 +21,6 @@ #include #include -#include #include #include class gp_Pnt; diff --git a/src/IGESDraw/IGESDraw_CircArraySubfigure.cxx b/src/IGESDraw/IGESDraw_CircArraySubfigure.cxx index 4b4fd185e8..5e249709ec 100644 --- a/src/IGESDraw/IGESDraw_CircArraySubfigure.cxx +++ b/src/IGESDraw/IGESDraw_CircArraySubfigure.cxx @@ -19,10 +19,8 @@ #include #include #include -#include #include #include -#include #include IMPLEMENT_STANDARD_RTTIEXT(IGESDraw_CircArraySubfigure,IGESData_IGESEntity) diff --git a/src/IGESDraw/IGESDraw_CircArraySubfigure.hxx b/src/IGESDraw/IGESDraw_CircArraySubfigure.hxx index ffb8e1ae29..1291a4776f 100644 --- a/src/IGESDraw/IGESDraw_CircArraySubfigure.hxx +++ b/src/IGESDraw/IGESDraw_CircArraySubfigure.hxx @@ -22,10 +22,8 @@ #include #include -#include #include #include -#include class gp_Pnt; diff --git a/src/IGESDraw/IGESDraw_ConnectPoint.cxx b/src/IGESDraw/IGESDraw_ConnectPoint.cxx index 138a5922b8..ded1685bbd 100644 --- a/src/IGESDraw/IGESDraw_ConnectPoint.cxx +++ b/src/IGESDraw/IGESDraw_ConnectPoint.cxx @@ -19,7 +19,6 @@ #include #include #include -#include #include #include #include diff --git a/src/IGESDraw/IGESDraw_ConnectPoint.hxx b/src/IGESDraw/IGESDraw_ConnectPoint.hxx index 5c05bda0a1..dece259bd5 100644 --- a/src/IGESDraw/IGESDraw_ConnectPoint.hxx +++ b/src/IGESDraw/IGESDraw_ConnectPoint.hxx @@ -23,7 +23,6 @@ #include #include #include -#include class TCollection_HAsciiString; class IGESGraph_TextDisplayTemplate; class gp_Pnt; diff --git a/src/IGESDraw/IGESDraw_Drawing.cxx b/src/IGESDraw/IGESDraw_Drawing.cxx index fed0b054f0..2f958f0c9f 100644 --- a/src/IGESDraw/IGESDraw_Drawing.cxx +++ b/src/IGESDraw/IGESDraw_Drawing.cxx @@ -19,8 +19,6 @@ #include #include #include -#include -#include #include #include #include @@ -28,7 +26,6 @@ #include #include #include -#include #include IMPLEMENT_STANDARD_RTTIEXT(IGESDraw_Drawing,IGESData_IGESEntity) diff --git a/src/IGESDraw/IGESDraw_Drawing.hxx b/src/IGESDraw/IGESDraw_Drawing.hxx index b80f6d8b4e..a3ef209cde 100644 --- a/src/IGESDraw/IGESDraw_Drawing.hxx +++ b/src/IGESDraw/IGESDraw_Drawing.hxx @@ -25,8 +25,6 @@ #include #include #include -#include -#include class IGESData_ViewKindEntity; class gp_Pnt2d; class gp_XY; diff --git a/src/IGESDraw/IGESDraw_DrawingWithRotation.cxx b/src/IGESDraw/IGESDraw_DrawingWithRotation.cxx index 9a20a498ed..f49ff86b8a 100644 --- a/src/IGESDraw/IGESDraw_DrawingWithRotation.cxx +++ b/src/IGESDraw/IGESDraw_DrawingWithRotation.cxx @@ -19,8 +19,6 @@ #include #include #include -#include -#include #include #include #include @@ -28,7 +26,6 @@ #include #include #include -#include #include IMPLEMENT_STANDARD_RTTIEXT(IGESDraw_DrawingWithRotation,IGESData_IGESEntity) diff --git a/src/IGESDraw/IGESDraw_DrawingWithRotation.hxx b/src/IGESDraw/IGESDraw_DrawingWithRotation.hxx index 2a9fc5dc12..7d4df599b7 100644 --- a/src/IGESDraw/IGESDraw_DrawingWithRotation.hxx +++ b/src/IGESDraw/IGESDraw_DrawingWithRotation.hxx @@ -26,8 +26,6 @@ #include #include #include -#include -#include class IGESData_ViewKindEntity; class gp_Pnt2d; class gp_XY; diff --git a/src/IGESDraw/IGESDraw_GeneralModule.cxx b/src/IGESDraw/IGESDraw_GeneralModule.cxx index bb0cca64a8..230025da8c 100644 --- a/src/IGESDraw/IGESDraw_GeneralModule.cxx +++ b/src/IGESDraw/IGESDraw_GeneralModule.cxx @@ -13,9 +13,7 @@ #include -#include #include -#include #include #include #include diff --git a/src/IGESDraw/IGESDraw_GeneralModule.hxx b/src/IGESDraw/IGESDraw_GeneralModule.hxx index a3d3fe800d..c5cb95d12a 100644 --- a/src/IGESDraw/IGESDraw_GeneralModule.hxx +++ b/src/IGESDraw/IGESDraw_GeneralModule.hxx @@ -22,7 +22,6 @@ #include #include -#include class IGESData_IGESEntity; class Interface_EntityIterator; class IGESData_DirChecker; diff --git a/src/IGESDraw/IGESDraw_HArray1OfConnectPoint.hxx b/src/IGESDraw/IGESDraw_HArray1OfConnectPoint.hxx index 3007941ae2..a0cb9158dc 100644 --- a/src/IGESDraw/IGESDraw_HArray1OfConnectPoint.hxx +++ b/src/IGESDraw/IGESDraw_HArray1OfConnectPoint.hxx @@ -17,7 +17,6 @@ #ifndef IGESDraw_HArray1OfConnectPoint_HeaderFile #define IGESDraw_HArray1OfConnectPoint_HeaderFile -#include #include #include diff --git a/src/IGESDraw/IGESDraw_HArray1OfViewKindEntity.hxx b/src/IGESDraw/IGESDraw_HArray1OfViewKindEntity.hxx index 4718c7a311..fcee6b2f8a 100644 --- a/src/IGESDraw/IGESDraw_HArray1OfViewKindEntity.hxx +++ b/src/IGESDraw/IGESDraw_HArray1OfViewKindEntity.hxx @@ -17,7 +17,6 @@ #ifndef IGESDraw_HArray1OfViewKindEntity_HeaderFile #define IGESDraw_HArray1OfViewKindEntity_HeaderFile -#include #include #include diff --git a/src/IGESDraw/IGESDraw_LabelDisplay.cxx b/src/IGESDraw/IGESDraw_LabelDisplay.cxx index e20d74d214..1110dfa491 100644 --- a/src/IGESDraw/IGESDraw_LabelDisplay.cxx +++ b/src/IGESDraw/IGESDraw_LabelDisplay.cxx @@ -17,15 +17,11 @@ //-------------------------------------------------------------------- #include -#include -#include -#include #include #include #include #include #include -#include #include IMPLEMENT_STANDARD_RTTIEXT(IGESDraw_LabelDisplay,IGESData_LabelDisplayEntity) diff --git a/src/IGESDraw/IGESDraw_NetworkSubfigure.cxx b/src/IGESDraw/IGESDraw_NetworkSubfigure.cxx index 6ce9f23cf0..4b1a189b2e 100644 --- a/src/IGESDraw/IGESDraw_NetworkSubfigure.cxx +++ b/src/IGESDraw/IGESDraw_NetworkSubfigure.cxx @@ -18,12 +18,10 @@ #include #include -#include #include #include #include #include -#include #include #include diff --git a/src/IGESDraw/IGESDraw_NetworkSubfigure.hxx b/src/IGESDraw/IGESDraw_NetworkSubfigure.hxx index 8292582a8d..49208eab31 100644 --- a/src/IGESDraw/IGESDraw_NetworkSubfigure.hxx +++ b/src/IGESDraw/IGESDraw_NetworkSubfigure.hxx @@ -24,7 +24,6 @@ #include #include #include -#include class IGESDraw_NetworkSubfigureDef; class TCollection_HAsciiString; class IGESGraph_TextDisplayTemplate; diff --git a/src/IGESDraw/IGESDraw_NetworkSubfigureDef.cxx b/src/IGESDraw/IGESDraw_NetworkSubfigureDef.cxx index 7261959f58..976de3fd3b 100644 --- a/src/IGESDraw/IGESDraw_NetworkSubfigureDef.cxx +++ b/src/IGESDraw/IGESDraw_NetworkSubfigureDef.cxx @@ -16,12 +16,9 @@ //-------------------------------------------------------------------- //-------------------------------------------------------------------- -#include -#include #include #include #include -#include #include #include diff --git a/src/IGESDraw/IGESDraw_NetworkSubfigureDef.hxx b/src/IGESDraw/IGESDraw_NetworkSubfigureDef.hxx index 497fd7cf19..c5aaab9bb8 100644 --- a/src/IGESDraw/IGESDraw_NetworkSubfigureDef.hxx +++ b/src/IGESDraw/IGESDraw_NetworkSubfigureDef.hxx @@ -18,13 +18,11 @@ #define _IGESDraw_NetworkSubfigureDef_HeaderFile #include -#include #include #include #include #include -#include class TCollection_HAsciiString; class IGESGraph_TextDisplayTemplate; class IGESDraw_ConnectPoint; diff --git a/src/IGESDraw/IGESDraw_PerspectiveView.cxx b/src/IGESDraw/IGESDraw_PerspectiveView.cxx index 2210330705..241a3a8a9c 100644 --- a/src/IGESDraw/IGESDraw_PerspectiveView.cxx +++ b/src/IGESDraw/IGESDraw_PerspectiveView.cxx @@ -23,9 +23,7 @@ #include #include #include -#include #include -#include #include IMPLEMENT_STANDARD_RTTIEXT(IGESDraw_PerspectiveView,IGESData_ViewKindEntity) diff --git a/src/IGESDraw/IGESDraw_PerspectiveView.hxx b/src/IGESDraw/IGESDraw_PerspectiveView.hxx index ad6e354f3f..dfb657bcad 100644 --- a/src/IGESDraw/IGESDraw_PerspectiveView.hxx +++ b/src/IGESDraw/IGESDraw_PerspectiveView.hxx @@ -21,11 +21,9 @@ #include #include -#include #include #include #include -#include class gp_Vec; class gp_Pnt; class gp_Pnt2d; diff --git a/src/IGESDraw/IGESDraw_Planar.cxx b/src/IGESDraw/IGESDraw_Planar.cxx index b33013137e..0b72686660 100644 --- a/src/IGESDraw/IGESDraw_Planar.cxx +++ b/src/IGESDraw/IGESDraw_Planar.cxx @@ -16,11 +16,9 @@ //-------------------------------------------------------------------- //-------------------------------------------------------------------- -#include #include #include #include -#include #include IMPLEMENT_STANDARD_RTTIEXT(IGESDraw_Planar,IGESData_IGESEntity) diff --git a/src/IGESDraw/IGESDraw_Planar.hxx b/src/IGESDraw/IGESDraw_Planar.hxx index 415d4d7205..9e0c25e007 100644 --- a/src/IGESDraw/IGESDraw_Planar.hxx +++ b/src/IGESDraw/IGESDraw_Planar.hxx @@ -18,12 +18,10 @@ #define _IGESDraw_Planar_HeaderFile #include -#include #include #include #include -#include class IGESGeom_TransformationMatrix; diff --git a/src/IGESDraw/IGESDraw_Protocol.cxx b/src/IGESDraw/IGESDraw_Protocol.cxx index e8d06f4255..2e0bcacb12 100644 --- a/src/IGESDraw/IGESDraw_Protocol.cxx +++ b/src/IGESDraw/IGESDraw_Protocol.cxx @@ -15,7 +15,6 @@ #include #include #include -#include #include #include #include diff --git a/src/IGESDraw/IGESDraw_Protocol.hxx b/src/IGESDraw/IGESDraw_Protocol.hxx index 19db4ec0c5..881fc993ee 100644 --- a/src/IGESDraw/IGESDraw_Protocol.hxx +++ b/src/IGESDraw/IGESDraw_Protocol.hxx @@ -22,7 +22,6 @@ #include #include -#include class Interface_Protocol; diff --git a/src/IGESDraw/IGESDraw_ReadWriteModule.cxx b/src/IGESDraw/IGESDraw_ReadWriteModule.cxx index 3412944792..2de804cd48 100644 --- a/src/IGESDraw/IGESDraw_ReadWriteModule.cxx +++ b/src/IGESDraw/IGESDraw_ReadWriteModule.cxx @@ -12,12 +12,10 @@ // commercial license or contractual agreement. -#include #include #include #include #include -#include #include #include #include @@ -46,7 +44,6 @@ #include #include #include -#include #include IMPLEMENT_STANDARD_RTTIEXT(IGESDraw_ReadWriteModule,IGESData_ReadWriteModule) diff --git a/src/IGESDraw/IGESDraw_RectArraySubfigure.cxx b/src/IGESDraw/IGESDraw_RectArraySubfigure.cxx index 36f9da2a38..b80b847a9d 100644 --- a/src/IGESDraw/IGESDraw_RectArraySubfigure.cxx +++ b/src/IGESDraw/IGESDraw_RectArraySubfigure.cxx @@ -19,10 +19,8 @@ #include #include #include -#include #include #include -#include #include IMPLEMENT_STANDARD_RTTIEXT(IGESDraw_RectArraySubfigure,IGESData_IGESEntity) diff --git a/src/IGESDraw/IGESDraw_RectArraySubfigure.hxx b/src/IGESDraw/IGESDraw_RectArraySubfigure.hxx index 9e7fa008c0..eeee5d5f9b 100644 --- a/src/IGESDraw/IGESDraw_RectArraySubfigure.hxx +++ b/src/IGESDraw/IGESDraw_RectArraySubfigure.hxx @@ -20,12 +20,10 @@ #include #include -#include #include #include #include #include -#include class gp_Pnt; diff --git a/src/IGESDraw/IGESDraw_SegmentedViewsVisible.cxx b/src/IGESDraw/IGESDraw_SegmentedViewsVisible.cxx index 75f13305c5..30170860fa 100644 --- a/src/IGESDraw/IGESDraw_SegmentedViewsVisible.cxx +++ b/src/IGESDraw/IGESDraw_SegmentedViewsVisible.cxx @@ -16,12 +16,9 @@ //-------------------------------------------------------------------- //-------------------------------------------------------------------- -#include -#include #include #include #include -#include #include IMPLEMENT_STANDARD_RTTIEXT(IGESDraw_SegmentedViewsVisible,IGESData_ViewKindEntity) diff --git a/src/IGESDraw/IGESDraw_SegmentedViewsVisible.hxx b/src/IGESDraw/IGESDraw_SegmentedViewsVisible.hxx index f55a6ffbc1..acebf1b6b9 100644 --- a/src/IGESDraw/IGESDraw_SegmentedViewsVisible.hxx +++ b/src/IGESDraw/IGESDraw_SegmentedViewsVisible.hxx @@ -18,7 +18,6 @@ #define _IGESDraw_SegmentedViewsVisible_HeaderFile #include -#include #include #include @@ -26,7 +25,6 @@ #include #include #include -#include #include #include class IGESGraph_Color; diff --git a/src/IGESDraw/IGESDraw_SpecificModule.cxx b/src/IGESDraw/IGESDraw_SpecificModule.cxx index fb4d24d5b9..5797cbbc0d 100644 --- a/src/IGESDraw/IGESDraw_SpecificModule.cxx +++ b/src/IGESDraw/IGESDraw_SpecificModule.cxx @@ -13,9 +13,7 @@ #include -#include #include -#include #include #include #include diff --git a/src/IGESDraw/IGESDraw_SpecificModule.hxx b/src/IGESDraw/IGESDraw_SpecificModule.hxx index 4276b141ac..f1c3875509 100644 --- a/src/IGESDraw/IGESDraw_SpecificModule.hxx +++ b/src/IGESDraw/IGESDraw_SpecificModule.hxx @@ -22,7 +22,6 @@ #include #include -#include class IGESData_IGESEntity; class IGESData_IGESDumper; diff --git a/src/IGESDraw/IGESDraw_ToolCircArraySubfigure.cxx b/src/IGESDraw/IGESDraw_ToolCircArraySubfigure.cxx index a19924ced0..d05977e652 100644 --- a/src/IGESDraw/IGESDraw_ToolCircArraySubfigure.cxx +++ b/src/IGESDraw/IGESDraw_ToolCircArraySubfigure.cxx @@ -20,10 +20,8 @@ #include #include #include -#include #include #include -#include #include #include #include diff --git a/src/IGESDraw/IGESDraw_ToolConnectPoint.cxx b/src/IGESDraw/IGESDraw_ToolConnectPoint.cxx index 10900b479f..e4422c9632 100644 --- a/src/IGESDraw/IGESDraw_ToolConnectPoint.cxx +++ b/src/IGESDraw/IGESDraw_ToolConnectPoint.cxx @@ -21,10 +21,8 @@ #include #include #include -#include #include #include -#include #include #include #include diff --git a/src/IGESDraw/IGESDraw_ToolDrawing.cxx b/src/IGESDraw/IGESDraw_ToolDrawing.cxx index 82f635e814..17a78651ed 100644 --- a/src/IGESDraw/IGESDraw_ToolDrawing.cxx +++ b/src/IGESDraw/IGESDraw_ToolDrawing.cxx @@ -20,19 +20,14 @@ #include #include #include -#include #include -#include #include #include -#include #include -#include #include #include #include #include -#include #include #include #include diff --git a/src/IGESDraw/IGESDraw_ToolDrawing.hxx b/src/IGESDraw/IGESDraw_ToolDrawing.hxx index 7a045226ce..e5f8b7c1d7 100644 --- a/src/IGESDraw/IGESDraw_ToolDrawing.hxx +++ b/src/IGESDraw/IGESDraw_ToolDrawing.hxx @@ -21,7 +21,6 @@ #include #include -#include #include class IGESDraw_Drawing; class IGESData_IGESReaderData; diff --git a/src/IGESDraw/IGESDraw_ToolDrawingWithRotation.cxx b/src/IGESDraw/IGESDraw_ToolDrawingWithRotation.cxx index 940e992ac2..b8054e5586 100644 --- a/src/IGESDraw/IGESDraw_ToolDrawingWithRotation.cxx +++ b/src/IGESDraw/IGESDraw_ToolDrawingWithRotation.cxx @@ -20,19 +20,14 @@ #include #include #include -#include #include -#include #include #include -#include #include -#include #include #include #include #include -#include #include #include #include diff --git a/src/IGESDraw/IGESDraw_ToolDrawingWithRotation.hxx b/src/IGESDraw/IGESDraw_ToolDrawingWithRotation.hxx index 260f6e72a7..5eb975ff42 100644 --- a/src/IGESDraw/IGESDraw_ToolDrawingWithRotation.hxx +++ b/src/IGESDraw/IGESDraw_ToolDrawingWithRotation.hxx @@ -21,7 +21,6 @@ #include #include -#include #include class IGESDraw_DrawingWithRotation; class IGESData_IGESReaderData; diff --git a/src/IGESDraw/IGESDraw_ToolLabelDisplay.cxx b/src/IGESDraw/IGESDraw_ToolLabelDisplay.cxx index 2cd6244336..e3365b3a94 100644 --- a/src/IGESDraw/IGESDraw_ToolLabelDisplay.cxx +++ b/src/IGESDraw/IGESDraw_ToolLabelDisplay.cxx @@ -19,21 +19,13 @@ #include #include #include -#include #include -#include #include #include -#include #include -#include -#include -#include -#include #include #include #include -#include #include #include #include diff --git a/src/IGESDraw/IGESDraw_ToolNetworkSubfigure.cxx b/src/IGESDraw/IGESDraw_ToolNetworkSubfigure.cxx index 284c53a5ac..3de40a511a 100644 --- a/src/IGESDraw/IGESDraw_ToolNetworkSubfigure.cxx +++ b/src/IGESDraw/IGESDraw_ToolNetworkSubfigure.cxx @@ -22,10 +22,7 @@ #include #include #include -#include #include -#include -#include #include #include #include diff --git a/src/IGESDraw/IGESDraw_ToolNetworkSubfigureDef.cxx b/src/IGESDraw/IGESDraw_ToolNetworkSubfigureDef.cxx index deb628925e..f7ab2068dd 100644 --- a/src/IGESDraw/IGESDraw_ToolNetworkSubfigureDef.cxx +++ b/src/IGESDraw/IGESDraw_ToolNetworkSubfigureDef.cxx @@ -18,15 +18,10 @@ #include #include -#include #include -#include #include #include -#include #include -#include -#include #include #include #include @@ -36,7 +31,6 @@ #include #include #include -#include #include IGESDraw_ToolNetworkSubfigureDef::IGESDraw_ToolNetworkSubfigureDef () { } diff --git a/src/IGESDraw/IGESDraw_ToolPerspectiveView.cxx b/src/IGESDraw/IGESDraw_ToolPerspectiveView.cxx index 08399d3c57..a0b30b7a47 100644 --- a/src/IGESDraw/IGESDraw_ToolPerspectiveView.cxx +++ b/src/IGESDraw/IGESDraw_ToolPerspectiveView.cxx @@ -25,7 +25,6 @@ #include #include #include -#include #include #include #include @@ -33,7 +32,6 @@ #include #include #include -#include #include #include #include diff --git a/src/IGESDraw/IGESDraw_ToolPlanar.cxx b/src/IGESDraw/IGESDraw_ToolPlanar.cxx index e0bd3fc058..391ecf4063 100644 --- a/src/IGESDraw/IGESDraw_ToolPlanar.cxx +++ b/src/IGESDraw/IGESDraw_ToolPlanar.cxx @@ -18,12 +18,9 @@ #include #include -#include #include -#include #include #include -#include #include #include #include @@ -34,7 +31,6 @@ #include #include #include -#include IGESDraw_ToolPlanar::IGESDraw_ToolPlanar () { } diff --git a/src/IGESDraw/IGESDraw_ToolPlanar.hxx b/src/IGESDraw/IGESDraw_ToolPlanar.hxx index e340ddc38f..c78415f5ee 100644 --- a/src/IGESDraw/IGESDraw_ToolPlanar.hxx +++ b/src/IGESDraw/IGESDraw_ToolPlanar.hxx @@ -21,7 +21,6 @@ #include #include -#include #include class IGESDraw_Planar; class IGESData_IGESReaderData; diff --git a/src/IGESDraw/IGESDraw_ToolRectArraySubfigure.cxx b/src/IGESDraw/IGESDraw_ToolRectArraySubfigure.cxx index 10a196d39d..e964038531 100644 --- a/src/IGESDraw/IGESDraw_ToolRectArraySubfigure.cxx +++ b/src/IGESDraw/IGESDraw_ToolRectArraySubfigure.cxx @@ -21,10 +21,8 @@ #include #include #include -#include #include #include -#include #include #include #include diff --git a/src/IGESDraw/IGESDraw_ToolSegmentedViewsVisible.cxx b/src/IGESDraw/IGESDraw_ToolSegmentedViewsVisible.cxx index 24ab423c08..a45076a336 100644 --- a/src/IGESDraw/IGESDraw_ToolSegmentedViewsVisible.cxx +++ b/src/IGESDraw/IGESDraw_ToolSegmentedViewsVisible.cxx @@ -22,10 +22,7 @@ #include #include #include -#include #include -#include -#include #include #include #include @@ -35,7 +32,6 @@ #include #include #include -#include #include #include diff --git a/src/IGESDraw/IGESDraw_ToolView.cxx b/src/IGESDraw/IGESDraw_ToolView.cxx index 2488fbde3b..e9fbd28a72 100644 --- a/src/IGESDraw/IGESDraw_ToolView.cxx +++ b/src/IGESDraw/IGESDraw_ToolView.cxx @@ -20,7 +20,6 @@ #include #include #include -#include #include #include #include @@ -31,7 +30,6 @@ #include #include #include -#include IGESDraw_ToolView::IGESDraw_ToolView () { } diff --git a/src/IGESDraw/IGESDraw_ToolViewsVisible.cxx b/src/IGESDraw/IGESDraw_ToolViewsVisible.cxx index 728795ab65..3cf6d5a7c9 100644 --- a/src/IGESDraw/IGESDraw_ToolViewsVisible.cxx +++ b/src/IGESDraw/IGESDraw_ToolViewsVisible.cxx @@ -18,15 +18,10 @@ #include #include -#include #include -#include #include #include -#include #include -#include -#include #include #include #include @@ -34,7 +29,6 @@ #include #include #include -#include #include IGESDraw_ToolViewsVisible::IGESDraw_ToolViewsVisible () { } diff --git a/src/IGESDraw/IGESDraw_ToolViewsVisible.hxx b/src/IGESDraw/IGESDraw_ToolViewsVisible.hxx index f84f87b965..00bde5b77f 100644 --- a/src/IGESDraw/IGESDraw_ToolViewsVisible.hxx +++ b/src/IGESDraw/IGESDraw_ToolViewsVisible.hxx @@ -22,7 +22,6 @@ #include #include -#include class IGESDraw_ViewsVisible; class IGESData_IGESReaderData; class IGESData_ParamReader; diff --git a/src/IGESDraw/IGESDraw_ToolViewsVisibleWithAttr.cxx b/src/IGESDraw/IGESDraw_ToolViewsVisibleWithAttr.cxx index 79c1fc1ac6..ebfcfc813d 100644 --- a/src/IGESDraw/IGESDraw_ToolViewsVisibleWithAttr.cxx +++ b/src/IGESDraw/IGESDraw_ToolViewsVisibleWithAttr.cxx @@ -19,16 +19,12 @@ #include #include #include -#include #include #include #include #include #include -#include #include -#include -#include #include #include #include diff --git a/src/IGESDraw/IGESDraw_ToolViewsVisibleWithAttr.hxx b/src/IGESDraw/IGESDraw_ToolViewsVisibleWithAttr.hxx index 265e5a482d..f85c4d895f 100644 --- a/src/IGESDraw/IGESDraw_ToolViewsVisibleWithAttr.hxx +++ b/src/IGESDraw/IGESDraw_ToolViewsVisibleWithAttr.hxx @@ -22,7 +22,6 @@ #include #include -#include class IGESDraw_ViewsVisibleWithAttr; class IGESData_IGESReaderData; class IGESData_ParamReader; diff --git a/src/IGESDraw/IGESDraw_View.cxx b/src/IGESDraw/IGESDraw_View.cxx index 98cd91d852..7a8d9ac145 100644 --- a/src/IGESDraw/IGESDraw_View.cxx +++ b/src/IGESDraw/IGESDraw_View.cxx @@ -19,10 +19,8 @@ #include #include #include -#include #include #include -#include #include IMPLEMENT_STANDARD_RTTIEXT(IGESDraw_View,IGESData_ViewKindEntity) diff --git a/src/IGESDraw/IGESDraw_View.hxx b/src/IGESDraw/IGESDraw_View.hxx index 8c22a9ebaf..94b6fc4c0b 100644 --- a/src/IGESDraw/IGESDraw_View.hxx +++ b/src/IGESDraw/IGESDraw_View.hxx @@ -21,9 +21,7 @@ #include #include -#include #include -#include class IGESGeom_Plane; class IGESData_TransfEntity; class gp_XYZ; diff --git a/src/IGESDraw/IGESDraw_ViewsVisible.cxx b/src/IGESDraw/IGESDraw_ViewsVisible.cxx index 43c47f6402..aa11c76a2f 100644 --- a/src/IGESDraw/IGESDraw_ViewsVisible.cxx +++ b/src/IGESDraw/IGESDraw_ViewsVisible.cxx @@ -16,11 +16,8 @@ //-------------------------------------------------------------------- //-------------------------------------------------------------------- -#include -#include #include #include -#include #include IMPLEMENT_STANDARD_RTTIEXT(IGESDraw_ViewsVisible,IGESData_ViewKindEntity) diff --git a/src/IGESDraw/IGESDraw_ViewsVisible.hxx b/src/IGESDraw/IGESDraw_ViewsVisible.hxx index b6a7df117e..a6ebe35579 100644 --- a/src/IGESDraw/IGESDraw_ViewsVisible.hxx +++ b/src/IGESDraw/IGESDraw_ViewsVisible.hxx @@ -18,12 +18,10 @@ #define _IGESDraw_ViewsVisible_HeaderFile #include -#include #include #include #include -#include #include class IGESData_IGESEntity; diff --git a/src/IGESDraw/IGESDraw_ViewsVisibleWithAttr.cxx b/src/IGESDraw/IGESDraw_ViewsVisibleWithAttr.cxx index c6d1fc1588..94d9b26a76 100644 --- a/src/IGESDraw/IGESDraw_ViewsVisibleWithAttr.cxx +++ b/src/IGESDraw/IGESDraw_ViewsVisibleWithAttr.cxx @@ -16,13 +16,9 @@ //-------------------------------------------------------------------- //-------------------------------------------------------------------- -#include -#include -#include #include #include #include -#include #include IMPLEMENT_STANDARD_RTTIEXT(IGESDraw_ViewsVisibleWithAttr,IGESData_ViewKindEntity) diff --git a/src/IGESDraw/IGESDraw_ViewsVisibleWithAttr.hxx b/src/IGESDraw/IGESDraw_ViewsVisibleWithAttr.hxx index 142f868416..0a6366c6f5 100644 --- a/src/IGESDraw/IGESDraw_ViewsVisibleWithAttr.hxx +++ b/src/IGESDraw/IGESDraw_ViewsVisibleWithAttr.hxx @@ -18,7 +18,6 @@ #define _IGESDraw_ViewsVisibleWithAttr_HeaderFile #include -#include #include #include @@ -26,7 +25,6 @@ #include #include #include -#include #include class IGESData_LineFontEntity; class IGESGraph_Color; diff --git a/src/IGESFile/IGESFile_Read.cxx b/src/IGESFile/IGESFile_Read.cxx index ed6811dbbf..700363cd6d 100644 --- a/src/IGESFile/IGESFile_Read.cxx +++ b/src/IGESFile/IGESFile_Read.cxx @@ -15,14 +15,11 @@ #include // declarations des programmes C de base : -#include #include #include #include #include -#include -#include // Pour traiter les exceptions : #include #include diff --git a/src/IGESGeom/IGESGeom_BSplineCurve.hxx b/src/IGESGeom/IGESGeom_BSplineCurve.hxx index fb4eca6147..22ba719a53 100644 --- a/src/IGESGeom/IGESGeom_BSplineCurve.hxx +++ b/src/IGESGeom/IGESGeom_BSplineCurve.hxx @@ -21,10 +21,8 @@ #include #include -#include #include #include -#include #include #include class gp_Pnt; diff --git a/src/IGESGeom/IGESGeom_BSplineSurface.hxx b/src/IGESGeom/IGESGeom_BSplineSurface.hxx index b1c9917e71..fcc298f24f 100644 --- a/src/IGESGeom/IGESGeom_BSplineSurface.hxx +++ b/src/IGESGeom/IGESGeom_BSplineSurface.hxx @@ -21,11 +21,9 @@ #include #include -#include #include #include #include -#include #include class gp_Pnt; diff --git a/src/IGESGeom/IGESGeom_Boundary.cxx b/src/IGESGeom/IGESGeom_Boundary.cxx index 9e2316e9e9..94a4b7f4c7 100644 --- a/src/IGESGeom/IGESGeom_Boundary.cxx +++ b/src/IGESGeom/IGESGeom_Boundary.cxx @@ -20,7 +20,6 @@ #include #include #include -#include #include IMPLEMENT_STANDARD_RTTIEXT(IGESGeom_Boundary,IGESData_IGESEntity) diff --git a/src/IGESGeom/IGESGeom_BoundedSurface.cxx b/src/IGESGeom/IGESGeom_BoundedSurface.cxx index 2dab522661..4f2938b5c1 100644 --- a/src/IGESGeom/IGESGeom_BoundedSurface.cxx +++ b/src/IGESGeom/IGESGeom_BoundedSurface.cxx @@ -16,11 +16,8 @@ //-------------------------------------------------------------------- //-------------------------------------------------------------------- -#include -#include #include #include -#include #include IMPLEMENT_STANDARD_RTTIEXT(IGESGeom_BoundedSurface,IGESData_IGESEntity) diff --git a/src/IGESGeom/IGESGeom_BoundedSurface.hxx b/src/IGESGeom/IGESGeom_BoundedSurface.hxx index c132e4e9e2..835f3c7ce0 100644 --- a/src/IGESGeom/IGESGeom_BoundedSurface.hxx +++ b/src/IGESGeom/IGESGeom_BoundedSurface.hxx @@ -18,7 +18,6 @@ #define _IGESGeom_BoundedSurface_HeaderFile #include -#include #include #include diff --git a/src/IGESGeom/IGESGeom_CircularArc.hxx b/src/IGESGeom/IGESGeom_CircularArc.hxx index fad40fd94a..c36b1e4d76 100644 --- a/src/IGESGeom/IGESGeom_CircularArc.hxx +++ b/src/IGESGeom/IGESGeom_CircularArc.hxx @@ -20,10 +20,8 @@ #include #include -#include #include #include -#include class gp_Pnt2d; class gp_Pnt; class gp_Dir; diff --git a/src/IGESGeom/IGESGeom_CompositeCurve.cxx b/src/IGESGeom/IGESGeom_CompositeCurve.cxx index 64af3db6d4..b3c33e5a3a 100644 --- a/src/IGESGeom/IGESGeom_CompositeCurve.cxx +++ b/src/IGESGeom/IGESGeom_CompositeCurve.cxx @@ -16,10 +16,8 @@ //-------------------------------------------------------------------- //-------------------------------------------------------------------- -#include #include #include -#include #include IMPLEMENT_STANDARD_RTTIEXT(IGESGeom_CompositeCurve,IGESData_IGESEntity) diff --git a/src/IGESGeom/IGESGeom_CompositeCurve.hxx b/src/IGESGeom/IGESGeom_CompositeCurve.hxx index 334ecc768b..3b851575b0 100644 --- a/src/IGESGeom/IGESGeom_CompositeCurve.hxx +++ b/src/IGESGeom/IGESGeom_CompositeCurve.hxx @@ -18,7 +18,6 @@ #define _IGESGeom_CompositeCurve_HeaderFile #include -#include #include #include diff --git a/src/IGESGeom/IGESGeom_ConicArc.cxx b/src/IGESGeom/IGESGeom_ConicArc.cxx index f3b25f254f..056243150f 100644 --- a/src/IGESGeom/IGESGeom_ConicArc.cxx +++ b/src/IGESGeom/IGESGeom_ConicArc.cxx @@ -18,7 +18,6 @@ //#59 rln 29.12.98 PRO17015 #include -#include #include #include #include diff --git a/src/IGESGeom/IGESGeom_ConicArc.hxx b/src/IGESGeom/IGESGeom_ConicArc.hxx index 9f6161f4c2..bd8af8faa4 100644 --- a/src/IGESGeom/IGESGeom_ConicArc.hxx +++ b/src/IGESGeom/IGESGeom_ConicArc.hxx @@ -20,10 +20,8 @@ #include #include -#include #include #include -#include #include class gp_Pnt2d; class gp_Pnt; diff --git a/src/IGESGeom/IGESGeom_CopiousData.cxx b/src/IGESGeom/IGESGeom_CopiousData.cxx index b62072099c..af1129fbd1 100644 --- a/src/IGESGeom/IGESGeom_CopiousData.cxx +++ b/src/IGESGeom/IGESGeom_CopiousData.cxx @@ -19,11 +19,9 @@ #include #include #include -#include #include #include #include -#include #include IMPLEMENT_STANDARD_RTTIEXT(IGESGeom_CopiousData,IGESData_IGESEntity) diff --git a/src/IGESGeom/IGESGeom_CopiousData.hxx b/src/IGESGeom/IGESGeom_CopiousData.hxx index e928ea9b42..b1a10cf704 100644 --- a/src/IGESGeom/IGESGeom_CopiousData.hxx +++ b/src/IGESGeom/IGESGeom_CopiousData.hxx @@ -21,10 +21,8 @@ #include #include -#include #include #include -#include class gp_Pnt; class gp_Vec; diff --git a/src/IGESGeom/IGESGeom_CurveOnSurface.cxx b/src/IGESGeom/IGESGeom_CurveOnSurface.cxx index 5e53ac826d..07080c00b1 100644 --- a/src/IGESGeom/IGESGeom_CurveOnSurface.cxx +++ b/src/IGESGeom/IGESGeom_CurveOnSurface.cxx @@ -16,7 +16,6 @@ //-------------------------------------------------------------------- //-------------------------------------------------------------------- -#include #include #include diff --git a/src/IGESGeom/IGESGeom_CurveOnSurface.hxx b/src/IGESGeom/IGESGeom_CurveOnSurface.hxx index db8faaca9b..b56b627449 100644 --- a/src/IGESGeom/IGESGeom_CurveOnSurface.hxx +++ b/src/IGESGeom/IGESGeom_CurveOnSurface.hxx @@ -18,7 +18,6 @@ #define _IGESGeom_CurveOnSurface_HeaderFile #include -#include #include #include diff --git a/src/IGESGeom/IGESGeom_Flash.cxx b/src/IGESGeom/IGESGeom_Flash.cxx index 4bfe988361..d585eb9068 100644 --- a/src/IGESGeom/IGESGeom_Flash.cxx +++ b/src/IGESGeom/IGESGeom_Flash.cxx @@ -20,7 +20,6 @@ #include #include #include -#include #include #include #include diff --git a/src/IGESGeom/IGESGeom_Flash.hxx b/src/IGESGeom/IGESGeom_Flash.hxx index 3d18bb58eb..5cb257e02c 100644 --- a/src/IGESGeom/IGESGeom_Flash.hxx +++ b/src/IGESGeom/IGESGeom_Flash.hxx @@ -21,10 +21,8 @@ #include #include -#include #include #include -#include class gp_Pnt2d; class gp_Pnt; diff --git a/src/IGESGeom/IGESGeom_GeneralModule.cxx b/src/IGESGeom/IGESGeom_GeneralModule.cxx index f7a887ea7d..501fe8a833 100644 --- a/src/IGESGeom/IGESGeom_GeneralModule.cxx +++ b/src/IGESGeom/IGESGeom_GeneralModule.cxx @@ -13,7 +13,6 @@ #include -#include #include #include #include @@ -22,7 +21,6 @@ #include #include #include -#include #include #include #include diff --git a/src/IGESGeom/IGESGeom_GeneralModule.hxx b/src/IGESGeom/IGESGeom_GeneralModule.hxx index 9bdeba647f..589ce4f3de 100644 --- a/src/IGESGeom/IGESGeom_GeneralModule.hxx +++ b/src/IGESGeom/IGESGeom_GeneralModule.hxx @@ -22,7 +22,6 @@ #include #include -#include class IGESData_IGESEntity; class Interface_EntityIterator; class IGESData_DirChecker; diff --git a/src/IGESGeom/IGESGeom_HArray1OfBoundary.hxx b/src/IGESGeom/IGESGeom_HArray1OfBoundary.hxx index 3929342a72..49efb260a2 100644 --- a/src/IGESGeom/IGESGeom_HArray1OfBoundary.hxx +++ b/src/IGESGeom/IGESGeom_HArray1OfBoundary.hxx @@ -17,7 +17,6 @@ #ifndef IGESGeom_HArray1OfBoundary_HeaderFile #define IGESGeom_HArray1OfBoundary_HeaderFile -#include #include #include diff --git a/src/IGESGeom/IGESGeom_HArray1OfCurveOnSurface.hxx b/src/IGESGeom/IGESGeom_HArray1OfCurveOnSurface.hxx index a96f231147..2c50a846e6 100644 --- a/src/IGESGeom/IGESGeom_HArray1OfCurveOnSurface.hxx +++ b/src/IGESGeom/IGESGeom_HArray1OfCurveOnSurface.hxx @@ -17,7 +17,6 @@ #ifndef IGESGeom_HArray1OfCurveOnSurface_HeaderFile #define IGESGeom_HArray1OfCurveOnSurface_HeaderFile -#include #include #include diff --git a/src/IGESGeom/IGESGeom_HArray1OfTransformationMatrix.hxx b/src/IGESGeom/IGESGeom_HArray1OfTransformationMatrix.hxx index a0a64cc93f..3d71e2fd67 100644 --- a/src/IGESGeom/IGESGeom_HArray1OfTransformationMatrix.hxx +++ b/src/IGESGeom/IGESGeom_HArray1OfTransformationMatrix.hxx @@ -17,7 +17,6 @@ #ifndef IGESGeom_HArray1OfTransformationMatrix_HeaderFile #define IGESGeom_HArray1OfTransformationMatrix_HeaderFile -#include #include #include diff --git a/src/IGESGeom/IGESGeom_OffsetCurve.cxx b/src/IGESGeom/IGESGeom_OffsetCurve.cxx index 7e8b91fa5c..e947bafbe8 100644 --- a/src/IGESGeom/IGESGeom_OffsetCurve.cxx +++ b/src/IGESGeom/IGESGeom_OffsetCurve.cxx @@ -19,7 +19,6 @@ #include #include #include -#include #include #include diff --git a/src/IGESGeom/IGESGeom_OffsetCurve.hxx b/src/IGESGeom/IGESGeom_OffsetCurve.hxx index a7cec247b0..74a03be212 100644 --- a/src/IGESGeom/IGESGeom_OffsetCurve.hxx +++ b/src/IGESGeom/IGESGeom_OffsetCurve.hxx @@ -21,10 +21,8 @@ #include #include -#include #include #include -#include class gp_Vec; diff --git a/src/IGESGeom/IGESGeom_OffsetSurface.cxx b/src/IGESGeom/IGESGeom_OffsetSurface.cxx index 070a4e1c98..66d6745ea2 100644 --- a/src/IGESGeom/IGESGeom_OffsetSurface.cxx +++ b/src/IGESGeom/IGESGeom_OffsetSurface.cxx @@ -19,7 +19,6 @@ #include #include #include -#include #include #include diff --git a/src/IGESGeom/IGESGeom_OffsetSurface.hxx b/src/IGESGeom/IGESGeom_OffsetSurface.hxx index 5fcd133450..3b421c6e42 100644 --- a/src/IGESGeom/IGESGeom_OffsetSurface.hxx +++ b/src/IGESGeom/IGESGeom_OffsetSurface.hxx @@ -21,7 +21,6 @@ #include #include -#include #include class gp_Vec; diff --git a/src/IGESGeom/IGESGeom_Plane.cxx b/src/IGESGeom/IGESGeom_Plane.cxx index ce914f62f7..bd3c345781 100644 --- a/src/IGESGeom/IGESGeom_Plane.cxx +++ b/src/IGESGeom/IGESGeom_Plane.cxx @@ -19,7 +19,6 @@ #include #include #include -#include #include #include diff --git a/src/IGESGeom/IGESGeom_Plane.hxx b/src/IGESGeom/IGESGeom_Plane.hxx index dcae18b167..d197ca2cfc 100644 --- a/src/IGESGeom/IGESGeom_Plane.hxx +++ b/src/IGESGeom/IGESGeom_Plane.hxx @@ -20,11 +20,9 @@ #include #include -#include #include #include #include -#include class gp_Pnt; diff --git a/src/IGESGeom/IGESGeom_Point.hxx b/src/IGESGeom/IGESGeom_Point.hxx index 5bc47425d1..87e12f90b9 100644 --- a/src/IGESGeom/IGESGeom_Point.hxx +++ b/src/IGESGeom/IGESGeom_Point.hxx @@ -22,7 +22,6 @@ #include #include -#include class IGESBasic_SubfigureDef; class gp_Pnt; diff --git a/src/IGESGeom/IGESGeom_Protocol.cxx b/src/IGESGeom/IGESGeom_Protocol.cxx index 413ef3ed4c..6d3dc4e5ca 100644 --- a/src/IGESGeom/IGESGeom_Protocol.cxx +++ b/src/IGESGeom/IGESGeom_Protocol.cxx @@ -14,7 +14,6 @@ #include #include -#include #include #include #include @@ -22,7 +21,6 @@ #include #include #include -#include #include #include #include diff --git a/src/IGESGeom/IGESGeom_Protocol.hxx b/src/IGESGeom/IGESGeom_Protocol.hxx index ea14a5b869..5c23ffa5c2 100644 --- a/src/IGESGeom/IGESGeom_Protocol.hxx +++ b/src/IGESGeom/IGESGeom_Protocol.hxx @@ -22,7 +22,6 @@ #include #include -#include class Interface_Protocol; diff --git a/src/IGESGeom/IGESGeom_ReadWriteModule.cxx b/src/IGESGeom/IGESGeom_ReadWriteModule.cxx index 3c2c143dd0..7f496b80df 100644 --- a/src/IGESGeom/IGESGeom_ReadWriteModule.cxx +++ b/src/IGESGeom/IGESGeom_ReadWriteModule.cxx @@ -12,11 +12,9 @@ // commercial license or contractual agreement. -#include #include #include #include -#include #include #include #include @@ -24,7 +22,6 @@ #include #include #include -#include #include #include #include @@ -64,7 +61,6 @@ #include #include #include -#include #include IMPLEMENT_STANDARD_RTTIEXT(IGESGeom_ReadWriteModule,IGESData_ReadWriteModule) diff --git a/src/IGESGeom/IGESGeom_RuledSurface.cxx b/src/IGESGeom/IGESGeom_RuledSurface.cxx index ac4a19e8e8..8818e8ab4a 100644 --- a/src/IGESGeom/IGESGeom_RuledSurface.cxx +++ b/src/IGESGeom/IGESGeom_RuledSurface.cxx @@ -16,7 +16,6 @@ //-------------------------------------------------------------------- //-------------------------------------------------------------------- -#include #include #include diff --git a/src/IGESGeom/IGESGeom_RuledSurface.hxx b/src/IGESGeom/IGESGeom_RuledSurface.hxx index 0f86ca1b51..949801379c 100644 --- a/src/IGESGeom/IGESGeom_RuledSurface.hxx +++ b/src/IGESGeom/IGESGeom_RuledSurface.hxx @@ -18,11 +18,9 @@ #define _IGESGeom_RuledSurface_HeaderFile #include -#include #include #include -#include class IGESGeom_RuledSurface; diff --git a/src/IGESGeom/IGESGeom_SpecificModule.cxx b/src/IGESGeom/IGESGeom_SpecificModule.cxx index 3f97407003..530e15d9bb 100644 --- a/src/IGESGeom/IGESGeom_SpecificModule.cxx +++ b/src/IGESGeom/IGESGeom_SpecificModule.cxx @@ -13,8 +13,6 @@ #include -#include -#include #include #include #include @@ -22,7 +20,6 @@ #include #include #include -#include #include #include #include diff --git a/src/IGESGeom/IGESGeom_SpecificModule.hxx b/src/IGESGeom/IGESGeom_SpecificModule.hxx index 274feb9be1..c176a96a60 100644 --- a/src/IGESGeom/IGESGeom_SpecificModule.hxx +++ b/src/IGESGeom/IGESGeom_SpecificModule.hxx @@ -22,7 +22,6 @@ #include #include -#include class IGESData_IGESEntity; class IGESData_IGESDumper; diff --git a/src/IGESGeom/IGESGeom_SplineCurve.cxx b/src/IGESGeom/IGESGeom_SplineCurve.cxx index acbc1ed8a9..b01091a103 100644 --- a/src/IGESGeom/IGESGeom_SplineCurve.cxx +++ b/src/IGESGeom/IGESGeom_SplineCurve.cxx @@ -18,7 +18,6 @@ #include #include -#include #include IMPLEMENT_STANDARD_RTTIEXT(IGESGeom_SplineCurve,IGESData_IGESEntity) diff --git a/src/IGESGeom/IGESGeom_SplineCurve.hxx b/src/IGESGeom/IGESGeom_SplineCurve.hxx index db7d0d94ea..8161639901 100644 --- a/src/IGESGeom/IGESGeom_SplineCurve.hxx +++ b/src/IGESGeom/IGESGeom_SplineCurve.hxx @@ -18,7 +18,6 @@ #define _IGESGeom_SplineCurve_HeaderFile #include -#include #include #include diff --git a/src/IGESGeom/IGESGeom_SplineSurface.cxx b/src/IGESGeom/IGESGeom_SplineSurface.cxx index c97c1cc316..a92a16438e 100644 --- a/src/IGESGeom/IGESGeom_SplineSurface.cxx +++ b/src/IGESGeom/IGESGeom_SplineSurface.cxx @@ -18,7 +18,6 @@ #include #include -#include #include IMPLEMENT_STANDARD_RTTIEXT(IGESGeom_SplineSurface,IGESData_IGESEntity) diff --git a/src/IGESGeom/IGESGeom_SplineSurface.hxx b/src/IGESGeom/IGESGeom_SplineSurface.hxx index 4b7953a08d..a42fd9071c 100644 --- a/src/IGESGeom/IGESGeom_SplineSurface.hxx +++ b/src/IGESGeom/IGESGeom_SplineSurface.hxx @@ -18,10 +18,8 @@ #define _IGESGeom_SplineSurface_HeaderFile #include -#include #include -#include #include #include #include diff --git a/src/IGESGeom/IGESGeom_SurfaceOfRevolution.cxx b/src/IGESGeom/IGESGeom_SurfaceOfRevolution.cxx index 55f1c55ddc..dec8abbe6f 100644 --- a/src/IGESGeom/IGESGeom_SurfaceOfRevolution.cxx +++ b/src/IGESGeom/IGESGeom_SurfaceOfRevolution.cxx @@ -16,7 +16,6 @@ //-------------------------------------------------------------------- //-------------------------------------------------------------------- -#include #include #include #include diff --git a/src/IGESGeom/IGESGeom_SurfaceOfRevolution.hxx b/src/IGESGeom/IGESGeom_SurfaceOfRevolution.hxx index 08d2bc84f8..118fd26903 100644 --- a/src/IGESGeom/IGESGeom_SurfaceOfRevolution.hxx +++ b/src/IGESGeom/IGESGeom_SurfaceOfRevolution.hxx @@ -20,7 +20,6 @@ #include #include -#include #include class IGESGeom_Line; diff --git a/src/IGESGeom/IGESGeom_TabulatedCylinder.cxx b/src/IGESGeom/IGESGeom_TabulatedCylinder.cxx index b4da951a67..41ea971b41 100644 --- a/src/IGESGeom/IGESGeom_TabulatedCylinder.cxx +++ b/src/IGESGeom/IGESGeom_TabulatedCylinder.cxx @@ -19,7 +19,6 @@ #include #include #include -#include #include #include diff --git a/src/IGESGeom/IGESGeom_ToolBSplineCurve.cxx b/src/IGESGeom/IGESGeom_ToolBSplineCurve.cxx index dcaaf0572d..1c833e39f0 100644 --- a/src/IGESGeom/IGESGeom_ToolBSplineCurve.cxx +++ b/src/IGESGeom/IGESGeom_ToolBSplineCurve.cxx @@ -23,16 +23,13 @@ #include #include #include -#include #include #include #include #include #include #include -#include #include -#include #include #include #include diff --git a/src/IGESGeom/IGESGeom_ToolBSplineSurface.cxx b/src/IGESGeom/IGESGeom_ToolBSplineSurface.cxx index 190898c1ac..f40f38050d 100644 --- a/src/IGESGeom/IGESGeom_ToolBSplineSurface.cxx +++ b/src/IGESGeom/IGESGeom_ToolBSplineSurface.cxx @@ -22,16 +22,13 @@ #include #include #include -#include #include #include #include #include #include #include -#include #include -#include #include #include #include diff --git a/src/IGESGeom/IGESGeom_ToolBoundary.cxx b/src/IGESGeom/IGESGeom_ToolBoundary.cxx index 6c7de8dc5f..44dbde2482 100644 --- a/src/IGESGeom/IGESGeom_ToolBoundary.cxx +++ b/src/IGESGeom/IGESGeom_ToolBoundary.cxx @@ -24,7 +24,6 @@ #include #include #include -#include #include #include #include diff --git a/src/IGESGeom/IGESGeom_ToolBoundary.hxx b/src/IGESGeom/IGESGeom_ToolBoundary.hxx index 3aef54a881..dfb60db526 100644 --- a/src/IGESGeom/IGESGeom_ToolBoundary.hxx +++ b/src/IGESGeom/IGESGeom_ToolBoundary.hxx @@ -21,7 +21,6 @@ #include #include -#include #include class IGESGeom_Boundary; class IGESData_IGESReaderData; diff --git a/src/IGESGeom/IGESGeom_ToolBoundedSurface.cxx b/src/IGESGeom/IGESGeom_ToolBoundedSurface.cxx index 3253bc8fa4..df639d7a4e 100644 --- a/src/IGESGeom/IGESGeom_ToolBoundedSurface.cxx +++ b/src/IGESGeom/IGESGeom_ToolBoundedSurface.cxx @@ -19,13 +19,10 @@ #include #include #include -#include #include #include -#include #include #include -#include #include #include #include @@ -36,7 +33,6 @@ #include #include #include -#include // MGE 31/07/98 //======================================================================= diff --git a/src/IGESGeom/IGESGeom_ToolCircularArc.cxx b/src/IGESGeom/IGESGeom_ToolCircularArc.cxx index 3be1d9f9a5..ee0128f141 100644 --- a/src/IGESGeom/IGESGeom_ToolCircularArc.cxx +++ b/src/IGESGeom/IGESGeom_ToolCircularArc.cxx @@ -23,14 +23,12 @@ #include #include #include -#include #include #include #include #include #include #include -#include #include #include #include diff --git a/src/IGESGeom/IGESGeom_ToolCompositeCurve.cxx b/src/IGESGeom/IGESGeom_ToolCompositeCurve.cxx index 6bca940d04..9dd04bcea2 100644 --- a/src/IGESGeom/IGESGeom_ToolCompositeCurve.cxx +++ b/src/IGESGeom/IGESGeom_ToolCompositeCurve.cxx @@ -18,12 +18,9 @@ #include #include -#include #include -#include #include #include -#include #include #include #include @@ -34,7 +31,6 @@ #include #include #include -#include // MGE 28/07/98 IGESGeom_ToolCompositeCurve::IGESGeom_ToolCompositeCurve () { } diff --git a/src/IGESGeom/IGESGeom_ToolConicArc.cxx b/src/IGESGeom/IGESGeom_ToolConicArc.cxx index 28d6351746..a093776532 100644 --- a/src/IGESGeom/IGESGeom_ToolConicArc.cxx +++ b/src/IGESGeom/IGESGeom_ToolConicArc.cxx @@ -24,14 +24,12 @@ #include #include #include -#include #include #include #include #include #include #include -#include #include #include #include diff --git a/src/IGESGeom/IGESGeom_ToolConicArc.hxx b/src/IGESGeom/IGESGeom_ToolConicArc.hxx index d86bdef9ca..d212f5d1f3 100644 --- a/src/IGESGeom/IGESGeom_ToolConicArc.hxx +++ b/src/IGESGeom/IGESGeom_ToolConicArc.hxx @@ -21,7 +21,6 @@ #include #include -#include #include class IGESGeom_ConicArc; class IGESData_IGESReaderData; diff --git a/src/IGESGeom/IGESGeom_ToolCopiousData.cxx b/src/IGESGeom/IGESGeom_ToolCopiousData.cxx index 58ac8d32ce..764079877c 100644 --- a/src/IGESGeom/IGESGeom_ToolCopiousData.cxx +++ b/src/IGESGeom/IGESGeom_ToolCopiousData.cxx @@ -22,18 +22,14 @@ #include #include #include -#include #include #include #include #include #include #include -#include #include -#include #include -#include #include // MGE 28/07/98 diff --git a/src/IGESGeom/IGESGeom_ToolCurveOnSurface.cxx b/src/IGESGeom/IGESGeom_ToolCurveOnSurface.cxx index 979daaa01b..3884fafd92 100644 --- a/src/IGESGeom/IGESGeom_ToolCurveOnSurface.cxx +++ b/src/IGESGeom/IGESGeom_ToolCurveOnSurface.cxx @@ -18,10 +18,8 @@ #include #include -#include #include #include -#include #include #include #include @@ -31,9 +29,7 @@ #include #include #include -#include #include -#include // MGE 30/07/98 //======================================================================= diff --git a/src/IGESGeom/IGESGeom_ToolCurveOnSurface.hxx b/src/IGESGeom/IGESGeom_ToolCurveOnSurface.hxx index f90709b055..bc836fedeb 100644 --- a/src/IGESGeom/IGESGeom_ToolCurveOnSurface.hxx +++ b/src/IGESGeom/IGESGeom_ToolCurveOnSurface.hxx @@ -21,7 +21,6 @@ #include #include -#include #include class IGESGeom_CurveOnSurface; class IGESData_IGESReaderData; diff --git a/src/IGESGeom/IGESGeom_ToolDirection.cxx b/src/IGESGeom/IGESGeom_ToolDirection.cxx index cc99544e21..686c948ff2 100644 --- a/src/IGESGeom/IGESGeom_ToolDirection.cxx +++ b/src/IGESGeom/IGESGeom_ToolDirection.cxx @@ -24,14 +24,12 @@ #include #include #include -#include #include #include #include #include #include #include -#include #include #include diff --git a/src/IGESGeom/IGESGeom_ToolFlash.cxx b/src/IGESGeom/IGESGeom_ToolFlash.cxx index 4d1d4c7ce6..e51d1f1e59 100644 --- a/src/IGESGeom/IGESGeom_ToolFlash.cxx +++ b/src/IGESGeom/IGESGeom_ToolFlash.cxx @@ -21,11 +21,9 @@ #include #include #include -#include #include #include #include -#include #include #include #include diff --git a/src/IGESGeom/IGESGeom_ToolFlash.hxx b/src/IGESGeom/IGESGeom_ToolFlash.hxx index b99fea440c..6c776cfdf9 100644 --- a/src/IGESGeom/IGESGeom_ToolFlash.hxx +++ b/src/IGESGeom/IGESGeom_ToolFlash.hxx @@ -21,7 +21,6 @@ #include #include -#include #include class IGESGeom_Flash; class IGESData_IGESReaderData; diff --git a/src/IGESGeom/IGESGeom_ToolLine.cxx b/src/IGESGeom/IGESGeom_ToolLine.cxx index b501886540..1076950c42 100644 --- a/src/IGESGeom/IGESGeom_ToolLine.cxx +++ b/src/IGESGeom/IGESGeom_ToolLine.cxx @@ -23,16 +23,13 @@ #include #include #include -#include #include #include #include #include #include #include -#include #include -#include #include #include diff --git a/src/IGESGeom/IGESGeom_ToolOffsetCurve.cxx b/src/IGESGeom/IGESGeom_ToolOffsetCurve.cxx index 23dd13af62..2feae9f38b 100644 --- a/src/IGESGeom/IGESGeom_ToolOffsetCurve.cxx +++ b/src/IGESGeom/IGESGeom_ToolOffsetCurve.cxx @@ -23,10 +23,8 @@ #include #include #include -#include #include #include -#include #include #include #include @@ -36,7 +34,6 @@ #include #include #include -#include #include #include diff --git a/src/IGESGeom/IGESGeom_ToolOffsetCurve.hxx b/src/IGESGeom/IGESGeom_ToolOffsetCurve.hxx index 183c98d8cd..8754fd3136 100644 --- a/src/IGESGeom/IGESGeom_ToolOffsetCurve.hxx +++ b/src/IGESGeom/IGESGeom_ToolOffsetCurve.hxx @@ -21,7 +21,6 @@ #include #include -#include #include class IGESGeom_OffsetCurve; class IGESData_IGESReaderData; diff --git a/src/IGESGeom/IGESGeom_ToolOffsetSurface.cxx b/src/IGESGeom/IGESGeom_ToolOffsetSurface.cxx index 4a0151b7a2..ed237e7882 100644 --- a/src/IGESGeom/IGESGeom_ToolOffsetSurface.cxx +++ b/src/IGESGeom/IGESGeom_ToolOffsetSurface.cxx @@ -21,10 +21,8 @@ #include #include #include -#include #include #include -#include #include #include #include @@ -34,7 +32,6 @@ #include #include #include -#include #include #include diff --git a/src/IGESGeom/IGESGeom_ToolPlane.cxx b/src/IGESGeom/IGESGeom_ToolPlane.cxx index f67a9bda37..6c39c7ae6f 100644 --- a/src/IGESGeom/IGESGeom_ToolPlane.cxx +++ b/src/IGESGeom/IGESGeom_ToolPlane.cxx @@ -21,10 +21,8 @@ #include #include #include -#include #include #include -#include #include #include #include @@ -35,7 +33,6 @@ #include #include #include -#include #include #include diff --git a/src/IGESGeom/IGESGeom_ToolPoint.cxx b/src/IGESGeom/IGESGeom_ToolPoint.cxx index 670f11fc7b..84b1fd8dad 100644 --- a/src/IGESGeom/IGESGeom_ToolPoint.cxx +++ b/src/IGESGeom/IGESGeom_ToolPoint.cxx @@ -24,7 +24,6 @@ #include #include #include -#include #include #include #include @@ -34,7 +33,6 @@ #include #include #include -#include #include #include diff --git a/src/IGESGeom/IGESGeom_ToolRuledSurface.cxx b/src/IGESGeom/IGESGeom_ToolRuledSurface.cxx index 92cba6e94e..23e5fd0db0 100644 --- a/src/IGESGeom/IGESGeom_ToolRuledSurface.cxx +++ b/src/IGESGeom/IGESGeom_ToolRuledSurface.cxx @@ -18,10 +18,8 @@ #include #include -#include #include #include -#include #include #include #include @@ -31,9 +29,7 @@ #include #include #include -#include #include -#include // MGE 31/07/98 IGESGeom_ToolRuledSurface::IGESGeom_ToolRuledSurface () { } diff --git a/src/IGESGeom/IGESGeom_ToolSplineCurve.cxx b/src/IGESGeom/IGESGeom_ToolSplineCurve.cxx index b4d0a938f9..0370e5468d 100644 --- a/src/IGESGeom/IGESGeom_ToolSplineCurve.cxx +++ b/src/IGESGeom/IGESGeom_ToolSplineCurve.cxx @@ -21,17 +21,14 @@ #include #include #include -#include #include #include #include #include #include #include -#include #include #include -#include #include #include diff --git a/src/IGESGeom/IGESGeom_ToolSplineSurface.cxx b/src/IGESGeom/IGESGeom_ToolSplineSurface.cxx index 62dd755543..8f76654149 100644 --- a/src/IGESGeom/IGESGeom_ToolSplineSurface.cxx +++ b/src/IGESGeom/IGESGeom_ToolSplineSurface.cxx @@ -22,14 +22,12 @@ #include #include #include -#include #include #include #include #include #include #include -#include #include #include #include diff --git a/src/IGESGeom/IGESGeom_ToolSurfaceOfRevolution.cxx b/src/IGESGeom/IGESGeom_ToolSurfaceOfRevolution.cxx index c5bd1e9953..341c8f55f7 100644 --- a/src/IGESGeom/IGESGeom_ToolSurfaceOfRevolution.cxx +++ b/src/IGESGeom/IGESGeom_ToolSurfaceOfRevolution.cxx @@ -18,10 +18,8 @@ #include #include -#include #include #include -#include #include #include #include @@ -33,7 +31,6 @@ #include #include #include -#include // MGE 31/07/98 IGESGeom_ToolSurfaceOfRevolution::IGESGeom_ToolSurfaceOfRevolution () { } diff --git a/src/IGESGeom/IGESGeom_ToolTabulatedCylinder.cxx b/src/IGESGeom/IGESGeom_ToolTabulatedCylinder.cxx index 63799c5471..6991099c0a 100644 --- a/src/IGESGeom/IGESGeom_ToolTabulatedCylinder.cxx +++ b/src/IGESGeom/IGESGeom_ToolTabulatedCylinder.cxx @@ -21,10 +21,8 @@ #include #include #include -#include #include #include -#include #include #include #include diff --git a/src/IGESGeom/IGESGeom_ToolTransformationMatrix.cxx b/src/IGESGeom/IGESGeom_ToolTransformationMatrix.cxx index fb35ebf9fb..f00df51ea5 100644 --- a/src/IGESGeom/IGESGeom_ToolTransformationMatrix.cxx +++ b/src/IGESGeom/IGESGeom_ToolTransformationMatrix.cxx @@ -21,17 +21,14 @@ #include #include #include -#include #include #include #include #include #include #include -#include #include #include -#include #include // MGE 03/08/98 diff --git a/src/IGESGeom/IGESGeom_ToolTransformationMatrix.hxx b/src/IGESGeom/IGESGeom_ToolTransformationMatrix.hxx index 2de678f61d..e504ce41ed 100644 --- a/src/IGESGeom/IGESGeom_ToolTransformationMatrix.hxx +++ b/src/IGESGeom/IGESGeom_ToolTransformationMatrix.hxx @@ -21,7 +21,6 @@ #include #include -#include #include class IGESGeom_TransformationMatrix; class IGESData_IGESReaderData; diff --git a/src/IGESGeom/IGESGeom_ToolTrimmedSurface.cxx b/src/IGESGeom/IGESGeom_ToolTrimmedSurface.cxx index 152a0ff84e..425d8b01d5 100644 --- a/src/IGESGeom/IGESGeom_ToolTrimmedSurface.cxx +++ b/src/IGESGeom/IGESGeom_ToolTrimmedSurface.cxx @@ -19,14 +19,10 @@ #include #include #include -#include #include #include -#include #include #include -#include -#include #include #include #include @@ -35,7 +31,6 @@ #include #include #include -#include // MGE 31/07/98 //======================================================================= diff --git a/src/IGESGeom/IGESGeom_TransformationMatrix.hxx b/src/IGESGeom/IGESGeom_TransformationMatrix.hxx index 291c2c5124..2ab6fc6273 100644 --- a/src/IGESGeom/IGESGeom_TransformationMatrix.hxx +++ b/src/IGESGeom/IGESGeom_TransformationMatrix.hxx @@ -23,7 +23,6 @@ #include #include #include -#include class gp_GTrsf; diff --git a/src/IGESGeom/IGESGeom_TrimmedSurface.cxx b/src/IGESGeom/IGESGeom_TrimmedSurface.cxx index 24cc2ba49a..ee7f7c5c36 100644 --- a/src/IGESGeom/IGESGeom_TrimmedSurface.cxx +++ b/src/IGESGeom/IGESGeom_TrimmedSurface.cxx @@ -16,11 +16,8 @@ //-------------------------------------------------------------------- //-------------------------------------------------------------------- -#include -#include #include #include -#include #include IMPLEMENT_STANDARD_RTTIEXT(IGESGeom_TrimmedSurface,IGESData_IGESEntity) diff --git a/src/IGESGeom/IGESGeom_TrimmedSurface.hxx b/src/IGESGeom/IGESGeom_TrimmedSurface.hxx index 37fdd9cf5b..86800a5b50 100644 --- a/src/IGESGeom/IGESGeom_TrimmedSurface.hxx +++ b/src/IGESGeom/IGESGeom_TrimmedSurface.hxx @@ -18,12 +18,10 @@ #define _IGESGeom_TrimmedSurface_HeaderFile #include -#include #include #include #include -#include class IGESGeom_CurveOnSurface; diff --git a/src/IGESGraph/IGESGraph_Color.hxx b/src/IGESGraph/IGESGraph_Color.hxx index f41a955c74..6fe48ae028 100644 --- a/src/IGESGraph/IGESGraph_Color.hxx +++ b/src/IGESGraph/IGESGraph_Color.hxx @@ -18,11 +18,9 @@ #define _IGESGraph_Color_HeaderFile #include -#include #include #include -#include class TCollection_HAsciiString; diff --git a/src/IGESGraph/IGESGraph_DefinitionLevel.cxx b/src/IGESGraph/IGESGraph_DefinitionLevel.cxx index cb25768feb..d0021a94f3 100644 --- a/src/IGESGraph/IGESGraph_DefinitionLevel.cxx +++ b/src/IGESGraph/IGESGraph_DefinitionLevel.cxx @@ -18,7 +18,6 @@ #include #include -#include #include IMPLEMENT_STANDARD_RTTIEXT(IGESGraph_DefinitionLevel,IGESData_LevelListEntity) diff --git a/src/IGESGraph/IGESGraph_DefinitionLevel.hxx b/src/IGESGraph/IGESGraph_DefinitionLevel.hxx index 96ad8bec40..776289d680 100644 --- a/src/IGESGraph/IGESGraph_DefinitionLevel.hxx +++ b/src/IGESGraph/IGESGraph_DefinitionLevel.hxx @@ -18,7 +18,6 @@ #define _IGESGraph_DefinitionLevel_HeaderFile #include -#include #include #include diff --git a/src/IGESGraph/IGESGraph_DrawingSize.hxx b/src/IGESGraph/IGESGraph_DrawingSize.hxx index 23c030ed8a..806f8b2f23 100644 --- a/src/IGESGraph/IGESGraph_DrawingSize.hxx +++ b/src/IGESGraph/IGESGraph_DrawingSize.hxx @@ -18,7 +18,6 @@ #define _IGESGraph_DrawingSize_HeaderFile #include -#include #include #include diff --git a/src/IGESGraph/IGESGraph_DrawingUnits.hxx b/src/IGESGraph/IGESGraph_DrawingUnits.hxx index c1b75692d8..7b2a5f35c2 100644 --- a/src/IGESGraph/IGESGraph_DrawingUnits.hxx +++ b/src/IGESGraph/IGESGraph_DrawingUnits.hxx @@ -18,7 +18,6 @@ #define _IGESGraph_DrawingUnits_HeaderFile #include -#include #include #include diff --git a/src/IGESGraph/IGESGraph_GeneralModule.cxx b/src/IGESGraph/IGESGraph_GeneralModule.cxx index 696fc7f0e1..8b5b954dba 100644 --- a/src/IGESGraph/IGESGraph_GeneralModule.cxx +++ b/src/IGESGraph/IGESGraph_GeneralModule.cxx @@ -13,7 +13,6 @@ #include -#include #include #include #include diff --git a/src/IGESGraph/IGESGraph_GeneralModule.hxx b/src/IGESGraph/IGESGraph_GeneralModule.hxx index 9159cdf0d6..d4cb4a8e65 100644 --- a/src/IGESGraph/IGESGraph_GeneralModule.hxx +++ b/src/IGESGraph/IGESGraph_GeneralModule.hxx @@ -22,7 +22,6 @@ #include #include -#include class IGESData_IGESEntity; class Interface_EntityIterator; class IGESData_DirChecker; diff --git a/src/IGESGraph/IGESGraph_HArray1OfColor.hxx b/src/IGESGraph/IGESGraph_HArray1OfColor.hxx index bd0f76576d..1224a033e9 100644 --- a/src/IGESGraph/IGESGraph_HArray1OfColor.hxx +++ b/src/IGESGraph/IGESGraph_HArray1OfColor.hxx @@ -17,7 +17,6 @@ #ifndef IGESGraph_HArray1OfColor_HeaderFile #define IGESGraph_HArray1OfColor_HeaderFile -#include #include #include diff --git a/src/IGESGraph/IGESGraph_HArray1OfTextDisplayTemplate.hxx b/src/IGESGraph/IGESGraph_HArray1OfTextDisplayTemplate.hxx index 913d5879d5..e572060815 100644 --- a/src/IGESGraph/IGESGraph_HArray1OfTextDisplayTemplate.hxx +++ b/src/IGESGraph/IGESGraph_HArray1OfTextDisplayTemplate.hxx @@ -17,7 +17,6 @@ #ifndef IGESGraph_HArray1OfTextDisplayTemplate_HeaderFile #define IGESGraph_HArray1OfTextDisplayTemplate_HeaderFile -#include #include #include diff --git a/src/IGESGraph/IGESGraph_HArray1OfTextFontDef.hxx b/src/IGESGraph/IGESGraph_HArray1OfTextFontDef.hxx index 3bc10131d3..4e77e5bdd5 100644 --- a/src/IGESGraph/IGESGraph_HArray1OfTextFontDef.hxx +++ b/src/IGESGraph/IGESGraph_HArray1OfTextFontDef.hxx @@ -17,7 +17,6 @@ #ifndef IGESGraph_HArray1OfTextFontDef_HeaderFile #define IGESGraph_HArray1OfTextFontDef_HeaderFile -#include #include #include diff --git a/src/IGESGraph/IGESGraph_HighLight.hxx b/src/IGESGraph/IGESGraph_HighLight.hxx index 84c1ed9aa9..6eb78e2919 100644 --- a/src/IGESGraph/IGESGraph_HighLight.hxx +++ b/src/IGESGraph/IGESGraph_HighLight.hxx @@ -18,11 +18,9 @@ #define _IGESGraph_HighLight_HeaderFile #include -#include #include #include -#include class IGESGraph_HighLight; diff --git a/src/IGESGraph/IGESGraph_IntercharacterSpacing.hxx b/src/IGESGraph/IGESGraph_IntercharacterSpacing.hxx index d874ec523b..03b1a125f4 100644 --- a/src/IGESGraph/IGESGraph_IntercharacterSpacing.hxx +++ b/src/IGESGraph/IGESGraph_IntercharacterSpacing.hxx @@ -18,7 +18,6 @@ #define _IGESGraph_IntercharacterSpacing_HeaderFile #include -#include #include #include diff --git a/src/IGESGraph/IGESGraph_LineFontDefPattern.cxx b/src/IGESGraph/IGESGraph_LineFontDefPattern.cxx index 7e45a1fd2e..8d21ad4187 100644 --- a/src/IGESGraph/IGESGraph_LineFontDefPattern.cxx +++ b/src/IGESGraph/IGESGraph_LineFontDefPattern.cxx @@ -18,7 +18,6 @@ #include #include -#include #include #include diff --git a/src/IGESGraph/IGESGraph_LineFontDefPattern.hxx b/src/IGESGraph/IGESGraph_LineFontDefPattern.hxx index d73be07995..a1bfdd7283 100644 --- a/src/IGESGraph/IGESGraph_LineFontDefPattern.hxx +++ b/src/IGESGraph/IGESGraph_LineFontDefPattern.hxx @@ -18,13 +18,11 @@ #define _IGESGraph_LineFontDefPattern_HeaderFile #include -#include #include #include #include #include -#include class TCollection_HAsciiString; diff --git a/src/IGESGraph/IGESGraph_LineFontDefTemplate.hxx b/src/IGESGraph/IGESGraph_LineFontDefTemplate.hxx index 5e7284b22e..04dbe6f5e9 100644 --- a/src/IGESGraph/IGESGraph_LineFontDefTemplate.hxx +++ b/src/IGESGraph/IGESGraph_LineFontDefTemplate.hxx @@ -21,7 +21,6 @@ #include #include -#include #include class IGESBasic_SubfigureDef; diff --git a/src/IGESGraph/IGESGraph_LineFontPredefined.hxx b/src/IGESGraph/IGESGraph_LineFontPredefined.hxx index 2ab2019c05..ec4c3d83ce 100644 --- a/src/IGESGraph/IGESGraph_LineFontPredefined.hxx +++ b/src/IGESGraph/IGESGraph_LineFontPredefined.hxx @@ -18,7 +18,6 @@ #define _IGESGraph_LineFontPredefined_HeaderFile #include -#include #include #include diff --git a/src/IGESGraph/IGESGraph_NominalSize.hxx b/src/IGESGraph/IGESGraph_NominalSize.hxx index bf6d1e0a0f..6ac241c4c5 100644 --- a/src/IGESGraph/IGESGraph_NominalSize.hxx +++ b/src/IGESGraph/IGESGraph_NominalSize.hxx @@ -18,12 +18,10 @@ #define _IGESGraph_NominalSize_HeaderFile #include -#include #include #include #include -#include class TCollection_HAsciiString; diff --git a/src/IGESGraph/IGESGraph_Pick.hxx b/src/IGESGraph/IGESGraph_Pick.hxx index fdeab96acf..7064a21efe 100644 --- a/src/IGESGraph/IGESGraph_Pick.hxx +++ b/src/IGESGraph/IGESGraph_Pick.hxx @@ -18,11 +18,9 @@ #define _IGESGraph_Pick_HeaderFile #include -#include #include #include -#include class IGESGraph_Pick; diff --git a/src/IGESGraph/IGESGraph_Protocol.hxx b/src/IGESGraph/IGESGraph_Protocol.hxx index 5bf94b3c34..5ac46cc7e4 100644 --- a/src/IGESGraph/IGESGraph_Protocol.hxx +++ b/src/IGESGraph/IGESGraph_Protocol.hxx @@ -22,7 +22,6 @@ #include #include -#include class Interface_Protocol; diff --git a/src/IGESGraph/IGESGraph_ReadWriteModule.cxx b/src/IGESGraph/IGESGraph_ReadWriteModule.cxx index 997f43d69e..ffd849c7b5 100644 --- a/src/IGESGraph/IGESGraph_ReadWriteModule.cxx +++ b/src/IGESGraph/IGESGraph_ReadWriteModule.cxx @@ -12,7 +12,6 @@ // commercial license or contractual agreement. -#include #include #include #include @@ -46,7 +45,6 @@ #include #include #include -#include #include IMPLEMENT_STANDARD_RTTIEXT(IGESGraph_ReadWriteModule,IGESData_ReadWriteModule) diff --git a/src/IGESGraph/IGESGraph_SpecificModule.cxx b/src/IGESGraph/IGESGraph_SpecificModule.cxx index 2998a690d9..45981bd7c0 100644 --- a/src/IGESGraph/IGESGraph_SpecificModule.cxx +++ b/src/IGESGraph/IGESGraph_SpecificModule.cxx @@ -13,7 +13,6 @@ #include -#include #include #include #include diff --git a/src/IGESGraph/IGESGraph_SpecificModule.hxx b/src/IGESGraph/IGESGraph_SpecificModule.hxx index 18440234ae..7577a4726c 100644 --- a/src/IGESGraph/IGESGraph_SpecificModule.hxx +++ b/src/IGESGraph/IGESGraph_SpecificModule.hxx @@ -22,7 +22,6 @@ #include #include -#include class IGESData_IGESEntity; class IGESData_IGESDumper; diff --git a/src/IGESGraph/IGESGraph_TextDisplayTemplate.hxx b/src/IGESGraph/IGESGraph_TextDisplayTemplate.hxx index 835df461a6..4b31c8957b 100644 --- a/src/IGESGraph/IGESGraph_TextDisplayTemplate.hxx +++ b/src/IGESGraph/IGESGraph_TextDisplayTemplate.hxx @@ -20,11 +20,9 @@ #include #include -#include #include #include #include -#include class IGESGraph_TextFontDef; class gp_Pnt; diff --git a/src/IGESGraph/IGESGraph_TextFontDef.cxx b/src/IGESGraph/IGESGraph_TextFontDef.cxx index e5bf6cfe62..d9642e8220 100644 --- a/src/IGESGraph/IGESGraph_TextFontDef.cxx +++ b/src/IGESGraph/IGESGraph_TextFontDef.cxx @@ -19,7 +19,6 @@ #include #include #include -#include #include #include diff --git a/src/IGESGraph/IGESGraph_TextFontDef.hxx b/src/IGESGraph/IGESGraph_TextFontDef.hxx index 366451b282..85ccf07701 100644 --- a/src/IGESGraph/IGESGraph_TextFontDef.hxx +++ b/src/IGESGraph/IGESGraph_TextFontDef.hxx @@ -23,7 +23,6 @@ #include #include #include -#include class TCollection_HAsciiString; class IGESBasic_HArray1OfHArray1OfInteger; diff --git a/src/IGESGraph/IGESGraph_ToolColor.cxx b/src/IGESGraph/IGESGraph_ToolColor.cxx index be7a710f95..d9d49dca18 100644 --- a/src/IGESGraph/IGESGraph_ToolColor.cxx +++ b/src/IGESGraph/IGESGraph_ToolColor.cxx @@ -21,17 +21,14 @@ #include #include #include -#include #include #include #include #include #include #include -#include #include #include -#include #include IGESGraph_ToolColor::IGESGraph_ToolColor () { } diff --git a/src/IGESGraph/IGESGraph_ToolDefinitionLevel.cxx b/src/IGESGraph/IGESGraph_ToolDefinitionLevel.cxx index 486862f35d..4738adb9f6 100644 --- a/src/IGESGraph/IGESGraph_ToolDefinitionLevel.cxx +++ b/src/IGESGraph/IGESGraph_ToolDefinitionLevel.cxx @@ -21,17 +21,14 @@ #include #include #include -#include #include #include #include #include #include #include -#include #include #include -#include #include IGESGraph_ToolDefinitionLevel::IGESGraph_ToolDefinitionLevel () { } diff --git a/src/IGESGraph/IGESGraph_ToolDrawingSize.cxx b/src/IGESGraph/IGESGraph_ToolDrawingSize.cxx index cd60387ca7..bcbeb39eeb 100644 --- a/src/IGESGraph/IGESGraph_ToolDrawingSize.cxx +++ b/src/IGESGraph/IGESGraph_ToolDrawingSize.cxx @@ -20,7 +20,6 @@ #include #include #include -#include #include #include #include @@ -28,8 +27,6 @@ #include #include #include -#include -#include IGESGraph_ToolDrawingSize::IGESGraph_ToolDrawingSize () { } diff --git a/src/IGESGraph/IGESGraph_ToolDrawingSize.hxx b/src/IGESGraph/IGESGraph_ToolDrawingSize.hxx index f29e14d865..914d97aa3e 100644 --- a/src/IGESGraph/IGESGraph_ToolDrawingSize.hxx +++ b/src/IGESGraph/IGESGraph_ToolDrawingSize.hxx @@ -21,7 +21,6 @@ #include #include -#include #include class IGESGraph_DrawingSize; class IGESData_IGESReaderData; diff --git a/src/IGESGraph/IGESGraph_ToolDrawingUnits.cxx b/src/IGESGraph/IGESGraph_ToolDrawingUnits.cxx index a98f2735a4..e8ec8ee021 100644 --- a/src/IGESGraph/IGESGraph_ToolDrawingUnits.cxx +++ b/src/IGESGraph/IGESGraph_ToolDrawingUnits.cxx @@ -21,17 +21,14 @@ #include #include #include -#include #include #include #include #include #include #include -#include #include #include -#include #include IGESGraph_ToolDrawingUnits::IGESGraph_ToolDrawingUnits () { } diff --git a/src/IGESGraph/IGESGraph_ToolDrawingUnits.hxx b/src/IGESGraph/IGESGraph_ToolDrawingUnits.hxx index 3b2345ac2a..96dfe69136 100644 --- a/src/IGESGraph/IGESGraph_ToolDrawingUnits.hxx +++ b/src/IGESGraph/IGESGraph_ToolDrawingUnits.hxx @@ -21,7 +21,6 @@ #include #include -#include #include class IGESGraph_DrawingUnits; class IGESData_IGESReaderData; diff --git a/src/IGESGraph/IGESGraph_ToolHighLight.cxx b/src/IGESGraph/IGESGraph_ToolHighLight.cxx index b77f83f6ed..9e2be289d8 100644 --- a/src/IGESGraph/IGESGraph_ToolHighLight.cxx +++ b/src/IGESGraph/IGESGraph_ToolHighLight.cxx @@ -20,7 +20,6 @@ #include #include #include -#include #include #include #include @@ -28,8 +27,6 @@ #include #include #include -#include -#include IGESGraph_ToolHighLight::IGESGraph_ToolHighLight () { } diff --git a/src/IGESGraph/IGESGraph_ToolHighLight.hxx b/src/IGESGraph/IGESGraph_ToolHighLight.hxx index 4667727b17..4ab79b28cc 100644 --- a/src/IGESGraph/IGESGraph_ToolHighLight.hxx +++ b/src/IGESGraph/IGESGraph_ToolHighLight.hxx @@ -21,7 +21,6 @@ #include #include -#include #include class IGESGraph_HighLight; class IGESData_IGESReaderData; diff --git a/src/IGESGraph/IGESGraph_ToolIntercharacterSpacing.cxx b/src/IGESGraph/IGESGraph_ToolIntercharacterSpacing.cxx index d6fef26833..01840365f6 100644 --- a/src/IGESGraph/IGESGraph_ToolIntercharacterSpacing.cxx +++ b/src/IGESGraph/IGESGraph_ToolIntercharacterSpacing.cxx @@ -20,7 +20,6 @@ #include #include #include -#include #include #include #include @@ -28,8 +27,6 @@ #include #include #include -#include -#include IGESGraph_ToolIntercharacterSpacing::IGESGraph_ToolIntercharacterSpacing () { } diff --git a/src/IGESGraph/IGESGraph_ToolIntercharacterSpacing.hxx b/src/IGESGraph/IGESGraph_ToolIntercharacterSpacing.hxx index 4f3ca236b9..51338b6e85 100644 --- a/src/IGESGraph/IGESGraph_ToolIntercharacterSpacing.hxx +++ b/src/IGESGraph/IGESGraph_ToolIntercharacterSpacing.hxx @@ -21,7 +21,6 @@ #include #include -#include #include class IGESGraph_IntercharacterSpacing; class IGESData_IGESReaderData; diff --git a/src/IGESGraph/IGESGraph_ToolLineFontDefPattern.cxx b/src/IGESGraph/IGESGraph_ToolLineFontDefPattern.cxx index e057ef55c3..e9fad05cb6 100644 --- a/src/IGESGraph/IGESGraph_ToolLineFontDefPattern.cxx +++ b/src/IGESGraph/IGESGraph_ToolLineFontDefPattern.cxx @@ -21,16 +21,13 @@ #include #include #include -#include #include #include #include #include #include #include -#include #include -#include #include #include diff --git a/src/IGESGraph/IGESGraph_ToolLineFontDefTemplate.cxx b/src/IGESGraph/IGESGraph_ToolLineFontDefTemplate.cxx index b2d581b0b2..9e3bf9f607 100644 --- a/src/IGESGraph/IGESGraph_ToolLineFontDefTemplate.cxx +++ b/src/IGESGraph/IGESGraph_ToolLineFontDefTemplate.cxx @@ -21,7 +21,6 @@ #include #include #include -#include #include #include #include @@ -31,7 +30,6 @@ #include #include #include -#include IGESGraph_ToolLineFontDefTemplate::IGESGraph_ToolLineFontDefTemplate () { } diff --git a/src/IGESGraph/IGESGraph_ToolLineFontPredefined.cxx b/src/IGESGraph/IGESGraph_ToolLineFontPredefined.cxx index 15af838628..97c7e89edc 100644 --- a/src/IGESGraph/IGESGraph_ToolLineFontPredefined.cxx +++ b/src/IGESGraph/IGESGraph_ToolLineFontPredefined.cxx @@ -20,7 +20,6 @@ #include #include #include -#include #include #include #include @@ -28,8 +27,6 @@ #include #include #include -#include -#include IGESGraph_ToolLineFontPredefined::IGESGraph_ToolLineFontPredefined () { } diff --git a/src/IGESGraph/IGESGraph_ToolLineFontPredefined.hxx b/src/IGESGraph/IGESGraph_ToolLineFontPredefined.hxx index ab55e97c1d..5ab8052fb5 100644 --- a/src/IGESGraph/IGESGraph_ToolLineFontPredefined.hxx +++ b/src/IGESGraph/IGESGraph_ToolLineFontPredefined.hxx @@ -21,7 +21,6 @@ #include #include -#include #include class IGESGraph_LineFontPredefined; class IGESData_IGESReaderData; diff --git a/src/IGESGraph/IGESGraph_ToolNominalSize.cxx b/src/IGESGraph/IGESGraph_ToolNominalSize.cxx index 69ed53aeb2..eb9ebe5da6 100644 --- a/src/IGESGraph/IGESGraph_ToolNominalSize.cxx +++ b/src/IGESGraph/IGESGraph_ToolNominalSize.cxx @@ -21,17 +21,14 @@ #include #include #include -#include #include #include #include #include #include #include -#include #include #include -#include #include IGESGraph_ToolNominalSize::IGESGraph_ToolNominalSize () { } diff --git a/src/IGESGraph/IGESGraph_ToolNominalSize.hxx b/src/IGESGraph/IGESGraph_ToolNominalSize.hxx index 6de74471b7..b05019d3c9 100644 --- a/src/IGESGraph/IGESGraph_ToolNominalSize.hxx +++ b/src/IGESGraph/IGESGraph_ToolNominalSize.hxx @@ -21,7 +21,6 @@ #include #include -#include #include class IGESGraph_NominalSize; class IGESData_IGESReaderData; diff --git a/src/IGESGraph/IGESGraph_ToolPick.cxx b/src/IGESGraph/IGESGraph_ToolPick.cxx index b5741f4bdb..abeafb6292 100644 --- a/src/IGESGraph/IGESGraph_ToolPick.cxx +++ b/src/IGESGraph/IGESGraph_ToolPick.cxx @@ -20,7 +20,6 @@ #include #include #include -#include #include #include #include @@ -28,8 +27,6 @@ #include #include #include -#include -#include IGESGraph_ToolPick::IGESGraph_ToolPick () { } diff --git a/src/IGESGraph/IGESGraph_ToolPick.hxx b/src/IGESGraph/IGESGraph_ToolPick.hxx index 8620ef8161..fff02efad4 100644 --- a/src/IGESGraph/IGESGraph_ToolPick.hxx +++ b/src/IGESGraph/IGESGraph_ToolPick.hxx @@ -21,7 +21,6 @@ #include #include -#include #include class IGESGraph_Pick; class IGESData_IGESReaderData; diff --git a/src/IGESGraph/IGESGraph_ToolTextDisplayTemplate.cxx b/src/IGESGraph/IGESGraph_ToolTextDisplayTemplate.cxx index 4f6d857bcc..0b5ea92caa 100644 --- a/src/IGESGraph/IGESGraph_ToolTextDisplayTemplate.cxx +++ b/src/IGESGraph/IGESGraph_ToolTextDisplayTemplate.cxx @@ -24,7 +24,6 @@ #include #include #include -#include #include #include #include @@ -35,7 +34,6 @@ #include #include #include -#include IGESGraph_ToolTextDisplayTemplate::IGESGraph_ToolTextDisplayTemplate () { } diff --git a/src/IGESGraph/IGESGraph_ToolTextFontDef.cxx b/src/IGESGraph/IGESGraph_ToolTextFontDef.cxx index d3ee2af01b..a302090d41 100644 --- a/src/IGESGraph/IGESGraph_ToolTextFontDef.cxx +++ b/src/IGESGraph/IGESGraph_ToolTextFontDef.cxx @@ -20,20 +20,17 @@ #include #include #include -#include #include #include #include #include #include -#include #include #include #include #include #include #include -#include #include #include #include diff --git a/src/IGESGraph/IGESGraph_ToolUniformRectGrid.cxx b/src/IGESGraph/IGESGraph_ToolUniformRectGrid.cxx index a3c813ede9..c316ecf0a0 100644 --- a/src/IGESGraph/IGESGraph_ToolUniformRectGrid.cxx +++ b/src/IGESGraph/IGESGraph_ToolUniformRectGrid.cxx @@ -24,7 +24,6 @@ #include #include #include -#include #include #include #include diff --git a/src/IGESGraph/IGESGraph_ToolUniformRectGrid.hxx b/src/IGESGraph/IGESGraph_ToolUniformRectGrid.hxx index 3217b47bc5..2dc0c687a8 100644 --- a/src/IGESGraph/IGESGraph_ToolUniformRectGrid.hxx +++ b/src/IGESGraph/IGESGraph_ToolUniformRectGrid.hxx @@ -21,7 +21,6 @@ #include #include -#include #include class IGESGraph_UniformRectGrid; class IGESData_IGESReaderData; diff --git a/src/IGESGraph/IGESGraph_UniformRectGrid.hxx b/src/IGESGraph/IGESGraph_UniformRectGrid.hxx index a543ad8921..a511853fb2 100644 --- a/src/IGESGraph/IGESGraph_UniformRectGrid.hxx +++ b/src/IGESGraph/IGESGraph_UniformRectGrid.hxx @@ -23,7 +23,6 @@ #include #include #include -#include class gp_Pnt2d; class gp_Vec2d; diff --git a/src/IGESSelect/IGESSelect_Activator.cxx b/src/IGESSelect/IGESSelect_Activator.cxx index 396e877881..48a60c95a7 100644 --- a/src/IGESSelect/IGESSelect_Activator.cxx +++ b/src/IGESSelect/IGESSelect_Activator.cxx @@ -16,11 +16,9 @@ #include #include #include -#include #include #include #include -#include #include #include #include @@ -46,11 +44,9 @@ #include #include #include -#include #include #include #include -#include #include #include #include diff --git a/src/IGESSelect/IGESSelect_Activator.hxx b/src/IGESSelect/IGESSelect_Activator.hxx index c5d30954b5..45a5c82ce7 100644 --- a/src/IGESSelect/IGESSelect_Activator.hxx +++ b/src/IGESSelect/IGESSelect_Activator.hxx @@ -23,7 +23,6 @@ #include #include #include -#include class IFSelect_SessionPilot; diff --git a/src/IGESSelect/IGESSelect_AddFileComment.hxx b/src/IGESSelect/IGESSelect_AddFileComment.hxx index 3cf8aadb19..433bd1a1b7 100644 --- a/src/IGESSelect/IGESSelect_AddFileComment.hxx +++ b/src/IGESSelect/IGESSelect_AddFileComment.hxx @@ -22,7 +22,6 @@ #include #include -#include #include class IFSelect_ContextWrite; class IGESData_IGESWriter; diff --git a/src/IGESSelect/IGESSelect_ChangeLevelList.cxx b/src/IGESSelect/IGESSelect_ChangeLevelList.cxx index 62157c0c2e..8688cebe09 100644 --- a/src/IGESSelect/IGESSelect_ChangeLevelList.cxx +++ b/src/IGESSelect/IGESSelect_ChangeLevelList.cxx @@ -17,7 +17,6 @@ #include #include -#include #include #include #include diff --git a/src/IGESSelect/IGESSelect_ChangeLevelList.hxx b/src/IGESSelect/IGESSelect_ChangeLevelList.hxx index 28100fae38..8a3c8bdc93 100644 --- a/src/IGESSelect/IGESSelect_ChangeLevelList.hxx +++ b/src/IGESSelect/IGESSelect_ChangeLevelList.hxx @@ -21,7 +21,6 @@ #include #include -#include class IFSelect_IntParam; class IFSelect_ContextModif; class IGESData_IGESModel; diff --git a/src/IGESSelect/IGESSelect_ChangeLevelNumber.cxx b/src/IGESSelect/IGESSelect_ChangeLevelNumber.cxx index 08c5d16c98..5459186240 100644 --- a/src/IGESSelect/IGESSelect_ChangeLevelNumber.cxx +++ b/src/IGESSelect/IGESSelect_ChangeLevelNumber.cxx @@ -17,7 +17,6 @@ #include #include -#include #include #include #include diff --git a/src/IGESSelect/IGESSelect_ChangeLevelNumber.hxx b/src/IGESSelect/IGESSelect_ChangeLevelNumber.hxx index 5197ac962a..607f3d8e81 100644 --- a/src/IGESSelect/IGESSelect_ChangeLevelNumber.hxx +++ b/src/IGESSelect/IGESSelect_ChangeLevelNumber.hxx @@ -21,7 +21,6 @@ #include #include -#include class IFSelect_IntParam; class IFSelect_ContextModif; class IGESData_IGESModel; diff --git a/src/IGESSelect/IGESSelect_DispPerDrawing.hxx b/src/IGESSelect/IGESSelect_DispPerDrawing.hxx index f18d246075..6f1c642ec2 100644 --- a/src/IGESSelect/IGESSelect_DispPerDrawing.hxx +++ b/src/IGESSelect/IGESSelect_DispPerDrawing.hxx @@ -21,7 +21,6 @@ #include #include -#include class IGESSelect_ViewSorter; class TCollection_AsciiString; class Interface_Graph; diff --git a/src/IGESSelect/IGESSelect_DispPerSingleView.hxx b/src/IGESSelect/IGESSelect_DispPerSingleView.hxx index 238e97714f..0b90040833 100644 --- a/src/IGESSelect/IGESSelect_DispPerSingleView.hxx +++ b/src/IGESSelect/IGESSelect_DispPerSingleView.hxx @@ -21,7 +21,6 @@ #include #include -#include class IGESSelect_ViewSorter; class TCollection_AsciiString; class Interface_Graph; diff --git a/src/IGESSelect/IGESSelect_Dumper.hxx b/src/IGESSelect/IGESSelect_Dumper.hxx index 3253bc5c1f..3399e12e9c 100644 --- a/src/IGESSelect/IGESSelect_Dumper.hxx +++ b/src/IGESSelect/IGESSelect_Dumper.hxx @@ -21,7 +21,6 @@ #include #include -#include class IFSelect_SessionFile; class Standard_Transient; class TCollection_AsciiString; diff --git a/src/IGESSelect/IGESSelect_EditDirPart.hxx b/src/IGESSelect/IGESSelect_EditDirPart.hxx index af59bc5733..3503e041f8 100644 --- a/src/IGESSelect/IGESSelect_EditDirPart.hxx +++ b/src/IGESSelect/IGESSelect_EditDirPart.hxx @@ -21,7 +21,6 @@ #include #include -#include #include class TCollection_AsciiString; class IFSelect_EditForm; diff --git a/src/IGESSelect/IGESSelect_EditHeader.cxx b/src/IGESSelect/IGESSelect_EditHeader.cxx index 6086a6179e..502b158b93 100644 --- a/src/IGESSelect/IGESSelect_EditHeader.cxx +++ b/src/IGESSelect/IGESSelect_EditHeader.cxx @@ -14,7 +14,6 @@ #include #include -#include #include #include #include diff --git a/src/IGESSelect/IGESSelect_EditHeader.hxx b/src/IGESSelect/IGESSelect_EditHeader.hxx index fec6df2647..9d114c5c97 100644 --- a/src/IGESSelect/IGESSelect_EditHeader.hxx +++ b/src/IGESSelect/IGESSelect_EditHeader.hxx @@ -21,7 +21,6 @@ #include #include -#include #include class TCollection_AsciiString; class IFSelect_EditForm; diff --git a/src/IGESSelect/IGESSelect_FloatFormat.hxx b/src/IGESSelect/IGESSelect_FloatFormat.hxx index d913ce2039..9698e112d0 100644 --- a/src/IGESSelect/IGESSelect_FloatFormat.hxx +++ b/src/IGESSelect/IGESSelect_FloatFormat.hxx @@ -20,12 +20,9 @@ #include #include -#include #include -#include #include #include -#include class IFSelect_ContextWrite; class IGESData_IGESWriter; diff --git a/src/IGESSelect/IGESSelect_IGESTypeForm.cxx b/src/IGESSelect/IGESSelect_IGESTypeForm.cxx index d351ee7a25..2c23ef2941 100644 --- a/src/IGESSelect/IGESSelect_IGESTypeForm.cxx +++ b/src/IGESSelect/IGESSelect_IGESTypeForm.cxx @@ -12,7 +12,6 @@ // commercial license or contractual agreement. -#include #include #include #include diff --git a/src/IGESSelect/IGESSelect_IGESTypeForm.hxx b/src/IGESSelect/IGESSelect_IGESTypeForm.hxx index 9196452c59..89657e09dc 100644 --- a/src/IGESSelect/IGESSelect_IGESTypeForm.hxx +++ b/src/IGESSelect/IGESSelect_IGESTypeForm.hxx @@ -20,7 +20,6 @@ #include #include -#include #include #include class Standard_Transient; diff --git a/src/IGESSelect/IGESSelect_ModelModifier.hxx b/src/IGESSelect/IGESSelect_ModelModifier.hxx index c59e1d2bcf..3afa2720c6 100644 --- a/src/IGESSelect/IGESSelect_ModelModifier.hxx +++ b/src/IGESSelect/IGESSelect_ModelModifier.hxx @@ -21,7 +21,6 @@ #include #include -#include class IGESData_IGESModel; class IGESData_Protocol; class IFSelect_ContextModif; diff --git a/src/IGESSelect/IGESSelect_RebuildDrawings.cxx b/src/IGESSelect/IGESSelect_RebuildDrawings.cxx index b2ce1ee5ab..6b429074ad 100644 --- a/src/IGESSelect/IGESSelect_RebuildDrawings.cxx +++ b/src/IGESSelect/IGESSelect_RebuildDrawings.cxx @@ -13,13 +13,9 @@ #include -#include #include #include -#include -#include #include -#include #include #include #include @@ -27,7 +23,6 @@ #include #include #include -#include #include #include #include diff --git a/src/IGESSelect/IGESSelect_RebuildGroups.cxx b/src/IGESSelect/IGESSelect_RebuildGroups.cxx index 7b311318e6..6b4919f043 100644 --- a/src/IGESSelect/IGESSelect_RebuildGroups.cxx +++ b/src/IGESSelect/IGESSelect_RebuildGroups.cxx @@ -13,7 +13,6 @@ #include -#include #include #include #include diff --git a/src/IGESSelect/IGESSelect_RemoveCurves.cxx b/src/IGESSelect/IGESSelect_RemoveCurves.cxx index 116b5be471..5237c0aadf 100644 --- a/src/IGESSelect/IGESSelect_RemoveCurves.cxx +++ b/src/IGESSelect/IGESSelect_RemoveCurves.cxx @@ -17,9 +17,7 @@ #include #include #include -#include #include -#include #include #include #include diff --git a/src/IGESSelect/IGESSelect_RemoveCurves.hxx b/src/IGESSelect/IGESSelect_RemoveCurves.hxx index ede9b9b99f..22adfb89ea 100644 --- a/src/IGESSelect/IGESSelect_RemoveCurves.hxx +++ b/src/IGESSelect/IGESSelect_RemoveCurves.hxx @@ -20,7 +20,6 @@ #include #include -#include #include class IFSelect_ContextModif; class IGESData_IGESModel; diff --git a/src/IGESSelect/IGESSelect_SelectBasicGeom.cxx b/src/IGESSelect/IGESSelect_SelectBasicGeom.cxx index 356b89a1c4..ee2cceefc0 100644 --- a/src/IGESSelect/IGESSelect_SelectBasicGeom.cxx +++ b/src/IGESSelect/IGESSelect_SelectBasicGeom.cxx @@ -15,16 +15,12 @@ #include #include #include -#include #include #include -#include #include #include #include #include -#include -#include #include #include #include diff --git a/src/IGESSelect/IGESSelect_SelectBasicGeom.hxx b/src/IGESSelect/IGESSelect_SelectBasicGeom.hxx index 5f98ebe97a..d613e986c0 100644 --- a/src/IGESSelect/IGESSelect_SelectBasicGeom.hxx +++ b/src/IGESSelect/IGESSelect_SelectBasicGeom.hxx @@ -22,7 +22,6 @@ #include #include -#include class Standard_Transient; class Interface_Graph; class Interface_EntityIterator; diff --git a/src/IGESSelect/IGESSelect_SelectBypassGroup.cxx b/src/IGESSelect/IGESSelect_SelectBypassGroup.cxx index 5c8165fb0e..a296b386e5 100644 --- a/src/IGESSelect/IGESSelect_SelectBypassGroup.cxx +++ b/src/IGESSelect/IGESSelect_SelectBypassGroup.cxx @@ -12,15 +12,10 @@ // commercial license or contractual agreement. -#include #include -#include -#include -#include #include #include #include -#include #include #include #include diff --git a/src/IGESSelect/IGESSelect_SelectBypassGroup.hxx b/src/IGESSelect/IGESSelect_SelectBypassGroup.hxx index 169a57ec12..3703ba3870 100644 --- a/src/IGESSelect/IGESSelect_SelectBypassGroup.hxx +++ b/src/IGESSelect/IGESSelect_SelectBypassGroup.hxx @@ -22,7 +22,6 @@ #include #include -#include class Standard_Transient; class Interface_Graph; class Interface_EntityIterator; diff --git a/src/IGESSelect/IGESSelect_SelectBypassSubfigure.cxx b/src/IGESSelect/IGESSelect_SelectBypassSubfigure.cxx index e17a3504ce..6e6e117067 100644 --- a/src/IGESSelect/IGESSelect_SelectBypassSubfigure.cxx +++ b/src/IGESSelect/IGESSelect_SelectBypassSubfigure.cxx @@ -22,7 +22,6 @@ #include #include #include -#include #include #include #include diff --git a/src/IGESSelect/IGESSelect_SelectBypassSubfigure.hxx b/src/IGESSelect/IGESSelect_SelectBypassSubfigure.hxx index 244d7b0b53..5cba0df8bd 100644 --- a/src/IGESSelect/IGESSelect_SelectBypassSubfigure.hxx +++ b/src/IGESSelect/IGESSelect_SelectBypassSubfigure.hxx @@ -22,7 +22,6 @@ #include #include -#include class Standard_Transient; class Interface_Graph; class Interface_EntityIterator; diff --git a/src/IGESSelect/IGESSelect_SelectDrawingFrom.cxx b/src/IGESSelect/IGESSelect_SelectDrawingFrom.cxx index 4e0906c99b..68e2ce03a5 100644 --- a/src/IGESSelect/IGESSelect_SelectDrawingFrom.cxx +++ b/src/IGESSelect/IGESSelect_SelectDrawingFrom.cxx @@ -18,7 +18,6 @@ #include #include #include -#include #include #include #include diff --git a/src/IGESSelect/IGESSelect_SelectDrawingFrom.hxx b/src/IGESSelect/IGESSelect_SelectDrawingFrom.hxx index b7e9accca7..9632fadfe8 100644 --- a/src/IGESSelect/IGESSelect_SelectDrawingFrom.hxx +++ b/src/IGESSelect/IGESSelect_SelectDrawingFrom.hxx @@ -21,7 +21,6 @@ #include #include -#include class Interface_EntityIterator; class Interface_Graph; class TCollection_AsciiString; diff --git a/src/IGESSelect/IGESSelect_SelectFaces.hxx b/src/IGESSelect/IGESSelect_SelectFaces.hxx index ec2f2abb71..e5203a1ced 100644 --- a/src/IGESSelect/IGESSelect_SelectFaces.hxx +++ b/src/IGESSelect/IGESSelect_SelectFaces.hxx @@ -21,7 +21,6 @@ #include #include -#include #include class Standard_Transient; class Interface_Graph; diff --git a/src/IGESSelect/IGESSelect_SelectFromDrawing.cxx b/src/IGESSelect/IGESSelect_SelectFromDrawing.cxx index 2a4b2b7eb4..a08de28846 100644 --- a/src/IGESSelect/IGESSelect_SelectFromDrawing.cxx +++ b/src/IGESSelect/IGESSelect_SelectFromDrawing.cxx @@ -12,12 +12,10 @@ // commercial license or contractual agreement. -#include #include #include #include #include -#include #include #include #include diff --git a/src/IGESSelect/IGESSelect_SelectFromSingleView.cxx b/src/IGESSelect/IGESSelect_SelectFromSingleView.cxx index 94d5c3800e..39d66a5843 100644 --- a/src/IGESSelect/IGESSelect_SelectFromSingleView.cxx +++ b/src/IGESSelect/IGESSelect_SelectFromSingleView.cxx @@ -12,12 +12,10 @@ // commercial license or contractual agreement. -#include #include #include #include #include -#include #include #include #include diff --git a/src/IGESSelect/IGESSelect_SelectLevelNumber.cxx b/src/IGESSelect/IGESSelect_SelectLevelNumber.cxx index 1d4cbe0128..e8b952f4e8 100644 --- a/src/IGESSelect/IGESSelect_SelectLevelNumber.cxx +++ b/src/IGESSelect/IGESSelect_SelectLevelNumber.cxx @@ -13,7 +13,6 @@ #include -#include #include #include #include diff --git a/src/IGESSelect/IGESSelect_SelectLevelNumber.hxx b/src/IGESSelect/IGESSelect_SelectLevelNumber.hxx index d87edaf3e3..934b1cb4d7 100644 --- a/src/IGESSelect/IGESSelect_SelectLevelNumber.hxx +++ b/src/IGESSelect/IGESSelect_SelectLevelNumber.hxx @@ -21,7 +21,6 @@ #include #include -#include #include class IFSelect_IntParam; class Standard_Transient; diff --git a/src/IGESSelect/IGESSelect_SelectName.hxx b/src/IGESSelect/IGESSelect_SelectName.hxx index ca434f62ba..fc75c5c66c 100644 --- a/src/IGESSelect/IGESSelect_SelectName.hxx +++ b/src/IGESSelect/IGESSelect_SelectName.hxx @@ -21,7 +21,6 @@ #include #include -#include #include class TCollection_HAsciiString; class Standard_Transient; diff --git a/src/IGESSelect/IGESSelect_SelectPCurves.cxx b/src/IGESSelect/IGESSelect_SelectPCurves.cxx index 41c0a703cb..f2b42ad234 100644 --- a/src/IGESSelect/IGESSelect_SelectPCurves.cxx +++ b/src/IGESSelect/IGESSelect_SelectPCurves.cxx @@ -14,14 +14,10 @@ #include #include -#include #include -#include #include #include #include -#include -#include #include #include #include diff --git a/src/IGESSelect/IGESSelect_SelectPCurves.hxx b/src/IGESSelect/IGESSelect_SelectPCurves.hxx index c388d93be9..9a451edf14 100644 --- a/src/IGESSelect/IGESSelect_SelectPCurves.hxx +++ b/src/IGESSelect/IGESSelect_SelectPCurves.hxx @@ -20,7 +20,6 @@ #include #include -#include #include #include class Standard_Transient; diff --git a/src/IGESSelect/IGESSelect_SelectSingleViewFrom.cxx b/src/IGESSelect/IGESSelect_SelectSingleViewFrom.cxx index 06676e05f9..aa983c81db 100644 --- a/src/IGESSelect/IGESSelect_SelectSingleViewFrom.cxx +++ b/src/IGESSelect/IGESSelect_SelectSingleViewFrom.cxx @@ -18,7 +18,6 @@ #include #include #include -#include #include #include #include diff --git a/src/IGESSelect/IGESSelect_SelectSingleViewFrom.hxx b/src/IGESSelect/IGESSelect_SelectSingleViewFrom.hxx index fa98053a9a..a0644ca2a7 100644 --- a/src/IGESSelect/IGESSelect_SelectSingleViewFrom.hxx +++ b/src/IGESSelect/IGESSelect_SelectSingleViewFrom.hxx @@ -21,7 +21,6 @@ #include #include -#include class Interface_EntityIterator; class Interface_Graph; class TCollection_AsciiString; diff --git a/src/IGESSelect/IGESSelect_SelectSubordinate.hxx b/src/IGESSelect/IGESSelect_SelectSubordinate.hxx index 4215a2f83b..a61f0e145e 100644 --- a/src/IGESSelect/IGESSelect_SelectSubordinate.hxx +++ b/src/IGESSelect/IGESSelect_SelectSubordinate.hxx @@ -22,7 +22,6 @@ #include #include -#include class Standard_Transient; class Interface_InterfaceModel; class TCollection_AsciiString; diff --git a/src/IGESSelect/IGESSelect_SelectVisibleStatus.hxx b/src/IGESSelect/IGESSelect_SelectVisibleStatus.hxx index c848318fd2..8b0ed1069f 100644 --- a/src/IGESSelect/IGESSelect_SelectVisibleStatus.hxx +++ b/src/IGESSelect/IGESSelect_SelectVisibleStatus.hxx @@ -21,7 +21,6 @@ #include #include -#include #include class Standard_Transient; class Interface_InterfaceModel; diff --git a/src/IGESSelect/IGESSelect_SetGlobalParameter.cxx b/src/IGESSelect/IGESSelect_SetGlobalParameter.cxx index 5872ccc828..b2122af32f 100644 --- a/src/IGESSelect/IGESSelect_SetGlobalParameter.cxx +++ b/src/IGESSelect/IGESSelect_SetGlobalParameter.cxx @@ -13,7 +13,6 @@ #include -#include #include #include #include diff --git a/src/IGESSelect/IGESSelect_SetLabel.hxx b/src/IGESSelect/IGESSelect_SetLabel.hxx index dbf2037241..42a4518182 100644 --- a/src/IGESSelect/IGESSelect_SetLabel.hxx +++ b/src/IGESSelect/IGESSelect_SetLabel.hxx @@ -21,7 +21,6 @@ #include #include -#include #include class IFSelect_ContextModif; class IGESData_IGESModel; diff --git a/src/IGESSelect/IGESSelect_SetVersion5.cxx b/src/IGESSelect/IGESSelect_SetVersion5.cxx index b2936e5412..de8e7cd2c4 100644 --- a/src/IGESSelect/IGESSelect_SetVersion5.cxx +++ b/src/IGESSelect/IGESSelect_SetVersion5.cxx @@ -13,7 +13,6 @@ #include -#include #include #include #include diff --git a/src/IGESSelect/IGESSelect_SignColor.cxx b/src/IGESSelect/IGESSelect_SignColor.cxx index 6f46a0ce67..00a3521350 100644 --- a/src/IGESSelect/IGESSelect_SignColor.cxx +++ b/src/IGESSelect/IGESSelect_SignColor.cxx @@ -12,7 +12,6 @@ // commercial license or contractual agreement. -#include #include #include #include diff --git a/src/IGESSelect/IGESSelect_SignLevelNumber.cxx b/src/IGESSelect/IGESSelect_SignLevelNumber.cxx index 45e884b283..dd3394de52 100644 --- a/src/IGESSelect/IGESSelect_SignLevelNumber.cxx +++ b/src/IGESSelect/IGESSelect_SignLevelNumber.cxx @@ -12,7 +12,6 @@ // commercial license or contractual agreement. -#include #include #include #include diff --git a/src/IGESSelect/IGESSelect_SignLevelNumber.hxx b/src/IGESSelect/IGESSelect_SignLevelNumber.hxx index f8bbb20fe7..d5f3f00638 100644 --- a/src/IGESSelect/IGESSelect_SignLevelNumber.hxx +++ b/src/IGESSelect/IGESSelect_SignLevelNumber.hxx @@ -20,7 +20,6 @@ #include #include -#include #include #include class Standard_Transient; diff --git a/src/IGESSelect/IGESSelect_SignStatus.hxx b/src/IGESSelect/IGESSelect_SignStatus.hxx index db44509511..3bffadb5cd 100644 --- a/src/IGESSelect/IGESSelect_SignStatus.hxx +++ b/src/IGESSelect/IGESSelect_SignStatus.hxx @@ -22,7 +22,6 @@ #include #include -#include class Standard_Transient; class Interface_InterfaceModel; class TCollection_AsciiString; diff --git a/src/IGESSelect/IGESSelect_SplineToBSpline.cxx b/src/IGESSelect/IGESSelect_SplineToBSpline.cxx index a405fefdc2..b5ef9450ba 100644 --- a/src/IGESSelect/IGESSelect_SplineToBSpline.cxx +++ b/src/IGESSelect/IGESSelect_SplineToBSpline.cxx @@ -14,7 +14,6 @@ #include #include -#include #include #include #include diff --git a/src/IGESSelect/IGESSelect_SplineToBSpline.hxx b/src/IGESSelect/IGESSelect_SplineToBSpline.hxx index 033de89ead..7713c8a1e6 100644 --- a/src/IGESSelect/IGESSelect_SplineToBSpline.hxx +++ b/src/IGESSelect/IGESSelect_SplineToBSpline.hxx @@ -20,7 +20,6 @@ #include #include -#include #include class Interface_CopyControl; class Interface_Graph; diff --git a/src/IGESSelect/IGESSelect_UpdateCreationDate.cxx b/src/IGESSelect/IGESSelect_UpdateCreationDate.cxx index 35a8c44aa2..d435e67584 100644 --- a/src/IGESSelect/IGESSelect_UpdateCreationDate.cxx +++ b/src/IGESSelect/IGESSelect_UpdateCreationDate.cxx @@ -14,7 +14,6 @@ //#65 rln 12.02.99 S4151 (explicitly force YYMMDD.HHMMSS before Y2000 and YYYYMMDD.HHMMSS after Y2000) #include -#include #include #include #include @@ -23,7 +22,6 @@ #include #include #include -#include IMPLEMENT_STANDARD_RTTIEXT(IGESSelect_UpdateCreationDate,IGESSelect_ModelModifier) diff --git a/src/IGESSelect/IGESSelect_UpdateFileName.cxx b/src/IGESSelect/IGESSelect_UpdateFileName.cxx index 8053a052e5..90b4a902bf 100644 --- a/src/IGESSelect/IGESSelect_UpdateFileName.cxx +++ b/src/IGESSelect/IGESSelect_UpdateFileName.cxx @@ -13,7 +13,6 @@ #include -#include #include #include #include diff --git a/src/IGESSelect/IGESSelect_UpdateLastChange.cxx b/src/IGESSelect/IGESSelect_UpdateLastChange.cxx index 68f49f5514..b1ebe58274 100644 --- a/src/IGESSelect/IGESSelect_UpdateLastChange.cxx +++ b/src/IGESSelect/IGESSelect_UpdateLastChange.cxx @@ -14,7 +14,6 @@ //#65 rln 12.02.99 S4151 (explicitly force YYMMDD.HHMMSS before Y2000 and YYYYMMDD.HHMMSS after Y2000) #include -#include #include #include #include @@ -23,7 +22,6 @@ #include #include #include -#include IMPLEMENT_STANDARD_RTTIEXT(IGESSelect_UpdateLastChange,IGESSelect_ModelModifier) diff --git a/src/IGESSelect/IGESSelect_ViewSorter.cxx b/src/IGESSelect/IGESSelect_ViewSorter.cxx index 68e6e54519..3bd721462c 100644 --- a/src/IGESSelect/IGESSelect_ViewSorter.cxx +++ b/src/IGESSelect/IGESSelect_ViewSorter.cxx @@ -13,7 +13,6 @@ #include -#include #include #include #include diff --git a/src/IGESSelect/IGESSelect_ViewSorter.hxx b/src/IGESSelect/IGESSelect_ViewSorter.hxx index 093959b764..0971a46184 100644 --- a/src/IGESSelect/IGESSelect_ViewSorter.hxx +++ b/src/IGESSelect/IGESSelect_ViewSorter.hxx @@ -23,7 +23,6 @@ #include #include #include -#include #include #include class IGESData_IGESModel; diff --git a/src/IGESSelect/IGESSelect_WorkLibrary.cxx b/src/IGESSelect/IGESSelect_WorkLibrary.cxx index 9bfbbd2107..8524ef303f 100644 --- a/src/IGESSelect/IGESSelect_WorkLibrary.cxx +++ b/src/IGESSelect/IGESSelect_WorkLibrary.cxx @@ -13,13 +13,11 @@ #include -#include #include #include #include #include #include -#include #include #include #include @@ -41,7 +39,6 @@ #include #include #include -#include #include IMPLEMENT_STANDARD_RTTIEXT(IGESSelect_WorkLibrary,IFSelect_WorkLibrary) diff --git a/src/IGESSelect/IGESSelect_WorkLibrary.hxx b/src/IGESSelect/IGESSelect_WorkLibrary.hxx index aeb3fcc249..d249ddd8b3 100644 --- a/src/IGESSelect/IGESSelect_WorkLibrary.hxx +++ b/src/IGESSelect/IGESSelect_WorkLibrary.hxx @@ -20,10 +20,8 @@ #include #include -#include #include #include -#include class Interface_InterfaceModel; class Interface_Protocol; class IFSelect_ContextWrite; diff --git a/src/IGESSolid/IGESSolid_Block.cxx b/src/IGESSolid/IGESSolid_Block.cxx index b8d5c12f65..64900df755 100644 --- a/src/IGESSolid/IGESSolid_Block.cxx +++ b/src/IGESSolid/IGESSolid_Block.cxx @@ -16,7 +16,6 @@ //-------------------------------------------------------------------- //-------------------------------------------------------------------- -#include #include #include #include diff --git a/src/IGESSolid/IGESSolid_Block.hxx b/src/IGESSolid/IGESSolid_Block.hxx index 9c842f0f08..42820ad327 100644 --- a/src/IGESSolid/IGESSolid_Block.hxx +++ b/src/IGESSolid/IGESSolid_Block.hxx @@ -22,7 +22,6 @@ #include #include -#include class gp_Pnt; class gp_Dir; diff --git a/src/IGESSolid/IGESSolid_BooleanTree.cxx b/src/IGESSolid/IGESSolid_BooleanTree.cxx index f72c4eae93..9c8c3e15ef 100644 --- a/src/IGESSolid/IGESSolid_BooleanTree.cxx +++ b/src/IGESSolid/IGESSolid_BooleanTree.cxx @@ -16,10 +16,8 @@ //-------------------------------------------------------------------- //-------------------------------------------------------------------- -#include #include #include -#include #include IMPLEMENT_STANDARD_RTTIEXT(IGESSolid_BooleanTree,IGESData_IGESEntity) diff --git a/src/IGESSolid/IGESSolid_BooleanTree.hxx b/src/IGESSolid/IGESSolid_BooleanTree.hxx index a489028222..832e7369f0 100644 --- a/src/IGESSolid/IGESSolid_BooleanTree.hxx +++ b/src/IGESSolid/IGESSolid_BooleanTree.hxx @@ -18,13 +18,11 @@ #define _IGESSolid_BooleanTree_HeaderFile #include -#include #include #include #include #include -#include class IGESSolid_BooleanTree; diff --git a/src/IGESSolid/IGESSolid_ConeFrustum.cxx b/src/IGESSolid/IGESSolid_ConeFrustum.cxx index f430d71d18..0d2b3d71eb 100644 --- a/src/IGESSolid/IGESSolid_ConeFrustum.cxx +++ b/src/IGESSolid/IGESSolid_ConeFrustum.cxx @@ -16,7 +16,6 @@ //-------------------------------------------------------------------- //-------------------------------------------------------------------- -#include #include #include #include diff --git a/src/IGESSolid/IGESSolid_ConeFrustum.hxx b/src/IGESSolid/IGESSolid_ConeFrustum.hxx index 5603a509cc..c1179c66cc 100644 --- a/src/IGESSolid/IGESSolid_ConeFrustum.hxx +++ b/src/IGESSolid/IGESSolid_ConeFrustum.hxx @@ -20,7 +20,6 @@ #include #include -#include #include #include class gp_Pnt; diff --git a/src/IGESSolid/IGESSolid_ConicalSurface.hxx b/src/IGESSolid/IGESSolid_ConicalSurface.hxx index 69d1cb5c6e..c47bbda07a 100644 --- a/src/IGESSolid/IGESSolid_ConicalSurface.hxx +++ b/src/IGESSolid/IGESSolid_ConicalSurface.hxx @@ -20,9 +20,7 @@ #include #include -#include #include -#include class IGESGeom_Point; class IGESGeom_Direction; diff --git a/src/IGESSolid/IGESSolid_Cylinder.cxx b/src/IGESSolid/IGESSolid_Cylinder.cxx index e87969fdb1..b0e0082826 100644 --- a/src/IGESSolid/IGESSolid_Cylinder.cxx +++ b/src/IGESSolid/IGESSolid_Cylinder.cxx @@ -16,7 +16,6 @@ //-------------------------------------------------------------------- //-------------------------------------------------------------------- -#include #include #include #include diff --git a/src/IGESSolid/IGESSolid_Cylinder.hxx b/src/IGESSolid/IGESSolid_Cylinder.hxx index fcd3b920dd..8943f44ca2 100644 --- a/src/IGESSolid/IGESSolid_Cylinder.hxx +++ b/src/IGESSolid/IGESSolid_Cylinder.hxx @@ -20,7 +20,6 @@ #include #include -#include #include #include class gp_Pnt; diff --git a/src/IGESSolid/IGESSolid_CylindricalSurface.hxx b/src/IGESSolid/IGESSolid_CylindricalSurface.hxx index 0659ae2ec7..13b54a70ba 100644 --- a/src/IGESSolid/IGESSolid_CylindricalSurface.hxx +++ b/src/IGESSolid/IGESSolid_CylindricalSurface.hxx @@ -20,9 +20,7 @@ #include #include -#include #include -#include class IGESGeom_Point; class IGESGeom_Direction; diff --git a/src/IGESSolid/IGESSolid_EdgeList.cxx b/src/IGESSolid/IGESSolid_EdgeList.cxx index 385b4075e3..618350dd62 100644 --- a/src/IGESSolid/IGESSolid_EdgeList.cxx +++ b/src/IGESSolid/IGESSolid_EdgeList.cxx @@ -16,11 +16,9 @@ //-------------------------------------------------------------------- //-------------------------------------------------------------------- -#include #include #include #include -#include #include IMPLEMENT_STANDARD_RTTIEXT(IGESSolid_EdgeList,IGESData_IGESEntity) diff --git a/src/IGESSolid/IGESSolid_EdgeList.hxx b/src/IGESSolid/IGESSolid_EdgeList.hxx index aabf38acb6..d6c0f8ad84 100644 --- a/src/IGESSolid/IGESSolid_EdgeList.hxx +++ b/src/IGESSolid/IGESSolid_EdgeList.hxx @@ -18,7 +18,6 @@ #define _IGESSolid_EdgeList_HeaderFile #include -#include #include #include diff --git a/src/IGESSolid/IGESSolid_Ellipsoid.cxx b/src/IGESSolid/IGESSolid_Ellipsoid.cxx index 583089c819..61e63c40ce 100644 --- a/src/IGESSolid/IGESSolid_Ellipsoid.cxx +++ b/src/IGESSolid/IGESSolid_Ellipsoid.cxx @@ -16,7 +16,6 @@ //-------------------------------------------------------------------- //-------------------------------------------------------------------- -#include #include #include #include diff --git a/src/IGESSolid/IGESSolid_Ellipsoid.hxx b/src/IGESSolid/IGESSolid_Ellipsoid.hxx index 5cb1632152..990c73dc8a 100644 --- a/src/IGESSolid/IGESSolid_Ellipsoid.hxx +++ b/src/IGESSolid/IGESSolid_Ellipsoid.hxx @@ -22,7 +22,6 @@ #include #include -#include class gp_Pnt; class gp_Dir; diff --git a/src/IGESSolid/IGESSolid_Face.cxx b/src/IGESSolid/IGESSolid_Face.cxx index 52f70489ee..f57f57c68a 100644 --- a/src/IGESSolid/IGESSolid_Face.cxx +++ b/src/IGESSolid/IGESSolid_Face.cxx @@ -16,11 +16,9 @@ //-------------------------------------------------------------------- //-------------------------------------------------------------------- -#include #include #include #include -#include #include IMPLEMENT_STANDARD_RTTIEXT(IGESSolid_Face,IGESData_IGESEntity) diff --git a/src/IGESSolid/IGESSolid_Face.hxx b/src/IGESSolid/IGESSolid_Face.hxx index c13252e48f..0b4bd5ece6 100644 --- a/src/IGESSolid/IGESSolid_Face.hxx +++ b/src/IGESSolid/IGESSolid_Face.hxx @@ -18,9 +18,7 @@ #define _IGESSolid_Face_HeaderFile #include -#include -#include #include #include #include diff --git a/src/IGESSolid/IGESSolid_GeneralModule.cxx b/src/IGESSolid/IGESSolid_GeneralModule.cxx index ed98f4bc9b..a9141d9282 100644 --- a/src/IGESSolid/IGESSolid_GeneralModule.cxx +++ b/src/IGESSolid/IGESSolid_GeneralModule.cxx @@ -13,7 +13,6 @@ #include -#include #include #include #include @@ -22,9 +21,7 @@ #include #include #include -#include #include -#include #include #include #include diff --git a/src/IGESSolid/IGESSolid_GeneralModule.hxx b/src/IGESSolid/IGESSolid_GeneralModule.hxx index 294fc3a37d..bdcad51f69 100644 --- a/src/IGESSolid/IGESSolid_GeneralModule.hxx +++ b/src/IGESSolid/IGESSolid_GeneralModule.hxx @@ -22,7 +22,6 @@ #include #include -#include class IGESData_IGESEntity; class Interface_EntityIterator; class IGESData_DirChecker; diff --git a/src/IGESSolid/IGESSolid_HArray1OfFace.hxx b/src/IGESSolid/IGESSolid_HArray1OfFace.hxx index eb3edf61b1..9627b1dc3e 100644 --- a/src/IGESSolid/IGESSolid_HArray1OfFace.hxx +++ b/src/IGESSolid/IGESSolid_HArray1OfFace.hxx @@ -17,7 +17,6 @@ #ifndef IGESSolid_HArray1OfFace_HeaderFile #define IGESSolid_HArray1OfFace_HeaderFile -#include #include #include diff --git a/src/IGESSolid/IGESSolid_HArray1OfLoop.hxx b/src/IGESSolid/IGESSolid_HArray1OfLoop.hxx index 30cd219b20..e49c374b73 100644 --- a/src/IGESSolid/IGESSolid_HArray1OfLoop.hxx +++ b/src/IGESSolid/IGESSolid_HArray1OfLoop.hxx @@ -17,7 +17,6 @@ #ifndef IGESSolid_HArray1OfLoop_HeaderFile #define IGESSolid_HArray1OfLoop_HeaderFile -#include #include #include diff --git a/src/IGESSolid/IGESSolid_HArray1OfShell.hxx b/src/IGESSolid/IGESSolid_HArray1OfShell.hxx index ed10fbc7bc..920799287b 100644 --- a/src/IGESSolid/IGESSolid_HArray1OfShell.hxx +++ b/src/IGESSolid/IGESSolid_HArray1OfShell.hxx @@ -17,7 +17,6 @@ #ifndef IGESSolid_HArray1OfShell_HeaderFile #define IGESSolid_HArray1OfShell_HeaderFile -#include #include #include diff --git a/src/IGESSolid/IGESSolid_HArray1OfVertexList.hxx b/src/IGESSolid/IGESSolid_HArray1OfVertexList.hxx index bfaebcfee4..3d5196bef5 100644 --- a/src/IGESSolid/IGESSolid_HArray1OfVertexList.hxx +++ b/src/IGESSolid/IGESSolid_HArray1OfVertexList.hxx @@ -17,7 +17,6 @@ #ifndef IGESSolid_HArray1OfVertexList_HeaderFile #define IGESSolid_HArray1OfVertexList_HeaderFile -#include #include #include diff --git a/src/IGESSolid/IGESSolid_Loop.cxx b/src/IGESSolid/IGESSolid_Loop.cxx index 1e9bfe2459..d4809866aa 100644 --- a/src/IGESSolid/IGESSolid_Loop.cxx +++ b/src/IGESSolid/IGESSolid_Loop.cxx @@ -24,7 +24,6 @@ #include #include #include -#include #include IMPLEMENT_STANDARD_RTTIEXT(IGESSolid_Loop,IGESData_IGESEntity) diff --git a/src/IGESSolid/IGESSolid_Loop.hxx b/src/IGESSolid/IGESSolid_Loop.hxx index 730665e06a..2b922549a5 100644 --- a/src/IGESSolid/IGESSolid_Loop.hxx +++ b/src/IGESSolid/IGESSolid_Loop.hxx @@ -23,7 +23,6 @@ #include #include #include -#include #include class IGESBasic_HArray1OfHArray1OfInteger; class IGESBasic_HArray1OfHArray1OfIGESEntity; diff --git a/src/IGESSolid/IGESSolid_ManifoldSolid.cxx b/src/IGESSolid/IGESSolid_ManifoldSolid.cxx index 1325c849ad..9d35e0ef9a 100644 --- a/src/IGESSolid/IGESSolid_ManifoldSolid.cxx +++ b/src/IGESSolid/IGESSolid_ManifoldSolid.cxx @@ -19,7 +19,6 @@ #include #include #include -#include #include IMPLEMENT_STANDARD_RTTIEXT(IGESSolid_ManifoldSolid,IGESData_IGESEntity) diff --git a/src/IGESSolid/IGESSolid_ManifoldSolid.hxx b/src/IGESSolid/IGESSolid_ManifoldSolid.hxx index 28bab7fd18..6f22c21622 100644 --- a/src/IGESSolid/IGESSolid_ManifoldSolid.hxx +++ b/src/IGESSolid/IGESSolid_ManifoldSolid.hxx @@ -18,9 +18,7 @@ #define _IGESSolid_ManifoldSolid_HeaderFile #include -#include -#include #include #include #include diff --git a/src/IGESSolid/IGESSolid_PlaneSurface.hxx b/src/IGESSolid/IGESSolid_PlaneSurface.hxx index c4b3d661c0..bca99678a0 100644 --- a/src/IGESSolid/IGESSolid_PlaneSurface.hxx +++ b/src/IGESSolid/IGESSolid_PlaneSurface.hxx @@ -21,7 +21,6 @@ #include #include -#include class IGESGeom_Point; class IGESGeom_Direction; diff --git a/src/IGESSolid/IGESSolid_Protocol.cxx b/src/IGESSolid/IGESSolid_Protocol.cxx index abd6be3139..bff8bcc78b 100644 --- a/src/IGESSolid/IGESSolid_Protocol.cxx +++ b/src/IGESSolid/IGESSolid_Protocol.cxx @@ -22,7 +22,6 @@ #include #include #include -#include #include #include #include diff --git a/src/IGESSolid/IGESSolid_Protocol.hxx b/src/IGESSolid/IGESSolid_Protocol.hxx index a259221a9a..779dcd7a7f 100644 --- a/src/IGESSolid/IGESSolid_Protocol.hxx +++ b/src/IGESSolid/IGESSolid_Protocol.hxx @@ -22,7 +22,6 @@ #include #include -#include class Interface_Protocol; diff --git a/src/IGESSolid/IGESSolid_ReadWriteModule.cxx b/src/IGESSolid/IGESSolid_ReadWriteModule.cxx index 61954cf8f4..699893e0a2 100644 --- a/src/IGESSolid/IGESSolid_ReadWriteModule.cxx +++ b/src/IGESSolid/IGESSolid_ReadWriteModule.cxx @@ -12,7 +12,6 @@ // commercial license or contractual agreement. -#include #include #include #include @@ -24,8 +23,6 @@ #include #include #include -#include -#include #include #include #include @@ -66,7 +63,6 @@ #include #include #include -#include #include IMPLEMENT_STANDARD_RTTIEXT(IGESSolid_ReadWriteModule,IGESData_ReadWriteModule) diff --git a/src/IGESSolid/IGESSolid_RightAngularWedge.cxx b/src/IGESSolid/IGESSolid_RightAngularWedge.cxx index bd9c499abf..94fb81c690 100644 --- a/src/IGESSolid/IGESSolid_RightAngularWedge.cxx +++ b/src/IGESSolid/IGESSolid_RightAngularWedge.cxx @@ -16,7 +16,6 @@ //-------------------------------------------------------------------- //-------------------------------------------------------------------- -#include #include #include #include diff --git a/src/IGESSolid/IGESSolid_RightAngularWedge.hxx b/src/IGESSolid/IGESSolid_RightAngularWedge.hxx index c56fc59835..41393dabdf 100644 --- a/src/IGESSolid/IGESSolid_RightAngularWedge.hxx +++ b/src/IGESSolid/IGESSolid_RightAngularWedge.hxx @@ -21,7 +21,6 @@ #include #include -#include #include class gp_Pnt; class gp_Dir; diff --git a/src/IGESSolid/IGESSolid_Shell.cxx b/src/IGESSolid/IGESSolid_Shell.cxx index e35f47d041..ee82275698 100644 --- a/src/IGESSolid/IGESSolid_Shell.cxx +++ b/src/IGESSolid/IGESSolid_Shell.cxx @@ -16,10 +16,8 @@ //-------------------------------------------------------------------- //-------------------------------------------------------------------- -#include #include #include -#include #include IMPLEMENT_STANDARD_RTTIEXT(IGESSolid_Shell,IGESData_IGESEntity) diff --git a/src/IGESSolid/IGESSolid_Shell.hxx b/src/IGESSolid/IGESSolid_Shell.hxx index 9351f6284f..b8913fbbeb 100644 --- a/src/IGESSolid/IGESSolid_Shell.hxx +++ b/src/IGESSolid/IGESSolid_Shell.hxx @@ -18,12 +18,10 @@ #define _IGESSolid_Shell_HeaderFile #include -#include #include #include #include -#include #include class IGESSolid_Face; diff --git a/src/IGESSolid/IGESSolid_SolidAssembly.cxx b/src/IGESSolid/IGESSolid_SolidAssembly.cxx index 31e881aeb2..4c00f65e35 100644 --- a/src/IGESSolid/IGESSolid_SolidAssembly.cxx +++ b/src/IGESSolid/IGESSolid_SolidAssembly.cxx @@ -16,11 +16,8 @@ //-------------------------------------------------------------------- //-------------------------------------------------------------------- -#include -#include #include #include -#include #include IMPLEMENT_STANDARD_RTTIEXT(IGESSolid_SolidAssembly,IGESData_IGESEntity) diff --git a/src/IGESSolid/IGESSolid_SolidAssembly.hxx b/src/IGESSolid/IGESSolid_SolidAssembly.hxx index da6d00caa4..0dc9b93b1e 100644 --- a/src/IGESSolid/IGESSolid_SolidAssembly.hxx +++ b/src/IGESSolid/IGESSolid_SolidAssembly.hxx @@ -18,12 +18,10 @@ #define _IGESSolid_SolidAssembly_HeaderFile #include -#include #include #include #include -#include #include class IGESGeom_TransformationMatrix; diff --git a/src/IGESSolid/IGESSolid_SolidInstance.cxx b/src/IGESSolid/IGESSolid_SolidInstance.cxx index 62fedb48d6..c3372250e0 100644 --- a/src/IGESSolid/IGESSolid_SolidInstance.cxx +++ b/src/IGESSolid/IGESSolid_SolidInstance.cxx @@ -16,7 +16,6 @@ //-------------------------------------------------------------------- //-------------------------------------------------------------------- -#include #include #include diff --git a/src/IGESSolid/IGESSolid_SolidInstance.hxx b/src/IGESSolid/IGESSolid_SolidInstance.hxx index fad9db1a33..43ea51402e 100644 --- a/src/IGESSolid/IGESSolid_SolidInstance.hxx +++ b/src/IGESSolid/IGESSolid_SolidInstance.hxx @@ -18,10 +18,8 @@ #define _IGESSolid_SolidInstance_HeaderFile #include -#include #include -#include class IGESSolid_SolidInstance; diff --git a/src/IGESSolid/IGESSolid_SolidOfLinearExtrusion.cxx b/src/IGESSolid/IGESSolid_SolidOfLinearExtrusion.cxx index 94cfdfd101..f7241d74ce 100644 --- a/src/IGESSolid/IGESSolid_SolidOfLinearExtrusion.cxx +++ b/src/IGESSolid/IGESSolid_SolidOfLinearExtrusion.cxx @@ -16,10 +16,8 @@ //-------------------------------------------------------------------- //-------------------------------------------------------------------- -#include #include #include -#include #include #include diff --git a/src/IGESSolid/IGESSolid_SolidOfLinearExtrusion.hxx b/src/IGESSolid/IGESSolid_SolidOfLinearExtrusion.hxx index d645739a29..d171e31aeb 100644 --- a/src/IGESSolid/IGESSolid_SolidOfLinearExtrusion.hxx +++ b/src/IGESSolid/IGESSolid_SolidOfLinearExtrusion.hxx @@ -20,7 +20,6 @@ #include #include -#include #include #include class gp_Dir; diff --git a/src/IGESSolid/IGESSolid_SolidOfRevolution.cxx b/src/IGESSolid/IGESSolid_SolidOfRevolution.cxx index 55eef08c98..1ff8a8f9c2 100644 --- a/src/IGESSolid/IGESSolid_SolidOfRevolution.cxx +++ b/src/IGESSolid/IGESSolid_SolidOfRevolution.cxx @@ -16,11 +16,9 @@ //-------------------------------------------------------------------- //-------------------------------------------------------------------- -#include #include #include #include -#include #include #include diff --git a/src/IGESSolid/IGESSolid_SolidOfRevolution.hxx b/src/IGESSolid/IGESSolid_SolidOfRevolution.hxx index c0ca8a7234..27a972259f 100644 --- a/src/IGESSolid/IGESSolid_SolidOfRevolution.hxx +++ b/src/IGESSolid/IGESSolid_SolidOfRevolution.hxx @@ -20,10 +20,8 @@ #include #include -#include #include #include -#include class gp_Pnt; class gp_Dir; diff --git a/src/IGESSolid/IGESSolid_SpecificModule.cxx b/src/IGESSolid/IGESSolid_SpecificModule.cxx index b2782c5756..4d1e5702ec 100644 --- a/src/IGESSolid/IGESSolid_SpecificModule.cxx +++ b/src/IGESSolid/IGESSolid_SpecificModule.cxx @@ -13,7 +13,6 @@ #include -#include #include #include #include @@ -22,8 +21,6 @@ #include #include #include -#include -#include #include #include #include diff --git a/src/IGESSolid/IGESSolid_Sphere.hxx b/src/IGESSolid/IGESSolid_Sphere.hxx index ee49e4b347..97fdeae0e6 100644 --- a/src/IGESSolid/IGESSolid_Sphere.hxx +++ b/src/IGESSolid/IGESSolid_Sphere.hxx @@ -20,7 +20,6 @@ #include #include -#include #include #include class gp_Pnt; diff --git a/src/IGESSolid/IGESSolid_SphericalSurface.hxx b/src/IGESSolid/IGESSolid_SphericalSurface.hxx index 62eb85b9f7..72e060182e 100644 --- a/src/IGESSolid/IGESSolid_SphericalSurface.hxx +++ b/src/IGESSolid/IGESSolid_SphericalSurface.hxx @@ -20,9 +20,7 @@ #include #include -#include #include -#include class IGESGeom_Point; class IGESGeom_Direction; class gp_Pnt; diff --git a/src/IGESSolid/IGESSolid_ToolBlock.cxx b/src/IGESSolid/IGESSolid_ToolBlock.cxx index 0b9aa06508..25c5d3fa81 100644 --- a/src/IGESSolid/IGESSolid_ToolBlock.cxx +++ b/src/IGESSolid/IGESSolid_ToolBlock.cxx @@ -24,7 +24,6 @@ #include #include #include -#include #include #include #include diff --git a/src/IGESSolid/IGESSolid_ToolBooleanTree.cxx b/src/IGESSolid/IGESSolid_ToolBooleanTree.cxx index 4ff431ea27..7bff2da671 100644 --- a/src/IGESSolid/IGESSolid_ToolBooleanTree.cxx +++ b/src/IGESSolid/IGESSolid_ToolBooleanTree.cxx @@ -22,7 +22,6 @@ #include #include #include -#include #include #include #include @@ -32,7 +31,6 @@ #include #include #include -#include #include #include diff --git a/src/IGESSolid/IGESSolid_ToolConeFrustum.cxx b/src/IGESSolid/IGESSolid_ToolConeFrustum.cxx index 054e3489a0..40ee593205 100644 --- a/src/IGESSolid/IGESSolid_ToolConeFrustum.cxx +++ b/src/IGESSolid/IGESSolid_ToolConeFrustum.cxx @@ -24,7 +24,6 @@ #include #include #include -#include #include #include #include diff --git a/src/IGESSolid/IGESSolid_ToolConicalSurface.cxx b/src/IGESSolid/IGESSolid_ToolConicalSurface.cxx index c11d25921c..d99e106cc2 100644 --- a/src/IGESSolid/IGESSolid_ToolConicalSurface.cxx +++ b/src/IGESSolid/IGESSolid_ToolConicalSurface.cxx @@ -20,7 +20,6 @@ #include #include #include -#include #include #include #include @@ -31,8 +30,6 @@ #include #include #include -#include -#include IGESSolid_ToolConicalSurface::IGESSolid_ToolConicalSurface () { } diff --git a/src/IGESSolid/IGESSolid_ToolCylinder.cxx b/src/IGESSolid/IGESSolid_ToolCylinder.cxx index 2fd410d2f5..265083cba0 100644 --- a/src/IGESSolid/IGESSolid_ToolCylinder.cxx +++ b/src/IGESSolid/IGESSolid_ToolCylinder.cxx @@ -23,7 +23,6 @@ #include #include #include -#include #include #include #include diff --git a/src/IGESSolid/IGESSolid_ToolCylindricalSurface.cxx b/src/IGESSolid/IGESSolid_ToolCylindricalSurface.cxx index cda68e6b0f..13659a2466 100644 --- a/src/IGESSolid/IGESSolid_ToolCylindricalSurface.cxx +++ b/src/IGESSolid/IGESSolid_ToolCylindricalSurface.cxx @@ -20,7 +20,6 @@ #include #include #include -#include #include #include #include @@ -31,8 +30,6 @@ #include #include #include -#include -#include IGESSolid_ToolCylindricalSurface::IGESSolid_ToolCylindricalSurface () { } diff --git a/src/IGESSolid/IGESSolid_ToolEdgeList.cxx b/src/IGESSolid/IGESSolid_ToolEdgeList.cxx index 31217d1827..fabc1bfcdf 100644 --- a/src/IGESSolid/IGESSolid_ToolEdgeList.cxx +++ b/src/IGESSolid/IGESSolid_ToolEdgeList.cxx @@ -18,12 +18,9 @@ #include #include -#include #include -#include #include #include -#include #include #include #include @@ -37,7 +34,6 @@ #include #include #include -#include #include // MGE 03/08/98 diff --git a/src/IGESSolid/IGESSolid_ToolEllipsoid.cxx b/src/IGESSolid/IGESSolid_ToolEllipsoid.cxx index 95ab3359aa..03d495e21c 100644 --- a/src/IGESSolid/IGESSolid_ToolEllipsoid.cxx +++ b/src/IGESSolid/IGESSolid_ToolEllipsoid.cxx @@ -24,7 +24,6 @@ #include #include #include -#include #include #include #include diff --git a/src/IGESSolid/IGESSolid_ToolFace.cxx b/src/IGESSolid/IGESSolid_ToolFace.cxx index 279eb194fd..427f8e9b2d 100644 --- a/src/IGESSolid/IGESSolid_ToolFace.cxx +++ b/src/IGESSolid/IGESSolid_ToolFace.cxx @@ -19,10 +19,8 @@ #include #include #include -#include #include #include -#include #include #include #include @@ -36,7 +34,6 @@ #include #include #include -#include // MGE 03/08/98 //======================================================================= diff --git a/src/IGESSolid/IGESSolid_ToolLoop.cxx b/src/IGESSolid/IGESSolid_ToolLoop.cxx index cc914d86b2..1ab948d9b9 100644 --- a/src/IGESSolid/IGESSolid_ToolLoop.cxx +++ b/src/IGESSolid/IGESSolid_ToolLoop.cxx @@ -26,7 +26,6 @@ #include #include #include -#include #include #include #include diff --git a/src/IGESSolid/IGESSolid_ToolManifoldSolid.cxx b/src/IGESSolid/IGESSolid_ToolManifoldSolid.cxx index fd25519794..86bc360c0e 100644 --- a/src/IGESSolid/IGESSolid_ToolManifoldSolid.cxx +++ b/src/IGESSolid/IGESSolid_ToolManifoldSolid.cxx @@ -21,10 +21,8 @@ #include #include #include -#include #include #include -#include #include #include #include @@ -34,7 +32,6 @@ #include #include #include -#include #include // MGE 31/07/98 diff --git a/src/IGESSolid/IGESSolid_ToolPlaneSurface.cxx b/src/IGESSolid/IGESSolid_ToolPlaneSurface.cxx index d04a0f5ce2..10a7253c2f 100644 --- a/src/IGESSolid/IGESSolid_ToolPlaneSurface.cxx +++ b/src/IGESSolid/IGESSolid_ToolPlaneSurface.cxx @@ -20,7 +20,6 @@ #include #include #include -#include #include #include #include @@ -32,9 +31,7 @@ #include #include #include -#include #include -#include // MGE 31/07/98 //======================================================================= diff --git a/src/IGESSolid/IGESSolid_ToolRightAngularWedge.cxx b/src/IGESSolid/IGESSolid_ToolRightAngularWedge.cxx index 616a9a63e3..3c8552e0b9 100644 --- a/src/IGESSolid/IGESSolid_ToolRightAngularWedge.cxx +++ b/src/IGESSolid/IGESSolid_ToolRightAngularWedge.cxx @@ -24,7 +24,6 @@ #include #include #include -#include #include #include #include diff --git a/src/IGESSolid/IGESSolid_ToolSelectedComponent.cxx b/src/IGESSolid/IGESSolid_ToolSelectedComponent.cxx index ff29dd6b90..2330610baa 100644 --- a/src/IGESSolid/IGESSolid_ToolSelectedComponent.cxx +++ b/src/IGESSolid/IGESSolid_ToolSelectedComponent.cxx @@ -23,7 +23,6 @@ #include #include #include -#include #include #include #include diff --git a/src/IGESSolid/IGESSolid_ToolShell.cxx b/src/IGESSolid/IGESSolid_ToolShell.cxx index 8922374271..598aff6743 100644 --- a/src/IGESSolid/IGESSolid_ToolShell.cxx +++ b/src/IGESSolid/IGESSolid_ToolShell.cxx @@ -21,12 +21,8 @@ #include #include #include -#include #include #include -#include -#include -#include #include #include #include @@ -36,7 +32,6 @@ #include #include #include -#include #include // MGE 03/08/98 diff --git a/src/IGESSolid/IGESSolid_ToolSolidAssembly.cxx b/src/IGESSolid/IGESSolid_ToolSolidAssembly.cxx index c6935f905c..a1e3c2d112 100644 --- a/src/IGESSolid/IGESSolid_ToolSolidAssembly.cxx +++ b/src/IGESSolid/IGESSolid_ToolSolidAssembly.cxx @@ -18,15 +18,10 @@ #include #include -#include #include -#include #include #include -#include #include -#include -#include #include #include #include @@ -35,7 +30,6 @@ #include #include #include -#include IGESSolid_ToolSolidAssembly::IGESSolid_ToolSolidAssembly () { } diff --git a/src/IGESSolid/IGESSolid_ToolSolidInstance.cxx b/src/IGESSolid/IGESSolid_ToolSolidInstance.cxx index 9c1ab881dd..627cbbf372 100644 --- a/src/IGESSolid/IGESSolid_ToolSolidInstance.cxx +++ b/src/IGESSolid/IGESSolid_ToolSolidInstance.cxx @@ -18,10 +18,8 @@ #include #include -#include #include #include -#include #include #include #include @@ -30,8 +28,6 @@ #include #include #include -#include -#include IGESSolid_ToolSolidInstance::IGESSolid_ToolSolidInstance () { } diff --git a/src/IGESSolid/IGESSolid_ToolSolidOfLinearExtrusion.cxx b/src/IGESSolid/IGESSolid_ToolSolidOfLinearExtrusion.cxx index 95cb02377e..b661581a4e 100644 --- a/src/IGESSolid/IGESSolid_ToolSolidOfLinearExtrusion.cxx +++ b/src/IGESSolid/IGESSolid_ToolSolidOfLinearExtrusion.cxx @@ -20,10 +20,8 @@ #include #include #include -#include #include #include -#include #include #include #include diff --git a/src/IGESSolid/IGESSolid_ToolSolidOfRevolution.cxx b/src/IGESSolid/IGESSolid_ToolSolidOfRevolution.cxx index 52ad518cd3..a04d775153 100644 --- a/src/IGESSolid/IGESSolid_ToolSolidOfRevolution.cxx +++ b/src/IGESSolid/IGESSolid_ToolSolidOfRevolution.cxx @@ -22,10 +22,8 @@ #include #include #include -#include #include #include -#include #include #include #include diff --git a/src/IGESSolid/IGESSolid_ToolSphere.cxx b/src/IGESSolid/IGESSolid_ToolSphere.cxx index 0564cac99f..2fbe8c5de6 100644 --- a/src/IGESSolid/IGESSolid_ToolSphere.cxx +++ b/src/IGESSolid/IGESSolid_ToolSphere.cxx @@ -23,7 +23,6 @@ #include #include #include -#include #include #include #include diff --git a/src/IGESSolid/IGESSolid_ToolSphericalSurface.cxx b/src/IGESSolid/IGESSolid_ToolSphericalSurface.cxx index 6c4885bdbe..e66c9cf1aa 100644 --- a/src/IGESSolid/IGESSolid_ToolSphericalSurface.cxx +++ b/src/IGESSolid/IGESSolid_ToolSphericalSurface.cxx @@ -20,7 +20,6 @@ #include #include #include -#include #include #include #include @@ -31,8 +30,6 @@ #include #include #include -#include -#include IGESSolid_ToolSphericalSurface::IGESSolid_ToolSphericalSurface () { } diff --git a/src/IGESSolid/IGESSolid_ToolToroidalSurface.cxx b/src/IGESSolid/IGESSolid_ToolToroidalSurface.cxx index 0f6f3fa573..e77dd3576d 100644 --- a/src/IGESSolid/IGESSolid_ToolToroidalSurface.cxx +++ b/src/IGESSolid/IGESSolid_ToolToroidalSurface.cxx @@ -20,7 +20,6 @@ #include #include #include -#include #include #include #include @@ -31,7 +30,6 @@ #include #include #include -#include IGESSolid_ToolToroidalSurface::IGESSolid_ToolToroidalSurface () { } diff --git a/src/IGESSolid/IGESSolid_ToolTorus.cxx b/src/IGESSolid/IGESSolid_ToolTorus.cxx index c9b99c395d..5657abfe84 100644 --- a/src/IGESSolid/IGESSolid_ToolTorus.cxx +++ b/src/IGESSolid/IGESSolid_ToolTorus.cxx @@ -24,7 +24,6 @@ #include #include #include -#include #include #include #include diff --git a/src/IGESSolid/IGESSolid_ToolVertexList.cxx b/src/IGESSolid/IGESSolid_ToolVertexList.cxx index 1b4ba8e892..7a49f50ea2 100644 --- a/src/IGESSolid/IGESSolid_ToolVertexList.cxx +++ b/src/IGESSolid/IGESSolid_ToolVertexList.cxx @@ -23,16 +23,13 @@ #include #include #include -#include #include #include #include #include #include #include -#include #include -#include #include #include #include diff --git a/src/IGESSolid/IGESSolid_TopoBuilder.cxx b/src/IGESSolid/IGESSolid_TopoBuilder.cxx index 27a1a39b5d..84f8242a14 100644 --- a/src/IGESSolid/IGESSolid_TopoBuilder.cxx +++ b/src/IGESSolid/IGESSolid_TopoBuilder.cxx @@ -18,10 +18,6 @@ #include #include #include -#include -#include -#include -#include #include #include #include diff --git a/src/IGESSolid/IGESSolid_ToroidalSurface.hxx b/src/IGESSolid/IGESSolid_ToroidalSurface.hxx index 0f8dd539b5..53e389ef13 100644 --- a/src/IGESSolid/IGESSolid_ToroidalSurface.hxx +++ b/src/IGESSolid/IGESSolid_ToroidalSurface.hxx @@ -20,9 +20,7 @@ #include #include -#include #include -#include class IGESGeom_Point; class IGESGeom_Direction; class gp_Pnt; diff --git a/src/IGESSolid/IGESSolid_Torus.cxx b/src/IGESSolid/IGESSolid_Torus.cxx index f2490cbc26..fb528f7a99 100644 --- a/src/IGESSolid/IGESSolid_Torus.cxx +++ b/src/IGESSolid/IGESSolid_Torus.cxx @@ -16,7 +16,6 @@ //-------------------------------------------------------------------- //-------------------------------------------------------------------- -#include #include #include #include diff --git a/src/IGESSolid/IGESSolid_Torus.hxx b/src/IGESSolid/IGESSolid_Torus.hxx index aed4f63f00..b701132d24 100644 --- a/src/IGESSolid/IGESSolid_Torus.hxx +++ b/src/IGESSolid/IGESSolid_Torus.hxx @@ -20,7 +20,6 @@ #include #include -#include #include #include class gp_Pnt; diff --git a/src/IGESSolid/IGESSolid_VertexList.cxx b/src/IGESSolid/IGESSolid_VertexList.cxx index 8aba4fc282..a7b2f722b2 100644 --- a/src/IGESSolid/IGESSolid_VertexList.cxx +++ b/src/IGESSolid/IGESSolid_VertexList.cxx @@ -19,7 +19,6 @@ #include #include #include -#include #include IMPLEMENT_STANDARD_RTTIEXT(IGESSolid_VertexList,IGESData_IGESEntity) diff --git a/src/IGESToBRep/IGESToBRep.cxx b/src/IGESToBRep/IGESToBRep.cxx index 59c6e88e4f..ae8777d99f 100644 --- a/src/IGESToBRep/IGESToBRep.cxx +++ b/src/IGESToBRep/IGESToBRep.cxx @@ -19,14 +19,9 @@ #include #include #include -#include -#include #include -#include -#include #include #include -#include #include #include #include @@ -34,7 +29,6 @@ #include #include #include -#include #include #include #include @@ -49,8 +43,6 @@ #include #include #include -#include -#include #include #include #include @@ -63,13 +55,9 @@ #include #include #include -#include -#include -#include #include #include #include -#include #include static Handle(IGESToBRep_AlgoContainer) theContainer; diff --git a/src/IGESToBRep/IGESToBRep_Actor.cxx b/src/IGESToBRep/IGESToBRep_Actor.cxx index 79b0de79c2..dc21b09686 100644 --- a/src/IGESToBRep/IGESToBRep_Actor.cxx +++ b/src/IGESToBRep/IGESToBRep_Actor.cxx @@ -13,8 +13,6 @@ #include -#include -#include #include #include #include @@ -32,7 +30,6 @@ #include #include #include -#include #include #include #include diff --git a/src/IGESToBRep/IGESToBRep_Actor.hxx b/src/IGESToBRep/IGESToBRep_Actor.hxx index 2ad39d0df8..6e157fbd4b 100644 --- a/src/IGESToBRep/IGESToBRep_Actor.hxx +++ b/src/IGESToBRep/IGESToBRep_Actor.hxx @@ -21,9 +21,7 @@ #include #include -#include #include -#include #include class Interface_InterfaceModel; diff --git a/src/IGESToBRep/IGESToBRep_BRepEntity.cxx b/src/IGESToBRep/IGESToBRep_BRepEntity.cxx index da5128ed48..bac7bedc35 100644 --- a/src/IGESToBRep/IGESToBRep_BRepEntity.cxx +++ b/src/IGESToBRep/IGESToBRep_BRepEntity.cxx @@ -27,30 +27,22 @@ #include #include #include -#include #include #include -#include #include #include #include #include #include -#include #include -#include #include #include #include -#include -#include #include #include #include #include #include -#include -#include #include #include #include diff --git a/src/IGESToBRep/IGESToBRep_BRepEntity.hxx b/src/IGESToBRep/IGESToBRep_BRepEntity.hxx index e88fa23199..e5e0957b46 100644 --- a/src/IGESToBRep/IGESToBRep_BRepEntity.hxx +++ b/src/IGESToBRep/IGESToBRep_BRepEntity.hxx @@ -22,8 +22,6 @@ #include #include -#include -#include #include #include diff --git a/src/IGESToBRep/IGESToBRep_BasicCurve.cxx b/src/IGESToBRep/IGESToBRep_BasicCurve.cxx index 8bee02248c..5dd82b3e2d 100644 --- a/src/IGESToBRep/IGESToBRep_BasicCurve.cxx +++ b/src/IGESToBRep/IGESToBRep_BasicCurve.cxx @@ -51,20 +51,16 @@ #include #include #include -#include #include #include -#include #include #include #include #include #include #include -#include #include #include -#include #include #include #include @@ -75,13 +71,8 @@ #include #include #include -#include -#include -#include #include #include -#include -#include #include //:36 diff --git a/src/IGESToBRep/IGESToBRep_BasicCurve.hxx b/src/IGESToBRep/IGESToBRep_BasicCurve.hxx index 9ec2fa46e3..e62eb3f3af 100644 --- a/src/IGESToBRep/IGESToBRep_BasicCurve.hxx +++ b/src/IGESToBRep/IGESToBRep_BasicCurve.hxx @@ -22,8 +22,6 @@ #include #include -#include -#include class Geom_Curve; class IGESData_IGESEntity; class Geom2d_Curve; diff --git a/src/IGESToBRep/IGESToBRep_BasicSurface.cxx b/src/IGESToBRep/IGESToBRep_BasicSurface.cxx index 9caab71544..8e5b0be914 100644 --- a/src/IGESToBRep/IGESToBRep_BasicSurface.cxx +++ b/src/IGESToBRep/IGESToBRep_BasicSurface.cxx @@ -38,8 +38,6 @@ #include #include #include -#include -#include #include #include #include @@ -50,7 +48,6 @@ #include #include #include -#include #include #include #include @@ -62,11 +59,9 @@ #include #include #include -#include #include #include #include -#include #include //:36 diff --git a/src/IGESToBRep/IGESToBRep_BasicSurface.hxx b/src/IGESToBRep/IGESToBRep_BasicSurface.hxx index 95226c1b43..09223b7528 100644 --- a/src/IGESToBRep/IGESToBRep_BasicSurface.hxx +++ b/src/IGESToBRep/IGESToBRep_BasicSurface.hxx @@ -22,8 +22,6 @@ #include #include -#include -#include class Geom_Surface; class IGESData_IGESEntity; class Geom_Plane; diff --git a/src/IGESToBRep/IGESToBRep_CurveAndSurface.cxx b/src/IGESToBRep/IGESToBRep_CurveAndSurface.cxx index 70a41e7f51..1f55f60088 100644 --- a/src/IGESToBRep/IGESToBRep_CurveAndSurface.cxx +++ b/src/IGESToBRep/IGESToBRep_CurveAndSurface.cxx @@ -23,7 +23,6 @@ #include #include #include -#include #include #include #include @@ -43,11 +42,8 @@ #include #include #include -#include #include -#include #include -#include #include #include #include diff --git a/src/IGESToBRep/IGESToBRep_CurveAndSurface.hxx b/src/IGESToBRep/IGESToBRep_CurveAndSurface.hxx index 7d5db96d5e..8f443afa64 100644 --- a/src/IGESToBRep/IGESToBRep_CurveAndSurface.hxx +++ b/src/IGESToBRep/IGESToBRep_CurveAndSurface.hxx @@ -21,8 +21,6 @@ #include #include -#include -#include #include #include diff --git a/src/IGESToBRep/IGESToBRep_IGESBoundary.cxx b/src/IGESToBRep/IGESToBRep_IGESBoundary.cxx index 21e04d07e4..0a0eb189b1 100644 --- a/src/IGESToBRep/IGESToBRep_IGESBoundary.cxx +++ b/src/IGESToBRep/IGESToBRep_IGESBoundary.cxx @@ -22,14 +22,10 @@ #include #include #include -#include #include -#include #include #include -#include #include -#include #include #include #include diff --git a/src/IGESToBRep/IGESToBRep_IGESBoundary.hxx b/src/IGESToBRep/IGESToBRep_IGESBoundary.hxx index d4d3c285fc..1fea7f5e31 100644 --- a/src/IGESToBRep/IGESToBRep_IGESBoundary.hxx +++ b/src/IGESToBRep/IGESToBRep_IGESBoundary.hxx @@ -23,10 +23,8 @@ #include #include #include -#include #include #include -#include #include class IGESData_IGESEntity; class ShapeExtend_WireData; diff --git a/src/IGESToBRep/IGESToBRep_Reader.cxx b/src/IGESToBRep/IGESToBRep_Reader.cxx index ed156074ea..7dd8339741 100644 --- a/src/IGESToBRep/IGESToBRep_Reader.cxx +++ b/src/IGESToBRep/IGESToBRep_Reader.cxx @@ -17,46 +17,33 @@ #include #include -#include -#include #include #include #include #include -#include -#include #include #include #include -#include #include #include #include -#include #include #include -#include #include #include #include #include #include #include -#include -#include #include #include #include #include -#include #include #include -#include #include #include #include -#include -#include #include #include diff --git a/src/IGESToBRep/IGESToBRep_Reader.hxx b/src/IGESToBRep/IGESToBRep_Reader.hxx index 63d61942eb..f3547eca22 100644 --- a/src/IGESToBRep/IGESToBRep_Reader.hxx +++ b/src/IGESToBRep/IGESToBRep_Reader.hxx @@ -21,11 +21,9 @@ #include #include -#include #include #include #include -#include #include class IGESData_IGESModel; diff --git a/src/IGESToBRep/IGESToBRep_TopoCurve.cxx b/src/IGESToBRep/IGESToBRep_TopoCurve.cxx index 7cd9b07ac7..da9b15e2e4 100644 --- a/src/IGESToBRep/IGESToBRep_TopoCurve.cxx +++ b/src/IGESToBRep/IGESToBRep_TopoCurve.cxx @@ -40,15 +40,11 @@ #include #include #include -#include #include #include #include #include #include -#include -#include -#include #include #include #include @@ -61,7 +57,6 @@ #include #include #include -#include #include #include #include @@ -73,16 +68,11 @@ #include #include #include -#include #include #include -#include #include #include -#include -#include #include -#include #include #include #include diff --git a/src/IGESToBRep/IGESToBRep_TopoCurve.hxx b/src/IGESToBRep/IGESToBRep_TopoCurve.hxx index 1bbe6128ca..f6003fcd0a 100644 --- a/src/IGESToBRep/IGESToBRep_TopoCurve.hxx +++ b/src/IGESToBRep/IGESToBRep_TopoCurve.hxx @@ -23,9 +23,7 @@ #include #include -#include #include -#include #include class TopoDS_Shape; class IGESData_IGESEntity; diff --git a/src/IGESToBRep/IGESToBRep_TopoSurface.cxx b/src/IGESToBRep/IGESToBRep_TopoSurface.cxx index de7552ea70..653b3ad1c7 100644 --- a/src/IGESToBRep/IGESToBRep_TopoSurface.cxx +++ b/src/IGESToBRep/IGESToBRep_TopoSurface.cxx @@ -45,9 +45,6 @@ #include #include #include -#include -#include -#include #include #include #include @@ -63,7 +60,6 @@ #include #include #include -#include #include #include #include @@ -78,7 +74,6 @@ #include #include #include -#include #include #include #include @@ -86,21 +81,17 @@ #include #include #include -#include #include -#include #include #include #include #include -#include #include #include #include #include #include #include -#include #include #include #include @@ -115,14 +106,9 @@ #include #include #include -#include #include #include -#include -#include #include -#include -#include #include #include #include @@ -130,7 +116,6 @@ #include #include #include -#include #include #include diff --git a/src/IGESToBRep/IGESToBRep_TopoSurface.hxx b/src/IGESToBRep/IGESToBRep_TopoSurface.hxx index a1d172c88e..e413542c70 100644 --- a/src/IGESToBRep/IGESToBRep_TopoSurface.hxx +++ b/src/IGESToBRep/IGESToBRep_TopoSurface.hxx @@ -21,9 +21,7 @@ #include #include -#include #include -#include class TopoDS_Shape; class IGESData_IGESEntity; class IGESGeom_RuledSurface; From cb6c7c458cbc6982a04e17da56d5af17c96e4b5d Mon Sep 17 00:00:00 2001 From: kgv Date: Sat, 30 Apr 2022 22:23:08 +0300 Subject: [PATCH 281/639] 0032955: Draw Harness, ViewerTest - extend vcolorconvert command to print color in hex format --- src/ViewerTest/ViewerTest_ViewerCommands.cxx | 144 +++++++++++++------ 1 file changed, 100 insertions(+), 44 deletions(-) diff --git a/src/ViewerTest/ViewerTest_ViewerCommands.cxx b/src/ViewerTest/ViewerTest_ViewerCommands.cxx index 29f6e79c3f..d71bf895f5 100644 --- a/src/ViewerTest/ViewerTest_ViewerCommands.cxx +++ b/src/ViewerTest/ViewerTest_ViewerCommands.cxx @@ -13644,61 +13644,116 @@ static int VViewCube (Draw_Interpretor& , return 0; } +//! Parse color type argument. +static bool parseColorType (const char* theString, + Quantity_TypeOfColor& theType) +{ + TCollection_AsciiString aType (theString); + aType.LowerCase(); + if (aType == "rgb") { theType = Quantity_TOC_RGB; } + else if (aType == "srgb") { theType = Quantity_TOC_sRGB; } + else if (aType == "hex") { theType = Quantity_TOC_sRGB; } + else if (aType == "name") { theType = Quantity_TOC_sRGB; } + else if (aType == "hls") { theType = Quantity_TOC_HLS; } + else if (aType == "lab") { theType = Quantity_TOC_CIELab; } + else if (aType == "lch") { theType = Quantity_TOC_CIELch; } + else { return false; } + return true; +} + //=============================================================================================== //function : VColorConvert //purpose : //=============================================================================================== -static int VColorConvert (Draw_Interpretor& theDI, Standard_Integer theNbArgs, const char** theArgVec) +static int VColorConvert (Draw_Interpretor& theDI, Standard_Integer theNbArgs, const char** theArgVec) { - if (theNbArgs != 6) - { - std::cerr << "Error: command syntax is incorrect, see help" << std::endl; - return 1; - } - - Standard_Boolean convertFrom = (! strcasecmp (theArgVec[1], "from")); - if (! convertFrom && strcasecmp (theArgVec[1], "to")) + Quantity_TypeOfColor aTypeFrom = Quantity_TOC_RGB, aTypeTo = Quantity_TOC_RGB; + double anInput[4] = {}; + Quantity_ColorRGBA aColor (0.0f, 0.0f, 0.0f, 1.0f); + bool toPrintHex = false, toPrintName = false, hasAlpha = false; + for (int anArgIter = 1; anArgIter < theNbArgs; ++anArgIter) { - std::cerr << "Error: first argument must be either \"to\" or \"from\"" << std::endl; - return 1; + TCollection_AsciiString anArgCase (theArgVec[anArgIter]); + anArgCase.LowerCase(); + if ((anArgCase == "-from" + || anArgCase == "from") + && anArgIter + 1 < theNbArgs + && parseColorType (theArgVec[anArgIter + 1], aTypeFrom)) + { + ++anArgIter; + } + else if ((anArgCase == "-to" + || anArgCase == "to") + && anArgIter + 1 < theNbArgs + && parseColorType (theArgVec[anArgIter + 1], aTypeTo)) + { + TCollection_AsciiString aToStr (theArgVec[++anArgIter]); + aToStr.LowerCase(); + toPrintHex = (aToStr == "hex"); + toPrintName = (aToStr == "name"); + } + else if (Quantity_ColorRGBA::ColorFromHex (theArgVec[anArgIter], aColor)) + { + hasAlpha = anArgCase.Length() >= 8; + } + else if (Quantity_Color::ColorFromName (theArgVec[anArgIter], aColor.ChangeRGB())) + { + // + } + else if (anArgIter + 2 < theNbArgs + && Draw::ParseReal (theArgVec[anArgIter + 0], anInput[0]) + && Draw::ParseReal (theArgVec[anArgIter + 1], anInput[1]) + && Draw::ParseReal (theArgVec[anArgIter + 2], anInput[2])) + { + if (anArgIter + 3 < theNbArgs + && Draw::ParseReal (theArgVec[anArgIter + 3], anInput[3])) + { + anArgIter += 1; + aColor.SetAlpha ((float )anInput[3]); + hasAlpha = true; + } + anArgIter += 2; + aColor.ChangeRGB().SetValues (anInput[0], anInput[1], anInput[2], aTypeFrom); + } + else + { + theDI << "Syntax error: unknown argument '" << theArgVec[anArgIter] << "'"; + return 1; + } } - const char* aTypeStr = theArgVec[2]; - Quantity_TypeOfColor aType = Quantity_TOC_RGB; - if (! strcasecmp (aTypeStr, "srgb")) - { - aType = Quantity_TOC_sRGB; - } - else if (! strcasecmp (aTypeStr, "hls")) + if (toPrintHex) { - aType = Quantity_TOC_HLS; - } - else if (! strcasecmp (aTypeStr, "lab")) - { - aType = Quantity_TOC_CIELab; + if (hasAlpha || aColor.Alpha() < 1.0f) + { + theDI << Quantity_ColorRGBA::ColorToHex (aColor); + } + else + { + theDI << Quantity_Color::ColorToHex (aColor.GetRGB()); + } } - else if (! strcasecmp (aTypeStr, "lch")) + else if (toPrintName) { - aType = Quantity_TOC_CIELch; + theDI << Quantity_Color::StringName (aColor.GetRGB().Name()); } else { - std::cerr << "Error: unknown colorspace type: " << aTypeStr << std::endl; - return 1; - } - - double aC1 = Draw::Atof (theArgVec[3]); - double aC2 = Draw::Atof (theArgVec[4]); - double aC3 = Draw::Atof (theArgVec[5]); - - Quantity_Color aColor (aC1, aC2, aC3, convertFrom ? aType : Quantity_TOC_RGB); - aColor.Values (aC1, aC2, aC3, convertFrom ? Quantity_TOC_RGB : aType); - - // print values with 6 decimal digits - char buffer[1024]; - Sprintf (buffer, "%.6f %.6f %.6f", aC1, aC2, aC3); - theDI << buffer; + double anOutput[3] = {}; + aColor.GetRGB().Values (anOutput[0], anOutput[1], anOutput[2], aTypeTo); + // print values with 6 decimal digits + char aBuffer[1024]; + if (hasAlpha || aColor.Alpha() < 1.0f) + { + Sprintf (aBuffer, "%.6f %.6f %.6f %.6f", anOutput[0], anOutput[1], anOutput[2], aColor.Alpha()); + } + else + { + Sprintf (aBuffer, "%.6f %.6f %.6f", anOutput[0], anOutput[1], anOutput[2]); + } + theDI << aBuffer; + } return 0; } @@ -14799,10 +14854,11 @@ Displays interactive view manipulation object. Options: )" /* [vviewcube] */); addCmd ("vcolorconvert", VColorConvert, /* [vcolorconvert] */ R"( -vcolorconvert {from|to} type C1 C2 C2 -vcolorconvert from type C1 C2 C2 : Converts color from specified color space to linear RGB -vcolorconvert to type R G B : Converts linear RGB color to specified color space -Type can be sRGB, HLS, Lab, or Lch. +vcolorconvert [-from {sRGB|HLS|Lab|Lch|RGB}]=RGB [-to {sRGB|HLS|Lab|Lch|RGB|hex|name}]=RGB C1 C2 C2 +To convert color from specified color space to linear RGB: + vcolorconvert -from {sRGB|HLS|Lab|Lch|RGB} C1 C2 C2 +To convert linear RGB color to specified color space: + vcolorconvert -to {sRGB|HLS|Lab|Lch|RGB|hex|name} R G B )" /* [vcolorconvert] */); addCmd ("vcolordiff", VColorDiff, /* [vcolordiff] */ R"( From 84f42008b74b4545e18e0ec361fd14e48d6a961d Mon Sep 17 00:00:00 2001 From: abulyche Date: Sun, 17 Apr 2022 17:07:01 +0300 Subject: [PATCH 282/639] 0027081: BRepOffsetAPI_MakeOffsetShape fails on shapes with internal edges Added the test for this problem. Added new draw command "mkoffsetshape". --- src/BRepTest/BRepTest_FeatureCommands.cxx | 80 +++++++++++++++++++++++ tests/offset/bugs/bug27081 | 9 +++ 2 files changed, 89 insertions(+) create mode 100644 tests/offset/bugs/bug27081 diff --git a/src/BRepTest/BRepTest_FeatureCommands.cxx b/src/BRepTest/BRepTest_FeatureCommands.cxx index 8b69ec1ba2..7b6a829dbc 100644 --- a/src/BRepTest/BRepTest_FeatureCommands.cxx +++ b/src/BRepTest/BRepTest_FeatureCommands.cxx @@ -42,6 +42,7 @@ #include #include +#include #include #include #include @@ -976,6 +977,81 @@ Standard_Integer thickshell(Draw_Interpretor& theCommands, return 0; } +//======================================================================= +//function : mkoffsetshape +//purpose : +//======================================================================= +static Standard_Integer mkoffsetshape(Draw_Interpretor& theDI, + Standard_Integer theArgNb, + const char** theArgVec) +{ + if (theArgNb < 4) + { + return 0; + } + TopoDS_Shape aShape = DBRep::Get(theArgVec[2]); + if (aShape.IsNull()) + { + theDI << "Shape is null"; + return 1; + } + Standard_Real anOffVal = Draw::Atof(theArgVec[3]); + BRepOffsetAPI_MakeOffsetShape aMaker; + if (theArgNb == 4) + { + aMaker.PerformBySimple(aShape, anOffVal); + } + else + { + Standard_Real aTol = Draw::Atof(theArgVec[4]); + + Standard_Boolean anInt = Standard_False; + if (theArgNb > 5) + { + if ((Draw::Atof(theArgVec[5]) == 1)) + { + anInt = Standard_True; + } + } + + Standard_Boolean aSelfInt = Standard_False; + if (theArgNb > 6) + { + if (Draw::Atof(theArgVec[6]) == 1) + { + aSelfInt = Standard_True; + } + } + + GeomAbs_JoinType aJoin = GeomAbs_Arc; + if (theArgNb > 7) + { + if (!strcmp(theArgVec[7], "i")) + { + aJoin = GeomAbs_Intersection; + } + } + + Standard_Boolean aRemIntEdges = Standard_False; + if (theArgNb > 8) + { + if (Draw::Atof(theArgVec[8]) == 1) + { + aRemIntEdges = Standard_True; + } + } + aMaker.PerformByJoin(aShape, anOffVal, aTol, BRepOffset_Skin, anInt, aSelfInt, aJoin, aRemIntEdges); + } + + if (!aMaker.IsDone()) + { + theDI << " Error: Offset is not done.\n"; + return 1; + } + DBRep::Set(theArgVec[1], aMaker.Shape()); + return 0; +} + //======================================================================= //function : offsetshape //purpose : @@ -2477,6 +2553,10 @@ void BRepTest::FeatureCommands(Draw_Interpretor& theCommands) "thickshell r shape offset [jointype [tol] ]", __FILE__, thickshell, g); + theCommands.Add("mkoffsetshape", + "mkoffsetshape r shape offset [Tol] [Intersection(0/1)] [SelfInter(0/1)] [JoinType(a/i)] [RemoveInternalEdges(0/1)]", + __FILE__, mkoffsetshape, g); + theCommands.Add("offsetshape", "offsetshape r shape offset [tol] [face ...]", __FILE__, offsetshape, g); diff --git a/tests/offset/bugs/bug27081 b/tests/offset/bugs/bug27081 new file mode 100644 index 0000000000..9d69162749 --- /dev/null +++ b/tests/offset/bugs/bug27081 @@ -0,0 +1,9 @@ +puts "=================================================================" +puts "OCC27081: Modeling Algorithms - BRepOffsetAPI_MakeOffsetShape fails on shapes with internal edges" +puts "=================================================================" +puts "" + +restore [locate_data_file bug27081.brep] sh + +mkoffsetshape result sh 1 1e-7 1 0 i +checkshape result From 33463eef63b49915024a8dd2e461cd68d7efd69b Mon Sep 17 00:00:00 2001 From: ifv Date: Mon, 25 Apr 2022 18:14:18 +0300 Subject: [PATCH 283/639] 0032942: Modeling Algorithms - Boolean operation Common has no result in specific example IntTools/IntTools_BeanFaceIntersector.cxx - calculation of deflection for surface bnd box is added tests/bugs/modalg_8/bug32942,bug32943,bug32944,bug32945 - new test cases added --- src/IntTools/IntTools_BeanFaceIntersector.cxx | 143 +++++++++--------- tests/bugs/modalg_8/bug32942 | 19 +++ tests/bugs/modalg_8/bug32943 | 19 +++ tests/bugs/modalg_8/bug32944 | 19 +++ tests/bugs/modalg_8/bug32945 | 19 +++ 5 files changed, 151 insertions(+), 68 deletions(-) create mode 100644 tests/bugs/modalg_8/bug32942 create mode 100644 tests/bugs/modalg_8/bug32943 create mode 100644 tests/bugs/modalg_8/bug32944 create mode 100644 tests/bugs/modalg_8/bug32945 diff --git a/src/IntTools/IntTools_BeanFaceIntersector.cxx b/src/IntTools/IntTools_BeanFaceIntersector.cxx index 0909c74360..96b9c0c369 100644 --- a/src/IntTools/IntTools_BeanFaceIntersector.cxx +++ b/src/IntTools/IntTools_BeanFaceIntersector.cxx @@ -1813,7 +1813,6 @@ Standard_Boolean IntTools_BeanFaceIntersector::ComputeLocalized() { return Standard_False; } - IntTools_ListOfCurveRangeSample aListCurveRangeSort; IntTools_ListOfSurfaceRangeSample aListSurfaceRangeSort; @@ -1860,7 +1859,7 @@ Standard_Boolean IntTools_BeanFaceIntersector::ComputeLocalized() { for(indIt = nMinIndex ; indIt <= nMaxIndex; indIt++) { if(myRangeManager.Flag(indIt) == 2) { bFound = Standard_True; - break; + break; } } @@ -2179,88 +2178,96 @@ void ComputeGridPoints gp_Pnt aPnt; Standard_Real aParU; Standard_Real aParV; + gp_Vec aDU, aDV; + Standard_Real du = 0, dv = 0; + Standard_Boolean isCalcDefl = aNbGridPnts[0] < 30 && aNbGridPnts[1] < 30; + + Bnd_Box aGridBox, anExtBox; for (i = 1; i <= aNbGridPnts[0]; i++) { aParU = theSurfaceData.GetUParam(i); + + if (isCalcDefl && i < aNbGridPnts[0]) + { + du = 0.5 * (theSurfaceData.GetUParam(i + 1) - aParU); + } for (j = 1; j <= aNbGridPnts[1]; j++) { aParV = theSurfaceData.GetVParam(j); + + if (isCalcDefl) + { + theSurf->D1(aParU, aParV, aPnt, aDU, aDV); + } + else + { + theSurf->D0(aParU, aParV, aPnt); + } - theSurf->D0(aParU, aParV, aPnt); theSurfaceData.SetGridPoint(i, j, aPnt); + // + if (isCalcDefl) + { + aGridBox.Add(aPnt); + if (i < aNbGridPnts[0] && j < aNbGridPnts[1]) + { + dv = 0.5 * (theSurfaceData.GetVParam(j + 1) - aParV); + gp_Vec aShift = du * aDU + dv * aDV; + aPnt.Translate(aShift); + anExtBox.Add(aPnt); + } + } } } // Compute deflection. Standard_Real aDef = 0.; -// Standard_Real aDefLin; -// Standard_Real aParMid; -// Standard_Real aParConst; -// Standard_Real aDistPP; -// gp_Pnt aPntMid; -// gp_Vec aVec; -// gp_XYZ aCoord; - -// // Compute DU deflection. -// for (i = 1; i < aNbGridPnts[0]; i++) { -// aParMid = 0.5*(theSurfaceData.GetUParam(i + 1) + -// theSurfaceData.GetUParam(i)); - -// for (j = 1; j <= aNbGridPnts[1]; j++) { -// const gp_Pnt &thePnt1 = theSurfaceData.GetGridPoint(i, j); -// const gp_Pnt &thePnt2 = theSurfaceData.GetGridPoint(i + 1, j); - -// aVec.SetXYZ(thePnt2.XYZ().Subtracted(thePnt1.XYZ())); -// aDistPP = aVec.Magnitude(); - -// if (aDistPP > theTolerance) { -// // Computation of a distance of a middle point from the line P1 - P2. -// aParConst = theSurfaceData.GetVParam(j); -// theSurf->D0(aParMid, aParConst, aPntMid); -// aCoord = aPntMid.XYZ(); -// aCoord.Subtract(thePnt1.XYZ()); -// aCoord.Cross (aVec.XYZ()); -// aCoord.Divide(aDistPP); -// aDefLin = aCoord.Modulus(); - -// if (aDefLin > aDef) -// aDef = aDefLin; -// } -// } -// } - -// // Compute DV deflection. -// for (j = 1; j < aNbGridPnts[1]; j++) { -// aParMid = 0.5*(theSurfaceData.GetVParam(j + 1) + -// theSurfaceData.GetVParam(j)); - -// for (i = 1; i <= aNbGridPnts[0]; i++) { -// const gp_Pnt &thePnt1 = theSurfaceData.GetGridPoint(i, j); -// const gp_Pnt &thePnt2 = theSurfaceData.GetGridPoint(i, j + 1); - -// aVec.SetXYZ(thePnt2.XYZ().Subtracted(thePnt1.XYZ())); -// aDistPP = aVec.Magnitude(); - -// if (aDistPP > theTolerance) { -// // Computation of a distance of a middle point from the line P1 - P2. -// aParConst = theSurfaceData.GetUParam(i); -// theSurf->D0(aParConst, aParMid, aPntMid); -// aCoord = aPntMid.XYZ(); -// aCoord.Subtract(thePnt1.XYZ()); -// aCoord.Cross (aVec.XYZ()); -// aCoord.Divide(aDistPP); -// aDefLin = aCoord.Modulus(); - -// if (aDefLin > aDef) -// aDef = aDefLin; -// } -// } -// } + if (isCalcDefl) + { + Standard_Real xmin, ymin, zmin, xmax, ymax, zmax; + Standard_Real xmin1, ymin1, zmin1, xmax1, ymax1, zmax1; + aGridBox.Get(xmin, ymin, zmin, xmax, ymax, zmax); + anExtBox.Get(xmin1, ymin1, zmin1, xmax1, ymax1, zmax1); + Standard_Integer anExtCount = 0; + if (xmin1 < xmin) + { + aDef = Max(xmin - xmin1, aDef); + anExtCount++; + } + if (ymin1 < ymin) + { + aDef = Max(ymin - ymin1, aDef); + anExtCount++; + } + if (zmin1 < zmin) + { + aDef = Max(zmin - zmin1, aDef); + anExtCount++; + } + if (xmax1 > xmax) + { + aDef = Max(xmax1 - xmax, aDef); + anExtCount++; + } + if (ymax1 > ymax) + { + aDef = Max(ymax1 - ymax, aDef); + anExtCount++; + } + if (zmax1 > zmax) + { + aDef = Max(zmax1 - zmax, aDef); + anExtCount++; + } + if (anExtCount < 3) + { + aDef /= 2.; + } + } if (theTolerance > aDef) - aDef = theTolerance; + aDef = 2. * theTolerance; - aDef *= 2.; theSurfaceData.SetGridDeflection(aDef); } diff --git a/tests/bugs/modalg_8/bug32942 b/tests/bugs/modalg_8/bug32942 new file mode 100644 index 0000000000..ece1cbaf87 --- /dev/null +++ b/tests/bugs/modalg_8/bug32942 @@ -0,0 +1,19 @@ +puts "=========================================================================" +puts "OCC32942: Modeling Algorithms - Boolean operation Common has no result in specific example" +puts "=========================================================================" +puts "" + +restore [locate_data_file bug32942.brep] a +explode a + +bcommon result a_1 a_2 + +checkshape result + +checknbshapes result -vertex 8 -edge 12 -wire 6 -face 6 -shell 1 -solid 1 + +checkmaxtol result -min_tol 1.e-5 + +checkprops result -s 21746.8 + +checkview -display result -2d -path ${imagedir}/${test_image}.png diff --git a/tests/bugs/modalg_8/bug32943 b/tests/bugs/modalg_8/bug32943 new file mode 100644 index 0000000000..b232df52d5 --- /dev/null +++ b/tests/bugs/modalg_8/bug32943 @@ -0,0 +1,19 @@ +puts "=========================================================================" +puts "OCC32943: Modeling Algorithms - Boolean operation Common has no result in specific example" +puts "=========================================================================" +puts "" + +restore [locate_data_file bug32943.brep] a +explode a + +bcommon result a_1 a_2 + +checkshape result + +checknbshapes result -vertex 8 -edge 12 -wire 6 -face 6 -shell 1 -solid 1 + +checkmaxtol result -min_tol 1.e-5 + +checkprops result -s 17615.5 + +checkview -display result -2d -path ${imagedir}/${test_image}.png diff --git a/tests/bugs/modalg_8/bug32944 b/tests/bugs/modalg_8/bug32944 new file mode 100644 index 0000000000..362791bc56 --- /dev/null +++ b/tests/bugs/modalg_8/bug32944 @@ -0,0 +1,19 @@ +puts "=========================================================================" +puts "OCC32944: Modeling Algorithms - Boolean operation Common has no result in specific example" +puts "=========================================================================" +puts "" + +restore [locate_data_file bug32944.brep] a +explode a + +bcommon result a_1 a_2 + +checkshape result + +checknbshapes result -vertex 8 -edge 12 -wire 6 -face 6 -shell 1 -solid 1 + +checkmaxtol result -min_tol 1.e-5 + +checkprops result -s 36741.6 + +checkview -display result -2d -path ${imagedir}/${test_image}.png diff --git a/tests/bugs/modalg_8/bug32945 b/tests/bugs/modalg_8/bug32945 new file mode 100644 index 0000000000..6b2fb69925 --- /dev/null +++ b/tests/bugs/modalg_8/bug32945 @@ -0,0 +1,19 @@ +puts "=========================================================================" +puts "OCC32945: Modeling Algorithms - Boolean operation Common has no result in specific example" +puts "=========================================================================" +puts "" + +restore [locate_data_file bug32945.brep] a +explode a + +bcommon result a_1 a_2 + +checkshape result + +checknbshapes result -vertex 8 -edge 12 -wire 6 -face 6 -shell 1 -solid 1 + +checkmaxtol result -min_tol 1.e-5 + +checkprops result -s 83754.8 + +checkview -display result -2d -path ${imagedir}/${test_image}.png From 6036998511a7b54b3d05e3b63953d2e59c244350 Mon Sep 17 00:00:00 2001 From: kgv Date: Sun, 15 May 2022 01:11:06 +0300 Subject: [PATCH 284/639] 0032970: Visualization, TKOpenGl - fix compilation on Linux: 'False' was not declared --- src/OpenGl/OpenGl_Context.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/OpenGl/OpenGl_Context.cxx b/src/OpenGl/OpenGl_Context.cxx index d501804256..90de0f20cb 100644 --- a/src/OpenGl/OpenGl_Context.cxx +++ b/src/OpenGl/OpenGl_Context.cxx @@ -1818,7 +1818,7 @@ void OpenGl_Context::MemoryInfo (TColStd_IndexedDataMapOfStringString& theDict) if (myFuncs->glXQueryCurrentRendererIntegerMESA != NULL) { unsigned int aVMemMiB = 0; - if (myFuncs->glXQueryCurrentRendererIntegerMESA (GLX_RENDERER_VIDEO_MEMORY_MESA, &aVMemMiB) != False) + if (myFuncs->glXQueryCurrentRendererIntegerMESA (GLX_RENDERER_VIDEO_MEMORY_MESA, &aVMemMiB) != 0) { addInfo (theDict, "GPU memory", TCollection_AsciiString() + int(aVMemMiB) + " MiB"); } From 2052b04e5b88d3a28a447eb4a777e9a8010b93a2 Mon Sep 17 00:00:00 2001 From: mgerus Date: Wed, 11 May 2022 16:08:55 +0300 Subject: [PATCH 285/639] 0032807: Modeling Algorithms - Bad result of sweep operation when the UEdges has more than one intersect points Add choosing the intersect point taking into account the tangentCross when prev UEdge and next UEdge has more than one intersect points; Add exact correction of edge tolerance (it fix problems with edge tolerance on Linux); Add exact check of edge tolerance in testcase --- src/Approx/Approx_SameParameter.cxx | 2 ++ src/Approx/Approx_SameParameter.hxx | 16 +++++++++ src/BRepFill/BRepFill_Sweep.cxx | 39 +++++++++++++++++--- src/BRepFill/BRepFill_TrimShellCorner.cxx | 43 +++++++++++++++++------ src/BRepFill/BRepFill_TrimShellCorner.hxx | 6 +++- tests/bugs/modalg_7/bug29204 | 2 +- tests/bugs/modalg_7/bug29663 | 2 +- tests/evolved/voluved/HMC008 | 2 +- tests/pipe/bugs/bug32807 | 17 +++++++++ 9 files changed, 110 insertions(+), 19 deletions(-) create mode 100644 tests/pipe/bugs/bug32807 diff --git a/src/Approx/Approx_SameParameter.cxx b/src/Approx/Approx_SameParameter.cxx index a4e467e611..9bb7b22e24 100644 --- a/src/Approx/Approx_SameParameter.cxx +++ b/src/Approx/Approx_SameParameter.cxx @@ -526,6 +526,8 @@ void Approx_SameParameter::Build(const Standard_Real Tolerance) } myDone = Standard_True; } + + myCurveOnSurface = Handle(Adaptor3d_CurveOnSurface)::DownCast(aData.myCOnS.ShallowCopy()); } //======================================================================= diff --git a/src/Approx/Approx_SameParameter.hxx b/src/Approx/Approx_SameParameter.hxx index 617c2b2573..257a019336 100644 --- a/src/Approx/Approx_SameParameter.hxx +++ b/src/Approx/Approx_SameParameter.hxx @@ -81,6 +81,21 @@ public: return myCurve2d; } + //! Returns the 3D curve that has the same parameter as + //! the 3D curve once evaluated on the surface up to the + //! specified tolerance. + Handle(Adaptor3d_Curve) Curve3d() const + { + return myC3d; + } + + //! Returns the 3D curve on surface that has the same parameter as + //! the 3D curve up to the specified tolerance. + Handle(Adaptor3d_CurveOnSurface) CurveOnSurface() const + { + return myCurveOnSurface; + } + private: //! Internal data structure to unify access to the most actively used data. @@ -176,6 +191,7 @@ private: Handle(Adaptor2d_Curve2d) myHCurve2d; Handle(Adaptor3d_Curve) myC3d; Handle(Adaptor3d_Surface) mySurf; + Handle(Adaptor3d_CurveOnSurface) myCurveOnSurface; }; #endif // _Approx_SameParameter_HeaderFile diff --git a/src/BRepFill/BRepFill_Sweep.cxx b/src/BRepFill/BRepFill_Sweep.cxx index a74fdfc452..1be188dd79 100644 --- a/src/BRepFill/BRepFill_Sweep.cxx +++ b/src/BRepFill/BRepFill_Sweep.cxx @@ -85,6 +85,7 @@ #include #include #include +#include #include //#include @@ -289,6 +290,34 @@ static Standard_Boolean CheckSameParameter return Standard_True; } +//======================================================================= +//function : CheckSameParameterExact +//purpose : Check a posteriori that sameparameter has worked correctly +// with exact calculation method of edge tolerance +//======================================================================= +static Standard_Boolean CheckSameParameterExact +(const Handle(Adaptor3d_Curve)& C3d, + const Handle(Adaptor3d_CurveOnSurface)& curveOnSurface, + const Standard_Real tol3d, + Standard_Real& tolreached) +{ + GeomLib_CheckCurveOnSurface aCheckCurveOnSurface(C3d); + aCheckCurveOnSurface.SetParallel(Standard_False); + aCheckCurveOnSurface.Perform(curveOnSurface); + + tolreached = aCheckCurveOnSurface.MaxDistance(); + + if (tolreached > tol3d) { + return Standard_False; + } + else + { + tolreached = Max(tolreached, Precision::Confusion()); + tolreached *= 1.05; + } + return Standard_True; +} + //======================================================================= //function : SameParameter //purpose : Encapsulation of Sameparameter @@ -340,8 +369,10 @@ static Standard_Boolean SameParameter(TopoDS_Edge& E, return Standard_False; } - ResTol = sp.TolReached(); - if(ResTol > tolreached ){ + Handle(Adaptor3d_Curve) curve3d = sp.Curve3d(); + Handle(Adaptor3d_CurveOnSurface) curveOnSurface = sp.CurveOnSurface(); + + if (!CheckSameParameterExact(curve3d, curveOnSurface, tol3d, ResTol) && ResTol > tolreached) { #ifdef OCCT_DEBUG std::cout<<"SameParameter : Tolerance not reached!"<InterfFF(); Standard_Integer aNbFFs = aFFs.Length(); - if(!SplitUEdges(myUEdges, theDS, myHistMap)) { + if(!SplitUEdges(myUEdges, theDS, myIntPointCrossDir, myHistMap)) { return; } @@ -425,7 +429,7 @@ BRepFill_TrimShellCorner::MakeFacesNonSec(const Standard_Integer Standard_Real apar1 = 0., apar2 = 0.; Standard_Boolean bvertexfound = - FindCommonVertex(theDS, anIndex1, anIndex2, aCommonVertex, apar1, apar2); + FindCommonVertex(theDS, anIndex1, anIndex2, myIntPointCrossDir, aCommonVertex, apar1, apar2); // search common vertex between bounds. end Handle(BRepTools_ReShape) aSubstitutor = new BRepTools_ReShape(); @@ -697,9 +701,9 @@ BRepFill_TrimShellCorner::MakeFacesSec(const Standard_Integer TopoDS_Vertex FirstVertex, LastVertex; Standard_Real ParamOnLeftE1, ParamOnLeftE2, ParamOnRightE1, ParamOnRightE2; - FindCommonVertex(theDS, IndexOfLeftE1, IndexOfLeftE2, + FindCommonVertex(theDS, IndexOfLeftE1, IndexOfLeftE2, myIntPointCrossDir, FirstVertex, ParamOnLeftE1, ParamOnLeftE2); - FindCommonVertex(theDS, IndexOfRightE1, IndexOfRightE2, + FindCommonVertex(theDS, IndexOfRightE1, IndexOfRightE2, myIntPointCrossDir, LastVertex, ParamOnRightE1, ParamOnRightE2); TopoDS_Shape SecWire; @@ -1079,7 +1083,8 @@ Standard_Boolean BRepFill_TrimShellCorner::ChooseSection(const TopoDS_Shape& Com // purpose: // ------------------------------------------------------------------------------------------ Standard_Boolean SplitUEdges(const Handle(TopTools_HArray2OfShape)& theUEdges, - const BOPDS_PDS& theDS, + const BOPDS_PDS& theDS, + const gp_Vec& theCrossDirection, TopTools_DataMapOfShapeListOfShape& theHistMap) { const BOPDS_VectorOfInterfVV& aVVs = theDS->InterfVV(); @@ -1105,7 +1110,7 @@ Standard_Boolean SplitUEdges(const Handle(TopTools_HArray2OfShape)& theUEdge TopoDS_Vertex aCommonVertex; Standard_Real apar1 = 0., apar2 = 0.; Standard_Boolean bvertexfound = - FindCommonVertex(theDS, anEIndex1, anEIndex2, aCommonVertex, apar1, apar2); + FindCommonVertex(theDS, anEIndex1, anEIndex2, theCrossDirection, aCommonVertex, apar1, apar2); // if(!bvertexfound) { TopoDS_Vertex V1 = TopExp::LastVertex(TopoDS::Edge(aE1)); @@ -1217,6 +1222,7 @@ void FindFreeVertices(const TopoDS_Shape& theShape, Standard_Boolean FindCommonVertex(const BOPDS_PDS& theDS, const Standard_Integer theEIndex1, const Standard_Integer theEIndex2, + const gp_Vec& theCrossDirection, TopoDS_Vertex& theCommonVertex, Standard_Real& theParamOnE1, Standard_Real& theParamOnE2) { @@ -1227,6 +1233,10 @@ Standard_Boolean FindCommonVertex(const BOPDS_PDS& theDS, TopoDS_Vertex aCommonVertex; Standard_Integer eeit = 0; + TopoDS_Edge theE1 = TopoDS::Edge(theDS->Shape(theEIndex1)); + TopoDS_Edge theE2 = TopoDS::Edge(theDS->Shape(theEIndex2)); + BRepAdaptor_Curve aBC1(theE1), aBC2(theE2); + Standard_Integer aNbEEs; aNbEEs = aEEs.Length(); for(eeit = 0; eeit < aNbEEs; ++eeit) { @@ -1247,10 +1257,21 @@ Standard_Boolean FindCommonVertex(const BOPDS_PDS& theDS, IntTools_Tools::VertexParameters(aCP, theParamOnE1, theParamOnE2); else IntTools_Tools::VertexParameters(aCP, theParamOnE2, theParamOnE1); - - // - bvertexfound = Standard_True; - break; + + gp_Pnt aPt; + gp_Vec aDirOnE1, aDirOnE2; + gp_Dir aIntersectPointCrossDir; + + // intersect point aDirOnE1.cross(aDirOnE2) should same direction with path theCrossDirection + aBC1.D1(theParamOnE1, aPt, aDirOnE1); + aBC2.D1(theParamOnE2, aPt, aDirOnE2); + aIntersectPointCrossDir = aDirOnE1.Crossed(aDirOnE2); + + if (aIntersectPointCrossDir.Dot(theCrossDirection) > Precision::SquareConfusion()) + { + bvertexfound = Standard_True; + break; + } } } } diff --git a/src/BRepFill/BRepFill_TrimShellCorner.hxx b/src/BRepFill/BRepFill_TrimShellCorner.hxx index 283e546b91..f25e1171df 100644 --- a/src/BRepFill/BRepFill_TrimShellCorner.hxx +++ b/src/BRepFill/BRepFill_TrimShellCorner.hxx @@ -41,9 +41,12 @@ public: //! Constructor: takes faces to intersect, //! type of transition (it can be RightCorner or RoundCorner) //! and axis of bisector plane + //! theIntersectPointCrossDirection : prev path direction at the origin point of theAxeOfBisPlane + //! cross next path direction at the origin point of theAxeOfBisPlane. used when EE has more than one vertices Standard_EXPORT BRepFill_TrimShellCorner(const Handle(TopTools_HArray2OfShape)& theFaces, const BRepFill_TransitionStyle theTransition, - const gp_Ax2& theAxeOfBisPlane); + const gp_Ax2& theAxeOfBisPlane, + const gp_Vec& theIntPointCrossDir); Standard_EXPORT void AddBounds (const Handle(TopTools_HArray2OfShape)& Bounds); @@ -92,6 +95,7 @@ private: BRepFill_TransitionStyle myTransition; gp_Ax2 myAxeOfBisPlane; + gp_Vec myIntPointCrossDir; TopoDS_Shape myShape1; TopoDS_Shape myShape2; Handle(TopTools_HArray2OfShape) myBounds; diff --git a/tests/bugs/modalg_7/bug29204 b/tests/bugs/modalg_7/bug29204 index 8ce39b7bdc..80d4fde2d0 100644 --- a/tests/bugs/modalg_7/bug29204 +++ b/tests/bugs/modalg_7/bug29204 @@ -19,7 +19,7 @@ checknbshapes result -solid 1 -shell 1 -face 28 -wire 28 -edge 64 -vertex 36 -sh set tolres [checkmaxtol result] -if { ${tolres} > 0.001} { +if { ${tolres} > 0.003} { puts "Error: bad tolerance of result" } diff --git a/tests/bugs/modalg_7/bug29663 b/tests/bugs/modalg_7/bug29663 index af381765e9..eb1b2911af 100644 --- a/tests/bugs/modalg_7/bug29663 +++ b/tests/bugs/modalg_7/bug29663 @@ -21,7 +21,7 @@ fixshape result rr checkshape result checkprops result -s 2.14316e+011 -checkmaxtol result -ref 0.049038750060552701 +checkmaxtol result -ref 0.046703571498366049 checknbshapes result -shell 1 -face 201 -wire 201 diff --git a/tests/evolved/voluved/HMC008 b/tests/evolved/voluved/HMC008 index 63c57b5117..ce56438bf1 100644 --- a/tests/evolved/voluved/HMC008 +++ b/tests/evolved/voluved/HMC008 @@ -212,7 +212,7 @@ if {[regexp "Faulties" [bopargcheck result]]} { # the dimensions of the shape "result" are about 1.0e+5. # So, this tolerance seems to be OK. -checkmaxtol result -ref 1.7319951447770465 +checkmaxtol result -ref 1.6514213338573371 smallview don result sw tw diff --git a/tests/pipe/bugs/bug32807 b/tests/pipe/bugs/bug32807 new file mode 100644 index 0000000000..a86c2e8b0e --- /dev/null +++ b/tests/pipe/bugs/bug32807 @@ -0,0 +1,17 @@ +puts "========" +puts "bug32807: Sweep algorithm deal with EE more than one intersect points" +puts "========" +puts "" + +restore [locate_data_file bug32807_path.brep] p +restore [locate_data_file bug32807_profile.brep] pr + +mksweep p +setsweep -CF +addsweep pr + +buildsweep result -C -S + +checkshape result -exact +checknbshapes result -vertex 34 -edge 68 -wire 34 -face 34 -shell 1 +checkview -display result -2d -path ${imagedir}/${test_image}.png From b9280b8b27dee40bbdfe283e1b22836d8988b389 Mon Sep 17 00:00:00 2001 From: aml Date: Fri, 14 Jan 2022 18:56:30 +0300 Subject: [PATCH 286/639] 0032969: Coding - get rid of unused headers [IMeshData to PLib] Removed unused exception classes OSD_Exception_FLT_DIVIDE_BY_ZERO, OSD_Exception_INT_DIVIDE_BY_ZERO, OSD_Exception_FLT_DENORMAL_OPERAND, OSD_Exception_FLT_INEXACT_RESULT, OSD_Exception_FLT_INVALID_OPERATION, OSD_Exception_FLT_OVERFLOW, OSD_Exception_FLT_STACK_CHECK, OSD_Exception_FLT_UNDERFLOW. --- src/IMeshData/IMeshData_Edge.hxx | 4 --- src/IMeshData/IMeshData_Face.hxx | 1 - .../IMeshData_ParametersListArrayAdaptor.hxx | 2 -- src/IMeshData/IMeshData_Shape.hxx | 1 - src/IMeshData/IMeshData_StatusOwner.hxx | 2 -- src/IMeshData/IMeshData_Types.hxx | 6 ---- src/IMeshTools/IMeshTools_Context.hxx | 1 - src/IMeshTools/IMeshTools_MeshAlgo.hxx | 1 - src/IMeshTools/IMeshTools_MeshAlgoFactory.hxx | 1 - src/IMeshTools/IMeshTools_MeshBuilder.hxx | 1 - src/IMeshTools/IMeshTools_ModelAlgo.hxx | 3 -- src/IMeshTools/IMeshTools_ModelBuilder.hxx | 1 - src/IMeshTools/IMeshTools_ShapeExplorer.cxx | 3 -- src/IntAna/IntAna_Curve.hxx | 6 ++-- src/IntAna/IntAna_Int3Pln.cxx | 2 -- src/IntAna/IntAna_Int3Pln.hxx | 2 -- src/IntAna/IntAna_IntConicQuad.cxx | 4 --- src/IntAna/IntAna_IntConicQuad.hxx | 3 -- src/IntAna/IntAna_IntLinTorus.cxx | 3 -- src/IntAna/IntAna_IntLinTorus.hxx | 3 -- src/IntAna/IntAna_IntQuadQuad.cxx | 1 - src/IntAna/IntAna_IntQuadQuad.hxx | 3 -- src/IntAna/IntAna_QuadQuadGeo.cxx | 1 - src/IntAna/IntAna_QuadQuadGeo.hxx | 3 -- src/IntAna/IntAna_Quadric.cxx | 5 --- src/IntAna/IntAna_Quadric.hxx | 7 +++- src/IntAna2d/IntAna2d_AnaIntersection.cxx | 2 -- src/IntAna2d/IntAna2d_AnaIntersection.hxx | 2 -- src/IntAna2d/IntAna2d_AnaIntersection_1.cxx | 4 --- src/IntAna2d/IntAna2d_AnaIntersection_2.cxx | 5 --- src/IntAna2d/IntAna2d_AnaIntersection_3.cxx | 5 --- src/IntAna2d/IntAna2d_AnaIntersection_4.cxx | 4 --- src/IntAna2d/IntAna2d_AnaIntersection_5.cxx | 5 --- src/IntAna2d/IntAna2d_AnaIntersection_6.cxx | 4 --- src/IntAna2d/IntAna2d_AnaIntersection_7.cxx | 4 --- src/IntAna2d/IntAna2d_AnaIntersection_8.cxx | 4 --- src/IntAna2d/IntAna2d_Conic.cxx | 1 - src/IntAna2d/IntAna2d_Conic.hxx | 2 -- src/IntAna2d/IntAna2d_IntPoint.cxx | 4 +-- src/IntAna2d/IntAna2d_IntPoint.hxx | 1 - src/IntAna2d/IntAna2d_Outils.hxx | 2 -- src/IntCurve/IntCurve_IConicTool.hxx | 2 -- src/IntCurve/IntCurve_IntConicConic.cxx | 2 -- src/IntCurve/IntCurve_IntConicConic.hxx | 2 -- src/IntCurve/IntCurve_IntConicConic_1.cxx | 5 --- src/IntCurve/IntCurve_IntConicConic_Tool.hxx | 4 --- src/IntCurve/IntCurve_IntImpConicParConic.hxx | 2 -- ...urve_MyImpParToolOfIntImpConicParConic.hxx | 2 -- src/IntCurve/IntCurve_PConic.cxx | 1 - src/IntCurve/IntCurve_PConic.hxx | 2 -- src/IntCurve/IntCurve_PConicTool.hxx | 2 -- src/IntCurve/IntCurve_ProjectOnPConicTool.hxx | 2 -- .../IntCurveSurface_Intersection.cxx | 1 - .../IntCurveSurface_Intersection.hxx | 2 -- .../IntCurveSurface_IntersectionPoint.cxx | 1 - .../IntCurveSurface_IntersectionPoint.hxx | 1 - .../IntCurveSurface_IntersectionSegment.cxx | 1 - .../IntCurveSurface_TheHCurveTool.hxx | 5 --- ...ntCurveSurface_TheInterferenceOfHInter.hxx | 2 -- ...IntCurveSurface_ThePolygonToolOfHInter.hxx | 3 -- .../IntCurveSurface_ThePolyhedronOfHInter.hxx | 1 - ...CurveSurface_ThePolyhedronToolOfHInter.hxx | 2 -- .../IntCurvesFace_Intersector.cxx | 5 --- .../IntCurvesFace_ShapeIntersector.cxx | 5 --- src/IntImpParGen/IntImpParGen.cxx | 3 -- src/IntImpParGen/IntImpParGen_Tool.hxx | 2 -- src/IntPatch/IntPatch_ALine.cxx | 4 --- src/IntPatch/IntPatch_ArcFunction.cxx | 3 -- src/IntPatch/IntPatch_ArcFunction.hxx | 1 + src/IntPatch/IntPatch_CSFunction.cxx | 2 -- src/IntPatch/IntPatch_CurvIntSurf.hxx | 1 - src/IntPatch/IntPatch_GLine.cxx | 6 ---- src/IntPatch/IntPatch_GLine.hxx | 6 ---- src/IntPatch/IntPatch_HCurve2dTool.cxx | 11 ------ src/IntPatch/IntPatch_HCurve2dTool.hxx | 10 +----- src/IntPatch/IntPatch_HInterTool.cxx | 3 -- src/IntPatch/IntPatch_ImpPrmIntersection.cxx | 2 -- .../IntPatch_InterferencePolyhedron.cxx | 7 ---- .../IntPatch_InterferencePolyhedron.hxx | 3 -- src/IntPatch/IntPatch_Intersection.cxx | 10 ------ src/IntPatch/IntPatch_Line.cxx | 1 - src/IntPatch/IntPatch_Line.hxx | 1 - src/IntPatch/IntPatch_LineConstructor.cxx | 1 - src/IntPatch/IntPatch_Point.cxx | 3 -- src/IntPatch/IntPatch_Point.hxx | 2 -- src/IntPatch/IntPatch_PolyArc.cxx | 1 - src/IntPatch/IntPatch_PolyArc.hxx | 2 -- src/IntPatch/IntPatch_PolyLine.cxx | 1 - src/IntPatch/IntPatch_Polygo.cxx | 2 -- src/IntPatch/IntPatch_Polygo.hxx | 2 -- src/IntPatch/IntPatch_Polyhedron.cxx | 6 ---- src/IntPatch/IntPatch_Polyhedron.hxx | 1 - src/IntPatch/IntPatch_PolyhedronTool.hxx | 1 - src/IntPatch/IntPatch_PrmPrmIntersection.cxx | 6 ---- .../IntPatch_PrmPrmIntersection_T3Bits.hxx | 3 -- src/IntPatch/IntPatch_RLine.cxx | 5 --- src/IntPatch/IntPatch_RLine.hxx | 2 -- src/IntPatch/IntPatch_RstInt.cxx | 5 --- src/IntPatch/IntPatch_SpecialPoints.cxx | 2 -- .../IntPatch_TheIWLineOfTheIWalking.hxx | 1 - src/IntPatch/IntPatch_TheSOnBounds.hxx | 2 -- .../IntPatch_TheSegmentOfTheSOnBounds.hxx | 1 - src/IntPatch/IntPatch_WLine.cxx | 7 ---- src/IntPatch/IntPatch_WLine.hxx | 2 -- src/IntPatch/IntPatch_WLineTool.hxx | 2 -- src/IntPolyh/IntPolyh_CoupleMapHasher.hxx | 1 - src/IntPolyh/IntPolyh_Edge.hxx | 2 -- src/IntPolyh/IntPolyh_MaillageAffinage.cxx | 5 --- src/IntPolyh/IntPolyh_Point.cxx | 1 - src/IntPolyh/IntPolyh_SectionLine.hxx | 1 - src/IntPolyh/IntPolyh_Triangle.cxx | 4 --- src/IntRes2d/IntRes2d_Domain.cxx | 2 -- src/IntRes2d/IntRes2d_Domain.hxx | 2 -- src/IntRes2d/IntRes2d_Intersection.cxx | 2 -- src/IntRes2d/IntRes2d_Intersection.hxx | 2 -- src/IntRes2d/IntRes2d_IntersectionPoint.cxx | 1 - src/IntRes2d/IntRes2d_IntersectionPoint.hxx | 1 - src/IntRes2d/IntRes2d_IntersectionSegment.cxx | 2 -- src/IntSurf/IntSurf_Couple.hxx | 1 - src/IntSurf/IntSurf_InteriorPoint.cxx | 1 - src/IntSurf/IntSurf_InteriorPoint.hxx | 2 -- src/IntSurf/IntSurf_InteriorPointTool.hxx | 2 -- src/IntSurf/IntSurf_LineOn2S.cxx | 1 - src/IntSurf/IntSurf_LineOn2S.hxx | 2 -- src/IntSurf/IntSurf_PathPoint.cxx | 2 -- src/IntSurf/IntSurf_PathPoint.hxx | 2 -- src/IntSurf/IntSurf_PathPointTool.hxx | 3 -- src/IntSurf/IntSurf_PntOn2S.cxx | 1 - src/IntSurf/IntSurf_PntOn2S.hxx | 1 - src/IntSurf/IntSurf_Quadric.cxx | 1 - src/IntSurf/IntSurf_Quadric.hxx | 3 -- src/IntSurf/IntSurf_QuadricTool.cxx | 4 --- src/IntTools/IntTools.cxx | 4 --- src/IntTools/IntTools_BaseRangeSample.hxx | 1 - src/IntTools/IntTools_BeanFaceIntersector.cxx | 10 ------ src/IntTools/IntTools_BeanFaceIntersector.hxx | 1 - src/IntTools/IntTools_CommonPrt.cxx | 1 - src/IntTools/IntTools_CommonPrt.hxx | 2 -- src/IntTools/IntTools_Context.cxx | 2 -- src/IntTools/IntTools_Context.hxx | 2 -- .../IntTools_CurveRangeLocalizeData.cxx | 2 -- .../IntTools_CurveRangeLocalizeData.hxx | 1 - src/IntTools/IntTools_CurveRangeSample.hxx | 1 - .../IntTools_CurveRangeSampleMapHasher.hxx | 1 - src/IntTools/IntTools_EdgeEdge.cxx | 4 --- src/IntTools/IntTools_EdgeEdge.hxx | 4 --- src/IntTools/IntTools_EdgeFace.cxx | 9 ----- src/IntTools/IntTools_EdgeFace.hxx | 2 -- src/IntTools/IntTools_FClass2d.cxx | 2 -- src/IntTools/IntTools_FClass2d.hxx | 2 -- src/IntTools/IntTools_FaceFace.cxx | 2 -- src/IntTools/IntTools_PntOnFace.cxx | 1 - src/IntTools/IntTools_PntOnFace.hxx | 1 - src/IntTools/IntTools_Root.hxx | 1 - src/IntTools/IntTools_ShrunkRange.cxx | 1 - src/IntTools/IntTools_ShrunkRange.hxx | 1 - .../IntTools_SurfaceRangeLocalizeData.cxx | 2 -- .../IntTools_SurfaceRangeLocalizeData.hxx | 2 -- src/IntTools/IntTools_SurfaceRangeSample.cxx | 1 - src/IntTools/IntTools_SurfaceRangeSample.hxx | 3 -- .../IntTools_SurfaceRangeSampleMapHasher.hxx | 1 - src/IntTools/IntTools_Tools.cxx | 9 ----- src/IntTools/IntTools_Tools.hxx | 2 -- src/IntTools/IntTools_TopolTool.cxx | 1 - src/Interface/Interface_BitMap.cxx | 1 - src/Interface/Interface_BitMap.hxx | 2 -- src/Interface/Interface_Category.cxx | 2 -- src/Interface/Interface_Category.hxx | 1 - src/Interface/Interface_Check.hxx | 3 -- src/Interface/Interface_CheckIterator.hxx | 1 - src/Interface/Interface_CheckTool.cxx | 1 - src/Interface/Interface_CheckTool.hxx | 1 - src/Interface/Interface_CopyControl.hxx | 1 - src/Interface/Interface_CopyMap.hxx | 1 - src/Interface/Interface_CopyTool.hxx | 1 - src/Interface/Interface_EntityCluster.cxx | 1 - src/Interface/Interface_EntityCluster.hxx | 1 - src/Interface/Interface_EntityList.hxx | 1 - src/Interface/Interface_FileParameter.hxx | 2 -- src/Interface/Interface_FileReaderData.cxx | 2 -- src/Interface/Interface_FileReaderData.hxx | 3 -- src/Interface/Interface_FileReaderTool.cxx | 6 ---- src/Interface/Interface_FileReaderTool.hxx | 1 - src/Interface/Interface_FloatWriter.cxx | 1 - src/Interface/Interface_FloatWriter.hxx | 3 -- src/Interface/Interface_GTool.hxx | 2 -- src/Interface/Interface_GeneralLib.hxx | 1 - src/Interface/Interface_GeneralModule.hxx | 1 - src/Interface/Interface_Graph.cxx | 2 -- src/Interface/Interface_GraphContent.cxx | 2 -- src/Interface/Interface_HGraph.cxx | 3 -- src/Interface/Interface_HGraph.hxx | 1 - src/Interface/Interface_HSequenceOfCheck.hxx | 1 - src/Interface/Interface_InterfaceModel.cxx | 4 --- src/Interface/Interface_InterfaceModel.hxx | 3 -- src/Interface/Interface_MSG.cxx | 1 - src/Interface/Interface_MSG.hxx | 3 -- .../Interface_MapAsciiStringHasher.hxx | 1 - src/Interface/Interface_ParamList.cxx | 2 -- src/Interface/Interface_ParamList.hxx | 1 - src/Interface/Interface_ParamSet.cxx | 1 - src/Interface/Interface_ParamSet.hxx | 1 - src/Interface/Interface_Protocol.cxx | 1 - src/Interface/Interface_Protocol.hxx | 2 -- src/Interface/Interface_ReaderLib.hxx | 1 - src/Interface/Interface_ReaderModule.cxx | 1 - src/Interface/Interface_ReaderModule.hxx | 1 - src/Interface/Interface_ReportEntity.hxx | 1 - src/Interface/Interface_STAT.hxx | 2 -- src/Interface/Interface_ShareFlags.cxx | 3 -- src/Interface/Interface_ShareFlags.hxx | 1 - src/Interface/Interface_ShareTool.cxx | 5 --- src/Interface/Interface_SignLabel.hxx | 1 - src/Interface/Interface_SignType.hxx | 1 - src/Interface/Interface_Static.cxx | 1 - src/Interface/Interface_Static.hxx | 8 ----- src/Interface/Interface_StaticStandards.cxx | 4 --- src/Interface/Interface_TypedValue.cxx | 2 -- src/Interface/Interface_TypedValue.hxx | 5 --- src/Interface/Interface_UndefinedContent.cxx | 3 -- src/Interface/Interface_UndefinedContent.hxx | 1 - .../Interface_VectorOfFileParameter.hxx | 1 - src/Intf/Intf_Interference.cxx | 3 -- src/Intf/Intf_Interference.hxx | 2 -- src/Intf/Intf_InterferencePolygon2d.cxx | 4 --- src/Intf/Intf_InterferencePolygon2d.hxx | 1 - src/Intf/Intf_Polygon2d.cxx | 3 -- src/Intf/Intf_Polygon2d.hxx | 2 -- src/Intf/Intf_SectionLine.cxx | 1 - src/Intf/Intf_SectionLine.hxx | 1 - src/Intf/Intf_SectionPoint.cxx | 1 - src/Intf/Intf_SectionPoint.hxx | 3 -- src/Intf/Intf_TangentZone.cxx | 2 -- src/Intf/Intf_TangentZone.hxx | 2 -- src/Intf/Intf_Tool.hxx | 2 -- src/Intrv/Intrv_Interval.hxx | 2 -- src/Intrv/Intrv_Intervals.cxx | 2 -- src/Intrv/Intrv_Intervals.hxx | 1 - src/LDOM/LDOMBasicString.hxx | 1 - src/LDOM/LDOMParser.cxx | 1 - src/LDOM/LDOM_BasicNode.cxx | 3 +- src/LDOM/LDOM_CharacterData.cxx | 1 - src/LDOM/LDOM_Document.hxx | 1 - src/LDOM/LDOM_Element.cxx | 1 - src/LDOM/LDOM_LDOMImplementation.hxx | 1 - src/LDOM/LDOM_Node.cxx | 1 - src/LDOM/LDOM_Node.hxx | 2 -- src/LDOM/LDOM_OSStream.hxx | 2 -- src/LDOM/LDOM_XmlWriter.hxx | 1 - src/LProp/LProp_AnalyticCurInf.hxx | 2 -- src/LProp/LProp_CurAndInf.cxx | 1 - src/LProp/LProp_CurAndInf.hxx | 2 -- src/LProp3d/LProp3d_SurfaceTool.cxx | 1 - src/Law/Law.cxx | 1 - src/Law/Law_BSpFunc.cxx | 1 - src/Law/Law_BSpFunc.hxx | 1 - src/Law/Law_BSpline.hxx | 2 -- src/Law/Law_BSplineKnotSplitting.cxx | 1 - src/Law/Law_Composite.cxx | 2 -- src/Law/Law_Composite.hxx | 2 -- src/Law/Law_Constant.cxx | 1 - src/Law/Law_Function.cxx | 1 - src/Law/Law_Interpol.cxx | 1 - src/Law/Law_Interpol.hxx | 2 -- src/Law/Law_Interpolate.cxx | 1 - src/Law/Law_Interpolate.hxx | 2 -- src/Law/Law_Linear.cxx | 1 - src/Law/Law_Linear.hxx | 1 - src/Law/Law_S.hxx | 1 - src/LocOpe/LocOpe_BuildShape.cxx | 9 ++--- src/LocOpe/LocOpe_BuildShape.hxx | 1 - src/LocOpe/LocOpe_BuildWires.cxx | 1 - src/LocOpe/LocOpe_BuildWires.hxx | 1 - src/LocOpe/LocOpe_CSIntersector.cxx | 1 - src/LocOpe/LocOpe_CSIntersector.hxx | 4 --- src/LocOpe/LocOpe_CurveShapeIntersector.cxx | 1 - src/LocOpe/LocOpe_CurveShapeIntersector.hxx | 3 -- src/LocOpe/LocOpe_DPrism.cxx | 8 ----- src/LocOpe/LocOpe_DPrism.hxx | 2 -- src/LocOpe/LocOpe_DataMapOfShapePnt.hxx | 1 - src/LocOpe/LocOpe_FindEdges.cxx | 3 -- src/LocOpe/LocOpe_FindEdges.hxx | 4 --- src/LocOpe/LocOpe_FindEdgesInFace.cxx | 3 -- src/LocOpe/LocOpe_FindEdgesInFace.hxx | 2 -- src/LocOpe/LocOpe_GeneratedShape.cxx | 2 -- src/LocOpe/LocOpe_GeneratedShape.hxx | 1 - src/LocOpe/LocOpe_Generator.cxx | 5 --- src/LocOpe/LocOpe_Generator.hxx | 1 - src/LocOpe/LocOpe_GluedShape.cxx | 2 -- src/LocOpe/LocOpe_GluedShape.hxx | 2 -- src/LocOpe/LocOpe_Gluer.cxx | 6 +--- src/LocOpe/LocOpe_Gluer.hxx | 2 -- src/LocOpe/LocOpe_LinearForm.cxx | 12 ------- src/LocOpe/LocOpe_LinearForm.hxx | 2 -- src/LocOpe/LocOpe_Pipe.cxx | 4 --- src/LocOpe/LocOpe_PntFace.hxx | 2 -- src/LocOpe/LocOpe_Prism.cxx | 1 - src/LocOpe/LocOpe_Prism.hxx | 1 - src/LocOpe/LocOpe_Revol.cxx | 1 - src/LocOpe/LocOpe_Revol.hxx | 2 -- src/LocOpe/LocOpe_RevolutionForm.cxx | 7 ---- src/LocOpe/LocOpe_RevolutionForm.hxx | 3 -- src/LocOpe/LocOpe_SplitDrafts.cxx | 4 --- src/LocOpe/LocOpe_SplitDrafts.hxx | 1 - src/LocOpe/LocOpe_SplitShape.cxx | 10 ------ src/LocOpe/LocOpe_SplitShape.hxx | 3 -- src/LocOpe/LocOpe_Spliter.cxx | 5 --- src/LocOpe/LocOpe_Spliter.hxx | 1 - src/LocOpe/LocOpe_WiresOnShape.cxx | 4 --- src/LocOpe/LocOpe_WiresOnShape.hxx | 2 -- .../LocalAnalysis_CurveContinuity.cxx | 1 - .../LocalAnalysis_CurveContinuity.hxx | 2 -- .../LocalAnalysis_SurfaceContinuity.cxx | 1 - .../LocalAnalysis_SurfaceContinuity.hxx | 2 -- src/MAT/MAT_Arc.cxx | 1 - src/MAT/MAT_Arc.hxx | 1 - src/MAT/MAT_Edge.hxx | 1 - src/MAT/MAT_Graph.cxx | 3 -- src/MAT/MAT_Graph.hxx | 1 - src/MAT/MAT_ListOfBisector.hxx | 1 - src/MAT/MAT_ListOfEdge.hxx | 1 - src/MAT/MAT_Node.cxx | 2 -- src/MAT/MAT_Node.hxx | 1 - src/MAT/MAT_Zone.cxx | 1 - src/MAT/MAT_Zone.hxx | 1 - src/MAT2d/MAT2d_BiInt.hxx | 1 - src/MAT2d/MAT2d_Circuit.cxx | 4 --- src/MAT2d/MAT2d_Circuit.hxx | 3 -- src/MAT2d/MAT2d_Connexion.hxx | 2 -- src/MAT2d/MAT2d_CutCurve.hxx | 1 - src/MAT2d/MAT2d_DataMapOfBiIntInteger.hxx | 1 - src/MAT2d/MAT2d_DataMapOfIntegerBisec.hxx | 1 - src/MAT2d/MAT2d_DataMapOfIntegerPnt2d.hxx | 1 - src/MAT2d/MAT2d_MapBiIntHasher.hxx | 2 -- src/MAT2d/MAT2d_Mat2d.cxx | 1 - src/MAT2d/MAT2d_MiniPath.cxx | 1 - src/MAT2d/MAT2d_MiniPath.hxx | 2 -- src/MAT2d/MAT2d_Tool2d.cxx | 4 --- src/MAT2d/MAT2d_Tool2d.hxx | 2 -- src/MeshTest/MeshTest.cxx | 4 --- src/MeshTest/MeshTest_CheckTopology.cxx | 3 -- src/MeshTest/MeshTest_Debug.cxx | 4 --- src/MeshTest/MeshTest_PluginCommands.cxx | 4 --- src/MeshVS/MeshVS_DataMapOfIntegerBoolean.hxx | 1 - .../MeshVS_DataMapOfTwoColorsMapOfInteger.hxx | 1 - src/MeshVS/MeshVS_DataSource.cxx | 2 -- src/MeshVS/MeshVS_DataSource.hxx | 3 -- src/MeshVS/MeshVS_DataSource3D.hxx | 1 - src/MeshVS/MeshVS_DeformedDataSource.cxx | 2 -- src/MeshVS/MeshVS_DeformedDataSource.hxx | 3 -- src/MeshVS/MeshVS_Drawer.cxx | 1 - src/MeshVS/MeshVS_Drawer.hxx | 3 -- src/MeshVS/MeshVS_DummySensitiveEntity.hxx | 2 -- .../MeshVS_ElementalColorPrsBuilder.cxx | 10 ------ .../MeshVS_HArray1OfSequenceOfInteger.hxx | 1 - src/MeshVS/MeshVS_MapOfTwoNodes.hxx | 1 - src/MeshVS/MeshVS_Mesh.cxx | 6 ---- src/MeshVS/MeshVS_Mesh.hxx | 2 -- src/MeshVS/MeshVS_MeshEntityOwner.cxx | 3 -- src/MeshVS/MeshVS_MeshEntityOwner.hxx | 1 - src/MeshVS/MeshVS_MeshOwner.cxx | 2 -- src/MeshVS/MeshVS_MeshOwner.hxx | 1 - src/MeshVS/MeshVS_MeshPrsBuilder.cxx | 9 ----- src/MeshVS/MeshVS_NodalColorPrsBuilder.cxx | 11 ------ src/MeshVS/MeshVS_SensitiveFace.hxx | 2 -- src/MeshVS/MeshVS_SensitiveMesh.cxx | 4 --- src/MeshVS/MeshVS_SensitiveMesh.hxx | 3 -- src/MeshVS/MeshVS_SensitivePolyhedron.cxx | 2 -- src/MeshVS/MeshVS_SensitivePolyhedron.hxx | 5 --- src/MeshVS/MeshVS_SensitiveQuad.hxx | 1 - src/MeshVS/MeshVS_SensitiveSegment.hxx | 1 - src/MeshVS/MeshVS_TextPrsBuilder.cxx | 5 --- src/MeshVS/MeshVS_Tool.hxx | 1 - src/MeshVS/MeshVS_VectorPrsBuilder.cxx | 14 -------- src/Message/Message.cxx | 1 - src/Message/Message_Algorithm.cxx | 2 -- src/Message/Message_Algorithm.hxx | 1 - src/Message/Message_Attribute.cxx | 1 - src/Message/Message_AttributeMeter.cxx | 3 -- src/Message/Message_ExecStatus.hxx | 1 - src/Message/Message_Level.cxx | 2 -- src/Message/Message_Level.hxx | 2 -- src/Message/Message_Messenger.hxx | 1 - src/Message/Message_Msg.cxx | 1 - src/Message/Message_MsgFile.cxx | 1 - src/Message/Message_MsgFile.hxx | 1 - src/Message/Message_Printer.hxx | 2 -- src/Message/Message_PrinterToReport.cxx | 2 -- src/Message/Message_PrinterToReport.hxx | 1 - src/Message/Message_ProgressIndicator.hxx | 1 - src/Message/Message_Report.hxx | 1 - src/MoniTool/MoniTool_AttrList.hxx | 3 -- src/MoniTool/MoniTool_CaseData.cxx | 3 -- src/MoniTool/MoniTool_CaseData.hxx | 4 --- src/MoniTool/MoniTool_DataInfo.hxx | 1 - src/MoniTool/MoniTool_ElemHasher.hxx | 1 - src/MoniTool/MoniTool_Element.cxx | 1 - src/MoniTool/MoniTool_Element.hxx | 3 -- ...oniTool_IndexedDataMapOfShapeTransient.hxx | 1 - src/MoniTool/MoniTool_MTHasher.hxx | 2 -- src/MoniTool/MoniTool_SignShape.cxx | 1 - src/MoniTool/MoniTool_SignShape.hxx | 1 - src/MoniTool/MoniTool_SignText.hxx | 1 - src/MoniTool/MoniTool_Stat.cxx | 1 - src/MoniTool/MoniTool_Stat.hxx | 1 - src/MoniTool/MoniTool_Timer.hxx | 1 - src/MoniTool/MoniTool_TransientElem.cxx | 1 - src/MoniTool/MoniTool_TransientElem.hxx | 2 -- src/MoniTool/MoniTool_TypedValue.hxx | 4 --- src/NCollection/NCollection_AccAllocator.cxx | 1 - src/NCollection/NCollection_AliasedArray.hxx | 2 -- src/NCollection/NCollection_BaseVector.cxx | 1 - src/NCollection/NCollection_BaseVector.hxx | 2 -- src/NCollection/NCollection_Buffer.hxx | 1 - src/NCollection/NCollection_CellFilter.hxx | 3 -- src/NCollection/NCollection_DefaultHasher.hxx | 1 - src/NCollection/NCollection_DoubleMap.hxx | 3 -- src/NCollection/NCollection_Map.hxx | 1 - src/NLPlate/NLPlate_HGPPConstraint.cxx | 2 -- src/NLPlate/NLPlate_HGPPConstraint.hxx | 2 -- src/NLPlate/NLPlate_HPG0Constraint.cxx | 2 -- src/NLPlate/NLPlate_HPG0Constraint.hxx | 2 -- src/NLPlate/NLPlate_HPG0G1Constraint.cxx | 2 -- src/NLPlate/NLPlate_HPG0G1Constraint.hxx | 1 - src/NLPlate/NLPlate_HPG0G2Constraint.cxx | 2 -- src/NLPlate/NLPlate_HPG0G2Constraint.hxx | 1 - src/NLPlate/NLPlate_HPG0G3Constraint.cxx | 2 -- src/NLPlate/NLPlate_HPG0G3Constraint.hxx | 1 - src/NLPlate/NLPlate_HPG1Constraint.cxx | 1 - src/NLPlate/NLPlate_HPG1Constraint.hxx | 2 -- src/NLPlate/NLPlate_HPG2Constraint.cxx | 1 - src/NLPlate/NLPlate_HPG2Constraint.hxx | 1 - src/NLPlate/NLPlate_HPG3Constraint.cxx | 1 - src/NLPlate/NLPlate_HPG3Constraint.hxx | 1 - src/NLPlate/NLPlate_NLPlate.cxx | 2 -- src/NLPlate/NLPlate_NLPlate.hxx | 2 -- src/OSD/FILES | 8 ----- src/OSD/OSD_Directory.cxx | 1 - src/OSD/OSD_DirectoryIterator.cxx | 2 -- src/OSD/OSD_DirectoryIterator.hxx | 2 -- src/OSD/OSD_Disk.cxx | 3 -- src/OSD/OSD_Environment.cxx | 2 -- src/OSD/OSD_Environment.hxx | 2 -- src/OSD/OSD_Error.hxx | 2 -- src/OSD/OSD_Exception_CTRL_BREAK.hxx | 1 - .../OSD_Exception_FLT_DENORMAL_OPERAND.hxx | 35 ------------------- src/OSD/OSD_Exception_FLT_DIVIDE_BY_ZERO.hxx | 35 ------------------- src/OSD/OSD_Exception_FLT_INEXACT_RESULT.hxx | 35 ------------------- .../OSD_Exception_FLT_INVALID_OPERATION.hxx | 35 ------------------- src/OSD/OSD_Exception_FLT_OVERFLOW.hxx | 35 ------------------- src/OSD/OSD_Exception_FLT_STACK_CHECK.hxx | 35 ------------------- src/OSD/OSD_Exception_FLT_UNDERFLOW.hxx | 35 ------------------- src/OSD/OSD_Exception_INT_DIVIDE_BY_ZERO.hxx | 35 ------------------- src/OSD/OSD_File.cxx | 6 +--- src/OSD/OSD_FileIterator.cxx | 2 -- src/OSD/OSD_Host.hxx | 2 -- src/OSD/OSD_MAllocHook.hxx | 2 -- src/OSD/OSD_MemInfo.cxx | 4 --- src/OSD/OSD_Parallel.hxx | 1 - src/OSD/OSD_Path.cxx | 4 --- src/OSD/OSD_PerfMeter.cxx | 2 -- src/OSD/OSD_Process.cxx | 1 - src/OSD/OSD_Protection.hxx | 1 - src/OSD/OSD_SIGBUS.hxx | 1 - src/OSD/OSD_SIGHUP.hxx | 1 - src/OSD/OSD_SIGILL.hxx | 1 - src/OSD/OSD_SIGINT.hxx | 1 - src/OSD/OSD_SIGKILL.hxx | 1 - src/OSD/OSD_SIGQUIT.hxx | 1 - src/OSD/OSD_SIGSYS.hxx | 1 - src/OSD/OSD_SharedLibrary.hxx | 3 -- src/OSD/OSD_StreamBuffer.hxx | 4 --- src/OSD/OSD_Thread.hxx | 2 -- src/OSD/OSD_Timer.hxx | 1 - src/OSD/OSD_signal.cxx | 3 -- src/OpenGl/OpenGl_Aspects.hxx | 1 - src/OpenGl/OpenGl_AspectsProgram.cxx | 1 - src/OpenGl/OpenGl_AspectsTextureSet.cxx | 3 -- src/OpenGl/OpenGl_AspectsTextureSet.hxx | 1 - src/OpenGl/OpenGl_BackgroundArray.cxx | 1 - src/OpenGl/OpenGl_Buffer.cxx | 1 - src/OpenGl/OpenGl_CappingAlgo.cxx | 4 +-- src/OpenGl/OpenGl_CappingPlaneResource.cxx | 1 - src/OpenGl/OpenGl_Context.cxx | 2 +- src/OpenGl/OpenGl_Context.hxx | 9 ----- src/OpenGl/OpenGl_Element.hxx | 1 - src/OpenGl/OpenGl_Flipper.cxx | 1 - src/OpenGl/OpenGl_Font.cxx | 1 - src/OpenGl/OpenGl_FrameBuffer.cxx | 1 - src/OpenGl/OpenGl_FrameStats.cxx | 2 -- src/OpenGl/OpenGl_FrameStatsPrs.hxx | 1 + src/OpenGl/OpenGl_GlFunctions.cxx | 2 -- src/OpenGl/OpenGl_GraduatedTrihedron.cxx | 5 --- src/OpenGl/OpenGl_GraduatedTrihedron.hxx | 3 -- src/OpenGl/OpenGl_GraphicDriver.cxx | 7 ---- src/OpenGl/OpenGl_GraphicDriver.hxx | 2 -- src/OpenGl/OpenGl_Group.cxx | 1 - src/OpenGl/OpenGl_Group.hxx | 1 - src/OpenGl/OpenGl_HaltonSampler.hxx | 1 - src/OpenGl/OpenGl_IndexBuffer.cxx | 1 - src/OpenGl/OpenGl_LayerList.cxx | 4 +-- src/OpenGl/OpenGl_LayerList.hxx | 1 - src/OpenGl/OpenGl_PBREnvironment.cxx | 1 - src/OpenGl/OpenGl_PointSprite.cxx | 1 - src/OpenGl/OpenGl_PrimitiveArray.cxx | 6 ---- src/OpenGl/OpenGl_PrimitiveArray.hxx | 2 -- src/OpenGl/OpenGl_SceneGeometry.cxx | 2 -- src/OpenGl/OpenGl_ShaderManager.cxx | 1 - src/OpenGl/OpenGl_ShaderManager.hxx | 1 - src/OpenGl/OpenGl_ShaderObject.cxx | 3 -- src/OpenGl/OpenGl_ShaderProgram.cxx | 6 ---- src/OpenGl/OpenGl_ShaderProgram.hxx | 1 - src/OpenGl/OpenGl_ShaderStates.hxx | 1 - src/OpenGl/OpenGl_ShadowMap.cxx | 3 -- src/OpenGl/OpenGl_ShadowMap.hxx | 1 - src/OpenGl/OpenGl_Structure.cxx | 2 -- src/OpenGl/OpenGl_Structure.hxx | 4 --- src/OpenGl/OpenGl_Text.cxx | 4 --- src/OpenGl/OpenGl_Text.hxx | 6 ---- src/OpenGl/OpenGl_TextBuilder.hxx | 1 - src/OpenGl/OpenGl_Texture.cxx | 1 - src/OpenGl/OpenGl_TextureFormat.hxx | 1 - src/OpenGl/OpenGl_TileSampler.cxx | 1 - src/OpenGl/OpenGl_VertexBuffer.cxx | 2 -- src/OpenGl/OpenGl_View.cxx | 2 +- src/OpenGl/OpenGl_View.hxx | 6 ---- src/OpenGl/OpenGl_Window.cxx | 6 ++-- src/OpenGl/OpenGl_Workspace.cxx | 10 +----- src/OpenGlTest/OpenGlTest_Commands.cxx | 20 +---------- src/PCDM/PCDM.cxx | 6 ---- src/PCDM/PCDM_ReadWriter_1.cxx | 1 - src/PCDM/PCDM_Reader.cxx | 1 - src/PCDM/PCDM_ReaderFilter.hxx | 1 - src/PCDM/PCDM_Reference.hxx | 1 - src/PCDM/PCDM_ReferenceIterator.cxx | 4 --- src/PCDM/PCDM_RetrievalDriver.cxx | 12 ------- src/PCDM/PCDM_StorageDriver.cxx | 5 --- src/PCDM/PCDM_StorageDriver.hxx | 2 -- src/PCDM/PCDM_Writer.cxx | 1 - src/PLib/PLib.hxx | 2 -- src/PLib/PLib_DoubleJacobiPolynomial.hxx | 2 -- src/PLib/PLib_HermitJacobi.cxx | 2 -- src/PLib/PLib_HermitJacobi.hxx | 1 - src/PLib/PLib_JacobiPolynomial.hxx | 1 - src/Plate/Plate_D1.cxx | 2 -- src/Plate/Plate_D2.cxx | 3 -- src/Plate/Plate_D3.cxx | 3 -- src/Plate/Plate_FreeGtoCConstraint.hxx | 3 -- src/Plate/Plate_GtoCConstraint.cxx | 3 -- src/Plate/Plate_GtoCConstraint.hxx | 1 - src/Plate/Plate_LineConstraint.cxx | 1 - src/Plate/Plate_LineConstraint.hxx | 1 - src/Plate/Plate_LinearScalarConstraint.cxx | 1 - src/Plate/Plate_LinearXYZConstraint.cxx | 1 - src/Plate/Plate_PinpointConstraint.cxx | 2 -- src/Plate/Plate_PinpointConstraint.hxx | 1 - src/Plate/Plate_PlaneConstraint.cxx | 1 - src/Plate/Plate_PlaneConstraint.hxx | 1 - src/Plate/Plate_Plate.cxx | 2 -- src/Plate/Plate_Plate.hxx | 2 -- src/Plate/Plate_SampledCurveConstraint.cxx | 2 -- src/Plate/Plate_SampledCurveConstraint.hxx | 1 - src/math/math.hxx | 3 -- src/math/math_BFGS.cxx | 2 -- src/math/math_BFGS.hxx | 3 -- src/math/math_BissecNewton.hxx | 2 -- src/math/math_BracketMinimum.hxx | 1 - src/math/math_BracketedRoot.hxx | 2 -- src/math/math_BrentMinimum.hxx | 2 -- .../math_ComputeGaussPointsAndWeights.hxx | 1 - .../math_ComputeKronrodPointsAndWeights.hxx | 1 - src/math/math_Crout.hxx | 2 -- src/math/math_DirectPolynomialRoots.cxx | 1 - src/math/math_DirectPolynomialRoots.hxx | 3 -- src/math/math_DoubleTab.cxx | 2 -- src/math/math_DoubleTab.hxx | 3 -- src/math/math_EigenValuesSearcher.hxx | 1 - src/math/math_FRPR.cxx | 3 -- src/math/math_FRPR.hxx | 4 --- src/math/math_Function.cxx | 1 - src/math/math_Function.hxx | 1 - src/math/math_FunctionAllRoots.cxx | 2 -- src/math/math_FunctionAllRoots.hxx | 2 -- src/math/math_FunctionRoot.cxx | 2 -- src/math/math_FunctionRoot.hxx | 2 -- src/math/math_FunctionRoots.cxx | 3 -- src/math/math_FunctionRoots.hxx | 3 -- src/math/math_FunctionSample.hxx | 1 - src/math/math_FunctionSet.cxx | 1 - src/math/math_FunctionSet.hxx | 2 -- src/math/math_FunctionSetWithDerivatives.hxx | 2 -- src/math/math_Gauss.cxx | 1 - src/math/math_Gauss.hxx | 2 -- src/math/math_GaussLeastSquare.hxx | 2 -- src/math/math_GaussMultipleIntegration.cxx | 1 - src/math/math_GaussMultipleIntegration.hxx | 3 -- src/math/math_GaussSetIntegration.hxx | 2 -- src/math/math_GaussSingleIntegration.cxx | 1 - src/math/math_GaussSingleIntegration.hxx | 3 -- src/math/math_GlobOptMin.cxx | 2 -- src/math/math_GlobOptMin.hxx | 2 -- src/math/math_Householder.cxx | 2 -- src/math/math_Householder.hxx | 3 -- src/math/math_Jacobi.cxx | 9 +++-- src/math/math_Jacobi.hxx | 3 -- src/math/math_KronrodSingleIntegration.cxx | 1 - src/math/math_KronrodSingleIntegration.hxx | 3 -- src/math/math_Matrix.hxx | 4 --- src/math/math_MultipleVarFunction.cxx | 1 - src/math/math_MultipleVarFunction.hxx | 4 --- .../math_MultipleVarFunctionWithGradient.hxx | 4 --- .../math_MultipleVarFunctionWithHessian.hxx | 3 -- src/math/math_NewtonFunctionRoot.hxx | 4 --- src/math/math_NewtonFunctionSetRoot.cxx | 2 -- src/math/math_NewtonFunctionSetRoot.hxx | 3 -- src/math/math_NewtonMinimum.cxx | 1 - src/math/math_NewtonMinimum.hxx | 3 -- src/math/math_PSO.cxx | 2 ++ src/math/math_PSO.hxx | 1 - src/math/math_Powell.cxx | 3 -- src/math/math_Powell.hxx | 3 -- src/math/math_Recipes.cxx | 4 --- src/math/math_Recipes.hxx | 4 --- src/math/math_SVD.hxx | 3 -- src/math/math_TrigonometricFunctionRoots.cxx | 1 - src/math/math_TrigonometricFunctionRoots.hxx | 2 -- src/math/math_Uzawa.cxx | 1 - src/math/math_Uzawa.hxx | 3 -- src/math/math_ValueAndWeight.hxx | 3 -- 629 files changed, 34 insertions(+), 1718 deletions(-) delete mode 100644 src/OSD/OSD_Exception_FLT_DENORMAL_OPERAND.hxx delete mode 100644 src/OSD/OSD_Exception_FLT_DIVIDE_BY_ZERO.hxx delete mode 100644 src/OSD/OSD_Exception_FLT_INEXACT_RESULT.hxx delete mode 100644 src/OSD/OSD_Exception_FLT_INVALID_OPERATION.hxx delete mode 100644 src/OSD/OSD_Exception_FLT_OVERFLOW.hxx delete mode 100644 src/OSD/OSD_Exception_FLT_STACK_CHECK.hxx delete mode 100644 src/OSD/OSD_Exception_FLT_UNDERFLOW.hxx delete mode 100644 src/OSD/OSD_Exception_INT_DIVIDE_BY_ZERO.hxx diff --git a/src/IMeshData/IMeshData_Edge.hxx b/src/IMeshData/IMeshData_Edge.hxx index 2d4230d181..f83c89fff6 100644 --- a/src/IMeshData/IMeshData_Edge.hxx +++ b/src/IMeshData/IMeshData_Edge.hxx @@ -16,11 +16,7 @@ #ifndef _IMeshData_Edge_HeaderFile #define _IMeshData_Edge_HeaderFile -#include -#include -#include #include -#include #include #include #include diff --git a/src/IMeshData/IMeshData_Face.hxx b/src/IMeshData/IMeshData_Face.hxx index 7ae82c0859..ea9f4cd37f 100644 --- a/src/IMeshData/IMeshData_Face.hxx +++ b/src/IMeshData/IMeshData_Face.hxx @@ -19,7 +19,6 @@ #include #include #include -#include #include #include #include diff --git a/src/IMeshData/IMeshData_ParametersListArrayAdaptor.hxx b/src/IMeshData/IMeshData_ParametersListArrayAdaptor.hxx index ae8979a491..0a4b40dfad 100644 --- a/src/IMeshData/IMeshData_ParametersListArrayAdaptor.hxx +++ b/src/IMeshData/IMeshData_ParametersListArrayAdaptor.hxx @@ -17,8 +17,6 @@ #define _IMeshData_ParametersListArrayAdaptor_HeaderFile #include -#include -#include //! Auxiliary tool representing adaptor interface for child classes of //! IMeshData_ParametersList to be used in tools working on NCollection_Array structure. diff --git a/src/IMeshData/IMeshData_Shape.hxx b/src/IMeshData/IMeshData_Shape.hxx index 6b23e6c037..55b324fade 100644 --- a/src/IMeshData/IMeshData_Shape.hxx +++ b/src/IMeshData/IMeshData_Shape.hxx @@ -16,7 +16,6 @@ #ifndef _IMeshData_Shape_HeaderFile #define _IMeshData_Shape_HeaderFile -#include #include //! Interface class representing model with associated TopoDS_Shape. diff --git a/src/IMeshData/IMeshData_StatusOwner.hxx b/src/IMeshData/IMeshData_StatusOwner.hxx index abade176dd..5d6a7814a0 100644 --- a/src/IMeshData/IMeshData_StatusOwner.hxx +++ b/src/IMeshData/IMeshData_StatusOwner.hxx @@ -17,8 +17,6 @@ #define _IMeshData_StatusOwner_HeaderFile #include -#include -#include //! Extension interface class providing status functionality. class IMeshData_StatusOwner diff --git a/src/IMeshData/IMeshData_Types.hxx b/src/IMeshData/IMeshData_Types.hxx index 0b52effc0a..5e82a2f12b 100644 --- a/src/IMeshData/IMeshData_Types.hxx +++ b/src/IMeshData/IMeshData_Types.hxx @@ -16,8 +16,6 @@ #ifndef _IMeshData_Types_HeaderFile #define _IMeshData_Types_HeaderFile -#include -#include #include #include #include @@ -26,16 +24,13 @@ #include #include #include -#include #include -#include #include #include #include #include #include #include -#include #include #include #include @@ -45,7 +40,6 @@ #include #include -#include class IMeshData_Shape; class IMeshData_Face; diff --git a/src/IMeshTools/IMeshTools_Context.hxx b/src/IMeshTools/IMeshTools_Context.hxx index b1e0204c0c..3229d7316e 100644 --- a/src/IMeshTools/IMeshTools_Context.hxx +++ b/src/IMeshTools/IMeshTools_Context.hxx @@ -16,7 +16,6 @@ #ifndef _IMeshTools_Context_HeaderFile #define _IMeshTools_Context_HeaderFile -#include #include #include #include diff --git a/src/IMeshTools/IMeshTools_MeshAlgo.hxx b/src/IMeshTools/IMeshTools_MeshAlgo.hxx index 5a1d3b80cf..35bd81f5c5 100644 --- a/src/IMeshTools/IMeshTools_MeshAlgo.hxx +++ b/src/IMeshTools/IMeshTools_MeshAlgo.hxx @@ -17,7 +17,6 @@ #define _IMeshTools_MeshAlgo_HeaderFile #include -#include #include #include diff --git a/src/IMeshTools/IMeshTools_MeshAlgoFactory.hxx b/src/IMeshTools/IMeshTools_MeshAlgoFactory.hxx index 2e4eff6778..c9b741bd6d 100644 --- a/src/IMeshTools/IMeshTools_MeshAlgoFactory.hxx +++ b/src/IMeshTools/IMeshTools_MeshAlgoFactory.hxx @@ -17,7 +17,6 @@ #define _IMeshTools_MeshAlgoFactory_HeaderFile #include -#include #include #include diff --git a/src/IMeshTools/IMeshTools_MeshBuilder.hxx b/src/IMeshTools/IMeshTools_MeshBuilder.hxx index f3d8d7618c..f6441d0fcd 100644 --- a/src/IMeshTools/IMeshTools_MeshBuilder.hxx +++ b/src/IMeshTools/IMeshTools_MeshBuilder.hxx @@ -16,7 +16,6 @@ #ifndef _IMeshTools_MeshBuilder_HeaderFile #define _IMeshTools_MeshBuilder_HeaderFile -#include #include #include #include diff --git a/src/IMeshTools/IMeshTools_ModelAlgo.hxx b/src/IMeshTools/IMeshTools_ModelAlgo.hxx index 93b9a8d98a..cab102b9c0 100644 --- a/src/IMeshTools/IMeshTools_ModelAlgo.hxx +++ b/src/IMeshTools/IMeshTools_ModelAlgo.hxx @@ -16,10 +16,7 @@ #ifndef _IMeshTools_ModelAlgo_HeaderFile #define _IMeshTools_ModelAlgo_HeaderFile -#include -#include #include -#include #include class IMeshData_Model; diff --git a/src/IMeshTools/IMeshTools_ModelBuilder.hxx b/src/IMeshTools/IMeshTools_ModelBuilder.hxx index d82199f5b7..194baed107 100644 --- a/src/IMeshTools/IMeshTools_ModelBuilder.hxx +++ b/src/IMeshTools/IMeshTools_ModelBuilder.hxx @@ -20,7 +20,6 @@ #include #include #include -#include #include struct IMeshTools_Parameters; diff --git a/src/IMeshTools/IMeshTools_ShapeExplorer.cxx b/src/IMeshTools/IMeshTools_ShapeExplorer.cxx index 322b10beaa..7bc12f5990 100644 --- a/src/IMeshTools/IMeshTools_ShapeExplorer.cxx +++ b/src/IMeshTools/IMeshTools_ShapeExplorer.cxx @@ -16,14 +16,11 @@ #include #include #include -#include #include -#include #include #include #include #include -#include IMPLEMENT_STANDARD_RTTIEXT(IMeshTools_ShapeExplorer, IMeshData_Shape) diff --git a/src/IntAna/IntAna_Curve.hxx b/src/IntAna/IntAna_Curve.hxx index 4a3d35d220..05d16d5790 100644 --- a/src/IntAna/IntAna_Curve.hxx +++ b/src/IntAna/IntAna_Curve.hxx @@ -19,14 +19,14 @@ #include #include -#include #include #include -#include -#include #include +class gp_Cone; +class gp_Cylinder; + //! Definition of a parametric Curve which is the result //! of the intersection between two quadrics. class IntAna_Curve diff --git a/src/IntAna/IntAna_Int3Pln.cxx b/src/IntAna/IntAna_Int3Pln.cxx index 586df8b38e..8dbfaabfe8 100644 --- a/src/IntAna/IntAna_Int3Pln.cxx +++ b/src/IntAna/IntAna_Int3Pln.cxx @@ -18,14 +18,12 @@ #endif -#include #include #include #include #include #include #include -#include #include IntAna_Int3Pln::IntAna_Int3Pln() diff --git a/src/IntAna/IntAna_Int3Pln.hxx b/src/IntAna/IntAna_Int3Pln.hxx index ed5273aa2e..6932f46c9e 100644 --- a/src/IntAna/IntAna_Int3Pln.hxx +++ b/src/IntAna/IntAna_Int3Pln.hxx @@ -19,9 +19,7 @@ #include #include -#include -#include #include class gp_Pln; diff --git a/src/IntAna/IntAna_IntConicQuad.cxx b/src/IntAna/IntAna_IntConicQuad.cxx index f5f4211ad6..2ea0d72085 100644 --- a/src/IntAna/IntAna_IntConicQuad.cxx +++ b/src/IntAna/IntAna_IntConicQuad.cxx @@ -24,7 +24,6 @@ #include -#include #include #include #include @@ -43,9 +42,6 @@ #include #include #include -#include -#include -#include static Standard_Real PIpPI = M_PI + M_PI; //============================================================================= diff --git a/src/IntAna/IntAna_IntConicQuad.hxx b/src/IntAna/IntAna_IntConicQuad.hxx index 9af3a88091..a7ea66a33f 100644 --- a/src/IntAna/IntAna_IntConicQuad.hxx +++ b/src/IntAna/IntAna_IntConicQuad.hxx @@ -19,12 +19,9 @@ #include #include -#include -#include #include #include -#include class gp_Lin; class IntAna_Quadric; class gp_Circ; diff --git a/src/IntAna/IntAna_IntLinTorus.cxx b/src/IntAna/IntAna_IntLinTorus.cxx index 8f824183d6..18decab651 100644 --- a/src/IntAna/IntAna_IntLinTorus.cxx +++ b/src/IntAna/IntAna_IntLinTorus.cxx @@ -25,9 +25,6 @@ #include #include #include -#include -#include -#include IntAna_IntLinTorus::IntAna_IntLinTorus () : done(Standard_False), diff --git a/src/IntAna/IntAna_IntLinTorus.hxx b/src/IntAna/IntAna_IntLinTorus.hxx index 145517d4a3..03d01a55f5 100644 --- a/src/IntAna/IntAna_IntLinTorus.hxx +++ b/src/IntAna/IntAna_IntLinTorus.hxx @@ -19,12 +19,9 @@ #include #include -#include -#include #include #include -#include class gp_Lin; class gp_Torus; diff --git a/src/IntAna/IntAna_IntQuadQuad.cxx b/src/IntAna/IntAna_IntQuadQuad.cxx index 68bfabc72d..20fb88e65d 100644 --- a/src/IntAna/IntAna_IntQuadQuad.cxx +++ b/src/IntAna/IntAna_IntQuadQuad.cxx @@ -34,7 +34,6 @@ #include #include #include -#include #include #include #include diff --git a/src/IntAna/IntAna_IntQuadQuad.hxx b/src/IntAna/IntAna_IntQuadQuad.hxx index 85e4e83ebf..c286a05ca5 100644 --- a/src/IntAna/IntAna_IntQuadQuad.hxx +++ b/src/IntAna/IntAna_IntQuadQuad.hxx @@ -19,13 +19,10 @@ #include #include -#include -#include #include #include #include -#include class gp_Cylinder; class IntAna_Quadric; class gp_Cone; diff --git a/src/IntAna/IntAna_QuadQuadGeo.cxx b/src/IntAna/IntAna_QuadQuadGeo.cxx index ada10bca50..3ab50bcd85 100644 --- a/src/IntAna/IntAna_QuadQuadGeo.cxx +++ b/src/IntAna/IntAna_QuadQuadGeo.cxx @@ -27,7 +27,6 @@ #include #include -#include #include #include #include diff --git a/src/IntAna/IntAna_QuadQuadGeo.hxx b/src/IntAna/IntAna_QuadQuadGeo.hxx index 70da587c17..534a8ca5a6 100644 --- a/src/IntAna/IntAna_QuadQuadGeo.hxx +++ b/src/IntAna/IntAna_QuadQuadGeo.hxx @@ -19,14 +19,11 @@ #include #include -#include -#include #include #include #include #include -#include class gp_Pln; class gp_Cylinder; class gp_Sphere; diff --git a/src/IntAna/IntAna_Quadric.cxx b/src/IntAna/IntAna_Quadric.cxx index b71f83f606..ea6b9929f1 100644 --- a/src/IntAna/IntAna_Quadric.cxx +++ b/src/IntAna/IntAna_Quadric.cxx @@ -21,12 +21,7 @@ #include -#include -#include -#include -#include #include -#include #include #include diff --git a/src/IntAna/IntAna_Quadric.hxx b/src/IntAna/IntAna_Quadric.hxx index f660e92c18..4f2cddbca1 100644 --- a/src/IntAna/IntAna_Quadric.hxx +++ b/src/IntAna/IntAna_Quadric.hxx @@ -17,8 +17,13 @@ #ifndef _IntAna_Quadric_HeaderFile #define _IntAna_Quadric_HeaderFile -#include #include +#include + +class gp_Cone; +class gp_Cylinder; +class gp_Pln; +class gp_Sphere; //! This class provides a description of Quadrics by their //! Coefficients in natural coordinate system. diff --git a/src/IntAna2d/IntAna2d_AnaIntersection.cxx b/src/IntAna2d/IntAna2d_AnaIntersection.cxx index b645b3361d..d0a5a4647a 100644 --- a/src/IntAna2d/IntAna2d_AnaIntersection.cxx +++ b/src/IntAna2d/IntAna2d_AnaIntersection.cxx @@ -20,8 +20,6 @@ #include #include #include -#include -#include #include IntAna2d_AnaIntersection::IntAna2d_AnaIntersection () diff --git a/src/IntAna2d/IntAna2d_AnaIntersection.hxx b/src/IntAna2d/IntAna2d_AnaIntersection.hxx index d35d9c974a..8892e62481 100644 --- a/src/IntAna2d/IntAna2d_AnaIntersection.hxx +++ b/src/IntAna2d/IntAna2d_AnaIntersection.hxx @@ -19,9 +19,7 @@ #include #include -#include -#include #include #include class gp_Lin2d; diff --git a/src/IntAna2d/IntAna2d_AnaIntersection_1.cxx b/src/IntAna2d/IntAna2d_AnaIntersection_1.cxx index ec6a7d6fc4..f7d70afab7 100644 --- a/src/IntAna2d/IntAna2d_AnaIntersection_1.cxx +++ b/src/IntAna2d/IntAna2d_AnaIntersection_1.cxx @@ -14,14 +14,10 @@ #include -#include -#include #include -#include #include #include #include -#include #include void IntAna2d_AnaIntersection::Perform (const gp_Lin2d& L1, diff --git a/src/IntAna2d/IntAna2d_AnaIntersection_2.cxx b/src/IntAna2d/IntAna2d_AnaIntersection_2.cxx index 5f8b0af3a5..1f345e531a 100644 --- a/src/IntAna2d/IntAna2d_AnaIntersection_2.cxx +++ b/src/IntAna2d/IntAna2d_AnaIntersection_2.cxx @@ -14,15 +14,10 @@ #include -#include -#include -#include -#include #include #include #include #include -#include #include void IntAna2d_AnaIntersection::Perform (const gp_Circ2d& C1, diff --git a/src/IntAna2d/IntAna2d_AnaIntersection_3.cxx b/src/IntAna2d/IntAna2d_AnaIntersection_3.cxx index c44f6da9ca..fe31e86c77 100644 --- a/src/IntAna2d/IntAna2d_AnaIntersection_3.cxx +++ b/src/IntAna2d/IntAna2d_AnaIntersection_3.cxx @@ -15,15 +15,10 @@ #include #include -#include -#include #include -#include #include #include #include -#include -#include //======================================================================= //function : Perform diff --git a/src/IntAna2d/IntAna2d_AnaIntersection_4.cxx b/src/IntAna2d/IntAna2d_AnaIntersection_4.cxx index 959aa775ce..d009e4dad4 100644 --- a/src/IntAna2d/IntAna2d_AnaIntersection_4.cxx +++ b/src/IntAna2d/IntAna2d_AnaIntersection_4.cxx @@ -16,15 +16,11 @@ //============================================================================ #include -#include -#include #include -#include #include #include #include #include -#include #include void IntAna2d_AnaIntersection::Perform (const gp_Lin2d& L, diff --git a/src/IntAna2d/IntAna2d_AnaIntersection_5.cxx b/src/IntAna2d/IntAna2d_AnaIntersection_5.cxx index 6fcae32f8a..5fc58732b8 100644 --- a/src/IntAna2d/IntAna2d_AnaIntersection_5.cxx +++ b/src/IntAna2d/IntAna2d_AnaIntersection_5.cxx @@ -16,15 +16,10 @@ //============================================================================ #include -#include -#include -#include -#include #include #include #include #include -#include #include void IntAna2d_AnaIntersection::Perform(const gp_Circ2d& Circle, diff --git a/src/IntAna2d/IntAna2d_AnaIntersection_6.cxx b/src/IntAna2d/IntAna2d_AnaIntersection_6.cxx index e0bcd9289f..81e697af34 100644 --- a/src/IntAna2d/IntAna2d_AnaIntersection_6.cxx +++ b/src/IntAna2d/IntAna2d_AnaIntersection_6.cxx @@ -17,14 +17,10 @@ #include #include -#include -#include -#include #include #include #include #include -#include #include void IntAna2d_AnaIntersection::Perform(const gp_Elips2d& Elips, diff --git a/src/IntAna2d/IntAna2d_AnaIntersection_7.cxx b/src/IntAna2d/IntAna2d_AnaIntersection_7.cxx index 3e479029d0..784cc5236b 100644 --- a/src/IntAna2d/IntAna2d_AnaIntersection_7.cxx +++ b/src/IntAna2d/IntAna2d_AnaIntersection_7.cxx @@ -16,15 +16,11 @@ //============================================================================ #include -#include -#include -#include #include #include #include #include #include -#include #include void IntAna2d_AnaIntersection::Perform(const gp_Parab2d& P, diff --git a/src/IntAna2d/IntAna2d_AnaIntersection_8.cxx b/src/IntAna2d/IntAna2d_AnaIntersection_8.cxx index 84ebf32464..e9eebdffcb 100644 --- a/src/IntAna2d/IntAna2d_AnaIntersection_8.cxx +++ b/src/IntAna2d/IntAna2d_AnaIntersection_8.cxx @@ -16,15 +16,11 @@ //============================================================================ #include -#include #include -#include -#include #include #include #include #include -#include #include // ----------------------------------------------------------------- diff --git a/src/IntAna2d/IntAna2d_Conic.cxx b/src/IntAna2d/IntAna2d_Conic.cxx index ca04c22b15..78348a95b3 100644 --- a/src/IntAna2d/IntAna2d_Conic.cxx +++ b/src/IntAna2d/IntAna2d_Conic.cxx @@ -13,7 +13,6 @@ // commercial license or contractual agreement. -#include #include #include #include diff --git a/src/IntAna2d/IntAna2d_Conic.hxx b/src/IntAna2d/IntAna2d_Conic.hxx index 14a2906985..af8ec25fe1 100644 --- a/src/IntAna2d/IntAna2d_Conic.hxx +++ b/src/IntAna2d/IntAna2d_Conic.hxx @@ -19,9 +19,7 @@ #include #include -#include -#include class gp_Circ2d; class gp_Lin2d; class gp_Parab2d; diff --git a/src/IntAna2d/IntAna2d_IntPoint.cxx b/src/IntAna2d/IntAna2d_IntPoint.cxx index 53b4696e45..76804b747e 100644 --- a/src/IntAna2d/IntAna2d_IntPoint.cxx +++ b/src/IntAna2d/IntAna2d_IntPoint.cxx @@ -15,12 +15,10 @@ // commercial license or contractual agreement. -#include #include -#include IntAna2d_IntPoint::IntAna2d_IntPoint (const Standard_Real X, const Standard_Real Y, - const Standard_Real U1,const Standard_Real U2): + const Standard_Real U1,const Standard_Real U2): myu1(U1),myu2(U2),myp(X,Y),myimplicit(Standard_False) { } diff --git a/src/IntAna2d/IntAna2d_IntPoint.hxx b/src/IntAna2d/IntAna2d_IntPoint.hxx index 216514c3e7..0755ade73a 100644 --- a/src/IntAna2d/IntAna2d_IntPoint.hxx +++ b/src/IntAna2d/IntAna2d_IntPoint.hxx @@ -21,7 +21,6 @@ #include #include -#include #include #include diff --git a/src/IntAna2d/IntAna2d_Outils.hxx b/src/IntAna2d/IntAna2d_Outils.hxx index 6d11e2c0a7..9e72716d28 100644 --- a/src/IntAna2d/IntAna2d_Outils.hxx +++ b/src/IntAna2d/IntAna2d_Outils.hxx @@ -18,10 +18,8 @@ #ifndef IntAna2d_Outils_HeaderFile #define IntAna2d_Outils_HeaderFile -#include #include #include -#include class MyDirectPolynomialRoots { public: diff --git a/src/IntCurve/IntCurve_IConicTool.hxx b/src/IntCurve/IntCurve_IConicTool.hxx index 8e994c2174..fad42fcd84 100644 --- a/src/IntCurve/IntCurve_IConicTool.hxx +++ b/src/IntCurve/IntCurve_IConicTool.hxx @@ -19,9 +19,7 @@ #include #include -#include -#include #include #include #include diff --git a/src/IntCurve/IntCurve_IntConicConic.cxx b/src/IntCurve/IntCurve_IntConicConic.cxx index 97796b007d..37f4833da1 100644 --- a/src/IntCurve/IntCurve_IntConicConic.cxx +++ b/src/IntCurve/IntCurve_IntConicConic.cxx @@ -17,7 +17,6 @@ // Modified: OFV Thu Nov 6 17:03:52 2003 #include -#include #include #include #include @@ -31,7 +30,6 @@ #include #include #include -#include //======================================================================= // Perform() for diff --git a/src/IntCurve/IntCurve_IntConicConic.hxx b/src/IntCurve/IntCurve_IntConicConic.hxx index a7483c68e0..3024e9162b 100644 --- a/src/IntCurve/IntCurve_IntConicConic.hxx +++ b/src/IntCurve/IntCurve_IntConicConic.hxx @@ -19,11 +19,9 @@ #include #include -#include #include #include -#include class gp_Lin2d; class IntRes2d_Domain; class gp_Circ2d; diff --git a/src/IntCurve/IntCurve_IntConicConic_1.cxx b/src/IntCurve/IntCurve_IntConicConic_1.cxx index 21581f8b34..4ecd7bce42 100644 --- a/src/IntCurve/IntCurve_IntConicConic_1.cxx +++ b/src/IntCurve/IntCurve_IntConicConic_1.cxx @@ -20,22 +20,17 @@ #include #include #include -#include #include -#include #include #include -#include #include #include -#include #include #include #include #include #include #include -#include #include Standard_Boolean Affichage=Standard_False; diff --git a/src/IntCurve/IntCurve_IntConicConic_Tool.hxx b/src/IntCurve/IntCurve_IntConicConic_Tool.hxx index 395220a6d2..c9b188c035 100644 --- a/src/IntCurve/IntCurve_IntConicConic_Tool.hxx +++ b/src/IntCurve/IntCurve_IntConicConic_Tool.hxx @@ -19,14 +19,10 @@ #include -#include -#include // #include #include #include #include -#include -#include static Standard_Real PIpPI = M_PI + M_PI; diff --git a/src/IntCurve/IntCurve_IntImpConicParConic.hxx b/src/IntCurve/IntCurve_IntImpConicParConic.hxx index 02249c5e0f..bcd8cde02c 100644 --- a/src/IntCurve/IntCurve_IntImpConicParConic.hxx +++ b/src/IntCurve/IntCurve_IntImpConicParConic.hxx @@ -22,8 +22,6 @@ #include #include -#include -#include #include class Standard_ConstructionError; class IntCurve_IConicTool; diff --git a/src/IntCurve/IntCurve_MyImpParToolOfIntImpConicParConic.hxx b/src/IntCurve/IntCurve_MyImpParToolOfIntImpConicParConic.hxx index ffcd25ac64..8c71b95f51 100644 --- a/src/IntCurve/IntCurve_MyImpParToolOfIntImpConicParConic.hxx +++ b/src/IntCurve/IntCurve_MyImpParToolOfIntImpConicParConic.hxx @@ -21,11 +21,9 @@ #include #include -#include #include #include #include -#include class IntCurve_IConicTool; class IntCurve_PConic; class IntCurve_PConicTool; diff --git a/src/IntCurve/IntCurve_PConic.cxx b/src/IntCurve/IntCurve_PConic.cxx index 297498164e..d6a85340b1 100644 --- a/src/IntCurve/IntCurve_PConic.cxx +++ b/src/IntCurve/IntCurve_PConic.cxx @@ -15,7 +15,6 @@ // commercial license or contractual agreement. -#include #include #include #include diff --git a/src/IntCurve/IntCurve_PConic.hxx b/src/IntCurve/IntCurve_PConic.hxx index ed3d793ca5..cfaf8782bb 100644 --- a/src/IntCurve/IntCurve_PConic.hxx +++ b/src/IntCurve/IntCurve_PConic.hxx @@ -19,10 +19,8 @@ #include #include -#include #include -#include #include #include class gp_Elips2d; diff --git a/src/IntCurve/IntCurve_PConicTool.hxx b/src/IntCurve/IntCurve_PConicTool.hxx index 56dcdaedd7..9c462e737f 100644 --- a/src/IntCurve/IntCurve_PConicTool.hxx +++ b/src/IntCurve/IntCurve_PConicTool.hxx @@ -19,9 +19,7 @@ #include #include -#include -#include #include class IntCurve_PConic; class gp_Pnt2d; diff --git a/src/IntCurve/IntCurve_ProjectOnPConicTool.hxx b/src/IntCurve/IntCurve_ProjectOnPConicTool.hxx index bfca262df2..c1d6285912 100644 --- a/src/IntCurve/IntCurve_ProjectOnPConicTool.hxx +++ b/src/IntCurve/IntCurve_ProjectOnPConicTool.hxx @@ -19,9 +19,7 @@ #include #include -#include -#include class IntCurve_PConic; class gp_Pnt2d; diff --git a/src/IntCurveSurface/IntCurveSurface_Intersection.cxx b/src/IntCurveSurface/IntCurveSurface_Intersection.cxx index dff050f233..62e6b30c74 100644 --- a/src/IntCurveSurface/IntCurveSurface_Intersection.cxx +++ b/src/IntCurveSurface/IntCurveSurface_Intersection.cxx @@ -19,7 +19,6 @@ #include #include #include -#include #include #define PARAMEQUAL(a,b) (Abs((a)-(b))< (1e-8)) diff --git a/src/IntCurveSurface/IntCurveSurface_Intersection.hxx b/src/IntCurveSurface/IntCurveSurface_Intersection.hxx index 2153ae9bce..e61bbdd567 100644 --- a/src/IntCurveSurface/IntCurveSurface_Intersection.hxx +++ b/src/IntCurveSurface/IntCurveSurface_Intersection.hxx @@ -24,8 +24,6 @@ #include #include #include -#include -#include class IntCurveSurface_IntersectionPoint; class IntCurveSurface_IntersectionSegment; diff --git a/src/IntCurveSurface/IntCurveSurface_IntersectionPoint.cxx b/src/IntCurveSurface/IntCurveSurface_IntersectionPoint.cxx index 9635f740f7..39c6d936f8 100644 --- a/src/IntCurveSurface/IntCurveSurface_IntersectionPoint.cxx +++ b/src/IntCurveSurface/IntCurveSurface_IntersectionPoint.cxx @@ -15,7 +15,6 @@ // commercial license or contractual agreement. -#include #include //================================================================================ diff --git a/src/IntCurveSurface/IntCurveSurface_IntersectionPoint.hxx b/src/IntCurveSurface/IntCurveSurface_IntersectionPoint.hxx index 3521acfe95..1aa1d6bccb 100644 --- a/src/IntCurveSurface/IntCurveSurface_IntersectionPoint.hxx +++ b/src/IntCurveSurface/IntCurveSurface_IntersectionPoint.hxx @@ -22,7 +22,6 @@ #include #include -#include #include diff --git a/src/IntCurveSurface/IntCurveSurface_IntersectionSegment.cxx b/src/IntCurveSurface/IntCurveSurface_IntersectionSegment.cxx index 1509a77bd7..6fa466fe5b 100644 --- a/src/IntCurveSurface/IntCurveSurface_IntersectionSegment.cxx +++ b/src/IntCurveSurface/IntCurveSurface_IntersectionSegment.cxx @@ -15,7 +15,6 @@ // commercial license or contractual agreement. -#include #include IntCurveSurface_IntersectionSegment::IntCurveSurface_IntersectionSegment() diff --git a/src/IntCurveSurface/IntCurveSurface_TheHCurveTool.hxx b/src/IntCurveSurface/IntCurveSurface_TheHCurveTool.hxx index 0d37f26eb3..5d9459dbb9 100644 --- a/src/IntCurveSurface/IntCurveSurface_TheHCurveTool.hxx +++ b/src/IntCurveSurface/IntCurveSurface_TheHCurveTool.hxx @@ -22,12 +22,7 @@ #include #include #include -#include #include -#include -#include -#include -#include #include class Standard_OutOfRange; class Standard_NoSuchObject; diff --git a/src/IntCurveSurface/IntCurveSurface_TheInterferenceOfHInter.hxx b/src/IntCurveSurface/IntCurveSurface_TheInterferenceOfHInter.hxx index 710b4a294e..664b135caf 100644 --- a/src/IntCurveSurface/IntCurveSurface_TheInterferenceOfHInter.hxx +++ b/src/IntCurveSurface/IntCurveSurface_TheInterferenceOfHInter.hxx @@ -22,10 +22,8 @@ #include #include -#include #include #include -#include class IntCurveSurface_ThePolygonOfHInter; class IntCurveSurface_ThePolygonToolOfHInter; class IntCurveSurface_ThePolyhedronOfHInter; diff --git a/src/IntCurveSurface/IntCurveSurface_ThePolygonToolOfHInter.hxx b/src/IntCurveSurface/IntCurveSurface_ThePolygonToolOfHInter.hxx index 671e912585..71f3b8aed0 100644 --- a/src/IntCurveSurface/IntCurveSurface_ThePolygonToolOfHInter.hxx +++ b/src/IntCurveSurface/IntCurveSurface_ThePolygonToolOfHInter.hxx @@ -19,10 +19,7 @@ #include #include -#include -#include -#include #include class Standard_OutOfRange; class gp_Pnt; diff --git a/src/IntCurveSurface/IntCurveSurface_ThePolyhedronOfHInter.hxx b/src/IntCurveSurface/IntCurveSurface_ThePolyhedronOfHInter.hxx index 687a1fdea9..740b983535 100644 --- a/src/IntCurveSurface/IntCurveSurface_ThePolyhedronOfHInter.hxx +++ b/src/IntCurveSurface/IntCurveSurface_ThePolyhedronOfHInter.hxx @@ -18,7 +18,6 @@ #define _IntCurveSurface_ThePolyhedronOfHInter_HeaderFile #include -#include #include #include diff --git a/src/IntCurveSurface/IntCurveSurface_ThePolyhedronToolOfHInter.hxx b/src/IntCurveSurface/IntCurveSurface_ThePolyhedronToolOfHInter.hxx index c937100805..52a2ae0b09 100644 --- a/src/IntCurveSurface/IntCurveSurface_ThePolyhedronToolOfHInter.hxx +++ b/src/IntCurveSurface/IntCurveSurface_ThePolyhedronToolOfHInter.hxx @@ -22,9 +22,7 @@ #include #include -#include #include -#include class Standard_OutOfRange; class IntCurveSurface_ThePolyhedronOfHInter; class Bnd_Box; diff --git a/src/IntCurvesFace/IntCurvesFace_Intersector.cxx b/src/IntCurvesFace/IntCurvesFace_Intersector.cxx index 78f47c648d..6db23180f9 100644 --- a/src/IntCurvesFace/IntCurvesFace_Intersector.cxx +++ b/src/IntCurvesFace/IntCurvesFace_Intersector.cxx @@ -23,22 +23,17 @@ #include #include #include -#include #include #include -#include #include #include #include #include #include -#include #include #include -#include #include #include -#include #include #include #include diff --git a/src/IntCurvesFace/IntCurvesFace_ShapeIntersector.cxx b/src/IntCurvesFace/IntCurvesFace_ShapeIntersector.cxx index ea40cebe30..8010244384 100644 --- a/src/IntCurvesFace/IntCurvesFace_ShapeIntersector.cxx +++ b/src/IntCurvesFace/IntCurvesFace_ShapeIntersector.cxx @@ -18,13 +18,8 @@ #include #include -#include -#include #include -#include #include -#include -#include #include #include #include diff --git a/src/IntImpParGen/IntImpParGen.cxx b/src/IntImpParGen/IntImpParGen.cxx index 0bf0008123..b83b7be16e 100644 --- a/src/IntImpParGen/IntImpParGen.cxx +++ b/src/IntImpParGen/IntImpParGen.cxx @@ -16,9 +16,6 @@ #include -#include -#include -#include #include #include #include diff --git a/src/IntImpParGen/IntImpParGen_Tool.hxx b/src/IntImpParGen/IntImpParGen_Tool.hxx index 67ee0524f3..77b9685c27 100644 --- a/src/IntImpParGen/IntImpParGen_Tool.hxx +++ b/src/IntImpParGen/IntImpParGen_Tool.hxx @@ -18,9 +18,7 @@ #define IntImpParGen_Tool_HeaderFile #include -#include #include -#include #include Standard_Real NormalizeOnDomain(Standard_Real&,const IntRes2d_Domain&); diff --git a/src/IntPatch/IntPatch_ALine.cxx b/src/IntPatch/IntPatch_ALine.cxx index 96e632ff5f..ff79b379bd 100644 --- a/src/IntPatch/IntPatch_ALine.cxx +++ b/src/IntPatch/IntPatch_ALine.cxx @@ -16,12 +16,8 @@ #include -#include -#include #include #include -#include -#include #include IMPLEMENT_STANDARD_RTTIEXT(IntPatch_ALine,IntPatch_Line) diff --git a/src/IntPatch/IntPatch_ArcFunction.cxx b/src/IntPatch/IntPatch_ArcFunction.cxx index 57f91e048f..f87f9c9a56 100644 --- a/src/IntPatch/IntPatch_ArcFunction.cxx +++ b/src/IntPatch/IntPatch_ArcFunction.cxx @@ -15,9 +15,6 @@ // commercial license or contractual agreement. -#include -#include -#include #include #include #include diff --git a/src/IntPatch/IntPatch_ArcFunction.hxx b/src/IntPatch/IntPatch_ArcFunction.hxx index d460f177e7..0d74c167ae 100644 --- a/src/IntPatch/IntPatch_ArcFunction.hxx +++ b/src/IntPatch/IntPatch_ArcFunction.hxx @@ -17,6 +17,7 @@ #ifndef _IntPatch_ArcFunction_HeaderFile #define _IntPatch_ArcFunction_HeaderFile +#include #include #include #include diff --git a/src/IntPatch/IntPatch_CSFunction.cxx b/src/IntPatch/IntPatch_CSFunction.cxx index 9369370425..0486a742fb 100644 --- a/src/IntPatch/IntPatch_CSFunction.cxx +++ b/src/IntPatch/IntPatch_CSFunction.cxx @@ -13,8 +13,6 @@ // commercial license or contractual agreement. -#include -#include #include #include #include diff --git a/src/IntPatch/IntPatch_CurvIntSurf.hxx b/src/IntPatch/IntPatch_CurvIntSurf.hxx index 0448130231..6ad831b7bc 100644 --- a/src/IntPatch/IntPatch_CurvIntSurf.hxx +++ b/src/IntPatch/IntPatch_CurvIntSurf.hxx @@ -17,7 +17,6 @@ #ifndef _IntPatch_CurvIntSurf_HeaderFile #define _IntPatch_CurvIntSurf_HeaderFile -#include #include class Adaptor3d_HSurfaceTool; diff --git a/src/IntPatch/IntPatch_GLine.cxx b/src/IntPatch/IntPatch_GLine.cxx index 96a41a97f2..6769b3e04e 100644 --- a/src/IntPatch/IntPatch_GLine.cxx +++ b/src/IntPatch/IntPatch_GLine.cxx @@ -16,14 +16,8 @@ #include -#include -#include -#include -#include #include #include -#include -#include #include IMPLEMENT_STANDARD_RTTIEXT(IntPatch_GLine,IntPatch_Line) diff --git a/src/IntPatch/IntPatch_GLine.hxx b/src/IntPatch/IntPatch_GLine.hxx index 61cc529bbd..d75e537780 100644 --- a/src/IntPatch/IntPatch_GLine.hxx +++ b/src/IntPatch/IntPatch_GLine.hxx @@ -21,18 +21,12 @@ #include #include -#include -#include #include #include #include #include #include -#include #include -#include -#include -#include class gp_Lin; class gp_Circ; class gp_Elips; diff --git a/src/IntPatch/IntPatch_HCurve2dTool.cxx b/src/IntPatch/IntPatch_HCurve2dTool.cxx index e00814391e..bb2d2eae53 100644 --- a/src/IntPatch/IntPatch_HCurve2dTool.cxx +++ b/src/IntPatch/IntPatch_HCurve2dTool.cxx @@ -15,18 +15,7 @@ // commercial license or contractual agreement. -#include -#include -#include -#include -#include -#include -#include #include -#include -#include -#include -#include //============================================================ Standard_Integer IntPatch_HCurve2dTool::NbSamples (const Handle(Adaptor2d_Curve2d)& C, diff --git a/src/IntPatch/IntPatch_HCurve2dTool.hxx b/src/IntPatch/IntPatch_HCurve2dTool.hxx index 86f9899b55..916d5c7cec 100644 --- a/src/IntPatch/IntPatch_HCurve2dTool.hxx +++ b/src/IntPatch/IntPatch_HCurve2dTool.hxx @@ -17,23 +17,15 @@ #ifndef _IntPatch_HCurve2dTool_HeaderFile #define _IntPatch_HCurve2dTool_HeaderFile +#include #include #include #include #include -#include #include #include #include -#include -#include -#include -#include -#include -#include -#include -#include class gp_Pnt2d; class gp_Vec2d; class Geom2d_BezierCurve; diff --git a/src/IntPatch/IntPatch_HInterTool.cxx b/src/IntPatch/IntPatch_HInterTool.cxx index 595ee4f2ca..623febdf28 100644 --- a/src/IntPatch/IntPatch_HInterTool.cxx +++ b/src/IntPatch/IntPatch_HInterTool.cxx @@ -15,8 +15,6 @@ // commercial license or contractual agreement. -#include -#include #include #include #include @@ -24,7 +22,6 @@ #include #include #include -#include #include #include #include diff --git a/src/IntPatch/IntPatch_ImpPrmIntersection.cxx b/src/IntPatch/IntPatch_ImpPrmIntersection.cxx index 483d1c2f34..6ecec53651 100644 --- a/src/IntPatch/IntPatch_ImpPrmIntersection.cxx +++ b/src/IntPatch/IntPatch_ImpPrmIntersection.cxx @@ -21,11 +21,9 @@ #include #include #include -#include #include #include #include -#include #include #include #include diff --git a/src/IntPatch/IntPatch_InterferencePolyhedron.cxx b/src/IntPatch/IntPatch_InterferencePolyhedron.cxx index 9d9509854b..046c2e8a4c 100644 --- a/src/IntPatch/IntPatch_InterferencePolyhedron.cxx +++ b/src/IntPatch/IntPatch_InterferencePolyhedron.cxx @@ -21,17 +21,10 @@ #include #include #include -#include -#include -#include -#include -#include -#include #include #include #include #include -#include #include static const int Pourcent3[9] = {0, 1, 2, 0, 1, 2, 0, 1, 2}; diff --git a/src/IntPatch/IntPatch_InterferencePolyhedron.hxx b/src/IntPatch/IntPatch_InterferencePolyhedron.hxx index 32f14ea21e..206f7e90f8 100644 --- a/src/IntPatch/IntPatch_InterferencePolyhedron.hxx +++ b/src/IntPatch/IntPatch_InterferencePolyhedron.hxx @@ -19,13 +19,10 @@ #include #include -#include #include -#include #include #include -#include class IntPatch_Polyhedron; class Intf_TangentZone; diff --git a/src/IntPatch/IntPatch_Intersection.cxx b/src/IntPatch/IntPatch_Intersection.cxx index 08db1dccd8..b06c8513d1 100644 --- a/src/IntPatch/IntPatch_Intersection.cxx +++ b/src/IntPatch/IntPatch_Intersection.cxx @@ -23,13 +23,11 @@ #include #include #include -#include #include #include #include #include -#include #include #include #include @@ -210,26 +208,18 @@ void IntPatch_Intersection::Perform(const Handle(Adaptor3d_Surface)& S1, // // ///////////////////////////////////////////////////////////////////////////// #include -#include #include #include #include #include #include -#include -#include -#include -#include -#include #include #include #include #include #include #include -#include #include -#include #include //=============================================================== diff --git a/src/IntPatch/IntPatch_Line.cxx b/src/IntPatch/IntPatch_Line.cxx index 690a6467ac..7cd137d004 100644 --- a/src/IntPatch/IntPatch_Line.cxx +++ b/src/IntPatch/IntPatch_Line.cxx @@ -15,7 +15,6 @@ #include #include -#include #include IMPLEMENT_STANDARD_RTTIEXT(IntPatch_Line,Standard_Transient) diff --git a/src/IntPatch/IntPatch_Line.hxx b/src/IntPatch/IntPatch_Line.hxx index e92369f5cd..5cd38a8e53 100644 --- a/src/IntPatch/IntPatch_Line.hxx +++ b/src/IntPatch/IntPatch_Line.hxx @@ -21,7 +21,6 @@ #include #include -#include #include #include #include diff --git a/src/IntPatch/IntPatch_LineConstructor.cxx b/src/IntPatch/IntPatch_LineConstructor.cxx index 324caaaa84..4274665023 100644 --- a/src/IntPatch/IntPatch_LineConstructor.cxx +++ b/src/IntPatch/IntPatch_LineConstructor.cxx @@ -16,7 +16,6 @@ #include -#include #include #include #include diff --git a/src/IntPatch/IntPatch_Point.cxx b/src/IntPatch/IntPatch_Point.cxx index 3286b1e45b..6c681d27da 100644 --- a/src/IntPatch/IntPatch_Point.cxx +++ b/src/IntPatch/IntPatch_Point.cxx @@ -15,13 +15,11 @@ // commercial license or contractual agreement. -#include #include #include #include #include #include -#include #include void IntPatch_Point::SetValue (const gp_Pnt& Pt, @@ -122,7 +120,6 @@ void IntPatch_Point::ReverseTransition() #include -#include #include static void DumpTransition(const IntSurf_Transition& T) diff --git a/src/IntPatch/IntPatch_Point.hxx b/src/IntPatch/IntPatch_Point.hxx index b44a1d6c48..e969039e18 100644 --- a/src/IntPatch/IntPatch_Point.hxx +++ b/src/IntPatch/IntPatch_Point.hxx @@ -22,8 +22,6 @@ #include #include -#include -#include #include #include diff --git a/src/IntPatch/IntPatch_PolyArc.cxx b/src/IntPatch/IntPatch_PolyArc.cxx index 3a46f03294..1253fe17da 100644 --- a/src/IntPatch/IntPatch_PolyArc.cxx +++ b/src/IntPatch/IntPatch_PolyArc.cxx @@ -16,7 +16,6 @@ #include -#include #include #include #include diff --git a/src/IntPatch/IntPatch_PolyArc.hxx b/src/IntPatch/IntPatch_PolyArc.hxx index 920dc8507b..97507a04f8 100644 --- a/src/IntPatch/IntPatch_PolyArc.hxx +++ b/src/IntPatch/IntPatch_PolyArc.hxx @@ -23,8 +23,6 @@ #include #include -#include -#include #include #include class Bnd_Box2d; diff --git a/src/IntPatch/IntPatch_PolyLine.cxx b/src/IntPatch/IntPatch_PolyLine.cxx index c73fb8bbfd..fa7eaeaed1 100644 --- a/src/IntPatch/IntPatch_PolyLine.cxx +++ b/src/IntPatch/IntPatch_PolyLine.cxx @@ -17,7 +17,6 @@ //-- lbr le 12 juin : Ajout des fleches sur les Lines //-- msv 13.03.2002 : compute deflection for WLine; Error() returns deflection -#include #include #include #include diff --git a/src/IntPatch/IntPatch_Polygo.cxx b/src/IntPatch/IntPatch_Polygo.cxx index d2e43a24d7..ae06ac4987 100644 --- a/src/IntPatch/IntPatch_Polygo.cxx +++ b/src/IntPatch/IntPatch_Polygo.cxx @@ -15,9 +15,7 @@ // commercial license or contractual agreement. -#include #include -#include //======================================================================= //function : Initialize diff --git a/src/IntPatch/IntPatch_Polygo.hxx b/src/IntPatch/IntPatch_Polygo.hxx index cf218b17cb..ade9775b83 100644 --- a/src/IntPatch/IntPatch_Polygo.hxx +++ b/src/IntPatch/IntPatch_Polygo.hxx @@ -21,9 +21,7 @@ #include #include -#include #include -#include class gp_Pnt2d; diff --git a/src/IntPatch/IntPatch_Polyhedron.cxx b/src/IntPatch/IntPatch_Polyhedron.cxx index db03fc2da9..9f436bbb22 100644 --- a/src/IntPatch/IntPatch_Polyhedron.cxx +++ b/src/IntPatch/IntPatch_Polyhedron.cxx @@ -16,17 +16,11 @@ #include -#include -#include #include #include #include #include #include -#include -#include -#include -#include #include #include diff --git a/src/IntPatch/IntPatch_Polyhedron.hxx b/src/IntPatch/IntPatch_Polyhedron.hxx index bfcfc0a12c..59e939b98f 100644 --- a/src/IntPatch/IntPatch_Polyhedron.hxx +++ b/src/IntPatch/IntPatch_Polyhedron.hxx @@ -18,7 +18,6 @@ #define _IntPatch_Polyhedron_HeaderFile #include -#include #include //! This class provides a linear approximation of the PSurface. diff --git a/src/IntPatch/IntPatch_PolyhedronTool.hxx b/src/IntPatch/IntPatch_PolyhedronTool.hxx index 7b07b8a6ac..712d926edc 100644 --- a/src/IntPatch/IntPatch_PolyhedronTool.hxx +++ b/src/IntPatch/IntPatch_PolyhedronTool.hxx @@ -22,7 +22,6 @@ #include #include -#include #include class Standard_OutOfRange; class Bnd_Box; diff --git a/src/IntPatch/IntPatch_PrmPrmIntersection.cxx b/src/IntPatch/IntPatch_PrmPrmIntersection.cxx index a96f662f7c..a3ba76ddb4 100644 --- a/src/IntPatch/IntPatch_PrmPrmIntersection.cxx +++ b/src/IntPatch/IntPatch_PrmPrmIntersection.cxx @@ -21,12 +21,7 @@ #include #include #include -#include -#include -#include -#include #include -#include #include #include #include @@ -40,7 +35,6 @@ #include #include #include -#include #include static void SectionPointToParameters(const Intf_SectionPoint& Sp, diff --git a/src/IntPatch/IntPatch_PrmPrmIntersection_T3Bits.hxx b/src/IntPatch/IntPatch_PrmPrmIntersection_T3Bits.hxx index 6da6277e09..015d6e35a5 100644 --- a/src/IntPatch/IntPatch_PrmPrmIntersection_T3Bits.hxx +++ b/src/IntPatch/IntPatch_PrmPrmIntersection_T3Bits.hxx @@ -21,9 +21,6 @@ #include #include -#include -#include - class IntPatch_PrmPrmIntersection_T3Bits { public: diff --git a/src/IntPatch/IntPatch_RLine.cxx b/src/IntPatch/IntPatch_RLine.cxx index b1d83940ff..4e552fc067 100644 --- a/src/IntPatch/IntPatch_RLine.cxx +++ b/src/IntPatch/IntPatch_RLine.cxx @@ -15,14 +15,9 @@ // commercial license or contractual agreement. -#include -#include #include #include #include -#include -#include -#include #include IMPLEMENT_STANDARD_RTTIEXT(IntPatch_RLine,IntPatch_PointLine) diff --git a/src/IntPatch/IntPatch_RLine.hxx b/src/IntPatch/IntPatch_RLine.hxx index b98bda1c86..dda29a2e51 100644 --- a/src/IntPatch/IntPatch_RLine.hxx +++ b/src/IntPatch/IntPatch_RLine.hxx @@ -18,9 +18,7 @@ #define _IntPatch_RLine_HeaderFile #include -#include -#include #include #include #include diff --git a/src/IntPatch/IntPatch_RstInt.cxx b/src/IntPatch/IntPatch_RstInt.cxx index 6c16d7162f..b1b996ff92 100644 --- a/src/IntPatch/IntPatch_RstInt.cxx +++ b/src/IntPatch/IntPatch_RstInt.cxx @@ -26,15 +26,10 @@ //-- Chercher(Nbvtx++). #include -#include #include #include -#include -#include -#include #include #include -#include #include #include #include diff --git a/src/IntPatch/IntPatch_SpecialPoints.cxx b/src/IntPatch/IntPatch_SpecialPoints.cxx index f58dcb9fb0..d2fb94add0 100644 --- a/src/IntPatch/IntPatch_SpecialPoints.cxx +++ b/src/IntPatch/IntPatch_SpecialPoints.cxx @@ -19,8 +19,6 @@ #include #include #include -#include -#include #include #include #include diff --git a/src/IntPatch/IntPatch_TheIWLineOfTheIWalking.hxx b/src/IntPatch/IntPatch_TheIWLineOfTheIWalking.hxx index ceca228e36..5d59181c49 100644 --- a/src/IntPatch/IntPatch_TheIWLineOfTheIWalking.hxx +++ b/src/IntPatch/IntPatch_TheIWLineOfTheIWalking.hxx @@ -21,7 +21,6 @@ #include #include -#include #include #include #include diff --git a/src/IntPatch/IntPatch_TheSOnBounds.hxx b/src/IntPatch/IntPatch_TheSOnBounds.hxx index 0aec13e2dd..b62ed1d515 100644 --- a/src/IntPatch/IntPatch_TheSOnBounds.hxx +++ b/src/IntPatch/IntPatch_TheSOnBounds.hxx @@ -21,10 +21,8 @@ #include #include -#include #include #include -#include #include class StdFail_NotDone; class Standard_OutOfRange; diff --git a/src/IntPatch/IntPatch_TheSegmentOfTheSOnBounds.hxx b/src/IntPatch/IntPatch_TheSegmentOfTheSOnBounds.hxx index 9d200b6cb1..b14695b1c8 100644 --- a/src/IntPatch/IntPatch_TheSegmentOfTheSOnBounds.hxx +++ b/src/IntPatch/IntPatch_TheSegmentOfTheSOnBounds.hxx @@ -21,7 +21,6 @@ #include #include -#include #include class Standard_DomainError; diff --git a/src/IntPatch/IntPatch_WLine.cxx b/src/IntPatch/IntPatch_WLine.cxx index 44713bc935..7cdb93daaf 100644 --- a/src/IntPatch/IntPatch_WLine.cxx +++ b/src/IntPatch/IntPatch_WLine.cxx @@ -15,15 +15,9 @@ // commercial license or contractual agreement. -#include -#include -#include -#include #include #include #include -#include -#include #include IMPLEMENT_STANDARD_RTTIEXT(IntPatch_WLine,IntPatch_PointLine) @@ -31,7 +25,6 @@ IMPLEMENT_STANDARD_RTTIEXT(IntPatch_WLine,IntPatch_PointLine) #define DEBUG 0 #define DEBUGV 0 -#include #include #include diff --git a/src/IntPatch/IntPatch_WLine.hxx b/src/IntPatch/IntPatch_WLine.hxx index 2f68baaff8..ccebfe4fec 100644 --- a/src/IntPatch/IntPatch_WLine.hxx +++ b/src/IntPatch/IntPatch_WLine.hxx @@ -18,9 +18,7 @@ #define _IntPatch_WLine_HeaderFile #include -#include -#include #include #include #include diff --git a/src/IntPatch/IntPatch_WLineTool.hxx b/src/IntPatch/IntPatch_WLineTool.hxx index fc29394b4d..41f7f02c1c 100644 --- a/src/IntPatch/IntPatch_WLineTool.hxx +++ b/src/IntPatch/IntPatch_WLineTool.hxx @@ -14,8 +14,6 @@ #ifndef _IntPatch_WLineTool_HeaderFile #define _IntPatch_WLineTool_HeaderFile -#include - #include #include #include diff --git a/src/IntPolyh/IntPolyh_CoupleMapHasher.hxx b/src/IntPolyh/IntPolyh_CoupleMapHasher.hxx index e0300624a3..fa40687ed9 100644 --- a/src/IntPolyh/IntPolyh_CoupleMapHasher.hxx +++ b/src/IntPolyh/IntPolyh_CoupleMapHasher.hxx @@ -16,7 +16,6 @@ #define _IntPolyh_CoupleMapHasher_HeaderFile #include -#include #include class IntPolyh_Couple; diff --git a/src/IntPolyh/IntPolyh_Edge.hxx b/src/IntPolyh/IntPolyh_Edge.hxx index 72e5173c52..a7c7aec95a 100644 --- a/src/IntPolyh/IntPolyh_Edge.hxx +++ b/src/IntPolyh/IntPolyh_Edge.hxx @@ -21,8 +21,6 @@ #include #include -#include - //! The class represents the edge built between the two IntPolyh points.
    //! It is linked to two IntPolyh triangles. class IntPolyh_Edge diff --git a/src/IntPolyh/IntPolyh_MaillageAffinage.cxx b/src/IntPolyh/IntPolyh_MaillageAffinage.cxx index 44ffc62bea..1e2300416b 100644 --- a/src/IntPolyh/IntPolyh_MaillageAffinage.cxx +++ b/src/IntPolyh/IntPolyh_MaillageAffinage.cxx @@ -31,18 +31,13 @@ #include #include #include -#include #include -#include -#include -#include #include #include #include #include #include #include -#include #include #include #include diff --git a/src/IntPolyh/IntPolyh_Point.cxx b/src/IntPolyh/IntPolyh_Point.cxx index 884c8fa7f3..0e87396bea 100644 --- a/src/IntPolyh/IntPolyh_Point.cxx +++ b/src/IntPolyh/IntPolyh_Point.cxx @@ -15,7 +15,6 @@ // commercial license or contractual agreement. -#include #include #include diff --git a/src/IntPolyh/IntPolyh_SectionLine.hxx b/src/IntPolyh/IntPolyh_SectionLine.hxx index 3bb213a31d..6ceed6368e 100644 --- a/src/IntPolyh/IntPolyh_SectionLine.hxx +++ b/src/IntPolyh/IntPolyh_SectionLine.hxx @@ -22,7 +22,6 @@ #include #include -#include class IntPolyh_StartPoint; diff --git a/src/IntPolyh/IntPolyh_Triangle.cxx b/src/IntPolyh/IntPolyh_Triangle.cxx index 4bbad06ff8..4e0aab33c3 100644 --- a/src/IntPolyh/IntPolyh_Triangle.cxx +++ b/src/IntPolyh/IntPolyh_Triangle.cxx @@ -15,10 +15,6 @@ // commercial license or contractual agreement. -#include -#include -#include -#include #include #include diff --git a/src/IntRes2d/IntRes2d_Domain.cxx b/src/IntRes2d/IntRes2d_Domain.cxx index e6a58049e7..57c9b9cc3f 100644 --- a/src/IntRes2d/IntRes2d_Domain.cxx +++ b/src/IntRes2d/IntRes2d_Domain.cxx @@ -18,10 +18,8 @@ // --- limit infinite points and parameters in order to make // --- arithmetic operation on them safe -#include #include #include -#include const Standard_Real infVal = Precision::Infinite(); diff --git a/src/IntRes2d/IntRes2d_Domain.hxx b/src/IntRes2d/IntRes2d_Domain.hxx index 0799227aae..634a9989f7 100644 --- a/src/IntRes2d/IntRes2d_Domain.hxx +++ b/src/IntRes2d/IntRes2d_Domain.hxx @@ -21,8 +21,6 @@ #include #include -#include -#include #include #include diff --git a/src/IntRes2d/IntRes2d_Intersection.cxx b/src/IntRes2d/IntRes2d_Intersection.cxx index a4a6e352de..1986ec78d8 100644 --- a/src/IntRes2d/IntRes2d_Intersection.cxx +++ b/src/IntRes2d/IntRes2d_Intersection.cxx @@ -19,9 +19,7 @@ #include #include #include -#include #include -#include #include #define PARAMEQUAL(a,b) (Abs((a)-(b))< (1e-8)) diff --git a/src/IntRes2d/IntRes2d_Intersection.hxx b/src/IntRes2d/IntRes2d_Intersection.hxx index 2b28f65c8b..fdf5d83e4b 100644 --- a/src/IntRes2d/IntRes2d_Intersection.hxx +++ b/src/IntRes2d/IntRes2d_Intersection.hxx @@ -24,8 +24,6 @@ #include #include #include -#include -#include class IntRes2d_IntersectionPoint; class IntRes2d_IntersectionSegment; diff --git a/src/IntRes2d/IntRes2d_IntersectionPoint.cxx b/src/IntRes2d/IntRes2d_IntersectionPoint.cxx index fd65533c50..caacf24854 100644 --- a/src/IntRes2d/IntRes2d_IntersectionPoint.cxx +++ b/src/IntRes2d/IntRes2d_IntersectionPoint.cxx @@ -15,7 +15,6 @@ // commercial license or contractual agreement. -#include #include #include diff --git a/src/IntRes2d/IntRes2d_IntersectionPoint.hxx b/src/IntRes2d/IntRes2d_IntersectionPoint.hxx index a78fff7547..5cb18711cc 100644 --- a/src/IntRes2d/IntRes2d_IntersectionPoint.hxx +++ b/src/IntRes2d/IntRes2d_IntersectionPoint.hxx @@ -22,7 +22,6 @@ #include #include -#include #include #include diff --git a/src/IntRes2d/IntRes2d_IntersectionSegment.cxx b/src/IntRes2d/IntRes2d_IntersectionSegment.cxx index 41d296cd5c..d83caacc8b 100644 --- a/src/IntRes2d/IntRes2d_IntersectionSegment.cxx +++ b/src/IntRes2d/IntRes2d_IntersectionSegment.cxx @@ -15,9 +15,7 @@ // commercial license or contractual agreement. -#include #include -#include IntRes2d_IntersectionSegment::IntRes2d_IntersectionSegment () : oppos(Standard_False), diff --git a/src/IntSurf/IntSurf_Couple.hxx b/src/IntSurf/IntSurf_Couple.hxx index 84ac5f6b3c..efa0dcd96f 100644 --- a/src/IntSurf/IntSurf_Couple.hxx +++ b/src/IntSurf/IntSurf_Couple.hxx @@ -19,7 +19,6 @@ #include #include -#include #include diff --git a/src/IntSurf/IntSurf_InteriorPoint.cxx b/src/IntSurf/IntSurf_InteriorPoint.cxx index 50eb033f42..3d9ddc913c 100644 --- a/src/IntSurf/IntSurf_InteriorPoint.cxx +++ b/src/IntSurf/IntSurf_InteriorPoint.cxx @@ -13,7 +13,6 @@ // commercial license or contractual agreement. -#include #include #include #include diff --git a/src/IntSurf/IntSurf_InteriorPoint.hxx b/src/IntSurf/IntSurf_InteriorPoint.hxx index 63334c7bee..4642119018 100644 --- a/src/IntSurf/IntSurf_InteriorPoint.hxx +++ b/src/IntSurf/IntSurf_InteriorPoint.hxx @@ -19,10 +19,8 @@ #include #include -#include #include -#include #include #include diff --git a/src/IntSurf/IntSurf_InteriorPointTool.hxx b/src/IntSurf/IntSurf_InteriorPointTool.hxx index aa7b34310c..3253dd1ed6 100644 --- a/src/IntSurf/IntSurf_InteriorPointTool.hxx +++ b/src/IntSurf/IntSurf_InteriorPointTool.hxx @@ -19,10 +19,8 @@ #include #include -#include #include -#include #include #include class IntSurf_InteriorPoint; diff --git a/src/IntSurf/IntSurf_LineOn2S.cxx b/src/IntSurf/IntSurf_LineOn2S.cxx index 162bab7e3a..2608c4eae5 100644 --- a/src/IntSurf/IntSurf_LineOn2S.cxx +++ b/src/IntSurf/IntSurf_LineOn2S.cxx @@ -15,7 +15,6 @@ #include #include -#include #include IMPLEMENT_STANDARD_RTTIEXT(IntSurf_LineOn2S,Standard_Transient) diff --git a/src/IntSurf/IntSurf_LineOn2S.hxx b/src/IntSurf/IntSurf_LineOn2S.hxx index b44dc77838..3abc4b84b4 100644 --- a/src/IntSurf/IntSurf_LineOn2S.hxx +++ b/src/IntSurf/IntSurf_LineOn2S.hxx @@ -18,7 +18,6 @@ #define _IntSurf_LineOn2S_HeaderFile #include -#include #include #include @@ -26,7 +25,6 @@ #include #include #include -#include #include class IntSurf_PntOn2S; diff --git a/src/IntSurf/IntSurf_PathPoint.cxx b/src/IntSurf/IntSurf_PathPoint.cxx index 554b04eecb..e00db4fd3b 100644 --- a/src/IntSurf/IntSurf_PathPoint.cxx +++ b/src/IntSurf/IntSurf_PathPoint.cxx @@ -15,9 +15,7 @@ #include #include -#include #include -#include #include IntSurf_PathPoint::IntSurf_PathPoint (): diff --git a/src/IntSurf/IntSurf_PathPoint.hxx b/src/IntSurf/IntSurf_PathPoint.hxx index d8617163ec..d15df730e4 100644 --- a/src/IntSurf/IntSurf_PathPoint.hxx +++ b/src/IntSurf/IntSurf_PathPoint.hxx @@ -22,11 +22,9 @@ #include #include -#include #include #include #include -#include #include diff --git a/src/IntSurf/IntSurf_PathPointTool.hxx b/src/IntSurf/IntSurf_PathPointTool.hxx index 70481825b4..ae72995d87 100644 --- a/src/IntSurf/IntSurf_PathPointTool.hxx +++ b/src/IntSurf/IntSurf_PathPointTool.hxx @@ -19,11 +19,8 @@ #include #include -#include #include -#include -#include #include #include #include diff --git a/src/IntSurf/IntSurf_PntOn2S.cxx b/src/IntSurf/IntSurf_PntOn2S.cxx index df167df6a4..679e7df268 100644 --- a/src/IntSurf/IntSurf_PntOn2S.cxx +++ b/src/IntSurf/IntSurf_PntOn2S.cxx @@ -13,7 +13,6 @@ // commercial license or contractual agreement. -#include #include IntSurf_PntOn2S::IntSurf_PntOn2S () diff --git a/src/IntSurf/IntSurf_PntOn2S.hxx b/src/IntSurf/IntSurf_PntOn2S.hxx index d9e4bcfeeb..5dd6a9d5b5 100644 --- a/src/IntSurf/IntSurf_PntOn2S.hxx +++ b/src/IntSurf/IntSurf_PntOn2S.hxx @@ -22,7 +22,6 @@ #include #include -#include #include class gp_Pnt2d; diff --git a/src/IntSurf/IntSurf_Quadric.cxx b/src/IntSurf/IntSurf_Quadric.cxx index e44a7b7282..5dba23198d 100644 --- a/src/IntSurf/IntSurf_Quadric.cxx +++ b/src/IntSurf/IntSurf_Quadric.cxx @@ -15,7 +15,6 @@ #include #include -#include #include #include #include diff --git a/src/IntSurf/IntSurf_Quadric.hxx b/src/IntSurf/IntSurf_Quadric.hxx index 0484519f25..28374d715a 100644 --- a/src/IntSurf/IntSurf_Quadric.hxx +++ b/src/IntSurf/IntSurf_Quadric.hxx @@ -19,13 +19,10 @@ #include #include -#include #include #include #include -#include -#include #include #include #include diff --git a/src/IntSurf/IntSurf_QuadricTool.cxx b/src/IntSurf/IntSurf_QuadricTool.cxx index 5816c9f17d..add2404466 100644 --- a/src/IntSurf/IntSurf_QuadricTool.cxx +++ b/src/IntSurf/IntSurf_QuadricTool.cxx @@ -13,10 +13,6 @@ // commercial license or contractual agreement. -#include -#include -#include -#include #include Standard_Real IntSurf_QuadricTool::Tolerance (const IntSurf_Quadric& Q) { diff --git a/src/IntTools/IntTools.cxx b/src/IntTools/IntTools.cxx index b440f8d460..fd16f03e57 100644 --- a/src/IntTools/IntTools.cxx +++ b/src/IntTools/IntTools.cxx @@ -18,7 +18,6 @@ #include #include #include -#include #include #include #include @@ -27,7 +26,6 @@ #include #include #include -#include #include #include @@ -296,10 +294,8 @@ namespace { } #include -#include #include #include -#include #include #include #include diff --git a/src/IntTools/IntTools_BaseRangeSample.hxx b/src/IntTools/IntTools_BaseRangeSample.hxx index dab8ae74f6..b00600d7b1 100644 --- a/src/IntTools/IntTools_BaseRangeSample.hxx +++ b/src/IntTools/IntTools_BaseRangeSample.hxx @@ -19,7 +19,6 @@ #include #include #include -#include //! base class for range index management class IntTools_BaseRangeSample diff --git a/src/IntTools/IntTools_BeanFaceIntersector.cxx b/src/IntTools/IntTools_BeanFaceIntersector.cxx index 96b9c0c369..858d7711d3 100644 --- a/src/IntTools/IntTools_BeanFaceIntersector.cxx +++ b/src/IntTools/IntTools_BeanFaceIntersector.cxx @@ -13,7 +13,6 @@ #include -#include #include #include #include @@ -38,27 +37,18 @@ #include #include #include -#include #include #include #include -#include -#include -#include -#include #include #include #include -#include -#include #include #include #include #include -#include #include #include -#include #include #include #include diff --git a/src/IntTools/IntTools_BeanFaceIntersector.hxx b/src/IntTools/IntTools_BeanFaceIntersector.hxx index 6004773923..3660372f6b 100644 --- a/src/IntTools/IntTools_BeanFaceIntersector.hxx +++ b/src/IntTools/IntTools_BeanFaceIntersector.hxx @@ -18,7 +18,6 @@ #include #include -#include #include #include diff --git a/src/IntTools/IntTools_CommonPrt.cxx b/src/IntTools/IntTools_CommonPrt.cxx index d2f3ba823a..4a2a88f7d6 100644 --- a/src/IntTools/IntTools_CommonPrt.cxx +++ b/src/IntTools/IntTools_CommonPrt.cxx @@ -14,7 +14,6 @@ // commercial license or contractual agreement. -#include #include #include #include diff --git a/src/IntTools/IntTools_CommonPrt.hxx b/src/IntTools/IntTools_CommonPrt.hxx index 3de0603475..8f7f249a16 100644 --- a/src/IntTools/IntTools_CommonPrt.hxx +++ b/src/IntTools/IntTools_CommonPrt.hxx @@ -22,8 +22,6 @@ #include #include -#include -#include #include #include #include diff --git a/src/IntTools/IntTools_Context.cxx b/src/IntTools/IntTools_Context.cxx index 7d18e8c83e..286bac96fc 100644 --- a/src/IntTools/IntTools_Context.cxx +++ b/src/IntTools/IntTools_Context.cxx @@ -16,7 +16,6 @@ #include #include #include -#include #include #include #include @@ -32,7 +31,6 @@ #include #include #include -#include #include #include #include diff --git a/src/IntTools/IntTools_Context.hxx b/src/IntTools/IntTools_Context.hxx index d09e6266db..eebffed2cb 100644 --- a/src/IntTools/IntTools_Context.hxx +++ b/src/IntTools/IntTools_Context.hxx @@ -22,11 +22,9 @@ #include #include #include -#include #include #include #include -#include #include #include class IntTools_FClass2d; diff --git a/src/IntTools/IntTools_CurveRangeLocalizeData.cxx b/src/IntTools/IntTools_CurveRangeLocalizeData.cxx index 96b01484b3..20fc8a2781 100644 --- a/src/IntTools/IntTools_CurveRangeLocalizeData.cxx +++ b/src/IntTools/IntTools_CurveRangeLocalizeData.cxx @@ -14,10 +14,8 @@ // commercial license or contractual agreement. -#include #include #include -#include #include #include diff --git a/src/IntTools/IntTools_CurveRangeLocalizeData.hxx b/src/IntTools/IntTools_CurveRangeLocalizeData.hxx index 2418228321..5bbb0f1ea8 100644 --- a/src/IntTools/IntTools_CurveRangeLocalizeData.hxx +++ b/src/IntTools/IntTools_CurveRangeLocalizeData.hxx @@ -19,7 +19,6 @@ #include #include #include -#include #include #include #include diff --git a/src/IntTools/IntTools_CurveRangeSample.hxx b/src/IntTools/IntTools_CurveRangeSample.hxx index 7fb69cdcb2..5375015feb 100644 --- a/src/IntTools/IntTools_CurveRangeSample.hxx +++ b/src/IntTools/IntTools_CurveRangeSample.hxx @@ -20,7 +20,6 @@ #include #include -#include #include #include #include diff --git a/src/IntTools/IntTools_CurveRangeSampleMapHasher.hxx b/src/IntTools/IntTools_CurveRangeSampleMapHasher.hxx index c5ec23f98a..0a3ca3563f 100644 --- a/src/IntTools/IntTools_CurveRangeSampleMapHasher.hxx +++ b/src/IntTools/IntTools_CurveRangeSampleMapHasher.hxx @@ -19,7 +19,6 @@ #include #include #include -#include #include //! class for range index management of curve diff --git a/src/IntTools/IntTools_EdgeEdge.cxx b/src/IntTools/IntTools_EdgeEdge.cxx index 154ce1684f..f5aa29374f 100644 --- a/src/IntTools/IntTools_EdgeEdge.cxx +++ b/src/IntTools/IntTools_EdgeEdge.cxx @@ -16,12 +16,9 @@ #include #include #include -#include -#include #include #include #include -#include #include #include #include @@ -29,7 +26,6 @@ #include #include #include -#include #include #include #include diff --git a/src/IntTools/IntTools_EdgeEdge.hxx b/src/IntTools/IntTools_EdgeEdge.hxx index d7e619e2e5..dc1e2edf96 100644 --- a/src/IntTools/IntTools_EdgeEdge.hxx +++ b/src/IntTools/IntTools_EdgeEdge.hxx @@ -19,11 +19,7 @@ #include #include -#include #include -#include -#include -#include #include #include #include diff --git a/src/IntTools/IntTools_EdgeFace.cxx b/src/IntTools/IntTools_EdgeFace.cxx index e23dfca977..7d4f236b6c 100644 --- a/src/IntTools/IntTools_EdgeFace.cxx +++ b/src/IntTools/IntTools_EdgeFace.cxx @@ -15,18 +15,12 @@ #include -#include -#include #include #include -#include -#include -#include #include #include #include #include -#include #include #include #include @@ -43,11 +37,8 @@ #include #include #include -#include #include #include -#include -#include #include static diff --git a/src/IntTools/IntTools_EdgeFace.hxx b/src/IntTools/IntTools_EdgeFace.hxx index a48500cfd4..8ecf4f9467 100644 --- a/src/IntTools/IntTools_EdgeFace.hxx +++ b/src/IntTools/IntTools_EdgeFace.hxx @@ -21,13 +21,11 @@ #include #include -#include #include #include #include #include #include -#include #include #include class IntTools_Context; diff --git a/src/IntTools/IntTools_FClass2d.cxx b/src/IntTools/IntTools_FClass2d.cxx index 75634f66d0..ab6d700a72 100644 --- a/src/IntTools/IntTools_FClass2d.cxx +++ b/src/IntTools/IntTools_FClass2d.cxx @@ -30,7 +30,6 @@ #include #include #include -#include #include #include #include @@ -43,7 +42,6 @@ #include #include #include -#include #include #include diff --git a/src/IntTools/IntTools_FClass2d.hxx b/src/IntTools/IntTools_FClass2d.hxx index aff1593d22..5b37565f1b 100644 --- a/src/IntTools/IntTools_FClass2d.hxx +++ b/src/IntTools/IntTools_FClass2d.hxx @@ -24,9 +24,7 @@ #include #include #include -#include #include -#include #include #include diff --git a/src/IntTools/IntTools_FaceFace.cxx b/src/IntTools/IntTools_FaceFace.cxx index 5e638519ff..27f20299b2 100644 --- a/src/IntTools/IntTools_FaceFace.cxx +++ b/src/IntTools/IntTools_FaceFace.cxx @@ -15,7 +15,6 @@ #include -#include #include #include #include @@ -43,7 +42,6 @@ #include #include #include -#include #include #include #include diff --git a/src/IntTools/IntTools_PntOnFace.cxx b/src/IntTools/IntTools_PntOnFace.cxx index 3d1309b4fb..5035dbd3e8 100644 --- a/src/IntTools/IntTools_PntOnFace.cxx +++ b/src/IntTools/IntTools_PntOnFace.cxx @@ -14,7 +14,6 @@ // commercial license or contractual agreement. -#include #include #include diff --git a/src/IntTools/IntTools_PntOnFace.hxx b/src/IntTools/IntTools_PntOnFace.hxx index 5298a58d1c..59074c65ce 100644 --- a/src/IntTools/IntTools_PntOnFace.hxx +++ b/src/IntTools/IntTools_PntOnFace.hxx @@ -22,7 +22,6 @@ #include #include -#include #include diff --git a/src/IntTools/IntTools_Root.hxx b/src/IntTools/IntTools_Root.hxx index c482135a61..9db5474fd8 100644 --- a/src/IntTools/IntTools_Root.hxx +++ b/src/IntTools/IntTools_Root.hxx @@ -21,7 +21,6 @@ #include #include -#include #include #include diff --git a/src/IntTools/IntTools_ShrunkRange.cxx b/src/IntTools/IntTools_ShrunkRange.cxx index 70133d7214..646a629395 100644 --- a/src/IntTools/IntTools_ShrunkRange.cxx +++ b/src/IntTools/IntTools_ShrunkRange.cxx @@ -13,7 +13,6 @@ // commercial license or contractual agreement. -#include #include #include #include diff --git a/src/IntTools/IntTools_ShrunkRange.hxx b/src/IntTools/IntTools_ShrunkRange.hxx index 90b4ca1d02..037e542ab5 100644 --- a/src/IntTools/IntTools_ShrunkRange.hxx +++ b/src/IntTools/IntTools_ShrunkRange.hxx @@ -21,7 +21,6 @@ #include #include -#include #include #include class IntTools_Context; diff --git a/src/IntTools/IntTools_SurfaceRangeLocalizeData.cxx b/src/IntTools/IntTools_SurfaceRangeLocalizeData.cxx index 77f6ef697a..4e13d4ad4c 100644 --- a/src/IntTools/IntTools_SurfaceRangeLocalizeData.cxx +++ b/src/IntTools/IntTools_SurfaceRangeLocalizeData.cxx @@ -17,8 +17,6 @@ #include #include #include -#include -#include #include #include #include diff --git a/src/IntTools/IntTools_SurfaceRangeLocalizeData.hxx b/src/IntTools/IntTools_SurfaceRangeLocalizeData.hxx index 2ba96c4e81..eec3296f5c 100644 --- a/src/IntTools/IntTools_SurfaceRangeLocalizeData.hxx +++ b/src/IntTools/IntTools_SurfaceRangeLocalizeData.hxx @@ -21,12 +21,10 @@ #include #include -#include #include #include #include #include -#include #include class IntTools_SurfaceRangeSample; class Bnd_Box; diff --git a/src/IntTools/IntTools_SurfaceRangeSample.cxx b/src/IntTools/IntTools_SurfaceRangeSample.cxx index d97508756b..63cc80e878 100644 --- a/src/IntTools/IntTools_SurfaceRangeSample.cxx +++ b/src/IntTools/IntTools_SurfaceRangeSample.cxx @@ -14,7 +14,6 @@ // commercial license or contractual agreement. -#include #include #include diff --git a/src/IntTools/IntTools_SurfaceRangeSample.hxx b/src/IntTools/IntTools_SurfaceRangeSample.hxx index 68c698f06f..15f86977ff 100644 --- a/src/IntTools/IntTools_SurfaceRangeSample.hxx +++ b/src/IntTools/IntTools_SurfaceRangeSample.hxx @@ -18,12 +18,9 @@ #include #include -#include #include #include -#include -#include class IntTools_Range; diff --git a/src/IntTools/IntTools_SurfaceRangeSampleMapHasher.hxx b/src/IntTools/IntTools_SurfaceRangeSampleMapHasher.hxx index afefe74e58..ae8a35bfe9 100644 --- a/src/IntTools/IntTools_SurfaceRangeSampleMapHasher.hxx +++ b/src/IntTools/IntTools_SurfaceRangeSampleMapHasher.hxx @@ -19,7 +19,6 @@ #include #include #include -#include #include class IntTools_SurfaceRangeSampleMapHasher diff --git a/src/IntTools/IntTools_Tools.cxx b/src/IntTools/IntTools_Tools.cxx index 8ea8e0cf74..3c72ec9906 100644 --- a/src/IntTools/IntTools_Tools.cxx +++ b/src/IntTools/IntTools_Tools.cxx @@ -18,13 +18,10 @@ #include #include #include -#include #include #include #include -#include #include -#include #include #include #include @@ -32,8 +29,6 @@ #include #include #include -#include -#include #include #include #include @@ -41,21 +36,17 @@ #include #include #include -#include #include #include -#include #include #include #include -#include #include #include #include #include #include #include -#include static void ParabolaTolerance(const Handle(Geom_Curve)& , diff --git a/src/IntTools/IntTools_Tools.hxx b/src/IntTools/IntTools_Tools.hxx index 8a466e9c42..d05c6b6698 100644 --- a/src/IntTools/IntTools_Tools.hxx +++ b/src/IntTools/IntTools_Tools.hxx @@ -21,9 +21,7 @@ #include #include -#include #include -#include #include #include class TopoDS_Vertex; diff --git a/src/IntTools/IntTools_TopolTool.cxx b/src/IntTools/IntTools_TopolTool.cxx index 7bbe6b734a..a5b8bdaa0e 100644 --- a/src/IntTools/IntTools_TopolTool.cxx +++ b/src/IntTools/IntTools_TopolTool.cxx @@ -22,7 +22,6 @@ #include #include #include -#include #include #include #include diff --git a/src/Interface/Interface_BitMap.cxx b/src/Interface/Interface_BitMap.cxx index db011deb1e..10af42ec9e 100644 --- a/src/Interface/Interface_BitMap.cxx +++ b/src/Interface/Interface_BitMap.cxx @@ -13,7 +13,6 @@ #include -#include #include Interface_BitMap::Interface_BitMap() diff --git a/src/Interface/Interface_BitMap.hxx b/src/Interface/Interface_BitMap.hxx index 8cbf2d4e33..fd21c3f588 100644 --- a/src/Interface/Interface_BitMap.hxx +++ b/src/Interface/Interface_BitMap.hxx @@ -24,8 +24,6 @@ #include #include #include -#include -#include //! A bit map simply allows to associate a boolean flag to each diff --git a/src/Interface/Interface_Category.cxx b/src/Interface/Interface_Category.cxx index 01abd9221b..05c3060aac 100644 --- a/src/Interface/Interface_Category.cxx +++ b/src/Interface/Interface_Category.cxx @@ -15,12 +15,10 @@ #include #include #include -#include #include #include #include #include -#include #include static int THE_Interface_Category_init = 0; diff --git a/src/Interface/Interface_Category.hxx b/src/Interface/Interface_Category.hxx index 2329504d53..fb39b5d59a 100644 --- a/src/Interface/Interface_Category.hxx +++ b/src/Interface/Interface_Category.hxx @@ -23,7 +23,6 @@ #include #include -#include #include class Interface_Protocol; diff --git a/src/Interface/Interface_Check.hxx b/src/Interface/Interface_Check.hxx index 5b8d1b4112..9a0395b5cd 100644 --- a/src/Interface/Interface_Check.hxx +++ b/src/Interface/Interface_Check.hxx @@ -18,12 +18,9 @@ #define _Interface_Check_HeaderFile #include -#include #include #include -#include -#include #include #include class Message_Msg; diff --git a/src/Interface/Interface_CheckIterator.hxx b/src/Interface/Interface_CheckIterator.hxx index a4f46f7172..1ac7fa4331 100644 --- a/src/Interface/Interface_CheckIterator.hxx +++ b/src/Interface/Interface_CheckIterator.hxx @@ -26,7 +26,6 @@ #include #include #include -#include #include #include class Interface_InterfaceModel; diff --git a/src/Interface/Interface_CheckTool.cxx b/src/Interface/Interface_CheckTool.cxx index 52f3c3e154..fb44054c48 100644 --- a/src/Interface/Interface_CheckTool.cxx +++ b/src/Interface/Interface_CheckTool.cxx @@ -18,7 +18,6 @@ #include #include #include -#include #include #include #include diff --git a/src/Interface/Interface_CheckTool.hxx b/src/Interface/Interface_CheckTool.hxx index bf999bc913..f948e371df 100644 --- a/src/Interface/Interface_CheckTool.hxx +++ b/src/Interface/Interface_CheckTool.hxx @@ -23,7 +23,6 @@ #include #include -#include class Interface_GTool; class Interface_InterfaceModel; class Interface_Protocol; diff --git a/src/Interface/Interface_CopyControl.hxx b/src/Interface/Interface_CopyControl.hxx index 8d505c2ed9..510112e068 100644 --- a/src/Interface/Interface_CopyControl.hxx +++ b/src/Interface/Interface_CopyControl.hxx @@ -21,7 +21,6 @@ #include #include -#include class Interface_CopyControl; diff --git a/src/Interface/Interface_CopyMap.hxx b/src/Interface/Interface_CopyMap.hxx index 02c3664002..61ea5b9149 100644 --- a/src/Interface/Interface_CopyMap.hxx +++ b/src/Interface/Interface_CopyMap.hxx @@ -22,7 +22,6 @@ #include #include -#include class Interface_InterfaceModel; class Standard_Transient; diff --git a/src/Interface/Interface_CopyTool.hxx b/src/Interface/Interface_CopyTool.hxx index a17758bb25..984129c341 100644 --- a/src/Interface/Interface_CopyTool.hxx +++ b/src/Interface/Interface_CopyTool.hxx @@ -25,7 +25,6 @@ #include #include #include -#include class Interface_InterfaceModel; class Interface_CopyControl; class Interface_CopyMap; diff --git a/src/Interface/Interface_EntityCluster.cxx b/src/Interface/Interface_EntityCluster.cxx index 244bbea5e4..45fdfd659e 100644 --- a/src/Interface/Interface_EntityCluster.cxx +++ b/src/Interface/Interface_EntityCluster.cxx @@ -14,7 +14,6 @@ #include #include -#include #include #include #include diff --git a/src/Interface/Interface_EntityCluster.hxx b/src/Interface/Interface_EntityCluster.hxx index 6b16440423..95266227f2 100644 --- a/src/Interface/Interface_EntityCluster.hxx +++ b/src/Interface/Interface_EntityCluster.hxx @@ -21,7 +21,6 @@ #include #include -#include #include class Interface_EntityIterator; diff --git a/src/Interface/Interface_EntityList.hxx b/src/Interface/Interface_EntityList.hxx index ef2c037fdc..475854a8d1 100644 --- a/src/Interface/Interface_EntityList.hxx +++ b/src/Interface/Interface_EntityList.hxx @@ -22,7 +22,6 @@ #include #include -#include #include class Interface_EntityIterator; diff --git a/src/Interface/Interface_FileParameter.hxx b/src/Interface/Interface_FileParameter.hxx index b3b3b10eae..d806f909f1 100644 --- a/src/Interface/Interface_FileParameter.hxx +++ b/src/Interface/Interface_FileParameter.hxx @@ -23,8 +23,6 @@ #include #include -#include -#include class TCollection_AsciiString; diff --git a/src/Interface/Interface_FileReaderData.cxx b/src/Interface/Interface_FileReaderData.cxx index e7558a87d6..810e298500 100644 --- a/src/Interface/Interface_FileReaderData.cxx +++ b/src/Interface/Interface_FileReaderData.cxx @@ -21,8 +21,6 @@ #include #include #include -#include -#include #include #include #include diff --git a/src/Interface/Interface_FileReaderData.hxx b/src/Interface/Interface_FileReaderData.hxx index 2cd9e2f741..6f12feab0a 100644 --- a/src/Interface/Interface_FileReaderData.hxx +++ b/src/Interface/Interface_FileReaderData.hxx @@ -18,7 +18,6 @@ #define _Interface_FileReaderData_HeaderFile #include -#include #include #include @@ -26,8 +25,6 @@ #include #include #include -#include -#include class Interface_ParamSet; class TCollection_AsciiString; class Interface_FileParameter; diff --git a/src/Interface/Interface_FileReaderTool.cxx b/src/Interface/Interface_FileReaderTool.cxx index 1351fd6fb6..a2504d05a1 100644 --- a/src/Interface/Interface_FileReaderTool.cxx +++ b/src/Interface/Interface_FileReaderTool.cxx @@ -19,7 +19,6 @@ #include #include #include -#include #include #include #include @@ -27,14 +26,9 @@ #include #include #include -#include -#include #include #include -#include -#include #include -#include #ifdef _WIN32 #include diff --git a/src/Interface/Interface_FileReaderTool.hxx b/src/Interface/Interface_FileReaderTool.hxx index d870332370..a3fb805342 100644 --- a/src/Interface/Interface_FileReaderTool.hxx +++ b/src/Interface/Interface_FileReaderTool.hxx @@ -22,7 +22,6 @@ #include #include -#include #include class Interface_Protocol; class Interface_FileReaderData; diff --git a/src/Interface/Interface_FloatWriter.cxx b/src/Interface/Interface_FloatWriter.cxx index 41745731b8..e4d20b1eae 100644 --- a/src/Interface/Interface_FloatWriter.cxx +++ b/src/Interface/Interface_FloatWriter.cxx @@ -15,7 +15,6 @@ #include -#include Interface_FloatWriter::Interface_FloatWriter (const Standard_Integer chars) { SetDefaults(chars); diff --git a/src/Interface/Interface_FloatWriter.hxx b/src/Interface/Interface_FloatWriter.hxx index d7dcf8cbe4..bd092a068c 100644 --- a/src/Interface/Interface_FloatWriter.hxx +++ b/src/Interface/Interface_FloatWriter.hxx @@ -21,11 +21,8 @@ #include #include -#include #include #include -#include -#include //! This class converts a floating number (Real) to a string diff --git a/src/Interface/Interface_GTool.hxx b/src/Interface/Interface_GTool.hxx index 4e63498dcf..8448a7329a 100644 --- a/src/Interface/Interface_GTool.hxx +++ b/src/Interface/Interface_GTool.hxx @@ -25,8 +25,6 @@ #include #include #include -#include -#include class Interface_Protocol; class Interface_SignType; class Interface_InterfaceModel; diff --git a/src/Interface/Interface_GeneralLib.hxx b/src/Interface/Interface_GeneralLib.hxx index c7c0bf5112..c84a9d4d79 100644 --- a/src/Interface/Interface_GeneralLib.hxx +++ b/src/Interface/Interface_GeneralLib.hxx @@ -21,7 +21,6 @@ #include #include -#include #include class Interface_NodeOfGeneralLib; class Standard_NoSuchObject; diff --git a/src/Interface/Interface_GeneralModule.hxx b/src/Interface/Interface_GeneralModule.hxx index cc37b6b997..29efef7d43 100644 --- a/src/Interface/Interface_GeneralModule.hxx +++ b/src/Interface/Interface_GeneralModule.hxx @@ -22,7 +22,6 @@ #include #include -#include class Interface_InterfaceModel; class Interface_EntityIterator; class Interface_ShareTool; diff --git a/src/Interface/Interface_Graph.cxx b/src/Interface/Interface_Graph.cxx index c1debc0b87..7d6412474e 100644 --- a/src/Interface/Interface_Graph.cxx +++ b/src/Interface/Interface_Graph.cxx @@ -14,7 +14,6 @@ #include #include -#include #include #include #include @@ -25,7 +24,6 @@ #include #include #include -#include #include #include diff --git a/src/Interface/Interface_GraphContent.cxx b/src/Interface/Interface_GraphContent.cxx index 22c17f21ff..c0a16a91b0 100644 --- a/src/Interface/Interface_GraphContent.cxx +++ b/src/Interface/Interface_GraphContent.cxx @@ -12,11 +12,9 @@ // commercial license or contractual agreement. -#include #include #include #include -#include #include Interface_GraphContent::Interface_GraphContent () { } diff --git a/src/Interface/Interface_HGraph.cxx b/src/Interface/Interface_HGraph.cxx index ddd64df76c..e447e02701 100644 --- a/src/Interface/Interface_HGraph.cxx +++ b/src/Interface/Interface_HGraph.cxx @@ -12,13 +12,10 @@ // commercial license or contractual agreement. -#include -#include #include #include #include #include -#include #include IMPLEMENT_STANDARD_RTTIEXT(Interface_HGraph,Standard_Transient) diff --git a/src/Interface/Interface_HGraph.hxx b/src/Interface/Interface_HGraph.hxx index b4c9fd14bc..995b79b1a6 100644 --- a/src/Interface/Interface_HGraph.hxx +++ b/src/Interface/Interface_HGraph.hxx @@ -22,7 +22,6 @@ #include #include -#include class Interface_InterfaceModel; class Interface_GeneralLib; class Interface_Protocol; diff --git a/src/Interface/Interface_HSequenceOfCheck.hxx b/src/Interface/Interface_HSequenceOfCheck.hxx index 0b3bf783e2..a3b63ee53a 100644 --- a/src/Interface/Interface_HSequenceOfCheck.hxx +++ b/src/Interface/Interface_HSequenceOfCheck.hxx @@ -17,7 +17,6 @@ #ifndef Interface_HSequenceOfCheck_HeaderFile #define Interface_HSequenceOfCheck_HeaderFile -#include #include #include diff --git a/src/Interface/Interface_InterfaceModel.cxx b/src/Interface/Interface_InterfaceModel.cxx index 968ba241e8..184743ce32 100644 --- a/src/Interface/Interface_InterfaceModel.cxx +++ b/src/Interface/Interface_InterfaceModel.cxx @@ -19,7 +19,6 @@ #include #include #include -#include #include #include #include @@ -27,12 +26,9 @@ #include #include #include -#include -#include #include #include #include -#include #include #include diff --git a/src/Interface/Interface_InterfaceModel.hxx b/src/Interface/Interface_InterfaceModel.hxx index 9f01c67464..4cec14469e 100644 --- a/src/Interface/Interface_InterfaceModel.hxx +++ b/src/Interface/Interface_InterfaceModel.hxx @@ -21,11 +21,8 @@ #include #include -#include #include #include -#include -#include #include #include class Interface_Check; diff --git a/src/Interface/Interface_MSG.cxx b/src/Interface/Interface_MSG.cxx index 4cb9b6bf24..55398cf2b1 100644 --- a/src/Interface/Interface_MSG.cxx +++ b/src/Interface/Interface_MSG.cxx @@ -18,7 +18,6 @@ #include #include #include -#include #include #include diff --git a/src/Interface/Interface_MSG.hxx b/src/Interface/Interface_MSG.hxx index d78b81f1fe..e46009de8d 100644 --- a/src/Interface/Interface_MSG.hxx +++ b/src/Interface/Interface_MSG.hxx @@ -21,13 +21,10 @@ #include #include -#include #include -#include #include #include #include -#include //! This class gives a set of functions to manage and use a list diff --git a/src/Interface/Interface_MapAsciiStringHasher.hxx b/src/Interface/Interface_MapAsciiStringHasher.hxx index 295b8de013..ee0d52e292 100644 --- a/src/Interface/Interface_MapAsciiStringHasher.hxx +++ b/src/Interface/Interface_MapAsciiStringHasher.hxx @@ -20,7 +20,6 @@ #include #include -#include #include class TCollection_AsciiString; diff --git a/src/Interface/Interface_ParamList.cxx b/src/Interface/Interface_ParamList.cxx index b8eb61e207..dc8aed3f41 100644 --- a/src/Interface/Interface_ParamList.cxx +++ b/src/Interface/Interface_ParamList.cxx @@ -17,8 +17,6 @@ #include #include #include -#include -#include #include IMPLEMENT_STANDARD_RTTIEXT(Interface_ParamList,Standard_Transient) diff --git a/src/Interface/Interface_ParamList.hxx b/src/Interface/Interface_ParamList.hxx index 47d15f2ad3..ae9e2b35f9 100644 --- a/src/Interface/Interface_ParamList.hxx +++ b/src/Interface/Interface_ParamList.hxx @@ -17,7 +17,6 @@ #define _Interface_ParamList_HeaderFile #include -#include #include #include diff --git a/src/Interface/Interface_ParamSet.cxx b/src/Interface/Interface_ParamSet.cxx index 3593f09512..20fc428713 100644 --- a/src/Interface/Interface_ParamSet.cxx +++ b/src/Interface/Interface_ParamSet.cxx @@ -16,7 +16,6 @@ #include #include #include -#include #include IMPLEMENT_STANDARD_RTTIEXT(Interface_ParamSet,Standard_Transient) diff --git a/src/Interface/Interface_ParamSet.hxx b/src/Interface/Interface_ParamSet.hxx index f31aade24c..e8b3c1802f 100644 --- a/src/Interface/Interface_ParamSet.hxx +++ b/src/Interface/Interface_ParamSet.hxx @@ -23,7 +23,6 @@ #include #include #include -#include #include class Interface_ParamList; class Interface_FileParameter; diff --git a/src/Interface/Interface_Protocol.cxx b/src/Interface/Interface_Protocol.cxx index 14f9e96eb3..ecd2ee68f4 100644 --- a/src/Interface/Interface_Protocol.cxx +++ b/src/Interface/Interface_Protocol.cxx @@ -14,7 +14,6 @@ #include #include -#include #include #include #include diff --git a/src/Interface/Interface_Protocol.hxx b/src/Interface/Interface_Protocol.hxx index f12a73ea2a..c5e4bb658f 100644 --- a/src/Interface/Interface_Protocol.hxx +++ b/src/Interface/Interface_Protocol.hxx @@ -22,8 +22,6 @@ #include #include -#include -#include class Interface_Graph; class Interface_Check; class Interface_InterfaceModel; diff --git a/src/Interface/Interface_ReaderLib.hxx b/src/Interface/Interface_ReaderLib.hxx index 7d982d8e0b..2d6d090a84 100644 --- a/src/Interface/Interface_ReaderLib.hxx +++ b/src/Interface/Interface_ReaderLib.hxx @@ -21,7 +21,6 @@ #include #include -#include #include class Interface_NodeOfReaderLib; class Standard_NoSuchObject; diff --git a/src/Interface/Interface_ReaderModule.cxx b/src/Interface/Interface_ReaderModule.cxx index 3f78d34b0b..e6a0665b80 100644 --- a/src/Interface/Interface_ReaderModule.cxx +++ b/src/Interface/Interface_ReaderModule.cxx @@ -15,7 +15,6 @@ #include #include #include -#include #include #include diff --git a/src/Interface/Interface_ReaderModule.hxx b/src/Interface/Interface_ReaderModule.hxx index 73d15e706d..d124230266 100644 --- a/src/Interface/Interface_ReaderModule.hxx +++ b/src/Interface/Interface_ReaderModule.hxx @@ -22,7 +22,6 @@ #include #include -#include class Interface_FileReaderData; class Interface_Check; diff --git a/src/Interface/Interface_ReportEntity.hxx b/src/Interface/Interface_ReportEntity.hxx index dac7ceda16..6180d5e624 100644 --- a/src/Interface/Interface_ReportEntity.hxx +++ b/src/Interface/Interface_ReportEntity.hxx @@ -21,7 +21,6 @@ #include #include -#include class Interface_Check; diff --git a/src/Interface/Interface_STAT.hxx b/src/Interface/Interface_STAT.hxx index 28ce8af414..ef406156f8 100644 --- a/src/Interface/Interface_STAT.hxx +++ b/src/Interface/Interface_STAT.hxx @@ -25,9 +25,7 @@ #include #include #include -#include #include -#include class TCollection_HAsciiString; diff --git a/src/Interface/Interface_ShareFlags.cxx b/src/Interface/Interface_ShareFlags.cxx index 6850aee518..56e33a3893 100644 --- a/src/Interface/Interface_ShareFlags.cxx +++ b/src/Interface/Interface_ShareFlags.cxx @@ -13,17 +13,14 @@ #include -#include #include #include #include #include -#include #include #include #include #include -#include #include Interface_ShareFlags::Interface_ShareFlags diff --git a/src/Interface/Interface_ShareFlags.hxx b/src/Interface/Interface_ShareFlags.hxx index 288a314b1f..007bf21787 100644 --- a/src/Interface/Interface_ShareFlags.hxx +++ b/src/Interface/Interface_ShareFlags.hxx @@ -23,7 +23,6 @@ #include #include -#include #include class Interface_InterfaceModel; class Interface_GeneralLib; diff --git a/src/Interface/Interface_ShareTool.cxx b/src/Interface/Interface_ShareTool.cxx index 018c5460b7..730420954d 100644 --- a/src/Interface/Interface_ShareTool.cxx +++ b/src/Interface/Interface_ShareTool.cxx @@ -13,18 +13,13 @@ #include -#include -#include -#include #include #include #include #include -#include #include #include #include -#include #include #include #include diff --git a/src/Interface/Interface_SignLabel.hxx b/src/Interface/Interface_SignLabel.hxx index 9f754d88d1..060d75de5d 100644 --- a/src/Interface/Interface_SignLabel.hxx +++ b/src/Interface/Interface_SignLabel.hxx @@ -21,7 +21,6 @@ #include #include -#include class TCollection_AsciiString; class Standard_Transient; diff --git a/src/Interface/Interface_SignType.hxx b/src/Interface/Interface_SignType.hxx index 8b685036a3..75a8ba51df 100644 --- a/src/Interface/Interface_SignType.hxx +++ b/src/Interface/Interface_SignType.hxx @@ -21,7 +21,6 @@ #include #include -#include class TCollection_AsciiString; class Standard_Transient; class Interface_InterfaceModel; diff --git a/src/Interface/Interface_Static.cxx b/src/Interface/Interface_Static.cxx index 6cd62e1093..cbed11b7ba 100644 --- a/src/Interface/Interface_Static.cxx +++ b/src/Interface/Interface_Static.cxx @@ -13,7 +13,6 @@ #include -#include #include #include #include diff --git a/src/Interface/Interface_Static.hxx b/src/Interface/Interface_Static.hxx index 6a325a0014..8c001e018f 100644 --- a/src/Interface/Interface_Static.hxx +++ b/src/Interface/Interface_Static.hxx @@ -18,19 +18,11 @@ #define _Interface_Static_HeaderFile #include -#include -#include -#include -#include #include #include -#include #include -#include #include -#include -#include #include class TCollection_HAsciiString; diff --git a/src/Interface/Interface_StaticStandards.cxx b/src/Interface/Interface_StaticStandards.cxx index 0561f9bc3a..0a3cfe602e 100644 --- a/src/Interface/Interface_StaticStandards.cxx +++ b/src/Interface/Interface_StaticStandards.cxx @@ -14,10 +14,6 @@ #include #include -#include -#include - -#include #include "../XSMessage/XSMessage_XSTEP_us.pxx" diff --git a/src/Interface/Interface_TypedValue.cxx b/src/Interface/Interface_TypedValue.cxx index b83d66d20d..f08ef85daf 100644 --- a/src/Interface/Interface_TypedValue.cxx +++ b/src/Interface/Interface_TypedValue.cxx @@ -12,12 +12,10 @@ // commercial license or contractual agreement. -#include #include #include #include #include -#include #include IMPLEMENT_STANDARD_RTTIEXT(Interface_TypedValue,MoniTool_TypedValue) diff --git a/src/Interface/Interface_TypedValue.hxx b/src/Interface/Interface_TypedValue.hxx index 8f86e4840b..208f8c8e3b 100644 --- a/src/Interface/Interface_TypedValue.hxx +++ b/src/Interface/Interface_TypedValue.hxx @@ -18,13 +18,8 @@ #define _Interface_TypedValue_HeaderFile #include -#include -#include -#include -#include #include -#include #include #include class TCollection_HAsciiString; diff --git a/src/Interface/Interface_UndefinedContent.cxx b/src/Interface/Interface_UndefinedContent.cxx index f2f0bebdbb..dd43ebf428 100644 --- a/src/Interface/Interface_UndefinedContent.cxx +++ b/src/Interface/Interface_UndefinedContent.cxx @@ -13,11 +13,8 @@ #include -#include -#include #include #include -#include #include #include #include diff --git a/src/Interface/Interface_UndefinedContent.hxx b/src/Interface/Interface_UndefinedContent.hxx index f3b578df3d..6c34b9e433 100644 --- a/src/Interface/Interface_UndefinedContent.hxx +++ b/src/Interface/Interface_UndefinedContent.hxx @@ -25,7 +25,6 @@ #include #include #include -#include #include class TCollection_HAsciiString; class Interface_CopyTool; diff --git a/src/Interface/Interface_VectorOfFileParameter.hxx b/src/Interface/Interface_VectorOfFileParameter.hxx index a695553202..1210fd4e05 100644 --- a/src/Interface/Interface_VectorOfFileParameter.hxx +++ b/src/Interface/Interface_VectorOfFileParameter.hxx @@ -16,7 +16,6 @@ #ifndef Interface_VectorOfFileParameter_HeaderFile #define Interface_VectorOfFileParameter_HeaderFile -#include #include #include diff --git a/src/Intf/Intf_Interference.cxx b/src/Intf/Intf_Interference.cxx index caf0214c1f..4d5cce8cbc 100644 --- a/src/Intf/Intf_Interference.cxx +++ b/src/Intf/Intf_Interference.cxx @@ -15,13 +15,10 @@ // commercial license or contractual agreement. -#include -#include #include #include #include #include -#include //======================================================================= //function : Intf_Interference diff --git a/src/Intf/Intf_Interference.hxx b/src/Intf/Intf_Interference.hxx index bd1eddaa49..b4e58317ed 100644 --- a/src/Intf/Intf_Interference.hxx +++ b/src/Intf/Intf_Interference.hxx @@ -25,8 +25,6 @@ #include #include #include -#include -#include class Intf_SectionPoint; class Intf_SectionLine; class Intf_TangentZone; diff --git a/src/Intf/Intf_InterferencePolygon2d.cxx b/src/Intf/Intf_InterferencePolygon2d.cxx index e553c45eae..8a51000ee9 100644 --- a/src/Intf/Intf_InterferencePolygon2d.cxx +++ b/src/Intf/Intf_InterferencePolygon2d.cxx @@ -16,16 +16,12 @@ // commercial license or contractual agreement. -#include -#include #include #include #include #include -#include #include #include -#include #include // Angular precision (sinus) below that value two right segments diff --git a/src/Intf/Intf_InterferencePolygon2d.hxx b/src/Intf/Intf_InterferencePolygon2d.hxx index 52bfcd5ebe..1bcdaad802 100644 --- a/src/Intf/Intf_InterferencePolygon2d.hxx +++ b/src/Intf/Intf_InterferencePolygon2d.hxx @@ -22,7 +22,6 @@ #include #include -#include #include class Intf_Polygon2d; class gp_Pnt2d; diff --git a/src/Intf/Intf_Polygon2d.cxx b/src/Intf/Intf_Polygon2d.cxx index 708cdaf6f1..f1381bdfd2 100644 --- a/src/Intf/Intf_Polygon2d.cxx +++ b/src/Intf/Intf_Polygon2d.cxx @@ -14,10 +14,7 @@ // commercial license or contractual agreement. -#include -#include #include -#include //======================================================================= //function : Closed diff --git a/src/Intf/Intf_Polygon2d.hxx b/src/Intf/Intf_Polygon2d.hxx index 7f36ae5cae..91de1176b4 100644 --- a/src/Intf/Intf_Polygon2d.hxx +++ b/src/Intf/Intf_Polygon2d.hxx @@ -22,8 +22,6 @@ #include #include -#include -#include class gp_Pnt2d; diff --git a/src/Intf/Intf_SectionLine.cxx b/src/Intf/Intf_SectionLine.cxx index 301e55bb90..1af8df4891 100644 --- a/src/Intf/Intf_SectionLine.cxx +++ b/src/Intf/Intf_SectionLine.cxx @@ -17,7 +17,6 @@ #include #include -#include //======================================================================= //function : Intf_SectionLine diff --git a/src/Intf/Intf_SectionLine.hxx b/src/Intf/Intf_SectionLine.hxx index 1cf90641ae..b7dda686bc 100644 --- a/src/Intf/Intf_SectionLine.hxx +++ b/src/Intf/Intf_SectionLine.hxx @@ -23,7 +23,6 @@ #include #include -#include class Intf_SectionPoint; diff --git a/src/Intf/Intf_SectionPoint.cxx b/src/Intf/Intf_SectionPoint.cxx index a200dc9ba6..f253b45086 100644 --- a/src/Intf/Intf_SectionPoint.cxx +++ b/src/Intf/Intf_SectionPoint.cxx @@ -15,7 +15,6 @@ // commercial license or contractual agreement. -#include #include #include diff --git a/src/Intf/Intf_SectionPoint.hxx b/src/Intf/Intf_SectionPoint.hxx index 85e09626a5..a45ed59fde 100644 --- a/src/Intf/Intf_SectionPoint.hxx +++ b/src/Intf/Intf_SectionPoint.hxx @@ -19,13 +19,10 @@ #include #include -#include #include #include #include -#include -#include class gp_Pnt2d; diff --git a/src/Intf/Intf_TangentZone.cxx b/src/Intf/Intf_TangentZone.cxx index e57758d67d..4d0caf51ea 100644 --- a/src/Intf/Intf_TangentZone.cxx +++ b/src/Intf/Intf_TangentZone.cxx @@ -15,9 +15,7 @@ // commercial license or contractual agreement. -#include #include -#include #define DEBUG_TANGENTZONE 0 //======================================================================= diff --git a/src/Intf/Intf_TangentZone.hxx b/src/Intf/Intf_TangentZone.hxx index df01486988..0627dc148b 100644 --- a/src/Intf/Intf_TangentZone.hxx +++ b/src/Intf/Intf_TangentZone.hxx @@ -22,8 +22,6 @@ #include #include -#include -#include #include class Intf_SectionPoint; diff --git a/src/Intf/Intf_Tool.hxx b/src/Intf/Intf_Tool.hxx index e8179a3f64..7d520eb062 100644 --- a/src/Intf/Intf_Tool.hxx +++ b/src/Intf/Intf_Tool.hxx @@ -19,10 +19,8 @@ #include #include -#include #include -#include class gp_Lin2d; class Bnd_Box2d; class gp_Hypr2d; diff --git a/src/Intrv/Intrv_Interval.hxx b/src/Intrv/Intrv_Interval.hxx index e1abc7bc09..4881cbd012 100644 --- a/src/Intrv/Intrv_Interval.hxx +++ b/src/Intrv/Intrv_Interval.hxx @@ -21,9 +21,7 @@ #include #include -#include #include -#include #include diff --git a/src/Intrv/Intrv_Intervals.cxx b/src/Intrv/Intrv_Intervals.cxx index f625ea7ff5..9e4468e3b0 100644 --- a/src/Intrv/Intrv_Intervals.cxx +++ b/src/Intrv/Intrv_Intervals.cxx @@ -19,9 +19,7 @@ #endif -#include #include -#include // **---------**** Other // ***-----* IsBefore diff --git a/src/Intrv/Intrv_Intervals.hxx b/src/Intrv/Intrv_Intervals.hxx index 640f0dce6c..e15f88c1ff 100644 --- a/src/Intrv/Intrv_Intervals.hxx +++ b/src/Intrv/Intrv_Intervals.hxx @@ -22,7 +22,6 @@ #include #include -#include class Intrv_Interval; diff --git a/src/LDOM/LDOMBasicString.hxx b/src/LDOM/LDOMBasicString.hxx index 6a08d0fdc1..496f967709 100644 --- a/src/LDOM/LDOMBasicString.hxx +++ b/src/LDOM/LDOMBasicString.hxx @@ -16,7 +16,6 @@ #ifndef LDOMBasicString_HeaderFile #define LDOMBasicString_HeaderFile -#include #include #include #include diff --git a/src/LDOM/LDOMParser.cxx b/src/LDOM/LDOMParser.cxx index e34712e852..9137f8f832 100644 --- a/src/LDOM/LDOMParser.cxx +++ b/src/LDOM/LDOMParser.cxx @@ -26,7 +26,6 @@ #include #include -#include #ifdef _MSC_VER #include #else diff --git a/src/LDOM/LDOM_BasicNode.cxx b/src/LDOM/LDOM_BasicNode.cxx index 24f4d6aeed..7a5a00b30e 100644 --- a/src/LDOM/LDOM_BasicNode.cxx +++ b/src/LDOM/LDOM_BasicNode.cxx @@ -14,8 +14,9 @@ // commercial license or contractual agreement. #include -#include + #include +#include #include //======================================================================= diff --git a/src/LDOM/LDOM_CharacterData.cxx b/src/LDOM/LDOM_CharacterData.cxx index 2dfa5b8aae..4046e50996 100644 --- a/src/LDOM/LDOM_CharacterData.cxx +++ b/src/LDOM/LDOM_CharacterData.cxx @@ -15,7 +15,6 @@ #include #include -#include //======================================================================= //function : LDOM_CharacterData diff --git a/src/LDOM/LDOM_Document.hxx b/src/LDOM/LDOM_Document.hxx index ae7a920ece..a0d721843c 100644 --- a/src/LDOM/LDOM_Document.hxx +++ b/src/LDOM/LDOM_Document.hxx @@ -17,7 +17,6 @@ #define LDOM_Document_HeaderFile #include -#include #include #include diff --git a/src/LDOM/LDOM_Element.cxx b/src/LDOM/LDOM_Element.cxx index b3efa1698b..ab2b6eef0d 100644 --- a/src/LDOM/LDOM_Element.cxx +++ b/src/LDOM/LDOM_Element.cxx @@ -13,7 +13,6 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -#include #include #include #include diff --git a/src/LDOM/LDOM_LDOMImplementation.hxx b/src/LDOM/LDOM_LDOMImplementation.hxx index 85f4f51996..eae1d591a0 100644 --- a/src/LDOM/LDOM_LDOMImplementation.hxx +++ b/src/LDOM/LDOM_LDOMImplementation.hxx @@ -16,7 +16,6 @@ #ifndef LDOM_LDOMImplementation_HeaderFile #define LDOM_LDOMImplementation_HeaderFile -#include #include class LDOM_DocumentType; diff --git a/src/LDOM/LDOM_Node.cxx b/src/LDOM/LDOM_Node.cxx index c32291bf3b..c9be0bd549 100644 --- a/src/LDOM/LDOM_Node.cxx +++ b/src/LDOM/LDOM_Node.cxx @@ -13,7 +13,6 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -#include #include #include #include diff --git a/src/LDOM/LDOM_Node.hxx b/src/LDOM/LDOM_Node.hxx index 0c247558df..c15b484acd 100644 --- a/src/LDOM/LDOM_Node.hxx +++ b/src/LDOM/LDOM_Node.hxx @@ -19,8 +19,6 @@ #ifndef LDOM_Node_HeaderFile #define LDOM_Node_HeaderFile -#include -#include #include #include diff --git a/src/LDOM/LDOM_OSStream.hxx b/src/LDOM/LDOM_OSStream.hxx index 511c683ff0..f26d575b91 100644 --- a/src/LDOM/LDOM_OSStream.hxx +++ b/src/LDOM/LDOM_OSStream.hxx @@ -19,9 +19,7 @@ #include #include #include -#include -#include #include /* EOF */ //! Class LDOM_SBuffer inherits std::streambuf and diff --git a/src/LDOM/LDOM_XmlWriter.hxx b/src/LDOM/LDOM_XmlWriter.hxx index 4ef47d4ae8..62af4239a7 100644 --- a/src/LDOM/LDOM_XmlWriter.hxx +++ b/src/LDOM/LDOM_XmlWriter.hxx @@ -18,7 +18,6 @@ #include #include -#include class LDOM_Document; class LDOM_Node; diff --git a/src/LProp/LProp_AnalyticCurInf.hxx b/src/LProp/LProp_AnalyticCurInf.hxx index 7d86305779..100a99909b 100644 --- a/src/LProp/LProp_AnalyticCurInf.hxx +++ b/src/LProp/LProp_AnalyticCurInf.hxx @@ -19,10 +19,8 @@ #include #include -#include #include -#include class LProp_CurAndInf; diff --git a/src/LProp/LProp_CurAndInf.cxx b/src/LProp/LProp_CurAndInf.cxx index 811e6c3ba4..2aed800818 100644 --- a/src/LProp/LProp_CurAndInf.cxx +++ b/src/LProp/LProp_CurAndInf.cxx @@ -15,7 +15,6 @@ // commercial license or contractual agreement. -#include #include #include diff --git a/src/LProp/LProp_CurAndInf.hxx b/src/LProp/LProp_CurAndInf.hxx index 95892b9dfd..b091ee92f2 100644 --- a/src/LProp/LProp_CurAndInf.hxx +++ b/src/LProp/LProp_CurAndInf.hxx @@ -23,9 +23,7 @@ #include #include -#include #include -#include #include diff --git a/src/LProp3d/LProp3d_SurfaceTool.cxx b/src/LProp3d/LProp3d_SurfaceTool.cxx index 5208108b28..964afe225b 100644 --- a/src/LProp3d/LProp3d_SurfaceTool.cxx +++ b/src/LProp3d/LProp3d_SurfaceTool.cxx @@ -15,7 +15,6 @@ // commercial license or contractual agreement. -#include #include #include #include diff --git a/src/Law/Law.cxx b/src/Law/Law.cxx index b3d2b231cb..0623d1792c 100644 --- a/src/Law/Law.cxx +++ b/src/Law/Law.cxx @@ -23,7 +23,6 @@ #include #include #include -#include #include #include #include diff --git a/src/Law/Law_BSpFunc.cxx b/src/Law/Law_BSpFunc.cxx index a9ceada9aa..883f09cf95 100644 --- a/src/Law/Law_BSpFunc.cxx +++ b/src/Law/Law_BSpFunc.cxx @@ -22,7 +22,6 @@ #include #include #include -#include #include #include diff --git a/src/Law/Law_BSpFunc.hxx b/src/Law/Law_BSpFunc.hxx index ae3c410d58..f07103ba39 100644 --- a/src/Law/Law_BSpFunc.hxx +++ b/src/Law/Law_BSpFunc.hxx @@ -20,7 +20,6 @@ #include #include -#include #include #include #include diff --git a/src/Law/Law_BSpline.hxx b/src/Law/Law_BSpline.hxx index 268da912c6..ce17f97e8c 100644 --- a/src/Law/Law_BSpline.hxx +++ b/src/Law/Law_BSpline.hxx @@ -20,7 +20,6 @@ #include #include -#include #include #include #include @@ -29,7 +28,6 @@ #include #include #include -#include class Law_BSpline; diff --git a/src/Law/Law_BSplineKnotSplitting.cxx b/src/Law/Law_BSplineKnotSplitting.cxx index 192b94e572..38a24a7068 100644 --- a/src/Law/Law_BSplineKnotSplitting.cxx +++ b/src/Law/Law_BSplineKnotSplitting.cxx @@ -18,7 +18,6 @@ #include #include #include -#include #include typedef TColStd_Array1OfInteger Array1OfInteger; diff --git a/src/Law/Law_Composite.cxx b/src/Law/Law_Composite.cxx index 81aa0046f6..a02a415af2 100644 --- a/src/Law/Law_Composite.cxx +++ b/src/Law/Law_Composite.cxx @@ -20,9 +20,7 @@ #include #include #include -#include #include -#include #include #include diff --git a/src/Law/Law_Composite.hxx b/src/Law/Law_Composite.hxx index 2a7d0f0a6d..cafbeaca2d 100644 --- a/src/Law/Law_Composite.hxx +++ b/src/Law/Law_Composite.hxx @@ -20,9 +20,7 @@ #include #include -#include #include -#include #include #include #include diff --git a/src/Law/Law_Constant.cxx b/src/Law/Law_Constant.cxx index 4176b2f3fa..5e53e5d027 100644 --- a/src/Law/Law_Constant.cxx +++ b/src/Law/Law_Constant.cxx @@ -18,7 +18,6 @@ #include #include -#include #include IMPLEMENT_STANDARD_RTTIEXT(Law_Constant,Law_Function) diff --git a/src/Law/Law_Function.cxx b/src/Law/Law_Function.cxx index 4d132f30a6..46c0bf80d1 100644 --- a/src/Law/Law_Function.cxx +++ b/src/Law/Law_Function.cxx @@ -14,7 +14,6 @@ #include -#include #include IMPLEMENT_STANDARD_RTTIEXT(Law_Function,Standard_Transient) \ No newline at end of file diff --git a/src/Law/Law_Interpol.cxx b/src/Law/Law_Interpol.cxx index 8b73cfcb7e..486d16edfe 100644 --- a/src/Law/Law_Interpol.cxx +++ b/src/Law/Law_Interpol.cxx @@ -15,7 +15,6 @@ // pmn -> modified 17/01/1996 : utilisation de Curve() et SetCurve() #include -#include #include #include #include diff --git a/src/Law/Law_Interpol.hxx b/src/Law/Law_Interpol.hxx index 6f3bd0e4a2..720e7eab6c 100644 --- a/src/Law/Law_Interpol.hxx +++ b/src/Law/Law_Interpol.hxx @@ -22,8 +22,6 @@ #include #include -#include -#include class Law_Interpol; diff --git a/src/Law/Law_Interpolate.cxx b/src/Law/Law_Interpolate.cxx index 1c1e222591..9c3b06fa5a 100644 --- a/src/Law/Law_Interpolate.cxx +++ b/src/Law/Law_Interpolate.cxx @@ -17,7 +17,6 @@ // Programme cree #include -#include #include #include #include diff --git a/src/Law/Law_Interpolate.hxx b/src/Law/Law_Interpolate.hxx index 26de82850d..b242f5e55b 100644 --- a/src/Law/Law_Interpolate.hxx +++ b/src/Law/Law_Interpolate.hxx @@ -21,9 +21,7 @@ #include #include -#include #include -#include #include #include class Law_BSpline; diff --git a/src/Law/Law_Linear.cxx b/src/Law/Law_Linear.cxx index 08de8e8601..42e5f98256 100644 --- a/src/Law/Law_Linear.cxx +++ b/src/Law/Law_Linear.cxx @@ -18,7 +18,6 @@ #include #include -#include #include IMPLEMENT_STANDARD_RTTIEXT(Law_Linear,Law_Function) diff --git a/src/Law/Law_Linear.hxx b/src/Law/Law_Linear.hxx index f86535d4aa..42da66985c 100644 --- a/src/Law/Law_Linear.hxx +++ b/src/Law/Law_Linear.hxx @@ -20,7 +20,6 @@ #include #include -#include #include #include #include diff --git a/src/Law/Law_S.hxx b/src/Law/Law_S.hxx index 9c53ad45f2..cbf41e16a4 100644 --- a/src/Law/Law_S.hxx +++ b/src/Law/Law_S.hxx @@ -21,7 +21,6 @@ #include #include -#include class Law_S; diff --git a/src/LocOpe/LocOpe_BuildShape.cxx b/src/LocOpe/LocOpe_BuildShape.cxx index 58f8004e51..1d0baf9012 100644 --- a/src/LocOpe/LocOpe_BuildShape.cxx +++ b/src/LocOpe/LocOpe_BuildShape.cxx @@ -22,7 +22,6 @@ #include #include #include -#include #include #include #include @@ -32,16 +31,14 @@ #include #include #include -#include #include #include #include -#include static void Add(const Standard_Integer, - TColStd_MapOfInteger&, - TopTools_IndexedMapOfShape&, - const TopTools_IndexedDataMapOfShapeListOfShape&); + TColStd_MapOfInteger&, + TopTools_IndexedMapOfShape&, + const TopTools_IndexedDataMapOfShapeListOfShape&); static void Propagate(const TopoDS_Shape&, // face TopoDS_Shape&, // shell diff --git a/src/LocOpe/LocOpe_BuildShape.hxx b/src/LocOpe/LocOpe_BuildShape.hxx index f61645da47..8858d91308 100644 --- a/src/LocOpe/LocOpe_BuildShape.hxx +++ b/src/LocOpe/LocOpe_BuildShape.hxx @@ -19,7 +19,6 @@ #include #include -#include #include #include diff --git a/src/LocOpe/LocOpe_BuildWires.cxx b/src/LocOpe/LocOpe_BuildWires.cxx index a4d8f263a4..0ba5c3f87b 100644 --- a/src/LocOpe/LocOpe_BuildWires.cxx +++ b/src/LocOpe/LocOpe_BuildWires.cxx @@ -30,7 +30,6 @@ #include #include #include -#include #include static Standard_Integer FindFirstEdge diff --git a/src/LocOpe/LocOpe_BuildWires.hxx b/src/LocOpe/LocOpe_BuildWires.hxx index fd572f6061..8f3d1354a0 100644 --- a/src/LocOpe/LocOpe_BuildWires.hxx +++ b/src/LocOpe/LocOpe_BuildWires.hxx @@ -21,7 +21,6 @@ #include #include -#include #include class LocOpe_WiresOnShape; diff --git a/src/LocOpe/LocOpe_CSIntersector.cxx b/src/LocOpe/LocOpe_CSIntersector.cxx index 6a568c3665..bc4ef66d29 100644 --- a/src/LocOpe/LocOpe_CSIntersector.cxx +++ b/src/LocOpe/LocOpe_CSIntersector.cxx @@ -19,7 +19,6 @@ #include #include #include -#include #include #include #include diff --git a/src/LocOpe/LocOpe_CSIntersector.hxx b/src/LocOpe/LocOpe_CSIntersector.hxx index cb5dcf0ec4..336440f17e 100644 --- a/src/LocOpe/LocOpe_CSIntersector.hxx +++ b/src/LocOpe/LocOpe_CSIntersector.hxx @@ -19,16 +19,12 @@ #include #include -#include -#include #include -#include #include #include #include #include -#include #include class LocOpe_PntFace; diff --git a/src/LocOpe/LocOpe_CurveShapeIntersector.cxx b/src/LocOpe/LocOpe_CurveShapeIntersector.cxx index 1f88d0e679..0ea50587b2 100644 --- a/src/LocOpe/LocOpe_CurveShapeIntersector.cxx +++ b/src/LocOpe/LocOpe_CurveShapeIntersector.cxx @@ -24,7 +24,6 @@ #include #include #include -#include #include #include diff --git a/src/LocOpe/LocOpe_CurveShapeIntersector.hxx b/src/LocOpe/LocOpe_CurveShapeIntersector.hxx index 10b9c94f81..3f36395e91 100644 --- a/src/LocOpe/LocOpe_CurveShapeIntersector.hxx +++ b/src/LocOpe/LocOpe_CurveShapeIntersector.hxx @@ -19,12 +19,9 @@ #include #include -#include -#include #include #include -#include #include class gp_Ax1; class TopoDS_Shape; diff --git a/src/LocOpe/LocOpe_DPrism.cxx b/src/LocOpe/LocOpe_DPrism.cxx index 6b3de646bb..3916654641 100644 --- a/src/LocOpe/LocOpe_DPrism.cxx +++ b/src/LocOpe/LocOpe_DPrism.cxx @@ -20,11 +20,9 @@ #include #include #include -#include #include #include #include -#include #include #include #include @@ -39,10 +37,7 @@ #include #include #include -#include #include -#include -#include #include #include #include @@ -51,10 +46,7 @@ #include #include #include -#include -#include #include -#include #include #include diff --git a/src/LocOpe/LocOpe_DPrism.hxx b/src/LocOpe/LocOpe_DPrism.hxx index 02a1091bdb..bfb21971de 100644 --- a/src/LocOpe/LocOpe_DPrism.hxx +++ b/src/LocOpe/LocOpe_DPrism.hxx @@ -26,10 +26,8 @@ #include #include #include -#include #include #include -#include #include class Geom_Curve; diff --git a/src/LocOpe/LocOpe_DataMapOfShapePnt.hxx b/src/LocOpe/LocOpe_DataMapOfShapePnt.hxx index c97ca23e15..89fb9ffb50 100644 --- a/src/LocOpe/LocOpe_DataMapOfShapePnt.hxx +++ b/src/LocOpe/LocOpe_DataMapOfShapePnt.hxx @@ -17,7 +17,6 @@ #ifndef LocOpe_DataMapOfShapePnt_HeaderFile #define LocOpe_DataMapOfShapePnt_HeaderFile -#include #include #include #include diff --git a/src/LocOpe/LocOpe_FindEdges.cxx b/src/LocOpe/LocOpe_FindEdges.cxx index 57af7d4240..3ebbaddbc3 100644 --- a/src/LocOpe/LocOpe_FindEdges.cxx +++ b/src/LocOpe/LocOpe_FindEdges.cxx @@ -26,9 +26,6 @@ #include #include #include -#include -#include -#include #include #include #include diff --git a/src/LocOpe/LocOpe_FindEdges.hxx b/src/LocOpe/LocOpe_FindEdges.hxx index c0b8cfd21c..787ae4f5a8 100644 --- a/src/LocOpe/LocOpe_FindEdges.hxx +++ b/src/LocOpe/LocOpe_FindEdges.hxx @@ -19,12 +19,8 @@ #include #include -#include -#include -#include #include -#include class TopoDS_Edge; diff --git a/src/LocOpe/LocOpe_FindEdgesInFace.cxx b/src/LocOpe/LocOpe_FindEdgesInFace.cxx index 98b2061675..4425e8a849 100644 --- a/src/LocOpe/LocOpe_FindEdgesInFace.cxx +++ b/src/LocOpe/LocOpe_FindEdgesInFace.cxx @@ -30,9 +30,6 @@ #include #include #include -#include -#include -#include #include #include #include diff --git a/src/LocOpe/LocOpe_FindEdgesInFace.hxx b/src/LocOpe/LocOpe_FindEdgesInFace.hxx index bbf1c8a470..e9b094ee6c 100644 --- a/src/LocOpe/LocOpe_FindEdgesInFace.hxx +++ b/src/LocOpe/LocOpe_FindEdgesInFace.hxx @@ -23,9 +23,7 @@ #include #include -#include #include -#include class TopoDS_Edge; diff --git a/src/LocOpe/LocOpe_GeneratedShape.cxx b/src/LocOpe/LocOpe_GeneratedShape.cxx index 7a0f19fbd7..6acf94004a 100644 --- a/src/LocOpe/LocOpe_GeneratedShape.cxx +++ b/src/LocOpe/LocOpe_GeneratedShape.cxx @@ -18,7 +18,5 @@ #include #include #include -#include -#include IMPLEMENT_STANDARD_RTTIEXT(LocOpe_GeneratedShape,Standard_Transient) \ No newline at end of file diff --git a/src/LocOpe/LocOpe_GeneratedShape.hxx b/src/LocOpe/LocOpe_GeneratedShape.hxx index 6c2a2846ee..24ea9867f3 100644 --- a/src/LocOpe/LocOpe_GeneratedShape.hxx +++ b/src/LocOpe/LocOpe_GeneratedShape.hxx @@ -18,7 +18,6 @@ #define _LocOpe_GeneratedShape_HeaderFile #include -#include #include #include diff --git a/src/LocOpe/LocOpe_Generator.cxx b/src/LocOpe/LocOpe_Generator.cxx index f439bb3ea6..b572dd1885 100644 --- a/src/LocOpe/LocOpe_Generator.cxx +++ b/src/LocOpe/LocOpe_Generator.cxx @@ -24,7 +24,6 @@ #include #include #include -#include #include #include #include @@ -36,7 +35,6 @@ #include #include #include -#include #include #include #include @@ -49,12 +47,9 @@ #include #include #include -#include #include #include #include -#include -#include #include static Standard_Boolean ToFuse(const TopoDS_Face& , diff --git a/src/LocOpe/LocOpe_Generator.hxx b/src/LocOpe/LocOpe_Generator.hxx index cc66ec6644..19e6ac5096 100644 --- a/src/LocOpe/LocOpe_Generator.hxx +++ b/src/LocOpe/LocOpe_Generator.hxx @@ -22,7 +22,6 @@ #include #include -#include #include #include class LocOpe_GeneratedShape; diff --git a/src/LocOpe/LocOpe_GluedShape.cxx b/src/LocOpe/LocOpe_GluedShape.cxx index 8c4b9ac00a..abad0fa201 100644 --- a/src/LocOpe/LocOpe_GluedShape.cxx +++ b/src/LocOpe/LocOpe_GluedShape.cxx @@ -26,8 +26,6 @@ #include #include #include -#include -#include #include IMPLEMENT_STANDARD_RTTIEXT(LocOpe_GluedShape,LocOpe_GeneratedShape) diff --git a/src/LocOpe/LocOpe_GluedShape.hxx b/src/LocOpe/LocOpe_GluedShape.hxx index 4aa978dc7b..551149095a 100644 --- a/src/LocOpe/LocOpe_GluedShape.hxx +++ b/src/LocOpe/LocOpe_GluedShape.hxx @@ -18,9 +18,7 @@ #define _LocOpe_GluedShape_HeaderFile #include -#include -#include #include #include #include diff --git a/src/LocOpe/LocOpe_Gluer.cxx b/src/LocOpe/LocOpe_Gluer.cxx index c53b67f70e..570d72df4f 100644 --- a/src/LocOpe/LocOpe_Gluer.cxx +++ b/src/LocOpe/LocOpe_Gluer.cxx @@ -32,7 +32,6 @@ #include #include #include -#include #include #include #include @@ -41,14 +40,11 @@ #include #include #include -#include -#include #include #include -#include static TopAbs_Orientation GetOrientation(const TopoDS_Face&, - const TopoDS_Face&); + const TopoDS_Face&); static Standard_Boolean Contains(const TopTools_ListOfShape&, diff --git a/src/LocOpe/LocOpe_Gluer.hxx b/src/LocOpe/LocOpe_Gluer.hxx index df6afd2be4..1dd4deda9c 100644 --- a/src/LocOpe/LocOpe_Gluer.hxx +++ b/src/LocOpe/LocOpe_Gluer.hxx @@ -19,9 +19,7 @@ #include #include -#include -#include #include #include #include diff --git a/src/LocOpe/LocOpe_LinearForm.cxx b/src/LocOpe/LocOpe_LinearForm.cxx index e9b957051f..2632eb9dd9 100644 --- a/src/LocOpe/LocOpe_LinearForm.cxx +++ b/src/LocOpe/LocOpe_LinearForm.cxx @@ -16,34 +16,22 @@ #include -#include -#include -#include #include #include #include -#include #include -#include -#include #include #include #include -#include #include #include -#include #include -#include #include #include #include -#include #include -#include #include #include -#include //======================================================================= //function : Perform diff --git a/src/LocOpe/LocOpe_LinearForm.hxx b/src/LocOpe/LocOpe_LinearForm.hxx index 6660b709bd..a6f76df0a2 100644 --- a/src/LocOpe/LocOpe_LinearForm.hxx +++ b/src/LocOpe/LocOpe_LinearForm.hxx @@ -19,11 +19,9 @@ #include #include -#include #include #include -#include #include #include #include diff --git a/src/LocOpe/LocOpe_Pipe.cxx b/src/LocOpe/LocOpe_Pipe.cxx index 9b377f66f8..bd6def2638 100644 --- a/src/LocOpe/LocOpe_Pipe.cxx +++ b/src/LocOpe/LocOpe_Pipe.cxx @@ -18,7 +18,6 @@ #include #include #include -#include #include #include #include @@ -41,10 +40,7 @@ #include #include #include -#include #include -#include -#include #include static TopAbs_Orientation Orientation(const TopoDS_Shape&, diff --git a/src/LocOpe/LocOpe_PntFace.hxx b/src/LocOpe/LocOpe_PntFace.hxx index 7eafdabdcf..2842b5a95a 100644 --- a/src/LocOpe/LocOpe_PntFace.hxx +++ b/src/LocOpe/LocOpe_PntFace.hxx @@ -19,12 +19,10 @@ #include #include -#include #include #include #include -#include class gp_Pnt; class TopoDS_Face; diff --git a/src/LocOpe/LocOpe_Prism.cxx b/src/LocOpe/LocOpe_Prism.cxx index 0218e3893c..a2bf4f8209 100644 --- a/src/LocOpe/LocOpe_Prism.cxx +++ b/src/LocOpe/LocOpe_Prism.cxx @@ -28,7 +28,6 @@ #include #include #include -#include #include #include #include diff --git a/src/LocOpe/LocOpe_Prism.hxx b/src/LocOpe/LocOpe_Prism.hxx index 044084b0f2..5275121ac5 100644 --- a/src/LocOpe/LocOpe_Prism.hxx +++ b/src/LocOpe/LocOpe_Prism.hxx @@ -23,7 +23,6 @@ #include #include -#include #include #include #include diff --git a/src/LocOpe/LocOpe_Revol.cxx b/src/LocOpe/LocOpe_Revol.cxx index e5dd968c5b..793ec8cfcc 100644 --- a/src/LocOpe/LocOpe_Revol.cxx +++ b/src/LocOpe/LocOpe_Revol.cxx @@ -29,7 +29,6 @@ #include #include #include -#include #include #include #include diff --git a/src/LocOpe/LocOpe_Revol.hxx b/src/LocOpe/LocOpe_Revol.hxx index 48b17ae596..cf019dd204 100644 --- a/src/LocOpe/LocOpe_Revol.hxx +++ b/src/LocOpe/LocOpe_Revol.hxx @@ -23,8 +23,6 @@ #include #include -#include -#include #include #include #include diff --git a/src/LocOpe/LocOpe_RevolutionForm.cxx b/src/LocOpe/LocOpe_RevolutionForm.cxx index aebbbbe1d3..d03fdb2e54 100644 --- a/src/LocOpe/LocOpe_RevolutionForm.cxx +++ b/src/LocOpe/LocOpe_RevolutionForm.cxx @@ -20,18 +20,11 @@ #include #include #include -#include #include -#include #include -#include -#include #include #include -#include -#include #include -#include #include #include #include diff --git a/src/LocOpe/LocOpe_RevolutionForm.hxx b/src/LocOpe/LocOpe_RevolutionForm.hxx index b135ba664b..2de839bd8b 100644 --- a/src/LocOpe/LocOpe_RevolutionForm.hxx +++ b/src/LocOpe/LocOpe_RevolutionForm.hxx @@ -19,13 +19,10 @@ #include #include -#include #include #include -#include #include -#include #include #include #include diff --git a/src/LocOpe/LocOpe_SplitDrafts.cxx b/src/LocOpe/LocOpe_SplitDrafts.cxx index e0c07a6faa..5ad7158714 100644 --- a/src/LocOpe/LocOpe_SplitDrafts.cxx +++ b/src/LocOpe/LocOpe_SplitDrafts.cxx @@ -30,7 +30,6 @@ #include #include #include -#include #include #include #include @@ -44,13 +43,11 @@ #include #include #include -#include #include #include #include #include #include -#include #include #include #include @@ -61,7 +58,6 @@ #include #include #include -#include #include #include diff --git a/src/LocOpe/LocOpe_SplitDrafts.hxx b/src/LocOpe/LocOpe_SplitDrafts.hxx index 10c035bd13..5611310cf2 100644 --- a/src/LocOpe/LocOpe_SplitDrafts.hxx +++ b/src/LocOpe/LocOpe_SplitDrafts.hxx @@ -20,7 +20,6 @@ #include #include #include -#include #include #include #include diff --git a/src/LocOpe/LocOpe_SplitShape.cxx b/src/LocOpe/LocOpe_SplitShape.cxx index 4d292c9351..00535b0078 100644 --- a/src/LocOpe/LocOpe_SplitShape.cxx +++ b/src/LocOpe/LocOpe_SplitShape.cxx @@ -19,7 +19,6 @@ #include #include #include -#include #include #include #include @@ -31,7 +30,6 @@ #include #include #include -#include #include #include #include @@ -44,23 +42,15 @@ #include #include #include -#include -#include #include #include #include #include -#include #include -#include -#include #include -#include #include #include -#include - static Standard_Boolean IsInside(const TopoDS_Face&, const TopoDS_Wire&, const TopoDS_Wire&); diff --git a/src/LocOpe/LocOpe_SplitShape.hxx b/src/LocOpe/LocOpe_SplitShape.hxx index 11a2c4a05f..e0460ffc45 100644 --- a/src/LocOpe/LocOpe_SplitShape.hxx +++ b/src/LocOpe/LocOpe_SplitShape.hxx @@ -19,14 +19,11 @@ #include #include -#include -#include #include #include #include #include -#include class TopoDS_Edge; class TopoDS_Vertex; class TopoDS_Wire; diff --git a/src/LocOpe/LocOpe_Spliter.cxx b/src/LocOpe/LocOpe_Spliter.cxx index 6852f8b187..5dbadd8c40 100644 --- a/src/LocOpe/LocOpe_Spliter.cxx +++ b/src/LocOpe/LocOpe_Spliter.cxx @@ -22,7 +22,6 @@ #include #include #include -#include #include #include #include @@ -40,13 +39,9 @@ #include #include #include -#include -#include #include #include #include -#include -#include #include diff --git a/src/LocOpe/LocOpe_Spliter.hxx b/src/LocOpe/LocOpe_Spliter.hxx index 2d7371c971..3a5a62f4e3 100644 --- a/src/LocOpe/LocOpe_Spliter.hxx +++ b/src/LocOpe/LocOpe_Spliter.hxx @@ -22,7 +22,6 @@ #include #include -#include #include #include class LocOpe_WiresOnShape; diff --git a/src/LocOpe/LocOpe_WiresOnShape.cxx b/src/LocOpe/LocOpe_WiresOnShape.cxx index 3ccfa9f8dc..273e64cafb 100644 --- a/src/LocOpe/LocOpe_WiresOnShape.cxx +++ b/src/LocOpe/LocOpe_WiresOnShape.cxx @@ -31,13 +31,11 @@ #include #include #include -#include #include #include #include #include #include -#include #include #include #include @@ -53,7 +51,6 @@ #include #include #include -#include #include #include #include @@ -65,7 +62,6 @@ #include #include #include -#include #include #include diff --git a/src/LocOpe/LocOpe_WiresOnShape.hxx b/src/LocOpe/LocOpe_WiresOnShape.hxx index 576aa67d9f..bfd2c90c94 100644 --- a/src/LocOpe/LocOpe_WiresOnShape.hxx +++ b/src/LocOpe/LocOpe_WiresOnShape.hxx @@ -23,11 +23,9 @@ #include #include #include -#include #include #include #include -#include #include class TopoDS_Wire; diff --git a/src/LocalAnalysis/LocalAnalysis_CurveContinuity.cxx b/src/LocalAnalysis/LocalAnalysis_CurveContinuity.cxx index 2d65db2959..b548cd196a 100644 --- a/src/LocalAnalysis/LocalAnalysis_CurveContinuity.cxx +++ b/src/LocalAnalysis/LocalAnalysis_CurveContinuity.cxx @@ -15,7 +15,6 @@ #include #include -#include #include #include #include diff --git a/src/LocalAnalysis/LocalAnalysis_CurveContinuity.hxx b/src/LocalAnalysis/LocalAnalysis_CurveContinuity.hxx index 468cadd413..a8ceaf4cc0 100644 --- a/src/LocalAnalysis/LocalAnalysis_CurveContinuity.hxx +++ b/src/LocalAnalysis/LocalAnalysis_CurveContinuity.hxx @@ -21,9 +21,7 @@ #include #include -#include #include -#include #include class Geom_Curve; class GeomLProp_CLProps; diff --git a/src/LocalAnalysis/LocalAnalysis_SurfaceContinuity.cxx b/src/LocalAnalysis/LocalAnalysis_SurfaceContinuity.cxx index 5abeaad737..550d56e3d2 100644 --- a/src/LocalAnalysis/LocalAnalysis_SurfaceContinuity.cxx +++ b/src/LocalAnalysis/LocalAnalysis_SurfaceContinuity.cxx @@ -18,7 +18,6 @@ #include #include #include -#include #include #include #include diff --git a/src/LocalAnalysis/LocalAnalysis_SurfaceContinuity.hxx b/src/LocalAnalysis/LocalAnalysis_SurfaceContinuity.hxx index 6f1474b6bb..275fed082d 100644 --- a/src/LocalAnalysis/LocalAnalysis_SurfaceContinuity.hxx +++ b/src/LocalAnalysis/LocalAnalysis_SurfaceContinuity.hxx @@ -21,9 +21,7 @@ #include #include -#include #include -#include #include class Geom_Surface; class Geom2d_Curve; diff --git a/src/MAT/MAT_Arc.cxx b/src/MAT/MAT_Arc.cxx index b617f7c76b..000233e384 100644 --- a/src/MAT/MAT_Arc.cxx +++ b/src/MAT/MAT_Arc.cxx @@ -16,7 +16,6 @@ #include -#include #include #include #include diff --git a/src/MAT/MAT_Arc.hxx b/src/MAT/MAT_Arc.hxx index 3d2413690f..da7558aae1 100644 --- a/src/MAT/MAT_Arc.hxx +++ b/src/MAT/MAT_Arc.hxx @@ -23,7 +23,6 @@ #include #include #include -#include #include class MAT_BasicElt; class MAT_Node; diff --git a/src/MAT/MAT_Edge.hxx b/src/MAT/MAT_Edge.hxx index 683a9836b4..f25658ee78 100644 --- a/src/MAT/MAT_Edge.hxx +++ b/src/MAT/MAT_Edge.hxx @@ -21,7 +21,6 @@ #include #include -#include #include class MAT_Bisector; diff --git a/src/MAT/MAT_Graph.cxx b/src/MAT/MAT_Graph.cxx index 3d653b064c..bbfdbfba44 100644 --- a/src/MAT/MAT_Graph.cxx +++ b/src/MAT/MAT_Graph.cxx @@ -16,16 +16,13 @@ #include -#include #include #include -#include #include #include #include #include #include -#include #include #include #include diff --git a/src/MAT/MAT_Graph.hxx b/src/MAT/MAT_Graph.hxx index 9ecb3958d2..8de2e1e406 100644 --- a/src/MAT/MAT_Graph.hxx +++ b/src/MAT/MAT_Graph.hxx @@ -25,7 +25,6 @@ #include #include #include -#include class MAT_ListOfBisector; class MAT_Arc; class MAT_BasicElt; diff --git a/src/MAT/MAT_ListOfBisector.hxx b/src/MAT/MAT_ListOfBisector.hxx index f4560b0c77..b26fe1326c 100644 --- a/src/MAT/MAT_ListOfBisector.hxx +++ b/src/MAT/MAT_ListOfBisector.hxx @@ -22,7 +22,6 @@ #include #include -#include class MAT_TListNodeOfListOfBisector; class MAT_Bisector; diff --git a/src/MAT/MAT_ListOfEdge.hxx b/src/MAT/MAT_ListOfEdge.hxx index f43a08487f..5ab19e3e81 100644 --- a/src/MAT/MAT_ListOfEdge.hxx +++ b/src/MAT/MAT_ListOfEdge.hxx @@ -22,7 +22,6 @@ #include #include -#include class MAT_TListNodeOfListOfEdge; class MAT_Edge; diff --git a/src/MAT/MAT_Node.cxx b/src/MAT/MAT_Node.cxx index b9778c3289..1d26dd5eaa 100644 --- a/src/MAT/MAT_Node.cxx +++ b/src/MAT/MAT_Node.cxx @@ -15,8 +15,6 @@ // commercial license or contractual agreement. -#include -#include #include #include #include diff --git a/src/MAT/MAT_Node.hxx b/src/MAT/MAT_Node.hxx index 90b9481b04..74527243ef 100644 --- a/src/MAT/MAT_Node.hxx +++ b/src/MAT/MAT_Node.hxx @@ -26,7 +26,6 @@ #include #include #include -#include class MAT_Arc; diff --git a/src/MAT/MAT_Zone.cxx b/src/MAT/MAT_Zone.cxx index bfa4a24c42..49f9a6a005 100644 --- a/src/MAT/MAT_Zone.cxx +++ b/src/MAT/MAT_Zone.cxx @@ -16,7 +16,6 @@ #include -#include #include #include #include diff --git a/src/MAT/MAT_Zone.hxx b/src/MAT/MAT_Zone.hxx index 639bcfe776..05b80abc63 100644 --- a/src/MAT/MAT_Zone.hxx +++ b/src/MAT/MAT_Zone.hxx @@ -21,7 +21,6 @@ #include #include -#include #include #include #include diff --git a/src/MAT2d/MAT2d_BiInt.hxx b/src/MAT2d/MAT2d_BiInt.hxx index 3ad3146afa..9e8d45315e 100644 --- a/src/MAT2d/MAT2d_BiInt.hxx +++ b/src/MAT2d/MAT2d_BiInt.hxx @@ -21,7 +21,6 @@ #include #include -#include #include diff --git a/src/MAT2d/MAT2d_Circuit.cxx b/src/MAT2d/MAT2d_Circuit.cxx index b16b1e62e5..8434853f67 100644 --- a/src/MAT2d/MAT2d_Circuit.cxx +++ b/src/MAT2d/MAT2d_Circuit.cxx @@ -20,13 +20,9 @@ #include #include #include -#include -#include #include #include -#include #include -#include #include #include #include diff --git a/src/MAT2d/MAT2d_Circuit.hxx b/src/MAT2d/MAT2d_Circuit.hxx index 8e14188f6f..e55f123860 100644 --- a/src/MAT2d/MAT2d_Circuit.hxx +++ b/src/MAT2d/MAT2d_Circuit.hxx @@ -20,13 +20,10 @@ #include #include -#include -#include #include #include #include #include -#include #include #include #include diff --git a/src/MAT2d/MAT2d_Connexion.hxx b/src/MAT2d/MAT2d_Connexion.hxx index c52249811b..d8fc2b29d7 100644 --- a/src/MAT2d/MAT2d_Connexion.hxx +++ b/src/MAT2d/MAT2d_Connexion.hxx @@ -21,10 +21,8 @@ #include #include -#include #include #include -#include class MAT2d_Connexion; diff --git a/src/MAT2d/MAT2d_CutCurve.hxx b/src/MAT2d/MAT2d_CutCurve.hxx index a60d8b4d70..82149b3649 100644 --- a/src/MAT2d/MAT2d_CutCurve.hxx +++ b/src/MAT2d/MAT2d_CutCurve.hxx @@ -23,7 +23,6 @@ #include #include -#include #include class Geom2d_Curve; class Geom2d_TrimmedCurve; diff --git a/src/MAT2d/MAT2d_DataMapOfBiIntInteger.hxx b/src/MAT2d/MAT2d_DataMapOfBiIntInteger.hxx index 0596260752..e67f52c6d0 100644 --- a/src/MAT2d/MAT2d_DataMapOfBiIntInteger.hxx +++ b/src/MAT2d/MAT2d_DataMapOfBiIntInteger.hxx @@ -17,7 +17,6 @@ #ifndef MAT2d_DataMapOfBiIntInteger_HeaderFile #define MAT2d_DataMapOfBiIntInteger_HeaderFile -#include #include #include #include diff --git a/src/MAT2d/MAT2d_DataMapOfIntegerBisec.hxx b/src/MAT2d/MAT2d_DataMapOfIntegerBisec.hxx index eb4971256e..94df70c206 100644 --- a/src/MAT2d/MAT2d_DataMapOfIntegerBisec.hxx +++ b/src/MAT2d/MAT2d_DataMapOfIntegerBisec.hxx @@ -17,7 +17,6 @@ #ifndef MAT2d_DataMapOfIntegerBisec_HeaderFile #define MAT2d_DataMapOfIntegerBisec_HeaderFile -#include #include #include #include diff --git a/src/MAT2d/MAT2d_DataMapOfIntegerPnt2d.hxx b/src/MAT2d/MAT2d_DataMapOfIntegerPnt2d.hxx index 64ab711c3d..69f0fe8b30 100644 --- a/src/MAT2d/MAT2d_DataMapOfIntegerPnt2d.hxx +++ b/src/MAT2d/MAT2d_DataMapOfIntegerPnt2d.hxx @@ -17,7 +17,6 @@ #ifndef MAT2d_DataMapOfIntegerPnt2d_HeaderFile #define MAT2d_DataMapOfIntegerPnt2d_HeaderFile -#include #include #include #include diff --git a/src/MAT2d/MAT2d_MapBiIntHasher.hxx b/src/MAT2d/MAT2d_MapBiIntHasher.hxx index 5b786e1c90..2678b33043 100644 --- a/src/MAT2d/MAT2d_MapBiIntHasher.hxx +++ b/src/MAT2d/MAT2d_MapBiIntHasher.hxx @@ -19,10 +19,8 @@ #include #include -#include #include -#include class MAT2d_BiInt; diff --git a/src/MAT2d/MAT2d_Mat2d.cxx b/src/MAT2d/MAT2d_Mat2d.cxx index 0c763059dd..4e3d54c176 100644 --- a/src/MAT2d/MAT2d_Mat2d.cxx +++ b/src/MAT2d/MAT2d_Mat2d.cxx @@ -24,7 +24,6 @@ #include #include #include -#include //======================================================================== // function : MAT2d_Mat2d diff --git a/src/MAT2d/MAT2d_MiniPath.cxx b/src/MAT2d/MAT2d_MiniPath.cxx index e40551b9f9..7015f32860 100644 --- a/src/MAT2d/MAT2d_MiniPath.cxx +++ b/src/MAT2d/MAT2d_MiniPath.cxx @@ -19,7 +19,6 @@ #include #include #include -#include #include #include #include diff --git a/src/MAT2d/MAT2d_MiniPath.hxx b/src/MAT2d/MAT2d_MiniPath.hxx index 70c02dcea8..aa8b0022da 100644 --- a/src/MAT2d/MAT2d_MiniPath.hxx +++ b/src/MAT2d/MAT2d_MiniPath.hxx @@ -24,10 +24,8 @@ #include #include #include -#include #include #include -#include class MAT2d_Connexion; diff --git a/src/MAT2d/MAT2d_Tool2d.cxx b/src/MAT2d/MAT2d_Tool2d.cxx index 6c303a33b0..c2b73d8441 100644 --- a/src/MAT2d/MAT2d_Tool2d.cxx +++ b/src/MAT2d/MAT2d_Tool2d.cxx @@ -51,9 +51,7 @@ #include #include #include -#include #include -#include #include #include #include @@ -62,8 +60,6 @@ #include #include #include -#include -#include #include #include #include diff --git a/src/MAT2d/MAT2d_Tool2d.hxx b/src/MAT2d/MAT2d_Tool2d.hxx index 7b752955aa..5ecbfbd7b3 100644 --- a/src/MAT2d/MAT2d_Tool2d.hxx +++ b/src/MAT2d/MAT2d_Tool2d.hxx @@ -21,7 +21,6 @@ #include #include -#include #include #include #include @@ -29,7 +28,6 @@ #include #include #include -#include class MAT2d_Circuit; class MAT_Bisector; class Bisector_Bisec; diff --git a/src/MeshTest/MeshTest.cxx b/src/MeshTest/MeshTest.cxx index 83da94bd47..351b51379c 100644 --- a/src/MeshTest/MeshTest.cxx +++ b/src/MeshTest/MeshTest.cxx @@ -18,7 +18,6 @@ #include -#include #include #include #include @@ -40,14 +39,11 @@ #include #include #include -#include #include #include #include #include #include -#include -#include #include #include diff --git a/src/MeshTest/MeshTest_CheckTopology.cxx b/src/MeshTest/MeshTest_CheckTopology.cxx index 574b746d1d..8eb3853734 100644 --- a/src/MeshTest/MeshTest_CheckTopology.cxx +++ b/src/MeshTest/MeshTest_CheckTopology.cxx @@ -15,17 +15,14 @@ #include #include -#include #include #include -#include #include #include #include #include #include #include -#include #include #include #include diff --git a/src/MeshTest/MeshTest_Debug.cxx b/src/MeshTest/MeshTest_Debug.cxx index 1118d11bca..f6f0b7105e 100644 --- a/src/MeshTest/MeshTest_Debug.cxx +++ b/src/MeshTest/MeshTest_Debug.cxx @@ -17,11 +17,7 @@ #include #include #include -#include #include -#include -#include -#include #include // This file defines global functions not declared in any public header, diff --git a/src/MeshTest/MeshTest_PluginCommands.cxx b/src/MeshTest/MeshTest_PluginCommands.cxx index c80c4d2025..9215217e50 100644 --- a/src/MeshTest/MeshTest_PluginCommands.cxx +++ b/src/MeshTest/MeshTest_PluginCommands.cxx @@ -14,12 +14,10 @@ // commercial license or contractual agreement. -#include #include #include #include #include -#include #include #include #include @@ -39,12 +37,10 @@ #include #include #include -#include #include #include #include #include -#include #include #include #include diff --git a/src/MeshVS/MeshVS_DataMapOfIntegerBoolean.hxx b/src/MeshVS/MeshVS_DataMapOfIntegerBoolean.hxx index 793f79e3fc..8a7a4b7cbe 100644 --- a/src/MeshVS/MeshVS_DataMapOfIntegerBoolean.hxx +++ b/src/MeshVS/MeshVS_DataMapOfIntegerBoolean.hxx @@ -17,7 +17,6 @@ #define MeshVS_DataMapOfIntegerBoolean_HeaderFile #include -#include #include #include diff --git a/src/MeshVS/MeshVS_DataMapOfTwoColorsMapOfInteger.hxx b/src/MeshVS/MeshVS_DataMapOfTwoColorsMapOfInteger.hxx index bf68e78be7..1f0a426f60 100644 --- a/src/MeshVS/MeshVS_DataMapOfTwoColorsMapOfInteger.hxx +++ b/src/MeshVS/MeshVS_DataMapOfTwoColorsMapOfInteger.hxx @@ -16,7 +16,6 @@ #ifndef MeshVS_DataMapOfTwoColorsMapOfInteger_HeaderFile #define MeshVS_DataMapOfTwoColorsMapOfInteger_HeaderFile -#include #include #include #include diff --git a/src/MeshVS/MeshVS_DataSource.cxx b/src/MeshVS/MeshVS_DataSource.cxx index ef3d8e516b..00badf3a98 100644 --- a/src/MeshVS/MeshVS_DataSource.cxx +++ b/src/MeshVS/MeshVS_DataSource.cxx @@ -14,7 +14,6 @@ // commercial license or contractual agreement. -#include #include #include #include @@ -23,7 +22,6 @@ #include #include #include -#include #include #include diff --git a/src/MeshVS/MeshVS_DataSource.hxx b/src/MeshVS/MeshVS_DataSource.hxx index 0b3736a5da..7e9828e5e3 100644 --- a/src/MeshVS/MeshVS_DataSource.hxx +++ b/src/MeshVS/MeshVS_DataSource.hxx @@ -20,15 +20,12 @@ #include #include -#include #include -#include #include #include #include #include #include -#include #include #include class Bnd_Box; diff --git a/src/MeshVS/MeshVS_DataSource3D.hxx b/src/MeshVS/MeshVS_DataSource3D.hxx index d57db6e870..8f14294fbd 100644 --- a/src/MeshVS/MeshVS_DataSource3D.hxx +++ b/src/MeshVS/MeshVS_DataSource3D.hxx @@ -17,7 +17,6 @@ #define _MeshVS_DataSource3D_HeaderFile #include -#include #include #include diff --git a/src/MeshVS/MeshVS_DeformedDataSource.cxx b/src/MeshVS/MeshVS_DeformedDataSource.cxx index d4624e0dc2..4c17a56047 100644 --- a/src/MeshVS/MeshVS_DeformedDataSource.cxx +++ b/src/MeshVS/MeshVS_DeformedDataSource.cxx @@ -14,9 +14,7 @@ // commercial license or contractual agreement. -#include #include -#include #include #include diff --git a/src/MeshVS/MeshVS_DeformedDataSource.hxx b/src/MeshVS/MeshVS_DeformedDataSource.hxx index 0d30dca282..f0c04c93c2 100644 --- a/src/MeshVS/MeshVS_DeformedDataSource.hxx +++ b/src/MeshVS/MeshVS_DeformedDataSource.hxx @@ -19,11 +19,8 @@ #include #include -#include #include -#include #include -#include #include #include #include diff --git a/src/MeshVS/MeshVS_Drawer.cxx b/src/MeshVS/MeshVS_Drawer.cxx index 3fa51362e9..708c72db74 100644 --- a/src/MeshVS/MeshVS_Drawer.cxx +++ b/src/MeshVS/MeshVS_Drawer.cxx @@ -14,7 +14,6 @@ // commercial license or contractual agreement. -#include #include #include #include diff --git a/src/MeshVS/MeshVS_Drawer.hxx b/src/MeshVS/MeshVS_Drawer.hxx index c4bc241f4a..f25d9b41cf 100644 --- a/src/MeshVS/MeshVS_Drawer.hxx +++ b/src/MeshVS/MeshVS_Drawer.hxx @@ -17,7 +17,6 @@ #define _MeshVS_Drawer_HeaderFile #include -#include #include #include @@ -27,8 +26,6 @@ #include #include #include -#include -#include class Quantity_Color; class Graphic3d_MaterialAspect; class TCollection_AsciiString; diff --git a/src/MeshVS/MeshVS_DummySensitiveEntity.hxx b/src/MeshVS/MeshVS_DummySensitiveEntity.hxx index 414b3728b8..9eb052abce 100644 --- a/src/MeshVS/MeshVS_DummySensitiveEntity.hxx +++ b/src/MeshVS/MeshVS_DummySensitiveEntity.hxx @@ -17,9 +17,7 @@ #define _MeshVS_DummySensitiveEntity_HeaderFile #include -#include -#include #include #include diff --git a/src/MeshVS/MeshVS_ElementalColorPrsBuilder.cxx b/src/MeshVS/MeshVS_ElementalColorPrsBuilder.cxx index 2674196163..919d64d6c0 100644 --- a/src/MeshVS/MeshVS_ElementalColorPrsBuilder.cxx +++ b/src/MeshVS/MeshVS_ElementalColorPrsBuilder.cxx @@ -14,22 +14,12 @@ // commercial license or contractual agreement. -#include -#include #include #include -#include -#include -#include #include -#include -#include -#include -#include #include #include #include -#include #include #include #include diff --git a/src/MeshVS/MeshVS_HArray1OfSequenceOfInteger.hxx b/src/MeshVS/MeshVS_HArray1OfSequenceOfInteger.hxx index 07811f18e7..e38c63257f 100644 --- a/src/MeshVS/MeshVS_HArray1OfSequenceOfInteger.hxx +++ b/src/MeshVS/MeshVS_HArray1OfSequenceOfInteger.hxx @@ -16,7 +16,6 @@ #ifndef MeshVS_HArray1OfSequenceOfInteger_HeaderFile #define MeshVS_HArray1OfSequenceOfInteger_HeaderFile -#include #include #include diff --git a/src/MeshVS/MeshVS_MapOfTwoNodes.hxx b/src/MeshVS/MeshVS_MapOfTwoNodes.hxx index d8beb0ede5..c22e349bdf 100644 --- a/src/MeshVS/MeshVS_MapOfTwoNodes.hxx +++ b/src/MeshVS/MeshVS_MapOfTwoNodes.hxx @@ -16,7 +16,6 @@ #ifndef MeshVS_MapOfTwoNodes_HeaderFile #define MeshVS_MapOfTwoNodes_HeaderFile -#include #include #include diff --git a/src/MeshVS/MeshVS_Mesh.cxx b/src/MeshVS/MeshVS_Mesh.cxx index 3f55246015..dba34e57f8 100644 --- a/src/MeshVS/MeshVS_Mesh.cxx +++ b/src/MeshVS/MeshVS_Mesh.cxx @@ -18,8 +18,6 @@ #include #include #include -#include -#include #include #include #include @@ -42,7 +40,6 @@ #include #include #include -#include #include #include #include @@ -58,10 +55,7 @@ #include #include #include -#include -#include #include -#include IMPLEMENT_STANDARD_RTTIEXT(MeshVS_Mesh,AIS_InteractiveObject) diff --git a/src/MeshVS/MeshVS_Mesh.hxx b/src/MeshVS/MeshVS_Mesh.hxx index 9cb24e6763..fca2bb4b30 100644 --- a/src/MeshVS/MeshVS_Mesh.hxx +++ b/src/MeshVS/MeshVS_Mesh.hxx @@ -21,8 +21,6 @@ #include #include #include -#include -#include class MeshVS_PrsBuilder; class TColStd_HPackedMapOfInteger; diff --git a/src/MeshVS/MeshVS_MeshEntityOwner.cxx b/src/MeshVS/MeshVS_MeshEntityOwner.cxx index ec417397de..cc39bb8979 100644 --- a/src/MeshVS/MeshVS_MeshEntityOwner.cxx +++ b/src/MeshVS/MeshVS_MeshEntityOwner.cxx @@ -14,14 +14,11 @@ // commercial license or contractual agreement. -#include #include #include #include -#include #include #include -#include IMPLEMENT_STANDARD_RTTIEXT(MeshVS_MeshEntityOwner,SelectMgr_EntityOwner) diff --git a/src/MeshVS/MeshVS_MeshEntityOwner.hxx b/src/MeshVS/MeshVS_MeshEntityOwner.hxx index 45554524a5..6add7bfb57 100644 --- a/src/MeshVS/MeshVS_MeshEntityOwner.hxx +++ b/src/MeshVS/MeshVS_MeshEntityOwner.hxx @@ -19,7 +19,6 @@ #include #include #include -#include class PrsMgr_PresentationManager; diff --git a/src/MeshVS/MeshVS_MeshOwner.cxx b/src/MeshVS/MeshVS_MeshOwner.cxx index 2bdf6178bd..517c2b9c52 100644 --- a/src/MeshVS/MeshVS_MeshOwner.cxx +++ b/src/MeshVS/MeshVS_MeshOwner.cxx @@ -18,7 +18,6 @@ #include #include #include -#include #include #include #include @@ -27,7 +26,6 @@ IMPLEMENT_STANDARD_RTTIEXT(MeshVS_MeshOwner,SelectMgr_EntityOwner) #ifndef MeshVS_PRSBUILDERHXX -#include #endif diff --git a/src/MeshVS/MeshVS_MeshOwner.hxx b/src/MeshVS/MeshVS_MeshOwner.hxx index 91dd4a96ca..6cf2a53e20 100644 --- a/src/MeshVS/MeshVS_MeshOwner.hxx +++ b/src/MeshVS/MeshVS_MeshOwner.hxx @@ -18,7 +18,6 @@ #include #include -#include class MeshVS_DataSource; class TColStd_HPackedMapOfInteger; diff --git a/src/MeshVS/MeshVS_MeshPrsBuilder.cxx b/src/MeshVS/MeshVS_MeshPrsBuilder.cxx index 22ebe1ed2b..1f0268cfd2 100644 --- a/src/MeshVS/MeshVS_MeshPrsBuilder.cxx +++ b/src/MeshVS/MeshVS_MeshPrsBuilder.cxx @@ -14,17 +14,11 @@ // commercial license or contractual agreement. -#include #include #include -#include #include #include #include -#include -#include -#include -#include #include #include #include @@ -46,10 +40,7 @@ #include #include #include -#include -#include #include -#include #include #include diff --git a/src/MeshVS/MeshVS_NodalColorPrsBuilder.cxx b/src/MeshVS/MeshVS_NodalColorPrsBuilder.cxx index 6fdac7b109..01ece0cefe 100644 --- a/src/MeshVS/MeshVS_NodalColorPrsBuilder.cxx +++ b/src/MeshVS/MeshVS_NodalColorPrsBuilder.cxx @@ -17,23 +17,14 @@ // if define _POLYGONES_ ColorPrsBuilder use ArrayOfPolygons for drawing faces -#include -#include #include -#include #include #include #include -#include -#include -#include #include -#include -#include #include #include #include -#include #include #include #include @@ -43,7 +34,6 @@ #include #include #include -#include #include #include #include @@ -56,7 +46,6 @@ #include #include #include -#include #include #include diff --git a/src/MeshVS/MeshVS_SensitiveFace.hxx b/src/MeshVS/MeshVS_SensitiveFace.hxx index 02b38ccca1..1a060e776f 100644 --- a/src/MeshVS/MeshVS_SensitiveFace.hxx +++ b/src/MeshVS/MeshVS_SensitiveFace.hxx @@ -17,9 +17,7 @@ #define _MeshVS_SensitiveFace_HeaderFile #include -#include -#include #include #include diff --git a/src/MeshVS/MeshVS_SensitiveMesh.cxx b/src/MeshVS/MeshVS_SensitiveMesh.cxx index b5bfed934a..099915087a 100644 --- a/src/MeshVS/MeshVS_SensitiveMesh.cxx +++ b/src/MeshVS/MeshVS_SensitiveMesh.cxx @@ -15,14 +15,10 @@ #include -#include -#include #include #include -#include #include #include -#include IMPLEMENT_STANDARD_RTTIEXT(MeshVS_SensitiveMesh,Select3D_SensitiveEntity) diff --git a/src/MeshVS/MeshVS_SensitiveMesh.hxx b/src/MeshVS/MeshVS_SensitiveMesh.hxx index a0dd113183..1818cd023b 100644 --- a/src/MeshVS/MeshVS_SensitiveMesh.hxx +++ b/src/MeshVS/MeshVS_SensitiveMesh.hxx @@ -17,10 +17,7 @@ #define _MeshVS_SensitiveMesh_HeaderFile #include -#include -#include -#include #include #include diff --git a/src/MeshVS/MeshVS_SensitivePolyhedron.cxx b/src/MeshVS/MeshVS_SensitivePolyhedron.cxx index 9522553762..0222f1a699 100644 --- a/src/MeshVS/MeshVS_SensitivePolyhedron.cxx +++ b/src/MeshVS/MeshVS_SensitivePolyhedron.cxx @@ -18,11 +18,9 @@ #include #include #include -#include #include #include #include -#include #include diff --git a/src/MeshVS/MeshVS_SensitivePolyhedron.hxx b/src/MeshVS/MeshVS_SensitivePolyhedron.hxx index 91b408e7e8..e7af24cc45 100644 --- a/src/MeshVS/MeshVS_SensitivePolyhedron.hxx +++ b/src/MeshVS/MeshVS_SensitivePolyhedron.hxx @@ -17,15 +17,10 @@ #define _MeshVS_SensitivePolyhedron_HeaderFile #include -#include -#include -#include #include -#include #include #include -#include #include diff --git a/src/MeshVS/MeshVS_SensitiveQuad.hxx b/src/MeshVS/MeshVS_SensitiveQuad.hxx index d4306f6693..0012108454 100644 --- a/src/MeshVS/MeshVS_SensitiveQuad.hxx +++ b/src/MeshVS/MeshVS_SensitiveQuad.hxx @@ -16,7 +16,6 @@ #ifndef _MeshVS_SensitiveQuad_HeaderFile #define _MeshVS_SensitiveQuad_HeaderFile -#include #include #include diff --git a/src/MeshVS/MeshVS_SensitiveSegment.hxx b/src/MeshVS/MeshVS_SensitiveSegment.hxx index 174f5c19d9..cf249441cc 100644 --- a/src/MeshVS/MeshVS_SensitiveSegment.hxx +++ b/src/MeshVS/MeshVS_SensitiveSegment.hxx @@ -16,7 +16,6 @@ #ifndef _MeshVS_SensitiveSegment_HeaderFile #define _MeshVS_SensitiveSegment_HeaderFile -#include #include //! This class provides custom sensitive face, which will be selected if it center is in rectangle. diff --git a/src/MeshVS/MeshVS_TextPrsBuilder.cxx b/src/MeshVS/MeshVS_TextPrsBuilder.cxx index ed7dcebdf3..7844e36518 100644 --- a/src/MeshVS/MeshVS_TextPrsBuilder.cxx +++ b/src/MeshVS/MeshVS_TextPrsBuilder.cxx @@ -14,15 +14,11 @@ // commercial license or contractual agreement. -#include #include #include -#include #include -#include #include #include -#include #include #include #include @@ -34,7 +30,6 @@ #include #include #include -#include #include IMPLEMENT_STANDARD_RTTIEXT(MeshVS_TextPrsBuilder,MeshVS_PrsBuilder) diff --git a/src/MeshVS/MeshVS_Tool.hxx b/src/MeshVS/MeshVS_Tool.hxx index 8281e4a23c..b92ecff3f2 100644 --- a/src/MeshVS/MeshVS_Tool.hxx +++ b/src/MeshVS/MeshVS_Tool.hxx @@ -20,7 +20,6 @@ #include #include -#include #include class Graphic3d_AspectFillArea3d; class MeshVS_Drawer; diff --git a/src/MeshVS/MeshVS_VectorPrsBuilder.cxx b/src/MeshVS/MeshVS_VectorPrsBuilder.cxx index eeba1000c3..29ac15ef13 100644 --- a/src/MeshVS/MeshVS_VectorPrsBuilder.cxx +++ b/src/MeshVS/MeshVS_VectorPrsBuilder.cxx @@ -14,24 +14,10 @@ // commercial license or contractual agreement. -#include -#include -#include -#include -#include -#include -#include #include -#include -#include -#include #include -#include -#include #include -#include #include -#include #include #include #include diff --git a/src/Message/Message.cxx b/src/Message/Message.cxx index cdc7dc6520..b4e1383453 100644 --- a/src/Message/Message.cxx +++ b/src/Message/Message.cxx @@ -21,7 +21,6 @@ #include #include -#include namespace { diff --git a/src/Message/Message_Algorithm.cxx b/src/Message/Message_Algorithm.cxx index df663d3567..8a04ef27cc 100644 --- a/src/Message/Message_Algorithm.cxx +++ b/src/Message/Message_Algorithm.cxx @@ -27,9 +27,7 @@ #include #include #include -#include #include -#include IMPLEMENT_STANDARD_RTTIEXT(Message_Algorithm,Standard_Transient) diff --git a/src/Message/Message_Algorithm.hxx b/src/Message/Message_Algorithm.hxx index f38ad5e095..2105bd1563 100644 --- a/src/Message/Message_Algorithm.hxx +++ b/src/Message/Message_Algorithm.hxx @@ -25,7 +25,6 @@ #include #include #include -#include #include #include #include diff --git a/src/Message/Message_Attribute.cxx b/src/Message/Message_Attribute.cxx index 3763165d79..944dfe7e0c 100644 --- a/src/Message/Message_Attribute.cxx +++ b/src/Message/Message_Attribute.cxx @@ -13,7 +13,6 @@ #include -#include #include IMPLEMENT_STANDARD_RTTIEXT(Message_Attribute, Standard_Transient) diff --git a/src/Message/Message_AttributeMeter.cxx b/src/Message/Message_AttributeMeter.cxx index 531c0f0e9c..e50976c910 100644 --- a/src/Message/Message_AttributeMeter.cxx +++ b/src/Message/Message_AttributeMeter.cxx @@ -13,10 +13,7 @@ #include -#include -#include #include -#include #include #include diff --git a/src/Message/Message_ExecStatus.hxx b/src/Message/Message_ExecStatus.hxx index ce147252bd..9afdddf7b2 100644 --- a/src/Message/Message_ExecStatus.hxx +++ b/src/Message/Message_ExecStatus.hxx @@ -18,7 +18,6 @@ #ifndef Message_ExecStatus_HeaderFile #define Message_ExecStatus_HeaderFile -#include #include /** diff --git a/src/Message/Message_Level.cxx b/src/Message/Message_Level.cxx index caa8b5c025..990652f482 100644 --- a/src/Message/Message_Level.cxx +++ b/src/Message/Message_Level.cxx @@ -17,11 +17,9 @@ #include #include #include -#include #include #include -#include //======================================================================= //function : Constructor diff --git a/src/Message/Message_Level.hxx b/src/Message/Message_Level.hxx index 4e14d8f62a..a19afc665b 100644 --- a/src/Message/Message_Level.hxx +++ b/src/Message/Message_Level.hxx @@ -18,9 +18,7 @@ #include #include #include -#include -#include #include //! This class is an instance of Sentry to create a level in a message report diff --git a/src/Message/Message_Messenger.hxx b/src/Message/Message_Messenger.hxx index 3ee2ea3d3a..a6b3298ae9 100644 --- a/src/Message/Message_Messenger.hxx +++ b/src/Message/Message_Messenger.hxx @@ -16,7 +16,6 @@ #ifndef _Message_Messenger_HeaderFile #define _Message_Messenger_HeaderFile -#include #include #include diff --git a/src/Message/Message_Msg.cxx b/src/Message/Message_Msg.cxx index bbb6f3885f..ade83fe1ff 100644 --- a/src/Message/Message_Msg.cxx +++ b/src/Message/Message_Msg.cxx @@ -16,7 +16,6 @@ #include #include #include -#include typedef enum { diff --git a/src/Message/Message_MsgFile.cxx b/src/Message/Message_MsgFile.cxx index 3ac1e54171..34abfe57f3 100644 --- a/src/Message/Message_MsgFile.cxx +++ b/src/Message/Message_MsgFile.cxx @@ -19,7 +19,6 @@ #include #include #include -#include #include #include diff --git a/src/Message/Message_MsgFile.hxx b/src/Message/Message_MsgFile.hxx index 22d90d1a35..a03f481d81 100644 --- a/src/Message/Message_MsgFile.hxx +++ b/src/Message/Message_MsgFile.hxx @@ -21,7 +21,6 @@ #include #include -#include class TCollection_AsciiString; class TCollection_ExtendedString; diff --git a/src/Message/Message_Printer.hxx b/src/Message/Message_Printer.hxx index eceed06e0f..c0545e3104 100644 --- a/src/Message/Message_Printer.hxx +++ b/src/Message/Message_Printer.hxx @@ -21,8 +21,6 @@ #include #include -#include -#include #include class TCollection_ExtendedString; diff --git a/src/Message/Message_PrinterToReport.cxx b/src/Message/Message_PrinterToReport.cxx index 634147f452..0bbd84062f 100644 --- a/src/Message/Message_PrinterToReport.cxx +++ b/src/Message/Message_PrinterToReport.cxx @@ -14,8 +14,6 @@ #include #include -#include -#include #include #include #include diff --git a/src/Message/Message_PrinterToReport.hxx b/src/Message/Message_PrinterToReport.hxx index 4004b409b5..e82cfe1565 100644 --- a/src/Message/Message_PrinterToReport.hxx +++ b/src/Message/Message_PrinterToReport.hxx @@ -16,7 +16,6 @@ #include #include -#include #include class Message_Report; diff --git a/src/Message/Message_ProgressIndicator.hxx b/src/Message/Message_ProgressIndicator.hxx index 09a83fd338..ad6e5e547e 100644 --- a/src/Message/Message_ProgressIndicator.hxx +++ b/src/Message/Message_ProgressIndicator.hxx @@ -16,7 +16,6 @@ #ifndef _Message_ProgressIndicator_HeaderFile #define _Message_ProgressIndicator_HeaderFile -#include #include #include diff --git a/src/Message/Message_Report.hxx b/src/Message/Message_Report.hxx index fe82220521..7cfad03b99 100644 --- a/src/Message/Message_Report.hxx +++ b/src/Message/Message_Report.hxx @@ -16,7 +16,6 @@ #ifndef _Message_Report_HeaderFile #define _Message_Report_HeaderFile -#include #include #include #include diff --git a/src/MoniTool/MoniTool_AttrList.hxx b/src/MoniTool/MoniTool_AttrList.hxx index 9073d383b9..78b2ff887d 100644 --- a/src/MoniTool/MoniTool_AttrList.hxx +++ b/src/MoniTool/MoniTool_AttrList.hxx @@ -21,9 +21,6 @@ #include #include -#include -#include -#include #include #include #include diff --git a/src/MoniTool/MoniTool_CaseData.cxx b/src/MoniTool/MoniTool_CaseData.cxx index e54c8fee6e..9df9eea736 100644 --- a/src/MoniTool/MoniTool_CaseData.cxx +++ b/src/MoniTool/MoniTool_CaseData.cxx @@ -15,8 +15,6 @@ #include #include #include -#include -#include #include #include #include @@ -27,7 +25,6 @@ #include #include #include -#include #include #include #include diff --git a/src/MoniTool/MoniTool_CaseData.hxx b/src/MoniTool/MoniTool_CaseData.hxx index 1618e7c947..69856c240f 100644 --- a/src/MoniTool/MoniTool_CaseData.hxx +++ b/src/MoniTool/MoniTool_CaseData.hxx @@ -26,10 +26,6 @@ #include #include #include -#include -#include -#include -#include class TopoDS_Shape; class gp_XYZ; class gp_XY; diff --git a/src/MoniTool/MoniTool_DataInfo.hxx b/src/MoniTool/MoniTool_DataInfo.hxx index 79d458ae98..d8d197ee7f 100644 --- a/src/MoniTool/MoniTool_DataInfo.hxx +++ b/src/MoniTool/MoniTool_DataInfo.hxx @@ -22,7 +22,6 @@ #include #include -#include class Standard_Transient; diff --git a/src/MoniTool/MoniTool_ElemHasher.hxx b/src/MoniTool/MoniTool_ElemHasher.hxx index 32a3a5092a..694533ce77 100644 --- a/src/MoniTool/MoniTool_ElemHasher.hxx +++ b/src/MoniTool/MoniTool_ElemHasher.hxx @@ -22,7 +22,6 @@ #include #include -#include class MoniTool_Element; diff --git a/src/MoniTool/MoniTool_Element.cxx b/src/MoniTool/MoniTool_Element.cxx index ce759cd991..12f09f0a21 100644 --- a/src/MoniTool/MoniTool_Element.cxx +++ b/src/MoniTool/MoniTool_Element.cxx @@ -12,7 +12,6 @@ // commercial license or contractual agreement. -#include #include #include diff --git a/src/MoniTool/MoniTool_Element.hxx b/src/MoniTool/MoniTool_Element.hxx index fc7c589616..d24b134c07 100644 --- a/src/MoniTool/MoniTool_Element.hxx +++ b/src/MoniTool/MoniTool_Element.hxx @@ -18,14 +18,11 @@ #define _MoniTool_Element_HeaderFile #include -#include #include #include #include -#include #include -#include class MoniTool_Element; diff --git a/src/MoniTool/MoniTool_IndexedDataMapOfShapeTransient.hxx b/src/MoniTool/MoniTool_IndexedDataMapOfShapeTransient.hxx index 22c2f05b60..b32aaa6d6e 100644 --- a/src/MoniTool/MoniTool_IndexedDataMapOfShapeTransient.hxx +++ b/src/MoniTool/MoniTool_IndexedDataMapOfShapeTransient.hxx @@ -17,7 +17,6 @@ #ifndef MoniTool_IndexedDataMapOfShapeTransient_HeaderFile #define MoniTool_IndexedDataMapOfShapeTransient_HeaderFile -#include #include #include #include diff --git a/src/MoniTool/MoniTool_MTHasher.hxx b/src/MoniTool/MoniTool_MTHasher.hxx index c6e00bd7b0..b314702784 100644 --- a/src/MoniTool/MoniTool_MTHasher.hxx +++ b/src/MoniTool/MoniTool_MTHasher.hxx @@ -20,8 +20,6 @@ #include #include -#include -#include #include diff --git a/src/MoniTool/MoniTool_SignShape.cxx b/src/MoniTool/MoniTool_SignShape.cxx index ef497d9318..52d594b6ae 100644 --- a/src/MoniTool/MoniTool_SignShape.cxx +++ b/src/MoniTool/MoniTool_SignShape.cxx @@ -15,7 +15,6 @@ #include #include #include -#include #include #include diff --git a/src/MoniTool/MoniTool_SignShape.hxx b/src/MoniTool/MoniTool_SignShape.hxx index f7835e5708..6b33a6337e 100644 --- a/src/MoniTool/MoniTool_SignShape.hxx +++ b/src/MoniTool/MoniTool_SignShape.hxx @@ -21,7 +21,6 @@ #include #include -#include class TCollection_AsciiString; class Standard_Transient; diff --git a/src/MoniTool/MoniTool_SignText.hxx b/src/MoniTool/MoniTool_SignText.hxx index 6703d71c66..fe3b12a425 100644 --- a/src/MoniTool/MoniTool_SignText.hxx +++ b/src/MoniTool/MoniTool_SignText.hxx @@ -21,7 +21,6 @@ #include #include -#include class TCollection_AsciiString; diff --git a/src/MoniTool/MoniTool_Stat.cxx b/src/MoniTool/MoniTool_Stat.cxx index 99485abe99..7f656fe77a 100644 --- a/src/MoniTool/MoniTool_Stat.cxx +++ b/src/MoniTool/MoniTool_Stat.cxx @@ -13,7 +13,6 @@ #include -#include #include //static MoniTool_Stat Statvoid(""); diff --git a/src/MoniTool/MoniTool_Stat.hxx b/src/MoniTool/MoniTool_Stat.hxx index 3d5c482a5a..4c1fcf69f0 100644 --- a/src/MoniTool/MoniTool_Stat.hxx +++ b/src/MoniTool/MoniTool_Stat.hxx @@ -23,7 +23,6 @@ #include #include -#include #include class TCollection_HAsciiString; diff --git a/src/MoniTool/MoniTool_Timer.hxx b/src/MoniTool/MoniTool_Timer.hxx index e5821e67df..6a2f55d89b 100644 --- a/src/MoniTool/MoniTool_Timer.hxx +++ b/src/MoniTool/MoniTool_Timer.hxx @@ -21,7 +21,6 @@ #include #include -#include #include #include #include diff --git a/src/MoniTool/MoniTool_TransientElem.cxx b/src/MoniTool/MoniTool_TransientElem.cxx index 1509629283..57da02ce08 100644 --- a/src/MoniTool/MoniTool_TransientElem.cxx +++ b/src/MoniTool/MoniTool_TransientElem.cxx @@ -13,7 +13,6 @@ #include -#include #include #include #include diff --git a/src/MoniTool/MoniTool_TransientElem.hxx b/src/MoniTool/MoniTool_TransientElem.hxx index 0d486539a5..f851d4cddc 100644 --- a/src/MoniTool/MoniTool_TransientElem.hxx +++ b/src/MoniTool/MoniTool_TransientElem.hxx @@ -21,8 +21,6 @@ #include #include -#include -#include #include diff --git a/src/MoniTool/MoniTool_TypedValue.hxx b/src/MoniTool/MoniTool_TypedValue.hxx index 3cf608bb7b..f5180b114c 100644 --- a/src/MoniTool/MoniTool_TypedValue.hxx +++ b/src/MoniTool/MoniTool_TypedValue.hxx @@ -18,9 +18,7 @@ #define _MoniTool_TypedValue_HeaderFile #include -#include -#include #include #include #include @@ -30,8 +28,6 @@ #include #include #include -#include -#include #include class TCollection_HAsciiString; diff --git a/src/NCollection/NCollection_AccAllocator.cxx b/src/NCollection/NCollection_AccAllocator.cxx index 24a11a11b7..e7172ccff7 100644 --- a/src/NCollection/NCollection_AccAllocator.cxx +++ b/src/NCollection/NCollection_AccAllocator.cxx @@ -15,7 +15,6 @@ #include #include -#include IMPLEMENT_STANDARD_RTTIEXT(NCollection_AccAllocator,NCollection_BaseAllocator) diff --git a/src/NCollection/NCollection_AliasedArray.hxx b/src/NCollection/NCollection_AliasedArray.hxx index d3b297795c..678939bfc3 100644 --- a/src/NCollection/NCollection_AliasedArray.hxx +++ b/src/NCollection/NCollection_AliasedArray.hxx @@ -14,8 +14,6 @@ #ifndef _NCollection_AliasedArray_HeaderFile #define _NCollection_AliasedArray_HeaderFile -#include -#include #include #include #include diff --git a/src/NCollection/NCollection_BaseVector.cxx b/src/NCollection/NCollection_BaseVector.cxx index dd8cae7498..ba7f790021 100755 --- a/src/NCollection/NCollection_BaseVector.cxx +++ b/src/NCollection/NCollection_BaseVector.cxx @@ -16,7 +16,6 @@ #include #include -#include //======================================================================= //function : initV diff --git a/src/NCollection/NCollection_BaseVector.hxx b/src/NCollection/NCollection_BaseVector.hxx index 7c8941818a..26a41c7d7f 100755 --- a/src/NCollection/NCollection_BaseVector.hxx +++ b/src/NCollection/NCollection_BaseVector.hxx @@ -21,8 +21,6 @@ #include #include -#include - // this value defines the number of blocks that are reserved // when the capacity of vector is increased inline Standard_Integer GetCapacity (const Standard_Integer theIncrement) diff --git a/src/NCollection/NCollection_Buffer.hxx b/src/NCollection/NCollection_Buffer.hxx index c98182dda4..d17f5767b4 100644 --- a/src/NCollection/NCollection_Buffer.hxx +++ b/src/NCollection/NCollection_Buffer.hxx @@ -16,7 +16,6 @@ #ifndef _NCollection_Buffer_HeaderFile #define _NCollection_Buffer_HeaderFile -#include #include #include diff --git a/src/NCollection/NCollection_CellFilter.hxx b/src/NCollection/NCollection_CellFilter.hxx index 856cccb91f..f57a94273a 100644 --- a/src/NCollection/NCollection_CellFilter.hxx +++ b/src/NCollection/NCollection_CellFilter.hxx @@ -16,12 +16,9 @@ #ifndef NCollection_CellFilter_HeaderFile #define NCollection_CellFilter_HeaderFile -#include #include #include -#include #include -#include #include #include diff --git a/src/NCollection/NCollection_DefaultHasher.hxx b/src/NCollection/NCollection_DefaultHasher.hxx index aff6a472fb..6cbbf90de0 100644 --- a/src/NCollection/NCollection_DefaultHasher.hxx +++ b/src/NCollection/NCollection_DefaultHasher.hxx @@ -16,7 +16,6 @@ #define NCollection_DefaultHasher_HeaderFile #include -#include //======================================================================= //function : HashCode_Proxy diff --git a/src/NCollection/NCollection_DoubleMap.hxx b/src/NCollection/NCollection_DoubleMap.hxx index 76159a402c..397d675be5 100644 --- a/src/NCollection/NCollection_DoubleMap.hxx +++ b/src/NCollection/NCollection_DoubleMap.hxx @@ -16,12 +16,9 @@ #ifndef NCollection_DoubleMap_HeaderFile #define NCollection_DoubleMap_HeaderFile -#include #include #include -#include #include -#include #include #include diff --git a/src/NCollection/NCollection_Map.hxx b/src/NCollection/NCollection_Map.hxx index bc266a609d..339f1da6a7 100644 --- a/src/NCollection/NCollection_Map.hxx +++ b/src/NCollection/NCollection_Map.hxx @@ -16,7 +16,6 @@ #ifndef NCollection_Map_HeaderFile #define NCollection_Map_HeaderFile -#include #include #include #include diff --git a/src/NLPlate/NLPlate_HGPPConstraint.cxx b/src/NLPlate/NLPlate_HGPPConstraint.cxx index 753a86251e..b04d5f5107 100644 --- a/src/NLPlate/NLPlate_HGPPConstraint.cxx +++ b/src/NLPlate/NLPlate_HGPPConstraint.cxx @@ -15,8 +15,6 @@ // commercial license or contractual agreement. -#include -#include #include #include #include diff --git a/src/NLPlate/NLPlate_HGPPConstraint.hxx b/src/NLPlate/NLPlate_HGPPConstraint.hxx index 655a54aedf..d5c46890c7 100644 --- a/src/NLPlate/NLPlate_HGPPConstraint.hxx +++ b/src/NLPlate/NLPlate_HGPPConstraint.hxx @@ -18,12 +18,10 @@ #define _NLPlate_HGPPConstraint_HeaderFile #include -#include #include #include #include -#include #include class gp_XYZ; class Plate_D1; diff --git a/src/NLPlate/NLPlate_HPG0Constraint.cxx b/src/NLPlate/NLPlate_HPG0Constraint.cxx index fc7c4ae7e3..4f9503c5d1 100644 --- a/src/NLPlate/NLPlate_HPG0Constraint.cxx +++ b/src/NLPlate/NLPlate_HPG0Constraint.cxx @@ -15,8 +15,6 @@ // commercial license or contractual agreement. -#include -#include #include #include diff --git a/src/NLPlate/NLPlate_HPG0Constraint.hxx b/src/NLPlate/NLPlate_HPG0Constraint.hxx index 38981680af..9692c5d67e 100644 --- a/src/NLPlate/NLPlate_HPG0Constraint.hxx +++ b/src/NLPlate/NLPlate_HPG0Constraint.hxx @@ -18,10 +18,8 @@ #define _NLPlate_HPG0Constraint_HeaderFile #include -#include #include -#include #include #include class gp_XY; diff --git a/src/NLPlate/NLPlate_HPG0G1Constraint.cxx b/src/NLPlate/NLPlate_HPG0G1Constraint.cxx index ed808e7fbb..6deefe1b5d 100644 --- a/src/NLPlate/NLPlate_HPG0G1Constraint.cxx +++ b/src/NLPlate/NLPlate_HPG0G1Constraint.cxx @@ -15,8 +15,6 @@ // commercial license or contractual agreement. -#include -#include #include #include #include diff --git a/src/NLPlate/NLPlate_HPG0G1Constraint.hxx b/src/NLPlate/NLPlate_HPG0G1Constraint.hxx index 2631e0c4e2..252cfe3c40 100644 --- a/src/NLPlate/NLPlate_HPG0G1Constraint.hxx +++ b/src/NLPlate/NLPlate_HPG0G1Constraint.hxx @@ -18,7 +18,6 @@ #define _NLPlate_HPG0G1Constraint_HeaderFile #include -#include #include #include diff --git a/src/NLPlate/NLPlate_HPG0G2Constraint.cxx b/src/NLPlate/NLPlate_HPG0G2Constraint.cxx index 4d02f12021..758c2acb68 100644 --- a/src/NLPlate/NLPlate_HPG0G2Constraint.cxx +++ b/src/NLPlate/NLPlate_HPG0G2Constraint.cxx @@ -15,8 +15,6 @@ // commercial license or contractual agreement. -#include -#include #include #include #include diff --git a/src/NLPlate/NLPlate_HPG0G2Constraint.hxx b/src/NLPlate/NLPlate_HPG0G2Constraint.hxx index 9ac998444c..837723bfbe 100644 --- a/src/NLPlate/NLPlate_HPG0G2Constraint.hxx +++ b/src/NLPlate/NLPlate_HPG0G2Constraint.hxx @@ -18,7 +18,6 @@ #define _NLPlate_HPG0G2Constraint_HeaderFile #include -#include #include #include diff --git a/src/NLPlate/NLPlate_HPG0G3Constraint.cxx b/src/NLPlate/NLPlate_HPG0G3Constraint.cxx index 50f4d93e1d..0f9e6847c1 100644 --- a/src/NLPlate/NLPlate_HPG0G3Constraint.cxx +++ b/src/NLPlate/NLPlate_HPG0G3Constraint.cxx @@ -15,8 +15,6 @@ // commercial license or contractual agreement. -#include -#include #include #include #include diff --git a/src/NLPlate/NLPlate_HPG0G3Constraint.hxx b/src/NLPlate/NLPlate_HPG0G3Constraint.hxx index b4345a7451..34134d13dd 100644 --- a/src/NLPlate/NLPlate_HPG0G3Constraint.hxx +++ b/src/NLPlate/NLPlate_HPG0G3Constraint.hxx @@ -18,7 +18,6 @@ #define _NLPlate_HPG0G3Constraint_HeaderFile #include -#include #include #include diff --git a/src/NLPlate/NLPlate_HPG1Constraint.cxx b/src/NLPlate/NLPlate_HPG1Constraint.cxx index 49bafcf383..416f1d83e3 100644 --- a/src/NLPlate/NLPlate_HPG1Constraint.cxx +++ b/src/NLPlate/NLPlate_HPG1Constraint.cxx @@ -15,7 +15,6 @@ // commercial license or contractual agreement. -#include #include #include #include diff --git a/src/NLPlate/NLPlate_HPG1Constraint.hxx b/src/NLPlate/NLPlate_HPG1Constraint.hxx index 6303188900..694fb3e689 100644 --- a/src/NLPlate/NLPlate_HPG1Constraint.hxx +++ b/src/NLPlate/NLPlate_HPG1Constraint.hxx @@ -18,9 +18,7 @@ #define _NLPlate_HPG1Constraint_HeaderFile #include -#include -#include #include #include #include diff --git a/src/NLPlate/NLPlate_HPG2Constraint.cxx b/src/NLPlate/NLPlate_HPG2Constraint.cxx index 7c1c9ed119..8bc9e3b160 100644 --- a/src/NLPlate/NLPlate_HPG2Constraint.cxx +++ b/src/NLPlate/NLPlate_HPG2Constraint.cxx @@ -15,7 +15,6 @@ // commercial license or contractual agreement. -#include #include #include #include diff --git a/src/NLPlate/NLPlate_HPG2Constraint.hxx b/src/NLPlate/NLPlate_HPG2Constraint.hxx index 56695f22a0..13903a604d 100644 --- a/src/NLPlate/NLPlate_HPG2Constraint.hxx +++ b/src/NLPlate/NLPlate_HPG2Constraint.hxx @@ -18,7 +18,6 @@ #define _NLPlate_HPG2Constraint_HeaderFile #include -#include #include #include diff --git a/src/NLPlate/NLPlate_HPG3Constraint.cxx b/src/NLPlate/NLPlate_HPG3Constraint.cxx index e01041aa84..6055c9601c 100644 --- a/src/NLPlate/NLPlate_HPG3Constraint.cxx +++ b/src/NLPlate/NLPlate_HPG3Constraint.cxx @@ -15,7 +15,6 @@ // commercial license or contractual agreement. -#include #include #include #include diff --git a/src/NLPlate/NLPlate_HPG3Constraint.hxx b/src/NLPlate/NLPlate_HPG3Constraint.hxx index 023d3e57fb..f90bbe366d 100644 --- a/src/NLPlate/NLPlate_HPG3Constraint.hxx +++ b/src/NLPlate/NLPlate_HPG3Constraint.hxx @@ -18,7 +18,6 @@ #define _NLPlate_HPG3Constraint_HeaderFile #include -#include #include #include diff --git a/src/NLPlate/NLPlate_NLPlate.cxx b/src/NLPlate/NLPlate_NLPlate.cxx index f5937131c5..c3aa031dcf 100644 --- a/src/NLPlate/NLPlate_NLPlate.cxx +++ b/src/NLPlate/NLPlate_NLPlate.cxx @@ -23,8 +23,6 @@ #include #include #include -#include -#include #include #include #include diff --git a/src/NLPlate/NLPlate_NLPlate.hxx b/src/NLPlate/NLPlate_NLPlate.hxx index 53b9a9b643..930f9da026 100644 --- a/src/NLPlate/NLPlate_NLPlate.hxx +++ b/src/NLPlate/NLPlate_NLPlate.hxx @@ -23,9 +23,7 @@ #include #include -#include #include -#include class Geom_Surface; class NLPlate_HGPPConstraint; class gp_XYZ; diff --git a/src/OSD/FILES b/src/OSD/FILES index 63dd8a2893..396f3ebabc 100755 --- a/src/OSD/FILES +++ b/src/OSD/FILES @@ -19,16 +19,8 @@ OSD_Exception.hxx OSD_Exception_ACCESS_VIOLATION.hxx OSD_Exception_ARRAY_BOUNDS_EXCEEDED.hxx OSD_Exception_CTRL_BREAK.hxx -OSD_Exception_FLT_DENORMAL_OPERAND.hxx -OSD_Exception_FLT_DIVIDE_BY_ZERO.hxx -OSD_Exception_FLT_INEXACT_RESULT.hxx -OSD_Exception_FLT_INVALID_OPERATION.hxx -OSD_Exception_FLT_OVERFLOW.hxx -OSD_Exception_FLT_STACK_CHECK.hxx -OSD_Exception_FLT_UNDERFLOW.hxx OSD_Exception_ILLEGAL_INSTRUCTION.hxx OSD_Exception_IN_PAGE_ERROR.hxx -OSD_Exception_INT_DIVIDE_BY_ZERO.hxx OSD_Exception_INT_OVERFLOW.hxx OSD_Exception_INVALID_DISPOSITION.hxx OSD_Exception_NONCONTINUABLE_EXCEPTION.hxx diff --git a/src/OSD/OSD_Directory.cxx b/src/OSD/OSD_Directory.cxx index af5b7e13f4..f2013a989f 100644 --- a/src/OSD/OSD_Directory.cxx +++ b/src/OSD/OSD_Directory.cxx @@ -19,7 +19,6 @@ #include #include #include -#include #ifdef _WIN32 #include diff --git a/src/OSD/OSD_DirectoryIterator.cxx b/src/OSD/OSD_DirectoryIterator.cxx index 9e349588bc..51060492f9 100644 --- a/src/OSD/OSD_DirectoryIterator.cxx +++ b/src/OSD/OSD_DirectoryIterator.cxx @@ -184,9 +184,7 @@ Standard_Integer OSD_DirectoryIterator::Error()const{ #include -#include #include -#include #include #include #include diff --git a/src/OSD/OSD_DirectoryIterator.hxx b/src/OSD/OSD_DirectoryIterator.hxx index 8a6dd14410..33430bdaa0 100644 --- a/src/OSD/OSD_DirectoryIterator.hxx +++ b/src/OSD/OSD_DirectoryIterator.hxx @@ -22,9 +22,7 @@ #include #include -#include #include -#include #include #include class OSD_Path; diff --git a/src/OSD/OSD_Disk.cxx b/src/OSD/OSD_Disk.cxx index ab779b9e59..1900bf327d 100644 --- a/src/OSD/OSD_Disk.cxx +++ b/src/OSD/OSD_Disk.cxx @@ -14,12 +14,9 @@ #include -#include #include #include -#include #include -#include #include #ifdef _WIN32 diff --git a/src/OSD/OSD_Environment.cxx b/src/OSD/OSD_Environment.cxx index 2a8794db65..55259fe2e7 100644 --- a/src/OSD/OSD_Environment.cxx +++ b/src/OSD/OSD_Environment.cxx @@ -236,8 +236,6 @@ Standard_Integer OSD_Environment::Error() const #include -#include - #include #include #include diff --git a/src/OSD/OSD_Environment.hxx b/src/OSD/OSD_Environment.hxx index adcff00d4d..603def1337 100644 --- a/src/OSD/OSD_Environment.hxx +++ b/src/OSD/OSD_Environment.hxx @@ -23,8 +23,6 @@ #include #include -#include -#include //! Management of system environment variables diff --git a/src/OSD/OSD_Error.hxx b/src/OSD/OSD_Error.hxx index accd66e392..8e0ea5c5b7 100644 --- a/src/OSD/OSD_Error.hxx +++ b/src/OSD/OSD_Error.hxx @@ -22,9 +22,7 @@ #include #include -#include #include -#include //! Accurate management of OSD specific errors. diff --git a/src/OSD/OSD_Exception_CTRL_BREAK.hxx b/src/OSD/OSD_Exception_CTRL_BREAK.hxx index f696f28de5..6cd46290db 100644 --- a/src/OSD/OSD_Exception_CTRL_BREAK.hxx +++ b/src/OSD/OSD_Exception_CTRL_BREAK.hxx @@ -16,7 +16,6 @@ #define _OSD_Exception_CTRL_BREAK_HeaderFile #include -#include #include #include diff --git a/src/OSD/OSD_Exception_FLT_DENORMAL_OPERAND.hxx b/src/OSD/OSD_Exception_FLT_DENORMAL_OPERAND.hxx deleted file mode 100644 index a1fadb8764..0000000000 --- a/src/OSD/OSD_Exception_FLT_DENORMAL_OPERAND.hxx +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) 1992-1999 Matra Datavision -// Copyright (c) 1999-2014 OPEN CASCADE SAS -// -// This file is part of Open CASCADE Technology software library. -// -// This library is free software; you can redistribute it and/or modify it under -// the terms of the GNU Lesser General Public License version 2.1 as published -// by the Free Software Foundation, with special exception defined in the file -// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT -// distribution for complete text of the license and disclaimer of any warranty. -// -// Alternatively, this file may be used under the terms of Open CASCADE -// commercial license or contractual agreement. - -#ifndef _OSD_Exception_FLT_DENORMAL_OPERAND_HeaderFile -#define _OSD_Exception_FLT_DENORMAL_OPERAND_HeaderFile - -#include -#include -#include -#include - -class OSD_Exception_FLT_DENORMAL_OPERAND; -DEFINE_STANDARD_HANDLE(OSD_Exception_FLT_DENORMAL_OPERAND, OSD_Exception) - -#if !defined No_Exception && !defined No_OSD_Exception_FLT_DENORMAL_OPERAND - #define OSD_Exception_FLT_DENORMAL_OPERAND_Raise_if(CONDITION, MESSAGE) \ - if (CONDITION) throw OSD_Exception_FLT_DENORMAL_OPERAND(MESSAGE); -#else - #define OSD_Exception_FLT_DENORMAL_OPERAND_Raise_if(CONDITION, MESSAGE) -#endif - -DEFINE_STANDARD_EXCEPTION(OSD_Exception_FLT_DENORMAL_OPERAND, OSD_Exception) - -#endif // _OSD_Exception_FLT_DENORMAL_OPERAND_HeaderFile diff --git a/src/OSD/OSD_Exception_FLT_DIVIDE_BY_ZERO.hxx b/src/OSD/OSD_Exception_FLT_DIVIDE_BY_ZERO.hxx deleted file mode 100644 index 78de87cc62..0000000000 --- a/src/OSD/OSD_Exception_FLT_DIVIDE_BY_ZERO.hxx +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) 1992-1999 Matra Datavision -// Copyright (c) 1999-2014 OPEN CASCADE SAS -// -// This file is part of Open CASCADE Technology software library. -// -// This library is free software; you can redistribute it and/or modify it under -// the terms of the GNU Lesser General Public License version 2.1 as published -// by the Free Software Foundation, with special exception defined in the file -// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT -// distribution for complete text of the license and disclaimer of any warranty. -// -// Alternatively, this file may be used under the terms of Open CASCADE -// commercial license or contractual agreement. - -#ifndef _OSD_Exception_FLT_DIVIDE_BY_ZERO_HeaderFile -#define _OSD_Exception_FLT_DIVIDE_BY_ZERO_HeaderFile - -#include -#include -#include -#include - -class OSD_Exception_FLT_DIVIDE_BY_ZERO; -DEFINE_STANDARD_HANDLE(OSD_Exception_FLT_DIVIDE_BY_ZERO, OSD_Exception) - -#if !defined No_Exception && !defined No_OSD_Exception_FLT_DIVIDE_BY_ZERO - #define OSD_Exception_FLT_DIVIDE_BY_ZERO_Raise_if(CONDITION, MESSAGE) \ - if (CONDITION) throw OSD_Exception_FLT_DIVIDE_BY_ZERO(MESSAGE); -#else - #define OSD_Exception_FLT_DIVIDE_BY_ZERO_Raise_if(CONDITION, MESSAGE) -#endif - -DEFINE_STANDARD_EXCEPTION(OSD_Exception_FLT_DIVIDE_BY_ZERO, OSD_Exception) - -#endif // _OSD_Exception_FLT_DIVIDE_BY_ZERO_HeaderFile diff --git a/src/OSD/OSD_Exception_FLT_INEXACT_RESULT.hxx b/src/OSD/OSD_Exception_FLT_INEXACT_RESULT.hxx deleted file mode 100644 index b6906bc24a..0000000000 --- a/src/OSD/OSD_Exception_FLT_INEXACT_RESULT.hxx +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) 1992-1999 Matra Datavision -// Copyright (c) 1999-2014 OPEN CASCADE SAS -// -// This file is part of Open CASCADE Technology software library. -// -// This library is free software; you can redistribute it and/or modify it under -// the terms of the GNU Lesser General Public License version 2.1 as published -// by the Free Software Foundation, with special exception defined in the file -// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT -// distribution for complete text of the license and disclaimer of any warranty. -// -// Alternatively, this file may be used under the terms of Open CASCADE -// commercial license or contractual agreement. - -#ifndef _OSD_Exception_FLT_INEXACT_RESULT_HeaderFile -#define _OSD_Exception_FLT_INEXACT_RESULT_HeaderFile - -#include -#include -#include -#include - -class OSD_Exception_FLT_INEXACT_RESULT; -DEFINE_STANDARD_HANDLE(OSD_Exception_FLT_INEXACT_RESULT, OSD_Exception) - -#if !defined No_Exception && !defined No_OSD_Exception_FLT_INEXACT_RESULT - #define OSD_Exception_FLT_INEXACT_RESULT_Raise_if(CONDITION, MESSAGE) \ - if (CONDITION) throw OSD_Exception_FLT_INEXACT_RESULT(MESSAGE); -#else - #define OSD_Exception_FLT_INEXACT_RESULT_Raise_if(CONDITION, MESSAGE) -#endif - -DEFINE_STANDARD_EXCEPTION(OSD_Exception_FLT_INEXACT_RESULT, OSD_Exception) - -#endif // _OSD_Exception_FLT_INEXACT_RESULT_HeaderFile diff --git a/src/OSD/OSD_Exception_FLT_INVALID_OPERATION.hxx b/src/OSD/OSD_Exception_FLT_INVALID_OPERATION.hxx deleted file mode 100644 index 35f75fff87..0000000000 --- a/src/OSD/OSD_Exception_FLT_INVALID_OPERATION.hxx +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) 1992-1999 Matra Datavision -// Copyright (c) 1999-2014 OPEN CASCADE SAS -// -// This file is part of Open CASCADE Technology software library. -// -// This library is free software; you can redistribute it and/or modify it under -// the terms of the GNU Lesser General Public License version 2.1 as published -// by the Free Software Foundation, with special exception defined in the file -// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT -// distribution for complete text of the license and disclaimer of any warranty. -// -// Alternatively, this file may be used under the terms of Open CASCADE -// commercial license or contractual agreement. - -#ifndef _OSD_Exception_FLT_INVALID_OPERATION_HeaderFile -#define _OSD_Exception_FLT_INVALID_OPERATION_HeaderFile - -#include -#include -#include -#include - -class OSD_Exception_FLT_INVALID_OPERATION; -DEFINE_STANDARD_HANDLE(OSD_Exception_FLT_INVALID_OPERATION, OSD_Exception) - -#if !defined No_Exception && !defined No_OSD_Exception_FLT_INVALID_OPERATION - #define OSD_Exception_FLT_INVALID_OPERATION_Raise_if(CONDITION, MESSAGE) \ - if (CONDITION) throw OSD_Exception_FLT_INVALID_OPERATION(MESSAGE); -#else - #define OSD_Exception_FLT_INVALID_OPERATION_Raise_if(CONDITION, MESSAGE) -#endif - -DEFINE_STANDARD_EXCEPTION(OSD_Exception_FLT_INVALID_OPERATION, OSD_Exception) - -#endif // _OSD_Exception_FLT_INVALID_OPERATION_HeaderFile diff --git a/src/OSD/OSD_Exception_FLT_OVERFLOW.hxx b/src/OSD/OSD_Exception_FLT_OVERFLOW.hxx deleted file mode 100644 index 5821938310..0000000000 --- a/src/OSD/OSD_Exception_FLT_OVERFLOW.hxx +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) 1992-1999 Matra Datavision -// Copyright (c) 1999-2014 OPEN CASCADE SAS -// -// This file is part of Open CASCADE Technology software library. -// -// This library is free software; you can redistribute it and/or modify it under -// the terms of the GNU Lesser General Public License version 2.1 as published -// by the Free Software Foundation, with special exception defined in the file -// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT -// distribution for complete text of the license and disclaimer of any warranty. -// -// Alternatively, this file may be used under the terms of Open CASCADE -// commercial license or contractual agreement. - -#ifndef _OSD_Exception_FLT_OVERFLOW_HeaderFile -#define _OSD_Exception_FLT_OVERFLOW_HeaderFile - -#include -#include -#include -#include - -class OSD_Exception_FLT_OVERFLOW; -DEFINE_STANDARD_HANDLE(OSD_Exception_FLT_OVERFLOW, OSD_Exception) - -#if !defined No_Exception && !defined No_OSD_Exception_FLT_OVERFLOW - #define OSD_Exception_FLT_OVERFLOW_Raise_if(CONDITION, MESSAGE) \ - if (CONDITION) throw OSD_Exception_FLT_OVERFLOW(MESSAGE); -#else - #define OSD_Exception_FLT_OVERFLOW_Raise_if(CONDITION, MESSAGE) -#endif - -DEFINE_STANDARD_EXCEPTION(OSD_Exception_FLT_OVERFLOW, OSD_Exception) - -#endif // _OSD_Exception_FLT_OVERFLOW_HeaderFile diff --git a/src/OSD/OSD_Exception_FLT_STACK_CHECK.hxx b/src/OSD/OSD_Exception_FLT_STACK_CHECK.hxx deleted file mode 100644 index e311c02765..0000000000 --- a/src/OSD/OSD_Exception_FLT_STACK_CHECK.hxx +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) 1992-1999 Matra Datavision -// Copyright (c) 1999-2014 OPEN CASCADE SAS -// -// This file is part of Open CASCADE Technology software library. -// -// This library is free software; you can redistribute it and/or modify it under -// the terms of the GNU Lesser General Public License version 2.1 as published -// by the Free Software Foundation, with special exception defined in the file -// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT -// distribution for complete text of the license and disclaimer of any warranty. -// -// Alternatively, this file may be used under the terms of Open CASCADE -// commercial license or contractual agreement. - -#ifndef _OSD_Exception_FLT_STACK_CHECK_HeaderFile -#define _OSD_Exception_FLT_STACK_CHECK_HeaderFile - -#include -#include -#include -#include - -class OSD_Exception_FLT_STACK_CHECK; -DEFINE_STANDARD_HANDLE(OSD_Exception_FLT_STACK_CHECK, OSD_Exception) - -#if !defined No_Exception && !defined No_OSD_Exception_FLT_STACK_CHECK - #define OSD_Exception_FLT_STACK_CHECK_Raise_if(CONDITION, MESSAGE) \ - if (CONDITION) throw OSD_Exception_FLT_STACK_CHECK(MESSAGE); -#else - #define OSD_Exception_FLT_STACK_CHECK_Raise_if(CONDITION, MESSAGE) -#endif - -DEFINE_STANDARD_EXCEPTION(OSD_Exception_FLT_STACK_CHECK, OSD_Exception) - -#endif // _OSD_Exception_FLT_STACK_CHECK_HeaderFile diff --git a/src/OSD/OSD_Exception_FLT_UNDERFLOW.hxx b/src/OSD/OSD_Exception_FLT_UNDERFLOW.hxx deleted file mode 100644 index a5081c9137..0000000000 --- a/src/OSD/OSD_Exception_FLT_UNDERFLOW.hxx +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) 1992-1999 Matra Datavision -// Copyright (c) 1999-2014 OPEN CASCADE SAS -// -// This file is part of Open CASCADE Technology software library. -// -// This library is free software; you can redistribute it and/or modify it under -// the terms of the GNU Lesser General Public License version 2.1 as published -// by the Free Software Foundation, with special exception defined in the file -// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT -// distribution for complete text of the license and disclaimer of any warranty. -// -// Alternatively, this file may be used under the terms of Open CASCADE -// commercial license or contractual agreement. - -#ifndef _OSD_Exception_FLT_UNDERFLOW_HeaderFile -#define _OSD_Exception_FLT_UNDERFLOW_HeaderFile - -#include -#include -#include -#include - -class OSD_Exception_FLT_UNDERFLOW; -DEFINE_STANDARD_HANDLE(OSD_Exception_FLT_UNDERFLOW, OSD_Exception) - -#if !defined No_Exception && !defined No_OSD_Exception_FLT_UNDERFLOW - #define OSD_Exception_FLT_UNDERFLOW_Raise_if(CONDITION, MESSAGE) \ - if (CONDITION) throw OSD_Exception_FLT_UNDERFLOW(MESSAGE); -#else - #define OSD_Exception_FLT_UNDERFLOW_Raise_if(CONDITION, MESSAGE) -#endif - -DEFINE_STANDARD_EXCEPTION(OSD_Exception_FLT_UNDERFLOW, OSD_Exception) - -#endif // _OSD_Exception_FLT_UNDERFLOW_HeaderFile diff --git a/src/OSD/OSD_Exception_INT_DIVIDE_BY_ZERO.hxx b/src/OSD/OSD_Exception_INT_DIVIDE_BY_ZERO.hxx deleted file mode 100644 index a07148ba58..0000000000 --- a/src/OSD/OSD_Exception_INT_DIVIDE_BY_ZERO.hxx +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) 1992-1999 Matra Datavision -// Copyright (c) 1999-2014 OPEN CASCADE SAS -// -// This file is part of Open CASCADE Technology software library. -// -// This library is free software; you can redistribute it and/or modify it under -// the terms of the GNU Lesser General Public License version 2.1 as published -// by the Free Software Foundation, with special exception defined in the file -// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT -// distribution for complete text of the license and disclaimer of any warranty. -// -// Alternatively, this file may be used under the terms of Open CASCADE -// commercial license or contractual agreement. - -#ifndef _OSD_Exception_INT_DIVIDE_BY_ZERO_HeaderFile -#define _OSD_Exception_INT_DIVIDE_BY_ZERO_HeaderFile - -#include -#include -#include -#include - -class OSD_Exception_INT_DIVIDE_BY_ZERO; -DEFINE_STANDARD_HANDLE(OSD_Exception_INT_DIVIDE_BY_ZERO, OSD_Exception) - -#if !defined No_Exception && !defined No_OSD_Exception_INT_DIVIDE_BY_ZERO - #define OSD_Exception_INT_DIVIDE_BY_ZERO_Raise_if(CONDITION, MESSAGE) \ - if (CONDITION) throw OSD_Exception_INT_DIVIDE_BY_ZERO(MESSAGE); -#else - #define OSD_Exception_INT_DIVIDE_BY_ZERO_Raise_if(CONDITION, MESSAGE) -#endif - -DEFINE_STANDARD_EXCEPTION(OSD_Exception_INT_DIVIDE_BY_ZERO, OSD_Exception) - -#endif // _OSD_Exception_INT_DIVIDE_BY_ZERO_HeaderFile diff --git a/src/OSD/OSD_File.cxx b/src/OSD/OSD_File.cxx index 967a7c7e7d..db63054d1d 100644 --- a/src/OSD/OSD_File.cxx +++ b/src/OSD/OSD_File.cxx @@ -20,7 +20,6 @@ #include #include -#include #include #include #include @@ -31,10 +30,7 @@ #include - #include - #include - - #include +#include #define ACE_HEADER_SIZE (sizeof(ACCESS_ALLOWED_ACE) - sizeof (DWORD)) diff --git a/src/OSD/OSD_FileIterator.cxx b/src/OSD/OSD_FileIterator.cxx index d77ca7e84f..5893545994 100644 --- a/src/OSD/OSD_FileIterator.cxx +++ b/src/OSD/OSD_FileIterator.cxx @@ -258,9 +258,7 @@ Standard_Integer OSD_FileIterator::Error()const{ #include -#include #include -#include #include #include #include diff --git a/src/OSD/OSD_Host.hxx b/src/OSD/OSD_Host.hxx index 385fb809ab..a129bc40dd 100644 --- a/src/OSD/OSD_Host.hxx +++ b/src/OSD/OSD_Host.hxx @@ -24,9 +24,7 @@ #include #include #include -#include #include -#include //! Carries information about a Host diff --git a/src/OSD/OSD_MAllocHook.hxx b/src/OSD/OSD_MAllocHook.hxx index a9a1c63a9f..d01f824bac 100644 --- a/src/OSD/OSD_MAllocHook.hxx +++ b/src/OSD/OSD_MAllocHook.hxx @@ -16,9 +16,7 @@ #ifndef _OSD_MAllocHook_HeaderFile #define _OSD_MAllocHook_HeaderFile -#include #include -#include #include /** diff --git a/src/OSD/OSD_MemInfo.cxx b/src/OSD/OSD_MemInfo.cxx index d9bb913986..8a9f10e09d 100644 --- a/src/OSD/OSD_MemInfo.cxx +++ b/src/OSD/OSD_MemInfo.cxx @@ -31,10 +31,6 @@ #include #endif -#include -#include -#include - #include #if defined(__EMSCRIPTEN__) diff --git a/src/OSD/OSD_Parallel.hxx b/src/OSD/OSD_Parallel.hxx index 2dab32050f..7f24cf039c 100644 --- a/src/OSD/OSD_Parallel.hxx +++ b/src/OSD/OSD_Parallel.hxx @@ -17,7 +17,6 @@ #include #include #include -#include //! @brief Simple tool for code parallelization. //! diff --git a/src/OSD/OSD_Path.cxx b/src/OSD/OSD_Path.cxx index eab689b75b..e034e9e91d 100644 --- a/src/OSD/OSD_Path.cxx +++ b/src/OSD/OSD_Path.cxx @@ -13,12 +13,8 @@ // commercial license or contractual agreement. -#include #include #include -#include -#include -#include #include static OSD_SysType whereAmI() diff --git a/src/OSD/OSD_PerfMeter.cxx b/src/OSD/OSD_PerfMeter.cxx index d8438ff79f..f20fed96ca 100644 --- a/src/OSD/OSD_PerfMeter.cxx +++ b/src/OSD/OSD_PerfMeter.cxx @@ -31,8 +31,6 @@ #include #include #include -#include -#include #include #include diff --git a/src/OSD/OSD_Process.cxx b/src/OSD/OSD_Process.cxx index acd7f5ca21..3037e152d4 100644 --- a/src/OSD/OSD_Process.cxx +++ b/src/OSD/OSD_Process.cxx @@ -28,7 +28,6 @@ #include #include #include -#include #include #include diff --git a/src/OSD/OSD_Protection.hxx b/src/OSD/OSD_Protection.hxx index db88d0f6d2..cc4c444975 100644 --- a/src/OSD/OSD_Protection.hxx +++ b/src/OSD/OSD_Protection.hxx @@ -22,7 +22,6 @@ #include #include -#include //! This class provides data to manage file protection diff --git a/src/OSD/OSD_SIGBUS.hxx b/src/OSD/OSD_SIGBUS.hxx index 0f034eeaa1..4067cb9d0e 100644 --- a/src/OSD/OSD_SIGBUS.hxx +++ b/src/OSD/OSD_SIGBUS.hxx @@ -16,7 +16,6 @@ #define _OSD_SIGBUS_HeaderFile #include -#include #include #include diff --git a/src/OSD/OSD_SIGHUP.hxx b/src/OSD/OSD_SIGHUP.hxx index f09bc6cc22..d734da8a00 100644 --- a/src/OSD/OSD_SIGHUP.hxx +++ b/src/OSD/OSD_SIGHUP.hxx @@ -16,7 +16,6 @@ #define _OSD_SIGHUP_HeaderFile #include -#include #include #include diff --git a/src/OSD/OSD_SIGILL.hxx b/src/OSD/OSD_SIGILL.hxx index e17035828c..2623f164bd 100644 --- a/src/OSD/OSD_SIGILL.hxx +++ b/src/OSD/OSD_SIGILL.hxx @@ -16,7 +16,6 @@ #define _OSD_SIGILL_HeaderFile #include -#include #include #include diff --git a/src/OSD/OSD_SIGINT.hxx b/src/OSD/OSD_SIGINT.hxx index 0f7c9a1f4e..a8caabb787 100644 --- a/src/OSD/OSD_SIGINT.hxx +++ b/src/OSD/OSD_SIGINT.hxx @@ -16,7 +16,6 @@ #define _OSD_SIGINT_HeaderFile #include -#include #include #include diff --git a/src/OSD/OSD_SIGKILL.hxx b/src/OSD/OSD_SIGKILL.hxx index 5b633de209..0ecd2f63f2 100644 --- a/src/OSD/OSD_SIGKILL.hxx +++ b/src/OSD/OSD_SIGKILL.hxx @@ -16,7 +16,6 @@ #define _OSD_SIGKILL_HeaderFile #include -#include #include #include diff --git a/src/OSD/OSD_SIGQUIT.hxx b/src/OSD/OSD_SIGQUIT.hxx index ee7b071704..75ae453937 100644 --- a/src/OSD/OSD_SIGQUIT.hxx +++ b/src/OSD/OSD_SIGQUIT.hxx @@ -16,7 +16,6 @@ #define _OSD_SIGQUIT_HeaderFile #include -#include #include #include diff --git a/src/OSD/OSD_SIGSYS.hxx b/src/OSD/OSD_SIGSYS.hxx index baf1027579..d59e6f3e94 100644 --- a/src/OSD/OSD_SIGSYS.hxx +++ b/src/OSD/OSD_SIGSYS.hxx @@ -16,7 +16,6 @@ #define _OSD_SIGSYS_HeaderFile #include -#include #include #include diff --git a/src/OSD/OSD_SharedLibrary.hxx b/src/OSD/OSD_SharedLibrary.hxx index 28c040106a..212d25766b 100644 --- a/src/OSD/OSD_SharedLibrary.hxx +++ b/src/OSD/OSD_SharedLibrary.hxx @@ -19,12 +19,9 @@ #include #include -#include #include #include -#include -#include #include #include diff --git a/src/OSD/OSD_StreamBuffer.hxx b/src/OSD/OSD_StreamBuffer.hxx index 97915a67f5..8133628392 100644 --- a/src/OSD/OSD_StreamBuffer.hxx +++ b/src/OSD/OSD_StreamBuffer.hxx @@ -14,10 +14,6 @@ #ifndef _OSD_StreamBuffer_HeaderFile #define _OSD_StreamBuffer_HeaderFile -#include - -#include -#include #include #include diff --git a/src/OSD/OSD_Thread.hxx b/src/OSD/OSD_Thread.hxx index 527f440594..f77a99d521 100644 --- a/src/OSD/OSD_Thread.hxx +++ b/src/OSD/OSD_Thread.hxx @@ -23,9 +23,7 @@ #include #include #include -#include #include -#include //! A simple platform-intependent interface to execute diff --git a/src/OSD/OSD_Timer.hxx b/src/OSD/OSD_Timer.hxx index 5ea0bab6d4..a56f91ea9d 100644 --- a/src/OSD/OSD_Timer.hxx +++ b/src/OSD/OSD_Timer.hxx @@ -24,7 +24,6 @@ #include #include #include -#include //! Working on heterogeneous platforms diff --git a/src/OSD/OSD_signal.cxx b/src/OSD/OSD_signal.cxx index 007f5ccaa9..7da3f19004 100644 --- a/src/OSD/OSD_signal.cxx +++ b/src/OSD/OSD_signal.cxx @@ -73,7 +73,6 @@ void OSD::SetSignalStackTraceLength (Standard_Integer theLength) #include #include #include -#include #include #include #include @@ -86,8 +85,6 @@ void OSD::SetSignalStackTraceLength (Standard_Integer theLength) #include #include -#include - #ifdef _MSC_VER #include #include diff --git a/src/OpenGl/OpenGl_Aspects.hxx b/src/OpenGl/OpenGl_Aspects.hxx index 81516b9b76..04c9cc0a31 100644 --- a/src/OpenGl/OpenGl_Aspects.hxx +++ b/src/OpenGl/OpenGl_Aspects.hxx @@ -19,7 +19,6 @@ #include #include #include -#include //! The element holding Graphic3d_Aspects. class OpenGl_Aspects : public OpenGl_Element diff --git a/src/OpenGl/OpenGl_AspectsProgram.cxx b/src/OpenGl/OpenGl_AspectsProgram.cxx index a8d608d37f..054f8dbb32 100644 --- a/src/OpenGl/OpenGl_AspectsProgram.cxx +++ b/src/OpenGl/OpenGl_AspectsProgram.cxx @@ -13,7 +13,6 @@ #include -#include #include #include diff --git a/src/OpenGl/OpenGl_AspectsTextureSet.cxx b/src/OpenGl/OpenGl_AspectsTextureSet.cxx index e1876f2c9b..8e76b32bc7 100644 --- a/src/OpenGl/OpenGl_AspectsTextureSet.cxx +++ b/src/OpenGl/OpenGl_AspectsTextureSet.cxx @@ -14,14 +14,11 @@ #include #include -#include #include #include #include -#include - namespace { static const TCollection_AsciiString THE_EMPTY_KEY; diff --git a/src/OpenGl/OpenGl_AspectsTextureSet.hxx b/src/OpenGl/OpenGl_AspectsTextureSet.hxx index 0aa2c29c1a..1d3a387906 100644 --- a/src/OpenGl/OpenGl_AspectsTextureSet.hxx +++ b/src/OpenGl/OpenGl_AspectsTextureSet.hxx @@ -16,7 +16,6 @@ #include #include -#include class OpenGl_Context; class OpenGl_TextureSet; diff --git a/src/OpenGl/OpenGl_BackgroundArray.cxx b/src/OpenGl/OpenGl_BackgroundArray.cxx index 90dac5020d..b005bf285e 100644 --- a/src/OpenGl/OpenGl_BackgroundArray.cxx +++ b/src/OpenGl/OpenGl_BackgroundArray.cxx @@ -18,7 +18,6 @@ #include #include #include -#include // ======================================================================= // method : Constructor diff --git a/src/OpenGl/OpenGl_Buffer.cxx b/src/OpenGl/OpenGl_Buffer.cxx index 4428ce10f3..4f37384af1 100644 --- a/src/OpenGl/OpenGl_Buffer.cxx +++ b/src/OpenGl/OpenGl_Buffer.cxx @@ -15,7 +15,6 @@ #include #include -#include #include #include diff --git a/src/OpenGl/OpenGl_CappingAlgo.cxx b/src/OpenGl/OpenGl_CappingAlgo.cxx index 94bd57c1a3..93a9b4c9d3 100755 --- a/src/OpenGl/OpenGl_CappingAlgo.cxx +++ b/src/OpenGl/OpenGl_CappingAlgo.cxx @@ -16,11 +16,9 @@ #include #include -#include +#include #include -#include #include -#include #include #include diff --git a/src/OpenGl/OpenGl_CappingPlaneResource.cxx b/src/OpenGl/OpenGl_CappingPlaneResource.cxx index bc2c23aa28..d028ac5f5c 100755 --- a/src/OpenGl/OpenGl_CappingPlaneResource.cxx +++ b/src/OpenGl/OpenGl_CappingPlaneResource.cxx @@ -18,7 +18,6 @@ #include #include #include -#include IMPLEMENT_STANDARD_RTTIEXT(OpenGl_CappingPlaneResource,OpenGl_Resource) diff --git a/src/OpenGl/OpenGl_Context.cxx b/src/OpenGl/OpenGl_Context.cxx index 90de0f20cb..e3655c8d1a 100644 --- a/src/OpenGl/OpenGl_Context.cxx +++ b/src/OpenGl/OpenGl_Context.cxx @@ -32,12 +32,12 @@ #include #include #include -#include #include #include #include #include +#include #include #include #include diff --git a/src/OpenGl/OpenGl_Context.hxx b/src/OpenGl/OpenGl_Context.hxx index b7c3972f79..2d42736de5 100644 --- a/src/OpenGl/OpenGl_Context.hxx +++ b/src/OpenGl/OpenGl_Context.hxx @@ -16,20 +16,11 @@ #ifndef OpenGl_Context_HeaderFile #define OpenGl_Context_HeaderFile -#include -#include #include #include #include #include -#include -#include #include -#include -#include -#include -#include -#include #include #include #include diff --git a/src/OpenGl/OpenGl_Element.hxx b/src/OpenGl/OpenGl_Element.hxx index b16c835b26..1e8ea28f7c 100644 --- a/src/OpenGl/OpenGl_Element.hxx +++ b/src/OpenGl/OpenGl_Element.hxx @@ -16,7 +16,6 @@ #ifndef OpenGl_Element_HeaderFile #define OpenGl_Element_HeaderFile -#include #include class Graphic3d_FrameStatsDataTmp; diff --git a/src/OpenGl/OpenGl_Flipper.cxx b/src/OpenGl/OpenGl_Flipper.cxx index ff45c16cf5..2f8a5d5b8c 100755 --- a/src/OpenGl/OpenGl_Flipper.cxx +++ b/src/OpenGl/OpenGl_Flipper.cxx @@ -15,7 +15,6 @@ #include -#include #include #include #include diff --git a/src/OpenGl/OpenGl_Font.cxx b/src/OpenGl/OpenGl_Font.cxx index 2a9b759f44..c7b7a1f9fd 100755 --- a/src/OpenGl/OpenGl_Font.cxx +++ b/src/OpenGl/OpenGl_Font.cxx @@ -19,7 +19,6 @@ #include #include #include -#include IMPLEMENT_STANDARD_RTTIEXT(OpenGl_Font,OpenGl_Resource) diff --git a/src/OpenGl/OpenGl_FrameBuffer.cxx b/src/OpenGl/OpenGl_FrameBuffer.cxx index 066118c772..ca4ac757e2 100644 --- a/src/OpenGl/OpenGl_FrameBuffer.cxx +++ b/src/OpenGl/OpenGl_FrameBuffer.cxx @@ -20,7 +20,6 @@ #include #include -#include IMPLEMENT_STANDARD_RTTIEXT(OpenGl_FrameBuffer, OpenGl_NamedResource) diff --git a/src/OpenGl/OpenGl_FrameStats.cxx b/src/OpenGl/OpenGl_FrameStats.cxx index b0a96f2afd..39c9d39857 100644 --- a/src/OpenGl/OpenGl_FrameStats.cxx +++ b/src/OpenGl/OpenGl_FrameStats.cxx @@ -13,13 +13,11 @@ #include -#include #include #include #include #include #include -#include IMPLEMENT_STANDARD_RTTIEXT(OpenGl_FrameStats, Graphic3d_FrameStats) diff --git a/src/OpenGl/OpenGl_FrameStatsPrs.hxx b/src/OpenGl/OpenGl_FrameStatsPrs.hxx index 67bcacfa69..297fd50c05 100644 --- a/src/OpenGl/OpenGl_FrameStatsPrs.hxx +++ b/src/OpenGl/OpenGl_FrameStatsPrs.hxx @@ -14,6 +14,7 @@ #ifndef _OpenGl_FrameStatsPrs_HeaderFile #define _OpenGl_FrameStatsPrs_HeaderFile +#include #include #include diff --git a/src/OpenGl/OpenGl_GlFunctions.cxx b/src/OpenGl/OpenGl_GlFunctions.cxx index e3b45a46d0..d20d5d2c22 100644 --- a/src/OpenGl/OpenGl_GlFunctions.cxx +++ b/src/OpenGl/OpenGl_GlFunctions.cxx @@ -24,8 +24,6 @@ #include #include -#include - #if !defined(HAVE_EGL) && defined(HAVE_XLIB) #include #endif diff --git a/src/OpenGl/OpenGl_GraduatedTrihedron.cxx b/src/OpenGl/OpenGl_GraduatedTrihedron.cxx index 813f840185..8a090facb1 100755 --- a/src/OpenGl/OpenGl_GraduatedTrihedron.cxx +++ b/src/OpenGl/OpenGl_GraduatedTrihedron.cxx @@ -13,18 +13,13 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -#include - #include #include #include -#include #include #include #include -#include -#include #include #include diff --git a/src/OpenGl/OpenGl_GraduatedTrihedron.hxx b/src/OpenGl/OpenGl_GraduatedTrihedron.hxx index 85528615ca..39f010d87a 100755 --- a/src/OpenGl/OpenGl_GraduatedTrihedron.hxx +++ b/src/OpenGl/OpenGl_GraduatedTrihedron.hxx @@ -17,9 +17,6 @@ #define OpenGl_GraduatedTrihedron_HeaderFile #include -#include -#include -#include #include #include #include diff --git a/src/OpenGl/OpenGl_GraphicDriver.cxx b/src/OpenGl/OpenGl_GraphicDriver.cxx index ebd29d5c9b..a1b5b2be5d 100644 --- a/src/OpenGl/OpenGl_GraphicDriver.cxx +++ b/src/OpenGl/OpenGl_GraphicDriver.cxx @@ -19,19 +19,12 @@ #include #include -#include -#include -#include #include -#include #include #include -#include #include -#include #include -#include #include #include diff --git a/src/OpenGl/OpenGl_GraphicDriver.hxx b/src/OpenGl/OpenGl_GraphicDriver.hxx index 1bde0b43dd..ca7b4fcfa1 100644 --- a/src/OpenGl/OpenGl_GraphicDriver.hxx +++ b/src/OpenGl/OpenGl_GraphicDriver.hxx @@ -18,9 +18,7 @@ #include -#include #include -#include #include #include #include diff --git a/src/OpenGl/OpenGl_Group.cxx b/src/OpenGl/OpenGl_Group.cxx index b3601bd3f1..4592c63fbc 100644 --- a/src/OpenGl/OpenGl_Group.cxx +++ b/src/OpenGl/OpenGl_Group.cxx @@ -15,7 +15,6 @@ #include -#include #include #include #include diff --git a/src/OpenGl/OpenGl_Group.hxx b/src/OpenGl/OpenGl_Group.hxx index 8d3ea781f8..328c2cd244 100644 --- a/src/OpenGl/OpenGl_Group.hxx +++ b/src/OpenGl/OpenGl_Group.hxx @@ -19,7 +19,6 @@ #include #include -#include #include #include diff --git a/src/OpenGl/OpenGl_HaltonSampler.hxx b/src/OpenGl/OpenGl_HaltonSampler.hxx index 115d567e4d..20ac84335f 100644 --- a/src/OpenGl/OpenGl_HaltonSampler.hxx +++ b/src/OpenGl/OpenGl_HaltonSampler.hxx @@ -21,7 +21,6 @@ #ifndef _OpenGl_HaltonSampler_H #define _OpenGl_HaltonSampler_H -#include #include //! Compute points of the Halton sequence with digit-permutations for different bases. diff --git a/src/OpenGl/OpenGl_IndexBuffer.cxx b/src/OpenGl/OpenGl_IndexBuffer.cxx index fb09e40efa..73f715893b 100644 --- a/src/OpenGl/OpenGl_IndexBuffer.cxx +++ b/src/OpenGl/OpenGl_IndexBuffer.cxx @@ -16,7 +16,6 @@ #include #include -#include IMPLEMENT_STANDARD_RTTIEXT(OpenGl_IndexBuffer, OpenGl_Buffer) diff --git a/src/OpenGl/OpenGl_LayerList.cxx b/src/OpenGl/OpenGl_LayerList.cxx index 4c30668c79..52a494d0e2 100644 --- a/src/OpenGl/OpenGl_LayerList.cxx +++ b/src/OpenGl/OpenGl_LayerList.cxx @@ -19,15 +19,13 @@ #include #include #include +#include #include #include -#include #include #include #include -#include - namespace { //! Auxiliary class extending sequence iterator with index. diff --git a/src/OpenGl/OpenGl_LayerList.hxx b/src/OpenGl/OpenGl_LayerList.hxx index a92304918d..db90dc0bf7 100644 --- a/src/OpenGl/OpenGl_LayerList.hxx +++ b/src/OpenGl/OpenGl_LayerList.hxx @@ -22,7 +22,6 @@ #include #include #include -#include #include class OpenGl_FrameBuffer; diff --git a/src/OpenGl/OpenGl_PBREnvironment.cxx b/src/OpenGl/OpenGl_PBREnvironment.cxx index 13c6d407c7..56c26753d7 100644 --- a/src/OpenGl/OpenGl_PBREnvironment.cxx +++ b/src/OpenGl/OpenGl_PBREnvironment.cxx @@ -14,7 +14,6 @@ #include -#include #include #include #include diff --git a/src/OpenGl/OpenGl_PointSprite.cxx b/src/OpenGl/OpenGl_PointSprite.cxx index e188f6d8d2..636246e032 100755 --- a/src/OpenGl/OpenGl_PointSprite.cxx +++ b/src/OpenGl/OpenGl_PointSprite.cxx @@ -18,7 +18,6 @@ #include #include #include -#include IMPLEMENT_STANDARD_RTTIEXT(OpenGl_PointSprite,OpenGl_Texture) diff --git a/src/OpenGl/OpenGl_PrimitiveArray.cxx b/src/OpenGl/OpenGl_PrimitiveArray.cxx index fa37741aaf..5f1747ba4d 100644 --- a/src/OpenGl/OpenGl_PrimitiveArray.cxx +++ b/src/OpenGl/OpenGl_PrimitiveArray.cxx @@ -15,19 +15,13 @@ #include -#include -#include -#include -#include #include #include #include #include -#include #include #include #include -#include namespace { diff --git a/src/OpenGl/OpenGl_PrimitiveArray.hxx b/src/OpenGl/OpenGl_PrimitiveArray.hxx index 43781792eb..789067bdec 100644 --- a/src/OpenGl/OpenGl_PrimitiveArray.hxx +++ b/src/OpenGl/OpenGl_PrimitiveArray.hxx @@ -16,8 +16,6 @@ #ifndef OpenGl_PrimitiveArray_HeaderFile #define OpenGl_PrimitiveArray_HeaderFile -#include -#include #include #include #include diff --git a/src/OpenGl/OpenGl_SceneGeometry.cxx b/src/OpenGl/OpenGl_SceneGeometry.cxx index a09e4c0939..a8ceb444b2 100644 --- a/src/OpenGl/OpenGl_SceneGeometry.cxx +++ b/src/OpenGl/OpenGl_SceneGeometry.cxx @@ -15,14 +15,12 @@ #include -#include #include #include #include #include #include #include -#include // Use this macro to output BVH profiling info // #define RAY_TRACE_PRINT_INFO diff --git a/src/OpenGl/OpenGl_ShaderManager.cxx b/src/OpenGl/OpenGl_ShaderManager.cxx index fa660e5492..eff6bf9f39 100644 --- a/src/OpenGl/OpenGl_ShaderManager.cxx +++ b/src/OpenGl/OpenGl_ShaderManager.cxx @@ -23,7 +23,6 @@ #include #include #include -#include #include IMPLEMENT_STANDARD_RTTIEXT(OpenGl_ShaderManager, Graphic3d_ShaderManager) diff --git a/src/OpenGl/OpenGl_ShaderManager.hxx b/src/OpenGl/OpenGl_ShaderManager.hxx index 9d9501fd81..00cbbb1e5f 100644 --- a/src/OpenGl/OpenGl_ShaderManager.hxx +++ b/src/OpenGl/OpenGl_ShaderManager.hxx @@ -17,7 +17,6 @@ #define _OpenGl_ShaderManager_HeaderFile #include -#include #include #include #include diff --git a/src/OpenGl/OpenGl_ShaderObject.cxx b/src/OpenGl/OpenGl_ShaderObject.cxx index f9c5d4d813..b4b1021eb3 100755 --- a/src/OpenGl/OpenGl_ShaderObject.cxx +++ b/src/OpenGl/OpenGl_ShaderObject.cxx @@ -14,16 +14,13 @@ // commercial license or contractual agreement. #include -#include #include #include #include -#include #include #include #include #include -#include #ifdef _WIN32 #include // for alloca() diff --git a/src/OpenGl/OpenGl_ShaderProgram.cxx b/src/OpenGl/OpenGl_ShaderProgram.cxx index 51143e1bd2..a5504af8af 100755 --- a/src/OpenGl/OpenGl_ShaderProgram.cxx +++ b/src/OpenGl/OpenGl_ShaderProgram.cxx @@ -15,12 +15,6 @@ #include #include -#include - -#include -#include -#include -#include #include #include diff --git a/src/OpenGl/OpenGl_ShaderProgram.hxx b/src/OpenGl/OpenGl_ShaderProgram.hxx index a77488622e..92d74e54ef 100755 --- a/src/OpenGl/OpenGl_ShaderProgram.hxx +++ b/src/OpenGl/OpenGl_ShaderProgram.hxx @@ -20,7 +20,6 @@ #include #include -#include #include #include diff --git a/src/OpenGl/OpenGl_ShaderStates.hxx b/src/OpenGl/OpenGl_ShaderStates.hxx index 157e3a4f0b..1e92eb9b36 100755 --- a/src/OpenGl/OpenGl_ShaderStates.hxx +++ b/src/OpenGl/OpenGl_ShaderStates.hxx @@ -17,7 +17,6 @@ #define OpenGl_ShaderStates_HeaderFile #include -#include #include #include #include diff --git a/src/OpenGl/OpenGl_ShadowMap.cxx b/src/OpenGl/OpenGl_ShadowMap.cxx index f56f2241ab..2ca10fd601 100644 --- a/src/OpenGl/OpenGl_ShadowMap.cxx +++ b/src/OpenGl/OpenGl_ShadowMap.cxx @@ -13,12 +13,9 @@ #include -#include #include #include -#include #include -#include #include IMPLEMENT_STANDARD_RTTIEXT(OpenGl_ShadowMap, OpenGl_NamedResource) diff --git a/src/OpenGl/OpenGl_ShadowMap.hxx b/src/OpenGl/OpenGl_ShadowMap.hxx index 0aa2698a6c..309fbce1e1 100644 --- a/src/OpenGl/OpenGl_ShadowMap.hxx +++ b/src/OpenGl/OpenGl_ShadowMap.hxx @@ -16,7 +16,6 @@ #include #include -#include #include class gp_XYZ; diff --git a/src/OpenGl/OpenGl_Structure.cxx b/src/OpenGl/OpenGl_Structure.cxx index 9e4c4bfa98..d5c3c5270b 100644 --- a/src/OpenGl/OpenGl_Structure.cxx +++ b/src/OpenGl/OpenGl_Structure.cxx @@ -14,10 +14,8 @@ // commercial license or contractual agreement. #include -#include #include #include -#include #include #include #include diff --git a/src/OpenGl/OpenGl_Structure.hxx b/src/OpenGl/OpenGl_Structure.hxx index 4fb5d988a0..b770323783 100644 --- a/src/OpenGl/OpenGl_Structure.hxx +++ b/src/OpenGl/OpenGl_Structure.hxx @@ -17,13 +17,9 @@ #define OpenGl_Structure_HeaderFile #include -#include - -#include #include #include -#include #include #include diff --git a/src/OpenGl/OpenGl_Text.cxx b/src/OpenGl/OpenGl_Text.cxx index 9f439522d1..023485e76a 100644 --- a/src/OpenGl/OpenGl_Text.cxx +++ b/src/OpenGl/OpenGl_Text.cxx @@ -13,15 +13,11 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -#include #include #include -#include #include #include -#include #include -#include #include #include diff --git a/src/OpenGl/OpenGl_Text.hxx b/src/OpenGl/OpenGl_Text.hxx index d9396ff45d..8949a1459c 100755 --- a/src/OpenGl/OpenGl_Text.hxx +++ b/src/OpenGl/OpenGl_Text.hxx @@ -18,16 +18,10 @@ #include -#include #include -#include -#include #include #include -#include - -#include //! Text rendering class OpenGl_Text : public OpenGl_Element diff --git a/src/OpenGl/OpenGl_TextBuilder.hxx b/src/OpenGl/OpenGl_TextBuilder.hxx index caa0c7ce14..729424269b 100644 --- a/src/OpenGl/OpenGl_TextBuilder.hxx +++ b/src/OpenGl/OpenGl_TextBuilder.hxx @@ -16,7 +16,6 @@ #ifndef OpenGl_TextBuilder_Header #define OpenGl_TextBuilder_Header -#include #include #include #include diff --git a/src/OpenGl/OpenGl_Texture.cxx b/src/OpenGl/OpenGl_Texture.cxx index 19e1359115..4d90a8e96b 100644 --- a/src/OpenGl/OpenGl_Texture.cxx +++ b/src/OpenGl/OpenGl_Texture.cxx @@ -19,7 +19,6 @@ #include #include #include -#include #include #include #include diff --git a/src/OpenGl/OpenGl_TextureFormat.hxx b/src/OpenGl/OpenGl_TextureFormat.hxx index 592fc6128c..7c717a7e0c 100644 --- a/src/OpenGl/OpenGl_TextureFormat.hxx +++ b/src/OpenGl/OpenGl_TextureFormat.hxx @@ -17,7 +17,6 @@ #include #include #include -#include #include class OpenGl_Context; diff --git a/src/OpenGl/OpenGl_TileSampler.cxx b/src/OpenGl/OpenGl_TileSampler.cxx index caa13711a6..f6b783094c 100644 --- a/src/OpenGl/OpenGl_TileSampler.cxx +++ b/src/OpenGl/OpenGl_TileSampler.cxx @@ -16,7 +16,6 @@ #include #include #include -#include // define to debug algorithm values //#define RAY_TRACE_PRINT_DEBUG_INFO diff --git a/src/OpenGl/OpenGl_VertexBuffer.cxx b/src/OpenGl/OpenGl_VertexBuffer.cxx index a13a70c034..471e8be611 100644 --- a/src/OpenGl/OpenGl_VertexBuffer.cxx +++ b/src/OpenGl/OpenGl_VertexBuffer.cxx @@ -14,9 +14,7 @@ #include -#include #include -#include IMPLEMENT_STANDARD_RTTIEXT(OpenGl_VertexBuffer, OpenGl_Buffer) diff --git a/src/OpenGl/OpenGl_View.cxx b/src/OpenGl/OpenGl_View.cxx index f3bcbc9bde..5875e6df59 100644 --- a/src/OpenGl/OpenGl_View.cxx +++ b/src/OpenGl/OpenGl_View.cxx @@ -21,7 +21,6 @@ #include #include #include -#include #include #include #include @@ -31,6 +30,7 @@ #include #include #include +#include #include #include #include diff --git a/src/OpenGl/OpenGl_View.hxx b/src/OpenGl/OpenGl_View.hxx index 138c0c1c4b..17768a06d1 100644 --- a/src/OpenGl/OpenGl_View.hxx +++ b/src/OpenGl/OpenGl_View.hxx @@ -16,16 +16,10 @@ #ifndef OpenGl_View_HeaderFile #define OpenGl_View_HeaderFile -#include #include -#include -#include -#include #include -#include #include -#include #include #include #include diff --git a/src/OpenGl/OpenGl_Window.cxx b/src/OpenGl/OpenGl_Window.cxx index e3d22a91e4..2cceaf936f 100644 --- a/src/OpenGl/OpenGl_Window.cxx +++ b/src/OpenGl/OpenGl_Window.cxx @@ -19,16 +19,14 @@ #include -#include +#include #include #include -#include #include -#include +#include #include #include -#include #include diff --git a/src/OpenGl/OpenGl_Workspace.cxx b/src/OpenGl/OpenGl_Workspace.cxx index 8d09d642e0..a59d494af3 100644 --- a/src/OpenGl/OpenGl_Workspace.cxx +++ b/src/OpenGl/OpenGl_Workspace.cxx @@ -16,21 +16,13 @@ #include #include -#include #include -#include #include -#include -#include -#include +#include #include -#include #include #include -#include -#include - IMPLEMENT_STANDARD_RTTIEXT(OpenGl_Workspace,Standard_Transient) // ======================================================================= diff --git a/src/OpenGlTest/OpenGlTest_Commands.cxx b/src/OpenGlTest/OpenGlTest_Commands.cxx index 226b6e44b2..77203b21ab 100644 --- a/src/OpenGlTest/OpenGlTest_Commands.cxx +++ b/src/OpenGlTest/OpenGlTest_Commands.cxx @@ -15,18 +15,9 @@ #include -#include -#include #include #include -#include -#include -#include -#include - -#include -#include -#include + #include #include #include @@ -34,18 +25,9 @@ #include #include -#include #include -#include -#include -#include -#include #include -#include -#include #include -#include -#include #include #include diff --git a/src/PCDM/PCDM.cxx b/src/PCDM/PCDM.cxx index 01f9d8e6b9..2194de269d 100644 --- a/src/PCDM/PCDM.cxx +++ b/src/PCDM/PCDM.cxx @@ -24,13 +24,7 @@ #include #include #include -#include -#include -#include -#include #include -#include -#include //======================================================================= //function : FileDriverType diff --git a/src/PCDM/PCDM_ReadWriter_1.cxx b/src/PCDM/PCDM_ReadWriter_1.cxx index 723e45e090..812766ded5 100644 --- a/src/PCDM/PCDM_ReadWriter_1.cxx +++ b/src/PCDM/PCDM_ReadWriter_1.cxx @@ -20,7 +20,6 @@ #include #include #include -#include #include #include #include diff --git a/src/PCDM/PCDM_Reader.cxx b/src/PCDM/PCDM_Reader.cxx index 281ccf6800..a84efc1680 100644 --- a/src/PCDM/PCDM_Reader.cxx +++ b/src/PCDM/PCDM_Reader.cxx @@ -17,7 +17,6 @@ #include #include -#include #include #include #include diff --git a/src/PCDM/PCDM_ReaderFilter.hxx b/src/PCDM/PCDM_ReaderFilter.hxx index 0ba809b1ff..38ee609ff4 100644 --- a/src/PCDM/PCDM_ReaderFilter.hxx +++ b/src/PCDM/PCDM_ReaderFilter.hxx @@ -14,7 +14,6 @@ #ifndef _PCDM_ReaderFilter_HeaderFile #define _PCDM_ReaderFilter_HeaderFile -#include #include #include #include diff --git a/src/PCDM/PCDM_Reference.hxx b/src/PCDM/PCDM_Reference.hxx index cfd9ceec99..6131229d11 100644 --- a/src/PCDM/PCDM_Reference.hxx +++ b/src/PCDM/PCDM_Reference.hxx @@ -21,7 +21,6 @@ #include #include -#include #include diff --git a/src/PCDM/PCDM_ReferenceIterator.cxx b/src/PCDM/PCDM_ReferenceIterator.cxx index 2ad5f1383f..5cc2ddb545 100644 --- a/src/PCDM/PCDM_ReferenceIterator.cxx +++ b/src/PCDM/PCDM_ReferenceIterator.cxx @@ -15,16 +15,12 @@ // commercial license or contractual agreement. -#include -#include #include #include #include -#include #include #include #include -#include #include IMPLEMENT_STANDARD_RTTIEXT(PCDM_ReferenceIterator,Standard_Transient) diff --git a/src/PCDM/PCDM_RetrievalDriver.cxx b/src/PCDM/PCDM_RetrievalDriver.cxx index 400b4c928c..c1c96308be 100644 --- a/src/PCDM/PCDM_RetrievalDriver.cxx +++ b/src/PCDM/PCDM_RetrievalDriver.cxx @@ -15,25 +15,13 @@ // commercial license or contractual agreement. -#include -#include #include #include -#include -#include -#include -#include #include #include -#include #include -#include -#include #include -#include -#include #include -#include IMPLEMENT_STANDARD_RTTIEXT(PCDM_RetrievalDriver,PCDM_Reader) diff --git a/src/PCDM/PCDM_StorageDriver.cxx b/src/PCDM/PCDM_StorageDriver.cxx index 040b31bbda..78dc816ffa 100644 --- a/src/PCDM/PCDM_StorageDriver.cxx +++ b/src/PCDM/PCDM_StorageDriver.cxx @@ -17,15 +17,11 @@ #include #include -#include -#include #include #include -#include #include #include #include -#include #include #include #include @@ -35,7 +31,6 @@ #include #include -#include IMPLEMENT_STANDARD_RTTIEXT(PCDM_StorageDriver,PCDM_Writer) #define STORAGE_VERSION "STORAGE_VERSION:" diff --git a/src/PCDM/PCDM_StorageDriver.hxx b/src/PCDM/PCDM_StorageDriver.hxx index 03852b2b92..2e9882e096 100644 --- a/src/PCDM/PCDM_StorageDriver.hxx +++ b/src/PCDM/PCDM_StorageDriver.hxx @@ -21,11 +21,9 @@ #include #include -#include #include #include #include -#include class PCDM_Document; class CDM_Document; diff --git a/src/PCDM/PCDM_Writer.cxx b/src/PCDM/PCDM_Writer.cxx index f1a443a1fc..76883291ab 100644 --- a/src/PCDM/PCDM_Writer.cxx +++ b/src/PCDM/PCDM_Writer.cxx @@ -16,7 +16,6 @@ #include -#include #include #include #include diff --git a/src/PLib/PLib.hxx b/src/PLib/PLib.hxx index 96c28b72d0..830c0b637f 100644 --- a/src/PLib/PLib.hxx +++ b/src/PLib/PLib.hxx @@ -25,8 +25,6 @@ #include #include #include -#include -#include #include #include #include diff --git a/src/PLib/PLib_DoubleJacobiPolynomial.hxx b/src/PLib/PLib_DoubleJacobiPolynomial.hxx index 3e62a4f554..75c0f77304 100644 --- a/src/PLib/PLib_DoubleJacobiPolynomial.hxx +++ b/src/PLib/PLib_DoubleJacobiPolynomial.hxx @@ -22,9 +22,7 @@ #include #include -#include #include -#include class PLib_JacobiPolynomial; diff --git a/src/PLib/PLib_HermitJacobi.cxx b/src/PLib/PLib_HermitJacobi.cxx index 146d02ba78..83681829b7 100644 --- a/src/PLib/PLib_HermitJacobi.cxx +++ b/src/PLib/PLib_HermitJacobi.cxx @@ -19,9 +19,7 @@ #include #include #include -#include #include -#include IMPLEMENT_STANDARD_RTTIEXT(PLib_HermitJacobi,PLib_Base) diff --git a/src/PLib/PLib_HermitJacobi.hxx b/src/PLib/PLib_HermitJacobi.hxx index 1cf119dfbd..691624f997 100644 --- a/src/PLib/PLib_HermitJacobi.hxx +++ b/src/PLib/PLib_HermitJacobi.hxx @@ -25,7 +25,6 @@ #include #include #include -#include class PLib_JacobiPolynomial; diff --git a/src/PLib/PLib_JacobiPolynomial.hxx b/src/PLib/PLib_JacobiPolynomial.hxx index 84f5e522f3..3578874f78 100644 --- a/src/PLib/PLib_JacobiPolynomial.hxx +++ b/src/PLib/PLib_JacobiPolynomial.hxx @@ -26,7 +26,6 @@ #include #include #include -#include class PLib_JacobiPolynomial; diff --git a/src/Plate/Plate_D1.cxx b/src/Plate/Plate_D1.cxx index 46866e4e7b..fd157d338f 100644 --- a/src/Plate/Plate_D1.cxx +++ b/src/Plate/Plate_D1.cxx @@ -15,9 +15,7 @@ // commercial license or contractual agreement. -#include #include -#include #include Plate_D1::Plate_D1(const gp_XYZ& du, const gp_XYZ& dv) diff --git a/src/Plate/Plate_D2.cxx b/src/Plate/Plate_D2.cxx index adcb501e1c..74ce078d35 100644 --- a/src/Plate/Plate_D2.cxx +++ b/src/Plate/Plate_D2.cxx @@ -15,10 +15,7 @@ // commercial license or contractual agreement. -#include #include -#include -#include Plate_D2::Plate_D2(const gp_XYZ& duu, const gp_XYZ& duv, const gp_XYZ& dvv) :Duu(duu),Duv(duv),Dvv(dvv) diff --git a/src/Plate/Plate_D3.cxx b/src/Plate/Plate_D3.cxx index 14d7fc2723..8305524c47 100644 --- a/src/Plate/Plate_D3.cxx +++ b/src/Plate/Plate_D3.cxx @@ -15,10 +15,7 @@ // commercial license or contractual agreement. -#include #include -#include -#include Plate_D3::Plate_D3(const gp_XYZ& duuu, const gp_XYZ& duuv, const gp_XYZ& duvv, const gp_XYZ& dvvv) :Duuu(duuu),Duuv(duuv),Duvv(duvv),Dvvv(dvvv) diff --git a/src/Plate/Plate_FreeGtoCConstraint.hxx b/src/Plate/Plate_FreeGtoCConstraint.hxx index b4f3f1dfbe..67580b81e3 100644 --- a/src/Plate/Plate_FreeGtoCConstraint.hxx +++ b/src/Plate/Plate_FreeGtoCConstraint.hxx @@ -19,13 +19,10 @@ #include #include -#include #include #include -#include #include -#include class Plate_D1; class Plate_D2; class Plate_D3; diff --git a/src/Plate/Plate_GtoCConstraint.cxx b/src/Plate/Plate_GtoCConstraint.cxx index 99c6759974..f1bc9351e4 100644 --- a/src/Plate/Plate_GtoCConstraint.cxx +++ b/src/Plate/Plate_GtoCConstraint.cxx @@ -15,12 +15,9 @@ // commercial license or contractual agreement. -#include -#include #include #include #include -#include #include #include #include diff --git a/src/Plate/Plate_GtoCConstraint.hxx b/src/Plate/Plate_GtoCConstraint.hxx index 01924b3c32..f19035076a 100644 --- a/src/Plate/Plate_GtoCConstraint.hxx +++ b/src/Plate/Plate_GtoCConstraint.hxx @@ -19,7 +19,6 @@ #include #include -#include #include #include diff --git a/src/Plate/Plate_LineConstraint.cxx b/src/Plate/Plate_LineConstraint.cxx index 8d17ca8b3b..bed87f2814 100644 --- a/src/Plate/Plate_LineConstraint.cxx +++ b/src/Plate/Plate_LineConstraint.cxx @@ -17,7 +17,6 @@ #include #include -#include #include Plate_LineConstraint::Plate_LineConstraint(const gp_XY& point2d, diff --git a/src/Plate/Plate_LineConstraint.hxx b/src/Plate/Plate_LineConstraint.hxx index 651a126f1b..48eb8b495c 100644 --- a/src/Plate/Plate_LineConstraint.hxx +++ b/src/Plate/Plate_LineConstraint.hxx @@ -19,7 +19,6 @@ #include #include -#include #include #include diff --git a/src/Plate/Plate_LinearScalarConstraint.cxx b/src/Plate/Plate_LinearScalarConstraint.cxx index cf4ca7cfdb..239e12ee39 100644 --- a/src/Plate/Plate_LinearScalarConstraint.cxx +++ b/src/Plate/Plate_LinearScalarConstraint.cxx @@ -19,7 +19,6 @@ #include #include #include -#include Plate_LinearScalarConstraint::Plate_LinearScalarConstraint() {} diff --git a/src/Plate/Plate_LinearXYZConstraint.cxx b/src/Plate/Plate_LinearXYZConstraint.cxx index cbbe7616e9..89d093d719 100644 --- a/src/Plate/Plate_LinearXYZConstraint.cxx +++ b/src/Plate/Plate_LinearXYZConstraint.cxx @@ -18,7 +18,6 @@ #include #include #include -#include Plate_LinearXYZConstraint::Plate_LinearXYZConstraint() {} diff --git a/src/Plate/Plate_PinpointConstraint.cxx b/src/Plate/Plate_PinpointConstraint.cxx index 1f2889d348..b07cd3034b 100644 --- a/src/Plate/Plate_PinpointConstraint.cxx +++ b/src/Plate/Plate_PinpointConstraint.cxx @@ -15,8 +15,6 @@ // commercial license or contractual agreement. -#include -#include #include Plate_PinpointConstraint::Plate_PinpointConstraint() diff --git a/src/Plate/Plate_PinpointConstraint.hxx b/src/Plate/Plate_PinpointConstraint.hxx index 9be2003e9e..a1950f2259 100644 --- a/src/Plate/Plate_PinpointConstraint.hxx +++ b/src/Plate/Plate_PinpointConstraint.hxx @@ -23,7 +23,6 @@ #include #include -#include //! define a constraint on the Plate diff --git a/src/Plate/Plate_PlaneConstraint.cxx b/src/Plate/Plate_PlaneConstraint.cxx index 6514d5cb1b..12326f6b3b 100644 --- a/src/Plate/Plate_PlaneConstraint.cxx +++ b/src/Plate/Plate_PlaneConstraint.cxx @@ -17,7 +17,6 @@ #include #include -#include #include #include diff --git a/src/Plate/Plate_PlaneConstraint.hxx b/src/Plate/Plate_PlaneConstraint.hxx index ccb8a2b681..92cae8b451 100644 --- a/src/Plate/Plate_PlaneConstraint.hxx +++ b/src/Plate/Plate_PlaneConstraint.hxx @@ -19,7 +19,6 @@ #include #include -#include #include #include diff --git a/src/Plate/Plate_Plate.cxx b/src/Plate/Plate_Plate.cxx index 23f6c1191b..6047b82b43 100644 --- a/src/Plate/Plate_Plate.cxx +++ b/src/Plate/Plate_Plate.cxx @@ -15,7 +15,6 @@ // commercial license or contractual agreement. #include -#include #include #include #include @@ -29,7 +28,6 @@ #include #include #include -#include //======================================================================= //function : Plate_Plate diff --git a/src/Plate/Plate_Plate.hxx b/src/Plate/Plate_Plate.hxx index 18d73b04f5..0a0594836c 100644 --- a/src/Plate/Plate_Plate.hxx +++ b/src/Plate/Plate_Plate.hxx @@ -23,11 +23,9 @@ #include #include -#include #include #include #include -#include #include #include #include diff --git a/src/Plate/Plate_SampledCurveConstraint.cxx b/src/Plate/Plate_SampledCurveConstraint.cxx index ce35e90908..a0829283cf 100644 --- a/src/Plate/Plate_SampledCurveConstraint.cxx +++ b/src/Plate/Plate_SampledCurveConstraint.cxx @@ -15,8 +15,6 @@ // commercial license or contractual agreement. -#include -#include #include #include #include diff --git a/src/Plate/Plate_SampledCurveConstraint.hxx b/src/Plate/Plate_SampledCurveConstraint.hxx index e4c5c61101..c667feda29 100644 --- a/src/Plate/Plate_SampledCurveConstraint.hxx +++ b/src/Plate/Plate_SampledCurveConstraint.hxx @@ -23,7 +23,6 @@ #include #include -#include //! define m PinPointConstraint driven by m unknown diff --git a/src/math/math.hxx b/src/math/math.hxx index a9eaeb4faa..c447b2ea1a 100644 --- a/src/math/math.hxx +++ b/src/math/math.hxx @@ -21,10 +21,7 @@ #include #include -#include #include -#include - class math diff --git a/src/math/math_BFGS.cxx b/src/math/math_BFGS.cxx index ea2dc576b5..60a0644b30 100644 --- a/src/math/math_BFGS.cxx +++ b/src/math/math_BFGS.cxx @@ -25,8 +25,6 @@ #include #include #include -#include -#include #include #define R 0.61803399 diff --git a/src/math/math_BFGS.hxx b/src/math/math_BFGS.hxx index 4a5c18d88c..e38e8ebe3c 100644 --- a/src/math/math_BFGS.hxx +++ b/src/math/math_BFGS.hxx @@ -21,11 +21,8 @@ #include #include -#include #include #include -#include -#include #include class math_MultipleVarFunctionWithGradient; diff --git a/src/math/math_BissecNewton.hxx b/src/math/math_BissecNewton.hxx index 77add80024..76d72e60aa 100644 --- a/src/math/math_BissecNewton.hxx +++ b/src/math/math_BissecNewton.hxx @@ -21,10 +21,8 @@ #include #include -#include #include #include -#include #include class math_FunctionWithDerivative; diff --git a/src/math/math_BracketMinimum.hxx b/src/math/math_BracketMinimum.hxx index 9faa02b487..2fb91b2cfb 100644 --- a/src/math/math_BracketMinimum.hxx +++ b/src/math/math_BracketMinimum.hxx @@ -21,7 +21,6 @@ #include #include -#include #include #include class math_Function; diff --git a/src/math/math_BracketedRoot.hxx b/src/math/math_BracketedRoot.hxx index 5208a5be6e..9fe6b8e856 100644 --- a/src/math/math_BracketedRoot.hxx +++ b/src/math/math_BracketedRoot.hxx @@ -21,9 +21,7 @@ #include #include -#include #include -#include #include class math_Function; diff --git a/src/math/math_BrentMinimum.hxx b/src/math/math_BrentMinimum.hxx index e9c17fe376..1c098ab3fb 100644 --- a/src/math/math_BrentMinimum.hxx +++ b/src/math/math_BrentMinimum.hxx @@ -21,9 +21,7 @@ #include #include -#include #include -#include #include class math_Function; diff --git a/src/math/math_ComputeGaussPointsAndWeights.hxx b/src/math/math_ComputeGaussPointsAndWeights.hxx index 2f61426e1f..af34b29139 100644 --- a/src/math/math_ComputeGaussPointsAndWeights.hxx +++ b/src/math/math_ComputeGaussPointsAndWeights.hxx @@ -21,7 +21,6 @@ #include #include -#include #include #include diff --git a/src/math/math_ComputeKronrodPointsAndWeights.hxx b/src/math/math_ComputeKronrodPointsAndWeights.hxx index cd2a756e23..1fc672ba41 100644 --- a/src/math/math_ComputeKronrodPointsAndWeights.hxx +++ b/src/math/math_ComputeKronrodPointsAndWeights.hxx @@ -21,7 +21,6 @@ #include #include -#include #include #include diff --git a/src/math/math_Crout.hxx b/src/math/math_Crout.hxx index e60169c0cf..f7f4d63223 100644 --- a/src/math/math_Crout.hxx +++ b/src/math/math_Crout.hxx @@ -22,8 +22,6 @@ #include #include -#include -#include #include #include diff --git a/src/math/math_DirectPolynomialRoots.cxx b/src/math/math_DirectPolynomialRoots.cxx index 17ef931f0e..d67db7e825 100644 --- a/src/math/math_DirectPolynomialRoots.cxx +++ b/src/math/math_DirectPolynomialRoots.cxx @@ -20,7 +20,6 @@ //#endif #include -#include #include // Reference pour solution equation 3ieme degre et 2ieme degre : diff --git a/src/math/math_DirectPolynomialRoots.hxx b/src/math/math_DirectPolynomialRoots.hxx index cfae700df8..7a2160087a 100644 --- a/src/math/math_DirectPolynomialRoots.hxx +++ b/src/math/math_DirectPolynomialRoots.hxx @@ -21,13 +21,10 @@ #include #include -#include -#include #include #include - //! This class implements the calculation of all the real roots of a real //! polynomial of degree <= 4 using a direct method. Once found, //! the roots are polished using the Newton method. diff --git a/src/math/math_DoubleTab.cxx b/src/math/math_DoubleTab.cxx index 01a2b2f019..adfda82484 100644 --- a/src/math/math_DoubleTab.cxx +++ b/src/math/math_DoubleTab.cxx @@ -15,8 +15,6 @@ // Lpa, le 7/02/92 #include -#include -#include #include // macro to get size of C array diff --git a/src/math/math_DoubleTab.hxx b/src/math/math_DoubleTab.hxx index 8161a4c5d4..1ab5e36820 100644 --- a/src/math/math_DoubleTab.hxx +++ b/src/math/math_DoubleTab.hxx @@ -21,11 +21,8 @@ #include #include -#include #include #include -#include - class math_DoubleTab diff --git a/src/math/math_EigenValuesSearcher.hxx b/src/math/math_EigenValuesSearcher.hxx index 56d0001f93..be55c04123 100644 --- a/src/math/math_EigenValuesSearcher.hxx +++ b/src/math/math_EigenValuesSearcher.hxx @@ -21,7 +21,6 @@ #include #include -#include #include #include #include diff --git a/src/math/math_FRPR.cxx b/src/math/math_FRPR.cxx index 26f0b5cb35..dd3498a953 100644 --- a/src/math/math_FRPR.cxx +++ b/src/math/math_FRPR.cxx @@ -23,10 +23,7 @@ #include #include #include -#include #include -#include -#include // l'utilisation de math_BrentMinumim pur trouver un minimum dans une direction // donnee n'est pas du tout optimale. voir peut etre interpolation cubique diff --git a/src/math/math_FRPR.hxx b/src/math/math_FRPR.hxx index 0a2c9eb23d..154fbc3c99 100644 --- a/src/math/math_FRPR.hxx +++ b/src/math/math_FRPR.hxx @@ -19,12 +19,8 @@ #include #include -#include -#include #include -#include -#include #include #include class math_MultipleVarFunctionWithGradient; diff --git a/src/math/math_Function.cxx b/src/math/math_Function.cxx index 8d2c436a7d..1a68404b81 100644 --- a/src/math/math_Function.cxx +++ b/src/math/math_Function.cxx @@ -14,6 +14,5 @@ #include -#include Standard_Integer math_Function::GetStateNumber() { return 0; } diff --git a/src/math/math_Function.hxx b/src/math/math_Function.hxx index 81064a2d06..41fabc11a5 100644 --- a/src/math/math_Function.hxx +++ b/src/math/math_Function.hxx @@ -23,7 +23,6 @@ #include #include -#include //! This abstract class describes the virtual functions diff --git a/src/math/math_FunctionAllRoots.cxx b/src/math/math_FunctionAllRoots.cxx index 7abc9b7d34..b5c680b7f1 100644 --- a/src/math/math_FunctionAllRoots.cxx +++ b/src/math/math_FunctionAllRoots.cxx @@ -24,8 +24,6 @@ #include #include #include -#include -#include math_FunctionAllRoots::math_FunctionAllRoots ( math_FunctionWithDerivative& F, diff --git a/src/math/math_FunctionAllRoots.hxx b/src/math/math_FunctionAllRoots.hxx index 676bb2359a..17b1fb9bf3 100644 --- a/src/math/math_FunctionAllRoots.hxx +++ b/src/math/math_FunctionAllRoots.hxx @@ -24,8 +24,6 @@ #include #include #include -#include -#include #include class math_FunctionWithDerivative; class math_FunctionSample; diff --git a/src/math/math_FunctionRoot.cxx b/src/math/math_FunctionRoot.cxx index c46acd483d..397f06de78 100644 --- a/src/math/math_FunctionRoot.cxx +++ b/src/math/math_FunctionRoot.cxx @@ -23,8 +23,6 @@ #include #include #include -#include -#include class math_MyFunctionSetWithDerivatives : public math_FunctionSetWithDerivatives { diff --git a/src/math/math_FunctionRoot.hxx b/src/math/math_FunctionRoot.hxx index f7dbdaad65..331e591195 100644 --- a/src/math/math_FunctionRoot.hxx +++ b/src/math/math_FunctionRoot.hxx @@ -21,9 +21,7 @@ #include #include -#include #include -#include #include class math_FunctionWithDerivative; diff --git a/src/math/math_FunctionRoots.cxx b/src/math/math_FunctionRoots.cxx index a78d0a6c28..0f9b9ee8aa 100644 --- a/src/math/math_FunctionRoots.cxx +++ b/src/math/math_FunctionRoots.cxx @@ -23,11 +23,8 @@ #include #include #include -#include -#include #include -#include #define ITMAX 100 #define EPS 1e-14 #define EPSEPS 2e-14 diff --git a/src/math/math_FunctionRoots.hxx b/src/math/math_FunctionRoots.hxx index ffce1dde53..60dad5df4f 100644 --- a/src/math/math_FunctionRoots.hxx +++ b/src/math/math_FunctionRoots.hxx @@ -19,12 +19,9 @@ #include #include -#include -#include #include #include -#include #include #include class math_FunctionWithDerivative; diff --git a/src/math/math_FunctionSample.hxx b/src/math/math_FunctionSample.hxx index 0b5cf71af9..26d70e7279 100644 --- a/src/math/math_FunctionSample.hxx +++ b/src/math/math_FunctionSample.hxx @@ -22,7 +22,6 @@ #include #include -#include //! This class gives a default sample (constant difference diff --git a/src/math/math_FunctionSet.cxx b/src/math/math_FunctionSet.cxx index 36fd193847..aea7ec8af9 100644 --- a/src/math/math_FunctionSet.cxx +++ b/src/math/math_FunctionSet.cxx @@ -14,7 +14,6 @@ #include -#include //======================================================================= //function : ~math_FunctionSet diff --git a/src/math/math_FunctionSet.hxx b/src/math/math_FunctionSet.hxx index 7080c88d21..a334fe01e6 100644 --- a/src/math/math_FunctionSet.hxx +++ b/src/math/math_FunctionSet.hxx @@ -21,8 +21,6 @@ #include #include -#include -#include #include diff --git a/src/math/math_FunctionSetWithDerivatives.hxx b/src/math/math_FunctionSetWithDerivatives.hxx index 0e89635f1a..1ce2cf2217 100644 --- a/src/math/math_FunctionSetWithDerivatives.hxx +++ b/src/math/math_FunctionSetWithDerivatives.hxx @@ -19,11 +19,9 @@ #include #include -#include #include #include -#include #include class math_Matrix; diff --git a/src/math/math_Gauss.cxx b/src/math/math_Gauss.cxx index cff110905a..7760db66f8 100644 --- a/src/math/math_Gauss.cxx +++ b/src/math/math_Gauss.cxx @@ -18,7 +18,6 @@ #include #include #include -#include #include math_Gauss::math_Gauss(const math_Matrix& A, diff --git a/src/math/math_Gauss.hxx b/src/math/math_Gauss.hxx index 6e53712c44..94d3328b74 100644 --- a/src/math/math_Gauss.hxx +++ b/src/math/math_Gauss.hxx @@ -21,10 +21,8 @@ #include #include -#include #include #include -#include #include #include #include diff --git a/src/math/math_GaussLeastSquare.hxx b/src/math/math_GaussLeastSquare.hxx index b80bc1fb66..c130729036 100644 --- a/src/math/math_GaussLeastSquare.hxx +++ b/src/math/math_GaussLeastSquare.hxx @@ -21,10 +21,8 @@ #include #include -#include #include #include -#include #include #include diff --git a/src/math/math_GaussMultipleIntegration.cxx b/src/math/math_GaussMultipleIntegration.cxx index d1c2f36d3b..e45ee83243 100644 --- a/src/math/math_GaussMultipleIntegration.cxx +++ b/src/math/math_GaussMultipleIntegration.cxx @@ -46,7 +46,6 @@ de Gauss. #include #include #include -#include class IntegrationFunction { diff --git a/src/math/math_GaussMultipleIntegration.hxx b/src/math/math_GaussMultipleIntegration.hxx index 29104e83fe..16dd34d31b 100644 --- a/src/math/math_GaussMultipleIntegration.hxx +++ b/src/math/math_GaussMultipleIntegration.hxx @@ -19,10 +19,7 @@ #include #include -#include -#include -#include #include #include #include diff --git a/src/math/math_GaussSetIntegration.hxx b/src/math/math_GaussSetIntegration.hxx index b485145bf4..641d38cdb4 100644 --- a/src/math/math_GaussSetIntegration.hxx +++ b/src/math/math_GaussSetIntegration.hxx @@ -19,10 +19,8 @@ #include #include -#include #include -#include #include #include class math_FunctionSet; diff --git a/src/math/math_GaussSingleIntegration.cxx b/src/math/math_GaussSingleIntegration.cxx index 28c386d047..f79c140f7f 100644 --- a/src/math/math_GaussSingleIntegration.cxx +++ b/src/math/math_GaussSingleIntegration.cxx @@ -48,7 +48,6 @@ Etapes du calcul: #include #include #include -#include math_GaussSingleIntegration::math_GaussSingleIntegration() : Done(Standard_False) { diff --git a/src/math/math_GaussSingleIntegration.hxx b/src/math/math_GaussSingleIntegration.hxx index 70046d27ed..67a3bbe2cf 100644 --- a/src/math/math_GaussSingleIntegration.hxx +++ b/src/math/math_GaussSingleIntegration.hxx @@ -19,10 +19,7 @@ #include #include -#include -#include -#include #include #include class math_Function; diff --git a/src/math/math_GlobOptMin.cxx b/src/math/math_GlobOptMin.cxx index d908eeff97..8364240918 100644 --- a/src/math/math_GlobOptMin.cxx +++ b/src/math/math_GlobOptMin.cxx @@ -16,8 +16,6 @@ #include #include -#include -#include #include #include #include diff --git a/src/math/math_GlobOptMin.hxx b/src/math/math_GlobOptMin.hxx index 930301dc50..b2941e7caa 100644 --- a/src/math/math_GlobOptMin.hxx +++ b/src/math/math_GlobOptMin.hxx @@ -17,11 +17,9 @@ #define _math_GlobOptMin_HeaderFile #include -#include #include #include #include -#include //! This class represents Evtushenko's algorithm of global optimization based on non-uniform mesh. //! Article: Yu. Evtushenko. Numerical methods for finding global extreme (case of a non-uniform mesh). diff --git a/src/math/math_Householder.cxx b/src/math/math_Householder.cxx index 9303e3cac5..152bdeccc1 100644 --- a/src/math/math_Householder.cxx +++ b/src/math/math_Householder.cxx @@ -21,9 +21,7 @@ #include #include -#include #include -#include #include // Cette classe decrit la methode de Householder qui transforme A en un diff --git a/src/math/math_Householder.hxx b/src/math/math_Householder.hxx index 422a895140..8c5e4f6af5 100644 --- a/src/math/math_Householder.hxx +++ b/src/math/math_Householder.hxx @@ -22,9 +22,6 @@ #include #include -#include -#include -#include #include #include diff --git a/src/math/math_Jacobi.cxx b/src/math/math_Jacobi.cxx index c5e312336d..e076b4b1fa 100644 --- a/src/math/math_Jacobi.cxx +++ b/src/math/math_Jacobi.cxx @@ -23,13 +23,12 @@ #include #include #include -#include math_Jacobi::math_Jacobi(const math_Matrix& A) : AA(1, A.RowNumber(), - 1, A.RowNumber()), - EigenValues(1, A.RowNumber()), - EigenVectors(1, A.RowNumber(), - 1, A.RowNumber()) { + 1, A.RowNumber()), + EigenValues(1, A.RowNumber()), + EigenVectors(1, A.RowNumber(), + 1, A.RowNumber()) { math_NotSquare_Raise_if(A.RowNumber() != A.ColNumber(), " "); diff --git a/src/math/math_Jacobi.hxx b/src/math/math_Jacobi.hxx index 1016a41ade..9133c2d99c 100644 --- a/src/math/math_Jacobi.hxx +++ b/src/math/math_Jacobi.hxx @@ -21,11 +21,8 @@ #include #include -#include #include -#include #include -#include #include diff --git a/src/math/math_KronrodSingleIntegration.cxx b/src/math/math_KronrodSingleIntegration.cxx index 9323ae70c5..880e7137f2 100644 --- a/src/math/math_KronrodSingleIntegration.cxx +++ b/src/math/math_KronrodSingleIntegration.cxx @@ -18,7 +18,6 @@ #include #include #include -#include #include //========================================================================== diff --git a/src/math/math_KronrodSingleIntegration.hxx b/src/math/math_KronrodSingleIntegration.hxx index 20ca0304ca..072a406a86 100644 --- a/src/math/math_KronrodSingleIntegration.hxx +++ b/src/math/math_KronrodSingleIntegration.hxx @@ -18,10 +18,7 @@ #include #include -#include -#include -#include #include #include class math_Function; diff --git a/src/math/math_Matrix.hxx b/src/math/math_Matrix.hxx index b8cb70c5c0..3373a44a46 100644 --- a/src/math/math_Matrix.hxx +++ b/src/math/math_Matrix.hxx @@ -19,12 +19,8 @@ #include #include -#include -#include #include -#include -#include #include #include diff --git a/src/math/math_MultipleVarFunction.cxx b/src/math/math_MultipleVarFunction.cxx index ec1589fa41..c09c2911ef 100644 --- a/src/math/math_MultipleVarFunction.cxx +++ b/src/math/math_MultipleVarFunction.cxx @@ -14,7 +14,6 @@ #include -#include //======================================================================= //function : ~math_MultipleVarFunction diff --git a/src/math/math_MultipleVarFunction.hxx b/src/math/math_MultipleVarFunction.hxx index 66c46210bf..7819c4e71d 100644 --- a/src/math/math_MultipleVarFunction.hxx +++ b/src/math/math_MultipleVarFunction.hxx @@ -21,11 +21,7 @@ #include #include -#include -#include #include -#include - //! Describes the virtual functions associated with a multiple variable function. diff --git a/src/math/math_MultipleVarFunctionWithGradient.hxx b/src/math/math_MultipleVarFunctionWithGradient.hxx index 3026b6105b..f874aea376 100644 --- a/src/math/math_MultipleVarFunctionWithGradient.hxx +++ b/src/math/math_MultipleVarFunctionWithGradient.hxx @@ -19,14 +19,10 @@ #include #include -#include #include #include -#include #include -#include - //! The abstract class MultipleVarFunctionWithGradient diff --git a/src/math/math_MultipleVarFunctionWithHessian.hxx b/src/math/math_MultipleVarFunctionWithHessian.hxx index e967cd8071..50575ea90a 100644 --- a/src/math/math_MultipleVarFunctionWithHessian.hxx +++ b/src/math/math_MultipleVarFunctionWithHessian.hxx @@ -19,13 +19,10 @@ #include #include -#include #include #include -#include #include -#include class math_Matrix; diff --git a/src/math/math_NewtonFunctionRoot.hxx b/src/math/math_NewtonFunctionRoot.hxx index e2265f8951..b486aa4c5b 100644 --- a/src/math/math_NewtonFunctionRoot.hxx +++ b/src/math/math_NewtonFunctionRoot.hxx @@ -19,11 +19,7 @@ #include #include -#include -#include -#include -#include #include class math_FunctionWithDerivative; diff --git a/src/math/math_NewtonFunctionSetRoot.cxx b/src/math/math_NewtonFunctionSetRoot.cxx index b2c549409b..8c695f8853 100644 --- a/src/math/math_NewtonFunctionSetRoot.cxx +++ b/src/math/math_NewtonFunctionSetRoot.cxx @@ -20,10 +20,8 @@ //#endif #include -#include #include #include -#include #include //======================================================================= diff --git a/src/math/math_NewtonFunctionSetRoot.hxx b/src/math/math_NewtonFunctionSetRoot.hxx index 7debe41724..80a194d3c4 100644 --- a/src/math/math_NewtonFunctionSetRoot.hxx +++ b/src/math/math_NewtonFunctionSetRoot.hxx @@ -19,12 +19,9 @@ #include #include -#include -#include #include #include -#include #include #include #include diff --git a/src/math/math_NewtonMinimum.cxx b/src/math/math_NewtonMinimum.cxx index 4dbce1f0c5..89ae93f952 100644 --- a/src/math/math_NewtonMinimum.cxx +++ b/src/math/math_NewtonMinimum.cxx @@ -26,7 +26,6 @@ #include #include #include -#include #include //======================================================================= diff --git a/src/math/math_NewtonMinimum.hxx b/src/math/math_NewtonMinimum.hxx index a46bf09c0c..50268fddc4 100644 --- a/src/math/math_NewtonMinimum.hxx +++ b/src/math/math_NewtonMinimum.hxx @@ -19,14 +19,11 @@ #include #include -#include #include -#include #include #include #include -#include #include #include class math_MultipleVarFunctionWithHessian; diff --git a/src/math/math_PSO.cxx b/src/math/math_PSO.cxx index 3e9fb585d9..b9e1323ec9 100644 --- a/src/math/math_PSO.cxx +++ b/src/math/math_PSO.cxx @@ -14,6 +14,8 @@ // commercial license or contractual agreement. #include + +#include #include const Standard_Real aBorderDivisor = 1.0e+4; diff --git a/src/math/math_PSO.hxx b/src/math/math_PSO.hxx index 15942ea981..74ea0e981d 100644 --- a/src/math/math_PSO.hxx +++ b/src/math/math_PSO.hxx @@ -16,7 +16,6 @@ #ifndef _math_PSO_HeaderFile #define _math_PSO_HeaderFile -#include #include #include diff --git a/src/math/math_Powell.cxx b/src/math/math_Powell.cxx index 237c8521e1..14b3dbd83a 100644 --- a/src/math/math_Powell.cxx +++ b/src/math/math_Powell.cxx @@ -22,11 +22,8 @@ #include #include #include -#include #include #include -#include -#include namespace { static inline Standard_Real SQR (const Standard_Real a) diff --git a/src/math/math_Powell.hxx b/src/math/math_Powell.hxx index 79a2198ac0..eca6a5a75a 100644 --- a/src/math/math_Powell.hxx +++ b/src/math/math_Powell.hxx @@ -19,11 +19,8 @@ #include #include -#include -#include #include -#include #include #include #include diff --git a/src/math/math_Recipes.cxx b/src/math/math_Recipes.cxx index a0f2b633b4..d8da2fd77f 100644 --- a/src/math/math_Recipes.cxx +++ b/src/math/math_Recipes.cxx @@ -22,10 +22,6 @@ #include -#include -#include - -#include #include #include #include diff --git a/src/math/math_Recipes.hxx b/src/math/math_Recipes.hxx index 2da8e9239d..50a79acb97 100644 --- a/src/math/math_Recipes.hxx +++ b/src/math/math_Recipes.hxx @@ -15,10 +15,6 @@ #ifndef math_Recipes_HeaderFile #define math_Recipes_HeaderFile -#include -#include -#include -#include #include class math_IntegerVector; diff --git a/src/math/math_SVD.hxx b/src/math/math_SVD.hxx index 9c55803e8c..d0541754a8 100644 --- a/src/math/math_SVD.hxx +++ b/src/math/math_SVD.hxx @@ -19,13 +19,10 @@ #include #include -#include -#include #include #include #include -#include #include diff --git a/src/math/math_TrigonometricFunctionRoots.cxx b/src/math/math_TrigonometricFunctionRoots.cxx index 22b0f37fcf..692fa3153c 100644 --- a/src/math/math_TrigonometricFunctionRoots.cxx +++ b/src/math/math_TrigonometricFunctionRoots.cxx @@ -27,7 +27,6 @@ #include #include #include -#include #include #include #include diff --git a/src/math/math_TrigonometricFunctionRoots.hxx b/src/math/math_TrigonometricFunctionRoots.hxx index 062d954978..2e9999ce73 100644 --- a/src/math/math_TrigonometricFunctionRoots.hxx +++ b/src/math/math_TrigonometricFunctionRoots.hxx @@ -21,10 +21,8 @@ #include #include -#include #include #include -#include #include diff --git a/src/math/math_Uzawa.cxx b/src/math/math_Uzawa.cxx index a16afffbb9..f4d4c69e5e 100644 --- a/src/math/math_Uzawa.cxx +++ b/src/math/math_Uzawa.cxx @@ -33,7 +33,6 @@ #include #include #include -#include #include #include diff --git a/src/math/math_Uzawa.hxx b/src/math/math_Uzawa.hxx index 927a96c08f..da914e1e94 100644 --- a/src/math/math_Uzawa.hxx +++ b/src/math/math_Uzawa.hxx @@ -19,13 +19,10 @@ #include #include -#include #include #include #include -#include -#include #include diff --git a/src/math/math_ValueAndWeight.hxx b/src/math/math_ValueAndWeight.hxx index b2c2b452d5..7b561c3e70 100644 --- a/src/math/math_ValueAndWeight.hxx +++ b/src/math/math_ValueAndWeight.hxx @@ -18,9 +18,6 @@ #include #include -#include - -#include //! Simple container storing two reals: value and weight class math_ValueAndWeight From dcbd679c8b9b75e9aea8df46f5f0065dcfeea723 Mon Sep 17 00:00:00 2001 From: kgv Date: Mon, 16 May 2022 22:28:09 +0300 Subject: [PATCH 287/639] 0032975: Visualization, TKOpenGl - do not blit inactive Subview --- src/OpenGl/OpenGl_View.cxx | 5 +++++ src/V3d/V3d_View.cxx | 3 ++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/OpenGl/OpenGl_View.cxx b/src/OpenGl/OpenGl_View.cxx index 5875e6df59..9eb16aeae7 100644 --- a/src/OpenGl/OpenGl_View.cxx +++ b/src/OpenGl/OpenGl_View.cxx @@ -2225,6 +2225,11 @@ bool OpenGl_View::blitSubviews (const Graphic3d_Camera::Projection , for (const Handle(Graphic3d_CView)& aChildIter : mySubviews) { OpenGl_View* aSubView = dynamic_cast (aChildIter.get()); + if (!aSubView->IsActive()) + { + continue; + } + const Handle(OpenGl_FrameBuffer)& aChildFbo = !aSubView->myImmediateSceneFbos[0].IsNull() ? aSubView->myImmediateSceneFbos[0] : aSubView->myMainSceneFbos[0]; diff --git a/src/V3d/V3d_View.cxx b/src/V3d/V3d_View.cxx index f6050cf34b..e61691a13b 100644 --- a/src/V3d/V3d_View.cxx +++ b/src/V3d/V3d_View.cxx @@ -348,7 +348,8 @@ Handle(V3d_View) V3d_View::PickSubview (const Graphic3d_Vec2i& thePnt) const for (Standard_Integer aSubviewIter = mySubviews.Upper(); aSubviewIter >= mySubviews.Lower(); --aSubviewIter) { const Handle(V3d_View)& aSubview = mySubviews.Value (aSubviewIter); - if (thePnt.x() >= aSubview->View()->SubviewTopLeft().x() + if (aSubview->View()->IsActive() + && thePnt.x() >= aSubview->View()->SubviewTopLeft().x() && thePnt.x() < (aSubview->View()->SubviewTopLeft().x() + aSubview->Window()->Dimensions().x()) && thePnt.y() >= aSubview->View()->SubviewTopLeft().y() && thePnt.y() < (aSubview->View()->SubviewTopLeft().y() + aSubview->Window()->Dimensions().y())) From b56df3a60aa8f8bcd6e4df569b5dd8dd3cad7990 Mon Sep 17 00:00:00 2001 From: kgv Date: Mon, 16 May 2022 23:02:31 +0300 Subject: [PATCH 288/639] 0032976: Visualization - AIS_InteractiveContext::FitSelected() includes objects invisible in current View --- src/AIS/AIS_InteractiveContext.cxx | 12 ++++++++++-- src/AIS/AIS_InteractiveContext.hxx | 5 ++++- src/AIS/AIS_ViewController.cxx | 2 +- src/AIS/AIS_ViewCube.cxx | 2 +- 4 files changed, 16 insertions(+), 5 deletions(-) diff --git a/src/AIS/AIS_InteractiveContext.cxx b/src/AIS/AIS_InteractiveContext.cxx index a2130989ac..1cd4cb8f91 100644 --- a/src/AIS/AIS_InteractiveContext.cxx +++ b/src/AIS/AIS_InteractiveContext.cxx @@ -2214,10 +2214,11 @@ void AIS_InteractiveContext::FitSelected (const Handle(V3d_View)& theView) //function : BoundingBoxOfSelection //purpose : //======================================================================= -Bnd_Box AIS_InteractiveContext::BoundingBoxOfSelection() const +Bnd_Box AIS_InteractiveContext::BoundingBoxOfSelection (const Handle(V3d_View)& theView) const { Bnd_Box aBndSelected; AIS_MapOfObjectOwners anObjectOwnerMap; + const Standard_Integer aViewId = !theView.IsNull() ? theView->View()->Identification() : -1; for (AIS_NListOfEntityOwner::Iterator aSelIter (mySelection->Objects()); aSelIter.More(); aSelIter.Next()) { const Handle(SelectMgr_EntityOwner)& anOwner = aSelIter.Value(); @@ -2227,6 +2228,13 @@ Bnd_Box AIS_InteractiveContext::BoundingBoxOfSelection() const continue; } + Handle(Graphic3d_ViewAffinity) anAffinity = myMainVwr->StructureManager()->ObjectAffinity (anObj); + const Standard_Boolean isVisible = aViewId == -1 || anAffinity->IsVisible (aViewId); + if (!isVisible) + { + continue; + } + if (anOwner == anObj->GlobalSelOwner()) { Bnd_Box aTmpBnd; @@ -2264,7 +2272,7 @@ void AIS_InteractiveContext::FitSelected (const Handle(V3d_View)& theView, const Standard_Real theMargin, const Standard_Boolean theToUpdate) { - Bnd_Box aBndSelected = BoundingBoxOfSelection(); + Bnd_Box aBndSelected = BoundingBoxOfSelection (theView); if (!aBndSelected.IsVoid()) { theView->FitAll (aBndSelected, theMargin, theToUpdate); diff --git a/src/AIS/AIS_InteractiveContext.hxx b/src/AIS/AIS_InteractiveContext.hxx index 5b9ec24c28..5e79807ea6 100644 --- a/src/AIS/AIS_InteractiveContext.hxx +++ b/src/AIS/AIS_InteractiveContext.hxx @@ -502,7 +502,10 @@ public: //! @name Selection management Standard_EXPORT AIS_StatusOfPick SelectDetected (const AIS_SelectionScheme theSelScheme = AIS_SelectionScheme_Replace); //! Returns bounding box of selected objects. - Standard_EXPORT Bnd_Box BoundingBoxOfSelection() const; + Standard_EXPORT Bnd_Box BoundingBoxOfSelection (const Handle(V3d_View)& theView) const; + + Standard_DEPRECATED ("BoundingBoxOfSelection() should be called with View argument") + Bnd_Box BoundingBoxOfSelection() const { return BoundingBoxOfSelection (Handle(V3d_View)()); } //! Sets list of owner selected/deselected using specified selection scheme. //! @param theOwners owners to change selection state diff --git a/src/AIS/AIS_ViewController.cxx b/src/AIS/AIS_ViewController.cxx index 8ce7822d48..12ad1ef617 100644 --- a/src/AIS/AIS_ViewController.cxx +++ b/src/AIS/AIS_ViewController.cxx @@ -1969,7 +1969,7 @@ gp_Pnt AIS_ViewController::GravityPoint (const Handle(AIS_InteractiveContext)& t void AIS_ViewController::FitAllAuto (const Handle(AIS_InteractiveContext)& theCtx, const Handle(V3d_View)& theView) { - const Bnd_Box aBoxSel = theCtx->BoundingBoxOfSelection(); + const Bnd_Box aBoxSel = theCtx->BoundingBoxOfSelection (theView); const double aFitMargin = 0.01; if (aBoxSel.IsVoid()) { diff --git a/src/AIS/AIS_ViewCube.cxx b/src/AIS/AIS_ViewCube.cxx index 2af2fef307..d2ec561fc1 100644 --- a/src/AIS/AIS_ViewCube.cxx +++ b/src/AIS/AIS_ViewCube.cxx @@ -859,7 +859,7 @@ Standard_Boolean AIS_ViewCube::HasAnimation() const void AIS_ViewCube::viewFitAll (const Handle(V3d_View)& theView, const Handle(Graphic3d_Camera)& theCamera) { - Bnd_Box aBndBox = myToFitSelected ? GetContext()->BoundingBoxOfSelection() : theView->View()->MinMaxValues(); + Bnd_Box aBndBox = myToFitSelected ? GetContext()->BoundingBoxOfSelection (theView) : theView->View()->MinMaxValues(); if (aBndBox.IsVoid() && myToFitSelected) { From df69c264726dce2ce10ad93eac0a072898f9bfb8 Mon Sep 17 00:00:00 2001 From: mgerus Date: Wed, 18 May 2022 09:45:05 +0300 Subject: [PATCH 289/639] 0026697: BRepFeat_MakePrism returns empty compound Add fix in direction of prism calculation --- src/BRepFeat/BRepFeat_MakePrism.cxx | 4 ++-- tests/bugs/modalg_7/bug26697 | 11 +++-------- 2 files changed, 5 insertions(+), 10 deletions(-) diff --git a/src/BRepFeat/BRepFeat_MakePrism.cxx b/src/BRepFeat/BRepFeat_MakePrism.cxx index 34ed188e4f..daa4a39a7f 100644 --- a/src/BRepFeat/BRepFeat_MakePrism.cxx +++ b/src/BRepFeat/BRepFeat_MakePrism.cxx @@ -987,8 +987,8 @@ Standard_Integer SensOfPrism(const Handle(Geom_Curve) C, ASI1.Perform(scur); Standard_Integer sens = 1; if(ASI1.IsDone() && ASI1.NbPoints(1) >= 1) { - if(ASI1.Point(1, 1).Parameter() < 0. && - ASI1.Point(1, ASI1.NbPoints(1)).Parameter() < 0.) { + if(ASI1.Point(1, 1).Parameter() + Precision::Confusion() < 0. && + ASI1.Point(1, ASI1.NbPoints(1)).Parameter() + Precision::Confusion() < 0.) { sens = -1; } } diff --git a/tests/bugs/modalg_7/bug26697 b/tests/bugs/modalg_7/bug26697 index 2ee70f5fbc..4ce799ef81 100644 --- a/tests/bugs/modalg_7/bug26697 +++ b/tests/bugs/modalg_7/bug26697 @@ -1,20 +1,15 @@ -puts "TODO CR26697 ALL: Error : is WRONG because number of SHAPE entities" - puts "================" -puts "CR26697" +puts "bug26697: BRepFeat_MakePrism returns empty compound" puts "================" puts "" -############################################### -## BRepFeat_MakePrism returns empty compound -############################################### restore [locate_data_file bug26697_aBase.brep] aB restore [locate_data_file bug26697_aFrom.brep] aF restore [locate_data_file bug26697_aTo.brep] aT featprism aB aB aB 0 -1 0 2 1 -featperform prism aR aF aT +featperform prism result aF aT -checknbshapes aR -shape 2 +checknbshapes result -face 3 checkview -display result -2d -path ${imagedir}/${test_image}.png From 84d39c06fa79d4227c1bc415e36e3924f7ff64c6 Mon Sep 17 00:00:00 2001 From: ifv Date: Mon, 16 May 2022 11:37:40 +0300 Subject: [PATCH 290/639] 0032973: Modeling Algorithms - Regression in BRepExtrema_DistShapeShape compared with 7.5 BRepExtrema/BRepExtrema_ExtCF.cxx - set correct using BRepAdaptor_Curve in Extrema tests/bugs/modalg_8/bug32973 - new test case added --- src/BRepExtrema/BRepExtrema_ExtCF.cxx | 2 +- tests/bugs/modalg_8/bug32973 | 13 +++++++++++++ 2 files changed, 14 insertions(+), 1 deletion(-) create mode 100644 tests/bugs/modalg_8/bug32973 diff --git a/src/BRepExtrema/BRepExtrema_ExtCF.cxx b/src/BRepExtrema/BRepExtrema_ExtCF.cxx index 4009b81001..44e2c2fa3e 100644 --- a/src/BRepExtrema/BRepExtrema_ExtCF.cxx +++ b/src/BRepExtrema/BRepExtrema_ExtCF.cxx @@ -81,7 +81,7 @@ void BRepExtrema_ExtCF::Perform(const TopoDS_Edge& E, const TopoDS_Face& F2) BRepAdaptor_Curve Curv(E); Handle(BRepAdaptor_Curve) HC = new BRepAdaptor_Curve(Curv); - myExtCS.Perform(HC->Curve(), U1, U2); + myExtCS.Perform(*HC, U1, U2); if(!myExtCS.IsDone()) return; diff --git a/tests/bugs/modalg_8/bug32973 b/tests/bugs/modalg_8/bug32973 new file mode 100644 index 0000000000..3702a2fb9d --- /dev/null +++ b/tests/bugs/modalg_8/bug32973 @@ -0,0 +1,13 @@ +puts "=============================================================================================" +puts "0032973: Modeling Algorithms - Regression in BRepExtrema_DistShapeShape compared with 7.5" +puts "=============================================================================================" +puts "" + +restore [locate_data_file bug29313_Nozzle45.brep] s1 +restore [locate_data_file bug29313_RobotArm6.brep] s2 + +distmini d s1 s2 +set Tol 1.e-7 +checkreal ddd [dval d_val] 2185.9739179983058 $Tol $Tol +compound s1 s2 d d2 res +checkview -display res -2d -path ${imagedir}/${test_image}.png From 86d6c284c2ed2d16fd247643f75476a29eb34492 Mon Sep 17 00:00:00 2001 From: kgv Date: Sat, 21 May 2022 17:18:43 +0300 Subject: [PATCH 291/639] 0032978: Visualization - AIS_ViewController::PickPoint() includes objects invisible in current View SelectMgr_ViewerSelector::TraverseSensitives() now takes into account object's view affinity. AIS_InteractiveContext::moveTo() - dropped code SelectMgr_AndOrFilter::SetDisabledObjects() as filtering is now done by selector itself. ViewAffinity property has been moved to PrsMgr_PresentableObject for simplicity. Removed redundant map Graphic3d_CView::HiddenObjects(). --- src/AIS/AIS_InteractiveContext.cxx | 30 +++++----------- src/AIS/AIS_Manipulator.cxx | 2 +- src/AIS/AIS_ViewCube.cxx | 2 +- src/Graphic3d/Graphic3d_CView.cxx | 1 - src/Graphic3d/Graphic3d_CView.hxx | 7 ---- src/Graphic3d/Graphic3d_StructureManager.cxx | 36 ++++++++++++++------ src/Graphic3d/Graphic3d_StructureManager.hxx | 5 +-- src/IVtkOCC/IVtkOCC_ViewerSelector.cxx | 6 ++-- src/PrsMgr/PrsMgr_PresentableObject.cxx | 1 + src/PrsMgr/PrsMgr_PresentableObject.hxx | 4 +++ src/PrsMgr/PrsMgr_PresentationManager.cxx | 2 +- src/SelectMgr/SelectMgr_ViewerSelector.cxx | 24 +++++++------ src/SelectMgr/SelectMgr_ViewerSelector.hxx | 2 +- tests/v3d/bugs/bug32978 | 34 ++++++++++++++++++ 14 files changed, 97 insertions(+), 59 deletions(-) create mode 100644 tests/v3d/bugs/bug32978 diff --git a/src/AIS/AIS_InteractiveContext.cxx b/src/AIS/AIS_InteractiveContext.cxx index 1cd4cb8f91..8bd2d868c4 100644 --- a/src/AIS/AIS_InteractiveContext.cxx +++ b/src/AIS/AIS_InteractiveContext.cxx @@ -362,7 +362,7 @@ void AIS_InteractiveContext::ObjectsForView (AIS_ListOfInteractive& theListOfIO continue; } - Handle(Graphic3d_ViewAffinity) anAffinity = myMainVwr->StructureManager()->ObjectAffinity (anObjIter.Key()); + Handle(Graphic3d_ViewAffinity) anAffinity = anObjIter.Key()->ViewAffinity(); const Standard_Boolean isVisible = anAffinity->IsVisible (aViewId); if (isVisible == theIsVisibleInView) { @@ -402,17 +402,9 @@ void AIS_InteractiveContext::SetViewAffinity (const Handle(AIS_InteractiveObject return; } - Handle(Graphic3d_ViewAffinity) anAffinity = myMainVwr->StructureManager()->ObjectAffinity (theIObj); + Handle(Graphic3d_ViewAffinity) anAffinity = theIObj->ViewAffinity(); Handle(Graphic3d_CView) aViewImpl = theView->View(); anAffinity->SetVisible (aViewImpl->Identification(), theIsVisible == Standard_True); - if (theIsVisible) - { - theView->View()->ChangeHiddenObjects()->Remove (theIObj.get()); - } - else - { - theView->View()->ChangeHiddenObjects()->Add (theIObj.get()); - } } //======================================================================= @@ -445,7 +437,8 @@ void AIS_InteractiveContext::Display (const Handle(AIS_InteractiveObject)& theIO if (!myObjects.IsBound (theIObj)) { setObjectStatus (theIObj, PrsMgr_DisplayStatus_Displayed, theDispMode, theSelectionMode); - myMainVwr->StructureManager()->RegisterObject (theIObj); + theIObj->ViewAffinity()->SetVisible (true); // reset view affinity mask + myMainVwr->StructureManager()->RegisterObject (theIObj, theIObj->ViewAffinity()); myMainPM->Display(theIObj, theDispMode); if (theSelectionMode != -1) { @@ -521,7 +514,8 @@ void AIS_InteractiveContext::Load (const Handle(AIS_InteractiveObject)& theIObj, Standard_Integer aDispMode, aHiMod, aSelModeDef; GetDefModes (theIObj, aDispMode, aHiMod, aSelModeDef); setObjectStatus (theIObj, PrsMgr_DisplayStatus_Erased, aDispMode, theSelMode != -1 ? theSelMode : aSelModeDef); - myMainVwr->StructureManager()->RegisterObject (theIObj); + theIObj->ViewAffinity()->SetVisible (true); // reset view affinity mask + myMainVwr->StructureManager()->RegisterObject (theIObj, theIObj->ViewAffinity()); } // Register theIObj in the selection manager to prepare further activation of selection @@ -1900,13 +1894,9 @@ void AIS_InteractiveContext::ClearGlobal (const Handle(AIS_InteractiveObject)& t mgrSelector->Remove (anObj); setObjectStatus (theIObj, PrsMgr_DisplayStatus_None, -1, -1); + theIObj->ViewAffinity()->SetVisible (true); // reset view affinity mask myMainVwr->StructureManager()->UnregisterObject (theIObj); - for (V3d_ListOfViewIterator aDefViewIter (myMainVwr->DefinedViewIterator()); aDefViewIter.More(); aDefViewIter.Next()) - { - aDefViewIter.Value()->View()->ChangeHiddenObjects()->Remove (theIObj.get()); - } - if (!myLastPicked.IsNull()) { if (myLastPicked->IsSameSelectable (theIObj)) @@ -2228,7 +2218,7 @@ Bnd_Box AIS_InteractiveContext::BoundingBoxOfSelection (const Handle(V3d_View)& continue; } - Handle(Graphic3d_ViewAffinity) anAffinity = myMainVwr->StructureManager()->ObjectAffinity (anObj); + Handle(Graphic3d_ViewAffinity) anAffinity = anObj->ViewAffinity(); const Standard_Boolean isVisible = aViewId == -1 || anAffinity->IsVisible (aViewId); if (!isVisible) { @@ -2682,12 +2672,10 @@ AIS_StatusOfDetection AIS_InteractiveContext::moveTo (const Handle(V3d_View)& th myDetectedSeq.Clear(); myLastActiveView = theView.get(); - // preliminaires + // preliminaries AIS_StatusOfDetection aStatus = AIS_SOD_Nothing; Standard_Boolean toUpdateViewer = Standard_False; - myFilters->SetDisabledObjects (theView->View()->HiddenObjects()); - // filling of myAISDetectedSeq sequence storing information about detected AIS objects // (the objects must be AIS_Shapes) const Standard_Integer aDetectedNb = MainSelector()->NbPicked(); diff --git a/src/AIS/AIS_Manipulator.cxx b/src/AIS/AIS_Manipulator.cxx index 05aefddb1f..43da955306 100644 --- a/src/AIS/AIS_Manipulator.cxx +++ b/src/AIS/AIS_Manipulator.cxx @@ -1071,7 +1071,7 @@ void AIS_Manipulator::HilightOwnerWithColor (const Handle(PrsMgr_PresentationMan return; } - aPresentation->CStructure()->ViewAffinity = thePM->StructureManager()->ObjectAffinity (Handle(Standard_Transient) (this)); + aPresentation->CStructure()->ViewAffinity = myViewAffinity; if (anOwner->Mode() == AIS_MM_TranslationPlane) { diff --git a/src/AIS/AIS_ViewCube.cxx b/src/AIS/AIS_ViewCube.cxx index d2ec561fc1..25894e1057 100644 --- a/src/AIS/AIS_ViewCube.cxx +++ b/src/AIS/AIS_ViewCube.cxx @@ -1016,7 +1016,7 @@ void AIS_ViewCube::HilightOwnerWithColor (const Handle(PrsMgr_PresentationManage Handle(Prs3d_Presentation) aHiPrs = GetHilightPresentation (thePrsMgr); aHiPrs->Clear(); - aHiPrs->CStructure()->ViewAffinity = thePrsMgr->StructureManager()->ObjectAffinity (Handle(Standard_Transient)(this)); + aHiPrs->CStructure()->ViewAffinity = myViewAffinity; aHiPrs->SetTransformPersistence (TransformPersistence()); aHiPrs->SetZLayer (aLayer); diff --git a/src/Graphic3d/Graphic3d_CView.cxx b/src/Graphic3d/Graphic3d_CView.cxx index c114c66a21..985692f00c 100644 --- a/src/Graphic3d/Graphic3d_CView.cxx +++ b/src/Graphic3d/Graphic3d_CView.cxx @@ -36,7 +36,6 @@ Graphic3d_CView::Graphic3d_CView (const Handle(Graphic3d_StructureManager)& theM // myStructureManager (theMgr), myCamera (new Graphic3d_Camera()), - myHiddenObjects (new Graphic3d_NMapOfTransient()), myIsInComputedMode (Standard_False), myIsActive (Standard_False), myIsRemoved (Standard_False), diff --git a/src/Graphic3d/Graphic3d_CView.hxx b/src/Graphic3d/Graphic3d_CView.hxx index ac687ce8f4..143b50f4c4 100644 --- a/src/Graphic3d/Graphic3d_CView.hxx +++ b/src/Graphic3d/Graphic3d_CView.hxx @@ -134,12 +134,6 @@ public: //! Returns number of displayed structures in the view. virtual Standard_Integer NumberOfDisplayedStructures() const { return myStructsDisplayed.Extent(); } - //! Returns map of objects hidden within this specific view (not viewer-wise). - const Handle(Graphic3d_NMapOfTransient)& HiddenObjects() const { return myHiddenObjects; } - - //! Returns map of objects hidden within this specific view (not viewer-wise). - Handle(Graphic3d_NMapOfTransient)& ChangeHiddenObjects() { return myHiddenObjects; } - //! Returns Standard_True in case if the structure with the given is //! in list of structures to be computed and stores computed struct to . Standard_EXPORT Standard_Boolean IsComputed (const Standard_Integer theStructId, @@ -649,7 +643,6 @@ protected: Graphic3d_SequenceOfStructure myStructsToCompute; Graphic3d_SequenceOfStructure myStructsComputed; Graphic3d_MapOfStructure myStructsDisplayed; - Handle(Graphic3d_NMapOfTransient) myHiddenObjects; Standard_Boolean myIsInComputedMode; Standard_Boolean myIsActive; Standard_Boolean myIsRemoved; diff --git a/src/Graphic3d/Graphic3d_StructureManager.cxx b/src/Graphic3d/Graphic3d_StructureManager.cxx index de8637203c..a4e45a9b01 100644 --- a/src/Graphic3d/Graphic3d_StructureManager.cxx +++ b/src/Graphic3d/Graphic3d_StructureManager.cxx @@ -182,29 +182,45 @@ void Graphic3d_StructureManager::RecomputeStructures (const NCollection_Map(), aResult)) + if (myRegisteredObjects.Find (theObject.operator->(), aResult) + && aResult == theAffinity) { - return aResult; + return; } - aResult = new Graphic3d_ViewAffinity(); - myRegisteredObjects.Bind (theObject.operator->(), aResult); - return aResult; + myRegisteredObjects.Bind (theObject.operator->(), theAffinity); } +// ======================================================================== +// function : UnregisterObject +// purpose : +// ======================================================================== void Graphic3d_StructureManager::UnregisterObject (const Handle(Standard_Transient)& theObject) { myRegisteredObjects.UnBind (theObject.operator->()); } -Handle(Graphic3d_ViewAffinity) Graphic3d_StructureManager::ObjectAffinity (const Handle(Standard_Transient)& theObject) const +// ======================================================================== +// function : ObjectAffinity +// purpose : +// ======================================================================== +const Handle(Graphic3d_ViewAffinity)& Graphic3d_StructureManager::ObjectAffinity (const Handle(Standard_Transient)& theObject) const { - Handle(Graphic3d_ViewAffinity) aResult; - myRegisteredObjects.Find (theObject.operator->(), aResult); - return aResult; + const Handle(Graphic3d_ViewAffinity)* aResult = myRegisteredObjects.Seek (theObject.operator->()); + if (aResult == nullptr) + { + static const Handle(Graphic3d_ViewAffinity) aDummy; + return aDummy; + } + return *aResult; } // ======================================================================== diff --git a/src/Graphic3d/Graphic3d_StructureManager.hxx b/src/Graphic3d/Graphic3d_StructureManager.hxx index e1dd1452ac..1a881d1980 100644 --- a/src/Graphic3d/Graphic3d_StructureManager.hxx +++ b/src/Graphic3d/Graphic3d_StructureManager.hxx @@ -151,11 +151,12 @@ public: //! Recomputes all structures from theStructures. Standard_EXPORT void RecomputeStructures (const NCollection_Map& theStructures); - Standard_EXPORT Handle(Graphic3d_ViewAffinity) RegisterObject (const Handle(Standard_Transient)& theObject); + Standard_EXPORT void RegisterObject (const Handle(Standard_Transient)& theObject, + const Handle(Graphic3d_ViewAffinity)& theAffinity); Standard_EXPORT void UnregisterObject (const Handle(Standard_Transient)& theObject); - Standard_EXPORT Handle(Graphic3d_ViewAffinity) ObjectAffinity (const Handle(Standard_Transient)& theObject) const; + Standard_EXPORT const Handle(Graphic3d_ViewAffinity)& ObjectAffinity (const Handle(Standard_Transient)& theObject) const; //! Returns TRUE if Device Lost flag has been set and presentation data should be reuploaded onto graphics driver. Standard_Boolean IsDeviceLost() const { return myDeviceLostFlag; } diff --git a/src/IVtkOCC/IVtkOCC_ViewerSelector.cxx b/src/IVtkOCC/IVtkOCC_ViewerSelector.cxx index f3c124cae6..f12b8723a6 100644 --- a/src/IVtkOCC/IVtkOCC_ViewerSelector.cxx +++ b/src/IVtkOCC/IVtkOCC_ViewerSelector.cxx @@ -114,7 +114,7 @@ void IVtkOCC_ViewerSelector::Pick (const Standard_Integer theXPix, mySelectingVolumeMgr.BuildSelectingVolume(); - TraverseSensitives(); + TraverseSensitives (-1); } //============================================================================ @@ -160,7 +160,7 @@ void IVtkOCC_ViewerSelector::Pick (const Standard_Integer theXMin, mySelectingVolumeMgr.BuildSelectingVolume(); - TraverseSensitives(); + TraverseSensitives (-1); } //============================================================================ @@ -207,7 +207,7 @@ void IVtkOCC_ViewerSelector::Pick (double** thePoly, mySelectingVolumeMgr.BuildSelectingVolume(); - TraverseSensitives(); + TraverseSensitives (-1); } //============================================================================ diff --git a/src/PrsMgr/PrsMgr_PresentableObject.cxx b/src/PrsMgr/PrsMgr_PresentableObject.cxx index 835dadb20c..3cb38867de 100644 --- a/src/PrsMgr/PrsMgr_PresentableObject.cxx +++ b/src/PrsMgr/PrsMgr_PresentableObject.cxx @@ -45,6 +45,7 @@ const gp_Trsf& PrsMgr_PresentableObject::getIdentityTrsf() //======================================================================= PrsMgr_PresentableObject::PrsMgr_PresentableObject (const PrsMgr_TypeOfPresentation3d theType) : myParent (NULL), + myViewAffinity (new Graphic3d_ViewAffinity()), myDrawer (new Prs3d_Drawer()), myTypeOfPresentation3d (theType), myDisplayStatus (PrsMgr_DisplayStatus_None), diff --git a/src/PrsMgr/PrsMgr_PresentableObject.hxx b/src/PrsMgr/PrsMgr_PresentableObject.hxx index 3002dc5ebf..8e75fbf369 100644 --- a/src/PrsMgr/PrsMgr_PresentableObject.hxx +++ b/src/PrsMgr/PrsMgr_PresentableObject.hxx @@ -74,6 +74,9 @@ public: //! This method should be called before object displaying to take effect. Standard_EXPORT virtual void SetMutable (const Standard_Boolean theIsMutable); + //! Return view affinity mask. + const Handle(Graphic3d_ViewAffinity)& ViewAffinity() const { return myViewAffinity; } + //! Returns true if the Interactive Object has display mode setting overriding global setting (within Interactive Context). Standard_Boolean HasDisplayMode() const { return myDrawer->DisplayMode() != -1; } @@ -522,6 +525,7 @@ protected: PrsMgr_PresentableObject* myParent; //!< pointer to the parent object PrsMgr_Presentations myPresentations; //!< list of presentations + Handle(Graphic3d_ViewAffinity) myViewAffinity; //!< view affinity mask Handle(Graphic3d_SequenceOfHClipPlane) myClipPlanes; //!< sequence of object-specific clipping planes Handle(Prs3d_Drawer) myDrawer; //!< main presentation attributes Handle(Prs3d_Drawer) myHilightDrawer; //!< (optional) custom presentation attributes for highlighting selected object diff --git a/src/PrsMgr/PrsMgr_PresentationManager.cxx b/src/PrsMgr/PrsMgr_PresentationManager.cxx index 915e1b9fd7..766d70ed2a 100644 --- a/src/PrsMgr/PrsMgr_PresentationManager.cxx +++ b/src/PrsMgr/PrsMgr_PresentationManager.cxx @@ -519,7 +519,7 @@ Handle(PrsMgr_Presentation) PrsMgr_PresentationManager::Presentation (const Hand Handle(PrsMgr_Presentation) aPrs = new PrsMgr_Presentation (this, thePrsObj, theMode); aPrs->SetZLayer (thePrsObj->ZLayer()); - aPrs->CStructure()->ViewAffinity = myStructureManager->ObjectAffinity (!theSelObj.IsNull() ? theSelObj : thePrsObj); + aPrs->CStructure()->ViewAffinity = !theSelObj.IsNull() ? theSelObj->ViewAffinity() : thePrsObj->ViewAffinity(); thePrsObj->Presentations().Append (aPrs); thePrsObj->Fill (this, aPrs, theMode); diff --git a/src/SelectMgr/SelectMgr_ViewerSelector.cxx b/src/SelectMgr/SelectMgr_ViewerSelector.cxx index 8559eaed3a..94a7e75d75 100644 --- a/src/SelectMgr/SelectMgr_ViewerSelector.cxx +++ b/src/SelectMgr/SelectMgr_ViewerSelector.cxx @@ -626,7 +626,7 @@ void SelectMgr_ViewerSelector::traverseObject (const Handle(SelectMgr_Selectable // purpose : Traverses BVH containing all added selectable objects and // finds candidates for further search of overlap //======================================================================= -void SelectMgr_ViewerSelector::TraverseSensitives() +void SelectMgr_ViewerSelector::TraverseSensitives (const Standard_Integer theViewId) { SelectMgr_BVHThreadPool::Sentry aSentry (myBVHThreadPool); @@ -750,14 +750,16 @@ void SelectMgr_ViewerSelector::TraverseSensitives() } else { - Standard_Integer aStartIdx = aBVHTree->BegPrimitive (aNode); - Standard_Integer anEndIdx = aBVHTree->EndPrimitive (aNode); + const Standard_Integer aStartIdx = aBVHTree->BegPrimitive (aNode); + const Standard_Integer anEndIdx = aBVHTree->EndPrimitive (aNode); for (Standard_Integer anIdx = aStartIdx; anIdx <= anEndIdx; ++anIdx) { - const Handle(SelectMgr_SelectableObject)& aSelectableObject = - mySelectableObjects.GetObjectById (aBVHSubset, anIdx); - - traverseObject (aSelectableObject, aMgr, aCamera, aProjectionMat, aWorldViewMat, aWinSize); + const Handle(SelectMgr_SelectableObject)& aSelObj = mySelectableObjects.GetObjectById (aBVHSubset, anIdx); + const Handle(Graphic3d_ViewAffinity)& aViewAffinity = aSelObj->ViewAffinity(); + if (theViewId == -1 || aViewAffinity->IsVisible (theViewId)) + { + traverseObject (aSelObj, aMgr, aCamera, aProjectionMat, aWorldViewMat, aWinSize); + } } if (aHead < 0) { @@ -1175,7 +1177,7 @@ void SelectMgr_ViewerSelector::Pick (const Standard_Integer theXPix, mySelectingVolumeMgr.BuildSelectingVolume(); mySelectingVolumeMgr.SetViewClipping (theView->ClipPlanes(), Handle(Graphic3d_SequenceOfHClipPlane)(), NULL); - TraverseSensitives(); + TraverseSensitives (theView->View()->Identification()); } //======================================================================= @@ -1204,7 +1206,7 @@ void SelectMgr_ViewerSelector::Pick (const Standard_Integer theXPMin, mySelectingVolumeMgr.BuildSelectingVolume(); mySelectingVolumeMgr.SetViewClipping (theView->ClipPlanes(), Handle(Graphic3d_SequenceOfHClipPlane)(), NULL); - TraverseSensitives(); + TraverseSensitives (theView->View()->Identification()); } //======================================================================= @@ -1224,7 +1226,7 @@ void SelectMgr_ViewerSelector::Pick (const TColgp_Array1OfPnt2d& thePolyline, mySelectingVolumeMgr.BuildSelectingVolume(); mySelectingVolumeMgr.SetViewClipping (theView->ClipPlanes(), Handle(Graphic3d_SequenceOfHClipPlane)(), NULL); - TraverseSensitives(); + TraverseSensitives (theView->View()->Identification()); } //======================================================================= @@ -1240,7 +1242,7 @@ void SelectMgr_ViewerSelector::Pick (const gp_Ax1& theAxis, mySelectingVolumeMgr.BuildSelectingVolume(); mySelectingVolumeMgr.SetViewClipping (theView->ClipPlanes(), Handle(Graphic3d_SequenceOfHClipPlane)(), NULL); - TraverseSensitives(); + TraverseSensitives (theView->View()->Identification()); } //======================================================================= diff --git a/src/SelectMgr/SelectMgr_ViewerSelector.hxx b/src/SelectMgr/SelectMgr_ViewerSelector.hxx index e46d76a06d..ad684245d1 100644 --- a/src/SelectMgr/SelectMgr_ViewerSelector.hxx +++ b/src/SelectMgr/SelectMgr_ViewerSelector.hxx @@ -325,7 +325,7 @@ protected: //! Traverses BVH containing all added selectable objects and //! finds candidates for further search of overlap - Standard_EXPORT void TraverseSensitives(); + Standard_EXPORT void TraverseSensitives (const Standard_Integer theViewId = -1); //! Internal function that checks if there is possible overlap between some entity of selectable object theObject and //! current selecting volume. diff --git a/tests/v3d/bugs/bug32978 b/tests/v3d/bugs/bug32978 new file mode 100644 index 0000000000..f532c576a5 --- /dev/null +++ b/tests/v3d/bugs/bug32978 @@ -0,0 +1,34 @@ +puts "============" +puts "0031965: Visualization - AIS_InteractiveContext::HilightWithColor() ignores passed highlight style" +puts "============" +puts "" + +pload MODELING VISUALIZATION +vinit V1/RootView -width 1024 -height 512 -composer 0 +vbackground GRAY20 + +vinit V2/ViewLeft -parent V1/RootView -width 0.5 -height 1.0 +vbackground GRAY30 + +box b 100 200 300 +vdisplay -dispMode 1 b +vaspects b -faceBoundaryDraw 1 +vfit +vviewcube vc + +vinit V2/ViewRight -parent V1/RootView -width 0.5 -height 1.0 -left 0.5 +vbackground GRAY40 +psphere s 300 +vdisplay -dispMode 1 s +vaspects s -material SILVER +vfit +vzbufftrihedron + +vactivate V2/ViewLeft +verase s -view +vcamera -rotationMode pick +vmoveto 100 100 +if { [string match "*Select3D_SensitiveSphere*" [vstate -entities]] } { puts "Error: sphere should NOT be detected" } + +vseldump $::imagedir/${::casename}_sel.png -type entity +vdump $::imagedir/${::casename}_vis.png From 9b9aac4a7b420d6be1e59e1ac9795647fa0acf64 Mon Sep 17 00:00:00 2001 From: atereshi Date: Fri, 8 Apr 2022 14:16:01 +0300 Subject: [PATCH 292/639] 0032922: Data Exchange, STEP - The torus is stored incorrectly in STEP format Problem: the complete surface of the torus is not stored correctly in STEP format due to the fact that the edges are not properly ordered. Change: added a mode for reordering edges in the wire with simultaneous use of 2d and 3d information (ShapeAnalysis_WireOrder). The new mode is used for torus-like surfaces before saving to STEP format. Result: Torus correctly stored. --- src/ShapeAnalysis/ShapeAnalysis_Wire.cxx | 96 +- src/ShapeAnalysis/ShapeAnalysis_Wire.hxx | 8 +- src/ShapeAnalysis/ShapeAnalysis_WireOrder.cxx | 851 ++++++++++++------ src/ShapeAnalysis/ShapeAnalysis_WireOrder.hxx | 98 +- src/ShapeFix/ShapeFix_Wire.cxx | 88 +- src/ShapeFix/ShapeFix_Wire.hxx | 6 +- .../TopoDSToStep_MakeStepWire.cxx | 352 ++++---- tests/bugs/step/bug28256 | 4 +- tests/bugs/step/bug32922 | 111 +++ 9 files changed, 1032 insertions(+), 582 deletions(-) create mode 100644 tests/bugs/step/bug32922 diff --git a/src/ShapeAnalysis/ShapeAnalysis_Wire.cxx b/src/ShapeAnalysis/ShapeAnalysis_Wire.cxx index d7fc1edba2..71560d84c7 100644 --- a/src/ShapeAnalysis/ShapeAnalysis_Wire.cxx +++ b/src/ShapeAnalysis/ShapeAnalysis_Wire.cxx @@ -260,7 +260,7 @@ void ShapeAnalysis_Wire::SetSurface (const Handle(Geom_Surface)& surface, const Standard_Boolean mode3d) { ShapeAnalysis_WireOrder sawo; - CheckOrder (sawo, isClosed, mode3d); + CheckOrder (sawo, isClosed, mode3d, Standard_False); myStatusOrder = myStatus; return StatusOrder (ShapeExtend_DONE); } @@ -550,54 +550,94 @@ void ShapeAnalysis_Wire::SetSurface (const Handle(Geom_Surface)& surface, //purpose : //======================================================================= -Standard_Boolean ShapeAnalysis_Wire::CheckOrder(ShapeAnalysis_WireOrder& sawo, +Standard_Boolean ShapeAnalysis_Wire::CheckOrder(ShapeAnalysis_WireOrder &sawo, const Standard_Boolean isClosed, - const Standard_Boolean mode3d) + const Standard_Boolean theMode3D, + const Standard_Boolean theModeBoth) { - if ( ! mode3d && myFace.IsNull() ) { - myStatus = ShapeExtend::EncodeStatus (ShapeExtend_FAIL2); + if ((!theMode3D || theModeBoth) && myFace.IsNull()) + { + myStatus = ShapeExtend::EncodeStatus (ShapeExtend_FAIL2); return Standard_False; } - myStatus = ShapeExtend::EncodeStatus (ShapeExtend_OK); - sawo.SetMode ( mode3d, ( mode3d ? myPrecision : ::Precision::PConfusion() ) ); - Standard_Integer i, nb = myWire->NbEdges(); + sawo.SetMode(theMode3D, 0.0, theModeBoth); + Standard_Integer nb = myWire->NbEdges(); ShapeAnalysis_Edge EA; - for (i = 1; i <= nb; i ++) { + Standard_Boolean isAll2dEdgesOk = Standard_True; + for (Standard_Integer i = 1; i <= nb; i++) + { TopoDS_Edge E = myWire->Edge(i); - if ( mode3d ) { - TopoDS_Vertex V1 = EA.FirstVertex (E); - TopoDS_Vertex V2 = EA.LastVertex (E); + gp_XYZ aP1XYZ, aP2XYZ; + gp_XY aP1XY, aP2XY; + if (theMode3D || theModeBoth) + { + TopoDS_Vertex V1 = EA.FirstVertex(E); + TopoDS_Vertex V2 = EA.LastVertex(E); if (V1.IsNull() || V2.IsNull()) { myStatus = ShapeExtend::EncodeStatus (ShapeExtend_FAIL2); return Standard_False; } - gp_Pnt p1 = BRep_Tool::Pnt (V1); - gp_Pnt p2 = BRep_Tool::Pnt (V2); - sawo.Add (p1.XYZ(),p2.XYZ()); + else + { + aP1XYZ = BRep_Tool::Pnt(V1).XYZ(); + aP2XYZ = BRep_Tool::Pnt(V2).XYZ(); + } } - else { - Standard_Real f,l; + if (!theMode3D || theModeBoth) + { + Standard_Real f, l; Handle(Geom2d_Curve) c2d; - TopoDS_Shape tmpF = myFace.Oriented(TopAbs_FORWARD); - if ( ! EA.PCurve(E,TopoDS::Face(tmpF),c2d,f,l) ) { - myStatus = ShapeExtend::EncodeStatus (ShapeExtend_FAIL2); - return Standard_False; + TopoDS_Shape tmpF = myFace.Oriented (TopAbs_FORWARD); + if (!EA.PCurve(E, TopoDS::Face (tmpF), c2d, f, l)) + { + // if mode is 2d, then we can nothing to do, else we can switch to 3d mode + if (!theMode3D && !theModeBoth) + { + myStatus = ShapeExtend::EncodeStatus (ShapeExtend_FAIL2); + return Standard_False; + } + else + { + isAll2dEdgesOk = Standard_False; + } + } + else + { + aP1XY = c2d->Value(f).XY(); + aP2XY = c2d->Value(l).XY(); } - sawo.Add(c2d->Value(f).XY(),c2d->Value(l).XY()); + } + if (theMode3D && !theModeBoth) + { + sawo.Add (aP1XYZ, aP2XYZ); + } + else if (!theMode3D && !theModeBoth) + { + sawo.Add (aP1XY, aP2XY); + } + else + { + sawo.Add (aP1XYZ, aP2XYZ, aP1XY, aP2XY); } } - sawo.Perform(isClosed); + // need to switch to 3d mode + if (theModeBoth && !isAll2dEdgesOk) + { + sawo.SetMode (Standard_True, 0.0, Standard_False); + } + sawo.Perform (isClosed); Standard_Integer stat = sawo.Status(); - switch (stat) { + switch (stat) + { case 0: myStatus = ShapeExtend::EncodeStatus (ShapeExtend_OK); break; case 1: myStatus = ShapeExtend::EncodeStatus (ShapeExtend_DONE1); break; - case 2: myStatus = ShapeExtend::EncodeStatus (ShapeExtend_DONE2); break; + case 2: myStatus = ShapeExtend::EncodeStatus (ShapeExtend_DONE2); break; // this value is not returned case -1: myStatus = ShapeExtend::EncodeStatus (ShapeExtend_DONE3); break; - case -2: myStatus = ShapeExtend::EncodeStatus (ShapeExtend_DONE4); break; - case 3: myStatus = ShapeExtend::EncodeStatus (ShapeExtend_DONE5); break;//only shifted - case -10: myStatus = ShapeExtend::EncodeStatus (ShapeExtend_FAIL1); break; + case -2: myStatus = ShapeExtend::EncodeStatus (ShapeExtend_DONE4); break; // this value is not returned + case 3: myStatus = ShapeExtend::EncodeStatus (ShapeExtend_DONE5); break; // only shifted + case -10: myStatus = ShapeExtend::EncodeStatus (ShapeExtend_FAIL1); break; // this value is not returned } return LastCheckStatus (ShapeExtend_DONE); } diff --git a/src/ShapeAnalysis/ShapeAnalysis_Wire.hxx b/src/ShapeAnalysis/ShapeAnalysis_Wire.hxx index 3bce04c331..c2bc90c7f1 100644 --- a/src/ShapeAnalysis/ShapeAnalysis_Wire.hxx +++ b/src/ShapeAnalysis/ShapeAnalysis_Wire.hxx @@ -232,7 +232,8 @@ public: //! Analyzes the order of the edges in the wire, //! uses class WireOrder for that purpose. //! Flag defines if the wire is closed or not - //! Flag defines which mode is used (3d or 2d) + //! Flag defines 3D or 2d mode. + //! Flag defines miscible mode and the flag is ignored. //! Returns False if wire is already ordered (tail-to-head), //! True otherwise. //! Use returned WireOrder object for deeper analysis. @@ -243,7 +244,10 @@ public: //! DONE3: not the same edges orientation (some need to be reversed) //! DONE4: as DONE3 and gaps more than myPrecision //! FAIL : algorithm failed (could not detect order) - Standard_EXPORT Standard_Boolean CheckOrder (ShapeAnalysis_WireOrder& sawo, const Standard_Boolean isClosed = Standard_True, const Standard_Boolean mode3d = Standard_True); + Standard_EXPORT Standard_Boolean CheckOrder(ShapeAnalysis_WireOrder &sawo, + Standard_Boolean isClosed = Standard_True, + Standard_Boolean theMode3D = Standard_True, + Standard_Boolean theModeBoth = Standard_False); //! Checks connected edges (num-th and preceding). //! Tests with starting preci from or with if diff --git a/src/ShapeAnalysis/ShapeAnalysis_WireOrder.cxx b/src/ShapeAnalysis/ShapeAnalysis_WireOrder.cxx index 0d6f9e03b4..0b8b34c4f0 100644 --- a/src/ShapeAnalysis/ShapeAnalysis_WireOrder.cxx +++ b/src/ShapeAnalysis/ShapeAnalysis_WireOrder.cxx @@ -21,10 +21,9 @@ #include #include #include -#include #include +#include #include -#include #include #include #include @@ -34,7 +33,7 @@ //purpose : //======================================================================= ShapeAnalysis_WireOrder::ShapeAnalysis_WireOrder() - : myKeepLoops(Standard_False) , myGap (0.) , myStat (0) , myMode (Standard_True) + : myGap (0.0), myStat (0), myKeepLoops (Standard_False), myMode (Mode3D) { myTol = Precision::Confusion(); Clear(); @@ -45,10 +44,26 @@ ShapeAnalysis_WireOrder::ShapeAnalysis_WireOrder() //purpose : //======================================================================= -ShapeAnalysis_WireOrder::ShapeAnalysis_WireOrder(const Standard_Boolean mode3d, - const Standard_Real tol) - : myKeepLoops(Standard_False), myTol (tol), myGap (0.), myStat (0), myMode (mode3d) +ShapeAnalysis_WireOrder::ShapeAnalysis_WireOrder (const Standard_Boolean theMode3D, + const Standard_Real theTolerance, + const Standard_Boolean theModeBoth) + : myTol (theTolerance), myGap (0.0), myStat (0), myKeepLoops (Standard_False) { + if (theModeBoth) + { + myMode = ModeBoth; + } + else + { + if (theMode3D) + { + myMode = Mode3D; + } + else + { + myMode = Mode2D; + } + } Clear(); } @@ -57,12 +72,36 @@ ShapeAnalysis_WireOrder::ShapeAnalysis_WireOrder(const Standard_Boolean mode3d, //purpose : //======================================================================= -void ShapeAnalysis_WireOrder::SetMode(const Standard_Boolean mode3d,const Standard_Real tol) +void ShapeAnalysis_WireOrder::SetMode (const Standard_Boolean theMode3D, + const Standard_Real theTolerance, + const Standard_Boolean theModeBoth) { - if (mode3d != myMode) Clear(); - myOrd.Nullify(); myStat = 0; myGap = 0.; - myMode = mode3d; - myTol = (tol > 0.)? tol : 1.e-08; //szv#4:S4163:12Mar99 optimized + ModeType aNewMode; + + if (theModeBoth) + { + aNewMode = ModeBoth; + } + else + { + if (theMode3D) + { + aNewMode = Mode3D; + } + else + { + aNewMode = Mode2D; + } + } + if (myMode != aNewMode) + { + Clear(); + } + myMode = aNewMode; + myOrd.Nullify(); + myStat = 0; + myGap = 0.0; + myTol = (theTolerance > 0.0) ? theTolerance : 1.e-08; } //======================================================================= @@ -80,11 +119,12 @@ Standard_Real ShapeAnalysis_WireOrder::Tolerance() const //purpose : //======================================================================= -void ShapeAnalysis_WireOrder::Clear() +void ShapeAnalysis_WireOrder::Clear() { myXYZ = new TColgp_HSequenceOfXYZ(); + myXY = new TColgp_HSequenceOfXY(); myStat = 0; - myGap = 0.; + myGap = 0.0; } //======================================================================= @@ -92,13 +132,12 @@ void ShapeAnalysis_WireOrder::Clear() //purpose : //======================================================================= -void ShapeAnalysis_WireOrder::Add(const gp_XYZ& start3d,const gp_XYZ& end3d) +void ShapeAnalysis_WireOrder::Add (const gp_XYZ& theStart3d, const gp_XYZ& theEnd3d) { - //szv#4:S4163:12Mar99 waste raise - //if (!myMode) - //throw Standard_TypeMismatch("ShapeAnalysis_WireOrder : AddXYZ"); - if (myMode) { - myXYZ->Append (start3d); myXYZ->Append (end3d); + if (myMode == Mode3D) + { + myXYZ->Append (theStart3d); + myXYZ->Append (theEnd3d); } } @@ -107,20 +146,38 @@ void ShapeAnalysis_WireOrder::Add(const gp_XYZ& start3d,const gp_XYZ& end3d) //purpose : //======================================================================= -void ShapeAnalysis_WireOrder::Add(const gp_XY& start2d,const gp_XY& end2d) +void ShapeAnalysis_WireOrder::Add (const gp_XY& theStart2d, const gp_XY& theEnd2d) { - //szv#4:S4163:12Mar99 waste raise - //if ( myMode) - //throw Standard_TypeMismatch("ShapeAnalysis_WireOrder : AddXY"); - if (!myMode) { + if (myMode == Mode2D) + { gp_XYZ val; - val.SetCoord (start2d.X(),start2d.Y(),0.); + val.SetCoord (theStart2d.X(), theStart2d.Y(), 0.0); myXYZ->Append (val); - val.SetCoord (end2d.X(),end2d.Y(),0.); + val.SetCoord (theEnd2d.X(), theEnd2d.Y(), 0.0); myXYZ->Append (val); } } +//======================================================================= +//function : Add +//purpose : +//======================================================================= + +void ShapeAnalysis_WireOrder::Add (const gp_XYZ& theStart3d, + const gp_XYZ& theEnd3d, + const gp_XY& theStart2d, + const gp_XY& theEnd2d) +{ + if (myMode == ModeBoth) + { + myXYZ->Append (theStart3d); + myXYZ->Append (theEnd3d); + + myXY->Append (theStart2d); + myXY->Append (theEnd2d); + } +} + //======================================================================= //function : NbEdges //purpose : @@ -166,234 +223,480 @@ Standard_Boolean& ShapeAnalysis_WireOrder::KeepLoopsMode() //======================================================================= //function : Perform -//purpose : +//purpose : Make wire order analysis and propose the better order of the edges +// taking into account the gaps between edges. //======================================================================= -static Standard_Boolean IsBetter(const Standard_Integer first, - const Standard_Integer second) -{ - //rln 23.03.99 bm4_al_eye.stp, entity 5281 - //Order in the file is better even if another order has the same distance - //Lexicograhical order of preference: 0 > 2 > 1 > 3 - if (first == 0 && second > 0 ) return Standard_True; - if (first == 2 && (second == 1 || second == 3)) return Standard_True; - if (first == 1 && second == 3 ) return Standard_True; - return Standard_False; -} - -void ShapeAnalysis_WireOrder::Perform(const Standard_Boolean /*closed*/) +void ShapeAnalysis_WireOrder::Perform (const Standard_Boolean /*closed*/) { myStat = 0; - Standard_Integer i, nb = NbEdges(); - if(nb == 0) - return; // no edges loaded, nothing to do -- return with status OK - myOrd = new TColStd_HArray1OfInteger(1,nb); - myOrd->Init(0); - - Handle(TColStd_HSequenceOfInteger) seq = new TColStd_HSequenceOfInteger; - TColStd_SequenceOfTransient loops; - - TColgp_Array1OfXYZ debs(0,nb); - TColgp_Array1OfXYZ fins(0,nb); - - TColStd_Array1OfBoolean idone (1, nb); - idone.Init (Standard_False); - -// Calcul des precedents-suivants - for (i = 1; i <= nb; i ++) { - debs(i) = myXYZ->Value(2*i-1); - fins(i) = myXYZ->Value(2*i); + Standard_Integer aNbEdges = NbEdges(); + // no edges loaded, nothing to do -- return with status OK + if (aNbEdges == 0) + { + return; + } + myOrd = new TColStd_HArray1OfInteger (1, aNbEdges); + myOrd->Init (0); + + // sequence of the edge nums in the right order + Handle(TColStd_HSequenceOfInteger) anEdgeSeq = new TColStd_HSequenceOfInteger; + NCollection_Sequence aLoops; + + // the beginnings and ends of the edges + TColgp_Array1OfXYZ aBegins3D (1, aNbEdges); + TColgp_Array1OfXYZ anEnds3D (1, aNbEdges); + TColgp_Array1OfXY aBegins2D (1, aNbEdges); + TColgp_Array1OfXY anEnds2D (1, aNbEdges); + for (Standard_Integer i = 1; i <= aNbEdges; i++) + { + aBegins3D (i) = myXYZ->Value (2 * i - 1); + anEnds3D (i) = myXYZ->Value (2 * i); + if (myMode == ModeBoth) + { + aBegins2D (i) = myXY->Value (2 * i - 1); + anEnds2D (i) = myXY->Value (2 * i); + } } + // the flags that the edges was considered + TColStd_Array1OfBoolean isEdgeUsed (1, aNbEdges); + isEdgeUsed.Init (Standard_False); + + Standard_Real aTol2 = Precision::SquareConfusion(); + Standard_Real aTolP2 = Precision::SquarePConfusion(); + + // take the first edge to the constructed chain + isEdgeUsed (1) = Standard_True; + gp_Pnt aFirstPnt3D = aBegins3D (1); + gp_Pnt aLastPnt3D = anEnds3D (1); + gp_Pnt2d aFirstPnt2D; + gp_Pnt2d aLastPnt2D; + if (myMode == ModeBoth) + { + aFirstPnt2D = aBegins2D (1); + aLastPnt2D = anEnds2D (1); + } + anEdgeSeq->Append (1); + + // cycle until all edges are considered + for (;;) + { + // joint type + // 0 - the start of the best edge to the end of constructed sequence (nothing to do) + // 1 - the end of the best edge to the start of constructed sequence (need move the edge) + // 2 - the end of the best edge to the end of constructed sequence (need to reverse) + // 3 - the start of the best edge to the start of constructed sequence (need to reverse and move the edge) + Standard_Integer aBestJointType = 3; + // the best minimum distance between constructed sequence and the best edge + Standard_Real aBestMin3D = RealLast(); + // number of the best edge + Standard_Integer aBestEdgeNum = 0; + // the best edge was found + Standard_Boolean isFound = Standard_False; + Standard_Boolean isConnected = Standard_False; + // loop to find the best edge among all the remaining + for (Standard_Integer i = 1; i <= aNbEdges; i++) + { + if (isEdgeUsed (i)) + { + continue; + } - Standard_Real tol2 = Precision::SquareConfusion(); - idone(1) = Standard_True; - gp_Pnt wireFirst = debs(1); - gp_Pnt wireLast = fins(1); - seq->Append(1); - Standard_Boolean done = Standard_False; - - //pdn 11.03.99 S4135 constructing closed loops of edges - while(!done) { - Standard_Integer resultType = 3; - Standard_Real distmin = RealLast(); - Standard_Integer ledge = 0; - Standard_Boolean found = Standard_False; - Standard_Real closeDist = wireFirst.SquareDistance(wireLast); - - for(Standard_Integer iedge = 1; (iedge <= nb) && (distmin||resultType||(resultType!=2)); iedge++) - if(!idone(iedge)) { - Standard_Real tailhead = wireLast.SquareDistance(debs(iedge)); - Standard_Real tailtail = wireLast.SquareDistance(fins(iedge)); - Standard_Real headtail = wireFirst.SquareDistance(fins(iedge)); - Standard_Real headhead = wireFirst.SquareDistance(debs(iedge)); - Standard_Real dm1 = tailhead, dm2 = headtail; - Standard_Integer res1 = 0, res2 = 2; - - if (tailhead > tailtail) {res1 = 1; dm1 = tailtail;} - if (headtail > headhead) {res2 = 3; dm2 = headhead;} - Standard_Integer result =0; - Standard_Real myMin3d = Min (dm1, dm2); - if(fabs(dm1 - dm2) < tol2 ) { - Standard_Boolean isB = IsBetter(res1,res2); - result = (isB ? res1 : res2); + // find minimum distance and joint type for 3D and 2D (if necessary) modes + Standard_Integer aCurJointType; + Standard_Real aCurMin; + // distance for four possible cases + Standard_Real aSeqTailEdgeHead = aLastPnt3D.SquareDistance (aBegins3D (i)); + Standard_Real aSeqTailEdgeTail = aLastPnt3D.SquareDistance (anEnds3D (i)); + Standard_Real aSeqHeadEdgeTail = aFirstPnt3D.SquareDistance (anEnds3D (i)); + Standard_Real aSeqHeadEdgeHead = aFirstPnt3D.SquareDistance (aBegins3D (i)); + // the best distances for joints with head and tail of sequence + Standard_Real aMinDistToTail, aMinDistToHead; + Standard_Integer aTailJoinType, aHeadJointType; + if (aSeqTailEdgeHead <= aSeqTailEdgeTail) + { + aTailJoinType = 0; + aMinDistToTail = aSeqTailEdgeHead; + } + else + { + aTailJoinType = 2; + aMinDistToTail = aSeqTailEdgeTail; + } + if (aSeqHeadEdgeTail <= aSeqHeadEdgeHead) + { + aHeadJointType = 1; + aMinDistToHead = aSeqHeadEdgeTail; + } + else + { + aHeadJointType = 3; + aMinDistToHead = aSeqHeadEdgeHead; + } + // comparing the head and the tail cases + // if distances are close enough then we use rule for joint type: 0 < 1 < 2 < 3 + if (fabs (aMinDistToTail - aMinDistToHead) < aTol2) + { + if (aTailJoinType < aHeadJointType) + { + aCurJointType = aTailJoinType; + aCurMin = aMinDistToTail; + } + else + { + aCurJointType = aHeadJointType; + aCurMin = aMinDistToHead; + } + } + else + { + if (aMinDistToTail <= aMinDistToHead) + { + aCurJointType = aTailJoinType; + aCurMin = aMinDistToTail; + } + else + { + aCurJointType = aHeadJointType; + aCurMin = aMinDistToHead; + } + } + // update for the best values + if (myMode == ModeBoth) + { + // distances in 2D + Standard_Integer aJointMask3D = 0, aJointMask2D = 0; + if (aSeqTailEdgeHead < aTol2) + { + aJointMask3D |= (1 << 0); + } + if (aSeqTailEdgeTail < aTol2) + { + aJointMask3D |= (1 << 2); + } + if (aSeqHeadEdgeTail < aTol2) + { + aJointMask3D |= (1 << 1); + } + if (aSeqHeadEdgeHead < aTol2) + { + aJointMask3D |= (1 << 3); + } + Standard_Real aSeqTailEdgeHead2D = aLastPnt2D.SquareDistance (aBegins2D (i)); + Standard_Real aSeqTailEdgeTail2D = aLastPnt2D.SquareDistance (anEnds2D (i)); + Standard_Real aSeqHeadEdgeTail2D = aFirstPnt2D.SquareDistance (anEnds2D (i)); + Standard_Real aSeqHeadEdgeHead2D = aFirstPnt2D.SquareDistance (aBegins2D (i)); + if (aSeqTailEdgeHead2D < aTolP2) + { + aJointMask2D |= (1 << 0); + } + if (aSeqTailEdgeTail2D < aTolP2) + { + aJointMask2D |= (1 << 2); + } + if (aSeqHeadEdgeTail2D < aTolP2) + { + aJointMask2D |= (1 << 1); + } + if (aSeqHeadEdgeHead2D < aTolP2) + { + aJointMask2D |= (1 << 3); + } + // new approche for detecting best edge connection, for all other cases used old 3D algorithm + Standard_Integer aFullMask = aJointMask3D & aJointMask2D; + if (aFullMask != 0) + { + // find the best current joint type + aCurJointType = 3; + for (Standard_Integer j = 0; j < 4; j++) + { + if (aFullMask & (1 << j)) + { + aCurJointType = j; + break; + } + } + if (!isConnected || aCurJointType < aBestJointType) + { + isFound = Standard_True; + isConnected = Standard_True; + switch (aCurJointType) + { + case 0: + aBestMin3D = aSeqTailEdgeHead; + break; + case 1: + aBestMin3D = aSeqHeadEdgeTail; + break; + case 2: + aBestMin3D = aSeqTailEdgeTail; + break; + case 3: + aBestMin3D = aSeqHeadEdgeHead; + break; + } + aBestJointType = aCurJointType; + aBestEdgeNum = i; + } + } + // if there is still no connection, continue to use ald 3D algorithm + if (isConnected) + { + continue; } - else - result = ((dm1 > dm2) ? res2 : res1); // 0 > 2 > 1 > 3 - - if (distmin > tol2 || IsBetter(result,resultType)) - if (myMin3d < distmin || ((myMin3d == distmin || myMin3d < tol2) && IsBetter(result,resultType))) { - found = Standard_True; - distmin = myMin3d; - ledge = iedge; - resultType = result; - } } - if(found) { - if (distmin == 0 || distmin < closeDist) { - switch(resultType){ - case 0: seq->Append(ledge); wireLast = fins(ledge); break; - case 1: seq->Append(-ledge); wireLast = debs(ledge); break; - case 2: seq->Prepend(ledge); wireFirst = debs(ledge); break; - case 3: seq->Prepend(-ledge); wireFirst = fins(ledge); break; - } - } else { - //pdn 11.03.99 S4135 closing loop and creating new one - loops.Append(seq); - seq = new TColStd_HSequenceOfInteger; - wireFirst = debs(ledge); - wireLast = fins(ledge); - seq->Append(ledge); + // if the best distance is still not reached (aBestMin3D > aTol2) or we found a better joint type + if (aBestMin3D > aTol2 || aCurJointType < aBestJointType) + { + // make a decision that this edge is good enough: + // - it gets the best distance but there is fabs(aCurMin3d - aBestMin3d) < aTol2 && (aCurJointType < aBestJointType) ? + // - it gets the best joint in some cases + if (aCurMin < aBestMin3D || ((aCurMin == aBestMin3D || aCurMin < aTol2) && (aCurJointType < aBestJointType))) + { + isFound = Standard_True; + aBestMin3D = aCurMin; + aBestJointType = aCurJointType; + aBestEdgeNum = i; + } + } + } + + // check that we found edge for connecting + if (isFound) + { + // distance between first and last point in sequence + Standard_Real aCloseDist = aFirstPnt3D.SquareDistance (aLastPnt3D); + // if it's better to insert the edge than to close the loop, just insert the edge according to joint type + if (aBestMin3D <= RealSmall() || aBestMin3D < aCloseDist) + { + switch (aBestJointType) + { + case 0: + anEdgeSeq->Append (aBestEdgeNum); + aLastPnt3D = anEnds3D (aBestEdgeNum); + break; + case 1: + anEdgeSeq->Prepend (aBestEdgeNum); + aFirstPnt3D = aBegins3D (aBestEdgeNum); + break; + case 2: + anEdgeSeq->Append (-aBestEdgeNum); + aLastPnt3D = aBegins3D (aBestEdgeNum); + break; + case 3: + anEdgeSeq->Prepend (-aBestEdgeNum); + aFirstPnt3D = anEnds3D (aBestEdgeNum); + break; + } + if (myMode == ModeBoth) + { + switch (aBestJointType) + { + case 0: + aLastPnt2D = anEnds2D (aBestEdgeNum); + break; + case 1: + aFirstPnt2D = aBegins2D (aBestEdgeNum); + break; + case 2: + aLastPnt2D = aBegins2D (aBestEdgeNum); + break; + case 3: + aFirstPnt2D = anEnds2D (aBestEdgeNum); + break; + } + } } - idone(ledge) = Standard_True; - } else { - ledge = -1; - for (i = 1 ; i <= nb && ledge == -1; i++) - ledge = idone(i) ? ledge : i; - if (ledge == -1) - done = 1; - else { - wireFirst = debs(ledge); - wireLast = fins(ledge); - seq->Append(ledge); - idone(ledge) = Standard_True; + // closing loop and creating new one + else + { + aLoops.Append (anEdgeSeq); + anEdgeSeq = new TColStd_HSequenceOfInteger; + aFirstPnt3D = aBegins3D (aBestEdgeNum); + aLastPnt3D = anEnds3D (aBestEdgeNum); + if (myMode == ModeBoth) + { + aFirstPnt2D = aBegins2D (aBestEdgeNum); + aLastPnt2D = anEnds2D (aBestEdgeNum); + } + anEdgeSeq->Append (aBestEdgeNum); } + // mark the edge as used + isEdgeUsed (aBestEdgeNum) = Standard_True; + } + else + { + // the only condition under which we can't find an edge is when all edges are done + break; } } - loops.Append(seq); - - Handle(TColStd_HSequenceOfInteger) mainSeq; - if (myKeepLoops) { - - //pdn Keeping the loops, adding one after another. - mainSeq = new TColStd_HSequenceOfInteger; - for (Standard_Integer ii = 1; ii <= loops.Length(); ii++) { - Handle(TColStd_HSequenceOfInteger) subLoop = - Handle(TColStd_HSequenceOfInteger)::DownCast(loops(ii)); - for (Standard_Integer j = 1; j<= subLoop->Length(); j++) - mainSeq->Append(subLoop->Value(j)); + // append the last loop + aLoops.Append (anEdgeSeq); + + // handling with constructed loops + Handle(TColStd_HSequenceOfInteger) aMainLoop; + if (myKeepLoops) + { + // keeping the loops, adding one after another. + aMainLoop = new TColStd_HSequenceOfInteger; + for (Standard_Integer i = 1; i <= aLoops.Length(); i++) + { + const Handle(TColStd_HSequenceOfInteger)& aCurLoop = aLoops (i); + aMainLoop->Append (aCurLoop); } } - else { - //pdn 11.03.99 S4135 connecting loops. - mainSeq = Handle(TColStd_HSequenceOfInteger)::DownCast(loops.First()); - loops.Remove(1); - while(loops.Length()) { - Standard_Real minLoopDist = RealLast(); - Standard_Integer loopNum=0; - Standard_Integer loopShift=0; - Standard_Boolean loopDirect=0; - Standard_Integer numInLoop=0; - for(i = 1; i <= loops.Length(); i++) { - Handle(TColStd_HSequenceOfInteger) loop = Handle(TColStd_HSequenceOfInteger)::DownCast(loops.Value(i)); - Standard_Integer num = loop->Length(); - Standard_Integer LocShift=0; - Standard_Integer LocNumInLoop=0; - Standard_Boolean LocDirect = Standard_False; - Standard_Real minLocDist = RealLast(); - for(Standard_Integer ibegin = 1; ibegin <= loop->Length(); ibegin++) { - Standard_Integer iend = (ibegin==1 ? num : ibegin -1); - gp_Pnt loopFirst = (loop->Value(ibegin) > 0 ? debs(loop->Value(ibegin)) : fins(-loop->Value(ibegin))); - gp_Pnt loopLast = (loop->Value(iend) > 0 ? fins(loop->Value(iend)) : debs(-loop->Value(iend))); - Standard_Real distmin = RealLast(); - Standard_Integer lloop=0; - Standard_Boolean direct = Standard_False; - for(Standard_Integer j = 1; (j <= mainSeq->Length())&& distmin; j++) { - Standard_Integer k = (j == mainSeq->Length()? 1 : j+1); - gp_Pnt first = (mainSeq->Value(j) > 0 ? fins(mainSeq->Value(j)) : debs(-mainSeq->Value(j))); - gp_Pnt last = (mainSeq->Value(k) > 0 ? debs(mainSeq->Value(k)) : fins(-mainSeq->Value(k))); - Standard_Real dirDist = loopFirst.SquareDistance(first)+loopLast.SquareDistance(last); - Standard_Real revDist = loopFirst.SquareDistance(last)+loopLast.SquareDistance(first); - Standard_Real minDist; - if((dirDistLength(); + for (Standard_Integer aCurEdgeIt = 1; aCurEdgeIt <= aCurLoopLength; aCurEdgeIt++) + { + // get the distance between the current edge and the previous edge taking into account the edge's orientation + Standard_Integer aPrevEdgeIt = aCurEdgeIt == 1 ? aCurLoopLength : aCurEdgeIt - 1; + Standard_Integer aCurEdgeIdx = aCurLoop->Value (aCurEdgeIt); + Standard_Integer aPrevEdgeIdx = aCurLoop->Value (aPrevEdgeIt); + gp_Pnt aCurLoopFirst = aCurEdgeIdx > 0 ? aBegins3D (aCurEdgeIdx) : anEnds3D (-aCurEdgeIdx); + gp_Pnt aCurLoopLast = aPrevEdgeIdx > 0 ? anEnds3D (aPrevEdgeIdx) : aBegins3D (-aPrevEdgeIdx); + // iterate over all gaps between edges in main loop + Standard_Real aMinDist3 = RealLast(); + Standard_Integer aMainLoopIt3 = 0; + Standard_Boolean aDirect3 = Standard_False; + Standard_Integer aMainLoopLength = aMainLoop->Length(); + for (Standard_Integer aCurEdgeIt2 = 1; (aCurEdgeIt2 <= aMainLoopLength) && aMinDist3 != 0.0; aCurEdgeIt2++) + { + // get the distance between the current edge and the next edge taking into account the edge's orientation + Standard_Integer aNextEdgeIt2 = aCurEdgeIt2 == aMainLoopLength ? 1 : aCurEdgeIt2 + 1; + Standard_Integer aCurEdgeIdx2 = aMainLoop->Value (aCurEdgeIt2); + Standard_Integer aNextEdgeIdx2 = aMainLoop->Value (aNextEdgeIt2); + gp_Pnt aMainLoopFirst = (aCurEdgeIdx2 > 0 ? anEnds3D (aCurEdgeIdx2) : aBegins3D (-aCurEdgeIdx2)); + gp_Pnt aMainLoopLast = (aNextEdgeIdx2 > 0 ? aBegins3D (aNextEdgeIdx2) : anEnds3D (-aNextEdgeIdx2)); + // getting the sum of square distances if we try to sew the current loop with the main loop in current positions + Standard_Real aDirectDist = + aCurLoopFirst.SquareDistance (aMainLoopFirst) + aCurLoopLast.SquareDistance (aMainLoopLast); + Standard_Real aReverseDist = + aCurLoopFirst.SquareDistance (aMainLoopLast) + aCurLoopLast.SquareDistance (aMainLoopFirst); + // take the best result + Standard_Real aJoinDist; + if ((aDirectDist < aTol2) || (aDirectDist < 2.0 * aReverseDist)) + { + aJoinDist = aDirectDist; + aReverseDist = aDirectDist; + } + else + { + aJoinDist = aReverseDist; } - else - minDist = revDist; - if(minDist < distmin && Abs(distmin - minDist) > tol2) { - distmin = minDist; - direct = (dirDist <= revDist); - lloop = j; + // check if we found a better distance + if (aJoinDist < aMinDist3 && Abs (aMinDist3 - aJoinDist) > aTol2) + { + aMinDist3 = aJoinDist; + aDirect3 = (aDirectDist <= aReverseDist); + aMainLoopIt3 = aCurEdgeIt2; } } - if(distmin < minLocDist && Abs(minLocDist - distmin) > tol2) { - minLocDist = distmin; - LocDirect = direct; - LocNumInLoop = lloop; - LocShift = ibegin; + // check if we found a better distance + if (aMinDist3 < aMinDist2 && Abs (aMinDist2 - aMinDist3) > aTol2) + { + aMinDist2 = aMinDist3; + aDirect2 = aDirect3; + aMainLoopIt2 = aMainLoopIt3; + aCurLoopIt2 = aCurEdgeIt; } - } - if(minLocDist < minLoopDist && Abs(minLoopDist - minLocDist) > tol2) { - minLoopDist = minLocDist; - loopNum = i; - loopDirect = LocDirect; - numInLoop = LocNumInLoop; - loopShift = LocShift; + // check if we found a better distance + if (aMinDist2 < aMinDist1 && Abs (aMinDist1 - aMinDist2) > aTol2) + { + aMinDist1 = aMinDist2; + aLoopNum1 = aLoopIt; + aDirect1 = aDirect2; + aMainLoopIt1 = aMainLoopIt2; + aCurLoopIt1 = aCurLoopIt2; } } - - Handle(TColStd_HSequenceOfInteger) loop = Handle(TColStd_HSequenceOfInteger)::DownCast(loops.Value(loopNum)); - Standard_Integer factor = (loopDirect ? 1: -1); - // skl : in the next block for{} I change "i" to "ii" - for(Standard_Integer ii = 1; ii <= loop->Length(); ii++) { - Standard_Integer num = (ii+loopShift-1>loop->Length() ? ii+loopShift-1-loop->Length() : ii+loopShift-1); - mainSeq->InsertAfter(numInLoop+ii-1,loop->Value(num)*factor); + // insert the found loop into main loop + Handle(TColStd_HSequenceOfInteger) aLoop = aLoops.Value (aLoopNum1); + Standard_Integer aFactor = (aDirect1 ? 1 : -1); + for (Standard_Integer i = 0; i < aLoop->Length(); i++) + { + Standard_Integer anIdx = (aCurLoopIt1 + i > aLoop->Length() ? aCurLoopIt1 + i - aLoop->Length() : + aCurLoopIt1 + i); + aMainLoop->InsertAfter (aMainLoopIt1 + i, aLoop->Value (anIdx) * aFactor); } - loops.Remove(loopNum); + aLoops.Remove (aLoopNum1); } } - - Standard_Integer stTmp=0; - for(i = 1; i <= mainSeq->Length(); i++) { - if(i!=mainSeq->Value(i)) - if(stTmp>=0) stTmp = (mainSeq->Value(i) > 0 ? 1 : -1); - myOrd->SetValue(i,mainSeq->Value(i)); + + // checking the new order of the edges + // 0 - order is the same + // 1 - some edges were reordered + // -1 - some edges were reversed + Standard_Integer aTempStatus = 0; + for (Standard_Integer i = 1; i <= aMainLoop->Length(); i++) + { + if (i != aMainLoop->Value (i) && aTempStatus >= 0) + { + aTempStatus = (aMainLoop->Value (i) > 0 ? 1 : -1); + } + myOrd->SetValue (i, aMainLoop->Value (i)); } - if (stTmp == 0) { - myStat = stTmp; + if (aTempStatus == 0) + { + myStat = aTempStatus; return; } - else {//check if edges were only shifted in reverse or forward, not reordered - Standard_Boolean isShiftReverse = Standard_True, isShiftForward = Standard_True; - Standard_Integer tmpFirst = 0, tmpSecond = 0, length = mainSeq->Length(); - for(i = 1; i <= length - 1; i++) { - tmpFirst = mainSeq->Value(i); - tmpSecond = mainSeq->Value(i+1); - if (!(tmpSecond - tmpFirst == 1 || (tmpFirst == length && tmpSecond == 1))) + else + { + // check if edges were only shifted in reverse or forward, not reordered + Standard_Boolean isShiftReverse = Standard_True; + Standard_Boolean isShiftForward = Standard_True; + Standard_Integer aFirstIdx, aSecondIdx; + Standard_Integer aLength = aMainLoop->Length(); + for (Standard_Integer i = 1; i <= aLength - 1; i++) + { + aFirstIdx = aMainLoop->Value (i); + aSecondIdx = aMainLoop->Value (i + 1); + if (!(aSecondIdx - aFirstIdx == 1 || (aFirstIdx == aLength && aSecondIdx == 1))) + { isShiftForward = Standard_False; - if (!(tmpFirst - tmpSecond == 1 || (tmpSecond == length && tmpFirst == 1))) + } + if (!(aFirstIdx - aSecondIdx == 1 || (aSecondIdx == aLength && aFirstIdx == 1))) + { isShiftReverse = Standard_False; + } } - tmpFirst = mainSeq->Value(length); - tmpSecond = mainSeq->Value(1); - if (!(tmpSecond - tmpFirst == 1 || (tmpFirst == length && tmpSecond == 1))) + aFirstIdx = aMainLoop->Value (aLength); + aSecondIdx = aMainLoop->Value (1); + if (!(aSecondIdx - aFirstIdx == 1 || (aFirstIdx == aLength && aSecondIdx == 1))) + { isShiftForward = Standard_False; - if (!(tmpFirst - tmpSecond == 1 || (tmpSecond == length && tmpFirst == 1))) + } + if (!(aFirstIdx - aSecondIdx == 1 || (aSecondIdx == aLength && aFirstIdx == 1))) + { isShiftReverse = Standard_False; + } if (isShiftForward || isShiftReverse) - stTmp = 3; - myStat = stTmp; + { + aTempStatus = 3; + } + myStat = aTempStatus; return; } } @@ -403,9 +706,9 @@ void ShapeAnalysis_WireOrder::Perform(const Standard_Boolean /*closed*/) //purpose : //======================================================================= - Standard_Boolean ShapeAnalysis_WireOrder::IsDone() const +Standard_Boolean ShapeAnalysis_WireOrder::IsDone() const { - return !myOrd.IsNull(); + return !myOrd.IsNull(); } //======================================================================= @@ -413,9 +716,9 @@ void ShapeAnalysis_WireOrder::Perform(const Standard_Boolean /*closed*/) //purpose : //======================================================================= - Standard_Integer ShapeAnalysis_WireOrder::Status() const +Standard_Integer ShapeAnalysis_WireOrder::Status() const { - return myStat; + return myStat; } //======================================================================= @@ -423,11 +726,11 @@ void ShapeAnalysis_WireOrder::Perform(const Standard_Boolean /*closed*/) //purpose : //======================================================================= - Standard_Integer ShapeAnalysis_WireOrder::Ordered(const Standard_Integer n) const +Standard_Integer ShapeAnalysis_WireOrder::Ordered (const Standard_Integer theIdx) const { - if (myOrd.IsNull() || myOrd->Upper() < n) return n; - Standard_Integer ord = myOrd->Value(n); - return (ord == 0 ? n : ord); + if (myOrd.IsNull() || myOrd->Upper() < theIdx) return theIdx; + Standard_Integer anOldIdx = myOrd->Value (theIdx); + return (anOldIdx == 0 ? theIdx : anOldIdx); } //======================================================================= @@ -435,15 +738,10 @@ void ShapeAnalysis_WireOrder::Perform(const Standard_Boolean /*closed*/) //purpose : //======================================================================= - void ShapeAnalysis_WireOrder::XYZ(const Standard_Integer num,gp_XYZ& start3d,gp_XYZ& end3d) const +void ShapeAnalysis_WireOrder::XYZ (const Standard_Integer theIdx, gp_XYZ& theStart3D, gp_XYZ& theEnd3D) const { - if (num > 0) { - start3d = myXYZ->Value (2*num-1); - end3d = myXYZ->Value (2*num); - } else { - start3d = myXYZ->Value (-2*num); - end3d = myXYZ->Value (-2*num-1); - } + theStart3D = myXYZ->Value ((theIdx > 0 ? 2 * theIdx - 1 : -2 * theIdx)); + theEnd3D = myXYZ->Value ((theIdx > 0 ? 2 * theIdx : -2 * theIdx - 1)); } //======================================================================= @@ -451,12 +749,20 @@ void ShapeAnalysis_WireOrder::Perform(const Standard_Boolean /*closed*/) //purpose : //======================================================================= - void ShapeAnalysis_WireOrder::XY(const Standard_Integer num,gp_XY& start2d,gp_XY& end2d) const +void ShapeAnalysis_WireOrder::XY (const Standard_Integer theIdx, gp_XY& theStart2D, gp_XY& theEnd2D) const { - const gp_XYZ& st2d = myXYZ->Value ( (num > 0 ? 2*num-1 : -2*num) ); - start2d.SetCoord (st2d.X(),st2d.Y()); - const gp_XYZ& en2d = myXYZ->Value ( (num > 0 ? 2*num : -2*num -1) ); - end2d.SetCoord (en2d.X(),en2d.Y()); + if (myMode == ModeBoth) + { + theStart2D = myXY->Value ((theIdx > 0 ? 2 * theIdx - 1 : -2 * theIdx)); + theEnd2D = myXY->Value ((theIdx > 0 ? 2 * theIdx : -2 * theIdx - 1)); + } + else + { + const gp_XYZ& aStart3d = myXYZ->Value ((theIdx > 0 ? 2 * theIdx - 1 : -2 * theIdx)); + theStart2D.SetCoord (aStart3d.X(), aStart3d.Y()); + const gp_XYZ& anEnd3d = myXYZ->Value ((theIdx > 0 ? 2 * theIdx : -2 * theIdx - 1)); + theEnd2D.SetCoord (anEnd3d.X(), anEnd3d.Y()); + } } //======================================================================= @@ -464,14 +770,14 @@ void ShapeAnalysis_WireOrder::Perform(const Standard_Boolean /*closed*/) //purpose : //======================================================================= - Standard_Real ShapeAnalysis_WireOrder::Gap(const Standard_Integer num) const +Standard_Real ShapeAnalysis_WireOrder::Gap (const Standard_Integer num) const { if (num == 0) return myGap; Standard_Integer n1 = Ordered (num); - Standard_Integer n0 = Ordered (num == 1 ? NbEdges() : num-1); + Standard_Integer n0 = Ordered (num == 1 ? NbEdges() : num - 1); // Distance entre fin (n0) et debut (n1) - return DISTABS (myXYZ->Value( (n0 > 0 ? 2*n0 : -2*n0 -1) ) , - myXYZ->Value( (n1 > 0 ? 2*n1-1 : -2*n1 ) ) ); + return DISTABS (myXYZ->Value ((n0 > 0 ? 2 * n0 : -2 * n0 - 1)), + myXYZ->Value ((n1 > 0 ? 2 * n1 - 1 : -2 * n1))); //// return (myXYZ->Value(2*n0)).Distance (myXYZ->Value(2*n1-1)); } @@ -480,30 +786,37 @@ void ShapeAnalysis_WireOrder::Perform(const Standard_Boolean /*closed*/) //purpose : //======================================================================= -void ShapeAnalysis_WireOrder::SetChains(const Standard_Real gap) +void ShapeAnalysis_WireOrder::SetChains (const Standard_Real gap) { - Standard_Integer n0 = 0, n1, n2, nb = NbEdges(); //szv#4:S4163:12Mar99 o0,o1,o2 not needed + Standard_Integer n0, n1, n2, nb = NbEdges(); //szv#4:S4163:12Mar99 o0,o1,o2 not needed if (nb == 0) return; TColStd_SequenceOfInteger chain; n0 = 0; chain.Append (1); // On demarre la partie gp_XYZ f3d, l3d, f13d, l13d; //szv#4:S4163:12Mar99 f03d,l03d unused - for (n1 = 1; n1 <= nb; n1 ++) { - if (n0 == 0) { // nouvelle boucle + for (n1 = 1; n1 <= nb; n1++) + { + if (n0 == 0) + { // nouvelle boucle n0 = n1; //szv#4:S4163:12Mar99 optimized - XYZ ( Ordered(n0), f13d, l13d ); + XYZ (Ordered (n0), f13d, l13d); } //szv#4:S4163:12Mar99 optimized - n2 = (n1 == nb)? n0 : (n1 + 1); - XYZ ( Ordered(n2), f3d, l3d ); - if (!f3d.IsEqual (l13d,gap)) { chain.Append (n2); n0 = 0; } - f13d = f3d; l13d = l3d; + n2 = (n1 == nb) ? n0 : (n1 + 1); + XYZ (Ordered (n2), f3d, l3d); + if (!f3d.IsEqual (l13d, gap)) + { + chain.Append (n2); + n0 = 0; + } + f13d = f3d; + l13d = l3d; } nb = chain.Length(); if (nb == 0) return; - myChains = new TColStd_HArray1OfInteger (1,nb); - for (n1 = 1; n1 <= nb; n1 ++) myChains->SetValue (n1,chain.Value(n1)); + myChains = new TColStd_HArray1OfInteger (1, nb); + for (n1 = 1; n1 <= nb; n1++) myChains->SetValue (n1, chain.Value (n1)); } //======================================================================= @@ -511,7 +824,7 @@ void ShapeAnalysis_WireOrder::SetChains(const Standard_Real gap) //purpose : //======================================================================= - Standard_Integer ShapeAnalysis_WireOrder::NbChains() const +Standard_Integer ShapeAnalysis_WireOrder::NbChains() const { return (myChains.IsNull() ? 0 : myChains->Length()); } @@ -521,7 +834,7 @@ void ShapeAnalysis_WireOrder::SetChains(const Standard_Real gap) //purpose : //======================================================================= - void ShapeAnalysis_WireOrder::Chain(const Standard_Integer num,Standard_Integer& n1,Standard_Integer& n2) const +void ShapeAnalysis_WireOrder::Chain (const Standard_Integer num, Standard_Integer& n1, Standard_Integer& n2) const { n1 = n2 = 0; if (myChains.IsNull()) return; @@ -529,15 +842,15 @@ void ShapeAnalysis_WireOrder::SetChains(const Standard_Real gap) if (num == 0 || num > nb) return; n1 = myChains->Value (num); if (num == nb) n2 = NbEdges(); - else n2 = myChains->Value (num+1) - 1; + else n2 = myChains->Value (num + 1) - 1; } //======================================================================= //function : SetCouples -//purpose : +//purpose : //======================================================================= - void ShapeAnalysis_WireOrder::SetCouples(const Standard_Real /*gap*/) +void ShapeAnalysis_WireOrder::SetCouples (const Standard_Real /*gap*/) { #ifdef OCCT_DEBUG std::cout<<"ShapeAnalysis_WireOrder:SetCouple not yet implemented"<Length()); } //======================================================================= //function : Couple -//purpose : +//purpose : //======================================================================= - void ShapeAnalysis_WireOrder::Couple(const Standard_Integer num,Standard_Integer& n1,Standard_Integer& n2) const +void ShapeAnalysis_WireOrder::Couple (const Standard_Integer num, Standard_Integer& n1, Standard_Integer& n2) const { n1 = n2 = 0; if (myCouples.IsNull()) return; Standard_Integer nb = myCouples->Upper(); - if (num == 0 || num*2 > nb) return; - n1 = myCouples->Value (2*num-1); - n2 = myCouples->Value (2*num); + if (num == 0 || num * 2 > nb) return; + n1 = myCouples->Value (2 * num - 1); + n2 = myCouples->Value (2 * num); } diff --git a/src/ShapeAnalysis/ShapeAnalysis_WireOrder.hxx b/src/ShapeAnalysis/ShapeAnalysis_WireOrder.hxx index 8e2d9cf084..cddcc80409 100644 --- a/src/ShapeAnalysis/ShapeAnalysis_WireOrder.hxx +++ b/src/ShapeAnalysis/ShapeAnalysis_WireOrder.hxx @@ -23,6 +23,7 @@ #include #include +#include #include #include #include @@ -41,12 +42,10 @@ class gp_XY; //! This allows to use this tool, either on existing wire, or on //! data just taken from a file (coordinates are easy to get) //! -//! It can work, either in 2D, or in 3D, but not miscible -//! Warning about tolerance : according to the mode (2D/3D), it -//! must be given as 2D or 3D (i.e. metric) tolerance, uniform -//! on the whole list +//! It can work, either in 2D, or in 3D, or miscible mode +//! The tolerance for each mode is fixed //! -//! Two phases : firstly add the couples (start,end) +//! Two phases : firstly add the couples (start, end) //! secondly perform then get the result class ShapeAnalysis_WireOrder { @@ -54,17 +53,24 @@ public: DEFINE_STANDARD_ALLOC - //! Empty constructor Standard_EXPORT ShapeAnalysis_WireOrder(); - - //! Creates a WireOrder in 3D (if mode3d is True) or 2D (if False) - //! with a tolerance - Standard_EXPORT ShapeAnalysis_WireOrder(const Standard_Boolean mode3d, const Standard_Real tol); - - //! Sets new values. Clears the connexion list - //! If changes, also clears the edge list (else, doesn't) - Standard_EXPORT void SetMode (const Standard_Boolean mode3d, const Standard_Real tol); + + //! Creates a WireOrder. + //! Flag defines 3D or 2d mode. + //! Flag defines miscible mode and the flag is ignored. + //! Warning: Parameter is not used in algorithm. + Standard_EXPORT ShapeAnalysis_WireOrder (const Standard_Boolean theMode3D, + const Standard_Real theTolerance, + const Standard_Boolean theModeBoth = Standard_False); + + //! Sets new values. + //! Clears the edge list if the mode ( or ) changes. + //! Clears the connexion list. + //! Warning: Parameter is not used in algorithm. + Standard_EXPORT void SetMode (const Standard_Boolean theMode3D, + const Standard_Real theTolerance, + const Standard_Boolean theModeBoth = Standard_False); //! Returns the working tolerance Standard_EXPORT Standard_Real Tolerance() const; @@ -72,12 +78,18 @@ public: //! Clears the list of edges, but not mode and tol Standard_EXPORT void Clear(); - //! Adds a couple of points 3D (start,end) - Standard_EXPORT void Add (const gp_XYZ& start3d, const gp_XYZ& end3d); + //! Adds a couple of points 3D (start, end) + Standard_EXPORT void Add (const gp_XYZ& theStart3d, const gp_XYZ& theEnd3d); - //! Adds a couple of points 2D (start,end) - Standard_EXPORT void Add (const gp_XY& start2d, const gp_XY& end2d); + //! Adds a couple of points 2D (start, end) + Standard_EXPORT void Add (const gp_XY& theStart2d, const gp_XY& theEnd2d); + //! Adds a couple of points 3D and 2D (start, end) + Standard_EXPORT void Add (const gp_XYZ& theStart3d, + const gp_XYZ& theEnd3d, + const gp_XY& theStart2d, + const gp_XY& theEnd2d); + //! Returns the count of added couples of points (one per edges) Standard_EXPORT Standard_Integer NbEdges() const; @@ -87,12 +99,11 @@ public: Standard_EXPORT Standard_Boolean& KeepLoopsMode(); //! Computes the better order - //! If is True (D) considers also closure //! Optimised if the couples were already in order //! The criterium is : two couples in order if distance between //! end-prec and start-cur is less then starting tolerance //! Else, the smallest distance is reached - //! Gap corresponds to a smallest distance greater than + //! Warning: Parameter not used Standard_EXPORT void Perform (const Standard_Boolean closed = Standard_True); //! Tells if Perform has been done @@ -102,23 +113,20 @@ public: //! Returns the status of the order (0 if not done) : //! 0 : all edges are direct and in sequence //! 1 : all edges are direct but some are not in sequence - //! 2 : in addition, unresolved gaps remain //! -1 : some edges are reversed, but no gap remain - //! -2 : some edges are reversed and some gaps remain - //! -10 : COULD NOT BE RESOLVED, Failure on Reorder - //! gap : regarding starting + //! 3 : edges in sequence are just shifted in forward or reverse manner Standard_EXPORT Standard_Integer Status() const; //! Returns the number of original edge which correspond to the //! newly ordered number //! Warning : the returned value is NEGATIVE if edge should be reversed - Standard_EXPORT Standard_Integer Ordered (const Standard_Integer n) const; + Standard_EXPORT Standard_Integer Ordered (const Standard_Integer theIdx) const; //! Returns the values of the couple , as 3D values - Standard_EXPORT void XYZ (const Standard_Integer num, gp_XYZ& start3d, gp_XYZ& end3d) const; + Standard_EXPORT void XYZ (const Standard_Integer theIdx, gp_XYZ& theStart3D, gp_XYZ& theEnd3D) const; //! Returns the values of the couple , as 2D values - Standard_EXPORT void XY (const Standard_Integer num, gp_XY& start2d, gp_XY& end2d) const; + Standard_EXPORT void XY (const Standard_Integer theIdx, gp_XY& theStart2D, gp_XY& theEnd2D) const; //! Returns the gap between a couple and its preceding //! is considered ordered @@ -135,48 +143,40 @@ public: //! Returns, for the chain n0 num, starting and ending numbers of //! edges. In the list of ordered edges (see Ordered for originals) Standard_EXPORT void Chain (const Standard_Integer num, Standard_Integer& n1, Standard_Integer& n2) const; - + //! Determines the couples of edges for which end and start fit //! inside a given gap. Queried by NbCouples and Couple + //! Warning: function isn't implemented Standard_EXPORT void SetCouples (const Standard_Real gap); - + //! Returns the count of computed couples Standard_EXPORT Standard_Integer NbCouples() const; - + //! Returns, for the couple n0 num, the two implied edges //! In the list of ordered edges Standard_EXPORT void Couple (const Standard_Integer num, Standard_Integer& n1, Standard_Integer& n2) const; - - - protected: - - - - private: + // the mode in which the algorithm works + enum ModeType + { + Mode2D, + Mode3D, + ModeBoth + }; - - - Standard_Boolean myKeepLoops; Handle(TColStd_HArray1OfInteger) myOrd; Handle(TColStd_HArray1OfInteger) myChains; Handle(TColStd_HArray1OfInteger) myCouples; Handle(TColgp_HSequenceOfXYZ) myXYZ; + Handle(TColgp_HSequenceOfXY) myXY; Standard_Real myTol; Standard_Real myGap; Standard_Integer myStat; - Standard_Boolean myMode; - - + Standard_Boolean myKeepLoops; + ModeType myMode; }; - - - - - - #endif // _ShapeAnalysis_WireOrder_HeaderFile diff --git a/src/ShapeFix/ShapeFix_Wire.cxx b/src/ShapeFix/ShapeFix_Wire.cxx index fcfe71b8e9..24a8b07cac 100644 --- a/src/ShapeFix/ShapeFix_Wire.cxx +++ b/src/ShapeFix/ShapeFix_Wire.cxx @@ -349,7 +349,7 @@ Standard_Boolean ShapeFix_Wire::Perform() // status even if FixReorder should not be called (if it is forbidden) ShapeAnalysis_WireOrder sawo; - Standard_Boolean ReorderOK = ( myAnalyzer->CheckOrder ( sawo, myClosedMode ) ==0 ); + Standard_Boolean ReorderOK = (myAnalyzer->CheckOrder( sawo, myClosedMode ) == 0 ); if ( NeedFix ( myFixReorderMode, ! ReorderOK ) ) { if(FixReorder()) Fixed = Standard_True; ReorderOK = ! StatusReorder ( ShapeExtend_FAIL ); @@ -433,51 +433,53 @@ Standard_Boolean ShapeFix_Wire::Perform() //purpose : //======================================================================= -Standard_Boolean ShapeFix_Wire::FixReorder() +Standard_Boolean ShapeFix_Wire::FixReorder(Standard_Boolean theModeBoth) { - myStatusReorder = ShapeExtend::EncodeStatus ( ShapeExtend_OK ); - if ( ! IsLoaded() ) return Standard_False; + myStatusReorder = ShapeExtend::EncodeStatus(ShapeExtend_OK); + if (!IsLoaded()) + { + return Standard_False; + } - // fix in 3d + // fix in Both mode for bi-periodic surface ShapeAnalysis_WireOrder sawo; - myAnalyzer->CheckOrder ( sawo, myClosedMode, Standard_True ); - - //:abv revolCuts.sat -23: in case of bi-periodic surface check case - // of reversed wire specifically. This is necessary because degenerated - // cases are possible when direct evaluation will give bad result. - Standard_Boolean isReorder = Standard_False; - if ( sawo.Status() != 0 && - ! myAnalyzer->Surface().IsNull() && - myAnalyzer->Surface()->Surface()->IsUPeriodic() && - myAnalyzer->Surface()->Surface()->IsVPeriodic() ) { - Handle(ShapeExtend_WireData) sbwd2 = new ShapeExtend_WireData; - for ( Standard_Integer i=WireData()->NbEdges(); i >=1; i-- ) - sbwd2->Add ( WireData()->Edge(i) ); - ShapeAnalysis_WireOrder sawo2; - ShapeAnalysis_Wire analyzer2 ( sbwd2, myAnalyzer->Face(), Precision() ); - analyzer2.CheckOrder ( sawo2, myClosedMode, Standard_True ); - if ( ( sawo2.Status() >=0 && sawo2.Status() < sawo.Status() ) || - ( sawo.Status() <0 && sawo2.Status() > sawo.Status() ) ) { - WireData()->Init ( sbwd2 ); - sawo = sawo2; - isReorder = Standard_True; - } - } - - FixReorder ( sawo ); - - if ( LastFixStatus ( ShapeExtend_FAIL ) ) - myStatusReorder |= ShapeExtend::EncodeStatus ( LastFixStatus ( ShapeExtend_FAIL1 ) ? - ShapeExtend_FAIL1 : ShapeExtend_FAIL2 ); - if ( ! LastFixStatus ( ShapeExtend_DONE )&& !isReorder ) return Standard_False; - - myStatusReorder |= ShapeExtend::EncodeStatus ( ShapeExtend_DONE1 ); - if ( sawo.Status() ==2 || sawo.Status() ==-2 ) - myStatusReorder |= ShapeExtend::EncodeStatus ( ShapeExtend_DONE2 ); - if ( sawo.Status() <0 ) - myStatusReorder |= ShapeExtend::EncodeStatus ( ShapeExtend_DONE3 ); - if ( sawo.Status() == 3) - myStatusReorder |= ShapeExtend::EncodeStatus ( ShapeExtend_DONE5 );//only shifted + if (!myAnalyzer->Surface().IsNull() && + myAnalyzer->Surface()->Surface()->IsUPeriodic() && + myAnalyzer->Surface()->Surface()->IsVPeriodic() && + theModeBoth) + { + myAnalyzer->CheckOrder(sawo, myClosedMode, Standard_True, Standard_True); + } + else + { + myAnalyzer->CheckOrder(sawo, myClosedMode, Standard_True, Standard_False); + } + + FixReorder(sawo); + + if (LastFixStatus(ShapeExtend_FAIL)) + { + myStatusReorder |= ShapeExtend::EncodeStatus(LastFixStatus(ShapeExtend_FAIL1) ? ShapeExtend_FAIL1 : ShapeExtend_FAIL2); + } + if (!LastFixStatus(ShapeExtend_DONE)) + { + return Standard_False; + } + + myStatusReorder |= ShapeExtend::EncodeStatus(ShapeExtend_DONE1); + if (sawo.Status() == 2 || sawo.Status() == -2) + { + myStatusReorder |= ShapeExtend::EncodeStatus(ShapeExtend_DONE2); + } + if (sawo.Status() < 0) + { + myStatusReorder |= ShapeExtend::EncodeStatus(ShapeExtend_DONE3); + } + if (sawo.Status() == 3) + { + // only shifted + myStatusReorder |= ShapeExtend::EncodeStatus(ShapeExtend_DONE5); + } return Standard_True; } diff --git a/src/ShapeFix/ShapeFix_Wire.hxx b/src/ShapeFix/ShapeFix_Wire.hxx index c3fa62a6c4..4539b046b9 100644 --- a/src/ShapeFix/ShapeFix_Wire.hxx +++ b/src/ShapeFix/ShapeFix_Wire.hxx @@ -267,9 +267,9 @@ public: //! FixLacking (if wire is ordered) Standard_EXPORT Standard_Boolean Perform(); - //! Performs an analysis and reorders edges in the wire using - //! class WireOrder - Standard_EXPORT Standard_Boolean FixReorder(); + //! Performs an analysis and reorders edges in the wire using class WireOrder. + //! Flag determines the use of miscible mode if necessary. + Standard_EXPORT Standard_Boolean FixReorder(Standard_Boolean theModeBoth = Standard_False); //! Applies FixSmall(num) to all edges in the wire Standard_EXPORT Standard_Integer FixSmall (const Standard_Boolean lockvtx, const Standard_Real precsmall = 0.0); diff --git a/src/TopoDSToStep/TopoDSToStep_MakeStepWire.cxx b/src/TopoDSToStep/TopoDSToStep_MakeStepWire.cxx index 5ee5a6e124..8189b9efcf 100644 --- a/src/TopoDSToStep/TopoDSToStep_MakeStepWire.cxx +++ b/src/TopoDSToStep/TopoDSToStep_MakeStepWire.cxx @@ -72,250 +72,230 @@ TopoDSToStep_MakeStepWire::TopoDSToStep_MakeStepWire // Purpose : // ---------------------------------------------------------------------------- -void TopoDSToStep_MakeStepWire::Init(const TopoDS_Wire& aWire, - TopoDSToStep_Tool& aTool, - const Handle(Transfer_FinderProcess)& FP) +void TopoDSToStep_MakeStepWire::Init (const TopoDS_Wire& aWire, + TopoDSToStep_Tool& aTool, + const Handle(Transfer_FinderProcess)& FP) { - // ---------------------------------------------------------------- // The Wire is given in its relative orientation (i.e. in the face) // ---------------------------------------------------------------- + aTool.SetCurrentWire (aWire); - aTool.SetCurrentWire(aWire); - - if (aTool.IsBound(aWire)) { - myError = TopoDSToStep_WireDone; - done = Standard_True; - myResult = aTool.Find(aWire); + if (aTool.IsBound (aWire)) + { + myError = TopoDSToStep_WireDone; + done = Standard_True; + myResult = aTool.Find (aWire); return; } - Standard_Integer i; - - if (aWire.Orientation() == TopAbs_INTERNAL || - aWire.Orientation() == TopAbs_EXTERNAL ) { - Handle(TransferBRep_ShapeMapper) errShape = - new TransferBRep_ShapeMapper(aWire); - FP->AddWarning(errShape, " Wire(internal/external) from Non Manifold Topology"); + if (aWire.Orientation() == TopAbs_INTERNAL || aWire.Orientation() == TopAbs_EXTERNAL) + { + Handle(TransferBRep_ShapeMapper) errShape = new TransferBRep_ShapeMapper (aWire); + FP->AddWarning (errShape, " Wire(internal/external) from Non Manifold Topology"); myError = TopoDSToStep_NonManifoldWire; - done = Standard_False; + done = Standard_False; return; } - BRepTools_WireExplorer ItW; - TopoDS_Edge CurrentEdge; TColStd_SequenceOfTransient mySeq; - + // -------- // Polyloop // -------- - - if (aTool.Faceted()) { - Handle(StepShape_VertexPoint) VertexPoint; - Handle(StepGeom_Point) Point; + if (aTool.Faceted()) + { + Handle(StepShape_VertexPoint) VertexPoint; + Handle(StepGeom_Point) Point; Handle(StepShape_TopologicalRepresentationItem) Gpms; - TopoDS_Vertex TopoDSVertex1, TopoDSVertex2; - + TopoDS_Vertex TopoDSVertex1, TopoDSVertex2; + TopoDSToStep_MakeStepVertex MkVertex; -// TopoDS_Wire ForwardWire = TopoDS::Wire(aWire.Oriented(TopAbs_FORWARD)); - - for (ItW.Init(aWire, aTool.CurrentFace()); - ItW.More();ItW.Next()) { - CurrentEdge = ItW.Current(); + + for (BRepTools_WireExplorer ItW (aWire, aTool.CurrentFace()); ItW.More(); ItW.Next()) + { + const TopoDS_Edge& CurrentEdge = ItW.Current(); if (CurrentEdge.Orientation() == TopAbs_FORWARD) - TopExp::Vertices(CurrentEdge, TopoDSVertex1, TopoDSVertex2); - else - TopExp::Vertices(CurrentEdge, TopoDSVertex2, TopoDSVertex1); - - MkVertex.Init(TopoDSVertex1, aTool, FP); - if (MkVertex.IsDone()) { - VertexPoint = Handle(StepShape_VertexPoint)::DownCast(MkVertex.Value()); - Point = VertexPoint->VertexGeometry(); - mySeq.Append(Point); + { + TopExp::Vertices (CurrentEdge, TopoDSVertex1, TopoDSVertex2); } - else { - Handle(TransferBRep_ShapeMapper) errShape = - new TransferBRep_ShapeMapper(aWire); - FP->AddWarning(errShape, " a Vertex Point not mapped"); - myError = TopoDSToStep_WireOther; - done = Standard_False; - return; + else + { + TopExp::Vertices (CurrentEdge, TopoDSVertex2, TopoDSVertex1); + } + + MkVertex.Init (TopoDSVertex1, aTool, FP); + if (MkVertex.IsDone()) + { + VertexPoint = Handle(StepShape_VertexPoint)::DownCast (MkVertex.Value()); + Point = VertexPoint->VertexGeometry(); + mySeq.Append (Point); + } + else + { + Handle(TransferBRep_ShapeMapper) errShape = new TransferBRep_ShapeMapper (aWire); + FP->AddWarning (errShape, " a Vertex Point not mapped"); + myError = TopoDSToStep_WireOther; + done = Standard_False; + return; } } Standard_Integer nbPoints = mySeq.Length(); - if (nbPoints>=3) { - Handle(StepGeom_HArray1OfCartesianPoint) aPolygon = - new StepGeom_HArray1OfCartesianPoint(1,nbPoints); - for ( i=1; i<=nbPoints; i++) { - aPolygon->SetValue(i, Handle(StepGeom_CartesianPoint):: - DownCast(mySeq.Value(i))); + if (nbPoints >= 3) + { + Handle(StepGeom_HArray1OfCartesianPoint) aPolygon = new StepGeom_HArray1OfCartesianPoint (1, nbPoints); + for (Standard_Integer i = 1; i <= nbPoints; i++) + { + aPolygon->SetValue (i, Handle(StepGeom_CartesianPoint)::DownCast (mySeq.Value (i))); } Handle(StepShape_PolyLoop) PL = new StepShape_PolyLoop(); - Handle(TCollection_HAsciiString) aName = - new TCollection_HAsciiString(""); - PL->Init(aName, aPolygon); - - aTool.Bind(aWire, PL); - myError = TopoDSToStep_WireDone; - done = Standard_True; + Handle(TCollection_HAsciiString) aName = new TCollection_HAsciiString (""); + PL->Init (aName, aPolygon); + + aTool.Bind (aWire, PL); + myError = TopoDSToStep_WireDone; + done = Standard_True; myResult = PL; return; } - else { - Handle(TransferBRep_ShapeMapper) errShape = - new TransferBRep_ShapeMapper(aWire); - FP->AddWarning(errShape, " PolyLoop: Wire has less than 3 points"); + else + { + Handle(TransferBRep_ShapeMapper) errShape = new TransferBRep_ShapeMapper (aWire); + FP->AddWarning (errShape, " PolyLoop: Wire has less than 3 points"); myError = TopoDSToStep_WireOther; done = Standard_False; return; } } - - // -------- - // EdgeLoop - // -------- - - else { - + // -------- + // EdgeLoop + // -------- + else + { Handle(StepShape_TopologicalRepresentationItem) Gpms; - Handle(StepShape_Edge) Epms; - Handle(StepShape_OrientedEdge) OrientedEdge; - + Handle(StepShape_Edge) Epms; + Handle(StepShape_OrientedEdge) OrientedEdge; TopoDSToStep_MakeStepEdge MkEdge; - //szv#4:S4163:12Mar99 SGI warns - TopoDS_Shape sh = aWire.Oriented(TopAbs_FORWARD); - const TopoDS_Wire ForwardWire = TopoDS::Wire(sh); - // test 25-01-96 FMA supprime CKY 2-JUN-1997, cf MakeStepFace->Face FWD] - // remis CKY 9-DEC-1997 : chaque niveau se traite en FWD -//#11 rln 16/03/98 -//TestRally8 file carter2.rle face#333 (wire is not sorted, not sorted edges are seam and iso-curve): -//aWire is REVERSED but ForwardWire is FORWARD, when exploding not connected seams their pcurves are -//returned in incorrect order (because of mismatched orientation) -//As a result not sorted edges are lost (not returned by BRepTools_WireExplorer) -//By the way, in the case of aTool.Faceted() aWire is used + const TopoDS_Wire ForwardWire = TopoDS::Wire (aWire.Oriented (TopAbs_FORWARD)); + Handle(ShapeFix_Wire) STW = new ShapeFix_Wire (ForwardWire, aTool.CurrentFace(), Precision::Confusion()); + // for toroidal like surfaces we need to use both (3d and 2d) mode to correctly reorder the edges + STW->FixReorder (Standard_True); + Handle(ShapeExtend_WireData) anExtWire = STW->WireData(); -//#11 ItW.Init(ForwardWire, aTool.CurrentFace()); -//#11 for (;ItW.More();ItW.Next()) { - Handle(ShapeFix_Wire) STW = - new ShapeFix_Wire(ForwardWire, aTool.CurrentFace(), Precision::Confusion()); - STW->FixReorder(); - Handle(ShapeExtend_WireData) sbwd = STW->WireData(); - Standard_Integer nb = sbwd->NbEdges(); - //:abv 04.05.00: CAX-IF TRJ4: writing complete sphere with single vertex_loop // check that whole wire is one seam (perhaps made of several seam edges) //pdn remove degenerated pcurves - Handle(ShapeExtend_WireData) cwd = new ShapeExtend_WireData; - Standard_Integer ie; - for (ie = 1; ie <=nb; ie++) { - TopoDS_Edge edge = sbwd->Edge(ie); - if (!BRep_Tool::Degenerated(edge)) - cwd->Add(edge); - } - nb = cwd->NbEdges(); - if(nb%2 == 0 ) { - for ( ie = 1; ie < nb; ie++) { - if ( cwd->Edge(ie).IsSame(cwd->Edge(ie+1)) ) break; + // collect not degenerated edges + Handle(ShapeExtend_WireData) anExtWire2 = new ShapeExtend_WireData; + for (Standard_Integer ie = 1; ie <= anExtWire->NbEdges(); ie++) + { + TopoDS_Edge anEdge = anExtWire->Edge (ie); + if (!BRep_Tool::Degenerated (anEdge)) + { + anExtWire2->Add (anEdge); } - if ( ie < nb ) { - cwd->SetLast(ie); - for ( ie=nb/2+1; ie <= nb; ie++ ) { - if ( ! cwd->Edge(ie).IsSame(cwd->Edge(nb-ie+1)) ) break; - } - if ( ie > nb ) { // make vertex_loop - ShapeAnalysis_Edge sae; - TopoDS_Vertex V = sae.FirstVertex(cwd->Edge(1)); - TopoDSToStep_MakeStepVertex mkV ( V, aTool, FP ); - Handle(StepShape_VertexLoop) vloop = new StepShape_VertexLoop; - Handle(TCollection_HAsciiString) name = new TCollection_HAsciiString ( "" ); - vloop->Init ( name, Handle(StepShape_Vertex)::DownCast ( mkV.Value() ) ); - aTool.Bind(aWire, vloop); - myError = TopoDSToStep_WireDone; - done = Standard_True; - myResult = vloop; - return; - } + } + // check for seam edges + Standard_Integer nb = anExtWire2->NbEdges(); + if (nb % 2 == 0) + { + Standard_Integer ie; + // check if two adjacent edges are the same + for (ie = 1; ie < nb; ie++) + { + if (anExtWire2->Edge (ie).IsSame (anExtWire2->Edge (ie + 1))) + { + break; + } + } + // if found seam edges + if (ie < nb) + { + // make the first edge from pair last + anExtWire2->SetLast (ie); + for (ie = nb / 2 + 1; ie <= nb; ie++) + { + if (!anExtWire2->Edge (ie).IsSame (anExtWire2->Edge (nb - ie + 1))) + { + break; + } + } + if (ie > nb) + { + // make vertex_loop + ShapeAnalysis_Edge sae; + TopoDS_Vertex V = sae.FirstVertex (anExtWire2->Edge (1)); + TopoDSToStep_MakeStepVertex mkV (V, aTool, FP); + Handle(StepShape_VertexLoop) vloop = new StepShape_VertexLoop; + Handle(TCollection_HAsciiString) name = new TCollection_HAsciiString (""); + vloop->Init (name, Handle(StepShape_Vertex)::DownCast (mkV.Value())); + aTool.Bind (aWire, vloop); + myError = TopoDSToStep_WireDone; + done = Standard_True; + myResult = vloop; + return; + } } } - nb = sbwd->NbEdges(); - - for (Standard_Integer nEdge = 1; nEdge <= sbwd->NbEdges(); nEdge++) { - - CurrentEdge = sbwd->Edge(nEdge); -//#11 CurrentEdge = ItW.Current(); - - //if (ItW.Current().Orientation() != ItW.Orientation()) - //std::cout << "DEBUG : Attention WireExplorer Orientation" << std::endl; + for (Standard_Integer nEdge = 1; nEdge <= anExtWire->NbEdges(); nEdge++) + { + const TopoDS_Edge anEdge = anExtWire->Edge (nEdge); // --------------------------------- // --- Is the edge Degenerated ? --- // --------------------------------- - Standard_Real cf, cl; - Handle(Geom2d_Curve) theC2d = - BRep_Tool::CurveOnSurface(CurrentEdge, aTool.CurrentFace(), cf, cl); - //BRepAdaptor_Curve CA; - //CA = BRepAdaptor_Curve(CurrentEdge, - //aTool.CurrentFace()); - //GeomAbs_CurveType typC = CA.CurveOnSurface().GetCurve().GetType(); - //if (typC == GeomAbs_Line && BRep_Tool::Degenerated(CurrentEdge)) { - //Handle(TransferBRep_ShapeMapper) errShape = - //new TransferBRep_ShapeMapper(aWire); - //FP->AddWarning(errShape, " EdgeLoop: Degenerated Pcurve not mapped"); - //} - if ( //:abv 26Jan00, CAX-IF TRJ3: ! theC2d.IsNull() && theC2d->IsKind(STANDARD_TYPE(Geom2d_Line)) && - BRep_Tool::Degenerated(CurrentEdge)) { - Handle(TransferBRep_ShapeMapper) errShape = - new TransferBRep_ShapeMapper(aWire); - FP->AddWarning(errShape, " EdgeLoop: Degenerated Pcurve not mapped"); - continue; + Handle(Geom2d_Curve) theC2d = BRep_Tool::CurveOnSurface (anEdge, aTool.CurrentFace(), cf, cl); + if (BRep_Tool::Degenerated (anEdge)) + { + Handle(TransferBRep_ShapeMapper) errShape = new TransferBRep_ShapeMapper (aWire); + FP->AddWarning (errShape, " EdgeLoop: Degenerated Pcurve not mapped"); + continue; } - else { - //szv#4:S4163:12Mar99 SGI warns - //TopoDS_Shape ssh = CurrentEdge.Oriented(TopAbs_FORWARD); - //const TopoDS_Edge ForwardEdge = TopoDS::Edge(ssh); - - MkEdge.Init(CurrentEdge, aTool, FP); - if (MkEdge.IsDone()) { - OrientedEdge = new StepShape_OrientedEdge(); - Epms = Handle(StepShape_Edge)::DownCast(MkEdge.Value()); - Handle(TCollection_HAsciiString) aName = new TCollection_HAsciiString(""); - OrientedEdge->Init(aName, Epms, (CurrentEdge.Orientation() == TopAbs_FORWARD)); - mySeq.Append(OrientedEdge); - } - else { - Handle(TransferBRep_ShapeMapper) errShape = - new TransferBRep_ShapeMapper(aWire); - FP->AddWarning(errShape, " EdgeLoop: an Edge not mapped"); - myError = TopoDSToStep_WireOther; - done = Standard_False; - return; - } + else + { + MkEdge.Init (anEdge, aTool, FP); + if (MkEdge.IsDone()) + { + OrientedEdge = new StepShape_OrientedEdge(); + Epms = Handle(StepShape_Edge)::DownCast (MkEdge.Value()); + Handle(TCollection_HAsciiString) aName = new TCollection_HAsciiString (""); + OrientedEdge->Init (aName, Epms, (anEdge.Orientation() == TopAbs_FORWARD)); + mySeq.Append (OrientedEdge); + } + else + { + Handle(TransferBRep_ShapeMapper) errShape = new TransferBRep_ShapeMapper (aWire); + FP->AddWarning (errShape, " EdgeLoop: an Edge not mapped"); + myError = TopoDSToStep_WireOther; + done = Standard_False; + return; + } } } Standard_Integer nbEdges = mySeq.Length(); - if ( nbEdges >0 ) { - Handle(StepShape_HArray1OfOrientedEdge) aList = - new StepShape_HArray1OfOrientedEdge(1,nbEdges); - for ( i=1; i<=nbEdges; i++ ) { - aList->SetValue(i, Handle(StepShape_OrientedEdge):: - DownCast(mySeq.Value(i))); + if (nbEdges > 0) + { + Handle(StepShape_HArray1OfOrientedEdge) aList = new StepShape_HArray1OfOrientedEdge (1, nbEdges); + for (Standard_Integer i = 1; i <= nbEdges; i++) + { + aList->SetValue (i, Handle(StepShape_OrientedEdge):: + DownCast (mySeq.Value (i))); } Handle(StepShape_EdgeLoop) Epmsl = new StepShape_EdgeLoop; - Handle(TCollection_HAsciiString) aName = - new TCollection_HAsciiString(""); - Epmsl->Init(aName, aList); - aTool.Bind(aWire, Epmsl); + Handle(TCollection_HAsciiString) aName = new TCollection_HAsciiString (""); + Epmsl->Init (aName, aList); + aTool.Bind (aWire, Epmsl); done = Standard_True; - myResult = Epmsl; + myResult = Epmsl; return; } - else { - Handle(TransferBRep_ShapeMapper) errShape = - new TransferBRep_ShapeMapper(aWire); - FP->AddWarning(errShape, " No Edges of this Wire were mapped"); + else + { + Handle(TransferBRep_ShapeMapper) errShape = new TransferBRep_ShapeMapper (aWire); + FP->AddWarning (errShape, " No Edges of this Wire were mapped"); myError = TopoDSToStep_WireOther; done = Standard_False; return; diff --git a/tests/bugs/step/bug28256 b/tests/bugs/step/bug28256 index da63f8e664..7230283640 100644 --- a/tests/bugs/step/bug28256 +++ b/tests/bugs/step/bug28256 @@ -13,7 +13,7 @@ checkprops result -s 1.8e+101 set nbshapes_expected " Number of shapes in shape - VERTEX : 56881 + VERTEX : 56883 EDGE : 85310 WIRE : 37795 FACE : 32992 @@ -21,7 +21,7 @@ Number of shapes in shape SOLID : 1308 COMPSOLID : 0 COMPOUND : 1 - SHAPE : 215605 + SHAPE : 215607 " checknbshapes result -ref ${nbshapes_expected} -t -m "importing file" checkview -display result -3d -path ${imagedir}/${test_image}.png \ No newline at end of file diff --git a/tests/bugs/step/bug32922 b/tests/bugs/step/bug32922 new file mode 100644 index 0000000000..ed26939c1e --- /dev/null +++ b/tests/bugs/step/bug32922 @@ -0,0 +1,111 @@ +puts "============" +puts "OCC32922 Data Exchange, STEP - The torus is stored incorrectly in STEP format" +puts "============" +puts "" +##################################################### +# STEP testing the case when a torus is saved in STEP +# format with an incorrect edge order +##################################################### + +pload MODELING XDE + +if { [info exists imagedir] == 0 } { + set imagedir ../bug32922 + if {![file exists ${imagedir}]} { + file mkdir ${imagedir} + } +} + +# Generating resource file where all shape healing is off +set fdata { +ToSTEP.exec.op : SplitCommonVertex,DirectFaces + +FromSTEP.exec.op : FixShape + +FromSTEP.FixShape.Tolerance3d : &Runtime.Tolerance +FromSTEP.FixShape.MaxTolerance3d : &Runtime.MaxTolerance +FromSTEP.FixShape.MinTolerance3d : 1.e-7 +FromSTEP.FixShape.FixFreeShellMode : 0 +FromSTEP.FixShape.FixFreeFaceMode : 0 +FromSTEP.FixShape.FixFreeWireMode : 0 +FromSTEP.FixShape.FixSameParameterMode : 0 + +FromSTEP.FixShape.FixSolidMode : 0 +FromSTEP.FixShape.FixShellOrientationMode : 0 +FromSTEP.FixShape.CreateOpenSolidMode : 0 + +FromSTEP.FixShape.FixShellMode : 0 +FromSTEP.FixShape.FixFaceOrientationMode : 0 + +FromSTEP.FixShape.FixFaceMode : 0 +FromSTEP.FixShape.FixWireMode : 0 +FromSTEP.FixShape.FixOrientationMode : 0 +FromSTEP.FixShape.FixAddNaturalBoundMode : 0 +FromSTEP.FixShape.FixMissingSeamMode : 0 +FromSTEP.FixShape.FixSmallAreaWireMode : 0 +FromSTEP.FixShape.RemoveSmallAreaFaceMode : 0 +FromSTEP.FixShape.FixIntersectingWiresMode : 0 +FromSTEP.FixShape.FixLoopWiresMode : 0 +FromSTEP.FixShape.FixSplitFaceMode : 0 +FromSTEP.FixShape.AutoCorrectPrecisionMode : 0 +FromSTEP.FixShape.ModifyTopologyMode : 0 +FromSTEP.FixShape.ModifyGeometryMode : 0 +FromSTEP.FixShape.ClosedWireMode : 0 +FromSTEP.FixShape.PreferencePCurveMode : 0 +FromSTEP.FixShape.FixReorderMode : 0 +FromSTEP.FixShape.FixSmallMode : 0 +FromSTEP.FixShape.FixConnectedMode : 0 +FromSTEP.FixShape.FixEdgeCurvesMode : 0 +FromSTEP.FixShape.FixDegeneratedMode : 0 +FromSTEP.FixShape.FixLackingMode : 0 +FromSTEP.FixShape.FixSelfIntersectionMode : 0 +FromSTEP.FixShape.RemoveLoopMode : 0 +FromSTEP.FixShape.FixReversed2dMode : 0 +FromSTEP.FixShape.FixRemovePCurveMode : 0 +FromSTEP.FixShape.FixRemoveCurve3dMode : 0 +FromSTEP.FixShape.FixAddPCurveMode : 0 +FromSTEP.FixShape.FixAddCurve3dMode : 0 +FromSTEP.FixShape.FixSeamMode : 0 +FromSTEP.FixShape.FixShiftedMode : 0 +FromSTEP.FixShape.FixEdgeSameParameterMode : 0 +FromSTEP.FixShape.FixNotchedEdgesMode : 0 +FromSTEP.FixShape.FixTailMode : 0 +FromSTEP.FixShape.MaxTailAngle : 0 +FromSTEP.FixShape.MaxTailWidth : 0 +FromSTEP.FixShape.FixSelfIntersectingEdgeMode : 0 +FromSTEP.FixShape.FixIntersectingEdgesMode : 0 +FromSTEP.FixShape.FixNonAdjacentIntersectingEdgesMode : 0 + +FromSTEP.FixShape.FixVertexPositionMode : 0 +FromSTEP.FixShape.FixVertexToleranceMode : 0 +} + +set new_resource_path ${imagedir} +set resource_file STEP +set fo [open "${new_resource_path}/${resource_file}" "wb"] +puts -nonewline $fo $fdata +close $fo + +# Changing the path to the resource file +set old_resource_path $::env(CSF_STEPDefaults) +set env(CSF_STEPDefaults) ${new_resource_path} + +# Generating, writing and reading the torus +ptorus tor 20 5 +set step_file ${imagedir}/torus.stp +testwritestep ${step_file} tor +stepread ${step_file} a * + +# Cheking the face of the torus +explode a_1 f +renamevar a_1_1 result +checkshape result + +# Making screenshort +pcurve result +view 1 -2D- 728 20 400 400 +2dfit +checkview -screenshot -2d -path ${imagedir}/${test_image}.png + +# Restoring the path to the old resource file +set env(CSF_STEPDefaults) ${old_resource_path} From fbf9efb8d53afa59bfa016b7b22f6f9e245a3ee1 Mon Sep 17 00:00:00 2001 From: akaftasev Date: Wed, 18 May 2022 12:16:57 +0300 Subject: [PATCH 293/639] 0025309: Modeling Algorithms - Check of shape validity for BOP takes too long Simplified condition to allow sampling for curve/surface data with depth == 0 Changed sorting method in MergeSolutions() method --- src/IntTools/IntTools_BeanFaceIntersector.cxx | 63 +++++++++++++------ tests/bugs/modalg_7/bug25309 | 10 +++ 2 files changed, 53 insertions(+), 20 deletions(-) create mode 100644 tests/bugs/modalg_7/bug25309 diff --git a/src/IntTools/IntTools_BeanFaceIntersector.cxx b/src/IntTools/IntTools_BeanFaceIntersector.cxx index 858d7711d3..b5095096eb 100644 --- a/src/IntTools/IntTools_BeanFaceIntersector.cxx +++ b/src/IntTools/IntTools_BeanFaceIntersector.cxx @@ -52,6 +52,7 @@ #include #include #include +#include static Standard_Boolean SetEmptyResultRange(const Standard_Real theParameter, IntTools_MarkedRangeSet& theMarkedRange); @@ -2331,27 +2332,44 @@ void BuildBox(const Handle(Geom_BSplineSurface) &theSurf, static void MergeSolutions(const IntTools_ListOfCurveRangeSample& theListCurveRange, const IntTools_ListOfSurfaceRangeSample& theListSurfaceRange, IntTools_ListOfCurveRangeSample& theListCurveRangeSort, - IntTools_ListOfSurfaceRangeSample& theListSurfaceRangeSort) { - - IntTools_ListIteratorOfListOfCurveRangeSample anItC2; - IntTools_ListIteratorOfListOfSurfaceRangeSample anItS1(theListSurfaceRange), anItS2; - IntTools_MapOfSurfaceSample aMapToAvoid; + IntTools_ListOfSurfaceRangeSample& theListSurfaceRangeSort) +{ + NCollection_IndexedMap aMapToAvoid; - for(; anItS1.More(); anItS1.Next()) { - const IntTools_SurfaceRangeSample& aRangeS = anItS1.Value(); + NCollection_DataMap aCurveIdMap; + std::vector aCurveRangeVector; + aCurveRangeVector.reserve(theListCurveRange.Size()); - if(aMapToAvoid.Contains(aRangeS)) - continue; - aMapToAvoid.Add(aRangeS); + IntTools_ListIteratorOfListOfCurveRangeSample anItC(theListCurveRange); + IntTools_ListIteratorOfListOfSurfaceRangeSample anItS(theListSurfaceRange); + + Standard_Integer aCurveRangeId = 0; + Standard_Integer aSurfRangeSize = 0; + for (; anItS.More() && anItC.More(); anItS.Next(), anItC.Next(), ++aCurveRangeId) + { + aCurveRangeVector.push_back(anItC.Value()); + Standard_Integer aSurfIndex = aMapToAvoid.Add(anItS.Value()); + if (aSurfIndex > aSurfRangeSize) + { + aCurveIdMap.Bound(aSurfIndex, TColStd_ListOfInteger())->Append(aCurveRangeId); + ++aSurfRangeSize; + } + else + { + aCurveIdMap.ChangeFind(aSurfIndex).Append(aCurveRangeId); + } + } - anItC2.Initialize(theListCurveRange); - anItS2.Initialize(theListSurfaceRange); + for (Standard_Integer i = 1; i <= aMapToAvoid.Size(); i++) + { + const IntTools_SurfaceRangeSample& aSurfRange = aMapToAvoid(i); + const TColStd_ListOfInteger& aCurveRangeList = aCurveIdMap(i); + for (TColStd_ListOfInteger::Iterator anIter(aCurveRangeList); anIter.More(); anIter.Next()) + { + const IntTools_CurveRangeSample& aCurveRange = aCurveRangeVector[anIter.Value()]; - for(; anItS2.More() && anItC2.More(); anItS2.Next(), anItC2.Next()) { - if(aRangeS.IsEqual(anItS2.Value())) { - theListCurveRangeSort.Append(anItC2.Value()); - theListSurfaceRangeSort.Append(anItS2.Value()); - } + theListSurfaceRangeSort.Append(aSurfRange); + theListCurveRangeSort.Append(aCurveRange); } } } @@ -2376,20 +2394,25 @@ static void CheckSampling(const IntTools_CurveRangeSample& theCurveRange, bAllowSamplingU = Standard_True; bAllowSamplingV = Standard_True; + Standard_Integer aSamplesNb = theCurveRange.GetDepth() == 0 ? 1 : theCurveData.GetNbSample(); + // check if((pow((Standard_Real)theCurveData.GetNbSample(), (Standard_Real )(theCurveRange.GetDepth() + 1)) > dLimit) || - ((DiffC / theCurveData.GetNbSample()) < theCurveData.GetMinRange())) { + ((DiffC / (Standard_Real)aSamplesNb) < theCurveData.GetMinRange())) { bAllowSamplingC = Standard_False; } + aSamplesNb = theSurfaceRange.GetDepthU() == 0 ? 1 : theSurfaceData.GetNbSampleU(); + if((pow((Standard_Real )theSurfaceData.GetNbSampleU(), (Standard_Real )(theSurfaceRange.GetDepthU() + 1)) > dLimit) || - ((DiffU / theSurfaceData.GetNbSampleU()) < theSurfaceData.GetMinRangeU())) { + ((DiffU / (Standard_Real)aSamplesNb) < theSurfaceData.GetMinRangeU())) { bAllowSamplingU = Standard_False; } + aSamplesNb = theSurfaceRange.GetDepthV() == 0 ? 1 : theSurfaceData.GetNbSampleV(); if((pow((Standard_Real )theSurfaceData.GetNbSampleV(), (Standard_Real )(theSurfaceRange.GetDepthV() + 1)) > dLimit) || - ((DiffV / theSurfaceData.GetNbSampleV()) < theSurfaceData.GetMinRangeV())) { + ((DiffV / (Standard_Real)aSamplesNb) < theSurfaceData.GetMinRangeV())) { bAllowSamplingV = Standard_False; } } diff --git a/tests/bugs/modalg_7/bug25309 b/tests/bugs/modalg_7/bug25309 new file mode 100644 index 0000000000..aeece21f2e --- /dev/null +++ b/tests/bugs/modalg_7/bug25309 @@ -0,0 +1,10 @@ +puts "============" +puts "0025309: Modeling Algorithms - Check of shape validity for BOP takes too long" +puts "============" +puts "" + +cpulimit 60 + +restore [locate_data_file bug25309.brep] a + +bopargcheck a From 795c0d5d73b01ddefcae230265aefcd6b36bbbce Mon Sep 17 00:00:00 2001 From: akaftasev Date: Wed, 11 May 2022 18:17:31 +0300 Subject: [PATCH 294/639] 0032447: BRepOffsetAPI_MakePipeShell result in inaccurate shape when using -DT mode and DT_ShapeDivide on the spine Added new option '-C' with possibility to set value of Angular and linear tolerances to 'mksweep' command to correct input spine by merging smooth connected neighboring edges --- src/BRepTest/BRepTest_SweepCommands.cxx | 43 +++++++++++++++++++++++-- tests/bugs/modalg_7/bug32447_1 | 41 +++++++++++++++++++++++ tests/bugs/modalg_7/bug32447_2 | 33 +++++++++++++++++++ tests/bugs/modalg_7/bug32447_3 | 42 ++++++++++++++++++++++++ tests/bugs/modalg_7/bug32447_4 | 42 ++++++++++++++++++++++++ 5 files changed, 198 insertions(+), 3 deletions(-) create mode 100644 tests/bugs/modalg_7/bug32447_1 create mode 100644 tests/bugs/modalg_7/bug32447_2 create mode 100644 tests/bugs/modalg_7/bug32447_3 create mode 100644 tests/bugs/modalg_7/bug32447_4 diff --git a/src/BRepTest/BRepTest_SweepCommands.cxx b/src/BRepTest/BRepTest_SweepCommands.cxx index 40c0f6f119..100feb2644 100644 --- a/src/BRepTest/BRepTest_SweepCommands.cxx +++ b/src/BRepTest/BRepTest_SweepCommands.cxx @@ -57,6 +57,7 @@ static BRepOffsetAPI_ThruSections* Generator = 0; #include #include #include +#include //======================================================================= // prism @@ -533,16 +534,50 @@ Standard_Integer thrusections(Draw_Interpretor&, Standard_Integer n, const char* //======================================================================= // mksweep //======================================================================= -static Standard_Integer mksweep(Draw_Interpretor&, +static Standard_Integer mksweep(Draw_Interpretor& di, Standard_Integer n, const char** a) { - if (n != 2) return 1; + if (n != 2 && n != 5) return 1; TopoDS_Shape Spine = DBRep::Get(a[1], TopAbs_WIRE); if (Spine.IsNull()) return 1; if (Sweep != 0) { delete Sweep; Sweep = 0; } + + if (n > 2 && n <= 5) + { + if (!strcmp(a[2], "-C")) + { + ShapeUpgrade_UnifySameDomain aUnif(Spine, Standard_True, Standard_False, Standard_True); + + Standard_Real anAngTol = 5.; + Standard_Real aLinTol = 0.1; + + if (n == 5) + { + anAngTol = Draw::Atof(a[3]); + aLinTol = Draw::Atof(a[4]); + } + + aUnif.SetAngularTolerance(anAngTol * M_PI / 180.); + aUnif.SetLinearTolerance(aLinTol); + aUnif.Build(); + Spine = aUnif.Shape(); + if (BRepTest_Objects::IsHistoryNeeded()) + { + BRepTest_Objects::SetHistory(aUnif.History()); + } + } + else + { + di << "To correct input spine use 'mksweep wire -C [AngTol LinTol]'\n"; + di << "By default, AngTol = 5, LinTol = 0.1"; + return 1; + } + } + + Sweep = new BRepOffsetAPI_MakePipeShell(TopoDS::Wire(Spine)); return 0; } @@ -1010,7 +1045,9 @@ void BRepTest::SweepCommands(Draw_Interpretor& theCommands) "\t\t-safe option allows to prevent the modifying of input shapes", __FILE__, thrusections, g); - theCommands.Add("mksweep", "mksweep wire", + theCommands.Add("mksweep", "mksweep wire [-C [AngTol LinTol]]\n" + "\t\tthe option -C correct input spine by merging smooth connected neighboring edges\n" + "\t\tthe AngTol is in degrees", __FILE__, mksweep, g); theCommands.Add("setsweep", "setsweep no args to get help", diff --git a/tests/bugs/modalg_7/bug32447_1 b/tests/bugs/modalg_7/bug32447_1 new file mode 100644 index 0000000000..d20ffbd482 --- /dev/null +++ b/tests/bugs/modalg_7/bug32447_1 @@ -0,0 +1,41 @@ +puts "============================================" +puts "0032447: BRepOffsetAPI_MakePipeShell result in inaccurate shape when using -DT mode and DT_ShapeDivide on the spine" +puts "============================================" +puts "" + +restore [locate_data_file bug32447-spine.brep] s +restore [locate_data_file bug32447-profile.brep] p + +mksweep s -C 5 0.001 + +explode s e +savehistory cor_hist +modified sc_1 cor_hist s_1 +modified sc_2 cor_hist s_2 +modified sc_3 cor_hist s_4 +modified sc_4 cor_hist s_6 + +checkprops sc_1 -l 0.1816 +checkprops sc_2 -l 0.265078 +checkprops sc_3 -l 0.261167 +checkprops sc_4 -l 0.253542 + +setsweep -DT +addsweep p +buildsweep r -C -S + +savehistory sweep_hist +generated r1 sweep_hist sc_1 +generated r2 sweep_hist sc_2 +generated r3 sweep_hist sc_3 +generated r4 sweep_hist sc_4 + +checkprops r1 -s 0.0483501 +checkprops r2 -s 0.060163 +checkprops r3 -s 0.0577468 +checkprops r4 -s 0.0658619 + +checkshape r +checknbshapes r -face 18 + +checkview -display r -2d -path ${imagedir}/${test_image}.png diff --git a/tests/bugs/modalg_7/bug32447_2 b/tests/bugs/modalg_7/bug32447_2 new file mode 100644 index 0000000000..5726f9ef99 --- /dev/null +++ b/tests/bugs/modalg_7/bug32447_2 @@ -0,0 +1,33 @@ +puts "============================================" +puts "0032447: BRepOffsetAPI_MakePipeShell result in inaccurate shape when using -DT mode and DT_ShapeDivide on the spine" +puts "============================================" +puts "" + +restore [locate_data_file bug32447-spine.brep] s +restore [locate_data_file bug32447-profile.brep] p + +mksweep s -C 1 0.1 + +explode s e +savehistory cor_hist +modified sc_1 cor_hist s_1 +modified sc_2 cor_hist s_2 + +checkprops sc_1 -l 0.1816 +checkprops sc_2 -l 0.779758 + +setsweep -DT +addsweep p +buildsweep r -C -S + +savehistory sweep_hist +generated r1 sweep_hist sc_1 +generated r2 sweep_hist sc_2 + +checkprops r1 -s 0.0483501 +checkprops r2 -s 0.184231 + +checkshape r +checknbshapes r -face 10 + +checkview -display r -2d -path ${imagedir}/${test_image}.png diff --git a/tests/bugs/modalg_7/bug32447_3 b/tests/bugs/modalg_7/bug32447_3 new file mode 100644 index 0000000000..ba5a110f35 --- /dev/null +++ b/tests/bugs/modalg_7/bug32447_3 @@ -0,0 +1,42 @@ +puts "============================================" +puts "0032447: BRepOffsetAPI_MakePipeShell result in inaccurate shape when using -DT mode and DT_ShapeDivide on the spine" +puts "============================================" +puts "" + +circle c 0 0 0 1 +trim c c 0 1 +convert c c +mkedge c c + +line l 1 0 0 0 1 0 +trim l l -1 0 +convert l l +mkedge l l + +wire s l c + +circle c 0.9 0 0 0 1 0 0.1 +mkedge p c +wire p p + +mksweep s -C 5 0.001 + +explode s e +savehistory cor_hist +modified sc cor_hist s_1 + +checkprops sc -l 2 + +setsweep -DT +addsweep p +buildsweep r -C -S + +savehistory sweep_hist +generated r1 sweep_hist sc + +checkprops r1 -s 1.19393 + +checkshape r +checknbshapes r -face 3 + +checkview -display r -2d -path ${imagedir}/${test_image}.png diff --git a/tests/bugs/modalg_7/bug32447_4 b/tests/bugs/modalg_7/bug32447_4 new file mode 100644 index 0000000000..f6aaa62fb0 --- /dev/null +++ b/tests/bugs/modalg_7/bug32447_4 @@ -0,0 +1,42 @@ +puts "============================================" +puts "0032447: BRepOffsetAPI_MakePipeShell result in inaccurate shape when using -DT mode and DT_ShapeDivide on the spine" +puts "============================================" +puts "" + +circle c1 0 0 0 10 +trim c1 c1 0 1 +convert c1 c1 +mkedge c1 c1 + +circle c2 -1000 0 0 1010 +trim c2 c2 -0.1 0 +convert c2 c2 +mkedge c2 c2 + +wire s c2 c1 + +circle c 9 0 0 0 1 0 1 +mkedge p c +wire p p + +mksweep s -C 5 0.1 + +explode s e +savehistory cor_hist +modified sc cor_hist s_1 + +checkprops sc -l 111 + +setsweep -DT +addsweep p +buildsweep r -C -S + +savehistory sweep_hist +generated r1 sweep_hist sc + +checkprops r1 -s 691.348 + +checkshape r +checknbshapes r -face 3 + +checkview -display r -2d -path ${imagedir}/${test_image}.png From 23c56fc66a1823b6e5e58ec3925a490d00eec6bc Mon Sep 17 00:00:00 2001 From: afokin Date: Wed, 25 May 2022 11:56:13 +0300 Subject: [PATCH 295/639] 0032974: Configuration - update environment for VS2022 removing a repeating condition in install.bat add vc143 in .md files --- adm/qmake/OccCppConfig.pri | 2 ++ adm/templates/build.bat | 2 ++ adm/templates/env.bat.in | 10 ++++++++++ adm/templates/env.samples.bat.in | 1 + adm/templates/install.bat | 2 ++ dox/build/build_occt/building_occt.md | 1 + dox/introduction/introduction.md | 2 +- samples/qt/OCCTOverview/env.bat | 1 + 8 files changed, 20 insertions(+), 1 deletion(-) diff --git a/adm/qmake/OccCppConfig.pri b/adm/qmake/OccCppConfig.pri index c9af8da42d..9464d8bcf4 100644 --- a/adm/qmake/OccCppConfig.pri +++ b/adm/qmake/OccCppConfig.pri @@ -119,6 +119,8 @@ android-g++ { # VS2015, vc141 } else:equals(aMsvcVer, 16.0){ # VS2019, vc142 + } else:equals(aMsvcVer, 17.0){ + # VS2022, vc143 } else { warning (Unknown msvc version. "$$MY_COMPILER" is used) } diff --git a/adm/templates/build.bat b/adm/templates/build.bat index 9f1fbc9712..1a650cb45d 100644 --- a/adm/templates/build.bat +++ b/adm/templates/build.bat @@ -23,6 +23,8 @@ if "%VCVER%" == "vc8" ( call "%VS141COMNTOOLS%/vsvars32.bat" > nul ) else if "%VCVER%" == "vc142" ( call "%VS142COMNTOOLS%/vsvars32.bat" > nul +) else if "%VCVER%" == "vc143" ( + call "%VS143COMNTOOLS%/vsvars32.bat" > nul ) else ( echo Error: wrong VS identifier exit /B diff --git a/adm/templates/env.bat.in b/adm/templates/env.bat.in index 538ad7cc67..354a177cd1 100644 --- a/adm/templates/env.bat.in +++ b/adm/templates/env.bat.in @@ -74,6 +74,10 @@ if not "%DevEnvDir%" == "" ( for /f "usebackq delims=" %%i in (`vswhere.exe -version "[16.0,16.99]" -latest -requires Microsoft.VisualStudio.Workload.%VCPROP% -property installationPath`) do ( set "DevEnvDir=%%i\Common7\IDE\" ) +) else if /I "%VCFMT%" == "vc143" ( + for /f "usebackq delims=" %%i in (`vswhere.exe -version "[17.0,17.99]" -latest -requires Microsoft.VisualStudio.Workload.%VCPROP% -property installationPath`) do ( + set "DevEnvDir=%%i\Common7\IDE\" + ) ) else if /I "%VCFMT%" == "gcc" ( rem MinGW ) else ( @@ -107,6 +111,11 @@ if /I "%VCFMT%" == "vc9" ( set "VCVARS=%%i\VC\Auxiliary\Build\vcvarsall.bat" ) set "VCPlatformToolSet=v142" +) else if /I "%VCFMT%" == "vc143" ( + for /f "usebackq delims=" %%i in (`vswhere.exe -version "[17.0,17.99]" -latest -requires Microsoft.VisualStudio.Workload.%VCPROP% -property installationPath`) do ( + set "VCVARS=%%i\VC\Auxiliary\Build\vcvarsall.bat" + ) + set "VCPlatformToolSet=v142" ) else if /I "%VCFMT%" == "gcc" ( rem MinGW ) else ( @@ -126,6 +135,7 @@ if ["%ARCH%"] == ["64"] set VCARCH=amd64 if /I ["%1"] == ["vc141"] set "VCVER=vc14" if /I ["%1"] == ["vc142"] set "VCVER=vc14" +if /I ["%1"] == ["vc143"] set "VCVER=vc14" if exist "%CASROOT%\custom.bat" ( call "%CASROOT%\custom.bat" %VCVER% %ARCH% %CASDEB% diff --git a/adm/templates/env.samples.bat.in b/adm/templates/env.samples.bat.in index 7cbb822ff1..a787deed46 100644 --- a/adm/templates/env.samples.bat.in +++ b/adm/templates/env.samples.bat.in @@ -7,6 +7,7 @@ if exist "%~dp0custom.bat" ( call "@INSTALL_DIR_ABSOLUTE@\@INSTALL_DIR_SCRIPT@\env.bat" %1 %2 %3 if /I ["%1"] == ["vc141"] set "VCVER=vc141" if /I ["%1"] == ["vc142"] set "VCVER=vc142" +if /I ["%1"] == ["vc143"] set "VCVER=vc143" set "BIN_DIR=win%ARCH%\%VCVER%\bind" set "LIB_DIR=win%ARCH%\%VCVER%\libd" diff --git a/adm/templates/install.bat b/adm/templates/install.bat index d19409e3e8..89a2d66cf5 100644 --- a/adm/templates/install.bat +++ b/adm/templates/install.bat @@ -23,6 +23,8 @@ if "%VCVER%" == "vc8" ( call "%VS141COMNTOOLS%/vsvars32.bat" > nul ) else if "%VCVER%" == "vc142" ( call "%VS142COMNTOOLS%/vsvars32.bat" > nul +) else if "%VCVER%" == "vc143" ( + call "%VS143COMNTOOLS%/vsvars32.bat" > nul ) else ( echo Error: wrong VS identifier exit /B diff --git a/dox/build/build_occt/building_occt.md b/dox/build/build_occt/building_occt.md index db2d9e4feb..2e1c7ec18a 100644 --- a/dox/build/build_occt/building_occt.md +++ b/dox/build/build_occt/building_occt.md @@ -324,6 +324,7 @@ The environment is defined in the file *custom.sh* (on Linux and macOS) or *cust | vc141-uwp | 2017 (15) | UWP (Universal Windows Platform) | vc14-uwp | | vc142 | 2019 (16) | Desktop (Windows API) | vc14 | | vc142-uwp | 2019 (16) | UWP (Universal Windows Platform) | vc14-uwp | +| vc143 | 2022 (17) | Desktop (Windows API) | vc14 | Alternatively, you can launch **genconf**, a GUI tool allowing to configure build options interactively. That tool will analyze your environment and propose you to choose available options: diff --git a/dox/introduction/introduction.md b/dox/introduction/introduction.md index 38d3df50a0..0e18f48aa8 100644 --- a/dox/introduction/introduction.md +++ b/dox/introduction/introduction.md @@ -462,7 +462,7 @@ To run any Open CASCADE Technology application you need to set the environment v You can define the environment variables with env.bat script located in the $CASROOT folder. This script accepts two arguments to be used: -the version of Visual Studio (vc12 -- vc142) and the architecture (win32 or win64). +the version of Visual Studio (vc12 -- vc143) and the architecture (win32 or win64). The additional environment settings necessary for compiling OCCT libraries and samples by Microsoft Visual Studio can be set using script custom.bat located in the same folder. diff --git a/samples/qt/OCCTOverview/env.bat b/samples/qt/OCCTOverview/env.bat index ade739d46b..6dc128a1e1 100644 --- a/samples/qt/OCCTOverview/env.bat +++ b/samples/qt/OCCTOverview/env.bat @@ -7,6 +7,7 @@ if exist "%~dp0custom.bat" ( call "%CASROOT%\env.bat" %1 %2 %3 if /I ["%1"] == ["vc141"] set "VCVER=vc141" if /I ["%1"] == ["vc142"] set "VCVER=vc142" +if /I ["%1"] == ["vc143"] set "VCVER=vc143" set "BIN_DIR=win%ARCH%\%VCVER%\bind" set "LIB_DIR=win%ARCH%\%VCVER%\libd" From 48e4aad412f7153f34167dd68c35654364ebde73 Mon Sep 17 00:00:00 2001 From: kgv Date: Fri, 27 May 2022 09:56:50 +0300 Subject: [PATCH 296/639] 0032990: Configuration - compilation errors since Emscripten 3.1.11 due to time_t redefined long->int Add std::is_same filter to IsEqual(time_t, time_t) definition. --- src/Standard/Standard_Time.hxx | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/src/Standard/Standard_Time.hxx b/src/Standard/Standard_Time.hxx index 3a44119790..9b95212632 100755 --- a/src/Standard/Standard_Time.hxx +++ b/src/Standard/Standard_Time.hxx @@ -16,22 +16,17 @@ #include -// =============================================== -// Methods from Standard_Entity class which are redefined: -// - IsEqual -// =============================================== - -#ifndef __QNX__ // same as Standard_Size - // ------------------------------------------------------------------ // IsEqual : Returns Standard_True if two time values are equal // ------------------------------------------------------------------ -inline Standard_Boolean IsEqual (const Standard_Time theOne, - const Standard_Time theTwo) +template +typename opencascade::std::enable_if::value + && !opencascade::std::is_same::value + && !opencascade::std::is_same::value, + Standard_Boolean>::type +IsEqual (const TheTimeType theOne, const TheTimeType theTwo) { return theOne == theTwo; } #endif - -#endif From 812afe4edbbc3bb04834bd3c666b633bff5558d5 Mon Sep 17 00:00:00 2001 From: kgv Date: Sat, 28 May 2022 01:04:31 +0300 Subject: [PATCH 297/639] 0032991: Visualization, TKOpenGl - OpenGl_Window::Resize() ignores window virtual flag on macOS Added handling of Aspect_Window::IsVirtual() flag on macOS platform. --- src/Cocoa/Cocoa_Window.mm | 9 --- src/OpenGl/OpenGl_Window_1.mm | 74 ++++++++++++---------- src/ViewerTest/ViewerTest_EventManager.cxx | 4 +- 3 files changed, 43 insertions(+), 44 deletions(-) diff --git a/src/Cocoa/Cocoa_Window.mm b/src/Cocoa/Cocoa_Window.mm index d491b11e17..cd42e414eb 100644 --- a/src/Cocoa/Cocoa_Window.mm +++ b/src/Cocoa/Cocoa_Window.mm @@ -436,15 +436,6 @@ - (void )invalidateContentOcct: (id )theSender return; } - if ([NSThread isMainThread]) - { - #if defined(TARGET_OS_IPHONE) && TARGET_OS_IPHONE - [myHView setNeedsDisplay]; - #else - [myHView setNeedsDisplay: YES]; - #endif - } - else { [myHView performSelectorOnMainThread: @selector(invalidateContentOcct:) withObject: NULL diff --git a/src/OpenGl/OpenGl_Window_1.mm b/src/OpenGl/OpenGl_Window_1.mm index f1cc8c19d5..8e61ad112a 100644 --- a/src/OpenGl/OpenGl_Window_1.mm +++ b/src/OpenGl/OpenGl_Window_1.mm @@ -274,11 +274,18 @@ const Handle(OpenGl_Context)& theShareCtx) void OpenGl_Window::Resize() { // If the size is not changed - do nothing - Standard_Integer aWidthPt = 0; - Standard_Integer aHeightPt = 0; - mySizeWindow->Size (aWidthPt, aHeightPt); - if (mySizePt.x() == aWidthPt - && mySizePt.y() == aHeightPt) + Graphic3d_Vec2i aWinSize; + mySizeWindow->Size (aWinSize.x(), aWinSize.y()); + if (myPlatformWindow->IsVirtual() + || mySizeWindow != myPlatformWindow) + { + if (mySize == aWinSize) + { + return; + } + mySize = aWinSize; + } + else if (mySizePt == aWinSize) { #if defined(TARGET_OS_IPHONE) && TARGET_OS_IPHONE return; @@ -303,8 +310,7 @@ const Handle(OpenGl_Context)& theShareCtx) #endif } - mySizePt.x() = aWidthPt; - mySizePt.y() = aHeightPt; + mySizePt = aWinSize; init(); } @@ -366,40 +372,42 @@ const Handle(OpenGl_Context)& theShareCtx) aDefFbo->BindBuffer (myGlContext); aDefFbo.Nullify(); #else - NSOpenGLContext* aGLCtx = myGlContext->myGContext; -Standard_DISABLE_DEPRECATION_WARNINGS - NSView* aView = [aGLCtx view]; -Standard_ENABLE_DEPRECATION_WARNINGS - NSRect aBounds = [aView bounds]; + if (!myPlatformWindow->IsVirtual() + && mySizeWindow == myPlatformWindow) + { + NSOpenGLContext* aGLCtx = myGlContext->myGContext; + Standard_DISABLE_DEPRECATION_WARNINGS + NSView* aView = [aGLCtx view]; + Standard_ENABLE_DEPRECATION_WARNINGS + NSRect aBounds = [aView bounds]; - // we should call this method each time when window is resized - [aGLCtx update]; + // we should call this method each time when window is resized + [aGLCtx update]; - if ([aView respondsToSelector: @selector(convertSizeToBacking:)]) - { - NSSize aRes = [aView convertSizeToBacking: aBounds.size]; - mySize.x() = Standard_Integer(aRes.width); - mySize.y() = Standard_Integer(aRes.height); - } - else - { - mySize.x() = Standard_Integer(aBounds.size.width); - mySize.y() = Standard_Integer(aBounds.size.height); + if ([aView respondsToSelector: @selector(convertSizeToBacking:)]) + { + NSSize aRes = [aView convertSizeToBacking: aBounds.size]; + mySize.x() = Standard_Integer(aRes.width); + mySize.y() = Standard_Integer(aRes.height); + } + else + { + mySize.x() = Standard_Integer(aBounds.size.width); + mySize.y() = Standard_Integer(aBounds.size.height); + } + mySizePt.x() = Standard_Integer(aBounds.size.width); + mySizePt.y() = Standard_Integer(aBounds.size.height); } - mySizePt.x() = Standard_Integer(aBounds.size.width); - mySizePt.y() = Standard_Integer(aBounds.size.height); #endif myGlContext->core11fwd->glDisable (GL_DITHER); myGlContext->core11fwd->glDisable (GL_SCISSOR_TEST); - myGlContext->core11fwd->glViewport (0, 0, mySize.x(), mySize.y()); - if (myGlContext->GraphicsLibrary() != Aspect_GraphicsLibrary_OpenGLES) + const Standard_Integer aViewport[4] = { 0, 0, mySize.x(), mySize.y() }; + myGlContext->ResizeViewport (aViewport); + myGlContext->SetDrawBuffer (GL_BACK); + if (myGlContext->core11ffp != NULL) { - myGlContext->core11fwd->glDrawBuffer (GL_BACK); - if (myGlContext->core11ffp != NULL) - { - myGlContext->core11ffp->glMatrixMode (GL_MODELVIEW); - } + myGlContext->core11ffp->glMatrixMode (GL_MODELVIEW); } } diff --git a/src/ViewerTest/ViewerTest_EventManager.cxx b/src/ViewerTest/ViewerTest_EventManager.cxx index d3fae9c88e..2bb2362f35 100644 --- a/src/ViewerTest/ViewerTest_EventManager.cxx +++ b/src/ViewerTest/ViewerTest_EventManager.cxx @@ -253,7 +253,7 @@ void ViewerTest_EventManager::handleViewRedraw (const Handle(AIS_InteractiveCont && (!aRedrawer.IsStarted() || aRedrawer.IsPaused())) { myIsTmpContRedraw = true; - #if !defined(_WIN32) && !defined(__EMSCRIPTEN__) + #if !defined(_WIN32) && !defined(__EMSCRIPTEN__) && !defined(__APPLE__) aRedrawer.Start (theView, 60.0); #endif } @@ -269,7 +269,7 @@ void ViewerTest_EventManager::handleViewRedraw (const Handle(AIS_InteractiveCont else if (myIsTmpContRedraw) { myIsTmpContRedraw = false; - #ifndef _WIN32 + #if !defined(_WIN32) && !defined(__APPLE__) ViewerTest_ContinuousRedrawer& aRedrawer = ViewerTest_ContinuousRedrawer::Instance(); aRedrawer.Pause(); #endif From e9c43fee293f528cc6e2e4e02c538482d5af3490 Mon Sep 17 00:00:00 2001 From: kgv Date: Wed, 25 May 2022 21:19:43 +0300 Subject: [PATCH 298/639] 0032989: Data Exchange, RWGltf_CafReader - fill in metadata map from asset.extras --- src/RWGltf/RWGltf_GltfJsonParser.cxx | 24 +++++- src/RWGltf/RWGltf_GltfJsonParser.hxx | 4 + src/XSDRAWSTLVRML/XSDRAWSTLVRML.cxx | 105 ++++++++++++++------------- tests/de_mesh/gltf_read/helmet | 4 + 4 files changed, 85 insertions(+), 52 deletions(-) diff --git a/src/RWGltf/RWGltf_GltfJsonParser.cxx b/src/RWGltf/RWGltf_GltfJsonParser.cxx index 3423ebaee1..d6387a2e98 100644 --- a/src/RWGltf/RWGltf_GltfJsonParser.cxx +++ b/src/RWGltf/RWGltf_GltfJsonParser.cxx @@ -188,7 +188,8 @@ RWGltf_GltfJsonParser::RWGltf_GltfJsonParser (TopTools_SequenceOfShape& theRootS myToSkipEmptyNodes (true), myToLoadAllScenes (false), myUseMeshNameAsFallback (true), - myToProbeHeader (false) + myToProbeHeader (false), + myToReadAssetExtras (true) { myCSTrsf.SetInputLengthUnit (1.0); // meters myCSTrsf.SetInputCoordinateSystem (RWMesh_CoordinateSystem_glTF); @@ -287,6 +288,27 @@ void RWGltf_GltfJsonParser::gltfParseAsset() myMetadata->Add ("copyright", aCopyRight->GetString()); } } + + if (const RWGltf_JsonValue* anExtras = myToReadAssetExtras ? findObjectMember (*anAsset, "extras") : nullptr) + { + for (ConstMemberIterator aChildIter = anExtras->MemberBegin(); aChildIter != anExtras->MemberEnd(); ++aChildIter) + { + if (!aChildIter->name.IsString()) + { + continue; + } + + const TCollection_AsciiString aKey (aChildIter->name.GetString()); + if (aChildIter->value.IsString()) + { + myMetadata->Add (aKey, aChildIter->value.GetString()); + } + if (aChildIter->value.IsNumber()) + { + myMetadata->Add (aKey, aChildIter->value.GetDouble()); + } + } + } } // ======================================================================= diff --git a/src/RWGltf/RWGltf_GltfJsonParser.hxx b/src/RWGltf/RWGltf_GltfJsonParser.hxx index 6b078ed12e..e53fb1dfa4 100644 --- a/src/RWGltf/RWGltf_GltfJsonParser.hxx +++ b/src/RWGltf/RWGltf_GltfJsonParser.hxx @@ -94,6 +94,9 @@ public: //! Set metadata map. void SetMetadata (TColStd_IndexedDataMapOfStringString& theMetadata) { myMetadata = &theMetadata; } + //! Set flag to translate asset.extras into metadata. + void SetReadAssetExtras (bool theToRead) { myToReadAssetExtras = theToRead; } + //! Return transformation from glTF to OCCT coordinate system. const RWMesh_CoordinateSystemConverter& CoordinateSystemConverter() const { return myCSTrsf; } @@ -439,6 +442,7 @@ protected: bool myToLoadAllScenes; //!< flag to load all scenes in the document, FALSE by default bool myUseMeshNameAsFallback; //!< flag to use Mesh name in case if Node name is empty, TRUE by default bool myToProbeHeader; //!< flag to probe header without full reading, FALSE by default + bool myToReadAssetExtras; //!< flag to translate asset.extras into metadata, TRUE by default #ifdef HAVE_RAPIDJSON GltfElementMap myGltfRoots[RWGltf_GltfRootElement_NB]; //!< glTF format root elements diff --git a/src/XSDRAWSTLVRML/XSDRAWSTLVRML.cxx b/src/XSDRAWSTLVRML/XSDRAWSTLVRML.cxx index d533ca1dec..6d3422963d 100644 --- a/src/XSDRAWSTLVRML/XSDRAWSTLVRML.cxx +++ b/src/XSDRAWSTLVRML/XSDRAWSTLVRML.cxx @@ -194,6 +194,7 @@ static Standard_Integer ReadGltf (Draw_Interpretor& theDI, Standard_Boolean toKeepLateData = Standard_True; Standard_Boolean toPrintDebugInfo = Standard_False; Standard_Boolean toLoadAllScenes = Standard_False; + Standard_Boolean toPrintAssetInfo = Standard_False; Standard_Boolean isNoDoc = (TCollection_AsciiString(theArgVec[0]) == "readgltf"); for (Standard_Integer anArgIter = 1; anArgIter < theNbArgs; ++anArgIter) { @@ -203,33 +204,18 @@ static Standard_Integer ReadGltf (Draw_Interpretor& theDI, && (anArgCase == "-nocreate" || anArgCase == "-nocreatedoc")) { - toUseExistingDoc = Standard_True; - if (anArgIter + 1 < theNbArgs - && Draw::ParseOnOff (theArgVec[anArgIter + 1], toUseExistingDoc)) - { - ++anArgIter; - } + toUseExistingDoc = Draw::ParseOnOffIterator (theNbArgs, theArgVec, anArgIter); } else if (anArgCase == "-parallel") { - isParallel = Standard_True; - if (anArgIter + 1 < theNbArgs - && Draw::ParseOnOff (theArgVec[anArgIter + 1], isParallel)) - { - ++anArgIter; - } + isParallel = Draw::ParseOnOffIterator (theNbArgs, theArgVec, anArgIter); } else if (anArgCase == "-doubleprec" || anArgCase == "-doubleprecision" || anArgCase == "-singleprec" || anArgCase == "-singleprecision") { - isDoublePrec = Standard_True; - if (anArgIter + 1 < theNbArgs - && Draw::ParseOnOff (theArgVec[anArgIter + 1], isDoublePrec)) - { - ++anArgIter; - } + isDoublePrec = Draw::ParseOnOffIterator (theNbArgs, theArgVec, anArgIter); if (anArgCase.StartsWith ("-single")) { isDoublePrec = !isDoublePrec; @@ -237,40 +223,20 @@ static Standard_Integer ReadGltf (Draw_Interpretor& theDI, } else if (anArgCase == "-skiplateloading") { - toSkipLateDataLoading = Standard_True; - if (anArgIter + 1 < theNbArgs - && Draw::ParseOnOff (theArgVec[anArgIter + 1], toSkipLateDataLoading)) - { - ++anArgIter; - } + toSkipLateDataLoading = Draw::ParseOnOffIterator (theNbArgs, theArgVec, anArgIter); } else if (anArgCase == "-keeplate") { - toKeepLateData = Standard_True; - if (anArgIter + 1 < theNbArgs - && Draw::ParseOnOff (theArgVec[anArgIter + 1], toKeepLateData)) - { - ++anArgIter; - } + toKeepLateData = Draw::ParseOnOffIterator (theNbArgs, theArgVec, anArgIter); } else if (anArgCase == "-allscenes") { - toLoadAllScenes = Standard_True; - if (anArgIter + 1 < theNbArgs - && Draw::ParseOnOff (theArgVec[anArgIter + 1], toLoadAllScenes)) - { - ++anArgIter; - } + toLoadAllScenes = Draw::ParseOnOffIterator (theNbArgs, theArgVec, anArgIter); } else if (anArgCase == "-toprintinfo" || anArgCase == "-toprintdebuginfo") { - toPrintDebugInfo = Standard_True; - if (anArgIter + 1 < theNbArgs - && Draw::ParseOnOff (theArgVec[anArgIter + 1], toPrintDebugInfo)) - { - ++anArgIter; - } + toPrintDebugInfo = Draw::ParseOnOffIterator (theNbArgs, theArgVec, anArgIter); } else if (anArgCase == "-listexternalfiles" || anArgCase == "-listexternals" @@ -278,7 +244,12 @@ static Standard_Integer ReadGltf (Draw_Interpretor& theDI, || anArgCase == "-external" || anArgCase == "-externalfiles") { - toListExternalFiles = Standard_True; + toListExternalFiles = Draw::ParseOnOffIterator (theNbArgs, theArgVec, anArgIter); + } + else if (anArgCase == "-assetinfo" + || anArgCase == "-metadata") + { + toPrintAssetInfo = Draw::ParseOnOffIterator (theNbArgs, theArgVec, anArgIter); } else if (aDestName.IsEmpty()) { @@ -294,6 +265,13 @@ static Standard_Integer ReadGltf (Draw_Interpretor& theDI, return 1; } } + if (aFilePath.IsEmpty() && !aDestName.IsEmpty()) + { + if (toListExternalFiles || toPrintAssetInfo) + { + std::swap (aFilePath, aDestName); + } + } if (aFilePath.IsEmpty()) { Message::SendFail() << "Syntax error: wrong number of arguments"; @@ -302,7 +280,7 @@ static Standard_Integer ReadGltf (Draw_Interpretor& theDI, Handle(Draw_ProgressIndicator) aProgress = new Draw_ProgressIndicator (theDI, 1); Handle(TDocStd_Document) aDoc; - if (!toListExternalFiles + if (!aDestName.IsEmpty() && !isNoDoc) { Handle(TDocStd_Application) anApp = DDocStd::GetApplication(); @@ -323,12 +301,14 @@ static Standard_Integer ReadGltf (Draw_Interpretor& theDI, return 1; } } + Standard_Real aScaleFactorM = 1.; if (!XCAFDoc_DocumentTool::GetLengthUnit(aDoc, aScaleFactorM, UnitsMethods_LengthUnit_Meter)) { XSAlgo::AlgoContainer()->PrepareForTransfer(); // update unit info aScaleFactorM = UnitsMethods::GetCasCadeLengthUnit(UnitsMethods_LengthUnit_Meter); } + RWGltf_CafReader aReader; aReader.SetSystemLengthUnit (aScaleFactorM); aReader.SetSystemCoordinateSystem (RWMesh_CoordinateSystem_Zup); @@ -339,13 +319,9 @@ static Standard_Integer ReadGltf (Draw_Interpretor& theDI, aReader.SetToKeepLateData (toKeepLateData); aReader.SetToPrintDebugMessages (toPrintDebugInfo); aReader.SetLoadAllScenes (toLoadAllScenes); - if (toListExternalFiles) + if (aDestName.IsEmpty()) { aReader.ProbeHeader (aFilePath); - for (NCollection_IndexedMap::Iterator aFileIter (aReader.ExternalFiles()); aFileIter.More(); aFileIter.Next()) - { - theDI << "\"" << aFileIter.Value() << "\" "; - } } else { @@ -361,6 +337,32 @@ static Standard_Integer ReadGltf (Draw_Interpretor& theDI, Draw::Set (aDestName.ToCString(), aDrawDoc); } } + + bool isFirstLine = true; + if (toPrintAssetInfo) + { + for (TColStd_IndexedDataMapOfStringString::Iterator aKeyIter (aReader.Metadata()); aKeyIter.More(); aKeyIter.Next()) + { + if (!isFirstLine) + { + theDI << "\n"; + } + isFirstLine = false; + theDI << aKeyIter.Key() << ": " << aKeyIter.Value(); + } + } + if (toListExternalFiles) + { + if (!isFirstLine) + { + theDI << "\n"; + } + for (NCollection_IndexedMap::Iterator aFileIter (aReader.ExternalFiles()); aFileIter.More(); aFileIter.Next()) + { + theDI << "\"" << aFileIter.Value() << "\" "; + } + } + return 0; } @@ -2338,7 +2340,7 @@ void XSDRAWSTLVRML::InitCommands (Draw_Interpretor& theCommands) //XSDRAW::LoadDraw(theCommands); theCommands.Add ("ReadGltf", - "ReadGltf Doc file [-parallel {on|off}] [-listExternalFiles] [-noCreateDoc] [-doublePrecision {on|off}]" + "ReadGltf Doc file [-parallel {on|off}] [-listExternalFiles] [-noCreateDoc] [-doublePrecision {on|off}] [-assetInfo]" "\n\t\t: Read glTF file into XDE document." "\n\t\t: -listExternalFiles do not read mesh and only list external files" "\n\t\t: -noCreateDoc read into existing XDE document" @@ -2347,9 +2349,10 @@ void XSDRAWSTLVRML::InitCommands (Draw_Interpretor& theCommands) "\n\t\t: -skipLateLoading data loading is skipped and can be performed later" "\n\t\t: (false by default)" "\n\t\t: -keepLate data is loaded into itself with preservation of information" - "\n\t\t: about deferred storage to load/unload this data later.", + "\n\t\t: about deferred storage to load/unload this data later." "\n\t\t: -allScenes load all scenes defined in the document instead of default one (false by default)" "\n\t\t: -toPrintDebugInfo print additional debug information during data reading" + "\n\t\t: -assetInfo print asset information", __FILE__, ReadGltf, g); theCommands.Add ("readgltf", "readgltf shape file" diff --git a/tests/de_mesh/gltf_read/helmet b/tests/de_mesh/gltf_read/helmet index c54d675558..adf703f1f1 100644 --- a/tests/de_mesh/gltf_read/helmet +++ b/tests/de_mesh/gltf_read/helmet @@ -3,6 +3,10 @@ puts "0030691: test glTF reader on standard sample models" puts "========" ReadGltf D [locate_data_file bug30691_DamagedHelmet.gltf] + +set anAssetInfo [ReadGltf [locate_data_file bug30691_DamagedHelmet.gltf] -assetInfo] +if { "$anAssetInfo" != "generator: Khronos Blender glTF 2.0 exporter" } { puts "Error: unexpected asset info" } + XGetOneShape s D checknbshapes s -face 1 -compound 0 checktrinfo s -tri 15452 -nod 14556 From cec41bb93d2980247ee6318c3c1620100a3ed6b7 Mon Sep 17 00:00:00 2001 From: snn Date: Mon, 4 Apr 2022 18:08:34 +0300 Subject: [PATCH 299/639] 0030024: Data Exchange - STEP, IGES export support of BRep shapes based on tessellated geometry Support of reading and writing tessellated geometry is added for the following STEP entities: - triangulated face - complex triangulated face - tessellated shell - tessellated solid - tessellated shape representation Models without BRep geometry (mesh formats like STL, OBJ and so on) are supported for writing to STEP. New parameters are added to enable/disable tessellated geometry reading and writing: - read.step.tessellated (On/Off/OnNoBRep) (On by default) - write.step.tessellated (On/Off/OnNoBRep) (OnNoBRep by default) OnNoBRep - tessellation is read/written only for entities for which there is no BRep representation. Faces with poly triangulation are written in STEP as triangulated face entities with one coordinates list per face. Only one poly triangulation per face (returned by BRep_Tool::Triangulation) is written to STEP. --- dox/user_guides/step/step.md | 71 ++++- src/RWStepAP214/RWStepAP214_GeneralModule.cxx | 202 +++++++++++- .../RWStepAP214_ReadWriteModule.cxx | 294 ++++++++++++++++- src/RWStepVisual/FILES | 32 +- ...RWStepVisual_RWComplexTriangulatedFace.cxx | 271 ++++++++++++++++ ...RWStepVisual_RWComplexTriangulatedFace.hxx | 53 ++++ ...Visual_RWComplexTriangulatedSurfaceSet.cxx | 247 +++++++++++++++ ...Visual_RWComplexTriangulatedSurfaceSet.hxx | 53 ++++ ...tepVisual_RWCubicBezierTessellatedEdge.cxx | 151 +++++++++ ...tepVisual_RWCubicBezierTessellatedEdge.hxx | 53 ++++ ...epVisual_RWCubicBezierTriangulatedFace.cxx | 215 +++++++++++++ ...epVisual_RWCubicBezierTriangulatedFace.hxx | 53 ++++ ...StepVisual_RWTessellatedConnectingEdge.cxx | 226 +++++++++++++ ...StepVisual_RWTessellatedConnectingEdge.hxx | 53 ++++ .../RWStepVisual_RWTessellatedEdge.cxx | 148 +++++++++ .../RWStepVisual_RWTessellatedEdge.hxx | 53 ++++ .../RWStepVisual_RWTessellatedPointSet.cxx | 121 +++++++ .../RWStepVisual_RWTessellatedPointSet.hxx | 53 ++++ ...isual_RWTessellatedShapeRepresentation.cxx | 125 ++++++++ ...isual_RWTessellatedShapeRepresentation.hxx | 53 ++++ ...peRepresentationWithAccuracyParameters.cxx | 152 +++++++++ ...peRepresentationWithAccuracyParameters.hxx | 53 ++++ .../RWStepVisual_RWTessellatedShell.cxx | 147 +++++++++ .../RWStepVisual_RWTessellatedShell.hxx | 53 ++++ .../RWStepVisual_RWTessellatedSolid.cxx | 147 +++++++++ .../RWStepVisual_RWTessellatedSolid.hxx | 53 ++++ ...StepVisual_RWTessellatedStructuredItem.cxx | 82 +++++ ...StepVisual_RWTessellatedStructuredItem.hxx | 53 ++++ .../RWStepVisual_RWTessellatedVertex.cxx | 130 ++++++++ .../RWStepVisual_RWTessellatedVertex.hxx | 53 ++++ .../RWStepVisual_RWTessellatedWire.cxx | 145 +++++++++ .../RWStepVisual_RWTessellatedWire.hxx | 53 ++++ .../RWStepVisual_RWTriangulatedFace.cxx | 239 ++++++++++++++ .../RWStepVisual_RWTriangulatedFace.hxx | 53 ++++ src/STEPControl/STEPControl_ActorRead.cxx | 49 ++- src/STEPControl/STEPControl_ActorWrite.cxx | 230 +++++++++++--- src/STEPControl/STEPControl_Controller.cxx | 16 + src/StepAP214/StepAP214_Protocol.cxx | 31 ++ src/StepToTopoDS/FILES | 3 + src/StepToTopoDS/StepToTopoDS_Builder.cxx | 118 +++++++ src/StepToTopoDS/StepToTopoDS_Builder.hxx | 20 ++ .../StepToTopoDS_TranslateFace.cxx | 250 +++++++++++++++ .../StepToTopoDS_TranslateFace.hxx | 19 +- .../StepToTopoDS_TranslateShell.cxx | 85 +++++ .../StepToTopoDS_TranslateShell.hxx | 9 +- .../StepToTopoDS_TranslateSolid.cxx | 148 +++++++++ .../StepToTopoDS_TranslateSolid.hxx | 62 ++++ .../StepToTopoDS_TranslateSolidError.hxx | 23 ++ src/StepVisual/FILES | 46 +++ ...Visual_Array1OfTessellatedEdgeOrVertex.hxx | 26 ++ ...sual_Array1OfTessellatedStructuredItem.hxx | 26 ++ .../StepVisual_ComplexTriangulatedFace.cxx | 171 ++++++++++ .../StepVisual_ComplexTriangulatedFace.hxx | 89 ++++++ ...epVisual_ComplexTriangulatedSurfaceSet.cxx | 167 ++++++++++ ...epVisual_ComplexTriangulatedSurfaceSet.hxx | 87 +++++ .../StepVisual_CubicBezierTessellatedEdge.cxx | 28 ++ .../StepVisual_CubicBezierTessellatedEdge.hxx | 40 +++ ...StepVisual_CubicBezierTriangulatedFace.cxx | 80 +++++ ...StepVisual_CubicBezierTriangulatedFace.hxx | 63 ++++ src/StepVisual/StepVisual_EdgeOrCurve.cxx | 61 ++++ src/StepVisual/StepVisual_EdgeOrCurve.hxx | 53 ++++ src/StepVisual/StepVisual_FaceOrSurface.cxx | 61 ++++ src/StepVisual/StepVisual_FaceOrSurface.hxx | 53 ++++ ...isual_HArray1OfTessellatedEdgeOrVertex.hxx | 26 ++ ...ual_HArray1OfTessellatedStructuredItem.hxx | 26 ++ .../StepVisual_PathOrCompositeCurve.cxx | 61 ++++ .../StepVisual_PathOrCompositeCurve.hxx | 53 ++++ .../StepVisual_TessellatedConnectingEdge.cxx | 213 +++++++++++++ .../StepVisual_TessellatedConnectingEdge.hxx | 105 +++++++ src/StepVisual/StepVisual_TessellatedEdge.cxx | 153 +++++++++ src/StepVisual/StepVisual_TessellatedEdge.hxx | 84 +++++ .../StepVisual_TessellatedEdgeOrVertex.cxx | 61 ++++ .../StepVisual_TessellatedEdgeOrVertex.hxx | 53 ++++ src/StepVisual/StepVisual_TessellatedFace.cxx | 164 ++++++++++ src/StepVisual/StepVisual_TessellatedFace.hxx | 89 ++++++ .../StepVisual_TessellatedPointSet.cxx | 110 +++++++ .../StepVisual_TessellatedPointSet.hxx | 70 +++++ ...pVisual_TessellatedShapeRepresentation.cxx | 28 ++ ...pVisual_TessellatedShapeRepresentation.hxx | 40 +++ ...peRepresentationWithAccuracyParameters.cxx | 91 ++++++ ...peRepresentationWithAccuracyParameters.hxx | 62 ++++ .../StepVisual_TessellatedShell.cxx | 130 ++++++++ .../StepVisual_TessellatedShell.hxx | 75 +++++ .../StepVisual_TessellatedSolid.cxx | 130 ++++++++ .../StepVisual_TessellatedSolid.hxx | 75 +++++ .../StepVisual_TessellatedStructuredItem.cxx | 28 ++ .../StepVisual_TessellatedStructuredItem.hxx | 40 +++ .../StepVisual_TessellatedSurfaceSet.cxx | 121 +++++++ .../StepVisual_TessellatedSurfaceSet.hxx | 75 +++++ .../StepVisual_TessellatedVertex.cxx | 128 ++++++++ .../StepVisual_TessellatedVertex.hxx | 77 +++++ src/StepVisual/StepVisual_TessellatedWire.cxx | 130 ++++++++ src/StepVisual/StepVisual_TessellatedWire.hxx | 75 +++++ .../StepVisual_TriangulatedFace.cxx | 134 ++++++++ .../StepVisual_TriangulatedFace.hxx | 78 +++++ src/TopoDSToStep/FILES | 2 + src/TopoDSToStep/TopoDSToStep_Builder.cxx | 297 ++++++++++-------- src/TopoDSToStep/TopoDSToStep_Builder.hxx | 5 + .../TopoDSToStep_MakeBrepWithVoids.cxx | 243 ++++++++------ .../TopoDSToStep_MakeBrepWithVoids.hxx | 5 +- .../TopoDSToStep_MakeFacetedBrep.cxx | 84 +++-- .../TopoDSToStep_MakeFacetedBrep.hxx | 4 +- ...ToStep_MakeFacetedBrepAndBrepWithVoids.cxx | 97 ++++-- ...ToStep_MakeFacetedBrepAndBrepWithVoids.hxx | 4 +- .../TopoDSToStep_MakeManifoldSolidBrep.cxx | 86 +++-- .../TopoDSToStep_MakeManifoldSolidBrep.hxx | 3 + ...opoDSToStep_MakeShellBasedSurfaceModel.cxx | 153 ++++++--- ...opoDSToStep_MakeShellBasedSurfaceModel.hxx | 4 +- .../TopoDSToStep_MakeStepFace.cxx | 12 + .../TopoDSToStep_MakeTessellatedItem.cxx | 210 +++++++++++++ .../TopoDSToStep_MakeTessellatedItem.hxx | 86 +++++ tests/de_mesh/grids.list | 2 + tests/de_mesh/step_read/A1 | 10 + tests/de_mesh/step_read/A2 | 12 + tests/de_mesh/step_read/A3 | 15 + tests/de_mesh/step_read/B1 | 16 + tests/de_mesh/step_read/begin | 5 + tests/de_mesh/step_read/end | 20 ++ tests/de_mesh/step_write/A1 | 8 + tests/de_mesh/step_write/A2 | 8 + tests/de_mesh/step_write/A3 | 8 + tests/de_mesh/step_write/A4 | 8 + tests/de_mesh/step_write/B1 | 9 + tests/de_mesh/step_write/B2 | 13 + tests/de_mesh/step_write/C1 | 10 + tests/de_mesh/step_write/C2 | 11 + tests/de_mesh/step_write/begin | 5 + tests/de_mesh/step_write/end | 33 ++ 128 files changed, 9922 insertions(+), 405 deletions(-) create mode 100644 src/RWStepVisual/RWStepVisual_RWComplexTriangulatedFace.cxx create mode 100644 src/RWStepVisual/RWStepVisual_RWComplexTriangulatedFace.hxx create mode 100644 src/RWStepVisual/RWStepVisual_RWComplexTriangulatedSurfaceSet.cxx create mode 100644 src/RWStepVisual/RWStepVisual_RWComplexTriangulatedSurfaceSet.hxx create mode 100644 src/RWStepVisual/RWStepVisual_RWCubicBezierTessellatedEdge.cxx create mode 100644 src/RWStepVisual/RWStepVisual_RWCubicBezierTessellatedEdge.hxx create mode 100644 src/RWStepVisual/RWStepVisual_RWCubicBezierTriangulatedFace.cxx create mode 100644 src/RWStepVisual/RWStepVisual_RWCubicBezierTriangulatedFace.hxx create mode 100644 src/RWStepVisual/RWStepVisual_RWTessellatedConnectingEdge.cxx create mode 100644 src/RWStepVisual/RWStepVisual_RWTessellatedConnectingEdge.hxx create mode 100644 src/RWStepVisual/RWStepVisual_RWTessellatedEdge.cxx create mode 100644 src/RWStepVisual/RWStepVisual_RWTessellatedEdge.hxx create mode 100644 src/RWStepVisual/RWStepVisual_RWTessellatedPointSet.cxx create mode 100644 src/RWStepVisual/RWStepVisual_RWTessellatedPointSet.hxx create mode 100644 src/RWStepVisual/RWStepVisual_RWTessellatedShapeRepresentation.cxx create mode 100644 src/RWStepVisual/RWStepVisual_RWTessellatedShapeRepresentation.hxx create mode 100644 src/RWStepVisual/RWStepVisual_RWTessellatedShapeRepresentationWithAccuracyParameters.cxx create mode 100644 src/RWStepVisual/RWStepVisual_RWTessellatedShapeRepresentationWithAccuracyParameters.hxx create mode 100644 src/RWStepVisual/RWStepVisual_RWTessellatedShell.cxx create mode 100644 src/RWStepVisual/RWStepVisual_RWTessellatedShell.hxx create mode 100644 src/RWStepVisual/RWStepVisual_RWTessellatedSolid.cxx create mode 100644 src/RWStepVisual/RWStepVisual_RWTessellatedSolid.hxx create mode 100644 src/RWStepVisual/RWStepVisual_RWTessellatedStructuredItem.cxx create mode 100644 src/RWStepVisual/RWStepVisual_RWTessellatedStructuredItem.hxx create mode 100644 src/RWStepVisual/RWStepVisual_RWTessellatedVertex.cxx create mode 100644 src/RWStepVisual/RWStepVisual_RWTessellatedVertex.hxx create mode 100644 src/RWStepVisual/RWStepVisual_RWTessellatedWire.cxx create mode 100644 src/RWStepVisual/RWStepVisual_RWTessellatedWire.hxx create mode 100644 src/RWStepVisual/RWStepVisual_RWTriangulatedFace.cxx create mode 100644 src/RWStepVisual/RWStepVisual_RWTriangulatedFace.hxx create mode 100644 src/StepToTopoDS/StepToTopoDS_TranslateSolid.cxx create mode 100644 src/StepToTopoDS/StepToTopoDS_TranslateSolid.hxx create mode 100644 src/StepToTopoDS/StepToTopoDS_TranslateSolidError.hxx create mode 100644 src/StepVisual/StepVisual_Array1OfTessellatedEdgeOrVertex.hxx create mode 100644 src/StepVisual/StepVisual_Array1OfTessellatedStructuredItem.hxx create mode 100644 src/StepVisual/StepVisual_ComplexTriangulatedFace.cxx create mode 100644 src/StepVisual/StepVisual_ComplexTriangulatedFace.hxx create mode 100644 src/StepVisual/StepVisual_ComplexTriangulatedSurfaceSet.cxx create mode 100644 src/StepVisual/StepVisual_ComplexTriangulatedSurfaceSet.hxx create mode 100644 src/StepVisual/StepVisual_CubicBezierTessellatedEdge.cxx create mode 100644 src/StepVisual/StepVisual_CubicBezierTessellatedEdge.hxx create mode 100644 src/StepVisual/StepVisual_CubicBezierTriangulatedFace.cxx create mode 100644 src/StepVisual/StepVisual_CubicBezierTriangulatedFace.hxx create mode 100644 src/StepVisual/StepVisual_EdgeOrCurve.cxx create mode 100644 src/StepVisual/StepVisual_EdgeOrCurve.hxx create mode 100644 src/StepVisual/StepVisual_FaceOrSurface.cxx create mode 100644 src/StepVisual/StepVisual_FaceOrSurface.hxx create mode 100644 src/StepVisual/StepVisual_HArray1OfTessellatedEdgeOrVertex.hxx create mode 100644 src/StepVisual/StepVisual_HArray1OfTessellatedStructuredItem.hxx create mode 100644 src/StepVisual/StepVisual_PathOrCompositeCurve.cxx create mode 100644 src/StepVisual/StepVisual_PathOrCompositeCurve.hxx create mode 100644 src/StepVisual/StepVisual_TessellatedConnectingEdge.cxx create mode 100644 src/StepVisual/StepVisual_TessellatedConnectingEdge.hxx create mode 100644 src/StepVisual/StepVisual_TessellatedEdge.cxx create mode 100644 src/StepVisual/StepVisual_TessellatedEdge.hxx create mode 100644 src/StepVisual/StepVisual_TessellatedEdgeOrVertex.cxx create mode 100644 src/StepVisual/StepVisual_TessellatedEdgeOrVertex.hxx create mode 100644 src/StepVisual/StepVisual_TessellatedFace.cxx create mode 100644 src/StepVisual/StepVisual_TessellatedFace.hxx create mode 100644 src/StepVisual/StepVisual_TessellatedPointSet.cxx create mode 100644 src/StepVisual/StepVisual_TessellatedPointSet.hxx create mode 100644 src/StepVisual/StepVisual_TessellatedShapeRepresentation.cxx create mode 100644 src/StepVisual/StepVisual_TessellatedShapeRepresentation.hxx create mode 100644 src/StepVisual/StepVisual_TessellatedShapeRepresentationWithAccuracyParameters.cxx create mode 100644 src/StepVisual/StepVisual_TessellatedShapeRepresentationWithAccuracyParameters.hxx create mode 100644 src/StepVisual/StepVisual_TessellatedShell.cxx create mode 100644 src/StepVisual/StepVisual_TessellatedShell.hxx create mode 100644 src/StepVisual/StepVisual_TessellatedSolid.cxx create mode 100644 src/StepVisual/StepVisual_TessellatedSolid.hxx create mode 100644 src/StepVisual/StepVisual_TessellatedStructuredItem.cxx create mode 100644 src/StepVisual/StepVisual_TessellatedStructuredItem.hxx create mode 100644 src/StepVisual/StepVisual_TessellatedSurfaceSet.cxx create mode 100644 src/StepVisual/StepVisual_TessellatedSurfaceSet.hxx create mode 100644 src/StepVisual/StepVisual_TessellatedVertex.cxx create mode 100644 src/StepVisual/StepVisual_TessellatedVertex.hxx create mode 100644 src/StepVisual/StepVisual_TessellatedWire.cxx create mode 100644 src/StepVisual/StepVisual_TessellatedWire.hxx create mode 100644 src/StepVisual/StepVisual_TriangulatedFace.cxx create mode 100644 src/StepVisual/StepVisual_TriangulatedFace.hxx create mode 100644 src/TopoDSToStep/TopoDSToStep_MakeTessellatedItem.cxx create mode 100644 src/TopoDSToStep/TopoDSToStep_MakeTessellatedItem.hxx create mode 100644 tests/de_mesh/step_read/A1 create mode 100644 tests/de_mesh/step_read/A2 create mode 100644 tests/de_mesh/step_read/A3 create mode 100644 tests/de_mesh/step_read/B1 create mode 100644 tests/de_mesh/step_read/begin create mode 100644 tests/de_mesh/step_read/end create mode 100644 tests/de_mesh/step_write/A1 create mode 100644 tests/de_mesh/step_write/A2 create mode 100644 tests/de_mesh/step_write/A3 create mode 100644 tests/de_mesh/step_write/A4 create mode 100644 tests/de_mesh/step_write/B1 create mode 100644 tests/de_mesh/step_write/B2 create mode 100644 tests/de_mesh/step_write/C1 create mode 100644 tests/de_mesh/step_write/C2 create mode 100644 tests/de_mesh/step_write/begin create mode 100644 tests/de_mesh/step_write/end diff --git a/dox/user_guides/step/step.md b/dox/user_guides/step/step.md index 9ea4dc7f44..f8f47da396 100644 --- a/dox/user_guides/step/step.md +++ b/dox/user_guides/step/step.md @@ -94,6 +94,7 @@ The types of STEP representation entities that are recognized are: * geometrically_bounded_wireframe_shape_representation * geometrically_bounded_surface_shape_representation * hybrid representations (shape_representation containing models of different type) + * tessellated_shape_representation @subsubsection occt_step_2_2_3 Topological entities The types of STEP topological entities that can be translated are: @@ -112,6 +113,7 @@ The types of STEP geometrical entities that can be translated are: * directions * curves * surfaces + * triangulations For further information see 2.4 Mapping STEP entities to Open CASCADE Technology shapes. @@ -337,7 +339,7 @@ Specifies preferred type of representation of the shape of the product, in case * 4 (GBSSR) -- Prefer GEOMETRICALLY_BOUNDED_SURFACE_SHAPE_REPRESENTATION * 5 (FBSR) -- Prefer FACETTED_BREP_SHAPE_REPRESENTATION * 6 (EBWSR) -- Prefer EDGE_BASED_WIREFRAME_SHAPE_REPRESENTATION -* 7 (GBWSR) -- Prefer GEOMETRICALLY_BOUNDED_WIREFRAME _SHAPE_REPRESENTATION +* 7 (GBWSR) -- Prefer GEOMETRICALLY_BOUNDED_WIREFRAME_SHAPE_REPRESENTATION When this option is not equal to 1, for products with multiple representations the representation having a type closest to the selected one in this list will be translated. @@ -447,6 +449,34 @@ of for each of the two "AXIS2_PLACEMENT_3D" entities referenced by it. as follow } ~~~~ +

    read.step.tessellated:

    + +Boolean flag regulating translation of entities that define tessellated geometry: + +* TESSELLATED_SHAPE_REPRESENTATION +* TESSELLATED_SHELL +* TESSELLATED_SOLID +* TRIANGULATED_FACE +* COMPLEX_TRIANGULATED_FACE + +Tesselated geometry is attached to shapes as objects of Poly_Triangulation type using STEP links. + +* 0 (Off) -- do not translate +* 1 (On) -- translate +* 2 (OnNoBRep) - tessellation is read only for entities for which there is no BRep representation + +Read this parameter with: +~~~~{.cpp} +Standard_Integer ic = Interface_Static::IVal("read.step.tessellated"); +~~~~ + +Modify this parameter with: +~~~~{.cpp} +if(!Interface_Static::SetIVal("read.step.tessellated",1)) +.. error .. +~~~~ +Default value is 0 (On). + @subsubsection occt_step_2_3_4 Performing the STEP file translation Perform the translation according to what you want to translate. You can choose either root entities (all or selected by the number of root), or select any entity by its number in the STEP file. There is a limited set of types of entities that can be used as starting entities for translation. Only the following entities are recognized as transferable: @@ -464,6 +494,11 @@ Perform the translation according to what you want to translate. You can choose * subtypes of face_surface (including advanced_face) * subtypes of shape_representation_relationship * context_dependent_shape_representation + * tessellated_shape_representation + * tessellated_shell + * tessellated_solid + * triangulated_face + * complex_triangulated_face The following methods are used for translation: @@ -683,6 +718,10 @@ Not all entities defining the assembly structure in the STEP file are translated | | quasi_uniform_surface | Geom_BSplineSurface | | | | rectangular_composite_surface | TopoDS_Compound | Contains *TopoDS_Faces* | | | curve_bounded_surface | TopoDS_Face | | +| Tessellations | tessellated_shell | TopoDS_Shell | | +| | tessellated_solid | TopoDS_Solid | | +| | triangulated_face | TopoDS_Face | Contains *Poly_Triangulation* | +| | complex_triangulated_face | TopoDS_Face | Contains *Poly_Triangulation* | @subsection occt_step_2_5 Tolerance management @@ -745,6 +784,7 @@ The following default tolerances are used when creating shapes and how they are * *StepToTopoDS_TranslatePolyLoop* constructs *TopoDS_Edges* in *TopoDS_Wire* with help of class *StepToTopoDS_TranslateEdge*. Their tolerances are not modified inside this method. * *StepToTopoDS_TranslateFace* constructs *TopoDS_Face* with the initial value of tolerance. *TopoDS_Wire* on *TopoDS_Face* is constructed with the help of classes *StepToTopoDS_TranslatePolyLoop, StepToTopoDS_TranslateEdgeLoop* or *StepToTopoDS_TranslateVertexLoop*. * *StepToTopoDS_TranslateShell* calls *StepToTopoDS_TranslateFace::Init* for each face. This class does not modify the tolerance value. +* *StepToTopoDS_TranslateSolid* calls *StepToTopoDS_TranslateFace::Init* for each face. This class does not modify the tolerance value. * *StepToTopoDS_TranslateCompositeCurve* constructs *TopoDS_Edges* in *TopoDS_Wire* with help of class *BRepAPI_MakeEdge* and have a tolerance 10-7. Pcurves from a STEP file are translated if they are present and if *read.surfacecurve.mode* is not -3. The connection between segments of a composite curve (edges in the wire) is provided by calling method *ShapeFix_Wire::FixConnected()\** with a precision equal to the initial value of tolerance. * *StepToTopoDS_TranslateCurveBoundedSurface* constructs *TopoDS_Face* with tolerance *Precision::Confusion()*. *TopoDS_Wire* on *TopoDS_Face* is constructed with the help of class *StepToTopoDS_TranslateCompositeCurve*. Missing pcurves are computed using projection algorithm with the help of method *ShapeFix_Face::FixPcurves()*. For resulting face method *ShapeFix::SameParameter()* is called. It calls standard *BRepLib::SameParameter* for each edge in each wire, which can either increase or decrease the tolerances of the edges and vertices. *SameParameter* writes the tolerance corresponding to the real deviation of pcurves from 3D curve which can be less or greater than the tolerance in a STEP file. * *StepToTopoDS_Builder* a high level class. Its methods perform translation with the help of the classes listed above. If the value of *read.maxprecision.mode* is set to 1 then the tolerance of subshapes of the resulting shape is limited by 0 and *read.maxprecision.val*. Else this class does not change the tolerance value. @@ -971,6 +1011,34 @@ if(!Interface_Static::SetIVal("write.step.vertex.mode",1)) ~~~~ Default value is 0. +

    write.step.tessellated:

    + +Boolean flag regulating writing of entities that define tessellated geometry: + +* TESSELLATED_SHAPE_REPRESENTATION +* TESSELLATED_SHELL +* TESSELLATED_SOLID +* TRIANGULATED_FACE + +Tesselated geometry is taken as objects of Poly_Triangulation type from the active TopoDS_Face triangulation. + +* 0 (Off) -- do not write +* 1 (On) -- write +* 2 (OnNoBRep) - tessellation is written only for entities for which there is no BRep representation + +Read this parameter with: +~~~~{.cpp} +Standard_Integer ic = Interface_Static::IVal("write.step.tessellated"); +~~~~ + +Modify this parameter with: +~~~~{.cpp} +if(!Interface_Static::SetIVal("write.step.tessellated",1)) +.. error .. +~~~~ + +Default value is 2 (OnNoBep). + @subsubsection occt_step_3_3_3 Performing the Open CASCADE Technology shape translation An OCCT shape can be translated to STEP using one of the following models (shape_representations): * manifold_solid_brep (advanced_brep_shape_representation) @@ -1094,6 +1162,7 @@ The table below describes STEP entities, which are created when the assembly str | | Geom_ToroidalSurface | toroidal_surface or degenerate_toroidal_surface | *degenerate_toroidal_surface* is produced if the minor radius is greater then the major one | | | Geom_BezierSurface | b_spline_surface_with_knots | | | | Geom_BsplineSurface | b_spline_surface_with_knots or rational_b_spline_surface | *rational_b_spline_surface* is produced if *Geom_BSplineSurface* is a rational Bspline | +| Triangulations | Poly_Triangulation | *triangulated_face* is produced for face active triangulation | | @subsection occt_step_3_5 Tolerance management diff --git a/src/RWStepAP214/RWStepAP214_GeneralModule.cxx b/src/RWStepAP214/RWStepAP214_GeneralModule.cxx index 3fd6358580..16c57f14a0 100644 --- a/src/RWStepAP214/RWStepAP214_GeneralModule.cxx +++ b/src/RWStepAP214/RWStepAP214_GeneralModule.cxx @@ -1527,6 +1527,37 @@ IMPLEMENT_STANDARD_RTTIEXT(RWStepAP214_GeneralModule,StepData_GeneralModule) #include #include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include static Standard_Integer catsh,catdr,catstr,catdsc,cataux; @@ -5901,8 +5932,113 @@ void RWStepAP214_GeneralModule::FillSharedCase(const Standard_Integer CN, aTool.Share(anEnt, iter); break; } - default : break; - } + case 804: + { + DeclareAndCast(StepVisual_TessellatedConnectingEdge, anEnt, ent); + RWStepVisual_RWTessellatedConnectingEdge aTool; + aTool.Share(anEnt, iter); + } + break; + case 805: + { + DeclareAndCast(StepVisual_TessellatedEdge, anEnt, ent); + RWStepVisual_RWTessellatedEdge aTool; + aTool.Share(anEnt, iter); + } + break; + case 806: + { + DeclareAndCast(StepVisual_TessellatedPointSet, anEnt, ent); + RWStepVisual_RWTessellatedPointSet aTool; + aTool.Share(anEnt, iter); + } + break; + case 807: + { + DeclareAndCast(StepVisual_TessellatedShapeRepresentation, anEnt, ent); + RWStepVisual_RWTessellatedShapeRepresentation aTool; + aTool.Share(anEnt, iter); + } + break; + case 808: + { + DeclareAndCast(StepVisual_TessellatedShapeRepresentationWithAccuracyParameters, anEnt, ent); + RWStepVisual_RWTessellatedShapeRepresentationWithAccuracyParameters aTool; + aTool.Share(anEnt, iter); + } + break; + case 809: + { + DeclareAndCast(StepVisual_TessellatedShell, anEnt, ent); + RWStepVisual_RWTessellatedShell aTool; + aTool.Share(anEnt, iter); + } + break; + case 810: + { + DeclareAndCast(StepVisual_TessellatedSolid, anEnt, ent); + RWStepVisual_RWTessellatedSolid aTool; + aTool.Share(anEnt, iter); + } + break; + case 811: + { + DeclareAndCast(StepVisual_TessellatedStructuredItem, anEnt, ent); + RWStepVisual_RWTessellatedStructuredItem aTool; + aTool.Share(anEnt, iter); + } + break; + case 812: + { + DeclareAndCast(StepVisual_TessellatedVertex, anEnt, ent); + RWStepVisual_RWTessellatedVertex aTool; + aTool.Share(anEnt, iter); + } + break; + case 813: + { + DeclareAndCast(StepVisual_TessellatedWire, anEnt, ent); + RWStepVisual_RWTessellatedWire aTool; + aTool.Share(anEnt, iter); + } + break; + case 814: + { + DeclareAndCast(StepVisual_TriangulatedFace, anEnt, ent); + RWStepVisual_RWTriangulatedFace aTool; + aTool.Share(anEnt, iter); + } + break; + case 815: + { + DeclareAndCast(StepVisual_ComplexTriangulatedFace, anEnt, ent); + RWStepVisual_RWComplexTriangulatedFace aTool; + aTool.Share(anEnt, iter); + } + break; + case 816: + { + DeclareAndCast(StepVisual_ComplexTriangulatedSurfaceSet, anEnt, ent); + RWStepVisual_RWComplexTriangulatedSurfaceSet aTool; + aTool.Share(anEnt, iter); + } + break; + case 817: + { + DeclareAndCast(StepVisual_CubicBezierTessellatedEdge, anEnt, ent); + RWStepVisual_RWCubicBezierTessellatedEdge aTool; + aTool.Share(anEnt, iter); + } + break; + case 818: + { + DeclareAndCast(StepVisual_CubicBezierTriangulatedFace, anEnt, ent); + RWStepVisual_RWCubicBezierTriangulatedFace aTool; + aTool.Share(anEnt, iter); + } + break; + default : break; + } } @@ -8162,7 +8298,52 @@ Standard_Boolean RWStepAP214_GeneralModule::NewVoid case 803: ent = new StepVisual_RepositionedTessellatedItem; break; - + case 804: + ent = new StepVisual_TessellatedConnectingEdge; + break; + case 805: + ent = new StepVisual_TessellatedEdge; + break; + case 806: + ent = new StepVisual_TessellatedPointSet; + break; + case 807: + ent = new StepVisual_TessellatedShapeRepresentation; + break; + case 808: + ent = new StepVisual_TessellatedShapeRepresentationWithAccuracyParameters; + break; + case 809: + ent = new StepVisual_TessellatedShell; + break; + case 810: + ent = new StepVisual_TessellatedSolid; + break; + case 811: + ent = new StepVisual_TessellatedStructuredItem; + break; + case 812: + ent = new StepVisual_TessellatedVertex; + break; + case 813: + ent = new StepVisual_TessellatedWire; + break; + case 814: + ent = new StepVisual_TriangulatedFace; + break; + case 815: + ent = new StepVisual_ComplexTriangulatedFace; + break; + case 816: + ent = new StepVisual_ComplexTriangulatedSurfaceSet; + break; + case 817: + ent = new StepVisual_CubicBezierTessellatedEdge; + break; + case 818: + ent = new StepVisual_CubicBezierTriangulatedFace; + break; + default: return Standard_False; } @@ -8844,6 +9025,21 @@ Standard_Integer RWStepAP214_GeneralModule::CategoryNumber case 801: return cataux; case 802: return cataux; case 803: return cataux; + case 804: return cataux; + case 805: return cataux; + case 806: return cataux; + case 807: return cataux; + case 808: return cataux; + case 809: return cataux; + case 810: return cataux; + case 811: return cataux; + case 812: return cataux; + case 813: return cataux; + case 814: return cataux; + case 815: return cataux; + case 816: return cataux; + case 817: return cataux; + case 818: return cataux; default : break; } return 0; diff --git a/src/RWStepAP214/RWStepAP214_ReadWriteModule.cxx b/src/RWStepAP214/RWStepAP214_ReadWriteModule.cxx index fd15b8f029..a12fe181ae 100644 --- a/src/RWStepAP214/RWStepAP214_ReadWriteModule.cxx +++ b/src/RWStepAP214/RWStepAP214_ReadWriteModule.cxx @@ -440,6 +440,38 @@ IMPLEMENT_STANDARD_RTTIEXT(RWStepAP214_ReadWriteModule,StepData_ReadWriteModule) #include #include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + #include #include #include @@ -2302,6 +2334,22 @@ static TCollection_AsciiString Reco_UniversalPairWithRange("UNIVERSAL_PAIR_WITH_ static TCollection_AsciiString Reco_KinematicPair("KINEMATIC_PAIR"); static TCollection_AsciiString Reco_MechanismStateRepresentation("MECHANISM_STATE_REPRESENTATION"); +static TCollection_AsciiString Reco_TessellatedConnectingEdge("TESSELLATED_CONNECTING_EDGE"); +static TCollection_AsciiString Reco_TessellatedEdge("TESSELLATED_EDGE"); +static TCollection_AsciiString Reco_TessellatedPointSet("TESSELLATED_POINT_SET"); +static TCollection_AsciiString Reco_TessellatedShapeRepresentation("TESSELLATED_SHAPE_REPRESENTATION"); +static TCollection_AsciiString Reco_TessellatedShapeRepresentationWithAccuracyParameters("TESSELLATED_SHAPE_REPRESENTATION_WITH_ACCURACY_PARAMETERS"); +static TCollection_AsciiString Reco_TessellatedShell("TESSELLATED_SHELL"); +static TCollection_AsciiString Reco_TessellatedSolid("TESSELLATED_SOLID"); +static TCollection_AsciiString Reco_TessellatedStructuredItem("TESSELLATED_STRUCTURED_ITEM"); +static TCollection_AsciiString Reco_TessellatedVertex("TESSELLATED_VERTEX"); +static TCollection_AsciiString Reco_TessellatedWire("TESSELLATED_WIRE"); +static TCollection_AsciiString Reco_TriangulatedFace("TRIANGULATED_FACE"); +static TCollection_AsciiString Reco_ComplexTriangulatedFace("COMPLEX_TRIANGULATED_FACE"); +static TCollection_AsciiString Reco_ComplexTriangulatedSurfaceSet("COMPLEX_TRIANGULATED_SURFACE_SET"); +static TCollection_AsciiString Reco_CubicBezierTessellatedEdge("CUBIC_BEZIER_TESSELLATED_EDGE"); +static TCollection_AsciiString Reco_CubicBezierTriangulatedFace("CUBIC_BEZIER_TRIANGULATED_FACE"); + // -- Definition of the libraries -- static NCollection_DataMap typenums; @@ -3042,6 +3090,21 @@ RWStepAP214_ReadWriteModule::RWStepAP214_ReadWriteModule () typenums.Bind(Reco_KinematicPair, 799); typenums.Bind(Reco_MechanismStateRepresentation, 801); typenums.Bind(Reco_RepositionedTessellatedItem, 803); + typenums.Bind(Reco_TessellatedConnectingEdge, 804); + typenums.Bind(Reco_TessellatedEdge, 805); + typenums.Bind(Reco_TessellatedPointSet, 806); + typenums.Bind(Reco_TessellatedShapeRepresentation, 807); + typenums.Bind(Reco_TessellatedShapeRepresentationWithAccuracyParameters, 808); + typenums.Bind(Reco_TessellatedShell, 809); + typenums.Bind(Reco_TessellatedSolid, 810); + typenums.Bind(Reco_TessellatedStructuredItem, 811); + typenums.Bind(Reco_TessellatedVertex, 812); + typenums.Bind(Reco_TessellatedWire, 813); + typenums.Bind(Reco_TriangulatedFace, 814); + typenums.Bind(Reco_ComplexTriangulatedFace, 815); + typenums.Bind(Reco_ComplexTriangulatedSurfaceSet, 816); + typenums.Bind(Reco_CubicBezierTessellatedEdge, 817); + typenums.Bind(Reco_CubicBezierTriangulatedFace, 818); // SHORT NAMES @@ -5014,6 +5077,21 @@ const TCollection_AsciiString& RWStepAP214_ReadWriteModule::StepType case 799: return Reco_KinematicPair; case 801: return Reco_MechanismStateRepresentation; case 803: return Reco_RepositionedTessellatedItem; + case 804: return Reco_TessellatedConnectingEdge; + case 805: return Reco_TessellatedEdge; + case 806: return Reco_TessellatedPointSet; + case 807: return Reco_TessellatedShapeRepresentation; + case 808: return Reco_TessellatedShapeRepresentationWithAccuracyParameters; + case 809: return Reco_TessellatedShell; + case 810: return Reco_TessellatedSolid; + case 811: return Reco_TessellatedStructuredItem; + case 812: return Reco_TessellatedVertex; + case 813: return Reco_TessellatedWire; + case 814: return Reco_TriangulatedFace; + case 815: return Reco_ComplexTriangulatedFace; + case 816: return Reco_ComplexTriangulatedSurfaceSet; + case 817: return Reco_CubicBezierTessellatedEdge; + case 818: return Reco_CubicBezierTriangulatedFace; default : return PasReco; } } @@ -10511,7 +10589,111 @@ void RWStepAP214_ReadWriteModule::ReadStep(const Standard_Integer CN, aTool.ReadStep(data, num, ach, anEnt); break; } - + case 804: + { + DeclareAndCast(StepVisual_TessellatedConnectingEdge, anEnt, ent); + RWStepVisual_RWTessellatedConnectingEdge aTool; + aTool.ReadStep(data, num, ach, anEnt); + } + break; + case 805: + { + DeclareAndCast(StepVisual_TessellatedEdge, anEnt, ent); + RWStepVisual_RWTessellatedEdge aTool; + aTool.ReadStep(data, num, ach, anEnt); + } + break; + case 806: + { + DeclareAndCast(StepVisual_TessellatedPointSet, anEnt, ent); + RWStepVisual_RWTessellatedPointSet aTool; + aTool.ReadStep(data, num, ach, anEnt); + } + break; + case 807: + { + DeclareAndCast(StepVisual_TessellatedShapeRepresentation, anEnt, ent); + RWStepVisual_RWTessellatedShapeRepresentation aTool; + aTool.ReadStep(data, num, ach, anEnt); + } + break; + case 808: + { + DeclareAndCast(StepVisual_TessellatedShapeRepresentationWithAccuracyParameters, anEnt, ent); + RWStepVisual_RWTessellatedShapeRepresentationWithAccuracyParameters aTool; + aTool.ReadStep(data, num, ach, anEnt); + } + break; + case 809: + { + DeclareAndCast(StepVisual_TessellatedShell, anEnt, ent); + RWStepVisual_RWTessellatedShell aTool; + aTool.ReadStep(data, num, ach, anEnt); + } + break; + case 810: + { + DeclareAndCast(StepVisual_TessellatedSolid, anEnt, ent); + RWStepVisual_RWTessellatedSolid aTool; + aTool.ReadStep(data, num, ach, anEnt); + } + break; + case 811: + { + DeclareAndCast(StepVisual_TessellatedStructuredItem, anEnt, ent); + RWStepVisual_RWTessellatedStructuredItem aTool; + aTool.ReadStep(data, num, ach, anEnt); + } + break; + case 812: + { + DeclareAndCast(StepVisual_TessellatedVertex, anEnt, ent); + RWStepVisual_RWTessellatedVertex aTool; + aTool.ReadStep(data, num, ach, anEnt); + } + break; + case 813: + { + DeclareAndCast(StepVisual_TessellatedWire, anEnt, ent); + RWStepVisual_RWTessellatedWire aTool; + aTool.ReadStep(data, num, ach, anEnt); + } + break; + case 814: + { + DeclareAndCast(StepVisual_TriangulatedFace, anEnt, ent); + RWStepVisual_RWTriangulatedFace aTool; + aTool.ReadStep(data, num, ach, anEnt); + } + break; + case 815: + { + DeclareAndCast(StepVisual_ComplexTriangulatedFace, anEnt, ent); + RWStepVisual_RWComplexTriangulatedFace aTool; + aTool.ReadStep(data, num, ach, anEnt); + } + break; + case 816: + { + DeclareAndCast(StepVisual_ComplexTriangulatedSurfaceSet, anEnt, ent); + RWStepVisual_RWComplexTriangulatedSurfaceSet aTool; + aTool.ReadStep(data, num, ach, anEnt); + } + break; + case 817: + { + DeclareAndCast(StepVisual_CubicBezierTessellatedEdge, anEnt, ent); + RWStepVisual_RWCubicBezierTessellatedEdge aTool; + aTool.ReadStep(data, num, ach, anEnt); + } + break; + case 818: + { + DeclareAndCast(StepVisual_CubicBezierTriangulatedFace, anEnt, ent); + RWStepVisual_RWCubicBezierTriangulatedFace aTool; + aTool.ReadStep(data, num, ach, anEnt); + } + break; default: ach->AddFail("Type Mismatch when reading - Entity"); } @@ -15948,7 +16130,115 @@ void RWStepAP214_ReadWriteModule::WriteStep(const Standard_Integer CN, aTool.WriteStep(SW, anEnt); break; } - default: + + // -------------------------------------------------------------------- + + case 804: + { + DeclareAndCast(StepVisual_TessellatedConnectingEdge, anEnt, ent); + RWStepVisual_RWTessellatedConnectingEdge aTool; + aTool.WriteStep(SW, anEnt); + } + break; + case 805: + { + DeclareAndCast(StepVisual_TessellatedEdge, anEnt, ent); + RWStepVisual_RWTessellatedEdge aTool; + aTool.WriteStep(SW, anEnt); + } + break; + case 806: + { + DeclareAndCast(StepVisual_TessellatedPointSet, anEnt, ent); + RWStepVisual_RWTessellatedPointSet aTool; + aTool.WriteStep(SW, anEnt); + } + break; + case 807: + { + DeclareAndCast(StepVisual_TessellatedShapeRepresentation, anEnt, ent); + RWStepVisual_RWTessellatedShapeRepresentation aTool; + aTool.WriteStep(SW, anEnt); + } + break; + case 808: + { + DeclareAndCast(StepVisual_TessellatedShapeRepresentationWithAccuracyParameters, anEnt, ent); + RWStepVisual_RWTessellatedShapeRepresentationWithAccuracyParameters aTool; + aTool.WriteStep(SW, anEnt); + } + break; + case 809: + { + DeclareAndCast(StepVisual_TessellatedShell, anEnt, ent); + RWStepVisual_RWTessellatedShell aTool; + aTool.WriteStep(SW, anEnt); + } + break; + case 810: + { + DeclareAndCast(StepVisual_TessellatedSolid, anEnt, ent); + RWStepVisual_RWTessellatedSolid aTool; + aTool.WriteStep(SW, anEnt); + } + break; + case 811: + { + DeclareAndCast(StepVisual_TessellatedStructuredItem, anEnt, ent); + RWStepVisual_RWTessellatedStructuredItem aTool; + aTool.WriteStep(SW, anEnt); + } + break; + case 812: + { + DeclareAndCast(StepVisual_TessellatedVertex, anEnt, ent); + RWStepVisual_RWTessellatedVertex aTool; + aTool.WriteStep(SW, anEnt); + } + break; + case 813: + { + DeclareAndCast(StepVisual_TessellatedWire, anEnt, ent); + RWStepVisual_RWTessellatedWire aTool; + aTool.WriteStep(SW, anEnt); + } + break; + case 814: + { + DeclareAndCast(StepVisual_TriangulatedFace, anEnt, ent); + RWStepVisual_RWTriangulatedFace aTool; + aTool.WriteStep(SW, anEnt); + } + break; + case 815: + { + DeclareAndCast(StepVisual_ComplexTriangulatedFace, anEnt, ent); + RWStepVisual_RWComplexTriangulatedFace aTool; + aTool.WriteStep(SW, anEnt); + } + break; + case 816: + { + DeclareAndCast(StepVisual_ComplexTriangulatedSurfaceSet, anEnt, ent); + RWStepVisual_RWComplexTriangulatedSurfaceSet aTool; + aTool.WriteStep(SW, anEnt); + } + break; + case 817: + { + DeclareAndCast(StepVisual_CubicBezierTessellatedEdge, anEnt, ent); + RWStepVisual_RWCubicBezierTessellatedEdge aTool; + aTool.WriteStep(SW, anEnt); + } + break; + case 818: + { + DeclareAndCast(StepVisual_CubicBezierTriangulatedFace, anEnt, ent); + RWStepVisual_RWCubicBezierTriangulatedFace aTool; + aTool.WriteStep(SW, anEnt); + } + break; + default: return; } } diff --git a/src/RWStepVisual/FILES b/src/RWStepVisual/FILES index 5c396ba9ae..c1c2ee0ab6 100644 --- a/src/RWStepVisual/FILES +++ b/src/RWStepVisual/FILES @@ -160,5 +160,33 @@ RWStepVisual_RWCoordinatesList.hxx RWStepVisual_RWCoordinatesList.cxx RWStepVisual_RWTessellatedCurveSet.hxx RWStepVisual_RWTessellatedCurveSet.cxx - - +RWStepVisual_RWComplexTriangulatedFace.cxx +RWStepVisual_RWComplexTriangulatedFace.hxx +RWStepVisual_RWComplexTriangulatedSurfaceSet.cxx +RWStepVisual_RWComplexTriangulatedSurfaceSet.hxx +RWStepVisual_RWCubicBezierTessellatedEdge.cxx +RWStepVisual_RWCubicBezierTessellatedEdge.hxx +RWStepVisual_RWCubicBezierTriangulatedFace.cxx +RWStepVisual_RWCubicBezierTriangulatedFace.hxx +RWStepVisual_RWTessellatedConnectingEdge.cxx +RWStepVisual_RWTessellatedConnectingEdge.hxx +RWStepVisual_RWTessellatedEdge.cxx +RWStepVisual_RWTessellatedEdge.hxx +RWStepVisual_RWTessellatedPointSet.cxx +RWStepVisual_RWTessellatedPointSet.hxx +RWStepVisual_RWTessellatedShapeRepresentation.cxx +RWStepVisual_RWTessellatedShapeRepresentation.hxx +RWStepVisual_RWTessellatedShapeRepresentationWithAccuracyParameters.cxx +RWStepVisual_RWTessellatedShapeRepresentationWithAccuracyParameters.hxx +RWStepVisual_RWTessellatedShell.cxx +RWStepVisual_RWTessellatedShell.hxx +RWStepVisual_RWTessellatedSolid.cxx +RWStepVisual_RWTessellatedSolid.hxx +RWStepVisual_RWTessellatedStructuredItem.cxx +RWStepVisual_RWTessellatedStructuredItem.hxx +RWStepVisual_RWTessellatedVertex.cxx +RWStepVisual_RWTessellatedVertex.hxx +RWStepVisual_RWTessellatedWire.cxx +RWStepVisual_RWTessellatedWire.hxx +RWStepVisual_RWTriangulatedFace.cxx +RWStepVisual_RWTriangulatedFace.hxx diff --git a/src/RWStepVisual/RWStepVisual_RWComplexTriangulatedFace.cxx b/src/RWStepVisual/RWStepVisual_RWComplexTriangulatedFace.cxx new file mode 100644 index 0000000000..266d02d91a --- /dev/null +++ b/src/RWStepVisual/RWStepVisual_RWComplexTriangulatedFace.cxx @@ -0,0 +1,271 @@ +// Created on : Thu Mar 24 18:30:11 2022 +// Created by: snn +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V2.0 +// Copyright (c) Open CASCADE 2022 +// +// This file is part of Open CASCADE Technology software library. +// +// This library is free software; you can redistribute it and/or modify it under +// the terms of the GNU Lesser General Public License version 2.1 as published +// by the Free Software Foundation, with special exception defined in the file +// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT +// distribution for complete text of the license and disclaimer of any warranty. +// +// Alternatively, this file may be used under the terms of Open CASCADE +// commercial license or contractual agreement. + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +//======================================================================= +//function : RWStepVisual_RWComplexTriangulatedFace +//purpose : +//======================================================================= + +RWStepVisual_RWComplexTriangulatedFace::RWStepVisual_RWComplexTriangulatedFace() {} + + +//======================================================================= +//function : ReadStep +//purpose : +//======================================================================= + +void RWStepVisual_RWComplexTriangulatedFace::ReadStep (const Handle(StepData_StepReaderData)& theData, + const Standard_Integer theNum, + Handle(Interface_Check)& theCheck, + const Handle(StepVisual_ComplexTriangulatedFace)& theEnt) const +{ + // Check number of parameters + if (!theData->CheckNbParams(theNum, 8, theCheck, "complex_triangulated_face")) + { + return; + } + + // Inherited fields of RepresentationItem + + Handle(TCollection_HAsciiString) aRepresentationItem_Name; + theData->ReadString(theNum, 1, "representation_item.name", theCheck, aRepresentationItem_Name); + + // Inherited fields of TessellatedFace + + Handle(StepVisual_CoordinatesList) aTessellatedFace_Coordinates; + theData->ReadEntity(theNum, 2, "tessellated_face.coordinates", theCheck, + STANDARD_TYPE(StepVisual_CoordinatesList), aTessellatedFace_Coordinates); + + Standard_Integer aTessellatedFace_Pnmax; + theData->ReadInteger(theNum, 3, "tessellated_face.pnmax", theCheck, aTessellatedFace_Pnmax); + + Handle(TColStd_HArray2OfReal) aTessellatedFace_Normals; + Standard_Integer sub4 = 0; + if (theData->ReadSubList(theNum, 4, "tessellated_face.normals", theCheck, sub4)) + { + Standard_Integer nb0 = theData->NbParams(sub4); + Standard_Integer nbj0 = theData->NbParams(theData->ParamNumber(sub4,1)); + aTessellatedFace_Normals = new TColStd_HArray2OfReal(1, nb0, 1, nbj0); + for (Standard_Integer i0 = 1; i0 <= nb0; i0++) + { + Standard_Integer subj4 = 0; + if ( theData->ReadSubList (sub4, i0, "sub-part(tessellated_face.normals)", theCheck, subj4) ) { + Standard_Integer num4 = subj4; + for (Standard_Integer j0 = 1; j0 <= nbj0; j0++) + { + Standard_Real anIt0; + theData->ReadReal(num4, j0, "real", theCheck, anIt0); + aTessellatedFace_Normals->SetValue(i0,j0, anIt0); + } + } + } + } + + StepVisual_FaceOrSurface aTessellatedFace_GeometricLink; + Standard_Boolean hasTessellatedFace_GeometricLink = Standard_True; + if (theData->IsParamDefined(theNum, 5)) + { + theData->ReadEntity(theNum, 5, "tessellated_face.geometric_link", theCheck, aTessellatedFace_GeometricLink); + } + else + { + hasTessellatedFace_GeometricLink = Standard_False; + aTessellatedFace_GeometricLink = StepVisual_FaceOrSurface(); + } + + // Own fields of ComplexTriangulatedFace + + Handle(TColStd_HArray1OfInteger) aPnindex; + Standard_Integer sub6 = 0; + if (theData->ReadSubList(theNum, 6, "pnindex", theCheck, sub6)) + { + Standard_Integer nb0 = theData->NbParams(sub6); + aPnindex = new TColStd_HArray1OfInteger(1, nb0); + Standard_Integer num2 = sub6; + for (Standard_Integer i0 = 1; i0 <= nb0; i0++) + { + Standard_Integer anIt0; + theData->ReadInteger(num2, i0, "integer", theCheck, anIt0); + aPnindex->SetValue(i0, anIt0); + } + } + + Handle(TColStd_HArray2OfInteger) aTriangleStrips; + Standard_Integer sub7 = 0; + if (theData->ReadSubList(theNum, 7, "triangle_strips", theCheck, sub7)) + { + Standard_Integer nb0 = theData->NbParams(sub7); + Standard_Integer nbj0 = theData->NbParams(theData->ParamNumber(sub7,1)); + aTriangleStrips = new TColStd_HArray2OfInteger(1, nb0, 1, nbj0); + for (Standard_Integer i0 = 1; i0 <= nb0; i0++) + { + Standard_Integer subj7 = 0; + if ( theData->ReadSubList (sub7, i0, "sub-part(triangle_strips)", theCheck, subj7) ) { + Standard_Integer num4 = subj7; + for (Standard_Integer j0 = 1; j0 <= nbj0; j0++) + { + Standard_Integer anIt0; + theData->ReadInteger(num4, j0, "integer", theCheck, anIt0); + aTriangleStrips->SetValue(i0,j0, anIt0); + } + } + } + } + + Handle(TColStd_HArray2OfInteger) aTriangleFans; + Standard_Integer sub8 = 0; + if (theData->ReadSubList(theNum, 8, "triangle_fans", theCheck, sub8)) + { + Standard_Integer nb0 = theData->NbParams(sub8); + Standard_Integer nbj0 = theData->NbParams(theData->ParamNumber(sub8,1)); + aTriangleFans = new TColStd_HArray2OfInteger(1, nb0, 1, nbj0); + for (Standard_Integer i0 = 1; i0 <= nb0; i0++) + { + Standard_Integer subj8 = 0; + if ( theData->ReadSubList (sub8, i0, "sub-part(triangle_fans)", theCheck, subj8) ) { + Standard_Integer num4 = subj8; + for (Standard_Integer j0 = 1; j0 <= nbj0; j0++) + { + Standard_Integer anIt0; + theData->ReadInteger(num4, j0, "integer", theCheck, anIt0); + aTriangleFans->SetValue(i0,j0, anIt0); + } + } + } + } + + // Initialize entity + theEnt->Init(aRepresentationItem_Name, aTessellatedFace_Coordinates, aTessellatedFace_Pnmax, aTessellatedFace_Normals, hasTessellatedFace_GeometricLink, aTessellatedFace_GeometricLink, aPnindex, aTriangleStrips, aTriangleFans); +} + +//======================================================================= +//function : WriteStep +//purpose : +//======================================================================= + +void RWStepVisual_RWComplexTriangulatedFace::WriteStep (StepData_StepWriter& theSW, + const Handle(StepVisual_ComplexTriangulatedFace)& theEnt) const +{ + + // Own fields of RepresentationItem + + theSW.Send(theEnt->Name()); + + // Own fields of TessellatedFace + + theSW.Send(theEnt->Coordinates()); + + theSW.Send(theEnt->Pnmax()); + + theSW.OpenSub(); + for (Standard_Integer i3 = 1; i3 <= theEnt->Normals()->RowLength(); i3++) + { + theSW.NewLine(Standard_False); + theSW.OpenSub(); + for (Standard_Integer j3 = 1; j3 <= theEnt->Normals()->ColLength(); j3++) + { + Standard_Real Var0 = theEnt->Normals()->Value(i3,j3); + theSW.Send(Var0); + } + theSW.CloseSub(); + } + theSW.CloseSub(); + + if (theEnt->HasGeometricLink()) + { + theSW.Send(theEnt->GeometricLink().Value()); + } + else + { + theSW.SendUndef(); + } + + // Own fields of ComplexTriangulatedFace + + theSW.OpenSub(); + for (Standard_Integer i5 = 1; i5 <= theEnt->Pnindex()->Length(); i5++) + { + Standard_Integer Var0 = theEnt->Pnindex()->Value(i5); + theSW.Send(Var0); + } + theSW.CloseSub(); + + theSW.OpenSub(); + for (Standard_Integer i6 = 1; i6 <= theEnt->TriangleStrips()->RowLength(); i6++) + { + theSW.NewLine(Standard_False); + theSW.OpenSub(); + for (Standard_Integer j6 = 1; j6 <= theEnt->TriangleStrips()->ColLength(); j6++) + { + Standard_Integer Var0 = theEnt->TriangleStrips()->Value(i6,j6); + theSW.Send(Var0); + } + theSW.CloseSub(); + } + theSW.CloseSub(); + + theSW.OpenSub(); + for (Standard_Integer i7 = 1; i7 <= theEnt->TriangleFans()->RowLength(); i7++) + { + theSW.NewLine(Standard_False); + theSW.OpenSub(); + for (Standard_Integer j7 = 1; j7 <= theEnt->TriangleFans()->ColLength(); j7++) + { + Standard_Integer Var0 = theEnt->TriangleFans()->Value(i7,j7); + theSW.Send(Var0); + } + theSW.CloseSub(); + } + theSW.CloseSub(); +} + +//======================================================================= +//function : Share +//purpose : +//======================================================================= + +void RWStepVisual_RWComplexTriangulatedFace::Share (const Handle(StepVisual_ComplexTriangulatedFace)&theEnt, + Interface_EntityIterator& theIter) const +{ + + // Inherited fields of RepresentationItem + + // Inherited fields of TessellatedFace + + theIter.AddItem(theEnt->StepVisual_TessellatedFace::Coordinates()); + + if (theEnt->StepVisual_TessellatedFace::HasGeometricLink()) + { + theIter.AddItem(theEnt->StepVisual_TessellatedFace::GeometricLink().Value()); + } + + // Own fields of ComplexTriangulatedFace +} diff --git a/src/RWStepVisual/RWStepVisual_RWComplexTriangulatedFace.hxx b/src/RWStepVisual/RWStepVisual_RWComplexTriangulatedFace.hxx new file mode 100644 index 0000000000..d87a02ccb9 --- /dev/null +++ b/src/RWStepVisual/RWStepVisual_RWComplexTriangulatedFace.hxx @@ -0,0 +1,53 @@ +// Created on : Thu Mar 24 18:30:11 2022 +// Created by: snn +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V2.0 +// Copyright (c) Open CASCADE 2022 +// +// 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 _RWStepVisual_RWComplexTriangulatedFace_HeaderFile_ +#define _RWStepVisual_RWComplexTriangulatedFace_HeaderFile_ + +#include +#include +#include + +class StepData_StepReaderData; +class Interface_Check; +class StepData_StepWriter; +class Interface_EntityIterator; +class StepVisual_ComplexTriangulatedFace; + +//! Read & Write tool for ComplexTriangulatedFace +class RWStepVisual_RWComplexTriangulatedFace +{ + +public: + + DEFINE_STANDARD_ALLOC + + Standard_EXPORT RWStepVisual_RWComplexTriangulatedFace(); + + Standard_EXPORT void ReadStep(const Handle(StepData_StepReaderData)& theData, + const Standard_Integer theNum, + Handle(Interface_Check)& theCheck, + const Handle(StepVisual_ComplexTriangulatedFace)& theEnt) const; + + Standard_EXPORT void WriteStep(StepData_StepWriter& theSW, + const Handle(StepVisual_ComplexTriangulatedFace)& theEnt) const; + + Standard_EXPORT void Share(const Handle(StepVisual_ComplexTriangulatedFace)& theEnt, + Interface_EntityIterator& theIter) const; + +}; + +#endif // _RWStepVisual_RWComplexTriangulatedFace_HeaderFile_ diff --git a/src/RWStepVisual/RWStepVisual_RWComplexTriangulatedSurfaceSet.cxx b/src/RWStepVisual/RWStepVisual_RWComplexTriangulatedSurfaceSet.cxx new file mode 100644 index 0000000000..e8a80734b9 --- /dev/null +++ b/src/RWStepVisual/RWStepVisual_RWComplexTriangulatedSurfaceSet.cxx @@ -0,0 +1,247 @@ +// Created on : Thu Mar 24 18:30:11 2022 +// Created by: snn +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V2.0 +// Copyright (c) Open CASCADE 2022 +// +// This file is part of Open CASCADE Technology software library. +// +// This library is free software; you can redistribute it and/or modify it under +// the terms of the GNU Lesser General Public License version 2.1 as published +// by the Free Software Foundation, with special exception defined in the file +// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT +// distribution for complete text of the license and disclaimer of any warranty. +// +// Alternatively, this file may be used under the terms of Open CASCADE +// commercial license or contractual agreement. + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +//======================================================================= +//function : RWStepVisual_RWComplexTriangulatedSurfaceSet +//purpose : +//======================================================================= + +RWStepVisual_RWComplexTriangulatedSurfaceSet::RWStepVisual_RWComplexTriangulatedSurfaceSet() {} + + +//======================================================================= +//function : ReadStep +//purpose : +//======================================================================= + +void RWStepVisual_RWComplexTriangulatedSurfaceSet::ReadStep( + const Handle(StepData_StepReaderData)& theData, + const Standard_Integer theNum, + Handle(Interface_Check)& theCheck, + const Handle(StepVisual_ComplexTriangulatedSurfaceSet)& theEnt) const +{ + // Check number of parameters + if (!theData->CheckNbParams(theNum, 7, theCheck, "complex_triangulated_surface_set")) + { + return; + } + + // Inherited fields of RepresentationItem + + Handle(TCollection_HAsciiString) aRepresentationItem_Name; + theData->ReadString(theNum, 1, "representation_item.name", theCheck, aRepresentationItem_Name); + + // Inherited fields of TessellatedSurfaceSet + + Handle(StepVisual_CoordinatesList) aTessellatedSurfaceSet_Coordinates; + theData->ReadEntity(theNum, 2, "tessellated_surface_set.coordinates", theCheck, + STANDARD_TYPE(StepVisual_CoordinatesList), aTessellatedSurfaceSet_Coordinates); + + Standard_Integer aTessellatedSurfaceSet_Pnmax; + theData->ReadInteger(theNum, 3, "tessellated_surface_set.pnmax", theCheck, aTessellatedSurfaceSet_Pnmax); + + Handle(TColStd_HArray2OfReal) aTessellatedSurfaceSet_Normals; + Standard_Integer sub4 = 0; + if (theData->ReadSubList(theNum, 4, "tessellated_surface_set.normals", theCheck, sub4)) + { + Standard_Integer nb0 = theData->NbParams(sub4); + Standard_Integer nbj0 = theData->NbParams(theData->ParamNumber(sub4,1)); + aTessellatedSurfaceSet_Normals = new TColStd_HArray2OfReal(1, nb0, 1, nbj0); + for (Standard_Integer i0 = 1; i0 <= nb0; i0++) + { + Standard_Integer subj4 = 0; + if ( theData->ReadSubList (sub4, i0, "sub-part(tessellated_surface_set.normals)", theCheck, subj4) ) { + Standard_Integer num4 = subj4; + for (Standard_Integer j0 = 1; j0 <= nbj0; j0++) + { + Standard_Real anIt0; + theData->ReadReal(num4, j0, "real", theCheck, anIt0); + aTessellatedSurfaceSet_Normals->SetValue(i0,j0, anIt0); + } + } + } + } + + // Own fields of ComplexTriangulatedSurfaceSet + + Handle(TColStd_HArray1OfInteger) aPnindex; + Standard_Integer sub5 = 0; + if (theData->ReadSubList(theNum, 5, "pnindex", theCheck, sub5)) + { + Standard_Integer nb0 = theData->NbParams(sub5); + aPnindex = new TColStd_HArray1OfInteger(1, nb0); + Standard_Integer num2 = sub5; + for (Standard_Integer i0 = 1; i0 <= nb0; i0++) + { + Standard_Integer anIt0; + theData->ReadInteger(num2, i0, "integer", theCheck, anIt0); + aPnindex->SetValue(i0, anIt0); + } + } + + Handle(TColStd_HArray2OfInteger) aTriangleStrips; + Standard_Integer sub6 = 0; + if (theData->ReadSubList(theNum, 6, "triangle_strips", theCheck, sub6)) + { + Standard_Integer nb0 = theData->NbParams(sub6); + Standard_Integer nbj0 = theData->NbParams(theData->ParamNumber(sub6,1)); + aTriangleStrips = new TColStd_HArray2OfInteger(1, nb0, 1, nbj0); + for (Standard_Integer i0 = 1; i0 <= nb0; i0++) + { + Standard_Integer subj6 = 0; + if ( theData->ReadSubList (sub6, i0, "sub-part(triangle_strips)", theCheck, subj6) ) { + Standard_Integer num4 = subj6; + for (Standard_Integer j0 = 1; j0 <= nbj0; j0++) + { + Standard_Integer anIt0; + theData->ReadInteger(num4, j0, "integer", theCheck, anIt0); + aTriangleStrips->SetValue(i0,j0, anIt0); + } + } + } + } + + Handle(TColStd_HArray2OfInteger) aTriangleFans; + Standard_Integer sub7 = 0; + if (theData->ReadSubList(theNum, 7, "triangle_fans", theCheck, sub7)) + { + Standard_Integer nb0 = theData->NbParams(sub7); + Standard_Integer nbj0 = theData->NbParams(theData->ParamNumber(sub7,1)); + aTriangleFans = new TColStd_HArray2OfInteger(1, nb0, 1, nbj0); + for (Standard_Integer i0 = 1; i0 <= nb0; i0++) + { + Standard_Integer subj7 = 0; + if ( theData->ReadSubList (sub7, i0, "sub-part(triangle_fans)", theCheck, subj7) ) { + Standard_Integer num4 = subj7; + for (Standard_Integer j0 = 1; j0 <= nbj0; j0++) + { + Standard_Integer anIt0; + theData->ReadInteger(num4, j0, "integer", theCheck, anIt0); + aTriangleFans->SetValue(i0,j0, anIt0); + } + } + } + } + + // Initialize entity + theEnt->Init(aRepresentationItem_Name, aTessellatedSurfaceSet_Coordinates, aTessellatedSurfaceSet_Pnmax, aTessellatedSurfaceSet_Normals, aPnindex, aTriangleStrips, aTriangleFans); +} + +//======================================================================= +//function : WriteStep +//purpose : +//======================================================================= + +void RWStepVisual_RWComplexTriangulatedSurfaceSet::WriteStep( + StepData_StepWriter& theSW, + const Handle(StepVisual_ComplexTriangulatedSurfaceSet)& theEnt) const +{ + + // Own fields of RepresentationItem + + theSW.Send(theEnt->Name()); + + // Own fields of TessellatedSurfaceSet + + theSW.Send(theEnt->Coordinates()); + + theSW.Send(theEnt->Pnmax()); + + theSW.OpenSub(); + for (Standard_Integer i3 = 1; i3 <= theEnt->Normals()->RowLength(); i3++) + { + theSW.NewLine(Standard_False); + theSW.OpenSub(); + for (Standard_Integer j3 = 1; j3 <= theEnt->Normals()->ColLength(); j3++) + { + Standard_Real Var0 = theEnt->Normals()->Value(i3,j3); + theSW.Send(Var0); + } + theSW.CloseSub(); + } + theSW.CloseSub(); + + // Own fields of ComplexTriangulatedSurfaceSet + + theSW.OpenSub(); + for (Standard_Integer i4 = 1; i4 <= theEnt->Pnindex()->Length(); i4++) + { + Standard_Integer Var0 = theEnt->Pnindex()->Value(i4); + theSW.Send(Var0); + } + theSW.CloseSub(); + + theSW.OpenSub(); + for (Standard_Integer i5 = 1; i5 <= theEnt->TriangleStrips()->RowLength(); i5++) + { + theSW.NewLine(Standard_False); + theSW.OpenSub(); + for (Standard_Integer j5 = 1; j5 <= theEnt->TriangleStrips()->ColLength(); j5++) + { + Standard_Integer Var0 = theEnt->TriangleStrips()->Value(i5,j5); + theSW.Send(Var0); + } + theSW.CloseSub(); + } + theSW.CloseSub(); + + theSW.OpenSub(); + for (Standard_Integer i6 = 1; i6 <= theEnt->TriangleFans()->RowLength(); i6++) + { + theSW.NewLine(Standard_False); + theSW.OpenSub(); + for (Standard_Integer j6 = 1; j6 <= theEnt->TriangleFans()->ColLength(); j6++) + { + Standard_Integer Var0 = theEnt->TriangleFans()->Value(i6,j6); + theSW.Send(Var0); + } + theSW.CloseSub(); + } + theSW.CloseSub(); +} + +//======================================================================= +//function : Share +//purpose : +//======================================================================= + +void RWStepVisual_RWComplexTriangulatedSurfaceSet::Share( + const Handle(StepVisual_ComplexTriangulatedSurfaceSet)&theEnt, +Interface_EntityIterator& theIter) const +{ + + // Inherited fields of RepresentationItem + + // Inherited fields of TessellatedSurfaceSet + + theIter.AddItem(theEnt->StepVisual_TessellatedSurfaceSet::Coordinates()); + + // Own fields of ComplexTriangulatedSurfaceSet +} diff --git a/src/RWStepVisual/RWStepVisual_RWComplexTriangulatedSurfaceSet.hxx b/src/RWStepVisual/RWStepVisual_RWComplexTriangulatedSurfaceSet.hxx new file mode 100644 index 0000000000..2564dee6b4 --- /dev/null +++ b/src/RWStepVisual/RWStepVisual_RWComplexTriangulatedSurfaceSet.hxx @@ -0,0 +1,53 @@ +// Created on : Thu Mar 24 18:30:11 2022 +// Created by: snn +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V2.0 +// Copyright (c) Open CASCADE 2022 +// +// 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 _RWStepVisual_RWComplexTriangulatedSurfaceSet_HeaderFile_ +#define _RWStepVisual_RWComplexTriangulatedSurfaceSet_HeaderFile_ + +#include +#include +#include + +class StepData_StepReaderData; +class Interface_Check; +class StepData_StepWriter; +class Interface_EntityIterator; +class StepVisual_ComplexTriangulatedSurfaceSet; + +//! Read & Write tool for ComplexTriangulatedSurfaceSet +class RWStepVisual_RWComplexTriangulatedSurfaceSet +{ + +public: + + DEFINE_STANDARD_ALLOC + + Standard_EXPORT RWStepVisual_RWComplexTriangulatedSurfaceSet(); + + Standard_EXPORT void ReadStep(const Handle(StepData_StepReaderData)& theData, + const Standard_Integer theNum, + Handle(Interface_Check)& theCheck, + const Handle(StepVisual_ComplexTriangulatedSurfaceSet)& theEnt) const; + + Standard_EXPORT void WriteStep(StepData_StepWriter& theSW, + const Handle(StepVisual_ComplexTriangulatedSurfaceSet)& theEnt) const; + + Standard_EXPORT void Share(const Handle(StepVisual_ComplexTriangulatedSurfaceSet)& theEnt, + Interface_EntityIterator& theIter) const; + +}; + +#endif // _RWStepVisual_RWComplexTriangulatedSurfaceSet_HeaderFile_ diff --git a/src/RWStepVisual/RWStepVisual_RWCubicBezierTessellatedEdge.cxx b/src/RWStepVisual/RWStepVisual_RWCubicBezierTessellatedEdge.cxx new file mode 100644 index 0000000000..b7a18ac584 --- /dev/null +++ b/src/RWStepVisual/RWStepVisual_RWCubicBezierTessellatedEdge.cxx @@ -0,0 +1,151 @@ +// Created on : Thu Mar 24 18:30:11 2022 +// Created by: snn +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V2.0 +// Copyright (c) Open CASCADE 2022 +// +// This file is part of Open CASCADE Technology software library. +// +// This library is free software; you can redistribute it and/or modify it under +// the terms of the GNU Lesser General Public License version 2.1 as published +// by the Free Software Foundation, with special exception defined in the file +// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT +// distribution for complete text of the license and disclaimer of any warranty. +// +// Alternatively, this file may be used under the terms of Open CASCADE +// commercial license or contractual agreement. + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +//======================================================================= +//function : RWStepVisual_RWCubicBezierTessellatedEdge +//purpose : +//======================================================================= + +RWStepVisual_RWCubicBezierTessellatedEdge::RWStepVisual_RWCubicBezierTessellatedEdge() {} + + +//======================================================================= +//function : ReadStep +//purpose : +//======================================================================= + +void RWStepVisual_RWCubicBezierTessellatedEdge::ReadStep( + const Handle(StepData_StepReaderData)& theData, + const Standard_Integer theNum, + Handle(Interface_Check)& theCheck, + const Handle(StepVisual_CubicBezierTessellatedEdge)& theEnt) const +{ + // Check number of parameters + if (!theData->CheckNbParams(theNum, 4, theCheck, "cubic_bezier_tessellated_edge")) + { + return; + } + + // Inherited fields of RepresentationItem + + Handle(TCollection_HAsciiString) aRepresentationItem_Name; + theData->ReadString(theNum, 1, "representation_item.name", theCheck, aRepresentationItem_Name); + + // Inherited fields of TessellatedEdge + + Handle(StepVisual_CoordinatesList) aTessellatedEdge_Coordinates; + theData->ReadEntity(theNum, 2, "tessellated_edge.coordinates", theCheck, + STANDARD_TYPE(StepVisual_CoordinatesList), aTessellatedEdge_Coordinates); + + StepVisual_EdgeOrCurve aTessellatedEdge_GeometricLink; + Standard_Boolean hasTessellatedEdge_GeometricLink = Standard_True; + if (theData->IsParamDefined(theNum, 3)) + { + theData->ReadEntity(theNum, 3, "tessellated_edge.geometric_link", theCheck, aTessellatedEdge_GeometricLink); + } + else + { + hasTessellatedEdge_GeometricLink = Standard_False; + aTessellatedEdge_GeometricLink = StepVisual_EdgeOrCurve(); + } + + Handle(TColStd_HArray1OfInteger) aTessellatedEdge_LineStrip; + Standard_Integer sub4 = 0; + if (theData->ReadSubList(theNum, 4, "tessellated_edge.line_strip", theCheck, sub4)) + { + Standard_Integer nb0 = theData->NbParams(sub4); + aTessellatedEdge_LineStrip = new TColStd_HArray1OfInteger(1, nb0); + Standard_Integer num2 = sub4; + for (Standard_Integer i0 = 1; i0 <= nb0; i0++) + { + Standard_Integer anIt0; + theData->ReadInteger(num2, i0, "integer", theCheck, anIt0); + aTessellatedEdge_LineStrip->SetValue(i0, anIt0); + } + } + + // Initialize entity + theEnt->Init(aRepresentationItem_Name, aTessellatedEdge_Coordinates, hasTessellatedEdge_GeometricLink, aTessellatedEdge_GeometricLink, aTessellatedEdge_LineStrip); +} + +//======================================================================= +//function : WriteStep +//purpose : +//======================================================================= + +void RWStepVisual_RWCubicBezierTessellatedEdge::WriteStep( + StepData_StepWriter& theSW, + const Handle(StepVisual_CubicBezierTessellatedEdge)& theEnt) const +{ + + // Own fields of RepresentationItem + + theSW.Send(theEnt->Name()); + + // Own fields of TessellatedEdge + + theSW.Send(theEnt->Coordinates()); + + if (theEnt->HasGeometricLink()) + { + theSW.Send(theEnt->GeometricLink().Value()); + } + else + { + theSW.SendUndef(); + } + + theSW.OpenSub(); + for (Standard_Integer i3 = 1; i3 <= theEnt->LineStrip()->Length(); i3++) + { + Standard_Integer Var0 = theEnt->LineStrip()->Value(i3); + theSW.Send(Var0); + } + theSW.CloseSub(); +} + +//======================================================================= +//function : Share +//purpose : +//======================================================================= + +void RWStepVisual_RWCubicBezierTessellatedEdge::Share( + const Handle(StepVisual_CubicBezierTessellatedEdge)&theEnt, +Interface_EntityIterator& theIter) const +{ + + // Inherited fields of RepresentationItem + + // Inherited fields of TessellatedEdge + + theIter.AddItem(theEnt->StepVisual_TessellatedEdge::Coordinates()); + + if (theEnt->StepVisual_TessellatedEdge::HasGeometricLink()) + { + theIter.AddItem(theEnt->StepVisual_TessellatedEdge::GeometricLink().Value()); + } +} diff --git a/src/RWStepVisual/RWStepVisual_RWCubicBezierTessellatedEdge.hxx b/src/RWStepVisual/RWStepVisual_RWCubicBezierTessellatedEdge.hxx new file mode 100644 index 0000000000..20d41bd22d --- /dev/null +++ b/src/RWStepVisual/RWStepVisual_RWCubicBezierTessellatedEdge.hxx @@ -0,0 +1,53 @@ +// Created on : Thu Mar 24 18:30:11 2022 +// Created by: snn +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V2.0 +// Copyright (c) Open CASCADE 2022 +// +// 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 _RWStepVisual_RWCubicBezierTessellatedEdge_HeaderFile_ +#define _RWStepVisual_RWCubicBezierTessellatedEdge_HeaderFile_ + +#include +#include +#include + +class StepData_StepReaderData; +class Interface_Check; +class StepData_StepWriter; +class Interface_EntityIterator; +class StepVisual_CubicBezierTessellatedEdge; + +//! Read & Write tool for CubicBezierTessellatedEdge +class RWStepVisual_RWCubicBezierTessellatedEdge +{ + +public: + + DEFINE_STANDARD_ALLOC + + Standard_EXPORT RWStepVisual_RWCubicBezierTessellatedEdge(); + + Standard_EXPORT void ReadStep(const Handle(StepData_StepReaderData)& theData, + const Standard_Integer theNum, + Handle(Interface_Check)& theCheck, + const Handle(StepVisual_CubicBezierTessellatedEdge)& theEnt) const; + + Standard_EXPORT void WriteStep(StepData_StepWriter& theSW, + const Handle(StepVisual_CubicBezierTessellatedEdge)& theEnt) const; + + Standard_EXPORT void Share(const Handle(StepVisual_CubicBezierTessellatedEdge)& theEnt, + Interface_EntityIterator& theIter) const; + +}; + +#endif // _RWStepVisual_RWCubicBezierTessellatedEdge_HeaderFile_ diff --git a/src/RWStepVisual/RWStepVisual_RWCubicBezierTriangulatedFace.cxx b/src/RWStepVisual/RWStepVisual_RWCubicBezierTriangulatedFace.cxx new file mode 100644 index 0000000000..4cd7be5f92 --- /dev/null +++ b/src/RWStepVisual/RWStepVisual_RWCubicBezierTriangulatedFace.cxx @@ -0,0 +1,215 @@ +// Created on : Thu Mar 24 18:30:11 2022 +// Created by: snn +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V2.0 +// Copyright (c) Open CASCADE 2022 +// +// This file is part of Open CASCADE Technology software library. +// +// This library is free software; you can redistribute it and/or modify it under +// the terms of the GNU Lesser General Public License version 2.1 as published +// by the Free Software Foundation, with special exception defined in the file +// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT +// distribution for complete text of the license and disclaimer of any warranty. +// +// Alternatively, this file may be used under the terms of Open CASCADE +// commercial license or contractual agreement. + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +//======================================================================= +//function : RWStepVisual_RWCubicBezierTriangulatedFace +//purpose : +//======================================================================= + +RWStepVisual_RWCubicBezierTriangulatedFace::RWStepVisual_RWCubicBezierTriangulatedFace() {} + + +//======================================================================= +//function : ReadStep +//purpose : +//======================================================================= + +void RWStepVisual_RWCubicBezierTriangulatedFace::ReadStep( + const Handle(StepData_StepReaderData)& theData, + const Standard_Integer theNum, + Handle(Interface_Check)& theCheck, + const Handle(StepVisual_CubicBezierTriangulatedFace)& theEnt) const +{ + // Check number of parameters + if (!theData->CheckNbParams(theNum, 6, theCheck, "cubic_bezier_triangulated_face")) + { + return; + } + + // Inherited fields of RepresentationItem + + Handle(TCollection_HAsciiString) aRepresentationItem_Name; + theData->ReadString(theNum, 1, "representation_item.name", theCheck, aRepresentationItem_Name); + + // Inherited fields of TessellatedFace + + Handle(StepVisual_CoordinatesList) aTessellatedFace_Coordinates; + theData->ReadEntity(theNum, 2, "tessellated_face.coordinates", theCheck, + STANDARD_TYPE(StepVisual_CoordinatesList), aTessellatedFace_Coordinates); + + Standard_Integer aTessellatedFace_Pnmax; + theData->ReadInteger(theNum, 3, "tessellated_face.pnmax", theCheck, aTessellatedFace_Pnmax); + + Handle(TColStd_HArray2OfReal) aTessellatedFace_Normals; + Standard_Integer sub4 = 0; + if (theData->ReadSubList(theNum, 4, "tessellated_face.normals", theCheck, sub4)) + { + Standard_Integer nb0 = theData->NbParams(sub4); + Standard_Integer nbj0 = theData->NbParams(theData->ParamNumber(sub4,1)); + aTessellatedFace_Normals = new TColStd_HArray2OfReal(1, nb0, 1, nbj0); + for (Standard_Integer i0 = 1; i0 <= nb0; i0++) + { + Standard_Integer subj4 = 0; + if ( theData->ReadSubList (sub4, i0, "sub-part(tessellated_face.normals)", theCheck, subj4) ) { + Standard_Integer num4 = subj4; + for (Standard_Integer j0 = 1; j0 <= nbj0; j0++) + { + Standard_Real anIt0; + theData->ReadReal(num4, j0, "real", theCheck, anIt0); + aTessellatedFace_Normals->SetValue(i0,j0, anIt0); + } + } + } + } + + StepVisual_FaceOrSurface aTessellatedFace_GeometricLink; + Standard_Boolean hasTessellatedFace_GeometricLink = Standard_True; + if (theData->IsParamDefined(theNum, 5)) + { + theData->ReadEntity(theNum, 5, "tessellated_face.geometric_link", theCheck, aTessellatedFace_GeometricLink); + } + else + { + hasTessellatedFace_GeometricLink = Standard_False; + aTessellatedFace_GeometricLink = StepVisual_FaceOrSurface(); + } + + // Own fields of CubicBezierTriangulatedFace + + Handle(TColStd_HArray2OfInteger) aCtriangles; + Standard_Integer sub6 = 0; + if (theData->ReadSubList(theNum, 6, "ctriangles", theCheck, sub6)) + { + Standard_Integer nb0 = theData->NbParams(sub6); + Standard_Integer nbj0 = theData->NbParams(theData->ParamNumber(sub6,1)); + aCtriangles = new TColStd_HArray2OfInteger(1, nb0, 1, nbj0); + for (Standard_Integer i0 = 1; i0 <= nb0; i0++) + { + Standard_Integer subj6 = 0; + if ( theData->ReadSubList (sub6, i0, "sub-part(ctriangles)", theCheck, subj6) ) { + Standard_Integer num4 = subj6; + for (Standard_Integer j0 = 1; j0 <= nbj0; j0++) + { + Standard_Integer anIt0; + theData->ReadInteger(num4, j0, "integer", theCheck, anIt0); + aCtriangles->SetValue(i0,j0, anIt0); + } + } + } + } + + // Initialize entity + theEnt->Init(aRepresentationItem_Name, aTessellatedFace_Coordinates, aTessellatedFace_Pnmax, aTessellatedFace_Normals, hasTessellatedFace_GeometricLink, aTessellatedFace_GeometricLink, aCtriangles); +} + +//======================================================================= +//function : WriteStep +//purpose : +//======================================================================= + +void RWStepVisual_RWCubicBezierTriangulatedFace::WriteStep( + StepData_StepWriter& theSW, + const Handle(StepVisual_CubicBezierTriangulatedFace)& theEnt) const +{ + + // Own fields of RepresentationItem + + theSW.Send(theEnt->Name()); + + // Own fields of TessellatedFace + + theSW.Send(theEnt->Coordinates()); + + theSW.Send(theEnt->Pnmax()); + + theSW.OpenSub(); + for (Standard_Integer i3 = 1; i3 <= theEnt->Normals()->RowLength(); i3++) + { + theSW.NewLine(Standard_False); + theSW.OpenSub(); + for (Standard_Integer j3 = 1; j3 <= theEnt->Normals()->ColLength(); j3++) + { + Standard_Real Var0 = theEnt->Normals()->Value(i3,j3); + theSW.Send(Var0); + } + theSW.CloseSub(); + } + theSW.CloseSub(); + + if (theEnt->HasGeometricLink()) + { + theSW.Send(theEnt->GeometricLink().Value()); + } + else + { + theSW.SendUndef(); + } + + // Own fields of CubicBezierTriangulatedFace + + theSW.OpenSub(); + for (Standard_Integer i5 = 1; i5 <= theEnt->Ctriangles()->RowLength(); i5++) + { + theSW.NewLine(Standard_False); + theSW.OpenSub(); + for (Standard_Integer j5 = 1; j5 <= theEnt->Ctriangles()->ColLength(); j5++) + { + Standard_Integer Var0 = theEnt->Ctriangles()->Value(i5,j5); + theSW.Send(Var0); + } + theSW.CloseSub(); + } + theSW.CloseSub(); +} + +//======================================================================= +//function : Share +//purpose : +//======================================================================= + +void RWStepVisual_RWCubicBezierTriangulatedFace::Share( + const Handle(StepVisual_CubicBezierTriangulatedFace)&theEnt, +Interface_EntityIterator& theIter) const +{ + + // Inherited fields of RepresentationItem + + // Inherited fields of TessellatedFace + + theIter.AddItem(theEnt->StepVisual_TessellatedFace::Coordinates()); + + if (theEnt->StepVisual_TessellatedFace::HasGeometricLink()) + { + theIter.AddItem(theEnt->StepVisual_TessellatedFace::GeometricLink().Value()); + } + + // Own fields of CubicBezierTriangulatedFace +} diff --git a/src/RWStepVisual/RWStepVisual_RWCubicBezierTriangulatedFace.hxx b/src/RWStepVisual/RWStepVisual_RWCubicBezierTriangulatedFace.hxx new file mode 100644 index 0000000000..8825c1c905 --- /dev/null +++ b/src/RWStepVisual/RWStepVisual_RWCubicBezierTriangulatedFace.hxx @@ -0,0 +1,53 @@ +// Created on : Thu Mar 24 18:30:11 2022 +// Created by: snn +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V2.0 +// Copyright (c) Open CASCADE 2022 +// +// 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 _RWStepVisual_RWCubicBezierTriangulatedFace_HeaderFile_ +#define _RWStepVisual_RWCubicBezierTriangulatedFace_HeaderFile_ + +#include +#include +#include + +class StepData_StepReaderData; +class Interface_Check; +class StepData_StepWriter; +class Interface_EntityIterator; +class StepVisual_CubicBezierTriangulatedFace; + +//! Read & Write tool for CubicBezierTriangulatedFace +class RWStepVisual_RWCubicBezierTriangulatedFace +{ + +public: + + DEFINE_STANDARD_ALLOC + + Standard_EXPORT RWStepVisual_RWCubicBezierTriangulatedFace(); + + Standard_EXPORT void ReadStep(const Handle(StepData_StepReaderData)& theData, + const Standard_Integer theNum, + Handle(Interface_Check)& theCheck, + const Handle(StepVisual_CubicBezierTriangulatedFace)& theEnt) const; + + Standard_EXPORT void WriteStep(StepData_StepWriter& theSW, + const Handle(StepVisual_CubicBezierTriangulatedFace)& theEnt) const; + + Standard_EXPORT void Share(const Handle(StepVisual_CubicBezierTriangulatedFace)& theEnt, + Interface_EntityIterator& theIter) const; + +}; + +#endif // _RWStepVisual_RWCubicBezierTriangulatedFace_HeaderFile_ diff --git a/src/RWStepVisual/RWStepVisual_RWTessellatedConnectingEdge.cxx b/src/RWStepVisual/RWStepVisual_RWTessellatedConnectingEdge.cxx new file mode 100644 index 0000000000..ccf65f3995 --- /dev/null +++ b/src/RWStepVisual/RWStepVisual_RWTessellatedConnectingEdge.cxx @@ -0,0 +1,226 @@ +// Created on : Thu Mar 24 18:30:12 2022 +// Created by: snn +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V2.0 +// Copyright (c) Open CASCADE 2022 +// +// This file is part of Open CASCADE Technology software library. +// +// This library is free software; you can redistribute it and/or modify it under +// the terms of the GNU Lesser General Public License version 2.1 as published +// by the Free Software Foundation, with special exception defined in the file +// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT +// distribution for complete text of the license and disclaimer of any warranty. +// +// Alternatively, this file may be used under the terms of Open CASCADE +// commercial license or contractual agreement. + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +//======================================================================= +//function : RWStepVisual_RWTessellatedConnectingEdge +//purpose : +//======================================================================= + +RWStepVisual_RWTessellatedConnectingEdge::RWStepVisual_RWTessellatedConnectingEdge() {} + + +//======================================================================= +//function : ReadStep +//purpose : +//======================================================================= + +void RWStepVisual_RWTessellatedConnectingEdge::ReadStep( + const Handle(StepData_StepReaderData)& theData, + const Standard_Integer theNum, + Handle(Interface_Check)& theCheck, + const Handle(StepVisual_TessellatedConnectingEdge)& theEnt) const +{ + // Check number of parameters + if (!theData->CheckNbParams(theNum, 9, theCheck, "tessellated_connecting_edge")) + { + return; + } + + // Inherited fields of RepresentationItem + + Handle(TCollection_HAsciiString) aRepresentationItem_Name; + theData->ReadString(theNum, 1, "representation_item.name", theCheck, aRepresentationItem_Name); + + // Inherited fields of TessellatedEdge + + Handle(StepVisual_CoordinatesList) aTessellatedEdge_Coordinates; + theData->ReadEntity(theNum, 2, "tessellated_edge.coordinates", theCheck, + STANDARD_TYPE(StepVisual_CoordinatesList), aTessellatedEdge_Coordinates); + + StepVisual_EdgeOrCurve aTessellatedEdge_GeometricLink; + Standard_Boolean hasTessellatedEdge_GeometricLink = Standard_True; + if (theData->IsParamDefined(theNum, 3)) + { + theData->ReadEntity(theNum, 3, "tessellated_edge.geometric_link", theCheck, aTessellatedEdge_GeometricLink); + } + else + { + hasTessellatedEdge_GeometricLink = Standard_False; + aTessellatedEdge_GeometricLink = StepVisual_EdgeOrCurve(); + } + + Handle(TColStd_HArray1OfInteger) aTessellatedEdge_LineStrip; + Standard_Integer sub4 = 0; + if (theData->ReadSubList(theNum, 4, "tessellated_edge.line_strip", theCheck, sub4)) + { + Standard_Integer nb0 = theData->NbParams(sub4); + aTessellatedEdge_LineStrip = new TColStd_HArray1OfInteger(1, nb0); + Standard_Integer num2 = sub4; + for (Standard_Integer i0 = 1; i0 <= nb0; i0++) + { + Standard_Integer anIt0; + theData->ReadInteger(num2, i0, "integer", theCheck, anIt0); + aTessellatedEdge_LineStrip->SetValue(i0, anIt0); + } + } + + // Own fields of TessellatedConnectingEdge + + StepData_Logical aSmooth; + theData->ReadLogical(theNum, 5, "smooth", theCheck, aSmooth); + + Handle(StepVisual_TessellatedFace) aFace1; + theData->ReadEntity(theNum, 6, "face1", theCheck, + STANDARD_TYPE(StepVisual_TessellatedFace), aFace1); + + Handle(StepVisual_TessellatedFace) aFace2; + theData->ReadEntity(theNum, 7, "face2", theCheck, + STANDARD_TYPE(StepVisual_TessellatedFace), aFace2); + + Handle(TColStd_HArray1OfInteger) aLineStripFace1; + Standard_Integer sub8 = 0; + if (theData->ReadSubList(theNum, 8, "line_strip_face1", theCheck, sub8)) + { + Standard_Integer nb0 = theData->NbParams(sub8); + aLineStripFace1 = new TColStd_HArray1OfInteger(1, nb0); + Standard_Integer num2 = sub8; + for (Standard_Integer i0 = 1; i0 <= nb0; i0++) + { + Standard_Integer anIt0; + theData->ReadInteger(num2, i0, "integer", theCheck, anIt0); + aLineStripFace1->SetValue(i0, anIt0); + } + } + + Handle(TColStd_HArray1OfInteger) aLineStripFace2; + Standard_Integer sub9 = 0; + if (theData->ReadSubList(theNum, 9, "line_strip_face2", theCheck, sub9)) + { + Standard_Integer nb0 = theData->NbParams(sub9); + aLineStripFace2 = new TColStd_HArray1OfInteger(1, nb0); + Standard_Integer num2 = sub9; + for (Standard_Integer i0 = 1; i0 <= nb0; i0++) + { + Standard_Integer anIt0; + theData->ReadInteger(num2, i0, "integer", theCheck, anIt0); + aLineStripFace2->SetValue(i0, anIt0); + } + } + + // Initialize entity + theEnt->Init(aRepresentationItem_Name, aTessellatedEdge_Coordinates, hasTessellatedEdge_GeometricLink, aTessellatedEdge_GeometricLink, aTessellatedEdge_LineStrip, aSmooth, aFace1, aFace2, aLineStripFace1, aLineStripFace2); +} + +//======================================================================= +//function : WriteStep +//purpose : +//======================================================================= + +void RWStepVisual_RWTessellatedConnectingEdge::WriteStep( + StepData_StepWriter& theSW, + const Handle(StepVisual_TessellatedConnectingEdge)& theEnt) const +{ + + // Own fields of RepresentationItem + + theSW.Send(theEnt->Name()); + + // Own fields of TessellatedEdge + + theSW.Send(theEnt->Coordinates()); + + if (theEnt->HasGeometricLink()) + { + theSW.Send(theEnt->GeometricLink().Value()); + } + else + { + theSW.SendUndef(); + } + + theSW.OpenSub(); + for (Standard_Integer i3 = 1; i3 <= theEnt->LineStrip()->Length(); i3++) + { + Standard_Integer Var0 = theEnt->LineStrip()->Value(i3); + theSW.Send(Var0); + } + theSW.CloseSub(); + + // Own fields of TessellatedConnectingEdge + + theSW.SendLogical(theEnt->Smooth()); + + theSW.Send(theEnt->Face1()); + + theSW.Send(theEnt->Face2()); + + theSW.OpenSub(); + for (Standard_Integer i7 = 1; i7 <= theEnt->LineStripFace1()->Length(); i7++) + { + Standard_Integer Var0 = theEnt->LineStripFace1()->Value(i7); + theSW.Send(Var0); + } + theSW.CloseSub(); + + theSW.OpenSub(); + for (Standard_Integer i8 = 1; i8 <= theEnt->LineStripFace2()->Length(); i8++) + { + Standard_Integer Var0 = theEnt->LineStripFace2()->Value(i8); + theSW.Send(Var0); + } + theSW.CloseSub(); +} + +//======================================================================= +//function : Share +//purpose : +//======================================================================= + +void RWStepVisual_RWTessellatedConnectingEdge::Share( + const Handle(StepVisual_TessellatedConnectingEdge)&theEnt, +Interface_EntityIterator& theIter) const +{ + + // Inherited fields of RepresentationItem + + // Inherited fields of TessellatedEdge + + theIter.AddItem(theEnt->StepVisual_TessellatedEdge::Coordinates()); + + if (theEnt->StepVisual_TessellatedEdge::HasGeometricLink()) + { + theIter.AddItem(theEnt->StepVisual_TessellatedEdge::GeometricLink().Value()); + } + + // Own fields of TessellatedConnectingEdge + + theIter.AddItem(theEnt->Face1()); + + theIter.AddItem(theEnt->Face2()); +} diff --git a/src/RWStepVisual/RWStepVisual_RWTessellatedConnectingEdge.hxx b/src/RWStepVisual/RWStepVisual_RWTessellatedConnectingEdge.hxx new file mode 100644 index 0000000000..a1eb97f4c3 --- /dev/null +++ b/src/RWStepVisual/RWStepVisual_RWTessellatedConnectingEdge.hxx @@ -0,0 +1,53 @@ +// Created on : Thu Mar 24 18:30:12 2022 +// Created by: snn +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V2.0 +// Copyright (c) Open CASCADE 2022 +// +// 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 _RWStepVisual_RWTessellatedConnectingEdge_HeaderFile_ +#define _RWStepVisual_RWTessellatedConnectingEdge_HeaderFile_ + +#include +#include +#include + +class StepData_StepReaderData; +class Interface_Check; +class StepData_StepWriter; +class Interface_EntityIterator; +class StepVisual_TessellatedConnectingEdge; + +//! Read & Write tool for TessellatedConnectingEdge +class RWStepVisual_RWTessellatedConnectingEdge +{ + +public: + + DEFINE_STANDARD_ALLOC + + Standard_EXPORT RWStepVisual_RWTessellatedConnectingEdge(); + + Standard_EXPORT void ReadStep(const Handle(StepData_StepReaderData)& theData, + const Standard_Integer theNum, + Handle(Interface_Check)& theCheck, + const Handle(StepVisual_TessellatedConnectingEdge)& theEnt) const; + + Standard_EXPORT void WriteStep(StepData_StepWriter& theSW, + const Handle(StepVisual_TessellatedConnectingEdge)& theEnt) const; + + Standard_EXPORT void Share(const Handle(StepVisual_TessellatedConnectingEdge)& theEnt, + Interface_EntityIterator& theIter) const; + +}; + +#endif // _RWStepVisual_RWTessellatedConnectingEdge_HeaderFile_ diff --git a/src/RWStepVisual/RWStepVisual_RWTessellatedEdge.cxx b/src/RWStepVisual/RWStepVisual_RWTessellatedEdge.cxx new file mode 100644 index 0000000000..0723e7c997 --- /dev/null +++ b/src/RWStepVisual/RWStepVisual_RWTessellatedEdge.cxx @@ -0,0 +1,148 @@ +// Created on : Thu Mar 24 18:30:12 2022 +// Created by: snn +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V2.0 +// Copyright (c) Open CASCADE 2022 +// +// This file is part of Open CASCADE Technology software library. +// +// This library is free software; you can redistribute it and/or modify it under +// the terms of the GNU Lesser General Public License version 2.1 as published +// by the Free Software Foundation, with special exception defined in the file +// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT +// distribution for complete text of the license and disclaimer of any warranty. +// +// Alternatively, this file may be used under the terms of Open CASCADE +// commercial license or contractual agreement. + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +//======================================================================= +//function : RWStepVisual_RWTessellatedEdge +//purpose : +//======================================================================= + +RWStepVisual_RWTessellatedEdge::RWStepVisual_RWTessellatedEdge() {} + + +//======================================================================= +//function : ReadStep +//purpose : +//======================================================================= + +void RWStepVisual_RWTessellatedEdge::ReadStep (const Handle(StepData_StepReaderData)& theData, + const Standard_Integer theNum, + Handle(Interface_Check)& theCheck, + const Handle(StepVisual_TessellatedEdge)& theEnt) const +{ + // Check number of parameters + if (!theData->CheckNbParams(theNum, 4, theCheck, "tessellated_edge")) + { + return; + } + + // Inherited fields of RepresentationItem + + Handle(TCollection_HAsciiString) aRepresentationItem_Name; + theData->ReadString(theNum, 1, "representation_item.name", theCheck, aRepresentationItem_Name); + + // Own fields of TessellatedEdge + + Handle(StepVisual_CoordinatesList) aCoordinates; + theData->ReadEntity(theNum, 2, "coordinates", theCheck, + STANDARD_TYPE(StepVisual_CoordinatesList), aCoordinates); + + StepVisual_EdgeOrCurve aGeometricLink; + Standard_Boolean hasGeometricLink = Standard_True; + if (theData->IsParamDefined(theNum, 3)) + { + theData->ReadEntity(theNum, 3, "geometric_link", theCheck, aGeometricLink); + } + else + { + hasGeometricLink = Standard_False; + aGeometricLink = StepVisual_EdgeOrCurve(); + } + + Handle(TColStd_HArray1OfInteger) aLineStrip; + Standard_Integer sub4 = 0; + if (theData->ReadSubList(theNum, 4, "line_strip", theCheck, sub4)) + { + Standard_Integer nb0 = theData->NbParams(sub4); + aLineStrip = new TColStd_HArray1OfInteger(1, nb0); + Standard_Integer num2 = sub4; + for (Standard_Integer i0 = 1; i0 <= nb0; i0++) + { + Standard_Integer anIt0; + theData->ReadInteger(num2, i0, "integer", theCheck, anIt0); + aLineStrip->SetValue(i0, anIt0); + } + } + + // Initialize entity + theEnt->Init(aRepresentationItem_Name, aCoordinates, hasGeometricLink, aGeometricLink, aLineStrip); +} + +//======================================================================= +//function : WriteStep +//purpose : +//======================================================================= + +void RWStepVisual_RWTessellatedEdge::WriteStep (StepData_StepWriter& theSW, + const Handle(StepVisual_TessellatedEdge)& theEnt) const +{ + + // Own fields of RepresentationItem + + theSW.Send(theEnt->Name()); + + // Own fields of TessellatedEdge + + theSW.Send(theEnt->Coordinates()); + + if (theEnt->HasGeometricLink()) + { + theSW.Send(theEnt->GeometricLink().Value()); + } + else + { + theSW.SendUndef(); + } + + theSW.OpenSub(); + for (Standard_Integer i3 = 1; i3 <= theEnt->LineStrip()->Length(); i3++) + { + Standard_Integer Var0 = theEnt->LineStrip()->Value(i3); + theSW.Send(Var0); + } + theSW.CloseSub(); +} + +//======================================================================= +//function : Share +//purpose : +//======================================================================= + +void RWStepVisual_RWTessellatedEdge::Share (const Handle(StepVisual_TessellatedEdge)&theEnt, + Interface_EntityIterator& theIter) const +{ + + // Inherited fields of RepresentationItem + + // Own fields of TessellatedEdge + + theIter.AddItem(theEnt->Coordinates()); + + if (theEnt->HasGeometricLink()) + { + theIter.AddItem(theEnt->GeometricLink().Value()); + } +} diff --git a/src/RWStepVisual/RWStepVisual_RWTessellatedEdge.hxx b/src/RWStepVisual/RWStepVisual_RWTessellatedEdge.hxx new file mode 100644 index 0000000000..a88c46ab1d --- /dev/null +++ b/src/RWStepVisual/RWStepVisual_RWTessellatedEdge.hxx @@ -0,0 +1,53 @@ +// Created on : Thu Mar 24 18:30:12 2022 +// Created by: snn +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V2.0 +// Copyright (c) Open CASCADE 2022 +// +// 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 _RWStepVisual_RWTessellatedEdge_HeaderFile_ +#define _RWStepVisual_RWTessellatedEdge_HeaderFile_ + +#include +#include +#include + +class StepData_StepReaderData; +class Interface_Check; +class StepData_StepWriter; +class Interface_EntityIterator; +class StepVisual_TessellatedEdge; + +//! Read & Write tool for TessellatedEdge +class RWStepVisual_RWTessellatedEdge +{ + +public: + + DEFINE_STANDARD_ALLOC + + Standard_EXPORT RWStepVisual_RWTessellatedEdge(); + + Standard_EXPORT void ReadStep(const Handle(StepData_StepReaderData)& theData, + const Standard_Integer theNum, + Handle(Interface_Check)& theCheck, + const Handle(StepVisual_TessellatedEdge)& theEnt) const; + + Standard_EXPORT void WriteStep(StepData_StepWriter& theSW, + const Handle(StepVisual_TessellatedEdge)& theEnt) const; + + Standard_EXPORT void Share(const Handle(StepVisual_TessellatedEdge)& theEnt, + Interface_EntityIterator& theIter) const; + +}; + +#endif // _RWStepVisual_RWTessellatedEdge_HeaderFile_ diff --git a/src/RWStepVisual/RWStepVisual_RWTessellatedPointSet.cxx b/src/RWStepVisual/RWStepVisual_RWTessellatedPointSet.cxx new file mode 100644 index 0000000000..6070e25aac --- /dev/null +++ b/src/RWStepVisual/RWStepVisual_RWTessellatedPointSet.cxx @@ -0,0 +1,121 @@ +// Created on : Thu Mar 24 18:30:12 2022 +// Created by: snn +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V2.0 +// Copyright (c) Open CASCADE 2022 +// +// This file is part of Open CASCADE Technology software library. +// +// This library is free software; you can redistribute it and/or modify it under +// the terms of the GNU Lesser General Public License version 2.1 as published +// by the Free Software Foundation, with special exception defined in the file +// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT +// distribution for complete text of the license and disclaimer of any warranty. +// +// Alternatively, this file may be used under the terms of Open CASCADE +// commercial license or contractual agreement. + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +//======================================================================= +//function : RWStepVisual_RWTessellatedPointSet +//purpose : +//======================================================================= + +RWStepVisual_RWTessellatedPointSet::RWStepVisual_RWTessellatedPointSet() {} + + +//======================================================================= +//function : ReadStep +//purpose : +//======================================================================= + +void RWStepVisual_RWTessellatedPointSet::ReadStep (const Handle(StepData_StepReaderData)& theData, + const Standard_Integer theNum, + Handle(Interface_Check)& theCheck, + const Handle(StepVisual_TessellatedPointSet)& theEnt) const +{ + // Check number of parameters + if (!theData->CheckNbParams(theNum, 3, theCheck, "tessellated_point_set")) + { + return; + } + + // Inherited fields of RepresentationItem + + Handle(TCollection_HAsciiString) aRepresentationItem_Name; + theData->ReadString(theNum, 1, "representation_item.name", theCheck, aRepresentationItem_Name); + + // Own fields of TessellatedPointSet + + Handle(StepVisual_CoordinatesList) aCoordinates; + theData->ReadEntity(theNum, 2, "coordinates", theCheck, + STANDARD_TYPE(StepVisual_CoordinatesList), aCoordinates); + + Handle(TColStd_HArray1OfInteger) aPointList; + Standard_Integer sub3 = 0; + if (theData->ReadSubList(theNum, 3, "point_list", theCheck, sub3)) + { + Standard_Integer nb0 = theData->NbParams(sub3); + aPointList = new TColStd_HArray1OfInteger(1, nb0); + Standard_Integer num2 = sub3; + for (Standard_Integer i0 = 1; i0 <= nb0; i0++) + { + Standard_Integer anIt0; + theData->ReadInteger(num2, i0, "integer", theCheck, anIt0); + aPointList->SetValue(i0, anIt0); + } + } + + // Initialize entity + theEnt->Init(aRepresentationItem_Name, aCoordinates, aPointList); +} + +//======================================================================= +//function : WriteStep +//purpose : +//======================================================================= + +void RWStepVisual_RWTessellatedPointSet::WriteStep (StepData_StepWriter& theSW, + const Handle(StepVisual_TessellatedPointSet)& theEnt) const +{ + + // Own fields of RepresentationItem + + theSW.Send(theEnt->Name()); + + // Own fields of TessellatedPointSet + + theSW.Send(theEnt->Coordinates()); + + theSW.OpenSub(); + for (Standard_Integer i2 = 1; i2 <= theEnt->PointList()->Length(); i2++) + { + Standard_Integer Var0 = theEnt->PointList()->Value(i2); + theSW.Send(Var0); + } + theSW.CloseSub(); +} + +//======================================================================= +//function : Share +//purpose : +//======================================================================= + +void RWStepVisual_RWTessellatedPointSet::Share (const Handle(StepVisual_TessellatedPointSet)&theEnt, + Interface_EntityIterator& theIter) const +{ + + // Inherited fields of RepresentationItem + + // Own fields of TessellatedPointSet + + theIter.AddItem(theEnt->Coordinates()); +} diff --git a/src/RWStepVisual/RWStepVisual_RWTessellatedPointSet.hxx b/src/RWStepVisual/RWStepVisual_RWTessellatedPointSet.hxx new file mode 100644 index 0000000000..90b7c55cb1 --- /dev/null +++ b/src/RWStepVisual/RWStepVisual_RWTessellatedPointSet.hxx @@ -0,0 +1,53 @@ +// Created on : Thu Mar 24 18:30:12 2022 +// Created by: snn +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V2.0 +// Copyright (c) Open CASCADE 2022 +// +// 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 _RWStepVisual_RWTessellatedPointSet_HeaderFile_ +#define _RWStepVisual_RWTessellatedPointSet_HeaderFile_ + +#include +#include +#include + +class StepData_StepReaderData; +class Interface_Check; +class StepData_StepWriter; +class Interface_EntityIterator; +class StepVisual_TessellatedPointSet; + +//! Read & Write tool for TessellatedPointSet +class RWStepVisual_RWTessellatedPointSet +{ + +public: + + DEFINE_STANDARD_ALLOC + + Standard_EXPORT RWStepVisual_RWTessellatedPointSet(); + + Standard_EXPORT void ReadStep(const Handle(StepData_StepReaderData)& theData, + const Standard_Integer theNum, + Handle(Interface_Check)& theCheck, + const Handle(StepVisual_TessellatedPointSet)& theEnt) const; + + Standard_EXPORT void WriteStep(StepData_StepWriter& theSW, + const Handle(StepVisual_TessellatedPointSet)& theEnt) const; + + Standard_EXPORT void Share(const Handle(StepVisual_TessellatedPointSet)& theEnt, + Interface_EntityIterator& theIter) const; + +}; + +#endif // _RWStepVisual_RWTessellatedPointSet_HeaderFile_ diff --git a/src/RWStepVisual/RWStepVisual_RWTessellatedShapeRepresentation.cxx b/src/RWStepVisual/RWStepVisual_RWTessellatedShapeRepresentation.cxx new file mode 100644 index 0000000000..3bae89fde1 --- /dev/null +++ b/src/RWStepVisual/RWStepVisual_RWTessellatedShapeRepresentation.cxx @@ -0,0 +1,125 @@ +// Created on : Thu Mar 24 18:30:12 2022 +// Created by: snn +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V2.0 +// Copyright (c) Open CASCADE 2022 +// +// This file is part of Open CASCADE Technology software library. +// +// This library is free software; you can redistribute it and/or modify it under +// the terms of the GNU Lesser General Public License version 2.1 as published +// by the Free Software Foundation, with special exception defined in the file +// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT +// distribution for complete text of the license and disclaimer of any warranty. +// +// Alternatively, this file may be used under the terms of Open CASCADE +// commercial license or contractual agreement. + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +//======================================================================= +//function : RWStepVisual_RWTessellatedShapeRepresentation +//purpose : +//======================================================================= + +RWStepVisual_RWTessellatedShapeRepresentation::RWStepVisual_RWTessellatedShapeRepresentation() {} + + +//======================================================================= +//function : ReadStep +//purpose : +//======================================================================= + +void RWStepVisual_RWTessellatedShapeRepresentation::ReadStep( + const Handle(StepData_StepReaderData)& theData, + const Standard_Integer theNum, + Handle(Interface_Check)& theCheck, + const Handle(StepVisual_TessellatedShapeRepresentation)& theEnt) const +{ + // Check number of parameters + if (!theData->CheckNbParams(theNum, 3, theCheck, "tessellated_shape_representation")) + { + return; + } + + // Inherited fields of Representation + + Handle(TCollection_HAsciiString) aRepresentation_Name; + theData->ReadString(theNum, 1, "representation.name", theCheck, aRepresentation_Name); + + Handle(StepRepr_HArray1OfRepresentationItem) aRepresentation_Items; + Standard_Integer sub2 = 0; + if (theData->ReadSubList(theNum, 2, "representation.items", theCheck, sub2)) + { + Standard_Integer nb0 = theData->NbParams(sub2); + aRepresentation_Items = new StepRepr_HArray1OfRepresentationItem(1, nb0); + Standard_Integer num2 = sub2; + for (Standard_Integer i0 = 1; i0 <= nb0; i0++) + { + Handle(StepRepr_RepresentationItem) anIt0; + theData->ReadEntity(num2, i0, "representation_item", theCheck, + STANDARD_TYPE(StepRepr_RepresentationItem), anIt0); + aRepresentation_Items->SetValue(i0, anIt0); + } + } + + Handle(StepRepr_RepresentationContext) aRepresentation_ContextOfItems; + theData->ReadEntity(theNum, 3, "representation.context_of_items", theCheck, + STANDARD_TYPE(StepRepr_RepresentationContext), aRepresentation_ContextOfItems); + + // Initialize entity + theEnt->Init(aRepresentation_Name, aRepresentation_Items, aRepresentation_ContextOfItems); +} + +//======================================================================= +//function : WriteStep +//purpose : +//======================================================================= + +void RWStepVisual_RWTessellatedShapeRepresentation::WriteStep( + StepData_StepWriter& theSW, + const Handle(StepVisual_TessellatedShapeRepresentation)& theEnt) const +{ + + // Own fields of Representation + + theSW.Send(theEnt->Name()); + + theSW.OpenSub(); + for (Standard_Integer i1 = 1; i1 <= theEnt->Items()->Length(); i1++) + { + Handle(StepRepr_RepresentationItem) Var0 = theEnt->Items()->Value(i1); + theSW.Send(Var0); + } + theSW.CloseSub(); + + theSW.Send(theEnt->ContextOfItems()); +} + +//======================================================================= +//function : Share +//purpose : +//======================================================================= + +void RWStepVisual_RWTessellatedShapeRepresentation::Share( + const Handle(StepVisual_TessellatedShapeRepresentation)&theEnt, +Interface_EntityIterator& theIter) const +{ + + // Inherited fields of Representation + + for (Standard_Integer i1 = 1; i1 <= theEnt->StepRepr_Representation::Items()->Length(); i1++) + { + Handle(StepRepr_RepresentationItem) Var0 = theEnt->StepRepr_Representation::Items()->Value(i1); + theIter.AddItem(Var0); + } + + theIter.AddItem(theEnt->StepRepr_Representation::ContextOfItems()); +} diff --git a/src/RWStepVisual/RWStepVisual_RWTessellatedShapeRepresentation.hxx b/src/RWStepVisual/RWStepVisual_RWTessellatedShapeRepresentation.hxx new file mode 100644 index 0000000000..c80b2534c1 --- /dev/null +++ b/src/RWStepVisual/RWStepVisual_RWTessellatedShapeRepresentation.hxx @@ -0,0 +1,53 @@ +// Created on : Thu Mar 24 18:30:12 2022 +// Created by: snn +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V2.0 +// Copyright (c) Open CASCADE 2022 +// +// 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 _RWStepVisual_RWTessellatedShapeRepresentation_HeaderFile_ +#define _RWStepVisual_RWTessellatedShapeRepresentation_HeaderFile_ + +#include +#include +#include + +class StepData_StepReaderData; +class Interface_Check; +class StepData_StepWriter; +class Interface_EntityIterator; +class StepVisual_TessellatedShapeRepresentation; + +//! Read & Write tool for TessellatedShapeRepresentation +class RWStepVisual_RWTessellatedShapeRepresentation +{ + +public: + + DEFINE_STANDARD_ALLOC + + Standard_EXPORT RWStepVisual_RWTessellatedShapeRepresentation(); + + Standard_EXPORT void ReadStep(const Handle(StepData_StepReaderData)& theData, + const Standard_Integer theNum, + Handle(Interface_Check)& theCheck, + const Handle(StepVisual_TessellatedShapeRepresentation)& theEnt) const; + + Standard_EXPORT void WriteStep(StepData_StepWriter& theSW, + const Handle(StepVisual_TessellatedShapeRepresentation)& theEnt) const; + + Standard_EXPORT void Share(const Handle(StepVisual_TessellatedShapeRepresentation)& theEnt, + Interface_EntityIterator& theIter) const; + +}; + +#endif // _RWStepVisual_RWTessellatedShapeRepresentation_HeaderFile_ diff --git a/src/RWStepVisual/RWStepVisual_RWTessellatedShapeRepresentationWithAccuracyParameters.cxx b/src/RWStepVisual/RWStepVisual_RWTessellatedShapeRepresentationWithAccuracyParameters.cxx new file mode 100644 index 0000000000..e5f669c2e6 --- /dev/null +++ b/src/RWStepVisual/RWStepVisual_RWTessellatedShapeRepresentationWithAccuracyParameters.cxx @@ -0,0 +1,152 @@ +// Created on : Thu Mar 24 18:30:12 2022 +// Created by: snn +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V2.0 +// Copyright (c) Open CASCADE 2022 +// +// This file is part of Open CASCADE Technology software library. +// +// This library is free software; you can redistribute it and/or modify it under +// the terms of the GNU Lesser General Public License version 2.1 as published +// by the Free Software Foundation, with special exception defined in the file +// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT +// distribution for complete text of the license and disclaimer of any warranty. +// +// Alternatively, this file may be used under the terms of Open CASCADE +// commercial license or contractual agreement. + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +//======================================================================= +//function : RWStepVisual_RWTessellatedShapeRepresentationWithAccuracyParameters +//purpose : +//======================================================================= + +RWStepVisual_RWTessellatedShapeRepresentationWithAccuracyParameters::RWStepVisual_RWTessellatedShapeRepresentationWithAccuracyParameters() {} + + +//======================================================================= +//function : ReadStep +//purpose : +//======================================================================= + +void RWStepVisual_RWTessellatedShapeRepresentationWithAccuracyParameters::ReadStep( + const Handle(StepData_StepReaderData)& theData, + const Standard_Integer theNum, + Handle(Interface_Check)& theCheck, + const Handle(StepVisual_TessellatedShapeRepresentationWithAccuracyParameters)& theEnt) const +{ + // Check number of parameters + if (!theData->CheckNbParams(theNum, 4, theCheck, "tessellated_shape_representation_with_accuracy_parameters")) + { + return; + } + + // Inherited fields of Representation + + Handle(TCollection_HAsciiString) aRepresentation_Name; + theData->ReadString(theNum, 1, "representation.name", theCheck, aRepresentation_Name); + + Handle(StepRepr_HArray1OfRepresentationItem) aRepresentation_Items; + Standard_Integer sub2 = 0; + if (theData->ReadSubList(theNum, 2, "representation.items", theCheck, sub2)) + { + Standard_Integer nb0 = theData->NbParams(sub2); + aRepresentation_Items = new StepRepr_HArray1OfRepresentationItem(1, nb0); + Standard_Integer num2 = sub2; + for (Standard_Integer i0 = 1; i0 <= nb0; i0++) + { + Handle(StepRepr_RepresentationItem) anIt0; + theData->ReadEntity(num2, i0, "representation_item", theCheck, + STANDARD_TYPE(StepRepr_RepresentationItem), anIt0); + aRepresentation_Items->SetValue(i0, anIt0); + } + } + + Handle(StepRepr_RepresentationContext) aRepresentation_ContextOfItems; + theData->ReadEntity(theNum, 3, "representation.context_of_items", theCheck, + STANDARD_TYPE(StepRepr_RepresentationContext), aRepresentation_ContextOfItems); + + // Own fields of TessellatedShapeRepresentationWithAccuracyParameters + + Handle(TColStd_HArray1OfReal) aTessellationAccuracyParameters; + Standard_Integer sub4 = 0; + if (theData->ReadSubList(theNum, 4, "tessellation_accuracy_parameters", theCheck, sub4)) + { + Standard_Integer nb0 = theData->NbParams(sub4); + aTessellationAccuracyParameters = new TColStd_HArray1OfReal(1, nb0); + Standard_Integer num2 = sub4; + for (Standard_Integer i0 = 1; i0 <= nb0; i0++) + { + Standard_Real anIt0; + theData->ReadReal(num2, i0, "tessellation_accuracy_parameter_item", theCheck, anIt0); + aTessellationAccuracyParameters->SetValue(i0, anIt0); + } + } + + // Initialize entity + theEnt->Init(aRepresentation_Name, aRepresentation_Items, aRepresentation_ContextOfItems, aTessellationAccuracyParameters); +} + +//======================================================================= +//function : WriteStep +//purpose : +//======================================================================= + +void RWStepVisual_RWTessellatedShapeRepresentationWithAccuracyParameters::WriteStep( + StepData_StepWriter& theSW, + const Handle(StepVisual_TessellatedShapeRepresentationWithAccuracyParameters)& theEnt) const +{ + + // Own fields of Representation + + theSW.Send(theEnt->Name()); + + theSW.OpenSub(); + for (Standard_Integer i1 = 1; i1 <= theEnt->Items()->Length(); i1++) + { + Handle(StepRepr_RepresentationItem) Var0 = theEnt->Items()->Value(i1); + theSW.Send(Var0); + } + theSW.CloseSub(); + + theSW.Send(theEnt->ContextOfItems()); + + // Own fields of TessellatedShapeRepresentationWithAccuracyParameters + + theSW.OpenSub(); + for (Standard_Integer i3 = 1; i3 <= theEnt->TessellationAccuracyParameters()->Length(); i3++) + { + Standard_Real Var0 = theEnt->TessellationAccuracyParameters()->Value(i3); + theSW.Send(Var0); + } + theSW.CloseSub(); +} + +//======================================================================= +//function : Share +//purpose : +//======================================================================= + +void RWStepVisual_RWTessellatedShapeRepresentationWithAccuracyParameters::Share( + const Handle(StepVisual_TessellatedShapeRepresentationWithAccuracyParameters)&theEnt, +Interface_EntityIterator& theIter) const +{ + + // Inherited fields of Representation + + for (Standard_Integer i1 = 1; i1 <= theEnt->StepRepr_Representation::Items()->Length(); i1++) + { + Handle(StepRepr_RepresentationItem) Var0 = theEnt->StepRepr_Representation::Items()->Value(i1); + theIter.AddItem(Var0); + } + + theIter.AddItem(theEnt->StepRepr_Representation::ContextOfItems()); +} diff --git a/src/RWStepVisual/RWStepVisual_RWTessellatedShapeRepresentationWithAccuracyParameters.hxx b/src/RWStepVisual/RWStepVisual_RWTessellatedShapeRepresentationWithAccuracyParameters.hxx new file mode 100644 index 0000000000..4c6fef75d1 --- /dev/null +++ b/src/RWStepVisual/RWStepVisual_RWTessellatedShapeRepresentationWithAccuracyParameters.hxx @@ -0,0 +1,53 @@ +// Created on : Thu Mar 24 18:30:12 2022 +// Created by: snn +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V2.0 +// Copyright (c) Open CASCADE 2022 +// +// 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 _RWStepVisual_RWTessellatedShapeRepresentationWithAccuracyParameters_HeaderFile_ +#define _RWStepVisual_RWTessellatedShapeRepresentationWithAccuracyParameters_HeaderFile_ + +#include +#include +#include + +class StepData_StepReaderData; +class Interface_Check; +class StepData_StepWriter; +class Interface_EntityIterator; +class StepVisual_TessellatedShapeRepresentationWithAccuracyParameters; + +//! Read & Write tool for TessellatedShapeRepresentationWithAccuracyParameters +class RWStepVisual_RWTessellatedShapeRepresentationWithAccuracyParameters +{ + +public: + + DEFINE_STANDARD_ALLOC + + Standard_EXPORT RWStepVisual_RWTessellatedShapeRepresentationWithAccuracyParameters(); + + Standard_EXPORT void ReadStep(const Handle(StepData_StepReaderData)& theData, + const Standard_Integer theNum, + Handle(Interface_Check)& theCheck, + const Handle(StepVisual_TessellatedShapeRepresentationWithAccuracyParameters)& theEnt) const; + + Standard_EXPORT void WriteStep(StepData_StepWriter& theSW, + const Handle(StepVisual_TessellatedShapeRepresentationWithAccuracyParameters)& theEnt) const; + + Standard_EXPORT void Share(const Handle(StepVisual_TessellatedShapeRepresentationWithAccuracyParameters)& theEnt, + Interface_EntityIterator& theIter) const; + +}; + +#endif // _RWStepVisual_RWTessellatedShapeRepresentationWithAccuracyParameters_HeaderFile_ diff --git a/src/RWStepVisual/RWStepVisual_RWTessellatedShell.cxx b/src/RWStepVisual/RWStepVisual_RWTessellatedShell.cxx new file mode 100644 index 0000000000..e6f096101b --- /dev/null +++ b/src/RWStepVisual/RWStepVisual_RWTessellatedShell.cxx @@ -0,0 +1,147 @@ +// Created on : Thu Mar 24 18:30:12 2022 +// Created by: snn +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V2.0 +// Copyright (c) Open CASCADE 2022 +// +// This file is part of Open CASCADE Technology software library. +// +// This library is free software; you can redistribute it and/or modify it under +// the terms of the GNU Lesser General Public License version 2.1 as published +// by the Free Software Foundation, with special exception defined in the file +// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT +// distribution for complete text of the license and disclaimer of any warranty. +// +// Alternatively, this file may be used under the terms of Open CASCADE +// commercial license or contractual agreement. + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +//======================================================================= +//function : RWStepVisual_RWTessellatedShell +//purpose : +//======================================================================= + +RWStepVisual_RWTessellatedShell::RWStepVisual_RWTessellatedShell() {} + + +//======================================================================= +//function : ReadStep +//purpose : +//======================================================================= + +void RWStepVisual_RWTessellatedShell::ReadStep (const Handle(StepData_StepReaderData)& theData, + const Standard_Integer theNum, + Handle(Interface_Check)& theCheck, + const Handle(StepVisual_TessellatedShell)& theEnt) const +{ + // Check number of parameters + if (!theData->CheckNbParams(theNum, 3, theCheck, "tessellated_shell")) + { + return; + } + + // Inherited fields of RepresentationItem + + Handle(TCollection_HAsciiString) aRepresentationItem_Name; + theData->ReadString(theNum, 1, "representation_item.name", theCheck, aRepresentationItem_Name); + + // Own fields of TessellatedShell + + Handle(StepVisual_HArray1OfTessellatedStructuredItem) aItems; + Standard_Integer sub2 = 0; + if (theData->ReadSubList(theNum, 2, "items", theCheck, sub2)) + { + Standard_Integer nb0 = theData->NbParams(sub2); + aItems = new StepVisual_HArray1OfTessellatedStructuredItem(1, nb0); + Standard_Integer num2 = sub2; + for (Standard_Integer i0 = 1; i0 <= nb0; i0++) + { + Handle(StepVisual_TessellatedStructuredItem) anIt0; + theData->ReadEntity(num2, i0, "tessellated_structured_item", theCheck, + STANDARD_TYPE(StepVisual_TessellatedStructuredItem), anIt0); + aItems->SetValue(i0, anIt0); + } + } + + Handle(StepShape_ConnectedFaceSet) aTopologicalLink; + Standard_Boolean hasTopologicalLink = Standard_True; + if (theData->IsParamDefined(theNum, 3)) + { + theData->ReadEntity(theNum, 3, "topological_link", theCheck, + STANDARD_TYPE(StepShape_ConnectedFaceSet), aTopologicalLink); + } + else + { + hasTopologicalLink = Standard_False; + aTopologicalLink.Nullify(); + } + + // Initialize entity + theEnt->Init(aRepresentationItem_Name, aItems, hasTopologicalLink, aTopologicalLink); +} + +//======================================================================= +//function : WriteStep +//purpose : +//======================================================================= + +void RWStepVisual_RWTessellatedShell::WriteStep (StepData_StepWriter& theSW, + const Handle(StepVisual_TessellatedShell)& theEnt) const +{ + + // Own fields of RepresentationItem + + theSW.Send(theEnt->Name()); + + // Own fields of TessellatedShell + + theSW.OpenSub(); + for (Standard_Integer i1 = 1; i1 <= theEnt->Items()->Length(); i1++) + { + Handle(StepVisual_TessellatedStructuredItem) Var0 = theEnt->Items()->Value(i1); + theSW.Send(Var0); + } + theSW.CloseSub(); + + if (theEnt->HasTopologicalLink()) + { + theSW.Send(theEnt->TopologicalLink()); + } + else + { + theSW.SendUndef(); + } +} + +//======================================================================= +//function : Share +//purpose : +//======================================================================= + +void RWStepVisual_RWTessellatedShell::Share (const Handle(StepVisual_TessellatedShell)&theEnt, + Interface_EntityIterator& theIter) const +{ + + // Inherited fields of RepresentationItem + + // Own fields of TessellatedShell + + for (Standard_Integer i1 = 1; i1 <= theEnt->Items()->Length(); i1++) + { + Handle(StepVisual_TessellatedStructuredItem) Var0 = theEnt->Items()->Value(i1); + theIter.AddItem(Var0); + } + + if (theEnt->HasTopologicalLink()) + { + theIter.AddItem(theEnt->TopologicalLink()); + } +} diff --git a/src/RWStepVisual/RWStepVisual_RWTessellatedShell.hxx b/src/RWStepVisual/RWStepVisual_RWTessellatedShell.hxx new file mode 100644 index 0000000000..ddabbfb0b5 --- /dev/null +++ b/src/RWStepVisual/RWStepVisual_RWTessellatedShell.hxx @@ -0,0 +1,53 @@ +// Created on : Thu Mar 24 18:30:12 2022 +// Created by: snn +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V2.0 +// Copyright (c) Open CASCADE 2022 +// +// 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 _RWStepVisual_RWTessellatedShell_HeaderFile_ +#define _RWStepVisual_RWTessellatedShell_HeaderFile_ + +#include +#include +#include + +class StepData_StepReaderData; +class Interface_Check; +class StepData_StepWriter; +class Interface_EntityIterator; +class StepVisual_TessellatedShell; + +//! Read & Write tool for TessellatedShell +class RWStepVisual_RWTessellatedShell +{ + +public: + + DEFINE_STANDARD_ALLOC + + Standard_EXPORT RWStepVisual_RWTessellatedShell(); + + Standard_EXPORT void ReadStep(const Handle(StepData_StepReaderData)& theData, + const Standard_Integer theNum, + Handle(Interface_Check)& theCheck, + const Handle(StepVisual_TessellatedShell)& theEnt) const; + + Standard_EXPORT void WriteStep(StepData_StepWriter& theSW, + const Handle(StepVisual_TessellatedShell)& theEnt) const; + + Standard_EXPORT void Share(const Handle(StepVisual_TessellatedShell)& theEnt, + Interface_EntityIterator& theIter) const; + +}; + +#endif // _RWStepVisual_RWTessellatedShell_HeaderFile_ diff --git a/src/RWStepVisual/RWStepVisual_RWTessellatedSolid.cxx b/src/RWStepVisual/RWStepVisual_RWTessellatedSolid.cxx new file mode 100644 index 0000000000..883a81629c --- /dev/null +++ b/src/RWStepVisual/RWStepVisual_RWTessellatedSolid.cxx @@ -0,0 +1,147 @@ +// Created on : Thu Mar 24 18:30:12 2022 +// Created by: snn +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V2.0 +// Copyright (c) Open CASCADE 2022 +// +// This file is part of Open CASCADE Technology software library. +// +// This library is free software; you can redistribute it and/or modify it under +// the terms of the GNU Lesser General Public License version 2.1 as published +// by the Free Software Foundation, with special exception defined in the file +// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT +// distribution for complete text of the license and disclaimer of any warranty. +// +// Alternatively, this file may be used under the terms of Open CASCADE +// commercial license or contractual agreement. + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +//======================================================================= +//function : RWStepVisual_RWTessellatedSolid +//purpose : +//======================================================================= + +RWStepVisual_RWTessellatedSolid::RWStepVisual_RWTessellatedSolid() {} + + +//======================================================================= +//function : ReadStep +//purpose : +//======================================================================= + +void RWStepVisual_RWTessellatedSolid::ReadStep (const Handle(StepData_StepReaderData)& theData, + const Standard_Integer theNum, + Handle(Interface_Check)& theCheck, + const Handle(StepVisual_TessellatedSolid)& theEnt) const +{ + // Check number of parameters + if (!theData->CheckNbParams(theNum, 3, theCheck, "tessellated_solid")) + { + return; + } + + // Inherited fields of RepresentationItem + + Handle(TCollection_HAsciiString) aRepresentationItem_Name; + theData->ReadString(theNum, 1, "representation_item.name", theCheck, aRepresentationItem_Name); + + // Own fields of TessellatedSolid + + Handle(StepVisual_HArray1OfTessellatedStructuredItem) aItems; + Standard_Integer sub2 = 0; + if (theData->ReadSubList(theNum, 2, "items", theCheck, sub2)) + { + Standard_Integer nb0 = theData->NbParams(sub2); + aItems = new StepVisual_HArray1OfTessellatedStructuredItem(1, nb0); + Standard_Integer num2 = sub2; + for (Standard_Integer i0 = 1; i0 <= nb0; i0++) + { + Handle(StepVisual_TessellatedStructuredItem) anIt0; + theData->ReadEntity(num2, i0, "tessellated_structured_item", theCheck, + STANDARD_TYPE(StepVisual_TessellatedStructuredItem), anIt0); + aItems->SetValue(i0, anIt0); + } + } + + Handle(StepShape_ManifoldSolidBrep) aGeometricLink; + Standard_Boolean hasGeometricLink = Standard_True; + if (theData->IsParamDefined(theNum, 3)) + { + theData->ReadEntity(theNum, 3, "geometric_link", theCheck, + STANDARD_TYPE(StepShape_ManifoldSolidBrep), aGeometricLink); + } + else + { + hasGeometricLink = Standard_False; + aGeometricLink.Nullify(); + } + + // Initialize entity + theEnt->Init(aRepresentationItem_Name, aItems, hasGeometricLink, aGeometricLink); +} + +//======================================================================= +//function : WriteStep +//purpose : +//======================================================================= + +void RWStepVisual_RWTessellatedSolid::WriteStep (StepData_StepWriter& theSW, + const Handle(StepVisual_TessellatedSolid)& theEnt) const +{ + + // Own fields of RepresentationItem + + theSW.Send(theEnt->Name()); + + // Own fields of TessellatedSolid + + theSW.OpenSub(); + for (Standard_Integer i1 = 1; i1 <= theEnt->Items()->Length(); i1++) + { + Handle(StepVisual_TessellatedStructuredItem) Var0 = theEnt->Items()->Value(i1); + theSW.Send(Var0); + } + theSW.CloseSub(); + + if (theEnt->HasGeometricLink()) + { + theSW.Send(theEnt->GeometricLink()); + } + else + { + theSW.SendUndef(); + } +} + +//======================================================================= +//function : Share +//purpose : +//======================================================================= + +void RWStepVisual_RWTessellatedSolid::Share (const Handle(StepVisual_TessellatedSolid)&theEnt, + Interface_EntityIterator& theIter) const +{ + + // Inherited fields of RepresentationItem + + // Own fields of TessellatedSolid + + for (Standard_Integer i1 = 1; i1 <= theEnt->Items()->Length(); i1++) + { + Handle(StepVisual_TessellatedStructuredItem) Var0 = theEnt->Items()->Value(i1); + theIter.AddItem(Var0); + } + + if (theEnt->HasGeometricLink()) + { + theIter.AddItem(theEnt->GeometricLink()); + } +} diff --git a/src/RWStepVisual/RWStepVisual_RWTessellatedSolid.hxx b/src/RWStepVisual/RWStepVisual_RWTessellatedSolid.hxx new file mode 100644 index 0000000000..269cb0fc07 --- /dev/null +++ b/src/RWStepVisual/RWStepVisual_RWTessellatedSolid.hxx @@ -0,0 +1,53 @@ +// Created on : Thu Mar 24 18:30:12 2022 +// Created by: snn +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V2.0 +// Copyright (c) Open CASCADE 2022 +// +// 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 _RWStepVisual_RWTessellatedSolid_HeaderFile_ +#define _RWStepVisual_RWTessellatedSolid_HeaderFile_ + +#include +#include +#include + +class StepData_StepReaderData; +class Interface_Check; +class StepData_StepWriter; +class Interface_EntityIterator; +class StepVisual_TessellatedSolid; + +//! Read & Write tool for TessellatedSolid +class RWStepVisual_RWTessellatedSolid +{ + +public: + + DEFINE_STANDARD_ALLOC + + Standard_EXPORT RWStepVisual_RWTessellatedSolid(); + + Standard_EXPORT void ReadStep(const Handle(StepData_StepReaderData)& theData, + const Standard_Integer theNum, + Handle(Interface_Check)& theCheck, + const Handle(StepVisual_TessellatedSolid)& theEnt) const; + + Standard_EXPORT void WriteStep(StepData_StepWriter& theSW, + const Handle(StepVisual_TessellatedSolid)& theEnt) const; + + Standard_EXPORT void Share(const Handle(StepVisual_TessellatedSolid)& theEnt, + Interface_EntityIterator& theIter) const; + +}; + +#endif // _RWStepVisual_RWTessellatedSolid_HeaderFile_ diff --git a/src/RWStepVisual/RWStepVisual_RWTessellatedStructuredItem.cxx b/src/RWStepVisual/RWStepVisual_RWTessellatedStructuredItem.cxx new file mode 100644 index 0000000000..56292215db --- /dev/null +++ b/src/RWStepVisual/RWStepVisual_RWTessellatedStructuredItem.cxx @@ -0,0 +1,82 @@ +// Created on : Thu Mar 24 18:30:12 2022 +// Created by: snn +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V2.0 +// Copyright (c) Open CASCADE 2022 +// +// This file is part of Open CASCADE Technology software library. +// +// This library is free software; you can redistribute it and/or modify it under +// the terms of the GNU Lesser General Public License version 2.1 as published +// by the Free Software Foundation, with special exception defined in the file +// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT +// distribution for complete text of the license and disclaimer of any warranty. +// +// Alternatively, this file may be used under the terms of Open CASCADE +// commercial license or contractual agreement. + +#include +#include +#include +#include +#include +#include + +//======================================================================= +//function : RWStepVisual_RWTessellatedStructuredItem +//purpose : +//======================================================================= + +RWStepVisual_RWTessellatedStructuredItem::RWStepVisual_RWTessellatedStructuredItem() {} + + +//======================================================================= +//function : ReadStep +//purpose : +//======================================================================= + +void RWStepVisual_RWTessellatedStructuredItem::ReadStep( + const Handle(StepData_StepReaderData)& theData, + const Standard_Integer theNum, + Handle(Interface_Check)& theCheck, + const Handle(StepVisual_TessellatedStructuredItem)& theEnt) const +{ + // Check number of parameters + if (!theData->CheckNbParams(theNum, 1, theCheck, "tessellated_structured_item")) + { + return; + } + + // Inherited fields of RepresentationItem + + Handle(TCollection_HAsciiString) aRepresentationItem_Name; + theData->ReadString(theNum, 1, "representation_item.name", theCheck, aRepresentationItem_Name); + + // Initialize entity + theEnt->Init(aRepresentationItem_Name); +} + +//======================================================================= +//function : WriteStep +//purpose : +//======================================================================= + +void RWStepVisual_RWTessellatedStructuredItem::WriteStep( + StepData_StepWriter& theSW, + const Handle(StepVisual_TessellatedStructuredItem)& theEnt) const +{ + + // Own fields of RepresentationItem + + theSW.Send(theEnt->Name()); +} + +//======================================================================= +//function : Share +//purpose : +//======================================================================= + +void RWStepVisual_RWTessellatedStructuredItem::Share( + const Handle(StepVisual_TessellatedStructuredItem)&, +Interface_EntityIterator&) const +{ +} diff --git a/src/RWStepVisual/RWStepVisual_RWTessellatedStructuredItem.hxx b/src/RWStepVisual/RWStepVisual_RWTessellatedStructuredItem.hxx new file mode 100644 index 0000000000..ff235c8313 --- /dev/null +++ b/src/RWStepVisual/RWStepVisual_RWTessellatedStructuredItem.hxx @@ -0,0 +1,53 @@ +// Created on : Thu Mar 24 18:30:12 2022 +// Created by: snn +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V2.0 +// Copyright (c) Open CASCADE 2022 +// +// 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 _RWStepVisual_RWTessellatedStructuredItem_HeaderFile_ +#define _RWStepVisual_RWTessellatedStructuredItem_HeaderFile_ + +#include +#include +#include + +class StepData_StepReaderData; +class Interface_Check; +class StepData_StepWriter; +class Interface_EntityIterator; +class StepVisual_TessellatedStructuredItem; + +//! Read & Write tool for TessellatedStructuredItem +class RWStepVisual_RWTessellatedStructuredItem +{ + +public: + + DEFINE_STANDARD_ALLOC + + Standard_EXPORT RWStepVisual_RWTessellatedStructuredItem(); + + Standard_EXPORT void ReadStep(const Handle(StepData_StepReaderData)& theData, + const Standard_Integer theNum, + Handle(Interface_Check)& theCheck, + const Handle(StepVisual_TessellatedStructuredItem)& theEnt) const; + + Standard_EXPORT void WriteStep(StepData_StepWriter& theSW, + const Handle(StepVisual_TessellatedStructuredItem)& theEnt) const; + + Standard_EXPORT void Share(const Handle(StepVisual_TessellatedStructuredItem)& theEnt, + Interface_EntityIterator& theIter) const; + +}; + +#endif // _RWStepVisual_RWTessellatedStructuredItem_HeaderFile_ diff --git a/src/RWStepVisual/RWStepVisual_RWTessellatedVertex.cxx b/src/RWStepVisual/RWStepVisual_RWTessellatedVertex.cxx new file mode 100644 index 0000000000..6c651afd60 --- /dev/null +++ b/src/RWStepVisual/RWStepVisual_RWTessellatedVertex.cxx @@ -0,0 +1,130 @@ +// Created on : Thu Mar 24 18:30:12 2022 +// Created by: snn +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V2.0 +// Copyright (c) Open CASCADE 2022 +// +// This file is part of Open CASCADE Technology software library. +// +// This library is free software; you can redistribute it and/or modify it under +// the terms of the GNU Lesser General Public License version 2.1 as published +// by the Free Software Foundation, with special exception defined in the file +// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT +// distribution for complete text of the license and disclaimer of any warranty. +// +// Alternatively, this file may be used under the terms of Open CASCADE +// commercial license or contractual agreement. + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +//======================================================================= +//function : RWStepVisual_RWTessellatedVertex +//purpose : +//======================================================================= + +RWStepVisual_RWTessellatedVertex::RWStepVisual_RWTessellatedVertex() {} + + +//======================================================================= +//function : ReadStep +//purpose : +//======================================================================= + +void RWStepVisual_RWTessellatedVertex::ReadStep (const Handle(StepData_StepReaderData)& theData, + const Standard_Integer theNum, + Handle(Interface_Check)& theCheck, + const Handle(StepVisual_TessellatedVertex)& theEnt) const +{ + // Check number of parameters + if (!theData->CheckNbParams(theNum, 4, theCheck, "tessellated_vertex")) + { + return; + } + + // Inherited fields of RepresentationItem + + Handle(TCollection_HAsciiString) aRepresentationItem_Name; + theData->ReadString(theNum, 1, "representation_item.name", theCheck, aRepresentationItem_Name); + + // Own fields of TessellatedVertex + + Handle(StepVisual_CoordinatesList) aCoordinates; + theData->ReadEntity(theNum, 2, "coordinates", theCheck, + STANDARD_TYPE(StepVisual_CoordinatesList), aCoordinates); + + Handle(StepShape_VertexPoint) aTopologicalLink; + Standard_Boolean hasTopologicalLink = Standard_True; + if (theData->IsParamDefined(theNum, 3)) + { + theData->ReadEntity(theNum, 3, "topological_link", theCheck, + STANDARD_TYPE(StepShape_VertexPoint), aTopologicalLink); + } + else + { + hasTopologicalLink = Standard_False; + aTopologicalLink.Nullify(); + } + + Standard_Integer aPointIndex; + theData->ReadInteger(theNum, 4, "point_index", theCheck, aPointIndex); + + // Initialize entity + theEnt->Init(aRepresentationItem_Name, aCoordinates, hasTopologicalLink, aTopologicalLink, aPointIndex); +} + +//======================================================================= +//function : WriteStep +//purpose : +//======================================================================= + +void RWStepVisual_RWTessellatedVertex::WriteStep (StepData_StepWriter& theSW, + const Handle(StepVisual_TessellatedVertex)& theEnt) const +{ + + // Own fields of RepresentationItem + + theSW.Send(theEnt->Name()); + + // Own fields of TessellatedVertex + + theSW.Send(theEnt->Coordinates()); + + if (theEnt->HasTopologicalLink()) + { + theSW.Send(theEnt->TopologicalLink()); + } + else + { + theSW.SendUndef(); + } + + theSW.Send(theEnt->PointIndex()); +} + +//======================================================================= +//function : Share +//purpose : +//======================================================================= + +void RWStepVisual_RWTessellatedVertex::Share (const Handle(StepVisual_TessellatedVertex)&theEnt, + Interface_EntityIterator& theIter) const +{ + + // Inherited fields of RepresentationItem + + // Own fields of TessellatedVertex + + theIter.AddItem(theEnt->Coordinates()); + + if (theEnt->HasTopologicalLink()) + { + theIter.AddItem(theEnt->TopologicalLink()); + } +} diff --git a/src/RWStepVisual/RWStepVisual_RWTessellatedVertex.hxx b/src/RWStepVisual/RWStepVisual_RWTessellatedVertex.hxx new file mode 100644 index 0000000000..6ea6b5eff4 --- /dev/null +++ b/src/RWStepVisual/RWStepVisual_RWTessellatedVertex.hxx @@ -0,0 +1,53 @@ +// Created on : Thu Mar 24 18:30:12 2022 +// Created by: snn +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V2.0 +// Copyright (c) Open CASCADE 2022 +// +// 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 _RWStepVisual_RWTessellatedVertex_HeaderFile_ +#define _RWStepVisual_RWTessellatedVertex_HeaderFile_ + +#include +#include +#include + +class StepData_StepReaderData; +class Interface_Check; +class StepData_StepWriter; +class Interface_EntityIterator; +class StepVisual_TessellatedVertex; + +//! Read & Write tool for TessellatedVertex +class RWStepVisual_RWTessellatedVertex +{ + +public: + + DEFINE_STANDARD_ALLOC + + Standard_EXPORT RWStepVisual_RWTessellatedVertex(); + + Standard_EXPORT void ReadStep(const Handle(StepData_StepReaderData)& theData, + const Standard_Integer theNum, + Handle(Interface_Check)& theCheck, + const Handle(StepVisual_TessellatedVertex)& theEnt) const; + + Standard_EXPORT void WriteStep(StepData_StepWriter& theSW, + const Handle(StepVisual_TessellatedVertex)& theEnt) const; + + Standard_EXPORT void Share(const Handle(StepVisual_TessellatedVertex)& theEnt, + Interface_EntityIterator& theIter) const; + +}; + +#endif // _RWStepVisual_RWTessellatedVertex_HeaderFile_ diff --git a/src/RWStepVisual/RWStepVisual_RWTessellatedWire.cxx b/src/RWStepVisual/RWStepVisual_RWTessellatedWire.cxx new file mode 100644 index 0000000000..c37884f095 --- /dev/null +++ b/src/RWStepVisual/RWStepVisual_RWTessellatedWire.cxx @@ -0,0 +1,145 @@ +// Created on : Thu Mar 24 18:30:12 2022 +// Created by: snn +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V2.0 +// Copyright (c) Open CASCADE 2022 +// +// This file is part of Open CASCADE Technology software library. +// +// This library is free software; you can redistribute it and/or modify it under +// the terms of the GNU Lesser General Public License version 2.1 as published +// by the Free Software Foundation, with special exception defined in the file +// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT +// distribution for complete text of the license and disclaimer of any warranty. +// +// Alternatively, this file may be used under the terms of Open CASCADE +// commercial license or contractual agreement. + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +//======================================================================= +//function : RWStepVisual_RWTessellatedWire +//purpose : +//======================================================================= + +RWStepVisual_RWTessellatedWire::RWStepVisual_RWTessellatedWire() {} + + +//======================================================================= +//function : ReadStep +//purpose : +//======================================================================= + +void RWStepVisual_RWTessellatedWire::ReadStep (const Handle(StepData_StepReaderData)& theData, + const Standard_Integer theNum, + Handle(Interface_Check)& theCheck, + const Handle(StepVisual_TessellatedWire)& theEnt) const +{ + // Check number of parameters + if (!theData->CheckNbParams(theNum, 3, theCheck, "tessellated_wire")) + { + return; + } + + // Inherited fields of RepresentationItem + + Handle(TCollection_HAsciiString) aRepresentationItem_Name; + theData->ReadString(theNum, 1, "representation_item.name", theCheck, aRepresentationItem_Name); + + // Own fields of TessellatedWire + + Handle(StepVisual_HArray1OfTessellatedEdgeOrVertex) aItems; + Standard_Integer sub2 = 0; + if (theData->ReadSubList(theNum, 2, "items", theCheck, sub2)) + { + Standard_Integer nb0 = theData->NbParams(sub2); + aItems = new StepVisual_HArray1OfTessellatedEdgeOrVertex(1, nb0); + Standard_Integer num2 = sub2; + for (Standard_Integer i0 = 1; i0 <= nb0; i0++) + { + StepVisual_TessellatedEdgeOrVertex anIt0; + theData->ReadEntity(num2, i0, "tessellated_edge_or_vertex", theCheck, anIt0); + aItems->SetValue(i0, anIt0); + } + } + + StepVisual_PathOrCompositeCurve aGeometricModelLink; + Standard_Boolean hasGeometricModelLink = Standard_True; + if (theData->IsParamDefined(theNum, 3)) + { + theData->ReadEntity(theNum, 3, "geometric_model_link", theCheck, aGeometricModelLink); + } + else + { + hasGeometricModelLink = Standard_False; + aGeometricModelLink = StepVisual_PathOrCompositeCurve(); + } + + // Initialize entity + theEnt->Init(aRepresentationItem_Name, aItems, hasGeometricModelLink, aGeometricModelLink); +} + +//======================================================================= +//function : WriteStep +//purpose : +//======================================================================= + +void RWStepVisual_RWTessellatedWire::WriteStep (StepData_StepWriter& theSW, + const Handle(StepVisual_TessellatedWire)& theEnt) const +{ + + // Own fields of RepresentationItem + + theSW.Send(theEnt->Name()); + + // Own fields of TessellatedWire + + theSW.OpenSub(); + for (Standard_Integer i1 = 1; i1 <= theEnt->Items()->Length(); i1++) + { + StepVisual_TessellatedEdgeOrVertex Var0 = theEnt->Items()->Value(i1); + theSW.Send(Var0.Value()); + } + theSW.CloseSub(); + + if (theEnt->HasGeometricModelLink()) + { + theSW.Send(theEnt->GeometricModelLink().Value()); + } + else + { + theSW.SendUndef(); + } +} + +//======================================================================= +//function : Share +//purpose : +//======================================================================= + +void RWStepVisual_RWTessellatedWire::Share (const Handle(StepVisual_TessellatedWire)&theEnt, + Interface_EntityIterator& theIter) const +{ + + // Inherited fields of RepresentationItem + + // Own fields of TessellatedWire + + for (Standard_Integer i1 = 1; i1 <= theEnt->Items()->Length(); i1++) + { + StepVisual_TessellatedEdgeOrVertex Var0 = theEnt->Items()->Value(i1); + theIter.AddItem(Var0.Value()); + } + + if (theEnt->HasGeometricModelLink()) + { + theIter.AddItem(theEnt->GeometricModelLink().Value()); + } +} diff --git a/src/RWStepVisual/RWStepVisual_RWTessellatedWire.hxx b/src/RWStepVisual/RWStepVisual_RWTessellatedWire.hxx new file mode 100644 index 0000000000..e728a3f78c --- /dev/null +++ b/src/RWStepVisual/RWStepVisual_RWTessellatedWire.hxx @@ -0,0 +1,53 @@ +// Created on : Thu Mar 24 18:30:12 2022 +// Created by: snn +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V2.0 +// Copyright (c) Open CASCADE 2022 +// +// 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 _RWStepVisual_RWTessellatedWire_HeaderFile_ +#define _RWStepVisual_RWTessellatedWire_HeaderFile_ + +#include +#include +#include + +class StepData_StepReaderData; +class Interface_Check; +class StepData_StepWriter; +class Interface_EntityIterator; +class StepVisual_TessellatedWire; + +//! Read & Write tool for TessellatedWire +class RWStepVisual_RWTessellatedWire +{ + +public: + + DEFINE_STANDARD_ALLOC + + Standard_EXPORT RWStepVisual_RWTessellatedWire(); + + Standard_EXPORT void ReadStep(const Handle(StepData_StepReaderData)& theData, + const Standard_Integer theNum, + Handle(Interface_Check)& theCheck, + const Handle(StepVisual_TessellatedWire)& theEnt) const; + + Standard_EXPORT void WriteStep(StepData_StepWriter& theSW, + const Handle(StepVisual_TessellatedWire)& theEnt) const; + + Standard_EXPORT void Share(const Handle(StepVisual_TessellatedWire)& theEnt, + Interface_EntityIterator& theIter) const; + +}; + +#endif // _RWStepVisual_RWTessellatedWire_HeaderFile_ diff --git a/src/RWStepVisual/RWStepVisual_RWTriangulatedFace.cxx b/src/RWStepVisual/RWStepVisual_RWTriangulatedFace.cxx new file mode 100644 index 0000000000..c8acb6a064 --- /dev/null +++ b/src/RWStepVisual/RWStepVisual_RWTriangulatedFace.cxx @@ -0,0 +1,239 @@ +// Created on : Thu Mar 24 18:30:12 2022 +// Created by: snn +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V2.0 +// Copyright (c) Open CASCADE 2022 +// +// This file is part of Open CASCADE Technology software library. +// +// This library is free software; you can redistribute it and/or modify it under +// the terms of the GNU Lesser General Public License version 2.1 as published +// by the Free Software Foundation, with special exception defined in the file +// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT +// distribution for complete text of the license and disclaimer of any warranty. +// +// Alternatively, this file may be used under the terms of Open CASCADE +// commercial license or contractual agreement. + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +//======================================================================= +//function : RWStepVisual_RWTriangulatedFace +//purpose : +//======================================================================= + +RWStepVisual_RWTriangulatedFace::RWStepVisual_RWTriangulatedFace() {} + + +//======================================================================= +//function : ReadStep +//purpose : +//======================================================================= + +void RWStepVisual_RWTriangulatedFace::ReadStep (const Handle(StepData_StepReaderData)& theData, + const Standard_Integer theNum, + Handle(Interface_Check)& theCheck, + const Handle(StepVisual_TriangulatedFace)& theEnt) const +{ + // Check number of parameters + if (!theData->CheckNbParams(theNum, 7, theCheck, "triangulated_face")) + { + return; + } + + // Inherited fields of RepresentationItem + + Handle(TCollection_HAsciiString) aRepresentationItem_Name; + theData->ReadString(theNum, 1, "representation_item.name", theCheck, aRepresentationItem_Name); + + // Inherited fields of TessellatedFace + + Handle(StepVisual_CoordinatesList) aTessellatedFace_Coordinates; + theData->ReadEntity(theNum, 2, "tessellated_face.coordinates", theCheck, + STANDARD_TYPE(StepVisual_CoordinatesList), aTessellatedFace_Coordinates); + + Standard_Integer aTessellatedFace_Pnmax; + theData->ReadInteger(theNum, 3, "tessellated_face.pnmax", theCheck, aTessellatedFace_Pnmax); + + Handle(TColStd_HArray2OfReal) aTessellatedFace_Normals; + Standard_Integer sub4 = 0; + if (theData->ReadSubList(theNum, 4, "tessellated_face.normals", theCheck, sub4)) + { + Standard_Integer nb0 = theData->NbParams(sub4); + Standard_Integer nbj0 = theData->NbParams(theData->ParamNumber(sub4,1)); + aTessellatedFace_Normals = new TColStd_HArray2OfReal(1, nb0, 1, nbj0); + for (Standard_Integer i0 = 1; i0 <= nb0; i0++) + { + Standard_Integer subj4 = 0; + if ( theData->ReadSubList (sub4, i0, "sub-part(tessellated_face.normals)", theCheck, subj4) ) { + Standard_Integer num4 = subj4; + for (Standard_Integer j0 = 1; j0 <= nbj0; j0++) + { + Standard_Real anIt0; + theData->ReadReal(num4, j0, "real", theCheck, anIt0); + aTessellatedFace_Normals->SetValue(i0,j0, anIt0); + } + } + } + } + + StepVisual_FaceOrSurface aTessellatedFace_GeometricLink; + Standard_Boolean hasTessellatedFace_GeometricLink = Standard_True; + if (theData->IsParamDefined(theNum, 5)) + { + theData->ReadEntity(theNum, 5, "tessellated_face.geometric_link", theCheck, aTessellatedFace_GeometricLink); + } + else + { + hasTessellatedFace_GeometricLink = Standard_False; + aTessellatedFace_GeometricLink = StepVisual_FaceOrSurface(); + } + + // Own fields of TriangulatedFace + + Handle(TColStd_HArray1OfInteger) aPnindex; + Standard_Integer sub6 = 0; + if (theData->ReadSubList(theNum, 6, "pnindex", theCheck, sub6)) + { + Standard_Integer nb0 = theData->NbParams(sub6); + aPnindex = new TColStd_HArray1OfInteger(1, nb0); + Standard_Integer num2 = sub6; + for (Standard_Integer i0 = 1; i0 <= nb0; i0++) + { + Standard_Integer anIt0; + theData->ReadInteger(num2, i0, "integer", theCheck, anIt0); + aPnindex->SetValue(i0, anIt0); + } + } + + Handle(TColStd_HArray2OfInteger) aTriangles; + Standard_Integer sub7 = 0; + if (theData->ReadSubList(theNum, 7, "triangles", theCheck, sub7)) + { + Standard_Integer nb0 = theData->NbParams(sub7); + Standard_Integer nbj0 = theData->NbParams(theData->ParamNumber(sub7,1)); + aTriangles = new TColStd_HArray2OfInteger(1, nb0, 1, nbj0); + for (Standard_Integer i0 = 1; i0 <= nb0; i0++) + { + Standard_Integer subj7 = 0; + if ( theData->ReadSubList (sub7, i0, "sub-part(triangles)", theCheck, subj7) ) { + Standard_Integer num4 = subj7; + for (Standard_Integer j0 = 1; j0 <= nbj0; j0++) + { + Standard_Integer anIt0; + theData->ReadInteger(num4, j0, "integer", theCheck, anIt0); + aTriangles->SetValue(i0,j0, anIt0); + } + } + } + } + + // Initialize entity + theEnt->Init(aRepresentationItem_Name, aTessellatedFace_Coordinates, aTessellatedFace_Pnmax, aTessellatedFace_Normals, hasTessellatedFace_GeometricLink, aTessellatedFace_GeometricLink, aPnindex, aTriangles); + +#ifdef OCCT_DEBUG + std::cout << aTessellatedFace_Pnmax << " " << (aTriangles.IsNull() ? 0 : aTriangles->NbRows()) << std::endl; +#endif +} + +//======================================================================= +//function : WriteStep +//purpose : +//======================================================================= + +void RWStepVisual_RWTriangulatedFace::WriteStep (StepData_StepWriter& theSW, + const Handle(StepVisual_TriangulatedFace)& theEnt) const +{ + + // Own fields of RepresentationItem + + theSW.Send(theEnt->Name()); + + // Own fields of TessellatedFace + + theSW.Send(theEnt->Coordinates()); + + theSW.Send(theEnt->Pnmax()); + + theSW.OpenSub(); + for (Standard_Integer i3 = 1; i3 <= theEnt->Normals()->NbRows(); i3++) + { + theSW.NewLine(Standard_False); + theSW.OpenSub(); + for (Standard_Integer j3 = 1; j3 <= theEnt->Normals()->NbColumns(); j3++) + { + Standard_Real Var0 = theEnt->Normals()->Value(i3,j3); + theSW.Send(Var0); + } + theSW.CloseSub(); + } + theSW.CloseSub(); + + if (theEnt->HasGeometricLink()) + { + theSW.Send(theEnt->GeometricLink().Value()); + } + else + { + theSW.SendUndef(); + } + + // Own fields of TriangulatedFace + + theSW.OpenSub(); + for (Standard_Integer i5 = 1; i5 <= theEnt->Pnindex()->Length(); i5++) + { + Standard_Integer Var0 = theEnt->Pnindex()->Value(i5); + theSW.Send(Var0); + } + theSW.CloseSub(); + + theSW.OpenSub(); + for (Standard_Integer i6 = 1; i6 <= theEnt->Triangles()->NbRows(); i6++) + { + theSW.NewLine(Standard_False); + theSW.OpenSub(); + for (Standard_Integer j6 = 1; j6 <= theEnt->Triangles()->NbColumns(); j6++) + { + Standard_Integer Var0 = theEnt->Triangles()->Value(i6,j6); + theSW.Send(Var0); + } + theSW.CloseSub(); + } + theSW.CloseSub(); +} + +//======================================================================= +//function : Share +//purpose : +//======================================================================= + +void RWStepVisual_RWTriangulatedFace::Share (const Handle(StepVisual_TriangulatedFace)&theEnt, + Interface_EntityIterator& theIter) const +{ + + // Inherited fields of RepresentationItem + + // Inherited fields of TessellatedFace + + theIter.AddItem(theEnt->StepVisual_TessellatedFace::Coordinates()); + + if (theEnt->StepVisual_TessellatedFace::HasGeometricLink()) + { + theIter.AddItem(theEnt->StepVisual_TessellatedFace::GeometricLink().Value()); + } + + // Own fields of TriangulatedFace +} diff --git a/src/RWStepVisual/RWStepVisual_RWTriangulatedFace.hxx b/src/RWStepVisual/RWStepVisual_RWTriangulatedFace.hxx new file mode 100644 index 0000000000..e0ef703b15 --- /dev/null +++ b/src/RWStepVisual/RWStepVisual_RWTriangulatedFace.hxx @@ -0,0 +1,53 @@ +// Created on : Thu Mar 24 18:30:12 2022 +// Created by: snn +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V2.0 +// Copyright (c) Open CASCADE 2022 +// +// 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 _RWStepVisual_RWTriangulatedFace_HeaderFile_ +#define _RWStepVisual_RWTriangulatedFace_HeaderFile_ + +#include +#include +#include + +class StepData_StepReaderData; +class Interface_Check; +class StepData_StepWriter; +class Interface_EntityIterator; +class StepVisual_TriangulatedFace; + +//! Read & Write tool for TriangulatedFace +class RWStepVisual_RWTriangulatedFace +{ + +public: + + DEFINE_STANDARD_ALLOC + + Standard_EXPORT RWStepVisual_RWTriangulatedFace(); + + Standard_EXPORT void ReadStep(const Handle(StepData_StepReaderData)& theData, + const Standard_Integer theNum, + Handle(Interface_Check)& theCheck, + const Handle(StepVisual_TriangulatedFace)& theEnt) const; + + Standard_EXPORT void WriteStep(StepData_StepWriter& theSW, + const Handle(StepVisual_TriangulatedFace)& theEnt) const; + + Standard_EXPORT void Share(const Handle(StepVisual_TriangulatedFace)& theEnt, + Interface_EntityIterator& theIter) const; + +}; + +#endif // _RWStepVisual_RWTriangulatedFace_HeaderFile_ diff --git a/src/STEPControl/STEPControl_ActorRead.cxx b/src/STEPControl/STEPControl_ActorRead.cxx index 0ce99cd8c6..2abe2e3a73 100644 --- a/src/STEPControl/STEPControl_ActorRead.cxx +++ b/src/STEPControl/STEPControl_ActorRead.cxx @@ -88,6 +88,10 @@ #include #include #include +#include +#include +#include +#include #include #include #include @@ -95,6 +99,7 @@ #include #include #include +#include #include #include #include @@ -103,6 +108,7 @@ #include #include #include +#include #include #include #include @@ -209,6 +215,7 @@ STEPControl_ActorRead::STEPControl_ActorRead() myMaxTol(0.0) { } + // ============================================================================ // Method : STEPControl_ActorRead::Recognize // Purpose : tells if an entity is valid for transfer by this Actor @@ -236,6 +243,8 @@ Standard_Boolean STEPControl_ActorRead::Recognize return Standard_False; } + const Standard_Boolean aCanReadTessGeom = (Interface_Static::IVal("read.step.tessellated") != 0); + if (start->IsKind(STANDARD_TYPE(StepShape_FacetedBrep))) return Standard_True; if (start->IsKind(STANDARD_TYPE(StepShape_BrepWithVoids))) return Standard_True; if (start->IsKind(STANDARD_TYPE(StepShape_ManifoldSolidBrep))) return Standard_True; @@ -246,6 +255,10 @@ Standard_Boolean STEPControl_ActorRead::Recognize if (start->IsKind(STANDARD_TYPE(StepShape_FaceSurface))) return Standard_True; if (start->IsKind(STANDARD_TYPE(StepShape_EdgeBasedWireframeModel))) return Standard_True; if (start->IsKind(STANDARD_TYPE(StepShape_FaceBasedSurfaceModel))) return Standard_True; + if (aCanReadTessGeom && start->IsKind(STANDARD_TYPE(StepVisual_TessellatedFace))) return Standard_True; + if (aCanReadTessGeom && start->IsKind(STANDARD_TYPE(StepVisual_TessellatedShell))) return Standard_True; + if (aCanReadTessGeom && start->IsKind(STANDARD_TYPE(StepVisual_TessellatedSolid))) return Standard_True; + if (aCanReadTessGeom && start->IsKind(STANDARD_TYPE(StepVisual_TessellatedShapeRepresentation))) return Standard_True; // REPRESENTATION_RELATIONSHIP et consorts : on regarde le contenu ... @@ -859,6 +872,7 @@ Handle(TransferBRep_ShapeBinder) STEPControl_ActorRead::TransferEntity( gp_Trsf aTrsf; Message_ProgressScope aPSRoot(theProgress, "Sub-assembly", isManifold ? 1 : 2); Message_ProgressScope aPS (aPSRoot.Next(), "Transfer", nb); + TopTools_IndexedMapOfShape aCompoundedShapes; for (Standard_Integer i = 1; i <= nb && aPS.More(); i ++) { Message_ProgressRange aRange = aPS.Next(); @@ -915,8 +929,13 @@ Handle(TransferBRep_ShapeBinder) STEPControl_ActorRead::TransferEntity( TopoDS_Shape theResult = TransferBRep::ShapeResult (binder); if (!theResult.IsNull()) { OneResult = theResult; - B.Add(comp, theResult); - nsh ++; + if (!aCompoundedShapes.Contains(theResult)) + { + aCompoundedShapes.Add(theResult); + TopExp::MapShapes(theResult, aCompoundedShapes, Standard_False, Standard_False); + B.Add(comp, theResult); + nsh++; + } } } @@ -1396,6 +1415,8 @@ Handle(TransferBRep_ShapeBinder) STEPControl_ActorRead::TransferEntity // Start progress scope (no need to check if progress exists -- it is safe) Message_ProgressScope aPS(theProgress, "Transfer stage", isManifold ? 2 : 1); + const Standard_Boolean aReadTessellatedWhenNoBRepOnly = (Interface_Static::IVal("read.step.tessellated") == 2); + Standard_Boolean aHasGeom = Standard_True; try { OCC_CATCH_SIGNALS Message_ProgressRange aRange = aPS.Next(); @@ -1431,6 +1452,27 @@ Handle(TransferBRep_ShapeBinder) STEPControl_ActorRead::TransferEntity myShapeBuilder.Init(GetCasted(StepShape_FaceBasedSurfaceModel, start), TP); found = Standard_True; } + // TODO: Normally, StepVisual_Tessellated* entities should be processed after + // StepShape_* entities in order to resolve links to BRep topological objects. + // Currently it is not guaranteed and might require changes in the processing order. + else if (start->IsKind(STANDARD_TYPE(StepVisual_TessellatedSolid))) + { + myShapeBuilder.Init(GetCasted(StepVisual_TessellatedSolid, start), TP, + aReadTessellatedWhenNoBRepOnly, aHasGeom, aRange); + found = Standard_True; + } + else if (start->IsKind(STANDARD_TYPE(StepVisual_TessellatedShell))) + { + myShapeBuilder.Init(GetCasted(StepVisual_TessellatedShell, start), TP, + aReadTessellatedWhenNoBRepOnly, aHasGeom, aRange); + found = Standard_True; + } + else if (start->IsKind(STANDARD_TYPE(StepVisual_TessellatedFace))) + { + myShapeBuilder.Init(GetCasted(StepVisual_TessellatedFace, start), TP, + aReadTessellatedWhenNoBRepOnly, aHasGeom); + found = Standard_True; + } } catch(Standard_Failure const&) { TP->AddFail(start,"Exception is raised. Entity was not translated."); @@ -1444,7 +1486,8 @@ Handle(TransferBRep_ShapeBinder) STEPControl_ActorRead::TransferEntity if (found && myShapeBuilder.IsDone()) { mappedShape = myShapeBuilder.Value(); // Apply ShapeFix (on manifold shapes only. Non-manifold topology is processed separately: ssv; 13.11.2010) - if (isManifold) { + if (isManifold && aHasGeom) + { Handle(Standard_Transient) info; mappedShape = XSAlgo::AlgoContainer()->ProcessShape( mappedShape, myPrecision, myMaxTol, diff --git a/src/STEPControl/STEPControl_ActorWrite.cxx b/src/STEPControl/STEPControl_ActorWrite.cxx index 97fa556e28..a643dc84a3 100644 --- a/src/STEPControl/STEPControl_ActorWrite.cxx +++ b/src/STEPControl/STEPControl_ActorWrite.cxx @@ -19,6 +19,7 @@ #include #include +#include #include #include #include @@ -71,6 +72,9 @@ #include #include #include +#include +#include +#include #include #include #include @@ -81,7 +85,6 @@ #include #include #include -#include #include #include #include @@ -170,6 +173,58 @@ static void DumpWhatIs(const TopoDS_Shape& S) { } #endif +static Standard_Boolean hasGeometry(const TopoDS_Shape& theShape) +{ + TopAbs_ShapeEnum aType = theShape.ShapeType(); + + if (aType == TopAbs_VERTEX) + { + return Standard_True; + } + else if (aType == TopAbs_EDGE) + { + Handle(BRep_TEdge) TE = Handle(BRep_TEdge)::DownCast(theShape.TShape()); + BRep_ListIteratorOfListOfCurveRepresentation itrc(TE->Curves()); + + while (itrc.More()) + { + const Handle(BRep_CurveRepresentation)& CR = itrc.Value(); + Standard_Boolean aHasGeometry = (CR->IsCurve3D() && !CR->Curve3D().IsNull()) + || CR->IsCurveOnSurface() + || CR->IsRegularity() + || (CR->IsPolygon3D() && !CR->Polygon3D().IsNull()) + || CR->IsPolygonOnTriangulation() + || CR->IsPolygonOnSurface(); + if (!aHasGeometry) + return Standard_False; + itrc.Next(); + } + return Standard_True; + } + else if (aType == TopAbs_FACE) + { + Handle(BRep_TFace) TF = Handle(BRep_TFace)::DownCast(theShape.TShape()); + if (!TF->Surface().IsNull()) + { + return Standard_True; + } + } + else + { + TopoDS_Iterator anIt(theShape, Standard_False, Standard_False); + for (; anIt.More(); anIt.Next()) + { + const TopoDS_Shape& aShape = anIt.Value(); + Standard_Boolean aHasGeometry = hasGeometry(aShape); + if (!aHasGeometry) + return Standard_False; + } + return Standard_True; + } + + return Standard_False; +} + //======================================================================= // Function : IsManifoldShape // Purpose : Used to define whether the passed shape has manifold @@ -906,25 +961,30 @@ Handle(Transfer_Binder) STEPControl_ActorWrite::TransferShape // BRepTools_Modifier DMT(aShape,DM); // if ( DMT.IsDone() ) aShape = DMT.ModifiedShape ( aShape ); //// aShape = TopoDSToStep::DirectFaces(xShape); - Handle(Standard_Transient) info; - Standard_Real maxTol = Interface_Static::RVal("read.maxprecision.val"); + Message_ProgressScope aPS1(aPS.Next(), NULL, 2); - Message_ProgressScope aPS1 (aPS.Next(), NULL, 2); + TopoDS_Shape aShape = xShape; + Handle(Standard_Transient) info; - TopoDS_Shape aShape; - aShape = XSAlgo::AlgoContainer()->ProcessShape(xShape, Tol, maxTol, - "write.step.resource.name", - "write.step.sequence", info, - aPS1.Next()); - if (aPS1.UserBreak()) - return Handle(Transfer_Binder)(); + if (hasGeometry(aShape)) + { + Standard_Real maxTol = Interface_Static::RVal("read.maxprecision.val"); + + aShape = XSAlgo::AlgoContainer()->ProcessShape(xShape, Tol, maxTol, + "write.step.resource.name", + "write.step.sequence", info, + aPS1.Next()); + if (aPS1.UserBreak()) + return Handle(Transfer_Binder)(); + } - if (!isManifold) { + if (!isManifold) + { mergeInfoForNM(FP, info); } // create a STEP entity corresponding to shape - Handle(StepGeom_GeometricRepresentationItem) item; + Handle(StepGeom_GeometricRepresentationItem) item, itemTess; switch (trmode) { case STEPControl_ManifoldSolidBrep: @@ -940,28 +1000,33 @@ Handle(Transfer_Binder) STEPControl_ActorWrite::TransferShape if ( nbShells >1 ) { TopoDSToStep_MakeBrepWithVoids MkBRepWithVoids(aSolid,FP, aPS1.Next()); MkBRepWithVoids.Tolerance() = Tol; - if (MkBRepWithVoids.IsDone()) { + if (MkBRepWithVoids.IsDone()) + { item = MkBRepWithVoids.Value(); - } - else nbShells = 1; //smth went wrong; let it will be just Manifold + itemTess = MkBRepWithVoids.TessellatedValue(); + } + else nbShells = 1; //smth went wrong; let it will be just Manifold } if ( nbShells ==1 ) { - - TopoDSToStep_MakeManifoldSolidBrep MkManifoldSolidBrep(aSolid,FP, aPS1.Next()); + TopoDSToStep_MakeManifoldSolidBrep MkManifoldSolidBrep(aSolid,FP, aPS1.Next()); MkManifoldSolidBrep.Tolerance() = Tol; - if (MkManifoldSolidBrep.IsDone()) { + if (MkManifoldSolidBrep.IsDone()) + { item = MkManifoldSolidBrep.Value(); - } - } + itemTess = MkManifoldSolidBrep.TessellatedValue(); + } + } } else if (aShape.ShapeType() == TopAbs_SHELL) { TopoDS_Shell aShell = TopoDS::Shell(aShape); TopoDSToStep_MakeManifoldSolidBrep MkManifoldSolidBrep(aShell,FP, aPS1.Next()); MkManifoldSolidBrep.Tolerance() = Tol; - if (MkManifoldSolidBrep.IsDone()) { + if (MkManifoldSolidBrep.IsDone()) + { item = MkManifoldSolidBrep.Value(); - } - } + itemTess = MkManifoldSolidBrep.TessellatedValue(); + } + } break; } case STEPControl_BrepWithVoids: @@ -970,8 +1035,10 @@ Handle(Transfer_Binder) STEPControl_ActorWrite::TransferShape TopoDS_Solid aSolid = TopoDS::Solid(aShape); TopoDSToStep_MakeBrepWithVoids MkBRepWithVoids(aSolid,FP, aPS1.Next()); MkBRepWithVoids.Tolerance() = Tol; - if (MkBRepWithVoids.IsDone()) { + if (MkBRepWithVoids.IsDone()) + { item = MkBRepWithVoids.Value(); + itemTess = MkBRepWithVoids.TessellatedValue(); } } break; @@ -993,9 +1060,11 @@ Handle(Transfer_Binder) STEPControl_ActorWrite::TransferShape TopoDS_Solid aSolid = TopoDS::Solid(aShape); TopoDSToStep_MakeFacetedBrep MkFacetedBrep(aSolid,FP, aPS1.Next()); MkFacetedBrep.Tolerance() = Tol; - if (MkFacetedBrep.IsDone()) { + if (MkFacetedBrep.IsDone()) + { item = MkFacetedBrep.Value(); - } + itemTess = MkFacetedBrep.TessellatedValue(); + } } break; } @@ -1017,9 +1086,11 @@ Handle(Transfer_Binder) STEPControl_ActorWrite::TransferShape TopoDSToStep_MakeFacetedBrepAndBrepWithVoids MkFacetedBrepAndBrepWithVoids(aSolid,FP, aPS1.Next()); MkFacetedBrepAndBrepWithVoids.Tolerance() = Tol; - if (MkFacetedBrepAndBrepWithVoids.IsDone()) { + if (MkFacetedBrepAndBrepWithVoids.IsDone()) + { item = MkFacetedBrepAndBrepWithVoids.Value(); - } + itemTess = MkFacetedBrepAndBrepWithVoids.TessellatedValue(); + } } break; } @@ -1030,28 +1101,34 @@ Handle(Transfer_Binder) STEPControl_ActorWrite::TransferShape TopoDSToStep_MakeShellBasedSurfaceModel MkShellBasedSurfaceModel(aSolid, FP, aPS1.Next()); MkShellBasedSurfaceModel.Tolerance() = Tol; - if (MkShellBasedSurfaceModel.IsDone()) { + if (MkShellBasedSurfaceModel.IsDone()) + { item = MkShellBasedSurfaceModel.Value(); - } + itemTess = MkShellBasedSurfaceModel.TessellatedValue(); + } } else if (aShape.ShapeType() == TopAbs_SHELL) { TopoDS_Shell aShell = TopoDS::Shell(aShape); // Non-manifold topology is stored via NMSSR containing series of SBSM (ssv; 13.11.2010) TopoDSToStep_MakeShellBasedSurfaceModel MkShellBasedSurfaceModel(aShell, FP, aPS1.Next()); MkShellBasedSurfaceModel.Tolerance() = Tol; - if (MkShellBasedSurfaceModel.IsDone()) { + if (MkShellBasedSurfaceModel.IsDone()) + { item = MkShellBasedSurfaceModel.Value(); + itemTess = MkShellBasedSurfaceModel.TessellatedValue(); } } else if (aShape.ShapeType() == TopAbs_FACE) { TopoDS_Face aFace = TopoDS::Face(aShape); - TopoDSToStep_MakeShellBasedSurfaceModel + TopoDSToStep_MakeShellBasedSurfaceModel MkShellBasedSurfaceModel(aFace, FP, aPS1.Next()); MkShellBasedSurfaceModel.Tolerance() = Tol; - if (MkShellBasedSurfaceModel.IsDone()) { + if (MkShellBasedSurfaceModel.IsDone()) + { item = MkShellBasedSurfaceModel.Value(); - } - } + itemTess = MkShellBasedSurfaceModel.TessellatedValue(); + } + } break; } case STEPControl_GeometricCurveSet: @@ -1099,24 +1176,48 @@ Handle(Transfer_Binder) STEPControl_ActorWrite::TransferShape } default: break; } - if ( item.IsNull() ) continue; + if ( item.IsNull() && itemTess.IsNull() ) continue; // add resulting item to the FP - ItemSeq->Append(item); - Handle(TransferBRep_ShapeMapper) submapper; - if ( xShape.IsSame ( mapper->Value() ) ) - submapper = Handle(TransferBRep_ShapeMapper)::DownCast ( start ); - if ( submapper.IsNull() ) submapper = TransferBRep::ShapeMapper (FP,xShape); - Handle(Transfer_Binder) subbind = FP->Find ( submapper ); - if ( subbind.IsNull() ) { - subbind = TransientResult ( item ); - FP->Bind ( submapper, subbind ); + if (!item.IsNull()) + { + ItemSeq->Append(item); + Handle(TransferBRep_ShapeMapper) submapper; + if (xShape.IsSame(mapper->Value())) + submapper = Handle(TransferBRep_ShapeMapper)::DownCast(start); + if (submapper.IsNull()) + submapper = TransferBRep::ShapeMapper(FP, xShape); + Handle(Transfer_Binder) subbind = FP->Find(submapper); + if (subbind.IsNull()) + { + subbind = TransientResult(item); + FP->Bind(submapper, subbind); + } + else + subbind->AddResult(TransientResult(item)); + } + if (!itemTess.IsNull()) + { + ItemSeq->Append(itemTess); + Handle(TransferBRep_ShapeMapper) submapper; + if (xShape.IsSame(mapper->Value())) + submapper = Handle(TransferBRep_ShapeMapper)::DownCast(start); + if (submapper.IsNull()) + submapper = TransferBRep::ShapeMapper(FP, xShape); + Handle(Transfer_Binder) subbind = FP->Find(submapper); + if (subbind.IsNull()) + { + subbind = TransientResult(itemTess); + FP->Bind(submapper, subbind); + } + else + subbind->AddResult(TransientResult(itemTess)); } - else subbind->AddResult ( TransientResult ( item ) ); //:abv 24Jan99 CAX-IF TRJ3: Update FinderProcess map to take into account shape processing // UpdateMap ( xShape, CSMT, DMT, FP ); - XSAlgo::AlgoContainer()->MergeTransferInfo(FP, info); + if (!info.IsNull()) + XSAlgo::AlgoContainer()->MergeTransferInfo(FP, info); } // - Make Shape Representation @@ -1212,6 +1313,8 @@ Handle(Transfer_Binder) STEPControl_ActorWrite::TransferShape ShapeRepr1 = new StepShape_GeometricallyBoundedWireframeShapeRepresentation; else if (items->Value(j)->IsKind(STANDARD_TYPE(StepShape_FacetedBrep))) ShapeRepr1 = new StepShape_FacetedBrepShapeRepresentation; + else if (items->Value(j)->IsKind(STANDARD_TYPE(StepVisual_TessellatedItem))) + ShapeRepr1 = new StepVisual_TessellatedShapeRepresentation; else ShapeRepr1 = new StepShape_ShapeRepresentation; Handle(StepRepr_HArray1OfRepresentationItem) repr1 = new StepRepr_HArray1OfRepresentationItem(1,2); @@ -1235,6 +1338,33 @@ Handle(Transfer_Binder) STEPControl_ActorWrite::TransferShape } } else { + Standard_Integer nC = 0; + for (Standard_Integer i = 1; i <= items->Length(); i++) + { + if (!items->Value(i)->IsKind(STANDARD_TYPE(StepVisual_TessellatedItem))) + continue; + ++nC; + } + if (nC > 0) + { + Handle(StepRepr_HArray1OfRepresentationItem) itemsTess = new StepRepr_HArray1OfRepresentationItem(1, nC); + Standard_Integer i = 1; + for (Standard_Integer j = 1; j <= items->Length(); j++) + { + if (!items->Value(j)->IsKind(STANDARD_TYPE(StepVisual_TessellatedItem))) + continue; + itemsTess->SetValue(i++, items->Value(j)); + } + + Handle(StepShape_ShapeRepresentation) shapeTessRepr = new StepVisual_TessellatedShapeRepresentation; + shapeTessRepr->SetItems(itemsTess); + STEPConstruct_UnitContext mk1; + mk1.Init(Tol); + shapeTessRepr->SetContextOfItems(mk1.Value()); + shapeTessRepr->SetName(new TCollection_HAsciiString("")); + + aSeqBindRelation.Append(TransientResult(shapeTessRepr)); + } if (!useExistingNMSSR) shapeRep->SetItems(items); else { @@ -1243,8 +1373,8 @@ Handle(Transfer_Binder) STEPControl_ActorWrite::TransferShape Handle(StepRepr_HArray1OfRepresentationItem) newItems = new StepRepr_HArray1OfRepresentationItem(1, oldItems->Length() + 1); Standard_Integer el = 1; - for (Standard_Integer i = 1; i <= oldItems->Length(); i++) - newItems->SetValue(el++, oldItems->Value(i)); + for (Standard_Integer i = 1; i <= oldItems->Length(); i++) + newItems->SetValue( el++, oldItems->Value(i) ); newItems->SetValue( el, items->Value( items->Length() ) ); shapeRep->SetItems(newItems); } diff --git a/src/STEPControl/STEPControl_Controller.cxx b/src/STEPControl/STEPControl_Controller.cxx index ceb1d99b81..23ed9294da 100644 --- a/src/STEPControl/STEPControl_Controller.cxx +++ b/src/STEPControl/STEPControl_Controller.cxx @@ -248,6 +248,22 @@ STEPControl_Controller::STEPControl_Controller () Interface_Static::Init("step", "read.step.codepage", '&', "eval CP850"); // Resource_FormatType_CP850 Interface_Static::SetCVal("read.step.codepage", "UTF8"); + // Tessellated geometry reading: Off by default + Interface_Static::Init("step", "read.step.tessellated", 'e', ""); + Interface_Static::Init("step", "read.step.tessellated", '&', "enum 0"); + Interface_Static::Init("step", "read.step.tessellated", '&', "eval Off"); // 0 + Interface_Static::Init("step", "read.step.tessellated", '&', "eval On"); // 1 + Interface_Static::Init("step", "read.step.tessellated", '&', "eval OnNoBRep"); // 2 + Interface_Static::SetCVal("read.step.tessellated", "On"); + + // Tessellated geometry writing: Off by default + Interface_Static::Init("step", "write.step.tessellated", 'e', ""); + Interface_Static::Init("step", "write.step.tessellated", '&', "enum 0"); + Interface_Static::Init("step", "write.step.tessellated", '&', "eval Off"); // 0 + Interface_Static::Init("step", "write.step.tessellated", '&', "eval On"); // 1 + Interface_Static::Init("step", "write.step.tessellated", '&', "eval OnNoBRep"); // 2 + Interface_Static::SetCVal("write.step.tessellated", "OnNoBRep"); + Standard_STATIC_ASSERT((int)Resource_FormatType_CP850 - (int)Resource_FormatType_CP1250 == 18); // "Error: Invalid Codepage Enumeration" init = Standard_True; diff --git a/src/StepAP214/StepAP214_Protocol.cxx b/src/StepAP214/StepAP214_Protocol.cxx index d4c4e3d074..11646ba0ab 100644 --- a/src/StepAP214/StepAP214_Protocol.cxx +++ b/src/StepAP214/StepAP214_Protocol.cxx @@ -836,6 +836,22 @@ static Standard_CString schemaAP242DIS = "AP242_MANAGED_MODEL_BASED_3D_ENGINEERI #include #include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + static int THE_StepAP214_Protocol_init = 0; static Interface_DataMapOfTransientInteger types(803); @@ -1630,6 +1646,21 @@ StepAP214_Protocol::StepAP214_Protocol () types.Bind(STANDARD_TYPE(StepKinematics_MechanismStateRepresentation), 801); types.Bind(STANDARD_TYPE(StepVisual_RepositionedTessellatedGeometricSet), 802); types.Bind(STANDARD_TYPE(StepVisual_RepositionedTessellatedItem), 803); + types.Bind(STANDARD_TYPE(StepVisual_TessellatedConnectingEdge), 804); + types.Bind(STANDARD_TYPE(StepVisual_TessellatedEdge), 805); + types.Bind(STANDARD_TYPE(StepVisual_TessellatedPointSet), 806); + types.Bind(STANDARD_TYPE(StepVisual_TessellatedShapeRepresentation), 807); + types.Bind(STANDARD_TYPE(StepVisual_TessellatedShapeRepresentationWithAccuracyParameters), 808); + types.Bind(STANDARD_TYPE(StepVisual_TessellatedShell), 809); + types.Bind(STANDARD_TYPE(StepVisual_TessellatedSolid), 810); + types.Bind(STANDARD_TYPE(StepVisual_TessellatedStructuredItem), 811); + types.Bind(STANDARD_TYPE(StepVisual_TessellatedVertex), 812); + types.Bind(STANDARD_TYPE(StepVisual_TessellatedWire), 813); + types.Bind(STANDARD_TYPE(StepVisual_TriangulatedFace), 814); + types.Bind(STANDARD_TYPE(StepVisual_ComplexTriangulatedFace), 815); + types.Bind(STANDARD_TYPE(StepVisual_ComplexTriangulatedSurfaceSet), 816); + types.Bind(STANDARD_TYPE(StepVisual_CubicBezierTessellatedEdge), 817); + types.Bind(STANDARD_TYPE(StepVisual_CubicBezierTriangulatedFace), 818); } diff --git a/src/StepToTopoDS/FILES b/src/StepToTopoDS/FILES index 9b1333e256..26c27041ad 100644 --- a/src/StepToTopoDS/FILES +++ b/src/StepToTopoDS/FILES @@ -51,6 +51,9 @@ StepToTopoDS_TranslatePolyLoopError.hxx StepToTopoDS_TranslateShell.cxx StepToTopoDS_TranslateShell.hxx StepToTopoDS_TranslateShellError.hxx +StepToTopoDS_TranslateSolid.cxx +StepToTopoDS_TranslateSolid.hxx +StepToTopoDS_TranslateSolidError.hxx StepToTopoDS_TranslateVertex.cxx StepToTopoDS_TranslateVertex.hxx StepToTopoDS_TranslateVertexError.hxx diff --git a/src/StepToTopoDS/StepToTopoDS_Builder.cxx b/src/StepToTopoDS/StepToTopoDS_Builder.cxx index 4705cf0d0c..40f5114cf7 100644 --- a/src/StepToTopoDS/StepToTopoDS_Builder.cxx +++ b/src/StepToTopoDS/StepToTopoDS_Builder.cxx @@ -66,6 +66,9 @@ #include #include #include +#include +#include +#include #include #include #include @@ -76,6 +79,7 @@ #include #include #include +#include #include #include #include @@ -805,6 +809,120 @@ void StepToTopoDS_Builder::Init } // ***end DTH Apr/6 +// ============================================================================ +// Method : StepToTopoDS_Builder::Init +// Purpose : Builds a TopoDS_Solid from StepVisual_TessellatedSolid +// ============================================================================ + +void StepToTopoDS_Builder::Init(const Handle(StepVisual_TessellatedSolid)& theTSo, + const Handle(Transfer_TransientProcess)& theTP, + const Standard_Boolean theReadTessellatedWhenNoBRepOnly, + Standard_Boolean& theHasGeom, + const Message_ProgressRange& theProgress) +{ + StepToTopoDS_TranslateSolid aTranSolid; + aTranSolid.SetPrecision(Precision()); + aTranSolid.SetMaxTol(MaxTol()); + + StepToTopoDS_Tool aTool; + StepToTopoDS_DataMapOfTRI aMap; + aTool.Init(aMap, theTP); + + StepToTopoDS_NMTool dummyNMTool; + aTranSolid.Init(theTSo, theTP, aTool, dummyNMTool, theReadTessellatedWhenNoBRepOnly, + theHasGeom, theProgress); + + if (aTranSolid.IsDone()) + { + TopoDS_Shape aS = aTranSolid.Value(); + TransferBRep::SetShapeResult(theTP, theTSo, aS); + myResult = TopoDS::Solid(aS); + myError = StepToTopoDS_BuilderDone; + done = Standard_True; + } + else + { + theTP->AddWarning(theTSo, " TessellatedSolid not mapped to TopoDS"); + myError = StepToTopoDS_BuilderOther; + done = Standard_True; + } +} + +// ============================================================================ +// Method : StepToTopoDS_Builder::Init +// Purpose : Builds a TopoDS_Shell from StepVisual_TessellatedShell +// ============================================================================ + +void StepToTopoDS_Builder::Init(const Handle(StepVisual_TessellatedShell)& theTSh, + const Handle(Transfer_TransientProcess)& theTP, + const Standard_Boolean theReadTessellatedWhenNoBRepOnly, + Standard_Boolean& theHasGeom, + const Message_ProgressRange& theProgress) +{ + StepToTopoDS_TranslateShell aTranShell; + aTranShell.SetPrecision(Precision()); + aTranShell.SetMaxTol(MaxTol()); + + StepToTopoDS_Tool aTool; + StepToTopoDS_DataMapOfTRI aMap; + aTool.Init(aMap, theTP); + + StepToTopoDS_NMTool dummyNMTool; + aTranShell.Init(theTSh, aTool, dummyNMTool, theReadTessellatedWhenNoBRepOnly, + theHasGeom, theProgress); + + if (aTranShell.IsDone()) + { + TopoDS_Shape aS = aTranShell.Value(); + TransferBRep::SetShapeResult(theTP, theTSh, aS); + myResult = TopoDS::Shell(aS); + myError = StepToTopoDS_BuilderDone; + done = Standard_True; + } + else + { + theTP->AddWarning(theTSh, " TessellatedShell not mapped to TopoDS"); + myError = StepToTopoDS_BuilderOther; + done = Standard_True; + } +} + +// ============================================================================ +// Method : StepToTopoDS_Builder::Init +// Purpose : Builds a TopoDS_Face from StepVisual_TessellatedFace +// ============================================================================ + +void StepToTopoDS_Builder::Init(const Handle(StepVisual_TessellatedFace)& theTF, + const Handle(Transfer_TransientProcess)& theTP, + const Standard_Boolean theReadTessellatedWhenNoBRepOnly, + Standard_Boolean& theHasGeom) +{ + StepToTopoDS_TranslateFace aTranFace; + aTranFace.SetPrecision(Precision()); + aTranFace.SetMaxTol(MaxTol()); + + StepToTopoDS_Tool aTool; + StepToTopoDS_DataMapOfTRI aMap; + aTool.Init(aMap, theTP); + + StepToTopoDS_NMTool dummyNMTool; + aTranFace.Init(theTF, aTool, dummyNMTool, theReadTessellatedWhenNoBRepOnly, theHasGeom); + + if (aTranFace.IsDone()) + { + TopoDS_Shape aS = aTranFace.Value(); + TransferBRep::SetShapeResult(theTP, theTF, aS); + myResult = TopoDS::Face(aS); + myError = StepToTopoDS_BuilderDone; + done = Standard_True; + } + else + { + theTP->AddWarning(theTF, " TessellatedFace not mapped to TopoDS"); + myError = StepToTopoDS_BuilderOther; + done = Standard_True; + } +} // ============================================================================ // Method : Value diff --git a/src/StepToTopoDS/StepToTopoDS_Builder.hxx b/src/StepToTopoDS/StepToTopoDS_Builder.hxx index 76f8af52d6..df3b185271 100644 --- a/src/StepToTopoDS/StepToTopoDS_Builder.hxx +++ b/src/StepToTopoDS/StepToTopoDS_Builder.hxx @@ -37,6 +37,9 @@ class StepToTopoDS_NMTool; class StepShape_GeometricSet; class StepShape_EdgeBasedWireframeModel; class StepShape_FaceBasedSurfaceModel; +class StepVisual_TessellatedFace; +class StepVisual_TessellatedShell; +class StepVisual_TessellatedSolid; class Transfer_ActorOfTransientProcess; @@ -83,6 +86,23 @@ public: const Standard_Boolean isManifold = Standard_False, const Message_ProgressRange& theProgress = Message_ProgressRange()); + Standard_EXPORT void Init (const Handle(StepVisual_TessellatedSolid)& theTSo, + const Handle(Transfer_TransientProcess)& theTP, + const Standard_Boolean theReadTessellatedWhenNoBRepOnly, + Standard_Boolean& theHasGeom, + const Message_ProgressRange& theProgress = Message_ProgressRange()); + + Standard_EXPORT void Init (const Handle(StepVisual_TessellatedShell)& theTSh, + const Handle(Transfer_TransientProcess)& theTP, + const Standard_Boolean theReadTessellatedWhenNoBRepOnly, + Standard_Boolean& theHasGeom, + const Message_ProgressRange& theProgress = Message_ProgressRange()); + + Standard_EXPORT void Init (const Handle(StepVisual_TessellatedFace)& theTF, + const Handle(Transfer_TransientProcess)& theTP, + const Standard_Boolean theReadTessellatedWhenNoBRepOnly, + Standard_Boolean& theHasGeom); + Standard_EXPORT const TopoDS_Shape& Value() const; Standard_EXPORT StepToTopoDS_BuilderError Error() const; diff --git a/src/StepToTopoDS/StepToTopoDS_TranslateFace.cxx b/src/StepToTopoDS/StepToTopoDS_TranslateFace.cxx index b31b6e5812..998c8e1687 100644 --- a/src/StepToTopoDS/StepToTopoDS_TranslateFace.cxx +++ b/src/StepToTopoDS/StepToTopoDS_TranslateFace.cxx @@ -41,6 +41,7 @@ #include #include #include +#include #include #include #include @@ -77,8 +78,11 @@ #include #include #include +#include #include #include +#include +#include //#3 rln 16/02/98 //#include @@ -111,6 +115,21 @@ StepToTopoDS_TranslateFace::StepToTopoDS_TranslateFace Init(FS, T, NMTool); } +// ============================================================================ +// Method : StepToTopoDS_TranslateFace::StepToTopoDS_TranslateFace +// Purpose : Constructor with either TriangulatedFace or +// ComplexTriangulatedFace and a Tool +// ============================================================================ + +StepToTopoDS_TranslateFace::StepToTopoDS_TranslateFace(const Handle(StepVisual_TessellatedFace)& theTF, + StepToTopoDS_Tool& theTool, + StepToTopoDS_NMTool& theNMTool, + const Standard_Boolean theReadTessellatedWhenNoBRepOnly, + Standard_Boolean& theHasGeom) +{ + Init(theTF, theTool, theNMTool, theReadTessellatedWhenNoBRepOnly, theHasGeom); +} + // ============================================================================ // Method : Init // Purpose : Init with a FaceSurface and a Tool @@ -381,6 +400,237 @@ void StepToTopoDS_TranslateFace::Init done = Standard_True; } +// ============================================================================ +// Method : Init +// Purpose : Init with either StepVisual_TriangulatedFace or +// StepVisual_ComplexTriangulatedFace and a Tool +// ============================================================================ + +void StepToTopoDS_TranslateFace::Init(const Handle(StepVisual_TessellatedFace)& theTF, + StepToTopoDS_Tool& theTool, + StepToTopoDS_NMTool& theNMTool, + const Standard_Boolean theReadTessellatedWhenNoBRepOnly, + Standard_Boolean& theHasGeom) +{ + if (theTF.IsNull()) + return; + + Handle(Transfer_TransientProcess) aTP = theTool.TransientProcess(); + + BRep_Builder aB; + TopoDS_Face aF; + + if (theTF->HasGeometricLink()) + { + Handle(TransferBRep_ShapeBinder) aBinder + = Handle(TransferBRep_ShapeBinder)::DownCast(aTP->Find(theTF->GeometricLink().Face())); + if (aBinder) + { + aF = aBinder->Face(); + theHasGeom = Standard_True; + } + if (!aF.IsNull() && !BRep_Tool::Surface(aF).IsNull() && theReadTessellatedWhenNoBRepOnly) + { + // Face has BRep but OnNoBRep param is specified + return; + } + } + + if (aF.IsNull()) + { + aB.MakeFace(aF); + theHasGeom = Standard_False; + } + + Handle(Poly_Triangulation) aMesh; + if (DeclareAndCast(StepVisual_TriangulatedFace, aTriaF, theTF)) + { + aMesh = createMesh(aTriaF); + } + else if (DeclareAndCast(StepVisual_ComplexTriangulatedFace, aCompTriaF, theTF)) + { + aMesh = createMesh(aCompTriaF); + } + else + { + aTP->AddWarning(theTF, " Triangulated or ComplexTriangulated entity is supported only."); + return; + } + + if (aMesh.IsNull()) + { + aTP->AddWarning(theTF, " Poly triangulation is not set to TopoDS face."); + return; + } + + aB.UpdateFace(aF, aMesh); + + if (theNMTool.IsActive()) + theNMTool.Bind(theTF, aF); + + myResult = aF; + myError = StepToTopoDS_TranslateFaceDone; + done = Standard_True; +} + +// ============================================================================ +// Method : createMesh +// Purpose : creates a Poly_Triangulation from TriangulatedFace +// ============================================================================ + +Handle(Poly_Triangulation) +StepToTopoDS_TranslateFace::createMesh(const Handle(StepVisual_TriangulatedFace)& theTF) const +{ + Handle(StepVisual_CoordinatesList) aCoords = theTF->Coordinates(); + Handle(TColgp_HArray1OfXYZ) aNodes = aCoords->Points(); + Handle(TColStd_HArray2OfInteger) aTriangles = theTF->Triangles(); + const Standard_Boolean aHasUVNodes = Standard_False; + const Standard_Boolean aHasNormals = (theTF->NbNormals() > 0); + Handle(Poly_Triangulation) aMesh = new Poly_Triangulation(theTF->NbPnindex(), theTF->NbTriangles(), aHasUVNodes, aHasNormals); + + for (Standard_Integer j = 1; j <= theTF->NbPnindex(); ++j) + { + aMesh->SetNode(j, aNodes->Value(theTF->PnindexValue(j))); + } + + for (Standard_Integer k = 1; k <= theTF->NbTriangles(); ++k) + { + aMesh->SetTriangle(k, Poly_Triangle(aTriangles->Value(k, 1), aTriangles->Value(k, 2), aTriangles->Value(k, 3))); + } + + if (aHasNormals) + { + Handle(TColStd_HArray2OfReal) aNormals = theTF->Normals(); + gp_XYZ aNorm; + if (theTF->NbNormals() == 1) + { + aNorm.SetX(aNormals->Value(1, 1)); + aNorm.SetY(aNormals->Value(1, 2)); + aNorm.SetZ(aNormals->Value(1, 3)); + for (Standard_Integer i = 1; i <= theTF->NbPnindex(); ++i) + { + aMesh->SetNormal(i, aNorm); + } + } + else + { + for (Standard_Integer i = 1; i <= theTF->NbNormals(); ++i) + { + aNorm.SetX(aNormals->Value(i, 1)); + aNorm.SetY(aNormals->Value(i, 2)); + aNorm.SetZ(aNormals->Value(i, 3)); + aMesh->SetNormal(i, aNorm); + } + } + } + + return aMesh; +} + +// ============================================================================ +// Method : createMesh +// Purpose : creates a Poly_Triangulation from ComplexTriangulatedFace +// ============================================================================ + +Handle(Poly_Triangulation) +StepToTopoDS_TranslateFace::createMesh(const Handle(StepVisual_ComplexTriangulatedFace)& theTF) const +{ + Handle(StepVisual_CoordinatesList) aCoords = theTF->Coordinates(); + Handle(TColgp_HArray1OfXYZ) aNodes = aCoords->Points(); + Handle(TColStd_HArray2OfInteger) aTriaStrips = theTF->TriangleStrips(); + Handle(TColStd_HArray2OfInteger) aTriaFans = theTF->TriangleFans(); + const Standard_Boolean aHasUVNodes = Standard_False; + const Standard_Boolean aHasNormals = (theTF->NbNormals() > 0); + + Standard_Integer aNbTriaStrips = 0; + for (Standard_Integer i = 1; i <= theTF->NbTriangleStrips(); ++i) + { + for (Standard_Integer j = 3; j <= aTriaStrips->UpperCol(); j += 2) + { + if (aTriaStrips->Value(i, j) != aTriaStrips->Value(i, j - 2) && + aTriaStrips->Value(i, j) != aTriaStrips->Value(i, j - 1)) + ++aNbTriaStrips; + } + for (Standard_Integer j = 4; j <= aTriaStrips->UpperCol(); j += 2) + { + if (aTriaStrips->Value(i, j) != aTriaStrips->Value(i, j - 2) && + aTriaStrips->Value(i, j) != aTriaStrips->Value(i, j - 1)) + ++aNbTriaStrips; + } + } + + Standard_Integer aNbTriaFans = 0; + for (Standard_Integer i = 1; i <= theTF->NbTriangleFans(); ++i) + { + Standard_Integer v1 = aTriaStrips->Value(i, 1); + for (Standard_Integer j = 3; j <= aTriaStrips->UpperCol(); ++j) + { + if (aTriaStrips->Value(i, j) != v1 && aTriaStrips->Value(i, j - 1) != v1) + ++aNbTriaFans; + } + } + + Handle(Poly_Triangulation) aMesh = new Poly_Triangulation(theTF->NbPnindex(), + aNbTriaStrips + aNbTriaFans, aHasUVNodes, aHasNormals); + + for (Standard_Integer j = 1; j <= theTF->NbPnindex(); ++j) + { + aMesh->SetNode(j, aNodes->Value(theTF->PnindexValue(j))); + } + + Standard_Integer k = 1; + for (Standard_Integer i = 1; i <= theTF->NbTriangleStrips(); ++i) + { + for (Standard_Integer j = 3; j <= aTriaStrips->UpperCol(); j += 2) + { + if (aTriaStrips->Value(i, j) != aTriaStrips->Value(i, j - 2) && + aTriaStrips->Value(i, j) != aTriaStrips->Value(i, j - 1)) + { + aMesh->SetTriangle(k++, Poly_Triangle(aTriaStrips->Value(i, j - 2), + aTriaStrips->Value(i, j), + aTriaStrips->Value(i, j - 1))); + } + } + for (Standard_Integer j = 4; j <= aTriaStrips->UpperCol(); j += 2) + { + if (aTriaStrips->Value(i, j) != aTriaStrips->Value(i, j - 2) && + aTriaStrips->Value(i, j) != aTriaStrips->Value(i, j - 1)) + { + aMesh->SetTriangle(k++, Poly_Triangle(aTriaStrips->Value(i, j - 2), + aTriaStrips->Value(i, j - 1), + aTriaStrips->Value(i, j))); + } + } + } + + if (aHasNormals) + { + Handle(TColStd_HArray2OfReal) aNormals = theTF->Normals(); + gp_XYZ aNorm; + if (theTF->NbNormals() == 1) + { + aNorm.SetX(aNormals->Value(1, 1)); + aNorm.SetY(aNormals->Value(1, 2)); + aNorm.SetZ(aNormals->Value(1, 3)); + for (Standard_Integer i = 1; i <= theTF->NbPnindex(); ++i) + { + aMesh->SetNormal(i, aNorm); + } + } + else + { + for (Standard_Integer i = 1; i <= theTF->NbNormals(); ++i) + { + aNorm.SetX(aNormals->Value(i, 1)); + aNorm.SetY(aNormals->Value(i, 2)); + aNorm.SetZ(aNormals->Value(i, 3)); + aMesh->SetNormal(i, aNorm); + } + } + } + + return aMesh; +} // ============================================================================ // Method : Value diff --git a/src/StepToTopoDS/StepToTopoDS_TranslateFace.hxx b/src/StepToTopoDS/StepToTopoDS_TranslateFace.hxx index 219b07bc8f..2f85e417bd 100644 --- a/src/StepToTopoDS/StepToTopoDS_TranslateFace.hxx +++ b/src/StepToTopoDS/StepToTopoDS_TranslateFace.hxx @@ -24,10 +24,13 @@ #include #include #include +class Poly_Triangulation; class StepShape_FaceSurface; class StepToTopoDS_Tool; class StepToTopoDS_NMTool; - +class StepVisual_TessellatedFace; +class StepVisual_TriangulatedFace; +class StepVisual_ComplexTriangulatedFace; class StepToTopoDS_TranslateFace : public StepToTopoDS_Root @@ -41,8 +44,20 @@ public: Standard_EXPORT StepToTopoDS_TranslateFace(const Handle(StepShape_FaceSurface)& FS, StepToTopoDS_Tool& T, StepToTopoDS_NMTool& NMTool); + Standard_EXPORT StepToTopoDS_TranslateFace(const Handle(StepVisual_TessellatedFace)& theTF, + StepToTopoDS_Tool& theTool, + StepToTopoDS_NMTool& theNMTool, + const Standard_Boolean theReadTessellatedWhenNoBRepOnly, + Standard_Boolean& theHasGeom); + Standard_EXPORT void Init (const Handle(StepShape_FaceSurface)& FS, StepToTopoDS_Tool& T, StepToTopoDS_NMTool& NMTool); + Standard_EXPORT void Init (const Handle(StepVisual_TessellatedFace)& theTF, + StepToTopoDS_Tool& theTool, + StepToTopoDS_NMTool& theNMTool, + const Standard_Boolean theReadTessellatedWhenNoBRepOnly, + Standard_Boolean& theHasGeom); + Standard_EXPORT const TopoDS_Shape& Value() const; Standard_EXPORT StepToTopoDS_TranslateFaceError Error() const; @@ -58,6 +73,8 @@ protected: private: + Handle(Poly_Triangulation) createMesh(const Handle(StepVisual_TriangulatedFace)& theTF) const; + Handle(Poly_Triangulation) createMesh(const Handle(StepVisual_ComplexTriangulatedFace)& theTF) const; StepToTopoDS_TranslateFaceError myError; diff --git a/src/StepToTopoDS/StepToTopoDS_TranslateShell.cxx b/src/StepToTopoDS/StepToTopoDS_TranslateShell.cxx index 1cffe990e7..b011d8adbf 100644 --- a/src/StepToTopoDS/StepToTopoDS_TranslateShell.cxx +++ b/src/StepToTopoDS/StepToTopoDS_TranslateShell.cxx @@ -25,11 +25,14 @@ #include #include #include +#include +#include #include #include #include #include #include +#include // ============================================================================ // Method : StepToTopoDS_TranslateShell::StepToTopoDS_TranslateShell @@ -108,6 +111,88 @@ void StepToTopoDS_TranslateShell::Init } } +// ============================================================================ +// Method : Init +// Purpose : Init with a ConnectedFaceSet and a Tool +// ============================================================================ + +void StepToTopoDS_TranslateShell::Init(const Handle(StepVisual_TessellatedShell)& theTSh, + StepToTopoDS_Tool& theTool, + StepToTopoDS_NMTool& theNMTool, + const Standard_Boolean theReadTessellatedWhenNoBRepOnly, + Standard_Boolean& theHasGeom, + const Message_ProgressRange& theProgress) +{ + if (theTSh.IsNull()) + return; + + BRep_Builder aB; + TopoDS_Shell aSh; + + Standard_Integer aNb = theTSh->NbItems(); + Message_ProgressScope aPS(theProgress, "Face", theTSh->HasTopologicalLink() ? aNb + 1 : aNb); + + Handle(Transfer_TransientProcess) aTP = theTool.TransientProcess(); + + if (theTSh->HasTopologicalLink()) + { + Handle(TransferBRep_ShapeBinder) aBinder + = Handle(TransferBRep_ShapeBinder)::DownCast(aTP->Find(theTSh->TopologicalLink())); + if (aBinder.IsNull()) + { + aSh = aBinder->Shell(); + theHasGeom = Standard_True; + } + } + + Standard_Boolean aNewShell = Standard_False; + if (aSh.IsNull()) + { + aB.MakeShell(aSh); + aNewShell = Standard_True; + theHasGeom = Standard_False; + } + + StepToTopoDS_TranslateFace aTranTF; + aTranTF.SetPrecision(Precision()); + aTranTF.SetMaxTol(MaxTol()); + + for (Standard_Integer i = 1; i <= aNb && aPS.More(); i++, aPS.Next()) + { +#ifdef OCCT_DEBUG + std::cout << "Processing Face : " << i << std::endl; +#endif + Handle(StepVisual_TessellatedStructuredItem) anItem = theTSh->ItemsValue(i); + if (anItem->IsKind(STANDARD_TYPE(StepVisual_TessellatedFace))) + { + Handle(StepVisual_TessellatedFace) aTFace = Handle(StepVisual_TessellatedFace)::DownCast(anItem); + Standard_Boolean aHasFaceGeom = Standard_False; + aTranTF.Init(aTFace, theTool, theNMTool, theReadTessellatedWhenNoBRepOnly, aHasFaceGeom); + if (aTranTF.IsDone()) + { + if (aNewShell) + { + aB.Add(aSh, TopoDS::Face(aTranTF.Value())); + } + theHasGeom &= aHasFaceGeom; + } + else + { + aTP->AddWarning(anItem, " Triangulated face if not mapped to TopoDS"); + } + } + else + { + aTP->AddWarning(anItem, " Face is not of TriangulatedFace Type; not mapped to TopoDS"); + } + } + + aSh.Closed(BRep_Tool::IsClosed(aSh)); + myResult = aSh; + myError = StepToTopoDS_TranslateShellDone; + done = Standard_True; +} + // ============================================================================ // Method : Value // Purpose : Return the mapped Shape diff --git a/src/StepToTopoDS/StepToTopoDS_TranslateShell.hxx b/src/StepToTopoDS/StepToTopoDS_TranslateShell.hxx index 27cf332a02..53079fa18c 100644 --- a/src/StepToTopoDS/StepToTopoDS_TranslateShell.hxx +++ b/src/StepToTopoDS/StepToTopoDS_TranslateShell.hxx @@ -27,11 +27,11 @@ #include class StepShape_ConnectedFaceSet; +class StepVisual_TessellatedShell; class StepToTopoDS_Tool; class StepToTopoDS_NMTool; - class StepToTopoDS_TranslateShell : public StepToTopoDS_Root { public: @@ -46,6 +46,13 @@ public: StepToTopoDS_NMTool& NMTool, const Message_ProgressRange& theProgress = Message_ProgressRange()); + Standard_EXPORT void Init (const Handle(StepVisual_TessellatedShell)& theTSh, + StepToTopoDS_Tool& theTool, + StepToTopoDS_NMTool& theNMTool, + const Standard_Boolean theReadTessellatedWhenNoBRepOnly, + Standard_Boolean& theHasGeom, + const Message_ProgressRange& theProgress = Message_ProgressRange()); + Standard_EXPORT const TopoDS_Shape& Value() const; Standard_EXPORT StepToTopoDS_TranslateShellError Error() const; diff --git a/src/StepToTopoDS/StepToTopoDS_TranslateSolid.cxx b/src/StepToTopoDS/StepToTopoDS_TranslateSolid.cxx new file mode 100644 index 0000000000..1007cc42e4 --- /dev/null +++ b/src/StepToTopoDS/StepToTopoDS_TranslateSolid.cxx @@ -0,0 +1,148 @@ +// Copyright (c) 2022 OPEN CASCADE SAS +// +// This file is part of Open CASCADE Technology software library. +// +// This library is free software; you can redistribute it and/or modify it under +// the terms of the GNU Lesser General Public License version 2.1 as published +// by the Free Software Foundation, with special exception defined in the file +// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT +// distribution for complete text of the license and disclaimer of any warranty. +// +// Alternatively, this file may be used under the terms of Open CASCADE +// commercial license or contractual agreement. + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +// ============================================================================ +// Method : StepToTopoDS_TranslateSolid::StepToTopoDS_TranslateSolid +// Purpose : Empty Constructor +// ============================================================================ +StepToTopoDS_TranslateSolid::StepToTopoDS_TranslateSolid() + : myError(StepToTopoDS_TranslateSolidOther) +{ + done = Standard_False; +} + +// ============================================================================ +// Method : Init +// Purpose : Init with a TessellatedSolid and a Tool +// ============================================================================ + +void StepToTopoDS_TranslateSolid::Init(const Handle(StepVisual_TessellatedSolid)& theTSo, + const Handle(Transfer_TransientProcess)& theTP, + StepToTopoDS_Tool& theTool, + StepToTopoDS_NMTool& theNMTool, + const Standard_Boolean theReadTessellatedWhenNoBRepOnly, + Standard_Boolean& theHasGeom, + const Message_ProgressRange& theProgress) +{ + if (theTSo.IsNull()) + return; + + BRep_Builder aB; + TopoDS_Shell aSh; + TopoDS_Solid aSo; + + Standard_Integer aNb = theTSo->NbItems(); + Message_ProgressScope aPS(theProgress, "Face", aNb); + + if (theTSo->HasGeometricLink() && theTP->IsBound(theTSo->GeometricLink())) + { + Handle(TransferBRep_ShapeBinder) aBinder + = Handle(TransferBRep_ShapeBinder)::DownCast(theTP->Find(theTSo->GeometricLink())); + if (aBinder) + aSo = aBinder->Solid(); + } + + Standard_Boolean aNewSolid = Standard_False; + if (aSo.IsNull()) + { + aB.MakeShell(aSh); + aB.MakeSolid(aSo); + aNewSolid = Standard_True; + theHasGeom = Standard_False; + } + + Handle(Transfer_TransientProcess) aTP = theTool.TransientProcess(); + + StepToTopoDS_TranslateFace aTranTF; + aTranTF.SetPrecision(Precision()); + aTranTF.SetMaxTol(MaxTol()); + + for (Standard_Integer i = 1; i <= aNb && aPS.More(); i++, aPS.Next()) + { +#ifdef OCCT_DEBUG + std::cout << "Processing Face : " << i << std::endl; +#endif + Handle(StepVisual_TessellatedStructuredItem) anItem = theTSo->ItemsValue(i); + if (anItem->IsKind(STANDARD_TYPE(StepVisual_TessellatedFace))) + { + Handle(StepVisual_TessellatedFace) aTFace = Handle(StepVisual_TessellatedFace)::DownCast(anItem); + Standard_Boolean aHasFaceGeom = Standard_False; + aTranTF.Init(aTFace, theTool, theNMTool, theReadTessellatedWhenNoBRepOnly, aHasFaceGeom); + if (aTranTF.IsDone()) + { + if (aNewSolid) + { + aB.Add(aSh, TopoDS::Face(aTranTF.Value())); + } + theHasGeom &= aHasFaceGeom; + } + else + { + aTP->AddWarning(anItem, " Tessellated face if not mapped to TopoDS"); + } + } + else + { + aTP->AddWarning(anItem, " Face is not of TessellatedFace Type; not mapped to TopoDS"); + } + } + + if (aNewSolid) + { + aB.Add(aSo, aSh); + } + + myResult = aSo; + myError = StepToTopoDS_TranslateSolidDone; + done = Standard_True; +} + +// ============================================================================ +// Method : Value +// Purpose : Return the mapped Shape +// ============================================================================ + +const TopoDS_Shape& StepToTopoDS_TranslateSolid::Value() const +{ + StdFail_NotDone_Raise_if (!done, "StepToTopoDS_TranslateSolid::Value() - no result"); + return myResult; +} + +// ============================================================================ +// Method : Error +// Purpose : Return the TranslateShell Error code +// ============================================================================ + +StepToTopoDS_TranslateSolidError StepToTopoDS_TranslateSolid::Error() const +{ + return myError; +} + diff --git a/src/StepToTopoDS/StepToTopoDS_TranslateSolid.hxx b/src/StepToTopoDS/StepToTopoDS_TranslateSolid.hxx new file mode 100644 index 0000000000..9720d7ec4b --- /dev/null +++ b/src/StepToTopoDS/StepToTopoDS_TranslateSolid.hxx @@ -0,0 +1,62 @@ +// Copyright (c) 2022 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 _StepToTopoDS_TranslateSolid_HeaderFile +#define _StepToTopoDS_TranslateSolid_HeaderFile + +#include +#include +#include + +#include +#include +#include +#include + +class StepShape_ConnectedFaceSet; +class StepVisual_TessellatedSolid; +class StepToTopoDS_Tool; +class StepToTopoDS_NMTool; +class Transfer_TransientProcess; + +class StepToTopoDS_TranslateSolid : public StepToTopoDS_Root +{ +public: + + DEFINE_STANDARD_ALLOC + + + Standard_EXPORT StepToTopoDS_TranslateSolid(); + + Standard_EXPORT void Init(const Handle(StepVisual_TessellatedSolid)& theTSo, + const Handle(Transfer_TransientProcess)& theTP, + StepToTopoDS_Tool& theTool, + StepToTopoDS_NMTool& theNMTool, + const Standard_Boolean theReadTessellatedWhenNoBRepOnly, + Standard_Boolean& theHasGeom, + const Message_ProgressRange& theProgress = Message_ProgressRange()); + + Standard_EXPORT const TopoDS_Shape& Value() const; + + Standard_EXPORT StepToTopoDS_TranslateSolidError Error() const; + +protected: + +private: + + StepToTopoDS_TranslateSolidError myError; + TopoDS_Shape myResult; + +}; + +#endif // _StepToTopoDS_TranslateSolid_HeaderFile diff --git a/src/StepToTopoDS/StepToTopoDS_TranslateSolidError.hxx b/src/StepToTopoDS/StepToTopoDS_TranslateSolidError.hxx new file mode 100644 index 0000000000..105eff90bb --- /dev/null +++ b/src/StepToTopoDS/StepToTopoDS_TranslateSolidError.hxx @@ -0,0 +1,23 @@ +// Copyright (c) 2022 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 _StepToTopoDS_TranslateSolidError_HeaderFile +#define _StepToTopoDS_TranslateSolidError_HeaderFile + +enum StepToTopoDS_TranslateSolidError +{ + StepToTopoDS_TranslateSolidDone, + StepToTopoDS_TranslateSolidOther +}; + +#endif // _StepToTopoDS_TranslateSolidError_HeaderFile diff --git a/src/StepVisual/FILES b/src/StepVisual/FILES index 83e199d91d..ab69d5c5b3 100644 --- a/src/StepVisual/FILES +++ b/src/StepVisual/FILES @@ -262,3 +262,49 @@ StepVisual_TessellatedCurveSet.hxx StepVisual_TessellatedCurveSet.cxx StepVisual_CoordinatesList.hxx StepVisual_CoordinatesList.cxx +StepVisual_Array1OfTessellatedEdgeOrVertex.hxx +StepVisual_Array1OfTessellatedStructuredItem.hxx +StepVisual_ComplexTriangulatedFace.cxx +StepVisual_ComplexTriangulatedFace.hxx +StepVisual_ComplexTriangulatedSurfaceSet.cxx +StepVisual_ComplexTriangulatedSurfaceSet.hxx +StepVisual_CubicBezierTessellatedEdge.cxx +StepVisual_CubicBezierTessellatedEdge.hxx +StepVisual_CubicBezierTriangulatedFace.cxx +StepVisual_CubicBezierTriangulatedFace.hxx +StepVisual_EdgeOrCurve.cxx +StepVisual_EdgeOrCurve.hxx +StepVisual_FaceOrSurface.cxx +StepVisual_FaceOrSurface.hxx +StepVisual_HArray1OfTessellatedEdgeOrVertex.hxx +StepVisual_HArray1OfTessellatedStructuredItem.hxx +StepVisual_PathOrCompositeCurve.cxx +StepVisual_PathOrCompositeCurve.hxx +StepVisual_TessellatedConnectingEdge.cxx +StepVisual_TessellatedConnectingEdge.hxx +StepVisual_TessellatedEdge.cxx +StepVisual_TessellatedEdge.hxx +StepVisual_TessellatedEdgeOrVertex.cxx +StepVisual_TessellatedEdgeOrVertex.hxx +StepVisual_TessellatedFace.cxx +StepVisual_TessellatedFace.hxx +StepVisual_TessellatedPointSet.cxx +StepVisual_TessellatedPointSet.hxx +StepVisual_TessellatedShapeRepresentation.cxx +StepVisual_TessellatedShapeRepresentation.hxx +StepVisual_TessellatedShapeRepresentationWithAccuracyParameters.cxx +StepVisual_TessellatedShapeRepresentationWithAccuracyParameters.hxx +StepVisual_TessellatedShell.cxx +StepVisual_TessellatedShell.hxx +StepVisual_TessellatedSolid.cxx +StepVisual_TessellatedSolid.hxx +StepVisual_TessellatedStructuredItem.cxx +StepVisual_TessellatedStructuredItem.hxx +StepVisual_TessellatedSurfaceSet.cxx +StepVisual_TessellatedSurfaceSet.hxx +StepVisual_TessellatedVertex.cxx +StepVisual_TessellatedVertex.hxx +StepVisual_TessellatedWire.cxx +StepVisual_TessellatedWire.hxx +StepVisual_TriangulatedFace.cxx +StepVisual_TriangulatedFace.hxx diff --git a/src/StepVisual/StepVisual_Array1OfTessellatedEdgeOrVertex.hxx b/src/StepVisual/StepVisual_Array1OfTessellatedEdgeOrVertex.hxx new file mode 100644 index 0000000000..9500617ed3 --- /dev/null +++ b/src/StepVisual/StepVisual_Array1OfTessellatedEdgeOrVertex.hxx @@ -0,0 +1,26 @@ +// Created on : Thu Mar 24 18:30:12 2022 +// Created by: snn +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V2.0 +// Copyright (c) Open CASCADE 2022 +// +// 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 StepVisual_Array1OfTessellatedEdgeOrVertex_HeaderFile +#define StepVisual_Array1OfTessellatedEdgeOrVertex_HeaderFile + +#include +#include + +typedef NCollection_Array1 StepVisual_Array1OfTessellatedEdgeOrVertex; + +#endif diff --git a/src/StepVisual/StepVisual_Array1OfTessellatedStructuredItem.hxx b/src/StepVisual/StepVisual_Array1OfTessellatedStructuredItem.hxx new file mode 100644 index 0000000000..c6d3bdf002 --- /dev/null +++ b/src/StepVisual/StepVisual_Array1OfTessellatedStructuredItem.hxx @@ -0,0 +1,26 @@ +// Created on : Thu Mar 24 18:30:12 2022 +// Created by: snn +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V2.0 +// Copyright (c) Open CASCADE 2022 +// +// 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 StepVisual_Array1OfTessellatedStructuredItem_HeaderFile +#define StepVisual_Array1OfTessellatedStructuredItem_HeaderFile + +#include +#include + +typedef NCollection_Array1 StepVisual_Array1OfTessellatedStructuredItem; + +#endif diff --git a/src/StepVisual/StepVisual_ComplexTriangulatedFace.cxx b/src/StepVisual/StepVisual_ComplexTriangulatedFace.cxx new file mode 100644 index 0000000000..741603f545 --- /dev/null +++ b/src/StepVisual/StepVisual_ComplexTriangulatedFace.cxx @@ -0,0 +1,171 @@ +// Created on : Thu Mar 24 18:30:11 2022 +// Created by: snn +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V2.0 +// Copyright (c) Open CASCADE 2022 +// +// This file is part of Open CASCADE Technology software library. +// +// This library is free software; you can redistribute it and/or modify it under +// the terms of the GNU Lesser General Public License version 2.1 as published +// by the Free Software Foundation, with special exception defined in the file +// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT +// distribution for complete text of the license and disclaimer of any warranty. +// +// Alternatively, this file may be used under the terms of Open CASCADE +// commercial license or contractual agreement. + +#include + +IMPLEMENT_STANDARD_RTTIEXT(StepVisual_ComplexTriangulatedFace, StepVisual_TessellatedFace) + +//======================================================================= +//function : StepVisual_ComplexTriangulatedFace +//purpose : +//======================================================================= + +StepVisual_ComplexTriangulatedFace::StepVisual_ComplexTriangulatedFace () +{ +} + +//======================================================================= +//function : Init +//purpose : +//======================================================================= + +void StepVisual_ComplexTriangulatedFace::Init (const Handle(TCollection_HAsciiString)& theRepresentationItem_Name, + const Handle(StepVisual_CoordinatesList)& theTessellatedFace_Coordinates, + const Standard_Integer theTessellatedFace_Pnmax, + const Handle(TColStd_HArray2OfReal)& theTessellatedFace_Normals, + const Standard_Boolean theHasTessellatedFace_GeometricLink, + const StepVisual_FaceOrSurface& theTessellatedFace_GeometricLink, + const Handle(TColStd_HArray1OfInteger)& thePnindex, + const Handle(TColStd_HArray2OfInteger)& theTriangleStrips, + const Handle(TColStd_HArray2OfInteger)& theTriangleFans) +{ + StepVisual_TessellatedFace::Init(theRepresentationItem_Name, + theTessellatedFace_Coordinates, + theTessellatedFace_Pnmax, + theTessellatedFace_Normals, + theHasTessellatedFace_GeometricLink, + theTessellatedFace_GeometricLink); + + myPnindex = thePnindex; + + myTriangleStrips = theTriangleStrips; + + myTriangleFans = theTriangleFans; +} + +//======================================================================= +//function : Pnindex +//purpose : +//======================================================================= + +Handle(TColStd_HArray1OfInteger) StepVisual_ComplexTriangulatedFace::Pnindex () const +{ + return myPnindex; +} + +//======================================================================= +//function : SetPnindex +//purpose : +//======================================================================= + +void StepVisual_ComplexTriangulatedFace::SetPnindex(const Handle(TColStd_HArray1OfInteger)& thePnindex) +{ + myPnindex = thePnindex; +} + + +//======================================================================= +//function : NbPnindex +//purpose : +//======================================================================= + +Standard_Integer StepVisual_ComplexTriangulatedFace::NbPnindex() const +{ + if (myPnindex.IsNull()) + { + return 0; + } + return myPnindex->Length(); +} + + +//======================================================================= +//function : PnindexValue +//purpose : +//======================================================================= + +Standard_Integer StepVisual_ComplexTriangulatedFace::PnindexValue(const Standard_Integer theNum) const +{ + return myPnindex->Value(theNum); +} + +//======================================================================= +//function : TriangleStrips +//purpose : +//======================================================================= + +Handle(TColStd_HArray2OfInteger) StepVisual_ComplexTriangulatedFace::TriangleStrips () const +{ + return myTriangleStrips; +} + +//======================================================================= +//function : SetTriangleStrips +//purpose : +//======================================================================= + +void StepVisual_ComplexTriangulatedFace::SetTriangleStrips(const Handle(TColStd_HArray2OfInteger)& theTriangleStrips) +{ + myTriangleStrips = theTriangleStrips; +} + +//======================================================================= +//function : NbTriangleStrips +//purpose : +//======================================================================= + +Standard_Integer StepVisual_ComplexTriangulatedFace::NbTriangleStrips() const +{ + if (myTriangleStrips.IsNull()) + { + return 0; + } + return myTriangleStrips->ColLength(); +} + +//======================================================================= +//function : TriangleFans +//purpose : +//======================================================================= + +Handle(TColStd_HArray2OfInteger) StepVisual_ComplexTriangulatedFace::TriangleFans () const +{ + return myTriangleFans; +} + +//======================================================================= +//function : SetTriangleFans +//purpose : +//======================================================================= + +void StepVisual_ComplexTriangulatedFace::SetTriangleFans(const Handle(TColStd_HArray2OfInteger)& theTriangleFans) +{ + myTriangleFans = theTriangleFans; +} + +//======================================================================= +//function : NbTriangleFans +//purpose : +//======================================================================= + +Standard_Integer StepVisual_ComplexTriangulatedFace::NbTriangleFans() const +{ + if (myTriangleFans.IsNull()) + { + return 0; + } + return myTriangleFans->ColLength(); +} diff --git a/src/StepVisual/StepVisual_ComplexTriangulatedFace.hxx b/src/StepVisual/StepVisual_ComplexTriangulatedFace.hxx new file mode 100644 index 0000000000..b89b6a5b34 --- /dev/null +++ b/src/StepVisual/StepVisual_ComplexTriangulatedFace.hxx @@ -0,0 +1,89 @@ +// Created on : Thu Mar 24 18:30:11 2022 +// Created by: snn +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V2.0 +// Copyright (c) Open CASCADE 2022 +// +// 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 _StepVisual_ComplexTriangulatedFace_HeaderFile_ +#define _StepVisual_ComplexTriangulatedFace_HeaderFile_ + +#include +#include +#include + +#include +#include + +DEFINE_STANDARD_HANDLE(StepVisual_ComplexTriangulatedFace, StepVisual_TessellatedFace) + +//! Representation of STEP entity ComplexTriangulatedFace +class StepVisual_ComplexTriangulatedFace : public StepVisual_TessellatedFace +{ + +public : + + //! default constructor + Standard_EXPORT StepVisual_ComplexTriangulatedFace(); + + //! Initialize all fields (own and inherited) + Standard_EXPORT void Init(const Handle(TCollection_HAsciiString)& theRepresentationItem_Name, + const Handle(StepVisual_CoordinatesList)& theTessellatedFace_Coordinates, + const Standard_Integer theTessellatedFace_Pnmax, + const Handle(TColStd_HArray2OfReal)& theTessellatedFace_Normals, + const Standard_Boolean theHasTessellatedFace_GeometricLink, + const StepVisual_FaceOrSurface& theTessellatedFace_GeometricLink, + const Handle(TColStd_HArray1OfInteger)& thePnindex, + const Handle(TColStd_HArray2OfInteger)& theTriangleStrips, + const Handle(TColStd_HArray2OfInteger)& theTriangleFans); + + //! Returns field Pnindex + Standard_EXPORT Handle(TColStd_HArray1OfInteger) Pnindex() const; + + //! Sets field Pnindex + Standard_EXPORT void SetPnindex (const Handle(TColStd_HArray1OfInteger)& thePnindex); + + //! Returns number of Pnindex + Standard_EXPORT Standard_Integer NbPnindex() const; + + //! Returns value of Pnindex by its num + Standard_EXPORT Standard_Integer PnindexValue(const Standard_Integer theNum) const; + + //! Returns field TriangleStrips + Standard_EXPORT Handle(TColStd_HArray2OfInteger) TriangleStrips() const; + + //! Sets field TriangleStrips + Standard_EXPORT void SetTriangleStrips (const Handle(TColStd_HArray2OfInteger)& theTriangleStrips); + + //! Returns number of TriangleStrips + Standard_EXPORT Standard_Integer NbTriangleStrips() const; + + //! Returns field TriangleFans + Standard_EXPORT Handle(TColStd_HArray2OfInteger) TriangleFans() const; + + //! Sets field TriangleFans + Standard_EXPORT void SetTriangleFans (const Handle(TColStd_HArray2OfInteger)& theTriangleFans); + + //! Returns number of TriangleFans + Standard_EXPORT Standard_Integer NbTriangleFans() const; + + DEFINE_STANDARD_RTTIEXT(StepVisual_ComplexTriangulatedFace, StepVisual_TessellatedFace) + +private: + + Handle(TColStd_HArray1OfInteger) myPnindex; + Handle(TColStd_HArray2OfInteger) myTriangleStrips; + Handle(TColStd_HArray2OfInteger) myTriangleFans; + +}; + +#endif // _StepVisual_ComplexTriangulatedFace_HeaderFile_ diff --git a/src/StepVisual/StepVisual_ComplexTriangulatedSurfaceSet.cxx b/src/StepVisual/StepVisual_ComplexTriangulatedSurfaceSet.cxx new file mode 100644 index 0000000000..ba3fd57bba --- /dev/null +++ b/src/StepVisual/StepVisual_ComplexTriangulatedSurfaceSet.cxx @@ -0,0 +1,167 @@ +// Created on : Thu Mar 24 18:30:11 2022 +// Created by: snn +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V2.0 +// Copyright (c) Open CASCADE 2022 +// +// This file is part of Open CASCADE Technology software library. +// +// This library is free software; you can redistribute it and/or modify it under +// the terms of the GNU Lesser General Public License version 2.1 as published +// by the Free Software Foundation, with special exception defined in the file +// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT +// distribution for complete text of the license and disclaimer of any warranty. +// +// Alternatively, this file may be used under the terms of Open CASCADE +// commercial license or contractual agreement. + +#include + +IMPLEMENT_STANDARD_RTTIEXT(StepVisual_ComplexTriangulatedSurfaceSet, StepVisual_TessellatedSurfaceSet) + +//======================================================================= +//function : StepVisual_ComplexTriangulatedSurfaceSet +//purpose : +//======================================================================= + +StepVisual_ComplexTriangulatedSurfaceSet::StepVisual_ComplexTriangulatedSurfaceSet () +{ +} + +//======================================================================= +//function : Init +//purpose : +//======================================================================= + +void StepVisual_ComplexTriangulatedSurfaceSet::Init (const Handle(TCollection_HAsciiString)& theRepresentationItem_Name, + const Handle(StepVisual_CoordinatesList)& theTessellatedSurfaceSet_Coordinates, + const Standard_Integer theTessellatedSurfaceSet_Pnmax, + const Handle(TColStd_HArray2OfReal)& theTessellatedSurfaceSet_Normals, + const Handle(TColStd_HArray1OfInteger)& thePnindex, + const Handle(TColStd_HArray2OfInteger)& theTriangleStrips, + const Handle(TColStd_HArray2OfInteger)& theTriangleFans) +{ + StepVisual_TessellatedSurfaceSet::Init(theRepresentationItem_Name, + theTessellatedSurfaceSet_Coordinates, + theTessellatedSurfaceSet_Pnmax, + theTessellatedSurfaceSet_Normals); + + myPnindex = thePnindex; + + myTriangleStrips = theTriangleStrips; + + myTriangleFans = theTriangleFans; +} + +//======================================================================= +//function : Pnindex +//purpose : +//======================================================================= + +Handle(TColStd_HArray1OfInteger) StepVisual_ComplexTriangulatedSurfaceSet::Pnindex () const +{ + return myPnindex; +} + +//======================================================================= +//function : SetPnindex +//purpose : +//======================================================================= + +void StepVisual_ComplexTriangulatedSurfaceSet::SetPnindex(const Handle(TColStd_HArray1OfInteger)& thePnindex) +{ + myPnindex = thePnindex; +} + + +//======================================================================= +//function : NbPnindex +//purpose : +//======================================================================= + +Standard_Integer StepVisual_ComplexTriangulatedSurfaceSet::NbPnindex() const +{ + if (myPnindex.IsNull()) + { + return 0; + } + return myPnindex->Length(); +} + + +//======================================================================= +//function : PnindexValue +//purpose : +//======================================================================= + +Standard_Integer StepVisual_ComplexTriangulatedSurfaceSet::PnindexValue(const Standard_Integer theNum) const +{ + return myPnindex->Value(theNum); +} + +//======================================================================= +//function : TriangleStrips +//purpose : +//======================================================================= + +Handle(TColStd_HArray2OfInteger) StepVisual_ComplexTriangulatedSurfaceSet::TriangleStrips () const +{ + return myTriangleStrips; +} + +//======================================================================= +//function : SetTriangleStrips +//purpose : +//======================================================================= + +void StepVisual_ComplexTriangulatedSurfaceSet::SetTriangleStrips(const Handle(TColStd_HArray2OfInteger)& theTriangleStrips) +{ + myTriangleStrips = theTriangleStrips; +} + +//======================================================================= +//function : NbTriangleStrips +//purpose : +//======================================================================= + +Standard_Integer StepVisual_ComplexTriangulatedSurfaceSet::NbTriangleStrips() const +{ + if (myTriangleStrips.IsNull()) + { + return 0; + } + return myTriangleStrips->ColLength(); +} + +//======================================================================= +//function : TriangleFans +//purpose : +//======================================================================= + +Handle(TColStd_HArray2OfInteger) StepVisual_ComplexTriangulatedSurfaceSet::TriangleFans () const +{ + return myTriangleFans; +} + +//======================================================================= +//function : SetTriangleFans +//purpose : +//======================================================================= + +void StepVisual_ComplexTriangulatedSurfaceSet::SetTriangleFans(const Handle(TColStd_HArray2OfInteger)& theTriangleFans) +{ + myTriangleFans = theTriangleFans; +} + +//======================================================================= +//function : NbTriangleFans +//purpose : +//======================================================================= + +Standard_Integer StepVisual_ComplexTriangulatedSurfaceSet::NbTriangleFans() const +{ + if (myTriangleFans.IsNull()) + { + return 0; + } + return myTriangleFans->ColLength(); +} diff --git a/src/StepVisual/StepVisual_ComplexTriangulatedSurfaceSet.hxx b/src/StepVisual/StepVisual_ComplexTriangulatedSurfaceSet.hxx new file mode 100644 index 0000000000..c8672e25d9 --- /dev/null +++ b/src/StepVisual/StepVisual_ComplexTriangulatedSurfaceSet.hxx @@ -0,0 +1,87 @@ +// Created on : Thu Mar 24 18:30:11 2022 +// Created by: snn +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V2.0 +// Copyright (c) Open CASCADE 2022 +// +// 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 _StepVisual_ComplexTriangulatedSurfaceSet_HeaderFile_ +#define _StepVisual_ComplexTriangulatedSurfaceSet_HeaderFile_ + +#include +#include +#include + +#include +#include + +DEFINE_STANDARD_HANDLE(StepVisual_ComplexTriangulatedSurfaceSet, StepVisual_TessellatedSurfaceSet) + +//! Representation of STEP entity ComplexTriangulatedSurfaceSet +class StepVisual_ComplexTriangulatedSurfaceSet : public StepVisual_TessellatedSurfaceSet +{ + +public : + + //! default constructor + Standard_EXPORT StepVisual_ComplexTriangulatedSurfaceSet(); + + //! Initialize all fields (own and inherited) + Standard_EXPORT void Init(const Handle(TCollection_HAsciiString)& theRepresentationItem_Name, + const Handle(StepVisual_CoordinatesList)& theTessellatedSurfaceSet_Coordinates, + const Standard_Integer theTessellatedSurfaceSet_Pnmax, + const Handle(TColStd_HArray2OfReal)& theTessellatedSurfaceSet_Normals, + const Handle(TColStd_HArray1OfInteger)& thePnindex, + const Handle(TColStd_HArray2OfInteger)& theTriangleStrips, + const Handle(TColStd_HArray2OfInteger)& theTriangleFans); + + //! Returns field Pnindex + Standard_EXPORT Handle(TColStd_HArray1OfInteger) Pnindex() const; + + //! Sets field Pnindex + Standard_EXPORT void SetPnindex (const Handle(TColStd_HArray1OfInteger)& thePnindex); + + //! Returns number of Pnindex + Standard_EXPORT Standard_Integer NbPnindex() const; + + //! Returns value of Pnindex by its num + Standard_EXPORT Standard_Integer PnindexValue(const Standard_Integer theNum) const; + + //! Returns field TriangleStrips + Standard_EXPORT Handle(TColStd_HArray2OfInteger) TriangleStrips() const; + + //! Sets field TriangleStrips + Standard_EXPORT void SetTriangleStrips (const Handle(TColStd_HArray2OfInteger)& theTriangleStrips); + + //! Returns number of TriangleStrips + Standard_EXPORT Standard_Integer NbTriangleStrips() const; + + //! Returns field TriangleFans + Standard_EXPORT Handle(TColStd_HArray2OfInteger) TriangleFans() const; + + //! Sets field TriangleFans + Standard_EXPORT void SetTriangleFans (const Handle(TColStd_HArray2OfInteger)& theTriangleFans); + + //! Returns number of TriangleFans + Standard_EXPORT Standard_Integer NbTriangleFans() const; + + DEFINE_STANDARD_RTTIEXT(StepVisual_ComplexTriangulatedSurfaceSet, StepVisual_TessellatedSurfaceSet) + +private: + + Handle(TColStd_HArray1OfInteger) myPnindex; + Handle(TColStd_HArray2OfInteger) myTriangleStrips; + Handle(TColStd_HArray2OfInteger) myTriangleFans; + +}; + +#endif // _StepVisual_ComplexTriangulatedSurfaceSet_HeaderFile_ diff --git a/src/StepVisual/StepVisual_CubicBezierTessellatedEdge.cxx b/src/StepVisual/StepVisual_CubicBezierTessellatedEdge.cxx new file mode 100644 index 0000000000..471e8f2957 --- /dev/null +++ b/src/StepVisual/StepVisual_CubicBezierTessellatedEdge.cxx @@ -0,0 +1,28 @@ +// Created on : Thu Mar 24 18:30:11 2022 +// Created by: snn +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V2.0 +// Copyright (c) Open CASCADE 2022 +// +// This file is part of Open CASCADE Technology software library. +// +// This library is free software; you can redistribute it and/or modify it under +// the terms of the GNU Lesser General Public License version 2.1 as published +// by the Free Software Foundation, with special exception defined in the file +// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT +// distribution for complete text of the license and disclaimer of any warranty. +// +// Alternatively, this file may be used under the terms of Open CASCADE +// commercial license or contractual agreement. + +#include + +IMPLEMENT_STANDARD_RTTIEXT(StepVisual_CubicBezierTessellatedEdge, StepVisual_TessellatedEdge) + +//======================================================================= +//function : StepVisual_CubicBezierTessellatedEdge +//purpose : +//======================================================================= + +StepVisual_CubicBezierTessellatedEdge::StepVisual_CubicBezierTessellatedEdge () +{ +} diff --git a/src/StepVisual/StepVisual_CubicBezierTessellatedEdge.hxx b/src/StepVisual/StepVisual_CubicBezierTessellatedEdge.hxx new file mode 100644 index 0000000000..1a9c63efc7 --- /dev/null +++ b/src/StepVisual/StepVisual_CubicBezierTessellatedEdge.hxx @@ -0,0 +1,40 @@ +// Created on : Thu Mar 24 18:30:11 2022 +// Created by: snn +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V2.0 +// Copyright (c) Open CASCADE 2022 +// +// 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 _StepVisual_CubicBezierTessellatedEdge_HeaderFile_ +#define _StepVisual_CubicBezierTessellatedEdge_HeaderFile_ + +#include +#include +#include + + +DEFINE_STANDARD_HANDLE(StepVisual_CubicBezierTessellatedEdge, StepVisual_TessellatedEdge) + +//! Representation of STEP entity CubicBezierTessellatedEdge +class StepVisual_CubicBezierTessellatedEdge : public StepVisual_TessellatedEdge +{ + +public : + + //! default constructor + Standard_EXPORT StepVisual_CubicBezierTessellatedEdge(); + + DEFINE_STANDARD_RTTIEXT(StepVisual_CubicBezierTessellatedEdge, StepVisual_TessellatedEdge) + +}; + +#endif // _StepVisual_CubicBezierTessellatedEdge_HeaderFile_ diff --git a/src/StepVisual/StepVisual_CubicBezierTriangulatedFace.cxx b/src/StepVisual/StepVisual_CubicBezierTriangulatedFace.cxx new file mode 100644 index 0000000000..9c0a32e93f --- /dev/null +++ b/src/StepVisual/StepVisual_CubicBezierTriangulatedFace.cxx @@ -0,0 +1,80 @@ +// Created on : Thu Mar 24 18:30:11 2022 +// Created by: snn +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V2.0 +// Copyright (c) Open CASCADE 2022 +// +// This file is part of Open CASCADE Technology software library. +// +// This library is free software; you can redistribute it and/or modify it under +// the terms of the GNU Lesser General Public License version 2.1 as published +// by the Free Software Foundation, with special exception defined in the file +// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT +// distribution for complete text of the license and disclaimer of any warranty. +// +// Alternatively, this file may be used under the terms of Open CASCADE +// commercial license or contractual agreement. + +#include + +IMPLEMENT_STANDARD_RTTIEXT(StepVisual_CubicBezierTriangulatedFace, StepVisual_TessellatedFace) + +//======================================================================= +//function : StepVisual_CubicBezierTriangulatedFace +//purpose : +//======================================================================= + +StepVisual_CubicBezierTriangulatedFace::StepVisual_CubicBezierTriangulatedFace () +{ +} + +//======================================================================= +//function : Init +//purpose : +//======================================================================= + +void StepVisual_CubicBezierTriangulatedFace::Init (const Handle(TCollection_HAsciiString)& theRepresentationItem_Name, + const Handle(StepVisual_CoordinatesList)& theTessellatedFace_Coordinates, + const Standard_Integer theTessellatedFace_Pnmax, + const Handle(TColStd_HArray2OfReal)& theTessellatedFace_Normals, + const Standard_Boolean theHasTessellatedFace_GeometricLink, + const StepVisual_FaceOrSurface& theTessellatedFace_GeometricLink, + const Handle(TColStd_HArray2OfInteger)& theCtriangles) +{ + StepVisual_TessellatedFace::Init(theRepresentationItem_Name, + theTessellatedFace_Coordinates, + theTessellatedFace_Pnmax, + theTessellatedFace_Normals, + theHasTessellatedFace_GeometricLink, + theTessellatedFace_GeometricLink); + + myCtriangles = theCtriangles; +} + +//======================================================================= +//function : Ctriangles +//purpose : +//======================================================================= + +Handle(TColStd_HArray2OfInteger) StepVisual_CubicBezierTriangulatedFace::Ctriangles () const +{ + return myCtriangles; +} + +//======================================================================= +//function : SetCtriangles +//purpose : +//======================================================================= + +void StepVisual_CubicBezierTriangulatedFace::SetCtriangles(const Handle(TColStd_HArray2OfInteger)& theCtriangles) +{ + myCtriangles = theCtriangles; +} + +Standard_Integer StepVisual_CubicBezierTriangulatedFace::NbCtriangles() const +{ + if (myCtriangles.IsNull()) + { + return 0; + } + return myCtriangles->ColLength(); +} \ No newline at end of file diff --git a/src/StepVisual/StepVisual_CubicBezierTriangulatedFace.hxx b/src/StepVisual/StepVisual_CubicBezierTriangulatedFace.hxx new file mode 100644 index 0000000000..56b41f2e6b --- /dev/null +++ b/src/StepVisual/StepVisual_CubicBezierTriangulatedFace.hxx @@ -0,0 +1,63 @@ +// Created on : Thu Mar 24 18:30:11 2022 +// Created by: snn +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V2.0 +// Copyright (c) Open CASCADE 2022 +// +// 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 _StepVisual_CubicBezierTriangulatedFace_HeaderFile_ +#define _StepVisual_CubicBezierTriangulatedFace_HeaderFile_ + +#include +#include +#include + +#include + +DEFINE_STANDARD_HANDLE(StepVisual_CubicBezierTriangulatedFace, StepVisual_TessellatedFace) + +//! Representation of STEP entity CubicBezierTriangulatedFace +class StepVisual_CubicBezierTriangulatedFace : public StepVisual_TessellatedFace +{ + +public : + + //! default constructor + Standard_EXPORT StepVisual_CubicBezierTriangulatedFace(); + + //! Initialize all fields (own and inherited) + Standard_EXPORT void Init(const Handle(TCollection_HAsciiString)& theRepresentationItem_Name, + const Handle(StepVisual_CoordinatesList)& theTessellatedFace_Coordinates, + const Standard_Integer theTessellatedFace_Pnmax, + const Handle(TColStd_HArray2OfReal)& theTessellatedFace_Normals, + const Standard_Boolean theHasTessellatedFace_GeometricLink, + const StepVisual_FaceOrSurface& theTessellatedFace_GeometricLink, + const Handle(TColStd_HArray2OfInteger)& theCtriangles); + + //! Returns field Ctriangles + Standard_EXPORT Handle(TColStd_HArray2OfInteger) Ctriangles() const; + + //! Sets field Ctriangles + Standard_EXPORT void SetCtriangles (const Handle(TColStd_HArray2OfInteger)& theCtriangles); + + //! Returns number of Ctriangles + Standard_EXPORT Standard_Integer NbCtriangles() const; + + DEFINE_STANDARD_RTTIEXT(StepVisual_CubicBezierTriangulatedFace, StepVisual_TessellatedFace) + +private: + + Handle(TColStd_HArray2OfInteger) myCtriangles; + +}; + +#endif // _StepVisual_CubicBezierTriangulatedFace_HeaderFile_ diff --git a/src/StepVisual/StepVisual_EdgeOrCurve.cxx b/src/StepVisual/StepVisual_EdgeOrCurve.cxx new file mode 100644 index 0000000000..17f8f67ae0 --- /dev/null +++ b/src/StepVisual/StepVisual_EdgeOrCurve.cxx @@ -0,0 +1,61 @@ +// Created on : Thu Mar 24 18:30:12 2022 +// Created by: snn +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V2.0 +// Copyright (c) Open CASCADE 2022 +// +// This file is part of Open CASCADE Technology software library. +// +// This library is free software; you can redistribute it and/or modify it under +// the terms of the GNU Lesser General Public License version 2.1 as published +// by the Free Software Foundation, with special exception defined in the file +// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT +// distribution for complete text of the license and disclaimer of any warranty. +// +// Alternatively, this file may be used under the terms of Open CASCADE +// commercial license or contractual agreement. + +#include +#include +#include + +//======================================================================= +//function : StepVisual_EdgeOrCurve +//purpose : +//======================================================================= + +StepVisual_EdgeOrCurve::StepVisual_EdgeOrCurve () +{ +} + +//======================================================================= +//function : CaseNum +//purpose : +//======================================================================= + +Standard_Integer StepVisual_EdgeOrCurve::CaseNum (const Handle(Standard_Transient)& ent) const +{ + if (ent.IsNull()) return 0; + if (ent->IsKind(STANDARD_TYPE(StepGeom_Curve))) return 1; + if (ent->IsKind(STANDARD_TYPE(StepShape_Edge))) return 2; + return 0; +} + +//======================================================================= +//function : Curve +//purpose : +//======================================================================= + +Handle(StepGeom_Curve) StepVisual_EdgeOrCurve::Curve () const +{ + return Handle(StepGeom_Curve)::DownCast(Value()); +} + +//======================================================================= +//function : Edge +//purpose : +//======================================================================= + +Handle(StepShape_Edge) StepVisual_EdgeOrCurve::Edge () const +{ + return Handle(StepShape_Edge)::DownCast(Value()); +} diff --git a/src/StepVisual/StepVisual_EdgeOrCurve.hxx b/src/StepVisual/StepVisual_EdgeOrCurve.hxx new file mode 100644 index 0000000000..70a61bb3f9 --- /dev/null +++ b/src/StepVisual/StepVisual_EdgeOrCurve.hxx @@ -0,0 +1,53 @@ +// Created on : Thu Mar 24 18:30:12 2022 +// Created by: snn +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V2.0 +// Copyright (c) Open CASCADE 2022 +// +// 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 _StepVisual_EdgeOrCurve_HeaderFile +#define _StepVisual_EdgeOrCurve_HeaderFile + +#include +#include +#include +#include +#include + +class Standard_Transient; +class StepGeom_Curve; +class StepShape_Edge; + +//! Representation of STEP SELECT type EdgeOrCurve +class StepVisual_EdgeOrCurve : public StepData_SelectType +{ + +public: + + DEFINE_STANDARD_ALLOC + + //! Empty constructor + Standard_EXPORT StepVisual_EdgeOrCurve(); + + //! Recognizes a kind of EdgeOrCurve select type + //! -- 1 -> Curve + //! -- 2 -> Edge + Standard_EXPORT Standard_Integer CaseNum (const Handle(Standard_Transient)& ent) const Standard_OVERRIDE; + + //! Returns Value as Curve (or Null if another type) + Standard_EXPORT Handle(StepGeom_Curve) Curve() const; + + //! Returns Value as Edge (or Null if another type) + Standard_EXPORT Handle(StepShape_Edge) Edge() const; + +}; +#endif // _StepVisual_EdgeOrCurve_HeaderFile diff --git a/src/StepVisual/StepVisual_FaceOrSurface.cxx b/src/StepVisual/StepVisual_FaceOrSurface.cxx new file mode 100644 index 0000000000..e0819ce242 --- /dev/null +++ b/src/StepVisual/StepVisual_FaceOrSurface.cxx @@ -0,0 +1,61 @@ +// Created on : Thu Mar 24 18:30:12 2022 +// Created by: snn +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V2.0 +// Copyright (c) Open CASCADE 2022 +// +// This file is part of Open CASCADE Technology software library. +// +// This library is free software; you can redistribute it and/or modify it under +// the terms of the GNU Lesser General Public License version 2.1 as published +// by the Free Software Foundation, with special exception defined in the file +// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT +// distribution for complete text of the license and disclaimer of any warranty. +// +// Alternatively, this file may be used under the terms of Open CASCADE +// commercial license or contractual agreement. + +#include +#include +#include + +//======================================================================= +//function : StepVisual_FaceOrSurface +//purpose : +//======================================================================= + +StepVisual_FaceOrSurface::StepVisual_FaceOrSurface () +{ +} + +//======================================================================= +//function : CaseNum +//purpose : +//======================================================================= + +Standard_Integer StepVisual_FaceOrSurface::CaseNum (const Handle(Standard_Transient)& ent) const +{ + if (ent.IsNull()) return 0; + if (ent->IsKind(STANDARD_TYPE(StepShape_Face))) return 1; + if (ent->IsKind(STANDARD_TYPE(StepGeom_Surface))) return 2; + return 0; +} + +//======================================================================= +//function : Face +//purpose : +//======================================================================= + +Handle(StepShape_Face) StepVisual_FaceOrSurface::Face () const +{ + return Handle(StepShape_Face)::DownCast(Value()); +} + +//======================================================================= +//function : Surface +//purpose : +//======================================================================= + +Handle(StepGeom_Surface) StepVisual_FaceOrSurface::Surface () const +{ + return Handle(StepGeom_Surface)::DownCast(Value()); +} diff --git a/src/StepVisual/StepVisual_FaceOrSurface.hxx b/src/StepVisual/StepVisual_FaceOrSurface.hxx new file mode 100644 index 0000000000..78a08f8df8 --- /dev/null +++ b/src/StepVisual/StepVisual_FaceOrSurface.hxx @@ -0,0 +1,53 @@ +// Created on : Thu Mar 24 18:30:12 2022 +// Created by: snn +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V2.0 +// Copyright (c) Open CASCADE 2022 +// +// 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 _StepVisual_FaceOrSurface_HeaderFile +#define _StepVisual_FaceOrSurface_HeaderFile + +#include +#include +#include +#include +#include + +class Standard_Transient; +class StepShape_Face; +class StepGeom_Surface; + +//! Representation of STEP SELECT type FaceOrSurface +class StepVisual_FaceOrSurface : public StepData_SelectType +{ + +public: + + DEFINE_STANDARD_ALLOC + + //! Empty constructor + Standard_EXPORT StepVisual_FaceOrSurface(); + + //! Recognizes a kind of FaceOrSurface select type + //! -- 1 -> Face + //! -- 2 -> Surface + Standard_EXPORT Standard_Integer CaseNum (const Handle(Standard_Transient)& ent) const Standard_OVERRIDE; + + //! Returns Value as Face (or Null if another type) + Standard_EXPORT Handle(StepShape_Face) Face() const; + + //! Returns Value as Surface (or Null if another type) + Standard_EXPORT Handle(StepGeom_Surface) Surface() const; + +}; +#endif // _StepVisual_FaceOrSurface_HeaderFile diff --git a/src/StepVisual/StepVisual_HArray1OfTessellatedEdgeOrVertex.hxx b/src/StepVisual/StepVisual_HArray1OfTessellatedEdgeOrVertex.hxx new file mode 100644 index 0000000000..0ab282ca5c --- /dev/null +++ b/src/StepVisual/StepVisual_HArray1OfTessellatedEdgeOrVertex.hxx @@ -0,0 +1,26 @@ +// Created on : Thu Mar 24 18:30:12 2022 +// Created by: snn +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V2.0 +// Copyright (c) Open CASCADE 2022 +// +// 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 StepVisual_HArray1OfTessellatedEdgeOrVertex_HeaderFile +#define StepVisual_HArray1OfTessellatedEdgeOrVertex_HeaderFile + +#include +#include + +DEFINE_HARRAY1(StepVisual_HArray1OfTessellatedEdgeOrVertex, StepVisual_Array1OfTessellatedEdgeOrVertex); + +#endif diff --git a/src/StepVisual/StepVisual_HArray1OfTessellatedStructuredItem.hxx b/src/StepVisual/StepVisual_HArray1OfTessellatedStructuredItem.hxx new file mode 100644 index 0000000000..cb6a2a1f85 --- /dev/null +++ b/src/StepVisual/StepVisual_HArray1OfTessellatedStructuredItem.hxx @@ -0,0 +1,26 @@ +// Created on : Thu Mar 24 18:30:12 2022 +// Created by: snn +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V2.0 +// Copyright (c) Open CASCADE 2022 +// +// 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 StepVisual_HArray1OfTessellatedStructuredItem_HeaderFile +#define StepVisual_HArray1OfTessellatedStructuredItem_HeaderFile + +#include +#include + +DEFINE_HARRAY1(StepVisual_HArray1OfTessellatedStructuredItem, StepVisual_Array1OfTessellatedStructuredItem); + +#endif diff --git a/src/StepVisual/StepVisual_PathOrCompositeCurve.cxx b/src/StepVisual/StepVisual_PathOrCompositeCurve.cxx new file mode 100644 index 0000000000..5915494810 --- /dev/null +++ b/src/StepVisual/StepVisual_PathOrCompositeCurve.cxx @@ -0,0 +1,61 @@ +// Created on : Thu Mar 24 18:30:12 2022 +// Created by: snn +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V2.0 +// Copyright (c) Open CASCADE 2022 +// +// This file is part of Open CASCADE Technology software library. +// +// This library is free software; you can redistribute it and/or modify it under +// the terms of the GNU Lesser General Public License version 2.1 as published +// by the Free Software Foundation, with special exception defined in the file +// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT +// distribution for complete text of the license and disclaimer of any warranty. +// +// Alternatively, this file may be used under the terms of Open CASCADE +// commercial license or contractual agreement. + +#include +#include +#include + +//======================================================================= +//function : StepVisual_PathOrCompositeCurve +//purpose : +//======================================================================= + +StepVisual_PathOrCompositeCurve::StepVisual_PathOrCompositeCurve () +{ +} + +//======================================================================= +//function : CaseNum +//purpose : +//======================================================================= + +Standard_Integer StepVisual_PathOrCompositeCurve::CaseNum (const Handle(Standard_Transient)& ent) const +{ + if (ent.IsNull()) return 0; + if (ent->IsKind(STANDARD_TYPE(StepGeom_CompositeCurve))) return 1; + if (ent->IsKind(STANDARD_TYPE(StepShape_Path))) return 2; + return 0; +} + +//======================================================================= +//function : CompositeCurve +//purpose : +//======================================================================= + +Handle(StepGeom_CompositeCurve) StepVisual_PathOrCompositeCurve::CompositeCurve () const +{ + return Handle(StepGeom_CompositeCurve)::DownCast(Value()); +} + +//======================================================================= +//function : Path +//purpose : +//======================================================================= + +Handle(StepShape_Path) StepVisual_PathOrCompositeCurve::Path () const +{ + return Handle(StepShape_Path)::DownCast(Value()); +} diff --git a/src/StepVisual/StepVisual_PathOrCompositeCurve.hxx b/src/StepVisual/StepVisual_PathOrCompositeCurve.hxx new file mode 100644 index 0000000000..7eb81a0209 --- /dev/null +++ b/src/StepVisual/StepVisual_PathOrCompositeCurve.hxx @@ -0,0 +1,53 @@ +// Created on : Thu Mar 24 18:30:12 2022 +// Created by: snn +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V2.0 +// Copyright (c) Open CASCADE 2022 +// +// 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 _StepVisual_PathOrCompositeCurve_HeaderFile +#define _StepVisual_PathOrCompositeCurve_HeaderFile + +#include +#include +#include +#include +#include + +class Standard_Transient; +class StepGeom_CompositeCurve; +class StepShape_Path; + +//! Representation of STEP SELECT type PathOrCompositeCurve +class StepVisual_PathOrCompositeCurve : public StepData_SelectType +{ + +public: + + DEFINE_STANDARD_ALLOC + + //! Empty constructor + Standard_EXPORT StepVisual_PathOrCompositeCurve(); + + //! Recognizes a kind of PathOrCompositeCurve select type + //! -- 1 -> CompositeCurve + //! -- 2 -> Path + Standard_EXPORT Standard_Integer CaseNum (const Handle(Standard_Transient)& ent) const Standard_OVERRIDE; + + //! Returns Value as CompositeCurve (or Null if another type) + Standard_EXPORT Handle(StepGeom_CompositeCurve) CompositeCurve() const; + + //! Returns Value as Path (or Null if another type) + Standard_EXPORT Handle(StepShape_Path) Path() const; + +}; +#endif // _StepVisual_PathOrCompositeCurve_HeaderFile diff --git a/src/StepVisual/StepVisual_TessellatedConnectingEdge.cxx b/src/StepVisual/StepVisual_TessellatedConnectingEdge.cxx new file mode 100644 index 0000000000..51cb4bbace --- /dev/null +++ b/src/StepVisual/StepVisual_TessellatedConnectingEdge.cxx @@ -0,0 +1,213 @@ +// Created on : Thu Mar 24 18:30:12 2022 +// Created by: snn +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V2.0 +// Copyright (c) Open CASCADE 2022 +// +// This file is part of Open CASCADE Technology software library. +// +// This library is free software; you can redistribute it and/or modify it under +// the terms of the GNU Lesser General Public License version 2.1 as published +// by the Free Software Foundation, with special exception defined in the file +// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT +// distribution for complete text of the license and disclaimer of any warranty. +// +// Alternatively, this file may be used under the terms of Open CASCADE +// commercial license or contractual agreement. + +#include + +IMPLEMENT_STANDARD_RTTIEXT(StepVisual_TessellatedConnectingEdge, StepVisual_TessellatedEdge) + +//======================================================================= +//function : StepVisual_TessellatedConnectingEdge +//purpose : +//======================================================================= + +StepVisual_TessellatedConnectingEdge::StepVisual_TessellatedConnectingEdge () +{ +} + +//======================================================================= +//function : Init +//purpose : +//======================================================================= + +void StepVisual_TessellatedConnectingEdge::Init (const Handle(TCollection_HAsciiString)& theRepresentationItem_Name, + const Handle(StepVisual_CoordinatesList)& theTessellatedEdge_Coordinates, + const Standard_Boolean theHasTessellatedEdge_GeometricLink, + const StepVisual_EdgeOrCurve& theTessellatedEdge_GeometricLink, + const Handle(TColStd_HArray1OfInteger)& theTessellatedEdge_LineStrip, + const StepData_Logical theSmooth, + const Handle(StepVisual_TessellatedFace)& theFace1, + const Handle(StepVisual_TessellatedFace)& theFace2, + const Handle(TColStd_HArray1OfInteger)& theLineStripFace1, + const Handle(TColStd_HArray1OfInteger)& theLineStripFace2) +{ + StepVisual_TessellatedEdge::Init(theRepresentationItem_Name, + theTessellatedEdge_Coordinates, + theHasTessellatedEdge_GeometricLink, + theTessellatedEdge_GeometricLink, + theTessellatedEdge_LineStrip); + + mySmooth = theSmooth; + + myFace1 = theFace1; + + myFace2 = theFace2; + + myLineStripFace1 = theLineStripFace1; + + myLineStripFace2 = theLineStripFace2; +} + +//======================================================================= +//function : Smooth +//purpose : +//======================================================================= + +StepData_Logical StepVisual_TessellatedConnectingEdge::Smooth () const +{ + return mySmooth; +} + +//======================================================================= +//function : SetSmooth +//purpose : +//======================================================================= + +void StepVisual_TessellatedConnectingEdge::SetSmooth(const StepData_Logical theSmooth) +{ + mySmooth = theSmooth; +} + +//======================================================================= +//function : Face1 +//purpose : +//======================================================================= + +Handle(StepVisual_TessellatedFace) StepVisual_TessellatedConnectingEdge::Face1 () const +{ + return myFace1; +} + +//======================================================================= +//function : SetFace1 +//purpose : +//======================================================================= + +void StepVisual_TessellatedConnectingEdge::SetFace1(const Handle(StepVisual_TessellatedFace)& theFace1) +{ + myFace1 = theFace1; +} + +//======================================================================= +//function : Face2 +//purpose : +//======================================================================= + +Handle(StepVisual_TessellatedFace) StepVisual_TessellatedConnectingEdge::Face2 () const +{ + return myFace2; +} + +//======================================================================= +//function : SetFace2 +//purpose : +//======================================================================= + +void StepVisual_TessellatedConnectingEdge::SetFace2(const Handle(StepVisual_TessellatedFace)& theFace2) +{ + myFace2 = theFace2; +} + +//======================================================================= +//function : LineStripFace1 +//purpose : +//======================================================================= + +Handle(TColStd_HArray1OfInteger) StepVisual_TessellatedConnectingEdge::LineStripFace1 () const +{ + return myLineStripFace1; +} + +//======================================================================= +//function : SetLineStripFace1 +//purpose : +//======================================================================= + +void StepVisual_TessellatedConnectingEdge::SetLineStripFace1(const Handle(TColStd_HArray1OfInteger)& theLineStripFace1) +{ + myLineStripFace1 = theLineStripFace1; +} + + +//======================================================================= +//function : NbLineStripFace1 +//purpose : +//======================================================================= + +Standard_Integer StepVisual_TessellatedConnectingEdge::NbLineStripFace1() const +{ + if (myLineStripFace1.IsNull()) + { + return 0; + } + return myLineStripFace1->Length(); +} + + +//======================================================================= +//function : LineStripFace1Value +//purpose : +//======================================================================= + +Standard_Integer StepVisual_TessellatedConnectingEdge::LineStripFace1Value(const Standard_Integer theNum) const +{ + return myLineStripFace1->Value(theNum); +} + +//======================================================================= +//function : LineStripFace2 +//purpose : +//======================================================================= + +Handle(TColStd_HArray1OfInteger) StepVisual_TessellatedConnectingEdge::LineStripFace2 () const +{ + return myLineStripFace2; +} + +//======================================================================= +//function : SetLineStripFace2 +//purpose : +//======================================================================= + +void StepVisual_TessellatedConnectingEdge::SetLineStripFace2(const Handle(TColStd_HArray1OfInteger)& theLineStripFace2) +{ + myLineStripFace2 = theLineStripFace2; +} + + +//======================================================================= +//function : NbLineStripFace2 +//purpose : +//======================================================================= + +Standard_Integer StepVisual_TessellatedConnectingEdge::NbLineStripFace2() const +{ + if (myLineStripFace2.IsNull()) + { + return 0; + } + return myLineStripFace2->Length(); +} + + +//======================================================================= +//function : LineStripFace2Value +//purpose : +//======================================================================= + +Standard_Integer StepVisual_TessellatedConnectingEdge::LineStripFace2Value(const Standard_Integer theNum) const +{ + return myLineStripFace2->Value(theNum); +} diff --git a/src/StepVisual/StepVisual_TessellatedConnectingEdge.hxx b/src/StepVisual/StepVisual_TessellatedConnectingEdge.hxx new file mode 100644 index 0000000000..d240baf80d --- /dev/null +++ b/src/StepVisual/StepVisual_TessellatedConnectingEdge.hxx @@ -0,0 +1,105 @@ +// Created on : Thu Mar 24 18:30:12 2022 +// Created by: snn +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V2.0 +// Copyright (c) Open CASCADE 2022 +// +// 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 _StepVisual_TessellatedConnectingEdge_HeaderFile_ +#define _StepVisual_TessellatedConnectingEdge_HeaderFile_ + +#include +#include +#include + +#include +#include +#include + +DEFINE_STANDARD_HANDLE(StepVisual_TessellatedConnectingEdge, StepVisual_TessellatedEdge) + +//! Representation of STEP entity TessellatedConnectingEdge +class StepVisual_TessellatedConnectingEdge : public StepVisual_TessellatedEdge +{ + +public : + + //! default constructor + Standard_EXPORT StepVisual_TessellatedConnectingEdge(); + + //! Initialize all fields (own and inherited) + Standard_EXPORT void Init(const Handle(TCollection_HAsciiString)& theRepresentationItem_Name, + const Handle(StepVisual_CoordinatesList)& theTessellatedEdge_Coordinates, + const Standard_Boolean theHasTessellatedEdge_GeometricLink, + const StepVisual_EdgeOrCurve& theTessellatedEdge_GeometricLink, + const Handle(TColStd_HArray1OfInteger)& theTessellatedEdge_LineStrip, + const StepData_Logical theSmooth, + const Handle(StepVisual_TessellatedFace)& theFace1, + const Handle(StepVisual_TessellatedFace)& theFace2, + const Handle(TColStd_HArray1OfInteger)& theLineStripFace1, + const Handle(TColStd_HArray1OfInteger)& theLineStripFace2); + + //! Returns field Smooth + Standard_EXPORT StepData_Logical Smooth() const; + + //! Sets field Smooth + Standard_EXPORT void SetSmooth (const StepData_Logical theSmooth); + + //! Returns field Face1 + Standard_EXPORT Handle(StepVisual_TessellatedFace) Face1() const; + + //! Sets field Face1 + Standard_EXPORT void SetFace1 (const Handle(StepVisual_TessellatedFace)& theFace1); + + //! Returns field Face2 + Standard_EXPORT Handle(StepVisual_TessellatedFace) Face2() const; + + //! Sets field Face2 + Standard_EXPORT void SetFace2 (const Handle(StepVisual_TessellatedFace)& theFace2); + + //! Returns field LineStripFace1 + Standard_EXPORT Handle(TColStd_HArray1OfInteger) LineStripFace1() const; + + //! Sets field LineStripFace1 + Standard_EXPORT void SetLineStripFace1 (const Handle(TColStd_HArray1OfInteger)& theLineStripFace1); + + //! Returns number of LineStripFace1 + Standard_EXPORT Standard_Integer NbLineStripFace1() const; + + //! Returns value of LineStripFace1 by its num + Standard_EXPORT Standard_Integer LineStripFace1Value(const Standard_Integer theNum) const; + + //! Returns field LineStripFace2 + Standard_EXPORT Handle(TColStd_HArray1OfInteger) LineStripFace2() const; + + //! Sets field LineStripFace2 + Standard_EXPORT void SetLineStripFace2 (const Handle(TColStd_HArray1OfInteger)& theLineStripFace2); + + //! Returns number of LineStripFace2 + Standard_EXPORT Standard_Integer NbLineStripFace2() const; + + //! Returns value of LineStripFace2 by its num + Standard_EXPORT Standard_Integer LineStripFace2Value(const Standard_Integer theNum) const; + + DEFINE_STANDARD_RTTIEXT(StepVisual_TessellatedConnectingEdge, StepVisual_TessellatedEdge) + +private: + + StepData_Logical mySmooth; + Handle(StepVisual_TessellatedFace) myFace1; + Handle(StepVisual_TessellatedFace) myFace2; + Handle(TColStd_HArray1OfInteger) myLineStripFace1; + Handle(TColStd_HArray1OfInteger) myLineStripFace2; + +}; + +#endif // _StepVisual_TessellatedConnectingEdge_HeaderFile_ diff --git a/src/StepVisual/StepVisual_TessellatedEdge.cxx b/src/StepVisual/StepVisual_TessellatedEdge.cxx new file mode 100644 index 0000000000..7096b10ba0 --- /dev/null +++ b/src/StepVisual/StepVisual_TessellatedEdge.cxx @@ -0,0 +1,153 @@ +// Created on : Thu Mar 24 18:30:12 2022 +// Created by: snn +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V2.0 +// Copyright (c) Open CASCADE 2022 +// +// This file is part of Open CASCADE Technology software library. +// +// This library is free software; you can redistribute it and/or modify it under +// the terms of the GNU Lesser General Public License version 2.1 as published +// by the Free Software Foundation, with special exception defined in the file +// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT +// distribution for complete text of the license and disclaimer of any warranty. +// +// Alternatively, this file may be used under the terms of Open CASCADE +// commercial license or contractual agreement. + +#include + +IMPLEMENT_STANDARD_RTTIEXT(StepVisual_TessellatedEdge, StepVisual_TessellatedStructuredItem) + +//======================================================================= +//function : StepVisual_TessellatedEdge +//purpose : +//======================================================================= + +StepVisual_TessellatedEdge::StepVisual_TessellatedEdge () +{ + myHasGeometricLink = Standard_False; +} + +//======================================================================= +//function : Init +//purpose : +//======================================================================= + +void StepVisual_TessellatedEdge::Init (const Handle(TCollection_HAsciiString)& theRepresentationItem_Name, + const Handle(StepVisual_CoordinatesList)& theCoordinates, + const Standard_Boolean theHasGeometricLink, + const StepVisual_EdgeOrCurve& theGeometricLink, + const Handle(TColStd_HArray1OfInteger)& theLineStrip) +{ + StepVisual_TessellatedStructuredItem::Init(theRepresentationItem_Name); + + myCoordinates = theCoordinates; + + myHasGeometricLink = theHasGeometricLink; + if (myHasGeometricLink) + { + myGeometricLink = theGeometricLink; + } + else + { + myGeometricLink = StepVisual_EdgeOrCurve(); + } + + myLineStrip = theLineStrip; +} + +//======================================================================= +//function : Coordinates +//purpose : +//======================================================================= + +Handle(StepVisual_CoordinatesList) StepVisual_TessellatedEdge::Coordinates () const +{ + return myCoordinates; +} + +//======================================================================= +//function : SetCoordinates +//purpose : +//======================================================================= + +void StepVisual_TessellatedEdge::SetCoordinates(const Handle(StepVisual_CoordinatesList)& theCoordinates) +{ + myCoordinates = theCoordinates; +} + +//======================================================================= +//function : GeometricLink +//purpose : +//======================================================================= + +StepVisual_EdgeOrCurve StepVisual_TessellatedEdge::GeometricLink () const +{ + return myGeometricLink; +} + +//======================================================================= +//function : SetGeometricLink +//purpose : +//======================================================================= + +void StepVisual_TessellatedEdge::SetGeometricLink(const StepVisual_EdgeOrCurve& theGeometricLink) +{ + myGeometricLink = theGeometricLink; +} + +//======================================================================= +//function : HasGeometricLink +//purpose : +//======================================================================= + +Standard_Boolean StepVisual_TessellatedEdge::HasGeometricLink () const +{ + return myHasGeometricLink; +} + +//======================================================================= +//function : LineStrip +//purpose : +//======================================================================= + +Handle(TColStd_HArray1OfInteger) StepVisual_TessellatedEdge::LineStrip () const +{ + return myLineStrip; +} + +//======================================================================= +//function : SetLineStrip +//purpose : +//======================================================================= + +void StepVisual_TessellatedEdge::SetLineStrip(const Handle(TColStd_HArray1OfInteger)& theLineStrip) +{ + myLineStrip = theLineStrip; +} + + +//======================================================================= +//function : NbLineStrip +//purpose : +//======================================================================= + +Standard_Integer StepVisual_TessellatedEdge::NbLineStrip() const +{ + if (myLineStrip.IsNull()) + { + return 0; + } + return myLineStrip->Length(); +} + + +//======================================================================= +//function : LineStripValue +//purpose : +//======================================================================= + +Standard_Integer StepVisual_TessellatedEdge::LineStripValue(const Standard_Integer theNum) const +{ + return myLineStrip->Value(theNum); +} diff --git a/src/StepVisual/StepVisual_TessellatedEdge.hxx b/src/StepVisual/StepVisual_TessellatedEdge.hxx new file mode 100644 index 0000000000..70a3ced02a --- /dev/null +++ b/src/StepVisual/StepVisual_TessellatedEdge.hxx @@ -0,0 +1,84 @@ +// Created on : Thu Mar 24 18:30:12 2022 +// Created by: snn +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V2.0 +// Copyright (c) Open CASCADE 2022 +// +// 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 _StepVisual_TessellatedEdge_HeaderFile_ +#define _StepVisual_TessellatedEdge_HeaderFile_ + +#include +#include +#include + +#include +#include +#include + +DEFINE_STANDARD_HANDLE(StepVisual_TessellatedEdge, StepVisual_TessellatedStructuredItem) + +//! Representation of STEP entity TessellatedEdge +class StepVisual_TessellatedEdge : public StepVisual_TessellatedStructuredItem +{ + +public : + + //! default constructor + Standard_EXPORT StepVisual_TessellatedEdge(); + + //! Initialize all fields (own and inherited) + Standard_EXPORT void Init(const Handle(TCollection_HAsciiString)& theRepresentationItem_Name, + const Handle(StepVisual_CoordinatesList)& theCoordinates, + const Standard_Boolean theHasGeometricLink, + const StepVisual_EdgeOrCurve& theGeometricLink, + const Handle(TColStd_HArray1OfInteger)& theLineStrip); + + //! Returns field Coordinates + Standard_EXPORT Handle(StepVisual_CoordinatesList) Coordinates() const; + + //! Sets field Coordinates + Standard_EXPORT void SetCoordinates (const Handle(StepVisual_CoordinatesList)& theCoordinates); + + //! Returns field GeometricLink + Standard_EXPORT StepVisual_EdgeOrCurve GeometricLink() const; + + //! Sets field GeometricLink + Standard_EXPORT void SetGeometricLink (const StepVisual_EdgeOrCurve& theGeometricLink); + + //! Returns True if optional field GeometricLink is defined + Standard_EXPORT Standard_Boolean HasGeometricLink() const; + + //! Returns field LineStrip + Standard_EXPORT Handle(TColStd_HArray1OfInteger) LineStrip() const; + + //! Sets field LineStrip + Standard_EXPORT void SetLineStrip (const Handle(TColStd_HArray1OfInteger)& theLineStrip); + + //! Returns number of LineStrip + Standard_EXPORT Standard_Integer NbLineStrip() const; + + //! Returns value of LineStrip by its num + Standard_EXPORT Standard_Integer LineStripValue(const Standard_Integer theNum) const; + + DEFINE_STANDARD_RTTIEXT(StepVisual_TessellatedEdge, StepVisual_TessellatedStructuredItem) + +private: + + Handle(StepVisual_CoordinatesList) myCoordinates; + StepVisual_EdgeOrCurve myGeometricLink; //!< optional + Handle(TColStd_HArray1OfInteger) myLineStrip; + Standard_Boolean myHasGeometricLink; //!< flag "is GeometricLink defined" + +}; + +#endif // _StepVisual_TessellatedEdge_HeaderFile_ diff --git a/src/StepVisual/StepVisual_TessellatedEdgeOrVertex.cxx b/src/StepVisual/StepVisual_TessellatedEdgeOrVertex.cxx new file mode 100644 index 0000000000..b3f1c67aff --- /dev/null +++ b/src/StepVisual/StepVisual_TessellatedEdgeOrVertex.cxx @@ -0,0 +1,61 @@ +// Created on : Thu Mar 24 18:30:12 2022 +// Created by: snn +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V2.0 +// Copyright (c) Open CASCADE 2022 +// +// This file is part of Open CASCADE Technology software library. +// +// This library is free software; you can redistribute it and/or modify it under +// the terms of the GNU Lesser General Public License version 2.1 as published +// by the Free Software Foundation, with special exception defined in the file +// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT +// distribution for complete text of the license and disclaimer of any warranty. +// +// Alternatively, this file may be used under the terms of Open CASCADE +// commercial license or contractual agreement. + +#include +#include +#include + +//======================================================================= +//function : StepVisual_TessellatedEdgeOrVertex +//purpose : +//======================================================================= + +StepVisual_TessellatedEdgeOrVertex::StepVisual_TessellatedEdgeOrVertex () +{ +} + +//======================================================================= +//function : CaseNum +//purpose : +//======================================================================= + +Standard_Integer StepVisual_TessellatedEdgeOrVertex::CaseNum (const Handle(Standard_Transient)& ent) const +{ + if (ent.IsNull()) return 0; + if (ent->IsKind(STANDARD_TYPE(StepVisual_TessellatedEdge))) return 1; + if (ent->IsKind(STANDARD_TYPE(StepVisual_TessellatedVertex))) return 2; + return 0; +} + +//======================================================================= +//function : TessellatedEdge +//purpose : +//======================================================================= + +Handle(StepVisual_TessellatedEdge) StepVisual_TessellatedEdgeOrVertex::TessellatedEdge () const +{ + return Handle(StepVisual_TessellatedEdge)::DownCast(Value()); +} + +//======================================================================= +//function : TessellatedVertex +//purpose : +//======================================================================= + +Handle(StepVisual_TessellatedVertex) StepVisual_TessellatedEdgeOrVertex::TessellatedVertex () const +{ + return Handle(StepVisual_TessellatedVertex)::DownCast(Value()); +} diff --git a/src/StepVisual/StepVisual_TessellatedEdgeOrVertex.hxx b/src/StepVisual/StepVisual_TessellatedEdgeOrVertex.hxx new file mode 100644 index 0000000000..20a803755e --- /dev/null +++ b/src/StepVisual/StepVisual_TessellatedEdgeOrVertex.hxx @@ -0,0 +1,53 @@ +// Created on : Thu Mar 24 18:30:12 2022 +// Created by: snn +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V2.0 +// Copyright (c) Open CASCADE 2022 +// +// 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 _StepVisual_TessellatedEdgeOrVertex_HeaderFile +#define _StepVisual_TessellatedEdgeOrVertex_HeaderFile + +#include +#include +#include +#include +#include + +class Standard_Transient; +class StepVisual_TessellatedEdge; +class StepVisual_TessellatedVertex; + +//! Representation of STEP SELECT type TessellatedEdgeOrVertex +class StepVisual_TessellatedEdgeOrVertex : public StepData_SelectType +{ + +public: + + DEFINE_STANDARD_ALLOC + + //! Empty constructor + Standard_EXPORT StepVisual_TessellatedEdgeOrVertex(); + + //! Recognizes a kind of TessellatedEdgeOrVertex select type + //! -- 1 -> TessellatedEdge + //! -- 2 -> TessellatedVertex + Standard_EXPORT Standard_Integer CaseNum (const Handle(Standard_Transient)& ent) const Standard_OVERRIDE; + + //! Returns Value as TessellatedEdge (or Null if another type) + Standard_EXPORT Handle(StepVisual_TessellatedEdge) TessellatedEdge() const; + + //! Returns Value as TessellatedVertex (or Null if another type) + Standard_EXPORT Handle(StepVisual_TessellatedVertex) TessellatedVertex() const; + +}; +#endif // _StepVisual_TessellatedEdgeOrVertex_HeaderFile diff --git a/src/StepVisual/StepVisual_TessellatedFace.cxx b/src/StepVisual/StepVisual_TessellatedFace.cxx new file mode 100644 index 0000000000..1432d69d95 --- /dev/null +++ b/src/StepVisual/StepVisual_TessellatedFace.cxx @@ -0,0 +1,164 @@ +// Created on : Thu Mar 24 18:30:12 2022 +// Created by: snn +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V2.0 +// Copyright (c) Open CASCADE 2022 +// +// This file is part of Open CASCADE Technology software library. +// +// This library is free software; you can redistribute it and/or modify it under +// the terms of the GNU Lesser General Public License version 2.1 as published +// by the Free Software Foundation, with special exception defined in the file +// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT +// distribution for complete text of the license and disclaimer of any warranty. +// +// Alternatively, this file may be used under the terms of Open CASCADE +// commercial license or contractual agreement. + +#include + +IMPLEMENT_STANDARD_RTTIEXT(StepVisual_TessellatedFace, StepVisual_TessellatedStructuredItem) + +//======================================================================= +//function : StepVisual_TessellatedFace +//purpose : +//======================================================================= + +StepVisual_TessellatedFace::StepVisual_TessellatedFace () +{ + myHasGeometricLink = Standard_False; +} + +//======================================================================= +//function : Init +//purpose : +//======================================================================= + +void StepVisual_TessellatedFace::Init (const Handle(TCollection_HAsciiString)& theRepresentationItem_Name, + const Handle(StepVisual_CoordinatesList)& theCoordinates, + const Standard_Integer thePnmax, + const Handle(TColStd_HArray2OfReal)& theNormals, + const Standard_Boolean theHasGeometricLink, + const StepVisual_FaceOrSurface& theGeometricLink) +{ + StepVisual_TessellatedStructuredItem::Init(theRepresentationItem_Name); + + myCoordinates = theCoordinates; + + myPnmax = thePnmax; + + myNormals = theNormals; + + myHasGeometricLink = theHasGeometricLink; + if (myHasGeometricLink) + { + myGeometricLink = theGeometricLink; + } + else + { + myGeometricLink = StepVisual_FaceOrSurface(); + } +} + +//======================================================================= +//function : Coordinates +//purpose : +//======================================================================= + +Handle(StepVisual_CoordinatesList) StepVisual_TessellatedFace::Coordinates () const +{ + return myCoordinates; +} + +//======================================================================= +//function : SetCoordinates +//purpose : +//======================================================================= + +void StepVisual_TessellatedFace::SetCoordinates(const Handle(StepVisual_CoordinatesList)& theCoordinates) +{ + myCoordinates = theCoordinates; +} + +//======================================================================= +//function : Pnmax +//purpose : +//======================================================================= + +Standard_Integer StepVisual_TessellatedFace::Pnmax () const +{ + return myPnmax; +} + +//======================================================================= +//function : SetPnmax +//purpose : +//======================================================================= + +void StepVisual_TessellatedFace::SetPnmax(const Standard_Integer thePnmax) +{ + myPnmax = thePnmax; +} + +//======================================================================= +//function : Normals +//purpose : +//======================================================================= + +Handle(TColStd_HArray2OfReal) StepVisual_TessellatedFace::Normals () const +{ + return myNormals; +} + +//======================================================================= +//function : SetNormals +//purpose : +//======================================================================= + +void StepVisual_TessellatedFace::SetNormals(const Handle(TColStd_HArray2OfReal)& theNormals) +{ + myNormals = theNormals; +} + +//======================================================================= +//function : NbNormals +//purpose : +//======================================================================= + +Standard_Integer StepVisual_TessellatedFace::NbNormals() const +{ + if (myNormals.IsNull()) + { + return 0; + } + return myNormals->ColLength(); +} + +//======================================================================= +//function : GeometricLink +//purpose : +//======================================================================= + +StepVisual_FaceOrSurface StepVisual_TessellatedFace::GeometricLink () const +{ + return myGeometricLink; +} + +//======================================================================= +//function : SetGeometricLink +//purpose : +//======================================================================= + +void StepVisual_TessellatedFace::SetGeometricLink(const StepVisual_FaceOrSurface& theGeometricLink) +{ + myGeometricLink = theGeometricLink; +} + +//======================================================================= +//function : HasGeometricLink +//purpose : +//======================================================================= + +Standard_Boolean StepVisual_TessellatedFace::HasGeometricLink () const +{ + return myHasGeometricLink; +} diff --git a/src/StepVisual/StepVisual_TessellatedFace.hxx b/src/StepVisual/StepVisual_TessellatedFace.hxx new file mode 100644 index 0000000000..9386ed3822 --- /dev/null +++ b/src/StepVisual/StepVisual_TessellatedFace.hxx @@ -0,0 +1,89 @@ +// Created on : Thu Mar 24 18:30:12 2022 +// Created by: snn +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V2.0 +// Copyright (c) Open CASCADE 2022 +// +// 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 _StepVisual_TessellatedFace_HeaderFile_ +#define _StepVisual_TessellatedFace_HeaderFile_ + +#include +#include +#include + +#include +#include +#include + +DEFINE_STANDARD_HANDLE(StepVisual_TessellatedFace, StepVisual_TessellatedStructuredItem) + +//! Representation of STEP entity TessellatedFace +class StepVisual_TessellatedFace : public StepVisual_TessellatedStructuredItem +{ + +public : + + //! default constructor + Standard_EXPORT StepVisual_TessellatedFace(); + + //! Initialize all fields (own and inherited) + Standard_EXPORT void Init(const Handle(TCollection_HAsciiString)& theRepresentationItem_Name, + const Handle(StepVisual_CoordinatesList)& theCoordinates, + const Standard_Integer thePnmax, + const Handle(TColStd_HArray2OfReal)& theNormals, + const Standard_Boolean theHasGeometricLink, + const StepVisual_FaceOrSurface& theGeometricLink); + + //! Returns field Coordinates + Standard_EXPORT Handle(StepVisual_CoordinatesList) Coordinates() const; + + //! Sets field Coordinates + Standard_EXPORT void SetCoordinates (const Handle(StepVisual_CoordinatesList)& theCoordinates); + + //! Returns field Pnmax + Standard_EXPORT Standard_Integer Pnmax() const; + + //! Sets field Pnmax + Standard_EXPORT void SetPnmax (const Standard_Integer thePnmax); + + //! Returns field Normals + Standard_EXPORT Handle(TColStd_HArray2OfReal) Normals() const; + + //! Sets field Normals + Standard_EXPORT void SetNormals (const Handle(TColStd_HArray2OfReal)& theNormals); + + //! Returns number of Normals + Standard_EXPORT Standard_Integer NbNormals() const; + + //! Returns field GeometricLink + Standard_EXPORT StepVisual_FaceOrSurface GeometricLink() const; + + //! Sets field GeometricLink + Standard_EXPORT void SetGeometricLink (const StepVisual_FaceOrSurface& theGeometricLink); + + //! Returns True if optional field GeometricLink is defined + Standard_EXPORT Standard_Boolean HasGeometricLink() const; + + DEFINE_STANDARD_RTTIEXT(StepVisual_TessellatedFace, StepVisual_TessellatedStructuredItem) + +private: + + Handle(StepVisual_CoordinatesList) myCoordinates; + Standard_Integer myPnmax; + Handle(TColStd_HArray2OfReal) myNormals; + StepVisual_FaceOrSurface myGeometricLink; //!< optional + Standard_Boolean myHasGeometricLink; //!< flag "is GeometricLink defined" + +}; + +#endif // _StepVisual_TessellatedFace_HeaderFile_ diff --git a/src/StepVisual/StepVisual_TessellatedPointSet.cxx b/src/StepVisual/StepVisual_TessellatedPointSet.cxx new file mode 100644 index 0000000000..6950c9e422 --- /dev/null +++ b/src/StepVisual/StepVisual_TessellatedPointSet.cxx @@ -0,0 +1,110 @@ +// Created on : Thu Mar 24 18:30:12 2022 +// Created by: snn +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V2.0 +// Copyright (c) Open CASCADE 2022 +// +// This file is part of Open CASCADE Technology software library. +// +// This library is free software; you can redistribute it and/or modify it under +// the terms of the GNU Lesser General Public License version 2.1 as published +// by the Free Software Foundation, with special exception defined in the file +// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT +// distribution for complete text of the license and disclaimer of any warranty. +// +// Alternatively, this file may be used under the terms of Open CASCADE +// commercial license or contractual agreement. + +#include + +IMPLEMENT_STANDARD_RTTIEXT(StepVisual_TessellatedPointSet, StepVisual_TessellatedItem) + +//======================================================================= +//function : StepVisual_TessellatedPointSet +//purpose : +//======================================================================= + +StepVisual_TessellatedPointSet::StepVisual_TessellatedPointSet () +{ +} + +//======================================================================= +//function : Init +//purpose : +//======================================================================= + +void StepVisual_TessellatedPointSet::Init (const Handle(TCollection_HAsciiString)& theRepresentationItem_Name, + const Handle(StepVisual_CoordinatesList)& theCoordinates, + const Handle(TColStd_HArray1OfInteger)& thePointList) +{ + StepVisual_TessellatedItem::Init(theRepresentationItem_Name); + + myCoordinates = theCoordinates; + + myPointList = thePointList; +} + +//======================================================================= +//function : Coordinates +//purpose : +//======================================================================= + +Handle(StepVisual_CoordinatesList) StepVisual_TessellatedPointSet::Coordinates () const +{ + return myCoordinates; +} + +//======================================================================= +//function : SetCoordinates +//purpose : +//======================================================================= + +void StepVisual_TessellatedPointSet::SetCoordinates(const Handle(StepVisual_CoordinatesList)& theCoordinates) +{ + myCoordinates = theCoordinates; +} + +//======================================================================= +//function : PointList +//purpose : +//======================================================================= + +Handle(TColStd_HArray1OfInteger) StepVisual_TessellatedPointSet::PointList () const +{ + return myPointList; +} + +//======================================================================= +//function : SetPointList +//purpose : +//======================================================================= + +void StepVisual_TessellatedPointSet::SetPointList(const Handle(TColStd_HArray1OfInteger)& thePointList) +{ + myPointList = thePointList; +} + + +//======================================================================= +//function : NbPointList +//purpose : +//======================================================================= + +Standard_Integer StepVisual_TessellatedPointSet::NbPointList() const +{ + if (myPointList.IsNull()) + { + return 0; + } + return myPointList->Length(); +} + + +//======================================================================= +//function : PointListValue +//purpose : +//======================================================================= + +Standard_Integer StepVisual_TessellatedPointSet::PointListValue(const Standard_Integer theNum) const +{ + return myPointList->Value(theNum); +} diff --git a/src/StepVisual/StepVisual_TessellatedPointSet.hxx b/src/StepVisual/StepVisual_TessellatedPointSet.hxx new file mode 100644 index 0000000000..5f5595055b --- /dev/null +++ b/src/StepVisual/StepVisual_TessellatedPointSet.hxx @@ -0,0 +1,70 @@ +// Created on : Thu Mar 24 18:30:12 2022 +// Created by: snn +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V2.0 +// Copyright (c) Open CASCADE 2022 +// +// 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 _StepVisual_TessellatedPointSet_HeaderFile_ +#define _StepVisual_TessellatedPointSet_HeaderFile_ + +#include +#include +#include + +#include +#include + +DEFINE_STANDARD_HANDLE(StepVisual_TessellatedPointSet, StepVisual_TessellatedItem) + +//! Representation of STEP entity TessellatedPointSet +class StepVisual_TessellatedPointSet : public StepVisual_TessellatedItem +{ + +public : + + //! default constructor + Standard_EXPORT StepVisual_TessellatedPointSet(); + + //! Initialize all fields (own and inherited) + Standard_EXPORT void Init(const Handle(TCollection_HAsciiString)& theRepresentationItem_Name, + const Handle(StepVisual_CoordinatesList)& theCoordinates, + const Handle(TColStd_HArray1OfInteger)& thePointList); + + //! Returns field Coordinates + Standard_EXPORT Handle(StepVisual_CoordinatesList) Coordinates() const; + + //! Sets field Coordinates + Standard_EXPORT void SetCoordinates (const Handle(StepVisual_CoordinatesList)& theCoordinates); + + //! Returns field PointList + Standard_EXPORT Handle(TColStd_HArray1OfInteger) PointList() const; + + //! Sets field PointList + Standard_EXPORT void SetPointList (const Handle(TColStd_HArray1OfInteger)& thePointList); + + //! Returns number of PointList + Standard_EXPORT Standard_Integer NbPointList() const; + + //! Returns value of PointList by its num + Standard_EXPORT Standard_Integer PointListValue(const Standard_Integer theNum) const; + + DEFINE_STANDARD_RTTIEXT(StepVisual_TessellatedPointSet, StepVisual_TessellatedItem) + +private: + + Handle(StepVisual_CoordinatesList) myCoordinates; + Handle(TColStd_HArray1OfInteger) myPointList; + +}; + +#endif // _StepVisual_TessellatedPointSet_HeaderFile_ diff --git a/src/StepVisual/StepVisual_TessellatedShapeRepresentation.cxx b/src/StepVisual/StepVisual_TessellatedShapeRepresentation.cxx new file mode 100644 index 0000000000..af9b81980b --- /dev/null +++ b/src/StepVisual/StepVisual_TessellatedShapeRepresentation.cxx @@ -0,0 +1,28 @@ +// Created on : Thu Mar 24 18:30:12 2022 +// Created by: snn +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V2.0 +// Copyright (c) Open CASCADE 2022 +// +// This file is part of Open CASCADE Technology software library. +// +// This library is free software; you can redistribute it and/or modify it under +// the terms of the GNU Lesser General Public License version 2.1 as published +// by the Free Software Foundation, with special exception defined in the file +// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT +// distribution for complete text of the license and disclaimer of any warranty. +// +// Alternatively, this file may be used under the terms of Open CASCADE +// commercial license or contractual agreement. + +#include + +IMPLEMENT_STANDARD_RTTIEXT(StepVisual_TessellatedShapeRepresentation, StepShape_ShapeRepresentation) + +//======================================================================= +//function : StepVisual_TessellatedShapeRepresentation +//purpose : +//======================================================================= + +StepVisual_TessellatedShapeRepresentation::StepVisual_TessellatedShapeRepresentation () +{ +} diff --git a/src/StepVisual/StepVisual_TessellatedShapeRepresentation.hxx b/src/StepVisual/StepVisual_TessellatedShapeRepresentation.hxx new file mode 100644 index 0000000000..579c8b9d1f --- /dev/null +++ b/src/StepVisual/StepVisual_TessellatedShapeRepresentation.hxx @@ -0,0 +1,40 @@ +// Created on : Thu Mar 24 18:30:12 2022 +// Created by: snn +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V2.0 +// Copyright (c) Open CASCADE 2022 +// +// 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 _StepVisual_TessellatedShapeRepresentation_HeaderFile_ +#define _StepVisual_TessellatedShapeRepresentation_HeaderFile_ + +#include +#include +#include + + +DEFINE_STANDARD_HANDLE(StepVisual_TessellatedShapeRepresentation, StepShape_ShapeRepresentation) + +//! Representation of STEP entity TessellatedShapeRepresentation +class StepVisual_TessellatedShapeRepresentation : public StepShape_ShapeRepresentation +{ + +public : + + //! default constructor + Standard_EXPORT StepVisual_TessellatedShapeRepresentation(); + + DEFINE_STANDARD_RTTIEXT(StepVisual_TessellatedShapeRepresentation, StepShape_ShapeRepresentation) + +}; + +#endif // _StepVisual_TessellatedShapeRepresentation_HeaderFile_ diff --git a/src/StepVisual/StepVisual_TessellatedShapeRepresentationWithAccuracyParameters.cxx b/src/StepVisual/StepVisual_TessellatedShapeRepresentationWithAccuracyParameters.cxx new file mode 100644 index 0000000000..99ba3d35d9 --- /dev/null +++ b/src/StepVisual/StepVisual_TessellatedShapeRepresentationWithAccuracyParameters.cxx @@ -0,0 +1,91 @@ +// Created on : Thu Mar 24 18:30:12 2022 +// Created by: snn +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V2.0 +// Copyright (c) Open CASCADE 2022 +// +// This file is part of Open CASCADE Technology software library. +// +// This library is free software; you can redistribute it and/or modify it under +// the terms of the GNU Lesser General Public License version 2.1 as published +// by the Free Software Foundation, with special exception defined in the file +// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT +// distribution for complete text of the license and disclaimer of any warranty. +// +// Alternatively, this file may be used under the terms of Open CASCADE +// commercial license or contractual agreement. + +#include + +IMPLEMENT_STANDARD_RTTIEXT(StepVisual_TessellatedShapeRepresentationWithAccuracyParameters, StepVisual_TessellatedShapeRepresentation) + +//======================================================================= +//function : StepVisual_TessellatedShapeRepresentationWithAccuracyParameters +//purpose : +//======================================================================= + +StepVisual_TessellatedShapeRepresentationWithAccuracyParameters::StepVisual_TessellatedShapeRepresentationWithAccuracyParameters () +{ +} + +//======================================================================= +//function : Init +//purpose : +//======================================================================= + +void StepVisual_TessellatedShapeRepresentationWithAccuracyParameters::Init (const Handle(TCollection_HAsciiString)& theRepresentation_Name, + const Handle(StepRepr_HArray1OfRepresentationItem)& theRepresentation_Items, + const Handle(StepRepr_RepresentationContext)& theRepresentation_ContextOfItems, + const Handle(TColStd_HArray1OfReal)& theTessellationAccuracyParameters) +{ + StepVisual_TessellatedShapeRepresentation::Init(theRepresentation_Name, + theRepresentation_Items, + theRepresentation_ContextOfItems); + + myTessellationAccuracyParameters = theTessellationAccuracyParameters; +} + +//======================================================================= +//function : TessellationAccuracyParameters +//purpose : +//======================================================================= + +Handle(TColStd_HArray1OfReal) StepVisual_TessellatedShapeRepresentationWithAccuracyParameters::TessellationAccuracyParameters () const +{ + return myTessellationAccuracyParameters; +} + +//======================================================================= +//function : SetTessellationAccuracyParameters +//purpose : +//======================================================================= + +void StepVisual_TessellatedShapeRepresentationWithAccuracyParameters::SetTessellationAccuracyParameters(const Handle(TColStd_HArray1OfReal)& theTessellationAccuracyParameters) +{ + myTessellationAccuracyParameters = theTessellationAccuracyParameters; +} + + +//======================================================================= +//function : NbTessellationAccuracyParameters +//purpose : +//======================================================================= + +Standard_Integer StepVisual_TessellatedShapeRepresentationWithAccuracyParameters::NbTessellationAccuracyParameters() const +{ + if (myTessellationAccuracyParameters.IsNull()) + { + return 0; + } + return myTessellationAccuracyParameters->Length(); +} + + +//======================================================================= +//function : TessellationAccuracyParametersValue +//purpose : +//======================================================================= + +const Standard_Real& StepVisual_TessellatedShapeRepresentationWithAccuracyParameters::TessellationAccuracyParametersValue(const Standard_Integer theNum) const +{ + return myTessellationAccuracyParameters->Value(theNum); +} diff --git a/src/StepVisual/StepVisual_TessellatedShapeRepresentationWithAccuracyParameters.hxx b/src/StepVisual/StepVisual_TessellatedShapeRepresentationWithAccuracyParameters.hxx new file mode 100644 index 0000000000..25bd62915d --- /dev/null +++ b/src/StepVisual/StepVisual_TessellatedShapeRepresentationWithAccuracyParameters.hxx @@ -0,0 +1,62 @@ +// Created on : Thu Mar 24 18:30:12 2022 +// Created by: snn +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V2.0 +// Copyright (c) Open CASCADE 2022 +// +// 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 _StepVisual_TessellatedShapeRepresentationWithAccuracyParameters_HeaderFile_ +#define _StepVisual_TessellatedShapeRepresentationWithAccuracyParameters_HeaderFile_ + +#include +#include +#include +#include + +DEFINE_STANDARD_HANDLE(StepVisual_TessellatedShapeRepresentationWithAccuracyParameters, StepVisual_TessellatedShapeRepresentation) + +//! Representation of STEP entity TessellatedShapeRepresentationWithAccuracyParameters +class StepVisual_TessellatedShapeRepresentationWithAccuracyParameters : public StepVisual_TessellatedShapeRepresentation +{ + +public : + + //! default constructor + Standard_EXPORT StepVisual_TessellatedShapeRepresentationWithAccuracyParameters(); + + //! Initialize all fields (own and inherited) + Standard_EXPORT void Init(const Handle(TCollection_HAsciiString)& theRepresentation_Name, + const Handle(StepRepr_HArray1OfRepresentationItem)& theRepresentation_Items, + const Handle(StepRepr_RepresentationContext)& theRepresentation_ContextOfItems, + const Handle(TColStd_HArray1OfReal)& theTessellationAccuracyParameters); + + //! Returns field TessellationAccuracyParameters + Standard_EXPORT Handle(TColStd_HArray1OfReal) TessellationAccuracyParameters() const; + + //! Sets field TessellationAccuracyParameters + Standard_EXPORT void SetTessellationAccuracyParameters (const Handle(TColStd_HArray1OfReal)& theTessellationAccuracyParameters); + + //! Returns number of TessellationAccuracyParameters + Standard_EXPORT Standard_Integer NbTessellationAccuracyParameters() const; + + //! Returns value of TessellationAccuracyParameters by its num + Standard_EXPORT const Standard_Real& TessellationAccuracyParametersValue(const Standard_Integer theNum) const; + + DEFINE_STANDARD_RTTIEXT(StepVisual_TessellatedShapeRepresentationWithAccuracyParameters, StepVisual_TessellatedShapeRepresentation) + +private: + + Handle(TColStd_HArray1OfReal) myTessellationAccuracyParameters; + +}; + +#endif // _StepVisual_TessellatedShapeRepresentationWithAccuracyParameters_HeaderFile_ diff --git a/src/StepVisual/StepVisual_TessellatedShell.cxx b/src/StepVisual/StepVisual_TessellatedShell.cxx new file mode 100644 index 0000000000..879282aba4 --- /dev/null +++ b/src/StepVisual/StepVisual_TessellatedShell.cxx @@ -0,0 +1,130 @@ +// Created on : Thu Mar 24 18:30:12 2022 +// Created by: snn +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V2.0 +// Copyright (c) Open CASCADE 2022 +// +// This file is part of Open CASCADE Technology software library. +// +// This library is free software; you can redistribute it and/or modify it under +// the terms of the GNU Lesser General Public License version 2.1 as published +// by the Free Software Foundation, with special exception defined in the file +// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT +// distribution for complete text of the license and disclaimer of any warranty. +// +// Alternatively, this file may be used under the terms of Open CASCADE +// commercial license or contractual agreement. + +#include + +IMPLEMENT_STANDARD_RTTIEXT(StepVisual_TessellatedShell, StepVisual_TessellatedItem) + +//======================================================================= +//function : StepVisual_TessellatedShell +//purpose : +//======================================================================= + +StepVisual_TessellatedShell::StepVisual_TessellatedShell () +{ + myHasTopologicalLink = Standard_False; +} + +//======================================================================= +//function : Init +//purpose : +//======================================================================= + +void StepVisual_TessellatedShell::Init (const Handle(TCollection_HAsciiString)& theRepresentationItem_Name, + const Handle(StepVisual_HArray1OfTessellatedStructuredItem)& theItems, + const Standard_Boolean theHasTopologicalLink, + const Handle(StepShape_ConnectedFaceSet)& theTopologicalLink) +{ + StepVisual_TessellatedItem::Init(theRepresentationItem_Name); + + myItems = theItems; + + myHasTopologicalLink = theHasTopologicalLink; + if (myHasTopologicalLink) + { + myTopologicalLink = theTopologicalLink; + } + else + { + myTopologicalLink.Nullify(); + } +} + +//======================================================================= +//function : Items +//purpose : +//======================================================================= + +Handle(StepVisual_HArray1OfTessellatedStructuredItem) StepVisual_TessellatedShell::Items () const +{ + return myItems; +} + +//======================================================================= +//function : SetItems +//purpose : +//======================================================================= + +void StepVisual_TessellatedShell::SetItems(const Handle(StepVisual_HArray1OfTessellatedStructuredItem)& theItems) +{ + myItems = theItems; +} + + +//======================================================================= +//function : NbItems +//purpose : +//======================================================================= + +Standard_Integer StepVisual_TessellatedShell::NbItems() const +{ + if (myItems.IsNull()) + { + return 0; + } + return myItems->Length(); +} + + +//======================================================================= +//function : ItemsValue +//purpose : +//======================================================================= + +Handle(StepVisual_TessellatedStructuredItem) StepVisual_TessellatedShell::ItemsValue(const Standard_Integer theNum) const +{ + return myItems->Value(theNum); +} + +//======================================================================= +//function : TopologicalLink +//purpose : +//======================================================================= + +Handle(StepShape_ConnectedFaceSet) StepVisual_TessellatedShell::TopologicalLink () const +{ + return myTopologicalLink; +} + +//======================================================================= +//function : SetTopologicalLink +//purpose : +//======================================================================= + +void StepVisual_TessellatedShell::SetTopologicalLink(const Handle(StepShape_ConnectedFaceSet)& theTopologicalLink) +{ + myTopologicalLink = theTopologicalLink; +} + +//======================================================================= +//function : HasTopologicalLink +//purpose : +//======================================================================= + +Standard_Boolean StepVisual_TessellatedShell::HasTopologicalLink () const +{ + return myHasTopologicalLink; +} diff --git a/src/StepVisual/StepVisual_TessellatedShell.hxx b/src/StepVisual/StepVisual_TessellatedShell.hxx new file mode 100644 index 0000000000..6b063e7b60 --- /dev/null +++ b/src/StepVisual/StepVisual_TessellatedShell.hxx @@ -0,0 +1,75 @@ +// Created on : Thu Mar 24 18:30:12 2022 +// Created by: snn +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V2.0 +// Copyright (c) Open CASCADE 2022 +// +// 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 _StepVisual_TessellatedShell_HeaderFile_ +#define _StepVisual_TessellatedShell_HeaderFile_ + +#include +#include +#include + +#include +#include + +DEFINE_STANDARD_HANDLE(StepVisual_TessellatedShell, StepVisual_TessellatedItem) + +//! Representation of STEP entity TessellatedShell +class StepVisual_TessellatedShell : public StepVisual_TessellatedItem +{ + +public : + + //! default constructor + Standard_EXPORT StepVisual_TessellatedShell(); + + //! Initialize all fields (own and inherited) + Standard_EXPORT void Init(const Handle(TCollection_HAsciiString)& theRepresentationItem_Name, + const Handle(StepVisual_HArray1OfTessellatedStructuredItem)& theItems, + const Standard_Boolean theHasTopologicalLink, + const Handle(StepShape_ConnectedFaceSet)& theTopologicalLink); + + //! Returns field Items + Standard_EXPORT Handle(StepVisual_HArray1OfTessellatedStructuredItem) Items() const; + + //! Sets field Items + Standard_EXPORT void SetItems (const Handle(StepVisual_HArray1OfTessellatedStructuredItem)& theItems); + + //! Returns number of Items + Standard_EXPORT Standard_Integer NbItems() const; + + //! Returns value of Items by its num + Standard_EXPORT Handle(StepVisual_TessellatedStructuredItem) ItemsValue(const Standard_Integer theNum) const; + + //! Returns field TopologicalLink + Standard_EXPORT Handle(StepShape_ConnectedFaceSet) TopologicalLink() const; + + //! Sets field TopologicalLink + Standard_EXPORT void SetTopologicalLink (const Handle(StepShape_ConnectedFaceSet)& theTopologicalLink); + + //! Returns True if optional field TopologicalLink is defined + Standard_EXPORT Standard_Boolean HasTopologicalLink() const; + + DEFINE_STANDARD_RTTIEXT(StepVisual_TessellatedShell, StepVisual_TessellatedItem) + +private: + + Handle(StepVisual_HArray1OfTessellatedStructuredItem) myItems; + Handle(StepShape_ConnectedFaceSet) myTopologicalLink; //!< optional + Standard_Boolean myHasTopologicalLink; //!< flag "is TopologicalLink defined" + +}; + +#endif // _StepVisual_TessellatedShell_HeaderFile_ diff --git a/src/StepVisual/StepVisual_TessellatedSolid.cxx b/src/StepVisual/StepVisual_TessellatedSolid.cxx new file mode 100644 index 0000000000..169ecd240d --- /dev/null +++ b/src/StepVisual/StepVisual_TessellatedSolid.cxx @@ -0,0 +1,130 @@ +// Created on : Thu Mar 24 18:30:12 2022 +// Created by: snn +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V2.0 +// Copyright (c) Open CASCADE 2022 +// +// This file is part of Open CASCADE Technology software library. +// +// This library is free software; you can redistribute it and/or modify it under +// the terms of the GNU Lesser General Public License version 2.1 as published +// by the Free Software Foundation, with special exception defined in the file +// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT +// distribution for complete text of the license and disclaimer of any warranty. +// +// Alternatively, this file may be used under the terms of Open CASCADE +// commercial license or contractual agreement. + +#include + +IMPLEMENT_STANDARD_RTTIEXT(StepVisual_TessellatedSolid, StepVisual_TessellatedItem) + +//======================================================================= +//function : StepVisual_TessellatedSolid +//purpose : +//======================================================================= + +StepVisual_TessellatedSolid::StepVisual_TessellatedSolid () +{ + myHasGeometricLink = Standard_False; +} + +//======================================================================= +//function : Init +//purpose : +//======================================================================= + +void StepVisual_TessellatedSolid::Init (const Handle(TCollection_HAsciiString)& theRepresentationItem_Name, + const Handle(StepVisual_HArray1OfTessellatedStructuredItem)& theItems, + const Standard_Boolean theHasGeometricLink, + const Handle(StepShape_ManifoldSolidBrep)& theGeometricLink) +{ + StepVisual_TessellatedItem::Init(theRepresentationItem_Name); + + myItems = theItems; + + myHasGeometricLink = theHasGeometricLink; + if (myHasGeometricLink) + { + myGeometricLink = theGeometricLink; + } + else + { + myGeometricLink.Nullify(); + } +} + +//======================================================================= +//function : Items +//purpose : +//======================================================================= + +Handle(StepVisual_HArray1OfTessellatedStructuredItem) StepVisual_TessellatedSolid::Items () const +{ + return myItems; +} + +//======================================================================= +//function : SetItems +//purpose : +//======================================================================= + +void StepVisual_TessellatedSolid::SetItems(const Handle(StepVisual_HArray1OfTessellatedStructuredItem)& theItems) +{ + myItems = theItems; +} + + +//======================================================================= +//function : NbItems +//purpose : +//======================================================================= + +Standard_Integer StepVisual_TessellatedSolid::NbItems() const +{ + if (myItems.IsNull()) + { + return 0; + } + return myItems->Length(); +} + + +//======================================================================= +//function : ItemsValue +//purpose : +//======================================================================= + +Handle(StepVisual_TessellatedStructuredItem) StepVisual_TessellatedSolid::ItemsValue(const Standard_Integer theNum) const +{ + return myItems->Value(theNum); +} + +//======================================================================= +//function : GeometricLink +//purpose : +//======================================================================= + +Handle(StepShape_ManifoldSolidBrep) StepVisual_TessellatedSolid::GeometricLink () const +{ + return myGeometricLink; +} + +//======================================================================= +//function : SetGeometricLink +//purpose : +//======================================================================= + +void StepVisual_TessellatedSolid::SetGeometricLink(const Handle(StepShape_ManifoldSolidBrep)& theGeometricLink) +{ + myGeometricLink = theGeometricLink; +} + +//======================================================================= +//function : HasGeometricLink +//purpose : +//======================================================================= + +Standard_Boolean StepVisual_TessellatedSolid::HasGeometricLink () const +{ + return myHasGeometricLink; +} diff --git a/src/StepVisual/StepVisual_TessellatedSolid.hxx b/src/StepVisual/StepVisual_TessellatedSolid.hxx new file mode 100644 index 0000000000..3ee205142b --- /dev/null +++ b/src/StepVisual/StepVisual_TessellatedSolid.hxx @@ -0,0 +1,75 @@ +// Created on : Thu Mar 24 18:30:12 2022 +// Created by: snn +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V2.0 +// Copyright (c) Open CASCADE 2022 +// +// 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 _StepVisual_TessellatedSolid_HeaderFile_ +#define _StepVisual_TessellatedSolid_HeaderFile_ + +#include +#include +#include + +#include +#include + +DEFINE_STANDARD_HANDLE(StepVisual_TessellatedSolid, StepVisual_TessellatedItem) + +//! Representation of STEP entity TessellatedSolid +class StepVisual_TessellatedSolid : public StepVisual_TessellatedItem +{ + +public : + + //! default constructor + Standard_EXPORT StepVisual_TessellatedSolid(); + + //! Initialize all fields (own and inherited) + Standard_EXPORT void Init(const Handle(TCollection_HAsciiString)& theRepresentationItem_Name, + const Handle(StepVisual_HArray1OfTessellatedStructuredItem)& theItems, + const Standard_Boolean theHasGeometricLink, + const Handle(StepShape_ManifoldSolidBrep)& theGeometricLink); + + //! Returns field Items + Standard_EXPORT Handle(StepVisual_HArray1OfTessellatedStructuredItem) Items() const; + + //! Sets field Items + Standard_EXPORT void SetItems (const Handle(StepVisual_HArray1OfTessellatedStructuredItem)& theItems); + + //! Returns number of Items + Standard_EXPORT Standard_Integer NbItems() const; + + //! Returns value of Items by its num + Standard_EXPORT Handle(StepVisual_TessellatedStructuredItem) ItemsValue(const Standard_Integer theNum) const; + + //! Returns field GeometricLink + Standard_EXPORT Handle(StepShape_ManifoldSolidBrep) GeometricLink() const; + + //! Sets field GeometricLink + Standard_EXPORT void SetGeometricLink (const Handle(StepShape_ManifoldSolidBrep)& theGeometricLink); + + //! Returns True if optional field GeometricLink is defined + Standard_EXPORT Standard_Boolean HasGeometricLink() const; + + DEFINE_STANDARD_RTTIEXT(StepVisual_TessellatedSolid, StepVisual_TessellatedItem) + +private: + + Handle(StepVisual_HArray1OfTessellatedStructuredItem) myItems; + Handle(StepShape_ManifoldSolidBrep) myGeometricLink; //!< optional + Standard_Boolean myHasGeometricLink; //!< flag "is GeometricLink defined" + +}; + +#endif // _StepVisual_TessellatedSolid_HeaderFile_ diff --git a/src/StepVisual/StepVisual_TessellatedStructuredItem.cxx b/src/StepVisual/StepVisual_TessellatedStructuredItem.cxx new file mode 100644 index 0000000000..3a609e6f54 --- /dev/null +++ b/src/StepVisual/StepVisual_TessellatedStructuredItem.cxx @@ -0,0 +1,28 @@ +// Created on : Thu Mar 24 18:30:12 2022 +// Created by: snn +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V2.0 +// Copyright (c) Open CASCADE 2022 +// +// This file is part of Open CASCADE Technology software library. +// +// This library is free software; you can redistribute it and/or modify it under +// the terms of the GNU Lesser General Public License version 2.1 as published +// by the Free Software Foundation, with special exception defined in the file +// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT +// distribution for complete text of the license and disclaimer of any warranty. +// +// Alternatively, this file may be used under the terms of Open CASCADE +// commercial license or contractual agreement. + +#include + +IMPLEMENT_STANDARD_RTTIEXT(StepVisual_TessellatedStructuredItem, StepVisual_TessellatedItem) + +//======================================================================= +//function : StepVisual_TessellatedStructuredItem +//purpose : +//======================================================================= + +StepVisual_TessellatedStructuredItem::StepVisual_TessellatedStructuredItem () +{ +} diff --git a/src/StepVisual/StepVisual_TessellatedStructuredItem.hxx b/src/StepVisual/StepVisual_TessellatedStructuredItem.hxx new file mode 100644 index 0000000000..e2202aba86 --- /dev/null +++ b/src/StepVisual/StepVisual_TessellatedStructuredItem.hxx @@ -0,0 +1,40 @@ +// Created on : Thu Mar 24 18:30:12 2022 +// Created by: snn +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V2.0 +// Copyright (c) Open CASCADE 2022 +// +// 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 _StepVisual_TessellatedStructuredItem_HeaderFile_ +#define _StepVisual_TessellatedStructuredItem_HeaderFile_ + +#include +#include +#include + + +DEFINE_STANDARD_HANDLE(StepVisual_TessellatedStructuredItem, StepVisual_TessellatedItem) + +//! Representation of STEP entity TessellatedStructuredItem +class StepVisual_TessellatedStructuredItem : public StepVisual_TessellatedItem +{ + +public : + + //! default constructor + Standard_EXPORT StepVisual_TessellatedStructuredItem(); + + DEFINE_STANDARD_RTTIEXT(StepVisual_TessellatedStructuredItem, StepVisual_TessellatedItem) + +}; + +#endif // _StepVisual_TessellatedStructuredItem_HeaderFile_ diff --git a/src/StepVisual/StepVisual_TessellatedSurfaceSet.cxx b/src/StepVisual/StepVisual_TessellatedSurfaceSet.cxx new file mode 100644 index 0000000000..da09e06e3b --- /dev/null +++ b/src/StepVisual/StepVisual_TessellatedSurfaceSet.cxx @@ -0,0 +1,121 @@ +// Created on : Thu Mar 24 18:30:12 2022 +// Created by: snn +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V2.0 +// Copyright (c) Open CASCADE 2022 +// +// This file is part of Open CASCADE Technology software library. +// +// This library is free software; you can redistribute it and/or modify it under +// the terms of the GNU Lesser General Public License version 2.1 as published +// by the Free Software Foundation, with special exception defined in the file +// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT +// distribution for complete text of the license and disclaimer of any warranty. +// +// Alternatively, this file may be used under the terms of Open CASCADE +// commercial license or contractual agreement. + +#include + +IMPLEMENT_STANDARD_RTTIEXT(StepVisual_TessellatedSurfaceSet, StepVisual_TessellatedItem) + +//======================================================================= +//function : StepVisual_TessellatedSurfaceSet +//purpose : +//======================================================================= + +StepVisual_TessellatedSurfaceSet::StepVisual_TessellatedSurfaceSet () +{ +} + +//======================================================================= +//function : Init +//purpose : +//======================================================================= + +void StepVisual_TessellatedSurfaceSet::Init (const Handle(TCollection_HAsciiString)& theRepresentationItem_Name, + const Handle(StepVisual_CoordinatesList)& theCoordinates, + const Standard_Integer thePnmax, + const Handle(TColStd_HArray2OfReal)& theNormals) +{ + StepVisual_TessellatedItem::Init(theRepresentationItem_Name); + + myCoordinates = theCoordinates; + + myPnmax = thePnmax; + + myNormals = theNormals; +} + +//======================================================================= +//function : Coordinates +//purpose : +//======================================================================= + +Handle(StepVisual_CoordinatesList) StepVisual_TessellatedSurfaceSet::Coordinates () const +{ + return myCoordinates; +} + +//======================================================================= +//function : SetCoordinates +//purpose : +//======================================================================= + +void StepVisual_TessellatedSurfaceSet::SetCoordinates(const Handle(StepVisual_CoordinatesList)& theCoordinates) +{ + myCoordinates = theCoordinates; +} + +//======================================================================= +//function : Pnmax +//purpose : +//======================================================================= + +Standard_Integer StepVisual_TessellatedSurfaceSet::Pnmax () const +{ + return myPnmax; +} + +//======================================================================= +//function : SetPnmax +//purpose : +//======================================================================= + +void StepVisual_TessellatedSurfaceSet::SetPnmax(const Standard_Integer thePnmax) +{ + myPnmax = thePnmax; +} + +//======================================================================= +//function : Normals +//purpose : +//======================================================================= + +Handle(TColStd_HArray2OfReal) StepVisual_TessellatedSurfaceSet::Normals () const +{ + return myNormals; +} + +//======================================================================= +//function : SetNormals +//purpose : +//======================================================================= + +void StepVisual_TessellatedSurfaceSet::SetNormals(const Handle(TColStd_HArray2OfReal)& theNormals) +{ + myNormals = theNormals; +} + +//======================================================================= +//function : NbNormals +//purpose : +//======================================================================= + +Standard_Integer StepVisual_TessellatedSurfaceSet::NbNormals() const +{ + if (myNormals.IsNull()) + { + return 0; + } + return myNormals->ColLength(); +} \ No newline at end of file diff --git a/src/StepVisual/StepVisual_TessellatedSurfaceSet.hxx b/src/StepVisual/StepVisual_TessellatedSurfaceSet.hxx new file mode 100644 index 0000000000..436aa4645b --- /dev/null +++ b/src/StepVisual/StepVisual_TessellatedSurfaceSet.hxx @@ -0,0 +1,75 @@ +// Created on : Thu Mar 24 18:30:12 2022 +// Created by: snn +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V2.0 +// Copyright (c) Open CASCADE 2022 +// +// 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 _StepVisual_TessellatedSurfaceSet_HeaderFile_ +#define _StepVisual_TessellatedSurfaceSet_HeaderFile_ + +#include +#include +#include + +#include +#include + +DEFINE_STANDARD_HANDLE(StepVisual_TessellatedSurfaceSet, StepVisual_TessellatedItem) + +//! Representation of STEP entity TessellatedSurfaceSet +class StepVisual_TessellatedSurfaceSet : public StepVisual_TessellatedItem +{ + +public : + + //! default constructor + Standard_EXPORT StepVisual_TessellatedSurfaceSet(); + + //! Initialize all fields (own and inherited) + Standard_EXPORT void Init(const Handle(TCollection_HAsciiString)& theRepresentationItem_Name, + const Handle(StepVisual_CoordinatesList)& theCoordinates, + const Standard_Integer thePnmax, + const Handle(TColStd_HArray2OfReal)& theNormals); + + //! Returns field Coordinates + Standard_EXPORT Handle(StepVisual_CoordinatesList) Coordinates() const; + + //! Sets field Coordinates + Standard_EXPORT void SetCoordinates (const Handle(StepVisual_CoordinatesList)& theCoordinates); + + //! Returns field Pnmax + Standard_EXPORT Standard_Integer Pnmax() const; + + //! Sets field Pnmax + Standard_EXPORT void SetPnmax (const Standard_Integer thePnmax); + + //! Returns field Normals + Standard_EXPORT Handle(TColStd_HArray2OfReal) Normals() const; + + //! Sets field Normals + Standard_EXPORT void SetNormals (const Handle(TColStd_HArray2OfReal)& theNormals); + + //! Returns number of Normals + Standard_EXPORT Standard_Integer NbNormals() const; + + DEFINE_STANDARD_RTTIEXT(StepVisual_TessellatedSurfaceSet, StepVisual_TessellatedItem) + +private: + + Handle(StepVisual_CoordinatesList) myCoordinates; + Standard_Integer myPnmax; + Handle(TColStd_HArray2OfReal) myNormals; + +}; + +#endif // _StepVisual_TessellatedSurfaceSet_HeaderFile_ diff --git a/src/StepVisual/StepVisual_TessellatedVertex.cxx b/src/StepVisual/StepVisual_TessellatedVertex.cxx new file mode 100644 index 0000000000..59527941c3 --- /dev/null +++ b/src/StepVisual/StepVisual_TessellatedVertex.cxx @@ -0,0 +1,128 @@ +// Created on : Thu Mar 24 18:30:12 2022 +// Created by: snn +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V2.0 +// Copyright (c) Open CASCADE 2022 +// +// This file is part of Open CASCADE Technology software library. +// +// This library is free software; you can redistribute it and/or modify it under +// the terms of the GNU Lesser General Public License version 2.1 as published +// by the Free Software Foundation, with special exception defined in the file +// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT +// distribution for complete text of the license and disclaimer of any warranty. +// +// Alternatively, this file may be used under the terms of Open CASCADE +// commercial license or contractual agreement. + +#include + +IMPLEMENT_STANDARD_RTTIEXT(StepVisual_TessellatedVertex, StepVisual_TessellatedStructuredItem) + +//======================================================================= +//function : StepVisual_TessellatedVertex +//purpose : +//======================================================================= + +StepVisual_TessellatedVertex::StepVisual_TessellatedVertex () +{ + myPointIndex = 0; + myHasTopologicalLink = Standard_False; +} + +//======================================================================= +//function : Init +//purpose : +//======================================================================= + +void StepVisual_TessellatedVertex::Init (const Handle(TCollection_HAsciiString)& theRepresentationItem_Name, + const Handle(StepVisual_CoordinatesList)& theCoordinates, + const Standard_Boolean theHasTopologicalLink, + const Handle(StepShape_VertexPoint)& theTopologicalLink, + const Standard_Integer thePointIndex) +{ + StepVisual_TessellatedStructuredItem::Init(theRepresentationItem_Name); + + myCoordinates = theCoordinates; + + myHasTopologicalLink = theHasTopologicalLink; + if (myHasTopologicalLink) + { + myTopologicalLink = theTopologicalLink; + } + else + { + myTopologicalLink.Nullify(); + } + + myPointIndex = thePointIndex; +} + +//======================================================================= +//function : Coordinates +//purpose : +//======================================================================= + +Handle(StepVisual_CoordinatesList) StepVisual_TessellatedVertex::Coordinates () const +{ + return myCoordinates; +} + +//======================================================================= +//function : SetCoordinates +//purpose : +//======================================================================= + +void StepVisual_TessellatedVertex::SetCoordinates(const Handle(StepVisual_CoordinatesList)& theCoordinates) +{ + myCoordinates = theCoordinates; +} + +//======================================================================= +//function : TopologicalLink +//purpose : +//======================================================================= + +Handle(StepShape_VertexPoint) StepVisual_TessellatedVertex::TopologicalLink () const +{ + return myTopologicalLink; +} + +//======================================================================= +//function : SetTopologicalLink +//purpose : +//======================================================================= + +void StepVisual_TessellatedVertex::SetTopologicalLink(const Handle(StepShape_VertexPoint)& theTopologicalLink) +{ + myTopologicalLink = theTopologicalLink; +} + +//======================================================================= +//function : HasTopologicalLink +//purpose : +//======================================================================= + +Standard_Boolean StepVisual_TessellatedVertex::HasTopologicalLink () const +{ + return myHasTopologicalLink; +} + +//======================================================================= +//function : PointIndex +//purpose : +//======================================================================= + +Standard_Integer StepVisual_TessellatedVertex::PointIndex () const +{ + return myPointIndex; +} + +//======================================================================= +//function : SetPointIndex +//purpose : +//======================================================================= + +void StepVisual_TessellatedVertex::SetPointIndex(const Standard_Integer thePointIndex) +{ + myPointIndex = thePointIndex; +} diff --git a/src/StepVisual/StepVisual_TessellatedVertex.hxx b/src/StepVisual/StepVisual_TessellatedVertex.hxx new file mode 100644 index 0000000000..16f5ba1dfb --- /dev/null +++ b/src/StepVisual/StepVisual_TessellatedVertex.hxx @@ -0,0 +1,77 @@ +// Created on : Thu Mar 24 18:30:12 2022 +// Created by: snn +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V2.0 +// Copyright (c) Open CASCADE 2022 +// +// 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 _StepVisual_TessellatedVertex_HeaderFile_ +#define _StepVisual_TessellatedVertex_HeaderFile_ + +#include +#include +#include + +#include +#include + +DEFINE_STANDARD_HANDLE(StepVisual_TessellatedVertex, StepVisual_TessellatedStructuredItem) + +//! Representation of STEP entity TessellatedVertex +class StepVisual_TessellatedVertex : public StepVisual_TessellatedStructuredItem +{ + +public : + + //! default constructor + Standard_EXPORT StepVisual_TessellatedVertex(); + + //! Initialize all fields (own and inherited) + Standard_EXPORT void Init(const Handle(TCollection_HAsciiString)& theRepresentationItem_Name, + const Handle(StepVisual_CoordinatesList)& theCoordinates, + const Standard_Boolean theHasTopologicalLink, + const Handle(StepShape_VertexPoint)& theTopologicalLink, + const Standard_Integer thePointIndex); + + //! Returns field Coordinates + Standard_EXPORT Handle(StepVisual_CoordinatesList) Coordinates() const; + + //! Sets field Coordinates + Standard_EXPORT void SetCoordinates (const Handle(StepVisual_CoordinatesList)& theCoordinates); + + //! Returns field TopologicalLink + Standard_EXPORT Handle(StepShape_VertexPoint) TopologicalLink() const; + + //! Sets field TopologicalLink + Standard_EXPORT void SetTopologicalLink (const Handle(StepShape_VertexPoint)& theTopologicalLink); + + //! Returns True if optional field TopologicalLink is defined + Standard_EXPORT Standard_Boolean HasTopologicalLink() const; + + //! Returns field PointIndex + Standard_EXPORT Standard_Integer PointIndex() const; + + //! Sets field PointIndex + Standard_EXPORT void SetPointIndex (const Standard_Integer thePointIndex); + + DEFINE_STANDARD_RTTIEXT(StepVisual_TessellatedVertex, StepVisual_TessellatedStructuredItem) + +private: + + Handle(StepVisual_CoordinatesList) myCoordinates; + Handle(StepShape_VertexPoint) myTopologicalLink; //!< optional + Standard_Integer myPointIndex; + Standard_Boolean myHasTopologicalLink; //!< flag "is TopologicalLink defined" + +}; + +#endif // _StepVisual_TessellatedVertex_HeaderFile_ diff --git a/src/StepVisual/StepVisual_TessellatedWire.cxx b/src/StepVisual/StepVisual_TessellatedWire.cxx new file mode 100644 index 0000000000..bfb34eed41 --- /dev/null +++ b/src/StepVisual/StepVisual_TessellatedWire.cxx @@ -0,0 +1,130 @@ +// Created on : Thu Mar 24 18:30:12 2022 +// Created by: snn +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V2.0 +// Copyright (c) Open CASCADE 2022 +// +// This file is part of Open CASCADE Technology software library. +// +// This library is free software; you can redistribute it and/or modify it under +// the terms of the GNU Lesser General Public License version 2.1 as published +// by the Free Software Foundation, with special exception defined in the file +// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT +// distribution for complete text of the license and disclaimer of any warranty. +// +// Alternatively, this file may be used under the terms of Open CASCADE +// commercial license or contractual agreement. + +#include + +IMPLEMENT_STANDARD_RTTIEXT(StepVisual_TessellatedWire, StepVisual_TessellatedItem) + +//======================================================================= +//function : StepVisual_TessellatedWire +//purpose : +//======================================================================= + +StepVisual_TessellatedWire::StepVisual_TessellatedWire () +{ + myHasGeometricModelLink = Standard_False; +} + +//======================================================================= +//function : Init +//purpose : +//======================================================================= + +void StepVisual_TessellatedWire::Init (const Handle(TCollection_HAsciiString)& theRepresentationItem_Name, + const Handle(StepVisual_HArray1OfTessellatedEdgeOrVertex)& theItems, + const Standard_Boolean theHasGeometricModelLink, + const StepVisual_PathOrCompositeCurve& theGeometricModelLink) +{ + StepVisual_TessellatedItem::Init(theRepresentationItem_Name); + + myItems = theItems; + + myHasGeometricModelLink = theHasGeometricModelLink; + if (myHasGeometricModelLink) + { + myGeometricModelLink = theGeometricModelLink; + } + else + { + myGeometricModelLink = StepVisual_PathOrCompositeCurve(); + } +} + +//======================================================================= +//function : Items +//purpose : +//======================================================================= + +Handle(StepVisual_HArray1OfTessellatedEdgeOrVertex) StepVisual_TessellatedWire::Items () const +{ + return myItems; +} + +//======================================================================= +//function : SetItems +//purpose : +//======================================================================= + +void StepVisual_TessellatedWire::SetItems(const Handle(StepVisual_HArray1OfTessellatedEdgeOrVertex)& theItems) +{ + myItems = theItems; +} + + +//======================================================================= +//function : NbItems +//purpose : +//======================================================================= + +Standard_Integer StepVisual_TessellatedWire::NbItems() const +{ + if (myItems.IsNull()) + { + return 0; + } + return myItems->Length(); +} + + +//======================================================================= +//function : ItemsValue +//purpose : +//======================================================================= + +const StepVisual_TessellatedEdgeOrVertex& StepVisual_TessellatedWire::ItemsValue(const Standard_Integer theNum) const +{ + return myItems->Value(theNum); +} + +//======================================================================= +//function : GeometricModelLink +//purpose : +//======================================================================= + +StepVisual_PathOrCompositeCurve StepVisual_TessellatedWire::GeometricModelLink () const +{ + return myGeometricModelLink; +} + +//======================================================================= +//function : SetGeometricModelLink +//purpose : +//======================================================================= + +void StepVisual_TessellatedWire::SetGeometricModelLink(const StepVisual_PathOrCompositeCurve& theGeometricModelLink) +{ + myGeometricModelLink = theGeometricModelLink; +} + +//======================================================================= +//function : HasGeometricModelLink +//purpose : +//======================================================================= + +Standard_Boolean StepVisual_TessellatedWire::HasGeometricModelLink () const +{ + return myHasGeometricModelLink; +} diff --git a/src/StepVisual/StepVisual_TessellatedWire.hxx b/src/StepVisual/StepVisual_TessellatedWire.hxx new file mode 100644 index 0000000000..fa23613a6d --- /dev/null +++ b/src/StepVisual/StepVisual_TessellatedWire.hxx @@ -0,0 +1,75 @@ +// Created on : Thu Mar 24 18:30:12 2022 +// Created by: snn +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V2.0 +// Copyright (c) Open CASCADE 2022 +// +// 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 _StepVisual_TessellatedWire_HeaderFile_ +#define _StepVisual_TessellatedWire_HeaderFile_ + +#include +#include +#include + +#include +#include + +DEFINE_STANDARD_HANDLE(StepVisual_TessellatedWire, StepVisual_TessellatedItem) + +//! Representation of STEP entity TessellatedWire +class StepVisual_TessellatedWire : public StepVisual_TessellatedItem +{ + +public : + + //! default constructor + Standard_EXPORT StepVisual_TessellatedWire(); + + //! Initialize all fields (own and inherited) + Standard_EXPORT void Init(const Handle(TCollection_HAsciiString)& theRepresentationItem_Name, + const Handle(StepVisual_HArray1OfTessellatedEdgeOrVertex)& theItems, + const Standard_Boolean theHasGeometricModelLink, + const StepVisual_PathOrCompositeCurve& theGeometricModelLink); + + //! Returns field Items + Standard_EXPORT Handle(StepVisual_HArray1OfTessellatedEdgeOrVertex) Items() const; + + //! Sets field Items + Standard_EXPORT void SetItems (const Handle(StepVisual_HArray1OfTessellatedEdgeOrVertex)& theItems); + + //! Returns number of Items + Standard_EXPORT Standard_Integer NbItems() const; + + //! Returns value of Items by its num + Standard_EXPORT const StepVisual_TessellatedEdgeOrVertex& ItemsValue(const Standard_Integer theNum) const; + + //! Returns field GeometricModelLink + Standard_EXPORT StepVisual_PathOrCompositeCurve GeometricModelLink() const; + + //! Sets field GeometricModelLink + Standard_EXPORT void SetGeometricModelLink (const StepVisual_PathOrCompositeCurve& theGeometricModelLink); + + //! Returns True if optional field GeometricModelLink is defined + Standard_EXPORT Standard_Boolean HasGeometricModelLink() const; + + DEFINE_STANDARD_RTTIEXT(StepVisual_TessellatedWire, StepVisual_TessellatedItem) + +private: + + Handle(StepVisual_HArray1OfTessellatedEdgeOrVertex) myItems; + StepVisual_PathOrCompositeCurve myGeometricModelLink; //!< optional + Standard_Boolean myHasGeometricModelLink; //!< flag "is GeometricModelLink defined" + +}; + +#endif // _StepVisual_TessellatedWire_HeaderFile_ diff --git a/src/StepVisual/StepVisual_TriangulatedFace.cxx b/src/StepVisual/StepVisual_TriangulatedFace.cxx new file mode 100644 index 0000000000..eb1a2b9f14 --- /dev/null +++ b/src/StepVisual/StepVisual_TriangulatedFace.cxx @@ -0,0 +1,134 @@ +// Created on : Thu Mar 24 18:30:12 2022 +// Created by: snn +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V2.0 +// Copyright (c) Open CASCADE 2022 +// +// This file is part of Open CASCADE Technology software library. +// +// This library is free software; you can redistribute it and/or modify it under +// the terms of the GNU Lesser General Public License version 2.1 as published +// by the Free Software Foundation, with special exception defined in the file +// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT +// distribution for complete text of the license and disclaimer of any warranty. +// +// Alternatively, this file may be used under the terms of Open CASCADE +// commercial license or contractual agreement. + +#include + +IMPLEMENT_STANDARD_RTTIEXT(StepVisual_TriangulatedFace, StepVisual_TessellatedFace) + +//======================================================================= +//function : StepVisual_TriangulatedFace +//purpose : +//======================================================================= + +StepVisual_TriangulatedFace::StepVisual_TriangulatedFace () +{ +} + +//======================================================================= +//function : Init +//purpose : +//======================================================================= + +void StepVisual_TriangulatedFace::Init (const Handle(TCollection_HAsciiString)& theRepresentationItem_Name, + const Handle(StepVisual_CoordinatesList)& theTessellatedFace_Coordinates, + const Standard_Integer theTessellatedFace_Pnmax, + const Handle(TColStd_HArray2OfReal)& theTessellatedFace_Normals, + const Standard_Boolean theHasTessellatedFace_GeometricLink, + const StepVisual_FaceOrSurface& theTessellatedFace_GeometricLink, + const Handle(TColStd_HArray1OfInteger)& thePnindex, + const Handle(TColStd_HArray2OfInteger)& theTriangles) +{ + StepVisual_TessellatedFace::Init(theRepresentationItem_Name, + theTessellatedFace_Coordinates, + theTessellatedFace_Pnmax, + theTessellatedFace_Normals, + theHasTessellatedFace_GeometricLink, + theTessellatedFace_GeometricLink); + + myPnindex = thePnindex; + + myTriangles = theTriangles; +} + +//======================================================================= +//function : Pnindex +//purpose : +//======================================================================= + +Handle(TColStd_HArray1OfInteger) StepVisual_TriangulatedFace::Pnindex () const +{ + return myPnindex; +} + +//======================================================================= +//function : SetPnindex +//purpose : +//======================================================================= + +void StepVisual_TriangulatedFace::SetPnindex(const Handle(TColStd_HArray1OfInteger)& thePnindex) +{ + myPnindex = thePnindex; +} + + +//======================================================================= +//function : NbPnindex +//purpose : +//======================================================================= + +Standard_Integer StepVisual_TriangulatedFace::NbPnindex() const +{ + if (myPnindex.IsNull()) + { + return 0; + } + return myPnindex->Length(); +} + + +//======================================================================= +//function : PnindexValue +//purpose : +//======================================================================= + +Standard_Integer StepVisual_TriangulatedFace::PnindexValue(const Standard_Integer theNum) const +{ + return myPnindex->Value(theNum); +} + +//======================================================================= +//function : Triangles +//purpose : +//======================================================================= + +Handle(TColStd_HArray2OfInteger) StepVisual_TriangulatedFace::Triangles () const +{ + return myTriangles; +} + +//======================================================================= +//function : NbTriangles +//purpose : +//======================================================================= + +Standard_Integer StepVisual_TriangulatedFace::NbTriangles() const +{ + if (myTriangles.IsNull()) + { + return 0; + } + return myTriangles->ColLength(); +} + +//======================================================================= +//function : SetTriangles +//purpose : +//======================================================================= + +void StepVisual_TriangulatedFace::SetTriangles(const Handle(TColStd_HArray2OfInteger)& theTriangles) +{ + myTriangles = theTriangles; +} diff --git a/src/StepVisual/StepVisual_TriangulatedFace.hxx b/src/StepVisual/StepVisual_TriangulatedFace.hxx new file mode 100644 index 0000000000..151e8a5343 --- /dev/null +++ b/src/StepVisual/StepVisual_TriangulatedFace.hxx @@ -0,0 +1,78 @@ +// Created on : Thu Mar 24 18:30:12 2022 +// Created by: snn +// Generator: Express (EXPRESS -> CASCADE/XSTEP Translator) V2.0 +// Copyright (c) Open CASCADE 2022 +// +// 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 _StepVisual_TriangulatedFace_HeaderFile_ +#define _StepVisual_TriangulatedFace_HeaderFile_ + +#include +#include +#include + +#include +#include + +DEFINE_STANDARD_HANDLE(StepVisual_TriangulatedFace, StepVisual_TessellatedFace) + +//! Representation of STEP entity TriangulatedFace +class StepVisual_TriangulatedFace : public StepVisual_TessellatedFace +{ + +public : + + //! default constructor + Standard_EXPORT StepVisual_TriangulatedFace(); + + //! Initialize all fields (own and inherited) + Standard_EXPORT void Init(const Handle(TCollection_HAsciiString)& theRepresentationItem_Name, + const Handle(StepVisual_CoordinatesList)& theTessellatedFace_Coordinates, + const Standard_Integer theTessellatedFace_Pnmax, + const Handle(TColStd_HArray2OfReal)& theTessellatedFace_Normals, + const Standard_Boolean theHasTessellatedFace_GeometricLink, + const StepVisual_FaceOrSurface& theTessellatedFace_GeometricLink, + const Handle(TColStd_HArray1OfInteger)& thePnindex, + const Handle(TColStd_HArray2OfInteger)& theTriangles); + + //! Returns field Pnindex + Standard_EXPORT Handle(TColStd_HArray1OfInteger) Pnindex() const; + + //! Sets field Pnindex + Standard_EXPORT void SetPnindex (const Handle(TColStd_HArray1OfInteger)& thePnindex); + + //! Returns number of Pnindex + Standard_EXPORT Standard_Integer NbPnindex() const; + + //! Returns value of Pnindex by its num + Standard_EXPORT Standard_Integer PnindexValue(const Standard_Integer theNum) const; + + //! Returns field Triangles + Standard_EXPORT Handle(TColStd_HArray2OfInteger) Triangles() const; + + //! Sets field Triangles + Standard_EXPORT void SetTriangles (const Handle(TColStd_HArray2OfInteger)& theTriangles); + + //! Returns number of Triangles + Standard_EXPORT Standard_Integer NbTriangles() const; + + DEFINE_STANDARD_RTTIEXT(StepVisual_TriangulatedFace, StepVisual_TessellatedFace) + +private: + + Handle(TColStd_HArray1OfInteger) myPnindex; + Handle(TColStd_HArray2OfInteger) myTriangles; + +}; + +#endif // _StepVisual_TriangulatedFace_HeaderFile_ diff --git a/src/TopoDSToStep/FILES b/src/TopoDSToStep/FILES index 0e632a308e..584d3704c2 100644 --- a/src/TopoDSToStep/FILES +++ b/src/TopoDSToStep/FILES @@ -36,3 +36,5 @@ TopoDSToStep_Tool.cxx TopoDSToStep_Tool.hxx TopoDSToStep_WireframeBuilder.cxx TopoDSToStep_WireframeBuilder.hxx +TopoDSToStep_MakeTessellatedItem.cxx +TopoDSToStep_MakeTessellatedItem.hxx \ No newline at end of file diff --git a/src/TopoDSToStep/TopoDSToStep_Builder.cxx b/src/TopoDSToStep/TopoDSToStep_Builder.cxx index f17e5df00a..0a2130e1db 100644 --- a/src/TopoDSToStep/TopoDSToStep_Builder.cxx +++ b/src/TopoDSToStep/TopoDSToStep_Builder.cxx @@ -33,6 +33,7 @@ #include #include #include +#include #include #include #include @@ -54,12 +55,13 @@ TopoDSToStep_Builder::TopoDSToStep_Builder() TopoDSToStep_Builder::TopoDSToStep_Builder (const TopoDS_Shape& aShape, - TopoDSToStep_Tool& aTool, - const Handle(Transfer_FinderProcess)& FP, - const Message_ProgressRange& theProgress) + TopoDSToStep_Tool& aTool, + const Handle(Transfer_FinderProcess)& FP, + const Standard_Integer theTessellatedGeomParam, + const Message_ProgressRange& theProgress) { done = Standard_False; - Init(aShape, aTool, FP, theProgress); + Init(aShape, aTool, FP, theTessellatedGeomParam, theProgress); } // ============================================================================ @@ -68,143 +70,168 @@ TopoDSToStep_Builder::TopoDSToStep_Builder // ============================================================================ void TopoDSToStep_Builder::Init(const TopoDS_Shape& aShape, - TopoDSToStep_Tool& myTool, - const Handle(Transfer_FinderProcess)& FP, - const Message_ProgressRange& theProgress) + TopoDSToStep_Tool& myTool, + const Handle(Transfer_FinderProcess)& FP, + const Standard_Integer theTessellatedGeomParam, + const Message_ProgressRange& theProgress) { - - if (myTool.IsBound(aShape)) { - myError = TopoDSToStep_BuilderDone; - done = Standard_True; + + if (myTool.IsBound(aShape)) { + myError = TopoDSToStep_BuilderDone; + done = Standard_True; myResult = myTool.Find(aShape); return; } - switch (aShape.ShapeType()) - { - case TopAbs_SHELL: - { - TopoDS_Shell myShell = TopoDS::Shell(aShape); - myTool.SetCurrentShell(myShell); - - Handle(StepShape_FaceSurface) FS; - Handle(StepShape_TopologicalRepresentationItem) Fpms; - TColStd_SequenceOfTransient mySeq; - -// const TopoDS_Shell ForwardShell = -// TopoDS::Shell(myShell.Oriented(TopAbs_FORWARD)); - -// TopExp_Explorer myExp(ForwardShell, TopAbs_FACE); -// CKY 9-DEC-1997 (PRO9824 et consorts) -// Pour passer les orientations : ELLES SONT DONNEES EN RELATIF -// Donc, pour SHELL, on doit l ecrire en direct en STEP (pas le choix) -// -> il faut repercuter en dessous, donc explorer le Shell TEL QUEL -// Pour FACE WIRE, d une part on ECRIT SON ORIENTATION relative au contenant -// (puisqu on peut), d autre part on EXPLORE EN FORWARD : ainsi les -// orientations des sous-shapes sont relatives a leur contenant immediat -// et la recombinaison en lecture est sans malice -// Il reste ici et la du code relatif a "en Faceted on combine differemment" -// -> reste encore du menage a faire - - - - TopExp_Explorer anExp; - - TopoDSToStep_MakeStepFace MkFace; - - Standard_Integer nbshapes = 0; - for (anExp.Init(myShell, TopAbs_FACE); anExp.More(); anExp.Next()) - nbshapes++; - Message_ProgressScope aPS(theProgress, NULL, nbshapes); - for (anExp.Init(myShell, TopAbs_FACE); anExp.More() && aPS.More(); anExp.Next(), aPS.Next()) - { - const TopoDS_Face Face = TopoDS::Face(anExp.Current()); + switch (aShape.ShapeType()) + { + case TopAbs_SHELL: + { + TopoDS_Shell myShell = TopoDS::Shell(aShape); + myTool.SetCurrentShell(myShell); + + Handle(StepShape_FaceSurface) FS; + Handle(StepShape_TopologicalRepresentationItem) Fpms; + TColStd_SequenceOfTransient mySeq; + + // const TopoDS_Shell ForwardShell = + // TopoDS::Shell(myShell.Oriented(TopAbs_FORWARD)); + + // TopExp_Explorer myExp(ForwardShell, TopAbs_FACE); + // CKY 9-DEC-1997 (PRO9824 et consorts) + // Pour passer les orientations : ELLES SONT DONNEES EN RELATIF + // Donc, pour SHELL, on doit l ecrire en direct en STEP (pas le choix) + // -> il faut repercuter en dessous, donc explorer le Shell TEL QUEL + // Pour FACE WIRE, d une part on ECRIT SON ORIENTATION relative au contenant + // (puisqu on peut), d autre part on EXPLORE EN FORWARD : ainsi les + // orientations des sous-shapes sont relatives a leur contenant immediat + // et la recombinaison en lecture est sans malice + // Il reste ici et la du code relatif a "en Faceted on combine differemment" + // -> reste encore du menage a faire + + + + TopExp_Explorer anExp; + + TopoDSToStep_MakeStepFace MkFace; + + Message_ProgressScope aPS(theProgress, NULL, (theTessellatedGeomParam != 0) ? 2 : 1); + + Standard_Integer nbshapes = 0; + for (anExp.Init(myShell, TopAbs_FACE); anExp.More(); anExp.Next()) + nbshapes++; + Message_ProgressScope aPS1(aPS.Next(), NULL, nbshapes); + for (anExp.Init(myShell, TopAbs_FACE); anExp.More() && aPS1.More(); anExp.Next(), aPS1.Next()) + { + const TopoDS_Face Face = TopoDS::Face(anExp.Current()); + + MkFace.Init(Face, myTool, FP); + + if (MkFace.IsDone()) { + FS = Handle(StepShape_FaceSurface)::DownCast(MkFace.Value()); + Fpms = FS; + mySeq.Append(Fpms); + } + else { + // MakeFace Error Handling : warning only + // std::cout << "Warning : one Face has not been mapped" << std::endl; + // Handle(TransferBRep_ShapeMapper) errShape = + // new TransferBRep_ShapeMapper(Face); + // FP->AddWarning(errShape, " a Face from a Shell has not been mapped"); + } + } + if (!aPS1.More()) + return; + + Standard_Integer nbFaces = mySeq.Length(); + if (nbFaces >= 1) { + Handle(StepShape_HArray1OfFace) aSet = + new StepShape_HArray1OfFace(1, nbFaces); + for (Standard_Integer i = 1; i <= nbFaces; i++) { + aSet->SetValue(i, Handle(StepShape_Face)::DownCast(mySeq.Value(i))); + } + Handle(StepShape_ConnectedFaceSet) CFSpms; + if (myShell.Closed()) + CFSpms = new StepShape_ClosedShell(); + else + CFSpms = new StepShape_OpenShell(); + Handle(TCollection_HAsciiString) aName = + new TCollection_HAsciiString(""); + CFSpms->Init(aName, aSet); + + // -------------------------------------------------------------- + // To add later : if not facetted context & shell is reversed + // then shall create an oriented_shell with + // orientation flag to false. + // -------------------------------------------------------------- + + myTool.Bind(aShape, CFSpms); + myResult = CFSpms; + done = Standard_True; + } + else { + // Builder Error handling; + myError = TopoDSToStep_NoFaceMapped; + done = Standard_False; + } + + if (theTessellatedGeomParam == 1 || (theTessellatedGeomParam == 2 && myResult.IsNull())) { + TopoDSToStep_MakeTessellatedItem MkTessShell(myShell, myTool, FP, aPS.Next()); + if (MkTessShell.IsDone()) { + myTessellatedResult = MkTessShell.Value(); + myError = TopoDSToStep_BuilderDone; + done = Standard_True; + } + } + + break; + } + + case TopAbs_FACE: + { + const TopoDS_Face Face = TopoDS::Face(aShape); + + Handle(StepShape_FaceSurface) FS; + Handle(StepShape_TopologicalRepresentationItem) Fpms; + + TopoDSToStep_MakeStepFace MkFace(Face, myTool, FP); + + TopoDSToStep_MakeTessellatedItem MkTessFace; - MkFace.Init(Face, myTool, FP); - - if (MkFace.IsDone()) { - FS = Handle(StepShape_FaceSurface)::DownCast(MkFace.Value()); - Fpms = FS; - mySeq.Append(Fpms); - } - else { - // MakeFace Error Handling : warning only -// std::cout << "Warning : one Face has not been mapped" << std::endl; -// Handle(TransferBRep_ShapeMapper) errShape = -// new TransferBRep_ShapeMapper(Face); -// FP->AddWarning(errShape, " a Face from a Shell has not been mapped"); - } - } - if (!aPS.More()) - return; - - Standard_Integer nbFaces = mySeq.Length(); - if ( nbFaces >= 1) { - Handle(StepShape_HArray1OfFace) aSet = - new StepShape_HArray1OfFace(1,nbFaces); - for (Standard_Integer i=1; i<=nbFaces; i++ ) { - aSet->SetValue(i, Handle(StepShape_Face)::DownCast(mySeq.Value(i))); - } - Handle(StepShape_ConnectedFaceSet) CFSpms; - if (myShell.Closed()) - CFSpms = new StepShape_ClosedShell(); - else - CFSpms = new StepShape_OpenShell(); - Handle(TCollection_HAsciiString) aName = - new TCollection_HAsciiString(""); - CFSpms->Init(aName, aSet); - - // -------------------------------------------------------------- - // To add later : if not facetted context & shell is reversed - // then shall create an oriented_shell with - // orientation flag to false. - // -------------------------------------------------------------- - - myTool.Bind(aShape, CFSpms); - myResult = CFSpms; - done = Standard_True; - } - else { - // Builder Error handling; - myError = TopoDSToStep_NoFaceMapped; - done = Standard_False; - } - break; + if (theTessellatedGeomParam == 1 || (theTessellatedGeomParam == 2 && !MkFace.IsDone())) { + Message_ProgressScope aPS(theProgress, NULL, 1); + MkTessFace.Init(Face, myTool, FP, aPS.Next()); + } + + if (MkFace.IsDone() || MkTessFace.IsDone()) { + if (MkFace.IsDone()) { + FS = Handle(StepShape_FaceSurface)::DownCast(MkFace.Value()); + Fpms = FS; + myResult = Fpms; } - - case TopAbs_FACE: - { - const TopoDS_Face Face = TopoDS::Face(aShape); - - Handle(StepShape_FaceSurface) FS; - Handle(StepShape_TopologicalRepresentationItem) Fpms; - - TopoDSToStep_MakeStepFace MkFace(Face, myTool, FP); - - if (MkFace.IsDone()) { - FS = Handle(StepShape_FaceSurface)::DownCast(MkFace.Value()); - Fpms = FS; - myResult = Fpms; - myError = TopoDSToStep_BuilderDone; - done = Standard_True; - } - else { - // MakeFace Error Handling : Face not Mapped - myError = TopoDSToStep_BuilderOther; -// Handle(TransferBRep_ShapeMapper) errShape = -// new TransferBRep_ShapeMapper(Face); -// FP->AddWarning(errShape, " the Face has not been mapped"); - done = Standard_False; - } - break; + if (MkTessFace.IsDone()) { + myTessellatedResult = MkTessFace.Value(); } - default: break; + myError = TopoDSToStep_BuilderDone; + done = Standard_True; + } + else { + // MakeFace Error Handling : Face not Mapped + myError = TopoDSToStep_BuilderOther; + // Handle(TransferBRep_ShapeMapper) errShape = + // new TransferBRep_ShapeMapper(Face); + // FP->AddWarning(errShape, " the Face has not been mapped"); + done = Standard_False; } + break; + } + default: break; + } } // ============================================================================ // Method : TopoDSToStep_Builder::Value -// Purpose : +// Purpose : Returns TopologicalRepresentationItem as the result // ============================================================================ const Handle(StepShape_TopologicalRepresentationItem)& @@ -214,9 +241,21 @@ TopoDSToStep_Builder::Value() const return myResult; } +// ============================================================================ +// Method : TopoDSToStep_Builder::TessellatedValue +// Purpose : Returns TopologicalRepresentationItem as the optional result +// ============================================================================ + +const Handle(StepVisual_TessellatedItem)& +TopoDSToStep_Builder::TessellatedValue() const +{ + StdFail_NotDone_Raise_if(!done, "TopoDSToStep_Builder::TessellatedValue() - no result"); + return myTessellatedResult; +} + // ============================================================================ // Method : TopoDSToStep_Builder::Error -// Purpose : +// Purpose : Returns builder error if the process is not done // ============================================================================ TopoDSToStep_BuilderError TopoDSToStep_Builder::Error() const diff --git a/src/TopoDSToStep/TopoDSToStep_Builder.hxx b/src/TopoDSToStep/TopoDSToStep_Builder.hxx index 1ca6ecc598..07d61fa158 100644 --- a/src/TopoDSToStep/TopoDSToStep_Builder.hxx +++ b/src/TopoDSToStep/TopoDSToStep_Builder.hxx @@ -26,6 +26,7 @@ #include class StepShape_TopologicalRepresentationItem; +class StepVisual_TessellatedItem; class TopoDS_Shape; class TopoDSToStep_Tool; class Transfer_FinderProcess; @@ -45,16 +46,19 @@ public: Standard_EXPORT TopoDSToStep_Builder(const TopoDS_Shape& S, TopoDSToStep_Tool& T, const Handle(Transfer_FinderProcess)& FP, + const Standard_Integer theTessellatedGeomParam, const Message_ProgressRange& theProgress = Message_ProgressRange()); Standard_EXPORT void Init (const TopoDS_Shape& S, TopoDSToStep_Tool& T, const Handle(Transfer_FinderProcess)& FP, + const Standard_Integer theTessellatedGeomParam, const Message_ProgressRange& theProgress = Message_ProgressRange()); Standard_EXPORT TopoDSToStep_BuilderError Error() const; Standard_EXPORT const Handle(StepShape_TopologicalRepresentationItem)& Value() const; + Standard_EXPORT const Handle(StepVisual_TessellatedItem)& TessellatedValue() const; @@ -70,6 +74,7 @@ private: Handle(StepShape_TopologicalRepresentationItem) myResult; + Handle(StepVisual_TessellatedItem) myTessellatedResult; TopoDSToStep_BuilderError myError; diff --git a/src/TopoDSToStep/TopoDSToStep_MakeBrepWithVoids.cxx b/src/TopoDSToStep/TopoDSToStep_MakeBrepWithVoids.cxx index c6c07349fb..fb12faef86 100644 --- a/src/TopoDSToStep/TopoDSToStep_MakeBrepWithVoids.cxx +++ b/src/TopoDSToStep/TopoDSToStep_MakeBrepWithVoids.cxx @@ -16,6 +16,7 @@ #include +#include #include #include #include @@ -25,6 +26,9 @@ #include #include #include +#include +#include +#include #include #include #include @@ -53,115 +57,162 @@ TopoDSToStep_MakeBrepWithVoids:: const Handle(Transfer_FinderProcess)& FP, const Message_ProgressRange& theProgress) { - done = Standard_False ; - TopoDS_Iterator It; - MoniTool_DataMapOfShapeTransient aMap; - TColStd_SequenceOfTransient S; - TopoDS_Shell aOutShell; + done = Standard_False; + TopoDS_Iterator It; + MoniTool_DataMapOfShapeTransient aMap; + TColStd_SequenceOfTransient S; + TopoDS_Shell aOutShell; Handle(StepShape_TopologicalRepresentationItem) aItem; Handle(StepShape_ClosedShell) aOuter, aCShell; Handle(StepShape_OrientedClosedShell) aOCShell; Handle(StepShape_HArray1OfOrientedClosedShell) aVoids; + TColStd_SequenceOfTransient aTessShells; - aOutShell = BRepClass3d::OuterShell(aSolid); + const Standard_Integer aWriteTessGeom = Interface_Static::IVal("write.step.tessellated"); + + try + { + // BRepClass3d::OuterShell requires geometry when the solid has voids + aOutShell = BRepClass3d::OuterShell(aSolid); + } + catch (...) + { + } TopoDSToStep_Builder StepB; TopoDSToStep_Tool aTool; - - if (!aOutShell.IsNull()) { - Standard_Integer nbshapes = 0; - for (It.Initialize(aSolid); It.More(); It.Next()) - if (It.Value().ShapeType() == TopAbs_SHELL) - nbshapes++; - Message_ProgressScope aPS(theProgress, NULL, nbshapes); - for (It.Initialize(aSolid); It.More() && aPS.More(); It.Next()) + + Standard_Integer nbshapes = 0; + for (It.Initialize(aSolid); It.More(); It.Next()) + if (It.Value().ShapeType() == TopAbs_SHELL) + nbshapes++; + Message_ProgressScope aPS(theProgress, NULL, nbshapes); + for (It.Initialize(aSolid); It.More() && aPS.More(); It.Next()) + { + if (It.Value().ShapeType() == TopAbs_SHELL) { - if (It.Value().ShapeType() == TopAbs_SHELL) { - TopoDS_Shell CurrentShell = TopoDS::Shell(It.Value()); - if ( ! aOutShell.IsEqual(CurrentShell) ) //:e0 abv 25 Mar 98: voids should be reversed according to EXPRESS for ABSR - CurrentShell.Reverse(); - //:d7 abv 16 Mar 98: try to treat 'open' shells as closed since flag - // IsClosed() is often incorrect (taken from MakeManifoldSolid(Solid)) - aTool.Init(aMap, Standard_False); - StepB.Init(CurrentShell, aTool, FP, aPS.Next()); - TopoDSToStep::AddResult ( FP, aTool ); - if (StepB.IsDone()) { - aCShell = Handle(StepShape_ClosedShell)::DownCast(StepB.Value()); - // si OPEN on le force a CLOSED mais que c est une honte ! - if (aCShell.IsNull()) { - Handle(StepShape_OpenShell) aOShell = Handle(StepShape_OpenShell)::DownCast(StepB.Value()); - if (!aOShell.IsNull()) { - aCShell = new StepShape_ClosedShell; - aCShell->Init (aOShell->Name(),aOShell->CfsFaces()); -#ifdef OCCT_DEBUG - std::cout<<"Warning: MakeBRepWithVoids: Open shell in the solid; treated as closed"<Init(aOShell->Name(), aOShell->CfsFaces()); #ifdef OCCT_DEBUG - else std::cout<<"*** MakeBRepWithVoids : Shell not mapped"<= 1) + { + Handle(TCollection_HAsciiString) aName = + new TCollection_HAsciiString(""); + aVoids = new StepShape_HArray1OfOrientedClosedShell(1, N); + for (Standard_Integer i = 1; i <= N; i++) { + aOCShell = new StepShape_OrientedClosedShell; + // Warning : the Oriented Shell Orientation is not always + // TRUE. + // Shall check the TopoDS_Shell orientation. + // => if the Shell is reversed, shall create an OrientedShell. + aOCShell->Init(aName, Handle(StepShape_ClosedShell)::DownCast(S.Value(i)), + Standard_False); //:e0 + //:e0 Standard_True); + aVoids->SetValue(i, aOCShell); } - if (!aPS.More()) - return; - - Standard_Integer N = S.Length(); - if ( N>=1 ) { - Handle(TCollection_HAsciiString) aName = - new TCollection_HAsciiString(""); - aVoids = new StepShape_HArray1OfOrientedClosedShell(1,N); - for ( Standard_Integer i=1; i<=N; i++ ) { - aOCShell = new StepShape_OrientedClosedShell; - // Warning : the Oriented Shell Orientation is not always - // TRUE. - // Shall check the TopoDS_Shell orientation. - // => if the Shell is reversed, shall create an OrientedShell. - aOCShell -> Init(aName,Handle(StepShape_ClosedShell)::DownCast(S.Value(i)), - Standard_False); //:e0 -//:e0 Standard_True); - aVoids->SetValue(i, aOCShell); + + theBrepWithVoids = new StepShape_BrepWithVoids(); + theBrepWithVoids->Init(aName, aOuter, aVoids); + + done = Standard_True; + } + + if (!aTessShells.IsEmpty()) + { + Handle(StepVisual_TessellatedSolid) aTessSolid = new StepVisual_TessellatedSolid(); + Handle(TCollection_HAsciiString) aTessName = new TCollection_HAsciiString(""); + Standard_Integer aNbItems = 0; + for (TColStd_SequenceOfTransient::Iterator anIt(aTessShells); anIt.More(); anIt.Next()) + { + Handle(StepVisual_TessellatedShell) aTessShell = Handle(StepVisual_TessellatedShell)::DownCast(anIt.Value()); + aNbItems += aTessShell->NbItems(); + } + Handle(StepVisual_HArray1OfTessellatedStructuredItem) anItems + = new StepVisual_HArray1OfTessellatedStructuredItem(1, aNbItems); + Standard_Integer j = 1; + for (TColStd_SequenceOfTransient::Iterator anIt(aTessShells); anIt.More(); anIt.Next()) + { + Handle(StepVisual_TessellatedShell) aTessShell = Handle(StepVisual_TessellatedShell)::DownCast(anIt.Value()); + for (Standard_Integer i = 1; i <= aTessShell->NbItems(); ++i) { + anItems->SetValue(j++, aTessShell->ItemsValue(i)); } - theBrepWithVoids = new StepShape_BrepWithVoids(); - theBrepWithVoids->Init(aName, aOuter, aVoids); - done = Standard_True; } - else done = Standard_False; + Standard_Boolean aHasGeomLink = !theBrepWithVoids.IsNull(); + aTessSolid->Init(aTessName, anItems, aHasGeomLink, theBrepWithVoids); + theTessellatedItem = aTessSolid; + + done = Standard_True; } } @@ -175,3 +226,15 @@ const Handle(StepShape_BrepWithVoids) & StdFail_NotDone_Raise_if (!done, "TopoDSToStep_MakeBrepWithVoids::Value() - no result"); return theBrepWithVoids; } + +// ============================================================================ +// Method : TopoDSToStep_MakeBrepWithVoids::TessellatedValue +// Purpose : Returns TessellatedItem as the optional result +// ============================================================================ + +const Handle(StepVisual_TessellatedItem) & +TopoDSToStep_MakeBrepWithVoids::TessellatedValue() const +{ + StdFail_NotDone_Raise_if(!done, "TopoDSToStep_MakeBrepWithVoids::TessellatedValue() - no result"); + return theTessellatedItem; +} diff --git a/src/TopoDSToStep/TopoDSToStep_MakeBrepWithVoids.hxx b/src/TopoDSToStep/TopoDSToStep_MakeBrepWithVoids.hxx index 379b6e9dec..f448417e35 100644 --- a/src/TopoDSToStep/TopoDSToStep_MakeBrepWithVoids.hxx +++ b/src/TopoDSToStep/TopoDSToStep_MakeBrepWithVoids.hxx @@ -25,6 +25,7 @@ #include class StepShape_BrepWithVoids; +class StepVisual_TessellatedItem; class TopoDS_Solid; class Transfer_FinderProcess; @@ -46,7 +47,7 @@ public: const Message_ProgressRange& theProgress = Message_ProgressRange()); Standard_EXPORT const Handle(StepShape_BrepWithVoids)& Value() const; - + Standard_EXPORT const Handle(StepVisual_TessellatedItem)& TessellatedValue() const; @@ -61,7 +62,7 @@ private: Handle(StepShape_BrepWithVoids) theBrepWithVoids; - + Handle(StepVisual_TessellatedItem) theTessellatedItem; }; diff --git a/src/TopoDSToStep/TopoDSToStep_MakeFacetedBrep.cxx b/src/TopoDSToStep/TopoDSToStep_MakeFacetedBrep.cxx index 0cf4d08c58..0315b45c45 100644 --- a/src/TopoDSToStep/TopoDSToStep_MakeFacetedBrep.cxx +++ b/src/TopoDSToStep/TopoDSToStep_MakeFacetedBrep.cxx @@ -16,11 +16,14 @@ #include +#include #include #include #include #include #include +#include +#include #include #include #include @@ -43,9 +46,11 @@ TopoDSToStep_MakeFacetedBrep:: if (aShell.Closed()) { Handle(StepShape_TopologicalRepresentationItem) aItem; MoniTool_DataMapOfShapeTransient aMap; - + + const Standard_Integer aWriteTessGeom = Interface_Static::IVal("write.step.tessellated"); + TopoDSToStep_Tool aTool(aMap, Standard_True); - TopoDSToStep_Builder StepB(aShell, aTool, FP, theProgress); + TopoDSToStep_Builder StepB(aShell, aTool, FP, aWriteTessGeom, theProgress); if (theProgress.UserBreak()) return; TopoDSToStep::AddResult ( FP, aTool ); @@ -55,23 +60,24 @@ TopoDSToStep_MakeFacetedBrep:: Handle(StepShape_ClosedShell) aCShell; aCShell = Handle(StepShape_ClosedShell)::DownCast(aItem); theFacetedBrep = new StepShape_FacetedBrep(); - Handle(TCollection_HAsciiString) aName = - new TCollection_HAsciiString(""); + Handle(TCollection_HAsciiString) aName = + new TCollection_HAsciiString(""); theFacetedBrep->Init(aName, aCShell); + theTessellatedItem = StepB.TessellatedValue(); done = Standard_True; } else { done = Standard_False; Handle(TransferBRep_ShapeMapper) errShape = - new TransferBRep_ShapeMapper(aShell); - FP->AddWarning(errShape," Closed Shell not mapped to FacetedBrep"); + new TransferBRep_ShapeMapper(aShell); + FP->AddWarning(errShape, " Closed Shell not mapped to FacetedBrep"); } } else { done = Standard_False; Handle(TransferBRep_ShapeMapper) errShape = new TransferBRep_ShapeMapper(aShell); - FP->AddWarning(errShape," Shell not closed; not mapped to FacetedBrep"); + FP->AddWarning(errShape, " Shell not closed; not mapped to FacetedBrep"); } } @@ -94,42 +100,60 @@ TopoDSToStep_MakeFacetedBrep:: if (aOuterShell.Closed()) { Handle(StepShape_TopologicalRepresentationItem) aItem; MoniTool_DataMapOfShapeTransient aMap; - + + const Standard_Integer aWriteTessGeom = Interface_Static::IVal("write.step.tessellated"); + TopoDSToStep_Tool aTool(aMap, Standard_True); - TopoDSToStep_Builder StepB(aOuterShell, aTool, FP, theProgress); + TopoDSToStep_Builder StepB(aOuterShell, aTool, FP, aWriteTessGeom, theProgress); if (theProgress.UserBreak()) return; TopoDSToStep::AddResult ( FP, aTool ); if (StepB.IsDone()) { - aItem = StepB.Value(); - Handle(StepShape_ClosedShell) aCShell; - aCShell = Handle(StepShape_ClosedShell)::DownCast(aItem); - theFacetedBrep = new StepShape_FacetedBrep(); - Handle(TCollection_HAsciiString) aName = - new TCollection_HAsciiString(""); - theFacetedBrep->Init(aName, aCShell); - done = Standard_True; + aItem = StepB.Value(); + Handle(StepShape_ClosedShell) aCShell; + aCShell = Handle(StepShape_ClosedShell)::DownCast(aItem); + theFacetedBrep = new StepShape_FacetedBrep(); + Handle(TCollection_HAsciiString) aName = + new TCollection_HAsciiString(""); + theFacetedBrep->Init(aName, aCShell); + done = Standard_True; + if (!StepB.TessellatedValue()) + { + Handle(StepVisual_TessellatedSolid) aTessSolid = new StepVisual_TessellatedSolid(); + Handle(StepVisual_TessellatedShell) aTessShell + = Handle(StepVisual_TessellatedShell)::DownCast(StepB.TessellatedValue()); + Handle(TCollection_HAsciiString) aTessName = new TCollection_HAsciiString(""); + Handle(StepVisual_HArray1OfTessellatedStructuredItem) anItems + = new StepVisual_HArray1OfTessellatedStructuredItem(1, aTessShell->NbItems()); + for (Standard_Integer i = 1; i <= aTessShell->NbItems(); ++i) + { + anItems->SetValue(i, aTessShell->ItemsValue(i)); + } + Standard_Boolean aHasGeomLink = !theFacetedBrep.IsNull(); + aTessSolid->Init(aTessName, anItems, aHasGeomLink, theFacetedBrep); + theTessellatedItem = aTessSolid; + } } else { - done = Standard_False; - Handle(TransferBRep_ShapeMapper) errShape = - new TransferBRep_ShapeMapper(aOuterShell); - FP->AddWarning(errShape," Closed Outer Shell from Solid not mapped to FacetedBrep"); + done = Standard_False; + Handle(TransferBRep_ShapeMapper) errShape = + new TransferBRep_ShapeMapper(aOuterShell); + FP->AddWarning(errShape, " Closed Outer Shell from Solid not mapped to FacetedBrep"); } } else { done = Standard_False; Handle(TransferBRep_ShapeMapper) errShape = - new TransferBRep_ShapeMapper(aOuterShell); - FP->AddWarning(errShape," Shell not closed; not mapped to FacetedBrep"); + new TransferBRep_ShapeMapper(aOuterShell); + FP->AddWarning(errShape, " Shell not closed; not mapped to FacetedBrep"); } } else { done = Standard_False; Handle(TransferBRep_ShapeMapper) errShape = new TransferBRep_ShapeMapper(aOuterShell); - FP->AddWarning(errShape," Solid contains no Outer Shell to be mapped to FacetedBrep"); + FP->AddWarning(errShape, " Solid contains no Outer Shell to be mapped to FacetedBrep"); } } @@ -143,3 +167,15 @@ const Handle(StepShape_FacetedBrep) & StdFail_NotDone_Raise_if (!done, "TopoDSToStep_MakeFacetedBrep::Value() - no result"); return theFacetedBrep; } + +// ============================================================================ +// Method : TopoDSToStep_MakeFacetedBrep::TessellatedValue +// Purpose : Returns TessellatedItem as the optional result +// ============================================================================ + +const Handle(StepVisual_TessellatedItem) & +TopoDSToStep_MakeFacetedBrep::TessellatedValue() const +{ + StdFail_NotDone_Raise_if(!done, "TopoDSToStep_MakeFacetedBrep::TessellatedValue() - no result"); + return theTessellatedItem; +} diff --git a/src/TopoDSToStep/TopoDSToStep_MakeFacetedBrep.hxx b/src/TopoDSToStep/TopoDSToStep_MakeFacetedBrep.hxx index 7b5706b6c5..be54dba226 100644 --- a/src/TopoDSToStep/TopoDSToStep_MakeFacetedBrep.hxx +++ b/src/TopoDSToStep/TopoDSToStep_MakeFacetedBrep.hxx @@ -25,6 +25,7 @@ #include class StepShape_FacetedBrep; +class StepVisual_TessellatedItem; class TopoDS_Shell; class Transfer_FinderProcess; class TopoDS_Solid; @@ -51,7 +52,7 @@ public: const Message_ProgressRange& theProgress = Message_ProgressRange()); Standard_EXPORT const Handle(StepShape_FacetedBrep)& Value() const; - + Standard_EXPORT const Handle(StepVisual_TessellatedItem)& TessellatedValue() const; @@ -66,6 +67,7 @@ private: Handle(StepShape_FacetedBrep) theFacetedBrep; + Handle(StepVisual_TessellatedItem) theTessellatedItem; }; diff --git a/src/TopoDSToStep/TopoDSToStep_MakeFacetedBrepAndBrepWithVoids.cxx b/src/TopoDSToStep/TopoDSToStep_MakeFacetedBrepAndBrepWithVoids.cxx index e47b2d63eb..14b0305607 100644 --- a/src/TopoDSToStep/TopoDSToStep_MakeFacetedBrepAndBrepWithVoids.cxx +++ b/src/TopoDSToStep/TopoDSToStep_MakeFacetedBrepAndBrepWithVoids.cxx @@ -24,6 +24,9 @@ #include #include #include +#include +#include +#include #include #include #include @@ -56,6 +59,7 @@ TopoDSToStep_MakeFacetedBrepAndBrepWithVoids:: Handle(StepShape_ClosedShell) aOuter, aCShell; Handle(StepShape_OrientedClosedShell) aOCShell; Handle(StepShape_HArray1OfOrientedClosedShell) aVoids; + TColStd_SequenceOfTransient aTessShells; aOutShell = BRepClass3d::OuterShell(aSolid); @@ -72,32 +76,37 @@ TopoDSToStep_MakeFacetedBrepAndBrepWithVoids:: { if (It.Value().ShapeType() == TopAbs_SHELL) { Message_ProgressRange aRange = aPS.Next(); - TopoDS_Shell CurrentShell = TopoDS::Shell(It.Value()); - if (It.Value().Closed()) { + TopoDS_Shell CurrentShell = TopoDS::Shell(It.Value()); + if (It.Value().Closed()) { - aTool.Init(aMap, Standard_False); - StepB.Init(CurrentShell, aTool, FP, aRange); - TopoDSToStep::AddResult ( FP, aTool ); + aTool.Init(aMap, Standard_False); + StepB.Init(CurrentShell, aTool, FP, Standard_False, aRange); + TopoDSToStep::AddResult(FP, aTool); - if (StepB.IsDone()) { - aCShell = Handle(StepShape_ClosedShell)::DownCast(StepB.Value()); - if ( aOutShell.IsEqual(It.Value()) ) - aOuter = aCShell; - else - S.Append(aCShell); - } - else { - Handle(TransferBRep_ShapeMapper) errShape = - new TransferBRep_ShapeMapper(CurrentShell); - FP->AddWarning(errShape," Shell from Solid not mapped to FacetedBrepAndBrepWithVoids"); - } - } - else { - done = Standard_False; - Handle(TransferBRep_ShapeMapper) errShape = - new TransferBRep_ShapeMapper(CurrentShell); - FP->AddWarning(errShape," Shell from Solid not closed; not mapped to FacetedBrepAndBrepWithVoids"); - } + if (StepB.IsDone()) { + aCShell = Handle(StepShape_ClosedShell)::DownCast(StepB.Value()); + if (aOutShell.IsEqual(It.Value())) + aOuter = aCShell; + else + S.Append(aCShell); + Handle(StepVisual_TessellatedItem) aTessShell = StepB.TessellatedValue(); + if (!aTessShell.IsNull()) + { + aTessShells.Append(aTessShell); + } + } + else { + Handle(TransferBRep_ShapeMapper) errShape = + new TransferBRep_ShapeMapper(CurrentShell); + FP->AddWarning(errShape, " Shell from Solid not mapped to FacetedBrepAndBrepWithVoids"); + } + } + else { + done = Standard_False; + Handle(TransferBRep_ShapeMapper) errShape = + new TransferBRep_ShapeMapper(CurrentShell); + FP->AddWarning(errShape, " Shell from Solid not closed; not mapped to FacetedBrepAndBrepWithVoids"); + } } } if (!aPS.More()) @@ -111,12 +120,38 @@ TopoDSToStep_MakeFacetedBrepAndBrepWithVoids:: for ( Standard_Integer i=1; i<=N; i++ ) { aOCShell = new StepShape_OrientedClosedShell(); aOCShell->Init(aName, Handle(StepShape_ClosedShell)::DownCast(S.Value(i)), - Standard_True); + Standard_True); aVoids->SetValue(i, aOCShell); } theFacetedBrepAndBrepWithVoids = new StepShape_FacetedBrepAndBrepWithVoids(); theFacetedBrepAndBrepWithVoids->Init(aName, aOuter, aVoids); + + if (!aTessShells.IsEmpty()) + { + Handle(StepVisual_TessellatedSolid) aTessSolid = new StepVisual_TessellatedSolid(); + Handle(TCollection_HAsciiString) aTessName = new TCollection_HAsciiString(""); + Standard_Integer aNbItems = 0; + for (TColStd_SequenceOfTransient::Iterator anIt(aTessShells); anIt.More(); anIt.Next()) + { + Handle(StepVisual_TessellatedShell) aTessShell = Handle(StepVisual_TessellatedShell)::DownCast(anIt.Value()); + aNbItems += aTessShell->NbItems(); + } + Handle(StepVisual_HArray1OfTessellatedStructuredItem) anItems + = new StepVisual_HArray1OfTessellatedStructuredItem(1, aNbItems); + for (TColStd_SequenceOfTransient::Iterator anIt(aTessShells); anIt.More(); anIt.Next()) + { + Handle(StepVisual_TessellatedShell) aTessShell = Handle(StepVisual_TessellatedShell)::DownCast(anIt.Value()); + for (Standard_Integer i = 1; i <= aTessShell->NbItems(); ++i) + { + anItems->SetValue(i, aTessShell->ItemsValue(i)); + } + } + Standard_Boolean aHasGeomLink = !theFacetedBrepAndBrepWithVoids.IsNull(); + aTessSolid->Init(aTessName, anItems, aHasGeomLink, theFacetedBrepAndBrepWithVoids); + theTessellatedItem = aTessSolid; + } + done = Standard_True; } else { @@ -137,3 +172,15 @@ const Handle(StepShape_FacetedBrepAndBrepWithVoids) & StdFail_NotDone_Raise_if (!done, "TopoDSToStep_MakeFacetedBrepAndBrepWithVoids::Value() - no result"); return theFacetedBrepAndBrepWithVoids; } + +// ============================================================================ +// Method : TopoDSToStep_MakeFacetedBrepAndBrepWithVoids::TessellatedValue +// Purpose : Returns TessellatedItem as the optional result +// ============================================================================ + +const Handle(StepVisual_TessellatedItem)& +TopoDSToStep_MakeFacetedBrepAndBrepWithVoids::TessellatedValue() const +{ + StdFail_NotDone_Raise_if(!done, "TopoDSToStep_MakeFacetedBrepAndBrepWithVoids::TessellatedValue() - no result"); + return theTessellatedItem; +} diff --git a/src/TopoDSToStep/TopoDSToStep_MakeFacetedBrepAndBrepWithVoids.hxx b/src/TopoDSToStep/TopoDSToStep_MakeFacetedBrepAndBrepWithVoids.hxx index 81e1449f55..6360bc0dee 100644 --- a/src/TopoDSToStep/TopoDSToStep_MakeFacetedBrepAndBrepWithVoids.hxx +++ b/src/TopoDSToStep/TopoDSToStep_MakeFacetedBrepAndBrepWithVoids.hxx @@ -25,6 +25,7 @@ #include class StepShape_FacetedBrepAndBrepWithVoids; +class StepVisual_TessellatedItem; class TopoDS_Solid; class Transfer_FinderProcess; @@ -45,7 +46,7 @@ public: const Message_ProgressRange& theProgress = Message_ProgressRange()); Standard_EXPORT const Handle(StepShape_FacetedBrepAndBrepWithVoids)& Value() const; - + Standard_EXPORT const Handle(StepVisual_TessellatedItem)& TessellatedValue() const; @@ -60,6 +61,7 @@ private: Handle(StepShape_FacetedBrepAndBrepWithVoids) theFacetedBrepAndBrepWithVoids; + Handle(StepVisual_TessellatedItem) theTessellatedItem; }; diff --git a/src/TopoDSToStep/TopoDSToStep_MakeManifoldSolidBrep.cxx b/src/TopoDSToStep/TopoDSToStep_MakeManifoldSolidBrep.cxx index fc0eea736f..b165a9e067 100644 --- a/src/TopoDSToStep/TopoDSToStep_MakeManifoldSolidBrep.cxx +++ b/src/TopoDSToStep/TopoDSToStep_MakeManifoldSolidBrep.cxx @@ -16,12 +16,15 @@ #include +#include #include #include #include #include #include #include +#include +#include #include #include #include @@ -32,30 +35,35 @@ #include #include -static Handle(StepShape_ManifoldSolidBrep) MakeManifoldSolidBrep (const TopoDS_Shell& aShell, - const Handle(Transfer_FinderProcess)& FP, - const Message_ProgressRange& theProgress) +static std::pair +MakeManifoldSolidBrep(const TopoDS_Shell& aShell, + const Handle(Transfer_FinderProcess)& FP, + const Message_ProgressRange& theProgress) { Handle(StepShape_ManifoldSolidBrep) theManifoldSolidBrep; + Handle(StepVisual_TessellatedItem) aTessItem; MoniTool_DataMapOfShapeTransient aMap; TopoDSToStep_Tool aTool(aMap, Standard_False); - - TopoDSToStep_Builder StepB(aShell, aTool, FP, theProgress); + + const Standard_Integer aWriteTessGeom = Interface_Static::IVal("write.step.tessellated"); + + TopoDSToStep_Builder StepB(aShell, aTool, FP, aWriteTessGeom, theProgress); if (theProgress.UserBreak()) - return theManifoldSolidBrep; + return std::make_pair(theManifoldSolidBrep, aTessItem); TopoDSToStep::AddResult(FP, aTool); if (StepB.IsDone()) { + aTessItem = StepB.TessellatedValue(); Handle(StepShape_ClosedShell) aCShell = Handle(StepShape_ClosedShell)::DownCast(StepB.Value()); // si OPEN on le force a CLOSED mais que c est une honte ! if (aCShell.IsNull()) { Handle(StepShape_OpenShell) aOShell = Handle(StepShape_OpenShell)::DownCast(StepB.Value()); - if (aOShell.IsNull()) return theManifoldSolidBrep; + if (aOShell.IsNull()) return std::make_pair(theManifoldSolidBrep, aTessItem); else { - aCShell = new StepShape_ClosedShell; - aCShell->Init(aOShell->Name(),aOShell->CfsFaces()); + aCShell = new StepShape_ClosedShell; + aCShell->Init(aOShell->Name(), aOShell->CfsFaces()); } } theManifoldSolidBrep = new StepShape_ManifoldSolidBrep(); @@ -63,7 +71,7 @@ static Handle(StepShape_ManifoldSolidBrep) MakeManifoldSolidBrep (const TopoDS_S theManifoldSolidBrep->Init(aName, aCShell); } - return theManifoldSolidBrep; + return std::make_pair(theManifoldSolidBrep, aTessItem); } //============================================================================= @@ -75,9 +83,16 @@ TopoDSToStep_MakeManifoldSolidBrep:: const Handle(Transfer_FinderProcess)& FP, const Message_ProgressRange& theProgress) { - theManifoldSolidBrep = MakeManifoldSolidBrep(aShell, FP, theProgress); - done = !theManifoldSolidBrep.IsNull(); - if (!done && !theProgress.UserBreak()) { + std::pair + aResult = MakeManifoldSolidBrep(aShell, FP, theProgress); + done = !aResult.first.IsNull() || !aResult.second.IsNull(); + if (done) + { + theManifoldSolidBrep = aResult.first; + theTessellatedItem = aResult.second; + } + if (!done && !theProgress.UserBreak()) + { Handle(TransferBRep_ShapeMapper) errShape = new TransferBRep_ShapeMapper(aShell); FP->AddWarning(errShape, " Closed Shell not mapped to ManifoldSolidBrep"); } @@ -94,16 +109,37 @@ TopoDSToStep_MakeManifoldSolidBrep:: const Message_ProgressRange& theProgress) { TopoDS_Shell aOuterShell = BRepClass3d::OuterShell(aSolid); - if (!aOuterShell.IsNull()) { - - theManifoldSolidBrep = MakeManifoldSolidBrep(aOuterShell, FP, theProgress); - done = !theManifoldSolidBrep.IsNull(); - if (!done && !theProgress.UserBreak()) { + if (!aOuterShell.IsNull()) + { + std::pair + aResult = MakeManifoldSolidBrep(aOuterShell, FP, theProgress); + done = !aResult.first.IsNull() || !aResult.second.IsNull(); + if (done) + { + theManifoldSolidBrep = aResult.first; + if (!aResult.second.IsNull()) { + Handle(StepVisual_TessellatedSolid) aTessSolid = new StepVisual_TessellatedSolid(); + Handle(StepVisual_TessellatedShell) aTessShell = Handle(StepVisual_TessellatedShell)::DownCast(aResult.second); + Handle(TCollection_HAsciiString) aName = new TCollection_HAsciiString(""); + Handle(StepVisual_HArray1OfTessellatedStructuredItem) anItems + = new StepVisual_HArray1OfTessellatedStructuredItem(1, aTessShell->NbItems()); + for (Standard_Integer i = 1; i <= aTessShell->NbItems(); ++i) + { + anItems->SetValue(i, aTessShell->ItemsValue(i)); + } + Standard_Boolean aHasGeomLink = !theManifoldSolidBrep.IsNull(); + aTessSolid->Init(aName, anItems, aHasGeomLink, theManifoldSolidBrep); + theTessellatedItem = aTessSolid; + } + } + if (!done && !theProgress.UserBreak()) + { Handle(TransferBRep_ShapeMapper) errShape = new TransferBRep_ShapeMapper(aOuterShell); FP->AddWarning(errShape, " Outer Shell of Solid not mapped to ManifoldSolidBrep"); } } - else { + else + { Handle(TransferBRep_ShapeMapper) errShape = new TransferBRep_ShapeMapper(aOuterShell); FP->AddWarning(errShape, " Outer Shell is null; not mapped to ManifoldSolidBrep "); done = Standard_False; @@ -120,3 +156,15 @@ const Handle(StepShape_ManifoldSolidBrep) & StdFail_NotDone_Raise_if (!done, "TopoDSToStep_MakeManifoldSolidBrep::Value() - no result"); return theManifoldSolidBrep; } + +// ============================================================================ +// Method : TopoDSToStep_MakeManifoldSolidBrep::TessellatedValue +// Purpose : Returns TessellatedItem as the optional result +// ============================================================================ + +const Handle(StepVisual_TessellatedItem)& +TopoDSToStep_MakeManifoldSolidBrep::TessellatedValue() const +{ + StdFail_NotDone_Raise_if(!done, "TopoDSToStep_MakeManifoldSolidBrep::TessellatedValue() - no result"); + return theTessellatedItem; +} diff --git a/src/TopoDSToStep/TopoDSToStep_MakeManifoldSolidBrep.hxx b/src/TopoDSToStep/TopoDSToStep_MakeManifoldSolidBrep.hxx index 78c35f628e..cffd949e7f 100644 --- a/src/TopoDSToStep/TopoDSToStep_MakeManifoldSolidBrep.hxx +++ b/src/TopoDSToStep/TopoDSToStep_MakeManifoldSolidBrep.hxx @@ -25,6 +25,7 @@ #include class StepShape_ManifoldSolidBrep; +class StepVisual_TessellatedItem; class TopoDS_Shell; class Transfer_FinderProcess; class TopoDS_Solid; @@ -50,6 +51,7 @@ public: const Message_ProgressRange& theProgress = Message_ProgressRange()); Standard_EXPORT const Handle(StepShape_ManifoldSolidBrep)& Value() const; + Standard_EXPORT const Handle(StepVisual_TessellatedItem)& TessellatedValue() const; @@ -65,6 +67,7 @@ private: Handle(StepShape_ManifoldSolidBrep) theManifoldSolidBrep; + Handle(StepVisual_TessellatedItem) theTessellatedItem; }; diff --git a/src/TopoDSToStep/TopoDSToStep_MakeShellBasedSurfaceModel.cxx b/src/TopoDSToStep/TopoDSToStep_MakeShellBasedSurfaceModel.cxx index a2faeee224..e266905abd 100644 --- a/src/TopoDSToStep/TopoDSToStep_MakeShellBasedSurfaceModel.cxx +++ b/src/TopoDSToStep/TopoDSToStep_MakeShellBasedSurfaceModel.cxx @@ -15,6 +15,7 @@ // commercial license or contractual agreement. +#include #include #include #include @@ -27,6 +28,9 @@ #include #include #include +#include +#include +#include #include #include #include @@ -52,34 +56,42 @@ TopoDSToStep_MakeShellBasedSurfaceModel:: done = Standard_False; MoniTool_DataMapOfShapeTransient aMap; + const Standard_Integer aWriteTessGeom = Interface_Static::IVal("write.step.tessellated"); + TopoDSToStep_Tool aTool(aMap, Standard_False); - TopoDSToStep_Builder StepB(aFace, aTool, FP, theProgress); + TopoDSToStep_Builder StepB(aFace, aTool, FP, aWriteTessGeom, theProgress); if (theProgress.UserBreak()) return; TopoDSToStep::AddResult ( FP, aTool ); - if (StepB.IsDone()) { + if (StepB.IsDone()) + { Handle(StepShape_FaceSurface) aFS = Handle(StepShape_FaceSurface)::DownCast(StepB.Value()); - StepShape_Shell aShellSelect; - Handle(StepShape_OpenShell) aOpenShell - = new StepShape_OpenShell(); - Handle(StepShape_HArray1OfFace) aCfsFaces = - new StepShape_HArray1OfFace(1,1); - aCfsFaces->SetValue(1,aFS); - Handle(TCollection_HAsciiString) aName = - new TCollection_HAsciiString(""); - aOpenShell->Init(aName, aCfsFaces); - aShellSelect.SetValue(aOpenShell); - Handle(StepShape_HArray1OfShell) aSbsmFaces = - new StepShape_HArray1OfShell(1,1); - aSbsmFaces->SetValue(1, aShellSelect); - theShellBasedSurfaceModel = new StepShape_ShellBasedSurfaceModel(); - theShellBasedSurfaceModel->Init(aName, aSbsmFaces); + if (!aFS.IsNull()) + { + StepShape_Shell aShellSelect; + Handle(StepShape_OpenShell) aOpenShell + = new StepShape_OpenShell(); + Handle(StepShape_HArray1OfFace) aCfsFaces = + new StepShape_HArray1OfFace(1, 1); + aCfsFaces->SetValue(1, aFS); + Handle(TCollection_HAsciiString) aName = + new TCollection_HAsciiString(""); + aOpenShell->Init(aName, aCfsFaces); + aShellSelect.SetValue(aOpenShell); + Handle(StepShape_HArray1OfShell) aSbsmFaces = + new StepShape_HArray1OfShell(1, 1); + aSbsmFaces->SetValue(1, aShellSelect); + theShellBasedSurfaceModel = new StepShape_ShellBasedSurfaceModel(); + theShellBasedSurfaceModel->Init(aName, aSbsmFaces); + } + theTessellatedItem = StepB.TessellatedValue(); done = Standard_True; } - else { + else + { done = Standard_False; Handle(TransferBRep_ShapeMapper) errShape = new TransferBRep_ShapeMapper(aFace); @@ -102,31 +114,34 @@ TopoDSToStep_MakeShellBasedSurfaceModel:: Handle(StepShape_OpenShell) aOpenShell; Handle(StepShape_ClosedShell) aClosedShell; MoniTool_DataMapOfShapeTransient aMap; - + + const Standard_Integer aWriteTessGeom = Interface_Static::IVal("write.step.tessellated"); + TopoDSToStep_Tool aTool(aMap, Standard_False); - TopoDSToStep_Builder StepB(aShell, aTool, FP, theProgress); + TopoDSToStep_Builder StepB(aShell, aTool, FP, aWriteTessGeom, theProgress); if (theProgress.UserBreak()) return; //TopoDSToStep::AddResult ( FP, aTool ); if (StepB.IsDone()) { - aSbsmBoundary = new StepShape_HArray1OfShell(1,1); - if (aShell.Closed()) { - aClosedShell = Handle(StepShape_ClosedShell)::DownCast(StepB.Value()); - aShellSelect.SetValue(aClosedShell); - } - else { - aOpenShell = Handle(StepShape_OpenShell)::DownCast(StepB.Value()); - aShellSelect.SetValue(aOpenShell); + if (!StepB.Value().IsNull()) { + aSbsmBoundary = new StepShape_HArray1OfShell(1, 1); + if (aShell.Closed()) { + aClosedShell = Handle(StepShape_ClosedShell)::DownCast(StepB.Value()); + aShellSelect.SetValue(aClosedShell); + } + else { + aOpenShell = Handle(StepShape_OpenShell)::DownCast(StepB.Value()); + aShellSelect.SetValue(aOpenShell); + } + aSbsmBoundary->SetValue(1, aShellSelect); + theShellBasedSurfaceModel = new StepShape_ShellBasedSurfaceModel(); + Handle(TCollection_HAsciiString) aName = + new TCollection_HAsciiString(""); + theShellBasedSurfaceModel->Init(aName, aSbsmBoundary); + TopoDSToStep::AddResult(FP, aShell, theShellBasedSurfaceModel); } - aSbsmBoundary->SetValue(1,aShellSelect); - theShellBasedSurfaceModel = new StepShape_ShellBasedSurfaceModel(); - Handle(TCollection_HAsciiString) aName = - new TCollection_HAsciiString(""); - theShellBasedSurfaceModel->Init(aName, aSbsmBoundary); - - // bind SBSM - TopoDSToStep::AddResult(FP,aShell,theShellBasedSurfaceModel); + theTessellatedItem = StepB.TessellatedValue(); done = Standard_True; } else { @@ -135,7 +150,7 @@ TopoDSToStep_MakeShellBasedSurfaceModel:: new TransferBRep_ShapeMapper(aShell); FP->AddWarning(errShape, " Shell not mapped to ShellBasedSurfaceModel"); } - + TopoDSToStep::AddResult ( FP, aTool ); } @@ -153,11 +168,14 @@ TopoDSToStep_MakeShellBasedSurfaceModel:: Handle(StepShape_HArray1OfShell) aSbsmBoundary; Handle(StepShape_OpenShell) aOpenShell; Handle(StepShape_ClosedShell) aClosedShell; - TopoDS_Iterator It; - TopoDS_Shell aShell; - MoniTool_DataMapOfShapeTransient aMap; - TColStd_SequenceOfTransient S; - + TopoDS_Iterator It; + TopoDS_Shell aShell; + MoniTool_DataMapOfShapeTransient aMap; + TColStd_SequenceOfTransient S; + TColStd_SequenceOfTransient aTessShells; + + const Standard_Integer aWriteTessGeom = Interface_Static::IVal("write.step.tessellated"); + Standard_Integer nbshapes = 0; for (It.Initialize(aSolid); It.More(); It.Next()) if (It.Value().ShapeType() == TopAbs_SHELL) @@ -169,16 +187,23 @@ TopoDSToStep_MakeShellBasedSurfaceModel:: aShell = TopoDS::Shell(It.Value()); TopoDSToStep_Tool aTool(aMap, Standard_False); - TopoDSToStep_Builder StepB(aShell, aTool, FP, aPS.Next()); + TopoDSToStep_Builder StepB(aShell, aTool, FP, aWriteTessGeom, aPS.Next()); TopoDSToStep::AddResult ( FP, aTool ); if (StepB.IsDone()) { - S.Append(StepB.Value()); + if (!StepB.Value().IsNull()) { + S.Append(StepB.Value()); + } + Handle(StepVisual_TessellatedItem) aTessShell = StepB.TessellatedValue(); + if (!aTessShell.IsNull()) + { + aTessShells.Append(aTessShell); + } } else { - Handle(TransferBRep_ShapeMapper) errShape = - new TransferBRep_ShapeMapper(aShell); - FP->AddWarning(errShape," Shell from Solid not mapped to ShellBasedSurfaceModel"); + Handle(TransferBRep_ShapeMapper) errShape = + new TransferBRep_ShapeMapper(aShell); + FP->AddWarning(errShape, " Shell from Solid not mapped to ShellBasedSurfaceModel"); } } } @@ -190,11 +215,11 @@ TopoDSToStep_MakeShellBasedSurfaceModel:: for (Standard_Integer i=1; i<=N; i++) { aOpenShell = Handle(StepShape_OpenShell)::DownCast(S.Value(i)); if (!aOpenShell.IsNull()) { - aShellSelect.SetValue(aOpenShell); + aShellSelect.SetValue(aOpenShell); } else { - aClosedShell = Handle(StepShape_ClosedShell)::DownCast(S.Value(i)); - aShellSelect.SetValue(aClosedShell); + aClosedShell = Handle(StepShape_ClosedShell)::DownCast(S.Value(i)); + aShellSelect.SetValue(aClosedShell); } aSbsmBoundary->SetValue(i,aShellSelect); } @@ -203,6 +228,22 @@ TopoDSToStep_MakeShellBasedSurfaceModel:: Handle(TCollection_HAsciiString) aName = new TCollection_HAsciiString(""); theShellBasedSurfaceModel->Init(aName,aSbsmBoundary); + + if (!aTessShells.IsEmpty()) + { + Handle(StepVisual_TessellatedGeometricSet) aTessGS = new StepVisual_TessellatedGeometricSet(); + Handle(TCollection_HAsciiString) aTessName = new TCollection_HAsciiString(""); + NCollection_Handle anItems + = new StepVisual_Array1OfTessellatedItem(1, aTessShells.Length()); + Standard_Integer i = 1; + for (TColStd_SequenceOfTransient::Iterator anIt(aTessShells); anIt.More(); anIt.Next(), ++i) + { + Handle(StepVisual_TessellatedShell) aTessShell = Handle(StepVisual_TessellatedShell)::DownCast(anIt.Value()); + anItems->SetValue(i, aTessShell); + } + aTessGS->Init(aTessName, anItems); + } + done = Standard_True; } else { @@ -223,3 +264,15 @@ const Handle(StepShape_ShellBasedSurfaceModel) & StdFail_NotDone_Raise_if (!done, "TopoDSToStep_MakeShellBasedSurfaceModel::Value() - no result"); return theShellBasedSurfaceModel; } + +// ============================================================================ +// Method : TopoDSToStep_MakeShellBasedSurfaceModel::TessellatedValue +// Purpose : Returns TessellatedItem as the optional result +// ============================================================================ + +const Handle(StepVisual_TessellatedItem)& +TopoDSToStep_MakeShellBasedSurfaceModel::TessellatedValue() const +{ + StdFail_NotDone_Raise_if(!done, "TopoDSToStep_MakeShellBasedSurfaceModel::TessellatedValue() - no result"); + return theTessellatedItem; +} diff --git a/src/TopoDSToStep/TopoDSToStep_MakeShellBasedSurfaceModel.hxx b/src/TopoDSToStep/TopoDSToStep_MakeShellBasedSurfaceModel.hxx index b3abbc7794..efbf85ee70 100644 --- a/src/TopoDSToStep/TopoDSToStep_MakeShellBasedSurfaceModel.hxx +++ b/src/TopoDSToStep/TopoDSToStep_MakeShellBasedSurfaceModel.hxx @@ -25,6 +25,7 @@ #include class StepShape_ShellBasedSurfaceModel; +class StepVisual_TessellatedItem; class TopoDS_Face; class Transfer_FinderProcess; class TopoDS_Shell; @@ -55,7 +56,7 @@ public: const Message_ProgressRange& theProgress = Message_ProgressRange()); Standard_EXPORT const Handle(StepShape_ShellBasedSurfaceModel)& Value() const; - + Standard_EXPORT const Handle(StepVisual_TessellatedItem)& TessellatedValue() const; @@ -70,6 +71,7 @@ private: Handle(StepShape_ShellBasedSurfaceModel) theShellBasedSurfaceModel; + Handle(StepVisual_TessellatedItem) theTessellatedItem; }; diff --git a/src/TopoDSToStep/TopoDSToStep_MakeStepFace.cxx b/src/TopoDSToStep/TopoDSToStep_MakeStepFace.cxx index 5cf564b01f..8afeff398a 100644 --- a/src/TopoDSToStep/TopoDSToStep_MakeStepFace.cxx +++ b/src/TopoDSToStep/TopoDSToStep_MakeStepFace.cxx @@ -189,6 +189,18 @@ void TopoDSToStep_MakeStepFace::Init(const TopoDS_Face& aFace, // ----------------- Handle(Geom_Surface) Su = BRep_Tool::Surface(ForwardFace); + + if (Su.IsNull()) + { +#ifdef OCCT_DEBUG + std::cout << "Warning : Face without geometry not mapped"; +#endif + FP->AddWarning(errShape, " Face without geometry not mapped"); + myError = TopoDSToStep_FaceOther; + done = Standard_False; + return; + } + // CKY 23 SEP 1996 : une FACE de Step n a pas droit a RECTANGULAR_TRIMMED... // Il faut donc d abord "demonter" la RectangularTrimmedSurface pour // passer la Surface de base diff --git a/src/TopoDSToStep/TopoDSToStep_MakeTessellatedItem.cxx b/src/TopoDSToStep/TopoDSToStep_MakeTessellatedItem.cxx new file mode 100644 index 0000000000..07efb29c47 --- /dev/null +++ b/src/TopoDSToStep/TopoDSToStep_MakeTessellatedItem.cxx @@ -0,0 +1,210 @@ +// Copyright (c) 2022 OPEN CASCADE SAS +// +// This file is part of Open CASCADE Technology software library. +// +// This library is free software; you can redistribute it and/or modify it under +// the terms of the GNU Lesser General Public License version 2.1 as published +// by the Free Software Foundation, with special exception defined in the file +// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT +// distribution for complete text of the license and disclaimer of any warranty. +// +// Alternatively, this file may be used under the terms of Open CASCADE +// commercial license or contractual agreement. + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +//============================================================================= +// +//============================================================================= + +TopoDSToStep_MakeTessellatedItem::TopoDSToStep_MakeTessellatedItem() + : TopoDSToStep_Root() +{ +} + +TopoDSToStep_MakeTessellatedItem:: +TopoDSToStep_MakeTessellatedItem(const TopoDS_Face& theFace, + TopoDSToStep_Tool& theTool, + const Handle(Transfer_FinderProcess)& theFP, + const Message_ProgressRange& theProgress) + : TopoDSToStep_Root() +{ + Init(theFace, theTool, theFP, theProgress); +} + +//============================================================================= +// +//============================================================================= + +TopoDSToStep_MakeTessellatedItem:: +TopoDSToStep_MakeTessellatedItem(const TopoDS_Shell& theShell, + TopoDSToStep_Tool& theTool, + const Handle(Transfer_FinderProcess)& theFP, + const Message_ProgressRange& theProgress) + : TopoDSToStep_Root() +{ + Init(theShell, theTool, theFP, theProgress); +} + +//============================================================================= +// Create a TriangulatedFace of StepVisual from a Face of TopoDS +//============================================================================= + +void TopoDSToStep_MakeTessellatedItem::Init(const TopoDS_Face& theFace, + TopoDSToStep_Tool& theTool, + const Handle(Transfer_FinderProcess)& theFP, + const Message_ProgressRange& theProgress) +{ + done = Standard_False; + + if (theProgress.UserBreak()) + return; + + TopLoc_Location aLoc; + const Handle(Poly_Triangulation)& aMesh = BRep_Tool::Triangulation(theFace, aLoc); + if (!aMesh.IsNull()) + { + Handle(StepVisual_TriangulatedFace) aTriaFace = new StepVisual_TriangulatedFace(); + Handle(TCollection_HAsciiString) aName = new TCollection_HAsciiString(""); + Handle(StepVisual_CoordinatesList) aCoordinates = new StepVisual_CoordinatesList(); + Handle(TColgp_HArray1OfXYZ) aPoints = new TColgp_HArray1OfXYZ(1, aMesh->NbNodes()); + for (Standard_Integer i = 1; i <= aMesh->NbNodes(); ++i) + { + aPoints->SetValue(i, aMesh->Node(i).XYZ()); + } + aCoordinates->Init(aName, aPoints); + Handle(TColStd_HArray2OfReal) aNormals = new TColStd_HArray2OfReal(1, aMesh->NbNodes(), 1, 3); + if (!aMesh->HasNormals()) + { + Poly::ComputeNormals(aMesh); + } + for (Standard_Integer i = 1; i <= aMesh->NbNodes(); ++i) + { + gp_Dir aNorm = aMesh->Normal(i); + aNormals->SetValue(i, 1, aNorm.X()); + aNormals->SetValue(i, 2, aNorm.Y()); + aNormals->SetValue(i, 3, aNorm.Z()); + } + const Standard_Boolean aHasGeomLink = theTool.IsBound(theFace); + StepVisual_FaceOrSurface aGeomLink; + if (aHasGeomLink) + { + Handle(StepShape_TopologicalRepresentationItem) aTopoItem = theTool.Find(theFace); + aGeomLink.SetValue(aTopoItem); + } + Handle(TColStd_HArray1OfInteger) anIndices = new TColStd_HArray1OfInteger(1, aMesh->NbNodes()); + for (Standard_Integer i = 1; i <= aMesh->NbNodes(); ++i) + { + anIndices->SetValue(i, i); + } + Handle(TColStd_HArray2OfInteger) aTrias = new TColStd_HArray2OfInteger(1, aMesh->NbTriangles(), 1, 3); + for (Standard_Integer i = 1; i <= aMesh->NbTriangles(); ++i) + { + const Poly_Triangle& aT = aMesh->Triangle(i); + aTrias->SetValue(i, 1, aT.Value(1)); + aTrias->SetValue(i, 2, aT.Value(2)); + aTrias->SetValue(i, 3, aT.Value(3)); + } + aTriaFace->Init(aName, aCoordinates, aMesh->NbNodes(), aNormals, aHasGeomLink, aGeomLink, anIndices, aTrias); + theTessellatedItem = aTriaFace; + + done = Standard_True; + } + else + { + done = Standard_False; + Handle(TransferBRep_ShapeMapper) anErrShape = + new TransferBRep_ShapeMapper(theFace); + theFP->AddWarning(anErrShape, " Face not mapped to TessellatedItem"); + } + +} + +//============================================================================= +// Create a TesselatedShell of StepVisual from a Shell of TopoDS +//============================================================================= + +void TopoDSToStep_MakeTessellatedItem::Init(const TopoDS_Shell& theShell, + TopoDSToStep_Tool& theTool, + const Handle(Transfer_FinderProcess)& theFP, + const Message_ProgressRange& theProgress) +{ + done = Standard_False; + theTessellatedItem.Nullify(); + + if (theProgress.UserBreak()) + return; + + TopExp_Explorer anExp; + Standard_Integer aNbFaces = 0; + for (anExp.Init(theShell, TopAbs_FACE); anExp.More(); anExp.Next(), ++aNbFaces) {} + + Message_ProgressScope aPS(theProgress, NULL, aNbFaces); + + NCollection_Sequence aTessFaces; + for (anExp.Init(theShell, TopAbs_FACE); anExp.More() && aPS.More(); anExp.Next(), aPS.Next()) + { + const TopoDS_Face aFace = TopoDS::Face(anExp.Current()); + TopoDSToStep_MakeTessellatedItem aMakeFace(aFace, theTool, theFP, aPS.Next()); + if (aMakeFace.IsDone()) + { + aTessFaces.Append(Handle(StepVisual_TessellatedStructuredItem)::DownCast(aMakeFace.Value())); + } + } + + if (aTessFaces.IsEmpty()) + { + return; + } + + Handle(StepVisual_TessellatedShell) aTessShell = new StepVisual_TessellatedShell(); + Handle(TCollection_HAsciiString) aName = new TCollection_HAsciiString(""); + + Handle(StepVisual_HArray1OfTessellatedStructuredItem) anItems + = new StepVisual_HArray1OfTessellatedStructuredItem(1, aTessFaces.Size()); + for (Standard_Integer i = aTessFaces.Lower(); i <= aTessFaces.Upper(); ++i) + { + anItems->SetValue(i, aTessFaces.Value(i)); + } + + Handle(StepShape_ConnectedFaceSet) aFaceSet; + if (theTool.IsBound(theShell)) + { + aFaceSet = Handle(StepShape_ConnectedFaceSet)::DownCast(theTool.Find(theShell)); + } + + const Standard_Boolean aHasTopoLink = !aFaceSet.IsNull(); + aTessShell->Init(aName, anItems, aHasTopoLink, aFaceSet); + + theTessellatedItem = aTessShell; + + //TopoDSToStep::AddResult(theFP, theShell, theTessellatedItem); + done = Standard_True; +} + +// ============================================================================ +// Method : TopoDSToStep_MakeTessellatedItem::Value +// Purpose : Returns TessellatedItem as the result +// ============================================================================ + +const Handle(StepVisual_TessellatedItem) & +TopoDSToStep_MakeTessellatedItem::Value() const +{ + StdFail_NotDone_Raise_if (!done, "TopoDSToStep_MakeTessellatedItem::Value() - no result"); + return theTessellatedItem; +} diff --git a/src/TopoDSToStep/TopoDSToStep_MakeTessellatedItem.hxx b/src/TopoDSToStep/TopoDSToStep_MakeTessellatedItem.hxx new file mode 100644 index 0000000000..41a2cb8b2d --- /dev/null +++ b/src/TopoDSToStep/TopoDSToStep_MakeTessellatedItem.hxx @@ -0,0 +1,86 @@ +// Copyright (c) 2022 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 _TopoDSToStep_MakeTessellatedItem_HeaderFile +#define _TopoDSToStep_MakeTessellatedItem_HeaderFile + +#include +#include +#include + +#include +#include + +class StepVisual_TessellatedItem; +class TopoDS_Face; +class TopoDS_Shell; +class Transfer_FinderProcess; + +//! This class implements the mapping between +//! Face, Shell fromTopoDS and TriangulatedFace from StepVisual. +class TopoDSToStep_MakeTessellatedItem : public TopoDSToStep_Root +{ +public: + + DEFINE_STANDARD_ALLOC + + + Standard_EXPORT TopoDSToStep_MakeTessellatedItem(); + + Standard_EXPORT TopoDSToStep_MakeTessellatedItem(const TopoDS_Face& theFace, + TopoDSToStep_Tool& theTool, + const Handle(Transfer_FinderProcess)& theFP, + const Message_ProgressRange& theProgress = Message_ProgressRange()); + + Standard_EXPORT TopoDSToStep_MakeTessellatedItem(const TopoDS_Shell& theShell, + TopoDSToStep_Tool& theTool, + const Handle(Transfer_FinderProcess)& theFP, + const Message_ProgressRange& theProgress = Message_ProgressRange()); + + Standard_EXPORT void Init(const TopoDS_Face& theFace, + TopoDSToStep_Tool& theTool, + const Handle(Transfer_FinderProcess)& theFP, + const Message_ProgressRange& theProgress = Message_ProgressRange()); + + Standard_EXPORT void Init(const TopoDS_Shell& theShell, + TopoDSToStep_Tool& theTool, + const Handle(Transfer_FinderProcess)& theFP, + const Message_ProgressRange& theProgress = Message_ProgressRange()); + + Standard_EXPORT const Handle(StepVisual_TessellatedItem)& Value() const; + + + + +protected: + + + + + +private: + + + + Handle(StepVisual_TessellatedItem) theTessellatedItem; + + +}; + + + + + + + +#endif // _TopoDSToStep_MakeTessellatedItem_HeaderFile diff --git a/tests/de_mesh/grids.list b/tests/de_mesh/grids.list index daa57b3c9e..8c433645f0 100644 --- a/tests/de_mesh/grids.list +++ b/tests/de_mesh/grids.list @@ -6,3 +6,5 @@ 006 obj_read 007 obj_write 008 ply_write +009 step_read +010 step_write \ No newline at end of file diff --git a/tests/de_mesh/step_read/A1 b/tests/de_mesh/step_read/A1 new file mode 100644 index 0000000000..6d367a3f74 --- /dev/null +++ b/tests/de_mesh/step_read/A1 @@ -0,0 +1,10 @@ + +set filename "bug30024_tessell.stp" + +ReadStep D [locate_data_file ${filename}] + +XGetOneShape S D + +set nb_faces 131 +set nb_nodes 2216 +set nb_triangles 2118 diff --git a/tests/de_mesh/step_read/A2 b/tests/de_mesh/step_read/A2 new file mode 100644 index 0000000000..33aaba4759 --- /dev/null +++ b/tests/de_mesh/step_read/A2 @@ -0,0 +1,12 @@ + +puts "0030839: Data Exchange - triangulation-only STEP file is read as empty shape" + +set filename "nist_ftc_08_asme1_ap242-2.stp" + +ReadStep D [locate_data_file ${filename}] + +XGetOneShape S D + +set nb_faces 273 +set nb_nodes 3788 +set nb_triangles 2893 diff --git a/tests/de_mesh/step_read/A3 b/tests/de_mesh/step_read/A3 new file mode 100644 index 0000000000..04b720352a --- /dev/null +++ b/tests/de_mesh/step_read/A3 @@ -0,0 +1,15 @@ + +puts "0032666: Cannot write STEP file from an XCAF document containing only triangulations in the faces" + +set filename "bug32666.xbf" + +XOpen [locate_data_file ${filename}] D0 +WriteStep D0 ${imagedir}/${casename}.stp + +ReadStep D ${imagedir}/${casename}.stp + +XGetOneShape S D + +set nb_faces 3 +set nb_nodes 428 +set nb_triangles 372 diff --git a/tests/de_mesh/step_read/B1 b/tests/de_mesh/step_read/B1 new file mode 100644 index 0000000000..075dd878b2 --- /dev/null +++ b/tests/de_mesh/step_read/B1 @@ -0,0 +1,16 @@ + +box S -min -5 -5 -5 -max 5 5 5 + +incmesh S 0.1 + +stepwrite a S "${imagedir}/${casename}.stp" + +param read.step.tessellated OnNoBRep + +ReadStep D "${imagedir}/${casename}.stp" + +XGetOneShape S D + +set nb_faces 6 +set nb_nodes 0 +set nb_triangles 0 diff --git a/tests/de_mesh/step_read/begin b/tests/de_mesh/step_read/begin new file mode 100644 index 0000000000..07d984e683 --- /dev/null +++ b/tests/de_mesh/step_read/begin @@ -0,0 +1,5 @@ +pload XDE OCAF MODELING + +# enable reading/writing tessellated STEP geometry +param read.step.tessellated On +param write.step.tessellated On diff --git a/tests/de_mesh/step_read/end b/tests/de_mesh/step_read/end new file mode 100644 index 0000000000..fd5f18a17d --- /dev/null +++ b/tests/de_mesh/step_read/end @@ -0,0 +1,20 @@ + +checktrinfo S -face ${nb_faces} -nod ${nb_nodes} -tri ${nb_triangles} + +vclear +vinit View1 +XDisplay -dispMode 1 D -explore +vaxo +vfit + +vrenderparams -shadingModel PHONG +vlight -change 0 -intensity 2.5 +vlight -change 1 -intensity 0.3 +vcamera -orthographic +vdump ${imagedir}/${casename}.png + +Close D -silent +unset S + +param read.step.tessellated Off +param write.step.tessellated Off diff --git a/tests/de_mesh/step_write/A1 b/tests/de_mesh/step_write/A1 new file mode 100644 index 0000000000..c8adfc1417 --- /dev/null +++ b/tests/de_mesh/step_write/A1 @@ -0,0 +1,8 @@ + +# load from mesh (STL) format + +readstl S [locate_data_file "b4.stl"] + +set nb_faces 1 +set nb_nodes 8 +set nb_triangles 12 diff --git a/tests/de_mesh/step_write/A2 b/tests/de_mesh/step_write/A2 new file mode 100644 index 0000000000..7530f41a21 --- /dev/null +++ b/tests/de_mesh/step_write/A2 @@ -0,0 +1,8 @@ + +# load from mesh (STL) format + +readstl S [locate_data_file "model_stl_001.stl"] + +set nb_faces 1 +set nb_nodes 1807 +set nb_triangles 3609 diff --git a/tests/de_mesh/step_write/A3 b/tests/de_mesh/step_write/A3 new file mode 100644 index 0000000000..319d7d06ef --- /dev/null +++ b/tests/de_mesh/step_write/A3 @@ -0,0 +1,8 @@ + +# load from mesh (STL) format + +readstl S [locate_data_file "model_stl_005.stl"] + +set nb_faces 1 +set nb_nodes 5265 +set nb_triangles 10526 diff --git a/tests/de_mesh/step_write/A4 b/tests/de_mesh/step_write/A4 new file mode 100644 index 0000000000..577a3d88db --- /dev/null +++ b/tests/de_mesh/step_write/A4 @@ -0,0 +1,8 @@ + +# load from mesh (STL) format + +readstl S [locate_data_file "OCC6652.stl"] + +set nb_faces 1 +set nb_nodes 13441 +set nb_triangles 26966 diff --git a/tests/de_mesh/step_write/B1 b/tests/de_mesh/step_write/B1 new file mode 100644 index 0000000000..2fe5b3973b --- /dev/null +++ b/tests/de_mesh/step_write/B1 @@ -0,0 +1,9 @@ + +# simple meshed box (mesh + brep) + +box S 1 1 1 +incmesh S 0.1 + +set nb_faces 6 +set nb_nodes 24 +set nb_triangles 12 diff --git a/tests/de_mesh/step_write/B2 b/tests/de_mesh/step_write/B2 new file mode 100644 index 0000000000..badc7685cd --- /dev/null +++ b/tests/de_mesh/step_write/B2 @@ -0,0 +1,13 @@ + +# simple meshed box with void (mesh + brep) + +box b1 -min -5 -5 -5 -max 5 5 5 +box b2 -min -3 -3 -3 -max 3 3 3 + +bcut S b1 b2 + +incmesh S 0.1 + +set nb_faces 12 +set nb_nodes 48 +set nb_triangles 24 diff --git a/tests/de_mesh/step_write/C1 b/tests/de_mesh/step_write/C1 new file mode 100644 index 0000000000..efc9869359 --- /dev/null +++ b/tests/de_mesh/step_write/C1 @@ -0,0 +1,10 @@ + +# simple meshed box (mesh without brep) + +box S 1 1 1 +incmesh S 0.1 +tclean -geom S + +set nb_faces 6 +set nb_nodes 24 +set nb_triangles 12 diff --git a/tests/de_mesh/step_write/C2 b/tests/de_mesh/step_write/C2 new file mode 100644 index 0000000000..8b67153803 --- /dev/null +++ b/tests/de_mesh/step_write/C2 @@ -0,0 +1,11 @@ + +# simple meshed box (mesh with brep) + +param write.step.tessellated OnNoBRep + +box S 1 1 1 +incmesh S 0.1 + +set nb_faces 6 +set nb_nodes 0 +set nb_triangles 0 diff --git a/tests/de_mesh/step_write/begin b/tests/de_mesh/step_write/begin new file mode 100644 index 0000000000..07d984e683 --- /dev/null +++ b/tests/de_mesh/step_write/begin @@ -0,0 +1,5 @@ +pload XDE OCAF MODELING + +# enable reading/writing tessellated STEP geometry +param read.step.tessellated On +param write.step.tessellated On diff --git a/tests/de_mesh/step_write/end b/tests/de_mesh/step_write/end new file mode 100644 index 0000000000..3a5f84ddcf --- /dev/null +++ b/tests/de_mesh/step_write/end @@ -0,0 +1,33 @@ + +# save the initial shape to STEP +stepwrite a S "${imagedir}/${casename}.stp" + +# read saved STEP into an OCAF document +ReadStep D "${imagedir}/${casename}.stp" + +# get document model as a single shape +XGetOneShape S1 D + +# check tessellation metrics of the shape restored from STEP +checktrinfo S1 -face ${nb_faces} -nod ${nb_nodes} -tri ${nb_triangles} + +vclear +vinit View1 +XDisplay -dispMode 1 D -explore +vaxo +vfit + +vrenderparams -shadingModel PHONG +vlight -change 0 -intensity 2.5 +vlight -change 1 -intensity 0.3 +vcamera -orthographic +vdump ${imagedir}/${casename}.png + +Close D -silent +Close D1 -silent +unset S +unset S1 + +# restore reading/writing tessellated STEP geometry default parameters +param read.step.tessellated On +param write.step.tessellated OnNoBRep From d30f25e6b1a91e5d9de1dd18d3c951274d486103 Mon Sep 17 00:00:00 2001 From: Charlemagne Lasse Date: Wed, 13 Apr 2022 11:54:30 +0200 Subject: [PATCH 300/639] 0032931: Modeling Algorithms - Crash in ChFi3d_IsInFront when no face was found The ChFi3d_IsInFront code is currently not handling all the combinations correctly. For example, if `if(fd1->IndexOfS2() == fd2->IndexOfS2())` is true, it can happen that the `TopoDS::Face(DStr.Shape(fd1->Index(jf1)))` returns a Face with entity == NULL. The subsequent usage of this NULL face in `BRep_Tool::Parameters( Vtx, face )` will then cause a segfault. While the best approach would be to identify the implementation bug in the algorithm behind PChFi3d_IsInFron, a check + exception is used instead because the actual algorithm is not known. Signed-off-by: Charlemagne Lasse --- src/ChFi3d/ChFi3d_Builder_0.cxx | 20 ++++++++++++++++---- tests/bugs/modalg_8/bug32931 | 26 ++++++++++++++++++++++++++ 2 files changed, 42 insertions(+), 4 deletions(-) create mode 100644 tests/bugs/modalg_8/bug32931 diff --git a/src/ChFi3d/ChFi3d_Builder_0.cxx b/src/ChFi3d/ChFi3d_Builder_0.cxx index 5e64b338a1..ef17f40eb1 100644 --- a/src/ChFi3d/ChFi3d_Builder_0.cxx +++ b/src/ChFi3d/ChFi3d_Builder_0.cxx @@ -732,10 +732,13 @@ Standard_Boolean ChFi3d_IsInFront(TopOpeBRepDS_DataStructure& DStr, if(fd1->IndexOfS1() == fd2->IndexOfS1()) { jf1 = 1; jf2 = 1; face = TopoDS::Face(DStr.Shape(fd1->Index(jf1))); + if (face.IsNull()) throw Standard_NullObject("ChFi3d_IsInFront : Trying to check orientation of NULL face"); OrSave1 = cd1->Orientation(jf1); Or = OrFace1 = face.Orientation(); OrSave2 = cd2->Orientation(jf2); - OrFace2 = DStr.Shape(fd2->Index(jf2)).Orientation(); + const TopoDS_Shape& shape2 = DStr.Shape(fd2->Index(jf2)); + if (shape2.IsNull()) throw Standard_NullObject("ChFi3d_IsInFront : Trying to check orientation of NULL shape"); + OrFace2 = shape2.Orientation(); visavis = Standard_True; sameside = ChFi3d::SameSide(Or,OrSave1,OrSave2,OrFace1,OrFace2); // The parameters of the other side are not used for orientation. This would raise problems @@ -753,10 +756,13 @@ Standard_Boolean ChFi3d_IsInFront(TopOpeBRepDS_DataStructure& DStr, if(fd1->IndexOfS2() == fd2->IndexOfS1()) { jf1 = 2; jf2 = 1; face = TopoDS::Face(DStr.Shape(fd1->Index(jf1))); + if (face.IsNull()) throw Standard_NullObject("ChFi3d_IsInFront : Trying to check orientation of NULL face"); OrSave1 = cd1->Orientation(jf1); Or = OrFace1 = face.Orientation(); OrSave2 = cd2->Orientation(jf2); - OrFace2 = DStr.Shape(fd2->Index(jf2)).Orientation(); + const TopoDS_Shape& shape2 = DStr.Shape(fd2->Index(jf2)); + if (shape2.IsNull()) throw Standard_NullObject("ChFi3d_IsInFront : Trying to check orientation of NULL shape"); + OrFace2 = shape2.Orientation(); visavis = Standard_True; sameside = ChFi3d::SameSide(Or,OrSave1,OrSave2,OrFace1,OrFace2); // The parameters of the other side are not used for orientation. This would raise problems @@ -786,10 +792,13 @@ Standard_Boolean ChFi3d_IsInFront(TopOpeBRepDS_DataStructure& DStr, if(fd1->IndexOfS1() == fd2->IndexOfS2()) { jf1 = 1; jf2 = 2; face = TopoDS::Face(DStr.Shape(fd1->Index(jf1))); + if (face.IsNull()) throw Standard_NullObject("ChFi3d_IsInFront : Trying to check orientation of NULL face"); OrSave1 = cd1->Orientation(jf1); Or = OrFace1 = face.Orientation(); OrSave2 = cd2->Orientation(jf2); - OrFace2 = DStr.Shape(fd2->Index(jf2)).Orientation(); + const TopoDS_Shape& shape2 = DStr.Shape(fd2->Index(jf2)); + if (shape2.IsNull()) throw Standard_NullObject("ChFi3d_IsInFront : Trying to check orientation of NULL shape"); + OrFace2 = shape2.Orientation(); visavis = Standard_True; sameside = ChFi3d::SameSide(Or,OrSave1,OrSave2,OrFace1,OrFace2); // The parameters of the other side are not used for orientation. @@ -819,10 +828,13 @@ Standard_Boolean ChFi3d_IsInFront(TopOpeBRepDS_DataStructure& DStr, if(fd1->IndexOfS2() == fd2->IndexOfS2()) { jf1 = 2; jf2 = 2; face = TopoDS::Face(DStr.Shape(fd1->Index(jf1))); + if (face.IsNull()) throw Standard_NullObject("ChFi3d_IsInFront : Trying to check orientation of NULL face"); OrSave1 = cd1->Orientation(jf1); Or = OrFace1 = face.Orientation(); OrSave2 = cd2->Orientation(jf2); - OrFace2 = DStr.Shape(fd2->Index(jf2)).Orientation(); + const TopoDS_Shape& shape2 = DStr.Shape(fd2->Index(jf2)); + if (shape2.IsNull()) throw Standard_NullObject("ChFi3d_IsInFront : Trying to check orientation of NULL shape"); + OrFace2 = shape2.Orientation(); visavis = Standard_True; sameside = ChFi3d::SameSide(Or,OrSave1,OrSave2,OrFace1,OrFace2); // The parameters of the other side are not used for orientation. diff --git a/tests/bugs/modalg_8/bug32931 b/tests/bugs/modalg_8/bug32931 new file mode 100644 index 0000000000..344b5b0d1a --- /dev/null +++ b/tests/bugs/modalg_8/bug32931 @@ -0,0 +1,26 @@ +puts "TODO OCC32931 ALL: Tcl Exception" +puts "TODO OCC32931 ALL: TEST INCOMPLETE" + +puts "============" +puts "OCC32931: Modeling Algorithms - Crash in ChFi3d_IsInFront when no face was found" +puts "============" +puts "" + +# Load & prepare data. +restore [locate_data_file bug32931.brep] b +explode b E + +# Make screenshot before filleting. +smallview +donly b b_10 1 b_18 1 b_19 1 b_20 1 b_21 1 b_17 +fit +xwd $imagedir/${test_image}_1.png + +# Make fillet. +blend result b 1 b_10 1 b_18 1 b_19 1 b_20 1 b_21 1 b_17 + +# Make screenshot after filleting. +donly result +fit +xwd $imagedir/${test_image}_2.png + From 10a19b2a75f75fb4c3232d26751e40bd6a5f53a1 Mon Sep 17 00:00:00 2001 From: Charlemagne Lasse Date: Wed, 13 Apr 2022 11:54:30 +0200 Subject: [PATCH 301/639] 0032930: Modeling Algorithms - Crash in PerformIntersectionAtEnd when no face was found The PerformIntersectionAtEnd code is currently not handling all the faces correctly. If it retrieves Face[0] as F, it can happen that the previously ran code didn't actually retrieve any faces in this array at all. For example when: * "if (nface==3)" is true - "if (!findonf1)" is true (doesn't assign any faces to this array) - "if (!findonf2)" is true (doesn't assign any faces to this array) - "if (state == ChFiDS_OnSame)" is not true (because it is ChFiDS_AllSame) - "if (findonf1 && !isOnSame1)" cannot be true (see above, but would handle faces) - "if (findonf2 && !isOnSame2)" cannot be true (see above, but would handle faces) - "if (isOnSame2)" is false (but would also handle faces) Since no faces were assigned here, F would be a NULL face. As result, the function will crash when trying to access the Surface behind the face via `BRep_Tool::Surface(F);`. While the best approach would be to identify the implementation bug in the algorithm behind PerformIntersectionAtEnd, a check + exception is used instead because the actual algorithm is not known. Signed-off-by: Charlemagne Lasse --- src/ChFi3d/ChFi3d_Builder_C1.cxx | 3 +++ tests/bugs/modalg_8/bug32930 | 26 ++++++++++++++++++++++++++ 2 files changed, 29 insertions(+) create mode 100644 tests/bugs/modalg_8/bug32930 diff --git a/src/ChFi3d/ChFi3d_Builder_C1.cxx b/src/ChFi3d/ChFi3d_Builder_C1.cxx index 93f20646ac..1996ca9d19 100644 --- a/src/ChFi3d/ChFi3d_Builder_C1.cxx +++ b/src/ChFi3d/ChFi3d_Builder_C1.cxx @@ -2115,6 +2115,9 @@ void ChFi3d_Builder::PerformIntersectionAtEnd(const Standard_Integer Index) F=Face[nb-1]; if (!prolface[nb-1]) faceprol[nb-1]=F; } + + if (F.IsNull()) throw Standard_NullObject("IntersectionAtEnd : Trying to intersect with NULL face"); + Sfacemoins1=BRep_Tool::Surface(F); Handle(Geom_Curve) cint; Handle(Geom2d_Curve) C2dint1, C2dint2,cface,cfacemoins1; diff --git a/tests/bugs/modalg_8/bug32930 b/tests/bugs/modalg_8/bug32930 new file mode 100644 index 0000000000..be24c74646 --- /dev/null +++ b/tests/bugs/modalg_8/bug32930 @@ -0,0 +1,26 @@ +puts "TODO OCC32930 ALL: Tcl Exception" +puts "TODO OCC32930 ALL: TEST INCOMPLETE" + +puts "============" +puts "OCC32930: Modeling Algorithms - Crash in PerformIntersectionAtEnd when no face was found" +puts "============" +puts "" + +# Load & prepare data. +restore [locate_data_file bug32930.brep] b +explode b E + +# Make screenshot before filleting. +smallview +donly b b_10 +fit +xwd $imagedir/${test_image}_1.png + +# Make fillet. +blend result b 1 b_10 + +# Make screenshot after filleting. +donly result +fit +xwd $imagedir/${test_image}_2.png + From 24e4b3c83b237dad583f87c983eb06433d56c203 Mon Sep 17 00:00:00 2001 From: Charlemagne Lasse Date: Wed, 13 Apr 2022 11:54:30 +0200 Subject: [PATCH 302/639] 0032929: Modeling Algorithms - Crash in PerformIntersectionAtEnd after deletion of surfdata When creating a fillet, num is calculated via ChFi3d_IndexOfSurfData. If it returns just the number of entries in surfdata, it can happen that this value becomes invalid when handling the case "two faces common to the edge are found". When both components are on an arc, there will be num removed from the surfdata. num would then be larger than the number of entries surfdata. The derived num1 is therefore also incorrect. The subsequent usage of this value will either: * Debug build: cause an out of bounds exception in ChangeValue (`SeqFil.ChangeValue(num)`) * Release build: cause a segfault when retrieving it via index num1 (`SeqFil(num1)`) num + num1 must be recalculated after the deletion happens to correctly calculate the fillet. Signed-off-by: Charlemagne Lasse --- src/ChFi3d/ChFi3d_Builder_C1.cxx | 7 +++++ tests/bugs/modalg_8/bug32929 | 44 ++++++++++++++++++++++++++++++++ 2 files changed, 51 insertions(+) create mode 100644 tests/bugs/modalg_8/bug32929 diff --git a/src/ChFi3d/ChFi3d_Builder_C1.cxx b/src/ChFi3d/ChFi3d_Builder_C1.cxx index 1996ca9d19..da727d1a35 100644 --- a/src/ChFi3d/ChFi3d_Builder_C1.cxx +++ b/src/ChFi3d/ChFi3d_Builder_C1.cxx @@ -1645,6 +1645,13 @@ void ChFi3d_Builder::PerformIntersectionAtEnd(const Standard_Integer Index) } if (compoint1 && compoint2) { SeqFil.Remove(num); + num = ChFi3d_IndexOfSurfData(Vtx,stripe,sens); + if (isfirst) { + num1=num+1; + } + else { + num1=num-1; + } reg1=Standard_False; reg2=Standard_False; } } diff --git a/tests/bugs/modalg_8/bug32929 b/tests/bugs/modalg_8/bug32929 new file mode 100644 index 0000000000..cb82a99889 --- /dev/null +++ b/tests/bugs/modalg_8/bug32929 @@ -0,0 +1,44 @@ +puts "============" +puts "OCC32929: Modeling Algorithms - Crash in PerformIntersectionAtEnd after deletion of surfdata (fillet)" +puts "============" +puts "" + +# Load & prepare data. +restore [locate_data_file bug32929.brep] b +explode b E + +# Make screenshot before filleting. +smallview +donly b b_8 +fit +xwd $imagedir/${test_image}_1.png + +# Make fillet. +blend result b 1 b_8 + +# Make screenshot after filleting. +donly result +fit +xwd $imagedir/${test_image}_2.png + +# Check mass. +checkprops result -s 13435.4 + +# Check validity of result. +checkshape result + +# Check content. +set nbshapes_expected " +Number of shapes in shape + VERTEX : 25 + EDGE : 40 + WIRE : 17 + FACE : 17 + SHELL : 1 + SOLID : 1 + COMPSOLID : 0 + COMPOUND : 1 + SHAPE : 102 +" + +checknbshapes result -ref ${nbshapes_expected} -t -m "Result of ChFi3d_ChBuilder algorithm" From bf8b7e08f16d60d0487f4bdf98ef27db1e43fc2a Mon Sep 17 00:00:00 2001 From: aml Date: Fri, 3 Jun 2022 12:30:22 +0300 Subject: [PATCH 303/639] 0030492: Foundation Classes - math_BFGS fails if starting point is exactly the minimum Fix affects BFGS optimization methods by checking convergence as the first step on each iteration. FRPR works well, but it is updated as well since its logic potentially dangerous. --- src/QABugs/QABugs_19.cxx | 76 +++++ src/math/math_BFGS.cxx | 540 ++++++++++++++++++----------------- src/math/math_FRPR.cxx | 12 +- tests/bugs/fclasses/bug30492 | 8 + 4 files changed, 371 insertions(+), 265 deletions(-) create mode 100644 tests/bugs/fclasses/bug30492 diff --git a/src/QABugs/QABugs_19.cxx b/src/QABugs/QABugs_19.cxx index 46df73de95..8dc0e69aaa 100644 --- a/src/QABugs/QABugs_19.cxx +++ b/src/QABugs/QABugs_19.cxx @@ -5267,6 +5267,79 @@ static Standard_Integer OCC29412 (Draw_Interpretor& /*theDI*/, Standard_Integer return 0; } +#include +#include +//======================================================================= +//function : OCC30492 +//purpose : BFGS and FRPR fail if starting point is exactly the minimum. +//======================================================================= +// Function is: +// f(x) = x^2 +class SquareFunction : public math_MultipleVarFunctionWithGradient +{ +public: + SquareFunction() + {} + + virtual Standard_Integer NbVariables() const + { + return 1; + } + virtual Standard_Boolean Value(const math_Vector& X, + Standard_Real& F) + { + const Standard_Real x = X(1); + F = x * x; + + return Standard_True; + } + virtual Standard_Boolean Gradient(const math_Vector& X, + math_Vector& G) + { + const Standard_Real x = X(1); + G(1) = 2 * x; + + return Standard_True; + } + virtual Standard_Boolean Values(const math_Vector& X, + Standard_Real& F, + math_Vector& G) + { + Value(X, F); + Gradient(X, G); + + return Standard_True; + } + +private: +}; + +static Standard_Integer OCC30492(Draw_Interpretor& /*theDI*/, + Standard_Integer /*theNArg*/, + const char** /*theArgs*/) +{ + SquareFunction aFunc; + math_Vector aStartPnt(1, 1); + aStartPnt(1) = 0.0; + + // BFGS and FRPR fail when if starting point is exactly the minimum. + math_FRPR aFRPR(aFunc, Precision::Confusion()); + aFRPR.Perform(aFunc, aStartPnt); + if (!aFRPR.IsDone()) + std::cout << "OCC30492: Error: FRPR optimization is not done." << std::endl; + else + std::cout << "OCC30492: OK: FRPR optimization is done." << std::endl; + + math_BFGS aBFGS(1, Precision::Confusion()); + aBFGS.Perform(aFunc, aStartPnt); + if (!aBFGS.IsDone()) + std::cout << "OCC30492: Error: BFGS optimization is not done." << std::endl; + else + std::cout << "OCC30492: OK: BFGS optimization is done." << std::endl; + + return 0; +} + //======================================================================== //function : Commands_19 //purpose : @@ -5390,5 +5463,8 @@ void QABugs::Commands_19(Draw_Interpretor& theCommands) { "OCC28310: Tests validness of iterator in AIS_InteractiveContext after an removing object from it", __FILE__, OCC28310, group); theCommands.Add("OCC29412", "OCC29412 [nb cycles]: test display / remove of many small objects", __FILE__, OCC29412, group); + theCommands.Add ("OCC30492", + "OCC30492: Checks whether BFGS and FRPR fail when starting point is exact minimum.", + __FILE__, OCC30492, group); return; } diff --git a/src/math/math_BFGS.cxx b/src/math/math_BFGS.cxx index 60a0644b30..6073c8b801 100644 --- a/src/math/math_BFGS.cxx +++ b/src/math/math_BFGS.cxx @@ -27,170 +27,157 @@ #include #include -#define R 0.61803399 -#define C (1.0-R) -#define SHFT(a,b,c,d) (a)=(b);(b)=(c);(c)=(d); -#define SIGN(a, b) ((b) > 0.0 ? fabs(a) : -fabs(a)) -#define MOV3(a,b,c, d, e, f) (a)=(d); (b)= (e); (c)=(f); - - // l'utilisation de math_BrentMinumim pur trouver un minimum dans une direction // donnee n'est pas du tout optimale. voir peut etre interpolation cubique // classique et aussi essayer "recherche unidimensionnelle economique" // PROGRAMMATION MATHEMATIQUE (theorie et algorithmes) tome1 page 82. -class DirFunction : public math_FunctionWithDerivative { +// Target function for 1D problem, point and direction are known. +class DirFunction : public math_FunctionWithDerivative +{ - math_Vector *P0; - math_Vector *Dir; - math_Vector *P; - math_Vector *G; - math_MultipleVarFunctionWithGradient *F; + math_Vector *P0; + math_Vector *Dir; + math_Vector *P; + math_Vector *G; + math_MultipleVarFunctionWithGradient *F; + +public: + + //! Ctor. + DirFunction(math_Vector& V1, + math_Vector& V2, + math_Vector& V3, + math_Vector& V4, + math_MultipleVarFunctionWithGradient& f) + : P0(&V1), + Dir(&V2), + P(&V3), + G(&V4), + F(&f) + {} + + //! Sets point and direction. + void Initialize(const math_Vector& p0, + const math_Vector& dir) const + { + *P0 = p0; + *Dir = dir; + } -public : + void TheGradient(math_Vector& Grad) + { + Grad = *G; + } - DirFunction(math_Vector& V1, - math_Vector& V2, - math_Vector& V3, - math_Vector& V4, - math_MultipleVarFunctionWithGradient& f) ; + virtual Standard_Boolean Value(const Standard_Real x, + Standard_Real& fval) + { + *P = *Dir; + P->Multiply(x); + P->Add(*P0); + fval = 0.; + return F->Value(*P, fval); + } - void Initialize(const math_Vector& p0, const math_Vector& dir) const; - void TheGradient(math_Vector& Grad); - virtual Standard_Boolean Value(const Standard_Real x, Standard_Real& fval) ; - virtual Standard_Boolean Values(const Standard_Real x, Standard_Real& fval, Standard_Real& D) ; - virtual Standard_Boolean Derivative(const Standard_Real x, Standard_Real& D) ; + virtual Standard_Boolean Values(const Standard_Real x, + Standard_Real& fval, + Standard_Real& D) + { + *P = *Dir; + P->Multiply(x); + P->Add(*P0); + fval = D = 0.; + if (F->Values(*P, fval, *G)) + { + D = (*G).Multiplied(*Dir); + return Standard_True; + } - -}; + return Standard_False; + } + virtual Standard_Boolean Derivative(const Standard_Real x, + Standard_Real& D) + { + *P = *Dir; + P->Multiply(x); + P->Add(*P0); + Standard_Real fval; + D = 0.; + if (F->Values(*P, fval, *G)) + { + D = (*G).Multiplied(*Dir); + return Standard_True; + } - DirFunction::DirFunction(math_Vector& V1, - math_Vector& V2, - math_Vector& V3, - math_Vector& V4, - math_MultipleVarFunctionWithGradient& f) { - - P0 = &V1; - Dir = &V2; - P = &V3; - F = &f; - G = &V4; - } - - void DirFunction::Initialize(const math_Vector& p0, - const math_Vector& dir) const{ - - *P0 = p0; - *Dir = dir; - } - - void DirFunction::TheGradient(math_Vector& Grad) { - Grad = *G; - } - - - Standard_Boolean DirFunction::Value(const Standard_Real x, - Standard_Real& fval) - { - *P = *Dir; - P->Multiply(x); - P->Add(*P0); - fval = 0.; - return F->Value(*P, fval); - } - - Standard_Boolean DirFunction::Values(const Standard_Real x, - Standard_Real& fval, - Standard_Real& D) - { - *P = *Dir; - P->Multiply(x); - P->Add(*P0); - fval = D = 0.; - if (F->Values(*P, fval, *G)) - { - D = (*G).Multiplied(*Dir); - return Standard_True; - } - return Standard_False; - } - Standard_Boolean DirFunction::Derivative(const Standard_Real x, - Standard_Real& D) - { - *P = *Dir; - P->Multiply(x); - P->Add(*P0); - Standard_Real fval; - D = 0.; - if (F->Values(*P, fval, *G)) - { - D = (*G).Multiplied(*Dir); - return Standard_True; - } - return Standard_False; - } + return Standard_False; + } -//======================================================================= + +}; + +//============================================================================= //function : ComputeInitScale //purpose : Compute the appropriate initial value of scale factor to apply // to the direction to approach to the minimum of the function -//======================================================================= +//============================================================================= static Standard_Boolean ComputeInitScale(const Standard_Real theF0, - const math_Vector& theDir, - const math_Vector& theGr, - Standard_Real& theScale) + const math_Vector& theDir, + const math_Vector& theGr, + Standard_Real& theScale) { - Standard_Real dy1 = theGr * theDir; + const Standard_Real dy1 = theGr * theDir; if (Abs(dy1) < RealSmall()) return Standard_False; - Standard_Real aHnr1 = theDir.Norm2(); - Standard_Real alfa = 0.7*(-theF0) / dy1; + + const Standard_Real aHnr1 = theDir.Norm2(); + const Standard_Real alfa = 0.7*(-theF0) / dy1; theScale = 0.015 / Sqrt(aHnr1); if (theScale > alfa) theScale = alfa; + return Standard_True; } -//======================================================================= +//============================================================================= //function : ComputeMinMaxScale //purpose : For a given point and direction, and bounding box, // find min and max scale factors with which the point reaches borders // if we apply translation Point+Dir*Scale. //return : True if found, False if point is out of bounds. -//======================================================================= +//============================================================================= static Standard_Boolean ComputeMinMaxScale(const math_Vector& thePoint, const math_Vector& theDir, const math_Vector& theLeft, const math_Vector& theRight, - Standard_Real& theMinScale, - Standard_Real& theMaxScale) + Standard_Real& theMinScale, + Standard_Real& theMaxScale) { - Standard_Integer anIdx; - for (anIdx = 1; anIdx <= theLeft.Upper(); anIdx++) + for (Standard_Integer anIdx = 1; anIdx <= theLeft.Upper(); anIdx++) { - Standard_Real aLeft = theLeft(anIdx) - thePoint(anIdx); - Standard_Real aRight = theRight(anIdx) - thePoint(anIdx); + const Standard_Real aLeft = theLeft(anIdx) - thePoint(anIdx); + const Standard_Real aRight = theRight(anIdx) - thePoint(anIdx); if (Abs(theDir(anIdx)) > RealSmall()) { - // use PConfusion to get off a little from the bounds to prevent + // Use PConfusion to get off a little from the bounds to prevent // possible refuse in Value function. - Standard_Real aLScale = (aLeft + Precision::PConfusion()) / theDir(anIdx); - Standard_Real aRScale = (aRight - Precision::PConfusion()) / theDir(anIdx); + const Standard_Real aLScale = (aLeft + Precision::PConfusion()) / theDir(anIdx); + const Standard_Real aRScale = (aRight - Precision::PConfusion()) / theDir(anIdx); if (Abs(aLeft) < Precision::PConfusion()) { - // point is on the left border + // Point is on the left border. theMaxScale = Min(theMaxScale, Max(0., aRScale)); theMinScale = Max(theMinScale, Min(0., aRScale)); } else if (Abs(aRight) < Precision::PConfusion()) { - // point is on the right border + // Point is on the right border. theMaxScale = Min(theMaxScale, Max(0., aLScale)); theMinScale = Max(theMinScale, Min(0., aLScale)); } else if (aLeft * aRight < 0) { - // point is inside allowed range + // Point is inside allowed range. theMaxScale = Min(theMaxScale, Max(aLScale, aRScale)); theMinScale = Max(theMinScale, Min(aLScale, aRScale)); } @@ -202,8 +189,8 @@ static Standard_Boolean ComputeMinMaxScale(const math_Vector& thePoint, { // Direction is parallel to the border. // Check that the point is not out of bounds - if (aLeft > Precision::PConfusion() || - aRight < -Precision::PConfusion()) + if (aLeft > Precision::PConfusion() || + aRight < -Precision::PConfusion()) { return Standard_False; } @@ -212,13 +199,18 @@ static Standard_Boolean ComputeMinMaxScale(const math_Vector& thePoint, return Standard_True; } -static Standard_Boolean MinimizeDirection(math_Vector& P, - Standard_Real F0, - math_Vector& Gr, - math_Vector& Dir, - Standard_Real& Result, - DirFunction& F, - Standard_Boolean isBounds, +//============================================================================= +//function : MinimizeDirection +//purpose : Solves 1D minimization problem when point and directions +// are known. +//============================================================================= +static Standard_Boolean MinimizeDirection(math_Vector& P, + Standard_Real F0, + math_Vector& Gr, + math_Vector& Dir, + Standard_Real& Result, + DirFunction& F, + Standard_Boolean isBounds, const math_Vector& theLeft, const math_Vector& theRight) { @@ -262,13 +254,15 @@ static Standard_Boolean MinimizeDirection(math_Vector& P, Standard_Real F1; if (!F.Value(lambda, F1)) return Standard_False; + math_BracketMinimum Bracket(0.0, lambda); if (isBounds) Bracket.SetLimits(aMinLambda, aMaxLambda); Bracket.SetFA(F0); Bracket.SetFB(F1); Bracket.Perform(F); - if (Bracket.IsDone()) { + if (Bracket.IsDone()) + { // find minimum inside the bracket Standard_Real ax, xx, bx, Fax, Fxx, Fbx; Bracket.Values(ax, xx, bx); @@ -278,7 +272,8 @@ static Standard_Boolean MinimizeDirection(math_Vector& P, Standard_Real tol = 1.e-03; math_BrentMinimum Sol(tol, Fxx, niter, 1.e-08); Sol.Perform(F, ax, xx, bx); - if (Sol.IsDone()) { + if (Sol.IsDone()) + { Standard_Real Scale = Sol.Location(); Result = Sol.Minimum(); Dir.Multiply(Scale); @@ -313,154 +308,181 @@ static Standard_Boolean MinimizeDirection(math_Vector& P, return Standard_False; } - +//============================================================================= +//function : Perform +//purpose : Performs minimization problem using BFGS method. +//============================================================================= void math_BFGS::Perform(math_MultipleVarFunctionWithGradient& F, - const math_Vector& StartingPoint) { - - Standard_Boolean Good; - Standard_Integer n = TheLocation.Length(); - Standard_Integer j, i; - Standard_Real fae, fad, fac; - - math_Vector xi(1, n), dg(1, n), hdg(1, n); - math_Matrix hessin(1, n, 1, n); - hessin.Init(0.0); - - math_Vector Temp1(1, n); - math_Vector Temp2(1, n); - math_Vector Temp3(1, n); - math_Vector Temp4(1, n); - DirFunction F_Dir(Temp1, Temp2, Temp3, Temp4, F); - - TheLocation = StartingPoint; - Good = F.Values(TheLocation, PreviousMinimum, TheGradient); - if(!Good) { - Done = Standard_False; - TheStatus = math_FunctionError; - return; - } - for(i = 1; i <= n; i++) { - hessin(i, i) = 1.0; - xi(i) = -TheGradient(i); - } - - - for(nbiter = 1; nbiter <= Itermax; nbiter++) { - TheMinimum = PreviousMinimum; - Standard_Boolean IsGood = MinimizeDirection(TheLocation, TheMinimum, - TheGradient, - xi, TheMinimum, F_Dir, - myIsBoundsDefined, myLeft, myRight); - if(!IsGood) { - Done = Standard_False; - TheStatus = math_DirectionSearchError; - return; - } - if(IsSolutionReached(F)) { - Done = Standard_True; - TheStatus = math_OK; - return; - } - if (nbiter == Itermax) { - Done = Standard_False; - TheStatus = math_TooManyIterations; - return; - } - PreviousMinimum = TheMinimum; - - dg = TheGradient; - - Good = F.Values(TheLocation, TheMinimum, TheGradient); - if(!Good) { - Done = Standard_False; - TheStatus = math_FunctionError; - return; - } - - for(i = 1; i <= n; i++) { - dg(i) = TheGradient(i) - dg(i); - } - for(i = 1; i <= n; i++) { - hdg(i) = 0.0; - for (j = 1; j <= n; j++) - hdg(i) += hessin(i, j) * dg(j); - } - fac = fae = 0.0; - for(i = 1; i <= n; i++) { - fac += dg(i) * xi(i); - fae += dg(i) * hdg(i); - } - fac = 1.0 / fac; - fad = 1.0 / fae; - - for(i = 1; i <= n; i++) - dg(i) = fac * xi(i) - fad * hdg(i); - - for(i = 1; i <= n; i++) - for(j = 1; j <= n; j++) - hessin(i, j) += fac * xi(i) * xi(j) - - fad * hdg(i) * hdg(j) + fae * dg(i) * dg(j); - - for(i = 1; i <= n; i++) { - xi(i) = 0.0; - for (j = 1; j <= n; j++) xi(i) -= hessin(i, j) * TheGradient(j); - } - } - Done = Standard_False; - TheStatus = math_TooManyIterations; - return; - } - - Standard_Boolean math_BFGS::IsSolutionReached( - math_MultipleVarFunctionWithGradient&) const { - - return 2.0 * fabs(TheMinimum - PreviousMinimum) <= - XTol * (fabs(TheMinimum) + fabs(PreviousMinimum) + EPSZ); + const math_Vector& StartingPoint) +{ + const Standard_Integer n = TheLocation.Length(); + Standard_Boolean Good = Standard_True; + Standard_Integer j, i; + Standard_Real fae, fad, fac; + + math_Vector xi(1, n), dg(1, n), hdg(1, n); + math_Matrix hessin(1, n, 1, n); + hessin.Init(0.0); + + math_Vector Temp1(1, n); + math_Vector Temp2(1, n); + math_Vector Temp3(1, n); + math_Vector Temp4(1, n); + DirFunction F_Dir(Temp1, Temp2, Temp3, Temp4, F); + + TheLocation = StartingPoint; + Good = F.Values(TheLocation, PreviousMinimum, TheGradient); + if (!Good) + { + Done = Standard_False; + TheStatus = math_FunctionError; + return; + } + for (i = 1; i <= n; i++) + { + hessin(i, i) = 1.0; + xi(i) = -TheGradient(i); + } + + + for (nbiter = 1; nbiter <= Itermax; nbiter++) + { + TheMinimum = PreviousMinimum; + const Standard_Boolean IsGood = MinimizeDirection(TheLocation, TheMinimum, TheGradient, + xi, TheMinimum, F_Dir, myIsBoundsDefined, + myLeft, myRight); + + if (IsSolutionReached(F)) + { + Done = Standard_True; + TheStatus = math_OK; + return; + } + + if (!IsGood) + { + Done = Standard_False; + TheStatus = math_DirectionSearchError; + return; } - - math_BFGS::math_BFGS(const Standard_Integer NbVariables, - const Standard_Real Tolerance, - const Standard_Integer NbIterations, - const Standard_Real ZEPS) - : TheStatus(math_OK), - TheLocation(1, NbVariables), - TheGradient(1, NbVariables), - PreviousMinimum(0.), - TheMinimum(0.), - XTol(Tolerance), - EPSZ(ZEPS), - nbiter(0), - myIsBoundsDefined(Standard_False), - myLeft(1, NbVariables, 0.0), - myRight(1, NbVariables, 0.0), - Done(Standard_False), - Itermax(NbIterations) + PreviousMinimum = TheMinimum; + + dg = TheGradient; + + Good = F.Values(TheLocation, TheMinimum, TheGradient); + if (!Good) { + Done = Standard_False; + TheStatus = math_FunctionError; + return; } + for (i = 1; i <= n; i++) + dg(i) = TheGradient(i) - dg(i); + + for (i = 1; i <= n; i++) + { + hdg(i) = 0.0; + for (j = 1; j <= n; j++) + hdg(i) += hessin(i, j) * dg(j); + } - math_BFGS::~math_BFGS() + fac = fae = 0.0; + for (i = 1; i <= n; i++) { + fac += dg(i) * xi(i); + fae += dg(i) * hdg(i); } + fac = 1.0 / fac; + fad = 1.0 / fae; + + for (i = 1; i <= n; i++) + dg(i) = fac * xi(i) - fad * hdg(i); - void math_BFGS::Dump(Standard_OStream& o) const { - - o<< "math_BFGS resolution: "; - if(Done) { - o << " Status = Done \n"; - o <<" Location Vector = " << Location() << "\n"; - o <<" Minimum value = "<< Minimum()<<"\n"; - o <<" Number of iterations = "< Date: Fri, 13 May 2022 12:53:03 +0300 Subject: [PATCH 304/639] 0032954: Tool for applying transformation to OCAF document New XCAFDoc classes: - XCAFDoc_AssemblyIterator: iterator in depth along the assembly tree - XCAFDoc_AssemblyGraph: assembly graph with iterator - XCAFDoc_AssemblyTool: provides generic methods for traversing assembly tree and graph A method for re-scaling (sub-)assembly geometry is added to XCAFDoc_Editor. New DRAW commands: - XDumpAssemblyTree: iterates through the assembly tree in depth up to the specified level, if any - XDumpAssemblyGraph: prints assembly graph structure - XDumpNomenclature: prints number of (sub-)assembly/part instances - XRescaleGeometry: applies geometrical scale to (sub-)assembly --- src/XCAFDoc/FILES | 5 + src/XCAFDoc/XCAFDoc_AssemblyGraph.cxx | 270 ++++++++++++ src/XCAFDoc/XCAFDoc_AssemblyGraph.hxx | 220 ++++++++++ src/XCAFDoc/XCAFDoc_AssemblyIterator.cxx | 193 +++++++++ src/XCAFDoc/XCAFDoc_AssemblyIterator.hxx | 72 ++++ src/XCAFDoc/XCAFDoc_AssemblyTool.hxx | 97 +++++ src/XCAFDoc/XCAFDoc_Editor.cxx | 524 ++++++++++++++++++++++- src/XCAFDoc/XCAFDoc_Editor.hxx | 18 +- src/XDEDRAW/XDEDRAW.cxx | 373 ++++++++++++++++ tests/xcaf/end | 86 +++- tests/xcaf/grids.list | 4 +- tests/xcaf/rescale/A1 | 11 + tests/xcaf/rescale/A2 | 11 + tests/xcaf/rescale/B1 | 11 + tests/xcaf/rescale/C1 | 11 + tests/xcaf/traverse/A1 | 73 ++++ tests/xcaf/traverse/A2 | 22 + tests/xcaf/traverse/A3 | 35 ++ tests/xcaf/traverse/B1 | 192 +++++++++ 19 files changed, 2222 insertions(+), 6 deletions(-) create mode 100644 src/XCAFDoc/XCAFDoc_AssemblyGraph.cxx create mode 100644 src/XCAFDoc/XCAFDoc_AssemblyGraph.hxx create mode 100644 src/XCAFDoc/XCAFDoc_AssemblyIterator.cxx create mode 100644 src/XCAFDoc/XCAFDoc_AssemblyIterator.hxx create mode 100644 src/XCAFDoc/XCAFDoc_AssemblyTool.hxx create mode 100644 tests/xcaf/rescale/A1 create mode 100644 tests/xcaf/rescale/A2 create mode 100644 tests/xcaf/rescale/B1 create mode 100644 tests/xcaf/rescale/C1 create mode 100644 tests/xcaf/traverse/A1 create mode 100644 tests/xcaf/traverse/A2 create mode 100644 tests/xcaf/traverse/A3 create mode 100644 tests/xcaf/traverse/B1 diff --git a/src/XCAFDoc/FILES b/src/XCAFDoc/FILES index f2af5883ac..2398d99643 100755 --- a/src/XCAFDoc/FILES +++ b/src/XCAFDoc/FILES @@ -6,6 +6,11 @@ XCAFDoc_AssemblyItemId.cxx XCAFDoc_AssemblyItemId.hxx XCAFDoc_AssemblyItemRef.cxx XCAFDoc_AssemblyItemRef.hxx +XCAFDoc_AssemblyIterator.hxx +XCAFDoc_AssemblyIterator.cxx +XCAFDoc_AssemblyGraph.hxx +XCAFDoc_AssemblyGraph.cxx +XCAFDoc_AssemblyTool.hxx XCAFDoc_PartId.hxx XCAFDoc_Area.cxx XCAFDoc_Area.hxx diff --git a/src/XCAFDoc/XCAFDoc_AssemblyGraph.cxx b/src/XCAFDoc/XCAFDoc_AssemblyGraph.cxx new file mode 100644 index 0000000000..b344faec96 --- /dev/null +++ b/src/XCAFDoc/XCAFDoc_AssemblyGraph.cxx @@ -0,0 +1,270 @@ +// Created on: 2022-05-11 +// Copyright (c) 2022 OPEN CASCADE SAS +// +// This file is part of Open CASCADE Technology software library. +// +// This library is free software; you can redistribute it and/or modify it under +// the terms of the GNU Lesser General Public License version 2.1 as published +// by the Free Software Foundation, with special exception defined in the file +// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT +// distribution for complete text of the license and disclaimer of any warranty. +// +// Alternatively, this file may be used under the terms of Open CASCADE +// commercial license or contractual agreement. + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +// ======================================================================= +// function : XCAFDoc_AssemblyGraph constructor +// purpose : Builds an assembly graph from the OCAF document +// ======================================================================= + +XCAFDoc_AssemblyGraph::XCAFDoc_AssemblyGraph(const Handle(TDocStd_Document)& theDoc) +{ + Standard_NullObject_Raise_if(theDoc.IsNull(), "Null document!"); + + myShapeTool = XCAFDoc_DocumentTool::ShapeTool(theDoc->Main()); + Standard_NoSuchObject_Raise_if(myShapeTool.IsNull(), "No XCAFDoc_ShapeTool attribute!"); + + TDF_Label aDummy; + buildGraph(aDummy); +} + +// ======================================================================= +// function : XCAFDoc_AssemblyGraph constructor +// purpose : Builds an assembly graph from the OCAF label +// ======================================================================= + +XCAFDoc_AssemblyGraph::XCAFDoc_AssemblyGraph(const TDF_Label& theLabel) +{ + Standard_NullObject_Raise_if(theLabel.IsNull(), "Null label!"); + + myShapeTool = XCAFDoc_DocumentTool::ShapeTool(theLabel); + Standard_NoSuchObject_Raise_if(myShapeTool.IsNull(), "No XCAFDoc_ShapeTool attribute!"); + + buildGraph(theLabel); +} + +// ======================================================================= +// function : IsDirectLink +// purpose : Checks if one node is the direct child of other one +// ======================================================================= + +Standard_Boolean XCAFDoc_AssemblyGraph::IsDirectLink(const Standard_Integer theNode1, + const Standard_Integer theNode2) const +{ + if (!HasChildren(theNode1)) + return Standard_False; + + return GetChildren(theNode1).Contains(theNode2); +} + +// ======================================================================= +// function : GetNodeType +// purpose : Returns node type +// ======================================================================= + +XCAFDoc_AssemblyGraph::NodeType +XCAFDoc_AssemblyGraph::GetNodeType(const Standard_Integer theNode) const +{ + const NodeType* typePtr = myNodeTypes.Seek(theNode); + if (typePtr == NULL) + return NodeType_UNDEFINED; + + return (*typePtr); +} + +// ======================================================================= +// function : NbLinks +// purpose : Calculates and returns the number of links +// ======================================================================= + +Standard_Integer XCAFDoc_AssemblyGraph::NbLinks() const +{ + Standard_Integer aNumLinks = 0; + for (AdjacencyMap::Iterator it(myAdjacencyMap); it.More(); it.Next()) + { + aNumLinks += it.Value().Extent(); + } + return aNumLinks; +} + +// ======================================================================= +// function : GetUsageOccurrenceQuantity +// purpose : +// ======================================================================= + +Standard_Integer XCAFDoc_AssemblyGraph::NbOccurrences(const Standard_Integer theNode) const +{ + const Standard_Integer* aUsageOQPtr = myUsages.Seek(theNode); + if (aUsageOQPtr == NULL) + return 0; + + return (*aUsageOQPtr); +} + +// ======================================================================= +// function : buildGraph +// purpose : Builds an assembly graph from the OCAF document +// ======================================================================= + +void XCAFDoc_AssemblyGraph::buildGraph(const TDF_Label& theLabel) +{ + // We start from those shapes which are "free" in terms of XDE. + TDF_LabelSequence aRoots; + if (theLabel.IsNull() || (myShapeTool->Label() == theLabel)) + myShapeTool->GetFreeShapes(aRoots); + else + aRoots.Append(theLabel); + + for (TDF_LabelSequence::Iterator it(aRoots); it.More(); it.Next()) + { + TDF_Label aLabel = it.Value(); + + TDF_Label anOriginal; + if (!myShapeTool->GetReferredShape(aLabel, anOriginal)) + anOriginal = aLabel; + + const Standard_Integer aRootId = addNode(anOriginal, 0); + if (aRootId == 0) + continue; + + myRoots.Add(aRootId); + + // Add components (the objects nested into the current one). + if (myShapeTool->IsAssembly(anOriginal)) + addComponents(anOriginal, aRootId); + } +} + +// ======================================================================= +// function : addComponents +// purpose : Adds components for the given parent to the graph structure +// ======================================================================= + +void XCAFDoc_AssemblyGraph::addComponents(const TDF_Label& theParent, + const Standard_Integer theParentId) +{ + if (!myShapeTool->IsShape(theParent)) + { + return; // We have to return here in order to prevent iterating by + // sub-labels. For parts, sub-labels are used to encode + // metadata which is out of interest in conceptual design + // intent represented by assembly graph. + } + + // Loop over the children (persistent representation of "part-of" relation). + for (TDF_ChildIterator anIt(theParent); anIt.More(); anIt.Next()) + { + TDF_Label aComponent = anIt.Value(); + + // Add component + const Standard_Integer aComponentId = addNode(aComponent, theParentId); + if (aComponentId == 0) + continue; + + // Protection against deleted empty labels (after expand compounds, for example). + Handle(TDataStd_TreeNode) aJumpNode; + if (!aComponent.FindAttribute(XCAFDoc::ShapeRefGUID(), aJumpNode)) + continue; + + // Jump to the referred object (the original). + TDF_Label aChildOriginal; + if (!aJumpNode.IsNull() && aJumpNode->HasFather()) + aChildOriginal = aJumpNode->Father()->Label(); // Declaration-level origin. + + if (aChildOriginal.IsNull()) + continue; + + // Add child + const Standard_Integer aChildId = addNode(aChildOriginal, aComponentId); + if (aChildId == 0) + continue; + + // Process children: add components recursively. + addComponents(aChildOriginal, aChildId); + } +} + +// ======================================================================= +// function : addNode +// purpose : Adds node into the graph +// ======================================================================= + +Standard_Integer XCAFDoc_AssemblyGraph::addNode(const TDF_Label& theLabel, + const Standard_Integer theParentId) +{ + NodeType aNodeType = NodeType_UNDEFINED; + if (myShapeTool->IsAssembly(theLabel)) + { + if (myShapeTool->IsFree(theLabel)) + aNodeType = NodeType_AssemblyRoot; + else + aNodeType = NodeType_Subassembly; + } + else if (myShapeTool->IsComponent(theLabel)) + { + aNodeType = NodeType_Occurrence; + } + else if (myShapeTool->IsSubShape(theLabel)) + { + aNodeType = NodeType_Subshape; + } + else if (myShapeTool->IsSimpleShape(theLabel)) + { + aNodeType = NodeType_Part; + } + + if (aNodeType == NodeType_UNDEFINED) + return 0; + + // Get ID of the insertion-level node in the abstract assembly graph. + const Standard_Integer aChildId = myNodes.Add(theLabel); + myNodeTypes.Bind(aChildId, aNodeType); + + if (aNodeType != NodeType_Occurrence) + { + // Bind usage occurrences. + Standard_Integer* aUsageOQPtr = myUsages.ChangeSeek(aChildId); + if (aUsageOQPtr == NULL) + aUsageOQPtr = myUsages.Bound(aChildId, 1); + else + ++(*aUsageOQPtr); + } + + if (theParentId > 0) + { + // Add link + TColStd_PackedMapOfInteger* aMapPtr = myAdjacencyMap.ChangeSeek(theParentId); + if (aMapPtr == NULL) + aMapPtr = myAdjacencyMap.Bound(theParentId, TColStd_PackedMapOfInteger()); + + (*aMapPtr).Add(aChildId); + } + + return aChildId; +} + +// ======================================================================= +// function : Iterator constructor +// purpose : Iteration starts from the specifid node. +// ======================================================================= + +XCAFDoc_AssemblyGraph::Iterator::Iterator(const Handle(XCAFDoc_AssemblyGraph)& theGraph, + const Standard_Integer theNode) +{ + Standard_NullObject_Raise_if(theGraph.IsNull(), "Null assembly graph!"); + Standard_NullObject_Raise_if(theNode < 1, "Node ID must be positive one-based integer!"); + + myGraph = theGraph; + myCurrentIndex = theNode; +} diff --git a/src/XCAFDoc/XCAFDoc_AssemblyGraph.hxx b/src/XCAFDoc/XCAFDoc_AssemblyGraph.hxx new file mode 100644 index 0000000000..96638b1f46 --- /dev/null +++ b/src/XCAFDoc/XCAFDoc_AssemblyGraph.hxx @@ -0,0 +1,220 @@ +// Created on: 2022-05-11 +// Copyright (c) 2022 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 _XCAFDoc_AssemblyGraph_HeaderFile +#define _XCAFDoc_AssemblyGraph_HeaderFile + +#include +#include +#include +#include +#include +#include +#include + +class TDF_Label; +class TDocStd_Document; +class XCAFDoc_ShapeTool; + +class XCAFDoc_AssemblyGraph; +DEFINE_STANDARD_HANDLE(XCAFDoc_AssemblyGraph, Standard_Transient) + +// Assembly graph. +class XCAFDoc_AssemblyGraph : public Standard_Transient +{ +public: + + //! \brief Type of the graph node. + enum NodeType + { + NodeType_UNDEFINED = 0, //!< Undefined node type. + NodeType_AssemblyRoot, //!< Root node. + NodeType_Subassembly, //!< Intermediate node. + NodeType_Occurrence, //!< Assembly/part occurrence node. + NodeType_Part, //!< Leaf node to represent parts. + NodeType_Subshape //!< Subshape node. + }; + + //! \brief Type definition for graph adjacency matrix. + //! This is how parent-component links are realized in the assembly graph. + typedef NCollection_DataMap AdjacencyMap; + +public: + + //! \brief Graph iterator. + class Iterator + { + public: + + //! \brief Accepting the assembly graph and starting node to iterate. + //! Iteration starts from the specified node. + //! \param [in] theGraph - assembly graph to iterate. + //! \param [in] theNode - graph node ID. + Standard_EXPORT Iterator(const Handle(XCAFDoc_AssemblyGraph)& theGraph, + const Standard_Integer theNode = 1); + + //! Checks if there are more graph nodes to iterate. + //! \return true/false. + Standard_Boolean More() const + { + return myCurrentIndex <= myGraph->NbNodes(); + } + + //! \return 1-based ID of the current node. + Standard_Integer Current() const + { + return myCurrentIndex; + } + + //! Moves iterator to the next position. + void Next() + { + ++myCurrentIndex; + } + + private: + + Handle(XCAFDoc_AssemblyGraph) myGraph; //!< Assembly graph to iterate. + Standard_Integer myCurrentIndex; //!< Current 1-based node ID. + + }; + +public: + + //! \brief Constructs graph from XCAF document. + //! Construction of a formal graph will be done immediately. + //! \param [in] theDoc - document to iterate. + Standard_EXPORT XCAFDoc_AssemblyGraph(const Handle(TDocStd_Document)& theDoc); + + //! \brief Constructs graph from XCAF label. + //! Construction of a formal graph will be done immediately. The specified + //! label is used as a starting position. + //! \param [in] theDoc - document to iterate. + //! \param [in] theLabel - starting position. + Standard_EXPORT XCAFDoc_AssemblyGraph(const TDF_Label& theLabel); + + //! \return Document shape tool. + const Handle(XCAFDoc_ShapeTool)& GetShapeTool() const + { + return myShapeTool; + } + + //! \brief Returns IDs of the root nodes. + //! \return IDs of the root nodes. + const TColStd_PackedMapOfInteger& GetRoots() const + { + return myRoots; + } + + //! \brief Checks whether the assembly graph contains (n1, n2) directed link. + //! \param [in] theNode1 - one-based ID of the first node. + //! \param [in] theNode2 - one-based ID of the second node. + //! \return true/false. + Standard_EXPORT Standard_Boolean IsDirectLink(const Standard_Integer theNode1, + const Standard_Integer theNode2) const; + + //! \brief Checks whether direct children exist for the given node. + //! \param [in] theNode - one-based node ID. + //! \return true/false. + Standard_Boolean HasChildren(const Standard_Integer theNode) const + { + return myAdjacencyMap.IsBound(theNode); + } + + //! \brief Returns IDs of child nodes for the given node. + //! \param [in] theNode - one-based node ID. + //! \return set of child IDs. + const TColStd_PackedMapOfInteger& GetChildren(const Standard_Integer theNode) const + { + return myAdjacencyMap(theNode); + } + + //! \brief Returns the node type from \ref NodeType enum. + //! \param [in] theNode - one-based node ID. + //! \return node type. + //! \sa NodeType + Standard_EXPORT NodeType GetNodeType(const Standard_Integer theNode) const; + + //! \brief returns object ID by node ID. + //! \param [in] theNode - one-based node ID. + //! \return persistent ID. + const TDF_Label& GetNode(const Standard_Integer theNode) const + { + return myNodes(theNode); + } + + //! \brief Returns the unordered set of graph nodes. + //! \return graph nodes. + const TDF_LabelIndexedMap& GetNodes() const + { + return myNodes; + } + + //! \brief Returns the number of graph nodes. + //! \return number of graph nodes. + Standard_Integer NbNodes() const + { + return myNodes.Extent(); + } + + //! \brief Returns the collection of graph links in the form of adjacency matrix. + //! \return graph links. + const AdjacencyMap& GetLinks() const + { + return myAdjacencyMap; + } + + //! \brief Returns the number of graph links. + //! \return number of graph links. + Standard_EXPORT Standard_Integer NbLinks() const; + + //! Returns quantity of part usage occurrences. + //! \param [in] theNode - one-based part ID. + //! \return usage occurrence quantity. + Standard_EXPORT Standard_Integer NbOccurrences(const Standard_Integer theNode) const; + +private: + + //! Builds graph out of OCAF XDE structure. + //! \param [in] theLabel - optional starting position. + Standard_EXPORT void buildGraph(const TDF_Label& theLabel); + + //! Adds components for the given parent to the graph structure. + //! \param [in] theParent - OCAF label of the parent object. + //! \param [in] theParentId - ID of the already registered node representing + //! the parent object in the assembly graph + //! being populated. + Standard_EXPORT void addComponents(const TDF_Label& theParent, + const Standard_Integer theParentId); + + //! Adds node into the graph. + //! \param [in] theLabel - label at insertion level. + //! \param [in] theParentId - parent one-based node IDS. + //! \return one-based internal ID of the node. + Standard_EXPORT Standard_Integer addNode(const TDF_Label& theLabel, + const Standard_Integer theParentId); + +private: + + Handle(XCAFDoc_ShapeTool) myShapeTool; //!< Document shape tool. + TColStd_PackedMapOfInteger myRoots; //!< IDs of the root nodes. + TDF_LabelIndexedMap myNodes; //!< Maps assembly/part entries to graph node IDs. + AdjacencyMap myAdjacencyMap; //!< "Part-of" relations. + NCollection_DataMap myNodeTypes; //!< Node types. + NCollection_DataMap myUsages; //!< Occurrences usage. + +}; + +#endif // _XCAFDoc_AssemblyGraph_HeaderFile diff --git a/src/XCAFDoc/XCAFDoc_AssemblyIterator.cxx b/src/XCAFDoc/XCAFDoc_AssemblyIterator.cxx new file mode 100644 index 0000000000..83a319df4e --- /dev/null +++ b/src/XCAFDoc/XCAFDoc_AssemblyIterator.cxx @@ -0,0 +1,193 @@ +// Created on: 2022-05-11 +// Copyright (c) 2022 OPEN CASCADE SAS +// +// This file is part of Open CASCADE Technology software library. +// +// This library is free software; you can redistribute it and/or modify it under +// the terms of the GNU Lesser General Public License version 2.1 as published +// by the Free Software Foundation, with special exception defined in the file +// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT +// distribution for complete text of the license and disclaimer of any warranty. +// +// Alternatively, this file may be used under the terms of Open CASCADE +// commercial license or contractual agreement. + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +// ======================================================================= +// function : XCAFDoc_AssemblyIterator constructor +// purpose : Starts from free shapes +// ======================================================================= + +XCAFDoc_AssemblyIterator::XCAFDoc_AssemblyIterator(const Handle(TDocStd_Document)& theDoc, + const Standard_Integer theLevel) + : myMaxLevel(theLevel) + , mySeedLevel(1) +{ + Standard_NullObject_Raise_if(theDoc.IsNull(), "Null document!"); + + myShapeTool = XCAFDoc_DocumentTool::ShapeTool(theDoc->Main()); + Standard_NoSuchObject_Raise_if(myShapeTool.IsNull(), "No XCAFDoc_ShapeTool attribute!"); + + Standard_RangeError_Raise_if(myMaxLevel < 0, "Null document!"); + + TDF_LabelSequence aRoots; + myShapeTool->GetFreeShapes(aRoots); + + AuxAssemblyItem anAuxItem; + TColStd_ListOfAsciiString aParentPath; + for (TDF_LabelSequence::Iterator anIt(aRoots); anIt.More(); anIt.Next()) + { + createItem(anIt.Value(), aParentPath, anAuxItem); + myFringe.Append(anAuxItem); + } +} + +// ======================================================================= +// function : XCAFDoc_AssemblyIterator constructor +// purpose : Starts from the specified root +// ======================================================================= + +XCAFDoc_AssemblyIterator::XCAFDoc_AssemblyIterator(const Handle(TDocStd_Document)& theDoc, + const XCAFDoc_AssemblyItemId& theRoot, + const Standard_Integer theLevel) + : myMaxLevel(theLevel) + , mySeedLevel(theRoot.GetPath().Size()) +{ + Standard_NullObject_Raise_if(theDoc.IsNull(), "Null document!"); + + myShapeTool = XCAFDoc_DocumentTool::ShapeTool(theDoc->Main()); + Standard_NoSuchObject_Raise_if(myShapeTool.IsNull(), "No XCAFDoc_ShapeTool attribute!"); + + Standard_NullObject_Raise_if(theRoot.IsNull(), "Null assembly item!"); + + Standard_RangeError_Raise_if(myMaxLevel < 0, "Null document!"); + + AuxAssemblyItem aSeed; + aSeed.myItem = theRoot; + TDF_Tool::Label(theDoc->GetData(), theRoot.GetPath().Last(), aSeed.myLabel); + + if (aSeed.myLabel.IsNull()) + return; + + TDF_Label anOriginal; + if (myShapeTool->GetReferredShape(aSeed.myLabel, anOriginal)) + { + if (!myShapeTool->IsAssembly(aSeed.myLabel)) + { + aSeed.myLabel = anOriginal; + } + else + { + TCollection_AsciiString aPathStr = theRoot.ToString(); + Standard_Integer anIndex = aPathStr.SearchFromEnd("/"); + if (anIndex != -1) + { + aPathStr.Remove(anIndex, aPathStr.Length() - anIndex + 1); + } + aSeed.myItem.Init(aPathStr); + } + } + + myFringe.Append(aSeed); +} + +// ======================================================================= +// function : More +// purpose : Checks possibility to continue iteration +// ======================================================================= + +Standard_Boolean XCAFDoc_AssemblyIterator::More() const +{ + return !myFringe.IsEmpty(); +} + +// ======================================================================= +// function : Next +// purpose : Moves to the next position +// ======================================================================= + +void XCAFDoc_AssemblyIterator::Next() +{ + if (!More()) + return; // No next item. + + // Pop item + AuxAssemblyItem aCurrent = myFringe.Last(); + myFringe.Remove(myFringe.Size()); + + // Check current depth of iteration (root level is 0-level by convention) + const int aCurrentDepth = aCurrent.myItem.GetPath().Size() - mySeedLevel; + + if (aCurrentDepth < myMaxLevel) + { + // If current item is an assembly, then the next items to iterate in + // depth-first order are the components of this assembly + TDF_LabelSequence aComponents; + if (myShapeTool->IsAssembly(aCurrent.myLabel)) + { + myShapeTool->GetComponents(aCurrent.myLabel, aComponents); + } + else if (myShapeTool->IsComponent(aCurrent.myLabel)) + { + aComponents.Append(aCurrent.myLabel); + } + + // Put all labels pending for iteration to the fringe + AuxAssemblyItem anAuxItem; + for (Standard_Integer l = aComponents.Length(); l >= 1; --l) + { + TDF_Label aLabel = aComponents(l); // Insertion-level label + createItem(aLabel, aCurrent.myItem.GetPath(), anAuxItem); + + // Set item to iterate + myFringe.Append(anAuxItem); + } + } +} + +// ======================================================================= +// function : Current +// purpose : Returns current assembly item +// ======================================================================= + +XCAFDoc_AssemblyItemId XCAFDoc_AssemblyIterator::Current() const +{ + return myFringe.Last().myItem; +} + +// ======================================================================= +// function : createItem +// purpose : Makes an assembly item id from the specified label +// ======================================================================= + +void XCAFDoc_AssemblyIterator::createItem(const TDF_Label& theLabel, + const TColStd_ListOfAsciiString& theParentPath, + AuxAssemblyItem& theAuxItem) const +{ + TCollection_AsciiString anEntry; + TDF_Tool::Entry(theLabel, anEntry); + + TDF_Label anOriginal; + if (myShapeTool->GetReferredShape(theLabel, anOriginal)) + { + theAuxItem.myLabel = anOriginal; + } + else + { + theAuxItem.myLabel = theLabel; + } + + TColStd_ListOfAsciiString aPath = theParentPath; + aPath.Append(anEntry); + theAuxItem.myItem.Init(aPath); +} diff --git a/src/XCAFDoc/XCAFDoc_AssemblyIterator.hxx b/src/XCAFDoc/XCAFDoc_AssemblyIterator.hxx new file mode 100644 index 0000000000..f2c5e2b1bd --- /dev/null +++ b/src/XCAFDoc/XCAFDoc_AssemblyIterator.hxx @@ -0,0 +1,72 @@ +// Created on: 2022-05-11 +// Copyright (c) 2022 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 _XCAFDoc_AssemblyIterator_HeaderFile +#define _XCAFDoc_AssemblyIterator_HeaderFile + +#include +#include + +class TDF_Label; +class TDocStd_Document; +class XCAFDoc_ShapeTool; + +//! Iterator in depth along the assembly tree. +class XCAFDoc_AssemblyIterator +{ +public: + + //! Constructs iterator starting from assembly roots. + //! \param [in] theDoc - document to iterate. + //! \param [in, opt] theLevel - max level of hierarchy to reach (INT_MAX is for no limit). + Standard_EXPORT XCAFDoc_AssemblyIterator(const Handle(TDocStd_Document)& theDoc, + const Standard_Integer theLevel = INT_MAX); + + //! Constructs iterator starting from the specified position in the assembly tree. + //! \param [in] theDoc - document to iterate. + //! \param [in] theRoot - assembly item to start iterating from. + //! \param [in, opt] theLevel - max level of hierarchy to reach (INT_MAX is for no limit). + Standard_EXPORT XCAFDoc_AssemblyIterator(const Handle(TDocStd_Document)& theDoc, + const XCAFDoc_AssemblyItemId& theRoot, + const Standard_Integer theLevel = INT_MAX); + + //! \return true if there is still something to iterate, false -- otherwise. + Standard_EXPORT Standard_Boolean More() const; + + //! Moves depth-first iterator to the next position. + Standard_EXPORT void Next(); + + //! \return current item. + Standard_EXPORT XCAFDoc_AssemblyItemId Current() const; + +private: + + struct AuxAssemblyItem + { + TDF_Label myLabel; + XCAFDoc_AssemblyItemId myItem; + }; + + void createItem(const TDF_Label& theLabel, const TColStd_ListOfAsciiString& theParentPath, + AuxAssemblyItem& theAuxItem) const; + +private: + + Handle(XCAFDoc_ShapeTool) myShapeTool; //!< Document shape tool. + NCollection_Sequence myFringe; //!< Items pending for iteration. + Standard_Integer myMaxLevel; //!< Limit on max depth of iteration. + Standard_Integer mySeedLevel; //!< Level of hierarchy where we start. +}; + +#endif // _XCAFDoc_AssemblyIterator_HeaderFile diff --git a/src/XCAFDoc/XCAFDoc_AssemblyTool.hxx b/src/XCAFDoc/XCAFDoc_AssemblyTool.hxx new file mode 100644 index 0000000000..a7891ed1a8 --- /dev/null +++ b/src/XCAFDoc/XCAFDoc_AssemblyTool.hxx @@ -0,0 +1,97 @@ +// Created on: 2022-05-11 +// Copyright (c) 2022 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 _XCAFDoc_AssemblyTool_HeaderFile +#define _XCAFDoc_AssemblyTool_HeaderFile + +#include +#include +#include +#include +#include + +class TDocStd_Document; +class XCAFDoc_ShapeTool; + +//! Provides generic methods for traversing assembly tree and graph +class XCAFDoc_AssemblyTool +{ +public: + + //! \brief Generic method for traversing assembly tree. + //! Performs in-depth traversing of the assembly tree and calls + //! user defined function for each assembly tree node. + //! User function takes single argument of XCAFDoc_AssemblyItemId type + //! and returns true/false to continue/break. + //! ~~~~~{.cpp} + //! Standard_Boolean Print(const XCAFDoc_AssemblyItemId& theItem) + //! { + //! std::cout << theItem.ToString() << std::endl; + //! return Standard_True; + //! } + //! ~~~~~ + //! \param [in] theIterator - starting position in the assembly tree. + //! \param [in] theFunc - user function called for each assembly tree node. + template + static void Traverse(XCAFDoc_AssemblyIterator theIterator, + Func theFunc) + { + for (; theIterator.More(); theIterator.Next()) + { + if (!theFunc(theIterator.Current())) + break; + } + } + + //! \brief Generic method for traversing assembly graph. + //! Performs in-depth traversing of the assembly graph beginning from root nodes + //! and calls user defined function for each assembly graph node accepted + //! by the user defined filtering function. Filtering function takes + //! the assembly graph passed for traversing, current graph node ID + //! and returns true/false to accept/reject node. + //! ~~~~~{.cpp} + //! Standard_Boolean AcceptPartOnly(const Handle(XCAFDoc_AssemblyGraph)& theGraph, + //! const Standard_Integer theNode) + //! { + //! return (theGraph->GetNodeType(theNode) == XCAFDoc_AssemblyGraph::NodeType_Part); + //! } + //! ~~~~~ + //! User function theFunc takes the assembly graph passed for traversing, current + //! graph node ID and returns true/false to continue/break. + //! \param [in] theGraph - assembly graph. + //! \param [in] theFilter - user filtering function called for each assembly graph node. + //! \param [in] theFunc - user function called for accepted assembly graph node. + //! \param [in] theNode - starting positive one-based graph node ID. + template + static void Traverse(const Handle(XCAFDoc_AssemblyGraph)& theGraph, + Filter theFilter, + Func theFunc, + const Standard_Integer theNode = 1) + { + Standard_NullObject_Raise_if(theGraph.IsNull(), "Null assembly graph!"); + + for (XCAFDoc_AssemblyGraph::Iterator anIt(theGraph, theNode); anIt.More(); anIt.Next()) + { + const Standard_Integer aN = anIt.Current(); + if (theFilter(theGraph, aN)) + { + if (!theFunc(theGraph, aN)) + break; + } + } + } + +}; + +#endif // _XCAFDoc_AssemblyTool_HeaderFile diff --git a/src/XCAFDoc/XCAFDoc_Editor.cxx b/src/XCAFDoc/XCAFDoc_Editor.cxx index 11cff3dc44..944351b7ae 100644 --- a/src/XCAFDoc/XCAFDoc_Editor.cxx +++ b/src/XCAFDoc/XCAFDoc_Editor.cxx @@ -16,25 +16,44 @@ #include #include +#include +#include #include +#include +#include +#include +#include +#include +#include +#include #include +#include +#include +#include +#include #include #include #include #include #include +#include +#include +#include +#include #include #include #include #include +#include #include #include #include #include #include +#include +#include #include #include -#include //======================================================================= //function : Expand @@ -475,3 +494,506 @@ void XCAFDoc_Editor::CloneMetaData(const TDF_Label& theSrcLabel, } } } + +//======================================================================= +//function : rescaleDimensionRefLabels +//purpose : Applies geometrical scale to dimension's reference shapes +// not belonging to the assembly graph +//======================================================================= + +static void rescaleDimensionRefLabels(const TDF_LabelSequence& theRefLabels, + BRepBuilderAPI_Transform& theBRepTrsf, + const Handle(XCAFDoc_AssemblyGraph)& theGraph, + const TCollection_AsciiString& theEntryDimension) +{ + for (TDF_LabelSequence::Iterator anIt(theRefLabels); anIt.More(); anIt.Next()) + { + const TDF_Label& aL = anIt.Value(); + if (!theGraph->GetNodes().Contains(aL)) + { + Handle(TNaming_NamedShape) aNS; + if (aL.FindAttribute(TNaming_NamedShape::GetID(), aNS)) + { + TopoDS_Shape aShape = aNS->Get(); + theBRepTrsf.Perform(aShape, Standard_True); + if (!theBRepTrsf.IsDone()) + { + Standard_SStream aSS; + aSS << "Dimmension PMI " << theEntryDimension << " is not scaled."; + Message::SendWarning(aSS.str().c_str()); + } + else + { + TopoDS_Shape aScaledShape = theBRepTrsf.Shape(); + TNaming_Builder aBuilder(aL); + aBuilder.Generated(aShape, aScaledShape); + } + } + } + } +} + +//======================================================================= +//function : shouldRescaleAndCheckRefLabels +//purpose : Checks if all PMI reference shapes belong to the assembly +// graph. Returns true if at least one reference shape belongs +// to the assembly graph. +//======================================================================= + +static Standard_Boolean shouldRescaleAndCheckRefLabels( + const Handle(TDF_Data)& theData, + const TDF_LabelSequence& theRefLabels, + const Handle(XCAFDoc_AssemblyGraph)& theGraph, + Standard_Boolean& theAllInG) +{ + theAllInG = Standard_True; + Standard_Boolean aShouldRescale = Standard_False; + for (TDF_LabelSequence::Iterator anIt1(theRefLabels); anIt1.More(); anIt1.Next()) + { + const TDF_Label& aL = anIt1.Value(); + if (theGraph->GetNodes().Contains(aL)) + { + aShouldRescale = Standard_True; + } + else + { + Handle(XCAFDoc_AssemblyItemRef) anItemRefAttr; + if (!aL.FindAttribute(XCAFDoc_AssemblyItemRef::GetID(), anItemRefAttr)) + { + theAllInG = Standard_False; + continue; + } + const XCAFDoc_AssemblyItemId& anItemId = anItemRefAttr->GetItem(); + if (anItemId.IsNull()) + { + theAllInG = Standard_False; + continue; + } + TDF_Label aLRef; + TDF_Tool::Label(theData, anItemId.GetPath().Last(), aLRef, Standard_False); + if (aLRef.IsNull() || !theGraph->GetNodes().Contains(aLRef)) + { + theAllInG = Standard_False; + continue; + } + aShouldRescale = Standard_True; + } + } + return aShouldRescale; +} + +//======================================================================= +//function : RescaleGeometry +//purpose : Applies geometrical scale to all assembly parts, component +// locations and related attributes +//======================================================================= + +Standard_Boolean XCAFDoc_Editor::RescaleGeometry(const TDF_Label& theLabel, + const Standard_Real theScaleFactor, + const Standard_Boolean theForceIfNotRoot) +{ + if (theLabel.IsNull()) + { + Message::SendFail("Null label."); + return Standard_False; + } + + if (Abs(theScaleFactor) <= gp::Resolution()) + { + Message::SendFail("Scale factor is too small."); + return Standard_False; + } + + Handle(XCAFDoc_ShapeTool) aShapeTool = XCAFDoc_DocumentTool::ShapeTool(theLabel); + if (aShapeTool.IsNull()) + { + Message::SendFail("Couldn't find XCAFDoc_ShapeTool attribute."); + return Standard_False; + } + + if (!theForceIfNotRoot && aShapeTool->Label() != theLabel) + { + TDF_LabelSequence aFreeLabels; + aShapeTool->GetFreeShapes(aFreeLabels); + Standard_Boolean aFound = Standard_False; + for (TDF_LabelSequence::Iterator anIt(aFreeLabels); anIt.More(); anIt.Next()) + { + if (theLabel == anIt.Value()) + { + aFound = Standard_True; + break; + } + } + if (!aFound) + { + TCollection_AsciiString anEntry; + TDF_Tool::Entry(theLabel, anEntry); + Standard_SStream aSS; + aSS << "Label " << anEntry << " is not a root. Set ForceIfNotRoot true to rescale forcibly."; + Message::SendFail(aSS.str().c_str()); + return Standard_False; + } + } + + Handle(XCAFDoc_AssemblyGraph) aG = new XCAFDoc_AssemblyGraph(theLabel); + if (aG.IsNull()) + { + Message::SendFail("Couldn't create assembly graph."); + return Standard_False; + } + + Standard_Boolean anIsDone = Standard_True; + + gp_Trsf aTrsf; aTrsf.SetScaleFactor(theScaleFactor); + BRepBuilderAPI_Transform aBRepTrsf(aTrsf); + + XCAFDoc_AssemblyTool::Traverse(aG, + [](const Handle(XCAFDoc_AssemblyGraph)& theGraph, + const Standard_Integer theNode) -> Standard_Boolean + { + const XCAFDoc_AssemblyGraph::NodeType aNodeType = theGraph->GetNodeType(theNode); + return (aNodeType == XCAFDoc_AssemblyGraph::NodeType_Part) || + (aNodeType == XCAFDoc_AssemblyGraph::NodeType_Occurrence); + }, + [&](const Handle(XCAFDoc_AssemblyGraph)& theGraph, + const Standard_Integer theNode) -> Standard_Boolean + { + const TDF_Label& aLabel = theGraph->GetNode(theNode); + const XCAFDoc_AssemblyGraph::NodeType aNodeType = theGraph->GetNodeType(theNode); + + if (aNodeType == XCAFDoc_AssemblyGraph::NodeType_Part) + { + const TopoDS_Shape aShape = aShapeTool->GetShape(aLabel); + aBRepTrsf.Perform(aShape, Standard_True); + if (!aBRepTrsf.IsDone()) + { + Standard_SStream aSS; + TCollection_AsciiString anEntry; + TDF_Tool::Entry(aLabel, anEntry); + aSS << "Shape " << anEntry << " is not scaled!"; + Message::SendFail(aSS.str().c_str()); + anIsDone = Standard_False; + return Standard_False; + } + TopoDS_Shape aScaledShape = aBRepTrsf.Shape(); + aShapeTool->SetShape(aLabel, aScaledShape); + + // Update sub-shapes + TDF_LabelSequence aSubshapes; + aShapeTool->GetSubShapes(aLabel, aSubshapes); + for (TDF_LabelSequence::Iterator anItSs(aSubshapes); anItSs.More(); anItSs.Next()) + { + const TDF_Label& aLSs = anItSs.Value(); + const TopoDS_Shape aSs = aShapeTool->GetShape(aLSs); + const TopoDS_Shape aSs1 = aBRepTrsf.ModifiedShape(aSs); + aShapeTool->SetShape(aLSs, aSs1); + } + + Handle(XCAFDoc_Area) aArea; + if (aLabel.FindAttribute(XCAFDoc_Area::GetID(), aArea)) + { + aArea->Set(aArea->Get() * theScaleFactor * theScaleFactor); + } + + Handle(XCAFDoc_Centroid) aCentroid; + if (aLabel.FindAttribute(XCAFDoc_Centroid::GetID(), aCentroid)) + { + aCentroid->Set(aCentroid->Get().XYZ() * theScaleFactor); + } + + Handle(XCAFDoc_Volume) aVolume; + if (aLabel.FindAttribute(XCAFDoc_Volume::GetID(), aVolume)) + { + aVolume->Set(aVolume->Get() * theScaleFactor * theScaleFactor * theScaleFactor); + } + } + else if (aNodeType == XCAFDoc_AssemblyGraph::NodeType_Occurrence) + { + TopLoc_Location aLoc = aShapeTool->GetLocation(aLabel); + gp_Trsf aTrsf = aLoc.Transformation(); + aTrsf.SetTranslationPart(aTrsf.TranslationPart() * theScaleFactor); + XCAFDoc_Location::Set(aLabel, aTrsf); + } + + return Standard_True; + } + ); + + if (!anIsDone) + { + return Standard_False; + } + + aShapeTool->UpdateAssemblies(); + + Handle(XCAFDoc_DimTolTool) aDimTolTool = XCAFDoc_DocumentTool::DimTolTool(theLabel); + if (!aDimTolTool.IsNull()) + { + TDF_LabelSequence aDimensions; + aDimTolTool->GetDimensionLabels(aDimensions); + for (TDF_LabelSequence::Iterator anItD(aDimensions); anItD.More(); anItD.Next()) + { + const TDF_Label& aDimension = anItD.Value(); + + TCollection_AsciiString anEntryDimension; + TDF_Tool::Entry(aDimension, anEntryDimension); + + Handle(XCAFDoc_Dimension) aDimAttr; + if (aDimension.FindAttribute(XCAFDoc_Dimension::GetID(), aDimAttr)) + { + Standard_Boolean aShouldRescale = Standard_False; + Standard_Boolean aFirstLInG = Standard_True; + Standard_Boolean aSecondLInG = Standard_True; + TDF_LabelSequence aShapeLFirst, aShapeLSecond; + Standard_Boolean aHasShapeRefs = aDimTolTool->GetRefShapeLabel(aDimension, aShapeLFirst, aShapeLSecond); + if (aHasShapeRefs) + { + aShouldRescale = shouldRescaleAndCheckRefLabels(theLabel.Data(), aShapeLFirst, aG, aFirstLInG) || + shouldRescaleAndCheckRefLabels(theLabel.Data(), aShapeLSecond, aG, aSecondLInG); + } + + if (!aShouldRescale) + { + Standard_SStream aSS; + aSS << "Dimension PMI " << anEntryDimension << " is not scaled!"; + Message::SendWarning(aSS.str().c_str()); + continue; + } + + Handle(XCAFDimTolObjects_DimensionObject) aDimObj = aDimAttr->GetObject(); + + if (aDimObj->HasTextPoint()) + { + aDimObj->SetPointTextAttach(aDimObj->GetPointTextAttach().XYZ() * theScaleFactor); + } + + if (aDimObj->HasPoint()) + { + aDimObj->SetPoint(aDimObj->GetPoint().XYZ() * theScaleFactor); + } + + if (aDimObj->HasPoint2()) + { + aDimObj->SetPoint2(aDimObj->GetPoint2().XYZ() * theScaleFactor); + } + + if (aDimObj->HasPlane()) + { + gp_Ax2 aPln = aDimObj->GetPlane(); + aPln.SetLocation(aPln.Location().XYZ() * theScaleFactor); + aDimObj->SetPlane(aPln); + } + + Handle(TColStd_HArray1OfReal) aValues = aDimObj->GetValues(); + if (!aValues.IsNull()) + { + if (!aFirstLInG || !aSecondLInG) + { + Standard_SStream aSS; + aSS << "Dimension PMI " << anEntryDimension << " base shapes do not belong to the rescaled assembly!"; + Message::SendWarning(aSS.str().c_str()); + continue; + } + Standard_Boolean aRescaleOtherValues = Standard_False; + TColStd_Array1OfReal& anArray = aValues->ChangeArray1(); + switch (aDimObj->GetType()) + { + case XCAFDimTolObjects_DimensionType_Location_None: + case XCAFDimTolObjects_DimensionType_Location_CurvedDistance: + { + Standard_SStream aSS; + aSS << "Dimension PMI " << anEntryDimension << " is not scaled."; + Message::SendWarning(aSS.str().c_str()); + } + break; + case XCAFDimTolObjects_DimensionType_Location_LinearDistance: + case XCAFDimTolObjects_DimensionType_Location_LinearDistance_FromCenterToOuter: + case XCAFDimTolObjects_DimensionType_Location_LinearDistance_FromCenterToInner: + case XCAFDimTolObjects_DimensionType_Location_LinearDistance_FromOuterToCenter: + case XCAFDimTolObjects_DimensionType_Location_LinearDistance_FromOuterToOuter: + case XCAFDimTolObjects_DimensionType_Location_LinearDistance_FromOuterToInner: + case XCAFDimTolObjects_DimensionType_Location_LinearDistance_FromInnerToCenter: + case XCAFDimTolObjects_DimensionType_Location_LinearDistance_FromInnerToOuter: + case XCAFDimTolObjects_DimensionType_Location_LinearDistance_FromInnerToInner: + anArray.ChangeFirst() *= theScaleFactor; + aRescaleOtherValues = Standard_True; + break; + case XCAFDimTolObjects_DimensionType_Location_Angular: + case XCAFDimTolObjects_DimensionType_Size_Angular: + break; + case XCAFDimTolObjects_DimensionType_Location_Oriented: + case XCAFDimTolObjects_DimensionType_Location_WithPath: + { + Standard_SStream aSS; + aSS << "Dimension PMI " << anEntryDimension << " is not scaled."; + Message::SendWarning(aSS.str().c_str()); + } + break; + case XCAFDimTolObjects_DimensionType_Size_CurveLength: + case XCAFDimTolObjects_DimensionType_Size_Diameter: + case XCAFDimTolObjects_DimensionType_Size_SphericalDiameter: + case XCAFDimTolObjects_DimensionType_Size_Radius: + case XCAFDimTolObjects_DimensionType_Size_SphericalRadius: + case XCAFDimTolObjects_DimensionType_Size_ToroidalMinorDiameter: + case XCAFDimTolObjects_DimensionType_Size_ToroidalMajorDiameter: + case XCAFDimTolObjects_DimensionType_Size_ToroidalMinorRadius: + case XCAFDimTolObjects_DimensionType_Size_ToroidalMajorRadius: + case XCAFDimTolObjects_DimensionType_Size_ToroidalHighMajorDiameter: + case XCAFDimTolObjects_DimensionType_Size_ToroidalLowMajorDiameter: + case XCAFDimTolObjects_DimensionType_Size_ToroidalHighMajorRadius: + case XCAFDimTolObjects_DimensionType_Size_ToroidalLowMajorRadius: + case XCAFDimTolObjects_DimensionType_Size_Thickness: + case XCAFDimTolObjects_DimensionType_Size_WithPath: + anArray.ChangeFirst() *= theScaleFactor; + aRescaleOtherValues = Standard_True; + break; + case XCAFDimTolObjects_DimensionType_CommonLabel: + case XCAFDimTolObjects_DimensionType_DimensionPresentation: + { + Standard_SStream aSS; + aSS << "Dimension PMI " << anEntryDimension << " is not scaled."; + Message::SendWarning(aSS.str().c_str()); + } + break; + default: + { + Standard_SStream aSS; + aSS << "Dimension PMI of unsupported type " << anEntryDimension << " is not scaled."; + Message::SendWarning(aSS.str().c_str()); + } + } + rescaleDimensionRefLabels(aShapeLFirst, aBRepTrsf, aG, anEntryDimension); + rescaleDimensionRefLabels(aShapeLSecond, aBRepTrsf, aG, anEntryDimension); + if (aRescaleOtherValues) + { + for (Standard_Integer i = anArray.Lower() + 1; i <= anArray.Upper(); ++i) + anArray.ChangeValue(i) *= theScaleFactor; + + Handle(TCollection_HAsciiString) aName = aDimObj->GetSemanticName(); + if (!aName.IsNull()) + { + aName->AssignCat(" (Rescaled to "); + Standard_SStream aSS; aSS << aValues->First(); + aName->AssignCat(aSS.str().c_str()); + aName->AssignCat(")"); + } + } + } + else + { + Standard_SStream aSS; + aSS << "Dimension PMI values " << anEntryDimension << " are not scaled."; + Message::SendWarning(aSS.str().c_str()); + } + + aDimAttr->SetObject(aDimObj); + } + } + + TDF_LabelSequence aDatums; + aDimTolTool->GetDatumLabels(aDatums); + for (TDF_LabelSequence::Iterator anIt(aDatums); anIt.More(); anIt.Next()) + { + const TDF_Label& aDatum = anIt.Value(); + + TCollection_AsciiString anEntryDatum; + TDF_Tool::Entry(aDatum, anEntryDatum); + + Handle(XCAFDoc_Datum) aDatumAttr; + if (aDatum.FindAttribute(XCAFDoc_Datum::GetID(), aDatumAttr)) + { + Handle(XCAFDimTolObjects_DatumObject) aDatumObj = aDatumAttr->GetObject(); + + if (aDatumObj->HasDatumTargetParams()) + { + gp_Ax2 anAxis = aDatumObj->GetDatumTargetAxis(); + anAxis.SetLocation(anAxis.Location().XYZ() * theScaleFactor); + aDatumObj->SetDatumTargetAxis(anAxis); + // TODO: Should we rescale target length and width? + Standard_SStream aSS; + aSS << "Datum PMI target length and width " << anEntryDatum << " are not scaled."; + Message::SendWarning(aSS.str().c_str()); + //aDatumObj->SetDatumTargetLength(aDatumObj->GetDatumTargetLength() * theScaleFactor); + //aDatumObj->SetDatumTargetWidth(aDatumObj->GetDatumTargetWidth() * theScaleFactor); + } + + if (aDatumObj->HasPointText()) + { + aDatumObj->SetPointTextAttach(aDatumObj->GetPointTextAttach().XYZ() * theScaleFactor); + } + + if (aDatumObj->HasPoint()) + { + aDatumObj->SetPoint(aDatumObj->GetPoint().XYZ() * theScaleFactor); + } + + if (aDatumObj->HasPlane()) + { + gp_Ax2 aPln = aDatumObj->GetPlane(); + aPln.SetLocation(aPln.Location().XYZ() * theScaleFactor); + aDatumObj->SetPlane(aPln); + } + + aDatumAttr->SetObject(aDatumObj); + } + } + + TDF_LabelSequence aDimTols; + aDimTolTool->GetDimTolLabels(aDimTols); + for (TDF_LabelSequence::Iterator anIt(aDimTols); anIt.More(); anIt.Next()) + { + const TDF_Label& aDimTol = anIt.Value(); + + TCollection_AsciiString anEntryDimTol; + TDF_Tool::Entry(aDimTol, anEntryDimTol); + + Handle(XCAFDoc_DimTol) aDimTolAttr; + if (aDimTol.FindAttribute(XCAFDoc_DimTol::GetID(), aDimTolAttr)) + { + Standard_SStream aSS; + aSS << "DimTol PMI " << anEntryDimTol << " is not scaled."; + Message::SendWarning(aSS.str().c_str()); + } + } + } + + Handle(XCAFDoc_NotesTool) aNotesTool = XCAFDoc_DocumentTool::NotesTool(theLabel); + if (!aNotesTool.IsNull()) + { + TDF_LabelSequence aNotes; + aNotesTool->GetNotes(aNotes); + for (TDF_LabelSequence::Iterator anIt(aNotes); anIt.More(); anIt.Next()) + { + const TDF_Label& aNote = anIt.Value(); + + Handle(XCAFDoc_Note) aNoteAttr; + if (aNote.FindAttribute(XCAFDoc_NoteComment::GetID(), aNoteAttr) || + aNote.FindAttribute(XCAFDoc_NoteBalloon::GetID(), aNoteAttr) || + aNote.FindAttribute(XCAFDoc_NoteBinData::GetID(), aNoteAttr)) + { + Handle(XCAFNoteObjects_NoteObject) aNoteObj = aNoteAttr->GetObject(); + + if (aNoteObj->HasPointText()) + { + aNoteObj->SetPointText(aNoteObj->GetPointText().XYZ() * theScaleFactor); + } + + if (aNoteObj->HasPoint()) + { + aNoteObj->SetPoint(aNoteObj->GetPoint().XYZ() * theScaleFactor); + } + + if (aNoteObj->HasPlane()) + { + gp_Ax2 aPln = aNoteObj->GetPlane(); + aPln.SetLocation(aPln.Location().XYZ() * theScaleFactor); + aNoteObj->SetPlane(aPln); + } + + aNoteAttr->SetObject(aNoteObj); + } + } + } + + return anIsDone; +} diff --git a/src/XCAFDoc/XCAFDoc_Editor.hxx b/src/XCAFDoc/XCAFDoc_Editor.hxx index 89ac8ac7cf..dffc46bd16 100644 --- a/src/XCAFDoc/XCAFDoc_Editor.hxx +++ b/src/XCAFDoc/XCAFDoc_Editor.hxx @@ -44,7 +44,6 @@ public: //! Converts all compounds shapes in the document to assembly //! @param[in] theDoc input document - //! @param[in] theShape input shape label //! @param[in] theRecursively recursively expand a compound subshape //! @return True if shape successfully expanded Standard_EXPORT static Standard_Boolean Expand(const TDF_Label& theDoc, @@ -98,6 +97,23 @@ public: const Standard_Boolean theToCopyVisMaterial = Standard_True, const Standard_Boolean theToCopyAttributes = Standard_True); + //! Applies geometrical scaling to the following assembly components: + //! - part geometry + //! - sub-assembly/part occurrence location + //! - part's centroid, area and volume attributes + //! - PMIs (warnings and errors are reported if it is impossible to make changes) + //! Normally, should start from a root sub-assembly, but if theForceIfNotRoot true + //! scaling will be applied forcibly. If theLabel corresponds to the shape tool + //! scaling is applied to the whole assembly. + //! @param[in] theLabel starting label + //! @param[in] theScaleFactor scale factor, should be positive + //! @param[in] theForceIfNotRoot allows scaling of a non root assembly if true, + //! otherwise - returns false + //! @return true in case of success, otherwise - false. + Standard_EXPORT static Standard_Boolean RescaleGeometry(const TDF_Label& theLabel, + const Standard_Real theScaleFactor, + const Standard_Boolean theForceIfNotRoot = Standard_False); + }; #endif // _XCAFDoc_Editor_HeaderFile diff --git a/src/XDEDRAW/XDEDRAW.cxx b/src/XDEDRAW/XDEDRAW.cxx index 083ed649d4..dd69cab6f8 100644 --- a/src/XDEDRAW/XDEDRAW.cxx +++ b/src/XDEDRAW/XDEDRAW.cxx @@ -19,6 +19,7 @@ #include #include #include +#include #include #include #include @@ -37,6 +38,7 @@ #include #include #include +#include #include #include #include @@ -69,6 +71,9 @@ #include #include #include +#include +#include +#include #include #include #include @@ -76,6 +81,7 @@ #include #include #include +#include #include #include #include @@ -1299,6 +1305,360 @@ static Standard_Integer XShowFaceBoundary (Draw_Interpretor& di, return 0; } +//======================================================================= +//function : XAssemblyTreeDump +//purpose : Prints assembly tree structure up to the specified level +//======================================================================= + +static Standard_Integer XDumpAssemblyTree(Draw_Interpretor& di, + Standard_Integer argc, + const char ** argv) +{ + if (argc < 2) + { + di << "Usage :\n " << argv[0] << " Doc [-root label] [-level l] [-names]\n" + << " Doc - document name. \n" + << " -root label - starting root label. \n" + << " -level l - depth level (infinite by default). \n" + << " -names - prints names instead of entries. \n"; + + return 1; + } + + // get specified document + Handle(TDocStd_Document) aDoc; + DDocStd::GetDocument(argv[1], aDoc); + if (aDoc.IsNull()) + { + di << argv[1] << " is not a document\n"; + return 1; + } + + XCAFDoc_AssemblyItemId aRoot; + Standard_Integer aLevel = INT_MAX; + Standard_Boolean aPrintNames = Standard_False; + for (Standard_Integer iarg = 2; iarg < argc; ++iarg) + { + if (strcmp(argv[iarg], "-root") == 0) + { + Standard_ProgramError_Raise_if(iarg + 1 >= argc, "Root is expected!"); + aRoot.Init(argv[++iarg]); + } + else if (strcmp(argv[iarg], "-level") == 0) + { + Standard_ProgramError_Raise_if(iarg + 1 >= argc, "Level is expected!"); + TCollection_AsciiString anArg = argv[++iarg]; + Standard_ProgramError_Raise_if(!anArg.IsIntegerValue(), "Integer value is expected!"); + aLevel = anArg.IntegerValue(); + } + else if (strcmp(argv[iarg], "-names") == 0) + { + aPrintNames = Standard_True; + } + } + + Standard_SStream aSS; + + XCAFDoc_AssemblyIterator anIt = aRoot.IsNull() ? XCAFDoc_AssemblyIterator(aDoc, aLevel) + : XCAFDoc_AssemblyIterator(aDoc, aRoot, aLevel); + XCAFDoc_AssemblyTool::Traverse(anIt, [&](const XCAFDoc_AssemblyItemId& theItem) -> Standard_Boolean + { + if (aPrintNames) + { + Standard_Boolean aFirst = Standard_True; + for (TColStd_ListOfAsciiString::Iterator anIt(theItem.GetPath()); anIt.More(); + anIt.Next(), aFirst = Standard_False) + { + if (!aFirst) aSS << "/"; + TDF_Label aL; + TDF_Tool::Label(aDoc->GetData(), anIt.Value(), aL, Standard_False); + if (!aL.IsNull()) + { + TCollection_ExtendedString aName; + Handle(TDataStd_Name) aNameAttr; + if (aL.FindAttribute(TDataStd_Name::GetID(), aNameAttr)) + { + aName = aNameAttr->Get(); + aSS << aName; + continue; + } + } + aSS << anIt.Value(); + } + aSS << std::endl; + } + else + { + aSS << theItem.ToString() << std::endl; + } + return Standard_True; + }); + + di << aSS.str().c_str(); + return 0; +} + +//======================================================================= +//function : graphNodeTypename +//purpose : Returns node type name +//======================================================================= + +static +const char* graphNodeTypename(const XCAFDoc_AssemblyGraph::NodeType theNodeType) +{ + switch (theNodeType) + { + case XCAFDoc_AssemblyGraph::NodeType_AssemblyRoot: return "R"; + case XCAFDoc_AssemblyGraph::NodeType_Subassembly: return "A"; + case XCAFDoc_AssemblyGraph::NodeType_Occurrence: return "O"; + case XCAFDoc_AssemblyGraph::NodeType_Part: return "P"; + case XCAFDoc_AssemblyGraph::NodeType_Subshape: return "S"; + default: return "?"; + } +} + +//======================================================================= +//function : XAssemblyGraphDump +//purpose : Prints assembly graph structure +//======================================================================= + +static Standard_Integer XDumpAssemblyGraph(Draw_Interpretor& di, + Standard_Integer argc, + const char ** argv) +{ + if (argc < 2) + { + di << "Usage :\n " << argv[0] << " Doc [-root label] [-verbose] \n" + << " Doc - is the document name. \n" + << " -root label - is the optional starting label. \n" + << " -names - prints names instead of entries. \n"; + + return 1; + } + + // get specified document + Handle(TDocStd_Document) aDoc; + DDocStd::GetDocument(argv[1], aDoc); + if (aDoc.IsNull()) + { + di << argv[1] << " is not a document\n"; + return 1; + } + + Standard_Boolean aPrintNames = Standard_False; + TDF_Label aLabel = XCAFDoc_DocumentTool::ShapesLabel(aDoc->Main()); + for (Standard_Integer iarg = 2; iarg < argc; ++iarg) + { + if (strcmp(argv[iarg], "-root") == 0) + { + Standard_ProgramError_Raise_if(iarg + 1 >= argc, "Root is expected!"); + TDF_Tool::Label(aDoc->GetData(), argv[++iarg], aLabel, Standard_False); + } + else if (strcmp(argv[iarg], "-names") == 0) + { + aPrintNames = Standard_True; + } + } + + Handle(XCAFDoc_AssemblyGraph) aG = new XCAFDoc_AssemblyGraph(aLabel); + + Standard_SStream aSS; + + XCAFDoc_AssemblyTool::Traverse(aG, + [](const Handle(XCAFDoc_AssemblyGraph)& /*theGraph*/, + const Standard_Integer /*theNode*/) -> Standard_Boolean + { + return Standard_True; + }, + [&](const Handle(XCAFDoc_AssemblyGraph)& theGraph, + const Standard_Integer theNode) -> Standard_Boolean + { + const TDF_Label& aLabel = theGraph->GetNode(theNode); + + const XCAFDoc_AssemblyGraph::NodeType aNodeType = theGraph->GetNodeType(theNode); + + TCollection_AsciiString aNodeEntry; + if (aPrintNames) + { + Handle(TDataStd_Name) aNameAttr; + if (aLabel.FindAttribute(TDataStd_Name::GetID(), aNameAttr)) + { + aNodeEntry.AssignCat("'"); + aNodeEntry.AssignCat(aNameAttr->Get()); + aNodeEntry.AssignCat("'"); + } + } + if (aNodeEntry.IsEmpty()) + { + TDF_Tool::Entry(aLabel, aNodeEntry); + } + + aSS << theNode << " " << graphNodeTypename(aNodeType) << " " << aNodeEntry; + const XCAFDoc_AssemblyGraph::AdjacencyMap& anAdjacencyMap = theGraph->GetLinks(); + const TColStd_PackedMapOfInteger* aLinksPtr = anAdjacencyMap.Seek(theNode); + if (aLinksPtr != NULL) + { + for (TColStd_MapIteratorOfPackedMapOfInteger anIt1(*aLinksPtr); anIt1.More(); anIt1.Next()) + { + aSS << " " << anIt1.Key(); + } + } + aSS << std::endl; + + return Standard_True; + } + ); + + di << aSS.str().c_str(); + return 0; +} + +//======================================================================= +//function : XDumpNomenclature +//purpose : Prints number of assembly instances +//======================================================================= + +static Standard_Integer XDumpNomenclature(Draw_Interpretor& di, + Standard_Integer argc, + const char ** argv) +{ + if (argc < 2) + { + di << "Usage :\n " << argv[0] << " Doc [-names] \n" + << " Doc - is the document name. \n" + << " -names - prints names instead of entries. \n"; + + return 1; + } + + // get specified document + Handle(TDocStd_Document) aDoc; + DDocStd::GetDocument(argv[1], aDoc); + if (aDoc.IsNull()) + { + di << argv[1] << " is not a document\n"; + return 1; + } + + Standard_Boolean aPrintNames = Standard_False; + for (Standard_Integer iarg = 2; iarg < argc; ++iarg) + { + if (strcmp(argv[iarg], "-names") == 0) + { + aPrintNames = Standard_True; + } + } + + Handle(XCAFDoc_AssemblyGraph) aG = new XCAFDoc_AssemblyGraph(aDoc); + + Standard_SStream aSS; + + XCAFDoc_AssemblyTool::Traverse(aG, + [](const Handle(XCAFDoc_AssemblyGraph)& theGraph, + const Standard_Integer theNode) -> Standard_Boolean + { + const XCAFDoc_AssemblyGraph::NodeType aNodeType = theGraph->GetNodeType(theNode); + return (aNodeType == XCAFDoc_AssemblyGraph::NodeType_AssemblyRoot) || + (aNodeType == XCAFDoc_AssemblyGraph::NodeType_Subassembly) || + (aNodeType == XCAFDoc_AssemblyGraph::NodeType_Part); + }, + [&](const Handle(XCAFDoc_AssemblyGraph)& theGraph, + const Standard_Integer theNode) -> Standard_Boolean + { + const TDF_Label& aLabel = theGraph->GetNode(theNode); + + const XCAFDoc_AssemblyGraph::NodeType aNodeType = theGraph->GetNodeType(theNode); + + TCollection_AsciiString aNodeEntry; + if (aPrintNames) + { + Handle(TDataStd_Name) aNameAttr; + if (aLabel.FindAttribute(TDataStd_Name::GetID(), aNameAttr)) + { + aNodeEntry.AssignCat("'"); + aNodeEntry.AssignCat(aNameAttr->Get()); + aNodeEntry.AssignCat("'"); + } + } + if (aNodeEntry.IsEmpty()) + { + TDF_Tool::Entry(aLabel, aNodeEntry); + } + + aSS << theNode << " " << graphNodeTypename(aNodeType) << " " << aNodeEntry << " " + << theGraph->NbOccurrences(theNode) << std::endl; + + return Standard_True; + } + ); + + di << aSS.str().c_str(); + + return 0; +} + +//======================================================================= +//function : XRescaleGeometry +//purpose : Applies geometrical scale to all assembly components +//======================================================================= + +static Standard_Integer XRescaleGeometry(Draw_Interpretor& di, + Standard_Integer argc, + const char ** argv) +{ + if (argc < 3) + { + di << "Usage :\n " << argv[0] << " Doc factor [-root label] [-force]\n" + << " Doc - is the document name. \n" + << " factor - is the scale factor. \n" + << " -root label - is the starting label to apply rescaling. \n" + << " -force - forces rescaling even if the starting label\n" + << " is not a root. \n"; + + return 1; + } + + // get specified document + Handle(TDocStd_Document) aDoc; + DDocStd::GetDocument(argv[1], aDoc); + if (aDoc.IsNull()) + { + di << argv[1] << " is not a document\n"; + return 1; + } + + // get scale factor + Standard_Real aScaleFactor = Draw::Atof(argv[2]); + if (aScaleFactor <= 0) + { + di << "Scale factor must be positive\n"; + return 1; + } + + Standard_Boolean aForce = Standard_False; + TDF_Label aLabel = XCAFDoc_DocumentTool::ShapesLabel(aDoc->Main()); + for (Standard_Integer iarg = 3; iarg < argc; ++iarg) + { + if (strcmp(argv[iarg], "-root") == 0) + { + Standard_ProgramError_Raise_if(iarg + 1 >= argc, "Root is expected!"); + TDF_Tool::Label(aDoc->GetData(), argv[++iarg], aLabel, Standard_False); + } + else if (strcmp(argv[iarg], "-force") == 0) + { + aForce = Standard_True; + } + } + + if (!XCAFDoc_Editor::RescaleGeometry(aLabel, aScaleFactor, aForce)) + { + di << "Geometry rescale failed\n"; + return 1; + } + + return 0; +} + //======================================================================= //function : testDoc //purpose : Method to test destruction of document @@ -1456,6 +1816,19 @@ void XDEDRAW::Init(Draw_Interpretor& di) __FILE__, XShowFaceBoundary, g); di.Add ("XTestDoc", "XTestDoc shape", __FILE__, testDoc, g); + di.Add("XDumpAssemblyTree", + "Doc [-root label] [-level l] [-names]: Iterates through the assembly tree in depth up to the specified level, if any", + __FILE__, XDumpAssemblyTree, g); + di.Add("XDumpAssemblyGraph", + "Doc [-root label] [-names]: Prints assembly graph structure", + __FILE__, XDumpAssemblyGraph, g); + di.Add("XDumpNomenclature", + "Doc [-names]: Prints number of assembly instances", + __FILE__, XDumpNomenclature, g); + di.Add("XRescaleGeometry", + "Doc -scale factor [-root label]: Applies geometrical scale to assembly", + __FILE__, XRescaleGeometry, g); + // Specialized commands XDEDRAW_Shapes::InitCommands ( di ); XDEDRAW_Colors::InitCommands ( di ); diff --git a/tests/xcaf/end b/tests/xcaf/end index c3f5dc48e1..7b42e7c65c 100644 --- a/tests/xcaf/end +++ b/tests/xcaf/end @@ -524,6 +524,84 @@ if { [regexp "LAYERS" $CompareDocumentsMode] || [regexp "ALL" $CompareDocumentsM set DocLayerLabels_First [XGetLayerLabels D_First] set DocShapeLabels_First [XGetTopLevelShapes D_First] } +# Traverse assembly tree +if {[regexp "TRAVERSE_ASSEMBLY_TREE" $CompareDocumentsMode]} { + if {[info exists TRAVERSE_ASSEMBLY_TREE_ARGS]} { + set traverse_assembly_tree_result [XDumpAssemblyTree D_First {*}$TRAVERSE_ASSEMBLY_TREE_ARGS] + } else { + set traverse_assembly_tree_result [XDumpAssemblyTree D_First] + } + set traverse_assembly_tree_result [string trim $traverse_assembly_tree_result] + if {$TRAVERSE_ASSEMBLY_TREE_RESULT != $traverse_assembly_tree_result} { + puts "ERROR: Not expected traverse assembly tree result" + } +} +# Traverse assembly graph +if {[regexp "TRAVERSE_ASSEMBLY_GRAPH" $CompareDocumentsMode]} { + if {[info exists TRAVERSE_ASSEMBLY_GRAPH_ARGS]} { + set traverse_assembly_graph_result [XDumpAssemblyGraph D_First {*}$TRAVERSE_ASSEMBLY_GRAPH_ARGS] + } else { + set traverse_assembly_graph_result [XDumpAssemblyGraph D_First] + } + set traverse_assembly_graph_result [string trim $traverse_assembly_graph_result] + if {$TRAVERSE_ASSEMBLY_GRAPH_RESULT != $traverse_assembly_graph_result} { + puts "ERROR: Not expected traverse assembly graph result" + } +} +# Assembly nomenclature +if {[regexp "ASSEMBLY_NOMENCLATURE" $CompareDocumentsMode]} { + set assembly_nomenclature_result [XDumpNomenclature D_First {*}$ASSEMBLY_NOMENCLATURE_ARGS] + set assembly_nomenclature_result [string trim $assembly_nomenclature_result] + if {$ASSEMBLY_NOMENCLATURE_RESULT != $assembly_nomenclature_result} { + puts "ERROR: Not expected assembly nomenclature result" + } +} +# Rescale assembly +if {[regexp "RESCALE_ASSEMBLY" $CompareDocumentsMode]} { + if {[info exists RESCALE_ASSEMBLY_CHECK_BOUNDING] && $RESCALE_ASSEMBLY_CHECK_BOUNDING} { + XGetOneShape S_First D_First + bounding S_First -noTriangulation -save xmin ymin zmin xmax ymax zmax + set xmin_First [format "%.2f" [dval xmin]] + set ymin_First [format "%.2f" [dval ymin]] + set zmin_First [format "%.2f" [dval zmin]] + set xmax_First [format "%.2f" [dval xmax]] + set ymax_First [format "%.2f" [dval ymax]] + set zmax_First [format "%.2f" [dval zmax]] + set dx_First [expr $xmax_First - $xmin_First] + set dy_First [expr $ymax_First - $ymin_First] + set dz_First [expr $zmax_First - $zmin_First] + } + if {[info exists RESCALE_ASSEMBLY_ARGS]} { + XRescaleGeometry D_First $RESCALE_ASSEMBLY_FACTOR {*}$RESCALE_ASSEMBLY_ARGS + } else { + XRescaleGeometry D_First $RESCALE_ASSEMBLY_FACTOR + } + if {[info exists RESCALE_ASSEMBLY_CHECK_BOUNDING] && $RESCALE_ASSEMBLY_CHECK_BOUNDING} { + XGetOneShape S_Second D_First + bounding S_Second -noTriangulation -save xmin ymin zmin xmax ymax zmax + set xmin_Second [format "%.2f" [dval xmin]] + set ymin_Second [format "%.2f" [dval ymin]] + set zmin_Second [format "%.2f" [dval zmin]] + set xmax_Second [format "%.2f" [dval xmax]] + set ymax_Second [format "%.2f" [dval ymax]] + set zmax_Second [format "%.2f" [dval zmax]] + set dx_Second [expr $xmax_Second - $xmin_Second] + set dy_Second [expr $ymax_Second - $ymin_Second] + set dz_Second [expr $zmax_Second - $zmin_Second] + set dx_Scale [expr $dx_Second / $dx_First] + set dy_Scale [expr $dy_Second / $dy_First] + set dz_Scale [expr $dz_Second / $dz_First] + if { $dx_Scale != $RESCALE_ASSEMBLY_FACTOR } { + puts [format "Error : Compared X scale %f differs from %f specified one" $dx_Scale $RESCALE_ASSEMBLY_FACTOR] + } + if { $dy_Scale != $RESCALE_ASSEMBLY_FACTOR } { + puts [format "Error : Compared Y scale %f differs from %f specified one" $dy_Scale $RESCALE_ASSEMBLY_FACTOR] + } + if { $dz_Scale != $RESCALE_ASSEMBLY_FACTOR } { + puts [format "Error : Compared Z scale %f differs from %f specified one" $dz_Scale $RESCALE_ASSEMBLY_FACTOR] + } + } +} ################## WRITING FILE ##################" ###Open temporary file if { [string compare ${TypeOfFile} ""] == 0 } { @@ -917,9 +995,11 @@ if { [regexp "LAYERS" $CompareDocumentsMode] || [regexp "ALL" $CompareDocumentsM } } -XGetOneShape result D_Second -if {[isdraw result]} { - checkview -display result -2d -path ${imagedir}/${test_image}.png +if {![regexp "SKIP_CHECKVIEW" $CompareDocumentsMode]} { + XGetOneShape result D_Second + if {[isdraw result]} { + checkview -display result -2d -path ${imagedir}/${test_image}.png + } } if {[expr $ErrorCode == 2]} { diff --git a/tests/xcaf/grids.list b/tests/xcaf/grids.list index e0cefc8d22..b1b5ef2bc1 100644 --- a/tests/xcaf/grids.list +++ b/tests/xcaf/grids.list @@ -9,4 +9,6 @@ 009 brep_to_stp_add_CL 010 brep_to_xbf 011 add_ACL_brep -012 brep_add_CL \ No newline at end of file +012 brep_add_CL +013 traverse +014 rescale \ No newline at end of file diff --git a/tests/xcaf/rescale/A1 b/tests/xcaf/rescale/A1 new file mode 100644 index 0000000000..5632196c3e --- /dev/null +++ b/tests/xcaf/rescale/A1 @@ -0,0 +1,11 @@ + +ReadStep D_First [locate_data_file "as1-oc-214-mat.stp"] + +set RESCALE_ASSEMBLY_FACTOR 0.5 +set RESCALE_ASSEMBLY_CHECK_BOUNDING 1 + +set TypeOfFile "" + +set AddToDocument "" + +set CompareDocumentsMode "RESCALE_ASSEMBLY" diff --git a/tests/xcaf/rescale/A2 b/tests/xcaf/rescale/A2 new file mode 100644 index 0000000000..6dac6704a2 --- /dev/null +++ b/tests/xcaf/rescale/A2 @@ -0,0 +1,11 @@ + +ReadStep D_First [locate_data_file "as1-oc-214-mat.stp"] + +set RESCALE_ASSEMBLY_FACTOR 0.5 +set RESCALE_ASSEMBLY_ARGS "-root 0:1:1:9 -force" + +set TypeOfFile "" + +set AddToDocument "" + +set CompareDocumentsMode "RESCALE_ASSEMBLY" diff --git a/tests/xcaf/rescale/B1 b/tests/xcaf/rescale/B1 new file mode 100644 index 0000000000..af85e8aab9 --- /dev/null +++ b/tests/xcaf/rescale/B1 @@ -0,0 +1,11 @@ + +ReadStep D_First [locate_data_file "as1_motor.step"] + +set RESCALE_ASSEMBLY_FACTOR 0.001 +set RESCALE_ASSEMBLY_ARGS "-root 0:1:1:1" + +set TypeOfFile "" + +set AddToDocument "" + +set CompareDocumentsMode "RESCALE_ASSEMBLY" diff --git a/tests/xcaf/rescale/C1 b/tests/xcaf/rescale/C1 new file mode 100644 index 0000000000..786fdfb005 --- /dev/null +++ b/tests/xcaf/rescale/C1 @@ -0,0 +1,11 @@ + +XOpen [locate_data_file "as1_pmi.xbf"] D_First + +set RESCALE_ASSEMBLY_FACTOR 0.5 +set RESCALE_ASSEMBLY_CHECK_BOUNDING 1 + +set TypeOfFile "" + +set AddToDocument "" + +set CompareDocumentsMode "RESCALE_ASSEMBLY" diff --git a/tests/xcaf/traverse/A1 b/tests/xcaf/traverse/A1 new file mode 100644 index 0000000000..02bffe8803 --- /dev/null +++ b/tests/xcaf/traverse/A1 @@ -0,0 +1,73 @@ + +ReadStep D_First [locate_data_file "as1-oc-214-mat.stp"] + +set TRAVERSE_ASSEMBLY_TREE_ARGS "-names" +set TRAVERSE_ASSEMBLY_TREE_RESULT "as1 +as1/rod-assembly_1 +as1/rod-assembly_1/nut_1 +as1/rod-assembly_1/nut_2 +as1/rod-assembly_1/rod_1 +as1/l-bracket-assembly_1 +as1/l-bracket-assembly_1/nut-bolt-assembly_1 +as1/l-bracket-assembly_1/nut-bolt-assembly_1/bolt_1 +as1/l-bracket-assembly_1/nut-bolt-assembly_1/nut_3 +as1/l-bracket-assembly_1/nut-bolt-assembly_2 +as1/l-bracket-assembly_1/nut-bolt-assembly_2/bolt_1 +as1/l-bracket-assembly_1/nut-bolt-assembly_2/nut_3 +as1/l-bracket-assembly_1/nut-bolt-assembly_3 +as1/l-bracket-assembly_1/nut-bolt-assembly_3/bolt_1 +as1/l-bracket-assembly_1/nut-bolt-assembly_3/nut_3 +as1/l-bracket-assembly_1/l-bracket_1 +as1/plate_1 +as1/l-bracket-assembly_2 +as1/l-bracket-assembly_2/nut-bolt-assembly_1 +as1/l-bracket-assembly_2/nut-bolt-assembly_1/bolt_1 +as1/l-bracket-assembly_2/nut-bolt-assembly_1/nut_3 +as1/l-bracket-assembly_2/nut-bolt-assembly_2 +as1/l-bracket-assembly_2/nut-bolt-assembly_2/bolt_1 +as1/l-bracket-assembly_2/nut-bolt-assembly_2/nut_3 +as1/l-bracket-assembly_2/nut-bolt-assembly_3 +as1/l-bracket-assembly_2/nut-bolt-assembly_3/bolt_1 +as1/l-bracket-assembly_2/nut-bolt-assembly_3/nut_3 +as1/l-bracket-assembly_2/l-bracket_1" + +set TRAVERSE_ASSEMBLY_GRAPH_ARGS "-names" +set TRAVERSE_ASSEMBLY_GRAPH_RESULT "1 R 'as1' 2 9 20 22 +2 O 'rod-assembly_1' 3 +3 A 'rod-assembly' 4 6 7 +4 O 'nut_1' 5 +5 P 'nut' +6 O 'nut_2' 5 +7 O 'rod_1' 8 +8 P 'rod' +9 O 'l-bracket-assembly_1' 10 +10 A 'l-bracket-assembly' 11 16 17 18 +11 O 'nut-bolt-assembly_1' 12 +12 A 'nut-bolt-assembly' 13 15 +13 O 'bolt_1' 14 +14 P 'bolt' +15 O 'nut_3' 5 +16 O 'nut-bolt-assembly_2' 12 +17 O 'nut-bolt-assembly_3' 12 +18 O 'l-bracket_1' 19 +19 P 'l-bracket' +20 O 'plate_1' 21 +21 P 'plate' +22 O 'l-bracket-assembly_2' 10" + +set ASSEMBLY_NOMENCLATURE_ARGS "-names" +set ASSEMBLY_NOMENCLATURE_RESULT "1 R 'as1' 1 +3 A 'rod-assembly' 1 +5 P 'nut' 8 +8 P 'rod' 1 +10 A 'l-bracket-assembly' 2 +12 A 'nut-bolt-assembly' 6 +14 P 'bolt' 6 +19 P 'l-bracket' 2 +21 P 'plate' 1" + +set TypeOfFile "" + +set AddToDocument "" + +set CompareDocumentsMode "TRAVERSE_ASSEMBLY_TREE TRAVERSE_ASSEMBLY_GRAPH ASSEMBLY_NOMENCLATURE SKIP_CHECKVIEW" diff --git a/tests/xcaf/traverse/A2 b/tests/xcaf/traverse/A2 new file mode 100644 index 0000000000..bb7f7b0cce --- /dev/null +++ b/tests/xcaf/traverse/A2 @@ -0,0 +1,22 @@ + +ReadStep D_First [locate_data_file "as1-oc-214-mat.stp"] + +set TRAVERSE_ASSEMBLY_TREE_ARGS "-root 0:1:1:1/0:1:1:2 -names" +set TRAVERSE_ASSEMBLY_TREE_RESULT "as1/rod-assembly +as1/rod-assembly/nut_1 +as1/rod-assembly/nut_2 +as1/rod-assembly/rod_1" + +set TRAVERSE_ASSEMBLY_GRAPH_ARGS "-root 0:1:1:2 -names" +set TRAVERSE_ASSEMBLY_GRAPH_RESULT "1 A 'rod-assembly' 2 4 5 +2 O 'nut_1' 3 +3 P 'nut' +4 O 'nut_2' 3 +5 O 'rod_1' 6 +6 P 'rod'" + +set TypeOfFile "" + +set AddToDocument "" + +set CompareDocumentsMode "TRAVERSE_ASSEMBLY_TREE TRAVERSE_ASSEMBLY_GRAPH SKIP_CHECKVIEW" diff --git a/tests/xcaf/traverse/A3 b/tests/xcaf/traverse/A3 new file mode 100644 index 0000000000..13025430c3 --- /dev/null +++ b/tests/xcaf/traverse/A3 @@ -0,0 +1,35 @@ + +XOpen [locate_data_file "as1_pmi.xbf"] D_First + +set TRAVERSE_ASSEMBLY_GRAPH_ARGS "-names" +set TRAVERSE_ASSEMBLY_GRAPH_RESULT "1 R 'as1' 2 9 22 25 +2 O 'rod-assembly_1' 3 +3 A 'rod-assembly' 4 6 7 +4 O 'nut_1' 5 +5 P 'nut' +6 O 'nut_2' 5 +7 O 'rod_1' 8 +8 P 'rod' +9 O 'l-bracket-assembly_1' 10 +10 A 'l-bracket-assembly' 11 16 17 18 +11 O 'nut-bolt-assembly_1' 12 +12 A 'nut-bolt-assembly' 13 15 +13 O 'bolt_1' 14 +14 P 'bolt' +15 O 'nut_3' 5 +16 O 'nut-bolt-assembly_2' 12 +17 O 'nut-bolt-assembly_3' 12 +18 O 'l-bracket_1' 19 +19 P 'l-bracket' 20 21 +20 S 0:1:1:8:1 +21 S 0:1:1:8:2 +22 O 'plate_1' 23 +23 P 'plate' 24 +24 S 0:1:1:9:1 +25 O 'l-bracket-assembly_2' 10" + +set TypeOfFile "" + +set AddToDocument "" + +set CompareDocumentsMode "TRAVERSE_ASSEMBLY_GRAPH SKIP_CHECKVIEW" diff --git a/tests/xcaf/traverse/B1 b/tests/xcaf/traverse/B1 new file mode 100644 index 0000000000..3423d87ff2 --- /dev/null +++ b/tests/xcaf/traverse/B1 @@ -0,0 +1,192 @@ + +ReadStep D_First [locate_data_file "as1_motor.step"] + +set TRAVERSE_ASSEMBLY_TREE_ARGS "-names" +set TRAVERSE_ASSEMBLY_TREE_RESULT "Product 2 +Product 2/as1 +Product 2/as1/rod-assembly_1 +Product 2/as1/rod-assembly_1/nut_1 +Product 2/as1/rod-assembly_1/nut_2 +Product 2/as1/rod-assembly_1/rod_1 +Product 2/as1/l-bracket-assembly_1 +Product 2/as1/l-bracket-assembly_1/nut-bolt-assembly_1 +Product 2/as1/l-bracket-assembly_1/nut-bolt-assembly_1/bolt_1 +Product 2/as1/l-bracket-assembly_1/nut-bolt-assembly_1/nut_3 +Product 2/as1/l-bracket-assembly_1/nut-bolt-assembly_2 +Product 2/as1/l-bracket-assembly_1/nut-bolt-assembly_2/bolt_1 +Product 2/as1/l-bracket-assembly_1/nut-bolt-assembly_2/nut_3 +Product 2/as1/l-bracket-assembly_1/nut-bolt-assembly_3 +Product 2/as1/l-bracket-assembly_1/nut-bolt-assembly_3/bolt_1 +Product 2/as1/l-bracket-assembly_1/nut-bolt-assembly_3/nut_3 +Product 2/as1/l-bracket-assembly_1/l-bracket_1 +Product 2/as1/plate_1 +Product 2/as1/l-bracket-assembly_2 +Product 2/as1/l-bracket-assembly_2/nut-bolt-assembly_1 +Product 2/as1/l-bracket-assembly_2/nut-bolt-assembly_1/bolt_1 +Product 2/as1/l-bracket-assembly_2/nut-bolt-assembly_1/nut_3 +Product 2/as1/l-bracket-assembly_2/nut-bolt-assembly_2 +Product 2/as1/l-bracket-assembly_2/nut-bolt-assembly_2/bolt_1 +Product 2/as1/l-bracket-assembly_2/nut-bolt-assembly_2/nut_3 +Product 2/as1/l-bracket-assembly_2/nut-bolt-assembly_3 +Product 2/as1/l-bracket-assembly_2/nut-bolt-assembly_3/bolt_1 +Product 2/as1/l-bracket-assembly_2/nut-bolt-assembly_3/nut_3 +Product 2/as1/l-bracket-assembly_2/l-bracket_1 +Product 1 +Product 1/35 +Product 1/35/Item_0 +Product 1/35/Item_0/Item_0 +Product 1/35/Item_1 +Product 1/35/Item_1/Item_0 +Product 1/35/Item_2 +Product 1/35/Item_2/Item_0 +Product 1/35/Item_3 +Product 1/35/Item_3/Item_0 +Product 1/35/Item_4 +Product 1/35/Item_4/Item_0 +Product 1/35/Item_5 +Product 1/35/Item_5/Item_0 +Product 1/35/Item_6 +Product 1/35/Item_6/Item_0 +Product 1/35/Item_7 +Product 1/35/Item_7/Item_0 +Product 1/35/Item_8 +Product 1/35/Item_8/Item_0 +Product 1/35/Item_9 +Product 1/35/Item_9/Item_0 +Product 1/35/Item_10 +Product 1/35/Item_10/Item_0 +Product 1/35/Item_11 +Product 1/35/Item_11/Item_0 +Product 1/35/Item_12 +Product 1/35/Item_12/Item_0 +Product 1/35/Item_13 +Product 1/35/Item_13/Item_0 +Product 1/35/Item_14 +Product 1/35/Item_14/Item_0 +Product 1/35/Item_15 +Product 1/35/Item_15/Item_0 +Product 1/35/Item_16 +Product 1/35/Item_16/Item_0" + +set TRAVERSE_ASSEMBLY_GRAPH_ARGS "-names" +set TRAVERSE_ASSEMBLY_GRAPH_RESULT "1 R 'Product 1' 2 +2 O '35' 3 +3 A 'Product 1.1' 4 8 12 16 20 24 28 32 36 40 44 48 52 56 60 64 68 +4 O 'Item_0' 5 +5 A 'Product 1.1.1' 6 +6 O 'Item_0' 7 +7 P 'Product 1.1.1.1' +8 O 'Item_1' 9 +9 A 'Product 1.1.2' 10 +10 O 'Item_0' 11 +11 P 'Product 1.1.2.1' +12 O 'Item_2' 13 +13 A 'Product 1.1.3' 14 +14 O 'Item_0' 15 +15 P 'Product 1.1.3.1' +16 O 'Item_3' 17 +17 A 'Product 1.1.4' 18 +18 O 'Item_0' 19 +19 P 'Product 1.1.4.1' +20 O 'Item_4' 21 +21 A 'Product 1.1.5' 22 +22 O 'Item_0' 23 +23 P 'Product 1.1.5.1' +24 O 'Item_5' 25 +25 A 'Product 1.1.6' 26 +26 O 'Item_0' 27 +27 P 'Product 1.1.6.1' +28 O 'Item_6' 29 +29 A 'Product 1.1.7' 30 +30 O 'Item_0' 31 +31 P 'Product 1.1.7.1' +32 O 'Item_7' 33 +33 A 'Product 1.1.8' 34 +34 O 'Item_0' 35 +35 P 'Product 1.1.8.1' +36 O 'Item_8' 37 +37 A 'Product 1.1.9' 38 +38 O 'Item_0' 39 +39 P 'Product 1.1.9.1' +40 O 'Item_9' 41 +41 A 'Product 1.1.10' 42 +42 O 'Item_0' 43 +43 P 'Product 1.1.10.1' +44 O 'Item_10' 45 +45 A 'Product 1.1.11' 46 +46 O 'Item_0' 47 +47 P 'Product 1.1.11.1' +48 O 'Item_11' 49 +49 A 'Product 1.1.12' 50 +50 O 'Item_0' 51 +51 P 'Product 1.1.12.1' +52 O 'Item_12' 53 +53 A 'Product 1.1.13' 54 +54 O 'Item_0' 55 +55 P 'Product 1.1.13.1' +56 O 'Item_13' 57 +57 A 'Product 1.1.14' 58 +58 O 'Item_0' 59 +59 P 'Product 1.1.14.1' +60 O 'Item_14' 61 +61 A 'Product 1.1.15' 62 +62 O 'Item_0' 63 +63 P 'Product 1.1.15.1' +64 O 'Item_15' 65 +65 A 'Product 1.1.16' 66 +66 O 'Item_0' 67 +67 P 'Product 1.1.16.1' +68 O 'Item_16' 69 +69 A 'Product 1.1.17' 70 +70 O 'Item_0' 71 +71 P 'Product 1.1.17.1' +72 R 'Product 2' 73 +73 O 'as1' 74 +74 A 'Product 2.1' 75 82 99 101 +75 O 'rod-assembly_1' 76 +76 A 'rod-assembly' 77 79 80 +77 O 'nut_1' 78 +78 P 'nut' +79 O 'nut_2' 78 +80 O 'rod_1' 81 +81 P 'rod' +82 O 'l-bracket-assembly_1' 83 +83 A 'l-bracket-assembly' 84 89 93 97 +84 O 'nut-bolt-assembly_1' 85 +85 A 'nut-bolt-assembly' 86 88 +86 O 'bolt_1' 87 +87 P 'bolt' +88 O 'nut_3' 78 +89 O 'nut-bolt-assembly_2' 90 +90 A 'nut-bolt-assembly' 91 92 +91 O 'bolt_1' 87 +92 O 'nut_3' 78 +93 O 'nut-bolt-assembly_3' 94 +94 A 'nut-bolt-assembly' 95 96 +95 O 'bolt_1' 87 +96 O 'nut_3' 78 +97 O 'l-bracket_1' 98 +98 P 'l-bracket' +99 O 'plate_1' 100 +100 P 'plate' +101 O 'l-bracket-assembly_2' 102 +102 A 'l-bracket-assembly' 103 107 111 115 +103 O 'nut-bolt-assembly_1' 104 +104 A 'nut-bolt-assembly' 105 106 +105 O 'bolt_1' 87 +106 O 'nut_3' 78 +107 O 'nut-bolt-assembly_2' 108 +108 A 'nut-bolt-assembly' 109 110 +109 O 'bolt_1' 87 +110 O 'nut_3' 78 +111 O 'nut-bolt-assembly_3' 112 +112 A 'nut-bolt-assembly' 113 114 +113 O 'bolt_1' 87 +114 O 'nut_3' 78 +115 O 'l-bracket_1' 98" + +set TypeOfFile "" + +set AddToDocument "" + +set CompareDocumentsMode "TRAVERSE_ASSEMBLY_TREE TRAVERSE_ASSEMBLY_GRAPH SKIP_CHECKVIEW" From fb30026cf1d0c49b1dbc72366fedb1a485b3c4e6 Mon Sep 17 00:00:00 2001 From: akondrat Date: Fri, 10 Jun 2022 14:33:15 +0300 Subject: [PATCH 305/639] 0033009: Foundation Classes - Bnd_OBB::ReBuild() expects point array starting from 0 Add test. Update OBBTool constructor for any bounds of array of points. --- src/Bnd/Bnd_OBB.cxx | 2 +- src/QABugs/QABugs_20.cxx | 21 +++++++++++++++++++++ tests/bugs/moddata_3/bug33009 | 7 +++++++ 3 files changed, 29 insertions(+), 1 deletion(-) create mode 100644 tests/bugs/moddata_3/bug33009 diff --git a/src/Bnd/Bnd_OBB.cxx b/src/Bnd/Bnd_OBB.cxx index e723464cb9..637edf26a0 100644 --- a/src/Bnd/Bnd_OBB.cxx +++ b/src/Bnd/Bnd_OBB.cxx @@ -419,7 +419,7 @@ OBBTool:: myPointBoxSet->SetSize(myPntsList.Length()); // Add the points into Set - for (Standard_Integer iP = 0; iP < theL.Length(); ++iP) + for (Standard_Integer iP = theL.Lower(); iP <= theL.Upper(); ++iP) { const gp_Pnt& aP = theL (iP); Standard_Real aTol = theLT ? theLT->Value(iP) : Precision::Confusion(); diff --git a/src/QABugs/QABugs_20.cxx b/src/QABugs/QABugs_20.cxx index 59b2ab1db4..c16b32d3e3 100644 --- a/src/QABugs/QABugs_20.cxx +++ b/src/QABugs/QABugs_20.cxx @@ -4257,6 +4257,23 @@ static Standard_Integer OCC32744(Draw_Interpretor& theDi, Standard_Integer theNb return 0; } +static Standard_Integer OCC33009(Draw_Interpretor&, Standard_Integer, const char**) +{ + Bnd_OBB aBndBox; + + TColgp_Array1OfPnt aPoints(1, 5); + + aPoints.ChangeValue(1) = gp_Pnt(1, 2, 3); + aPoints.ChangeValue(2) = gp_Pnt(3, 2, 1); + aPoints.ChangeValue(3) = gp_Pnt(2, 3, 1); + aPoints.ChangeValue(4) = gp_Pnt(1, 3, 2); + aPoints.ChangeValue(5) = gp_Pnt(2, 1, 3); + + aBndBox.ReBuild(aPoints, (const TColStd_Array1OfReal*)0, true); + + return 0; +} + //======================================================================= //function : QACheckBends //purpose : @@ -4427,6 +4444,10 @@ void QABugs::Commands_20(Draw_Interpretor& theCommands) { __FILE__, OCC32744, group); + theCommands.Add("OCC33009", + "Tests the case when", + __FILE__, OCC33009, group); + theCommands.Add("QACheckBends", "QACheckBends curve [CosMaxAngle [theNbPoints]]", __FILE__, diff --git a/tests/bugs/moddata_3/bug33009 b/tests/bugs/moddata_3/bug33009 new file mode 100644 index 0000000000..9b0c272863 --- /dev/null +++ b/tests/bugs/moddata_3/bug33009 @@ -0,0 +1,7 @@ +puts "=============================================================================================" +puts "0033009: Foundation Classes - Bnd_OBB::ReBuild() expects point array starting from 0" +puts "=============================================================================================" +puts "" + +pload QAcommands +OCC33009 From 88ff1a38348a198e83f7652e52b1f3617e60d664 Mon Sep 17 00:00:00 2001 From: kgv Date: Tue, 14 Jun 2022 09:48:09 +0300 Subject: [PATCH 306/639] 0033016: Documentation - Draw Harness User Guide mentions removed commands 'meshdispmode' Updated description of MeshVS commands in User's Guide. --- .../draw_test_harness/draw_test_harness.md | 158 +++++++++--------- 1 file changed, 82 insertions(+), 76 deletions(-) diff --git a/dox/user_guides/draw_test_harness/draw_test_harness.md b/dox/user_guides/draw_test_harness/draw_test_harness.md index 99c79f8550..c25975a4db 100644 --- a/dox/user_guides/draw_test_harness/draw_test_harness.md +++ b/dox/user_guides/draw_test_harness/draw_test_harness.md @@ -2044,43 +2044,47 @@ Creates a *MeshVS_Mesh* object based on STL file data. The object will be displa meshfromstl mesh myfile.stl ~~~~ -@subsubsection occt_draw_4_5_2 meshdispmode +@subsubsection occt_draw_4_5_2 vsetdispmode Syntax: ~~~~{.php} -meshdispmode meshname displaymode +vsetdispmode meshname displaymode ~~~~ -Changes the display mode of object **meshname**. The **displaymode** is integer, which can be: -* *1* for *wireframe*, +Changes the display mode of object **meshname**. The **displaymode** is integer (`MeshVS_DisplayModeFlags`), which can be: +* *1* for *wireframe*, * *2* for *shading* mode, or -* *3* for *shrink* mode. +* *3* for *shrink* mode. -**Example:** +**Example:** ~~~~{.php} -vinit -meshfromstl mesh myfile.stl -meshdispmode mesh 2 +vinit +meshfromstl mesh myfile.stl +vsetdispmode mesh 2 ~~~~ -@subsubsection occt_draw_4_5_3 meshselmode +@subsubsection occt_draw_4_5_3 vselmode Syntax: ~~~~{.php} -meshselmode meshname selectionmode +vselmode meshname selectionmode {on|off} ~~~~ -Changes the selection mode of object **meshname**. The *selectionmode* is integer OR-combination of mode flags. The basic flags are the following: +Changes the selection mode of object **meshname**. +The *selectionmode* is integer OR-combination of mode flags (`MeshVS_SelectionModeFlags`). The basic flags are the following: +* *0* -- selection of mesh as whole; * *1* -- node selection; -* *2* -- 0D elements (not supported in STL); -* *4* -- links (not supported in STL); -* *8* -- faces. - -**Example:** +* *2* -- 0D elements (not supported in STL); +* *4* -- links (not supported in STL); +* *8* -- faces; +* *16* -- volumes (not supported in STL); +* *256* -- groups (not supported in STL). + +**Example:** ~~~~{.php} -vinit -meshfromstl mesh myfile.stl -meshselmode mesh 1 +vinit +meshfromstl mesh myfile.stl +vselmode mesh 1 ~~~~ @subsubsection occt_draw_4_5_4 meshshadcolor @@ -2091,11 +2095,11 @@ meshshadcolor meshname red green blue ~~~~ Changes the face interior color of object **meshname**. The *red*, *green* and *blue* are real values between *0* and *1*. - -**Example:** + +**Example:** ~~~~{.php} -vinit -meshfromstl mesh myfile.stl +vinit +meshfromstl mesh myfile.stl meshshadcolormode mesh 0.5 0.5 0.5 ~~~~ @@ -2107,11 +2111,11 @@ meshlinkcolor meshname red green blue ~~~~ Changes the color of face borders for object **meshname**. The *red*, *green* and *blue* are real values between *0* and *1*. - -**Example:** + +**Example:** ~~~~{.php} -vinit -meshfromstl mesh myfile.stl +vinit +meshfromstl mesh myfile.stl meshlinkcolormode mesh 0.5 0.5 0.5 ~~~~ @@ -2119,39 +2123,37 @@ meshlinkcolormode mesh 0.5 0.5 0.5 Syntax: ~~~~{.php} -meshmat meshname material +meshmat meshname material [transparency] ~~~~ Changes the material of object **meshname**. -*material* is represented with an integer value as follows (equivalent to enumeration *Graphic3d_NameOfMaterial*): -* *0 -- BRASS,* -* *1 -- BRONZE,* -* *2 -- COPPER,* -* *3 -- GOLD,* -* *4 -- PEWTER,* -* *5 -- PLASTER,* -* *6 -- PLASTIC,* -* *7 -- SILVER,* -* *8 -- STEEL,* -* *9 -- STONE,* -* *10 -- SHINY_PLASTIC,* -* *11 -- SATIN,* -* *12 -- METALIZED,* -* *13 -- NEON_GNC,* -* *14 -- CHROME,* -* *15 -- ALUMINIUM,* -* *16 -- OBSIDIAN,* -* *17 -- NEON_PHC,* -* *18 -- JADE,* -* *19 -- DEFAULT,* -* *20 -- UserDefined* +*material* is represented with an integer value as follows (equivalent to enumeration *Graphic3d_NameOfMaterial*): +* *0 -- BRASS*, +* *1 -- BRONZE*, +* *2 -- COPPER*, +* *3 -- GOLD*, +* *4 -- PEWTER*, +* *5 -- PLASTER*, +* *6 -- PLASTIC*, +* *7 -- SILVER*, +* *8 -- STEEL*, +* *9 -- STONE*, +* *10 -- SHINY_PLASTIC*, +* *11 -- SATIN*, +* *12 -- METALIZED*, +* *13 -- NEON_GNC*, +* *14 -- CHROME*, +* *15 -- ALUMINIUM*, +* *16 -- OBSIDIAN*, +* *17 -- NEON_PHC*, +* *18 -- JADE*. -**Example:** +**Example:** ~~~~{.php} -vinit -meshfromstl mesh myfile.stl -meshmat mesh JADE +vinit +meshfromstl mesh myfile.stl +meshmat mesh 18 ~~~~ @subsubsection occt_draw_4_5_7 meshshrcoef @@ -2161,12 +2163,14 @@ Syntax: meshshrcoef meshname shrinkcoefficient ~~~~ -Changes the value of shrink coefficient used in the shrink mode. In the shrink mode the face is shown as a congruent part of a usual face, so that *shrinkcoefficient* controls the value of this part. The *shrinkcoefficient* is a positive real number. - -**Example:** +Changes the value of shrink coefficient used in the shrink mode. +In the shrink mode the face is shown as a congruent part of a usual face, so that *shrinkcoefficient* controls the value of this part. +The *shrinkcoefficient* is a positive real number. + +**Example:** ~~~~{.php} -vinit -meshfromstl mesh myfile.stl +vinit +meshfromstl mesh myfile.stl meshshrcoef mesh 0.05 ~~~~ @@ -2178,11 +2182,12 @@ meshshow meshname ~~~~ Displays **meshname** in the viewer (if it is erased). +The same as calling `vdisplay`. **Example:** ~~~~{.php} -vinit -meshfromstl mesh myfile.stl +vinit +meshfromstl mesh myfile.stl meshshow mesh ~~~~ @@ -2193,12 +2198,13 @@ Syntax: meshhide meshname ~~~~ -Hides **meshname** in the viewer. +Hides **meshname** in the viewer. +The same as calling `verase`. -**Example:** +**Example:** ~~~~{.php} -vinit -meshfromstl mesh myfile.stl +vinit +meshfromstl mesh myfile.stl meshhide mesh ~~~~ @@ -2209,7 +2215,7 @@ Syntax: meshhidesel meshname ~~~~ -Hides only selected entities. The other part of **meshname** remains visible. +Hides only selected entities. The other part of **meshname** remains visible. @subsubsection occt_draw_4_5_11 meshshowsel @@ -2218,7 +2224,7 @@ Syntax: meshshowsel meshname ~~~~ -Shows only selected entities. The other part of **meshname** becomes invisible. +Shows only selected entities. The other part of **meshname** becomes invisible. @subsubsection occt_draw_4_5_12 meshshowall @@ -2227,22 +2233,22 @@ Syntax: meshshowall meshname ~~~~ -Changes the state of all entities to visible for **meshname**. +Changes the state of all entities to visible for **meshname**. -@subsubsection occt_draw_4_5_13 meshdelete +@subsubsection occt_draw_4_5_13 vremove Syntax: ~~~~{.php} -meshdelete meshname +vremove meshname ~~~~ -Deletes MeshVS_Mesh object **meshname**. +Deletes MeshVS_Mesh object **meshname**. -**Example:** +**Example:** ~~~~{.php} -vinit -meshfromstl mesh myfile.stl -meshdelete mesh +vinit +meshfromstl mesh myfile.stl +vremove mesh ~~~~ @subsection occt_draw_4_6 VIS Viewer commands From a1f027b66eaa8c99f085652105afb27c0099054a Mon Sep 17 00:00:00 2001 From: aml Date: Tue, 14 Jun 2022 16:21:00 +0300 Subject: [PATCH 307/639] 0033018: Coding - get rid of unused headers [Plugin to ShapeAnalysis] --- src/AIS/AIS_InteractiveContext.hxx | 1 + src/Plugin/Plugin.hxx | 1 - src/Plugin/Plugin_MapOfFunctions.hxx | 1 - src/Poly/Poly.cxx | 2 - src/Poly/Poly_CoherentTriangulation.cxx | 3 - src/Poly/Poly_Connect.cxx | 1 - src/Poly/Poly_HArray1OfTriangle.hxx | 1 - src/Poly/Poly_ListOfTriangulation.hxx | 1 - src/Poly/Poly_MakeLoops.hxx | 1 - src/Poly/Poly_MergeNodesTool.hxx | 2 - src/Poly/Poly_Polygon2D.hxx | 1 - src/Poly/Poly_Polygon3D.hxx | 2 - src/Poly/Poly_PolygonOnTriangulation.hxx | 1 - src/Poly/Poly_Triangulation.hxx | 1 - src/Precision/Precision.hxx | 2 - src/ProjLib/ProjLib.cxx | 5 - src/ProjLib/ProjLib_CompProjectedCurve.cxx | 8 - src/ProjLib/ProjLib_ComputeApprox.cxx | 2 - .../ProjLib_ComputeApproxOnPolarSurface.cxx | 12 -- .../ProjLib_ComputeApproxOnPolarSurface.hxx | 1 - src/ProjLib/ProjLib_Cone.cxx | 4 - src/ProjLib/ProjLib_Cone.hxx | 1 - src/ProjLib/ProjLib_Cylinder.cxx | 6 - src/ProjLib/ProjLib_Cylinder.hxx | 1 - .../ProjLib_HSequenceOfHSequenceOfPnt.hxx | 1 - src/ProjLib/ProjLib_Plane.cxx | 3 - src/ProjLib/ProjLib_Plane.hxx | 1 - src/ProjLib/ProjLib_PrjFunc.cxx | 1 - src/ProjLib/ProjLib_PrjFunc.hxx | 1 - src/ProjLib/ProjLib_PrjResolve.cxx | 2 - src/ProjLib/ProjLib_PrjResolve.hxx | 1 - src/ProjLib/ProjLib_ProjectOnPlane.cxx | 10 -- src/ProjLib/ProjLib_ProjectOnSurface.cxx | 3 - src/ProjLib/ProjLib_ProjectedCurve.cxx | 12 -- src/ProjLib/ProjLib_ProjectedCurve.hxx | 1 - src/ProjLib/ProjLib_Projector.cxx | 4 - src/ProjLib/ProjLib_Projector.hxx | 2 - src/ProjLib/ProjLib_Sphere.cxx | 2 - src/ProjLib/ProjLib_Sphere.hxx | 2 - src/ProjLib/ProjLib_Torus.cxx | 3 - src/ProjLib/ProjLib_Torus.hxx | 1 - src/Prs3d/Prs3d.hxx | 1 - src/Prs3d/Prs3d_Arrow.cxx | 1 - src/Prs3d/Prs3d_DatumAspect.hxx | 2 - src/Prs3d/Prs3d_Drawer.cxx | 3 - src/Prs3d/Prs3d_Drawer.hxx | 2 - src/Prs3d/Prs3d_LineAspect.hxx | 1 - src/Prs3d/Prs3d_Text.cxx | 1 - src/Prs3d/Prs3d_Text.hxx | 1 - src/Prs3d/Prs3d_ToolQuadric.cxx | 2 - src/PrsDim/PrsDim.cxx | 7 - src/PrsDim/PrsDim.hxx | 4 - src/PrsDim/PrsDim_AngleDimension.hxx | 2 - src/PrsDim/PrsDim_Chamf2dDimension.cxx | 9 - src/PrsDim/PrsDim_Chamf2dDimension.hxx | 1 - src/PrsDim/PrsDim_Chamf3dDimension.cxx | 10 -- src/PrsDim/PrsDim_Chamf3dDimension.hxx | 1 - src/PrsDim/PrsDim_ConcentricRelation.cxx | 2 - src/PrsDim/PrsDim_DiameterDimension.cxx | 1 - src/PrsDim/PrsDim_Dimension.cxx | 10 -- src/PrsDim/PrsDim_Dimension.hxx | 6 - src/PrsDim/PrsDim_DimensionOwner.cxx | 1 - src/PrsDim/PrsDim_DimensionOwner.hxx | 3 - src/PrsDim/PrsDim_EllipseRadiusDimension.cxx | 3 - src/PrsDim/PrsDim_EqualDistanceRelation.cxx | 3 - src/PrsDim/PrsDim_EqualRadiusRelation.cxx | 2 - src/PrsDim/PrsDim_FixRelation.cxx | 4 - src/PrsDim/PrsDim_FixRelation.hxx | 1 - src/PrsDim/PrsDim_IdenticRelation.cxx | 4 - src/PrsDim/PrsDim_LengthDimension.hxx | 3 - src/PrsDim/PrsDim_MaxRadiusDimension.cxx | 15 -- src/PrsDim/PrsDim_MidPointRelation.cxx | 8 - src/PrsDim/PrsDim_MinRadiusDimension.cxx | 12 -- src/PrsDim/PrsDim_OffsetDimension.cxx | 4 - src/PrsDim/PrsDim_ParallelRelation.cxx | 6 - src/PrsDim/PrsDim_PerpendicularRelation.cxx | 5 - src/PrsDim/PrsDim_Relation.cxx | 7 - src/PrsDim/PrsDim_Relation.hxx | 1 - src/PrsDim/PrsDim_SymmetricRelation.cxx | 5 - src/PrsDim/PrsDim_SymmetricRelation.hxx | 1 - src/PrsDim/PrsDim_TangentRelation.cxx | 6 - .../PrsMgr_ListOfPresentableObjects.hxx | 1 - src/PrsMgr/PrsMgr_PresentableObject.hxx | 4 - src/PrsMgr/PrsMgr_Presentation.cxx | 4 - src/PrsMgr/PrsMgr_Presentation.hxx | 1 - src/PrsMgr/PrsMgr_PresentationManager.cxx | 1 - src/PrsMgr/PrsMgr_PresentationManager.hxx | 1 - src/PrsMgr/PrsMgr_Presentations.hxx | 1 - src/QABugs/QABugs_1.cxx | 9 - src/QABugs/QABugs_10.cxx | 5 - src/QABugs/QABugs_11.cxx | 56 ++---- src/QABugs/QABugs_12.cxx | 4 - src/QABugs/QABugs_13.cxx | 5 - src/QABugs/QABugs_14.cxx | 10 +- src/QABugs/QABugs_15.cxx | 4 - src/QABugs/QABugs_16.cxx | 9 - src/QABugs/QABugs_17.cxx | 18 -- src/QABugs/QABugs_18.cxx | 3 - src/QABugs/QABugs_19.cxx | 38 +--- src/QABugs/QABugs_2.cxx | 3 - src/QABugs/QABugs_20.cxx | 25 +-- src/QABugs/QABugs_3.cxx | 13 +- src/QABugs/QABugs_5.cxx | 4 - src/QABugs/QABugs_6.cxx | 5 - src/QABugs/QABugs_7.cxx | 5 - src/QABugs/QABugs_8.cxx | 3 - src/QABugs/QABugs_9.cxx | 3 - src/QABugs/QABugs_BVH.cxx | 2 - src/QABugs/QABugs_PresentableObject.cxx | 8 - src/QADNaming/QADNaming.cxx | 7 - src/QADNaming/QADNaming.hxx | 1 - src/QADNaming/QADNaming_BasicCommands.cxx | 17 -- src/QADNaming/QADNaming_IteratorsCommands.cxx | 2 - src/QADNaming/QADNaming_SelectionCommands.cxx | 10 -- src/QADNaming/QADNaming_ToolsCommands.cxx | 11 -- src/QANCollection/QANCollection.cxx | 2 - .../QANCollection_DataMapOfRealPnt.hxx | 1 - .../QANCollection_DoubleMapOfRealInteger.hxx | 1 - src/QANCollection/QANCollection_Handle.cxx | 3 - .../QANCollection_IndexedDataMapOfRealPnt.hxx | 1 - src/QANCollection/QANCollection_Perf.cxx | 3 - src/QANCollection/QANCollection_Stl.cxx | 2 - src/QANCollection/QANCollection_Test.cxx | 3 - src/Quantity/Quantity_Color.cxx | 2 - src/Quantity/Quantity_Color.hxx | 1 - src/Quantity/Quantity_Date.hxx | 1 - src/Quantity/Quantity_DateDefinitionError.hxx | 1 - src/Quantity/Quantity_HArray1OfColor.hxx | 1 - src/Quantity/Quantity_Period.hxx | 1 - .../Quantity_PeriodDefinitionError.hxx | 1 - src/RWGltf/RWGltf_CafReader.cxx | 3 +- src/RWGltf/RWGltf_CafReader.hxx | 1 - src/RWGltf/RWGltf_GltfJsonParser.hxx | 4 - src/RWGltf/RWGltf_TriangulationReader.hxx | 1 - .../RWHeaderSection_GeneralModule.cxx | 1 - .../RWHeaderSection_GeneralModule.hxx | 1 - .../RWHeaderSection_RWFileDescription.cxx | 1 - .../RWHeaderSection_RWFileName.cxx | 1 - .../RWHeaderSection_RWFileSchema.cxx | 1 - .../RWHeaderSection_ReadWriteModule.cxx | 2 - .../RWHeaderSection_ReadWriteModule.hxx | 1 - src/RWMesh/RWMesh_CafReader.cxx | 1 - src/RWMesh/RWMesh_CafReader.hxx | 1 - .../RWMesh_CoordinateSystemConverter.hxx | 2 - src/RWMesh/RWMesh_FaceIterator.hxx | 1 - src/RWObj/RWObj_CafWriter.cxx | 1 - src/RWObj/RWObj_Reader.cxx | 1 - src/RWObj/RWObj_Reader.hxx | 3 - src/RWObj/RWObj_SubMesh.hxx | 1 - .../RWStepAP203_RWCcDesignApproval.cxx | 1 - .../RWStepAP203_RWStartRequest.cxx | 1 - src/RWStepAP203/RWStepAP203_RWStartWork.cxx | 1 - src/RWStepAP214/RWStepAP214_GeneralModule.cxx | 170 ------------------ src/RWStepAP214/RWStepAP214_GeneralModule.hxx | 1 - ...AutoDesignNominalDateAndTimeAssignment.cxx | 1 - ...P214_RWAutoDesignNominalDateAssignment.cxx | 1 - ...214_RWAutoDesignOrganizationAssignment.cxx | 1 - ...oDesignPersonAndOrganizationAssignment.cxx | 1 - src/RWStepAP214/RWStepAP214_RWClass.cxx | 1 - .../RWStepAP214_RWExternallyDefinedClass.cxx | 1 - ...214_RWExternallyDefinedGeneralProperty.cxx | 1 - .../RWStepAP214_RWRepItemGroup.cxx | 1 - .../RWStepAP214_ReadWriteModule.hxx | 2 - ...42_RWItemIdentifiedRepresentationUsage.cxx | 1 - src/RWStepBasic/RWStepBasic_RWAction.cxx | 1 - .../RWStepBasic_RWActionAssignment.cxx | 1 - .../RWStepBasic_RWActionMethod.cxx | 1 - .../RWStepBasic_RWActionRequestAssignment.cxx | 1 - .../RWStepBasic_RWActionRequestSolution.cxx | 1 - src/RWStepBasic/RWStepBasic_RWAddress.cxx | 1 - .../RWStepBasic_RWApplicationContext.cxx | 1 - ...WStepBasic_RWApplicationContextElement.cxx | 1 - ...pBasic_RWApplicationProtocolDefinition.cxx | 1 - src/RWStepBasic/RWStepBasic_RWApproval.cxx | 1 - .../RWStepBasic_RWApprovalDateTime.cxx | 1 - ...StepBasic_RWApprovalPersonOrganization.cxx | 1 - .../RWStepBasic_RWApprovalRelationship.cxx | 1 - .../RWStepBasic_RWApprovalRole.cxx | 1 - .../RWStepBasic_RWApprovalStatus.cxx | 1 - .../RWStepBasic_RWCalendarDate.cxx | 1 - .../RWStepBasic_RWCertification.cxx | 1 - .../RWStepBasic_RWCertificationAssignment.cxx | 1 - .../RWStepBasic_RWCertificationType.cxx | 1 - .../RWStepBasic_RWCharacterizedObject.cxx | 1 - src/RWStepBasic/RWStepBasic_RWContract.cxx | 1 - .../RWStepBasic_RWContractAssignment.cxx | 1 - .../RWStepBasic_RWContractType.cxx | 1 - .../RWStepBasic_RWConversionBasedUnit.cxx | 1 - ...Basic_RWConversionBasedUnitAndAreaUnit.cxx | 1 - ...sic_RWConversionBasedUnitAndLengthUnit.cxx | 2 - ...Basic_RWConversionBasedUnitAndMassUnit.cxx | 2 - ...RWConversionBasedUnitAndPlaneAngleUnit.cxx | 2 - ...asic_RWConversionBasedUnitAndRatioUnit.cxx | 2 - ...RWConversionBasedUnitAndSolidAngleUnit.cxx | 2 - ...Basic_RWConversionBasedUnitAndTimeUnit.cxx | 2 - ...sic_RWConversionBasedUnitAndVolumeUnit.cxx | 1 - ...Basic_RWCoordinatedUniversalTimeOffset.cxx | 2 - src/RWStepBasic/RWStepBasic_RWDate.cxx | 1 - src/RWStepBasic/RWStepBasic_RWDateAndTime.cxx | 1 - src/RWStepBasic/RWStepBasic_RWDateRole.cxx | 1 - .../RWStepBasic_RWDateTimeRole.cxx | 1 - .../RWStepBasic_RWDerivedUnitElement.cxx | 1 - .../RWStepBasic_RWDimensionalExponents.cxx | 1 - src/RWStepBasic/RWStepBasic_RWDocument.cxx | 1 - .../RWStepBasic_RWDocumentFile.cxx | 1 - ...StepBasic_RWDocumentProductAssociation.cxx | 1 - ...StepBasic_RWDocumentProductEquivalence.cxx | 1 - .../RWStepBasic_RWDocumentRelationship.cxx | 1 - ...StepBasic_RWDocumentRepresentationType.cxx | 1 - .../RWStepBasic_RWDocumentType.cxx | 1 - .../RWStepBasic_RWDocumentUsageConstraint.cxx | 1 - src/RWStepBasic/RWStepBasic_RWEffectivity.cxx | 1 - .../RWStepBasic_RWEffectivityAssignment.cxx | 1 - ...sic_RWExternalIdentificationAssignment.cxx | 1 - .../RWStepBasic_RWExternalSource.cxx | 1 - .../RWStepBasic_RWExternallyDefinedItem.cxx | 1 - .../RWStepBasic_RWGeneralProperty.cxx | 1 - src/RWStepBasic/RWStepBasic_RWGroup.cxx | 1 - .../RWStepBasic_RWGroupAssignment.cxx | 1 - .../RWStepBasic_RWGroupRelationship.cxx | 1 - ...RWStepBasic_RWIdentificationAssignment.cxx | 1 - .../RWStepBasic_RWIdentificationRole.cxx | 1 - .../RWStepBasic_RWLengthMeasureWithUnit.cxx | 2 - src/RWStepBasic/RWStepBasic_RWLengthUnit.cxx | 1 - src/RWStepBasic/RWStepBasic_RWLocalTime.cxx | 1 - .../RWStepBasic_RWMassMeasureWithUnit.cxx | 2 - src/RWStepBasic/RWStepBasic_RWMassUnit.cxx | 1 - .../RWStepBasic_RWMeasureWithUnit.cxx | 1 - .../RWStepBasic_RWMechanicalContext.cxx | 1 - .../RWStepBasic_RWNameAssignment.cxx | 1 - src/RWStepBasic/RWStepBasic_RWNamedUnit.cxx | 1 - src/RWStepBasic/RWStepBasic_RWObjectRole.cxx | 1 - src/RWStepBasic/RWStepBasic_RWOrdinalDate.cxx | 1 - .../RWStepBasic_RWOrganization.cxx | 1 - .../RWStepBasic_RWOrganizationRole.cxx | 1 - .../RWStepBasic_RWOrganizationalAddress.cxx | 1 - src/RWStepBasic/RWStepBasic_RWPerson.cxx | 1 - .../RWStepBasic_RWPersonAndOrganization.cxx | 1 - ...WStepBasic_RWPersonAndOrganizationRole.cxx | 1 - .../RWStepBasic_RWPersonalAddress.cxx | 1 - ...WStepBasic_RWPlaneAngleMeasureWithUnit.cxx | 2 - .../RWStepBasic_RWPlaneAngleUnit.cxx | 1 - src/RWStepBasic/RWStepBasic_RWProduct.cxx | 1 - .../RWStepBasic_RWProductCategory.cxx | 1 - ...tepBasic_RWProductCategoryRelationship.cxx | 1 - .../RWStepBasic_RWProductConceptContext.cxx | 1 - .../RWStepBasic_RWProductContext.cxx | 1 - .../RWStepBasic_RWProductDefinition.cxx | 1 - ...RWStepBasic_RWProductDefinitionContext.cxx | 1 - ...epBasic_RWProductDefinitionEffectivity.cxx | 1 - ...StepBasic_RWProductDefinitionFormation.cxx | 1 - ...ProductDefinitionFormationRelationship.cxx | 1 - ...DefinitionFormationWithSpecifiedSource.cxx | 1 - ...StepBasic_RWProductDefinitionReference.cxx | 3 - ...nitionReferenceWithLocalRepresentation.cxx | 1 - ...pBasic_RWProductDefinitionRelationship.cxx | 2 - ...oductDefinitionWithAssociatedDocuments.cxx | 2 - ...pBasic_RWProductRelatedProductCategory.cxx | 1 - src/RWStepBasic/RWStepBasic_RWProductType.cxx | 1 - .../RWStepBasic_RWRatioMeasureWithUnit.cxx | 1 - .../RWStepBasic_RWRoleAssociation.cxx | 1 - .../RWStepBasic_RWSecurityClassification.cxx | 1 - ...tepBasic_RWSecurityClassificationLevel.cxx | 1 - src/RWStepBasic/RWStepBasic_RWSiUnit.cxx | 1 - src/RWStepBasic/RWStepBasic_RWSiUnit.hxx | 1 - .../RWStepBasic_RWSiUnitAndAreaUnit.cxx | 2 - .../RWStepBasic_RWSiUnitAndLengthUnit.cxx | 3 - .../RWStepBasic_RWSiUnitAndMassUnit.cxx | 3 - .../RWStepBasic_RWSiUnitAndPlaneAngleUnit.cxx | 3 - .../RWStepBasic_RWSiUnitAndRatioUnit.cxx | 3 - .../RWStepBasic_RWSiUnitAndSolidAngleUnit.cxx | 3 - ...WSiUnitAndThermodynamicTemperatureUnit.cxx | 3 - .../RWStepBasic_RWSiUnitAndTimeUnit.cxx | 3 - .../RWStepBasic_RWSiUnitAndVolumeUnit.cxx | 2 - ...WStepBasic_RWSolidAngleMeasureWithUnit.cxx | 2 - .../RWStepBasic_RWSolidAngleUnit.cxx | 1 - ...epBasic_RWThermodynamicTemperatureUnit.cxx | 1 - ...StepBasic_RWUncertaintyMeasureWithUnit.cxx | 4 - .../RWStepBasic_RWVersionedActionRequest.cxx | 1 - .../RWStepBasic_RWWeekOfYearAndDayDate.cxx | 1 - .../RWStepDimTol_RWAngularityTolerance.cxx | 1 - ...RWStepDimTol_RWCircularRunoutTolerance.cxx | 1 - .../RWStepDimTol_RWCoaxialityTolerance.cxx | 1 - .../RWStepDimTol_RWCommonDatum.cxx | 1 - .../RWStepDimTol_RWConcentricityTolerance.cxx | 1 - .../RWStepDimTol_RWCylindricityTolerance.cxx | 1 - src/RWStepDimTol/RWStepDimTol_RWDatum.cxx | 1 - .../RWStepDimTol_RWDatumFeature.cxx | 1 - .../RWStepDimTol_RWDatumReference.cxx | 1 - .../RWStepDimTol_RWDatumReferenceElement.cxx | 1 - ...mTol_RWDatumReferenceModifierWithValue.cxx | 3 - .../RWStepDimTol_RWDatumSystem.cxx | 1 - .../RWStepDimTol_RWDatumTarget.cxx | 1 - .../RWStepDimTol_RWFlatnessTolerance.cxx | 1 - .../RWStepDimTol_RWGeneralDatumReference.cxx | 2 - ...WStepDimTol_RWGeoTolAndGeoTolWthDatRef.cxx | 3 - ...olAndGeoTolWthDatRefAndGeoTolWthMaxTol.cxx | 3 - ...eoTolAndGeoTolWthDatRefAndGeoTolWthMod.cxx | 3 - ...ndGeoTolWthDatRefAndModGeoTolAndPosTol.cxx | 3 - ...oTolAndGeoTolWthDatRefAndUneqDisGeoTol.cxx | 5 - ...WStepDimTol_RWGeoTolAndGeoTolWthMaxTol.cxx | 2 - .../RWStepDimTol_RWGeoTolAndGeoTolWthMod.cxx | 2 - .../RWStepDimTol_RWGeometricTolerance.cxx | 1 - ...imTol_RWGeometricToleranceRelationship.cxx | 1 - ...RWGeometricToleranceWithDatumReference.cxx | 2 - ...WGeometricToleranceWithDefinedAreaUnit.cxx | 3 - ...ol_RWGeometricToleranceWithDefinedUnit.cxx | 1 - ...GeometricToleranceWithMaximumTolerance.cxx | 3 - ...mTol_RWGeometricToleranceWithModifiers.cxx | 2 - .../RWStepDimTol_RWLineProfileTolerance.cxx | 2 - ...tepDimTol_RWModifiedGeometricTolerance.cxx | 2 - ...WStepDimTol_RWNonUniformZoneDefinition.cxx | 1 - .../RWStepDimTol_RWParallelismTolerance.cxx | 3 - ...StepDimTol_RWPerpendicularityTolerance.cxx | 3 - ...WStepDimTol_RWPlacedDatumTargetFeature.cxx | 1 - .../RWStepDimTol_RWPositionTolerance.cxx | 2 - ...RWStepDimTol_RWProjectedZoneDefinition.cxx | 2 - .../RWStepDimTol_RWRoundnessTolerance.cxx | 2 - .../RWStepDimTol_RWRunoutZoneDefinition.cxx | 1 - .../RWStepDimTol_RWRunoutZoneOrientation.cxx | 1 - .../RWStepDimTol_RWStraightnessTolerance.cxx | 2 - ...RWStepDimTol_RWSurfaceProfileTolerance.cxx | 2 - .../RWStepDimTol_RWSymmetryTolerance.cxx | 3 - .../RWStepDimTol_RWToleranceZone.cxx | 1 - ...RWStepDimTol_RWToleranceZoneDefinition.cxx | 2 - .../RWStepDimTol_RWTotalRunoutTolerance.cxx | 3 - ..._RWUnequallyDisposedGeometricTolerance.cxx | 3 - ...ent_RWAnalysisItemWithinRepresentation.cxx | 1 - ...Element_RWCurveElementEndReleasePacket.cxx | 1 - ...lement_RWCurveElementSectionDefinition.cxx | 1 - .../RWStepElement_RWElementDescriptor.cxx | 1 - ...epElement_RWSurface3dElementDescriptor.cxx | 1 - ...RWStepElement_RWSurfaceElementProperty.cxx | 1 - .../RWStepElement_RWSurfaceSection.cxx | 1 - .../RWStepElement_RWSurfaceSectionField.cxx | 1 - ...pElement_RWSurfaceSectionFieldConstant.cxx | 1 - ...epElement_RWSurfaceSectionFieldVarying.cxx | 1 - .../RWStepElement_RWUniformSurfaceSection.cxx | 1 - ...tepElement_RWVolume3dElementDescriptor.cxx | 1 - ...WAlignedCurve3dElementCoordinateSystem.cxx | 1 - ...lignedSurface3dElementCoordinateSystem.cxx | 1 - ...bitraryVolume3dElementCoordinateSystem.cxx | 1 - ...nstantSurface3dElementCoordinateSystem.cxx | 1 - .../RWStepFEA_RWCurveElementEndRelease.cxx | 2 - .../RWStepFEA_RWCurveElementInterval.cxx | 1 - ...StepFEA_RWCurveElementIntervalConstant.cxx | 1 - ..._RWCurveElementIntervalLinearlyVarying.cxx | 2 - .../RWStepFEA_RWCurveElementLocation.cxx | 1 - ...StepFEA_RWElementGeometricRelationship.cxx | 1 - src/RWStepFEA/RWStepFEA_RWFeaAreaDensity.cxx | 1 - .../RWStepFEA_RWFeaAxis2Placement3d.cxx | 1 - ...RWFeaCurveSectionGeometricRelationship.cxx | 1 - src/RWStepFEA/RWStepFEA_RWFeaGroup.cxx | 1 - .../RWStepFEA_RWFeaLinearElasticity.cxx | 3 - src/RWStepFEA/RWStepFEA_RWFeaMassDensity.cxx | 1 - ...EA_RWFeaMaterialPropertyRepresentation.cxx | 1 - ...WFeaMaterialPropertyRepresentationItem.cxx | 1 - .../RWStepFEA_RWFeaModelDefinition.cxx | 1 - .../RWStepFEA_RWFeaMoistureAbsorption.cxx | 1 - .../RWStepFEA_RWFeaRepresentationItem.cxx | 1 - ...antCoefficientOfLinearThermalExpansion.cxx | 1 - .../RWStepFEA_RWFeaShellBendingStiffness.cxx | 1 - ...aShellMembraneBendingCouplingStiffness.cxx | 1 - .../RWStepFEA_RWFeaShellMembraneStiffness.cxx | 1 - .../RWStepFEA_RWFeaShellShearStiffness.cxx | 1 - ...FeaSurfaceSectionGeometricRelationship.cxx | 1 - ...ialCoefficientOfLinearThermalExpansion.cxx | 1 - .../RWStepFEA_RWFreedomAndCoefficient.cxx | 1 - src/RWStepFEA/RWStepFEA_RWFreedomsList.cxx | 1 - src/RWStepFEA/RWStepFEA_RWNodeDefinition.cxx | 1 - src/RWStepFEA/RWStepFEA_RWNodeGroup.cxx | 1 - src/RWStepFEA/RWStepFEA_RWNodeSet.cxx | 1 - ...etricCurve3dElementCoordinateDirection.cxx | 1 - ...rametricCurve3dElementCoordinateSystem.cxx | 1 - ...metricSurface3dElementCoordinateSystem.cxx | 1 - ...epFEA_RWSurface3dElementRepresentation.cxx | 1 - ...tepFEA_RWVolume3dElementRepresentation.cxx | 1 - .../RWStepGeom_RWAxis1Placement.cxx | 1 - .../RWStepGeom_RWAxis2Placement2d.cxx | 1 - .../RWStepGeom_RWAxis2Placement3d.cxx | 1 - src/RWStepGeom/RWStepGeom_RWBSplineCurve.cxx | 1 - .../RWStepGeom_RWBSplineCurveWithKnots.cxx | 2 - ...eCurveWithKnotsAndRationalBSplineCurve.cxx | 2 - .../RWStepGeom_RWBSplineSurface.cxx | 1 - .../RWStepGeom_RWBSplineSurfaceWithKnots.cxx | 2 - ...faceWithKnotsAndRationalBSplineSurface.cxx | 2 - src/RWStepGeom/RWStepGeom_RWBezierCurve.cxx | 1 - ...m_RWBezierCurveAndRationalBSplineCurve.cxx | 3 - src/RWStepGeom/RWStepGeom_RWBezierSurface.cxx | 1 - ...BezierSurfaceAndRationalBSplineSurface.cxx | 3 - src/RWStepGeom/RWStepGeom_RWBoundaryCurve.cxx | 1 - src/RWStepGeom/RWStepGeom_RWBoundedCurve.cxx | 1 - .../RWStepGeom_RWBoundedSurface.cxx | 1 - ...Geom_RWCartesianTransformationOperator.cxx | 1 - ...om_RWCartesianTransformationOperator3d.cxx | 1 - src/RWStepGeom/RWStepGeom_RWCircle.cxx | 2 - .../RWStepGeom_RWCompositeCurve.cxx | 1 - .../RWStepGeom_RWCompositeCurveOnSurface.cxx | 1 - .../RWStepGeom_RWCompositeCurveSegment.cxx | 1 - src/RWStepGeom/RWStepGeom_RWConic.cxx | 2 - .../RWStepGeom_RWConicalSurface.cxx | 1 - src/RWStepGeom/RWStepGeom_RWCurve.cxx | 1 - src/RWStepGeom/RWStepGeom_RWCurveReplica.cxx | 2 - .../RWStepGeom_RWCylindricalSurface.cxx | 1 - .../RWStepGeom_RWDegeneratePcurve.cxx | 1 - ...RWStepGeom_RWDegenerateToroidalSurface.cxx | 1 - .../RWStepGeom_RWElementarySurface.cxx | 1 - src/RWStepGeom/RWStepGeom_RWEllipse.cxx | 2 - ...RWStepGeom_RWEvaluatedDegeneratePcurve.cxx | 1 - ...GlobUnitAssCtxAndGlobUncertaintyAssCtx.cxx | 6 - ...pGeom_RWGeometricRepresentationContext.cxx | 1 - ...ionContextAndGlobalUnitAssignedContext.cxx | 4 - ...textAndParametricRepresentationContext.cxx | 2 - ...StepGeom_RWGeometricRepresentationItem.cxx | 1 - src/RWStepGeom/RWStepGeom_RWHyperbola.cxx | 2 - .../RWStepGeom_RWIntersectionCurve.cxx | 2 - src/RWStepGeom/RWStepGeom_RWLine.cxx | 1 - src/RWStepGeom/RWStepGeom_RWOffsetCurve3d.cxx | 3 - src/RWStepGeom/RWStepGeom_RWOffsetSurface.cxx | 2 - .../RWStepGeom_RWOrientedSurface.cxx | 1 - .../RWStepGeom_RWOuterBoundaryCurve.cxx | 3 - src/RWStepGeom/RWStepGeom_RWParabola.cxx | 2 - src/RWStepGeom/RWStepGeom_RWPcurve.cxx | 1 - src/RWStepGeom/RWStepGeom_RWPlacement.cxx | 1 - src/RWStepGeom/RWStepGeom_RWPlane.cxx | 1 - src/RWStepGeom/RWStepGeom_RWPoint.cxx | 1 - src/RWStepGeom/RWStepGeom_RWPointOnCurve.cxx | 1 - .../RWStepGeom_RWPointOnSurface.cxx | 1 - src/RWStepGeom/RWStepGeom_RWPointReplica.cxx | 2 - src/RWStepGeom/RWStepGeom_RWPolyline.cxx | 2 - .../RWStepGeom_RWQuasiUniformCurve.cxx | 4 - ...asiUniformCurveAndRationalBSplineCurve.cxx | 6 - .../RWStepGeom_RWQuasiUniformSurface.cxx | 4 - ...niformSurfaceAndRationalBSplineSurface.cxx | 6 - .../RWStepGeom_RWRationalBSplineCurve.cxx | 4 - .../RWStepGeom_RWRationalBSplineSurface.cxx | 4 - ...StepGeom_RWRectangularCompositeSurface.cxx | 1 - ...RWStepGeom_RWRectangularTrimmedSurface.cxx | 1 - ..._RWReparametrisedCompositeCurveSegment.cxx | 1 - src/RWStepGeom/RWStepGeom_RWSeamCurve.cxx | 4 - .../RWStepGeom_RWSphericalSurface.cxx | 1 - src/RWStepGeom/RWStepGeom_RWSurface.cxx | 1 - src/RWStepGeom/RWStepGeom_RWSurfaceCurve.cxx | 4 - ...StepGeom_RWSurfaceCurveAndBoundedCurve.cxx | 4 - .../RWStepGeom_RWSurfaceOfLinearExtrusion.cxx | 1 - .../RWStepGeom_RWSurfaceOfRevolution.cxx | 1 - src/RWStepGeom/RWStepGeom_RWSurfacePatch.cxx | 1 - .../RWStepGeom_RWSurfaceReplica.cxx | 2 - src/RWStepGeom/RWStepGeom_RWSweptSurface.cxx | 1 - .../RWStepGeom_RWToroidalSurface.cxx | 1 - src/RWStepGeom/RWStepGeom_RWTrimmedCurve.cxx | 2 - src/RWStepGeom/RWStepGeom_RWUniformCurve.cxx | 4 - ..._RWUniformCurveAndRationalBSplineCurve.cxx | 4 - .../RWStepGeom_RWUniformSurface.cxx | 4 - ...niformSurfaceAndRationalBSplineSurface.cxx | 4 - src/RWStepGeom/RWStepGeom_RWVector.cxx | 1 - ...atics_RWActuatedKinPairAndOrderKinPair.cxx | 25 --- .../RWStepKinematics_RWCylindricalPair.cxx | 1 - ...pKinematics_RWCylindricalPairWithRange.cxx | 1 - ...WStepKinematics_RWFullyConstrainedPair.cxx | 1 - .../RWStepKinematics_RWHomokineticPair.cxx | 1 - ...ics_RWLinearFlexibleAndPlanarCurvePair.cxx | 1 - ...StepKinematics_RWLowOrderKinematicPair.cxx | 1 - ...atics_RWLowOrderKinematicPairWithRange.cxx | 1 - ...ematics_RWMechanismStateRepresentation.cxx | 3 - .../RWStepKinematics_RWOrientedJoint.cxx | 1 - .../RWStepKinematics_RWPlanarCurvePair.cxx | 1 - ...WStepKinematics_RWPlanarCurvePairRange.cxx | 1 - .../RWStepKinematics_RWPlanarPair.cxx | 1 - ...RWStepKinematics_RWPlanarPairWithRange.cxx | 1 - ...tepKinematics_RWPointOnPlanarCurvePair.cxx | 1 - ...tics_RWPointOnPlanarCurvePairWithRange.cxx | 1 - .../RWStepKinematics_RWPrismaticPair.cxx | 1 - ...tepKinematics_RWPrismaticPairWithRange.cxx | 1 - .../RWStepKinematics_RWRevolutePair.cxx | 1 - ...StepKinematics_RWRevolutePairWithRange.cxx | 1 - .../RWStepKinematics_RWRollingCurvePair.cxx | 1 - .../RWStepKinematics_RWRollingSurfacePair.cxx | 1 - .../RWStepKinematics_RWSlidingCurvePair.cxx | 1 - .../RWStepKinematics_RWSlidingSurfacePair.cxx | 1 - .../RWStepKinematics_RWSphericalPair.cxx | 1 - ...WStepKinematics_RWSphericalPairWithPin.cxx | 1 - ...ematics_RWSphericalPairWithPinAndRange.cxx | 1 - ...tepKinematics_RWSphericalPairWithRange.cxx | 1 - ...WStepKinematics_RWSurfacePairWithRange.cxx | 1 - .../RWStepKinematics_RWUnconstrainedPair.cxx | 1 - .../RWStepKinematics_RWUniversalPair.cxx | 1 - ...tepKinematics_RWUniversalPairWithRange.cxx | 1 - .../RWStepRepr_RWAssemblyComponentUsage.cxx | 1 - ...epr_RWAssemblyComponentUsageSubstitute.cxx | 1 - ...StepRepr_RWCharacterizedRepresentation.cxx | 1 - ...pShAspAndCompShAspAndDatumFeatAndShAsp.cxx | 1 - ...epRepr_RWCompShAspAndDatumFeatAndShAsp.cxx | 1 - .../RWStepRepr_RWCompositeShapeAspect.cxx | 1 - .../RWStepRepr_RWConfigurationDesign.cxx | 1 - .../RWStepRepr_RWConfigurationEffectivity.cxx | 1 - .../RWStepRepr_RWConfigurationItem.cxx | 1 - ...r_RWConstructiveGeometryRepresentation.cxx | 1 - ...tiveGeometryRepresentationRelationship.cxx | 1 - .../RWStepRepr_RWDerivedShapeAspect.cxx | 1 - src/RWStepRepr/RWStepRepr_RWExtension.cxx | 1 - ...pr_RWFeatureForDatumTargetRelationship.cxx | 1 - ...pr_RWFunctionallyDefinedTransformation.cxx | 1 - .../RWStepRepr_RWGeometricAlignment.cxx | 2 - ...epr_RWGlobalUncertaintyAssignedContext.cxx | 1 - ...RWStepRepr_RWGlobalUnitAssignedContext.cxx | 1 - ...RWStepRepr_RWIntegerRepresentationItem.cxx | 1 - ...RWStepRepr_RWItemDefinedTransformation.cxx | 1 - .../RWStepRepr_RWMakeFromUsageOption.cxx | 2 - src/RWStepRepr/RWStepRepr_RWMappedItem.cxx | 1 - .../RWStepRepr_RWMaterialDesignation.cxx | 2 - .../RWStepRepr_RWMaterialProperty.cxx | 1 - ...pRepr_RWMaterialPropertyRepresentation.cxx | 1 - ...RWStepRepr_RWMeasureRepresentationItem.cxx | 4 - ...Repr_RWParametricRepresentationContext.cxx | 1 - .../RWStepRepr_RWProductConcept.cxx | 1 - .../RWStepRepr_RWProductDefinitionShape.cxx | 1 - .../RWStepRepr_RWPropertyDefinition.cxx | 1 - ...pRepr_RWPropertyDefinitionRelationship.cxx | 1 - ...epr_RWPropertyDefinitionRepresentation.cxx | 1 - ...epr_RWQuantifiedAssemblyComponentUsage.cxx | 2 - ...ReprItemAndLengthMeasureWithUnitAndQRI.cxx | 1 - ...ItemAndPlaneAngleMeasureWithUnitAndQRI.cxx | 1 - .../RWStepRepr_RWRepresentation.cxx | 1 - .../RWStepRepr_RWRepresentationContext.cxx | 1 - .../RWStepRepr_RWRepresentationItem.cxx | 1 - .../RWStepRepr_RWRepresentationMap.cxx | 1 - ...WStepRepr_RWRepresentationRelationship.cxx | 1 - ...entationRelationshipWithTransformation.cxx | 1 - src/RWStepRepr/RWStepRepr_RWShapeAspect.cxx | 2 - ...Repr_RWShapeAspectDerivingRelationship.cxx | 1 - .../RWStepRepr_RWShapeAspectRelationship.cxx | 1 - .../RWStepRepr_RWShapeAspectTransition.cxx | 1 - ...entationRelationshipWithTransformation.cxx | 1 - ...pRepr_RWSpecifiedHigherUsageOccurrence.cxx | 3 - ...WStepRepr_RWStructuralResponseProperty.cxx | 1 - ...sponsePropertyDefinitionRepresentation.cxx | 1 - ...hape_RWAdvancedBrepShapeRepresentation.cxx | 1 - .../RWStepShape_RWAngularLocation.cxx | 1 - src/RWStepShape/RWStepShape_RWAngularSize.cxx | 1 - src/RWStepShape/RWStepShape_RWBlock.cxx | 1 - .../RWStepShape_RWBooleanResult.cxx | 3 - src/RWStepShape/RWStepShape_RWBoxDomain.cxx | 1 - .../RWStepShape_RWBoxedHalfSpace.cxx | 1 - ...tepShape_RWCompoundShapeRepresentation.cxx | 1 - ...ape_RWConnectedFaceShapeRepresentation.cxx | 1 - .../RWStepShape_RWConnectedFaceSubSet.cxx | 1 - ..._RWContextDependentShapeRepresentation.cxx | 2 - .../RWStepShape_RWCsgShapeRepresentation.cxx | 1 - src/RWStepShape/RWStepShape_RWCsgSolid.cxx | 2 - ...alRepresentationAndShapeRepresentation.cxx | 1 - ...imensionalCharacteristicRepresentation.cxx | 1 - .../RWStepShape_RWDimensionalLocation.cxx | 1 - ...tepShape_RWDimensionalLocationWithPath.cxx | 1 - .../RWStepShape_RWDimensionalSize.cxx | 1 - .../RWStepShape_RWDimensionalSizeWithPath.cxx | 1 - src/RWStepShape/RWStepShape_RWEdge.cxx | 1 - .../RWStepShape_RWEdgeBasedWireframeModel.cxx | 1 - ...WEdgeBasedWireframeShapeRepresentation.cxx | 1 - src/RWStepShape/RWStepShape_RWEdgeCurve.cxx | 1 - .../RWStepShape_RWExtrudedAreaSolid.cxx | 1 - .../RWStepShape_RWExtrudedFaceSolid.cxx | 1 - .../RWStepShape_RWFaceBasedSurfaceModel.cxx | 1 - src/RWStepShape/RWStepShape_RWFaceBound.cxx | 2 - .../RWStepShape_RWFaceOuterBound.cxx | 1 - src/RWStepShape/RWStepShape_RWFaceSurface.cxx | 1 - src/RWStepShape/RWStepShape_RWFacetedBrep.cxx | 1 - ...tepShape_RWFacetedBrepAndBrepWithVoids.cxx | 1 - ...Shape_RWFacetedBrepShapeRepresentation.cxx | 1 - ...callyBoundedSurfaceShapeRepresentation.cxx | 1 - ...llyBoundedWireframeShapeRepresentation.cxx | 1 - .../RWStepShape_RWHalfSpaceSolid.cxx | 1 - .../RWStepShape_RWLimitsAndFits.cxx | 1 - src/RWStepShape/RWStepShape_RWLoop.cxx | 1 - src/RWStepShape/RWStepShape_RWLoopAndPath.cxx | 3 - .../RWStepShape_RWManifoldSolidBrep.cxx | 2 - ...e_RWManifoldSurfaceShapeRepresentation.cxx | 1 - .../RWStepShape_RWMeasureQualification.cxx | 1 - ...tionItemAndQualifiedRepresentationItem.cxx | 1 - ...WNonManifoldSurfaceShapeRepresentation.cxx | 1 - src/RWStepShape/RWStepShape_RWOpenShell.cxx | 2 - .../RWStepShape_RWOrientedClosedShell.cxx | 4 - .../RWStepShape_RWOrientedEdge.cxx | 2 - .../RWStepShape_RWOrientedFace.cxx | 4 - .../RWStepShape_RWOrientedOpenShell.cxx | 4 - .../RWStepShape_RWOrientedPath.cxx | 3 - src/RWStepShape/RWStepShape_RWPath.cxx | 1 - .../RWStepShape_RWPlusMinusTolerance.cxx | 2 - .../RWStepShape_RWPointRepresentation.cxx | 1 - src/RWStepShape/RWStepShape_RWPolyLoop.cxx | 2 - .../RWStepShape_RWPrecisionQualifier.cxx | 1 - ...tepShape_RWQualifiedRepresentationItem.cxx | 1 - .../RWStepShape_RWRevolvedAreaSolid.cxx | 1 - .../RWStepShape_RWRevolvedFaceSolid.cxx | 1 - .../RWStepShape_RWRightAngularWedge.cxx | 1 - .../RWStepShape_RWRightCircularCone.cxx | 1 - .../RWStepShape_RWRightCircularCylinder.cxx | 1 - src/RWStepShape/RWStepShape_RWSeamEdge.cxx | 2 - ...pShape_RWShapeDefinitionRepresentation.cxx | 1 - ...epShape_RWShapeDimensionRepresentation.cxx | 3 - .../RWStepShape_RWShapeRepresentation.cxx | 1 - ...pe_RWShapeRepresentationWithParameters.cxx | 1 - .../RWStepShape_RWShellBasedSurfaceModel.cxx | 1 - src/RWStepShape/RWStepShape_RWSolidModel.cxx | 1 - .../RWStepShape_RWSolidReplica.cxx | 2 - src/RWStepShape/RWStepShape_RWSphere.cxx | 1 - src/RWStepShape/RWStepShape_RWSubedge.cxx | 2 - src/RWStepShape/RWStepShape_RWSubface.cxx | 1 - .../RWStepShape_RWSweptAreaSolid.cxx | 1 - .../RWStepShape_RWSweptFaceSolid.cxx | 1 - .../RWStepShape_RWToleranceValue.cxx | 1 - ...pShape_RWTopologicalRepresentationItem.cxx | 1 - src/RWStepShape/RWStepShape_RWTorus.cxx | 1 - ...hape_RWTransitionalShapeRepresentation.cxx | 1 - .../RWStepShape_RWTypeQualifier.cxx | 1 - src/RWStepShape/RWStepShape_RWVertex.cxx | 1 - src/RWStepShape/RWStepShape_RWVertexLoop.cxx | 1 - src/RWStepShape/RWStepShape_RWVertexPoint.cxx | 1 - ...StepVisual_RWAnnotationCurveOccurrence.cxx | 3 - ...notationCurveOccurrenceAndGeomReprItem.cxx | 3 - ...pVisual_RWAnnotationFillAreaOccurrence.cxx | 2 - .../RWStepVisual_RWAnnotationOccurrence.cxx | 3 - .../RWStepVisual_RWAnnotationPlane.cxx | 3 - src/RWStepVisual/RWStepVisual_RWAreaInSet.cxx | 1 - .../RWStepVisual_RWBackgroundColour.cxx | 2 - .../RWStepVisual_RWCameraImage.cxx | 2 - .../RWStepVisual_RWCameraModel.cxx | 1 - .../RWStepVisual_RWCameraModelD2.cxx | 1 - .../RWStepVisual_RWCameraModelD3.cxx | 1 - .../RWStepVisual_RWCameraUsage.cxx | 1 - src/RWStepVisual/RWStepVisual_RWColour.cxx | 1 - src/RWStepVisual/RWStepVisual_RWColourRgb.cxx | 1 - .../RWStepVisual_RWColourSpecification.cxx | 1 - ...RWContextDependentOverRidingStyledItem.cxx | 1 - .../RWStepVisual_RWCoordinatesList.cxx | 3 - .../RWStepVisual_RWCurveStyle.cxx | 2 - .../RWStepVisual_RWCurveStyleFontPattern.cxx | 1 - .../RWStepVisual_RWDraughtingModel.cxx | 2 - ...tepVisual_RWDraughtingPreDefinedColour.cxx | 1 - ...Visual_RWDraughtingPreDefinedCurveFont.cxx | 1 - ...tepVisual_RWExternallyDefinedCurveFont.cxx | 1 - .../RWStepVisual_RWFillAreaStyleColour.cxx | 1 - .../RWStepVisual_RWInvisibility.cxx | 1 - ...hanicalDesignGeometricPresentationArea.cxx | 2 - ...ignGeometricPresentationRepresentation.cxx | 2 - .../RWStepVisual_RWOverRidingStyledItem.cxx | 2 - src/RWStepVisual/RWStepVisual_RWPlanarBox.cxx | 2 - .../RWStepVisual_RWPlanarExtent.cxx | 1 - .../RWStepVisual_RWPointStyle.cxx | 3 - .../RWStepVisual_RWPreDefinedColour.cxx | 1 - .../RWStepVisual_RWPreDefinedCurveFont.cxx | 1 - .../RWStepVisual_RWPreDefinedItem.cxx | 1 - .../RWStepVisual_RWPresentationArea.cxx | 2 - ...epVisual_RWPresentationLayerAssignment.cxx | 2 - ...tepVisual_RWPresentationRepresentation.cxx | 2 - .../RWStepVisual_RWPresentationSet.cxx | 1 - .../RWStepVisual_RWPresentationSize.cxx | 1 - ...epVisual_RWPresentationStyleAssignment.cxx | 2 - ...tepVisual_RWPresentationStyleByContext.cxx | 2 - .../RWStepVisual_RWPresentationView.cxx | 2 - ...epVisual_RWPresentedItemRepresentation.cxx | 2 - .../RWStepVisual_RWStyledItem.cxx | 3 - .../RWStepVisual_RWSurfaceSideStyle.cxx | 1 - .../RWStepVisual_RWSurfaceStyleBoundary.cxx | 1 - ...RWStepVisual_RWSurfaceStyleControlGrid.cxx | 1 - .../RWStepVisual_RWSurfaceStyleFillArea.cxx | 1 - ...StepVisual_RWSurfaceStyleParameterLine.cxx | 1 - ...Visual_RWSurfaceStyleSegmentationCurve.cxx | 1 - .../RWStepVisual_RWSurfaceStyleSilhouette.cxx | 1 - ...RWStepVisual_RWSurfaceStyleTransparent.cxx | 2 - .../RWStepVisual_RWSurfaceStyleUsage.cxx | 2 - src/RWStepVisual/RWStepVisual_RWTemplate.cxx | 2 - .../RWStepVisual_RWTemplateInstance.cxx | 2 - ...sual_RWTessellatedAnnotationOccurrence.cxx | 3 - ...RWStepVisual_RWTessellatedGeometricSet.cxx | 3 - .../RWStepVisual_RWTessellatedItem.cxx | 1 - .../RWStepVisual_RWTextLiteral.cxx | 3 - src/RWStepVisual/RWStepVisual_RWTextStyle.cxx | 1 - ...RWStepVisual_RWTextStyleForDefinedFont.cxx | 1 - ...sual_RWTextStyleWithBoxCharacteristics.cxx | 1 - .../RWStepVisual_RWViewVolume.cxx | 2 - src/RWStl/RWStl_Reader.cxx | 2 - src/Select3D/Select3D_BVHBuilder3d.hxx | 1 - src/Select3D/Select3D_BVHIndexBuffer.hxx | 3 - src/Select3D/Select3D_BndBox3d.hxx | 3 - .../Select3D_InteriorSensitivePointSet.cxx | 4 - .../Select3D_InteriorSensitivePointSet.hxx | 5 - src/Select3D/Select3D_SensitiveBox.hxx | 1 - src/Select3D/Select3D_SensitiveCurve.cxx | 1 - src/Select3D/Select3D_SensitiveEntity.hxx | 5 - src/Select3D/Select3D_SensitiveFace.cxx | 1 - src/Select3D/Select3D_SensitiveGroup.cxx | 2 - src/Select3D/Select3D_SensitiveGroup.hxx | 1 - .../Select3D_SensitivePrimitiveArray.hxx | 2 - src/Select3D/Select3D_SensitiveSegment.cxx | 1 - src/Select3D/Select3D_SensitiveSet.hxx | 1 - src/Select3D/Select3D_SensitiveTriangle.cxx | 2 - .../Select3D_SensitiveTriangulation.cxx | 1 - .../Select3D_SensitiveTriangulation.hxx | 5 - src/Select3D/Select3D_SensitiveWire.cxx | 1 - src/Select3D/Select3D_TypeOfSensitivity.hxx | 2 - src/SelectBasics/SelectBasics.hxx | 2 - .../SelectBasics_SelectingVolumeManager.hxx | 1 - src/SelectMgr/SelectMgr.cxx | 3 - src/SelectMgr/SelectMgr_AndFilter.hxx | 1 - src/SelectMgr/SelectMgr_AndOrFilter.hxx | 1 - src/SelectMgr/SelectMgr_AxisIntersector.cxx | 1 - src/SelectMgr/SelectMgr_Filter.hxx | 1 - src/SelectMgr/SelectMgr_FrustumBuilder.hxx | 3 - src/SelectMgr/SelectMgr_OrFilter.cxx | 1 - src/SelectMgr/SelectMgr_OrFilter.hxx | 1 - src/SelectMgr/SelectMgr_SelectableObject.cxx | 7 - .../SelectMgr_SelectableObjectSet.hxx | 5 - src/SelectMgr/SelectMgr_Selection.hxx | 1 - .../SelectMgr_SensitiveEntitySet.hxx | 3 - src/SelectMgr/SelectMgr_SortCriterion.hxx | 1 - src/SelectMgr/SelectMgr_ToleranceMap.hxx | 1 - src/SelectMgr/SelectMgr_VectorTypes.hxx | 1 - src/SelectMgr/SelectMgr_ViewClipRange.cxx | 1 - src/SelectMgr/SelectMgr_ViewerSelector.cxx | 1 - src/SelectMgr/SelectMgr_ViewerSelector.hxx | 4 - src/ShapeAlgo/ShapeAlgo_AlgoContainer.cxx | 9 - src/ShapeAlgo/ShapeAlgo_AlgoContainer.hxx | 2 - src/ShapeAnalysis/ShapeAnalysis.cxx | 5 - .../ShapeAnalysis_BoxBndTree.cxx | 2 - .../ShapeAnalysis_CheckSmallFace.cxx | 7 - .../ShapeAnalysis_CheckSmallFace.hxx | 3 - src/ShapeAnalysis/ShapeAnalysis_Curve.hxx | 2 - src/ShapeAnalysis/ShapeAnalysis_Edge.cxx | 3 - src/ShapeAnalysis/ShapeAnalysis_Edge.hxx | 2 - .../ShapeAnalysis_FreeBoundData.hxx | 1 - .../ShapeAnalysis_FreeBounds.cxx | 3 - .../ShapeAnalysis_FreeBounds.hxx | 2 - .../ShapeAnalysis_FreeBoundsProperties.cxx | 1 - .../ShapeAnalysis_FreeBoundsProperties.hxx | 2 - src/ShapeAnalysis/ShapeAnalysis_Geom.cxx | 3 - src/ShapeAnalysis/ShapeAnalysis_Geom.hxx | 2 - .../ShapeAnalysis_HSequenceOfFreeBounds.hxx | 1 - .../ShapeAnalysis_ShapeContents.cxx | 2 - .../ShapeAnalysis_ShapeContents.hxx | 1 - .../ShapeAnalysis_ShapeTolerance.cxx | 3 - .../ShapeAnalysis_ShapeTolerance.hxx | 1 - src/ShapeAnalysis/ShapeAnalysis_Shell.hxx | 2 - src/ShapeAnalysis/ShapeAnalysis_Surface.cxx | 3 - .../ShapeAnalysis_TransferParameters.cxx | 1 - .../ShapeAnalysis_TransferParameters.hxx | 2 - .../ShapeAnalysis_TransferParametersProj.cxx | 8 - .../ShapeAnalysis_TransferParametersProj.hxx | 2 - src/ShapeAnalysis/ShapeAnalysis_Wire.cxx | 4 - src/ShapeAnalysis/ShapeAnalysis_Wire.hxx | 2 - src/ShapeAnalysis/ShapeAnalysis_WireOrder.hxx | 2 - .../ShapeAnalysis_WireVertex.hxx | 2 - 752 files changed, 31 insertions(+), 1717 deletions(-) diff --git a/src/AIS/AIS_InteractiveContext.hxx b/src/AIS/AIS_InteractiveContext.hxx index 5e79807ea6..36c0cb174b 100644 --- a/src/AIS/AIS_InteractiveContext.hxx +++ b/src/AIS/AIS_InteractiveContext.hxx @@ -42,6 +42,7 @@ #include #include #include +#include #include class V3d_Viewer; diff --git a/src/Plugin/Plugin.hxx b/src/Plugin/Plugin.hxx index b8cafae45f..ea24e07369 100644 --- a/src/Plugin/Plugin.hxx +++ b/src/Plugin/Plugin.hxx @@ -21,7 +21,6 @@ #include #include -#include class Standard_Transient; class Standard_GUID; diff --git a/src/Plugin/Plugin_MapOfFunctions.hxx b/src/Plugin/Plugin_MapOfFunctions.hxx index 425ac96382..b863b6197b 100644 --- a/src/Plugin/Plugin_MapOfFunctions.hxx +++ b/src/Plugin/Plugin_MapOfFunctions.hxx @@ -17,7 +17,6 @@ #ifndef Plugin_MapOfFunctions_HeaderFile #define Plugin_MapOfFunctions_HeaderFile -#include #include #include #include diff --git a/src/Poly/Poly.cxx b/src/Poly/Poly.cxx index b6bd5b2d53..dff7e3abaf 100644 --- a/src/Poly/Poly.cxx +++ b/src/Poly/Poly.cxx @@ -30,8 +30,6 @@ #include #include #include -#include -#include //======================================================================= //function : Catenate diff --git a/src/Poly/Poly_CoherentTriangulation.cxx b/src/Poly/Poly_CoherentTriangulation.cxx index a30a68d225..f98af07866 100644 --- a/src/Poly/Poly_CoherentTriangulation.cxx +++ b/src/Poly/Poly_CoherentTriangulation.cxx @@ -19,10 +19,7 @@ #include #include #include -#include -#include #include -#include IMPLEMENT_STANDARD_RTTIEXT(Poly_CoherentTriangulation,Standard_Transient) diff --git a/src/Poly/Poly_Connect.cxx b/src/Poly/Poly_Connect.cxx index 15e0b2b6dd..226b552e5b 100644 --- a/src/Poly/Poly_Connect.cxx +++ b/src/Poly/Poly_Connect.cxx @@ -17,7 +17,6 @@ #include #include -#include #include // this structure records one of the edges starting from a node diff --git a/src/Poly/Poly_HArray1OfTriangle.hxx b/src/Poly/Poly_HArray1OfTriangle.hxx index 7bf261fcad..52a8bd3217 100644 --- a/src/Poly/Poly_HArray1OfTriangle.hxx +++ b/src/Poly/Poly_HArray1OfTriangle.hxx @@ -17,7 +17,6 @@ #ifndef Poly_HArray1OfTriangle_HeaderFile #define Poly_HArray1OfTriangle_HeaderFile -#include #include #include diff --git a/src/Poly/Poly_ListOfTriangulation.hxx b/src/Poly/Poly_ListOfTriangulation.hxx index f5af44b3e5..c9f5de147e 100644 --- a/src/Poly/Poly_ListOfTriangulation.hxx +++ b/src/Poly/Poly_ListOfTriangulation.hxx @@ -16,7 +16,6 @@ #ifndef Poly_ListOfTriangulation_HeaderFile #define Poly_ListOfTriangulation_HeaderFile -#include #include /** diff --git a/src/Poly/Poly_MakeLoops.hxx b/src/Poly/Poly_MakeLoops.hxx index c72dad62e3..25f6539cf9 100644 --- a/src/Poly/Poly_MakeLoops.hxx +++ b/src/Poly/Poly_MakeLoops.hxx @@ -18,7 +18,6 @@ #include #include -#include #include #include #include diff --git a/src/Poly/Poly_MergeNodesTool.hxx b/src/Poly/Poly_MergeNodesTool.hxx index 6c3cae76ef..20f1c83f53 100644 --- a/src/Poly/Poly_MergeNodesTool.hxx +++ b/src/Poly/Poly_MergeNodesTool.hxx @@ -14,9 +14,7 @@ #ifndef _Poly_MergeNodesTool_HeaderFile #define _Poly_MergeNodesTool_HeaderFile -#include #include -#include #include //! Auxiliary tool for merging triangulation nodes for visualization purposes. diff --git a/src/Poly/Poly_Polygon2D.hxx b/src/Poly/Poly_Polygon2D.hxx index ee3122004e..51bc6ddf11 100644 --- a/src/Poly/Poly_Polygon2D.hxx +++ b/src/Poly/Poly_Polygon2D.hxx @@ -17,7 +17,6 @@ #ifndef _Poly_Polygon2D_HeaderFile #define _Poly_Polygon2D_HeaderFile -#include #include #include diff --git a/src/Poly/Poly_Polygon3D.hxx b/src/Poly/Poly_Polygon3D.hxx index 507461bb11..bc4abf6180 100644 --- a/src/Poly/Poly_Polygon3D.hxx +++ b/src/Poly/Poly_Polygon3D.hxx @@ -17,10 +17,8 @@ #ifndef _Poly_Polygon3D_HeaderFile #define _Poly_Polygon3D_HeaderFile -#include #include #include -#include #include DEFINE_STANDARD_HANDLE(Poly_Polygon3D, Standard_Transient) diff --git a/src/Poly/Poly_PolygonOnTriangulation.hxx b/src/Poly/Poly_PolygonOnTriangulation.hxx index 1f4b5b1cfd..4eb084854d 100644 --- a/src/Poly/Poly_PolygonOnTriangulation.hxx +++ b/src/Poly/Poly_PolygonOnTriangulation.hxx @@ -21,7 +21,6 @@ #include #include #include -#include #include DEFINE_STANDARD_HANDLE(Poly_PolygonOnTriangulation, Standard_Transient) diff --git a/src/Poly/Poly_Triangulation.hxx b/src/Poly/Poly_Triangulation.hxx index 57104eddb4..0b2d6a1151 100644 --- a/src/Poly/Poly_Triangulation.hxx +++ b/src/Poly/Poly_Triangulation.hxx @@ -18,7 +18,6 @@ #define _Poly_Triangulation_HeaderFile #include -#include #include #include #include diff --git a/src/Precision/Precision.hxx b/src/Precision/Precision.hxx index 0c1f3effbd..b3843c28cd 100644 --- a/src/Precision/Precision.hxx +++ b/src/Precision/Precision.hxx @@ -19,9 +19,7 @@ #include #include -#include #include -#include //! The Precision package offers a set of functions defining precision criteria //! for use in conventional situations when comparing two numbers. diff --git a/src/ProjLib/ProjLib.cxx b/src/ProjLib/ProjLib.cxx index 5da06356cf..995ad1333a 100644 --- a/src/ProjLib/ProjLib.cxx +++ b/src/ProjLib/ProjLib.cxx @@ -26,17 +26,12 @@ #include #include #include -#include #include #include #include -#include #include -#include #include -#include #include -#include #include #include #include diff --git a/src/ProjLib/ProjLib_CompProjectedCurve.cxx b/src/ProjLib/ProjLib_CompProjectedCurve.cxx index 44e5d0042c..af709f85e3 100644 --- a/src/ProjLib/ProjLib_CompProjectedCurve.cxx +++ b/src/ProjLib/ProjLib_CompProjectedCurve.cxx @@ -17,13 +17,9 @@ #include -#include -#include -#include #include #include #include -#include #include #include #include @@ -45,17 +41,13 @@ #include #include #include -#include #include #include #include #include -#include #include #include -#include - #define FuncTol 1.e-10 IMPLEMENT_STANDARD_RTTIEXT(ProjLib_CompProjectedCurve, Adaptor2d_Curve2d) diff --git a/src/ProjLib/ProjLib_ComputeApprox.cxx b/src/ProjLib/ProjLib_ComputeApprox.cxx index e4745113d7..74cf49ea38 100644 --- a/src/ProjLib/ProjLib_ComputeApprox.cxx +++ b/src/ProjLib/ProjLib_ComputeApprox.cxx @@ -21,11 +21,9 @@ #include #include -#include #include #include #include -#include #include #include #include diff --git a/src/ProjLib/ProjLib_ComputeApproxOnPolarSurface.cxx b/src/ProjLib/ProjLib_ComputeApproxOnPolarSurface.cxx index 0d44135cae..3fe5728fcc 100644 --- a/src/ProjLib/ProjLib_ComputeApproxOnPolarSurface.cxx +++ b/src/ProjLib/ProjLib_ComputeApproxOnPolarSurface.cxx @@ -14,19 +14,13 @@ // commercial license or contractual agreement. #include -#include #include #include -#include -#include #include #include -#include #include #include -#include #include -#include #include #include #include @@ -42,27 +36,21 @@ #include #include -#include #include #include #include #include -#include #include #include #include #include #include -#include -#include #include #include -#include #include #include #include -#include #include #include diff --git a/src/ProjLib/ProjLib_ComputeApproxOnPolarSurface.hxx b/src/ProjLib/ProjLib_ComputeApproxOnPolarSurface.hxx index 536ef88a8c..a5e0d3b4ab 100644 --- a/src/ProjLib/ProjLib_ComputeApproxOnPolarSurface.hxx +++ b/src/ProjLib/ProjLib_ComputeApproxOnPolarSurface.hxx @@ -18,7 +18,6 @@ #define _ProjLib_ComputeApproxOnPolarSurface_HeaderFile #include -#include #include #include diff --git a/src/ProjLib/ProjLib_Cone.cxx b/src/ProjLib/ProjLib_Cone.cxx index 429aa9e035..1c84d1a818 100644 --- a/src/ProjLib/ProjLib_Cone.cxx +++ b/src/ProjLib/ProjLib_Cone.cxx @@ -16,19 +16,15 @@ #include -#include #include #include #include #include #include #include -#include #include -#include #include #include -#include //======================================================================= //function : ProjLib_Cone diff --git a/src/ProjLib/ProjLib_Cone.hxx b/src/ProjLib/ProjLib_Cone.hxx index 291db56b83..46c4986240 100644 --- a/src/ProjLib/ProjLib_Cone.hxx +++ b/src/ProjLib/ProjLib_Cone.hxx @@ -19,7 +19,6 @@ #include #include -#include #include #include diff --git a/src/ProjLib/ProjLib_Cylinder.cxx b/src/ProjLib/ProjLib_Cylinder.cxx index 5c40eeac91..efb9a3a697 100644 --- a/src/ProjLib/ProjLib_Cylinder.cxx +++ b/src/ProjLib/ProjLib_Cylinder.cxx @@ -17,18 +17,12 @@ #include #include -#include #include #include -#include #include -#include -#include #include -#include #include #include -#include #include //======================================================================= diff --git a/src/ProjLib/ProjLib_Cylinder.hxx b/src/ProjLib/ProjLib_Cylinder.hxx index 8cbe35e961..27a55edc38 100644 --- a/src/ProjLib/ProjLib_Cylinder.hxx +++ b/src/ProjLib/ProjLib_Cylinder.hxx @@ -19,7 +19,6 @@ #include #include -#include #include #include diff --git a/src/ProjLib/ProjLib_HSequenceOfHSequenceOfPnt.hxx b/src/ProjLib/ProjLib_HSequenceOfHSequenceOfPnt.hxx index 273baadad5..a1705fb45e 100644 --- a/src/ProjLib/ProjLib_HSequenceOfHSequenceOfPnt.hxx +++ b/src/ProjLib/ProjLib_HSequenceOfHSequenceOfPnt.hxx @@ -17,7 +17,6 @@ #ifndef ProjLib_HSequenceOfHSequenceOfPnt_HeaderFile #define ProjLib_HSequenceOfHSequenceOfPnt_HeaderFile -#include #include #include diff --git a/src/ProjLib/ProjLib_Plane.cxx b/src/ProjLib/ProjLib_Plane.cxx index f1a2ab87d7..6e4772a6c3 100644 --- a/src/ProjLib/ProjLib_Plane.cxx +++ b/src/ProjLib/ProjLib_Plane.cxx @@ -18,12 +18,9 @@ #include #include #include -#include #include -#include #include #include -#include //======================================================================= //function : ProjLib_Plane diff --git a/src/ProjLib/ProjLib_Plane.hxx b/src/ProjLib/ProjLib_Plane.hxx index c5e6cacd8c..c7daf6fdb5 100644 --- a/src/ProjLib/ProjLib_Plane.hxx +++ b/src/ProjLib/ProjLib_Plane.hxx @@ -19,7 +19,6 @@ #include #include -#include #include #include diff --git a/src/ProjLib/ProjLib_PrjFunc.cxx b/src/ProjLib/ProjLib_PrjFunc.cxx index 3eb225c9b4..7daac35f73 100644 --- a/src/ProjLib/ProjLib_PrjFunc.cxx +++ b/src/ProjLib/ProjLib_PrjFunc.cxx @@ -15,7 +15,6 @@ // commercial license or contractual agreement. -#include #include #include #include diff --git a/src/ProjLib/ProjLib_PrjFunc.hxx b/src/ProjLib/ProjLib_PrjFunc.hxx index 7224fd8aa5..81f0b54ea7 100644 --- a/src/ProjLib/ProjLib_PrjFunc.hxx +++ b/src/ProjLib/ProjLib_PrjFunc.hxx @@ -19,7 +19,6 @@ #include #include -#include #include #include diff --git a/src/ProjLib/ProjLib_PrjResolve.cxx b/src/ProjLib/ProjLib_PrjResolve.cxx index 2ab6b58fd7..26e133be41 100644 --- a/src/ProjLib/ProjLib_PrjResolve.cxx +++ b/src/ProjLib/ProjLib_PrjResolve.cxx @@ -15,7 +15,6 @@ // commercial license or contractual agreement. -#include #include #include #include @@ -23,7 +22,6 @@ #include #include #include -#include #include ProjLib_PrjResolve::ProjLib_PrjResolve(const Adaptor3d_Curve& C,const Adaptor3d_Surface& S,const Standard_Integer Fix) diff --git a/src/ProjLib/ProjLib_PrjResolve.hxx b/src/ProjLib/ProjLib_PrjResolve.hxx index 7b1b257f0b..aea21f1603 100644 --- a/src/ProjLib/ProjLib_PrjResolve.hxx +++ b/src/ProjLib/ProjLib_PrjResolve.hxx @@ -19,7 +19,6 @@ #include #include -#include #include diff --git a/src/ProjLib/ProjLib_ProjectOnPlane.cxx b/src/ProjLib/ProjLib_ProjectOnPlane.cxx index 4330a8666c..036c1a9c5c 100644 --- a/src/ProjLib/ProjLib_ProjectOnPlane.cxx +++ b/src/ProjLib/ProjLib_ProjectOnPlane.cxx @@ -17,28 +17,18 @@ // 09-Aug-95 : xab : changed the ProjLib_ProjectOnPlane in the case // of the line and the parameteriation is kept #include -#include #include #include -#include #include #include #include #include -#include -#include #include -#include -#include -#include -#include #include #include -#include #include #include #include -#include #include #include #include diff --git a/src/ProjLib/ProjLib_ProjectOnSurface.cxx b/src/ProjLib/ProjLib_ProjectOnSurface.cxx index 329edd91c9..de4cf1f20a 100644 --- a/src/ProjLib/ProjLib_ProjectOnSurface.cxx +++ b/src/ProjLib/ProjLib_ProjectOnSurface.cxx @@ -18,14 +18,11 @@ #include #include -#include -#include #include #include #include #include #include -#include #include #include #include diff --git a/src/ProjLib/ProjLib_ProjectedCurve.cxx b/src/ProjLib/ProjLib_ProjectedCurve.cxx index e21bda00e0..f31bc78d57 100644 --- a/src/ProjLib/ProjLib_ProjectedCurve.cxx +++ b/src/ProjLib/ProjLib_ProjectedCurve.cxx @@ -16,11 +16,9 @@ // Modified by skv - Wed Aug 11 15:45:58 2004 OCC6272 -#include #include #include #include -#include #include #include #include @@ -34,25 +32,15 @@ #include #include #include -#include #include #include #include -#include -#include -#include #include #include #include -#include -#include -#include -#include -#include #include #include #include -#include #include #include #include diff --git a/src/ProjLib/ProjLib_ProjectedCurve.hxx b/src/ProjLib/ProjLib_ProjectedCurve.hxx index 61587c468a..162bb7fbd4 100644 --- a/src/ProjLib/ProjLib_ProjectedCurve.hxx +++ b/src/ProjLib/ProjLib_ProjectedCurve.hxx @@ -17,7 +17,6 @@ #ifndef _ProjLib_ProjectedCurve_HeaderFile #define _ProjLib_ProjectedCurve_HeaderFile -#include #include #include #include diff --git a/src/ProjLib/ProjLib_Projector.cxx b/src/ProjLib/ProjLib_Projector.cxx index 29a5e93d81..943b271e95 100644 --- a/src/ProjLib/ProjLib_Projector.cxx +++ b/src/ProjLib/ProjLib_Projector.cxx @@ -20,15 +20,11 @@ #include #include #include -#include #include -#include #include -#include #include #include #include -#include #include #include #include diff --git a/src/ProjLib/ProjLib_Projector.hxx b/src/ProjLib/ProjLib_Projector.hxx index 13f24aec36..3ca97cfffa 100644 --- a/src/ProjLib/ProjLib_Projector.hxx +++ b/src/ProjLib/ProjLib_Projector.hxx @@ -27,8 +27,6 @@ #include #include #include -#include -#include class Geom2d_BSplineCurve; class Geom2d_BezierCurve; class gp_Lin; diff --git a/src/ProjLib/ProjLib_Sphere.cxx b/src/ProjLib/ProjLib_Sphere.cxx index 9b04d75407..ba04e89af5 100644 --- a/src/ProjLib/ProjLib_Sphere.cxx +++ b/src/ProjLib/ProjLib_Sphere.cxx @@ -23,13 +23,11 @@ #include #include #include -#include #include #include #include #include #include -#include #include #include diff --git a/src/ProjLib/ProjLib_Sphere.hxx b/src/ProjLib/ProjLib_Sphere.hxx index f0e4006215..dec4aa6335 100644 --- a/src/ProjLib/ProjLib_Sphere.hxx +++ b/src/ProjLib/ProjLib_Sphere.hxx @@ -19,11 +19,9 @@ #include #include -#include #include #include -#include class gp_Circ; class gp_Lin; class gp_Elips; diff --git a/src/ProjLib/ProjLib_Torus.cxx b/src/ProjLib/ProjLib_Torus.cxx index 74462ac246..85e5be3fbc 100644 --- a/src/ProjLib/ProjLib_Torus.cxx +++ b/src/ProjLib/ProjLib_Torus.cxx @@ -20,14 +20,11 @@ #include #include #include -#include #include -#include #include #include #include #include -#include //======================================================================= //function : ProjLib_Torus diff --git a/src/ProjLib/ProjLib_Torus.hxx b/src/ProjLib/ProjLib_Torus.hxx index d103dc1599..9d06b400ad 100644 --- a/src/ProjLib/ProjLib_Torus.hxx +++ b/src/ProjLib/ProjLib_Torus.hxx @@ -19,7 +19,6 @@ #include #include -#include #include #include diff --git a/src/Prs3d/Prs3d.hxx b/src/Prs3d/Prs3d.hxx index fa6b43d27b..375ffb980c 100644 --- a/src/Prs3d/Prs3d.hxx +++ b/src/Prs3d/Prs3d.hxx @@ -17,7 +17,6 @@ #ifndef _Prs3d_HeaderFile #define _Prs3d_HeaderFile -#include #include #include #include diff --git a/src/Prs3d/Prs3d_Arrow.cxx b/src/Prs3d/Prs3d_Arrow.cxx index 9900ff1e89..d3afd3a1b1 100644 --- a/src/Prs3d/Prs3d_Arrow.cxx +++ b/src/Prs3d/Prs3d_Arrow.cxx @@ -24,7 +24,6 @@ #include #include #include -#include //======================================================================= //function : Draw diff --git a/src/Prs3d/Prs3d_DatumAspect.hxx b/src/Prs3d/Prs3d_DatumAspect.hxx index 0e3ff83b78..9ef2af7dce 100644 --- a/src/Prs3d/Prs3d_DatumAspect.hxx +++ b/src/Prs3d/Prs3d_DatumAspect.hxx @@ -17,11 +17,9 @@ #ifndef _Prs3d_DatumAspect_HeaderFile #define _Prs3d_DatumAspect_HeaderFile -#include #include #include #include -#include #include #include #include diff --git a/src/Prs3d/Prs3d_Drawer.cxx b/src/Prs3d/Prs3d_Drawer.cxx index 7b9b926096..67f481cd51 100644 --- a/src/Prs3d/Prs3d_Drawer.cxx +++ b/src/Prs3d/Prs3d_Drawer.cxx @@ -15,9 +15,6 @@ #include #include -#include -#include -#include #include #include #include diff --git a/src/Prs3d/Prs3d_Drawer.hxx b/src/Prs3d/Prs3d_Drawer.hxx index 2ed3fc3ba9..38c85647b9 100644 --- a/src/Prs3d/Prs3d_Drawer.hxx +++ b/src/Prs3d/Prs3d_Drawer.hxx @@ -16,10 +16,8 @@ #define _Prs3d_Drawer_HeaderFile #include -#include #include -#include #include #include #include diff --git a/src/Prs3d/Prs3d_LineAspect.hxx b/src/Prs3d/Prs3d_LineAspect.hxx index 99c2b2cb7e..31c2086245 100644 --- a/src/Prs3d/Prs3d_LineAspect.hxx +++ b/src/Prs3d/Prs3d_LineAspect.hxx @@ -17,7 +17,6 @@ #ifndef _Prs3d_LineAspect_HeaderFile #define _Prs3d_LineAspect_HeaderFile -#include #include #include #include diff --git a/src/Prs3d/Prs3d_Text.cxx b/src/Prs3d/Prs3d_Text.cxx index 2fa7ccf106..e722bd936c 100644 --- a/src/Prs3d/Prs3d_Text.cxx +++ b/src/Prs3d/Prs3d_Text.cxx @@ -21,7 +21,6 @@ #include #include #include -#include #include // ======================================================================= diff --git a/src/Prs3d/Prs3d_Text.hxx b/src/Prs3d/Prs3d_Text.hxx index e2ccccd99f..0dfa01a265 100644 --- a/src/Prs3d/Prs3d_Text.hxx +++ b/src/Prs3d/Prs3d_Text.hxx @@ -17,7 +17,6 @@ #ifndef _Prs3d_Text_HeaderFile #define _Prs3d_Text_HeaderFile -#include #include #include #include diff --git a/src/Prs3d/Prs3d_ToolQuadric.cxx b/src/Prs3d/Prs3d_ToolQuadric.cxx index 653c3c8c14..52e13b096b 100644 --- a/src/Prs3d/Prs3d_ToolQuadric.cxx +++ b/src/Prs3d/Prs3d_ToolQuadric.cxx @@ -15,10 +15,8 @@ #include -#include #include #include -#include //======================================================================= //function : FIllArray diff --git a/src/PrsDim/PrsDim.cxx b/src/PrsDim/PrsDim.cxx index e9235029b8..b103684ade 100644 --- a/src/PrsDim/PrsDim.cxx +++ b/src/PrsDim/PrsDim.cxx @@ -16,13 +16,10 @@ #include -#include -#include #include #include #include #include -#include #include #include #include @@ -31,7 +28,6 @@ #include #include #include -#include #include #include #include @@ -64,8 +60,6 @@ #include #include #include -#include -#include #include #include #include @@ -78,7 +72,6 @@ #include #include #include -#include const Standard_Real SquareTolerance = Precision::SquareConfusion(); diff --git a/src/PrsDim/PrsDim.hxx b/src/PrsDim/PrsDim.hxx index f272c89cdd..4a98ab75bc 100644 --- a/src/PrsDim/PrsDim.hxx +++ b/src/PrsDim/PrsDim.hxx @@ -18,12 +18,8 @@ #define _PrsDim_HeaderFile #include -#include -#include -#include #include #include -#include #include #include #include diff --git a/src/PrsDim/PrsDim_AngleDimension.hxx b/src/PrsDim/PrsDim_AngleDimension.hxx index 912e1a5f67..5bbf17c965 100644 --- a/src/PrsDim/PrsDim_AngleDimension.hxx +++ b/src/PrsDim/PrsDim_AngleDimension.hxx @@ -21,8 +21,6 @@ #include #include -#include -#include #include #include #include diff --git a/src/PrsDim/PrsDim_Chamf2dDimension.cxx b/src/PrsDim/PrsDim_Chamf2dDimension.cxx index ee4eb9c82d..434c959cd4 100644 --- a/src/PrsDim/PrsDim_Chamf2dDimension.cxx +++ b/src/PrsDim/PrsDim_Chamf2dDimension.cxx @@ -17,10 +17,7 @@ #include #include -#include #include -#include -#include #include #include #include @@ -29,9 +26,7 @@ #include #include #include -#include #include -#include #include #include #include @@ -39,13 +34,9 @@ #include #include #include -#include #include -#include #include -#include #include -#include #include IMPLEMENT_STANDARD_RTTIEXT(PrsDim_Chamf2dDimension, PrsDim_Relation) diff --git a/src/PrsDim/PrsDim_Chamf2dDimension.hxx b/src/PrsDim/PrsDim_Chamf2dDimension.hxx index acc77f1c6a..e6659671d6 100644 --- a/src/PrsDim/PrsDim_Chamf2dDimension.hxx +++ b/src/PrsDim/PrsDim_Chamf2dDimension.hxx @@ -17,7 +17,6 @@ #ifndef _PrsDim_Chamf2dDimension_HeaderFile #define _PrsDim_Chamf2dDimension_HeaderFile -#include #include #include #include diff --git a/src/PrsDim/PrsDim_Chamf3dDimension.cxx b/src/PrsDim/PrsDim_Chamf3dDimension.cxx index a0f993a639..b829c42dce 100644 --- a/src/PrsDim/PrsDim_Chamf3dDimension.cxx +++ b/src/PrsDim/PrsDim_Chamf3dDimension.cxx @@ -17,20 +17,14 @@ #include #include -#include #include -#include -#include #include #include #include #include -#include #include #include -#include #include -#include #include #include #include @@ -38,12 +32,8 @@ #include #include #include -#include -#include #include -#include #include -#include #include IMPLEMENT_STANDARD_RTTIEXT(PrsDim_Chamf3dDimension, PrsDim_Relation) diff --git a/src/PrsDim/PrsDim_Chamf3dDimension.hxx b/src/PrsDim/PrsDim_Chamf3dDimension.hxx index dd56ab594b..2046b40ed9 100644 --- a/src/PrsDim/PrsDim_Chamf3dDimension.hxx +++ b/src/PrsDim/PrsDim_Chamf3dDimension.hxx @@ -17,7 +17,6 @@ #ifndef _PrsDim_Chamf3dDimension_HeaderFile #define _PrsDim_Chamf3dDimension_HeaderFile -#include #include #include #include diff --git a/src/PrsDim/PrsDim_ConcentricRelation.cxx b/src/PrsDim/PrsDim_ConcentricRelation.cxx index 379e6ed0de..807b6cd366 100644 --- a/src/PrsDim/PrsDim_ConcentricRelation.cxx +++ b/src/PrsDim/PrsDim_ConcentricRelation.cxx @@ -21,7 +21,6 @@ #include #include #include -#include #include #include #include @@ -33,7 +32,6 @@ #include #include #include -#include #include #include #include diff --git a/src/PrsDim/PrsDim_DiameterDimension.cxx b/src/PrsDim/PrsDim_DiameterDimension.cxx index 0c4ddf4c69..871d2ac141 100644 --- a/src/PrsDim/PrsDim_DiameterDimension.cxx +++ b/src/PrsDim/PrsDim_DiameterDimension.cxx @@ -23,7 +23,6 @@ #include #include #include -#include IMPLEMENT_STANDARD_RTTIEXT(PrsDim_DiameterDimension, PrsDim_Dimension) diff --git a/src/PrsDim/PrsDim_Dimension.cxx b/src/PrsDim/PrsDim_Dimension.cxx index 225bf1e109..ca11eccfaa 100644 --- a/src/PrsDim/PrsDim_Dimension.cxx +++ b/src/PrsDim/PrsDim_Dimension.cxx @@ -17,29 +17,23 @@ #include #include -#include #include #include #include #include #include #include -#include #include #include #include -#include #include #include #include #include -#include -#include #include #include #include #include -#include #include #include #include @@ -49,7 +43,6 @@ #include #include #include -#include #include #include #include @@ -58,7 +51,6 @@ #include #include #include -#include #include #include #include @@ -67,9 +59,7 @@ #include #include #include -#include #include -#include #include #include diff --git a/src/PrsDim/PrsDim_Dimension.hxx b/src/PrsDim/PrsDim_Dimension.hxx index 13bf0c6e3d..d6169a8255 100644 --- a/src/PrsDim/PrsDim_Dimension.hxx +++ b/src/PrsDim/PrsDim_Dimension.hxx @@ -16,27 +16,21 @@ #ifndef _PrsDim_Dimension_HeaderFile #define _PrsDim_Dimension_HeaderFile -#include #include #include #include #include #include -#include #include #include #include -#include #include -#include #include #include #include -#include #include #include #include -#include #include #include #include diff --git a/src/PrsDim/PrsDim_DimensionOwner.cxx b/src/PrsDim/PrsDim_DimensionOwner.cxx index 588e642706..a2bd35015f 100644 --- a/src/PrsDim/PrsDim_DimensionOwner.cxx +++ b/src/PrsDim/PrsDim_DimensionOwner.cxx @@ -21,7 +21,6 @@ #include #include #include -#include IMPLEMENT_STANDARD_RTTIEXT(PrsDim_DimensionOwner, SelectMgr_EntityOwner) diff --git a/src/PrsDim/PrsDim_DimensionOwner.hxx b/src/PrsDim/PrsDim_DimensionOwner.hxx index 7dd1a914a0..18172a6491 100644 --- a/src/PrsDim/PrsDim_DimensionOwner.hxx +++ b/src/PrsDim/PrsDim_DimensionOwner.hxx @@ -18,14 +18,11 @@ #define _PrsDim_DimensionOwner_HeaderFile #include -#include #include #include #include #include -#include -#include class SelectMgr_SelectableObject; class PrsMgr_PresentationManager; diff --git a/src/PrsDim/PrsDim_EllipseRadiusDimension.cxx b/src/PrsDim/PrsDim_EllipseRadiusDimension.cxx index 59262acf5e..1072eaaf75 100644 --- a/src/PrsDim/PrsDim_EllipseRadiusDimension.cxx +++ b/src/PrsDim/PrsDim_EllipseRadiusDimension.cxx @@ -30,15 +30,12 @@ #include #include #include -#include #include #include #include #include -#include #include #include -#include #include #include #include diff --git a/src/PrsDim/PrsDim_EqualDistanceRelation.cxx b/src/PrsDim/PrsDim_EqualDistanceRelation.cxx index 48a5a68e44..830edbb9ba 100644 --- a/src/PrsDim/PrsDim_EqualDistanceRelation.cxx +++ b/src/PrsDim/PrsDim_EqualDistanceRelation.cxx @@ -21,7 +21,6 @@ #include #include #include -#include #include #include #include @@ -29,7 +28,6 @@ #include #include #include -#include #include #include #include @@ -41,7 +39,6 @@ #include #include #include -#include #include #include #include diff --git a/src/PrsDim/PrsDim_EqualRadiusRelation.cxx b/src/PrsDim/PrsDim_EqualRadiusRelation.cxx index ef6cf4b30c..cd3d32c0eb 100644 --- a/src/PrsDim/PrsDim_EqualRadiusRelation.cxx +++ b/src/PrsDim/PrsDim_EqualRadiusRelation.cxx @@ -25,7 +25,6 @@ #include #include #include -#include #include #include #include @@ -33,7 +32,6 @@ #include #include #include -#include #include #include #include diff --git a/src/PrsDim/PrsDim_FixRelation.cxx b/src/PrsDim/PrsDim_FixRelation.cxx index 0ebf8e3d21..b75a001d00 100644 --- a/src/PrsDim/PrsDim_FixRelation.cxx +++ b/src/PrsDim/PrsDim_FixRelation.cxx @@ -21,7 +21,6 @@ #include #include #include -#include #include #include #include @@ -38,12 +37,9 @@ #include #include #include -#include -#include #include #include #include -#include #include #include #include diff --git a/src/PrsDim/PrsDim_FixRelation.hxx b/src/PrsDim/PrsDim_FixRelation.hxx index 4de0383e91..448320563e 100644 --- a/src/PrsDim/PrsDim_FixRelation.hxx +++ b/src/PrsDim/PrsDim_FixRelation.hxx @@ -17,7 +17,6 @@ #ifndef _PrsDim_FixRelation_HeaderFile #define _PrsDim_FixRelation_HeaderFile -#include #include #include #include diff --git a/src/PrsDim/PrsDim_IdenticRelation.cxx b/src/PrsDim/PrsDim_IdenticRelation.cxx index 73c64f7d9e..abdd768f77 100644 --- a/src/PrsDim/PrsDim_IdenticRelation.cxx +++ b/src/PrsDim/PrsDim_IdenticRelation.cxx @@ -32,17 +32,13 @@ #include #include #include -#include -#include #include #include #include #include #include -#include #include #include -#include #include #include #include diff --git a/src/PrsDim/PrsDim_LengthDimension.hxx b/src/PrsDim/PrsDim_LengthDimension.hxx index c2b20f3ea9..c015a80ba9 100644 --- a/src/PrsDim/PrsDim_LengthDimension.hxx +++ b/src/PrsDim/PrsDim_LengthDimension.hxx @@ -15,14 +15,11 @@ #define _PrsDim_LengthDimension_HeaderFile #include -#include #include #include #include #include -#include #include -#include DEFINE_STANDARD_HANDLE (PrsDim_LengthDimension, PrsDim_Dimension) diff --git a/src/PrsDim/PrsDim_MaxRadiusDimension.cxx b/src/PrsDim/PrsDim_MaxRadiusDimension.cxx index 303850cd09..dd4a46c334 100644 --- a/src/PrsDim/PrsDim_MaxRadiusDimension.cxx +++ b/src/PrsDim/PrsDim_MaxRadiusDimension.cxx @@ -14,45 +14,30 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -#include - #include #include #include -#include #include #include -#include #include #include #include -#include -#include -#include -#include #include #include #include #include -#include #include #include #include -#include #include #include #include -#include -#include #include #include #include #include #include -#include -#include #include -#include #include IMPLEMENT_STANDARD_RTTIEXT(PrsDim_MaxRadiusDimension, PrsDim_EllipseRadiusDimension) diff --git a/src/PrsDim/PrsDim_MidPointRelation.cxx b/src/PrsDim/PrsDim_MidPointRelation.cxx index 8975ed753a..74cec7d3bb 100644 --- a/src/PrsDim/PrsDim_MidPointRelation.cxx +++ b/src/PrsDim/PrsDim_MidPointRelation.cxx @@ -18,16 +18,13 @@ #include #include #include -#include #include #include -#include #include #include #include #include #include -#include #include #include #include @@ -36,16 +33,11 @@ #include #include #include -#include -#include -#include #include #include #include #include #include -#include -#include #include #include #include diff --git a/src/PrsDim/PrsDim_MinRadiusDimension.cxx b/src/PrsDim/PrsDim_MinRadiusDimension.cxx index 9c8df5892a..85a0398439 100644 --- a/src/PrsDim/PrsDim_MinRadiusDimension.cxx +++ b/src/PrsDim/PrsDim_MinRadiusDimension.cxx @@ -22,37 +22,25 @@ #include #include #include -#include #include #include #include -#include -#include -#include -#include #include #include #include #include -#include #include #include #include -#include #include #include #include -#include -#include #include #include #include #include #include -#include -#include #include -#include #include IMPLEMENT_STANDARD_RTTIEXT(PrsDim_MinRadiusDimension, PrsDim_EllipseRadiusDimension) diff --git a/src/PrsDim/PrsDim_OffsetDimension.cxx b/src/PrsDim/PrsDim_OffsetDimension.cxx index 5a05524ac1..3a4ba3ad98 100644 --- a/src/PrsDim/PrsDim_OffsetDimension.cxx +++ b/src/PrsDim/PrsDim_OffsetDimension.cxx @@ -35,19 +35,15 @@ #include #include #include -#include #include #include -#include #include #include #include #include #include -#include #include #include -#include #include #include #include diff --git a/src/PrsDim/PrsDim_ParallelRelation.cxx b/src/PrsDim/PrsDim_ParallelRelation.cxx index bee2dbba84..e5aa1e995f 100644 --- a/src/PrsDim/PrsDim_ParallelRelation.cxx +++ b/src/PrsDim/PrsDim_ParallelRelation.cxx @@ -19,7 +19,6 @@ #include #include #include -#include #include #include #include @@ -27,13 +26,10 @@ #include #include #include -#include #include #include -#include #include #include -#include #include #include #include @@ -41,9 +37,7 @@ #include #include #include -#include #include -#include #include #include #include diff --git a/src/PrsDim/PrsDim_PerpendicularRelation.cxx b/src/PrsDim/PrsDim_PerpendicularRelation.cxx index d9b889c2b2..0161b5d4e9 100644 --- a/src/PrsDim/PrsDim_PerpendicularRelation.cxx +++ b/src/PrsDim/PrsDim_PerpendicularRelation.cxx @@ -28,10 +28,8 @@ #include #include #include -#include #include #include -#include #include #include #include @@ -40,12 +38,9 @@ #include #include #include -#include #include -#include #include #include -#include IMPLEMENT_STANDARD_RTTIEXT(PrsDim_PerpendicularRelation, PrsDim_Relation) diff --git a/src/PrsDim/PrsDim_Relation.cxx b/src/PrsDim/PrsDim_Relation.cxx index 90117b459a..d2726741f5 100644 --- a/src/PrsDim/PrsDim_Relation.cxx +++ b/src/PrsDim/PrsDim_Relation.cxx @@ -22,28 +22,21 @@ #include #include #include -#include #include #include #include -#include -#include #include -#include -#include #include #include #include #include #include #include -#include #include #include #include #include #include -#include #include #include #include diff --git a/src/PrsDim/PrsDim_Relation.hxx b/src/PrsDim/PrsDim_Relation.hxx index 0012cbb7b5..f4319d3e08 100644 --- a/src/PrsDim/PrsDim_Relation.hxx +++ b/src/PrsDim/PrsDim_Relation.hxx @@ -17,7 +17,6 @@ #ifndef _PrsDim_Relation_HeaderFile #define _PrsDim_Relation_HeaderFile -#include #include #include #include diff --git a/src/PrsDim/PrsDim_SymmetricRelation.cxx b/src/PrsDim/PrsDim_SymmetricRelation.cxx index ae0c8fee49..252d3df144 100644 --- a/src/PrsDim/PrsDim_SymmetricRelation.cxx +++ b/src/PrsDim/PrsDim_SymmetricRelation.cxx @@ -19,22 +19,18 @@ #include #include #include -#include #include #include #include #include #include #include -#include -#include #include #include #include #include #include #include -#include #include #include #include @@ -42,7 +38,6 @@ #include #include #include -#include #include #include diff --git a/src/PrsDim/PrsDim_SymmetricRelation.hxx b/src/PrsDim/PrsDim_SymmetricRelation.hxx index 679fcb5bbb..a5bf842a9b 100644 --- a/src/PrsDim/PrsDim_SymmetricRelation.hxx +++ b/src/PrsDim/PrsDim_SymmetricRelation.hxx @@ -17,7 +17,6 @@ #ifndef _PrsDim_SymmetricRelation_HeaderFile #define _PrsDim_SymmetricRelation_HeaderFile -#include #include #include #include diff --git a/src/PrsDim/PrsDim_TangentRelation.cxx b/src/PrsDim/PrsDim_TangentRelation.cxx index 12bbcaa9ce..756ee39b45 100644 --- a/src/PrsDim/PrsDim_TangentRelation.cxx +++ b/src/PrsDim/PrsDim_TangentRelation.cxx @@ -17,8 +17,6 @@ #include #include -#include -#include #include #include #include @@ -29,9 +27,7 @@ #include #include #include -#include #include -#include #include #include #include @@ -39,8 +35,6 @@ #include #include #include -#include -#include #include #include #include diff --git a/src/PrsMgr/PrsMgr_ListOfPresentableObjects.hxx b/src/PrsMgr/PrsMgr_ListOfPresentableObjects.hxx index 13d2ca5638..d39531dfa0 100644 --- a/src/PrsMgr/PrsMgr_ListOfPresentableObjects.hxx +++ b/src/PrsMgr/PrsMgr_ListOfPresentableObjects.hxx @@ -17,7 +17,6 @@ #define _PrsMgr_ListOfPresentableObjects_HeaderFile #include -#include class PrsMgr_PresentableObject; // use forward declaration since PrsMgr_PresentableObject.hxx uses PrsMgr_ListOfPresentableObjects typedef NCollection_List PrsMgr_ListOfPresentableObjects; diff --git a/src/PrsMgr/PrsMgr_PresentableObject.hxx b/src/PrsMgr/PrsMgr_PresentableObject.hxx index 8e75fbf369..bf739ef2b9 100644 --- a/src/PrsMgr/PrsMgr_PresentableObject.hxx +++ b/src/PrsMgr/PrsMgr_PresentableObject.hxx @@ -20,10 +20,6 @@ #include #include #include -#include -#include -#include -#include #include #include #include diff --git a/src/PrsMgr/PrsMgr_Presentation.cxx b/src/PrsMgr/PrsMgr_Presentation.cxx index 481f0f0f79..ea606590fb 100644 --- a/src/PrsMgr/PrsMgr_Presentation.cxx +++ b/src/PrsMgr/PrsMgr_Presentation.cxx @@ -14,12 +14,8 @@ #include -#include -#include -#include #include #include -#include #include IMPLEMENT_STANDARD_RTTIEXT(PrsMgr_Presentation, Graphic3d_Structure) diff --git a/src/PrsMgr/PrsMgr_Presentation.hxx b/src/PrsMgr/PrsMgr_Presentation.hxx index e9013924ff..f5065d98a7 100644 --- a/src/PrsMgr/PrsMgr_Presentation.hxx +++ b/src/PrsMgr/PrsMgr_Presentation.hxx @@ -17,7 +17,6 @@ #ifndef _PrsMgr_Presentation_HeaderFile #define _PrsMgr_Presentation_HeaderFile -#include #include class PrsMgr_PresentationManager; diff --git a/src/PrsMgr/PrsMgr_PresentationManager.cxx b/src/PrsMgr/PrsMgr_PresentationManager.cxx index 766d70ed2a..09f5a5bffe 100644 --- a/src/PrsMgr/PrsMgr_PresentationManager.cxx +++ b/src/PrsMgr/PrsMgr_PresentationManager.cxx @@ -15,7 +15,6 @@ #include #include -#include #include #include #include diff --git a/src/PrsMgr/PrsMgr_PresentationManager.hxx b/src/PrsMgr/PrsMgr_PresentationManager.hxx index a33b505410..d47a5980c2 100644 --- a/src/PrsMgr/PrsMgr_PresentationManager.hxx +++ b/src/PrsMgr/PrsMgr_PresentationManager.hxx @@ -20,7 +20,6 @@ #include #include #include -#include class Graphic3d_Structure; typedef Graphic3d_Structure Prs3d_Presentation; diff --git a/src/PrsMgr/PrsMgr_Presentations.hxx b/src/PrsMgr/PrsMgr_Presentations.hxx index a77adb1a88..03926c0aab 100644 --- a/src/PrsMgr/PrsMgr_Presentations.hxx +++ b/src/PrsMgr/PrsMgr_Presentations.hxx @@ -17,7 +17,6 @@ #ifndef PrsMgr_Presentations_HeaderFile #define PrsMgr_Presentations_HeaderFile -#include #include class PrsMgr_Presentation; diff --git a/src/QABugs/QABugs_1.cxx b/src/QABugs/QABugs_1.cxx index f58eff1888..01b5566821 100644 --- a/src/QABugs/QABugs_1.cxx +++ b/src/QABugs/QABugs_1.cxx @@ -17,17 +17,13 @@ #include #include -#include -#include #include #include #include #include -#include #include -#include #include #include #include @@ -47,7 +43,6 @@ Standard_IMPORT Draw_Viewer dout; #include #include -#include #include #include @@ -58,9 +53,7 @@ Standard_EXPORT ViewerTest_DoubleMapOfInteractiveAndName& GetMapOfAIS(); #endif #include -#include #include -#include #include #include @@ -343,7 +336,6 @@ static Standard_Integer OCC74bug_get (Draw_Interpretor& di, Standard_Integer arg } #include -#include #include #include #include @@ -391,7 +383,6 @@ static Standard_Integer OCC361bug (Draw_Interpretor& di, Standard_Integer nb, co #include #include #include -#include //======================================================================= //function : OCC30182 //purpose : Testing different interfaces of Image_AlienPixMap::Load() diff --git a/src/QABugs/QABugs_10.cxx b/src/QABugs/QABugs_10.cxx index b8041d8b7e..524ef59741 100644 --- a/src/QABugs/QABugs_10.cxx +++ b/src/QABugs/QABugs_10.cxx @@ -20,12 +20,9 @@ #include #include #include -#include -#include #include #include -#include #include #include #include @@ -42,10 +39,8 @@ #include #include #include -#include #include #include -#include #include #include diff --git a/src/QABugs/QABugs_11.cxx b/src/QABugs/QABugs_11.cxx index 6ab063d9f3..81e94fb874 100644 --- a/src/QABugs/QABugs_11.cxx +++ b/src/QABugs/QABugs_11.cxx @@ -33,18 +33,13 @@ #include #include #include -#include #include #include #include #include #include -#include #include #include -#include -#include -#include #include #include #include @@ -54,14 +49,11 @@ #include #include #include -#include #include -#include #include #include #include #include -#include #include #include #include @@ -79,10 +71,7 @@ #include #include #include -#include -#include #include -#include #include #include #include @@ -92,9 +81,16 @@ #include #include #include -#include #include #include +#include +#include +#include +#include +#include +#include +#include +#include #if ! defined(_WIN32) extern ViewerTest_DoubleMapOfInteractiveAndName& GetMapOfAIS(); @@ -241,7 +237,6 @@ static int BUC60610(Draw_Interpretor& di, Standard_Integer argc, const char ** a //OCC105 #include -#include #include #include @@ -371,11 +366,10 @@ static int pipe_OCC9 (Draw_Interpretor& di, // OCC125 // usage : OCC125 shell //====================================================================== -#include Standard_Integer OCC125(Draw_Interpretor& di , - Standard_Integer n, - const char ** a) + Standard_Integer n, + const char ** a) { if (n!=2) { di<<" Use OCC125 shell"; @@ -421,10 +415,10 @@ Standard_Integer OCC125(Draw_Interpretor& di , } #include -#include + Standard_Integer OCC157(Draw_Interpretor& di, - Standard_Integer n, - const char ** a) + Standard_Integer n, + const char ** a) //static Standard_Integer findplanarsurface(Draw_Interpretor&, Standard_Integer n, const char ** a) { if (n<3) { @@ -457,11 +451,8 @@ Standard_Integer OCC157(Draw_Interpretor& di, // #include #include -#include #include -#include #include -#include #include @@ -671,10 +662,7 @@ for(;wex.More();wex.Next()) } -#include #include -#include -#include static Standard_Integer OCC381_Save (Draw_Interpretor& di, Standard_Integer nb, const char ** a) { @@ -887,8 +875,6 @@ static Standard_Integer OCC277bug (Draw_Interpretor& di, Standard_Integer nb, co #include #include #include -#include -#include #include #include @@ -1124,7 +1110,6 @@ static Standard_Integer OCC22 (Draw_Interpretor& di, Standard_Integer argc, cons #include #include -#include #include #include @@ -1204,7 +1189,6 @@ static Standard_Integer OCC369(Draw_Interpretor& di, Standard_Integer argc, cons return 0; } -#include #include static Standard_Integer OCC524 (Draw_Interpretor& di, Standard_Integer argc, const char ** argv) { @@ -1277,7 +1261,6 @@ static Standard_Integer OCC525(Draw_Interpretor& di, Standard_Integer /*argc*/, return 0; } -#include #include #include #include @@ -1600,8 +1583,6 @@ static Standard_Integer OCC921 (Draw_Interpretor& di, Standard_Integer argc, con #include #include -#include -#include //======================================================================= //function : OCC902 //purpose : @@ -1652,7 +1633,6 @@ static Standard_Integer OCC902(Draw_Interpretor& di, Standard_Integer argc, cons #include #include -#include #include //======================================================================= //function : OCC1029_AISTransparency @@ -3179,11 +3159,6 @@ static Standard_Integer OCC15755 (Draw_Interpretor& di, Standard_Integer argc, c #include #include // Iterators -#include -#include -#include -#include -#include // Attributes #include #include @@ -4480,14 +4455,9 @@ static Standard_Integer OCC12584 (Draw_Interpretor& di, Standard_Integer argc, c } #include -#include -#include #include #include -#include -#include #include -#include #include static Standard_Integer OCC20766 (Draw_Interpretor& di, Standard_Integer argc, const char ** argv) diff --git a/src/QABugs/QABugs_12.cxx b/src/QABugs/QABugs_12.cxx index f8b3794665..2b47986d20 100644 --- a/src/QABugs/QABugs_12.cxx +++ b/src/QABugs/QABugs_12.cxx @@ -18,10 +18,7 @@ #include #include #include -#include #include -#include -#include #include #include @@ -32,7 +29,6 @@ #include #include #include -#include #include #include #include diff --git a/src/QABugs/QABugs_13.cxx b/src/QABugs/QABugs_13.cxx index 23dd840eb4..59e15d61e5 100644 --- a/src/QABugs/QABugs_13.cxx +++ b/src/QABugs/QABugs_13.cxx @@ -18,9 +18,7 @@ #include #include #include -#include #include -#include #include #include @@ -35,11 +33,9 @@ #include #include #include -#include #include #include #include -#include #include #include #include @@ -385,7 +381,6 @@ static Standard_Integer OCC332bug (Draw_Interpretor& di, Standard_Integer argc, } #include -#include #include #include diff --git a/src/QABugs/QABugs_14.cxx b/src/QABugs/QABugs_14.cxx index a72520c571..2db1f5baf4 100644 --- a/src/QABugs/QABugs_14.cxx +++ b/src/QABugs/QABugs_14.cxx @@ -28,18 +28,15 @@ #include #include #include -#include #include #include #include -#include #include #include #include #include #include #include -#include #include #include #include @@ -51,9 +48,7 @@ #include #include #include -#include #include -#include #include #include #include @@ -62,7 +57,8 @@ #include #include #include -#include +#include +#include static Standard_Integer BUC60897 (Draw_Interpretor& di, Standard_Integer /*argc*/, const char ** /*argv*/) { @@ -848,7 +844,6 @@ static Standard_Integer OCC1919_set (Draw_Interpretor& di, Standard_Integer argc return 0; } #include -#include #include #include static Standard_Integer OCC1919_real (Draw_Interpretor& di, Standard_Integer argc, const char ** argv) @@ -936,7 +931,6 @@ static Standard_Integer OCC2932_SetCurrent (Draw_Interpretor& di, Standard_Integ return 0; } -#include static Standard_Integer OCC2932_SetExpression (Draw_Interpretor& di, Standard_Integer argc, const char ** argv) { if( argc != 4) diff --git a/src/QABugs/QABugs_15.cxx b/src/QABugs/QABugs_15.cxx index a0c5e2de24..fd99f1bba2 100644 --- a/src/QABugs/QABugs_15.cxx +++ b/src/QABugs/QABugs_15.cxx @@ -17,12 +17,8 @@ #include #include -#include -#include #include #include -#include -#include #include diff --git a/src/QABugs/QABugs_16.cxx b/src/QABugs/QABugs_16.cxx index 7298c8d9e5..492e2e1436 100644 --- a/src/QABugs/QABugs_16.cxx +++ b/src/QABugs/QABugs_16.cxx @@ -24,17 +24,12 @@ #include #include -#include #include -#include -#include #include #include #include #include #include -#include -#include #include #include @@ -61,12 +56,8 @@ #include #include -#include - #include -#include - #include #include #include diff --git a/src/QABugs/QABugs_17.cxx b/src/QABugs/QABugs_17.cxx index 9b406467de..b02e62e50f 100644 --- a/src/QABugs/QABugs_17.cxx +++ b/src/QABugs/QABugs_17.cxx @@ -29,17 +29,14 @@ #include #include -#include #include #include #include #include -#include #include #include #include #include -#include #include #include #include @@ -47,13 +44,7 @@ #include #include #include -#include -#include -#include -#include #include -#include -#include #include #include #include @@ -64,13 +55,8 @@ #include #include #include -#include -#include -#include -#include #include -#include static Standard_Integer BUC60842 (Draw_Interpretor& di, Standard_Integer /*argc*/,const char ** /*argv*/) { @@ -688,7 +674,6 @@ static Standard_Integer BUILDEVOL(Draw_Interpretor& di, return 1; } -#include #include #include #include @@ -900,9 +885,6 @@ static Standard_Integer OCC814 (Draw_Interpretor& di, Standard_Integer argc,cons return 0; } -#include -#include -#include #include //======================================================================= //function : OCC884 diff --git a/src/QABugs/QABugs_18.cxx b/src/QABugs/QABugs_18.cxx index 3b0224f36c..3898fac925 100644 --- a/src/QABugs/QABugs_18.cxx +++ b/src/QABugs/QABugs_18.cxx @@ -18,12 +18,9 @@ #include #include #include -#include #include -#include #include -#include #include #include diff --git a/src/QABugs/QABugs_19.cxx b/src/QABugs/QABugs_19.cxx index 8dc0e69aaa..2e0e7fbf1c 100644 --- a/src/QABugs/QABugs_19.cxx +++ b/src/QABugs/QABugs_19.cxx @@ -32,22 +32,15 @@ #include #include #include -#include -#include -#include #include #include #include -#include #include #include #include #include -#include #include -#include #include -#include #include #include #include @@ -60,6 +53,13 @@ #include #include #include +#include +#include +#include +#include +#include +#include +#include #ifdef HAVE_TBB Standard_DISABLE_DEPRECATION_WARNINGS @@ -288,7 +288,6 @@ Standard_Integer OCC22595 (Draw_Interpretor& di, Standard_Integer /*argc*/, cons return 0; } -#include #include #include #include @@ -389,7 +388,6 @@ static Standard_Integer OCC23774(Draw_Interpretor& di, Standard_Integer n, const #include #include -#include #include struct GeomConvertTest_Data @@ -465,8 +463,6 @@ static Standard_Integer OCC23952sweep (Draw_Interpretor& di, Standard_Integer ar return 0; } -#include - struct GeomIntSSTest_Data { GeomIntSSTest_Data() : nbsol(0) {} @@ -559,11 +555,8 @@ static Standard_Integer OCC23683 (Draw_Interpretor& di, Standard_Integer argc,co } #include -#include #include #include -#include -#include #include #include @@ -617,7 +610,6 @@ static int test_offset(Draw_Interpretor& di, Standard_Integer argc, const char** #include #include -#include #include //======================================================================= //function : OCC24008 @@ -654,7 +646,6 @@ static Standard_Integer OCC24008 (Draw_Interpretor& di, Standard_Integer argc, c return 0; } -#include #include //======================================================================= //function : OCC23945 @@ -1316,7 +1307,6 @@ static Standard_Integer OCC24086 (Draw_Interpretor& di, Standard_Integer argc, c } #include -#include #include #include #include @@ -1348,7 +1338,6 @@ static Standard_Integer OCC24945 (Draw_Interpretor& di, Standard_Integer argc, c return 0; } -#include #include #include #include @@ -1512,9 +1501,7 @@ static Standard_Integer OCC24271 (Draw_Interpretor& di, di << "Checking " #val1 " == Standard_True" << \ ((val1) == Standard_True ? ": OK\n" : ": Error\n") -#include #include -#include namespace { static Handle(Geom_ConicalSurface) CreateCone (const gp_Pnt& theLoc, @@ -1685,7 +1672,6 @@ struct QABugs_NHandleClass }; #include -#include #include static Standard_Integer OCC23951 (Draw_Interpretor& di, Standard_Integer argc, const char ** argv) { @@ -2201,8 +2187,6 @@ static Standard_Integer OCC25004 (Draw_Interpretor& theDI, } #include -#include -#include #include #define THE_QATEST_DOC_FORMAT "My Proprietary Format" @@ -2940,7 +2924,6 @@ static Standard_Integer OCC25413 (Draw_Interpretor& di, Standard_Integer narg , #include // -#include #include #include #include @@ -3128,7 +3111,6 @@ static Standard_Integer OCC25545 (Draw_Interpretor& di, //purpose : //======================================================================= #include -#include #include #include #include @@ -3855,9 +3837,7 @@ static Standard_Integer OCC25574 (Draw_Interpretor& theDI, Standard_Integer /*ar return 0; } -#include #include -#include #include //======================================================================= @@ -3934,7 +3914,6 @@ static Standard_Integer OCC26448 (Draw_Interpretor& theDI, Standard_Integer, con //function : OCC26407 //purpose : //======================================================================= -#include #include #include #include @@ -4329,9 +4308,6 @@ static Standard_Integer OCC26313(Draw_Interpretor& di,Standard_Integer n,const c //purpose : check number of intersection points //======================================================================= #include -#include -#include -#include #include Standard_Integer OCC26525 (Draw_Interpretor& di, Standard_Integer n, diff --git a/src/QABugs/QABugs_2.cxx b/src/QABugs/QABugs_2.cxx index 251825206c..a04c80caee 100644 --- a/src/QABugs/QABugs_2.cxx +++ b/src/QABugs/QABugs_2.cxx @@ -18,9 +18,7 @@ #include #include #include -#include #include -#include #include #include #include @@ -32,7 +30,6 @@ #include #include #include -#include #include #include diff --git a/src/QABugs/QABugs_20.cxx b/src/QABugs/QABugs_20.cxx index c16b32d3e3..a70b333fdf 100644 --- a/src/QABugs/QABugs_20.cxx +++ b/src/QABugs/QABugs_20.cxx @@ -15,19 +15,15 @@ #include -#include #include #include #include #include -#include -#include #include -#include #include #include +#include #include -#include #include #include #include @@ -35,12 +31,12 @@ #include #include +#include #include #include -#include +#include #include #include -#include #include #include @@ -58,7 +54,6 @@ #include #include -#include #include #include @@ -66,7 +61,10 @@ #include #include +#include #include +#include +#include #include @@ -1955,10 +1953,7 @@ static Standard_Integer OCC27357(Draw_Interpretor& theDI, return 0; } #include -#include #include -#include -#include #include //======================================================================= //function : OCC26270 @@ -2298,12 +2293,9 @@ static Standard_Integer OCC28389(Draw_Interpretor& di, Standard_Integer argc, co } #include -#include -#include #include #include #include -#include static Standard_Integer OCC28594(Draw_Interpretor& di, Standard_Integer argc, const char** argv) { @@ -2388,7 +2380,6 @@ static Standard_Integer OCC28829 (Draw_Interpretor&, Standard_Integer, const cha #include #include #include -#include #include #ifdef max @@ -2570,7 +2561,6 @@ static Standard_Integer OCC28131 (Draw_Interpretor&, Standard_Integer theNbArgs, return 0; } #include -#include #include #include #include @@ -2811,7 +2801,6 @@ static Standard_Integer OCC29371 (Draw_Interpretor& di, Standard_Integer n, cons #include #include #include -#include // check that copying of empty maps does not allocate extra memory template void AllocDummyArr (Draw_Interpretor& theDI, int theN1, int theN2) @@ -3392,7 +3381,6 @@ static Standard_Integer QAEndsWith(Draw_Interpretor& di, Standard_Integer n, con } //Class is used in OCC30435 -#include #include class CurveEvaluator : public AppCont_Function @@ -3568,7 +3556,6 @@ static Standard_Integer OCC30708_2 (Draw_Interpretor& di, Standard_Integer, cons //function : OCC30747 //purpose : //======================================================================= -#include #include #include #include diff --git a/src/QABugs/QABugs_3.cxx b/src/QABugs/QABugs_3.cxx index 4ade954498..4475f851a3 100644 --- a/src/QABugs/QABugs_3.cxx +++ b/src/QABugs/QABugs_3.cxx @@ -16,16 +16,13 @@ #include #include #include -#include #include +#include #include #include -#include #include #include #include -#include -#include #include #include @@ -108,7 +105,6 @@ static Standard_Integer BUC60632(Draw_Interpretor& di, Standard_Integer /*n*/, c return 0; } -#include #include static Standard_Integer BUC60652(Draw_Interpretor& di, Standard_Integer argc, const char ** argv ) @@ -124,18 +120,14 @@ static Standard_Integer BUC60652(Draw_Interpretor& di, Standard_Integer argc, co return 0; } -#include #include -#include #include #include -#include #include #include -#include #include static Standard_Integer BUC60729 (Draw_Interpretor& /*di*/,Standard_Integer /*argc*/, const char ** /*argv*/ ) @@ -483,7 +475,6 @@ static int OCC10006(Draw_Interpretor& di, Standard_Integer argc, const char ** a return 0; } -#include #include static Standard_Integer BUC60856(Draw_Interpretor& di, Standard_Integer /*argc*/, const char ** argv ) @@ -830,8 +821,6 @@ static Standard_Integer BUC60874(Draw_Interpretor& /*di*/, Standard_Integer /*ar #include #include -#include -#include #include #include #include diff --git a/src/QABugs/QABugs_5.cxx b/src/QABugs/QABugs_5.cxx index 58711f460f..e59c3d31b3 100644 --- a/src/QABugs/QABugs_5.cxx +++ b/src/QABugs/QABugs_5.cxx @@ -17,13 +17,9 @@ #include #include -#include #include -#include -#include #include #include -#include #include #include #include diff --git a/src/QABugs/QABugs_6.cxx b/src/QABugs/QABugs_6.cxx index b34436b15d..434f8b2051 100644 --- a/src/QABugs/QABugs_6.cxx +++ b/src/QABugs/QABugs_6.cxx @@ -17,14 +17,9 @@ #include #include -#include -#include #include #include -#include -#include -#include #include #include diff --git a/src/QABugs/QABugs_7.cxx b/src/QABugs/QABugs_7.cxx index 0568f84fe7..9c9e676a62 100644 --- a/src/QABugs/QABugs_7.cxx +++ b/src/QABugs/QABugs_7.cxx @@ -16,15 +16,10 @@ #include #include -#include #include #include -#include -#include -#include #include -#include #include #include #include diff --git a/src/QABugs/QABugs_8.cxx b/src/QABugs/QABugs_8.cxx index 075003b3d2..189c3239c0 100644 --- a/src/QABugs/QABugs_8.cxx +++ b/src/QABugs/QABugs_8.cxx @@ -18,19 +18,16 @@ #include #include #include -#include #include #include #include #include -#include #include #include #include -#include #include diff --git a/src/QABugs/QABugs_9.cxx b/src/QABugs/QABugs_9.cxx index 22328acce4..7de27b11c9 100644 --- a/src/QABugs/QABugs_9.cxx +++ b/src/QABugs/QABugs_9.cxx @@ -26,7 +26,6 @@ #include #include -#include #include #include @@ -66,13 +65,11 @@ static Standard_Integer BUC60857 (Draw_Interpretor& di, Standard_Integer /*argc* return 0; } -#include #include #include #include #include #include -#include static Standard_Integer OCC24303(Draw_Interpretor& di, Standard_Integer n, const char** a) { diff --git a/src/QABugs/QABugs_BVH.cxx b/src/QABugs/QABugs_BVH.cxx index 54042c3b03..699e105a3f 100644 --- a/src/QABugs/QABugs_BVH.cxx +++ b/src/QABugs/QABugs_BVH.cxx @@ -15,7 +15,6 @@ #include -#include #include #include @@ -23,7 +22,6 @@ #include #include -#include #include #include #include diff --git a/src/QABugs/QABugs_PresentableObject.cxx b/src/QABugs/QABugs_PresentableObject.cxx index 4edd72d08e..37717fd8dc 100644 --- a/src/QABugs/QABugs_PresentableObject.cxx +++ b/src/QABugs/QABugs_PresentableObject.cxx @@ -14,15 +14,7 @@ // commercial license or contractual agreement. -#include -#include #include -#include -#include -#include -#include -#include -#include #include #include #include diff --git a/src/QADNaming/QADNaming.cxx b/src/QADNaming/QADNaming.cxx index 371a287ebd..2b78847b6d 100644 --- a/src/QADNaming/QADNaming.cxx +++ b/src/QADNaming/QADNaming.cxx @@ -18,21 +18,14 @@ #include #include #include -#include #include #include #include -#include -#include -#include #include #include #include -#include -#include #include #include -#include #include #include #include diff --git a/src/QADNaming/QADNaming.hxx b/src/QADNaming/QADNaming.hxx index 56d676d527..e814905c8f 100644 --- a/src/QADNaming/QADNaming.hxx +++ b/src/QADNaming/QADNaming.hxx @@ -24,7 +24,6 @@ #include #include #include -#include #include #include class TopoDS_Shape; diff --git a/src/QADNaming/QADNaming_BasicCommands.cxx b/src/QADNaming/QADNaming_BasicCommands.cxx index 0892a06513..c11564a962 100644 --- a/src/QADNaming/QADNaming_BasicCommands.cxx +++ b/src/QADNaming/QADNaming_BasicCommands.cxx @@ -17,39 +17,22 @@ #include #include #include -#include -#include -#include #include #include #include -#include #include #include #include #include #include -#include -#include #include #include -#include -#include -#include #include #include -#include -#include -#include -#include -#include -#include - -#include //#ifdef _MSC_VER #include //#endif diff --git a/src/QADNaming/QADNaming_IteratorsCommands.cxx b/src/QADNaming/QADNaming_IteratorsCommands.cxx index f89b829386..6b6fa51a4f 100644 --- a/src/QADNaming/QADNaming_IteratorsCommands.cxx +++ b/src/QADNaming/QADNaming_IteratorsCommands.cxx @@ -16,11 +16,9 @@ #include #include -#include #include #include #include -#include #include #include #include diff --git a/src/QADNaming/QADNaming_SelectionCommands.cxx b/src/QADNaming/QADNaming_SelectionCommands.cxx index e9538a772e..31aab546a3 100644 --- a/src/QADNaming/QADNaming_SelectionCommands.cxx +++ b/src/QADNaming/QADNaming_SelectionCommands.cxx @@ -18,20 +18,12 @@ #include -#include -#include -#include #include #include -#include -#include -#include #include -#include #include #include #include -#include #include #include #include @@ -39,11 +31,9 @@ #include #include -#include #include #include #include -#include #include #include #include diff --git a/src/QADNaming/QADNaming_ToolsCommands.cxx b/src/QADNaming/QADNaming_ToolsCommands.cxx index 4876f79253..aed84fb665 100644 --- a/src/QADNaming/QADNaming_ToolsCommands.cxx +++ b/src/QADNaming/QADNaming_ToolsCommands.cxx @@ -14,26 +14,15 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -#include #include #include #include -#include -#include -#include #include -#include -#include #include #include #include -#include -#include #include -#include -#include #include -#include #include diff --git a/src/QANCollection/QANCollection.cxx b/src/QANCollection/QANCollection.cxx index 4a69d8026a..40d922351f 100644 --- a/src/QANCollection/QANCollection.cxx +++ b/src/QANCollection/QANCollection.cxx @@ -16,8 +16,6 @@ #include #include -#include - void QANCollection::Commands (Draw_Interpretor& theCommands) { QANCollection::CommandsTest (theCommands); diff --git a/src/QANCollection/QANCollection_DataMapOfRealPnt.hxx b/src/QANCollection/QANCollection_DataMapOfRealPnt.hxx index 6db179b7d0..d521cac8fd 100644 --- a/src/QANCollection/QANCollection_DataMapOfRealPnt.hxx +++ b/src/QANCollection/QANCollection_DataMapOfRealPnt.hxx @@ -16,7 +16,6 @@ #ifndef QANCollection_DataMapOfRealPnt_HeaderFile #define QANCollection_DataMapOfRealPnt_HeaderFile -#include #include #include #include diff --git a/src/QANCollection/QANCollection_DoubleMapOfRealInteger.hxx b/src/QANCollection/QANCollection_DoubleMapOfRealInteger.hxx index 0c1a2711f4..23d8ab5f78 100644 --- a/src/QANCollection/QANCollection_DoubleMapOfRealInteger.hxx +++ b/src/QANCollection/QANCollection_DoubleMapOfRealInteger.hxx @@ -16,7 +16,6 @@ #ifndef QANCollection_DoubleMapOfRealInteger_HeaderFile #define QANCollection_DoubleMapOfRealInteger_HeaderFile -#include #include #include #include diff --git a/src/QANCollection/QANCollection_Handle.cxx b/src/QANCollection/QANCollection_Handle.cxx index 7be8ef597b..b77bea8f78 100644 --- a/src/QANCollection/QANCollection_Handle.cxx +++ b/src/QANCollection/QANCollection_Handle.cxx @@ -16,12 +16,10 @@ #include #include -#include #include #include #include #include -#include #include #include #include @@ -32,7 +30,6 @@ #include #include -#include // Auxiliary macro to check and report status. // Note that if() is used to ensure that condition is diff --git a/src/QANCollection/QANCollection_IndexedDataMapOfRealPnt.hxx b/src/QANCollection/QANCollection_IndexedDataMapOfRealPnt.hxx index ab90eb6b8f..ce0500d9e1 100644 --- a/src/QANCollection/QANCollection_IndexedDataMapOfRealPnt.hxx +++ b/src/QANCollection/QANCollection_IndexedDataMapOfRealPnt.hxx @@ -16,7 +16,6 @@ #ifndef QANCollection_IndexedDataMapOfRealPnt_HeaderFile #define QANCollection_IndexedDataMapOfRealPnt_HeaderFile -#include #include #include #include diff --git a/src/QANCollection/QANCollection_Perf.cxx b/src/QANCollection/QANCollection_Perf.cxx index 8183bfd069..95b08578ad 100644 --- a/src/QANCollection/QANCollection_Perf.cxx +++ b/src/QANCollection/QANCollection_Perf.cxx @@ -45,14 +45,12 @@ // These are: TheItemType, TheKey1Type, TheKey2Type // So must be defined ::HashCode and ::IsEqual too -#include #include ////////////////////////////////DEFINE_ARRAY1(QANCollection_Array1,QANCollection_BaseCol,ItemType) ////////////////////////////////DEFINE_HARRAY1(QANCollection_HArray1,QANCollection_Array1) DEFINE_ARRAY1(QANCollection_Array1Perf,QANCollection_BaseColPerf,ItemType) DEFINE_HARRAY1(QANCollection_HArray1Perf,QANCollection_Array1Perf) -#include #include ////////////////////////////////DEFINE_ARRAY2(QANCollection_Array2,QANCollection_BaseCol,ItemType) ////////////////////////////////DEFINE_HARRAY2(QANCollection_HArray2,QANCollection_Array2) @@ -79,7 +77,6 @@ DEFINE_INDEXEDDATAMAP(QANCollection_IDMapPerf,QANCollection_BaseColPerf,Key1Type ////////////////////////////////DEFINE_LIST(QANCollection_List,QANCollection_BaseCol,ItemType) DEFINE_LIST(QANCollection_ListPerf,QANCollection_BaseColPerf,ItemType) -#include #include ////////////////////////////////DEFINE_SEQUENCE(QANCollection_Sequence,QANCollection_BaseCol,ItemType) ////////////////////////////////DEFINE_HSEQUENCE(QANCollection_HSequence,QANCollection_Sequence) diff --git a/src/QANCollection/QANCollection_Stl.cxx b/src/QANCollection/QANCollection_Stl.cxx index 81528e633d..1b16929711 100644 --- a/src/QANCollection/QANCollection_Stl.cxx +++ b/src/QANCollection/QANCollection_Stl.cxx @@ -21,7 +21,6 @@ #include #include -#include #include #include #include @@ -29,7 +28,6 @@ #include #include #include -#include #include #include diff --git a/src/QANCollection/QANCollection_Test.cxx b/src/QANCollection/QANCollection_Test.cxx index 47b4b47102..b484cafb13 100644 --- a/src/QANCollection/QANCollection_Test.cxx +++ b/src/QANCollection/QANCollection_Test.cxx @@ -32,14 +32,12 @@ #define Key1Type Standard_Real #define Key2Type Standard_Integer -#include #include ////////////////////////////////DEFINE_ARRAY1(QANCollection_Array1,QANCollection_BaseCol,ItemType) ////////////////////////////////DEFINE_HARRAY1(QANCollection_HArray1,QANCollection_Array1) DEFINE_ARRAY1(QANCollection_Array1Func,QANCollection_BaseColFunc,ItemType) DEFINE_HARRAY1(QANCollection_HArray1Func,QANCollection_Array1Func) -#include #include ////////////////////////////////DEFINE_ARRAY2(QANCollection_Array2,QANCollection_BaseCol,ItemType) ////////////////////////////////DEFINE_HARRAY2(QANCollection_HArray2,QANCollection_Array2) @@ -66,7 +64,6 @@ DEFINE_INDEXEDDATAMAP(QANCollection_IDMapFunc,QANCollection_BaseColFunc,Key1Type ////////////////////////////////DEFINE_LIST(QANCollection_List,QANCollection_BaseCol,ItemType) DEFINE_LIST(QANCollection_ListFunc,QANCollection_BaseColFunc,ItemType) -#include #include ////////////////////////////////DEFINE_SEQUENCE(QANCollection_Sequence,QANCollection_BaseCol,ItemType) ////////////////////////////////DEFINE_HSEQUENCE(QANCollection_HSequence,QANCollection_Sequence) diff --git a/src/Quantity/Quantity_Color.cxx b/src/Quantity/Quantity_Color.cxx index 28ccc3cccd..114620bb4e 100644 --- a/src/Quantity/Quantity_Color.cxx +++ b/src/Quantity/Quantity_Color.cxx @@ -21,8 +21,6 @@ #include #include -#include - #define RGBHLS_H_UNDEFINED -1.0 static Standard_Real TheEpsilon = 0.0001; diff --git a/src/Quantity/Quantity_Color.hxx b/src/Quantity/Quantity_Color.hxx index 8a0b224f97..15451507b3 100644 --- a/src/Quantity/Quantity_Color.hxx +++ b/src/Quantity/Quantity_Color.hxx @@ -23,7 +23,6 @@ #include #include -#include #include //! This class allows the definition of an RGB color as triplet of 3 normalized floating point values (red, green, blue). diff --git a/src/Quantity/Quantity_Date.hxx b/src/Quantity/Quantity_Date.hxx index b00a6698ef..0e0ee52478 100644 --- a/src/Quantity/Quantity_Date.hxx +++ b/src/Quantity/Quantity_Date.hxx @@ -21,7 +21,6 @@ #include #include -#include #include class Quantity_Period; diff --git a/src/Quantity/Quantity_DateDefinitionError.hxx b/src/Quantity/Quantity_DateDefinitionError.hxx index 2eaf6d408e..dfa89e80ec 100644 --- a/src/Quantity/Quantity_DateDefinitionError.hxx +++ b/src/Quantity/Quantity_DateDefinitionError.hxx @@ -18,7 +18,6 @@ #define _Quantity_DateDefinitionError_HeaderFile #include -#include #include #include diff --git a/src/Quantity/Quantity_HArray1OfColor.hxx b/src/Quantity/Quantity_HArray1OfColor.hxx index 665d0c7627..7ed3eeb101 100644 --- a/src/Quantity/Quantity_HArray1OfColor.hxx +++ b/src/Quantity/Quantity_HArray1OfColor.hxx @@ -17,7 +17,6 @@ #ifndef Quantity_HArray1OfColor_HeaderFile #define Quantity_HArray1OfColor_HeaderFile -#include #include #include diff --git a/src/Quantity/Quantity_Period.hxx b/src/Quantity/Quantity_Period.hxx index 1b3f8a5bed..7a0f006d71 100644 --- a/src/Quantity/Quantity_Period.hxx +++ b/src/Quantity/Quantity_Period.hxx @@ -21,7 +21,6 @@ #include #include -#include #include //! Manages date intervals. For example, a Period object diff --git a/src/Quantity/Quantity_PeriodDefinitionError.hxx b/src/Quantity/Quantity_PeriodDefinitionError.hxx index 3e71e2304a..9bd9b06f4e 100644 --- a/src/Quantity/Quantity_PeriodDefinitionError.hxx +++ b/src/Quantity/Quantity_PeriodDefinitionError.hxx @@ -18,7 +18,6 @@ #define _Quantity_PeriodDefinitionError_HeaderFile #include -#include #include #include diff --git a/src/RWGltf/RWGltf_CafReader.cxx b/src/RWGltf/RWGltf_CafReader.cxx index af23af338e..e50e9426dc 100644 --- a/src/RWGltf/RWGltf_CafReader.cxx +++ b/src/RWGltf/RWGltf_CafReader.cxx @@ -25,8 +25,7 @@ #include #include #include - -#include +#include IMPLEMENT_STANDARD_RTTIEXT(RWGltf_CafReader, RWMesh_CafReader) diff --git a/src/RWGltf/RWGltf_CafReader.hxx b/src/RWGltf/RWGltf_CafReader.hxx index d084408d43..8b2d811649 100644 --- a/src/RWGltf/RWGltf_CafReader.hxx +++ b/src/RWGltf/RWGltf_CafReader.hxx @@ -15,7 +15,6 @@ #ifndef _RWGltf_CafReader_HeaderFile #define _RWGltf_CafReader_HeaderFile -#include #include #include #include diff --git a/src/RWGltf/RWGltf_GltfJsonParser.hxx b/src/RWGltf/RWGltf_GltfJsonParser.hxx index e53fb1dfa4..5cd3fd2e99 100644 --- a/src/RWGltf/RWGltf_GltfJsonParser.hxx +++ b/src/RWGltf/RWGltf_GltfJsonParser.hxx @@ -15,12 +15,8 @@ #ifndef _RWGltf_GltfJsonParser_HeaderFile #define _RWGltf_GltfJsonParser_HeaderFile -#include #include #include -#include -#include -#include #include #include #include diff --git a/src/RWGltf/RWGltf_TriangulationReader.hxx b/src/RWGltf/RWGltf_TriangulationReader.hxx index 30ef3fb3be..649b8f3456 100644 --- a/src/RWGltf/RWGltf_TriangulationReader.hxx +++ b/src/RWGltf/RWGltf_TriangulationReader.hxx @@ -18,7 +18,6 @@ #include #include #include -#include class RWGltf_GltfLatePrimitiveArray; class RWGltf_GltfPrimArrayData; diff --git a/src/RWHeaderSection/RWHeaderSection_GeneralModule.cxx b/src/RWHeaderSection/RWHeaderSection_GeneralModule.cxx index 64a39431ad..a49e6867c3 100644 --- a/src/RWHeaderSection/RWHeaderSection_GeneralModule.cxx +++ b/src/RWHeaderSection/RWHeaderSection_GeneralModule.cxx @@ -24,7 +24,6 @@ #include #include #include -#include #include #include #include diff --git a/src/RWHeaderSection/RWHeaderSection_GeneralModule.hxx b/src/RWHeaderSection/RWHeaderSection_GeneralModule.hxx index cbfd209da2..fed1a72080 100644 --- a/src/RWHeaderSection/RWHeaderSection_GeneralModule.hxx +++ b/src/RWHeaderSection/RWHeaderSection_GeneralModule.hxx @@ -22,7 +22,6 @@ #include #include -#include class Standard_Transient; class Interface_EntityIterator; class Interface_ShareTool; diff --git a/src/RWHeaderSection/RWHeaderSection_RWFileDescription.cxx b/src/RWHeaderSection/RWHeaderSection_RWFileDescription.cxx index 98ffe52150..850040b6fe 100644 --- a/src/RWHeaderSection/RWHeaderSection_RWFileDescription.cxx +++ b/src/RWHeaderSection/RWHeaderSection_RWFileDescription.cxx @@ -13,7 +13,6 @@ #include -#include #include #include #include diff --git a/src/RWHeaderSection/RWHeaderSection_RWFileName.cxx b/src/RWHeaderSection/RWHeaderSection_RWFileName.cxx index fadec7ed8a..ce21bc82df 100644 --- a/src/RWHeaderSection/RWHeaderSection_RWFileName.cxx +++ b/src/RWHeaderSection/RWHeaderSection_RWFileName.cxx @@ -13,7 +13,6 @@ #include -#include #include #include #include diff --git a/src/RWHeaderSection/RWHeaderSection_RWFileSchema.cxx b/src/RWHeaderSection/RWHeaderSection_RWFileSchema.cxx index daf9239ab3..4c2422a23b 100644 --- a/src/RWHeaderSection/RWHeaderSection_RWFileSchema.cxx +++ b/src/RWHeaderSection/RWHeaderSection_RWFileSchema.cxx @@ -13,7 +13,6 @@ #include -#include #include #include #include diff --git a/src/RWHeaderSection/RWHeaderSection_ReadWriteModule.cxx b/src/RWHeaderSection/RWHeaderSection_ReadWriteModule.cxx index 1ef5efcf5b..d98c4af2a3 100644 --- a/src/RWHeaderSection/RWHeaderSection_ReadWriteModule.cxx +++ b/src/RWHeaderSection/RWHeaderSection_ReadWriteModule.cxx @@ -16,9 +16,7 @@ #include #include #include -#include #include -#include #include #include #include diff --git a/src/RWHeaderSection/RWHeaderSection_ReadWriteModule.hxx b/src/RWHeaderSection/RWHeaderSection_ReadWriteModule.hxx index 4aabee4c33..c27e9200d4 100644 --- a/src/RWHeaderSection/RWHeaderSection_ReadWriteModule.hxx +++ b/src/RWHeaderSection/RWHeaderSection_ReadWriteModule.hxx @@ -23,7 +23,6 @@ #include #include #include -#include class TCollection_AsciiString; class StepData_StepReaderData; class Interface_Check; diff --git a/src/RWMesh/RWMesh_CafReader.cxx b/src/RWMesh/RWMesh_CafReader.cxx index 64c9b6e9d0..9efd9e66dc 100644 --- a/src/RWMesh/RWMesh_CafReader.cxx +++ b/src/RWMesh/RWMesh_CafReader.cxx @@ -18,7 +18,6 @@ #include #include -#include #include #include #include diff --git a/src/RWMesh/RWMesh_CafReader.hxx b/src/RWMesh/RWMesh_CafReader.hxx index c4df3d5a16..3be45e7d21 100644 --- a/src/RWMesh/RWMesh_CafReader.hxx +++ b/src/RWMesh/RWMesh_CafReader.hxx @@ -16,7 +16,6 @@ #define _RWMesh_CafReader_HeaderFile #include -#include #include #include #include diff --git a/src/RWMesh/RWMesh_CoordinateSystemConverter.hxx b/src/RWMesh/RWMesh_CoordinateSystemConverter.hxx index 295a770115..780fdf3526 100644 --- a/src/RWMesh/RWMesh_CoordinateSystemConverter.hxx +++ b/src/RWMesh/RWMesh_CoordinateSystemConverter.hxx @@ -17,11 +17,9 @@ #include -#include #include #include #include -#include #include //! Coordinate system converter defining the following tools: diff --git a/src/RWMesh/RWMesh_FaceIterator.hxx b/src/RWMesh/RWMesh_FaceIterator.hxx index 3a74040af6..6439b4b926 100644 --- a/src/RWMesh/RWMesh_FaceIterator.hxx +++ b/src/RWMesh/RWMesh_FaceIterator.hxx @@ -17,7 +17,6 @@ #include #include #include -#include #include #include #include diff --git a/src/RWObj/RWObj_CafWriter.cxx b/src/RWObj/RWObj_CafWriter.cxx index e092e29f75..5c9b0b3814 100644 --- a/src/RWObj/RWObj_CafWriter.cxx +++ b/src/RWObj/RWObj_CafWriter.cxx @@ -18,7 +18,6 @@ #include #include #include -#include #include #include #include diff --git a/src/RWObj/RWObj_Reader.cxx b/src/RWObj/RWObj_Reader.cxx index 331e100598..5a5b8c1a88 100644 --- a/src/RWObj/RWObj_Reader.cxx +++ b/src/RWObj/RWObj_Reader.cxx @@ -26,7 +26,6 @@ #include #include #include -#include #include #include diff --git a/src/RWObj/RWObj_Reader.hxx b/src/RWObj/RWObj_Reader.hxx index ee37022b1b..920cb73cd3 100644 --- a/src/RWObj/RWObj_Reader.hxx +++ b/src/RWObj/RWObj_Reader.hxx @@ -15,9 +15,6 @@ #ifndef _RWObj_Reader_HeaderFile #define _RWObj_Reader_HeaderFile -#include -#include -#include #include #include #include diff --git a/src/RWObj/RWObj_SubMesh.hxx b/src/RWObj/RWObj_SubMesh.hxx index 7a960939d5..446ce5d545 100644 --- a/src/RWObj/RWObj_SubMesh.hxx +++ b/src/RWObj/RWObj_SubMesh.hxx @@ -15,7 +15,6 @@ #ifndef _RWObj_SubMesh_HeaderFile #define _RWObj_SubMesh_HeaderFile -#include #include //! Sub-mesh definition for OBJ reader. diff --git a/src/RWStepAP203/RWStepAP203_RWCcDesignApproval.cxx b/src/RWStepAP203/RWStepAP203_RWCcDesignApproval.cxx index 32d208b27c..0479a7be8f 100644 --- a/src/RWStepAP203/RWStepAP203_RWCcDesignApproval.cxx +++ b/src/RWStepAP203/RWStepAP203_RWCcDesignApproval.cxx @@ -19,7 +19,6 @@ #include #include #include -#include #include #include #include diff --git a/src/RWStepAP203/RWStepAP203_RWStartRequest.cxx b/src/RWStepAP203/RWStepAP203_RWStartRequest.cxx index d4697ae6ab..57dc2e0997 100644 --- a/src/RWStepAP203/RWStepAP203_RWStartRequest.cxx +++ b/src/RWStepAP203/RWStepAP203_RWStartRequest.cxx @@ -19,7 +19,6 @@ #include #include #include -#include #include #include #include diff --git a/src/RWStepAP203/RWStepAP203_RWStartWork.cxx b/src/RWStepAP203/RWStepAP203_RWStartWork.cxx index 2759aa1b25..fe486e5d50 100644 --- a/src/RWStepAP203/RWStepAP203_RWStartWork.cxx +++ b/src/RWStepAP203/RWStepAP203_RWStartWork.cxx @@ -19,7 +19,6 @@ #include #include #include -#include #include #include #include diff --git a/src/RWStepAP214/RWStepAP214_GeneralModule.cxx b/src/RWStepAP214/RWStepAP214_GeneralModule.cxx index 16c57f14a0..722c5cb7b0 100644 --- a/src/RWStepAP214/RWStepAP214_GeneralModule.cxx +++ b/src/RWStepAP214/RWStepAP214_GeneralModule.cxx @@ -19,7 +19,6 @@ #include #include #include -#include #include #include #include @@ -33,7 +32,6 @@ #include #include #include -#include #include #include #include @@ -60,47 +58,32 @@ #include #include #include -#include #include #include #include #include #include -#include -#include #include #include #include #include #include #include -#include -#include -#include #include #include #include -#include #include #include #include #include #include #include -#include #include -#include #include -#include #include -#include -#include #include -#include -#include #include #include -#include #include #include #include @@ -114,34 +97,25 @@ #include #include #include -#include #include -#include #include #include #include #include #include #include -#include #include #include #include #include #include #include -#include -#include #include -#include -#include #include #include -#include #include #include #include -#include #include #include #include @@ -158,21 +132,11 @@ #include #include #include -#include -#include -#include -#include -#include -#include -#include -#include -#include #include #include #include #include #include -#include #include #include #include @@ -274,15 +238,12 @@ #include #include #include -#include -#include #include #include #include #include #include #include -#include #include #include #include @@ -291,7 +252,6 @@ #include #include #include -#include #include #include #include @@ -301,10 +261,8 @@ #include #include #include -#include #include #include -#include #include #include #include @@ -317,7 +275,6 @@ #include #include #include -#include #include #include #include @@ -333,7 +290,6 @@ #include #include #include -#include #include #include #include @@ -360,9 +316,7 @@ #include #include #include -#include #include -#include #include #include #include @@ -372,7 +326,6 @@ #include #include #include -#include #include #include #include @@ -380,14 +333,11 @@ #include #include #include -#include -#include #include #include #include #include #include -#include #include #include #include @@ -420,7 +370,6 @@ #include #include #include -#include #include #include #include @@ -440,8 +389,6 @@ #include #include #include -#include -#include #include #include #include @@ -458,7 +405,6 @@ #include #include #include -#include #include #include #include @@ -471,7 +417,6 @@ #include #include #include -#include #include #include #include @@ -479,33 +424,23 @@ #include #include #include -#include #include #include -#include -#include #include #include #include #include #include -#include #include #include #include -#include -#include -#include #include #include #include #include #include #include -#include #include -#include -#include #include #include #include @@ -514,16 +449,11 @@ #include #include #include -#include #include -#include -#include -#include #include #include #include #include -#include #include #include #include @@ -586,7 +516,6 @@ #include #include #include -#include #include #include #include @@ -595,9 +524,7 @@ #include #include #include -#include #include -#include #include #include #include @@ -614,10 +541,8 @@ #include #include #include -#include #include #include -#include #include #include #include @@ -635,65 +560,49 @@ #include #include #include -#include #include #include #include #include #include -#include #include #include #include -#include #include #include #include #include #include #include -#include #include #include -#include #include -#include #include #include #include #include #include -#include #include #include -#include #include #include #include #include -#include #include -#include -#include #include #include #include #include #include -#include -#include #include #include -#include #include -#include #include #include #include #include #include #include -#include #include #include #include @@ -708,7 +617,6 @@ #include #include #include -#include #include #include #include @@ -721,7 +629,6 @@ #include #include #include -#include #include #include #include @@ -740,15 +647,11 @@ #include #include #include -#include -#include #include #include #include #include #include -#include -#include #include #include #include @@ -759,7 +662,6 @@ #include #include #include -#include #include #include #include @@ -778,7 +680,6 @@ #include #include #include -#include #include #include #include @@ -794,7 +695,6 @@ #include #include #include -#include #include #include #include @@ -805,9 +705,6 @@ #include #include #include -#include -#include -#include #include #include #include @@ -816,7 +713,6 @@ #include #include #include -#include #include #include #include @@ -826,22 +722,16 @@ #include #include #include -#include #include #include #include -#include -#include -#include #include #include #include #include #include #include -#include #include -#include #include #include #include @@ -862,8 +752,6 @@ #include #include #include -#include -#include #include #include #include @@ -873,7 +761,6 @@ #include #include #include -#include #include #include #include @@ -887,32 +774,25 @@ #include #include #include -#include #include #include #include #include #include -#include #include #include -#include #include #include #include #include #include -#include -#include #include #include #include #include #include #include -#include #include -#include #include #include #include @@ -929,19 +809,15 @@ #include #include #include -#include #include -#include #include #include -#include #include #include #include #include #include #include -#include #include #include #include @@ -959,7 +835,6 @@ #include #include #include -#include #include #include #include @@ -973,7 +848,6 @@ #include #include #include -#include #include #include #include @@ -990,8 +864,6 @@ #include #include #include -#include -#include #include #include #include @@ -1001,7 +873,6 @@ #include #include #include -#include #include #include #include @@ -1039,30 +910,23 @@ #include #include #include -#include #include #include #include #include -#include #include #include -#include #include -#include #include #include #include #include -#include #include #include #include #include #include #include -#include -#include #include #include #include @@ -1099,7 +963,6 @@ #include #include #include -#include #include #include #include @@ -1108,7 +971,6 @@ #include #include #include -#include #include #include #include @@ -1270,27 +1132,18 @@ IMPLEMENT_STANDARD_RTTIEXT(RWStepAP214_GeneralModule,StepData_GeneralModule) #include #include #include -#include #include #include -#include -#include #include #include -#include #include #include -#include -#include -#include #include #include #include #include #include #include -#include -#include #include #include #include @@ -1325,7 +1178,6 @@ IMPLEMENT_STANDARD_RTTIEXT(RWStepAP214_GeneralModule,StepData_GeneralModule) #include #include #include -#include #include #include #include @@ -1333,9 +1185,6 @@ IMPLEMENT_STANDARD_RTTIEXT(RWStepAP214_GeneralModule,StepData_GeneralModule) #include #include #include -#include -#include -#include #include #include #include @@ -1344,21 +1193,15 @@ IMPLEMENT_STANDARD_RTTIEXT(RWStepAP214_GeneralModule,StepData_GeneralModule) #include #include #include -#include #include #include #include -#include #include -#include -#include #include -#include #include #include -#include #include #include #include @@ -1455,16 +1298,13 @@ IMPLEMENT_STANDARD_RTTIEXT(RWStepAP214_GeneralModule,StepData_GeneralModule) #include #include #include -#include #include #include #include -#include #include #include #include #include -#include #include #include #include @@ -1480,26 +1320,19 @@ IMPLEMENT_STANDARD_RTTIEXT(RWStepAP214_GeneralModule,StepData_GeneralModule) #include #include #include -#include #include -#include #include #include -#include #include #include -#include #include #include -#include #include #include #include #include -#include #include #include -#include #include #include #include @@ -1508,16 +1341,13 @@ IMPLEMENT_STANDARD_RTTIEXT(RWStepAP214_GeneralModule,StepData_GeneralModule) #include #include #include -#include #include #include #include #include #include #include -#include #include -#include #include #include #include diff --git a/src/RWStepAP214/RWStepAP214_GeneralModule.hxx b/src/RWStepAP214/RWStepAP214_GeneralModule.hxx index afc626d11d..ec1bd04a04 100644 --- a/src/RWStepAP214/RWStepAP214_GeneralModule.hxx +++ b/src/RWStepAP214/RWStepAP214_GeneralModule.hxx @@ -22,7 +22,6 @@ #include #include -#include class Standard_Transient; class Interface_EntityIterator; class Interface_ShareTool; diff --git a/src/RWStepAP214/RWStepAP214_RWAutoDesignNominalDateAndTimeAssignment.cxx b/src/RWStepAP214/RWStepAP214_RWAutoDesignNominalDateAndTimeAssignment.cxx index 2c95ea2355..0499f246a7 100644 --- a/src/RWStepAP214/RWStepAP214_RWAutoDesignNominalDateAndTimeAssignment.cxx +++ b/src/RWStepAP214/RWStepAP214_RWAutoDesignNominalDateAndTimeAssignment.cxx @@ -15,7 +15,6 @@ #include #include #include -#include #include #include #include diff --git a/src/RWStepAP214/RWStepAP214_RWAutoDesignNominalDateAssignment.cxx b/src/RWStepAP214/RWStepAP214_RWAutoDesignNominalDateAssignment.cxx index 8e78be44bb..25d71d400b 100644 --- a/src/RWStepAP214/RWStepAP214_RWAutoDesignNominalDateAssignment.cxx +++ b/src/RWStepAP214/RWStepAP214_RWAutoDesignNominalDateAssignment.cxx @@ -15,7 +15,6 @@ #include #include #include -#include #include #include #include diff --git a/src/RWStepAP214/RWStepAP214_RWAutoDesignOrganizationAssignment.cxx b/src/RWStepAP214/RWStepAP214_RWAutoDesignOrganizationAssignment.cxx index 1d433d3924..bd6ce39a81 100644 --- a/src/RWStepAP214/RWStepAP214_RWAutoDesignOrganizationAssignment.cxx +++ b/src/RWStepAP214/RWStepAP214_RWAutoDesignOrganizationAssignment.cxx @@ -15,7 +15,6 @@ #include #include #include -#include #include #include #include diff --git a/src/RWStepAP214/RWStepAP214_RWAutoDesignPersonAndOrganizationAssignment.cxx b/src/RWStepAP214/RWStepAP214_RWAutoDesignPersonAndOrganizationAssignment.cxx index 22291201b4..0ca49e6f37 100644 --- a/src/RWStepAP214/RWStepAP214_RWAutoDesignPersonAndOrganizationAssignment.cxx +++ b/src/RWStepAP214/RWStepAP214_RWAutoDesignPersonAndOrganizationAssignment.cxx @@ -15,7 +15,6 @@ #include #include #include -#include #include #include #include diff --git a/src/RWStepAP214/RWStepAP214_RWClass.cxx b/src/RWStepAP214/RWStepAP214_RWClass.cxx index 867bed99d0..d7c8e7a7c2 100644 --- a/src/RWStepAP214/RWStepAP214_RWClass.cxx +++ b/src/RWStepAP214/RWStepAP214_RWClass.cxx @@ -15,7 +15,6 @@ // Generator: ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V1.1 -#include #include #include #include diff --git a/src/RWStepAP214/RWStepAP214_RWExternallyDefinedClass.cxx b/src/RWStepAP214/RWStepAP214_RWExternallyDefinedClass.cxx index 77ae25298d..0e95548abe 100644 --- a/src/RWStepAP214/RWStepAP214_RWExternallyDefinedClass.cxx +++ b/src/RWStepAP214/RWStepAP214_RWExternallyDefinedClass.cxx @@ -15,7 +15,6 @@ // Generator: ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V1.1 -#include #include #include #include diff --git a/src/RWStepAP214/RWStepAP214_RWExternallyDefinedGeneralProperty.cxx b/src/RWStepAP214/RWStepAP214_RWExternallyDefinedGeneralProperty.cxx index 2e7eba7113..b168f862d1 100644 --- a/src/RWStepAP214/RWStepAP214_RWExternallyDefinedGeneralProperty.cxx +++ b/src/RWStepAP214/RWStepAP214_RWExternallyDefinedGeneralProperty.cxx @@ -15,7 +15,6 @@ // Generator: ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V1.1 -#include #include #include #include diff --git a/src/RWStepAP214/RWStepAP214_RWRepItemGroup.cxx b/src/RWStepAP214/RWStepAP214_RWRepItemGroup.cxx index d1add0028d..f5a29edc47 100644 --- a/src/RWStepAP214/RWStepAP214_RWRepItemGroup.cxx +++ b/src/RWStepAP214/RWStepAP214_RWRepItemGroup.cxx @@ -15,7 +15,6 @@ // Generator: ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V1.1 -#include #include #include #include diff --git a/src/RWStepAP214/RWStepAP214_ReadWriteModule.hxx b/src/RWStepAP214/RWStepAP214_ReadWriteModule.hxx index 75c02ceb21..7c3399a5b2 100644 --- a/src/RWStepAP214/RWStepAP214_ReadWriteModule.hxx +++ b/src/RWStepAP214/RWStepAP214_ReadWriteModule.hxx @@ -18,12 +18,10 @@ #define _RWStepAP214_ReadWriteModule_HeaderFile #include -#include #include #include #include -#include class TCollection_AsciiString; class StepData_StepReaderData; class Interface_Check; diff --git a/src/RWStepAP242/RWStepAP242_RWItemIdentifiedRepresentationUsage.cxx b/src/RWStepAP242/RWStepAP242_RWItemIdentifiedRepresentationUsage.cxx index b2009f6ee8..a4065e0f1f 100644 --- a/src/RWStepAP242/RWStepAP242_RWItemIdentifiedRepresentationUsage.cxx +++ b/src/RWStepAP242/RWStepAP242_RWItemIdentifiedRepresentationUsage.cxx @@ -15,7 +15,6 @@ #include #include -#include #include #include #include diff --git a/src/RWStepBasic/RWStepBasic_RWAction.cxx b/src/RWStepBasic/RWStepBasic_RWAction.cxx index 5f2ba1e8d9..8ea37f7c8a 100644 --- a/src/RWStepBasic/RWStepBasic_RWAction.cxx +++ b/src/RWStepBasic/RWStepBasic_RWAction.cxx @@ -16,7 +16,6 @@ // Generator: ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V1.0 -#include #include #include #include diff --git a/src/RWStepBasic/RWStepBasic_RWActionAssignment.cxx b/src/RWStepBasic/RWStepBasic_RWActionAssignment.cxx index 9aeaccb621..2fa0f282a0 100644 --- a/src/RWStepBasic/RWStepBasic_RWActionAssignment.cxx +++ b/src/RWStepBasic/RWStepBasic_RWActionAssignment.cxx @@ -16,7 +16,6 @@ // Generator: ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V1.0 -#include #include #include #include diff --git a/src/RWStepBasic/RWStepBasic_RWActionMethod.cxx b/src/RWStepBasic/RWStepBasic_RWActionMethod.cxx index 6a01b03fbb..4b294cfd63 100644 --- a/src/RWStepBasic/RWStepBasic_RWActionMethod.cxx +++ b/src/RWStepBasic/RWStepBasic_RWActionMethod.cxx @@ -16,7 +16,6 @@ // Generator: ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V1.0 -#include #include #include #include diff --git a/src/RWStepBasic/RWStepBasic_RWActionRequestAssignment.cxx b/src/RWStepBasic/RWStepBasic_RWActionRequestAssignment.cxx index 3e2a224dc1..e6f6af6d92 100644 --- a/src/RWStepBasic/RWStepBasic_RWActionRequestAssignment.cxx +++ b/src/RWStepBasic/RWStepBasic_RWActionRequestAssignment.cxx @@ -16,7 +16,6 @@ // Generator: ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V1.0 -#include #include #include #include diff --git a/src/RWStepBasic/RWStepBasic_RWActionRequestSolution.cxx b/src/RWStepBasic/RWStepBasic_RWActionRequestSolution.cxx index bf4893fb2c..da252df7b1 100644 --- a/src/RWStepBasic/RWStepBasic_RWActionRequestSolution.cxx +++ b/src/RWStepBasic/RWStepBasic_RWActionRequestSolution.cxx @@ -16,7 +16,6 @@ // Generator: ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V1.0 -#include #include #include #include diff --git a/src/RWStepBasic/RWStepBasic_RWAddress.cxx b/src/RWStepBasic/RWStepBasic_RWAddress.cxx index 228205f269..e3e0a0981f 100644 --- a/src/RWStepBasic/RWStepBasic_RWAddress.cxx +++ b/src/RWStepBasic/RWStepBasic_RWAddress.cxx @@ -12,7 +12,6 @@ // commercial license or contractual agreement. -#include #include #include #include diff --git a/src/RWStepBasic/RWStepBasic_RWApplicationContext.cxx b/src/RWStepBasic/RWStepBasic_RWApplicationContext.cxx index fe9ba47c6b..0a4432e586 100644 --- a/src/RWStepBasic/RWStepBasic_RWApplicationContext.cxx +++ b/src/RWStepBasic/RWStepBasic_RWApplicationContext.cxx @@ -12,7 +12,6 @@ // commercial license or contractual agreement. -#include #include #include #include diff --git a/src/RWStepBasic/RWStepBasic_RWApplicationContextElement.cxx b/src/RWStepBasic/RWStepBasic_RWApplicationContextElement.cxx index 49ede8500d..fb0cfe455b 100644 --- a/src/RWStepBasic/RWStepBasic_RWApplicationContextElement.cxx +++ b/src/RWStepBasic/RWStepBasic_RWApplicationContextElement.cxx @@ -12,7 +12,6 @@ // commercial license or contractual agreement. -#include #include #include #include diff --git a/src/RWStepBasic/RWStepBasic_RWApplicationProtocolDefinition.cxx b/src/RWStepBasic/RWStepBasic_RWApplicationProtocolDefinition.cxx index 3e253d1567..839d09b920 100644 --- a/src/RWStepBasic/RWStepBasic_RWApplicationProtocolDefinition.cxx +++ b/src/RWStepBasic/RWStepBasic_RWApplicationProtocolDefinition.cxx @@ -12,7 +12,6 @@ // commercial license or contractual agreement. -#include #include #include #include diff --git a/src/RWStepBasic/RWStepBasic_RWApproval.cxx b/src/RWStepBasic/RWStepBasic_RWApproval.cxx index 4864504ad7..4e9552a289 100644 --- a/src/RWStepBasic/RWStepBasic_RWApproval.cxx +++ b/src/RWStepBasic/RWStepBasic_RWApproval.cxx @@ -12,7 +12,6 @@ // commercial license or contractual agreement. -#include #include #include #include diff --git a/src/RWStepBasic/RWStepBasic_RWApprovalDateTime.cxx b/src/RWStepBasic/RWStepBasic_RWApprovalDateTime.cxx index c8edb2d3fa..ed104eb670 100644 --- a/src/RWStepBasic/RWStepBasic_RWApprovalDateTime.cxx +++ b/src/RWStepBasic/RWStepBasic_RWApprovalDateTime.cxx @@ -12,7 +12,6 @@ // commercial license or contractual agreement. -#include #include #include #include diff --git a/src/RWStepBasic/RWStepBasic_RWApprovalPersonOrganization.cxx b/src/RWStepBasic/RWStepBasic_RWApprovalPersonOrganization.cxx index 8990f5e2e6..a45510eec9 100644 --- a/src/RWStepBasic/RWStepBasic_RWApprovalPersonOrganization.cxx +++ b/src/RWStepBasic/RWStepBasic_RWApprovalPersonOrganization.cxx @@ -12,7 +12,6 @@ // commercial license or contractual agreement. -#include #include #include #include diff --git a/src/RWStepBasic/RWStepBasic_RWApprovalRelationship.cxx b/src/RWStepBasic/RWStepBasic_RWApprovalRelationship.cxx index 0543d99702..dfaa233473 100644 --- a/src/RWStepBasic/RWStepBasic_RWApprovalRelationship.cxx +++ b/src/RWStepBasic/RWStepBasic_RWApprovalRelationship.cxx @@ -13,7 +13,6 @@ //gka 05.03.99 S4134 upgrade from CD to DIS -#include #include #include #include diff --git a/src/RWStepBasic/RWStepBasic_RWApprovalRole.cxx b/src/RWStepBasic/RWStepBasic_RWApprovalRole.cxx index 8f2e14fdf4..718dc73138 100644 --- a/src/RWStepBasic/RWStepBasic_RWApprovalRole.cxx +++ b/src/RWStepBasic/RWStepBasic_RWApprovalRole.cxx @@ -12,7 +12,6 @@ // commercial license or contractual agreement. -#include #include #include #include diff --git a/src/RWStepBasic/RWStepBasic_RWApprovalStatus.cxx b/src/RWStepBasic/RWStepBasic_RWApprovalStatus.cxx index 2b2a2d98c1..60199b3cd7 100644 --- a/src/RWStepBasic/RWStepBasic_RWApprovalStatus.cxx +++ b/src/RWStepBasic/RWStepBasic_RWApprovalStatus.cxx @@ -12,7 +12,6 @@ // commercial license or contractual agreement. -#include #include #include #include diff --git a/src/RWStepBasic/RWStepBasic_RWCalendarDate.cxx b/src/RWStepBasic/RWStepBasic_RWCalendarDate.cxx index 72926e3e93..4434bba189 100644 --- a/src/RWStepBasic/RWStepBasic_RWCalendarDate.cxx +++ b/src/RWStepBasic/RWStepBasic_RWCalendarDate.cxx @@ -12,7 +12,6 @@ // commercial license or contractual agreement. -#include #include #include #include diff --git a/src/RWStepBasic/RWStepBasic_RWCertification.cxx b/src/RWStepBasic/RWStepBasic_RWCertification.cxx index f6e76e889c..9246478092 100644 --- a/src/RWStepBasic/RWStepBasic_RWCertification.cxx +++ b/src/RWStepBasic/RWStepBasic_RWCertification.cxx @@ -16,7 +16,6 @@ // Generator: ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V1.0 -#include #include #include #include diff --git a/src/RWStepBasic/RWStepBasic_RWCertificationAssignment.cxx b/src/RWStepBasic/RWStepBasic_RWCertificationAssignment.cxx index 0685c17bd7..69754e6242 100644 --- a/src/RWStepBasic/RWStepBasic_RWCertificationAssignment.cxx +++ b/src/RWStepBasic/RWStepBasic_RWCertificationAssignment.cxx @@ -16,7 +16,6 @@ // Generator: ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V1.0 -#include #include #include #include diff --git a/src/RWStepBasic/RWStepBasic_RWCertificationType.cxx b/src/RWStepBasic/RWStepBasic_RWCertificationType.cxx index 16477be18b..af144dafcb 100644 --- a/src/RWStepBasic/RWStepBasic_RWCertificationType.cxx +++ b/src/RWStepBasic/RWStepBasic_RWCertificationType.cxx @@ -16,7 +16,6 @@ // Generator: ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V1.0 -#include #include #include #include diff --git a/src/RWStepBasic/RWStepBasic_RWCharacterizedObject.cxx b/src/RWStepBasic/RWStepBasic_RWCharacterizedObject.cxx index b95a9b1457..009788b6da 100644 --- a/src/RWStepBasic/RWStepBasic_RWCharacterizedObject.cxx +++ b/src/RWStepBasic/RWStepBasic_RWCharacterizedObject.cxx @@ -15,7 +15,6 @@ // Generator: ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V1.1 -#include #include #include #include diff --git a/src/RWStepBasic/RWStepBasic_RWContract.cxx b/src/RWStepBasic/RWStepBasic_RWContract.cxx index d4e2a40195..94a39b3291 100644 --- a/src/RWStepBasic/RWStepBasic_RWContract.cxx +++ b/src/RWStepBasic/RWStepBasic_RWContract.cxx @@ -16,7 +16,6 @@ // Generator: ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V1.0 -#include #include #include #include diff --git a/src/RWStepBasic/RWStepBasic_RWContractAssignment.cxx b/src/RWStepBasic/RWStepBasic_RWContractAssignment.cxx index d9e038bf07..fecdba450b 100644 --- a/src/RWStepBasic/RWStepBasic_RWContractAssignment.cxx +++ b/src/RWStepBasic/RWStepBasic_RWContractAssignment.cxx @@ -16,7 +16,6 @@ // Generator: ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V1.0 -#include #include #include #include diff --git a/src/RWStepBasic/RWStepBasic_RWContractType.cxx b/src/RWStepBasic/RWStepBasic_RWContractType.cxx index fe26b42b01..117e902f37 100644 --- a/src/RWStepBasic/RWStepBasic_RWContractType.cxx +++ b/src/RWStepBasic/RWStepBasic_RWContractType.cxx @@ -16,7 +16,6 @@ // Generator: ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V1.0 -#include #include #include #include diff --git a/src/RWStepBasic/RWStepBasic_RWConversionBasedUnit.cxx b/src/RWStepBasic/RWStepBasic_RWConversionBasedUnit.cxx index 53152fd5c5..55ab2941af 100644 --- a/src/RWStepBasic/RWStepBasic_RWConversionBasedUnit.cxx +++ b/src/RWStepBasic/RWStepBasic_RWConversionBasedUnit.cxx @@ -12,7 +12,6 @@ // commercial license or contractual agreement. -#include #include #include #include diff --git a/src/RWStepBasic/RWStepBasic_RWConversionBasedUnitAndAreaUnit.cxx b/src/RWStepBasic/RWStepBasic_RWConversionBasedUnitAndAreaUnit.cxx index c40a51a20b..0d93b06ff1 100644 --- a/src/RWStepBasic/RWStepBasic_RWConversionBasedUnitAndAreaUnit.cxx +++ b/src/RWStepBasic/RWStepBasic_RWConversionBasedUnitAndAreaUnit.cxx @@ -15,7 +15,6 @@ // commercial license or contractual agreement. -#include #include #include #include diff --git a/src/RWStepBasic/RWStepBasic_RWConversionBasedUnitAndLengthUnit.cxx b/src/RWStepBasic/RWStepBasic_RWConversionBasedUnitAndLengthUnit.cxx index b5a075ad03..fea585aa19 100644 --- a/src/RWStepBasic/RWStepBasic_RWConversionBasedUnitAndLengthUnit.cxx +++ b/src/RWStepBasic/RWStepBasic_RWConversionBasedUnitAndLengthUnit.cxx @@ -12,10 +12,8 @@ // commercial license or contractual agreement. -#include #include #include -#include #include #include #include diff --git a/src/RWStepBasic/RWStepBasic_RWConversionBasedUnitAndMassUnit.cxx b/src/RWStepBasic/RWStepBasic_RWConversionBasedUnitAndMassUnit.cxx index 7f25012441..592dec847c 100644 --- a/src/RWStepBasic/RWStepBasic_RWConversionBasedUnitAndMassUnit.cxx +++ b/src/RWStepBasic/RWStepBasic_RWConversionBasedUnitAndMassUnit.cxx @@ -12,10 +12,8 @@ // commercial license or contractual agreement. -#include #include #include -#include #include #include #include diff --git a/src/RWStepBasic/RWStepBasic_RWConversionBasedUnitAndPlaneAngleUnit.cxx b/src/RWStepBasic/RWStepBasic_RWConversionBasedUnitAndPlaneAngleUnit.cxx index 7d89770e83..49b58b6d3b 100644 --- a/src/RWStepBasic/RWStepBasic_RWConversionBasedUnitAndPlaneAngleUnit.cxx +++ b/src/RWStepBasic/RWStepBasic_RWConversionBasedUnitAndPlaneAngleUnit.cxx @@ -13,10 +13,8 @@ // sln 09.10.2001. BUC61003. Correction of looking for items of complex entity in case of them do not saticfy to alphabetical order -#include #include #include -#include #include #include #include diff --git a/src/RWStepBasic/RWStepBasic_RWConversionBasedUnitAndRatioUnit.cxx b/src/RWStepBasic/RWStepBasic_RWConversionBasedUnitAndRatioUnit.cxx index 5674970a90..21e5db1665 100644 --- a/src/RWStepBasic/RWStepBasic_RWConversionBasedUnitAndRatioUnit.cxx +++ b/src/RWStepBasic/RWStepBasic_RWConversionBasedUnitAndRatioUnit.cxx @@ -12,10 +12,8 @@ // commercial license or contractual agreement. -#include #include #include -#include #include #include #include diff --git a/src/RWStepBasic/RWStepBasic_RWConversionBasedUnitAndSolidAngleUnit.cxx b/src/RWStepBasic/RWStepBasic_RWConversionBasedUnitAndSolidAngleUnit.cxx index d6f0614018..6abbb7ecd1 100644 --- a/src/RWStepBasic/RWStepBasic_RWConversionBasedUnitAndSolidAngleUnit.cxx +++ b/src/RWStepBasic/RWStepBasic_RWConversionBasedUnitAndSolidAngleUnit.cxx @@ -12,10 +12,8 @@ // commercial license or contractual agreement. -#include #include #include -#include #include #include #include diff --git a/src/RWStepBasic/RWStepBasic_RWConversionBasedUnitAndTimeUnit.cxx b/src/RWStepBasic/RWStepBasic_RWConversionBasedUnitAndTimeUnit.cxx index 4557f31f07..c29afbdec5 100644 --- a/src/RWStepBasic/RWStepBasic_RWConversionBasedUnitAndTimeUnit.cxx +++ b/src/RWStepBasic/RWStepBasic_RWConversionBasedUnitAndTimeUnit.cxx @@ -12,10 +12,8 @@ // commercial license or contractual agreement. -#include #include #include -#include #include #include #include diff --git a/src/RWStepBasic/RWStepBasic_RWConversionBasedUnitAndVolumeUnit.cxx b/src/RWStepBasic/RWStepBasic_RWConversionBasedUnitAndVolumeUnit.cxx index 9892ba56d6..e28db30e1b 100644 --- a/src/RWStepBasic/RWStepBasic_RWConversionBasedUnitAndVolumeUnit.cxx +++ b/src/RWStepBasic/RWStepBasic_RWConversionBasedUnitAndVolumeUnit.cxx @@ -15,7 +15,6 @@ // commercial license or contractual agreement. -#include #include #include #include diff --git a/src/RWStepBasic/RWStepBasic_RWCoordinatedUniversalTimeOffset.cxx b/src/RWStepBasic/RWStepBasic_RWCoordinatedUniversalTimeOffset.cxx index 4a9f502dd5..8c375e2158 100644 --- a/src/RWStepBasic/RWStepBasic_RWCoordinatedUniversalTimeOffset.cxx +++ b/src/RWStepBasic/RWStepBasic_RWCoordinatedUniversalTimeOffset.cxx @@ -12,9 +12,7 @@ // commercial license or contractual agreement. -#include #include -#include #include #include #include diff --git a/src/RWStepBasic/RWStepBasic_RWDate.cxx b/src/RWStepBasic/RWStepBasic_RWDate.cxx index 7e93a611f6..2d97d75776 100644 --- a/src/RWStepBasic/RWStepBasic_RWDate.cxx +++ b/src/RWStepBasic/RWStepBasic_RWDate.cxx @@ -12,7 +12,6 @@ // commercial license or contractual agreement. -#include #include #include #include diff --git a/src/RWStepBasic/RWStepBasic_RWDateAndTime.cxx b/src/RWStepBasic/RWStepBasic_RWDateAndTime.cxx index 50a79a395a..f59b799bc3 100644 --- a/src/RWStepBasic/RWStepBasic_RWDateAndTime.cxx +++ b/src/RWStepBasic/RWStepBasic_RWDateAndTime.cxx @@ -12,7 +12,6 @@ // commercial license or contractual agreement. -#include #include #include #include diff --git a/src/RWStepBasic/RWStepBasic_RWDateRole.cxx b/src/RWStepBasic/RWStepBasic_RWDateRole.cxx index 5c81dbe642..04321f1c3a 100644 --- a/src/RWStepBasic/RWStepBasic_RWDateRole.cxx +++ b/src/RWStepBasic/RWStepBasic_RWDateRole.cxx @@ -12,7 +12,6 @@ // commercial license or contractual agreement. -#include #include #include #include diff --git a/src/RWStepBasic/RWStepBasic_RWDateTimeRole.cxx b/src/RWStepBasic/RWStepBasic_RWDateTimeRole.cxx index deb55fbf94..9a0c9f4f0a 100644 --- a/src/RWStepBasic/RWStepBasic_RWDateTimeRole.cxx +++ b/src/RWStepBasic/RWStepBasic_RWDateTimeRole.cxx @@ -12,7 +12,6 @@ // commercial license or contractual agreement. -#include #include #include #include diff --git a/src/RWStepBasic/RWStepBasic_RWDerivedUnitElement.cxx b/src/RWStepBasic/RWStepBasic_RWDerivedUnitElement.cxx index c5b25ac4f0..8ab38093d2 100644 --- a/src/RWStepBasic/RWStepBasic_RWDerivedUnitElement.cxx +++ b/src/RWStepBasic/RWStepBasic_RWDerivedUnitElement.cxx @@ -12,7 +12,6 @@ // commercial license or contractual agreement. -#include #include #include #include diff --git a/src/RWStepBasic/RWStepBasic_RWDimensionalExponents.cxx b/src/RWStepBasic/RWStepBasic_RWDimensionalExponents.cxx index 5db7009087..b80ed63574 100644 --- a/src/RWStepBasic/RWStepBasic_RWDimensionalExponents.cxx +++ b/src/RWStepBasic/RWStepBasic_RWDimensionalExponents.cxx @@ -12,7 +12,6 @@ // commercial license or contractual agreement. -#include #include #include #include diff --git a/src/RWStepBasic/RWStepBasic_RWDocument.cxx b/src/RWStepBasic/RWStepBasic_RWDocument.cxx index f43db8f924..30cca76d26 100644 --- a/src/RWStepBasic/RWStepBasic_RWDocument.cxx +++ b/src/RWStepBasic/RWStepBasic_RWDocument.cxx @@ -15,7 +15,6 @@ // Generator: ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V1.1 -#include #include #include #include diff --git a/src/RWStepBasic/RWStepBasic_RWDocumentFile.cxx b/src/RWStepBasic/RWStepBasic_RWDocumentFile.cxx index cab42751fd..aefd8f4f4d 100644 --- a/src/RWStepBasic/RWStepBasic_RWDocumentFile.cxx +++ b/src/RWStepBasic/RWStepBasic_RWDocumentFile.cxx @@ -15,7 +15,6 @@ // Generator: ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V1.1 -#include #include #include #include diff --git a/src/RWStepBasic/RWStepBasic_RWDocumentProductAssociation.cxx b/src/RWStepBasic/RWStepBasic_RWDocumentProductAssociation.cxx index 328a489e3b..4a76330c5a 100644 --- a/src/RWStepBasic/RWStepBasic_RWDocumentProductAssociation.cxx +++ b/src/RWStepBasic/RWStepBasic_RWDocumentProductAssociation.cxx @@ -15,7 +15,6 @@ // Generator: ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V1.2 -#include #include #include #include diff --git a/src/RWStepBasic/RWStepBasic_RWDocumentProductEquivalence.cxx b/src/RWStepBasic/RWStepBasic_RWDocumentProductEquivalence.cxx index 4a6ee9859f..35bc687c17 100644 --- a/src/RWStepBasic/RWStepBasic_RWDocumentProductEquivalence.cxx +++ b/src/RWStepBasic/RWStepBasic_RWDocumentProductEquivalence.cxx @@ -15,7 +15,6 @@ // Generator: ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V1.2 -#include #include #include #include diff --git a/src/RWStepBasic/RWStepBasic_RWDocumentRelationship.cxx b/src/RWStepBasic/RWStepBasic_RWDocumentRelationship.cxx index eb61154c60..5a16f16601 100644 --- a/src/RWStepBasic/RWStepBasic_RWDocumentRelationship.cxx +++ b/src/RWStepBasic/RWStepBasic_RWDocumentRelationship.cxx @@ -13,7 +13,6 @@ //gka 05.03.99 S4134 upgrade from CD to DIS -#include #include #include #include diff --git a/src/RWStepBasic/RWStepBasic_RWDocumentRepresentationType.cxx b/src/RWStepBasic/RWStepBasic_RWDocumentRepresentationType.cxx index e1163d7f4d..11d8ffca5e 100644 --- a/src/RWStepBasic/RWStepBasic_RWDocumentRepresentationType.cxx +++ b/src/RWStepBasic/RWStepBasic_RWDocumentRepresentationType.cxx @@ -15,7 +15,6 @@ // Generator: ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V1.1 -#include #include #include #include diff --git a/src/RWStepBasic/RWStepBasic_RWDocumentType.cxx b/src/RWStepBasic/RWStepBasic_RWDocumentType.cxx index 399fdabe39..e06d89f3b5 100644 --- a/src/RWStepBasic/RWStepBasic_RWDocumentType.cxx +++ b/src/RWStepBasic/RWStepBasic_RWDocumentType.cxx @@ -12,7 +12,6 @@ // commercial license or contractual agreement. -#include #include #include #include diff --git a/src/RWStepBasic/RWStepBasic_RWDocumentUsageConstraint.cxx b/src/RWStepBasic/RWStepBasic_RWDocumentUsageConstraint.cxx index cf9da615c9..091794ece7 100644 --- a/src/RWStepBasic/RWStepBasic_RWDocumentUsageConstraint.cxx +++ b/src/RWStepBasic/RWStepBasic_RWDocumentUsageConstraint.cxx @@ -12,7 +12,6 @@ // commercial license or contractual agreement. -#include #include #include #include diff --git a/src/RWStepBasic/RWStepBasic_RWEffectivity.cxx b/src/RWStepBasic/RWStepBasic_RWEffectivity.cxx index 670e7ebbc2..09561abb93 100644 --- a/src/RWStepBasic/RWStepBasic_RWEffectivity.cxx +++ b/src/RWStepBasic/RWStepBasic_RWEffectivity.cxx @@ -12,7 +12,6 @@ // commercial license or contractual agreement. -#include #include #include #include diff --git a/src/RWStepBasic/RWStepBasic_RWEffectivityAssignment.cxx b/src/RWStepBasic/RWStepBasic_RWEffectivityAssignment.cxx index f6d9a9d985..02b382e8e2 100644 --- a/src/RWStepBasic/RWStepBasic_RWEffectivityAssignment.cxx +++ b/src/RWStepBasic/RWStepBasic_RWEffectivityAssignment.cxx @@ -15,7 +15,6 @@ // Generator: ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V1.1 -#include #include #include #include diff --git a/src/RWStepBasic/RWStepBasic_RWExternalIdentificationAssignment.cxx b/src/RWStepBasic/RWStepBasic_RWExternalIdentificationAssignment.cxx index 5bff381ae8..9cf524d21e 100644 --- a/src/RWStepBasic/RWStepBasic_RWExternalIdentificationAssignment.cxx +++ b/src/RWStepBasic/RWStepBasic_RWExternalIdentificationAssignment.cxx @@ -15,7 +15,6 @@ // Generator: ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V1.1 -#include #include #include #include diff --git a/src/RWStepBasic/RWStepBasic_RWExternalSource.cxx b/src/RWStepBasic/RWStepBasic_RWExternalSource.cxx index 12bf327437..f6f1f338e4 100644 --- a/src/RWStepBasic/RWStepBasic_RWExternalSource.cxx +++ b/src/RWStepBasic/RWStepBasic_RWExternalSource.cxx @@ -15,7 +15,6 @@ // Generator: ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V1.1 -#include #include #include #include diff --git a/src/RWStepBasic/RWStepBasic_RWExternallyDefinedItem.cxx b/src/RWStepBasic/RWStepBasic_RWExternallyDefinedItem.cxx index 840b052306..ca054b2f03 100644 --- a/src/RWStepBasic/RWStepBasic_RWExternallyDefinedItem.cxx +++ b/src/RWStepBasic/RWStepBasic_RWExternallyDefinedItem.cxx @@ -15,7 +15,6 @@ // Generator: ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V1.1 -#include #include #include #include diff --git a/src/RWStepBasic/RWStepBasic_RWGeneralProperty.cxx b/src/RWStepBasic/RWStepBasic_RWGeneralProperty.cxx index 5a3cd90c36..56ba38410a 100644 --- a/src/RWStepBasic/RWStepBasic_RWGeneralProperty.cxx +++ b/src/RWStepBasic/RWStepBasic_RWGeneralProperty.cxx @@ -15,7 +15,6 @@ // Generator: ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V1.1 -#include #include #include #include diff --git a/src/RWStepBasic/RWStepBasic_RWGroup.cxx b/src/RWStepBasic/RWStepBasic_RWGroup.cxx index c5a28ef99c..5206ea421c 100644 --- a/src/RWStepBasic/RWStepBasic_RWGroup.cxx +++ b/src/RWStepBasic/RWStepBasic_RWGroup.cxx @@ -15,7 +15,6 @@ // Generator: ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V1.1 -#include #include #include #include diff --git a/src/RWStepBasic/RWStepBasic_RWGroupAssignment.cxx b/src/RWStepBasic/RWStepBasic_RWGroupAssignment.cxx index c5f718c0cd..4ca7319910 100644 --- a/src/RWStepBasic/RWStepBasic_RWGroupAssignment.cxx +++ b/src/RWStepBasic/RWStepBasic_RWGroupAssignment.cxx @@ -15,7 +15,6 @@ // Generator: ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V1.1 -#include #include #include #include diff --git a/src/RWStepBasic/RWStepBasic_RWGroupRelationship.cxx b/src/RWStepBasic/RWStepBasic_RWGroupRelationship.cxx index f4cb01c715..14c285ef2a 100644 --- a/src/RWStepBasic/RWStepBasic_RWGroupRelationship.cxx +++ b/src/RWStepBasic/RWStepBasic_RWGroupRelationship.cxx @@ -15,7 +15,6 @@ // Generator: ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V1.1 -#include #include #include #include diff --git a/src/RWStepBasic/RWStepBasic_RWIdentificationAssignment.cxx b/src/RWStepBasic/RWStepBasic_RWIdentificationAssignment.cxx index b2735d7e16..8108b947dd 100644 --- a/src/RWStepBasic/RWStepBasic_RWIdentificationAssignment.cxx +++ b/src/RWStepBasic/RWStepBasic_RWIdentificationAssignment.cxx @@ -15,7 +15,6 @@ // Generator: ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V1.1 -#include #include #include #include diff --git a/src/RWStepBasic/RWStepBasic_RWIdentificationRole.cxx b/src/RWStepBasic/RWStepBasic_RWIdentificationRole.cxx index 0aa522d3f0..f76d7eaa7a 100644 --- a/src/RWStepBasic/RWStepBasic_RWIdentificationRole.cxx +++ b/src/RWStepBasic/RWStepBasic_RWIdentificationRole.cxx @@ -15,7 +15,6 @@ // Generator: ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V1.1 -#include #include #include #include diff --git a/src/RWStepBasic/RWStepBasic_RWLengthMeasureWithUnit.cxx b/src/RWStepBasic/RWStepBasic_RWLengthMeasureWithUnit.cxx index 5786b27f7e..828b42489b 100644 --- a/src/RWStepBasic/RWStepBasic_RWLengthMeasureWithUnit.cxx +++ b/src/RWStepBasic/RWStepBasic_RWLengthMeasureWithUnit.cxx @@ -17,10 +17,8 @@ #include #include #include -#include #include #include -#include //======================================================================= //function : RWStepBasic_RWLengthMeasureWithUnit diff --git a/src/RWStepBasic/RWStepBasic_RWLengthUnit.cxx b/src/RWStepBasic/RWStepBasic_RWLengthUnit.cxx index 0ac9298f60..73ec2f6767 100644 --- a/src/RWStepBasic/RWStepBasic_RWLengthUnit.cxx +++ b/src/RWStepBasic/RWStepBasic_RWLengthUnit.cxx @@ -12,7 +12,6 @@ // commercial license or contractual agreement. -#include #include #include #include diff --git a/src/RWStepBasic/RWStepBasic_RWLocalTime.cxx b/src/RWStepBasic/RWStepBasic_RWLocalTime.cxx index 0d7e570ae9..3ac134951b 100644 --- a/src/RWStepBasic/RWStepBasic_RWLocalTime.cxx +++ b/src/RWStepBasic/RWStepBasic_RWLocalTime.cxx @@ -12,7 +12,6 @@ // commercial license or contractual agreement. -#include #include #include #include diff --git a/src/RWStepBasic/RWStepBasic_RWMassMeasureWithUnit.cxx b/src/RWStepBasic/RWStepBasic_RWMassMeasureWithUnit.cxx index 8d8fb3106b..3bf2c26c89 100644 --- a/src/RWStepBasic/RWStepBasic_RWMassMeasureWithUnit.cxx +++ b/src/RWStepBasic/RWStepBasic_RWMassMeasureWithUnit.cxx @@ -17,10 +17,8 @@ #include #include #include -#include #include #include -#include //======================================================================= //function : RWStepBasic_RWMassMeasureWithUnit diff --git a/src/RWStepBasic/RWStepBasic_RWMassUnit.cxx b/src/RWStepBasic/RWStepBasic_RWMassUnit.cxx index e9e4f08f2f..b5acc306b7 100644 --- a/src/RWStepBasic/RWStepBasic_RWMassUnit.cxx +++ b/src/RWStepBasic/RWStepBasic_RWMassUnit.cxx @@ -15,7 +15,6 @@ // Generator: ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V1.2 -#include #include #include #include diff --git a/src/RWStepBasic/RWStepBasic_RWMeasureWithUnit.cxx b/src/RWStepBasic/RWStepBasic_RWMeasureWithUnit.cxx index d9c2811370..59fc83c44e 100644 --- a/src/RWStepBasic/RWStepBasic_RWMeasureWithUnit.cxx +++ b/src/RWStepBasic/RWStepBasic_RWMeasureWithUnit.cxx @@ -17,7 +17,6 @@ #include #include #include -#include #include #include diff --git a/src/RWStepBasic/RWStepBasic_RWMechanicalContext.cxx b/src/RWStepBasic/RWStepBasic_RWMechanicalContext.cxx index 1f701db4ad..8ae95c2d8b 100644 --- a/src/RWStepBasic/RWStepBasic_RWMechanicalContext.cxx +++ b/src/RWStepBasic/RWStepBasic_RWMechanicalContext.cxx @@ -15,7 +15,6 @@ // commercial license or contractual agreement. -#include #include #include #include diff --git a/src/RWStepBasic/RWStepBasic_RWNameAssignment.cxx b/src/RWStepBasic/RWStepBasic_RWNameAssignment.cxx index 34a11ffc19..5cd6952424 100644 --- a/src/RWStepBasic/RWStepBasic_RWNameAssignment.cxx +++ b/src/RWStepBasic/RWStepBasic_RWNameAssignment.cxx @@ -15,7 +15,6 @@ // Generator: ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V1.1 -#include #include #include #include diff --git a/src/RWStepBasic/RWStepBasic_RWNamedUnit.cxx b/src/RWStepBasic/RWStepBasic_RWNamedUnit.cxx index b4e51295a9..bc0dae8d97 100644 --- a/src/RWStepBasic/RWStepBasic_RWNamedUnit.cxx +++ b/src/RWStepBasic/RWStepBasic_RWNamedUnit.cxx @@ -12,7 +12,6 @@ // commercial license or contractual agreement. -#include #include #include #include diff --git a/src/RWStepBasic/RWStepBasic_RWObjectRole.cxx b/src/RWStepBasic/RWStepBasic_RWObjectRole.cxx index 7bd387bed2..e73ede4c2a 100644 --- a/src/RWStepBasic/RWStepBasic_RWObjectRole.cxx +++ b/src/RWStepBasic/RWStepBasic_RWObjectRole.cxx @@ -15,7 +15,6 @@ // Generator: ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V1.1 -#include #include #include #include diff --git a/src/RWStepBasic/RWStepBasic_RWOrdinalDate.cxx b/src/RWStepBasic/RWStepBasic_RWOrdinalDate.cxx index 3aa54badaf..5a6d703685 100644 --- a/src/RWStepBasic/RWStepBasic_RWOrdinalDate.cxx +++ b/src/RWStepBasic/RWStepBasic_RWOrdinalDate.cxx @@ -12,7 +12,6 @@ // commercial license or contractual agreement. -#include #include #include #include diff --git a/src/RWStepBasic/RWStepBasic_RWOrganization.cxx b/src/RWStepBasic/RWStepBasic_RWOrganization.cxx index 25a1bca879..86eb7924a5 100644 --- a/src/RWStepBasic/RWStepBasic_RWOrganization.cxx +++ b/src/RWStepBasic/RWStepBasic_RWOrganization.cxx @@ -13,7 +13,6 @@ //gka 05.03.99 S4134 upgrade from CD to DIS -#include #include #include #include diff --git a/src/RWStepBasic/RWStepBasic_RWOrganizationRole.cxx b/src/RWStepBasic/RWStepBasic_RWOrganizationRole.cxx index 23f9526bd4..aac4a43ed7 100644 --- a/src/RWStepBasic/RWStepBasic_RWOrganizationRole.cxx +++ b/src/RWStepBasic/RWStepBasic_RWOrganizationRole.cxx @@ -12,7 +12,6 @@ // commercial license or contractual agreement. -#include #include #include #include diff --git a/src/RWStepBasic/RWStepBasic_RWOrganizationalAddress.cxx b/src/RWStepBasic/RWStepBasic_RWOrganizationalAddress.cxx index e0aa675f70..181f23882e 100644 --- a/src/RWStepBasic/RWStepBasic_RWOrganizationalAddress.cxx +++ b/src/RWStepBasic/RWStepBasic_RWOrganizationalAddress.cxx @@ -16,7 +16,6 @@ #include #include #include -#include #include #include #include diff --git a/src/RWStepBasic/RWStepBasic_RWPerson.cxx b/src/RWStepBasic/RWStepBasic_RWPerson.cxx index 2e5e93da9e..345dd2a8c9 100644 --- a/src/RWStepBasic/RWStepBasic_RWPerson.cxx +++ b/src/RWStepBasic/RWStepBasic_RWPerson.cxx @@ -13,7 +13,6 @@ #include -#include #include #include #include diff --git a/src/RWStepBasic/RWStepBasic_RWPersonAndOrganization.cxx b/src/RWStepBasic/RWStepBasic_RWPersonAndOrganization.cxx index f076fcaa25..c4bfd77ff7 100644 --- a/src/RWStepBasic/RWStepBasic_RWPersonAndOrganization.cxx +++ b/src/RWStepBasic/RWStepBasic_RWPersonAndOrganization.cxx @@ -12,7 +12,6 @@ // commercial license or contractual agreement. -#include #include #include #include diff --git a/src/RWStepBasic/RWStepBasic_RWPersonAndOrganizationRole.cxx b/src/RWStepBasic/RWStepBasic_RWPersonAndOrganizationRole.cxx index 421ab85e26..982b1cb2aa 100644 --- a/src/RWStepBasic/RWStepBasic_RWPersonAndOrganizationRole.cxx +++ b/src/RWStepBasic/RWStepBasic_RWPersonAndOrganizationRole.cxx @@ -12,7 +12,6 @@ // commercial license or contractual agreement. -#include #include #include #include diff --git a/src/RWStepBasic/RWStepBasic_RWPersonalAddress.cxx b/src/RWStepBasic/RWStepBasic_RWPersonalAddress.cxx index 31dfb1075d..560669934e 100644 --- a/src/RWStepBasic/RWStepBasic_RWPersonalAddress.cxx +++ b/src/RWStepBasic/RWStepBasic_RWPersonalAddress.cxx @@ -16,7 +16,6 @@ #include #include #include -#include #include #include #include diff --git a/src/RWStepBasic/RWStepBasic_RWPlaneAngleMeasureWithUnit.cxx b/src/RWStepBasic/RWStepBasic_RWPlaneAngleMeasureWithUnit.cxx index 3e0684b449..0859f36264 100644 --- a/src/RWStepBasic/RWStepBasic_RWPlaneAngleMeasureWithUnit.cxx +++ b/src/RWStepBasic/RWStepBasic_RWPlaneAngleMeasureWithUnit.cxx @@ -16,11 +16,9 @@ #include #include #include -#include #include #include #include -#include //======================================================================= //function : RWStepBasic_RWPlaneAngleMeasureWithUnit diff --git a/src/RWStepBasic/RWStepBasic_RWPlaneAngleUnit.cxx b/src/RWStepBasic/RWStepBasic_RWPlaneAngleUnit.cxx index bf36540414..aaf18d0013 100644 --- a/src/RWStepBasic/RWStepBasic_RWPlaneAngleUnit.cxx +++ b/src/RWStepBasic/RWStepBasic_RWPlaneAngleUnit.cxx @@ -12,7 +12,6 @@ // commercial license or contractual agreement. -#include #include #include #include diff --git a/src/RWStepBasic/RWStepBasic_RWProduct.cxx b/src/RWStepBasic/RWStepBasic_RWProduct.cxx index 56ee8e935a..63a8754ec5 100644 --- a/src/RWStepBasic/RWStepBasic_RWProduct.cxx +++ b/src/RWStepBasic/RWStepBasic_RWProduct.cxx @@ -16,7 +16,6 @@ #include #include #include -#include #include #include #include diff --git a/src/RWStepBasic/RWStepBasic_RWProductCategory.cxx b/src/RWStepBasic/RWStepBasic_RWProductCategory.cxx index 3e743c3278..00548f0ddb 100644 --- a/src/RWStepBasic/RWStepBasic_RWProductCategory.cxx +++ b/src/RWStepBasic/RWStepBasic_RWProductCategory.cxx @@ -12,7 +12,6 @@ // commercial license or contractual agreement. -#include #include #include #include diff --git a/src/RWStepBasic/RWStepBasic_RWProductCategoryRelationship.cxx b/src/RWStepBasic/RWStepBasic_RWProductCategoryRelationship.cxx index 3eaad3a570..980c22157d 100644 --- a/src/RWStepBasic/RWStepBasic_RWProductCategoryRelationship.cxx +++ b/src/RWStepBasic/RWStepBasic_RWProductCategoryRelationship.cxx @@ -16,7 +16,6 @@ // Generator: ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V1.0 -#include #include #include #include diff --git a/src/RWStepBasic/RWStepBasic_RWProductConceptContext.cxx b/src/RWStepBasic/RWStepBasic_RWProductConceptContext.cxx index 14f14a36b3..74a86d4b32 100644 --- a/src/RWStepBasic/RWStepBasic_RWProductConceptContext.cxx +++ b/src/RWStepBasic/RWStepBasic_RWProductConceptContext.cxx @@ -16,7 +16,6 @@ // Generator: ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V1.0 -#include #include #include #include diff --git a/src/RWStepBasic/RWStepBasic_RWProductContext.cxx b/src/RWStepBasic/RWStepBasic_RWProductContext.cxx index b1d8d7ecb7..51f3f2a4c4 100644 --- a/src/RWStepBasic/RWStepBasic_RWProductContext.cxx +++ b/src/RWStepBasic/RWStepBasic_RWProductContext.cxx @@ -12,7 +12,6 @@ // commercial license or contractual agreement. -#include #include #include #include diff --git a/src/RWStepBasic/RWStepBasic_RWProductDefinition.cxx b/src/RWStepBasic/RWStepBasic_RWProductDefinition.cxx index 63d0bec369..6ff8bb97d9 100644 --- a/src/RWStepBasic/RWStepBasic_RWProductDefinition.cxx +++ b/src/RWStepBasic/RWStepBasic_RWProductDefinition.cxx @@ -13,7 +13,6 @@ //gka 05.03.99 S4134 upgrade from CD to DIS -#include #include #include #include diff --git a/src/RWStepBasic/RWStepBasic_RWProductDefinitionContext.cxx b/src/RWStepBasic/RWStepBasic_RWProductDefinitionContext.cxx index aa7132351e..5a021e1295 100644 --- a/src/RWStepBasic/RWStepBasic_RWProductDefinitionContext.cxx +++ b/src/RWStepBasic/RWStepBasic_RWProductDefinitionContext.cxx @@ -12,7 +12,6 @@ // commercial license or contractual agreement. -#include #include #include #include diff --git a/src/RWStepBasic/RWStepBasic_RWProductDefinitionEffectivity.cxx b/src/RWStepBasic/RWStepBasic_RWProductDefinitionEffectivity.cxx index de3176a3a4..713fbfb6ec 100644 --- a/src/RWStepBasic/RWStepBasic_RWProductDefinitionEffectivity.cxx +++ b/src/RWStepBasic/RWStepBasic_RWProductDefinitionEffectivity.cxx @@ -12,7 +12,6 @@ // commercial license or contractual agreement. -#include #include #include #include diff --git a/src/RWStepBasic/RWStepBasic_RWProductDefinitionFormation.cxx b/src/RWStepBasic/RWStepBasic_RWProductDefinitionFormation.cxx index d913d5c9be..895908511e 100644 --- a/src/RWStepBasic/RWStepBasic_RWProductDefinitionFormation.cxx +++ b/src/RWStepBasic/RWStepBasic_RWProductDefinitionFormation.cxx @@ -13,7 +13,6 @@ //gka 05.03.99 S4134 upgrade from CD to DIS -#include #include #include #include diff --git a/src/RWStepBasic/RWStepBasic_RWProductDefinitionFormationRelationship.cxx b/src/RWStepBasic/RWStepBasic_RWProductDefinitionFormationRelationship.cxx index e12e90c1e4..fdbf1e1258 100644 --- a/src/RWStepBasic/RWStepBasic_RWProductDefinitionFormationRelationship.cxx +++ b/src/RWStepBasic/RWStepBasic_RWProductDefinitionFormationRelationship.cxx @@ -15,7 +15,6 @@ // Generator: ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V1.2 -#include #include #include #include diff --git a/src/RWStepBasic/RWStepBasic_RWProductDefinitionFormationWithSpecifiedSource.cxx b/src/RWStepBasic/RWStepBasic_RWProductDefinitionFormationWithSpecifiedSource.cxx index c4c8fe66ba..b145e98844 100644 --- a/src/RWStepBasic/RWStepBasic_RWProductDefinitionFormationWithSpecifiedSource.cxx +++ b/src/RWStepBasic/RWStepBasic_RWProductDefinitionFormationWithSpecifiedSource.cxx @@ -12,7 +12,6 @@ // commercial license or contractual agreement. -#include #include #include #include diff --git a/src/RWStepBasic/RWStepBasic_RWProductDefinitionReference.cxx b/src/RWStepBasic/RWStepBasic_RWProductDefinitionReference.cxx index e7c7dbe9aa..7eb301869d 100644 --- a/src/RWStepBasic/RWStepBasic_RWProductDefinitionReference.cxx +++ b/src/RWStepBasic/RWStepBasic_RWProductDefinitionReference.cxx @@ -15,13 +15,10 @@ //gka 05.03.99 S4134 upgrade from CD to DIS -#include #include #include #include #include -#include -#include #include #include diff --git a/src/RWStepBasic/RWStepBasic_RWProductDefinitionReferenceWithLocalRepresentation.cxx b/src/RWStepBasic/RWStepBasic_RWProductDefinitionReferenceWithLocalRepresentation.cxx index 8260af4ef3..74b4a15de9 100644 --- a/src/RWStepBasic/RWStepBasic_RWProductDefinitionReferenceWithLocalRepresentation.cxx +++ b/src/RWStepBasic/RWStepBasic_RWProductDefinitionReferenceWithLocalRepresentation.cxx @@ -13,7 +13,6 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -#include #include #include #include diff --git a/src/RWStepBasic/RWStepBasic_RWProductDefinitionRelationship.cxx b/src/RWStepBasic/RWStepBasic_RWProductDefinitionRelationship.cxx index 2e3debcabd..ef366532a2 100644 --- a/src/RWStepBasic/RWStepBasic_RWProductDefinitionRelationship.cxx +++ b/src/RWStepBasic/RWStepBasic_RWProductDefinitionRelationship.cxx @@ -15,10 +15,8 @@ // Generator: ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V1.1 -#include #include #include -#include #include #include #include diff --git a/src/RWStepBasic/RWStepBasic_RWProductDefinitionWithAssociatedDocuments.cxx b/src/RWStepBasic/RWStepBasic_RWProductDefinitionWithAssociatedDocuments.cxx index 667bbb4a4c..d93b3944e6 100644 --- a/src/RWStepBasic/RWStepBasic_RWProductDefinitionWithAssociatedDocuments.cxx +++ b/src/RWStepBasic/RWStepBasic_RWProductDefinitionWithAssociatedDocuments.cxx @@ -15,8 +15,6 @@ #include #include #include -#include -#include #include #include #include diff --git a/src/RWStepBasic/RWStepBasic_RWProductRelatedProductCategory.cxx b/src/RWStepBasic/RWStepBasic_RWProductRelatedProductCategory.cxx index 70175f8741..2f8e1907ba 100644 --- a/src/RWStepBasic/RWStepBasic_RWProductRelatedProductCategory.cxx +++ b/src/RWStepBasic/RWStepBasic_RWProductRelatedProductCategory.cxx @@ -15,7 +15,6 @@ #include #include #include -#include #include #include #include diff --git a/src/RWStepBasic/RWStepBasic_RWProductType.cxx b/src/RWStepBasic/RWStepBasic_RWProductType.cxx index 5734ddaa11..b073a4a56c 100644 --- a/src/RWStepBasic/RWStepBasic_RWProductType.cxx +++ b/src/RWStepBasic/RWStepBasic_RWProductType.cxx @@ -15,7 +15,6 @@ #include #include #include -#include #include #include #include diff --git a/src/RWStepBasic/RWStepBasic_RWRatioMeasureWithUnit.cxx b/src/RWStepBasic/RWStepBasic_RWRatioMeasureWithUnit.cxx index 455d7c0c4f..b343f31cfb 100644 --- a/src/RWStepBasic/RWStepBasic_RWRatioMeasureWithUnit.cxx +++ b/src/RWStepBasic/RWStepBasic_RWRatioMeasureWithUnit.cxx @@ -16,7 +16,6 @@ #include #include #include -#include #include #include #include diff --git a/src/RWStepBasic/RWStepBasic_RWRoleAssociation.cxx b/src/RWStepBasic/RWStepBasic_RWRoleAssociation.cxx index af834410a0..a28a18cf79 100644 --- a/src/RWStepBasic/RWStepBasic_RWRoleAssociation.cxx +++ b/src/RWStepBasic/RWStepBasic_RWRoleAssociation.cxx @@ -15,7 +15,6 @@ // Generator: ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V1.1 -#include #include #include #include diff --git a/src/RWStepBasic/RWStepBasic_RWSecurityClassification.cxx b/src/RWStepBasic/RWStepBasic_RWSecurityClassification.cxx index ce38cf159f..fe9d2c4e0d 100644 --- a/src/RWStepBasic/RWStepBasic_RWSecurityClassification.cxx +++ b/src/RWStepBasic/RWStepBasic_RWSecurityClassification.cxx @@ -12,7 +12,6 @@ // commercial license or contractual agreement. -#include #include #include #include diff --git a/src/RWStepBasic/RWStepBasic_RWSecurityClassificationLevel.cxx b/src/RWStepBasic/RWStepBasic_RWSecurityClassificationLevel.cxx index b70a293783..0c49c8a5ef 100644 --- a/src/RWStepBasic/RWStepBasic_RWSecurityClassificationLevel.cxx +++ b/src/RWStepBasic/RWStepBasic_RWSecurityClassificationLevel.cxx @@ -12,7 +12,6 @@ // commercial license or contractual agreement. -#include #include #include #include diff --git a/src/RWStepBasic/RWStepBasic_RWSiUnit.cxx b/src/RWStepBasic/RWStepBasic_RWSiUnit.cxx index 32a9d38d0c..92eda4e01f 100644 --- a/src/RWStepBasic/RWStepBasic_RWSiUnit.cxx +++ b/src/RWStepBasic/RWStepBasic_RWSiUnit.cxx @@ -12,7 +12,6 @@ // commercial license or contractual agreement. -#include #include #include #include diff --git a/src/RWStepBasic/RWStepBasic_RWSiUnit.hxx b/src/RWStepBasic/RWStepBasic_RWSiUnit.hxx index dccfbe0611..24a963a868 100644 --- a/src/RWStepBasic/RWStepBasic_RWSiUnit.hxx +++ b/src/RWStepBasic/RWStepBasic_RWSiUnit.hxx @@ -24,7 +24,6 @@ #include #include #include -#include #include class StepData_StepReaderData; class Interface_Check; diff --git a/src/RWStepBasic/RWStepBasic_RWSiUnitAndAreaUnit.cxx b/src/RWStepBasic/RWStepBasic_RWSiUnitAndAreaUnit.cxx index 650817dc42..8a06ed56b9 100644 --- a/src/RWStepBasic/RWStepBasic_RWSiUnitAndAreaUnit.cxx +++ b/src/RWStepBasic/RWStepBasic_RWSiUnitAndAreaUnit.cxx @@ -15,11 +15,9 @@ // commercial license or contractual agreement. -#include #include #include #include -#include #include #include #include diff --git a/src/RWStepBasic/RWStepBasic_RWSiUnitAndLengthUnit.cxx b/src/RWStepBasic/RWStepBasic_RWSiUnitAndLengthUnit.cxx index cb9ea1b17c..b5d20f8205 100644 --- a/src/RWStepBasic/RWStepBasic_RWSiUnitAndLengthUnit.cxx +++ b/src/RWStepBasic/RWStepBasic_RWSiUnitAndLengthUnit.cxx @@ -13,13 +13,10 @@ // pdn 24.12.98 t3d_opt.stp: treatment of unsorted uncertanties -#include #include #include #include -#include #include -#include #include #include #include diff --git a/src/RWStepBasic/RWStepBasic_RWSiUnitAndMassUnit.cxx b/src/RWStepBasic/RWStepBasic_RWSiUnitAndMassUnit.cxx index 483ec33fa5..404276ece4 100644 --- a/src/RWStepBasic/RWStepBasic_RWSiUnitAndMassUnit.cxx +++ b/src/RWStepBasic/RWStepBasic_RWSiUnitAndMassUnit.cxx @@ -12,13 +12,10 @@ // commercial license or contractual agreement. -#include #include #include #include -#include #include -#include #include #include #include diff --git a/src/RWStepBasic/RWStepBasic_RWSiUnitAndPlaneAngleUnit.cxx b/src/RWStepBasic/RWStepBasic_RWSiUnitAndPlaneAngleUnit.cxx index 0515370365..c48b1f56d0 100644 --- a/src/RWStepBasic/RWStepBasic_RWSiUnitAndPlaneAngleUnit.cxx +++ b/src/RWStepBasic/RWStepBasic_RWSiUnitAndPlaneAngleUnit.cxx @@ -12,13 +12,10 @@ // commercial license or contractual agreement. -#include #include #include #include -#include #include -#include #include #include #include diff --git a/src/RWStepBasic/RWStepBasic_RWSiUnitAndRatioUnit.cxx b/src/RWStepBasic/RWStepBasic_RWSiUnitAndRatioUnit.cxx index 5353006436..0d28dba9a0 100644 --- a/src/RWStepBasic/RWStepBasic_RWSiUnitAndRatioUnit.cxx +++ b/src/RWStepBasic/RWStepBasic_RWSiUnitAndRatioUnit.cxx @@ -12,13 +12,10 @@ // commercial license or contractual agreement. -#include #include #include #include -#include #include -#include #include #include #include diff --git a/src/RWStepBasic/RWStepBasic_RWSiUnitAndSolidAngleUnit.cxx b/src/RWStepBasic/RWStepBasic_RWSiUnitAndSolidAngleUnit.cxx index 9dbf560a8a..add23560e5 100644 --- a/src/RWStepBasic/RWStepBasic_RWSiUnitAndSolidAngleUnit.cxx +++ b/src/RWStepBasic/RWStepBasic_RWSiUnitAndSolidAngleUnit.cxx @@ -12,15 +12,12 @@ // commercial license or contractual agreement. -#include #include #include #include #include -#include #include #include -#include #include #include diff --git a/src/RWStepBasic/RWStepBasic_RWSiUnitAndThermodynamicTemperatureUnit.cxx b/src/RWStepBasic/RWStepBasic_RWSiUnitAndThermodynamicTemperatureUnit.cxx index 0430115e8d..3e45db5b28 100644 --- a/src/RWStepBasic/RWStepBasic_RWSiUnitAndThermodynamicTemperatureUnit.cxx +++ b/src/RWStepBasic/RWStepBasic_RWSiUnitAndThermodynamicTemperatureUnit.cxx @@ -12,15 +12,12 @@ // commercial license or contractual agreement. -#include #include #include #include #include -#include #include #include -#include #include #include diff --git a/src/RWStepBasic/RWStepBasic_RWSiUnitAndTimeUnit.cxx b/src/RWStepBasic/RWStepBasic_RWSiUnitAndTimeUnit.cxx index 4c363d229c..6701250c7f 100644 --- a/src/RWStepBasic/RWStepBasic_RWSiUnitAndTimeUnit.cxx +++ b/src/RWStepBasic/RWStepBasic_RWSiUnitAndTimeUnit.cxx @@ -12,15 +12,12 @@ // commercial license or contractual agreement. -#include #include #include #include #include -#include #include #include -#include #include #include diff --git a/src/RWStepBasic/RWStepBasic_RWSiUnitAndVolumeUnit.cxx b/src/RWStepBasic/RWStepBasic_RWSiUnitAndVolumeUnit.cxx index 958d92a479..5014bb0017 100644 --- a/src/RWStepBasic/RWStepBasic_RWSiUnitAndVolumeUnit.cxx +++ b/src/RWStepBasic/RWStepBasic_RWSiUnitAndVolumeUnit.cxx @@ -15,11 +15,9 @@ // commercial license or contractual agreement. -#include #include #include #include -#include #include #include #include diff --git a/src/RWStepBasic/RWStepBasic_RWSolidAngleMeasureWithUnit.cxx b/src/RWStepBasic/RWStepBasic_RWSolidAngleMeasureWithUnit.cxx index 32fcbc2978..c58d1eaf08 100644 --- a/src/RWStepBasic/RWStepBasic_RWSolidAngleMeasureWithUnit.cxx +++ b/src/RWStepBasic/RWStepBasic_RWSolidAngleMeasureWithUnit.cxx @@ -16,11 +16,9 @@ #include #include #include -#include #include #include #include -#include //======================================================================= //function : RWStepBasic_RWSolidAngleMeasureWithUnit diff --git a/src/RWStepBasic/RWStepBasic_RWSolidAngleUnit.cxx b/src/RWStepBasic/RWStepBasic_RWSolidAngleUnit.cxx index fa39726530..b3549c7929 100644 --- a/src/RWStepBasic/RWStepBasic_RWSolidAngleUnit.cxx +++ b/src/RWStepBasic/RWStepBasic_RWSolidAngleUnit.cxx @@ -12,7 +12,6 @@ // commercial license or contractual agreement. -#include #include #include #include diff --git a/src/RWStepBasic/RWStepBasic_RWThermodynamicTemperatureUnit.cxx b/src/RWStepBasic/RWStepBasic_RWThermodynamicTemperatureUnit.cxx index 3a3149967f..ebebcfb8ad 100644 --- a/src/RWStepBasic/RWStepBasic_RWThermodynamicTemperatureUnit.cxx +++ b/src/RWStepBasic/RWStepBasic_RWThermodynamicTemperatureUnit.cxx @@ -15,7 +15,6 @@ // Generator: ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V1.2 -#include #include #include #include diff --git a/src/RWStepBasic/RWStepBasic_RWUncertaintyMeasureWithUnit.cxx b/src/RWStepBasic/RWStepBasic_RWUncertaintyMeasureWithUnit.cxx index f1f99dca34..3b8c3059d7 100644 --- a/src/RWStepBasic/RWStepBasic_RWUncertaintyMeasureWithUnit.cxx +++ b/src/RWStepBasic/RWStepBasic_RWUncertaintyMeasureWithUnit.cxx @@ -15,17 +15,13 @@ #include #include -#include #include #include #include -#include #include #include #include -#include -#include //======================================================================= //function : RWStepBasic_RWUncertaintyMeasureWithUnit //purpose : diff --git a/src/RWStepBasic/RWStepBasic_RWVersionedActionRequest.cxx b/src/RWStepBasic/RWStepBasic_RWVersionedActionRequest.cxx index ad09180d44..7f79e0c117 100644 --- a/src/RWStepBasic/RWStepBasic_RWVersionedActionRequest.cxx +++ b/src/RWStepBasic/RWStepBasic_RWVersionedActionRequest.cxx @@ -16,7 +16,6 @@ // Generator: ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V1.0 -#include #include #include #include diff --git a/src/RWStepBasic/RWStepBasic_RWWeekOfYearAndDayDate.cxx b/src/RWStepBasic/RWStepBasic_RWWeekOfYearAndDayDate.cxx index 3cbd53dbb9..46194f26ed 100644 --- a/src/RWStepBasic/RWStepBasic_RWWeekOfYearAndDayDate.cxx +++ b/src/RWStepBasic/RWStepBasic_RWWeekOfYearAndDayDate.cxx @@ -12,7 +12,6 @@ // commercial license or contractual agreement. -#include #include #include #include diff --git a/src/RWStepDimTol/RWStepDimTol_RWAngularityTolerance.cxx b/src/RWStepDimTol/RWStepDimTol_RWAngularityTolerance.cxx index 2870df358c..ba27327952 100644 --- a/src/RWStepDimTol/RWStepDimTol_RWAngularityTolerance.cxx +++ b/src/RWStepDimTol/RWStepDimTol_RWAngularityTolerance.cxx @@ -22,7 +22,6 @@ #include #include #include -#include #include #include diff --git a/src/RWStepDimTol/RWStepDimTol_RWCircularRunoutTolerance.cxx b/src/RWStepDimTol/RWStepDimTol_RWCircularRunoutTolerance.cxx index 03da230b71..3fec1c958e 100644 --- a/src/RWStepDimTol/RWStepDimTol_RWCircularRunoutTolerance.cxx +++ b/src/RWStepDimTol/RWStepDimTol_RWCircularRunoutTolerance.cxx @@ -22,7 +22,6 @@ #include #include #include -#include #include #include diff --git a/src/RWStepDimTol/RWStepDimTol_RWCoaxialityTolerance.cxx b/src/RWStepDimTol/RWStepDimTol_RWCoaxialityTolerance.cxx index d8d0c09df4..454f74096a 100644 --- a/src/RWStepDimTol/RWStepDimTol_RWCoaxialityTolerance.cxx +++ b/src/RWStepDimTol/RWStepDimTol_RWCoaxialityTolerance.cxx @@ -22,7 +22,6 @@ #include #include #include -#include #include #include diff --git a/src/RWStepDimTol/RWStepDimTol_RWCommonDatum.cxx b/src/RWStepDimTol/RWStepDimTol_RWCommonDatum.cxx index 802600e7a0..2a92d0abd0 100644 --- a/src/RWStepDimTol/RWStepDimTol_RWCommonDatum.cxx +++ b/src/RWStepDimTol/RWStepDimTol_RWCommonDatum.cxx @@ -15,7 +15,6 @@ // Generator: ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V1.2 -#include #include #include #include diff --git a/src/RWStepDimTol/RWStepDimTol_RWConcentricityTolerance.cxx b/src/RWStepDimTol/RWStepDimTol_RWConcentricityTolerance.cxx index 63405520eb..ece94b06bb 100644 --- a/src/RWStepDimTol/RWStepDimTol_RWConcentricityTolerance.cxx +++ b/src/RWStepDimTol/RWStepDimTol_RWConcentricityTolerance.cxx @@ -22,7 +22,6 @@ #include #include #include -#include #include #include diff --git a/src/RWStepDimTol/RWStepDimTol_RWCylindricityTolerance.cxx b/src/RWStepDimTol/RWStepDimTol_RWCylindricityTolerance.cxx index b0b60f0c13..253acdf8a2 100644 --- a/src/RWStepDimTol/RWStepDimTol_RWCylindricityTolerance.cxx +++ b/src/RWStepDimTol/RWStepDimTol_RWCylindricityTolerance.cxx @@ -15,7 +15,6 @@ // Generator: ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V1.2 -#include #include #include #include diff --git a/src/RWStepDimTol/RWStepDimTol_RWDatum.cxx b/src/RWStepDimTol/RWStepDimTol_RWDatum.cxx index 9f41b5e3be..56bf9e8955 100644 --- a/src/RWStepDimTol/RWStepDimTol_RWDatum.cxx +++ b/src/RWStepDimTol/RWStepDimTol_RWDatum.cxx @@ -15,7 +15,6 @@ // Generator: ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V1.2 -#include #include #include #include diff --git a/src/RWStepDimTol/RWStepDimTol_RWDatumFeature.cxx b/src/RWStepDimTol/RWStepDimTol_RWDatumFeature.cxx index b8b1035788..b3557da51f 100644 --- a/src/RWStepDimTol/RWStepDimTol_RWDatumFeature.cxx +++ b/src/RWStepDimTol/RWStepDimTol_RWDatumFeature.cxx @@ -15,7 +15,6 @@ // Generator: ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V1.2 -#include #include #include #include diff --git a/src/RWStepDimTol/RWStepDimTol_RWDatumReference.cxx b/src/RWStepDimTol/RWStepDimTol_RWDatumReference.cxx index 3b9de0076f..3cc2bbe946 100644 --- a/src/RWStepDimTol/RWStepDimTol_RWDatumReference.cxx +++ b/src/RWStepDimTol/RWStepDimTol_RWDatumReference.cxx @@ -15,7 +15,6 @@ // Generator: ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V1.2 -#include #include #include #include diff --git a/src/RWStepDimTol/RWStepDimTol_RWDatumReferenceElement.cxx b/src/RWStepDimTol/RWStepDimTol_RWDatumReferenceElement.cxx index 2c26640219..29a5d043e7 100644 --- a/src/RWStepDimTol/RWStepDimTol_RWDatumReferenceElement.cxx +++ b/src/RWStepDimTol/RWStepDimTol_RWDatumReferenceElement.cxx @@ -19,7 +19,6 @@ #include #include #include -#include #include #include #include diff --git a/src/RWStepDimTol/RWStepDimTol_RWDatumReferenceModifierWithValue.cxx b/src/RWStepDimTol/RWStepDimTol_RWDatumReferenceModifierWithValue.cxx index c650208ba6..7cc08859dd 100644 --- a/src/RWStepDimTol/RWStepDimTol_RWDatumReferenceModifierWithValue.cxx +++ b/src/RWStepDimTol/RWStepDimTol_RWDatumReferenceModifierWithValue.cxx @@ -15,12 +15,9 @@ #include -#include #include #include #include -#include -#include #include //======================================================================= diff --git a/src/RWStepDimTol/RWStepDimTol_RWDatumSystem.cxx b/src/RWStepDimTol/RWStepDimTol_RWDatumSystem.cxx index 6d2c401038..0399d21162 100644 --- a/src/RWStepDimTol/RWStepDimTol_RWDatumSystem.cxx +++ b/src/RWStepDimTol/RWStepDimTol_RWDatumSystem.cxx @@ -18,7 +18,6 @@ #include #include #include -#include #include #include diff --git a/src/RWStepDimTol/RWStepDimTol_RWDatumTarget.cxx b/src/RWStepDimTol/RWStepDimTol_RWDatumTarget.cxx index 7240098be6..73e6c719ac 100644 --- a/src/RWStepDimTol/RWStepDimTol_RWDatumTarget.cxx +++ b/src/RWStepDimTol/RWStepDimTol_RWDatumTarget.cxx @@ -15,7 +15,6 @@ // Generator: ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V1.2 -#include #include #include #include diff --git a/src/RWStepDimTol/RWStepDimTol_RWFlatnessTolerance.cxx b/src/RWStepDimTol/RWStepDimTol_RWFlatnessTolerance.cxx index e63396e512..dcd9f0eb36 100644 --- a/src/RWStepDimTol/RWStepDimTol_RWFlatnessTolerance.cxx +++ b/src/RWStepDimTol/RWStepDimTol_RWFlatnessTolerance.cxx @@ -15,7 +15,6 @@ // Generator: ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V1.2 -#include #include #include #include diff --git a/src/RWStepDimTol/RWStepDimTol_RWGeneralDatumReference.cxx b/src/RWStepDimTol/RWStepDimTol_RWGeneralDatumReference.cxx index abf4d3a499..e493785914 100644 --- a/src/RWStepDimTol/RWStepDimTol_RWGeneralDatumReference.cxx +++ b/src/RWStepDimTol/RWStepDimTol_RWGeneralDatumReference.cxx @@ -19,8 +19,6 @@ #include #include #include -#include -#include #include #include #include diff --git a/src/RWStepDimTol/RWStepDimTol_RWGeoTolAndGeoTolWthDatRef.cxx b/src/RWStepDimTol/RWStepDimTol_RWGeoTolAndGeoTolWthDatRef.cxx index 02331922e2..5dacbeedba 100644 --- a/src/RWStepDimTol/RWStepDimTol_RWGeoTolAndGeoTolWthDatRef.cxx +++ b/src/RWStepDimTol/RWStepDimTol_RWGeoTolAndGeoTolWthDatRef.cxx @@ -20,9 +20,6 @@ #include #include #include -#include -#include -#include #include #include #include diff --git a/src/RWStepDimTol/RWStepDimTol_RWGeoTolAndGeoTolWthDatRefAndGeoTolWthMaxTol.cxx b/src/RWStepDimTol/RWStepDimTol_RWGeoTolAndGeoTolWthDatRefAndGeoTolWthMaxTol.cxx index 37afafea53..059a5e9b39 100644 --- a/src/RWStepDimTol/RWStepDimTol_RWGeoTolAndGeoTolWthDatRefAndGeoTolWthMaxTol.cxx +++ b/src/RWStepDimTol/RWStepDimTol_RWGeoTolAndGeoTolWthDatRefAndGeoTolWthMaxTol.cxx @@ -21,9 +21,6 @@ #include #include #include -#include -#include -#include #include #include #include diff --git a/src/RWStepDimTol/RWStepDimTol_RWGeoTolAndGeoTolWthDatRefAndGeoTolWthMod.cxx b/src/RWStepDimTol/RWStepDimTol_RWGeoTolAndGeoTolWthDatRefAndGeoTolWthMod.cxx index 4bb6bf7c07..9060524b3a 100644 --- a/src/RWStepDimTol/RWStepDimTol_RWGeoTolAndGeoTolWthDatRefAndGeoTolWthMod.cxx +++ b/src/RWStepDimTol/RWStepDimTol_RWGeoTolAndGeoTolWthDatRefAndGeoTolWthMod.cxx @@ -20,9 +20,6 @@ #include #include #include -#include -#include -#include #include #include #include diff --git a/src/RWStepDimTol/RWStepDimTol_RWGeoTolAndGeoTolWthDatRefAndModGeoTolAndPosTol.cxx b/src/RWStepDimTol/RWStepDimTol_RWGeoTolAndGeoTolWthDatRefAndModGeoTolAndPosTol.cxx index 42e1d203cd..930e3f2ee8 100644 --- a/src/RWStepDimTol/RWStepDimTol_RWGeoTolAndGeoTolWthDatRefAndModGeoTolAndPosTol.cxx +++ b/src/RWStepDimTol/RWStepDimTol_RWGeoTolAndGeoTolWthDatRefAndModGeoTolAndPosTol.cxx @@ -18,12 +18,9 @@ #include #include #include -#include -#include #include #include #include -#include #include //======================================================================= diff --git a/src/RWStepDimTol/RWStepDimTol_RWGeoTolAndGeoTolWthDatRefAndUneqDisGeoTol.cxx b/src/RWStepDimTol/RWStepDimTol_RWGeoTolAndGeoTolWthDatRefAndUneqDisGeoTol.cxx index 32dbc1dd1c..da42f6c5a2 100644 --- a/src/RWStepDimTol/RWStepDimTol_RWGeoTolAndGeoTolWthDatRefAndUneqDisGeoTol.cxx +++ b/src/RWStepDimTol/RWStepDimTol_RWGeoTolAndGeoTolWthDatRefAndUneqDisGeoTol.cxx @@ -17,13 +17,8 @@ #include #include #include -#include -#include #include #include -#include -#include -#include #include #include #include diff --git a/src/RWStepDimTol/RWStepDimTol_RWGeoTolAndGeoTolWthMaxTol.cxx b/src/RWStepDimTol/RWStepDimTol_RWGeoTolAndGeoTolWthMaxTol.cxx index 656730c426..d2dcc8ae9a 100644 --- a/src/RWStepDimTol/RWStepDimTol_RWGeoTolAndGeoTolWthMaxTol.cxx +++ b/src/RWStepDimTol/RWStepDimTol_RWGeoTolAndGeoTolWthMaxTol.cxx @@ -21,8 +21,6 @@ #include #include #include -#include -#include #include #include diff --git a/src/RWStepDimTol/RWStepDimTol_RWGeoTolAndGeoTolWthMod.cxx b/src/RWStepDimTol/RWStepDimTol_RWGeoTolAndGeoTolWthMod.cxx index 93ee607538..48fcd508b7 100644 --- a/src/RWStepDimTol/RWStepDimTol_RWGeoTolAndGeoTolWthMod.cxx +++ b/src/RWStepDimTol/RWStepDimTol_RWGeoTolAndGeoTolWthMod.cxx @@ -20,8 +20,6 @@ #include #include #include -#include -#include #include #include diff --git a/src/RWStepDimTol/RWStepDimTol_RWGeometricTolerance.cxx b/src/RWStepDimTol/RWStepDimTol_RWGeometricTolerance.cxx index fad6ebec33..975bbe984d 100644 --- a/src/RWStepDimTol/RWStepDimTol_RWGeometricTolerance.cxx +++ b/src/RWStepDimTol/RWStepDimTol_RWGeometricTolerance.cxx @@ -15,7 +15,6 @@ // Generator: ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V1.2 -#include #include #include #include diff --git a/src/RWStepDimTol/RWStepDimTol_RWGeometricToleranceRelationship.cxx b/src/RWStepDimTol/RWStepDimTol_RWGeometricToleranceRelationship.cxx index 3532d30e0a..d7dc1e0add 100644 --- a/src/RWStepDimTol/RWStepDimTol_RWGeometricToleranceRelationship.cxx +++ b/src/RWStepDimTol/RWStepDimTol_RWGeometricToleranceRelationship.cxx @@ -15,7 +15,6 @@ // Generator: ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V1.2 -#include #include #include #include diff --git a/src/RWStepDimTol/RWStepDimTol_RWGeometricToleranceWithDatumReference.cxx b/src/RWStepDimTol/RWStepDimTol_RWGeometricToleranceWithDatumReference.cxx index 58db603caf..433668d86c 100644 --- a/src/RWStepDimTol/RWStepDimTol_RWGeometricToleranceWithDatumReference.cxx +++ b/src/RWStepDimTol/RWStepDimTol_RWGeometricToleranceWithDatumReference.cxx @@ -21,8 +21,6 @@ #include #include #include -#include -#include #include #include diff --git a/src/RWStepDimTol/RWStepDimTol_RWGeometricToleranceWithDefinedAreaUnit.cxx b/src/RWStepDimTol/RWStepDimTol_RWGeometricToleranceWithDefinedAreaUnit.cxx index 6bddf6e6ff..0f0172d5a1 100644 --- a/src/RWStepDimTol/RWStepDimTol_RWGeometricToleranceWithDefinedAreaUnit.cxx +++ b/src/RWStepDimTol/RWStepDimTol_RWGeometricToleranceWithDefinedAreaUnit.cxx @@ -15,14 +15,11 @@ #include -#include #include #include #include #include #include -#include -#include #include //======================================================================= diff --git a/src/RWStepDimTol/RWStepDimTol_RWGeometricToleranceWithDefinedUnit.cxx b/src/RWStepDimTol/RWStepDimTol_RWGeometricToleranceWithDefinedUnit.cxx index ac88511be4..fb1513d4bd 100644 --- a/src/RWStepDimTol/RWStepDimTol_RWGeometricToleranceWithDefinedUnit.cxx +++ b/src/RWStepDimTol/RWStepDimTol_RWGeometricToleranceWithDefinedUnit.cxx @@ -20,7 +20,6 @@ #include #include #include -#include #include //======================================================================= diff --git a/src/RWStepDimTol/RWStepDimTol_RWGeometricToleranceWithMaximumTolerance.cxx b/src/RWStepDimTol/RWStepDimTol_RWGeometricToleranceWithMaximumTolerance.cxx index f597d25211..3c2d9b7ee7 100644 --- a/src/RWStepDimTol/RWStepDimTol_RWGeometricToleranceWithMaximumTolerance.cxx +++ b/src/RWStepDimTol/RWStepDimTol_RWGeometricToleranceWithMaximumTolerance.cxx @@ -17,11 +17,8 @@ #include #include -#include #include #include -#include -#include #include #include #include diff --git a/src/RWStepDimTol/RWStepDimTol_RWGeometricToleranceWithModifiers.cxx b/src/RWStepDimTol/RWStepDimTol_RWGeometricToleranceWithModifiers.cxx index ea23bbbcbf..83273b5f82 100644 --- a/src/RWStepDimTol/RWStepDimTol_RWGeometricToleranceWithModifiers.cxx +++ b/src/RWStepDimTol/RWStepDimTol_RWGeometricToleranceWithModifiers.cxx @@ -20,8 +20,6 @@ #include #include #include -#include -#include #include #include diff --git a/src/RWStepDimTol/RWStepDimTol_RWLineProfileTolerance.cxx b/src/RWStepDimTol/RWStepDimTol_RWLineProfileTolerance.cxx index 5566474009..e847c65d7d 100644 --- a/src/RWStepDimTol/RWStepDimTol_RWLineProfileTolerance.cxx +++ b/src/RWStepDimTol/RWStepDimTol_RWLineProfileTolerance.cxx @@ -15,13 +15,11 @@ // Generator: ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V1.2 -#include #include #include #include #include #include -#include #include //======================================================================= diff --git a/src/RWStepDimTol/RWStepDimTol_RWModifiedGeometricTolerance.cxx b/src/RWStepDimTol/RWStepDimTol_RWModifiedGeometricTolerance.cxx index e6cce261f2..e5a1a9abc4 100644 --- a/src/RWStepDimTol/RWStepDimTol_RWModifiedGeometricTolerance.cxx +++ b/src/RWStepDimTol/RWStepDimTol_RWModifiedGeometricTolerance.cxx @@ -15,13 +15,11 @@ // Generator: ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V1.2 -#include #include #include #include #include #include -#include #include //======================================================================= diff --git a/src/RWStepDimTol/RWStepDimTol_RWNonUniformZoneDefinition.cxx b/src/RWStepDimTol/RWStepDimTol_RWNonUniformZoneDefinition.cxx index 405c65a7ba..f38ce30f58 100644 --- a/src/RWStepDimTol/RWStepDimTol_RWNonUniformZoneDefinition.cxx +++ b/src/RWStepDimTol/RWStepDimTol_RWNonUniformZoneDefinition.cxx @@ -18,7 +18,6 @@ #include #include #include -#include #include #include #include diff --git a/src/RWStepDimTol/RWStepDimTol_RWParallelismTolerance.cxx b/src/RWStepDimTol/RWStepDimTol_RWParallelismTolerance.cxx index 878b90f2bf..dd1905082e 100644 --- a/src/RWStepDimTol/RWStepDimTol_RWParallelismTolerance.cxx +++ b/src/RWStepDimTol/RWStepDimTol_RWParallelismTolerance.cxx @@ -21,9 +21,6 @@ #include #include #include -#include -#include -#include #include //======================================================================= diff --git a/src/RWStepDimTol/RWStepDimTol_RWPerpendicularityTolerance.cxx b/src/RWStepDimTol/RWStepDimTol_RWPerpendicularityTolerance.cxx index 3bad573e48..4c8e604162 100644 --- a/src/RWStepDimTol/RWStepDimTol_RWPerpendicularityTolerance.cxx +++ b/src/RWStepDimTol/RWStepDimTol_RWPerpendicularityTolerance.cxx @@ -21,9 +21,6 @@ #include #include #include -#include -#include -#include #include //======================================================================= diff --git a/src/RWStepDimTol/RWStepDimTol_RWPlacedDatumTargetFeature.cxx b/src/RWStepDimTol/RWStepDimTol_RWPlacedDatumTargetFeature.cxx index d745c224ab..eb230b1674 100644 --- a/src/RWStepDimTol/RWStepDimTol_RWPlacedDatumTargetFeature.cxx +++ b/src/RWStepDimTol/RWStepDimTol_RWPlacedDatumTargetFeature.cxx @@ -15,7 +15,6 @@ // Generator: ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V1.2 -#include #include #include #include diff --git a/src/RWStepDimTol/RWStepDimTol_RWPositionTolerance.cxx b/src/RWStepDimTol/RWStepDimTol_RWPositionTolerance.cxx index 65d170e74a..f5baa2148e 100644 --- a/src/RWStepDimTol/RWStepDimTol_RWPositionTolerance.cxx +++ b/src/RWStepDimTol/RWStepDimTol_RWPositionTolerance.cxx @@ -15,13 +15,11 @@ // Generator: ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V1.2 -#include #include #include #include #include #include -#include #include //======================================================================= diff --git a/src/RWStepDimTol/RWStepDimTol_RWProjectedZoneDefinition.cxx b/src/RWStepDimTol/RWStepDimTol_RWProjectedZoneDefinition.cxx index bd9f209fc9..0e8a57efd6 100644 --- a/src/RWStepDimTol/RWStepDimTol_RWProjectedZoneDefinition.cxx +++ b/src/RWStepDimTol/RWStepDimTol_RWProjectedZoneDefinition.cxx @@ -16,10 +16,8 @@ #include #include -#include #include #include -#include #include #include #include diff --git a/src/RWStepDimTol/RWStepDimTol_RWRoundnessTolerance.cxx b/src/RWStepDimTol/RWStepDimTol_RWRoundnessTolerance.cxx index 0436927862..a50bc4493a 100644 --- a/src/RWStepDimTol/RWStepDimTol_RWRoundnessTolerance.cxx +++ b/src/RWStepDimTol/RWStepDimTol_RWRoundnessTolerance.cxx @@ -15,13 +15,11 @@ // Generator: ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V1.2 -#include #include #include #include #include #include -#include #include //======================================================================= diff --git a/src/RWStepDimTol/RWStepDimTol_RWRunoutZoneDefinition.cxx b/src/RWStepDimTol/RWStepDimTol_RWRunoutZoneDefinition.cxx index 5ed95b389b..d5c77b1fbf 100644 --- a/src/RWStepDimTol/RWStepDimTol_RWRunoutZoneDefinition.cxx +++ b/src/RWStepDimTol/RWStepDimTol_RWRunoutZoneDefinition.cxx @@ -18,7 +18,6 @@ #include #include #include -#include #include #include #include diff --git a/src/RWStepDimTol/RWStepDimTol_RWRunoutZoneOrientation.cxx b/src/RWStepDimTol/RWStepDimTol_RWRunoutZoneOrientation.cxx index 0473927600..d12aa28953 100644 --- a/src/RWStepDimTol/RWStepDimTol_RWRunoutZoneOrientation.cxx +++ b/src/RWStepDimTol/RWStepDimTol_RWRunoutZoneOrientation.cxx @@ -15,7 +15,6 @@ #include -#include #include #include #include diff --git a/src/RWStepDimTol/RWStepDimTol_RWStraightnessTolerance.cxx b/src/RWStepDimTol/RWStepDimTol_RWStraightnessTolerance.cxx index eb1b89a3a9..a11e7ce94a 100644 --- a/src/RWStepDimTol/RWStepDimTol_RWStraightnessTolerance.cxx +++ b/src/RWStepDimTol/RWStepDimTol_RWStraightnessTolerance.cxx @@ -15,13 +15,11 @@ // Generator: ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V1.2 -#include #include #include #include #include #include -#include #include //======================================================================= diff --git a/src/RWStepDimTol/RWStepDimTol_RWSurfaceProfileTolerance.cxx b/src/RWStepDimTol/RWStepDimTol_RWSurfaceProfileTolerance.cxx index b2e336b2f2..a378a129ef 100644 --- a/src/RWStepDimTol/RWStepDimTol_RWSurfaceProfileTolerance.cxx +++ b/src/RWStepDimTol/RWStepDimTol_RWSurfaceProfileTolerance.cxx @@ -15,13 +15,11 @@ // Generator: ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V1.2 -#include #include #include #include #include #include -#include #include //======================================================================= diff --git a/src/RWStepDimTol/RWStepDimTol_RWSymmetryTolerance.cxx b/src/RWStepDimTol/RWStepDimTol_RWSymmetryTolerance.cxx index 1863db7d67..9c4795b991 100644 --- a/src/RWStepDimTol/RWStepDimTol_RWSymmetryTolerance.cxx +++ b/src/RWStepDimTol/RWStepDimTol_RWSymmetryTolerance.cxx @@ -21,9 +21,6 @@ #include #include #include -#include -#include -#include #include //======================================================================= diff --git a/src/RWStepDimTol/RWStepDimTol_RWToleranceZone.cxx b/src/RWStepDimTol/RWStepDimTol_RWToleranceZone.cxx index 273cb5ab73..d2dde91867 100644 --- a/src/RWStepDimTol/RWStepDimTol_RWToleranceZone.cxx +++ b/src/RWStepDimTol/RWStepDimTol_RWToleranceZone.cxx @@ -18,7 +18,6 @@ #include #include #include -#include #include #include #include diff --git a/src/RWStepDimTol/RWStepDimTol_RWToleranceZoneDefinition.cxx b/src/RWStepDimTol/RWStepDimTol_RWToleranceZoneDefinition.cxx index 820e147b95..215c99e432 100644 --- a/src/RWStepDimTol/RWStepDimTol_RWToleranceZoneDefinition.cxx +++ b/src/RWStepDimTol/RWStepDimTol_RWToleranceZoneDefinition.cxx @@ -18,8 +18,6 @@ #include #include #include -#include -#include #include #include diff --git a/src/RWStepDimTol/RWStepDimTol_RWTotalRunoutTolerance.cxx b/src/RWStepDimTol/RWStepDimTol_RWTotalRunoutTolerance.cxx index 6d80d0eec0..b9474c4a63 100644 --- a/src/RWStepDimTol/RWStepDimTol_RWTotalRunoutTolerance.cxx +++ b/src/RWStepDimTol/RWStepDimTol_RWTotalRunoutTolerance.cxx @@ -21,9 +21,6 @@ #include #include #include -#include -#include -#include #include //======================================================================= diff --git a/src/RWStepDimTol/RWStepDimTol_RWUnequallyDisposedGeometricTolerance.cxx b/src/RWStepDimTol/RWStepDimTol_RWUnequallyDisposedGeometricTolerance.cxx index cb2bafa8f4..0e29dc84b5 100644 --- a/src/RWStepDimTol/RWStepDimTol_RWUnequallyDisposedGeometricTolerance.cxx +++ b/src/RWStepDimTol/RWStepDimTol_RWUnequallyDisposedGeometricTolerance.cxx @@ -16,11 +16,8 @@ #include #include -#include -#include #include #include -#include #include //======================================================================= diff --git a/src/RWStepElement/RWStepElement_RWAnalysisItemWithinRepresentation.cxx b/src/RWStepElement/RWStepElement_RWAnalysisItemWithinRepresentation.cxx index fca1900d7f..fbab402b83 100644 --- a/src/RWStepElement/RWStepElement_RWAnalysisItemWithinRepresentation.cxx +++ b/src/RWStepElement/RWStepElement_RWAnalysisItemWithinRepresentation.cxx @@ -15,7 +15,6 @@ // Generator: ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V1.2 -#include #include #include #include diff --git a/src/RWStepElement/RWStepElement_RWCurveElementEndReleasePacket.cxx b/src/RWStepElement/RWStepElement_RWCurveElementEndReleasePacket.cxx index 15f0fa4006..ab6988a06e 100644 --- a/src/RWStepElement/RWStepElement_RWCurveElementEndReleasePacket.cxx +++ b/src/RWStepElement/RWStepElement_RWCurveElementEndReleasePacket.cxx @@ -15,7 +15,6 @@ // Generator: ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V1.2 -#include #include #include #include diff --git a/src/RWStepElement/RWStepElement_RWCurveElementSectionDefinition.cxx b/src/RWStepElement/RWStepElement_RWCurveElementSectionDefinition.cxx index afc1b3980a..9f20aae073 100644 --- a/src/RWStepElement/RWStepElement_RWCurveElementSectionDefinition.cxx +++ b/src/RWStepElement/RWStepElement_RWCurveElementSectionDefinition.cxx @@ -15,7 +15,6 @@ // Generator: ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V1.2 -#include #include #include #include diff --git a/src/RWStepElement/RWStepElement_RWElementDescriptor.cxx b/src/RWStepElement/RWStepElement_RWElementDescriptor.cxx index e7557b8e4e..4481407257 100644 --- a/src/RWStepElement/RWStepElement_RWElementDescriptor.cxx +++ b/src/RWStepElement/RWStepElement_RWElementDescriptor.cxx @@ -15,7 +15,6 @@ // Generator: ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V1.2 -#include #include #include #include diff --git a/src/RWStepElement/RWStepElement_RWSurface3dElementDescriptor.cxx b/src/RWStepElement/RWStepElement_RWSurface3dElementDescriptor.cxx index 71dd5ae67a..4e8da9a41d 100644 --- a/src/RWStepElement/RWStepElement_RWSurface3dElementDescriptor.cxx +++ b/src/RWStepElement/RWStepElement_RWSurface3dElementDescriptor.cxx @@ -20,7 +20,6 @@ #include #include #include -#include #include #include #include diff --git a/src/RWStepElement/RWStepElement_RWSurfaceElementProperty.cxx b/src/RWStepElement/RWStepElement_RWSurfaceElementProperty.cxx index c609b34c68..17284bba7e 100644 --- a/src/RWStepElement/RWStepElement_RWSurfaceElementProperty.cxx +++ b/src/RWStepElement/RWStepElement_RWSurfaceElementProperty.cxx @@ -15,7 +15,6 @@ // Generator: ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V1.2 -#include #include #include #include diff --git a/src/RWStepElement/RWStepElement_RWSurfaceSection.cxx b/src/RWStepElement/RWStepElement_RWSurfaceSection.cxx index e9882455bb..d13125431d 100644 --- a/src/RWStepElement/RWStepElement_RWSurfaceSection.cxx +++ b/src/RWStepElement/RWStepElement_RWSurfaceSection.cxx @@ -15,7 +15,6 @@ // Generator: ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V1.2 -#include #include #include #include diff --git a/src/RWStepElement/RWStepElement_RWSurfaceSectionField.cxx b/src/RWStepElement/RWStepElement_RWSurfaceSectionField.cxx index 273b00567d..606ad952ed 100644 --- a/src/RWStepElement/RWStepElement_RWSurfaceSectionField.cxx +++ b/src/RWStepElement/RWStepElement_RWSurfaceSectionField.cxx @@ -15,7 +15,6 @@ // Generator: ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V1.2 -#include #include #include #include diff --git a/src/RWStepElement/RWStepElement_RWSurfaceSectionFieldConstant.cxx b/src/RWStepElement/RWStepElement_RWSurfaceSectionFieldConstant.cxx index 4c2d0bea13..3d78fdbbdd 100644 --- a/src/RWStepElement/RWStepElement_RWSurfaceSectionFieldConstant.cxx +++ b/src/RWStepElement/RWStepElement_RWSurfaceSectionFieldConstant.cxx @@ -15,7 +15,6 @@ // Generator: ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V1.2 -#include #include #include #include diff --git a/src/RWStepElement/RWStepElement_RWSurfaceSectionFieldVarying.cxx b/src/RWStepElement/RWStepElement_RWSurfaceSectionFieldVarying.cxx index a958fb77a5..37eca4fe3c 100644 --- a/src/RWStepElement/RWStepElement_RWSurfaceSectionFieldVarying.cxx +++ b/src/RWStepElement/RWStepElement_RWSurfaceSectionFieldVarying.cxx @@ -20,7 +20,6 @@ #include #include #include -#include #include #include diff --git a/src/RWStepElement/RWStepElement_RWUniformSurfaceSection.cxx b/src/RWStepElement/RWStepElement_RWUniformSurfaceSection.cxx index 0435eafaad..0139f37efe 100644 --- a/src/RWStepElement/RWStepElement_RWUniformSurfaceSection.cxx +++ b/src/RWStepElement/RWStepElement_RWUniformSurfaceSection.cxx @@ -15,7 +15,6 @@ // Generator: ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V1.2 -#include #include #include #include diff --git a/src/RWStepElement/RWStepElement_RWVolume3dElementDescriptor.cxx b/src/RWStepElement/RWStepElement_RWVolume3dElementDescriptor.cxx index f5419d6255..81df941c16 100644 --- a/src/RWStepElement/RWStepElement_RWVolume3dElementDescriptor.cxx +++ b/src/RWStepElement/RWStepElement_RWVolume3dElementDescriptor.cxx @@ -20,7 +20,6 @@ #include #include #include -#include #include #include diff --git a/src/RWStepFEA/RWStepFEA_RWAlignedCurve3dElementCoordinateSystem.cxx b/src/RWStepFEA/RWStepFEA_RWAlignedCurve3dElementCoordinateSystem.cxx index d5e9495a81..f088295457 100644 --- a/src/RWStepFEA/RWStepFEA_RWAlignedCurve3dElementCoordinateSystem.cxx +++ b/src/RWStepFEA/RWStepFEA_RWAlignedCurve3dElementCoordinateSystem.cxx @@ -15,7 +15,6 @@ // Generator: ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V1.2 -#include #include #include #include diff --git a/src/RWStepFEA/RWStepFEA_RWAlignedSurface3dElementCoordinateSystem.cxx b/src/RWStepFEA/RWStepFEA_RWAlignedSurface3dElementCoordinateSystem.cxx index 385a1a9fc8..d29ebc7582 100644 --- a/src/RWStepFEA/RWStepFEA_RWAlignedSurface3dElementCoordinateSystem.cxx +++ b/src/RWStepFEA/RWStepFEA_RWAlignedSurface3dElementCoordinateSystem.cxx @@ -15,7 +15,6 @@ // Generator: ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V1.2 -#include #include #include #include diff --git a/src/RWStepFEA/RWStepFEA_RWArbitraryVolume3dElementCoordinateSystem.cxx b/src/RWStepFEA/RWStepFEA_RWArbitraryVolume3dElementCoordinateSystem.cxx index 682a6a91ed..bab61c1f7a 100644 --- a/src/RWStepFEA/RWStepFEA_RWArbitraryVolume3dElementCoordinateSystem.cxx +++ b/src/RWStepFEA/RWStepFEA_RWArbitraryVolume3dElementCoordinateSystem.cxx @@ -15,7 +15,6 @@ // Generator: ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V1.2 -#include #include #include #include diff --git a/src/RWStepFEA/RWStepFEA_RWConstantSurface3dElementCoordinateSystem.cxx b/src/RWStepFEA/RWStepFEA_RWConstantSurface3dElementCoordinateSystem.cxx index ecb3c936fe..2314541eeb 100644 --- a/src/RWStepFEA/RWStepFEA_RWConstantSurface3dElementCoordinateSystem.cxx +++ b/src/RWStepFEA/RWStepFEA_RWConstantSurface3dElementCoordinateSystem.cxx @@ -15,7 +15,6 @@ // Generator: ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V1.2 -#include #include #include #include diff --git a/src/RWStepFEA/RWStepFEA_RWCurveElementEndRelease.cxx b/src/RWStepFEA/RWStepFEA_RWCurveElementEndRelease.cxx index a6a7a47670..d9d80195b1 100644 --- a/src/RWStepFEA/RWStepFEA_RWCurveElementEndRelease.cxx +++ b/src/RWStepFEA/RWStepFEA_RWCurveElementEndRelease.cxx @@ -20,8 +20,6 @@ #include #include #include -#include -#include #include //======================================================================= diff --git a/src/RWStepFEA/RWStepFEA_RWCurveElementInterval.cxx b/src/RWStepFEA/RWStepFEA_RWCurveElementInterval.cxx index 69ea436597..610746f84d 100644 --- a/src/RWStepFEA/RWStepFEA_RWCurveElementInterval.cxx +++ b/src/RWStepFEA/RWStepFEA_RWCurveElementInterval.cxx @@ -15,7 +15,6 @@ // Generator: ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V1.2 -#include #include #include #include diff --git a/src/RWStepFEA/RWStepFEA_RWCurveElementIntervalConstant.cxx b/src/RWStepFEA/RWStepFEA_RWCurveElementIntervalConstant.cxx index ac940f9efd..873dc6ffef 100644 --- a/src/RWStepFEA/RWStepFEA_RWCurveElementIntervalConstant.cxx +++ b/src/RWStepFEA/RWStepFEA_RWCurveElementIntervalConstant.cxx @@ -15,7 +15,6 @@ // Generator: ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V1.2 -#include #include #include #include diff --git a/src/RWStepFEA/RWStepFEA_RWCurveElementIntervalLinearlyVarying.cxx b/src/RWStepFEA/RWStepFEA_RWCurveElementIntervalLinearlyVarying.cxx index 79f257d616..6feded78ed 100644 --- a/src/RWStepFEA/RWStepFEA_RWCurveElementIntervalLinearlyVarying.cxx +++ b/src/RWStepFEA/RWStepFEA_RWCurveElementIntervalLinearlyVarying.cxx @@ -21,8 +21,6 @@ #include #include #include -#include -#include #include #include diff --git a/src/RWStepFEA/RWStepFEA_RWCurveElementLocation.cxx b/src/RWStepFEA/RWStepFEA_RWCurveElementLocation.cxx index 1ba98c9576..c251c6426a 100644 --- a/src/RWStepFEA/RWStepFEA_RWCurveElementLocation.cxx +++ b/src/RWStepFEA/RWStepFEA_RWCurveElementLocation.cxx @@ -15,7 +15,6 @@ // Generator: ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V1.2 -#include #include #include #include diff --git a/src/RWStepFEA/RWStepFEA_RWElementGeometricRelationship.cxx b/src/RWStepFEA/RWStepFEA_RWElementGeometricRelationship.cxx index 79b300ffc1..e641303644 100644 --- a/src/RWStepFEA/RWStepFEA_RWElementGeometricRelationship.cxx +++ b/src/RWStepFEA/RWStepFEA_RWElementGeometricRelationship.cxx @@ -15,7 +15,6 @@ // Generator: ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V1.2 -#include #include #include #include diff --git a/src/RWStepFEA/RWStepFEA_RWFeaAreaDensity.cxx b/src/RWStepFEA/RWStepFEA_RWFeaAreaDensity.cxx index bb932f1236..05d3ea4f83 100644 --- a/src/RWStepFEA/RWStepFEA_RWFeaAreaDensity.cxx +++ b/src/RWStepFEA/RWStepFEA_RWFeaAreaDensity.cxx @@ -15,7 +15,6 @@ // Generator: ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V1.2 -#include #include #include #include diff --git a/src/RWStepFEA/RWStepFEA_RWFeaAxis2Placement3d.cxx b/src/RWStepFEA/RWStepFEA_RWFeaAxis2Placement3d.cxx index ceb0c8a869..e296d7ce7f 100644 --- a/src/RWStepFEA/RWStepFEA_RWFeaAxis2Placement3d.cxx +++ b/src/RWStepFEA/RWStepFEA_RWFeaAxis2Placement3d.cxx @@ -15,7 +15,6 @@ // Generator: ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V1.2 -#include #include #include #include diff --git a/src/RWStepFEA/RWStepFEA_RWFeaCurveSectionGeometricRelationship.cxx b/src/RWStepFEA/RWStepFEA_RWFeaCurveSectionGeometricRelationship.cxx index e857ac9e54..3a8c03c67b 100644 --- a/src/RWStepFEA/RWStepFEA_RWFeaCurveSectionGeometricRelationship.cxx +++ b/src/RWStepFEA/RWStepFEA_RWFeaCurveSectionGeometricRelationship.cxx @@ -15,7 +15,6 @@ // Generator: ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V1.2 -#include #include #include #include diff --git a/src/RWStepFEA/RWStepFEA_RWFeaGroup.cxx b/src/RWStepFEA/RWStepFEA_RWFeaGroup.cxx index acfe6285cd..6b2b7a1a64 100644 --- a/src/RWStepFEA/RWStepFEA_RWFeaGroup.cxx +++ b/src/RWStepFEA/RWStepFEA_RWFeaGroup.cxx @@ -15,7 +15,6 @@ // Generator: ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V1.2 -#include #include #include #include diff --git a/src/RWStepFEA/RWStepFEA_RWFeaLinearElasticity.cxx b/src/RWStepFEA/RWStepFEA_RWFeaLinearElasticity.cxx index b37a464597..5c7c6330f0 100644 --- a/src/RWStepFEA/RWStepFEA_RWFeaLinearElasticity.cxx +++ b/src/RWStepFEA/RWStepFEA_RWFeaLinearElasticity.cxx @@ -15,14 +15,11 @@ // Generator: ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V1.2 -#include #include #include #include #include #include -#include -#include //======================================================================= //function : RWStepFEA_RWFeaLinearElasticity diff --git a/src/RWStepFEA/RWStepFEA_RWFeaMassDensity.cxx b/src/RWStepFEA/RWStepFEA_RWFeaMassDensity.cxx index 81a26de496..fd3920aff9 100644 --- a/src/RWStepFEA/RWStepFEA_RWFeaMassDensity.cxx +++ b/src/RWStepFEA/RWStepFEA_RWFeaMassDensity.cxx @@ -15,7 +15,6 @@ // Generator: ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V1.2 -#include #include #include #include diff --git a/src/RWStepFEA/RWStepFEA_RWFeaMaterialPropertyRepresentation.cxx b/src/RWStepFEA/RWStepFEA_RWFeaMaterialPropertyRepresentation.cxx index 627b8e2783..06857d311f 100644 --- a/src/RWStepFEA/RWStepFEA_RWFeaMaterialPropertyRepresentation.cxx +++ b/src/RWStepFEA/RWStepFEA_RWFeaMaterialPropertyRepresentation.cxx @@ -15,7 +15,6 @@ // Generator: ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V1.2 -#include #include #include #include diff --git a/src/RWStepFEA/RWStepFEA_RWFeaMaterialPropertyRepresentationItem.cxx b/src/RWStepFEA/RWStepFEA_RWFeaMaterialPropertyRepresentationItem.cxx index 1af18f439e..8605c42765 100644 --- a/src/RWStepFEA/RWStepFEA_RWFeaMaterialPropertyRepresentationItem.cxx +++ b/src/RWStepFEA/RWStepFEA_RWFeaMaterialPropertyRepresentationItem.cxx @@ -15,7 +15,6 @@ // Generator: ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V1.2 -#include #include #include #include diff --git a/src/RWStepFEA/RWStepFEA_RWFeaModelDefinition.cxx b/src/RWStepFEA/RWStepFEA_RWFeaModelDefinition.cxx index 7b2664e13b..b2d48cd815 100644 --- a/src/RWStepFEA/RWStepFEA_RWFeaModelDefinition.cxx +++ b/src/RWStepFEA/RWStepFEA_RWFeaModelDefinition.cxx @@ -15,7 +15,6 @@ // Generator: ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V1.2 -#include #include #include #include diff --git a/src/RWStepFEA/RWStepFEA_RWFeaMoistureAbsorption.cxx b/src/RWStepFEA/RWStepFEA_RWFeaMoistureAbsorption.cxx index 9e65902215..d391fa269b 100644 --- a/src/RWStepFEA/RWStepFEA_RWFeaMoistureAbsorption.cxx +++ b/src/RWStepFEA/RWStepFEA_RWFeaMoistureAbsorption.cxx @@ -15,7 +15,6 @@ // Generator: ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V1.2 -#include #include #include #include diff --git a/src/RWStepFEA/RWStepFEA_RWFeaRepresentationItem.cxx b/src/RWStepFEA/RWStepFEA_RWFeaRepresentationItem.cxx index 5761c593f1..2602d1b733 100644 --- a/src/RWStepFEA/RWStepFEA_RWFeaRepresentationItem.cxx +++ b/src/RWStepFEA/RWStepFEA_RWFeaRepresentationItem.cxx @@ -15,7 +15,6 @@ // Generator: ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V1.2 -#include #include #include #include diff --git a/src/RWStepFEA/RWStepFEA_RWFeaSecantCoefficientOfLinearThermalExpansion.cxx b/src/RWStepFEA/RWStepFEA_RWFeaSecantCoefficientOfLinearThermalExpansion.cxx index bfacedf49b..0b0eec712e 100644 --- a/src/RWStepFEA/RWStepFEA_RWFeaSecantCoefficientOfLinearThermalExpansion.cxx +++ b/src/RWStepFEA/RWStepFEA_RWFeaSecantCoefficientOfLinearThermalExpansion.cxx @@ -15,7 +15,6 @@ // Generator: ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V1.2 -#include #include #include #include diff --git a/src/RWStepFEA/RWStepFEA_RWFeaShellBendingStiffness.cxx b/src/RWStepFEA/RWStepFEA_RWFeaShellBendingStiffness.cxx index 3e156c5315..577aa76490 100644 --- a/src/RWStepFEA/RWStepFEA_RWFeaShellBendingStiffness.cxx +++ b/src/RWStepFEA/RWStepFEA_RWFeaShellBendingStiffness.cxx @@ -15,7 +15,6 @@ // Generator: ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V1.2 -#include #include #include #include diff --git a/src/RWStepFEA/RWStepFEA_RWFeaShellMembraneBendingCouplingStiffness.cxx b/src/RWStepFEA/RWStepFEA_RWFeaShellMembraneBendingCouplingStiffness.cxx index faa4e21e67..2deba5f04b 100644 --- a/src/RWStepFEA/RWStepFEA_RWFeaShellMembraneBendingCouplingStiffness.cxx +++ b/src/RWStepFEA/RWStepFEA_RWFeaShellMembraneBendingCouplingStiffness.cxx @@ -15,7 +15,6 @@ // Generator: ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V1.2 -#include #include #include #include diff --git a/src/RWStepFEA/RWStepFEA_RWFeaShellMembraneStiffness.cxx b/src/RWStepFEA/RWStepFEA_RWFeaShellMembraneStiffness.cxx index 70094d3d4d..a4382ed6a6 100644 --- a/src/RWStepFEA/RWStepFEA_RWFeaShellMembraneStiffness.cxx +++ b/src/RWStepFEA/RWStepFEA_RWFeaShellMembraneStiffness.cxx @@ -15,7 +15,6 @@ // Generator: ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V1.2 -#include #include #include #include diff --git a/src/RWStepFEA/RWStepFEA_RWFeaShellShearStiffness.cxx b/src/RWStepFEA/RWStepFEA_RWFeaShellShearStiffness.cxx index 5e497c6676..02ef4059b1 100644 --- a/src/RWStepFEA/RWStepFEA_RWFeaShellShearStiffness.cxx +++ b/src/RWStepFEA/RWStepFEA_RWFeaShellShearStiffness.cxx @@ -15,7 +15,6 @@ // Generator: ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V1.2 -#include #include #include #include diff --git a/src/RWStepFEA/RWStepFEA_RWFeaSurfaceSectionGeometricRelationship.cxx b/src/RWStepFEA/RWStepFEA_RWFeaSurfaceSectionGeometricRelationship.cxx index e737a17ad1..33eacaccc3 100644 --- a/src/RWStepFEA/RWStepFEA_RWFeaSurfaceSectionGeometricRelationship.cxx +++ b/src/RWStepFEA/RWStepFEA_RWFeaSurfaceSectionGeometricRelationship.cxx @@ -15,7 +15,6 @@ // Generator: ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V1.2 -#include #include #include #include diff --git a/src/RWStepFEA/RWStepFEA_RWFeaTangentialCoefficientOfLinearThermalExpansion.cxx b/src/RWStepFEA/RWStepFEA_RWFeaTangentialCoefficientOfLinearThermalExpansion.cxx index e076688fa1..471a0287b8 100644 --- a/src/RWStepFEA/RWStepFEA_RWFeaTangentialCoefficientOfLinearThermalExpansion.cxx +++ b/src/RWStepFEA/RWStepFEA_RWFeaTangentialCoefficientOfLinearThermalExpansion.cxx @@ -15,7 +15,6 @@ // Generator: ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V1.2 -#include #include #include #include diff --git a/src/RWStepFEA/RWStepFEA_RWFreedomAndCoefficient.cxx b/src/RWStepFEA/RWStepFEA_RWFreedomAndCoefficient.cxx index 647cbef7e7..75b03367a0 100644 --- a/src/RWStepFEA/RWStepFEA_RWFreedomAndCoefficient.cxx +++ b/src/RWStepFEA/RWStepFEA_RWFreedomAndCoefficient.cxx @@ -15,7 +15,6 @@ // Generator: ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V1.2 -#include #include #include #include diff --git a/src/RWStepFEA/RWStepFEA_RWFreedomsList.cxx b/src/RWStepFEA/RWStepFEA_RWFreedomsList.cxx index 2066de13a8..d1171d1107 100644 --- a/src/RWStepFEA/RWStepFEA_RWFreedomsList.cxx +++ b/src/RWStepFEA/RWStepFEA_RWFreedomsList.cxx @@ -20,7 +20,6 @@ #include #include #include -#include #include #include diff --git a/src/RWStepFEA/RWStepFEA_RWNodeDefinition.cxx b/src/RWStepFEA/RWStepFEA_RWNodeDefinition.cxx index 4861ce05c0..e5cc8f6ee1 100644 --- a/src/RWStepFEA/RWStepFEA_RWNodeDefinition.cxx +++ b/src/RWStepFEA/RWStepFEA_RWNodeDefinition.cxx @@ -15,7 +15,6 @@ // Generator: ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V1.2 -#include #include #include #include diff --git a/src/RWStepFEA/RWStepFEA_RWNodeGroup.cxx b/src/RWStepFEA/RWStepFEA_RWNodeGroup.cxx index 24e78e60c3..2e421811f6 100644 --- a/src/RWStepFEA/RWStepFEA_RWNodeGroup.cxx +++ b/src/RWStepFEA/RWStepFEA_RWNodeGroup.cxx @@ -21,7 +21,6 @@ #include #include #include -#include #include #include diff --git a/src/RWStepFEA/RWStepFEA_RWNodeSet.cxx b/src/RWStepFEA/RWStepFEA_RWNodeSet.cxx index 9d883edd96..931b1e3e91 100644 --- a/src/RWStepFEA/RWStepFEA_RWNodeSet.cxx +++ b/src/RWStepFEA/RWStepFEA_RWNodeSet.cxx @@ -20,7 +20,6 @@ #include #include #include -#include #include #include diff --git a/src/RWStepFEA/RWStepFEA_RWParametricCurve3dElementCoordinateDirection.cxx b/src/RWStepFEA/RWStepFEA_RWParametricCurve3dElementCoordinateDirection.cxx index d6373011f5..e891e663aa 100644 --- a/src/RWStepFEA/RWStepFEA_RWParametricCurve3dElementCoordinateDirection.cxx +++ b/src/RWStepFEA/RWStepFEA_RWParametricCurve3dElementCoordinateDirection.cxx @@ -15,7 +15,6 @@ // Generator: ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V1.2 -#include #include #include #include diff --git a/src/RWStepFEA/RWStepFEA_RWParametricCurve3dElementCoordinateSystem.cxx b/src/RWStepFEA/RWStepFEA_RWParametricCurve3dElementCoordinateSystem.cxx index 605b0d4b23..fc0accbcc0 100644 --- a/src/RWStepFEA/RWStepFEA_RWParametricCurve3dElementCoordinateSystem.cxx +++ b/src/RWStepFEA/RWStepFEA_RWParametricCurve3dElementCoordinateSystem.cxx @@ -15,7 +15,6 @@ // Generator: ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V1.2 -#include #include #include #include diff --git a/src/RWStepFEA/RWStepFEA_RWParametricSurface3dElementCoordinateSystem.cxx b/src/RWStepFEA/RWStepFEA_RWParametricSurface3dElementCoordinateSystem.cxx index 0e6b9cab23..376af8c837 100644 --- a/src/RWStepFEA/RWStepFEA_RWParametricSurface3dElementCoordinateSystem.cxx +++ b/src/RWStepFEA/RWStepFEA_RWParametricSurface3dElementCoordinateSystem.cxx @@ -15,7 +15,6 @@ // Generator: ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V1.2 -#include #include #include #include diff --git a/src/RWStepFEA/RWStepFEA_RWSurface3dElementRepresentation.cxx b/src/RWStepFEA/RWStepFEA_RWSurface3dElementRepresentation.cxx index d7606faa8b..0ca6ff2b78 100644 --- a/src/RWStepFEA/RWStepFEA_RWSurface3dElementRepresentation.cxx +++ b/src/RWStepFEA/RWStepFEA_RWSurface3dElementRepresentation.cxx @@ -24,7 +24,6 @@ #include #include #include -#include #include #include #include diff --git a/src/RWStepFEA/RWStepFEA_RWVolume3dElementRepresentation.cxx b/src/RWStepFEA/RWStepFEA_RWVolume3dElementRepresentation.cxx index 53375399ab..7d516fe9b1 100644 --- a/src/RWStepFEA/RWStepFEA_RWVolume3dElementRepresentation.cxx +++ b/src/RWStepFEA/RWStepFEA_RWVolume3dElementRepresentation.cxx @@ -23,7 +23,6 @@ #include #include #include -#include #include #include #include diff --git a/src/RWStepGeom/RWStepGeom_RWAxis1Placement.cxx b/src/RWStepGeom/RWStepGeom_RWAxis1Placement.cxx index ffd89ded18..0ff11df421 100644 --- a/src/RWStepGeom/RWStepGeom_RWAxis1Placement.cxx +++ b/src/RWStepGeom/RWStepGeom_RWAxis1Placement.cxx @@ -12,7 +12,6 @@ // commercial license or contractual agreement. -#include #include #include #include diff --git a/src/RWStepGeom/RWStepGeom_RWAxis2Placement2d.cxx b/src/RWStepGeom/RWStepGeom_RWAxis2Placement2d.cxx index 747833350b..08d0a93cbb 100644 --- a/src/RWStepGeom/RWStepGeom_RWAxis2Placement2d.cxx +++ b/src/RWStepGeom/RWStepGeom_RWAxis2Placement2d.cxx @@ -12,7 +12,6 @@ // commercial license or contractual agreement. -#include #include #include #include diff --git a/src/RWStepGeom/RWStepGeom_RWAxis2Placement3d.cxx b/src/RWStepGeom/RWStepGeom_RWAxis2Placement3d.cxx index d1ab51f72e..1341cbc88e 100644 --- a/src/RWStepGeom/RWStepGeom_RWAxis2Placement3d.cxx +++ b/src/RWStepGeom/RWStepGeom_RWAxis2Placement3d.cxx @@ -12,7 +12,6 @@ // commercial license or contractual agreement. -#include #include #include #include diff --git a/src/RWStepGeom/RWStepGeom_RWBSplineCurve.cxx b/src/RWStepGeom/RWStepGeom_RWBSplineCurve.cxx index e41e2303b9..5995c45398 100644 --- a/src/RWStepGeom/RWStepGeom_RWBSplineCurve.cxx +++ b/src/RWStepGeom/RWStepGeom_RWBSplineCurve.cxx @@ -15,7 +15,6 @@ #include #include #include -#include #include #include #include diff --git a/src/RWStepGeom/RWStepGeom_RWBSplineCurveWithKnots.cxx b/src/RWStepGeom/RWStepGeom_RWBSplineCurveWithKnots.cxx index 0a64fd3d05..6faa4d6ce0 100644 --- a/src/RWStepGeom/RWStepGeom_RWBSplineCurveWithKnots.cxx +++ b/src/RWStepGeom/RWStepGeom_RWBSplineCurveWithKnots.cxx @@ -16,10 +16,8 @@ #include #include #include -#include #include #include -#include #include #include #include diff --git a/src/RWStepGeom/RWStepGeom_RWBSplineCurveWithKnotsAndRationalBSplineCurve.cxx b/src/RWStepGeom/RWStepGeom_RWBSplineCurveWithKnotsAndRationalBSplineCurve.cxx index 3335d0ec1f..416b9c86a9 100644 --- a/src/RWStepGeom/RWStepGeom_RWBSplineCurveWithKnotsAndRationalBSplineCurve.cxx +++ b/src/RWStepGeom/RWStepGeom_RWBSplineCurveWithKnotsAndRationalBSplineCurve.cxx @@ -19,10 +19,8 @@ #include #include #include -#include #include #include -#include #include #include #include diff --git a/src/RWStepGeom/RWStepGeom_RWBSplineSurface.cxx b/src/RWStepGeom/RWStepGeom_RWBSplineSurface.cxx index b8a62f805a..51876da8fe 100644 --- a/src/RWStepGeom/RWStepGeom_RWBSplineSurface.cxx +++ b/src/RWStepGeom/RWStepGeom_RWBSplineSurface.cxx @@ -15,7 +15,6 @@ #include #include #include -#include #include #include #include diff --git a/src/RWStepGeom/RWStepGeom_RWBSplineSurfaceWithKnots.cxx b/src/RWStepGeom/RWStepGeom_RWBSplineSurfaceWithKnots.cxx index a15faef3e6..77203c6ddd 100644 --- a/src/RWStepGeom/RWStepGeom_RWBSplineSurfaceWithKnots.cxx +++ b/src/RWStepGeom/RWStepGeom_RWBSplineSurfaceWithKnots.cxx @@ -16,10 +16,8 @@ #include #include #include -#include #include #include -#include #include #include #include diff --git a/src/RWStepGeom/RWStepGeom_RWBSplineSurfaceWithKnotsAndRationalBSplineSurface.cxx b/src/RWStepGeom/RWStepGeom_RWBSplineSurfaceWithKnotsAndRationalBSplineSurface.cxx index adc7ba26b3..1e106df80a 100644 --- a/src/RWStepGeom/RWStepGeom_RWBSplineSurfaceWithKnotsAndRationalBSplineSurface.cxx +++ b/src/RWStepGeom/RWStepGeom_RWBSplineSurfaceWithKnotsAndRationalBSplineSurface.cxx @@ -18,10 +18,8 @@ #include #include #include -#include #include #include -#include #include #include #include diff --git a/src/RWStepGeom/RWStepGeom_RWBezierCurve.cxx b/src/RWStepGeom/RWStepGeom_RWBezierCurve.cxx index ba1a287a1d..05b4e4afc0 100644 --- a/src/RWStepGeom/RWStepGeom_RWBezierCurve.cxx +++ b/src/RWStepGeom/RWStepGeom_RWBezierCurve.cxx @@ -15,7 +15,6 @@ #include #include #include -#include #include #include #include diff --git a/src/RWStepGeom/RWStepGeom_RWBezierCurveAndRationalBSplineCurve.cxx b/src/RWStepGeom/RWStepGeom_RWBezierCurveAndRationalBSplineCurve.cxx index 1ae4bac3b5..4e5c51589d 100644 --- a/src/RWStepGeom/RWStepGeom_RWBezierCurveAndRationalBSplineCurve.cxx +++ b/src/RWStepGeom/RWStepGeom_RWBezierCurveAndRationalBSplineCurve.cxx @@ -15,15 +15,12 @@ #include #include #include -#include #include #include -#include #include #include #include #include -#include #include // --- Enum : BSplineCurveForm --- diff --git a/src/RWStepGeom/RWStepGeom_RWBezierSurface.cxx b/src/RWStepGeom/RWStepGeom_RWBezierSurface.cxx index eb0d0aafbf..99ed6a5ed1 100644 --- a/src/RWStepGeom/RWStepGeom_RWBezierSurface.cxx +++ b/src/RWStepGeom/RWStepGeom_RWBezierSurface.cxx @@ -15,7 +15,6 @@ #include #include #include -#include #include #include #include diff --git a/src/RWStepGeom/RWStepGeom_RWBezierSurfaceAndRationalBSplineSurface.cxx b/src/RWStepGeom/RWStepGeom_RWBezierSurfaceAndRationalBSplineSurface.cxx index 9a7369dc27..6886954cb6 100644 --- a/src/RWStepGeom/RWStepGeom_RWBezierSurfaceAndRationalBSplineSurface.cxx +++ b/src/RWStepGeom/RWStepGeom_RWBezierSurfaceAndRationalBSplineSurface.cxx @@ -15,15 +15,12 @@ #include #include #include -#include #include #include -#include #include #include #include #include -#include #include // --- Enum : BSplineSurfaceForm --- diff --git a/src/RWStepGeom/RWStepGeom_RWBoundaryCurve.cxx b/src/RWStepGeom/RWStepGeom_RWBoundaryCurve.cxx index 1c6dddae51..26c7909c3c 100644 --- a/src/RWStepGeom/RWStepGeom_RWBoundaryCurve.cxx +++ b/src/RWStepGeom/RWStepGeom_RWBoundaryCurve.cxx @@ -15,7 +15,6 @@ #include #include #include -#include #include #include #include diff --git a/src/RWStepGeom/RWStepGeom_RWBoundedCurve.cxx b/src/RWStepGeom/RWStepGeom_RWBoundedCurve.cxx index ce4d68745c..ada41111eb 100644 --- a/src/RWStepGeom/RWStepGeom_RWBoundedCurve.cxx +++ b/src/RWStepGeom/RWStepGeom_RWBoundedCurve.cxx @@ -12,7 +12,6 @@ // commercial license or contractual agreement. -#include #include #include #include diff --git a/src/RWStepGeom/RWStepGeom_RWBoundedSurface.cxx b/src/RWStepGeom/RWStepGeom_RWBoundedSurface.cxx index 2f5633c1f1..745b3e4bd3 100644 --- a/src/RWStepGeom/RWStepGeom_RWBoundedSurface.cxx +++ b/src/RWStepGeom/RWStepGeom_RWBoundedSurface.cxx @@ -12,7 +12,6 @@ // commercial license or contractual agreement. -#include #include #include #include diff --git a/src/RWStepGeom/RWStepGeom_RWCartesianTransformationOperator.cxx b/src/RWStepGeom/RWStepGeom_RWCartesianTransformationOperator.cxx index 575bb82d4c..fb4e7d1dcb 100644 --- a/src/RWStepGeom/RWStepGeom_RWCartesianTransformationOperator.cxx +++ b/src/RWStepGeom/RWStepGeom_RWCartesianTransformationOperator.cxx @@ -12,7 +12,6 @@ // commercial license or contractual agreement. -#include #include #include #include diff --git a/src/RWStepGeom/RWStepGeom_RWCartesianTransformationOperator3d.cxx b/src/RWStepGeom/RWStepGeom_RWCartesianTransformationOperator3d.cxx index 73033fe9c7..0fff525e63 100644 --- a/src/RWStepGeom/RWStepGeom_RWCartesianTransformationOperator3d.cxx +++ b/src/RWStepGeom/RWStepGeom_RWCartesianTransformationOperator3d.cxx @@ -12,7 +12,6 @@ // commercial license or contractual agreement. -#include #include #include #include diff --git a/src/RWStepGeom/RWStepGeom_RWCircle.cxx b/src/RWStepGeom/RWStepGeom_RWCircle.cxx index 69550720ad..63ba5708e8 100644 --- a/src/RWStepGeom/RWStepGeom_RWCircle.cxx +++ b/src/RWStepGeom/RWStepGeom_RWCircle.cxx @@ -12,12 +12,10 @@ // commercial license or contractual agreement. -#include #include #include #include #include -#include #include RWStepGeom_RWCircle::RWStepGeom_RWCircle () {} diff --git a/src/RWStepGeom/RWStepGeom_RWCompositeCurve.cxx b/src/RWStepGeom/RWStepGeom_RWCompositeCurve.cxx index 914baa79cf..49304aa7d6 100644 --- a/src/RWStepGeom/RWStepGeom_RWCompositeCurve.cxx +++ b/src/RWStepGeom/RWStepGeom_RWCompositeCurve.cxx @@ -15,7 +15,6 @@ #include #include #include -#include #include #include #include diff --git a/src/RWStepGeom/RWStepGeom_RWCompositeCurveOnSurface.cxx b/src/RWStepGeom/RWStepGeom_RWCompositeCurveOnSurface.cxx index 45763ce431..304d83a649 100644 --- a/src/RWStepGeom/RWStepGeom_RWCompositeCurveOnSurface.cxx +++ b/src/RWStepGeom/RWStepGeom_RWCompositeCurveOnSurface.cxx @@ -15,7 +15,6 @@ #include #include #include -#include #include #include #include diff --git a/src/RWStepGeom/RWStepGeom_RWCompositeCurveSegment.cxx b/src/RWStepGeom/RWStepGeom_RWCompositeCurveSegment.cxx index 79cccfefc5..70b22306cb 100644 --- a/src/RWStepGeom/RWStepGeom_RWCompositeCurveSegment.cxx +++ b/src/RWStepGeom/RWStepGeom_RWCompositeCurveSegment.cxx @@ -12,7 +12,6 @@ // commercial license or contractual agreement. -#include #include #include #include diff --git a/src/RWStepGeom/RWStepGeom_RWConic.cxx b/src/RWStepGeom/RWStepGeom_RWConic.cxx index 3db33f1163..1bf1562579 100644 --- a/src/RWStepGeom/RWStepGeom_RWConic.cxx +++ b/src/RWStepGeom/RWStepGeom_RWConic.cxx @@ -12,12 +12,10 @@ // commercial license or contractual agreement. -#include #include #include #include #include -#include #include RWStepGeom_RWConic::RWStepGeom_RWConic () {} diff --git a/src/RWStepGeom/RWStepGeom_RWConicalSurface.cxx b/src/RWStepGeom/RWStepGeom_RWConicalSurface.cxx index d2e7d24413..93d2f593a3 100644 --- a/src/RWStepGeom/RWStepGeom_RWConicalSurface.cxx +++ b/src/RWStepGeom/RWStepGeom_RWConicalSurface.cxx @@ -12,7 +12,6 @@ // commercial license or contractual agreement. -#include #include #include #include diff --git a/src/RWStepGeom/RWStepGeom_RWCurve.cxx b/src/RWStepGeom/RWStepGeom_RWCurve.cxx index 0bf8bdd563..841fec18c8 100644 --- a/src/RWStepGeom/RWStepGeom_RWCurve.cxx +++ b/src/RWStepGeom/RWStepGeom_RWCurve.cxx @@ -12,7 +12,6 @@ // commercial license or contractual agreement. -#include #include #include #include diff --git a/src/RWStepGeom/RWStepGeom_RWCurveReplica.cxx b/src/RWStepGeom/RWStepGeom_RWCurveReplica.cxx index 5a1a867533..ebc4f6d4c0 100644 --- a/src/RWStepGeom/RWStepGeom_RWCurveReplica.cxx +++ b/src/RWStepGeom/RWStepGeom_RWCurveReplica.cxx @@ -12,13 +12,11 @@ // commercial license or contractual agreement. -#include #include #include #include #include #include -#include #include RWStepGeom_RWCurveReplica::RWStepGeom_RWCurveReplica () {} diff --git a/src/RWStepGeom/RWStepGeom_RWCylindricalSurface.cxx b/src/RWStepGeom/RWStepGeom_RWCylindricalSurface.cxx index ae0124cede..4f11e645c5 100644 --- a/src/RWStepGeom/RWStepGeom_RWCylindricalSurface.cxx +++ b/src/RWStepGeom/RWStepGeom_RWCylindricalSurface.cxx @@ -12,7 +12,6 @@ // commercial license or contractual agreement. -#include #include #include #include diff --git a/src/RWStepGeom/RWStepGeom_RWDegeneratePcurve.cxx b/src/RWStepGeom/RWStepGeom_RWDegeneratePcurve.cxx index 690fc22a2e..aea23c1481 100644 --- a/src/RWStepGeom/RWStepGeom_RWDegeneratePcurve.cxx +++ b/src/RWStepGeom/RWStepGeom_RWDegeneratePcurve.cxx @@ -12,7 +12,6 @@ // commercial license or contractual agreement. -#include #include #include #include diff --git a/src/RWStepGeom/RWStepGeom_RWDegenerateToroidalSurface.cxx b/src/RWStepGeom/RWStepGeom_RWDegenerateToroidalSurface.cxx index 7e7c63134b..09883e1e14 100644 --- a/src/RWStepGeom/RWStepGeom_RWDegenerateToroidalSurface.cxx +++ b/src/RWStepGeom/RWStepGeom_RWDegenerateToroidalSurface.cxx @@ -12,7 +12,6 @@ // commercial license or contractual agreement. -#include #include #include #include diff --git a/src/RWStepGeom/RWStepGeom_RWElementarySurface.cxx b/src/RWStepGeom/RWStepGeom_RWElementarySurface.cxx index 205a6cbe96..14f07293a4 100644 --- a/src/RWStepGeom/RWStepGeom_RWElementarySurface.cxx +++ b/src/RWStepGeom/RWStepGeom_RWElementarySurface.cxx @@ -12,7 +12,6 @@ // commercial license or contractual agreement. -#include #include #include #include diff --git a/src/RWStepGeom/RWStepGeom_RWEllipse.cxx b/src/RWStepGeom/RWStepGeom_RWEllipse.cxx index 538cdd95ab..7831cd01c8 100644 --- a/src/RWStepGeom/RWStepGeom_RWEllipse.cxx +++ b/src/RWStepGeom/RWStepGeom_RWEllipse.cxx @@ -12,13 +12,11 @@ // commercial license or contractual agreement. -#include #include #include #include #include #include -#include #include RWStepGeom_RWEllipse::RWStepGeom_RWEllipse () {} diff --git a/src/RWStepGeom/RWStepGeom_RWEvaluatedDegeneratePcurve.cxx b/src/RWStepGeom/RWStepGeom_RWEvaluatedDegeneratePcurve.cxx index ef1b3d93ed..2e915dd569 100644 --- a/src/RWStepGeom/RWStepGeom_RWEvaluatedDegeneratePcurve.cxx +++ b/src/RWStepGeom/RWStepGeom_RWEvaluatedDegeneratePcurve.cxx @@ -12,7 +12,6 @@ // commercial license or contractual agreement. -#include #include #include #include diff --git a/src/RWStepGeom/RWStepGeom_RWGeomRepContextAndGlobUnitAssCtxAndGlobUncertaintyAssCtx.cxx b/src/RWStepGeom/RWStepGeom_RWGeomRepContextAndGlobUnitAssCtxAndGlobUncertaintyAssCtx.cxx index 079106facc..08e5798e3f 100644 --- a/src/RWStepGeom/RWStepGeom_RWGeomRepContextAndGlobUnitAssCtxAndGlobUncertaintyAssCtx.cxx +++ b/src/RWStepGeom/RWStepGeom_RWGeomRepContextAndGlobUnitAssCtxAndGlobUncertaintyAssCtx.cxx @@ -15,15 +15,9 @@ #include #include #include -#include -#include -#include -#include #include #include -#include #include -#include RWStepGeom_RWGeomRepContextAndGlobUnitAssCtxAndGlobUncertaintyAssCtx::RWStepGeom_RWGeomRepContextAndGlobUnitAssCtxAndGlobUncertaintyAssCtx () {} diff --git a/src/RWStepGeom/RWStepGeom_RWGeometricRepresentationContext.cxx b/src/RWStepGeom/RWStepGeom_RWGeometricRepresentationContext.cxx index d6ca5304af..b825e9367c 100644 --- a/src/RWStepGeom/RWStepGeom_RWGeometricRepresentationContext.cxx +++ b/src/RWStepGeom/RWStepGeom_RWGeometricRepresentationContext.cxx @@ -12,7 +12,6 @@ // commercial license or contractual agreement. -#include #include #include #include diff --git a/src/RWStepGeom/RWStepGeom_RWGeometricRepresentationContextAndGlobalUnitAssignedContext.cxx b/src/RWStepGeom/RWStepGeom_RWGeometricRepresentationContextAndGlobalUnitAssignedContext.cxx index 23dd4a4404..75877c9fc7 100644 --- a/src/RWStepGeom/RWStepGeom_RWGeometricRepresentationContextAndGlobalUnitAssignedContext.cxx +++ b/src/RWStepGeom/RWStepGeom_RWGeometricRepresentationContextAndGlobalUnitAssignedContext.cxx @@ -15,13 +15,9 @@ #include #include #include -#include -#include #include #include -#include #include -#include RWStepGeom_RWGeometricRepresentationContextAndGlobalUnitAssignedContext::RWStepGeom_RWGeometricRepresentationContextAndGlobalUnitAssignedContext () {} diff --git a/src/RWStepGeom/RWStepGeom_RWGeometricRepresentationContextAndParametricRepresentationContext.cxx b/src/RWStepGeom/RWStepGeom_RWGeometricRepresentationContextAndParametricRepresentationContext.cxx index f81e9854d0..d6375e17e7 100644 --- a/src/RWStepGeom/RWStepGeom_RWGeometricRepresentationContextAndParametricRepresentationContext.cxx +++ b/src/RWStepGeom/RWStepGeom_RWGeometricRepresentationContextAndParametricRepresentationContext.cxx @@ -12,12 +12,10 @@ // commercial license or contractual agreement. -#include #include #include #include #include -#include #include RWStepGeom_RWGeometricRepresentationContextAndParametricRepresentationContext::RWStepGeom_RWGeometricRepresentationContextAndParametricRepresentationContext () {} diff --git a/src/RWStepGeom/RWStepGeom_RWGeometricRepresentationItem.cxx b/src/RWStepGeom/RWStepGeom_RWGeometricRepresentationItem.cxx index 2b65b82c90..481d84abc8 100644 --- a/src/RWStepGeom/RWStepGeom_RWGeometricRepresentationItem.cxx +++ b/src/RWStepGeom/RWStepGeom_RWGeometricRepresentationItem.cxx @@ -12,7 +12,6 @@ // commercial license or contractual agreement. -#include #include #include #include diff --git a/src/RWStepGeom/RWStepGeom_RWHyperbola.cxx b/src/RWStepGeom/RWStepGeom_RWHyperbola.cxx index b3c4df7473..545b525494 100644 --- a/src/RWStepGeom/RWStepGeom_RWHyperbola.cxx +++ b/src/RWStepGeom/RWStepGeom_RWHyperbola.cxx @@ -12,12 +12,10 @@ // commercial license or contractual agreement. -#include #include #include #include #include -#include #include RWStepGeom_RWHyperbola::RWStepGeom_RWHyperbola () {} diff --git a/src/RWStepGeom/RWStepGeom_RWIntersectionCurve.cxx b/src/RWStepGeom/RWStepGeom_RWIntersectionCurve.cxx index 3727054313..b3d8b4a5c7 100644 --- a/src/RWStepGeom/RWStepGeom_RWIntersectionCurve.cxx +++ b/src/RWStepGeom/RWStepGeom_RWIntersectionCurve.cxx @@ -17,8 +17,6 @@ #include #include #include -#include -#include #include #include #include diff --git a/src/RWStepGeom/RWStepGeom_RWLine.cxx b/src/RWStepGeom/RWStepGeom_RWLine.cxx index 135a769255..08954a583d 100644 --- a/src/RWStepGeom/RWStepGeom_RWLine.cxx +++ b/src/RWStepGeom/RWStepGeom_RWLine.cxx @@ -12,7 +12,6 @@ // commercial license or contractual agreement. -#include #include #include #include diff --git a/src/RWStepGeom/RWStepGeom_RWOffsetCurve3d.cxx b/src/RWStepGeom/RWStepGeom_RWOffsetCurve3d.cxx index ae9675388c..dc2c1273a9 100644 --- a/src/RWStepGeom/RWStepGeom_RWOffsetCurve3d.cxx +++ b/src/RWStepGeom/RWStepGeom_RWOffsetCurve3d.cxx @@ -12,13 +12,10 @@ // commercial license or contractual agreement. -#include #include #include -#include #include #include -#include #include #include diff --git a/src/RWStepGeom/RWStepGeom_RWOffsetSurface.cxx b/src/RWStepGeom/RWStepGeom_RWOffsetSurface.cxx index d82c932097..38d9208713 100644 --- a/src/RWStepGeom/RWStepGeom_RWOffsetSurface.cxx +++ b/src/RWStepGeom/RWStepGeom_RWOffsetSurface.cxx @@ -12,10 +12,8 @@ // commercial license or contractual agreement. -#include #include #include -#include #include #include #include diff --git a/src/RWStepGeom/RWStepGeom_RWOrientedSurface.cxx b/src/RWStepGeom/RWStepGeom_RWOrientedSurface.cxx index 8824da3d07..e73a4e6f4c 100644 --- a/src/RWStepGeom/RWStepGeom_RWOrientedSurface.cxx +++ b/src/RWStepGeom/RWStepGeom_RWOrientedSurface.cxx @@ -15,7 +15,6 @@ // Generator: ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V1.1 -#include #include #include #include diff --git a/src/RWStepGeom/RWStepGeom_RWOuterBoundaryCurve.cxx b/src/RWStepGeom/RWStepGeom_RWOuterBoundaryCurve.cxx index 5f0cb88ce4..4a1be87858 100644 --- a/src/RWStepGeom/RWStepGeom_RWOuterBoundaryCurve.cxx +++ b/src/RWStepGeom/RWStepGeom_RWOuterBoundaryCurve.cxx @@ -15,11 +15,8 @@ #include #include #include -#include #include #include -#include -#include #include RWStepGeom_RWOuterBoundaryCurve::RWStepGeom_RWOuterBoundaryCurve () {} diff --git a/src/RWStepGeom/RWStepGeom_RWParabola.cxx b/src/RWStepGeom/RWStepGeom_RWParabola.cxx index 9fd7666056..835bfc0742 100644 --- a/src/RWStepGeom/RWStepGeom_RWParabola.cxx +++ b/src/RWStepGeom/RWStepGeom_RWParabola.cxx @@ -12,12 +12,10 @@ // commercial license or contractual agreement. -#include #include #include #include #include -#include #include RWStepGeom_RWParabola::RWStepGeom_RWParabola () {} diff --git a/src/RWStepGeom/RWStepGeom_RWPcurve.cxx b/src/RWStepGeom/RWStepGeom_RWPcurve.cxx index c448c06e17..5e28186e19 100644 --- a/src/RWStepGeom/RWStepGeom_RWPcurve.cxx +++ b/src/RWStepGeom/RWStepGeom_RWPcurve.cxx @@ -12,7 +12,6 @@ // commercial license or contractual agreement. -#include #include #include #include diff --git a/src/RWStepGeom/RWStepGeom_RWPlacement.cxx b/src/RWStepGeom/RWStepGeom_RWPlacement.cxx index 02f41ddeb4..276854bed0 100644 --- a/src/RWStepGeom/RWStepGeom_RWPlacement.cxx +++ b/src/RWStepGeom/RWStepGeom_RWPlacement.cxx @@ -12,7 +12,6 @@ // commercial license or contractual agreement. -#include #include #include #include diff --git a/src/RWStepGeom/RWStepGeom_RWPlane.cxx b/src/RWStepGeom/RWStepGeom_RWPlane.cxx index acb0d15ccb..7f99ada800 100644 --- a/src/RWStepGeom/RWStepGeom_RWPlane.cxx +++ b/src/RWStepGeom/RWStepGeom_RWPlane.cxx @@ -12,7 +12,6 @@ // commercial license or contractual agreement. -#include #include #include #include diff --git a/src/RWStepGeom/RWStepGeom_RWPoint.cxx b/src/RWStepGeom/RWStepGeom_RWPoint.cxx index 546ca41b56..a62e54c429 100644 --- a/src/RWStepGeom/RWStepGeom_RWPoint.cxx +++ b/src/RWStepGeom/RWStepGeom_RWPoint.cxx @@ -12,7 +12,6 @@ // commercial license or contractual agreement. -#include #include #include #include diff --git a/src/RWStepGeom/RWStepGeom_RWPointOnCurve.cxx b/src/RWStepGeom/RWStepGeom_RWPointOnCurve.cxx index b3bf73cc6a..8b24e8713e 100644 --- a/src/RWStepGeom/RWStepGeom_RWPointOnCurve.cxx +++ b/src/RWStepGeom/RWStepGeom_RWPointOnCurve.cxx @@ -12,7 +12,6 @@ // commercial license or contractual agreement. -#include #include #include #include diff --git a/src/RWStepGeom/RWStepGeom_RWPointOnSurface.cxx b/src/RWStepGeom/RWStepGeom_RWPointOnSurface.cxx index 06845c2e93..3923126135 100644 --- a/src/RWStepGeom/RWStepGeom_RWPointOnSurface.cxx +++ b/src/RWStepGeom/RWStepGeom_RWPointOnSurface.cxx @@ -12,7 +12,6 @@ // commercial license or contractual agreement. -#include #include #include #include diff --git a/src/RWStepGeom/RWStepGeom_RWPointReplica.cxx b/src/RWStepGeom/RWStepGeom_RWPointReplica.cxx index 1a8b80c40c..93ebb45245 100644 --- a/src/RWStepGeom/RWStepGeom_RWPointReplica.cxx +++ b/src/RWStepGeom/RWStepGeom_RWPointReplica.cxx @@ -12,13 +12,11 @@ // commercial license or contractual agreement. -#include #include #include #include #include #include -#include #include RWStepGeom_RWPointReplica::RWStepGeom_RWPointReplica () {} diff --git a/src/RWStepGeom/RWStepGeom_RWPolyline.cxx b/src/RWStepGeom/RWStepGeom_RWPolyline.cxx index 76b713c740..2db0c34ba7 100644 --- a/src/RWStepGeom/RWStepGeom_RWPolyline.cxx +++ b/src/RWStepGeom/RWStepGeom_RWPolyline.cxx @@ -17,8 +17,6 @@ #include #include #include -#include -#include #include RWStepGeom_RWPolyline::RWStepGeom_RWPolyline () {} diff --git a/src/RWStepGeom/RWStepGeom_RWQuasiUniformCurve.cxx b/src/RWStepGeom/RWStepGeom_RWQuasiUniformCurve.cxx index d32e695186..fc8b9dafd2 100644 --- a/src/RWStepGeom/RWStepGeom_RWQuasiUniformCurve.cxx +++ b/src/RWStepGeom/RWStepGeom_RWQuasiUniformCurve.cxx @@ -15,12 +15,8 @@ #include #include #include -#include #include #include -#include -#include -#include #include // --- Enum : BSplineCurveForm --- diff --git a/src/RWStepGeom/RWStepGeom_RWQuasiUniformCurveAndRationalBSplineCurve.cxx b/src/RWStepGeom/RWStepGeom_RWQuasiUniformCurveAndRationalBSplineCurve.cxx index a26853ca74..c0ad975c19 100644 --- a/src/RWStepGeom/RWStepGeom_RWQuasiUniformCurveAndRationalBSplineCurve.cxx +++ b/src/RWStepGeom/RWStepGeom_RWQuasiUniformCurveAndRationalBSplineCurve.cxx @@ -15,15 +15,9 @@ #include #include #include -#include #include #include -#include -#include -#include -#include #include -#include #include // --- Enum : BSplineCurveForm --- diff --git a/src/RWStepGeom/RWStepGeom_RWQuasiUniformSurface.cxx b/src/RWStepGeom/RWStepGeom_RWQuasiUniformSurface.cxx index 906c4972de..344e58c6e9 100644 --- a/src/RWStepGeom/RWStepGeom_RWQuasiUniformSurface.cxx +++ b/src/RWStepGeom/RWStepGeom_RWQuasiUniformSurface.cxx @@ -15,12 +15,8 @@ #include #include #include -#include #include #include -#include -#include -#include #include // --- Enum : BSplineSurfaceForm --- diff --git a/src/RWStepGeom/RWStepGeom_RWQuasiUniformSurfaceAndRationalBSplineSurface.cxx b/src/RWStepGeom/RWStepGeom_RWQuasiUniformSurfaceAndRationalBSplineSurface.cxx index bdb5d5e654..5adb28f313 100644 --- a/src/RWStepGeom/RWStepGeom_RWQuasiUniformSurfaceAndRationalBSplineSurface.cxx +++ b/src/RWStepGeom/RWStepGeom_RWQuasiUniformSurfaceAndRationalBSplineSurface.cxx @@ -15,15 +15,9 @@ #include #include #include -#include #include #include -#include -#include -#include -#include #include -#include #include // --- Enum : BSplineSurfaceForm --- diff --git a/src/RWStepGeom/RWStepGeom_RWRationalBSplineCurve.cxx b/src/RWStepGeom/RWStepGeom_RWRationalBSplineCurve.cxx index e4df636926..bae56fa1ef 100644 --- a/src/RWStepGeom/RWStepGeom_RWRationalBSplineCurve.cxx +++ b/src/RWStepGeom/RWStepGeom_RWRationalBSplineCurve.cxx @@ -16,12 +16,8 @@ #include #include #include -#include #include #include -#include -#include -#include #include #include diff --git a/src/RWStepGeom/RWStepGeom_RWRationalBSplineSurface.cxx b/src/RWStepGeom/RWStepGeom_RWRationalBSplineSurface.cxx index 26bd64035e..b1d694e654 100644 --- a/src/RWStepGeom/RWStepGeom_RWRationalBSplineSurface.cxx +++ b/src/RWStepGeom/RWStepGeom_RWRationalBSplineSurface.cxx @@ -16,12 +16,8 @@ #include #include #include -#include #include #include -#include -#include -#include #include #include diff --git a/src/RWStepGeom/RWStepGeom_RWRectangularCompositeSurface.cxx b/src/RWStepGeom/RWStepGeom_RWRectangularCompositeSurface.cxx index 1938457bfb..21d425955a 100644 --- a/src/RWStepGeom/RWStepGeom_RWRectangularCompositeSurface.cxx +++ b/src/RWStepGeom/RWStepGeom_RWRectangularCompositeSurface.cxx @@ -17,7 +17,6 @@ #include #include #include -#include #include #include diff --git a/src/RWStepGeom/RWStepGeom_RWRectangularTrimmedSurface.cxx b/src/RWStepGeom/RWStepGeom_RWRectangularTrimmedSurface.cxx index 96879e7746..853ff256d3 100644 --- a/src/RWStepGeom/RWStepGeom_RWRectangularTrimmedSurface.cxx +++ b/src/RWStepGeom/RWStepGeom_RWRectangularTrimmedSurface.cxx @@ -12,7 +12,6 @@ // commercial license or contractual agreement. -#include #include #include #include diff --git a/src/RWStepGeom/RWStepGeom_RWReparametrisedCompositeCurveSegment.cxx b/src/RWStepGeom/RWStepGeom_RWReparametrisedCompositeCurveSegment.cxx index d7203d99f5..25983b0ace 100644 --- a/src/RWStepGeom/RWStepGeom_RWReparametrisedCompositeCurveSegment.cxx +++ b/src/RWStepGeom/RWStepGeom_RWReparametrisedCompositeCurveSegment.cxx @@ -12,7 +12,6 @@ // commercial license or contractual agreement. -#include #include #include #include diff --git a/src/RWStepGeom/RWStepGeom_RWSeamCurve.cxx b/src/RWStepGeom/RWStepGeom_RWSeamCurve.cxx index fe79216422..5d2b073df7 100644 --- a/src/RWStepGeom/RWStepGeom_RWSeamCurve.cxx +++ b/src/RWStepGeom/RWStepGeom_RWSeamCurve.cxx @@ -17,10 +17,6 @@ #include #include #include -#include -#include -#include -#include #include // --- Enum : PreferredSurfaceCurveRepresentation --- diff --git a/src/RWStepGeom/RWStepGeom_RWSphericalSurface.cxx b/src/RWStepGeom/RWStepGeom_RWSphericalSurface.cxx index 2923d9b5f2..2dc774ebf1 100644 --- a/src/RWStepGeom/RWStepGeom_RWSphericalSurface.cxx +++ b/src/RWStepGeom/RWStepGeom_RWSphericalSurface.cxx @@ -12,7 +12,6 @@ // commercial license or contractual agreement. -#include #include #include #include diff --git a/src/RWStepGeom/RWStepGeom_RWSurface.cxx b/src/RWStepGeom/RWStepGeom_RWSurface.cxx index 180bae0030..2251d4bea2 100644 --- a/src/RWStepGeom/RWStepGeom_RWSurface.cxx +++ b/src/RWStepGeom/RWStepGeom_RWSurface.cxx @@ -12,7 +12,6 @@ // commercial license or contractual agreement. -#include #include #include #include diff --git a/src/RWStepGeom/RWStepGeom_RWSurfaceCurve.cxx b/src/RWStepGeom/RWStepGeom_RWSurfaceCurve.cxx index 528c602a44..711996b177 100644 --- a/src/RWStepGeom/RWStepGeom_RWSurfaceCurve.cxx +++ b/src/RWStepGeom/RWStepGeom_RWSurfaceCurve.cxx @@ -17,10 +17,6 @@ #include #include #include -#include -#include -#include -#include #include #include diff --git a/src/RWStepGeom/RWStepGeom_RWSurfaceCurveAndBoundedCurve.cxx b/src/RWStepGeom/RWStepGeom_RWSurfaceCurveAndBoundedCurve.cxx index 9c4e73e43c..186c6173e9 100644 --- a/src/RWStepGeom/RWStepGeom_RWSurfaceCurveAndBoundedCurve.cxx +++ b/src/RWStepGeom/RWStepGeom_RWSurfaceCurveAndBoundedCurve.cxx @@ -26,10 +26,6 @@ #include #include #include -#include -#include -#include -#include #include #include diff --git a/src/RWStepGeom/RWStepGeom_RWSurfaceOfLinearExtrusion.cxx b/src/RWStepGeom/RWStepGeom_RWSurfaceOfLinearExtrusion.cxx index 17a2103939..63d46a0cf5 100644 --- a/src/RWStepGeom/RWStepGeom_RWSurfaceOfLinearExtrusion.cxx +++ b/src/RWStepGeom/RWStepGeom_RWSurfaceOfLinearExtrusion.cxx @@ -12,7 +12,6 @@ // commercial license or contractual agreement. -#include #include #include #include diff --git a/src/RWStepGeom/RWStepGeom_RWSurfaceOfRevolution.cxx b/src/RWStepGeom/RWStepGeom_RWSurfaceOfRevolution.cxx index 8a9b640792..71ebc91417 100644 --- a/src/RWStepGeom/RWStepGeom_RWSurfaceOfRevolution.cxx +++ b/src/RWStepGeom/RWStepGeom_RWSurfaceOfRevolution.cxx @@ -12,7 +12,6 @@ // commercial license or contractual agreement. -#include #include #include #include diff --git a/src/RWStepGeom/RWStepGeom_RWSurfacePatch.cxx b/src/RWStepGeom/RWStepGeom_RWSurfacePatch.cxx index a018d4dcf6..847f04c877 100644 --- a/src/RWStepGeom/RWStepGeom_RWSurfacePatch.cxx +++ b/src/RWStepGeom/RWStepGeom_RWSurfacePatch.cxx @@ -12,7 +12,6 @@ // commercial license or contractual agreement. -#include #include #include #include diff --git a/src/RWStepGeom/RWStepGeom_RWSurfaceReplica.cxx b/src/RWStepGeom/RWStepGeom_RWSurfaceReplica.cxx index 6512b0ffc5..e561e40a30 100644 --- a/src/RWStepGeom/RWStepGeom_RWSurfaceReplica.cxx +++ b/src/RWStepGeom/RWStepGeom_RWSurfaceReplica.cxx @@ -12,13 +12,11 @@ // commercial license or contractual agreement. -#include #include #include #include #include #include -#include #include RWStepGeom_RWSurfaceReplica::RWStepGeom_RWSurfaceReplica () {} diff --git a/src/RWStepGeom/RWStepGeom_RWSweptSurface.cxx b/src/RWStepGeom/RWStepGeom_RWSweptSurface.cxx index e4ab1bcb08..d4f4341e0f 100644 --- a/src/RWStepGeom/RWStepGeom_RWSweptSurface.cxx +++ b/src/RWStepGeom/RWStepGeom_RWSweptSurface.cxx @@ -12,7 +12,6 @@ // commercial license or contractual agreement. -#include #include #include #include diff --git a/src/RWStepGeom/RWStepGeom_RWToroidalSurface.cxx b/src/RWStepGeom/RWStepGeom_RWToroidalSurface.cxx index 62fedc7ad8..e3978da45d 100644 --- a/src/RWStepGeom/RWStepGeom_RWToroidalSurface.cxx +++ b/src/RWStepGeom/RWStepGeom_RWToroidalSurface.cxx @@ -12,7 +12,6 @@ // commercial license or contractual agreement. -#include #include #include #include diff --git a/src/RWStepGeom/RWStepGeom_RWTrimmedCurve.cxx b/src/RWStepGeom/RWStepGeom_RWTrimmedCurve.cxx index b8b3c7656d..7b8cb727f3 100644 --- a/src/RWStepGeom/RWStepGeom_RWTrimmedCurve.cxx +++ b/src/RWStepGeom/RWStepGeom_RWTrimmedCurve.cxx @@ -18,8 +18,6 @@ #include #include #include -#include -#include #include #include #include diff --git a/src/RWStepGeom/RWStepGeom_RWUniformCurve.cxx b/src/RWStepGeom/RWStepGeom_RWUniformCurve.cxx index 5ec930339d..f8c3cff983 100644 --- a/src/RWStepGeom/RWStepGeom_RWUniformCurve.cxx +++ b/src/RWStepGeom/RWStepGeom_RWUniformCurve.cxx @@ -15,12 +15,8 @@ #include #include #include -#include #include #include -#include -#include -#include #include // --- Enum : BSplineCurveForm --- diff --git a/src/RWStepGeom/RWStepGeom_RWUniformCurveAndRationalBSplineCurve.cxx b/src/RWStepGeom/RWStepGeom_RWUniformCurveAndRationalBSplineCurve.cxx index 3b287f3b46..55ea135840 100644 --- a/src/RWStepGeom/RWStepGeom_RWUniformCurveAndRationalBSplineCurve.cxx +++ b/src/RWStepGeom/RWStepGeom_RWUniformCurveAndRationalBSplineCurve.cxx @@ -15,12 +15,8 @@ #include #include #include -#include #include #include -#include -#include -#include #include #include #include diff --git a/src/RWStepGeom/RWStepGeom_RWUniformSurface.cxx b/src/RWStepGeom/RWStepGeom_RWUniformSurface.cxx index cdaee82f49..cdc9caea6e 100644 --- a/src/RWStepGeom/RWStepGeom_RWUniformSurface.cxx +++ b/src/RWStepGeom/RWStepGeom_RWUniformSurface.cxx @@ -15,12 +15,8 @@ #include #include #include -#include #include #include -#include -#include -#include #include // --- Enum : BSplineSurfaceForm --- diff --git a/src/RWStepGeom/RWStepGeom_RWUniformSurfaceAndRationalBSplineSurface.cxx b/src/RWStepGeom/RWStepGeom_RWUniformSurfaceAndRationalBSplineSurface.cxx index 66cb836c09..5cef2b3806 100644 --- a/src/RWStepGeom/RWStepGeom_RWUniformSurfaceAndRationalBSplineSurface.cxx +++ b/src/RWStepGeom/RWStepGeom_RWUniformSurfaceAndRationalBSplineSurface.cxx @@ -15,12 +15,8 @@ #include #include #include -#include #include #include -#include -#include -#include #include #include #include diff --git a/src/RWStepGeom/RWStepGeom_RWVector.cxx b/src/RWStepGeom/RWStepGeom_RWVector.cxx index 183edf1a4d..1417a3ace6 100644 --- a/src/RWStepGeom/RWStepGeom_RWVector.cxx +++ b/src/RWStepGeom/RWStepGeom_RWVector.cxx @@ -12,7 +12,6 @@ // commercial license or contractual agreement. -#include #include #include #include diff --git a/src/RWStepKinematics/RWStepKinematics_RWActuatedKinPairAndOrderKinPair.cxx b/src/RWStepKinematics/RWStepKinematics_RWActuatedKinPairAndOrderKinPair.cxx index 54cbc333d5..c56c22a4a0 100644 --- a/src/RWStepKinematics/RWStepKinematics_RWActuatedKinPairAndOrderKinPair.cxx +++ b/src/RWStepKinematics/RWStepKinematics_RWActuatedKinPairAndOrderKinPair.cxx @@ -20,49 +20,24 @@ #include #include #include -#include #include #include #include #include -#include #include -#include -#include #include -#include -#include #include -#include -#include #include -#include #include -#include #include -#include #include -#include #include -#include -#include #include -#include #include -#include -#include -#include #include -#include -#include -#include -#include #include #include #include -#include -#include -#include #include //======================================================================= diff --git a/src/RWStepKinematics/RWStepKinematics_RWCylindricalPair.cxx b/src/RWStepKinematics/RWStepKinematics_RWCylindricalPair.cxx index 23a0f027d5..f1ee0e99a4 100644 --- a/src/RWStepKinematics/RWStepKinematics_RWCylindricalPair.cxx +++ b/src/RWStepKinematics/RWStepKinematics_RWCylindricalPair.cxx @@ -24,7 +24,6 @@ #include #include #include -#include //======================================================================= //function : RWStepKinematics_RWCylindricalPair diff --git a/src/RWStepKinematics/RWStepKinematics_RWCylindricalPairWithRange.cxx b/src/RWStepKinematics/RWStepKinematics_RWCylindricalPairWithRange.cxx index b31ac4ff3a..540e9f9e2c 100644 --- a/src/RWStepKinematics/RWStepKinematics_RWCylindricalPairWithRange.cxx +++ b/src/RWStepKinematics/RWStepKinematics_RWCylindricalPairWithRange.cxx @@ -24,7 +24,6 @@ #include #include #include -#include #include //======================================================================= diff --git a/src/RWStepKinematics/RWStepKinematics_RWFullyConstrainedPair.cxx b/src/RWStepKinematics/RWStepKinematics_RWFullyConstrainedPair.cxx index 5d39829c2e..674f0794fc 100644 --- a/src/RWStepKinematics/RWStepKinematics_RWFullyConstrainedPair.cxx +++ b/src/RWStepKinematics/RWStepKinematics_RWFullyConstrainedPair.cxx @@ -24,7 +24,6 @@ #include #include #include -#include //======================================================================= //function : RWStepKinematics_RWFullyConstrainedPair diff --git a/src/RWStepKinematics/RWStepKinematics_RWHomokineticPair.cxx b/src/RWStepKinematics/RWStepKinematics_RWHomokineticPair.cxx index e0309dc5dd..5c59606fe0 100644 --- a/src/RWStepKinematics/RWStepKinematics_RWHomokineticPair.cxx +++ b/src/RWStepKinematics/RWStepKinematics_RWHomokineticPair.cxx @@ -24,7 +24,6 @@ #include #include #include -#include #include //======================================================================= diff --git a/src/RWStepKinematics/RWStepKinematics_RWLinearFlexibleAndPlanarCurvePair.cxx b/src/RWStepKinematics/RWStepKinematics_RWLinearFlexibleAndPlanarCurvePair.cxx index c3d1e3c645..bb4fa46f46 100644 --- a/src/RWStepKinematics/RWStepKinematics_RWLinearFlexibleAndPlanarCurvePair.cxx +++ b/src/RWStepKinematics/RWStepKinematics_RWLinearFlexibleAndPlanarCurvePair.cxx @@ -25,7 +25,6 @@ #include #include #include -#include //======================================================================= //function : RWStepKinematics_RWLinearFlexibleAndPlanarCurvePair diff --git a/src/RWStepKinematics/RWStepKinematics_RWLowOrderKinematicPair.cxx b/src/RWStepKinematics/RWStepKinematics_RWLowOrderKinematicPair.cxx index 599783cf4f..1f7da0c5b5 100644 --- a/src/RWStepKinematics/RWStepKinematics_RWLowOrderKinematicPair.cxx +++ b/src/RWStepKinematics/RWStepKinematics_RWLowOrderKinematicPair.cxx @@ -24,7 +24,6 @@ #include #include #include -#include //======================================================================= //function : RWStepKinematics_RWLowOrderKinematicPair diff --git a/src/RWStepKinematics/RWStepKinematics_RWLowOrderKinematicPairWithRange.cxx b/src/RWStepKinematics/RWStepKinematics_RWLowOrderKinematicPairWithRange.cxx index f3070a5580..34572fcb39 100644 --- a/src/RWStepKinematics/RWStepKinematics_RWLowOrderKinematicPairWithRange.cxx +++ b/src/RWStepKinematics/RWStepKinematics_RWLowOrderKinematicPairWithRange.cxx @@ -24,7 +24,6 @@ #include #include #include -#include #include //======================================================================= diff --git a/src/RWStepKinematics/RWStepKinematics_RWMechanismStateRepresentation.cxx b/src/RWStepKinematics/RWStepKinematics_RWMechanismStateRepresentation.cxx index 26c96aace3..5478b6874e 100644 --- a/src/RWStepKinematics/RWStepKinematics_RWMechanismStateRepresentation.cxx +++ b/src/RWStepKinematics/RWStepKinematics_RWMechanismStateRepresentation.cxx @@ -20,9 +20,6 @@ #include #include #include -#include -#include -#include #include #include diff --git a/src/RWStepKinematics/RWStepKinematics_RWOrientedJoint.cxx b/src/RWStepKinematics/RWStepKinematics_RWOrientedJoint.cxx index 66c9ce32f9..029d6c4073 100644 --- a/src/RWStepKinematics/RWStepKinematics_RWOrientedJoint.cxx +++ b/src/RWStepKinematics/RWStepKinematics_RWOrientedJoint.cxx @@ -23,7 +23,6 @@ #include #include #include -#include //======================================================================= //function : RWStepKinematics_RWOrientedJoint diff --git a/src/RWStepKinematics/RWStepKinematics_RWPlanarCurvePair.cxx b/src/RWStepKinematics/RWStepKinematics_RWPlanarCurvePair.cxx index 58564bcae7..8ae05a8cff 100644 --- a/src/RWStepKinematics/RWStepKinematics_RWPlanarCurvePair.cxx +++ b/src/RWStepKinematics/RWStepKinematics_RWPlanarCurvePair.cxx @@ -25,7 +25,6 @@ #include #include #include -#include //======================================================================= //function : RWStepKinematics_RWPlanarCurvePair diff --git a/src/RWStepKinematics/RWStepKinematics_RWPlanarCurvePairRange.cxx b/src/RWStepKinematics/RWStepKinematics_RWPlanarCurvePairRange.cxx index 5b75c30eb1..746976d09d 100644 --- a/src/RWStepKinematics/RWStepKinematics_RWPlanarCurvePairRange.cxx +++ b/src/RWStepKinematics/RWStepKinematics_RWPlanarCurvePairRange.cxx @@ -25,7 +25,6 @@ #include #include #include -#include #include //======================================================================= diff --git a/src/RWStepKinematics/RWStepKinematics_RWPlanarPair.cxx b/src/RWStepKinematics/RWStepKinematics_RWPlanarPair.cxx index 775498f47d..7097d7bd2a 100644 --- a/src/RWStepKinematics/RWStepKinematics_RWPlanarPair.cxx +++ b/src/RWStepKinematics/RWStepKinematics_RWPlanarPair.cxx @@ -24,7 +24,6 @@ #include #include #include -#include //======================================================================= //function : RWStepKinematics_RWPlanarPair diff --git a/src/RWStepKinematics/RWStepKinematics_RWPlanarPairWithRange.cxx b/src/RWStepKinematics/RWStepKinematics_RWPlanarPairWithRange.cxx index 4426dadb46..322a7b62db 100644 --- a/src/RWStepKinematics/RWStepKinematics_RWPlanarPairWithRange.cxx +++ b/src/RWStepKinematics/RWStepKinematics_RWPlanarPairWithRange.cxx @@ -24,7 +24,6 @@ #include #include #include -#include #include //======================================================================= diff --git a/src/RWStepKinematics/RWStepKinematics_RWPointOnPlanarCurvePair.cxx b/src/RWStepKinematics/RWStepKinematics_RWPointOnPlanarCurvePair.cxx index 72fa34aa09..d288a84d9e 100644 --- a/src/RWStepKinematics/RWStepKinematics_RWPointOnPlanarCurvePair.cxx +++ b/src/RWStepKinematics/RWStepKinematics_RWPointOnPlanarCurvePair.cxx @@ -25,7 +25,6 @@ #include #include #include -#include //======================================================================= //function : RWStepKinematics_RWPointOnPlanarCurvePair diff --git a/src/RWStepKinematics/RWStepKinematics_RWPointOnPlanarCurvePairWithRange.cxx b/src/RWStepKinematics/RWStepKinematics_RWPointOnPlanarCurvePairWithRange.cxx index 1760cea88a..22f209ffa5 100644 --- a/src/RWStepKinematics/RWStepKinematics_RWPointOnPlanarCurvePairWithRange.cxx +++ b/src/RWStepKinematics/RWStepKinematics_RWPointOnPlanarCurvePairWithRange.cxx @@ -25,7 +25,6 @@ #include #include #include -#include #include #include diff --git a/src/RWStepKinematics/RWStepKinematics_RWPrismaticPair.cxx b/src/RWStepKinematics/RWStepKinematics_RWPrismaticPair.cxx index 74ba10d636..51e71ac1f7 100644 --- a/src/RWStepKinematics/RWStepKinematics_RWPrismaticPair.cxx +++ b/src/RWStepKinematics/RWStepKinematics_RWPrismaticPair.cxx @@ -24,7 +24,6 @@ #include #include #include -#include //======================================================================= //function : RWStepKinematics_RWPrismaticPair diff --git a/src/RWStepKinematics/RWStepKinematics_RWPrismaticPairWithRange.cxx b/src/RWStepKinematics/RWStepKinematics_RWPrismaticPairWithRange.cxx index 85decffdd9..e7f21ebeb2 100644 --- a/src/RWStepKinematics/RWStepKinematics_RWPrismaticPairWithRange.cxx +++ b/src/RWStepKinematics/RWStepKinematics_RWPrismaticPairWithRange.cxx @@ -24,7 +24,6 @@ #include #include #include -#include #include //======================================================================= diff --git a/src/RWStepKinematics/RWStepKinematics_RWRevolutePair.cxx b/src/RWStepKinematics/RWStepKinematics_RWRevolutePair.cxx index 5b5686c251..5eea8712d8 100644 --- a/src/RWStepKinematics/RWStepKinematics_RWRevolutePair.cxx +++ b/src/RWStepKinematics/RWStepKinematics_RWRevolutePair.cxx @@ -24,7 +24,6 @@ #include #include #include -#include //======================================================================= //function : RWStepKinematics_RWRevolutePair diff --git a/src/RWStepKinematics/RWStepKinematics_RWRevolutePairWithRange.cxx b/src/RWStepKinematics/RWStepKinematics_RWRevolutePairWithRange.cxx index 6113928edd..a2cf369909 100644 --- a/src/RWStepKinematics/RWStepKinematics_RWRevolutePairWithRange.cxx +++ b/src/RWStepKinematics/RWStepKinematics_RWRevolutePairWithRange.cxx @@ -24,7 +24,6 @@ #include #include #include -#include #include //======================================================================= diff --git a/src/RWStepKinematics/RWStepKinematics_RWRollingCurvePair.cxx b/src/RWStepKinematics/RWStepKinematics_RWRollingCurvePair.cxx index aaec07c51d..5aa9b984d5 100644 --- a/src/RWStepKinematics/RWStepKinematics_RWRollingCurvePair.cxx +++ b/src/RWStepKinematics/RWStepKinematics_RWRollingCurvePair.cxx @@ -25,7 +25,6 @@ #include #include #include -#include //======================================================================= //function : RWStepKinematics_RWRollingCurvePair diff --git a/src/RWStepKinematics/RWStepKinematics_RWRollingSurfacePair.cxx b/src/RWStepKinematics/RWStepKinematics_RWRollingSurfacePair.cxx index 5bf922c282..68c6596e36 100644 --- a/src/RWStepKinematics/RWStepKinematics_RWRollingSurfacePair.cxx +++ b/src/RWStepKinematics/RWStepKinematics_RWRollingSurfacePair.cxx @@ -25,7 +25,6 @@ #include #include #include -#include //======================================================================= //function : RWStepKinematics_RWRollingSurfacePair diff --git a/src/RWStepKinematics/RWStepKinematics_RWSlidingCurvePair.cxx b/src/RWStepKinematics/RWStepKinematics_RWSlidingCurvePair.cxx index ce5613cc92..aba9c3dd05 100644 --- a/src/RWStepKinematics/RWStepKinematics_RWSlidingCurvePair.cxx +++ b/src/RWStepKinematics/RWStepKinematics_RWSlidingCurvePair.cxx @@ -25,7 +25,6 @@ #include #include #include -#include //======================================================================= //function : RWStepKinematics_RWSlidingCurvePair diff --git a/src/RWStepKinematics/RWStepKinematics_RWSlidingSurfacePair.cxx b/src/RWStepKinematics/RWStepKinematics_RWSlidingSurfacePair.cxx index 857f5bb66e..9e134b8e33 100644 --- a/src/RWStepKinematics/RWStepKinematics_RWSlidingSurfacePair.cxx +++ b/src/RWStepKinematics/RWStepKinematics_RWSlidingSurfacePair.cxx @@ -25,7 +25,6 @@ #include #include #include -#include //======================================================================= //function : RWStepKinematics_RWSlidingSurfacePair diff --git a/src/RWStepKinematics/RWStepKinematics_RWSphericalPair.cxx b/src/RWStepKinematics/RWStepKinematics_RWSphericalPair.cxx index b37c6003d3..16f8ac8504 100644 --- a/src/RWStepKinematics/RWStepKinematics_RWSphericalPair.cxx +++ b/src/RWStepKinematics/RWStepKinematics_RWSphericalPair.cxx @@ -24,7 +24,6 @@ #include #include #include -#include //======================================================================= //function : RWStepKinematics_RWSphericalPair diff --git a/src/RWStepKinematics/RWStepKinematics_RWSphericalPairWithPin.cxx b/src/RWStepKinematics/RWStepKinematics_RWSphericalPairWithPin.cxx index 540f91b9cf..726c2ba0ba 100644 --- a/src/RWStepKinematics/RWStepKinematics_RWSphericalPairWithPin.cxx +++ b/src/RWStepKinematics/RWStepKinematics_RWSphericalPairWithPin.cxx @@ -24,7 +24,6 @@ #include #include #include -#include //======================================================================= //function : RWStepKinematics_RWSphericalPairWithPin diff --git a/src/RWStepKinematics/RWStepKinematics_RWSphericalPairWithPinAndRange.cxx b/src/RWStepKinematics/RWStepKinematics_RWSphericalPairWithPinAndRange.cxx index 5a99ab8146..4e47edddff 100644 --- a/src/RWStepKinematics/RWStepKinematics_RWSphericalPairWithPinAndRange.cxx +++ b/src/RWStepKinematics/RWStepKinematics_RWSphericalPairWithPinAndRange.cxx @@ -24,7 +24,6 @@ #include #include #include -#include #include //======================================================================= diff --git a/src/RWStepKinematics/RWStepKinematics_RWSphericalPairWithRange.cxx b/src/RWStepKinematics/RWStepKinematics_RWSphericalPairWithRange.cxx index edc3148cba..f089f9d7e0 100644 --- a/src/RWStepKinematics/RWStepKinematics_RWSphericalPairWithRange.cxx +++ b/src/RWStepKinematics/RWStepKinematics_RWSphericalPairWithRange.cxx @@ -24,7 +24,6 @@ #include #include #include -#include #include //======================================================================= diff --git a/src/RWStepKinematics/RWStepKinematics_RWSurfacePairWithRange.cxx b/src/RWStepKinematics/RWStepKinematics_RWSurfacePairWithRange.cxx index f7469aee8e..81d8dfeb88 100644 --- a/src/RWStepKinematics/RWStepKinematics_RWSurfacePairWithRange.cxx +++ b/src/RWStepKinematics/RWStepKinematics_RWSurfacePairWithRange.cxx @@ -25,7 +25,6 @@ #include #include #include -#include #include #include diff --git a/src/RWStepKinematics/RWStepKinematics_RWUnconstrainedPair.cxx b/src/RWStepKinematics/RWStepKinematics_RWUnconstrainedPair.cxx index 16163a9dbf..e8f4b3319f 100644 --- a/src/RWStepKinematics/RWStepKinematics_RWUnconstrainedPair.cxx +++ b/src/RWStepKinematics/RWStepKinematics_RWUnconstrainedPair.cxx @@ -24,7 +24,6 @@ #include #include #include -#include //======================================================================= //function : RWStepKinematics_RWUnconstrainedPair diff --git a/src/RWStepKinematics/RWStepKinematics_RWUniversalPair.cxx b/src/RWStepKinematics/RWStepKinematics_RWUniversalPair.cxx index 9de814daae..3cffe5357e 100644 --- a/src/RWStepKinematics/RWStepKinematics_RWUniversalPair.cxx +++ b/src/RWStepKinematics/RWStepKinematics_RWUniversalPair.cxx @@ -24,7 +24,6 @@ #include #include #include -#include #include //======================================================================= diff --git a/src/RWStepKinematics/RWStepKinematics_RWUniversalPairWithRange.cxx b/src/RWStepKinematics/RWStepKinematics_RWUniversalPairWithRange.cxx index 511546e68d..496ee0bd01 100644 --- a/src/RWStepKinematics/RWStepKinematics_RWUniversalPairWithRange.cxx +++ b/src/RWStepKinematics/RWStepKinematics_RWUniversalPairWithRange.cxx @@ -24,7 +24,6 @@ #include #include #include -#include #include //======================================================================= diff --git a/src/RWStepRepr/RWStepRepr_RWAssemblyComponentUsage.cxx b/src/RWStepRepr/RWStepRepr_RWAssemblyComponentUsage.cxx index 6771dad1a2..1be4348711 100644 --- a/src/RWStepRepr/RWStepRepr_RWAssemblyComponentUsage.cxx +++ b/src/RWStepRepr/RWStepRepr_RWAssemblyComponentUsage.cxx @@ -15,7 +15,6 @@ // Generator: ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V1.1 -#include #include #include #include diff --git a/src/RWStepRepr/RWStepRepr_RWAssemblyComponentUsageSubstitute.cxx b/src/RWStepRepr/RWStepRepr_RWAssemblyComponentUsageSubstitute.cxx index 587753b254..1a4ffa01c5 100644 --- a/src/RWStepRepr/RWStepRepr_RWAssemblyComponentUsageSubstitute.cxx +++ b/src/RWStepRepr/RWStepRepr_RWAssemblyComponentUsageSubstitute.cxx @@ -13,7 +13,6 @@ //gka 05.03.99 S4134 upgrade from CD to DIS -#include #include #include #include diff --git a/src/RWStepRepr/RWStepRepr_RWCharacterizedRepresentation.cxx b/src/RWStepRepr/RWStepRepr_RWCharacterizedRepresentation.cxx index e16bb431c3..449a1d4bdf 100644 --- a/src/RWStepRepr/RWStepRepr_RWCharacterizedRepresentation.cxx +++ b/src/RWStepRepr/RWStepRepr_RWCharacterizedRepresentation.cxx @@ -19,7 +19,6 @@ #include #include #include -#include #include #include #include diff --git a/src/RWStepRepr/RWStepRepr_RWCompGroupShAspAndCompShAspAndDatumFeatAndShAsp.cxx b/src/RWStepRepr/RWStepRepr_RWCompGroupShAspAndCompShAspAndDatumFeatAndShAsp.cxx index 1b6bc283f6..86813f1006 100644 --- a/src/RWStepRepr/RWStepRepr_RWCompGroupShAspAndCompShAspAndDatumFeatAndShAsp.cxx +++ b/src/RWStepRepr/RWStepRepr_RWCompGroupShAspAndCompShAspAndDatumFeatAndShAsp.cxx @@ -14,7 +14,6 @@ // commercial license or contractual agreement. -#include #include #include #include diff --git a/src/RWStepRepr/RWStepRepr_RWCompShAspAndDatumFeatAndShAsp.cxx b/src/RWStepRepr/RWStepRepr_RWCompShAspAndDatumFeatAndShAsp.cxx index 885bfeba3b..575a7be374 100644 --- a/src/RWStepRepr/RWStepRepr_RWCompShAspAndDatumFeatAndShAsp.cxx +++ b/src/RWStepRepr/RWStepRepr_RWCompShAspAndDatumFeatAndShAsp.cxx @@ -14,7 +14,6 @@ // commercial license or contractual agreement. -#include #include #include #include diff --git a/src/RWStepRepr/RWStepRepr_RWCompositeShapeAspect.cxx b/src/RWStepRepr/RWStepRepr_RWCompositeShapeAspect.cxx index 2b552079e5..428ae1ddf4 100644 --- a/src/RWStepRepr/RWStepRepr_RWCompositeShapeAspect.cxx +++ b/src/RWStepRepr/RWStepRepr_RWCompositeShapeAspect.cxx @@ -15,7 +15,6 @@ // Generator: ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V1.2 -#include #include #include #include diff --git a/src/RWStepRepr/RWStepRepr_RWConfigurationDesign.cxx b/src/RWStepRepr/RWStepRepr_RWConfigurationDesign.cxx index 0569e2d49b..c9f473c195 100644 --- a/src/RWStepRepr/RWStepRepr_RWConfigurationDesign.cxx +++ b/src/RWStepRepr/RWStepRepr_RWConfigurationDesign.cxx @@ -16,7 +16,6 @@ // Generator: ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V1.0 -#include #include #include #include diff --git a/src/RWStepRepr/RWStepRepr_RWConfigurationEffectivity.cxx b/src/RWStepRepr/RWStepRepr_RWConfigurationEffectivity.cxx index 5745ad7456..178a5f9ba6 100644 --- a/src/RWStepRepr/RWStepRepr_RWConfigurationEffectivity.cxx +++ b/src/RWStepRepr/RWStepRepr_RWConfigurationEffectivity.cxx @@ -16,7 +16,6 @@ // Generator: ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V1.0 -#include #include #include #include diff --git a/src/RWStepRepr/RWStepRepr_RWConfigurationItem.cxx b/src/RWStepRepr/RWStepRepr_RWConfigurationItem.cxx index dd878769d5..5acca307c2 100644 --- a/src/RWStepRepr/RWStepRepr_RWConfigurationItem.cxx +++ b/src/RWStepRepr/RWStepRepr_RWConfigurationItem.cxx @@ -16,7 +16,6 @@ // Generator: ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V1.0 -#include #include #include #include diff --git a/src/RWStepRepr/RWStepRepr_RWConstructiveGeometryRepresentation.cxx b/src/RWStepRepr/RWStepRepr_RWConstructiveGeometryRepresentation.cxx index 9126694fbd..48dbebb911 100644 --- a/src/RWStepRepr/RWStepRepr_RWConstructiveGeometryRepresentation.cxx +++ b/src/RWStepRepr/RWStepRepr_RWConstructiveGeometryRepresentation.cxx @@ -19,7 +19,6 @@ #include #include #include -#include #include #include #include diff --git a/src/RWStepRepr/RWStepRepr_RWConstructiveGeometryRepresentationRelationship.cxx b/src/RWStepRepr/RWStepRepr_RWConstructiveGeometryRepresentationRelationship.cxx index e392caf3b0..e93e64c803 100644 --- a/src/RWStepRepr/RWStepRepr_RWConstructiveGeometryRepresentationRelationship.cxx +++ b/src/RWStepRepr/RWStepRepr_RWConstructiveGeometryRepresentationRelationship.cxx @@ -13,7 +13,6 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -#include #include #include #include diff --git a/src/RWStepRepr/RWStepRepr_RWDerivedShapeAspect.cxx b/src/RWStepRepr/RWStepRepr_RWDerivedShapeAspect.cxx index ac1ca8f4c3..42da482c4b 100644 --- a/src/RWStepRepr/RWStepRepr_RWDerivedShapeAspect.cxx +++ b/src/RWStepRepr/RWStepRepr_RWDerivedShapeAspect.cxx @@ -15,7 +15,6 @@ // Generator: ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V1.2 -#include #include #include #include diff --git a/src/RWStepRepr/RWStepRepr_RWExtension.cxx b/src/RWStepRepr/RWStepRepr_RWExtension.cxx index 8de46fd06c..d549b0023e 100644 --- a/src/RWStepRepr/RWStepRepr_RWExtension.cxx +++ b/src/RWStepRepr/RWStepRepr_RWExtension.cxx @@ -15,7 +15,6 @@ // Generator: ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V1.2 -#include #include #include #include diff --git a/src/RWStepRepr/RWStepRepr_RWFeatureForDatumTargetRelationship.cxx b/src/RWStepRepr/RWStepRepr_RWFeatureForDatumTargetRelationship.cxx index abecde9602..c67098dba1 100644 --- a/src/RWStepRepr/RWStepRepr_RWFeatureForDatumTargetRelationship.cxx +++ b/src/RWStepRepr/RWStepRepr_RWFeatureForDatumTargetRelationship.cxx @@ -15,7 +15,6 @@ // Generator: ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V1.0 -#include #include #include #include diff --git a/src/RWStepRepr/RWStepRepr_RWFunctionallyDefinedTransformation.cxx b/src/RWStepRepr/RWStepRepr_RWFunctionallyDefinedTransformation.cxx index 5886dac82a..85fdda6e0a 100644 --- a/src/RWStepRepr/RWStepRepr_RWFunctionallyDefinedTransformation.cxx +++ b/src/RWStepRepr/RWStepRepr_RWFunctionallyDefinedTransformation.cxx @@ -13,7 +13,6 @@ //gka 05.03.99 S4134 upgrade from CD to DIS -#include #include #include #include diff --git a/src/RWStepRepr/RWStepRepr_RWGeometricAlignment.cxx b/src/RWStepRepr/RWStepRepr_RWGeometricAlignment.cxx index d7fe4c2d10..8baea8ab77 100644 --- a/src/RWStepRepr/RWStepRepr_RWGeometricAlignment.cxx +++ b/src/RWStepRepr/RWStepRepr_RWGeometricAlignment.cxx @@ -16,8 +16,6 @@ #include #include -#include -#include #include #include #include diff --git a/src/RWStepRepr/RWStepRepr_RWGlobalUncertaintyAssignedContext.cxx b/src/RWStepRepr/RWStepRepr_RWGlobalUncertaintyAssignedContext.cxx index 796e14bb52..c871260a75 100644 --- a/src/RWStepRepr/RWStepRepr_RWGlobalUncertaintyAssignedContext.cxx +++ b/src/RWStepRepr/RWStepRepr_RWGlobalUncertaintyAssignedContext.cxx @@ -15,7 +15,6 @@ #include #include #include -#include #include #include #include diff --git a/src/RWStepRepr/RWStepRepr_RWGlobalUnitAssignedContext.cxx b/src/RWStepRepr/RWStepRepr_RWGlobalUnitAssignedContext.cxx index 2a6d1ac052..b1a71745df 100644 --- a/src/RWStepRepr/RWStepRepr_RWGlobalUnitAssignedContext.cxx +++ b/src/RWStepRepr/RWStepRepr_RWGlobalUnitAssignedContext.cxx @@ -15,7 +15,6 @@ #include #include #include -#include #include #include #include diff --git a/src/RWStepRepr/RWStepRepr_RWIntegerRepresentationItem.cxx b/src/RWStepRepr/RWStepRepr_RWIntegerRepresentationItem.cxx index 972142860a..0b74ed08c9 100644 --- a/src/RWStepRepr/RWStepRepr_RWIntegerRepresentationItem.cxx +++ b/src/RWStepRepr/RWStepRepr_RWIntegerRepresentationItem.cxx @@ -14,7 +14,6 @@ // commercial license or contractual agreement. -#include #include #include #include diff --git a/src/RWStepRepr/RWStepRepr_RWItemDefinedTransformation.cxx b/src/RWStepRepr/RWStepRepr_RWItemDefinedTransformation.cxx index dbee6a3e9e..0b65a83881 100644 --- a/src/RWStepRepr/RWStepRepr_RWItemDefinedTransformation.cxx +++ b/src/RWStepRepr/RWStepRepr_RWItemDefinedTransformation.cxx @@ -13,7 +13,6 @@ //gka 05.03.99 S4134 upgrade from CD to DIS -#include #include #include #include diff --git a/src/RWStepRepr/RWStepRepr_RWMakeFromUsageOption.cxx b/src/RWStepRepr/RWStepRepr_RWMakeFromUsageOption.cxx index 1687c59130..785528b615 100644 --- a/src/RWStepRepr/RWStepRepr_RWMakeFromUsageOption.cxx +++ b/src/RWStepRepr/RWStepRepr_RWMakeFromUsageOption.cxx @@ -15,11 +15,9 @@ // Generator: ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V1.1 -#include #include #include #include -#include #include #include #include diff --git a/src/RWStepRepr/RWStepRepr_RWMappedItem.cxx b/src/RWStepRepr/RWStepRepr_RWMappedItem.cxx index 06d6d112fe..ab11941420 100644 --- a/src/RWStepRepr/RWStepRepr_RWMappedItem.cxx +++ b/src/RWStepRepr/RWStepRepr_RWMappedItem.cxx @@ -12,7 +12,6 @@ // commercial license or contractual agreement. -#include #include #include #include diff --git a/src/RWStepRepr/RWStepRepr_RWMaterialDesignation.cxx b/src/RWStepRepr/RWStepRepr_RWMaterialDesignation.cxx index 2c63bf2307..eaf0eee1a8 100644 --- a/src/RWStepRepr/RWStepRepr_RWMaterialDesignation.cxx +++ b/src/RWStepRepr/RWStepRepr_RWMaterialDesignation.cxx @@ -12,12 +12,10 @@ // commercial license or contractual agreement. -#include #include #include #include #include -#include #include RWStepRepr_RWMaterialDesignation::RWStepRepr_RWMaterialDesignation () {} diff --git a/src/RWStepRepr/RWStepRepr_RWMaterialProperty.cxx b/src/RWStepRepr/RWStepRepr_RWMaterialProperty.cxx index 3d0e3e985e..4aa2f6e4f6 100644 --- a/src/RWStepRepr/RWStepRepr_RWMaterialProperty.cxx +++ b/src/RWStepRepr/RWStepRepr_RWMaterialProperty.cxx @@ -15,7 +15,6 @@ // Generator: ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V1.2 -#include #include #include #include diff --git a/src/RWStepRepr/RWStepRepr_RWMaterialPropertyRepresentation.cxx b/src/RWStepRepr/RWStepRepr_RWMaterialPropertyRepresentation.cxx index 27d8943b8c..679b80db46 100644 --- a/src/RWStepRepr/RWStepRepr_RWMaterialPropertyRepresentation.cxx +++ b/src/RWStepRepr/RWStepRepr_RWMaterialPropertyRepresentation.cxx @@ -15,7 +15,6 @@ // Generator: ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V1.2 -#include #include #include #include diff --git a/src/RWStepRepr/RWStepRepr_RWMeasureRepresentationItem.cxx b/src/RWStepRepr/RWStepRepr_RWMeasureRepresentationItem.cxx index 0d2577cefa..259339d422 100644 --- a/src/RWStepRepr/RWStepRepr_RWMeasureRepresentationItem.cxx +++ b/src/RWStepRepr/RWStepRepr_RWMeasureRepresentationItem.cxx @@ -17,18 +17,14 @@ #include #include -#include #include #include #include #include -#include #include #include #include -#include -#include //======================================================================= //function : RWStepRepr_RWMeasureRepresentationItem //purpose : diff --git a/src/RWStepRepr/RWStepRepr_RWParametricRepresentationContext.cxx b/src/RWStepRepr/RWStepRepr_RWParametricRepresentationContext.cxx index 6888611bf0..85505e0419 100644 --- a/src/RWStepRepr/RWStepRepr_RWParametricRepresentationContext.cxx +++ b/src/RWStepRepr/RWStepRepr_RWParametricRepresentationContext.cxx @@ -12,7 +12,6 @@ // commercial license or contractual agreement. -#include #include #include #include diff --git a/src/RWStepRepr/RWStepRepr_RWProductConcept.cxx b/src/RWStepRepr/RWStepRepr_RWProductConcept.cxx index 08d1553859..e1e2d17e73 100644 --- a/src/RWStepRepr/RWStepRepr_RWProductConcept.cxx +++ b/src/RWStepRepr/RWStepRepr_RWProductConcept.cxx @@ -16,7 +16,6 @@ // Generator: ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V1.0 -#include #include #include #include diff --git a/src/RWStepRepr/RWStepRepr_RWProductDefinitionShape.cxx b/src/RWStepRepr/RWStepRepr_RWProductDefinitionShape.cxx index 90361172fd..1512f6317d 100644 --- a/src/RWStepRepr/RWStepRepr_RWProductDefinitionShape.cxx +++ b/src/RWStepRepr/RWStepRepr_RWProductDefinitionShape.cxx @@ -15,7 +15,6 @@ // Generator: ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V1.1 -#include #include #include #include diff --git a/src/RWStepRepr/RWStepRepr_RWPropertyDefinition.cxx b/src/RWStepRepr/RWStepRepr_RWPropertyDefinition.cxx index e62ad68fbf..b76d8aff0d 100644 --- a/src/RWStepRepr/RWStepRepr_RWPropertyDefinition.cxx +++ b/src/RWStepRepr/RWStepRepr_RWPropertyDefinition.cxx @@ -15,7 +15,6 @@ // Generator: ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V1.1 -#include #include #include #include diff --git a/src/RWStepRepr/RWStepRepr_RWPropertyDefinitionRelationship.cxx b/src/RWStepRepr/RWStepRepr_RWPropertyDefinitionRelationship.cxx index 9fa60f63ca..50d3a8b2a6 100644 --- a/src/RWStepRepr/RWStepRepr_RWPropertyDefinitionRelationship.cxx +++ b/src/RWStepRepr/RWStepRepr_RWPropertyDefinitionRelationship.cxx @@ -15,7 +15,6 @@ // Generator: ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V1.2 -#include #include #include #include diff --git a/src/RWStepRepr/RWStepRepr_RWPropertyDefinitionRepresentation.cxx b/src/RWStepRepr/RWStepRepr_RWPropertyDefinitionRepresentation.cxx index 572c653c70..ae53b3ac00 100644 --- a/src/RWStepRepr/RWStepRepr_RWPropertyDefinitionRepresentation.cxx +++ b/src/RWStepRepr/RWStepRepr_RWPropertyDefinitionRepresentation.cxx @@ -15,7 +15,6 @@ // Generator: ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V1.2 -#include #include #include #include diff --git a/src/RWStepRepr/RWStepRepr_RWQuantifiedAssemblyComponentUsage.cxx b/src/RWStepRepr/RWStepRepr_RWQuantifiedAssemblyComponentUsage.cxx index 549cf852bc..9447518a4c 100644 --- a/src/RWStepRepr/RWStepRepr_RWQuantifiedAssemblyComponentUsage.cxx +++ b/src/RWStepRepr/RWStepRepr_RWQuantifiedAssemblyComponentUsage.cxx @@ -15,11 +15,9 @@ // Generator: ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V1.1 -#include #include #include #include -#include #include #include #include diff --git a/src/RWStepRepr/RWStepRepr_RWReprItemAndLengthMeasureWithUnitAndQRI.cxx b/src/RWStepRepr/RWStepRepr_RWReprItemAndLengthMeasureWithUnitAndQRI.cxx index 6b5959512c..2cf1e84e94 100644 --- a/src/RWStepRepr/RWStepRepr_RWReprItemAndLengthMeasureWithUnitAndQRI.cxx +++ b/src/RWStepRepr/RWStepRepr_RWReprItemAndLengthMeasureWithUnitAndQRI.cxx @@ -21,7 +21,6 @@ #include #include #include -#include #include #include diff --git a/src/RWStepRepr/RWStepRepr_RWReprItemAndPlaneAngleMeasureWithUnitAndQRI.cxx b/src/RWStepRepr/RWStepRepr_RWReprItemAndPlaneAngleMeasureWithUnitAndQRI.cxx index 9e0ac519b6..5e87c616d1 100644 --- a/src/RWStepRepr/RWStepRepr_RWReprItemAndPlaneAngleMeasureWithUnitAndQRI.cxx +++ b/src/RWStepRepr/RWStepRepr_RWReprItemAndPlaneAngleMeasureWithUnitAndQRI.cxx @@ -21,7 +21,6 @@ #include #include #include -#include #include #include diff --git a/src/RWStepRepr/RWStepRepr_RWRepresentation.cxx b/src/RWStepRepr/RWStepRepr_RWRepresentation.cxx index 66ab94b7cf..2b2ce59a80 100644 --- a/src/RWStepRepr/RWStepRepr_RWRepresentation.cxx +++ b/src/RWStepRepr/RWStepRepr_RWRepresentation.cxx @@ -17,7 +17,6 @@ #include #include #include -#include #include #include #include diff --git a/src/RWStepRepr/RWStepRepr_RWRepresentationContext.cxx b/src/RWStepRepr/RWStepRepr_RWRepresentationContext.cxx index 175e678b11..364d3ea5f6 100644 --- a/src/RWStepRepr/RWStepRepr_RWRepresentationContext.cxx +++ b/src/RWStepRepr/RWStepRepr_RWRepresentationContext.cxx @@ -12,7 +12,6 @@ // commercial license or contractual agreement. -#include #include #include #include diff --git a/src/RWStepRepr/RWStepRepr_RWRepresentationItem.cxx b/src/RWStepRepr/RWStepRepr_RWRepresentationItem.cxx index 91b6640808..c21e9b7354 100644 --- a/src/RWStepRepr/RWStepRepr_RWRepresentationItem.cxx +++ b/src/RWStepRepr/RWStepRepr_RWRepresentationItem.cxx @@ -12,7 +12,6 @@ // commercial license or contractual agreement. -#include #include #include #include diff --git a/src/RWStepRepr/RWStepRepr_RWRepresentationMap.cxx b/src/RWStepRepr/RWStepRepr_RWRepresentationMap.cxx index 2dd3e9201d..16b30ff61e 100644 --- a/src/RWStepRepr/RWStepRepr_RWRepresentationMap.cxx +++ b/src/RWStepRepr/RWStepRepr_RWRepresentationMap.cxx @@ -12,7 +12,6 @@ // commercial license or contractual agreement. -#include #include #include #include diff --git a/src/RWStepRepr/RWStepRepr_RWRepresentationRelationship.cxx b/src/RWStepRepr/RWStepRepr_RWRepresentationRelationship.cxx index 3f744e7b13..4bd9a9e57b 100644 --- a/src/RWStepRepr/RWStepRepr_RWRepresentationRelationship.cxx +++ b/src/RWStepRepr/RWStepRepr_RWRepresentationRelationship.cxx @@ -13,7 +13,6 @@ //gka 05.03.99 S4134 upgrade from CD to DIS -#include #include #include #include diff --git a/src/RWStepRepr/RWStepRepr_RWRepresentationRelationshipWithTransformation.cxx b/src/RWStepRepr/RWStepRepr_RWRepresentationRelationshipWithTransformation.cxx index ae9b0cd536..378df1f317 100644 --- a/src/RWStepRepr/RWStepRepr_RWRepresentationRelationshipWithTransformation.cxx +++ b/src/RWStepRepr/RWStepRepr_RWRepresentationRelationshipWithTransformation.cxx @@ -12,7 +12,6 @@ // commercial license or contractual agreement. -#include #include #include #include diff --git a/src/RWStepRepr/RWStepRepr_RWShapeAspect.cxx b/src/RWStepRepr/RWStepRepr_RWShapeAspect.cxx index f9cce4153f..e77786bebe 100644 --- a/src/RWStepRepr/RWStepRepr_RWShapeAspect.cxx +++ b/src/RWStepRepr/RWStepRepr_RWShapeAspect.cxx @@ -13,10 +13,8 @@ //gka 05.03.99 S4134 upgrade from CD to DIS -#include #include #include -#include #include #include #include diff --git a/src/RWStepRepr/RWStepRepr_RWShapeAspectDerivingRelationship.cxx b/src/RWStepRepr/RWStepRepr_RWShapeAspectDerivingRelationship.cxx index ce87676461..78d61ccff1 100644 --- a/src/RWStepRepr/RWStepRepr_RWShapeAspectDerivingRelationship.cxx +++ b/src/RWStepRepr/RWStepRepr_RWShapeAspectDerivingRelationship.cxx @@ -15,7 +15,6 @@ // Generator: ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V1.2 -#include #include #include #include diff --git a/src/RWStepRepr/RWStepRepr_RWShapeAspectRelationship.cxx b/src/RWStepRepr/RWStepRepr_RWShapeAspectRelationship.cxx index e593f3ebc3..5056a0fed9 100644 --- a/src/RWStepRepr/RWStepRepr_RWShapeAspectRelationship.cxx +++ b/src/RWStepRepr/RWStepRepr_RWShapeAspectRelationship.cxx @@ -15,7 +15,6 @@ // Generator: ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V1.0 -#include #include #include #include diff --git a/src/RWStepRepr/RWStepRepr_RWShapeAspectTransition.cxx b/src/RWStepRepr/RWStepRepr_RWShapeAspectTransition.cxx index fdfb7f74d6..b74e75408d 100644 --- a/src/RWStepRepr/RWStepRepr_RWShapeAspectTransition.cxx +++ b/src/RWStepRepr/RWStepRepr_RWShapeAspectTransition.cxx @@ -15,7 +15,6 @@ // Generator: ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V1.0 -#include #include #include #include diff --git a/src/RWStepRepr/RWStepRepr_RWShapeRepresentationRelationshipWithTransformation.cxx b/src/RWStepRepr/RWStepRepr_RWShapeRepresentationRelationshipWithTransformation.cxx index 552d719ff0..65cc15fe7d 100644 --- a/src/RWStepRepr/RWStepRepr_RWShapeRepresentationRelationshipWithTransformation.cxx +++ b/src/RWStepRepr/RWStepRepr_RWShapeRepresentationRelationshipWithTransformation.cxx @@ -12,7 +12,6 @@ // commercial license or contractual agreement. -#include #include #include #include diff --git a/src/RWStepRepr/RWStepRepr_RWSpecifiedHigherUsageOccurrence.cxx b/src/RWStepRepr/RWStepRepr_RWSpecifiedHigherUsageOccurrence.cxx index 8549ef6f26..8751868972 100644 --- a/src/RWStepRepr/RWStepRepr_RWSpecifiedHigherUsageOccurrence.cxx +++ b/src/RWStepRepr/RWStepRepr_RWSpecifiedHigherUsageOccurrence.cxx @@ -15,13 +15,10 @@ // Generator: ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V1.1 -#include #include #include -#include #include #include -#include #include #include diff --git a/src/RWStepRepr/RWStepRepr_RWStructuralResponseProperty.cxx b/src/RWStepRepr/RWStepRepr_RWStructuralResponseProperty.cxx index 606744c0a0..a21f77fa1d 100644 --- a/src/RWStepRepr/RWStepRepr_RWStructuralResponseProperty.cxx +++ b/src/RWStepRepr/RWStepRepr_RWStructuralResponseProperty.cxx @@ -15,7 +15,6 @@ // Generator: ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V1.2 -#include #include #include #include diff --git a/src/RWStepRepr/RWStepRepr_RWStructuralResponsePropertyDefinitionRepresentation.cxx b/src/RWStepRepr/RWStepRepr_RWStructuralResponsePropertyDefinitionRepresentation.cxx index b62c041f61..7f0bf9edbc 100644 --- a/src/RWStepRepr/RWStepRepr_RWStructuralResponsePropertyDefinitionRepresentation.cxx +++ b/src/RWStepRepr/RWStepRepr_RWStructuralResponsePropertyDefinitionRepresentation.cxx @@ -15,7 +15,6 @@ // Generator: ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V1.2 -#include #include #include #include diff --git a/src/RWStepShape/RWStepShape_RWAdvancedBrepShapeRepresentation.cxx b/src/RWStepShape/RWStepShape_RWAdvancedBrepShapeRepresentation.cxx index efc0e94cf4..969bc1b640 100644 --- a/src/RWStepShape/RWStepShape_RWAdvancedBrepShapeRepresentation.cxx +++ b/src/RWStepShape/RWStepShape_RWAdvancedBrepShapeRepresentation.cxx @@ -17,7 +17,6 @@ #include #include #include -#include #include #include #include diff --git a/src/RWStepShape/RWStepShape_RWAngularLocation.cxx b/src/RWStepShape/RWStepShape_RWAngularLocation.cxx index 34d9099c9b..c7f03672b6 100644 --- a/src/RWStepShape/RWStepShape_RWAngularLocation.cxx +++ b/src/RWStepShape/RWStepShape_RWAngularLocation.cxx @@ -15,7 +15,6 @@ // Generator: ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V1.0 -#include #include #include #include diff --git a/src/RWStepShape/RWStepShape_RWAngularSize.cxx b/src/RWStepShape/RWStepShape_RWAngularSize.cxx index c6b0a4a41a..2286a7b0b8 100644 --- a/src/RWStepShape/RWStepShape_RWAngularSize.cxx +++ b/src/RWStepShape/RWStepShape_RWAngularSize.cxx @@ -15,7 +15,6 @@ // Generator: ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V1.0 -#include #include #include #include diff --git a/src/RWStepShape/RWStepShape_RWBlock.cxx b/src/RWStepShape/RWStepShape_RWBlock.cxx index d8e61d4a59..a90397a362 100644 --- a/src/RWStepShape/RWStepShape_RWBlock.cxx +++ b/src/RWStepShape/RWStepShape_RWBlock.cxx @@ -12,7 +12,6 @@ // commercial license or contractual agreement. -#include #include #include #include diff --git a/src/RWStepShape/RWStepShape_RWBooleanResult.cxx b/src/RWStepShape/RWStepShape_RWBooleanResult.cxx index f6f7f4c692..d120bfd87a 100644 --- a/src/RWStepShape/RWStepShape_RWBooleanResult.cxx +++ b/src/RWStepShape/RWStepShape_RWBooleanResult.cxx @@ -12,13 +12,10 @@ // commercial license or contractual agreement. -#include #include #include #include #include -#include -#include #include #include #include diff --git a/src/RWStepShape/RWStepShape_RWBoxDomain.cxx b/src/RWStepShape/RWStepShape_RWBoxDomain.cxx index 7f3bc12732..0e8d7aa521 100644 --- a/src/RWStepShape/RWStepShape_RWBoxDomain.cxx +++ b/src/RWStepShape/RWStepShape_RWBoxDomain.cxx @@ -12,7 +12,6 @@ // commercial license or contractual agreement. -#include #include #include #include diff --git a/src/RWStepShape/RWStepShape_RWBoxedHalfSpace.cxx b/src/RWStepShape/RWStepShape_RWBoxedHalfSpace.cxx index db744d2619..e855d6b082 100644 --- a/src/RWStepShape/RWStepShape_RWBoxedHalfSpace.cxx +++ b/src/RWStepShape/RWStepShape_RWBoxedHalfSpace.cxx @@ -12,7 +12,6 @@ // commercial license or contractual agreement. -#include #include #include #include diff --git a/src/RWStepShape/RWStepShape_RWCompoundShapeRepresentation.cxx b/src/RWStepShape/RWStepShape_RWCompoundShapeRepresentation.cxx index 80d52c60ea..6416ccf2a6 100644 --- a/src/RWStepShape/RWStepShape_RWCompoundShapeRepresentation.cxx +++ b/src/RWStepShape/RWStepShape_RWCompoundShapeRepresentation.cxx @@ -20,7 +20,6 @@ #include #include #include -#include #include #include #include diff --git a/src/RWStepShape/RWStepShape_RWConnectedFaceShapeRepresentation.cxx b/src/RWStepShape/RWStepShape_RWConnectedFaceShapeRepresentation.cxx index fabfd8f850..b5adf8dc08 100644 --- a/src/RWStepShape/RWStepShape_RWConnectedFaceShapeRepresentation.cxx +++ b/src/RWStepShape/RWStepShape_RWConnectedFaceShapeRepresentation.cxx @@ -20,7 +20,6 @@ #include #include #include -#include #include #include #include diff --git a/src/RWStepShape/RWStepShape_RWConnectedFaceSubSet.cxx b/src/RWStepShape/RWStepShape_RWConnectedFaceSubSet.cxx index a94ddc8051..3b9d2b94cf 100644 --- a/src/RWStepShape/RWStepShape_RWConnectedFaceSubSet.cxx +++ b/src/RWStepShape/RWStepShape_RWConnectedFaceSubSet.cxx @@ -20,7 +20,6 @@ #include #include #include -#include #include #include #include diff --git a/src/RWStepShape/RWStepShape_RWContextDependentShapeRepresentation.cxx b/src/RWStepShape/RWStepShape_RWContextDependentShapeRepresentation.cxx index dd57dc838a..f3c47cf1fc 100644 --- a/src/RWStepShape/RWStepShape_RWContextDependentShapeRepresentation.cxx +++ b/src/RWStepShape/RWStepShape_RWContextDependentShapeRepresentation.cxx @@ -12,7 +12,6 @@ // commercial license or contractual agreement. -#include #include #include #include @@ -20,7 +19,6 @@ #include #include #include -#include // pour Share //======================================================================= diff --git a/src/RWStepShape/RWStepShape_RWCsgShapeRepresentation.cxx b/src/RWStepShape/RWStepShape_RWCsgShapeRepresentation.cxx index 08299f1a2c..b3bd8a11cf 100644 --- a/src/RWStepShape/RWStepShape_RWCsgShapeRepresentation.cxx +++ b/src/RWStepShape/RWStepShape_RWCsgShapeRepresentation.cxx @@ -17,7 +17,6 @@ #include #include #include -#include #include #include #include diff --git a/src/RWStepShape/RWStepShape_RWCsgSolid.cxx b/src/RWStepShape/RWStepShape_RWCsgSolid.cxx index 9e7533da99..f707dd1ced 100644 --- a/src/RWStepShape/RWStepShape_RWCsgSolid.cxx +++ b/src/RWStepShape/RWStepShape_RWCsgSolid.cxx @@ -12,13 +12,11 @@ // commercial license or contractual agreement. -#include #include #include #include #include #include -#include #include RWStepShape_RWCsgSolid::RWStepShape_RWCsgSolid () {} diff --git a/src/RWStepShape/RWStepShape_RWDefinitionalRepresentationAndShapeRepresentation.cxx b/src/RWStepShape/RWStepShape_RWDefinitionalRepresentationAndShapeRepresentation.cxx index a48511dbcb..5a80f4be98 100644 --- a/src/RWStepShape/RWStepShape_RWDefinitionalRepresentationAndShapeRepresentation.cxx +++ b/src/RWStepShape/RWStepShape_RWDefinitionalRepresentationAndShapeRepresentation.cxx @@ -17,7 +17,6 @@ #include #include #include -#include #include #include #include diff --git a/src/RWStepShape/RWStepShape_RWDimensionalCharacteristicRepresentation.cxx b/src/RWStepShape/RWStepShape_RWDimensionalCharacteristicRepresentation.cxx index 8b3b1399b2..3ddc07a284 100644 --- a/src/RWStepShape/RWStepShape_RWDimensionalCharacteristicRepresentation.cxx +++ b/src/RWStepShape/RWStepShape_RWDimensionalCharacteristicRepresentation.cxx @@ -15,7 +15,6 @@ // Generator: ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V1.0 -#include #include #include #include diff --git a/src/RWStepShape/RWStepShape_RWDimensionalLocation.cxx b/src/RWStepShape/RWStepShape_RWDimensionalLocation.cxx index 6ac453b7fd..b17e0a4f7c 100644 --- a/src/RWStepShape/RWStepShape_RWDimensionalLocation.cxx +++ b/src/RWStepShape/RWStepShape_RWDimensionalLocation.cxx @@ -15,7 +15,6 @@ // Generator: ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V1.0 -#include #include #include #include diff --git a/src/RWStepShape/RWStepShape_RWDimensionalLocationWithPath.cxx b/src/RWStepShape/RWStepShape_RWDimensionalLocationWithPath.cxx index 961e8af698..30efa38978 100644 --- a/src/RWStepShape/RWStepShape_RWDimensionalLocationWithPath.cxx +++ b/src/RWStepShape/RWStepShape_RWDimensionalLocationWithPath.cxx @@ -15,7 +15,6 @@ // Generator: ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V1.0 -#include #include #include #include diff --git a/src/RWStepShape/RWStepShape_RWDimensionalSize.cxx b/src/RWStepShape/RWStepShape_RWDimensionalSize.cxx index a147d4dae8..67e11df59b 100644 --- a/src/RWStepShape/RWStepShape_RWDimensionalSize.cxx +++ b/src/RWStepShape/RWStepShape_RWDimensionalSize.cxx @@ -15,7 +15,6 @@ // Generator: ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V1.0 -#include #include #include #include diff --git a/src/RWStepShape/RWStepShape_RWDimensionalSizeWithPath.cxx b/src/RWStepShape/RWStepShape_RWDimensionalSizeWithPath.cxx index a8bfa06f99..7ad8941cf4 100644 --- a/src/RWStepShape/RWStepShape_RWDimensionalSizeWithPath.cxx +++ b/src/RWStepShape/RWStepShape_RWDimensionalSizeWithPath.cxx @@ -15,7 +15,6 @@ // Generator: ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V1.0 -#include #include #include #include diff --git a/src/RWStepShape/RWStepShape_RWEdge.cxx b/src/RWStepShape/RWStepShape_RWEdge.cxx index 57a195496f..a6f988cc58 100644 --- a/src/RWStepShape/RWStepShape_RWEdge.cxx +++ b/src/RWStepShape/RWStepShape_RWEdge.cxx @@ -12,7 +12,6 @@ // commercial license or contractual agreement. -#include #include #include #include diff --git a/src/RWStepShape/RWStepShape_RWEdgeBasedWireframeModel.cxx b/src/RWStepShape/RWStepShape_RWEdgeBasedWireframeModel.cxx index d28011a36a..63a6f2b5b1 100644 --- a/src/RWStepShape/RWStepShape_RWEdgeBasedWireframeModel.cxx +++ b/src/RWStepShape/RWStepShape_RWEdgeBasedWireframeModel.cxx @@ -20,7 +20,6 @@ #include #include #include -#include #include #include diff --git a/src/RWStepShape/RWStepShape_RWEdgeBasedWireframeShapeRepresentation.cxx b/src/RWStepShape/RWStepShape_RWEdgeBasedWireframeShapeRepresentation.cxx index 08c0e611d3..814e5ed8e5 100644 --- a/src/RWStepShape/RWStepShape_RWEdgeBasedWireframeShapeRepresentation.cxx +++ b/src/RWStepShape/RWStepShape_RWEdgeBasedWireframeShapeRepresentation.cxx @@ -20,7 +20,6 @@ #include #include #include -#include #include #include #include diff --git a/src/RWStepShape/RWStepShape_RWEdgeCurve.cxx b/src/RWStepShape/RWStepShape_RWEdgeCurve.cxx index ffe9bd5746..d6c8f9fd04 100644 --- a/src/RWStepShape/RWStepShape_RWEdgeCurve.cxx +++ b/src/RWStepShape/RWStepShape_RWEdgeCurve.cxx @@ -12,7 +12,6 @@ // commercial license or contractual agreement. -#include #include #include #include diff --git a/src/RWStepShape/RWStepShape_RWExtrudedAreaSolid.cxx b/src/RWStepShape/RWStepShape_RWExtrudedAreaSolid.cxx index c9372179af..cfbd4d6b0b 100644 --- a/src/RWStepShape/RWStepShape_RWExtrudedAreaSolid.cxx +++ b/src/RWStepShape/RWStepShape_RWExtrudedAreaSolid.cxx @@ -12,7 +12,6 @@ // commercial license or contractual agreement. -#include #include #include #include diff --git a/src/RWStepShape/RWStepShape_RWExtrudedFaceSolid.cxx b/src/RWStepShape/RWStepShape_RWExtrudedFaceSolid.cxx index 304fd55a4d..39a56f257b 100644 --- a/src/RWStepShape/RWStepShape_RWExtrudedFaceSolid.cxx +++ b/src/RWStepShape/RWStepShape_RWExtrudedFaceSolid.cxx @@ -12,7 +12,6 @@ // commercial license or contractual agreement. -#include #include #include #include diff --git a/src/RWStepShape/RWStepShape_RWFaceBasedSurfaceModel.cxx b/src/RWStepShape/RWStepShape_RWFaceBasedSurfaceModel.cxx index a0bd7790d1..2af9ef6e91 100644 --- a/src/RWStepShape/RWStepShape_RWFaceBasedSurfaceModel.cxx +++ b/src/RWStepShape/RWStepShape_RWFaceBasedSurfaceModel.cxx @@ -20,7 +20,6 @@ #include #include #include -#include #include #include diff --git a/src/RWStepShape/RWStepShape_RWFaceBound.cxx b/src/RWStepShape/RWStepShape_RWFaceBound.cxx index da7fbfe10e..4eb51377dc 100644 --- a/src/RWStepShape/RWStepShape_RWFaceBound.cxx +++ b/src/RWStepShape/RWStepShape_RWFaceBound.cxx @@ -12,13 +12,11 @@ // commercial license or contractual agreement. -#include #include #include #include #include #include -#include #include #include #include diff --git a/src/RWStepShape/RWStepShape_RWFaceOuterBound.cxx b/src/RWStepShape/RWStepShape_RWFaceOuterBound.cxx index 439e22404a..e7fbb2f1a5 100644 --- a/src/RWStepShape/RWStepShape_RWFaceOuterBound.cxx +++ b/src/RWStepShape/RWStepShape_RWFaceOuterBound.cxx @@ -12,7 +12,6 @@ // commercial license or contractual agreement. -#include #include #include #include diff --git a/src/RWStepShape/RWStepShape_RWFaceSurface.cxx b/src/RWStepShape/RWStepShape_RWFaceSurface.cxx index be40222d92..7fc0e162d8 100644 --- a/src/RWStepShape/RWStepShape_RWFaceSurface.cxx +++ b/src/RWStepShape/RWStepShape_RWFaceSurface.cxx @@ -18,7 +18,6 @@ #include #include #include -#include #include #include diff --git a/src/RWStepShape/RWStepShape_RWFacetedBrep.cxx b/src/RWStepShape/RWStepShape_RWFacetedBrep.cxx index bb15e901b0..d785856418 100644 --- a/src/RWStepShape/RWStepShape_RWFacetedBrep.cxx +++ b/src/RWStepShape/RWStepShape_RWFacetedBrep.cxx @@ -12,7 +12,6 @@ // commercial license or contractual agreement. -#include #include #include #include diff --git a/src/RWStepShape/RWStepShape_RWFacetedBrepAndBrepWithVoids.cxx b/src/RWStepShape/RWStepShape_RWFacetedBrepAndBrepWithVoids.cxx index 09ff9b755a..7afda07613 100644 --- a/src/RWStepShape/RWStepShape_RWFacetedBrepAndBrepWithVoids.cxx +++ b/src/RWStepShape/RWStepShape_RWFacetedBrepAndBrepWithVoids.cxx @@ -17,7 +17,6 @@ #include #include #include -#include #include #include #include diff --git a/src/RWStepShape/RWStepShape_RWFacetedBrepShapeRepresentation.cxx b/src/RWStepShape/RWStepShape_RWFacetedBrepShapeRepresentation.cxx index 509f9005db..a3c2e5a92f 100644 --- a/src/RWStepShape/RWStepShape_RWFacetedBrepShapeRepresentation.cxx +++ b/src/RWStepShape/RWStepShape_RWFacetedBrepShapeRepresentation.cxx @@ -17,7 +17,6 @@ #include #include #include -#include #include #include #include diff --git a/src/RWStepShape/RWStepShape_RWGeometricallyBoundedSurfaceShapeRepresentation.cxx b/src/RWStepShape/RWStepShape_RWGeometricallyBoundedSurfaceShapeRepresentation.cxx index 6d2d9d987b..b713e844cf 100644 --- a/src/RWStepShape/RWStepShape_RWGeometricallyBoundedSurfaceShapeRepresentation.cxx +++ b/src/RWStepShape/RWStepShape_RWGeometricallyBoundedSurfaceShapeRepresentation.cxx @@ -17,7 +17,6 @@ #include #include #include -#include #include #include #include diff --git a/src/RWStepShape/RWStepShape_RWGeometricallyBoundedWireframeShapeRepresentation.cxx b/src/RWStepShape/RWStepShape_RWGeometricallyBoundedWireframeShapeRepresentation.cxx index 90f6853729..f1f0193755 100644 --- a/src/RWStepShape/RWStepShape_RWGeometricallyBoundedWireframeShapeRepresentation.cxx +++ b/src/RWStepShape/RWStepShape_RWGeometricallyBoundedWireframeShapeRepresentation.cxx @@ -17,7 +17,6 @@ #include #include #include -#include #include #include #include diff --git a/src/RWStepShape/RWStepShape_RWHalfSpaceSolid.cxx b/src/RWStepShape/RWStepShape_RWHalfSpaceSolid.cxx index a9b21a1377..d272a98bd8 100644 --- a/src/RWStepShape/RWStepShape_RWHalfSpaceSolid.cxx +++ b/src/RWStepShape/RWStepShape_RWHalfSpaceSolid.cxx @@ -12,7 +12,6 @@ // commercial license or contractual agreement. -#include #include #include #include diff --git a/src/RWStepShape/RWStepShape_RWLimitsAndFits.cxx b/src/RWStepShape/RWStepShape_RWLimitsAndFits.cxx index e6a2fd9957..fc16cf3a3b 100644 --- a/src/RWStepShape/RWStepShape_RWLimitsAndFits.cxx +++ b/src/RWStepShape/RWStepShape_RWLimitsAndFits.cxx @@ -12,7 +12,6 @@ // commercial license or contractual agreement. -#include #include #include #include diff --git a/src/RWStepShape/RWStepShape_RWLoop.cxx b/src/RWStepShape/RWStepShape_RWLoop.cxx index bfb6225f6f..eb6dabe8c5 100644 --- a/src/RWStepShape/RWStepShape_RWLoop.cxx +++ b/src/RWStepShape/RWStepShape_RWLoop.cxx @@ -12,7 +12,6 @@ // commercial license or contractual agreement. -#include #include #include #include diff --git a/src/RWStepShape/RWStepShape_RWLoopAndPath.cxx b/src/RWStepShape/RWStepShape_RWLoopAndPath.cxx index 0b4f899995..f7d36fdef8 100644 --- a/src/RWStepShape/RWStepShape_RWLoopAndPath.cxx +++ b/src/RWStepShape/RWStepShape_RWLoopAndPath.cxx @@ -17,11 +17,8 @@ #include #include #include -#include -#include #include #include -#include RWStepShape_RWLoopAndPath::RWStepShape_RWLoopAndPath () {} diff --git a/src/RWStepShape/RWStepShape_RWManifoldSolidBrep.cxx b/src/RWStepShape/RWStepShape_RWManifoldSolidBrep.cxx index 3f68da8132..3a52faab33 100644 --- a/src/RWStepShape/RWStepShape_RWManifoldSolidBrep.cxx +++ b/src/RWStepShape/RWStepShape_RWManifoldSolidBrep.cxx @@ -12,12 +12,10 @@ // commercial license or contractual agreement. -#include #include #include #include #include -#include #include #include diff --git a/src/RWStepShape/RWStepShape_RWManifoldSurfaceShapeRepresentation.cxx b/src/RWStepShape/RWStepShape_RWManifoldSurfaceShapeRepresentation.cxx index 44bf2d2e16..0d6dda1bad 100644 --- a/src/RWStepShape/RWStepShape_RWManifoldSurfaceShapeRepresentation.cxx +++ b/src/RWStepShape/RWStepShape_RWManifoldSurfaceShapeRepresentation.cxx @@ -17,7 +17,6 @@ #include #include #include -#include #include #include #include diff --git a/src/RWStepShape/RWStepShape_RWMeasureQualification.cxx b/src/RWStepShape/RWStepShape_RWMeasureQualification.cxx index 1ecdac40b1..63555f2275 100644 --- a/src/RWStepShape/RWStepShape_RWMeasureQualification.cxx +++ b/src/RWStepShape/RWStepShape_RWMeasureQualification.cxx @@ -18,7 +18,6 @@ #include #include #include -#include #include #include #include diff --git a/src/RWStepShape/RWStepShape_RWMeasureRepresentationItemAndQualifiedRepresentationItem.cxx b/src/RWStepShape/RWStepShape_RWMeasureRepresentationItemAndQualifiedRepresentationItem.cxx index d6b2028a03..e5365ede65 100644 --- a/src/RWStepShape/RWStepShape_RWMeasureRepresentationItemAndQualifiedRepresentationItem.cxx +++ b/src/RWStepShape/RWStepShape_RWMeasureRepresentationItemAndQualifiedRepresentationItem.cxx @@ -20,7 +20,6 @@ #include #include #include -#include #include #include diff --git a/src/RWStepShape/RWStepShape_RWNonManifoldSurfaceShapeRepresentation.cxx b/src/RWStepShape/RWStepShape_RWNonManifoldSurfaceShapeRepresentation.cxx index 6c6d9bae71..816fd3dd7b 100644 --- a/src/RWStepShape/RWStepShape_RWNonManifoldSurfaceShapeRepresentation.cxx +++ b/src/RWStepShape/RWStepShape_RWNonManifoldSurfaceShapeRepresentation.cxx @@ -20,7 +20,6 @@ #include #include #include -#include #include #include #include diff --git a/src/RWStepShape/RWStepShape_RWOpenShell.cxx b/src/RWStepShape/RWStepShape_RWOpenShell.cxx index 57d3b0183c..0b68bc6106 100644 --- a/src/RWStepShape/RWStepShape_RWOpenShell.cxx +++ b/src/RWStepShape/RWStepShape_RWOpenShell.cxx @@ -17,8 +17,6 @@ #include #include #include -#include -#include #include RWStepShape_RWOpenShell::RWStepShape_RWOpenShell () {} diff --git a/src/RWStepShape/RWStepShape_RWOrientedClosedShell.cxx b/src/RWStepShape/RWStepShape_RWOrientedClosedShell.cxx index 8e844eb8b2..029d9a07c7 100644 --- a/src/RWStepShape/RWStepShape_RWOrientedClosedShell.cxx +++ b/src/RWStepShape/RWStepShape_RWOrientedClosedShell.cxx @@ -12,14 +12,10 @@ // commercial license or contractual agreement. -#include #include #include #include #include -#include -#include -#include #include RWStepShape_RWOrientedClosedShell::RWStepShape_RWOrientedClosedShell () {} diff --git a/src/RWStepShape/RWStepShape_RWOrientedEdge.cxx b/src/RWStepShape/RWStepShape_RWOrientedEdge.cxx index ec21b0c152..c3624fad17 100644 --- a/src/RWStepShape/RWStepShape_RWOrientedEdge.cxx +++ b/src/RWStepShape/RWStepShape_RWOrientedEdge.cxx @@ -12,12 +12,10 @@ // commercial license or contractual agreement. -#include #include #include #include #include -#include #include #include diff --git a/src/RWStepShape/RWStepShape_RWOrientedFace.cxx b/src/RWStepShape/RWStepShape_RWOrientedFace.cxx index 90afd1c8ca..d601b084db 100644 --- a/src/RWStepShape/RWStepShape_RWOrientedFace.cxx +++ b/src/RWStepShape/RWStepShape_RWOrientedFace.cxx @@ -12,14 +12,10 @@ // commercial license or contractual agreement. -#include #include #include #include #include -#include -#include -#include #include RWStepShape_RWOrientedFace::RWStepShape_RWOrientedFace () {} diff --git a/src/RWStepShape/RWStepShape_RWOrientedOpenShell.cxx b/src/RWStepShape/RWStepShape_RWOrientedOpenShell.cxx index 0c0c280cd9..c4d41e3529 100644 --- a/src/RWStepShape/RWStepShape_RWOrientedOpenShell.cxx +++ b/src/RWStepShape/RWStepShape_RWOrientedOpenShell.cxx @@ -12,14 +12,10 @@ // commercial license or contractual agreement. -#include #include #include #include #include -#include -#include -#include #include RWStepShape_RWOrientedOpenShell::RWStepShape_RWOrientedOpenShell () {} diff --git a/src/RWStepShape/RWStepShape_RWOrientedPath.cxx b/src/RWStepShape/RWStepShape_RWOrientedPath.cxx index 89043fc9f9..0096f4aab0 100644 --- a/src/RWStepShape/RWStepShape_RWOrientedPath.cxx +++ b/src/RWStepShape/RWStepShape_RWOrientedPath.cxx @@ -12,14 +12,11 @@ // commercial license or contractual agreement. -#include #include #include #include #include #include -#include -#include #include RWStepShape_RWOrientedPath::RWStepShape_RWOrientedPath () {} diff --git a/src/RWStepShape/RWStepShape_RWPath.cxx b/src/RWStepShape/RWStepShape_RWPath.cxx index 3ee8268171..c824f3a78b 100644 --- a/src/RWStepShape/RWStepShape_RWPath.cxx +++ b/src/RWStepShape/RWStepShape_RWPath.cxx @@ -17,7 +17,6 @@ #include #include #include -#include #include #include diff --git a/src/RWStepShape/RWStepShape_RWPlusMinusTolerance.cxx b/src/RWStepShape/RWStepShape_RWPlusMinusTolerance.cxx index 3899bfc16d..ff413adfbb 100644 --- a/src/RWStepShape/RWStepShape_RWPlusMinusTolerance.cxx +++ b/src/RWStepShape/RWStepShape_RWPlusMinusTolerance.cxx @@ -12,12 +12,10 @@ // commercial license or contractual agreement. -#include #include #include #include #include -#include #include #include diff --git a/src/RWStepShape/RWStepShape_RWPointRepresentation.cxx b/src/RWStepShape/RWStepShape_RWPointRepresentation.cxx index a911af0cac..7f6e3070bb 100644 --- a/src/RWStepShape/RWStepShape_RWPointRepresentation.cxx +++ b/src/RWStepShape/RWStepShape_RWPointRepresentation.cxx @@ -20,7 +20,6 @@ #include #include #include -#include #include #include #include diff --git a/src/RWStepShape/RWStepShape_RWPolyLoop.cxx b/src/RWStepShape/RWStepShape_RWPolyLoop.cxx index cb2a9f09fa..b04199ff28 100644 --- a/src/RWStepShape/RWStepShape_RWPolyLoop.cxx +++ b/src/RWStepShape/RWStepShape_RWPolyLoop.cxx @@ -17,8 +17,6 @@ #include #include #include -#include -#include #include RWStepShape_RWPolyLoop::RWStepShape_RWPolyLoop () {} diff --git a/src/RWStepShape/RWStepShape_RWPrecisionQualifier.cxx b/src/RWStepShape/RWStepShape_RWPrecisionQualifier.cxx index 9a8510e3d7..88f821bd72 100644 --- a/src/RWStepShape/RWStepShape_RWPrecisionQualifier.cxx +++ b/src/RWStepShape/RWStepShape_RWPrecisionQualifier.cxx @@ -12,7 +12,6 @@ // commercial license or contractual agreement. -#include #include #include #include diff --git a/src/RWStepShape/RWStepShape_RWQualifiedRepresentationItem.cxx b/src/RWStepShape/RWStepShape_RWQualifiedRepresentationItem.cxx index e31d47bbdb..c7ceec34a0 100644 --- a/src/RWStepShape/RWStepShape_RWQualifiedRepresentationItem.cxx +++ b/src/RWStepShape/RWStepShape_RWQualifiedRepresentationItem.cxx @@ -17,7 +17,6 @@ #include #include #include -#include #include #include #include diff --git a/src/RWStepShape/RWStepShape_RWRevolvedAreaSolid.cxx b/src/RWStepShape/RWStepShape_RWRevolvedAreaSolid.cxx index fd5cbe8041..81bd0f95f2 100644 --- a/src/RWStepShape/RWStepShape_RWRevolvedAreaSolid.cxx +++ b/src/RWStepShape/RWStepShape_RWRevolvedAreaSolid.cxx @@ -12,7 +12,6 @@ // commercial license or contractual agreement. -#include #include #include #include diff --git a/src/RWStepShape/RWStepShape_RWRevolvedFaceSolid.cxx b/src/RWStepShape/RWStepShape_RWRevolvedFaceSolid.cxx index bc35bbf13f..9cbde9edb6 100644 --- a/src/RWStepShape/RWStepShape_RWRevolvedFaceSolid.cxx +++ b/src/RWStepShape/RWStepShape_RWRevolvedFaceSolid.cxx @@ -12,7 +12,6 @@ // commercial license or contractual agreement. -#include #include #include #include diff --git a/src/RWStepShape/RWStepShape_RWRightAngularWedge.cxx b/src/RWStepShape/RWStepShape_RWRightAngularWedge.cxx index fcf094f322..1547e3f209 100644 --- a/src/RWStepShape/RWStepShape_RWRightAngularWedge.cxx +++ b/src/RWStepShape/RWStepShape_RWRightAngularWedge.cxx @@ -12,7 +12,6 @@ // commercial license or contractual agreement. -#include #include #include #include diff --git a/src/RWStepShape/RWStepShape_RWRightCircularCone.cxx b/src/RWStepShape/RWStepShape_RWRightCircularCone.cxx index 937682528f..bbfb9d79b9 100644 --- a/src/RWStepShape/RWStepShape_RWRightCircularCone.cxx +++ b/src/RWStepShape/RWStepShape_RWRightCircularCone.cxx @@ -12,7 +12,6 @@ // commercial license or contractual agreement. -#include #include #include #include diff --git a/src/RWStepShape/RWStepShape_RWRightCircularCylinder.cxx b/src/RWStepShape/RWStepShape_RWRightCircularCylinder.cxx index 212d5928a5..12e315ad00 100644 --- a/src/RWStepShape/RWStepShape_RWRightCircularCylinder.cxx +++ b/src/RWStepShape/RWStepShape_RWRightCircularCylinder.cxx @@ -12,7 +12,6 @@ // commercial license or contractual agreement. -#include #include #include #include diff --git a/src/RWStepShape/RWStepShape_RWSeamEdge.cxx b/src/RWStepShape/RWStepShape_RWSeamEdge.cxx index d6d87f6a29..086dbc1c6d 100644 --- a/src/RWStepShape/RWStepShape_RWSeamEdge.cxx +++ b/src/RWStepShape/RWStepShape_RWSeamEdge.cxx @@ -15,13 +15,11 @@ // Generator: ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V1.1 -#include #include #include #include #include #include -#include #include #include diff --git a/src/RWStepShape/RWStepShape_RWShapeDefinitionRepresentation.cxx b/src/RWStepShape/RWStepShape_RWShapeDefinitionRepresentation.cxx index 2949939faa..e105e49063 100644 --- a/src/RWStepShape/RWStepShape_RWShapeDefinitionRepresentation.cxx +++ b/src/RWStepShape/RWStepShape_RWShapeDefinitionRepresentation.cxx @@ -16,7 +16,6 @@ // Generator: ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V1.0 -#include #include #include #include diff --git a/src/RWStepShape/RWStepShape_RWShapeDimensionRepresentation.cxx b/src/RWStepShape/RWStepShape_RWShapeDimensionRepresentation.cxx index 76556992ed..ae42046f4f 100644 --- a/src/RWStepShape/RWStepShape_RWShapeDimensionRepresentation.cxx +++ b/src/RWStepShape/RWStepShape_RWShapeDimensionRepresentation.cxx @@ -20,10 +20,7 @@ #include #include #include -#include #include -#include -#include #include //======================================================================= diff --git a/src/RWStepShape/RWStepShape_RWShapeRepresentation.cxx b/src/RWStepShape/RWStepShape_RWShapeRepresentation.cxx index 8b58d56c62..496402c784 100644 --- a/src/RWStepShape/RWStepShape_RWShapeRepresentation.cxx +++ b/src/RWStepShape/RWStepShape_RWShapeRepresentation.cxx @@ -17,7 +17,6 @@ #include #include #include -#include #include #include #include diff --git a/src/RWStepShape/RWStepShape_RWShapeRepresentationWithParameters.cxx b/src/RWStepShape/RWStepShape_RWShapeRepresentationWithParameters.cxx index 91559411b8..ee35cbc3fd 100644 --- a/src/RWStepShape/RWStepShape_RWShapeRepresentationWithParameters.cxx +++ b/src/RWStepShape/RWStepShape_RWShapeRepresentationWithParameters.cxx @@ -20,7 +20,6 @@ #include #include #include -#include #include #include #include diff --git a/src/RWStepShape/RWStepShape_RWShellBasedSurfaceModel.cxx b/src/RWStepShape/RWStepShape_RWShellBasedSurfaceModel.cxx index e2b315a38b..2857e203a5 100644 --- a/src/RWStepShape/RWStepShape_RWShellBasedSurfaceModel.cxx +++ b/src/RWStepShape/RWStepShape_RWShellBasedSurfaceModel.cxx @@ -17,7 +17,6 @@ #include #include #include -#include #include #include diff --git a/src/RWStepShape/RWStepShape_RWSolidModel.cxx b/src/RWStepShape/RWStepShape_RWSolidModel.cxx index 5bef12b04d..31dede06ed 100644 --- a/src/RWStepShape/RWStepShape_RWSolidModel.cxx +++ b/src/RWStepShape/RWStepShape_RWSolidModel.cxx @@ -12,7 +12,6 @@ // commercial license or contractual agreement. -#include #include #include #include diff --git a/src/RWStepShape/RWStepShape_RWSolidReplica.cxx b/src/RWStepShape/RWStepShape_RWSolidReplica.cxx index f41a1381ae..922417f0b7 100644 --- a/src/RWStepShape/RWStepShape_RWSolidReplica.cxx +++ b/src/RWStepShape/RWStepShape_RWSolidReplica.cxx @@ -12,13 +12,11 @@ // commercial license or contractual agreement. -#include #include #include #include #include #include -#include #include RWStepShape_RWSolidReplica::RWStepShape_RWSolidReplica () {} diff --git a/src/RWStepShape/RWStepShape_RWSphere.cxx b/src/RWStepShape/RWStepShape_RWSphere.cxx index 9e2fe7d18a..a2b6ea9646 100644 --- a/src/RWStepShape/RWStepShape_RWSphere.cxx +++ b/src/RWStepShape/RWStepShape_RWSphere.cxx @@ -12,7 +12,6 @@ // commercial license or contractual agreement. -#include #include #include #include diff --git a/src/RWStepShape/RWStepShape_RWSubedge.cxx b/src/RWStepShape/RWStepShape_RWSubedge.cxx index 0d2e951c94..907734335f 100644 --- a/src/RWStepShape/RWStepShape_RWSubedge.cxx +++ b/src/RWStepShape/RWStepShape_RWSubedge.cxx @@ -15,12 +15,10 @@ // Generator: ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V1.1 -#include #include #include #include #include -#include #include #include diff --git a/src/RWStepShape/RWStepShape_RWSubface.cxx b/src/RWStepShape/RWStepShape_RWSubface.cxx index 9ff706f221..a5ad373f9a 100644 --- a/src/RWStepShape/RWStepShape_RWSubface.cxx +++ b/src/RWStepShape/RWStepShape_RWSubface.cxx @@ -20,7 +20,6 @@ #include #include #include -#include #include #include #include diff --git a/src/RWStepShape/RWStepShape_RWSweptAreaSolid.cxx b/src/RWStepShape/RWStepShape_RWSweptAreaSolid.cxx index a2be8764ea..966dfb6dad 100644 --- a/src/RWStepShape/RWStepShape_RWSweptAreaSolid.cxx +++ b/src/RWStepShape/RWStepShape_RWSweptAreaSolid.cxx @@ -12,7 +12,6 @@ // commercial license or contractual agreement. -#include #include #include #include diff --git a/src/RWStepShape/RWStepShape_RWSweptFaceSolid.cxx b/src/RWStepShape/RWStepShape_RWSweptFaceSolid.cxx index e7c5329499..7ab7e25e3a 100644 --- a/src/RWStepShape/RWStepShape_RWSweptFaceSolid.cxx +++ b/src/RWStepShape/RWStepShape_RWSweptFaceSolid.cxx @@ -12,7 +12,6 @@ // commercial license or contractual agreement. -#include #include #include #include diff --git a/src/RWStepShape/RWStepShape_RWToleranceValue.cxx b/src/RWStepShape/RWStepShape_RWToleranceValue.cxx index f2821fa002..5d0d0d9cd2 100644 --- a/src/RWStepShape/RWStepShape_RWToleranceValue.cxx +++ b/src/RWStepShape/RWStepShape_RWToleranceValue.cxx @@ -12,7 +12,6 @@ // commercial license or contractual agreement. -#include #include #include #include diff --git a/src/RWStepShape/RWStepShape_RWTopologicalRepresentationItem.cxx b/src/RWStepShape/RWStepShape_RWTopologicalRepresentationItem.cxx index 791f5a36f4..63a8698be4 100644 --- a/src/RWStepShape/RWStepShape_RWTopologicalRepresentationItem.cxx +++ b/src/RWStepShape/RWStepShape_RWTopologicalRepresentationItem.cxx @@ -12,7 +12,6 @@ // commercial license or contractual agreement. -#include #include #include #include diff --git a/src/RWStepShape/RWStepShape_RWTorus.cxx b/src/RWStepShape/RWStepShape_RWTorus.cxx index 10eb1ac0be..70192469d3 100644 --- a/src/RWStepShape/RWStepShape_RWTorus.cxx +++ b/src/RWStepShape/RWStepShape_RWTorus.cxx @@ -12,7 +12,6 @@ // commercial license or contractual agreement. -#include #include #include #include diff --git a/src/RWStepShape/RWStepShape_RWTransitionalShapeRepresentation.cxx b/src/RWStepShape/RWStepShape_RWTransitionalShapeRepresentation.cxx index 290c6b4580..5467d28bfd 100644 --- a/src/RWStepShape/RWStepShape_RWTransitionalShapeRepresentation.cxx +++ b/src/RWStepShape/RWStepShape_RWTransitionalShapeRepresentation.cxx @@ -17,7 +17,6 @@ #include #include #include -#include #include #include #include diff --git a/src/RWStepShape/RWStepShape_RWTypeQualifier.cxx b/src/RWStepShape/RWStepShape_RWTypeQualifier.cxx index 6c525e4635..b1702f78bf 100644 --- a/src/RWStepShape/RWStepShape_RWTypeQualifier.cxx +++ b/src/RWStepShape/RWStepShape_RWTypeQualifier.cxx @@ -12,7 +12,6 @@ // commercial license or contractual agreement. -#include #include #include #include diff --git a/src/RWStepShape/RWStepShape_RWVertex.cxx b/src/RWStepShape/RWStepShape_RWVertex.cxx index fb79723f1e..b371a8eb4f 100644 --- a/src/RWStepShape/RWStepShape_RWVertex.cxx +++ b/src/RWStepShape/RWStepShape_RWVertex.cxx @@ -12,7 +12,6 @@ // commercial license or contractual agreement. -#include #include #include #include diff --git a/src/RWStepShape/RWStepShape_RWVertexLoop.cxx b/src/RWStepShape/RWStepShape_RWVertexLoop.cxx index 6e0d0e779e..baf2d4df39 100644 --- a/src/RWStepShape/RWStepShape_RWVertexLoop.cxx +++ b/src/RWStepShape/RWStepShape_RWVertexLoop.cxx @@ -12,7 +12,6 @@ // commercial license or contractual agreement. -#include #include #include #include diff --git a/src/RWStepShape/RWStepShape_RWVertexPoint.cxx b/src/RWStepShape/RWStepShape_RWVertexPoint.cxx index 66fecc200e..d3371ec5e0 100644 --- a/src/RWStepShape/RWStepShape_RWVertexPoint.cxx +++ b/src/RWStepShape/RWStepShape_RWVertexPoint.cxx @@ -12,7 +12,6 @@ // commercial license or contractual agreement. -#include #include #include #include diff --git a/src/RWStepVisual/RWStepVisual_RWAnnotationCurveOccurrence.cxx b/src/RWStepVisual/RWStepVisual_RWAnnotationCurveOccurrence.cxx index ad0643de80..b61aa4bcce 100644 --- a/src/RWStepVisual/RWStepVisual_RWAnnotationCurveOccurrence.cxx +++ b/src/RWStepVisual/RWStepVisual_RWAnnotationCurveOccurrence.cxx @@ -18,9 +18,6 @@ #include #include #include -#include -#include -#include #include //======================================================================= diff --git a/src/RWStepVisual/RWStepVisual_RWAnnotationCurveOccurrenceAndGeomReprItem.cxx b/src/RWStepVisual/RWStepVisual_RWAnnotationCurveOccurrenceAndGeomReprItem.cxx index 2ad4042012..4babfa7e98 100644 --- a/src/RWStepVisual/RWStepVisual_RWAnnotationCurveOccurrenceAndGeomReprItem.cxx +++ b/src/RWStepVisual/RWStepVisual_RWAnnotationCurveOccurrenceAndGeomReprItem.cxx @@ -18,9 +18,6 @@ #include #include #include -#include -#include -#include #include //======================================================================= diff --git a/src/RWStepVisual/RWStepVisual_RWAnnotationFillAreaOccurrence.cxx b/src/RWStepVisual/RWStepVisual_RWAnnotationFillAreaOccurrence.cxx index 5a90bd11c4..ea27e61076 100644 --- a/src/RWStepVisual/RWStepVisual_RWAnnotationFillAreaOccurrence.cxx +++ b/src/RWStepVisual/RWStepVisual_RWAnnotationFillAreaOccurrence.cxx @@ -20,8 +20,6 @@ #include #include #include -#include -#include #include //======================================================================= diff --git a/src/RWStepVisual/RWStepVisual_RWAnnotationOccurrence.cxx b/src/RWStepVisual/RWStepVisual_RWAnnotationOccurrence.cxx index ecabf1a284..43836de8b3 100644 --- a/src/RWStepVisual/RWStepVisual_RWAnnotationOccurrence.cxx +++ b/src/RWStepVisual/RWStepVisual_RWAnnotationOccurrence.cxx @@ -19,9 +19,6 @@ #include #include #include -#include -#include -#include #include //======================================================================= diff --git a/src/RWStepVisual/RWStepVisual_RWAnnotationPlane.cxx b/src/RWStepVisual/RWStepVisual_RWAnnotationPlane.cxx index e13b24c355..f1556bbf83 100644 --- a/src/RWStepVisual/RWStepVisual_RWAnnotationPlane.cxx +++ b/src/RWStepVisual/RWStepVisual_RWAnnotationPlane.cxx @@ -19,9 +19,6 @@ #include #include #include -#include -#include -#include #include //======================================================================= diff --git a/src/RWStepVisual/RWStepVisual_RWAreaInSet.cxx b/src/RWStepVisual/RWStepVisual_RWAreaInSet.cxx index e11766e017..a237c6628b 100644 --- a/src/RWStepVisual/RWStepVisual_RWAreaInSet.cxx +++ b/src/RWStepVisual/RWStepVisual_RWAreaInSet.cxx @@ -12,7 +12,6 @@ // commercial license or contractual agreement. -#include #include #include #include diff --git a/src/RWStepVisual/RWStepVisual_RWBackgroundColour.cxx b/src/RWStepVisual/RWStepVisual_RWBackgroundColour.cxx index 5f7928c6bf..72f6eecc4b 100644 --- a/src/RWStepVisual/RWStepVisual_RWBackgroundColour.cxx +++ b/src/RWStepVisual/RWStepVisual_RWBackgroundColour.cxx @@ -12,12 +12,10 @@ // commercial license or contractual agreement. -#include #include #include #include #include -#include #include RWStepVisual_RWBackgroundColour::RWStepVisual_RWBackgroundColour () {} diff --git a/src/RWStepVisual/RWStepVisual_RWCameraImage.cxx b/src/RWStepVisual/RWStepVisual_RWCameraImage.cxx index 3fbbdd0f40..6b8cc1faef 100644 --- a/src/RWStepVisual/RWStepVisual_RWCameraImage.cxx +++ b/src/RWStepVisual/RWStepVisual_RWCameraImage.cxx @@ -12,12 +12,10 @@ // commercial license or contractual agreement. -#include #include #include #include #include -#include #include #include diff --git a/src/RWStepVisual/RWStepVisual_RWCameraModel.cxx b/src/RWStepVisual/RWStepVisual_RWCameraModel.cxx index 7c07249283..79e0ecc992 100644 --- a/src/RWStepVisual/RWStepVisual_RWCameraModel.cxx +++ b/src/RWStepVisual/RWStepVisual_RWCameraModel.cxx @@ -12,7 +12,6 @@ // commercial license or contractual agreement. -#include #include #include #include diff --git a/src/RWStepVisual/RWStepVisual_RWCameraModelD2.cxx b/src/RWStepVisual/RWStepVisual_RWCameraModelD2.cxx index 17222fc379..a60a16efd9 100644 --- a/src/RWStepVisual/RWStepVisual_RWCameraModelD2.cxx +++ b/src/RWStepVisual/RWStepVisual_RWCameraModelD2.cxx @@ -12,7 +12,6 @@ // commercial license or contractual agreement. -#include #include #include #include diff --git a/src/RWStepVisual/RWStepVisual_RWCameraModelD3.cxx b/src/RWStepVisual/RWStepVisual_RWCameraModelD3.cxx index 4073a65e0e..0c4b27eaf8 100644 --- a/src/RWStepVisual/RWStepVisual_RWCameraModelD3.cxx +++ b/src/RWStepVisual/RWStepVisual_RWCameraModelD3.cxx @@ -12,7 +12,6 @@ // commercial license or contractual agreement. -#include #include #include #include diff --git a/src/RWStepVisual/RWStepVisual_RWCameraUsage.cxx b/src/RWStepVisual/RWStepVisual_RWCameraUsage.cxx index bf20c478f6..18d3baa66e 100644 --- a/src/RWStepVisual/RWStepVisual_RWCameraUsage.cxx +++ b/src/RWStepVisual/RWStepVisual_RWCameraUsage.cxx @@ -12,7 +12,6 @@ // commercial license or contractual agreement. -#include #include #include #include diff --git a/src/RWStepVisual/RWStepVisual_RWColour.cxx b/src/RWStepVisual/RWStepVisual_RWColour.cxx index dc8ef4ffc5..4eec0a4858 100644 --- a/src/RWStepVisual/RWStepVisual_RWColour.cxx +++ b/src/RWStepVisual/RWStepVisual_RWColour.cxx @@ -12,7 +12,6 @@ // commercial license or contractual agreement. -#include #include #include #include diff --git a/src/RWStepVisual/RWStepVisual_RWColourRgb.cxx b/src/RWStepVisual/RWStepVisual_RWColourRgb.cxx index 19316d07c7..3e29593f93 100644 --- a/src/RWStepVisual/RWStepVisual_RWColourRgb.cxx +++ b/src/RWStepVisual/RWStepVisual_RWColourRgb.cxx @@ -12,7 +12,6 @@ // commercial license or contractual agreement. -#include #include #include #include diff --git a/src/RWStepVisual/RWStepVisual_RWColourSpecification.cxx b/src/RWStepVisual/RWStepVisual_RWColourSpecification.cxx index 687d14ec92..f735d31248 100644 --- a/src/RWStepVisual/RWStepVisual_RWColourSpecification.cxx +++ b/src/RWStepVisual/RWStepVisual_RWColourSpecification.cxx @@ -12,7 +12,6 @@ // commercial license or contractual agreement. -#include #include #include #include diff --git a/src/RWStepVisual/RWStepVisual_RWContextDependentOverRidingStyledItem.cxx b/src/RWStepVisual/RWStepVisual_RWContextDependentOverRidingStyledItem.cxx index 7baa259df3..92dd7c1455 100644 --- a/src/RWStepVisual/RWStepVisual_RWContextDependentOverRidingStyledItem.cxx +++ b/src/RWStepVisual/RWStepVisual_RWContextDependentOverRidingStyledItem.cxx @@ -17,7 +17,6 @@ #include #include #include -#include #include #include #include diff --git a/src/RWStepVisual/RWStepVisual_RWCoordinatesList.cxx b/src/RWStepVisual/RWStepVisual_RWCoordinatesList.cxx index 2a8e6e159b..206101e4ee 100644 --- a/src/RWStepVisual/RWStepVisual_RWCoordinatesList.cxx +++ b/src/RWStepVisual/RWStepVisual_RWCoordinatesList.cxx @@ -19,9 +19,6 @@ #include #include #include -#include -#include -#include #include #include #include diff --git a/src/RWStepVisual/RWStepVisual_RWCurveStyle.cxx b/src/RWStepVisual/RWStepVisual_RWCurveStyle.cxx index fc7de4770e..532c665e20 100644 --- a/src/RWStepVisual/RWStepVisual_RWCurveStyle.cxx +++ b/src/RWStepVisual/RWStepVisual_RWCurveStyle.cxx @@ -12,10 +12,8 @@ // commercial license or contractual agreement. -#include #include #include -#include #include #include #include diff --git a/src/RWStepVisual/RWStepVisual_RWCurveStyleFontPattern.cxx b/src/RWStepVisual/RWStepVisual_RWCurveStyleFontPattern.cxx index 7e0032fcfd..f8a42c9049 100644 --- a/src/RWStepVisual/RWStepVisual_RWCurveStyleFontPattern.cxx +++ b/src/RWStepVisual/RWStepVisual_RWCurveStyleFontPattern.cxx @@ -12,7 +12,6 @@ // commercial license or contractual agreement. -#include #include #include #include diff --git a/src/RWStepVisual/RWStepVisual_RWDraughtingModel.cxx b/src/RWStepVisual/RWStepVisual_RWDraughtingModel.cxx index c503bbbf78..4cbd1572d6 100644 --- a/src/RWStepVisual/RWStepVisual_RWDraughtingModel.cxx +++ b/src/RWStepVisual/RWStepVisual_RWDraughtingModel.cxx @@ -20,9 +20,7 @@ #include #include #include -#include #include -#include #include //======================================================================= diff --git a/src/RWStepVisual/RWStepVisual_RWDraughtingPreDefinedColour.cxx b/src/RWStepVisual/RWStepVisual_RWDraughtingPreDefinedColour.cxx index 7f44ee2e78..ead86c14b6 100644 --- a/src/RWStepVisual/RWStepVisual_RWDraughtingPreDefinedColour.cxx +++ b/src/RWStepVisual/RWStepVisual_RWDraughtingPreDefinedColour.cxx @@ -13,7 +13,6 @@ //:S4134: abv 03.03.99: implementation of DraughtingPreDefinedColour modified -#include #include #include #include diff --git a/src/RWStepVisual/RWStepVisual_RWDraughtingPreDefinedCurveFont.cxx b/src/RWStepVisual/RWStepVisual_RWDraughtingPreDefinedCurveFont.cxx index 6fd0583053..0ad42338f7 100644 --- a/src/RWStepVisual/RWStepVisual_RWDraughtingPreDefinedCurveFont.cxx +++ b/src/RWStepVisual/RWStepVisual_RWDraughtingPreDefinedCurveFont.cxx @@ -12,7 +12,6 @@ // commercial license or contractual agreement. -#include #include #include #include diff --git a/src/RWStepVisual/RWStepVisual_RWExternallyDefinedCurveFont.cxx b/src/RWStepVisual/RWStepVisual_RWExternallyDefinedCurveFont.cxx index 70fc10bfaf..9ac8de4951 100644 --- a/src/RWStepVisual/RWStepVisual_RWExternallyDefinedCurveFont.cxx +++ b/src/RWStepVisual/RWStepVisual_RWExternallyDefinedCurveFont.cxx @@ -15,7 +15,6 @@ // Generator: ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V1.1 -#include #include #include #include diff --git a/src/RWStepVisual/RWStepVisual_RWFillAreaStyleColour.cxx b/src/RWStepVisual/RWStepVisual_RWFillAreaStyleColour.cxx index d752f9628f..53f9ef869b 100644 --- a/src/RWStepVisual/RWStepVisual_RWFillAreaStyleColour.cxx +++ b/src/RWStepVisual/RWStepVisual_RWFillAreaStyleColour.cxx @@ -12,7 +12,6 @@ // commercial license or contractual agreement. -#include #include #include #include diff --git a/src/RWStepVisual/RWStepVisual_RWInvisibility.cxx b/src/RWStepVisual/RWStepVisual_RWInvisibility.cxx index e7f4ddf7f4..9fb550cc4d 100644 --- a/src/RWStepVisual/RWStepVisual_RWInvisibility.cxx +++ b/src/RWStepVisual/RWStepVisual_RWInvisibility.cxx @@ -17,7 +17,6 @@ #include #include #include -#include #include #include diff --git a/src/RWStepVisual/RWStepVisual_RWMechanicalDesignGeometricPresentationArea.cxx b/src/RWStepVisual/RWStepVisual_RWMechanicalDesignGeometricPresentationArea.cxx index 4b49fa2c9f..149a819e9a 100644 --- a/src/RWStepVisual/RWStepVisual_RWMechanicalDesignGeometricPresentationArea.cxx +++ b/src/RWStepVisual/RWStepVisual_RWMechanicalDesignGeometricPresentationArea.cxx @@ -17,9 +17,7 @@ #include #include #include -#include #include -#include #include RWStepVisual_RWMechanicalDesignGeometricPresentationArea::RWStepVisual_RWMechanicalDesignGeometricPresentationArea () {} diff --git a/src/RWStepVisual/RWStepVisual_RWMechanicalDesignGeometricPresentationRepresentation.cxx b/src/RWStepVisual/RWStepVisual_RWMechanicalDesignGeometricPresentationRepresentation.cxx index 554c09e7b8..57c695f590 100644 --- a/src/RWStepVisual/RWStepVisual_RWMechanicalDesignGeometricPresentationRepresentation.cxx +++ b/src/RWStepVisual/RWStepVisual_RWMechanicalDesignGeometricPresentationRepresentation.cxx @@ -17,9 +17,7 @@ #include #include #include -#include #include -#include #include RWStepVisual_RWMechanicalDesignGeometricPresentationRepresentation::RWStepVisual_RWMechanicalDesignGeometricPresentationRepresentation () {} diff --git a/src/RWStepVisual/RWStepVisual_RWOverRidingStyledItem.cxx b/src/RWStepVisual/RWStepVisual_RWOverRidingStyledItem.cxx index c14eb60a1c..0d64196943 100644 --- a/src/RWStepVisual/RWStepVisual_RWOverRidingStyledItem.cxx +++ b/src/RWStepVisual/RWStepVisual_RWOverRidingStyledItem.cxx @@ -17,8 +17,6 @@ #include #include #include -#include -#include #include #include #include diff --git a/src/RWStepVisual/RWStepVisual_RWPlanarBox.cxx b/src/RWStepVisual/RWStepVisual_RWPlanarBox.cxx index 9c871a3f93..0893646eac 100644 --- a/src/RWStepVisual/RWStepVisual_RWPlanarBox.cxx +++ b/src/RWStepVisual/RWStepVisual_RWPlanarBox.cxx @@ -12,12 +12,10 @@ // commercial license or contractual agreement. -#include #include #include #include #include -#include #include RWStepVisual_RWPlanarBox::RWStepVisual_RWPlanarBox () {} diff --git a/src/RWStepVisual/RWStepVisual_RWPlanarExtent.cxx b/src/RWStepVisual/RWStepVisual_RWPlanarExtent.cxx index d4c673070f..4304d2feed 100644 --- a/src/RWStepVisual/RWStepVisual_RWPlanarExtent.cxx +++ b/src/RWStepVisual/RWStepVisual_RWPlanarExtent.cxx @@ -12,7 +12,6 @@ // commercial license or contractual agreement. -#include #include #include #include diff --git a/src/RWStepVisual/RWStepVisual_RWPointStyle.cxx b/src/RWStepVisual/RWStepVisual_RWPointStyle.cxx index a829d7cec3..5d99719943 100644 --- a/src/RWStepVisual/RWStepVisual_RWPointStyle.cxx +++ b/src/RWStepVisual/RWStepVisual_RWPointStyle.cxx @@ -12,14 +12,11 @@ // commercial license or contractual agreement. -#include #include #include -#include #include #include #include -#include #include RWStepVisual_RWPointStyle::RWStepVisual_RWPointStyle () {} diff --git a/src/RWStepVisual/RWStepVisual_RWPreDefinedColour.cxx b/src/RWStepVisual/RWStepVisual_RWPreDefinedColour.cxx index 74dd3725a5..a2f6a74cdc 100644 --- a/src/RWStepVisual/RWStepVisual_RWPreDefinedColour.cxx +++ b/src/RWStepVisual/RWStepVisual_RWPreDefinedColour.cxx @@ -13,7 +13,6 @@ //:S4134: abv 03.03.99: implementation of PreDefinedColour modified -#include #include #include #include diff --git a/src/RWStepVisual/RWStepVisual_RWPreDefinedCurveFont.cxx b/src/RWStepVisual/RWStepVisual_RWPreDefinedCurveFont.cxx index ecffc65cba..1757a1812b 100644 --- a/src/RWStepVisual/RWStepVisual_RWPreDefinedCurveFont.cxx +++ b/src/RWStepVisual/RWStepVisual_RWPreDefinedCurveFont.cxx @@ -12,7 +12,6 @@ // commercial license or contractual agreement. -#include #include #include #include diff --git a/src/RWStepVisual/RWStepVisual_RWPreDefinedItem.cxx b/src/RWStepVisual/RWStepVisual_RWPreDefinedItem.cxx index 9d7d0592ad..f0ab18d127 100644 --- a/src/RWStepVisual/RWStepVisual_RWPreDefinedItem.cxx +++ b/src/RWStepVisual/RWStepVisual_RWPreDefinedItem.cxx @@ -12,7 +12,6 @@ // commercial license or contractual agreement. -#include #include #include #include diff --git a/src/RWStepVisual/RWStepVisual_RWPresentationArea.cxx b/src/RWStepVisual/RWStepVisual_RWPresentationArea.cxx index 59d79045c8..7b873799e7 100644 --- a/src/RWStepVisual/RWStepVisual_RWPresentationArea.cxx +++ b/src/RWStepVisual/RWStepVisual_RWPresentationArea.cxx @@ -17,9 +17,7 @@ #include #include #include -#include #include -#include #include RWStepVisual_RWPresentationArea::RWStepVisual_RWPresentationArea () {} diff --git a/src/RWStepVisual/RWStepVisual_RWPresentationLayerAssignment.cxx b/src/RWStepVisual/RWStepVisual_RWPresentationLayerAssignment.cxx index 070ae7ad5d..9fa312bab1 100644 --- a/src/RWStepVisual/RWStepVisual_RWPresentationLayerAssignment.cxx +++ b/src/RWStepVisual/RWStepVisual_RWPresentationLayerAssignment.cxx @@ -17,8 +17,6 @@ #include #include #include -#include -#include #include RWStepVisual_RWPresentationLayerAssignment::RWStepVisual_RWPresentationLayerAssignment () {} diff --git a/src/RWStepVisual/RWStepVisual_RWPresentationRepresentation.cxx b/src/RWStepVisual/RWStepVisual_RWPresentationRepresentation.cxx index 97ba1686d3..361bc6dd97 100644 --- a/src/RWStepVisual/RWStepVisual_RWPresentationRepresentation.cxx +++ b/src/RWStepVisual/RWStepVisual_RWPresentationRepresentation.cxx @@ -17,9 +17,7 @@ #include #include #include -#include #include -#include #include RWStepVisual_RWPresentationRepresentation::RWStepVisual_RWPresentationRepresentation () {} diff --git a/src/RWStepVisual/RWStepVisual_RWPresentationSet.cxx b/src/RWStepVisual/RWStepVisual_RWPresentationSet.cxx index 2e6f8ca75a..5ed87197d8 100644 --- a/src/RWStepVisual/RWStepVisual_RWPresentationSet.cxx +++ b/src/RWStepVisual/RWStepVisual_RWPresentationSet.cxx @@ -12,7 +12,6 @@ // commercial license or contractual agreement. -#include #include #include #include diff --git a/src/RWStepVisual/RWStepVisual_RWPresentationSize.cxx b/src/RWStepVisual/RWStepVisual_RWPresentationSize.cxx index 7ea4a11644..152e2511a6 100644 --- a/src/RWStepVisual/RWStepVisual_RWPresentationSize.cxx +++ b/src/RWStepVisual/RWStepVisual_RWPresentationSize.cxx @@ -12,7 +12,6 @@ // commercial license or contractual agreement. -#include #include #include #include diff --git a/src/RWStepVisual/RWStepVisual_RWPresentationStyleAssignment.cxx b/src/RWStepVisual/RWStepVisual_RWPresentationStyleAssignment.cxx index 714957ce76..9f650ae649 100644 --- a/src/RWStepVisual/RWStepVisual_RWPresentationStyleAssignment.cxx +++ b/src/RWStepVisual/RWStepVisual_RWPresentationStyleAssignment.cxx @@ -15,11 +15,9 @@ #include #include #include -#include #include #include #include -#include #include #include diff --git a/src/RWStepVisual/RWStepVisual_RWPresentationStyleByContext.cxx b/src/RWStepVisual/RWStepVisual_RWPresentationStyleByContext.cxx index 69eb7cad8f..5da048e6cc 100644 --- a/src/RWStepVisual/RWStepVisual_RWPresentationStyleByContext.cxx +++ b/src/RWStepVisual/RWStepVisual_RWPresentationStyleByContext.cxx @@ -15,10 +15,8 @@ #include #include #include -#include #include #include -#include #include #include #include diff --git a/src/RWStepVisual/RWStepVisual_RWPresentationView.cxx b/src/RWStepVisual/RWStepVisual_RWPresentationView.cxx index 97c18a7e3b..1b94232775 100644 --- a/src/RWStepVisual/RWStepVisual_RWPresentationView.cxx +++ b/src/RWStepVisual/RWStepVisual_RWPresentationView.cxx @@ -17,9 +17,7 @@ #include #include #include -#include #include -#include #include RWStepVisual_RWPresentationView::RWStepVisual_RWPresentationView () {} diff --git a/src/RWStepVisual/RWStepVisual_RWPresentedItemRepresentation.cxx b/src/RWStepVisual/RWStepVisual_RWPresentedItemRepresentation.cxx index 0da17a1c23..5b8bc25a37 100644 --- a/src/RWStepVisual/RWStepVisual_RWPresentedItemRepresentation.cxx +++ b/src/RWStepVisual/RWStepVisual_RWPresentedItemRepresentation.cxx @@ -12,12 +12,10 @@ // commercial license or contractual agreement. -#include #include #include #include #include -#include #include #include diff --git a/src/RWStepVisual/RWStepVisual_RWStyledItem.cxx b/src/RWStepVisual/RWStepVisual_RWStyledItem.cxx index 54b0cf82cc..8548408906 100644 --- a/src/RWStepVisual/RWStepVisual_RWStyledItem.cxx +++ b/src/RWStepVisual/RWStepVisual_RWStyledItem.cxx @@ -17,9 +17,6 @@ #include #include #include -#include -#include -#include #include RWStepVisual_RWStyledItem::RWStepVisual_RWStyledItem () {} diff --git a/src/RWStepVisual/RWStepVisual_RWSurfaceSideStyle.cxx b/src/RWStepVisual/RWStepVisual_RWSurfaceSideStyle.cxx index faa366a8f6..85853902c9 100644 --- a/src/RWStepVisual/RWStepVisual_RWSurfaceSideStyle.cxx +++ b/src/RWStepVisual/RWStepVisual_RWSurfaceSideStyle.cxx @@ -17,7 +17,6 @@ #include #include #include -#include #include #include diff --git a/src/RWStepVisual/RWStepVisual_RWSurfaceStyleBoundary.cxx b/src/RWStepVisual/RWStepVisual_RWSurfaceStyleBoundary.cxx index e4a95085a8..62c58a9f24 100644 --- a/src/RWStepVisual/RWStepVisual_RWSurfaceStyleBoundary.cxx +++ b/src/RWStepVisual/RWStepVisual_RWSurfaceStyleBoundary.cxx @@ -12,7 +12,6 @@ // commercial license or contractual agreement. -#include #include #include #include diff --git a/src/RWStepVisual/RWStepVisual_RWSurfaceStyleControlGrid.cxx b/src/RWStepVisual/RWStepVisual_RWSurfaceStyleControlGrid.cxx index 10769e8d14..dea93f1bfe 100644 --- a/src/RWStepVisual/RWStepVisual_RWSurfaceStyleControlGrid.cxx +++ b/src/RWStepVisual/RWStepVisual_RWSurfaceStyleControlGrid.cxx @@ -12,7 +12,6 @@ // commercial license or contractual agreement. -#include #include #include #include diff --git a/src/RWStepVisual/RWStepVisual_RWSurfaceStyleFillArea.cxx b/src/RWStepVisual/RWStepVisual_RWSurfaceStyleFillArea.cxx index efb5c177e6..2314502b24 100644 --- a/src/RWStepVisual/RWStepVisual_RWSurfaceStyleFillArea.cxx +++ b/src/RWStepVisual/RWStepVisual_RWSurfaceStyleFillArea.cxx @@ -12,7 +12,6 @@ // commercial license or contractual agreement. -#include #include #include #include diff --git a/src/RWStepVisual/RWStepVisual_RWSurfaceStyleParameterLine.cxx b/src/RWStepVisual/RWStepVisual_RWSurfaceStyleParameterLine.cxx index c9d420c677..4c5c323ddb 100644 --- a/src/RWStepVisual/RWStepVisual_RWSurfaceStyleParameterLine.cxx +++ b/src/RWStepVisual/RWStepVisual_RWSurfaceStyleParameterLine.cxx @@ -19,7 +19,6 @@ #include #include #include -#include #include RWStepVisual_RWSurfaceStyleParameterLine::RWStepVisual_RWSurfaceStyleParameterLine () {} diff --git a/src/RWStepVisual/RWStepVisual_RWSurfaceStyleSegmentationCurve.cxx b/src/RWStepVisual/RWStepVisual_RWSurfaceStyleSegmentationCurve.cxx index f5208776e5..1e4f021f0f 100644 --- a/src/RWStepVisual/RWStepVisual_RWSurfaceStyleSegmentationCurve.cxx +++ b/src/RWStepVisual/RWStepVisual_RWSurfaceStyleSegmentationCurve.cxx @@ -12,7 +12,6 @@ // commercial license or contractual agreement. -#include #include #include #include diff --git a/src/RWStepVisual/RWStepVisual_RWSurfaceStyleSilhouette.cxx b/src/RWStepVisual/RWStepVisual_RWSurfaceStyleSilhouette.cxx index d2fda5a924..549ac331ae 100644 --- a/src/RWStepVisual/RWStepVisual_RWSurfaceStyleSilhouette.cxx +++ b/src/RWStepVisual/RWStepVisual_RWSurfaceStyleSilhouette.cxx @@ -12,7 +12,6 @@ // commercial license or contractual agreement. -#include #include #include #include diff --git a/src/RWStepVisual/RWStepVisual_RWSurfaceStyleTransparent.cxx b/src/RWStepVisual/RWStepVisual_RWSurfaceStyleTransparent.cxx index 49aaf8ade3..30ca3fa32f 100644 --- a/src/RWStepVisual/RWStepVisual_RWSurfaceStyleTransparent.cxx +++ b/src/RWStepVisual/RWStepVisual_RWSurfaceStyleTransparent.cxx @@ -15,7 +15,6 @@ // commercial license or contractual agreement. #include -#include #include #include #include @@ -34,7 +33,6 @@ RWStepVisual_RWSurfaceStyleTransparent::RWStepVisual_RWSurfaceStyleTransparent() //function : ReadStep //purpose : //======================================================================= -#include void RWStepVisual_RWSurfaceStyleTransparent::ReadStep (const Handle(StepData_StepReaderData)& data, const Standard_Integer num, diff --git a/src/RWStepVisual/RWStepVisual_RWSurfaceStyleUsage.cxx b/src/RWStepVisual/RWStepVisual_RWSurfaceStyleUsage.cxx index 63ed6d5edf..8c37059db9 100644 --- a/src/RWStepVisual/RWStepVisual_RWSurfaceStyleUsage.cxx +++ b/src/RWStepVisual/RWStepVisual_RWSurfaceStyleUsage.cxx @@ -12,12 +12,10 @@ // commercial license or contractual agreement. -#include #include #include #include #include -#include #include #include #include diff --git a/src/RWStepVisual/RWStepVisual_RWTemplate.cxx b/src/RWStepVisual/RWStepVisual_RWTemplate.cxx index 53e106e830..0f86f7cd08 100644 --- a/src/RWStepVisual/RWStepVisual_RWTemplate.cxx +++ b/src/RWStepVisual/RWStepVisual_RWTemplate.cxx @@ -17,9 +17,7 @@ #include #include #include -#include #include -#include #include RWStepVisual_RWTemplate::RWStepVisual_RWTemplate () {} diff --git a/src/RWStepVisual/RWStepVisual_RWTemplateInstance.cxx b/src/RWStepVisual/RWStepVisual_RWTemplateInstance.cxx index 1056a1b1e6..7d64339907 100644 --- a/src/RWStepVisual/RWStepVisual_RWTemplateInstance.cxx +++ b/src/RWStepVisual/RWStepVisual_RWTemplateInstance.cxx @@ -12,12 +12,10 @@ // commercial license or contractual agreement. -#include #include #include #include #include -#include #include #include diff --git a/src/RWStepVisual/RWStepVisual_RWTessellatedAnnotationOccurrence.cxx b/src/RWStepVisual/RWStepVisual_RWTessellatedAnnotationOccurrence.cxx index 9d95787714..662bde0ae4 100644 --- a/src/RWStepVisual/RWStepVisual_RWTessellatedAnnotationOccurrence.cxx +++ b/src/RWStepVisual/RWStepVisual_RWTessellatedAnnotationOccurrence.cxx @@ -18,9 +18,6 @@ #include #include #include -#include -#include -#include #include //======================================================================= diff --git a/src/RWStepVisual/RWStepVisual_RWTessellatedGeometricSet.cxx b/src/RWStepVisual/RWStepVisual_RWTessellatedGeometricSet.cxx index 04fa0918b6..dc17e2cd37 100644 --- a/src/RWStepVisual/RWStepVisual_RWTessellatedGeometricSet.cxx +++ b/src/RWStepVisual/RWStepVisual_RWTessellatedGeometricSet.cxx @@ -19,9 +19,6 @@ #include #include #include -#include -#include -#include #include #include diff --git a/src/RWStepVisual/RWStepVisual_RWTessellatedItem.cxx b/src/RWStepVisual/RWStepVisual_RWTessellatedItem.cxx index 57ddb5f639..4b820a1497 100644 --- a/src/RWStepVisual/RWStepVisual_RWTessellatedItem.cxx +++ b/src/RWStepVisual/RWStepVisual_RWTessellatedItem.cxx @@ -12,7 +12,6 @@ // commercial license or contractual agreement. -#include #include #include #include diff --git a/src/RWStepVisual/RWStepVisual_RWTextLiteral.cxx b/src/RWStepVisual/RWStepVisual_RWTextLiteral.cxx index 1f717ec8d8..235b832460 100644 --- a/src/RWStepVisual/RWStepVisual_RWTextLiteral.cxx +++ b/src/RWStepVisual/RWStepVisual_RWTextLiteral.cxx @@ -12,13 +12,10 @@ // commercial license or contractual agreement. -#include #include #include #include #include -#include -#include #include #include #include diff --git a/src/RWStepVisual/RWStepVisual_RWTextStyle.cxx b/src/RWStepVisual/RWStepVisual_RWTextStyle.cxx index 851ae5a7bd..c9363219c0 100644 --- a/src/RWStepVisual/RWStepVisual_RWTextStyle.cxx +++ b/src/RWStepVisual/RWStepVisual_RWTextStyle.cxx @@ -12,7 +12,6 @@ // commercial license or contractual agreement. -#include #include #include #include diff --git a/src/RWStepVisual/RWStepVisual_RWTextStyleForDefinedFont.cxx b/src/RWStepVisual/RWStepVisual_RWTextStyleForDefinedFont.cxx index b96de8333a..94e0aff581 100644 --- a/src/RWStepVisual/RWStepVisual_RWTextStyleForDefinedFont.cxx +++ b/src/RWStepVisual/RWStepVisual_RWTextStyleForDefinedFont.cxx @@ -12,7 +12,6 @@ // commercial license or contractual agreement. -#include #include #include #include diff --git a/src/RWStepVisual/RWStepVisual_RWTextStyleWithBoxCharacteristics.cxx b/src/RWStepVisual/RWStepVisual_RWTextStyleWithBoxCharacteristics.cxx index 305b6968d5..da3039aa2b 100644 --- a/src/RWStepVisual/RWStepVisual_RWTextStyleWithBoxCharacteristics.cxx +++ b/src/RWStepVisual/RWStepVisual_RWTextStyleWithBoxCharacteristics.cxx @@ -18,7 +18,6 @@ #include #include #include -#include #include #include diff --git a/src/RWStepVisual/RWStepVisual_RWViewVolume.cxx b/src/RWStepVisual/RWStepVisual_RWViewVolume.cxx index 7e55f34a4c..6dd227ef26 100644 --- a/src/RWStepVisual/RWStepVisual_RWViewVolume.cxx +++ b/src/RWStepVisual/RWStepVisual_RWViewVolume.cxx @@ -12,13 +12,11 @@ // commercial license or contractual agreement. -#include #include #include #include #include #include -#include #include #include #include diff --git a/src/RWStl/RWStl_Reader.cxx b/src/RWStl/RWStl_Reader.cxx index eb6ad7c1c7..ad7ad321ed 100644 --- a/src/RWStl/RWStl_Reader.cxx +++ b/src/RWStl/RWStl_Reader.cxx @@ -15,7 +15,6 @@ #include -#include #include #include #include @@ -25,7 +24,6 @@ #include #include #include -#include #include #include diff --git a/src/Select3D/Select3D_BVHBuilder3d.hxx b/src/Select3D/Select3D_BVHBuilder3d.hxx index 254481e14f..2cfe2a5942 100644 --- a/src/Select3D/Select3D_BVHBuilder3d.hxx +++ b/src/Select3D/Select3D_BVHBuilder3d.hxx @@ -15,7 +15,6 @@ #define _Select3D_BVHBuilder3d_Header #include -#include typedef BVH_Builder Select3D_BVHBuilder3d; diff --git a/src/Select3D/Select3D_BVHIndexBuffer.hxx b/src/Select3D/Select3D_BVHIndexBuffer.hxx index 85d8240c0e..eb907d90a8 100644 --- a/src/Select3D/Select3D_BVHIndexBuffer.hxx +++ b/src/Select3D/Select3D_BVHIndexBuffer.hxx @@ -17,9 +17,6 @@ #define _Select3D_BVHIndexBuffer_Header #include -#include -#include -#include //! Index buffer for BVH tree. class Select3D_BVHIndexBuffer : public Graphic3d_Buffer diff --git a/src/Select3D/Select3D_BndBox3d.hxx b/src/Select3D/Select3D_BndBox3d.hxx index 0ccbf33dc3..f989501fb7 100644 --- a/src/Select3D/Select3D_BndBox3d.hxx +++ b/src/Select3D/Select3D_BndBox3d.hxx @@ -17,12 +17,9 @@ #define _Select3D_BndBox3d_Header #include -#include #include -#include - typedef BVH_Box Select3D_BndBox3d; typedef NCollection_Vec3 Select3D_Vec3; diff --git a/src/Select3D/Select3D_InteriorSensitivePointSet.cxx b/src/Select3D/Select3D_InteriorSensitivePointSet.cxx index c2bcff4732..fc250ee4bd 100644 --- a/src/Select3D/Select3D_InteriorSensitivePointSet.cxx +++ b/src/Select3D/Select3D_InteriorSensitivePointSet.cxx @@ -13,12 +13,8 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -#include #include -#include -#include - #include IMPLEMENT_STANDARD_RTTIEXT(Select3D_InteriorSensitivePointSet,Select3D_SensitiveSet) diff --git a/src/Select3D/Select3D_InteriorSensitivePointSet.hxx b/src/Select3D/Select3D_InteriorSensitivePointSet.hxx index a256a662f1..24801cadae 100644 --- a/src/Select3D/Select3D_InteriorSensitivePointSet.hxx +++ b/src/Select3D/Select3D_InteriorSensitivePointSet.hxx @@ -16,11 +16,6 @@ #ifndef _Select3D_InteriorSensitivePointSet_HeaderFile #define _Select3D_InteriorSensitivePointSet_HeaderFile -#include - -#include -#include - #include #include diff --git a/src/Select3D/Select3D_SensitiveBox.hxx b/src/Select3D/Select3D_SensitiveBox.hxx index d10cd410c4..d01c390c0d 100644 --- a/src/Select3D/Select3D_SensitiveBox.hxx +++ b/src/Select3D/Select3D_SensitiveBox.hxx @@ -17,7 +17,6 @@ #ifndef _Select3D_SensitiveBox_HeaderFile #define _Select3D_SensitiveBox_HeaderFile -#include #include //! A framework to define selection by a sensitive box. diff --git a/src/Select3D/Select3D_SensitiveCurve.cxx b/src/Select3D/Select3D_SensitiveCurve.cxx index cd0b6bab9b..7c5e1c3073 100644 --- a/src/Select3D/Select3D_SensitiveCurve.cxx +++ b/src/Select3D/Select3D_SensitiveCurve.cxx @@ -16,7 +16,6 @@ #include -#include #include IMPLEMENT_STANDARD_RTTIEXT(Select3D_SensitiveCurve,Select3D_SensitivePoly) diff --git a/src/Select3D/Select3D_SensitiveEntity.hxx b/src/Select3D/Select3D_SensitiveEntity.hxx index d153d7706d..5c119e26d8 100644 --- a/src/Select3D/Select3D_SensitiveEntity.hxx +++ b/src/Select3D/Select3D_SensitiveEntity.hxx @@ -17,13 +17,8 @@ #ifndef _Select3D_SensitiveEntity_HeaderFile #define _Select3D_SensitiveEntity_HeaderFile -#include -#include -#include #include #include -#include -#include #include #include diff --git a/src/Select3D/Select3D_SensitiveFace.cxx b/src/Select3D/Select3D_SensitiveFace.cxx index 4312780322..833d1c6d16 100644 --- a/src/Select3D/Select3D_SensitiveFace.cxx +++ b/src/Select3D/Select3D_SensitiveFace.cxx @@ -16,7 +16,6 @@ #include -#include #include IMPLEMENT_STANDARD_RTTIEXT(Select3D_SensitiveFace,Select3D_SensitiveEntity) diff --git a/src/Select3D/Select3D_SensitiveGroup.cxx b/src/Select3D/Select3D_SensitiveGroup.cxx index e35ffac63f..c9ff48700c 100644 --- a/src/Select3D/Select3D_SensitiveGroup.cxx +++ b/src/Select3D/Select3D_SensitiveGroup.cxx @@ -16,8 +16,6 @@ #include -#include - IMPLEMENT_STANDARD_RTTIEXT(Select3D_SensitiveGroup,Select3D_SensitiveSet) //======================================================================= diff --git a/src/Select3D/Select3D_SensitiveGroup.hxx b/src/Select3D/Select3D_SensitiveGroup.hxx index 460600f2ff..ecd18bcca8 100644 --- a/src/Select3D/Select3D_SensitiveGroup.hxx +++ b/src/Select3D/Select3D_SensitiveGroup.hxx @@ -19,7 +19,6 @@ #include #include -#include #include #include diff --git a/src/Select3D/Select3D_SensitivePrimitiveArray.hxx b/src/Select3D/Select3D_SensitivePrimitiveArray.hxx index 07445a6817..28002d8ecb 100644 --- a/src/Select3D/Select3D_SensitivePrimitiveArray.hxx +++ b/src/Select3D/Select3D_SensitivePrimitiveArray.hxx @@ -16,10 +16,8 @@ #ifndef _Select3D_SensitivePrimitiveArray_Header #define _Select3D_SensitivePrimitiveArray_Header -#include #include #include -#include #include #include #include diff --git a/src/Select3D/Select3D_SensitiveSegment.cxx b/src/Select3D/Select3D_SensitiveSegment.cxx index 38c10a610b..84e3a6edce 100644 --- a/src/Select3D/Select3D_SensitiveSegment.cxx +++ b/src/Select3D/Select3D_SensitiveSegment.cxx @@ -17,7 +17,6 @@ #include #include #include -#include IMPLEMENT_STANDARD_RTTIEXT(Select3D_SensitiveSegment,Select3D_SensitiveEntity) diff --git a/src/Select3D/Select3D_SensitiveSet.hxx b/src/Select3D/Select3D_SensitiveSet.hxx index 60164f4396..891fe88461 100644 --- a/src/Select3D/Select3D_SensitiveSet.hxx +++ b/src/Select3D/Select3D_SensitiveSet.hxx @@ -17,7 +17,6 @@ #define _Select3D_SensitiveSet_Header #include -#include #include #include diff --git a/src/Select3D/Select3D_SensitiveTriangle.cxx b/src/Select3D/Select3D_SensitiveTriangle.cxx index 8364169a99..0590546428 100644 --- a/src/Select3D/Select3D_SensitiveTriangle.cxx +++ b/src/Select3D/Select3D_SensitiveTriangle.cxx @@ -16,8 +16,6 @@ #include -#include -#include #include IMPLEMENT_STANDARD_RTTIEXT(Select3D_SensitiveTriangle,Select3D_SensitiveEntity) diff --git a/src/Select3D/Select3D_SensitiveTriangulation.cxx b/src/Select3D/Select3D_SensitiveTriangulation.cxx index 887ff6edcf..a74516447b 100644 --- a/src/Select3D/Select3D_SensitiveTriangulation.cxx +++ b/src/Select3D/Select3D_SensitiveTriangulation.cxx @@ -20,7 +20,6 @@ #include #include #include -#include #include #include diff --git a/src/Select3D/Select3D_SensitiveTriangulation.hxx b/src/Select3D/Select3D_SensitiveTriangulation.hxx index 17f5bab650..7aa503e63a 100644 --- a/src/Select3D/Select3D_SensitiveTriangulation.hxx +++ b/src/Select3D/Select3D_SensitiveTriangulation.hxx @@ -17,12 +17,7 @@ #ifndef _Select3D_SensitiveTriangulation_Header #define _Select3D_SensitiveTriangulation_Header -#include -#include -#include #include -#include -#include #include class Poly_Triangle; diff --git a/src/Select3D/Select3D_SensitiveWire.cxx b/src/Select3D/Select3D_SensitiveWire.cxx index ff6479dd72..4e67faf717 100644 --- a/src/Select3D/Select3D_SensitiveWire.cxx +++ b/src/Select3D/Select3D_SensitiveWire.cxx @@ -16,7 +16,6 @@ #include #include -#include #include #include diff --git a/src/Select3D/Select3D_TypeOfSensitivity.hxx b/src/Select3D/Select3D_TypeOfSensitivity.hxx index 262723270b..117d0bc182 100644 --- a/src/Select3D/Select3D_TypeOfSensitivity.hxx +++ b/src/Select3D/Select3D_TypeOfSensitivity.hxx @@ -14,8 +14,6 @@ #ifndef _Select3D_TypeOfSensitivity_HeaderFile #define _Select3D_TypeOfSensitivity_HeaderFile -#include - //! Provides values for type of sensitivity in 3D. //! These are used to specify whether it is the interior, //! the boundary, or the exterior of a 3D sensitive entity which is sensitive. diff --git a/src/SelectBasics/SelectBasics.hxx b/src/SelectBasics/SelectBasics.hxx index 7b1037f2de..e4f0327da4 100644 --- a/src/SelectBasics/SelectBasics.hxx +++ b/src/SelectBasics/SelectBasics.hxx @@ -18,8 +18,6 @@ #define _SelectBasics_HeaderFile #include -#include -#include //! interface class for dynamic selection class SelectBasics diff --git a/src/SelectBasics/SelectBasics_SelectingVolumeManager.hxx b/src/SelectBasics/SelectBasics_SelectingVolumeManager.hxx index 9d40b27dab..5fa66b04f4 100644 --- a/src/SelectBasics/SelectBasics_SelectingVolumeManager.hxx +++ b/src/SelectBasics/SelectBasics_SelectingVolumeManager.hxx @@ -21,7 +21,6 @@ #include #include #include -#include class gp_Pnt; diff --git a/src/SelectMgr/SelectMgr.cxx b/src/SelectMgr/SelectMgr.cxx index 7db447afa2..a6134b4508 100644 --- a/src/SelectMgr/SelectMgr.cxx +++ b/src/SelectMgr/SelectMgr.cxx @@ -15,9 +15,6 @@ #include #include -#include -#include -#include #include #include #include diff --git a/src/SelectMgr/SelectMgr_AndFilter.hxx b/src/SelectMgr/SelectMgr_AndFilter.hxx index 9b76728b4b..7fa85e6b30 100644 --- a/src/SelectMgr/SelectMgr_AndFilter.hxx +++ b/src/SelectMgr/SelectMgr_AndFilter.hxx @@ -21,7 +21,6 @@ #include #include -#include class SelectMgr_EntityOwner; diff --git a/src/SelectMgr/SelectMgr_AndOrFilter.hxx b/src/SelectMgr/SelectMgr_AndOrFilter.hxx index 1f144bce44..4f7370411d 100644 --- a/src/SelectMgr/SelectMgr_AndOrFilter.hxx +++ b/src/SelectMgr/SelectMgr_AndOrFilter.hxx @@ -18,7 +18,6 @@ #include #include -#include #include #include diff --git a/src/SelectMgr/SelectMgr_AxisIntersector.cxx b/src/SelectMgr/SelectMgr_AxisIntersector.cxx index f6660a035d..c4cbf1fa74 100644 --- a/src/SelectMgr/SelectMgr_AxisIntersector.cxx +++ b/src/SelectMgr/SelectMgr_AxisIntersector.cxx @@ -13,7 +13,6 @@ #include -#include #include #include #include diff --git a/src/SelectMgr/SelectMgr_Filter.hxx b/src/SelectMgr/SelectMgr_Filter.hxx index af9cf7e8b3..2ed2eba7dd 100644 --- a/src/SelectMgr/SelectMgr_Filter.hxx +++ b/src/SelectMgr/SelectMgr_Filter.hxx @@ -21,7 +21,6 @@ #include #include -#include #include class SelectMgr_EntityOwner; diff --git a/src/SelectMgr/SelectMgr_FrustumBuilder.hxx b/src/SelectMgr/SelectMgr_FrustumBuilder.hxx index ce85b682f8..d383d65e90 100644 --- a/src/SelectMgr/SelectMgr_FrustumBuilder.hxx +++ b/src/SelectMgr/SelectMgr_FrustumBuilder.hxx @@ -16,10 +16,7 @@ #ifndef _SelectMgr_FrustumBuilder_HeaderFile #define _SelectMgr_FrustumBuilder_HeaderFile -#include - #include -#include #include #include diff --git a/src/SelectMgr/SelectMgr_OrFilter.cxx b/src/SelectMgr/SelectMgr_OrFilter.cxx index cedfb54a99..6ef6a39f55 100644 --- a/src/SelectMgr/SelectMgr_OrFilter.cxx +++ b/src/SelectMgr/SelectMgr_OrFilter.cxx @@ -14,7 +14,6 @@ #include -#include #include #include diff --git a/src/SelectMgr/SelectMgr_OrFilter.hxx b/src/SelectMgr/SelectMgr_OrFilter.hxx index 192b7e0c9c..5dae337052 100644 --- a/src/SelectMgr/SelectMgr_OrFilter.hxx +++ b/src/SelectMgr/SelectMgr_OrFilter.hxx @@ -21,7 +21,6 @@ #include #include -#include class SelectMgr_EntityOwner; diff --git a/src/SelectMgr/SelectMgr_SelectableObject.cxx b/src/SelectMgr/SelectMgr_SelectableObject.cxx index d20c30f904..87006c49f2 100644 --- a/src/SelectMgr/SelectMgr_SelectableObject.cxx +++ b/src/SelectMgr/SelectMgr_SelectableObject.cxx @@ -16,20 +16,13 @@ #include -#include -#include #include -#include -#include #include #include -#include #include -#include #include #include #include -#include #include #include diff --git a/src/SelectMgr/SelectMgr_SelectableObjectSet.hxx b/src/SelectMgr/SelectMgr_SelectableObjectSet.hxx index 95701702f7..c8cb188fcf 100644 --- a/src/SelectMgr/SelectMgr_SelectableObjectSet.hxx +++ b/src/SelectMgr/SelectMgr_SelectableObjectSet.hxx @@ -16,12 +16,7 @@ #ifndef _SelectMgr_SelectableObjectSet_HeaderFile #define _SelectMgr_SelectableObjectSet_HeaderFile -#include -#include -#include -#include #include -#include #include #include diff --git a/src/SelectMgr/SelectMgr_Selection.hxx b/src/SelectMgr/SelectMgr_Selection.hxx index 77130ec2c9..50210ad8a3 100644 --- a/src/SelectMgr/SelectMgr_Selection.hxx +++ b/src/SelectMgr/SelectMgr_Selection.hxx @@ -17,7 +17,6 @@ #ifndef _SelectMgr_Selection_HeaderFile #define _SelectMgr_Selection_HeaderFile -#include #include #include #include diff --git a/src/SelectMgr/SelectMgr_SensitiveEntitySet.hxx b/src/SelectMgr/SelectMgr_SensitiveEntitySet.hxx index 49d59a00f4..41cf732333 100644 --- a/src/SelectMgr/SelectMgr_SensitiveEntitySet.hxx +++ b/src/SelectMgr/SelectMgr_SensitiveEntitySet.hxx @@ -17,9 +17,6 @@ #define _SelectMgr_SensitiveEntitySet_HeaderFile #include -#include -#include -#include #include #include #include diff --git a/src/SelectMgr/SelectMgr_SortCriterion.hxx b/src/SelectMgr/SelectMgr_SortCriterion.hxx index 29fc12b303..6a0d9065d3 100644 --- a/src/SelectMgr/SelectMgr_SortCriterion.hxx +++ b/src/SelectMgr/SelectMgr_SortCriterion.hxx @@ -18,7 +18,6 @@ #define _SelectMgr_SortCriterion_HeaderFile #include -#include #include #include diff --git a/src/SelectMgr/SelectMgr_ToleranceMap.hxx b/src/SelectMgr/SelectMgr_ToleranceMap.hxx index 1af12cc082..84d84895ad 100644 --- a/src/SelectMgr/SelectMgr_ToleranceMap.hxx +++ b/src/SelectMgr/SelectMgr_ToleranceMap.hxx @@ -15,7 +15,6 @@ #define _SelectMgr_ToleranceMap_HeaderFile #include -#include //! An internal class for calculation of current largest tolerance value which will be applied for creation of selecting frustum by default. //! Each time the selection set is deactivated, maximum tolerance value will be recalculated. diff --git a/src/SelectMgr/SelectMgr_VectorTypes.hxx b/src/SelectMgr/SelectMgr_VectorTypes.hxx index bd534bd2e6..b6ae9efd10 100644 --- a/src/SelectMgr/SelectMgr_VectorTypes.hxx +++ b/src/SelectMgr/SelectMgr_VectorTypes.hxx @@ -15,7 +15,6 @@ #define _SelectMgr_VectorTypes_HeaderFile #include -#include #include #include #include diff --git a/src/SelectMgr/SelectMgr_ViewClipRange.cxx b/src/SelectMgr/SelectMgr_ViewClipRange.cxx index c42f2c98e5..0580e2ea81 100644 --- a/src/SelectMgr/SelectMgr_ViewClipRange.cxx +++ b/src/SelectMgr/SelectMgr_ViewClipRange.cxx @@ -13,7 +13,6 @@ #include -#include #include // ======================================================================= diff --git a/src/SelectMgr/SelectMgr_ViewerSelector.cxx b/src/SelectMgr/SelectMgr_ViewerSelector.cxx index 94a7e75d75..4ad9473157 100644 --- a/src/SelectMgr/SelectMgr_ViewerSelector.cxx +++ b/src/SelectMgr/SelectMgr_ViewerSelector.cxx @@ -20,7 +20,6 @@ #include #include #include -#include #include #include #include diff --git a/src/SelectMgr/SelectMgr_ViewerSelector.hxx b/src/SelectMgr/SelectMgr_ViewerSelector.hxx index ad684245d1..a9dd146cba 100644 --- a/src/SelectMgr/SelectMgr_ViewerSelector.hxx +++ b/src/SelectMgr/SelectMgr_ViewerSelector.hxx @@ -17,10 +17,7 @@ #ifndef _SelectMgr_ViewerSelector_HeaderFile #define _SelectMgr_ViewerSelector_HeaderFile -#include -#include #include -#include #include #include #include @@ -35,7 +32,6 @@ #include #include #include -#include class SelectMgr_SensitiveEntitySet; class SelectMgr_EntityOwner; diff --git a/src/ShapeAlgo/ShapeAlgo_AlgoContainer.cxx b/src/ShapeAlgo/ShapeAlgo_AlgoContainer.cxx index bd3289237b..9b635a45fe 100644 --- a/src/ShapeAlgo/ShapeAlgo_AlgoContainer.cxx +++ b/src/ShapeAlgo/ShapeAlgo_AlgoContainer.cxx @@ -17,7 +17,6 @@ #include #include #include -#include #include #include #include @@ -33,15 +32,8 @@ #include #include #include -#include -#include -#include #include -#include #include -#include -#include -#include #include #include #include @@ -50,7 +42,6 @@ #include #include #include -#include #include #include #include diff --git a/src/ShapeAlgo/ShapeAlgo_AlgoContainer.hxx b/src/ShapeAlgo/ShapeAlgo_AlgoContainer.hxx index 63e294d383..e6947f312c 100644 --- a/src/ShapeAlgo/ShapeAlgo_AlgoContainer.hxx +++ b/src/ShapeAlgo/ShapeAlgo_AlgoContainer.hxx @@ -20,8 +20,6 @@ #include #include -#include -#include #include #include #include diff --git a/src/ShapeAnalysis/ShapeAnalysis.cxx b/src/ShapeAnalysis/ShapeAnalysis.cxx index 995466e29f..6e18ddd42c 100644 --- a/src/ShapeAnalysis/ShapeAnalysis.cxx +++ b/src/ShapeAnalysis/ShapeAnalysis.cxx @@ -23,17 +23,12 @@ #include #include #include -#include #include #include -#include #include -#include #include #include #include -#include -#include #include #include #include diff --git a/src/ShapeAnalysis/ShapeAnalysis_BoxBndTree.cxx b/src/ShapeAnalysis/ShapeAnalysis_BoxBndTree.cxx index 3066144680..821fabc107 100644 --- a/src/ShapeAnalysis/ShapeAnalysis_BoxBndTree.cxx +++ b/src/ShapeAnalysis/ShapeAnalysis_BoxBndTree.cxx @@ -22,9 +22,7 @@ #include #include #include -#include #include -#include //======================================================================= //function : Reject diff --git a/src/ShapeAnalysis/ShapeAnalysis_CheckSmallFace.cxx b/src/ShapeAnalysis/ShapeAnalysis_CheckSmallFace.cxx index 3e7f669b82..97528b8911 100644 --- a/src/ShapeAnalysis/ShapeAnalysis_CheckSmallFace.cxx +++ b/src/ShapeAnalysis/ShapeAnalysis_CheckSmallFace.cxx @@ -16,22 +16,17 @@ #include #include #include -#include -#include #include #include #include #include -#include #include #include #include #include #include -#include #include #include -#include #include #include #include @@ -42,7 +37,6 @@ #include #include #include -#include #include #include #include @@ -54,7 +48,6 @@ #include #include #include -#include #include #include #include diff --git a/src/ShapeAnalysis/ShapeAnalysis_CheckSmallFace.hxx b/src/ShapeAnalysis/ShapeAnalysis_CheckSmallFace.hxx index d1c8727306..a6fe1506c6 100644 --- a/src/ShapeAnalysis/ShapeAnalysis_CheckSmallFace.hxx +++ b/src/ShapeAnalysis/ShapeAnalysis_CheckSmallFace.hxx @@ -19,12 +19,9 @@ #include #include -#include #include #include -#include -#include #include #include #include diff --git a/src/ShapeAnalysis/ShapeAnalysis_Curve.hxx b/src/ShapeAnalysis/ShapeAnalysis_Curve.hxx index cacecdac28..4b4a633ea2 100644 --- a/src/ShapeAnalysis/ShapeAnalysis_Curve.hxx +++ b/src/ShapeAnalysis/ShapeAnalysis_Curve.hxx @@ -21,8 +21,6 @@ #include #include -#include -#include #include #include #include diff --git a/src/ShapeAnalysis/ShapeAnalysis_Edge.cxx b/src/ShapeAnalysis/ShapeAnalysis_Edge.cxx index ebd665a5ac..3a77d8d02f 100644 --- a/src/ShapeAnalysis/ShapeAnalysis_Edge.cxx +++ b/src/ShapeAnalysis/ShapeAnalysis_Edge.cxx @@ -19,11 +19,9 @@ // abv 06.05.99: S4137: adding methods GetTangent2d() #include -#include #include #include #include -#include #include #include #include @@ -45,7 +43,6 @@ #include #include #include -#include #include #include #include diff --git a/src/ShapeAnalysis/ShapeAnalysis_Edge.hxx b/src/ShapeAnalysis/ShapeAnalysis_Edge.hxx index 67fa1e2879..23f2c48ba4 100644 --- a/src/ShapeAnalysis/ShapeAnalysis_Edge.hxx +++ b/src/ShapeAnalysis/ShapeAnalysis_Edge.hxx @@ -22,8 +22,6 @@ #include #include -#include -#include #include class TopoDS_Edge; class Geom_Curve; diff --git a/src/ShapeAnalysis/ShapeAnalysis_FreeBoundData.hxx b/src/ShapeAnalysis/ShapeAnalysis_FreeBoundData.hxx index bd74979f22..98a28b67d9 100644 --- a/src/ShapeAnalysis/ShapeAnalysis_FreeBoundData.hxx +++ b/src/ShapeAnalysis/ShapeAnalysis_FreeBoundData.hxx @@ -18,7 +18,6 @@ #define _ShapeAnalysis_FreeBoundData_HeaderFile #include -#include #include #include diff --git a/src/ShapeAnalysis/ShapeAnalysis_FreeBounds.cxx b/src/ShapeAnalysis/ShapeAnalysis_FreeBounds.cxx index 1caa989aa0..5f88528942 100644 --- a/src/ShapeAnalysis/ShapeAnalysis_FreeBounds.cxx +++ b/src/ShapeAnalysis/ShapeAnalysis_FreeBounds.cxx @@ -37,9 +37,7 @@ #include #include #include -#include #include -#include #include #include #include @@ -50,7 +48,6 @@ #include #include #include -#include #include //ied_modif_for_compil_Nov-19-1998 diff --git a/src/ShapeAnalysis/ShapeAnalysis_FreeBounds.hxx b/src/ShapeAnalysis/ShapeAnalysis_FreeBounds.hxx index d6bf85ebb9..4d2ca9d490 100644 --- a/src/ShapeAnalysis/ShapeAnalysis_FreeBounds.hxx +++ b/src/ShapeAnalysis/ShapeAnalysis_FreeBounds.hxx @@ -22,8 +22,6 @@ #include #include -#include -#include #include #include class TopoDS_Shape; diff --git a/src/ShapeAnalysis/ShapeAnalysis_FreeBoundsProperties.cxx b/src/ShapeAnalysis/ShapeAnalysis_FreeBoundsProperties.cxx index 893ef6d30d..c176ed0d1c 100644 --- a/src/ShapeAnalysis/ShapeAnalysis_FreeBoundsProperties.cxx +++ b/src/ShapeAnalysis/ShapeAnalysis_FreeBoundsProperties.cxx @@ -26,7 +26,6 @@ #include #include #include -#include #include #include #include diff --git a/src/ShapeAnalysis/ShapeAnalysis_FreeBoundsProperties.hxx b/src/ShapeAnalysis/ShapeAnalysis_FreeBoundsProperties.hxx index d6b5e607e0..c85ba5cfd9 100644 --- a/src/ShapeAnalysis/ShapeAnalysis_FreeBoundsProperties.hxx +++ b/src/ShapeAnalysis/ShapeAnalysis_FreeBoundsProperties.hxx @@ -22,8 +22,6 @@ #include #include -#include -#include #include #include class ShapeAnalysis_FreeBoundData; diff --git a/src/ShapeAnalysis/ShapeAnalysis_Geom.cxx b/src/ShapeAnalysis/ShapeAnalysis_Geom.cxx index 5cc592f51f..e87e2840e4 100644 --- a/src/ShapeAnalysis/ShapeAnalysis_Geom.cxx +++ b/src/ShapeAnalysis/ShapeAnalysis_Geom.cxx @@ -13,7 +13,6 @@ //szv#4 S4163 -#include #include #include #include @@ -24,8 +23,6 @@ #include #include #include -#include -#include //======================================================================= //function : NearestPlane diff --git a/src/ShapeAnalysis/ShapeAnalysis_Geom.hxx b/src/ShapeAnalysis/ShapeAnalysis_Geom.hxx index 7d9d1dd64b..a19472b662 100644 --- a/src/ShapeAnalysis/ShapeAnalysis_Geom.hxx +++ b/src/ShapeAnalysis/ShapeAnalysis_Geom.hxx @@ -21,9 +21,7 @@ #include #include -#include #include -#include #include class gp_Pln; class gp_Trsf; diff --git a/src/ShapeAnalysis/ShapeAnalysis_HSequenceOfFreeBounds.hxx b/src/ShapeAnalysis/ShapeAnalysis_HSequenceOfFreeBounds.hxx index 61481d6528..6f426f99d4 100644 --- a/src/ShapeAnalysis/ShapeAnalysis_HSequenceOfFreeBounds.hxx +++ b/src/ShapeAnalysis/ShapeAnalysis_HSequenceOfFreeBounds.hxx @@ -17,7 +17,6 @@ #ifndef ShapeAnalysis_HSequenceOfFreeBounds_HeaderFile #define ShapeAnalysis_HSequenceOfFreeBounds_HeaderFile -#include #include #include diff --git a/src/ShapeAnalysis/ShapeAnalysis_ShapeContents.cxx b/src/ShapeAnalysis/ShapeAnalysis_ShapeContents.cxx index 7ddca39d35..44335d996f 100644 --- a/src/ShapeAnalysis/ShapeAnalysis_ShapeContents.cxx +++ b/src/ShapeAnalysis/ShapeAnalysis_ShapeContents.cxx @@ -21,7 +21,6 @@ #include #include #include -#include #include #include #include @@ -31,7 +30,6 @@ #include #include #include -#include #include #include #include diff --git a/src/ShapeAnalysis/ShapeAnalysis_ShapeContents.hxx b/src/ShapeAnalysis/ShapeAnalysis_ShapeContents.hxx index 25778f4df1..d589d1a94b 100644 --- a/src/ShapeAnalysis/ShapeAnalysis_ShapeContents.hxx +++ b/src/ShapeAnalysis/ShapeAnalysis_ShapeContents.hxx @@ -22,7 +22,6 @@ #include #include -#include #include class TopoDS_Shape; diff --git a/src/ShapeAnalysis/ShapeAnalysis_ShapeTolerance.cxx b/src/ShapeAnalysis/ShapeAnalysis_ShapeTolerance.cxx index ca3d86af2d..722bf7f383 100644 --- a/src/ShapeAnalysis/ShapeAnalysis_ShapeTolerance.cxx +++ b/src/ShapeAnalysis/ShapeAnalysis_ShapeTolerance.cxx @@ -18,10 +18,7 @@ #include #include #include -#include -#include #include -#include #include //======================================================================= diff --git a/src/ShapeAnalysis/ShapeAnalysis_ShapeTolerance.hxx b/src/ShapeAnalysis/ShapeAnalysis_ShapeTolerance.hxx index a0e58875ed..47dcd78de1 100644 --- a/src/ShapeAnalysis/ShapeAnalysis_ShapeTolerance.hxx +++ b/src/ShapeAnalysis/ShapeAnalysis_ShapeTolerance.hxx @@ -21,7 +21,6 @@ #include #include -#include #include #include #include diff --git a/src/ShapeAnalysis/ShapeAnalysis_Shell.hxx b/src/ShapeAnalysis/ShapeAnalysis_Shell.hxx index 7e31e4fe82..830075d7e6 100644 --- a/src/ShapeAnalysis/ShapeAnalysis_Shell.hxx +++ b/src/ShapeAnalysis/ShapeAnalysis_Shell.hxx @@ -19,10 +19,8 @@ #include #include -#include #include -#include #include class TopoDS_Shape; class TopoDS_Compound; diff --git a/src/ShapeAnalysis/ShapeAnalysis_Surface.cxx b/src/ShapeAnalysis/ShapeAnalysis_Surface.cxx index 935e0436de..63fbb24801 100644 --- a/src/ShapeAnalysis/ShapeAnalysis_Surface.cxx +++ b/src/ShapeAnalysis/ShapeAnalysis_Surface.cxx @@ -29,12 +29,10 @@ #include #include -#include #include #include #include #include -#include #include #include #include @@ -54,7 +52,6 @@ #include #include #include -#include #include IMPLEMENT_STANDARD_RTTIEXT(ShapeAnalysis_Surface,Standard_Transient) diff --git a/src/ShapeAnalysis/ShapeAnalysis_TransferParameters.cxx b/src/ShapeAnalysis/ShapeAnalysis_TransferParameters.cxx index 7f6aaed870..ada07d4c72 100644 --- a/src/ShapeAnalysis/ShapeAnalysis_TransferParameters.cxx +++ b/src/ShapeAnalysis/ShapeAnalysis_TransferParameters.cxx @@ -20,7 +20,6 @@ #include #include #include -#include #include #include diff --git a/src/ShapeAnalysis/ShapeAnalysis_TransferParameters.hxx b/src/ShapeAnalysis/ShapeAnalysis_TransferParameters.hxx index ae45fd0d64..477584834b 100644 --- a/src/ShapeAnalysis/ShapeAnalysis_TransferParameters.hxx +++ b/src/ShapeAnalysis/ShapeAnalysis_TransferParameters.hxx @@ -20,12 +20,10 @@ #include #include -#include #include #include #include #include -#include class ShapeAnalysis_TransferParameters; diff --git a/src/ShapeAnalysis/ShapeAnalysis_TransferParametersProj.cxx b/src/ShapeAnalysis/ShapeAnalysis_TransferParametersProj.cxx index fe5e483517..326c062a1e 100644 --- a/src/ShapeAnalysis/ShapeAnalysis_TransferParametersProj.cxx +++ b/src/ShapeAnalysis/ShapeAnalysis_TransferParametersProj.cxx @@ -12,12 +12,8 @@ // commercial license or contractual agreement. -#include #include #include -#include -#include -#include #include #include #include @@ -34,17 +30,13 @@ #include #include #include -#include #include -#include #include #include #include #include #include #include -#include -#include #include #include #include diff --git a/src/ShapeAnalysis/ShapeAnalysis_TransferParametersProj.hxx b/src/ShapeAnalysis/ShapeAnalysis_TransferParametersProj.hxx index b5cdf72233..b62a1687ba 100644 --- a/src/ShapeAnalysis/ShapeAnalysis_TransferParametersProj.hxx +++ b/src/ShapeAnalysis/ShapeAnalysis_TransferParametersProj.hxx @@ -21,9 +21,7 @@ #include #include -#include #include -#include #include #include class Geom_Curve; diff --git a/src/ShapeAnalysis/ShapeAnalysis_Wire.cxx b/src/ShapeAnalysis/ShapeAnalysis_Wire.cxx index 71560d84c7..633917eb4b 100644 --- a/src/ShapeAnalysis/ShapeAnalysis_Wire.cxx +++ b/src/ShapeAnalysis/ShapeAnalysis_Wire.cxx @@ -44,13 +44,11 @@ #include #include #include -#include #include #include #include #include #include -#include #include #include #include @@ -81,9 +79,7 @@ #include #include #include -#include #include -#include #include IMPLEMENT_STANDARD_RTTIEXT(ShapeAnalysis_Wire,Standard_Transient) diff --git a/src/ShapeAnalysis/ShapeAnalysis_Wire.hxx b/src/ShapeAnalysis/ShapeAnalysis_Wire.hxx index c2bc90c7f1..edb403eca4 100644 --- a/src/ShapeAnalysis/ShapeAnalysis_Wire.hxx +++ b/src/ShapeAnalysis/ShapeAnalysis_Wire.hxx @@ -21,10 +21,8 @@ #include #include -#include #include #include -#include #include #include #include diff --git a/src/ShapeAnalysis/ShapeAnalysis_WireOrder.hxx b/src/ShapeAnalysis/ShapeAnalysis_WireOrder.hxx index cddcc80409..da2f893a74 100644 --- a/src/ShapeAnalysis/ShapeAnalysis_WireOrder.hxx +++ b/src/ShapeAnalysis/ShapeAnalysis_WireOrder.hxx @@ -21,11 +21,9 @@ #include #include -#include #include #include #include -#include #include class gp_XYZ; class gp_XY; diff --git a/src/ShapeAnalysis/ShapeAnalysis_WireVertex.hxx b/src/ShapeAnalysis/ShapeAnalysis_WireVertex.hxx index 1fbfbb3710..fbd73df54e 100644 --- a/src/ShapeAnalysis/ShapeAnalysis_WireVertex.hxx +++ b/src/ShapeAnalysis/ShapeAnalysis_WireVertex.hxx @@ -24,8 +24,6 @@ #include #include #include -#include -#include #include class ShapeExtend_WireData; class TopoDS_Wire; From 2e0b684df323e7657d4e4a61b1273922018f5830 Mon Sep 17 00:00:00 2001 From: aml Date: Tue, 14 Jun 2022 17:02:28 +0300 Subject: [PATCH 308/639] 0033019: Coding - get rid of unused classes --- .../BRepExtrema_DistShapeShape.cxx | 1 - src/Bnd/Bnd_BoundSortBox2d.cxx | 403 ------------------ src/Bnd/Bnd_BoundSortBox2d.hxx | 129 ------ src/Bnd/Bnd_SeqOfBox.hxx | 27 -- src/Bnd/FILES | 3 - src/LocOpe/LocOpe_WiresOnShape.cxx | 5 +- src/Quantity/FILES | 2 - src/Quantity/Quantity_Array2OfColor.hxx | 26 -- src/Quantity/Quantity_PhysicalQuantity.hxx | 93 ---- 9 files changed, 2 insertions(+), 687 deletions(-) delete mode 100644 src/Bnd/Bnd_BoundSortBox2d.cxx delete mode 100644 src/Bnd/Bnd_BoundSortBox2d.hxx delete mode 100644 src/Bnd/Bnd_SeqOfBox.hxx delete mode 100644 src/Quantity/Quantity_Array2OfColor.hxx delete mode 100644 src/Quantity/Quantity_PhysicalQuantity.hxx diff --git a/src/BRepExtrema/BRepExtrema_DistShapeShape.cxx b/src/BRepExtrema/BRepExtrema_DistShapeShape.cxx index 8bd58f7e22..fdf1594598 100644 --- a/src/BRepExtrema/BRepExtrema_DistShapeShape.cxx +++ b/src/BRepExtrema/BRepExtrema_DistShapeShape.cxx @@ -30,7 +30,6 @@ #include #include #include -#include #include #include #include diff --git a/src/Bnd/Bnd_BoundSortBox2d.cxx b/src/Bnd/Bnd_BoundSortBox2d.cxx deleted file mode 100644 index d5eaec691a..0000000000 --- a/src/Bnd/Bnd_BoundSortBox2d.cxx +++ /dev/null @@ -1,403 +0,0 @@ -// Created on: 1993-03-08 -// Created by: Didier PIFFAULT -// Copyright (c) 1993-1999 Matra Datavision -// Copyright (c) 1999-2014 OPEN CASCADE SAS -// -// This file is part of Open CASCADE Technology software library. -// -// This library is free software; you can redistribute it and/or modify it under -// the terms of the GNU Lesser General Public License version 2.1 as published -// by the Free Software Foundation, with special exception defined in the file -// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT -// distribution for complete text of the license and disclaimer of any warranty. -// -// Alternatively, this file may be used under the terms of Open CASCADE -// commercial license or contractual agreement. - - -#include -#include -#include -#include -#include -#include -#include - -//======================================================================= -//function : Bnd_BoundSortBox2d -//purpose : -//======================================================================= -Bnd_BoundSortBox2d::Bnd_BoundSortBox2d() - : discrX(0), discrY(0) -{} - - -//======================================================================= -//function : Initialize -//purpose : -//======================================================================= - -void Bnd_BoundSortBox2d::Initialize(const Bnd_Box2d& CompleteBox, - const Handle(Bnd_HArray1OfBox2d)& SetOfBox) -{ - myBox=CompleteBox; - myBndComponents=SetOfBox; - discrX=SetOfBox->Length(); - discrY=discrX; - - Standard_Real xmin, ymin, xmax, ymax; - Standard_Real middleX=0.; - Standard_Real middleY=0.; - - const Bnd_Array1OfBox2d & taBox=myBndComponents->Array1(); - - Standard_Integer labox; - for (labox=taBox.Lower(); labox<=taBox.Upper(); labox++) { - if (!taBox(labox).IsVoid()) { - taBox.Value(labox).Get(xmin, ymin, xmax, ymax); - middleX+=xmax-xmin; - middleY+=ymax-ymin; - } - } - middleX=middleX/taBox.Length(); - middleY=middleY/taBox.Length(); - - Standard_Real Xmax, Ymax; - CompleteBox.Get(Xmin, Ymin, Xmax, Ymax); - deltaX=(Xmax-Xmin)/(Standard_Real)discrX; - deltaY=(Ymax-Ymin)/(Standard_Real)discrY; - - if (middleX < Epsilon(100.)) { - discrX=1; - deltaX=Xmax-Xmin; - } - else if (middleX > deltaX) { - discrX=(Standard_Integer)((Xmax-Xmin)/middleX); - deltaX=middleX; - discrX++; - } - - if (middleY < Epsilon(100.)) { - discrY=1; - deltaY=Ymax-Ymin; - } - else if (middleY > deltaY) { - discrY=(Standard_Integer)((Ymax-Ymin)/middleY + 0.1); - deltaY=middleY; - discrY++; - } - - SortBoxes(); -} - -//======================================================================= -//function : Initialize -//purpose : -//======================================================================= - -void Bnd_BoundSortBox2d::Initialize(const Handle(Bnd_HArray1OfBox2d)& SetOfBox) -{ - myBndComponents=SetOfBox; - discrX=SetOfBox->Length(); - discrY=discrX; - - Standard_Real xmin, ymin, xmax, ymax; - Standard_Real middleX=0.; - Standard_Real middleY=0.; - - const Bnd_Array1OfBox2d & taBox=myBndComponents->Array1(); - - Standard_Integer labox; - for (labox=taBox.Lower(); labox<=taBox.Upper(); labox++) { - if (!taBox(labox).IsVoid()) { - myBox.Add(taBox(labox)); - taBox.Value(labox).Get(xmin, ymin, xmax, ymax); - middleX+=xmax-xmin; - middleY+=ymax-ymin; - } - } - middleX=middleX/taBox.Length(); - middleY=middleY/taBox.Length(); - - Standard_Real Xmax, Ymax; - myBox.Get(Xmin, Ymin, Xmax, Ymax); - deltaX=(Xmax-Xmin)/(Standard_Real)discrX; - deltaY=(Ymax-Ymin)/(Standard_Real)discrY; - - if (middleX < Epsilon(100.)) { - discrX=1; - deltaX=Xmax-Xmin; - } - else if (middleX > deltaX) { - discrX=(Standard_Integer)((Xmax-Xmin)/middleX); - deltaX=middleX; - discrX++; - } - - if (middleY < Epsilon(100.)) { - discrY=1; - deltaY=Ymax-Ymin; - } - else if (middleY > deltaY) { - discrY=(Standard_Integer)((Ymax-Ymin)/middleY + 0.1); - deltaY=middleY; - discrY++; - } - - SortBoxes(); -} - - -//======================================================================= -//function : SortBoxes -//purpose : -//======================================================================= - -void Bnd_BoundSortBox2d::SortBoxes() -{ - Standard_NullValue_Raise_if (discrX+discrY <=0, "BoundSortBox2d nul!"); - - Standard_Integer labox, lacase, firstcase, lastcase; - Standard_Real xmin, ymin, xmax, ymax; - const Bnd_Array1OfBox2d & taBox=myBndComponents->Array1(); - - axisX=new TColStd_HArray1OfListOfInteger(1, discrX); - TColStd_Array1OfListOfInteger & tabListX=axisX->ChangeArray1(); - - axisY=new TColStd_HArray1OfListOfInteger(1, discrY); - TColStd_Array1OfListOfInteger & tabListY=axisY->ChangeArray1(); - - for (labox=taBox.Lower(); labox<=taBox.Upper(); labox++) { - if (!taBox(labox).IsVoid()) { - taBox(labox).Get(xmin, ymin, xmax, ymax); - - if (discrX>1) { - firstcase=(Standard_Integer ) Max(1.0, (xmin-Xmin)/deltaX); - lastcase=(Standard_Integer ) Min((Standard_Real)discrX, ((xmax-Xmin)/deltaX)+1); - for (lacase=firstcase; lacase<=lastcase; lacase++) { - tabListX(lacase).Append(labox); - } - } - - if (discrY >1) { - firstcase=(Standard_Integer ) Max(1.0, (ymin-Ymin)/deltaY); - lastcase=(Standard_Integer ) Min((Standard_Real)discrY, ((ymax-Ymin)/deltaY)+1); - for (lacase=firstcase; lacase<=lastcase; lacase++) { - tabListY(lacase).Append(labox); - } - } - } - } -} - -//======================================================================= -//function : Initialize -//purpose : -//======================================================================= - -void Bnd_BoundSortBox2d::Initialize(const Bnd_Box2d& CompleteBox, - const Standard_Integer nbComponents) -{ - Standard_NullValue_Raise_if (nbComponents <=0, "BoundSortBox nul!"); - - myBox=CompleteBox; - myBndComponents=new Bnd_HArray1OfBox2d(1, nbComponents); - - Bnd_Box2d emptyBox; - myBndComponents->Init( emptyBox ); - - discrX=nbComponents; - discrY=nbComponents; - - Standard_Real Xmax, Ymax; - CompleteBox.Get(Xmin, Ymin, Xmax, Ymax); - - deltaX=(Xmax-Xmin)/(Standard_Real)discrX; - deltaY=(Ymax-Ymin)/(Standard_Real)discrY; - - if (deltaX < Epsilon(100.)) { - discrX=1; - deltaX=Xmax-Xmin; - } - else axisX=new TColStd_HArray1OfListOfInteger(1, discrX); - - if (deltaY < Epsilon(100.)) { - discrY=1; - deltaY=Ymax-Ymin; - } - else axisY=new TColStd_HArray1OfListOfInteger(1, discrY); -} - -//======================================================================= -//function : Add -//purpose : -//======================================================================= - -void Bnd_BoundSortBox2d::Add(const Bnd_Box2d& theBox, - const Standard_Integer boxIndex) -{ - Standard_MultiplyDefined_Raise_if - (!(myBndComponents->Value(boxIndex).IsVoid()), - " This box is already defined !"); - - if (!theBox.IsVoid()) { - Bnd_Array1OfBox2d & taBox=myBndComponents->ChangeArray1(); - Standard_Integer theGap, firstGap , lastGap; - Standard_Real xmin, ymin, xmax, ymax; - theBox.Get(xmin, ymin, xmax, ymax); - - if (taBox.Lower()<=boxIndex && boxIndex<=taBox.Upper()) - taBox(boxIndex).Update(xmin, ymin, xmax, ymax); - - TColStd_Array1OfListOfInteger & tabListX=axisX->ChangeArray1(); - - if (discrX>1) { - firstGap=(Standard_Integer ) Max(1.0, ((xmin-Xmin)/deltaX)+1); - lastGap=(Standard_Integer ) Min((Standard_Real)discrX, ((xmax-Xmin)/deltaX)+1); - for (theGap=firstGap; theGap<=lastGap; theGap++) { - tabListX(theGap).Append(boxIndex); - } - } - - TColStd_Array1OfListOfInteger & tabListY=axisY->ChangeArray1(); - - if (discrY >1) { - firstGap=(Standard_Integer ) Max(1.0, ((ymin-Ymin)/deltaY)+1); - lastGap=(Standard_Integer ) Min((Standard_Real)discrY, ((ymax-Ymin)/deltaY)+1); - for (theGap=firstGap; theGap<=lastGap; theGap++) { - tabListY(theGap).Append(boxIndex); - } - } - } -} - - -//======================================================================= -//function : Compare -//purpose : -//======================================================================= - - -const TColStd_ListOfInteger& Bnd_BoundSortBox2d::Compare - (const Bnd_Box2d& theBox) -{ - Standard_NullValue_Raise_if (discrX+discrY <=0, - "Compare sur 1 BoundSortBox2d nul!"); - - lastResult.Clear(); - if (theBox.IsVoid()) return lastResult; - if (theBox.IsOut(myBox)) return lastResult; - - Standard_Integer lacase, firstcase, lastcase; - Standard_Real xmin, ymin, xmax, ymax; - theBox.Get(xmin, ymin, xmax, ymax); - - const Bnd_Array1OfBox2d & taBox=myBndComponents->Array1(); - Crible.Clear(); - theFound=2; - - Standard_Integer cardY=0; - if (discrY>1 && (!theBox.IsOpenYmin() || !theBox.IsOpenYmax())) { - const TColStd_Array1OfListOfInteger & tabList=axisY->Array1(); - firstcase=(Standard_Integer ) Max(1.0, (ymin-Ymin)/deltaY); - lastcase=(Standard_Integer ) Min((Standard_Real)discrY, ((ymax-Ymin)/deltaY)+1); - for (lacase=firstcase; lacase<=lastcase; lacase++) { - TColStd_ListIteratorOfListOfInteger theList(tabList(lacase)); - for (; theList.More(); theList.Next()) { - cardY++; - Crible.Bind(theList.Value(), 2); - } - } - if (cardY==0) return lastResult; - } - else { - if (ymin > Ymin+deltaY || ymax < Ymin) - return lastResult; - theFound-=2; - } - - if (discrX>1 && (!theBox.IsOpenXmin() || !theBox.IsOpenXmax())) { - const TColStd_Array1OfListOfInteger & tabList=axisX->Array1(); - firstcase=(Standard_Integer ) Max(1.0, (xmin-Xmin)/deltaX); - lastcase=(Standard_Integer ) Min((Standard_Real)discrX, ((xmax-Xmin)/deltaX)+1); - for (lacase=firstcase; lacase<=lastcase; lacase++) { - TColStd_ListIteratorOfListOfInteger theList(tabList(lacase)); - for (; theList.More(); theList.Next()) { - if (Crible.IsBound(theList.Value())) { - if (Crible(theList.Value())==theFound) { - if (!taBox.Value(theList.Value()).IsOut(theBox)){ - lastResult.Append(theList.Value()); - Crible(theList.Value())=0; - } - } - } - } - } - return lastResult; - } - - else { - if (xmin > Xmin+deltaX || xmax < Xmin) return lastResult; - else if (discrY==1) - { - lacase=1; - for(Standard_Integer i=taBox.Lower();i<=taBox.Upper();i++) - { - lastResult.Append(i); - } - } - else{ - - TColStd_DataMapIteratorOfDataMapOfIntegerInteger itDM(Crible); - for (; itDM.More(); itDM.Next()) { - if (itDM.Value()==theFound) { - if (taBox.Lower()<=itDM.Key() && itDM.Key()<=taBox.Upper()) { - if (!taBox(itDM.Key()).IsOut(theBox)) - lastResult.Append(itDM.Key()); - } - else { - lastResult.Append(itDM.Key()); - } - } - } - } - } - return lastResult; -} - - -//======================================================================= -//function : Dump -//purpose : -//======================================================================= - -void Bnd_BoundSortBox2d::Dump() const -{ - Standard_Integer lacase; - - std::cout << "axis X : " << discrX << " intervalles de " << deltaX << std::endl; - if (discrX>1) { - const TColStd_Array1OfListOfInteger & tabList=axisX->Array1(); - for (lacase=1; lacase<=discrX; lacase++) { - std::cout << " X " << lacase << " : " ; - TColStd_ListIteratorOfListOfInteger theList(tabList(lacase)); - for (; theList.More(); theList.Next()) { - std::cout << theList.Value() << " "; - } - std::cout << "\n"; - } - } - - std::cout << "axis Y : " << discrY << " intervalles de " << deltaY << std::endl; - if (discrY>1) { - const TColStd_Array1OfListOfInteger & tabList=axisY->Array1(); - for (lacase=1; lacase<=discrY; lacase++) { - std::cout << " Y " << lacase << " : " ; - TColStd_ListIteratorOfListOfInteger theList(tabList(lacase)); - for (; theList.More(); theList.Next()) { - std::cout << theList.Value() << " "; - } - std::cout << "\n"; - } - } -} diff --git a/src/Bnd/Bnd_BoundSortBox2d.hxx b/src/Bnd/Bnd_BoundSortBox2d.hxx deleted file mode 100644 index 20c06219bd..0000000000 --- a/src/Bnd/Bnd_BoundSortBox2d.hxx +++ /dev/null @@ -1,129 +0,0 @@ -// Created on: 1993-03-05 -// Created by: Didier PIFFAULT -// Copyright (c) 1993-1999 Matra Datavision -// Copyright (c) 1999-2014 OPEN CASCADE SAS -// -// This file is part of Open CASCADE Technology software library. -// -// This library is free software; you can redistribute it and/or modify it under -// the terms of the GNU Lesser General Public License version 2.1 as published -// by the Free Software Foundation, with special exception defined in the file -// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT -// distribution for complete text of the license and disclaimer of any warranty. -// -// Alternatively, this file may be used under the terms of Open CASCADE -// commercial license or contractual agreement. - -#ifndef _Bnd_BoundSortBox2d_HeaderFile -#define _Bnd_BoundSortBox2d_HeaderFile - -#include -#include -#include - -#include -#include -#include -#include -#include - - -//! A tool to compare a 2D bounding box with a set of 2D -//! bounding boxes. It sorts the set of bounding boxes to give -//! the list of boxes which intersect the element being compared. -//! The boxes being sorted generally bound a set of shapes, -//! while the box being compared bounds a shape to be -//! compared. The resulting list of intersecting boxes therefore -//! gives the list of items which potentially intersect the shape to be compared. -class Bnd_BoundSortBox2d -{ -public: - - DEFINE_STANDARD_ALLOC - - - //! Constructs an empty comparison algorithm for 2D bounding boxes. - //! The bounding boxes are then defined using the Initialize function. - Standard_EXPORT Bnd_BoundSortBox2d(); - - //! Initializes this comparison algorithm with - //! - the set of 2D bounding boxes SetOfBox - Standard_EXPORT void Initialize (const Bnd_Box2d& CompleteBox, const Handle(Bnd_HArray1OfBox2d)& SetOfBox); - - //! Initializes this comparison algorithm with - //! - the set of 2D bounding boxes SetOfBox, where - //! CompleteBox is given as the global bounding box of SetOfBox. - Standard_EXPORT void Initialize (const Handle(Bnd_HArray1OfBox2d)& SetOfBox); - - //! Initializes this comparison algorithm, giving it only - //! - the maximum number nbComponents, and - //! - the global bounding box CompleteBox, - //! of the 2D bounding boxes to be managed. Use the Add - //! function to define the array of bounding boxes to be sorted by this algorithm. - Standard_EXPORT void Initialize (const Bnd_Box2d& CompleteBox, const Standard_Integer nbComponents); - - //! Adds the 2D bounding box theBox at position boxIndex in - //! the array of boxes to be sorted by this comparison algorithm. - //! This function is used only in conjunction with the third - //! syntax described in the synopsis of Initialize. - //! Exceptions - //! - Standard_OutOfRange if boxIndex is not in the - //! range [ 1,nbComponents ] where - //! nbComponents is the maximum number of bounding - //! boxes declared for this comparison algorithm at - //! initialization. - //! - Standard_MultiplyDefined if a box still exists at - //! position boxIndex in the array of boxes to be sorted by - //! this comparison algorithm. - Standard_EXPORT void Add (const Bnd_Box2d& theBox, const Standard_Integer boxIndex); - - - //! Compares the 2D bounding box theBox with the set of - //! bounding boxes to be sorted by this comparison algorithm, - //! and returns the list of intersecting bounding boxes as a list - //! of indexes on the array of bounding boxes used by this algorithm. - Standard_EXPORT const TColStd_ListOfInteger& Compare (const Bnd_Box2d& theBox); - - Standard_EXPORT void Dump() const; - - - - -protected: - - - - - -private: - - - //! Prepares BoundSortBox2d and sorts the rectangles of - //! . - Standard_EXPORT void SortBoxes(); - - - Bnd_Box2d myBox; - Handle(Bnd_HArray1OfBox2d) myBndComponents; - Standard_Real Xmin; - Standard_Real Ymin; - Standard_Real deltaX; - Standard_Real deltaY; - Standard_Integer discrX; - Standard_Integer discrY; - Handle(TColStd_HArray1OfListOfInteger) axisX; - Handle(TColStd_HArray1OfListOfInteger) axisY; - Standard_Integer theFound; - TColStd_DataMapOfIntegerInteger Crible; - TColStd_ListOfInteger lastResult; - - -}; - - - - - - - -#endif // _Bnd_BoundSortBox2d_HeaderFile diff --git a/src/Bnd/Bnd_SeqOfBox.hxx b/src/Bnd/Bnd_SeqOfBox.hxx deleted file mode 100644 index eeb418ff17..0000000000 --- a/src/Bnd/Bnd_SeqOfBox.hxx +++ /dev/null @@ -1,27 +0,0 @@ -// Created on: 1991-01-08 -// Created by: Didier Piffault -// Copyright (c) 1991-1999 Matra Datavision -// Copyright (c) 1999-2014 OPEN CASCADE SAS -// -// This file is part of Open CASCADE Technology software library. -// -// This library is free software; you can redistribute it and/or modify it under -// the terms of the GNU Lesser General Public License version 2.1 as published -// by the Free Software Foundation, with special exception defined in the file -// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT -// distribution for complete text of the license and disclaimer of any warranty. -// -// Alternatively, this file may be used under the terms of Open CASCADE -// commercial license or contractual agreement. - -#ifndef Bnd_SeqOfBox_HeaderFile -#define Bnd_SeqOfBox_HeaderFile - -#include -#include - -//! This sequence used to store the bounding boxes of sub-Shapes. -typedef NCollection_Sequence Bnd_SeqOfBox; - - -#endif diff --git a/src/Bnd/FILES b/src/Bnd/FILES index 03743cff52..a885a15174 100644 --- a/src/Bnd/FILES +++ b/src/Bnd/FILES @@ -15,8 +15,6 @@ Bnd_B3x.gxx Bnd_B3x.lxx Bnd_BoundSortBox.cxx Bnd_BoundSortBox.hxx -Bnd_BoundSortBox2d.cxx -Bnd_BoundSortBox2d.hxx Bnd_Box.cxx Bnd_Box.hxx Bnd_Box2d.cxx @@ -28,7 +26,6 @@ Bnd_OBB.cxx Bnd_OBB.hxx Bnd_Range.cxx Bnd_Range.hxx -Bnd_SeqOfBox.hxx Bnd_Sphere.cxx Bnd_Sphere.hxx Bnd_Sphere.lxx diff --git a/src/LocOpe/LocOpe_WiresOnShape.cxx b/src/LocOpe/LocOpe_WiresOnShape.cxx index 273e64cafb..22b57eeb3d 100644 --- a/src/LocOpe/LocOpe_WiresOnShape.cxx +++ b/src/LocOpe/LocOpe_WiresOnShape.cxx @@ -61,7 +61,6 @@ #include #include #include -#include #include #include @@ -1468,8 +1467,8 @@ void FindInternalIntersections(const TopoDS_Edge& theEdge, Standard_Boolean LocOpe_WiresOnShape::Add(const TopTools_SequenceOfShape& theEdges) { TopTools_SequenceOfShape anEdges; - Bnd_SeqOfBox anEdgeBoxes; Standard_Integer i = 1, nb = theEdges.Length(); + NCollection_Array1 anEdgeBoxes(1, nb); for (; i <= nb; i++) { const TopoDS_Shape& aCurSplit = theEdges(i); @@ -1484,7 +1483,7 @@ Standard_Boolean LocOpe_WiresOnShape::Add(const TopTools_SequenceOfShape& theEdg continue; Standard_Real aTolE = BRep_Tool::Tolerance(TopoDS::Edge(aCurE)); aBoxE.SetGap(aTolE); - anEdgeBoxes.Append(aBoxE); + anEdgeBoxes.SetValue(i, aBoxE); anEdges.Append(aCurE); } diff --git a/src/Quantity/FILES b/src/Quantity/FILES index d541a722b5..a566c8fe02 100755 --- a/src/Quantity/FILES +++ b/src/Quantity/FILES @@ -1,5 +1,4 @@ Quantity_Array1OfColor.hxx -Quantity_Array2OfColor.hxx Quantity_Color.cxx Quantity_Color.hxx Quantity_ColorTable.pxx @@ -15,5 +14,4 @@ Quantity_NameOfColor.hxx Quantity_Period.cxx Quantity_Period.hxx Quantity_PeriodDefinitionError.hxx -Quantity_PhysicalQuantity.hxx Quantity_TypeOfColor.hxx diff --git a/src/Quantity/Quantity_Array2OfColor.hxx b/src/Quantity/Quantity_Array2OfColor.hxx deleted file mode 100644 index 20908e0b6f..0000000000 --- a/src/Quantity/Quantity_Array2OfColor.hxx +++ /dev/null @@ -1,26 +0,0 @@ -// Created on: 1994-02-08 -// Created by: Gilles DEBARBOUILLE -// 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 Quantity_Array2OfColor_HeaderFile -#define Quantity_Array2OfColor_HeaderFile - -#include -#include - -typedef NCollection_Array2 Quantity_Array2OfColor; - - -#endif diff --git a/src/Quantity/Quantity_PhysicalQuantity.hxx b/src/Quantity/Quantity_PhysicalQuantity.hxx deleted file mode 100644 index 910de756d8..0000000000 --- a/src/Quantity/Quantity_PhysicalQuantity.hxx +++ /dev/null @@ -1,93 +0,0 @@ -// Created on: 1994-02-08 -// Created by: Gilles DEBARBOUILLE -// 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 _Quantity_PhysicalQuantity_HeaderFile -#define _Quantity_PhysicalQuantity_HeaderFile - -//! List of all physical quantities(Afnor) -enum Quantity_PhysicalQuantity -{ -Quantity_MASS, -Quantity_PLANEANGLE, -Quantity_SOLIDANGLE, -Quantity_LENGTH, -Quantity_AREA, -Quantity_VOLUME, -Quantity_SPEED, -Quantity_VELOCITY, -Quantity_ACCELERATION, -Quantity_ANGULARVELOCITY, -Quantity_FREQUENCY, -Quantity_TEMPERATURE, -Quantity_AMOUNTOFSUBSTANCE, -Quantity_DENSITY, -Quantity_MASSFLOW, -Quantity_VOLUMEFLOW, -Quantity_CONSUMPTION, -Quantity_MOMENTUM, -Quantity_KINETICMOMENT, -Quantity_MOMENTOFINERTIA, -Quantity_FORCE, -Quantity_MOMENTOFAFORCE, -Quantity_TORQUE, -Quantity_WEIGHT, -Quantity_PRESSURE, -Quantity_VISCOSITY, -Quantity_KINEMATICVISCOSITY, -Quantity_ENERGY, -Quantity_WORK, -Quantity_POWER, -Quantity_SURFACETENSION, -Quantity_COEFFICIENTOFEXPANSION, -Quantity_THERMALCONDUCTIVITY, -Quantity_SPECIFICHEATCAPACITY, -Quantity_ENTROPY, -Quantity_ENTHALPY, -Quantity_LUMINOUSINTENSITY, -Quantity_LUMINOUSFLUX, -Quantity_LUMINANCE, -Quantity_ILLUMINANCE, -Quantity_LUMINOUSEXPOSITION, -Quantity_LUMINOUSEFFICACITY, -Quantity_ELECTRICCHARGE, -Quantity_ELECTRICCURRENT, -Quantity_ELECTRICFIELDSTRENGTH, -Quantity_ELECTRICPOTENTIAL, -Quantity_ELECTRICCAPACITANCE, -Quantity_MAGNETICFLUX, -Quantity_MAGNETICFLUXDENSITY, -Quantity_MAGNETICFIELDSTRENGTH, -Quantity_RELUCTANCE, -Quantity_RESISTANCE, -Quantity_INDUCTANCE, -Quantity_CAPACITANCE, -Quantity_IMPEDANCE, -Quantity_ADMITTANCE, -Quantity_RESISTIVITY, -Quantity_CONDUCTIVITY, -Quantity_MOLARMASS, -Quantity_MOLARVOLUME, -Quantity_CONCENTRATION, -Quantity_MOLARCONCENTRATION, -Quantity_MOLARITY, -Quantity_SOUNDINTENSITY, -Quantity_ACOUSTICINTENSITY, -Quantity_ACTIVITY, -Quantity_ABSORBEDDOSE, -Quantity_DOSEEQUIVALENT -}; - -#endif // _Quantity_PhysicalQuantity_HeaderFile From 94748ad20e40864e60c1035e254ee5afffdc0d50 Mon Sep 17 00:00:00 2001 From: aml Date: Fri, 17 Jun 2022 09:20:51 +0300 Subject: [PATCH 309/639] 0032653: Modeling Data - misprint in Geom2d_Conic.hxx api SetYAxis(const gp_Ax2d& theAY) Fix misprint. --- src/Geom2d/Geom2d_Conic.hxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Geom2d/Geom2d_Conic.hxx b/src/Geom2d/Geom2d_Conic.hxx index 869f199943..64d27c3f3b 100644 --- a/src/Geom2d/Geom2d_Conic.hxx +++ b/src/Geom2d/Geom2d_Conic.hxx @@ -60,7 +60,7 @@ public: //! of this conic is recomputed normal to theA, without //! changing the orientation of the local coordinate //! system (right-handed or left-handed). - void SetYAxis (const gp_Ax2d& theAY) { pos.SetXAxis(theAY); } + void SetYAxis (const gp_Ax2d& theAY) { pos.SetYAxis(theAY); } //! Modifies this conic, redefining its local coordinate //! system partially, by assigning theP as its origin. From f8c45c2f0df26c4da5d8367c737f83b84952b019 Mon Sep 17 00:00:00 2001 From: mpv Date: Mon, 20 Jun 2022 17:45:27 +0300 Subject: [PATCH 310/639] 0032894: Application Framework - Regressions on Ubuntu 20.04 Updated corrupted file reading error management, make memory unit-tests more stable. --- .../BinLDrivers_DocumentRetrievalDriver.cxx | 5 +++-- src/BinLDrivers/BinLDrivers_DocumentSection.cxx | 10 +++++++--- src/BinLDrivers/BinLDrivers_DocumentSection.hxx | 7 ++++--- tests/bugs/caf/bug114 | 2 +- tests/bugs/caf/bug31546 | 5 +++++ 5 files changed, 20 insertions(+), 9 deletions(-) diff --git a/src/BinLDrivers/BinLDrivers_DocumentRetrievalDriver.cxx b/src/BinLDrivers/BinLDrivers_DocumentRetrievalDriver.cxx index c6b7d50a49..52a83fe71f 100644 --- a/src/BinLDrivers/BinLDrivers_DocumentRetrievalDriver.cxx +++ b/src/BinLDrivers/BinLDrivers_DocumentRetrievalDriver.cxx @@ -229,11 +229,12 @@ void BinLDrivers_DocumentRetrievalDriver::Read (Standard_IStream& if (aFileVer >= TDocStd_FormatVersion_VERSION_3) { BinLDrivers_DocumentSection aSection; do { - BinLDrivers_DocumentSection::ReadTOC (aSection, theIStream, aFileVer); + if (!BinLDrivers_DocumentSection::ReadTOC (aSection, theIStream, aFileVer)) + break; mySections.Append(aSection); } while (!aSection.Name().IsEqual (aQuickPart ? ENDSECTION_POS : SHAPESECTION_POS) && !theIStream.eof()); - if (theIStream.eof()) { + if (mySections.IsEmpty() || theIStream.eof()) { // There is no shape section in the file. myMsgDriver->Send (aMethStr + "error: shape section is not found", Message_Fail); myReaderStatus = PCDM_RS_ReaderException; diff --git a/src/BinLDrivers/BinLDrivers_DocumentSection.cxx b/src/BinLDrivers/BinLDrivers_DocumentSection.cxx index 97c5b4b8e7..547ced34d5 100644 --- a/src/BinLDrivers/BinLDrivers_DocumentSection.cxx +++ b/src/BinLDrivers/BinLDrivers_DocumentSection.cxx @@ -214,14 +214,17 @@ void BinLDrivers_DocumentSection::Write (Standard_OStream& theStream, //purpose : //======================================================================= -void BinLDrivers_DocumentSection::ReadTOC - (BinLDrivers_DocumentSection& theSection, +Standard_Boolean BinLDrivers_DocumentSection::ReadTOC ( + BinLDrivers_DocumentSection& theSection, Standard_IStream& theStream, const TDocStd_FormatVersion theDocFormatVersion) { - char aBuf[512]; + static const int THE_BUF_SIZE = 512; + char aBuf[THE_BUF_SIZE]; Standard_Integer aNameBufferSize; theStream.read ((char *)&aNameBufferSize, sizeof(Standard_Integer)); + if (theStream.eof() || aNameBufferSize > THE_BUF_SIZE) + return Standard_False; #ifdef DO_INVERSE aNameBufferSize = InverseSize(aNameBufferSize); #endif @@ -260,4 +263,5 @@ void BinLDrivers_DocumentSection::ReadTOC theSection.myValue[1] = aValue[1]; theSection.myIsPostRead = (aValue[2] != 0); } + return Standard_True; } diff --git a/src/BinLDrivers/BinLDrivers_DocumentSection.hxx b/src/BinLDrivers/BinLDrivers_DocumentSection.hxx index c56f534a73..b2e2af837d 100644 --- a/src/BinLDrivers/BinLDrivers_DocumentSection.hxx +++ b/src/BinLDrivers/BinLDrivers_DocumentSection.hxx @@ -73,9 +73,10 @@ public: const TDocStd_FormatVersion theDocFormatVersion); //! Fill a DocumentSection instance from the data that are read - //! from TOC. - Standard_EXPORT static void ReadTOC (BinLDrivers_DocumentSection& theSection, Standard_IStream& theIS, - const TDocStd_FormatVersion theDocFormatVersion); + //! from TOC. Returns false in case of the stream reading problem. + Standard_EXPORT static Standard_Boolean ReadTOC (BinLDrivers_DocumentSection& theSection, + Standard_IStream& theIS, + const TDocStd_FormatVersion theDocFormatVersion); diff --git a/tests/bugs/caf/bug114 b/tests/bugs/caf/bug114 index d3e31a95a2..fafb52003c 100755 --- a/tests/bugs/caf/bug114 +++ b/tests/bugs/caf/bug114 @@ -20,5 +20,5 @@ for {set i 1} {${i} <= ${i_max}} {incr i} { # check memory usage (with tolerance equal to half page size) lappend listmem [meminfo h] - checktrend $listmem 0 1 "Memory leak detected" + checktrend $listmem 50 50 "Memory leak detected" } diff --git a/tests/bugs/caf/bug31546 b/tests/bugs/caf/bug31546 index ef81155c6b..bf12fa13eb 100644 --- a/tests/bugs/caf/bug31546 +++ b/tests/bugs/caf/bug31546 @@ -8,6 +8,11 @@ NewDocument D BinOcaf SaveAs D $docname Close D +# make the first open/close iteration before checking memory because some filled structures +# are cleared on start of the next open (like mySections in DocumentRetrievalDriver) +Open $docname D +Close D + puts "Executing Load / Close in cycle to see if allocated heap memory grows" set listmem {} for {set i 1} {$i < 10} {incr i} { From b1970c8a47e940aabc6edd1e611d30dff2dd9029 Mon Sep 17 00:00:00 2001 From: aml Date: Tue, 21 Jun 2022 17:03:20 +0300 Subject: [PATCH 311/639] 0033022: Coding - get rid of unused headers [ShapeBuild to STEPControl] --- src/Graphic3d/Graphic3d_PolygonOffset.hxx | 1 + .../STEPCAFControl_ActorWrite.cxx | 1 - .../STEPCAFControl_ActorWrite.hxx | 1 - .../STEPCAFControl_Controller.hxx | 1 - .../STEPCAFControl_DataMapOfLabelShape.hxx | 1 - .../STEPCAFControl_DataMapOfShapeSDR.hxx | 1 - .../STEPCAFControl_ExternFile.cxx | 2 - .../STEPCAFControl_ExternFile.hxx | 1 - .../STEPCAFControl_GDTProperty.cxx | 2 - .../STEPCAFControl_GDTProperty.hxx | 4 - src/STEPCAFControl/STEPCAFControl_Reader.cxx | 58 +--------- src/STEPCAFControl/STEPCAFControl_Reader.hxx | 1 - src/STEPCAFControl/STEPCAFControl_Writer.cxx | 31 ------ src/STEPCAFControl/STEPCAFControl_Writer.hxx | 2 - src/STEPConstruct/STEPConstruct.cxx | 3 - .../STEPConstruct_AP203Context.cxx | 2 - src/STEPConstruct/STEPConstruct_Assembly.cxx | 9 -- src/STEPConstruct/STEPConstruct_Assembly.hxx | 1 - .../STEPConstruct_ContextTool.cxx | 9 -- .../STEPConstruct_ContextTool.hxx | 1 - ...onstruct_DataMapOfAsciiStringTransient.hxx | 1 - .../STEPConstruct_ExternRefs.cxx | 10 -- .../STEPConstruct_ExternRefs.hxx | 2 - src/STEPConstruct/STEPConstruct_Part.cxx | 5 - src/STEPConstruct/STEPConstruct_Part.hxx | 1 - .../STEPConstruct_PointHasher.hxx | 2 - src/STEPConstruct/STEPConstruct_Styles.cxx | 12 -- src/STEPConstruct/STEPConstruct_Styles.hxx | 3 - src/STEPConstruct/STEPConstruct_Tool.cxx | 5 - .../STEPConstruct_UnitContext.cxx | 11 -- .../STEPConstruct_UnitContext.hxx | 2 - .../STEPConstruct_ValidationProps.cxx | 13 --- .../STEPConstruct_ValidationProps.hxx | 2 - src/STEPControl/STEPControl_ActorRead.hxx | 2 - src/STEPControl/STEPControl_ActorWrite.cxx | 14 --- src/STEPControl/STEPControl_ActorWrite.hxx | 2 - src/STEPControl/STEPControl_Controller.cxx | 5 - src/STEPControl/STEPControl_Controller.hxx | 1 - src/STEPControl/STEPControl_Reader.cxx | 8 -- src/STEPControl/STEPControl_Reader.hxx | 1 - src/STEPControl/STEPControl_Writer.cxx | 3 - src/STEPControl/STEPControl_Writer.hxx | 2 - src/ShapeBuild/ShapeBuild_Edge.cxx | 4 - src/ShapeBuild/ShapeBuild_Edge.hxx | 2 - src/ShapeBuild/ShapeBuild_ReShape.hxx | 1 - src/ShapeBuild/ShapeBuild_Vertex.cxx | 1 - src/ShapeBuild/ShapeBuild_Vertex.hxx | 2 - src/ShapeConstruct/ShapeConstruct.cxx | 3 - src/ShapeConstruct/ShapeConstruct.hxx | 2 - src/ShapeConstruct/ShapeConstruct_Curve.hxx | 2 - .../ShapeConstruct_MakeTriangulation.hxx | 4 - .../ShapeConstruct_ProjectCurveOnSurface.cxx | 5 - .../ShapeConstruct_ProjectCurveOnSurface.hxx | 2 - src/ShapeCustom/ShapeCustom.cxx | 1 - src/ShapeCustom/ShapeCustom.hxx | 1 - .../ShapeCustom_BSplineRestriction.cxx | 10 -- .../ShapeCustom_BSplineRestriction.hxx | 2 - .../ShapeCustom_ConvertToBSpline.cxx | 2 - .../ShapeCustom_ConvertToBSpline.hxx | 2 - .../ShapeCustom_ConvertToRevolution.cxx | 3 - .../ShapeCustom_ConvertToRevolution.hxx | 2 - src/ShapeCustom/ShapeCustom_Curve.hxx | 2 - src/ShapeCustom/ShapeCustom_Curve2d.hxx | 2 - .../ShapeCustom_DirectModification.cxx | 2 - .../ShapeCustom_DirectModification.hxx | 2 - src/ShapeCustom/ShapeCustom_Modification.cxx | 1 - .../ShapeCustom_RestrictionParameters.hxx | 1 - src/ShapeCustom/ShapeCustom_Surface.cxx | 2 - .../ShapeCustom_SweptToElementary.cxx | 6 - .../ShapeCustom_SweptToElementary.hxx | 2 - .../ShapeCustom_TrsfModification.cxx | 1 - .../ShapeCustom_TrsfModification.hxx | 2 - src/ShapeExtend/ShapeExtend.hxx | 1 - src/ShapeExtend/ShapeExtend_ComplexCurve.cxx | 2 - src/ShapeExtend/ShapeExtend_ComplexCurve.hxx | 2 - .../ShapeExtend_CompositeSurface.cxx | 1 - .../ShapeExtend_CompositeSurface.hxx | 2 - src/ShapeExtend/ShapeExtend_Explorer.cxx | 1 - src/ShapeExtend/ShapeExtend_Explorer.hxx | 1 - .../ShapeExtend_MsgRegistrator.cxx | 1 - src/ShapeExtend/ShapeExtend_WireData.hxx | 1 - src/ShapeFix/ShapeFix.cxx | 7 -- src/ShapeFix/ShapeFix.hxx | 1 - src/ShapeFix/ShapeFix_ComposeShell.cxx | 5 - src/ShapeFix/ShapeFix_ComposeShell.hxx | 2 - src/ShapeFix/ShapeFix_Edge.cxx | 5 - src/ShapeFix/ShapeFix_Edge.hxx | 2 - src/ShapeFix/ShapeFix_EdgeConnect.cxx | 2 - src/ShapeFix/ShapeFix_EdgeConnect.hxx | 1 - src/ShapeFix/ShapeFix_EdgeProjAux.cxx | 3 - src/ShapeFix/ShapeFix_EdgeProjAux.hxx | 2 - src/ShapeFix/ShapeFix_Face.cxx | 16 --- src/ShapeFix/ShapeFix_Face.hxx | 2 - src/ShapeFix/ShapeFix_FaceConnect.cxx | 2 - src/ShapeFix/ShapeFix_FaceConnect.hxx | 3 - src/ShapeFix/ShapeFix_FixSmallFace.cxx | 13 --- src/ShapeFix/ShapeFix_FixSmallFace.hxx | 2 - src/ShapeFix/ShapeFix_FixSmallSolid.cxx | 4 - src/ShapeFix/ShapeFix_FixSmallSolid.hxx | 2 - src/ShapeFix/ShapeFix_FreeBounds.hxx | 3 - src/ShapeFix/ShapeFix_IntersectionTool.cxx | 5 - src/ShapeFix/ShapeFix_IntersectionTool.hxx | 2 - src/ShapeFix/ShapeFix_Root.cxx | 1 - src/ShapeFix/ShapeFix_Root.hxx | 2 - src/ShapeFix/ShapeFix_Shape.cxx | 6 - src/ShapeFix/ShapeFix_Shape.hxx | 2 - src/ShapeFix/ShapeFix_ShapeTolerance.hxx | 3 - src/ShapeFix/ShapeFix_Shell.cxx | 8 -- src/ShapeFix/ShapeFix_Solid.cxx | 13 --- src/ShapeFix/ShapeFix_Solid.hxx | 2 - src/ShapeFix/ShapeFix_SplitTool.hxx | 2 - src/ShapeFix/ShapeFix_Wire.cxx | 10 -- src/ShapeFix/ShapeFix_Wire.hxx | 2 - src/ShapeFix/ShapeFix_WireSegment.cxx | 1 - src/ShapeFix/ShapeFix_WireSegment.hxx | 1 - src/ShapeFix/ShapeFix_WireVertex.cxx | 1 - src/ShapeFix/ShapeFix_WireVertex.hxx | 1 - src/ShapeFix/ShapeFix_Wire_1.cxx | 27 ----- src/ShapeFix/ShapeFix_Wireframe.cxx | 10 +- src/ShapeFix/ShapeFix_Wireframe.hxx | 2 - src/ShapePersistent/ShapePersistent.cxx | 10 -- src/ShapePersistent/ShapePersistent_BRep.cxx | 3 - src/ShapePersistent/ShapePersistent_BRep.hxx | 1 - src/ShapePersistent/ShapePersistent_Geom.cxx | 3 - src/ShapePersistent/ShapePersistent_Geom.hxx | 4 - .../ShapePersistent_Geom2d.cxx | 2 - .../ShapePersistent_Geom2d.hxx | 1 - .../ShapePersistent_Geom2d_Curve.hxx | 2 - .../ShapePersistent_Geom_Surface.hxx | 3 - .../ShapePersistent_HSequence.cxx | 1 - src/ShapePersistent/ShapePersistent_Poly.hxx | 3 - .../ShapePersistent_TopoDS.cxx | 1 - .../ShapePersistent_TopoDS.hxx | 1 - .../ShapePersistent_TriangleMode.hxx | 2 - src/ShapeProcess/ShapeProcess.hxx | 2 - src/ShapeProcess/ShapeProcess_Context.hxx | 3 - src/ShapeProcess/ShapeProcess_OperLibrary.cxx | 4 - src/ShapeProcess/ShapeProcess_Operator.hxx | 1 - .../ShapeProcess_ShapeContext.cxx | 4 - .../ShapeProcess_ShapeContext.hxx | 2 - src/ShapeProcess/ShapeProcess_UOperator.cxx | 1 - src/ShapeProcess/ShapeProcess_UOperator.hxx | 2 - .../ShapeProcessAPI_ApplySequence.cxx | 1 - .../ShapeProcessAPI_ApplySequence.hxx | 1 - .../ShapeUpgrade_ClosedEdgeDivide.hxx | 1 - .../ShapeUpgrade_ClosedFaceDivide.cxx | 1 - .../ShapeUpgrade_ClosedFaceDivide.hxx | 1 - .../ShapeUpgrade_ConvertCurve2dToBezier.cxx | 2 - .../ShapeUpgrade_ConvertCurve2dToBezier.hxx | 2 - .../ShapeUpgrade_ConvertCurve3dToBezier.cxx | 1 - .../ShapeUpgrade_ConvertCurve3dToBezier.hxx | 2 - ...apeUpgrade_ConvertSurfaceToBezierBasis.cxx | 2 - ...apeUpgrade_ConvertSurfaceToBezierBasis.hxx | 1 - src/ShapeUpgrade/ShapeUpgrade_EdgeDivide.hxx | 1 - src/ShapeUpgrade/ShapeUpgrade_FaceDivide.cxx | 3 - src/ShapeUpgrade/ShapeUpgrade_FaceDivide.hxx | 1 - .../ShapeUpgrade_FaceDivideArea.hxx | 2 - .../ShapeUpgrade_FixSmallBezierCurves.cxx | 2 - .../ShapeUpgrade_FixSmallBezierCurves.hxx | 2 - .../ShapeUpgrade_FixSmallCurves.cxx | 8 -- .../ShapeUpgrade_FixSmallCurves.hxx | 2 - .../ShapeUpgrade_RemoveInternalWires.cxx | 2 - .../ShapeUpgrade_RemoveInternalWires.hxx | 2 - .../ShapeUpgrade_RemoveLocations.cxx | 9 -- .../ShapeUpgrade_RemoveLocations.hxx | 1 - .../ShapeUpgrade_ShapeConvertToBezier.cxx | 1 - .../ShapeUpgrade_ShapeConvertToBezier.hxx | 1 - src/ShapeUpgrade/ShapeUpgrade_ShapeDivide.hxx | 2 - .../ShapeUpgrade_ShapeDivideAngle.hxx | 2 - .../ShapeUpgrade_ShapeDivideArea.hxx | 1 - .../ShapeUpgrade_ShapeDivideClosed.hxx | 1 - .../ShapeUpgrade_ShapeDivideClosedEdges.hxx | 1 - .../ShapeUpgrade_ShapeDivideContinuity.hxx | 1 - src/ShapeUpgrade/ShapeUpgrade_ShellSewing.cxx | 1 - src/ShapeUpgrade/ShapeUpgrade_ShellSewing.hxx | 1 - src/ShapeUpgrade/ShapeUpgrade_SplitCurve.cxx | 1 - src/ShapeUpgrade/ShapeUpgrade_SplitCurve.hxx | 2 - .../ShapeUpgrade_SplitCurve2d.cxx | 2 - .../ShapeUpgrade_SplitCurve2d.hxx | 2 - .../ShapeUpgrade_SplitCurve2dContinuity.cxx | 1 - .../ShapeUpgrade_SplitCurve2dContinuity.hxx | 1 - .../ShapeUpgrade_SplitCurve3d.cxx | 2 - .../ShapeUpgrade_SplitCurve3d.hxx | 2 - .../ShapeUpgrade_SplitCurve3dContinuity.cxx | 1 - .../ShapeUpgrade_SplitCurve3dContinuity.hxx | 1 - .../ShapeUpgrade_SplitSurface.cxx | 2 - .../ShapeUpgrade_SplitSurface.hxx | 2 - .../ShapeUpgrade_SplitSurfaceAngle.hxx | 2 - .../ShapeUpgrade_SplitSurfaceArea.hxx | 1 - .../ShapeUpgrade_SplitSurfaceContinuity.cxx | 5 - .../ShapeUpgrade_SplitSurfaceContinuity.hxx | 2 - src/ShapeUpgrade/ShapeUpgrade_Tool.hxx | 1 - .../ShapeUpgrade_UnifySameDomain.cxx | 14 +-- src/ShapeUpgrade/ShapeUpgrade_WireDivide.cxx | 3 - src/ShapeUpgrade/ShapeUpgrade_WireDivide.hxx | 1 - src/Standard/Standard_CString.cxx | 2 - src/Standard/Standard_Character.hxx | 1 - src/Standard/Standard_ExtCharacter.hxx | 2 - src/Standard/Standard_GUID.hxx | 5 - src/Standard/Standard_IStream.hxx | 1 - src/Standard/Standard_JmpBuf.hxx | 1 - src/Standard/Standard_MMgrRaw.cxx | 1 - src/Standard/Standard_MMgrRoot.cxx | 1 - src/Standard/Standard_Mutex.cxx | 2 - src/Standard/Standard_OStream.hxx | 1 - src/Standard/Standard_OutOfMemory.hxx | 2 - src/Standard/Standard_OutOfRange.hxx | 1 - src/Standard/Standard_RangeError.hxx | 1 - src/Standard/Standard_Real.cxx | 1 - src/Standard/Standard_SStream.hxx | 1 - src/Standard/Standard_ShortReal.cxx | 2 - src/Standard/Standard_TooManyUsers.hxx | 1 - src/Standard/Standard_Type.cxx | 1 - src/Standard/Standard_TypeMismatch.hxx | 1 - .../StdLDrivers_DocumentRetrievalDriver.cxx | 2 - src/StdLPersistent/StdLPersistent.cxx | 2 - src/StdLPersistent/StdLPersistent_Data.hxx | 1 - .../StdLPersistent_Dependency.hxx | 1 - src/StdLPersistent/StdLPersistent_HArray1.hxx | 2 - src/StdLPersistent/StdLPersistent_HArray2.cxx | 3 - src/StdLPersistent/StdLPersistent_HArray2.hxx | 2 - src/StdObject/StdObject_Shape.cxx | 1 - src/StdObject/StdObject_Shape.hxx | 2 - src/StdObject/StdObject_gp_Axes.hxx | 2 - src/StdObject/StdObject_gp_Curves.hxx | 1 - src/StdPersistent/StdPersistent.cxx | 1 - src/StdPersistent/StdPersistent_DataXtd.hxx | 1 - src/StdPersistent/StdPersistent_Naming.hxx | 1 - src/StdPrs/StdPrs_BRepFont.cxx | 5 - src/StdPrs/StdPrs_BRepFont.hxx | 4 - src/StdPrs/StdPrs_Curve.cxx | 2 - src/StdPrs/StdPrs_DeflectionCurve.cxx | 4 - src/StdPrs/StdPrs_HLRPolyShape.cxx | 5 - src/StdPrs/StdPrs_HLRShape.cxx | 1 - src/StdPrs/StdPrs_HLRToolShape.cxx | 2 - src/StdPrs/StdPrs_HLRToolShape.hxx | 2 - src/StdPrs/StdPrs_Isolines.cxx | 6 - src/StdPrs/StdPrs_Isolines.hxx | 6 - src/StdPrs/StdPrs_Plane.cxx | 4 - src/StdPrs/StdPrs_Point.hxx | 2 - src/StdPrs/StdPrs_ShadedShape.cxx | 7 -- src/StdPrs/StdPrs_ShadedShape.hxx | 1 - src/StdPrs/StdPrs_ShadedSurface.cxx | 2 - src/StdPrs/StdPrs_ShapeTool.cxx | 3 - src/StdPrs/StdPrs_ShapeTool.hxx | 3 - src/StdPrs/StdPrs_ToolRFace.cxx | 1 - src/StdPrs/StdPrs_ToolVertex.hxx | 1 - src/StdPrs/StdPrs_Vertex.hxx | 2 - .../StdPrs_WFDeflectionRestrictedFace.cxx | 8 -- src/StdPrs/StdPrs_WFDeflectionSurface.cxx | 4 - src/StdPrs/StdPrs_WFPoleSurface.cxx | 1 - src/StdPrs/StdPrs_WFRestrictedFace.cxx | 2 - src/StdPrs/StdPrs_WFRestrictedFace.hxx | 1 - src/StdPrs/StdPrs_WFShape.cxx | 4 - src/StdPrs/StdPrs_WFShape.hxx | 1 - src/StdPrs/StdPrs_WFSurface.cxx | 15 +-- src/StdSelect/StdSelect_BRepOwner.hxx | 3 - src/StdSelect/StdSelect_BRepSelectionTool.cxx | 6 - src/StdSelect/StdSelect_BRepSelectionTool.hxx | 1 - src/StdSelect/StdSelect_EdgeFilter.cxx | 2 - src/StdSelect/StdSelect_EdgeFilter.hxx | 1 - src/StdSelect/StdSelect_FaceFilter.cxx | 2 - src/StdSelect/StdSelect_FaceFilter.hxx | 1 - src/StdSelect/StdSelect_Shape.cxx | 1 - src/StdSelect/StdSelect_Shape.hxx | 1 - src/StdSelect/StdSelect_ShapeTypeFilter.cxx | 1 - src/StdStorage/StdStorage.cxx | 2 - .../StdStorage_HSequenceOfRoots.hxx | 1 - src/StdStorage/StdStorage_HeaderData.hxx | 2 - src/StdStorage/StdStorage_MapOfRoots.hxx | 2 - src/StdStorage/StdStorage_MapOfTypes.hxx | 1 - src/StdStorage/StdStorage_RootData.cxx | 2 - src/StdStorage/StdStorage_RootData.hxx | 1 - src/StdStorage/StdStorage_TypeData.cxx | 1 - src/StdStorage/StdStorage_TypeData.hxx | 1 - src/StepAP203/StepAP203_CcDesignApproval.cxx | 1 - src/StepAP203/StepAP203_CcDesignApproval.hxx | 1 - .../StepAP203_CcDesignCertification.cxx | 1 - .../StepAP203_CcDesignCertification.hxx | 1 - src/StepAP203/StepAP203_CcDesignContract.cxx | 1 - src/StepAP203/StepAP203_CcDesignContract.hxx | 1 - ...tepAP203_CcDesignDateAndTimeAssignment.cxx | 1 - ...tepAP203_CcDesignDateAndTimeAssignment.hxx | 1 - ...cDesignPersonAndOrganizationAssignment.cxx | 1 - ...cDesignPersonAndOrganizationAssignment.hxx | 1 - ...epAP203_CcDesignSecurityClassification.cxx | 1 - ...epAP203_CcDesignSecurityClassification.hxx | 1 - ...epAP203_CcDesignSpecificationReference.cxx | 1 - ...epAP203_CcDesignSpecificationReference.hxx | 1 - src/StepAP203/StepAP203_Change.cxx | 1 - src/StepAP203/StepAP203_Change.hxx | 1 - src/StepAP203/StepAP203_ChangeRequest.cxx | 1 - src/StepAP203/StepAP203_ChangeRequest.hxx | 1 - .../StepAP203_HArray1OfApprovedItem.hxx | 1 - .../StepAP203_HArray1OfCertifiedItem.hxx | 1 - .../StepAP203_HArray1OfChangeRequestItem.hxx | 1 - .../StepAP203_HArray1OfClassifiedItem.hxx | 1 - .../StepAP203_HArray1OfContractedItem.hxx | 1 - .../StepAP203_HArray1OfDateTimeItem.hxx | 1 - ...pAP203_HArray1OfPersonOrganizationItem.hxx | 1 - .../StepAP203_HArray1OfSpecifiedItem.hxx | 1 - .../StepAP203_HArray1OfStartRequestItem.hxx | 1 - src/StepAP203/StepAP203_HArray1OfWorkItem.hxx | 1 - src/StepAP203/StepAP203_StartRequest.cxx | 1 - src/StepAP203/StepAP203_StartRequest.hxx | 1 - src/StepAP203/StepAP203_StartWork.cxx | 1 - src/StepAP203/StepAP203_StartWork.hxx | 1 - src/StepAP209/StepAP209_Construct.cxx | 9 -- src/StepAP209/StepAP209_Construct.hxx | 1 - .../StepAP214_AppliedApprovalAssignment.cxx | 1 - .../StepAP214_AppliedApprovalAssignment.hxx | 1 - ...StepAP214_AppliedDateAndTimeAssignment.cxx | 1 - ...StepAP214_AppliedDateAndTimeAssignment.hxx | 1 - .../StepAP214_AppliedDateAssignment.cxx | 1 - .../StepAP214_AppliedDateAssignment.hxx | 1 - .../StepAP214_AppliedDocumentReference.cxx | 1 - .../StepAP214_AppliedDocumentReference.hxx | 1 - ...ppliedExternalIdentificationAssignment.cxx | 1 - ...ppliedExternalIdentificationAssignment.hxx | 1 - .../StepAP214_AppliedGroupAssignment.cxx | 1 - .../StepAP214_AppliedGroupAssignment.hxx | 1 - ...tepAP214_AppliedOrganizationAssignment.cxx | 1 - ...tepAP214_AppliedOrganizationAssignment.hxx | 1 - ...AppliedPersonAndOrganizationAssignment.cxx | 1 - ...AppliedPersonAndOrganizationAssignment.hxx | 1 - .../StepAP214_AppliedPresentedItem.cxx | 1 - .../StepAP214_AppliedPresentedItem.hxx | 1 - ...ppliedSecurityClassificationAssignment.cxx | 1 - ...ppliedSecurityClassificationAssignment.hxx | 1 - src/StepAP214/StepAP214_ApprovalItem.cxx | 2 - ..._AutoDesignActualDateAndTimeAssignment.cxx | 1 - ..._AutoDesignActualDateAndTimeAssignment.hxx | 1 - ...epAP214_AutoDesignActualDateAssignment.cxx | 1 - ...epAP214_AutoDesignActualDateAssignment.hxx | 1 - ...StepAP214_AutoDesignApprovalAssignment.cxx | 1 - ...StepAP214_AutoDesignApprovalAssignment.hxx | 1 - ...P214_AutoDesignDateAndPersonAssignment.cxx | 1 - ...P214_AutoDesignDateAndPersonAssignment.hxx | 1 - .../StepAP214_AutoDesignDateAndPersonItem.cxx | 1 - .../StepAP214_AutoDesignDocumentReference.cxx | 1 - .../StepAP214_AutoDesignDocumentReference.hxx | 1 - .../StepAP214_AutoDesignGeneralOrgItem.cxx | 1 - .../StepAP214_AutoDesignGroupAssignment.cxx | 1 - .../StepAP214_AutoDesignGroupAssignment.hxx | 1 - .../StepAP214_AutoDesignGroupedItem.cxx | 1 - ...AutoDesignNominalDateAndTimeAssignment.cxx | 2 - ...AutoDesignNominalDateAndTimeAssignment.hxx | 1 - ...pAP214_AutoDesignNominalDateAssignment.cxx | 2 - ...pAP214_AutoDesignNominalDateAssignment.hxx | 1 - ...AP214_AutoDesignOrganizationAssignment.cxx | 2 - ...AP214_AutoDesignOrganizationAssignment.hxx | 1 - ...oDesignPersonAndOrganizationAssignment.cxx | 2 - ...oDesignPersonAndOrganizationAssignment.hxx | 1 - .../StepAP214_AutoDesignPresentedItem.cxx | 1 - .../StepAP214_AutoDesignPresentedItem.hxx | 1 - .../StepAP214_DocumentReferenceItem.cxx | 1 - .../StepAP214_ExternallyDefinedClass.cxx | 1 - ...AP214_ExternallyDefinedGeneralProperty.cxx | 1 - .../StepAP214_HArray1OfApprovalItem.hxx | 1 - ...4_HArray1OfAutoDesignDateAndPersonItem.hxx | 1 - ...214_HArray1OfAutoDesignDateAndTimeItem.hxx | 1 - ...StepAP214_HArray1OfAutoDesignDatedItem.hxx | 1 - ...P214_HArray1OfAutoDesignGeneralOrgItem.hxx | 1 - ...epAP214_HArray1OfAutoDesignGroupedItem.hxx | 1 - ...HArray1OfAutoDesignPresentedItemSelect.hxx | 1 - ...214_HArray1OfAutoDesignReferencingItem.hxx | 1 - .../StepAP214_HArray1OfDateAndTimeItem.hxx | 1 - src/StepAP214/StepAP214_HArray1OfDateItem.hxx | 1 - ...epAP214_HArray1OfDocumentReferenceItem.hxx | 1 - ...14_HArray1OfExternalIdentificationItem.hxx | 1 - .../StepAP214_HArray1OfGroupItem.hxx | 1 - .../StepAP214_HArray1OfOrganizationItem.hxx | 1 - ...214_HArray1OfPersonAndOrganizationItem.hxx | 1 - ...StepAP214_HArray1OfPresentedItemSelect.hxx | 1 - ...14_HArray1OfSecurityClassificationItem.hxx | 1 - src/StepAP214/StepAP214_Protocol.cxx | 103 ------------------ src/StepAP214/StepAP214_Protocol.hxx | 1 - src/StepAP214/StepAP214_RepItemGroup.cxx | 1 - .../StepAP214_SecurityClassificationItem.cxx | 2 - ...epAP242_DraughtingModelItemAssociation.hxx | 1 - .../StepAP242_GeometricItemSpecificUsage.hxx | 1 - src/StepAP242/StepAP242_IdAttribute.hxx | 1 - ...P242_ItemIdentifiedRepresentationUsage.hxx | 1 - src/StepBasic/StepBasic_Action.cxx | 1 - src/StepBasic/StepBasic_ActionMethod.cxx | 1 - src/StepBasic/StepBasic_Address.cxx | 1 - .../StepBasic_ApplicationContext.cxx | 1 - .../StepBasic_ApplicationContextElement.cxx | 1 - ...tepBasic_ApplicationProtocolDefinition.cxx | 1 - src/StepBasic/StepBasic_Approval.cxx | 1 - src/StepBasic/StepBasic_ApprovalDateTime.cxx | 1 - .../StepBasic_ApprovalPersonOrganization.cxx | 1 - .../StepBasic_ApprovalRelationship.cxx | 1 - src/StepBasic/StepBasic_ApprovalRole.cxx | 1 - src/StepBasic/StepBasic_ApprovalStatus.cxx | 1 - src/StepBasic/StepBasic_Certification.cxx | 1 - src/StepBasic/StepBasic_CertificationType.cxx | 1 - .../StepBasic_CharacterizedObject.cxx | 1 - src/StepBasic/StepBasic_Contract.cxx | 1 - src/StepBasic/StepBasic_ContractType.cxx | 1 - .../StepBasic_ConversionBasedUnit.cxx | 1 - ...Basic_ConversionBasedUnitAndLengthUnit.cxx | 1 - ...epBasic_ConversionBasedUnitAndMassUnit.cxx | 1 - ...c_ConversionBasedUnitAndPlaneAngleUnit.cxx | 1 - ...pBasic_ConversionBasedUnitAndRatioUnit.cxx | 1 - ...c_ConversionBasedUnitAndSolidAngleUnit.cxx | 1 - ...epBasic_ConversionBasedUnitAndTimeUnit.cxx | 1 - ...epBasic_CoordinatedUniversalTimeOffset.hxx | 1 - src/StepBasic/StepBasic_DateRole.cxx | 1 - src/StepBasic/StepBasic_DateTimeRole.cxx | 1 - .../StepBasic_DerivedUnitElement.hxx | 1 - .../StepBasic_DimensionalExponents.hxx | 1 - src/StepBasic/StepBasic_Document.cxx | 1 - src/StepBasic/StepBasic_DocumentFile.hxx | 1 - .../StepBasic_DocumentProductAssociation.cxx | 1 - .../StepBasic_DocumentProductAssociation.hxx | 1 - .../StepBasic_DocumentProductEquivalence.cxx | 1 - .../StepBasic_DocumentProductEquivalence.hxx | 1 - src/StepBasic/StepBasic_DocumentReference.cxx | 1 - .../StepBasic_DocumentRelationship.cxx | 1 - .../StepBasic_DocumentRepresentationType.cxx | 1 - src/StepBasic/StepBasic_DocumentType.cxx | 1 - .../StepBasic_DocumentUsageConstraint.cxx | 1 - src/StepBasic/StepBasic_Effectivity.cxx | 1 - ...Basic_ExternalIdentificationAssignment.cxx | 1 - src/StepBasic/StepBasic_ExternalSource.cxx | 1 - src/StepBasic/StepBasic_ExternalSource.hxx | 1 - .../StepBasic_ExternallyDefinedItem.cxx | 1 - .../StepBasic_ExternallyDefinedItem.hxx | 1 - src/StepBasic/StepBasic_GeneralProperty.cxx | 1 - src/StepBasic/StepBasic_Group.cxx | 1 - src/StepBasic/StepBasic_GroupRelationship.cxx | 1 - src/StepBasic/StepBasic_GroupRelationship.hxx | 1 - src/StepBasic/StepBasic_HArray1OfApproval.hxx | 1 - .../StepBasic_HArray1OfDerivedUnitElement.hxx | 1 - src/StepBasic/StepBasic_HArray1OfDocument.hxx | 1 - .../StepBasic_HArray1OfNamedUnit.hxx | 1 - .../StepBasic_HArray1OfOrganization.hxx | 1 - src/StepBasic/StepBasic_HArray1OfPerson.hxx | 1 - src/StepBasic/StepBasic_HArray1OfProduct.hxx | 1 - .../StepBasic_HArray1OfProductContext.hxx | 1 - ...ic_HArray1OfUncertaintyMeasureWithUnit.hxx | 1 - .../StepBasic_IdentificationAssignment.cxx | 1 - .../StepBasic_IdentificationRole.cxx | 1 - .../StepBasic_LengthMeasureWithUnit.cxx | 1 - .../StepBasic_LengthMeasureWithUnit.hxx | 1 - src/StepBasic/StepBasic_LocalTime.hxx | 2 - .../StepBasic_MassMeasureWithUnit.cxx | 1 - .../StepBasic_MassMeasureWithUnit.hxx | 1 - .../StepBasic_MeasureValueMember.hxx | 2 - src/StepBasic/StepBasic_MeasureWithUnit.hxx | 1 - src/StepBasic/StepBasic_NameAssignment.cxx | 1 - src/StepBasic/StepBasic_ObjectRole.cxx | 1 - src/StepBasic/StepBasic_Organization.cxx | 1 - src/StepBasic/StepBasic_OrganizationRole.cxx | 1 - .../StepBasic_OrganizationalAddress.cxx | 2 - src/StepBasic/StepBasic_Person.cxx | 1 - src/StepBasic/StepBasic_Person.hxx | 1 - .../StepBasic_PersonAndOrganization.cxx | 1 - .../StepBasic_PersonAndOrganizationRole.cxx | 1 - src/StepBasic/StepBasic_PersonalAddress.cxx | 2 - src/StepBasic/StepBasic_PersonalAddress.hxx | 1 - .../StepBasic_PlaneAngleMeasureWithUnit.cxx | 1 - .../StepBasic_PlaneAngleMeasureWithUnit.hxx | 1 - src/StepBasic/StepBasic_Product.cxx | 1 - src/StepBasic/StepBasic_ProductCategory.cxx | 1 - .../StepBasic_ProductCategoryRelationship.cxx | 1 - .../StepBasic_ProductCategoryRelationship.hxx | 1 - .../StepBasic_ProductConceptContext.cxx | 1 - src/StepBasic/StepBasic_ProductContext.cxx | 1 - src/StepBasic/StepBasic_ProductDefinition.cxx | 1 - .../StepBasic_ProductDefinitionContext.cxx | 1 - ...StepBasic_ProductDefinitionEffectivity.cxx | 1 - .../StepBasic_ProductDefinitionFormation.cxx | 1 - ...ProductDefinitionFormationRelationship.cxx | 1 - ...DefinitionFormationWithSpecifiedSource.cxx | 1 - ...StepBasic_ProductDefinitionOrReference.cxx | 1 - .../StepBasic_ProductDefinitionReference.cxx | 1 - .../StepBasic_ProductDefinitionReference.hxx | 1 - ...nitionReferenceWithLocalRepresentation.cxx | 1 - ...tepBasic_ProductDefinitionRelationship.cxx | 2 - ...tepBasic_ProductDefinitionRelationship.hxx | 1 - ...oductDefinitionWithAssociatedDocuments.cxx | 2 - ...tepBasic_ProductRelatedProductCategory.cxx | 2 - .../StepBasic_RatioMeasureWithUnit.cxx | 1 - .../StepBasic_RatioMeasureWithUnit.hxx | 1 - src/StepBasic/StepBasic_RoleAssociation.cxx | 1 - .../StepBasic_SecurityClassification.cxx | 1 - .../StepBasic_SecurityClassificationLevel.cxx | 1 - src/StepBasic/StepBasic_SiUnit.hxx | 1 - .../StepBasic_SiUnitAndLengthUnit.cxx | 1 - .../StepBasic_SiUnitAndLengthUnit.hxx | 1 - src/StepBasic/StepBasic_SiUnitAndMassUnit.cxx | 1 - src/StepBasic/StepBasic_SiUnitAndMassUnit.hxx | 1 - .../StepBasic_SiUnitAndPlaneAngleUnit.cxx | 1 - .../StepBasic_SiUnitAndPlaneAngleUnit.hxx | 1 - .../StepBasic_SiUnitAndRatioUnit.cxx | 1 - .../StepBasic_SiUnitAndRatioUnit.hxx | 1 - .../StepBasic_SiUnitAndSolidAngleUnit.cxx | 1 - .../StepBasic_SiUnitAndSolidAngleUnit.hxx | 1 - ..._SiUnitAndThermodynamicTemperatureUnit.cxx | 1 - ..._SiUnitAndThermodynamicTemperatureUnit.hxx | 1 - src/StepBasic/StepBasic_SiUnitAndTimeUnit.cxx | 1 - src/StepBasic/StepBasic_SiUnitAndTimeUnit.hxx | 1 - src/StepBasic/StepBasic_SizeMember.hxx | 2 - src/StepBasic/StepBasic_SizeSelect.cxx | 1 - src/StepBasic/StepBasic_SizeSelect.hxx | 1 - .../StepBasic_SolidAngleMeasureWithUnit.cxx | 1 - .../StepBasic_SolidAngleMeasureWithUnit.hxx | 1 - src/StepBasic/StepBasic_SourceItem.cxx | 1 - .../StepBasic_TimeMeasureWithUnit.cxx | 1 - .../StepBasic_TimeMeasureWithUnit.hxx | 1 - .../StepBasic_UncertaintyMeasureWithUnit.cxx | 1 - .../StepBasic_VersionedActionRequest.cxx | 1 - .../StepBasic_WeekOfYearAndDayDate.hxx | 1 - 515 files changed, 9 insertions(+), 1205 deletions(-) diff --git a/src/Graphic3d/Graphic3d_PolygonOffset.hxx b/src/Graphic3d/Graphic3d_PolygonOffset.hxx index 2b3c97b651..4e0f784844 100644 --- a/src/Graphic3d/Graphic3d_PolygonOffset.hxx +++ b/src/Graphic3d/Graphic3d_PolygonOffset.hxx @@ -16,6 +16,7 @@ #include #include +#include //! Polygon offset parameters. struct Graphic3d_PolygonOffset diff --git a/src/STEPCAFControl/STEPCAFControl_ActorWrite.cxx b/src/STEPCAFControl/STEPCAFControl_ActorWrite.cxx index 3cc5205d0a..080ffe77b5 100644 --- a/src/STEPCAFControl/STEPCAFControl_ActorWrite.cxx +++ b/src/STEPCAFControl/STEPCAFControl_ActorWrite.cxx @@ -14,7 +14,6 @@ // commercial license or contractual agreement. -#include #include #include diff --git a/src/STEPCAFControl/STEPCAFControl_ActorWrite.hxx b/src/STEPCAFControl/STEPCAFControl_ActorWrite.hxx index c86837eb79..2d0946ca45 100644 --- a/src/STEPCAFControl/STEPCAFControl_ActorWrite.hxx +++ b/src/STEPCAFControl/STEPCAFControl_ActorWrite.hxx @@ -17,7 +17,6 @@ #define _STEPCAFControl_ActorWrite_HeaderFile #include -#include #include #include diff --git a/src/STEPCAFControl/STEPCAFControl_Controller.hxx b/src/STEPCAFControl/STEPCAFControl_Controller.hxx index bf5e782e6a..24cada7f3e 100644 --- a/src/STEPCAFControl/STEPCAFControl_Controller.hxx +++ b/src/STEPCAFControl/STEPCAFControl_Controller.hxx @@ -20,7 +20,6 @@ #include #include -#include class STEPCAFControl_Controller; diff --git a/src/STEPCAFControl/STEPCAFControl_DataMapOfLabelShape.hxx b/src/STEPCAFControl/STEPCAFControl_DataMapOfLabelShape.hxx index 54496ce928..22e1b2a81e 100644 --- a/src/STEPCAFControl/STEPCAFControl_DataMapOfLabelShape.hxx +++ b/src/STEPCAFControl/STEPCAFControl_DataMapOfLabelShape.hxx @@ -16,7 +16,6 @@ #ifndef STEPCAFControl_DataMapOfLabelShape_HeaderFile #define STEPCAFControl_DataMapOfLabelShape_HeaderFile -#include #include #include #include diff --git a/src/STEPCAFControl/STEPCAFControl_DataMapOfShapeSDR.hxx b/src/STEPCAFControl/STEPCAFControl_DataMapOfShapeSDR.hxx index bf9c142eba..688d2db4cd 100644 --- a/src/STEPCAFControl/STEPCAFControl_DataMapOfShapeSDR.hxx +++ b/src/STEPCAFControl/STEPCAFControl_DataMapOfShapeSDR.hxx @@ -16,7 +16,6 @@ #ifndef STEPCAFControl_DataMapOfShapeSDR_HeaderFile #define STEPCAFControl_DataMapOfShapeSDR_HeaderFile -#include #include #include #include diff --git a/src/STEPCAFControl/STEPCAFControl_ExternFile.cxx b/src/STEPCAFControl/STEPCAFControl_ExternFile.cxx index 3c3c827648..77fd51ded2 100644 --- a/src/STEPCAFControl/STEPCAFControl_ExternFile.cxx +++ b/src/STEPCAFControl/STEPCAFControl_ExternFile.cxx @@ -14,9 +14,7 @@ // commercial license or contractual agreement. -#include #include -#include #include #include diff --git a/src/STEPCAFControl/STEPCAFControl_ExternFile.hxx b/src/STEPCAFControl/STEPCAFControl_ExternFile.hxx index 33c89d8e79..8533bccb00 100644 --- a/src/STEPCAFControl/STEPCAFControl_ExternFile.hxx +++ b/src/STEPCAFControl/STEPCAFControl_ExternFile.hxx @@ -17,7 +17,6 @@ #define _STEPCAFControl_ExternFile_HeaderFile #include -#include #include #include diff --git a/src/STEPCAFControl/STEPCAFControl_GDTProperty.cxx b/src/STEPCAFControl/STEPCAFControl_GDTProperty.cxx index 2287cee59a..86da09c35a 100644 --- a/src/STEPCAFControl/STEPCAFControl_GDTProperty.cxx +++ b/src/STEPCAFControl/STEPCAFControl_GDTProperty.cxx @@ -21,7 +21,6 @@ #include #include #include -#include #include #include #include @@ -30,7 +29,6 @@ #include #include #include -#include #include #include #include diff --git a/src/STEPCAFControl/STEPCAFControl_GDTProperty.hxx b/src/STEPCAFControl/STEPCAFControl_GDTProperty.hxx index cb05d846fd..03631c61ca 100644 --- a/src/STEPCAFControl/STEPCAFControl_GDTProperty.hxx +++ b/src/STEPCAFControl/STEPCAFControl_GDTProperty.hxx @@ -20,16 +20,12 @@ #include #include -#include #include -#include #include -#include #include #include #include #include -#include #include #include #include diff --git a/src/STEPCAFControl/STEPCAFControl_Reader.cxx b/src/STEPCAFControl/STEPCAFControl_Reader.cxx index 753531b91a..300a0c1ce6 100644 --- a/src/STEPCAFControl/STEPCAFControl_Reader.cxx +++ b/src/STEPCAFControl/STEPCAFControl_Reader.cxx @@ -20,42 +20,32 @@ #include #include #include -#include #include #include #include #include #include #include -#include #include -#include #include #include #include #include #include +#include #include -#include #include #include #include #include -#include #include -#include #include -#include -#include #include #include -#include #include -#include #include #include #include -#include #include #include #include @@ -63,7 +53,6 @@ #include #include #include -#include #include #include #include @@ -75,13 +64,11 @@ #include #include #include -#include #include #include #include #include #include -#include #include #include #include @@ -100,35 +87,20 @@ #include #include #include -#include -#include #include #include #include -#include -#include -#include #include -#include #include -#include -#include -#include #include #include -#include #include #include #include #include #include -#include -#include #include -#include #include -#include -#include #include #include #include @@ -136,9 +108,7 @@ #include #include #include -#include #include -#include #include #include #include @@ -146,31 +116,23 @@ #include #include #include -#include #include #include #include #include -#include -#include #include #include #include #include -#include #include -#include #include #include #include #include -#include #include #include #include #include -#include -#include #include #include #include @@ -186,21 +148,16 @@ #include #include #include -#include -#include #include -#include #include #include #include -#include #include #include #include #include #include #include -#include #include #include #include @@ -212,32 +169,24 @@ #include #include #include -#include #include -#include -#include #include #include #include #include -#include #include #include #include -#include #include #include #include #include #include -#include -#include #include #include #include #include #include -#include #include #include #include @@ -255,8 +204,6 @@ #include #include #include -#include -#include #include #include #include @@ -270,8 +217,6 @@ #include #include #include -#include -#include #include #include #include @@ -279,7 +224,6 @@ #include #include -#include #include #include #include diff --git a/src/STEPCAFControl/STEPCAFControl_Reader.hxx b/src/STEPCAFControl/STEPCAFControl_Reader.hxx index 139df9cdab..35c7632c39 100644 --- a/src/STEPCAFControl/STEPCAFControl_Reader.hxx +++ b/src/STEPCAFControl/STEPCAFControl_Reader.hxx @@ -16,7 +16,6 @@ #ifndef _STEPCAFControl_Reader_HeaderFile #define _STEPCAFControl_Reader_HeaderFile -#include #include #include #include diff --git a/src/STEPCAFControl/STEPCAFControl_Writer.cxx b/src/STEPCAFControl/STEPCAFControl_Writer.cxx index cf5b51d149..b5a617282a 100644 --- a/src/STEPCAFControl/STEPCAFControl_Writer.cxx +++ b/src/STEPCAFControl/STEPCAFControl_Writer.cxx @@ -32,7 +32,6 @@ #include #include #include -#include #include #include #include @@ -41,12 +40,10 @@ #include #include #include -#include #include #include #include #include -#include #include #include #include @@ -54,8 +51,6 @@ #include #include #include -#include -#include #include #include #include @@ -67,15 +62,11 @@ #include #include #include -#include #include #include #include -#include #include #include -#include -#include #include #include #include @@ -89,17 +80,12 @@ #include #include #include -#include #include #include #include #include -#include -#include #include #include -#include -#include #include #include #include @@ -110,7 +96,6 @@ #include #include #include -#include #include #include #include @@ -123,7 +108,6 @@ #include #include #include -#include #include #include #include @@ -136,12 +120,10 @@ #include #include #include -#include #include #include #include #include -#include #include #include #include @@ -165,8 +147,6 @@ #include #include #include -#include -#include #include #include #include @@ -185,25 +165,19 @@ #include #include #include -#include -#include #include #include #include #include #include -#include #include #include #include -#include #include #include #include #include #include -#include -#include #include #include #include @@ -230,16 +204,11 @@ #include #include #include -#include #include #include #include -#include #include -#include -#include #include -#include #include #include #include diff --git a/src/STEPCAFControl/STEPCAFControl_Writer.hxx b/src/STEPCAFControl/STEPCAFControl_Writer.hxx index 30ebc1179a..df6a4545d6 100644 --- a/src/STEPCAFControl/STEPCAFControl_Writer.hxx +++ b/src/STEPCAFControl/STEPCAFControl_Writer.hxx @@ -16,14 +16,12 @@ #ifndef _STEPCAFControl_Writer_HeaderFile #define _STEPCAFControl_Writer_HeaderFile -#include #include #include #include #include #include #include -#include #include #include #include diff --git a/src/STEPConstruct/STEPConstruct.cxx b/src/STEPConstruct/STEPConstruct.cxx index da9eaaf169..91105053b4 100644 --- a/src/STEPConstruct/STEPConstruct.cxx +++ b/src/STEPConstruct/STEPConstruct.cxx @@ -22,9 +22,6 @@ #include #include #include -#include -#include -#include #include #include #include diff --git a/src/STEPConstruct/STEPConstruct_AP203Context.cxx b/src/STEPConstruct/STEPConstruct_AP203Context.cxx index bf25416ef9..47f470b90a 100644 --- a/src/STEPConstruct/STEPConstruct_AP203Context.cxx +++ b/src/STEPConstruct/STEPConstruct_AP203Context.cxx @@ -38,9 +38,7 @@ #include #include -#include #include -#include #include #include diff --git a/src/STEPConstruct/STEPConstruct_Assembly.cxx b/src/STEPConstruct/STEPConstruct_Assembly.cxx index 5bfbed9baa..b6e180155e 100644 --- a/src/STEPConstruct/STEPConstruct_Assembly.cxx +++ b/src/STEPConstruct/STEPConstruct_Assembly.cxx @@ -19,21 +19,12 @@ #include #include #include -#include -#include -#include -#include -#include #include -#include #include #include -#include -#include #include #include #include -#include #include #include #include diff --git a/src/STEPConstruct/STEPConstruct_Assembly.hxx b/src/STEPConstruct/STEPConstruct_Assembly.hxx index 30e35922f9..4049c5c986 100644 --- a/src/STEPConstruct/STEPConstruct_Assembly.hxx +++ b/src/STEPConstruct/STEPConstruct_Assembly.hxx @@ -21,7 +21,6 @@ #include #include -#include class StepShape_ShapeDefinitionRepresentation; class StepShape_ShapeRepresentation; class StepGeom_Axis2Placement3d; diff --git a/src/STEPConstruct/STEPConstruct_ContextTool.cxx b/src/STEPConstruct/STEPConstruct_ContextTool.cxx index 0b93e40b9e..873e91cf95 100644 --- a/src/STEPConstruct/STEPConstruct_ContextTool.cxx +++ b/src/STEPConstruct/STEPConstruct_ContextTool.cxx @@ -28,23 +28,14 @@ #include #include #include -#include -#include -#include #include -#include -#include -#include #include -#include -#include #include #include #include #include #include #include -#include #include #include diff --git a/src/STEPConstruct/STEPConstruct_ContextTool.hxx b/src/STEPConstruct/STEPConstruct_ContextTool.hxx index 3f5da89e97..732a88aa11 100644 --- a/src/STEPConstruct/STEPConstruct_ContextTool.hxx +++ b/src/STEPConstruct/STEPConstruct_ContextTool.hxx @@ -23,7 +23,6 @@ #include #include -#include #include #include class StepBasic_ApplicationProtocolDefinition; diff --git a/src/STEPConstruct/STEPConstruct_DataMapOfAsciiStringTransient.hxx b/src/STEPConstruct/STEPConstruct_DataMapOfAsciiStringTransient.hxx index 4578cb753c..d4b3fe232b 100644 --- a/src/STEPConstruct/STEPConstruct_DataMapOfAsciiStringTransient.hxx +++ b/src/STEPConstruct/STEPConstruct_DataMapOfAsciiStringTransient.hxx @@ -19,7 +19,6 @@ #include #include -#include #include typedef NCollection_DataMap STEPConstruct_DataMapOfAsciiStringTransient; diff --git a/src/STEPConstruct/STEPConstruct_ExternRefs.cxx b/src/STEPConstruct/STEPConstruct_ExternRefs.cxx index 78a469267b..c8624171d4 100644 --- a/src/STEPConstruct/STEPConstruct_ExternRefs.cxx +++ b/src/STEPConstruct/STEPConstruct_ExternRefs.cxx @@ -15,7 +15,6 @@ #include -#include #include #include #include @@ -31,20 +30,13 @@ #include #include #include -#include #include #include #include #include #include -#include -#include -#include #include #include -#include -#include -#include #include #include #include @@ -54,9 +46,7 @@ #include #include #include -#include #include -#include #include #include #include diff --git a/src/STEPConstruct/STEPConstruct_ExternRefs.hxx b/src/STEPConstruct/STEPConstruct_ExternRefs.hxx index 0d759c3718..3a9ba665bc 100644 --- a/src/STEPConstruct/STEPConstruct_ExternRefs.hxx +++ b/src/STEPConstruct/STEPConstruct_ExternRefs.hxx @@ -21,9 +21,7 @@ #include #include -#include #include -#include #include #include class StepBasic_ProductRelatedProductCategory; diff --git a/src/STEPConstruct/STEPConstruct_Part.cxx b/src/STEPConstruct/STEPConstruct_Part.cxx index 18b9ee1a42..73156f8057 100644 --- a/src/STEPConstruct/STEPConstruct_Part.cxx +++ b/src/STEPConstruct/STEPConstruct_Part.cxx @@ -19,16 +19,11 @@ #include #include #include -#include -#include #include -#include #include #include #include -#include #include -#include #include #include #include diff --git a/src/STEPConstruct/STEPConstruct_Part.hxx b/src/STEPConstruct/STEPConstruct_Part.hxx index bf2cee7afa..534a375942 100644 --- a/src/STEPConstruct/STEPConstruct_Part.hxx +++ b/src/STEPConstruct/STEPConstruct_Part.hxx @@ -21,7 +21,6 @@ #include #include -#include class StepShape_ShapeDefinitionRepresentation; class StepBasic_ProductRelatedProductCategory; class StepShape_ShapeRepresentation; diff --git a/src/STEPConstruct/STEPConstruct_PointHasher.hxx b/src/STEPConstruct/STEPConstruct_PointHasher.hxx index 9fa891b9fc..6713485624 100644 --- a/src/STEPConstruct/STEPConstruct_PointHasher.hxx +++ b/src/STEPConstruct/STEPConstruct_PointHasher.hxx @@ -18,10 +18,8 @@ #include #include -#include #include -#include class gp_Pnt; diff --git a/src/STEPConstruct/STEPConstruct_Styles.cxx b/src/STEPConstruct/STEPConstruct_Styles.cxx index b57aa6e87e..71caf4ca0c 100644 --- a/src/STEPConstruct/STEPConstruct_Styles.cxx +++ b/src/STEPConstruct/STEPConstruct_Styles.cxx @@ -16,10 +16,7 @@ #include -#include #include -#include -#include #include #include #include @@ -27,10 +24,8 @@ #include #include #include -#include #include #include -#include #include #include #include @@ -39,7 +34,6 @@ #include #include #include -#include #include #include #include @@ -49,9 +43,6 @@ #include #include #include -#include -#include -#include #include #include #include @@ -66,15 +57,12 @@ #include #include #include -#include #include #include #include #include #include #include -#include -#include #include #include #include diff --git a/src/STEPConstruct/STEPConstruct_Styles.hxx b/src/STEPConstruct/STEPConstruct_Styles.hxx index bb2ed58671..722561d51f 100644 --- a/src/STEPConstruct/STEPConstruct_Styles.hxx +++ b/src/STEPConstruct/STEPConstruct_Styles.hxx @@ -21,11 +21,8 @@ #include #include -#include -#include #include #include -#include #include #include #include diff --git a/src/STEPConstruct/STEPConstruct_Tool.cxx b/src/STEPConstruct/STEPConstruct_Tool.cxx index 06f9bfcefc..4085a2ba05 100644 --- a/src/STEPConstruct/STEPConstruct_Tool.cxx +++ b/src/STEPConstruct/STEPConstruct_Tool.cxx @@ -14,12 +14,7 @@ // commercial license or contractual agreement. -#include -#include -#include #include -#include -#include #include #include #include diff --git a/src/STEPConstruct/STEPConstruct_UnitContext.cxx b/src/STEPConstruct/STEPConstruct_UnitContext.cxx index cefb2f6f5b..665e80292a 100644 --- a/src/STEPConstruct/STEPConstruct_UnitContext.cxx +++ b/src/STEPConstruct/STEPConstruct_UnitContext.cxx @@ -18,32 +18,21 @@ //abv 30.02.00: ability to write file in units other than MM #include -#include #include #include #include #include #include #include -#include -#include #include -#include #include #include #include -#include -#include -#include -#include #include #include #include #include #include -#include -#include -#include #include #include #include diff --git a/src/STEPConstruct/STEPConstruct_UnitContext.hxx b/src/STEPConstruct/STEPConstruct_UnitContext.hxx index e1faad8f60..a656e27a2a 100644 --- a/src/STEPConstruct/STEPConstruct_UnitContext.hxx +++ b/src/STEPConstruct/STEPConstruct_UnitContext.hxx @@ -21,8 +21,6 @@ #include #include -#include -#include #include #include #include diff --git a/src/STEPConstruct/STEPConstruct_ValidationProps.cxx b/src/STEPConstruct/STEPConstruct_ValidationProps.cxx index 2676a871e5..4b100b3a2e 100644 --- a/src/STEPConstruct/STEPConstruct_ValidationProps.cxx +++ b/src/STEPConstruct/STEPConstruct_ValidationProps.cxx @@ -21,17 +21,12 @@ #include #include #include -#include #include #include #include #include -#include #include -#include #include -#include -#include #include #include #include @@ -39,26 +34,18 @@ #include #include #include -#include #include -#include #include #include #include #include -#include #include #include -#include #include #include -#include #include #include #include -#include -#include -#include #include #include #include diff --git a/src/STEPConstruct/STEPConstruct_ValidationProps.hxx b/src/STEPConstruct/STEPConstruct_ValidationProps.hxx index 691a9dbd1b..b25b35eb80 100644 --- a/src/STEPConstruct/STEPConstruct_ValidationProps.hxx +++ b/src/STEPConstruct/STEPConstruct_ValidationProps.hxx @@ -23,9 +23,7 @@ #include #include -#include #include -#include #include class StepBasic_ProductDefinition; class XSControl_WorkSession; diff --git a/src/STEPControl/STEPControl_ActorRead.hxx b/src/STEPControl/STEPControl_ActorRead.hxx index cebac50190..bdbf2d9433 100644 --- a/src/STEPControl/STEPControl_ActorRead.hxx +++ b/src/STEPControl/STEPControl_ActorRead.hxx @@ -21,9 +21,7 @@ #include #include -#include #include -#include #include #include #include diff --git a/src/STEPControl/STEPControl_ActorWrite.cxx b/src/STEPControl/STEPControl_ActorWrite.cxx index a643dc84a3..69dc9db8a3 100644 --- a/src/STEPControl/STEPControl_ActorWrite.cxx +++ b/src/STEPControl/STEPControl_ActorWrite.cxx @@ -26,22 +26,16 @@ #include #include #include -#include #include #include #include #include -#include -#include #include -#include #include #include #include #include -#include #include -#include #include #include #include @@ -51,9 +45,6 @@ #include #include #include -#include -#include -#include #include #include #include @@ -70,7 +61,6 @@ #include #include #include -#include #include #include #include @@ -84,7 +74,6 @@ #include #include #include -#include #include #include #include @@ -96,15 +85,12 @@ #include #include #include -#include #include -#include #include #include #include #include #include -#include #include #include #include diff --git a/src/STEPControl/STEPControl_ActorWrite.hxx b/src/STEPControl/STEPControl_ActorWrite.hxx index 513e2eab43..accdf962b8 100644 --- a/src/STEPControl/STEPControl_ActorWrite.hxx +++ b/src/STEPControl/STEPControl_ActorWrite.hxx @@ -21,10 +21,8 @@ #include #include -#include #include #include -#include #include #include class Transfer_Finder; diff --git a/src/STEPControl/STEPControl_Controller.cxx b/src/STEPControl/STEPControl_Controller.cxx index 23ed9294da..3e856b1666 100644 --- a/src/STEPControl/STEPControl_Controller.cxx +++ b/src/STEPControl/STEPControl_Controller.cxx @@ -16,13 +16,11 @@ #include #include -#include #include #include #include #include #include -#include #include #include #include @@ -37,7 +35,6 @@ #include #include #include -#include #include #include #include @@ -45,10 +42,8 @@ #include #include #include -#include #include #include -#include #include #include diff --git a/src/STEPControl/STEPControl_Controller.hxx b/src/STEPControl/STEPControl_Controller.hxx index 4a8e050fc2..83e897b31c 100644 --- a/src/STEPControl/STEPControl_Controller.hxx +++ b/src/STEPControl/STEPControl_Controller.hxx @@ -23,7 +23,6 @@ #include #include #include -#include class Interface_InterfaceModel; class XSControl_WorkSession; class TopoDS_Shape; diff --git a/src/STEPControl/STEPControl_Reader.cxx b/src/STEPControl/STEPControl_Reader.cxx index b7c003bc14..01d992421d 100644 --- a/src/STEPControl/STEPControl_Reader.cxx +++ b/src/STEPControl/STEPControl_Reader.cxx @@ -14,29 +14,22 @@ #include #include -#include #include #include #include #include -#include #include #include #include #include -#include #include #include -#include #include -#include -#include #include #include #include #include #include -#include #include #include #include @@ -64,7 +57,6 @@ #include #include #include -#include #include #include diff --git a/src/STEPControl/STEPControl_Reader.hxx b/src/STEPControl/STEPControl_Reader.hxx index 1619174474..5973caa517 100644 --- a/src/STEPControl/STEPControl_Reader.hxx +++ b/src/STEPControl/STEPControl_Reader.hxx @@ -22,7 +22,6 @@ #include #include -#include #include #include #include diff --git a/src/STEPControl/STEPControl_Writer.cxx b/src/STEPControl/STEPControl_Writer.cxx index 1d74eac7d0..5ab4d6bff1 100644 --- a/src/STEPControl/STEPControl_Writer.cxx +++ b/src/STEPControl/STEPControl_Writer.cxx @@ -18,12 +18,9 @@ #include #include #include -#include #include -#include #include #include -#include #include #include diff --git a/src/STEPControl/STEPControl_Writer.hxx b/src/STEPControl/STEPControl_Writer.hxx index ab1df694bc..247cd047e6 100644 --- a/src/STEPControl/STEPControl_Writer.hxx +++ b/src/STEPControl/STEPControl_Writer.hxx @@ -21,11 +21,9 @@ #include #include -#include #include #include #include -#include #include #include diff --git a/src/ShapeBuild/ShapeBuild_Edge.cxx b/src/ShapeBuild/ShapeBuild_Edge.cxx index feee4e8224..34b2d5ff52 100644 --- a/src/ShapeBuild/ShapeBuild_Edge.cxx +++ b/src/ShapeBuild/ShapeBuild_Edge.cxx @@ -19,14 +19,12 @@ #include #include #include -#include #include #include #include #include #include #include -#include #include #include #include @@ -38,10 +36,8 @@ #include #include #include -#include #include #include -#include #include #include #include diff --git a/src/ShapeBuild/ShapeBuild_Edge.hxx b/src/ShapeBuild/ShapeBuild_Edge.hxx index fa05914022..3725e969f1 100644 --- a/src/ShapeBuild/ShapeBuild_Edge.hxx +++ b/src/ShapeBuild/ShapeBuild_Edge.hxx @@ -21,8 +21,6 @@ #include #include -#include -#include class TopoDS_Edge; class TopoDS_Vertex; class TopoDS_Face; diff --git a/src/ShapeBuild/ShapeBuild_ReShape.hxx b/src/ShapeBuild/ShapeBuild_ReShape.hxx index 9c37ffbcb5..866c2d06a2 100644 --- a/src/ShapeBuild/ShapeBuild_ReShape.hxx +++ b/src/ShapeBuild/ShapeBuild_ReShape.hxx @@ -23,7 +23,6 @@ #include #include #include -#include #include class TopoDS_Shape; diff --git a/src/ShapeBuild/ShapeBuild_Vertex.cxx b/src/ShapeBuild/ShapeBuild_Vertex.cxx index f6107851ee..b053b17126 100644 --- a/src/ShapeBuild/ShapeBuild_Vertex.cxx +++ b/src/ShapeBuild/ShapeBuild_Vertex.cxx @@ -17,7 +17,6 @@ #include #include #include -#include #include #include diff --git a/src/ShapeBuild/ShapeBuild_Vertex.hxx b/src/ShapeBuild/ShapeBuild_Vertex.hxx index fd30723ea8..912fc5820b 100644 --- a/src/ShapeBuild/ShapeBuild_Vertex.hxx +++ b/src/ShapeBuild/ShapeBuild_Vertex.hxx @@ -19,9 +19,7 @@ #include #include -#include -#include class TopoDS_Vertex; class gp_Pnt; diff --git a/src/ShapeConstruct/ShapeConstruct.cxx b/src/ShapeConstruct/ShapeConstruct.cxx index 4d8e71d1a6..d2a9ae3a34 100644 --- a/src/ShapeConstruct/ShapeConstruct.cxx +++ b/src/ShapeConstruct/ShapeConstruct.cxx @@ -17,17 +17,14 @@ #include #include -#include #include #include #include #include #include -#include #include #include #include -#include #include #include #include diff --git a/src/ShapeConstruct/ShapeConstruct.hxx b/src/ShapeConstruct/ShapeConstruct.hxx index ed085b68ac..d3a51763d9 100644 --- a/src/ShapeConstruct/ShapeConstruct.hxx +++ b/src/ShapeConstruct/ShapeConstruct.hxx @@ -21,10 +21,8 @@ #include #include -#include #include #include -#include #include #include class Geom_BSplineCurve; diff --git a/src/ShapeConstruct/ShapeConstruct_Curve.hxx b/src/ShapeConstruct/ShapeConstruct_Curve.hxx index a47361bf16..6adffb743a 100644 --- a/src/ShapeConstruct/ShapeConstruct_Curve.hxx +++ b/src/ShapeConstruct/ShapeConstruct_Curve.hxx @@ -21,8 +21,6 @@ #include #include -#include -#include #include #include class Geom_Curve; diff --git a/src/ShapeConstruct/ShapeConstruct_MakeTriangulation.hxx b/src/ShapeConstruct/ShapeConstruct_MakeTriangulation.hxx index a8cbc5454e..6edad56283 100644 --- a/src/ShapeConstruct/ShapeConstruct_MakeTriangulation.hxx +++ b/src/ShapeConstruct/ShapeConstruct_MakeTriangulation.hxx @@ -19,14 +19,10 @@ #include #include -#include -#include #include #include #include -#include - class ShapeConstruct_MakeTriangulation : public BRepBuilderAPI_MakeShape diff --git a/src/ShapeConstruct/ShapeConstruct_ProjectCurveOnSurface.cxx b/src/ShapeConstruct/ShapeConstruct_ProjectCurveOnSurface.cxx index 17b6021c62..d37d601ac7 100644 --- a/src/ShapeConstruct/ShapeConstruct_ProjectCurveOnSurface.cxx +++ b/src/ShapeConstruct/ShapeConstruct_ProjectCurveOnSurface.cxx @@ -41,9 +41,6 @@ #include #include #include -#include -#include -#include #include #include #include @@ -61,8 +58,6 @@ #include #include #include -#include -#include #include #include #include diff --git a/src/ShapeConstruct/ShapeConstruct_ProjectCurveOnSurface.hxx b/src/ShapeConstruct/ShapeConstruct_ProjectCurveOnSurface.hxx index c4cf5ad752..dd8c679e7f 100644 --- a/src/ShapeConstruct/ShapeConstruct_ProjectCurveOnSurface.hxx +++ b/src/ShapeConstruct/ShapeConstruct_ProjectCurveOnSurface.hxx @@ -20,8 +20,6 @@ #include #include -#include -#include #include #include #include diff --git a/src/ShapeCustom/ShapeCustom.cxx b/src/ShapeCustom/ShapeCustom.cxx index 757784971b..5e4ab7f82e 100644 --- a/src/ShapeCustom/ShapeCustom.cxx +++ b/src/ShapeCustom/ShapeCustom.cxx @@ -28,7 +28,6 @@ #include #include #include -#include #include #include #include diff --git a/src/ShapeCustom/ShapeCustom.hxx b/src/ShapeCustom/ShapeCustom.hxx index 1fcfe0ce11..b4b9ac3584 100644 --- a/src/ShapeCustom/ShapeCustom.hxx +++ b/src/ShapeCustom/ShapeCustom.hxx @@ -25,7 +25,6 @@ #include #include #include -#include #include class TopoDS_Shape; diff --git a/src/ShapeCustom/ShapeCustom_BSplineRestriction.cxx b/src/ShapeCustom/ShapeCustom_BSplineRestriction.cxx index 0745e84b1e..ebab162cbe 100644 --- a/src/ShapeCustom/ShapeCustom_BSplineRestriction.cxx +++ b/src/ShapeCustom/ShapeCustom_BSplineRestriction.cxx @@ -17,13 +17,11 @@ #include #include -#include #include #include #include #include #include -#include #include #include #include @@ -33,13 +31,10 @@ #include #include #include -#include -#include #include #include #include #include -#include #include #include #include @@ -56,11 +51,9 @@ #include #include #include -#include #include #include #include -#include #include #include #include @@ -70,13 +63,10 @@ #include #include #include -#include -#include #include #include #include #include -#include #include #include #include diff --git a/src/ShapeCustom/ShapeCustom_BSplineRestriction.hxx b/src/ShapeCustom/ShapeCustom_BSplineRestriction.hxx index b4d3d1ecd1..09beeeeff0 100644 --- a/src/ShapeCustom/ShapeCustom_BSplineRestriction.hxx +++ b/src/ShapeCustom/ShapeCustom_BSplineRestriction.hxx @@ -22,8 +22,6 @@ #include #include -#include -#include #include class ShapeCustom_RestrictionParameters; class TopoDS_Face; diff --git a/src/ShapeCustom/ShapeCustom_ConvertToBSpline.cxx b/src/ShapeCustom/ShapeCustom_ConvertToBSpline.cxx index 16bd8e9fbe..ce500b8e32 100644 --- a/src/ShapeCustom/ShapeCustom_ConvertToBSpline.cxx +++ b/src/ShapeCustom/ShapeCustom_ConvertToBSpline.cxx @@ -16,12 +16,10 @@ #include -#include #include #include #include #include -#include #include #include #include diff --git a/src/ShapeCustom/ShapeCustom_ConvertToBSpline.hxx b/src/ShapeCustom/ShapeCustom_ConvertToBSpline.hxx index 918b1e1d3b..42dea3fb62 100644 --- a/src/ShapeCustom/ShapeCustom_ConvertToBSpline.hxx +++ b/src/ShapeCustom/ShapeCustom_ConvertToBSpline.hxx @@ -20,9 +20,7 @@ #include #include -#include #include -#include #include class TopoDS_Face; class Geom_Surface; diff --git a/src/ShapeCustom/ShapeCustom_ConvertToRevolution.cxx b/src/ShapeCustom/ShapeCustom_ConvertToRevolution.cxx index 3812257d55..be7eb83ede 100644 --- a/src/ShapeCustom/ShapeCustom_ConvertToRevolution.cxx +++ b/src/ShapeCustom/ShapeCustom_ConvertToRevolution.cxx @@ -14,7 +14,6 @@ #include #include -#include #include #include #include @@ -34,11 +33,9 @@ #include #include #include -#include #include #include #include -#include #include #include #include diff --git a/src/ShapeCustom/ShapeCustom_ConvertToRevolution.hxx b/src/ShapeCustom/ShapeCustom_ConvertToRevolution.hxx index 3035ccbad1..fb7686b0ca 100644 --- a/src/ShapeCustom/ShapeCustom_ConvertToRevolution.hxx +++ b/src/ShapeCustom/ShapeCustom_ConvertToRevolution.hxx @@ -21,8 +21,6 @@ #include #include -#include -#include #include class TopoDS_Face; class Geom_Surface; diff --git a/src/ShapeCustom/ShapeCustom_Curve.hxx b/src/ShapeCustom/ShapeCustom_Curve.hxx index 10f92b8e00..4df481391c 100644 --- a/src/ShapeCustom/ShapeCustom_Curve.hxx +++ b/src/ShapeCustom/ShapeCustom_Curve.hxx @@ -20,8 +20,6 @@ #include #include -#include -#include class Geom_Curve; diff --git a/src/ShapeCustom/ShapeCustom_Curve2d.hxx b/src/ShapeCustom/ShapeCustom_Curve2d.hxx index 90b8340a55..9e4be30964 100644 --- a/src/ShapeCustom/ShapeCustom_Curve2d.hxx +++ b/src/ShapeCustom/ShapeCustom_Curve2d.hxx @@ -20,9 +20,7 @@ #include #include -#include #include -#include class Geom2d_Line; class Geom2d_Curve; class Geom2d_BSplineCurve; diff --git a/src/ShapeCustom/ShapeCustom_DirectModification.cxx b/src/ShapeCustom/ShapeCustom_DirectModification.cxx index 93f569bba2..19ec660ce2 100644 --- a/src/ShapeCustom/ShapeCustom_DirectModification.cxx +++ b/src/ShapeCustom/ShapeCustom_DirectModification.cxx @@ -20,7 +20,6 @@ #include #include -#include #include #include #include @@ -33,7 +32,6 @@ #include #include #include -#include #include #include #include diff --git a/src/ShapeCustom/ShapeCustom_DirectModification.hxx b/src/ShapeCustom/ShapeCustom_DirectModification.hxx index 537127a2b7..44b9d5769e 100644 --- a/src/ShapeCustom/ShapeCustom_DirectModification.hxx +++ b/src/ShapeCustom/ShapeCustom_DirectModification.hxx @@ -21,8 +21,6 @@ #include #include -#include -#include #include class TopoDS_Face; class Geom_Surface; diff --git a/src/ShapeCustom/ShapeCustom_Modification.cxx b/src/ShapeCustom/ShapeCustom_Modification.cxx index 9f9fcb3cc8..a7dda61cd5 100644 --- a/src/ShapeCustom/ShapeCustom_Modification.cxx +++ b/src/ShapeCustom/ShapeCustom_Modification.cxx @@ -12,7 +12,6 @@ // commercial license or contractual agreement. -#include #include #include #include diff --git a/src/ShapeCustom/ShapeCustom_RestrictionParameters.hxx b/src/ShapeCustom/ShapeCustom_RestrictionParameters.hxx index f9784612e6..73563c6cc9 100644 --- a/src/ShapeCustom/ShapeCustom_RestrictionParameters.hxx +++ b/src/ShapeCustom/ShapeCustom_RestrictionParameters.hxx @@ -20,7 +20,6 @@ #include #include -#include #include diff --git a/src/ShapeCustom/ShapeCustom_Surface.cxx b/src/ShapeCustom/ShapeCustom_Surface.cxx index 4cee247e79..b2704aa783 100644 --- a/src/ShapeCustom/ShapeCustom_Surface.cxx +++ b/src/ShapeCustom/ShapeCustom_Surface.cxx @@ -26,8 +26,6 @@ #include #include #include -#include -#include #include #include #include diff --git a/src/ShapeCustom/ShapeCustom_SweptToElementary.cxx b/src/ShapeCustom/ShapeCustom_SweptToElementary.cxx index 15d5d0a393..6205e4bd9b 100644 --- a/src/ShapeCustom/ShapeCustom_SweptToElementary.cxx +++ b/src/ShapeCustom/ShapeCustom_SweptToElementary.cxx @@ -16,7 +16,6 @@ #include #include #include -#include #include #include #include @@ -25,7 +24,6 @@ #include #include #include -#include #include #include #include @@ -34,12 +32,8 @@ #include #include #include -#include -#include #include #include -#include -#include #include #include #include diff --git a/src/ShapeCustom/ShapeCustom_SweptToElementary.hxx b/src/ShapeCustom/ShapeCustom_SweptToElementary.hxx index a3d8c954ae..8c7a92cead 100644 --- a/src/ShapeCustom/ShapeCustom_SweptToElementary.hxx +++ b/src/ShapeCustom/ShapeCustom_SweptToElementary.hxx @@ -20,8 +20,6 @@ #include #include -#include -#include #include class TopoDS_Face; class Geom_Surface; diff --git a/src/ShapeCustom/ShapeCustom_TrsfModification.cxx b/src/ShapeCustom/ShapeCustom_TrsfModification.cxx index c7d064d35a..55c9c25e4e 100644 --- a/src/ShapeCustom/ShapeCustom_TrsfModification.cxx +++ b/src/ShapeCustom/ShapeCustom_TrsfModification.cxx @@ -19,7 +19,6 @@ #include #include #include -#include #include #include #include diff --git a/src/ShapeCustom/ShapeCustom_TrsfModification.hxx b/src/ShapeCustom/ShapeCustom_TrsfModification.hxx index 3f469028cc..9a587a1b96 100644 --- a/src/ShapeCustom/ShapeCustom_TrsfModification.hxx +++ b/src/ShapeCustom/ShapeCustom_TrsfModification.hxx @@ -21,8 +21,6 @@ #include #include -#include -#include class gp_Trsf; class TopoDS_Face; class Geom_Surface; diff --git a/src/ShapeExtend/ShapeExtend.hxx b/src/ShapeExtend/ShapeExtend.hxx index 7414f34331..ff4d7e8c70 100644 --- a/src/ShapeExtend/ShapeExtend.hxx +++ b/src/ShapeExtend/ShapeExtend.hxx @@ -21,7 +21,6 @@ #include #include -#include #include #include diff --git a/src/ShapeExtend/ShapeExtend_ComplexCurve.cxx b/src/ShapeExtend/ShapeExtend_ComplexCurve.cxx index 478cac47c0..883334815c 100644 --- a/src/ShapeExtend/ShapeExtend_ComplexCurve.cxx +++ b/src/ShapeExtend/ShapeExtend_ComplexCurve.cxx @@ -16,11 +16,9 @@ // pdn 13.07.99 Derivatives are scaled in accordance with local/global parameter transition -#include #include #include #include -#include #include #include diff --git a/src/ShapeExtend/ShapeExtend_ComplexCurve.hxx b/src/ShapeExtend/ShapeExtend_ComplexCurve.hxx index 7843c920ed..211078e2a8 100644 --- a/src/ShapeExtend/ShapeExtend_ComplexCurve.hxx +++ b/src/ShapeExtend/ShapeExtend_ComplexCurve.hxx @@ -20,10 +20,8 @@ #include #include -#include #include #include -#include #include class gp_Trsf; class gp_Pnt; diff --git a/src/ShapeExtend/ShapeExtend_CompositeSurface.cxx b/src/ShapeExtend/ShapeExtend_CompositeSurface.cxx index f71bc21a2a..b4994f3c0c 100644 --- a/src/ShapeExtend/ShapeExtend_CompositeSurface.cxx +++ b/src/ShapeExtend/ShapeExtend_CompositeSurface.cxx @@ -17,7 +17,6 @@ #include #include -#include #include #include #include diff --git a/src/ShapeExtend/ShapeExtend_CompositeSurface.hxx b/src/ShapeExtend/ShapeExtend_CompositeSurface.hxx index e3f36a385a..032ba50397 100644 --- a/src/ShapeExtend/ShapeExtend_CompositeSurface.hxx +++ b/src/ShapeExtend/ShapeExtend_CompositeSurface.hxx @@ -22,12 +22,10 @@ #include #include -#include #include #include #include #include -#include #include class gp_Pnt2d; class gp_Trsf2d; diff --git a/src/ShapeExtend/ShapeExtend_Explorer.cxx b/src/ShapeExtend/ShapeExtend_Explorer.cxx index cb4086abc2..97a99eed4b 100644 --- a/src/ShapeExtend/ShapeExtend_Explorer.cxx +++ b/src/ShapeExtend/ShapeExtend_Explorer.cxx @@ -15,7 +15,6 @@ #include #include -#include #include #include #include diff --git a/src/ShapeExtend/ShapeExtend_Explorer.hxx b/src/ShapeExtend/ShapeExtend_Explorer.hxx index b86ec48949..08b9f53e03 100644 --- a/src/ShapeExtend/ShapeExtend_Explorer.hxx +++ b/src/ShapeExtend/ShapeExtend_Explorer.hxx @@ -22,7 +22,6 @@ #include #include -#include #include #include class TopoDS_Shape; diff --git a/src/ShapeExtend/ShapeExtend_MsgRegistrator.cxx b/src/ShapeExtend/ShapeExtend_MsgRegistrator.cxx index 0e03962597..a88edd5832 100644 --- a/src/ShapeExtend/ShapeExtend_MsgRegistrator.cxx +++ b/src/ShapeExtend/ShapeExtend_MsgRegistrator.cxx @@ -14,7 +14,6 @@ // commercial license or contractual agreement. -#include #include #include #include diff --git a/src/ShapeExtend/ShapeExtend_WireData.hxx b/src/ShapeExtend/ShapeExtend_WireData.hxx index 68b9280cac..d4d747552f 100644 --- a/src/ShapeExtend/ShapeExtend_WireData.hxx +++ b/src/ShapeExtend/ShapeExtend_WireData.hxx @@ -23,7 +23,6 @@ #include #include #include -#include #include class TopoDS_Wire; class TopoDS_Edge; diff --git a/src/ShapeFix/ShapeFix.cxx b/src/ShapeFix/ShapeFix.cxx index 2edf3bee32..6f710fac39 100644 --- a/src/ShapeFix/ShapeFix.cxx +++ b/src/ShapeFix/ShapeFix.cxx @@ -29,19 +29,14 @@ #include -#include - #include #include -#include -#include #include #include //:i2 #include #include -#include #include #include #include @@ -56,13 +51,11 @@ #include #include -#include #include #include #include #include #include -#include #include #include #include diff --git a/src/ShapeFix/ShapeFix.hxx b/src/ShapeFix/ShapeFix.hxx index fb6a1f5ccf..e2d641d683 100644 --- a/src/ShapeFix/ShapeFix.hxx +++ b/src/ShapeFix/ShapeFix.hxx @@ -21,7 +21,6 @@ #include #include -#include #include #include diff --git a/src/ShapeFix/ShapeFix_ComposeShell.cxx b/src/ShapeFix/ShapeFix_ComposeShell.cxx index c518101b8d..af2f722c34 100644 --- a/src/ShapeFix/ShapeFix_ComposeShell.cxx +++ b/src/ShapeFix/ShapeFix_ComposeShell.cxx @@ -19,7 +19,6 @@ // svv 10.01.00 porting on DEC #include -#include #include #include #include @@ -31,7 +30,6 @@ #include #include #include -#include #include #include #include @@ -44,15 +42,12 @@ #include #include #include -#include #include #include #include #include #include -#include #include -#include #include #include #include diff --git a/src/ShapeFix/ShapeFix_ComposeShell.hxx b/src/ShapeFix/ShapeFix_ComposeShell.hxx index 83c927c876..a53d8da4c1 100644 --- a/src/ShapeFix/ShapeFix_ComposeShell.hxx +++ b/src/ShapeFix/ShapeFix_ComposeShell.hxx @@ -25,8 +25,6 @@ #include #include #include -#include -#include #include #include #include diff --git a/src/ShapeFix/ShapeFix_Edge.cxx b/src/ShapeFix/ShapeFix_Edge.cxx index c33d230813..cebe39c89f 100644 --- a/src/ShapeFix/ShapeFix_Edge.cxx +++ b/src/ShapeFix/ShapeFix_Edge.cxx @@ -24,13 +24,10 @@ #include #include -#include -#include #include #include #include #include -#include #include #include #include @@ -38,7 +35,6 @@ #include #include #include -#include #include #include #include @@ -53,7 +49,6 @@ #include #include #include -#include #include #include #include diff --git a/src/ShapeFix/ShapeFix_Edge.hxx b/src/ShapeFix/ShapeFix_Edge.hxx index 0edfc35675..538dd92127 100644 --- a/src/ShapeFix/ShapeFix_Edge.hxx +++ b/src/ShapeFix/ShapeFix_Edge.hxx @@ -22,8 +22,6 @@ #include #include -#include -#include #include class ShapeConstruct_ProjectCurveOnSurface; class TopoDS_Edge; diff --git a/src/ShapeFix/ShapeFix_EdgeConnect.cxx b/src/ShapeFix/ShapeFix_EdgeConnect.cxx index 3d12eac659..fbabd618b0 100644 --- a/src/ShapeFix/ShapeFix_EdgeConnect.cxx +++ b/src/ShapeFix/ShapeFix_EdgeConnect.cxx @@ -17,7 +17,6 @@ #include #include -#include #include #include #include @@ -33,7 +32,6 @@ #include #include #include -#include #include //#define POSITION_USES_MEAN_POINT diff --git a/src/ShapeFix/ShapeFix_EdgeConnect.hxx b/src/ShapeFix/ShapeFix_EdgeConnect.hxx index a8eefc8b42..48e1e36954 100644 --- a/src/ShapeFix/ShapeFix_EdgeConnect.hxx +++ b/src/ShapeFix/ShapeFix_EdgeConnect.hxx @@ -19,7 +19,6 @@ #include #include -#include #include #include diff --git a/src/ShapeFix/ShapeFix_EdgeProjAux.cxx b/src/ShapeFix/ShapeFix_EdgeProjAux.cxx index 2c3100198e..1afc7a1a69 100644 --- a/src/ShapeFix/ShapeFix_EdgeProjAux.cxx +++ b/src/ShapeFix/ShapeFix_EdgeProjAux.cxx @@ -20,15 +20,12 @@ #include #include #include -#include #include #include #include #include #include -#include #include -#include #include #include #include diff --git a/src/ShapeFix/ShapeFix_EdgeProjAux.hxx b/src/ShapeFix/ShapeFix_EdgeProjAux.hxx index 875be3e1cf..471f3c6495 100644 --- a/src/ShapeFix/ShapeFix_EdgeProjAux.hxx +++ b/src/ShapeFix/ShapeFix_EdgeProjAux.hxx @@ -18,12 +18,10 @@ #define _ShapeFix_EdgeProjAux_HeaderFile #include -#include #include #include #include -#include #include class Geom2d_Curve; diff --git a/src/ShapeFix/ShapeFix_Face.cxx b/src/ShapeFix/ShapeFix_Face.cxx index 71b46ebee3..23c3ff338f 100644 --- a/src/ShapeFix/ShapeFix_Face.cxx +++ b/src/ShapeFix/ShapeFix_Face.cxx @@ -29,14 +29,12 @@ // skl,pdn 14.05.2002 OCC55 (correction precision for small faces) #include -#include #include #include #include #include #include #include -#include #include #include #include @@ -51,35 +49,23 @@ #include #include #include -#include -#include #include -#include -#include -#include -#include #include #include #include #include #include #include -#include #include #include -#include #include -#include #include #include -#include #include #include #include #include #include -#include -#include #include #include #include @@ -91,14 +77,12 @@ #include #include #include -#include #include #include #include #include #include #include -#include #include #include diff --git a/src/ShapeFix/ShapeFix_Face.hxx b/src/ShapeFix/ShapeFix_Face.hxx index 405ed66b7f..2a3eb9cf08 100644 --- a/src/ShapeFix/ShapeFix_Face.hxx +++ b/src/ShapeFix/ShapeFix_Face.hxx @@ -22,10 +22,8 @@ #include #include -#include #include #include -#include #include #include #include diff --git a/src/ShapeFix/ShapeFix_FaceConnect.cxx b/src/ShapeFix/ShapeFix_FaceConnect.cxx index d679568faf..1d3593a4cd 100644 --- a/src/ShapeFix/ShapeFix_FaceConnect.cxx +++ b/src/ShapeFix/ShapeFix_FaceConnect.cxx @@ -38,9 +38,7 @@ #include #include #include -#include #include -#include #include #ifdef OCCT_DEBUG diff --git a/src/ShapeFix/ShapeFix_FaceConnect.hxx b/src/ShapeFix/ShapeFix_FaceConnect.hxx index 7250ad7fe4..90f0c6a85a 100644 --- a/src/ShapeFix/ShapeFix_FaceConnect.hxx +++ b/src/ShapeFix/ShapeFix_FaceConnect.hxx @@ -19,11 +19,8 @@ #include #include -#include #include -#include -#include class TopoDS_Face; class TopoDS_Shell; diff --git a/src/ShapeFix/ShapeFix_FixSmallFace.cxx b/src/ShapeFix/ShapeFix_FixSmallFace.cxx index 37e457704c..a3365808b1 100644 --- a/src/ShapeFix/ShapeFix_FixSmallFace.cxx +++ b/src/ShapeFix/ShapeFix_FixSmallFace.cxx @@ -15,35 +15,23 @@ #include #include #include -#include #include #include -#include -#include #include -#include #include -#include -#include #include -#include #include #include #include #include -#include #include #include -#include #include #include -#include #include #include #include #include -#include -#include #include #include #include @@ -57,7 +45,6 @@ #include #include #include -#include #include IMPLEMENT_STANDARD_RTTIEXT(ShapeFix_FixSmallFace,ShapeFix_Root) diff --git a/src/ShapeFix/ShapeFix_FixSmallFace.hxx b/src/ShapeFix/ShapeFix_FixSmallFace.hxx index b9d2ee466a..f5babf3c7c 100644 --- a/src/ShapeFix/ShapeFix_FixSmallFace.hxx +++ b/src/ShapeFix/ShapeFix_FixSmallFace.hxx @@ -24,8 +24,6 @@ #include #include #include -#include -#include class TopoDS_Face; class TopoDS_Edge; class TopoDS_Compound; diff --git a/src/ShapeFix/ShapeFix_FixSmallSolid.cxx b/src/ShapeFix/ShapeFix_FixSmallSolid.cxx index 89eef236f4..28ab57fb75 100644 --- a/src/ShapeFix/ShapeFix_FixSmallSolid.cxx +++ b/src/ShapeFix/ShapeFix_FixSmallSolid.cxx @@ -16,7 +16,6 @@ #include #include #include -#include #include #include #include @@ -25,13 +24,10 @@ #include #include #include -#include #include #include #include -#include #include -#include #include IMPLEMENT_STANDARD_RTTIEXT(ShapeFix_FixSmallSolid,ShapeFix_Root) diff --git a/src/ShapeFix/ShapeFix_FixSmallSolid.hxx b/src/ShapeFix/ShapeFix_FixSmallSolid.hxx index 4c718156e7..6374331807 100644 --- a/src/ShapeFix/ShapeFix_FixSmallSolid.hxx +++ b/src/ShapeFix/ShapeFix_FixSmallSolid.hxx @@ -20,9 +20,7 @@ #include #include -#include #include -#include class TopoDS_Shape; class ShapeBuild_ReShape; diff --git a/src/ShapeFix/ShapeFix_FreeBounds.hxx b/src/ShapeFix/ShapeFix_FreeBounds.hxx index aedf3c47d5..c6da8e3fd2 100644 --- a/src/ShapeFix/ShapeFix_FreeBounds.hxx +++ b/src/ShapeFix/ShapeFix_FreeBounds.hxx @@ -19,12 +19,9 @@ #include #include -#include #include #include -#include -#include //! This class is intended to output free bounds of the shape diff --git a/src/ShapeFix/ShapeFix_IntersectionTool.cxx b/src/ShapeFix/ShapeFix_IntersectionTool.cxx index e5f268724a..b98d4bb2c5 100644 --- a/src/ShapeFix/ShapeFix_IntersectionTool.cxx +++ b/src/ShapeFix/ShapeFix_IntersectionTool.cxx @@ -12,7 +12,6 @@ // commercial license or contractual agreement. -#include #include #include #include @@ -25,22 +24,18 @@ #include #include #include -#include -#include #include #include #include #include #include #include -#include #include #include #include #include #include #include -#include #include #include #include diff --git a/src/ShapeFix/ShapeFix_IntersectionTool.hxx b/src/ShapeFix/ShapeFix_IntersectionTool.hxx index 8ec6046884..7b9cdcbab6 100644 --- a/src/ShapeFix/ShapeFix_IntersectionTool.hxx +++ b/src/ShapeFix/ShapeFix_IntersectionTool.hxx @@ -20,8 +20,6 @@ #include #include -#include -#include #include #include class ShapeBuild_ReShape; diff --git a/src/ShapeFix/ShapeFix_Root.cxx b/src/ShapeFix/ShapeFix_Root.cxx index 97342512ec..5794c9b309 100644 --- a/src/ShapeFix/ShapeFix_Root.cxx +++ b/src/ShapeFix/ShapeFix_Root.cxx @@ -14,7 +14,6 @@ #include #include -#include #include #include #include diff --git a/src/ShapeFix/ShapeFix_Root.hxx b/src/ShapeFix/ShapeFix_Root.hxx index d0a584424e..ee3909a661 100644 --- a/src/ShapeFix/ShapeFix_Root.hxx +++ b/src/ShapeFix/ShapeFix_Root.hxx @@ -20,11 +20,9 @@ #include #include -#include #include #include #include -#include #include #include diff --git a/src/ShapeFix/ShapeFix_Shape.cxx b/src/ShapeFix/ShapeFix_Shape.cxx index 55df4bba7e..fc0c89de99 100644 --- a/src/ShapeFix/ShapeFix_Shape.cxx +++ b/src/ShapeFix/ShapeFix_Shape.cxx @@ -16,24 +16,18 @@ #include -#include #include -#include #include -#include #include #include -#include #include #include #include #include #include -#include #include #include #include -#include #include #include #include diff --git a/src/ShapeFix/ShapeFix_Shape.hxx b/src/ShapeFix/ShapeFix_Shape.hxx index c15adc4061..f48a2e3f27 100644 --- a/src/ShapeFix/ShapeFix_Shape.hxx +++ b/src/ShapeFix/ShapeFix_Shape.hxx @@ -24,9 +24,7 @@ #include #include #include -#include #include -#include #include class ShapeFix_Solid; diff --git a/src/ShapeFix/ShapeFix_ShapeTolerance.hxx b/src/ShapeFix/ShapeFix_ShapeTolerance.hxx index 00e8915d3a..061f43730a 100644 --- a/src/ShapeFix/ShapeFix_ShapeTolerance.hxx +++ b/src/ShapeFix/ShapeFix_ShapeTolerance.hxx @@ -19,10 +19,7 @@ #include #include -#include -#include -#include #include class TopoDS_Shape; diff --git a/src/ShapeFix/ShapeFix_Shell.cxx b/src/ShapeFix/ShapeFix_Shell.cxx index fb8cd9bc64..fe2ba6e754 100644 --- a/src/ShapeFix/ShapeFix_Shell.cxx +++ b/src/ShapeFix/ShapeFix_Shell.cxx @@ -23,18 +23,13 @@ #include #include #include -#include #include #include -#include -#include #include #include #include #include #include -#include -#include #include #include #include @@ -44,15 +39,12 @@ #include #include #include -#include #include #include #include #include #include -#include #include -#include #include #include diff --git a/src/ShapeFix/ShapeFix_Solid.cxx b/src/ShapeFix/ShapeFix_Solid.cxx index 631c4c936f..7a553995b5 100644 --- a/src/ShapeFix/ShapeFix_Solid.cxx +++ b/src/ShapeFix/ShapeFix_Solid.cxx @@ -16,46 +16,33 @@ #include #include #include -#include -#include #include #include #include #include -#include -#include -#include #include #include #include -#include #include #include #include #include #include #include -#include #include #include #include -#include #include #include #include #include #include -#include -#include -#include #include #include #include #include #include -#include #include -#include #include #include diff --git a/src/ShapeFix/ShapeFix_Solid.hxx b/src/ShapeFix/ShapeFix_Solid.hxx index 05afd5fb71..976c761ffc 100644 --- a/src/ShapeFix/ShapeFix_Solid.hxx +++ b/src/ShapeFix/ShapeFix_Solid.hxx @@ -22,10 +22,8 @@ #include #include -#include #include #include -#include class ShapeFix_Shell; class TopoDS_Solid; class TopoDS_Shell; diff --git a/src/ShapeFix/ShapeFix_SplitTool.hxx b/src/ShapeFix/ShapeFix_SplitTool.hxx index 9398e57b01..da210fa0fa 100644 --- a/src/ShapeFix/ShapeFix_SplitTool.hxx +++ b/src/ShapeFix/ShapeFix_SplitTool.hxx @@ -20,8 +20,6 @@ #include #include -#include -#include #include #include class TopoDS_Edge; diff --git a/src/ShapeFix/ShapeFix_Wire.cxx b/src/ShapeFix/ShapeFix_Wire.cxx index 24a8b07cac..f03fd76f01 100644 --- a/src/ShapeFix/ShapeFix_Wire.cxx +++ b/src/ShapeFix/ShapeFix_Wire.cxx @@ -45,19 +45,13 @@ #include -#include -#include -#include -#include #include #include -#include #include #include #include #include #include -#include #include #include #include @@ -72,11 +66,9 @@ #include #include #include -#include #include #include #include -#include #include #include #include @@ -85,7 +77,6 @@ #include #include #include -#include #include #include #include @@ -95,7 +86,6 @@ #include #include #include -#include #include #include #include diff --git a/src/ShapeFix/ShapeFix_Wire.hxx b/src/ShapeFix/ShapeFix_Wire.hxx index 4539b046b9..e90a0cf659 100644 --- a/src/ShapeFix/ShapeFix_Wire.hxx +++ b/src/ShapeFix/ShapeFix_Wire.hxx @@ -18,9 +18,7 @@ #define _ShapeFix_Wire_HeaderFile #include -#include -#include #include #include #include diff --git a/src/ShapeFix/ShapeFix_WireSegment.cxx b/src/ShapeFix/ShapeFix_WireSegment.cxx index f90b041c10..3dfef90508 100644 --- a/src/ShapeFix/ShapeFix_WireSegment.cxx +++ b/src/ShapeFix/ShapeFix_WireSegment.cxx @@ -20,7 +20,6 @@ #include #include #include -#include //======================================================================= //function : ShapeFix_WireSegment diff --git a/src/ShapeFix/ShapeFix_WireSegment.hxx b/src/ShapeFix/ShapeFix_WireSegment.hxx index 7664c650c2..1e01b01f67 100644 --- a/src/ShapeFix/ShapeFix_WireSegment.hxx +++ b/src/ShapeFix/ShapeFix_WireSegment.hxx @@ -24,7 +24,6 @@ #include #include #include -#include #include class ShapeExtend_WireData; class TopoDS_Wire; diff --git a/src/ShapeFix/ShapeFix_WireVertex.cxx b/src/ShapeFix/ShapeFix_WireVertex.cxx index 2bce4bf5be..80eca5c760 100644 --- a/src/ShapeFix/ShapeFix_WireVertex.cxx +++ b/src/ShapeFix/ShapeFix_WireVertex.cxx @@ -16,7 +16,6 @@ #include #include #include -#include #include #include #include diff --git a/src/ShapeFix/ShapeFix_WireVertex.hxx b/src/ShapeFix/ShapeFix_WireVertex.hxx index b7d05c2dc7..7b26394c84 100644 --- a/src/ShapeFix/ShapeFix_WireVertex.hxx +++ b/src/ShapeFix/ShapeFix_WireVertex.hxx @@ -22,7 +22,6 @@ #include #include -#include #include class TopoDS_Wire; class ShapeExtend_WireData; diff --git a/src/ShapeFix/ShapeFix_Wire_1.cxx b/src/ShapeFix/ShapeFix_Wire_1.cxx index c8fb6b3e8a..901cbad65d 100644 --- a/src/ShapeFix/ShapeFix_Wire_1.cxx +++ b/src/ShapeFix/ShapeFix_Wire_1.cxx @@ -13,57 +13,30 @@ // szv 19.08.99: new methods for fixing gaps between edges (3d curves and pcurves) #include -#include #include #include -#include -#include -#include #include -#include #include -#include #include -#include -#include -#include -#include #include #include #include -#include #include #include #include -#include -#include #include #include -#include -#include -#include -#include -#include -#include //S4135 -#include -#include #include -#include #include -#include -#include -#include -#include #include #include //szv -#include #include #include #include diff --git a/src/ShapeFix/ShapeFix_Wireframe.cxx b/src/ShapeFix/ShapeFix_Wireframe.cxx index 465c5f8941..092d54246b 100644 --- a/src/ShapeFix/ShapeFix_Wireframe.cxx +++ b/src/ShapeFix/ShapeFix_Wireframe.cxx @@ -21,17 +21,12 @@ #include #include #include -#include -#include -#include #include #include #include #include -#include #include #include -#include #include #include #include @@ -47,11 +42,9 @@ #include #include #include -#include #include #include #include -#include #include #include @@ -472,8 +465,7 @@ ShapeFix_Wireframe::ShapeFix_Wireframe(const TopoDS_Shape& shape) //purpose : //======================================================================= #include -#include -#include + Standard_Boolean ShapeFix_Wireframe::CheckSmallEdges(TopTools_MapOfShape& theSmallEdges, TopTools_DataMapOfShapeListOfShape& theEdgeToFaces, TopTools_DataMapOfShapeListOfShape& theFaceWithSmall, diff --git a/src/ShapeFix/ShapeFix_Wireframe.hxx b/src/ShapeFix/ShapeFix_Wireframe.hxx index 197e28a064..f5cbc076b7 100644 --- a/src/ShapeFix/ShapeFix_Wireframe.hxx +++ b/src/ShapeFix/ShapeFix_Wireframe.hxx @@ -21,8 +21,6 @@ #include #include -#include -#include #include #include #include diff --git a/src/ShapePersistent/ShapePersistent.cxx b/src/ShapePersistent/ShapePersistent.cxx index e1e2b4209e..76a6a082b3 100644 --- a/src/ShapePersistent/ShapePersistent.cxx +++ b/src/ShapePersistent/ShapePersistent.cxx @@ -12,23 +12,13 @@ // commercial license or contractual agreement. #include -#include -#include #include -#include -#include -#include -#include -#include -#include #include -#include #include #include #include #include -#include #include diff --git a/src/ShapePersistent/ShapePersistent_BRep.cxx b/src/ShapePersistent/ShapePersistent_BRep.cxx index d23c4ce76d..2470ecc0e3 100644 --- a/src/ShapePersistent/ShapePersistent_BRep.cxx +++ b/src/ShapePersistent/ShapePersistent_BRep.cxx @@ -19,12 +19,9 @@ #include #include #include -#include #include #include -#include #include -#include #include #include diff --git a/src/ShapePersistent/ShapePersistent_BRep.hxx b/src/ShapePersistent/ShapePersistent_BRep.hxx index dc2a1c613f..b2f0111a67 100644 --- a/src/ShapePersistent/ShapePersistent_BRep.hxx +++ b/src/ShapePersistent/ShapePersistent_BRep.hxx @@ -16,7 +16,6 @@ #define _ShapePersistent_BRep_HeaderFile #include -#include #include #include #include diff --git a/src/ShapePersistent/ShapePersistent_Geom.cxx b/src/ShapePersistent/ShapePersistent_Geom.cxx index ef8687e9b5..d20cf0e3bd 100644 --- a/src/ShapePersistent/ShapePersistent_Geom.cxx +++ b/src/ShapePersistent/ShapePersistent_Geom.cxx @@ -11,12 +11,9 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -#include - #include #include #include -#include #include diff --git a/src/ShapePersistent/ShapePersistent_Geom.hxx b/src/ShapePersistent/ShapePersistent_Geom.hxx index 415c49f56e..2c451fd8d3 100644 --- a/src/ShapePersistent/ShapePersistent_Geom.hxx +++ b/src/ShapePersistent/ShapePersistent_Geom.hxx @@ -18,12 +18,9 @@ #include #include -#include #include #include -#include -#include #include #include #include @@ -34,7 +31,6 @@ #include #include #include -#include #include class ShapePersistent_Geom : public StdObjMgt_SharedObject diff --git a/src/ShapePersistent/ShapePersistent_Geom2d.cxx b/src/ShapePersistent/ShapePersistent_Geom2d.cxx index d24a036a99..666f59c59b 100644 --- a/src/ShapePersistent/ShapePersistent_Geom2d.cxx +++ b/src/ShapePersistent/ShapePersistent_Geom2d.cxx @@ -11,8 +11,6 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -#include - #include #include diff --git a/src/ShapePersistent/ShapePersistent_Geom2d.hxx b/src/ShapePersistent/ShapePersistent_Geom2d.hxx index 78315edfd1..cbc8fe23ba 100644 --- a/src/ShapePersistent/ShapePersistent_Geom2d.hxx +++ b/src/ShapePersistent/ShapePersistent_Geom2d.hxx @@ -15,7 +15,6 @@ #ifndef _ShapePersistent_Geom2d_HeaderFile #define _ShapePersistent_Geom2d_HeaderFile -#include #include #include diff --git a/src/ShapePersistent/ShapePersistent_Geom2d_Curve.hxx b/src/ShapePersistent/ShapePersistent_Geom2d_Curve.hxx index 9f0cc8549b..02d8db52ca 100644 --- a/src/ShapePersistent/ShapePersistent_Geom2d_Curve.hxx +++ b/src/ShapePersistent/ShapePersistent_Geom2d_Curve.hxx @@ -15,8 +15,6 @@ #ifndef _ShapePersistent_Geom2d_Curve_HeaderFile #define _ShapePersistent_Geom2d_Curve_HeaderFile -#include - #include #include #include diff --git a/src/ShapePersistent/ShapePersistent_Geom_Surface.hxx b/src/ShapePersistent/ShapePersistent_Geom_Surface.hxx index 42dda13db2..5efc457f5f 100644 --- a/src/ShapePersistent/ShapePersistent_Geom_Surface.hxx +++ b/src/ShapePersistent/ShapePersistent_Geom_Surface.hxx @@ -15,8 +15,6 @@ #ifndef _ShapePersistent_Geom_Surface_HeaderFile #define _ShapePersistent_Geom_Surface_HeaderFile -#include - #include #include #include @@ -30,7 +28,6 @@ #include #include #include -#include #include #include diff --git a/src/ShapePersistent/ShapePersistent_HSequence.cxx b/src/ShapePersistent/ShapePersistent_HSequence.cxx index c6e5556b5a..25a67dabfe 100644 --- a/src/ShapePersistent/ShapePersistent_HSequence.cxx +++ b/src/ShapePersistent/ShapePersistent_HSequence.cxx @@ -12,7 +12,6 @@ // commercial license or contractual agreement. #include -#include #include diff --git a/src/ShapePersistent/ShapePersistent_Poly.hxx b/src/ShapePersistent/ShapePersistent_Poly.hxx index 7076d57b4b..bedf4b0aee 100644 --- a/src/ShapePersistent/ShapePersistent_Poly.hxx +++ b/src/ShapePersistent/ShapePersistent_Poly.hxx @@ -17,9 +17,6 @@ #include #include -#include -#include -#include #include class Poly_Polygon2D; diff --git a/src/ShapePersistent/ShapePersistent_TopoDS.cxx b/src/ShapePersistent/ShapePersistent_TopoDS.cxx index 43e37e4aeb..05335da2de 100644 --- a/src/ShapePersistent/ShapePersistent_TopoDS.cxx +++ b/src/ShapePersistent/ShapePersistent_TopoDS.cxx @@ -18,7 +18,6 @@ #include #include -#include #include diff --git a/src/ShapePersistent/ShapePersistent_TopoDS.hxx b/src/ShapePersistent/ShapePersistent_TopoDS.hxx index f265519c2e..82150a4ac3 100644 --- a/src/ShapePersistent/ShapePersistent_TopoDS.hxx +++ b/src/ShapePersistent/ShapePersistent_TopoDS.hxx @@ -17,7 +17,6 @@ #include -#include #include #include #include diff --git a/src/ShapePersistent/ShapePersistent_TriangleMode.hxx b/src/ShapePersistent/ShapePersistent_TriangleMode.hxx index c537d4cf34..bf4ef3bf26 100644 --- a/src/ShapePersistent/ShapePersistent_TriangleMode.hxx +++ b/src/ShapePersistent/ShapePersistent_TriangleMode.hxx @@ -15,8 +15,6 @@ #ifndef _ShapePersistent_TriangleMode_HeaderFile #define _ShapePersistent_TriangleMode_HeaderFile -#include - enum ShapePersistent_TriangleMode { diff --git a/src/ShapeProcess/ShapeProcess.hxx b/src/ShapeProcess/ShapeProcess.hxx index b8408d5b20..81e91ea6d8 100644 --- a/src/ShapeProcess/ShapeProcess.hxx +++ b/src/ShapeProcess/ShapeProcess.hxx @@ -20,8 +20,6 @@ #include #include -#include -#include #include class ShapeProcess_Operator; diff --git a/src/ShapeProcess/ShapeProcess_Context.hxx b/src/ShapeProcess/ShapeProcess_Context.hxx index d6e572068c..b1c2168ca7 100644 --- a/src/ShapeProcess/ShapeProcess_Context.hxx +++ b/src/ShapeProcess/ShapeProcess_Context.hxx @@ -22,9 +22,6 @@ #include #include #include -#include -#include -#include class Resource_Manager; class Message_Messenger; class TCollection_AsciiString; diff --git a/src/ShapeProcess/ShapeProcess_OperLibrary.cxx b/src/ShapeProcess/ShapeProcess_OperLibrary.cxx index ede8305a68..71be9188df 100644 --- a/src/ShapeProcess/ShapeProcess_OperLibrary.cxx +++ b/src/ShapeProcess/ShapeProcess_OperLibrary.cxx @@ -16,9 +16,7 @@ #include #include -#include #include -#include #include #include #include @@ -28,10 +26,8 @@ #include #include #include -#include #include #include -#include #include #include #include diff --git a/src/ShapeProcess/ShapeProcess_Operator.hxx b/src/ShapeProcess/ShapeProcess_Operator.hxx index d12586f2dc..bdfa380c4c 100644 --- a/src/ShapeProcess/ShapeProcess_Operator.hxx +++ b/src/ShapeProcess/ShapeProcess_Operator.hxx @@ -20,7 +20,6 @@ #include #include -#include #include class ShapeProcess_Context; diff --git a/src/ShapeProcess/ShapeProcess_ShapeContext.cxx b/src/ShapeProcess/ShapeProcess_ShapeContext.cxx index 135f14b36c..e24d82e595 100644 --- a/src/ShapeProcess/ShapeProcess_ShapeContext.cxx +++ b/src/ShapeProcess/ShapeProcess_ShapeContext.cxx @@ -16,19 +16,15 @@ #include #include -#include -#include #include #include #include -#include #include #include #include #include #include #include -#include IMPLEMENT_STANDARD_RTTIEXT(ShapeProcess_ShapeContext,ShapeProcess_Context) diff --git a/src/ShapeProcess/ShapeProcess_ShapeContext.hxx b/src/ShapeProcess/ShapeProcess_ShapeContext.hxx index e2ccf74015..c1aeaa3a85 100644 --- a/src/ShapeProcess/ShapeProcess_ShapeContext.hxx +++ b/src/ShapeProcess/ShapeProcess_ShapeContext.hxx @@ -23,9 +23,7 @@ #include #include #include -#include #include -#include #include class ShapeExtend_MsgRegistrator; class ShapeBuild_ReShape; diff --git a/src/ShapeProcess/ShapeProcess_UOperator.cxx b/src/ShapeProcess/ShapeProcess_UOperator.cxx index c5c92d01db..bc49fe29a4 100644 --- a/src/ShapeProcess/ShapeProcess_UOperator.cxx +++ b/src/ShapeProcess/ShapeProcess_UOperator.cxx @@ -14,7 +14,6 @@ // commercial license or contractual agreement. -#include #include #include diff --git a/src/ShapeProcess/ShapeProcess_UOperator.hxx b/src/ShapeProcess/ShapeProcess_UOperator.hxx index 9a777cd6b8..865e8de8e5 100644 --- a/src/ShapeProcess/ShapeProcess_UOperator.hxx +++ b/src/ShapeProcess/ShapeProcess_UOperator.hxx @@ -17,11 +17,9 @@ #define _ShapeProcess_UOperator_HeaderFile #include -#include #include #include -#include class ShapeProcess_Context; diff --git a/src/ShapeProcessAPI/ShapeProcessAPI_ApplySequence.cxx b/src/ShapeProcessAPI/ShapeProcessAPI_ApplySequence.cxx index 3c990713ea..bc42326382 100644 --- a/src/ShapeProcessAPI/ShapeProcessAPI_ApplySequence.cxx +++ b/src/ShapeProcessAPI/ShapeProcessAPI_ApplySequence.cxx @@ -24,7 +24,6 @@ #include #include #include -#include //======================================================================= //function : ShapeProcessAPI_ApplySequence diff --git a/src/ShapeProcessAPI/ShapeProcessAPI_ApplySequence.hxx b/src/ShapeProcessAPI/ShapeProcessAPI_ApplySequence.hxx index f38313b65e..20e2b7fbd4 100644 --- a/src/ShapeProcessAPI/ShapeProcessAPI_ApplySequence.hxx +++ b/src/ShapeProcessAPI/ShapeProcessAPI_ApplySequence.hxx @@ -24,7 +24,6 @@ #include #include #include -#include #include #include diff --git a/src/ShapeUpgrade/ShapeUpgrade_ClosedEdgeDivide.hxx b/src/ShapeUpgrade/ShapeUpgrade_ClosedEdgeDivide.hxx index 5d64264cfe..9712a5ca9b 100644 --- a/src/ShapeUpgrade/ShapeUpgrade_ClosedEdgeDivide.hxx +++ b/src/ShapeUpgrade/ShapeUpgrade_ClosedEdgeDivide.hxx @@ -20,7 +20,6 @@ #include #include -#include class TopoDS_Edge; diff --git a/src/ShapeUpgrade/ShapeUpgrade_ClosedFaceDivide.cxx b/src/ShapeUpgrade/ShapeUpgrade_ClosedFaceDivide.cxx index 07b335441e..332a87e3ea 100644 --- a/src/ShapeUpgrade/ShapeUpgrade_ClosedFaceDivide.cxx +++ b/src/ShapeUpgrade/ShapeUpgrade_ClosedFaceDivide.cxx @@ -19,7 +19,6 @@ #include #include #include -#include #include #include #include diff --git a/src/ShapeUpgrade/ShapeUpgrade_ClosedFaceDivide.hxx b/src/ShapeUpgrade/ShapeUpgrade_ClosedFaceDivide.hxx index db34cc82dd..71cc375834 100644 --- a/src/ShapeUpgrade/ShapeUpgrade_ClosedFaceDivide.hxx +++ b/src/ShapeUpgrade/ShapeUpgrade_ClosedFaceDivide.hxx @@ -22,7 +22,6 @@ #include #include -#include class TopoDS_Face; diff --git a/src/ShapeUpgrade/ShapeUpgrade_ConvertCurve2dToBezier.cxx b/src/ShapeUpgrade/ShapeUpgrade_ConvertCurve2dToBezier.cxx index ee833c04c4..cf2aefafdd 100644 --- a/src/ShapeUpgrade/ShapeUpgrade_ConvertCurve2dToBezier.cxx +++ b/src/ShapeUpgrade/ShapeUpgrade_ConvertCurve2dToBezier.cxx @@ -16,7 +16,6 @@ #include -#include #include #include #include @@ -24,7 +23,6 @@ #include #include #include -#include #include #include #include diff --git a/src/ShapeUpgrade/ShapeUpgrade_ConvertCurve2dToBezier.hxx b/src/ShapeUpgrade/ShapeUpgrade_ConvertCurve2dToBezier.hxx index 80e36d2f7e..b15dfc1a64 100644 --- a/src/ShapeUpgrade/ShapeUpgrade_ConvertCurve2dToBezier.hxx +++ b/src/ShapeUpgrade/ShapeUpgrade_ConvertCurve2dToBezier.hxx @@ -21,9 +21,7 @@ #include #include -#include #include -#include class ShapeUpgrade_ConvertCurve2dToBezier; diff --git a/src/ShapeUpgrade/ShapeUpgrade_ConvertCurve3dToBezier.cxx b/src/ShapeUpgrade/ShapeUpgrade_ConvertCurve3dToBezier.cxx index ff37b00514..d7745ed114 100644 --- a/src/ShapeUpgrade/ShapeUpgrade_ConvertCurve3dToBezier.cxx +++ b/src/ShapeUpgrade/ShapeUpgrade_ConvertCurve3dToBezier.cxx @@ -16,7 +16,6 @@ #include -#include #include #include #include diff --git a/src/ShapeUpgrade/ShapeUpgrade_ConvertCurve3dToBezier.hxx b/src/ShapeUpgrade/ShapeUpgrade_ConvertCurve3dToBezier.hxx index 55946c969f..598244389f 100644 --- a/src/ShapeUpgrade/ShapeUpgrade_ConvertCurve3dToBezier.hxx +++ b/src/ShapeUpgrade/ShapeUpgrade_ConvertCurve3dToBezier.hxx @@ -21,8 +21,6 @@ #include #include -#include -#include #include diff --git a/src/ShapeUpgrade/ShapeUpgrade_ConvertSurfaceToBezierBasis.cxx b/src/ShapeUpgrade/ShapeUpgrade_ConvertSurfaceToBezierBasis.cxx index 7da3a3aba1..ff0c54fe2b 100644 --- a/src/ShapeUpgrade/ShapeUpgrade_ConvertSurfaceToBezierBasis.cxx +++ b/src/ShapeUpgrade/ShapeUpgrade_ConvertSurfaceToBezierBasis.cxx @@ -17,8 +17,6 @@ // svv 10.01.00 porting on DEC #include -#include -#include #include #include #include diff --git a/src/ShapeUpgrade/ShapeUpgrade_ConvertSurfaceToBezierBasis.hxx b/src/ShapeUpgrade/ShapeUpgrade_ConvertSurfaceToBezierBasis.hxx index cc35bed8fe..73d61140be 100644 --- a/src/ShapeUpgrade/ShapeUpgrade_ConvertSurfaceToBezierBasis.hxx +++ b/src/ShapeUpgrade/ShapeUpgrade_ConvertSurfaceToBezierBasis.hxx @@ -20,7 +20,6 @@ #include #include -#include #include class ShapeExtend_CompositeSurface; diff --git a/src/ShapeUpgrade/ShapeUpgrade_EdgeDivide.hxx b/src/ShapeUpgrade/ShapeUpgrade_EdgeDivide.hxx index a4853de025..6198c8d0d6 100644 --- a/src/ShapeUpgrade/ShapeUpgrade_EdgeDivide.hxx +++ b/src/ShapeUpgrade/ShapeUpgrade_EdgeDivide.hxx @@ -20,7 +20,6 @@ #include #include -#include #include #include class ShapeUpgrade_SplitCurve3d; diff --git a/src/ShapeUpgrade/ShapeUpgrade_FaceDivide.cxx b/src/ShapeUpgrade/ShapeUpgrade_FaceDivide.cxx index 15e7093602..e27af14a5f 100644 --- a/src/ShapeUpgrade/ShapeUpgrade_FaceDivide.cxx +++ b/src/ShapeUpgrade/ShapeUpgrade_FaceDivide.cxx @@ -22,8 +22,6 @@ #include #include #include -#include -#include #include #include #include @@ -34,7 +32,6 @@ #include #include #include -#include #include #include #include diff --git a/src/ShapeUpgrade/ShapeUpgrade_FaceDivide.hxx b/src/ShapeUpgrade/ShapeUpgrade_FaceDivide.hxx index 5653bfa294..9db1c50854 100644 --- a/src/ShapeUpgrade/ShapeUpgrade_FaceDivide.hxx +++ b/src/ShapeUpgrade/ShapeUpgrade_FaceDivide.hxx @@ -21,7 +21,6 @@ #include #include -#include #include #include #include diff --git a/src/ShapeUpgrade/ShapeUpgrade_FaceDivideArea.hxx b/src/ShapeUpgrade/ShapeUpgrade_FaceDivideArea.hxx index 9b04ca60e3..bfb3d1b62f 100644 --- a/src/ShapeUpgrade/ShapeUpgrade_FaceDivideArea.hxx +++ b/src/ShapeUpgrade/ShapeUpgrade_FaceDivideArea.hxx @@ -19,9 +19,7 @@ #include #include -#include #include -#include class TopoDS_Face; diff --git a/src/ShapeUpgrade/ShapeUpgrade_FixSmallBezierCurves.cxx b/src/ShapeUpgrade/ShapeUpgrade_FixSmallBezierCurves.cxx index 3c280fc0e4..280556d335 100644 --- a/src/ShapeUpgrade/ShapeUpgrade_FixSmallBezierCurves.cxx +++ b/src/ShapeUpgrade/ShapeUpgrade_FixSmallBezierCurves.cxx @@ -26,8 +26,6 @@ #include #include #include -#include -#include #include #include #include diff --git a/src/ShapeUpgrade/ShapeUpgrade_FixSmallBezierCurves.hxx b/src/ShapeUpgrade/ShapeUpgrade_FixSmallBezierCurves.hxx index 2bc19bfcd1..92a984d167 100644 --- a/src/ShapeUpgrade/ShapeUpgrade_FixSmallBezierCurves.hxx +++ b/src/ShapeUpgrade/ShapeUpgrade_FixSmallBezierCurves.hxx @@ -20,8 +20,6 @@ #include #include -#include -#include class Geom_Curve; class Geom2d_Curve; diff --git a/src/ShapeUpgrade/ShapeUpgrade_FixSmallCurves.cxx b/src/ShapeUpgrade/ShapeUpgrade_FixSmallCurves.cxx index d678acedf8..16f579355c 100644 --- a/src/ShapeUpgrade/ShapeUpgrade_FixSmallCurves.cxx +++ b/src/ShapeUpgrade/ShapeUpgrade_FixSmallCurves.cxx @@ -14,11 +14,7 @@ // commercial license or contractual agreement. -#include -#include #include -#include -#include #include #include #include @@ -30,10 +26,6 @@ IMPLEMENT_STANDARD_RTTIEXT(ShapeUpgrade_FixSmallCurves,ShapeUpgrade_Tool) #//include //#include #include -#include -#include -#include -#include #include #include diff --git a/src/ShapeUpgrade/ShapeUpgrade_FixSmallCurves.hxx b/src/ShapeUpgrade/ShapeUpgrade_FixSmallCurves.hxx index 6a49e5d3f5..3ad413151f 100644 --- a/src/ShapeUpgrade/ShapeUpgrade_FixSmallCurves.hxx +++ b/src/ShapeUpgrade/ShapeUpgrade_FixSmallCurves.hxx @@ -17,13 +17,11 @@ #define _ShapeUpgrade_FixSmallCurves_HeaderFile #include -#include #include #include #include #include -#include #include #include class ShapeUpgrade_SplitCurve3d; diff --git a/src/ShapeUpgrade/ShapeUpgrade_RemoveInternalWires.cxx b/src/ShapeUpgrade/ShapeUpgrade_RemoveInternalWires.cxx index d6608f5055..1b000c1366 100644 --- a/src/ShapeUpgrade/ShapeUpgrade_RemoveInternalWires.cxx +++ b/src/ShapeUpgrade/ShapeUpgrade_RemoveInternalWires.cxx @@ -15,7 +15,6 @@ #include #include #include -#include #include #include #include @@ -29,7 +28,6 @@ #include #include #include -#include #include #include diff --git a/src/ShapeUpgrade/ShapeUpgrade_RemoveInternalWires.hxx b/src/ShapeUpgrade/ShapeUpgrade_RemoveInternalWires.hxx index ca1c0e35e8..77c0483cc5 100644 --- a/src/ShapeUpgrade/ShapeUpgrade_RemoveInternalWires.hxx +++ b/src/ShapeUpgrade/ShapeUpgrade_RemoveInternalWires.hxx @@ -20,8 +20,6 @@ #include #include -#include -#include #include #include #include diff --git a/src/ShapeUpgrade/ShapeUpgrade_RemoveLocations.cxx b/src/ShapeUpgrade/ShapeUpgrade_RemoveLocations.cxx index f6b1d62ebb..caba9bfb61 100644 --- a/src/ShapeUpgrade/ShapeUpgrade_RemoveLocations.cxx +++ b/src/ShapeUpgrade/ShapeUpgrade_RemoveLocations.cxx @@ -13,9 +13,6 @@ #include -#include -#include -#include #include #include #include @@ -24,15 +21,10 @@ #include #include #include -#include -#include #include #include -#include -#include #include #include -#include #include #include #include @@ -40,7 +32,6 @@ #include #include #include -#include IMPLEMENT_STANDARD_RTTIEXT(ShapeUpgrade_RemoveLocations,Standard_Transient) diff --git a/src/ShapeUpgrade/ShapeUpgrade_RemoveLocations.hxx b/src/ShapeUpgrade/ShapeUpgrade_RemoveLocations.hxx index 85a41306bb..37ed957ba0 100644 --- a/src/ShapeUpgrade/ShapeUpgrade_RemoveLocations.hxx +++ b/src/ShapeUpgrade/ShapeUpgrade_RemoveLocations.hxx @@ -23,7 +23,6 @@ #include #include #include -#include class ShapeUpgrade_RemoveLocations; diff --git a/src/ShapeUpgrade/ShapeUpgrade_ShapeConvertToBezier.cxx b/src/ShapeUpgrade/ShapeUpgrade_ShapeConvertToBezier.cxx index 928df17808..58ef035a1c 100644 --- a/src/ShapeUpgrade/ShapeUpgrade_ShapeConvertToBezier.cxx +++ b/src/ShapeUpgrade/ShapeUpgrade_ShapeConvertToBezier.cxx @@ -30,7 +30,6 @@ #include #include #include -#include #include #include #include diff --git a/src/ShapeUpgrade/ShapeUpgrade_ShapeConvertToBezier.hxx b/src/ShapeUpgrade/ShapeUpgrade_ShapeConvertToBezier.hxx index c2cdceea65..d3d73bde44 100644 --- a/src/ShapeUpgrade/ShapeUpgrade_ShapeConvertToBezier.hxx +++ b/src/ShapeUpgrade/ShapeUpgrade_ShapeConvertToBezier.hxx @@ -21,7 +21,6 @@ #include #include -#include #include #include class TopoDS_Shape; diff --git a/src/ShapeUpgrade/ShapeUpgrade_ShapeDivide.hxx b/src/ShapeUpgrade/ShapeUpgrade_ShapeDivide.hxx index b4b4f85e88..464afac5ee 100644 --- a/src/ShapeUpgrade/ShapeUpgrade_ShapeDivide.hxx +++ b/src/ShapeUpgrade/ShapeUpgrade_ShapeDivide.hxx @@ -22,8 +22,6 @@ #include #include -#include -#include #include #include #include diff --git a/src/ShapeUpgrade/ShapeUpgrade_ShapeDivideAngle.hxx b/src/ShapeUpgrade/ShapeUpgrade_ShapeDivideAngle.hxx index 16c7d5305e..09db4c187c 100644 --- a/src/ShapeUpgrade/ShapeUpgrade_ShapeDivideAngle.hxx +++ b/src/ShapeUpgrade/ShapeUpgrade_ShapeDivideAngle.hxx @@ -19,10 +19,8 @@ #include #include -#include #include -#include class TopoDS_Shape; diff --git a/src/ShapeUpgrade/ShapeUpgrade_ShapeDivideArea.hxx b/src/ShapeUpgrade/ShapeUpgrade_ShapeDivideArea.hxx index b2ef16af00..cf0b13674b 100644 --- a/src/ShapeUpgrade/ShapeUpgrade_ShapeDivideArea.hxx +++ b/src/ShapeUpgrade/ShapeUpgrade_ShapeDivideArea.hxx @@ -20,7 +20,6 @@ #include #include -#include #include class TopoDS_Shape; class ShapeUpgrade_FaceDivide; diff --git a/src/ShapeUpgrade/ShapeUpgrade_ShapeDivideClosed.hxx b/src/ShapeUpgrade/ShapeUpgrade_ShapeDivideClosed.hxx index 3b588f820a..008fa9bb60 100644 --- a/src/ShapeUpgrade/ShapeUpgrade_ShapeDivideClosed.hxx +++ b/src/ShapeUpgrade/ShapeUpgrade_ShapeDivideClosed.hxx @@ -19,7 +19,6 @@ #include #include -#include #include #include diff --git a/src/ShapeUpgrade/ShapeUpgrade_ShapeDivideClosedEdges.hxx b/src/ShapeUpgrade/ShapeUpgrade_ShapeDivideClosedEdges.hxx index 8b95ffb356..640c06303d 100644 --- a/src/ShapeUpgrade/ShapeUpgrade_ShapeDivideClosedEdges.hxx +++ b/src/ShapeUpgrade/ShapeUpgrade_ShapeDivideClosedEdges.hxx @@ -18,7 +18,6 @@ #include #include -#include #include #include diff --git a/src/ShapeUpgrade/ShapeUpgrade_ShapeDivideContinuity.hxx b/src/ShapeUpgrade/ShapeUpgrade_ShapeDivideContinuity.hxx index b4901d2ab2..e4bb8a5c46 100644 --- a/src/ShapeUpgrade/ShapeUpgrade_ShapeDivideContinuity.hxx +++ b/src/ShapeUpgrade/ShapeUpgrade_ShapeDivideContinuity.hxx @@ -22,7 +22,6 @@ #include #include -#include #include class TopoDS_Shape; class ShapeUpgrade_FaceDivide; diff --git a/src/ShapeUpgrade/ShapeUpgrade_ShellSewing.cxx b/src/ShapeUpgrade/ShapeUpgrade_ShellSewing.cxx index 4cdf3f43ba..73001b62a7 100644 --- a/src/ShapeUpgrade/ShapeUpgrade_ShellSewing.cxx +++ b/src/ShapeUpgrade/ShapeUpgrade_ShellSewing.cxx @@ -18,7 +18,6 @@ #include #include #include -#include #include #include #include diff --git a/src/ShapeUpgrade/ShapeUpgrade_ShellSewing.hxx b/src/ShapeUpgrade/ShapeUpgrade_ShellSewing.hxx index 83268d23cf..3790c69f78 100644 --- a/src/ShapeUpgrade/ShapeUpgrade_ShellSewing.hxx +++ b/src/ShapeUpgrade/ShapeUpgrade_ShellSewing.hxx @@ -22,7 +22,6 @@ #include #include -#include #include class ShapeBuild_ReShape; class TopoDS_Shape; diff --git a/src/ShapeUpgrade/ShapeUpgrade_SplitCurve.cxx b/src/ShapeUpgrade/ShapeUpgrade_SplitCurve.cxx index 7d47ecb6a3..a80af8aeac 100644 --- a/src/ShapeUpgrade/ShapeUpgrade_SplitCurve.cxx +++ b/src/ShapeUpgrade/ShapeUpgrade_SplitCurve.cxx @@ -24,7 +24,6 @@ #include #include #include -#include IMPLEMENT_STANDARD_RTTIEXT(ShapeUpgrade_SplitCurve,Standard_Transient) diff --git a/src/ShapeUpgrade/ShapeUpgrade_SplitCurve.hxx b/src/ShapeUpgrade/ShapeUpgrade_SplitCurve.hxx index c6f8155469..75cd151cca 100644 --- a/src/ShapeUpgrade/ShapeUpgrade_SplitCurve.hxx +++ b/src/ShapeUpgrade/ShapeUpgrade_SplitCurve.hxx @@ -23,8 +23,6 @@ #include #include #include -#include -#include #include // resolve name collisions with X11 headers diff --git a/src/ShapeUpgrade/ShapeUpgrade_SplitCurve2d.cxx b/src/ShapeUpgrade/ShapeUpgrade_SplitCurve2d.cxx index 23783b9e5d..e78e550aa3 100644 --- a/src/ShapeUpgrade/ShapeUpgrade_SplitCurve2d.cxx +++ b/src/ShapeUpgrade/ShapeUpgrade_SplitCurve2d.cxx @@ -23,14 +23,12 @@ #include #include #include -#include #include #include #include #include #include #include -#include IMPLEMENT_STANDARD_RTTIEXT(ShapeUpgrade_SplitCurve2d,ShapeUpgrade_SplitCurve) diff --git a/src/ShapeUpgrade/ShapeUpgrade_SplitCurve2d.hxx b/src/ShapeUpgrade/ShapeUpgrade_SplitCurve2d.hxx index e6a6e180fc..6cf7a2f30f 100644 --- a/src/ShapeUpgrade/ShapeUpgrade_SplitCurve2d.hxx +++ b/src/ShapeUpgrade/ShapeUpgrade_SplitCurve2d.hxx @@ -22,8 +22,6 @@ #include #include -#include -#include class Geom2d_Curve; diff --git a/src/ShapeUpgrade/ShapeUpgrade_SplitCurve2dContinuity.cxx b/src/ShapeUpgrade/ShapeUpgrade_SplitCurve2dContinuity.cxx index 1bc531f978..e58fec2990 100644 --- a/src/ShapeUpgrade/ShapeUpgrade_SplitCurve2dContinuity.cxx +++ b/src/ShapeUpgrade/ShapeUpgrade_SplitCurve2dContinuity.cxx @@ -25,7 +25,6 @@ #include #include #include -#include #include IMPLEMENT_STANDARD_RTTIEXT(ShapeUpgrade_SplitCurve2dContinuity,ShapeUpgrade_SplitCurve2d) diff --git a/src/ShapeUpgrade/ShapeUpgrade_SplitCurve2dContinuity.hxx b/src/ShapeUpgrade/ShapeUpgrade_SplitCurve2dContinuity.hxx index 4fdf595ee0..759a2aff43 100644 --- a/src/ShapeUpgrade/ShapeUpgrade_SplitCurve2dContinuity.hxx +++ b/src/ShapeUpgrade/ShapeUpgrade_SplitCurve2dContinuity.hxx @@ -22,7 +22,6 @@ #include #include -#include #include diff --git a/src/ShapeUpgrade/ShapeUpgrade_SplitCurve3d.cxx b/src/ShapeUpgrade/ShapeUpgrade_SplitCurve3d.cxx index fb2a168bdb..d9e1e931cd 100644 --- a/src/ShapeUpgrade/ShapeUpgrade_SplitCurve3d.cxx +++ b/src/ShapeUpgrade/ShapeUpgrade_SplitCurve3d.cxx @@ -23,14 +23,12 @@ #include #include #include -#include #include #include #include #include #include #include -#include IMPLEMENT_STANDARD_RTTIEXT(ShapeUpgrade_SplitCurve3d,ShapeUpgrade_SplitCurve) diff --git a/src/ShapeUpgrade/ShapeUpgrade_SplitCurve3d.hxx b/src/ShapeUpgrade/ShapeUpgrade_SplitCurve3d.hxx index c305a048a5..c49d6a50d9 100644 --- a/src/ShapeUpgrade/ShapeUpgrade_SplitCurve3d.hxx +++ b/src/ShapeUpgrade/ShapeUpgrade_SplitCurve3d.hxx @@ -22,8 +22,6 @@ #include #include -#include -#include class Geom_Curve; diff --git a/src/ShapeUpgrade/ShapeUpgrade_SplitCurve3dContinuity.cxx b/src/ShapeUpgrade/ShapeUpgrade_SplitCurve3dContinuity.cxx index a8da8a2158..ebaf87e030 100644 --- a/src/ShapeUpgrade/ShapeUpgrade_SplitCurve3dContinuity.cxx +++ b/src/ShapeUpgrade/ShapeUpgrade_SplitCurve3dContinuity.cxx @@ -26,7 +26,6 @@ #include #include #include -#include #include IMPLEMENT_STANDARD_RTTIEXT(ShapeUpgrade_SplitCurve3dContinuity,ShapeUpgrade_SplitCurve3d) diff --git a/src/ShapeUpgrade/ShapeUpgrade_SplitCurve3dContinuity.hxx b/src/ShapeUpgrade/ShapeUpgrade_SplitCurve3dContinuity.hxx index 58b53e6422..5e8bdf3136 100644 --- a/src/ShapeUpgrade/ShapeUpgrade_SplitCurve3dContinuity.hxx +++ b/src/ShapeUpgrade/ShapeUpgrade_SplitCurve3dContinuity.hxx @@ -21,7 +21,6 @@ #include #include -#include #include #include class Geom_Curve; diff --git a/src/ShapeUpgrade/ShapeUpgrade_SplitSurface.cxx b/src/ShapeUpgrade/ShapeUpgrade_SplitSurface.cxx index 13153ab5ff..f5b5180ac4 100644 --- a/src/ShapeUpgrade/ShapeUpgrade_SplitSurface.cxx +++ b/src/ShapeUpgrade/ShapeUpgrade_SplitSurface.cxx @@ -17,13 +17,11 @@ // gka 30.04.99 S4137: extended for all types of surfaces #include -#include #include #include #include #include #include -#include #include #include #include diff --git a/src/ShapeUpgrade/ShapeUpgrade_SplitSurface.hxx b/src/ShapeUpgrade/ShapeUpgrade_SplitSurface.hxx index 985f8e3bea..15c8f80f65 100644 --- a/src/ShapeUpgrade/ShapeUpgrade_SplitSurface.hxx +++ b/src/ShapeUpgrade/ShapeUpgrade_SplitSurface.hxx @@ -23,8 +23,6 @@ #include #include #include -#include -#include #include class Geom_Surface; class ShapeExtend_CompositeSurface; diff --git a/src/ShapeUpgrade/ShapeUpgrade_SplitSurfaceAngle.hxx b/src/ShapeUpgrade/ShapeUpgrade_SplitSurfaceAngle.hxx index 134efd1f74..e5dc99c8ad 100644 --- a/src/ShapeUpgrade/ShapeUpgrade_SplitSurfaceAngle.hxx +++ b/src/ShapeUpgrade/ShapeUpgrade_SplitSurfaceAngle.hxx @@ -20,9 +20,7 @@ #include #include -#include #include -#include class ShapeUpgrade_SplitSurfaceAngle; diff --git a/src/ShapeUpgrade/ShapeUpgrade_SplitSurfaceArea.hxx b/src/ShapeUpgrade/ShapeUpgrade_SplitSurfaceArea.hxx index 5681cb4901..96eafcfe24 100644 --- a/src/ShapeUpgrade/ShapeUpgrade_SplitSurfaceArea.hxx +++ b/src/ShapeUpgrade/ShapeUpgrade_SplitSurfaceArea.hxx @@ -21,7 +21,6 @@ #include #include -#include class ShapeUpgrade_SplitSurfaceArea; diff --git a/src/ShapeUpgrade/ShapeUpgrade_SplitSurfaceContinuity.cxx b/src/ShapeUpgrade/ShapeUpgrade_SplitSurfaceContinuity.cxx index e2660fea6d..eb252bddc0 100644 --- a/src/ShapeUpgrade/ShapeUpgrade_SplitSurfaceContinuity.cxx +++ b/src/ShapeUpgrade/ShapeUpgrade_SplitSurfaceContinuity.cxx @@ -15,22 +15,17 @@ // commercial license or contractual agreement. -#include #include #include #include #include #include -#include #include #include #include #include #include #include -#include -#include -#include #include IMPLEMENT_STANDARD_RTTIEXT(ShapeUpgrade_SplitSurfaceContinuity,ShapeUpgrade_SplitSurface) diff --git a/src/ShapeUpgrade/ShapeUpgrade_SplitSurfaceContinuity.hxx b/src/ShapeUpgrade/ShapeUpgrade_SplitSurfaceContinuity.hxx index 7109639332..bec257a140 100644 --- a/src/ShapeUpgrade/ShapeUpgrade_SplitSurfaceContinuity.hxx +++ b/src/ShapeUpgrade/ShapeUpgrade_SplitSurfaceContinuity.hxx @@ -21,10 +21,8 @@ #include #include -#include #include #include -#include class ShapeUpgrade_SplitSurfaceContinuity; diff --git a/src/ShapeUpgrade/ShapeUpgrade_Tool.hxx b/src/ShapeUpgrade/ShapeUpgrade_Tool.hxx index 9052c23037..febdf6116a 100644 --- a/src/ShapeUpgrade/ShapeUpgrade_Tool.hxx +++ b/src/ShapeUpgrade/ShapeUpgrade_Tool.hxx @@ -20,7 +20,6 @@ #include #include -#include #include class ShapeBuild_ReShape; diff --git a/src/ShapeUpgrade/ShapeUpgrade_UnifySameDomain.cxx b/src/ShapeUpgrade/ShapeUpgrade_UnifySameDomain.cxx index f48c390f0f..38bf20fbce 100644 --- a/src/ShapeUpgrade/ShapeUpgrade_UnifySameDomain.cxx +++ b/src/ShapeUpgrade/ShapeUpgrade_UnifySameDomain.cxx @@ -18,11 +18,8 @@ #include #include #include -#include -#include #include #include -#include #include #include #include @@ -30,14 +27,12 @@ #include #include #include +#include #include #include -#include -#include #include #include #include -#include #include #include #include @@ -45,7 +40,6 @@ #include #include #include -#include #include #include #include @@ -57,10 +51,8 @@ #include #include #include -#include #include #include -#include #include #include #include @@ -83,7 +75,6 @@ #include #include #include -#include #include #include #include @@ -96,9 +87,6 @@ #include #include #include -#include -#include -#include #include #include diff --git a/src/ShapeUpgrade/ShapeUpgrade_WireDivide.cxx b/src/ShapeUpgrade/ShapeUpgrade_WireDivide.cxx index 714ee5295e..0bd2850378 100644 --- a/src/ShapeUpgrade/ShapeUpgrade_WireDivide.cxx +++ b/src/ShapeUpgrade/ShapeUpgrade_WireDivide.cxx @@ -24,10 +24,8 @@ #include #include #include -#include #include #include -#include #include #include #include @@ -35,7 +33,6 @@ #include #include #include -#include #include #include #include diff --git a/src/ShapeUpgrade/ShapeUpgrade_WireDivide.hxx b/src/ShapeUpgrade/ShapeUpgrade_WireDivide.hxx index 6a200fc314..88d3d4a5ba 100644 --- a/src/ShapeUpgrade/ShapeUpgrade_WireDivide.hxx +++ b/src/ShapeUpgrade/ShapeUpgrade_WireDivide.hxx @@ -24,7 +24,6 @@ #include #include #include -#include #include class ShapeUpgrade_SplitCurve3d; class ShapeUpgrade_SplitCurve2d; diff --git a/src/Standard/Standard_CString.cxx b/src/Standard/Standard_CString.cxx index df696d77e1..f73d6b6940 100755 --- a/src/Standard/Standard_CString.cxx +++ b/src/Standard/Standard_CString.cxx @@ -18,8 +18,6 @@ // resizing of a Map or copying an item from a Map to another Map. // - three methods of HashCoding of strings converted to uppercase. -#include - #include #include #include diff --git a/src/Standard/Standard_Character.hxx b/src/Standard/Standard_Character.hxx index 3d85fe6cbd..e29f1a4c55 100644 --- a/src/Standard/Standard_Character.hxx +++ b/src/Standard/Standard_Character.hxx @@ -25,7 +25,6 @@ #include -#include #include // ------------------------------------------------------------------ diff --git a/src/Standard/Standard_ExtCharacter.hxx b/src/Standard/Standard_ExtCharacter.hxx index 926bb9e0b7..71563bb185 100644 --- a/src/Standard/Standard_ExtCharacter.hxx +++ b/src/Standard/Standard_ExtCharacter.hxx @@ -25,8 +25,6 @@ #include -#include - // =============== // inline methods // =============== diff --git a/src/Standard/Standard_GUID.hxx b/src/Standard/Standard_GUID.hxx index 1e4dac4c05..148e511161 100644 --- a/src/Standard/Standard_GUID.hxx +++ b/src/Standard/Standard_GUID.hxx @@ -17,18 +17,13 @@ #ifndef _Standard_GUID_HeaderFile #define _Standard_GUID_HeaderFile -#include #include #include -#include -#include #include -#include #include #include #include -#include #include #define Standard_GUID_SIZE 36 diff --git a/src/Standard/Standard_IStream.hxx b/src/Standard/Standard_IStream.hxx index da43649b4d..7867ec6de3 100644 --- a/src/Standard/Standard_IStream.hxx +++ b/src/Standard/Standard_IStream.hxx @@ -15,7 +15,6 @@ #ifndef _Standard_IStream_HeaderFile #define _Standard_IStream_HeaderFile -#include #include typedef std::istream Standard_IStream; diff --git a/src/Standard/Standard_JmpBuf.hxx b/src/Standard/Standard_JmpBuf.hxx index f7d22cc924..ea6b809e8a 100644 --- a/src/Standard/Standard_JmpBuf.hxx +++ b/src/Standard/Standard_JmpBuf.hxx @@ -14,7 +14,6 @@ #ifndef _Standard_JmpBuf_HeaderFile #define _Standard_JmpBuf_HeaderFile -#include #include typedef diff --git a/src/Standard/Standard_MMgrRaw.cxx b/src/Standard/Standard_MMgrRaw.cxx index 302053d5f0..83ec139446 100644 --- a/src/Standard/Standard_MMgrRaw.cxx +++ b/src/Standard/Standard_MMgrRaw.cxx @@ -15,7 +15,6 @@ #include #include -#include //======================================================================= //function : Standard_MMgrRaw diff --git a/src/Standard/Standard_MMgrRoot.cxx b/src/Standard/Standard_MMgrRoot.cxx index 392685944d..abba3d246b 100644 --- a/src/Standard/Standard_MMgrRoot.cxx +++ b/src/Standard/Standard_MMgrRoot.cxx @@ -13,7 +13,6 @@ // commercial license or contractual agreement. #include -#include //======================================================================= //function : ~Standard_MMgrRoot diff --git a/src/Standard/Standard_Mutex.cxx b/src/Standard/Standard_Mutex.cxx index f7bccb85d6..41090571de 100644 --- a/src/Standard/Standard_Mutex.cxx +++ b/src/Standard/Standard_Mutex.cxx @@ -15,8 +15,6 @@ #include -#include - //============================================= // Standard_Mutex::Standard_Mutex //============================================= diff --git a/src/Standard/Standard_OStream.hxx b/src/Standard/Standard_OStream.hxx index c6ef90942b..b94d0a4627 100644 --- a/src/Standard/Standard_OStream.hxx +++ b/src/Standard/Standard_OStream.hxx @@ -15,7 +15,6 @@ #ifndef _Standard_OStream_HeaderFile #define _Standard_OStream_HeaderFile -#include #include typedef std::ostream Standard_OStream; diff --git a/src/Standard/Standard_OutOfMemory.hxx b/src/Standard/Standard_OutOfMemory.hxx index ad81c2674b..0edcc3c366 100644 --- a/src/Standard/Standard_OutOfMemory.hxx +++ b/src/Standard/Standard_OutOfMemory.hxx @@ -18,8 +18,6 @@ #define _Standard_OutOfMemory_HeaderFile #include -#include -#include #include class Standard_OutOfMemory; diff --git a/src/Standard/Standard_OutOfRange.hxx b/src/Standard/Standard_OutOfRange.hxx index 2b81dedd9a..77b6382fdd 100644 --- a/src/Standard/Standard_OutOfRange.hxx +++ b/src/Standard/Standard_OutOfRange.hxx @@ -18,7 +18,6 @@ #define _Standard_OutOfRange_HeaderFile #include -#include #include #include diff --git a/src/Standard/Standard_RangeError.hxx b/src/Standard/Standard_RangeError.hxx index 2f10deeafb..23a4548645 100644 --- a/src/Standard/Standard_RangeError.hxx +++ b/src/Standard/Standard_RangeError.hxx @@ -18,7 +18,6 @@ #define _Standard_RangeError_HeaderFile #include -#include #include #include diff --git a/src/Standard/Standard_Real.cxx b/src/Standard/Standard_Real.cxx index 8bf29fb5e5..f43762aeed 100644 --- a/src/Standard/Standard_Real.cxx +++ b/src/Standard/Standard_Real.cxx @@ -14,7 +14,6 @@ #include #include -#include #include #include #include diff --git a/src/Standard/Standard_SStream.hxx b/src/Standard/Standard_SStream.hxx index d5fb2035aa..ff56aff66c 100644 --- a/src/Standard/Standard_SStream.hxx +++ b/src/Standard/Standard_SStream.hxx @@ -15,7 +15,6 @@ #ifndef _Standard_SStream_HeaderFile #define _Standard_SStream_HeaderFile -#include #include //! Defines Standard_SStream as typedef to C++ string stream. diff --git a/src/Standard/Standard_ShortReal.cxx b/src/Standard/Standard_ShortReal.cxx index fe42f1adc3..f3c123e13c 100644 --- a/src/Standard/Standard_ShortReal.cxx +++ b/src/Standard/Standard_ShortReal.cxx @@ -13,9 +13,7 @@ // commercial license or contractual agreement. #include -#include #include -#include //============================================================================ // function : HashCode diff --git a/src/Standard/Standard_TooManyUsers.hxx b/src/Standard/Standard_TooManyUsers.hxx index 087cfb3346..55af97e910 100644 --- a/src/Standard/Standard_TooManyUsers.hxx +++ b/src/Standard/Standard_TooManyUsers.hxx @@ -18,7 +18,6 @@ #define _Standard_TooManyUsers_HeaderFile #include -#include #include #include diff --git a/src/Standard/Standard_Type.cxx b/src/Standard/Standard_Type.cxx index db42bc039d..546cbafa85 100644 --- a/src/Standard/Standard_Type.cxx +++ b/src/Standard/Standard_Type.cxx @@ -15,7 +15,6 @@ #include #include -#include #include diff --git a/src/Standard/Standard_TypeMismatch.hxx b/src/Standard/Standard_TypeMismatch.hxx index 4c29d4a29c..b16706858d 100644 --- a/src/Standard/Standard_TypeMismatch.hxx +++ b/src/Standard/Standard_TypeMismatch.hxx @@ -18,7 +18,6 @@ #define _Standard_TypeMismatch_HeaderFile #include -#include #include #include diff --git a/src/StdLDrivers/StdLDrivers_DocumentRetrievalDriver.cxx b/src/StdLDrivers/StdLDrivers_DocumentRetrievalDriver.cxx index ff136e0c99..09b69deb7a 100644 --- a/src/StdLDrivers/StdLDrivers_DocumentRetrievalDriver.cxx +++ b/src/StdLDrivers/StdLDrivers_DocumentRetrievalDriver.cxx @@ -14,7 +14,6 @@ #include #include -#include #include #include @@ -32,7 +31,6 @@ #include #include #include -#include #include #include diff --git a/src/StdLPersistent/StdLPersistent.cxx b/src/StdLPersistent/StdLPersistent.cxx index d4f00d9727..fb61ae64ea 100644 --- a/src/StdLPersistent/StdLPersistent.cxx +++ b/src/StdLPersistent/StdLPersistent.cxx @@ -16,9 +16,7 @@ #include #include -#include #include -#include #include #include #include diff --git a/src/StdLPersistent/StdLPersistent_Data.hxx b/src/StdLPersistent/StdLPersistent_Data.hxx index 48cca0636f..9224d76e9e 100644 --- a/src/StdLPersistent/StdLPersistent_Data.hxx +++ b/src/StdLPersistent/StdLPersistent_Data.hxx @@ -15,7 +15,6 @@ #ifndef _StdLPersistent_Data_HeaderFile #define _StdLPersistent_Data_HeaderFile -#include #include class TDF_Data; diff --git a/src/StdLPersistent/StdLPersistent_Dependency.hxx b/src/StdLPersistent/StdLPersistent_Dependency.hxx index c427efc6f3..c4cdf0e3ea 100644 --- a/src/StdLPersistent/StdLPersistent_Dependency.hxx +++ b/src/StdLPersistent/StdLPersistent_Dependency.hxx @@ -19,7 +19,6 @@ #include #include -#include #include diff --git a/src/StdLPersistent/StdLPersistent_HArray1.hxx b/src/StdLPersistent/StdLPersistent_HArray1.hxx index ed88bf6ea5..dbaf1f898a 100644 --- a/src/StdLPersistent/StdLPersistent_HArray1.hxx +++ b/src/StdLPersistent/StdLPersistent_HArray1.hxx @@ -22,8 +22,6 @@ #include #include -#include - #include #include #include diff --git a/src/StdLPersistent/StdLPersistent_HArray2.cxx b/src/StdLPersistent/StdLPersistent_HArray2.cxx index dffa7662d5..279b52b703 100644 --- a/src/StdLPersistent/StdLPersistent_HArray2.cxx +++ b/src/StdLPersistent/StdLPersistent_HArray2.cxx @@ -13,9 +13,6 @@ #include -#include -#include - //======================================================================= //function : Read diff --git a/src/StdLPersistent/StdLPersistent_HArray2.hxx b/src/StdLPersistent/StdLPersistent_HArray2.hxx index f88b0281d8..664209efd7 100644 --- a/src/StdLPersistent/StdLPersistent_HArray2.hxx +++ b/src/StdLPersistent/StdLPersistent_HArray2.hxx @@ -22,8 +22,6 @@ #include #include -#include - #include #include diff --git a/src/StdObject/StdObject_Shape.cxx b/src/StdObject/StdObject_Shape.cxx index 5950fb34ae..e5045abb42 100644 --- a/src/StdObject/StdObject_Shape.cxx +++ b/src/StdObject/StdObject_Shape.cxx @@ -12,7 +12,6 @@ // commercial license or contractual agreement. #include -#include //======================================================================= diff --git a/src/StdObject/StdObject_Shape.hxx b/src/StdObject/StdObject_Shape.hxx index 9a53d23b7d..9a9da7da42 100644 --- a/src/StdObject/StdObject_Shape.hxx +++ b/src/StdObject/StdObject_Shape.hxx @@ -15,8 +15,6 @@ #ifndef _StdObject_Shape_HeaderFile #define _StdObject_Shape_HeaderFile -#include -#include #include #include diff --git a/src/StdObject/StdObject_gp_Axes.hxx b/src/StdObject/StdObject_gp_Axes.hxx index 105487e24e..7fd14a1a57 100644 --- a/src/StdObject/StdObject_gp_Axes.hxx +++ b/src/StdObject/StdObject_gp_Axes.hxx @@ -20,8 +20,6 @@ #include #include -#include -#include #include diff --git a/src/StdObject/StdObject_gp_Curves.hxx b/src/StdObject/StdObject_gp_Curves.hxx index 4ea0132d94..f91b80b365 100644 --- a/src/StdObject/StdObject_gp_Curves.hxx +++ b/src/StdObject/StdObject_gp_Curves.hxx @@ -23,7 +23,6 @@ #include #include #include -#include #include #include #include diff --git a/src/StdPersistent/StdPersistent.cxx b/src/StdPersistent/StdPersistent.cxx index 94cd3c5714..8f2917b608 100644 --- a/src/StdPersistent/StdPersistent.cxx +++ b/src/StdPersistent/StdPersistent.cxx @@ -15,7 +15,6 @@ #include #include -#include #include #include #include diff --git a/src/StdPersistent/StdPersistent_DataXtd.hxx b/src/StdPersistent/StdPersistent_DataXtd.hxx index 925ae55f9f..3a720933e3 100644 --- a/src/StdPersistent/StdPersistent_DataXtd.hxx +++ b/src/StdPersistent/StdPersistent_DataXtd.hxx @@ -15,7 +15,6 @@ #ifndef _StdPersistent_DataXtd_HeaderFile #define _StdPersistent_DataXtd_HeaderFile -#include #include #include diff --git a/src/StdPersistent/StdPersistent_Naming.hxx b/src/StdPersistent/StdPersistent_Naming.hxx index 78cf6ecb7e..96a39b10b7 100644 --- a/src/StdPersistent/StdPersistent_Naming.hxx +++ b/src/StdPersistent/StdPersistent_Naming.hxx @@ -21,7 +21,6 @@ #include #include -#include #include class TNaming_Name; diff --git a/src/StdPrs/StdPrs_BRepFont.cxx b/src/StdPrs/StdPrs_BRepFont.cxx index 2ab855c489..ab2d9b3c9f 100644 --- a/src/StdPrs/StdPrs_BRepFont.cxx +++ b/src/StdPrs/StdPrs_BRepFont.cxx @@ -21,22 +21,18 @@ #include #include #include -#include #include -#include #include #include #include #include #include #include -#include #include #include #include #include #include -#include #include #include #include @@ -50,7 +46,6 @@ #ifdef HAVE_FREETYPE #include #include FT_FREETYPE_H - #include FT_OUTLINE_H #endif IMPLEMENT_STANDARD_RTTIEXT(StdPrs_BRepFont, Standard_Transient) diff --git a/src/StdPrs/StdPrs_BRepFont.hxx b/src/StdPrs/StdPrs_BRepFont.hxx index 28fd303aa0..8f1f6abac3 100644 --- a/src/StdPrs/StdPrs_BRepFont.hxx +++ b/src/StdPrs/StdPrs_BRepFont.hxx @@ -21,15 +21,11 @@ #include #include #include -#include -#include -#include #include #include #include #include #include -#include #include DEFINE_STANDARD_HANDLE(StdPrs_BRepFont, Standard_Transient) diff --git a/src/StdPrs/StdPrs_Curve.cxx b/src/StdPrs/StdPrs_Curve.cxx index d32fee6d14..cde1d4ec4d 100644 --- a/src/StdPrs/StdPrs_Curve.cxx +++ b/src/StdPrs/StdPrs_Curve.cxx @@ -18,13 +18,11 @@ // a point and non-infinite lines passing through this point: #include -#include #include #include #include #include #include -#include #include #include #include diff --git a/src/StdPrs/StdPrs_DeflectionCurve.cxx b/src/StdPrs/StdPrs_DeflectionCurve.cxx index bb4a3caf31..4b16d010a4 100644 --- a/src/StdPrs/StdPrs_DeflectionCurve.cxx +++ b/src/StdPrs/StdPrs_DeflectionCurve.cxx @@ -15,17 +15,13 @@ // Great zoom leads to non-coincidence of // a point and non-infinite lines passing through this point: -#include -#include #include -#include #include #include #include #include #include #include -#include #include #include #include diff --git a/src/StdPrs/StdPrs_HLRPolyShape.cxx b/src/StdPrs/StdPrs_HLRPolyShape.cxx index 116b34aa02..ef2de23a70 100644 --- a/src/StdPrs/StdPrs_HLRPolyShape.cxx +++ b/src/StdPrs/StdPrs_HLRPolyShape.cxx @@ -21,16 +21,11 @@ #include #include #include -#include -#include #include #include -#include #include #include #include -#include -#include #include #include diff --git a/src/StdPrs/StdPrs_HLRShape.cxx b/src/StdPrs/StdPrs_HLRShape.cxx index b00d4288f0..8c10e81bcc 100755 --- a/src/StdPrs/StdPrs_HLRShape.cxx +++ b/src/StdPrs/StdPrs_HLRShape.cxx @@ -15,7 +15,6 @@ #include #include -#include #include #include #include diff --git a/src/StdPrs/StdPrs_HLRToolShape.cxx b/src/StdPrs/StdPrs_HLRToolShape.cxx index a61238f228..be3b1a47d0 100644 --- a/src/StdPrs/StdPrs_HLRToolShape.cxx +++ b/src/StdPrs/StdPrs_HLRToolShape.cxx @@ -13,8 +13,6 @@ // commercial license or contractual agreement. -#include -#include #include #include #include diff --git a/src/StdPrs/StdPrs_HLRToolShape.hxx b/src/StdPrs/StdPrs_HLRToolShape.hxx index f4633cd29a..726bb5353a 100644 --- a/src/StdPrs/StdPrs_HLRToolShape.hxx +++ b/src/StdPrs/StdPrs_HLRToolShape.hxx @@ -23,8 +23,6 @@ #include #include -#include -#include class HLRBRep_Data; class TopoDS_Shape; class HLRAlgo_Projector; diff --git a/src/StdPrs/StdPrs_Isolines.cxx b/src/StdPrs/StdPrs_Isolines.cxx index d7f1ef7ffc..ca64927abd 100644 --- a/src/StdPrs/StdPrs_Isolines.cxx +++ b/src/StdPrs/StdPrs_Isolines.cxx @@ -22,13 +22,7 @@ #include #include #include -#include -#include -#include -#include -#include #include -#include #include #include #include diff --git a/src/StdPrs/StdPrs_Isolines.hxx b/src/StdPrs/StdPrs_Isolines.hxx index d3e2cd01fc..c438792533 100644 --- a/src/StdPrs/StdPrs_Isolines.hxx +++ b/src/StdPrs/StdPrs_Isolines.hxx @@ -19,16 +19,10 @@ #include #include #include -#include -#include #include -#include #include -#include #include #include -#include -#include #include class TopLoc_Location; diff --git a/src/StdPrs/StdPrs_Plane.cxx b/src/StdPrs/StdPrs_Plane.cxx index 455cb4471f..40d1bcc7a5 100644 --- a/src/StdPrs/StdPrs_Plane.cxx +++ b/src/StdPrs/StdPrs_Plane.cxx @@ -22,12 +22,8 @@ #include #include #include -#include #include -#include #include -#include -#include #include #include #include diff --git a/src/StdPrs/StdPrs_Point.hxx b/src/StdPrs/StdPrs_Point.hxx index a6270d1af1..12e4efcff8 100755 --- a/src/StdPrs/StdPrs_Point.hxx +++ b/src/StdPrs/StdPrs_Point.hxx @@ -16,8 +16,6 @@ #include #include -#include -#include #include //computes the presentation of objects to be seen as points. typedef Prs3d_Point StdPrs_Point; diff --git a/src/StdPrs/StdPrs_ShadedShape.cxx b/src/StdPrs/StdPrs_ShadedShape.cxx index dde6a7900f..248b11c87c 100644 --- a/src/StdPrs/StdPrs_ShadedShape.cxx +++ b/src/StdPrs/StdPrs_ShadedShape.cxx @@ -16,14 +16,11 @@ #include -#include #include -#include #include #include #include #include -#include #include #include #include @@ -37,7 +34,6 @@ #include #include #include -#include #include #include #include @@ -49,9 +45,6 @@ #include #include #include -#include -#include -#include #include namespace diff --git a/src/StdPrs/StdPrs_ShadedShape.hxx b/src/StdPrs/StdPrs_ShadedShape.hxx index 8ee3103279..18efa638b7 100644 --- a/src/StdPrs/StdPrs_ShadedShape.hxx +++ b/src/StdPrs/StdPrs_ShadedShape.hxx @@ -17,7 +17,6 @@ #ifndef _StdPrs_ShadedShape_HeaderFile #define _StdPrs_ShadedShape_HeaderFile -#include #include #include #include diff --git a/src/StdPrs/StdPrs_ShadedSurface.cxx b/src/StdPrs/StdPrs_ShadedSurface.cxx index b8ef0d5a29..ab0e9dddcb 100644 --- a/src/StdPrs/StdPrs_ShadedSurface.cxx +++ b/src/StdPrs/StdPrs_ShadedSurface.cxx @@ -19,11 +19,9 @@ #include #include #include -#include #include #include #include -#include #include #include #include diff --git a/src/StdPrs/StdPrs_ShapeTool.cxx b/src/StdPrs/StdPrs_ShapeTool.cxx index 12cdf5cfee..c126baa2ba 100644 --- a/src/StdPrs/StdPrs_ShapeTool.cxx +++ b/src/StdPrs/StdPrs_ShapeTool.cxx @@ -16,7 +16,6 @@ #include -#include #include #include #include @@ -30,9 +29,7 @@ #include #include #include -#include #include -#include //======================================================================= //function : StdPrs_ShapeTool diff --git a/src/StdPrs/StdPrs_ShapeTool.hxx b/src/StdPrs/StdPrs_ShapeTool.hxx index 712514fb65..6411fd6d64 100644 --- a/src/StdPrs/StdPrs_ShapeTool.hxx +++ b/src/StdPrs/StdPrs_ShapeTool.hxx @@ -17,12 +17,9 @@ #ifndef _StdPrs_ShapeTool_HeaderFile #define _StdPrs_ShapeTool_HeaderFile -#include #include #include -#include #include -#include #include #include #include diff --git a/src/StdPrs/StdPrs_ToolRFace.cxx b/src/StdPrs/StdPrs_ToolRFace.cxx index 9fe1f54ef3..4f40be4844 100644 --- a/src/StdPrs/StdPrs_ToolRFace.cxx +++ b/src/StdPrs/StdPrs_ToolRFace.cxx @@ -14,7 +14,6 @@ #include -#include #include #include #include diff --git a/src/StdPrs/StdPrs_ToolVertex.hxx b/src/StdPrs/StdPrs_ToolVertex.hxx index ebab5a3f5e..95b26ab35c 100644 --- a/src/StdPrs/StdPrs_ToolVertex.hxx +++ b/src/StdPrs/StdPrs_ToolVertex.hxx @@ -19,7 +19,6 @@ #include #include -#include class TopoDS_Vertex; diff --git a/src/StdPrs/StdPrs_Vertex.hxx b/src/StdPrs/StdPrs_Vertex.hxx index 33eb4b3f49..b9c3b8d29c 100755 --- a/src/StdPrs/StdPrs_Vertex.hxx +++ b/src/StdPrs/StdPrs_Vertex.hxx @@ -15,10 +15,8 @@ #define StdPrs_Vertex_HeaderFile #include -#include #include #include -#include typedef Prs3d_Point StdPrs_Vertex; #endif diff --git a/src/StdPrs/StdPrs_WFDeflectionRestrictedFace.cxx b/src/StdPrs/StdPrs_WFDeflectionRestrictedFace.cxx index 2db50e86d2..4cbe46d26c 100644 --- a/src/StdPrs/StdPrs_WFDeflectionRestrictedFace.cxx +++ b/src/StdPrs/StdPrs_WFDeflectionRestrictedFace.cxx @@ -15,27 +15,19 @@ // commercial license or contractual agreement. -#include #include -#include #include -#include -#include #include #include #include -#include #include #include #include #include -#include -#include #include #include #include #include -#include #include #include #include diff --git a/src/StdPrs/StdPrs_WFDeflectionSurface.cxx b/src/StdPrs/StdPrs_WFDeflectionSurface.cxx index 4209bcf492..e063112371 100644 --- a/src/StdPrs/StdPrs_WFDeflectionSurface.cxx +++ b/src/StdPrs/StdPrs_WFDeflectionSurface.cxx @@ -15,16 +15,12 @@ // commercial license or contractual agreement. -#include #include -#include #include #include #include -#include #include #include -#include #include #include diff --git a/src/StdPrs/StdPrs_WFPoleSurface.cxx b/src/StdPrs/StdPrs_WFPoleSurface.cxx index 5e2e8a0864..1a180a26d1 100644 --- a/src/StdPrs/StdPrs_WFPoleSurface.cxx +++ b/src/StdPrs/StdPrs_WFPoleSurface.cxx @@ -21,7 +21,6 @@ #include #include #include -#include #include #include diff --git a/src/StdPrs/StdPrs_WFRestrictedFace.cxx b/src/StdPrs/StdPrs_WFRestrictedFace.cxx index 1727e6491e..52f176cf91 100755 --- a/src/StdPrs/StdPrs_WFRestrictedFace.cxx +++ b/src/StdPrs/StdPrs_WFRestrictedFace.cxx @@ -13,7 +13,6 @@ #include #include -#include #include #include #include @@ -23,7 +22,6 @@ #include #include #include -#include #include #include #include diff --git a/src/StdPrs/StdPrs_WFRestrictedFace.hxx b/src/StdPrs/StdPrs_WFRestrictedFace.hxx index 9e19a9291e..9b2cbba94d 100755 --- a/src/StdPrs/StdPrs_WFRestrictedFace.hxx +++ b/src/StdPrs/StdPrs_WFRestrictedFace.hxx @@ -16,7 +16,6 @@ #include #include -#include #include #include diff --git a/src/StdPrs/StdPrs_WFShape.cxx b/src/StdPrs/StdPrs_WFShape.cxx index 618e508109..9f281e102c 100644 --- a/src/StdPrs/StdPrs_WFShape.cxx +++ b/src/StdPrs/StdPrs_WFShape.cxx @@ -17,14 +17,10 @@ #include #include -#include -#include #include -#include #include #include #include -#include #include #include #include diff --git a/src/StdPrs/StdPrs_WFShape.hxx b/src/StdPrs/StdPrs_WFShape.hxx index aba08bcae7..694341cb88 100755 --- a/src/StdPrs/StdPrs_WFShape.hxx +++ b/src/StdPrs/StdPrs_WFShape.hxx @@ -21,7 +21,6 @@ #include #include #include -#include #include class Graphic3d_ArrayOfPoints; diff --git a/src/StdPrs/StdPrs_WFSurface.cxx b/src/StdPrs/StdPrs_WFSurface.cxx index a258e39597..d69d2fcfb0 100644 --- a/src/StdPrs/StdPrs_WFSurface.cxx +++ b/src/StdPrs/StdPrs_WFSurface.cxx @@ -15,10 +15,7 @@ // commercial license or contractual agreement. -#include #include -#include -#include #include #include #include @@ -26,17 +23,15 @@ #include #include #include -#include #include #include -#include static void FindLimits(const Handle(Adaptor3d_Surface)& surf , - const Standard_Real aLimit, - Standard_Real& UFirst, - Standard_Real& ULast, - Standard_Real& VFirst, - Standard_Real& VLast) + const Standard_Real aLimit, + Standard_Real& UFirst, + Standard_Real& ULast, + Standard_Real& VFirst, + Standard_Real& VLast) { UFirst = surf->FirstUParameter(); ULast = surf->LastUParameter(); diff --git a/src/StdSelect/StdSelect_BRepOwner.hxx b/src/StdSelect/StdSelect_BRepOwner.hxx index 6030d37c10..e71d0f5491 100644 --- a/src/StdSelect/StdSelect_BRepOwner.hxx +++ b/src/StdSelect/StdSelect_BRepOwner.hxx @@ -18,15 +18,12 @@ #define _StdSelect_BRepOwner_HeaderFile #include -#include #include #include #include #include #include -#include -#include class StdSelect_Shape; class SelectMgr_SelectableObject; class PrsMgr_PresentationManager; diff --git a/src/StdSelect/StdSelect_BRepSelectionTool.cxx b/src/StdSelect/StdSelect_BRepSelectionTool.cxx index c62dc54462..630d328d91 100644 --- a/src/StdSelect/StdSelect_BRepSelectionTool.cxx +++ b/src/StdSelect/StdSelect_BRepSelectionTool.cxx @@ -16,28 +16,23 @@ #include -#include #include #include #include -#include #include #include #include #include #include -#include #include #include #include #include #include -#include #include #include #include #include -#include #include #include #include @@ -47,7 +42,6 @@ #include #include #include -#include #include #include #include diff --git a/src/StdSelect/StdSelect_BRepSelectionTool.hxx b/src/StdSelect/StdSelect_BRepSelectionTool.hxx index 7a762318af..45dd97b5db 100644 --- a/src/StdSelect/StdSelect_BRepSelectionTool.hxx +++ b/src/StdSelect/StdSelect_BRepSelectionTool.hxx @@ -22,7 +22,6 @@ #include #include -#include #include #include #include diff --git a/src/StdSelect/StdSelect_EdgeFilter.cxx b/src/StdSelect/StdSelect_EdgeFilter.cxx index 9cc950728e..14bcbc0883 100644 --- a/src/StdSelect/StdSelect_EdgeFilter.cxx +++ b/src/StdSelect/StdSelect_EdgeFilter.cxx @@ -16,13 +16,11 @@ #include -#include #include #include #include #include #include -#include IMPLEMENT_STANDARD_RTTIEXT(StdSelect_EdgeFilter,SelectMgr_Filter) diff --git a/src/StdSelect/StdSelect_EdgeFilter.hxx b/src/StdSelect/StdSelect_EdgeFilter.hxx index 7116dc9f61..45c16894cd 100644 --- a/src/StdSelect/StdSelect_EdgeFilter.hxx +++ b/src/StdSelect/StdSelect_EdgeFilter.hxx @@ -22,7 +22,6 @@ #include #include -#include #include class SelectMgr_EntityOwner; diff --git a/src/StdSelect/StdSelect_FaceFilter.cxx b/src/StdSelect/StdSelect_FaceFilter.cxx index dd792610c6..ea90c0a380 100644 --- a/src/StdSelect/StdSelect_FaceFilter.cxx +++ b/src/StdSelect/StdSelect_FaceFilter.cxx @@ -16,13 +16,11 @@ #include -#include #include #include #include #include #include -#include #include IMPLEMENT_STANDARD_RTTIEXT(StdSelect_FaceFilter,SelectMgr_Filter) diff --git a/src/StdSelect/StdSelect_FaceFilter.hxx b/src/StdSelect/StdSelect_FaceFilter.hxx index 307aff939a..82c6974ffd 100644 --- a/src/StdSelect/StdSelect_FaceFilter.hxx +++ b/src/StdSelect/StdSelect_FaceFilter.hxx @@ -22,7 +22,6 @@ #include #include -#include #include class SelectMgr_EntityOwner; diff --git a/src/StdSelect/StdSelect_Shape.cxx b/src/StdSelect/StdSelect_Shape.cxx index 09b3d87382..35c0ebb4f5 100644 --- a/src/StdSelect/StdSelect_Shape.cxx +++ b/src/StdSelect/StdSelect_Shape.cxx @@ -21,7 +21,6 @@ #include #include #include -#include #include IMPLEMENT_STANDARD_RTTIEXT(StdSelect_Shape,PrsMgr_PresentableObject) diff --git a/src/StdSelect/StdSelect_Shape.hxx b/src/StdSelect/StdSelect_Shape.hxx index 74ba6c6e15..b059e6f673 100644 --- a/src/StdSelect/StdSelect_Shape.hxx +++ b/src/StdSelect/StdSelect_Shape.hxx @@ -18,7 +18,6 @@ #define _StdSelect_Shape_HeaderFile #include -#include #include diff --git a/src/StdSelect/StdSelect_ShapeTypeFilter.cxx b/src/StdSelect/StdSelect_ShapeTypeFilter.cxx index 28a6bd9310..cc46628284 100644 --- a/src/StdSelect/StdSelect_ShapeTypeFilter.cxx +++ b/src/StdSelect/StdSelect_ShapeTypeFilter.cxx @@ -15,7 +15,6 @@ // commercial license or contractual agreement. -#include #include #include #include diff --git a/src/StdStorage/StdStorage.cxx b/src/StdStorage/StdStorage.cxx index 568397b41a..9707f2d2a8 100644 --- a/src/StdStorage/StdStorage.cxx +++ b/src/StdStorage/StdStorage.cxx @@ -14,7 +14,6 @@ #include #include #include -#include #include #include #include @@ -34,7 +33,6 @@ #include #include -#include #include //======================================================================= diff --git a/src/StdStorage/StdStorage_HSequenceOfRoots.hxx b/src/StdStorage/StdStorage_HSequenceOfRoots.hxx index d457dd77e4..d4a4557103 100644 --- a/src/StdStorage/StdStorage_HSequenceOfRoots.hxx +++ b/src/StdStorage/StdStorage_HSequenceOfRoots.hxx @@ -15,7 +15,6 @@ #ifndef StdStorage_HSequenceOfRoots_HeaderFile #define StdStorage_HSequenceOfRoots_HeaderFile -#include #include #include diff --git a/src/StdStorage/StdStorage_HeaderData.hxx b/src/StdStorage/StdStorage_HeaderData.hxx index 48c3b74e6f..3849495e18 100644 --- a/src/StdStorage/StdStorage_HeaderData.hxx +++ b/src/StdStorage/StdStorage_HeaderData.hxx @@ -18,8 +18,6 @@ #include #include -#include -#include #include #include #include diff --git a/src/StdStorage/StdStorage_MapOfRoots.hxx b/src/StdStorage/StdStorage_MapOfRoots.hxx index ed0cf6d3ab..89401fd5a7 100644 --- a/src/StdStorage/StdStorage_MapOfRoots.hxx +++ b/src/StdStorage/StdStorage_MapOfRoots.hxx @@ -17,8 +17,6 @@ #include #include -#include -#include #include typedef NCollection_IndexedDataMap StdStorage_MapOfRoots; diff --git a/src/StdStorage/StdStorage_MapOfTypes.hxx b/src/StdStorage/StdStorage_MapOfTypes.hxx index 73f39d1bd5..b6acbe346b 100644 --- a/src/StdStorage/StdStorage_MapOfTypes.hxx +++ b/src/StdStorage/StdStorage_MapOfTypes.hxx @@ -19,7 +19,6 @@ #include #include -#include #include typedef NCollection_IndexedDataMap StdStorage_MapOfTypes; diff --git a/src/StdStorage/StdStorage_RootData.cxx b/src/StdStorage/StdStorage_RootData.cxx index 7546cfad48..da01f9dc32 100644 --- a/src/StdStorage/StdStorage_RootData.cxx +++ b/src/StdStorage/StdStorage_RootData.cxx @@ -13,12 +13,10 @@ #include #include -#include #include #include #include #include -#include #include IMPLEMENT_STANDARD_RTTIEXT(StdStorage_RootData, Standard_Transient) diff --git a/src/StdStorage/StdStorage_RootData.hxx b/src/StdStorage/StdStorage_RootData.hxx index 2813f9b9ba..296973e43d 100644 --- a/src/StdStorage/StdStorage_RootData.hxx +++ b/src/StdStorage/StdStorage_RootData.hxx @@ -20,7 +20,6 @@ #include #include #include -#include #include #include #include diff --git a/src/StdStorage/StdStorage_TypeData.cxx b/src/StdStorage/StdStorage_TypeData.cxx index f3ea753df0..037478e5ce 100644 --- a/src/StdStorage/StdStorage_TypeData.cxx +++ b/src/StdStorage/StdStorage_TypeData.cxx @@ -12,7 +12,6 @@ // commercial license or contractual agreement. #include -#include #include #include #include diff --git a/src/StdStorage/StdStorage_TypeData.hxx b/src/StdStorage/StdStorage_TypeData.hxx index 0d73a271de..4f940383a7 100644 --- a/src/StdStorage/StdStorage_TypeData.hxx +++ b/src/StdStorage/StdStorage_TypeData.hxx @@ -22,7 +22,6 @@ #include #include #include -#include #include #include class Storage_BaseDriver; diff --git a/src/StepAP203/StepAP203_CcDesignApproval.cxx b/src/StepAP203/StepAP203_CcDesignApproval.cxx index 0bafbc1312..a72100022d 100644 --- a/src/StepAP203/StepAP203_CcDesignApproval.cxx +++ b/src/StepAP203/StepAP203_CcDesignApproval.cxx @@ -16,7 +16,6 @@ // Generator: ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V1.0 -#include #include #include diff --git a/src/StepAP203/StepAP203_CcDesignApproval.hxx b/src/StepAP203/StepAP203_CcDesignApproval.hxx index 028338ba49..f4c62f71b9 100644 --- a/src/StepAP203/StepAP203_CcDesignApproval.hxx +++ b/src/StepAP203/StepAP203_CcDesignApproval.hxx @@ -18,7 +18,6 @@ #define _StepAP203_CcDesignApproval_HeaderFile #include -#include #include #include diff --git a/src/StepAP203/StepAP203_CcDesignCertification.cxx b/src/StepAP203/StepAP203_CcDesignCertification.cxx index 70ce058036..48c3d77316 100644 --- a/src/StepAP203/StepAP203_CcDesignCertification.cxx +++ b/src/StepAP203/StepAP203_CcDesignCertification.cxx @@ -16,7 +16,6 @@ // Generator: ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V1.0 -#include #include #include diff --git a/src/StepAP203/StepAP203_CcDesignCertification.hxx b/src/StepAP203/StepAP203_CcDesignCertification.hxx index f22e58e092..b7aeed7f39 100644 --- a/src/StepAP203/StepAP203_CcDesignCertification.hxx +++ b/src/StepAP203/StepAP203_CcDesignCertification.hxx @@ -18,7 +18,6 @@ #define _StepAP203_CcDesignCertification_HeaderFile #include -#include #include #include diff --git a/src/StepAP203/StepAP203_CcDesignContract.cxx b/src/StepAP203/StepAP203_CcDesignContract.cxx index 054f6cb91b..25c115f25c 100644 --- a/src/StepAP203/StepAP203_CcDesignContract.cxx +++ b/src/StepAP203/StepAP203_CcDesignContract.cxx @@ -16,7 +16,6 @@ // Generator: ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V1.0 -#include #include #include diff --git a/src/StepAP203/StepAP203_CcDesignContract.hxx b/src/StepAP203/StepAP203_CcDesignContract.hxx index dead6a7813..a27f290904 100644 --- a/src/StepAP203/StepAP203_CcDesignContract.hxx +++ b/src/StepAP203/StepAP203_CcDesignContract.hxx @@ -18,7 +18,6 @@ #define _StepAP203_CcDesignContract_HeaderFile #include -#include #include #include diff --git a/src/StepAP203/StepAP203_CcDesignDateAndTimeAssignment.cxx b/src/StepAP203/StepAP203_CcDesignDateAndTimeAssignment.cxx index 8ec254ddcc..3faf748fdd 100644 --- a/src/StepAP203/StepAP203_CcDesignDateAndTimeAssignment.cxx +++ b/src/StepAP203/StepAP203_CcDesignDateAndTimeAssignment.cxx @@ -16,7 +16,6 @@ // Generator: ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V1.0 -#include #include #include #include diff --git a/src/StepAP203/StepAP203_CcDesignDateAndTimeAssignment.hxx b/src/StepAP203/StepAP203_CcDesignDateAndTimeAssignment.hxx index 5c8aafffd6..3859d55720 100644 --- a/src/StepAP203/StepAP203_CcDesignDateAndTimeAssignment.hxx +++ b/src/StepAP203/StepAP203_CcDesignDateAndTimeAssignment.hxx @@ -18,7 +18,6 @@ #define _StepAP203_CcDesignDateAndTimeAssignment_HeaderFile #include -#include #include #include diff --git a/src/StepAP203/StepAP203_CcDesignPersonAndOrganizationAssignment.cxx b/src/StepAP203/StepAP203_CcDesignPersonAndOrganizationAssignment.cxx index c6014be61b..969a9870b1 100644 --- a/src/StepAP203/StepAP203_CcDesignPersonAndOrganizationAssignment.cxx +++ b/src/StepAP203/StepAP203_CcDesignPersonAndOrganizationAssignment.cxx @@ -16,7 +16,6 @@ // Generator: ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V1.0 -#include #include #include #include diff --git a/src/StepAP203/StepAP203_CcDesignPersonAndOrganizationAssignment.hxx b/src/StepAP203/StepAP203_CcDesignPersonAndOrganizationAssignment.hxx index 01f1464504..9d02adaeeb 100644 --- a/src/StepAP203/StepAP203_CcDesignPersonAndOrganizationAssignment.hxx +++ b/src/StepAP203/StepAP203_CcDesignPersonAndOrganizationAssignment.hxx @@ -18,7 +18,6 @@ #define _StepAP203_CcDesignPersonAndOrganizationAssignment_HeaderFile #include -#include #include #include diff --git a/src/StepAP203/StepAP203_CcDesignSecurityClassification.cxx b/src/StepAP203/StepAP203_CcDesignSecurityClassification.cxx index d6d61a900f..4dc6493e58 100644 --- a/src/StepAP203/StepAP203_CcDesignSecurityClassification.cxx +++ b/src/StepAP203/StepAP203_CcDesignSecurityClassification.cxx @@ -16,7 +16,6 @@ // Generator: ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V1.0 -#include #include #include diff --git a/src/StepAP203/StepAP203_CcDesignSecurityClassification.hxx b/src/StepAP203/StepAP203_CcDesignSecurityClassification.hxx index fa2b33f40b..6f8fb49667 100644 --- a/src/StepAP203/StepAP203_CcDesignSecurityClassification.hxx +++ b/src/StepAP203/StepAP203_CcDesignSecurityClassification.hxx @@ -18,7 +18,6 @@ #define _StepAP203_CcDesignSecurityClassification_HeaderFile #include -#include #include #include diff --git a/src/StepAP203/StepAP203_CcDesignSpecificationReference.cxx b/src/StepAP203/StepAP203_CcDesignSpecificationReference.cxx index 4f8d11f2a1..2cf00f16ce 100644 --- a/src/StepAP203/StepAP203_CcDesignSpecificationReference.cxx +++ b/src/StepAP203/StepAP203_CcDesignSpecificationReference.cxx @@ -16,7 +16,6 @@ // Generator: ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V1.0 -#include #include #include #include diff --git a/src/StepAP203/StepAP203_CcDesignSpecificationReference.hxx b/src/StepAP203/StepAP203_CcDesignSpecificationReference.hxx index 713329bed2..222581b8de 100644 --- a/src/StepAP203/StepAP203_CcDesignSpecificationReference.hxx +++ b/src/StepAP203/StepAP203_CcDesignSpecificationReference.hxx @@ -18,7 +18,6 @@ #define _StepAP203_CcDesignSpecificationReference_HeaderFile #include -#include #include #include diff --git a/src/StepAP203/StepAP203_Change.cxx b/src/StepAP203/StepAP203_Change.cxx index 3115d056f7..7668af8747 100644 --- a/src/StepAP203/StepAP203_Change.cxx +++ b/src/StepAP203/StepAP203_Change.cxx @@ -16,7 +16,6 @@ // Generator: ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V1.0 -#include #include #include diff --git a/src/StepAP203/StepAP203_Change.hxx b/src/StepAP203/StepAP203_Change.hxx index 99307bc834..bd2304a845 100644 --- a/src/StepAP203/StepAP203_Change.hxx +++ b/src/StepAP203/StepAP203_Change.hxx @@ -18,7 +18,6 @@ #define _StepAP203_Change_HeaderFile #include -#include #include #include diff --git a/src/StepAP203/StepAP203_ChangeRequest.cxx b/src/StepAP203/StepAP203_ChangeRequest.cxx index 56696dbe7e..a8984982b3 100644 --- a/src/StepAP203/StepAP203_ChangeRequest.cxx +++ b/src/StepAP203/StepAP203_ChangeRequest.cxx @@ -16,7 +16,6 @@ // Generator: ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V1.0 -#include #include #include diff --git a/src/StepAP203/StepAP203_ChangeRequest.hxx b/src/StepAP203/StepAP203_ChangeRequest.hxx index aa640e14a3..4603df1b2d 100644 --- a/src/StepAP203/StepAP203_ChangeRequest.hxx +++ b/src/StepAP203/StepAP203_ChangeRequest.hxx @@ -18,7 +18,6 @@ #define _StepAP203_ChangeRequest_HeaderFile #include -#include #include #include diff --git a/src/StepAP203/StepAP203_HArray1OfApprovedItem.hxx b/src/StepAP203/StepAP203_HArray1OfApprovedItem.hxx index 7b7fa50ffc..43cd704004 100644 --- a/src/StepAP203/StepAP203_HArray1OfApprovedItem.hxx +++ b/src/StepAP203/StepAP203_HArray1OfApprovedItem.hxx @@ -17,7 +17,6 @@ #ifndef StepAP203_HArray1OfApprovedItem_HeaderFile #define StepAP203_HArray1OfApprovedItem_HeaderFile -#include #include #include diff --git a/src/StepAP203/StepAP203_HArray1OfCertifiedItem.hxx b/src/StepAP203/StepAP203_HArray1OfCertifiedItem.hxx index 50cc5b5646..85cbfc48ec 100644 --- a/src/StepAP203/StepAP203_HArray1OfCertifiedItem.hxx +++ b/src/StepAP203/StepAP203_HArray1OfCertifiedItem.hxx @@ -17,7 +17,6 @@ #ifndef StepAP203_HArray1OfCertifiedItem_HeaderFile #define StepAP203_HArray1OfCertifiedItem_HeaderFile -#include #include #include diff --git a/src/StepAP203/StepAP203_HArray1OfChangeRequestItem.hxx b/src/StepAP203/StepAP203_HArray1OfChangeRequestItem.hxx index e36a57240b..21896af69f 100644 --- a/src/StepAP203/StepAP203_HArray1OfChangeRequestItem.hxx +++ b/src/StepAP203/StepAP203_HArray1OfChangeRequestItem.hxx @@ -17,7 +17,6 @@ #ifndef StepAP203_HArray1OfChangeRequestItem_HeaderFile #define StepAP203_HArray1OfChangeRequestItem_HeaderFile -#include #include #include diff --git a/src/StepAP203/StepAP203_HArray1OfClassifiedItem.hxx b/src/StepAP203/StepAP203_HArray1OfClassifiedItem.hxx index 94511d08c0..d47fcb094b 100644 --- a/src/StepAP203/StepAP203_HArray1OfClassifiedItem.hxx +++ b/src/StepAP203/StepAP203_HArray1OfClassifiedItem.hxx @@ -17,7 +17,6 @@ #ifndef StepAP203_HArray1OfClassifiedItem_HeaderFile #define StepAP203_HArray1OfClassifiedItem_HeaderFile -#include #include #include diff --git a/src/StepAP203/StepAP203_HArray1OfContractedItem.hxx b/src/StepAP203/StepAP203_HArray1OfContractedItem.hxx index ba525dc57b..016804589c 100644 --- a/src/StepAP203/StepAP203_HArray1OfContractedItem.hxx +++ b/src/StepAP203/StepAP203_HArray1OfContractedItem.hxx @@ -17,7 +17,6 @@ #ifndef StepAP203_HArray1OfContractedItem_HeaderFile #define StepAP203_HArray1OfContractedItem_HeaderFile -#include #include #include diff --git a/src/StepAP203/StepAP203_HArray1OfDateTimeItem.hxx b/src/StepAP203/StepAP203_HArray1OfDateTimeItem.hxx index 52f37a4dfe..3b74ad140c 100644 --- a/src/StepAP203/StepAP203_HArray1OfDateTimeItem.hxx +++ b/src/StepAP203/StepAP203_HArray1OfDateTimeItem.hxx @@ -17,7 +17,6 @@ #ifndef StepAP203_HArray1OfDateTimeItem_HeaderFile #define StepAP203_HArray1OfDateTimeItem_HeaderFile -#include #include #include diff --git a/src/StepAP203/StepAP203_HArray1OfPersonOrganizationItem.hxx b/src/StepAP203/StepAP203_HArray1OfPersonOrganizationItem.hxx index a0be656cf8..416cdf0266 100644 --- a/src/StepAP203/StepAP203_HArray1OfPersonOrganizationItem.hxx +++ b/src/StepAP203/StepAP203_HArray1OfPersonOrganizationItem.hxx @@ -17,7 +17,6 @@ #ifndef StepAP203_HArray1OfPersonOrganizationItem_HeaderFile #define StepAP203_HArray1OfPersonOrganizationItem_HeaderFile -#include #include #include diff --git a/src/StepAP203/StepAP203_HArray1OfSpecifiedItem.hxx b/src/StepAP203/StepAP203_HArray1OfSpecifiedItem.hxx index 927dc01b4f..f80613934a 100644 --- a/src/StepAP203/StepAP203_HArray1OfSpecifiedItem.hxx +++ b/src/StepAP203/StepAP203_HArray1OfSpecifiedItem.hxx @@ -17,7 +17,6 @@ #ifndef StepAP203_HArray1OfSpecifiedItem_HeaderFile #define StepAP203_HArray1OfSpecifiedItem_HeaderFile -#include #include #include diff --git a/src/StepAP203/StepAP203_HArray1OfStartRequestItem.hxx b/src/StepAP203/StepAP203_HArray1OfStartRequestItem.hxx index 738d38d9be..f1f6b98918 100644 --- a/src/StepAP203/StepAP203_HArray1OfStartRequestItem.hxx +++ b/src/StepAP203/StepAP203_HArray1OfStartRequestItem.hxx @@ -17,7 +17,6 @@ #ifndef StepAP203_HArray1OfStartRequestItem_HeaderFile #define StepAP203_HArray1OfStartRequestItem_HeaderFile -#include #include #include diff --git a/src/StepAP203/StepAP203_HArray1OfWorkItem.hxx b/src/StepAP203/StepAP203_HArray1OfWorkItem.hxx index 825a843513..4e836971c0 100644 --- a/src/StepAP203/StepAP203_HArray1OfWorkItem.hxx +++ b/src/StepAP203/StepAP203_HArray1OfWorkItem.hxx @@ -17,7 +17,6 @@ #ifndef StepAP203_HArray1OfWorkItem_HeaderFile #define StepAP203_HArray1OfWorkItem_HeaderFile -#include #include #include diff --git a/src/StepAP203/StepAP203_StartRequest.cxx b/src/StepAP203/StepAP203_StartRequest.cxx index 43a0bb41ca..ffa67edbbe 100644 --- a/src/StepAP203/StepAP203_StartRequest.cxx +++ b/src/StepAP203/StepAP203_StartRequest.cxx @@ -16,7 +16,6 @@ // Generator: ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V1.0 -#include #include #include diff --git a/src/StepAP203/StepAP203_StartRequest.hxx b/src/StepAP203/StepAP203_StartRequest.hxx index 5c8f08af4d..e02f3fa33a 100644 --- a/src/StepAP203/StepAP203_StartRequest.hxx +++ b/src/StepAP203/StepAP203_StartRequest.hxx @@ -18,7 +18,6 @@ #define _StepAP203_StartRequest_HeaderFile #include -#include #include #include diff --git a/src/StepAP203/StepAP203_StartWork.cxx b/src/StepAP203/StepAP203_StartWork.cxx index 3ec36c9bcb..4f2a6eea43 100644 --- a/src/StepAP203/StepAP203_StartWork.cxx +++ b/src/StepAP203/StepAP203_StartWork.cxx @@ -16,7 +16,6 @@ // Generator: ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V1.0 -#include #include #include diff --git a/src/StepAP203/StepAP203_StartWork.hxx b/src/StepAP203/StepAP203_StartWork.hxx index 32956b6c15..c43dcc9c89 100644 --- a/src/StepAP203/StepAP203_StartWork.hxx +++ b/src/StepAP203/StepAP203_StartWork.hxx @@ -18,7 +18,6 @@ #define _StepAP203_StartWork_HeaderFile #include -#include #include #include diff --git a/src/StepAP209/StepAP209_Construct.cxx b/src/StepAP209/StepAP209_Construct.cxx index efe90edeea..c189307ce5 100644 --- a/src/StepAP209/StepAP209_Construct.cxx +++ b/src/StepAP209/StepAP209_Construct.cxx @@ -54,10 +54,6 @@ #include #include #include -#include -#include -#include -#include #include #include #include @@ -65,8 +61,6 @@ #include #include #include -#include -#include #include #include #include @@ -82,14 +76,12 @@ #include #include #include -#include #include #include #include #include #include #include -#include #include #include #include @@ -99,7 +91,6 @@ #include #include #include -#include #include #include #include diff --git a/src/StepAP209/StepAP209_Construct.hxx b/src/StepAP209/StepAP209_Construct.hxx index a0397d206c..e948c74ea5 100644 --- a/src/StepAP209/StepAP209_Construct.hxx +++ b/src/StepAP209/StepAP209_Construct.hxx @@ -21,7 +21,6 @@ #include #include -#include #include #include #include diff --git a/src/StepAP214/StepAP214_AppliedApprovalAssignment.cxx b/src/StepAP214/StepAP214_AppliedApprovalAssignment.cxx index 4ac9e6ac47..246efc2573 100644 --- a/src/StepAP214/StepAP214_AppliedApprovalAssignment.cxx +++ b/src/StepAP214/StepAP214_AppliedApprovalAssignment.cxx @@ -12,7 +12,6 @@ // commercial license or contractual agreement. -#include #include #include #include diff --git a/src/StepAP214/StepAP214_AppliedApprovalAssignment.hxx b/src/StepAP214/StepAP214_AppliedApprovalAssignment.hxx index 87550175ec..7b6679c456 100644 --- a/src/StepAP214/StepAP214_AppliedApprovalAssignment.hxx +++ b/src/StepAP214/StepAP214_AppliedApprovalAssignment.hxx @@ -18,7 +18,6 @@ #define _StepAP214_AppliedApprovalAssignment_HeaderFile #include -#include #include #include diff --git a/src/StepAP214/StepAP214_AppliedDateAndTimeAssignment.cxx b/src/StepAP214/StepAP214_AppliedDateAndTimeAssignment.cxx index dfe7e5c0b9..11422640d2 100644 --- a/src/StepAP214/StepAP214_AppliedDateAndTimeAssignment.cxx +++ b/src/StepAP214/StepAP214_AppliedDateAndTimeAssignment.cxx @@ -12,7 +12,6 @@ // commercial license or contractual agreement. -#include #include #include #include diff --git a/src/StepAP214/StepAP214_AppliedDateAndTimeAssignment.hxx b/src/StepAP214/StepAP214_AppliedDateAndTimeAssignment.hxx index 49b642fc11..3afab173e3 100644 --- a/src/StepAP214/StepAP214_AppliedDateAndTimeAssignment.hxx +++ b/src/StepAP214/StepAP214_AppliedDateAndTimeAssignment.hxx @@ -18,7 +18,6 @@ #define _StepAP214_AppliedDateAndTimeAssignment_HeaderFile #include -#include #include #include diff --git a/src/StepAP214/StepAP214_AppliedDateAssignment.cxx b/src/StepAP214/StepAP214_AppliedDateAssignment.cxx index 636a3ef4ed..cae53949ff 100644 --- a/src/StepAP214/StepAP214_AppliedDateAssignment.cxx +++ b/src/StepAP214/StepAP214_AppliedDateAssignment.cxx @@ -12,7 +12,6 @@ // commercial license or contractual agreement. -#include #include #include #include diff --git a/src/StepAP214/StepAP214_AppliedDateAssignment.hxx b/src/StepAP214/StepAP214_AppliedDateAssignment.hxx index fd7c7b7d83..957efdaef8 100644 --- a/src/StepAP214/StepAP214_AppliedDateAssignment.hxx +++ b/src/StepAP214/StepAP214_AppliedDateAssignment.hxx @@ -18,7 +18,6 @@ #define _StepAP214_AppliedDateAssignment_HeaderFile #include -#include #include #include diff --git a/src/StepAP214/StepAP214_AppliedDocumentReference.cxx b/src/StepAP214/StepAP214_AppliedDocumentReference.cxx index c9b341639c..c92054f4e3 100644 --- a/src/StepAP214/StepAP214_AppliedDocumentReference.cxx +++ b/src/StepAP214/StepAP214_AppliedDocumentReference.cxx @@ -12,7 +12,6 @@ // commercial license or contractual agreement. -#include #include #include #include diff --git a/src/StepAP214/StepAP214_AppliedDocumentReference.hxx b/src/StepAP214/StepAP214_AppliedDocumentReference.hxx index 7ab8ded142..944c39d602 100644 --- a/src/StepAP214/StepAP214_AppliedDocumentReference.hxx +++ b/src/StepAP214/StepAP214_AppliedDocumentReference.hxx @@ -18,7 +18,6 @@ #define _StepAP214_AppliedDocumentReference_HeaderFile #include -#include #include #include diff --git a/src/StepAP214/StepAP214_AppliedExternalIdentificationAssignment.cxx b/src/StepAP214/StepAP214_AppliedExternalIdentificationAssignment.cxx index aec2e166ec..5451d81ec8 100644 --- a/src/StepAP214/StepAP214_AppliedExternalIdentificationAssignment.cxx +++ b/src/StepAP214/StepAP214_AppliedExternalIdentificationAssignment.cxx @@ -15,7 +15,6 @@ // Generator: ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V1.1 -#include #include #include #include diff --git a/src/StepAP214/StepAP214_AppliedExternalIdentificationAssignment.hxx b/src/StepAP214/StepAP214_AppliedExternalIdentificationAssignment.hxx index 8c043f05a9..03cf166490 100644 --- a/src/StepAP214/StepAP214_AppliedExternalIdentificationAssignment.hxx +++ b/src/StepAP214/StepAP214_AppliedExternalIdentificationAssignment.hxx @@ -17,7 +17,6 @@ #define _StepAP214_AppliedExternalIdentificationAssignment_HeaderFile #include -#include #include #include diff --git a/src/StepAP214/StepAP214_AppliedGroupAssignment.cxx b/src/StepAP214/StepAP214_AppliedGroupAssignment.cxx index 223072b209..f9db0acb1c 100644 --- a/src/StepAP214/StepAP214_AppliedGroupAssignment.cxx +++ b/src/StepAP214/StepAP214_AppliedGroupAssignment.cxx @@ -15,7 +15,6 @@ // Generator: ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V1.1 -#include #include #include diff --git a/src/StepAP214/StepAP214_AppliedGroupAssignment.hxx b/src/StepAP214/StepAP214_AppliedGroupAssignment.hxx index 4f10bada48..524ff43861 100644 --- a/src/StepAP214/StepAP214_AppliedGroupAssignment.hxx +++ b/src/StepAP214/StepAP214_AppliedGroupAssignment.hxx @@ -17,7 +17,6 @@ #define _StepAP214_AppliedGroupAssignment_HeaderFile #include -#include #include #include diff --git a/src/StepAP214/StepAP214_AppliedOrganizationAssignment.cxx b/src/StepAP214/StepAP214_AppliedOrganizationAssignment.cxx index 35af2941ff..47afbcfd0e 100644 --- a/src/StepAP214/StepAP214_AppliedOrganizationAssignment.cxx +++ b/src/StepAP214/StepAP214_AppliedOrganizationAssignment.cxx @@ -12,7 +12,6 @@ // commercial license or contractual agreement. -#include #include #include #include diff --git a/src/StepAP214/StepAP214_AppliedOrganizationAssignment.hxx b/src/StepAP214/StepAP214_AppliedOrganizationAssignment.hxx index 42798b1f55..8b0137c094 100644 --- a/src/StepAP214/StepAP214_AppliedOrganizationAssignment.hxx +++ b/src/StepAP214/StepAP214_AppliedOrganizationAssignment.hxx @@ -18,7 +18,6 @@ #define _StepAP214_AppliedOrganizationAssignment_HeaderFile #include -#include #include #include diff --git a/src/StepAP214/StepAP214_AppliedPersonAndOrganizationAssignment.cxx b/src/StepAP214/StepAP214_AppliedPersonAndOrganizationAssignment.cxx index 3a6b8f7e61..67bc4b862f 100644 --- a/src/StepAP214/StepAP214_AppliedPersonAndOrganizationAssignment.cxx +++ b/src/StepAP214/StepAP214_AppliedPersonAndOrganizationAssignment.cxx @@ -12,7 +12,6 @@ // commercial license or contractual agreement. -#include #include #include #include diff --git a/src/StepAP214/StepAP214_AppliedPersonAndOrganizationAssignment.hxx b/src/StepAP214/StepAP214_AppliedPersonAndOrganizationAssignment.hxx index f31206f9cb..207f8c40b4 100644 --- a/src/StepAP214/StepAP214_AppliedPersonAndOrganizationAssignment.hxx +++ b/src/StepAP214/StepAP214_AppliedPersonAndOrganizationAssignment.hxx @@ -18,7 +18,6 @@ #define _StepAP214_AppliedPersonAndOrganizationAssignment_HeaderFile #include -#include #include #include diff --git a/src/StepAP214/StepAP214_AppliedPresentedItem.cxx b/src/StepAP214/StepAP214_AppliedPresentedItem.cxx index af6e2c4bda..036946fb1b 100644 --- a/src/StepAP214/StepAP214_AppliedPresentedItem.cxx +++ b/src/StepAP214/StepAP214_AppliedPresentedItem.cxx @@ -12,7 +12,6 @@ // commercial license or contractual agreement. -#include #include #include diff --git a/src/StepAP214/StepAP214_AppliedPresentedItem.hxx b/src/StepAP214/StepAP214_AppliedPresentedItem.hxx index ae0f6b6591..b4bbd6f939 100644 --- a/src/StepAP214/StepAP214_AppliedPresentedItem.hxx +++ b/src/StepAP214/StepAP214_AppliedPresentedItem.hxx @@ -18,7 +18,6 @@ #define _StepAP214_AppliedPresentedItem_HeaderFile #include -#include #include #include diff --git a/src/StepAP214/StepAP214_AppliedSecurityClassificationAssignment.cxx b/src/StepAP214/StepAP214_AppliedSecurityClassificationAssignment.cxx index b622a65eec..d7796c59b0 100644 --- a/src/StepAP214/StepAP214_AppliedSecurityClassificationAssignment.cxx +++ b/src/StepAP214/StepAP214_AppliedSecurityClassificationAssignment.cxx @@ -12,7 +12,6 @@ // commercial license or contractual agreement. -#include #include #include #include diff --git a/src/StepAP214/StepAP214_AppliedSecurityClassificationAssignment.hxx b/src/StepAP214/StepAP214_AppliedSecurityClassificationAssignment.hxx index 3c9e337fc0..89b396cc65 100644 --- a/src/StepAP214/StepAP214_AppliedSecurityClassificationAssignment.hxx +++ b/src/StepAP214/StepAP214_AppliedSecurityClassificationAssignment.hxx @@ -18,7 +18,6 @@ #define _StepAP214_AppliedSecurityClassificationAssignment_HeaderFile #include -#include #include #include diff --git a/src/StepAP214/StepAP214_ApprovalItem.cxx b/src/StepAP214/StepAP214_ApprovalItem.cxx index 08bd0968ba..df20d20a1b 100644 --- a/src/StepAP214/StepAP214_ApprovalItem.cxx +++ b/src/StepAP214/StepAP214_ApprovalItem.cxx @@ -16,7 +16,6 @@ #include #include #include -#include #include #include #include @@ -31,7 +30,6 @@ #include #include #include -#include #include #include #include diff --git a/src/StepAP214/StepAP214_AutoDesignActualDateAndTimeAssignment.cxx b/src/StepAP214/StepAP214_AutoDesignActualDateAndTimeAssignment.cxx index cc423d9956..a8714c40c0 100644 --- a/src/StepAP214/StepAP214_AutoDesignActualDateAndTimeAssignment.cxx +++ b/src/StepAP214/StepAP214_AutoDesignActualDateAndTimeAssignment.cxx @@ -12,7 +12,6 @@ // commercial license or contractual agreement. -#include #include #include #include diff --git a/src/StepAP214/StepAP214_AutoDesignActualDateAndTimeAssignment.hxx b/src/StepAP214/StepAP214_AutoDesignActualDateAndTimeAssignment.hxx index 2550418891..15d3fab68d 100644 --- a/src/StepAP214/StepAP214_AutoDesignActualDateAndTimeAssignment.hxx +++ b/src/StepAP214/StepAP214_AutoDesignActualDateAndTimeAssignment.hxx @@ -18,7 +18,6 @@ #define _StepAP214_AutoDesignActualDateAndTimeAssignment_HeaderFile #include -#include #include #include diff --git a/src/StepAP214/StepAP214_AutoDesignActualDateAssignment.cxx b/src/StepAP214/StepAP214_AutoDesignActualDateAssignment.cxx index 3d1e251ed6..be4ecc66ff 100644 --- a/src/StepAP214/StepAP214_AutoDesignActualDateAssignment.cxx +++ b/src/StepAP214/StepAP214_AutoDesignActualDateAssignment.cxx @@ -12,7 +12,6 @@ // commercial license or contractual agreement. -#include #include #include #include diff --git a/src/StepAP214/StepAP214_AutoDesignActualDateAssignment.hxx b/src/StepAP214/StepAP214_AutoDesignActualDateAssignment.hxx index f87be083d0..70b3f948b6 100644 --- a/src/StepAP214/StepAP214_AutoDesignActualDateAssignment.hxx +++ b/src/StepAP214/StepAP214_AutoDesignActualDateAssignment.hxx @@ -18,7 +18,6 @@ #define _StepAP214_AutoDesignActualDateAssignment_HeaderFile #include -#include #include #include diff --git a/src/StepAP214/StepAP214_AutoDesignApprovalAssignment.cxx b/src/StepAP214/StepAP214_AutoDesignApprovalAssignment.cxx index 97bd81c4e0..c45a728dff 100644 --- a/src/StepAP214/StepAP214_AutoDesignApprovalAssignment.cxx +++ b/src/StepAP214/StepAP214_AutoDesignApprovalAssignment.cxx @@ -12,7 +12,6 @@ // commercial license or contractual agreement. -#include #include #include #include diff --git a/src/StepAP214/StepAP214_AutoDesignApprovalAssignment.hxx b/src/StepAP214/StepAP214_AutoDesignApprovalAssignment.hxx index 370f37494b..68a95ea7e4 100644 --- a/src/StepAP214/StepAP214_AutoDesignApprovalAssignment.hxx +++ b/src/StepAP214/StepAP214_AutoDesignApprovalAssignment.hxx @@ -18,7 +18,6 @@ #define _StepAP214_AutoDesignApprovalAssignment_HeaderFile #include -#include #include #include diff --git a/src/StepAP214/StepAP214_AutoDesignDateAndPersonAssignment.cxx b/src/StepAP214/StepAP214_AutoDesignDateAndPersonAssignment.cxx index 292f0a075c..c7923b9030 100644 --- a/src/StepAP214/StepAP214_AutoDesignDateAndPersonAssignment.cxx +++ b/src/StepAP214/StepAP214_AutoDesignDateAndPersonAssignment.cxx @@ -12,7 +12,6 @@ // commercial license or contractual agreement. -#include #include #include #include diff --git a/src/StepAP214/StepAP214_AutoDesignDateAndPersonAssignment.hxx b/src/StepAP214/StepAP214_AutoDesignDateAndPersonAssignment.hxx index 8089d9cdf8..851bf8309b 100644 --- a/src/StepAP214/StepAP214_AutoDesignDateAndPersonAssignment.hxx +++ b/src/StepAP214/StepAP214_AutoDesignDateAndPersonAssignment.hxx @@ -18,7 +18,6 @@ #define _StepAP214_AutoDesignDateAndPersonAssignment_HeaderFile #include -#include #include #include diff --git a/src/StepAP214/StepAP214_AutoDesignDateAndPersonItem.cxx b/src/StepAP214/StepAP214_AutoDesignDateAndPersonItem.cxx index 1201ba340a..f05b74ce15 100644 --- a/src/StepAP214/StepAP214_AutoDesignDateAndPersonItem.cxx +++ b/src/StepAP214/StepAP214_AutoDesignDateAndPersonItem.cxx @@ -18,7 +18,6 @@ #include #include #include -#include #include #include #include diff --git a/src/StepAP214/StepAP214_AutoDesignDocumentReference.cxx b/src/StepAP214/StepAP214_AutoDesignDocumentReference.cxx index 8f505e97fe..aa8895066d 100644 --- a/src/StepAP214/StepAP214_AutoDesignDocumentReference.cxx +++ b/src/StepAP214/StepAP214_AutoDesignDocumentReference.cxx @@ -12,7 +12,6 @@ // commercial license or contractual agreement. -#include #include #include #include diff --git a/src/StepAP214/StepAP214_AutoDesignDocumentReference.hxx b/src/StepAP214/StepAP214_AutoDesignDocumentReference.hxx index 53e9a922ef..5595544b6e 100644 --- a/src/StepAP214/StepAP214_AutoDesignDocumentReference.hxx +++ b/src/StepAP214/StepAP214_AutoDesignDocumentReference.hxx @@ -18,7 +18,6 @@ #define _StepAP214_AutoDesignDocumentReference_HeaderFile #include -#include #include #include diff --git a/src/StepAP214/StepAP214_AutoDesignGeneralOrgItem.cxx b/src/StepAP214/StepAP214_AutoDesignGeneralOrgItem.cxx index 97c4ebc0eb..f4d12865a7 100644 --- a/src/StepAP214/StepAP214_AutoDesignGeneralOrgItem.cxx +++ b/src/StepAP214/StepAP214_AutoDesignGeneralOrgItem.cxx @@ -17,7 +17,6 @@ #include #include #include -#include #include #include #include diff --git a/src/StepAP214/StepAP214_AutoDesignGroupAssignment.cxx b/src/StepAP214/StepAP214_AutoDesignGroupAssignment.cxx index 250f450818..f9d897b30d 100644 --- a/src/StepAP214/StepAP214_AutoDesignGroupAssignment.cxx +++ b/src/StepAP214/StepAP214_AutoDesignGroupAssignment.cxx @@ -12,7 +12,6 @@ // commercial license or contractual agreement. -#include #include #include #include diff --git a/src/StepAP214/StepAP214_AutoDesignGroupAssignment.hxx b/src/StepAP214/StepAP214_AutoDesignGroupAssignment.hxx index a4cdbd33be..39dc6df7e7 100644 --- a/src/StepAP214/StepAP214_AutoDesignGroupAssignment.hxx +++ b/src/StepAP214/StepAP214_AutoDesignGroupAssignment.hxx @@ -18,7 +18,6 @@ #define _StepAP214_AutoDesignGroupAssignment_HeaderFile #include -#include #include #include diff --git a/src/StepAP214/StepAP214_AutoDesignGroupedItem.cxx b/src/StepAP214/StepAP214_AutoDesignGroupedItem.cxx index 0e7c81b46c..e7a6ccd7c4 100644 --- a/src/StepAP214/StepAP214_AutoDesignGroupedItem.cxx +++ b/src/StepAP214/StepAP214_AutoDesignGroupedItem.cxx @@ -15,7 +15,6 @@ #include #include #include -#include #include #include #include diff --git a/src/StepAP214/StepAP214_AutoDesignNominalDateAndTimeAssignment.cxx b/src/StepAP214/StepAP214_AutoDesignNominalDateAndTimeAssignment.cxx index fe66d605bb..4fc4f0576c 100644 --- a/src/StepAP214/StepAP214_AutoDesignNominalDateAndTimeAssignment.cxx +++ b/src/StepAP214/StepAP214_AutoDesignNominalDateAndTimeAssignment.cxx @@ -12,8 +12,6 @@ // commercial license or contractual agreement. -#include -#include #include #include #include diff --git a/src/StepAP214/StepAP214_AutoDesignNominalDateAndTimeAssignment.hxx b/src/StepAP214/StepAP214_AutoDesignNominalDateAndTimeAssignment.hxx index c9c01878c5..a957df0126 100644 --- a/src/StepAP214/StepAP214_AutoDesignNominalDateAndTimeAssignment.hxx +++ b/src/StepAP214/StepAP214_AutoDesignNominalDateAndTimeAssignment.hxx @@ -18,7 +18,6 @@ #define _StepAP214_AutoDesignNominalDateAndTimeAssignment_HeaderFile #include -#include #include #include diff --git a/src/StepAP214/StepAP214_AutoDesignNominalDateAssignment.cxx b/src/StepAP214/StepAP214_AutoDesignNominalDateAssignment.cxx index 4f8a079c0e..acb4943852 100644 --- a/src/StepAP214/StepAP214_AutoDesignNominalDateAssignment.cxx +++ b/src/StepAP214/StepAP214_AutoDesignNominalDateAssignment.cxx @@ -12,8 +12,6 @@ // commercial license or contractual agreement. -#include -#include #include #include #include diff --git a/src/StepAP214/StepAP214_AutoDesignNominalDateAssignment.hxx b/src/StepAP214/StepAP214_AutoDesignNominalDateAssignment.hxx index 34eb0ff581..6381f6497d 100644 --- a/src/StepAP214/StepAP214_AutoDesignNominalDateAssignment.hxx +++ b/src/StepAP214/StepAP214_AutoDesignNominalDateAssignment.hxx @@ -18,7 +18,6 @@ #define _StepAP214_AutoDesignNominalDateAssignment_HeaderFile #include -#include #include #include diff --git a/src/StepAP214/StepAP214_AutoDesignOrganizationAssignment.cxx b/src/StepAP214/StepAP214_AutoDesignOrganizationAssignment.cxx index 2c4f11fd5f..39ed351df0 100644 --- a/src/StepAP214/StepAP214_AutoDesignOrganizationAssignment.cxx +++ b/src/StepAP214/StepAP214_AutoDesignOrganizationAssignment.cxx @@ -12,8 +12,6 @@ // commercial license or contractual agreement. -#include -#include #include #include #include diff --git a/src/StepAP214/StepAP214_AutoDesignOrganizationAssignment.hxx b/src/StepAP214/StepAP214_AutoDesignOrganizationAssignment.hxx index 7aaf4fa71f..ed61df54a8 100644 --- a/src/StepAP214/StepAP214_AutoDesignOrganizationAssignment.hxx +++ b/src/StepAP214/StepAP214_AutoDesignOrganizationAssignment.hxx @@ -18,7 +18,6 @@ #define _StepAP214_AutoDesignOrganizationAssignment_HeaderFile #include -#include #include #include diff --git a/src/StepAP214/StepAP214_AutoDesignPersonAndOrganizationAssignment.cxx b/src/StepAP214/StepAP214_AutoDesignPersonAndOrganizationAssignment.cxx index c37d8a3e67..a72c27821c 100644 --- a/src/StepAP214/StepAP214_AutoDesignPersonAndOrganizationAssignment.cxx +++ b/src/StepAP214/StepAP214_AutoDesignPersonAndOrganizationAssignment.cxx @@ -12,8 +12,6 @@ // commercial license or contractual agreement. -#include -#include #include #include #include diff --git a/src/StepAP214/StepAP214_AutoDesignPersonAndOrganizationAssignment.hxx b/src/StepAP214/StepAP214_AutoDesignPersonAndOrganizationAssignment.hxx index 35be414347..ee61e847bd 100644 --- a/src/StepAP214/StepAP214_AutoDesignPersonAndOrganizationAssignment.hxx +++ b/src/StepAP214/StepAP214_AutoDesignPersonAndOrganizationAssignment.hxx @@ -18,7 +18,6 @@ #define _StepAP214_AutoDesignPersonAndOrganizationAssignment_HeaderFile #include -#include #include #include diff --git a/src/StepAP214/StepAP214_AutoDesignPresentedItem.cxx b/src/StepAP214/StepAP214_AutoDesignPresentedItem.cxx index e13cb82a3d..72db110505 100644 --- a/src/StepAP214/StepAP214_AutoDesignPresentedItem.cxx +++ b/src/StepAP214/StepAP214_AutoDesignPresentedItem.cxx @@ -12,7 +12,6 @@ // commercial license or contractual agreement. -#include #include #include diff --git a/src/StepAP214/StepAP214_AutoDesignPresentedItem.hxx b/src/StepAP214/StepAP214_AutoDesignPresentedItem.hxx index 121a2b9cdc..3ea1a06054 100644 --- a/src/StepAP214/StepAP214_AutoDesignPresentedItem.hxx +++ b/src/StepAP214/StepAP214_AutoDesignPresentedItem.hxx @@ -18,7 +18,6 @@ #define _StepAP214_AutoDesignPresentedItem_HeaderFile #include -#include #include #include diff --git a/src/StepAP214/StepAP214_DocumentReferenceItem.cxx b/src/StepAP214/StepAP214_DocumentReferenceItem.cxx index 96c16afb9c..4920b0a672 100644 --- a/src/StepAP214/StepAP214_DocumentReferenceItem.cxx +++ b/src/StepAP214/StepAP214_DocumentReferenceItem.cxx @@ -24,7 +24,6 @@ #include #include #include -#include #include #include #include diff --git a/src/StepAP214/StepAP214_ExternallyDefinedClass.cxx b/src/StepAP214/StepAP214_ExternallyDefinedClass.cxx index 8caefe8236..0ac766fe50 100644 --- a/src/StepAP214/StepAP214_ExternallyDefinedClass.cxx +++ b/src/StepAP214/StepAP214_ExternallyDefinedClass.cxx @@ -15,7 +15,6 @@ // Generator: ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V1.1 -#include #include #include #include diff --git a/src/StepAP214/StepAP214_ExternallyDefinedGeneralProperty.cxx b/src/StepAP214/StepAP214_ExternallyDefinedGeneralProperty.cxx index 2f23480d54..9a5a5f51e9 100644 --- a/src/StepAP214/StepAP214_ExternallyDefinedGeneralProperty.cxx +++ b/src/StepAP214/StepAP214_ExternallyDefinedGeneralProperty.cxx @@ -15,7 +15,6 @@ // Generator: ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V1.1 -#include #include #include #include diff --git a/src/StepAP214/StepAP214_HArray1OfApprovalItem.hxx b/src/StepAP214/StepAP214_HArray1OfApprovalItem.hxx index c3311f2e5e..78f771aee9 100644 --- a/src/StepAP214/StepAP214_HArray1OfApprovalItem.hxx +++ b/src/StepAP214/StepAP214_HArray1OfApprovalItem.hxx @@ -17,7 +17,6 @@ #ifndef StepAP214_HArray1OfApprovalItem_HeaderFile #define StepAP214_HArray1OfApprovalItem_HeaderFile -#include #include #include diff --git a/src/StepAP214/StepAP214_HArray1OfAutoDesignDateAndPersonItem.hxx b/src/StepAP214/StepAP214_HArray1OfAutoDesignDateAndPersonItem.hxx index 7f8652729b..201a2864ec 100644 --- a/src/StepAP214/StepAP214_HArray1OfAutoDesignDateAndPersonItem.hxx +++ b/src/StepAP214/StepAP214_HArray1OfAutoDesignDateAndPersonItem.hxx @@ -17,7 +17,6 @@ #ifndef StepAP214_HArray1OfAutoDesignDateAndPersonItem_HeaderFile #define StepAP214_HArray1OfAutoDesignDateAndPersonItem_HeaderFile -#include #include #include diff --git a/src/StepAP214/StepAP214_HArray1OfAutoDesignDateAndTimeItem.hxx b/src/StepAP214/StepAP214_HArray1OfAutoDesignDateAndTimeItem.hxx index 4dbbca9580..9a583672d7 100644 --- a/src/StepAP214/StepAP214_HArray1OfAutoDesignDateAndTimeItem.hxx +++ b/src/StepAP214/StepAP214_HArray1OfAutoDesignDateAndTimeItem.hxx @@ -17,7 +17,6 @@ #ifndef StepAP214_HArray1OfAutoDesignDateAndTimeItem_HeaderFile #define StepAP214_HArray1OfAutoDesignDateAndTimeItem_HeaderFile -#include #include #include diff --git a/src/StepAP214/StepAP214_HArray1OfAutoDesignDatedItem.hxx b/src/StepAP214/StepAP214_HArray1OfAutoDesignDatedItem.hxx index d26e7e5ff8..ce49787fa6 100644 --- a/src/StepAP214/StepAP214_HArray1OfAutoDesignDatedItem.hxx +++ b/src/StepAP214/StepAP214_HArray1OfAutoDesignDatedItem.hxx @@ -17,7 +17,6 @@ #ifndef StepAP214_HArray1OfAutoDesignDatedItem_HeaderFile #define StepAP214_HArray1OfAutoDesignDatedItem_HeaderFile -#include #include #include diff --git a/src/StepAP214/StepAP214_HArray1OfAutoDesignGeneralOrgItem.hxx b/src/StepAP214/StepAP214_HArray1OfAutoDesignGeneralOrgItem.hxx index b57981e4ce..6011bed137 100644 --- a/src/StepAP214/StepAP214_HArray1OfAutoDesignGeneralOrgItem.hxx +++ b/src/StepAP214/StepAP214_HArray1OfAutoDesignGeneralOrgItem.hxx @@ -17,7 +17,6 @@ #ifndef StepAP214_HArray1OfAutoDesignGeneralOrgItem_HeaderFile #define StepAP214_HArray1OfAutoDesignGeneralOrgItem_HeaderFile -#include #include #include diff --git a/src/StepAP214/StepAP214_HArray1OfAutoDesignGroupedItem.hxx b/src/StepAP214/StepAP214_HArray1OfAutoDesignGroupedItem.hxx index d64b929335..9d95c69526 100644 --- a/src/StepAP214/StepAP214_HArray1OfAutoDesignGroupedItem.hxx +++ b/src/StepAP214/StepAP214_HArray1OfAutoDesignGroupedItem.hxx @@ -17,7 +17,6 @@ #ifndef StepAP214_HArray1OfAutoDesignGroupedItem_HeaderFile #define StepAP214_HArray1OfAutoDesignGroupedItem_HeaderFile -#include #include #include diff --git a/src/StepAP214/StepAP214_HArray1OfAutoDesignPresentedItemSelect.hxx b/src/StepAP214/StepAP214_HArray1OfAutoDesignPresentedItemSelect.hxx index 1d74713d8a..f0056087db 100644 --- a/src/StepAP214/StepAP214_HArray1OfAutoDesignPresentedItemSelect.hxx +++ b/src/StepAP214/StepAP214_HArray1OfAutoDesignPresentedItemSelect.hxx @@ -17,7 +17,6 @@ #ifndef StepAP214_HArray1OfAutoDesignPresentedItemSelect_HeaderFile #define StepAP214_HArray1OfAutoDesignPresentedItemSelect_HeaderFile -#include #include #include diff --git a/src/StepAP214/StepAP214_HArray1OfAutoDesignReferencingItem.hxx b/src/StepAP214/StepAP214_HArray1OfAutoDesignReferencingItem.hxx index 1d844fd4d5..f4c956dc09 100644 --- a/src/StepAP214/StepAP214_HArray1OfAutoDesignReferencingItem.hxx +++ b/src/StepAP214/StepAP214_HArray1OfAutoDesignReferencingItem.hxx @@ -17,7 +17,6 @@ #ifndef StepAP214_HArray1OfAutoDesignReferencingItem_HeaderFile #define StepAP214_HArray1OfAutoDesignReferencingItem_HeaderFile -#include #include #include diff --git a/src/StepAP214/StepAP214_HArray1OfDateAndTimeItem.hxx b/src/StepAP214/StepAP214_HArray1OfDateAndTimeItem.hxx index f98d8ee50b..dc6be6e5f5 100644 --- a/src/StepAP214/StepAP214_HArray1OfDateAndTimeItem.hxx +++ b/src/StepAP214/StepAP214_HArray1OfDateAndTimeItem.hxx @@ -17,7 +17,6 @@ #ifndef StepAP214_HArray1OfDateAndTimeItem_HeaderFile #define StepAP214_HArray1OfDateAndTimeItem_HeaderFile -#include #include #include diff --git a/src/StepAP214/StepAP214_HArray1OfDateItem.hxx b/src/StepAP214/StepAP214_HArray1OfDateItem.hxx index 93fdabbf2b..7fa141133a 100644 --- a/src/StepAP214/StepAP214_HArray1OfDateItem.hxx +++ b/src/StepAP214/StepAP214_HArray1OfDateItem.hxx @@ -17,7 +17,6 @@ #ifndef StepAP214_HArray1OfDateItem_HeaderFile #define StepAP214_HArray1OfDateItem_HeaderFile -#include #include #include diff --git a/src/StepAP214/StepAP214_HArray1OfDocumentReferenceItem.hxx b/src/StepAP214/StepAP214_HArray1OfDocumentReferenceItem.hxx index 03672aa213..42f86b7c19 100644 --- a/src/StepAP214/StepAP214_HArray1OfDocumentReferenceItem.hxx +++ b/src/StepAP214/StepAP214_HArray1OfDocumentReferenceItem.hxx @@ -17,7 +17,6 @@ #ifndef StepAP214_HArray1OfDocumentReferenceItem_HeaderFile #define StepAP214_HArray1OfDocumentReferenceItem_HeaderFile -#include #include #include diff --git a/src/StepAP214/StepAP214_HArray1OfExternalIdentificationItem.hxx b/src/StepAP214/StepAP214_HArray1OfExternalIdentificationItem.hxx index fee3a9d8dd..88eec5c490 100644 --- a/src/StepAP214/StepAP214_HArray1OfExternalIdentificationItem.hxx +++ b/src/StepAP214/StepAP214_HArray1OfExternalIdentificationItem.hxx @@ -17,7 +17,6 @@ #ifndef StepAP214_HArray1OfExternalIdentificationItem_HeaderFile #define StepAP214_HArray1OfExternalIdentificationItem_HeaderFile -#include #include #include diff --git a/src/StepAP214/StepAP214_HArray1OfGroupItem.hxx b/src/StepAP214/StepAP214_HArray1OfGroupItem.hxx index c1e5216f15..b1d69411a7 100644 --- a/src/StepAP214/StepAP214_HArray1OfGroupItem.hxx +++ b/src/StepAP214/StepAP214_HArray1OfGroupItem.hxx @@ -17,7 +17,6 @@ #ifndef StepAP214_HArray1OfGroupItem_HeaderFile #define StepAP214_HArray1OfGroupItem_HeaderFile -#include #include #include diff --git a/src/StepAP214/StepAP214_HArray1OfOrganizationItem.hxx b/src/StepAP214/StepAP214_HArray1OfOrganizationItem.hxx index b2be68d6cc..948d800d44 100644 --- a/src/StepAP214/StepAP214_HArray1OfOrganizationItem.hxx +++ b/src/StepAP214/StepAP214_HArray1OfOrganizationItem.hxx @@ -17,7 +17,6 @@ #ifndef StepAP214_HArray1OfOrganizationItem_HeaderFile #define StepAP214_HArray1OfOrganizationItem_HeaderFile -#include #include #include diff --git a/src/StepAP214/StepAP214_HArray1OfPersonAndOrganizationItem.hxx b/src/StepAP214/StepAP214_HArray1OfPersonAndOrganizationItem.hxx index 9f1990c25f..94818c51f5 100644 --- a/src/StepAP214/StepAP214_HArray1OfPersonAndOrganizationItem.hxx +++ b/src/StepAP214/StepAP214_HArray1OfPersonAndOrganizationItem.hxx @@ -17,7 +17,6 @@ #ifndef StepAP214_HArray1OfPersonAndOrganizationItem_HeaderFile #define StepAP214_HArray1OfPersonAndOrganizationItem_HeaderFile -#include #include #include diff --git a/src/StepAP214/StepAP214_HArray1OfPresentedItemSelect.hxx b/src/StepAP214/StepAP214_HArray1OfPresentedItemSelect.hxx index fa9d2fd570..1518709038 100644 --- a/src/StepAP214/StepAP214_HArray1OfPresentedItemSelect.hxx +++ b/src/StepAP214/StepAP214_HArray1OfPresentedItemSelect.hxx @@ -17,7 +17,6 @@ #ifndef StepAP214_HArray1OfPresentedItemSelect_HeaderFile #define StepAP214_HArray1OfPresentedItemSelect_HeaderFile -#include #include #include diff --git a/src/StepAP214/StepAP214_HArray1OfSecurityClassificationItem.hxx b/src/StepAP214/StepAP214_HArray1OfSecurityClassificationItem.hxx index 01dc59576e..c23ec74165 100644 --- a/src/StepAP214/StepAP214_HArray1OfSecurityClassificationItem.hxx +++ b/src/StepAP214/StepAP214_HArray1OfSecurityClassificationItem.hxx @@ -17,7 +17,6 @@ #ifndef StepAP214_HArray1OfSecurityClassificationItem_HeaderFile #define StepAP214_HArray1OfSecurityClassificationItem_HeaderFile -#include #include #include diff --git a/src/StepAP214/StepAP214_Protocol.cxx b/src/StepAP214/StepAP214_Protocol.cxx index 11646ba0ab..827ef454eb 100644 --- a/src/StepAP214/StepAP214_Protocol.cxx +++ b/src/StepAP214/StepAP214_Protocol.cxx @@ -15,8 +15,6 @@ //:j4 gka 11 Mar 99 S4134 : added new types for DIS // gka 09.04.99: S4136: new name of parameter write.step.schema -#include -#include #include IMPLEMENT_STANDARD_RTTIEXT(StepAP214_Protocol,StepData_Protocol) @@ -29,14 +27,12 @@ static Standard_CString schemaAP242DIS = "AP242_MANAGED_MODEL_BASED_3D_ENGINEERI #include -#include #include #include // Removed from CC1-Rev2 to Rev4 : // Removed from CC1-Rev2 to Rev4 : // Removed from CC1-Rev2 to Rev4 : // Removed from CC1-Rev2 to CC1-Rev4, re-added CC2-Rev4 : -#include // Removed from CC1-Rev2 to Rev4 : // Removed from CC1-Rev2 to Rev4 : // Removed from CC1-Rev2 to Rev4 : @@ -45,9 +41,7 @@ static Standard_CString schemaAP242DIS = "AP242_MANAGED_MODEL_BASED_3D_ENGINEERI #include #include -#include #include -#include #include #include #include @@ -67,41 +61,29 @@ static Standard_CString schemaAP242DIS = "AP242_MANAGED_MODEL_BASED_3D_ENGINEERI // Removed from CC1-Rev2 to Rev4 : #include #include -#include -#include #include -#include #include #include #include #include #include #include -#include #include #include #include #include #include #include -#include -#include #include -#include #include #include -#include #include #include #include #include #include #include -#include -#include -#include // Removed from CC1-Rev2 to CC1-Rev4, re-added CC2-Rev4 : -#include // Removed from CC1-Rev2 to Rev4 : // Removed from CC1-Rev2 to Rev4 : // Removed from CC1-Rev2 to CC1-Rev4, re-added CC2-Rev4 : @@ -112,7 +94,6 @@ static Standard_CString schemaAP242DIS = "AP242_MANAGED_MODEL_BASED_3D_ENGINEERI #include #include #include -#include #include // Removed from CC1-Rev2 to Rev4 : #include @@ -129,14 +110,11 @@ static Standard_CString schemaAP242DIS = "AP242_MANAGED_MODEL_BASED_3D_ENGINEERI #include #include // Removed from CC1-Rev2 to Rev4 : -#include -#include #include #include // Removed from CC1-Rev2 to Rev4 : // Removed from CC1-Rev2 to Rev4 : #include -#include // Removed from CC1-Rev2 to CC1-Rev4, re-added CC2-Rev4 : #include // Removed from CC1-Rev2 to Rev4 : @@ -147,7 +125,6 @@ static Standard_CString schemaAP242DIS = "AP242_MANAGED_MODEL_BASED_3D_ENGINEERI // Removed from CC1-Rev2 to Rev4 : // Removed from CC1-Rev2 to Rev4 : // Removed from CC1-Rev2 to Rev4 : -#include #include #include #include @@ -175,21 +152,17 @@ static Standard_CString schemaAP242DIS = "AP242_MANAGED_MODEL_BASED_3D_ENGINEERI // Removed from CC1-Rev2 to Rev4 : // Removed from CC1-Rev2 to Rev4 : #include -#include #include #include -#include #include #include #include #include -#include #include #include #include #include #include -#include #include #include #include @@ -206,9 +179,7 @@ static Standard_CString schemaAP242DIS = "AP242_MANAGED_MODEL_BASED_3D_ENGINEERI #include #include // Removed from CC1-Rev2 to Rev4 : -#include #include -#include #include #include #include @@ -222,7 +193,6 @@ static Standard_CString schemaAP242DIS = "AP242_MANAGED_MODEL_BASED_3D_ENGINEERI #include #include #include -#include #include #include #include @@ -230,11 +200,8 @@ static Standard_CString schemaAP242DIS = "AP242_MANAGED_MODEL_BASED_3D_ENGINEERI #include #include #include -#include #include #include -#include -#include #include #include #include @@ -254,34 +221,24 @@ static Standard_CString schemaAP242DIS = "AP242_MANAGED_MODEL_BASED_3D_ENGINEERI #include #include #include -#include -#include -#include #include // Removed from CC1-Rev2 to Rev4 : -#include -#include -#include #include #include -#include #include #include -#include #include #include #include #include #include #include -#include #include #include #include #include #include #include -#include #include #include #include @@ -289,14 +246,11 @@ static Standard_CString schemaAP242DIS = "AP242_MANAGED_MODEL_BASED_3D_ENGINEERI #include #include #include -#include -#include #include #include #include #include #include -#include #include #include #include @@ -335,7 +289,6 @@ static Standard_CString schemaAP242DIS = "AP242_MANAGED_MODEL_BASED_3D_ENGINEERI // Removed from CC1-Rev2 to Rev4 : // Removed from CC1-Rev2 to Rev4 : // Removed from CC1-Rev2 to CC1-Rev4, re-added CC2-Rev4 : -#include #include #include // Removed from CC1-Rev2 to Rev4 : @@ -343,7 +296,6 @@ static Standard_CString schemaAP242DIS = "AP242_MANAGED_MODEL_BASED_3D_ENGINEERI #include #include #include -#include // Removed from CC1-Rev2 to Rev4 : #include #include @@ -394,29 +346,22 @@ static Standard_CString schemaAP242DIS = "AP242_MANAGED_MODEL_BASED_3D_ENGINEERI #include #include #include -#include #include #include // Added by CKY (JUL-1998) for AP214 CC1 -> CC2 #include -#include #include #include #include #include -#include -#include -#include #include #include -#include #include -#include #include #include #include @@ -424,8 +369,6 @@ static Standard_CString schemaAP242DIS = "AP242_MANAGED_MODEL_BASED_3D_ENGINEERI #include #include #include -#include -#include #include #include @@ -464,9 +407,7 @@ static Standard_CString schemaAP242DIS = "AP242_MANAGED_MODEL_BASED_3D_ENGINEERI // Added by ABV 10.11.99 for AP203 #include -#include #include -#include #include #include #include @@ -493,7 +434,6 @@ static Standard_CString schemaAP242DIS = "AP242_MANAGED_MODEL_BASED_3D_ENGINEERI #include // Added by ABV 13.01.00 for CAX-IF TRJ3 -#include // Added by ABV 18.04.00 for CAX-IF TRJ4 (dimensions) #include @@ -510,20 +450,14 @@ static Standard_CString schemaAP242DIS = "AP242_MANAGED_MODEL_BASED_3D_ENGINEERI #include #include #include -#include -#include #include #include -#include -#include #include #include #include #include // Added by CKY , 25 APR 2001 for Dimensional Tolerances (CAX-IF TRJ7) -#include -#include #include #include #include @@ -534,13 +468,11 @@ static Standard_CString schemaAP242DIS = "AP242_MANAGED_MODEL_BASED_3D_ENGINEERI #include #include #include -#include #include #include // Added by ABV 28.12.01 for CAX-IF TRJ9 (edge_based_wireframe_model) #include -#include #include #include #include @@ -558,15 +490,11 @@ static Standard_CString schemaAP242DIS = "AP242_MANAGED_MODEL_BASED_3D_ENGINEERI #include #include #include -#include -#include #include #include #include #include #include -#include -#include #include #include #include @@ -575,7 +503,6 @@ static Standard_CString schemaAP242DIS = "AP242_MANAGED_MODEL_BASED_3D_ENGINEERI #include #include #include -#include #include #include #include @@ -592,7 +519,6 @@ static Standard_CString schemaAP242DIS = "AP242_MANAGED_MODEL_BASED_3D_ENGINEERI #include #include #include -#include #include #include #include @@ -639,12 +565,10 @@ static Standard_CString schemaAP242DIS = "AP242_MANAGED_MODEL_BASED_3D_ENGINEERI #include //added PTV TRJ11 8.02.2003 -#include #include //TR12J 4.06.2003 G&DT entities #include -#include #include #include #include @@ -668,7 +592,6 @@ static Standard_CString schemaAP242DIS = "AP242_MANAGED_MODEL_BASED_3D_ENGINEERI #include #include #include -#include #include #include @@ -678,10 +601,6 @@ static Standard_CString schemaAP242DIS = "AP242_MANAGED_MODEL_BASED_3D_ENGINEERI #include #include #include -#include -#include -#include -#include // Added by ika for GD&T AP242 #include @@ -710,7 +629,6 @@ static Standard_CString schemaAP242DIS = "AP242_MANAGED_MODEL_BASED_3D_ENGINEERI #include #include #include -#include #include #include #include @@ -718,9 +636,6 @@ static Standard_CString schemaAP242DIS = "AP242_MANAGED_MODEL_BASED_3D_ENGINEERI #include #include #include -#include -#include -#include #include #include #include @@ -729,13 +644,11 @@ static Standard_CString schemaAP242DIS = "AP242_MANAGED_MODEL_BASED_3D_ENGINEERI #include #include #include -#include #include #include #include -#include #include #include #include @@ -753,22 +666,17 @@ static Standard_CString schemaAP242DIS = "AP242_MANAGED_MODEL_BASED_3D_ENGINEERI #include // Added for kinematics implementation -#include #include #include #include -#include #include #include -#include #include #include #include -#include #include #include #include -#include #include #include #include @@ -783,26 +691,19 @@ static Standard_CString schemaAP242DIS = "AP242_MANAGED_MODEL_BASED_3D_ENGINEERI #include #include #include -#include #include -#include #include #include -#include #include #include -#include #include #include -#include #include #include #include #include -#include #include #include -#include #include #include #include @@ -810,16 +711,13 @@ static Standard_CString schemaAP242DIS = "AP242_MANAGED_MODEL_BASED_3D_ENGINEERI #include #include #include -#include #include #include #include #include #include #include -#include #include -#include #include #include #include @@ -833,7 +731,6 @@ static Standard_CString schemaAP242DIS = "AP242_MANAGED_MODEL_BASED_3D_ENGINEERI #include #include -#include #include #include diff --git a/src/StepAP214/StepAP214_Protocol.hxx b/src/StepAP214/StepAP214_Protocol.hxx index ab13ff90e8..988c55c8b5 100644 --- a/src/StepAP214/StepAP214_Protocol.hxx +++ b/src/StepAP214/StepAP214_Protocol.hxx @@ -18,7 +18,6 @@ #define _StepAP214_Protocol_HeaderFile #include -#include #include #include diff --git a/src/StepAP214/StepAP214_RepItemGroup.cxx b/src/StepAP214/StepAP214_RepItemGroup.cxx index 5c4f458a92..b2734e6589 100644 --- a/src/StepAP214/StepAP214_RepItemGroup.cxx +++ b/src/StepAP214/StepAP214_RepItemGroup.cxx @@ -15,7 +15,6 @@ // Generator: ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V1.1 -#include #include #include #include diff --git a/src/StepAP214/StepAP214_SecurityClassificationItem.cxx b/src/StepAP214/StepAP214_SecurityClassificationItem.cxx index bcf9d971f0..82221cde83 100644 --- a/src/StepAP214/StepAP214_SecurityClassificationItem.cxx +++ b/src/StepAP214/StepAP214_SecurityClassificationItem.cxx @@ -15,12 +15,10 @@ #include #include #include -#include #include #include #include #include -#include #include #include #include diff --git a/src/StepAP242/StepAP242_DraughtingModelItemAssociation.hxx b/src/StepAP242/StepAP242_DraughtingModelItemAssociation.hxx index 5e13b661ad..b8587df599 100644 --- a/src/StepAP242/StepAP242_DraughtingModelItemAssociation.hxx +++ b/src/StepAP242/StepAP242_DraughtingModelItemAssociation.hxx @@ -17,7 +17,6 @@ #define _StepAP242_DraughtingModelItemAssociation_HeaderFile #include -#include #include diff --git a/src/StepAP242/StepAP242_GeometricItemSpecificUsage.hxx b/src/StepAP242/StepAP242_GeometricItemSpecificUsage.hxx index 8acfa00e92..ec6c6349de 100644 --- a/src/StepAP242/StepAP242_GeometricItemSpecificUsage.hxx +++ b/src/StepAP242/StepAP242_GeometricItemSpecificUsage.hxx @@ -17,7 +17,6 @@ #define _StepAP242_GeometricItemSpecificUsage_HeaderFile #include -#include #include diff --git a/src/StepAP242/StepAP242_IdAttribute.hxx b/src/StepAP242/StepAP242_IdAttribute.hxx index 34732f1f41..c1cbb2c514 100644 --- a/src/StepAP242/StepAP242_IdAttribute.hxx +++ b/src/StepAP242/StepAP242_IdAttribute.hxx @@ -17,7 +17,6 @@ #define _StepAP242_IdAttribute_HeaderFile #include -#include #include #include diff --git a/src/StepAP242/StepAP242_ItemIdentifiedRepresentationUsage.hxx b/src/StepAP242/StepAP242_ItemIdentifiedRepresentationUsage.hxx index d6e8d48edd..54cff3c614 100644 --- a/src/StepAP242/StepAP242_ItemIdentifiedRepresentationUsage.hxx +++ b/src/StepAP242/StepAP242_ItemIdentifiedRepresentationUsage.hxx @@ -17,7 +17,6 @@ #define _StepAP242_ItemIdentifiedRepresentationUsage_HeaderFile #include -#include #include #include diff --git a/src/StepBasic/StepBasic_Action.cxx b/src/StepBasic/StepBasic_Action.cxx index 1c348ef993..bd3ed79ace 100644 --- a/src/StepBasic/StepBasic_Action.cxx +++ b/src/StepBasic/StepBasic_Action.cxx @@ -16,7 +16,6 @@ // Generator: ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V1.0 -#include #include #include #include diff --git a/src/StepBasic/StepBasic_ActionMethod.cxx b/src/StepBasic/StepBasic_ActionMethod.cxx index eedea72815..01a8d4e0a4 100644 --- a/src/StepBasic/StepBasic_ActionMethod.cxx +++ b/src/StepBasic/StepBasic_ActionMethod.cxx @@ -16,7 +16,6 @@ // Generator: ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V1.0 -#include #include #include diff --git a/src/StepBasic/StepBasic_Address.cxx b/src/StepBasic/StepBasic_Address.cxx index 87f92c9cd7..7296d9fc8b 100644 --- a/src/StepBasic/StepBasic_Address.cxx +++ b/src/StepBasic/StepBasic_Address.cxx @@ -12,7 +12,6 @@ // commercial license or contractual agreement. -#include #include #include diff --git a/src/StepBasic/StepBasic_ApplicationContext.cxx b/src/StepBasic/StepBasic_ApplicationContext.cxx index ced644a0d0..13ac1bc4b6 100644 --- a/src/StepBasic/StepBasic_ApplicationContext.cxx +++ b/src/StepBasic/StepBasic_ApplicationContext.cxx @@ -12,7 +12,6 @@ // commercial license or contractual agreement. -#include #include #include diff --git a/src/StepBasic/StepBasic_ApplicationContextElement.cxx b/src/StepBasic/StepBasic_ApplicationContextElement.cxx index 030d011eea..eaa7361874 100644 --- a/src/StepBasic/StepBasic_ApplicationContextElement.cxx +++ b/src/StepBasic/StepBasic_ApplicationContextElement.cxx @@ -12,7 +12,6 @@ // commercial license or contractual agreement. -#include #include #include #include diff --git a/src/StepBasic/StepBasic_ApplicationProtocolDefinition.cxx b/src/StepBasic/StepBasic_ApplicationProtocolDefinition.cxx index 2f45aa2460..a34699a72d 100644 --- a/src/StepBasic/StepBasic_ApplicationProtocolDefinition.cxx +++ b/src/StepBasic/StepBasic_ApplicationProtocolDefinition.cxx @@ -12,7 +12,6 @@ // commercial license or contractual agreement. -#include #include #include #include diff --git a/src/StepBasic/StepBasic_Approval.cxx b/src/StepBasic/StepBasic_Approval.cxx index 6b0a55fca7..9a5aba8019 100644 --- a/src/StepBasic/StepBasic_Approval.cxx +++ b/src/StepBasic/StepBasic_Approval.cxx @@ -12,7 +12,6 @@ // commercial license or contractual agreement. -#include #include #include #include diff --git a/src/StepBasic/StepBasic_ApprovalDateTime.cxx b/src/StepBasic/StepBasic_ApprovalDateTime.cxx index 311a1a7fe1..33fea3e5d0 100644 --- a/src/StepBasic/StepBasic_ApprovalDateTime.cxx +++ b/src/StepBasic/StepBasic_ApprovalDateTime.cxx @@ -12,7 +12,6 @@ // commercial license or contractual agreement. -#include #include #include #include diff --git a/src/StepBasic/StepBasic_ApprovalPersonOrganization.cxx b/src/StepBasic/StepBasic_ApprovalPersonOrganization.cxx index cd3fd4a1c7..74cc7a868b 100644 --- a/src/StepBasic/StepBasic_ApprovalPersonOrganization.cxx +++ b/src/StepBasic/StepBasic_ApprovalPersonOrganization.cxx @@ -12,7 +12,6 @@ // commercial license or contractual agreement. -#include #include #include #include diff --git a/src/StepBasic/StepBasic_ApprovalRelationship.cxx b/src/StepBasic/StepBasic_ApprovalRelationship.cxx index 12b13a552e..57a19e3a8d 100644 --- a/src/StepBasic/StepBasic_ApprovalRelationship.cxx +++ b/src/StepBasic/StepBasic_ApprovalRelationship.cxx @@ -12,7 +12,6 @@ // commercial license or contractual agreement. -#include #include #include #include diff --git a/src/StepBasic/StepBasic_ApprovalRole.cxx b/src/StepBasic/StepBasic_ApprovalRole.cxx index 3a1a25c7c5..76745a1148 100644 --- a/src/StepBasic/StepBasic_ApprovalRole.cxx +++ b/src/StepBasic/StepBasic_ApprovalRole.cxx @@ -12,7 +12,6 @@ // commercial license or contractual agreement. -#include #include #include diff --git a/src/StepBasic/StepBasic_ApprovalStatus.cxx b/src/StepBasic/StepBasic_ApprovalStatus.cxx index 7ada499860..b59113bee5 100644 --- a/src/StepBasic/StepBasic_ApprovalStatus.cxx +++ b/src/StepBasic/StepBasic_ApprovalStatus.cxx @@ -12,7 +12,6 @@ // commercial license or contractual agreement. -#include #include #include diff --git a/src/StepBasic/StepBasic_Certification.cxx b/src/StepBasic/StepBasic_Certification.cxx index 352728773c..bc85cbe50a 100644 --- a/src/StepBasic/StepBasic_Certification.cxx +++ b/src/StepBasic/StepBasic_Certification.cxx @@ -16,7 +16,6 @@ // Generator: ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V1.0 -#include #include #include #include diff --git a/src/StepBasic/StepBasic_CertificationType.cxx b/src/StepBasic/StepBasic_CertificationType.cxx index 5ccb8656f4..979c739438 100644 --- a/src/StepBasic/StepBasic_CertificationType.cxx +++ b/src/StepBasic/StepBasic_CertificationType.cxx @@ -16,7 +16,6 @@ // Generator: ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V1.0 -#include #include #include diff --git a/src/StepBasic/StepBasic_CharacterizedObject.cxx b/src/StepBasic/StepBasic_CharacterizedObject.cxx index 25c9504288..f13065c0e3 100644 --- a/src/StepBasic/StepBasic_CharacterizedObject.cxx +++ b/src/StepBasic/StepBasic_CharacterizedObject.cxx @@ -15,7 +15,6 @@ // Generator: ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V1.1 -#include #include #include diff --git a/src/StepBasic/StepBasic_Contract.cxx b/src/StepBasic/StepBasic_Contract.cxx index ef789b6630..8613f35ee5 100644 --- a/src/StepBasic/StepBasic_Contract.cxx +++ b/src/StepBasic/StepBasic_Contract.cxx @@ -16,7 +16,6 @@ // Generator: ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V1.0 -#include #include #include #include diff --git a/src/StepBasic/StepBasic_ContractType.cxx b/src/StepBasic/StepBasic_ContractType.cxx index 3b914122cc..8caad733ae 100644 --- a/src/StepBasic/StepBasic_ContractType.cxx +++ b/src/StepBasic/StepBasic_ContractType.cxx @@ -16,7 +16,6 @@ // Generator: ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V1.0 -#include #include #include diff --git a/src/StepBasic/StepBasic_ConversionBasedUnit.cxx b/src/StepBasic/StepBasic_ConversionBasedUnit.cxx index c04c73da17..1dcf9e64ee 100644 --- a/src/StepBasic/StepBasic_ConversionBasedUnit.cxx +++ b/src/StepBasic/StepBasic_ConversionBasedUnit.cxx @@ -12,7 +12,6 @@ // commercial license or contractual agreement. -#include #include #include #include diff --git a/src/StepBasic/StepBasic_ConversionBasedUnitAndLengthUnit.cxx b/src/StepBasic/StepBasic_ConversionBasedUnitAndLengthUnit.cxx index 1e2d129188..0b35323dbd 100644 --- a/src/StepBasic/StepBasic_ConversionBasedUnitAndLengthUnit.cxx +++ b/src/StepBasic/StepBasic_ConversionBasedUnitAndLengthUnit.cxx @@ -13,7 +13,6 @@ #include -#include #include #include #include diff --git a/src/StepBasic/StepBasic_ConversionBasedUnitAndMassUnit.cxx b/src/StepBasic/StepBasic_ConversionBasedUnitAndMassUnit.cxx index 8353815bc8..e42d902b60 100644 --- a/src/StepBasic/StepBasic_ConversionBasedUnitAndMassUnit.cxx +++ b/src/StepBasic/StepBasic_ConversionBasedUnitAndMassUnit.cxx @@ -13,7 +13,6 @@ #include -#include #include #include #include diff --git a/src/StepBasic/StepBasic_ConversionBasedUnitAndPlaneAngleUnit.cxx b/src/StepBasic/StepBasic_ConversionBasedUnitAndPlaneAngleUnit.cxx index d9f51bb269..9d29ff2afa 100644 --- a/src/StepBasic/StepBasic_ConversionBasedUnitAndPlaneAngleUnit.cxx +++ b/src/StepBasic/StepBasic_ConversionBasedUnitAndPlaneAngleUnit.cxx @@ -13,7 +13,6 @@ #include -#include #include #include #include diff --git a/src/StepBasic/StepBasic_ConversionBasedUnitAndRatioUnit.cxx b/src/StepBasic/StepBasic_ConversionBasedUnitAndRatioUnit.cxx index 2f8fe48d3b..da4ddea937 100644 --- a/src/StepBasic/StepBasic_ConversionBasedUnitAndRatioUnit.cxx +++ b/src/StepBasic/StepBasic_ConversionBasedUnitAndRatioUnit.cxx @@ -13,7 +13,6 @@ #include -#include #include #include #include diff --git a/src/StepBasic/StepBasic_ConversionBasedUnitAndSolidAngleUnit.cxx b/src/StepBasic/StepBasic_ConversionBasedUnitAndSolidAngleUnit.cxx index 641aa0f667..81a5154fa8 100644 --- a/src/StepBasic/StepBasic_ConversionBasedUnitAndSolidAngleUnit.cxx +++ b/src/StepBasic/StepBasic_ConversionBasedUnitAndSolidAngleUnit.cxx @@ -13,7 +13,6 @@ #include -#include #include #include #include diff --git a/src/StepBasic/StepBasic_ConversionBasedUnitAndTimeUnit.cxx b/src/StepBasic/StepBasic_ConversionBasedUnitAndTimeUnit.cxx index c68948703a..9be92c8270 100644 --- a/src/StepBasic/StepBasic_ConversionBasedUnitAndTimeUnit.cxx +++ b/src/StepBasic/StepBasic_ConversionBasedUnitAndTimeUnit.cxx @@ -13,7 +13,6 @@ #include -#include #include #include #include diff --git a/src/StepBasic/StepBasic_CoordinatedUniversalTimeOffset.hxx b/src/StepBasic/StepBasic_CoordinatedUniversalTimeOffset.hxx index a7d0c3de9e..4cbd412583 100644 --- a/src/StepBasic/StepBasic_CoordinatedUniversalTimeOffset.hxx +++ b/src/StepBasic/StepBasic_CoordinatedUniversalTimeOffset.hxx @@ -22,7 +22,6 @@ #include #include -#include #include diff --git a/src/StepBasic/StepBasic_DateRole.cxx b/src/StepBasic/StepBasic_DateRole.cxx index 20776d542e..c5c4fe7b15 100644 --- a/src/StepBasic/StepBasic_DateRole.cxx +++ b/src/StepBasic/StepBasic_DateRole.cxx @@ -12,7 +12,6 @@ // commercial license or contractual agreement. -#include #include #include diff --git a/src/StepBasic/StepBasic_DateTimeRole.cxx b/src/StepBasic/StepBasic_DateTimeRole.cxx index 981729c713..f29e5c1a1c 100644 --- a/src/StepBasic/StepBasic_DateTimeRole.cxx +++ b/src/StepBasic/StepBasic_DateTimeRole.cxx @@ -12,7 +12,6 @@ // commercial license or contractual agreement. -#include #include #include diff --git a/src/StepBasic/StepBasic_DerivedUnitElement.hxx b/src/StepBasic/StepBasic_DerivedUnitElement.hxx index 3cc80cec6a..016986861f 100644 --- a/src/StepBasic/StepBasic_DerivedUnitElement.hxx +++ b/src/StepBasic/StepBasic_DerivedUnitElement.hxx @@ -20,7 +20,6 @@ #include #include -#include #include class StepBasic_NamedUnit; diff --git a/src/StepBasic/StepBasic_DimensionalExponents.hxx b/src/StepBasic/StepBasic_DimensionalExponents.hxx index 4bebb8c5d4..7a21dc8ef4 100644 --- a/src/StepBasic/StepBasic_DimensionalExponents.hxx +++ b/src/StepBasic/StepBasic_DimensionalExponents.hxx @@ -20,7 +20,6 @@ #include #include -#include #include diff --git a/src/StepBasic/StepBasic_Document.cxx b/src/StepBasic/StepBasic_Document.cxx index b3ed0bf461..7a827763fa 100644 --- a/src/StepBasic/StepBasic_Document.cxx +++ b/src/StepBasic/StepBasic_Document.cxx @@ -15,7 +15,6 @@ // Generator: ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V1.1 -#include #include #include #include diff --git a/src/StepBasic/StepBasic_DocumentFile.hxx b/src/StepBasic/StepBasic_DocumentFile.hxx index 420679f181..2cc60a861f 100644 --- a/src/StepBasic/StepBasic_DocumentFile.hxx +++ b/src/StepBasic/StepBasic_DocumentFile.hxx @@ -20,7 +20,6 @@ #include #include -#include class StepBasic_CharacterizedObject; class TCollection_HAsciiString; class StepBasic_DocumentType; diff --git a/src/StepBasic/StepBasic_DocumentProductAssociation.cxx b/src/StepBasic/StepBasic_DocumentProductAssociation.cxx index dd16db300b..acefef1ad8 100644 --- a/src/StepBasic/StepBasic_DocumentProductAssociation.cxx +++ b/src/StepBasic/StepBasic_DocumentProductAssociation.cxx @@ -15,7 +15,6 @@ // Generator: ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V1.2 -#include #include #include #include diff --git a/src/StepBasic/StepBasic_DocumentProductAssociation.hxx b/src/StepBasic/StepBasic_DocumentProductAssociation.hxx index d81248ddca..9fe7bc1aac 100644 --- a/src/StepBasic/StepBasic_DocumentProductAssociation.hxx +++ b/src/StepBasic/StepBasic_DocumentProductAssociation.hxx @@ -20,7 +20,6 @@ #include #include -#include #include class TCollection_HAsciiString; class StepBasic_Document; diff --git a/src/StepBasic/StepBasic_DocumentProductEquivalence.cxx b/src/StepBasic/StepBasic_DocumentProductEquivalence.cxx index 72773a7cd3..80d5d345e6 100644 --- a/src/StepBasic/StepBasic_DocumentProductEquivalence.cxx +++ b/src/StepBasic/StepBasic_DocumentProductEquivalence.cxx @@ -15,7 +15,6 @@ // Generator: ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V1.2 -#include #include IMPLEMENT_STANDARD_RTTIEXT(StepBasic_DocumentProductEquivalence,StepBasic_DocumentProductAssociation) diff --git a/src/StepBasic/StepBasic_DocumentProductEquivalence.hxx b/src/StepBasic/StepBasic_DocumentProductEquivalence.hxx index e684ef08b6..2ec53b28a2 100644 --- a/src/StepBasic/StepBasic_DocumentProductEquivalence.hxx +++ b/src/StepBasic/StepBasic_DocumentProductEquivalence.hxx @@ -17,7 +17,6 @@ #define _StepBasic_DocumentProductEquivalence_HeaderFile #include -#include #include diff --git a/src/StepBasic/StepBasic_DocumentReference.cxx b/src/StepBasic/StepBasic_DocumentReference.cxx index 6e22ac342c..24476b9580 100644 --- a/src/StepBasic/StepBasic_DocumentReference.cxx +++ b/src/StepBasic/StepBasic_DocumentReference.cxx @@ -12,7 +12,6 @@ // commercial license or contractual agreement. -#include #include #include #include diff --git a/src/StepBasic/StepBasic_DocumentRelationship.cxx b/src/StepBasic/StepBasic_DocumentRelationship.cxx index 1718fdc089..94288cfa2c 100644 --- a/src/StepBasic/StepBasic_DocumentRelationship.cxx +++ b/src/StepBasic/StepBasic_DocumentRelationship.cxx @@ -12,7 +12,6 @@ // commercial license or contractual agreement. -#include #include #include #include diff --git a/src/StepBasic/StepBasic_DocumentRepresentationType.cxx b/src/StepBasic/StepBasic_DocumentRepresentationType.cxx index 154646823c..0488a4a177 100644 --- a/src/StepBasic/StepBasic_DocumentRepresentationType.cxx +++ b/src/StepBasic/StepBasic_DocumentRepresentationType.cxx @@ -15,7 +15,6 @@ // Generator: ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V1.1 -#include #include #include #include diff --git a/src/StepBasic/StepBasic_DocumentType.cxx b/src/StepBasic/StepBasic_DocumentType.cxx index 04934f78c4..de3fdbbdae 100644 --- a/src/StepBasic/StepBasic_DocumentType.cxx +++ b/src/StepBasic/StepBasic_DocumentType.cxx @@ -12,7 +12,6 @@ // commercial license or contractual agreement. -#include #include #include diff --git a/src/StepBasic/StepBasic_DocumentUsageConstraint.cxx b/src/StepBasic/StepBasic_DocumentUsageConstraint.cxx index 9977e0db41..a9c08da6e7 100644 --- a/src/StepBasic/StepBasic_DocumentUsageConstraint.cxx +++ b/src/StepBasic/StepBasic_DocumentUsageConstraint.cxx @@ -12,7 +12,6 @@ // commercial license or contractual agreement. -#include #include #include #include diff --git a/src/StepBasic/StepBasic_Effectivity.cxx b/src/StepBasic/StepBasic_Effectivity.cxx index 4652c68561..d31c6f3268 100644 --- a/src/StepBasic/StepBasic_Effectivity.cxx +++ b/src/StepBasic/StepBasic_Effectivity.cxx @@ -12,7 +12,6 @@ // commercial license or contractual agreement. -#include #include #include diff --git a/src/StepBasic/StepBasic_ExternalIdentificationAssignment.cxx b/src/StepBasic/StepBasic_ExternalIdentificationAssignment.cxx index 50385882e2..9238882830 100644 --- a/src/StepBasic/StepBasic_ExternalIdentificationAssignment.cxx +++ b/src/StepBasic/StepBasic_ExternalIdentificationAssignment.cxx @@ -15,7 +15,6 @@ // Generator: ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V1.1 -#include #include #include #include diff --git a/src/StepBasic/StepBasic_ExternalSource.cxx b/src/StepBasic/StepBasic_ExternalSource.cxx index 21d5698600..ce5880bc8e 100644 --- a/src/StepBasic/StepBasic_ExternalSource.cxx +++ b/src/StepBasic/StepBasic_ExternalSource.cxx @@ -15,7 +15,6 @@ // Generator: ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V1.1 -#include #include #include diff --git a/src/StepBasic/StepBasic_ExternalSource.hxx b/src/StepBasic/StepBasic_ExternalSource.hxx index 044f19985b..9b820f0291 100644 --- a/src/StepBasic/StepBasic_ExternalSource.hxx +++ b/src/StepBasic/StepBasic_ExternalSource.hxx @@ -17,7 +17,6 @@ #define _StepBasic_ExternalSource_HeaderFile #include -#include #include #include diff --git a/src/StepBasic/StepBasic_ExternallyDefinedItem.cxx b/src/StepBasic/StepBasic_ExternallyDefinedItem.cxx index 8123669e3b..fd084326f2 100644 --- a/src/StepBasic/StepBasic_ExternallyDefinedItem.cxx +++ b/src/StepBasic/StepBasic_ExternallyDefinedItem.cxx @@ -15,7 +15,6 @@ // Generator: ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V1.1 -#include #include #include #include diff --git a/src/StepBasic/StepBasic_ExternallyDefinedItem.hxx b/src/StepBasic/StepBasic_ExternallyDefinedItem.hxx index 03fe80a5da..c283b78bd0 100644 --- a/src/StepBasic/StepBasic_ExternallyDefinedItem.hxx +++ b/src/StepBasic/StepBasic_ExternallyDefinedItem.hxx @@ -17,7 +17,6 @@ #define _StepBasic_ExternallyDefinedItem_HeaderFile #include -#include #include #include diff --git a/src/StepBasic/StepBasic_GeneralProperty.cxx b/src/StepBasic/StepBasic_GeneralProperty.cxx index 49de78c888..037df4b366 100644 --- a/src/StepBasic/StepBasic_GeneralProperty.cxx +++ b/src/StepBasic/StepBasic_GeneralProperty.cxx @@ -15,7 +15,6 @@ // Generator: ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V1.1 -#include #include #include diff --git a/src/StepBasic/StepBasic_Group.cxx b/src/StepBasic/StepBasic_Group.cxx index f3473e421d..ab65434ebf 100644 --- a/src/StepBasic/StepBasic_Group.cxx +++ b/src/StepBasic/StepBasic_Group.cxx @@ -15,7 +15,6 @@ // Generator: ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V1.1 -#include #include #include diff --git a/src/StepBasic/StepBasic_GroupRelationship.cxx b/src/StepBasic/StepBasic_GroupRelationship.cxx index 19e27a75d2..8e907e2f8b 100644 --- a/src/StepBasic/StepBasic_GroupRelationship.cxx +++ b/src/StepBasic/StepBasic_GroupRelationship.cxx @@ -15,7 +15,6 @@ // Generator: ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V1.1 -#include #include #include #include diff --git a/src/StepBasic/StepBasic_GroupRelationship.hxx b/src/StepBasic/StepBasic_GroupRelationship.hxx index 2ff998b558..cea0f41855 100644 --- a/src/StepBasic/StepBasic_GroupRelationship.hxx +++ b/src/StepBasic/StepBasic_GroupRelationship.hxx @@ -19,7 +19,6 @@ #include #include -#include #include class TCollection_HAsciiString; class StepBasic_Group; diff --git a/src/StepBasic/StepBasic_HArray1OfApproval.hxx b/src/StepBasic/StepBasic_HArray1OfApproval.hxx index 6e0d9b2ae8..a5379ad532 100644 --- a/src/StepBasic/StepBasic_HArray1OfApproval.hxx +++ b/src/StepBasic/StepBasic_HArray1OfApproval.hxx @@ -17,7 +17,6 @@ #ifndef StepBasic_HArray1OfApproval_HeaderFile #define StepBasic_HArray1OfApproval_HeaderFile -#include #include #include diff --git a/src/StepBasic/StepBasic_HArray1OfDerivedUnitElement.hxx b/src/StepBasic/StepBasic_HArray1OfDerivedUnitElement.hxx index 5813bdfe19..a6c31a0e25 100644 --- a/src/StepBasic/StepBasic_HArray1OfDerivedUnitElement.hxx +++ b/src/StepBasic/StepBasic_HArray1OfDerivedUnitElement.hxx @@ -17,7 +17,6 @@ #ifndef StepBasic_HArray1OfDerivedUnitElement_HeaderFile #define StepBasic_HArray1OfDerivedUnitElement_HeaderFile -#include #include #include diff --git a/src/StepBasic/StepBasic_HArray1OfDocument.hxx b/src/StepBasic/StepBasic_HArray1OfDocument.hxx index 20767e1573..7746282813 100644 --- a/src/StepBasic/StepBasic_HArray1OfDocument.hxx +++ b/src/StepBasic/StepBasic_HArray1OfDocument.hxx @@ -17,7 +17,6 @@ #ifndef StepBasic_HArray1OfDocument_HeaderFile #define StepBasic_HArray1OfDocument_HeaderFile -#include #include #include diff --git a/src/StepBasic/StepBasic_HArray1OfNamedUnit.hxx b/src/StepBasic/StepBasic_HArray1OfNamedUnit.hxx index 96380a154d..eba347a004 100644 --- a/src/StepBasic/StepBasic_HArray1OfNamedUnit.hxx +++ b/src/StepBasic/StepBasic_HArray1OfNamedUnit.hxx @@ -17,7 +17,6 @@ #ifndef StepBasic_HArray1OfNamedUnit_HeaderFile #define StepBasic_HArray1OfNamedUnit_HeaderFile -#include #include #include diff --git a/src/StepBasic/StepBasic_HArray1OfOrganization.hxx b/src/StepBasic/StepBasic_HArray1OfOrganization.hxx index 728dc66a88..fd3490f190 100644 --- a/src/StepBasic/StepBasic_HArray1OfOrganization.hxx +++ b/src/StepBasic/StepBasic_HArray1OfOrganization.hxx @@ -17,7 +17,6 @@ #ifndef StepBasic_HArray1OfOrganization_HeaderFile #define StepBasic_HArray1OfOrganization_HeaderFile -#include #include #include diff --git a/src/StepBasic/StepBasic_HArray1OfPerson.hxx b/src/StepBasic/StepBasic_HArray1OfPerson.hxx index 6665438952..9b2971c7ab 100644 --- a/src/StepBasic/StepBasic_HArray1OfPerson.hxx +++ b/src/StepBasic/StepBasic_HArray1OfPerson.hxx @@ -17,7 +17,6 @@ #ifndef StepBasic_HArray1OfPerson_HeaderFile #define StepBasic_HArray1OfPerson_HeaderFile -#include #include #include diff --git a/src/StepBasic/StepBasic_HArray1OfProduct.hxx b/src/StepBasic/StepBasic_HArray1OfProduct.hxx index ec48333703..3eafff0082 100644 --- a/src/StepBasic/StepBasic_HArray1OfProduct.hxx +++ b/src/StepBasic/StepBasic_HArray1OfProduct.hxx @@ -17,7 +17,6 @@ #ifndef StepBasic_HArray1OfProduct_HeaderFile #define StepBasic_HArray1OfProduct_HeaderFile -#include #include #include diff --git a/src/StepBasic/StepBasic_HArray1OfProductContext.hxx b/src/StepBasic/StepBasic_HArray1OfProductContext.hxx index fb7464d44d..de78710744 100644 --- a/src/StepBasic/StepBasic_HArray1OfProductContext.hxx +++ b/src/StepBasic/StepBasic_HArray1OfProductContext.hxx @@ -17,7 +17,6 @@ #ifndef StepBasic_HArray1OfProductContext_HeaderFile #define StepBasic_HArray1OfProductContext_HeaderFile -#include #include #include diff --git a/src/StepBasic/StepBasic_HArray1OfUncertaintyMeasureWithUnit.hxx b/src/StepBasic/StepBasic_HArray1OfUncertaintyMeasureWithUnit.hxx index a784b8eeab..3f8ad2138f 100644 --- a/src/StepBasic/StepBasic_HArray1OfUncertaintyMeasureWithUnit.hxx +++ b/src/StepBasic/StepBasic_HArray1OfUncertaintyMeasureWithUnit.hxx @@ -17,7 +17,6 @@ #ifndef StepBasic_HArray1OfUncertaintyMeasureWithUnit_HeaderFile #define StepBasic_HArray1OfUncertaintyMeasureWithUnit_HeaderFile -#include #include #include diff --git a/src/StepBasic/StepBasic_IdentificationAssignment.cxx b/src/StepBasic/StepBasic_IdentificationAssignment.cxx index 0586ed92bd..87e68c3ac5 100644 --- a/src/StepBasic/StepBasic_IdentificationAssignment.cxx +++ b/src/StepBasic/StepBasic_IdentificationAssignment.cxx @@ -15,7 +15,6 @@ // Generator: ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V1.1 -#include #include #include #include diff --git a/src/StepBasic/StepBasic_IdentificationRole.cxx b/src/StepBasic/StepBasic_IdentificationRole.cxx index b207772bfc..58a3e8b241 100644 --- a/src/StepBasic/StepBasic_IdentificationRole.cxx +++ b/src/StepBasic/StepBasic_IdentificationRole.cxx @@ -15,7 +15,6 @@ // Generator: ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V1.1 -#include #include #include diff --git a/src/StepBasic/StepBasic_LengthMeasureWithUnit.cxx b/src/StepBasic/StepBasic_LengthMeasureWithUnit.cxx index c932e08e3d..4928902bda 100644 --- a/src/StepBasic/StepBasic_LengthMeasureWithUnit.cxx +++ b/src/StepBasic/StepBasic_LengthMeasureWithUnit.cxx @@ -12,7 +12,6 @@ // commercial license or contractual agreement. -#include #include IMPLEMENT_STANDARD_RTTIEXT(StepBasic_LengthMeasureWithUnit,StepBasic_MeasureWithUnit) diff --git a/src/StepBasic/StepBasic_LengthMeasureWithUnit.hxx b/src/StepBasic/StepBasic_LengthMeasureWithUnit.hxx index 43df031300..bca634b897 100644 --- a/src/StepBasic/StepBasic_LengthMeasureWithUnit.hxx +++ b/src/StepBasic/StepBasic_LengthMeasureWithUnit.hxx @@ -18,7 +18,6 @@ #define _StepBasic_LengthMeasureWithUnit_HeaderFile #include -#include #include diff --git a/src/StepBasic/StepBasic_LocalTime.hxx b/src/StepBasic/StepBasic_LocalTime.hxx index e2ade64dff..970da885c1 100644 --- a/src/StepBasic/StepBasic_LocalTime.hxx +++ b/src/StepBasic/StepBasic_LocalTime.hxx @@ -21,8 +21,6 @@ #include #include -#include -#include #include class StepBasic_CoordinatedUniversalTimeOffset; diff --git a/src/StepBasic/StepBasic_MassMeasureWithUnit.cxx b/src/StepBasic/StepBasic_MassMeasureWithUnit.cxx index 7a0732cf89..b8367a8a0b 100644 --- a/src/StepBasic/StepBasic_MassMeasureWithUnit.cxx +++ b/src/StepBasic/StepBasic_MassMeasureWithUnit.cxx @@ -12,7 +12,6 @@ // commercial license or contractual agreement. -#include #include IMPLEMENT_STANDARD_RTTIEXT(StepBasic_MassMeasureWithUnit,StepBasic_MeasureWithUnit) diff --git a/src/StepBasic/StepBasic_MassMeasureWithUnit.hxx b/src/StepBasic/StepBasic_MassMeasureWithUnit.hxx index b9b61ae4cb..a99ea387b4 100644 --- a/src/StepBasic/StepBasic_MassMeasureWithUnit.hxx +++ b/src/StepBasic/StepBasic_MassMeasureWithUnit.hxx @@ -17,7 +17,6 @@ #define _StepBasic_MassMeasureWithUnit_HeaderFile #include -#include #include diff --git a/src/StepBasic/StepBasic_MeasureValueMember.hxx b/src/StepBasic/StepBasic_MeasureValueMember.hxx index 3722d4fa1d..f28bd42b6e 100644 --- a/src/StepBasic/StepBasic_MeasureValueMember.hxx +++ b/src/StepBasic/StepBasic_MeasureValueMember.hxx @@ -22,8 +22,6 @@ #include #include -#include -#include class StepBasic_MeasureValueMember; diff --git a/src/StepBasic/StepBasic_MeasureWithUnit.hxx b/src/StepBasic/StepBasic_MeasureWithUnit.hxx index 41b7153ee1..919ed1f136 100644 --- a/src/StepBasic/StepBasic_MeasureWithUnit.hxx +++ b/src/StepBasic/StepBasic_MeasureWithUnit.hxx @@ -22,7 +22,6 @@ #include #include -#include class StepBasic_MeasureValueMember; diff --git a/src/StepBasic/StepBasic_NameAssignment.cxx b/src/StepBasic/StepBasic_NameAssignment.cxx index 088dd0620f..1a2d0f9bed 100644 --- a/src/StepBasic/StepBasic_NameAssignment.cxx +++ b/src/StepBasic/StepBasic_NameAssignment.cxx @@ -15,7 +15,6 @@ // Generator: ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V1.1 -#include #include #include diff --git a/src/StepBasic/StepBasic_ObjectRole.cxx b/src/StepBasic/StepBasic_ObjectRole.cxx index 44bd32fae8..ae405707c7 100644 --- a/src/StepBasic/StepBasic_ObjectRole.cxx +++ b/src/StepBasic/StepBasic_ObjectRole.cxx @@ -15,7 +15,6 @@ // Generator: ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V1.1 -#include #include #include diff --git a/src/StepBasic/StepBasic_Organization.cxx b/src/StepBasic/StepBasic_Organization.cxx index dd627752ed..36e66773f7 100644 --- a/src/StepBasic/StepBasic_Organization.cxx +++ b/src/StepBasic/StepBasic_Organization.cxx @@ -12,7 +12,6 @@ // commercial license or contractual agreement. -#include #include #include diff --git a/src/StepBasic/StepBasic_OrganizationRole.cxx b/src/StepBasic/StepBasic_OrganizationRole.cxx index ee60ce4be6..e3cfb0fe79 100644 --- a/src/StepBasic/StepBasic_OrganizationRole.cxx +++ b/src/StepBasic/StepBasic_OrganizationRole.cxx @@ -12,7 +12,6 @@ // commercial license or contractual agreement. -#include #include #include diff --git a/src/StepBasic/StepBasic_OrganizationalAddress.cxx b/src/StepBasic/StepBasic_OrganizationalAddress.cxx index 5af43a3e4f..fade29e416 100644 --- a/src/StepBasic/StepBasic_OrganizationalAddress.cxx +++ b/src/StepBasic/StepBasic_OrganizationalAddress.cxx @@ -12,8 +12,6 @@ // commercial license or contractual agreement. -#include -#include #include #include diff --git a/src/StepBasic/StepBasic_Person.cxx b/src/StepBasic/StepBasic_Person.cxx index 44b2b1176a..a90fd0c1b5 100644 --- a/src/StepBasic/StepBasic_Person.cxx +++ b/src/StepBasic/StepBasic_Person.cxx @@ -12,7 +12,6 @@ // commercial license or contractual agreement. -#include #include #include diff --git a/src/StepBasic/StepBasic_Person.hxx b/src/StepBasic/StepBasic_Person.hxx index a9ab2fca0c..9eb5de333b 100644 --- a/src/StepBasic/StepBasic_Person.hxx +++ b/src/StepBasic/StepBasic_Person.hxx @@ -18,7 +18,6 @@ #define _StepBasic_Person_HeaderFile #include -#include #include #include diff --git a/src/StepBasic/StepBasic_PersonAndOrganization.cxx b/src/StepBasic/StepBasic_PersonAndOrganization.cxx index 8b96d4adc4..a71c6e4eae 100644 --- a/src/StepBasic/StepBasic_PersonAndOrganization.cxx +++ b/src/StepBasic/StepBasic_PersonAndOrganization.cxx @@ -12,7 +12,6 @@ // commercial license or contractual agreement. -#include #include #include #include diff --git a/src/StepBasic/StepBasic_PersonAndOrganizationRole.cxx b/src/StepBasic/StepBasic_PersonAndOrganizationRole.cxx index bfb39bcaf5..94a9569204 100644 --- a/src/StepBasic/StepBasic_PersonAndOrganizationRole.cxx +++ b/src/StepBasic/StepBasic_PersonAndOrganizationRole.cxx @@ -12,7 +12,6 @@ // commercial license or contractual agreement. -#include #include #include diff --git a/src/StepBasic/StepBasic_PersonalAddress.cxx b/src/StepBasic/StepBasic_PersonalAddress.cxx index 8ac843113c..b469fa9f1e 100644 --- a/src/StepBasic/StepBasic_PersonalAddress.cxx +++ b/src/StepBasic/StepBasic_PersonalAddress.cxx @@ -12,8 +12,6 @@ // commercial license or contractual agreement. -#include -#include #include #include diff --git a/src/StepBasic/StepBasic_PersonalAddress.hxx b/src/StepBasic/StepBasic_PersonalAddress.hxx index 280f5c635c..17836b13ba 100644 --- a/src/StepBasic/StepBasic_PersonalAddress.hxx +++ b/src/StepBasic/StepBasic_PersonalAddress.hxx @@ -18,7 +18,6 @@ #define _StepBasic_PersonalAddress_HeaderFile #include -#include #include #include diff --git a/src/StepBasic/StepBasic_PlaneAngleMeasureWithUnit.cxx b/src/StepBasic/StepBasic_PlaneAngleMeasureWithUnit.cxx index 4a9f99af3a..76bfc0a3cb 100644 --- a/src/StepBasic/StepBasic_PlaneAngleMeasureWithUnit.cxx +++ b/src/StepBasic/StepBasic_PlaneAngleMeasureWithUnit.cxx @@ -12,7 +12,6 @@ // commercial license or contractual agreement. -#include #include IMPLEMENT_STANDARD_RTTIEXT(StepBasic_PlaneAngleMeasureWithUnit,StepBasic_MeasureWithUnit) diff --git a/src/StepBasic/StepBasic_PlaneAngleMeasureWithUnit.hxx b/src/StepBasic/StepBasic_PlaneAngleMeasureWithUnit.hxx index 4971ca5f65..3c4cc51f51 100644 --- a/src/StepBasic/StepBasic_PlaneAngleMeasureWithUnit.hxx +++ b/src/StepBasic/StepBasic_PlaneAngleMeasureWithUnit.hxx @@ -18,7 +18,6 @@ #define _StepBasic_PlaneAngleMeasureWithUnit_HeaderFile #include -#include #include diff --git a/src/StepBasic/StepBasic_Product.cxx b/src/StepBasic/StepBasic_Product.cxx index 4e90722bd5..5f33c35221 100644 --- a/src/StepBasic/StepBasic_Product.cxx +++ b/src/StepBasic/StepBasic_Product.cxx @@ -12,7 +12,6 @@ // commercial license or contractual agreement. -#include #include #include #include diff --git a/src/StepBasic/StepBasic_ProductCategory.cxx b/src/StepBasic/StepBasic_ProductCategory.cxx index 839050f93e..d162c858c8 100644 --- a/src/StepBasic/StepBasic_ProductCategory.cxx +++ b/src/StepBasic/StepBasic_ProductCategory.cxx @@ -12,7 +12,6 @@ // commercial license or contractual agreement. -#include #include #include diff --git a/src/StepBasic/StepBasic_ProductCategoryRelationship.cxx b/src/StepBasic/StepBasic_ProductCategoryRelationship.cxx index bb849b21b3..75168c9915 100644 --- a/src/StepBasic/StepBasic_ProductCategoryRelationship.cxx +++ b/src/StepBasic/StepBasic_ProductCategoryRelationship.cxx @@ -16,7 +16,6 @@ // Generator: ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V1.0 -#include #include #include #include diff --git a/src/StepBasic/StepBasic_ProductCategoryRelationship.hxx b/src/StepBasic/StepBasic_ProductCategoryRelationship.hxx index 185a740765..7e0e07fb8e 100644 --- a/src/StepBasic/StepBasic_ProductCategoryRelationship.hxx +++ b/src/StepBasic/StepBasic_ProductCategoryRelationship.hxx @@ -20,7 +20,6 @@ #include #include -#include #include class TCollection_HAsciiString; class StepBasic_ProductCategory; diff --git a/src/StepBasic/StepBasic_ProductConceptContext.cxx b/src/StepBasic/StepBasic_ProductConceptContext.cxx index 57db27ca25..909d857aed 100644 --- a/src/StepBasic/StepBasic_ProductConceptContext.cxx +++ b/src/StepBasic/StepBasic_ProductConceptContext.cxx @@ -16,7 +16,6 @@ // Generator: ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V1.0 -#include #include #include #include diff --git a/src/StepBasic/StepBasic_ProductContext.cxx b/src/StepBasic/StepBasic_ProductContext.cxx index 3e419c506e..6c37a0756e 100644 --- a/src/StepBasic/StepBasic_ProductContext.cxx +++ b/src/StepBasic/StepBasic_ProductContext.cxx @@ -12,7 +12,6 @@ // commercial license or contractual agreement. -#include #include #include #include diff --git a/src/StepBasic/StepBasic_ProductDefinition.cxx b/src/StepBasic/StepBasic_ProductDefinition.cxx index 7cdc7a64a9..7ae54bb896 100644 --- a/src/StepBasic/StepBasic_ProductDefinition.cxx +++ b/src/StepBasic/StepBasic_ProductDefinition.cxx @@ -12,7 +12,6 @@ // commercial license or contractual agreement. -#include #include #include #include diff --git a/src/StepBasic/StepBasic_ProductDefinitionContext.cxx b/src/StepBasic/StepBasic_ProductDefinitionContext.cxx index 3a38b0b9c8..cbfda33fcf 100644 --- a/src/StepBasic/StepBasic_ProductDefinitionContext.cxx +++ b/src/StepBasic/StepBasic_ProductDefinitionContext.cxx @@ -12,7 +12,6 @@ // commercial license or contractual agreement. -#include #include #include #include diff --git a/src/StepBasic/StepBasic_ProductDefinitionEffectivity.cxx b/src/StepBasic/StepBasic_ProductDefinitionEffectivity.cxx index 15ea1b9539..19f008a10b 100644 --- a/src/StepBasic/StepBasic_ProductDefinitionEffectivity.cxx +++ b/src/StepBasic/StepBasic_ProductDefinitionEffectivity.cxx @@ -12,7 +12,6 @@ // commercial license or contractual agreement. -#include #include #include #include diff --git a/src/StepBasic/StepBasic_ProductDefinitionFormation.cxx b/src/StepBasic/StepBasic_ProductDefinitionFormation.cxx index 14258d2b90..fd74e96f80 100644 --- a/src/StepBasic/StepBasic_ProductDefinitionFormation.cxx +++ b/src/StepBasic/StepBasic_ProductDefinitionFormation.cxx @@ -12,7 +12,6 @@ // commercial license or contractual agreement. -#include #include #include #include diff --git a/src/StepBasic/StepBasic_ProductDefinitionFormationRelationship.cxx b/src/StepBasic/StepBasic_ProductDefinitionFormationRelationship.cxx index db34db5261..97ecf2a1f4 100644 --- a/src/StepBasic/StepBasic_ProductDefinitionFormationRelationship.cxx +++ b/src/StepBasic/StepBasic_ProductDefinitionFormationRelationship.cxx @@ -15,7 +15,6 @@ // Generator: ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V1.2 -#include #include #include #include diff --git a/src/StepBasic/StepBasic_ProductDefinitionFormationWithSpecifiedSource.cxx b/src/StepBasic/StepBasic_ProductDefinitionFormationWithSpecifiedSource.cxx index 51f1223a2f..c3d9841c6f 100644 --- a/src/StepBasic/StepBasic_ProductDefinitionFormationWithSpecifiedSource.cxx +++ b/src/StepBasic/StepBasic_ProductDefinitionFormationWithSpecifiedSource.cxx @@ -12,7 +12,6 @@ // commercial license or contractual agreement. -#include #include #include #include diff --git a/src/StepBasic/StepBasic_ProductDefinitionOrReference.cxx b/src/StepBasic/StepBasic_ProductDefinitionOrReference.cxx index ff295ec07c..a21e9a783d 100644 --- a/src/StepBasic/StepBasic_ProductDefinitionOrReference.cxx +++ b/src/StepBasic/StepBasic_ProductDefinitionOrReference.cxx @@ -16,7 +16,6 @@ #include #include -#include #include #include #include diff --git a/src/StepBasic/StepBasic_ProductDefinitionReference.cxx b/src/StepBasic/StepBasic_ProductDefinitionReference.cxx index e928186cb5..23e050dd5f 100644 --- a/src/StepBasic/StepBasic_ProductDefinitionReference.cxx +++ b/src/StepBasic/StepBasic_ProductDefinitionReference.cxx @@ -13,7 +13,6 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -#include #include #include diff --git a/src/StepBasic/StepBasic_ProductDefinitionReference.hxx b/src/StepBasic/StepBasic_ProductDefinitionReference.hxx index 846e0bc769..df986ef3e9 100644 --- a/src/StepBasic/StepBasic_ProductDefinitionReference.hxx +++ b/src/StepBasic/StepBasic_ProductDefinitionReference.hxx @@ -19,7 +19,6 @@ #include #include -#include #include class TCollection_HAsciiString; diff --git a/src/StepBasic/StepBasic_ProductDefinitionReferenceWithLocalRepresentation.cxx b/src/StepBasic/StepBasic_ProductDefinitionReferenceWithLocalRepresentation.cxx index 7260722b29..5d33d4a319 100644 --- a/src/StepBasic/StepBasic_ProductDefinitionReferenceWithLocalRepresentation.cxx +++ b/src/StepBasic/StepBasic_ProductDefinitionReferenceWithLocalRepresentation.cxx @@ -14,7 +14,6 @@ // commercial license or contractual agreement. -#include #include #include diff --git a/src/StepBasic/StepBasic_ProductDefinitionRelationship.cxx b/src/StepBasic/StepBasic_ProductDefinitionRelationship.cxx index 0eae32307f..7406fa04fb 100644 --- a/src/StepBasic/StepBasic_ProductDefinitionRelationship.cxx +++ b/src/StepBasic/StepBasic_ProductDefinitionRelationship.cxx @@ -15,9 +15,7 @@ // Generator: ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V1.1 -#include #include -#include #include #include diff --git a/src/StepBasic/StepBasic_ProductDefinitionRelationship.hxx b/src/StepBasic/StepBasic_ProductDefinitionRelationship.hxx index 46f5c11edb..ec18a3e7f3 100644 --- a/src/StepBasic/StepBasic_ProductDefinitionRelationship.hxx +++ b/src/StepBasic/StepBasic_ProductDefinitionRelationship.hxx @@ -19,7 +19,6 @@ #include #include -#include #include #include class TCollection_HAsciiString; diff --git a/src/StepBasic/StepBasic_ProductDefinitionWithAssociatedDocuments.cxx b/src/StepBasic/StepBasic_ProductDefinitionWithAssociatedDocuments.cxx index 9a3f2221dd..40f1bd596c 100644 --- a/src/StepBasic/StepBasic_ProductDefinitionWithAssociatedDocuments.cxx +++ b/src/StepBasic/StepBasic_ProductDefinitionWithAssociatedDocuments.cxx @@ -12,8 +12,6 @@ // commercial license or contractual agreement. -#include -#include #include #include #include diff --git a/src/StepBasic/StepBasic_ProductRelatedProductCategory.cxx b/src/StepBasic/StepBasic_ProductRelatedProductCategory.cxx index 5ddf88cbb5..e259169985 100644 --- a/src/StepBasic/StepBasic_ProductRelatedProductCategory.cxx +++ b/src/StepBasic/StepBasic_ProductRelatedProductCategory.cxx @@ -12,8 +12,6 @@ // commercial license or contractual agreement. -#include -#include #include #include diff --git a/src/StepBasic/StepBasic_RatioMeasureWithUnit.cxx b/src/StepBasic/StepBasic_RatioMeasureWithUnit.cxx index f44de4af19..ac3f77f79f 100644 --- a/src/StepBasic/StepBasic_RatioMeasureWithUnit.cxx +++ b/src/StepBasic/StepBasic_RatioMeasureWithUnit.cxx @@ -12,7 +12,6 @@ // commercial license or contractual agreement. -#include #include IMPLEMENT_STANDARD_RTTIEXT(StepBasic_RatioMeasureWithUnit,StepBasic_MeasureWithUnit) diff --git a/src/StepBasic/StepBasic_RatioMeasureWithUnit.hxx b/src/StepBasic/StepBasic_RatioMeasureWithUnit.hxx index 512164ecc2..07d69fb208 100644 --- a/src/StepBasic/StepBasic_RatioMeasureWithUnit.hxx +++ b/src/StepBasic/StepBasic_RatioMeasureWithUnit.hxx @@ -18,7 +18,6 @@ #define _StepBasic_RatioMeasureWithUnit_HeaderFile #include -#include #include diff --git a/src/StepBasic/StepBasic_RoleAssociation.cxx b/src/StepBasic/StepBasic_RoleAssociation.cxx index b40837b528..cc19182799 100644 --- a/src/StepBasic/StepBasic_RoleAssociation.cxx +++ b/src/StepBasic/StepBasic_RoleAssociation.cxx @@ -15,7 +15,6 @@ // Generator: ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V1.1 -#include #include #include #include diff --git a/src/StepBasic/StepBasic_SecurityClassification.cxx b/src/StepBasic/StepBasic_SecurityClassification.cxx index f4006822d2..693da7b8d8 100644 --- a/src/StepBasic/StepBasic_SecurityClassification.cxx +++ b/src/StepBasic/StepBasic_SecurityClassification.cxx @@ -12,7 +12,6 @@ // commercial license or contractual agreement. -#include #include #include #include diff --git a/src/StepBasic/StepBasic_SecurityClassificationLevel.cxx b/src/StepBasic/StepBasic_SecurityClassificationLevel.cxx index 5bfa210389..c3159756b3 100644 --- a/src/StepBasic/StepBasic_SecurityClassificationLevel.cxx +++ b/src/StepBasic/StepBasic_SecurityClassificationLevel.cxx @@ -12,7 +12,6 @@ // commercial license or contractual agreement. -#include #include #include diff --git a/src/StepBasic/StepBasic_SiUnit.hxx b/src/StepBasic/StepBasic_SiUnit.hxx index 6e88e2a99f..a9c676aa5f 100644 --- a/src/StepBasic/StepBasic_SiUnit.hxx +++ b/src/StepBasic/StepBasic_SiUnit.hxx @@ -22,7 +22,6 @@ #include #include -#include #include class StepBasic_DimensionalExponents; diff --git a/src/StepBasic/StepBasic_SiUnitAndLengthUnit.cxx b/src/StepBasic/StepBasic_SiUnitAndLengthUnit.cxx index 14b98bb81c..8ac2b4ccb6 100644 --- a/src/StepBasic/StepBasic_SiUnitAndLengthUnit.cxx +++ b/src/StepBasic/StepBasic_SiUnitAndLengthUnit.cxx @@ -15,7 +15,6 @@ #include #include #include -#include #include IMPLEMENT_STANDARD_RTTIEXT(StepBasic_SiUnitAndLengthUnit,StepBasic_SiUnit) diff --git a/src/StepBasic/StepBasic_SiUnitAndLengthUnit.hxx b/src/StepBasic/StepBasic_SiUnitAndLengthUnit.hxx index d0409186fa..584c56ed93 100644 --- a/src/StepBasic/StepBasic_SiUnitAndLengthUnit.hxx +++ b/src/StepBasic/StepBasic_SiUnitAndLengthUnit.hxx @@ -21,7 +21,6 @@ #include #include -#include #include #include class StepBasic_LengthUnit; diff --git a/src/StepBasic/StepBasic_SiUnitAndMassUnit.cxx b/src/StepBasic/StepBasic_SiUnitAndMassUnit.cxx index 71b8b4d7d7..0efc9d0cef 100644 --- a/src/StepBasic/StepBasic_SiUnitAndMassUnit.cxx +++ b/src/StepBasic/StepBasic_SiUnitAndMassUnit.cxx @@ -15,7 +15,6 @@ #include #include #include -#include #include IMPLEMENT_STANDARD_RTTIEXT(StepBasic_SiUnitAndMassUnit,StepBasic_SiUnit) diff --git a/src/StepBasic/StepBasic_SiUnitAndMassUnit.hxx b/src/StepBasic/StepBasic_SiUnitAndMassUnit.hxx index ea2343cbc1..6cf72fb601 100644 --- a/src/StepBasic/StepBasic_SiUnitAndMassUnit.hxx +++ b/src/StepBasic/StepBasic_SiUnitAndMassUnit.hxx @@ -20,7 +20,6 @@ #include #include -#include #include #include class StepBasic_MassUnit; diff --git a/src/StepBasic/StepBasic_SiUnitAndPlaneAngleUnit.cxx b/src/StepBasic/StepBasic_SiUnitAndPlaneAngleUnit.cxx index 9ea9ef4f76..28cdf363b8 100644 --- a/src/StepBasic/StepBasic_SiUnitAndPlaneAngleUnit.cxx +++ b/src/StepBasic/StepBasic_SiUnitAndPlaneAngleUnit.cxx @@ -15,7 +15,6 @@ #include #include #include -#include #include IMPLEMENT_STANDARD_RTTIEXT(StepBasic_SiUnitAndPlaneAngleUnit,StepBasic_SiUnit) diff --git a/src/StepBasic/StepBasic_SiUnitAndPlaneAngleUnit.hxx b/src/StepBasic/StepBasic_SiUnitAndPlaneAngleUnit.hxx index 8bb80a5ea6..ab906c5845 100644 --- a/src/StepBasic/StepBasic_SiUnitAndPlaneAngleUnit.hxx +++ b/src/StepBasic/StepBasic_SiUnitAndPlaneAngleUnit.hxx @@ -21,7 +21,6 @@ #include #include -#include #include #include class StepBasic_PlaneAngleUnit; diff --git a/src/StepBasic/StepBasic_SiUnitAndRatioUnit.cxx b/src/StepBasic/StepBasic_SiUnitAndRatioUnit.cxx index 80259c2cd3..2992ae54b0 100644 --- a/src/StepBasic/StepBasic_SiUnitAndRatioUnit.cxx +++ b/src/StepBasic/StepBasic_SiUnitAndRatioUnit.cxx @@ -15,7 +15,6 @@ #include #include #include -#include #include IMPLEMENT_STANDARD_RTTIEXT(StepBasic_SiUnitAndRatioUnit,StepBasic_SiUnit) diff --git a/src/StepBasic/StepBasic_SiUnitAndRatioUnit.hxx b/src/StepBasic/StepBasic_SiUnitAndRatioUnit.hxx index a6fce9cf3c..8238aa6519 100644 --- a/src/StepBasic/StepBasic_SiUnitAndRatioUnit.hxx +++ b/src/StepBasic/StepBasic_SiUnitAndRatioUnit.hxx @@ -21,7 +21,6 @@ #include #include -#include #include #include class StepBasic_RatioUnit; diff --git a/src/StepBasic/StepBasic_SiUnitAndSolidAngleUnit.cxx b/src/StepBasic/StepBasic_SiUnitAndSolidAngleUnit.cxx index 14b144e9e4..347303135e 100644 --- a/src/StepBasic/StepBasic_SiUnitAndSolidAngleUnit.cxx +++ b/src/StepBasic/StepBasic_SiUnitAndSolidAngleUnit.cxx @@ -14,7 +14,6 @@ #include #include -#include #include #include diff --git a/src/StepBasic/StepBasic_SiUnitAndSolidAngleUnit.hxx b/src/StepBasic/StepBasic_SiUnitAndSolidAngleUnit.hxx index 4722d4c3ef..43c0392821 100644 --- a/src/StepBasic/StepBasic_SiUnitAndSolidAngleUnit.hxx +++ b/src/StepBasic/StepBasic_SiUnitAndSolidAngleUnit.hxx @@ -21,7 +21,6 @@ #include #include -#include #include #include class StepBasic_SolidAngleUnit; diff --git a/src/StepBasic/StepBasic_SiUnitAndThermodynamicTemperatureUnit.cxx b/src/StepBasic/StepBasic_SiUnitAndThermodynamicTemperatureUnit.cxx index 1c97e2b573..35fa5e9572 100644 --- a/src/StepBasic/StepBasic_SiUnitAndThermodynamicTemperatureUnit.cxx +++ b/src/StepBasic/StepBasic_SiUnitAndThermodynamicTemperatureUnit.cxx @@ -14,7 +14,6 @@ #include #include -#include #include #include diff --git a/src/StepBasic/StepBasic_SiUnitAndThermodynamicTemperatureUnit.hxx b/src/StepBasic/StepBasic_SiUnitAndThermodynamicTemperatureUnit.hxx index 5ae21a871a..631afd98e0 100644 --- a/src/StepBasic/StepBasic_SiUnitAndThermodynamicTemperatureUnit.hxx +++ b/src/StepBasic/StepBasic_SiUnitAndThermodynamicTemperatureUnit.hxx @@ -20,7 +20,6 @@ #include #include -#include #include #include class StepBasic_ThermodynamicTemperatureUnit; diff --git a/src/StepBasic/StepBasic_SiUnitAndTimeUnit.cxx b/src/StepBasic/StepBasic_SiUnitAndTimeUnit.cxx index ac50f3a49c..5febfb43ae 100644 --- a/src/StepBasic/StepBasic_SiUnitAndTimeUnit.cxx +++ b/src/StepBasic/StepBasic_SiUnitAndTimeUnit.cxx @@ -14,7 +14,6 @@ #include #include -#include #include #include diff --git a/src/StepBasic/StepBasic_SiUnitAndTimeUnit.hxx b/src/StepBasic/StepBasic_SiUnitAndTimeUnit.hxx index d3e7db5230..43cebdf265 100644 --- a/src/StepBasic/StepBasic_SiUnitAndTimeUnit.hxx +++ b/src/StepBasic/StepBasic_SiUnitAndTimeUnit.hxx @@ -21,7 +21,6 @@ #include #include -#include #include #include class StepBasic_TimeUnit; diff --git a/src/StepBasic/StepBasic_SizeMember.hxx b/src/StepBasic/StepBasic_SizeMember.hxx index 6c444db3a4..e823b98861 100644 --- a/src/StepBasic/StepBasic_SizeMember.hxx +++ b/src/StepBasic/StepBasic_SizeMember.hxx @@ -21,8 +21,6 @@ #include #include -#include -#include class StepBasic_SizeMember; diff --git a/src/StepBasic/StepBasic_SizeSelect.cxx b/src/StepBasic/StepBasic_SizeSelect.cxx index 74c4f4bef8..39fbf62f5f 100644 --- a/src/StepBasic/StepBasic_SizeSelect.cxx +++ b/src/StepBasic/StepBasic_SizeSelect.cxx @@ -12,7 +12,6 @@ // commercial license or contractual agreement. -#include #include #include #include diff --git a/src/StepBasic/StepBasic_SizeSelect.hxx b/src/StepBasic/StepBasic_SizeSelect.hxx index c2007a4927..62cc3dea35 100644 --- a/src/StepBasic/StepBasic_SizeSelect.hxx +++ b/src/StepBasic/StepBasic_SizeSelect.hxx @@ -23,7 +23,6 @@ #include #include -#include class Standard_Transient; class StepData_SelectMember; diff --git a/src/StepBasic/StepBasic_SolidAngleMeasureWithUnit.cxx b/src/StepBasic/StepBasic_SolidAngleMeasureWithUnit.cxx index 7d9926ea3d..b04a10e813 100644 --- a/src/StepBasic/StepBasic_SolidAngleMeasureWithUnit.cxx +++ b/src/StepBasic/StepBasic_SolidAngleMeasureWithUnit.cxx @@ -12,7 +12,6 @@ // commercial license or contractual agreement. -#include #include IMPLEMENT_STANDARD_RTTIEXT(StepBasic_SolidAngleMeasureWithUnit,StepBasic_MeasureWithUnit) diff --git a/src/StepBasic/StepBasic_SolidAngleMeasureWithUnit.hxx b/src/StepBasic/StepBasic_SolidAngleMeasureWithUnit.hxx index 7063882b71..8a23bf0578 100644 --- a/src/StepBasic/StepBasic_SolidAngleMeasureWithUnit.hxx +++ b/src/StepBasic/StepBasic_SolidAngleMeasureWithUnit.hxx @@ -18,7 +18,6 @@ #define _StepBasic_SolidAngleMeasureWithUnit_HeaderFile #include -#include #include diff --git a/src/StepBasic/StepBasic_SourceItem.cxx b/src/StepBasic/StepBasic_SourceItem.cxx index 367cd8ff53..11baa5315f 100644 --- a/src/StepBasic/StepBasic_SourceItem.cxx +++ b/src/StepBasic/StepBasic_SourceItem.cxx @@ -17,7 +17,6 @@ #include #include -#include #include #include diff --git a/src/StepBasic/StepBasic_TimeMeasureWithUnit.cxx b/src/StepBasic/StepBasic_TimeMeasureWithUnit.cxx index b91b1c6121..f2015d13bd 100644 --- a/src/StepBasic/StepBasic_TimeMeasureWithUnit.cxx +++ b/src/StepBasic/StepBasic_TimeMeasureWithUnit.cxx @@ -12,7 +12,6 @@ // commercial license or contractual agreement. -#include #include IMPLEMENT_STANDARD_RTTIEXT(StepBasic_TimeMeasureWithUnit,StepBasic_MeasureWithUnit) diff --git a/src/StepBasic/StepBasic_TimeMeasureWithUnit.hxx b/src/StepBasic/StepBasic_TimeMeasureWithUnit.hxx index 90d9077d77..7cec3644f8 100644 --- a/src/StepBasic/StepBasic_TimeMeasureWithUnit.hxx +++ b/src/StepBasic/StepBasic_TimeMeasureWithUnit.hxx @@ -18,7 +18,6 @@ #define _StepBasic_TimeMeasureWithUnit_HeaderFile #include -#include #include diff --git a/src/StepBasic/StepBasic_UncertaintyMeasureWithUnit.cxx b/src/StepBasic/StepBasic_UncertaintyMeasureWithUnit.cxx index e98ea70866..6425c1c9e5 100644 --- a/src/StepBasic/StepBasic_UncertaintyMeasureWithUnit.cxx +++ b/src/StepBasic/StepBasic_UncertaintyMeasureWithUnit.cxx @@ -12,7 +12,6 @@ // commercial license or contractual agreement. -#include #include #include #include diff --git a/src/StepBasic/StepBasic_VersionedActionRequest.cxx b/src/StepBasic/StepBasic_VersionedActionRequest.cxx index 098440abe3..f6cd25dba1 100644 --- a/src/StepBasic/StepBasic_VersionedActionRequest.cxx +++ b/src/StepBasic/StepBasic_VersionedActionRequest.cxx @@ -16,7 +16,6 @@ // Generator: ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V1.0 -#include #include #include diff --git a/src/StepBasic/StepBasic_WeekOfYearAndDayDate.hxx b/src/StepBasic/StepBasic_WeekOfYearAndDayDate.hxx index a98f433c05..444896f558 100644 --- a/src/StepBasic/StepBasic_WeekOfYearAndDayDate.hxx +++ b/src/StepBasic/StepBasic_WeekOfYearAndDayDate.hxx @@ -21,7 +21,6 @@ #include #include -#include #include From 6d1a049be75b555eb262a8271c807e7db2898b50 Mon Sep 17 00:00:00 2001 From: atychini Date: Wed, 16 Feb 2022 13:22:23 +0300 Subject: [PATCH 312/639] 0032821: DEWrapper - Implementation of a common toolkit for importing and exporting CAD files Implementing DE_Wrapper and its formats --- adm/MODULES | 2 +- adm/UDLIST | 5 + src/DE/DE_ConfigurationContext.cxx | 429 ++++++++++ src/DE/DE_ConfigurationContext.hxx | 159 ++++ src/DE/DE_ConfigurationNode.cxx | 149 ++++ src/DE/DE_ConfigurationNode.hxx | 154 ++++ src/DE/DE_Provider.cxx | 170 ++++ src/DE/DE_Provider.hxx | 167 ++++ src/DE/DE_Wrapper.cxx | 540 ++++++++++++ src/DE/DE_Wrapper.hxx | 249 ++++++ src/DE/FILES | 8 + .../DEBRepCascade_ConfigurationNode.cxx | 199 +++++ .../DEBRepCascade_ConfigurationNode.hxx | 102 +++ src/DEBRepCascade/DEBRepCascade_Provider.cxx | 295 +++++++ src/DEBRepCascade/DEBRepCascade_Provider.hxx | 136 +++ src/DEBRepCascade/FILES | 4 + .../DEXCAFCascade_ConfigurationNode.cxx | 190 +++++ .../DEXCAFCascade_ConfigurationNode.hxx | 99 +++ src/DEXCAFCascade/DEXCAFCascade_Provider.cxx | 308 +++++++ src/DEXCAFCascade/DEXCAFCascade_Provider.hxx | 136 +++ src/DEXCAFCascade/FILES | 4 + src/IGESCAFControl/FILES | 4 + .../IGESCAFControl_ConfigurationNode.cxx | 450 ++++++++++ .../IGESCAFControl_ConfigurationNode.hxx | 178 ++++ .../IGESCAFControl_Provider.cxx | 394 +++++++++ .../IGESCAFControl_Provider.hxx | 152 ++++ src/IGESCAFControl/IGESCAFControl_Reader.cxx | 4 +- src/IGESCAFControl/IGESCAFControl_Reader.hxx | 6 +- src/RWGltf/FILES | 24 +- src/RWGltf/RWGltf_ConfigurationNode.cxx | 349 ++++++++ src/RWGltf/RWGltf_ConfigurationNode.hxx | 117 +++ src/RWGltf/RWGltf_Provider.cxx | 259 ++++++ src/RWGltf/RWGltf_Provider.hxx | 139 +++ src/RWMesh/FILES | 4 +- src/RWObj/FILES | 4 + src/RWObj/RWObj_ConfigurationNode.cxx | 234 +++++ src/RWObj/RWObj_ConfigurationNode.hxx | 101 +++ src/RWObj/RWObj_Provider.cxx | 246 ++++++ src/RWObj/RWObj_Provider.hxx | 136 +++ src/RWPly/FILES | 4 + src/RWPly/RWPly_ConfigurationNode.cxx | 272 ++++++ src/RWPly/RWPly_ConfigurationNode.hxx | 111 +++ src/RWPly/RWPly_Provider.cxx | 245 ++++++ src/RWPly/RWPly_Provider.hxx | 96 +++ src/RWStl/FILES | 4 + src/RWStl/RWStl_ConfigurationNode.cxx | 185 ++++ src/RWStl/RWStl_ConfigurationNode.hxx | 99 +++ src/RWStl/RWStl_Provider.cxx | 251 ++++++ src/RWStl/RWStl_Provider.hxx | 136 +++ src/STEPCAFControl/FILES | 8 +- .../STEPCAFControl_ConfigurationNode.cxx | 573 +++++++++++++ .../STEPCAFControl_ConfigurationNode.hxx | 234 +++++ .../STEPCAFControl_Provider.cxx | 431 ++++++++++ .../STEPCAFControl_Provider.hxx | 151 ++++ src/STEPCAFControl/STEPCAFControl_Reader.cxx | 36 +- src/STEPCAFControl/STEPCAFControl_Reader.hxx | 28 +- src/STEPControl/STEPControl_Controller.cxx | 50 +- src/TKRWMesh/EXTERNLIB | 2 + src/TKSTL/EXTERNLIB | 4 + src/TKVRML/EXTERNLIB | 3 + src/TKXDE/CMakeLists.txt | 3 + src/TKXDE/EXTERNLIB | 1 + src/TKXDE/FILES | 2 + src/TKXDE/PACKAGES | 1 + src/TKXDECascade/CMakeLists.txt | 3 + src/TKXDECascade/EXTERNLIB | 12 + src/TKXDECascade/FILES | 2 + src/TKXDECascade/PACKAGES | 2 + src/TKXDEDRAW/EXTERNLIB | 4 + src/TKXDEIGES/EXTERNLIB | 2 + src/TKXDESTEP/EXTERNLIB | 2 + src/Vrml/FILES | 4 + src/Vrml/Vrml_ConfigurationNode.cxx | 155 ++++ src/Vrml/Vrml_ConfigurationNode.hxx | 103 +++ src/Vrml/Vrml_Provider.cxx | 285 +++++++ src/Vrml/Vrml_Provider.hxx | 136 +++ src/XDEDRAW/XDEDRAW.cxx | 19 + src/XDEDRAW/XDEDRAW_Common.cxx | 805 +++++++++++++----- src/XSDRAWSTLVRML/XSDRAWSTLVRML.cxx | 1 + tests/de_wrapper/begin | 5 + tests/de_wrapper/brep/A1 | 16 + tests/de_wrapper/brep/A2 | 22 + tests/de_wrapper/brep/A3 | 20 + tests/de_wrapper/brep/A4 | 16 + tests/de_wrapper/brep/begin | 3 + tests/de_wrapper/configuration/A1 | 15 + tests/de_wrapper/configuration/A2 | 15 + tests/de_wrapper/configuration/A3 | 164 ++++ tests/de_wrapper/configuration/A4 | 100 +++ tests/de_wrapper/configuration/begin | 16 + tests/de_wrapper/end | 1 + tests/de_wrapper/gltf/A1 | 23 + tests/de_wrapper/gltf/A2 | 23 + tests/de_wrapper/gltf/A3 | 23 + tests/de_wrapper/gltf/A4 | 16 + tests/de_wrapper/gltf/A5 | 62 ++ tests/de_wrapper/gltf/A6 | 110 +++ tests/de_wrapper/gltf/begin | 3 + tests/de_wrapper/grids.list | 13 + tests/de_wrapper/iges/A1 | 18 + tests/de_wrapper/iges/A2 | 27 + tests/de_wrapper/iges/A3 | 27 + tests/de_wrapper/iges/A4 | 28 + tests/de_wrapper/iges/A5 | 63 ++ tests/de_wrapper/iges/A6 | 110 +++ tests/de_wrapper/iges/begin | 4 + tests/de_wrapper/obj/A1 | 23 + tests/de_wrapper/obj/A2 | 23 + tests/de_wrapper/obj/A3 | 23 + tests/de_wrapper/obj/A4 | 16 + tests/de_wrapper/obj/A5 | 62 ++ tests/de_wrapper/obj/A6 | 110 +++ tests/de_wrapper/obj/begin | 3 + tests/de_wrapper/parse.rules | 4 + tests/de_wrapper/ply/A1 | 16 + tests/de_wrapper/ply/A2 | 17 + tests/de_wrapper/ply/begin | 3 + tests/de_wrapper/step/A1 | 18 + tests/de_wrapper/step/A2 | 23 + tests/de_wrapper/step/A3 | 23 + tests/de_wrapper/step/A4 | 16 + tests/de_wrapper/step/A5 | 62 ++ tests/de_wrapper/step/A6 | 112 +++ tests/de_wrapper/step/begin | 3 + tests/de_wrapper/stl/A1 | 16 + tests/de_wrapper/stl/A2 | 24 + tests/de_wrapper/stl/A3 | 20 + tests/de_wrapper/stl/A4 | 16 + tests/de_wrapper/stl/begin | 4 + tests/de_wrapper/vrml/A1 | 21 + tests/de_wrapper/vrml/A2 | 21 + tests/de_wrapper/vrml/A3 | 16 + tests/de_wrapper/vrml/A4 | 16 + tests/de_wrapper/vrml/A5 | 59 ++ tests/de_wrapper/vrml/A6 | 112 +++ tests/de_wrapper/vrml/begin | 3 + tests/de_wrapper/xcaf/A1 | 22 + tests/de_wrapper/xcaf/A2 | 23 + tests/de_wrapper/xcaf/A3 | 22 + tests/de_wrapper/xcaf/A4 | 16 + tests/de_wrapper/xcaf/begin | 3 + 141 files changed, 12407 insertions(+), 278 deletions(-) create mode 100644 src/DE/DE_ConfigurationContext.cxx create mode 100644 src/DE/DE_ConfigurationContext.hxx create mode 100644 src/DE/DE_ConfigurationNode.cxx create mode 100644 src/DE/DE_ConfigurationNode.hxx create mode 100644 src/DE/DE_Provider.cxx create mode 100644 src/DE/DE_Provider.hxx create mode 100644 src/DE/DE_Wrapper.cxx create mode 100644 src/DE/DE_Wrapper.hxx create mode 100644 src/DE/FILES create mode 100644 src/DEBRepCascade/DEBRepCascade_ConfigurationNode.cxx create mode 100644 src/DEBRepCascade/DEBRepCascade_ConfigurationNode.hxx create mode 100644 src/DEBRepCascade/DEBRepCascade_Provider.cxx create mode 100644 src/DEBRepCascade/DEBRepCascade_Provider.hxx create mode 100644 src/DEBRepCascade/FILES create mode 100644 src/DEXCAFCascade/DEXCAFCascade_ConfigurationNode.cxx create mode 100644 src/DEXCAFCascade/DEXCAFCascade_ConfigurationNode.hxx create mode 100644 src/DEXCAFCascade/DEXCAFCascade_Provider.cxx create mode 100644 src/DEXCAFCascade/DEXCAFCascade_Provider.hxx create mode 100644 src/DEXCAFCascade/FILES create mode 100644 src/IGESCAFControl/IGESCAFControl_ConfigurationNode.cxx create mode 100644 src/IGESCAFControl/IGESCAFControl_ConfigurationNode.hxx create mode 100644 src/IGESCAFControl/IGESCAFControl_Provider.cxx create mode 100644 src/IGESCAFControl/IGESCAFControl_Provider.hxx create mode 100644 src/RWGltf/RWGltf_ConfigurationNode.cxx create mode 100644 src/RWGltf/RWGltf_ConfigurationNode.hxx create mode 100644 src/RWGltf/RWGltf_Provider.cxx create mode 100644 src/RWGltf/RWGltf_Provider.hxx create mode 100644 src/RWObj/RWObj_ConfigurationNode.cxx create mode 100644 src/RWObj/RWObj_ConfigurationNode.hxx create mode 100644 src/RWObj/RWObj_Provider.cxx create mode 100644 src/RWObj/RWObj_Provider.hxx create mode 100644 src/RWPly/RWPly_ConfigurationNode.cxx create mode 100644 src/RWPly/RWPly_ConfigurationNode.hxx create mode 100644 src/RWPly/RWPly_Provider.cxx create mode 100644 src/RWPly/RWPly_Provider.hxx create mode 100644 src/RWStl/RWStl_ConfigurationNode.cxx create mode 100644 src/RWStl/RWStl_ConfigurationNode.hxx create mode 100644 src/RWStl/RWStl_Provider.cxx create mode 100644 src/RWStl/RWStl_Provider.hxx create mode 100644 src/STEPCAFControl/STEPCAFControl_ConfigurationNode.cxx create mode 100644 src/STEPCAFControl/STEPCAFControl_ConfigurationNode.hxx create mode 100644 src/STEPCAFControl/STEPCAFControl_Provider.cxx create mode 100644 src/STEPCAFControl/STEPCAFControl_Provider.hxx create mode 100644 src/TKXDE/CMakeLists.txt create mode 100644 src/TKXDE/EXTERNLIB create mode 100644 src/TKXDE/FILES create mode 100644 src/TKXDE/PACKAGES create mode 100644 src/TKXDECascade/CMakeLists.txt create mode 100644 src/TKXDECascade/EXTERNLIB create mode 100644 src/TKXDECascade/FILES create mode 100644 src/TKXDECascade/PACKAGES create mode 100644 src/Vrml/Vrml_ConfigurationNode.cxx create mode 100644 src/Vrml/Vrml_ConfigurationNode.hxx create mode 100644 src/Vrml/Vrml_Provider.cxx create mode 100644 src/Vrml/Vrml_Provider.hxx create mode 100644 tests/de_wrapper/begin create mode 100644 tests/de_wrapper/brep/A1 create mode 100644 tests/de_wrapper/brep/A2 create mode 100644 tests/de_wrapper/brep/A3 create mode 100644 tests/de_wrapper/brep/A4 create mode 100644 tests/de_wrapper/brep/begin create mode 100644 tests/de_wrapper/configuration/A1 create mode 100644 tests/de_wrapper/configuration/A2 create mode 100644 tests/de_wrapper/configuration/A3 create mode 100644 tests/de_wrapper/configuration/A4 create mode 100644 tests/de_wrapper/configuration/begin create mode 100644 tests/de_wrapper/end create mode 100644 tests/de_wrapper/gltf/A1 create mode 100644 tests/de_wrapper/gltf/A2 create mode 100644 tests/de_wrapper/gltf/A3 create mode 100644 tests/de_wrapper/gltf/A4 create mode 100644 tests/de_wrapper/gltf/A5 create mode 100644 tests/de_wrapper/gltf/A6 create mode 100644 tests/de_wrapper/gltf/begin create mode 100644 tests/de_wrapper/grids.list create mode 100644 tests/de_wrapper/iges/A1 create mode 100644 tests/de_wrapper/iges/A2 create mode 100644 tests/de_wrapper/iges/A3 create mode 100644 tests/de_wrapper/iges/A4 create mode 100644 tests/de_wrapper/iges/A5 create mode 100644 tests/de_wrapper/iges/A6 create mode 100644 tests/de_wrapper/iges/begin create mode 100644 tests/de_wrapper/obj/A1 create mode 100644 tests/de_wrapper/obj/A2 create mode 100644 tests/de_wrapper/obj/A3 create mode 100644 tests/de_wrapper/obj/A4 create mode 100644 tests/de_wrapper/obj/A5 create mode 100644 tests/de_wrapper/obj/A6 create mode 100644 tests/de_wrapper/obj/begin create mode 100644 tests/de_wrapper/parse.rules create mode 100644 tests/de_wrapper/ply/A1 create mode 100644 tests/de_wrapper/ply/A2 create mode 100644 tests/de_wrapper/ply/begin create mode 100644 tests/de_wrapper/step/A1 create mode 100644 tests/de_wrapper/step/A2 create mode 100644 tests/de_wrapper/step/A3 create mode 100644 tests/de_wrapper/step/A4 create mode 100644 tests/de_wrapper/step/A5 create mode 100644 tests/de_wrapper/step/A6 create mode 100644 tests/de_wrapper/step/begin create mode 100644 tests/de_wrapper/stl/A1 create mode 100644 tests/de_wrapper/stl/A2 create mode 100644 tests/de_wrapper/stl/A3 create mode 100644 tests/de_wrapper/stl/A4 create mode 100644 tests/de_wrapper/stl/begin create mode 100644 tests/de_wrapper/vrml/A1 create mode 100644 tests/de_wrapper/vrml/A2 create mode 100644 tests/de_wrapper/vrml/A3 create mode 100644 tests/de_wrapper/vrml/A4 create mode 100644 tests/de_wrapper/vrml/A5 create mode 100644 tests/de_wrapper/vrml/A6 create mode 100644 tests/de_wrapper/vrml/begin create mode 100644 tests/de_wrapper/xcaf/A1 create mode 100644 tests/de_wrapper/xcaf/A2 create mode 100644 tests/de_wrapper/xcaf/A3 create mode 100644 tests/de_wrapper/xcaf/A4 create mode 100644 tests/de_wrapper/xcaf/begin diff --git a/adm/MODULES b/adm/MODULES index 724bf81776..c2f433decd 100644 --- a/adm/MODULES +++ b/adm/MODULES @@ -3,5 +3,5 @@ ModelingData TKG2d TKG3d TKGeomBase TKBRep ModelingAlgorithms TKGeomAlgo TKTopAlgo TKPrim TKBO TKBool TKHLR TKFillet TKOffset TKFeat TKMesh TKXMesh TKShHealing Visualization TKService TKV3d TKOpenGl TKOpenGles TKMeshVS TKIVtk TKD3DHost ApplicationFramework TKCDF TKLCAF TKCAF TKBinL TKXmlL TKBin TKXml TKStdL TKStd TKTObj TKBinTObj TKXmlTObj TKVCAF -DataExchange TKXSBase TKSTEPBase TKSTEPAttr TKSTEP209 TKSTEP TKIGES TKXCAF TKXDEIGES TKXDESTEP TKSTL TKVRML TKXmlXCAF TKBinXCAF TKRWMesh +DataExchange TKXDE TKXSBase TKSTEPBase TKSTEPAttr TKSTEP209 TKSTEP TKIGES TKXCAF TKXDEIGES TKXDESTEP TKSTL TKVRML TKXmlXCAF TKBinXCAF TKRWMesh TKXDECascade Draw TKDraw TKTopTest TKOpenGlTest TKOpenGlesTest TKD3DHostTest TKViewerTest TKXSDRAW TKDCAF TKXDEDRAW TKTObjDRAW TKQADraw TKIVtkDraw DRAWEXE diff --git a/adm/UDLIST b/adm/UDLIST index dce2b25de8..a38b937608 100644 --- a/adm/UDLIST +++ b/adm/UDLIST @@ -384,6 +384,8 @@ t TKSTEPBase t TKSTL t TKVRML t TKXCAF +t TKXDE +t TKXDECascade t TKXDEIGES t TKXDESTEP t TKXSBase @@ -394,6 +396,9 @@ n DBRep n DDF n DDataStd n DDocStd +n DE +n DEXCAFCascade +n DEBRepCascade n DNaming n DPrsStd n Draw diff --git a/src/DE/DE_ConfigurationContext.cxx b/src/DE/DE_ConfigurationContext.cxx new file mode 100644 index 0000000000..14642a5c9d --- /dev/null +++ b/src/DE/DE_ConfigurationContext.cxx @@ -0,0 +1,429 @@ +// Copyright (c) 2022 OPEN CASCADE SAS +// +// This file is part of Open CASCADE Technology software library. +// +// This library is free software; you can redistribute it and/or modify it under +// the terms of the GNU Lesser General Public License version 2.1 as published +// by the Free Software Foundation, with special exception defined in the file +// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT +// distribution for complete text of the license and disclaimer of any warranty. +// +// Alternatively, this file may be used under the terms of Open CASCADE +// commercial license or contractual agreement. + +#include + +#include +#include +#include +#include +#include +#include +#include + +IMPLEMENT_STANDARD_RTTIEXT(DE_ConfigurationContext, Standard_Transient) + +enum DE_ConfigurationContext_KindOfLine +{ + DE_ConfigurationContext_KindOfLine_End, + DE_ConfigurationContext_KindOfLine_Empty, + DE_ConfigurationContext_KindOfLine_Comment, + DE_ConfigurationContext_KindOfLine_Resource, + DE_ConfigurationContext_KindOfLine_Error +}; + +namespace +{ + //======================================================================= + //function : GetLine + //purpose : + //======================================================================= + static Standard_Boolean GetLine(OSD_File& theFile, TCollection_AsciiString& theLine) + { + TCollection_AsciiString aBuffer; + Standard_Integer aBufSize = 10; + Standard_Integer aLen; + theLine.Clear(); + do + { + theFile.ReadLine(aBuffer, aBufSize, aLen); + theLine += aBuffer; + if (theFile.IsAtEnd()) + { + if (!theLine.Length()) + { + return Standard_False; + } + else + { + theLine += "\n"; + } + } + } while (theLine.Value(theLine.Length()) != '\n'); + return Standard_True; + } + + //======================================================================= + //function : WhatKindOfLine + //purpose : + //======================================================================= + static DE_ConfigurationContext_KindOfLine WhatKindOfLine(const TCollection_AsciiString& theLine, + TCollection_AsciiString& theToken1, + TCollection_AsciiString& theToken2) + { + static const TCollection_AsciiString aWhiteSpace = " \t\r\n"; + Standard_Integer aPos1 = 0, aPos2 = 0, aPos = 0; + TCollection_AsciiString aLine(theLine); + aLine.LeftAdjust(); + aLine.RightAdjust(); + if (!aLine.EndsWith(':') && (!aLine.EndsWith(' ') || !aLine.EndsWith('\t') || !aLine.EndsWith('\n'))) + { + aLine.InsertAfter(aLine.Length(), " "); + } + + if (aLine.Value(1) == '!') + { + return DE_ConfigurationContext_KindOfLine_Comment; + } + aPos1 = aLine.FirstLocationNotInSet(aWhiteSpace, 1, aLine.Length()); + if (aLine.Value(aPos1) == '\n') + { + return DE_ConfigurationContext_KindOfLine_Empty; + } + + aPos2 = aLine.Location(1, ':', aPos1, aLine.Length()); + if (aPos2 == 0 || aPos1 == aPos2) + { + return DE_ConfigurationContext_KindOfLine_Error; + } + + for (aPos = aPos2 - 1; aLine.Value(aPos) == '\t' || aLine.Value(aPos) == ' '; aPos--); + + theToken1 = aLine.SubString(aPos1, aPos); + if(aPos2 != aLine.Length()) + { + aPos2++; + } + aPos = aLine.FirstLocationNotInSet(aWhiteSpace, aPos2, aLine.Length()); + if (aPos != 0) + { + if (aLine.Value(aPos) == '\\') + { + switch (aLine.Value(aPos + 1)) + { + case '\\': + case ' ': + case '\t': + aPos++; + break; + } + } + } + if (aPos == aLine.Length() || aPos == 0) + { + theToken2.Clear(); + } + else + { + aLine.Remove(1, aPos - 1); + aLine.Remove(aLine.Length()); + theToken2 = aLine; + } + return DE_ConfigurationContext_KindOfLine_Resource; + } + + //======================================================================= + //function : MakeName + //purpose : + //======================================================================= + static TCollection_AsciiString MakeName(const TCollection_AsciiString& theScope, + const TCollection_AsciiString& theParam) + { + TCollection_AsciiString aStr(theScope); + if (!aStr.IsEmpty()) + { + aStr += '.'; + } + aStr += theParam; + return aStr; + } +} + +//======================================================================= +//function : DE_ConfigurationContext +//purpose : +//======================================================================= +DE_ConfigurationContext::DE_ConfigurationContext() +{} + +//======================================================================= +//function : Load +//purpose : +//======================================================================= +Standard_Boolean DE_ConfigurationContext::Load(const TCollection_AsciiString& theConfiguration) +{ + OSD_Path aPath = theConfiguration; + OSD_File aFile(aPath); + if (!aFile.Exists()) + { + if (!LoadStr(theConfiguration)) + { + return false; + } + } + else + { + if (!LoadFile(theConfiguration)) + { + return false; + } + } + return true; +} + +//======================================================================= +//function : LoadFile +//purpose : +//======================================================================= +Standard_Boolean DE_ConfigurationContext::LoadFile(const TCollection_AsciiString& theFile) +{ + myResource.Clear(); + OSD_Path aPath(theFile); + OSD_File aFile = aPath; + TCollection_AsciiString FileName = aPath.Name(); + aFile.Open(OSD_ReadOnly, OSD_Protection()); + if (aFile.Failed()) + { + Message::SendFail("Error: DE Context loading is stopped. Can't open the file"); + return Standard_True; + } + TCollection_AsciiString aLine; + while (GetLine(aFile, aLine)) + { + if (!load(aLine)) + { + Message::SendFail() << "Error: DE Context loading is stopped. Syntax error: " << aLine; + return Standard_False; + } + } + return Standard_True; +} + +//======================================================================= +//function : LoadStr +//purpose : +//======================================================================= +Standard_Boolean DE_ConfigurationContext::LoadStr(const TCollection_AsciiString& theResource) +{ + myResource.Clear(); + TCollection_AsciiString aLine = ""; + const Standard_Integer aLength = theResource.Length(); + for (Standard_Integer anInd = 1; anInd <= aLength; anInd++) + { + const Standard_Character aChar = theResource.Value(anInd); + if (aChar != '\n') + aLine += aChar; + if ((aChar == '\n' || anInd == aLength) && !aLine.IsEmpty()) + { + if (!load(aLine)) + { + Message::SendFail() << "Error: DE Context loading is stopped. Syntax error: " << aLine; + return Standard_False; + } + aLine.Clear(); + } + } + return Standard_True; +} + +//======================================================================= +//function : IsParamSet +//purpose : +//======================================================================= +Standard_Boolean DE_ConfigurationContext::IsParamSet(const TCollection_AsciiString& theParam, + const TCollection_AsciiString& theScope) const +{ + TCollection_AsciiString aResource(MakeName(theScope, theParam)); + return myResource.IsBound(aResource); +} + +//======================================================================= +//function : RealVal +//purpose : +//======================================================================= +Standard_Real DE_ConfigurationContext::RealVal(const TCollection_AsciiString& theParam, + const Standard_Real theDefValue, + const TCollection_AsciiString& theScope) const +{ + Standard_Real aVal = 0.; + return GetReal(theParam, aVal, theScope) ? aVal : theDefValue; +} + +//======================================================================= +//function : IntegerVal +//purpose : +//======================================================================= +Standard_Integer DE_ConfigurationContext::IntegerVal(const TCollection_AsciiString& theParam, + const Standard_Integer theDefValue, + const TCollection_AsciiString& theScope) const +{ + Standard_Integer aVal = 0; + return GetInteger(theParam, aVal, theScope) ? aVal : theDefValue; +} + +//======================================================================= +//function : BooleanVal +//purpose : +//======================================================================= +Standard_Boolean DE_ConfigurationContext::BooleanVal(const TCollection_AsciiString& theParam, + const Standard_Boolean theDefValue, + const TCollection_AsciiString& theScope) const +{ + Standard_Boolean aVal = Standard_False; + return GetBoolean(theParam, aVal, theScope) ? aVal : theDefValue; +} + +//======================================================================= +//function : StringVal +//purpose : +//======================================================================= +TCollection_AsciiString DE_ConfigurationContext::StringVal(const TCollection_AsciiString& theParam, + const TCollection_AsciiString& theDefValue, + const TCollection_AsciiString& theScope) const +{ + TCollection_AsciiString aVal = ""; + return GetString(theParam, aVal, theScope) ? aVal : theDefValue; +} + +//======================================================================= +//function : GetReal +//purpose : +//======================================================================= +Standard_Boolean DE_ConfigurationContext::GetReal(const TCollection_AsciiString& theParam, + Standard_Real& theValue, + const TCollection_AsciiString& theScope) const +{ + TCollection_AsciiString aStr; + if (!GetString(theParam, aStr, theScope)) + { + return Standard_False; + } + if (aStr.IsRealValue()) + { + theValue = aStr.RealValue(); + return Standard_True; + } + return Standard_False; +} + +//======================================================================= +//function : GetInteger +//purpose : +//======================================================================= +Standard_Boolean DE_ConfigurationContext::GetInteger(const TCollection_AsciiString& theParam, + Standard_Integer& theValue, + const TCollection_AsciiString& theScope) const +{ + TCollection_AsciiString aStr; + if (!GetString(theParam, aStr, theScope)) + { + return Standard_False; + } + if (aStr.IsIntegerValue()) + { + theValue = aStr.IntegerValue(); + return Standard_True; + } + return Standard_False; +} + +//======================================================================= +//function : GetBoolean +//purpose : +//======================================================================= +Standard_Boolean DE_ConfigurationContext::GetBoolean(const TCollection_AsciiString& theParam, + Standard_Boolean& theValue, + const TCollection_AsciiString& theScope) const +{ + TCollection_AsciiString aStr; + if (!GetString(theParam, aStr, theScope)) + { + return Standard_False; + } + if (aStr.IsIntegerValue()) + { + theValue = aStr.IntegerValue() != 0; + return Standard_True; + } + return Standard_False; +} + +//======================================================================= +//function : GetString +//purpose : +//======================================================================= +Standard_Boolean DE_ConfigurationContext::GetString(const TCollection_AsciiString& theParam, + TCollection_AsciiString& theStr, + const TCollection_AsciiString& theScope) const +{ + TCollection_AsciiString aResource = MakeName(theScope, theParam); + return myResource.Find(aResource, theStr); +} + +//======================================================================= +//function : GetStringSeq +//purpose : +//======================================================================= +Standard_Boolean DE_ConfigurationContext::GetStringSeq(const TCollection_AsciiString& theParam, + TColStd_ListOfAsciiString& theValue, + const TCollection_AsciiString& theScope) const +{ + TCollection_AsciiString aStr; + if (!GetString(theParam, aStr, theScope)) + { + return Standard_False; + } + theValue.Clear(); + TCollection_AsciiString anElem; + const Standard_Integer aLength = aStr.Length(); + for (Standard_Integer anInd = 1; anInd <= aLength; anInd++) + { + const Standard_Character aChar = aStr.Value(anInd); + anElem += aChar; + if ((aChar == ' ' || anInd == aLength) && !anElem.IsEmpty()) + { + anElem.RightAdjust(); + anElem.LeftAdjust(); + theValue.Append(anElem); + anElem.Clear(); + } + } + return Standard_True; +} + +//======================================================================= +//function : load +//purpose : +//======================================================================= +Standard_Boolean DE_ConfigurationContext::load(const TCollection_AsciiString& theResourceLine) +{ + if (theResourceLine.IsEmpty()) + { + return Standard_False; + } + TCollection_AsciiString aToken1, aToken2; + DE_ConfigurationContext_KindOfLine aKind = WhatKindOfLine(theResourceLine, aToken1, aToken2); + switch (aKind) + { + case DE_ConfigurationContext_KindOfLine_End: + case DE_ConfigurationContext_KindOfLine_Comment: + case DE_ConfigurationContext_KindOfLine_Empty: + break; + case DE_ConfigurationContext_KindOfLine_Resource: + myResource.Bind(aToken1, aToken2); + break; + case DE_ConfigurationContext_KindOfLine_Error: + break; + } + return Standard_True; +} diff --git a/src/DE/DE_ConfigurationContext.hxx b/src/DE/DE_ConfigurationContext.hxx new file mode 100644 index 0000000000..d7abb18196 --- /dev/null +++ b/src/DE/DE_ConfigurationContext.hxx @@ -0,0 +1,159 @@ +// Copyright (c) 2022 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 _DE_ConfigurationContext_HeaderFile +#define _DE_ConfigurationContext_HeaderFile + +#include +#include + +typedef NCollection_DataMap DE_ResourceMap; + +//! Provides convenient interface to resource file +//! Allows loading of the resource file and getting attributes' +//! values starting from some scope, for example +//! if scope is defined as "ToV4" and requested parameter +//! is "exec.op", value of "ToV4.exec.op" parameter from +//! the resource file will be returned +class DE_ConfigurationContext : public Standard_Transient +{ +public: + DEFINE_STANDARD_RTTIEXT(DE_ConfigurationContext, Standard_Transient) + + //! Creates an empty tool + Standard_EXPORT DE_ConfigurationContext(); + + //! Import the custom configuration + //! Save all parameters with their values. + //! @param[in] theConfiguration path to configuration file or string value + //! @return true in case of success, false otherwise + Standard_EXPORT Standard_Boolean Load(const TCollection_AsciiString& theConfiguration); + + //! Import the resource file. + //! Save all parameters with their values. + //! @param[in] theFile path to the resource file + //! @return true in case of success, false otherwise + Standard_EXPORT Standard_Boolean LoadFile(const TCollection_AsciiString& theFile); + + //! Import the resource string. + //! Save all parameters with their values. + //! @param[in] theResource string with resource content + //! @return true in case of success, false otherwise + Standard_EXPORT Standard_Boolean LoadStr(const TCollection_AsciiString& theResource); + + //! Checks for existing the parameter name + //! @param[in] theParam complex parameter name + //! @param[in] theScope base parameter name + //! @return Standard_True if parameter is defined in the resource file + Standard_EXPORT Standard_Boolean IsParamSet(const TCollection_AsciiString& theParam, + const TCollection_AsciiString& theScope = "") const; + + //! Gets value of parameter as being of specific type + //! @param[in] theParam complex parameter name + //! @param[out] theValue value to get by parameter + //! @param[in] theScope base parameter name + //! @return Standard_False if parameter is not defined or has a wrong type + Standard_EXPORT Standard_Boolean GetReal(const TCollection_AsciiString& theParam, + Standard_Real& theValue, + const TCollection_AsciiString& theScope = "") const; + + //! Gets value of parameter as being of specific type + //! @param[in] theParam complex parameter name + //! @param[out] theValue value to get by parameter + //! @param[in] theScope base parameter name + //! @return Standard_False if parameter is not defined or has a wrong type + Standard_EXPORT Standard_Boolean GetInteger(const TCollection_AsciiString& theParam, + Standard_Integer& theValue, + const TCollection_AsciiString& theScope = "") const; + + //! Gets value of parameter as being of specific type + //! @param[in] theParam complex parameter name + //! @param[out] theValue value to get by parameter + //! @param[in] theScope base parameter name + //! @return Standard_False if parameter is not defined or has a wrong type + Standard_EXPORT Standard_Boolean GetBoolean(const TCollection_AsciiString& theParam, + Standard_Boolean& theValue, + const TCollection_AsciiString& theScope = "") const; + + //! Gets value of parameter as being of specific type + //! @param[in] theParam complex parameter name + //! @param[out] theValue value to get by parameter + //! @param[in] theScope base parameter name + //! @return Standard_False if parameter is not defined or has a wrong type + Standard_EXPORT Standard_Boolean GetString(const TCollection_AsciiString& theParam, + TCollection_AsciiString& theValue, + const TCollection_AsciiString& theScope = "") const; + + //! Gets value of parameter as being of specific type + //! @param[in] theParam complex parameter name + //! @param[out] theValue value to get by parameter + //! @param[in] theScope base parameter name + //! @return Standard_False if parameter is not defined or has a wrong type + Standard_EXPORT Standard_Boolean GetStringSeq(const TCollection_AsciiString& theParam, + TColStd_ListOfAsciiString& theValue, + const TCollection_AsciiString& theScope = "") const; + + //! Gets value of parameter as being of specific type + //! @param[in] theParam complex parameter name + //! @param[in] theDefValue value by default if param is not found or has wrong type + //! @param[in] theScope base parameter name + //! @return specific type value + Standard_EXPORT Standard_Real RealVal(const TCollection_AsciiString& theParam, + const Standard_Real theDefValue, + const TCollection_AsciiString& theScope = "") const; + + //! Gets value of parameter as being of specific type + //! @param[in] theParam complex parameter name + //! @param[in] theDefValue value by default if param is not found or has wrong type + //! @param[in] theScope base parameter name + //! @return specific type value + Standard_EXPORT Standard_Integer IntegerVal(const TCollection_AsciiString& theParam, + const Standard_Integer theDefValue, + const TCollection_AsciiString& theScope = "") const; + + //! Gets value of parameter as being of specific type + //! @param[in] theParam complex parameter name + //! @param[in] theDefValue value by default if param is not found or has wrong type + //! @param[in] theScope base parameter name + //! @return specific type value + Standard_EXPORT Standard_Boolean BooleanVal(const TCollection_AsciiString& theParam, + const Standard_Boolean theDefValue, + const TCollection_AsciiString& theScope = "") const; + + //! Gets value of parameter as being of specific type + //! @param[in] theParam complex parameter name + //! @param[in] theDefValue value by default if param is not found or has wrong type + //! @param[in] theScope base parameter name + //! @return specific type value + Standard_EXPORT TCollection_AsciiString StringVal(const TCollection_AsciiString& theParam, + const TCollection_AsciiString& theDefValue, + const TCollection_AsciiString& theScope = "") const; + + //! Gets internal resource map + //! @return map with resource value + Standard_EXPORT const DE_ResourceMap& GetInternalMap() const { return myResource; } + +protected: + + //! Update the resource with param value from the line + //! @paramp[in] theResourceLine line contains the parameter + //! @return true if theResourceLine has loaded correctly + Standard_Boolean load(const TCollection_AsciiString& theResourceLine); + +private: + + DE_ResourceMap myResource; //!< Internal parameters map + +}; + +#endif // _DE_ConfigurationContext_HeaderFile diff --git a/src/DE/DE_ConfigurationNode.cxx b/src/DE/DE_ConfigurationNode.cxx new file mode 100644 index 0000000000..4ebd69e49b --- /dev/null +++ b/src/DE/DE_ConfigurationNode.cxx @@ -0,0 +1,149 @@ +// Copyright (c) 2022 OPEN CASCADE SAS +// +// This file is part of Open CASCADE Technology software library. +// +// This library is free software; you can redistribute it and/or modify it under +// the terms of the GNU Lesser General Public License version 2.1 as published +// by the Free Software Foundation, with special exception defined in the file +// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT +// distribution for complete text of the license and disclaimer of any warranty. +// +// Alternatively, this file may be used under the terms of Open CASCADE +// commercial license or contractual agreement. + +#include + +#include +#include +#include +#include +#include +#include +#include + +IMPLEMENT_STANDARD_RTTIEXT(DE_ConfigurationNode, Standard_Transient) + +//======================================================================= +// function : DE_ConfigurationNode +// purpose : +//======================================================================= +DE_ConfigurationNode::DE_ConfigurationNode() : + myIsEnabled(Standard_True) +{} + +//======================================================================= +// function : DE_ConfigurationNode +// purpose : +//======================================================================= +DE_ConfigurationNode::DE_ConfigurationNode(const Handle(DE_ConfigurationNode)& theConfigurationNode) +{ + GlobalParameters = theConfigurationNode->GlobalParameters; + myIsEnabled = theConfigurationNode->IsEnabled(); +} + +//======================================================================= +// function : Load +// purpose : +//======================================================================= +bool DE_ConfigurationNode::Load(const TCollection_AsciiString& theResourcePath) +{ + Handle(DE_ConfigurationContext) aResource = new DE_ConfigurationContext(); + aResource->LoadFile(theResourcePath); + return Load(aResource); +} + +//======================================================================= +// function : Save +// purpose : +//======================================================================= +bool DE_ConfigurationNode::Save(const TCollection_AsciiString& theResourcePath) const +{ + OSD_Path aPath = theResourcePath; + OSD_File aFile(aPath); + OSD_Protection aProt; + { + try + { + OCC_CATCH_SIGNALS + aFile.Build(OSD_ReadWrite, aProt); + } + catch (Standard_Failure const&) + { + Message::SendFail() << "Error: Configuration writing process was stopped. Can't build file."; + return false; + } + } + if (aFile.Failed()) + { + Message::SendFail() << "Error: Configuration writing process was stopped. Can't build file."; + return false; + } + TCollection_AsciiString aResConfiguration = Save(); + aFile.Write(aResConfiguration, aResConfiguration.Length()); + aFile.Close(); + return true; +} + +//======================================================================= +// function : UpdateLoad +// purpose : +//======================================================================= +bool DE_ConfigurationNode::UpdateLoad() +{ + return true; +} + +//======================================================================= +// function : IsImportSupported +// purpose : +//======================================================================= +bool DE_ConfigurationNode::IsImportSupported() const +{ + return false; +} + +//======================================================================= +// function : IsExportSupported +// purpose : +//======================================================================= +bool DE_ConfigurationNode::IsExportSupported() const +{ + return false; +} + +//======================================================================= +// function : CheckForSupport +// purpose : +//======================================================================= +bool DE_ConfigurationNode::CheckExtension(const TCollection_AsciiString& theExtension) const +{ + TCollection_AsciiString anExtension(theExtension); + if (anExtension.IsEmpty()) + { + return false; + } + if (anExtension.Value(1) == '.') + { + anExtension.Remove(1); + } + const TColStd_ListOfAsciiString& anExtensions = GetExtensions(); + for (TColStd_ListOfAsciiString::Iterator anIter(anExtensions); + anIter.More(); anIter.Next()) + { + if (TCollection_AsciiString::IsSameString(anIter.Value(), anExtension, Standard_False)) + { + return true; + } + } + return false; +} + +//======================================================================= +// function : CheckForSupport +// purpose : +//======================================================================= +bool DE_ConfigurationNode::CheckContent(const Handle(NCollection_Buffer)& theBuffer) const +{ + (void)theBuffer; + return false; +} diff --git a/src/DE/DE_ConfigurationNode.hxx b/src/DE/DE_ConfigurationNode.hxx new file mode 100644 index 0000000000..3798dc3b35 --- /dev/null +++ b/src/DE/DE_ConfigurationNode.hxx @@ -0,0 +1,154 @@ +// Copyright (c) 2022 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 _DE_ConfigurationNode_HeaderFile +#define _DE_ConfigurationNode_HeaderFile + +#include + +class DE_ConfigurationContext; +class DE_Provider; +class NCollection_Buffer; + +//! Base class to work with CAD transfer properties. +//! Stores the necessary settings for a single Provider type. +//! Configures and creates special provider to transfer CAD files. +//! +//! Nodes are grouped by Vendor's name and Format type. +//! The Vendor name is not defined by default. +//! The Format type is not defined by default. +//! The supported CAD extensions are not defined by default. +//! The import process is not supported. +//! The export process is not supported. +//! +//! The algorithm for standalone transfer operation: +//! 1) Create new empty Node object +//! 2) Configure the current Node +//! 2.1) Use the external resource file to configure (::Load) +//! 2.2) Change the internal parameters directly: +//! 2.2.1) Change field values of "GlobalParameters" +//! 2.2.2) Change field values of "InternalParameters" +//! 3) Create one-time transfer provider (::BuildProvider) +//! 4) Initiate the transfer process: +//! 4.1) Import (if "::IsImportSupported: returns TRUE) +//! 4.1.1) Validate the support of input format (::CheckContent or ::CheckExtension) +//! 4.1.2) Use created provider's "::Read" method +//! 4.2) Export (if "::IsExportSupported: returns TRUE) +//! 4.2.1) Use created provider's "::Write" method +//! 5) Check the provider's output +class DE_ConfigurationNode : public Standard_Transient +{ + DEFINE_STANDARD_RTTIEXT(DE_ConfigurationNode, Standard_Transient) +public: + + //! Initializes all field by default + Standard_EXPORT DE_ConfigurationNode(); + + //! Copies values of all fields + //! @param[in] theConfigurationNode object to copy + Standard_EXPORT DE_ConfigurationNode(const Handle(DE_ConfigurationNode)& theConfigurationNode); + + //! Updates values according the resource file + //! @param[in] theResourcePath file path to resource + //! @return True if Load was successful + Standard_EXPORT virtual bool Load(const TCollection_AsciiString& theResourcePath = ""); + + //! Updates values according the resource + //! @param[in] theResource input resource to use + //! @return True if Load was successful + Standard_EXPORT virtual bool Load(const Handle(DE_ConfigurationContext)& theResource) = 0; + + //! Writes configuration to the resource file + //! @param[in] theResourcePath file path to resource + //! @return True if Save was successful + Standard_EXPORT bool Save(const TCollection_AsciiString& theResourcePath) const; + + //! Writes configuration to the string + //! @return result resource string + Standard_EXPORT virtual TCollection_AsciiString Save() const = 0; + + //! Creates new provider for the own format + //! @return new created provider + Standard_EXPORT virtual Handle(DE_Provider) BuildProvider() = 0; + + //! Copies values of all fields + //! @return new object with the same field values + Standard_EXPORT virtual Handle(DE_ConfigurationNode) Copy() const = 0; + + //! Update loading status. Checking for the license. + //! @return Standard_True, if node can be used + Standard_EXPORT virtual bool UpdateLoad(); + +public: + + //! Checks the import supporting + //! @return Standard_True if import is support + Standard_EXPORT virtual bool IsImportSupported() const; + + //! Checks the export supporting + //! @return Standard_True if export is support + Standard_EXPORT virtual bool IsExportSupported() const; + + //! Gets CAD format name of associated provider + //! @return provider CAD format + Standard_EXPORT virtual TCollection_AsciiString GetFormat() const = 0; + + //! Gets provider's vendor name of associated provider + //! @return provider's vendor name + Standard_EXPORT virtual TCollection_AsciiString GetVendor() const = 0; + + //! Gets list of supported file extensions + //! @return list of extensions + Standard_EXPORT virtual TColStd_ListOfAsciiString GetExtensions() const = 0; + + //! Checks the file extension to verify a format + //! @param[in] theExtension input file extension + //! @return Standard_True if file is supported by a current provider + Standard_EXPORT virtual bool CheckExtension(const TCollection_AsciiString& theExtension) const; + + //! Checks the file content to verify a format + //! @param[in] theBuffer read stream buffer to check content + //! @return Standard_True if file is supported by a current provider + Standard_EXPORT virtual bool CheckContent(const Handle(NCollection_Buffer)& theBuffer) const; + +public: + + //! Gets the provider loading status + //! @return Standard_True if the load is correct + Standard_Boolean IsEnabled() const + { + return myIsEnabled; + } + + //! Sets the provider loading status + //! @param[in] theIsLoaded input load status + void SetEnabled(const Standard_Boolean theIsLoaded) + { + myIsEnabled = theIsLoaded; + } + +public: + + //!< Internal parameters for transfer process + struct DE_SectionGlobal + { + Standard_Real LengthUnit = 1.0; //!< Scale length unit value from MM, default 1.0 (MM) + } GlobalParameters; + +private: + + Standard_Boolean myIsEnabled; //!< Flag to use a current provider for Read or Write process via DE_Wrapper + +}; + +#endif // _DE_ConfigurationNode_HeaderFile diff --git a/src/DE/DE_Provider.cxx b/src/DE/DE_Provider.cxx new file mode 100644 index 0000000000..aee45f7f22 --- /dev/null +++ b/src/DE/DE_Provider.cxx @@ -0,0 +1,170 @@ +// Copyright (c) 2022 OPEN CASCADE SAS +// +// This file is part of Open CASCADE Technology software library. +// +// This library is free software; you can redistribute it and/or modify it under +// the terms of the GNU Lesser General Public License version 2.1 as published +// by the Free Software Foundation, with special exception defined in the file +// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT +// distribution for complete text of the license and disclaimer of any warranty. +// +// Alternatively, this file may be used under the terms of Open CASCADE +// commercial license or contractual agreement. + +#include + +#include +#include + +IMPLEMENT_STANDARD_RTTIEXT(DE_Provider, Standard_Transient) + +//======================================================================= +// function : DE_Provider +// purpose : +//======================================================================= +DE_Provider::DE_Provider() +{} + +//======================================================================= +// function : DE_Provider +// purpose : +//======================================================================= +DE_Provider::DE_Provider(const Handle(DE_ConfigurationNode)& theNode) + :myNode(theNode) +{} + +//======================================================================= +// function : Read +// purpose : +//======================================================================= +Standard_Boolean DE_Provider::Read(const TCollection_AsciiString& thePath, + const Handle(TDocStd_Document)& theDocument, + Handle(XSControl_WorkSession)& theWS, + const Message_ProgressRange& theProgress) +{ + (void)thePath; + (void)theDocument; + (void)theWS; + (void)theProgress; + Message::SendFail() << "Error: provider " << GetFormat() << + " " << GetVendor() <<" doesn't support read operation"; + return Standard_False; +} + +//======================================================================= +// function : Write +// purpose : +//======================================================================= +Standard_Boolean DE_Provider::Write(const TCollection_AsciiString& thePath, + const Handle(TDocStd_Document)& theDocument, + Handle(XSControl_WorkSession)& theWS, + const Message_ProgressRange& theProgress) +{ + (void)thePath; + (void)theDocument; + (void)theWS; + (void)theProgress; + Message::SendFail() << "Error: provider " << GetFormat() << + " " << GetVendor() << " doesn't support write operation"; + return Standard_False; +} + +//======================================================================= +// function : Read +// purpose : +//======================================================================= +Standard_Boolean DE_Provider::Read(const TCollection_AsciiString& thePath, + const Handle(TDocStd_Document)& theDocument, + const Message_ProgressRange& theProgress) +{ + (void)thePath; + (void)theDocument; + (void)theProgress; + Message::SendFail() << "Error: provider " << GetFormat() << + " " << GetVendor() << " doesn't support read operation"; + return Standard_False; +} + +//======================================================================= +// function : Write +// purpose : +//======================================================================= +Standard_Boolean DE_Provider::Write(const TCollection_AsciiString& thePath, + const Handle(TDocStd_Document)& theDocument, + const Message_ProgressRange& theProgress) +{ + (void)thePath; + (void)theDocument; + (void)theProgress; + Message::SendFail() << "Error: provider " << GetFormat() << + " " << GetVendor() << " doesn't support write operation"; + return Standard_False; +} + +//======================================================================= +// function : Read +// purpose : +//======================================================================= +Standard_Boolean DE_Provider::Read(const TCollection_AsciiString& thePath, + TopoDS_Shape& theShape, + Handle(XSControl_WorkSession)& theWS, + const Message_ProgressRange& theProgress) +{ + (void)thePath; + (void)theShape; + (void)theWS; + (void)theProgress; + Message::SendFail() << "Error: provider " << GetFormat() << + " " << GetVendor() << " doesn't support read operation"; + return Standard_False; +} + +//======================================================================= +// function : Write +// purpose : +//======================================================================= +Standard_Boolean DE_Provider::Write(const TCollection_AsciiString& thePath, + const TopoDS_Shape& theShape, + Handle(XSControl_WorkSession)& theWS, + const Message_ProgressRange& theProgress) +{ + (void)thePath; + (void)theShape; + (void)theWS; + (void)theProgress; + Message::SendFail() << "Error: provider " << GetFormat() << + " " << GetVendor() << " doesn't support write operation"; + return Standard_False; +} + +//======================================================================= +// function : Read +// purpose : +//======================================================================= +Standard_Boolean DE_Provider::Read(const TCollection_AsciiString& thePath, + TopoDS_Shape& theShape, + const Message_ProgressRange& theProgress) +{ + (void)thePath; + (void)theShape; + (void)theProgress; + Message::SendFail() << "Error: provider " << GetFormat() << + " " << GetVendor() << " doesn't support read operation"; + return Standard_False; +} + +//======================================================================= +// function : Write +// purpose : +//======================================================================= +Standard_Boolean DE_Provider::Write(const TCollection_AsciiString& thePath, + const TopoDS_Shape& theShape, + const Message_ProgressRange& theProgress) +{ + (void)thePath; + (void)theShape; + (void)theProgress; + Message::SendFail() << "Error: provider " << GetFormat() << + " " << GetVendor() << " doesn't support write operation"; + return Standard_False; +} diff --git a/src/DE/DE_Provider.hxx b/src/DE/DE_Provider.hxx new file mode 100644 index 0000000000..d8cdd74bc6 --- /dev/null +++ b/src/DE/DE_Provider.hxx @@ -0,0 +1,167 @@ +// Copyright (c) 2022 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 _DE_Provider_HeaderFile +#define _DE_Provider_HeaderFile + +#include + +class DE_ConfigurationNode; +class TopoDS_Shape; +class XSControl_WorkSession; +class TDocStd_Document; + +//! Base class to make transfer process. +//! Reads or Writes specialized CAD files into/from OCCT. +//! Each operation needs the Configuration Node. +//! +//! Providers are grouped by Vendor's name and Format type. +//! The Vendor name is not defined by default. +//! The Format type is not defined by default. +//! The import process is not supported. +//! The export process is not supported. +//! +//! The algorithm for standalone transfer operation: +//! 1) Create new empty Provider object +//! 2) Configure the current object by special Configuration Node (::SetNode) +//! 3) Initiate the transfer process: +//! 3.1) Call the required Read method (if Read methods are implemented) +//! 3.2) Call the required Write method (if Write methods are implemented) +//! 4) Validate the output values +class DE_Provider : public Standard_Transient +{ +public: + DEFINE_STANDARD_RTTIEXT(DE_Provider, Standard_Transient) + +public: + + //! Default constructor + //! Configure translation process with global configuration + Standard_EXPORT DE_Provider(); + + //! Configure translation process + //! @param[in] theNode object to copy + Standard_EXPORT DE_Provider(const Handle(DE_ConfigurationNode)& theNode); + +public: + + //! Reads a CAD file, according internal configuration + //! @param[in] thePath path to the import CAD file + //! @param[out] theDocument document to save result + //! @param[in] theWS current work session + //! @param theProgress[in] progress indicator + //! @return True if Read was successful + Standard_EXPORT virtual Standard_Boolean Read(const TCollection_AsciiString& thePath, + const Handle(TDocStd_Document)& theDocument, + Handle(XSControl_WorkSession)& theWS, + const Message_ProgressRange& theProgress = Message_ProgressRange()); + + //! Writes a CAD file, according internal configuration + //! @param[in] thePath path to the export CAD file + //! @param[out] theDocument document to export + //! @param[in] theWS current work session + //! @param theProgress[in] progress indicator + //! @return True if Write was successful + Standard_EXPORT virtual Standard_Boolean Write(const TCollection_AsciiString& thePath, + const Handle(TDocStd_Document)& theDocument, + Handle(XSControl_WorkSession)& theWS, + const Message_ProgressRange& theProgress = Message_ProgressRange()); + + //! Reads a CAD file, according internal configuration + //! @param[in] thePath path to the import CAD file + //! @param[out] theDocument document to save result + //! @param theProgress[in] progress indicator + //! @return True if Read was successful + Standard_EXPORT virtual Standard_Boolean Read(const TCollection_AsciiString& thePath, + const Handle(TDocStd_Document)& theDocument, + const Message_ProgressRange& theProgress = Message_ProgressRange()); + + //! Writes a CAD file, according internal configuration + //! @param[in] thePath path to the export CAD file + //! @param[out] theDocument document to export + //! @param theProgress[in] progress indicator + //! @return True if Write was successful + Standard_EXPORT virtual Standard_Boolean Write(const TCollection_AsciiString& thePath, + const Handle(TDocStd_Document)& theDocument, + const Message_ProgressRange& theProgress = Message_ProgressRange()); + + //! Reads a CAD file, according internal configuration + //! @param[in] thePath path to the import CAD file + //! @param[out] theShape shape to save result + //! @param[in] theWS current work session + //! @param theProgress[in] progress indicator + //! @return True if Read was successful + Standard_EXPORT virtual Standard_Boolean Read(const TCollection_AsciiString& thePath, + TopoDS_Shape& theShape, + Handle(XSControl_WorkSession)& theWS, + const Message_ProgressRange& theProgress = Message_ProgressRange()); + + //! Writes a CAD file, according internal configuration + //! @param[in] thePath path to the export CAD file + //! @param[out] theShape shape to export + //! @param[in] theWS current work session + //! @param theProgress[in] progress indicator + //! @return True if Write was successful + Standard_EXPORT virtual Standard_Boolean Write(const TCollection_AsciiString& thePath, + const TopoDS_Shape& theShape, + Handle(XSControl_WorkSession)& theWS, + const Message_ProgressRange& theProgress = Message_ProgressRange()); + + //! Reads a CAD file, according internal configuration + //! @param[in] thePath path to the import CAD file + //! @param[out] theShape shape to save result + //! @param theProgress[in] progress indicator + //! @return True if Read was successful + Standard_EXPORT virtual Standard_Boolean Read(const TCollection_AsciiString& thePath, + TopoDS_Shape& theShape, + const Message_ProgressRange& theProgress = Message_ProgressRange()); + + //! Writes a CAD file, according internal configuration + //! @param[in] thePath path to the export CAD file + //! @param[out] theShape shape to export + //! @param theProgress[in] progress indicator + //! @return True if Write was successful + Standard_EXPORT virtual Standard_Boolean Write(const TCollection_AsciiString& thePath, + const TopoDS_Shape& theShape, + const Message_ProgressRange& theProgress = Message_ProgressRange()); + +public: + + //! Gets CAD format name of associated provider + //! @return provider CAD format + Standard_EXPORT virtual TCollection_AsciiString GetFormat() const = 0; + + //! Gets provider's vendor name of associated provider + //! @return provider's vendor name + Standard_EXPORT virtual TCollection_AsciiString GetVendor() const = 0; + + //! Gets internal configuration node + //! @return configuration node object + Handle(DE_ConfigurationNode) GetNode() const + { + return myNode; + } + + //! Sets internal configuration node + //! @param[in] theNode configuration node to set + void SetNode(const Handle(DE_ConfigurationNode)& theNode) + { + myNode = theNode; + } + +private: + + Handle(DE_ConfigurationNode) myNode; //!< Internal configuration for the own format +}; + +#endif // _DE_Provider_HeaderFile diff --git a/src/DE/DE_Wrapper.cxx b/src/DE/DE_Wrapper.cxx new file mode 100644 index 0000000000..ca4ef5b6b9 --- /dev/null +++ b/src/DE/DE_Wrapper.cxx @@ -0,0 +1,540 @@ +// Copyright (c) 2022 OPEN CASCADE SAS +// +// This file is part of Open CASCADE Technology software library. +// +// This library is free software; you can redistribute it and/or modify it under +// the terms of the GNU Lesser General Public License version 2.1 as published +// by the Free Software Foundation, with special exception defined in the file +// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT +// distribution for complete text of the license and disclaimer of any warranty. +// +// Alternatively, this file may be used under the terms of Open CASCADE +// commercial license or contractual agreement. + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +IMPLEMENT_STANDARD_RTTIEXT(DE_Wrapper, Standard_Transient) + +static const TCollection_AsciiString THE_CONFIGURATION_SCOPE = "global"; + +//======================================================================= +// function : DE_Wrapper +// purpose : +//======================================================================= +DE_Wrapper::DE_Wrapper() +{} + +//======================================================================= +// function : DE_Wrapper +// purpose : +//======================================================================= +DE_Wrapper::DE_Wrapper(const Handle(DE_Wrapper)& theWrapper) + : DE_Wrapper() +{ + if (theWrapper.IsNull()) + { + return; + } + GlobalParameters = theWrapper->GlobalParameters; + for (DE_ConfigurationFormatMap::Iterator aFormatIter(theWrapper->Nodes()); + aFormatIter.More(); aFormatIter.Next()) + { + for (DE_ConfigurationVendorMap::Iterator aVendorIter(aFormatIter.Value()); + aVendorIter.More(); aVendorIter.Next()) + { + Bind(aVendorIter.Value()); + } + } +} + +//======================================================================= +// function : GlobalWrapper +// purpose : +//======================================================================= +Handle(DE_Wrapper) DE_Wrapper::GlobalWrapper() +{ + static const Handle(DE_Wrapper)& aConfiguration = new DE_Wrapper(); + return aConfiguration; +} + +//======================================================================= +// function : Read +// purpose : +//======================================================================= +Standard_Boolean DE_Wrapper::Read(const TCollection_AsciiString& thePath, + Handle(TDocStd_Document)& theDocument, + Handle(XSControl_WorkSession)& theWS, + const Message_ProgressRange& theProgress) +{ + if (theDocument.IsNull()) + { + return Standard_False; + } + if (theWS.IsNull()) + { + return Read(thePath, theDocument, theProgress); + } + Handle(DE_Provider) aProvider; + if (!findProvider(thePath, Standard_True, aProvider)) + { + return Standard_False; + } + return aProvider->Read(thePath, theDocument, theWS, theProgress); +} + +//======================================================================= +// function : Write +// purpose : +//======================================================================= +Standard_Boolean DE_Wrapper::Write(const TCollection_AsciiString& thePath, + const Handle(TDocStd_Document)& theDocument, + Handle(XSControl_WorkSession)& theWS, + const Message_ProgressRange& theProgress) +{ + if (theDocument.IsNull()) + { + return Standard_False; + } + if (theWS.IsNull()) + { + return Write(thePath, theDocument, theProgress); + } + Handle(DE_Provider) aProvider; + if (!findProvider(thePath, Standard_False, aProvider)) + { + return Standard_False; + } + return aProvider->Write(thePath, theDocument, theWS, theProgress); +} + +//======================================================================= +// function : Read +// purpose : +//======================================================================= +Standard_Boolean DE_Wrapper::Read(const TCollection_AsciiString& thePath, + Handle(TDocStd_Document)& theDocument, + const Message_ProgressRange& theProgress) +{ + if (theDocument.IsNull()) + { + return Standard_False; + } + Handle(DE_Provider) aProvider; + if (!findProvider(thePath, Standard_True, aProvider)) + { + return Standard_False; + } + return aProvider->Read(thePath, theDocument, theProgress); +} + +//======================================================================= +// function : Write +// purpose : +//======================================================================= +Standard_Boolean DE_Wrapper::Write(const TCollection_AsciiString& thePath, + const Handle(TDocStd_Document)& theDocument, + const Message_ProgressRange& theProgress) +{ + if (theDocument.IsNull()) + { + return Standard_False; + } + Handle(DE_Provider) aProvider; + if (!findProvider(thePath, Standard_False, aProvider)) + { + return Standard_False; + } + return aProvider->Write(thePath, theDocument, theProgress); +} + +//======================================================================= +// function : Read +// purpose : +//======================================================================= +Standard_Boolean DE_Wrapper::Read(const TCollection_AsciiString& thePath, + TopoDS_Shape& theShape, + Handle(XSControl_WorkSession)& theWS, + const Message_ProgressRange& theProgress) +{ + if (theWS.IsNull()) + { + return Read(thePath, theShape, theProgress); + } + Handle(DE_Provider) aProvider; + if (!findProvider(thePath, Standard_True, aProvider)) + { + return Standard_False; + } + return aProvider->Read(thePath, theShape, theWS, theProgress); +} + +//======================================================================= +// function : Write +// purpose : +//======================================================================= +Standard_Boolean DE_Wrapper::Write(const TCollection_AsciiString& thePath, + const TopoDS_Shape& theShape, + Handle(XSControl_WorkSession)& theWS, + const Message_ProgressRange& theProgress) +{ + if (theWS.IsNull()) + { + return Write(thePath, theShape, theProgress); + } + Handle(DE_Provider) aProvider; + if (!findProvider(thePath, Standard_False, aProvider)) + { + return Standard_False; + } + return aProvider->Write(thePath, theShape, theWS, theProgress); +} + +//======================================================================= +// function : Read +// purpose : +//======================================================================= +Standard_Boolean DE_Wrapper::Read(const TCollection_AsciiString& thePath, + TopoDS_Shape& theShape, + const Message_ProgressRange& theProgress) +{ + + Handle(DE_Provider) aProvider; + if (!findProvider(thePath, Standard_True, aProvider)) + { + return Standard_False; + } + return aProvider->Read(thePath, theShape, theProgress); +} + +//======================================================================= +// function : Write +// purpose : +//======================================================================= +Standard_Boolean DE_Wrapper::Write(const TCollection_AsciiString& thePath, + const TopoDS_Shape& theShape, + const Message_ProgressRange& theProgress) +{ + Handle(DE_Provider) aProvider; + if (!findProvider(thePath, Standard_False, aProvider)) + { + return Standard_False; + } + return aProvider->Write(thePath, theShape, theProgress); +} + +//======================================================================= +// function : Load +// purpose : +//======================================================================= +Standard_Boolean DE_Wrapper::Load(const TCollection_AsciiString& theResource, + const Standard_Boolean theIsRecursive) +{ + Handle(DE_ConfigurationContext) aResource = new DE_ConfigurationContext(); + aResource->Load(theResource); + return Load(aResource, theIsRecursive); +} + +//======================================================================= +// function : Load +// purpose : +//======================================================================= +Standard_Boolean DE_Wrapper::Load(const Handle(DE_ConfigurationContext)& theResource, + const Standard_Boolean theIsRecursive) +{ + GlobalParameters.LengthUnit = theResource->RealVal("general.length.unit", GlobalParameters.LengthUnit, THE_CONFIGURATION_SCOPE); + if (theIsRecursive) + { + for (DE_ConfigurationFormatMap::Iterator aFormatIter(myConfiguration); + aFormatIter.More(); aFormatIter.Next()) + { + for (DE_ConfigurationVendorMap::Iterator aVendorIter(aFormatIter.Value()); + aVendorIter.More(); aVendorIter.Next()) + { + aVendorIter.Value()->Load(theResource); + } + } + sort(theResource); + } + return Standard_True; +} + +//======================================================================= +// function : Save +// purpose : +//======================================================================= +Standard_Boolean DE_Wrapper::Save(const TCollection_AsciiString& theResourcePath, + const Standard_Boolean theIsRecursive, + const TColStd_ListOfAsciiString& theFormats, + const TColStd_ListOfAsciiString& theVendors) +{ + OSD_Path aPath = theResourcePath; + OSD_File aFile(aPath); + OSD_Protection aProt; + { + try + { + OCC_CATCH_SIGNALS + aFile.Build(OSD_ReadWrite, aProt); + } + catch (Standard_Failure const&) + { + return Standard_False; + } + } + if (aFile.Failed()) + { + return Standard_False; + } + TCollection_AsciiString aResConfiguration = Save(theIsRecursive, theFormats, theVendors); + aFile.Write(aResConfiguration, aResConfiguration.Length()); + aFile.Close(); + return Standard_True; +} + +//======================================================================= +// function : Save +// purpose : +//======================================================================= +TCollection_AsciiString DE_Wrapper::Save(const Standard_Boolean theIsRecursive, + const TColStd_ListOfAsciiString& theFormats, + const TColStd_ListOfAsciiString& theVendors) +{ + TCollection_AsciiString aResult; + aResult += "!Description of the config file for DE toolkit\n"; + aResult += "!*****************************************************************************\n"; + aResult += "!\n"; + aResult += "!Format of the file is compliant with the standard Open CASCADE resource files\n"; + aResult += "!Each key defines a sequence of either further keys.\n"; + aResult += "!Keys can be nested down to an arbitrary level.\n"; + aResult += "!\n"; + aResult += "!*****************************************************************************\n"; + aResult += "!DE_Wrapper\n"; + aResult += "!Priority vendor list. For every CAD format set indexed list of vendors\n"; + for (DE_ConfigurationFormatMap::Iterator aFormatIter(myConfiguration); + aFormatIter.More(); aFormatIter.Next()) + { + const TCollection_AsciiString& aFormat = aFormatIter.Key(); + aResult += THE_CONFIGURATION_SCOPE + '.' + "priority" + '.' + aFormat + " :\t "; + for (DE_ConfigurationVendorMap::Iterator aVendorIter(aFormatIter.Value()); + aVendorIter.More(); aVendorIter.Next()) + { + const TCollection_AsciiString& aVendorName = aVendorIter.Value()->GetVendor(); + aResult += aVendorName + " "; + } + aResult += "\n"; + } + aResult += "!Global parameters. Used for all providers\n"; + aResult += "!Length scale unit value. Should be more the 0. Default value: 1.0(MM)\n"; + aResult += THE_CONFIGURATION_SCOPE + ".general.length.unit :\t " + GlobalParameters.LengthUnit + "\n"; + if (theIsRecursive) + { + for (DE_ConfigurationFormatMap::Iterator aFormatIter(myConfiguration); + aFormatIter.More(); aFormatIter.Next()) + { + if (!theFormats.IsEmpty() && !theFormats.Contains(aFormatIter.Key())) + { + continue; + } + for (DE_ConfigurationVendorMap::Iterator aVendorIter(aFormatIter.Value()); + aVendorIter.More(); aVendorIter.Next()) + { + if (!theVendors.IsEmpty() && !theVendors.Contains(aVendorIter.Key())) + { + continue; + } + aResult += "!\n"; + aResult += aVendorIter.Value()->Save(); + aResult += "!\n"; + } + } + } + aResult += "!*****************************************************************************\n"; + return aResult; +} + +//======================================================================= +// function : Bind +// purpose : +//======================================================================= +Standard_Boolean DE_Wrapper::Bind(const Handle(DE_ConfigurationNode)& theNode) +{ + if (theNode.IsNull()) + { + return Standard_False; + } + const TCollection_AsciiString aFileFormat = theNode->GetFormat(); + const TCollection_AsciiString aVendorName = theNode->GetVendor(); + DE_ConfigurationVendorMap* aVendorMap = myConfiguration.ChangeSeek(aFileFormat); + if (aVendorMap == NULL) + { + DE_ConfigurationVendorMap aTmpVendorMap; + aVendorMap = myConfiguration.Bound(aFileFormat, aTmpVendorMap); + } + return aVendorMap->Add(aVendorName, theNode) > 0; +} + +//======================================================================= +// function : Find +// purpose : +//======================================================================= +Standard_Boolean DE_Wrapper::Find(const TCollection_AsciiString& theFormat, + const TCollection_AsciiString& theVendor, + Handle(DE_ConfigurationNode)& theNode) const +{ + const DE_ConfigurationVendorMap* aVendorMap = myConfiguration.Seek(theFormat); + return aVendorMap != nullptr && aVendorMap->FindFromKey(theVendor, theNode); +} + +//======================================================================= +// function : ChangePriority +// purpose : +//======================================================================= +void DE_Wrapper::ChangePriority(const TCollection_AsciiString& theFormat, + const TColStd_ListOfAsciiString& theVendorPriority, + const Standard_Boolean theToDisable) +{ + DE_ConfigurationVendorMap aVendorMap; + if (!myConfiguration.Find(theFormat, aVendorMap)) + { + return; + } + DE_ConfigurationVendorMap aNewVendorMap; + // Sets according to the input priority + for (TColStd_ListOfAsciiString::Iterator aPriorIter(theVendorPriority); + aPriorIter.More(); aPriorIter.Next()) + { + const TCollection_AsciiString& aVendorName = aPriorIter.Value(); + Handle(DE_ConfigurationNode) aNode; + if (aVendorMap.FindFromKey(aVendorName, aNode)) + { + aNode->SetEnabled(Standard_True); + aNode->UpdateLoad(); + aNewVendorMap.Add(aVendorName, aNode); + } + } + // Sets not used elements + for (DE_ConfigurationVendorMap::Iterator aVendorIter(aVendorMap); + aVendorIter.More(); aVendorIter.Next()) + { + const TCollection_AsciiString& aVendorName = aVendorIter.Key(); + if (!theVendorPriority.Contains(aVendorName)) + { + Handle(DE_ConfigurationNode) aNode = aVendorIter.Value(); + if (theToDisable) + { + aNode->SetEnabled(Standard_False); + } + aNewVendorMap.Add(aVendorName, aNode); + } + } + myConfiguration.Bind(theFormat, aNewVendorMap); +} + +//======================================================================= +// function : ChangePriority +// purpose : +//======================================================================= +void DE_Wrapper::ChangePriority(const TColStd_ListOfAsciiString& theVendorPriority, + const Standard_Boolean theToDisable) +{ + for (DE_ConfigurationFormatMap::Iterator aFormatIter(myConfiguration); + aFormatIter.More(); aFormatIter.Next()) + { + ChangePriority(aFormatIter.Key(), theVendorPriority, theToDisable); + } +} + +//======================================================================= +// function : Nodes +// purpose : +//======================================================================= +const DE_ConfigurationFormatMap& DE_Wrapper::Nodes() const +{ + return myConfiguration; +} + +//======================================================================= +// function : Copy +// purpose : +//======================================================================= +Handle(DE_Wrapper) DE_Wrapper::Copy() const +{ + return new DE_Wrapper(*this); +} + +//======================================================================= +// function : findProvider +// purpose : +//======================================================================= +Standard_Boolean DE_Wrapper::findProvider(const TCollection_AsciiString& thePath, + const Standard_Boolean theToImport, + Handle(DE_Provider)& theProvider) const +{ + Handle(NCollection_Buffer) aBuffer; + if (theToImport) + { + const Handle(OSD_FileSystem)& aFileSystem = OSD_FileSystem::DefaultFileSystem(); + std::shared_ptr aStream = aFileSystem->OpenIStream(thePath, std::ios::in | std::ios::binary); + if (aStream.get() != nullptr) + { + aBuffer = new NCollection_Buffer(NCollection_BaseAllocator::CommonBaseAllocator(), 2048); + aStream->read((char*)aBuffer->ChangeData(), 2048); + aBuffer->ChangeData()[2047] = '\0'; + } + } + OSD_Path aPath(thePath); + const TCollection_AsciiString anExtr = aPath.Extension(); + for (DE_ConfigurationFormatMap::Iterator aFormatIter(myConfiguration); + aFormatIter.More(); aFormatIter.Next()) + { + for (DE_ConfigurationVendorMap::Iterator aVendorIter(aFormatIter.Value()); + aVendorIter.More(); aVendorIter.Next()) + { + const Handle(DE_ConfigurationNode)& aNode = aVendorIter.Value(); + if (aNode->IsEnabled() && + ((theToImport && aNode->IsImportSupported()) || + (!theToImport && aNode->IsExportSupported())) && + (aNode->CheckExtension(anExtr) || + (theToImport && aNode->CheckContent(aBuffer)))) + { + theProvider = aNode->BuildProvider(); + aNode->GlobalParameters = GlobalParameters; + theProvider->SetNode(aNode); + return Standard_True; + } + } + } + return Standard_False; +} + +//======================================================================= +// function : sort +// purpose : +//======================================================================= +void DE_Wrapper::sort(const Handle(DE_ConfigurationContext)& theResource) +{ + const TCollection_AsciiString aScope(THE_CONFIGURATION_SCOPE + '.' + "priority"); + NCollection_List aVendors; + for (DE_ConfigurationFormatMap::Iterator aFormatIter(myConfiguration); + aFormatIter.More(); aFormatIter.Next()) + { + TColStd_ListOfAsciiString aVendorPriority; + if (!theResource->GetStringSeq(aFormatIter.Key(), aVendorPriority, aScope)) + { + continue; + } + ChangePriority(aFormatIter.Key(), aVendorPriority, Standard_True); + } +} diff --git a/src/DE/DE_Wrapper.hxx b/src/DE/DE_Wrapper.hxx new file mode 100644 index 0000000000..030153a48d --- /dev/null +++ b/src/DE/DE_Wrapper.hxx @@ -0,0 +1,249 @@ +// Copyright (c) 2022 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 _DE_Wrapper_HeaderFile +#define _DE_Wrapper_HeaderFile + +#include +#include +#include +#include +#include + +class TopoDS_Shape; +class XSControl_WorkSession; +class TDocStd_Document; + +typedef NCollection_IndexedDataMap DE_ConfigurationVendorMap; +typedef NCollection_DataMap DE_ConfigurationFormatMap; + +//! The main class for working with CAD file exchange. +//! Loads and Saves special CAD transfer property. +//! Consolidates all supported Formats and Vendors. +//! Automatically recognizes CAD format and uses the preferred existed Vendor. +//! Note: +//! If Vendor's format is not binded, the configuration loading doesn't affect on its property. +//! +//! Nodes are grouped by Vendor's name and Format's type. +//! The Vendors may have the same supported CAD formats. +//! Use a Vendor's priority for transfer operations. +//! +//! The algorithm for standalone transfer operation: +//! 1) Work with global wrapper directly or make deep copy and work with it +//! 2) Update the supported vendors and formats +//! 2.1) Create and initialize specialized configuration node of the required format and Vendor. +//! 2.2) Bind the created node to the internal map(::Bind) +//! 3) Configure the transfer property by resource string or file (::Load) +//! 3.1) Configuration can disable or enable some Vendors and formats +//! 3.2) Configuration can change the priority of Vendors +//! 4) Initiate the transfer process by calling "::Write" or "::Read" methods +//! 5) Validate the transfer process output +class DE_Wrapper : public Standard_Transient +{ + DEFINE_STANDARD_RTTIEXT(DE_Wrapper, Standard_Transient) + +public: + + //! Initializes all field by default + Standard_EXPORT DE_Wrapper(); + + //! Copies values of all fields + //! @param[in] theWrapper object to copy + Standard_EXPORT DE_Wrapper(const Handle(DE_Wrapper)& theWrapper); + + //! Gets global configuration singleton + //! @return point to global configuration + Standard_EXPORT static Handle(DE_Wrapper) GlobalWrapper(); + +public: + + //! Reads a CAD file, according internal configuration + //! @param[in] thePath path to the import CAD file + //! @param[out] theDocument document to save result + //! @param[in] theWS current work session + //! @param theProgress[in] progress indicator + //! @return true if Read operation has ended correctly + Standard_EXPORT Standard_Boolean Read(const TCollection_AsciiString& thePath, + Handle(TDocStd_Document)& theDocument, + Handle(XSControl_WorkSession)& theWS, + const Message_ProgressRange& theProgress = Message_ProgressRange()); + + //! Writes a CAD file, according internal configuration + //! @param[in] thePath path to the export CAD file + //! @param[out] theDocument document to export + //! @param[in] theWS current work session + //! @param theProgress[in] progress indicator + //! @return true if Write operation has ended correctly + Standard_EXPORT Standard_Boolean Write(const TCollection_AsciiString& thePath, + const Handle(TDocStd_Document)& theDocument, + Handle(XSControl_WorkSession)& theWS, + const Message_ProgressRange& theProgress = Message_ProgressRange()); + + //! Reads a CAD file, according internal configuration + //! @param[in] thePath path to the import CAD file + //! @param[out] theDocument document to save result + //! @param theProgress[in] progress indicator + //! @return true if Read operation has ended correctly + Standard_EXPORT Standard_Boolean Read(const TCollection_AsciiString& thePath, + Handle(TDocStd_Document)& theDocument, + const Message_ProgressRange& theProgress = Message_ProgressRange()); + + //! Writes a CAD file, according internal configuration + //! @param[in] thePath path to the export CAD file + //! @param[out] theDocument document to export + //! @param theProgress[in] progress indicator + //! @return true if Write operation has ended correctly + Standard_EXPORT Standard_Boolean Write(const TCollection_AsciiString& thePath, + const Handle(TDocStd_Document)& theDocument, + const Message_ProgressRange& theProgress = Message_ProgressRange()); + + //! Reads a CAD file, according internal configuration + //! @param[in] thePath path to the import CAD file + //! @param[out] theShape shape to save result + //! @param[in] theWS current work session + //! @param theProgress[in] progress indicator + //! @return true if Read operation has ended correctly + Standard_EXPORT Standard_Boolean Read(const TCollection_AsciiString& thePath, + TopoDS_Shape& theShape, + Handle(XSControl_WorkSession)& theWS, + const Message_ProgressRange& theProgress = Message_ProgressRange()); + + //! Writes a CAD file, according internal configuration + //! @param[in] thePath path to the export CAD file + //! @param[out] theShape shape to export + //! @param[in] theWS current work session + //! @param theProgress[in] progress indicator + //! @return true if Write operation has ended correctly + Standard_EXPORT Standard_Boolean Write(const TCollection_AsciiString& thePath, + const TopoDS_Shape& theShape, + Handle(XSControl_WorkSession)& theWS, + const Message_ProgressRange& theProgress = Message_ProgressRange()); + + //! Reads a CAD file, according internal configuration + //! @param[in] thePath path to the import CAD file + //! @param[out] theShape shape to save result + //! @param theProgress[in] progress indicator + //! @return true if Read operation has ended correctly + Standard_EXPORT Standard_Boolean Read(const TCollection_AsciiString& thePath, + TopoDS_Shape& theShape, + const Message_ProgressRange& theProgress = Message_ProgressRange()); + + //! Writes a CAD file, according internal configuration + //! @param[in] thePath path to the export CAD file + //! @param[out] theShape shape to export + //! @param theProgress[in] progress indicator + //! @return true if Write operation has ended correctly + Standard_EXPORT Standard_Boolean Write(const TCollection_AsciiString& thePath, + const TopoDS_Shape& theShape, + const Message_ProgressRange& theProgress = Message_ProgressRange()); + +public: + + //! Updates values according the resource file + //! @param[in] theResource file path to resource or resource value + //! @param[in] theIsRecursive flag to update all nodes + //! @return true if theResource has loaded correctly + Standard_EXPORT Standard_Boolean Load(const TCollection_AsciiString& theResource = "", + const Standard_Boolean theIsRecursive = Standard_True); + + //! Updates values according the resource + //! @param[in] theResource input resource to use + //! @param[in] theIsRecursive flag to update all nodes + //! @return true if theResource has loaded correctly + Standard_EXPORT Standard_Boolean Load(const Handle(DE_ConfigurationContext)& theResource, + const Standard_Boolean theIsRecursive = Standard_True); + + //! Writes configuration to the resource file + //! @param[in] theResourcePath file path to resource + //! @param[in] theIsRecursive flag to write values of all nodes + //! @param[in] theFormats list of formats to save. If empty, saves all available + //! @param[in] theVendors list of providers to save. If empty, saves all available + //! @return true if the Configuration has saved correctly + Standard_EXPORT Standard_Boolean Save(const TCollection_AsciiString& theResourcePath, + const Standard_Boolean theIsRecursive = Standard_True, + const TColStd_ListOfAsciiString& theFormats = TColStd_ListOfAsciiString(), + const TColStd_ListOfAsciiString& theVendors = TColStd_ListOfAsciiString()); + + //! Writes configuration to the string + //! @param[in] theIsRecursive flag to write values of all nodes + //! @param[in] theFormats list of formats to save. If empty, saves all available + //! @param[in] theVendors list of providers to save. If empty, saves all available + //! @return result resource string + Standard_EXPORT TCollection_AsciiString Save(const Standard_Boolean theIsRecursive = Standard_True, + const TColStd_ListOfAsciiString& theFormats = TColStd_ListOfAsciiString(), + const TColStd_ListOfAsciiString& theVendors = TColStd_ListOfAsciiString()); + + //! Creates new node copy and adds to the map + //! @param[in] theNode input node to copy + //! @return Standard_True if binded + Standard_EXPORT Standard_Boolean Bind(const Handle(DE_ConfigurationNode)& theNode); + + //! Finds a node associated with input format and vendor + //! @param[in] theFormat input node CAD format + //! @param[in] theVendor input node vendor name + //! @param[out] theNode output node + //! @return Standard_True if the node is found + Standard_EXPORT Standard_Boolean Find(const TCollection_AsciiString& theFormat, + const TCollection_AsciiString& theVendor, + Handle(DE_ConfigurationNode)& theNode) const; + + //! Changes provider priority to one format if it exists + //! @param[in] theFormat input node CAD format + //! @param[in] theVendorPriority priority of work with vendors + //! @param[in] theToDisable flag for disabling nodes that are not included in the priority + Standard_EXPORT void ChangePriority(const TCollection_AsciiString& theFormat, + const TColStd_ListOfAsciiString& theVendorPriority, + const Standard_Boolean theToDisable = Standard_False); + + //! Changes provider priority to all loaded nodes + //! @param[in] theVendorPriority priority of work with vendors + //! @param[in] theToDisable flag for disabling nodes that are not included in the priority + Standard_EXPORT void ChangePriority(const TColStd_ListOfAsciiString& theVendorPriority, + const Standard_Boolean theToDisable = Standard_False); + + //! Gets format map, contains vendor map with nodes + //! @return internal map of formats + Standard_EXPORT const DE_ConfigurationFormatMap& Nodes() const; + + //! Copies values of all fields + //! @return new object with the same field values + Standard_EXPORT Handle(DE_Wrapper) Copy() const; + +protected: + + //! Sorts the vendors according to the priority to work + //! Formats omitted from the resource are not modified + //! Vendors omitted from the format scope are disabled + //! @param[in] theResource resource to get priority + void sort(const Handle(DE_ConfigurationContext)& theResource); + + //! Find available provider from the configuration. + //! If there are several providers, choose the one with the highest priority. + //! @param[in] thePath path to the CAD file + //! @param[in] theToImport flag to finds for import. Standard_True-import, Standard_False-export + //! @param[out] theProvider created new provider + //! @return Standard_True if provider found and created + Standard_Boolean findProvider(const TCollection_AsciiString& thePath, + const Standard_Boolean theToImport, + Handle(DE_Provider)& theProvider) const; + +public: + + DE_ConfigurationNode::DE_SectionGlobal GlobalParameters; //!< Internal parameters for the all translators + +private: + + DE_ConfigurationFormatMap myConfiguration; //!< Internal map of formats +}; + +#endif // _DE_Wrapper_HeaderFile diff --git a/src/DE/FILES b/src/DE/FILES new file mode 100644 index 0000000000..89267b6533 --- /dev/null +++ b/src/DE/FILES @@ -0,0 +1,8 @@ +DE_ConfigurationContext.cxx +DE_ConfigurationContext.hxx +DE_ConfigurationNode.cxx +DE_ConfigurationNode.hxx +DE_Provider.cxx +DE_Provider.hxx +DE_Wrapper.cxx +DE_Wrapper.hxx diff --git a/src/DEBRepCascade/DEBRepCascade_ConfigurationNode.cxx b/src/DEBRepCascade/DEBRepCascade_ConfigurationNode.cxx new file mode 100644 index 0000000000..69856fd661 --- /dev/null +++ b/src/DEBRepCascade/DEBRepCascade_ConfigurationNode.cxx @@ -0,0 +1,199 @@ +// Copyright (c) 2022 OPEN CASCADE SAS +// +// This file is part of Open CASCADE Technology software library. +// +// This library is free software; you can redistribute it and/or modify it under +// the terms of the GNU Lesser General Public License version 2.1 as published +// by the Free Software Foundation, with special exception defined in the file +// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT +// distribution for complete text of the license and disclaimer of any warranty. +// +// Alternatively, this file may be used under the terms of Open CASCADE +// commercial license or contractual agreement. + +#include + +#include +#include +#include + +IMPLEMENT_STANDARD_RTTIEXT(DEBRepCascade_ConfigurationNode, DE_ConfigurationNode) + +static const TCollection_AsciiString THE_CONFIGURATION_SCOPE = "provider"; + +//======================================================================= +// function : DEBRepCascade_ConfigurationNode +// purpose : +//======================================================================= +DEBRepCascade_ConfigurationNode::DEBRepCascade_ConfigurationNode() : + DE_ConfigurationNode() +{ + UpdateLoad(); +} + +//======================================================================= +// function : DEBRepCascade_ConfigurationNode +// purpose : +//======================================================================= +DEBRepCascade_ConfigurationNode::DEBRepCascade_ConfigurationNode(const Handle(DEBRepCascade_ConfigurationNode)& theNode) + :DE_ConfigurationNode(theNode) +{ + InternalParameters = theNode->InternalParameters; + UpdateLoad(); +} + +//======================================================================= +// function : Load +// purpose : +//======================================================================= +bool DEBRepCascade_ConfigurationNode::Load(const Handle(DE_ConfigurationContext)& theResource) +{ + TCollection_AsciiString aScope = THE_CONFIGURATION_SCOPE + "." + GetFormat() + "." + GetVendor(); + + InternalParameters.WriteBinary = + theResource->BooleanVal("write.binary", InternalParameters.WriteBinary, aScope); + InternalParameters.WriteVersionBin = + (BinTools_FormatVersion)theResource->IntegerVal("write.version.binary", InternalParameters.WriteVersionBin, aScope); + InternalParameters.WriteVersionAscii = + (TopTools_FormatVersion)theResource->IntegerVal("write.version.ascii", InternalParameters.WriteVersionAscii, aScope); + InternalParameters.WriteTriangles = + theResource->BooleanVal("write.triangles", InternalParameters.WriteTriangles, aScope); + InternalParameters.WriteNormals = + theResource->BooleanVal("write.normals", InternalParameters.WriteNormals, aScope); + return true; +} + +//======================================================================= +// function : Save +// purpose : +//======================================================================= +TCollection_AsciiString DEBRepCascade_ConfigurationNode::Save() const +{ + TCollection_AsciiString aResult; + aResult += "!*****************************************************************************\n"; + aResult = aResult + "!Configuration Node " + " Vendor: " + GetVendor() + " Format: " + GetFormat() + "\n"; + TCollection_AsciiString aScope = THE_CONFIGURATION_SCOPE + "." + GetFormat() + "." + GetVendor() + "."; + + aResult += "!\n"; + aResult += "!Write parameters:\n"; + aResult += "!\n"; + + aResult += "!\n"; + aResult += "!Defines the binary file format\n"; + aResult += "!Default value: 1. Available values: 0(\"off\"), 1(\"on\")\n"; + aResult += aScope + "write.binary :\t " + InternalParameters.WriteBinary + "\n"; + aResult += "!\n"; + + aResult += "!\n"; + aResult += "!Defines the format version for the binary format writing\n"; + aResult += "!Default value: 4. Available values: 1, 2, 3, 4\n"; + aResult += aScope + "write.version.binary :\t " + InternalParameters.WriteVersionBin + "\n"; + aResult += "!\n"; + + aResult += "!\n"; + aResult += "!Defines the format version for the ASCII format writing\n"; + aResult += "!Default value: 3. Available values: 1, 2, 3\n"; + aResult += aScope + "write.version.ascii :\t " + InternalParameters.WriteVersionAscii + "\n"; + aResult += "!\n"; + + aResult += "!\n"; + aResult += "!Defines the flag for storing shape with(without) triangles\n"; + aResult += "!Default value: 1. Available values: 0(\"off\"), 1(\"on\")\n"; + aResult += aScope + "write.triangles :\t " + InternalParameters.WriteTriangles + "\n"; + aResult += "!\n"; + + aResult += "!\n"; + aResult += "!Defines the flag for storing shape with(without) normals\n"; + aResult += "!Default value: 1. Available values: 0(\"off\"), 1(\"on\")\n"; + aResult += aScope + "write.normals :\t " + InternalParameters.WriteNormals + "\n"; + aResult += "!\n"; + + aResult += "!*****************************************************************************\n"; + return aResult; +} + +//======================================================================= +// function : Copy +// purpose : +//======================================================================= +Handle(DE_ConfigurationNode) DEBRepCascade_ConfigurationNode::Copy() const +{ + return new DEBRepCascade_ConfigurationNode(*this); +} + +//======================================================================= +// function : BuildProvider +// purpose : +//======================================================================= +Handle(DE_Provider) DEBRepCascade_ConfigurationNode::BuildProvider() +{ + return new DEBRepCascade_Provider(this); +} + +//======================================================================= +// function : IsImportSupported +// purpose : +//======================================================================= +bool DEBRepCascade_ConfigurationNode::IsImportSupported() const +{ + return true; +} + +//======================================================================= +// function : IsExportSupported +// purpose : +//======================================================================= +bool DEBRepCascade_ConfigurationNode::IsExportSupported() const +{ + return true; +} + +//======================================================================= +// function : GetFormat +// purpose : +//======================================================================= +TCollection_AsciiString DEBRepCascade_ConfigurationNode::GetFormat() const +{ + return TCollection_AsciiString("BREP"); +} + +//======================================================================= +// function : GetVendor +// purpose : +//======================================================================= +TCollection_AsciiString DEBRepCascade_ConfigurationNode::GetVendor() const +{ + return TCollection_AsciiString("OCC"); +} + +//======================================================================= +// function : GetExtensions +// purpose : +//======================================================================= +TColStd_ListOfAsciiString DEBRepCascade_ConfigurationNode::GetExtensions() const +{ + TColStd_ListOfAsciiString anExt; + anExt.Append("brep"); + return anExt; +} + +//======================================================================= +// function : CheckContent +// purpose : +//======================================================================= +bool DEBRepCascade_ConfigurationNode::CheckContent(const Handle(NCollection_Buffer)& theBuffer) const +{ + if (theBuffer.IsNull() || theBuffer->Size() < 20) + { + return false; + } + const char* aBytes = (const char*)theBuffer->Data(); + if (::strstr(aBytes, "DBRep_DrawableShape") || + ::strstr(aBytes, "CASCADE Topology V1") || + ::strstr(aBytes, "CASCADE Topology V3")) + { + return true; + } + return false; +} + diff --git a/src/DEBRepCascade/DEBRepCascade_ConfigurationNode.hxx b/src/DEBRepCascade/DEBRepCascade_ConfigurationNode.hxx new file mode 100644 index 0000000000..df49fbdcd0 --- /dev/null +++ b/src/DEBRepCascade/DEBRepCascade_ConfigurationNode.hxx @@ -0,0 +1,102 @@ +// Copyright (c) 2022 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 _DEBRepCascade_ConfigurationNode_HeaderFile +#define _DEBRepCascade_ConfigurationNode_HeaderFile + +#include + +#include +#include + +//! The purpose of this class is to configure the transfer process for BRep format +//! Stores the necessary settings for DEBRepCascade_Provider. +//! Configures and creates special provider to transfer BRep files. +//! +//! Nodes grouped by Vendor name and Format type. +//! The Vendor name is "OCC" +//! The Format type is "BREP" +//! The supported CAD extension is ".brep" +//! The import process is supported. +//! The export process is supported. +class DEBRepCascade_ConfigurationNode : public DE_ConfigurationNode +{ + DEFINE_STANDARD_RTTIEXT(DEBRepCascade_ConfigurationNode, DE_ConfigurationNode) +public: + + //! Initializes all field by default + Standard_EXPORT DEBRepCascade_ConfigurationNode(); + + //! Copies values of all fields + //! @param[in] theNode object to copy + Standard_EXPORT DEBRepCascade_ConfigurationNode(const Handle(DEBRepCascade_ConfigurationNode)& theNode); + + //! Updates values according the resource + //! @param[in] theResource input resource to use + //! @return true if theResource loading has ended correctly + Standard_EXPORT virtual bool Load(const Handle(DE_ConfigurationContext)& theResource) Standard_OVERRIDE; + + //! Writes configuration to the string + //! @return result resource string + Standard_EXPORT virtual TCollection_AsciiString Save() const Standard_OVERRIDE; + + //! Copies values of all fields + //! @return new object with the same field values + Standard_EXPORT virtual Handle(DE_ConfigurationNode) Copy() const Standard_OVERRIDE; + + + //! Creates new provider for the own format + //! @return new created provider + Standard_EXPORT virtual Handle(DE_Provider) BuildProvider() Standard_OVERRIDE; + +public: + + //! Checks the import supporting + //! @return true if import is supported + Standard_EXPORT virtual bool IsImportSupported() const Standard_OVERRIDE; + + //! Checks the export supporting + //! @return true if export is supported + Standard_EXPORT virtual bool IsExportSupported() const Standard_OVERRIDE; + + //! Gets CAD format name of associated provider + //! @return provider CAD format + Standard_EXPORT virtual TCollection_AsciiString GetFormat() const Standard_OVERRIDE; + + //! Gets provider's vendor name of associated provider + //! @return provider's vendor name + Standard_EXPORT virtual TCollection_AsciiString GetVendor() const Standard_OVERRIDE; + + //! Gets list of supported file extensions + //! @return list of extensions + Standard_EXPORT virtual TColStd_ListOfAsciiString GetExtensions() const Standard_OVERRIDE; + + //! Checks the file content to verify a format + //! @param[in] theBuffer read stream buffer to check content + //! @return Standard_True if file is supported by a current provider + Standard_EXPORT virtual bool CheckContent(const Handle(NCollection_Buffer)& theBuffer) const Standard_OVERRIDE; + +public: + struct DEBRep_InternalSection + { + // Write + bool WriteBinary = true; //!< Defines the binary file format + BinTools_FormatVersion WriteVersionBin = BinTools_FormatVersion_CURRENT; //!< Defines the writer version for the binary format + TopTools_FormatVersion WriteVersionAscii = TopTools_FormatVersion_CURRENT; //!< Defines the writer version for the ASCII format + bool WriteTriangles = true; //!< Defines the flag for storing shape with(without) triangles + bool WriteNormals = true; //!< Defines the flag for storing shape with(without) normals + + } InternalParameters; +}; + +#endif // _DEBRepCascade_ConfigurationNode_HeaderFile diff --git a/src/DEBRepCascade/DEBRepCascade_Provider.cxx b/src/DEBRepCascade/DEBRepCascade_Provider.cxx new file mode 100644 index 0000000000..200540e35e --- /dev/null +++ b/src/DEBRepCascade/DEBRepCascade_Provider.cxx @@ -0,0 +1,295 @@ +// Copyright (c) 2022 OPEN CASCADE SAS +// +// This file is part of Open CASCADE Technology software library. +// +// This library is free software; you can redistribute it and/or modify it under +// the terms of the GNU Lesser General Public License version 2.1 as published +// by the Free Software Foundation, with special exception defined in the file +// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT +// distribution for complete text of the license and disclaimer of any warranty. +// +// Alternatively, this file may be used under the terms of Open CASCADE +// commercial license or contractual agreement. + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +IMPLEMENT_STANDARD_RTTIEXT(DEBRepCascade_Provider, DE_Provider) + +//======================================================================= +// function : DEBRepCascade_Provider +// purpose : +//======================================================================= +DEBRepCascade_Provider::DEBRepCascade_Provider() +{} + +//======================================================================= +// function : DEBRepCascade_Provider +// purpose : +//======================================================================= +DEBRepCascade_Provider::DEBRepCascade_Provider(const Handle(DE_ConfigurationNode)& theNode) + :DE_Provider(theNode) +{} + +//======================================================================= +// function : Read +// purpose : +//======================================================================= +bool DEBRepCascade_Provider::Read(const TCollection_AsciiString& thePath, + const Handle(TDocStd_Document)& theDocument, + Handle(XSControl_WorkSession)& theWS, + const Message_ProgressRange& theProgress) +{ + (void)theWS; + return Read(thePath, theDocument, theProgress); +} + +//======================================================================= +// function : Write +// purpose : +//======================================================================= +bool DEBRepCascade_Provider::Write(const TCollection_AsciiString& thePath, + const Handle(TDocStd_Document)& theDocument, + Handle(XSControl_WorkSession)& theWS, + const Message_ProgressRange& theProgress) +{ + (void)theWS; + return Write(thePath, theDocument, theProgress); +} + +//======================================================================= +// function : Read +// purpose : +//======================================================================= +bool DEBRepCascade_Provider::Read(const TCollection_AsciiString& thePath, + const Handle(TDocStd_Document)& theDocument, + const Message_ProgressRange& theProgress) +{ + if(theDocument.IsNull()) + { + Message::SendFail() << "Error in the DEBRepCascade_Provider during reading the file " << + thePath << "\t: theDocument shouldn't be null"; + return false; + } + TopoDS_Shape aShape; + if (!Read(thePath, aShape, theProgress)) + { + return false; + } + Handle(XCAFDoc_ShapeTool) aShTool = XCAFDoc_DocumentTool::ShapeTool(theDocument->Main()); + aShTool->AddShape(aShape); + return true; +} + +//======================================================================= +// function : Write +// purpose : +//======================================================================= +bool DEBRepCascade_Provider::Write(const TCollection_AsciiString& thePath, + const Handle(TDocStd_Document)& theDocument, + const Message_ProgressRange& theProgress) +{ + TopoDS_Shape aShape; + TDF_LabelSequence aLabels; + Handle(XCAFDoc_ShapeTool) aSTool = XCAFDoc_DocumentTool::ShapeTool(theDocument->Main()); + aSTool->GetFreeShapes(aLabels); + if (aLabels.Length() <= 0) + { + Message::SendFail() << "Error in the DEBRepCascade_Provider during writing the file " << + thePath << "\t: Document contain no shapes"; + return false; + } + + if (aLabels.Length() == 1) + { + aShape = aSTool->GetShape(aLabels.Value(1)); + } + else + { + TopoDS_Compound aComp; + BRep_Builder aBuilder; + aBuilder.MakeCompound(aComp); + for (Standard_Integer anIndex = 1; anIndex <= aLabels.Length(); anIndex++) + { + TopoDS_Shape aS = aSTool->GetShape(aLabels.Value(anIndex)); + aBuilder.Add(aComp, aS); + } + aShape = aComp; + } + return Write(thePath, aShape, theProgress); +} + +//======================================================================= +// function : Read +// purpose : +//======================================================================= +bool DEBRepCascade_Provider::Read(const TCollection_AsciiString& thePath, + TopoDS_Shape& theShape, + Handle(XSControl_WorkSession)& theWS, + const Message_ProgressRange& theProgress) +{ + (void)theWS; + return Read(thePath, theShape, theProgress); +} + +//======================================================================= +// function : Write +// purpose : +//======================================================================= +bool DEBRepCascade_Provider::Write(const TCollection_AsciiString& thePath, + const TopoDS_Shape& theShape, + Handle(XSControl_WorkSession)& theWS, + const Message_ProgressRange& theProgress) +{ + (void)theWS; + return Write(thePath, theShape, theProgress); +} + +//======================================================================= +// function : Read +// purpose : +//======================================================================= +bool DEBRepCascade_Provider::Read(const TCollection_AsciiString& thePath, + TopoDS_Shape& theShape, + const Message_ProgressRange& theProgress) +{ + bool isBinaryFormat = true; + { + // probe file header to recognize format + const Handle(OSD_FileSystem)& aFileSystem = OSD_FileSystem::DefaultFileSystem(); + std::shared_ptr aFile = aFileSystem->OpenIStream(thePath, std::ios::in | std::ios::binary); + if (aFile.get() == NULL) + { + Message::SendFail() << "Error in the DEBRepCascade_Provider during reading the file " << + thePath << "\t: Cannot read the file"; + return false; + } + + char aStringBuf[255] = {}; + aFile->read(aStringBuf, 255); + if (aFile->fail()) + { + Message::SendFail() << "Error in the DEBRepCascade_Provider during reading the file " << + thePath << "\t: Cannot read the file"; + return false; + } + isBinaryFormat = !(::strncmp(aStringBuf, "DBRep_DrawableShape", 19) == 0); + } + + if (isBinaryFormat) + { + if (!BinTools::Read(theShape, thePath.ToCString(), theProgress)) + { + Message::SendFail() << "Error in the DEBRepCascade_Provider during reading the file " << + thePath << "\t: Cannot read from the file"; + return false; + } + } + else + { + if (!BRepTools::Read(theShape, thePath.ToCString(), BRep_Builder(), theProgress)) + { + Message::SendFail() << "Error in the DEBRepCascade_Provider during reading the file " << + thePath << "\t: Cannot read from the file"; + return false; + } + } + + return true; +} + +//======================================================================= +// function : Write +// purpose : +//======================================================================= +bool DEBRepCascade_Provider::Write(const TCollection_AsciiString& thePath, + const TopoDS_Shape& theShape, + const Message_ProgressRange& theProgress) +{ + if (GetNode().IsNull() || !GetNode()->IsKind(STANDARD_TYPE(DEBRepCascade_ConfigurationNode))) + { + Message::SendFail() << "Error in the DEBRepCascade_Provider during writing the file " << + thePath << "\t: Incorrect or empty Configuration Node"; + return false; + } + Handle(DEBRepCascade_ConfigurationNode) aNode = Handle(DEBRepCascade_ConfigurationNode)::DownCast(GetNode()); + if (aNode->InternalParameters.WriteBinary) + { + if (aNode->InternalParameters.WriteVersionBin > static_cast(BinTools_FormatVersion_UPPER) || + aNode->InternalParameters.WriteVersionBin < static_cast(BinTools_FormatVersion_LOWER)) + { + Message::SendFail() << "Error in the DEBRepCascade_Provider during writing the file " << + thePath << "\t: Unknown format version"; + return false; + } + if (aNode->InternalParameters.WriteNormals && + aNode->InternalParameters.WriteVersionBin < BinTools_FormatVersion_VERSION_4) + { + Message::SendFail() << "Error in the DEBRepCascade_Provider during writing the file " << + thePath << "\t: Vertex normals require binary format version 4 or later"; + return false; + } + + if (!BinTools::Write(theShape, thePath.ToCString(), aNode->InternalParameters.WriteTriangles, + aNode->InternalParameters.WriteNormals, aNode->InternalParameters.WriteVersionBin, theProgress)) + { + Message::SendFail() << "Error in the DEBRepCascade_Provider during writing the file " << + thePath << "\t: Cannot write the file"; + return false; + } + } + else + { + if (aNode->InternalParameters.WriteVersionAscii > static_cast(TopTools_FormatVersion_UPPER) || + aNode->InternalParameters.WriteVersionAscii < static_cast(TopTools_FormatVersion_LOWER)) + { + Message::SendFail() << "Error in the DEBRepCascade_Provider during writing the file " << + thePath << "\t: Unknown format version"; + return false; + } + if (aNode->InternalParameters.WriteNormals && + aNode->InternalParameters.WriteVersionAscii < TopTools_FormatVersion_VERSION_3) + { + Message::SendFail() << "Error in the DEBRepCascade_Provider during writing the file " << + thePath << "\t: Error: vertex normals require ascii format version 3 or later"; + return false; + } + if (!BRepTools::Write(theShape, thePath.ToCString(), aNode->InternalParameters.WriteTriangles, + aNode->InternalParameters.WriteNormals, aNode->InternalParameters.WriteVersionAscii, theProgress)) + { + Message::SendFail() << "Error in the DEBRepCascade_Provider during writing the file " << + thePath << "\t: Cannot write the file"; + return false; + } + } + + return true; +} + +//======================================================================= +// function : GetFormat +// purpose : +//======================================================================= +TCollection_AsciiString DEBRepCascade_Provider::GetFormat() const +{ + return TCollection_AsciiString("BREP"); +} + +//======================================================================= +// function : GetVendor +// purpose : +//======================================================================= +TCollection_AsciiString DEBRepCascade_Provider::GetVendor() const +{ + return TCollection_AsciiString("OCC"); +} diff --git a/src/DEBRepCascade/DEBRepCascade_Provider.hxx b/src/DEBRepCascade/DEBRepCascade_Provider.hxx new file mode 100644 index 0000000000..606e086222 --- /dev/null +++ b/src/DEBRepCascade/DEBRepCascade_Provider.hxx @@ -0,0 +1,136 @@ +// Copyright (c) 2022 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 _DEBRepCascade_Provider_HeaderFile +#define _DEBRepCascade_Provider_HeaderFile + +#include + +//! The class to transfer BRep files. +//! Reads and Writes any BRep files into/from OCCT. +//! Each operation needs configuration node. +//! +//! Providers grouped by Vendor name and Format type. +//! The Vendor name is "OCC" +//! The Format type is "BREP" +//! The import process is supported. +//! The export process is supported. +class DEBRepCascade_Provider : public DE_Provider +{ +public: + DEFINE_STANDARD_RTTIEXT(DEBRepCascade_Provider, DE_Provider) + +public: + + //! Default constructor + //! Configure translation process with global configuration + Standard_EXPORT DEBRepCascade_Provider(); + + //! Configure translation process + //! @param[in] theNode object to init the DE_Provider + Standard_EXPORT DEBRepCascade_Provider(const Handle(DE_ConfigurationNode)& theNode); + +public: + + //! Reads a CAD file, according internal configuration + //! @param[in] thePath path to the import CAD file + //! @param[out] theDocument document to save result + //! @param[in] theWS current work session + //! @param theProgress[in] progress indicator + //! @return true if Read operation has ended correctly + Standard_EXPORT virtual bool Read(const TCollection_AsciiString& thePath, + const Handle(TDocStd_Document)& theDocument, + Handle(XSControl_WorkSession)& theWS, + const Message_ProgressRange& theProgress = Message_ProgressRange()) Standard_OVERRIDE; + + //! Writes a CAD file, according internal configuration + //! @param[in] thePath path to the export CAD file + //! @param[out] theDocument document to export + //! @param[in] theWS current work session + //! @param theProgress[in] progress indicator + //! @return true if Write operation has ended correctly + Standard_EXPORT virtual bool Write(const TCollection_AsciiString& thePath, + const Handle(TDocStd_Document)& theDocument, + Handle(XSControl_WorkSession)& theWS, + const Message_ProgressRange& theProgress = Message_ProgressRange()) Standard_OVERRIDE; + + //! Reads a CAD file, according internal configuration + //! @param[in] thePath path to the import CAD file + //! @param[out] theDocument document to save result + //! @param theProgress[in] progress indicator + //! @return true if Read operation has ended correctly + Standard_EXPORT virtual bool Read(const TCollection_AsciiString& thePath, + const Handle(TDocStd_Document)& theDocument, + const Message_ProgressRange& theProgress = Message_ProgressRange()) Standard_OVERRIDE; + + //! Writes a CAD file, according internal configuration + //! @param[in] thePath path to the export CAD file + //! @param[out] theDocument document to export + //! @param theProgress[in] progress indicator + //! @return true if Write operation has ended correctly + Standard_EXPORT virtual bool Write(const TCollection_AsciiString& thePath, + const Handle(TDocStd_Document)& theDocument, + const Message_ProgressRange& theProgress = Message_ProgressRange()) Standard_OVERRIDE; + + //! Reads a CAD file, according internal configuration + //! @param[in] thePath path to the import CAD file + //! @param[out] theShape shape to save result + //! @param[in] theWS current work session + //! @param theProgress[in] progress indicator + //! @return true if Read operation has ended correctly + Standard_EXPORT virtual bool Read(const TCollection_AsciiString& thePath, + TopoDS_Shape& theShape, + Handle(XSControl_WorkSession)& theWS, + const Message_ProgressRange& theProgress = Message_ProgressRange()) Standard_OVERRIDE; + + //! Writes a CAD file, according internal configuration + //! @param[in] thePath path to the export CAD file + //! @param[out] theShape shape to export + //! @param[in] theWS current work session + //! @param theProgress[in] progress indicator + //! @return true if Write operation has ended correctly + Standard_EXPORT virtual bool Write(const TCollection_AsciiString& thePath, + const TopoDS_Shape& theShape, + Handle(XSControl_WorkSession)& theWS, + const Message_ProgressRange& theProgress = Message_ProgressRange()) Standard_OVERRIDE; + + //! Reads a CAD file, according internal configuration + //! @param[in] thePath path to the import CAD file + //! @param[out] theShape shape to save result + //! @param theProgress[in] progress indicator + //! @return true if Read operation has ended correctly + Standard_EXPORT virtual bool Read(const TCollection_AsciiString& thePath, + TopoDS_Shape& theShape, + const Message_ProgressRange& theProgress = Message_ProgressRange()) Standard_OVERRIDE; + + //! Writes a CAD file, according internal configuration + //! @param[in] thePath path to the export CAD file + //! @param[out] theShape shape to export + //! @param theProgress[in] progress indicator + //! @return true if Write operation has ended correctly + Standard_EXPORT virtual bool Write(const TCollection_AsciiString& thePath, + const TopoDS_Shape& theShape, + const Message_ProgressRange& theProgress = Message_ProgressRange()) Standard_OVERRIDE; + +public: + + //! Gets CAD format name of associated provider + //! @return provider CAD format + Standard_EXPORT virtual TCollection_AsciiString GetFormat() const Standard_OVERRIDE; + + //! Gets provider's vendor name of associated provider + //! @return provider's vendor name + Standard_EXPORT virtual TCollection_AsciiString GetVendor() const Standard_OVERRIDE; +}; + +#endif // _DEBRepCascade_Provider_HeaderFile diff --git a/src/DEBRepCascade/FILES b/src/DEBRepCascade/FILES new file mode 100644 index 0000000000..e325744990 --- /dev/null +++ b/src/DEBRepCascade/FILES @@ -0,0 +1,4 @@ +DEBRepCascade_ConfigurationNode.cxx +DEBRepCascade_ConfigurationNode.hxx +DEBRepCascade_Provider.cxx +DEBRepCascade_Provider.hxx diff --git a/src/DEXCAFCascade/DEXCAFCascade_ConfigurationNode.cxx b/src/DEXCAFCascade/DEXCAFCascade_ConfigurationNode.cxx new file mode 100644 index 0000000000..98edcd1388 --- /dev/null +++ b/src/DEXCAFCascade/DEXCAFCascade_ConfigurationNode.cxx @@ -0,0 +1,190 @@ +// Copyright (c) 2022 OPEN CASCADE SAS +// +// This file is part of Open CASCADE Technology software library. +// +// This library is free software; you can redistribute it and/or modify it under +// the terms of the GNU Lesser General Public License version 2.1 as published +// by the Free Software Foundation, with special exception defined in the file +// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT +// distribution for complete text of the license and disclaimer of any warranty. +// +// Alternatively, this file may be used under the terms of Open CASCADE +// commercial license or contractual agreement. + +#include + +#include +#include +#include + +IMPLEMENT_STANDARD_RTTIEXT(DEXCAFCascade_ConfigurationNode, DE_ConfigurationNode) + +static const TCollection_AsciiString THE_CONFIGURATION_SCOPE = "provider"; + +//======================================================================= +// function : DEXCAFCascade_ConfigurationNode +// purpose : +//======================================================================= +DEXCAFCascade_ConfigurationNode::DEXCAFCascade_ConfigurationNode() : + DE_ConfigurationNode() +{ + UpdateLoad(); +} + +//======================================================================= +// function : DEXCAFCascade_ConfigurationNode +// purpose : +//======================================================================= +DEXCAFCascade_ConfigurationNode::DEXCAFCascade_ConfigurationNode(const Handle(DEXCAFCascade_ConfigurationNode)& theNode) + :DE_ConfigurationNode(theNode) +{ + InternalParameters = theNode->InternalParameters; + UpdateLoad(); +} + +//======================================================================= +// function : Load +// purpose : +//======================================================================= +bool DEXCAFCascade_ConfigurationNode::Load(const Handle(DE_ConfigurationContext)& theResource) +{ + TCollection_AsciiString aScope = THE_CONFIGURATION_SCOPE + "." + GetFormat() + "." + GetVendor(); + + InternalParameters.ReadAppendMode = (PCDM_ReaderFilter::AppendMode) + theResource->IntegerVal("read.append.mode", InternalParameters.ReadAppendMode, aScope); + theResource->GetStringSeq("read.skip.values", InternalParameters.ReadSkipValues, aScope); + theResource->GetStringSeq("read.values", InternalParameters.ReadValues, aScope); + + return true; +} + +//======================================================================= +// function : Save +// purpose : +//======================================================================= +TCollection_AsciiString DEXCAFCascade_ConfigurationNode::Save() const +{ + TCollection_AsciiString aResult; + aResult += "!*****************************************************************************\n"; + aResult = aResult + "!Configuration Node " + " Vendor: " + GetVendor() + " Format: " + GetFormat() + "\n"; + TCollection_AsciiString aScope = THE_CONFIGURATION_SCOPE + "." + GetFormat() + "." + GetVendor() + "."; + + aResult += "!\n"; + aResult += "!Read parameters:\n"; + aResult += "!\n"; + + aResult += "!\n"; + aResult += "!Don't allow append (when the value = 0, it is the default value), "; + aResult += "keeps existing attributes, reads only new ones(when the value = 1), "; + aResult += "overwrites the existing attributes by the loaded ones(when the value = 2)\n"; + aResult += "!Default value: 0. Available values: 0, 1, 2\n"; + aResult += aScope + "read.append.mode :\t " + InternalParameters.ReadAppendMode + "\n"; + aResult += "!\n"; + + aResult += "!\n"; + aResult += "!Overwrites the existing attributes by the loaded ones"; + aResult += "!Default value: empty. Available values: {sequence}\n"; + aResult += aScope + "read.skip.values :\t "; + for (TColStd_ListOfAsciiString::Iterator anIt(InternalParameters.ReadSkipValues); anIt.More(); anIt.Next()) + { + aResult += anIt.Value() + " "; + } + aResult += "\n!\n"; + + aResult += "!\n"; + aResult += "!1) Adds sub-tree path like \"0:2\""; + aResult += "2) Adds attribute to read by typename. Disables the skipped attributes added. (there shouldn't be '0' after -read)\n"; + aResult += "!Default value: empty. Available values: {sequence}\n"; + aResult += aScope + "read.values :\t "; + for (TColStd_ListOfAsciiString::Iterator anIt(InternalParameters.ReadValues); anIt.More(); anIt.Next()) + { + aResult += anIt.Value() + " "; + } + aResult += "\n!\n"; + + aResult += "!*****************************************************************************\n"; + return aResult; +} + +//======================================================================= +// function : Copy +// purpose : +//======================================================================= +Handle(DE_ConfigurationNode) DEXCAFCascade_ConfigurationNode::Copy() const +{ + return new DEXCAFCascade_ConfigurationNode(*this); +} + +//======================================================================= +// function : BuildProvider +// purpose : +//======================================================================= +Handle(DE_Provider) DEXCAFCascade_ConfigurationNode::BuildProvider() +{ + return new DEXCAFCascade_Provider(); +} + +//======================================================================= +// function : IsImportSupported +// purpose : +//======================================================================= +bool DEXCAFCascade_ConfigurationNode::IsImportSupported() const +{ + return true; +} + +//======================================================================= +// function : IsExportSupported +// purpose : +//======================================================================= +bool DEXCAFCascade_ConfigurationNode::IsExportSupported() const +{ + return true; +} + +//======================================================================= +// function : GetFormat +// purpose : +//======================================================================= +TCollection_AsciiString DEXCAFCascade_ConfigurationNode::GetFormat() const +{ + return TCollection_AsciiString("XCAF"); +} + +//======================================================================= +// function : GetVendor +// purpose : +//======================================================================= +TCollection_AsciiString DEXCAFCascade_ConfigurationNode::GetVendor() const +{ + return TCollection_AsciiString("OCC"); +} + +//======================================================================= +// function : GetExtensions +// purpose : +//======================================================================= +TColStd_ListOfAsciiString DEXCAFCascade_ConfigurationNode::GetExtensions() const +{ + TColStd_ListOfAsciiString anExt; + anExt.Append("xbf"); + return anExt; +} + +//======================================================================= +// function : CheckContent +// purpose : +//======================================================================= +bool DEXCAFCascade_ConfigurationNode::CheckContent(const Handle(NCollection_Buffer)& theBuffer) const +{ + if (theBuffer.IsNull() || theBuffer->Size() < 8) + { + return false; + } + const char* aBytes = (const char*)theBuffer->Data(); + if (!::strncmp(aBytes, "BINFILE", 7)) + { + return true; + } + return false; +} diff --git a/src/DEXCAFCascade/DEXCAFCascade_ConfigurationNode.hxx b/src/DEXCAFCascade/DEXCAFCascade_ConfigurationNode.hxx new file mode 100644 index 0000000000..283b1c71cc --- /dev/null +++ b/src/DEXCAFCascade/DEXCAFCascade_ConfigurationNode.hxx @@ -0,0 +1,99 @@ +// Copyright (c) 2022 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 _DEXCAFCascade_ConfigurationNode_HeaderFile +#define _DEXCAFCascade_ConfigurationNode_HeaderFile + +#include +#include +#include + +//! The purpose of this class is to configure the transfer process for XDE Documents +//! Stores the necessary settings for DEXCAFCascade_Provider. +//! Configures and creates special provider to transfer XDE Documents. +//! +//! Nodes grouped by Vendor name and Format type. +//! The Vendor name is "OCC" +//! The Format type is "XCAF" +//! The supported CAD extension is ".xbf" +//! The import process is supported. +//! The export process is supported. +class DEXCAFCascade_ConfigurationNode : public DE_ConfigurationNode +{ + DEFINE_STANDARD_RTTIEXT(DEXCAFCascade_ConfigurationNode, DE_ConfigurationNode) +public: + + //! Initializes all field by default + Standard_EXPORT DEXCAFCascade_ConfigurationNode(); + + //! Copies values of all fields + //! @param[in] theNode object to copy + Standard_EXPORT DEXCAFCascade_ConfigurationNode(const Handle(DEXCAFCascade_ConfigurationNode)& theNode); + + //! Updates values according the resource + //! @param[in] theResource input resource to use + //! @return true if theResource loading has ended correctly + Standard_EXPORT virtual bool Load(const Handle(DE_ConfigurationContext)& theResource) Standard_OVERRIDE; + + //! Writes configuration to the string + //! @return result resource string + Standard_EXPORT virtual TCollection_AsciiString Save() const Standard_OVERRIDE; + + //! Copies values of all fields + //! @return new object with the same field values + Standard_EXPORT virtual Handle(DE_ConfigurationNode) Copy() const Standard_OVERRIDE; + + + //! Creates new provider for the own format + //! @return new created provider + Standard_EXPORT virtual Handle(DE_Provider) BuildProvider() Standard_OVERRIDE; + +public: + + //! Checks the import supporting + //! @return true if import is supported + Standard_EXPORT virtual bool IsImportSupported() const Standard_OVERRIDE; + + //! Checks the export supporting + //! @return true if export is supported + Standard_EXPORT virtual bool IsExportSupported() const Standard_OVERRIDE; + + //! Gets CAD format name of associated provider + //! @return provider CAD format + Standard_EXPORT virtual TCollection_AsciiString GetFormat() const Standard_OVERRIDE; + + //! Gets provider's vendor name of associated provider + //! @return provider's vendor name + Standard_EXPORT virtual TCollection_AsciiString GetVendor() const Standard_OVERRIDE; + + //! Gets list of supported file extensions + //! @return list of extensions + Standard_EXPORT virtual TColStd_ListOfAsciiString GetExtensions() const Standard_OVERRIDE; + + //! Checks the file content to verify a format + //! @param[in] theBuffer read stream buffer to check content + //! @return Standard_True if file is supported by a current provider + Standard_EXPORT virtual bool CheckContent(const Handle(NCollection_Buffer)& theBuffer) const Standard_OVERRIDE; + +public: + struct XCAFDoc_InternalSection + { + // Read + PCDM_ReaderFilter::AppendMode ReadAppendMode = PCDM_ReaderFilter::AppendMode::AppendMode_Forbid; //!< Setting up the append mode + TColStd_ListOfAsciiString ReadSkipValues; //!< Overwrites the existing attributes by the loaded ones + TColStd_ListOfAsciiString ReadValues; //!< Adds sub-tree path or adds attribute to read by typename + + } InternalParameters; +}; + +#endif // _DEXCAFCascade_ConfigurationNode_HeaderFile diff --git a/src/DEXCAFCascade/DEXCAFCascade_Provider.cxx b/src/DEXCAFCascade/DEXCAFCascade_Provider.cxx new file mode 100644 index 0000000000..cef6ceb014 --- /dev/null +++ b/src/DEXCAFCascade/DEXCAFCascade_Provider.cxx @@ -0,0 +1,308 @@ +// Copyright (c) 2022 OPEN CASCADE SAS +// +// This file is part of Open CASCADE Technology software library. +// +// This library is free software; you can redistribute it and/or modify it under +// the terms of the GNU Lesser General Public License version 2.1 as published +// by the Free Software Foundation, with special exception defined in the file +// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT +// distribution for complete text of the license and disclaimer of any warranty. +// +// Alternatively, this file may be used under the terms of Open CASCADE +// commercial license or contractual agreement. + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include + +IMPLEMENT_STANDARD_RTTIEXT(DEXCAFCascade_Provider, DE_Provider) + + +//======================================================================= +// function : DEXCAFCascade_Provider +// purpose : +//======================================================================= +DEXCAFCascade_Provider::DEXCAFCascade_Provider() +{} + +//======================================================================= +// function : DEXCAFCascade_Provider +// purpose : +//======================================================================= +DEXCAFCascade_Provider::DEXCAFCascade_Provider(const Handle(DE_ConfigurationNode)& theNode) + :DE_Provider(theNode) +{} + +//======================================================================= +// function : Read +// purpose : +//======================================================================= +bool DEXCAFCascade_Provider::Read(const TCollection_AsciiString& thePath, + const Handle(TDocStd_Document)& theDocument, + Handle(XSControl_WorkSession)& theWS, + const Message_ProgressRange& theProgress) +{ + (void)theWS; + return Read(thePath, theDocument, theProgress); +} + +//======================================================================= +// function : Write +// purpose : +//======================================================================= +bool DEXCAFCascade_Provider::Write(const TCollection_AsciiString& thePath, + const Handle(TDocStd_Document)& theDocument, + Handle(XSControl_WorkSession)& theWS, + const Message_ProgressRange& theProgress) +{ + (void)theWS; + return Write(thePath, theDocument, theProgress); +} + +//======================================================================= +// function : Read +// purpose : +//======================================================================= +bool DEXCAFCascade_Provider::Read(const TCollection_AsciiString& thePath, + const Handle(TDocStd_Document)& theDocument, + const Message_ProgressRange& theProgress) +{ + if (theDocument.IsNull()) + { + Message::SendFail() << "Error in the DEXCAFCascade_Provider during reading the file " << + thePath << "\t: theDocument shouldn't be null"; + return false; + } + if (GetNode().IsNull() || !GetNode()->IsKind(STANDARD_TYPE(DEXCAFCascade_ConfigurationNode))) + { + Message::SendFail() << "Error in the DEXCAFCascade_Provider during reading the file " << thePath + << "\t: Incorrect or empty Configuration Node"; + return false; + } + Handle(DEXCAFCascade_ConfigurationNode) aNode = Handle(DEXCAFCascade_ConfigurationNode)::DownCast(GetNode()); + Handle(TDocStd_Document) aDocument; + Handle(TDocStd_Application) anApp = new TDocStd_Application(); + BinDrivers::DefineFormat(anApp); + BinLDrivers::DefineFormat(anApp); + BinTObjDrivers::DefineFormat(anApp); + BinXCAFDrivers::DefineFormat(anApp); + StdDrivers::DefineFormat(anApp); + StdLDrivers::DefineFormat(anApp); + XmlDrivers::DefineFormat(anApp); + XmlLDrivers::DefineFormat(anApp); + XmlTObjDrivers::DefineFormat(anApp); + XmlXCAFDrivers::DefineFormat(anApp); + Handle(PCDM_ReaderFilter) aFilter = new PCDM_ReaderFilter(aNode->InternalParameters.ReadAppendMode); + for (TColStd_ListOfAsciiString::Iterator anIt(aNode->InternalParameters.ReadSkipValues); anIt.More(); anIt.Next()) + { + aFilter->AddSkipped(anIt.Value()); + } + for (TColStd_ListOfAsciiString::Iterator anIt(aNode->InternalParameters.ReadValues); anIt.More(); anIt.Next()) + { + if (anIt.Value().StartsWith("0")) + { + aFilter->AddPath(anIt.Value()); + } + else + { + aFilter->AddRead(anIt.Value()); + } + } + + if (anApp->Open(thePath, aDocument, aFilter, theProgress) != PCDM_RS_OK) + { + Message::SendFail() << "Error in the DEXCAFCascade_Provider during reading the file : " << thePath + << "\t: Cannot open XDE document"; + return false; + } + theDocument->SetData(aDocument->GetData()); + return true; +} + +//======================================================================= +// function : Write +// purpose : +//======================================================================= +bool DEXCAFCascade_Provider::Write(const TCollection_AsciiString& thePath, + const Handle(TDocStd_Document)& theDocument, + const Message_ProgressRange& theProgress) +{ + Handle(TDocStd_Application) anApp = new TDocStd_Application(); + BinXCAFDrivers::DefineFormat(anApp); + PCDM_StoreStatus aStatus = PCDM_SS_Doc_IsNull; + if (!thePath.IsEmpty()) + { + aStatus = anApp->SaveAs(theDocument, thePath, theProgress); + } + else if (!theDocument->IsSaved()) + { + Message::SendFail() << "Storage error in the DEXCAFCascade_Provider during writing the file " << + thePath << "\t: Storage error : this document has never been saved"; + return false; + } + else + { + aStatus = anApp->Save(theDocument, theProgress); + } + + switch (aStatus) + { + case PCDM_SS_OK: + return true; + case PCDM_SS_DriverFailure: + Message::SendFail() << "Error in the DEXCAFCascade_Provider during writing the file : " << thePath + << "\t: Storage error : driver failure"; + break; + case PCDM_SS_WriteFailure: + Message::SendFail() << "Error in the DEXCAFCascade_Provider during the writing the file : " << thePath + << "\t: Storage error : write failure"; + break; + case PCDM_SS_Failure: + Message::SendFail() << "Error in the DEXCAFCascade_Provider during writing the file : " << thePath + << "\t: Storage error : general failure"; + break; + case PCDM_SS_Doc_IsNull: + Message::SendFail() << "Error in the DEXCAFCascade_Provider during writing the file : " << thePath + << "\t: Storage error :: document is NULL"; + break; + case PCDM_SS_No_Obj: + Message::SendFail() << "Error in the DEXCAFCascade_Provider during writing the file : " << thePath + << "\t: Storage error : no object"; + break; + case PCDM_SS_Info_Section_Error: + Message::SendFail() << "Error in the DEXCAFCascade_Provider during writing the file : " << thePath + << "\t: Storage error : section error"; + break; + case PCDM_SS_UserBreak: + Message::SendFail() << "Error in the DEXCAFCascade_Provider during writing the file : " << thePath + << "\t: Storage error : user break"; + break; + case PCDM_SS_UnrecognizedFormat: + Message::SendFail() << "Error in the DEXCAFCascade_Provider during writing the file : " << thePath + << "\t: Storage error : unrecognized document storage format : " << theDocument->StorageFormat(); + break; + } + return false; +} + +//======================================================================= +// function : Read +// purpose : +//======================================================================= +bool DEXCAFCascade_Provider::Read(const TCollection_AsciiString& thePath, + TopoDS_Shape& theShape, + Handle(XSControl_WorkSession)& theWS, + const Message_ProgressRange& theProgress) +{ + (void)theWS; + return Read(thePath, theShape, theProgress); +} + +//======================================================================= +// function : Write +// purpose : +//======================================================================= +bool DEXCAFCascade_Provider::Write(const TCollection_AsciiString& thePath, + const TopoDS_Shape& theShape, + Handle(XSControl_WorkSession)& theWS, + const Message_ProgressRange& theProgress) +{ + (void)theWS; + return Write(thePath, theShape, theProgress); +} + +//======================================================================= +// function : Read +// purpose : +//======================================================================= +bool DEXCAFCascade_Provider::Read(const TCollection_AsciiString& thePath, + TopoDS_Shape& theShape, + const Message_ProgressRange& theProgress) +{ + if (GetNode().IsNull() || !GetNode()->IsKind(STANDARD_TYPE(DEXCAFCascade_ConfigurationNode))) + { + Message::SendFail() << "Error in the DEXCAFCascade_Provider during reading the file " << thePath + << "\t: Incorrect or empty Configuration Node"; + return false; + } + Handle(TDocStd_Document) aDocument; + Handle(TDocStd_Application) anApp = new TDocStd_Application(); + BinXCAFDrivers::DefineFormat(anApp); + anApp->NewDocument("BinXCAF", aDocument); + Read(thePath, aDocument, theProgress); + TDF_LabelSequence aLabels; + Handle(XCAFDoc_ShapeTool) aSTool = XCAFDoc_DocumentTool::ShapeTool(aDocument->Main()); + aSTool->GetFreeShapes(aLabels); + if (aLabels.Length() <= 0) + { + Message::SendFail() << "Error in the DEXCAFCascade_Provider during reading the file : " << thePath + << "\t: Document contain no shapes"; + return false; + } + + if (aLabels.Length() == 1) + { + theShape = aSTool->GetShape(aLabels.Value(1)); + } + else + { + TopoDS_Compound aComp; + BRep_Builder aBuilder; + aBuilder.MakeCompound(aComp); + for (Standard_Integer anIndex = 1; anIndex <= aLabels.Length(); anIndex++) + { + TopoDS_Shape aS = aSTool->GetShape(aLabels.Value(anIndex)); + aBuilder.Add(aComp, aS); + } + theShape = aComp; + } + return true; +} + +//======================================================================= +// function : Write +// purpose : +//======================================================================= +bool DEXCAFCascade_Provider::Write(const TCollection_AsciiString& thePath, + const TopoDS_Shape& theShape, + const Message_ProgressRange& theProgress) +{ + Handle(TDocStd_Document) aDoc = new TDocStd_Document("BinXCAF"); + Handle(XCAFDoc_ShapeTool) aShTool = XCAFDoc_DocumentTool::ShapeTool(aDoc->Main()); + aShTool->AddShape(theShape); + return Write(thePath, aDoc, theProgress); +} + +//======================================================================= +// function : GetFormat +// purpose : +//======================================================================= +TCollection_AsciiString DEXCAFCascade_Provider::GetFormat() const +{ + return TCollection_AsciiString("XCAF"); +} + +//======================================================================= +// function : GetVendor +// purpose : +//======================================================================= +TCollection_AsciiString DEXCAFCascade_Provider::GetVendor() const +{ + return TCollection_AsciiString("OCC"); +} diff --git a/src/DEXCAFCascade/DEXCAFCascade_Provider.hxx b/src/DEXCAFCascade/DEXCAFCascade_Provider.hxx new file mode 100644 index 0000000000..c252c9c106 --- /dev/null +++ b/src/DEXCAFCascade/DEXCAFCascade_Provider.hxx @@ -0,0 +1,136 @@ +// Copyright (c) 2022 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 _DEXCAFCascade_Provider_HeaderFile +#define _DEXCAFCascade_Provider_HeaderFile + +#include + +//! The class to transfer XCAF Documents. +//! Reads and Writes any XDE Document files into/from OCCT. +//! Each operation needs configuration node. +//! +//! Providers grouped by Vendor name and Format type. +//! The Vendor name is "OCC" +//! The Format type is "XCAF" +//! The import process is supported. +//! The export process is supported. +class DEXCAFCascade_Provider : public DE_Provider +{ +public: + DEFINE_STANDARD_RTTIEXT(DEXCAFCascade_Provider, DE_Provider) + +public: + + //! Default constructor + //! Configure translation process with global configuration + Standard_EXPORT DEXCAFCascade_Provider(); + + //! Configure translation process + //! @param[in] theNode object to copy + Standard_EXPORT DEXCAFCascade_Provider(const Handle(DE_ConfigurationNode)& theNode); + +public: + + //! Reads a CAD file, according internal configuration + //! @param[in] thePath path to the import CAD file + //! @param[out] theDocument document to save result + //! @param[in] theWS current work session + //! @param theProgress[in] progress indicator + //! @return true if Read operation has ended correctly + Standard_EXPORT virtual bool Read(const TCollection_AsciiString& thePath, + const Handle(TDocStd_Document)& theDocument, + Handle(XSControl_WorkSession)& theWS, + const Message_ProgressRange& theProgress = Message_ProgressRange()) Standard_OVERRIDE; + + //! Writes a CAD file, according internal configuration + //! @param[in] thePath path to the export CAD file + //! @param[out] theDocument document to export + //! @param[in] theWS current work session + //! @param theProgress[in] progress indicator + //! @return true if Write operation has ended correctly + Standard_EXPORT virtual bool Write(const TCollection_AsciiString& thePath, + const Handle(TDocStd_Document)& theDocument, + Handle(XSControl_WorkSession)& theWS, + const Message_ProgressRange& theProgress = Message_ProgressRange()) Standard_OVERRIDE; + + //! Reads a CAD file, according internal configuration + //! @param[in] thePath path to the import CAD file + //! @param[out] theDocument document to save result + //! @param theProgress[in] progress indicator + //! @return true if Read operation has ended correctly + Standard_EXPORT virtual bool Read(const TCollection_AsciiString& thePath, + const Handle(TDocStd_Document)& theDocument, + const Message_ProgressRange& theProgress = Message_ProgressRange()) Standard_OVERRIDE; + + //! Writes a CAD file, according internal configuration + //! @param[in] thePath path to the export CAD file + //! @param[out] theDocument document to export + //! @param theProgress[in] progress indicator + //! @return true if Write operation has ended correctly + Standard_EXPORT virtual bool Write(const TCollection_AsciiString& thePath, + const Handle(TDocStd_Document)& theDocument, + const Message_ProgressRange& theProgress = Message_ProgressRange()) Standard_OVERRIDE; + + //! Reads a CAD file, according internal configuration + //! @param[in] thePath path to the import CAD file + //! @param[out] theShape shape to save result + //! @param[in] theWS current work session + //! @param theProgress[in] progress indicator + //! @return true if Read operation has ended correctly + Standard_EXPORT virtual bool Read(const TCollection_AsciiString& thePath, + TopoDS_Shape& theShape, + Handle(XSControl_WorkSession)& theWS, + const Message_ProgressRange& theProgress = Message_ProgressRange()) Standard_OVERRIDE; + + //! Writes a CAD file, according internal configuration + //! @param[in] thePath path to the export CAD file + //! @param[out] theShape shape to export + //! @param[in] theWS current work session + //! @param theProgress[in] progress indicator + //! @return true if Write operation has ended correctly + Standard_EXPORT virtual bool Write(const TCollection_AsciiString& thePath, + const TopoDS_Shape& theShape, + Handle(XSControl_WorkSession)& theWS, + const Message_ProgressRange& theProgress = Message_ProgressRange()) Standard_OVERRIDE; + + //! Reads a CAD file, according internal configuration + //! @param[in] thePath path to the import CAD file + //! @param[out] theShape shape to save result + //! @param theProgress[in] progress indicator + //! @return true if Read operation has ended correctly + Standard_EXPORT virtual bool Read(const TCollection_AsciiString& thePath, + TopoDS_Shape& theShape, + const Message_ProgressRange& theProgress = Message_ProgressRange()) Standard_OVERRIDE; + + //! Writes a CAD file, according internal configuration + //! @param[in] thePath path to the export CAD file + //! @param[out] theShape shape to export + //! @param theProgress[in] progress indicator + //! @return true if Write operation has ended correctly + Standard_EXPORT virtual bool Write(const TCollection_AsciiString& thePath, + const TopoDS_Shape& theShape, + const Message_ProgressRange& theProgress = Message_ProgressRange()) Standard_OVERRIDE; + +public: + + //! Gets CAD format name of associated provider + //! @return provider CAD format + Standard_EXPORT virtual TCollection_AsciiString GetFormat() const Standard_OVERRIDE; + + //! Gets provider's vendor name of associated provider + //! @return provider's vendor name + Standard_EXPORT virtual TCollection_AsciiString GetVendor() const Standard_OVERRIDE; +}; + +#endif // _DEXCAFCascade_Provider_HeaderFile diff --git a/src/DEXCAFCascade/FILES b/src/DEXCAFCascade/FILES new file mode 100644 index 0000000000..db5917e692 --- /dev/null +++ b/src/DEXCAFCascade/FILES @@ -0,0 +1,4 @@ +DEXCAFCascade_ConfigurationNode.cxx +DEXCAFCascade_ConfigurationNode.hxx +DEXCAFCascade_Provider.cxx +DEXCAFCascade_Provider.hxx diff --git a/src/IGESCAFControl/FILES b/src/IGESCAFControl/FILES index 51d601c052..7d61e6a979 100644 --- a/src/IGESCAFControl/FILES +++ b/src/IGESCAFControl/FILES @@ -1,5 +1,9 @@ IGESCAFControl.cxx IGESCAFControl.hxx +IGESCAFControl_ConfigurationNode.cxx +IGESCAFControl_ConfigurationNode.hxx +IGESCAFControl_Provider.cxx +IGESCAFControl_Provider.hxx IGESCAFControl_Reader.cxx IGESCAFControl_Reader.hxx IGESCAFControl_Writer.cxx diff --git a/src/IGESCAFControl/IGESCAFControl_ConfigurationNode.cxx b/src/IGESCAFControl/IGESCAFControl_ConfigurationNode.cxx new file mode 100644 index 0000000000..59a02de833 --- /dev/null +++ b/src/IGESCAFControl/IGESCAFControl_ConfigurationNode.cxx @@ -0,0 +1,450 @@ +// Copyright (c) 2022 OPEN CASCADE SAS +// +// This file is part of Open CASCADE Technology software library. +// +// This library is free software; you can redistribute it and/or modify it under +// the terms of the GNU Lesser General Public License version 2.1 as published +// by the Free Software Foundation, with special exception defined in the file +// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT +// distribution for complete text of the license and disclaimer of any warranty. +// +// Alternatively, this file may be used under the terms of Open CASCADE +// commercial license or contractual agreement. + +#include + +#include +#include +#include + +IMPLEMENT_STANDARD_RTTIEXT(IGESCAFControl_ConfigurationNode, DE_ConfigurationNode) + +static const TCollection_AsciiString THE_CONFIGURATION_SCOPE = "provider"; + +//======================================================================= +// function : IGESCAFControl_ConfigurationNode +// purpose : +//======================================================================= +IGESCAFControl_ConfigurationNode::IGESCAFControl_ConfigurationNode() : + DE_ConfigurationNode() +{ + UpdateLoad(); +} + +//======================================================================= +// function : IGESCAFControl_ConfigurationNode +// purpose : +//======================================================================= +IGESCAFControl_ConfigurationNode::IGESCAFControl_ConfigurationNode(const Handle(IGESCAFControl_ConfigurationNode)& theNode) + :DE_ConfigurationNode(theNode) +{ + InternalParameters = theNode->InternalParameters; + UpdateLoad(); +} + +//======================================================================= +// function : Load +// purpose : +//======================================================================= +bool IGESCAFControl_ConfigurationNode::Load(const Handle(DE_ConfigurationContext)& theResource) +{ + TCollection_AsciiString aScope = THE_CONFIGURATION_SCOPE + "." + GetFormat() + "." + GetVendor(); + + InternalParameters.ReadBSplineContinuity = (ReadMode_BSplineContinuity) + theResource->IntegerVal("read.iges.bspline.continuity", InternalParameters.ReadBSplineContinuity, aScope); + InternalParameters.ReadPrecisionMode = (ReadMode_Precision) + theResource->IntegerVal("read.precision.mode", InternalParameters.ReadPrecisionMode, aScope); + InternalParameters.ReadPrecisionVal = + theResource->RealVal("read.precision.val", InternalParameters.ReadPrecisionVal, aScope); + InternalParameters.ReadMaxPrecisionMode = (ReadMode_MaxPrecision) + theResource->IntegerVal("read.maxprecision.mode", InternalParameters.ReadMaxPrecisionMode, aScope); + InternalParameters.ReadMaxPrecisionVal = + theResource->RealVal("read.maxprecision.val", InternalParameters.ReadMaxPrecisionVal, aScope); + InternalParameters.ReadSameParamMode = + theResource->BooleanVal("read.stdsameparameter.mode", InternalParameters.ReadSameParamMode, aScope); + InternalParameters.ReadSurfaceCurveMode = (ReadMode_SurfaceCurve) + theResource->IntegerVal("read.surfacecurve.mode", InternalParameters.ReadSurfaceCurveMode, aScope); + InternalParameters.EncodeRegAngle = + theResource->RealVal("read.encoderegularity.angle", InternalParameters.EncodeRegAngle, aScope); + + InternalParameters.ReadApproxd1 = + theResource->BooleanVal("read.bspline.approxd1.mode", InternalParameters.ReadApproxd1, aScope); + InternalParameters.ReadResourceName = + theResource->StringVal("read.resource.name", InternalParameters.ReadResourceName, aScope); + InternalParameters.ReadSequence = + theResource->StringVal("read.sequence", InternalParameters.ReadSequence, aScope); + InternalParameters.ReadFaultyEntities = + theResource->BooleanVal("read.fau_lty.entities", InternalParameters.ReadFaultyEntities, aScope); + InternalParameters.ReadOnlyVisible = + theResource->BooleanVal("read.onlyvisible", InternalParameters.ReadOnlyVisible, aScope); + InternalParameters.ReadColor = + theResource->BooleanVal("read.color", InternalParameters.ReadColor, aScope); + InternalParameters.ReadName = + theResource->BooleanVal("read.name", InternalParameters.ReadName, aScope); + InternalParameters.ReadLayer = + theResource->BooleanVal("read.layer", InternalParameters.ReadLayer, aScope); + + InternalParameters.WriteBRepMode = (WriteMode_BRep) + theResource->IntegerVal("write.brep.mode", InternalParameters.WriteBRepMode, aScope); + InternalParameters.WriteConvertSurfaceMode = (WriteMode_ConvertSurface) + theResource->IntegerVal("write.convertsurface.mode", InternalParameters.WriteConvertSurfaceMode, aScope); + InternalParameters.WriteUnit = (UnitsMethods_LengthUnit) + theResource->IntegerVal("write.unit", InternalParameters.WriteUnit, aScope); + InternalParameters.WriteHeaderAuthor = + theResource->StringVal("write.header.author", InternalParameters.WriteHeaderAuthor, aScope); + InternalParameters.WriteHeaderCompany = + theResource->StringVal("write.header.company", InternalParameters.WriteHeaderCompany, aScope); + InternalParameters.WriteHeaderProduct = + theResource->StringVal("write.header.product", InternalParameters.WriteHeaderProduct, aScope); + InternalParameters.WriteHeaderReciever = + theResource->StringVal("write.header.receiver", InternalParameters.WriteHeaderReciever, aScope); + InternalParameters.WriteResourceName = + theResource->StringVal("write.resource.name", InternalParameters.WriteResourceName, aScope); + InternalParameters.WriteSequence = + theResource->StringVal("write.sequence", InternalParameters.WriteSequence, aScope); + InternalParameters.WritePrecisionMode = (WriteMode_PrecisionMode) + theResource->IntegerVal("write.precision.mode", InternalParameters.WritePrecisionMode, aScope); + InternalParameters.WritePrecisionVal = + theResource->RealVal("write.precision.val", InternalParameters.WritePrecisionVal, aScope); + InternalParameters.WritePlaneMode = (WriteMode_PlaneMode) + theResource->IntegerVal("write.plane.mode", InternalParameters.WritePlaneMode, aScope); + InternalParameters.WriteOffsetMode = + theResource->BooleanVal("write.offset", InternalParameters.WriteOffsetMode, aScope); + InternalParameters.WriteColor = + theResource->BooleanVal("write.color", InternalParameters.WriteColor, aScope); + InternalParameters.WriteName = + theResource->BooleanVal("write.name", InternalParameters.WriteName, aScope); + InternalParameters.WriteLayer = + theResource->BooleanVal("write.layer", InternalParameters.WriteLayer, aScope); + + return true; +} + +//======================================================================= +// function : Save +// purpose : +//======================================================================= +TCollection_AsciiString IGESCAFControl_ConfigurationNode::Save() const +{ + TCollection_AsciiString aResult; + aResult += "!*****************************************************************************\n"; + aResult = aResult + "!Configuration Node " + " Vendor: " + GetVendor() + " Format: " + GetFormat() + "\n"; + TCollection_AsciiString aScope = THE_CONFIGURATION_SCOPE + "." + GetFormat() + "." + GetVendor() + "."; + + aResult += "!\n"; + aResult += "!Common parameters:\n"; + aResult += "!\n"; + + aResult += "!\n"; + aResult += "!Manages the continuity of BSpline curves (IGES entities 106, 112 and 126) "; + aResult += "after translation to Open CASCADE Technology\n"; + aResult += "!Default value: 1. Available values: 0, 1, 2\n"; + aResult += aScope + "read.iges.bspline.continuity :\t " + InternalParameters.ReadBSplineContinuity + "\n"; + aResult += "!\n"; + + aResult += "!\n"; + aResult += "!Reads the precision mode value\n"; + aResult += "!Default value: \"File\"(0). Available values: \"File\"(0), \"User\"(1)\n"; + aResult += aScope + "read.precision.mode :\t " + InternalParameters.ReadPrecisionMode + "\n"; + aResult += "!\n"; + + aResult += "!\n"; + aResult += "!This parameter gives the precision for shape construction when the "; + aResult += "read.precision.mode parameter value is 1\n"; + aResult += "!Default value: 0.0001. Available values: any real positive (non null) value\n"; + aResult += aScope + "read.precision.val :\t " + InternalParameters.ReadPrecisionVal + "\n"; + aResult += "!\n"; + + aResult += "!\n"; + aResult += "!Defines the mode of applying the maximum allowed tolerance\n"; + aResult += "!Default value: \"Preferred\"(0). Available values: \"Preferred\"(0), \"Forced\"(1)\n"; + aResult += aScope + "read.maxprecision.mode :\t " + InternalParameters.ReadMaxPrecisionMode + "\n"; + aResult += "!\n"; + + aResult += "!\n"; + aResult += "!Defines the maximum allowable tolerance (in internal units, which are specified in xstep.cascade.unit)"; + aResult += " of the shape\n"; + aResult += "!Default value: 1. Available values: any real positive (non null) value\n"; + aResult += aScope + "read.maxprecision.val :\t " + InternalParameters.ReadMaxPrecisionVal + "\n"; + aResult += "!\n"; + + aResult += "!\n"; + aResult += "!Defines the using of BRepLib::SameParameter\n"; + aResult += "!Default value: \"Off\"(0). Available values: \"Off\"(0), \"On\"(0)\n"; + aResult += aScope + "read.stdsameparameter.mode :\t " + InternalParameters.ReadSameParamMode + "\n"; + aResult += "!\n"; + + aResult += "!\n"; + aResult += "!Preference for the computation of curves in case of 2D/3D inconsistency in an entity "; + aResult += "which has both 2D and 3D representations.\n"; + aResult += "!Default value: \"Default\"(0). Available values: \"Default\"(0), \"2DUse_Preferred\"(2), "; + aResult += "\"2DUse_Forced\"(-2), \"3DUse_Preferred\"(3), \"3DUse_Forced\"(-3)\n"; + aResult += aScope + "read.surfacecurve.mode :\t " + InternalParameters.ReadSurfaceCurveMode + "\n"; + aResult += "!\n"; + + aResult += "!\n"; + aResult += "!This parameter is used within the BRepLib::EncodeRegularity() function "; + aResult += "which is called for a shape read "; + aResult += "from an IGES or a STEP file at the end of translation process.This function sets the regularity flag of"; + aResult += " an edge in a shell when this edge is shared by two faces.This flag shows the continuity, "; + aResult += "which these two faces are connected with at that edge.\n"; + aResult += "!Default value (in degrees): 0.57295779513. Available values: \n"; + aResult += aScope + "read.encoderegularity.angle :\t " + InternalParameters.EncodeRegAngle + "\n"; + aResult += "!\n"; + + aResult += "!\n"; + aResult += "!Read parameters:\n"; + aResult += "!\n"; + + aResult += "!\n"; + aResult += "!If set to True, it affects the translation of bspline curves of degree 1 from IGES: "; + aResult += "these curves(which geometrically are polylines) are split by duplicated points, and the translator "; + aResult += "attempts to convert each of the obtained parts to a bspline of a higher continuity\n"; + aResult += "!Default value: \"Off\"(0). Available values: \"Off\"(0), \"On\"(1)\n"; + aResult += aScope + "read.bspline.approxd1.mode :\t " + InternalParameters.ReadApproxd1 + "\n"; + aResult += "!\n"; + + aResult += "!\n"; + aResult += "!Defines the name of the resource file\n"; + aResult += "!Default value: \"IGES\". Available values: \n"; + aResult += aScope + "read.resource.name :\t " + InternalParameters.ReadResourceName + "\n"; + aResult += "!\n"; + + aResult += "!\n"; + aResult += "!Defines the name of the sequence of operators\n"; + aResult += "!Default value: \"FromIGES\". Available values: \n"; + aResult += aScope + "read.sequence :\t " + InternalParameters.ReadSequence + "\n"; + aResult += "!\n"; + + aResult += "!\n"; + aResult += "!Parameter for reading fa-iled entities\n"; + aResult += "!Default value: \"Off\"(0). Available values: \"Off\"(0), \"On\"(1)\n"; + aResult += aScope + "read.fau_lty.entities :\t " + InternalParameters.ReadFaultyEntities + "\n"; + aResult += "!\n"; + + aResult += "!\n"; + aResult += "!Controls transferring invisible sub entities which logically depend on the grouping entities\n"; + aResult += "!Default value: \"Off\"(0). Available values: \"Off\"(0), \"On\"(1)\n"; + aResult += aScope + "read.onlyvisible :\t " + InternalParameters.ReadOnlyVisible + "\n"; + aResult += "!\n"; + + aResult += "!\n"; + aResult += "!Setting up the ColorMode parameter which is used to indicate read Colors or not\n"; + aResult += "!Default value: 1. Available values: 0, 1\n"; + aResult += aScope + "read.color :\t " + InternalParameters.ReadColor + "\n"; + aResult += "!\n"; + + aResult += "!\n"; + aResult += "!Setting up the NameMode parameter which is used to indicate read Names or not\n"; + aResult += "!Default value: 1. Available values: 0, 1\n"; + aResult += aScope + "read.name :\t " + InternalParameters.ReadName + "\n"; + aResult += "!\n"; + + aResult += "!\n"; + aResult += "!Setting up the LayerMode parameter which is used to indicate read Layers or not\n"; + aResult += "!Default value: 1. Available values: 0, 1\n"; + aResult += aScope + "read.layer :\t " + InternalParameters.ReadLayer + "\n"; + aResult += "!\n"; + + aResult += "!\n"; + aResult += "!Write parameters:\n"; + aResult += "!\n"; + + aResult += "!\n"; + aResult += "!Flag to define entities type to write\n"; + aResult += "!Default value: \"Faces\"(0). Available values: \"Faces\"(0), \"BRep\"(1)\n"; + aResult += aScope + "write.brep.mode :\t " + InternalParameters.WriteBRepMode + "\n"; + aResult += "!\n"; + + aResult += "!\n"; + aResult += "!When writing to IGES in the BRep mode, this parameter indicates whether elementary surfaces"; + aResult += "(cylindrical, conical, spherical, and toroidal) are converted into corresponding IGES 5.3 entities"; + aResult += "(if the value of a parameter value is On), or written as surfaces of revolution(by default)\n"; + aResult += "!Default value: \"Off\"(0). Available values: \"Off\"(0), \"On\"(1)\n"; + aResult += aScope + "write.convertsurface.mode :\t " + InternalParameters.WriteConvertSurfaceMode + "\n"; + aResult += "!\n"; + + aResult += "!\n"; + aResult += "!Allows choosing the unit. The default unit for Open CASCADE Technology is \"MM\" (millimeter)."; + aResult += "You can choose to write a file into any unit accepted by IGES\n"; + aResult += "!Default value: MM(2). Available values: \"INCH\"(1), \"MM\"(2), \"??\"(3), \"FT\"(4), \"MI\"(5), "; + aResult += "\"M\"(6), \"KM\"(7), \"MIL\"(8), \"UM\"(9), \"CM\"(10), \"UIN\"(11)\n"; + aResult += aScope + "write.unit :\t " + InternalParameters.WriteUnit + "\n"; + aResult += "!\n"; + + aResult += "!\n"; + aResult += "!Gives the name of the author of the file\n"; + aResult += "!Default value: {System name of the user}. Available values: \n"; + aResult += aScope + "write.header.author :\t " + InternalParameters.WriteHeaderAuthor + "\n"; + aResult += "!\n"; + + aResult += "!\n"; + aResult += "!Gives the name of the sending company\n"; + aResult += "!Default value: ""(empty). Available values: \n"; + aResult += aScope + "write.header.company :\t " + InternalParameters.WriteHeaderCompany + "\n"; + aResult += "!\n"; + + aResult += "!\n"; + aResult += "!Gives the name of the sending product\n"; + aResult += "!Default value: \"CAS.CADE IGES processor Vx.x\""; + aResult += "(where x.x means the current version of Open CASCADE Technology)"; + aResult += "Available values : \n"; + aResult += aScope + "write.header.product :\t " + InternalParameters.WriteHeaderProduct + "\n"; + aResult += "!\n"; + + aResult += "!\n"; + aResult += "!Gives the name of the receiving company\n"; + aResult += "!Default value: ""(empty). Available values: \n"; + aResult += aScope + "write.header.receiver :\t " + InternalParameters.WriteHeaderReciever + "\n"; + aResult += "!\n"; + + aResult += "!\n"; + aResult += "!Defines the name of the resource file\n"; + aResult += "!Default value: \"IGES\". Available values: \n"; + aResult += aScope + "write.resource.name :\t " + InternalParameters.WriteResourceName + "\n"; + aResult += "!\n"; + + aResult += "!\n"; + aResult += "!Defines the name of the sequence of operators\n"; + aResult += "!Default value: \"To\". Available values: \n"; + aResult += aScope + "write.sequence :\t " + InternalParameters.WriteSequence + "\n"; + aResult += "!\n"; + + aResult += "!\n"; + aResult += "!Specifies the mode of writing the resolution value into the IGES file\n"; + aResult += "!Default value: Average(0). Available values: \"Least\"(-1), \"Average\"(0), "; + aResult += "\"Greatest\"(1), \"Session\"(2)\n"; + aResult += aScope + "write.precision.mode :\t " + InternalParameters.WritePrecisionMode + "\n"; + aResult += "!\n"; + + aResult += "!\n"; + aResult += "!This parameter gives the resolution value for an IGES file when the write.precision.mode parameter value is 1\n"; + aResult += "!Default value: 0.0001. Available values: any real positive (non null) value\n"; + aResult += aScope + "write.precision.val :\t " + InternalParameters.WritePrecisionVal + "\n"; + aResult += "!\n"; + + aResult += "!\n"; + aResult += "!Writing planes mode\n"; + aResult += "!Default value: \"Plane\"(0). Available values: \"Plane\"(0), \"BSpline\"(1)\n"; + aResult += aScope + "write.plane.mode :\t " + InternalParameters.WritePlaneMode + "\n"; + aResult += "!\n"; + + aResult += "!\n"; + aResult += "!Writing offset curves like BSplines\n"; + aResult += "!Default value: \"Off\"(0). Available values: \"Off\"(0), \"On\"(1)\n"; + aResult += aScope + "write.offset :\t " + InternalParameters.WriteOffsetMode + "\n"; + aResult += "!\n"; + + aResult += "!\n"; + aResult += "!Setting up the ColorMode parameter which is used to indicate write Colors or not\n"; + aResult += "!Default value: 1. Available values: 0, 1\n"; + aResult += aScope + "write.color :\t " + InternalParameters.WriteColor + "\n"; + aResult += "!\n"; + + aResult += "!\n"; + aResult += "!Setting up the NameMode parameter which is used to indicate write Names or not\n"; + aResult += "!Default value: 1. Available values: 0, 1\n"; + aResult += aScope + "write.name :\t " + InternalParameters.WriteName + "\n"; + aResult += "!\n"; + + aResult += "!\n"; + aResult += "!Setting up the LayerMode parameter which is used to indicate write Layers or not\n"; + aResult += "!Default value: 1. Available values: 0, 1\n"; + aResult += aScope + "write.layer :\t " + InternalParameters.WriteLayer + "\n"; + aResult += "!\n"; + + aResult += "!*****************************************************************************\n"; + return aResult; +} + +//======================================================================= +// function : Copy +// purpose : +//======================================================================= +Handle(DE_ConfigurationNode) IGESCAFControl_ConfigurationNode::Copy() const +{ + return new IGESCAFControl_ConfigurationNode(*this); +} + +//======================================================================= +// function : BuildProvider +// purpose : +//======================================================================= +Handle(DE_Provider) IGESCAFControl_ConfigurationNode::BuildProvider() +{ + return new IGESCAFControl_Provider(this); +} + +//======================================================================= +// function : IsImportSupported +// purpose : +//======================================================================= +bool IGESCAFControl_ConfigurationNode::IsImportSupported() const +{ + return true; +} + +//======================================================================= +// function : IsExportSupported +// purpose : +//======================================================================= +bool IGESCAFControl_ConfigurationNode::IsExportSupported() const +{ + return true; +} + +//======================================================================= +// function : GetFormat +// purpose : +//======================================================================= +TCollection_AsciiString IGESCAFControl_ConfigurationNode::GetFormat() const +{ + return TCollection_AsciiString("IGES"); +} + +//======================================================================= +// function : GetVendor +// purpose : +//======================================================================= +TCollection_AsciiString IGESCAFControl_ConfigurationNode::GetVendor() const +{ + return TCollection_AsciiString("OCC"); +} + +//======================================================================= +// function : GetExtensions +// purpose : +//======================================================================= +TColStd_ListOfAsciiString IGESCAFControl_ConfigurationNode::GetExtensions() const +{ + TColStd_ListOfAsciiString anExt; + anExt.Append("igs"); + anExt.Append("iges"); + return anExt; +} + +//======================================================================= +// function : CheckContent +// purpose : +//======================================================================= +bool IGESCAFControl_ConfigurationNode::CheckContent(const Handle(NCollection_Buffer)& theBuffer) const +{ + if (theBuffer.IsNull() || theBuffer->Size() < 83) + { + return false; + } + const char* aBytes = (const char*)theBuffer->Data(); + if (aBytes[72] == 'S') + { + const char* aPtr = aBytes + 73; + while (aPtr < aBytes + 80 && (*aPtr == ' ' || *aPtr == '0')) + { + aPtr++; + } + if (*aPtr == '1' && !::isalnum((unsigned char)*++aPtr)) + { + return true; + } + } + return false; +} diff --git a/src/IGESCAFControl/IGESCAFControl_ConfigurationNode.hxx b/src/IGESCAFControl/IGESCAFControl_ConfigurationNode.hxx new file mode 100644 index 0000000000..c3eafca60b --- /dev/null +++ b/src/IGESCAFControl/IGESCAFControl_ConfigurationNode.hxx @@ -0,0 +1,178 @@ +// Copyright (c) 2022 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 _IGESCAFControl_ConfigurationNode_HeaderFile +#define _IGESCAFControl_ConfigurationNode_HeaderFile + +#include +#include + +//! The purpose of this class is to configure the transfer process for IGES format +//! Stores the necessary settings for IGESCAFControl_Provider. +//! Configures and creates special provider to transfer IGES files. +//! +//! Nodes grouped by Vendor name and Format type. +//! The Vendor name is "OCC" +//! The Format type is "IGES" +//! The supported CAD extensions are ".igs", ".iges" +//! The import process is supported. +//! The export process is supported. +class IGESCAFControl_ConfigurationNode : public DE_ConfigurationNode +{ + DEFINE_STANDARD_RTTIEXT(IGESCAFControl_ConfigurationNode, DE_ConfigurationNode) +public: + + //! Initializes all fields by default + Standard_EXPORT IGESCAFControl_ConfigurationNode(); + + //! Copies values of all fields + //! @param[in] theNode object to copy + Standard_EXPORT IGESCAFControl_ConfigurationNode(const Handle(IGESCAFControl_ConfigurationNode)& theNode); + + //! Updates values according the resource + //! @param[in] theResource input resource to use + //! @return true if theResource loading has ended correctly + Standard_EXPORT virtual bool Load(const Handle(DE_ConfigurationContext)& theResource) Standard_OVERRIDE; + + //! Writes configuration to the string + //! @return result resource string + Standard_EXPORT virtual TCollection_AsciiString Save() const Standard_OVERRIDE; + + //! Copies values of all fields + //! @return new object with the same field values + Standard_EXPORT virtual Handle(DE_ConfigurationNode) Copy() const Standard_OVERRIDE; + + + //! Creates new provider for the own format + //! @return new created provider + Standard_EXPORT virtual Handle(DE_Provider) BuildProvider() Standard_OVERRIDE; + +public: + + //! Checks the import supporting + //! @return true if import is supported + Standard_EXPORT virtual bool IsImportSupported() const Standard_OVERRIDE; + + //! Checks the export supporting + //! @return true if export is supported + Standard_EXPORT virtual bool IsExportSupported() const Standard_OVERRIDE; + + //! Gets CAD format name of associated provider + //! @return provider CAD format + Standard_EXPORT virtual TCollection_AsciiString GetFormat() const Standard_OVERRIDE; + + //! Gets provider's vendor name of associated provider + //! @return provider's vendor name + Standard_EXPORT virtual TCollection_AsciiString GetVendor() const Standard_OVERRIDE; + + //! Gets list of supported file extensions + //! @return list of extensions + Standard_EXPORT virtual TColStd_ListOfAsciiString GetExtensions() const Standard_OVERRIDE; + + //! Checks the file content to verify a format + //! @param[in] theBuffer read stream buffer to check content + //! @return Standard_True if file is supported by a current provider + Standard_EXPORT virtual bool CheckContent(const Handle(NCollection_Buffer)& theBuffer) const Standard_OVERRIDE; + +public: + + enum ReadMode_BSplineContinuity + { + ReadMode_BSplineContinuity_C0 = 0, + ReadMode_BSplineContinuity_C1, + ReadMode_BSplineContinuity_C2 + }; + enum ReadMode_Precision + { + ReadMode_Precision_File = 0, + ReadMode_Precision_User + }; + enum ReadMode_MaxPrecision + { + ReadMode_MaxPrecision_Preferred = 0, + ReadMode_MaxPrecision_Forced + }; + enum ReadMode_SurfaceCurve + { + ReadMode_SurfaceCurve_Default = 0, + ReadMode_SurfaceCurve_2DUse_Preferred = 2, + ReadMode_SurfaceCurve_2DUse_Forced = -2, + ReadMode_SurfaceCurve_3DUse_Preferred = 3, + ReadMode_SurfaceCurve_3DUse_Forced = -3 + }; + enum WriteMode_BRep + { + WriteMode_BRep_Faces = 0, + WriteMode_BRep_BRep + }; + enum WriteMode_ConvertSurface + { + WriteMode_ConvertSurface_Off = 0, + WriteMode_ConvertSurface_On + }; + enum WriteMode_PrecisionMode + { + WriteMode_PrecisionMode_Least = -1, + WriteMode_PrecisionMode_Average = 0, + WriteMode_PrecisionMode_Greatest = 1, + WriteMode_PrecisionMode_Session = 2 + }; + enum WriteMode_PlaneMode + { + WriteMode_PlaneMode_Plane = 0, + WriteMode_PlaneMode_BSpline + }; + struct IGESCAFControl_InternalSection + { + // Common + ReadMode_BSplineContinuity ReadBSplineContinuity = ReadMode_BSplineContinuity_C1; // + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +IMPLEMENT_STANDARD_RTTIEXT(IGESCAFControl_Provider, DE_Provider) + +//======================================================================= +// function : IGESCAFControl_Provider +// purpose : +//======================================================================= +IGESCAFControl_Provider::IGESCAFControl_Provider() +{} + +//======================================================================= +// function : IGESCAFControl_Provider +// purpose : +//======================================================================= +IGESCAFControl_Provider::IGESCAFControl_Provider(const Handle(DE_ConfigurationNode)& theNode) + : DE_Provider(theNode) +{} + +//======================================================================= +// function : initStatic +// purpose : +//======================================================================= +void IGESCAFControl_Provider::initStatic(const Handle(DE_ConfigurationNode)& theNode) +{ + Handle(IGESCAFControl_ConfigurationNode) aNode = Handle(IGESCAFControl_ConfigurationNode)::DownCast(theNode); + IGESData::Init(); + + // Get previous values + myOldValues.ReadBSplineContinuity = (IGESCAFControl_ConfigurationNode::ReadMode_BSplineContinuity)Interface_Static::IVal("read.iges.bspline.continuity"); + myOldValues.ReadPrecisionMode = (IGESCAFControl_ConfigurationNode::ReadMode_Precision)Interface_Static::IVal("read.precision.mode"); + myOldValues.ReadPrecisionVal = Interface_Static::RVal("read.precision.val"); + myOldValues.ReadMaxPrecisionMode = (IGESCAFControl_ConfigurationNode::ReadMode_MaxPrecision)Interface_Static::IVal("read.maxprecision.mode"); + myOldValues.ReadMaxPrecisionVal = Interface_Static::RVal("read.maxprecision.val"); + myOldValues.ReadSameParamMode = Interface_Static::IVal("read.stdsameparameter.mode") == 1; + myOldValues.ReadSurfaceCurveMode = (IGESCAFControl_ConfigurationNode::ReadMode_SurfaceCurve)Interface_Static::IVal("read.surfacecurve.mode"); + myOldValues.EncodeRegAngle = Interface_Static::RVal("read.encoderegularity.angle") * 180.0 / M_PI; + + myOldValues.ReadApproxd1 = Interface_Static::IVal("read.iges.bspline.approxd1.mode") == 1; + myOldValues.ReadResourceName = Interface_Static::CVal("read.iges.resource.name"); + myOldValues.ReadSequence = Interface_Static::CVal("read.iges.sequence"); + myOldValues.ReadFaultyEntities = Interface_Static::IVal("read.iges.faulty.entities"); + myOldValues.ReadOnlyVisible = Interface_Static::IVal("read.iges.onlyvisible") == 1; + + myOldValues.WriteBRepMode = (IGESCAFControl_ConfigurationNode::WriteMode_BRep)Interface_Static::IVal("write.iges.brep.mode"); + myOldValues.WriteConvertSurfaceMode = (IGESCAFControl_ConfigurationNode::WriteMode_ConvertSurface)Interface_Static::IVal("write.convertsurface.mode"); + myOldValues.WriteUnit = (UnitsMethods_LengthUnit)Interface_Static::IVal("write.iges.unit"); + myOldValues.WriteHeaderAuthor = Interface_Static::CVal("write.iges.header.author"); + myOldValues.WriteHeaderCompany = Interface_Static::CVal("write.iges.header.company"); + myOldValues.WriteHeaderProduct = Interface_Static::CVal("write.iges.header.product"); + myOldValues.WriteHeaderReciever = Interface_Static::CVal("write.iges.header.receiver"); + myOldValues.WriteResourceName = Interface_Static::CVal("write.iges.resource.name"); + myOldValues.WriteSequence = Interface_Static::CVal("write.iges.sequence"); + myOldValues.WritePrecisionMode = (IGESCAFControl_ConfigurationNode::WriteMode_PrecisionMode)Interface_Static::IVal("write.precision.mode"); + myOldValues.WritePrecisionVal = Interface_Static::RVal("write.precision.val"); + myOldValues.WritePlaneMode = (IGESCAFControl_ConfigurationNode::WriteMode_PlaneMode)Interface_Static::IVal("write.iges.plane.mode"); + myOldValues.WriteOffsetMode = Interface_Static::IVal("write.iges.offset.mode") == 1; + + myOldLengthUnit = Interface_Static::IVal("xstep.cascade.unit"); + + // Set new values + UnitsMethods::SetCasCadeLengthUnit(aNode->GlobalParameters.LengthUnit, UnitsMethods_LengthUnit_Millimeter); + TCollection_AsciiString aStrUnit(UnitsMethods::DumpLengthUnit(aNode->GlobalParameters.LengthUnit)); + aStrUnit.UpperCase(); + Interface_Static::SetCVal("xstep.cascade.unit", aStrUnit.ToCString()); + setStatic(aNode->InternalParameters); +} + +//======================================================================= +// function : setStatic +// purpose : +//======================================================================= +void IGESCAFControl_Provider::setStatic(const IGESCAFControl_ConfigurationNode::IGESCAFControl_InternalSection theParameter) +{ + Interface_Static::SetIVal("read.iges.bspline.continuity", theParameter.ReadBSplineContinuity); + Interface_Static::SetIVal("read.precision.mode", theParameter.ReadPrecisionMode); + Interface_Static::SetRVal("read.precision.val", theParameter.ReadPrecisionVal); + Interface_Static::SetIVal("read.maxprecision.mode", theParameter.ReadMaxPrecisionMode); + Interface_Static::SetRVal("read.maxprecision.val", theParameter.ReadMaxPrecisionVal); + Interface_Static::SetIVal("read.stdsameparameter.mode", theParameter.ReadSameParamMode); + Interface_Static::SetIVal("read.surfacecurve.mode", theParameter.ReadSurfaceCurveMode); + Interface_Static::SetRVal("read.encoderegularity.angle", theParameter.EncodeRegAngle * M_PI / 180.0); + + Interface_Static::SetIVal("read.iges.bspline.approxd1.mode", theParameter.ReadApproxd1); + Interface_Static::SetCVal("read.iges.resource.name", theParameter.ReadResourceName.ToCString()); + Interface_Static::SetCVal("read.iges.sequence", theParameter.ReadSequence.ToCString()); + Interface_Static::SetIVal("read.iges.faulty.entities", theParameter.ReadFaultyEntities); + Interface_Static::SetIVal("read.iges.onlyvisible", theParameter.ReadOnlyVisible); + + Interface_Static::SetIVal("write.iges.brep.mode", theParameter.WriteBRepMode); + Interface_Static::SetIVal("write.convertsurface.mode", theParameter.WriteConvertSurfaceMode); + Interface_Static::SetIVal("write.iges.unit", theParameter.WriteUnit); + Interface_Static::SetCVal("write.iges.header.author", theParameter.WriteHeaderAuthor.ToCString()); + Interface_Static::SetCVal("write.iges.header.company", theParameter.WriteHeaderCompany.ToCString()); + Interface_Static::SetCVal("write.iges.header.product", theParameter.WriteHeaderProduct.ToCString()); + Interface_Static::SetCVal("write.iges.header.receiver", theParameter.WriteHeaderReciever.ToCString()); + Interface_Static::SetCVal("write.iges.resource.name", theParameter.WriteResourceName.ToCString()); + Interface_Static::SetCVal("write.iges.sequence", theParameter.WriteSequence.ToCString()); + Interface_Static::SetIVal("write.precision.mode", theParameter.WritePrecisionMode); + Interface_Static::SetRVal("write.precision.val", theParameter.WritePrecisionVal); + Interface_Static::SetIVal("write.iges.plane.mode", theParameter.WritePlaneMode); + Interface_Static::SetIVal("write.iges.offset.mode", theParameter.WriteOffsetMode); +} + +//======================================================================= +// function : resetStatic +// purpose : +//======================================================================= +void IGESCAFControl_Provider::resetStatic() +{ + Interface_Static::SetIVal("xstep.cascade.unit", myOldLengthUnit); + UnitsMethods::SetCasCadeLengthUnit(myOldLengthUnit); + setStatic(myOldValues); +} + +//======================================================================= +// function : Read +// purpose : +//======================================================================= +bool IGESCAFControl_Provider::Read(const TCollection_AsciiString& thePath, + const Handle(TDocStd_Document)& theDocument, + Handle(XSControl_WorkSession)& theWS, + const Message_ProgressRange& theProgress) +{ + if (theDocument.IsNull()) + { + Message::SendFail() << "Error in the IGESCAFControl_Provider during reading the file " << + thePath << "\t: theDocument shouldn't be null"; + return false; + } + if (!GetNode()->IsKind(STANDARD_TYPE(IGESCAFControl_ConfigurationNode))) + { + Message::SendFail() << "Error in the IGESCAFControl_Provider during reading the file " << + thePath << "\t: Incorrect or empty Configuration Node"; + return false; + } + Handle(IGESCAFControl_ConfigurationNode) aNode = Handle(IGESCAFControl_ConfigurationNode)::DownCast(GetNode()); + initStatic(aNode); + + XCAFDoc_DocumentTool::SetLengthUnit(theDocument, aNode->GlobalParameters.LengthUnit, UnitsMethods_LengthUnit_Millimeter); + IGESCAFControl_Reader aReader; + if (!theWS.IsNull()) + { + aReader.SetWS(theWS); + } + + aReader.SetReadVisible(aNode->InternalParameters.ReadOnlyVisible); + + aReader.SetColorMode(aNode->InternalParameters.ReadColor); + aReader.SetNameMode(aNode->InternalParameters.ReadName); + aReader.SetLayerMode(aNode->InternalParameters.ReadLayer); + + IFSelect_ReturnStatus aReadStat = IFSelect_RetVoid; + aReadStat = aReader.ReadFile(thePath.ToCString()); + if (aReadStat != IFSelect_RetDone) + { + Message::SendFail() << "Error in the IGESCAFControl_Provider during reading the file " << + thePath << "\t: abandon, no model loaded"; + resetStatic(); + return false; + } + + if (!aReader.Transfer(theDocument, theProgress)) + { + Message::SendFail() << "Error in the IGESCAFControl_Provider during reading the file " << + thePath << "\t: Cannot read any relevant data from the IGES file"; + resetStatic(); + return false; + } + resetStatic(); + return true; +} + +//======================================================================= +// function : Write +// purpose : +//======================================================================= +bool IGESCAFControl_Provider::Write(const TCollection_AsciiString& thePath, + const Handle(TDocStd_Document)& theDocument, + Handle(XSControl_WorkSession)& theWS, + const Message_ProgressRange& theProgress) +{ + if (!GetNode()->IsKind(STANDARD_TYPE(IGESCAFControl_ConfigurationNode))) + { + Message::SendFail() << "Error in the IGESCAFControl_Provider during reading the file " << + thePath << "\t: Incorrect or empty Configuration Node"; + return false; + } + Handle(IGESCAFControl_ConfigurationNode) aNode = Handle(IGESCAFControl_ConfigurationNode)::DownCast(GetNode()); + initStatic(aNode); + + XCAFDoc_DocumentTool::SetLengthUnit(theDocument, aNode->InternalParameters.WriteUnit, UnitsMethods_LengthUnit_Millimeter); + IGESCAFControl_Writer aWriter; + if (!theWS.IsNull()) + { + aWriter = IGESCAFControl_Writer(theWS); + } + aWriter.SetColorMode(aNode->InternalParameters.WriteColor); + aWriter.SetNameMode(aNode->InternalParameters.WriteName); + aWriter.SetLayerMode(aNode->InternalParameters.WriteLayer); + + if (!aWriter.Transfer(theDocument, theProgress)) + { + Message::SendFail() << "Error in the IGESCAFControl_Provider during reading the file " << + thePath << "\t: The document cannot be translated or gives no result"; + resetStatic(); + return false; + } + if (!aWriter.Write(thePath.ToCString())) + { + Message::SendFail() << "Error in the IGESCAFControl_Provider during reading the file " << + thePath << "\t: Write failed"; + resetStatic(); + return false; + } + resetStatic(); + return true; +} + +//======================================================================= +// function : Read +// purpose : +//======================================================================= +bool IGESCAFControl_Provider::Read(const TCollection_AsciiString& thePath, + const Handle(TDocStd_Document)& theDocument, + const Message_ProgressRange& theProgress) +{ + Handle(XSControl_WorkSession) aWS; + return Read(thePath, theDocument, aWS, theProgress); +} + +//======================================================================= +// function : Write +// purpose : +//======================================================================= +bool IGESCAFControl_Provider::Write(const TCollection_AsciiString& thePath, + const Handle(TDocStd_Document)& theDocument, + const Message_ProgressRange& theProgress) +{ + Handle(XSControl_WorkSession) aWS; + return Write(thePath, theDocument, aWS, theProgress); +} + +//======================================================================= +// function : Read +// purpose : +//======================================================================= +bool IGESCAFControl_Provider::Read(const TCollection_AsciiString& thePath, + TopoDS_Shape& theShape, + Handle(XSControl_WorkSession)& theWS, + const Message_ProgressRange& theProgress) +{ + (void)theProgress; + if (!GetNode()->IsKind(STANDARD_TYPE(IGESCAFControl_ConfigurationNode))) + { + Message::SendFail() << "Error in the IGESCAFControl_Provider during reading the file " << + thePath << "\t: Incorrect or empty Configuration Node"; + return false; + } + Handle(IGESCAFControl_ConfigurationNode) aNode = Handle(IGESCAFControl_ConfigurationNode)::DownCast(GetNode()); + initStatic(aNode); + IGESControl_Reader aReader; + if (!theWS.IsNull()) + { + aReader.SetWS(theWS); + } + aReader.SetReadVisible(aNode->InternalParameters.ReadOnlyVisible); + IFSelect_ReturnStatus aReadStat = IFSelect_RetVoid; + aReadStat = aReader.ReadFile(thePath.ToCString()); + if (aReadStat != IFSelect_RetDone) + { + Message::SendFail() << "Error in the IGESCAFControl_Provider during reading the file " << + thePath << "\t: Could not read file, no model loaded"; + resetStatic(); + return false; + } + if (aReader.TransferRoots() <= 0) + { + Message::SendFail() << "Error in the IGESCAFControl_Provider during reading the file " << + thePath << "\t: Cannot read any relevant data from the IGES file"; + resetStatic(); + return false; + } + theShape = aReader.OneShape(); + resetStatic(); + return true; +} + +//======================================================================= +// function : Write +// purpose : +//======================================================================= +bool IGESCAFControl_Provider::Write(const TCollection_AsciiString& thePath, + const TopoDS_Shape& theShape, + Handle(XSControl_WorkSession)& theWS, + const Message_ProgressRange& theProgress) +{ + (void)theWS; + (void)theProgress; + if (!GetNode()->IsKind(STANDARD_TYPE(IGESCAFControl_ConfigurationNode))) + { + Message::SendFail() << "Error in the IGESCAFControl_Provider during reading the file " << + thePath << "\t: Incorrect or empty Configuration Node"; + return false; + } + Handle(IGESCAFControl_ConfigurationNode) aNode = Handle(IGESCAFControl_ConfigurationNode)::DownCast(GetNode()); + initStatic(aNode); + TCollection_AsciiString aUnit(UnitsMethods::DumpLengthUnit(aNode->InternalParameters.WriteUnit)); + aUnit.UpperCase(); + IGESControl_Writer aWriter(aUnit.ToCString(), + aNode->InternalParameters.WriteBRepMode); + Standard_Boolean aIsOk = aWriter.AddShape(theShape); + if (!aIsOk) + { + Message::SendFail() << "IGESCAFControl_Provider: Shape not written"; + resetStatic(); + return false; + } + + if (!(aWriter.Write(thePath.ToCString()))) + { + Message::SendFail() << "IGESCAFControl_Provider: Error on writing file " << thePath; + resetStatic(); + return false; + } + resetStatic(); + return true; +} + +//======================================================================= +// function : Read +// purpose : +//======================================================================= +bool IGESCAFControl_Provider::Read(const TCollection_AsciiString& thePath, + TopoDS_Shape& theShape, + const Message_ProgressRange& theProgress) +{ + Handle(XSControl_WorkSession) aWS; + return Read(thePath, theShape, aWS, theProgress); +} + +//======================================================================= +// function : Write +// purpose : +//======================================================================= +bool IGESCAFControl_Provider::Write(const TCollection_AsciiString& thePath, + const TopoDS_Shape& theShape, + const Message_ProgressRange& theProgress) +{ + Handle(XSControl_WorkSession) aWS; + return Write(thePath, theShape, aWS, theProgress); +} + +//======================================================================= +// function : GetFormat +// purpose : +//======================================================================= +TCollection_AsciiString IGESCAFControl_Provider::GetFormat() const +{ + return TCollection_AsciiString("IGES"); +} + +//======================================================================= +// function : GetVendor +// purpose : +//======================================================================= +TCollection_AsciiString IGESCAFControl_Provider::GetVendor() const +{ + return TCollection_AsciiString("OCC"); +} diff --git a/src/IGESCAFControl/IGESCAFControl_Provider.hxx b/src/IGESCAFControl/IGESCAFControl_Provider.hxx new file mode 100644 index 0000000000..101234a414 --- /dev/null +++ b/src/IGESCAFControl/IGESCAFControl_Provider.hxx @@ -0,0 +1,152 @@ +// Copyright (c) 2022 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 _IGESCAFControl_Provider_HeaderFile +#define _IGESCAFControl_Provider_HeaderFile + +#include +#include + +//! The class to transfer IGES files. +//! Reads and Writes any IGES files into/from OCCT. +//! Each operation needs configuration node. +//! +//! Providers grouped by Vendor name and Format type. +//! The Vendor name is "OCC" +//! The Format type is "IGES" +//! The import process is supported. +//! The export process is supported. +class IGESCAFControl_Provider : public DE_Provider +{ +public: + DEFINE_STANDARD_RTTIEXT(IGESCAFControl_Provider, DE_Provider) + +public: + + //! Default constructor + //! Configure translation process with global configuration + Standard_EXPORT IGESCAFControl_Provider(); + + //! Configure translation process + //! @param[in] theNode object to copy + Standard_EXPORT IGESCAFControl_Provider(const Handle(DE_ConfigurationNode)& theNode); + +public: + + //! Reads a CAD file, according internal configuration + //! @param[in] thePath path to the import CAD file + //! @param[out] theDocument document to save result + //! @param[in] theWS current work session + //! @param theProgress[in] progress indicator + //! @return true if Read operation has ended correctly + Standard_EXPORT virtual bool Read(const TCollection_AsciiString& thePath, + const Handle(TDocStd_Document)& theDocument, + Handle(XSControl_WorkSession)& theWS, + const Message_ProgressRange& theProgress = Message_ProgressRange()) Standard_OVERRIDE; + + //! Writes a CAD file, according internal configuration + //! @param[in] thePath path to the export CAD file + //! @param[out] theDocument document to export + //! @param[in] theWS current work session + //! @param theProgress[in] progress indicator + //! @return true if Write operation has ended correctly + Standard_EXPORT virtual bool Write(const TCollection_AsciiString& thePath, + const Handle(TDocStd_Document)& theDocument, + Handle(XSControl_WorkSession)& theWS, + const Message_ProgressRange& theProgress = Message_ProgressRange()) Standard_OVERRIDE; + + //! Reads a CAD file, according internal configuration + //! @param[in] thePath path to the import CAD file + //! @param[out] theDocument document to save result + //! @param theProgress[in] progress indicator + //! @return true if Read operation has ended correctly + Standard_EXPORT virtual bool Read(const TCollection_AsciiString& thePath, + const Handle(TDocStd_Document)& theDocument, + const Message_ProgressRange& theProgress = Message_ProgressRange()) Standard_OVERRIDE; + + //! Writes a CAD file, according internal configuration + //! @param[in] thePath path to the export CAD file + //! @param[out] theDocument document to export + //! @param theProgress[in] progress indicator + //! @return true if Write operation has ended correctly + Standard_EXPORT virtual bool Write(const TCollection_AsciiString& thePath, + const Handle(TDocStd_Document)& theDocument, + const Message_ProgressRange& theProgress = Message_ProgressRange()) Standard_OVERRIDE; + + //! Reads a CAD file, according internal configuration + //! @param[in] thePath path to the import CAD file + //! @param[out] theShape shape to save result + //! @param[in] theWS current work session + //! @param theProgress[in] progress indicator + //! @return true if Read operation has ended correctly + Standard_EXPORT virtual bool Read(const TCollection_AsciiString& thePath, + TopoDS_Shape& theShape, + Handle(XSControl_WorkSession)& theWS, + const Message_ProgressRange& theProgress = Message_ProgressRange()) Standard_OVERRIDE; + + //! Writes a CAD file, according internal configuration + //! @param[in] thePath path to the export CAD file + //! @param[out] theShape shape to export + //! @param[in] theWS current work session + //! @param theProgress[in] progress indicator + //! @return true if Write operation has ended correctly + Standard_EXPORT virtual bool Write(const TCollection_AsciiString& thePath, + const TopoDS_Shape& theShape, + Handle(XSControl_WorkSession)& theWS, + const Message_ProgressRange& theProgress = Message_ProgressRange()) Standard_OVERRIDE; + + //! Reads a CAD file, according internal configuration + //! @param[in] thePath path to the import CAD file + //! @param[out] theShape shape to save result + //! @param theProgress[in] progress indicator + //! @return true if Read operation has ended correctly + Standard_EXPORT virtual bool Read(const TCollection_AsciiString& thePath, + TopoDS_Shape& theShape, + const Message_ProgressRange& theProgress = Message_ProgressRange()) Standard_OVERRIDE; + + //! Writes a CAD file, according internal configuration + //! @param[in] thePath path to the export CAD file + //! @param[out] theShape shape to export + //! @param theProgress[in] progress indicator + //! @return true if Write operation has ended correctly + Standard_EXPORT virtual bool Write(const TCollection_AsciiString& thePath, + const TopoDS_Shape& theShape, + const Message_ProgressRange& theProgress = Message_ProgressRange()) Standard_OVERRIDE; + +public: + + //! Gets CAD format name of associated provider + //! @return provider CAD format + Standard_EXPORT virtual TCollection_AsciiString GetFormat() const Standard_OVERRIDE; + + //! Gets provider's vendor name of associated provider + //! @return provider's vendor name + Standard_EXPORT virtual TCollection_AsciiString GetVendor() const Standard_OVERRIDE; + +private: + + //! Initialize static variables + void initStatic(const Handle(DE_ConfigurationNode)& theNode); + + //! Initialize static variables + void setStatic(const IGESCAFControl_ConfigurationNode::IGESCAFControl_InternalSection theParameter); + + //! Reset used interface static variables + void resetStatic(); + + IGESCAFControl_ConfigurationNode::IGESCAFControl_InternalSection myOldValues; + int myOldLengthUnit = 1; + +}; + +#endif // _IGESCAFControl_Provider_HeaderFile diff --git a/src/IGESCAFControl/IGESCAFControl_Reader.cxx b/src/IGESCAFControl/IGESCAFControl_Reader.cxx index 6b99cad0c3..40ae06eb63 100644 --- a/src/IGESCAFControl/IGESCAFControl_Reader.cxx +++ b/src/IGESCAFControl/IGESCAFControl_Reader.cxx @@ -147,7 +147,7 @@ static void AddCompositeShape (const Handle(XCAFDoc_ShapeTool)& theSTool, //function : Transfer //purpose : basic working method //======================================================================= -Standard_Boolean IGESCAFControl_Reader::Transfer (Handle(TDocStd_Document) &doc, +Standard_Boolean IGESCAFControl_Reader::Transfer (const Handle(TDocStd_Document) &doc, const Message_ProgressRange& theProgress) { // read all shapes @@ -349,7 +349,7 @@ Standard_Boolean IGESCAFControl_Reader::Transfer (Handle(TDocStd_Document) &doc, //======================================================================= Standard_Boolean IGESCAFControl_Reader::Perform (const Standard_CString filename, - Handle(TDocStd_Document) &doc, + const Handle(TDocStd_Document) &doc, const Message_ProgressRange& theProgress) { if ( ReadFile ( filename ) != IFSelect_RetDone ) return Standard_False; diff --git a/src/IGESCAFControl/IGESCAFControl_Reader.hxx b/src/IGESCAFControl/IGESCAFControl_Reader.hxx index e7fbb97149..42179f355d 100644 --- a/src/IGESCAFControl/IGESCAFControl_Reader.hxx +++ b/src/IGESCAFControl/IGESCAFControl_Reader.hxx @@ -68,18 +68,18 @@ class IGESCAFControl_Reader : public IGESControl_Reader //! Translates currently loaded IGES file into the document //! Returns True if succeeded, and False in case of fail - Standard_EXPORT Standard_Boolean Transfer (Handle(TDocStd_Document)& theDoc, + Standard_EXPORT Standard_Boolean Transfer (const Handle(TDocStd_Document)& theDoc, const Message_ProgressRange& theProgress = Message_ProgressRange()); Standard_Boolean Perform (const TCollection_AsciiString& theFileName, - Handle(TDocStd_Document)& theDoc, + const Handle(TDocStd_Document)& theDoc, const Message_ProgressRange& theProgress = Message_ProgressRange()) { return Perform (theFileName.ToCString(), theDoc, theProgress); } //! Translate IGES file given by filename into the document //! Return True if succeeded, and False in case of fail Standard_EXPORT Standard_Boolean Perform (const Standard_CString theFileName, - Handle(TDocStd_Document)& theDoc, + const Handle(TDocStd_Document)& theDoc, const Message_ProgressRange& theProgress = Message_ProgressRange()); //! Set ColorMode for indicate read Colors or not. diff --git a/src/RWGltf/FILES b/src/RWGltf/FILES index e9d204c6e3..5d580a2052 100644 --- a/src/RWGltf/FILES +++ b/src/RWGltf/FILES @@ -1,3 +1,9 @@ +RWGltf_CafReader.cxx +RWGltf_CafReader.hxx +RWGltf_CafWriter.cxx +RWGltf_CafWriter.hxx +RWGltf_ConfigurationNode.cxx +RWGltf_ConfigurationNode.hxx RWGltf_GltfAccessor.hxx RWGltf_GltfAccessorCompType.hxx RWGltf_GltfAccessorLayout.hxx @@ -6,23 +12,21 @@ RWGltf_GltfArrayType.hxx RWGltf_GltfBufferView.hxx RWGltf_GltfBufferViewTarget.hxx RWGltf_GltfFace.hxx +RWGltf_GltfJsonParser.cxx +RWGltf_GltfJsonParser.hxx RWGltf_GltfLatePrimitiveArray.cxx RWGltf_GltfLatePrimitiveArray.hxx +RWGltf_GltfMaterialMap.cxx +RWGltf_GltfMaterialMap.hxx +RWGltf_GltfOStreamWriter.hxx RWGltf_GltfPrimArrayData.hxx RWGltf_GltfPrimitiveMode.hxx RWGltf_GltfRootElement.hxx +RWGltf_GltfSceneNodeMap.hxx RWGltf_MaterialCommon.hxx RWGltf_MaterialMetallicRoughness.hxx -RWGltf_CafReader.cxx -RWGltf_CafReader.hxx -RWGltf_CafWriter.cxx -RWGltf_CafWriter.hxx -RWGltf_GltfMaterialMap.cxx -RWGltf_GltfMaterialMap.hxx -RWGltf_GltfJsonParser.cxx -RWGltf_GltfJsonParser.hxx -RWGltf_GltfOStreamWriter.hxx -RWGltf_GltfSceneNodeMap.hxx +RWGltf_Provider.cxx +RWGltf_Provider.hxx RWGltf_TriangulationReader.cxx RWGltf_TriangulationReader.hxx RWGltf_WriterTrsfFormat.hxx diff --git a/src/RWGltf/RWGltf_ConfigurationNode.cxx b/src/RWGltf/RWGltf_ConfigurationNode.cxx new file mode 100644 index 0000000000..65d85e4d84 --- /dev/null +++ b/src/RWGltf/RWGltf_ConfigurationNode.cxx @@ -0,0 +1,349 @@ +// Copyright (c) 2022 OPEN CASCADE SAS +// +// This file is part of Open CASCADE Technology software library. +// +// This library is free software; you can redistribute it and/or modify it under +// the terms of the GNU Lesser General Public License version 2.1 as published +// by the Free Software Foundation, with special exception defined in the file +// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT +// distribution for complete text of the license and disclaimer of any warranty. +// +// Alternatively, this file may be used under the terms of Open CASCADE +// commercial license or contractual agreement. + +#include + +#include +#include + +IMPLEMENT_STANDARD_RTTIEXT(RWGltf_ConfigurationNode, DE_ConfigurationNode) + +static const TCollection_AsciiString THE_CONFIGURATION_SCOPE = "provider"; + +//======================================================================= +// function : RWGltf_ConfigurationNode +// purpose : +//======================================================================= +RWGltf_ConfigurationNode::RWGltf_ConfigurationNode() : + DE_ConfigurationNode() +{ + UpdateLoad(); +} + +//======================================================================= +// function : RWGltf_ConfigurationNode +// purpose : +//======================================================================= +RWGltf_ConfigurationNode::RWGltf_ConfigurationNode(const Handle(RWGltf_ConfigurationNode)& theNode) + :DE_ConfigurationNode(theNode) +{ + InternalParameters = theNode->InternalParameters; + UpdateLoad(); +} + +//======================================================================= +// function : Load +// purpose : +//======================================================================= +bool RWGltf_ConfigurationNode::Load(const Handle(DE_ConfigurationContext)& theResource) +{ + TCollection_AsciiString aScope = THE_CONFIGURATION_SCOPE + "." + GetFormat() + "." + GetVendor(); + + InternalParameters.FileLengthUnit = + theResource->RealVal("file.length.unit", InternalParameters.FileLengthUnit, aScope); + InternalParameters.SystemCS = (RWMesh_CoordinateSystem) + (theResource->IntegerVal("system.cs", (int)InternalParameters.SystemCS, aScope) % 2); + InternalParameters.FileCS = (RWMesh_CoordinateSystem) + (theResource->IntegerVal("file.cs", (int)InternalParameters.SystemCS, aScope) % 2); + + InternalParameters.ReadSinglePrecision = + theResource->BooleanVal("read.single.precision", InternalParameters.ReadSinglePrecision, aScope); + InternalParameters.ReadCreateShapes = + theResource->BooleanVal("read.create.shapes", InternalParameters.ReadCreateShapes, aScope); + InternalParameters.ReadRootPrefix = + theResource->StringVal("read.root.prefix", InternalParameters.ReadRootPrefix, aScope); + InternalParameters.ReadFillDoc = + theResource->BooleanVal("read.fill.doc", InternalParameters.ReadFillDoc, aScope); + InternalParameters.ReadFillIncomplete = + theResource->BooleanVal("read.fill.incomplete", InternalParameters.ReadFillIncomplete, aScope); + InternalParameters.ReadMemoryLimitMiB = + theResource->IntegerVal("read.memory.limit.mib", InternalParameters.ReadMemoryLimitMiB, aScope); + InternalParameters.ReadParallel = + theResource->BooleanVal("read.parallel", InternalParameters.ReadParallel, aScope); + InternalParameters.ReadSkipEmptyNodes = + theResource->BooleanVal("read.skip.empty.nodes", InternalParameters.ReadSkipEmptyNodes, aScope); + InternalParameters.ReadLoadAllScenes = + theResource->BooleanVal("read.load.all.scenes", InternalParameters.ReadLoadAllScenes, aScope); + InternalParameters.ReadUseMeshNameAsFallback = + theResource->BooleanVal("read.use.mesh.name.as.fallback", InternalParameters.ReadUseMeshNameAsFallback, aScope); + InternalParameters.ReadSkipLateDataLoading = + theResource->BooleanVal("read.skip.late.data.loading", InternalParameters.ReadSkipLateDataLoading, aScope); + InternalParameters.ReadKeepLateData = + theResource->BooleanVal("read.keep.late.data", InternalParameters.ReadKeepLateData, aScope); + InternalParameters.ReadPrintDebugMessages = + theResource->BooleanVal("read.print.debug.message", InternalParameters.ReadPrintDebugMessages, aScope); + + InternalParameters.WriteComment = + theResource->StringVal("write.comment", InternalParameters.WriteComment, aScope); + InternalParameters.WriteAuthor = + theResource->StringVal("write.author", InternalParameters.WriteAuthor, aScope); + + InternalParameters.WriteTrsfFormat = (RWGltf_WriterTrsfFormat) + (theResource->IntegerVal("write.trsf.format", InternalParameters.WriteTrsfFormat, aScope) % (RWGltf_WriterTrsfFormat_UPPER + 1)); + InternalParameters.WriteNodeNameFormat = (RWMesh_NameFormat) + (theResource->IntegerVal("write.node.name.format", InternalParameters.WriteNodeNameFormat, aScope) % (RWMesh_NameFormat_ProductAndInstanceAndOcaf + 1)); + InternalParameters.WriteMeshNameFormat = (RWMesh_NameFormat) + (theResource->IntegerVal("write.mesh.name.format", InternalParameters.WriteMeshNameFormat, aScope) % (RWMesh_NameFormat_ProductAndInstanceAndOcaf + 1)); + InternalParameters.WriteForcedUVExport = + theResource->BooleanVal("write.forced.uv.export", InternalParameters.WriteForcedUVExport, aScope); + InternalParameters.WriteEmbedTexturesInGlb = + theResource->BooleanVal("write.embed.textures.in.glb", InternalParameters.WriteEmbedTexturesInGlb, aScope); + InternalParameters.WriteMergeFaces = + theResource->BooleanVal("write.merge.faces", InternalParameters.WriteMergeFaces, aScope); + InternalParameters.WriteSplitIndices16 = + theResource->BooleanVal("write.split.indices16", InternalParameters.WriteSplitIndices16, aScope); + return true; +} + +//======================================================================= +// function : Save +// purpose : +//======================================================================= +TCollection_AsciiString RWGltf_ConfigurationNode::Save() const +{ + TCollection_AsciiString aResult; + aResult += "!*****************************************************************************\n"; + aResult = aResult + "!Configuration Node " + " Vendor: " + GetVendor() + " Format: " + GetFormat() + "\n"; + TCollection_AsciiString aScope = THE_CONFIGURATION_SCOPE + "." + GetFormat() + "." + GetVendor() + "."; + + aResult += "!\n"; + aResult += "!Common parameters:\n"; + aResult += "!\n"; + + aResult += "!\n"; + aResult += "!File length units to convert from while reading the file, defined as scale factor for m (meters)\n"; + aResult += "!Default value: 1.0(M)\n"; + aResult += aScope + "file.length.unit :\t " + InternalParameters.FileLengthUnit + "\n"; + aResult += "!\n"; + + aResult += "!\n"; + aResult += "!System origin coordinate system to perform conversion into during read\n"; + aResult += "!Default value: 0(Zup). Available values: 0(Zup), 1(Yup)\n"; + aResult += aScope + "system.cs :\t " + InternalParameters.SystemCS + "\n"; + aResult += "!\n"; + + aResult += "!\n"; + aResult += "!File origin coordinate system to perform conversion during read\n"; + aResult += "!Default value: 1(Yup). Available values: 0(Zup), 1(Yup)\n"; + aResult += aScope + "file.cs :\t " + InternalParameters.FileCS + "\n"; + aResult += "!\n"; + + aResult += "!\n"; + aResult += "!Read parameters:\n"; + aResult += "!\n"; + + aResult += "!\n"; + aResult += "!Flag for reading vertex data with single or double floating point precision\n"; + aResult += "!Default value: 1(true). Available values: 0(false), 1(true)\n"; + aResult += aScope + "read.single.precision :\t " + InternalParameters.ReadSinglePrecision + "\n"; + aResult += "!\n"; + + aResult += "!\n"; + aResult += "!Flag for create a single triangulation\n"; + aResult += "!Default value: 0(false). Available values: 0(false), 1(true)\n"; + aResult += aScope + "read.create.shapes :\t " + InternalParameters.ReadCreateShapes + "\n"; + aResult += "!\n"; + + aResult += "!\n"; + aResult += "!Root folder for generating root labels names\n"; + aResult += "!Default value: ""(empty). Available values: \n"; + aResult += aScope + "read.root.prefix :\t " + InternalParameters.ReadRootPrefix + "\n"; + aResult += "!\n"; + + aResult += "!\n"; + aResult += "!Flag for fill document from shape sequence\n"; + aResult += "!Default value: 1(true). Available values: 0(false), 1(true)\n"; + aResult += aScope + "read.fill.doc :\t " + InternalParameters.ReadFillDoc + "\n"; + aResult += "!\n"; + + aResult += "!\n"; + aResult += "!Flag for fill the document with partially retrieved data even if reader has fa-iled with er-ror\n"; + aResult += "!Default value: 1(true). Available values: 0(false), 1(true)\n"; + aResult += aScope + "read.fill.incomplete :\t " + InternalParameters.ReadFillIncomplete + "\n"; + aResult += "!\n"; + + aResult += "!\n"; + aResult += "!Memory usage limit(MiB)\n"; + aResult += "!Default value: -1(no limit). Available values: -1(no limit), any positive value\n"; + aResult += aScope + "read.memory.limit.mib :\t " + InternalParameters.ReadMemoryLimitMiB + "\n"; + aResult += "!\n"; + + aResult += "!\n"; + aResult += "!Flag to use multithreading\n"; + aResult += "!Default value: 0(false). Available values: 0(false), 1(true)\n"; + aResult += aScope + "read.parallel :\t " + InternalParameters.ReadParallel + "\n"; + aResult += "!\n"; + + aResult += "!\n"; + aResult += "!Flag to ignore nodes without Geometry\n"; + aResult += "!Default value: 1(true). Available values: 0(false), 1(true)\n"; + aResult += aScope + "read.skip.empty.nodes :\t " + InternalParameters.ReadSkipEmptyNodes + "\n"; + aResult += "!\n"; + + aResult += "!\n"; + aResult += "!Flag to load all scenes in the document\n"; + aResult += "!Default value: 0(false). Available values: 0(false), 1(true)\n"; + aResult += aScope + "read.load.all.scenes :\t " + InternalParameters.ReadLoadAllScenes + "\n"; + aResult += "!\n"; + + aResult += "!\n"; + aResult += "!Flag to use Mesh name in case if Node name is empty\n"; + aResult += "!Default value: 1(true). Available values: 0(false), 1(true)\n"; + aResult += aScope + "read.use.mesh.name.as.fallback :\t " + InternalParameters.ReadUseMeshNameAsFallback + "\n"; + aResult += "!\n"; + + aResult += "!\n"; + aResult += "!Flag to skip triangulation loading\n"; + aResult += "!Default value: 0(false). Available values: 0(false), 1(true)\n"; + aResult += aScope + "read.skip.late.data.loading :\t " + InternalParameters.ReadSkipLateDataLoading + "\n"; + aResult += "!\n"; + + aResult += "!\n"; + aResult += "!Flag to keep information about deferred storage to load/unload triangulation later\n"; + aResult += "!Default value: 1(true). Available values: 0(false), 1(true)\n"; + aResult += aScope + "read.keep.late.data :\t " + InternalParameters.ReadKeepLateData + "\n"; + aResult += "!\n"; + + aResult += "!\n"; + aResult += "!Flag to print additional debug information\n"; + aResult += "!Default value: 0(false). Available values: 0(false), 1(true)\n"; + aResult += aScope + "read.print.debug.message :\t " + InternalParameters.ReadPrintDebugMessages + "\n"; + aResult += "!\n"; + + aResult += "!\n"; + aResult += "!Write parameters:\n"; + aResult += "!\n"; + + aResult += "!\n"; + aResult += "!Export special comment\n"; + aResult += "!Default value: ""(empty). Available values: \n"; + aResult += aScope + "write.comment :\t " + InternalParameters.WriteComment + "\n"; + aResult += "!\n"; + + aResult += "!\n"; + aResult += "!Author of exported file name\n"; + aResult += "!Default value: ""(empty). Available values: \n"; + aResult += aScope + "write.author :\t " + InternalParameters.WriteAuthor + "\n"; + aResult += "!\n"; + + aResult += "!\n"; + aResult += "!Transformation format to write into glTF file\n"; + aResult += "!Default value: 0(Compact). Available values: 0(Compact), 1(Mat4), 2(TRS)\n"; + aResult += aScope + "write.trsf.format :\t " + InternalParameters.WriteTrsfFormat + "\n"; + aResult += "!\n"; + + aResult += "!\n"; + aResult += "! Name format for exporting Nodes\n"; + aResult += "!Default value: 3(InstanceOrProduct). Available values: 0(Compact), 1(Mat4), 2(TRS), 3(InstanceOrProduct), 4(ProductOrInstance), 5(ProductAndInstance), 6(ProductAndInstanceAndOcaf)\n"; + aResult += aScope + "write.node.name.format :\t " + InternalParameters.WriteNodeNameFormat + "\n"; + aResult += "!\n"; + + aResult += "!\n"; + aResult += "!Name format for exporting Meshes\n"; + aResult += "!Default value: 1(Product). Available values: 0(Compact), 1(Mat4), 2(TRS), 3(InstanceOrProduct), 4(ProductOrInstance), 5(ProductAndInstance), 6(ProductAndInstanceAndOcaf)\n"; + aResult += aScope + "write.mesh.name.format :\t " + InternalParameters.WriteMeshNameFormat + "\n"; + aResult += "!\n"; + + aResult += "!\n"; + aResult += "!Export UV coordinates even if there are no mapped texture\n"; + aResult += "!Default value: 0(false). Available values: 0(false), 1(true)\n"; + aResult += aScope + "write.forced.uv.export :\t " + InternalParameters.WriteForcedUVExport + "\n"; + aResult += "!\n"; + + aResult += "!\n"; + aResult += "!Flag to write image textures into GLB file\n"; + aResult += "!Default value: 1(true). Available values: 0(false), 1(true)\n"; + aResult += aScope + "write.embed.textures.in.glb :\t " + InternalParameters.WriteEmbedTexturesInGlb + "\n"; + aResult += "!\n"; + + aResult += "!\n"; + aResult += "!Flag to merge faces within a single part\n"; + aResult += "!Default value: 0(false). Available values: 0(false), 1(true)\n"; + aResult += aScope + "write.merge.faces :\t " + InternalParameters.WriteMergeFaces + "\n"; + aResult += "!\n"; + + aResult += "!\n"; + aResult += "!Flag to prefer keeping 16-bit indexes while merging face\n"; + aResult += "!Default value: 0(false). Available values: 0(false), 1(true)\n"; + aResult += aScope + "write.split.indices16 :\t " + InternalParameters.WriteSplitIndices16 + "\n"; + aResult += "!\n"; + + aResult += "!*****************************************************************************\n"; + return aResult; +} + +//======================================================================= +// function : Copy +// purpose : +//======================================================================= +Handle(DE_ConfigurationNode) RWGltf_ConfigurationNode::Copy() const +{ + return new RWGltf_ConfigurationNode(*this); +} + +//======================================================================= +// function : BuildProvider +// purpose : +//======================================================================= +Handle(DE_Provider) RWGltf_ConfigurationNode::BuildProvider() +{ + return new RWGltf_Provider(this); +} + +//======================================================================= +// function : IsImportSupported +// purpose : +//======================================================================= +bool RWGltf_ConfigurationNode::IsImportSupported() const +{ + return true; +} + +//======================================================================= +// function : IsExportSupported +// purpose : +//======================================================================= +bool RWGltf_ConfigurationNode::IsExportSupported() const +{ + return true; +} + +//======================================================================= +// function : GetFormat +// purpose : +//======================================================================= +TCollection_AsciiString RWGltf_ConfigurationNode::GetFormat() const +{ + return TCollection_AsciiString("GLTF"); +} + +//======================================================================= +// function : GetVendor +// purpose : +//======================================================================= +TCollection_AsciiString RWGltf_ConfigurationNode::GetVendor() const +{ + return TCollection_AsciiString("OCC"); +} + +//======================================================================= +// function : GetExtensions +// purpose : +//======================================================================= +TColStd_ListOfAsciiString RWGltf_ConfigurationNode::GetExtensions() const +{ + TColStd_ListOfAsciiString anExt; + anExt.Append("gltf"); + anExt.Append("glb"); + return anExt; +} diff --git a/src/RWGltf/RWGltf_ConfigurationNode.hxx b/src/RWGltf/RWGltf_ConfigurationNode.hxx new file mode 100644 index 0000000000..df01849bb5 --- /dev/null +++ b/src/RWGltf/RWGltf_ConfigurationNode.hxx @@ -0,0 +1,117 @@ +// Copyright (c) 2022 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 _RWGltf_ConfigurationNode_HeaderFile +#define _RWGltf_ConfigurationNode_HeaderFile + +#include +#include +#include +#include + +//! The purpose of this class is to configure the transfer process for glTF format +//! Stores the necessary settings for RWGltf_Provider. +//! Configures and creates special provider to transfer glTF files. +//! +//! Nodes grouped by Vendor name and Format type. +//! The Vendor name is "OCC" +//! The Format type is "GLTF" +//! The supported CAD extensions are ".gltf", ".glb" +//! The import process is supported. +//! The export process is supported. +class RWGltf_ConfigurationNode : public DE_ConfigurationNode +{ + DEFINE_STANDARD_RTTIEXT(RWGltf_ConfigurationNode, DE_ConfigurationNode) +public: + + //! Initializes all field by default + Standard_EXPORT RWGltf_ConfigurationNode(); + + //! Copies values of all fields + //! @param[in] theNode object to copy + Standard_EXPORT RWGltf_ConfigurationNode(const Handle(RWGltf_ConfigurationNode)& theNode); + + //! Updates values according the resource + //! @param[in] theResource input resource to use + //! @return true if theResource loading has ended correctly + Standard_EXPORT virtual bool Load(const Handle(DE_ConfigurationContext)& theResource) Standard_OVERRIDE; + + //! Writes configuration to the string + //! @return result resource string + Standard_EXPORT virtual TCollection_AsciiString Save() const Standard_OVERRIDE; + + //! Copies values of all fields + //! @return new object with the same field values + Standard_EXPORT virtual Handle(DE_ConfigurationNode) Copy() const Standard_OVERRIDE; + + //! Creates new provider for the own format + //! @return new created provider + Standard_EXPORT virtual Handle(DE_Provider) BuildProvider() Standard_OVERRIDE; + +public: + + //! Checks the import supporting + //! @return true if import is supported + Standard_EXPORT virtual bool IsImportSupported() const Standard_OVERRIDE; + + //! Checks the export supporting + //! @return true if export is supported + Standard_EXPORT virtual bool IsExportSupported() const Standard_OVERRIDE; + + //! Gets CAD format name of associated provider + //! @return provider CAD format + Standard_EXPORT virtual TCollection_AsciiString GetFormat() const Standard_OVERRIDE; + + //! Gets provider's vendor name of associated provider + //! @return provider's vendor name + Standard_EXPORT virtual TCollection_AsciiString GetVendor() const Standard_OVERRIDE; + + //! Gets list of supported file extensions + //! @return list of extensions + Standard_EXPORT virtual TColStd_ListOfAsciiString GetExtensions() const Standard_OVERRIDE; + +public: + struct RWGltf_InternalSection + { + // Common + double FileLengthUnit = 1.; //!< File length units to convert from while reading the file, defined as scale factor for m (meters) + RWMesh_CoordinateSystem SystemCS = RWMesh_CoordinateSystem_Zup; //!< System origin coordinate system to perform conversion into during read + RWMesh_CoordinateSystem FileCS = RWMesh_CoordinateSystem_Yup; //!< File origin coordinate system to perform conversion during read + // Reading + bool ReadSinglePrecision = true; //!< Flag for reading vertex data with single or double floating point precision + bool ReadCreateShapes = false; //!< Flag for create a single triangulation + TCollection_AsciiString ReadRootPrefix; //!< Root folder for generating root labels names + bool ReadFillDoc = true; //!< Flag for fill document from shape sequence + bool ReadFillIncomplete = true; //!< Flag for fill the document with partially retrieved data even if reader has failed with error + int ReadMemoryLimitMiB = -1; //!< Memory usage limit + bool ReadParallel = false; //!< Flag to use multithreading + bool ReadSkipEmptyNodes = true; //!< Flag to ignore nodes without Geometry + bool ReadLoadAllScenes = false; //!< Flag to load all scenes in the document + bool ReadUseMeshNameAsFallback = true; //!< Flag to use Mesh name in case if Node name is empty + bool ReadSkipLateDataLoading = false; //!< Flag to skip triangulation loading + bool ReadKeepLateData = true;//!< Flag to keep information about deferred storage to load/unload triangulation later + bool ReadPrintDebugMessages = false; //!< Flag to print additional debug information + // Writing + TCollection_AsciiString WriteComment; //!< Export special comment + TCollection_AsciiString WriteAuthor; //!< Author of exported file name + RWGltf_WriterTrsfFormat WriteTrsfFormat = RWGltf_WriterTrsfFormat_Compact; //!< Transformation format to write into glTF file + RWMesh_NameFormat WriteNodeNameFormat = RWMesh_NameFormat_InstanceOrProduct; //!< Name format for exporting Nodes + RWMesh_NameFormat WriteMeshNameFormat = RWMesh_NameFormat_Product; //!< Name format for exporting Meshes + bool WriteForcedUVExport = false; //!< Export UV coordinates even if there are no mapped texture + bool WriteEmbedTexturesInGlb = true; //!< Flag to write image textures into GLB file + bool WriteMergeFaces = false; //!< Flag to merge faces within a single part + bool WriteSplitIndices16 = false; //!< Flag to prefer keeping 16-bit indexes while merging face + } InternalParameters; +}; + +#endif // _RWGltf_ConfigurationNode_HeaderFile diff --git a/src/RWGltf/RWGltf_Provider.cxx b/src/RWGltf/RWGltf_Provider.cxx new file mode 100644 index 0000000000..f8a9436c7e --- /dev/null +++ b/src/RWGltf/RWGltf_Provider.cxx @@ -0,0 +1,259 @@ +// Copyright (c) 2022 OPEN CASCADE SAS +// +// This file is part of Open CASCADE Technology software library. +// +// This library is free software; you can redistribute it and/or modify it under +// the terms of the GNU Lesser General Public License version 2.1 as published +// by the Free Software Foundation, with special exception defined in the file +// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT +// distribution for complete text of the license and disclaimer of any warranty. +// +// Alternatively, this file may be used under the terms of Open CASCADE +// commercial license or contractual agreement. + +#include + +#include +#include +#include +#include +#include +#include + +namespace +{ + //======================================================================= + // function : SetReaderParameters + // purpose : + //======================================================================= + static void SetReaderParameters(RWGltf_CafReader& theReader, const Handle(RWGltf_ConfigurationNode) theNode) + { + theReader.SetDoublePrecision(!theNode->InternalParameters.ReadSinglePrecision); + theReader.SetSystemLengthUnit(theNode->GlobalParameters.LengthUnit / 1000); + theReader.SetSystemCoordinateSystem(theNode->InternalParameters.SystemCS); + theReader.SetFileLengthUnit(theNode->InternalParameters.FileLengthUnit); + theReader.SetFileCoordinateSystem(theNode->InternalParameters.FileCS); + theReader.SetRootPrefix(theNode->InternalParameters.ReadRootPrefix); + theReader.SetMemoryLimitMiB(theNode->InternalParameters.ReadMemoryLimitMiB); + + theReader.SetParallel(theNode->InternalParameters.ReadParallel); + theReader.SetSkipEmptyNodes(theNode->InternalParameters.ReadSkipEmptyNodes); + theReader.SetLoadAllScenes(theNode->InternalParameters.ReadLoadAllScenes); + theReader.SetMeshNameAsFallback(theNode->InternalParameters.ReadUseMeshNameAsFallback); + theReader.SetToSkipLateDataLoading(theNode->InternalParameters.ReadSkipLateDataLoading); + theReader.SetToKeepLateData(theNode->InternalParameters.ReadKeepLateData); + theReader.SetToPrintDebugMessages(theNode->InternalParameters.ReadPrintDebugMessages); + } +} + +IMPLEMENT_STANDARD_RTTIEXT(RWGltf_Provider, DE_Provider) + +//======================================================================= +// function : RWGltf_Provider +// purpose : +//======================================================================= +RWGltf_Provider::RWGltf_Provider() +{} + +//======================================================================= +// function : RWGltf_Provider +// purpose : +//======================================================================= +RWGltf_Provider::RWGltf_Provider(const Handle(DE_ConfigurationNode)& theNode) + :DE_Provider(theNode) +{} + +//======================================================================= +// function : Read +// purpose : +//======================================================================= +bool RWGltf_Provider::Read(const TCollection_AsciiString& thePath, + const Handle(TDocStd_Document)& theDocument, + Handle(XSControl_WorkSession)& theWS, + const Message_ProgressRange& theProgress) +{ + (void)theWS; + return Read(thePath, theDocument, theProgress); +} + +//======================================================================= +// function : Write +// purpose : +//======================================================================= +bool RWGltf_Provider::Write(const TCollection_AsciiString& thePath, + const Handle(TDocStd_Document)& theDocument, + Handle(XSControl_WorkSession)& theWS, + const Message_ProgressRange& theProgress) +{ + (void)theWS; + return Write(thePath, theDocument, theProgress); +} + +//======================================================================= +// function : Read +// purpose : +//======================================================================= +bool RWGltf_Provider::Read(const TCollection_AsciiString& thePath, + const Handle(TDocStd_Document)& theDocument, + const Message_ProgressRange& theProgress) +{ + if (theDocument.IsNull()) + { + Message::SendFail() << "Error in the RWGltf_Provider during reading the file " << + thePath << "\t: theDocument shouldn't be null"; + return false; + } + if (GetNode().IsNull() || (!GetNode().IsNull() && !GetNode()->IsKind(STANDARD_TYPE(RWGltf_ConfigurationNode)))) + { + Message::SendFail() << "Error in the RWGltf_Provider during reading the file " << + thePath << "\t: Incorrect or empty Configuration Node"; + return false; + } + Handle(RWGltf_ConfigurationNode) aNode = Handle(RWGltf_ConfigurationNode)::DownCast(GetNode()); + RWGltf_CafReader aReader; + aReader.SetDocument(theDocument); + SetReaderParameters(aReader, aNode); + XCAFDoc_DocumentTool::SetLengthUnit(theDocument, aNode->GlobalParameters.LengthUnit, UnitsMethods_LengthUnit_Millimeter); + if (!aReader.Perform(thePath, theProgress)) + { + Message::SendFail() << "Error in the RWGltf_Provider during reading the file " << thePath; + return false; + } + + return true; +} + +//======================================================================= +// function : Write +// purpose : +//======================================================================= +bool RWGltf_Provider::Write(const TCollection_AsciiString& thePath, + const Handle(TDocStd_Document)& theDocument, + const Message_ProgressRange& theProgress) +{ + if (GetNode().IsNull() || !GetNode()->IsKind(STANDARD_TYPE(RWGltf_ConfigurationNode))) + { + Message::SendFail() << "Error in the RWGltf_Provider during writing the file " << + thePath << "\t: Incorrect or empty Configuration Node"; + return false; + } + Handle(RWGltf_ConfigurationNode) aNode = Handle(RWGltf_ConfigurationNode)::DownCast(GetNode()); + + RWMesh_CoordinateSystemConverter aConverter; + aConverter.SetInputLengthUnit(aNode->GlobalParameters.LengthUnit / 1000); + aConverter.SetInputCoordinateSystem(aNode->InternalParameters.SystemCS); + aConverter.SetOutputLengthUnit(aNode->InternalParameters.FileLengthUnit); + aConverter.SetOutputCoordinateSystem(aNode->InternalParameters.FileCS); + + TColStd_IndexedDataMapOfStringString aFileInfo; + if (!aNode->InternalParameters.WriteAuthor.IsEmpty()) + { + aFileInfo.Add("Author", aNode->InternalParameters.WriteAuthor); + } + if (!aNode->InternalParameters.WriteComment.IsEmpty()) + { + aFileInfo.Add("Comments", aNode->InternalParameters.WriteComment); + } + + TCollection_AsciiString anExt = thePath; + anExt.LowerCase(); + RWGltf_CafWriter aWriter(thePath, anExt.EndsWith(".glb")); + aWriter.SetCoordinateSystemConverter(aConverter); + aWriter.SetTransformationFormat(aNode->InternalParameters.WriteTrsfFormat); + aWriter.SetNodeNameFormat(aNode->InternalParameters.WriteNodeNameFormat); + aWriter.SetMeshNameFormat(aNode->InternalParameters.WriteMeshNameFormat); + aWriter.SetForcedUVExport(aNode->InternalParameters.WriteForcedUVExport); + aWriter.SetToEmbedTexturesInGlb(aNode->InternalParameters.WriteEmbedTexturesInGlb); + aWriter.SetMergeFaces(aNode->InternalParameters.WriteMergeFaces); + aWriter.SetSplitIndices16(aNode->InternalParameters.WriteSplitIndices16); + if (!aWriter.Perform(theDocument, aFileInfo, theProgress)) + { + Message::SendFail() << "Error in the RWGltf_Provider during writing the file " << thePath; + return false; + } + return true; +} + +//======================================================================= +// function : Read +// purpose : +//======================================================================= +bool RWGltf_Provider::Read(const TCollection_AsciiString& thePath, + TopoDS_Shape& theShape, + Handle(XSControl_WorkSession)& theWS, + const Message_ProgressRange& theProgress) +{ + (void)theWS; + return Read(thePath, theShape, theProgress); +} + +//======================================================================= +// function : Write +// purpose : +//======================================================================= +bool RWGltf_Provider::Write(const TCollection_AsciiString& thePath, + const TopoDS_Shape& theShape, + Handle(XSControl_WorkSession)& theWS, + const Message_ProgressRange& theProgress) +{ + (void)theWS; + return Write(thePath, theShape, theProgress); +} + +//======================================================================= +// function : Read +// purpose : +//======================================================================= +bool RWGltf_Provider::Read(const TCollection_AsciiString& thePath, + TopoDS_Shape& theShape, + const Message_ProgressRange& theProgress) +{ + if (GetNode().IsNull() || !GetNode()->IsKind(STANDARD_TYPE(RWGltf_ConfigurationNode))) + { + Message::SendFail() << "Error in the RWGltf_Provider during reading the file " << + thePath << "\t: Incorrect or empty Configuration Node"; + return false; + } + Handle(RWGltf_ConfigurationNode) aNode = Handle(RWGltf_ConfigurationNode)::DownCast(GetNode()); + RWGltf_CafReader aReader; + SetReaderParameters(aReader, aNode); + if (!aReader.Perform(thePath, theProgress)) + { + Message::SendFail() << "Error in the RWGltf_Provider during reading the file " << thePath; + return false; + } + theShape = aReader.SingleShape(); + return true; +} + +//======================================================================= +// function : Write +// purpose : +//======================================================================= +bool RWGltf_Provider::Write(const TCollection_AsciiString& thePath, + const TopoDS_Shape& theShape, + const Message_ProgressRange& theProgress) +{ + Handle(TDocStd_Document) aDoc = new TDocStd_Document("BinXCAF"); + Handle(XCAFDoc_ShapeTool) aShTool = XCAFDoc_DocumentTool::ShapeTool(aDoc->Main()); + aShTool->AddShape(theShape); + return Write(thePath, aDoc, theProgress); +} + +//======================================================================= +// function : GetFormat +// purpose : +//======================================================================= +TCollection_AsciiString RWGltf_Provider::GetFormat() const +{ + return TCollection_AsciiString("GLTF"); +} + +//======================================================================= +// function : GetVendor +// purpose : +//======================================================================= +TCollection_AsciiString RWGltf_Provider::GetVendor() const +{ + return TCollection_AsciiString("OCC"); +} diff --git a/src/RWGltf/RWGltf_Provider.hxx b/src/RWGltf/RWGltf_Provider.hxx new file mode 100644 index 0000000000..09f2036bb6 --- /dev/null +++ b/src/RWGltf/RWGltf_Provider.hxx @@ -0,0 +1,139 @@ +// Copyright (c) 2022 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 _RWGltf_Provider_HeaderFile +#define _RWGltf_Provider_HeaderFile + +#include +#include +#include + +//! The class to transfer glTF files. +//! Reads and Writes any glTF files into/from OCCT. +//! Each operation needs configuration node. +//! +//! Providers grouped by Vendor name and Format type. +//! The Vendor name is "OCC" +//! The Format type is "GLTF" +//! The import process is supported. +//! The export process is supported. +class RWGltf_Provider : public DE_Provider +{ +public: + DEFINE_STANDARD_RTTIEXT(RWGltf_Provider, DE_Provider) + +public: + + //! Default constructor + //! Configure translation process with global configuration + Standard_EXPORT RWGltf_Provider(); + + //! Configure translation process + //! @param[in] theNode object to copy + Standard_EXPORT RWGltf_Provider(const Handle(DE_ConfigurationNode)& theNode); + +public: + + //! Reads a CAD file, according internal configuration + //! @param[in] thePath path to the import CAD file + //! @param[out] theDocument document to save result + //! @param[in] theWS current work session + //! @param theProgress[in] progress indicator + //! @return true if Read operation has ended correctly + Standard_EXPORT virtual bool Read(const TCollection_AsciiString& thePath, + const Handle(TDocStd_Document)& theDocument, + Handle(XSControl_WorkSession)& theWS, + const Message_ProgressRange& theProgress = Message_ProgressRange()) Standard_OVERRIDE; + + //! Writes a CAD file, according internal configuration + //! @param[in] thePath path to the export CAD file + //! @param[out] theDocument document to export + //! @param[in] theWS current work session + //! @param theProgress[in] progress indicator + //! @return true if Write operation has ended correctly + Standard_EXPORT virtual bool Write(const TCollection_AsciiString& thePath, + const Handle(TDocStd_Document)& theDocument, + Handle(XSControl_WorkSession)& theWS, + const Message_ProgressRange& theProgress = Message_ProgressRange()) Standard_OVERRIDE; + + //! Reads a CAD file, according internal configuration + //! @param[in] thePath path to the import CAD file + //! @param[out] theDocument document to save result + //! @param theProgress[in] progress indicator + //! @return true if Read operation has ended correctly + Standard_EXPORT virtual bool Read(const TCollection_AsciiString& thePath, + const Handle(TDocStd_Document)& theDocument, + const Message_ProgressRange& theProgress = Message_ProgressRange()) Standard_OVERRIDE; + + //! Writes a CAD file, according internal configuration + //! @param[in] thePath path to the export CAD file + //! @param[out] theDocument document to export + //! @param theProgress[in] progress indicator + //! @return true if Write operation has ended correctly + Standard_EXPORT virtual bool Write(const TCollection_AsciiString& thePath, + const Handle(TDocStd_Document)& theDocument, + const Message_ProgressRange& theProgress = Message_ProgressRange()) Standard_OVERRIDE; + + //! Reads a CAD file, according internal configuration + //! @param[in] thePath path to the import CAD file + //! @param[out] theShape shape to save result + //! @param[in] theWS current work session + //! @param theProgress[in] progress indicator + //! @return true if Read operation has ended correctly + Standard_EXPORT virtual bool Read(const TCollection_AsciiString& thePath, + TopoDS_Shape& theShape, + Handle(XSControl_WorkSession)& theWS, + const Message_ProgressRange& theProgress = Message_ProgressRange()) Standard_OVERRIDE; + + //! Writes a CAD file, according internal configuration + //! @param[in] thePath path to the export CAD file + //! @param[out] theShape shape to export + //! @param[in] theWS current work session + //! @param theProgress[in] progress indicator + //! @return true if Write operation has ended correctly + Standard_EXPORT virtual bool Write(const TCollection_AsciiString& thePath, + const TopoDS_Shape& theShape, + Handle(XSControl_WorkSession)& theWS, + const Message_ProgressRange& theProgress = Message_ProgressRange()) Standard_OVERRIDE; + + //! Reads a CAD file, according internal configuration + //! @param[in] thePath path to the import CAD file + //! @param[out] theShape shape to save result + //! @param theProgress[in] progress indicator + //! @return true if Read operation has ended correctly + Standard_EXPORT virtual bool Read(const TCollection_AsciiString& thePath, + TopoDS_Shape& theShape, + const Message_ProgressRange& theProgress = Message_ProgressRange()) Standard_OVERRIDE; + + //! Writes a CAD file, according internal configuration + //! @param[in] thePath path to the export CAD file + //! @param[out] theShape shape to export + //! @param theProgress[in] progress indicator + //! @return true if Write operation has ended correctly + Standard_EXPORT virtual bool Write(const TCollection_AsciiString& thePath, + const TopoDS_Shape& theShape, + const Message_ProgressRange& theProgress = Message_ProgressRange()) Standard_OVERRIDE; + +public: + + //! Gets CAD format name of associated provider + //! @return provider CAD format + Standard_EXPORT virtual TCollection_AsciiString GetFormat() const Standard_OVERRIDE; + + //! Gets provider's vendor name of associated provider + //! @return provider's vendor name + Standard_EXPORT virtual TCollection_AsciiString GetVendor() const Standard_OVERRIDE; + +}; + +#endif // _RWGltf_Provider_HeaderFile diff --git a/src/RWMesh/FILES b/src/RWMesh/FILES index b2b4299722..63bb91ee07 100644 --- a/src/RWMesh/FILES +++ b/src/RWMesh/FILES @@ -1,10 +1,10 @@ RWMesh.cxx RWMesh.hxx +RWMesh_CafReader.cxx +RWMesh_CafReader.hxx RWMesh_CoordinateSystem.hxx RWMesh_CoordinateSystemConverter.cxx RWMesh_CoordinateSystemConverter.hxx -RWMesh_CafReader.cxx -RWMesh_CafReader.hxx RWMesh_FaceIterator.cxx RWMesh_FaceIterator.hxx RWMesh_MaterialMap.cxx diff --git a/src/RWObj/FILES b/src/RWObj/FILES index 2c3177566a..9d6ca70c83 100644 --- a/src/RWObj/FILES +++ b/src/RWObj/FILES @@ -4,6 +4,8 @@ RWObj_CafReader.cxx RWObj_CafReader.hxx RWObj_CafWriter.cxx RWObj_CafWriter.hxx +RWObj_ConfigurationNode.cxx +RWObj_ConfigurationNode.hxx RWObj_Material.hxx RWObj_MtlReader.cxx RWObj_MtlReader.hxx @@ -11,6 +13,8 @@ RWObj_ObjMaterialMap.cxx RWObj_ObjMaterialMap.hxx RWObj_ObjWriterContext.cxx RWObj_ObjWriterContext.hxx +RWObj_Provider.cxx +RWObj_Provider.hxx RWObj_Reader.cxx RWObj_Reader.hxx RWObj_SubMesh.hxx diff --git a/src/RWObj/RWObj_ConfigurationNode.cxx b/src/RWObj/RWObj_ConfigurationNode.cxx new file mode 100644 index 0000000000..5295802b3b --- /dev/null +++ b/src/RWObj/RWObj_ConfigurationNode.cxx @@ -0,0 +1,234 @@ +// Copyright (c) 2022 OPEN CASCADE SAS +// +// This file is part of Open CASCADE Technology software library. +// +// This library is free software; you can redistribute it and/or modify it under +// the terms of the GNU Lesser General Public License version 2.1 as published +// by the Free Software Foundation, with special exception defined in the file +// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT +// distribution for complete text of the license and disclaimer of any warranty. +// +// Alternatively, this file may be used under the terms of Open CASCADE +// commercial license or contractual agreement. + +#include + +#include +#include + +IMPLEMENT_STANDARD_RTTIEXT(RWObj_ConfigurationNode, DE_ConfigurationNode) + +static const TCollection_AsciiString THE_CONFIGURATION_SCOPE = "provider"; + +//======================================================================= +// function : RWObj_ConfigurationNode +// purpose : +//======================================================================= +RWObj_ConfigurationNode::RWObj_ConfigurationNode() : + DE_ConfigurationNode() +{ + UpdateLoad(); +} + +//======================================================================= +// function : RWObj_ConfigurationNode +// purpose : +//======================================================================= +RWObj_ConfigurationNode::RWObj_ConfigurationNode(const Handle(RWObj_ConfigurationNode)& theNode) + :DE_ConfigurationNode(theNode) +{ + InternalParameters = theNode->InternalParameters; + UpdateLoad(); +} + +//======================================================================= +// function : Load +// purpose : +//======================================================================= +bool RWObj_ConfigurationNode::Load(const Handle(DE_ConfigurationContext)& theResource) +{ + TCollection_AsciiString aScope = THE_CONFIGURATION_SCOPE + "." + GetFormat() + "." + GetVendor(); + InternalParameters.FileLengthUnit = + theResource->RealVal("file.length.unit", InternalParameters.FileLengthUnit, aScope); + InternalParameters.SystemCS = (RWMesh_CoordinateSystem) + (theResource->IntegerVal("system.cs", (int)InternalParameters.SystemCS, aScope) % 2); + InternalParameters.FileCS = (RWMesh_CoordinateSystem) + (theResource->IntegerVal("file.cs", (int)InternalParameters.SystemCS, aScope) % 2); + + InternalParameters.ReadSinglePrecision = + theResource->BooleanVal("read.single.precision", InternalParameters.ReadSinglePrecision, aScope); + InternalParameters.ReadCreateShapes = + theResource->BooleanVal("read.create.shapes", InternalParameters.ReadCreateShapes, aScope); + InternalParameters.ReadRootPrefix = + theResource->StringVal("read.root.prefix", InternalParameters.ReadRootPrefix, aScope); + InternalParameters.ReadFillDoc = + theResource->BooleanVal("read.fill.doc", InternalParameters.ReadFillDoc, aScope); + InternalParameters.ReadFillIncomplete = + theResource->BooleanVal("read.fill.incomplete", InternalParameters.ReadFillIncomplete, aScope); + InternalParameters.ReadMemoryLimitMiB = + theResource->IntegerVal("read.memory.limit.mib", InternalParameters.ReadMemoryLimitMiB, aScope); + + InternalParameters.WriteComment = + theResource->StringVal("write.comment", InternalParameters.WriteComment, aScope); + InternalParameters.WriteAuthor = + theResource->StringVal("write.author", InternalParameters.WriteAuthor, aScope); + return true; +} + +//======================================================================= +// function : Save +// purpose : +//======================================================================= +TCollection_AsciiString RWObj_ConfigurationNode::Save() const +{ + TCollection_AsciiString aResult; + aResult += "!*****************************************************************************\n"; + aResult = aResult + "!Configuration Node " + " Vendor: " + GetVendor() + " Format: " + GetFormat() + "\n"; + TCollection_AsciiString aScope = THE_CONFIGURATION_SCOPE + "." + GetFormat() + "." + GetVendor() + "."; + + aResult += "!\n"; + aResult += "!Common parameters:\n"; + aResult += "!\n"; + + aResult += "!\n"; + aResult += "!File length units to convert from while reading the file, defined as scale factor for m (meters)\n"; + aResult += "!Default value: 1.0(M)\n"; + aResult += aScope + "file.length.unit :\t " + InternalParameters.FileLengthUnit + "\n"; + aResult += "!\n"; + + aResult += "!\n"; + aResult += "!System origin coordinate system to perform conversion into during read\n"; + aResult += "!Default value: 0(Zup). Available values: 0(Zup), 1(Yup)\n"; + aResult += aScope + "system.cs :\t " + InternalParameters.SystemCS + "\n"; + aResult += "!\n"; + + aResult += "!\n"; + aResult += "!File origin coordinate system to perform conversion during read\n"; + aResult += "!Default value: 1(Yup). Available values: 0(Zup), 1(Yup)\n"; + aResult += aScope + "file.cs :\t " + InternalParameters.FileCS + "\n"; + aResult += "!\n"; + + aResult += "!\n"; + aResult += "!Read parameters:\n"; + aResult += "!\n"; + + aResult += "!\n"; + aResult += "!Flag for reading vertex data with single or double floating point precision\n"; + aResult += "!Default value: 0(false). Available values: 0(false), 1(true)\n"; + aResult += aScope + "read.single.precision :\t " + InternalParameters.ReadSinglePrecision + "\n"; + aResult += "!\n"; + + aResult += "!\n"; + aResult += "!Flag for create a single triangulation\n"; + aResult += "!Default value: 0(false). Available values: 0(false), 1(true)\n"; + aResult += aScope + "read.create.shapes :\t " + InternalParameters.ReadCreateShapes + "\n"; + aResult += "!\n"; + + aResult += "!\n"; + aResult += "!Root folder for generating root labels names\n"; + aResult += "!Default value: ""(empty). Available values: \n"; + aResult += aScope + "read.root.prefix :\t " + InternalParameters.ReadRootPrefix + "\n"; + aResult += "!\n"; + + aResult += "!\n"; + aResult += "!Flag for fill document from shape sequence\n"; + aResult += "!Default value: 1(true). Available values: 0(false), 1(true)\n"; + aResult += aScope + "read.fill.doc :\t " + InternalParameters.ReadFillDoc + "\n"; + aResult += "!\n"; + + aResult += "!\n"; + aResult += "!Flag for fill the document with partially retrieved data even if reader has fa-iled with er-ror\n"; + aResult += "!Default value: 1(true). Available values: 0(false), 1(true)\n"; + aResult += aScope + "read.fill.incomplete :\t " + InternalParameters.ReadFillIncomplete + "\n"; + aResult += "!\n"; + + aResult += "!\n"; + aResult += "!Memory usage limit(MiB)\n"; + aResult += "!Default value: -1(no limit). Available values: -1(no limit), any positive value\n"; + aResult += aScope + "read.memory.limit.mib :\t " + InternalParameters.ReadMemoryLimitMiB + "\n"; + aResult += "!\n"; + + aResult += "!\n"; + aResult += "!Write parameters:\n"; + aResult += "!\n"; + + aResult += "!\n"; + aResult += "!Export special comment\n"; + aResult += "!Default value: ""(empty). Available values: \n"; + aResult += aScope + "write.comment :\t " + InternalParameters.WriteComment + "\n"; + aResult += "!\n"; + + aResult += "!\n"; + aResult += "!Author of exported file name\n"; + aResult += "!Default value: ""(empty). Available values: \n"; + aResult += aScope + "write.author :\t " + InternalParameters.WriteAuthor + "\n"; + aResult += "!\n"; + + aResult += "!*****************************************************************************\n"; + return aResult; +} + +//======================================================================= +// function : Copy +// purpose : +//======================================================================= +Handle(DE_ConfigurationNode) RWObj_ConfigurationNode::Copy() const +{ + return new RWObj_ConfigurationNode(*this); +} + +//======================================================================= +// function : BuildProvider +// purpose : +//======================================================================= +Handle(DE_Provider) RWObj_ConfigurationNode::BuildProvider() +{ + return new RWObj_Provider(this); +} + +//======================================================================= +// function : IsImportSupported +// purpose : +//======================================================================= +bool RWObj_ConfigurationNode::IsImportSupported() const +{ + return true; +} + +//======================================================================= +// function : IsExportSupported +// purpose : +//======================================================================= +bool RWObj_ConfigurationNode::IsExportSupported() const +{ + return true; +} + +//======================================================================= +// function : GetFormat +// purpose : +//======================================================================= +TCollection_AsciiString RWObj_ConfigurationNode::GetFormat() const +{ + return TCollection_AsciiString("OBJ"); +} + +//======================================================================= +// function : GetVendor +// purpose : +//======================================================================= +TCollection_AsciiString RWObj_ConfigurationNode::GetVendor() const +{ + return TCollection_AsciiString("OCC"); +} + +//======================================================================= +// function : GetExtensions +// purpose : +//======================================================================= +TColStd_ListOfAsciiString RWObj_ConfigurationNode::GetExtensions() const +{ + TColStd_ListOfAsciiString anExt; + anExt.Append("obj"); + return anExt; +} diff --git a/src/RWObj/RWObj_ConfigurationNode.hxx b/src/RWObj/RWObj_ConfigurationNode.hxx new file mode 100644 index 0000000000..88e9158ab3 --- /dev/null +++ b/src/RWObj/RWObj_ConfigurationNode.hxx @@ -0,0 +1,101 @@ +// Copyright (c) 2022 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 _RWObj_ConfigurationNode_HeaderFile +#define _RWObj_ConfigurationNode_HeaderFile + +#include +#include + +//! The purpose of this class is to configure the transfer process for OBJ format +//! Stores the necessary settings for RWObj_Provider. +//! Configures and creates special provider to transfer OBJ files. +//! +//! Nodes grouped by Vendor name and Format type. +//! The Vendor name is "OCC" +//! The Format type is "OBJ" +//! The supported CAD extension is ".obj" +//! The import process is supported. +//! The export process is supported. +class RWObj_ConfigurationNode : public DE_ConfigurationNode +{ + DEFINE_STANDARD_RTTIEXT(RWObj_ConfigurationNode, DE_ConfigurationNode) +public: + + //! Initializes all field by default + Standard_EXPORT RWObj_ConfigurationNode(); + + //! Copies values of all fields + //! @param[in] theNode object to copy + Standard_EXPORT RWObj_ConfigurationNode(const Handle(RWObj_ConfigurationNode)& theNode); + + //! Updates values according the resource + //! @param[in] theResource input resource to use + //! @return true if theResource loading has ended correctly + Standard_EXPORT virtual bool Load(const Handle(DE_ConfigurationContext)& theResource) Standard_OVERRIDE; + + //! Writes configuration to the string + //! @return result resource string + Standard_EXPORT virtual TCollection_AsciiString Save() const Standard_OVERRIDE; + + //! Copies values of all fields + //! @return new object with the same field values + Standard_EXPORT virtual Handle(DE_ConfigurationNode) Copy() const Standard_OVERRIDE; + + //! Creates new provider for the own format + //! @return new created provider + Standard_EXPORT virtual Handle(DE_Provider) BuildProvider() Standard_OVERRIDE; + +public: + + //! Checks the import supporting + //! @return true if import is supported + Standard_EXPORT virtual bool IsImportSupported() const Standard_OVERRIDE; + + //! Checks the export supporting + //! @return true if export is supported + Standard_EXPORT virtual bool IsExportSupported() const Standard_OVERRIDE; + + //! Gets CAD format name of associated provider + //! @return provider CAD format + Standard_EXPORT virtual TCollection_AsciiString GetFormat() const Standard_OVERRIDE; + + //! Gets provider's vendor name of associated provider + //! @return provider's vendor name + Standard_EXPORT virtual TCollection_AsciiString GetVendor() const Standard_OVERRIDE; + + //! Gets list of supported file extensions + //! @return list of extensions + Standard_EXPORT virtual TColStd_ListOfAsciiString GetExtensions() const Standard_OVERRIDE; + +public: + struct RWObj_InternalSection + { + // Common + double FileLengthUnit = 1.; //!< File length units to convert from while reading the file, defined as scale factor for m (meters) + RWMesh_CoordinateSystem SystemCS = RWMesh_CoordinateSystem_Zup; //!< System origin coordinate system to perform conversion into during read + RWMesh_CoordinateSystem FileCS = RWMesh_CoordinateSystem_Yup; //!< File origin coordinate system to perform conversion during read + // Reading + bool ReadSinglePrecision = false; //!< Flag for reading vertex data with single or double floating point precision + bool ReadCreateShapes = false; //!< Flag for create a single triangulation + TCollection_AsciiString ReadRootPrefix; //!< Root folder for generating root labels names + bool ReadFillDoc = true; //!< Flag for fill document from shape sequence + bool ReadFillIncomplete = true; //!< Flag for fill the document with partially retrieved data even if reader has failed with error + int ReadMemoryLimitMiB = -1; //!< Memory usage limit + // Writing + TCollection_AsciiString WriteComment; //!< Export special comment + TCollection_AsciiString WriteAuthor; //!< Author of exported file name + } InternalParameters; +}; + +#endif // _RWObj_ConfigurationNode_HeaderFile diff --git a/src/RWObj/RWObj_Provider.cxx b/src/RWObj/RWObj_Provider.cxx new file mode 100644 index 0000000000..90435cbd21 --- /dev/null +++ b/src/RWObj/RWObj_Provider.cxx @@ -0,0 +1,246 @@ +// Copyright (c) 2022 OPEN CASCADE SAS +// +// This file is part of Open CASCADE Technology software library. +// +// This library is free software; you can redistribute it and/or modify it under +// the terms of the GNU Lesser General Public License version 2.1 as published +// by the Free Software Foundation, with special exception defined in the file +// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT +// distribution for complete text of the license and disclaimer of any warranty. +// +// Alternatively, this file may be used under the terms of Open CASCADE +// commercial license or contractual agreement. + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +IMPLEMENT_STANDARD_RTTIEXT(RWObj_Provider, DE_Provider) + +//======================================================================= +// function : RWObj_Provider +// purpose : +//======================================================================= +RWObj_Provider::RWObj_Provider() +{} + +//======================================================================= +// function : RWObj_Provider +// purpose : +//======================================================================= +RWObj_Provider::RWObj_Provider(const Handle(DE_ConfigurationNode)& theNode) + :DE_Provider(theNode) +{} + +//======================================================================= +// function : Read +// purpose : +//======================================================================= +bool RWObj_Provider::Read(const TCollection_AsciiString& thePath, + const Handle(TDocStd_Document)& theDocument, + Handle(XSControl_WorkSession)& theWS, + const Message_ProgressRange& theProgress) +{ + (void)theWS; + return Read(thePath, theDocument, theProgress); +} + +//======================================================================= +// function : Write +// purpose : +//======================================================================= +bool RWObj_Provider::Write(const TCollection_AsciiString& thePath, + const Handle(TDocStd_Document)& theDocument, + Handle(XSControl_WorkSession)& theWS, + const Message_ProgressRange& theProgress) +{ + (void)theWS; + return Write(thePath, theDocument, theProgress); +} + +//======================================================================= +// function : Read +// purpose : +//======================================================================= +bool RWObj_Provider::Read(const TCollection_AsciiString& thePath, + const Handle(TDocStd_Document)& theDocument, + const Message_ProgressRange& theProgress) +{ + if (theDocument.IsNull()) + { + Message::SendFail() << "Error in the RWObj_Provider during reading the file " << + thePath << "\t: theDocument shouldn't be null"; + return false; + } + if (GetNode().IsNull() || !GetNode()->IsKind(STANDARD_TYPE(RWObj_ConfigurationNode))) + { + Message::SendFail() << "Error in the RWObj_ConfigurationNode during reading the file " << + thePath << "\t: Incorrect or empty Configuration Node"; + return false; + } + Handle(RWObj_ConfigurationNode) aNode = Handle(RWObj_ConfigurationNode)::DownCast(GetNode()); + RWObj_CafReader aReader; + aReader.SetSinglePrecision(aNode->InternalParameters.ReadSinglePrecision); + aReader.SetSystemLengthUnit(aNode->GlobalParameters.LengthUnit / 1000); + aReader.SetSystemCoordinateSystem(aNode->InternalParameters.SystemCS); + aReader.SetFileLengthUnit(aNode->InternalParameters.FileLengthUnit); + aReader.SetFileCoordinateSystem(aNode->InternalParameters.FileCS); + aReader.SetDocument(theDocument); + aReader.SetRootPrefix(aNode->InternalParameters.ReadRootPrefix); + aReader.SetMemoryLimitMiB(aNode->InternalParameters.ReadMemoryLimitMiB); + if (!aReader.Perform(thePath, theProgress)) + { + Message::SendFail() << "Error in the RWObj_ConfigurationNode during reading the file " << thePath; + return false; + } + XCAFDoc_DocumentTool::SetLengthUnit(theDocument, aNode->GlobalParameters.LengthUnit, UnitsMethods_LengthUnit_Millimeter); + return true; +} + +//======================================================================= +// function : Write +// purpose : +//======================================================================= +bool RWObj_Provider::Write(const TCollection_AsciiString& thePath, + const Handle(TDocStd_Document)& theDocument, + const Message_ProgressRange& theProgress) +{ + if (GetNode().IsNull() || !GetNode()->IsKind(STANDARD_TYPE(RWObj_ConfigurationNode))) + { + Message::SendFail() << "Error in the RWObj_ConfigurationNode during writing the file " << + thePath << "\t: Incorrect or empty Configuration Node"; + return false; + } + Handle(RWObj_ConfigurationNode) aNode = Handle(RWObj_ConfigurationNode)::DownCast(GetNode()); + + TColStd_IndexedDataMapOfStringString aFileInfo; + if (!aNode->InternalParameters.WriteAuthor.IsEmpty()) + { + aFileInfo.Add("Author", aNode->InternalParameters.WriteAuthor); + } + if (!aNode->InternalParameters.WriteComment.IsEmpty()) + { + aFileInfo.Add("Comments", aNode->InternalParameters.WriteComment); + } + + RWMesh_CoordinateSystemConverter aConverter; + aConverter.SetInputLengthUnit(aNode->GlobalParameters.LengthUnit / 1000); + aConverter.SetInputCoordinateSystem(aNode->InternalParameters.SystemCS); + aConverter.SetOutputLengthUnit(aNode->InternalParameters.FileLengthUnit); + aConverter.SetOutputCoordinateSystem(aNode->InternalParameters.FileCS); + + RWObj_CafWriter aWriter(thePath); + aWriter.SetCoordinateSystemConverter(aConverter); + if (!aWriter.Perform(theDocument, aFileInfo, theProgress)) + { + Message::SendFail() << "Error in the RWObj_ConfigurationNode during writing the file " << thePath; + return false; + } + return true; +} + +//======================================================================= +// function : Read +// purpose : +//======================================================================= +bool RWObj_Provider::Read(const TCollection_AsciiString& thePath, + TopoDS_Shape& theShape, + Handle(XSControl_WorkSession)& theWS, + const Message_ProgressRange& theProgress) +{ + (void)theWS; + return Read(thePath, theShape, theProgress); +} + +//======================================================================= +// function : Write +// purpose : +//======================================================================= +bool RWObj_Provider::Write(const TCollection_AsciiString& thePath, + const TopoDS_Shape& theShape, + Handle(XSControl_WorkSession)& theWS, + const Message_ProgressRange& theProgress) +{ + (void)theWS; + return Write(thePath, theShape, theProgress); +} + +//======================================================================= +// function : Read +// purpose : +//======================================================================= +bool RWObj_Provider::Read(const TCollection_AsciiString& thePath, + TopoDS_Shape& theShape, + const Message_ProgressRange& theProgress) +{ + if (GetNode().IsNull() || !GetNode()->IsKind(STANDARD_TYPE(RWObj_ConfigurationNode))) + { + Message::SendFail() << "Error in the RWObj_ConfigurationNode during writing the file " << + thePath << "\t: Incorrect or empty Configuration Node"; + return false; + } + Handle(RWObj_ConfigurationNode) aNode = Handle(RWObj_ConfigurationNode)::DownCast(GetNode()); + RWMesh_CoordinateSystemConverter aConverter; + aConverter.SetOutputLengthUnit(aNode->GlobalParameters.LengthUnit / 1000); + aConverter.SetOutputCoordinateSystem(aNode->InternalParameters.SystemCS); + aConverter.SetInputLengthUnit(aNode->InternalParameters.FileLengthUnit); + aConverter.SetInputCoordinateSystem(aNode->InternalParameters.FileCS); + + RWObj_TriangulationReader aSimpleReader; + aSimpleReader.SetTransformation(aConverter); + aSimpleReader.SetSinglePrecision(aNode->InternalParameters.ReadSinglePrecision); + aSimpleReader.SetCreateShapes(aNode->InternalParameters.ReadCreateShapes); + aSimpleReader.SetSinglePrecision(aNode->InternalParameters.ReadSinglePrecision); + aSimpleReader.SetMemoryLimit(aNode->InternalParameters.ReadMemoryLimitMiB); + if (!aSimpleReader.Read(thePath, theProgress)) + { + Message::SendFail() << "Error in the RWObj_ConfigurationNode during reading the file " << thePath; + return false; + } + Handle(Poly_Triangulation) aTriangulation = aSimpleReader.GetTriangulation(); + TopoDS_Face aFace; + BRep_Builder aBuiler; + aBuiler.MakeFace(aFace); + aBuiler.UpdateFace(aFace, aTriangulation); + theShape = aFace; + return true; +} + +//======================================================================= +// function : Write +// purpose : +//======================================================================= +bool RWObj_Provider::Write(const TCollection_AsciiString& thePath, + const TopoDS_Shape& theShape, + const Message_ProgressRange& theProgress) +{ + Handle(TDocStd_Document) aDoc = new TDocStd_Document("BinXCAF"); + Handle(XCAFDoc_ShapeTool) aShTool = XCAFDoc_DocumentTool::ShapeTool(aDoc->Main()); + aShTool->AddShape(theShape); + return Write(thePath, aDoc, theProgress); +} + +//======================================================================= +// function : GetFormat +// purpose : +//======================================================================= +TCollection_AsciiString RWObj_Provider::GetFormat() const +{ + return TCollection_AsciiString("OBJ"); +} + +//======================================================================= +// function : GetVendor +// purpose : +//======================================================================= +TCollection_AsciiString RWObj_Provider::GetVendor() const +{ + return TCollection_AsciiString("OCC"); +} diff --git a/src/RWObj/RWObj_Provider.hxx b/src/RWObj/RWObj_Provider.hxx new file mode 100644 index 0000000000..38ab12aa87 --- /dev/null +++ b/src/RWObj/RWObj_Provider.hxx @@ -0,0 +1,136 @@ +// Copyright (c) 2022 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 _RWObj_Provider_HeaderFile +#define _RWObj_Provider_HeaderFile + +#include + +//! The class to transfer OBJ files. +//! Reads and Writes any OBJ files into/from OCCT. +//! Each operation needs configuration node. +//! +//! Providers grouped by Vendor name and Format type. +//! The Vendor name is "OCC" +//! The Format type is "OBJ" +//! The import process is supported. +//! The export process is supported. +class RWObj_Provider : public DE_Provider +{ +public: + DEFINE_STANDARD_RTTIEXT(RWObj_Provider, DE_Provider) + +public: + + //! Default constructor + //! Configure translation process with global configuration + Standard_EXPORT RWObj_Provider(); + + //! Configure translation process + //! @param[in] theNode object to copy + Standard_EXPORT RWObj_Provider(const Handle(DE_ConfigurationNode)& theNode); + +public: + + //! Reads a CAD file, according internal configuration + //! @param[in] thePath path to the import CAD file + //! @param[out] theDocument document to save result + //! @param[in] theWS current work session + //! @param theProgress[in] progress indicator + //! @return true if Read operation has ended correctly + Standard_EXPORT virtual bool Read(const TCollection_AsciiString& thePath, + const Handle(TDocStd_Document)& theDocument, + Handle(XSControl_WorkSession)& theWS, + const Message_ProgressRange& theProgress = Message_ProgressRange()) Standard_OVERRIDE; + + //! Writes a CAD file, according internal configuration + //! @param[in] thePath path to the export CAD file + //! @param[out] theDocument document to export + //! @param[in] theWS current work session + //! @param theProgress[in] progress indicator + //! @return true if Write operation has ended correctly + Standard_EXPORT virtual bool Write(const TCollection_AsciiString& thePath, + const Handle(TDocStd_Document)& theDocument, + Handle(XSControl_WorkSession)& theWS, + const Message_ProgressRange& theProgress = Message_ProgressRange()) Standard_OVERRIDE; + + //! Reads a CAD file, according internal configuration + //! @param[in] thePath path to the import CAD file + //! @param[out] theDocument document to save result + //! @param theProgress[in] progress indicator + //! @return true if Read operation has ended correctly + Standard_EXPORT virtual bool Read(const TCollection_AsciiString& thePath, + const Handle(TDocStd_Document)& theDocument, + const Message_ProgressRange& theProgress = Message_ProgressRange()) Standard_OVERRIDE; + + //! Writes a CAD file, according internal configuration + //! @param[in] thePath path to the export CAD file + //! @param[out] theDocument document to export + //! @param theProgress[in] progress indicator + //! @return true if Write operation has ended correctly + Standard_EXPORT virtual bool Write(const TCollection_AsciiString& thePath, + const Handle(TDocStd_Document)& theDocument, + const Message_ProgressRange& theProgress = Message_ProgressRange()) Standard_OVERRIDE; + + //! Reads a CAD file, according internal configuration + //! @param[in] thePath path to the import CAD file + //! @param[out] theShape shape to save result + //! @param[in] theWS current work session + //! @param theProgress[in] progress indicator + //! @return true if Read operation has ended correctly + Standard_EXPORT virtual bool Read(const TCollection_AsciiString& thePath, + TopoDS_Shape& theShape, + Handle(XSControl_WorkSession)& theWS, + const Message_ProgressRange& theProgress = Message_ProgressRange()) Standard_OVERRIDE; + + //! Writes a CAD file, according internal configuration + //! @param[in] thePath path to the export CAD file + //! @param[out] theShape shape to export + //! @param[in] theWS current work session + //! @param theProgress[in] progress indicator + //! @return true if Write operation has ended correctly + Standard_EXPORT virtual bool Write(const TCollection_AsciiString& thePath, + const TopoDS_Shape& theShape, + Handle(XSControl_WorkSession)& theWS, + const Message_ProgressRange& theProgress = Message_ProgressRange()) Standard_OVERRIDE; + + //! Reads a CAD file, according internal configuration + //! @param[in] thePath path to the import CAD file + //! @param[out] theShape shape to save result + //! @param theProgress[in] progress indicator + //! @return true if Read operation has ended correctly + Standard_EXPORT virtual bool Read(const TCollection_AsciiString& thePath, + TopoDS_Shape& theShape, + const Message_ProgressRange& theProgress = Message_ProgressRange()) Standard_OVERRIDE; + + //! Writes a CAD file, according internal configuration + //! @param[in] thePath path to the export CAD file + //! @param[out] theShape shape to export + //! @param theProgress[in] progress indicator + //! @return true if Write operation has ended correctly + Standard_EXPORT virtual bool Write(const TCollection_AsciiString& thePath, + const TopoDS_Shape& theShape, + const Message_ProgressRange& theProgress = Message_ProgressRange()) Standard_OVERRIDE; + +public: + + //! Gets CAD format name of associated provider + //! @return provider CAD format + Standard_EXPORT virtual TCollection_AsciiString GetFormat() const Standard_OVERRIDE; + + //! Gets provider's vendor name of associated provider + //! @return provider's vendor name + Standard_EXPORT virtual TCollection_AsciiString GetVendor() const Standard_OVERRIDE; +}; + +#endif // _RWObj_Provider_HeaderFile diff --git a/src/RWPly/FILES b/src/RWPly/FILES index 9715e07b14..032af79a92 100644 --- a/src/RWPly/FILES +++ b/src/RWPly/FILES @@ -1,4 +1,8 @@ RWPly_CafWriter.cxx RWPly_CafWriter.hxx +RWPly_ConfigurationNode.cxx +RWPly_ConfigurationNode.hxx RWPly_PlyWriterContext.cxx RWPly_PlyWriterContext.hxx +RWPly_Provider.cxx +RWPly_Provider.hxx diff --git a/src/RWPly/RWPly_ConfigurationNode.cxx b/src/RWPly/RWPly_ConfigurationNode.cxx new file mode 100644 index 0000000000..6e0c7719fc --- /dev/null +++ b/src/RWPly/RWPly_ConfigurationNode.cxx @@ -0,0 +1,272 @@ +// Copyright (c) 2022 OPEN CASCADE SAS +// +// This file is part of Open CASCADE Technology software library. +// +// This library is free software; you can redistribute it and/or modify it under +// the terms of the GNU Lesser General Public License version 2.1 as published +// by the Free Software Foundation, with special exception defined in the file +// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT +// distribution for complete text of the license and disclaimer of any warranty. +// +// Alternatively, this file may be used under the terms of Open CASCADE +// commercial license or contractual agreement. + +#include + +#include +#include +#include + +IMPLEMENT_STANDARD_RTTIEXT(RWPly_ConfigurationNode, DE_ConfigurationNode) + +static const TCollection_AsciiString THE_CONFIGURATION_SCOPE = "provider"; + +//======================================================================= +// function : RWPly_ConfigurationNode +// purpose : +//======================================================================= +RWPly_ConfigurationNode::RWPly_ConfigurationNode() : + DE_ConfigurationNode() +{ + UpdateLoad(); +} + +//======================================================================= +// function : RWPly_ConfigurationNode +// purpose : +//======================================================================= +RWPly_ConfigurationNode::RWPly_ConfigurationNode(const Handle(RWPly_ConfigurationNode)& theNode) + :DE_ConfigurationNode(theNode) +{ + InternalParameters = theNode->InternalParameters; + UpdateLoad(); +} + +//======================================================================= +// function : Load +// purpose : +//======================================================================= +bool RWPly_ConfigurationNode::Load(const Handle(DE_ConfigurationContext)& theResource) +{ + TCollection_AsciiString aScope = THE_CONFIGURATION_SCOPE + "." + GetFormat() + "." + GetVendor(); + InternalParameters.FileLengthUnit = + theResource->RealVal("file.length.unit", InternalParameters.FileLengthUnit, aScope); + InternalParameters.SystemCS = + (RWMesh_CoordinateSystem)(theResource->IntegerVal("system.cs", (int)InternalParameters.SystemCS, aScope) % 2); + InternalParameters.FileCS = + (RWMesh_CoordinateSystem)(theResource->IntegerVal("file.cs", (int)InternalParameters.SystemCS, aScope) % 2); + + InternalParameters.WritePntSet = + theResource->BooleanVal("write.pnt.set", InternalParameters.WritePntSet, aScope); + InternalParameters.WriteDistance = + theResource->RealVal("write.distance", InternalParameters.WriteDistance, aScope); + InternalParameters.WriteDensity = + theResource->RealVal("write.density", InternalParameters.WriteDensity, aScope); + InternalParameters.WriteTolerance = + theResource->RealVal("write.tolerance", InternalParameters.WriteTolerance, aScope); + InternalParameters.WriteNormals = + theResource->BooleanVal("write.normals", InternalParameters.WriteNormals, aScope); + InternalParameters.WriteColors = + theResource->BooleanVal("write.colors", InternalParameters.WriteColors, aScope); + InternalParameters.WriteTexCoords = + theResource->BooleanVal("write.tex.coords", InternalParameters.WriteTexCoords, aScope); + InternalParameters.WritePartId = + theResource->BooleanVal("write.part.id", InternalParameters.WritePartId, aScope); + InternalParameters.WriteFaceId = + theResource->BooleanVal("write.face.id", InternalParameters.WriteFaceId, aScope); + InternalParameters.WriteComment = + theResource->StringVal("write.comment", InternalParameters.WriteComment, aScope); + InternalParameters.WriteAuthor = + theResource->StringVal("write.author", InternalParameters.WriteAuthor, aScope); + return Standard_True; +} + +//======================================================================= +// function : Save +// purpose : +//======================================================================= +TCollection_AsciiString RWPly_ConfigurationNode::Save() const +{ + TCollection_AsciiString aResult; + aResult += "!*****************************************************************************\n"; + aResult = aResult + "!Configuration Node " + " Vendor: " + GetVendor() + " Format: " + GetFormat() + "\n"; + TCollection_AsciiString aScope = THE_CONFIGURATION_SCOPE + "." + GetFormat() + "." + GetVendor() + "."; + + aResult += "!\n"; + aResult += "!Common parameters:\n"; + aResult += "!\n"; + + aResult += "!\n"; + aResult += "!File length units to convert from while reading the file, defined as scale factor for m (meters)\n"; + aResult += "!Default value: 1.0(MM)\n"; + aResult += aScope + "file.length.unit :\t " + InternalParameters.FileLengthUnit + "\n"; + aResult += "!\n"; + + aResult += "!\n"; + aResult += "!System origin coordinate system to perform conversion into during read\n"; + aResult += "!Default value: 0(Zup). Available values: 0(Zup), 1(Yup)\n"; + aResult += aScope + "system.cs :\t " + InternalParameters.SystemCS + "\n"; + aResult += "!\n"; + + aResult += "!\n"; + aResult += "!File origin coordinate system to perform conversion during read\n"; + aResult += "!Default value: 1(Yup). Available values: 0(Zup), 1(Yup)\n"; + aResult += aScope + "file.cs :\t " + InternalParameters.FileCS + "\n"; + aResult += "!\n"; + + aResult += "!\n"; + aResult += "!Write parameters:\n"; + aResult += "!\n"; + + aResult += "!\n"; + aResult += "!Flag for write point cloud instead without triangulation indices\n"; + aResult += "!Default value: 0(false). Available values: 0(false), 1(true)\n"; + aResult += aScope + "write.pnt.set :\t " + InternalParameters.WritePntSet + "\n"; + aResult += "!\n"; + + aResult += "!\n"; + aResult += "!Distance from shape into the range [0, Value]\n"; + aResult += "!Default value: 0. Available values: [0, Value]\n"; + aResult += aScope + "write.distance :\t " + InternalParameters.WriteDistance + "\n"; + aResult += "!\n"; + + aResult += "!\n"; + aResult += "!Density of points to generate randomly on surface\n"; + aResult += "!Default value: 2.e+100. Available values: [0, inf]\n"; + aResult += aScope + "write.density :\t " + InternalParameters.WriteDensity + "\n"; + aResult += "!\n"; + + aResult += "!\n"; + aResult += "!Internal tolerance\n"; + aResult += "!Default value: 1.e-7. Available values: [0, inf]\n"; + aResult += aScope + "write.tolerance :\t " + InternalParameters.WriteTolerance + "\n"; + aResult += "!\n"; + + aResult += "!\n"; + aResult += "!Flag for write normals\n"; + aResult += "!Default value: 1(true). Available values: 0(false), 1(true)\n"; + aResult += aScope + "write.normals :\t " + InternalParameters.WriteNormals + "\n"; + aResult += "!\n"; + + aResult += "!\n"; + aResult += "!Flag for write colors\n"; + aResult += "!Default value: 1(true). Available values: 0(false), 1(true)\n"; + aResult += aScope + "write.colors :\t " + InternalParameters.WriteColors + "\n"; + aResult += "!\n"; + + aResult += "!\n"; + aResult += "!Flag for write UV / texture coordinates\n"; + aResult += "!Default value: 0(false). Available values: 0(false), 1(true)\n"; + aResult += aScope + "write.tex.coords :\t " + InternalParameters.WriteTexCoords + "\n"; + aResult += "!\n"; + + aResult += "!\n"; + aResult += "!Flag for write part Id as element attribute\n"; + aResult += "!Default value: 1(true). Available values: 0(false), 1(true)\n"; + aResult += aScope + "write.part.id :\t " + InternalParameters.WritePartId + "\n"; + aResult += "!\n"; + + aResult += "!\n"; + aResult += "!Flag for write face Id as element attribute. Cannot be combined with HasPartId\n"; + aResult += "!Default value: 0(false). Available values: 0(false), 1(true)\n"; + aResult += aScope + "write.face.id :\t " + InternalParameters.WriteFaceId + "\n"; + aResult += "!\n"; + + aResult += "!\n"; + aResult += "!Export special comment\n"; + aResult += "!Default value: ""(empty). Available values: \n"; + aResult += aScope + "write.comment :\t " + InternalParameters.WriteComment + "\n"; + aResult += "!\n"; + + aResult += "!\n"; + aResult += "!Author of exported file name\n"; + aResult += "!Default value: ""(empty). Available values: \n"; + aResult += aScope + "write.author :\t " + InternalParameters.WriteAuthor + "\n"; + aResult += "!\n"; + + aResult += "!*****************************************************************************\n"; + return aResult; +} + +//======================================================================= +// function : Copy +// purpose : +//======================================================================= +Handle(DE_ConfigurationNode) RWPly_ConfigurationNode::Copy() const +{ + return new RWPly_ConfigurationNode(*this); +} + +//======================================================================= +// function : BuildProvider +// purpose : +//======================================================================= +Handle(DE_Provider) RWPly_ConfigurationNode::BuildProvider() +{ + return new RWPly_Provider(this); +} + +//======================================================================= +// function : IsImportSupported +// purpose : +//======================================================================= +bool RWPly_ConfigurationNode::IsImportSupported() const +{ + return Standard_False; +} + +//======================================================================= +// function : IsExportSupported +// purpose : +//======================================================================= +bool RWPly_ConfigurationNode::IsExportSupported() const +{ + return Standard_True; +} + +//======================================================================= +// function : GetFormat +// purpose : +//======================================================================= +TCollection_AsciiString RWPly_ConfigurationNode::GetFormat() const +{ + return TCollection_AsciiString("PLY"); +} + +//======================================================================= +// function : GetVendor +// purpose : +//======================================================================= +TCollection_AsciiString RWPly_ConfigurationNode::GetVendor() const +{ + return TCollection_AsciiString("OCC"); +} + +//======================================================================= +// function : GetExtensions +// purpose : +//======================================================================= +TColStd_ListOfAsciiString RWPly_ConfigurationNode::GetExtensions() const +{ + TColStd_ListOfAsciiString anExt; + anExt.Append("ply"); + return anExt; +} + +//======================================================================= +// function : CheckContent +// purpose : +//======================================================================= +bool RWPly_ConfigurationNode::CheckContent(const Handle(NCollection_Buffer)& theBuffer) const +{ + if (theBuffer.IsNull() || theBuffer->Size() < 4) + { + return false; + } + const char* aBytes = (const char*)theBuffer->Data(); + if (!::strncmp(aBytes, "ply", 3) && ::isspace(aBytes[3])) + { + return true; + } + return false; +} diff --git a/src/RWPly/RWPly_ConfigurationNode.hxx b/src/RWPly/RWPly_ConfigurationNode.hxx new file mode 100644 index 0000000000..0b4e122b71 --- /dev/null +++ b/src/RWPly/RWPly_ConfigurationNode.hxx @@ -0,0 +1,111 @@ +// Copyright (c) 2022 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 _RWPly_ConfigurationNode_HeaderFile +#define _RWPly_ConfigurationNode_HeaderFile + +#include +#include +#include + +class DE_ConfigurationContext; + +//! The purpose of this class is to configure the transfer process for PLY format +//! Stores the necessary settings for RWPly_Provider. +//! Configures and creates special provider to transfer PLY files. +//! +//! Nodes grouped by Vendor name and Format type. +//! The Vendor name is "OCC" +//! The Format type is "PLY" +//! The supported CAD extension is ".ply" +//! The import process isn't supported. +//! The export process is supported. +class RWPly_ConfigurationNode : public DE_ConfigurationNode +{ + DEFINE_STANDARD_RTTIEXT(RWPly_ConfigurationNode, DE_ConfigurationNode) +public: + + //! Initializes all field by default + Standard_EXPORT RWPly_ConfigurationNode(); + + //! Copies values of all fields + //! @param[in] theNode object to copy + Standard_EXPORT RWPly_ConfigurationNode(const Handle(RWPly_ConfigurationNode)& theNode); + + //! Updates values according the resource + //! @param[in] theResource input resource to use + //! @return true if theResource loading has ended correctly + Standard_EXPORT virtual bool Load(const Handle(DE_ConfigurationContext)& theResource) Standard_OVERRIDE; + + //! Writes configuration to the string + //! @return result resource string + Standard_EXPORT virtual TCollection_AsciiString Save() const Standard_OVERRIDE; + + //! Copies values of all fields + //! @return new object with the same field values + Standard_EXPORT virtual Handle(DE_ConfigurationNode) Copy() const Standard_OVERRIDE; + + //! Creates new provider for the own format + //! @return new created provider + Standard_EXPORT virtual Handle(DE_Provider) BuildProvider() Standard_OVERRIDE; + +public: + + //! Checks the import supporting + //! @return true if import is supported + Standard_EXPORT virtual bool IsImportSupported() const Standard_OVERRIDE; + + //! Checks the export supporting + //! @return true if export is supported + Standard_EXPORT virtual bool IsExportSupported() const Standard_OVERRIDE; + + //! Gets CAD format name of associated provider + //! @return provider CAD format + Standard_EXPORT virtual TCollection_AsciiString GetFormat() const Standard_OVERRIDE; + + //! Gets provider's vendor name of associated provider + //! @return provider's vendor name + Standard_EXPORT virtual TCollection_AsciiString GetVendor() const Standard_OVERRIDE; + + //! Gets list of supported file extensions + //! @return list of extensions + Standard_EXPORT virtual TColStd_ListOfAsciiString GetExtensions() const Standard_OVERRIDE; + + //! Checks the file content to verify a format + //! @param[in] theBuffer read stream buffer to check content + //! @return Standard_True if file is supported by a current provider + Standard_EXPORT virtual bool CheckContent(const Handle(NCollection_Buffer)& theBuffer) const Standard_OVERRIDE; + +public: + struct RWPly_InternalSection + { + // Common + double FileLengthUnit = 1.; //!< File length units to convert from while reading the file, defined as scale factor for m (meters) + RWMesh_CoordinateSystem SystemCS = RWMesh_CoordinateSystem_Zup; //!< System origin coordinate system to perform conversion into during read + RWMesh_CoordinateSystem FileCS = RWMesh_CoordinateSystem_Yup; //!< File origin coordinate system to perform conversion during read + // Writing + bool WritePntSet = false; //!< Flag for write point cloud instead without triangulation indices + double WriteDistance = 0.0; //!< Distance from shape into the range [0, Value] + double WriteDensity = Precision::Infinite(); //!< Density of points to generate randomly on surface + double WriteTolerance = Precision::Confusion(); //!< Internal tolerance + bool WriteNormals = true; //!< Flag for write normals + bool WriteColors = true; //!< Flag for write colors + bool WriteTexCoords = false; //!< Flag for write UV / texture coordinates + bool WritePartId = true; //!< Flag for write part Id as element attribute + bool WriteFaceId = false; //!< Flag for write face Id as element attribute. Cannot be combined with HasPartId + TCollection_AsciiString WriteComment; //!< Export special comment + TCollection_AsciiString WriteAuthor; //!< Author of exported file name + } InternalParameters; +}; + +#endif // _RWPly_ConfigurationNode_HeaderFile diff --git a/src/RWPly/RWPly_Provider.cxx b/src/RWPly/RWPly_Provider.cxx new file mode 100644 index 0000000000..c13f9571be --- /dev/null +++ b/src/RWPly/RWPly_Provider.cxx @@ -0,0 +1,245 @@ +// Copyright (c) 2022 OPEN CASCADE SAS +// +// This file is part of Open CASCADE Technology software library. +// +// This library is free software; you can redistribute it and/or modify it under +// the terms of the GNU Lesser General Public License version 2.1 as published +// by the Free Software Foundation, with special exception defined in the file +// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT +// distribution for complete text of the license and disclaimer of any warranty. +// +// Alternatively, this file may be used under the terms of Open CASCADE +// commercial license or contractual agreement. + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +IMPLEMENT_STANDARD_RTTIEXT(RWPly_Provider, DE_Provider) + +//======================================================================= +// function : RWPly_Provider +// purpose : +//======================================================================= +RWPly_Provider::RWPly_Provider() +{} + +//======================================================================= +// function : RWPly_Provider +// purpose : +//======================================================================= +RWPly_Provider::RWPly_Provider(const Handle(DE_ConfigurationNode)& theNode) + :DE_Provider(theNode) +{} + +//======================================================================= +// function : Write +// purpose : +//======================================================================= +bool RWPly_Provider::Write(const TCollection_AsciiString& thePath, + const Handle(TDocStd_Document)& theDocument, + Handle(XSControl_WorkSession)& theWS, + const Message_ProgressRange& theProgress) +{ + (void)theWS; + return Write(thePath, theDocument, theProgress); +} + +//======================================================================= +// function : Write +// purpose : +//======================================================================= +bool RWPly_Provider::Write(const TCollection_AsciiString& thePath, + const Handle(TDocStd_Document)& theDocument, + const Message_ProgressRange& theProgress) +{ + if (GetNode().IsNull() || !GetNode()->IsKind(STANDARD_TYPE(RWPly_ConfigurationNode))) + { + Message::SendFail() << "Error in the RWPly_Provider during writing the file " << + thePath << "\t: Incorrect or empty Configuration Node"; + return false; + } + Handle(RWPly_ConfigurationNode) aNode = Handle(RWPly_ConfigurationNode)::DownCast(GetNode()); + + TDF_LabelSequence aRootLabels; + Handle(XCAFDoc_ShapeTool) aShapeTool = XCAFDoc_DocumentTool::ShapeTool(theDocument->Main()); + aShapeTool->GetFreeShapes(aRootLabels); + if (aRootLabels.IsEmpty()) + { + return Standard_True; + } + + if (aNode->InternalParameters.WritePntSet) + { + class PointCloudPlyWriter : public BRepLib_PointCloudShape, public RWPly_PlyWriterContext + { + public: + PointCloudPlyWriter(Standard_Real theTol) + : BRepLib_PointCloudShape(TopoDS_Shape(), theTol) + {} + + void AddFaceColor(const TopoDS_Shape& theFace, const Graphic3d_Vec4ub& theColor) + { + myFaceColor.Bind(theFace, theColor); + } + + protected: + virtual void addPoint(const gp_Pnt& thePoint, + const gp_Vec& theNorm, + const gp_Pnt2d& theUV, + const TopoDS_Shape& theFace) + { + Graphic3d_Vec4ub aColor; + myFaceColor.Find(theFace, aColor); + RWPly_PlyWriterContext::WriteVertex(thePoint, + Graphic3d_Vec3((float)theNorm.X(), (float)theNorm.Y(), (float)theNorm.Z()), + Graphic3d_Vec2((float)theUV.X(), (float)theUV.Y()), + aColor); + } + + private: + NCollection_DataMap myFaceColor; + }; + + PointCloudPlyWriter aPlyCtx(aNode->InternalParameters.WriteTolerance); + aPlyCtx.SetNormals(aNode->InternalParameters.WriteNormals); + aPlyCtx.SetColors(aNode->InternalParameters.WriteColors); + aPlyCtx.SetTexCoords(aNode->InternalParameters.WriteTexCoords); + + TopoDS_Compound aComp; + BRep_Builder().MakeCompound(aComp); + for (XCAFPrs_DocumentExplorer aDocExplorer(theDocument, aRootLabels, XCAFPrs_DocumentExplorerFlags_OnlyLeafNodes); + aDocExplorer.More(); aDocExplorer.Next()) + { + const XCAFPrs_DocumentNode& aDocNode = aDocExplorer.Current(); + for (RWMesh_FaceIterator aFaceIter(aDocNode.RefLabel, aDocNode.Location, true, aDocNode.Style); aFaceIter.More(); aFaceIter.Next()) + { + BRep_Builder().Add(aComp, aFaceIter.Face()); + Graphic3d_Vec4ub aColorVec(255); + if (aFaceIter.HasFaceColor()) + { + Graphic3d_Vec4 aColorF = aFaceIter.FaceColor(); + aColorVec.SetValues((unsigned char)int(aColorF.r() * 255.0f), + (unsigned char)int(aColorF.g() * 255.0f), + (unsigned char)int(aColorF.b() * 255.0f), + (unsigned char)int(aColorF.a() * 255.0f)); + } + aPlyCtx.AddFaceColor(aFaceIter.Face(), aColorVec); + } + } + aPlyCtx.SetShape(aComp); + Standard_Integer aNbPoints = aNode->InternalParameters.WriteDensity > 0 + ? aPlyCtx.NbPointsByDensity(aNode->InternalParameters.WriteDensity) + : aPlyCtx.NbPointsByTriangulation(); + if (aNbPoints <= 0) + { + Message::SendFail() << "Error in the RWPly_Provider during writing the file " << + thePath << "\t: Incorrect number of points"; + return false; + } + + if (!aPlyCtx.Open(thePath) + || !aPlyCtx.WriteHeader(aNbPoints, 0, TColStd_IndexedDataMapOfStringString())) + { + Message::SendFail() << "Error in the RWPly_Provider during writing the file " << thePath; + return false; + } + + Standard_Boolean isDone = aNode->InternalParameters.WriteDensity > 0 + ? aPlyCtx.GeneratePointsByDensity(aNode->InternalParameters.WriteDensity) + : aPlyCtx.GeneratePointsByTriangulation(); + if (!isDone) + { + Message::SendFail() << "Error in the RWPly_Provider during writing the file " + << thePath << "\t: Error during generating point process"; + return false; + } + } + else + { + TColStd_IndexedDataMapOfStringString aFileInfo; + if (!aNode->InternalParameters.WriteAuthor.IsEmpty()) + { + aFileInfo.Add("Author", aNode->InternalParameters.WriteAuthor); + } + if (!aNode->InternalParameters.WriteComment.IsEmpty()) + { + aFileInfo.Add("Comments", aNode->InternalParameters.WriteComment); + } + RWMesh_CoordinateSystemConverter aConverter; + aConverter.SetInputLengthUnit(aNode->GlobalParameters.LengthUnit / 1000); + aConverter.SetInputCoordinateSystem(aNode->InternalParameters.SystemCS); + aConverter.SetOutputLengthUnit(aNode->InternalParameters.FileLengthUnit); + aConverter.SetOutputCoordinateSystem(aNode->InternalParameters.FileCS); + + RWPly_CafWriter aPlyCtx(thePath); + aPlyCtx.SetNormals(aNode->InternalParameters.WriteNormals); + aPlyCtx.SetColors(aNode->InternalParameters.WriteColors); + aPlyCtx.SetTexCoords(aNode->InternalParameters.WriteTexCoords); + aPlyCtx.SetPartId(aNode->InternalParameters.WritePartId); + aPlyCtx.SetFaceId(aNode->InternalParameters.WriteFaceId); + if (!aPlyCtx.Perform(theDocument, aFileInfo, theProgress)) + { + Message::SendFail() << "Error in the RWPly_Provider during writing the file " + << thePath << "\t: Cannot perform the document"; + return false; + } + } + return true; +} + +//======================================================================= +// function : Write +// purpose : +//======================================================================= +bool RWPly_Provider::Write(const TCollection_AsciiString& thePath, + const TopoDS_Shape& theShape, + Handle(XSControl_WorkSession)& theWS, + const Message_ProgressRange& theProgress) +{ + (void)theWS; + return Write(thePath, theShape, theProgress); +} + +//======================================================================= +// function : Write +// purpose : +//======================================================================= +bool RWPly_Provider::Write(const TCollection_AsciiString& thePath, + const TopoDS_Shape& theShape, + const Message_ProgressRange& theProgress) +{ + Handle(TDocStd_Document) aDoc = new TDocStd_Document("BinXCAF"); + Handle(XCAFDoc_ShapeTool) aShTool = XCAFDoc_DocumentTool::ShapeTool(aDoc->Main()); + aShTool->AddShape(theShape); + return Write(thePath, aDoc, theProgress); +} + +//======================================================================= +// function : GetFormat +// purpose : +//======================================================================= +TCollection_AsciiString RWPly_Provider::GetFormat() const +{ + return TCollection_AsciiString("PLY"); +} + +//======================================================================= +// function : GetVendor +// purpose : +//======================================================================= +TCollection_AsciiString RWPly_Provider::GetVendor() const +{ + return TCollection_AsciiString("OCC"); +} diff --git a/src/RWPly/RWPly_Provider.hxx b/src/RWPly/RWPly_Provider.hxx new file mode 100644 index 0000000000..30d686b91f --- /dev/null +++ b/src/RWPly/RWPly_Provider.hxx @@ -0,0 +1,96 @@ +// Copyright (c) 2022 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 _RWPly_Provider_HeaderFile +#define _RWPly_Provider_HeaderFile + +#include + +//! The class to transfer PLY files. +//! Writes any PLY files from OCCT. +//! Each operation needs configuration node. +//! +//! Providers grouped by Vendor name and Format type. +//! The Vendor name is "OCC" +//! The Format type is "PLY" +//! The import process isn't supported. +//! The export process is supported. +class RWPly_Provider : public DE_Provider +{ +public: + DEFINE_STANDARD_RTTIEXT(RWPly_Provider, DE_Provider) + +public: + + //! Default constructor + //! Configure translation process with global configuration + Standard_EXPORT RWPly_Provider(); + + //! Configure translation process + //! @param[in] theNode object to copy + Standard_EXPORT RWPly_Provider(const Handle(DE_ConfigurationNode)& theNode); + +public: + + //! Writes a CAD file, according internal configuration + //! @param[in] thePath path to the export CAD file + //! @param[out] theDocument document to export + //! @param[in] theWS current work session + //! @param theProgress[in] progress indicator + //! @return true if Write operation has ended correctly + Standard_EXPORT virtual bool Write(const TCollection_AsciiString& thePath, + const Handle(TDocStd_Document)& theDocument, + Handle(XSControl_WorkSession)& theWS, + const Message_ProgressRange& theProgress = Message_ProgressRange()) Standard_OVERRIDE; + + //! Writes a CAD file, according internal configuration + //! @param[in] thePath path to the export CAD file + //! @param[out] theDocument document to export + //! @param theProgress[in] progress indicator + //! @return true if Write operation has ended correctly + Standard_EXPORT virtual bool Write(const TCollection_AsciiString& thePath, + const Handle(TDocStd_Document)& theDocument, + const Message_ProgressRange& theProgress = Message_ProgressRange()) Standard_OVERRIDE; + + //! Writes a CAD file, according internal configuration + //! @param[in] thePath path to the export CAD file + //! @param[out] theShape shape to export + //! @param[in] theWS current work session + //! @param theProgress[in] progress indicator + //! @return true if Write operation has ended correctly + Standard_EXPORT virtual bool Write(const TCollection_AsciiString& thePath, + const TopoDS_Shape& theShape, + Handle(XSControl_WorkSession)& theWS, + const Message_ProgressRange& theProgress = Message_ProgressRange()) Standard_OVERRIDE; + + //! Writes a CAD file, according internal configuration + //! @param[in] thePath path to the export CAD file + //! @param[out] theShape shape to export + //! @param theProgress[in] progress indicator + //! @return true if Write operation has ended correctly + Standard_EXPORT virtual bool Write(const TCollection_AsciiString& thePath, + const TopoDS_Shape& theShape, + const Message_ProgressRange& theProgress = Message_ProgressRange()) Standard_OVERRIDE; + +public: + + //! Gets CAD format name of associated provider + //! @return provider CAD format + Standard_EXPORT virtual TCollection_AsciiString GetFormat() const Standard_OVERRIDE; + + //! Gets provider's vendor name of associated provider + //! @return provider's vendor name + Standard_EXPORT virtual TCollection_AsciiString GetVendor() const Standard_OVERRIDE; +}; + +#endif // _RWPly_Provider_HeaderFile diff --git a/src/RWStl/FILES b/src/RWStl/FILES index 4301832d2c..5f5d999434 100644 --- a/src/RWStl/FILES +++ b/src/RWStl/FILES @@ -2,3 +2,7 @@ RWStl.cxx RWStl.hxx RWStl_Reader.cxx RWStl_Reader.hxx +RWStl_ConfigurationNode.cxx +RWStl_ConfigurationNode.hxx +RWStl_Provider.cxx +RWStl_Provider.hxx diff --git a/src/RWStl/RWStl_ConfigurationNode.cxx b/src/RWStl/RWStl_ConfigurationNode.cxx new file mode 100644 index 0000000000..7afe7cded2 --- /dev/null +++ b/src/RWStl/RWStl_ConfigurationNode.cxx @@ -0,0 +1,185 @@ +// Copyright (c) 2022 OPEN CASCADE SAS +// +// This file is part of Open CASCADE Technology software library. +// +// This library is free software; you can redistribute it and/or modify it under +// the terms of the GNU Lesser General Public License version 2.1 as published +// by the Free Software Foundation, with special exception defined in the file +// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT +// distribution for complete text of the license and disclaimer of any warranty. +// +// Alternatively, this file may be used under the terms of Open CASCADE +// commercial license or contractual agreement. + +#include + +#include +#include +#include + +IMPLEMENT_STANDARD_RTTIEXT(RWStl_ConfigurationNode, DE_ConfigurationNode) + +static const TCollection_AsciiString THE_CONFIGURATION_SCOPE = "provider"; + +//======================================================================= +// function : STEPCAFControl_ConfigurationNode +// purpose : +//======================================================================= +RWStl_ConfigurationNode::RWStl_ConfigurationNode() : + DE_ConfigurationNode() +{ + UpdateLoad(); +} + +//======================================================================= +// function : STEPCAFControl_ConfigurationNode +// purpose : +//======================================================================= +RWStl_ConfigurationNode::RWStl_ConfigurationNode(const Handle(RWStl_ConfigurationNode)& theNode) + :DE_ConfigurationNode(theNode) +{ + InternalParameters = theNode->InternalParameters; + UpdateLoad(); +} + +//======================================================================= +// function : Load +// purpose : +//======================================================================= +bool RWStl_ConfigurationNode::Load(const Handle(DE_ConfigurationContext)& theResource) +{ + TCollection_AsciiString aScope = THE_CONFIGURATION_SCOPE + "." + GetFormat() + "." + GetVendor(); + + InternalParameters.ReadMergeAngle = + theResource->RealVal("read.merge.angle", InternalParameters.ReadMergeAngle, aScope); + InternalParameters.ReadBRep = + theResource->BooleanVal("read.brep", InternalParameters.ReadBRep, aScope); + InternalParameters.WriteAscii = + theResource->BooleanVal("write.ascii", InternalParameters.WriteAscii, aScope); + return true; +} + +//======================================================================= +// function : Save +// purpose : +//======================================================================= +TCollection_AsciiString RWStl_ConfigurationNode::Save() const +{ + TCollection_AsciiString aResult; + aResult += "!*****************************************************************************\n"; + aResult = aResult + "!Configuration Node " + " Vendor: " + GetVendor() + " Format: " + GetFormat() + "\n"; + TCollection_AsciiString aScope = THE_CONFIGURATION_SCOPE + "." + GetFormat() + "." + GetVendor() + "."; + + aResult += "!\n"; + aResult += "!Read parameters:\n"; + aResult += "!\n"; + + aResult += "!\n"; + aResult += "!Input merge angle value\n"; + aResult += "!Default value (in degrees): 90.0. Angle should be within [0.0, 90.0] range\n"; + aResult += aScope + "read.merge.angle :\t " + InternalParameters.ReadMergeAngle + "\n"; + aResult += "!\n"; + + aResult += "!\n"; + aResult += "!Setting up Boundary Representation flag\n"; + aResult += "!Default value: false. Available values: \"on\", \"off\"\n"; + aResult += aScope + "read.brep :\t " + InternalParameters.ReadBRep + "\n"; + aResult += "!\n"; + + aResult += "!\n"; + aResult += "!Write parameters:\n"; + aResult += "!\n"; + + aResult += "!\n"; + aResult += "!Setting up writing mode (Ascii or Binary)\n"; + aResult += "!Default value: 1(Binary). Available values: 0(Ascii), 1(Binary)\n"; + aResult += aScope + "write.ascii :\t " + InternalParameters.WriteAscii + "\n"; + aResult += "!\n"; + + aResult += "!*****************************************************************************\n"; + return aResult; +} + +//======================================================================= +// function : Copy +// purpose : +//======================================================================= +Handle(DE_ConfigurationNode) RWStl_ConfigurationNode::Copy() const +{ + return new RWStl_ConfigurationNode(*this); +} + +//======================================================================= +// function : BuildProvider +// purpose : +//======================================================================= +Handle(DE_Provider) RWStl_ConfigurationNode::BuildProvider() +{ + return new RWStl_Provider(this); +} + +//======================================================================= +// function : IsImportSupported +// purpose : +//======================================================================= +bool RWStl_ConfigurationNode::IsImportSupported() const +{ + return true; +} + +//======================================================================= +// function : IsExportSupported +// purpose : +//======================================================================= +bool RWStl_ConfigurationNode::IsExportSupported() const +{ + return true; +} + +//======================================================================= +// function : GetFormat +// purpose : +//======================================================================= +TCollection_AsciiString RWStl_ConfigurationNode::GetFormat() const +{ + return TCollection_AsciiString("STL"); +} + +//======================================================================= +// function : GetVendor +// purpose : +//======================================================================= +TCollection_AsciiString RWStl_ConfigurationNode::GetVendor() const +{ + return TCollection_AsciiString("OCC"); +} + +//======================================================================= +// function : GetExtensions +// purpose : +//======================================================================= +TColStd_ListOfAsciiString RWStl_ConfigurationNode::GetExtensions() const +{ + TColStd_ListOfAsciiString anExt; + anExt.Append("stl"); + return anExt; +} + +//======================================================================= +// function : CheckContent +// purpose : +//======================================================================= +bool RWStl_ConfigurationNode::CheckContent(const Handle(NCollection_Buffer)& theBuffer) const +{ + if (theBuffer.IsNull() || theBuffer->Size() < 7) + { + return false; + } + const char* aBytes = (const char*)theBuffer->Data(); + if (!(::strncmp(aBytes, "solid", 5) || ::strncmp(aBytes, "SOLID", 5)) && isspace(aBytes[5])) + { + return true; + } + // binary STL has no header for identification - format can be detected only by file extension + return false; +} diff --git a/src/RWStl/RWStl_ConfigurationNode.hxx b/src/RWStl/RWStl_ConfigurationNode.hxx new file mode 100644 index 0000000000..b1e33d7ee2 --- /dev/null +++ b/src/RWStl/RWStl_ConfigurationNode.hxx @@ -0,0 +1,99 @@ +// Copyright (c) 2022 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 _RWStl_ConfigurationNode_HeaderFile +#define _RWStl_ConfigurationNode_HeaderFile + +#include + +//! The purpose of this class is to configure the transfer process for STL format +//! Stores the necessary settings for RWStl_Provider. +//! Configures and creates special provider to transfer STL files. +//! +//! Nodes grouped by Vendor name and Format type. +//! The Vendor name is "OCC" +//! The Format type is "STL" +//! The supported CAD extension is ".stl" +//! The import process is supported. +//! The export process is supported. +class RWStl_ConfigurationNode : public DE_ConfigurationNode +{ + DEFINE_STANDARD_RTTIEXT(RWStl_ConfigurationNode, DE_ConfigurationNode) +public: + + //! Initializes all field by default + Standard_EXPORT RWStl_ConfigurationNode(); + + //! Copies values of all fields + //! @param[in] theNode object to copy + Standard_EXPORT RWStl_ConfigurationNode(const Handle(RWStl_ConfigurationNode)& theNode); + + //! Updates values according the resource + //! @param[in] theResource input resource to use + //! @return true if theResource loading has ended correctly + Standard_EXPORT virtual bool Load(const Handle(DE_ConfigurationContext)& theResource) Standard_OVERRIDE; + + //! Writes configuration to the string + //! @return result resource string + Standard_EXPORT virtual TCollection_AsciiString Save() const Standard_OVERRIDE; + + //! Copies values of all fields + //! @return new object with the same field values + Standard_EXPORT virtual Handle(DE_ConfigurationNode) Copy() const Standard_OVERRIDE; + + + //! Creates new provider for the own format + //! @return new created provider + Standard_EXPORT virtual Handle(DE_Provider) BuildProvider() Standard_OVERRIDE; + +public: + + //! Checks the import supporting + //! @return true if import is supported + Standard_EXPORT virtual bool IsImportSupported() const Standard_OVERRIDE; + + //! Checks the export supporting + //! @return true if export is supported + Standard_EXPORT virtual bool IsExportSupported() const Standard_OVERRIDE; + + //! Gets CAD format name of associated provider + //! @return provider CAD format + Standard_EXPORT virtual TCollection_AsciiString GetFormat() const Standard_OVERRIDE; + + //! Gets provider's vendor name of associated provider + //! @return provider's vendor name + Standard_EXPORT virtual TCollection_AsciiString GetVendor() const Standard_OVERRIDE; + + //! Gets list of supported file extensions + //! @return list of extensions + Standard_EXPORT virtual TColStd_ListOfAsciiString GetExtensions() const Standard_OVERRIDE; + + //! Checks the file content to verify a format + //! @param[in] theBuffer read stream buffer to check content + //! @return Standard_True if file is supported by a current provider + Standard_EXPORT virtual bool CheckContent(const Handle(NCollection_Buffer)& theBuffer) const Standard_OVERRIDE; + +public: + struct RWStl_InternalSection + { + // Read + double ReadMergeAngle = 90.; //!< Input merge angle value + bool ReadBRep = false; //!< Setting up Boundary Representation flag + + // Write + bool WriteAscii = true; //!< Setting up writing mode (Ascii or Binary) + + } InternalParameters; +}; + +#endif // _RWStl_ConfigurationNode_HeaderFile diff --git a/src/RWStl/RWStl_Provider.cxx b/src/RWStl/RWStl_Provider.cxx new file mode 100644 index 0000000000..8f862530b4 --- /dev/null +++ b/src/RWStl/RWStl_Provider.cxx @@ -0,0 +1,251 @@ +// Copyright (c) 2022 OPEN CASCADE SAS +// +// This file is part of Open CASCADE Technology software library. +// +// This library is free software; you can redistribute it and/or modify it under +// the terms of the GNU Lesser General Public License version 2.1 as published +// by the Free Software Foundation, with special exception defined in the file +// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT +// distribution for complete text of the license and disclaimer of any warranty. +// +// Alternatively, this file may be used under the terms of Open CASCADE +// commercial license or contractual agreement. + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +IMPLEMENT_STANDARD_RTTIEXT(RWStl_Provider, DE_Provider) + +//======================================================================= +// function : RWStl_Provider +// purpose : +//======================================================================= +RWStl_Provider::RWStl_Provider() +{} + +//======================================================================= +// function : RWStl_Provider +// purpose : +//======================================================================= +RWStl_Provider::RWStl_Provider(const Handle(DE_ConfigurationNode)& theNode) + :DE_Provider(theNode) +{} + +//======================================================================= +// function : Read +// purpose : +//======================================================================= +bool RWStl_Provider::Read(const TCollection_AsciiString& thePath, + const Handle(TDocStd_Document)& theDocument, + Handle(XSControl_WorkSession)& theWS, + const Message_ProgressRange& theProgress) +{ + (void)theWS; + return Read(thePath, theDocument, theProgress); +} + +//======================================================================= +// function : Write +// purpose : +//======================================================================= +bool RWStl_Provider::Write(const TCollection_AsciiString& thePath, + const Handle(TDocStd_Document)& theDocument, + Handle(XSControl_WorkSession)& theWS, + const Message_ProgressRange& theProgress) +{ + (void)theWS; + return Write(thePath, theDocument, theProgress); +} + +//======================================================================= +// function : Read +// purpose : +//======================================================================= +bool RWStl_Provider::Read(const TCollection_AsciiString& thePath, + const Handle(TDocStd_Document)& theDocument, + const Message_ProgressRange& theProgress) +{ + if (theDocument.IsNull()) + { + Message::SendFail() << "Error in the RWStl_Provider during reading the file " << + thePath << "\t: theDocument shouldn't be null"; + return false; + } + TopoDS_Shape aShape; + if (!Read(thePath, aShape, theProgress)) + { + return false; + } + Handle(XCAFDoc_ShapeTool) aShapeTool = XCAFDoc_DocumentTool::ShapeTool(theDocument->Main()); + aShapeTool->AddShape(aShape); + return true; +} + +//======================================================================= +// function : Write +// purpose : +//======================================================================= +bool RWStl_Provider::Write(const TCollection_AsciiString& thePath, + const Handle(TDocStd_Document)& theDocument, + const Message_ProgressRange& theProgress) +{ + TopoDS_Shape aShape; + TDF_LabelSequence aLabels; + Handle(XCAFDoc_ShapeTool) aSTool = XCAFDoc_DocumentTool::ShapeTool(theDocument->Main()); + aSTool->GetFreeShapes(aLabels); + if (aLabels.Length() <= 0) + { + Message::SendFail() << "Error in the RWStl_Provider during writing the file " << + thePath << "\t: Document contain no shapes"; + return false; + } + + if (aLabels.Length() == 1) + { + aShape = aSTool->GetShape(aLabels.Value(1)); + } + else + { + TopoDS_Compound aComp; + BRep_Builder aBuilder; + aBuilder.MakeCompound(aComp); + for (Standard_Integer anIndex = 1; anIndex <= aLabels.Length(); anIndex++) + { + TopoDS_Shape aS = aSTool->GetShape(aLabels.Value(anIndex)); + aBuilder.Add(aComp, aS); + } + aShape = aComp; + } + return Write(thePath, aShape, theProgress); +} + +//======================================================================= +// function : Read +// purpose : +//======================================================================= +bool RWStl_Provider::Read(const TCollection_AsciiString& thePath, + TopoDS_Shape& theShape, + Handle(XSControl_WorkSession)& theWS, + const Message_ProgressRange& theProgress) +{ + (void)theWS; + return Read(thePath, theShape, theProgress); +} + +//======================================================================= +// function : Write +// purpose : +//======================================================================= +bool RWStl_Provider::Write(const TCollection_AsciiString& thePath, + const TopoDS_Shape& theShape, + Handle(XSControl_WorkSession)& theWS, + const Message_ProgressRange& theProgress) +{ + (void)theWS; + return Write(thePath, theShape, theProgress); +} + +//======================================================================= +// function : Read +// purpose : +//======================================================================= +bool RWStl_Provider::Read(const TCollection_AsciiString& thePath, + TopoDS_Shape& theShape, + const Message_ProgressRange& theProgress) +{ + Message::SendWarning() << "OCCT Stl reader does not support model scaling according to custom length unit"; + if (!GetNode()->IsKind(STANDARD_TYPE(RWStl_ConfigurationNode))) + { + Message::SendFail() << "Error in the RWStl_Provider during reading the file " << + thePath << "\t: Incorrect or empty Configuration Node"; + return true; + } + Handle(RWStl_ConfigurationNode) aNode = Handle(RWStl_ConfigurationNode)::DownCast(GetNode()); + double aMergeAngle = aNode->InternalParameters.ReadMergeAngle * M_PI / 180.0; + if(aMergeAngle != M_PI_2) + { + if (aMergeAngle < 0.0 || aMergeAngle > M_PI_2) + { + Message::SendFail() << "Error in the RWStl_Provider during reading the file " << + thePath << "\t: The merge angle is out of the valid range"; + return false; + } + } + if (!aNode->InternalParameters.ReadBRep) + { + Handle(Poly_Triangulation) aTriangulation = RWStl::ReadFile(thePath.ToCString(), aMergeAngle, theProgress); + + TopoDS_Face aFace; + BRep_Builder aB; + aB.MakeFace(aFace); + aB.UpdateFace(aFace, aTriangulation); + theShape = aFace; + } + else + { + Standard_DISABLE_DEPRECATION_WARNINGS + if (!StlAPI::Read(theShape, thePath.ToCString())) + { + Message::SendFail() << "Error in the RWStl_Provider during reading the file " << thePath; + return false; + } + Standard_ENABLE_DEPRECATION_WARNINGS + } + return true; +} + +//======================================================================= +// function : Write +// purpose : +//======================================================================= +bool RWStl_Provider::Write(const TCollection_AsciiString& thePath, + const TopoDS_Shape& theShape, + const Message_ProgressRange& theProgress) +{ + Message::SendWarning() << "OCCT Stl writer does not support model scaling according to custom length unit"; + if (GetNode().IsNull() || !GetNode()->IsKind(STANDARD_TYPE(RWStl_ConfigurationNode))) + { + Message::SendFail() << "Error in the RWStl_Provider during reading the file " << + thePath << "\t: Incorrect or empty Configuration Node"; + return false; + } + Handle(RWStl_ConfigurationNode) aNode = Handle(RWStl_ConfigurationNode)::DownCast(GetNode()); + + StlAPI_Writer aWriter; + aWriter.ASCIIMode() = aNode->InternalParameters.WriteAscii; + if (!aWriter.Write(theShape, thePath.ToCString(), theProgress)) + { + Message::SendFail() << "Error in the RWStl_Provider during reading the file " << + thePath << "\t: Mesh writing has been failed"; + return false; + } + return true; +} + +//======================================================================= +// function : GetFormat +// purpose : +//======================================================================= +TCollection_AsciiString RWStl_Provider::GetFormat() const +{ + return TCollection_AsciiString("STL"); +} + +//======================================================================= +// function : GetVendor +// purpose : +//======================================================================= +TCollection_AsciiString RWStl_Provider::GetVendor() const +{ + return TCollection_AsciiString("OCC"); +} diff --git a/src/RWStl/RWStl_Provider.hxx b/src/RWStl/RWStl_Provider.hxx new file mode 100644 index 0000000000..1c6793e2da --- /dev/null +++ b/src/RWStl/RWStl_Provider.hxx @@ -0,0 +1,136 @@ +// Copyright (c) 2022 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 _RWStl_Provider_HeaderFile +#define _RWStl_Provider_HeaderFile + +#include + +//! The class to transfer STL files. +//! Reads and Writes any STL files into/from OCCT. +//! Each operation needs configuration node. +//! +//! Providers grouped by Vendor name and Format type. +//! The Vendor name is "OCC" +//! The Format type is "STL" +//! The import process is supported. +//! The export process is supported. +class RWStl_Provider : public DE_Provider +{ +public: + DEFINE_STANDARD_RTTIEXT(RWStl_Provider, DE_Provider) + +public: + + //! Default constructor + //! Configure translation process with global configuration + Standard_EXPORT RWStl_Provider(); + + //! Configure translation process + //! @param[in] theNode object to copy + Standard_EXPORT RWStl_Provider(const Handle(DE_ConfigurationNode)& theNode); + +public: + + //! Reads a CAD file, according internal configuration + //! @param[in] thePath path to the import CAD file + //! @param[out] theDocument document to save result + //! @param[in] theWS current work session + //! @param theProgress[in] progress indicator + //! @return true if Read operation has ended correctly + Standard_EXPORT virtual Standard_Boolean Read(const TCollection_AsciiString& thePath, + const Handle(TDocStd_Document)& theDocument, + Handle(XSControl_WorkSession)& theWS, + const Message_ProgressRange& theProgress = Message_ProgressRange()) Standard_OVERRIDE; + + //! Writes a CAD file, according internal configuration + //! @param[in] thePath path to the export CAD file + //! @param[out] theDocument document to export + //! @param[in] theWS current work session + //! @param theProgress[in] progress indicator + //! @return true if Write operation has ended correctly + Standard_EXPORT virtual Standard_Boolean Write(const TCollection_AsciiString& thePath, + const Handle(TDocStd_Document)& theDocument, + Handle(XSControl_WorkSession)& theWS, + const Message_ProgressRange& theProgress = Message_ProgressRange()) Standard_OVERRIDE; + + //! Reads a CAD file, according internal configuration + //! @param[in] thePath path to the import CAD file + //! @param[out] theDocument document to save result + //! @param theProgress[in] progress indicator + //! @return true if Read operation has ended correctly + Standard_EXPORT virtual Standard_Boolean Read(const TCollection_AsciiString& thePath, + const Handle(TDocStd_Document)& theDocument, + const Message_ProgressRange& theProgress = Message_ProgressRange()) Standard_OVERRIDE; + + //! Writes a CAD file, according internal configuration + //! @param[in] thePath path to the export CAD file + //! @param[out] theDocument document to export + //! @param theProgress[in] progress indicator + //! @return true if Write operation has ended correctly + Standard_EXPORT virtual Standard_Boolean Write(const TCollection_AsciiString& thePath, + const Handle(TDocStd_Document)& theDocument, + const Message_ProgressRange& theProgress = Message_ProgressRange()) Standard_OVERRIDE; + + //! Reads a CAD file, according internal configuration + //! @param[in] thePath path to the import CAD file + //! @param[out] theShape shape to save result + //! @param[in] theWS current work session + //! @param theProgress[in] progress indicator + //! @return true if Read operation has ended correctly + Standard_EXPORT virtual Standard_Boolean Read(const TCollection_AsciiString& thePath, + TopoDS_Shape& theShape, + Handle(XSControl_WorkSession)& theWS, + const Message_ProgressRange& theProgress = Message_ProgressRange()) Standard_OVERRIDE; + + //! Writes a CAD file, according internal configuration + //! @param[in] thePath path to the export CAD file + //! @param[out] theShape shape to export + //! @param[in] theWS current work session + //! @param theProgress[in] progress indicator + //! @return true if Write operation has ended correctly + Standard_EXPORT virtual Standard_Boolean Write(const TCollection_AsciiString& thePath, + const TopoDS_Shape& theShape, + Handle(XSControl_WorkSession)& theWS, + const Message_ProgressRange& theProgress = Message_ProgressRange()) Standard_OVERRIDE; + + //! Reads a CAD file, according internal configuration + //! @param[in] thePath path to the import CAD file + //! @param[out] theShape shape to save result + //! @param theProgress[in] progress indicator + //! @return true if Read operation has ended correctly + Standard_EXPORT virtual Standard_Boolean Read(const TCollection_AsciiString& thePath, + TopoDS_Shape& theShape, + const Message_ProgressRange& theProgress = Message_ProgressRange()) Standard_OVERRIDE; + + //! Writes a CAD file, according internal configuration + //! @param[in] thePath path to the export CAD file + //! @param[out] theShape shape to export + //! @param theProgress[in] progress indicator + //! @return true if Write operation has ended correctly + Standard_EXPORT virtual Standard_Boolean Write(const TCollection_AsciiString& thePath, + const TopoDS_Shape& theShape, + const Message_ProgressRange& theProgress = Message_ProgressRange()) Standard_OVERRIDE; + +public: + + //! Gets CAD format name of associated provider + //! @return provider CAD format + Standard_EXPORT virtual TCollection_AsciiString GetFormat() const Standard_OVERRIDE; + + //! Gets provider's vendor name of associated provider + //! @return provider's vendor name + Standard_EXPORT virtual TCollection_AsciiString GetVendor() const Standard_OVERRIDE; +}; + +#endif // _RWStl_Provider_HeaderFile diff --git a/src/STEPCAFControl/FILES b/src/STEPCAFControl/FILES index 2bf47657f2..350216d38f 100644 --- a/src/STEPCAFControl/FILES +++ b/src/STEPCAFControl/FILES @@ -1,5 +1,7 @@ STEPCAFControl_ActorWrite.cxx STEPCAFControl_ActorWrite.hxx +STEPCAFControl_ConfigurationNode.cxx +STEPCAFControl_ConfigurationNode.hxx STEPCAFControl_Controller.cxx STEPCAFControl_Controller.hxx STEPCAFControl_DataMapIteratorOfDataMapOfLabelExternFile.hxx @@ -17,9 +19,11 @@ STEPCAFControl_DataMapOfShapeSDR.hxx STEPCAFControl_ExternFile.cxx STEPCAFControl_ExternFile.hxx STEPCAFControl_ExternFile.lxx +STEPCAFControl_GDTProperty.hxx +STEPCAFControl_GDTProperty.cxx +STEPCAFControl_Provider.cxx +STEPCAFControl_Provider.hxx STEPCAFControl_Reader.cxx STEPCAFControl_Reader.hxx STEPCAFControl_Writer.cxx STEPCAFControl_Writer.hxx -STEPCAFControl_GDTProperty.hxx -STEPCAFControl_GDTProperty.cxx diff --git a/src/STEPCAFControl/STEPCAFControl_ConfigurationNode.cxx b/src/STEPCAFControl/STEPCAFControl_ConfigurationNode.cxx new file mode 100644 index 0000000000..42042d88ea --- /dev/null +++ b/src/STEPCAFControl/STEPCAFControl_ConfigurationNode.cxx @@ -0,0 +1,573 @@ +// Copyright (c) 2022 OPEN CASCADE SAS +// +// This file is part of Open CASCADE Technology software library. +// +// This library is free software; you can redistribute it and/or modify it under +// the terms of the GNU Lesser General Public License version 2.1 as published +// by the Free Software Foundation, with special exception defined in the file +// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT +// distribution for complete text of the license and disclaimer of any warranty. +// +// Alternatively, this file may be used under the terms of Open CASCADE +// commercial license or contractual agreement. + +#include + +#include +#include +#include + +IMPLEMENT_STANDARD_RTTIEXT(STEPCAFControl_ConfigurationNode, DE_ConfigurationNode) + +static const TCollection_AsciiString THE_CONFIGURATION_SCOPE = "provider"; + +//======================================================================= +// function : STEPCAFControl_ConfigurationNode +// purpose : +//======================================================================= +STEPCAFControl_ConfigurationNode::STEPCAFControl_ConfigurationNode() : + DE_ConfigurationNode() +{ + UpdateLoad(); +} + +//======================================================================= +// function : STEPCAFControl_ConfigurationNode +// purpose : +//======================================================================= +STEPCAFControl_ConfigurationNode::STEPCAFControl_ConfigurationNode(const Handle(STEPCAFControl_ConfigurationNode)& theNode) + :DE_ConfigurationNode(theNode), + InternalParameters(theNode->InternalParameters) +{ + UpdateLoad(); +} + +//======================================================================= +// function : Load +// purpose : +//======================================================================= +bool STEPCAFControl_ConfigurationNode::Load(const Handle(DE_ConfigurationContext)& theResource) +{ + TCollection_AsciiString aScope = THE_CONFIGURATION_SCOPE + "." + GetFormat() + "." + GetVendor(); + + InternalParameters.ReadBSplineContinuity = (ReadMode_BSplineContinuity) + theResource->IntegerVal("read.iges.bspline.continuity", InternalParameters.ReadBSplineContinuity, aScope); + InternalParameters.ReadPrecisionMode = (ReadMode_Precision) + theResource->IntegerVal("read.precision.mode", InternalParameters.ReadPrecisionMode, aScope); + InternalParameters.ReadPrecisionVal = + theResource->RealVal("read.precision.val", InternalParameters.ReadPrecisionVal, aScope); + InternalParameters.ReadMaxPrecisionMode = (ReadMode_MaxPrecision) + theResource->IntegerVal("read.maxprecision.mode", InternalParameters.ReadMaxPrecisionMode, aScope); + InternalParameters.ReadMaxPrecisionVal = + theResource->RealVal("read.maxprecision.val", InternalParameters.ReadMaxPrecisionVal, aScope); + InternalParameters.ReadSameParamMode = + theResource->BooleanVal("read.stdsameparameter.mode", InternalParameters.ReadSameParamMode, aScope); + InternalParameters.ReadSurfaceCurveMode = (ReadMode_SurfaceCurve) + theResource->IntegerVal("read.surfacecurve.mode", InternalParameters.ReadSurfaceCurveMode, aScope); + InternalParameters.EncodeRegAngle = + theResource->RealVal("read.encoderegularity.angle", InternalParameters.EncodeRegAngle, aScope); + InternalParameters.AngleUnit = (AngleUnitMode) + theResource->IntegerVal("angleunit.mode", InternalParameters.AngleUnit, aScope); + + InternalParameters.ReadResourceName = + theResource->StringVal("read.resource.name", InternalParameters.ReadResourceName, aScope); + InternalParameters.ReadSequence = + theResource->StringVal("read.sequence", InternalParameters.ReadSequence, aScope); + InternalParameters.ReadProductMode = + theResource->BooleanVal("read.product.mode", InternalParameters.ReadProductMode, aScope); + InternalParameters.ReadProductContext = (ReadMode_ProductContext) + theResource->IntegerVal("read.product.context", InternalParameters.ReadProductContext, aScope); + InternalParameters.ReadShapeRepr = (ReadMode_ShapeRepr) + theResource->IntegerVal("read.shape.repr", InternalParameters.ReadShapeRepr, aScope); + InternalParameters.ReadTessellated = (RWMode_Tessellated) + theResource->IntegerVal("read.tessellated", InternalParameters.ReadTessellated, aScope); + InternalParameters.ReadAssemblyLevel = (ReadMode_AssemblyLevel) + theResource->IntegerVal("read.assembly.level", InternalParameters.ReadAssemblyLevel, aScope); + InternalParameters.ReadRelationship = + theResource->BooleanVal("read.shape.relationship", InternalParameters.ReadRelationship, aScope); + InternalParameters.ReadShapeAspect = + theResource->BooleanVal("read.shape.aspect", InternalParameters.ReadShapeAspect, aScope); + InternalParameters.ReadConstrRelation = + theResource->BooleanVal("read.constructivegeom.relationship", InternalParameters.ReadConstrRelation, aScope); + InternalParameters.ReadSubshapeNames = + theResource->BooleanVal("read.stepcaf.subshapes.name", InternalParameters.ReadSubshapeNames, aScope); + InternalParameters.ReadCodePage = (Resource_FormatType) + theResource->IntegerVal("read.codepage", InternalParameters.ReadCodePage, aScope); + InternalParameters.ReadNonmanifold = + theResource->BooleanVal("read.nonmanifold", InternalParameters.ReadNonmanifold, aScope); + InternalParameters.ReadIdeas = + theResource->BooleanVal("read.ideas", InternalParameters.ReadIdeas, aScope); + InternalParameters.ReadAllShapes = + theResource->BooleanVal("read.all.shapes", InternalParameters.ReadAllShapes, aScope); + InternalParameters.ReadRootTransformation = + theResource->BooleanVal("read.root.transformation", InternalParameters.ReadRootTransformation, aScope); + InternalParameters.ReadColor = + theResource->BooleanVal("read.color", InternalParameters.ReadColor, aScope); + InternalParameters.ReadName = + theResource->BooleanVal("read.name", InternalParameters.ReadName, aScope); + InternalParameters.ReadLayer = + theResource->BooleanVal("read.layer", InternalParameters.ReadLayer, aScope); + InternalParameters.ReadProps = + theResource->BooleanVal("read.props", InternalParameters.ReadProps, aScope); + + InternalParameters.WritePrecisionMode = (WriteMode_PrecisionMode) + theResource->IntegerVal("write.precision.mode", InternalParameters.WritePrecisionMode, aScope); + InternalParameters.WritePrecisionVal = + theResource->RealVal("write.precision.val", InternalParameters.WritePrecisionVal, aScope); + InternalParameters.WriteAssembly = (WriteMode_Assembly) + theResource->IntegerVal("write.assembly", InternalParameters.WriteAssembly, aScope); + InternalParameters.WriteSchema = (WriteMode_StepSchema) + theResource->IntegerVal("write.schema", InternalParameters.WriteSchema, aScope); + InternalParameters.WriteTessellated = (RWMode_Tessellated) + theResource->IntegerVal("write.tessellated", InternalParameters.WriteTessellated, aScope); + InternalParameters.WriteProductName = + theResource->StringVal("write.product.name", InternalParameters.WriteProductName, aScope); + InternalParameters.WriteSurfaceCurMode = + theResource->BooleanVal("write.surfacecurve.mode", InternalParameters.WriteSurfaceCurMode, aScope); + InternalParameters.WriteUnit = (UnitsMethods_LengthUnit) + theResource->IntegerVal("write.unit", InternalParameters.WriteUnit, aScope); + InternalParameters.WriteResourceName = + theResource->StringVal("write.resource.name", InternalParameters.WriteResourceName, aScope); + InternalParameters.WriteSequence = + theResource->StringVal("write.sequence", InternalParameters.WriteSequence, aScope); + InternalParameters.WriteVertexMode = (WriteMode_VertexMode) + theResource->IntegerVal("write.vertex.mode", InternalParameters.WriteVertexMode, aScope); + InternalParameters.WriteSubshapeNames = + theResource->BooleanVal("write.stepcaf.subshapes.name", InternalParameters.WriteSubshapeNames, aScope); + InternalParameters.WriteColor = + theResource->BooleanVal("write.color", InternalParameters.WriteColor, aScope); + InternalParameters.WriteName = + theResource->BooleanVal("write.name", InternalParameters.WriteName, aScope); + InternalParameters.WriteLayer = + theResource->BooleanVal("write.layer", InternalParameters.WriteLayer, aScope); + InternalParameters.WriteProps = + theResource->BooleanVal("write.props", InternalParameters.WriteProps, aScope); + InternalParameters.WriteModelType = (STEPControl_StepModelType) + theResource->IntegerVal("write.model.type", InternalParameters.WriteModelType, aScope); + + return true; +} + +//======================================================================= +// function : Save +// purpose : +//======================================================================= +TCollection_AsciiString STEPCAFControl_ConfigurationNode::Save() const +{ + TCollection_AsciiString aResult; + aResult += "!*****************************************************************************\n"; + aResult = aResult + "!Configuration Node " + " Vendor: " + GetVendor() + " Format: " + GetFormat() + "\n"; + TCollection_AsciiString aScope = THE_CONFIGURATION_SCOPE + "." + GetFormat() + "." + GetVendor() + "."; + + aResult += "!\n"; + aResult += "!Common parameters:\n"; + aResult += "!\n"; + + aResult += "!\n"; + aResult += "!Manages the continuity of BSpline curves (IGES entities 106, 112 and 126) "; + aResult += "after translation to Open CASCADE Technology\n"; + aResult += "!Default value: 1. Available values: 0, 1, 2\n"; + aResult += aScope + "read.iges.bspline.continuity :\t " + InternalParameters.ReadBSplineContinuity + "\n"; + aResult += "!\n"; + + aResult += "!\n"; + aResult += "!Reads the precision mode value\n"; + aResult += "!Default value: \"File\"(0). Available values: \"File\"(0), \"User\"(1)\n"; + aResult += aScope + "read.precision.mode :\t " + InternalParameters.ReadPrecisionMode + "\n"; + aResult += "!\n"; + + aResult += "!\n"; + aResult += "!This parameter gives the precision for shape construction when the "; + aResult += "read.precision.mode parameter value is 1\n"; + aResult += "!Default value: 0.0001. Available values: any real positive (non null) value\n"; + aResult += aScope + "read.precision.val :\t " + InternalParameters.ReadPrecisionVal + "\n"; + aResult += "!\n"; + + aResult += "!\n"; + aResult += "!Defines the mode of applying the maximum allowed tolerance\n"; + aResult += "!Default value: \"Preferred\"(0). Available values: \"Preferred\"(0), \"Forced\"(1)\n"; + aResult += aScope + "read.maxprecision.mode :\t " + InternalParameters.ReadMaxPrecisionMode + "\n"; + aResult += "!\n"; + + aResult += "!\n"; + aResult += "!Defines the maximum allowable tolerance (in internal units, which are specified in xstep.cascade.unit)"; + aResult += " of the shape\n"; + aResult += "!Default value: 1. Available values: any real positive (non null) value\n"; + aResult += aScope + "read.maxprecision.val :\t " + InternalParameters.ReadMaxPrecisionVal + "\n"; + aResult += "!\n"; + + aResult += "!\n"; + aResult += "!Defines the using of BRepLib::SameParameter\n"; + aResult += "!Default value: \"Off\"(0). Available values: \"Off\"(0), \"On\"(1)\n"; + aResult += aScope + "read.stdsameparameter.mode :\t " + InternalParameters.ReadSameParamMode + "\n"; + aResult += "!\n"; + + aResult += "!\n"; + aResult += "!Preference for the computation of curves in case of 2D/3D inconsistency in an entity "; + aResult += "which has both 2D and 3D representations.\n"; + aResult += "!Default value: \"Default\"(0). Available values: \"Default\"(0), \"2DUse_Preferred\"(2), "; + aResult += "\"2DUse_Forced\"(-2), \"3DUse_Preferred\"(3), \"3DUse_Forced\"(-3)\n"; + aResult += aScope + "read.surfacecurve.mode :\t " + InternalParameters.ReadSurfaceCurveMode + "\n"; + aResult += "!\n"; + + aResult += "!\n"; + aResult += "!This parameter is used within the BRepLib::EncodeRegularity() function "; + aResult += "which is called for a shape read "; + aResult += "from an IGES or a STEP file at the end of translation process.This function sets the regularity flag of"; + aResult += " an edge in a shell when this edge is shared by two faces.This flag shows the continuity, "; + aResult += "which these two faces are connected with at that edge.\n"; + aResult += "!Default value (in degrees): 0.57295779513. Available values: \n"; + aResult += aScope + "read.encoderegularity.angle :\t " + InternalParameters.EncodeRegAngle + "\n"; + aResult += "!\n"; + + aResult += "!\n"; + aResult += "!Indicates what angle units should be used when a STEP file is read\n"; + aResult += "!Default value: \"File\"(0). Available values: \"File\"(0), \"Rad\"(1), \"Deg\"(2)\n"; + aResult += aScope + "angleunit.mode :\t " + InternalParameters.AngleUnit + "\n"; + aResult += "!\n"; + + aResult += "!\n"; + aResult += "!Read Parameters:\n"; + aResult += "!\n"; + + aResult += "!\n"; + aResult += "!Defines the name of the resource file\n"; + aResult += "!Default value: \"STEP\". Available values: \n"; + aResult += aScope + "read.resource.name :\t " + InternalParameters.ReadResourceName + "\n"; + aResult += "!\n"; + + aResult += "!\n"; + aResult += "!Defines name of the sequence of operators\n"; + aResult += "!Default value: \"FromSTEP\". Available values: \n"; + aResult += aScope + "read.sequence :\t " + InternalParameters.ReadSequence + "\n"; + aResult += "!\n"; + + aResult += "!\n"; + aResult += "!Defines the approach used for selection of top-level STEP entities for translation, "; + aResult += "and for recognition of assembly structures\n"; + aResult += "!Default value: 1(\"ON\"). Available values: 0(\"OFF\"), 1(\"ON\")\n"; + aResult += aScope + "read.product.mode :\t " + InternalParameters.ReadProductMode + "\n"; + aResult += "!\n"; + + aResult += "!\n"; + aResult += "!When reading AP 209 STEP files, allows selecting either only 'design' or 'analysis', "; + aResult += "or both types of products for translation\n"; + aResult += "!Default value: 1(\"all\"). Available values: 1(\"all\"), 2(\"design\"), 3(\"analysis\")\n"; + aResult += aScope + "read.product.context :\t " + InternalParameters.ReadProductContext + "\n"; + aResult += "!\n"; + + aResult += "!\n"; + aResult += "!Specifies preferred type of representation of the shape of the product, in case if a STEP file contains"; + aResult += " more than one representation(i.e.multiple PRODUCT_DEFINITION_SHAPE entities) for a single product\n"; + aResult += "!Default value: 1(\"All\"). Available values: 1(\"All\"), 2(\"ABSR\"), 3(\"MSSR\"), 4(\"GBSSR\"), "; + aResult += "5(\"FBSR\"), 6(\"EBWSR\"), 7(\"GBWSR\")\n"; + aResult += aScope + "read.shape.repr :\t " + InternalParameters.ReadShapeRepr + "\n"; + aResult += "!\n"; + + aResult += "!\n"; + aResult += "!Defines whether tessellated shapes should be translated"; + aResult += "!Default value: 1(\"On\"). Available values: 0(\"OFF\"), 2(\"OnNoBRep\")\n"; + aResult += aScope + "read.tessellated :\t " + InternalParameters.ReadTessellated + "\n"; + aResult += "!\n"; + + aResult += "!\n"; + aResult += "!Specifies which data should be read for the products found in the STEP file\n"; + aResult += "!Default value: 1(\"All\"). Available values: 1(\"All\"), 2(\"assembly\"),"; + aResult += "3(\"structure\"), 4(\"shape\")\n"; + aResult += aScope + "read.assembly.level :\t " + InternalParameters.ReadAssemblyLevel + "\n"; + aResult += "!\n"; + + aResult += "!\n"; + aResult += "!Defines whether shapes associated with the main SHAPE_DEFINITION_REPRESENTATION entity"; + aResult += "of the product via SHAPE_REPRESENTATIONSHIP_RELATION should be translated\n"; + aResult += "!Default value: 1(\"ON\"). Available values: 0(\"OFF\"), 1(\"ON\")\n"; + aResult += aScope + "read.shape.relationship :\t " + InternalParameters.ReadRelationship + "\n"; + aResult += "!\n"; + + aResult += "!\n"; + aResult += "!Defines whether shapes associated with the PRODUCT_DEFINITION_SHAPE entity of the product "; + aResult += "via SHAPE_ASPECT should be translated.\n"; + aResult += "!Default value: 1(\"ON\"). Available values: 0(\"OFF\"), 1(\"ON\")\n"; + aResult += aScope + "read.shape.aspect :\t " + InternalParameters.ReadShapeAspect + "\n"; + aResult += "!\n"; + + aResult += "!\n"; + aResult += "!Boolean flag regulating translation of \"CONSTRUCTIVE_GEOMETRY_REPRESENTATION_RELATIONSHIP\" "; + aResult += "entities that define position of constructive geometry entities contained in "; + aResult += "\"CONSTRUCTIVE_GEOMETRY_REPRESENTATION\" with respect to the main representation of the shape (product).\n"; + aResult += "!Default value: 0(\"OFF\"). Available values: 0(\"OFF\"), 1(\"ON\")\n"; + aResult += aScope + "read.constructivegeom.relationship :\t " + InternalParameters.ReadConstrRelation + "\n"; + aResult += "!\n"; + + aResult += "!\n"; + aResult += "!Indicates whether to read sub-shape names from 'Name' attributes of STEP Representation Items\n"; + aResult += "!Default value: 0(\"OFF\"). Available values: 0(\"OFF\"), 1(\"ON\")\n"; + aResult += aScope + "read.stepcaf.subshapes.name :\t " + InternalParameters.ReadSubshapeNames + "\n"; + aResult += "!\n"; + + aResult += "!\n"; + aResult += "!STEP file encoding for names translation\n"; + aResult += "!Default value: 4(\"UTF8\"). Available values: 0(\"SJIS\"), 1(\"EUC\"), 2(\"NoConversion\"), "; + aResult += "3(\"GB\"), 4(\"UTF8\"), 5(\"SystemLocale\"), 6(\"CP1250\"), 7(\"CP1251\"), 8(\"CP1252\"), "; + aResult += "9(\"CP1253\"), 10(\"CP1254\"), 11(\"CP1255\"), 12(\"CP1256\"), 13(\"CP1257\"), 14(\"CP1258\"), "; + aResult += "15(\"iso8859-1\"), 16(\"iso8859-2\"), 17(\"iso8859-3\"), 18(\"iso8859-4\"), 19(\"iso8859-5\"), "; + aResult += "20(\"iso8859-6\"), 21(\"iso8859-7\"), 22(\"iso8859-8\"), 23(\"iso8859-9\"), 24(\"CP850\")\n"; + aResult += aScope + "read.codepage :\t " + InternalParameters.ReadCodePage + "\n"; + aResult += "!\n"; + + aResult += "!\n"; + aResult += "!Non-manifold topology reading\n"; + aResult += "!Default value: 0(\"OFF\"). Available values: 0(\"OFF\"), 1(\"ON\")\n"; + aResult += aScope + "read.nonmanifold :\t " + InternalParameters.ReadNonmanifold + "\n"; + aResult += "!\n"; + + aResult += "!\n"; + aResult += "!I-Deas-like STEP processing\n"; + aResult += "!Default value: 0(\"OFF\"). Available values: 0(\"OFF\"), 1(\"ON\")\n"; + aResult += aScope + "read.ideas :\t " + InternalParameters.ReadIdeas + "\n"; + aResult += "!\n"; + + aResult += "!\n"; + aResult += "!Parameter to read all top level solids and shells\n"; + aResult += "!Default value: 0(\"OFF\"). Available values: 0(\"OFF\"), 1(\"ON\")\n"; + aResult += aScope + "read.all.shapes :\t " + InternalParameters.ReadAllShapes + "\n"; + aResult += "!\n"; + + aResult += "!\n"; + aResult += "!Mode to variate apply or not transformation placed in the root shape representation.\n"; + aResult += "!Default value: 1(\"ON\"). Available values: 0(\"OFF\"), 1(\"ON\")\n"; + aResult += aScope + "read.root.transformation :\t " + InternalParameters.ReadRootTransformation + "\n"; + aResult += "!\n"; + + aResult += "!\n"; + aResult += "!Setting up the read.colo parameter which is used to indicate read Colors or not\n"; + aResult += "!Default value: +. Available values: \"-\", \"+\"\n"; + aResult += aScope + "read.color :\t " + InternalParameters.ReadColor + "\n"; + aResult += "!\n"; + + aResult += "!\n"; + aResult += "!Setting up the read.name parameter which is used to indicate read Names or not\n"; + aResult += "!Default value: +. Available values: \"-\", \"+\"\n"; + aResult += aScope + "read.name :\t " + InternalParameters.ReadName + "\n"; + aResult += "!\n"; + + aResult += "!\n"; + aResult += "!Setting up the read.layer parameter which is used to indicate read Layers or not\n"; + aResult += "!Default value: +. Available values: \"-\", \"+\"\n"; + aResult += aScope + "read.layer :\t " + InternalParameters.ReadLayer + "\n"; + aResult += "!\n"; + + aResult += "!\n"; + aResult += "!Setting up the read.props parameter which is used to indicate read Validation properties or not\n"; + aResult += "!Default value: +. Available values: \"-\", \"+\"\n"; + aResult += aScope + "read.props :\t " + InternalParameters.ReadProps + "\n"; + aResult += "!\n"; + + aResult += "!\n"; + aResult += "!Write Parameters:\n"; + aResult += "!\n"; + + aResult += "!\n"; + aResult += "!Writes the precision value\n"; + aResult += "!Default value: \"Average\"(0). Available values: \"Least\"(-1), \"Average\"(0), "; + aResult += "\"Greatest\"(1), \"Session\"(2)\n"; + aResult += aScope + "write.precision.mode :\t " + InternalParameters.WritePrecisionMode + "\n"; + aResult += "!\n"; + + aResult += "!\n"; + aResult += "!A user-defined precision value\n"; + aResult += "!Default value: 0.0001. Available values: any real positive (non null) value\n"; + aResult += aScope + "write.precision.val :\t " + InternalParameters.WritePrecisionVal + "\n"; + aResult += "!\n"; + + aResult += "!\n"; + aResult += "!Writing assembly mode\n"; + aResult += "!Default value: 0(\"Off\"). Available values: 0(\"Off\"), 1(\"On\"), 2(\"Auto\")\n"; + aResult += aScope + "write.assembly :\t " + InternalParameters.WriteAssembly + "\n"; + aResult += "!\n"; + + aResult += "!\n"; + aResult += "!Defines the version of schema used for the output STEP file\n"; + aResult += "!Default value: 1 or AP214CD. Available values: 1 or AP214CD, 2 or AP214DIS, 3 or AP203, "; + aResult += "4 or AP214IS, 5 or AP242DIS\n"; + aResult += aScope + "write.schema :\t " + InternalParameters.WriteSchema + "\n"; + aResult += "!\n"; + + aResult += "!\n"; + aResult += "!Defines whether tessellated shapes should be translated"; + aResult += "!Default value: 2(\"OnNoBRep\"). Available values: 0(\"OFF\"), 1(\"On\")\n"; + aResult += aScope + "write.tessellated :\t " + InternalParameters.WriteTessellated + "\n"; + aResult += "!\n"; + + aResult += "!\n"; + aResult += "!Defines the text string that will be used for field 'name' of PRODUCT entities written to the STEP file\n"; + aResult += "!Default value: OCCT STEP translator (current OCCT version number). Available values: \n"; + aResult += aScope + "write.product.name :\t " + InternalParameters.WriteProductName + "\n"; + aResult += "!\n"; + + aResult += "!\n"; + aResult += "!This parameter indicates whether parametric curves should be written into the STEP file\n"; + aResult += "!Default value: 1(\"ON\"). Available values: 0(\"OFF\"), 1(\"ON\")\n"; + aResult += aScope + "write.surfacecurve.mode :\t " + InternalParameters.WriteSurfaceCurMode + "\n"; + aResult += "!\n"; + + aResult += "!\n"; + aResult += "!Defines a unit in which the STEP file should be written.\n"; + aResult += "!Default value: MM(2). Available values: \"INCH\"(1), \"MM\"(2), \"??\"(3), \"FT\"(4), \"MI\"(5), "; + aResult += "\"M\"(6), \"KM\"(7), \"MIL\"(8), \"UM\"(9), \"CM\"(10), \"UIN\"(11)\n"; + aResult += aScope + "write.unit :\t " + InternalParameters.WriteUnit + "\n"; + aResult += "!\n"; + + aResult += "!\n"; + aResult += "!Defines the name of the resource file\n"; + aResult += "!Default value: \"STEP\". Available values: \n"; + aResult += aScope + "write.resource.name :\t " + InternalParameters.WriteResourceName + "\n"; + aResult += "!\n"; + + aResult += "!\n"; + aResult += "!Defines name of the sequence of operators\n"; + aResult += "!Default value: \"ToSTEP\". Available values: \n"; + aResult += aScope + "write.sequence :\t " + InternalParameters.WriteSequence + "\n"; + aResult += "!\n"; + + aResult += "!\n"; + aResult += "!This parameter indicates which of free vertices writing mode is switch on\n"; + aResult += "!Default value: 0(\"One Compound\"). Available values: 0(\"One Compound\"), 1(\"Signle Vertex\")\n"; + aResult += aScope + "write.vertex.mode :\t " + InternalParameters.WriteVertexMode + "\n"; + aResult += "!\n"; + + aResult += "!\n"; + aResult += "!Indicates whether to write sub-shape names to 'Name' attributes of STEP Representation Items\n"; + aResult += "!Default value: 0(\"OFF\"). Available values: 0(\"OFF\"), 1(\"ON\")\n"; + aResult += aScope + "write.stepcaf.subshapes.name :\t " + InternalParameters.WriteSubshapeNames + "\n"; + aResult += "!\n"; + + aResult += "!\n"; + aResult += "!Setting up the write.colo parameter which is used to indicate write Colors or not\n"; + aResult += "!Default value: +. Available values: \"-\", \"+\"\n"; + aResult += aScope + "write.color :\t " + InternalParameters.WriteColor + "\n"; + aResult += "!\n"; + + aResult += "!\n"; + aResult += "!Setting up the write.name parameter which is used to indicate write Names or not\n"; + aResult += "!Default value: +. Available values: \"-\", \"+\"\n"; + aResult += aScope + "write.name :\t " + InternalParameters.WriteName + "\n"; + aResult += "!\n"; + + aResult += "!\n"; + aResult += "!Setting up the write.layer parameter which is used to indicate write Layers or not\n"; + aResult += "!Default value: +. Available values: \"-\", \"+\"\n"; + aResult += aScope + "write.layer :\t " + InternalParameters.WriteLayer + "\n"; + aResult += "!\n"; + + aResult += "!\n"; + aResult += "!Setting up the write.props parameter which is used to indicate write Validation properties or not\n"; + aResult += "!Default value: +. Available values: \"-\", \"+\"\n"; + aResult += aScope + "write.props :\t " + InternalParameters.WriteProps + "\n"; + aResult += "!\n"; + + aResult += "!\n"; + aResult += "!Setting up the Model Type which gives you the choice of translation mode for an Open CASCADE shape that "; + aResult += "is being translated to STEP\n"; + aResult += "!Default value: 0. Available values: 0, 1, 2, 3, 4\n"; + aResult += aScope + "write.model.type :\t " + InternalParameters.WriteModelType + "\n"; + aResult += "!\n"; + + aResult += "!*****************************************************************************\n"; + + return aResult; +} + +//======================================================================= +// function : Copy +// purpose : +//======================================================================= +Handle(DE_ConfigurationNode) STEPCAFControl_ConfigurationNode::Copy() const +{ + return new STEPCAFControl_ConfigurationNode(*this); +} + +//======================================================================= +// function : BuildProvider +// purpose : +//======================================================================= +Handle(DE_Provider) STEPCAFControl_ConfigurationNode::BuildProvider() +{ + return new STEPCAFControl_Provider(this); +} + +//======================================================================= +// function : IsImportSupported +// purpose : +//======================================================================= +bool STEPCAFControl_ConfigurationNode::IsImportSupported() const +{ + return true; +} + +//======================================================================= +// function : IsExportSupported +// purpose : +//======================================================================= +bool STEPCAFControl_ConfigurationNode::IsExportSupported() const +{ + return true; +} + +//======================================================================= +// function : GetFormat +// purpose : +//======================================================================= +TCollection_AsciiString STEPCAFControl_ConfigurationNode::GetFormat() const +{ + return TCollection_AsciiString("STEP"); +} + +//======================================================================= +// function : GetVendor +// purpose : +//======================================================================= +TCollection_AsciiString STEPCAFControl_ConfigurationNode::GetVendor() const +{ + return TCollection_AsciiString("OCC"); +} + +//======================================================================= +// function : GetExtensions +// purpose : +//======================================================================= +TColStd_ListOfAsciiString STEPCAFControl_ConfigurationNode::GetExtensions() const +{ + TColStd_ListOfAsciiString anExt; + anExt.Append("stp"); + anExt.Append("step"); + anExt.Append("stpz"); + return anExt; +} + +//======================================================================= +// function : CheckContent +// purpose : +//======================================================================= +bool STEPCAFControl_ConfigurationNode::CheckContent(const Handle(NCollection_Buffer)& theBuffer) const +{ + if (theBuffer.IsNull() || theBuffer->Size() < 100) + { + return false; + } + const char* aBytes = (const char*)theBuffer->Data(); + if (::strstr(aBytes, "IFC")) + { + return false; + } + if (::strstr(aBytes, "ISO-10303-21")) + { + // Double-check by presence of "FILE_SHEMA" statement + const char* aPtr = ::strstr(aBytes, "FILE_SCHEMA"); + if (aPtr) + { + return true; + } + } + return false; +} diff --git a/src/STEPCAFControl/STEPCAFControl_ConfigurationNode.hxx b/src/STEPCAFControl/STEPCAFControl_ConfigurationNode.hxx new file mode 100644 index 0000000000..afd83def43 --- /dev/null +++ b/src/STEPCAFControl/STEPCAFControl_ConfigurationNode.hxx @@ -0,0 +1,234 @@ +// Copyright (c) 2022 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 _STEPCAFControl_ConfigurationNode_HeaderFile +#define _STEPCAFControl_ConfigurationNode_HeaderFile + +#include +#include +#include +#include + +//! The purpose of this class is to configure the transfer process for STEP format +//! Stores the necessary settings for STEPCAFControl_Provider. +//! Configures and creates special provider to transfer STEP files. +//! +//! Nodes grouped by Vendor name and Format type. +//! The Vendor name is "OCC" +//! The Format type is "STEP" +//! The supported CAD extensions are ".stp", ".step", ".stpz" +//! The import process is supported. +//! The export process is supported. +class STEPCAFControl_ConfigurationNode : public DE_ConfigurationNode +{ + DEFINE_STANDARD_RTTIEXT(STEPCAFControl_ConfigurationNode, DE_ConfigurationNode) +public: + + //! Initializes all field by default + Standard_EXPORT STEPCAFControl_ConfigurationNode(); + + //! Copies values of all fields + //! @param[in] theNode object to copy + Standard_EXPORT STEPCAFControl_ConfigurationNode(const Handle(STEPCAFControl_ConfigurationNode)& theNode); + + //! Updates values according the resource + //! @param[in] theResource input resource to use + //! @return true if theResource loading has ended correctly + Standard_EXPORT virtual bool Load(const Handle(DE_ConfigurationContext)& theResource) Standard_OVERRIDE; + + //! Writes configuration to the string + //! @return result resource string + Standard_EXPORT virtual TCollection_AsciiString Save() const Standard_OVERRIDE; + + //! Copies values of all fields + //! @return new object with the same field values + Standard_EXPORT virtual Handle(DE_ConfigurationNode) Copy() const Standard_OVERRIDE; + + + //! Creates new provider for the own format + //! @return new created provider + Standard_EXPORT virtual Handle(DE_Provider) BuildProvider() Standard_OVERRIDE; + +public: + + //! Checks the import supporting + //! @return true if import is supported + Standard_EXPORT virtual bool IsImportSupported() const Standard_OVERRIDE; + + //! Checks the export supporting + //! @return true if export is supported + Standard_EXPORT virtual bool IsExportSupported() const Standard_OVERRIDE; + + //! Gets CAD format name of associated provider + //! @return provider CAD format + Standard_EXPORT virtual TCollection_AsciiString GetFormat() const Standard_OVERRIDE; + + //! Gets provider's vendor name of associated provider + //! @return provider's vendor name + Standard_EXPORT virtual TCollection_AsciiString GetVendor() const Standard_OVERRIDE; + + //! Gets list of supported file extensions + //! @return list of extensions + Standard_EXPORT virtual TColStd_ListOfAsciiString GetExtensions() const Standard_OVERRIDE; + + //! Checks the file content to verify a format + //! @param[in] theBuffer read stream buffer to check content + //! @return Standard_True if file is supported by a current provider + Standard_EXPORT virtual bool CheckContent(const Handle(NCollection_Buffer)& theBuffer) const Standard_OVERRIDE; + +public: + + enum ReadMode_BSplineContinuity + { + ReadMode_BSplineContinuity_C0 = 0, + ReadMode_BSplineContinuity_C1, + ReadMode_BSplineContinuity_C2 + }; + enum ReadMode_Precision + { + ReadMode_Precision_File = 0, + ReadMode_Precision_User + }; + enum ReadMode_MaxPrecision + { + ReadMode_MaxPrecision_Preferred = 0, + ReadMode_MaxPrecision_Forced + }; + enum ReadMode_SurfaceCurve + { + ReadMode_SurfaceCurve_Default = 0, + ReadMode_SurfaceCurve_2DUse_Preferred = 2, + ReadMode_SurfaceCurve_2DUse_Forced = -2, + ReadMode_SurfaceCurve_3DUse_Preferred = 3, + ReadMode_SurfaceCurve_3DUse_Forced = -3 + }; + enum AngleUnitMode + { + AngleUnitMode_File = 0, + AngleUnitMode_Rad, + AngleUnitMode_Deg + }; + enum ReadMode_ProductContext + { + ReadMode_ProductContext_All = 1, + ReadMode_ProductContext_Design, + ReadMode_ProductContext_Analysis + }; + enum ReadMode_ShapeRepr + { + ReadMode_ShapeRepr_All = 1, + ReadMode_ShapeRepr_ABSR, + ReadMode_ShapeRepr_MSSR, + ReadMode_ShapeRepr_GBSSR, + ReadMode_ShapeRepr_FBSR, + ReadMode_ShapeRepr_EBWSR, + ReadMode_ShapeRepr_GBWSR + }; + enum ReadMode_AssemblyLevel + { + ReadMode_AssemblyLevel_All = 1, + ReadMode_AssemblyLevel_Assembly, + ReadMode_AssemblyLevel_Structure, + ReadMode_AssemblyLevel_Shape + }; + enum RWMode_Tessellated + { + RWMode_Tessellated_Off = 0, + RWMode_Tessellated_On, + RWMode_Tessellated_OnNoBRep + }; + enum WriteMode_PrecisionMode + { + WriteMode_PrecisionMode_Least = -1, + WriteMode_PrecisionMode_Average = 0, + WriteMode_PrecisionMode_Greatest = 1, + WriteMode_PrecisionMode_Session = 2 + }; + enum WriteMode_Assembly + { + WriteMode_Assembly_Off = 0, + WriteMode_Assembly_On, + WriteMode_Assembly_Auto + }; + enum WriteMode_StepSchema + { + WriteMode_StepSchema_AP214CD = 1, + WriteMode_StepSchema_AP214DIS, + WriteMode_StepSchema_AP203, + WriteMode_StepSchema_AP214IS, + WriteMode_StepSchema_AP242DIS + }; + enum WriteMode_VertexMode + { + WriteMode_VertexMode_OneCompound = 0, + WriteMode_VertexMode_SingleVertex + }; + struct STEPCAFControl_InternalSection + { + // Common + ReadMode_BSplineContinuity ReadBSplineContinuity = ReadMode_BSplineContinuity_C1; // + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +IMPLEMENT_STANDARD_RTTIEXT(STEPCAFControl_Provider, DE_Provider) + +//======================================================================= +// function : STEPCAFControl_Provider +// purpose : +//======================================================================= +STEPCAFControl_Provider::STEPCAFControl_Provider() +{} + +//======================================================================= +// function : STEPCAFControl_Provider +// purpose : +//======================================================================= +STEPCAFControl_Provider::STEPCAFControl_Provider(const Handle(DE_ConfigurationNode)& theNode) + :DE_Provider(theNode) +{} + +//======================================================================= +// function : initStatic +// purpose : +//======================================================================= +void STEPCAFControl_Provider::initStatic(const Handle(DE_ConfigurationNode)& theNode) +{ + Handle(STEPCAFControl_ConfigurationNode) aNode = Handle(STEPCAFControl_ConfigurationNode)::DownCast(theNode); + STEPCAFControl_Controller::Init(); + + // Get previous values + myOldValues.ReadBSplineContinuity = (STEPCAFControl_ConfigurationNode::ReadMode_BSplineContinuity)Interface_Static::IVal("read.iges.bspline.continuity"); + myOldValues.ReadPrecisionMode = (STEPCAFControl_ConfigurationNode::ReadMode_Precision)Interface_Static::IVal("read.precision.mode"); + myOldValues.ReadPrecisionVal = Interface_Static::RVal("read.precision.val"); + myOldValues.ReadMaxPrecisionMode = (STEPCAFControl_ConfigurationNode::ReadMode_MaxPrecision)Interface_Static::IVal("read.maxprecision.mode"); + myOldValues.ReadMaxPrecisionVal = Interface_Static::RVal("read.maxprecision.val"); + myOldValues.ReadSameParamMode = Interface_Static::IVal("read.stdsameparameter.mode") == 1; + myOldValues.ReadSurfaceCurveMode = (STEPCAFControl_ConfigurationNode::ReadMode_SurfaceCurve)Interface_Static::IVal("read.surfacecurve.mode"); + myOldValues.EncodeRegAngle = Interface_Static::RVal("read.encoderegularity.angle") * 180.0 / M_PI; + myOldValues.AngleUnit = (STEPCAFControl_ConfigurationNode::AngleUnitMode)Interface_Static::IVal("step.angleunit.mode"); + + myOldValues.ReadResourceName = Interface_Static::CVal("read.step.resource.name"); + myOldValues.ReadSequence = Interface_Static::CVal("read.step.sequence"); + myOldValues.ReadProductMode = Interface_Static::IVal("read.step.product.mode") == 1; + myOldValues.ReadProductContext = (STEPCAFControl_ConfigurationNode::ReadMode_ProductContext)Interface_Static::IVal("read.step.product.context"); + myOldValues.ReadShapeRepr = (STEPCAFControl_ConfigurationNode::ReadMode_ShapeRepr)Interface_Static::IVal("read.step.shape.repr"); + myOldValues.ReadTessellated = (STEPCAFControl_ConfigurationNode::RWMode_Tessellated)Interface_Static::IVal("read.step.tessellated"); + myOldValues.ReadAssemblyLevel = (STEPCAFControl_ConfigurationNode::ReadMode_AssemblyLevel)Interface_Static::IVal("read.step.assembly.level"); + myOldValues.ReadRelationship = Interface_Static::IVal("read.step.shape.relationship") == 1; + myOldValues.ReadShapeAspect = Interface_Static::IVal("read.step.shape.aspect") == 1; + myOldValues.ReadConstrRelation = Interface_Static::IVal("read.step.constructivegeom.relationship") == 1; + myOldValues.ReadSubshapeNames = Interface_Static::IVal("read.stepcaf.subshapes.name") == 1; + myOldValues.ReadCodePage = (Resource_FormatType)Interface_Static::IVal("read.step.codepage"); + myOldValues.ReadNonmanifold = Interface_Static::IVal("read.step.nonmanifold") == 1; + myOldValues.ReadIdeas = Interface_Static::IVal("read.step.ideas") == 1; + myOldValues.ReadAllShapes = Interface_Static::IVal("read.step.all.shapes") == 1; + myOldValues.ReadRootTransformation = Interface_Static::IVal("read.step.root.transformation") == 1; + + myOldValues.WritePrecisionMode = (STEPCAFControl_ConfigurationNode::WriteMode_PrecisionMode)Interface_Static::IVal("write.precision.mode"); + myOldValues.WritePrecisionVal = Interface_Static::RVal("write.precision.val"); + myOldValues.WriteAssembly = (STEPCAFControl_ConfigurationNode::WriteMode_Assembly)Interface_Static::IVal("write.step.assembly"); + myOldValues.WriteSchema = (STEPCAFControl_ConfigurationNode::WriteMode_StepSchema)Interface_Static::IVal("write.step.schema"); + myOldValues.WriteTessellated = (STEPCAFControl_ConfigurationNode::RWMode_Tessellated)Interface_Static::IVal("write.step.tessellated"); + myOldValues.WriteProductName = Interface_Static::CVal("write.step.product.name"); + myOldValues.WriteSurfaceCurMode = Interface_Static::IVal("write.surfacecurve.mode") == 1; + myOldValues.WriteUnit = (UnitsMethods_LengthUnit)Interface_Static::IVal("write.step.unit"); + myOldValues.WriteResourceName = Interface_Static::CVal("write.resource.name"); + myOldValues.WriteSequence = Interface_Static::CVal("write.step.sequence"); + myOldValues.WriteVertexMode = (STEPCAFControl_ConfigurationNode::WriteMode_VertexMode)Interface_Static::IVal("write.step.vertex.mode"); + myOldValues.WriteSubshapeNames = Interface_Static::IVal("write.stepcaf.subshapes.name") == 1; + + // Set new values + setStatic(aNode->InternalParameters); +} + +//======================================================================= +// function : setStatic +// purpose : +//======================================================================= +void STEPCAFControl_Provider::setStatic(const STEPCAFControl_ConfigurationNode::STEPCAFControl_InternalSection theParameter) +{ + Interface_Static::SetIVal("read.iges.bspline.continuity", theParameter.ReadBSplineContinuity); + Interface_Static::SetIVal("read.precision.mode", theParameter.ReadPrecisionMode); + Interface_Static::SetRVal("read.precision.val", theParameter.ReadPrecisionVal); + Interface_Static::SetIVal("read.maxprecision.mode", theParameter.ReadMaxPrecisionMode); + Interface_Static::SetRVal("read.maxprecision.val", theParameter.ReadMaxPrecisionVal); + Interface_Static::SetIVal("read.stdsameparameter.mode", theParameter.ReadSameParamMode); + Interface_Static::SetIVal("read.surfacecurve.mode", theParameter.ReadSurfaceCurveMode); + Interface_Static::SetRVal("read.encoderegularity.angle", theParameter.EncodeRegAngle * M_PI / 180.0); + Interface_Static::SetIVal("step.angleunit.mode", theParameter.AngleUnit); + + Interface_Static::SetCVal("read.step.resource.name", theParameter.ReadResourceName.ToCString()); + Interface_Static::SetCVal("read.step.sequence", theParameter.ReadSequence.ToCString()); + Interface_Static::SetIVal("read.step.product.mode", theParameter.ReadProductMode); + Interface_Static::SetIVal("read.step.product.context", theParameter.ReadProductContext); + Interface_Static::SetIVal("read.step.shape.repr", theParameter.ReadShapeRepr); + Interface_Static::SetIVal("read.step.tessellated", theParameter.ReadTessellated); + Interface_Static::SetIVal("read.step.assembly.level", theParameter.ReadAssemblyLevel); + Interface_Static::SetIVal("read.step.shape.relationship", theParameter.ReadRelationship); + Interface_Static::SetIVal("read.step.shape.aspect", theParameter.ReadShapeAspect); + Interface_Static::SetIVal("read.step.constructivegeom.relationship", theParameter.ReadConstrRelation); + Interface_Static::SetIVal("read.stepcaf.subshapes.name", theParameter.ReadSubshapeNames); + Interface_Static::SetIVal("read.step.codepage", theParameter.ReadCodePage); + Interface_Static::SetIVal("read.step.nonmanifold", theParameter.ReadNonmanifold); + Interface_Static::SetIVal("read.step.ideas", theParameter.ReadIdeas); + Interface_Static::SetIVal("read.step.all.shapes", theParameter.ReadAllShapes); + Interface_Static::SetIVal("read.step.root.transformation", theParameter.ReadRootTransformation); + + Interface_Static::SetIVal("write.precision.mode", theParameter.WritePrecisionMode); + Interface_Static::SetRVal("write.precision.val", theParameter.WritePrecisionVal); + Interface_Static::SetIVal("write.step.assembly", theParameter.WriteAssembly); + Interface_Static::SetIVal("write.step.schema", theParameter.WriteSchema); + Interface_Static::SetIVal("write.step.tessellated", theParameter.WriteTessellated); + Interface_Static::SetCVal("write.step.product.name", theParameter.WriteProductName.ToCString()); + Interface_Static::SetIVal("write.surfacecurve.mode", theParameter.WriteSurfaceCurMode); + Interface_Static::SetIVal("write.step.unit", theParameter.WriteUnit); + Interface_Static::SetCVal("write.resource.name", theParameter.WriteResourceName.ToCString()); + Interface_Static::SetCVal("write.step.sequence", theParameter.WriteSequence.ToCString()); + Interface_Static::SetIVal("write.step.vertex.mode", theParameter.WriteVertexMode); + Interface_Static::SetIVal("write.stepcaf.subshapes.name", theParameter.WriteSubshapeNames); +} + +//======================================================================= +// function : resetStatic +// purpose : +//======================================================================= +void STEPCAFControl_Provider::resetStatic() +{ + setStatic(myOldValues); +} + +//======================================================================= +// function : Read +// purpose : +//======================================================================= +bool STEPCAFControl_Provider::Read(const TCollection_AsciiString& thePath, + const Handle(TDocStd_Document)& theDocument, + Handle(XSControl_WorkSession)& theWS, + const Message_ProgressRange& theProgress) +{ + if (theDocument.IsNull()) + { + Message::SendFail() << "Error in the STEPCAFControl_Provider during reading the file " << + thePath << "\t: theDocument shouldn't be null"; + return false; + } + if (GetNode().IsNull() || !GetNode()->IsKind(STANDARD_TYPE(STEPCAFControl_ConfigurationNode))) + { + Message::SendFail() << "Error in the STEPCAFControl_Provider during reading the file " << + thePath << "\t: Incorrect or empty Configuration Node"; + return false; + } + Handle(STEPCAFControl_ConfigurationNode) aNode = Handle(STEPCAFControl_ConfigurationNode)::DownCast(GetNode()); + initStatic(aNode); + + XCAFDoc_DocumentTool::SetLengthUnit(theDocument, aNode->GlobalParameters.LengthUnit, UnitsMethods_LengthUnit_Millimeter); + STEPCAFControl_Reader aReader; + if (!theWS.IsNull()) + { + aReader.Init(theWS); + } + aReader.SetColorMode(aNode->InternalParameters.ReadColor); + aReader.SetNameMode(aNode->InternalParameters.ReadName); + aReader.SetLayerMode(aNode->InternalParameters.ReadLayer); + aReader.SetPropsMode(aNode->InternalParameters.ReadProps); + + IFSelect_ReturnStatus aReadStat = IFSelect_RetVoid; + aReadStat = aReader.ReadFile(thePath.ToCString()); + if (aReadStat != IFSelect_RetDone) + { + Message::SendFail() << "Error in the STEPCAFControl_Provider during reading the file " << + thePath << "\t: abandon"; + resetStatic(); + return false; + } + + if (!aReader.Transfer(theDocument, theProgress)) + { + Message::SendFail() << "Error in the STEPCAFControl_Provider during reading the file " << + thePath << "\t: Cannot read any relevant data from the STEP file"; + resetStatic(); + return false; + } + resetStatic(); + return true; +} + +//======================================================================= +// function : Write +// purpose : +//======================================================================= +bool STEPCAFControl_Provider::Write(const TCollection_AsciiString& thePath, + const Handle(TDocStd_Document)& theDocument, + Handle(XSControl_WorkSession)& theWS, + const Message_ProgressRange& theProgress) +{ + if (GetNode().IsNull() || !GetNode()->IsKind(STANDARD_TYPE(STEPCAFControl_ConfigurationNode))) + { + Message::SendFail() << "Error in the STEPCAFControl_Provider during writing the file " << + thePath << "\t: Incorrect or empty Configuration Node"; + return false; + } + Handle(STEPCAFControl_ConfigurationNode) aNode = Handle(STEPCAFControl_ConfigurationNode)::DownCast(GetNode()); + initStatic(aNode); + + XCAFDoc_DocumentTool::SetLengthUnit(theDocument, + UnitsMethods::GetLengthUnitScale(aNode->InternalParameters.WriteUnit, UnitsMethods_LengthUnit_Millimeter), + UnitsMethods_LengthUnit_Millimeter); + STEPCAFControl_Writer aWriter; + if (!theWS.IsNull()) + { + aWriter.Init(theWS); + } + STEPControl_StepModelType aMode = static_cast(aNode->InternalParameters.WriteModelType); + aWriter.SetColorMode(aNode->InternalParameters.WriteColor); + aWriter.SetNameMode(aNode->InternalParameters.WriteName); + aWriter.SetLayerMode(aNode->InternalParameters.WriteLayer); + aWriter.SetPropsMode(aNode->InternalParameters.WriteProps); + + TDF_Label aLabel; + + if (!aWriter.Transfer(theDocument, aMode, 0, theProgress)) + { + Message::SendFail() << "Error in the STEPCAFControl_Provider during writing the file " << + thePath << "\t: The document cannot be translated or gives no result"; + resetStatic(); + return false; + } + IFSelect_ReturnStatus aStatus = aWriter.Write(thePath.ToCString()); + switch (aStatus) + { + case IFSelect_RetVoid: + { + Message::SendFail() << "Error in the STEPCAFControl_Provider during writing the file " << + thePath << "\t: No file written"; + resetStatic(); + return false;; + } + case IFSelect_RetDone: + { + break; + } + default: + { + Message::SendFail() << "Error in the STEPCAFControl_Provider during writing the file " << + thePath << "\t: Error on writing file"; + resetStatic(); + return false; + } + } + resetStatic(); + return true; +} + +//======================================================================= +// function : Read +// purpose : +//======================================================================= +bool STEPCAFControl_Provider::Read(const TCollection_AsciiString& thePath, + const Handle(TDocStd_Document)& theDocument, + const Message_ProgressRange& theProgress) +{ + Handle(XSControl_WorkSession) aWS; + return Read(thePath, theDocument, aWS, theProgress); +} + +//======================================================================= +// function : Write +// purpose : +//======================================================================= +bool STEPCAFControl_Provider::Write(const TCollection_AsciiString& thePath, + const Handle(TDocStd_Document)& theDocument, + const Message_ProgressRange& theProgress) +{ + Handle(XSControl_WorkSession) aWS; + return Write(thePath, theDocument, aWS, theProgress); +} + +//======================================================================= +// function : Read +// purpose : +//======================================================================= +bool STEPCAFControl_Provider::Read(const TCollection_AsciiString& thePath, + TopoDS_Shape& theShape, + Handle(XSControl_WorkSession)& theWS, + const Message_ProgressRange& theProgress) +{ + (void)theProgress; + if (GetNode().IsNull() || !GetNode()->IsKind(STANDARD_TYPE(STEPCAFControl_ConfigurationNode))) + { + Message::SendFail() << "Error in the STEPCAFControl_Provider during reading the file " << + thePath << "\t: Incorrect or empty Configuration Node"; + return false; + } + Handle(STEPCAFControl_ConfigurationNode) aNode = Handle(STEPCAFControl_ConfigurationNode)::DownCast(GetNode()); + initStatic(aNode); + STEPControl_Reader aReader; + if(!theWS.IsNull()) + { + aReader.SetWS(theWS); + } + IFSelect_ReturnStatus aReadstat = IFSelect_RetVoid; + aReadstat = aReader.ReadFile(thePath.ToCString()); + if (aReadstat != IFSelect_RetDone) + { + Message::SendFail() << "Error in the STEPCAFControl_Provider during reading the file " << + thePath << "\t: abandon, no model loaded"; + resetStatic(); + return false; + } + Handle(StepData_StepModel) aModel = Handle(StepData_StepModel)::DownCast(aReader.Model()); + aModel->SetLocalLengthUnit(aNode->GlobalParameters.LengthUnit); + if (aReader.TransferRoots() <= 0) + { + Message::SendFail() << "Error in the STEPCAFControl_Provider during reading the file " << + thePath << "\t:Cannot read any relevant data from the STEP file"; + resetStatic(); + return false; + } + theShape = aReader.OneShape(); + resetStatic(); + return true; +} + +//======================================================================= +// function : Write +// purpose : +//======================================================================= +bool STEPCAFControl_Provider::Write(const TCollection_AsciiString& thePath, + const TopoDS_Shape& theShape, + Handle(XSControl_WorkSession)& theWS, + const Message_ProgressRange& theProgress) +{ + if (GetNode().IsNull() || !GetNode()->IsKind(STANDARD_TYPE(STEPCAFControl_ConfigurationNode))) + { + Message::SendFail() << "Error in the STEPCAFControl_Provider during reading the file " << + thePath << "\t: Incorrect or empty Configuration Node"; + return false; + } + Handle(STEPCAFControl_ConfigurationNode) aNode = Handle(STEPCAFControl_ConfigurationNode)::DownCast(GetNode()); + initStatic(aNode); + + STEPControl_Writer aWriter; + if(!theWS.IsNull()) + { + aWriter.SetWS(theWS); + } + IFSelect_ReturnStatus aWritestat = IFSelect_RetVoid; + Handle(StepData_StepModel) aModel = aWriter.Model(); + aModel->SetWriteLengthUnit(UnitsMethods::GetLengthUnitScale(aNode->InternalParameters.WriteUnit, UnitsMethods_LengthUnit_Millimeter)); + aWritestat = aWriter.Transfer(theShape, aNode->InternalParameters.WriteModelType, true, theProgress); + if (aWritestat != IFSelect_RetDone) + { + Message::SendFail() << "Error in the STEPCAFControl_Provider during reading the file " << + thePath << "\t: abandon, no model loaded"; + resetStatic(); + return false; + } + if (aWriter.Write(thePath.ToCString()) != IFSelect_RetDone) + { + Message::SendFail() << "STEPCAFControl_Provider: Error on writing file"; + resetStatic(); + return false; + } + resetStatic(); + return true; +} + +//======================================================================= +// function : Read +// purpose : +//======================================================================= +bool STEPCAFControl_Provider::Read(const TCollection_AsciiString& thePath, + TopoDS_Shape& theShape, + const Message_ProgressRange& theProgress) +{ + Handle(XSControl_WorkSession) aWS; + return Read(thePath, theShape, aWS, theProgress); +} + +//======================================================================= +// function : Write +// purpose : +//======================================================================= +bool STEPCAFControl_Provider::Write(const TCollection_AsciiString& thePath, + const TopoDS_Shape& theShape, + const Message_ProgressRange& theProgress) +{ + Handle(XSControl_WorkSession) aWS; + return Write(thePath, theShape, aWS, theProgress); +} + +//======================================================================= +// function : GetFormat +// purpose : +//======================================================================= +TCollection_AsciiString STEPCAFControl_Provider::GetFormat() const +{ + return TCollection_AsciiString("STEP"); +} + +//======================================================================= +// function : GetVendor +// purpose : +//======================================================================= +TCollection_AsciiString STEPCAFControl_Provider::GetVendor() const +{ + return TCollection_AsciiString("OCC"); +} diff --git a/src/STEPCAFControl/STEPCAFControl_Provider.hxx b/src/STEPCAFControl/STEPCAFControl_Provider.hxx new file mode 100644 index 0000000000..fb468efafa --- /dev/null +++ b/src/STEPCAFControl/STEPCAFControl_Provider.hxx @@ -0,0 +1,151 @@ +// Copyright (c) 2022 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 _STEPCAFControl_Provider_HeaderFile +#define _STEPCAFControl_Provider_HeaderFile + +#include +#include + +//! The class to transfer STEP files. +//! Reads and Writes any STEP files into/from OCCT. +//! Each operation needs configuration node. +//! +//! Providers grouped by Vendor name and Format type. +//! The Vendor name is "OCC" +//! The Format type is "STEP" +//! The import process is supported. +//! The export process is supported. +class STEPCAFControl_Provider : public DE_Provider +{ +public: + DEFINE_STANDARD_RTTIEXT(STEPCAFControl_Provider, DE_Provider) + +public: + + //! Default constructor + //! Configure translation process with global configuration + Standard_EXPORT STEPCAFControl_Provider(); + + //! Configure translation process + //! @param[in] theNode object to copy + Standard_EXPORT STEPCAFControl_Provider(const Handle(DE_ConfigurationNode)& theNode); + +public: + + //! Reads a CAD file, according internal configuration + //! @param[in] thePath path to the import CAD file + //! @param[out] theDocument document to save result + //! @param[in] theWS current work session + //! @param theProgress[in] progress indicator + //! @return true if Read operation has ended correctly + Standard_EXPORT virtual bool Read(const TCollection_AsciiString& thePath, + const Handle(TDocStd_Document)& theDocument, + Handle(XSControl_WorkSession)& theWS, + const Message_ProgressRange& theProgress = Message_ProgressRange()) Standard_OVERRIDE; + + //! Writes a CAD file, according internal configuration + //! @param[in] thePath path to the export CAD file + //! @param[out] theDocument document to export + //! @param[in] theWS current work session + //! @param theProgress[in] progress indicator + //! @return true if Write operation has ended correctly + Standard_EXPORT virtual bool Write(const TCollection_AsciiString& thePath, + const Handle(TDocStd_Document)& theDocument, + Handle(XSControl_WorkSession)& theWS, + const Message_ProgressRange& theProgress = Message_ProgressRange()) Standard_OVERRIDE; + + //! Reads a CAD file, according internal configuration + //! @param[in] thePath path to the import CAD file + //! @param[out] theDocument document to save result + //! @param theProgress[in] progress indicator + //! @return true if Read operation has ended correctly + Standard_EXPORT virtual bool Read(const TCollection_AsciiString& thePath, + const Handle(TDocStd_Document)& theDocument, + const Message_ProgressRange& theProgress = Message_ProgressRange()) Standard_OVERRIDE; + + //! Writes a CAD file, according internal configuration + //! @param[in] thePath path to the export CAD file + //! @param[out] theDocument document to export + //! @param theProgress[in] progress indicator + //! @return true if Write operation has ended correctly + Standard_EXPORT virtual bool Write(const TCollection_AsciiString& thePath, + const Handle(TDocStd_Document)& theDocument, + const Message_ProgressRange& theProgress = Message_ProgressRange()) Standard_OVERRIDE; + + //! Reads a CAD file, according internal configuration + //! @param[in] thePath path to the import CAD file + //! @param[out] theShape shape to save result + //! @param[in] theWS current work session + //! @param theProgress[in] progress indicator + //! @return true if Read operation has ended correctly + Standard_EXPORT virtual bool Read(const TCollection_AsciiString& thePath, + TopoDS_Shape& theShape, + Handle(XSControl_WorkSession)& theWS, + const Message_ProgressRange& theProgress = Message_ProgressRange()) Standard_OVERRIDE; + + //! Writes a CAD file, according internal configuration + //! @param[in] thePath path to the export CAD file + //! @param[out] theShape shape to export + //! @param[in] theWS current work session + //! @param theProgress[in] progress indicator + //! @return true if Write operation has ended correctly + Standard_EXPORT virtual bool Write(const TCollection_AsciiString& thePath, + const TopoDS_Shape& theShape, + Handle(XSControl_WorkSession)& theWS, + const Message_ProgressRange& theProgress = Message_ProgressRange()) Standard_OVERRIDE; + + //! Reads a CAD file, according internal configuration + //! @param[in] thePath path to the import CAD file + //! @param[out] theShape shape to save result + //! @param theProgress[in] progress indicator + //! @return true if Read operation has ended correctly + Standard_EXPORT virtual bool Read(const TCollection_AsciiString& thePath, + TopoDS_Shape& theShape, + const Message_ProgressRange& theProgress = Message_ProgressRange()) Standard_OVERRIDE; + + //! Writes a CAD file, according internal configuration + //! @param[in] thePath path to the export CAD file + //! @param[out] theShape shape to export + //! @param theProgress[in] progress indicator + //! @return true if Write operation has ended correctly + Standard_EXPORT virtual bool Write(const TCollection_AsciiString& thePath, + const TopoDS_Shape& theShape, + const Message_ProgressRange& theProgress = Message_ProgressRange()) Standard_OVERRIDE; + +public: + + //! Gets CAD format name of associated provider + //! @return provider CAD format + Standard_EXPORT virtual TCollection_AsciiString GetFormat() const Standard_OVERRIDE; + + //! Gets provider's vendor name of associated provider + //! @return provider's vendor name + Standard_EXPORT virtual TCollection_AsciiString GetVendor() const Standard_OVERRIDE; + + private: + + //! Initialize static variables + void initStatic(const Handle(DE_ConfigurationNode)& theNode); + + //! Initialize static variables + void setStatic(const STEPCAFControl_ConfigurationNode::STEPCAFControl_InternalSection theParameter); + + //! Reset used interface static variables + void resetStatic(); + + STEPCAFControl_ConfigurationNode::STEPCAFControl_InternalSection myOldValues; + +}; + +#endif // _STEPCAFControl_Provider_HeaderFile diff --git a/src/STEPCAFControl/STEPCAFControl_Reader.cxx b/src/STEPCAFControl/STEPCAFControl_Reader.cxx index 300a0c1ce6..cdefa06fa7 100644 --- a/src/STEPCAFControl/STEPCAFControl_Reader.cxx +++ b/src/STEPCAFControl/STEPCAFControl_Reader.cxx @@ -362,7 +362,7 @@ Standard_Integer STEPCAFControl_Reader::NbRootsForTransfer() //======================================================================= Standard_Boolean STEPCAFControl_Reader::TransferOneRoot (const Standard_Integer num, - Handle(TDocStd_Document) &doc, + const Handle(TDocStd_Document) &doc, const Message_ProgressRange& theProgress) { TDF_LabelSequence Lseq; @@ -375,7 +375,7 @@ Standard_Boolean STEPCAFControl_Reader::TransferOneRoot (const Standard_Integer //purpose : //======================================================================= -Standard_Boolean STEPCAFControl_Reader::Transfer (Handle(TDocStd_Document) &doc, +Standard_Boolean STEPCAFControl_Reader::Transfer (const Handle(TDocStd_Document) &doc, const Message_ProgressRange& theProgress) { TDF_LabelSequence Lseq; @@ -389,7 +389,7 @@ Standard_Boolean STEPCAFControl_Reader::Transfer (Handle(TDocStd_Document) &doc, //======================================================================= Standard_Boolean STEPCAFControl_Reader::Perform (const Standard_CString filename, - Handle(TDocStd_Document) &doc, + const Handle(TDocStd_Document) &doc, const Message_ProgressRange& theProgress) { if (ReadFile (filename) != IFSelect_RetDone) @@ -406,7 +406,7 @@ Standard_Boolean STEPCAFControl_Reader::Perform (const Standard_CString filename //======================================================================= Standard_Boolean STEPCAFControl_Reader::Perform (const TCollection_AsciiString &filename, - Handle(TDocStd_Document) &doc, + const Handle(TDocStd_Document) &doc, const Message_ProgressRange& theProgress) { if ( ReadFile (filename.ToCString()) != IFSelect_RetDone) @@ -507,7 +507,7 @@ void STEPCAFControl_Reader::prepareUnits(const Handle(StepData_StepModel)& theMo Standard_Boolean STEPCAFControl_Reader::Transfer (STEPControl_Reader &reader, const Standard_Integer nroot, - Handle(TDocStd_Document) &doc, + const Handle(TDocStd_Document) &doc, TDF_LabelSequence &Lseq, const Standard_Boolean asOne, const Message_ProgressRange& theProgress) @@ -828,7 +828,7 @@ TDF_Label STEPCAFControl_Reader::AddShape(const TopoDS_Shape &S, Handle(STEPCAFControl_ExternFile) STEPCAFControl_Reader::ReadExternFile (const Standard_CString file, const Standard_CString fullname, - Handle(TDocStd_Document)& doc, + const Handle(TDocStd_Document)& doc, const Message_ProgressRange& theProgress) { // if the file is already read, associate it with SDR @@ -935,7 +935,7 @@ static void propagateColorToParts(const Handle(XCAFDoc_ShapeTool)& theSTool, //======================================================================= Standard_Boolean STEPCAFControl_Reader::ReadColors(const Handle(XSControl_WorkSession) &WS, - Handle(TDocStd_Document)& Doc) const + const Handle(TDocStd_Document)& Doc) const { STEPConstruct_Styles Styles(WS); if (!Styles.LoadStyles()) { @@ -1183,8 +1183,8 @@ TDF_Label STEPCAFControl_Reader::FindInstance(const Handle(StepRepr_NextAssembly //======================================================================= Standard_Boolean STEPCAFControl_Reader::ReadNames(const Handle(XSControl_WorkSession) &WS, - Handle(TDocStd_Document)& Doc, - const STEPCAFControl_DataMapOfPDExternFile &PDFileMap) const + const Handle(TDocStd_Document)& Doc, + const STEPCAFControl_DataMapOfPDExternFile& PDFileMap) const { // get starting data const Handle(Interface_InterfaceModel) &Model = WS->Model(); @@ -1293,8 +1293,8 @@ static TDF_Label GetLabelFromPD(const Handle(StepBasic_ProductDefinition) &PD, //======================================================================= Standard_Boolean STEPCAFControl_Reader::ReadValProps(const Handle(XSControl_WorkSession) &WS, - Handle(TDocStd_Document)& Doc, - const STEPCAFControl_DataMapOfPDExternFile &PDFileMap) const + const Handle(TDocStd_Document)& Doc, + const STEPCAFControl_DataMapOfPDExternFile& PDFileMap) const { // get starting data const Handle(XSControl_TransferReader) &TR = WS->TransferReader(); @@ -1425,7 +1425,7 @@ Standard_Boolean STEPCAFControl_Reader::ReadValProps(const Handle(XSControl_Work //======================================================================= Standard_Boolean STEPCAFControl_Reader::ReadLayers(const Handle(XSControl_WorkSession) &WS, - Handle(TDocStd_Document)& Doc) const + const Handle(TDocStd_Document)& Doc) const { const Handle(Interface_InterfaceModel) &Model = WS->Model(); const Handle(XSControl_TransferReader) &TR = WS->TransferReader(); @@ -1596,8 +1596,8 @@ static TDF_Label setSHUOintoDoc(const Handle(XSControl_WorkSession) &WS, //======================================================================= Standard_Boolean STEPCAFControl_Reader::ReadSHUOs(const Handle(XSControl_WorkSession) &WS, - Handle(TDocStd_Document)& Doc, - const STEPCAFControl_DataMapOfPDExternFile &PDFileMap) const + const Handle(TDocStd_Document)& Doc, + const STEPCAFControl_DataMapOfPDExternFile& PDFileMap) const { // the big part code duplication from ReadColors. // It is possible to share this code functionality, just to decide how ??? @@ -3890,7 +3890,7 @@ static void setGeomTolObjectToXCAF(const Handle(Standard_Transient)& theEnt, //======================================================================= Standard_Boolean STEPCAFControl_Reader::ReadGDTs(const Handle(XSControl_WorkSession)& theWS, - Handle(TDocStd_Document)& theDoc) + const Handle(TDocStd_Document)& theDoc) { const Handle(Interface_InterfaceModel) &aModel = theWS->Model(); const Interface_Graph& aGraph = theWS->Graph(); @@ -4100,8 +4100,8 @@ static Handle(StepShape_SolidModel) FindSolidForPDS(const Handle(StepRepr_Produc //======================================================================= Standard_Boolean STEPCAFControl_Reader::ReadMaterials(const Handle(XSControl_WorkSession) &WS, - Handle(TDocStd_Document)& Doc, - const Handle(TColStd_HSequenceOfTransient) &SeqPDS) const + const Handle(TDocStd_Document)& Doc, + const Handle(TColStd_HSequenceOfTransient)& SeqPDS) const { const Handle(XSControl_TransferReader) &TR = WS->TransferReader(); const Handle(Transfer_TransientProcess) &TP = TR->TransientProcess(); @@ -4323,7 +4323,7 @@ Handle(TCollection_HAsciiString) buildClippingPlanes(const Handle(StepGeom_Geome //function : ReadViews //purpose : //======================================================================= -Standard_Boolean STEPCAFControl_Reader::ReadViews(const Handle(XSControl_WorkSession)& theWS, Handle(TDocStd_Document)& theDoc) const +Standard_Boolean STEPCAFControl_Reader::ReadViews(const Handle(XSControl_WorkSession)& theWS, const Handle(TDocStd_Document)& theDoc) const { const Handle(Interface_InterfaceModel) &aModel = theWS->Model(); Handle(XCAFDoc_ShapeTool) aSTool = XCAFDoc_DocumentTool::ShapeTool(theDoc->Main()); diff --git a/src/STEPCAFControl/STEPCAFControl_Reader.hxx b/src/STEPCAFControl/STEPCAFControl_Reader.hxx index 35c7632c39..a32197d168 100644 --- a/src/STEPCAFControl/STEPCAFControl_Reader.hxx +++ b/src/STEPCAFControl/STEPCAFControl_Reader.hxx @@ -86,23 +86,23 @@ public: //! Returns True if succeeded, and False in case of fail //! Provided for use like single-file reader Standard_EXPORT Standard_Boolean TransferOneRoot (const Standard_Integer num, - Handle(TDocStd_Document)& doc, + const Handle(TDocStd_Document)& doc, const Message_ProgressRange& theProgress = Message_ProgressRange()); //! Translates currently loaded STEP file into the document //! Returns True if succeeded, and False in case of fail //! Provided for use like single-file reader - Standard_EXPORT Standard_Boolean Transfer (Handle(TDocStd_Document)& doc, + Standard_EXPORT Standard_Boolean Transfer (const Handle(TDocStd_Document)& doc, const Message_ProgressRange& theProgress = Message_ProgressRange()); Standard_EXPORT Standard_Boolean Perform (const TCollection_AsciiString& filename, - Handle(TDocStd_Document)& doc, + const Handle(TDocStd_Document)& doc, const Message_ProgressRange& theProgress = Message_ProgressRange()); //! Translate STEP file given by filename into the document //! Return True if succeeded, and False in case of fail Standard_EXPORT Standard_Boolean Perform (const Standard_CString filename, - Handle(TDocStd_Document)& doc, + const Handle(TDocStd_Document)& doc, const Message_ProgressRange& theProgress = Message_ProgressRange()); //! Returns data on external files @@ -181,7 +181,7 @@ protected: //! them into assembly. Fills sequence of produced labels Standard_EXPORT Standard_Boolean Transfer (STEPControl_Reader& rd, const Standard_Integer num, - Handle(TDocStd_Document)& doc, + const Handle(TDocStd_Document)& doc, TDF_LabelSequence& Lseq, const Standard_Boolean asOne = Standard_False, const Message_ProgressRange& theProgress = Message_ProgressRange()); @@ -196,42 +196,42 @@ protected: //! given name Standard_EXPORT Handle(STEPCAFControl_ExternFile) ReadExternFile (const Standard_CString file, const Standard_CString fullpath, - Handle(TDocStd_Document)& doc, + const Handle(TDocStd_Document)& doc, const Message_ProgressRange& theProgress = Message_ProgressRange()); //! Reads style assignments from STEP model and sets //! corresponding color assignments in the DECAF document Standard_EXPORT Standard_Boolean ReadColors (const Handle(XSControl_WorkSession)& WS, - Handle(TDocStd_Document)& doc) const; + const Handle(TDocStd_Document)& doc) const; //! Reads names of parts defined in the STEP model and //! assigns them to corresponding labels in the DECAF document - Standard_EXPORT Standard_Boolean ReadNames (const Handle(XSControl_WorkSession)& WS, Handle(TDocStd_Document)& doc, const STEPCAFControl_DataMapOfPDExternFile& PDFileMap) const; + Standard_EXPORT Standard_Boolean ReadNames (const Handle(XSControl_WorkSession)& WS, const Handle(TDocStd_Document)& doc, const STEPCAFControl_DataMapOfPDExternFile& PDFileMap) const; //! Reads validation properties assigned to shapes in the STEP //! model and assigns them to corresponding labels in the DECAF //! document - Standard_EXPORT Standard_Boolean ReadValProps (const Handle(XSControl_WorkSession)& WS, Handle(TDocStd_Document)& doc, const STEPCAFControl_DataMapOfPDExternFile& PDFileMap) const; + Standard_EXPORT Standard_Boolean ReadValProps (const Handle(XSControl_WorkSession)& WS, const Handle(TDocStd_Document)& doc, const STEPCAFControl_DataMapOfPDExternFile& PDFileMap) const; //! Reads layers of parts defined in the STEP model and //! set reference between shape and layers in the DECAF document - Standard_EXPORT Standard_Boolean ReadLayers (const Handle(XSControl_WorkSession)& WS, Handle(TDocStd_Document)& doc) const; + Standard_EXPORT Standard_Boolean ReadLayers (const Handle(XSControl_WorkSession)& WS, const Handle(TDocStd_Document)& doc) const; //! Reads SHUO for instances defined in the STEP model and //! set reference between shape instances from different assemblyes - Standard_EXPORT Standard_Boolean ReadSHUOs (const Handle(XSControl_WorkSession)& WS, Handle(TDocStd_Document)& doc, const STEPCAFControl_DataMapOfPDExternFile& PDFileMap) const; + Standard_EXPORT Standard_Boolean ReadSHUOs (const Handle(XSControl_WorkSession)& WS, const Handle(TDocStd_Document)& doc, const STEPCAFControl_DataMapOfPDExternFile& PDFileMap) const; //! Reads D> for instances defined in the STEP model and //! set reference between shape instances from different assemblyes - Standard_EXPORT Standard_Boolean ReadGDTs (const Handle(XSControl_WorkSession)& WS, Handle(TDocStd_Document)& doc); + Standard_EXPORT Standard_Boolean ReadGDTs (const Handle(XSControl_WorkSession)& WS, const Handle(TDocStd_Document)& doc); //! Reads materials for instances defined in the STEP model and //! set reference between shape instances from different assemblyes - Standard_EXPORT Standard_Boolean ReadMaterials (const Handle(XSControl_WorkSession)& WS, Handle(TDocStd_Document)& doc, const Handle(TColStd_HSequenceOfTransient)& SeqPDS) const; + Standard_EXPORT Standard_Boolean ReadMaterials (const Handle(XSControl_WorkSession)& WS, const Handle(TDocStd_Document)& doc, const Handle(TColStd_HSequenceOfTransient)& SeqPDS) const; //! Reads Views for instances defined in the STEP model - Standard_EXPORT Standard_Boolean ReadViews(const Handle(XSControl_WorkSession)& theWS, Handle(TDocStd_Document)& theDoc) const; + Standard_EXPORT Standard_Boolean ReadViews(const Handle(XSControl_WorkSession)& theWS, const Handle(TDocStd_Document)& theDoc) const; //! Populates the sub-Label of the passed TDF Label with shape //! data associated with the given STEP Representation Item, diff --git a/src/STEPControl/STEPControl_Controller.cxx b/src/STEPControl/STEPControl_Controller.cxx index 3e856b1666..2408e2c67a 100644 --- a/src/STEPControl/STEPControl_Controller.cxx +++ b/src/STEPControl/STEPControl_Controller.cxx @@ -216,31 +216,31 @@ STEPControl_Controller::STEPControl_Controller () // Note: the numbers should be consistent with Resource_FormatType enumeration Interface_Static::Init("step", "read.step.codepage", 'e', ""); Interface_Static::Init("step", "read.step.codepage", '&', "enum 0"); - Interface_Static::Init("step", "read.step.codepage", '&', "eval SJIS"); // Resource_FormatType_SJIS - Interface_Static::Init("step", "read.step.codepage", '&', "eval EUC"); // Resource_FormatType_EUC - Interface_Static::Init("step", "read.step.codepage", '&', "eval NoConversion"); // Resource_FormatType_NoConversion - Interface_Static::Init("step", "read.step.codepage", '&', "eval GB"); // Resource_FormatType_GB - Interface_Static::Init("step", "read.step.codepage", '&', "eval UTF8"); // Resource_FormatType_UTF8 - Interface_Static::Init("step", "read.step.codepage", '&', "eval SystemLocale"); // Resource_FormatType_SystemLocale - Interface_Static::Init("step", "read.step.codepage", '&', "eval CP1250"); // Resource_FormatType_CP1250 - Interface_Static::Init("step", "read.step.codepage", '&', "eval CP1251"); // Resource_FormatType_CP1251 - Interface_Static::Init("step", "read.step.codepage", '&', "eval CP1252"); // Resource_FormatType_CP1252 - Interface_Static::Init("step", "read.step.codepage", '&', "eval CP1253"); // Resource_FormatType_CP1253 - Interface_Static::Init("step", "read.step.codepage", '&', "eval CP1254"); // Resource_FormatType_CP1254 - Interface_Static::Init("step", "read.step.codepage", '&', "eval CP1255"); // Resource_FormatType_CP1255 - Interface_Static::Init("step", "read.step.codepage", '&', "eval CP1256"); // Resource_FormatType_CP1256 - Interface_Static::Init("step", "read.step.codepage", '&', "eval CP1257"); // Resource_FormatType_CP1257 - Interface_Static::Init("step", "read.step.codepage", '&', "eval CP1258"); // Resource_FormatType_CP1258 - Interface_Static::Init("step", "read.step.codepage", '&', "eval iso8859-1"); // Resource_FormatType_iso8859_1 - Interface_Static::Init("step", "read.step.codepage", '&', "eval iso8859-2"); // Resource_FormatType_iso8859_2 - Interface_Static::Init("step", "read.step.codepage", '&', "eval iso8859-3"); // Resource_FormatType_iso8859_3 - Interface_Static::Init("step", "read.step.codepage", '&', "eval iso8859-4"); // Resource_FormatType_iso8859_4 - Interface_Static::Init("step", "read.step.codepage", '&', "eval iso8859-5"); // Resource_FormatType_iso8859_5 - Interface_Static::Init("step", "read.step.codepage", '&', "eval iso8859-6"); // Resource_FormatType_iso8859_6 - Interface_Static::Init("step", "read.step.codepage", '&', "eval iso8859-7"); // Resource_FormatType_iso8859_7 - Interface_Static::Init("step", "read.step.codepage", '&', "eval iso8859-8"); // Resource_FormatType_iso8859_8 - Interface_Static::Init("step", "read.step.codepage", '&', "eval iso8859-9"); // Resource_FormatType_iso8859_9 - Interface_Static::Init("step", "read.step.codepage", '&', "eval CP850"); // Resource_FormatType_CP850 + Interface_Static::Init("step", "read.step.codepage", '&', "eval SJIS"); // Resource_FormatType_SJIS 0 + Interface_Static::Init("step", "read.step.codepage", '&', "eval EUC"); // Resource_FormatType_EUC 1 + Interface_Static::Init("step", "read.step.codepage", '&', "eval NoConversion"); // Resource_FormatType_NoConversion 2 + Interface_Static::Init("step", "read.step.codepage", '&', "eval GB"); // Resource_FormatType_GB 3 + Interface_Static::Init("step", "read.step.codepage", '&', "eval UTF8"); // Resource_FormatType_UTF8 4 + Interface_Static::Init("step", "read.step.codepage", '&', "eval SystemLocale"); // Resource_FormatType_SystemLocale 5 + Interface_Static::Init("step", "read.step.codepage", '&', "eval CP1250"); // Resource_FormatType_CP1250 6 + Interface_Static::Init("step", "read.step.codepage", '&', "eval CP1251"); // Resource_FormatType_CP1251 7 + Interface_Static::Init("step", "read.step.codepage", '&', "eval CP1252"); // Resource_FormatType_CP1252 8 + Interface_Static::Init("step", "read.step.codepage", '&', "eval CP1253"); // Resource_FormatType_CP1253 9 + Interface_Static::Init("step", "read.step.codepage", '&', "eval CP1254"); // Resource_FormatType_CP1254 10 + Interface_Static::Init("step", "read.step.codepage", '&', "eval CP1255"); // Resource_FormatType_CP1255 11 + Interface_Static::Init("step", "read.step.codepage", '&', "eval CP1256"); // Resource_FormatType_CP1256 12 + Interface_Static::Init("step", "read.step.codepage", '&', "eval CP1257"); // Resource_FormatType_CP1257 13 + Interface_Static::Init("step", "read.step.codepage", '&', "eval CP1258"); // Resource_FormatType_CP1258 14 + Interface_Static::Init("step", "read.step.codepage", '&', "eval iso8859-1"); // Resource_FormatType_iso8859_1 15 + Interface_Static::Init("step", "read.step.codepage", '&', "eval iso8859-2"); // Resource_FormatType_iso8859_2 16 + Interface_Static::Init("step", "read.step.codepage", '&', "eval iso8859-3"); // Resource_FormatType_iso8859_3 17 + Interface_Static::Init("step", "read.step.codepage", '&', "eval iso8859-4"); // Resource_FormatType_iso8859_4 18 + Interface_Static::Init("step", "read.step.codepage", '&', "eval iso8859-5"); // Resource_FormatType_iso8859_5 19 + Interface_Static::Init("step", "read.step.codepage", '&', "eval iso8859-6"); // Resource_FormatType_iso8859_6 20 + Interface_Static::Init("step", "read.step.codepage", '&', "eval iso8859-7"); // Resource_FormatType_iso8859_7 21 + Interface_Static::Init("step", "read.step.codepage", '&', "eval iso8859-8"); // Resource_FormatType_iso8859_8 22 + Interface_Static::Init("step", "read.step.codepage", '&', "eval iso8859-9"); // Resource_FormatType_iso8859_9 23 + Interface_Static::Init("step", "read.step.codepage", '&', "eval CP850"); // Resource_FormatType_CP850 24 Interface_Static::SetCVal("read.step.codepage", "UTF8"); // Tessellated geometry reading: Off by default diff --git a/src/TKRWMesh/EXTERNLIB b/src/TKRWMesh/EXTERNLIB index b1331b6af3..3807a923bc 100644 --- a/src/TKRWMesh/EXTERNLIB +++ b/src/TKRWMesh/EXTERNLIB @@ -1,3 +1,4 @@ +TKBinXCAF TKernel TKMath TKMesh @@ -6,6 +7,7 @@ TKLCAF TKV3d TKBRep TKG3d +TKXDE TKService CSF_RapidJSON CSF_Draco diff --git a/src/TKSTL/EXTERNLIB b/src/TKSTL/EXTERNLIB index 4f723a0887..d1d1380f02 100755 --- a/src/TKSTL/EXTERNLIB +++ b/src/TKSTL/EXTERNLIB @@ -1,6 +1,10 @@ +TKBinXCAF +TKXDE TKernel TKMath TKBRep TKG2d TKG3d TKTopAlgo +TKLCAF +TKXCAF diff --git a/src/TKVRML/EXTERNLIB b/src/TKVRML/EXTERNLIB index b659b109c8..c2679194b5 100755 --- a/src/TKVRML/EXTERNLIB +++ b/src/TKVRML/EXTERNLIB @@ -1,4 +1,6 @@ +TKBinXCAF TKBRep +TKXDE TKTopAlgo TKMath TKGeomBase @@ -13,3 +15,4 @@ TKGeomAlgo TKV3d TKLCAF TKXCAF +TKXSBase diff --git a/src/TKXDE/CMakeLists.txt b/src/TKXDE/CMakeLists.txt new file mode 100644 index 0000000000..40ac508025 --- /dev/null +++ b/src/TKXDE/CMakeLists.txt @@ -0,0 +1,3 @@ +project(TKXDE) + +OCCT_INCLUDE_CMAKE_FILE (adm/cmake/occt_toolkit) diff --git a/src/TKXDE/EXTERNLIB b/src/TKXDE/EXTERNLIB new file mode 100644 index 0000000000..58c24f0d95 --- /dev/null +++ b/src/TKXDE/EXTERNLIB @@ -0,0 +1 @@ +TKernel diff --git a/src/TKXDE/FILES b/src/TKXDE/FILES new file mode 100644 index 0000000000..ca4f0e567b --- /dev/null +++ b/src/TKXDE/FILES @@ -0,0 +1,2 @@ +EXTERNLIB +PACKAGES diff --git a/src/TKXDE/PACKAGES b/src/TKXDE/PACKAGES new file mode 100644 index 0000000000..e5d15ddaef --- /dev/null +++ b/src/TKXDE/PACKAGES @@ -0,0 +1 @@ +DE diff --git a/src/TKXDECascade/CMakeLists.txt b/src/TKXDECascade/CMakeLists.txt new file mode 100644 index 0000000000..f6bed69dc5 --- /dev/null +++ b/src/TKXDECascade/CMakeLists.txt @@ -0,0 +1,3 @@ +project(TKXDECascade) + +OCCT_INCLUDE_CMAKE_FILE (adm/cmake/occt_toolkit) diff --git a/src/TKXDECascade/EXTERNLIB b/src/TKXDECascade/EXTERNLIB new file mode 100644 index 0000000000..08343f97d7 --- /dev/null +++ b/src/TKXDECascade/EXTERNLIB @@ -0,0 +1,12 @@ +TKBin +TKBinL +TKBinTObj +TKBinXCAF +TKStd +TKXml +TKXmlL +TKXmlTObj +TKXmlXCAF +TKXDE +TKernel +TKLCAF diff --git a/src/TKXDECascade/FILES b/src/TKXDECascade/FILES new file mode 100644 index 0000000000..ca4f0e567b --- /dev/null +++ b/src/TKXDECascade/FILES @@ -0,0 +1,2 @@ +EXTERNLIB +PACKAGES diff --git a/src/TKXDECascade/PACKAGES b/src/TKXDECascade/PACKAGES new file mode 100644 index 0000000000..128e6b273b --- /dev/null +++ b/src/TKXDECascade/PACKAGES @@ -0,0 +1,2 @@ +DEBRepCascade +DEXCAFCascade diff --git a/src/TKXDEDRAW/EXTERNLIB b/src/TKXDEDRAW/EXTERNLIB index 7d9d7033c0..8ee679cab2 100755 --- a/src/TKXDEDRAW/EXTERNLIB +++ b/src/TKXDEDRAW/EXTERNLIB @@ -1,3 +1,4 @@ +TKXDE TKCDF TKBRep TKXCAF @@ -14,10 +15,13 @@ TKDraw TKTopAlgo TKLCAF TKG3d +TKRWMesh TKSTEPBase TKSTEP +TKSTL TKMesh TKXSDRAW +TKXDECascade TKXDEIGES TKXDESTEP TKDCAF diff --git a/src/TKXDEIGES/EXTERNLIB b/src/TKXDEIGES/EXTERNLIB index 007959d773..fd9f8dae93 100755 --- a/src/TKXDEIGES/EXTERNLIB +++ b/src/TKXDEIGES/EXTERNLIB @@ -1,4 +1,6 @@ +TKBinXCAF TKBRep +TKXDE TKernel TKMath TKXSBase diff --git a/src/TKXDESTEP/EXTERNLIB b/src/TKXDESTEP/EXTERNLIB index bb624688f4..9e3e191a18 100755 --- a/src/TKXDESTEP/EXTERNLIB +++ b/src/TKXDESTEP/EXTERNLIB @@ -1,3 +1,5 @@ +TKBinXCAF +TKXDE TKBRep TKSTEPAttr TKernel diff --git a/src/Vrml/FILES b/src/Vrml/FILES index 51f2b9910b..d0db5dc099 100644 --- a/src/Vrml/FILES +++ b/src/Vrml/FILES @@ -6,6 +6,8 @@ Vrml_AsciiTextJustification.hxx Vrml_Cone.cxx Vrml_Cone.hxx Vrml_ConeParts.hxx +Vrml_ConfigurationNode.cxx +Vrml_ConfigurationNode.hxx Vrml_Coordinate3.cxx Vrml_Coordinate3.hxx Vrml_Cube.cxx @@ -51,6 +53,8 @@ Vrml_PointLight.cxx Vrml_PointLight.hxx Vrml_PointSet.cxx Vrml_PointSet.hxx +Vrml_Provider.cxx +Vrml_Provider.hxx Vrml_Rotation.cxx Vrml_Rotation.hxx Vrml_Scale.cxx diff --git a/src/Vrml/Vrml_ConfigurationNode.cxx b/src/Vrml/Vrml_ConfigurationNode.cxx new file mode 100644 index 0000000000..1fafdb77fc --- /dev/null +++ b/src/Vrml/Vrml_ConfigurationNode.cxx @@ -0,0 +1,155 @@ +// Copyright (c) 2022 OPEN CASCADE SAS +// +// This file is part of Open CASCADE Technology software library. +// +// This library is free software; you can redistribute it and/or modify it under +// the terms of the GNU Lesser General Public License version 2.1 as published +// by the Free Software Foundation, with special exception defined in the file +// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT +// distribution for complete text of the license and disclaimer of any warranty. +// +// Alternatively, this file may be used under the terms of Open CASCADE +// commercial license or contractual agreement. + +#include + +#include +#include + +IMPLEMENT_STANDARD_RTTIEXT(Vrml_ConfigurationNode, DE_ConfigurationNode) + +static const TCollection_AsciiString THE_CONFIGURATION_SCOPE = "provider"; + +//======================================================================= +// function : STEPCAFControl_ConfigurationNode +// purpose : +//======================================================================= +Vrml_ConfigurationNode::Vrml_ConfigurationNode() : + DE_ConfigurationNode() +{ + UpdateLoad(); +} + +//======================================================================= +// function : STEPCAFControl_ConfigurationNode +// purpose : +//======================================================================= +Vrml_ConfigurationNode::Vrml_ConfigurationNode(const Handle(Vrml_ConfigurationNode)& theNode) + :DE_ConfigurationNode(theNode) +{ + InternalParameters = theNode->InternalParameters; + UpdateLoad(); +} + +//======================================================================= +// function : Load +// purpose : +//======================================================================= +bool Vrml_ConfigurationNode::Load(const Handle(DE_ConfigurationContext)& theResource) +{ + TCollection_AsciiString aScope = THE_CONFIGURATION_SCOPE + "." + GetFormat() + "." + GetVendor(); + + InternalParameters.WriterVersion = (WriteMode_WriterVersion) + theResource->IntegerVal("writer.version", InternalParameters.WriterVersion, aScope); + InternalParameters.WriteRepresentationType = (WriteMode_RepresentationType) + theResource->IntegerVal("write.representation.type", InternalParameters.WriteRepresentationType, aScope); + + return true; +} + +//======================================================================= +// function : Save +// purpose : +//======================================================================= +TCollection_AsciiString Vrml_ConfigurationNode::Save() const +{ + TCollection_AsciiString aResult; + aResult += "!*****************************************************************************\n"; + aResult = aResult + "!Configuration Node " + " Vendor: " + GetVendor() + " Format: " + GetFormat() + "\n"; + TCollection_AsciiString aScope = THE_CONFIGURATION_SCOPE + "." + GetFormat() + "." + GetVendor() + "."; + + aResult += "!\n"; + aResult += "!Write parameters:\n"; + aResult += "!\n"; + + aResult += "!\n"; + aResult += "!Setting up writer version\n"; + aResult += "!Default value: 2. Available values: 1, 2\n"; + aResult += aScope + "writer.version :\t " + InternalParameters.WriterVersion + "\n"; + aResult += "!\n"; + + aResult += "!\n"; + aResult += "!Setting up representation\n"; + aResult += "!Default value: 1. Available values: 0(shaded), 1(wireframe), 2(both)\n"; + aResult += aScope + "write.representation.type :\t " + InternalParameters.WriteRepresentationType + "\n"; + aResult += "!\n"; + + aResult += "!*****************************************************************************\n"; + return aResult; +} + +//======================================================================= +// function : Copy +// purpose : +//======================================================================= +Handle(DE_ConfigurationNode) Vrml_ConfigurationNode::Copy() const +{ + return new Vrml_ConfigurationNode(*this); +} + +//======================================================================= +// function : BuildProvider +// purpose : +//======================================================================= +Handle(DE_Provider) Vrml_ConfigurationNode::BuildProvider() +{ + return new Vrml_Provider(this); +} + +//======================================================================= +// function : IsImportSupported +// purpose : +//======================================================================= +bool Vrml_ConfigurationNode::IsImportSupported() const +{ + return true; +} + +//======================================================================= +// function : IsExportSupported +// purpose : +//======================================================================= +bool Vrml_ConfigurationNode::IsExportSupported() const +{ + return true; +} + +//======================================================================= +// function : GetFormat +// purpose : +//======================================================================= +TCollection_AsciiString Vrml_ConfigurationNode::GetFormat() const +{ + return TCollection_AsciiString("VRML"); +} + +//======================================================================= +// function : GetVendor +// purpose : +//======================================================================= +TCollection_AsciiString Vrml_ConfigurationNode::GetVendor() const +{ + return TCollection_AsciiString("OCC"); +} + +//======================================================================= +// function : GetExtensions +// purpose : +//======================================================================= +TColStd_ListOfAsciiString Vrml_ConfigurationNode::GetExtensions() const +{ + TColStd_ListOfAsciiString anExt; + anExt.Append("vrml"); + anExt.Append("wrl"); + return anExt; +} diff --git a/src/Vrml/Vrml_ConfigurationNode.hxx b/src/Vrml/Vrml_ConfigurationNode.hxx new file mode 100644 index 0000000000..a2402752b9 --- /dev/null +++ b/src/Vrml/Vrml_ConfigurationNode.hxx @@ -0,0 +1,103 @@ +// Copyright (c) 2022 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 _Vrml_ConfigurationNode_HeaderFile +#define _Vrml_ConfigurationNode_HeaderFile + +#include + +//! The purpose of this class is to configure the transfer process for VRML format +//! Stores the necessary settings for Vrml_Provider. +//! Configures and creates special provider to transfer VRML files. +//! +//! Nodes grouped by Vendor name and Format type. +//! The Vendor name is "OCC" +//! The Format type is "VRML" +//! The supported CAD extensions are ".vrml", ".wrl" +//! The import process is supported. +//! The export process is supported. +class Vrml_ConfigurationNode : public DE_ConfigurationNode +{ + DEFINE_STANDARD_RTTIEXT(Vrml_ConfigurationNode, DE_ConfigurationNode) +public: + + //! Initializes all field by default + Standard_EXPORT Vrml_ConfigurationNode(); + + //! Copies values of all fields + //! @param[in] theNode object to copy + Standard_EXPORT Vrml_ConfigurationNode(const Handle(Vrml_ConfigurationNode)& theNode); + + //! Updates values according the resource + //! @param[in] theResource input resource to use + //! @return true if theResource loading has ended correctly + Standard_EXPORT virtual bool Load(const Handle(DE_ConfigurationContext)& theResource) Standard_OVERRIDE; + + //! Writes configuration to the string + //! @return result resource string + Standard_EXPORT virtual TCollection_AsciiString Save() const Standard_OVERRIDE; + + //! Copies values of all fields + //! @return new object with the same field values + Standard_EXPORT virtual Handle(DE_ConfigurationNode) Copy() const Standard_OVERRIDE; + + + //! Creates new provider for the own format + //! @return new created provider + Standard_EXPORT virtual Handle(DE_Provider) BuildProvider() Standard_OVERRIDE; + +public: + + //! Checks the import supporting + //! @return true if import is supported + Standard_EXPORT virtual bool IsImportSupported() const Standard_OVERRIDE; + + //! Checks the export supporting + //! @return true if export is supported + Standard_EXPORT virtual bool IsExportSupported() const Standard_OVERRIDE; + + //! Gets CAD format name of associated provider + //! @return provider CAD format + Standard_EXPORT virtual TCollection_AsciiString GetFormat() const Standard_OVERRIDE; + + //! Gets provider's vendor name of associated provider + //! @return provider's vendor name + Standard_EXPORT virtual TCollection_AsciiString GetVendor() const Standard_OVERRIDE; + + //! Gets list of supported file extensions + //! @return list of extensions + Standard_EXPORT virtual TColStd_ListOfAsciiString GetExtensions() const Standard_OVERRIDE; + +public: + enum WriteMode_WriterVersion + { + WriteMode_WriterVersion_1 = 1, + WriteMode_WriterVersion_2 + }; + enum WriteMode_RepresentationType + { + WriteMode_RepresentationType_Shaded = 0, + WriteMode_RepresentationType_Wireframe, + WriteMode_RepresentationType_Both + }; + + struct Vrml_InternalSection + { + // Write + WriteMode_WriterVersion WriterVersion = WriteMode_WriterVersion_2; //!< Setting up writer version (1/2) + WriteMode_RepresentationType WriteRepresentationType = WriteMode_RepresentationType_Wireframe; //!< Setting up representation (shaded/wireframe/both) + + } InternalParameters; +}; + +#endif // _Vrml_ConfigurationNode_HeaderFile diff --git a/src/Vrml/Vrml_Provider.cxx b/src/Vrml/Vrml_Provider.cxx new file mode 100644 index 0000000000..a3db53c87e --- /dev/null +++ b/src/Vrml/Vrml_Provider.cxx @@ -0,0 +1,285 @@ +// Copyright (c) 2022 OPEN CASCADE SAS +// +// This file is part of Open CASCADE Technology software library. +// +// This library is free software; you can redistribute it and/or modify it under +// the terms of the GNU Lesser General Public License version 2.1 as published +// by the Free Software Foundation, with special exception defined in the file +// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT +// distribution for complete text of the license and disclaimer of any warranty. +// +// Alternatively, this file may be used under the terms of Open CASCADE +// commercial license or contractual agreement. + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +IMPLEMENT_STANDARD_RTTIEXT(Vrml_Provider, DE_Provider) + +//======================================================================= +// function : Vrml_Provider +// purpose : +//======================================================================= +Vrml_Provider::Vrml_Provider() +{} + +//======================================================================= +// function : Vrml_Provider +// purpose : +//======================================================================= +Vrml_Provider::Vrml_Provider(const Handle(DE_ConfigurationNode)& theNode) + :DE_Provider(theNode) +{} + +//======================================================================= +// function : Read +// purpose : +//======================================================================= +bool Vrml_Provider::Read(const TCollection_AsciiString& thePath, + const Handle(TDocStd_Document)& theDocument, + Handle(XSControl_WorkSession)& theWS, + const Message_ProgressRange& theProgress) +{ + (void)theWS; + return Read(thePath, theDocument, theProgress); +} + +//======================================================================= +// function : Write +// purpose : +//======================================================================= +bool Vrml_Provider::Write(const TCollection_AsciiString& thePath, + const Handle(TDocStd_Document)& theDocument, + Handle(XSControl_WorkSession)& theWS, + const Message_ProgressRange& theProgress) +{ + (void)theWS; + return Write(thePath, theDocument, theProgress); +} + +//======================================================================= +// function : Read +// purpose : +//======================================================================= +bool Vrml_Provider::Read(const TCollection_AsciiString& thePath, + const Handle(TDocStd_Document)& theDocument, + const Message_ProgressRange& theProgress) +{ + if (theDocument.IsNull()) + { + Message::SendFail() << "Error in the Vrml_Provider during reading the file " << + thePath << "\t: theDocument shouldn't be null"; + return false; + } + if (GetNode().IsNull() || !GetNode()->IsKind(STANDARD_TYPE(Vrml_ConfigurationNode))) + { + Message::SendFail() << "Error in the Vrml_Provider during reading the file " << + thePath << "\t: Incorrect or empty Configuration Node"; + return false; + } + Handle(Vrml_ConfigurationNode) aNode = Handle(Vrml_ConfigurationNode)::DownCast(GetNode()); + TopoDS_Shape aShape; + if(!Read(thePath, aShape, theProgress)) + { + return false; + } + Handle(XCAFDoc_ShapeTool) aShTool = XCAFDoc_DocumentTool::ShapeTool(theDocument->Main()); + aShTool->AddShape(aShape); + XCAFDoc_DocumentTool::SetLengthUnit(theDocument, aNode->GlobalParameters.LengthUnit, UnitsMethods_LengthUnit_Millimeter); + return true; +} + +//======================================================================= +// function : Write +// purpose : +//======================================================================= +bool Vrml_Provider::Write(const TCollection_AsciiString& thePath, + const Handle(TDocStd_Document)& theDocument, + const Message_ProgressRange& theProgress) +{ + (void)theProgress; + if (GetNode().IsNull() || !GetNode()->IsKind(STANDARD_TYPE(Vrml_ConfigurationNode))) + { + Message::SendFail() << "Error in the Vrml_Provider during writing the file " << + thePath << "\t: Incorrect or empty Configuration Node"; + return false; + } + Handle(Vrml_ConfigurationNode) aNode = Handle(Vrml_ConfigurationNode)::DownCast(GetNode()); + + VrmlAPI_Writer aWriter; + aWriter.SetRepresentation(static_cast(aNode->InternalParameters.WriteRepresentationType)); + Standard_Real aScaleFactorM = aNode->GlobalParameters.LengthUnit / 1000; + if (!aWriter.WriteDoc(theDocument, thePath.ToCString(), aScaleFactorM)) + { + Message::SendFail() << "Error in the Vrml_Provider during wtiting the file " << + thePath << "\t: File was not written"; + return false; + } + + return true; +} + +//======================================================================= +// function : Read +// purpose : +//======================================================================= +bool Vrml_Provider::Read(const TCollection_AsciiString& thePath, + TopoDS_Shape& theShape, + Handle(XSControl_WorkSession)& theWS, + const Message_ProgressRange& theProgress) +{ + (void)theWS; + return Read(thePath, theShape, theProgress); +} + +//======================================================================= +// function : Write +// purpose : +//======================================================================= +bool Vrml_Provider::Write(const TCollection_AsciiString& thePath, + const TopoDS_Shape& theShape, + Handle(XSControl_WorkSession)& theWS, + const Message_ProgressRange& theProgress) +{ + (void)theWS; + return Write(thePath, theShape, theProgress); +} + +//======================================================================= +// function : Read +// purpose : +//======================================================================= +bool Vrml_Provider::Read(const TCollection_AsciiString& thePath, + TopoDS_Shape& theShape, + const Message_ProgressRange& theProgress) +{ + (void)theProgress; + if (GetNode().IsNull() || !GetNode()->IsKind(STANDARD_TYPE(Vrml_ConfigurationNode))) + { + Message::SendFail() << "Error in the Vrml_Provider during reading the file " << + thePath << "\t: Incorrect or empty Configuration Node"; + return false; + } + Handle(Vrml_ConfigurationNode) aNode = Handle(Vrml_ConfigurationNode)::DownCast(GetNode()); + + TopoDS_Shape aShape; + VrmlData_DataMapOfShapeAppearance aShapeAppMap; + + std::filebuf aFic; + std::istream aStream(&aFic); + + if (aFic.open(thePath.ToCString(), std::ios::in)) + { + // Get path of the VRML file. + OSD_Path aPath(thePath.ToCString()); + TCollection_AsciiString aVrmlDir("."); + TCollection_AsciiString aDisk = aPath.Disk(); + TCollection_AsciiString aTrek = aPath.Trek(); + if (!aTrek.IsEmpty()) + { + if (!aDisk.IsEmpty()) + { + aVrmlDir = aDisk; + } + else + { + aVrmlDir.Clear(); + } + aTrek.ChangeAll('|', '/'); + aVrmlDir += aTrek; + } + + VrmlData_Scene aScene; + Standard_Real anOCCUnitMM = aNode->GlobalParameters.LengthUnit; + aScene.SetLinearScale(1000. / anOCCUnitMM); + + aScene.SetVrmlDir(aVrmlDir); + aScene << aStream; + const char* aStr = 0L; + switch (aScene.Status()) + { + case VrmlData_StatusOK: + { + aShape = aScene.GetShape(aShapeAppMap); + break; + } + case VrmlData_EmptyData: aStr = "EmptyData"; break; + case VrmlData_UnrecoverableError: aStr = "UnrecoverableError"; break; + case VrmlData_GeneralError: aStr = "GeneralError"; break; + case VrmlData_EndOfFile: aStr = "EndOfFile"; break; + case VrmlData_NotVrmlFile: aStr = "NotVrmlFile"; break; + case VrmlData_CannotOpenFile: aStr = "CannotOpenFile"; break; + case VrmlData_VrmlFormatError: aStr = "VrmlFormatError"; break; + case VrmlData_NumericInputError: aStr = "NumericInputError"; break; + case VrmlData_IrrelevantNumber: aStr = "IrrelevantNumber"; break; + case VrmlData_BooleanInputError: aStr = "BooleanInputError"; break; + case VrmlData_StringInputError: aStr = "StringInputError"; break; + case VrmlData_NodeNameUnknown: aStr = "NodeNameUnknown"; break; + case VrmlData_NonPositiveSize: aStr = "NonPositiveSize"; break; + case VrmlData_ReadUnknownNode: aStr = "ReadUnknownNode"; break; + case VrmlData_NonSupportedFeature: aStr = "NonSupportedFeature"; break; + case VrmlData_OutputStreamUndefined:aStr = "OutputStreamUndefined"; break; + case VrmlData_NotImplemented: aStr = "NotImplemented"; break; + default: + break; + } + if (aStr) + { + Message::SendFail() << "Error in the Vrml_Provider during reading the file " << + thePath << "\t: ++ VRML Error: " << aStr << " in line " << aScene.GetLineError(); + return false; + } + else + { + theShape = aShape; + } + } + else + { + Message::SendFail() << "Error in the Vrml_Provider during reading the file " << + thePath << "\t: cannot open file"; + return false; + } + return true; +} + +//======================================================================= +// function : Write +// purpose : +//======================================================================= +bool Vrml_Provider::Write(const TCollection_AsciiString& thePath, + const TopoDS_Shape& theShape, + const Message_ProgressRange& theProgress) +{ + Handle(TDocStd_Document) aDoc = new TDocStd_Document("BinXCAF"); + Handle(XCAFDoc_ShapeTool) aShTool = XCAFDoc_DocumentTool::ShapeTool(aDoc->Main()); + aShTool->AddShape(theShape); + return Write(thePath, aDoc, theProgress); +} + +//======================================================================= +// function : GetFormat +// purpose : +//======================================================================= +TCollection_AsciiString Vrml_Provider::GetFormat() const +{ + return TCollection_AsciiString("VRML"); +} + +//======================================================================= +// function : GetVendor +// purpose : +//======================================================================= +TCollection_AsciiString Vrml_Provider::GetVendor() const +{ + return TCollection_AsciiString("OCC"); +} diff --git a/src/Vrml/Vrml_Provider.hxx b/src/Vrml/Vrml_Provider.hxx new file mode 100644 index 0000000000..a4f9b6df92 --- /dev/null +++ b/src/Vrml/Vrml_Provider.hxx @@ -0,0 +1,136 @@ +// Copyright (c) 2022 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 _Vrml_Provider_HeaderFile +#define _Vrml_Provider_HeaderFile + +#include + +//! The class to transfer VRML files. +//! Reads and Writes any VRML files into/from OCCT. +//! Each operation needs configuration node. +//! +//! Providers grouped by Vendor name and Format type. +//! The Vendor name is "OCC" +//! The Format type is "VRML" +//! The import process is supported. +//! The export process is supported. +class Vrml_Provider : public DE_Provider +{ +public: + DEFINE_STANDARD_RTTIEXT(Vrml_Provider, DE_Provider) + +public: + + //! Default constructor + //! Configure translation process with global configuration + Standard_EXPORT Vrml_Provider(); + + //! Configure translation process + //! @param[in] theNode object to copy + Standard_EXPORT Vrml_Provider(const Handle(DE_ConfigurationNode)& theNode); + +public: + + //! Reads a CAD file, according internal configuration + //! @param[in] thePath path to the import CAD file + //! @param[out] theDocument document to save result + //! @param[in] theWS current work session + //! @param theProgress[in] progress indicator + //! @return true if Read operation has ended correctly + Standard_EXPORT virtual bool Read(const TCollection_AsciiString& thePath, + const Handle(TDocStd_Document)& theDocument, + Handle(XSControl_WorkSession)& theWS, + const Message_ProgressRange& theProgress = Message_ProgressRange()) Standard_OVERRIDE; + + //! Writes a CAD file, according internal configuration + //! @param[in] thePath path to the export CAD file + //! @param[out] theDocument document to export + //! @param[in] theWS current work session + //! @param theProgress[in] progress indicator + //! @return true if Write operation has ended correctly + Standard_EXPORT virtual bool Write(const TCollection_AsciiString& thePath, + const Handle(TDocStd_Document)& theDocument, + Handle(XSControl_WorkSession)& theWS, + const Message_ProgressRange& theProgress = Message_ProgressRange()) Standard_OVERRIDE; + + //! Reads a CAD file, according internal configuration + //! @param[in] thePath path to the import CAD file + //! @param[out] theDocument document to save result + //! @param theProgress[in] progress indicator + //! @return true if Read operation has ended correctly + Standard_EXPORT virtual bool Read(const TCollection_AsciiString& thePath, + const Handle(TDocStd_Document)& theDocument, + const Message_ProgressRange& theProgress = Message_ProgressRange()) Standard_OVERRIDE; + + //! Writes a CAD file, according internal configuration + //! @param[in] thePath path to the export CAD file + //! @param[out] theDocument document to export + //! @param theProgress[in] progress indicator + //! @return true if Write operation has ended correctly + Standard_EXPORT virtual bool Write(const TCollection_AsciiString& thePath, + const Handle(TDocStd_Document)& theDocument, + const Message_ProgressRange& theProgress = Message_ProgressRange()) Standard_OVERRIDE; + + //! Reads a CAD file, according internal configuration + //! @param[in] thePath path to the import CAD file + //! @param[out] theShape shape to save result + //! @param[in] theWS current work session + //! @param theProgress[in] progress indicator + //! @return true if Read operation has ended correctly + Standard_EXPORT virtual bool Read(const TCollection_AsciiString& thePath, + TopoDS_Shape& theShape, + Handle(XSControl_WorkSession)& theWS, + const Message_ProgressRange& theProgress = Message_ProgressRange()) Standard_OVERRIDE; + + //! Writes a CAD file, according internal configuration + //! @param[in] thePath path to the export CAD file + //! @param[out] theShape shape to export + //! @param[in] theWS current work session + //! @param theProgress[in] progress indicator + //! @return true if Write operation has ended correctly + Standard_EXPORT virtual bool Write(const TCollection_AsciiString& thePath, + const TopoDS_Shape& theShape, + Handle(XSControl_WorkSession)& theWS, + const Message_ProgressRange& theProgress = Message_ProgressRange()) Standard_OVERRIDE; + + //! Reads a CAD file, according internal configuration + //! @param[in] thePath path to the import CAD file + //! @param[out] theShape shape to save result + //! @param theProgress[in] progress indicator + //! @return true if Read operation has ended correctly + Standard_EXPORT virtual bool Read(const TCollection_AsciiString& thePath, + TopoDS_Shape& theShape, + const Message_ProgressRange& theProgress = Message_ProgressRange()) Standard_OVERRIDE; + + //! Writes a CAD file, according internal configuration + //! @param[in] thePath path to the export CAD file + //! @param[out] theShape shape to export + //! @param theProgress[in] progress indicator + //! @return true if Write operation has ended correctly + Standard_EXPORT virtual bool Write(const TCollection_AsciiString& thePath, + const TopoDS_Shape& theShape, + const Message_ProgressRange& theProgress = Message_ProgressRange()) Standard_OVERRIDE; + +public: + + //! Gets CAD format name of associated provider + //! @return provider CAD format + Standard_EXPORT virtual TCollection_AsciiString GetFormat() const Standard_OVERRIDE; + + //! Gets provider's vendor name of associated provider + //! @return provider's vendor name + Standard_EXPORT virtual TCollection_AsciiString GetVendor() const Standard_OVERRIDE; +}; + +#endif // _Vrml_Provider_HeaderFile diff --git a/src/XDEDRAW/XDEDRAW.cxx b/src/XDEDRAW/XDEDRAW.cxx index dd69cab6f8..1e9ff6e180 100644 --- a/src/XDEDRAW/XDEDRAW.cxx +++ b/src/XDEDRAW/XDEDRAW.cxx @@ -24,14 +24,23 @@ #include #include #include +#include +#include +#include #include #include #include #include +#include #include #include #include +#include +#include +#include +#include #include +#include #include #include #include @@ -70,6 +79,7 @@ #include #include #include +#include #include #include #include @@ -1839,6 +1849,15 @@ void XDEDRAW::Init(Draw_Interpretor& di) XDEDRAW_Notes::InitCommands(di); XDEDRAW_Common::InitCommands ( di );//moved from EXE + DE_Wrapper::GlobalWrapper()->Bind(new RWObj_ConfigurationNode()); + DE_Wrapper::GlobalWrapper()->Bind(new RWPly_ConfigurationNode()); + DE_Wrapper::GlobalWrapper()->Bind(new RWGltf_ConfigurationNode()); + DE_Wrapper::GlobalWrapper()->Bind(new IGESCAFControl_ConfigurationNode()); + DE_Wrapper::GlobalWrapper()->Bind(new STEPCAFControl_ConfigurationNode()); + DE_Wrapper::GlobalWrapper()->Bind(new Vrml_ConfigurationNode()); + DE_Wrapper::GlobalWrapper()->Bind(new DEXCAFCascade_ConfigurationNode()); + DE_Wrapper::GlobalWrapper()->Bind(new RWStl_ConfigurationNode()); + DE_Wrapper::GlobalWrapper()->Bind(new DEBRepCascade_ConfigurationNode()); } diff --git a/src/XDEDRAW/XDEDRAW_Common.cxx b/src/XDEDRAW/XDEDRAW_Common.cxx index a0697110e3..e69e19dc77 100644 --- a/src/XDEDRAW/XDEDRAW_Common.cxx +++ b/src/XDEDRAW/XDEDRAW_Common.cxx @@ -16,6 +16,8 @@ #include #include +#include +#include #include #include #include @@ -69,36 +71,38 @@ static Standard_Boolean ClearDicWS() } static void AddWS(TCollection_AsciiString filename, - const Handle(XSControl_WorkSession)& WS) + const Handle(XSControl_WorkSession)& WS) { - WS->SetVars ( new XSDRAW_Vars ); // support of DRAW variables - thedictws.Bind( filename, WS ); + WS->SetVars(new XSDRAW_Vars); // support of DRAW variables + thedictws.Bind(filename, WS); } static Standard_Boolean FillDicWS(NCollection_DataMap& dicFile) { ClearDicWS(); - if ( dicFile.IsEmpty() ) { + if (dicFile.IsEmpty()) + { return Standard_False; } Handle(STEPCAFControl_ExternFile) EF; NCollection_DataMap::Iterator DicEFIt(dicFile); - for (; DicEFIt.More(); DicEFIt.Next() ) { + for (; DicEFIt.More(); DicEFIt.Next()) + { TCollection_AsciiString filename = DicEFIt.Key(); EF = DicEFIt.Value(); - AddWS ( filename, EF->GetWS() ); + AddWS(filename, EF->GetWS()); } - return Standard_True; + return Standard_True; } -static Standard_Boolean SetCurrentWS (TCollection_AsciiString filename) +static Standard_Boolean SetCurrentWS(TCollection_AsciiString filename) { - if ( !thedictws.IsBound(filename) ) return Standard_False; - Handle(XSControl_WorkSession) CurrentWS = - Handle(XSControl_WorkSession)::DownCast( thedictws.ChangeFind(filename) ); - XSDRAW::Pilot()->SetSession( CurrentWS ); - + if (!thedictws.IsBound(filename)) return Standard_False; + Handle(XSControl_WorkSession) CurrentWS = + Handle(XSControl_WorkSession)::DownCast(thedictws.ChangeFind(filename)); + XSDRAW::Pilot()->SetSession(CurrentWS); + return Standard_True; } @@ -108,14 +112,15 @@ static Standard_Boolean SetCurrentWS (TCollection_AsciiString filename) //purpose : Set current file if many files are read //======================================================================= -static Standard_Integer SetCurWS (Draw_Interpretor& di , Standard_Integer argc, const char** argv) +static Standard_Integer SetCurWS(Draw_Interpretor& di, Standard_Integer argc, const char** argv) { - if (argc <2) { - di<<"Use: "< DictWS = thedictws; - if ( DictWS.IsEmpty() ) return 1; + if (DictWS.IsEmpty()) return 1; NCollection_DataMap::Iterator DicIt(DictWS); di << " The list of last translated files:\n"; Standard_Integer num = 0; - for (; DicIt.More() ; DicIt.Next(), num++ ) { - TCollection_AsciiString strng ( DicIt.Key() ); - if ( num ) di << "\n"; + for (; DicIt.More(); DicIt.Next(), num++) + { + TCollection_AsciiString strng(DicIt.Key()); + if (num) di << "\n"; di << "\"" << strng.ToCString() << "\""; } return 0; @@ -145,7 +151,7 @@ static Standard_Integer GetDicWSList (Draw_Interpretor& di, Standard_Integer /*a //purpose : Return name of file which is current //======================================================================= -static Standard_Integer GetCurWS (Draw_Interpretor& di, Standard_Integer /*argc*/, const char** /*argv*/) +static Standard_Integer GetCurWS(Draw_Interpretor& di, Standard_Integer /*argc*/, const char** /*argv*/) { Handle(XSControl_WorkSession) WS = XSDRAW::Session(); di << "\"" << WS->LoadedFile() << "\""; @@ -157,31 +163,33 @@ static Standard_Integer GetCurWS (Draw_Interpretor& di, Standard_Integer /*argc* //purpose : Apply fromshape command to all the loaded WSs //======================================================================= -static Standard_Integer FromShape (Draw_Interpretor& di, Standard_Integer argc, const char** argv) +static Standard_Integer FromShape(Draw_Interpretor& di, Standard_Integer argc, const char** argv) { - if ( argc <2 ) { + if (argc < 2) + { di << argv[0] << " shape: search for shape origin among all last tranalated files\n"; return 0; } - + char command[256]; - Sprintf ( command, "fromshape %.200s -1", argv[1] ); + Sprintf(command, "fromshape %.200s -1", argv[1]); NCollection_DataMap DictWS = thedictws; - if ( DictWS.IsEmpty() ) return di.Eval ( command ); - + if (DictWS.IsEmpty()) return di.Eval(command); + Handle(XSControl_WorkSession) WS = XSDRAW::Session(); - NCollection_DataMap::Iterator DicIt ( DictWS ); -// di << "Searching for shape among all the loaded files:\n"; + NCollection_DataMap::Iterator DicIt(DictWS); + // di << "Searching for shape among all the loaded files:\n"; Standard_Integer num = 0; - for (; DicIt.More() ; DicIt.Next(), num++ ) { - Handle(XSControl_WorkSession) CurrentWS = - Handle(XSControl_WorkSession)::DownCast( DicIt.Value() ); - XSDRAW::Pilot()->SetSession( CurrentWS ); - di.Eval ( command ); + for (; DicIt.More(); DicIt.Next(), num++) + { + Handle(XSControl_WorkSession) CurrentWS = + Handle(XSControl_WorkSession)::DownCast(DicIt.Value()); + XSDRAW::Pilot()->SetSession(CurrentWS); + di.Eval(command); } - XSDRAW::Pilot()->SetSession( WS ); + XSDRAW::Pilot()->SetSession(WS); return 0; } @@ -190,47 +198,50 @@ static Standard_Integer FromShape (Draw_Interpretor& di, Standard_Integer argc, //purpose : Read IGES to DECAF document //======================================================================= -static Standard_Integer ReadIges (Draw_Interpretor& di, Standard_Integer argc, const char** argv) +static Standard_Integer ReadIges(Draw_Interpretor& di, Standard_Integer argc, const char** argv) { - if ( argc <3 ) { + if (argc < 3) + { di << "Use: " << argv[0] << " Doc filename [mode]: read IGES file to a document\n"; return 0; } - - DeclareAndCast(IGESControl_Controller,ctl,XSDRAW::Controller()); + + DeclareAndCast(IGESControl_Controller, ctl, XSDRAW::Controller()); if (ctl.IsNull()) XSDRAW::SetNorm("IGES"); - + TCollection_AsciiString fnom, rnom; Standard_Boolean modfic = XSDRAW::FileAndVar(argv[2], argv[1], "IGES", fnom, rnom); if (modfic) di << " File IGES to read : " << fnom.ToCString() << "\n"; else di << " Model taken from the session : " << fnom.ToCString() << "\n"; // di<<" -- Names of variables BREP-DRAW prefixed by : "<Start(), "IGES import", modfic ? 2 : 1); + Handle(Draw_ProgressIndicator) aProgress = new Draw_ProgressIndicator(di); + Message_ProgressScope aRootScope(aProgress->Start(), "IGES import", modfic ? 2 : 1); IFSelect_ReturnStatus readstat = IFSelect_RetVoid; if (modfic) { - Message_ProgressScope aReadScope (aRootScope.Next(), "File reading", 1); + Message_ProgressScope aReadScope(aRootScope.Next(), "File reading", 1); aReadScope.Show(); - readstat = reader.ReadFile (fnom.ToCString()); + readstat = reader.ReadFile(fnom.ToCString()); } else if (XSDRAW::Session()->NbStartingEntities() > 0) { @@ -240,34 +251,35 @@ static Standard_Integer ReadIges (Draw_Interpretor& di, Standard_Integer argc, c { if (modfic) { - di<<"Could not read file "<NewDocument("BinXCAF",doc); - TDataStd_Name::Set(doc->GetData()->Root(),argv[1]); - Handle(DDocStd_DrawDocument) DD = new DDocStd_DrawDocument(doc); - Draw::Set(argv[1],DD); -// di << "Document saved with name " << argv[1]; + A->NewDocument("BinXCAF", doc); + TDataStd_Name::Set(doc->GetData()->Root(), argv[1]); + Handle(DDocStd_DrawDocument) DD = new DDocStd_DrawDocument(doc); + Draw::Set(argv[1], DD); + // di << "Document saved with name " << argv[1]; } - if (!reader.Transfer (doc, aRootScope.Next())) + if (!reader.Transfer(doc, aRootScope.Next())) { di << "Cannot read any relevant data from the IGES file\n"; return 1; } - -// Handle(DDocStd_DrawDocument) DD = new DDocStd_DrawDocument(doc); -// Draw::Set(argv[1],DD); + + // Handle(DDocStd_DrawDocument) DD = new DDocStd_DrawDocument(doc); + // Draw::Set(argv[1],DD); di << "Document saved with name " << argv[1]; - + return 0; } @@ -276,51 +288,55 @@ static Standard_Integer ReadIges (Draw_Interpretor& di, Standard_Integer argc, c //purpose : Write DECAF document to IGES //======================================================================= -static Standard_Integer WriteIges (Draw_Interpretor& di, Standard_Integer argc, const char** argv) +static Standard_Integer WriteIges(Draw_Interpretor& di, Standard_Integer argc, const char** argv) { - if ( argc <3 ) { + if (argc < 3) + { di << "Use: " << argv[0] << " Doc filename [mode]: write document to IGES file\n"; return 0; } - + Handle(TDocStd_Document) Doc; DDocStd::GetDocument(argv[1], Doc); - if ( Doc.IsNull() ) { + if (Doc.IsNull()) + { di << argv[1] << " is not a document\n"; return 1; } - - XSDRAW::SetNorm ("IGES"); + + XSDRAW::SetNorm("IGES"); TCollection_AsciiString fnom, rnom; const Standard_Boolean modfic = XSDRAW::FileAndVar(argv[2], argv[1], "IGES", fnom, rnom); -// IGESControl_Writer ICW (Interface_Static::CVal("write.iges.unit"), -// Interface_Static::IVal("write.iges.brep.mode")); - - Handle(Draw_ProgressIndicator) aProgress = new Draw_ProgressIndicator (di); - Message_ProgressScope aRootScope (aProgress->Start(), "IGES export", modfic ? 2 : 1); + // IGESControl_Writer ICW (Interface_Static::CVal("write.iges.unit"), + // Interface_Static::IVal("write.iges.brep.mode")); + + Handle(Draw_ProgressIndicator) aProgress = new Draw_ProgressIndicator(di); + Message_ProgressScope aRootScope(aProgress->Start(), "IGES export", modfic ? 2 : 1); - IGESCAFControl_Writer writer ( XSDRAW::Session(), Standard_True ); - if (argc == 4) { + IGESCAFControl_Writer writer(XSDRAW::Session(), Standard_True); + if (argc == 4) + { Standard_Boolean mode = Standard_True; - for ( Standard_Integer i = 0; argv[3][i] ; i++ ) - switch (argv[3][i]) { - case '-' : mode = Standard_False; break; - case '+' : mode = Standard_True; break; - case 'c' : writer.SetColorMode (mode); break; - case 'n' : writer.SetNameMode (mode); break; - case 'l' : writer.SetLayerMode (mode); break; + for (Standard_Integer i = 0; argv[3][i]; i++) + switch (argv[3][i]) + { + case '-': mode = Standard_False; break; + case '+': mode = Standard_True; break; + case 'c': writer.SetColorMode(mode); break; + case 'n': writer.SetNameMode(mode); break; + case 'l': writer.SetLayerMode(mode); break; } } - writer.Transfer (Doc, aRootScope.Next()); + writer.Transfer(Doc, aRootScope.Next()); if (modfic) { - Message_ProgressScope aWriteScope (aRootScope.Next(), "File writing", 1); + Message_ProgressScope aWriteScope(aRootScope.Next(), "File writing", 1); aWriteScope.Show(); di << "Writing IGES model to file " << argv[2] << "\n"; - if (writer.Write (argv[2])) + if (writer.Write(argv[2])) { di << " Write OK\n"; } @@ -341,16 +357,16 @@ static Standard_Integer WriteIges (Draw_Interpretor& di, Standard_Integer argc, //purpose : Read STEP file to DECAF document //======================================================================= -static Standard_Integer ReadStep (Draw_Interpretor& di, Standard_Integer argc, const char** argv) +static Standard_Integer ReadStep(Draw_Interpretor& di, Standard_Integer argc, const char** argv) { - DeclareAndCast(STEPControl_Controller,ctl,XSDRAW::Controller()); + DeclareAndCast(STEPControl_Controller, ctl, XSDRAW::Controller()); if (ctl.IsNull()) XSDRAW::SetNorm("STEP"); Standard_CString aDocName = NULL; TCollection_AsciiString aFilePath, aModeStr; for (Standard_Integer anArgIter = 1; anArgIter < argc; ++anArgIter) { - TCollection_AsciiString anArgCase (argv[anArgIter]); + TCollection_AsciiString anArgCase(argv[anArgIter]); anArgCase.LowerCase(); if (aDocName == NULL) { @@ -372,25 +388,25 @@ static Standard_Integer ReadStep (Draw_Interpretor& di, Standard_Integer argc, c } TCollection_AsciiString fnom, rnom; - Standard_Boolean modfic = XSDRAW::FileAndVar (aFilePath.ToCString(), aDocName, "STEP", fnom, rnom); + Standard_Boolean modfic = XSDRAW::FileAndVar(aFilePath.ToCString(), aDocName, "STEP", fnom, rnom); if (modfic) di << " File STEP to read : " << fnom.ToCString() << "\n"; else di << " Model taken from the session : " << fnom.ToCString() << "\n"; // di<<" -- Names of variables BREP-DRAW prefixed by : "<Start(), "STEP import", modfic ? 2 : 1); + + Handle(Draw_ProgressIndicator) aProgress = new Draw_ProgressIndicator(di); + Message_ProgressScope aRootScope(aProgress->Start(), "STEP import", modfic ? 2 : 1); IFSelect_ReturnStatus readstat = IFSelect_RetVoid; if (modfic) { - Message_ProgressScope aReadScope (aRootScope.Next(), "File reading", 1); + Message_ProgressScope aReadScope(aRootScope.Next(), "File reading", 1); aReadScope.Show(); - readstat = reader.ReadFile (fnom.ToCString()); + readstat = reader.ReadFile(fnom.ToCString()); } else if (XSDRAW::Session()->NbStartingEntities() > 0) { @@ -428,28 +444,28 @@ static Standard_Integer ReadStep (Draw_Interpretor& di, Standard_Integer argc, c } Handle(TDocStd_Document) doc; - if (!DDocStd::GetDocument (aDocName, doc, Standard_False)) + if (!DDocStd::GetDocument(aDocName, doc, Standard_False)) { Handle(TDocStd_Application) A = DDocStd::GetApplication(); - A->NewDocument("BinXCAF",doc); + A->NewDocument("BinXCAF", doc); TDataStd_Name::Set(doc->GetData()->Root(), aDocName); Handle(DDocStd_DrawDocument) DD = new DDocStd_DrawDocument(doc); - Draw::Set (aDocName, DD); -// di << "Document saved with name " << aDocName; + Draw::Set(aDocName, DD); + // di << "Document saved with name " << aDocName; } - if (!reader.Transfer (doc, aRootScope.Next())) + if (!reader.Transfer(doc, aRootScope.Next())) { di << "Cannot read any relevant data from the STEP file\n"; return 1; } - + Handle(DDocStd_DrawDocument) DD = new DDocStd_DrawDocument(doc); - Draw::Set (aDocName, DD); + Draw::Set(aDocName, DD); di << "Document saved with name " << aDocName; NCollection_DataMap DicFile = reader.ExternFiles(); - FillDicWS( DicFile ); - AddWS ( fnom , XSDRAW::Session() ); + FillDicWS(DicFile); + AddWS(fnom, XSDRAW::Session()); return 0; } @@ -459,9 +475,10 @@ static Standard_Integer ReadStep (Draw_Interpretor& di, Standard_Integer argc, c //purpose : Write DECAF document to STEP //======================================================================= -static Standard_Integer WriteStep (Draw_Interpretor& di, Standard_Integer argc, const char** argv) +static Standard_Integer WriteStep(Draw_Interpretor& di, Standard_Integer argc, const char** argv) { - if ( argc <3 ) { + if (argc < 3) + { di << "Use: " << argv[0] << " Doc filename [mode [multifile_prefix [label]]]: write document to the STEP file\n"; di << "mode can be: a or 0 : AsIs (default)\n"; di << " f or 1 : FacettedBRep s or 2 : ShellBasedSurfaceModel\n"; @@ -471,74 +488,79 @@ static Standard_Integer WriteStep (Draw_Interpretor& di, Standard_Integer argc, di << "label: tag of the sub-assembly label to save only that sub-assembly\n"; return 0; } - - Handle(TDocStd_Document) Doc; + + Handle(TDocStd_Document) Doc; DDocStd::GetDocument(argv[1], Doc); - if ( Doc.IsNull() ) { + if (Doc.IsNull()) + { di << argv[1] << " is not a document\n"; return 1; } Standard_CString multifile = 0; - + Standard_Integer k = 3; - DeclareAndCast(STEPControl_Controller,ctl,XSDRAW::Controller()); + DeclareAndCast(STEPControl_Controller, ctl, XSDRAW::Controller()); if (ctl.IsNull()) XSDRAW::SetNorm("STEP"); - STEPCAFControl_Writer writer ( XSDRAW::Session(), Standard_True ); - + STEPCAFControl_Writer writer(XSDRAW::Session(), Standard_True); + STEPControl_StepModelType mode = STEPControl_AsIs; - if ( argc > k ) { - switch (argv[k][0]) { - case 'a' : - case '0' : mode = STEPControl_AsIs; break; - case 'f' : - case '1' : mode = STEPControl_FacetedBrep; break; - case 's' : - case '2' : mode = STEPControl_ShellBasedSurfaceModel; break; - case 'm' : - case '3' : mode = STEPControl_ManifoldSolidBrep; break; - case 'w' : - case '4' : mode = STEPControl_GeometricCurveSet; break; - default : di<<"3rd arg = mode, incorrect [give fsmw]\n"; return 1; + if (argc > k) + { + switch (argv[k][0]) + { + case 'a': + case '0': mode = STEPControl_AsIs; break; + case 'f': + case '1': mode = STEPControl_FacetedBrep; break; + case 's': + case '2': mode = STEPControl_ShellBasedSurfaceModel; break; + case 'm': + case '3': mode = STEPControl_ManifoldSolidBrep; break; + case 'w': + case '4': mode = STEPControl_GeometricCurveSet; break; + default: di << "3rd arg = mode, incorrect [give fsmw]\n"; return 1; } Standard_Boolean wrmode = Standard_True; - for ( Standard_Integer i = 0; argv[k][i] ; i++ ) - switch (argv[3][i]) { - case '-' : wrmode = Standard_False; break; - case '+' : wrmode = Standard_True; break; - case 'c' : writer.SetColorMode (wrmode); break; - case 'n' : writer.SetNameMode (wrmode); break; - case 'l' : writer.SetLayerMode (wrmode); break; - case 'v' : writer.SetPropsMode (wrmode); break; + for (Standard_Integer i = 0; argv[k][i]; i++) + switch (argv[3][i]) + { + case '-': wrmode = Standard_False; break; + case '+': wrmode = Standard_True; break; + case 'c': writer.SetColorMode(wrmode); break; + case 'n': writer.SetNameMode(wrmode); break; + case 'l': writer.SetLayerMode(wrmode); break; + case 'v': writer.SetPropsMode(wrmode); break; } k++; } TDF_Label label; - if( argc > k) + if (argc > k) { TCollection_AsciiString aStr(argv[k]); - if( aStr.Search(":") ==-1) + if (aStr.Search(":") == -1) multifile = argv[k++]; - + } - if( argc > k) + if (argc > k) { - - if( !DDF::FindLabel(Doc->Main().Data(), argv[k], label) || label.IsNull()) { - di << "No label for entry" << "\n"; - return 1; - + + if (!DDF::FindLabel(Doc->Main().Data(), argv[k], label) || label.IsNull()) + { + di << "No label for entry" << "\n"; + return 1; + } } TCollection_AsciiString fnom, rnom; const Standard_Boolean modfic = XSDRAW::FileAndVar(argv[2], argv[1], "STEP", fnom, rnom); - Handle(Draw_ProgressIndicator) aProgress = new Draw_ProgressIndicator (di); - Message_ProgressScope aRootScope (aProgress->Start(), "STEP export", modfic ? 2 : 1); + Handle(Draw_ProgressIndicator) aProgress = new Draw_ProgressIndicator(di); + Message_ProgressScope aRootScope(aProgress->Start(), "STEP export", modfic ? 2 : 1); if (!label.IsNull()) - { - di << "Translating label "<< argv[k]<<" of document " << argv[1] << " to STEP\n"; - if (!writer.Transfer (label, mode, multifile, aRootScope.Next())) + { + di << "Translating label " << argv[k] << " of document " << argv[1] << " to STEP\n"; + if (!writer.Transfer(label, mode, multifile, aRootScope.Next())) { di << "The label of document cannot be translated or gives no result\n"; return 1; @@ -547,7 +569,7 @@ static Standard_Integer WriteStep (Draw_Interpretor& di, Standard_Integer argc, else { di << "Translating document " << argv[1] << " to STEP\n"; - if (!writer.Transfer (Doc, mode, multifile, aRootScope.Next())) + if (!writer.Transfer(Doc, mode, multifile, aRootScope.Next())) { di << "The document cannot be translated or gives no result\n"; } @@ -555,21 +577,23 @@ static Standard_Integer WriteStep (Draw_Interpretor& di, Standard_Integer argc, if (modfic) { - Message_ProgressScope aWriteScope (aRootScope.Next(), "File writing", 1); + Message_ProgressScope aWriteScope(aRootScope.Next(), "File writing", 1); aWriteScope.Show(); di << "Writing STEP file " << argv[2] << "\n"; IFSelect_ReturnStatus stat = writer.Write(argv[2]); - switch (stat) { - case IFSelect_RetVoid : di<<"No file written\n"; break; - case IFSelect_RetDone : { - di<<"File "< DicFile = writer.ExternFiles(); - FillDicWS( DicFile ); - AddWS( argv[2], XSDRAW::Session() ); + FillDicWS(DicFile); + AddWS(argv[2], XSDRAW::Session()); break; } - default : di<<"Error on writing file\n"; break; + default: di << "Error on writing file\n"; break; } } else @@ -583,48 +607,58 @@ static Standard_Integer WriteStep (Draw_Interpretor& di, Standard_Integer argc, //function : Expand //purpose : //======================================================================= -static Standard_Integer Expand (Draw_Interpretor& di, Standard_Integer argc, const char** argv) +static Standard_Integer Expand(Draw_Interpretor& di, Standard_Integer argc, const char** argv) { - if (argc < 3) { - di<<"Use: "<Main()); Standard_Boolean recurs = Standard_False; - if(atoi(argv[2]) != 0) + if (atoi(argv[2]) != 0) recurs = Standard_True; if (argc == 3) { - if(!XCAFDoc_Editor::Expand(Doc->Main(), recurs)){ + if (!XCAFDoc_Editor::Expand(Doc->Main(), recurs)) + { di << "No suitable labels to expand\n"; return 1; } } - else + else { for (Standard_Integer i = 3; i < argc; i++) { TDF_Label aLabel; TDF_Tool::Label(Doc->GetData(), argv[i], aLabel); - if(aLabel.IsNull()){ + if (aLabel.IsNull()) + { TopoDS_Shape aShape; aShape = DBRep::Get(argv[i]); aLabel = aShapeTool->FindShape(aShape); } - if (!aLabel.IsNull()){ - if(!XCAFDoc_Editor::Expand(Doc->Main(), aLabel, recurs)){ + if (!aLabel.IsNull()) + { + if (!XCAFDoc_Editor::Expand(Doc->Main(), aLabel, recurs)) + { di << "The shape is assembly or not compound\n"; return 1; } } else - { di << argv[i] << " is not a shape\n"; return 1; } + { + di << argv[i] << " is not a shape\n"; return 1; + } } } return 0; @@ -700,14 +734,16 @@ static Standard_Integer Extract(Draw_Interpretor& di, static Standard_Integer WriteVrml(Draw_Interpretor& di, Standard_Integer argc, const char** argv) { - if (argc <3) { + if (argc < 3) + { di << "Use: " << argv[0] << " Doc filename: write document to Vrml file\n"; return 0; } Handle(TDocStd_Document) aDoc; DDocStd::GetDocument(argv[1], aDoc); - if (aDoc.IsNull()) { + if (aDoc.IsNull()) + { di << argv[1] << " is not a document\n"; return 1; } @@ -734,6 +770,337 @@ static Standard_Integer WriteVrml(Draw_Interpretor& di, Standard_Integer argc, c return 0; } +//======================================================================= +//function : DumpConfiguration +//purpose : +//======================================================================= +static Standard_Integer DumpConfiguration(Draw_Interpretor& theDI, + Standard_Integer theNbArgs, + const char** theArgVec) +{ + Handle(DE_Wrapper) aConf = DE_Wrapper::GlobalWrapper(); + TCollection_AsciiString aPath; + Standard_Boolean aIsRecursive = Standard_True; + Standard_Boolean isHandleFormat = Standard_False; + Standard_Boolean isHandleVendors = Standard_False; + TColStd_ListOfAsciiString aFormats; + TColStd_ListOfAsciiString aVendors; + for (Standard_Integer anArgIter = 1; anArgIter < theNbArgs; ++anArgIter) + { + TCollection_AsciiString anArg(theArgVec[anArgIter]); + anArg.LowerCase(); + if ((anArg == "-path") && + (anArgIter + 1 < theNbArgs)) + { + ++anArgIter; + aPath = theArgVec[anArgIter]; + } + else if ((anArg == "-recursive") && + (anArgIter + 1 < theNbArgs) && + Draw::ParseOnOff(theArgVec[anArgIter + 1], aIsRecursive)) + { + ++anArgIter; + } + else if (anArg == "-format") + { + isHandleFormat = Standard_True; + isHandleVendors = Standard_False; + } + else if (anArg == "-vendor") + { + isHandleFormat = Standard_False; + isHandleVendors = Standard_True; + } + else if (isHandleFormat) + { + aFormats.Append(theArgVec[anArgIter]); + } + else if (isHandleVendors) + { + aVendors.Append(theArgVec[anArgIter]); + } + else if (!isHandleFormat && !isHandleVendors) + { + Message::SendFail() << "Syntax error at argument '" << theArgVec[anArgIter] << "'\n"; + return 1; + } + } + Standard_Boolean aStat = Standard_True; + if (!aPath.IsEmpty()) + { + aStat = aConf->Save(aPath, aIsRecursive, aFormats ,aVendors); + } + else + { + theDI << aConf->Save(aIsRecursive, aFormats, aVendors) << "\n"; + } + if (!aStat) + { + return 1; + } + return 0; +} + +//======================================================================= +//function : CompareConfiguration +//purpose : +//======================================================================= +static Standard_Integer CompareConfiguration(Draw_Interpretor& theDI, + Standard_Integer theNbArgs, + const char** theArgVec) +{ + if (theNbArgs > 5) + { + theDI.PrintHelp(theArgVec[0]); + return 1; + } + Handle(DE_ConfigurationContext) aResourceFirst = new DE_ConfigurationContext(); + if (!aResourceFirst->Load(theArgVec[1])) + { + Message::SendFail() << "Error: Can't load first configuration"; + return 1; + } + Handle(DE_ConfigurationContext) aResourceSecond = new DE_ConfigurationContext(); + if (!aResourceSecond->Load(theArgVec[2])) + { + Message::SendFail() << "Error: Can't load second configuration"; + return 1; + } + const DE_ResourceMap& aResourceMapFirst = aResourceFirst->GetInternalMap(); + const DE_ResourceMap& aResourceMapSecond = aResourceSecond->GetInternalMap(); + Standard_Integer anDiffers = 0; + for (DE_ResourceMap::Iterator anOrigIt(aResourceMapFirst); + anOrigIt.More(); anOrigIt.Next()) + { + const TCollection_AsciiString& anOrigValue = anOrigIt.Value(); + const TCollection_AsciiString& anOrigKey = anOrigIt.Key(); + TCollection_AsciiString aCompValue; + if (!aResourceMapSecond.Find(anOrigKey, aCompValue)) + { + Message::SendWarning() << "Second configuration don't have the next scope : " << anOrigKey; + anDiffers++; + } + if (!aCompValue.IsEqual(anOrigValue)) + { + Message::SendWarning() << "Configurations have differs value with the next scope :" << anOrigKey + << " First value : " << anOrigValue << " Second value : " << aCompValue; + anDiffers++; + } + } + TCollection_AsciiString aMessage; + if (aResourceMapFirst.Extent() != aResourceMapSecond.Extent() || anDiffers > 0) + { + Message::SendFail() << "Error: Configurations are not same : " << " Differs count : " << anDiffers << " Count of first's scopes : " << aResourceMapFirst.Extent() + << " Count of second's scopes : " << aResourceMapSecond.Extent(); + return 1; + } + return 0; +} + +//======================================================================= +//function : LoadConfiguration +//purpose : +//======================================================================= +static Standard_Integer LoadConfiguration(Draw_Interpretor& theDI, + Standard_Integer theNbArgs, + const char** theArgVec) +{ + if (theNbArgs > 4) + { + theDI.PrintHelp(theArgVec[0]); + return 1; + } + Handle(DE_Wrapper) aConf = DE_Wrapper::GlobalWrapper(); + TCollection_AsciiString aString = theArgVec[1]; + Standard_Boolean aIsRecursive = Standard_True; + if (theNbArgs == 4) + { + TCollection_AsciiString anArg = theArgVec[2]; + anArg.LowerCase(); + if (!(anArg == "-recursive") || + !Draw::ParseOnOff(theArgVec[3], aIsRecursive)) + { + Message::SendFail() << "Syntax error at argument '" << theArgVec[3] << "'"; + return 1; + } + } + if (!aConf->Load(aString, aIsRecursive)) + { + Message::SendFail() << "Error: configuration is incorrect"; + return 1; + } + return 0; +} + +//======================================================================= +//function : ReadFile +//purpose : +//======================================================================= +static Standard_Integer ReadFile(Draw_Interpretor& theDI, + Standard_Integer theNbArgs, + const char** theArgVec) +{ + if (theNbArgs > 6) + { + theDI.PrintHelp(theArgVec[0]); + return 1; + } + TCollection_AsciiString aDocShapeName; + TCollection_AsciiString aFilePath; + Handle(TDocStd_Document) aDoc; + Handle(TDocStd_Application) anApp = DDocStd::GetApplication(); + TCollection_AsciiString aConfString; + Standard_Boolean isNoDoc = (TCollection_AsciiString(theArgVec[0]) == "readfile"); + for (Standard_Integer anArgIter = 1; anArgIter < theNbArgs; ++anArgIter) + { + TCollection_AsciiString anArg(theArgVec[anArgIter]); + anArg.LowerCase(); + if ((anArg == "-conf") && + (anArgIter + 1 < theNbArgs)) + { + ++anArgIter; + aConfString = theArgVec[anArgIter]; + } + else if (aDocShapeName.IsEmpty()) + { + aDocShapeName = theArgVec[anArgIter]; + Standard_CString aNameVar = aDocShapeName.ToCString(); + if(!isNoDoc) + { + DDocStd::GetDocument(aNameVar, aDoc, Standard_False); + } + } + else if (aFilePath.IsEmpty()) + { + aFilePath = theArgVec[anArgIter]; + } + else + { + Message::SendFail() << "Syntax error at argument '" << theArgVec[anArgIter] << "'"; + return 1; + } + } + if (aDocShapeName.IsEmpty() || aFilePath.IsEmpty()) + { + Message::SendFail() << "Syntax error: wrong number of arguments"; + return 1; + } + if (aDoc.IsNull() && !isNoDoc) + { + anApp->NewDocument(TCollection_ExtendedString("BinXCAF"), aDoc); + Handle(DDocStd_DrawDocument) aDrawDoc = new DDocStd_DrawDocument(aDoc); + TDataStd_Name::Set(aDoc->GetData()->Root(), theArgVec[1]); + Draw::Set(theArgVec[1], aDrawDoc); + } + + Handle(DE_Wrapper) aConf = DE_Wrapper::GlobalWrapper()->Copy(); + Standard_Boolean aStat = Standard_True; + if (!aConfString.IsEmpty()) + { + aStat = aConf->Load(aConfString); + } + if (aStat) + { + TopoDS_Shape aShape; + aStat = isNoDoc ? aConf->Read(aFilePath, aShape) : aConf->Read(aFilePath, aDoc); + if(isNoDoc && aStat) + { + DBRep::Set(aDocShapeName.ToCString(), aShape); + } + } + if (!aStat) + { + return 1; + } + return 0; +} + +//======================================================================= +//function : WriteFile +//purpose : +//======================================================================= +static Standard_Integer WriteFile(Draw_Interpretor& theDI, + Standard_Integer theNbArgs, + const char** theArgVec) +{ + if (theNbArgs > 6) + { + theDI.PrintHelp(theArgVec[0]); + return 1; + } + TCollection_AsciiString aDocShapeName; + TCollection_AsciiString aFilePath; + Handle(TDocStd_Document) aDoc; + Handle(TDocStd_Application) anApp = DDocStd::GetApplication(); + TCollection_AsciiString aConfString; + Standard_Boolean isNoDoc = (TCollection_AsciiString(theArgVec[0]) == "writefile"); + for (Standard_Integer anArgIter = 1; anArgIter < theNbArgs; ++anArgIter) + { + TCollection_AsciiString anArg(theArgVec[anArgIter]); + anArg.LowerCase(); + if ((anArg == "-conf") && + (anArgIter + 1 < theNbArgs)) + { + ++anArgIter; + aConfString = theArgVec[anArgIter]; + } + else if (aDocShapeName.IsEmpty()) + { + aDocShapeName = theArgVec[anArgIter]; + Standard_CString aNameVar = aDocShapeName.ToCString(); + if (!isNoDoc) + { + DDocStd::GetDocument(aNameVar, aDoc, Standard_False); + } + } + else if (aFilePath.IsEmpty()) + { + aFilePath = theArgVec[anArgIter]; + } + else + { + Message::SendFail() << "Syntax error at argument '" << theArgVec[anArgIter] << "'"; + return 1; + } + } + if (aDocShapeName.IsEmpty() || aFilePath.IsEmpty()) + { + Message::SendFail() << "Syntax error: wrong number of arguments"; + return 1; + } + if (aDoc.IsNull() && !isNoDoc) + { + Message::SendFail() << "Error: incorrect document"; + } + Handle(DE_Wrapper) aConf = DE_Wrapper::GlobalWrapper()->Copy(); + Standard_Boolean aStat = Standard_True; + if (!aConfString.IsEmpty()) + { + aStat = aConf->Load(aConfString); + } + if (aStat) + { + if(isNoDoc) + { + TopoDS_Shape aShape = DBRep::Get(aDocShapeName); + if(aShape.IsNull()) + { + Message::SendFail() << "Error: incorrect shape"; + return 1; + } + aStat = aConf->Write(aFilePath, aShape); + } + else + { + aStat = aConf->Write(aFilePath, aDoc); + } + } + if (!aStat) + { + return 1; + } + return 0; +} void XDEDRAW_Common::InitCommands(Draw_Interpretor& di) { @@ -746,25 +1113,61 @@ void XDEDRAW_Common::InitCommands(Draw_Interpretor& di) Standard_CString g = "XDE translation commands"; - di.Add("ReadIges" , "Doc filename: Read IGES file to DECAF document" ,__FILE__, ReadIges, g); - di.Add("WriteIges" , "Doc filename: Write DECAF document to IGES file" ,__FILE__, WriteIges, g); - di.Add("ReadStep" , + di.Add("ReadIges", "Doc filename: Read IGES file to DECAF document", __FILE__, ReadIges, g); + di.Add("WriteIges", "Doc filename: Write DECAF document to IGES file", __FILE__, WriteIges, g); + di.Add("ReadStep", "Doc filename [mode]" "\n\t\t: Read STEP file to a document.", __FILE__, ReadStep, g); - di.Add("WriteStep" , "Doc filename [mode=a [multifile_prefix] [label]]: Write DECAF document to STEP file" ,__FILE__, WriteStep, g); - - di.Add("XFileList","Print list of files that was transferred by the last transfer" ,__FILE__, GetDicWSList , g); - di.Add("XFileCur", ": returns name of file which is set as current",__FILE__, GetCurWS, g); - di.Add("XFileSet", "filename: Set the specified file to be the current one",__FILE__, SetCurWS, g); - di.Add("XFromShape", "shape: do fromshape command for all the files",__FILE__, FromShape, g); - - di.Add("XExpand", "XExpand Doc recursively(0/1) or XExpand Doc recursively(0/1) label1 label2 ..." - "or XExpand Doc recursively(0/1) shape1 shape2 ...",__FILE__, Expand, g); + di.Add("WriteStep", "Doc filename [mode=a [multifile_prefix] [label]]: Write DECAF document to STEP file", __FILE__, WriteStep, g); + + di.Add("XFileList", "Print list of files that was transferred by the last transfer", __FILE__, GetDicWSList, g); + di.Add("XFileCur", ": returns name of file which is set as current", __FILE__, GetCurWS, g); + di.Add("XFileSet", "filename: Set the specified file to be the current one", __FILE__, SetCurWS, g); + di.Add("XFromShape", "shape: do fromshape command for all the files", __FILE__, FromShape, g); + + di.Add("XExpand", "XExpand Doc recursively(0/1) or XExpand Doc recursively(0/1) label1 label2 ..." + "or XExpand Doc recursively(0/1) shape1 shape2 ...", __FILE__, Expand, g); di.Add("XExtract", "XExtract dstDoc [dstAssmblSh] srcDoc srcLabel1 srcLabel2 ...\t" - "Extracts given srcLabel1 srcLabel2 ... from srcDoc into given Doc or assembly shape", - __FILE__, Extract, g); + "Extracts given srcLabel1 srcLabel2 ... from srcDoc into given Doc or assembly shape", + __FILE__, Extract, g); di.Add("WriteVrml", "Doc filename [version VRML#1.0/VRML#2.0 (1/2): 2 by default] [representation shaded/wireframe/both (0/1/2): 0 by default]", __FILE__, WriteVrml, g); + di.Add("DumpConfiguration", + "DumpConfiguration [-path ] [-recursive {on|off}] [-format fmt1 fmt2 ...] [-vendor vend1 vend2 ...]\n" + "\n\t\t: Dump special resource generated from global configuration." + "\n\t\t: '-path' - save resource configuration to the file" + "\n\t\t: '-recursive' - flag to generate a resource from providers. Default is On. Off disables other options" + "\n\t\t: '-format' - flag to generate a resource for choosen formats. If list is empty, generate it for all" + "\n\t\t: '-vendor' - flag to generate a resource for choosen vendors. If list is empty, generate it for all", + __FILE__, DumpConfiguration, g); + di.Add("LoadConfiguration", + "LoadConfiguration conf [-recursive {on|off}]\n" + "\n\t\t: 'conf' - path to the resouce file or string value in the special format" + "\n\t\t: '-recursive' - flag to generate a resource for all providers. Default is true" + "\n\t\t: Configure global configuration according special resource", + __FILE__, LoadConfiguration, g); + di.Add("CompareConfiguration", + "CompareConfiguration conf1 conf2\n" + "\n\t\t: 'conf1' - path to the first resouce file or string value in the special format" + "\n\t\t: 'conf2' - path to the second resouce file or string value in the special format" + "\n\t\t: Compare two configurations", + __FILE__, CompareConfiguration, g); + di.Add("ReadFile", + "ReadFile docName filePath [-conf ]\n" + "\n\t\t: Read CAD file to document with registered format's providers. Use global configuration by default.", + __FILE__, ReadFile, g); + di.Add("readfile", + "readfile shapeName filePath [-conf ]\n" + "\n\t\t: Read CAD file to shape with registered format's providers. Use global configuration by default.", + __FILE__, ReadFile, g); + di.Add("WriteFile", + "WriteFile docName filePath [-conf ]\n" + "\n\t\t: Write CAD file to document with registered format's providers. Use global configuration by default.", + __FILE__, WriteFile, g); + di.Add("writefile", + "writefile shapeName filePath [-conf ]\n" + "\n\t\t: Write CAD file to shape with registered format's providers. Use global configuration by default.", + __FILE__, WriteFile, g); } diff --git a/src/XSDRAWSTLVRML/XSDRAWSTLVRML.cxx b/src/XSDRAWSTLVRML/XSDRAWSTLVRML.cxx index 6d3422963d..5abe0d7b87 100644 --- a/src/XSDRAWSTLVRML/XSDRAWSTLVRML.cxx +++ b/src/XSDRAWSTLVRML/XSDRAWSTLVRML.cxx @@ -1047,6 +1047,7 @@ static Standard_Integer loadvrml } VrmlData_Scene aScene; + XSAlgo::AlgoContainer()->PrepareForTransfer(); // update unit info Standard_Real anOCCUnitMM = UnitsMethods::GetCasCadeLengthUnit(); aScene.SetLinearScale(1000. / anOCCUnitMM); diff --git a/tests/de_wrapper/begin b/tests/de_wrapper/begin new file mode 100644 index 0000000000..23c0924765 --- /dev/null +++ b/tests/de_wrapper/begin @@ -0,0 +1,5 @@ +# File: begin + +pload XDE +pload OCAF +pload TOPTEST diff --git a/tests/de_wrapper/brep/A1 b/tests/de_wrapper/brep/A1 new file mode 100644 index 0000000000..fa788f5b60 --- /dev/null +++ b/tests/de_wrapper/brep/A1 @@ -0,0 +1,16 @@ +puts "============" +puts "0032821: DEWrapper - Implementation of a common toolkit for importing and exporting CAD files" +puts "============" +puts "" + +readbrep ${filename} S_First + +set file_path ${imagedir}/${casename}.brep + +writebrep S_First $file_path + +readfile S_Second $file_path + +checknbshapes S_Second -ref [nbshapes S_First] + +file delete $file_path diff --git a/tests/de_wrapper/brep/A2 b/tests/de_wrapper/brep/A2 new file mode 100644 index 0000000000..295ed9ceb5 --- /dev/null +++ b/tests/de_wrapper/brep/A2 @@ -0,0 +1,22 @@ +puts "============" +puts "0032821: DEWrapper - Implementation of a common toolkit for importing and exporting CAD files" +puts "============" +puts "" + +catch { Close D_First } +catch { Close D_Second } + +readbrep ${filename} S_First +XNewDoc D_First +XAddShape D_First S_First + +set file_path ${imagedir}/${casename}.brep + +WriteFile D_First $file_path + +readbrep ${filename} S_Second + +checknbshapes S_Second -ref [nbshapes S_First] + +file delete $file_path +Close D_First diff --git a/tests/de_wrapper/brep/A3 b/tests/de_wrapper/brep/A3 new file mode 100644 index 0000000000..8e99b07aa4 --- /dev/null +++ b/tests/de_wrapper/brep/A3 @@ -0,0 +1,20 @@ +puts "============" +puts "0032821: DEWrapper - Implementation of a common toolkit for importing and exporting CAD files" +puts "============" +puts "" + +catch { Close D_First } + +readbrep ${filename} S_First + +set file_path ${imagedir}/${casename}.brep + +writefile S_First $file_path + +ReadFile D_First $file_path +XGetOneShape S_Second D_First + +checknbshapes S_Second -ref [nbshapes S_First] + +file delete $file_path +Close D_First diff --git a/tests/de_wrapper/brep/A4 b/tests/de_wrapper/brep/A4 new file mode 100644 index 0000000000..acf66c29eb --- /dev/null +++ b/tests/de_wrapper/brep/A4 @@ -0,0 +1,16 @@ +puts "============" +puts "0032821: DEWrapper - Implementation of a common toolkit for importing and exporting CAD files" +puts "============" +puts "" + +readfile S_First ${filename} + +set file_path ${imagedir}/${casename}.brep + +writefile S_First $file_path + +readfile S_Second $file_path + +checknbshapes S_Second -ref [nbshapes S_First] + +file delete $file_path diff --git a/tests/de_wrapper/brep/begin b/tests/de_wrapper/brep/begin new file mode 100644 index 0000000000..7d23da0cfe --- /dev/null +++ b/tests/de_wrapper/brep/begin @@ -0,0 +1,3 @@ +# File: begin + +set filename [locate_data_file "bug24490_face_naturalrestriction_flag.brep"] diff --git a/tests/de_wrapper/configuration/A1 b/tests/de_wrapper/configuration/A1 new file mode 100644 index 0000000000..ecbe3af5a0 --- /dev/null +++ b/tests/de_wrapper/configuration/A1 @@ -0,0 +1,15 @@ +puts "============" +puts "0032821: DEWrapper - Implementation of a common toolkit for importing and exporting CAD files" +puts "============" +puts "" + +# Checking the stability of ability to change the configuration's values +set old_conf [DumpConfiguration] + +set res_conf [changeconf "1" "$old_conf"] + +LoadConfiguration ${res_conf} +set new_conf [DumpConfiguration] + +CompareConfiguration ${res_conf} ${new_conf} + diff --git a/tests/de_wrapper/configuration/A2 b/tests/de_wrapper/configuration/A2 new file mode 100644 index 0000000000..d30688a031 --- /dev/null +++ b/tests/de_wrapper/configuration/A2 @@ -0,0 +1,15 @@ +puts "============" +puts "0032821: DEWrapper - Implementation of a common toolkit for importing and exporting CAD files" +puts "============" +puts "" + +# Checking the stability of ability to change the configuration's values +set old_conf [DumpConfiguration] + +set res_conf [changeconf "0" "$old_conf"] + +LoadConfiguration ${res_conf} +set new_conf [DumpConfiguration] + +CompareConfiguration ${res_conf} ${new_conf} + diff --git a/tests/de_wrapper/configuration/A3 b/tests/de_wrapper/configuration/A3 new file mode 100644 index 0000000000..6c80b290d6 --- /dev/null +++ b/tests/de_wrapper/configuration/A3 @@ -0,0 +1,164 @@ +puts "============" +puts "0032821: DEWrapper - Implementation of a common toolkit for importing and exporting CAD files" +puts "============" +puts "" + +# Checking the stability of the initial configuration +set ref_conf " +global.priority.STEP : OCC +global.priority.VRML : OCC +global.priority.STL : OCC +global.priority.OBJ : OCC +global.priority.GLTF : OCC +global.priority.BREP : OCC +global.priority.XCAF : OCC +global.priority.IGES : OCC +global.priority.PLY : OCC +global.general.length.unit : 1 +provider.STEP.OCC.read.iges.bspline.continuity : 1 +provider.STEP.OCC.read.precision.mode : 0 +provider.STEP.OCC.read.precision.val : 0.0001 +provider.STEP.OCC.read.maxprecision.mode : 0 +provider.STEP.OCC.read.maxprecision.val : 1 +provider.STEP.OCC.read.stdsameparameter.mode : 0 +provider.STEP.OCC.read.surfacecurve.mode : 0 +provider.STEP.OCC.read.encoderegularity.angle : 0.572958 +provider.STEP.OCC.angleunit.mode : 0 +provider.STEP.OCC.read.resource.name : STEP +provider.STEP.OCC.read.sequence : FromSTEP +provider.STEP.OCC.read.product.mode : 1 +provider.STEP.OCC.read.product.context : 1 +provider.STEP.OCC.read.shape.repr : 1 +provider.STEP.OCC.read.tessellated : 1 +provider.STEP.OCC.read.assembly.level : 1 +provider.STEP.OCC.read.shape.relationship : 1 +provider.STEP.OCC.read.shape.aspect : 1 +provider.STEP.OCC.read.constructivegeom.relationship : 0 +provider.STEP.OCC.read.stepcaf.subshapes.name : 0 +provider.STEP.OCC.read.codepage : 4 +provider.STEP.OCC.read.nonmanifold : 0 +provider.STEP.OCC.read.ideas : 0 +provider.STEP.OCC.read.all.shapes : 0 +provider.STEP.OCC.read.root.transformation : 1 +provider.STEP.OCC.read.color : 1 +provider.STEP.OCC.read.name : 1 +provider.STEP.OCC.read.layer : 1 +provider.STEP.OCC.read.props : 1 +provider.STEP.OCC.write.precision.mode : 0 +provider.STEP.OCC.write.precision.val : 0.0001 +provider.STEP.OCC.write.assembly : 0 +provider.STEP.OCC.write.schema : 1 +provider.STEP.OCC.write.tessellated : 2 +provider.STEP.OCC.write.product.name : +provider.STEP.OCC.write.surfacecurve.mode : 1 +provider.STEP.OCC.write.unit : 2 +provider.STEP.OCC.write.resource.name : STEP +provider.STEP.OCC.write.sequence : ToSTEP +provider.STEP.OCC.write.vertex.mode : 0 +provider.STEP.OCC.write.stepcaf.subshapes.name : 0 +provider.STEP.OCC.write.color : 1 +provider.STEP.OCC.write.name : 1 +provider.STEP.OCC.write.layer : 1 +provider.STEP.OCC.write.props : 1 +provider.STEP.OCC.write.model.type : 0 +provider.VRML.OCC.writer.version : 2 +provider.VRML.OCC.write.representation.type : 1 +provider.STL.OCC.read.merge.angle : 90 +provider.STL.OCC.read.brep : 0 +provider.STL.OCC.write.ascii : 1 +provider.OBJ.OCC.file.length.unit : 1 +provider.OBJ.OCC.system.cs : 0 +provider.OBJ.OCC.file.cs : 1 +provider.OBJ.OCC.read.single.precision : 0 +provider.OBJ.OCC.read.create.shapes : 0 +provider.OBJ.OCC.read.root.prefix : +provider.OBJ.OCC.read.fill.doc : 1 +provider.OBJ.OCC.read.fill.incomplete : 1 +provider.OBJ.OCC.read.memory.limit.mib : -1 +provider.OBJ.OCC.write.comment : +provider.OBJ.OCC.write.author : +provider.GLTF.OCC.file.length.unit : 1 +provider.GLTF.OCC.system.cs : 0 +provider.GLTF.OCC.file.cs : 1 +provider.GLTF.OCC.read.single.precision : 1 +provider.GLTF.OCC.read.create.shapes : 0 +provider.GLTF.OCC.read.root.prefix : +provider.GLTF.OCC.read.fill.doc : 1 +provider.GLTF.OCC.read.fill.incomplete : 1 +provider.GLTF.OCC.read.memory.limit.mib : -1 +provider.GLTF.OCC.read.parallel : 0 +provider.GLTF.OCC.read.skip.empty.nodes : 1 +provider.GLTF.OCC.read.load.all.scenes : 0 +provider.GLTF.OCC.read.use.mesh.name.as.fallback : 1 +provider.GLTF.OCC.read.skip.late.data.loading : 0 +provider.GLTF.OCC.read.keep.late.data : 1 +provider.GLTF.OCC.read.print.debug.message : 0 +provider.GLTF.OCC.write.comment : +provider.GLTF.OCC.write.author : +provider.GLTF.OCC.write.trsf.format : 0 +provider.GLTF.OCC.write.node.name.format : 3 +provider.GLTF.OCC.write.mesh.name.format : 1 +provider.GLTF.OCC.write.forced.uv.export : 0 +provider.GLTF.OCC.write.embed.textures.in.glb : 1 +provider.GLTF.OCC.write.merge.faces : 0 +provider.GLTF.OCC.write.split.indices16 : 0 +provider.BREP.OCC.write.binary : 1 +provider.BREP.OCC.write.version.binary : 4 +provider.BREP.OCC.write.version.ascii : 3 +provider.BREP.OCC.write.triangles : 1 +provider.BREP.OCC.write.normals : 1 +provider.XCAF.OCC.read.append.mode : 0 +provider.XCAF.OCC.read.skip.values : +provider.XCAF.OCC.read.values : +provider.IGES.OCC.read.iges.bspline.continuity : 1 +provider.IGES.OCC.read.precision.mode : 0 +provider.IGES.OCC.read.precision.val : 0.0001 +provider.IGES.OCC.read.maxprecision.mode : 0 +provider.IGES.OCC.read.maxprecision.val : 1 +provider.IGES.OCC.read.stdsameparameter.mode : 0 +provider.IGES.OCC.read.surfacecurve.mode : 0 +provider.IGES.OCC.read.encoderegularity.angle : 0.572958 +provider.IGES.OCC.read.bspline.approxd1.mode : 0 +provider.IGES.OCC.read.resource.name : IGES +provider.IGES.OCC.read.sequence : FromIGES +provider.IGES.OCC.read.fau_lty.entities : 0 +provider.IGES.OCC.read.onlyvisible : 0 +provider.IGES.OCC.read.color : 1 +provider.IGES.OCC.read.name : 1 +provider.IGES.OCC.read.layer : 1 +provider.IGES.OCC.write.brep.mode : 0 +provider.IGES.OCC.write.convertsurface.mode : 0 +provider.IGES.OCC.write.unit : 2 +provider.IGES.OCC.write.header.author : +provider.IGES.OCC.write.header.company : +provider.IGES.OCC.write.header.product : +provider.IGES.OCC.write.header.receiver : +provider.IGES.OCC.write.resource.name : IGES +provider.IGES.OCC.write.sequence : ToIGES +provider.IGES.OCC.write.precision.mode : 0 +provider.IGES.OCC.write.precision.val : 0.0001 +provider.IGES.OCC.write.plane.mode : 0 +provider.IGES.OCC.write.offset : 0 +provider.IGES.OCC.write.color : 1 +provider.IGES.OCC.write.name : 1 +provider.IGES.OCC.write.layer : 1 +provider.PLY.OCC.file.length.unit : 1 +provider.PLY.OCC.system.cs : 0 +provider.PLY.OCC.file.cs : 1 +provider.PLY.OCC.write.pnt.set : 0 +provider.PLY.OCC.write.distance : 0 +provider.PLY.OCC.write.density : 2e+100 +provider.PLY.OCC.write.tolerance : 1e-07 +provider.PLY.OCC.write.normals : 1 +provider.PLY.OCC.write.colors : 1 +provider.PLY.OCC.write.tex.coords : 0 +provider.PLY.OCC.write.part.id : 1 +provider.PLY.OCC.write.face.id : 0 +provider.PLY.OCC.write.comment : +provider.PLY.OCC.write.author : + +" + +set dump_conf [DumpConfiguration] + +CompareConfiguration $ref_conf $dump_conf diff --git a/tests/de_wrapper/configuration/A4 b/tests/de_wrapper/configuration/A4 new file mode 100644 index 0000000000..cda1c9a4b2 --- /dev/null +++ b/tests/de_wrapper/configuration/A4 @@ -0,0 +1,100 @@ +puts "============" +puts "0032821: DEWrapper - Implementation of a common toolkit for importing and exporting CAD files" +puts "============" +puts "" + +# Checking the dumping resource for the two format only +set conf_ref " +global.priority.STEP : OCC +global.priority.VRML : OCC +global.priority.STL : OCC +global.priority.OBJ : OCC +global.priority.GLTF : OCC +global.priority.BREP : OCC +global.priority.XCAF : OCC +global.priority.IGES : OCC +global.priority.PLY : OCC +global.general.length.unit : 1 +provider.STEP.OCC.read.iges.bspline.continuity : 1 +provider.STEP.OCC.read.precision.mode : 0 +provider.STEP.OCC.read.precision.val : 0.0001 +provider.STEP.OCC.read.maxprecision.mode : 0 +provider.STEP.OCC.read.maxprecision.val : 1 +provider.STEP.OCC.read.stdsameparameter.mode : 0 +provider.STEP.OCC.read.surfacecurve.mode : 0 +provider.STEP.OCC.read.encoderegularity.angle : 0.572958 +provider.STEP.OCC.angleunit.mode : 0 +provider.STEP.OCC.read.resource.name : STEP +provider.STEP.OCC.read.sequence : FromSTEP +provider.STEP.OCC.read.product.mode : 1 +provider.STEP.OCC.read.product.context : 1 +provider.STEP.OCC.read.shape.repr : 1 +provider.STEP.OCC.read.tessellated : 1 +provider.STEP.OCC.read.assembly.level : 1 +provider.STEP.OCC.read.shape.relationship : 1 +provider.STEP.OCC.read.shape.aspect : 1 +provider.STEP.OCC.read.constructivegeom.relationship : 0 +provider.STEP.OCC.read.stepcaf.subshapes.name : 0 +provider.STEP.OCC.read.codepage : 4 +provider.STEP.OCC.read.nonmanifold : 0 +provider.STEP.OCC.read.ideas : 0 +provider.STEP.OCC.read.all.shapes : 0 +provider.STEP.OCC.read.root.transformation : 1 +provider.STEP.OCC.read.color : 1 +provider.STEP.OCC.read.name : 1 +provider.STEP.OCC.read.layer : 1 +provider.STEP.OCC.read.props : 1 +provider.STEP.OCC.write.precision.mode : 0 +provider.STEP.OCC.write.precision.val : 0.0001 +provider.STEP.OCC.write.assembly : 0 +provider.STEP.OCC.write.schema : 1 +provider.STEP.OCC.write.tessellated : 2 +provider.STEP.OCC.write.product.name : +provider.STEP.OCC.write.surfacecurve.mode : 1 +provider.STEP.OCC.write.unit : 2 +provider.STEP.OCC.write.resource.name : STEP +provider.STEP.OCC.write.sequence : ToSTEP +provider.STEP.OCC.write.vertex.mode : 0 +provider.STEP.OCC.write.stepcaf.subshapes.name : 0 +provider.STEP.OCC.write.color : 1 +provider.STEP.OCC.write.name : 1 +provider.STEP.OCC.write.layer : 1 +provider.STEP.OCC.write.props : 1 +provider.STEP.OCC.write.model.type : 0 +provider.IGES.OCC.read.iges.bspline.continuity : 1 +provider.IGES.OCC.read.precision.mode : 0 +provider.IGES.OCC.read.precision.val : 0.0001 +provider.IGES.OCC.read.maxprecision.mode : 0 +provider.IGES.OCC.read.maxprecision.val : 1 +provider.IGES.OCC.read.stdsameparameter.mode : 0 +provider.IGES.OCC.read.surfacecurve.mode : 0 +provider.IGES.OCC.read.encoderegularity.angle : 0.572958 +provider.IGES.OCC.read.bspline.approxd1.mode : 0 +provider.IGES.OCC.read.resource.name : IGES +provider.IGES.OCC.read.sequence : FromIGES +provider.IGES.OCC.read.fau_lty.entities : 0 +provider.IGES.OCC.read.onlyvisible : 0 +provider.IGES.OCC.read.color : 1 +provider.IGES.OCC.read.name : 1 +provider.IGES.OCC.read.layer : 1 +provider.IGES.OCC.write.brep.mode : 0 +provider.IGES.OCC.write.convertsurface.mode : 0 +provider.IGES.OCC.write.unit : 2 +provider.IGES.OCC.write.header.author : +provider.IGES.OCC.write.header.company : +provider.IGES.OCC.write.header.product : +provider.IGES.OCC.write.header.receiver : +provider.IGES.OCC.write.resource.name : IGES +provider.IGES.OCC.write.sequence : ToIGES +provider.IGES.OCC.write.precision.mode : 0 +provider.IGES.OCC.write.precision.val : 0.0001 +provider.IGES.OCC.write.plane.mode : 0 +provider.IGES.OCC.write.offset : 0 +provider.IGES.OCC.write.color : 1 +provider.IGES.OCC.write.name : 1 +provider.IGES.OCC.write.layer : 1 +" + +set conf [DumpConfiguration -vendor OCC -format STEP IGES] + +CompareConfiguration ${conf_ref} ${conf} diff --git a/tests/de_wrapper/configuration/begin b/tests/de_wrapper/configuration/begin new file mode 100644 index 0000000000..aa519b2262 --- /dev/null +++ b/tests/de_wrapper/configuration/begin @@ -0,0 +1,16 @@ +# File : begin + +proc changeconf {value conf} { + set res "" + foreach iter [split $conf \n] { + if {![regexp {!.*} $iter]} { + if {[regexp {(provider.*:)} $iter scope]} { + append res "$scope $value \t\n" + } + if {[regexp {(global.*:)} $iter scope]} { + append res "$iter\n" + } + } + } + return $res +} diff --git a/tests/de_wrapper/end b/tests/de_wrapper/end new file mode 100644 index 0000000000..73b3acd4ea --- /dev/null +++ b/tests/de_wrapper/end @@ -0,0 +1 @@ +puts "TEST COMPLETED" diff --git a/tests/de_wrapper/gltf/A1 b/tests/de_wrapper/gltf/A1 new file mode 100644 index 0000000000..a2859cc8c2 --- /dev/null +++ b/tests/de_wrapper/gltf/A1 @@ -0,0 +1,23 @@ +puts "============" +puts "0032821: DEWrapper - Implementation of a common toolkit for importing and exporting CAD files" +puts "============" +puts "" + +catch { Close D_First } +catch { Close D_Second } + +ReadGltf D_First ${filename} +XGetOneShape S_First D_First + +set file_path ${imagedir}/${casename}.gltf + +WriteGltf D_First $file_path + +ReadFile D_Second $file_path +XGetOneShape S_Second D_Second + +checktrinfo S_Second -ref [trinfo S_First] + +file delete $file_path +Close D_First +Close D_Second diff --git a/tests/de_wrapper/gltf/A2 b/tests/de_wrapper/gltf/A2 new file mode 100644 index 0000000000..69cfed564b --- /dev/null +++ b/tests/de_wrapper/gltf/A2 @@ -0,0 +1,23 @@ +puts "============" +puts "0032821: DEWrapper - Implementation of a common toolkit for importing and exporting CAD files" +puts "============" +puts "" + +catch { Close D_First } +catch { Close D_Second } + +ReadGltf D_First ${filename} +XGetOneShape S_First D_First + +set file_path ${imagedir}/${casename}.gltf + +WriteFile D_First $file_path -conf "provider.GLTF.OCC.author: GLTF_AUTHOR " + +ReadGltf D_Second $file_path +XGetOneShape S_Second D_Second + +checktrinfo S_Second -ref [trinfo S_First] + +file delete $file_path +Close D_First +Close D_Second diff --git a/tests/de_wrapper/gltf/A3 b/tests/de_wrapper/gltf/A3 new file mode 100644 index 0000000000..0e667c7163 --- /dev/null +++ b/tests/de_wrapper/gltf/A3 @@ -0,0 +1,23 @@ +puts "============" +puts "0032821: DEWrapper - Implementation of a common toolkit for importing and exporting CAD files" +puts "============" +puts "" + +catch { Close D_First } +catch { Close D_Second } + +ReadGltf D_First ${filename} +XGetOneShape S_First D_First + +set file_path ${imagedir}/${casename}.gltf + +writefile S_First $file_path -conf "provider.GLTF.OCC.author: GLTF_AUTHOR " + +ReadGltf D_Second $file_path +XGetOneShape S_Second D_Second + +checktrinfo S_Second -ref [trinfo S_First] + +file delete $file_path +Close D_First +Close D_Second diff --git a/tests/de_wrapper/gltf/A4 b/tests/de_wrapper/gltf/A4 new file mode 100644 index 0000000000..635f6b0960 --- /dev/null +++ b/tests/de_wrapper/gltf/A4 @@ -0,0 +1,16 @@ +puts "============" +puts "0032821: DEWrapper - Implementation of a common toolkit for importing and exporting CAD files" +puts "============" +puts "" + +readfile S_First ${filename} + +set file_path ${imagedir}/${casename}.gltf + +writefile S_First $file_path -conf "provider.GLTF.OCC.author: GLTF_AUTHOR " + +readfile S_Second $file_path + +checktrinfo S_Second -ref [trinfo S_First] + +file delete $file_path diff --git a/tests/de_wrapper/gltf/A5 b/tests/de_wrapper/gltf/A5 new file mode 100644 index 0000000000..2f8dc36a3c --- /dev/null +++ b/tests/de_wrapper/gltf/A5 @@ -0,0 +1,62 @@ +puts "============" +puts "0032821: DEWrapper - Implementation of a common toolkit for importing and exporting CAD files" +puts "============" +puts "" + +catch { Close D2 } +catch { Close D3 } + +param xstep.cascade.unit MM +if [catch {readgltf res0 $filename} catch_result] { + puts "Error : Problem with reading file" +} else { + puts "OK : Reading is correct" +} +param xstep.cascade.unit M +if [catch {readgltf res1 $filename} catch_result] { + puts "Error : Problem with reading file" +} else { + puts "OK : Reading is correct" +} + +if [catch {ReadFile D2 $filename} catch_result] { + puts "Error : Problem with reading file" +} else { + puts "OK : Reading is correct" +} +XGetOneShape S2 D2 +if { [XGetLengthUnit D2] != "mm" } { + puts "Error: incrorrect document's length unit" +} + +XNewDoc D3 +if [catch {ReadFile D3 $filename -conf "global.general.length.unit : 1000 "} catch_result] { + puts "Error : Problem with reading file" +} else { + puts "OK : Reading is correct" +} +XGetOneShape S3 D3 +if { [XGetLengthUnit D3] != "m" } { + puts "Error: incrorrect document's length unit" +} + +if [catch {readfile S4 $filename } catch_result] { + puts "Error : Problem with reading file" +} else { + puts "OK : Reading is correct" +} + +if [catch {readfile S5 $filename -conf "global.general.length.unit : 1000 "} catch_result] { + puts "Error : Problem with reading file" +} else { + puts "OK : Reading is correct" +} + +array set areas {0 3.18785e+06 1 3.18785 2 3.18785e+06 3 3.18785 4 3.18785e+06 5 3.18785} +array set results {0 res0 1 res1 2 S2 3 S3 4 S4 5 S5} +for { set anind 0} { $anind < 6 } { incr anind } { + checkprops $results($anind) -s $areas($anind) -eps 1e-2 +} + +Close D2 +Close D3 diff --git a/tests/de_wrapper/gltf/A6 b/tests/de_wrapper/gltf/A6 new file mode 100644 index 0000000000..ea78ba1bf1 --- /dev/null +++ b/tests/de_wrapper/gltf/A6 @@ -0,0 +1,110 @@ +puts "============" +puts "0032821: DEWrapper - Implementation of a common toolkit for importing and exporting CAD files" +puts "============" +puts "" + +catch { Close D0 } +catch { Close D1 } +catch { Close D6 } +catch { Close D7 } + +pload MODELING + +set write_path ${imagedir}/${casename}.gltf + +param xstep.cascade.unit MM +if [catch {ReadGltf D0 $filename} catch_result] { + puts "Error : Problem with reading file" +} else { + puts "OK : Reading is correct" +} +XGetOneShape S0 D0 + +param xstep.cascade.unit M +if [catch {ReadGltf D1 $filename} catch_result] { + puts "Error : Problem with reading file" +} else { + puts "OK : Reading is correct" +} +XGetOneShape S1 D1 + +if [catch {WriteFile D0 $write_path -conf "provider.GLTF.OCC.file.length.unit : 0.001 "} catch_result] { + puts "Error : Problem with writing file" +} else { + puts "OK : Writing is correct" +} +if [catch {readfile S2 $write_path} catch_result] { + puts "Error : Problem with reading file" +} else { + puts "OK : Reading is correct" +} + +if [catch {writefile S0 $write_path} catch_result] { + puts "Error : Problem with writing file" +} else { + puts "OK : Writing is correct" +} +if [catch {readfile S3 $write_path} catch_result] { + puts "Error : Problem with reading file" +} else { + puts "OK : Reading is correct" +} + +if [catch {WriteFile D1 $write_path -conf "provider.GLTF.OCC.file.length.unit : 1 "} catch_result] { + puts "Error : Problem with writing file" +} else { + puts "OK : Writing is correct" +} +if [catch {readfile S4 $write_path -conf "global.general.length.unit : 1000 "} catch_result] { + puts "Error : Problem with reading file" +} else { + puts "OK : Reading is correct" +} + +if [catch {writefile S1 $write_path} catch_result] { + puts "Error : Problem with writing file" +} else { + puts "OK : Writing is correct" +} +if [catch {readfile S5 $write_path} catch_result] { + puts "Error : Problem with reading file" +} else { + puts "OK : Reading is correct" +} + +if [catch {WriteFile D0 $write_path -conf "provider.GLTF.OCC.file.length.unit : 0.001 "} catch_result] { + puts "Error : Problem with writing file" +} else { + puts "OK : Writing is correct" +} +if [catch {ReadFile D6 $write_path -conf "global.general.length.unit : 1 "} catch_result] { + puts "Error : Problem with reading file" +} else { + puts "OK : Reading is correct" +} +XGetOneShape S6 D6 + +if [catch {writefile S1 $write_path -conf "provider.GLTF.OCC.file.length.unit : 1 "} catch_result] { + puts "Error : Problem with writing file" +} else { + puts "OK : Writing is correct" +} +if [catch {ReadFile D7 $write_path -conf "global.general.length.unit : 1000 "} catch_result] { + puts "Error : Problem with reading file" +} else { + puts "OK : Reading is correct" +} +XGetOneShape S7 D7 + +array set areas {0 3.18785e+06 1 3.18785 2 3.18785e+06 3 3.18785e+06 4 3.18785 5 3.18785 6 3.18785e+06 7 3.18785e-06} +array set results {0 S0 1 S1 2 S2 3 S3 4 S4 5 S5 6 S6 7 S7} +for { set anind 0} { $anind < 8 } { incr anind } { + checkprops $results($anind) -s $areas($anind) -eps 1e-2 +} + +file delete $write_path + +Close D0 +Close D1 +Close D6 +Close D7 diff --git a/tests/de_wrapper/gltf/begin b/tests/de_wrapper/gltf/begin new file mode 100644 index 0000000000..c70f737cda --- /dev/null +++ b/tests/de_wrapper/gltf/begin @@ -0,0 +1,3 @@ +# File: begin + +set filename [locate_data_file "bug31302_NormalTangentTest.gltf"] diff --git a/tests/de_wrapper/grids.list b/tests/de_wrapper/grids.list new file mode 100644 index 0000000000..08138d98e8 --- /dev/null +++ b/tests/de_wrapper/grids.list @@ -0,0 +1,13 @@ +# This test group is aimed to demonstrate how test cases are created, +# and test the test system itself + +001 configuration +002 brep +003 gltf +004 iges +005 obj +006 ply +007 step +008 stl +009 vrml +010 xcaf diff --git a/tests/de_wrapper/iges/A1 b/tests/de_wrapper/iges/A1 new file mode 100644 index 0000000000..77e384c7d2 --- /dev/null +++ b/tests/de_wrapper/iges/A1 @@ -0,0 +1,18 @@ +puts "============" +puts "0032821: DEWrapper - Implementation of a common toolkit for importing and exporting CAD files" +puts "============" +puts "" + +catch { Close D_First } +catch { Close D_Second } + +ReadIges D_First ${filename} +XGetOneShape S_First D_First + +ReadFile D_Second ${filename} +XGetOneShape S_Second D_Second + +checknbshapes S_Second -ref [nbshapes S_First] + +Close D_First +Close D_Second diff --git a/tests/de_wrapper/iges/A2 b/tests/de_wrapper/iges/A2 new file mode 100644 index 0000000000..b9c2ba0da7 --- /dev/null +++ b/tests/de_wrapper/iges/A2 @@ -0,0 +1,27 @@ +puts "============" +puts "0032821: DEWrapper - Implementation of a common toolkit for importing and exporting CAD files" +puts "============" +puts "" + +catch { Close D_First } +catch { Close D_Second } + +set file_path ${imagedir}/${casename}.igs + +ReadIges D_First ${filename} +WriteIges D_First $file_path +Close D_First + +ReadIges D_First $file_path +XGetOneShape S_First D_First + +WriteFile D_First $file_path + +ReadIges D_Second $file_path +XGetOneShape S_Second D_Second + +checknbshapes S_Second -ref [nbshapes S_First] + +file delete $file_path +Close D_First +Close D_Second diff --git a/tests/de_wrapper/iges/A3 b/tests/de_wrapper/iges/A3 new file mode 100644 index 0000000000..f52fc89e27 --- /dev/null +++ b/tests/de_wrapper/iges/A3 @@ -0,0 +1,27 @@ +puts "============" +puts "0032821: DEWrapper - Implementation of a common toolkit for importing and exporting CAD files" +puts "============" +puts "" + +catch { Close D_First } +catch { Close D_Second } + +set file_path ${imagedir}/${casename}.igs + +ReadIges D_First ${filename} +WriteIges D_First $file_path +Close D_First + +ReadIges D_First $file_path +XGetOneShape S_First D_First + +writefile S_First $file_path + +ReadIges D_Second $file_path +XGetOneShape S_Second D_Second + +checknbshapes S_Second -ref [nbshapes S_First] + +file delete $file_path +Close D_First +Close D_Second diff --git a/tests/de_wrapper/iges/A4 b/tests/de_wrapper/iges/A4 new file mode 100644 index 0000000000..6ee7011577 --- /dev/null +++ b/tests/de_wrapper/iges/A4 @@ -0,0 +1,28 @@ +puts "============" +puts "0032821: DEWrapper - Implementation of a common toolkit for importing and exporting CAD files" +puts "============" +puts "" + +catch { Close D_First } + +set file_path ${imagedir}/${casename}.igs + +ReadIges D_First ${filename} +XGetOneShape S_First D_First + +WriteIges D_First $file_path +Close D_First +ReadIges D_First $file_path +XGetOneShape S_Second D_First + +readfile S_Third ${filename} + +writefile S_Third $file_path + +readfile S_Fourth $file_path + +checknbshapes S_First -ref [nbshapes S_Third] +checknbshapes S_Second -ref [nbshapes S_Fourth] + +file delete $file_path +Close D_First diff --git a/tests/de_wrapper/iges/A5 b/tests/de_wrapper/iges/A5 new file mode 100644 index 0000000000..a31484a917 --- /dev/null +++ b/tests/de_wrapper/iges/A5 @@ -0,0 +1,63 @@ +puts "============" +puts "0032821: DEWrapper - Implementation of a common toolkit for importing and exporting CAD files" +puts "============" +puts "" + +catch { Close D2 } +catch { Close D3 } + +param xstep.cascade.unit MM +if [catch {igesread $filename res0 *} catch_result] { + puts "Error : Problem with reading file" +} else { + puts "OK : Reading is correct" +} +param xstep.cascade.unit M +if [catch {igesread $filename res1 *} catch_result] { + puts "Error : Problem with reading file" +} else { + puts "OK : Reading is correct" +} +# param xstep.cascade.unit MM + +if [catch {ReadFile D2 $filename} catch_result] { + puts "Error : Problem with reading file" +} else { + puts "OK : Reading is correct" +} +XGetOneShape S2 D2 +if { [XGetLengthUnit D2] != "mm" } { + puts "Error: incrorrect document's length unit" +} + +XNewDoc D3 +if [catch {ReadFile D3 $filename -conf "global.general.length.unit : 1000 "} catch_result] { + puts "Error : Problem with reading file" +} else { + puts "OK : Reading is correct" +} +if { [XGetLengthUnit D3] != "m" } { + puts "Error: incrorrect document's length unit" +} +XGetOneShape S3 D3 + +if [catch {readfile S4 $filename -conf "global.general.length.unit : 1 "} catch_result] { + puts "Error : Problem with reading file" +} else { + puts "OK : Reading is correct" +} + +if [catch {readfile S5 $filename -conf "global.general.length.unit : 1000 "} catch_result] { + puts "Error : Problem with reading file" +} else { + puts "OK : Reading is correct" +} + +array set volumes {0 11995.4 1 0.0119954 2 11995.4 3 0.0119954 4 11995.4 5 0.0119954} +array set results {0 res0 1 res1 2 S2 3 S3 4 S4 5 S5} +for { set anind 0} { $anind < 6 } { incr anind } { + checkprops $results($anind) -s $volumes($anind) -eps 1e-2 +} + +Close D2 +Close D3 diff --git a/tests/de_wrapper/iges/A6 b/tests/de_wrapper/iges/A6 new file mode 100644 index 0000000000..8f8563f3a9 --- /dev/null +++ b/tests/de_wrapper/iges/A6 @@ -0,0 +1,110 @@ +puts "============" +puts "0032821: DEWrapper - Implementation of a common toolkit for importing and exporting CAD files" +puts "============" +puts "" + +catch { Close D0 } +catch { Close D1 } +catch { Close D6 } +catch { Close D7 } + +pload MODELING + +set write_path ${imagedir}/${casename}.igs + +param xstep.cascade.unit MM +if [catch {ReadIges D0 $filename} catch_result] { + puts "Error : Problem with reading file" +} else { + puts "OK : Reading is correct" +} +XGetOneShape S0 D0 + +param xstep.cascade.unit M +if [catch {ReadIges D1 $filename } catch_result] { + puts "Error : Problem with reading file" +} else { + puts "OK : Reading is correct" +} +XGetOneShape S1 D1 + +if [catch {WriteFile D0 $write_path -conf "provider.IGES.write.iges.unit : 1 "} catch_result] { + puts "Error : Problem with writing file" +} else { + puts "OK : Writing is correct" +} +if [catch {readfile S2 $write_path } catch_result] { + puts "Error : Problem with reading file" +} else { + puts "OK : Reading is correct" +} + +if [catch {writefile S0 $write_path } catch_result] { + puts "Error : Problem with writing file" +} else { + puts "OK : Writing is correct" +} +if [catch {readfile S3 $write_path} catch_result] { + puts "Error : Problem with reading file" +} else { + puts "OK : Reading is correct" +} + +if [catch {WriteFile D1 $write_path -conf "provider.IGES.write.iges.unit : 6 "} catch_result] { + puts "Error : Problem with writing file" +} else { + puts "OK : Writing is correct" +} +if [catch {readfile S4 $write_path -conf "global.general.length.unit : 1 "} catch_result] { + puts "Error : Problem with reading file" +} else { + puts "OK : Reading is correct" +} + +if [catch {writefile S1 $write_path} catch_result] { + puts "Error : Problem with writing file" +} else { + puts "OK : Writing is correct" +} +if [catch {readfile S5 $write_path} catch_result] { + puts "Error : Problem with reading file" +} else { + puts "OK : Reading is correct" +} + +if [catch {WriteFile D0 $write_path -conf "provider.IGES.write.iges.unit : 2 "} catch_result] { + puts "Error : Problem with writing file" +} else { + puts "OK : Writing is correct" +} +if [catch {ReadFile D6 $write_path -conf "global.general.length.unit : 1 "} catch_result] { + puts "Error : Problem with reading file" +} else { + puts "OK : Reading is correct" +} +XGetOneShape S6 D6 + +if [catch {writefile S1 $write_path -conf "provider.IGES.write.iges.unit : 1 "} catch_result] { + puts "Error : Problem with writing file" +} else { + puts "OK : Writing is correct" +} +if [catch {ReadFile D7 $write_path -conf "global.general.length.unit : 0.0254 "} catch_result] { + puts "Error : Problem with reading file" +} else { + puts "OK : Reading is correct" +} +XGetOneShape S7 D7 + +array set areas {0 11995.4 1 0.0119954 2 47916.8 3 11979.2 4 0.0479168 5 0.0119792 6 47916.8 7 18.5678} +array set results {0 S0 1 S1 2 S2 3 S3 4 S4 5 S5 6 S6 7 S7} +for { set anind 0} { $anind < 8 } { incr anind } { + checkprops $results($anind) -s $areas($anind) -eps 1e-2 +} + +file delete $write_path + +Close D0 +Close D1 +Close D6 +Close D7 diff --git a/tests/de_wrapper/iges/begin b/tests/de_wrapper/iges/begin new file mode 100644 index 0000000000..b53aeaefab --- /dev/null +++ b/tests/de_wrapper/iges/begin @@ -0,0 +1,4 @@ +# File: begin + +set filename [locate_data_file "bug22869_Spring.igs"] + diff --git a/tests/de_wrapper/obj/A1 b/tests/de_wrapper/obj/A1 new file mode 100644 index 0000000000..33cc927774 --- /dev/null +++ b/tests/de_wrapper/obj/A1 @@ -0,0 +1,23 @@ +puts "============" +puts "0032821: DEWrapper - Implementation of a common toolkit for importing and exporting CAD files" +puts "============" +puts "" + +catch { Close D_First } +catch { Close D_Second } + +ReadObj D_First ${filename} +XGetOneShape S_First D_First + +set file_path ${imagedir}/${casename}.obj + +WriteObj D_First $file_path + +ReadFile D_Second $file_path +XGetOneShape S_Second D_Second + +checktrinfo S_Second -ref [trinfo S_First] + +file delete $file_path +Close D_First +Close D_Second diff --git a/tests/de_wrapper/obj/A2 b/tests/de_wrapper/obj/A2 new file mode 100644 index 0000000000..14eb411f28 --- /dev/null +++ b/tests/de_wrapper/obj/A2 @@ -0,0 +1,23 @@ +puts "============" +puts "0032821: DEWrapper - Implementation of a common toolkit for importing and exporting CAD files" +puts "============" +puts "" + +catch { Close D_First } +catch { Close D_Second } + +ReadObj D_First ${filename} +XGetOneShape S_First D_First + +set file_path ${imagedir}/${casename}.obj + +WriteFile D_First $file_path -conf "provider.OBJ.OCC.author: Alexander " + +ReadObj D_Second $file_path +XGetOneShape S_Second D_Second + +checktrinfo S_Second -ref [trinfo S_First] + +file delete $file_path +Close D_First +Close D_Second diff --git a/tests/de_wrapper/obj/A3 b/tests/de_wrapper/obj/A3 new file mode 100644 index 0000000000..d1c2d1a3e1 --- /dev/null +++ b/tests/de_wrapper/obj/A3 @@ -0,0 +1,23 @@ +puts "============" +puts "0032821: DEWrapper - Implementation of a common toolkit for importing and exporting CAD files" +puts "============" +puts "" + +catch { Close D_First } +catch { Close D_Second } + +ReadObj D_First ${filename} +XGetOneShape S_First D_First + +set file_path ${imagedir}/${casename}.obj + +writefile S_First $file_path -conf "provider.OBJ.OCC.author: Alexander " + +ReadObj D_Second $file_path +XGetOneShape S_Second D_Second + +checktrinfo S_Second -ref [trinfo S_First] + +file delete $file_path +Close D_First +Close D_Second diff --git a/tests/de_wrapper/obj/A4 b/tests/de_wrapper/obj/A4 new file mode 100644 index 0000000000..f2f6ccef2f --- /dev/null +++ b/tests/de_wrapper/obj/A4 @@ -0,0 +1,16 @@ +puts "============" +puts "0032821: DEWrapper - Implementation of a common toolkit for importing and exporting CAD files" +puts "============" +puts "" + +readfile S_First ${filename} + +set file_path ${imagedir}/${casename}.obj + +writefile S_First $file_path -conf "provider.OBJ.OCC.author: Alexander " + +readfile S_Second $file_path + +checktrinfo S_Second -ref [trinfo S_First] + +file delete $file_path diff --git a/tests/de_wrapper/obj/A5 b/tests/de_wrapper/obj/A5 new file mode 100644 index 0000000000..1cc0a4d16b --- /dev/null +++ b/tests/de_wrapper/obj/A5 @@ -0,0 +1,62 @@ +puts "============" +puts "0032821: DEWrapper - Implementation of a common toolkit for importing and exporting CAD files" +puts "============" +puts "" + +catch { Close D2 } +catch { Close D3 } + +param xstep.cascade.unit MM +if [catch {readobj res0 $filename} catch_result] { + puts "Error : Problem with reading file" +} else { + puts "OK : Reading is correct" +} +param xstep.cascade.unit M +if [catch {readobj res1 $filename} catch_result] { + puts "Error : Problem with reading file" +} else { + puts "OK : Reading is correct" +} + +if [catch {ReadFile D2 $filename} catch_result] { + puts "Error : Problem with reading file" +} else { + puts "OK : Reading is correct" +} +XGetOneShape S2 D2 +if { [XGetLengthUnit D2] != "mm" } { + puts "Error: incrorrect document's length unit" +} + +XNewDoc D3 +if [catch {ReadFile D3 $filename -conf "global.general.length.unit : 1000 "} catch_result] { + puts "Error : Problem with reading file" +} else { + puts "OK : Reading is correct" +} +if { [XGetLengthUnit D3] != "m" } { + puts "Error: incrorrect document's length unit" +} +XGetOneShape S3 D3 + +if [catch {readfile S4 $filename } catch_result] { + puts "Error : Problem with reading file" +} else { + puts "OK : Reading is correct" +} + +if [catch {readfile S5 $filename -conf "global.general.length.unit : 1000 "} catch_result] { + puts "Error : Problem with reading file" +} else { + puts "OK : Reading is correct" +} + +array set areas {0 1.21752e+07 1 1.21752e+07 2 1.21752e+13 3 1.21752e+07 4 1.21752e+13 5 1.21752e+07} +array set results {0 res0 1 res1 2 S2 3 S3 4 S4 5 S5} +for { set anind 0} { $anind < 6 } { incr anind } { + checkprops $results($anind) -s $areas($anind) -eps 1e-2 +} + +Close D2 +Close D3 diff --git a/tests/de_wrapper/obj/A6 b/tests/de_wrapper/obj/A6 new file mode 100644 index 0000000000..975a597efa --- /dev/null +++ b/tests/de_wrapper/obj/A6 @@ -0,0 +1,110 @@ +puts "============" +puts "0032821: DEWrapper - Implementation of a common toolkit for importing and exporting CAD files" +puts "============" +puts "" + +catch { Close D0 } +catch { Close D1 } +catch { Close D6 } +catch { Close D7 } + +pload MODELING + +set write_path ${imagedir}/${casename}.obj + +param xstep.cascade.unit MM +if [catch {ReadObj D0 $filename} catch_result] { + puts "Error : Problem with reading file" +} else { + puts "OK : Reading is correct" +} +XGetOneShape S0 D0 + +param xstep.cascade.unit M +if [catch {ReadObj D1 $filename -fileUnit mm } catch_result] { + puts "Error : Problem with reading file" +} else { + puts "OK : Reading is correct" +} +XGetOneShape S1 D1 + +if [catch {WriteFile D0 $write_path -conf "provider.OBJ.OCC.file.length.unit : 0.001 "} catch_result] { + puts "Error : Problem with writing file" +} else { + puts "OK : Writing is correct" +} +if [catch {readfile S2 $write_path} catch_result] { + puts "Error : Problem with reading file" +} else { + puts "OK : Reading is correct" +} + +if [catch {writefile S0 $write_path} catch_result] { + puts "Error : Problem with writing file" +} else { + puts "OK : Writing is correct" +} +if [catch {readfile S3 $write_path} catch_result] { + puts "Error : Problem with reading file" +} else { + puts "OK : Reading is correct" +} + +if [catch {WriteFile D1 $write_path -conf "provider.OBJ.OCC.file.length.unit : 1 "} catch_result] { + puts "Error : Problem with writing file" +} else { + puts "OK : Writing is correct" +} +if [catch {readfile S4 $write_path -conf "global.general.length.unit : 1000 "} catch_result] { + puts "Error : Problem with reading file" +} else { + puts "OK : Reading is correct" +} + +if [catch {writefile S1 $write_path} catch_result] { + puts "Error : Problem with writing file" +} else { + puts "OK : Writing is correct" +} +if [catch {readfile S5 $write_path} catch_result] { + puts "Error : Problem with reading file" +} else { + puts "OK : Reading is correct" +} + +if [catch {WriteFile D0 $write_path -conf "provider.GLTF.OCC.file.length.unit : 0.001 "} catch_result] { + puts "Error : Problem with writing file" +} else { + puts "OK : Writing is correct" +} +if [catch {ReadFile D6 $write_path -conf "global.general.length.unit : 1 "} catch_result] { + puts "Error : Problem with reading file" +} else { + puts "OK : Reading is correct" +} +XGetOneShape S6 D6 + +if [catch {writefile S1 $write_path -conf "provider.GLTF.OCC.file.length.unit : 1 "} catch_result] { + puts "Error : Problem with writing file" +} else { + puts "OK : Writing is correct" +} +if [catch {ReadFile D7 $write_path -conf "global.general.length.unit : 1000 "} catch_result] { + puts "Error : Problem with reading file" +} else { + puts "OK : Reading is correct" +} +XGetOneShape S7 D7 + +array set areas {0 1.21752e+07 1 12.1752 2 1.21752e+07 3 1.21752e+07 4 12.1752 5 12.1752 6 1.21752e+07 7 1.21773e-05} +array set results {0 S0 1 S1 2 S2 3 S3 4 S4 5 S5 6 S6 7 S7} +for { set anind 0} { $anind < 8 } { incr anind } { + checkprops $results($anind) -s $areas($anind) -eps 1e-2 +} + +file delete $write_path + +Close D0 +Close D1 +Close D6 +Close D7 diff --git a/tests/de_wrapper/obj/begin b/tests/de_wrapper/obj/begin new file mode 100644 index 0000000000..2f3de9070b --- /dev/null +++ b/tests/de_wrapper/obj/begin @@ -0,0 +1,3 @@ +# File: begin + +set filename [locate_data_file "P-51 Mustang.obj"] diff --git a/tests/de_wrapper/parse.rules b/tests/de_wrapper/parse.rules new file mode 100644 index 0000000000..9d0907f3c0 --- /dev/null +++ b/tests/de_wrapper/parse.rules @@ -0,0 +1,4 @@ +FAILED /\bFaulty\b/ bad shape +FAILED /failure reading attribute/ attribute failure +SKIPPED /Error: unsupported locale specification/ locale is unavailable on tested system +OK /Relative error of mass computation/ message from vprops diff --git a/tests/de_wrapper/ply/A1 b/tests/de_wrapper/ply/A1 new file mode 100644 index 0000000000..5f77af6923 --- /dev/null +++ b/tests/de_wrapper/ply/A1 @@ -0,0 +1,16 @@ +puts "============" +puts "0032821: DEWrapper - Implementation of a common toolkit for importing and exporting CAD files" +puts "============" +puts "" + +catch { Close D_First } + +ReadObj D_First ${filename} + +set file_path ${imagedir}/${casename}.ply + +WriteFile D_First $file_path -conf "provider.PLY.OCC.author: PLY_AUTHOR " + +file delete $file_path + +Close D_First diff --git a/tests/de_wrapper/ply/A2 b/tests/de_wrapper/ply/A2 new file mode 100644 index 0000000000..64d65d0170 --- /dev/null +++ b/tests/de_wrapper/ply/A2 @@ -0,0 +1,17 @@ +puts "============" +puts "0032821: DEWrapper - Implementation of a common toolkit for importing and exporting CAD files" +puts "============" +puts "" + +catch { Close D_First } + +ReadObj D_First ${filename} +XGetOneShape S_First D_First + +set file_path ${imagedir}/${casename}.ply + +writefile S_First $file_path -conf "provider.PLY.OCC.author: PLY_AUTHOR " + +file delete $file_path + +Close D_First diff --git a/tests/de_wrapper/ply/begin b/tests/de_wrapper/ply/begin new file mode 100644 index 0000000000..2f3de9070b --- /dev/null +++ b/tests/de_wrapper/ply/begin @@ -0,0 +1,3 @@ +# File: begin + +set filename [locate_data_file "P-51 Mustang.obj"] diff --git a/tests/de_wrapper/step/A1 b/tests/de_wrapper/step/A1 new file mode 100644 index 0000000000..ee4fec6fca --- /dev/null +++ b/tests/de_wrapper/step/A1 @@ -0,0 +1,18 @@ +puts "============" +puts "0032821: DEWrapper - Implementation of a common toolkit for importing and exporting CAD files" +puts "============" +puts "" + +catch { Close D_First } +catch { Close D_Second } + +ReadStep D_First ${filename} +XGetOneShape S_First D_First + +ReadFile D_Second ${filename} +XGetOneShape S_Second D_Second + +checknbshapes S_Second -ref [nbshapes S_First] + +Close D_First +Close D_Second diff --git a/tests/de_wrapper/step/A2 b/tests/de_wrapper/step/A2 new file mode 100644 index 0000000000..72612e33f5 --- /dev/null +++ b/tests/de_wrapper/step/A2 @@ -0,0 +1,23 @@ +puts "============" +puts "0032821: DEWrapper - Implementation of a common toolkit for importing and exporting CAD files" +puts "============" +puts "" + +catch { Close D_First } +catch { Close D_Second } + +ReadStep D_First ${filename} +XGetOneShape S_First D_First + +set file_path ${imagedir}/${casename}.stp + +WriteFile D_First $file_path + +ReadStep D_Second $file_path +XGetOneShape S_Second D_Second + +checknbshapes S_Second -ref [nbshapes S_First] + +file delete $file_path +Close D_First +Close D_Second diff --git a/tests/de_wrapper/step/A3 b/tests/de_wrapper/step/A3 new file mode 100644 index 0000000000..05592857cc --- /dev/null +++ b/tests/de_wrapper/step/A3 @@ -0,0 +1,23 @@ +puts "============" +puts "0032821: DEWrapper - Implementation of a common toolkit for importing and exporting CAD files" +puts "============" +puts "" + +catch { Close D_First } +catch { Close D_Second } + +ReadStep D_First ${filename} +XGetOneShape S_First D_First + +set file_path ${imagedir}/${casename}.stp + +writefile S_First $file_path + +ReadStep D_Second $file_path +XGetOneShape S_Second D_Second + +checknbshapes S_Second -ref [nbshapes S_First] + +file delete $file_path +Close D_First +Close D_Second diff --git a/tests/de_wrapper/step/A4 b/tests/de_wrapper/step/A4 new file mode 100644 index 0000000000..deac45d900 --- /dev/null +++ b/tests/de_wrapper/step/A4 @@ -0,0 +1,16 @@ +puts "============" +puts "0032821: DEWrapper - Implementation of a common toolkit for importing and exporting CAD files" +puts "============" +puts "" + +readfile S_First ${filename} + +set file_path ${imagedir}/${casename}.stp + +writefile S_First $file_path + +readfile S_Second $file_path + +checknbshapes S_Second -ref [nbshapes S_First] + +file delete $file_path diff --git a/tests/de_wrapper/step/A5 b/tests/de_wrapper/step/A5 new file mode 100644 index 0000000000..48b494cd21 --- /dev/null +++ b/tests/de_wrapper/step/A5 @@ -0,0 +1,62 @@ +puts "============" +puts "0032821: DEWrapper - Implementation of a common toolkit for importing and exporting CAD files" +puts "============" +puts "" + +catch { Close D2 } +catch { Close D3 } + +param xstep.cascade.unit MM +if [catch {stepread $filename res0 *} catch_result] { + puts "Error : Problem with reading file" +} else { + puts "OK : Reading is correct" +} +param xstep.cascade.unit M +if [catch {stepread $filename res1 *} catch_result] { + puts "Error : Problem with reading file" +} else { + puts "OK : Reading is correct" +} + +if [catch {ReadFile D2 $filename} catch_result] { + puts "Error : Problem with reading file" +} else { + puts "OK : Reading is correct" +} +XGetOneShape S2 D2 +if { [XGetLengthUnit D2] != "mm" } { + puts "Error: incrorrect document's length unit" +} + +XNewDoc D3 +if [catch {ReadFile D3 $filename -conf "global.general.length.unit : 1000 "} catch_result] { + puts "Error : Problem with reading file" +} else { + puts "OK : Reading is correct" +} +if { [XGetLengthUnit D3] != "m" } { + puts "Error: incrorrect document's length unit" +} +XGetOneShape S3 D3 + +if [catch {readfile S4 $filename} catch_result] { + puts "Error : Problem with reading file" +} else { + puts "OK : Reading is correct" +} + +if [catch {readfile S5 $filename -conf "global.general.length.unit : 1000 "} catch_result] { + puts "Error : Problem with reading file" +} else { + puts "OK : Reading is correct" +} + +array set areas {0 2.52382e+06 1 2.52382 2 2.52382e+06 3 2.52382 4 2.52382e+06 5 2.52382} +array set results {0 res0_1 1 res1_1 2 S2 3 S3 4 S4 5 S5} +for { set anind 0} { $anind < 6 } { incr anind } { + checkprops $results($anind) -s $areas($anind) -eps 1e-2 +} + +Close D2 +Close D3 diff --git a/tests/de_wrapper/step/A6 b/tests/de_wrapper/step/A6 new file mode 100644 index 0000000000..e7943453a5 --- /dev/null +++ b/tests/de_wrapper/step/A6 @@ -0,0 +1,112 @@ +puts "============" +puts "0032821: DEWrapper - Implementation of a common toolkit for importing and exporting CAD files" +puts "============" +puts "" + +catch { Close D0 } +catch { Close D1 } +catch { Close D6 } +catch { Close D7 } + +pload MODELING + +set write_path ${imagedir}/${casename}.stp + +param xstep.cascade.unit MM +if [catch {ReadStep D0 $filename} catch_result] { + puts "Error : Problem with reading file" +} else { + puts "OK : Reading is correct" +} +XGetOneShape S0 D0 + +param xstep.cascade.unit M +if [catch {ReadStep D1 $filename } catch_result] { + puts "Error : Problem with reading file" +} else { + puts "OK : Reading is correct" +} +XGetOneShape S1 D1 + +param xstep.cascade.unit MM + +if [catch {WriteFile D0 $write_path -conf "provider.STEP.write.step.unit : 1 "} catch_result] { + puts "Error : Problem with writing file" +} else { + puts "OK : Writing is correct" +} +if [catch {readfile S2 $write_path } catch_result] { + puts "Error : Problem with reading file" +} else { + puts "OK : Reading is correct" +} + +if [catch {writefile S0 $write_path } catch_result] { + puts "Error : Problem with writing file" +} else { + puts "OK : Writing is correct" +} +if [catch {readfile S3 $write_path} catch_result] { + puts "Error : Problem with reading file" +} else { + puts "OK : Reading is correct" +} + +if [catch {WriteFile D1 $write_path -conf "provider.STEP.write.step.unit : 6 "} catch_result] { + puts "Error : Problem with writing file" +} else { + puts "OK : Writing is correct" +} +if [catch {readfile S4 $write_path -conf "global.general.length.unit : 1 "} catch_result] { + puts "Error : Problem with reading file" +} else { + puts "OK : Reading is correct" +} + +if [catch {writefile S1 $write_path} catch_result] { + puts "Error : Problem with writing file" +} else { + puts "OK : Writing is correct" +} +if [catch {readfile S5 $write_path} catch_result] { + puts "Error : Problem with reading file" +} else { + puts "OK : Reading is correct" +} + +if [catch {WriteFile D0 $write_path -conf "provider.STEP.write.step.unit : 2 "} catch_result] { + puts "Error : Problem with writing file" +} else { + puts "OK : Writing is correct" +} +if [catch {ReadFile D6 $write_path -conf "global.general.length.unit : 1 "} catch_result] { + puts "Error : Problem with reading file" +} else { + puts "OK : Reading is correct" +} +XGetOneShape S6 D6 + +if [catch {writefile S1 $write_path -conf "provider.STEP.write.step.unit : 1 "} catch_result] { + puts "Error : Problem with writing file" +} else { + puts "OK : Writing is correct" +} +if [catch {ReadFile D7 $write_path -conf "global.general.length.unit : 0.0254"} catch_result] { + puts "Error : Problem with reading file" +} else { + puts "OK : Reading is correct" +} +XGetOneShape S7 D7 + +array set areas {0 2.52381e+06 1 2.52381 2 2.52381e+06 3 2.52381e+06 4 2.52381 5 2.52381 6 2.52381e+06 7 3911.92} +array set results {0 S0 1 S1 2 S2 3 S3 4 S4 5 S5 6 S6 7 S7} +for { set anind 0} { $anind < 8 } { incr anind } { + checkprops $results($anind) -s $areas($anind) -eps 1e-2 +} + +file delete $write_path + +Close D0 +Close D1 +Close D6 +Close D7 diff --git a/tests/de_wrapper/step/begin b/tests/de_wrapper/step/begin new file mode 100644 index 0000000000..293bbce9fe --- /dev/null +++ b/tests/de_wrapper/step/begin @@ -0,0 +1,3 @@ +# File: begin + +set filename [locate_data_file "bm2_pe_t4-A.stp"] diff --git a/tests/de_wrapper/stl/A1 b/tests/de_wrapper/stl/A1 new file mode 100644 index 0000000000..abc2828e83 --- /dev/null +++ b/tests/de_wrapper/stl/A1 @@ -0,0 +1,16 @@ +puts "============" +puts "0032821: DEWrapper - Implementation of a common toolkit for importing and exporting CAD files" +puts "============" +puts "" + +readstl S_First ${filename} + +set file_path ${imagedir}/${casename}.stl + +writestl S_First $file_path + +readfile S_Second $file_path + +checktrinfo S_Second -ref [trinfo S_First] + +file delete $file_path diff --git a/tests/de_wrapper/stl/A2 b/tests/de_wrapper/stl/A2 new file mode 100644 index 0000000000..ea55b799eb --- /dev/null +++ b/tests/de_wrapper/stl/A2 @@ -0,0 +1,24 @@ +puts "============" +puts "0032821: DEWrapper - Implementation of a common toolkit for importing and exporting CAD files" +puts "============" +puts "" + +catch { Close D_First } +catch { Close D_Second } + +readstl S_First ${filename} +XNewDoc D_First +XNewDoc D_Second +XAddShape D_First S_First + +set file_path ${imagedir}/${casename}.stl + +WriteFile D_First $file_path -conf "provider.STL.OCC.AsciiFlag : 2 " + +readstl S_Second $file_path + +checktrinfo S_Second -ref [trinfo S_First] + +file delete $file_path +Close D_First +Close D_Second diff --git a/tests/de_wrapper/stl/A3 b/tests/de_wrapper/stl/A3 new file mode 100644 index 0000000000..a96b9823bc --- /dev/null +++ b/tests/de_wrapper/stl/A3 @@ -0,0 +1,20 @@ +puts "============" +puts "0032821: DEWrapper - Implementation of a common toolkit for importing and exporting CAD files" +puts "============" +puts "" + +catch { Close D_First } + +readstl S_First ${filename} + +set file_path ${imagedir}/${casename}.stl + +writefile S_First $file_path -conf "provider.STL.OCC.AsciiFlag : 2 " + +ReadFile D_First $file_path +XGetOneShape S_Second D_First + +checktrinfo S_Second -ref [trinfo S_First] + +file delete $file_path +Close D_First diff --git a/tests/de_wrapper/stl/A4 b/tests/de_wrapper/stl/A4 new file mode 100644 index 0000000000..23e120a00a --- /dev/null +++ b/tests/de_wrapper/stl/A4 @@ -0,0 +1,16 @@ +puts "============" +puts "0032821: DEWrapper - Implementation of a common toolkit for importing and exporting CAD files" +puts "============" +puts "" + +readfile S_First ${filename} + +set file_path ${imagedir}/${casename}.stl + +writefile S_First $file_path -conf "provider.STL.OCC.AsciiFlag : 2 " + +readfile S_Second $file_path + +checktrinfo S_Second -ref [trinfo S_First] + +file delete $file_path diff --git a/tests/de_wrapper/stl/begin b/tests/de_wrapper/stl/begin new file mode 100644 index 0000000000..5710679506 --- /dev/null +++ b/tests/de_wrapper/stl/begin @@ -0,0 +1,4 @@ +# File: begin + +pload MODELING +set filename [locate_data_file "model_stl_001.stl"] diff --git a/tests/de_wrapper/vrml/A1 b/tests/de_wrapper/vrml/A1 new file mode 100644 index 0000000000..e9c8552943 --- /dev/null +++ b/tests/de_wrapper/vrml/A1 @@ -0,0 +1,21 @@ +puts "============" +puts "0032821: DEWrapper - Implementation of a common toolkit for importing and exporting CAD files" +puts "============" +puts "" + +catch { Close D_First } + +loadvrml S_First ${filename} +XNewDoc D_First +XAddShape D_First S_First + +set file_path ${imagedir}/${casename}.vrml + +WriteVrml D_First $file_path + +readfile S_Second $file_path + +checktrinfo S_Second -ref [trinfo S_First] + +file delete $file_path +Close D_First diff --git a/tests/de_wrapper/vrml/A2 b/tests/de_wrapper/vrml/A2 new file mode 100644 index 0000000000..36a6ab6800 --- /dev/null +++ b/tests/de_wrapper/vrml/A2 @@ -0,0 +1,21 @@ +puts "============" +puts "0032821: DEWrapper - Implementation of a common toolkit for importing and exporting CAD files" +puts "============" +puts "" + +catch { Close D_First } + +loadvrml S_First ${filename} +XNewDoc D_First +XAddShape D_First S_First + +set file_path ${imagedir}/${casename}.wrl + +WriteFile D_First $file_path -conf "provider.VRML.OCC.RepresentationType : 2 " + +loadvrml S_Second $file_path + +checktrinfo S_Second -ref [trinfo S_First] + +file delete $file_path +Close D_First diff --git a/tests/de_wrapper/vrml/A3 b/tests/de_wrapper/vrml/A3 new file mode 100644 index 0000000000..581ca8c808 --- /dev/null +++ b/tests/de_wrapper/vrml/A3 @@ -0,0 +1,16 @@ +puts "============" +puts "0032821: DEWrapper - Implementation of a common toolkit for importing and exporting CAD files" +puts "============" +puts "" + +loadvrml S_First ${filename} + +set file_path ${imagedir}/${casename}.wrl + +writefile S_First $file_path -conf "provider.VRML.OCC.RepresentationType : 2 " + +loadvrml S_Second $file_path + +checktrinfo S_Second -ref [trinfo S_First] + +file delete $file_path diff --git a/tests/de_wrapper/vrml/A4 b/tests/de_wrapper/vrml/A4 new file mode 100644 index 0000000000..2091c18f61 --- /dev/null +++ b/tests/de_wrapper/vrml/A4 @@ -0,0 +1,16 @@ +puts "============" +puts "0032821: DEWrapper - Implementation of a common toolkit for importing and exporting CAD files" +puts "============" +puts "" + +readfile S_First ${filename} + +set file_path ${imagedir}/${casename}.wrl + +writefile S_First $file_path -conf "provider.VRML.OCC.RepresentationType : 2 " + +readfile S_Second $file_path + +checktrinfo S_Second -ref [trinfo S_First] + +file delete $file_path diff --git a/tests/de_wrapper/vrml/A5 b/tests/de_wrapper/vrml/A5 new file mode 100644 index 0000000000..f71d00449f --- /dev/null +++ b/tests/de_wrapper/vrml/A5 @@ -0,0 +1,59 @@ +puts "============" +puts "0032821: DEWrapper - Implementation of a common toolkit for importing and exporting CAD files" +puts "============" +puts "" + +catch { Close D2 } +catch { Close D3 } + +param xstep.cascade.unit MM +if [catch {loadvrml res0 $filename} catch_result] { + puts "Error : Problem with reading file" +} else { + puts "OK : Reading is correct" +} +param xstep.cascade.unit M +if [catch {loadvrml res1 $filename} catch_result] { + puts "Error : Problem with reading file" +} else { + puts "OK : Reading is correct" +} + +if [catch {ReadFile D2 $filename} catch_result] { + puts "Error : Problem with reading file" +} else { + puts "OK : Reading is correct" +} +XGetOneShape S2 D2 +if { [XGetLengthUnit D2] != "mm" } { + puts "Error: incrorrect document's length unit" +} + +XNewDoc D3 +if [catch {ReadFile D3 $filename -conf "global.general.length.unit : 1000 " } catch_result] { + puts "Error : Problem with reading file" +} else { + puts "OK : Reading is correct" +} +XGetOneShape S3 D3 + +if [catch {readfile S4 $filename } catch_result] { + puts "Error : Problem with reading file" +} else { + puts "OK : Reading is correct" +} + +if [catch {readfile S5 $filename -conf "global.general.length.unit : 1000 " } catch_result] { + puts "Error : Problem with reading file" +} else { + puts "OK : Reading is correct" +} + +array set areas {0 5.3415e+06 1 5.3415 2 5.3415e+06 3 5.3415 4 5.3415e+06 5 5.3415} +array set results {0 res0 1 res1 2 S2 3 S3 4 S4 5 S5} +for { set anind 0} { $anind < 6 } { incr anind } { + checkprops $results($anind) -s $areas($anind) -eps 1e-2 +} + +Close D2 +Close D3 diff --git a/tests/de_wrapper/vrml/A6 b/tests/de_wrapper/vrml/A6 new file mode 100644 index 0000000000..c823bf1326 --- /dev/null +++ b/tests/de_wrapper/vrml/A6 @@ -0,0 +1,112 @@ +puts "============" +puts "0032821: DEWrapper - Implementation of a common toolkit for importing and exporting CAD files" +puts "============" +puts "" + +catch { Close D0 } +catch { Close D1 } +catch { Close D6 } +catch { Close D7 } + +pload MODELING + +set write_path ${imagedir}/${casename}.vrml + +param xstep.cascade.unit MM +if [catch {loadvrml S0 $filename} catch_result] { + puts "Error : Problem with reading file" +} else { + puts "OK : Reading is correct" +} +XNewDoc D0 +XAddShape D0 S0 + +param xstep.cascade.unit M +if [catch {loadvrml S1 $filename } catch_result] { + puts "Error : Problem with reading file" +} else { + puts "OK : Reading is correct" +} +XNewDoc D1 +XAddShape D1 S1 + +if [catch {WriteFile D0 $write_path} catch_result] { + puts "Error : Problem with writing file" +} else { + puts "OK : Writing is correct" +} +if [catch {readfile S2 $write_path} catch_result] { + puts "Error : Problem with reading file" +} else { + puts "OK : Reading is correct" +} + +if [catch {writefile S0 $write_path} catch_result] { + puts "Error : Problem with writing file" +} else { + puts "OK : Writing is correct" +} +if [catch {readfile S3 $write_path} catch_result] { + puts "Error : Problem with reading file" +} else { + puts "OK : Reading is correct" +} + +if [catch {WriteFile D1 $write_path} catch_result] { + puts "Error : Problem with writing file" +} else { + puts "OK : Writing is correct" +} +if [catch {readfile S4 $write_path} catch_result] { + puts "Error : Problem with reading file" +} else { + puts "OK : Reading is correct" +} + +if [catch {writefile S1 $write_path} catch_result] { + puts "Error : Problem with writing file" +} else { + puts "OK : Writing is correct" +} +if [catch {readfile S5 $write_path} catch_result] { + puts "Error : Problem with reading file" +} else { + puts "OK : Reading is correct" +} + +if [catch {WriteFile D0 $write_path} catch_result] { + puts "Error : Problem with writing file" +} else { + puts "OK : Writing is correct" +} +if [catch {ReadFile D6 $write_path -conf "global.general.length.unit : 1 "} catch_result] { + puts "Error : Problem with reading file" +} else { + puts "OK : Reading is correct" +} +XGetOneShape S6 D6 + +if [catch {writefile S1 $write_path} catch_result] { + puts "Error : Problem with writing file" +} else { + puts "OK : Writing is correct" +} +if [catch {ReadFile D7 $write_path -conf "global.general.length.unit : 1000 "} catch_result] { + puts "Error : Problem with reading file" +} else { + puts "OK : Reading is correct" +} +XGetOneShape S7 D7 + +array set areas {0 5.3415e+06 1 5.3415 2 5.3415e+06 3 5.3415e+06 4 5.3415 5 5.3415 6 5.3415e+06 7 5.3415e-06} +array set results {0 S0 1 S1 2 S2 3 S3 4 S4 5 S5 6 S6 7 S7} +for { set anind 0} { $anind < 8 } { incr anind } { + checkprops $results($anind) -s $areas($anind) -eps 1e-2 +} + +file delete $write_path + +Close D0 +Close D1 +Close D6 +Close D7 diff --git a/tests/de_wrapper/vrml/begin b/tests/de_wrapper/vrml/begin new file mode 100644 index 0000000000..1a45cc451f --- /dev/null +++ b/tests/de_wrapper/vrml/begin @@ -0,0 +1,3 @@ +# File: begin + +set filename [locate_data_file "bug29597_vrml2.wrl"] diff --git a/tests/de_wrapper/xcaf/A1 b/tests/de_wrapper/xcaf/A1 new file mode 100644 index 0000000000..0af5aaffd4 --- /dev/null +++ b/tests/de_wrapper/xcaf/A1 @@ -0,0 +1,22 @@ +puts "============" +puts "0032821: DEWrapper - Implementation of a common toolkit for importing and exporting CAD files" +puts "============" +puts "" + +catch { Close D_First } +catch { Close D_Second } + +XOpen ${filename} D_First +XGetOneShape S_First D_First + +set file_path ${imagedir}/${casename}.xbf + +XSave D_First $file_path +ReadFile D_Second $file_path +XGetOneShape S_Second D_Second + +checknbshapes S_Second -ref [nbshapes S_First] + +file delete $file_path +Close D_First +Close D_Second diff --git a/tests/de_wrapper/xcaf/A2 b/tests/de_wrapper/xcaf/A2 new file mode 100644 index 0000000000..cedec565d4 --- /dev/null +++ b/tests/de_wrapper/xcaf/A2 @@ -0,0 +1,23 @@ +puts "============" +puts "0032821: DEWrapper - Implementation of a common toolkit for importing and exporting CAD files" +puts "============" +puts "" + +catch { Close D_First } +catch { Close D_Second } + +XOpen ${filename} D_First +XGetOneShape S_First D_First + +set file_path ${imagedir}/${casename}.xbf + +WriteFile D_First $file_path -conf "provider.XCAF.OCC.append : 1 " + +XOpen $file_path D_Second +XGetOneShape S_Second D_Second + +checknbshapes S_Second -ref [nbshapes S_First] + +file delete $file_path +Close D_First +Close D_Second diff --git a/tests/de_wrapper/xcaf/A3 b/tests/de_wrapper/xcaf/A3 new file mode 100644 index 0000000000..834daea43e --- /dev/null +++ b/tests/de_wrapper/xcaf/A3 @@ -0,0 +1,22 @@ +puts "============" +puts "0032821: DEWrapper - Implementation of a common toolkit for importing and exporting CAD files" +puts "============" +puts "" + +catch { Close D_First } +catch { Close D_Second } + +XOpen ${filename} D_First +XGetOneShape S_First D_First + +set file_path ${imagedir}/${casename}.xbf + +writefile S_First $file_path -conf "provider.XCAF.OCC.append : 1 " +ReadFile D_Second $file_path +XGetOneShape S_Second D_Second + +checknbshapes S_Second -ref [nbshapes S_First] + +Close D_First +Close D_Second +file delete $file_path diff --git a/tests/de_wrapper/xcaf/A4 b/tests/de_wrapper/xcaf/A4 new file mode 100644 index 0000000000..8cb8fe6a0e --- /dev/null +++ b/tests/de_wrapper/xcaf/A4 @@ -0,0 +1,16 @@ +puts "============" +puts "0032821: DEWrapper - Implementation of a common toolkit for importing and exporting CAD files" +puts "============" +puts "" + +readfile S_First ${filename} + +set file_path ${imagedir}/${casename}.xbf + +writefile S_First $file_path -conf "provider.XCAF.OCC.append : 1 " + +readfile S_Second $file_path + +checknbshapes S_Second -ref [nbshapes S_First] + +file delete $file_path diff --git a/tests/de_wrapper/xcaf/begin b/tests/de_wrapper/xcaf/begin new file mode 100644 index 0000000000..062a8f1d98 --- /dev/null +++ b/tests/de_wrapper/xcaf/begin @@ -0,0 +1,3 @@ +# File: begin + +set filename [locate_data_file "bug30221_vmt01b.xbf"] From a29bae45f926a450dc08661293fb88ab89531f9c Mon Sep 17 00:00:00 2001 From: mgerus Date: Thu, 23 Jun 2022 08:35:33 +0300 Subject: [PATCH 313/639] 0032877: Modeling algorithms - Sweeping issue Add fix at sweeping algorithm: sweeping happens in the opposite direction as expected Add test case tests/bugs/modalg_7/bug32877 --- src/GeomFill/GeomFill_SectionPlacement.cxx | 69 +++++----------------- tests/bugs/modalg_7/bug32877 | 16 +++++ 2 files changed, 32 insertions(+), 53 deletions(-) create mode 100644 tests/bugs/modalg_7/bug32877 diff --git a/src/GeomFill/GeomFill_SectionPlacement.cxx b/src/GeomFill/GeomFill_SectionPlacement.cxx index 163429828c..a2616b4b1d 100644 --- a/src/GeomFill/GeomFill_SectionPlacement.cxx +++ b/src/GeomFill/GeomFill_SectionPlacement.cxx @@ -102,41 +102,6 @@ static Standard_Real EvalAngle(const gp_Vec& V1, return angle; } -static Standard_Integer NbSamples(const Handle(Geom_Curve)& aCurve) -{ - Standard_Real nbs = 100.; //on default - - Handle(Geom_Curve) theCurve = aCurve; - if (aCurve->IsInstance(STANDARD_TYPE(Geom_TrimmedCurve))) - theCurve = (Handle(Geom_TrimmedCurve)::DownCast(aCurve))->BasisCurve(); - - if (theCurve->IsInstance(STANDARD_TYPE(Geom_Line))) - nbs = 1; - else if (theCurve->IsKind(STANDARD_TYPE(Geom_Conic))) - nbs = 4; - else if (theCurve->IsInstance(STANDARD_TYPE(Geom_BezierCurve))) - { - Handle(Geom_BezierCurve) BC = Handle(Geom_BezierCurve)::DownCast(theCurve); - nbs = 3 + BC->NbPoles(); - } - else if (theCurve->IsInstance(STANDARD_TYPE(Geom_BSplineCurve))) - { - Handle(Geom_BSplineCurve) BC = Handle(Geom_BSplineCurve)::DownCast(theCurve); - nbs = BC->NbKnots(); - nbs *= BC->Degree(); - Standard_Real ratio = - (aCurve->LastParameter() - aCurve->FirstParameter())/(BC->LastParameter() - BC->FirstParameter()); - nbs *= ratio; - if(nbs < 4.0) - nbs = 4; - } - - if (nbs > 300.) - nbs = 300; - - return ((Standard_Integer)nbs); -} - //=============================================================== // Function :DistMini // Purpose : Examine un extrema pour updater & @@ -495,24 +460,22 @@ void GeomFill_SectionPlacement::Perform(const Handle(Adaptor3d_Curve)& Path, } } } - if (!Intersector.IsDone() || Intersector.NbPoints() == 0) - { - Standard_Integer NbPnts = NbSamples( mySection ); - TColgp_Array1OfPnt Pnts( 1, NbPnts+1 ); - Standard_Real delta = (mySection->LastParameter()-mySection->FirstParameter())/NbPnts; - for (ii = 0; ii <= NbPnts; ii++) - Pnts(ii+1) = mySection->Value( mySection->FirstParameter() + ii*delta ); - - gp_Pnt BaryCenter; - gp_Dir Xdir, Ydir; - Standard_Real Xgap, Ygap, Zgap; - GeomLib::Inertia( Pnts, BaryCenter, Xdir, Ydir, Xgap, Ygap, Zgap ); - - gp_Pnt Pfirst = Path->Value( Path->FirstParameter() ); - if (Pfirst.Distance(BaryCenter) < Plast.Distance(BaryCenter)) - PathParam = Path->FirstParameter(); - else - { + if (!Intersector.IsDone() || Intersector.NbPoints() == 0) + { + // Comparing the distances from the path's endpoints to the best matching plane of the profile. + const gp_Pnt firstPoint = Path->Value(Path->FirstParameter()); + const gp_Pnt lastPoint = Path->Value(Path->LastParameter()); + const gp_Pln plane = plan->Pln(); + Standard_Real firstDistance = plane.SquareDistance(firstPoint); + Standard_Real lastDistance = plane.SquareDistance(lastPoint); + + if (((Abs(firstDistance) < Precision::SquareConfusion()) && Abs(lastDistance) < Precision::SquareConfusion()) || + firstDistance < lastDistance) + { + PathParam = Path->FirstParameter(); + } + else + { PathParam = Path->LastParameter(); Tangente (*Path, PathParam, PonPath, dp1); PonSec = myAdpSection.Value(SecParam); diff --git a/tests/bugs/modalg_7/bug32877 b/tests/bugs/modalg_7/bug32877 new file mode 100644 index 0000000000..f17498aa2f --- /dev/null +++ b/tests/bugs/modalg_7/bug32877 @@ -0,0 +1,16 @@ +puts "=================================================" +puts "0032877: Modeling algorithms - Sweeping issue" +puts "=================================================" +puts "" + +polyline f 0 0 0 10 0 0 10 5 0 0 5 0 0 0 0 +mkplane f f +polyline path 9 1 0.01 5 2.5 4 +pipe result path f + +checkshape result +checknbshapes result -shell 1 -face 6 -wire 6 -edge 12 + +smallview +fit +checkview -screenshot -2d -path ${imagedir}/${test_image}.png \ No newline at end of file From 63fa56bc83f2f366068fd2e67fce3ea4ff0c5ee3 Mon Sep 17 00:00:00 2001 From: azv Date: Fri, 8 Apr 2022 11:03:53 +0300 Subject: [PATCH 314/639] 0032915: Geom2dAPI_InterCurveCurve, The algorithm lost an intersection point. Get rid of strange code: preliminary check of self-intersections is made on a polygonal representation of a curve, it is able to find possible intersections, but after that it filter out segments neighbor to the pair of non-intersected segments. Test case de step_4 I1 has been marked BAD, because the self-intersection is treated correctly, but the projection algorithm generates such crooked 2D curve. Reference data in test cases heal split_angle_advanced ZA5 and ZA6 has been updated, because those shapes have self-intersected edges, which are being detected now. --- src/IntCurve/IntCurve_IntPolyPolyGen.gxx | 18 +----------------- tests/bugs/modalg_8/bug32915 | 18 ++++++++++++++++++ tests/de/step_4/I1 | 1 + tests/heal/data/advanced/ZA5 | 2 +- tests/heal/data/advanced/ZA6 | 2 +- 5 files changed, 22 insertions(+), 19 deletions(-) create mode 100644 tests/bugs/modalg_8/bug32915 diff --git a/src/IntCurve/IntCurve_IntPolyPolyGen.gxx b/src/IntCurve/IntCurve_IntPolyPolyGen.gxx index 6675efbb85..96dbc6243c 100644 --- a/src/IntCurve/IntCurve_IntPolyPolyGen.gxx +++ b/src/IntCurve/IntCurve_IntPolyPolyGen.gxx @@ -388,9 +388,6 @@ void IntCurve_IntPolyPolyGen::Perform( const TheCurve& C1 } } - Standard_Integer Nelarg=(Poly1.NbSegments()/20); - if(Nelarg<2) Nelarg=2; - for(Standard_Integer sp=1; sp <= Nbsp; sp++) { if(TriIndex[sp]>0) { const Intf_SectionPoint& SPnt = InterPP.PntValue(TriIndex[sp]); @@ -401,20 +398,7 @@ void IntCurve_IntPolyPolyGen::Perform( const TheCurve& C1 if(Abs(SegIndex1-SegIndex2)>1) { EIP.Perform(Poly1,Poly1,SegIndex1,SegIndex2,ParamOn1,ParamOn2); - if(EIP.NbRoots()==0) { - //-- All neighbor segments are removed - for(Standard_Integer k=sp+1;k<=Nbsp;k++) { - Standard_Integer kk=TriIndex[k]; - // --- avoid negative indices as well as in outer done - if( kk > 0 ) { - if( Abs(SegIndex1-PtrSegIndex1[kk])< Nelarg - && Abs(SegIndex2-PtrSegIndex2[kk])< Nelarg) { - TriIndex[k]=-k; - } - } - } - } - else if(EIP.NbRoots()>=1) { + if(EIP.NbRoots()>=1) { //-------------------------------------------------------------------- //-- It is checked if the found point is a root //-------------------------------------------------------------------- diff --git a/tests/bugs/modalg_8/bug32915 b/tests/bugs/modalg_8/bug32915 new file mode 100644 index 0000000000..a6ffebb42b --- /dev/null +++ b/tests/bugs/modalg_8/bug32915 @@ -0,0 +1,18 @@ +puts "=================================================" +puts "0032915: Geom2dAPI_InterCurveCurve, The algorithm lost an intersection point." +puts "=================================================" +puts "" + +restore [locate_data_file bug32915.brep] e +mkcurve c3d e +plane p 0 0 1 +project c2d c3d p + +set inter [2dintersect c2d] +if {[regexp -all "Intersection point" $inter] != 29} { + puts "Error: Wrong number of self-intersections (expected 29 points)." +} + +v2d +2dfit +checkview -screenshot -2d -path ${imagedir}/${test_image}.png diff --git a/tests/de/step_4/I1 b/tests/de/step_4/I1 index 97c04743c8..dd5aad33ad 100644 --- a/tests/de/step_4/I1 +++ b/tests/de/step_4/I1 @@ -1,4 +1,5 @@ # !!!! This file is generated automatically, do not edit manually! See end script +puts "TODO ALL: Error : 1 differences with reference data found" set filename PRO7187.stp diff --git a/tests/heal/data/advanced/ZA5 b/tests/heal/data/advanced/ZA5 index 3ded5f2d5c..6f79cc914b 100644 --- a/tests/heal/data/advanced/ZA5 +++ b/tests/heal/data/advanced/ZA5 @@ -1,5 +1,5 @@ if {[string compare $command "SplitAngle"] == 0 } { - puts "TODO OCC23127 ALL: Faulty shapes in variables faulty_1 to faulty_4 " + puts "TODO OCC23127 ALL: Faulty shapes in variables faulty_1 to faulty_" } restore [locate_data_file SEB-1.brep] a diff --git a/tests/heal/data/advanced/ZA6 b/tests/heal/data/advanced/ZA6 index ae6df8112e..86ae5b50c2 100644 --- a/tests/heal/data/advanced/ZA6 +++ b/tests/heal/data/advanced/ZA6 @@ -1,5 +1,5 @@ if {[string compare $command "SplitAngle"] == 0 } { - puts "TODO OCC23127 ALL: Faulty shapes in variables faulty_1 to faulty_4 " + puts "TODO OCC23127 ALL: Faulty shapes in variables faulty_1 to faulty_" } restore [locate_data_file SEB-1B.brep] a From 6bf38f219b44447fad884f24a6bfcfb359e4f694 Mon Sep 17 00:00:00 2001 From: aml Date: Wed, 22 Jun 2022 18:59:47 +0300 Subject: [PATCH 315/639] 0033025: Coding - get rid of unused Standard_TooManyUsers class --- src/Standard/FILES | 1 - src/Standard/Standard_TooManyUsers.hxx | 36 -------------------------- 2 files changed, 37 deletions(-) delete mode 100644 src/Standard/Standard_TooManyUsers.hxx diff --git a/src/Standard/FILES b/src/Standard/FILES index 138b85b0fc..e6e14a2f42 100755 --- a/src/Standard/FILES +++ b/src/Standard/FILES @@ -93,7 +93,6 @@ Standard_Stream.hxx Standard_Strtod.cxx Standard_ThreadId.hxx Standard_Time.hxx -Standard_TooManyUsers.hxx Standard_Transient.cxx Standard_Transient.hxx Standard_Type.cxx diff --git a/src/Standard/Standard_TooManyUsers.hxx b/src/Standard/Standard_TooManyUsers.hxx deleted file mode 100644 index 55af97e910..0000000000 --- a/src/Standard/Standard_TooManyUsers.hxx +++ /dev/null @@ -1,36 +0,0 @@ -// Created on: 1991-09-05 -// Created by: J.P. TIRAUlt -// Copyright (c) 1991-1999 Matra Datavision -// Copyright (c) 1999-2014 OPEN CASCADE SAS -// -// This file is part of Open CASCADE Technology software library. -// -// This library is free software; you can redistribute it and/or modify it under -// the terms of the GNU Lesser General Public License version 2.1 as published -// by the Free Software Foundation, with special exception defined in the file -// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT -// distribution for complete text of the license and disclaimer of any warranty. -// -// Alternatively, this file may be used under the terms of Open CASCADE -// commercial license or contractual agreement. - -#ifndef _Standard_TooManyUsers_HeaderFile -#define _Standard_TooManyUsers_HeaderFile - -#include -#include -#include - -class Standard_TooManyUsers; -DEFINE_STANDARD_HANDLE(Standard_TooManyUsers, Standard_LicenseError) - -#if !defined No_Exception && !defined No_Standard_TooManyUsers - #define Standard_TooManyUsers_Raise_if(CONDITION, MESSAGE) \ - if (CONDITION) throw Standard_TooManyUsers(MESSAGE); -#else - #define Standard_TooManyUsers_Raise_if(CONDITION, MESSAGE) -#endif - -DEFINE_STANDARD_EXCEPTION(Standard_TooManyUsers, Standard_LicenseError) - -#endif // _Standard_TooManyUsers_HeaderFile From 581016faeb3ad5e1eaffdfec2d56fb3e8dd026b5 Mon Sep 17 00:00:00 2001 From: azv Date: Mon, 27 Jun 2022 09:57:42 +0300 Subject: [PATCH 316/639] 0033028: Standard_ConstructionError while using ShapeUpgrade_UnifySameDomain Additional check if the sequence of circular edges is a closed chain. --- .../ShapeUpgrade_UnifySameDomain.cxx | 16 ++++++++- tests/bugs/heal/bug33028 | 36 +++++++++++++++++++ 2 files changed, 51 insertions(+), 1 deletion(-) create mode 100644 tests/bugs/heal/bug33028 diff --git a/src/ShapeUpgrade/ShapeUpgrade_UnifySameDomain.cxx b/src/ShapeUpgrade/ShapeUpgrade_UnifySameDomain.cxx index 38bf20fbce..9a722f77e0 100644 --- a/src/ShapeUpgrade/ShapeUpgrade_UnifySameDomain.cxx +++ b/src/ShapeUpgrade/ShapeUpgrade_UnifySameDomain.cxx @@ -2058,8 +2058,22 @@ Standard_Boolean ShapeUpgrade_UnifySameDomain::MergeSubSeq(const TopTools_Sequen TopoDS_Vertex V[2]; V[0] = sae.FirstVertex(FE); V[1] = sae.LastVertex(TopoDS::Edge(theChain.Last())); + Standard_Boolean isClosed = V[0].IsSame(V[1]); + if (!isClosed) + { + // additionally check the points for equality to make a final decision about closedness of the result curve + gp_Pnt aP0 = BRep_Tool::Pnt(V[0]); + gp_Pnt aP1 = BRep_Tool::Pnt(V[1]); + Standard_Real aTol = Max(BRep_Tool::Tolerance(V[0]), BRep_Tool::Tolerance(V[1])); + if (aP0.SquareDistance(aP1) < aTol * aTol) + { + isClosed = Standard_True; + V[1] = V[0]; + V[1].Reverse(); + } + } TopoDS_Edge E; - if (V[0].IsSame(V[1])) { + if (isClosed) { // closed chain BRepAdaptor_Curve adef(FE); Handle(Geom_Circle) Cir1; diff --git a/tests/bugs/heal/bug33028 b/tests/bugs/heal/bug33028 new file mode 100644 index 0000000000..4650b331ae --- /dev/null +++ b/tests/bugs/heal/bug33028 @@ -0,0 +1,36 @@ +puts "========================" +puts " OCC33028: Standard_ConstructionError while using ShapeUpgrade_UnifySameDomain" +puts "========================" +puts "" + +stepread [locate_data_file bug33028_kalip.stp] s * + +set nbsBefore " +Number of shapes in shape + VERTEX : 543 + EDGE : 819 + WIRE : 359 + FACE : 289 + SHELL : 2 + SOLID : 2 + COMPSOLID : 0 + COMPOUND : 1 + SHAPE : 2015 +" +checknbshapes s_1 -ref ${nbsBefore} -t -m "result before attempt to simplify the model" + +unifysamedom result s_1 + +set nbsAfter " +Number of shapes in shape + VERTEX : 515 + EDGE : 805 + WIRE : 359 + FACE : 289 + SHELL : 2 + SOLID : 2 + COMPSOLID : 0 + COMPOUND : 1 + SHAPE : 1973 +" +checknbshapes result -ref ${nbsAfter} -t -m "result after attempt to simplify the model" From b2bce1d928eef7ca59672a8cbad80bb74f3b7def Mon Sep 17 00:00:00 2001 From: aml Date: Mon, 27 Jun 2022 19:15:13 +0300 Subject: [PATCH 317/639] 0033039: Coding - get rid of unused headers [StepData to StlAPI] --- src/STEPEdit/STEPEdit.cxx | 2 -- src/STEPEdit/STEPEdit_EditContext.cxx | 1 - src/STEPEdit/STEPEdit_EditContext.hxx | 1 - src/STEPEdit/STEPEdit_EditSDR.cxx | 1 - src/STEPEdit/STEPEdit_EditSDR.hxx | 1 - .../STEPSelections_AssemblyComponent.cxx | 1 - .../STEPSelections_AssemblyExplorer.cxx | 3 --- .../STEPSelections_AssemblyLink.cxx | 1 - src/STEPSelections/STEPSelections_Counter.cxx | 4 --- ...STEPSelections_HSequenceOfAssemblyLink.hxx | 1 - .../STEPSelections_SelectAssembly.hxx | 1 - .../STEPSelections_SelectDerived.hxx | 1 - .../STEPSelections_SelectFaces.hxx | 1 - .../STEPSelections_SelectGSCurves.hxx | 1 - .../STEPSelections_SelectInstances.cxx | 1 - .../STEPSelections_SelectInstances.hxx | 1 - src/StepData/StepData_DefaultGeneral.cxx | 1 - src/StepData/StepData_DefaultGeneral.hxx | 1 - src/StepData/StepData_Described.cxx | 2 -- src/StepData/StepData_Described.hxx | 2 -- src/StepData/StepData_ECDescr.cxx | 1 - src/StepData/StepData_ECDescr.hxx | 1 - src/StepData/StepData_EDescr.hxx | 2 -- src/StepData/StepData_ESDescr.cxx | 1 - src/StepData/StepData_ESDescr.hxx | 2 -- src/StepData/StepData_EnumTool.hxx | 2 -- src/StepData/StepData_Field.hxx | 2 -- src/StepData/StepData_FieldList.hxx | 1 - src/StepData/StepData_FieldList1.cxx | 1 - src/StepData/StepData_FieldList1.hxx | 1 - src/StepData/StepData_FieldListD.cxx | 1 - src/StepData/StepData_FieldListN.cxx | 2 -- src/StepData/StepData_FieldListN.hxx | 1 - src/StepData/StepData_FileProtocol.cxx | 1 - src/StepData/StepData_FileProtocol.hxx | 3 --- src/StepData/StepData_FileRecognizer.hxx | 1 - src/StepData/StepData_FreeFormEntity.cxx | 1 - src/StepData/StepData_FreeFormEntity.hxx | 2 -- src/StepData/StepData_GeneralModule.cxx | 1 - src/StepData/StepData_GlobalFactors.hxx | 1 - src/StepData/StepData_HArray1OfField.hxx | 1 - src/StepData/StepData_PDescr.hxx | 2 -- src/StepData/StepData_Plex.cxx | 1 - src/StepData/StepData_Plex.hxx | 2 -- src/StepData/StepData_Protocol.cxx | 2 -- src/StepData/StepData_Protocol.hxx | 3 --- src/StepData/StepData_ReadWriteModule.cxx | 4 --- src/StepData/StepData_ReadWriteModule.hxx | 3 --- src/StepData/StepData_SelectArrReal.cxx | 1 - src/StepData/StepData_SelectArrReal.hxx | 1 - src/StepData/StepData_SelectMember.hxx | 3 --- src/StepData/StepData_SelectNamed.cxx | 2 -- src/StepData/StepData_SelectNamed.hxx | 2 -- src/StepData/StepData_SelectReal.hxx | 1 - src/StepData/StepData_SelectType.hxx | 2 -- src/StepData/StepData_Simple.cxx | 2 -- src/StepData/StepData_Simple.hxx | 1 - src/StepData/StepData_StepDumper.cxx | 2 -- src/StepData/StepData_StepDumper.hxx | 1 - src/StepData/StepData_StepModel.cxx | 2 -- src/StepData/StepData_StepReaderData.cxx | 4 --- src/StepData/StepData_StepReaderData.hxx | 4 --- src/StepData/StepData_StepReaderTool.cxx | 1 - src/StepData/StepData_StepReaderTool.hxx | 1 - src/StepData/StepData_StepWriter.cxx | 4 --- src/StepData/StepData_StepWriter.hxx | 2 -- src/StepData/StepData_UndefinedEntity.cxx | 1 - src/StepData/StepData_UndefinedEntity.hxx | 2 -- src/StepData/StepData_WriterLib.hxx | 1 - .../StepDimTol_AngularityTolerance.cxx | 1 - .../StepDimTol_AngularityTolerance.hxx | 1 - src/StepDimTol/StepDimTol_AreaUnitType.hxx | 2 -- .../StepDimTol_CircularRunoutTolerance.cxx | 1 - .../StepDimTol_CircularRunoutTolerance.hxx | 1 - .../StepDimTol_CoaxialityTolerance.cxx | 1 - .../StepDimTol_CoaxialityTolerance.hxx | 1 - src/StepDimTol/StepDimTol_CommonDatum.cxx | 1 - .../StepDimTol_ConcentricityTolerance.cxx | 1 - .../StepDimTol_ConcentricityTolerance.hxx | 1 - .../StepDimTol_CylindricityTolerance.cxx | 1 - .../StepDimTol_CylindricityTolerance.hxx | 1 - src/StepDimTol/StepDimTol_Datum.cxx | 1 - .../StepDimTol_DatumReferenceCompartment.hxx | 1 - .../StepDimTol_DatumReferenceElement.hxx | 1 - .../StepDimTol_DatumReferenceModifier.hxx | 1 - .../StepDimTol_DatumReferenceModifierType.hxx | 2 -- ...DimTol_DatumReferenceModifierWithValue.hxx | 1 - src/StepDimTol/StepDimTol_DatumSystem.hxx | 2 -- src/StepDimTol/StepDimTol_DatumTarget.cxx | 1 - .../StepDimTol_FlatnessTolerance.cxx | 1 - .../StepDimTol_FlatnessTolerance.hxx | 1 - .../StepDimTol_GeneralDatumReference.hxx | 1 - .../StepDimTol_GeoTolAndGeoTolWthDatRef.cxx | 2 -- ...olAndGeoTolWthDatRefAndGeoTolWthMaxTol.cxx | 2 -- ...eoTolAndGeoTolWthDatRefAndGeoTolWthMod.cxx | 2 -- ...ndGeoTolWthDatRefAndModGeoTolAndPosTol.cxx | 2 -- ...oTolAndGeoTolWthDatRefAndUneqDisGeoTol.cxx | 3 --- .../StepDimTol_GeoTolAndGeoTolWthMaxTol.cxx | 2 -- .../StepDimTol_GeoTolAndGeoTolWthMod.cxx | 2 -- .../StepDimTol_GeometricTolerance.cxx | 1 - .../StepDimTol_GeometricToleranceModifier.hxx | 2 -- ...pDimTol_GeometricToleranceRelationship.cxx | 1 - ...l_GeometricToleranceWithDatumReference.cxx | 1 - ..._GeometricToleranceWithDefinedAreaUnit.hxx | 1 - ...mTol_GeometricToleranceWithDefinedUnit.hxx | 1 - ...GeometricToleranceWithMaximumTolerance.hxx | 1 - ...DimTol_GeometricToleranceWithModifiers.hxx | 2 -- .../StepDimTol_HArray1OfDatumReference.hxx | 1 - ...Tol_HArray1OfDatumReferenceCompartment.hxx | 1 - ...pDimTol_HArray1OfDatumReferenceElement.hxx | 1 - ...DimTol_HArray1OfDatumSystemOrReference.hxx | 1 - ...ol_HArray1OfGeometricToleranceModifier.hxx | 1 - ...tepDimTol_HArray1OfToleranceZoneTarget.hxx | 1 - .../StepDimTol_LineProfileTolerance.cxx | 1 - .../StepDimTol_LineProfileTolerance.hxx | 1 - .../StepDimTol_ModifiedGeometricTolerance.cxx | 1 - .../StepDimTol_NonUniformZoneDefinition.hxx | 1 - .../StepDimTol_ParallelismTolerance.cxx | 1 - .../StepDimTol_ParallelismTolerance.hxx | 1 - .../StepDimTol_PerpendicularityTolerance.cxx | 1 - .../StepDimTol_PerpendicularityTolerance.hxx | 1 - .../StepDimTol_PositionTolerance.cxx | 1 - .../StepDimTol_PositionTolerance.hxx | 1 - .../StepDimTol_ProjectedZoneDefinition.hxx | 1 - .../StepDimTol_RoundnessTolerance.cxx | 1 - .../StepDimTol_RoundnessTolerance.hxx | 1 - .../StepDimTol_RunoutZoneDefinition.hxx | 1 - .../StepDimTol_RunoutZoneOrientation.hxx | 1 - ...tepDimTol_SimpleDatumReferenceModifier.hxx | 2 -- .../StepDimTol_StraightnessTolerance.cxx | 1 - .../StepDimTol_StraightnessTolerance.hxx | 1 - .../StepDimTol_SurfaceProfileTolerance.cxx | 1 - .../StepDimTol_SurfaceProfileTolerance.hxx | 1 - .../StepDimTol_SymmetryTolerance.cxx | 1 - .../StepDimTol_SymmetryTolerance.hxx | 1 - src/StepDimTol/StepDimTol_ToleranceZone.hxx | 1 - .../StepDimTol_ToleranceZoneDefinition.hxx | 1 - .../StepDimTol_ToleranceZoneForm.hxx | 1 - .../StepDimTol_TotalRunoutTolerance.cxx | 1 - .../StepDimTol_TotalRunoutTolerance.hxx | 1 - ...ol_UnequallyDisposedGeometricTolerance.hxx | 1 - ...ement_AnalysisItemWithinRepresentation.cxx | 1 - .../StepElement_Curve3dElementDescriptor.cxx | 1 - .../StepElement_Curve3dElementDescriptor.hxx | 1 - ...epElement_CurveElementEndReleasePacket.cxx | 1 - ...epElement_CurveElementEndReleasePacket.hxx | 1 - .../StepElement_CurveElementFreedomMember.cxx | 1 - .../StepElement_CurveElementFreedomMember.hxx | 2 -- .../StepElement_CurveElementPurposeMember.cxx | 1 - .../StepElement_CurveElementPurposeMember.hxx | 2 -- ...pElement_CurveElementSectionDefinition.cxx | 1 - ..._CurveElementSectionDerivedDefinitions.cxx | 1 - ..._CurveElementSectionDerivedDefinitions.hxx | 1 - .../StepElement_ElementAspectMember.cxx | 1 - .../StepElement_ElementAspectMember.hxx | 2 -- .../StepElement_ElementDescriptor.cxx | 1 - .../StepElement_ElementMaterial.cxx | 1 - .../StepElement_ElementMaterial.hxx | 1 - ..._HArray1OfCurveElementEndReleasePacket.hxx | 1 - ...HArray1OfCurveElementSectionDefinition.hxx | 1 - ...HSequenceOfSurfaceElementPurposeMember.hxx | 1 - ...ent_HArray1OfMeasureOrUnspecifiedValue.hxx | 1 - .../StepElement_HArray1OfSurfaceSection.hxx | 1 - ...nt_HArray1OfVolumeElementPurposeMember.hxx | 1 - ...equenceOfCurveElementSectionDefinition.hxx | 1 - ...StepElement_HSequenceOfElementMaterial.hxx | 1 - ...HSequenceOfSurfaceElementPurposeMember.hxx | 1 - .../StepElement_MeasureOrUnspecifiedValue.hxx | 1 - ...lement_MeasureOrUnspecifiedValueMember.cxx | 1 - ...lement_MeasureOrUnspecifiedValueMember.hxx | 2 -- ...StepElement_Surface3dElementDescriptor.cxx | 1 - ...StepElement_Surface3dElementDescriptor.hxx | 1 - .../StepElement_SurfaceElementProperty.cxx | 1 - ...tepElement_SurfaceElementPurposeMember.cxx | 1 - ...tepElement_SurfaceElementPurposeMember.hxx | 2 -- .../StepElement_SurfaceSection.cxx | 2 -- .../StepElement_SurfaceSection.hxx | 1 - ...tepElement_SurfaceSectionFieldConstant.cxx | 1 - ...StepElement_SurfaceSectionFieldVarying.cxx | 1 - ...StepElement_SurfaceSectionFieldVarying.hxx | 1 - .../StepElement_UniformSurfaceSection.cxx | 2 -- .../StepElement_UniformSurfaceSection.hxx | 2 -- .../StepElement_Volume3dElementDescriptor.cxx | 1 - .../StepElement_Volume3dElementDescriptor.hxx | 1 - ...StepElement_VolumeElementPurposeMember.cxx | 1 - ...StepElement_VolumeElementPurposeMember.hxx | 2 -- ..._AlignedCurve3dElementCoordinateSystem.cxx | 1 - ...lignedSurface3dElementCoordinateSystem.cxx | 1 - ...bitraryVolume3dElementCoordinateSystem.cxx | 1 - ...nstantSurface3dElementCoordinateSystem.cxx | 1 - .../StepFEA_Curve3dElementProperty.cxx | 1 - .../StepFEA_Curve3dElementProperty.hxx | 1 - .../StepFEA_Curve3dElementRepresentation.cxx | 1 - src/StepFEA/StepFEA_CurveElementEndOffset.cxx | 2 -- src/StepFEA/StepFEA_CurveElementEndOffset.hxx | 1 - .../StepFEA_CurveElementEndRelease.cxx | 2 -- .../StepFEA_CurveElementEndRelease.hxx | 1 - src/StepFEA/StepFEA_DegreeOfFreedomMember.cxx | 1 - src/StepFEA/StepFEA_DegreeOfFreedomMember.hxx | 2 -- .../StepFEA_ElementGeometricRelationship.cxx | 2 -- src/StepFEA/StepFEA_ElementGroup.cxx | 1 - src/StepFEA/StepFEA_ElementRepresentation.cxx | 1 - src/StepFEA/StepFEA_FeaAreaDensity.cxx | 1 - src/StepFEA/StepFEA_FeaAxis2Placement3d.cxx | 1 - src/StepFEA/StepFEA_FeaGroup.cxx | 1 - src/StepFEA/StepFEA_FeaLinearElasticity.cxx | 1 - src/StepFEA/StepFEA_FeaLinearElasticity.hxx | 1 - src/StepFEA/StepFEA_FeaMassDensity.cxx | 1 - ...pFEA_FeaMaterialPropertyRepresentation.cxx | 1 - ...pFEA_FeaMaterialPropertyRepresentation.hxx | 1 - src/StepFEA/StepFEA_FeaModel.cxx | 1 - src/StepFEA/StepFEA_FeaModel.hxx | 1 - src/StepFEA/StepFEA_FeaModel3d.cxx | 1 - src/StepFEA/StepFEA_FeaModel3d.hxx | 1 - src/StepFEA/StepFEA_FeaMoistureAbsorption.cxx | 1 - src/StepFEA/StepFEA_FeaMoistureAbsorption.hxx | 1 - src/StepFEA/StepFEA_FeaParametricPoint.cxx | 1 - ...antCoefficientOfLinearThermalExpansion.cxx | 1 - ...antCoefficientOfLinearThermalExpansion.hxx | 1 - .../StepFEA_FeaShellBendingStiffness.cxx | 1 - .../StepFEA_FeaShellBendingStiffness.hxx | 1 - ...aShellMembraneBendingCouplingStiffness.cxx | 1 - ...aShellMembraneBendingCouplingStiffness.hxx | 1 - .../StepFEA_FeaShellMembraneStiffness.cxx | 1 - .../StepFEA_FeaShellMembraneStiffness.hxx | 1 - .../StepFEA_FeaShellShearStiffness.cxx | 1 - .../StepFEA_FeaShellShearStiffness.hxx | 1 - ...FeaSurfaceSectionGeometricRelationship.cxx | 1 - ...ialCoefficientOfLinearThermalExpansion.cxx | 1 - ...ialCoefficientOfLinearThermalExpansion.hxx | 1 - src/StepFEA/StepFEA_FreedomAndCoefficient.cxx | 3 --- src/StepFEA/StepFEA_FreedomAndCoefficient.hxx | 1 - src/StepFEA/StepFEA_FreedomsList.cxx | 1 - src/StepFEA/StepFEA_FreedomsList.hxx | 1 - ...StepFEA_HArray1OfCurveElementEndOffset.hxx | 1 - ...tepFEA_HArray1OfCurveElementEndRelease.hxx | 1 - .../StepFEA_HArray1OfDegreeOfFreedom.hxx | 1 - .../StepFEA_HArray1OfNodeRepresentation.hxx | 1 - ...SequenceOfElementGeometricRelationship.hxx | 1 - ...epFEA_HSequenceOfElementRepresentation.hxx | 1 - src/StepFEA/StepFEA_NodeGroup.cxx | 1 - src/StepFEA/StepFEA_NodeRepresentation.cxx | 1 - src/StepFEA/StepFEA_NodeSet.cxx | 1 - ...etricCurve3dElementCoordinateDirection.cxx | 1 - ...rametricCurve3dElementCoordinateSystem.cxx | 1 - ...metricSurface3dElementCoordinateSystem.cxx | 1 - ...StepFEA_Surface3dElementRepresentation.cxx | 1 - src/StepFEA/StepFEA_SymmetricTensor23d.hxx | 1 - .../StepFEA_SymmetricTensor23dMember.cxx | 1 - .../StepFEA_SymmetricTensor23dMember.hxx | 1 - .../StepFEA_SymmetricTensor43dMember.cxx | 1 - .../StepFEA_SymmetricTensor43dMember.hxx | 1 - .../StepFEA_Volume3dElementRepresentation.cxx | 1 - src/StepGeom/StepGeom_Axis1Placement.cxx | 1 - src/StepGeom/StepGeom_Axis2Placement2d.cxx | 1 - src/StepGeom/StepGeom_Axis2Placement3d.cxx | 1 - src/StepGeom/StepGeom_BSplineCurve.cxx | 1 - .../StepGeom_BSplineCurveWithKnots.cxx | 1 - .../StepGeom_BSplineCurveWithKnots.hxx | 1 - ...eCurveWithKnotsAndRationalBSplineCurve.hxx | 1 - src/StepGeom/StepGeom_BSplineSurface.cxx | 1 - .../StepGeom_BSplineSurfaceWithKnots.cxx | 1 - .../StepGeom_BSplineSurfaceWithKnots.hxx | 1 - ...faceWithKnotsAndRationalBSplineSurface.hxx | 1 - ...eom_BezierCurveAndRationalBSplineCurve.hxx | 1 - ...BezierSurfaceAndRationalBSplineSurface.hxx | 1 - src/StepGeom/StepGeom_CartesianPoint.hxx | 1 - ...epGeom_CartesianTransformationOperator.cxx | 1 - ...epGeom_CartesianTransformationOperator.hxx | 2 -- ...Geom_CartesianTransformationOperator3d.cxx | 1 - ...Geom_CartesianTransformationOperator3d.hxx | 2 -- src/StepGeom/StepGeom_Circle.cxx | 2 -- src/StepGeom/StepGeom_Circle.hxx | 1 - src/StepGeom/StepGeom_CompositeCurve.cxx | 1 - .../StepGeom_CompositeCurveSegment.hxx | 1 - src/StepGeom/StepGeom_Conic.cxx | 2 -- src/StepGeom/StepGeom_Conic.hxx | 1 - src/StepGeom/StepGeom_ConicalSurface.cxx | 1 - src/StepGeom/StepGeom_ConicalSurface.hxx | 1 - src/StepGeom/StepGeom_CurveBoundedSurface.cxx | 1 - src/StepGeom/StepGeom_CurveBoundedSurface.hxx | 1 - src/StepGeom/StepGeom_CurveReplica.cxx | 2 -- src/StepGeom/StepGeom_CylindricalSurface.cxx | 1 - src/StepGeom/StepGeom_CylindricalSurface.hxx | 1 - src/StepGeom/StepGeom_DegeneratePcurve.cxx | 1 - .../StepGeom_DegenerateToroidalSurface.cxx | 1 - .../StepGeom_DegenerateToroidalSurface.hxx | 2 -- src/StepGeom/StepGeom_Direction.cxx | 1 - src/StepGeom/StepGeom_ElementarySurface.cxx | 1 - src/StepGeom/StepGeom_Ellipse.cxx | 2 -- src/StepGeom/StepGeom_Ellipse.hxx | 1 - .../StepGeom_EvaluatedDegeneratePcurve.cxx | 1 - ...GlobUnitAssCtxAndGlobUncertaintyAssCtx.cxx | 2 -- ...tepGeom_GeometricRepresentationContext.cxx | 1 - ...ionContextAndGlobalUnitAssignedContext.cxx | 1 - .../StepGeom_HArray1OfCartesianPoint.hxx | 1 - ...tepGeom_HArray1OfCompositeCurveSegment.hxx | 1 - .../StepGeom_HArray1OfPcurveOrSurface.hxx | 1 - .../StepGeom_HArray1OfSurfaceBoundary.hxx | 1 - .../StepGeom_HArray1OfTrimmingSelect.hxx | 1 - .../StepGeom_HArray2OfCartesianPoint.hxx | 1 - .../StepGeom_HArray2OfSurfacePatch.hxx | 1 - src/StepGeom/StepGeom_Hyperbola.cxx | 2 -- src/StepGeom/StepGeom_Hyperbola.hxx | 1 - src/StepGeom/StepGeom_IntersectionCurve.cxx | 1 - src/StepGeom/StepGeom_IntersectionCurve.hxx | 1 - src/StepGeom/StepGeom_Line.cxx | 1 - src/StepGeom/StepGeom_OffsetCurve3d.cxx | 2 -- src/StepGeom/StepGeom_OffsetCurve3d.hxx | 1 - src/StepGeom/StepGeom_OffsetSurface.cxx | 1 - src/StepGeom/StepGeom_OrientedSurface.cxx | 1 - src/StepGeom/StepGeom_Parabola.cxx | 2 -- src/StepGeom/StepGeom_Parabola.hxx | 1 - src/StepGeom/StepGeom_Pcurve.cxx | 1 - src/StepGeom/StepGeom_Placement.cxx | 1 - src/StepGeom/StepGeom_PointOnCurve.cxx | 1 - src/StepGeom/StepGeom_PointOnCurve.hxx | 1 - src/StepGeom/StepGeom_PointOnSurface.cxx | 1 - src/StepGeom/StepGeom_PointReplica.cxx | 2 -- src/StepGeom/StepGeom_Polyline.cxx | 2 -- ...asiUniformCurveAndRationalBSplineCurve.hxx | 1 - ...niformSurfaceAndRationalBSplineSurface.hxx | 1 - .../StepGeom_RationalBSplineCurve.cxx | 1 - .../StepGeom_RationalBSplineCurve.hxx | 1 - .../StepGeom_RationalBSplineSurface.cxx | 1 - .../StepGeom_RectangularCompositeSurface.cxx | 1 - .../StepGeom_RectangularTrimmedSurface.cxx | 1 - ...om_ReparametrisedCompositeCurveSegment.hxx | 2 -- src/StepGeom/StepGeom_SeamCurve.cxx | 1 - src/StepGeom/StepGeom_SeamCurve.hxx | 1 - src/StepGeom/StepGeom_SphericalSurface.cxx | 1 - src/StepGeom/StepGeom_SphericalSurface.hxx | 1 - src/StepGeom/StepGeom_SuParameters.hxx | 1 - src/StepGeom/StepGeom_SurfaceCurve.cxx | 3 --- src/StepGeom/StepGeom_SurfaceCurve.hxx | 1 - .../StepGeom_SurfaceCurveAndBoundedCurve.cxx | 1 - .../StepGeom_SurfaceOfLinearExtrusion.cxx | 1 - src/StepGeom/StepGeom_SurfaceOfRevolution.cxx | 1 - src/StepGeom/StepGeom_SurfacePatch.hxx | 1 - src/StepGeom/StepGeom_SurfaceReplica.cxx | 2 -- src/StepGeom/StepGeom_SweptSurface.cxx | 1 - src/StepGeom/StepGeom_ToroidalSurface.cxx | 1 - src/StepGeom/StepGeom_ToroidalSurface.hxx | 1 - src/StepGeom/StepGeom_TrimmedCurve.cxx | 2 -- src/StepGeom/StepGeom_TrimmedCurve.hxx | 1 - src/StepGeom/StepGeom_TrimmingMember.hxx | 2 -- src/StepGeom/StepGeom_TrimmingSelect.hxx | 1 - ...om_UniformCurveAndRationalBSplineCurve.hxx | 1 - ...niformSurfaceAndRationalBSplineSurface.hxx | 1 - src/StepGeom/StepGeom_Vector.cxx | 1 - src/StepGeom/StepGeom_Vector.hxx | 1 - ...ematics_ActuatedKinPairAndOrderKinPair.cxx | 1 - ...ematics_ActuatedKinPairAndOrderKinPair.hxx | 2 -- .../StepKinematics_ActuatedKinematicPair.hxx | 3 --- ...xtDependentKinematicLinkRepresentation.hxx | 1 - .../StepKinematics_CylindricalPair.hxx | 4 --- .../StepKinematics_CylindricalPairValue.hxx | 1 - ...tepKinematics_CylindricalPairWithRange.hxx | 2 -- .../StepKinematics_FullyConstrainedPair.hxx | 4 --- .../StepKinematics_GearPair.hxx | 2 -- .../StepKinematics_GearPairValue.hxx | 1 - .../StepKinematics_GearPairWithRange.hxx | 2 -- .../StepKinematics_HighOrderKinematicPair.hxx | 4 --- .../StepKinematics_HomokineticPair.hxx | 4 --- .../StepKinematics_KinematicJoint.hxx | 2 -- .../StepKinematics_KinematicLink.hxx | 1 - ...Kinematics_KinematicLinkRepresentation.hxx | 2 -- ...KinematicLinkRepresentationAssociation.hxx | 1 - .../StepKinematics_KinematicPair.hxx | 2 -- ...ematicPropertyDefinitionRepresentation.hxx | 1 - ...nematicPropertyMechanismRepresentation.hxx | 1 - ...ics_KinematicTopologyDirectedStructure.hxx | 4 --- ...tics_KinematicTopologyNetworkStructure.hxx | 4 --- ...pKinematics_KinematicTopologyStructure.hxx | 2 -- ...Kinematics_LinearFlexibleAndPinionPair.hxx | 2 -- ...atics_LinearFlexibleAndPlanarCurvePair.hxx | 2 -- ...atics_LinearFlexibleLinkRepresentation.hxx | 3 --- .../StepKinematics_LowOrderKinematicPair.hxx | 2 -- ...pKinematics_LowOrderKinematicPairValue.hxx | 1 - ...owOrderKinematicPairWithMotionCoupling.hxx | 4 --- ...ematics_LowOrderKinematicPairWithRange.hxx | 2 -- ...StepKinematics_MechanismRepresentation.hxx | 1 - ...inematics_MechanismStateRepresentation.cxx | 1 - .../StepKinematics_OrientedJoint.hxx | 3 --- ...ematics_PairRepresentationRelationship.hxx | 2 -- .../StepKinematics_PairValue.hxx | 3 --- .../StepKinematics_PlanarCurvePair.hxx | 2 -- .../StepKinematics_PlanarCurvePairRange.hxx | 2 -- .../StepKinematics_PlanarPair.hxx | 4 --- .../StepKinematics_PlanarPairValue.hxx | 1 - .../StepKinematics_PlanarPairWithRange.hxx | 2 -- .../StepKinematics_PointOnPlanarCurvePair.hxx | 2 -- ...Kinematics_PointOnPlanarCurvePairValue.hxx | 1 - ...matics_PointOnPlanarCurvePairWithRange.hxx | 2 -- .../StepKinematics_PointOnSurfacePair.hxx | 2 -- ...StepKinematics_PointOnSurfacePairValue.hxx | 1 - ...Kinematics_PointOnSurfacePairWithRange.hxx | 2 -- .../StepKinematics_PrismaticPair.hxx | 4 --- .../StepKinematics_PrismaticPairValue.hxx | 1 - .../StepKinematics_PrismaticPairWithRange.hxx | 2 -- ...Kinematics_ProductDefinitionKinematics.hxx | 1 - ...roductDefinitionRelationshipKinematics.hxx | 1 - .../StepKinematics_RackAndPinionPair.hxx | 2 -- .../StepKinematics_RackAndPinionPairValue.hxx | 1 - ...pKinematics_RackAndPinionPairWithRange.hxx | 2 -- .../StepKinematics_RevolutePair.hxx | 4 --- .../StepKinematics_RevolutePairValue.hxx | 1 - .../StepKinematics_RevolutePairWithRange.hxx | 2 -- ...StepKinematics_RigidLinkRepresentation.hxx | 3 --- .../StepKinematics_RollingCurvePair.hxx | 4 --- .../StepKinematics_RollingCurvePairValue.hxx | 1 - .../StepKinematics_RollingSurfacePair.hxx | 5 ---- ...StepKinematics_RollingSurfacePairValue.hxx | 1 - .../StepKinematics_RotationAboutDirection.hxx | 2 -- .../StepKinematics_ScrewPair.hxx | 2 -- .../StepKinematics_ScrewPairValue.hxx | 1 - .../StepKinematics_ScrewPairWithRange.hxx | 2 -- .../StepKinematics_SlidingCurvePair.hxx | 4 --- .../StepKinematics_SlidingCurvePairValue.hxx | 1 - .../StepKinematics_SlidingSurfacePair.hxx | 5 ---- ...StepKinematics_SlidingSurfacePairValue.hxx | 1 - .../StepKinematics_SphericalPair.hxx | 4 --- .../StepKinematics_SphericalPairValue.hxx | 1 - .../StepKinematics_SphericalPairWithPin.hxx | 4 --- ...inematics_SphericalPairWithPinAndRange.hxx | 2 -- .../StepKinematics_SphericalPairWithRange.hxx | 2 -- .../StepKinematics_SurfacePair.hxx | 2 -- .../StepKinematics_SurfacePairWithRange.hxx | 2 -- .../StepKinematics_UnconstrainedPair.hxx | 4 --- .../StepKinematics_UnconstrainedPairValue.hxx | 1 - .../StepKinematics_UniversalPair.hxx | 2 -- .../StepKinematics_UniversalPairValue.hxx | 1 - .../StepKinematics_UniversalPairWithRange.hxx | 2 -- .../StepRepr_AssemblyComponentUsage.cxx | 1 - .../StepRepr_AssemblyComponentUsage.hxx | 1 - ...pRepr_AssemblyComponentUsageSubstitute.cxx | 1 - .../StepRepr_CharacterizedRepresentation.cxx | 2 -- .../StepRepr_CompoundRepresentationItem.cxx | 1 - src/StepRepr/StepRepr_ConfigurationDesign.cxx | 1 - src/StepRepr/StepRepr_ConfigurationDesign.hxx | 1 - .../StepRepr_ConfigurationEffectivity.cxx | 1 - src/StepRepr/StepRepr_ConfigurationItem.cxx | 1 - src/StepRepr/StepRepr_DataEnvironment.cxx | 1 - src/StepRepr/StepRepr_DataEnvironment.hxx | 1 - ...StepRepr_DescriptiveRepresentationItem.cxx | 1 - ...Repr_FunctionallyDefinedTransformation.cxx | 1 - ...pRepr_GlobalUncertaintyAssignedContext.cxx | 2 -- ...pRepr_GlobalUncertaintyAssignedContext.hxx | 1 - .../StepRepr_GlobalUnitAssignedContext.cxx | 2 -- ...Array1OfMaterialPropertyRepresentation.hxx | 1 - ...ray1OfPropertyDefinitionRepresentation.hxx | 1 - .../StepRepr_HArray1OfRepresentationItem.hxx | 1 - .../StepRepr_HArray1OfShapeAspect.hxx | 1 - .../StepRepr_IntegerRepresentationItem.cxx | 1 - .../StepRepr_ItemDefinedTransformation.cxx | 1 - src/StepRepr/StepRepr_MakeFromUsageOption.cxx | 1 - src/StepRepr/StepRepr_MakeFromUsageOption.hxx | 1 - src/StepRepr/StepRepr_MappedItem.cxx | 1 - src/StepRepr/StepRepr_MaterialDesignation.cxx | 2 -- src/StepRepr/StepRepr_MaterialDesignation.hxx | 1 - src/StepRepr/StepRepr_MaterialProperty.cxx | 1 - src/StepRepr/StepRepr_MaterialProperty.hxx | 1 - ...tepRepr_MaterialPropertyRepresentation.cxx | 1 - .../StepRepr_NextAssemblyUsageOccurrence.cxx | 1 - .../StepRepr_NextAssemblyUsageOccurrence.hxx | 1 - src/StepRepr/StepRepr_ProductConcept.cxx | 1 - src/StepRepr/StepRepr_ProductConcept.hxx | 1 - .../StepRepr_ProductDefinitionShape.cxx | 1 - .../StepRepr_ProductDefinitionShape.hxx | 1 - .../StepRepr_ProductDefinitionUsage.cxx | 1 - .../StepRepr_ProductDefinitionUsage.hxx | 1 - .../StepRepr_PromissoryUsageOccurrence.cxx | 1 - .../StepRepr_PromissoryUsageOccurrence.hxx | 1 - src/StepRepr/StepRepr_PropertyDefinition.cxx | 2 -- src/StepRepr/StepRepr_PropertyDefinition.hxx | 1 - ...tepRepr_PropertyDefinitionRelationship.cxx | 1 - ...pRepr_PropertyDefinitionRepresentation.cxx | 1 - ...pRepr_PropertyDefinitionRepresentation.hxx | 1 - ...pRepr_QuantifiedAssemblyComponentUsage.cxx | 1 - ...pRepr_QuantifiedAssemblyComponentUsage.hxx | 1 - src/StepRepr/StepRepr_Representation.cxx | 1 - .../StepRepr_RepresentationContext.cxx | 1 - ...tepRepr_RepresentationContextReference.hxx | 1 - src/StepRepr/StepRepr_RepresentationItem.cxx | 1 - .../StepRepr_RepresentationReference.hxx | 2 -- .../StepRepr_RepresentationRelationship.cxx | 1 - ...entationRelationshipWithTransformation.cxx | 1 - src/StepRepr/StepRepr_ShapeAspect.cxx | 1 - .../StepRepr_ShapeAspectRelationship.cxx | 1 - .../StepRepr_ShapeAspectRelationship.hxx | 1 - ...entationRelationshipWithTransformation.cxx | 1 - ...entationRelationshipWithTransformation.hxx | 1 - ...tepRepr_SpecifiedHigherUsageOccurrence.cxx | 2 -- ...tepRepr_SpecifiedHigherUsageOccurrence.hxx | 1 - .../StepRepr_StructuralResponseProperty.cxx | 1 - .../StepRepr_StructuralResponseProperty.hxx | 1 - ...sponsePropertyDefinitionRepresentation.cxx | 1 - ...sponsePropertyDefinitionRepresentation.hxx | 1 - .../StepRepr_SuppliedPartRelationship.cxx | 1 - .../StepRepr_SuppliedPartRelationship.hxx | 1 - .../StepRepr_ValueRepresentationItem.cxx | 1 - src/StepSelect/StepSelect_Activator.cxx | 1 - src/StepSelect/StepSelect_Activator.hxx | 1 - src/StepSelect/StepSelect_FloatFormat.cxx | 1 - src/StepSelect/StepSelect_FloatFormat.hxx | 3 --- src/StepSelect/StepSelect_StepType.cxx | 1 - src/StepSelect/StepSelect_WorkLibrary.cxx | 9 ------- src/StepSelect/StepSelect_WorkLibrary.hxx | 2 -- src/StepShape/StepShape_AngularLocation.cxx | 1 - src/StepShape/StepShape_AngularLocation.hxx | 1 - src/StepShape/StepShape_AngularSize.cxx | 1 - src/StepShape/StepShape_Block.cxx | 1 - src/StepShape/StepShape_Block.hxx | 1 - src/StepShape/StepShape_BooleanOperand.cxx | 1 - src/StepShape/StepShape_BooleanResult.cxx | 2 -- src/StepShape/StepShape_BooleanResult.hxx | 1 - src/StepShape/StepShape_BoxDomain.hxx | 1 - src/StepShape/StepShape_BoxedHalfSpace.cxx | 1 - src/StepShape/StepShape_BoxedHalfSpace.hxx | 1 - src/StepShape/StepShape_BrepWithVoids.cxx | 1 - src/StepShape/StepShape_ConnectedEdgeSet.cxx | 1 - src/StepShape/StepShape_ConnectedFaceSet.cxx | 1 - .../StepShape_ConnectedFaceSubSet.cxx | 2 -- ...pe_ContextDependentShapeRepresentation.cxx | 1 - src/StepShape/StepShape_CsgSelect.cxx | 1 - src/StepShape/StepShape_CsgSolid.cxx | 2 -- src/StepShape/StepShape_CsgSolid.hxx | 1 - ...imensionalCharacteristicRepresentation.cxx | 2 -- ...imensionalCharacteristicRepresentation.hxx | 1 - .../StepShape_DimensionalLocationWithPath.cxx | 1 - .../StepShape_DimensionalLocationWithPath.hxx | 1 - src/StepShape/StepShape_DimensionalSize.cxx | 1 - .../StepShape_DimensionalSizeWithPath.cxx | 1 - src/StepShape/StepShape_Edge.cxx | 1 - src/StepShape/StepShape_Edge.hxx | 1 - .../StepShape_EdgeBasedWireframeModel.cxx | 1 - src/StepShape/StepShape_EdgeCurve.cxx | 1 - src/StepShape/StepShape_EdgeCurve.hxx | 1 - src/StepShape/StepShape_EdgeLoop.cxx | 1 - src/StepShape/StepShape_ExtrudedAreaSolid.cxx | 1 - src/StepShape/StepShape_ExtrudedAreaSolid.hxx | 1 - src/StepShape/StepShape_ExtrudedFaceSolid.cxx | 1 - src/StepShape/StepShape_ExtrudedFaceSolid.hxx | 1 - src/StepShape/StepShape_Face.cxx | 1 - .../StepShape_FaceBasedSurfaceModel.cxx | 1 - src/StepShape/StepShape_FaceBound.cxx | 1 - src/StepShape/StepShape_FaceSurface.cxx | 1 - src/StepShape/StepShape_FaceSurface.hxx | 1 - src/StepShape/StepShape_GeometricCurveSet.cxx | 1 - src/StepShape/StepShape_GeometricCurveSet.hxx | 1 - src/StepShape/StepShape_GeometricSet.cxx | 1 - src/StepShape/StepShape_GeometricSet.hxx | 1 - .../StepShape_HArray1OfConnectedEdgeSet.hxx | 1 - .../StepShape_HArray1OfConnectedFaceSet.hxx | 1 - src/StepShape/StepShape_HArray1OfEdge.hxx | 1 - src/StepShape/StepShape_HArray1OfFace.hxx | 1 - .../StepShape_HArray1OfFaceBound.hxx | 1 - ...StepShape_HArray1OfOrientedClosedShell.hxx | 1 - .../StepShape_HArray1OfOrientedEdge.hxx | 1 - ...ray1OfShapeDimensionRepresentationItem.hxx | 1 - .../StepShape_HArray1OfValueQualifier.hxx | 1 - src/StepShape/StepShape_HalfSpaceSolid.cxx | 1 - src/StepShape/StepShape_HalfSpaceSolid.hxx | 1 - src/StepShape/StepShape_LimitsAndFits.cxx | 1 - src/StepShape/StepShape_ManifoldSolidBrep.cxx | 1 - .../StepShape_MeasureQualification.cxx | 1 - .../StepShape_OrientedClosedShell.cxx | 3 --- src/StepShape/StepShape_OrientedEdge.cxx | 2 -- src/StepShape/StepShape_OrientedFace.cxx | 3 --- src/StepShape/StepShape_OrientedOpenShell.cxx | 3 --- src/StepShape/StepShape_OrientedPath.cxx | 1 - src/StepShape/StepShape_OrientedPath.hxx | 1 - src/StepShape/StepShape_Path.cxx | 2 -- .../StepShape_PlusMinusTolerance.cxx | 2 -- .../StepShape_PlusMinusTolerance.hxx | 1 - src/StepShape/StepShape_PolyLoop.cxx | 2 -- .../StepShape_QualifiedRepresentationItem.cxx | 1 - .../StepShape_QualifiedRepresentationItem.hxx | 1 - .../StepShape_ReversibleTopologyItem.cxx | 1 - src/StepShape/StepShape_RevolvedAreaSolid.cxx | 1 - src/StepShape/StepShape_RevolvedAreaSolid.hxx | 1 - src/StepShape/StepShape_RevolvedFaceSolid.cxx | 1 - src/StepShape/StepShape_RevolvedFaceSolid.hxx | 1 - src/StepShape/StepShape_RightAngularWedge.cxx | 1 - src/StepShape/StepShape_RightAngularWedge.hxx | 1 - src/StepShape/StepShape_RightCircularCone.cxx | 1 - src/StepShape/StepShape_RightCircularCone.hxx | 1 - .../StepShape_RightCircularCylinder.cxx | 1 - .../StepShape_RightCircularCylinder.hxx | 1 - src/StepShape/StepShape_SeamEdge.cxx | 2 -- src/StepShape/StepShape_SeamEdge.hxx | 1 - ...tepShape_ShapeDefinitionRepresentation.cxx | 1 - ...tepShape_ShapeDefinitionRepresentation.hxx | 1 - ...StepShape_ShapeDimensionRepresentation.cxx | 1 - ...StepShape_ShapeDimensionRepresentation.hxx | 1 - .../StepShape_ShellBasedSurfaceModel.cxx | 2 -- .../StepShape_ShellBasedSurfaceModel.hxx | 1 - src/StepShape/StepShape_SolidReplica.cxx | 2 -- src/StepShape/StepShape_Sphere.cxx | 1 - src/StepShape/StepShape_Sphere.hxx | 1 - src/StepShape/StepShape_Subedge.cxx | 2 -- src/StepShape/StepShape_Subface.cxx | 2 -- src/StepShape/StepShape_SweptAreaSolid.cxx | 1 - src/StepShape/StepShape_SweptFaceSolid.cxx | 1 - src/StepShape/StepShape_ToleranceValue.cxx | 1 - src/StepShape/StepShape_Torus.cxx | 1 - src/StepShape/StepShape_Torus.hxx | 1 - src/StepShape/StepShape_TypeQualifier.cxx | 1 - .../StepShape_ValueFormatTypeQualifier.hxx | 1 - src/StepShape/StepShape_VertexLoop.cxx | 1 - src/StepShape/StepShape_VertexPoint.cxx | 1 - src/StepToGeom/StepToGeom.cxx | 11 -------- src/StepToTopoDS/StepToTopoDS_Builder.cxx | 5 ---- src/StepToTopoDS/StepToTopoDS_Builder.hxx | 1 - .../StepToTopoDS_CartesianPointHasher.hxx | 1 - .../StepToTopoDS_DataMapOfRINames.hxx | 1 - .../StepToTopoDS_GeometricTool.cxx | 26 ------------------- .../StepToTopoDS_GeometricTool.hxx | 2 -- .../StepToTopoDS_MakeTransformed.cxx | 5 ---- .../StepToTopoDS_MakeTransformed.hxx | 1 - .../StepToTopoDS_PointPairHasher.hxx | 2 -- src/StepToTopoDS/StepToTopoDS_Root.hxx | 3 --- src/StepToTopoDS/StepToTopoDS_Tool.cxx | 4 --- src/StepToTopoDS/StepToTopoDS_Tool.hxx | 1 - .../StepToTopoDS_TranslateCompositeCurve.cxx | 2 -- .../StepToTopoDS_TranslateCompositeCurve.hxx | 1 - ...pToTopoDS_TranslateCurveBoundedSurface.cxx | 1 - ...pToTopoDS_TranslateCurveBoundedSurface.hxx | 1 - .../StepToTopoDS_TranslateEdge.cxx | 6 ----- .../StepToTopoDS_TranslateEdge.hxx | 1 - .../StepToTopoDS_TranslateEdgeLoop.cxx | 12 --------- .../StepToTopoDS_TranslateEdgeLoop.hxx | 1 - .../StepToTopoDS_TranslatePolyLoop.cxx | 2 -- .../StepToTopoDS_TranslateVertex.cxx | 3 --- .../StepVisual_AnnotationCurveOccurrence.cxx | 1 - .../StepVisual_AnnotationCurveOccurrence.hxx | 1 - ...notationCurveOccurrenceAndGeomReprItem.hxx | 1 - .../StepVisual_AnnotationFillArea.cxx | 1 - .../StepVisual_AnnotationFillArea.hxx | 2 -- ...tepVisual_AnnotationFillAreaOccurrence.cxx | 1 - ...tepVisual_AnnotationFillAreaOccurrence.hxx | 1 - .../StepVisual_AnnotationOccurrence.cxx | 1 - .../StepVisual_AnnotationOccurrence.hxx | 1 - src/StepVisual/StepVisual_AnnotationPlane.cxx | 1 - src/StepVisual/StepVisual_AnnotationPlane.hxx | 1 - .../StepVisual_AnnotationTextOccurrence.cxx | 1 - .../StepVisual_AnnotationTextOccurrence.hxx | 1 - .../StepVisual_BackgroundColour.cxx | 2 -- .../StepVisual_BackgroundColour.hxx | 1 - .../StepVisual_BoxCharacteristicSelect.hxx | 2 -- src/StepVisual/StepVisual_CameraModelD2.cxx | 1 - src/StepVisual/StepVisual_CameraModelD3.cxx | 1 - .../StepVisual_CameraModelD3MultiClipping.cxx | 1 - ...CameraModelD3MultiClippingIntersection.cxx | 1 - ...Visual_CameraModelD3MultiClippingUnion.cxx | 1 - src/StepVisual/StepVisual_ColourRgb.cxx | 1 - .../StepVisual_ColourSpecification.cxx | 1 - src/StepVisual/StepVisual_CompositeText.cxx | 1 - src/StepVisual/StepVisual_CompositeText.hxx | 1 - .../StepVisual_CompositeTextWithExtent.cxx | 1 - .../StepVisual_CompositeTextWithExtent.hxx | 1 - ...tepVisual_ContextDependentInvisibility.cxx | 1 - ...tepVisual_ContextDependentInvisibility.hxx | 1 - ...l_ContextDependentOverRidingStyledItem.cxx | 2 -- ...l_ContextDependentOverRidingStyledItem.hxx | 1 - src/StepVisual/StepVisual_CoordinatesList.cxx | 1 - src/StepVisual/StepVisual_CurveStyle.cxx | 2 -- src/StepVisual/StepVisual_CurveStyleFont.cxx | 1 - .../StepVisual_CurveStyleFontPattern.hxx | 1 - .../StepVisual_DirectionCountSelect.hxx | 3 --- ...pVisual_DraughtingAnnotationOccurrence.cxx | 1 - ...pVisual_DraughtingAnnotationOccurrence.hxx | 1 - .../StepVisual_DraughtingCallout.cxx | 1 - .../StepVisual_DraughtingCallout.hxx | 1 - .../StepVisual_ExternallyDefinedCurveFont.cxx | 1 - .../StepVisual_ExternallyDefinedCurveFont.hxx | 1 - .../StepVisual_ExternallyDefinedTextFont.cxx | 1 - .../StepVisual_ExternallyDefinedTextFont.hxx | 1 - src/StepVisual/StepVisual_FillAreaStyle.cxx | 1 - src/StepVisual/StepVisual_FillAreaStyle.hxx | 1 - .../StepVisual_FillAreaStyleColour.cxx | 1 - ...Visual_HArray1OfAnnotationPlaneElement.hxx | 1 - ...isual_HArray1OfBoxCharacteristicSelect.hxx | 1 - ...aModelD3MultiClippingInterectionSelect.hxx | 1 - ...fCameraModelD3MultiClippingUnionSelect.hxx | 1 - ...pVisual_HArray1OfCurveStyleFontPattern.hxx | 1 - ...epVisual_HArray1OfDirectionCountSelect.hxx | 1 - ...sual_HArray1OfDraughtingCalloutElement.hxx | 1 - .../StepVisual_HArray1OfFillStyleSelect.hxx | 1 - .../StepVisual_HArray1OfInvisibleItem.hxx | 1 - .../StepVisual_HArray1OfLayeredItem.hxx | 1 - ...l_HArray1OfPresentationStyleAssignment.hxx | 1 - ...isual_HArray1OfPresentationStyleSelect.hxx | 1 - ...ual_HArray1OfRenderingPropertiesSelect.hxx | 1 - ...StepVisual_HArray1OfStyleContextSelect.hxx | 1 - ...ual_HArray1OfSurfaceStyleElementSelect.hxx | 1 - src/StepVisual/StepVisual_Invisibility.cxx | 1 - src/StepVisual/StepVisual_Invisibility.hxx | 1 - src/StepVisual/StepVisual_LayeredItem.cxx | 1 - src/StepVisual/StepVisual_MarkerMember.cxx | 1 - src/StepVisual/StepVisual_MarkerMember.hxx | 2 -- src/StepVisual/StepVisual_NullStyle.hxx | 2 -- .../StepVisual_OverRidingStyledItem.cxx | 2 -- .../StepVisual_OverRidingStyledItem.hxx | 1 - src/StepVisual/StepVisual_PlanarBox.cxx | 2 -- src/StepVisual/StepVisual_PlanarBox.hxx | 1 - src/StepVisual/StepVisual_PlanarExtent.cxx | 1 - src/StepVisual/StepVisual_PointStyle.cxx | 3 --- src/StepVisual/StepVisual_PreDefinedItem.cxx | 1 - ...StepVisual_PresentationLayerAssignment.cxx | 2 -- .../StepVisual_PresentationLayerUsage.cxx | 1 - .../StepVisual_PresentationSize.cxx | 1 - ...StepVisual_PresentationStyleAssignment.cxx | 1 - ...StepVisual_PresentationStyleAssignment.hxx | 1 - .../StepVisual_PresentationStyleByContext.cxx | 1 - .../StepVisual_PresentationStyleByContext.hxx | 1 - .../StepVisual_PresentationStyleSelect.cxx | 1 - ...StepVisual_PresentedItemRepresentation.cxx | 2 -- src/StepVisual/StepVisual_StyledItem.cxx | 3 --- src/StepVisual/StepVisual_StyledItem.hxx | 1 - .../StepVisual_SurfaceSideStyle.cxx | 1 - .../StepVisual_SurfaceSideStyle.hxx | 1 - .../StepVisual_SurfaceStyleBoundary.cxx | 1 - .../StepVisual_SurfaceStyleControlGrid.cxx | 1 - .../StepVisual_SurfaceStyleElementSelect.cxx | 2 -- .../StepVisual_SurfaceStyleFillArea.cxx | 1 - .../StepVisual_SurfaceStyleParameterLine.cxx | 2 -- ...al_SurfaceStyleRenderingWithProperties.hxx | 1 - ...epVisual_SurfaceStyleSegmentationCurve.cxx | 1 - .../StepVisual_SurfaceStyleSilhouette.cxx | 1 - .../StepVisual_SurfaceStyleUsage.cxx | 1 - ...Visual_TessellatedAnnotationOccurrence.cxx | 1 - ...Visual_TessellatedAnnotationOccurrence.hxx | 1 - .../StepVisual_TessellatedCurveSet.cxx | 1 - .../StepVisual_TessellatedGeometricSet.cxx | 1 - src/StepVisual/StepVisual_TessellatedItem.cxx | 1 - src/StepVisual/StepVisual_TextLiteral.cxx | 3 --- src/StepVisual/StepVisual_TextLiteral.hxx | 1 - src/StepVisual/StepVisual_TextStyle.cxx | 1 - ...Visual_TextStyleWithBoxCharacteristics.cxx | 2 -- src/StepVisual/StepVisual_ViewVolume.cxx | 1 - src/StepVisual/StepVisual_ViewVolume.hxx | 2 -- src/StlAPI/StlAPI.hxx | 2 -- src/StlAPI/StlAPI_Reader.cxx | 3 --- src/StlAPI/StlAPI_Reader.hxx | 3 --- src/StlAPI/StlAPI_Writer.cxx | 3 --- 746 files changed, 1072 deletions(-) diff --git a/src/STEPEdit/STEPEdit.cxx b/src/STEPEdit/STEPEdit.cxx index 094df77a51..6b55fecb83 100644 --- a/src/STEPEdit/STEPEdit.cxx +++ b/src/STEPEdit/STEPEdit.cxx @@ -17,8 +17,6 @@ #include #include #include -#include -#include #include #include #include diff --git a/src/STEPEdit/STEPEdit_EditContext.cxx b/src/STEPEdit/STEPEdit_EditContext.cxx index f9cf5c83cb..a91692226a 100644 --- a/src/STEPEdit/STEPEdit_EditContext.cxx +++ b/src/STEPEdit/STEPEdit_EditContext.cxx @@ -13,7 +13,6 @@ #include -#include #include #include #include diff --git a/src/STEPEdit/STEPEdit_EditContext.hxx b/src/STEPEdit/STEPEdit_EditContext.hxx index 22d3eb76ca..4409ea9805 100644 --- a/src/STEPEdit/STEPEdit_EditContext.hxx +++ b/src/STEPEdit/STEPEdit_EditContext.hxx @@ -21,7 +21,6 @@ #include #include -#include #include class TCollection_AsciiString; class IFSelect_EditForm; diff --git a/src/STEPEdit/STEPEdit_EditSDR.cxx b/src/STEPEdit/STEPEdit_EditSDR.cxx index 0ef7990146..68d2665787 100644 --- a/src/STEPEdit/STEPEdit_EditSDR.cxx +++ b/src/STEPEdit/STEPEdit_EditSDR.cxx @@ -13,7 +13,6 @@ #include -#include #include #include #include diff --git a/src/STEPEdit/STEPEdit_EditSDR.hxx b/src/STEPEdit/STEPEdit_EditSDR.hxx index f53c15bc31..3b989e3222 100644 --- a/src/STEPEdit/STEPEdit_EditSDR.hxx +++ b/src/STEPEdit/STEPEdit_EditSDR.hxx @@ -21,7 +21,6 @@ #include #include -#include #include class TCollection_AsciiString; class IFSelect_EditForm; diff --git a/src/STEPSelections/STEPSelections_AssemblyComponent.cxx b/src/STEPSelections/STEPSelections_AssemblyComponent.cxx index 99a4dfc92a..6bb365da7d 100644 --- a/src/STEPSelections/STEPSelections_AssemblyComponent.cxx +++ b/src/STEPSelections/STEPSelections_AssemblyComponent.cxx @@ -15,7 +15,6 @@ // commercial license or contractual agreement. -#include #include #include diff --git a/src/STEPSelections/STEPSelections_AssemblyExplorer.cxx b/src/STEPSelections/STEPSelections_AssemblyExplorer.cxx index c40b583ddf..75fc4d189f 100644 --- a/src/STEPSelections/STEPSelections_AssemblyExplorer.cxx +++ b/src/STEPSelections/STEPSelections_AssemblyExplorer.cxx @@ -16,8 +16,6 @@ #include -#include -#include #include #include #include @@ -27,7 +25,6 @@ #include #include #include -#include #include #include #include diff --git a/src/STEPSelections/STEPSelections_AssemblyLink.cxx b/src/STEPSelections/STEPSelections_AssemblyLink.cxx index 240c878527..7f0820854a 100644 --- a/src/STEPSelections/STEPSelections_AssemblyLink.cxx +++ b/src/STEPSelections/STEPSelections_AssemblyLink.cxx @@ -16,7 +16,6 @@ #include -#include #include #include #include diff --git a/src/STEPSelections/STEPSelections_Counter.cxx b/src/STEPSelections/STEPSelections_Counter.cxx index 4d08653608..9fe036fb75 100644 --- a/src/STEPSelections/STEPSelections_Counter.cxx +++ b/src/STEPSelections/STEPSelections_Counter.cxx @@ -27,7 +27,6 @@ #include #include #include -#include #include #include #include @@ -37,15 +36,12 @@ #include #include #include -#include #include #include #include #include -#include #include #include -#include #include STEPSelections_Counter::STEPSelections_Counter() diff --git a/src/STEPSelections/STEPSelections_HSequenceOfAssemblyLink.hxx b/src/STEPSelections/STEPSelections_HSequenceOfAssemblyLink.hxx index 8295e115fc..dd2ddc963c 100644 --- a/src/STEPSelections/STEPSelections_HSequenceOfAssemblyLink.hxx +++ b/src/STEPSelections/STEPSelections_HSequenceOfAssemblyLink.hxx @@ -17,7 +17,6 @@ #ifndef STEPSelections_HSequenceOfAssemblyLink_HeaderFile #define STEPSelections_HSequenceOfAssemblyLink_HeaderFile -#include #include #include diff --git a/src/STEPSelections/STEPSelections_SelectAssembly.hxx b/src/STEPSelections/STEPSelections_SelectAssembly.hxx index 5a642b242d..855a1c8723 100644 --- a/src/STEPSelections/STEPSelections_SelectAssembly.hxx +++ b/src/STEPSelections/STEPSelections_SelectAssembly.hxx @@ -21,7 +21,6 @@ #include #include -#include #include class Standard_Transient; class Interface_Graph; diff --git a/src/STEPSelections/STEPSelections_SelectDerived.hxx b/src/STEPSelections/STEPSelections_SelectDerived.hxx index 434c405bae..92ce3cc0f8 100644 --- a/src/STEPSelections/STEPSelections_SelectDerived.hxx +++ b/src/STEPSelections/STEPSelections_SelectDerived.hxx @@ -21,7 +21,6 @@ #include #include -#include class Standard_Transient; class Interface_InterfaceModel; class TCollection_AsciiString; diff --git a/src/STEPSelections/STEPSelections_SelectFaces.hxx b/src/STEPSelections/STEPSelections_SelectFaces.hxx index b83f10467f..d4f83b449d 100644 --- a/src/STEPSelections/STEPSelections_SelectFaces.hxx +++ b/src/STEPSelections/STEPSelections_SelectFaces.hxx @@ -21,7 +21,6 @@ #include #include -#include #include class Standard_Transient; class Interface_Graph; diff --git a/src/STEPSelections/STEPSelections_SelectGSCurves.hxx b/src/STEPSelections/STEPSelections_SelectGSCurves.hxx index a2b5714d7c..dbe323c641 100644 --- a/src/STEPSelections/STEPSelections_SelectGSCurves.hxx +++ b/src/STEPSelections/STEPSelections_SelectGSCurves.hxx @@ -21,7 +21,6 @@ #include #include -#include #include class Standard_Transient; class Interface_Graph; diff --git a/src/STEPSelections/STEPSelections_SelectInstances.cxx b/src/STEPSelections/STEPSelections_SelectInstances.cxx index 2dd5d52197..2ce4764542 100644 --- a/src/STEPSelections/STEPSelections_SelectInstances.cxx +++ b/src/STEPSelections/STEPSelections_SelectInstances.cxx @@ -16,7 +16,6 @@ #include -#include #include #include #include diff --git a/src/STEPSelections/STEPSelections_SelectInstances.hxx b/src/STEPSelections/STEPSelections_SelectInstances.hxx index 33ea6e8c21..79edae0f8b 100644 --- a/src/STEPSelections/STEPSelections_SelectInstances.hxx +++ b/src/STEPSelections/STEPSelections_SelectInstances.hxx @@ -21,7 +21,6 @@ #include #include -#include #include class Interface_EntityIterator; class Interface_Graph; diff --git a/src/StepData/StepData_DefaultGeneral.cxx b/src/StepData/StepData_DefaultGeneral.cxx index 68c9f23ac5..17a5fb63cf 100644 --- a/src/StepData/StepData_DefaultGeneral.cxx +++ b/src/StepData/StepData_DefaultGeneral.cxx @@ -17,7 +17,6 @@ #include #include #include -#include #include #include #include diff --git a/src/StepData/StepData_DefaultGeneral.hxx b/src/StepData/StepData_DefaultGeneral.hxx index 7ebe56b15f..2bf5813e0c 100644 --- a/src/StepData/StepData_DefaultGeneral.hxx +++ b/src/StepData/StepData_DefaultGeneral.hxx @@ -22,7 +22,6 @@ #include #include -#include class Standard_Transient; class Interface_EntityIterator; class Interface_ShareTool; diff --git a/src/StepData/StepData_Described.cxx b/src/StepData/StepData_Described.cxx index e6b51ee1aa..b82a692c2d 100644 --- a/src/StepData/StepData_Described.cxx +++ b/src/StepData/StepData_Described.cxx @@ -14,11 +14,9 @@ #include #include -#include #include #include #include -#include #include IMPLEMENT_STANDARD_RTTIEXT(StepData_Described,Standard_Transient) diff --git a/src/StepData/StepData_Described.hxx b/src/StepData/StepData_Described.hxx index 7e5c5c35cc..8148e5e055 100644 --- a/src/StepData/StepData_Described.hxx +++ b/src/StepData/StepData_Described.hxx @@ -21,8 +21,6 @@ #include #include -#include -#include class StepData_EDescr; class StepData_Simple; class StepData_Field; diff --git a/src/StepData/StepData_ECDescr.cxx b/src/StepData/StepData_ECDescr.cxx index 8139a80877..83141f07b5 100644 --- a/src/StepData/StepData_ECDescr.cxx +++ b/src/StepData/StepData_ECDescr.cxx @@ -13,7 +13,6 @@ #include -#include #include #include #include diff --git a/src/StepData/StepData_ECDescr.hxx b/src/StepData/StepData_ECDescr.hxx index 43e9aae78f..f150c7dea6 100644 --- a/src/StepData/StepData_ECDescr.hxx +++ b/src/StepData/StepData_ECDescr.hxx @@ -24,7 +24,6 @@ #include #include #include -#include #include class StepData_ESDescr; class StepData_Described; diff --git a/src/StepData/StepData_EDescr.hxx b/src/StepData/StepData_EDescr.hxx index b8623b6800..86ea0a4970 100644 --- a/src/StepData/StepData_EDescr.hxx +++ b/src/StepData/StepData_EDescr.hxx @@ -21,8 +21,6 @@ #include #include -#include -#include class StepData_Described; diff --git a/src/StepData/StepData_ESDescr.cxx b/src/StepData/StepData_ESDescr.cxx index 5f2c8c707a..7084493623 100644 --- a/src/StepData/StepData_ESDescr.cxx +++ b/src/StepData/StepData_ESDescr.cxx @@ -14,7 +14,6 @@ #include #include -#include #include #include #include diff --git a/src/StepData/StepData_ESDescr.hxx b/src/StepData/StepData_ESDescr.hxx index 193a582b30..1173e0d093 100644 --- a/src/StepData/StepData_ESDescr.hxx +++ b/src/StepData/StepData_ESDescr.hxx @@ -20,12 +20,10 @@ #include #include -#include #include #include #include #include -#include #include #include #include diff --git a/src/StepData/StepData_EnumTool.hxx b/src/StepData/StepData_EnumTool.hxx index e35894139f..fd96ee6614 100644 --- a/src/StepData/StepData_EnumTool.hxx +++ b/src/StepData/StepData_EnumTool.hxx @@ -22,8 +22,6 @@ #include #include -#include -#include #include class TCollection_AsciiString; diff --git a/src/StepData/StepData_Field.hxx b/src/StepData/StepData_Field.hxx index 25fb7e5278..b5f9c9ace6 100644 --- a/src/StepData/StepData_Field.hxx +++ b/src/StepData/StepData_Field.hxx @@ -22,8 +22,6 @@ #include #include -#include -#include #include #include class StepData_SelectMember; diff --git a/src/StepData/StepData_FieldList.hxx b/src/StepData/StepData_FieldList.hxx index 9d9329ed15..b3c4b8c272 100644 --- a/src/StepData/StepData_FieldList.hxx +++ b/src/StepData/StepData_FieldList.hxx @@ -19,7 +19,6 @@ #include #include -#include #include class StepData_Field; diff --git a/src/StepData/StepData_FieldList1.cxx b/src/StepData/StepData_FieldList1.cxx index 2442c31852..882a0e7d28 100644 --- a/src/StepData/StepData_FieldList1.cxx +++ b/src/StepData/StepData_FieldList1.cxx @@ -13,7 +13,6 @@ #include -#include #include StepData_FieldList1::StepData_FieldList1 () { } diff --git a/src/StepData/StepData_FieldList1.hxx b/src/StepData/StepData_FieldList1.hxx index c779fb23bf..95d339ce51 100644 --- a/src/StepData/StepData_FieldList1.hxx +++ b/src/StepData/StepData_FieldList1.hxx @@ -19,7 +19,6 @@ #include #include -#include #include #include diff --git a/src/StepData/StepData_FieldListD.cxx b/src/StepData/StepData_FieldListD.cxx index d96a76dbb1..be168c63cb 100644 --- a/src/StepData/StepData_FieldListD.cxx +++ b/src/StepData/StepData_FieldListD.cxx @@ -13,7 +13,6 @@ #include -#include #include StepData_FieldListD::StepData_FieldListD (const Standard_Integer nb) diff --git a/src/StepData/StepData_FieldListN.cxx b/src/StepData/StepData_FieldListN.cxx index d3f185ee4b..32b9f0b58f 100644 --- a/src/StepData/StepData_FieldListN.cxx +++ b/src/StepData/StepData_FieldListN.cxx @@ -12,8 +12,6 @@ // commercial license or contractual agreement. -#include -#include #include StepData_FieldListN::StepData_FieldListN (const Standard_Integer nb) diff --git a/src/StepData/StepData_FieldListN.hxx b/src/StepData/StepData_FieldListN.hxx index f3d41cf075..ce1faca4c1 100644 --- a/src/StepData/StepData_FieldListN.hxx +++ b/src/StepData/StepData_FieldListN.hxx @@ -23,7 +23,6 @@ #include #include -#include class StepData_Field; diff --git a/src/StepData/StepData_FileProtocol.cxx b/src/StepData/StepData_FileProtocol.cxx index 212ac03eee..6a264f7c88 100644 --- a/src/StepData/StepData_FileProtocol.cxx +++ b/src/StepData/StepData_FileProtocol.cxx @@ -14,7 +14,6 @@ #include #include -#include #include #include #include diff --git a/src/StepData/StepData_FileProtocol.hxx b/src/StepData/StepData_FileProtocol.hxx index 2b120d695f..8223f637c7 100644 --- a/src/StepData/StepData_FileProtocol.hxx +++ b/src/StepData/StepData_FileProtocol.hxx @@ -23,9 +23,6 @@ #include #include #include -#include -#include -#include class Interface_Protocol; class Interface_Graph; class Interface_Check; diff --git a/src/StepData/StepData_FileRecognizer.hxx b/src/StepData/StepData_FileRecognizer.hxx index ca425986a2..8b87e76e6e 100644 --- a/src/StepData/StepData_FileRecognizer.hxx +++ b/src/StepData/StepData_FileRecognizer.hxx @@ -20,7 +20,6 @@ #include #include -#include #include class Standard_Transient; class Standard_NoSuchObject; diff --git a/src/StepData/StepData_FreeFormEntity.cxx b/src/StepData/StepData_FreeFormEntity.cxx index 63ec8e8d41..04acffa1b4 100644 --- a/src/StepData/StepData_FreeFormEntity.cxx +++ b/src/StepData/StepData_FreeFormEntity.cxx @@ -14,7 +14,6 @@ #include #include -#include #include #include #include diff --git a/src/StepData/StepData_FreeFormEntity.hxx b/src/StepData/StepData_FreeFormEntity.hxx index 06c5400234..56a460ca90 100644 --- a/src/StepData/StepData_FreeFormEntity.hxx +++ b/src/StepData/StepData_FreeFormEntity.hxx @@ -20,11 +20,9 @@ #include #include -#include #include #include #include -#include #include #include class StepData_Field; diff --git a/src/StepData/StepData_GeneralModule.cxx b/src/StepData/StepData_GeneralModule.cxx index f6b8d90103..d470d99c79 100644 --- a/src/StepData/StepData_GeneralModule.cxx +++ b/src/StepData/StepData_GeneralModule.cxx @@ -15,7 +15,6 @@ #include #include #include -#include #include #include #include diff --git a/src/StepData/StepData_GlobalFactors.hxx b/src/StepData/StepData_GlobalFactors.hxx index 90c30e3bba..fbad6079ce 100644 --- a/src/StepData/StepData_GlobalFactors.hxx +++ b/src/StepData/StepData_GlobalFactors.hxx @@ -19,7 +19,6 @@ #include #include #include -#include //! Class for using global units variables class StepData_GlobalFactors diff --git a/src/StepData/StepData_HArray1OfField.hxx b/src/StepData/StepData_HArray1OfField.hxx index addceab8c1..9d14a249f6 100644 --- a/src/StepData/StepData_HArray1OfField.hxx +++ b/src/StepData/StepData_HArray1OfField.hxx @@ -17,7 +17,6 @@ #ifndef StepData_HArray1OfField_HeaderFile #define StepData_HArray1OfField_HeaderFile -#include #include #include diff --git a/src/StepData/StepData_PDescr.hxx b/src/StepData/StepData_PDescr.hxx index 7c71ab3a95..eeccdbfc7f 100644 --- a/src/StepData/StepData_PDescr.hxx +++ b/src/StepData/StepData_PDescr.hxx @@ -23,8 +23,6 @@ #include #include #include -#include -#include #include #include class StepData_EDescr; diff --git a/src/StepData/StepData_Plex.cxx b/src/StepData/StepData_Plex.cxx index 66131f68bc..0c391174b8 100644 --- a/src/StepData/StepData_Plex.cxx +++ b/src/StepData/StepData_Plex.cxx @@ -17,7 +17,6 @@ #include #include #include -#include #include #include #include diff --git a/src/StepData/StepData_Plex.hxx b/src/StepData/StepData_Plex.hxx index cd42a70fab..3da3c001a5 100644 --- a/src/StepData/StepData_Plex.hxx +++ b/src/StepData/StepData_Plex.hxx @@ -22,8 +22,6 @@ #include #include -#include -#include #include #include class StepData_ECDescr; diff --git a/src/StepData/StepData_Protocol.cxx b/src/StepData/StepData_Protocol.cxx index 614fde78a6..330299ccd7 100644 --- a/src/StepData/StepData_Protocol.cxx +++ b/src/StepData/StepData_Protocol.cxx @@ -14,8 +14,6 @@ #include #include #include -#include -#include #include #include #include diff --git a/src/StepData/StepData_Protocol.hxx b/src/StepData/StepData_Protocol.hxx index c617cbb47f..65f975efef 100644 --- a/src/StepData/StepData_Protocol.hxx +++ b/src/StepData/StepData_Protocol.hxx @@ -23,9 +23,6 @@ #include #include #include -#include -#include -#include #include class Interface_InterfaceModel; class StepData_EDescr; diff --git a/src/StepData/StepData_ReadWriteModule.cxx b/src/StepData/StepData_ReadWriteModule.cxx index 3f71c2ab4f..b5968c4b82 100644 --- a/src/StepData/StepData_ReadWriteModule.cxx +++ b/src/StepData/StepData_ReadWriteModule.cxx @@ -12,12 +12,8 @@ // commercial license or contractual agreement. -#include -#include #include -#include #include -#include #include #include #include diff --git a/src/StepData/StepData_ReadWriteModule.hxx b/src/StepData/StepData_ReadWriteModule.hxx index fd24b44b68..80505e1c0a 100644 --- a/src/StepData/StepData_ReadWriteModule.hxx +++ b/src/StepData/StepData_ReadWriteModule.hxx @@ -18,12 +18,9 @@ #define _StepData_ReadWriteModule_HeaderFile #include -#include #include -#include #include -#include class Interface_FileReaderData; class TCollection_AsciiString; class Interface_Check; diff --git a/src/StepData/StepData_SelectArrReal.cxx b/src/StepData/StepData_SelectArrReal.cxx index e752ef50be..4f26478805 100644 --- a/src/StepData/StepData_SelectArrReal.cxx +++ b/src/StepData/StepData_SelectArrReal.cxx @@ -12,7 +12,6 @@ // commercial license or contractual agreement. -#include #include IMPLEMENT_STANDARD_RTTIEXT(StepData_SelectArrReal,StepData_SelectNamed) diff --git a/src/StepData/StepData_SelectArrReal.hxx b/src/StepData/StepData_SelectArrReal.hxx index 1101317c07..0a91d4e729 100644 --- a/src/StepData/StepData_SelectArrReal.hxx +++ b/src/StepData/StepData_SelectArrReal.hxx @@ -17,7 +17,6 @@ #define _StepData_SelectArrReal_HeaderFile #include -#include #include #include diff --git a/src/StepData/StepData_SelectMember.hxx b/src/StepData/StepData_SelectMember.hxx index e50f39733a..6d606ba97f 100644 --- a/src/StepData/StepData_SelectMember.hxx +++ b/src/StepData/StepData_SelectMember.hxx @@ -21,12 +21,9 @@ #include #include -#include -#include #include #include #include -#include class StepData_SelectMember; diff --git a/src/StepData/StepData_SelectNamed.cxx b/src/StepData/StepData_SelectNamed.cxx index 674d15e257..ec8fff6b11 100644 --- a/src/StepData/StepData_SelectNamed.cxx +++ b/src/StepData/StepData_SelectNamed.cxx @@ -12,8 +12,6 @@ // commercial license or contractual agreement. -#include -#include #include IMPLEMENT_STANDARD_RTTIEXT(StepData_SelectNamed,StepData_SelectMember) diff --git a/src/StepData/StepData_SelectNamed.hxx b/src/StepData/StepData_SelectNamed.hxx index 0bb8ff5232..0fda36863f 100644 --- a/src/StepData/StepData_SelectNamed.hxx +++ b/src/StepData/StepData_SelectNamed.hxx @@ -18,12 +18,10 @@ #define _StepData_SelectNamed_HeaderFile #include -#include #include #include #include -#include #include #include #include diff --git a/src/StepData/StepData_SelectReal.hxx b/src/StepData/StepData_SelectReal.hxx index 912bf63813..b05ba31bce 100644 --- a/src/StepData/StepData_SelectReal.hxx +++ b/src/StepData/StepData_SelectReal.hxx @@ -20,7 +20,6 @@ #include #include -#include #include #include diff --git a/src/StepData/StepData_SelectType.hxx b/src/StepData/StepData_SelectType.hxx index fefd20a3e6..7a4db0b94e 100644 --- a/src/StepData/StepData_SelectType.hxx +++ b/src/StepData/StepData_SelectType.hxx @@ -22,11 +22,9 @@ #include #include -#include #include #include #include -#include class Standard_Transient; class StepData_PDescr; class StepData_SelectMember; diff --git a/src/StepData/StepData_Simple.cxx b/src/StepData/StepData_Simple.cxx index 81fa47402b..d66b94e489 100644 --- a/src/StepData/StepData_Simple.cxx +++ b/src/StepData/StepData_Simple.cxx @@ -17,8 +17,6 @@ #include #include #include -#include -#include #include IMPLEMENT_STANDARD_RTTIEXT(StepData_Simple,StepData_Described) diff --git a/src/StepData/StepData_Simple.hxx b/src/StepData/StepData_Simple.hxx index a0a84bc053..dd0d143fb8 100644 --- a/src/StepData/StepData_Simple.hxx +++ b/src/StepData/StepData_Simple.hxx @@ -23,7 +23,6 @@ #include #include #include -#include #include class StepData_ESDescr; class StepData_Field; diff --git a/src/StepData/StepData_StepDumper.cxx b/src/StepData/StepData_StepDumper.cxx index d7a9cabe4a..a3533c8034 100644 --- a/src/StepData/StepData_StepDumper.cxx +++ b/src/StepData/StepData_StepDumper.cxx @@ -14,9 +14,7 @@ #include #include -#include #include -#include #include #include #include diff --git a/src/StepData/StepData_StepDumper.hxx b/src/StepData/StepData_StepDumper.hxx index 4a4d261f64..a7fbfd41bb 100644 --- a/src/StepData/StepData_StepDumper.hxx +++ b/src/StepData/StepData_StepDumper.hxx @@ -25,7 +25,6 @@ #include #include #include -#include class StepData_StepModel; class StepData_Protocol; diff --git a/src/StepData/StepData_StepModel.cxx b/src/StepData/StepData_StepModel.cxx index 2768a85d19..5d86f07835 100644 --- a/src/StepData/StepData_StepModel.cxx +++ b/src/StepData/StepData_StepModel.cxx @@ -17,10 +17,8 @@ #include #include #include -#include #include #include -#include #include #include #include diff --git a/src/StepData/StepData_StepReaderData.cxx b/src/StepData/StepData_StepReaderData.cxx index dfa0ff782e..3221e05d59 100644 --- a/src/StepData/StepData_StepReaderData.cxx +++ b/src/StepData/StepData_StepReaderData.cxx @@ -15,7 +15,6 @@ // sln 04,10.2001. BUC61003. Prevent exception which may occur during reading of complex entity (if entity's items are not in alphabetical order) #include -#include #include #include #include @@ -24,9 +23,7 @@ #include #include #include -#include #include -#include #include #include #include @@ -35,7 +32,6 @@ #include #include #include -#include #include #include #include diff --git a/src/StepData/StepData_StepReaderData.hxx b/src/StepData/StepData_StepReaderData.hxx index b46a3013c7..327d2050eb 100644 --- a/src/StepData/StepData_StepReaderData.hxx +++ b/src/StepData/StepData_StepReaderData.hxx @@ -21,17 +21,13 @@ #include #include -#include #include #include #include #include #include #include -#include #include -#include -#include #include class Interface_Check; class TCollection_AsciiString; diff --git a/src/StepData/StepData_StepReaderTool.cxx b/src/StepData/StepData_StepReaderTool.cxx index 1e8146d9fc..9ece1b80b8 100644 --- a/src/StepData/StepData_StepReaderTool.cxx +++ b/src/StepData/StepData_StepReaderTool.cxx @@ -13,7 +13,6 @@ #include -#include #include #include #include diff --git a/src/StepData/StepData_StepReaderTool.hxx b/src/StepData/StepData_StepReaderTool.hxx index a554777951..3e242279f1 100644 --- a/src/StepData/StepData_StepReaderTool.hxx +++ b/src/StepData/StepData_StepReaderTool.hxx @@ -24,7 +24,6 @@ #include #include #include -#include #include class StepData_FileRecognizer; class StepData_StepReaderData; diff --git a/src/StepData/StepData_StepWriter.cxx b/src/StepData/StepData_StepWriter.cxx index 4f5114df57..ee04642aa8 100644 --- a/src/StepData/StepData_StepWriter.cxx +++ b/src/StepData/StepData_StepWriter.cxx @@ -16,16 +16,12 @@ // of strings from Header Section #include -#include #include -#include #include #include #include -#include #include #include -#include #include #include #include diff --git a/src/StepData/StepData_StepWriter.hxx b/src/StepData/StepData_StepWriter.hxx index 4aa91b3432..34c2fc2ea6 100644 --- a/src/StepData/StepData_StepWriter.hxx +++ b/src/StepData/StepData_StepWriter.hxx @@ -23,13 +23,11 @@ #include #include -#include #include #include #include #include #include -#include #include #include #include diff --git a/src/StepData/StepData_UndefinedEntity.cxx b/src/StepData/StepData_UndefinedEntity.cxx index 48b8670b51..381ebb81f3 100644 --- a/src/StepData/StepData_UndefinedEntity.cxx +++ b/src/StepData/StepData_UndefinedEntity.cxx @@ -16,7 +16,6 @@ #include #include #include -#include #include #include #include diff --git a/src/StepData/StepData_UndefinedEntity.hxx b/src/StepData/StepData_UndefinedEntity.hxx index c53febd361..aff886a74d 100644 --- a/src/StepData/StepData_UndefinedEntity.hxx +++ b/src/StepData/StepData_UndefinedEntity.hxx @@ -20,9 +20,7 @@ #include #include -#include #include -#include #include class TCollection_HAsciiString; class Interface_UndefinedContent; diff --git a/src/StepData/StepData_WriterLib.hxx b/src/StepData/StepData_WriterLib.hxx index 6f0501e9ae..8e775eeaf1 100644 --- a/src/StepData/StepData_WriterLib.hxx +++ b/src/StepData/StepData_WriterLib.hxx @@ -21,7 +21,6 @@ #include #include -#include #include class StepData_NodeOfWriterLib; class Standard_NoSuchObject; diff --git a/src/StepDimTol/StepDimTol_AngularityTolerance.cxx b/src/StepDimTol/StepDimTol_AngularityTolerance.cxx index c45e240f27..612ae7cc66 100644 --- a/src/StepDimTol/StepDimTol_AngularityTolerance.cxx +++ b/src/StepDimTol/StepDimTol_AngularityTolerance.cxx @@ -15,7 +15,6 @@ // Generator: ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V1.2 -#include #include IMPLEMENT_STANDARD_RTTIEXT(StepDimTol_AngularityTolerance,StepDimTol_GeometricToleranceWithDatumReference) diff --git a/src/StepDimTol/StepDimTol_AngularityTolerance.hxx b/src/StepDimTol/StepDimTol_AngularityTolerance.hxx index 510f144be5..8bef727c31 100644 --- a/src/StepDimTol/StepDimTol_AngularityTolerance.hxx +++ b/src/StepDimTol/StepDimTol_AngularityTolerance.hxx @@ -17,7 +17,6 @@ #define _StepDimTol_AngularityTolerance_HeaderFile #include -#include #include diff --git a/src/StepDimTol/StepDimTol_AreaUnitType.hxx b/src/StepDimTol/StepDimTol_AreaUnitType.hxx index faae1d96ab..3753a06651 100644 --- a/src/StepDimTol/StepDimTol_AreaUnitType.hxx +++ b/src/StepDimTol/StepDimTol_AreaUnitType.hxx @@ -16,8 +16,6 @@ #ifndef _StepDimTol_AreaUnitType_HeaderFile #define _StepDimTol_AreaUnitType_HeaderFile -#include - enum StepDimTol_AreaUnitType { StepDimTol_Circular, StepDimTol_Rectangular, diff --git a/src/StepDimTol/StepDimTol_CircularRunoutTolerance.cxx b/src/StepDimTol/StepDimTol_CircularRunoutTolerance.cxx index 24866c4daa..c111a43a5d 100644 --- a/src/StepDimTol/StepDimTol_CircularRunoutTolerance.cxx +++ b/src/StepDimTol/StepDimTol_CircularRunoutTolerance.cxx @@ -15,7 +15,6 @@ // Generator: ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V1.2 -#include #include IMPLEMENT_STANDARD_RTTIEXT(StepDimTol_CircularRunoutTolerance,StepDimTol_GeometricToleranceWithDatumReference) diff --git a/src/StepDimTol/StepDimTol_CircularRunoutTolerance.hxx b/src/StepDimTol/StepDimTol_CircularRunoutTolerance.hxx index edb83ee445..9cf539b39c 100644 --- a/src/StepDimTol/StepDimTol_CircularRunoutTolerance.hxx +++ b/src/StepDimTol/StepDimTol_CircularRunoutTolerance.hxx @@ -17,7 +17,6 @@ #define _StepDimTol_CircularRunoutTolerance_HeaderFile #include -#include #include diff --git a/src/StepDimTol/StepDimTol_CoaxialityTolerance.cxx b/src/StepDimTol/StepDimTol_CoaxialityTolerance.cxx index f25bc0e5bd..d87f40bcb2 100644 --- a/src/StepDimTol/StepDimTol_CoaxialityTolerance.cxx +++ b/src/StepDimTol/StepDimTol_CoaxialityTolerance.cxx @@ -15,7 +15,6 @@ // Generator: ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V1.2 -#include #include IMPLEMENT_STANDARD_RTTIEXT(StepDimTol_CoaxialityTolerance,StepDimTol_GeometricToleranceWithDatumReference) diff --git a/src/StepDimTol/StepDimTol_CoaxialityTolerance.hxx b/src/StepDimTol/StepDimTol_CoaxialityTolerance.hxx index bed36cac44..f5858adc7d 100644 --- a/src/StepDimTol/StepDimTol_CoaxialityTolerance.hxx +++ b/src/StepDimTol/StepDimTol_CoaxialityTolerance.hxx @@ -17,7 +17,6 @@ #define _StepDimTol_CoaxialityTolerance_HeaderFile #include -#include #include diff --git a/src/StepDimTol/StepDimTol_CommonDatum.cxx b/src/StepDimTol/StepDimTol_CommonDatum.cxx index 1ff71f6cc7..d8827d9c01 100644 --- a/src/StepDimTol/StepDimTol_CommonDatum.cxx +++ b/src/StepDimTol/StepDimTol_CommonDatum.cxx @@ -15,7 +15,6 @@ // Generator: ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V1.2 -#include #include #include #include diff --git a/src/StepDimTol/StepDimTol_ConcentricityTolerance.cxx b/src/StepDimTol/StepDimTol_ConcentricityTolerance.cxx index 37d9a52b43..030220c23f 100644 --- a/src/StepDimTol/StepDimTol_ConcentricityTolerance.cxx +++ b/src/StepDimTol/StepDimTol_ConcentricityTolerance.cxx @@ -15,7 +15,6 @@ // Generator: ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V1.2 -#include #include IMPLEMENT_STANDARD_RTTIEXT(StepDimTol_ConcentricityTolerance,StepDimTol_GeometricToleranceWithDatumReference) diff --git a/src/StepDimTol/StepDimTol_ConcentricityTolerance.hxx b/src/StepDimTol/StepDimTol_ConcentricityTolerance.hxx index f371ec1f3a..465bb0f40d 100644 --- a/src/StepDimTol/StepDimTol_ConcentricityTolerance.hxx +++ b/src/StepDimTol/StepDimTol_ConcentricityTolerance.hxx @@ -17,7 +17,6 @@ #define _StepDimTol_ConcentricityTolerance_HeaderFile #include -#include #include diff --git a/src/StepDimTol/StepDimTol_CylindricityTolerance.cxx b/src/StepDimTol/StepDimTol_CylindricityTolerance.cxx index 145ae061ab..b784e1ec21 100644 --- a/src/StepDimTol/StepDimTol_CylindricityTolerance.cxx +++ b/src/StepDimTol/StepDimTol_CylindricityTolerance.cxx @@ -15,7 +15,6 @@ // Generator: ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V1.2 -#include #include IMPLEMENT_STANDARD_RTTIEXT(StepDimTol_CylindricityTolerance,StepDimTol_GeometricTolerance) diff --git a/src/StepDimTol/StepDimTol_CylindricityTolerance.hxx b/src/StepDimTol/StepDimTol_CylindricityTolerance.hxx index be8fa2a397..424e0c8b63 100644 --- a/src/StepDimTol/StepDimTol_CylindricityTolerance.hxx +++ b/src/StepDimTol/StepDimTol_CylindricityTolerance.hxx @@ -17,7 +17,6 @@ #define _StepDimTol_CylindricityTolerance_HeaderFile #include -#include #include diff --git a/src/StepDimTol/StepDimTol_Datum.cxx b/src/StepDimTol/StepDimTol_Datum.cxx index 91b6ce8b98..9148930dfe 100644 --- a/src/StepDimTol/StepDimTol_Datum.cxx +++ b/src/StepDimTol/StepDimTol_Datum.cxx @@ -15,7 +15,6 @@ // Generator: ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V1.2 -#include #include #include #include diff --git a/src/StepDimTol/StepDimTol_DatumReferenceCompartment.hxx b/src/StepDimTol/StepDimTol_DatumReferenceCompartment.hxx index f241989b10..e5d428afea 100644 --- a/src/StepDimTol/StepDimTol_DatumReferenceCompartment.hxx +++ b/src/StepDimTol/StepDimTol_DatumReferenceCompartment.hxx @@ -17,7 +17,6 @@ #define _StepDimTol_DatumReferenceCompartment_HeaderFile #include -#include #include diff --git a/src/StepDimTol/StepDimTol_DatumReferenceElement.hxx b/src/StepDimTol/StepDimTol_DatumReferenceElement.hxx index a3b3c8bf88..fc67e33343 100644 --- a/src/StepDimTol/StepDimTol_DatumReferenceElement.hxx +++ b/src/StepDimTol/StepDimTol_DatumReferenceElement.hxx @@ -17,7 +17,6 @@ #define _StepDimTol_DatumReferenceElement_HeaderFile #include -#include #include #include diff --git a/src/StepDimTol/StepDimTol_DatumReferenceModifier.hxx b/src/StepDimTol/StepDimTol_DatumReferenceModifier.hxx index b64bb16769..1b0493db2a 100644 --- a/src/StepDimTol/StepDimTol_DatumReferenceModifier.hxx +++ b/src/StepDimTol/StepDimTol_DatumReferenceModifier.hxx @@ -21,7 +21,6 @@ #include #include -#include #include #include diff --git a/src/StepDimTol/StepDimTol_DatumReferenceModifierType.hxx b/src/StepDimTol/StepDimTol_DatumReferenceModifierType.hxx index 161aaa11b5..1f1086cdbe 100644 --- a/src/StepDimTol/StepDimTol_DatumReferenceModifierType.hxx +++ b/src/StepDimTol/StepDimTol_DatumReferenceModifierType.hxx @@ -16,8 +16,6 @@ #ifndef _StepDimTol_DatumReferenceModifierType_HeaderFile #define _StepDimTol_DatumReferenceModifierType_HeaderFile -#include - enum StepDimTol_DatumReferenceModifierType { StepDimTol_CircularOrCylindrical, StepDimTol_Distance, diff --git a/src/StepDimTol/StepDimTol_DatumReferenceModifierWithValue.hxx b/src/StepDimTol/StepDimTol_DatumReferenceModifierWithValue.hxx index 0614c69c29..dba5ef7e2a 100644 --- a/src/StepDimTol/StepDimTol_DatumReferenceModifierWithValue.hxx +++ b/src/StepDimTol/StepDimTol_DatumReferenceModifierWithValue.hxx @@ -17,7 +17,6 @@ #define _StepDimTol_DatumReferenceModifierWithValue_HeaderFile #include -#include #include #include diff --git a/src/StepDimTol/StepDimTol_DatumSystem.hxx b/src/StepDimTol/StepDimTol_DatumSystem.hxx index 6f06e7f5cd..71483f0788 100644 --- a/src/StepDimTol/StepDimTol_DatumSystem.hxx +++ b/src/StepDimTol/StepDimTol_DatumSystem.hxx @@ -17,10 +17,8 @@ #define _StepDimTol_DatumSystem_HeaderFile #include -#include #include -#include #include class StepDimTol_DatumSystem; diff --git a/src/StepDimTol/StepDimTol_DatumTarget.cxx b/src/StepDimTol/StepDimTol_DatumTarget.cxx index 662147ad07..35acb8449a 100644 --- a/src/StepDimTol/StepDimTol_DatumTarget.cxx +++ b/src/StepDimTol/StepDimTol_DatumTarget.cxx @@ -15,7 +15,6 @@ // Generator: ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V1.2 -#include #include #include #include diff --git a/src/StepDimTol/StepDimTol_FlatnessTolerance.cxx b/src/StepDimTol/StepDimTol_FlatnessTolerance.cxx index b46908458b..295f45217d 100644 --- a/src/StepDimTol/StepDimTol_FlatnessTolerance.cxx +++ b/src/StepDimTol/StepDimTol_FlatnessTolerance.cxx @@ -15,7 +15,6 @@ // Generator: ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V1.2 -#include #include IMPLEMENT_STANDARD_RTTIEXT(StepDimTol_FlatnessTolerance,StepDimTol_GeometricTolerance) diff --git a/src/StepDimTol/StepDimTol_FlatnessTolerance.hxx b/src/StepDimTol/StepDimTol_FlatnessTolerance.hxx index 88bdba8b28..f2770cb472 100644 --- a/src/StepDimTol/StepDimTol_FlatnessTolerance.hxx +++ b/src/StepDimTol/StepDimTol_FlatnessTolerance.hxx @@ -17,7 +17,6 @@ #define _StepDimTol_FlatnessTolerance_HeaderFile #include -#include #include diff --git a/src/StepDimTol/StepDimTol_GeneralDatumReference.hxx b/src/StepDimTol/StepDimTol_GeneralDatumReference.hxx index a9af7e2684..4ed6e3ad60 100644 --- a/src/StepDimTol/StepDimTol_GeneralDatumReference.hxx +++ b/src/StepDimTol/StepDimTol_GeneralDatumReference.hxx @@ -17,7 +17,6 @@ #define _StepDimTol_GeneralDatumReference_HeaderFile #include -#include #include #include diff --git a/src/StepDimTol/StepDimTol_GeoTolAndGeoTolWthDatRef.cxx b/src/StepDimTol/StepDimTol_GeoTolAndGeoTolWthDatRef.cxx index 9bca2414f4..bd0f5a9c4c 100644 --- a/src/StepDimTol/StepDimTol_GeoTolAndGeoTolWthDatRef.cxx +++ b/src/StepDimTol/StepDimTol_GeoTolAndGeoTolWthDatRef.cxx @@ -14,9 +14,7 @@ // commercial license or contractual agreement. -#include #include -#include #include #include #include diff --git a/src/StepDimTol/StepDimTol_GeoTolAndGeoTolWthDatRefAndGeoTolWthMaxTol.cxx b/src/StepDimTol/StepDimTol_GeoTolAndGeoTolWthDatRefAndGeoTolWthMaxTol.cxx index ca0d8e29d9..0c302199a6 100644 --- a/src/StepDimTol/StepDimTol_GeoTolAndGeoTolWthDatRefAndGeoTolWthMaxTol.cxx +++ b/src/StepDimTol/StepDimTol_GeoTolAndGeoTolWthDatRefAndGeoTolWthMaxTol.cxx @@ -14,10 +14,8 @@ // commercial license or contractual agreement. -#include #include #include -#include #include #include #include diff --git a/src/StepDimTol/StepDimTol_GeoTolAndGeoTolWthDatRefAndGeoTolWthMod.cxx b/src/StepDimTol/StepDimTol_GeoTolAndGeoTolWthDatRefAndGeoTolWthMod.cxx index 3f56ccfa5e..e84ec6441f 100644 --- a/src/StepDimTol/StepDimTol_GeoTolAndGeoTolWthDatRefAndGeoTolWthMod.cxx +++ b/src/StepDimTol/StepDimTol_GeoTolAndGeoTolWthDatRefAndGeoTolWthMod.cxx @@ -14,9 +14,7 @@ // commercial license or contractual agreement. -#include #include -#include #include #include #include diff --git a/src/StepDimTol/StepDimTol_GeoTolAndGeoTolWthDatRefAndModGeoTolAndPosTol.cxx b/src/StepDimTol/StepDimTol_GeoTolAndGeoTolWthDatRefAndModGeoTolAndPosTol.cxx index 1c2eaba55c..1abd684a40 100644 --- a/src/StepDimTol/StepDimTol_GeoTolAndGeoTolWthDatRefAndModGeoTolAndPosTol.cxx +++ b/src/StepDimTol/StepDimTol_GeoTolAndGeoTolWthDatRefAndModGeoTolAndPosTol.cxx @@ -12,9 +12,7 @@ // commercial license or contractual agreement. -#include #include -#include #include #include #include diff --git a/src/StepDimTol/StepDimTol_GeoTolAndGeoTolWthDatRefAndUneqDisGeoTol.cxx b/src/StepDimTol/StepDimTol_GeoTolAndGeoTolWthDatRefAndUneqDisGeoTol.cxx index 42272790da..193eae62bc 100644 --- a/src/StepDimTol/StepDimTol_GeoTolAndGeoTolWthDatRefAndUneqDisGeoTol.cxx +++ b/src/StepDimTol/StepDimTol_GeoTolAndGeoTolWthDatRefAndUneqDisGeoTol.cxx @@ -14,9 +14,6 @@ // commercial license or contractual agreement. -#include -#include -#include #include #include #include diff --git a/src/StepDimTol/StepDimTol_GeoTolAndGeoTolWthMaxTol.cxx b/src/StepDimTol/StepDimTol_GeoTolAndGeoTolWthMaxTol.cxx index 151f056d94..7a53f72e44 100644 --- a/src/StepDimTol/StepDimTol_GeoTolAndGeoTolWthMaxTol.cxx +++ b/src/StepDimTol/StepDimTol_GeoTolAndGeoTolWthMaxTol.cxx @@ -14,10 +14,8 @@ // commercial license or contractual agreement. -#include #include #include -#include #include #include #include diff --git a/src/StepDimTol/StepDimTol_GeoTolAndGeoTolWthMod.cxx b/src/StepDimTol/StepDimTol_GeoTolAndGeoTolWthMod.cxx index 870f3116f3..b3b18d7d2d 100644 --- a/src/StepDimTol/StepDimTol_GeoTolAndGeoTolWthMod.cxx +++ b/src/StepDimTol/StepDimTol_GeoTolAndGeoTolWthMod.cxx @@ -14,9 +14,7 @@ // commercial license or contractual agreement. -#include #include -#include #include #include #include diff --git a/src/StepDimTol/StepDimTol_GeometricTolerance.cxx b/src/StepDimTol/StepDimTol_GeometricTolerance.cxx index 39297f9f42..9125c70650 100644 --- a/src/StepDimTol/StepDimTol_GeometricTolerance.cxx +++ b/src/StepDimTol/StepDimTol_GeometricTolerance.cxx @@ -15,7 +15,6 @@ // Generator: ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V1.2 -#include #include #include #include diff --git a/src/StepDimTol/StepDimTol_GeometricToleranceModifier.hxx b/src/StepDimTol/StepDimTol_GeometricToleranceModifier.hxx index ce632cf829..d0c1011ab9 100644 --- a/src/StepDimTol/StepDimTol_GeometricToleranceModifier.hxx +++ b/src/StepDimTol/StepDimTol_GeometricToleranceModifier.hxx @@ -16,8 +16,6 @@ #ifndef _StepDimTol_GeometricToleranceModifier_HeaderFile #define _StepDimTol_GeometricToleranceModifier_HeaderFile -#include - enum StepDimTol_GeometricToleranceModifier { StepDimTol_GTMAnyCrossSection, StepDimTol_GTMCommonZone, diff --git a/src/StepDimTol/StepDimTol_GeometricToleranceRelationship.cxx b/src/StepDimTol/StepDimTol_GeometricToleranceRelationship.cxx index 21175988f8..b26d0d2f12 100644 --- a/src/StepDimTol/StepDimTol_GeometricToleranceRelationship.cxx +++ b/src/StepDimTol/StepDimTol_GeometricToleranceRelationship.cxx @@ -15,7 +15,6 @@ // Generator: ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V1.2 -#include #include #include #include diff --git a/src/StepDimTol/StepDimTol_GeometricToleranceWithDatumReference.cxx b/src/StepDimTol/StepDimTol_GeometricToleranceWithDatumReference.cxx index b9635a9546..72cb8848a3 100644 --- a/src/StepDimTol/StepDimTol_GeometricToleranceWithDatumReference.cxx +++ b/src/StepDimTol/StepDimTol_GeometricToleranceWithDatumReference.cxx @@ -17,7 +17,6 @@ #include #include -#include #include #include #include diff --git a/src/StepDimTol/StepDimTol_GeometricToleranceWithDefinedAreaUnit.hxx b/src/StepDimTol/StepDimTol_GeometricToleranceWithDefinedAreaUnit.hxx index cacc2069e9..347598f6c1 100644 --- a/src/StepDimTol/StepDimTol_GeometricToleranceWithDefinedAreaUnit.hxx +++ b/src/StepDimTol/StepDimTol_GeometricToleranceWithDefinedAreaUnit.hxx @@ -17,7 +17,6 @@ #define _StepDimTol_GeometricToleranceWithDefinedAreaUnit_HeaderFile #include -#include #include #include diff --git a/src/StepDimTol/StepDimTol_GeometricToleranceWithDefinedUnit.hxx b/src/StepDimTol/StepDimTol_GeometricToleranceWithDefinedUnit.hxx index b990cb03ae..b063955f18 100644 --- a/src/StepDimTol/StepDimTol_GeometricToleranceWithDefinedUnit.hxx +++ b/src/StepDimTol/StepDimTol_GeometricToleranceWithDefinedUnit.hxx @@ -17,7 +17,6 @@ #define _StepDimTol_GeometricToleranceWithDefinedUnit_HeaderFile #include -#include #include diff --git a/src/StepDimTol/StepDimTol_GeometricToleranceWithMaximumTolerance.hxx b/src/StepDimTol/StepDimTol_GeometricToleranceWithMaximumTolerance.hxx index 79f4ad1ba1..dedc6cbf91 100644 --- a/src/StepDimTol/StepDimTol_GeometricToleranceWithMaximumTolerance.hxx +++ b/src/StepDimTol/StepDimTol_GeometricToleranceWithMaximumTolerance.hxx @@ -17,7 +17,6 @@ #define _StepDimTol_GeometricToleranceWithMaximumTolerance_HeaderFile #include -#include #include #include diff --git a/src/StepDimTol/StepDimTol_GeometricToleranceWithModifiers.hxx b/src/StepDimTol/StepDimTol_GeometricToleranceWithModifiers.hxx index 1d7a3396a4..94c982c901 100644 --- a/src/StepDimTol/StepDimTol_GeometricToleranceWithModifiers.hxx +++ b/src/StepDimTol/StepDimTol_GeometricToleranceWithModifiers.hxx @@ -17,11 +17,9 @@ #define _StepDimTol_GeometricToleranceWithModifiers_HeaderFile #include -#include #include #include -#include #include class TCollection_HAsciiString; diff --git a/src/StepDimTol/StepDimTol_HArray1OfDatumReference.hxx b/src/StepDimTol/StepDimTol_HArray1OfDatumReference.hxx index 8d60f6177f..ffbad57414 100644 --- a/src/StepDimTol/StepDimTol_HArray1OfDatumReference.hxx +++ b/src/StepDimTol/StepDimTol_HArray1OfDatumReference.hxx @@ -16,7 +16,6 @@ #ifndef StepDimTol_HArray1OfDatumReference_HeaderFile #define StepDimTol_HArray1OfDatumReference_HeaderFile -#include #include #include diff --git a/src/StepDimTol/StepDimTol_HArray1OfDatumReferenceCompartment.hxx b/src/StepDimTol/StepDimTol_HArray1OfDatumReferenceCompartment.hxx index 7facb28bdc..d0c16d5f84 100644 --- a/src/StepDimTol/StepDimTol_HArray1OfDatumReferenceCompartment.hxx +++ b/src/StepDimTol/StepDimTol_HArray1OfDatumReferenceCompartment.hxx @@ -16,7 +16,6 @@ #ifndef _StepDimTol_HArray1OfDatumReferenceCompartment_HeaderFile #define _StepDimTol_HArray1OfDatumReferenceCompartment_HeaderFile -#include #include #include diff --git a/src/StepDimTol/StepDimTol_HArray1OfDatumReferenceElement.hxx b/src/StepDimTol/StepDimTol_HArray1OfDatumReferenceElement.hxx index ce27a57420..ab3021e348 100644 --- a/src/StepDimTol/StepDimTol_HArray1OfDatumReferenceElement.hxx +++ b/src/StepDimTol/StepDimTol_HArray1OfDatumReferenceElement.hxx @@ -16,7 +16,6 @@ #ifndef _StepDimTol_HArray1OfDatumReferenceElement_HeaderFile #define _StepDimTol_HArray1OfDatumReferenceElement_HeaderFile -#include #include #include diff --git a/src/StepDimTol/StepDimTol_HArray1OfDatumSystemOrReference.hxx b/src/StepDimTol/StepDimTol_HArray1OfDatumSystemOrReference.hxx index 0be449ed8a..c2aa2694ac 100644 --- a/src/StepDimTol/StepDimTol_HArray1OfDatumSystemOrReference.hxx +++ b/src/StepDimTol/StepDimTol_HArray1OfDatumSystemOrReference.hxx @@ -16,7 +16,6 @@ #ifndef _StepDimTol_HArray1OfDatumSystemOrReference_HeaderFile #define _StepDimTol_HArray1OfDatumSystemOrReference_HeaderFile -#include #include #include diff --git a/src/StepDimTol/StepDimTol_HArray1OfGeometricToleranceModifier.hxx b/src/StepDimTol/StepDimTol_HArray1OfGeometricToleranceModifier.hxx index c1aeede41d..41fd67c215 100644 --- a/src/StepDimTol/StepDimTol_HArray1OfGeometricToleranceModifier.hxx +++ b/src/StepDimTol/StepDimTol_HArray1OfGeometricToleranceModifier.hxx @@ -16,7 +16,6 @@ #ifndef _StepDimTol_HArray1OfGeometricToleranceModifier_HeaderFile #define _StepDimTol_HArray1OfGeometricToleranceModifier_HeaderFile -#include #include #include diff --git a/src/StepDimTol/StepDimTol_HArray1OfToleranceZoneTarget.hxx b/src/StepDimTol/StepDimTol_HArray1OfToleranceZoneTarget.hxx index 46f4efbf9e..754cae54a6 100644 --- a/src/StepDimTol/StepDimTol_HArray1OfToleranceZoneTarget.hxx +++ b/src/StepDimTol/StepDimTol_HArray1OfToleranceZoneTarget.hxx @@ -16,7 +16,6 @@ #ifndef _StepDimTol_HArray1OfToleranceZoneTarget_HeaderFile #define _StepDimTol_HArray1OfToleranceZoneTarget_HeaderFile -#include #include #include diff --git a/src/StepDimTol/StepDimTol_LineProfileTolerance.cxx b/src/StepDimTol/StepDimTol_LineProfileTolerance.cxx index 2b7abfc0fc..7fa1c4b9a9 100644 --- a/src/StepDimTol/StepDimTol_LineProfileTolerance.cxx +++ b/src/StepDimTol/StepDimTol_LineProfileTolerance.cxx @@ -15,7 +15,6 @@ // Generator: ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V1.2 -#include #include IMPLEMENT_STANDARD_RTTIEXT(StepDimTol_LineProfileTolerance,StepDimTol_GeometricTolerance) diff --git a/src/StepDimTol/StepDimTol_LineProfileTolerance.hxx b/src/StepDimTol/StepDimTol_LineProfileTolerance.hxx index e21f8e1015..f3314459c7 100644 --- a/src/StepDimTol/StepDimTol_LineProfileTolerance.hxx +++ b/src/StepDimTol/StepDimTol_LineProfileTolerance.hxx @@ -17,7 +17,6 @@ #define _StepDimTol_LineProfileTolerance_HeaderFile #include -#include #include diff --git a/src/StepDimTol/StepDimTol_ModifiedGeometricTolerance.cxx b/src/StepDimTol/StepDimTol_ModifiedGeometricTolerance.cxx index 15543fb670..99ec6e6bf4 100644 --- a/src/StepDimTol/StepDimTol_ModifiedGeometricTolerance.cxx +++ b/src/StepDimTol/StepDimTol_ModifiedGeometricTolerance.cxx @@ -15,7 +15,6 @@ // Generator: ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V1.2 -#include #include #include #include diff --git a/src/StepDimTol/StepDimTol_NonUniformZoneDefinition.hxx b/src/StepDimTol/StepDimTol_NonUniformZoneDefinition.hxx index 07bd75c843..14f079daf8 100644 --- a/src/StepDimTol/StepDimTol_NonUniformZoneDefinition.hxx +++ b/src/StepDimTol/StepDimTol_NonUniformZoneDefinition.hxx @@ -17,7 +17,6 @@ #define _StepDimTol_NonUniformZoneDefinition_HeaderFile #include -#include #include diff --git a/src/StepDimTol/StepDimTol_ParallelismTolerance.cxx b/src/StepDimTol/StepDimTol_ParallelismTolerance.cxx index b21fb6d27f..dfbaed3942 100644 --- a/src/StepDimTol/StepDimTol_ParallelismTolerance.cxx +++ b/src/StepDimTol/StepDimTol_ParallelismTolerance.cxx @@ -15,7 +15,6 @@ // Generator: ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V1.2 -#include #include IMPLEMENT_STANDARD_RTTIEXT(StepDimTol_ParallelismTolerance,StepDimTol_GeometricToleranceWithDatumReference) diff --git a/src/StepDimTol/StepDimTol_ParallelismTolerance.hxx b/src/StepDimTol/StepDimTol_ParallelismTolerance.hxx index f9ef11d562..5eb8cd8e02 100644 --- a/src/StepDimTol/StepDimTol_ParallelismTolerance.hxx +++ b/src/StepDimTol/StepDimTol_ParallelismTolerance.hxx @@ -17,7 +17,6 @@ #define _StepDimTol_ParallelismTolerance_HeaderFile #include -#include #include diff --git a/src/StepDimTol/StepDimTol_PerpendicularityTolerance.cxx b/src/StepDimTol/StepDimTol_PerpendicularityTolerance.cxx index e7168e2030..a90bba00b2 100644 --- a/src/StepDimTol/StepDimTol_PerpendicularityTolerance.cxx +++ b/src/StepDimTol/StepDimTol_PerpendicularityTolerance.cxx @@ -15,7 +15,6 @@ // Generator: ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V1.2 -#include #include IMPLEMENT_STANDARD_RTTIEXT(StepDimTol_PerpendicularityTolerance,StepDimTol_GeometricToleranceWithDatumReference) diff --git a/src/StepDimTol/StepDimTol_PerpendicularityTolerance.hxx b/src/StepDimTol/StepDimTol_PerpendicularityTolerance.hxx index 4ce3b28888..366d6474ab 100644 --- a/src/StepDimTol/StepDimTol_PerpendicularityTolerance.hxx +++ b/src/StepDimTol/StepDimTol_PerpendicularityTolerance.hxx @@ -17,7 +17,6 @@ #define _StepDimTol_PerpendicularityTolerance_HeaderFile #include -#include #include diff --git a/src/StepDimTol/StepDimTol_PositionTolerance.cxx b/src/StepDimTol/StepDimTol_PositionTolerance.cxx index 75f2889352..90ea35e3cd 100644 --- a/src/StepDimTol/StepDimTol_PositionTolerance.cxx +++ b/src/StepDimTol/StepDimTol_PositionTolerance.cxx @@ -15,7 +15,6 @@ // Generator: ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V1.2 -#include #include IMPLEMENT_STANDARD_RTTIEXT(StepDimTol_PositionTolerance,StepDimTol_GeometricTolerance) diff --git a/src/StepDimTol/StepDimTol_PositionTolerance.hxx b/src/StepDimTol/StepDimTol_PositionTolerance.hxx index 345da8872b..887147bff9 100644 --- a/src/StepDimTol/StepDimTol_PositionTolerance.hxx +++ b/src/StepDimTol/StepDimTol_PositionTolerance.hxx @@ -17,7 +17,6 @@ #define _StepDimTol_PositionTolerance_HeaderFile #include -#include #include diff --git a/src/StepDimTol/StepDimTol_ProjectedZoneDefinition.hxx b/src/StepDimTol/StepDimTol_ProjectedZoneDefinition.hxx index e9df3e0a49..3e311190e7 100644 --- a/src/StepDimTol/StepDimTol_ProjectedZoneDefinition.hxx +++ b/src/StepDimTol/StepDimTol_ProjectedZoneDefinition.hxx @@ -17,7 +17,6 @@ #define _StepDimTol_ProjectedZoneDefinition_HeaderFile #include -#include #include #include diff --git a/src/StepDimTol/StepDimTol_RoundnessTolerance.cxx b/src/StepDimTol/StepDimTol_RoundnessTolerance.cxx index 49c15687d9..1131517230 100644 --- a/src/StepDimTol/StepDimTol_RoundnessTolerance.cxx +++ b/src/StepDimTol/StepDimTol_RoundnessTolerance.cxx @@ -15,7 +15,6 @@ // Generator: ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V1.2 -#include #include IMPLEMENT_STANDARD_RTTIEXT(StepDimTol_RoundnessTolerance,StepDimTol_GeometricTolerance) diff --git a/src/StepDimTol/StepDimTol_RoundnessTolerance.hxx b/src/StepDimTol/StepDimTol_RoundnessTolerance.hxx index cc974e9615..8794249f70 100644 --- a/src/StepDimTol/StepDimTol_RoundnessTolerance.hxx +++ b/src/StepDimTol/StepDimTol_RoundnessTolerance.hxx @@ -17,7 +17,6 @@ #define _StepDimTol_RoundnessTolerance_HeaderFile #include -#include #include diff --git a/src/StepDimTol/StepDimTol_RunoutZoneDefinition.hxx b/src/StepDimTol/StepDimTol_RunoutZoneDefinition.hxx index ad917e2a13..1a9ce7c1aa 100644 --- a/src/StepDimTol/StepDimTol_RunoutZoneDefinition.hxx +++ b/src/StepDimTol/StepDimTol_RunoutZoneDefinition.hxx @@ -17,7 +17,6 @@ #define _StepDimTol_RunoutZoneDefinition_HeaderFile #include -#include #include #include diff --git a/src/StepDimTol/StepDimTol_RunoutZoneOrientation.hxx b/src/StepDimTol/StepDimTol_RunoutZoneOrientation.hxx index 12b989bb6b..99295855c2 100644 --- a/src/StepDimTol/StepDimTol_RunoutZoneOrientation.hxx +++ b/src/StepDimTol/StepDimTol_RunoutZoneOrientation.hxx @@ -20,7 +20,6 @@ #include #include -#include #include class StepDimTol_RunoutZoneOrientation; diff --git a/src/StepDimTol/StepDimTol_SimpleDatumReferenceModifier.hxx b/src/StepDimTol/StepDimTol_SimpleDatumReferenceModifier.hxx index 9a5b55c246..2e8ce66d0e 100644 --- a/src/StepDimTol/StepDimTol_SimpleDatumReferenceModifier.hxx +++ b/src/StepDimTol/StepDimTol_SimpleDatumReferenceModifier.hxx @@ -16,8 +16,6 @@ #ifndef _StepDimTol_SimpleDatumReferenceModifier_HeaderFile #define _StepDimTol_SimpleDatumReferenceModifier_HeaderFile -#include - enum StepDimTol_SimpleDatumReferenceModifier { StepDimTol_SDRMAnyCrossSection, StepDimTol_SDRMAnyLongitudinalSection, diff --git a/src/StepDimTol/StepDimTol_StraightnessTolerance.cxx b/src/StepDimTol/StepDimTol_StraightnessTolerance.cxx index 8a29dfca4e..b340fc396c 100644 --- a/src/StepDimTol/StepDimTol_StraightnessTolerance.cxx +++ b/src/StepDimTol/StepDimTol_StraightnessTolerance.cxx @@ -15,7 +15,6 @@ // Generator: ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V1.2 -#include #include IMPLEMENT_STANDARD_RTTIEXT(StepDimTol_StraightnessTolerance,StepDimTol_GeometricTolerance) diff --git a/src/StepDimTol/StepDimTol_StraightnessTolerance.hxx b/src/StepDimTol/StepDimTol_StraightnessTolerance.hxx index b11567715b..7dd5fb9dc4 100644 --- a/src/StepDimTol/StepDimTol_StraightnessTolerance.hxx +++ b/src/StepDimTol/StepDimTol_StraightnessTolerance.hxx @@ -17,7 +17,6 @@ #define _StepDimTol_StraightnessTolerance_HeaderFile #include -#include #include diff --git a/src/StepDimTol/StepDimTol_SurfaceProfileTolerance.cxx b/src/StepDimTol/StepDimTol_SurfaceProfileTolerance.cxx index 4865e4b511..1e32d50f6e 100644 --- a/src/StepDimTol/StepDimTol_SurfaceProfileTolerance.cxx +++ b/src/StepDimTol/StepDimTol_SurfaceProfileTolerance.cxx @@ -15,7 +15,6 @@ // Generator: ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V1.2 -#include #include IMPLEMENT_STANDARD_RTTIEXT(StepDimTol_SurfaceProfileTolerance,StepDimTol_GeometricTolerance) diff --git a/src/StepDimTol/StepDimTol_SurfaceProfileTolerance.hxx b/src/StepDimTol/StepDimTol_SurfaceProfileTolerance.hxx index 9740c41c35..d8a40911de 100644 --- a/src/StepDimTol/StepDimTol_SurfaceProfileTolerance.hxx +++ b/src/StepDimTol/StepDimTol_SurfaceProfileTolerance.hxx @@ -17,7 +17,6 @@ #define _StepDimTol_SurfaceProfileTolerance_HeaderFile #include -#include #include diff --git a/src/StepDimTol/StepDimTol_SymmetryTolerance.cxx b/src/StepDimTol/StepDimTol_SymmetryTolerance.cxx index 15611770bd..0c1cf5e74f 100644 --- a/src/StepDimTol/StepDimTol_SymmetryTolerance.cxx +++ b/src/StepDimTol/StepDimTol_SymmetryTolerance.cxx @@ -15,7 +15,6 @@ // Generator: ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V1.2 -#include #include IMPLEMENT_STANDARD_RTTIEXT(StepDimTol_SymmetryTolerance,StepDimTol_GeometricToleranceWithDatumReference) diff --git a/src/StepDimTol/StepDimTol_SymmetryTolerance.hxx b/src/StepDimTol/StepDimTol_SymmetryTolerance.hxx index d107897ca9..89f1b8d1dd 100644 --- a/src/StepDimTol/StepDimTol_SymmetryTolerance.hxx +++ b/src/StepDimTol/StepDimTol_SymmetryTolerance.hxx @@ -17,7 +17,6 @@ #define _StepDimTol_SymmetryTolerance_HeaderFile #include -#include #include diff --git a/src/StepDimTol/StepDimTol_ToleranceZone.hxx b/src/StepDimTol/StepDimTol_ToleranceZone.hxx index 7768873585..418aa03724 100644 --- a/src/StepDimTol/StepDimTol_ToleranceZone.hxx +++ b/src/StepDimTol/StepDimTol_ToleranceZone.hxx @@ -17,7 +17,6 @@ #define _StepDimTol_ToleranceZone_HeaderFile #include -#include #include #include diff --git a/src/StepDimTol/StepDimTol_ToleranceZoneDefinition.hxx b/src/StepDimTol/StepDimTol_ToleranceZoneDefinition.hxx index d65bda3d1c..3f23ad47ce 100644 --- a/src/StepDimTol/StepDimTol_ToleranceZoneDefinition.hxx +++ b/src/StepDimTol/StepDimTol_ToleranceZoneDefinition.hxx @@ -17,7 +17,6 @@ #define _StepDimTol_ToleranceZoneDefinition_HeaderFile #include -#include #include #include diff --git a/src/StepDimTol/StepDimTol_ToleranceZoneForm.hxx b/src/StepDimTol/StepDimTol_ToleranceZoneForm.hxx index 9ed229448b..11e8fd4e10 100644 --- a/src/StepDimTol/StepDimTol_ToleranceZoneForm.hxx +++ b/src/StepDimTol/StepDimTol_ToleranceZoneForm.hxx @@ -20,7 +20,6 @@ #include #include -#include #include class TCollection_HAsciiString; diff --git a/src/StepDimTol/StepDimTol_TotalRunoutTolerance.cxx b/src/StepDimTol/StepDimTol_TotalRunoutTolerance.cxx index 89dcc19069..8cc4020a4e 100644 --- a/src/StepDimTol/StepDimTol_TotalRunoutTolerance.cxx +++ b/src/StepDimTol/StepDimTol_TotalRunoutTolerance.cxx @@ -15,7 +15,6 @@ // Generator: ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V1.2 -#include #include IMPLEMENT_STANDARD_RTTIEXT(StepDimTol_TotalRunoutTolerance,StepDimTol_GeometricToleranceWithDatumReference) diff --git a/src/StepDimTol/StepDimTol_TotalRunoutTolerance.hxx b/src/StepDimTol/StepDimTol_TotalRunoutTolerance.hxx index b5ea090740..bd61b0106c 100644 --- a/src/StepDimTol/StepDimTol_TotalRunoutTolerance.hxx +++ b/src/StepDimTol/StepDimTol_TotalRunoutTolerance.hxx @@ -17,7 +17,6 @@ #define _StepDimTol_TotalRunoutTolerance_HeaderFile #include -#include #include diff --git a/src/StepDimTol/StepDimTol_UnequallyDisposedGeometricTolerance.hxx b/src/StepDimTol/StepDimTol_UnequallyDisposedGeometricTolerance.hxx index de9d3d8186..4f53e5fb26 100644 --- a/src/StepDimTol/StepDimTol_UnequallyDisposedGeometricTolerance.hxx +++ b/src/StepDimTol/StepDimTol_UnequallyDisposedGeometricTolerance.hxx @@ -17,7 +17,6 @@ #define _StepDimTol_UnequallyDisposedGeometricTolerance_HeaderFile #include -#include #include #include diff --git a/src/StepElement/StepElement_AnalysisItemWithinRepresentation.cxx b/src/StepElement/StepElement_AnalysisItemWithinRepresentation.cxx index 7b3324e671..6aa7b1b9cf 100644 --- a/src/StepElement/StepElement_AnalysisItemWithinRepresentation.cxx +++ b/src/StepElement/StepElement_AnalysisItemWithinRepresentation.cxx @@ -15,7 +15,6 @@ // Generator: ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V1.2 -#include #include #include #include diff --git a/src/StepElement/StepElement_Curve3dElementDescriptor.cxx b/src/StepElement/StepElement_Curve3dElementDescriptor.cxx index 571f12ef90..039b49fce0 100644 --- a/src/StepElement/StepElement_Curve3dElementDescriptor.cxx +++ b/src/StepElement/StepElement_Curve3dElementDescriptor.cxx @@ -15,7 +15,6 @@ // Generator: ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V1.2 -#include #include #include diff --git a/src/StepElement/StepElement_Curve3dElementDescriptor.hxx b/src/StepElement/StepElement_Curve3dElementDescriptor.hxx index 6b430afa90..22ef9407e8 100644 --- a/src/StepElement/StepElement_Curve3dElementDescriptor.hxx +++ b/src/StepElement/StepElement_Curve3dElementDescriptor.hxx @@ -17,7 +17,6 @@ #define _StepElement_Curve3dElementDescriptor_HeaderFile #include -#include #include #include diff --git a/src/StepElement/StepElement_CurveElementEndReleasePacket.cxx b/src/StepElement/StepElement_CurveElementEndReleasePacket.cxx index c9e3fab030..560862f12c 100644 --- a/src/StepElement/StepElement_CurveElementEndReleasePacket.cxx +++ b/src/StepElement/StepElement_CurveElementEndReleasePacket.cxx @@ -15,7 +15,6 @@ // Generator: ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V1.2 -#include #include #include diff --git a/src/StepElement/StepElement_CurveElementEndReleasePacket.hxx b/src/StepElement/StepElement_CurveElementEndReleasePacket.hxx index f7017146f3..a48e319fcd 100644 --- a/src/StepElement/StepElement_CurveElementEndReleasePacket.hxx +++ b/src/StepElement/StepElement_CurveElementEndReleasePacket.hxx @@ -17,7 +17,6 @@ #define _StepElement_CurveElementEndReleasePacket_HeaderFile #include -#include #include #include diff --git a/src/StepElement/StepElement_CurveElementFreedomMember.cxx b/src/StepElement/StepElement_CurveElementFreedomMember.cxx index adf4e83f9d..6f336f4a24 100644 --- a/src/StepElement/StepElement_CurveElementFreedomMember.cxx +++ b/src/StepElement/StepElement_CurveElementFreedomMember.cxx @@ -15,7 +15,6 @@ // Generator: ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V2.0 -#include #include #include diff --git a/src/StepElement/StepElement_CurveElementFreedomMember.hxx b/src/StepElement/StepElement_CurveElementFreedomMember.hxx index b51509bd1e..28be92d19e 100644 --- a/src/StepElement/StepElement_CurveElementFreedomMember.hxx +++ b/src/StepElement/StepElement_CurveElementFreedomMember.hxx @@ -17,11 +17,9 @@ #define _StepElement_CurveElementFreedomMember_HeaderFile #include -#include #include #include -#include #include diff --git a/src/StepElement/StepElement_CurveElementPurposeMember.cxx b/src/StepElement/StepElement_CurveElementPurposeMember.cxx index a14e973dbb..a615a00ef9 100644 --- a/src/StepElement/StepElement_CurveElementPurposeMember.cxx +++ b/src/StepElement/StepElement_CurveElementPurposeMember.cxx @@ -15,7 +15,6 @@ // Generator: ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V2.0 -#include #include #include diff --git a/src/StepElement/StepElement_CurveElementPurposeMember.hxx b/src/StepElement/StepElement_CurveElementPurposeMember.hxx index 6b5deb4a98..911634da58 100644 --- a/src/StepElement/StepElement_CurveElementPurposeMember.hxx +++ b/src/StepElement/StepElement_CurveElementPurposeMember.hxx @@ -17,11 +17,9 @@ #define _StepElement_CurveElementPurposeMember_HeaderFile #include -#include #include #include -#include #include diff --git a/src/StepElement/StepElement_CurveElementSectionDefinition.cxx b/src/StepElement/StepElement_CurveElementSectionDefinition.cxx index 13ef999ffe..96e4fd0a22 100644 --- a/src/StepElement/StepElement_CurveElementSectionDefinition.cxx +++ b/src/StepElement/StepElement_CurveElementSectionDefinition.cxx @@ -15,7 +15,6 @@ // Generator: ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V1.2 -#include #include #include diff --git a/src/StepElement/StepElement_CurveElementSectionDerivedDefinitions.cxx b/src/StepElement/StepElement_CurveElementSectionDerivedDefinitions.cxx index 4274ae83b4..29b3677444 100644 --- a/src/StepElement/StepElement_CurveElementSectionDerivedDefinitions.cxx +++ b/src/StepElement/StepElement_CurveElementSectionDerivedDefinitions.cxx @@ -15,7 +15,6 @@ // Generator: ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V1.2 -#include #include #include #include diff --git a/src/StepElement/StepElement_CurveElementSectionDerivedDefinitions.hxx b/src/StepElement/StepElement_CurveElementSectionDerivedDefinitions.hxx index 564ae8ff6f..ad35682e92 100644 --- a/src/StepElement/StepElement_CurveElementSectionDerivedDefinitions.hxx +++ b/src/StepElement/StepElement_CurveElementSectionDerivedDefinitions.hxx @@ -17,7 +17,6 @@ #define _StepElement_CurveElementSectionDerivedDefinitions_HeaderFile #include -#include #include #include diff --git a/src/StepElement/StepElement_ElementAspectMember.cxx b/src/StepElement/StepElement_ElementAspectMember.cxx index 0661a5d59a..15748e796e 100644 --- a/src/StepElement/StepElement_ElementAspectMember.cxx +++ b/src/StepElement/StepElement_ElementAspectMember.cxx @@ -15,7 +15,6 @@ // Generator: ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V2.0 -#include #include #include diff --git a/src/StepElement/StepElement_ElementAspectMember.hxx b/src/StepElement/StepElement_ElementAspectMember.hxx index 150b872b3d..ac691f2af0 100644 --- a/src/StepElement/StepElement_ElementAspectMember.hxx +++ b/src/StepElement/StepElement_ElementAspectMember.hxx @@ -17,11 +17,9 @@ #define _StepElement_ElementAspectMember_HeaderFile #include -#include #include #include -#include #include diff --git a/src/StepElement/StepElement_ElementDescriptor.cxx b/src/StepElement/StepElement_ElementDescriptor.cxx index 22df2a867a..c0136d7a32 100644 --- a/src/StepElement/StepElement_ElementDescriptor.cxx +++ b/src/StepElement/StepElement_ElementDescriptor.cxx @@ -15,7 +15,6 @@ // Generator: ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V1.2 -#include #include #include diff --git a/src/StepElement/StepElement_ElementMaterial.cxx b/src/StepElement/StepElement_ElementMaterial.cxx index 7f68431c35..a5e7449910 100644 --- a/src/StepElement/StepElement_ElementMaterial.cxx +++ b/src/StepElement/StepElement_ElementMaterial.cxx @@ -15,7 +15,6 @@ // Generator: ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V1.2 -#include #include #include diff --git a/src/StepElement/StepElement_ElementMaterial.hxx b/src/StepElement/StepElement_ElementMaterial.hxx index d4264c4853..06b29a2a1e 100644 --- a/src/StepElement/StepElement_ElementMaterial.hxx +++ b/src/StepElement/StepElement_ElementMaterial.hxx @@ -17,7 +17,6 @@ #define _StepElement_ElementMaterial_HeaderFile #include -#include #include #include diff --git a/src/StepElement/StepElement_HArray1OfCurveElementEndReleasePacket.hxx b/src/StepElement/StepElement_HArray1OfCurveElementEndReleasePacket.hxx index 5d437de993..f5759458e0 100644 --- a/src/StepElement/StepElement_HArray1OfCurveElementEndReleasePacket.hxx +++ b/src/StepElement/StepElement_HArray1OfCurveElementEndReleasePacket.hxx @@ -14,7 +14,6 @@ #ifndef StepElement_HArray1OfCurveElementEndReleasePacket_HeaderFile #define StepElement_HArray1OfCurveElementEndReleasePacket_HeaderFile -#include #include #include diff --git a/src/StepElement/StepElement_HArray1OfCurveElementSectionDefinition.hxx b/src/StepElement/StepElement_HArray1OfCurveElementSectionDefinition.hxx index efaac6e4d9..6a78cd75d9 100644 --- a/src/StepElement/StepElement_HArray1OfCurveElementSectionDefinition.hxx +++ b/src/StepElement/StepElement_HArray1OfCurveElementSectionDefinition.hxx @@ -14,7 +14,6 @@ #ifndef StepElement_HArray1OfCurveElementSectionDefinition_HeaderFile #define StepElement_HArray1OfCurveElementSectionDefinition_HeaderFile -#include #include #include diff --git a/src/StepElement/StepElement_HArray1OfHSequenceOfSurfaceElementPurposeMember.hxx b/src/StepElement/StepElement_HArray1OfHSequenceOfSurfaceElementPurposeMember.hxx index a7e8400e6a..afa90895d2 100644 --- a/src/StepElement/StepElement_HArray1OfHSequenceOfSurfaceElementPurposeMember.hxx +++ b/src/StepElement/StepElement_HArray1OfHSequenceOfSurfaceElementPurposeMember.hxx @@ -14,7 +14,6 @@ #ifndef StepElement_HArray1OfHSequenceOfSurfaceElementPurposeMember_HeaderFile #define StepElement_HArray1OfHSequenceOfSurfaceElementPurposeMember_HeaderFile -#include #include #include diff --git a/src/StepElement/StepElement_HArray1OfMeasureOrUnspecifiedValue.hxx b/src/StepElement/StepElement_HArray1OfMeasureOrUnspecifiedValue.hxx index 6ec235caf3..7ccc4f3390 100644 --- a/src/StepElement/StepElement_HArray1OfMeasureOrUnspecifiedValue.hxx +++ b/src/StepElement/StepElement_HArray1OfMeasureOrUnspecifiedValue.hxx @@ -14,7 +14,6 @@ #ifndef StepElement_HArray1OfMeasureOrUnspecifiedValue_HeaderFile #define StepElement_HArray1OfMeasureOrUnspecifiedValue_HeaderFile -#include #include #include diff --git a/src/StepElement/StepElement_HArray1OfSurfaceSection.hxx b/src/StepElement/StepElement_HArray1OfSurfaceSection.hxx index 3b2801ede8..b354553dec 100644 --- a/src/StepElement/StepElement_HArray1OfSurfaceSection.hxx +++ b/src/StepElement/StepElement_HArray1OfSurfaceSection.hxx @@ -14,7 +14,6 @@ #ifndef StepElement_HArray1OfSurfaceSection_HeaderFile #define StepElement_HArray1OfSurfaceSection_HeaderFile -#include #include #include diff --git a/src/StepElement/StepElement_HArray1OfVolumeElementPurposeMember.hxx b/src/StepElement/StepElement_HArray1OfVolumeElementPurposeMember.hxx index 6435c3f213..0acc73277c 100644 --- a/src/StepElement/StepElement_HArray1OfVolumeElementPurposeMember.hxx +++ b/src/StepElement/StepElement_HArray1OfVolumeElementPurposeMember.hxx @@ -14,7 +14,6 @@ #ifndef StepElement_HArray1OfVolumeElementPurposeMember_HeaderFile #define StepElement_HArray1OfVolumeElementPurposeMember_HeaderFile -#include #include #include diff --git a/src/StepElement/StepElement_HSequenceOfCurveElementSectionDefinition.hxx b/src/StepElement/StepElement_HSequenceOfCurveElementSectionDefinition.hxx index 3584d57f3e..02d755c3ed 100644 --- a/src/StepElement/StepElement_HSequenceOfCurveElementSectionDefinition.hxx +++ b/src/StepElement/StepElement_HSequenceOfCurveElementSectionDefinition.hxx @@ -14,7 +14,6 @@ #ifndef StepElement_HSequenceOfCurveElementSectionDefinition_HeaderFile #define StepElement_HSequenceOfCurveElementSectionDefinition_HeaderFile -#include #include #include diff --git a/src/StepElement/StepElement_HSequenceOfElementMaterial.hxx b/src/StepElement/StepElement_HSequenceOfElementMaterial.hxx index 00e8a63baa..1e8578db11 100644 --- a/src/StepElement/StepElement_HSequenceOfElementMaterial.hxx +++ b/src/StepElement/StepElement_HSequenceOfElementMaterial.hxx @@ -14,7 +14,6 @@ #ifndef StepElement_HSequenceOfElementMaterial_HeaderFile #define StepElement_HSequenceOfElementMaterial_HeaderFile -#include #include #include diff --git a/src/StepElement/StepElement_HSequenceOfSurfaceElementPurposeMember.hxx b/src/StepElement/StepElement_HSequenceOfSurfaceElementPurposeMember.hxx index b3d71cfc94..4df8da20dc 100644 --- a/src/StepElement/StepElement_HSequenceOfSurfaceElementPurposeMember.hxx +++ b/src/StepElement/StepElement_HSequenceOfSurfaceElementPurposeMember.hxx @@ -14,7 +14,6 @@ #ifndef StepElement_HSequenceOfSurfaceElementPurposeMember_HeaderFile #define StepElement_HSequenceOfSurfaceElementPurposeMember_HeaderFile -#include #include #include diff --git a/src/StepElement/StepElement_MeasureOrUnspecifiedValue.hxx b/src/StepElement/StepElement_MeasureOrUnspecifiedValue.hxx index 2fff0450ca..5c814834f5 100644 --- a/src/StepElement/StepElement_MeasureOrUnspecifiedValue.hxx +++ b/src/StepElement/StepElement_MeasureOrUnspecifiedValue.hxx @@ -22,7 +22,6 @@ #include #include -#include #include class Standard_Transient; class StepData_SelectMember; diff --git a/src/StepElement/StepElement_MeasureOrUnspecifiedValueMember.cxx b/src/StepElement/StepElement_MeasureOrUnspecifiedValueMember.cxx index ccbea30eea..cc589b46e3 100644 --- a/src/StepElement/StepElement_MeasureOrUnspecifiedValueMember.cxx +++ b/src/StepElement/StepElement_MeasureOrUnspecifiedValueMember.cxx @@ -15,7 +15,6 @@ // Generator: ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V2.0 -#include #include #include diff --git a/src/StepElement/StepElement_MeasureOrUnspecifiedValueMember.hxx b/src/StepElement/StepElement_MeasureOrUnspecifiedValueMember.hxx index f1e2c7764e..194d4903bf 100644 --- a/src/StepElement/StepElement_MeasureOrUnspecifiedValueMember.hxx +++ b/src/StepElement/StepElement_MeasureOrUnspecifiedValueMember.hxx @@ -17,11 +17,9 @@ #define _StepElement_MeasureOrUnspecifiedValueMember_HeaderFile #include -#include #include #include -#include #include diff --git a/src/StepElement/StepElement_Surface3dElementDescriptor.cxx b/src/StepElement/StepElement_Surface3dElementDescriptor.cxx index a8e8effb65..9a288bf771 100644 --- a/src/StepElement/StepElement_Surface3dElementDescriptor.cxx +++ b/src/StepElement/StepElement_Surface3dElementDescriptor.cxx @@ -15,7 +15,6 @@ // Generator: ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V1.2 -#include #include #include diff --git a/src/StepElement/StepElement_Surface3dElementDescriptor.hxx b/src/StepElement/StepElement_Surface3dElementDescriptor.hxx index 56bd054255..e762d756f1 100644 --- a/src/StepElement/StepElement_Surface3dElementDescriptor.hxx +++ b/src/StepElement/StepElement_Surface3dElementDescriptor.hxx @@ -17,7 +17,6 @@ #define _StepElement_Surface3dElementDescriptor_HeaderFile #include -#include #include #include diff --git a/src/StepElement/StepElement_SurfaceElementProperty.cxx b/src/StepElement/StepElement_SurfaceElementProperty.cxx index 4e93f68a2c..f71bfb6160 100644 --- a/src/StepElement/StepElement_SurfaceElementProperty.cxx +++ b/src/StepElement/StepElement_SurfaceElementProperty.cxx @@ -15,7 +15,6 @@ // Generator: ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V1.2 -#include #include #include #include diff --git a/src/StepElement/StepElement_SurfaceElementPurposeMember.cxx b/src/StepElement/StepElement_SurfaceElementPurposeMember.cxx index e00852104d..3b83ed1ee9 100644 --- a/src/StepElement/StepElement_SurfaceElementPurposeMember.cxx +++ b/src/StepElement/StepElement_SurfaceElementPurposeMember.cxx @@ -15,7 +15,6 @@ // Generator: ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V2.0 -#include #include #include diff --git a/src/StepElement/StepElement_SurfaceElementPurposeMember.hxx b/src/StepElement/StepElement_SurfaceElementPurposeMember.hxx index 3ebb7431fd..c59423425d 100644 --- a/src/StepElement/StepElement_SurfaceElementPurposeMember.hxx +++ b/src/StepElement/StepElement_SurfaceElementPurposeMember.hxx @@ -17,11 +17,9 @@ #define _StepElement_SurfaceElementPurposeMember_HeaderFile #include -#include #include #include -#include #include diff --git a/src/StepElement/StepElement_SurfaceSection.cxx b/src/StepElement/StepElement_SurfaceSection.cxx index b1e783f575..f30f0938e6 100644 --- a/src/StepElement/StepElement_SurfaceSection.cxx +++ b/src/StepElement/StepElement_SurfaceSection.cxx @@ -15,8 +15,6 @@ // Generator: ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V1.2 -#include -#include #include IMPLEMENT_STANDARD_RTTIEXT(StepElement_SurfaceSection,Standard_Transient) diff --git a/src/StepElement/StepElement_SurfaceSection.hxx b/src/StepElement/StepElement_SurfaceSection.hxx index 3be5255e9e..3d3b1b4425 100644 --- a/src/StepElement/StepElement_SurfaceSection.hxx +++ b/src/StepElement/StepElement_SurfaceSection.hxx @@ -17,7 +17,6 @@ #define _StepElement_SurfaceSection_HeaderFile #include -#include #include #include diff --git a/src/StepElement/StepElement_SurfaceSectionFieldConstant.cxx b/src/StepElement/StepElement_SurfaceSectionFieldConstant.cxx index b36a3c427c..f7c2e88c63 100644 --- a/src/StepElement/StepElement_SurfaceSectionFieldConstant.cxx +++ b/src/StepElement/StepElement_SurfaceSectionFieldConstant.cxx @@ -15,7 +15,6 @@ // Generator: ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V1.2 -#include #include #include diff --git a/src/StepElement/StepElement_SurfaceSectionFieldVarying.cxx b/src/StepElement/StepElement_SurfaceSectionFieldVarying.cxx index ed276f0327..58cb83035a 100644 --- a/src/StepElement/StepElement_SurfaceSectionFieldVarying.cxx +++ b/src/StepElement/StepElement_SurfaceSectionFieldVarying.cxx @@ -15,7 +15,6 @@ // Generator: ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V1.2 -#include #include IMPLEMENT_STANDARD_RTTIEXT(StepElement_SurfaceSectionFieldVarying,StepElement_SurfaceSectionField) diff --git a/src/StepElement/StepElement_SurfaceSectionFieldVarying.hxx b/src/StepElement/StepElement_SurfaceSectionFieldVarying.hxx index f2f870d4ce..caa5fcdc99 100644 --- a/src/StepElement/StepElement_SurfaceSectionFieldVarying.hxx +++ b/src/StepElement/StepElement_SurfaceSectionFieldVarying.hxx @@ -17,7 +17,6 @@ #define _StepElement_SurfaceSectionFieldVarying_HeaderFile #include -#include #include #include diff --git a/src/StepElement/StepElement_UniformSurfaceSection.cxx b/src/StepElement/StepElement_UniformSurfaceSection.cxx index b7de763609..4511e5e4d9 100644 --- a/src/StepElement/StepElement_UniformSurfaceSection.cxx +++ b/src/StepElement/StepElement_UniformSurfaceSection.cxx @@ -15,8 +15,6 @@ // Generator: ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V1.2 -#include -#include #include IMPLEMENT_STANDARD_RTTIEXT(StepElement_UniformSurfaceSection,StepElement_SurfaceSection) diff --git a/src/StepElement/StepElement_UniformSurfaceSection.hxx b/src/StepElement/StepElement_UniformSurfaceSection.hxx index 253bbc8f20..eef5f43892 100644 --- a/src/StepElement/StepElement_UniformSurfaceSection.hxx +++ b/src/StepElement/StepElement_UniformSurfaceSection.hxx @@ -17,10 +17,8 @@ #define _StepElement_UniformSurfaceSection_HeaderFile #include -#include #include -#include #include diff --git a/src/StepElement/StepElement_Volume3dElementDescriptor.cxx b/src/StepElement/StepElement_Volume3dElementDescriptor.cxx index 2659294fb9..1f82c9b74a 100644 --- a/src/StepElement/StepElement_Volume3dElementDescriptor.cxx +++ b/src/StepElement/StepElement_Volume3dElementDescriptor.cxx @@ -15,7 +15,6 @@ // Generator: ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V1.2 -#include #include #include diff --git a/src/StepElement/StepElement_Volume3dElementDescriptor.hxx b/src/StepElement/StepElement_Volume3dElementDescriptor.hxx index fdeb765cf1..52a97a7671 100644 --- a/src/StepElement/StepElement_Volume3dElementDescriptor.hxx +++ b/src/StepElement/StepElement_Volume3dElementDescriptor.hxx @@ -17,7 +17,6 @@ #define _StepElement_Volume3dElementDescriptor_HeaderFile #include -#include #include #include diff --git a/src/StepElement/StepElement_VolumeElementPurposeMember.cxx b/src/StepElement/StepElement_VolumeElementPurposeMember.cxx index c3c6e3eec9..02591aba91 100644 --- a/src/StepElement/StepElement_VolumeElementPurposeMember.cxx +++ b/src/StepElement/StepElement_VolumeElementPurposeMember.cxx @@ -15,7 +15,6 @@ // Generator: ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V2.0 -#include #include #include diff --git a/src/StepElement/StepElement_VolumeElementPurposeMember.hxx b/src/StepElement/StepElement_VolumeElementPurposeMember.hxx index 83258f5c0e..d2d72cf24e 100644 --- a/src/StepElement/StepElement_VolumeElementPurposeMember.hxx +++ b/src/StepElement/StepElement_VolumeElementPurposeMember.hxx @@ -17,11 +17,9 @@ #define _StepElement_VolumeElementPurposeMember_HeaderFile #include -#include #include #include -#include #include diff --git a/src/StepFEA/StepFEA_AlignedCurve3dElementCoordinateSystem.cxx b/src/StepFEA/StepFEA_AlignedCurve3dElementCoordinateSystem.cxx index 48cbcbcc6f..72576871b0 100644 --- a/src/StepFEA/StepFEA_AlignedCurve3dElementCoordinateSystem.cxx +++ b/src/StepFEA/StepFEA_AlignedCurve3dElementCoordinateSystem.cxx @@ -15,7 +15,6 @@ // Generator: ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V1.2 -#include #include #include #include diff --git a/src/StepFEA/StepFEA_AlignedSurface3dElementCoordinateSystem.cxx b/src/StepFEA/StepFEA_AlignedSurface3dElementCoordinateSystem.cxx index 258c28c5f3..619924a2e5 100644 --- a/src/StepFEA/StepFEA_AlignedSurface3dElementCoordinateSystem.cxx +++ b/src/StepFEA/StepFEA_AlignedSurface3dElementCoordinateSystem.cxx @@ -15,7 +15,6 @@ // Generator: ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V1.2 -#include #include #include #include diff --git a/src/StepFEA/StepFEA_ArbitraryVolume3dElementCoordinateSystem.cxx b/src/StepFEA/StepFEA_ArbitraryVolume3dElementCoordinateSystem.cxx index c9747932a8..6919395b06 100644 --- a/src/StepFEA/StepFEA_ArbitraryVolume3dElementCoordinateSystem.cxx +++ b/src/StepFEA/StepFEA_ArbitraryVolume3dElementCoordinateSystem.cxx @@ -15,7 +15,6 @@ // Generator: ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V1.2 -#include #include #include #include diff --git a/src/StepFEA/StepFEA_ConstantSurface3dElementCoordinateSystem.cxx b/src/StepFEA/StepFEA_ConstantSurface3dElementCoordinateSystem.cxx index c987462e7a..1a1b713353 100644 --- a/src/StepFEA/StepFEA_ConstantSurface3dElementCoordinateSystem.cxx +++ b/src/StepFEA/StepFEA_ConstantSurface3dElementCoordinateSystem.cxx @@ -15,7 +15,6 @@ // Generator: ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V1.2 -#include #include #include diff --git a/src/StepFEA/StepFEA_Curve3dElementProperty.cxx b/src/StepFEA/StepFEA_Curve3dElementProperty.cxx index a4fc993899..5e80026663 100644 --- a/src/StepFEA/StepFEA_Curve3dElementProperty.cxx +++ b/src/StepFEA/StepFEA_Curve3dElementProperty.cxx @@ -15,7 +15,6 @@ // Generator: ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V1.2 -#include #include #include diff --git a/src/StepFEA/StepFEA_Curve3dElementProperty.hxx b/src/StepFEA/StepFEA_Curve3dElementProperty.hxx index dcfa5d90b0..2b0ca820a7 100644 --- a/src/StepFEA/StepFEA_Curve3dElementProperty.hxx +++ b/src/StepFEA/StepFEA_Curve3dElementProperty.hxx @@ -17,7 +17,6 @@ #define _StepFEA_Curve3dElementProperty_HeaderFile #include -#include #include #include diff --git a/src/StepFEA/StepFEA_Curve3dElementRepresentation.cxx b/src/StepFEA/StepFEA_Curve3dElementRepresentation.cxx index bf7fd092c7..d7015cd27a 100644 --- a/src/StepFEA/StepFEA_Curve3dElementRepresentation.cxx +++ b/src/StepFEA/StepFEA_Curve3dElementRepresentation.cxx @@ -15,7 +15,6 @@ // Generator: ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V1.2 -#include #include #include #include diff --git a/src/StepFEA/StepFEA_CurveElementEndOffset.cxx b/src/StepFEA/StepFEA_CurveElementEndOffset.cxx index a6c9e65bbe..8e7f15073d 100644 --- a/src/StepFEA/StepFEA_CurveElementEndOffset.cxx +++ b/src/StepFEA/StepFEA_CurveElementEndOffset.cxx @@ -15,8 +15,6 @@ // Generator: ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V1.2 -#include -#include #include IMPLEMENT_STANDARD_RTTIEXT(StepFEA_CurveElementEndOffset,Standard_Transient) diff --git a/src/StepFEA/StepFEA_CurveElementEndOffset.hxx b/src/StepFEA/StepFEA_CurveElementEndOffset.hxx index 4f3fcf77be..3b51d0f5d1 100644 --- a/src/StepFEA/StepFEA_CurveElementEndOffset.hxx +++ b/src/StepFEA/StepFEA_CurveElementEndOffset.hxx @@ -17,7 +17,6 @@ #define _StepFEA_CurveElementEndOffset_HeaderFile #include -#include #include #include diff --git a/src/StepFEA/StepFEA_CurveElementEndRelease.cxx b/src/StepFEA/StepFEA_CurveElementEndRelease.cxx index 71c13f0de1..25ef6e368f 100644 --- a/src/StepFEA/StepFEA_CurveElementEndRelease.cxx +++ b/src/StepFEA/StepFEA_CurveElementEndRelease.cxx @@ -15,8 +15,6 @@ // Generator: ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V1.2 -#include -#include #include IMPLEMENT_STANDARD_RTTIEXT(StepFEA_CurveElementEndRelease,Standard_Transient) diff --git a/src/StepFEA/StepFEA_CurveElementEndRelease.hxx b/src/StepFEA/StepFEA_CurveElementEndRelease.hxx index 3b55dd7634..17b72d0f67 100644 --- a/src/StepFEA/StepFEA_CurveElementEndRelease.hxx +++ b/src/StepFEA/StepFEA_CurveElementEndRelease.hxx @@ -17,7 +17,6 @@ #define _StepFEA_CurveElementEndRelease_HeaderFile #include -#include #include #include diff --git a/src/StepFEA/StepFEA_DegreeOfFreedomMember.cxx b/src/StepFEA/StepFEA_DegreeOfFreedomMember.cxx index 8c5e4bb1dd..aabd72c752 100644 --- a/src/StepFEA/StepFEA_DegreeOfFreedomMember.cxx +++ b/src/StepFEA/StepFEA_DegreeOfFreedomMember.cxx @@ -15,7 +15,6 @@ // Generator: ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V2.0 -#include #include #include diff --git a/src/StepFEA/StepFEA_DegreeOfFreedomMember.hxx b/src/StepFEA/StepFEA_DegreeOfFreedomMember.hxx index f31d90cde7..ad6ecde93b 100644 --- a/src/StepFEA/StepFEA_DegreeOfFreedomMember.hxx +++ b/src/StepFEA/StepFEA_DegreeOfFreedomMember.hxx @@ -17,11 +17,9 @@ #define _StepFEA_DegreeOfFreedomMember_HeaderFile #include -#include #include #include -#include #include diff --git a/src/StepFEA/StepFEA_ElementGeometricRelationship.cxx b/src/StepFEA/StepFEA_ElementGeometricRelationship.cxx index b937954b59..92fd723793 100644 --- a/src/StepFEA/StepFEA_ElementGeometricRelationship.cxx +++ b/src/StepFEA/StepFEA_ElementGeometricRelationship.cxx @@ -15,9 +15,7 @@ // Generator: ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V1.2 -#include #include -#include #include #include diff --git a/src/StepFEA/StepFEA_ElementGroup.cxx b/src/StepFEA/StepFEA_ElementGroup.cxx index 4210367619..a897031fbd 100644 --- a/src/StepFEA/StepFEA_ElementGroup.cxx +++ b/src/StepFEA/StepFEA_ElementGroup.cxx @@ -15,7 +15,6 @@ // Generator: ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V1.2 -#include #include #include #include diff --git a/src/StepFEA/StepFEA_ElementRepresentation.cxx b/src/StepFEA/StepFEA_ElementRepresentation.cxx index b58276bfc0..bab86a92ff 100644 --- a/src/StepFEA/StepFEA_ElementRepresentation.cxx +++ b/src/StepFEA/StepFEA_ElementRepresentation.cxx @@ -15,7 +15,6 @@ // Generator: ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V1.2 -#include #include #include #include diff --git a/src/StepFEA/StepFEA_FeaAreaDensity.cxx b/src/StepFEA/StepFEA_FeaAreaDensity.cxx index 878c4c054d..6c87e8abdd 100644 --- a/src/StepFEA/StepFEA_FeaAreaDensity.cxx +++ b/src/StepFEA/StepFEA_FeaAreaDensity.cxx @@ -15,7 +15,6 @@ // Generator: ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V1.2 -#include #include #include diff --git a/src/StepFEA/StepFEA_FeaAxis2Placement3d.cxx b/src/StepFEA/StepFEA_FeaAxis2Placement3d.cxx index 1727aa72c3..a57c9db141 100644 --- a/src/StepFEA/StepFEA_FeaAxis2Placement3d.cxx +++ b/src/StepFEA/StepFEA_FeaAxis2Placement3d.cxx @@ -15,7 +15,6 @@ // Generator: ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V1.2 -#include #include #include #include diff --git a/src/StepFEA/StepFEA_FeaGroup.cxx b/src/StepFEA/StepFEA_FeaGroup.cxx index 9aa28e2cac..9f4a35775c 100644 --- a/src/StepFEA/StepFEA_FeaGroup.cxx +++ b/src/StepFEA/StepFEA_FeaGroup.cxx @@ -15,7 +15,6 @@ // Generator: ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V1.2 -#include #include #include #include diff --git a/src/StepFEA/StepFEA_FeaLinearElasticity.cxx b/src/StepFEA/StepFEA_FeaLinearElasticity.cxx index b301d93bab..b939984d9f 100644 --- a/src/StepFEA/StepFEA_FeaLinearElasticity.cxx +++ b/src/StepFEA/StepFEA_FeaLinearElasticity.cxx @@ -15,7 +15,6 @@ // Generator: ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V1.2 -#include #include #include #include diff --git a/src/StepFEA/StepFEA_FeaLinearElasticity.hxx b/src/StepFEA/StepFEA_FeaLinearElasticity.hxx index 98f749b802..cc2cccad90 100644 --- a/src/StepFEA/StepFEA_FeaLinearElasticity.hxx +++ b/src/StepFEA/StepFEA_FeaLinearElasticity.hxx @@ -17,7 +17,6 @@ #define _StepFEA_FeaLinearElasticity_HeaderFile #include -#include #include #include diff --git a/src/StepFEA/StepFEA_FeaMassDensity.cxx b/src/StepFEA/StepFEA_FeaMassDensity.cxx index b76ee9d3bd..e9ab1bfeec 100644 --- a/src/StepFEA/StepFEA_FeaMassDensity.cxx +++ b/src/StepFEA/StepFEA_FeaMassDensity.cxx @@ -15,7 +15,6 @@ // Generator: ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V1.2 -#include #include #include diff --git a/src/StepFEA/StepFEA_FeaMaterialPropertyRepresentation.cxx b/src/StepFEA/StepFEA_FeaMaterialPropertyRepresentation.cxx index dff4a25b25..5c9a85f2f7 100644 --- a/src/StepFEA/StepFEA_FeaMaterialPropertyRepresentation.cxx +++ b/src/StepFEA/StepFEA_FeaMaterialPropertyRepresentation.cxx @@ -15,7 +15,6 @@ // Generator: ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V1.2 -#include #include IMPLEMENT_STANDARD_RTTIEXT(StepFEA_FeaMaterialPropertyRepresentation,StepRepr_MaterialPropertyRepresentation) diff --git a/src/StepFEA/StepFEA_FeaMaterialPropertyRepresentation.hxx b/src/StepFEA/StepFEA_FeaMaterialPropertyRepresentation.hxx index d73ca3c14c..b5cc467d01 100644 --- a/src/StepFEA/StepFEA_FeaMaterialPropertyRepresentation.hxx +++ b/src/StepFEA/StepFEA_FeaMaterialPropertyRepresentation.hxx @@ -17,7 +17,6 @@ #define _StepFEA_FeaMaterialPropertyRepresentation_HeaderFile #include -#include #include diff --git a/src/StepFEA/StepFEA_FeaModel.cxx b/src/StepFEA/StepFEA_FeaModel.cxx index 8bfad2ea5a..aa26b0d118 100644 --- a/src/StepFEA/StepFEA_FeaModel.cxx +++ b/src/StepFEA/StepFEA_FeaModel.cxx @@ -15,7 +15,6 @@ // Generator: ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V1.2 -#include #include #include #include diff --git a/src/StepFEA/StepFEA_FeaModel.hxx b/src/StepFEA/StepFEA_FeaModel.hxx index 66b0efcad1..f2988cc778 100644 --- a/src/StepFEA/StepFEA_FeaModel.hxx +++ b/src/StepFEA/StepFEA_FeaModel.hxx @@ -17,7 +17,6 @@ #define _StepFEA_FeaModel_HeaderFile #include -#include #include #include diff --git a/src/StepFEA/StepFEA_FeaModel3d.cxx b/src/StepFEA/StepFEA_FeaModel3d.cxx index 10851fb24d..a493c29581 100644 --- a/src/StepFEA/StepFEA_FeaModel3d.cxx +++ b/src/StepFEA/StepFEA_FeaModel3d.cxx @@ -15,7 +15,6 @@ // Generator: ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V1.2 -#include #include IMPLEMENT_STANDARD_RTTIEXT(StepFEA_FeaModel3d,StepFEA_FeaModel) diff --git a/src/StepFEA/StepFEA_FeaModel3d.hxx b/src/StepFEA/StepFEA_FeaModel3d.hxx index 66916c8185..3798ae9796 100644 --- a/src/StepFEA/StepFEA_FeaModel3d.hxx +++ b/src/StepFEA/StepFEA_FeaModel3d.hxx @@ -17,7 +17,6 @@ #define _StepFEA_FeaModel3d_HeaderFile #include -#include #include diff --git a/src/StepFEA/StepFEA_FeaMoistureAbsorption.cxx b/src/StepFEA/StepFEA_FeaMoistureAbsorption.cxx index c92a21d043..4a3888a88a 100644 --- a/src/StepFEA/StepFEA_FeaMoistureAbsorption.cxx +++ b/src/StepFEA/StepFEA_FeaMoistureAbsorption.cxx @@ -15,7 +15,6 @@ // Generator: ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V1.2 -#include #include #include #include diff --git a/src/StepFEA/StepFEA_FeaMoistureAbsorption.hxx b/src/StepFEA/StepFEA_FeaMoistureAbsorption.hxx index 97f312a765..298601fbc7 100644 --- a/src/StepFEA/StepFEA_FeaMoistureAbsorption.hxx +++ b/src/StepFEA/StepFEA_FeaMoistureAbsorption.hxx @@ -17,7 +17,6 @@ #define _StepFEA_FeaMoistureAbsorption_HeaderFile #include -#include #include #include diff --git a/src/StepFEA/StepFEA_FeaParametricPoint.cxx b/src/StepFEA/StepFEA_FeaParametricPoint.cxx index f9d7925298..0440837494 100644 --- a/src/StepFEA/StepFEA_FeaParametricPoint.cxx +++ b/src/StepFEA/StepFEA_FeaParametricPoint.cxx @@ -15,7 +15,6 @@ // Generator: ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V1.2 -#include #include #include diff --git a/src/StepFEA/StepFEA_FeaSecantCoefficientOfLinearThermalExpansion.cxx b/src/StepFEA/StepFEA_FeaSecantCoefficientOfLinearThermalExpansion.cxx index ff5e857619..9ecd8eeec9 100644 --- a/src/StepFEA/StepFEA_FeaSecantCoefficientOfLinearThermalExpansion.cxx +++ b/src/StepFEA/StepFEA_FeaSecantCoefficientOfLinearThermalExpansion.cxx @@ -15,7 +15,6 @@ // Generator: ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V1.2 -#include #include #include #include diff --git a/src/StepFEA/StepFEA_FeaSecantCoefficientOfLinearThermalExpansion.hxx b/src/StepFEA/StepFEA_FeaSecantCoefficientOfLinearThermalExpansion.hxx index 8640cbe5c5..0c13239ef2 100644 --- a/src/StepFEA/StepFEA_FeaSecantCoefficientOfLinearThermalExpansion.hxx +++ b/src/StepFEA/StepFEA_FeaSecantCoefficientOfLinearThermalExpansion.hxx @@ -17,7 +17,6 @@ #define _StepFEA_FeaSecantCoefficientOfLinearThermalExpansion_HeaderFile #include -#include #include #include diff --git a/src/StepFEA/StepFEA_FeaShellBendingStiffness.cxx b/src/StepFEA/StepFEA_FeaShellBendingStiffness.cxx index 38d34eef98..17eccdbe78 100644 --- a/src/StepFEA/StepFEA_FeaShellBendingStiffness.cxx +++ b/src/StepFEA/StepFEA_FeaShellBendingStiffness.cxx @@ -15,7 +15,6 @@ // Generator: ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V1.2 -#include #include #include #include diff --git a/src/StepFEA/StepFEA_FeaShellBendingStiffness.hxx b/src/StepFEA/StepFEA_FeaShellBendingStiffness.hxx index 85efc64568..24e44e3f76 100644 --- a/src/StepFEA/StepFEA_FeaShellBendingStiffness.hxx +++ b/src/StepFEA/StepFEA_FeaShellBendingStiffness.hxx @@ -17,7 +17,6 @@ #define _StepFEA_FeaShellBendingStiffness_HeaderFile #include -#include #include #include diff --git a/src/StepFEA/StepFEA_FeaShellMembraneBendingCouplingStiffness.cxx b/src/StepFEA/StepFEA_FeaShellMembraneBendingCouplingStiffness.cxx index 0e32b65bc2..745fcb6011 100644 --- a/src/StepFEA/StepFEA_FeaShellMembraneBendingCouplingStiffness.cxx +++ b/src/StepFEA/StepFEA_FeaShellMembraneBendingCouplingStiffness.cxx @@ -15,7 +15,6 @@ // Generator: ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V1.2 -#include #include #include #include diff --git a/src/StepFEA/StepFEA_FeaShellMembraneBendingCouplingStiffness.hxx b/src/StepFEA/StepFEA_FeaShellMembraneBendingCouplingStiffness.hxx index 56372e12a5..09634fb637 100644 --- a/src/StepFEA/StepFEA_FeaShellMembraneBendingCouplingStiffness.hxx +++ b/src/StepFEA/StepFEA_FeaShellMembraneBendingCouplingStiffness.hxx @@ -17,7 +17,6 @@ #define _StepFEA_FeaShellMembraneBendingCouplingStiffness_HeaderFile #include -#include #include #include diff --git a/src/StepFEA/StepFEA_FeaShellMembraneStiffness.cxx b/src/StepFEA/StepFEA_FeaShellMembraneStiffness.cxx index 5827f59bd5..48b5719647 100644 --- a/src/StepFEA/StepFEA_FeaShellMembraneStiffness.cxx +++ b/src/StepFEA/StepFEA_FeaShellMembraneStiffness.cxx @@ -15,7 +15,6 @@ // Generator: ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V1.2 -#include #include #include #include diff --git a/src/StepFEA/StepFEA_FeaShellMembraneStiffness.hxx b/src/StepFEA/StepFEA_FeaShellMembraneStiffness.hxx index 77a67a25f6..78342438d3 100644 --- a/src/StepFEA/StepFEA_FeaShellMembraneStiffness.hxx +++ b/src/StepFEA/StepFEA_FeaShellMembraneStiffness.hxx @@ -17,7 +17,6 @@ #define _StepFEA_FeaShellMembraneStiffness_HeaderFile #include -#include #include #include diff --git a/src/StepFEA/StepFEA_FeaShellShearStiffness.cxx b/src/StepFEA/StepFEA_FeaShellShearStiffness.cxx index 39449923d9..7dda8abc0a 100644 --- a/src/StepFEA/StepFEA_FeaShellShearStiffness.cxx +++ b/src/StepFEA/StepFEA_FeaShellShearStiffness.cxx @@ -15,7 +15,6 @@ // Generator: ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V1.2 -#include #include #include #include diff --git a/src/StepFEA/StepFEA_FeaShellShearStiffness.hxx b/src/StepFEA/StepFEA_FeaShellShearStiffness.hxx index ecd0d7e05c..55ee16891a 100644 --- a/src/StepFEA/StepFEA_FeaShellShearStiffness.hxx +++ b/src/StepFEA/StepFEA_FeaShellShearStiffness.hxx @@ -17,7 +17,6 @@ #define _StepFEA_FeaShellShearStiffness_HeaderFile #include -#include #include #include diff --git a/src/StepFEA/StepFEA_FeaSurfaceSectionGeometricRelationship.cxx b/src/StepFEA/StepFEA_FeaSurfaceSectionGeometricRelationship.cxx index cb266d7513..0e1f4047a3 100644 --- a/src/StepFEA/StepFEA_FeaSurfaceSectionGeometricRelationship.cxx +++ b/src/StepFEA/StepFEA_FeaSurfaceSectionGeometricRelationship.cxx @@ -15,7 +15,6 @@ // Generator: ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V1.2 -#include #include #include #include diff --git a/src/StepFEA/StepFEA_FeaTangentialCoefficientOfLinearThermalExpansion.cxx b/src/StepFEA/StepFEA_FeaTangentialCoefficientOfLinearThermalExpansion.cxx index 64140ac5d1..f3d96291ab 100644 --- a/src/StepFEA/StepFEA_FeaTangentialCoefficientOfLinearThermalExpansion.cxx +++ b/src/StepFEA/StepFEA_FeaTangentialCoefficientOfLinearThermalExpansion.cxx @@ -15,7 +15,6 @@ // Generator: ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V1.2 -#include #include #include #include diff --git a/src/StepFEA/StepFEA_FeaTangentialCoefficientOfLinearThermalExpansion.hxx b/src/StepFEA/StepFEA_FeaTangentialCoefficientOfLinearThermalExpansion.hxx index c71d6c278d..9f84b32c3e 100644 --- a/src/StepFEA/StepFEA_FeaTangentialCoefficientOfLinearThermalExpansion.hxx +++ b/src/StepFEA/StepFEA_FeaTangentialCoefficientOfLinearThermalExpansion.hxx @@ -17,7 +17,6 @@ #define _StepFEA_FeaTangentialCoefficientOfLinearThermalExpansion_HeaderFile #include -#include #include #include diff --git a/src/StepFEA/StepFEA_FreedomAndCoefficient.cxx b/src/StepFEA/StepFEA_FreedomAndCoefficient.cxx index fc10d83e30..270e87cdab 100644 --- a/src/StepFEA/StepFEA_FreedomAndCoefficient.cxx +++ b/src/StepFEA/StepFEA_FreedomAndCoefficient.cxx @@ -15,9 +15,6 @@ // Generator: ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V1.2 -#include -#include -#include #include IMPLEMENT_STANDARD_RTTIEXT(StepFEA_FreedomAndCoefficient,Standard_Transient) diff --git a/src/StepFEA/StepFEA_FreedomAndCoefficient.hxx b/src/StepFEA/StepFEA_FreedomAndCoefficient.hxx index ab90ddb78e..07e3fcdd8b 100644 --- a/src/StepFEA/StepFEA_FreedomAndCoefficient.hxx +++ b/src/StepFEA/StepFEA_FreedomAndCoefficient.hxx @@ -17,7 +17,6 @@ #define _StepFEA_FreedomAndCoefficient_HeaderFile #include -#include #include #include diff --git a/src/StepFEA/StepFEA_FreedomsList.cxx b/src/StepFEA/StepFEA_FreedomsList.cxx index c1b1a8d8d6..5d79653b06 100644 --- a/src/StepFEA/StepFEA_FreedomsList.cxx +++ b/src/StepFEA/StepFEA_FreedomsList.cxx @@ -15,7 +15,6 @@ // Generator: ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V1.2 -#include #include IMPLEMENT_STANDARD_RTTIEXT(StepFEA_FreedomsList,Standard_Transient) diff --git a/src/StepFEA/StepFEA_FreedomsList.hxx b/src/StepFEA/StepFEA_FreedomsList.hxx index fd366ad5f3..23c350be2a 100644 --- a/src/StepFEA/StepFEA_FreedomsList.hxx +++ b/src/StepFEA/StepFEA_FreedomsList.hxx @@ -17,7 +17,6 @@ #define _StepFEA_FreedomsList_HeaderFile #include -#include #include #include diff --git a/src/StepFEA/StepFEA_HArray1OfCurveElementEndOffset.hxx b/src/StepFEA/StepFEA_HArray1OfCurveElementEndOffset.hxx index 136c307a7d..d6b02696e7 100644 --- a/src/StepFEA/StepFEA_HArray1OfCurveElementEndOffset.hxx +++ b/src/StepFEA/StepFEA_HArray1OfCurveElementEndOffset.hxx @@ -14,7 +14,6 @@ #ifndef StepFEA_HArray1OfCurveElementEndOffset_HeaderFile #define StepFEA_HArray1OfCurveElementEndOffset_HeaderFile -#include #include #include diff --git a/src/StepFEA/StepFEA_HArray1OfCurveElementEndRelease.hxx b/src/StepFEA/StepFEA_HArray1OfCurveElementEndRelease.hxx index b289e69d9c..d9e092ecb9 100644 --- a/src/StepFEA/StepFEA_HArray1OfCurveElementEndRelease.hxx +++ b/src/StepFEA/StepFEA_HArray1OfCurveElementEndRelease.hxx @@ -14,7 +14,6 @@ #ifndef StepFEA_HArray1OfCurveElementEndRelease_HeaderFile #define StepFEA_HArray1OfCurveElementEndRelease_HeaderFile -#include #include #include diff --git a/src/StepFEA/StepFEA_HArray1OfDegreeOfFreedom.hxx b/src/StepFEA/StepFEA_HArray1OfDegreeOfFreedom.hxx index f4aa94684d..5b2dd2d04a 100644 --- a/src/StepFEA/StepFEA_HArray1OfDegreeOfFreedom.hxx +++ b/src/StepFEA/StepFEA_HArray1OfDegreeOfFreedom.hxx @@ -14,7 +14,6 @@ #ifndef StepFEA_HArray1OfDegreeOfFreedom_HeaderFile #define StepFEA_HArray1OfDegreeOfFreedom_HeaderFile -#include #include #include diff --git a/src/StepFEA/StepFEA_HArray1OfNodeRepresentation.hxx b/src/StepFEA/StepFEA_HArray1OfNodeRepresentation.hxx index 8af93c780a..13161712bb 100644 --- a/src/StepFEA/StepFEA_HArray1OfNodeRepresentation.hxx +++ b/src/StepFEA/StepFEA_HArray1OfNodeRepresentation.hxx @@ -14,7 +14,6 @@ #ifndef StepFEA_HArray1OfNodeRepresentation_HeaderFile #define StepFEA_HArray1OfNodeRepresentation_HeaderFile -#include #include #include diff --git a/src/StepFEA/StepFEA_HSequenceOfElementGeometricRelationship.hxx b/src/StepFEA/StepFEA_HSequenceOfElementGeometricRelationship.hxx index 649813067e..171db8c97a 100644 --- a/src/StepFEA/StepFEA_HSequenceOfElementGeometricRelationship.hxx +++ b/src/StepFEA/StepFEA_HSequenceOfElementGeometricRelationship.hxx @@ -14,7 +14,6 @@ #ifndef StepFEA_HSequenceOfElementGeometricRelationship_HeaderFile #define StepFEA_HSequenceOfElementGeometricRelationship_HeaderFile -#include #include #include diff --git a/src/StepFEA/StepFEA_HSequenceOfElementRepresentation.hxx b/src/StepFEA/StepFEA_HSequenceOfElementRepresentation.hxx index 1499b33401..5dd38de25c 100644 --- a/src/StepFEA/StepFEA_HSequenceOfElementRepresentation.hxx +++ b/src/StepFEA/StepFEA_HSequenceOfElementRepresentation.hxx @@ -14,7 +14,6 @@ #ifndef StepFEA_HSequenceOfElementRepresentation_HeaderFile #define StepFEA_HSequenceOfElementRepresentation_HeaderFile -#include #include #include diff --git a/src/StepFEA/StepFEA_NodeGroup.cxx b/src/StepFEA/StepFEA_NodeGroup.cxx index dabcafcf16..141a09cc5b 100644 --- a/src/StepFEA/StepFEA_NodeGroup.cxx +++ b/src/StepFEA/StepFEA_NodeGroup.cxx @@ -15,7 +15,6 @@ // Generator: ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V1.2 -#include #include #include #include diff --git a/src/StepFEA/StepFEA_NodeRepresentation.cxx b/src/StepFEA/StepFEA_NodeRepresentation.cxx index b8062fa8b3..3702bc09d9 100644 --- a/src/StepFEA/StepFEA_NodeRepresentation.cxx +++ b/src/StepFEA/StepFEA_NodeRepresentation.cxx @@ -15,7 +15,6 @@ // Generator: ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V1.2 -#include #include #include #include diff --git a/src/StepFEA/StepFEA_NodeSet.cxx b/src/StepFEA/StepFEA_NodeSet.cxx index 7ebff82b8d..2e7a459232 100644 --- a/src/StepFEA/StepFEA_NodeSet.cxx +++ b/src/StepFEA/StepFEA_NodeSet.cxx @@ -15,7 +15,6 @@ // Generator: ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V1.2 -#include #include #include diff --git a/src/StepFEA/StepFEA_ParametricCurve3dElementCoordinateDirection.cxx b/src/StepFEA/StepFEA_ParametricCurve3dElementCoordinateDirection.cxx index 303b0ac10f..585aac2286 100644 --- a/src/StepFEA/StepFEA_ParametricCurve3dElementCoordinateDirection.cxx +++ b/src/StepFEA/StepFEA_ParametricCurve3dElementCoordinateDirection.cxx @@ -15,7 +15,6 @@ // Generator: ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V1.2 -#include #include #include #include diff --git a/src/StepFEA/StepFEA_ParametricCurve3dElementCoordinateSystem.cxx b/src/StepFEA/StepFEA_ParametricCurve3dElementCoordinateSystem.cxx index d164663e62..d33817bb4a 100644 --- a/src/StepFEA/StepFEA_ParametricCurve3dElementCoordinateSystem.cxx +++ b/src/StepFEA/StepFEA_ParametricCurve3dElementCoordinateSystem.cxx @@ -15,7 +15,6 @@ // Generator: ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V1.2 -#include #include #include #include diff --git a/src/StepFEA/StepFEA_ParametricSurface3dElementCoordinateSystem.cxx b/src/StepFEA/StepFEA_ParametricSurface3dElementCoordinateSystem.cxx index 863d50a02f..5dc1f2db4b 100644 --- a/src/StepFEA/StepFEA_ParametricSurface3dElementCoordinateSystem.cxx +++ b/src/StepFEA/StepFEA_ParametricSurface3dElementCoordinateSystem.cxx @@ -15,7 +15,6 @@ // Generator: ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V1.2 -#include #include #include diff --git a/src/StepFEA/StepFEA_Surface3dElementRepresentation.cxx b/src/StepFEA/StepFEA_Surface3dElementRepresentation.cxx index 7a3117b033..6522b87572 100644 --- a/src/StepFEA/StepFEA_Surface3dElementRepresentation.cxx +++ b/src/StepFEA/StepFEA_Surface3dElementRepresentation.cxx @@ -15,7 +15,6 @@ // Generator: ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V1.2 -#include #include #include #include diff --git a/src/StepFEA/StepFEA_SymmetricTensor23d.hxx b/src/StepFEA/StepFEA_SymmetricTensor23d.hxx index 0eaa8cb97d..de681f56a3 100644 --- a/src/StepFEA/StepFEA_SymmetricTensor23d.hxx +++ b/src/StepFEA/StepFEA_SymmetricTensor23d.hxx @@ -22,7 +22,6 @@ #include #include -#include #include class Standard_Transient; class StepData_SelectMember; diff --git a/src/StepFEA/StepFEA_SymmetricTensor23dMember.cxx b/src/StepFEA/StepFEA_SymmetricTensor23dMember.cxx index 897f092be3..f62ccf31d2 100644 --- a/src/StepFEA/StepFEA_SymmetricTensor23dMember.cxx +++ b/src/StepFEA/StepFEA_SymmetricTensor23dMember.cxx @@ -15,7 +15,6 @@ // Generator: ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V2.0 -#include #include #include diff --git a/src/StepFEA/StepFEA_SymmetricTensor23dMember.hxx b/src/StepFEA/StepFEA_SymmetricTensor23dMember.hxx index 9f55b8ab14..015af4ccda 100644 --- a/src/StepFEA/StepFEA_SymmetricTensor23dMember.hxx +++ b/src/StepFEA/StepFEA_SymmetricTensor23dMember.hxx @@ -17,7 +17,6 @@ #define _StepFEA_SymmetricTensor23dMember_HeaderFile #include -#include #include #include diff --git a/src/StepFEA/StepFEA_SymmetricTensor43dMember.cxx b/src/StepFEA/StepFEA_SymmetricTensor43dMember.cxx index cbfa9ed78c..25b97a718a 100644 --- a/src/StepFEA/StepFEA_SymmetricTensor43dMember.cxx +++ b/src/StepFEA/StepFEA_SymmetricTensor43dMember.cxx @@ -12,7 +12,6 @@ // commercial license or contractual agreement. -#include #include #include diff --git a/src/StepFEA/StepFEA_SymmetricTensor43dMember.hxx b/src/StepFEA/StepFEA_SymmetricTensor43dMember.hxx index 69c4a4a13d..b7f858eec5 100644 --- a/src/StepFEA/StepFEA_SymmetricTensor43dMember.hxx +++ b/src/StepFEA/StepFEA_SymmetricTensor43dMember.hxx @@ -17,7 +17,6 @@ #define _StepFEA_SymmetricTensor43dMember_HeaderFile #include -#include #include #include diff --git a/src/StepFEA/StepFEA_Volume3dElementRepresentation.cxx b/src/StepFEA/StepFEA_Volume3dElementRepresentation.cxx index 05c2cd00b4..2aa255f126 100644 --- a/src/StepFEA/StepFEA_Volume3dElementRepresentation.cxx +++ b/src/StepFEA/StepFEA_Volume3dElementRepresentation.cxx @@ -15,7 +15,6 @@ // Generator: ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V1.2 -#include #include #include #include diff --git a/src/StepGeom/StepGeom_Axis1Placement.cxx b/src/StepGeom/StepGeom_Axis1Placement.cxx index a4a8fc299e..e809bc34af 100644 --- a/src/StepGeom/StepGeom_Axis1Placement.cxx +++ b/src/StepGeom/StepGeom_Axis1Placement.cxx @@ -12,7 +12,6 @@ // commercial license or contractual agreement. -#include #include #include #include diff --git a/src/StepGeom/StepGeom_Axis2Placement2d.cxx b/src/StepGeom/StepGeom_Axis2Placement2d.cxx index ec5bf504a7..71e7a39280 100644 --- a/src/StepGeom/StepGeom_Axis2Placement2d.cxx +++ b/src/StepGeom/StepGeom_Axis2Placement2d.cxx @@ -12,7 +12,6 @@ // commercial license or contractual agreement. -#include #include #include #include diff --git a/src/StepGeom/StepGeom_Axis2Placement3d.cxx b/src/StepGeom/StepGeom_Axis2Placement3d.cxx index efebd88a14..4ba61524f3 100644 --- a/src/StepGeom/StepGeom_Axis2Placement3d.cxx +++ b/src/StepGeom/StepGeom_Axis2Placement3d.cxx @@ -12,7 +12,6 @@ // commercial license or contractual agreement. -#include #include #include #include diff --git a/src/StepGeom/StepGeom_BSplineCurve.cxx b/src/StepGeom/StepGeom_BSplineCurve.cxx index 413445cf55..68b96d8ee9 100644 --- a/src/StepGeom/StepGeom_BSplineCurve.cxx +++ b/src/StepGeom/StepGeom_BSplineCurve.cxx @@ -12,7 +12,6 @@ // commercial license or contractual agreement. -#include #include #include #include diff --git a/src/StepGeom/StepGeom_BSplineCurveWithKnots.cxx b/src/StepGeom/StepGeom_BSplineCurveWithKnots.cxx index 3f5cf388f6..53701726a0 100644 --- a/src/StepGeom/StepGeom_BSplineCurveWithKnots.cxx +++ b/src/StepGeom/StepGeom_BSplineCurveWithKnots.cxx @@ -12,7 +12,6 @@ // commercial license or contractual agreement. -#include #include #include diff --git a/src/StepGeom/StepGeom_BSplineCurveWithKnots.hxx b/src/StepGeom/StepGeom_BSplineCurveWithKnots.hxx index c1e63a64c4..db1ee26057 100644 --- a/src/StepGeom/StepGeom_BSplineCurveWithKnots.hxx +++ b/src/StepGeom/StepGeom_BSplineCurveWithKnots.hxx @@ -21,7 +21,6 @@ #include #include -#include #include #include #include diff --git a/src/StepGeom/StepGeom_BSplineCurveWithKnotsAndRationalBSplineCurve.hxx b/src/StepGeom/StepGeom_BSplineCurveWithKnotsAndRationalBSplineCurve.hxx index 712b1182c8..8d167c0d37 100644 --- a/src/StepGeom/StepGeom_BSplineCurveWithKnotsAndRationalBSplineCurve.hxx +++ b/src/StepGeom/StepGeom_BSplineCurveWithKnotsAndRationalBSplineCurve.hxx @@ -28,7 +28,6 @@ #include #include #include -#include class StepGeom_BSplineCurveWithKnots; class StepGeom_RationalBSplineCurve; class TCollection_HAsciiString; diff --git a/src/StepGeom/StepGeom_BSplineSurface.cxx b/src/StepGeom/StepGeom_BSplineSurface.cxx index 6f08e27e3d..0562219932 100644 --- a/src/StepGeom/StepGeom_BSplineSurface.cxx +++ b/src/StepGeom/StepGeom_BSplineSurface.cxx @@ -12,7 +12,6 @@ // commercial license or contractual agreement. -#include #include #include #include diff --git a/src/StepGeom/StepGeom_BSplineSurfaceWithKnots.cxx b/src/StepGeom/StepGeom_BSplineSurfaceWithKnots.cxx index a27c5ab54d..33c8c28155 100644 --- a/src/StepGeom/StepGeom_BSplineSurfaceWithKnots.cxx +++ b/src/StepGeom/StepGeom_BSplineSurfaceWithKnots.cxx @@ -12,7 +12,6 @@ // commercial license or contractual agreement. -#include #include #include diff --git a/src/StepGeom/StepGeom_BSplineSurfaceWithKnots.hxx b/src/StepGeom/StepGeom_BSplineSurfaceWithKnots.hxx index 268339af81..0d923d2149 100644 --- a/src/StepGeom/StepGeom_BSplineSurfaceWithKnots.hxx +++ b/src/StepGeom/StepGeom_BSplineSurfaceWithKnots.hxx @@ -21,7 +21,6 @@ #include #include -#include #include #include #include diff --git a/src/StepGeom/StepGeom_BSplineSurfaceWithKnotsAndRationalBSplineSurface.hxx b/src/StepGeom/StepGeom_BSplineSurfaceWithKnotsAndRationalBSplineSurface.hxx index fa7ba587f7..5dbe612612 100644 --- a/src/StepGeom/StepGeom_BSplineSurfaceWithKnotsAndRationalBSplineSurface.hxx +++ b/src/StepGeom/StepGeom_BSplineSurfaceWithKnotsAndRationalBSplineSurface.hxx @@ -29,7 +29,6 @@ #include #include #include -#include class StepGeom_BSplineSurfaceWithKnots; class StepGeom_RationalBSplineSurface; class TCollection_HAsciiString; diff --git a/src/StepGeom/StepGeom_BezierCurveAndRationalBSplineCurve.hxx b/src/StepGeom/StepGeom_BezierCurveAndRationalBSplineCurve.hxx index a654d9c1a7..db081ee994 100644 --- a/src/StepGeom/StepGeom_BezierCurveAndRationalBSplineCurve.hxx +++ b/src/StepGeom/StepGeom_BezierCurveAndRationalBSplineCurve.hxx @@ -26,7 +26,6 @@ #include #include #include -#include class StepGeom_BezierCurve; class StepGeom_RationalBSplineCurve; class TCollection_HAsciiString; diff --git a/src/StepGeom/StepGeom_BezierSurfaceAndRationalBSplineSurface.hxx b/src/StepGeom/StepGeom_BezierSurfaceAndRationalBSplineSurface.hxx index 2cf727c625..abd61d91eb 100644 --- a/src/StepGeom/StepGeom_BezierSurfaceAndRationalBSplineSurface.hxx +++ b/src/StepGeom/StepGeom_BezierSurfaceAndRationalBSplineSurface.hxx @@ -26,7 +26,6 @@ #include #include #include -#include class StepGeom_BezierSurface; class StepGeom_RationalBSplineSurface; class TCollection_HAsciiString; diff --git a/src/StepGeom/StepGeom_CartesianPoint.hxx b/src/StepGeom/StepGeom_CartesianPoint.hxx index b9e7fd727c..daab1642d6 100644 --- a/src/StepGeom/StepGeom_CartesianPoint.hxx +++ b/src/StepGeom/StepGeom_CartesianPoint.hxx @@ -21,7 +21,6 @@ #include #include -#include #include #include class TCollection_HAsciiString; diff --git a/src/StepGeom/StepGeom_CartesianTransformationOperator.cxx b/src/StepGeom/StepGeom_CartesianTransformationOperator.cxx index 1215e6dc02..056b29caa6 100644 --- a/src/StepGeom/StepGeom_CartesianTransformationOperator.cxx +++ b/src/StepGeom/StepGeom_CartesianTransformationOperator.cxx @@ -12,7 +12,6 @@ // commercial license or contractual agreement. -#include #include #include #include diff --git a/src/StepGeom/StepGeom_CartesianTransformationOperator.hxx b/src/StepGeom/StepGeom_CartesianTransformationOperator.hxx index 6795af0e31..054cc2fbd6 100644 --- a/src/StepGeom/StepGeom_CartesianTransformationOperator.hxx +++ b/src/StepGeom/StepGeom_CartesianTransformationOperator.hxx @@ -20,8 +20,6 @@ #include #include -#include -#include #include class StepGeom_Direction; class StepGeom_CartesianPoint; diff --git a/src/StepGeom/StepGeom_CartesianTransformationOperator3d.cxx b/src/StepGeom/StepGeom_CartesianTransformationOperator3d.cxx index f2d7d716e1..d902fded4f 100644 --- a/src/StepGeom/StepGeom_CartesianTransformationOperator3d.cxx +++ b/src/StepGeom/StepGeom_CartesianTransformationOperator3d.cxx @@ -12,7 +12,6 @@ // commercial license or contractual agreement. -#include #include #include #include diff --git a/src/StepGeom/StepGeom_CartesianTransformationOperator3d.hxx b/src/StepGeom/StepGeom_CartesianTransformationOperator3d.hxx index c0706f0102..576b2b1c74 100644 --- a/src/StepGeom/StepGeom_CartesianTransformationOperator3d.hxx +++ b/src/StepGeom/StepGeom_CartesianTransformationOperator3d.hxx @@ -20,9 +20,7 @@ #include #include -#include #include -#include class StepGeom_Direction; class TCollection_HAsciiString; class StepGeom_CartesianPoint; diff --git a/src/StepGeom/StepGeom_Circle.cxx b/src/StepGeom/StepGeom_Circle.cxx index ee2070807a..302f314293 100644 --- a/src/StepGeom/StepGeom_Circle.cxx +++ b/src/StepGeom/StepGeom_Circle.cxx @@ -12,8 +12,6 @@ // commercial license or contractual agreement. -#include -#include #include #include diff --git a/src/StepGeom/StepGeom_Circle.hxx b/src/StepGeom/StepGeom_Circle.hxx index b89c745caf..e3dfc58286 100644 --- a/src/StepGeom/StepGeom_Circle.hxx +++ b/src/StepGeom/StepGeom_Circle.hxx @@ -18,7 +18,6 @@ #define _StepGeom_Circle_HeaderFile #include -#include #include #include diff --git a/src/StepGeom/StepGeom_CompositeCurve.cxx b/src/StepGeom/StepGeom_CompositeCurve.cxx index a4fbced5c6..6949ebadd9 100644 --- a/src/StepGeom/StepGeom_CompositeCurve.cxx +++ b/src/StepGeom/StepGeom_CompositeCurve.cxx @@ -12,7 +12,6 @@ // commercial license or contractual agreement. -#include #include #include #include diff --git a/src/StepGeom/StepGeom_CompositeCurveSegment.hxx b/src/StepGeom/StepGeom_CompositeCurveSegment.hxx index 7c52ba3377..9db52e3f1f 100644 --- a/src/StepGeom/StepGeom_CompositeCurveSegment.hxx +++ b/src/StepGeom/StepGeom_CompositeCurveSegment.hxx @@ -21,7 +21,6 @@ #include #include -#include #include class StepGeom_Curve; diff --git a/src/StepGeom/StepGeom_Conic.cxx b/src/StepGeom/StepGeom_Conic.cxx index b9ab56d6aa..33068a4e4d 100644 --- a/src/StepGeom/StepGeom_Conic.cxx +++ b/src/StepGeom/StepGeom_Conic.cxx @@ -12,8 +12,6 @@ // commercial license or contractual agreement. -#include -#include #include #include diff --git a/src/StepGeom/StepGeom_Conic.hxx b/src/StepGeom/StepGeom_Conic.hxx index 818d93f102..95dd6a8d70 100644 --- a/src/StepGeom/StepGeom_Conic.hxx +++ b/src/StepGeom/StepGeom_Conic.hxx @@ -18,7 +18,6 @@ #define _StepGeom_Conic_HeaderFile #include -#include #include #include diff --git a/src/StepGeom/StepGeom_ConicalSurface.cxx b/src/StepGeom/StepGeom_ConicalSurface.cxx index 64d7b737bf..6feac1c1af 100644 --- a/src/StepGeom/StepGeom_ConicalSurface.cxx +++ b/src/StepGeom/StepGeom_ConicalSurface.cxx @@ -12,7 +12,6 @@ // commercial license or contractual agreement. -#include #include #include #include diff --git a/src/StepGeom/StepGeom_ConicalSurface.hxx b/src/StepGeom/StepGeom_ConicalSurface.hxx index aff444bbbc..fa98f9846e 100644 --- a/src/StepGeom/StepGeom_ConicalSurface.hxx +++ b/src/StepGeom/StepGeom_ConicalSurface.hxx @@ -20,7 +20,6 @@ #include #include -#include #include class TCollection_HAsciiString; class StepGeom_Axis2Placement3d; diff --git a/src/StepGeom/StepGeom_CurveBoundedSurface.cxx b/src/StepGeom/StepGeom_CurveBoundedSurface.cxx index 2b20f09786..65924f4718 100644 --- a/src/StepGeom/StepGeom_CurveBoundedSurface.cxx +++ b/src/StepGeom/StepGeom_CurveBoundedSurface.cxx @@ -16,7 +16,6 @@ // Generator: ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V1.0 -#include #include #include #include diff --git a/src/StepGeom/StepGeom_CurveBoundedSurface.hxx b/src/StepGeom/StepGeom_CurveBoundedSurface.hxx index 5b1336c8c6..b62d74cdd6 100644 --- a/src/StepGeom/StepGeom_CurveBoundedSurface.hxx +++ b/src/StepGeom/StepGeom_CurveBoundedSurface.hxx @@ -18,7 +18,6 @@ #define _StepGeom_CurveBoundedSurface_HeaderFile #include -#include #include #include diff --git a/src/StepGeom/StepGeom_CurveReplica.cxx b/src/StepGeom/StepGeom_CurveReplica.cxx index 87d2b03b3c..69b39aacc8 100644 --- a/src/StepGeom/StepGeom_CurveReplica.cxx +++ b/src/StepGeom/StepGeom_CurveReplica.cxx @@ -12,9 +12,7 @@ // commercial license or contractual agreement. -#include #include -#include #include #include diff --git a/src/StepGeom/StepGeom_CylindricalSurface.cxx b/src/StepGeom/StepGeom_CylindricalSurface.cxx index bae66c379f..c75b72861b 100644 --- a/src/StepGeom/StepGeom_CylindricalSurface.cxx +++ b/src/StepGeom/StepGeom_CylindricalSurface.cxx @@ -12,7 +12,6 @@ // commercial license or contractual agreement. -#include #include #include #include diff --git a/src/StepGeom/StepGeom_CylindricalSurface.hxx b/src/StepGeom/StepGeom_CylindricalSurface.hxx index d90f3d1104..36158a8f99 100644 --- a/src/StepGeom/StepGeom_CylindricalSurface.hxx +++ b/src/StepGeom/StepGeom_CylindricalSurface.hxx @@ -20,7 +20,6 @@ #include #include -#include #include class TCollection_HAsciiString; class StepGeom_Axis2Placement3d; diff --git a/src/StepGeom/StepGeom_DegeneratePcurve.cxx b/src/StepGeom/StepGeom_DegeneratePcurve.cxx index aa78eb87b3..e3ac718393 100644 --- a/src/StepGeom/StepGeom_DegeneratePcurve.cxx +++ b/src/StepGeom/StepGeom_DegeneratePcurve.cxx @@ -12,7 +12,6 @@ // commercial license or contractual agreement. -#include #include #include #include diff --git a/src/StepGeom/StepGeom_DegenerateToroidalSurface.cxx b/src/StepGeom/StepGeom_DegenerateToroidalSurface.cxx index 94b8084ac6..3ef047c74d 100644 --- a/src/StepGeom/StepGeom_DegenerateToroidalSurface.cxx +++ b/src/StepGeom/StepGeom_DegenerateToroidalSurface.cxx @@ -12,7 +12,6 @@ // commercial license or contractual agreement. -#include #include #include #include diff --git a/src/StepGeom/StepGeom_DegenerateToroidalSurface.hxx b/src/StepGeom/StepGeom_DegenerateToroidalSurface.hxx index d1e1334940..2a5674ba12 100644 --- a/src/StepGeom/StepGeom_DegenerateToroidalSurface.hxx +++ b/src/StepGeom/StepGeom_DegenerateToroidalSurface.hxx @@ -20,9 +20,7 @@ #include #include -#include #include -#include class TCollection_HAsciiString; class StepGeom_Axis2Placement3d; diff --git a/src/StepGeom/StepGeom_Direction.cxx b/src/StepGeom/StepGeom_Direction.cxx index ef732a7e3c..566a9647ab 100644 --- a/src/StepGeom/StepGeom_Direction.cxx +++ b/src/StepGeom/StepGeom_Direction.cxx @@ -12,7 +12,6 @@ // commercial license or contractual agreement. -#include #include #include diff --git a/src/StepGeom/StepGeom_ElementarySurface.cxx b/src/StepGeom/StepGeom_ElementarySurface.cxx index e220a8d5e5..2a4d7f9ed0 100644 --- a/src/StepGeom/StepGeom_ElementarySurface.cxx +++ b/src/StepGeom/StepGeom_ElementarySurface.cxx @@ -12,7 +12,6 @@ // commercial license or contractual agreement. -#include #include #include #include diff --git a/src/StepGeom/StepGeom_Ellipse.cxx b/src/StepGeom/StepGeom_Ellipse.cxx index 72f0ca4de9..360df44b74 100644 --- a/src/StepGeom/StepGeom_Ellipse.cxx +++ b/src/StepGeom/StepGeom_Ellipse.cxx @@ -12,8 +12,6 @@ // commercial license or contractual agreement. -#include -#include #include #include diff --git a/src/StepGeom/StepGeom_Ellipse.hxx b/src/StepGeom/StepGeom_Ellipse.hxx index c3088d01ad..5d08511a6c 100644 --- a/src/StepGeom/StepGeom_Ellipse.hxx +++ b/src/StepGeom/StepGeom_Ellipse.hxx @@ -18,7 +18,6 @@ #define _StepGeom_Ellipse_HeaderFile #include -#include #include #include diff --git a/src/StepGeom/StepGeom_EvaluatedDegeneratePcurve.cxx b/src/StepGeom/StepGeom_EvaluatedDegeneratePcurve.cxx index 6df15e41a6..786ca652ac 100644 --- a/src/StepGeom/StepGeom_EvaluatedDegeneratePcurve.cxx +++ b/src/StepGeom/StepGeom_EvaluatedDegeneratePcurve.cxx @@ -12,7 +12,6 @@ // commercial license or contractual agreement. -#include #include #include #include diff --git a/src/StepGeom/StepGeom_GeomRepContextAndGlobUnitAssCtxAndGlobUncertaintyAssCtx.cxx b/src/StepGeom/StepGeom_GeomRepContextAndGlobUnitAssCtxAndGlobUncertaintyAssCtx.cxx index fa1a7e173d..42d0176ebb 100644 --- a/src/StepGeom/StepGeom_GeomRepContextAndGlobUnitAssCtxAndGlobUncertaintyAssCtx.cxx +++ b/src/StepGeom/StepGeom_GeomRepContextAndGlobUnitAssCtxAndGlobUncertaintyAssCtx.cxx @@ -16,8 +16,6 @@ #include -#include -#include #include #include #include diff --git a/src/StepGeom/StepGeom_GeometricRepresentationContext.cxx b/src/StepGeom/StepGeom_GeometricRepresentationContext.cxx index 133c5057fc..01f67c82ce 100644 --- a/src/StepGeom/StepGeom_GeometricRepresentationContext.cxx +++ b/src/StepGeom/StepGeom_GeometricRepresentationContext.cxx @@ -12,7 +12,6 @@ // commercial license or contractual agreement. -#include #include #include diff --git a/src/StepGeom/StepGeom_GeometricRepresentationContextAndGlobalUnitAssignedContext.cxx b/src/StepGeom/StepGeom_GeometricRepresentationContextAndGlobalUnitAssignedContext.cxx index 35e5d7f28f..3d30c2ab2a 100644 --- a/src/StepGeom/StepGeom_GeometricRepresentationContextAndGlobalUnitAssignedContext.cxx +++ b/src/StepGeom/StepGeom_GeometricRepresentationContextAndGlobalUnitAssignedContext.cxx @@ -13,7 +13,6 @@ #include -#include #include #include #include diff --git a/src/StepGeom/StepGeom_HArray1OfCartesianPoint.hxx b/src/StepGeom/StepGeom_HArray1OfCartesianPoint.hxx index 2e7a2d8609..c918face82 100644 --- a/src/StepGeom/StepGeom_HArray1OfCartesianPoint.hxx +++ b/src/StepGeom/StepGeom_HArray1OfCartesianPoint.hxx @@ -17,7 +17,6 @@ #ifndef StepGeom_HArray1OfCartesianPoint_HeaderFile #define StepGeom_HArray1OfCartesianPoint_HeaderFile -#include #include #include diff --git a/src/StepGeom/StepGeom_HArray1OfCompositeCurveSegment.hxx b/src/StepGeom/StepGeom_HArray1OfCompositeCurveSegment.hxx index 2a40b2b421..edae104ea8 100644 --- a/src/StepGeom/StepGeom_HArray1OfCompositeCurveSegment.hxx +++ b/src/StepGeom/StepGeom_HArray1OfCompositeCurveSegment.hxx @@ -17,7 +17,6 @@ #ifndef StepGeom_HArray1OfCompositeCurveSegment_HeaderFile #define StepGeom_HArray1OfCompositeCurveSegment_HeaderFile -#include #include #include diff --git a/src/StepGeom/StepGeom_HArray1OfPcurveOrSurface.hxx b/src/StepGeom/StepGeom_HArray1OfPcurveOrSurface.hxx index eae1eb2386..696c5e21f5 100644 --- a/src/StepGeom/StepGeom_HArray1OfPcurveOrSurface.hxx +++ b/src/StepGeom/StepGeom_HArray1OfPcurveOrSurface.hxx @@ -17,7 +17,6 @@ #ifndef StepGeom_HArray1OfPcurveOrSurface_HeaderFile #define StepGeom_HArray1OfPcurveOrSurface_HeaderFile -#include #include #include diff --git a/src/StepGeom/StepGeom_HArray1OfSurfaceBoundary.hxx b/src/StepGeom/StepGeom_HArray1OfSurfaceBoundary.hxx index a133992740..0f178d7bb3 100644 --- a/src/StepGeom/StepGeom_HArray1OfSurfaceBoundary.hxx +++ b/src/StepGeom/StepGeom_HArray1OfSurfaceBoundary.hxx @@ -17,7 +17,6 @@ #ifndef StepGeom_HArray1OfSurfaceBoundary_HeaderFile #define StepGeom_HArray1OfSurfaceBoundary_HeaderFile -#include #include #include diff --git a/src/StepGeom/StepGeom_HArray1OfTrimmingSelect.hxx b/src/StepGeom/StepGeom_HArray1OfTrimmingSelect.hxx index 7bfb40205f..a4c5424123 100644 --- a/src/StepGeom/StepGeom_HArray1OfTrimmingSelect.hxx +++ b/src/StepGeom/StepGeom_HArray1OfTrimmingSelect.hxx @@ -17,7 +17,6 @@ #ifndef StepGeom_HArray1OfTrimmingSelect_HeaderFile #define StepGeom_HArray1OfTrimmingSelect_HeaderFile -#include #include #include diff --git a/src/StepGeom/StepGeom_HArray2OfCartesianPoint.hxx b/src/StepGeom/StepGeom_HArray2OfCartesianPoint.hxx index fb215a2a83..26f185dd3f 100644 --- a/src/StepGeom/StepGeom_HArray2OfCartesianPoint.hxx +++ b/src/StepGeom/StepGeom_HArray2OfCartesianPoint.hxx @@ -17,7 +17,6 @@ #ifndef StepGeom_HArray2OfCartesianPoint_HeaderFile #define StepGeom_HArray2OfCartesianPoint_HeaderFile -#include #include #include diff --git a/src/StepGeom/StepGeom_HArray2OfSurfacePatch.hxx b/src/StepGeom/StepGeom_HArray2OfSurfacePatch.hxx index 48814f5a7a..8d9e08e21c 100644 --- a/src/StepGeom/StepGeom_HArray2OfSurfacePatch.hxx +++ b/src/StepGeom/StepGeom_HArray2OfSurfacePatch.hxx @@ -17,7 +17,6 @@ #ifndef StepGeom_HArray2OfSurfacePatch_HeaderFile #define StepGeom_HArray2OfSurfacePatch_HeaderFile -#include #include #include diff --git a/src/StepGeom/StepGeom_Hyperbola.cxx b/src/StepGeom/StepGeom_Hyperbola.cxx index 0b6a80b872..afb1cbf500 100644 --- a/src/StepGeom/StepGeom_Hyperbola.cxx +++ b/src/StepGeom/StepGeom_Hyperbola.cxx @@ -12,8 +12,6 @@ // commercial license or contractual agreement. -#include -#include #include #include diff --git a/src/StepGeom/StepGeom_Hyperbola.hxx b/src/StepGeom/StepGeom_Hyperbola.hxx index 5d0ca0fd80..10f3035112 100644 --- a/src/StepGeom/StepGeom_Hyperbola.hxx +++ b/src/StepGeom/StepGeom_Hyperbola.hxx @@ -18,7 +18,6 @@ #define _StepGeom_Hyperbola_HeaderFile #include -#include #include #include diff --git a/src/StepGeom/StepGeom_IntersectionCurve.cxx b/src/StepGeom/StepGeom_IntersectionCurve.cxx index fcbbe23e46..81b513edae 100644 --- a/src/StepGeom/StepGeom_IntersectionCurve.cxx +++ b/src/StepGeom/StepGeom_IntersectionCurve.cxx @@ -12,7 +12,6 @@ // commercial license or contractual agreement. -#include #include IMPLEMENT_STANDARD_RTTIEXT(StepGeom_IntersectionCurve,StepGeom_SurfaceCurve) diff --git a/src/StepGeom/StepGeom_IntersectionCurve.hxx b/src/StepGeom/StepGeom_IntersectionCurve.hxx index 6a608bd949..d84f833a6c 100644 --- a/src/StepGeom/StepGeom_IntersectionCurve.hxx +++ b/src/StepGeom/StepGeom_IntersectionCurve.hxx @@ -18,7 +18,6 @@ #define _StepGeom_IntersectionCurve_HeaderFile #include -#include #include diff --git a/src/StepGeom/StepGeom_Line.cxx b/src/StepGeom/StepGeom_Line.cxx index dab1ad05f5..7aca8dec1b 100644 --- a/src/StepGeom/StepGeom_Line.cxx +++ b/src/StepGeom/StepGeom_Line.cxx @@ -12,7 +12,6 @@ // commercial license or contractual agreement. -#include #include #include #include diff --git a/src/StepGeom/StepGeom_OffsetCurve3d.cxx b/src/StepGeom/StepGeom_OffsetCurve3d.cxx index 273dab86ff..018629bca8 100644 --- a/src/StepGeom/StepGeom_OffsetCurve3d.cxx +++ b/src/StepGeom/StepGeom_OffsetCurve3d.cxx @@ -12,8 +12,6 @@ // commercial license or contractual agreement. -#include -#include #include #include #include diff --git a/src/StepGeom/StepGeom_OffsetCurve3d.hxx b/src/StepGeom/StepGeom_OffsetCurve3d.hxx index e2af524e55..5b541e3ecb 100644 --- a/src/StepGeom/StepGeom_OffsetCurve3d.hxx +++ b/src/StepGeom/StepGeom_OffsetCurve3d.hxx @@ -20,7 +20,6 @@ #include #include -#include #include #include class StepGeom_Direction; diff --git a/src/StepGeom/StepGeom_OffsetSurface.cxx b/src/StepGeom/StepGeom_OffsetSurface.cxx index 886f84461d..db80f77e55 100644 --- a/src/StepGeom/StepGeom_OffsetSurface.cxx +++ b/src/StepGeom/StepGeom_OffsetSurface.cxx @@ -12,7 +12,6 @@ // commercial license or contractual agreement. -#include #include #include #include diff --git a/src/StepGeom/StepGeom_OrientedSurface.cxx b/src/StepGeom/StepGeom_OrientedSurface.cxx index ab4b07e527..84b7d70e71 100644 --- a/src/StepGeom/StepGeom_OrientedSurface.cxx +++ b/src/StepGeom/StepGeom_OrientedSurface.cxx @@ -15,7 +15,6 @@ // Generator: ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V1.1 -#include #include #include diff --git a/src/StepGeom/StepGeom_Parabola.cxx b/src/StepGeom/StepGeom_Parabola.cxx index 8dd4f93fdc..6bda1cf962 100644 --- a/src/StepGeom/StepGeom_Parabola.cxx +++ b/src/StepGeom/StepGeom_Parabola.cxx @@ -12,8 +12,6 @@ // commercial license or contractual agreement. -#include -#include #include #include diff --git a/src/StepGeom/StepGeom_Parabola.hxx b/src/StepGeom/StepGeom_Parabola.hxx index efb874f449..1d7d7c7486 100644 --- a/src/StepGeom/StepGeom_Parabola.hxx +++ b/src/StepGeom/StepGeom_Parabola.hxx @@ -18,7 +18,6 @@ #define _StepGeom_Parabola_HeaderFile #include -#include #include #include diff --git a/src/StepGeom/StepGeom_Pcurve.cxx b/src/StepGeom/StepGeom_Pcurve.cxx index b43a74b07b..1edd0dbba9 100644 --- a/src/StepGeom/StepGeom_Pcurve.cxx +++ b/src/StepGeom/StepGeom_Pcurve.cxx @@ -12,7 +12,6 @@ // commercial license or contractual agreement. -#include #include #include #include diff --git a/src/StepGeom/StepGeom_Placement.cxx b/src/StepGeom/StepGeom_Placement.cxx index 1d635806de..a20d8963e2 100644 --- a/src/StepGeom/StepGeom_Placement.cxx +++ b/src/StepGeom/StepGeom_Placement.cxx @@ -12,7 +12,6 @@ // commercial license or contractual agreement. -#include #include #include #include diff --git a/src/StepGeom/StepGeom_PointOnCurve.cxx b/src/StepGeom/StepGeom_PointOnCurve.cxx index 8f8d9e5bad..e1cb115abd 100644 --- a/src/StepGeom/StepGeom_PointOnCurve.cxx +++ b/src/StepGeom/StepGeom_PointOnCurve.cxx @@ -12,7 +12,6 @@ // commercial license or contractual agreement. -#include #include #include #include diff --git a/src/StepGeom/StepGeom_PointOnCurve.hxx b/src/StepGeom/StepGeom_PointOnCurve.hxx index 470411e0fa..719b22ef5d 100644 --- a/src/StepGeom/StepGeom_PointOnCurve.hxx +++ b/src/StepGeom/StepGeom_PointOnCurve.hxx @@ -20,7 +20,6 @@ #include #include -#include #include class StepGeom_Curve; class TCollection_HAsciiString; diff --git a/src/StepGeom/StepGeom_PointOnSurface.cxx b/src/StepGeom/StepGeom_PointOnSurface.cxx index 118557ab5a..2a392a0f37 100644 --- a/src/StepGeom/StepGeom_PointOnSurface.cxx +++ b/src/StepGeom/StepGeom_PointOnSurface.cxx @@ -12,7 +12,6 @@ // commercial license or contractual agreement. -#include #include #include #include diff --git a/src/StepGeom/StepGeom_PointReplica.cxx b/src/StepGeom/StepGeom_PointReplica.cxx index 227b105cfd..63f7153dfa 100644 --- a/src/StepGeom/StepGeom_PointReplica.cxx +++ b/src/StepGeom/StepGeom_PointReplica.cxx @@ -12,9 +12,7 @@ // commercial license or contractual agreement. -#include #include -#include #include #include diff --git a/src/StepGeom/StepGeom_Polyline.cxx b/src/StepGeom/StepGeom_Polyline.cxx index 6075fba684..bf47902970 100644 --- a/src/StepGeom/StepGeom_Polyline.cxx +++ b/src/StepGeom/StepGeom_Polyline.cxx @@ -12,8 +12,6 @@ // commercial license or contractual agreement. -#include -#include #include #include diff --git a/src/StepGeom/StepGeom_QuasiUniformCurveAndRationalBSplineCurve.hxx b/src/StepGeom/StepGeom_QuasiUniformCurveAndRationalBSplineCurve.hxx index ef69676293..9b05eeccf9 100644 --- a/src/StepGeom/StepGeom_QuasiUniformCurveAndRationalBSplineCurve.hxx +++ b/src/StepGeom/StepGeom_QuasiUniformCurveAndRationalBSplineCurve.hxx @@ -26,7 +26,6 @@ #include #include #include -#include class StepGeom_QuasiUniformCurve; class StepGeom_RationalBSplineCurve; class TCollection_HAsciiString; diff --git a/src/StepGeom/StepGeom_QuasiUniformSurfaceAndRationalBSplineSurface.hxx b/src/StepGeom/StepGeom_QuasiUniformSurfaceAndRationalBSplineSurface.hxx index 690d4d4256..4b9f16cf91 100644 --- a/src/StepGeom/StepGeom_QuasiUniformSurfaceAndRationalBSplineSurface.hxx +++ b/src/StepGeom/StepGeom_QuasiUniformSurfaceAndRationalBSplineSurface.hxx @@ -26,7 +26,6 @@ #include #include #include -#include class StepGeom_QuasiUniformSurface; class StepGeom_RationalBSplineSurface; class TCollection_HAsciiString; diff --git a/src/StepGeom/StepGeom_RationalBSplineCurve.cxx b/src/StepGeom/StepGeom_RationalBSplineCurve.cxx index 54e55d4f30..10ffb39b2c 100644 --- a/src/StepGeom/StepGeom_RationalBSplineCurve.cxx +++ b/src/StepGeom/StepGeom_RationalBSplineCurve.cxx @@ -12,7 +12,6 @@ // commercial license or contractual agreement. -#include #include #include diff --git a/src/StepGeom/StepGeom_RationalBSplineCurve.hxx b/src/StepGeom/StepGeom_RationalBSplineCurve.hxx index c1774b9105..957729bfa9 100644 --- a/src/StepGeom/StepGeom_RationalBSplineCurve.hxx +++ b/src/StepGeom/StepGeom_RationalBSplineCurve.hxx @@ -20,7 +20,6 @@ #include #include -#include #include #include #include diff --git a/src/StepGeom/StepGeom_RationalBSplineSurface.cxx b/src/StepGeom/StepGeom_RationalBSplineSurface.cxx index c6e8c98d70..eb43a2ffeb 100644 --- a/src/StepGeom/StepGeom_RationalBSplineSurface.cxx +++ b/src/StepGeom/StepGeom_RationalBSplineSurface.cxx @@ -12,7 +12,6 @@ // commercial license or contractual agreement. -#include #include #include diff --git a/src/StepGeom/StepGeom_RectangularCompositeSurface.cxx b/src/StepGeom/StepGeom_RectangularCompositeSurface.cxx index e6f90e11c3..1fee20ea82 100644 --- a/src/StepGeom/StepGeom_RectangularCompositeSurface.cxx +++ b/src/StepGeom/StepGeom_RectangularCompositeSurface.cxx @@ -12,7 +12,6 @@ // commercial license or contractual agreement. -#include #include #include #include diff --git a/src/StepGeom/StepGeom_RectangularTrimmedSurface.cxx b/src/StepGeom/StepGeom_RectangularTrimmedSurface.cxx index 105a538f29..54abd8651e 100644 --- a/src/StepGeom/StepGeom_RectangularTrimmedSurface.cxx +++ b/src/StepGeom/StepGeom_RectangularTrimmedSurface.cxx @@ -12,7 +12,6 @@ // commercial license or contractual agreement. -#include #include #include #include diff --git a/src/StepGeom/StepGeom_ReparametrisedCompositeCurveSegment.hxx b/src/StepGeom/StepGeom_ReparametrisedCompositeCurveSegment.hxx index 6dfe347e42..ca3ab39588 100644 --- a/src/StepGeom/StepGeom_ReparametrisedCompositeCurveSegment.hxx +++ b/src/StepGeom/StepGeom_ReparametrisedCompositeCurveSegment.hxx @@ -20,10 +20,8 @@ #include #include -#include #include #include -#include class StepGeom_Curve; diff --git a/src/StepGeom/StepGeom_SeamCurve.cxx b/src/StepGeom/StepGeom_SeamCurve.cxx index be9d0935e5..cc81ab3d20 100644 --- a/src/StepGeom/StepGeom_SeamCurve.cxx +++ b/src/StepGeom/StepGeom_SeamCurve.cxx @@ -12,7 +12,6 @@ // commercial license or contractual agreement. -#include #include IMPLEMENT_STANDARD_RTTIEXT(StepGeom_SeamCurve,StepGeom_SurfaceCurve) diff --git a/src/StepGeom/StepGeom_SeamCurve.hxx b/src/StepGeom/StepGeom_SeamCurve.hxx index ddd4d5f13d..49eae46495 100644 --- a/src/StepGeom/StepGeom_SeamCurve.hxx +++ b/src/StepGeom/StepGeom_SeamCurve.hxx @@ -18,7 +18,6 @@ #define _StepGeom_SeamCurve_HeaderFile #include -#include #include diff --git a/src/StepGeom/StepGeom_SphericalSurface.cxx b/src/StepGeom/StepGeom_SphericalSurface.cxx index b356c363c8..4504e05172 100644 --- a/src/StepGeom/StepGeom_SphericalSurface.cxx +++ b/src/StepGeom/StepGeom_SphericalSurface.cxx @@ -12,7 +12,6 @@ // commercial license or contractual agreement. -#include #include #include #include diff --git a/src/StepGeom/StepGeom_SphericalSurface.hxx b/src/StepGeom/StepGeom_SphericalSurface.hxx index bfe9062f40..6d23c63331 100644 --- a/src/StepGeom/StepGeom_SphericalSurface.hxx +++ b/src/StepGeom/StepGeom_SphericalSurface.hxx @@ -20,7 +20,6 @@ #include #include -#include #include class TCollection_HAsciiString; class StepGeom_Axis2Placement3d; diff --git a/src/StepGeom/StepGeom_SuParameters.hxx b/src/StepGeom/StepGeom_SuParameters.hxx index 1a47dbf9e8..2874a986b0 100644 --- a/src/StepGeom/StepGeom_SuParameters.hxx +++ b/src/StepGeom/StepGeom_SuParameters.hxx @@ -18,7 +18,6 @@ #define _StepGeom_SuParameters_HeaderFile_ #include -#include #include #include diff --git a/src/StepGeom/StepGeom_SurfaceCurve.cxx b/src/StepGeom/StepGeom_SurfaceCurve.cxx index 171e5eef02..b69c314a2f 100644 --- a/src/StepGeom/StepGeom_SurfaceCurve.cxx +++ b/src/StepGeom/StepGeom_SurfaceCurve.cxx @@ -12,9 +12,6 @@ // commercial license or contractual agreement. -#include -#include -#include #include #include diff --git a/src/StepGeom/StepGeom_SurfaceCurve.hxx b/src/StepGeom/StepGeom_SurfaceCurve.hxx index cd72cc246c..4293c690ec 100644 --- a/src/StepGeom/StepGeom_SurfaceCurve.hxx +++ b/src/StepGeom/StepGeom_SurfaceCurve.hxx @@ -18,7 +18,6 @@ #define _StepGeom_SurfaceCurve_HeaderFile #include -#include #include #include diff --git a/src/StepGeom/StepGeom_SurfaceCurveAndBoundedCurve.cxx b/src/StepGeom/StepGeom_SurfaceCurveAndBoundedCurve.cxx index 2b3d4ea74c..c72dd99834 100644 --- a/src/StepGeom/StepGeom_SurfaceCurveAndBoundedCurve.cxx +++ b/src/StepGeom/StepGeom_SurfaceCurveAndBoundedCurve.cxx @@ -15,7 +15,6 @@ // commercial license or contractual agreement. -#include #include #include diff --git a/src/StepGeom/StepGeom_SurfaceOfLinearExtrusion.cxx b/src/StepGeom/StepGeom_SurfaceOfLinearExtrusion.cxx index b3bc4e2acf..4cb930d9d0 100644 --- a/src/StepGeom/StepGeom_SurfaceOfLinearExtrusion.cxx +++ b/src/StepGeom/StepGeom_SurfaceOfLinearExtrusion.cxx @@ -12,7 +12,6 @@ // commercial license or contractual agreement. -#include #include #include #include diff --git a/src/StepGeom/StepGeom_SurfaceOfRevolution.cxx b/src/StepGeom/StepGeom_SurfaceOfRevolution.cxx index ca4db27e61..e631a5bf4c 100644 --- a/src/StepGeom/StepGeom_SurfaceOfRevolution.cxx +++ b/src/StepGeom/StepGeom_SurfaceOfRevolution.cxx @@ -12,7 +12,6 @@ // commercial license or contractual agreement. -#include #include #include #include diff --git a/src/StepGeom/StepGeom_SurfacePatch.hxx b/src/StepGeom/StepGeom_SurfacePatch.hxx index 976836432f..2f3d98cdcf 100644 --- a/src/StepGeom/StepGeom_SurfacePatch.hxx +++ b/src/StepGeom/StepGeom_SurfacePatch.hxx @@ -21,7 +21,6 @@ #include #include -#include #include class StepGeom_BoundedSurface; diff --git a/src/StepGeom/StepGeom_SurfaceReplica.cxx b/src/StepGeom/StepGeom_SurfaceReplica.cxx index d8d948d4a3..62563c7fd8 100644 --- a/src/StepGeom/StepGeom_SurfaceReplica.cxx +++ b/src/StepGeom/StepGeom_SurfaceReplica.cxx @@ -12,9 +12,7 @@ // commercial license or contractual agreement. -#include #include -#include #include #include diff --git a/src/StepGeom/StepGeom_SweptSurface.cxx b/src/StepGeom/StepGeom_SweptSurface.cxx index 17a321e367..c038b93c17 100644 --- a/src/StepGeom/StepGeom_SweptSurface.cxx +++ b/src/StepGeom/StepGeom_SweptSurface.cxx @@ -12,7 +12,6 @@ // commercial license or contractual agreement. -#include #include #include #include diff --git a/src/StepGeom/StepGeom_ToroidalSurface.cxx b/src/StepGeom/StepGeom_ToroidalSurface.cxx index 7afef25c38..bf9e61f9cf 100644 --- a/src/StepGeom/StepGeom_ToroidalSurface.cxx +++ b/src/StepGeom/StepGeom_ToroidalSurface.cxx @@ -12,7 +12,6 @@ // commercial license or contractual agreement. -#include #include #include #include diff --git a/src/StepGeom/StepGeom_ToroidalSurface.hxx b/src/StepGeom/StepGeom_ToroidalSurface.hxx index 8eae28d269..f2ade9a217 100644 --- a/src/StepGeom/StepGeom_ToroidalSurface.hxx +++ b/src/StepGeom/StepGeom_ToroidalSurface.hxx @@ -20,7 +20,6 @@ #include #include -#include #include class TCollection_HAsciiString; class StepGeom_Axis2Placement3d; diff --git a/src/StepGeom/StepGeom_TrimmedCurve.cxx b/src/StepGeom/StepGeom_TrimmedCurve.cxx index 0513bee4d0..51100c32eb 100644 --- a/src/StepGeom/StepGeom_TrimmedCurve.cxx +++ b/src/StepGeom/StepGeom_TrimmedCurve.cxx @@ -12,8 +12,6 @@ // commercial license or contractual agreement. -#include -#include #include #include #include diff --git a/src/StepGeom/StepGeom_TrimmedCurve.hxx b/src/StepGeom/StepGeom_TrimmedCurve.hxx index 15557c5c51..45a186c18b 100644 --- a/src/StepGeom/StepGeom_TrimmedCurve.hxx +++ b/src/StepGeom/StepGeom_TrimmedCurve.hxx @@ -18,7 +18,6 @@ #define _StepGeom_TrimmedCurve_HeaderFile #include -#include #include #include diff --git a/src/StepGeom/StepGeom_TrimmingMember.hxx b/src/StepGeom/StepGeom_TrimmingMember.hxx index 7759986f5d..de7a724baf 100644 --- a/src/StepGeom/StepGeom_TrimmingMember.hxx +++ b/src/StepGeom/StepGeom_TrimmingMember.hxx @@ -21,8 +21,6 @@ #include #include -#include -#include class StepGeom_TrimmingMember; diff --git a/src/StepGeom/StepGeom_TrimmingSelect.hxx b/src/StepGeom/StepGeom_TrimmingSelect.hxx index ed2724c2ca..a1f40896a8 100644 --- a/src/StepGeom/StepGeom_TrimmingSelect.hxx +++ b/src/StepGeom/StepGeom_TrimmingSelect.hxx @@ -23,7 +23,6 @@ #include #include -#include class Standard_Transient; class StepData_SelectMember; class StepGeom_CartesianPoint; diff --git a/src/StepGeom/StepGeom_UniformCurveAndRationalBSplineCurve.hxx b/src/StepGeom/StepGeom_UniformCurveAndRationalBSplineCurve.hxx index 78b1ea5273..c593efa6fd 100644 --- a/src/StepGeom/StepGeom_UniformCurveAndRationalBSplineCurve.hxx +++ b/src/StepGeom/StepGeom_UniformCurveAndRationalBSplineCurve.hxx @@ -26,7 +26,6 @@ #include #include #include -#include class StepGeom_UniformCurve; class StepGeom_RationalBSplineCurve; class TCollection_HAsciiString; diff --git a/src/StepGeom/StepGeom_UniformSurfaceAndRationalBSplineSurface.hxx b/src/StepGeom/StepGeom_UniformSurfaceAndRationalBSplineSurface.hxx index 75f053947d..abe2fe2d4e 100644 --- a/src/StepGeom/StepGeom_UniformSurfaceAndRationalBSplineSurface.hxx +++ b/src/StepGeom/StepGeom_UniformSurfaceAndRationalBSplineSurface.hxx @@ -26,7 +26,6 @@ #include #include #include -#include class StepGeom_UniformSurface; class StepGeom_RationalBSplineSurface; class TCollection_HAsciiString; diff --git a/src/StepGeom/StepGeom_Vector.cxx b/src/StepGeom/StepGeom_Vector.cxx index 00568f2e95..ccdffa8295 100644 --- a/src/StepGeom/StepGeom_Vector.cxx +++ b/src/StepGeom/StepGeom_Vector.cxx @@ -12,7 +12,6 @@ // commercial license or contractual agreement. -#include #include #include #include diff --git a/src/StepGeom/StepGeom_Vector.hxx b/src/StepGeom/StepGeom_Vector.hxx index 1da526cbb8..d407840e75 100644 --- a/src/StepGeom/StepGeom_Vector.hxx +++ b/src/StepGeom/StepGeom_Vector.hxx @@ -20,7 +20,6 @@ #include #include -#include #include class StepGeom_Direction; class TCollection_HAsciiString; diff --git a/src/StepKinematics/StepKinematics_ActuatedKinPairAndOrderKinPair.cxx b/src/StepKinematics/StepKinematics_ActuatedKinPairAndOrderKinPair.cxx index 9b97de8684..2763e2e728 100644 --- a/src/StepKinematics/StepKinematics_ActuatedKinPairAndOrderKinPair.cxx +++ b/src/StepKinematics/StepKinematics_ActuatedKinPairAndOrderKinPair.cxx @@ -15,7 +15,6 @@ #include #include -#include #include #include diff --git a/src/StepKinematics/StepKinematics_ActuatedKinPairAndOrderKinPair.hxx b/src/StepKinematics/StepKinematics_ActuatedKinPairAndOrderKinPair.hxx index e9e8b3ec5b..24be5b9199 100644 --- a/src/StepKinematics/StepKinematics_ActuatedKinPairAndOrderKinPair.hxx +++ b/src/StepKinematics/StepKinematics_ActuatedKinPairAndOrderKinPair.hxx @@ -17,9 +17,7 @@ #define _StepKinematics_ActuatedKinPairAndOrderKinPair_HeaderFile_ #include -#include #include -#include #include #include class StepRepr_RepresentationItem; diff --git a/src/StepKinematics/StepKinematics_ActuatedKinematicPair.hxx b/src/StepKinematics/StepKinematics_ActuatedKinematicPair.hxx index d7360a68b5..b3444dbcc5 100644 --- a/src/StepKinematics/StepKinematics_ActuatedKinematicPair.hxx +++ b/src/StepKinematics/StepKinematics_ActuatedKinematicPair.hxx @@ -18,15 +18,12 @@ #define _StepKinematics_ActuatedKinematicPair_HeaderFile_ #include -#include #include #include #include -#include #include #include -#include DEFINE_STANDARD_HANDLE(StepKinematics_ActuatedKinematicPair, StepKinematics_KinematicPair) diff --git a/src/StepKinematics/StepKinematics_ContextDependentKinematicLinkRepresentation.hxx b/src/StepKinematics/StepKinematics_ContextDependentKinematicLinkRepresentation.hxx index fe94b4cb4b..90b2eddf4e 100644 --- a/src/StepKinematics/StepKinematics_ContextDependentKinematicLinkRepresentation.hxx +++ b/src/StepKinematics/StepKinematics_ContextDependentKinematicLinkRepresentation.hxx @@ -18,7 +18,6 @@ #define _StepKinematics_ContextDependentKinematicLinkRepresentation_HeaderFile_ #include -#include #include #include diff --git a/src/StepKinematics/StepKinematics_CylindricalPair.hxx b/src/StepKinematics/StepKinematics_CylindricalPair.hxx index 4c2740855b..f86d205da4 100644 --- a/src/StepKinematics/StepKinematics_CylindricalPair.hxx +++ b/src/StepKinematics/StepKinematics_CylindricalPair.hxx @@ -18,13 +18,9 @@ #define _StepKinematics_CylindricalPair_HeaderFile_ #include -#include #include #include -#include -#include -#include DEFINE_STANDARD_HANDLE(StepKinematics_CylindricalPair, StepKinematics_LowOrderKinematicPair) diff --git a/src/StepKinematics/StepKinematics_CylindricalPairValue.hxx b/src/StepKinematics/StepKinematics_CylindricalPairValue.hxx index 2222a8750f..9c1f07c8e2 100644 --- a/src/StepKinematics/StepKinematics_CylindricalPairValue.hxx +++ b/src/StepKinematics/StepKinematics_CylindricalPairValue.hxx @@ -18,7 +18,6 @@ #define _StepKinematics_CylindricalPairValue_HeaderFile_ #include -#include #include #include diff --git a/src/StepKinematics/StepKinematics_CylindricalPairWithRange.hxx b/src/StepKinematics/StepKinematics_CylindricalPairWithRange.hxx index 74393e425b..b1d9369fe2 100644 --- a/src/StepKinematics/StepKinematics_CylindricalPairWithRange.hxx +++ b/src/StepKinematics/StepKinematics_CylindricalPairWithRange.hxx @@ -18,12 +18,10 @@ #define _StepKinematics_CylindricalPairWithRange_HeaderFile_ #include -#include #include #include #include -#include #include DEFINE_STANDARD_HANDLE(StepKinematics_CylindricalPairWithRange, StepKinematics_CylindricalPair) diff --git a/src/StepKinematics/StepKinematics_FullyConstrainedPair.hxx b/src/StepKinematics/StepKinematics_FullyConstrainedPair.hxx index 573f7cce74..b9a5581613 100644 --- a/src/StepKinematics/StepKinematics_FullyConstrainedPair.hxx +++ b/src/StepKinematics/StepKinematics_FullyConstrainedPair.hxx @@ -18,13 +18,9 @@ #define _StepKinematics_FullyConstrainedPair_HeaderFile_ #include -#include #include #include -#include -#include -#include DEFINE_STANDARD_HANDLE(StepKinematics_FullyConstrainedPair, StepKinematics_LowOrderKinematicPair) diff --git a/src/StepKinematics/StepKinematics_GearPair.hxx b/src/StepKinematics/StepKinematics_GearPair.hxx index 493a7d3766..ed70c15545 100644 --- a/src/StepKinematics/StepKinematics_GearPair.hxx +++ b/src/StepKinematics/StepKinematics_GearPair.hxx @@ -18,12 +18,10 @@ #define _StepKinematics_GearPair_HeaderFile_ #include -#include #include #include #include -#include #include DEFINE_STANDARD_HANDLE(StepKinematics_GearPair, StepKinematics_LowOrderKinematicPairWithMotionCoupling) diff --git a/src/StepKinematics/StepKinematics_GearPairValue.hxx b/src/StepKinematics/StepKinematics_GearPairValue.hxx index 8c8a2eb2ec..0e8b800d80 100644 --- a/src/StepKinematics/StepKinematics_GearPairValue.hxx +++ b/src/StepKinematics/StepKinematics_GearPairValue.hxx @@ -18,7 +18,6 @@ #define _StepKinematics_GearPairValue_HeaderFile_ #include -#include #include #include diff --git a/src/StepKinematics/StepKinematics_GearPairWithRange.hxx b/src/StepKinematics/StepKinematics_GearPairWithRange.hxx index 8f011aa9ab..c90048fd8c 100644 --- a/src/StepKinematics/StepKinematics_GearPairWithRange.hxx +++ b/src/StepKinematics/StepKinematics_GearPairWithRange.hxx @@ -18,12 +18,10 @@ #define _StepKinematics_GearPairWithRange_HeaderFile_ #include -#include #include #include #include -#include #include DEFINE_STANDARD_HANDLE(StepKinematics_GearPairWithRange, StepKinematics_GearPair) diff --git a/src/StepKinematics/StepKinematics_HighOrderKinematicPair.hxx b/src/StepKinematics/StepKinematics_HighOrderKinematicPair.hxx index 40930a83fe..36c7cce008 100644 --- a/src/StepKinematics/StepKinematics_HighOrderKinematicPair.hxx +++ b/src/StepKinematics/StepKinematics_HighOrderKinematicPair.hxx @@ -18,13 +18,9 @@ #define _StepKinematics_HighOrderKinematicPair_HeaderFile_ #include -#include #include #include -#include -#include -#include DEFINE_STANDARD_HANDLE(StepKinematics_HighOrderKinematicPair, StepKinematics_KinematicPair) diff --git a/src/StepKinematics/StepKinematics_HomokineticPair.hxx b/src/StepKinematics/StepKinematics_HomokineticPair.hxx index fa60e49701..576872c912 100644 --- a/src/StepKinematics/StepKinematics_HomokineticPair.hxx +++ b/src/StepKinematics/StepKinematics_HomokineticPair.hxx @@ -18,13 +18,9 @@ #define _StepKinematics_HomokineticPair_HeaderFile_ #include -#include #include #include -#include -#include -#include DEFINE_STANDARD_HANDLE(StepKinematics_HomokineticPair, StepKinematics_UniversalPair) diff --git a/src/StepKinematics/StepKinematics_KinematicJoint.hxx b/src/StepKinematics/StepKinematics_KinematicJoint.hxx index be7a2622c6..f91fa3a8de 100644 --- a/src/StepKinematics/StepKinematics_KinematicJoint.hxx +++ b/src/StepKinematics/StepKinematics_KinematicJoint.hxx @@ -18,11 +18,9 @@ #define _StepKinematics_KinematicJoint_HeaderFile_ #include -#include #include #include -#include DEFINE_STANDARD_HANDLE(StepKinematics_KinematicJoint, StepShape_Edge) diff --git a/src/StepKinematics/StepKinematics_KinematicLink.hxx b/src/StepKinematics/StepKinematics_KinematicLink.hxx index 14ed0dafcf..3e798f520c 100644 --- a/src/StepKinematics/StepKinematics_KinematicLink.hxx +++ b/src/StepKinematics/StepKinematics_KinematicLink.hxx @@ -18,7 +18,6 @@ #define _StepKinematics_KinematicLink_HeaderFile_ #include -#include #include #include diff --git a/src/StepKinematics/StepKinematics_KinematicLinkRepresentation.hxx b/src/StepKinematics/StepKinematics_KinematicLinkRepresentation.hxx index e042105f1c..44d4cf35e8 100644 --- a/src/StepKinematics/StepKinematics_KinematicLinkRepresentation.hxx +++ b/src/StepKinematics/StepKinematics_KinematicLinkRepresentation.hxx @@ -18,10 +18,8 @@ #define _StepKinematics_KinematicLinkRepresentation_HeaderFile_ #include -#include #include -#include #include #include #include diff --git a/src/StepKinematics/StepKinematics_KinematicLinkRepresentationAssociation.hxx b/src/StepKinematics/StepKinematics_KinematicLinkRepresentationAssociation.hxx index e20ccad9d2..9e006c2261 100644 --- a/src/StepKinematics/StepKinematics_KinematicLinkRepresentationAssociation.hxx +++ b/src/StepKinematics/StepKinematics_KinematicLinkRepresentationAssociation.hxx @@ -18,7 +18,6 @@ #define _StepKinematics_KinematicLinkRepresentationAssociation_HeaderFile_ #include -#include #include #include diff --git a/src/StepKinematics/StepKinematics_KinematicPair.hxx b/src/StepKinematics/StepKinematics_KinematicPair.hxx index 8e34b1652a..0087ab2ab5 100644 --- a/src/StepKinematics/StepKinematics_KinematicPair.hxx +++ b/src/StepKinematics/StepKinematics_KinematicPair.hxx @@ -18,10 +18,8 @@ #define _StepKinematics_KinematicPair_HeaderFile_ #include -#include #include -#include #include #include #include diff --git a/src/StepKinematics/StepKinematics_KinematicPropertyDefinitionRepresentation.hxx b/src/StepKinematics/StepKinematics_KinematicPropertyDefinitionRepresentation.hxx index d2924497b0..dbfc62586f 100644 --- a/src/StepKinematics/StepKinematics_KinematicPropertyDefinitionRepresentation.hxx +++ b/src/StepKinematics/StepKinematics_KinematicPropertyDefinitionRepresentation.hxx @@ -18,7 +18,6 @@ #define _StepKinematics_KinematicPropertyDefinitionRepresentation_HeaderFile_ #include -#include #include #include diff --git a/src/StepKinematics/StepKinematics_KinematicPropertyMechanismRepresentation.hxx b/src/StepKinematics/StepKinematics_KinematicPropertyMechanismRepresentation.hxx index 9eb6cc66b9..3aee8a9171 100644 --- a/src/StepKinematics/StepKinematics_KinematicPropertyMechanismRepresentation.hxx +++ b/src/StepKinematics/StepKinematics_KinematicPropertyMechanismRepresentation.hxx @@ -18,7 +18,6 @@ #define _StepKinematics_KinematicPropertyMechanismRepresentation_HeaderFile_ #include -#include #include #include diff --git a/src/StepKinematics/StepKinematics_KinematicTopologyDirectedStructure.hxx b/src/StepKinematics/StepKinematics_KinematicTopologyDirectedStructure.hxx index 1ff25be00a..b5b05b7021 100644 --- a/src/StepKinematics/StepKinematics_KinematicTopologyDirectedStructure.hxx +++ b/src/StepKinematics/StepKinematics_KinematicTopologyDirectedStructure.hxx @@ -18,11 +18,7 @@ #define _StepKinematics_KinematicTopologyDirectedStructure_HeaderFile_ #include -#include -#include -#include -#include #include #include diff --git a/src/StepKinematics/StepKinematics_KinematicTopologyNetworkStructure.hxx b/src/StepKinematics/StepKinematics_KinematicTopologyNetworkStructure.hxx index 4a2801685a..09cbf0ff71 100644 --- a/src/StepKinematics/StepKinematics_KinematicTopologyNetworkStructure.hxx +++ b/src/StepKinematics/StepKinematics_KinematicTopologyNetworkStructure.hxx @@ -18,11 +18,7 @@ #define _StepKinematics_KinematicTopologyNetworkStructure_HeaderFile_ #include -#include -#include -#include -#include #include #include diff --git a/src/StepKinematics/StepKinematics_KinematicTopologyStructure.hxx b/src/StepKinematics/StepKinematics_KinematicTopologyStructure.hxx index 8359003836..8af98c8b89 100644 --- a/src/StepKinematics/StepKinematics_KinematicTopologyStructure.hxx +++ b/src/StepKinematics/StepKinematics_KinematicTopologyStructure.hxx @@ -18,12 +18,10 @@ #define _StepKinematics_KinematicTopologyStructure_HeaderFile_ #include -#include #include #include #include -#include DEFINE_STANDARD_HANDLE(StepKinematics_KinematicTopologyStructure, StepRepr_Representation) diff --git a/src/StepKinematics/StepKinematics_LinearFlexibleAndPinionPair.hxx b/src/StepKinematics/StepKinematics_LinearFlexibleAndPinionPair.hxx index 966e2859de..71d12f2a1f 100644 --- a/src/StepKinematics/StepKinematics_LinearFlexibleAndPinionPair.hxx +++ b/src/StepKinematics/StepKinematics_LinearFlexibleAndPinionPair.hxx @@ -18,12 +18,10 @@ #define _StepKinematics_LinearFlexibleAndPinionPair_HeaderFile_ #include -#include #include #include #include -#include #include DEFINE_STANDARD_HANDLE(StepKinematics_LinearFlexibleAndPinionPair, StepKinematics_LowOrderKinematicPairWithMotionCoupling) diff --git a/src/StepKinematics/StepKinematics_LinearFlexibleAndPlanarCurvePair.hxx b/src/StepKinematics/StepKinematics_LinearFlexibleAndPlanarCurvePair.hxx index 22c4b3c346..10c0b7efdb 100644 --- a/src/StepKinematics/StepKinematics_LinearFlexibleAndPlanarCurvePair.hxx +++ b/src/StepKinematics/StepKinematics_LinearFlexibleAndPlanarCurvePair.hxx @@ -18,12 +18,10 @@ #define _StepKinematics_LinearFlexibleAndPlanarCurvePair_HeaderFile_ #include -#include #include #include #include -#include #include #include diff --git a/src/StepKinematics/StepKinematics_LinearFlexibleLinkRepresentation.hxx b/src/StepKinematics/StepKinematics_LinearFlexibleLinkRepresentation.hxx index de0a6c207b..d17528077f 100644 --- a/src/StepKinematics/StepKinematics_LinearFlexibleLinkRepresentation.hxx +++ b/src/StepKinematics/StepKinematics_LinearFlexibleLinkRepresentation.hxx @@ -18,13 +18,10 @@ #define _StepKinematics_LinearFlexibleLinkRepresentation_HeaderFile_ #include -#include #include #include #include -#include -#include DEFINE_STANDARD_HANDLE(StepKinematics_LinearFlexibleLinkRepresentation, StepKinematics_KinematicLinkRepresentation) diff --git a/src/StepKinematics/StepKinematics_LowOrderKinematicPair.hxx b/src/StepKinematics/StepKinematics_LowOrderKinematicPair.hxx index 55ca99c5aa..f395c16453 100644 --- a/src/StepKinematics/StepKinematics_LowOrderKinematicPair.hxx +++ b/src/StepKinematics/StepKinematics_LowOrderKinematicPair.hxx @@ -18,12 +18,10 @@ #define _StepKinematics_LowOrderKinematicPair_HeaderFile_ #include -#include #include #include #include -#include #include DEFINE_STANDARD_HANDLE(StepKinematics_LowOrderKinematicPair, StepKinematics_KinematicPair) diff --git a/src/StepKinematics/StepKinematics_LowOrderKinematicPairValue.hxx b/src/StepKinematics/StepKinematics_LowOrderKinematicPairValue.hxx index 0591a3a1d6..b5f9c51041 100644 --- a/src/StepKinematics/StepKinematics_LowOrderKinematicPairValue.hxx +++ b/src/StepKinematics/StepKinematics_LowOrderKinematicPairValue.hxx @@ -18,7 +18,6 @@ #define _StepKinematics_LowOrderKinematicPairValue_HeaderFile_ #include -#include #include #include diff --git a/src/StepKinematics/StepKinematics_LowOrderKinematicPairWithMotionCoupling.hxx b/src/StepKinematics/StepKinematics_LowOrderKinematicPairWithMotionCoupling.hxx index d85ecc64fc..f653482781 100644 --- a/src/StepKinematics/StepKinematics_LowOrderKinematicPairWithMotionCoupling.hxx +++ b/src/StepKinematics/StepKinematics_LowOrderKinematicPairWithMotionCoupling.hxx @@ -18,13 +18,9 @@ #define _StepKinematics_LowOrderKinematicPairWithMotionCoupling_HeaderFile_ #include -#include #include #include -#include -#include -#include DEFINE_STANDARD_HANDLE(StepKinematics_LowOrderKinematicPairWithMotionCoupling, StepKinematics_KinematicPair) diff --git a/src/StepKinematics/StepKinematics_LowOrderKinematicPairWithRange.hxx b/src/StepKinematics/StepKinematics_LowOrderKinematicPairWithRange.hxx index f715290773..ca4bc55da6 100644 --- a/src/StepKinematics/StepKinematics_LowOrderKinematicPairWithRange.hxx +++ b/src/StepKinematics/StepKinematics_LowOrderKinematicPairWithRange.hxx @@ -18,12 +18,10 @@ #define _StepKinematics_LowOrderKinematicPairWithRange_HeaderFile_ #include -#include #include #include #include -#include #include DEFINE_STANDARD_HANDLE(StepKinematics_LowOrderKinematicPairWithRange, StepKinematics_LowOrderKinematicPair) diff --git a/src/StepKinematics/StepKinematics_MechanismRepresentation.hxx b/src/StepKinematics/StepKinematics_MechanismRepresentation.hxx index cfaa5823da..c57a81d801 100644 --- a/src/StepKinematics/StepKinematics_MechanismRepresentation.hxx +++ b/src/StepKinematics/StepKinematics_MechanismRepresentation.hxx @@ -18,7 +18,6 @@ #define _StepKinematics_MechanismRepresentation_HeaderFile_ #include -#include #include #include diff --git a/src/StepKinematics/StepKinematics_MechanismStateRepresentation.cxx b/src/StepKinematics/StepKinematics_MechanismStateRepresentation.cxx index f34be4621a..7dca9ea9f7 100644 --- a/src/StepKinematics/StepKinematics_MechanismStateRepresentation.cxx +++ b/src/StepKinematics/StepKinematics_MechanismStateRepresentation.cxx @@ -14,7 +14,6 @@ // commercial license or contractual agreement. -#include #include #include diff --git a/src/StepKinematics/StepKinematics_OrientedJoint.hxx b/src/StepKinematics/StepKinematics_OrientedJoint.hxx index 17ef0fe1c5..a976eaef21 100644 --- a/src/StepKinematics/StepKinematics_OrientedJoint.hxx +++ b/src/StepKinematics/StepKinematics_OrientedJoint.hxx @@ -18,12 +18,9 @@ #define _StepKinematics_OrientedJoint_HeaderFile_ #include -#include #include #include -#include -#include DEFINE_STANDARD_HANDLE(StepKinematics_OrientedJoint, StepShape_OrientedEdge) diff --git a/src/StepKinematics/StepKinematics_PairRepresentationRelationship.hxx b/src/StepKinematics/StepKinematics_PairRepresentationRelationship.hxx index 289f133a41..b8b9b587e0 100644 --- a/src/StepKinematics/StepKinematics_PairRepresentationRelationship.hxx +++ b/src/StepKinematics/StepKinematics_PairRepresentationRelationship.hxx @@ -18,12 +18,10 @@ #define _StepKinematics_PairRepresentationRelationship_HeaderFile_ #include -#include #include #include #include -#include #include DEFINE_STANDARD_HANDLE(StepKinematics_PairRepresentationRelationship, StepGeom_GeometricRepresentationItem) diff --git a/src/StepKinematics/StepKinematics_PairValue.hxx b/src/StepKinematics/StepKinematics_PairValue.hxx index ec6e68391f..8fc823762e 100644 --- a/src/StepKinematics/StepKinematics_PairValue.hxx +++ b/src/StepKinematics/StepKinematics_PairValue.hxx @@ -18,10 +18,7 @@ #define _StepKinematics_PairValue_HeaderFile_ #include -#include -#include -#include #include DEFINE_STANDARD_HANDLE(StepKinematics_PairValue, StepGeom_GeometricRepresentationItem) diff --git a/src/StepKinematics/StepKinematics_PlanarCurvePair.hxx b/src/StepKinematics/StepKinematics_PlanarCurvePair.hxx index cf379d3faf..5ee0512fd5 100644 --- a/src/StepKinematics/StepKinematics_PlanarCurvePair.hxx +++ b/src/StepKinematics/StepKinematics_PlanarCurvePair.hxx @@ -18,12 +18,10 @@ #define _StepKinematics_PlanarCurvePair_HeaderFile_ #include -#include #include #include #include -#include #include #include diff --git a/src/StepKinematics/StepKinematics_PlanarCurvePairRange.hxx b/src/StepKinematics/StepKinematics_PlanarCurvePairRange.hxx index fd7b526634..553c69507d 100644 --- a/src/StepKinematics/StepKinematics_PlanarCurvePairRange.hxx +++ b/src/StepKinematics/StepKinematics_PlanarCurvePairRange.hxx @@ -18,12 +18,10 @@ #define _StepKinematics_PlanarCurvePairRange_HeaderFile_ #include -#include #include #include #include -#include #include #include #include diff --git a/src/StepKinematics/StepKinematics_PlanarPair.hxx b/src/StepKinematics/StepKinematics_PlanarPair.hxx index f419fca67e..1f800ead85 100644 --- a/src/StepKinematics/StepKinematics_PlanarPair.hxx +++ b/src/StepKinematics/StepKinematics_PlanarPair.hxx @@ -18,13 +18,9 @@ #define _StepKinematics_PlanarPair_HeaderFile_ #include -#include #include #include -#include -#include -#include DEFINE_STANDARD_HANDLE(StepKinematics_PlanarPair, StepKinematics_LowOrderKinematicPair) diff --git a/src/StepKinematics/StepKinematics_PlanarPairValue.hxx b/src/StepKinematics/StepKinematics_PlanarPairValue.hxx index 87c682a769..a6a2560d0a 100644 --- a/src/StepKinematics/StepKinematics_PlanarPairValue.hxx +++ b/src/StepKinematics/StepKinematics_PlanarPairValue.hxx @@ -18,7 +18,6 @@ #define _StepKinematics_PlanarPairValue_HeaderFile_ #include -#include #include #include diff --git a/src/StepKinematics/StepKinematics_PlanarPairWithRange.hxx b/src/StepKinematics/StepKinematics_PlanarPairWithRange.hxx index c7e9e9e0c7..3ccff45350 100644 --- a/src/StepKinematics/StepKinematics_PlanarPairWithRange.hxx +++ b/src/StepKinematics/StepKinematics_PlanarPairWithRange.hxx @@ -18,12 +18,10 @@ #define _StepKinematics_PlanarPairWithRange_HeaderFile_ #include -#include #include #include #include -#include #include DEFINE_STANDARD_HANDLE(StepKinematics_PlanarPairWithRange, StepKinematics_PlanarPair) diff --git a/src/StepKinematics/StepKinematics_PointOnPlanarCurvePair.hxx b/src/StepKinematics/StepKinematics_PointOnPlanarCurvePair.hxx index c01368abf2..8fee9cdf32 100644 --- a/src/StepKinematics/StepKinematics_PointOnPlanarCurvePair.hxx +++ b/src/StepKinematics/StepKinematics_PointOnPlanarCurvePair.hxx @@ -18,12 +18,10 @@ #define _StepKinematics_PointOnPlanarCurvePair_HeaderFile_ #include -#include #include #include #include -#include #include #include diff --git a/src/StepKinematics/StepKinematics_PointOnPlanarCurvePairValue.hxx b/src/StepKinematics/StepKinematics_PointOnPlanarCurvePairValue.hxx index 264620b623..ad1d772f8c 100644 --- a/src/StepKinematics/StepKinematics_PointOnPlanarCurvePairValue.hxx +++ b/src/StepKinematics/StepKinematics_PointOnPlanarCurvePairValue.hxx @@ -18,7 +18,6 @@ #define _StepKinematics_PointOnPlanarCurvePairValue_HeaderFile_ #include -#include #include #include diff --git a/src/StepKinematics/StepKinematics_PointOnPlanarCurvePairWithRange.hxx b/src/StepKinematics/StepKinematics_PointOnPlanarCurvePairWithRange.hxx index 0289cfe040..c49ef2fe3c 100644 --- a/src/StepKinematics/StepKinematics_PointOnPlanarCurvePairWithRange.hxx +++ b/src/StepKinematics/StepKinematics_PointOnPlanarCurvePairWithRange.hxx @@ -18,12 +18,10 @@ #define _StepKinematics_PointOnPlanarCurvePairWithRange_HeaderFile_ #include -#include #include #include #include -#include #include #include #include diff --git a/src/StepKinematics/StepKinematics_PointOnSurfacePair.hxx b/src/StepKinematics/StepKinematics_PointOnSurfacePair.hxx index b54396e3c8..181a332483 100644 --- a/src/StepKinematics/StepKinematics_PointOnSurfacePair.hxx +++ b/src/StepKinematics/StepKinematics_PointOnSurfacePair.hxx @@ -18,12 +18,10 @@ #define _StepKinematics_PointOnSurfacePair_HeaderFile_ #include -#include #include #include #include -#include #include #include diff --git a/src/StepKinematics/StepKinematics_PointOnSurfacePairValue.hxx b/src/StepKinematics/StepKinematics_PointOnSurfacePairValue.hxx index 68a3396e1c..2d1142d828 100644 --- a/src/StepKinematics/StepKinematics_PointOnSurfacePairValue.hxx +++ b/src/StepKinematics/StepKinematics_PointOnSurfacePairValue.hxx @@ -18,7 +18,6 @@ #define _StepKinematics_PointOnSurfacePairValue_HeaderFile_ #include -#include #include #include diff --git a/src/StepKinematics/StepKinematics_PointOnSurfacePairWithRange.hxx b/src/StepKinematics/StepKinematics_PointOnSurfacePairWithRange.hxx index 390f0ba9f4..bc10b25124 100644 --- a/src/StepKinematics/StepKinematics_PointOnSurfacePairWithRange.hxx +++ b/src/StepKinematics/StepKinematics_PointOnSurfacePairWithRange.hxx @@ -18,12 +18,10 @@ #define _StepKinematics_PointOnSurfacePairWithRange_HeaderFile_ #include -#include #include #include #include -#include #include #include #include diff --git a/src/StepKinematics/StepKinematics_PrismaticPair.hxx b/src/StepKinematics/StepKinematics_PrismaticPair.hxx index 5fd51446f3..242eb79838 100644 --- a/src/StepKinematics/StepKinematics_PrismaticPair.hxx +++ b/src/StepKinematics/StepKinematics_PrismaticPair.hxx @@ -18,13 +18,9 @@ #define _StepKinematics_PrismaticPair_HeaderFile_ #include -#include #include #include -#include -#include -#include DEFINE_STANDARD_HANDLE(StepKinematics_PrismaticPair, StepKinematics_LowOrderKinematicPair) diff --git a/src/StepKinematics/StepKinematics_PrismaticPairValue.hxx b/src/StepKinematics/StepKinematics_PrismaticPairValue.hxx index 758288a6ad..dd11337e9a 100644 --- a/src/StepKinematics/StepKinematics_PrismaticPairValue.hxx +++ b/src/StepKinematics/StepKinematics_PrismaticPairValue.hxx @@ -18,7 +18,6 @@ #define _StepKinematics_PrismaticPairValue_HeaderFile_ #include -#include #include #include diff --git a/src/StepKinematics/StepKinematics_PrismaticPairWithRange.hxx b/src/StepKinematics/StepKinematics_PrismaticPairWithRange.hxx index 11bb017f28..009df4743e 100644 --- a/src/StepKinematics/StepKinematics_PrismaticPairWithRange.hxx +++ b/src/StepKinematics/StepKinematics_PrismaticPairWithRange.hxx @@ -18,12 +18,10 @@ #define _StepKinematics_PrismaticPairWithRange_HeaderFile_ #include -#include #include #include #include -#include #include DEFINE_STANDARD_HANDLE(StepKinematics_PrismaticPairWithRange, StepKinematics_PrismaticPair) diff --git a/src/StepKinematics/StepKinematics_ProductDefinitionKinematics.hxx b/src/StepKinematics/StepKinematics_ProductDefinitionKinematics.hxx index ed1078166f..a1bad39daa 100644 --- a/src/StepKinematics/StepKinematics_ProductDefinitionKinematics.hxx +++ b/src/StepKinematics/StepKinematics_ProductDefinitionKinematics.hxx @@ -18,7 +18,6 @@ #define _StepKinematics_ProductDefinitionKinematics_HeaderFile_ #include -#include #include #include diff --git a/src/StepKinematics/StepKinematics_ProductDefinitionRelationshipKinematics.hxx b/src/StepKinematics/StepKinematics_ProductDefinitionRelationshipKinematics.hxx index 1c4717e54c..b2660a9207 100644 --- a/src/StepKinematics/StepKinematics_ProductDefinitionRelationshipKinematics.hxx +++ b/src/StepKinematics/StepKinematics_ProductDefinitionRelationshipKinematics.hxx @@ -18,7 +18,6 @@ #define _StepKinematics_ProductDefinitionRelationshipKinematics_HeaderFile_ #include -#include #include #include diff --git a/src/StepKinematics/StepKinematics_RackAndPinionPair.hxx b/src/StepKinematics/StepKinematics_RackAndPinionPair.hxx index 35e0996685..02169f79e6 100644 --- a/src/StepKinematics/StepKinematics_RackAndPinionPair.hxx +++ b/src/StepKinematics/StepKinematics_RackAndPinionPair.hxx @@ -18,12 +18,10 @@ #define _StepKinematics_RackAndPinionPair_HeaderFile_ #include -#include #include #include #include -#include #include DEFINE_STANDARD_HANDLE(StepKinematics_RackAndPinionPair, StepKinematics_LowOrderKinematicPairWithMotionCoupling) diff --git a/src/StepKinematics/StepKinematics_RackAndPinionPairValue.hxx b/src/StepKinematics/StepKinematics_RackAndPinionPairValue.hxx index 695caceb5b..cd927db9eb 100644 --- a/src/StepKinematics/StepKinematics_RackAndPinionPairValue.hxx +++ b/src/StepKinematics/StepKinematics_RackAndPinionPairValue.hxx @@ -18,7 +18,6 @@ #define _StepKinematics_RackAndPinionPairValue_HeaderFile_ #include -#include #include #include diff --git a/src/StepKinematics/StepKinematics_RackAndPinionPairWithRange.hxx b/src/StepKinematics/StepKinematics_RackAndPinionPairWithRange.hxx index 356a0ff038..1ce7e12392 100644 --- a/src/StepKinematics/StepKinematics_RackAndPinionPairWithRange.hxx +++ b/src/StepKinematics/StepKinematics_RackAndPinionPairWithRange.hxx @@ -18,12 +18,10 @@ #define _StepKinematics_RackAndPinionPairWithRange_HeaderFile_ #include -#include #include #include #include -#include #include DEFINE_STANDARD_HANDLE(StepKinematics_RackAndPinionPairWithRange, StepKinematics_RackAndPinionPair) diff --git a/src/StepKinematics/StepKinematics_RevolutePair.hxx b/src/StepKinematics/StepKinematics_RevolutePair.hxx index 58da2eecbb..e7803f0559 100644 --- a/src/StepKinematics/StepKinematics_RevolutePair.hxx +++ b/src/StepKinematics/StepKinematics_RevolutePair.hxx @@ -18,13 +18,9 @@ #define _StepKinematics_RevolutePair_HeaderFile_ #include -#include #include #include -#include -#include -#include DEFINE_STANDARD_HANDLE(StepKinematics_RevolutePair, StepKinematics_LowOrderKinematicPair) diff --git a/src/StepKinematics/StepKinematics_RevolutePairValue.hxx b/src/StepKinematics/StepKinematics_RevolutePairValue.hxx index eb261a1b96..17374c4628 100644 --- a/src/StepKinematics/StepKinematics_RevolutePairValue.hxx +++ b/src/StepKinematics/StepKinematics_RevolutePairValue.hxx @@ -18,7 +18,6 @@ #define _StepKinematics_RevolutePairValue_HeaderFile_ #include -#include #include #include diff --git a/src/StepKinematics/StepKinematics_RevolutePairWithRange.hxx b/src/StepKinematics/StepKinematics_RevolutePairWithRange.hxx index 93a25592ab..98851137bc 100644 --- a/src/StepKinematics/StepKinematics_RevolutePairWithRange.hxx +++ b/src/StepKinematics/StepKinematics_RevolutePairWithRange.hxx @@ -18,12 +18,10 @@ #define _StepKinematics_RevolutePairWithRange_HeaderFile_ #include -#include #include #include #include -#include #include DEFINE_STANDARD_HANDLE(StepKinematics_RevolutePairWithRange, StepKinematics_RevolutePair) diff --git a/src/StepKinematics/StepKinematics_RigidLinkRepresentation.hxx b/src/StepKinematics/StepKinematics_RigidLinkRepresentation.hxx index abae00ea4e..1ef41a58f8 100644 --- a/src/StepKinematics/StepKinematics_RigidLinkRepresentation.hxx +++ b/src/StepKinematics/StepKinematics_RigidLinkRepresentation.hxx @@ -18,13 +18,10 @@ #define _StepKinematics_RigidLinkRepresentation_HeaderFile_ #include -#include #include #include #include -#include -#include DEFINE_STANDARD_HANDLE(StepKinematics_RigidLinkRepresentation, StepKinematics_KinematicLinkRepresentation) diff --git a/src/StepKinematics/StepKinematics_RollingCurvePair.hxx b/src/StepKinematics/StepKinematics_RollingCurvePair.hxx index e839cfe602..62b6df5b92 100644 --- a/src/StepKinematics/StepKinematics_RollingCurvePair.hxx +++ b/src/StepKinematics/StepKinematics_RollingCurvePair.hxx @@ -18,13 +18,9 @@ #define _StepKinematics_RollingCurvePair_HeaderFile_ #include -#include #include #include -#include -#include -#include #include DEFINE_STANDARD_HANDLE(StepKinematics_RollingCurvePair, StepKinematics_PlanarCurvePair) diff --git a/src/StepKinematics/StepKinematics_RollingCurvePairValue.hxx b/src/StepKinematics/StepKinematics_RollingCurvePairValue.hxx index c00671da3b..e8538a9046 100644 --- a/src/StepKinematics/StepKinematics_RollingCurvePairValue.hxx +++ b/src/StepKinematics/StepKinematics_RollingCurvePairValue.hxx @@ -18,7 +18,6 @@ #define _StepKinematics_RollingCurvePairValue_HeaderFile_ #include -#include #include #include diff --git a/src/StepKinematics/StepKinematics_RollingSurfacePair.hxx b/src/StepKinematics/StepKinematics_RollingSurfacePair.hxx index 6a389c7ff1..ef227d854c 100644 --- a/src/StepKinematics/StepKinematics_RollingSurfacePair.hxx +++ b/src/StepKinematics/StepKinematics_RollingSurfacePair.hxx @@ -18,14 +18,9 @@ #define _StepKinematics_RollingSurfacePair_HeaderFile_ #include -#include #include #include -#include -#include -#include -#include DEFINE_STANDARD_HANDLE(StepKinematics_RollingSurfacePair, StepKinematics_SurfacePair) diff --git a/src/StepKinematics/StepKinematics_RollingSurfacePairValue.hxx b/src/StepKinematics/StepKinematics_RollingSurfacePairValue.hxx index ab7ef66bc4..eb0b59ef91 100644 --- a/src/StepKinematics/StepKinematics_RollingSurfacePairValue.hxx +++ b/src/StepKinematics/StepKinematics_RollingSurfacePairValue.hxx @@ -18,7 +18,6 @@ #define _StepKinematics_RollingSurfacePairValue_HeaderFile_ #include -#include #include #include diff --git a/src/StepKinematics/StepKinematics_RotationAboutDirection.hxx b/src/StepKinematics/StepKinematics_RotationAboutDirection.hxx index 54e82408fd..409ff71268 100644 --- a/src/StepKinematics/StepKinematics_RotationAboutDirection.hxx +++ b/src/StepKinematics/StepKinematics_RotationAboutDirection.hxx @@ -18,8 +18,6 @@ #define _StepKinematics_RotationAboutDirection_HeaderFile_ #include -#include -#include #include #include diff --git a/src/StepKinematics/StepKinematics_ScrewPair.hxx b/src/StepKinematics/StepKinematics_ScrewPair.hxx index ddc6be1e9c..618c553ee7 100644 --- a/src/StepKinematics/StepKinematics_ScrewPair.hxx +++ b/src/StepKinematics/StepKinematics_ScrewPair.hxx @@ -18,12 +18,10 @@ #define _StepKinematics_ScrewPair_HeaderFile_ #include -#include #include #include #include -#include #include DEFINE_STANDARD_HANDLE(StepKinematics_ScrewPair, StepKinematics_LowOrderKinematicPairWithMotionCoupling) diff --git a/src/StepKinematics/StepKinematics_ScrewPairValue.hxx b/src/StepKinematics/StepKinematics_ScrewPairValue.hxx index eb90500321..7ca723db15 100644 --- a/src/StepKinematics/StepKinematics_ScrewPairValue.hxx +++ b/src/StepKinematics/StepKinematics_ScrewPairValue.hxx @@ -18,7 +18,6 @@ #define _StepKinematics_ScrewPairValue_HeaderFile_ #include -#include #include #include diff --git a/src/StepKinematics/StepKinematics_ScrewPairWithRange.hxx b/src/StepKinematics/StepKinematics_ScrewPairWithRange.hxx index da227fa427..0dafd7c0f2 100644 --- a/src/StepKinematics/StepKinematics_ScrewPairWithRange.hxx +++ b/src/StepKinematics/StepKinematics_ScrewPairWithRange.hxx @@ -18,12 +18,10 @@ #define _StepKinematics_ScrewPairWithRange_HeaderFile_ #include -#include #include #include #include -#include #include DEFINE_STANDARD_HANDLE(StepKinematics_ScrewPairWithRange, StepKinematics_ScrewPair) diff --git a/src/StepKinematics/StepKinematics_SlidingCurvePair.hxx b/src/StepKinematics/StepKinematics_SlidingCurvePair.hxx index 93d6112e01..19d8336f47 100644 --- a/src/StepKinematics/StepKinematics_SlidingCurvePair.hxx +++ b/src/StepKinematics/StepKinematics_SlidingCurvePair.hxx @@ -18,13 +18,9 @@ #define _StepKinematics_SlidingCurvePair_HeaderFile_ #include -#include #include #include -#include -#include -#include #include DEFINE_STANDARD_HANDLE(StepKinematics_SlidingCurvePair, StepKinematics_PlanarCurvePair) diff --git a/src/StepKinematics/StepKinematics_SlidingCurvePairValue.hxx b/src/StepKinematics/StepKinematics_SlidingCurvePairValue.hxx index 1ef135609f..f598607fdc 100644 --- a/src/StepKinematics/StepKinematics_SlidingCurvePairValue.hxx +++ b/src/StepKinematics/StepKinematics_SlidingCurvePairValue.hxx @@ -18,7 +18,6 @@ #define _StepKinematics_SlidingCurvePairValue_HeaderFile_ #include -#include #include #include diff --git a/src/StepKinematics/StepKinematics_SlidingSurfacePair.hxx b/src/StepKinematics/StepKinematics_SlidingSurfacePair.hxx index 4130201aa5..802c4c5776 100644 --- a/src/StepKinematics/StepKinematics_SlidingSurfacePair.hxx +++ b/src/StepKinematics/StepKinematics_SlidingSurfacePair.hxx @@ -18,14 +18,9 @@ #define _StepKinematics_SlidingSurfacePair_HeaderFile_ #include -#include #include #include -#include -#include -#include -#include DEFINE_STANDARD_HANDLE(StepKinematics_SlidingSurfacePair, StepKinematics_SurfacePair) diff --git a/src/StepKinematics/StepKinematics_SlidingSurfacePairValue.hxx b/src/StepKinematics/StepKinematics_SlidingSurfacePairValue.hxx index 9c54281e33..c1cef284f2 100644 --- a/src/StepKinematics/StepKinematics_SlidingSurfacePairValue.hxx +++ b/src/StepKinematics/StepKinematics_SlidingSurfacePairValue.hxx @@ -18,7 +18,6 @@ #define _StepKinematics_SlidingSurfacePairValue_HeaderFile_ #include -#include #include #include diff --git a/src/StepKinematics/StepKinematics_SphericalPair.hxx b/src/StepKinematics/StepKinematics_SphericalPair.hxx index 37fa34d3a6..904005f022 100644 --- a/src/StepKinematics/StepKinematics_SphericalPair.hxx +++ b/src/StepKinematics/StepKinematics_SphericalPair.hxx @@ -18,13 +18,9 @@ #define _StepKinematics_SphericalPair_HeaderFile_ #include -#include #include #include -#include -#include -#include DEFINE_STANDARD_HANDLE(StepKinematics_SphericalPair, StepKinematics_LowOrderKinematicPair) diff --git a/src/StepKinematics/StepKinematics_SphericalPairValue.hxx b/src/StepKinematics/StepKinematics_SphericalPairValue.hxx index 4ebd832385..346266b3ee 100644 --- a/src/StepKinematics/StepKinematics_SphericalPairValue.hxx +++ b/src/StepKinematics/StepKinematics_SphericalPairValue.hxx @@ -18,7 +18,6 @@ #define _StepKinematics_SphericalPairValue_HeaderFile_ #include -#include #include #include diff --git a/src/StepKinematics/StepKinematics_SphericalPairWithPin.hxx b/src/StepKinematics/StepKinematics_SphericalPairWithPin.hxx index f41db13212..79492c836c 100644 --- a/src/StepKinematics/StepKinematics_SphericalPairWithPin.hxx +++ b/src/StepKinematics/StepKinematics_SphericalPairWithPin.hxx @@ -18,13 +18,9 @@ #define _StepKinematics_SphericalPairWithPin_HeaderFile_ #include -#include #include #include -#include -#include -#include DEFINE_STANDARD_HANDLE(StepKinematics_SphericalPairWithPin, StepKinematics_LowOrderKinematicPair) diff --git a/src/StepKinematics/StepKinematics_SphericalPairWithPinAndRange.hxx b/src/StepKinematics/StepKinematics_SphericalPairWithPinAndRange.hxx index c10e089291..c8e9aa89bc 100644 --- a/src/StepKinematics/StepKinematics_SphericalPairWithPinAndRange.hxx +++ b/src/StepKinematics/StepKinematics_SphericalPairWithPinAndRange.hxx @@ -18,12 +18,10 @@ #define _StepKinematics_SphericalPairWithPinAndRange_HeaderFile_ #include -#include #include #include #include -#include #include DEFINE_STANDARD_HANDLE(StepKinematics_SphericalPairWithPinAndRange, StepKinematics_SphericalPairWithPin) diff --git a/src/StepKinematics/StepKinematics_SphericalPairWithRange.hxx b/src/StepKinematics/StepKinematics_SphericalPairWithRange.hxx index 9e771f913a..43cf7c6bd6 100644 --- a/src/StepKinematics/StepKinematics_SphericalPairWithRange.hxx +++ b/src/StepKinematics/StepKinematics_SphericalPairWithRange.hxx @@ -18,12 +18,10 @@ #define _StepKinematics_SphericalPairWithRange_HeaderFile_ #include -#include #include #include #include -#include #include DEFINE_STANDARD_HANDLE(StepKinematics_SphericalPairWithRange, StepKinematics_SphericalPair) diff --git a/src/StepKinematics/StepKinematics_SurfacePair.hxx b/src/StepKinematics/StepKinematics_SurfacePair.hxx index 54b19045ef..d0164f3653 100644 --- a/src/StepKinematics/StepKinematics_SurfacePair.hxx +++ b/src/StepKinematics/StepKinematics_SurfacePair.hxx @@ -18,12 +18,10 @@ #define _StepKinematics_SurfacePair_HeaderFile_ #include -#include #include #include #include -#include #include #include diff --git a/src/StepKinematics/StepKinematics_SurfacePairWithRange.hxx b/src/StepKinematics/StepKinematics_SurfacePairWithRange.hxx index 3c75f3f903..e948ad48f4 100644 --- a/src/StepKinematics/StepKinematics_SurfacePairWithRange.hxx +++ b/src/StepKinematics/StepKinematics_SurfacePairWithRange.hxx @@ -18,12 +18,10 @@ #define _StepKinematics_SurfacePairWithRange_HeaderFile_ #include -#include #include #include #include -#include #include #include #include diff --git a/src/StepKinematics/StepKinematics_UnconstrainedPair.hxx b/src/StepKinematics/StepKinematics_UnconstrainedPair.hxx index f3b4f81904..a7facba3e1 100644 --- a/src/StepKinematics/StepKinematics_UnconstrainedPair.hxx +++ b/src/StepKinematics/StepKinematics_UnconstrainedPair.hxx @@ -18,13 +18,9 @@ #define _StepKinematics_UnconstrainedPair_HeaderFile_ #include -#include #include #include -#include -#include -#include DEFINE_STANDARD_HANDLE(StepKinematics_UnconstrainedPair, StepKinematics_LowOrderKinematicPair) diff --git a/src/StepKinematics/StepKinematics_UnconstrainedPairValue.hxx b/src/StepKinematics/StepKinematics_UnconstrainedPairValue.hxx index 359785270b..be9b93a481 100644 --- a/src/StepKinematics/StepKinematics_UnconstrainedPairValue.hxx +++ b/src/StepKinematics/StepKinematics_UnconstrainedPairValue.hxx @@ -18,7 +18,6 @@ #define _StepKinematics_UnconstrainedPairValue_HeaderFile_ #include -#include #include #include diff --git a/src/StepKinematics/StepKinematics_UniversalPair.hxx b/src/StepKinematics/StepKinematics_UniversalPair.hxx index af35c66061..becf5ae6ec 100644 --- a/src/StepKinematics/StepKinematics_UniversalPair.hxx +++ b/src/StepKinematics/StepKinematics_UniversalPair.hxx @@ -18,12 +18,10 @@ #define _StepKinematics_UniversalPair_HeaderFile_ #include -#include #include #include #include -#include #include DEFINE_STANDARD_HANDLE(StepKinematics_UniversalPair, StepKinematics_LowOrderKinematicPair) diff --git a/src/StepKinematics/StepKinematics_UniversalPairValue.hxx b/src/StepKinematics/StepKinematics_UniversalPairValue.hxx index e132930be7..a26ece433e 100644 --- a/src/StepKinematics/StepKinematics_UniversalPairValue.hxx +++ b/src/StepKinematics/StepKinematics_UniversalPairValue.hxx @@ -18,7 +18,6 @@ #define _StepKinematics_UniversalPairValue_HeaderFile_ #include -#include #include #include diff --git a/src/StepKinematics/StepKinematics_UniversalPairWithRange.hxx b/src/StepKinematics/StepKinematics_UniversalPairWithRange.hxx index 3aa2ee8c1a..7aedf8118a 100644 --- a/src/StepKinematics/StepKinematics_UniversalPairWithRange.hxx +++ b/src/StepKinematics/StepKinematics_UniversalPairWithRange.hxx @@ -18,12 +18,10 @@ #define _StepKinematics_UniversalPairWithRange_HeaderFile_ #include -#include #include #include #include -#include #include DEFINE_STANDARD_HANDLE(StepKinematics_UniversalPairWithRange, StepKinematics_UniversalPair) diff --git a/src/StepRepr/StepRepr_AssemblyComponentUsage.cxx b/src/StepRepr/StepRepr_AssemblyComponentUsage.cxx index 8a2318c511..374815fadd 100644 --- a/src/StepRepr/StepRepr_AssemblyComponentUsage.cxx +++ b/src/StepRepr/StepRepr_AssemblyComponentUsage.cxx @@ -15,7 +15,6 @@ // Generator: ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V1.1 -#include #include #include #include diff --git a/src/StepRepr/StepRepr_AssemblyComponentUsage.hxx b/src/StepRepr/StepRepr_AssemblyComponentUsage.hxx index 197068efb6..af1d8a023b 100644 --- a/src/StepRepr/StepRepr_AssemblyComponentUsage.hxx +++ b/src/StepRepr/StepRepr_AssemblyComponentUsage.hxx @@ -19,7 +19,6 @@ #include #include -#include #include class TCollection_HAsciiString; class StepBasic_ProductDefinition; diff --git a/src/StepRepr/StepRepr_AssemblyComponentUsageSubstitute.cxx b/src/StepRepr/StepRepr_AssemblyComponentUsageSubstitute.cxx index 6a26b21eff..a96fe319c1 100644 --- a/src/StepRepr/StepRepr_AssemblyComponentUsageSubstitute.cxx +++ b/src/StepRepr/StepRepr_AssemblyComponentUsageSubstitute.cxx @@ -12,7 +12,6 @@ // commercial license or contractual agreement. -#include #include #include #include diff --git a/src/StepRepr/StepRepr_CharacterizedRepresentation.cxx b/src/StepRepr/StepRepr_CharacterizedRepresentation.cxx index 999edc4872..12450e3518 100644 --- a/src/StepRepr/StepRepr_CharacterizedRepresentation.cxx +++ b/src/StepRepr/StepRepr_CharacterizedRepresentation.cxx @@ -14,10 +14,8 @@ // commercial license or contractual agreement. -#include #include #include -#include #include IMPLEMENT_STANDARD_RTTIEXT(StepRepr_CharacterizedRepresentation, StepRepr_Representation) diff --git a/src/StepRepr/StepRepr_CompoundRepresentationItem.cxx b/src/StepRepr/StepRepr_CompoundRepresentationItem.cxx index 638bbfc657..72ae66c3b2 100644 --- a/src/StepRepr/StepRepr_CompoundRepresentationItem.cxx +++ b/src/StepRepr/StepRepr_CompoundRepresentationItem.cxx @@ -12,7 +12,6 @@ // commercial license or contractual agreement. -#include #include #include #include diff --git a/src/StepRepr/StepRepr_ConfigurationDesign.cxx b/src/StepRepr/StepRepr_ConfigurationDesign.cxx index c377cc9fc4..8d43ffea04 100644 --- a/src/StepRepr/StepRepr_ConfigurationDesign.cxx +++ b/src/StepRepr/StepRepr_ConfigurationDesign.cxx @@ -16,7 +16,6 @@ // Generator: ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V1.0 -#include #include #include #include diff --git a/src/StepRepr/StepRepr_ConfigurationDesign.hxx b/src/StepRepr/StepRepr_ConfigurationDesign.hxx index d760b1c613..e957daccdb 100644 --- a/src/StepRepr/StepRepr_ConfigurationDesign.hxx +++ b/src/StepRepr/StepRepr_ConfigurationDesign.hxx @@ -18,7 +18,6 @@ #define _StepRepr_ConfigurationDesign_HeaderFile #include -#include #include #include diff --git a/src/StepRepr/StepRepr_ConfigurationEffectivity.cxx b/src/StepRepr/StepRepr_ConfigurationEffectivity.cxx index 5d8cef5b6b..c5733e5a01 100644 --- a/src/StepRepr/StepRepr_ConfigurationEffectivity.cxx +++ b/src/StepRepr/StepRepr_ConfigurationEffectivity.cxx @@ -16,7 +16,6 @@ // Generator: ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V1.0 -#include #include #include #include diff --git a/src/StepRepr/StepRepr_ConfigurationItem.cxx b/src/StepRepr/StepRepr_ConfigurationItem.cxx index 0d84c938d0..22599123ac 100644 --- a/src/StepRepr/StepRepr_ConfigurationItem.cxx +++ b/src/StepRepr/StepRepr_ConfigurationItem.cxx @@ -16,7 +16,6 @@ // Generator: ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V1.0 -#include #include #include #include diff --git a/src/StepRepr/StepRepr_DataEnvironment.cxx b/src/StepRepr/StepRepr_DataEnvironment.cxx index e4f4fa3260..c7c9ac4d89 100644 --- a/src/StepRepr/StepRepr_DataEnvironment.cxx +++ b/src/StepRepr/StepRepr_DataEnvironment.cxx @@ -15,7 +15,6 @@ // Generator: ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V1.2 -#include #include #include diff --git a/src/StepRepr/StepRepr_DataEnvironment.hxx b/src/StepRepr/StepRepr_DataEnvironment.hxx index 323ae8d918..f5086c2bf5 100644 --- a/src/StepRepr/StepRepr_DataEnvironment.hxx +++ b/src/StepRepr/StepRepr_DataEnvironment.hxx @@ -17,7 +17,6 @@ #define _StepRepr_DataEnvironment_HeaderFile #include -#include #include #include diff --git a/src/StepRepr/StepRepr_DescriptiveRepresentationItem.cxx b/src/StepRepr/StepRepr_DescriptiveRepresentationItem.cxx index 07723241c7..ab42098351 100644 --- a/src/StepRepr/StepRepr_DescriptiveRepresentationItem.cxx +++ b/src/StepRepr/StepRepr_DescriptiveRepresentationItem.cxx @@ -12,7 +12,6 @@ // commercial license or contractual agreement. -#include #include #include diff --git a/src/StepRepr/StepRepr_FunctionallyDefinedTransformation.cxx b/src/StepRepr/StepRepr_FunctionallyDefinedTransformation.cxx index efc37f4743..90c53c8aa3 100644 --- a/src/StepRepr/StepRepr_FunctionallyDefinedTransformation.cxx +++ b/src/StepRepr/StepRepr_FunctionallyDefinedTransformation.cxx @@ -12,7 +12,6 @@ // commercial license or contractual agreement. -#include #include #include diff --git a/src/StepRepr/StepRepr_GlobalUncertaintyAssignedContext.cxx b/src/StepRepr/StepRepr_GlobalUncertaintyAssignedContext.cxx index 6cb88d4464..e168041684 100644 --- a/src/StepRepr/StepRepr_GlobalUncertaintyAssignedContext.cxx +++ b/src/StepRepr/StepRepr_GlobalUncertaintyAssignedContext.cxx @@ -12,8 +12,6 @@ // commercial license or contractual agreement. -#include -#include #include #include diff --git a/src/StepRepr/StepRepr_GlobalUncertaintyAssignedContext.hxx b/src/StepRepr/StepRepr_GlobalUncertaintyAssignedContext.hxx index e489d0cf8b..222fa928d5 100644 --- a/src/StepRepr/StepRepr_GlobalUncertaintyAssignedContext.hxx +++ b/src/StepRepr/StepRepr_GlobalUncertaintyAssignedContext.hxx @@ -18,7 +18,6 @@ #define _StepRepr_GlobalUncertaintyAssignedContext_HeaderFile #include -#include #include #include diff --git a/src/StepRepr/StepRepr_GlobalUnitAssignedContext.cxx b/src/StepRepr/StepRepr_GlobalUnitAssignedContext.cxx index 8f3eade118..56d5b9c0d3 100644 --- a/src/StepRepr/StepRepr_GlobalUnitAssignedContext.cxx +++ b/src/StepRepr/StepRepr_GlobalUnitAssignedContext.cxx @@ -12,8 +12,6 @@ // commercial license or contractual agreement. -#include -#include #include #include diff --git a/src/StepRepr/StepRepr_HArray1OfMaterialPropertyRepresentation.hxx b/src/StepRepr/StepRepr_HArray1OfMaterialPropertyRepresentation.hxx index 3d1a8e5fbe..31d563fb44 100644 --- a/src/StepRepr/StepRepr_HArray1OfMaterialPropertyRepresentation.hxx +++ b/src/StepRepr/StepRepr_HArray1OfMaterialPropertyRepresentation.hxx @@ -17,7 +17,6 @@ #ifndef StepRepr_HArray1OfMaterialPropertyRepresentation_HeaderFile #define StepRepr_HArray1OfMaterialPropertyRepresentation_HeaderFile -#include #include #include diff --git a/src/StepRepr/StepRepr_HArray1OfPropertyDefinitionRepresentation.hxx b/src/StepRepr/StepRepr_HArray1OfPropertyDefinitionRepresentation.hxx index f0e9f30f98..b2fbf69e8f 100644 --- a/src/StepRepr/StepRepr_HArray1OfPropertyDefinitionRepresentation.hxx +++ b/src/StepRepr/StepRepr_HArray1OfPropertyDefinitionRepresentation.hxx @@ -17,7 +17,6 @@ #ifndef StepRepr_HArray1OfPropertyDefinitionRepresentation_HeaderFile #define StepRepr_HArray1OfPropertyDefinitionRepresentation_HeaderFile -#include #include #include diff --git a/src/StepRepr/StepRepr_HArray1OfRepresentationItem.hxx b/src/StepRepr/StepRepr_HArray1OfRepresentationItem.hxx index edbba14de0..aea9707a50 100644 --- a/src/StepRepr/StepRepr_HArray1OfRepresentationItem.hxx +++ b/src/StepRepr/StepRepr_HArray1OfRepresentationItem.hxx @@ -17,7 +17,6 @@ #ifndef StepRepr_HArray1OfRepresentationItem_HeaderFile #define StepRepr_HArray1OfRepresentationItem_HeaderFile -#include #include #include diff --git a/src/StepRepr/StepRepr_HArray1OfShapeAspect.hxx b/src/StepRepr/StepRepr_HArray1OfShapeAspect.hxx index e1c9541097..3c3ab0d604 100644 --- a/src/StepRepr/StepRepr_HArray1OfShapeAspect.hxx +++ b/src/StepRepr/StepRepr_HArray1OfShapeAspect.hxx @@ -16,7 +16,6 @@ #ifndef _StepRepr_HArray1OfShapeAspect_HeaderFile #define _StepRepr_HArray1OfShapeAspect_HeaderFile -#include #include #include diff --git a/src/StepRepr/StepRepr_IntegerRepresentationItem.cxx b/src/StepRepr/StepRepr_IntegerRepresentationItem.cxx index 67d50f281d..c9619f5024 100644 --- a/src/StepRepr/StepRepr_IntegerRepresentationItem.cxx +++ b/src/StepRepr/StepRepr_IntegerRepresentationItem.cxx @@ -13,7 +13,6 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -#include #include #include diff --git a/src/StepRepr/StepRepr_ItemDefinedTransformation.cxx b/src/StepRepr/StepRepr_ItemDefinedTransformation.cxx index 803e00fe0d..0bf3580bb3 100644 --- a/src/StepRepr/StepRepr_ItemDefinedTransformation.cxx +++ b/src/StepRepr/StepRepr_ItemDefinedTransformation.cxx @@ -12,7 +12,6 @@ // commercial license or contractual agreement. -#include #include #include #include diff --git a/src/StepRepr/StepRepr_MakeFromUsageOption.cxx b/src/StepRepr/StepRepr_MakeFromUsageOption.cxx index 2c8b58cc7a..1a7512ef35 100644 --- a/src/StepRepr/StepRepr_MakeFromUsageOption.cxx +++ b/src/StepRepr/StepRepr_MakeFromUsageOption.cxx @@ -15,7 +15,6 @@ // Generator: ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V1.1 -#include #include #include #include diff --git a/src/StepRepr/StepRepr_MakeFromUsageOption.hxx b/src/StepRepr/StepRepr_MakeFromUsageOption.hxx index 04be16c7e7..fae73e1b2f 100644 --- a/src/StepRepr/StepRepr_MakeFromUsageOption.hxx +++ b/src/StepRepr/StepRepr_MakeFromUsageOption.hxx @@ -21,7 +21,6 @@ #include #include -#include class TCollection_HAsciiString; class StepBasic_MeasureWithUnit; class StepBasic_ProductDefinition; diff --git a/src/StepRepr/StepRepr_MappedItem.cxx b/src/StepRepr/StepRepr_MappedItem.cxx index daa7ada307..84e9905a7c 100644 --- a/src/StepRepr/StepRepr_MappedItem.cxx +++ b/src/StepRepr/StepRepr_MappedItem.cxx @@ -12,7 +12,6 @@ // commercial license or contractual agreement. -#include #include #include #include diff --git a/src/StepRepr/StepRepr_MaterialDesignation.cxx b/src/StepRepr/StepRepr_MaterialDesignation.cxx index 1d0922a931..f56d210965 100644 --- a/src/StepRepr/StepRepr_MaterialDesignation.cxx +++ b/src/StepRepr/StepRepr_MaterialDesignation.cxx @@ -12,8 +12,6 @@ // commercial license or contractual agreement. -#include -#include #include #include diff --git a/src/StepRepr/StepRepr_MaterialDesignation.hxx b/src/StepRepr/StepRepr_MaterialDesignation.hxx index f9d3122006..a00dd80a81 100644 --- a/src/StepRepr/StepRepr_MaterialDesignation.hxx +++ b/src/StepRepr/StepRepr_MaterialDesignation.hxx @@ -18,7 +18,6 @@ #define _StepRepr_MaterialDesignation_HeaderFile #include -#include #include #include diff --git a/src/StepRepr/StepRepr_MaterialProperty.cxx b/src/StepRepr/StepRepr_MaterialProperty.cxx index 397d452647..31d2e68c6d 100644 --- a/src/StepRepr/StepRepr_MaterialProperty.cxx +++ b/src/StepRepr/StepRepr_MaterialProperty.cxx @@ -15,7 +15,6 @@ // Generator: ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V1.2 -#include #include IMPLEMENT_STANDARD_RTTIEXT(StepRepr_MaterialProperty,StepRepr_PropertyDefinition) diff --git a/src/StepRepr/StepRepr_MaterialProperty.hxx b/src/StepRepr/StepRepr_MaterialProperty.hxx index 5724f8cc9b..2c02fa3be1 100644 --- a/src/StepRepr/StepRepr_MaterialProperty.hxx +++ b/src/StepRepr/StepRepr_MaterialProperty.hxx @@ -17,7 +17,6 @@ #define _StepRepr_MaterialProperty_HeaderFile #include -#include #include diff --git a/src/StepRepr/StepRepr_MaterialPropertyRepresentation.cxx b/src/StepRepr/StepRepr_MaterialPropertyRepresentation.cxx index 50f023d170..402ad3df14 100644 --- a/src/StepRepr/StepRepr_MaterialPropertyRepresentation.cxx +++ b/src/StepRepr/StepRepr_MaterialPropertyRepresentation.cxx @@ -15,7 +15,6 @@ // Generator: ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V1.2 -#include #include #include #include diff --git a/src/StepRepr/StepRepr_NextAssemblyUsageOccurrence.cxx b/src/StepRepr/StepRepr_NextAssemblyUsageOccurrence.cxx index 67ea2766d7..1128bc499c 100644 --- a/src/StepRepr/StepRepr_NextAssemblyUsageOccurrence.cxx +++ b/src/StepRepr/StepRepr_NextAssemblyUsageOccurrence.cxx @@ -15,7 +15,6 @@ // Generator: ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V1.1 -#include #include IMPLEMENT_STANDARD_RTTIEXT(StepRepr_NextAssemblyUsageOccurrence,StepRepr_AssemblyComponentUsage) diff --git a/src/StepRepr/StepRepr_NextAssemblyUsageOccurrence.hxx b/src/StepRepr/StepRepr_NextAssemblyUsageOccurrence.hxx index 3f9c29013b..812ce0ac6f 100644 --- a/src/StepRepr/StepRepr_NextAssemblyUsageOccurrence.hxx +++ b/src/StepRepr/StepRepr_NextAssemblyUsageOccurrence.hxx @@ -17,7 +17,6 @@ #define _StepRepr_NextAssemblyUsageOccurrence_HeaderFile #include -#include #include diff --git a/src/StepRepr/StepRepr_ProductConcept.cxx b/src/StepRepr/StepRepr_ProductConcept.cxx index 661ba16453..0848fb0e47 100644 --- a/src/StepRepr/StepRepr_ProductConcept.cxx +++ b/src/StepRepr/StepRepr_ProductConcept.cxx @@ -16,7 +16,6 @@ // Generator: ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V1.0 -#include #include #include #include diff --git a/src/StepRepr/StepRepr_ProductConcept.hxx b/src/StepRepr/StepRepr_ProductConcept.hxx index cc21eee16e..7901c899da 100644 --- a/src/StepRepr/StepRepr_ProductConcept.hxx +++ b/src/StepRepr/StepRepr_ProductConcept.hxx @@ -20,7 +20,6 @@ #include #include -#include #include class TCollection_HAsciiString; class StepBasic_ProductConceptContext; diff --git a/src/StepRepr/StepRepr_ProductDefinitionShape.cxx b/src/StepRepr/StepRepr_ProductDefinitionShape.cxx index d34f919d49..ab80771caa 100644 --- a/src/StepRepr/StepRepr_ProductDefinitionShape.cxx +++ b/src/StepRepr/StepRepr_ProductDefinitionShape.cxx @@ -15,7 +15,6 @@ // Generator: ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V1.1 -#include #include IMPLEMENT_STANDARD_RTTIEXT(StepRepr_ProductDefinitionShape,StepRepr_PropertyDefinition) diff --git a/src/StepRepr/StepRepr_ProductDefinitionShape.hxx b/src/StepRepr/StepRepr_ProductDefinitionShape.hxx index 7bb4b0dc9b..f139a09c3e 100644 --- a/src/StepRepr/StepRepr_ProductDefinitionShape.hxx +++ b/src/StepRepr/StepRepr_ProductDefinitionShape.hxx @@ -17,7 +17,6 @@ #define _StepRepr_ProductDefinitionShape_HeaderFile #include -#include #include diff --git a/src/StepRepr/StepRepr_ProductDefinitionUsage.cxx b/src/StepRepr/StepRepr_ProductDefinitionUsage.cxx index d262a8c10f..511b25c2ad 100644 --- a/src/StepRepr/StepRepr_ProductDefinitionUsage.cxx +++ b/src/StepRepr/StepRepr_ProductDefinitionUsage.cxx @@ -15,7 +15,6 @@ // Generator: ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V1.1 -#include #include IMPLEMENT_STANDARD_RTTIEXT(StepRepr_ProductDefinitionUsage,StepBasic_ProductDefinitionRelationship) diff --git a/src/StepRepr/StepRepr_ProductDefinitionUsage.hxx b/src/StepRepr/StepRepr_ProductDefinitionUsage.hxx index 832ebd4e6d..8698e25462 100644 --- a/src/StepRepr/StepRepr_ProductDefinitionUsage.hxx +++ b/src/StepRepr/StepRepr_ProductDefinitionUsage.hxx @@ -17,7 +17,6 @@ #define _StepRepr_ProductDefinitionUsage_HeaderFile #include -#include #include diff --git a/src/StepRepr/StepRepr_PromissoryUsageOccurrence.cxx b/src/StepRepr/StepRepr_PromissoryUsageOccurrence.cxx index f5ac809c6f..fce459d885 100644 --- a/src/StepRepr/StepRepr_PromissoryUsageOccurrence.cxx +++ b/src/StepRepr/StepRepr_PromissoryUsageOccurrence.cxx @@ -12,7 +12,6 @@ // commercial license or contractual agreement. -#include #include IMPLEMENT_STANDARD_RTTIEXT(StepRepr_PromissoryUsageOccurrence,StepRepr_AssemblyComponentUsage) diff --git a/src/StepRepr/StepRepr_PromissoryUsageOccurrence.hxx b/src/StepRepr/StepRepr_PromissoryUsageOccurrence.hxx index 739871be3c..c750ce803b 100644 --- a/src/StepRepr/StepRepr_PromissoryUsageOccurrence.hxx +++ b/src/StepRepr/StepRepr_PromissoryUsageOccurrence.hxx @@ -18,7 +18,6 @@ #define _StepRepr_PromissoryUsageOccurrence_HeaderFile #include -#include #include diff --git a/src/StepRepr/StepRepr_PropertyDefinition.cxx b/src/StepRepr/StepRepr_PropertyDefinition.cxx index c4ad0b9e50..0064af2275 100644 --- a/src/StepRepr/StepRepr_PropertyDefinition.cxx +++ b/src/StepRepr/StepRepr_PropertyDefinition.cxx @@ -15,8 +15,6 @@ // Generator: ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V1.1 -#include -#include #include #include diff --git a/src/StepRepr/StepRepr_PropertyDefinition.hxx b/src/StepRepr/StepRepr_PropertyDefinition.hxx index 6d8f800b40..93fcf0ffb2 100644 --- a/src/StepRepr/StepRepr_PropertyDefinition.hxx +++ b/src/StepRepr/StepRepr_PropertyDefinition.hxx @@ -17,7 +17,6 @@ #define _StepRepr_PropertyDefinition_HeaderFile #include -#include #include #include diff --git a/src/StepRepr/StepRepr_PropertyDefinitionRelationship.cxx b/src/StepRepr/StepRepr_PropertyDefinitionRelationship.cxx index 193f0ade7d..b996a4218f 100644 --- a/src/StepRepr/StepRepr_PropertyDefinitionRelationship.cxx +++ b/src/StepRepr/StepRepr_PropertyDefinitionRelationship.cxx @@ -15,7 +15,6 @@ // Generator: ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V1.2 -#include #include #include #include diff --git a/src/StepRepr/StepRepr_PropertyDefinitionRepresentation.cxx b/src/StepRepr/StepRepr_PropertyDefinitionRepresentation.cxx index 195582200d..ba2ca6cb38 100644 --- a/src/StepRepr/StepRepr_PropertyDefinitionRepresentation.cxx +++ b/src/StepRepr/StepRepr_PropertyDefinitionRepresentation.cxx @@ -15,7 +15,6 @@ // Generator: ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V1.2 -#include #include #include #include diff --git a/src/StepRepr/StepRepr_PropertyDefinitionRepresentation.hxx b/src/StepRepr/StepRepr_PropertyDefinitionRepresentation.hxx index 8b5f91b827..f68d5ec7d8 100644 --- a/src/StepRepr/StepRepr_PropertyDefinitionRepresentation.hxx +++ b/src/StepRepr/StepRepr_PropertyDefinitionRepresentation.hxx @@ -17,7 +17,6 @@ #define _StepRepr_PropertyDefinitionRepresentation_HeaderFile #include -#include #include #include diff --git a/src/StepRepr/StepRepr_QuantifiedAssemblyComponentUsage.cxx b/src/StepRepr/StepRepr_QuantifiedAssemblyComponentUsage.cxx index 9e760ea96b..e83d74dabe 100644 --- a/src/StepRepr/StepRepr_QuantifiedAssemblyComponentUsage.cxx +++ b/src/StepRepr/StepRepr_QuantifiedAssemblyComponentUsage.cxx @@ -15,7 +15,6 @@ // Generator: ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V1.1 -#include #include #include #include diff --git a/src/StepRepr/StepRepr_QuantifiedAssemblyComponentUsage.hxx b/src/StepRepr/StepRepr_QuantifiedAssemblyComponentUsage.hxx index 7d93d5ea8d..d3772946a3 100644 --- a/src/StepRepr/StepRepr_QuantifiedAssemblyComponentUsage.hxx +++ b/src/StepRepr/StepRepr_QuantifiedAssemblyComponentUsage.hxx @@ -20,7 +20,6 @@ #include #include -#include class StepBasic_MeasureWithUnit; class TCollection_HAsciiString; class StepBasic_ProductDefinition; diff --git a/src/StepRepr/StepRepr_Representation.cxx b/src/StepRepr/StepRepr_Representation.cxx index 170d211da6..36e3803e32 100644 --- a/src/StepRepr/StepRepr_Representation.cxx +++ b/src/StepRepr/StepRepr_Representation.cxx @@ -12,7 +12,6 @@ // commercial license or contractual agreement. -#include #include #include #include diff --git a/src/StepRepr/StepRepr_RepresentationContext.cxx b/src/StepRepr/StepRepr_RepresentationContext.cxx index 49a10a3c49..6cf12eae91 100644 --- a/src/StepRepr/StepRepr_RepresentationContext.cxx +++ b/src/StepRepr/StepRepr_RepresentationContext.cxx @@ -12,7 +12,6 @@ // commercial license or contractual agreement. -#include #include #include diff --git a/src/StepRepr/StepRepr_RepresentationContextReference.hxx b/src/StepRepr/StepRepr_RepresentationContextReference.hxx index 757246542a..ed8e115f69 100644 --- a/src/StepRepr/StepRepr_RepresentationContextReference.hxx +++ b/src/StepRepr/StepRepr_RepresentationContextReference.hxx @@ -18,7 +18,6 @@ #define _StepRepr_RepresentationContextReference_HeaderFile_ #include -#include #include #include diff --git a/src/StepRepr/StepRepr_RepresentationItem.cxx b/src/StepRepr/StepRepr_RepresentationItem.cxx index f9820d1961..515056ae4c 100644 --- a/src/StepRepr/StepRepr_RepresentationItem.cxx +++ b/src/StepRepr/StepRepr_RepresentationItem.cxx @@ -12,7 +12,6 @@ // commercial license or contractual agreement. -#include #include #include diff --git a/src/StepRepr/StepRepr_RepresentationReference.hxx b/src/StepRepr/StepRepr_RepresentationReference.hxx index 24088a235e..f3afa2b00f 100644 --- a/src/StepRepr/StepRepr_RepresentationReference.hxx +++ b/src/StepRepr/StepRepr_RepresentationReference.hxx @@ -18,10 +18,8 @@ #define _StepRepr_RepresentationReference_HeaderFile_ #include -#include #include -#include #include DEFINE_STANDARD_HANDLE(StepRepr_RepresentationReference, Standard_Transient) diff --git a/src/StepRepr/StepRepr_RepresentationRelationship.cxx b/src/StepRepr/StepRepr_RepresentationRelationship.cxx index 18530062d2..06072e4846 100644 --- a/src/StepRepr/StepRepr_RepresentationRelationship.cxx +++ b/src/StepRepr/StepRepr_RepresentationRelationship.cxx @@ -12,7 +12,6 @@ // commercial license or contractual agreement. -#include #include #include #include diff --git a/src/StepRepr/StepRepr_RepresentationRelationshipWithTransformation.cxx b/src/StepRepr/StepRepr_RepresentationRelationshipWithTransformation.cxx index 3561603103..4562745a1f 100644 --- a/src/StepRepr/StepRepr_RepresentationRelationshipWithTransformation.cxx +++ b/src/StepRepr/StepRepr_RepresentationRelationshipWithTransformation.cxx @@ -12,7 +12,6 @@ // commercial license or contractual agreement. -#include #include #include #include diff --git a/src/StepRepr/StepRepr_ShapeAspect.cxx b/src/StepRepr/StepRepr_ShapeAspect.cxx index 275d7883d2..75971cdb55 100644 --- a/src/StepRepr/StepRepr_ShapeAspect.cxx +++ b/src/StepRepr/StepRepr_ShapeAspect.cxx @@ -12,7 +12,6 @@ // commercial license or contractual agreement. -#include #include #include #include diff --git a/src/StepRepr/StepRepr_ShapeAspectRelationship.cxx b/src/StepRepr/StepRepr_ShapeAspectRelationship.cxx index 2c0942fa58..0d5ce23c34 100644 --- a/src/StepRepr/StepRepr_ShapeAspectRelationship.cxx +++ b/src/StepRepr/StepRepr_ShapeAspectRelationship.cxx @@ -15,7 +15,6 @@ // Generator: ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V1.0 -#include #include #include #include diff --git a/src/StepRepr/StepRepr_ShapeAspectRelationship.hxx b/src/StepRepr/StepRepr_ShapeAspectRelationship.hxx index ccd508e010..42208c1468 100644 --- a/src/StepRepr/StepRepr_ShapeAspectRelationship.hxx +++ b/src/StepRepr/StepRepr_ShapeAspectRelationship.hxx @@ -19,7 +19,6 @@ #include #include -#include #include class TCollection_HAsciiString; class StepRepr_ShapeAspect; diff --git a/src/StepRepr/StepRepr_ShapeRepresentationRelationshipWithTransformation.cxx b/src/StepRepr/StepRepr_ShapeRepresentationRelationshipWithTransformation.cxx index 36887e00aa..22a05117b6 100644 --- a/src/StepRepr/StepRepr_ShapeRepresentationRelationshipWithTransformation.cxx +++ b/src/StepRepr/StepRepr_ShapeRepresentationRelationshipWithTransformation.cxx @@ -12,7 +12,6 @@ // commercial license or contractual agreement. -#include #include IMPLEMENT_STANDARD_RTTIEXT(StepRepr_ShapeRepresentationRelationshipWithTransformation,StepRepr_RepresentationRelationshipWithTransformation) diff --git a/src/StepRepr/StepRepr_ShapeRepresentationRelationshipWithTransformation.hxx b/src/StepRepr/StepRepr_ShapeRepresentationRelationshipWithTransformation.hxx index 9659f9fd12..cc415d0d60 100644 --- a/src/StepRepr/StepRepr_ShapeRepresentationRelationshipWithTransformation.hxx +++ b/src/StepRepr/StepRepr_ShapeRepresentationRelationshipWithTransformation.hxx @@ -18,7 +18,6 @@ #define _StepRepr_ShapeRepresentationRelationshipWithTransformation_HeaderFile #include -#include #include diff --git a/src/StepRepr/StepRepr_SpecifiedHigherUsageOccurrence.cxx b/src/StepRepr/StepRepr_SpecifiedHigherUsageOccurrence.cxx index 26e0d181c4..060533acca 100644 --- a/src/StepRepr/StepRepr_SpecifiedHigherUsageOccurrence.cxx +++ b/src/StepRepr/StepRepr_SpecifiedHigherUsageOccurrence.cxx @@ -15,9 +15,7 @@ // Generator: ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V1.1 -#include #include -#include #include #include #include diff --git a/src/StepRepr/StepRepr_SpecifiedHigherUsageOccurrence.hxx b/src/StepRepr/StepRepr_SpecifiedHigherUsageOccurrence.hxx index 3bc3754502..1066f70a90 100644 --- a/src/StepRepr/StepRepr_SpecifiedHigherUsageOccurrence.hxx +++ b/src/StepRepr/StepRepr_SpecifiedHigherUsageOccurrence.hxx @@ -20,7 +20,6 @@ #include #include -#include class StepRepr_NextAssemblyUsageOccurrence; class TCollection_HAsciiString; class StepBasic_ProductDefinition; diff --git a/src/StepRepr/StepRepr_StructuralResponseProperty.cxx b/src/StepRepr/StepRepr_StructuralResponseProperty.cxx index 9a54da59ae..1f81be222c 100644 --- a/src/StepRepr/StepRepr_StructuralResponseProperty.cxx +++ b/src/StepRepr/StepRepr_StructuralResponseProperty.cxx @@ -15,7 +15,6 @@ // Generator: ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V1.2 -#include #include IMPLEMENT_STANDARD_RTTIEXT(StepRepr_StructuralResponseProperty,StepRepr_PropertyDefinition) diff --git a/src/StepRepr/StepRepr_StructuralResponseProperty.hxx b/src/StepRepr/StepRepr_StructuralResponseProperty.hxx index 60116ae09e..b06e9c93fd 100644 --- a/src/StepRepr/StepRepr_StructuralResponseProperty.hxx +++ b/src/StepRepr/StepRepr_StructuralResponseProperty.hxx @@ -17,7 +17,6 @@ #define _StepRepr_StructuralResponseProperty_HeaderFile #include -#include #include diff --git a/src/StepRepr/StepRepr_StructuralResponsePropertyDefinitionRepresentation.cxx b/src/StepRepr/StepRepr_StructuralResponsePropertyDefinitionRepresentation.cxx index d7c12487dc..318e14a1d9 100644 --- a/src/StepRepr/StepRepr_StructuralResponsePropertyDefinitionRepresentation.cxx +++ b/src/StepRepr/StepRepr_StructuralResponsePropertyDefinitionRepresentation.cxx @@ -15,7 +15,6 @@ // Generator: ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V1.2 -#include #include IMPLEMENT_STANDARD_RTTIEXT(StepRepr_StructuralResponsePropertyDefinitionRepresentation,StepRepr_PropertyDefinitionRepresentation) diff --git a/src/StepRepr/StepRepr_StructuralResponsePropertyDefinitionRepresentation.hxx b/src/StepRepr/StepRepr_StructuralResponsePropertyDefinitionRepresentation.hxx index cba52049b9..2417929998 100644 --- a/src/StepRepr/StepRepr_StructuralResponsePropertyDefinitionRepresentation.hxx +++ b/src/StepRepr/StepRepr_StructuralResponsePropertyDefinitionRepresentation.hxx @@ -17,7 +17,6 @@ #define _StepRepr_StructuralResponsePropertyDefinitionRepresentation_HeaderFile #include -#include #include diff --git a/src/StepRepr/StepRepr_SuppliedPartRelationship.cxx b/src/StepRepr/StepRepr_SuppliedPartRelationship.cxx index e17892d4d4..33fc68204b 100644 --- a/src/StepRepr/StepRepr_SuppliedPartRelationship.cxx +++ b/src/StepRepr/StepRepr_SuppliedPartRelationship.cxx @@ -12,7 +12,6 @@ // commercial license or contractual agreement. -#include #include IMPLEMENT_STANDARD_RTTIEXT(StepRepr_SuppliedPartRelationship,StepBasic_ProductDefinitionRelationship) diff --git a/src/StepRepr/StepRepr_SuppliedPartRelationship.hxx b/src/StepRepr/StepRepr_SuppliedPartRelationship.hxx index 99ed863bdc..ac85d983f8 100644 --- a/src/StepRepr/StepRepr_SuppliedPartRelationship.hxx +++ b/src/StepRepr/StepRepr_SuppliedPartRelationship.hxx @@ -18,7 +18,6 @@ #define _StepRepr_SuppliedPartRelationship_HeaderFile #include -#include #include diff --git a/src/StepRepr/StepRepr_ValueRepresentationItem.cxx b/src/StepRepr/StepRepr_ValueRepresentationItem.cxx index 3568187b0e..6c5159fd97 100644 --- a/src/StepRepr/StepRepr_ValueRepresentationItem.cxx +++ b/src/StepRepr/StepRepr_ValueRepresentationItem.cxx @@ -13,7 +13,6 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -#include #include #include #include diff --git a/src/StepSelect/StepSelect_Activator.cxx b/src/StepSelect/StepSelect_Activator.cxx index fe4697b3ec..e4d1a3cf74 100644 --- a/src/StepSelect/StepSelect_Activator.cxx +++ b/src/StepSelect/StepSelect_Activator.cxx @@ -16,7 +16,6 @@ #include #include #include -#include #include #include #include diff --git a/src/StepSelect/StepSelect_Activator.hxx b/src/StepSelect/StepSelect_Activator.hxx index c915234988..2b21649120 100644 --- a/src/StepSelect/StepSelect_Activator.hxx +++ b/src/StepSelect/StepSelect_Activator.hxx @@ -23,7 +23,6 @@ #include #include #include -#include class IFSelect_SessionPilot; diff --git a/src/StepSelect/StepSelect_FloatFormat.cxx b/src/StepSelect/StepSelect_FloatFormat.cxx index 1971942f64..f05f4bc79e 100644 --- a/src/StepSelect/StepSelect_FloatFormat.cxx +++ b/src/StepSelect/StepSelect_FloatFormat.cxx @@ -13,7 +13,6 @@ #include -#include #include #include #include diff --git a/src/StepSelect/StepSelect_FloatFormat.hxx b/src/StepSelect/StepSelect_FloatFormat.hxx index e25a188792..58ac750576 100644 --- a/src/StepSelect/StepSelect_FloatFormat.hxx +++ b/src/StepSelect/StepSelect_FloatFormat.hxx @@ -20,12 +20,9 @@ #include #include -#include #include -#include #include #include -#include class IFSelect_ContextWrite; class StepData_StepWriter; diff --git a/src/StepSelect/StepSelect_StepType.cxx b/src/StepSelect/StepSelect_StepType.cxx index fd82fee091..69b5397606 100644 --- a/src/StepSelect/StepSelect_StepType.cxx +++ b/src/StepSelect/StepSelect_StepType.cxx @@ -15,7 +15,6 @@ #include #include #include -#include #include #include #include diff --git a/src/StepSelect/StepSelect_WorkLibrary.cxx b/src/StepSelect/StepSelect_WorkLibrary.cxx index 66e8ee006c..a154c7dee9 100644 --- a/src/StepSelect/StepSelect_WorkLibrary.cxx +++ b/src/StepSelect/StepSelect_WorkLibrary.cxx @@ -13,17 +13,12 @@ #include -#include #include #include #include #include -#include #include -#include -#include #include -#include #include #include #include @@ -33,15 +28,11 @@ #include #include #include -#include #include #include #include -#include -#include #include -#include IMPLEMENT_STANDARD_RTTIEXT(StepSelect_WorkLibrary,IFSelect_WorkLibrary) StepSelect_WorkLibrary::StepSelect_WorkLibrary diff --git a/src/StepSelect/StepSelect_WorkLibrary.hxx b/src/StepSelect/StepSelect_WorkLibrary.hxx index 02e5677db8..0395bf235d 100644 --- a/src/StepSelect/StepSelect_WorkLibrary.hxx +++ b/src/StepSelect/StepSelect_WorkLibrary.hxx @@ -20,10 +20,8 @@ #include #include -#include #include #include -#include class Interface_InterfaceModel; class Interface_Protocol; class IFSelect_ContextWrite; diff --git a/src/StepShape/StepShape_AngularLocation.cxx b/src/StepShape/StepShape_AngularLocation.cxx index 02451b9e2b..72e720d62e 100644 --- a/src/StepShape/StepShape_AngularLocation.cxx +++ b/src/StepShape/StepShape_AngularLocation.cxx @@ -15,7 +15,6 @@ // Generator: ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V1.0 -#include #include #include #include diff --git a/src/StepShape/StepShape_AngularLocation.hxx b/src/StepShape/StepShape_AngularLocation.hxx index 8c34cdb54f..cb7b19e65f 100644 --- a/src/StepShape/StepShape_AngularLocation.hxx +++ b/src/StepShape/StepShape_AngularLocation.hxx @@ -21,7 +21,6 @@ #include #include -#include class TCollection_HAsciiString; class StepRepr_ShapeAspect; diff --git a/src/StepShape/StepShape_AngularSize.cxx b/src/StepShape/StepShape_AngularSize.cxx index 98603fe8dc..292c61e1e9 100644 --- a/src/StepShape/StepShape_AngularSize.cxx +++ b/src/StepShape/StepShape_AngularSize.cxx @@ -15,7 +15,6 @@ // Generator: ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V1.0 -#include #include #include #include diff --git a/src/StepShape/StepShape_Block.cxx b/src/StepShape/StepShape_Block.cxx index a60a1f3508..f6d4082c8d 100644 --- a/src/StepShape/StepShape_Block.cxx +++ b/src/StepShape/StepShape_Block.cxx @@ -12,7 +12,6 @@ // commercial license or contractual agreement. -#include #include #include #include diff --git a/src/StepShape/StepShape_Block.hxx b/src/StepShape/StepShape_Block.hxx index acb469b1ec..5110fb5b4f 100644 --- a/src/StepShape/StepShape_Block.hxx +++ b/src/StepShape/StepShape_Block.hxx @@ -20,7 +20,6 @@ #include #include -#include #include class StepGeom_Axis2Placement3d; class TCollection_HAsciiString; diff --git a/src/StepShape/StepShape_BooleanOperand.cxx b/src/StepShape/StepShape_BooleanOperand.cxx index 08446c762b..5eb32033fa 100644 --- a/src/StepShape/StepShape_BooleanOperand.cxx +++ b/src/StepShape/StepShape_BooleanOperand.cxx @@ -12,7 +12,6 @@ // commercial license or contractual agreement. -#include #include #include #include diff --git a/src/StepShape/StepShape_BooleanResult.cxx b/src/StepShape/StepShape_BooleanResult.cxx index 80826225fb..71b566da47 100644 --- a/src/StepShape/StepShape_BooleanResult.cxx +++ b/src/StepShape/StepShape_BooleanResult.cxx @@ -12,8 +12,6 @@ // commercial license or contractual agreement. -#include -#include #include #include diff --git a/src/StepShape/StepShape_BooleanResult.hxx b/src/StepShape/StepShape_BooleanResult.hxx index 7addf227cc..e8c770806b 100644 --- a/src/StepShape/StepShape_BooleanResult.hxx +++ b/src/StepShape/StepShape_BooleanResult.hxx @@ -18,7 +18,6 @@ #define _StepShape_BooleanResult_HeaderFile #include -#include #include #include diff --git a/src/StepShape/StepShape_BoxDomain.hxx b/src/StepShape/StepShape_BoxDomain.hxx index 5ddd00a4d7..08e6a1f195 100644 --- a/src/StepShape/StepShape_BoxDomain.hxx +++ b/src/StepShape/StepShape_BoxDomain.hxx @@ -20,7 +20,6 @@ #include #include -#include #include class StepGeom_CartesianPoint; diff --git a/src/StepShape/StepShape_BoxedHalfSpace.cxx b/src/StepShape/StepShape_BoxedHalfSpace.cxx index fbf8f0cd8c..7284ba1ab3 100644 --- a/src/StepShape/StepShape_BoxedHalfSpace.cxx +++ b/src/StepShape/StepShape_BoxedHalfSpace.cxx @@ -12,7 +12,6 @@ // commercial license or contractual agreement. -#include #include #include #include diff --git a/src/StepShape/StepShape_BoxedHalfSpace.hxx b/src/StepShape/StepShape_BoxedHalfSpace.hxx index 49d03356c2..ab01e29ca7 100644 --- a/src/StepShape/StepShape_BoxedHalfSpace.hxx +++ b/src/StepShape/StepShape_BoxedHalfSpace.hxx @@ -21,7 +21,6 @@ #include #include -#include class StepShape_BoxDomain; class TCollection_HAsciiString; class StepGeom_Surface; diff --git a/src/StepShape/StepShape_BrepWithVoids.cxx b/src/StepShape/StepShape_BrepWithVoids.cxx index 1065722e3a..24ba2ebe99 100644 --- a/src/StepShape/StepShape_BrepWithVoids.cxx +++ b/src/StepShape/StepShape_BrepWithVoids.cxx @@ -12,7 +12,6 @@ // commercial license or contractual agreement. -#include #include #include #include diff --git a/src/StepShape/StepShape_ConnectedEdgeSet.cxx b/src/StepShape/StepShape_ConnectedEdgeSet.cxx index d35202c1be..1c5eb2a4f0 100644 --- a/src/StepShape/StepShape_ConnectedEdgeSet.cxx +++ b/src/StepShape/StepShape_ConnectedEdgeSet.cxx @@ -15,7 +15,6 @@ // Generator: ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V1.1 -#include #include #include diff --git a/src/StepShape/StepShape_ConnectedFaceSet.cxx b/src/StepShape/StepShape_ConnectedFaceSet.cxx index 7fd2b05760..e2d6b035b2 100644 --- a/src/StepShape/StepShape_ConnectedFaceSet.cxx +++ b/src/StepShape/StepShape_ConnectedFaceSet.cxx @@ -12,7 +12,6 @@ // commercial license or contractual agreement. -#include #include #include #include diff --git a/src/StepShape/StepShape_ConnectedFaceSubSet.cxx b/src/StepShape/StepShape_ConnectedFaceSubSet.cxx index c37288a19b..d61a890795 100644 --- a/src/StepShape/StepShape_ConnectedFaceSubSet.cxx +++ b/src/StepShape/StepShape_ConnectedFaceSubSet.cxx @@ -15,8 +15,6 @@ // Generator: ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V1.1 -#include -#include #include #include diff --git a/src/StepShape/StepShape_ContextDependentShapeRepresentation.cxx b/src/StepShape/StepShape_ContextDependentShapeRepresentation.cxx index 38b67f17fd..a7394228af 100644 --- a/src/StepShape/StepShape_ContextDependentShapeRepresentation.cxx +++ b/src/StepShape/StepShape_ContextDependentShapeRepresentation.cxx @@ -12,7 +12,6 @@ // commercial license or contractual agreement. -#include #include #include #include diff --git a/src/StepShape/StepShape_CsgSelect.cxx b/src/StepShape/StepShape_CsgSelect.cxx index 9091bc2d16..ffde87efc4 100644 --- a/src/StepShape/StepShape_CsgSelect.cxx +++ b/src/StepShape/StepShape_CsgSelect.cxx @@ -12,7 +12,6 @@ // commercial license or contractual agreement. -#include #include #include #include diff --git a/src/StepShape/StepShape_CsgSolid.cxx b/src/StepShape/StepShape_CsgSolid.cxx index ac0e1cf44a..c66787df22 100644 --- a/src/StepShape/StepShape_CsgSolid.cxx +++ b/src/StepShape/StepShape_CsgSolid.cxx @@ -12,8 +12,6 @@ // commercial license or contractual agreement. -#include -#include #include #include diff --git a/src/StepShape/StepShape_CsgSolid.hxx b/src/StepShape/StepShape_CsgSolid.hxx index 5bfd8b334c..501422fd6a 100644 --- a/src/StepShape/StepShape_CsgSolid.hxx +++ b/src/StepShape/StepShape_CsgSolid.hxx @@ -18,7 +18,6 @@ #define _StepShape_CsgSolid_HeaderFile #include -#include #include #include diff --git a/src/StepShape/StepShape_DimensionalCharacteristicRepresentation.cxx b/src/StepShape/StepShape_DimensionalCharacteristicRepresentation.cxx index 20d35352e0..eb48302675 100644 --- a/src/StepShape/StepShape_DimensionalCharacteristicRepresentation.cxx +++ b/src/StepShape/StepShape_DimensionalCharacteristicRepresentation.cxx @@ -15,8 +15,6 @@ // Generator: ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V1.0 -#include -#include #include #include diff --git a/src/StepShape/StepShape_DimensionalCharacteristicRepresentation.hxx b/src/StepShape/StepShape_DimensionalCharacteristicRepresentation.hxx index e7f1e41e58..2b870050a6 100644 --- a/src/StepShape/StepShape_DimensionalCharacteristicRepresentation.hxx +++ b/src/StepShape/StepShape_DimensionalCharacteristicRepresentation.hxx @@ -17,7 +17,6 @@ #define _StepShape_DimensionalCharacteristicRepresentation_HeaderFile #include -#include #include #include diff --git a/src/StepShape/StepShape_DimensionalLocationWithPath.cxx b/src/StepShape/StepShape_DimensionalLocationWithPath.cxx index dfa9890ab0..104b73ed95 100644 --- a/src/StepShape/StepShape_DimensionalLocationWithPath.cxx +++ b/src/StepShape/StepShape_DimensionalLocationWithPath.cxx @@ -15,7 +15,6 @@ // Generator: ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V1.0 -#include #include #include #include diff --git a/src/StepShape/StepShape_DimensionalLocationWithPath.hxx b/src/StepShape/StepShape_DimensionalLocationWithPath.hxx index 51d27c1ee3..c8d7a91996 100644 --- a/src/StepShape/StepShape_DimensionalLocationWithPath.hxx +++ b/src/StepShape/StepShape_DimensionalLocationWithPath.hxx @@ -20,7 +20,6 @@ #include #include -#include class StepRepr_ShapeAspect; class TCollection_HAsciiString; diff --git a/src/StepShape/StepShape_DimensionalSize.cxx b/src/StepShape/StepShape_DimensionalSize.cxx index b779743b00..699e9b4795 100644 --- a/src/StepShape/StepShape_DimensionalSize.cxx +++ b/src/StepShape/StepShape_DimensionalSize.cxx @@ -15,7 +15,6 @@ // Generator: ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V1.0 -#include #include #include #include diff --git a/src/StepShape/StepShape_DimensionalSizeWithPath.cxx b/src/StepShape/StepShape_DimensionalSizeWithPath.cxx index 02467870b8..a81c631e25 100644 --- a/src/StepShape/StepShape_DimensionalSizeWithPath.cxx +++ b/src/StepShape/StepShape_DimensionalSizeWithPath.cxx @@ -15,7 +15,6 @@ // Generator: ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V1.0 -#include #include #include #include diff --git a/src/StepShape/StepShape_Edge.cxx b/src/StepShape/StepShape_Edge.cxx index a956ee931d..49923c3cec 100644 --- a/src/StepShape/StepShape_Edge.cxx +++ b/src/StepShape/StepShape_Edge.cxx @@ -12,7 +12,6 @@ // commercial license or contractual agreement. -#include #include #include #include diff --git a/src/StepShape/StepShape_Edge.hxx b/src/StepShape/StepShape_Edge.hxx index a0108e1838..f8033823c2 100644 --- a/src/StepShape/StepShape_Edge.hxx +++ b/src/StepShape/StepShape_Edge.hxx @@ -20,7 +20,6 @@ #include #include -#include #include class TCollection_HAsciiString; diff --git a/src/StepShape/StepShape_EdgeBasedWireframeModel.cxx b/src/StepShape/StepShape_EdgeBasedWireframeModel.cxx index bfe6e1a5e0..6529b526d7 100644 --- a/src/StepShape/StepShape_EdgeBasedWireframeModel.cxx +++ b/src/StepShape/StepShape_EdgeBasedWireframeModel.cxx @@ -15,7 +15,6 @@ // Generator: ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V1.1 -#include #include #include diff --git a/src/StepShape/StepShape_EdgeCurve.cxx b/src/StepShape/StepShape_EdgeCurve.cxx index 98defa0b1b..fbf9257989 100644 --- a/src/StepShape/StepShape_EdgeCurve.cxx +++ b/src/StepShape/StepShape_EdgeCurve.cxx @@ -12,7 +12,6 @@ // commercial license or contractual agreement. -#include #include #include #include diff --git a/src/StepShape/StepShape_EdgeCurve.hxx b/src/StepShape/StepShape_EdgeCurve.hxx index 5355f11ee1..0b7fb8b600 100644 --- a/src/StepShape/StepShape_EdgeCurve.hxx +++ b/src/StepShape/StepShape_EdgeCurve.hxx @@ -20,7 +20,6 @@ #include #include -#include #include class StepGeom_Curve; class TCollection_HAsciiString; diff --git a/src/StepShape/StepShape_EdgeLoop.cxx b/src/StepShape/StepShape_EdgeLoop.cxx index 898e8c9270..94599c1500 100644 --- a/src/StepShape/StepShape_EdgeLoop.cxx +++ b/src/StepShape/StepShape_EdgeLoop.cxx @@ -12,7 +12,6 @@ // commercial license or contractual agreement. -#include #include #include #include diff --git a/src/StepShape/StepShape_ExtrudedAreaSolid.cxx b/src/StepShape/StepShape_ExtrudedAreaSolid.cxx index 97bdd6d61c..3a3b53aeb9 100644 --- a/src/StepShape/StepShape_ExtrudedAreaSolid.cxx +++ b/src/StepShape/StepShape_ExtrudedAreaSolid.cxx @@ -12,7 +12,6 @@ // commercial license or contractual agreement. -#include #include #include #include diff --git a/src/StepShape/StepShape_ExtrudedAreaSolid.hxx b/src/StepShape/StepShape_ExtrudedAreaSolid.hxx index 00d372e774..2dbcfeebbc 100644 --- a/src/StepShape/StepShape_ExtrudedAreaSolid.hxx +++ b/src/StepShape/StepShape_ExtrudedAreaSolid.hxx @@ -20,7 +20,6 @@ #include #include -#include #include class StepGeom_Direction; class TCollection_HAsciiString; diff --git a/src/StepShape/StepShape_ExtrudedFaceSolid.cxx b/src/StepShape/StepShape_ExtrudedFaceSolid.cxx index 959ad865b1..5fb7c27a93 100644 --- a/src/StepShape/StepShape_ExtrudedFaceSolid.cxx +++ b/src/StepShape/StepShape_ExtrudedFaceSolid.cxx @@ -12,7 +12,6 @@ // commercial license or contractual agreement. -#include #include #include #include diff --git a/src/StepShape/StepShape_ExtrudedFaceSolid.hxx b/src/StepShape/StepShape_ExtrudedFaceSolid.hxx index adf47cd7e8..e47cce88bc 100644 --- a/src/StepShape/StepShape_ExtrudedFaceSolid.hxx +++ b/src/StepShape/StepShape_ExtrudedFaceSolid.hxx @@ -20,7 +20,6 @@ #include #include -#include #include class StepGeom_Direction; class TCollection_HAsciiString; diff --git a/src/StepShape/StepShape_Face.cxx b/src/StepShape/StepShape_Face.cxx index 754b1cd60a..9921348637 100644 --- a/src/StepShape/StepShape_Face.cxx +++ b/src/StepShape/StepShape_Face.cxx @@ -12,7 +12,6 @@ // commercial license or contractual agreement. -#include #include #include #include diff --git a/src/StepShape/StepShape_FaceBasedSurfaceModel.cxx b/src/StepShape/StepShape_FaceBasedSurfaceModel.cxx index f929b4637b..a9526a39d9 100644 --- a/src/StepShape/StepShape_FaceBasedSurfaceModel.cxx +++ b/src/StepShape/StepShape_FaceBasedSurfaceModel.cxx @@ -15,7 +15,6 @@ // Generator: ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V1.1 -#include #include #include diff --git a/src/StepShape/StepShape_FaceBound.cxx b/src/StepShape/StepShape_FaceBound.cxx index 72331b209c..9ebce29848 100644 --- a/src/StepShape/StepShape_FaceBound.cxx +++ b/src/StepShape/StepShape_FaceBound.cxx @@ -12,7 +12,6 @@ // commercial license or contractual agreement. -#include #include #include #include diff --git a/src/StepShape/StepShape_FaceSurface.cxx b/src/StepShape/StepShape_FaceSurface.cxx index ff8f260c73..cf8eb25f86 100644 --- a/src/StepShape/StepShape_FaceSurface.cxx +++ b/src/StepShape/StepShape_FaceSurface.cxx @@ -12,7 +12,6 @@ // commercial license or contractual agreement. -#include #include #include #include diff --git a/src/StepShape/StepShape_FaceSurface.hxx b/src/StepShape/StepShape_FaceSurface.hxx index 044fb6e234..7ef488b805 100644 --- a/src/StepShape/StepShape_FaceSurface.hxx +++ b/src/StepShape/StepShape_FaceSurface.hxx @@ -20,7 +20,6 @@ #include #include -#include #include #include class StepGeom_Surface; diff --git a/src/StepShape/StepShape_GeometricCurveSet.cxx b/src/StepShape/StepShape_GeometricCurveSet.cxx index 47acbcc69f..5adbec2021 100644 --- a/src/StepShape/StepShape_GeometricCurveSet.cxx +++ b/src/StepShape/StepShape_GeometricCurveSet.cxx @@ -12,7 +12,6 @@ // commercial license or contractual agreement. -#include #include IMPLEMENT_STANDARD_RTTIEXT(StepShape_GeometricCurveSet,StepShape_GeometricSet) diff --git a/src/StepShape/StepShape_GeometricCurveSet.hxx b/src/StepShape/StepShape_GeometricCurveSet.hxx index 13a6bdfe7c..73e27a11ec 100644 --- a/src/StepShape/StepShape_GeometricCurveSet.hxx +++ b/src/StepShape/StepShape_GeometricCurveSet.hxx @@ -18,7 +18,6 @@ #define _StepShape_GeometricCurveSet_HeaderFile #include -#include #include diff --git a/src/StepShape/StepShape_GeometricSet.cxx b/src/StepShape/StepShape_GeometricSet.cxx index bd76404127..b746165330 100644 --- a/src/StepShape/StepShape_GeometricSet.cxx +++ b/src/StepShape/StepShape_GeometricSet.cxx @@ -12,7 +12,6 @@ // commercial license or contractual agreement. -#include #include #include #include diff --git a/src/StepShape/StepShape_GeometricSet.hxx b/src/StepShape/StepShape_GeometricSet.hxx index dd082c80b7..78ecd52fd6 100644 --- a/src/StepShape/StepShape_GeometricSet.hxx +++ b/src/StepShape/StepShape_GeometricSet.hxx @@ -18,7 +18,6 @@ #define _StepShape_GeometricSet_HeaderFile #include -#include #include #include diff --git a/src/StepShape/StepShape_HArray1OfConnectedEdgeSet.hxx b/src/StepShape/StepShape_HArray1OfConnectedEdgeSet.hxx index df9a8c4757..371b2fd9ed 100644 --- a/src/StepShape/StepShape_HArray1OfConnectedEdgeSet.hxx +++ b/src/StepShape/StepShape_HArray1OfConnectedEdgeSet.hxx @@ -17,7 +17,6 @@ #ifndef StepShape_HArray1OfConnectedEdgeSet_HeaderFile #define StepShape_HArray1OfConnectedEdgeSet_HeaderFile -#include #include #include diff --git a/src/StepShape/StepShape_HArray1OfConnectedFaceSet.hxx b/src/StepShape/StepShape_HArray1OfConnectedFaceSet.hxx index a6c38dd6b4..f277da425d 100644 --- a/src/StepShape/StepShape_HArray1OfConnectedFaceSet.hxx +++ b/src/StepShape/StepShape_HArray1OfConnectedFaceSet.hxx @@ -17,7 +17,6 @@ #ifndef StepShape_HArray1OfConnectedFaceSet_HeaderFile #define StepShape_HArray1OfConnectedFaceSet_HeaderFile -#include #include #include diff --git a/src/StepShape/StepShape_HArray1OfEdge.hxx b/src/StepShape/StepShape_HArray1OfEdge.hxx index 51f34c3f6b..50a67b52c1 100644 --- a/src/StepShape/StepShape_HArray1OfEdge.hxx +++ b/src/StepShape/StepShape_HArray1OfEdge.hxx @@ -17,7 +17,6 @@ #ifndef StepShape_HArray1OfEdge_HeaderFile #define StepShape_HArray1OfEdge_HeaderFile -#include #include #include diff --git a/src/StepShape/StepShape_HArray1OfFace.hxx b/src/StepShape/StepShape_HArray1OfFace.hxx index 7cea107130..cdc46528d5 100644 --- a/src/StepShape/StepShape_HArray1OfFace.hxx +++ b/src/StepShape/StepShape_HArray1OfFace.hxx @@ -17,7 +17,6 @@ #ifndef StepShape_HArray1OfFace_HeaderFile #define StepShape_HArray1OfFace_HeaderFile -#include #include #include diff --git a/src/StepShape/StepShape_HArray1OfFaceBound.hxx b/src/StepShape/StepShape_HArray1OfFaceBound.hxx index 7236c9292a..b6a4491e9a 100644 --- a/src/StepShape/StepShape_HArray1OfFaceBound.hxx +++ b/src/StepShape/StepShape_HArray1OfFaceBound.hxx @@ -17,7 +17,6 @@ #ifndef StepShape_HArray1OfFaceBound_HeaderFile #define StepShape_HArray1OfFaceBound_HeaderFile -#include #include #include diff --git a/src/StepShape/StepShape_HArray1OfOrientedClosedShell.hxx b/src/StepShape/StepShape_HArray1OfOrientedClosedShell.hxx index 7cc4a331f3..32c0af0085 100644 --- a/src/StepShape/StepShape_HArray1OfOrientedClosedShell.hxx +++ b/src/StepShape/StepShape_HArray1OfOrientedClosedShell.hxx @@ -17,7 +17,6 @@ #ifndef StepShape_HArray1OfOrientedClosedShell_HeaderFile #define StepShape_HArray1OfOrientedClosedShell_HeaderFile -#include #include #include diff --git a/src/StepShape/StepShape_HArray1OfOrientedEdge.hxx b/src/StepShape/StepShape_HArray1OfOrientedEdge.hxx index a7288ab05e..02ed744da5 100644 --- a/src/StepShape/StepShape_HArray1OfOrientedEdge.hxx +++ b/src/StepShape/StepShape_HArray1OfOrientedEdge.hxx @@ -17,7 +17,6 @@ #ifndef StepShape_HArray1OfOrientedEdge_HeaderFile #define StepShape_HArray1OfOrientedEdge_HeaderFile -#include #include #include diff --git a/src/StepShape/StepShape_HArray1OfShapeDimensionRepresentationItem.hxx b/src/StepShape/StepShape_HArray1OfShapeDimensionRepresentationItem.hxx index 03207eec30..dc0b366f72 100644 --- a/src/StepShape/StepShape_HArray1OfShapeDimensionRepresentationItem.hxx +++ b/src/StepShape/StepShape_HArray1OfShapeDimensionRepresentationItem.hxx @@ -16,7 +16,6 @@ #ifndef _StepShape_HArray1OfShapeDimensionRepresentationItem_HeaderFile #define _StepShape_HArray1OfShapeDimensionRepresentationItem_HeaderFile -#include #include #include diff --git a/src/StepShape/StepShape_HArray1OfValueQualifier.hxx b/src/StepShape/StepShape_HArray1OfValueQualifier.hxx index ce1cf027fa..c07ecf5a98 100644 --- a/src/StepShape/StepShape_HArray1OfValueQualifier.hxx +++ b/src/StepShape/StepShape_HArray1OfValueQualifier.hxx @@ -17,7 +17,6 @@ #ifndef StepShape_HArray1OfValueQualifier_HeaderFile #define StepShape_HArray1OfValueQualifier_HeaderFile -#include #include #include diff --git a/src/StepShape/StepShape_HalfSpaceSolid.cxx b/src/StepShape/StepShape_HalfSpaceSolid.cxx index 4c364dd450..662a80c3db 100644 --- a/src/StepShape/StepShape_HalfSpaceSolid.cxx +++ b/src/StepShape/StepShape_HalfSpaceSolid.cxx @@ -12,7 +12,6 @@ // commercial license or contractual agreement. -#include #include #include #include diff --git a/src/StepShape/StepShape_HalfSpaceSolid.hxx b/src/StepShape/StepShape_HalfSpaceSolid.hxx index 0ffdf02b85..b80bba4641 100644 --- a/src/StepShape/StepShape_HalfSpaceSolid.hxx +++ b/src/StepShape/StepShape_HalfSpaceSolid.hxx @@ -20,7 +20,6 @@ #include #include -#include #include class StepGeom_Surface; class TCollection_HAsciiString; diff --git a/src/StepShape/StepShape_LimitsAndFits.cxx b/src/StepShape/StepShape_LimitsAndFits.cxx index f8988def95..bfe587b08b 100644 --- a/src/StepShape/StepShape_LimitsAndFits.cxx +++ b/src/StepShape/StepShape_LimitsAndFits.cxx @@ -12,7 +12,6 @@ // commercial license or contractual agreement. -#include #include #include diff --git a/src/StepShape/StepShape_ManifoldSolidBrep.cxx b/src/StepShape/StepShape_ManifoldSolidBrep.cxx index 0b968a8c69..a196812039 100644 --- a/src/StepShape/StepShape_ManifoldSolidBrep.cxx +++ b/src/StepShape/StepShape_ManifoldSolidBrep.cxx @@ -12,7 +12,6 @@ // commercial license or contractual agreement. -#include #include #include #include diff --git a/src/StepShape/StepShape_MeasureQualification.cxx b/src/StepShape/StepShape_MeasureQualification.cxx index 5d01a1529b..c61206c621 100644 --- a/src/StepShape/StepShape_MeasureQualification.cxx +++ b/src/StepShape/StepShape_MeasureQualification.cxx @@ -12,7 +12,6 @@ // commercial license or contractual agreement. -#include #include #include #include diff --git a/src/StepShape/StepShape_OrientedClosedShell.cxx b/src/StepShape/StepShape_OrientedClosedShell.cxx index 2976aec5db..b72f07e98e 100644 --- a/src/StepShape/StepShape_OrientedClosedShell.cxx +++ b/src/StepShape/StepShape_OrientedClosedShell.cxx @@ -12,9 +12,6 @@ // commercial license or contractual agreement. -#include -#include -#include #include #include diff --git a/src/StepShape/StepShape_OrientedEdge.cxx b/src/StepShape/StepShape_OrientedEdge.cxx index b161597a89..e1ae5d86fe 100644 --- a/src/StepShape/StepShape_OrientedEdge.cxx +++ b/src/StepShape/StepShape_OrientedEdge.cxx @@ -12,8 +12,6 @@ // commercial license or contractual agreement. -#include -#include #include #include #include diff --git a/src/StepShape/StepShape_OrientedFace.cxx b/src/StepShape/StepShape_OrientedFace.cxx index 96ea7f4c20..bc1531b477 100644 --- a/src/StepShape/StepShape_OrientedFace.cxx +++ b/src/StepShape/StepShape_OrientedFace.cxx @@ -12,9 +12,6 @@ // commercial license or contractual agreement. -#include -#include -#include #include #include diff --git a/src/StepShape/StepShape_OrientedOpenShell.cxx b/src/StepShape/StepShape_OrientedOpenShell.cxx index dfa404ec96..0b1431c992 100644 --- a/src/StepShape/StepShape_OrientedOpenShell.cxx +++ b/src/StepShape/StepShape_OrientedOpenShell.cxx @@ -12,9 +12,6 @@ // commercial license or contractual agreement. -#include -#include -#include #include #include diff --git a/src/StepShape/StepShape_OrientedPath.cxx b/src/StepShape/StepShape_OrientedPath.cxx index 7b67e3719c..924858818c 100644 --- a/src/StepShape/StepShape_OrientedPath.cxx +++ b/src/StepShape/StepShape_OrientedPath.cxx @@ -12,7 +12,6 @@ // commercial license or contractual agreement. -#include #include #include #include diff --git a/src/StepShape/StepShape_OrientedPath.hxx b/src/StepShape/StepShape_OrientedPath.hxx index b1b1b4513e..29d268d042 100644 --- a/src/StepShape/StepShape_OrientedPath.hxx +++ b/src/StepShape/StepShape_OrientedPath.hxx @@ -20,7 +20,6 @@ #include #include -#include #include #include #include diff --git a/src/StepShape/StepShape_Path.cxx b/src/StepShape/StepShape_Path.cxx index b1378e74c4..d5849185c6 100644 --- a/src/StepShape/StepShape_Path.cxx +++ b/src/StepShape/StepShape_Path.cxx @@ -12,8 +12,6 @@ // commercial license or contractual agreement. -#include -#include #include #include diff --git a/src/StepShape/StepShape_PlusMinusTolerance.cxx b/src/StepShape/StepShape_PlusMinusTolerance.cxx index 23f26d0914..096676130a 100644 --- a/src/StepShape/StepShape_PlusMinusTolerance.cxx +++ b/src/StepShape/StepShape_PlusMinusTolerance.cxx @@ -12,8 +12,6 @@ // commercial license or contractual agreement. -#include -#include #include #include diff --git a/src/StepShape/StepShape_PlusMinusTolerance.hxx b/src/StepShape/StepShape_PlusMinusTolerance.hxx index f45118588d..1f3a642a7c 100644 --- a/src/StepShape/StepShape_PlusMinusTolerance.hxx +++ b/src/StepShape/StepShape_PlusMinusTolerance.hxx @@ -17,7 +17,6 @@ #define _StepShape_PlusMinusTolerance_HeaderFile #include -#include #include #include diff --git a/src/StepShape/StepShape_PolyLoop.cxx b/src/StepShape/StepShape_PolyLoop.cxx index e6b6c34713..7d19741ddc 100644 --- a/src/StepShape/StepShape_PolyLoop.cxx +++ b/src/StepShape/StepShape_PolyLoop.cxx @@ -12,8 +12,6 @@ // commercial license or contractual agreement. -#include -#include #include #include diff --git a/src/StepShape/StepShape_QualifiedRepresentationItem.cxx b/src/StepShape/StepShape_QualifiedRepresentationItem.cxx index 22db354a8e..e8dcd008cf 100644 --- a/src/StepShape/StepShape_QualifiedRepresentationItem.cxx +++ b/src/StepShape/StepShape_QualifiedRepresentationItem.cxx @@ -12,7 +12,6 @@ // commercial license or contractual agreement. -#include #include #include #include diff --git a/src/StepShape/StepShape_QualifiedRepresentationItem.hxx b/src/StepShape/StepShape_QualifiedRepresentationItem.hxx index eba40b438a..d5b9ca6870 100644 --- a/src/StepShape/StepShape_QualifiedRepresentationItem.hxx +++ b/src/StepShape/StepShape_QualifiedRepresentationItem.hxx @@ -17,7 +17,6 @@ #define _StepShape_QualifiedRepresentationItem_HeaderFile #include -#include #include #include diff --git a/src/StepShape/StepShape_ReversibleTopologyItem.cxx b/src/StepShape/StepShape_ReversibleTopologyItem.cxx index 15b7b12d2a..2b2e46134c 100644 --- a/src/StepShape/StepShape_ReversibleTopologyItem.cxx +++ b/src/StepShape/StepShape_ReversibleTopologyItem.cxx @@ -15,7 +15,6 @@ #include #include #include -#include #include #include #include diff --git a/src/StepShape/StepShape_RevolvedAreaSolid.cxx b/src/StepShape/StepShape_RevolvedAreaSolid.cxx index f0a432ed05..90dc7fa880 100644 --- a/src/StepShape/StepShape_RevolvedAreaSolid.cxx +++ b/src/StepShape/StepShape_RevolvedAreaSolid.cxx @@ -12,7 +12,6 @@ // commercial license or contractual agreement. -#include #include #include #include diff --git a/src/StepShape/StepShape_RevolvedAreaSolid.hxx b/src/StepShape/StepShape_RevolvedAreaSolid.hxx index c4c8a7bf6e..2fce9ccf37 100644 --- a/src/StepShape/StepShape_RevolvedAreaSolid.hxx +++ b/src/StepShape/StepShape_RevolvedAreaSolid.hxx @@ -20,7 +20,6 @@ #include #include -#include #include class StepGeom_Axis1Placement; class TCollection_HAsciiString; diff --git a/src/StepShape/StepShape_RevolvedFaceSolid.cxx b/src/StepShape/StepShape_RevolvedFaceSolid.cxx index c7de0db790..c45a6ec989 100644 --- a/src/StepShape/StepShape_RevolvedFaceSolid.cxx +++ b/src/StepShape/StepShape_RevolvedFaceSolid.cxx @@ -12,7 +12,6 @@ // commercial license or contractual agreement. -#include #include #include #include diff --git a/src/StepShape/StepShape_RevolvedFaceSolid.hxx b/src/StepShape/StepShape_RevolvedFaceSolid.hxx index b9d3805af1..5fd4409fdf 100644 --- a/src/StepShape/StepShape_RevolvedFaceSolid.hxx +++ b/src/StepShape/StepShape_RevolvedFaceSolid.hxx @@ -20,7 +20,6 @@ #include #include -#include #include class StepGeom_Axis1Placement; class TCollection_HAsciiString; diff --git a/src/StepShape/StepShape_RightAngularWedge.cxx b/src/StepShape/StepShape_RightAngularWedge.cxx index f6bcf4f766..f9ec6fd1e4 100644 --- a/src/StepShape/StepShape_RightAngularWedge.cxx +++ b/src/StepShape/StepShape_RightAngularWedge.cxx @@ -12,7 +12,6 @@ // commercial license or contractual agreement. -#include #include #include #include diff --git a/src/StepShape/StepShape_RightAngularWedge.hxx b/src/StepShape/StepShape_RightAngularWedge.hxx index 54a3e4d34e..213ff0de19 100644 --- a/src/StepShape/StepShape_RightAngularWedge.hxx +++ b/src/StepShape/StepShape_RightAngularWedge.hxx @@ -20,7 +20,6 @@ #include #include -#include #include class StepGeom_Axis2Placement3d; class TCollection_HAsciiString; diff --git a/src/StepShape/StepShape_RightCircularCone.cxx b/src/StepShape/StepShape_RightCircularCone.cxx index 9ce8bd7293..eb2039e91f 100644 --- a/src/StepShape/StepShape_RightCircularCone.cxx +++ b/src/StepShape/StepShape_RightCircularCone.cxx @@ -12,7 +12,6 @@ // commercial license or contractual agreement. -#include #include #include #include diff --git a/src/StepShape/StepShape_RightCircularCone.hxx b/src/StepShape/StepShape_RightCircularCone.hxx index 81628a54c8..c967ca3d81 100644 --- a/src/StepShape/StepShape_RightCircularCone.hxx +++ b/src/StepShape/StepShape_RightCircularCone.hxx @@ -20,7 +20,6 @@ #include #include -#include #include class StepGeom_Axis1Placement; class TCollection_HAsciiString; diff --git a/src/StepShape/StepShape_RightCircularCylinder.cxx b/src/StepShape/StepShape_RightCircularCylinder.cxx index 74a2780e8b..08d14068e5 100644 --- a/src/StepShape/StepShape_RightCircularCylinder.cxx +++ b/src/StepShape/StepShape_RightCircularCylinder.cxx @@ -12,7 +12,6 @@ // commercial license or contractual agreement. -#include #include #include #include diff --git a/src/StepShape/StepShape_RightCircularCylinder.hxx b/src/StepShape/StepShape_RightCircularCylinder.hxx index ea027e8d7c..c6180d6c24 100644 --- a/src/StepShape/StepShape_RightCircularCylinder.hxx +++ b/src/StepShape/StepShape_RightCircularCylinder.hxx @@ -20,7 +20,6 @@ #include #include -#include #include class StepGeom_Axis1Placement; class TCollection_HAsciiString; diff --git a/src/StepShape/StepShape_SeamEdge.cxx b/src/StepShape/StepShape_SeamEdge.cxx index ae8bb9f5dc..b8e34d5475 100644 --- a/src/StepShape/StepShape_SeamEdge.cxx +++ b/src/StepShape/StepShape_SeamEdge.cxx @@ -15,9 +15,7 @@ // Generator: ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V1.1 -#include #include -#include #include #include diff --git a/src/StepShape/StepShape_SeamEdge.hxx b/src/StepShape/StepShape_SeamEdge.hxx index c0ee6c5973..daa49da1c1 100644 --- a/src/StepShape/StepShape_SeamEdge.hxx +++ b/src/StepShape/StepShape_SeamEdge.hxx @@ -20,7 +20,6 @@ #include #include -#include class StepGeom_Pcurve; class TCollection_HAsciiString; class StepShape_Edge; diff --git a/src/StepShape/StepShape_ShapeDefinitionRepresentation.cxx b/src/StepShape/StepShape_ShapeDefinitionRepresentation.cxx index ce4b3c789b..7ae35dfebf 100644 --- a/src/StepShape/StepShape_ShapeDefinitionRepresentation.cxx +++ b/src/StepShape/StepShape_ShapeDefinitionRepresentation.cxx @@ -16,7 +16,6 @@ // Generator: ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V1.0 -#include #include IMPLEMENT_STANDARD_RTTIEXT(StepShape_ShapeDefinitionRepresentation,StepRepr_PropertyDefinitionRepresentation) diff --git a/src/StepShape/StepShape_ShapeDefinitionRepresentation.hxx b/src/StepShape/StepShape_ShapeDefinitionRepresentation.hxx index cb1c72318f..9458403124 100644 --- a/src/StepShape/StepShape_ShapeDefinitionRepresentation.hxx +++ b/src/StepShape/StepShape_ShapeDefinitionRepresentation.hxx @@ -18,7 +18,6 @@ #define _StepShape_ShapeDefinitionRepresentation_HeaderFile #include -#include #include diff --git a/src/StepShape/StepShape_ShapeDimensionRepresentation.cxx b/src/StepShape/StepShape_ShapeDimensionRepresentation.cxx index 2274f9389c..80d8e5361b 100644 --- a/src/StepShape/StepShape_ShapeDimensionRepresentation.cxx +++ b/src/StepShape/StepShape_ShapeDimensionRepresentation.cxx @@ -15,7 +15,6 @@ // Generator: ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V1.0 -#include #include IMPLEMENT_STANDARD_RTTIEXT(StepShape_ShapeDimensionRepresentation,StepShape_ShapeRepresentation) diff --git a/src/StepShape/StepShape_ShapeDimensionRepresentation.hxx b/src/StepShape/StepShape_ShapeDimensionRepresentation.hxx index c488574af8..1d6d5baf43 100644 --- a/src/StepShape/StepShape_ShapeDimensionRepresentation.hxx +++ b/src/StepShape/StepShape_ShapeDimensionRepresentation.hxx @@ -17,7 +17,6 @@ #define _StepShape_ShapeDimensionRepresentation_HeaderFile #include -#include #include #include diff --git a/src/StepShape/StepShape_ShellBasedSurfaceModel.cxx b/src/StepShape/StepShape_ShellBasedSurfaceModel.cxx index 4c05333b2b..a0032dd861 100644 --- a/src/StepShape/StepShape_ShellBasedSurfaceModel.cxx +++ b/src/StepShape/StepShape_ShellBasedSurfaceModel.cxx @@ -12,8 +12,6 @@ // commercial license or contractual agreement. -#include -#include #include #include diff --git a/src/StepShape/StepShape_ShellBasedSurfaceModel.hxx b/src/StepShape/StepShape_ShellBasedSurfaceModel.hxx index 9c2a150a30..9121d42b9c 100644 --- a/src/StepShape/StepShape_ShellBasedSurfaceModel.hxx +++ b/src/StepShape/StepShape_ShellBasedSurfaceModel.hxx @@ -18,7 +18,6 @@ #define _StepShape_ShellBasedSurfaceModel_HeaderFile #include -#include #include #include diff --git a/src/StepShape/StepShape_SolidReplica.cxx b/src/StepShape/StepShape_SolidReplica.cxx index df93ea90ef..1eace0a2bd 100644 --- a/src/StepShape/StepShape_SolidReplica.cxx +++ b/src/StepShape/StepShape_SolidReplica.cxx @@ -12,9 +12,7 @@ // commercial license or contractual agreement. -#include #include -#include #include #include diff --git a/src/StepShape/StepShape_Sphere.cxx b/src/StepShape/StepShape_Sphere.cxx index 09edb3a88e..62af370102 100644 --- a/src/StepShape/StepShape_Sphere.cxx +++ b/src/StepShape/StepShape_Sphere.cxx @@ -12,7 +12,6 @@ // commercial license or contractual agreement. -#include #include #include #include diff --git a/src/StepShape/StepShape_Sphere.hxx b/src/StepShape/StepShape_Sphere.hxx index f1c7b390f6..445c29dec1 100644 --- a/src/StepShape/StepShape_Sphere.hxx +++ b/src/StepShape/StepShape_Sphere.hxx @@ -20,7 +20,6 @@ #include #include -#include #include class StepGeom_Point; class TCollection_HAsciiString; diff --git a/src/StepShape/StepShape_Subedge.cxx b/src/StepShape/StepShape_Subedge.cxx index 5e2fc7b11c..120abe081c 100644 --- a/src/StepShape/StepShape_Subedge.cxx +++ b/src/StepShape/StepShape_Subedge.cxx @@ -15,8 +15,6 @@ // Generator: ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V1.1 -#include -#include #include #include #include diff --git a/src/StepShape/StepShape_Subface.cxx b/src/StepShape/StepShape_Subface.cxx index c5b79a7c24..b6192cab19 100644 --- a/src/StepShape/StepShape_Subface.cxx +++ b/src/StepShape/StepShape_Subface.cxx @@ -15,8 +15,6 @@ // Generator: ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V1.1 -#include -#include #include #include diff --git a/src/StepShape/StepShape_SweptAreaSolid.cxx b/src/StepShape/StepShape_SweptAreaSolid.cxx index 30bebe95ce..80f9ddbe5d 100644 --- a/src/StepShape/StepShape_SweptAreaSolid.cxx +++ b/src/StepShape/StepShape_SweptAreaSolid.cxx @@ -12,7 +12,6 @@ // commercial license or contractual agreement. -#include #include #include #include diff --git a/src/StepShape/StepShape_SweptFaceSolid.cxx b/src/StepShape/StepShape_SweptFaceSolid.cxx index 04c8091edb..66cb3f4667 100644 --- a/src/StepShape/StepShape_SweptFaceSolid.cxx +++ b/src/StepShape/StepShape_SweptFaceSolid.cxx @@ -12,7 +12,6 @@ // commercial license or contractual agreement. -#include #include #include #include diff --git a/src/StepShape/StepShape_ToleranceValue.cxx b/src/StepShape/StepShape_ToleranceValue.cxx index dee367d7d8..5fc6fb3c27 100644 --- a/src/StepShape/StepShape_ToleranceValue.cxx +++ b/src/StepShape/StepShape_ToleranceValue.cxx @@ -12,7 +12,6 @@ // commercial license or contractual agreement. -#include #include #include diff --git a/src/StepShape/StepShape_Torus.cxx b/src/StepShape/StepShape_Torus.cxx index 4262ce1ad8..70a5d10465 100644 --- a/src/StepShape/StepShape_Torus.cxx +++ b/src/StepShape/StepShape_Torus.cxx @@ -12,7 +12,6 @@ // commercial license or contractual agreement. -#include #include #include #include diff --git a/src/StepShape/StepShape_Torus.hxx b/src/StepShape/StepShape_Torus.hxx index 4e75cbc415..5014e1f257 100644 --- a/src/StepShape/StepShape_Torus.hxx +++ b/src/StepShape/StepShape_Torus.hxx @@ -20,7 +20,6 @@ #include #include -#include #include class StepGeom_Axis1Placement; class TCollection_HAsciiString; diff --git a/src/StepShape/StepShape_TypeQualifier.cxx b/src/StepShape/StepShape_TypeQualifier.cxx index b3f487eef8..42bd4418a2 100644 --- a/src/StepShape/StepShape_TypeQualifier.cxx +++ b/src/StepShape/StepShape_TypeQualifier.cxx @@ -12,7 +12,6 @@ // commercial license or contractual agreement. -#include #include #include diff --git a/src/StepShape/StepShape_ValueFormatTypeQualifier.hxx b/src/StepShape/StepShape_ValueFormatTypeQualifier.hxx index 6ebd4bde93..35a2e44e04 100644 --- a/src/StepShape/StepShape_ValueFormatTypeQualifier.hxx +++ b/src/StepShape/StepShape_ValueFormatTypeQualifier.hxx @@ -20,7 +20,6 @@ #include #include -#include #include class TCollection_HAsciiString; diff --git a/src/StepShape/StepShape_VertexLoop.cxx b/src/StepShape/StepShape_VertexLoop.cxx index 0c423644d7..d011ce53ab 100644 --- a/src/StepShape/StepShape_VertexLoop.cxx +++ b/src/StepShape/StepShape_VertexLoop.cxx @@ -12,7 +12,6 @@ // commercial license or contractual agreement. -#include #include #include #include diff --git a/src/StepShape/StepShape_VertexPoint.cxx b/src/StepShape/StepShape_VertexPoint.cxx index 39ad65a227..faebe1efb2 100644 --- a/src/StepShape/StepShape_VertexPoint.cxx +++ b/src/StepShape/StepShape_VertexPoint.cxx @@ -12,7 +12,6 @@ // commercial license or contractual agreement. -#include #include #include #include diff --git a/src/StepToGeom/StepToGeom.cxx b/src/StepToGeom/StepToGeom.cxx index bb28924127..1b365c150e 100644 --- a/src/StepToGeom/StepToGeom.cxx +++ b/src/StepToGeom/StepToGeom.cxx @@ -22,10 +22,7 @@ #include #include -#include -#include #include -#include #include #include #include @@ -52,8 +49,6 @@ #include #include -#include -#include #include #include #include @@ -70,7 +65,6 @@ #include #include #include -#include #include #include @@ -79,11 +73,6 @@ #include #include #include -#include -#include -#include -#include -#include #include #include diff --git a/src/StepToTopoDS/StepToTopoDS_Builder.cxx b/src/StepToTopoDS/StepToTopoDS_Builder.cxx index 40f5114cf7..b502766c3b 100644 --- a/src/StepToTopoDS/StepToTopoDS_Builder.cxx +++ b/src/StepToTopoDS/StepToTopoDS_Builder.cxx @@ -25,7 +25,6 @@ #include #include #include -#include #include #include #include @@ -39,7 +38,6 @@ #include #include #include -#include #include #include #include @@ -49,7 +47,6 @@ #include #include #include -#include #include #include #include @@ -64,14 +61,12 @@ #include #include #include -#include #include #include #include #include #include #include -#include #include #include #include diff --git a/src/StepToTopoDS/StepToTopoDS_Builder.hxx b/src/StepToTopoDS/StepToTopoDS_Builder.hxx index df3b185271..759d1bc825 100644 --- a/src/StepToTopoDS/StepToTopoDS_Builder.hxx +++ b/src/StepToTopoDS/StepToTopoDS_Builder.hxx @@ -24,7 +24,6 @@ #include #include #include -#include #include class StepShape_ManifoldSolidBrep; diff --git a/src/StepToTopoDS/StepToTopoDS_CartesianPointHasher.hxx b/src/StepToTopoDS/StepToTopoDS_CartesianPointHasher.hxx index accd92f990..4c8a8bbc22 100644 --- a/src/StepToTopoDS/StepToTopoDS_CartesianPointHasher.hxx +++ b/src/StepToTopoDS/StepToTopoDS_CartesianPointHasher.hxx @@ -22,7 +22,6 @@ #include #include -#include class StepGeom_CartesianPoint; diff --git a/src/StepToTopoDS/StepToTopoDS_DataMapOfRINames.hxx b/src/StepToTopoDS/StepToTopoDS_DataMapOfRINames.hxx index e1a2a60c0f..b9cf814562 100644 --- a/src/StepToTopoDS/StepToTopoDS_DataMapOfRINames.hxx +++ b/src/StepToTopoDS/StepToTopoDS_DataMapOfRINames.hxx @@ -19,7 +19,6 @@ #include #include -#include #include typedef NCollection_DataMap StepToTopoDS_DataMapOfRINames; diff --git a/src/StepToTopoDS/StepToTopoDS_GeometricTool.cxx b/src/StepToTopoDS/StepToTopoDS_GeometricTool.cxx index 19e5d18517..e2e6d9d215 100644 --- a/src/StepToTopoDS/StepToTopoDS_GeometricTool.cxx +++ b/src/StepToTopoDS/StepToTopoDS_GeometricTool.cxx @@ -18,53 +18,27 @@ // abv 13.04.99 S4136: eliminate BRepAPI::Precision() #include -#include #include -#include #include -#include -#include #include -#include -#include -#include -#include #include -#include -#include #include -#include -#include -#include -#include -#include -#include -#include -#include #include #include -#include #include -#include -#include #include #include #include #include -#include #include #include #include #include #include -#include #include #include #include #include -#include -#include -#include #include // ---------------------------------------------------------------------------- diff --git a/src/StepToTopoDS/StepToTopoDS_GeometricTool.hxx b/src/StepToTopoDS/StepToTopoDS_GeometricTool.hxx index 1a6d972ced..e1de2b5aaf 100644 --- a/src/StepToTopoDS/StepToTopoDS_GeometricTool.hxx +++ b/src/StepToTopoDS/StepToTopoDS_GeometricTool.hxx @@ -22,8 +22,6 @@ #include #include -#include -#include class StepGeom_SurfaceCurve; class StepGeom_Surface; class StepGeom_Pcurve; diff --git a/src/StepToTopoDS/StepToTopoDS_MakeTransformed.cxx b/src/StepToTopoDS/StepToTopoDS_MakeTransformed.cxx index 7ba4d04596..bd98590ef3 100644 --- a/src/StepToTopoDS/StepToTopoDS_MakeTransformed.cxx +++ b/src/StepToTopoDS/StepToTopoDS_MakeTransformed.cxx @@ -16,23 +16,18 @@ #include #include -#include #include #include #include #include #include #include -#include #include #include #include #include #include #include -#include -#include -#include #include #include diff --git a/src/StepToTopoDS/StepToTopoDS_MakeTransformed.hxx b/src/StepToTopoDS/StepToTopoDS_MakeTransformed.hxx index e787b8c48f..6df7b9b814 100644 --- a/src/StepToTopoDS/StepToTopoDS_MakeTransformed.hxx +++ b/src/StepToTopoDS/StepToTopoDS_MakeTransformed.hxx @@ -23,7 +23,6 @@ #include #include -#include #include class StepGeom_Axis2Placement3d; diff --git a/src/StepToTopoDS/StepToTopoDS_PointPairHasher.hxx b/src/StepToTopoDS/StepToTopoDS_PointPairHasher.hxx index 542e540280..efc515a772 100644 --- a/src/StepToTopoDS/StepToTopoDS_PointPairHasher.hxx +++ b/src/StepToTopoDS/StepToTopoDS_PointPairHasher.hxx @@ -19,10 +19,8 @@ #include #include -#include #include -#include class StepToTopoDS_PointPair; diff --git a/src/StepToTopoDS/StepToTopoDS_Root.hxx b/src/StepToTopoDS/StepToTopoDS_Root.hxx index b2c1f6988b..96637c843d 100644 --- a/src/StepToTopoDS/StepToTopoDS_Root.hxx +++ b/src/StepToTopoDS/StepToTopoDS_Root.hxx @@ -21,9 +21,6 @@ #include #include -#include -#include - //! This class implements the common services for //! all classes of StepToTopoDS which report error diff --git a/src/StepToTopoDS/StepToTopoDS_Tool.cxx b/src/StepToTopoDS/StepToTopoDS_Tool.cxx index 28d0ff600e..2af7bb52b7 100644 --- a/src/StepToTopoDS/StepToTopoDS_Tool.cxx +++ b/src/StepToTopoDS/StepToTopoDS_Tool.cxx @@ -18,11 +18,7 @@ // (Bind general; BindVertex ?) #include -#include #include -#include -#include -#include #include #include #include diff --git a/src/StepToTopoDS/StepToTopoDS_Tool.hxx b/src/StepToTopoDS/StepToTopoDS_Tool.hxx index bcfaec1fb1..57f45ab26c 100644 --- a/src/StepToTopoDS/StepToTopoDS_Tool.hxx +++ b/src/StepToTopoDS/StepToTopoDS_Tool.hxx @@ -24,7 +24,6 @@ #include #include #include -#include #include class Transfer_TransientProcess; class StepShape_TopologicalRepresentationItem; diff --git a/src/StepToTopoDS/StepToTopoDS_TranslateCompositeCurve.cxx b/src/StepToTopoDS/StepToTopoDS_TranslateCompositeCurve.cxx index f3660ea1f3..6b7ff8382d 100644 --- a/src/StepToTopoDS/StepToTopoDS_TranslateCompositeCurve.cxx +++ b/src/StepToTopoDS/StepToTopoDS_TranslateCompositeCurve.cxx @@ -24,14 +24,12 @@ #include #include #include -#include #include #include #include #include #include #include -#include #include #include #include diff --git a/src/StepToTopoDS/StepToTopoDS_TranslateCompositeCurve.hxx b/src/StepToTopoDS/StepToTopoDS_TranslateCompositeCurve.hxx index 36d4d6c062..74f25802f9 100644 --- a/src/StepToTopoDS/StepToTopoDS_TranslateCompositeCurve.hxx +++ b/src/StepToTopoDS/StepToTopoDS_TranslateCompositeCurve.hxx @@ -22,7 +22,6 @@ #include #include -#include #include class StepGeom_CompositeCurve; class Transfer_TransientProcess; diff --git a/src/StepToTopoDS/StepToTopoDS_TranslateCurveBoundedSurface.cxx b/src/StepToTopoDS/StepToTopoDS_TranslateCurveBoundedSurface.cxx index be35bdd2d7..4849dda6ca 100644 --- a/src/StepToTopoDS/StepToTopoDS_TranslateCurveBoundedSurface.cxx +++ b/src/StepToTopoDS/StepToTopoDS_TranslateCurveBoundedSurface.cxx @@ -30,7 +30,6 @@ #include #include #include -#include #include #include #include diff --git a/src/StepToTopoDS/StepToTopoDS_TranslateCurveBoundedSurface.hxx b/src/StepToTopoDS/StepToTopoDS_TranslateCurveBoundedSurface.hxx index b7d2183bc6..28bf8a26e2 100644 --- a/src/StepToTopoDS/StepToTopoDS_TranslateCurveBoundedSurface.hxx +++ b/src/StepToTopoDS/StepToTopoDS_TranslateCurveBoundedSurface.hxx @@ -23,7 +23,6 @@ #include #include -#include class StepGeom_CurveBoundedSurface; class Transfer_TransientProcess; diff --git a/src/StepToTopoDS/StepToTopoDS_TranslateEdge.cxx b/src/StepToTopoDS/StepToTopoDS_TranslateEdge.cxx index cd34da906c..3b0e2fca74 100644 --- a/src/StepToTopoDS/StepToTopoDS_TranslateEdge.cxx +++ b/src/StepToTopoDS/StepToTopoDS_TranslateEdge.cxx @@ -21,13 +21,11 @@ #include #include #include -#include #include #include #include #include #include -#include #include #include #include @@ -37,13 +35,9 @@ #include #include #include -#include -#include #include -#include #include #include -#include #include #include #include diff --git a/src/StepToTopoDS/StepToTopoDS_TranslateEdge.hxx b/src/StepToTopoDS/StepToTopoDS_TranslateEdge.hxx index 3a8117a8b8..fc2c2ace63 100644 --- a/src/StepToTopoDS/StepToTopoDS_TranslateEdge.hxx +++ b/src/StepToTopoDS/StepToTopoDS_TranslateEdge.hxx @@ -24,7 +24,6 @@ #include #include #include -#include class StepShape_Edge; class StepToTopoDS_Tool; class StepToTopoDS_NMTool; diff --git a/src/StepToTopoDS/StepToTopoDS_TranslateEdgeLoop.cxx b/src/StepToTopoDS/StepToTopoDS_TranslateEdgeLoop.cxx index 9de5910cf6..156197a605 100644 --- a/src/StepToTopoDS/StepToTopoDS_TranslateEdgeLoop.cxx +++ b/src/StepToTopoDS/StepToTopoDS_TranslateEdgeLoop.cxx @@ -23,21 +23,15 @@ // smh 31.01.01 BUC60810 : IsNull protection #include -#include -#include -#include #include #include #include -#include #include -#include #include #include #include #include #include -#include #include #include #include @@ -48,16 +42,11 @@ #include #include #include -#include #include -#include #include -#include -#include #include #include #include -#include #include #include #include @@ -74,7 +63,6 @@ #include #include #include -#include #include #include #include diff --git a/src/StepToTopoDS/StepToTopoDS_TranslateEdgeLoop.hxx b/src/StepToTopoDS/StepToTopoDS_TranslateEdgeLoop.hxx index 878a065f58..bcf0891b67 100644 --- a/src/StepToTopoDS/StepToTopoDS_TranslateEdgeLoop.hxx +++ b/src/StepToTopoDS/StepToTopoDS_TranslateEdgeLoop.hxx @@ -24,7 +24,6 @@ #include #include #include -#include class StepShape_FaceBound; class TopoDS_Face; class Geom_Surface; diff --git a/src/StepToTopoDS/StepToTopoDS_TranslatePolyLoop.cxx b/src/StepToTopoDS/StepToTopoDS_TranslatePolyLoop.cxx index 8ff7483901..2db5e71008 100644 --- a/src/StepToTopoDS/StepToTopoDS_TranslatePolyLoop.cxx +++ b/src/StepToTopoDS/StepToTopoDS_TranslatePolyLoop.cxx @@ -27,10 +27,8 @@ #include #include #include -#include #include #include -#include #include #include #include diff --git a/src/StepToTopoDS/StepToTopoDS_TranslateVertex.cxx b/src/StepToTopoDS/StepToTopoDS_TranslateVertex.cxx index 81449620fa..7d8a79aff3 100644 --- a/src/StepToTopoDS/StepToTopoDS_TranslateVertex.cxx +++ b/src/StepToTopoDS/StepToTopoDS_TranslateVertex.cxx @@ -20,9 +20,6 @@ #include #include #include -#include -#include -#include #include #include #include diff --git a/src/StepVisual/StepVisual_AnnotationCurveOccurrence.cxx b/src/StepVisual/StepVisual_AnnotationCurveOccurrence.cxx index b4a61da531..9f0ee16fff 100644 --- a/src/StepVisual/StepVisual_AnnotationCurveOccurrence.cxx +++ b/src/StepVisual/StepVisual_AnnotationCurveOccurrence.cxx @@ -13,7 +13,6 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -#include #include IMPLEMENT_STANDARD_RTTIEXT(StepVisual_AnnotationCurveOccurrence,StepVisual_AnnotationOccurrence) diff --git a/src/StepVisual/StepVisual_AnnotationCurveOccurrence.hxx b/src/StepVisual/StepVisual_AnnotationCurveOccurrence.hxx index 2cf5f86d78..26d8b94e75 100644 --- a/src/StepVisual/StepVisual_AnnotationCurveOccurrence.hxx +++ b/src/StepVisual/StepVisual_AnnotationCurveOccurrence.hxx @@ -17,7 +17,6 @@ #define _StepVisual_AnnotationCurveOccurrence_HeaderFile #include -#include #include diff --git a/src/StepVisual/StepVisual_AnnotationCurveOccurrenceAndGeomReprItem.hxx b/src/StepVisual/StepVisual_AnnotationCurveOccurrenceAndGeomReprItem.hxx index 1bcd06edd0..d664635d8c 100644 --- a/src/StepVisual/StepVisual_AnnotationCurveOccurrenceAndGeomReprItem.hxx +++ b/src/StepVisual/StepVisual_AnnotationCurveOccurrenceAndGeomReprItem.hxx @@ -17,7 +17,6 @@ #define _StepVisual_AnnotationCurveOccurrenceAndGeomReprItem_HeaderFile #include -#include #include diff --git a/src/StepVisual/StepVisual_AnnotationFillArea.cxx b/src/StepVisual/StepVisual_AnnotationFillArea.cxx index c325d3a469..8c62a27f3f 100644 --- a/src/StepVisual/StepVisual_AnnotationFillArea.cxx +++ b/src/StepVisual/StepVisual_AnnotationFillArea.cxx @@ -14,7 +14,6 @@ // commercial license or contractual agreement. -#include #include IMPLEMENT_STANDARD_RTTIEXT(StepVisual_AnnotationFillArea, StepShape_GeometricCurveSet) diff --git a/src/StepVisual/StepVisual_AnnotationFillArea.hxx b/src/StepVisual/StepVisual_AnnotationFillArea.hxx index c98ed883f3..894c2be477 100644 --- a/src/StepVisual/StepVisual_AnnotationFillArea.hxx +++ b/src/StepVisual/StepVisual_AnnotationFillArea.hxx @@ -17,9 +17,7 @@ #define _StepVisual_AnnotationFillArea_HeaderFile #include -#include -#include #include #include diff --git a/src/StepVisual/StepVisual_AnnotationFillAreaOccurrence.cxx b/src/StepVisual/StepVisual_AnnotationFillAreaOccurrence.cxx index 278b852728..a923383a00 100644 --- a/src/StepVisual/StepVisual_AnnotationFillAreaOccurrence.cxx +++ b/src/StepVisual/StepVisual_AnnotationFillAreaOccurrence.cxx @@ -13,7 +13,6 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -#include #include IMPLEMENT_STANDARD_RTTIEXT(StepVisual_AnnotationFillAreaOccurrence, StepVisual_AnnotationOccurrence) diff --git a/src/StepVisual/StepVisual_AnnotationFillAreaOccurrence.hxx b/src/StepVisual/StepVisual_AnnotationFillAreaOccurrence.hxx index 088d144ac7..5bab443e5c 100644 --- a/src/StepVisual/StepVisual_AnnotationFillAreaOccurrence.hxx +++ b/src/StepVisual/StepVisual_AnnotationFillAreaOccurrence.hxx @@ -17,7 +17,6 @@ #define _StepVisual_AnnotationFillAreaOccurrence_HeaderFile #include -#include #include diff --git a/src/StepVisual/StepVisual_AnnotationOccurrence.cxx b/src/StepVisual/StepVisual_AnnotationOccurrence.cxx index 449feb997b..1fa6753bc1 100644 --- a/src/StepVisual/StepVisual_AnnotationOccurrence.cxx +++ b/src/StepVisual/StepVisual_AnnotationOccurrence.cxx @@ -12,7 +12,6 @@ // commercial license or contractual agreement. -#include #include IMPLEMENT_STANDARD_RTTIEXT(StepVisual_AnnotationOccurrence,StepVisual_StyledItem) diff --git a/src/StepVisual/StepVisual_AnnotationOccurrence.hxx b/src/StepVisual/StepVisual_AnnotationOccurrence.hxx index 6565d1818d..960850cbe9 100644 --- a/src/StepVisual/StepVisual_AnnotationOccurrence.hxx +++ b/src/StepVisual/StepVisual_AnnotationOccurrence.hxx @@ -18,7 +18,6 @@ #define _StepVisual_AnnotationOccurrence_HeaderFile #include -#include #include diff --git a/src/StepVisual/StepVisual_AnnotationPlane.cxx b/src/StepVisual/StepVisual_AnnotationPlane.cxx index 2a46bf1b50..2df85919d7 100644 --- a/src/StepVisual/StepVisual_AnnotationPlane.cxx +++ b/src/StepVisual/StepVisual_AnnotationPlane.cxx @@ -13,7 +13,6 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -#include #include IMPLEMENT_STANDARD_RTTIEXT(StepVisual_AnnotationPlane,StepVisual_AnnotationOccurrence) diff --git a/src/StepVisual/StepVisual_AnnotationPlane.hxx b/src/StepVisual/StepVisual_AnnotationPlane.hxx index d8dfcf0502..a64e64763b 100644 --- a/src/StepVisual/StepVisual_AnnotationPlane.hxx +++ b/src/StepVisual/StepVisual_AnnotationPlane.hxx @@ -17,7 +17,6 @@ #define _StepVisual_AnnotationPlane_HeaderFile #include -#include #include #include diff --git a/src/StepVisual/StepVisual_AnnotationTextOccurrence.cxx b/src/StepVisual/StepVisual_AnnotationTextOccurrence.cxx index b287d89943..8b2348e84f 100644 --- a/src/StepVisual/StepVisual_AnnotationTextOccurrence.cxx +++ b/src/StepVisual/StepVisual_AnnotationTextOccurrence.cxx @@ -12,7 +12,6 @@ // commercial license or contractual agreement. -#include #include IMPLEMENT_STANDARD_RTTIEXT(StepVisual_AnnotationTextOccurrence,StepVisual_AnnotationOccurrence) diff --git a/src/StepVisual/StepVisual_AnnotationTextOccurrence.hxx b/src/StepVisual/StepVisual_AnnotationTextOccurrence.hxx index 611b7d01cb..edaa691bf9 100644 --- a/src/StepVisual/StepVisual_AnnotationTextOccurrence.hxx +++ b/src/StepVisual/StepVisual_AnnotationTextOccurrence.hxx @@ -18,7 +18,6 @@ #define _StepVisual_AnnotationTextOccurrence_HeaderFile #include -#include #include diff --git a/src/StepVisual/StepVisual_BackgroundColour.cxx b/src/StepVisual/StepVisual_BackgroundColour.cxx index 3f69e6d95e..68e05026b7 100644 --- a/src/StepVisual/StepVisual_BackgroundColour.cxx +++ b/src/StepVisual/StepVisual_BackgroundColour.cxx @@ -12,8 +12,6 @@ // commercial license or contractual agreement. -#include -#include #include IMPLEMENT_STANDARD_RTTIEXT(StepVisual_BackgroundColour,StepVisual_Colour) diff --git a/src/StepVisual/StepVisual_BackgroundColour.hxx b/src/StepVisual/StepVisual_BackgroundColour.hxx index 0bdc13bd96..df300d320e 100644 --- a/src/StepVisual/StepVisual_BackgroundColour.hxx +++ b/src/StepVisual/StepVisual_BackgroundColour.hxx @@ -18,7 +18,6 @@ #define _StepVisual_BackgroundColour_HeaderFile #include -#include #include #include diff --git a/src/StepVisual/StepVisual_BoxCharacteristicSelect.hxx b/src/StepVisual/StepVisual_BoxCharacteristicSelect.hxx index 8123bdc659..2a5e5910de 100644 --- a/src/StepVisual/StepVisual_BoxCharacteristicSelect.hxx +++ b/src/StepVisual/StepVisual_BoxCharacteristicSelect.hxx @@ -22,8 +22,6 @@ #include #include -#include - class StepVisual_BoxCharacteristicSelect diff --git a/src/StepVisual/StepVisual_CameraModelD2.cxx b/src/StepVisual/StepVisual_CameraModelD2.cxx index c08794a2ea..3409e4b941 100644 --- a/src/StepVisual/StepVisual_CameraModelD2.cxx +++ b/src/StepVisual/StepVisual_CameraModelD2.cxx @@ -12,7 +12,6 @@ // commercial license or contractual agreement. -#include #include #include #include diff --git a/src/StepVisual/StepVisual_CameraModelD3.cxx b/src/StepVisual/StepVisual_CameraModelD3.cxx index 8f9dada7a7..2fe19d47cb 100644 --- a/src/StepVisual/StepVisual_CameraModelD3.cxx +++ b/src/StepVisual/StepVisual_CameraModelD3.cxx @@ -12,7 +12,6 @@ // commercial license or contractual agreement. -#include #include #include #include diff --git a/src/StepVisual/StepVisual_CameraModelD3MultiClipping.cxx b/src/StepVisual/StepVisual_CameraModelD3MultiClipping.cxx index 192702a31a..3dde8d9b54 100644 --- a/src/StepVisual/StepVisual_CameraModelD3MultiClipping.cxx +++ b/src/StepVisual/StepVisual_CameraModelD3MultiClipping.cxx @@ -14,7 +14,6 @@ // commercial license or contractual agreement. -#include #include #include #include diff --git a/src/StepVisual/StepVisual_CameraModelD3MultiClippingIntersection.cxx b/src/StepVisual/StepVisual_CameraModelD3MultiClippingIntersection.cxx index 10e92918d1..6a49a90c15 100644 --- a/src/StepVisual/StepVisual_CameraModelD3MultiClippingIntersection.cxx +++ b/src/StepVisual/StepVisual_CameraModelD3MultiClippingIntersection.cxx @@ -14,7 +14,6 @@ // commercial license or contractual agreement. -#include #include #include diff --git a/src/StepVisual/StepVisual_CameraModelD3MultiClippingUnion.cxx b/src/StepVisual/StepVisual_CameraModelD3MultiClippingUnion.cxx index 4173a14328..719e344c7f 100644 --- a/src/StepVisual/StepVisual_CameraModelD3MultiClippingUnion.cxx +++ b/src/StepVisual/StepVisual_CameraModelD3MultiClippingUnion.cxx @@ -14,7 +14,6 @@ // commercial license or contractual agreement. -#include #include #include diff --git a/src/StepVisual/StepVisual_ColourRgb.cxx b/src/StepVisual/StepVisual_ColourRgb.cxx index b60ac7c8db..a2404c861f 100644 --- a/src/StepVisual/StepVisual_ColourRgb.cxx +++ b/src/StepVisual/StepVisual_ColourRgb.cxx @@ -12,7 +12,6 @@ // commercial license or contractual agreement. -#include #include #include diff --git a/src/StepVisual/StepVisual_ColourSpecification.cxx b/src/StepVisual/StepVisual_ColourSpecification.cxx index 1456b9f8bc..8a03635c9e 100644 --- a/src/StepVisual/StepVisual_ColourSpecification.cxx +++ b/src/StepVisual/StepVisual_ColourSpecification.cxx @@ -12,7 +12,6 @@ // commercial license or contractual agreement. -#include #include #include diff --git a/src/StepVisual/StepVisual_CompositeText.cxx b/src/StepVisual/StepVisual_CompositeText.cxx index b460bb7d70..48d1f82aaa 100644 --- a/src/StepVisual/StepVisual_CompositeText.cxx +++ b/src/StepVisual/StepVisual_CompositeText.cxx @@ -12,7 +12,6 @@ // commercial license or contractual agreement. -#include #include #include #include diff --git a/src/StepVisual/StepVisual_CompositeText.hxx b/src/StepVisual/StepVisual_CompositeText.hxx index 5e3d1ab692..8d460ec7b1 100644 --- a/src/StepVisual/StepVisual_CompositeText.hxx +++ b/src/StepVisual/StepVisual_CompositeText.hxx @@ -18,7 +18,6 @@ #define _StepVisual_CompositeText_HeaderFile #include -#include #include #include diff --git a/src/StepVisual/StepVisual_CompositeTextWithExtent.cxx b/src/StepVisual/StepVisual_CompositeTextWithExtent.cxx index 41272de0f1..f1c2e6108f 100644 --- a/src/StepVisual/StepVisual_CompositeTextWithExtent.cxx +++ b/src/StepVisual/StepVisual_CompositeTextWithExtent.cxx @@ -12,7 +12,6 @@ // commercial license or contractual agreement. -#include #include #include #include diff --git a/src/StepVisual/StepVisual_CompositeTextWithExtent.hxx b/src/StepVisual/StepVisual_CompositeTextWithExtent.hxx index 52023d3bac..fe35d57785 100644 --- a/src/StepVisual/StepVisual_CompositeTextWithExtent.hxx +++ b/src/StepVisual/StepVisual_CompositeTextWithExtent.hxx @@ -18,7 +18,6 @@ #define _StepVisual_CompositeTextWithExtent_HeaderFile #include -#include #include #include diff --git a/src/StepVisual/StepVisual_ContextDependentInvisibility.cxx b/src/StepVisual/StepVisual_ContextDependentInvisibility.cxx index 4c5fb9a2b0..b3f0e73b0b 100644 --- a/src/StepVisual/StepVisual_ContextDependentInvisibility.cxx +++ b/src/StepVisual/StepVisual_ContextDependentInvisibility.cxx @@ -12,7 +12,6 @@ // commercial license or contractual agreement. -#include #include #include diff --git a/src/StepVisual/StepVisual_ContextDependentInvisibility.hxx b/src/StepVisual/StepVisual_ContextDependentInvisibility.hxx index eeb582eb3f..4bed257649 100644 --- a/src/StepVisual/StepVisual_ContextDependentInvisibility.hxx +++ b/src/StepVisual/StepVisual_ContextDependentInvisibility.hxx @@ -18,7 +18,6 @@ #define _StepVisual_ContextDependentInvisibility_HeaderFile #include -#include #include #include diff --git a/src/StepVisual/StepVisual_ContextDependentOverRidingStyledItem.cxx b/src/StepVisual/StepVisual_ContextDependentOverRidingStyledItem.cxx index 4f18aa9d6b..17d8106721 100644 --- a/src/StepVisual/StepVisual_ContextDependentOverRidingStyledItem.cxx +++ b/src/StepVisual/StepVisual_ContextDependentOverRidingStyledItem.cxx @@ -12,8 +12,6 @@ // commercial license or contractual agreement. -#include -#include #include #include #include diff --git a/src/StepVisual/StepVisual_ContextDependentOverRidingStyledItem.hxx b/src/StepVisual/StepVisual_ContextDependentOverRidingStyledItem.hxx index 591ae6ad41..5b8177a96f 100644 --- a/src/StepVisual/StepVisual_ContextDependentOverRidingStyledItem.hxx +++ b/src/StepVisual/StepVisual_ContextDependentOverRidingStyledItem.hxx @@ -18,7 +18,6 @@ #define _StepVisual_ContextDependentOverRidingStyledItem_HeaderFile #include -#include #include #include diff --git a/src/StepVisual/StepVisual_CoordinatesList.cxx b/src/StepVisual/StepVisual_CoordinatesList.cxx index c339d8d3c6..7caab6b96c 100644 --- a/src/StepVisual/StepVisual_CoordinatesList.cxx +++ b/src/StepVisual/StepVisual_CoordinatesList.cxx @@ -12,7 +12,6 @@ // commercial license or contractual agreement. -#include #include #include IMPLEMENT_STANDARD_RTTIEXT(StepVisual_CoordinatesList,StepGeom_TessellatedItem) diff --git a/src/StepVisual/StepVisual_CurveStyle.cxx b/src/StepVisual/StepVisual_CurveStyle.cxx index f276f54f59..5a1f64c905 100644 --- a/src/StepVisual/StepVisual_CurveStyle.cxx +++ b/src/StepVisual/StepVisual_CurveStyle.cxx @@ -12,8 +12,6 @@ // commercial license or contractual agreement. -#include -#include #include #include #include diff --git a/src/StepVisual/StepVisual_CurveStyleFont.cxx b/src/StepVisual/StepVisual_CurveStyleFont.cxx index ef56db0115..00910837de 100644 --- a/src/StepVisual/StepVisual_CurveStyleFont.cxx +++ b/src/StepVisual/StepVisual_CurveStyleFont.cxx @@ -12,7 +12,6 @@ // commercial license or contractual agreement. -#include #include #include #include diff --git a/src/StepVisual/StepVisual_CurveStyleFontPattern.hxx b/src/StepVisual/StepVisual_CurveStyleFontPattern.hxx index ea40e93450..eeca58dc00 100644 --- a/src/StepVisual/StepVisual_CurveStyleFontPattern.hxx +++ b/src/StepVisual/StepVisual_CurveStyleFontPattern.hxx @@ -20,7 +20,6 @@ #include #include -#include #include diff --git a/src/StepVisual/StepVisual_DirectionCountSelect.hxx b/src/StepVisual/StepVisual_DirectionCountSelect.hxx index 3256cec85e..2c15e0f92e 100644 --- a/src/StepVisual/StepVisual_DirectionCountSelect.hxx +++ b/src/StepVisual/StepVisual_DirectionCountSelect.hxx @@ -21,9 +21,6 @@ #include #include -#include - - class StepVisual_DirectionCountSelect { diff --git a/src/StepVisual/StepVisual_DraughtingAnnotationOccurrence.cxx b/src/StepVisual/StepVisual_DraughtingAnnotationOccurrence.cxx index 62f052e59c..c6186d81fe 100644 --- a/src/StepVisual/StepVisual_DraughtingAnnotationOccurrence.cxx +++ b/src/StepVisual/StepVisual_DraughtingAnnotationOccurrence.cxx @@ -12,7 +12,6 @@ // commercial license or contractual agreement. -#include #include IMPLEMENT_STANDARD_RTTIEXT(StepVisual_DraughtingAnnotationOccurrence,StepVisual_AnnotationOccurrence) diff --git a/src/StepVisual/StepVisual_DraughtingAnnotationOccurrence.hxx b/src/StepVisual/StepVisual_DraughtingAnnotationOccurrence.hxx index 071a8a9df2..b4dbc0091e 100644 --- a/src/StepVisual/StepVisual_DraughtingAnnotationOccurrence.hxx +++ b/src/StepVisual/StepVisual_DraughtingAnnotationOccurrence.hxx @@ -18,7 +18,6 @@ #define _StepVisual_DraughtingAnnotationOccurrence_HeaderFile #include -#include #include diff --git a/src/StepVisual/StepVisual_DraughtingCallout.cxx b/src/StepVisual/StepVisual_DraughtingCallout.cxx index 78af2e3d61..8576620d88 100644 --- a/src/StepVisual/StepVisual_DraughtingCallout.cxx +++ b/src/StepVisual/StepVisual_DraughtingCallout.cxx @@ -13,7 +13,6 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -#include #include IMPLEMENT_STANDARD_RTTIEXT(StepVisual_DraughtingCallout,StepGeom_GeometricRepresentationItem) diff --git a/src/StepVisual/StepVisual_DraughtingCallout.hxx b/src/StepVisual/StepVisual_DraughtingCallout.hxx index ef39ef48a2..22ee5de04e 100644 --- a/src/StepVisual/StepVisual_DraughtingCallout.hxx +++ b/src/StepVisual/StepVisual_DraughtingCallout.hxx @@ -17,7 +17,6 @@ #define _StepVisual_DraughtingCallout_HeaderFile #include -#include #include #include diff --git a/src/StepVisual/StepVisual_ExternallyDefinedCurveFont.cxx b/src/StepVisual/StepVisual_ExternallyDefinedCurveFont.cxx index 4ba14177c4..624d5a02c7 100644 --- a/src/StepVisual/StepVisual_ExternallyDefinedCurveFont.cxx +++ b/src/StepVisual/StepVisual_ExternallyDefinedCurveFont.cxx @@ -15,7 +15,6 @@ // Generator: ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V1.1 -#include #include IMPLEMENT_STANDARD_RTTIEXT(StepVisual_ExternallyDefinedCurveFont,StepBasic_ExternallyDefinedItem) diff --git a/src/StepVisual/StepVisual_ExternallyDefinedCurveFont.hxx b/src/StepVisual/StepVisual_ExternallyDefinedCurveFont.hxx index 847cfbdd39..5b1b504ff6 100644 --- a/src/StepVisual/StepVisual_ExternallyDefinedCurveFont.hxx +++ b/src/StepVisual/StepVisual_ExternallyDefinedCurveFont.hxx @@ -17,7 +17,6 @@ #define _StepVisual_ExternallyDefinedCurveFont_HeaderFile #include -#include #include diff --git a/src/StepVisual/StepVisual_ExternallyDefinedTextFont.cxx b/src/StepVisual/StepVisual_ExternallyDefinedTextFont.cxx index 53790405ce..260474a3d8 100644 --- a/src/StepVisual/StepVisual_ExternallyDefinedTextFont.cxx +++ b/src/StepVisual/StepVisual_ExternallyDefinedTextFont.cxx @@ -15,7 +15,6 @@ // Generator: ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V1.1 -#include #include IMPLEMENT_STANDARD_RTTIEXT(StepVisual_ExternallyDefinedTextFont,StepBasic_ExternallyDefinedItem) diff --git a/src/StepVisual/StepVisual_ExternallyDefinedTextFont.hxx b/src/StepVisual/StepVisual_ExternallyDefinedTextFont.hxx index 09f45724f9..7f99c5714b 100644 --- a/src/StepVisual/StepVisual_ExternallyDefinedTextFont.hxx +++ b/src/StepVisual/StepVisual_ExternallyDefinedTextFont.hxx @@ -17,7 +17,6 @@ #define _StepVisual_ExternallyDefinedTextFont_HeaderFile #include -#include #include diff --git a/src/StepVisual/StepVisual_FillAreaStyle.cxx b/src/StepVisual/StepVisual_FillAreaStyle.cxx index f6030eea4d..d02e223245 100644 --- a/src/StepVisual/StepVisual_FillAreaStyle.cxx +++ b/src/StepVisual/StepVisual_FillAreaStyle.cxx @@ -12,7 +12,6 @@ // commercial license or contractual agreement. -#include #include #include #include diff --git a/src/StepVisual/StepVisual_FillAreaStyle.hxx b/src/StepVisual/StepVisual_FillAreaStyle.hxx index 465f4c3a79..6b9e30251d 100644 --- a/src/StepVisual/StepVisual_FillAreaStyle.hxx +++ b/src/StepVisual/StepVisual_FillAreaStyle.hxx @@ -18,7 +18,6 @@ #define _StepVisual_FillAreaStyle_HeaderFile #include -#include #include #include diff --git a/src/StepVisual/StepVisual_FillAreaStyleColour.cxx b/src/StepVisual/StepVisual_FillAreaStyleColour.cxx index 2f142abe4d..4073eacc1a 100644 --- a/src/StepVisual/StepVisual_FillAreaStyleColour.cxx +++ b/src/StepVisual/StepVisual_FillAreaStyleColour.cxx @@ -12,7 +12,6 @@ // commercial license or contractual agreement. -#include #include #include #include diff --git a/src/StepVisual/StepVisual_HArray1OfAnnotationPlaneElement.hxx b/src/StepVisual/StepVisual_HArray1OfAnnotationPlaneElement.hxx index 543bff2d45..7bc5928521 100644 --- a/src/StepVisual/StepVisual_HArray1OfAnnotationPlaneElement.hxx +++ b/src/StepVisual/StepVisual_HArray1OfAnnotationPlaneElement.hxx @@ -16,7 +16,6 @@ #ifndef _StepVisual_HArray1OfAnnotationPlaneElement_HeaderFile #define _StepVisual_HArray1OfAnnotationPlaneElement_HeaderFile -#include #include #include diff --git a/src/StepVisual/StepVisual_HArray1OfBoxCharacteristicSelect.hxx b/src/StepVisual/StepVisual_HArray1OfBoxCharacteristicSelect.hxx index 252375fb66..a07c17d7f3 100644 --- a/src/StepVisual/StepVisual_HArray1OfBoxCharacteristicSelect.hxx +++ b/src/StepVisual/StepVisual_HArray1OfBoxCharacteristicSelect.hxx @@ -17,7 +17,6 @@ #ifndef StepVisual_HArray1OfBoxCharacteristicSelect_HeaderFile #define StepVisual_HArray1OfBoxCharacteristicSelect_HeaderFile -#include #include #include diff --git a/src/StepVisual/StepVisual_HArray1OfCameraModelD3MultiClippingInterectionSelect.hxx b/src/StepVisual/StepVisual_HArray1OfCameraModelD3MultiClippingInterectionSelect.hxx index 24597001eb..4e713a43aa 100644 --- a/src/StepVisual/StepVisual_HArray1OfCameraModelD3MultiClippingInterectionSelect.hxx +++ b/src/StepVisual/StepVisual_HArray1OfCameraModelD3MultiClippingInterectionSelect.hxx @@ -16,7 +16,6 @@ #ifndef _StepVisual_HArray1OfCameraModelD3MultiClippingInterectionSelect_HeaderFile #define _StepVisual_HArray1OfCameraModelD3MultiClippingInterectionSelect_HeaderFile -#include #include #include diff --git a/src/StepVisual/StepVisual_HArray1OfCameraModelD3MultiClippingUnionSelect.hxx b/src/StepVisual/StepVisual_HArray1OfCameraModelD3MultiClippingUnionSelect.hxx index 6ff1fb1994..6b9715f7fe 100644 --- a/src/StepVisual/StepVisual_HArray1OfCameraModelD3MultiClippingUnionSelect.hxx +++ b/src/StepVisual/StepVisual_HArray1OfCameraModelD3MultiClippingUnionSelect.hxx @@ -16,7 +16,6 @@ #ifndef _StepVisual_HArray1OfCameraModelD3MultiClippingUnionSelect_HeaderFile #define _StepVisual_HArray1OfCameraModelD3MultiClippingUnionSelect_HeaderFile -#include #include #include diff --git a/src/StepVisual/StepVisual_HArray1OfCurveStyleFontPattern.hxx b/src/StepVisual/StepVisual_HArray1OfCurveStyleFontPattern.hxx index edb6712152..2cd5df2ec9 100644 --- a/src/StepVisual/StepVisual_HArray1OfCurveStyleFontPattern.hxx +++ b/src/StepVisual/StepVisual_HArray1OfCurveStyleFontPattern.hxx @@ -17,7 +17,6 @@ #ifndef StepVisual_HArray1OfCurveStyleFontPattern_HeaderFile #define StepVisual_HArray1OfCurveStyleFontPattern_HeaderFile -#include #include #include diff --git a/src/StepVisual/StepVisual_HArray1OfDirectionCountSelect.hxx b/src/StepVisual/StepVisual_HArray1OfDirectionCountSelect.hxx index ffebae5350..3cf48b555a 100644 --- a/src/StepVisual/StepVisual_HArray1OfDirectionCountSelect.hxx +++ b/src/StepVisual/StepVisual_HArray1OfDirectionCountSelect.hxx @@ -17,7 +17,6 @@ #ifndef StepVisual_HArray1OfDirectionCountSelect_HeaderFile #define StepVisual_HArray1OfDirectionCountSelect_HeaderFile -#include #include #include diff --git a/src/StepVisual/StepVisual_HArray1OfDraughtingCalloutElement.hxx b/src/StepVisual/StepVisual_HArray1OfDraughtingCalloutElement.hxx index f8c23f4e07..dc53378dd1 100644 --- a/src/StepVisual/StepVisual_HArray1OfDraughtingCalloutElement.hxx +++ b/src/StepVisual/StepVisual_HArray1OfDraughtingCalloutElement.hxx @@ -16,7 +16,6 @@ #ifndef _StepVisual_HArray1OfDraughtingCalloutElement_HeaderFile #define _StepVisual_HArray1OfDraughtingCalloutElement_HeaderFile -#include #include #include diff --git a/src/StepVisual/StepVisual_HArray1OfFillStyleSelect.hxx b/src/StepVisual/StepVisual_HArray1OfFillStyleSelect.hxx index 8c491e79c3..c0ae336614 100644 --- a/src/StepVisual/StepVisual_HArray1OfFillStyleSelect.hxx +++ b/src/StepVisual/StepVisual_HArray1OfFillStyleSelect.hxx @@ -17,7 +17,6 @@ #ifndef StepVisual_HArray1OfFillStyleSelect_HeaderFile #define StepVisual_HArray1OfFillStyleSelect_HeaderFile -#include #include #include diff --git a/src/StepVisual/StepVisual_HArray1OfInvisibleItem.hxx b/src/StepVisual/StepVisual_HArray1OfInvisibleItem.hxx index 0fbc286119..1c9fa5a653 100644 --- a/src/StepVisual/StepVisual_HArray1OfInvisibleItem.hxx +++ b/src/StepVisual/StepVisual_HArray1OfInvisibleItem.hxx @@ -17,7 +17,6 @@ #ifndef StepVisual_HArray1OfInvisibleItem_HeaderFile #define StepVisual_HArray1OfInvisibleItem_HeaderFile -#include #include #include diff --git a/src/StepVisual/StepVisual_HArray1OfLayeredItem.hxx b/src/StepVisual/StepVisual_HArray1OfLayeredItem.hxx index 587d490ccf..e4eb5b5e6b 100644 --- a/src/StepVisual/StepVisual_HArray1OfLayeredItem.hxx +++ b/src/StepVisual/StepVisual_HArray1OfLayeredItem.hxx @@ -17,7 +17,6 @@ #ifndef StepVisual_HArray1OfLayeredItem_HeaderFile #define StepVisual_HArray1OfLayeredItem_HeaderFile -#include #include #include diff --git a/src/StepVisual/StepVisual_HArray1OfPresentationStyleAssignment.hxx b/src/StepVisual/StepVisual_HArray1OfPresentationStyleAssignment.hxx index a3cf9f0cc0..70a919d589 100644 --- a/src/StepVisual/StepVisual_HArray1OfPresentationStyleAssignment.hxx +++ b/src/StepVisual/StepVisual_HArray1OfPresentationStyleAssignment.hxx @@ -17,7 +17,6 @@ #ifndef StepVisual_HArray1OfPresentationStyleAssignment_HeaderFile #define StepVisual_HArray1OfPresentationStyleAssignment_HeaderFile -#include #include #include diff --git a/src/StepVisual/StepVisual_HArray1OfPresentationStyleSelect.hxx b/src/StepVisual/StepVisual_HArray1OfPresentationStyleSelect.hxx index d81ed4948a..c94886f641 100644 --- a/src/StepVisual/StepVisual_HArray1OfPresentationStyleSelect.hxx +++ b/src/StepVisual/StepVisual_HArray1OfPresentationStyleSelect.hxx @@ -17,7 +17,6 @@ #ifndef StepVisual_HArray1OfPresentationStyleSelect_HeaderFile #define StepVisual_HArray1OfPresentationStyleSelect_HeaderFile -#include #include #include diff --git a/src/StepVisual/StepVisual_HArray1OfRenderingPropertiesSelect.hxx b/src/StepVisual/StepVisual_HArray1OfRenderingPropertiesSelect.hxx index 62f713725f..421541797a 100644 --- a/src/StepVisual/StepVisual_HArray1OfRenderingPropertiesSelect.hxx +++ b/src/StepVisual/StepVisual_HArray1OfRenderingPropertiesSelect.hxx @@ -17,7 +17,6 @@ #ifndef StepVisual_HArray1OfRenderingPropertiesSelect_HeaderFile #define StepVisual_HArray1OfRenderingPropertiesSelect_HeaderFile -#include #include #include diff --git a/src/StepVisual/StepVisual_HArray1OfStyleContextSelect.hxx b/src/StepVisual/StepVisual_HArray1OfStyleContextSelect.hxx index 5f05e9dce7..bf9a2dd2d3 100644 --- a/src/StepVisual/StepVisual_HArray1OfStyleContextSelect.hxx +++ b/src/StepVisual/StepVisual_HArray1OfStyleContextSelect.hxx @@ -17,7 +17,6 @@ #ifndef StepVisual_HArray1OfStyleContextSelect_HeaderFile #define StepVisual_HArray1OfStyleContextSelect_HeaderFile -#include #include #include diff --git a/src/StepVisual/StepVisual_HArray1OfSurfaceStyleElementSelect.hxx b/src/StepVisual/StepVisual_HArray1OfSurfaceStyleElementSelect.hxx index 192de0ea91..756502f409 100644 --- a/src/StepVisual/StepVisual_HArray1OfSurfaceStyleElementSelect.hxx +++ b/src/StepVisual/StepVisual_HArray1OfSurfaceStyleElementSelect.hxx @@ -17,7 +17,6 @@ #ifndef StepVisual_HArray1OfSurfaceStyleElementSelect_HeaderFile #define StepVisual_HArray1OfSurfaceStyleElementSelect_HeaderFile -#include #include #include diff --git a/src/StepVisual/StepVisual_Invisibility.cxx b/src/StepVisual/StepVisual_Invisibility.cxx index 3b0b24e75b..2167bb8d95 100644 --- a/src/StepVisual/StepVisual_Invisibility.cxx +++ b/src/StepVisual/StepVisual_Invisibility.cxx @@ -12,7 +12,6 @@ // commercial license or contractual agreement. -#include #include #include diff --git a/src/StepVisual/StepVisual_Invisibility.hxx b/src/StepVisual/StepVisual_Invisibility.hxx index 77ba3a17c9..fc0f1b38d7 100644 --- a/src/StepVisual/StepVisual_Invisibility.hxx +++ b/src/StepVisual/StepVisual_Invisibility.hxx @@ -18,7 +18,6 @@ #define _StepVisual_Invisibility_HeaderFile #include -#include #include #include diff --git a/src/StepVisual/StepVisual_LayeredItem.cxx b/src/StepVisual/StepVisual_LayeredItem.cxx index d5c8d00706..be6fbcb3ba 100644 --- a/src/StepVisual/StepVisual_LayeredItem.cxx +++ b/src/StepVisual/StepVisual_LayeredItem.cxx @@ -14,7 +14,6 @@ #include #include -#include #include #include diff --git a/src/StepVisual/StepVisual_MarkerMember.cxx b/src/StepVisual/StepVisual_MarkerMember.cxx index 6efe172bd9..54382f31f7 100644 --- a/src/StepVisual/StepVisual_MarkerMember.cxx +++ b/src/StepVisual/StepVisual_MarkerMember.cxx @@ -12,7 +12,6 @@ // commercial license or contractual agreement. -#include #include #include #include diff --git a/src/StepVisual/StepVisual_MarkerMember.hxx b/src/StepVisual/StepVisual_MarkerMember.hxx index af0facabdc..0e6dfd5aa2 100644 --- a/src/StepVisual/StepVisual_MarkerMember.hxx +++ b/src/StepVisual/StepVisual_MarkerMember.hxx @@ -21,8 +21,6 @@ #include #include -#include -#include #include #include diff --git a/src/StepVisual/StepVisual_NullStyle.hxx b/src/StepVisual/StepVisual_NullStyle.hxx index 6eff163166..1eb9583e94 100644 --- a/src/StepVisual/StepVisual_NullStyle.hxx +++ b/src/StepVisual/StepVisual_NullStyle.hxx @@ -16,8 +16,6 @@ #ifndef _StepVisual_NullStyle_HeaderFile #define _StepVisual_NullStyle_HeaderFile -#include - enum StepVisual_NullStyle { StepVisual_Null }; diff --git a/src/StepVisual/StepVisual_OverRidingStyledItem.cxx b/src/StepVisual/StepVisual_OverRidingStyledItem.cxx index 445dafc17e..88e4597b3e 100644 --- a/src/StepVisual/StepVisual_OverRidingStyledItem.cxx +++ b/src/StepVisual/StepVisual_OverRidingStyledItem.cxx @@ -12,8 +12,6 @@ // commercial license or contractual agreement. -#include -#include #include #include #include diff --git a/src/StepVisual/StepVisual_OverRidingStyledItem.hxx b/src/StepVisual/StepVisual_OverRidingStyledItem.hxx index 87657c926d..cc3dfda5f6 100644 --- a/src/StepVisual/StepVisual_OverRidingStyledItem.hxx +++ b/src/StepVisual/StepVisual_OverRidingStyledItem.hxx @@ -18,7 +18,6 @@ #define _StepVisual_OverRidingStyledItem_HeaderFile #include -#include #include #include diff --git a/src/StepVisual/StepVisual_PlanarBox.cxx b/src/StepVisual/StepVisual_PlanarBox.cxx index 1756007d17..7eb2e72a81 100644 --- a/src/StepVisual/StepVisual_PlanarBox.cxx +++ b/src/StepVisual/StepVisual_PlanarBox.cxx @@ -12,8 +12,6 @@ // commercial license or contractual agreement. -#include -#include #include #include diff --git a/src/StepVisual/StepVisual_PlanarBox.hxx b/src/StepVisual/StepVisual_PlanarBox.hxx index 1f0b5bdee6..0422a35323 100644 --- a/src/StepVisual/StepVisual_PlanarBox.hxx +++ b/src/StepVisual/StepVisual_PlanarBox.hxx @@ -18,7 +18,6 @@ #define _StepVisual_PlanarBox_HeaderFile #include -#include #include #include diff --git a/src/StepVisual/StepVisual_PlanarExtent.cxx b/src/StepVisual/StepVisual_PlanarExtent.cxx index 6df0eb6961..3ecd84df85 100644 --- a/src/StepVisual/StepVisual_PlanarExtent.cxx +++ b/src/StepVisual/StepVisual_PlanarExtent.cxx @@ -12,7 +12,6 @@ // commercial license or contractual agreement. -#include #include #include diff --git a/src/StepVisual/StepVisual_PointStyle.cxx b/src/StepVisual/StepVisual_PointStyle.cxx index 824113b13d..93cb10a525 100644 --- a/src/StepVisual/StepVisual_PointStyle.cxx +++ b/src/StepVisual/StepVisual_PointStyle.cxx @@ -12,10 +12,7 @@ // commercial license or contractual agreement. -#include -#include #include -#include #include #include diff --git a/src/StepVisual/StepVisual_PreDefinedItem.cxx b/src/StepVisual/StepVisual_PreDefinedItem.cxx index 412d5a7fd8..63632c5790 100644 --- a/src/StepVisual/StepVisual_PreDefinedItem.cxx +++ b/src/StepVisual/StepVisual_PreDefinedItem.cxx @@ -12,7 +12,6 @@ // commercial license or contractual agreement. -#include #include #include diff --git a/src/StepVisual/StepVisual_PresentationLayerAssignment.cxx b/src/StepVisual/StepVisual_PresentationLayerAssignment.cxx index 4b7a7378bc..b29fe21014 100644 --- a/src/StepVisual/StepVisual_PresentationLayerAssignment.cxx +++ b/src/StepVisual/StepVisual_PresentationLayerAssignment.cxx @@ -12,8 +12,6 @@ // commercial license or contractual agreement. -#include -#include #include #include diff --git a/src/StepVisual/StepVisual_PresentationLayerUsage.cxx b/src/StepVisual/StepVisual_PresentationLayerUsage.cxx index 424986cd33..6d422996aa 100644 --- a/src/StepVisual/StepVisual_PresentationLayerUsage.cxx +++ b/src/StepVisual/StepVisual_PresentationLayerUsage.cxx @@ -12,7 +12,6 @@ // commercial license or contractual agreement. -#include #include #include #include diff --git a/src/StepVisual/StepVisual_PresentationSize.cxx b/src/StepVisual/StepVisual_PresentationSize.cxx index 0559ceceab..57cab2552a 100644 --- a/src/StepVisual/StepVisual_PresentationSize.cxx +++ b/src/StepVisual/StepVisual_PresentationSize.cxx @@ -12,7 +12,6 @@ // commercial license or contractual agreement. -#include #include #include #include diff --git a/src/StepVisual/StepVisual_PresentationStyleAssignment.cxx b/src/StepVisual/StepVisual_PresentationStyleAssignment.cxx index 50a71fb7d7..52ca6c8328 100644 --- a/src/StepVisual/StepVisual_PresentationStyleAssignment.cxx +++ b/src/StepVisual/StepVisual_PresentationStyleAssignment.cxx @@ -12,7 +12,6 @@ // commercial license or contractual agreement. -#include #include #include diff --git a/src/StepVisual/StepVisual_PresentationStyleAssignment.hxx b/src/StepVisual/StepVisual_PresentationStyleAssignment.hxx index 86374428bc..d9a28b1f79 100644 --- a/src/StepVisual/StepVisual_PresentationStyleAssignment.hxx +++ b/src/StepVisual/StepVisual_PresentationStyleAssignment.hxx @@ -18,7 +18,6 @@ #define _StepVisual_PresentationStyleAssignment_HeaderFile #include -#include #include #include diff --git a/src/StepVisual/StepVisual_PresentationStyleByContext.cxx b/src/StepVisual/StepVisual_PresentationStyleByContext.cxx index 73c82f43f4..c20511f242 100644 --- a/src/StepVisual/StepVisual_PresentationStyleByContext.cxx +++ b/src/StepVisual/StepVisual_PresentationStyleByContext.cxx @@ -12,7 +12,6 @@ // commercial license or contractual agreement. -#include #include #include diff --git a/src/StepVisual/StepVisual_PresentationStyleByContext.hxx b/src/StepVisual/StepVisual_PresentationStyleByContext.hxx index 84ad0f4a3b..dbc53fd5bc 100644 --- a/src/StepVisual/StepVisual_PresentationStyleByContext.hxx +++ b/src/StepVisual/StepVisual_PresentationStyleByContext.hxx @@ -18,7 +18,6 @@ #define _StepVisual_PresentationStyleByContext_HeaderFile #include -#include #include #include diff --git a/src/StepVisual/StepVisual_PresentationStyleSelect.cxx b/src/StepVisual/StepVisual_PresentationStyleSelect.cxx index 3e67e19c3e..080bfc3c9d 100644 --- a/src/StepVisual/StepVisual_PresentationStyleSelect.cxx +++ b/src/StepVisual/StepVisual_PresentationStyleSelect.cxx @@ -20,7 +20,6 @@ #include #include #include -#include StepVisual_PresentationStyleSelect::StepVisual_PresentationStyleSelect () { } diff --git a/src/StepVisual/StepVisual_PresentedItemRepresentation.cxx b/src/StepVisual/StepVisual_PresentedItemRepresentation.cxx index 75a629f8f8..bb057ed467 100644 --- a/src/StepVisual/StepVisual_PresentedItemRepresentation.cxx +++ b/src/StepVisual/StepVisual_PresentedItemRepresentation.cxx @@ -12,8 +12,6 @@ // commercial license or contractual agreement. -#include -#include #include #include diff --git a/src/StepVisual/StepVisual_StyledItem.cxx b/src/StepVisual/StepVisual_StyledItem.cxx index 781cb180ab..7dc714e919 100644 --- a/src/StepVisual/StepVisual_StyledItem.cxx +++ b/src/StepVisual/StepVisual_StyledItem.cxx @@ -11,9 +11,6 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -#include -#include -#include #include #include #include diff --git a/src/StepVisual/StepVisual_StyledItem.hxx b/src/StepVisual/StepVisual_StyledItem.hxx index dac69fc50c..b02fbf5586 100644 --- a/src/StepVisual/StepVisual_StyledItem.hxx +++ b/src/StepVisual/StepVisual_StyledItem.hxx @@ -18,7 +18,6 @@ #define _StepVisual_StyledItem_HeaderFile #include -#include #include #include diff --git a/src/StepVisual/StepVisual_SurfaceSideStyle.cxx b/src/StepVisual/StepVisual_SurfaceSideStyle.cxx index a345ff7545..6e004ffb4d 100644 --- a/src/StepVisual/StepVisual_SurfaceSideStyle.cxx +++ b/src/StepVisual/StepVisual_SurfaceSideStyle.cxx @@ -12,7 +12,6 @@ // commercial license or contractual agreement. -#include #include #include #include diff --git a/src/StepVisual/StepVisual_SurfaceSideStyle.hxx b/src/StepVisual/StepVisual_SurfaceSideStyle.hxx index e64d8c216b..57ac86d34c 100644 --- a/src/StepVisual/StepVisual_SurfaceSideStyle.hxx +++ b/src/StepVisual/StepVisual_SurfaceSideStyle.hxx @@ -18,7 +18,6 @@ #define _StepVisual_SurfaceSideStyle_HeaderFile #include -#include #include #include diff --git a/src/StepVisual/StepVisual_SurfaceStyleBoundary.cxx b/src/StepVisual/StepVisual_SurfaceStyleBoundary.cxx index 3cf70039e9..68a621201e 100644 --- a/src/StepVisual/StepVisual_SurfaceStyleBoundary.cxx +++ b/src/StepVisual/StepVisual_SurfaceStyleBoundary.cxx @@ -12,7 +12,6 @@ // commercial license or contractual agreement. -#include #include #include diff --git a/src/StepVisual/StepVisual_SurfaceStyleControlGrid.cxx b/src/StepVisual/StepVisual_SurfaceStyleControlGrid.cxx index 45697e255f..a7545e057f 100644 --- a/src/StepVisual/StepVisual_SurfaceStyleControlGrid.cxx +++ b/src/StepVisual/StepVisual_SurfaceStyleControlGrid.cxx @@ -12,7 +12,6 @@ // commercial license or contractual agreement. -#include #include #include diff --git a/src/StepVisual/StepVisual_SurfaceStyleElementSelect.cxx b/src/StepVisual/StepVisual_SurfaceStyleElementSelect.cxx index a004d195cc..74d7a7c820 100644 --- a/src/StepVisual/StepVisual_SurfaceStyleElementSelect.cxx +++ b/src/StepVisual/StepVisual_SurfaceStyleElementSelect.cxx @@ -19,8 +19,6 @@ #include #include #include -#include -#include #include StepVisual_SurfaceStyleElementSelect::StepVisual_SurfaceStyleElementSelect () { } diff --git a/src/StepVisual/StepVisual_SurfaceStyleFillArea.cxx b/src/StepVisual/StepVisual_SurfaceStyleFillArea.cxx index 69266065d0..467a2bf921 100644 --- a/src/StepVisual/StepVisual_SurfaceStyleFillArea.cxx +++ b/src/StepVisual/StepVisual_SurfaceStyleFillArea.cxx @@ -12,7 +12,6 @@ // commercial license or contractual agreement. -#include #include #include diff --git a/src/StepVisual/StepVisual_SurfaceStyleParameterLine.cxx b/src/StepVisual/StepVisual_SurfaceStyleParameterLine.cxx index ea20644250..cad5b4fc52 100644 --- a/src/StepVisual/StepVisual_SurfaceStyleParameterLine.cxx +++ b/src/StepVisual/StepVisual_SurfaceStyleParameterLine.cxx @@ -12,9 +12,7 @@ // commercial license or contractual agreement. -#include #include -#include #include IMPLEMENT_STANDARD_RTTIEXT(StepVisual_SurfaceStyleParameterLine,Standard_Transient) diff --git a/src/StepVisual/StepVisual_SurfaceStyleRenderingWithProperties.hxx b/src/StepVisual/StepVisual_SurfaceStyleRenderingWithProperties.hxx index df4106b992..0ce0f2b8d6 100644 --- a/src/StepVisual/StepVisual_SurfaceStyleRenderingWithProperties.hxx +++ b/src/StepVisual/StepVisual_SurfaceStyleRenderingWithProperties.hxx @@ -18,7 +18,6 @@ #define _StepVisual_SurfaceStyleRenderingWithProperties_HeaderFile_ #include -#include #include #include diff --git a/src/StepVisual/StepVisual_SurfaceStyleSegmentationCurve.cxx b/src/StepVisual/StepVisual_SurfaceStyleSegmentationCurve.cxx index 7a91387694..e38f7bbb26 100644 --- a/src/StepVisual/StepVisual_SurfaceStyleSegmentationCurve.cxx +++ b/src/StepVisual/StepVisual_SurfaceStyleSegmentationCurve.cxx @@ -12,7 +12,6 @@ // commercial license or contractual agreement. -#include #include #include diff --git a/src/StepVisual/StepVisual_SurfaceStyleSilhouette.cxx b/src/StepVisual/StepVisual_SurfaceStyleSilhouette.cxx index ac50203c43..b9343992b7 100644 --- a/src/StepVisual/StepVisual_SurfaceStyleSilhouette.cxx +++ b/src/StepVisual/StepVisual_SurfaceStyleSilhouette.cxx @@ -12,7 +12,6 @@ // commercial license or contractual agreement. -#include #include #include diff --git a/src/StepVisual/StepVisual_SurfaceStyleUsage.cxx b/src/StepVisual/StepVisual_SurfaceStyleUsage.cxx index 2b0be499b7..4aa246f015 100644 --- a/src/StepVisual/StepVisual_SurfaceStyleUsage.cxx +++ b/src/StepVisual/StepVisual_SurfaceStyleUsage.cxx @@ -12,7 +12,6 @@ // commercial license or contractual agreement. -#include #include #include diff --git a/src/StepVisual/StepVisual_TessellatedAnnotationOccurrence.cxx b/src/StepVisual/StepVisual_TessellatedAnnotationOccurrence.cxx index 0435ec692a..405ce5cfe7 100644 --- a/src/StepVisual/StepVisual_TessellatedAnnotationOccurrence.cxx +++ b/src/StepVisual/StepVisual_TessellatedAnnotationOccurrence.cxx @@ -13,7 +13,6 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -#include #include IMPLEMENT_STANDARD_RTTIEXT(StepVisual_TessellatedAnnotationOccurrence,StepVisual_StyledItem); diff --git a/src/StepVisual/StepVisual_TessellatedAnnotationOccurrence.hxx b/src/StepVisual/StepVisual_TessellatedAnnotationOccurrence.hxx index 1656db6b14..ca7f4f1b60 100644 --- a/src/StepVisual/StepVisual_TessellatedAnnotationOccurrence.hxx +++ b/src/StepVisual/StepVisual_TessellatedAnnotationOccurrence.hxx @@ -17,7 +17,6 @@ #define _StepVisual_TessellatedAnnotationOccurrence_HeaderFile #include -#include #include diff --git a/src/StepVisual/StepVisual_TessellatedCurveSet.cxx b/src/StepVisual/StepVisual_TessellatedCurveSet.cxx index f6d6e25b80..ce5faf86c7 100644 --- a/src/StepVisual/StepVisual_TessellatedCurveSet.cxx +++ b/src/StepVisual/StepVisual_TessellatedCurveSet.cxx @@ -12,7 +12,6 @@ // commercial license or contractual agreement. -#include #include #include diff --git a/src/StepVisual/StepVisual_TessellatedGeometricSet.cxx b/src/StepVisual/StepVisual_TessellatedGeometricSet.cxx index 8cad96a91d..da4f391e21 100644 --- a/src/StepVisual/StepVisual_TessellatedGeometricSet.cxx +++ b/src/StepVisual/StepVisual_TessellatedGeometricSet.cxx @@ -12,7 +12,6 @@ // commercial license or contractual agreement. -#include #include diff --git a/src/StepVisual/StepVisual_TessellatedItem.cxx b/src/StepVisual/StepVisual_TessellatedItem.cxx index 734b9f38da..29f7c8b7d0 100644 --- a/src/StepVisual/StepVisual_TessellatedItem.cxx +++ b/src/StepVisual/StepVisual_TessellatedItem.cxx @@ -12,7 +12,6 @@ // commercial license or contractual agreement. -#include #include IMPLEMENT_STANDARD_RTTIEXT(StepVisual_TessellatedItem,StepGeom_GeometricRepresentationItem) diff --git a/src/StepVisual/StepVisual_TextLiteral.cxx b/src/StepVisual/StepVisual_TextLiteral.cxx index 3e365722c8..f021ecd6fb 100644 --- a/src/StepVisual/StepVisual_TextLiteral.cxx +++ b/src/StepVisual/StepVisual_TextLiteral.cxx @@ -12,9 +12,6 @@ // commercial license or contractual agreement. -#include -#include -#include #include #include diff --git a/src/StepVisual/StepVisual_TextLiteral.hxx b/src/StepVisual/StepVisual_TextLiteral.hxx index 5084dd0eb1..1755364e1f 100644 --- a/src/StepVisual/StepVisual_TextLiteral.hxx +++ b/src/StepVisual/StepVisual_TextLiteral.hxx @@ -18,7 +18,6 @@ #define _StepVisual_TextLiteral_HeaderFile #include -#include #include #include diff --git a/src/StepVisual/StepVisual_TextStyle.cxx b/src/StepVisual/StepVisual_TextStyle.cxx index eaf28c0964..3159c8ff54 100644 --- a/src/StepVisual/StepVisual_TextStyle.cxx +++ b/src/StepVisual/StepVisual_TextStyle.cxx @@ -12,7 +12,6 @@ // commercial license or contractual agreement. -#include #include #include #include diff --git a/src/StepVisual/StepVisual_TextStyleWithBoxCharacteristics.cxx b/src/StepVisual/StepVisual_TextStyleWithBoxCharacteristics.cxx index 73ccc3e809..9333f9593e 100644 --- a/src/StepVisual/StepVisual_TextStyleWithBoxCharacteristics.cxx +++ b/src/StepVisual/StepVisual_TextStyleWithBoxCharacteristics.cxx @@ -12,8 +12,6 @@ // commercial license or contractual agreement. -#include -#include #include #include #include diff --git a/src/StepVisual/StepVisual_ViewVolume.cxx b/src/StepVisual/StepVisual_ViewVolume.cxx index 66b75c3967..39800415a9 100644 --- a/src/StepVisual/StepVisual_ViewVolume.cxx +++ b/src/StepVisual/StepVisual_ViewVolume.cxx @@ -12,7 +12,6 @@ // commercial license or contractual agreement. -#include #include #include #include diff --git a/src/StepVisual/StepVisual_ViewVolume.hxx b/src/StepVisual/StepVisual_ViewVolume.hxx index 5ccbfb1c0d..56d8de03d6 100644 --- a/src/StepVisual/StepVisual_ViewVolume.hxx +++ b/src/StepVisual/StepVisual_ViewVolume.hxx @@ -21,8 +21,6 @@ #include #include -#include -#include #include class StepGeom_CartesianPoint; class StepVisual_PlanarBox; diff --git a/src/StlAPI/StlAPI.hxx b/src/StlAPI/StlAPI.hxx index cdf33f1087..e54264e039 100644 --- a/src/StlAPI/StlAPI.hxx +++ b/src/StlAPI/StlAPI.hxx @@ -20,9 +20,7 @@ #include #include #include -#include #include -#include class TopoDS_Shape; //! Offers the API for STL data manipulation. diff --git a/src/StlAPI/StlAPI_Reader.cxx b/src/StlAPI/StlAPI_Reader.cxx index e64f2db15a..748d6557eb 100644 --- a/src/StlAPI/StlAPI_Reader.cxx +++ b/src/StlAPI/StlAPI_Reader.cxx @@ -19,13 +19,10 @@ #include #include #include -#include #include #include -#include #include #include -#include #include #include diff --git a/src/StlAPI/StlAPI_Reader.hxx b/src/StlAPI/StlAPI_Reader.hxx index a7b6459e75..4e0b2005ce 100644 --- a/src/StlAPI/StlAPI_Reader.hxx +++ b/src/StlAPI/StlAPI_Reader.hxx @@ -16,10 +16,7 @@ #ifndef _StlAPI_Reader_HeaderFile #define _StlAPI_Reader_HeaderFile -#include -#include #include -#include class TopoDS_Shape; diff --git a/src/StlAPI/StlAPI_Writer.cxx b/src/StlAPI/StlAPI_Writer.cxx index 34d02207a3..ef9d1fc09e 100644 --- a/src/StlAPI/StlAPI_Writer.cxx +++ b/src/StlAPI/StlAPI_Writer.cxx @@ -14,10 +14,7 @@ #include #include -#include #include -#include -#include #include #include #include From aaa03c1efb04904bf1dfc0491c1ee09cf75d6a94 Mon Sep 17 00:00:00 2001 From: atychini Date: Sun, 26 Jun 2022 20:03:59 +0300 Subject: [PATCH 318/639] 0033029: Warning on Windows 32 and 64 with VC14 after the integration of ticket 32821 Warning has been fixed by adding condition. --- src/IGESCAFControl/IGESCAFControl_Provider.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/IGESCAFControl/IGESCAFControl_Provider.cxx b/src/IGESCAFControl/IGESCAFControl_Provider.cxx index dd184faec6..fa8084ace0 100644 --- a/src/IGESCAFControl/IGESCAFControl_Provider.cxx +++ b/src/IGESCAFControl/IGESCAFControl_Provider.cxx @@ -63,7 +63,7 @@ void IGESCAFControl_Provider::initStatic(const Handle(DE_ConfigurationNode)& the myOldValues.ReadApproxd1 = Interface_Static::IVal("read.iges.bspline.approxd1.mode") == 1; myOldValues.ReadResourceName = Interface_Static::CVal("read.iges.resource.name"); myOldValues.ReadSequence = Interface_Static::CVal("read.iges.sequence"); - myOldValues.ReadFaultyEntities = Interface_Static::IVal("read.iges.faulty.entities"); + myOldValues.ReadFaultyEntities = Interface_Static::IVal("read.iges.faulty.entities") == 1; myOldValues.ReadOnlyVisible = Interface_Static::IVal("read.iges.onlyvisible") == 1; myOldValues.WriteBRepMode = (IGESCAFControl_ConfigurationNode::WriteMode_BRep)Interface_Static::IVal("write.iges.brep.mode"); From 1593d38b131206d6c25f6b8cd92c7e163370ec54 Mon Sep 17 00:00:00 2001 From: oan Date: Tue, 28 Jun 2022 11:43:49 +0300 Subject: [PATCH 319/639] 0032692: Mesh - In BRepMesh_ModelPreProcessor avoid crashes with problematic topology Improved the processing for the case where Failure flag for the meshing face is set. Specific tests added. Check triangulation consistency even for shapes with problematic topology given that they are suitable for keeping it. --- src/BRepMesh/BRepMesh_ModelPreProcessor.cxx | 9 +++++---- tests/bugs/mesh/bug32692_1 | 11 +++++++++++ tests/bugs/mesh/bug32692_2 | 11 +++++++++++ tests/bugs/mesh/bug32692_3 | 14 ++++++++++++++ 4 files changed, 41 insertions(+), 4 deletions(-) create mode 100644 tests/bugs/mesh/bug32692_1 create mode 100644 tests/bugs/mesh/bug32692_2 create mode 100644 tests/bugs/mesh/bug32692_3 diff --git a/src/BRepMesh/BRepMesh_ModelPreProcessor.cxx b/src/BRepMesh/BRepMesh_ModelPreProcessor.cxx index 4eefa24287..e987376b2c 100644 --- a/src/BRepMesh/BRepMesh_ModelPreProcessor.cxx +++ b/src/BRepMesh/BRepMesh_ModelPreProcessor.cxx @@ -46,7 +46,8 @@ namespace void operator()(const Standard_Integer theFaceIndex) const { const IMeshData::IFaceHandle& aDFace = myModel->GetFace(theFaceIndex); - if (aDFace->IsSet(IMeshData_Outdated)) + if (aDFace->IsSet(IMeshData_Outdated) || + aDFace->GetFace().IsNull()) { return; } @@ -119,7 +120,7 @@ namespace void operator()(const Standard_Integer theFaceIndex) const { const IMeshData::IFaceHandle& aDFace = myModel->GetFace(theFaceIndex); - if (aDFace->GetSurface()->GetType() != GeomAbs_Cone) + if (aDFace->GetSurface()->GetType() != GeomAbs_Cone || aDFace->IsSet(IMeshData_Failure)) { return; } @@ -128,7 +129,7 @@ namespace for (Standard_Integer aEdgeIdx = 0; aEdgeIdx < aDWire->EdgesNb() - 1; ++aEdgeIdx) { const IMeshData::IEdgePtr& aDEdge = aDWire->GetEdge (aEdgeIdx); - + if (aDEdge->GetPCurve(aDFace.get(), TopAbs_FORWARD) != aDEdge->GetPCurve(aDFace.get(), TopAbs_REVERSED)) { if (aDEdge->GetCurve()->ParametersNb() == 2) @@ -146,7 +147,7 @@ namespace } } return; - } + } } } diff --git a/tests/bugs/mesh/bug32692_1 b/tests/bugs/mesh/bug32692_1 new file mode 100644 index 0000000000..db139cb93d --- /dev/null +++ b/tests/bugs/mesh/bug32692_1 @@ -0,0 +1,11 @@ +puts "=========" +puts "OCC32692: Crash when the input shape has some invalid topology" +puts "=========" +puts "" + +puts "REQUIRED ALL: Meshing statuses: SelfIntersectingWire Failure" + +restore [locate_data_file bug32692.brep] s +incmesh s 0.01 -parallel + +checktrinfo s -nod 7511 -tri 7625 -empty 9 -face 309 diff --git a/tests/bugs/mesh/bug32692_2 b/tests/bugs/mesh/bug32692_2 new file mode 100644 index 0000000000..3431ec9f61 --- /dev/null +++ b/tests/bugs/mesh/bug32692_2 @@ -0,0 +1,11 @@ +puts "=========" +puts "OCC32692: Crash when the input shape has some invalid topology" +puts "=========" +puts "" + +puts "REQUIRED ALL: Meshing statuses: Reused" + +restore [locate_data_file bug32692_broken_mesh.brep] s +incmesh s 0.01 -parallel + +checktrinfo s -nod 3 -tri 1 -face 1 diff --git a/tests/bugs/mesh/bug32692_3 b/tests/bugs/mesh/bug32692_3 new file mode 100644 index 0000000000..50d9334f43 --- /dev/null +++ b/tests/bugs/mesh/bug32692_3 @@ -0,0 +1,14 @@ +puts "=========" +puts "OCC32692: Crash when the input shape has some invalid topology" +puts "=========" +puts "" + +puts "REQUIRED ALL: Meshing statuses: OpenWire Failure Outdated" + +pload MODELING +cylinder c 0 0 0 10 +mkface f c + +incmesh f 0.01 -parallel + +checktrinfo f -nod 0 -tri 0 -face 1 From ec2d883e5351ae9dc0e840069d6114401076040a Mon Sep 17 00:00:00 2001 From: aml Date: Mon, 27 Jun 2022 19:46:53 +0300 Subject: [PATCH 320/639] 0033041: Coding - get rid of unused headers [TopTools to Xw] --- src/TPrsStd/TPrsStd_AISPresentation.cxx | 5 ---- src/TPrsStd/TPrsStd_AISPresentation.hxx | 3 --- src/TPrsStd/TPrsStd_AISViewer.cxx | 3 --- src/TPrsStd/TPrsStd_AISViewer.hxx | 1 - src/TPrsStd/TPrsStd_AxisDriver.cxx | 1 - src/TPrsStd/TPrsStd_AxisDriver.hxx | 1 - src/TPrsStd/TPrsStd_ConstraintDriver.cxx | 2 -- src/TPrsStd/TPrsStd_ConstraintDriver.hxx | 1 - src/TPrsStd/TPrsStd_ConstraintTools.cxx | 1 - src/TPrsStd/TPrsStd_DataMapOfGUIDDriver.hxx | 1 - src/TPrsStd/TPrsStd_Driver.hxx | 1 - src/TPrsStd/TPrsStd_DriverTable.cxx | 1 - src/TPrsStd/TPrsStd_DriverTable.hxx | 1 - src/TPrsStd/TPrsStd_GeometryDriver.cxx | 3 --- src/TPrsStd/TPrsStd_GeometryDriver.hxx | 1 - src/TPrsStd/TPrsStd_NamedShapeDriver.cxx | 6 ----- src/TPrsStd/TPrsStd_NamedShapeDriver.hxx | 1 - src/TPrsStd/TPrsStd_PlaneDriver.cxx | 1 - src/TPrsStd/TPrsStd_PlaneDriver.hxx | 1 - src/TPrsStd/TPrsStd_PointDriver.cxx | 1 - src/TPrsStd/TPrsStd_PointDriver.hxx | 1 - src/TShort/TShort_Array1OfShortReal.hxx | 1 - src/TShort/TShort_Array2OfShortReal.hxx | 1 - src/TShort/TShort_SequenceOfShortReal.hxx | 1 - src/TopTools/TopTools.cxx | 1 - src/TopTools/TopTools.hxx | 1 - .../TopTools_DataMapOfOrientedShapeShape.hxx | 1 - src/TopTools/TopTools_DataMapOfShapeReal.hxx | 1 - src/TopTools/TopTools_DataMapOfShapeShape.hxx | 1 - .../TopTools_HArray1OfListOfShape.hxx | 1 - .../TopTools_IndexedDataMapOfShapeReal.hxx | 1 - .../TopTools_IndexedDataMapOfShapeShape.hxx | 1 - src/TopTools/TopTools_IndexedMapOfShape.hxx | 1 - src/TopTools/TopTools_LocationSet.cxx | 4 ---- src/TopTools/TopTools_LocationSet.hxx | 1 - .../TopTools_OrientedShapeMapHasher.hxx | 2 -- src/TopTools/TopTools_ShapeMapHasher.hxx | 3 --- src/TopTools/TopTools_ShapeSet.cxx | 2 -- src/TopTools/TopTools_ShapeSet.hxx | 1 - src/TopTrans/TopTrans_CurveTransition.cxx | 1 - src/TopTrans/TopTrans_CurveTransition.hxx | 4 ---- src/TopTrans/TopTrans_SurfaceTransition.cxx | 1 - src/TopTrans/TopTrans_SurfaceTransition.hxx | 3 --- src/Transfer/Transfer_ActorDispatch.cxx | 1 - .../Transfer_ActorOfFinderProcess.cxx | 1 - .../Transfer_ActorOfFinderProcess.hxx | 2 -- .../Transfer_ActorOfProcessForFinder.hxx | 3 --- .../Transfer_ActorOfProcessForTransient.hxx | 3 --- .../Transfer_ActorOfTransientProcess.cxx | 2 -- .../Transfer_ActorOfTransientProcess.hxx | 1 - src/Transfer/Transfer_Binder.cxx | 1 - src/Transfer/Transfer_Binder.hxx | 3 --- src/Transfer/Transfer_DataInfo.hxx | 1 - src/Transfer/Transfer_DispatchControl.cxx | 1 - src/Transfer/Transfer_DispatchControl.hxx | 1 - src/Transfer/Transfer_FindHasher.hxx | 1 - src/Transfer/Transfer_Finder.hxx | 5 ---- src/Transfer/Transfer_FinderProcess.cxx | 3 --- src/Transfer/Transfer_HSequenceOfBinder.hxx | 1 - src/Transfer/Transfer_HSequenceOfFinder.hxx | 1 - .../Transfer_IteratorOfProcessForFinder.hxx | 1 - src/Transfer/Transfer_MultipleBinder.hxx | 3 --- src/Transfer/Transfer_ProcessForTransient.hxx | 2 -- src/Transfer/Transfer_ResultFromModel.cxx | 1 - src/Transfer/Transfer_ResultFromModel.hxx | 2 -- src/Transfer/Transfer_ResultFromTransient.cxx | 2 -- src/Transfer/Transfer_ResultFromTransient.hxx | 1 - .../Transfer_SimpleBinderOfTransient.cxx | 1 - .../Transfer_SimpleBinderOfTransient.hxx | 3 --- src/Transfer/Transfer_TransferDeadLoop.hxx | 1 - src/Transfer/Transfer_TransferDispatch.cxx | 1 - src/Transfer/Transfer_TransferDispatch.hxx | 1 - src/Transfer/Transfer_TransferInput.cxx | 2 -- src/Transfer/Transfer_TransferInput.hxx | 1 - src/Transfer/Transfer_TransferIterator.cxx | 1 - src/Transfer/Transfer_TransferIterator.hxx | 1 - src/Transfer/Transfer_TransferOutput.cxx | 1 - src/Transfer/Transfer_TransferOutput.hxx | 1 - src/Transfer/Transfer_TransientListBinder.cxx | 1 - src/Transfer/Transfer_TransientListBinder.hxx | 3 --- src/Transfer/Transfer_TransientMapper.hxx | 3 --- src/Transfer/Transfer_TransientProcess.cxx | 3 --- src/Transfer/Transfer_TransientProcess.hxx | 2 -- src/Transfer/Transfer_VoidBinder.hxx | 2 -- src/TransferBRep/TransferBRep.cxx | 10 -------- .../TransferBRep_BinderOfShape.cxx | 3 --- .../TransferBRep_BinderOfShape.hxx | 1 - ...sferBRep_HSequenceOfTransferResultInfo.hxx | 1 - src/TransferBRep/TransferBRep_Reader.cxx | 2 -- src/TransferBRep/TransferBRep_Reader.hxx | 1 - src/TransferBRep/TransferBRep_ShapeBinder.cxx | 2 -- src/TransferBRep/TransferBRep_ShapeInfo.hxx | 1 - .../TransferBRep_ShapeListBinder.cxx | 1 - .../TransferBRep_ShapeListBinder.hxx | 3 --- src/TransferBRep/TransferBRep_ShapeMapper.hxx | 3 --- src/UTL/UTL.cxx | 1 - src/UTL/UTL.hxx | 1 - src/Units/Units_Dimensions.hxx | 3 --- src/Units/Units_Explorer.hxx | 2 -- src/Units/Units_MathSentence.hxx | 2 -- src/Units/Units_Measurement.cxx | 2 -- src/Units/Units_Measurement.hxx | 3 --- src/Units/Units_Operators.hxx | 1 - src/Units/Units_QuantitiesSequence.hxx | 1 - src/Units/Units_Quantity.cxx | 3 --- src/Units/Units_Quantity.hxx | 2 -- src/Units/Units_Sentence.hxx | 1 - src/Units/Units_ShiftedToken.cxx | 1 - src/Units/Units_ShiftedToken.hxx | 2 -- src/Units/Units_ShiftedUnit.cxx | 1 - src/Units/Units_ShiftedUnit.hxx | 2 -- src/Units/Units_Token.cxx | 2 -- src/Units/Units_Token.hxx | 3 --- src/Units/Units_TokensSequence.hxx | 1 - src/Units/Units_Unit.cxx | 4 ---- src/Units/Units_Unit.hxx | 3 --- src/Units/Units_UnitSentence.cxx | 2 -- src/Units/Units_UnitsDictionary.cxx | 1 - src/Units/Units_UnitsDictionary.hxx | 8 ------- src/Units/Units_UnitsSystem.cxx | 3 --- src/Units/Units_UnitsSystem.hxx | 3 --- src/UnitsAPI/UnitsAPI.cxx | 4 ---- src/UnitsAPI/UnitsAPI.hxx | 2 -- src/V3d/V3d.cxx | 5 ---- src/V3d/V3d_CircularGrid.cxx | 2 -- src/V3d/V3d_CircularGrid.hxx | 2 -- src/V3d/V3d_Light.hxx | 1 - src/V3d/V3d_ListOfView.hxx | 1 - src/V3d/V3d_Plane.hxx | 2 -- src/V3d/V3d_RectangularGrid.cxx | 3 --- src/V3d/V3d_RectangularGrid.hxx | 2 -- src/V3d/V3d_Trihedron.cxx | 4 ---- src/V3d/V3d_Trihedron.hxx | 2 -- src/V3d/V3d_View.cxx | 4 ---- src/V3d/V3d_View.hxx | 22 ----------------- src/V3d/V3d_Viewer.cxx | 2 -- src/V3d/V3d_Viewer.hxx | 7 ------ src/ViewerTest/ViewerTest.cxx | 24 ------------------- src/ViewerTest/ViewerTest.hxx | 2 -- src/ViewerTest/ViewerTest_CmdParser.hxx | 1 - .../ViewerTest_ContinuousRedrawer.cxx | 1 - ...ewerTest_DoubleMapOfInteractiveAndName.hxx | 1 - src/ViewerTest/ViewerTest_EventManager.cxx | 1 - src/ViewerTest/ViewerTest_EventManager.hxx | 1 - src/ViewerTest/ViewerTest_FilletCommands.cxx | 13 ---------- .../ViewerTest_RelationCommands.cxx | 13 ---------- src/ViewerTest/ViewerTest_ViewerCommands.cxx | 12 ---------- src/Vrml/Vrml.cxx | 1 - src/Vrml/Vrml_AsciiText.hxx | 1 - src/Vrml/Vrml_DirectionalLight.cxx | 2 -- src/Vrml/Vrml_DirectionalLight.hxx | 2 -- src/Vrml/Vrml_Info.cxx | 1 - src/Vrml/Vrml_Instancing.cxx | 1 - src/Vrml/Vrml_LOD.hxx | 1 - src/Vrml/Vrml_MatrixTransform.cxx | 3 --- src/Vrml/Vrml_MatrixTransform.hxx | 1 - src/Vrml/Vrml_OrthographicCamera.cxx | 1 - src/Vrml/Vrml_OrthographicCamera.hxx | 1 - src/Vrml/Vrml_PerspectiveCamera.cxx | 1 - src/Vrml/Vrml_PerspectiveCamera.hxx | 1 - src/Vrml/Vrml_PointLight.cxx | 2 -- src/Vrml/Vrml_PointLight.hxx | 2 -- src/Vrml/Vrml_PointSet.hxx | 1 - src/Vrml/Vrml_SFImage.hxx | 1 - src/Vrml/Vrml_Scale.cxx | 1 - src/Vrml/Vrml_SpotLight.cxx | 2 -- src/Vrml/Vrml_SpotLight.hxx | 2 -- src/Vrml/Vrml_Switch.hxx | 1 - src/Vrml/Vrml_Texture2Transform.cxx | 1 - src/Vrml/Vrml_Texture2Transform.hxx | 1 - src/Vrml/Vrml_Transform.cxx | 2 -- src/Vrml/Vrml_Translation.cxx | 1 - src/Vrml/Vrml_WWWAnchor.cxx | 1 - src/Vrml/Vrml_WWWInline.cxx | 1 - src/Vrml/Vrml_WWWInline.hxx | 1 - src/VrmlAPI/VrmlAPI.hxx | 1 - src/VrmlAPI/VrmlAPI_Writer.cxx | 2 -- src/VrmlAPI/VrmlAPI_Writer.hxx | 2 -- src/VrmlConverter/VrmlConverter_Curve.cxx | 4 ---- src/VrmlConverter/VrmlConverter_Curve.hxx | 1 - .../VrmlConverter_DeflectionCurve.cxx | 3 --- .../VrmlConverter_DeflectionCurve.hxx | 1 - src/VrmlConverter/VrmlConverter_Drawer.hxx | 2 -- src/VrmlConverter/VrmlConverter_IsoAspect.cxx | 1 - src/VrmlConverter/VrmlConverter_IsoAspect.hxx | 1 - .../VrmlConverter_LineAspect.cxx | 1 - .../VrmlConverter_LineAspect.hxx | 1 - .../VrmlConverter_PointAspect.cxx | 1 - .../VrmlConverter_PointAspect.hxx | 1 - src/VrmlConverter/VrmlConverter_Projector.cxx | 3 --- .../VrmlConverter_ShadedShape.cxx | 13 ---------- .../VrmlConverter_ShadingAspect.cxx | 1 - .../VrmlConverter_ShadingAspect.hxx | 1 - ...mlConverter_WFDeflectionRestrictedFace.cxx | 2 -- .../VrmlConverter_WFDeflectionShape.cxx | 4 ---- .../VrmlConverter_WFRestrictedFace.cxx | 2 -- src/VrmlConverter/VrmlConverter_WFShape.cxx | 3 --- src/VrmlData/VrmlData_Geometry.cxx | 2 -- src/VrmlData/VrmlData_Group.cxx | 1 - src/VrmlData/VrmlData_InBuffer.hxx | 1 - src/VrmlData/VrmlData_IndexedFaceSet.cxx | 1 - src/VrmlData/VrmlData_Node.cxx | 2 -- src/VrmlData/VrmlData_Node.hxx | 1 - src/VrmlData/VrmlData_Scene.cxx | 5 ---- src/VrmlData/VrmlData_Scene.hxx | 1 - src/VrmlData/VrmlData_ShapeConvert.cxx | 6 ----- src/VrmlData/VrmlData_ShapeConvert.hxx | 1 - src/WNT/WNT_Dword.hxx | 5 ---- src/WNT/WNT_WClass.hxx | 2 -- src/WNT/WNT_Window.cxx | 1 - src/Wasm/Wasm_Window.hxx | 1 - src/XCAFApp/XCAFApp_Application.cxx | 1 - src/XCAFApp/XCAFApp_Application.hxx | 1 - .../XCAFDimTolObjects_DatumObject.hxx | 2 -- .../XCAFDimTolObjects_DimensionObject.cxx | 1 - .../XCAFDimTolObjects_DimensionObject.hxx | 2 -- .../XCAFDimTolObjects_GeomToleranceObject.hxx | 3 --- .../XCAFDimTolObjects_Tool.cxx | 1 - src/XCAFDoc/XCAFDoc.cxx | 7 ------ src/XCAFDoc/XCAFDoc_Area.hxx | 1 - src/XCAFDoc/XCAFDoc_AssemblyItemRef.cxx | 1 - src/XCAFDoc/XCAFDoc_AssemblyItemRef.hxx | 2 -- src/XCAFDoc/XCAFDoc_Centroid.hxx | 1 - src/XCAFDoc/XCAFDoc_Color.hxx | 3 --- src/XCAFDoc/XCAFDoc_ColorTool.cxx | 5 ---- src/XCAFDoc/XCAFDoc_DataMapOfShapeLabel.hxx | 1 - src/XCAFDoc/XCAFDoc_Datum.cxx | 3 --- src/XCAFDoc/XCAFDoc_DimTolTool.cxx | 4 ---- src/XCAFDoc/XCAFDoc_DimTolTool.hxx | 1 - src/XCAFDoc/XCAFDoc_Dimension.cxx | 2 -- src/XCAFDoc/XCAFDoc_DocumentTool.cxx | 2 -- src/XCAFDoc/XCAFDoc_Editor.hxx | 2 -- src/XCAFDoc/XCAFDoc_GeomTolerance.cxx | 1 - src/XCAFDoc/XCAFDoc_GraphNode.hxx | 2 -- src/XCAFDoc/XCAFDoc_LayerTool.cxx | 1 - src/XCAFDoc/XCAFDoc_LayerTool.hxx | 1 - src/XCAFDoc/XCAFDoc_LengthUnit.hxx | 1 - src/XCAFDoc/XCAFDoc_Location.hxx | 1 - src/XCAFDoc/XCAFDoc_MaterialTool.cxx | 2 -- src/XCAFDoc/XCAFDoc_Note.cxx | 2 -- src/XCAFDoc/XCAFDoc_Note.hxx | 2 -- src/XCAFDoc/XCAFDoc_NotesTool.cxx | 3 --- src/XCAFDoc/XCAFDoc_ShapeMapTool.hxx | 1 - src/XCAFDoc/XCAFDoc_ShapeTool.cxx | 4 ---- src/XCAFDoc/XCAFDoc_ShapeTool.hxx | 1 - src/XCAFDoc/XCAFDoc_View.cxx | 4 ---- src/XCAFDoc/XCAFDoc_ViewTool.cxx | 2 -- src/XCAFDoc/XCAFDoc_VisMaterialCommon.hxx | 1 - src/XCAFDoc/XCAFDoc_VisMaterialPBR.hxx | 1 - src/XCAFDoc/XCAFDoc_VisMaterialTool.cxx | 3 --- src/XCAFDoc/XCAFDoc_VisMaterialTool.hxx | 1 - src/XCAFDoc/XCAFDoc_Volume.hxx | 1 - src/XCAFPrs/XCAFPrs.cxx | 5 ---- src/XCAFPrs/XCAFPrs_AISObject.cxx | 5 ---- src/XCAFPrs/XCAFPrs_DataMapOfStyleShape.hxx | 1 - .../XCAFPrs_DataMapOfStyleTransient.hxx | 1 - src/XCAFPrs/XCAFPrs_DocumentExplorer.hxx | 1 - src/XCAFPrs/XCAFPrs_DocumentIdIterator.hxx | 4 ---- src/XCAFPrs/XCAFPrs_Driver.hxx | 1 - .../XCAFPrs_IndexedDataMapOfShapeStyle.hxx | 1 - src/XCAFView/XCAFView_Object.hxx | 1 - src/XDEDRAW/XDEDRAW.hxx | 1 - src/XDEDRAW/XDEDRAW_Colors.cxx | 1 - src/XDEDRAW/XDEDRAW_Colors.hxx | 1 - src/XDEDRAW/XDEDRAW_Common.cxx | 6 ----- src/XDEDRAW/XDEDRAW_Common.hxx | 1 - src/XDEDRAW/XDEDRAW_GDTs.cxx | 12 ---------- src/XDEDRAW/XDEDRAW_Layers.cxx | 4 ---- src/XDEDRAW/XDEDRAW_Layers.hxx | 1 - src/XDEDRAW/XDEDRAW_Notes.cxx | 1 - src/XDEDRAW/XDEDRAW_Notes.hxx | 1 - src/XDEDRAW/XDEDRAW_Props.cxx | 3 --- src/XDEDRAW/XDEDRAW_Props.hxx | 1 - src/XDEDRAW/XDEDRAW_Shapes.cxx | 5 ---- src/XDEDRAW/XDEDRAW_Shapes.hxx | 1 - src/XDEDRAW/XDEDRAW_Views.cxx | 2 -- src/XSAlgo/XSAlgo_AlgoContainer.cxx | 5 ---- src/XSAlgo/XSAlgo_AlgoContainer.hxx | 3 --- src/XSControl/XSControl_ConnectedShapes.hxx | 1 - src/XSControl/XSControl_Controller.cxx | 11 --------- src/XSControl/XSControl_Controller.hxx | 3 --- src/XSControl/XSControl_FuncShape.cxx | 14 ----------- src/XSControl/XSControl_FuncShape.hxx | 1 - src/XSControl/XSControl_Functions.cxx | 9 ------- src/XSControl/XSControl_Functions.hxx | 2 -- src/XSControl/XSControl_Reader.cxx | 4 ---- src/XSControl/XSControl_Reader.hxx | 1 - src/XSControl/XSControl_SelectForTransfer.hxx | 1 - .../XSControl_SignTransferStatus.cxx | 1 - .../XSControl_SignTransferStatus.hxx | 1 - src/XSControl/XSControl_TransferReader.cxx | 7 ------ src/XSControl/XSControl_TransferWriter.cxx | 4 ---- src/XSControl/XSControl_Utils.cxx | 1 - src/XSControl/XSControl_Utils.hxx | 2 -- src/XSControl/XSControl_Vars.cxx | 1 - src/XSControl/XSControl_Vars.hxx | 3 --- src/XSControl/XSControl_WorkSession.cxx | 10 -------- src/XSControl/XSControl_Writer.cxx | 2 -- src/XSControl/XSControl_Writer.hxx | 1 - src/XSDRAW/XSDRAW_Functions.hxx | 2 -- src/XSDRAW/XSDRAW_Vars.hxx | 2 -- src/XSDRAWIGES/XSDRAWIGES.cxx | 20 ---------------- src/XSDRAWIGES/XSDRAWIGES.hxx | 1 - src/XSDRAWSTEP/XSDRAWSTEP.cxx | 9 ------- src/XSDRAWSTEP/XSDRAWSTEP.hxx | 1 - src/XSDRAWSTLVRML/XSDRAWSTLVRML_CoordsMap.hxx | 1 - .../XSDRAWSTLVRML_DataSource.cxx | 2 -- .../XSDRAWSTLVRML_DataSource.hxx | 4 ---- .../XSDRAWSTLVRML_DataSource3D.hxx | 3 --- .../XSDRAWSTLVRML_ElemNodesMap.hxx | 1 - src/XmlDrivers/XmlDrivers.cxx | 2 -- .../XmlDrivers_DocumentRetrievalDriver.cxx | 1 - .../XmlDrivers_DocumentStorageDriver.hxx | 1 - src/XmlLDrivers/XmlLDrivers.cxx | 1 - .../XmlLDrivers_DocumentRetrievalDriver.cxx | 7 ------ .../XmlLDrivers_DocumentRetrievalDriver.hxx | 1 - .../XmlLDrivers_DocumentStorageDriver.cxx | 5 ---- .../XmlLDrivers_DocumentStorageDriver.hxx | 1 - src/XmlLDrivers/XmlLDrivers_NamespaceDef.cxx | 1 - src/XmlMDF/XmlMDF.cxx | 6 ----- src/XmlMDF/XmlMDF.hxx | 3 --- src/XmlMDF/XmlMDF_ADriver.hxx | 2 -- src/XmlMDF/XmlMDF_ADriverTable.cxx | 1 - src/XmlMDF/XmlMDF_ADriverTable.hxx | 1 - src/XmlMDF/XmlMDF_MapOfDriver.hxx | 1 - src/XmlMDF/XmlMDF_ReferenceDriver.cxx | 1 - src/XmlMDF/XmlMDF_ReferenceDriver.hxx | 1 - src/XmlMDF/XmlMDF_TagSourceDriver.cxx | 1 - src/XmlMDF/XmlMDF_TagSourceDriver.hxx | 1 - .../XmlMDataStd_AsciiStringDriver.hxx | 1 - .../XmlMDataStd_BooleanArrayDriver.cxx | 1 - .../XmlMDataStd_BooleanArrayDriver.hxx | 1 - .../XmlMDataStd_BooleanListDriver.hxx | 1 - .../XmlMDataStd_ByteArrayDriver.cxx | 1 - .../XmlMDataStd_ByteArrayDriver.hxx | 1 - .../XmlMDataStd_ExpressionDriver.hxx | 1 - .../XmlMDataStd_ExtStringArrayDriver.cxx | 2 -- .../XmlMDataStd_ExtStringArrayDriver.hxx | 1 - .../XmlMDataStd_ExtStringListDriver.cxx | 1 - .../XmlMDataStd_ExtStringListDriver.hxx | 1 - .../XmlMDataStd_GenericEmptyDriver.hxx | 1 - .../XmlMDataStd_GenericExtStringDriver.hxx | 1 - .../XmlMDataStd_IntPackedMapDriver.cxx | 1 - .../XmlMDataStd_IntPackedMapDriver.hxx | 1 - .../XmlMDataStd_IntegerArrayDriver.hxx | 1 - src/XmlMDataStd/XmlMDataStd_IntegerDriver.hxx | 1 - .../XmlMDataStd_IntegerListDriver.cxx | 1 - .../XmlMDataStd_IntegerListDriver.hxx | 1 - .../XmlMDataStd_NamedDataDriver.cxx | 15 ------------ .../XmlMDataStd_NamedDataDriver.hxx | 1 - .../XmlMDataStd_RealArrayDriver.cxx | 2 -- .../XmlMDataStd_RealArrayDriver.hxx | 1 - src/XmlMDataStd/XmlMDataStd_RealDriver.hxx | 1 - .../XmlMDataStd_RealListDriver.cxx | 1 - .../XmlMDataStd_RealListDriver.hxx | 1 - .../XmlMDataStd_ReferenceArrayDriver.cxx | 1 - .../XmlMDataStd_ReferenceArrayDriver.hxx | 1 - .../XmlMDataStd_ReferenceListDriver.cxx | 1 - .../XmlMDataStd_ReferenceListDriver.hxx | 1 - .../XmlMDataStd_TreeNodeDriver.cxx | 1 - .../XmlMDataStd_TreeNodeDriver.hxx | 1 - .../XmlMDataStd_UAttributeDriver.hxx | 1 - .../XmlMDataStd_VariableDriver.hxx | 1 - .../XmlMDataXtd_ConstraintDriver.hxx | 1 - .../XmlMDataXtd_GeometryDriver.hxx | 1 - .../XmlMDataXtd_PatternStdDriver.hxx | 1 - .../XmlMDataXtd_PositionDriver.cxx | 1 - .../XmlMDataXtd_PositionDriver.hxx | 2 -- .../XmlMDataXtd_PresentationDriver.cxx | 1 - .../XmlMDataXtd_PresentationDriver.hxx | 2 -- .../XmlMDataXtd_TriangulationDriver.cxx | 1 - .../XmlMDataXtd_TriangulationDriver.hxx | 2 -- src/XmlMDocStd/XmlMDocStd_XLinkDriver.cxx | 1 - src/XmlMDocStd/XmlMDocStd_XLinkDriver.hxx | 1 - .../XmlMFunction_FunctionDriver.cxx | 1 - .../XmlMFunction_FunctionDriver.hxx | 1 - .../XmlMFunction_GraphNodeDriver.cxx | 2 -- .../XmlMFunction_GraphNodeDriver.hxx | 1 - src/XmlMFunction/XmlMFunction_ScopeDriver.cxx | 7 ------ src/XmlMFunction/XmlMFunction_ScopeDriver.hxx | 1 - .../XmlMNaming_NamedShapeDriver.cxx | 3 --- .../XmlMNaming_NamedShapeDriver.hxx | 1 - src/XmlMNaming/XmlMNaming_NamingDriver.cxx | 4 ---- src/XmlMNaming/XmlMNaming_NamingDriver.hxx | 1 - src/XmlMNaming/XmlMNaming_Shape1.cxx | 1 - src/XmlMNaming/XmlMNaming_Shape1.hxx | 2 -- .../XmlMXCAFDoc_AssemblyItemRefDriver.cxx | 1 - .../XmlMXCAFDoc_AssemblyItemRefDriver.hxx | 1 - .../XmlMXCAFDoc_CentroidDriver.cxx | 2 -- .../XmlMXCAFDoc_CentroidDriver.hxx | 1 - src/XmlMXCAFDoc/XmlMXCAFDoc_ColorDriver.cxx | 1 - src/XmlMXCAFDoc/XmlMXCAFDoc_ColorDriver.hxx | 1 - src/XmlMXCAFDoc/XmlMXCAFDoc_DatumDriver.cxx | 1 - src/XmlMXCAFDoc/XmlMXCAFDoc_DatumDriver.hxx | 1 - src/XmlMXCAFDoc/XmlMXCAFDoc_DimTolDriver.cxx | 2 -- src/XmlMXCAFDoc/XmlMXCAFDoc_DimTolDriver.hxx | 1 - .../XmlMXCAFDoc_GraphNodeDriver.cxx | 1 - .../XmlMXCAFDoc_GraphNodeDriver.hxx | 1 - .../XmlMXCAFDoc_LengthUnitDriver.cxx | 1 - .../XmlMXCAFDoc_LengthUnitDriver.hxx | 2 -- .../XmlMXCAFDoc_LocationDriver.cxx | 3 --- .../XmlMXCAFDoc_LocationDriver.hxx | 1 - .../XmlMXCAFDoc_MaterialDriver.cxx | 1 - .../XmlMXCAFDoc_MaterialDriver.hxx | 1 - .../XmlMXCAFDoc_NoteBinDataDriver.cxx | 1 - .../XmlMXCAFDoc_NoteCommentDriver.cxx | 1 - src/XmlMXCAFDoc/XmlMXCAFDoc_NoteDriver.cxx | 1 - src/XmlMXCAFDoc/XmlMXCAFDoc_NoteDriver.hxx | 1 - .../XmlMXCAFDoc_VisMaterialDriver.hxx | 2 -- src/XmlObjMgt/XmlObjMgt.cxx | 1 - src/XmlObjMgt/XmlObjMgt.hxx | 1 - src/XmlObjMgt/XmlObjMgt_Array1.cxx | 1 - src/XmlObjMgt/XmlObjMgt_Array1.hxx | 1 - src/XmlObjMgt/XmlObjMgt_GP.cxx | 2 -- src/XmlObjMgt/XmlObjMgt_GP.hxx | 2 -- src/XmlObjMgt/XmlObjMgt_Persistent.cxx | 1 - src/XmlObjMgt/XmlObjMgt_Persistent.hxx | 1 - src/XmlTObjDrivers/XmlTObjDrivers.cxx | 1 - .../XmlTObjDrivers_IntSparseArrayDriver.cxx | 2 -- .../XmlTObjDrivers_IntSparseArrayDriver.hxx | 1 - .../XmlTObjDrivers_ModelDriver.cxx | 2 -- .../XmlTObjDrivers_ModelDriver.hxx | 1 - .../XmlTObjDrivers_ReferenceDriver.cxx | 2 -- .../XmlTObjDrivers_ReferenceDriver.hxx | 1 - .../XmlTObjDrivers_XYZDriver.cxx | 1 - .../XmlTObjDrivers_XYZDriver.hxx | 1 - src/Xw/Xw_Window.cxx | 2 -- src/Xw/Xw_Window.hxx | 1 - 428 files changed, 937 deletions(-) diff --git a/src/TPrsStd/TPrsStd_AISPresentation.cxx b/src/TPrsStd/TPrsStd_AISPresentation.cxx index ce6eeda59e..fd36a3cebf 100644 --- a/src/TPrsStd/TPrsStd_AISPresentation.cxx +++ b/src/TPrsStd/TPrsStd_AISPresentation.cxx @@ -17,11 +17,8 @@ #include #include -#include #include #include -#include -#include #include #include #include @@ -31,10 +28,8 @@ #include #include #include -#include #include #include -#include #include IMPLEMENT_STANDARD_RTTIEXT(TPrsStd_AISPresentation,TDF_Attribute) diff --git a/src/TPrsStd/TPrsStd_AISPresentation.hxx b/src/TPrsStd/TPrsStd_AISPresentation.hxx index ff1d046e95..d3ed8ef6e3 100644 --- a/src/TPrsStd/TPrsStd_AISPresentation.hxx +++ b/src/TPrsStd/TPrsStd_AISPresentation.hxx @@ -20,12 +20,9 @@ #include #include -#include -#include #include #include #include -#include #include #include #include diff --git a/src/TPrsStd/TPrsStd_AISViewer.cxx b/src/TPrsStd/TPrsStd_AISViewer.cxx index ca836098f8..6af0da4cc3 100644 --- a/src/TPrsStd/TPrsStd_AISViewer.cxx +++ b/src/TPrsStd/TPrsStd_AISViewer.cxx @@ -16,13 +16,10 @@ #include -#include #include -#include #include #include #include -#include #include #include #include diff --git a/src/TPrsStd/TPrsStd_AISViewer.hxx b/src/TPrsStd/TPrsStd_AISViewer.hxx index b7e56dcada..91b5120093 100644 --- a/src/TPrsStd/TPrsStd_AISViewer.hxx +++ b/src/TPrsStd/TPrsStd_AISViewer.hxx @@ -21,7 +21,6 @@ #include #include -#include class AIS_InteractiveContext; class Standard_GUID; class TDF_Label; diff --git a/src/TPrsStd/TPrsStd_AxisDriver.cxx b/src/TPrsStd/TPrsStd_AxisDriver.cxx index 9f79e7fe3d..d39ccd6e94 100644 --- a/src/TPrsStd/TPrsStd_AxisDriver.cxx +++ b/src/TPrsStd/TPrsStd_AxisDriver.cxx @@ -21,7 +21,6 @@ #include #include #include -#include #include #include #include diff --git a/src/TPrsStd/TPrsStd_AxisDriver.hxx b/src/TPrsStd/TPrsStd_AxisDriver.hxx index 03b915caa0..d90bb28dfd 100644 --- a/src/TPrsStd/TPrsStd_AxisDriver.hxx +++ b/src/TPrsStd/TPrsStd_AxisDriver.hxx @@ -21,7 +21,6 @@ #include #include -#include class TDF_Label; class AIS_InteractiveObject; diff --git a/src/TPrsStd/TPrsStd_ConstraintDriver.cxx b/src/TPrsStd/TPrsStd_ConstraintDriver.cxx index 60172ef493..1fc7f4acec 100644 --- a/src/TPrsStd/TPrsStd_ConstraintDriver.cxx +++ b/src/TPrsStd/TPrsStd_ConstraintDriver.cxx @@ -15,8 +15,6 @@ #include #include #include -#include -#include #include #include #include diff --git a/src/TPrsStd/TPrsStd_ConstraintDriver.hxx b/src/TPrsStd/TPrsStd_ConstraintDriver.hxx index 590b64554f..cdf2168614 100644 --- a/src/TPrsStd/TPrsStd_ConstraintDriver.hxx +++ b/src/TPrsStd/TPrsStd_ConstraintDriver.hxx @@ -21,7 +21,6 @@ #include #include -#include class TDF_Label; class AIS_InteractiveObject; diff --git a/src/TPrsStd/TPrsStd_ConstraintTools.cxx b/src/TPrsStd/TPrsStd_ConstraintTools.cxx index a67704eb27..9445d0da43 100644 --- a/src/TPrsStd/TPrsStd_ConstraintTools.cxx +++ b/src/TPrsStd/TPrsStd_ConstraintTools.cxx @@ -71,7 +71,6 @@ #include #include #include -#include #include #include #include diff --git a/src/TPrsStd/TPrsStd_DataMapOfGUIDDriver.hxx b/src/TPrsStd/TPrsStd_DataMapOfGUIDDriver.hxx index 60e24ca092..faea7db1b5 100644 --- a/src/TPrsStd/TPrsStd_DataMapOfGUIDDriver.hxx +++ b/src/TPrsStd/TPrsStd_DataMapOfGUIDDriver.hxx @@ -19,7 +19,6 @@ #include #include -#include #include typedef NCollection_DataMap TPrsStd_DataMapOfGUIDDriver; diff --git a/src/TPrsStd/TPrsStd_Driver.hxx b/src/TPrsStd/TPrsStd_Driver.hxx index 1b117dccf7..3b840dad42 100644 --- a/src/TPrsStd/TPrsStd_Driver.hxx +++ b/src/TPrsStd/TPrsStd_Driver.hxx @@ -21,7 +21,6 @@ #include #include -#include class TDF_Label; class AIS_InteractiveObject; diff --git a/src/TPrsStd/TPrsStd_DriverTable.cxx b/src/TPrsStd/TPrsStd_DriverTable.cxx index 857ccc9f74..080bd0bb9e 100644 --- a/src/TPrsStd/TPrsStd_DriverTable.cxx +++ b/src/TPrsStd/TPrsStd_DriverTable.cxx @@ -25,7 +25,6 @@ #include #include #include -#include #include #include #include diff --git a/src/TPrsStd/TPrsStd_DriverTable.hxx b/src/TPrsStd/TPrsStd_DriverTable.hxx index cddd873432..c60d6064de 100644 --- a/src/TPrsStd/TPrsStd_DriverTable.hxx +++ b/src/TPrsStd/TPrsStd_DriverTable.hxx @@ -22,7 +22,6 @@ #include #include -#include class Standard_GUID; class TPrsStd_Driver; diff --git a/src/TPrsStd/TPrsStd_GeometryDriver.cxx b/src/TPrsStd/TPrsStd_GeometryDriver.cxx index 561e27e939..f959ad1d89 100644 --- a/src/TPrsStd/TPrsStd_GeometryDriver.cxx +++ b/src/TPrsStd/TPrsStd_GeometryDriver.cxx @@ -33,10 +33,7 @@ #include #include #include -#include #include -#include -#include #include IMPLEMENT_STANDARD_RTTIEXT(TPrsStd_GeometryDriver,TPrsStd_Driver) diff --git a/src/TPrsStd/TPrsStd_GeometryDriver.hxx b/src/TPrsStd/TPrsStd_GeometryDriver.hxx index 42ada3dc0d..9aae328f7e 100644 --- a/src/TPrsStd/TPrsStd_GeometryDriver.hxx +++ b/src/TPrsStd/TPrsStd_GeometryDriver.hxx @@ -21,7 +21,6 @@ #include #include -#include class TDF_Label; class AIS_InteractiveObject; diff --git a/src/TPrsStd/TPrsStd_NamedShapeDriver.cxx b/src/TPrsStd/TPrsStd_NamedShapeDriver.cxx index 5b720e8096..f1e5eac3bd 100644 --- a/src/TPrsStd/TPrsStd_NamedShapeDriver.cxx +++ b/src/TPrsStd/TPrsStd_NamedShapeDriver.cxx @@ -16,16 +16,10 @@ #include #include #include -#include -#include #include -#include #include -#include -#include #include #include -#include #include #include #include diff --git a/src/TPrsStd/TPrsStd_NamedShapeDriver.hxx b/src/TPrsStd/TPrsStd_NamedShapeDriver.hxx index e9d9b94390..e61cc45cde 100644 --- a/src/TPrsStd/TPrsStd_NamedShapeDriver.hxx +++ b/src/TPrsStd/TPrsStd_NamedShapeDriver.hxx @@ -21,7 +21,6 @@ #include #include -#include class TDF_Label; class AIS_InteractiveObject; diff --git a/src/TPrsStd/TPrsStd_PlaneDriver.cxx b/src/TPrsStd/TPrsStd_PlaneDriver.cxx index ba7372322d..1608a1f80b 100644 --- a/src/TPrsStd/TPrsStd_PlaneDriver.cxx +++ b/src/TPrsStd/TPrsStd_PlaneDriver.cxx @@ -21,7 +21,6 @@ #include #include #include -#include #include #include diff --git a/src/TPrsStd/TPrsStd_PlaneDriver.hxx b/src/TPrsStd/TPrsStd_PlaneDriver.hxx index 577ac70ed8..732f84a284 100644 --- a/src/TPrsStd/TPrsStd_PlaneDriver.hxx +++ b/src/TPrsStd/TPrsStd_PlaneDriver.hxx @@ -21,7 +21,6 @@ #include #include -#include class TDF_Label; class AIS_InteractiveObject; diff --git a/src/TPrsStd/TPrsStd_PointDriver.cxx b/src/TPrsStd/TPrsStd_PointDriver.cxx index f94b5381fa..5d5eba64f1 100644 --- a/src/TPrsStd/TPrsStd_PointDriver.cxx +++ b/src/TPrsStd/TPrsStd_PointDriver.cxx @@ -16,7 +16,6 @@ #include #include #include -#include #include #include #include diff --git a/src/TPrsStd/TPrsStd_PointDriver.hxx b/src/TPrsStd/TPrsStd_PointDriver.hxx index 6137f06fbe..5ffc6bbe67 100644 --- a/src/TPrsStd/TPrsStd_PointDriver.hxx +++ b/src/TPrsStd/TPrsStd_PointDriver.hxx @@ -21,7 +21,6 @@ #include #include -#include class TDF_Label; class AIS_InteractiveObject; diff --git a/src/TShort/TShort_Array1OfShortReal.hxx b/src/TShort/TShort_Array1OfShortReal.hxx index 3a921975de..68e939c8b9 100644 --- a/src/TShort/TShort_Array1OfShortReal.hxx +++ b/src/TShort/TShort_Array1OfShortReal.hxx @@ -15,7 +15,6 @@ #ifndef TShort_Array1OfShortReal_HeaderFile #define TShort_Array1OfShortReal_HeaderFile -#include #include typedef NCollection_Array1 TShort_Array1OfShortReal; diff --git a/src/TShort/TShort_Array2OfShortReal.hxx b/src/TShort/TShort_Array2OfShortReal.hxx index 686cf10cb2..b34a93ead3 100644 --- a/src/TShort/TShort_Array2OfShortReal.hxx +++ b/src/TShort/TShort_Array2OfShortReal.hxx @@ -15,7 +15,6 @@ #ifndef TShort_Array2OfShortReal_HeaderFile #define TShort_Array2OfShortReal_HeaderFile -#include #include typedef NCollection_Array2 TShort_Array2OfShortReal; diff --git a/src/TShort/TShort_SequenceOfShortReal.hxx b/src/TShort/TShort_SequenceOfShortReal.hxx index bb282fe9a0..333dc43042 100644 --- a/src/TShort/TShort_SequenceOfShortReal.hxx +++ b/src/TShort/TShort_SequenceOfShortReal.hxx @@ -15,7 +15,6 @@ #ifndef TShort_SequenceOfShortReal_HeaderFile #define TShort_SequenceOfShortReal_HeaderFile -#include #include typedef NCollection_Sequence TShort_SequenceOfShortReal; diff --git a/src/TopTools/TopTools.cxx b/src/TopTools/TopTools.cxx index 3eee8c55f3..1b59abae5f 100644 --- a/src/TopTools/TopTools.cxx +++ b/src/TopTools/TopTools.cxx @@ -16,7 +16,6 @@ #include -#include #include //======================================================================= diff --git a/src/TopTools/TopTools.hxx b/src/TopTools/TopTools.hxx index 89aea81ed5..c507d81e3b 100644 --- a/src/TopTools/TopTools.hxx +++ b/src/TopTools/TopTools.hxx @@ -22,7 +22,6 @@ #include #include -#include class TopoDS_Shape; diff --git a/src/TopTools/TopTools_DataMapOfOrientedShapeShape.hxx b/src/TopTools/TopTools_DataMapOfOrientedShapeShape.hxx index c024be4406..7ac0f777bd 100644 --- a/src/TopTools/TopTools_DataMapOfOrientedShapeShape.hxx +++ b/src/TopTools/TopTools_DataMapOfOrientedShapeShape.hxx @@ -17,7 +17,6 @@ #ifndef TopTools_DataMapOfOrientedShapeShape_HeaderFile #define TopTools_DataMapOfOrientedShapeShape_HeaderFile -#include #include #include #include diff --git a/src/TopTools/TopTools_DataMapOfShapeReal.hxx b/src/TopTools/TopTools_DataMapOfShapeReal.hxx index 37eba69ba0..3d6e6b4a13 100644 --- a/src/TopTools/TopTools_DataMapOfShapeReal.hxx +++ b/src/TopTools/TopTools_DataMapOfShapeReal.hxx @@ -18,7 +18,6 @@ #define TopTools_DataMapOfShapeReal_HeaderFile #include -#include #include #include diff --git a/src/TopTools/TopTools_DataMapOfShapeShape.hxx b/src/TopTools/TopTools_DataMapOfShapeShape.hxx index 98f56568db..c4314a156b 100644 --- a/src/TopTools/TopTools_DataMapOfShapeShape.hxx +++ b/src/TopTools/TopTools_DataMapOfShapeShape.hxx @@ -17,7 +17,6 @@ #ifndef TopTools_DataMapOfShapeShape_HeaderFile #define TopTools_DataMapOfShapeShape_HeaderFile -#include #include #include #include diff --git a/src/TopTools/TopTools_HArray1OfListOfShape.hxx b/src/TopTools/TopTools_HArray1OfListOfShape.hxx index 772d2867b0..c62e7478c8 100644 --- a/src/TopTools/TopTools_HArray1OfListOfShape.hxx +++ b/src/TopTools/TopTools_HArray1OfListOfShape.hxx @@ -17,7 +17,6 @@ #ifndef TopTools_HArray1OfListOfShape_HeaderFile #define TopTools_HArray1OfListOfShape_HeaderFile -#include #include #include diff --git a/src/TopTools/TopTools_IndexedDataMapOfShapeReal.hxx b/src/TopTools/TopTools_IndexedDataMapOfShapeReal.hxx index 14475c7be4..fd01d563ef 100644 --- a/src/TopTools/TopTools_IndexedDataMapOfShapeReal.hxx +++ b/src/TopTools/TopTools_IndexedDataMapOfShapeReal.hxx @@ -16,7 +16,6 @@ #define TopTools_IndexedDataMapOfShapeReal_HeaderFile #include -#include #include #include diff --git a/src/TopTools/TopTools_IndexedDataMapOfShapeShape.hxx b/src/TopTools/TopTools_IndexedDataMapOfShapeShape.hxx index 3d6459764e..fe9c1acdda 100644 --- a/src/TopTools/TopTools_IndexedDataMapOfShapeShape.hxx +++ b/src/TopTools/TopTools_IndexedDataMapOfShapeShape.hxx @@ -17,7 +17,6 @@ #ifndef TopTools_IndexedDataMapOfShapeShape_HeaderFile #define TopTools_IndexedDataMapOfShapeShape_HeaderFile -#include #include #include #include diff --git a/src/TopTools/TopTools_IndexedMapOfShape.hxx b/src/TopTools/TopTools_IndexedMapOfShape.hxx index a154aa125c..91a910676d 100644 --- a/src/TopTools/TopTools_IndexedMapOfShape.hxx +++ b/src/TopTools/TopTools_IndexedMapOfShape.hxx @@ -17,7 +17,6 @@ #ifndef TopTools_IndexedMapOfShape_HeaderFile #define TopTools_IndexedMapOfShape_HeaderFile -#include #include #include diff --git a/src/TopTools/TopTools_LocationSet.cxx b/src/TopTools/TopTools_LocationSet.cxx index 9f336eed45..ff70e5db94 100644 --- a/src/TopTools/TopTools_LocationSet.cxx +++ b/src/TopTools/TopTools_LocationSet.cxx @@ -17,12 +17,8 @@ #include #include -#include -#include -#include #include #include -#include #include //======================================================================= diff --git a/src/TopTools/TopTools_LocationSet.hxx b/src/TopTools/TopTools_LocationSet.hxx index 7b983e1bfd..1e9a964504 100644 --- a/src/TopTools/TopTools_LocationSet.hxx +++ b/src/TopTools/TopTools_LocationSet.hxx @@ -19,7 +19,6 @@ #include #include -#include #include #include diff --git a/src/TopTools/TopTools_OrientedShapeMapHasher.hxx b/src/TopTools/TopTools_OrientedShapeMapHasher.hxx index d4e105e8ae..e4dfca99b2 100644 --- a/src/TopTools/TopTools_OrientedShapeMapHasher.hxx +++ b/src/TopTools/TopTools_OrientedShapeMapHasher.hxx @@ -19,10 +19,8 @@ #include #include -#include #include -#include class TopoDS_Shape; diff --git a/src/TopTools/TopTools_ShapeMapHasher.hxx b/src/TopTools/TopTools_ShapeMapHasher.hxx index 8827ff9e61..ba47758975 100644 --- a/src/TopTools/TopTools_ShapeMapHasher.hxx +++ b/src/TopTools/TopTools_ShapeMapHasher.hxx @@ -19,10 +19,7 @@ #include #include -#include -#include -#include class TopoDS_Shape; diff --git a/src/TopTools/TopTools_ShapeSet.cxx b/src/TopTools/TopTools_ShapeSet.cxx index 62d6553ca1..ba63755e9e 100644 --- a/src/TopTools/TopTools_ShapeSet.cxx +++ b/src/TopTools/TopTools_ShapeSet.cxx @@ -26,13 +26,11 @@ #include #include #include -#include #include #include #include -#include #include const Standard_CString TopTools_ShapeSet::THE_ASCII_VERSIONS[TopTools_FormatVersion_UPPER + 1] = diff --git a/src/TopTools/TopTools_ShapeSet.hxx b/src/TopTools/TopTools_ShapeSet.hxx index 5eb9e95ec6..b502ac1e5e 100644 --- a/src/TopTools/TopTools_ShapeSet.hxx +++ b/src/TopTools/TopTools_ShapeSet.hxx @@ -19,7 +19,6 @@ #include #include -#include #include #include diff --git a/src/TopTrans/TopTrans_CurveTransition.cxx b/src/TopTrans/TopTrans_CurveTransition.cxx index f560df1b03..4ead87760c 100644 --- a/src/TopTrans/TopTrans_CurveTransition.cxx +++ b/src/TopTrans/TopTrans_CurveTransition.cxx @@ -15,7 +15,6 @@ // commercial license or contractual agreement. -#include #include #include diff --git a/src/TopTrans/TopTrans_CurveTransition.hxx b/src/TopTrans/TopTrans_CurveTransition.hxx index 5d2993a06a..91e5991aa5 100644 --- a/src/TopTrans/TopTrans_CurveTransition.hxx +++ b/src/TopTrans/TopTrans_CurveTransition.hxx @@ -19,14 +19,10 @@ #include #include -#include #include -#include -#include #include #include -#include //! This algorithm is used to compute the transition diff --git a/src/TopTrans/TopTrans_SurfaceTransition.cxx b/src/TopTrans/TopTrans_SurfaceTransition.cxx index c5b5009743..530e6ffd5e 100644 --- a/src/TopTrans/TopTrans_SurfaceTransition.cxx +++ b/src/TopTrans/TopTrans_SurfaceTransition.cxx @@ -16,7 +16,6 @@ // Modified: eap Mar 25 2002 (occ102,occ227), touch case -#include #include #include #include diff --git a/src/TopTrans/TopTrans_SurfaceTransition.hxx b/src/TopTrans/TopTrans_SurfaceTransition.hxx index 36c26e5523..18a311dfc9 100644 --- a/src/TopTrans/TopTrans_SurfaceTransition.hxx +++ b/src/TopTrans/TopTrans_SurfaceTransition.hxx @@ -19,13 +19,10 @@ #include #include -#include #include -#include #include #include -#include #include #include diff --git a/src/Transfer/Transfer_ActorDispatch.cxx b/src/Transfer/Transfer_ActorDispatch.cxx index 1027b183cb..a32da8b8af 100644 --- a/src/Transfer/Transfer_ActorDispatch.cxx +++ b/src/Transfer/Transfer_ActorDispatch.cxx @@ -13,7 +13,6 @@ #include -#include #include #include #include diff --git a/src/Transfer/Transfer_ActorOfFinderProcess.cxx b/src/Transfer/Transfer_ActorOfFinderProcess.cxx index fe165682de..a5019409bd 100644 --- a/src/Transfer/Transfer_ActorOfFinderProcess.cxx +++ b/src/Transfer/Transfer_ActorOfFinderProcess.cxx @@ -13,7 +13,6 @@ #include -#include #include #include #include diff --git a/src/Transfer/Transfer_ActorOfFinderProcess.hxx b/src/Transfer/Transfer_ActorOfFinderProcess.hxx index 9a7837310a..0170e7d20c 100644 --- a/src/Transfer/Transfer_ActorOfFinderProcess.hxx +++ b/src/Transfer/Transfer_ActorOfFinderProcess.hxx @@ -18,9 +18,7 @@ #define _Transfer_ActorOfFinderProcess_HeaderFile #include -#include -#include #include class Transfer_Binder; class Transfer_Finder; diff --git a/src/Transfer/Transfer_ActorOfProcessForFinder.hxx b/src/Transfer/Transfer_ActorOfProcessForFinder.hxx index 207f095fb4..93ef56a694 100644 --- a/src/Transfer/Transfer_ActorOfProcessForFinder.hxx +++ b/src/Transfer/Transfer_ActorOfProcessForFinder.hxx @@ -18,11 +18,8 @@ #define _Transfer_ActorOfProcessForFinder_HeaderFile #include -#include -#include #include -#include #include #include diff --git a/src/Transfer/Transfer_ActorOfProcessForTransient.hxx b/src/Transfer/Transfer_ActorOfProcessForTransient.hxx index 5df317852f..5693266fb8 100644 --- a/src/Transfer/Transfer_ActorOfProcessForTransient.hxx +++ b/src/Transfer/Transfer_ActorOfProcessForTransient.hxx @@ -20,10 +20,7 @@ #include #include -#include #include -#include -#include #include #include diff --git a/src/Transfer/Transfer_ActorOfTransientProcess.cxx b/src/Transfer/Transfer_ActorOfTransientProcess.cxx index c1a5628398..f339a1f4d3 100644 --- a/src/Transfer/Transfer_ActorOfTransientProcess.cxx +++ b/src/Transfer/Transfer_ActorOfTransientProcess.cxx @@ -12,8 +12,6 @@ // commercial license or contractual agreement. -#include -#include #include #include #include diff --git a/src/Transfer/Transfer_ActorOfTransientProcess.hxx b/src/Transfer/Transfer_ActorOfTransientProcess.hxx index 197f04a701..0f3fd6c44e 100644 --- a/src/Transfer/Transfer_ActorOfTransientProcess.hxx +++ b/src/Transfer/Transfer_ActorOfTransientProcess.hxx @@ -18,7 +18,6 @@ #define _Transfer_ActorOfTransientProcess_HeaderFile #include -#include #include class Transfer_Binder; diff --git a/src/Transfer/Transfer_Binder.cxx b/src/Transfer/Transfer_Binder.cxx index bf99ca12bb..1ae815cd4a 100644 --- a/src/Transfer/Transfer_Binder.cxx +++ b/src/Transfer/Transfer_Binder.cxx @@ -14,7 +14,6 @@ #include #include -#include #include #include #include diff --git a/src/Transfer/Transfer_Binder.hxx b/src/Transfer/Transfer_Binder.hxx index d131f2d02d..bbf71dc6b6 100644 --- a/src/Transfer/Transfer_Binder.hxx +++ b/src/Transfer/Transfer_Binder.hxx @@ -23,9 +23,6 @@ #include #include #include -#include -#include -#include class Interface_Check; // resolve name collisions with X11 headers diff --git a/src/Transfer/Transfer_DataInfo.hxx b/src/Transfer/Transfer_DataInfo.hxx index 13fb3d6c68..d17c029159 100644 --- a/src/Transfer/Transfer_DataInfo.hxx +++ b/src/Transfer/Transfer_DataInfo.hxx @@ -22,7 +22,6 @@ #include #include -#include class Standard_Transient; diff --git a/src/Transfer/Transfer_DispatchControl.cxx b/src/Transfer/Transfer_DispatchControl.cxx index 4e3829a530..e0fd85ce4e 100644 --- a/src/Transfer/Transfer_DispatchControl.cxx +++ b/src/Transfer/Transfer_DispatchControl.cxx @@ -12,7 +12,6 @@ // commercial license or contractual agreement. -#include #include #include #include diff --git a/src/Transfer/Transfer_DispatchControl.hxx b/src/Transfer/Transfer_DispatchControl.hxx index dda6faedd7..b5a34cca6d 100644 --- a/src/Transfer/Transfer_DispatchControl.hxx +++ b/src/Transfer/Transfer_DispatchControl.hxx @@ -21,7 +21,6 @@ #include #include -#include class Transfer_TransientProcess; class Interface_InterfaceModel; class Standard_Transient; diff --git a/src/Transfer/Transfer_FindHasher.hxx b/src/Transfer/Transfer_FindHasher.hxx index 01e936a5df..f217c3180d 100644 --- a/src/Transfer/Transfer_FindHasher.hxx +++ b/src/Transfer/Transfer_FindHasher.hxx @@ -22,7 +22,6 @@ #include #include -#include class Transfer_Finder; diff --git a/src/Transfer/Transfer_Finder.hxx b/src/Transfer/Transfer_Finder.hxx index c170f0c05e..5ced95799e 100644 --- a/src/Transfer/Transfer_Finder.hxx +++ b/src/Transfer/Transfer_Finder.hxx @@ -23,12 +23,7 @@ #include #include -#include -#include -#include -#include #include -#include #include diff --git a/src/Transfer/Transfer_FinderProcess.cxx b/src/Transfer/Transfer_FinderProcess.cxx index 0af1263b30..f8b74f08f1 100644 --- a/src/Transfer/Transfer_FinderProcess.cxx +++ b/src/Transfer/Transfer_FinderProcess.cxx @@ -13,10 +13,7 @@ #include -#include #include -#include -#include #include #include diff --git a/src/Transfer/Transfer_HSequenceOfBinder.hxx b/src/Transfer/Transfer_HSequenceOfBinder.hxx index cc9586d0ed..f65bd603f7 100644 --- a/src/Transfer/Transfer_HSequenceOfBinder.hxx +++ b/src/Transfer/Transfer_HSequenceOfBinder.hxx @@ -17,7 +17,6 @@ #ifndef Transfer_HSequenceOfBinder_HeaderFile #define Transfer_HSequenceOfBinder_HeaderFile -#include #include #include diff --git a/src/Transfer/Transfer_HSequenceOfFinder.hxx b/src/Transfer/Transfer_HSequenceOfFinder.hxx index 4aed02f9e4..a996bc5143 100644 --- a/src/Transfer/Transfer_HSequenceOfFinder.hxx +++ b/src/Transfer/Transfer_HSequenceOfFinder.hxx @@ -17,7 +17,6 @@ #ifndef Transfer_HSequenceOfFinder_HeaderFile #define Transfer_HSequenceOfFinder_HeaderFile -#include #include #include diff --git a/src/Transfer/Transfer_IteratorOfProcessForFinder.hxx b/src/Transfer/Transfer_IteratorOfProcessForFinder.hxx index d10d81a0c5..02499102d8 100644 --- a/src/Transfer/Transfer_IteratorOfProcessForFinder.hxx +++ b/src/Transfer/Transfer_IteratorOfProcessForFinder.hxx @@ -23,7 +23,6 @@ #include #include -#include class Standard_NoSuchObject; class Transfer_Finder; diff --git a/src/Transfer/Transfer_MultipleBinder.hxx b/src/Transfer/Transfer_MultipleBinder.hxx index ca965a13b4..140abe38a4 100644 --- a/src/Transfer/Transfer_MultipleBinder.hxx +++ b/src/Transfer/Transfer_MultipleBinder.hxx @@ -22,9 +22,6 @@ #include #include -#include -#include -#include #include class Standard_Transient; diff --git a/src/Transfer/Transfer_ProcessForTransient.hxx b/src/Transfer/Transfer_ProcessForTransient.hxx index 58f7201b4b..d533d81e0f 100644 --- a/src/Transfer/Transfer_ProcessForTransient.hxx +++ b/src/Transfer/Transfer_ProcessForTransient.hxx @@ -19,8 +19,6 @@ #include #include -#include -#include #include class Message_Messenger; diff --git a/src/Transfer/Transfer_ResultFromModel.cxx b/src/Transfer/Transfer_ResultFromModel.cxx index a46d3a00a7..74a0bf4e88 100644 --- a/src/Transfer/Transfer_ResultFromModel.cxx +++ b/src/Transfer/Transfer_ResultFromModel.cxx @@ -20,7 +20,6 @@ #include #include #include -#include #include #include #include diff --git a/src/Transfer/Transfer_ResultFromModel.hxx b/src/Transfer/Transfer_ResultFromModel.hxx index 8883e0510a..f8ccb2d86c 100644 --- a/src/Transfer/Transfer_ResultFromModel.hxx +++ b/src/Transfer/Transfer_ResultFromModel.hxx @@ -24,8 +24,6 @@ #include #include #include -#include -#include #include class Interface_InterfaceModel; class Transfer_ResultFromTransient; diff --git a/src/Transfer/Transfer_ResultFromTransient.cxx b/src/Transfer/Transfer_ResultFromTransient.cxx index 68dec3a9d2..453c19471e 100644 --- a/src/Transfer/Transfer_ResultFromTransient.cxx +++ b/src/Transfer/Transfer_ResultFromTransient.cxx @@ -15,8 +15,6 @@ #include #include #include -#include -#include #include #include diff --git a/src/Transfer/Transfer_ResultFromTransient.hxx b/src/Transfer/Transfer_ResultFromTransient.hxx index df9f757b57..f1ac9ade44 100644 --- a/src/Transfer/Transfer_ResultFromTransient.hxx +++ b/src/Transfer/Transfer_ResultFromTransient.hxx @@ -22,7 +22,6 @@ #include #include -#include #include #include #include diff --git a/src/Transfer/Transfer_SimpleBinderOfTransient.cxx b/src/Transfer/Transfer_SimpleBinderOfTransient.cxx index c3ec56531d..6a05a3141e 100644 --- a/src/Transfer/Transfer_SimpleBinderOfTransient.cxx +++ b/src/Transfer/Transfer_SimpleBinderOfTransient.cxx @@ -14,7 +14,6 @@ #include #include -#include #include #include diff --git a/src/Transfer/Transfer_SimpleBinderOfTransient.hxx b/src/Transfer/Transfer_SimpleBinderOfTransient.hxx index 37a15dad0e..3f798f319d 100644 --- a/src/Transfer/Transfer_SimpleBinderOfTransient.hxx +++ b/src/Transfer/Transfer_SimpleBinderOfTransient.hxx @@ -21,9 +21,6 @@ #include #include -#include -#include -#include class Transfer_SimpleBinderOfTransient; diff --git a/src/Transfer/Transfer_TransferDeadLoop.hxx b/src/Transfer/Transfer_TransferDeadLoop.hxx index 8ae3db4ce0..eed7184a04 100644 --- a/src/Transfer/Transfer_TransferDeadLoop.hxx +++ b/src/Transfer/Transfer_TransferDeadLoop.hxx @@ -18,7 +18,6 @@ #define _Transfer_TransferDeadLoop_HeaderFile #include -#include #include #include diff --git a/src/Transfer/Transfer_TransferDispatch.cxx b/src/Transfer/Transfer_TransferDispatch.cxx index 842698e791..fc9d6d8b88 100644 --- a/src/Transfer/Transfer_TransferDispatch.cxx +++ b/src/Transfer/Transfer_TransferDispatch.cxx @@ -13,7 +13,6 @@ #include -#include #include #include #include diff --git a/src/Transfer/Transfer_TransferDispatch.hxx b/src/Transfer/Transfer_TransferDispatch.hxx index a312b5e393..64ab2a020c 100644 --- a/src/Transfer/Transfer_TransferDispatch.hxx +++ b/src/Transfer/Transfer_TransferDispatch.hxx @@ -22,7 +22,6 @@ #include #include -#include class Interface_InterfaceModel; class Interface_GeneralLib; class Interface_Protocol; diff --git a/src/Transfer/Transfer_TransferInput.cxx b/src/Transfer/Transfer_TransferInput.cxx index 7a95c32002..05232fed00 100644 --- a/src/Transfer/Transfer_TransferInput.cxx +++ b/src/Transfer/Transfer_TransferInput.cxx @@ -13,11 +13,9 @@ #include -#include #include #include #include -#include #include #include #include diff --git a/src/Transfer/Transfer_TransferInput.hxx b/src/Transfer/Transfer_TransferInput.hxx index b11f588cbf..8c50fb5902 100644 --- a/src/Transfer/Transfer_TransferInput.hxx +++ b/src/Transfer/Transfer_TransferInput.hxx @@ -21,7 +21,6 @@ #include #include -#include class Interface_EntityIterator; class Transfer_TransferIterator; class Transfer_TransientProcess; diff --git a/src/Transfer/Transfer_TransferIterator.cxx b/src/Transfer/Transfer_TransferIterator.cxx index 9c10bb5da3..7d81b210d0 100644 --- a/src/Transfer/Transfer_TransferIterator.cxx +++ b/src/Transfer/Transfer_TransferIterator.cxx @@ -15,7 +15,6 @@ #include #include #include -#include #include #include diff --git a/src/Transfer/Transfer_TransferIterator.hxx b/src/Transfer/Transfer_TransferIterator.hxx index 26ec00ba89..07f6453ec3 100644 --- a/src/Transfer/Transfer_TransferIterator.hxx +++ b/src/Transfer/Transfer_TransferIterator.hxx @@ -25,7 +25,6 @@ #include #include #include -#include #include class Transfer_Binder; class Standard_Transient; diff --git a/src/Transfer/Transfer_TransferOutput.cxx b/src/Transfer/Transfer_TransferOutput.cxx index dac98d68a1..1bd7d194c1 100644 --- a/src/Transfer/Transfer_TransferOutput.cxx +++ b/src/Transfer/Transfer_TransferOutput.cxx @@ -18,7 +18,6 @@ #include #include #include -#include #include #include #include diff --git a/src/Transfer/Transfer_TransferOutput.hxx b/src/Transfer/Transfer_TransferOutput.hxx index 08ff2ac805..46479bb5ac 100644 --- a/src/Transfer/Transfer_TransferOutput.hxx +++ b/src/Transfer/Transfer_TransferOutput.hxx @@ -20,7 +20,6 @@ #include #include #include -#include #include class Transfer_TransientProcess; diff --git a/src/Transfer/Transfer_TransientListBinder.cxx b/src/Transfer/Transfer_TransientListBinder.cxx index f4c722638c..4f4c8d6770 100644 --- a/src/Transfer/Transfer_TransientListBinder.cxx +++ b/src/Transfer/Transfer_TransientListBinder.cxx @@ -15,7 +15,6 @@ #include #include #include -#include #include IMPLEMENT_STANDARD_RTTIEXT(Transfer_TransientListBinder,Transfer_Binder) diff --git a/src/Transfer/Transfer_TransientListBinder.hxx b/src/Transfer/Transfer_TransientListBinder.hxx index 353991e19c..fd41714610 100644 --- a/src/Transfer/Transfer_TransientListBinder.hxx +++ b/src/Transfer/Transfer_TransientListBinder.hxx @@ -22,9 +22,6 @@ #include #include -#include -#include -#include #include class Standard_Transient; diff --git a/src/Transfer/Transfer_TransientMapper.hxx b/src/Transfer/Transfer_TransientMapper.hxx index 5bfc96437d..0910523fc5 100644 --- a/src/Transfer/Transfer_TransientMapper.hxx +++ b/src/Transfer/Transfer_TransientMapper.hxx @@ -22,9 +22,6 @@ #include #include -#include -#include -#include class Standard_Transient; class Transfer_DataInfo; class Transfer_Finder; diff --git a/src/Transfer/Transfer_TransientProcess.cxx b/src/Transfer/Transfer_TransientProcess.cxx index 85d0e84aac..1950dd4d74 100644 --- a/src/Transfer/Transfer_TransientProcess.cxx +++ b/src/Transfer/Transfer_TransientProcess.cxx @@ -14,15 +14,12 @@ #include #include -#include #include #include #include -#include #include #include #include -#include #include IMPLEMENT_STANDARD_RTTIEXT(Transfer_TransientProcess,Transfer_ProcessForTransient) diff --git a/src/Transfer/Transfer_TransientProcess.hxx b/src/Transfer/Transfer_TransientProcess.hxx index 2d95d28e20..c39988b64e 100644 --- a/src/Transfer/Transfer_TransientProcess.hxx +++ b/src/Transfer/Transfer_TransientProcess.hxx @@ -23,9 +23,7 @@ #include #include #include -#include #include -#include #include #include #include diff --git a/src/Transfer/Transfer_VoidBinder.hxx b/src/Transfer/Transfer_VoidBinder.hxx index 80a0d5ea70..3fae0b32b5 100644 --- a/src/Transfer/Transfer_VoidBinder.hxx +++ b/src/Transfer/Transfer_VoidBinder.hxx @@ -21,8 +21,6 @@ #include #include -#include -#include class Transfer_VoidBinder; diff --git a/src/TransferBRep/TransferBRep.cxx b/src/TransferBRep/TransferBRep.cxx index d1663423ae..b3830b1182 100644 --- a/src/TransferBRep/TransferBRep.cxx +++ b/src/TransferBRep/TransferBRep.cxx @@ -14,28 +14,18 @@ #include #include -#include #include -#include #include -#include #include #include #include -#include -#include #include -#include -#include -#include #include #include -#include #include #include #include #include -#include #include #include #include diff --git a/src/TransferBRep/TransferBRep_BinderOfShape.cxx b/src/TransferBRep/TransferBRep_BinderOfShape.cxx index cdbe8ddfba..afd1f5b68b 100644 --- a/src/TransferBRep/TransferBRep_BinderOfShape.cxx +++ b/src/TransferBRep/TransferBRep_BinderOfShape.cxx @@ -12,9 +12,6 @@ // commercial license or contractual agreement. -#include -#include -#include #include #include diff --git a/src/TransferBRep/TransferBRep_BinderOfShape.hxx b/src/TransferBRep/TransferBRep_BinderOfShape.hxx index 4320b1d5ad..c73e18db78 100644 --- a/src/TransferBRep/TransferBRep_BinderOfShape.hxx +++ b/src/TransferBRep/TransferBRep_BinderOfShape.hxx @@ -18,7 +18,6 @@ #define _TransferBRep_BinderOfShape_HeaderFile #include -#include #include #include diff --git a/src/TransferBRep/TransferBRep_HSequenceOfTransferResultInfo.hxx b/src/TransferBRep/TransferBRep_HSequenceOfTransferResultInfo.hxx index 3214d29e64..d3a9241c4b 100644 --- a/src/TransferBRep/TransferBRep_HSequenceOfTransferResultInfo.hxx +++ b/src/TransferBRep/TransferBRep_HSequenceOfTransferResultInfo.hxx @@ -17,7 +17,6 @@ #ifndef TransferBRep_HSequenceOfTransferResultInfo_HeaderFile #define TransferBRep_HSequenceOfTransferResultInfo_HeaderFile -#include #include #include diff --git a/src/TransferBRep/TransferBRep_Reader.cxx b/src/TransferBRep/TransferBRep_Reader.cxx index d7dbdffcb7..81d56534a5 100644 --- a/src/TransferBRep/TransferBRep_Reader.cxx +++ b/src/TransferBRep/TransferBRep_Reader.cxx @@ -16,11 +16,9 @@ #include #include #include -#include #include #include #include -#include #include #include #include diff --git a/src/TransferBRep/TransferBRep_Reader.hxx b/src/TransferBRep/TransferBRep_Reader.hxx index 214bcc8fb4..f41092452e 100644 --- a/src/TransferBRep/TransferBRep_Reader.hxx +++ b/src/TransferBRep/TransferBRep_Reader.hxx @@ -22,7 +22,6 @@ #include #include -#include #include #include #include diff --git a/src/TransferBRep/TransferBRep_ShapeBinder.cxx b/src/TransferBRep/TransferBRep_ShapeBinder.cxx index 8c28b74bd2..b8bf739c96 100644 --- a/src/TransferBRep/TransferBRep_ShapeBinder.cxx +++ b/src/TransferBRep/TransferBRep_ShapeBinder.cxx @@ -12,8 +12,6 @@ // commercial license or contractual agreement. -#include -#include #include #include #include diff --git a/src/TransferBRep/TransferBRep_ShapeInfo.hxx b/src/TransferBRep/TransferBRep_ShapeInfo.hxx index 84eea2b805..1455e95a02 100644 --- a/src/TransferBRep/TransferBRep_ShapeInfo.hxx +++ b/src/TransferBRep/TransferBRep_ShapeInfo.hxx @@ -22,7 +22,6 @@ #include #include -#include class TopoDS_Shape; diff --git a/src/TransferBRep/TransferBRep_ShapeListBinder.cxx b/src/TransferBRep/TransferBRep_ShapeListBinder.cxx index e63197ec65..060c1e66cd 100644 --- a/src/TransferBRep/TransferBRep_ShapeListBinder.cxx +++ b/src/TransferBRep/TransferBRep_ShapeListBinder.cxx @@ -14,7 +14,6 @@ #include #include -#include #include #include #include diff --git a/src/TransferBRep/TransferBRep_ShapeListBinder.hxx b/src/TransferBRep/TransferBRep_ShapeListBinder.hxx index 808cdd5f1b..87def35a76 100644 --- a/src/TransferBRep/TransferBRep_ShapeListBinder.hxx +++ b/src/TransferBRep/TransferBRep_ShapeListBinder.hxx @@ -22,9 +22,6 @@ #include #include -#include -#include -#include #include #include class TopoDS_Shape; diff --git a/src/TransferBRep/TransferBRep_ShapeMapper.hxx b/src/TransferBRep/TransferBRep_ShapeMapper.hxx index 6a17a58cc7..7722330e15 100644 --- a/src/TransferBRep/TransferBRep_ShapeMapper.hxx +++ b/src/TransferBRep/TransferBRep_ShapeMapper.hxx @@ -22,9 +22,6 @@ #include #include -#include -#include -#include class TopoDS_Shape; class TopTools_ShapeMapHasher; class TransferBRep_ShapeInfo; diff --git a/src/UTL/UTL.cxx b/src/UTL/UTL.cxx index 6b06abc25c..b7fb0232b4 100644 --- a/src/UTL/UTL.cxx +++ b/src/UTL/UTL.cxx @@ -16,7 +16,6 @@ #include -#include #include #include #include diff --git a/src/UTL/UTL.hxx b/src/UTL/UTL.hxx index b141342216..da9ad4ba9b 100644 --- a/src/UTL/UTL.hxx +++ b/src/UTL/UTL.hxx @@ -24,7 +24,6 @@ #include #include #include -#include #include class TCollection_ExtendedString; class Storage_BaseDriver; diff --git a/src/Units/Units_Dimensions.hxx b/src/Units/Units_Dimensions.hxx index ab110492bb..85610877d8 100644 --- a/src/Units/Units_Dimensions.hxx +++ b/src/Units/Units_Dimensions.hxx @@ -20,10 +20,7 @@ #include #include -#include #include -#include -#include #include diff --git a/src/Units/Units_Explorer.hxx b/src/Units/Units_Explorer.hxx index 3909fa1d31..c54996c3bb 100644 --- a/src/Units/Units_Explorer.hxx +++ b/src/Units/Units_Explorer.hxx @@ -25,8 +25,6 @@ #include #include #include -#include -#include class Units_UnitsSystem; class Units_UnitsDictionary; class TCollection_AsciiString; diff --git a/src/Units/Units_MathSentence.hxx b/src/Units/Units_MathSentence.hxx index 2eae281571..0ff4fecff6 100644 --- a/src/Units/Units_MathSentence.hxx +++ b/src/Units/Units_MathSentence.hxx @@ -19,10 +19,8 @@ #include #include -#include #include -#include //! This class defines all the methods to create and diff --git a/src/Units/Units_Measurement.cxx b/src/Units/Units_Measurement.cxx index 874911a475..3e52746ddc 100644 --- a/src/Units/Units_Measurement.cxx +++ b/src/Units/Units_Measurement.cxx @@ -16,11 +16,9 @@ #include -#include #include #include #include -#include #include //======================================================================= diff --git a/src/Units/Units_Measurement.hxx b/src/Units/Units_Measurement.hxx index c82ce5b450..7a683c9df0 100644 --- a/src/Units/Units_Measurement.hxx +++ b/src/Units/Units_Measurement.hxx @@ -21,9 +21,6 @@ #include #include -#include -#include -#include class Units_Token; diff --git a/src/Units/Units_Operators.hxx b/src/Units/Units_Operators.hxx index 39d1a1a5f7..e452cbdc09 100644 --- a/src/Units/Units_Operators.hxx +++ b/src/Units/Units_Operators.hxx @@ -17,7 +17,6 @@ #define Units_Operators_HeaderFile #include -#include #include Standard_EXPORT Standard_Boolean operator ==(const Handle(Units_Quantity)&,const Standard_CString); diff --git a/src/Units/Units_QuantitiesSequence.hxx b/src/Units/Units_QuantitiesSequence.hxx index 8ecc5b1388..9f6af4f01c 100644 --- a/src/Units/Units_QuantitiesSequence.hxx +++ b/src/Units/Units_QuantitiesSequence.hxx @@ -17,7 +17,6 @@ #ifndef Units_QuantitiesSequence_HeaderFile #define Units_QuantitiesSequence_HeaderFile -#include #include #include diff --git a/src/Units/Units_Quantity.cxx b/src/Units/Units_Quantity.cxx index 7363ca0bd3..8250f2ba2c 100644 --- a/src/Units/Units_Quantity.cxx +++ b/src/Units/Units_Quantity.cxx @@ -15,9 +15,6 @@ // commercial license or contractual agreement. -#include -#include -#include #include #include #include diff --git a/src/Units/Units_Quantity.hxx b/src/Units/Units_Quantity.hxx index 1f4e2142b2..ecf1c75775 100644 --- a/src/Units/Units_Quantity.hxx +++ b/src/Units/Units_Quantity.hxx @@ -22,9 +22,7 @@ #include #include -#include #include -#include #include class TCollection_HAsciiString; class Units_Dimensions; diff --git a/src/Units/Units_Sentence.hxx b/src/Units/Units_Sentence.hxx index e03256f84d..1ee056bb1b 100644 --- a/src/Units/Units_Sentence.hxx +++ b/src/Units/Units_Sentence.hxx @@ -23,7 +23,6 @@ #include #include -#include class Units_Lexicon; class Units_Token; diff --git a/src/Units/Units_ShiftedToken.cxx b/src/Units/Units_ShiftedToken.cxx index 84af6f37cb..0a2e150c9e 100644 --- a/src/Units/Units_ShiftedToken.cxx +++ b/src/Units/Units_ShiftedToken.cxx @@ -17,7 +17,6 @@ #include #include -#include #include #include diff --git a/src/Units/Units_ShiftedToken.hxx b/src/Units/Units_ShiftedToken.hxx index 386522dc2b..1b6426900e 100644 --- a/src/Units/Units_ShiftedToken.hxx +++ b/src/Units/Units_ShiftedToken.hxx @@ -20,9 +20,7 @@ #include #include -#include #include -#include #include class Units_Dimensions; diff --git a/src/Units/Units_ShiftedUnit.cxx b/src/Units/Units_ShiftedUnit.cxx index 14e399d2e4..b6192e7805 100644 --- a/src/Units/Units_ShiftedUnit.cxx +++ b/src/Units/Units_ShiftedUnit.cxx @@ -16,7 +16,6 @@ #include -#include #include #include #include diff --git a/src/Units/Units_ShiftedUnit.hxx b/src/Units/Units_ShiftedUnit.hxx index 87d03ae024..24ca1d7be4 100644 --- a/src/Units/Units_ShiftedUnit.hxx +++ b/src/Units/Units_ShiftedUnit.hxx @@ -20,9 +20,7 @@ #include #include -#include #include -#include #include class Units_Quantity; class Units_Token; diff --git a/src/Units/Units_Token.cxx b/src/Units/Units_Token.cxx index e6aef37673..2f3aa04cbe 100644 --- a/src/Units/Units_Token.cxx +++ b/src/Units/Units_Token.cxx @@ -25,8 +25,6 @@ // plantatoire sur HP. #include -#include -#include #include #include diff --git a/src/Units/Units_Token.hxx b/src/Units/Units_Token.hxx index 12f7cea231..7b48fb721a 100644 --- a/src/Units/Units_Token.hxx +++ b/src/Units/Units_Token.hxx @@ -21,11 +21,8 @@ #include #include -#include #include -#include #include -#include class Units_Dimensions; diff --git a/src/Units/Units_TokensSequence.hxx b/src/Units/Units_TokensSequence.hxx index 5bbddbce5f..42e4cdd807 100644 --- a/src/Units/Units_TokensSequence.hxx +++ b/src/Units/Units_TokensSequence.hxx @@ -17,7 +17,6 @@ #ifndef Units_TokensSequence_HeaderFile #define Units_TokensSequence_HeaderFile -#include #include #include diff --git a/src/Units/Units_Unit.cxx b/src/Units/Units_Unit.cxx index 2fe419bd9c..b36352edfd 100644 --- a/src/Units/Units_Unit.cxx +++ b/src/Units/Units_Unit.cxx @@ -16,11 +16,7 @@ #include -#include -#include #include -#include -#include #include #include #include diff --git a/src/Units/Units_Unit.hxx b/src/Units/Units_Unit.hxx index b15a956816..ee890e5159 100644 --- a/src/Units/Units_Unit.hxx +++ b/src/Units/Units_Unit.hxx @@ -21,11 +21,8 @@ #include #include -#include #include -#include #include -#include #include class TCollection_HAsciiString; class Units_Quantity; diff --git a/src/Units/Units_UnitSentence.cxx b/src/Units/Units_UnitSentence.cxx index 296fa18c3e..f8465da8e9 100644 --- a/src/Units/Units_UnitSentence.cxx +++ b/src/Units/Units_UnitSentence.cxx @@ -18,10 +18,8 @@ #include #include #include -#include #include #include -#include #include #include #include diff --git a/src/Units/Units_UnitsDictionary.cxx b/src/Units/Units_UnitsDictionary.cxx index bbf52d2fab..05268f9a1e 100644 --- a/src/Units/Units_UnitsDictionary.cxx +++ b/src/Units/Units_UnitsDictionary.cxx @@ -31,7 +31,6 @@ #include #include #include -#include #include #include #include diff --git a/src/Units/Units_UnitsDictionary.hxx b/src/Units/Units_UnitsDictionary.hxx index 0e63966bcc..22cec3c477 100644 --- a/src/Units/Units_UnitsDictionary.hxx +++ b/src/Units/Units_UnitsDictionary.hxx @@ -17,15 +17,7 @@ #ifndef _Units_UnitsDictionary_HeaderFile #define _Units_UnitsDictionary_HeaderFile -#include -#include - -#include #include -#include -#include -#include -#include class TCollection_AsciiString; class Units_Dimensions; diff --git a/src/Units/Units_UnitsSystem.cxx b/src/Units/Units_UnitsSystem.cxx index fffc189345..48bd1541d3 100644 --- a/src/Units/Units_UnitsSystem.cxx +++ b/src/Units/Units_UnitsSystem.cxx @@ -19,13 +19,10 @@ #include #include #include -#include #include -#include #include #include #include -#include #include #include #include diff --git a/src/Units/Units_UnitsSystem.hxx b/src/Units/Units_UnitsSystem.hxx index 414a10b367..17135d531b 100644 --- a/src/Units/Units_UnitsSystem.hxx +++ b/src/Units/Units_UnitsSystem.hxx @@ -23,9 +23,6 @@ #include #include #include -#include -#include -#include class TCollection_AsciiString; diff --git a/src/UnitsAPI/UnitsAPI.cxx b/src/UnitsAPI/UnitsAPI.cxx index a090fa2d61..0de5961313 100644 --- a/src/UnitsAPI/UnitsAPI.cxx +++ b/src/UnitsAPI/UnitsAPI.cxx @@ -15,12 +15,8 @@ #include #include -#include #include #include -#include -#include -#include #include #include diff --git a/src/UnitsAPI/UnitsAPI.hxx b/src/UnitsAPI/UnitsAPI.hxx index 0e87401aef..de92b69a7b 100644 --- a/src/UnitsAPI/UnitsAPI.hxx +++ b/src/UnitsAPI/UnitsAPI.hxx @@ -21,10 +21,8 @@ #include #include -#include #include #include -#include class Units_Dimensions; diff --git a/src/V3d/V3d.cxx b/src/V3d/V3d.cxx index 9b7736070f..2bf1342634 100644 --- a/src/V3d/V3d.cxx +++ b/src/V3d/V3d.cxx @@ -16,13 +16,8 @@ #include #include -#include #include -#include -#include #include -#include -#include #include #include diff --git a/src/V3d/V3d_CircularGrid.cxx b/src/V3d/V3d_CircularGrid.cxx index c15eae14b7..ca4a7c911d 100644 --- a/src/V3d/V3d_CircularGrid.cxx +++ b/src/V3d/V3d_CircularGrid.cxx @@ -19,11 +19,9 @@ #include #include #include -#include #include #include #include -#include #include IMPLEMENT_STANDARD_RTTIEXT(V3d_CircularGrid,Aspect_CircularGrid) diff --git a/src/V3d/V3d_CircularGrid.hxx b/src/V3d/V3d_CircularGrid.hxx index b18b414d37..f7278ef9c8 100644 --- a/src/V3d/V3d_CircularGrid.hxx +++ b/src/V3d/V3d_CircularGrid.hxx @@ -18,12 +18,10 @@ #define _V3d_CircularGrid_HeaderFile #include -#include #include #include #include -#include #include #include #include diff --git a/src/V3d/V3d_Light.hxx b/src/V3d/V3d_Light.hxx index 26ef7c4fc1..ac99934b7a 100644 --- a/src/V3d/V3d_Light.hxx +++ b/src/V3d/V3d_Light.hxx @@ -18,7 +18,6 @@ #define _V3d_Light_HeaderFile #include -#include typedef Graphic3d_CLight V3d_Light; typedef Handle_Graphic3d_CLight Handle_V3d_Light; diff --git a/src/V3d/V3d_ListOfView.hxx b/src/V3d/V3d_ListOfView.hxx index 36deb54c04..8b7ccd8134 100644 --- a/src/V3d/V3d_ListOfView.hxx +++ b/src/V3d/V3d_ListOfView.hxx @@ -16,7 +16,6 @@ class V3d_View; #include -#include typedef NCollection_List V3d_ListOfView; typedef V3d_ListOfView::Iterator V3d_ListOfViewIterator; diff --git a/src/V3d/V3d_Plane.hxx b/src/V3d/V3d_Plane.hxx index 36cddc3737..7531712a56 100755 --- a/src/V3d/V3d_Plane.hxx +++ b/src/V3d/V3d_Plane.hxx @@ -16,8 +16,6 @@ #ifndef V3d_Plane_HeaderFile #define V3d_Plane_HeaderFile -#include -#include #include class V3d_Plane; diff --git a/src/V3d/V3d_RectangularGrid.cxx b/src/V3d/V3d_RectangularGrid.cxx index 2eaa5b7ae2..35b1d2b257 100644 --- a/src/V3d/V3d_RectangularGrid.cxx +++ b/src/V3d/V3d_RectangularGrid.cxx @@ -17,13 +17,10 @@ #include #include #include -#include #include -#include #include #include #include -#include #include IMPLEMENT_STANDARD_RTTIEXT(V3d_RectangularGrid,Aspect_RectangularGrid) diff --git a/src/V3d/V3d_RectangularGrid.hxx b/src/V3d/V3d_RectangularGrid.hxx index 33594bb43d..e8ea5241e7 100644 --- a/src/V3d/V3d_RectangularGrid.hxx +++ b/src/V3d/V3d_RectangularGrid.hxx @@ -18,12 +18,10 @@ #define _V3d_RectangularGrid_HeaderFile #include -#include #include #include #include -#include #include #include class Graphic3d_Structure; diff --git a/src/V3d/V3d_Trihedron.cxx b/src/V3d/V3d_Trihedron.cxx index 6b3eac1540..29c04ba8c3 100644 --- a/src/V3d/V3d_Trihedron.cxx +++ b/src/V3d/V3d_Trihedron.cxx @@ -15,11 +15,7 @@ #include -#include #include -#include -#include -#include #include #include #include diff --git a/src/V3d/V3d_Trihedron.hxx b/src/V3d/V3d_Trihedron.hxx index 37028b0aed..70617f4aed 100644 --- a/src/V3d/V3d_Trihedron.hxx +++ b/src/V3d/V3d_Trihedron.hxx @@ -16,8 +16,6 @@ #ifndef _V3d_Trihedron_HeaderFile #define _V3d_Trihedron_HeaderFile -#include -#include #include #include #include diff --git a/src/V3d/V3d_View.cxx b/src/V3d/V3d_View.cxx index e61691a13b..8497cfc596 100644 --- a/src/V3d/V3d_View.cxx +++ b/src/V3d/V3d_View.cxx @@ -23,7 +23,6 @@ #include #include #include -#include #include #include #include @@ -39,13 +38,10 @@ #include #include #include -#include #include #include #include -#include #include -#include #include #include #include diff --git a/src/V3d/V3d_View.hxx b/src/V3d/V3d_View.hxx index 797ca06f44..22847902e9 100644 --- a/src/V3d/V3d_View.hxx +++ b/src/V3d/V3d_View.hxx @@ -17,37 +17,15 @@ #ifndef _V3d_View_HeaderFile #define _V3d_View_HeaderFile -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include #include -#include -#include -#include -#include #include #include -#include #include #include -#include -#include #include -#include #include #include #include -#include #include #include #include diff --git a/src/V3d/V3d_Viewer.cxx b/src/V3d/V3d_Viewer.cxx index d1ac7efdf4..896d612d0b 100644 --- a/src/V3d/V3d_Viewer.cxx +++ b/src/V3d/V3d_Viewer.cxx @@ -13,11 +13,9 @@ #include -#include #include #include #include -#include #include #include #include diff --git a/src/V3d/V3d_Viewer.hxx b/src/V3d/V3d_Viewer.hxx index 12bcca7689..d2431c6dbe 100644 --- a/src/V3d/V3d_Viewer.hxx +++ b/src/V3d/V3d_Viewer.hxx @@ -17,20 +17,13 @@ #ifndef _V3d_Viewer_HeaderFile #define _V3d_Viewer_HeaderFile -#include -#include -#include -#include #include #include -#include #include #include #include #include -#include #include -#include #include #include #include diff --git a/src/ViewerTest/ViewerTest.cxx b/src/ViewerTest/ViewerTest.cxx index 983e07ea79..2acf5a4f4c 100644 --- a/src/ViewerTest/ViewerTest.cxx +++ b/src/ViewerTest/ViewerTest.cxx @@ -21,16 +21,9 @@ #include #include -#include #include -#include -#include #include #include -#include -#include -#include -#include #include #include #include @@ -38,10 +31,8 @@ #include #include #include -#include #include #include -#include #include #include #include @@ -59,7 +50,6 @@ #include #include #include -#include #include #include #include @@ -521,40 +511,26 @@ static void GetTypeAndSignfromString (const char* theName, } #include -#include -#include #include #include -#include -#include #include -#include #include #include #include -#include -#include #include #include -#include -#include #include #include -#include #include #include -#include -#include -#include #include -#include //============================================================================== // VIEWER OBJECT MANAGEMENT GLOBAL VARIABLES diff --git a/src/ViewerTest/ViewerTest.hxx b/src/ViewerTest/ViewerTest.hxx index 77a0cce553..43439eb55e 100644 --- a/src/ViewerTest/ViewerTest.hxx +++ b/src/ViewerTest/ViewerTest.hxx @@ -15,7 +15,6 @@ #ifndef _ViewerTest_HeaderFile #define _ViewerTest_HeaderFile -#include #include #include #include @@ -23,7 +22,6 @@ #include #include #include -#include #include #include #include diff --git a/src/ViewerTest/ViewerTest_CmdParser.hxx b/src/ViewerTest/ViewerTest_CmdParser.hxx index b42e4682be..20a906833a 100644 --- a/src/ViewerTest/ViewerTest_CmdParser.hxx +++ b/src/ViewerTest/ViewerTest_CmdParser.hxx @@ -18,7 +18,6 @@ #include -#include #include #include #include diff --git a/src/ViewerTest/ViewerTest_ContinuousRedrawer.cxx b/src/ViewerTest/ViewerTest_ContinuousRedrawer.cxx index b134db5996..2faff46ddd 100644 --- a/src/ViewerTest/ViewerTest_ContinuousRedrawer.cxx +++ b/src/ViewerTest/ViewerTest_ContinuousRedrawer.cxx @@ -14,7 +14,6 @@ #include #include -#include #include #include #include diff --git a/src/ViewerTest/ViewerTest_DoubleMapOfInteractiveAndName.hxx b/src/ViewerTest/ViewerTest_DoubleMapOfInteractiveAndName.hxx index b3c2f71158..44522f932b 100644 --- a/src/ViewerTest/ViewerTest_DoubleMapOfInteractiveAndName.hxx +++ b/src/ViewerTest/ViewerTest_DoubleMapOfInteractiveAndName.hxx @@ -20,7 +20,6 @@ #include #include #include -#include #include class AIS_InteractiveObject; diff --git a/src/ViewerTest/ViewerTest_EventManager.cxx b/src/ViewerTest/ViewerTest_EventManager.cxx index 2bb2362f35..99141ed81c 100644 --- a/src/ViewerTest/ViewerTest_EventManager.cxx +++ b/src/ViewerTest/ViewerTest_EventManager.cxx @@ -22,7 +22,6 @@ #include #include #include -#include #include #include #include diff --git a/src/ViewerTest/ViewerTest_EventManager.hxx b/src/ViewerTest/ViewerTest_EventManager.hxx index 39398a23c5..e725e32079 100644 --- a/src/ViewerTest/ViewerTest_EventManager.hxx +++ b/src/ViewerTest/ViewerTest_EventManager.hxx @@ -18,7 +18,6 @@ #define _ViewerTest_EventManager_HeaderFile #include -#include #include class AIS_InteractiveContext; diff --git a/src/ViewerTest/ViewerTest_FilletCommands.cxx b/src/ViewerTest/ViewerTest_FilletCommands.cxx index 5a0b66da8a..803b52c10c 100644 --- a/src/ViewerTest/ViewerTest_FilletCommands.cxx +++ b/src/ViewerTest/ViewerTest_FilletCommands.cxx @@ -16,30 +16,17 @@ #include #include -#include #include #include #include #include -#include -#include #include #include -#include #include -#include #include #include -#include -#include #include -#include -#include -#include -#include -#include -#include #include #include diff --git a/src/ViewerTest/ViewerTest_RelationCommands.cxx b/src/ViewerTest/ViewerTest_RelationCommands.cxx index 4c9e8d758b..b8bc78fbb9 100644 --- a/src/ViewerTest/ViewerTest_RelationCommands.cxx +++ b/src/ViewerTest/ViewerTest_RelationCommands.cxx @@ -17,7 +17,6 @@ #include #include -#include #include #include #include @@ -39,16 +38,12 @@ #include #include #include -#include -#include #include -#include #include #include #include #include #include -#include #include #include #include @@ -68,25 +63,17 @@ #include #include #include -#include #include #include -#include #include -#include #include #include #include #include #include -#include #include -#include #include -#include -#include #include -#include extern Standard_Boolean VDisplayAISObject (const TCollection_AsciiString& theName, const Handle(AIS_InteractiveObject)& theAISObj, diff --git a/src/ViewerTest/ViewerTest_ViewerCommands.cxx b/src/ViewerTest/ViewerTest_ViewerCommands.cxx index d71bf895f5..b295489e47 100644 --- a/src/ViewerTest/ViewerTest_ViewerCommands.cxx +++ b/src/ViewerTest/ViewerTest_ViewerCommands.cxx @@ -28,7 +28,6 @@ #include #include #include -#include #include #include #include @@ -36,7 +35,6 @@ #include #include #include -#include #include #include #include @@ -47,7 +45,6 @@ #include #include #include -#include #include #include #include @@ -64,12 +61,9 @@ #include #include #include -#include #include #include #include -#include -#include #include #include #include @@ -81,12 +75,9 @@ #include #include #include -#include -#include #include #include #include -#include #include #include #include @@ -100,12 +91,9 @@ #include -#include - #if defined(_WIN32) #include #include - #include #elif defined(HAVE_XLIB) #include #include diff --git a/src/Vrml/Vrml.cxx b/src/Vrml/Vrml.cxx index 0eceaba0c3..f5f142c2de 100644 --- a/src/Vrml/Vrml.cxx +++ b/src/Vrml/Vrml.cxx @@ -13,7 +13,6 @@ #include -#include #include Standard_OStream& Vrml::VrmlHeaderWriter(Standard_OStream& anOStream) diff --git a/src/Vrml/Vrml_AsciiText.hxx b/src/Vrml/Vrml_AsciiText.hxx index 247b2f1ce9..72cb1a4f0d 100644 --- a/src/Vrml/Vrml_AsciiText.hxx +++ b/src/Vrml/Vrml_AsciiText.hxx @@ -21,7 +21,6 @@ #include #include -#include #include #include #include diff --git a/src/Vrml/Vrml_DirectionalLight.cxx b/src/Vrml/Vrml_DirectionalLight.cxx index 7922483d0f..decdb5e8bc 100644 --- a/src/Vrml/Vrml_DirectionalLight.cxx +++ b/src/Vrml/Vrml_DirectionalLight.cxx @@ -12,8 +12,6 @@ // commercial license or contractual agreement. -#include -#include #include Vrml_DirectionalLight::Vrml_DirectionalLight(): diff --git a/src/Vrml/Vrml_DirectionalLight.hxx b/src/Vrml/Vrml_DirectionalLight.hxx index ce55977bbb..e78ad86374 100644 --- a/src/Vrml/Vrml_DirectionalLight.hxx +++ b/src/Vrml/Vrml_DirectionalLight.hxx @@ -21,8 +21,6 @@ #include #include -#include -#include #include #include #include diff --git a/src/Vrml/Vrml_Info.cxx b/src/Vrml/Vrml_Info.cxx index a362b98095..34f3ea2b1f 100644 --- a/src/Vrml/Vrml_Info.cxx +++ b/src/Vrml/Vrml_Info.cxx @@ -12,7 +12,6 @@ // commercial license or contractual agreement. -#include #include Vrml_Info::Vrml_Info(const TCollection_AsciiString& aString) diff --git a/src/Vrml/Vrml_Instancing.cxx b/src/Vrml/Vrml_Instancing.cxx index c4ba55e758..349f63c452 100644 --- a/src/Vrml/Vrml_Instancing.cxx +++ b/src/Vrml/Vrml_Instancing.cxx @@ -12,7 +12,6 @@ // commercial license or contractual agreement. -#include #include Vrml_Instancing::Vrml_Instancing(const TCollection_AsciiString& aString) diff --git a/src/Vrml/Vrml_LOD.hxx b/src/Vrml/Vrml_LOD.hxx index b73ca294a4..1744fffef3 100644 --- a/src/Vrml/Vrml_LOD.hxx +++ b/src/Vrml/Vrml_LOD.hxx @@ -22,7 +22,6 @@ #include #include -#include #include #include diff --git a/src/Vrml/Vrml_MatrixTransform.cxx b/src/Vrml/Vrml_MatrixTransform.cxx index 96d0b8fa00..4fcc63aba7 100644 --- a/src/Vrml/Vrml_MatrixTransform.cxx +++ b/src/Vrml/Vrml_MatrixTransform.cxx @@ -12,11 +12,8 @@ // commercial license or contractual agreement. -#include -#include #include #include -#include #include Vrml_MatrixTransform::Vrml_MatrixTransform() diff --git a/src/Vrml/Vrml_MatrixTransform.hxx b/src/Vrml/Vrml_MatrixTransform.hxx index ea01a2ab08..06235d7b95 100644 --- a/src/Vrml/Vrml_MatrixTransform.hxx +++ b/src/Vrml/Vrml_MatrixTransform.hxx @@ -19,7 +19,6 @@ #include #include -#include #include #include diff --git a/src/Vrml/Vrml_OrthographicCamera.cxx b/src/Vrml/Vrml_OrthographicCamera.cxx index 44f4a32d32..ae2352c997 100644 --- a/src/Vrml/Vrml_OrthographicCamera.cxx +++ b/src/Vrml/Vrml_OrthographicCamera.cxx @@ -12,7 +12,6 @@ // commercial license or contractual agreement. -#include #include #include diff --git a/src/Vrml/Vrml_OrthographicCamera.hxx b/src/Vrml/Vrml_OrthographicCamera.hxx index df9c0f8e71..a824cc4cb2 100644 --- a/src/Vrml/Vrml_OrthographicCamera.hxx +++ b/src/Vrml/Vrml_OrthographicCamera.hxx @@ -23,7 +23,6 @@ #include #include -#include #include diff --git a/src/Vrml/Vrml_PerspectiveCamera.cxx b/src/Vrml/Vrml_PerspectiveCamera.cxx index c52dcee775..b8b82d1453 100644 --- a/src/Vrml/Vrml_PerspectiveCamera.cxx +++ b/src/Vrml/Vrml_PerspectiveCamera.cxx @@ -12,7 +12,6 @@ // commercial license or contractual agreement. -#include #include #include diff --git a/src/Vrml/Vrml_PerspectiveCamera.hxx b/src/Vrml/Vrml_PerspectiveCamera.hxx index 05c202a35e..0ac5bf6025 100644 --- a/src/Vrml/Vrml_PerspectiveCamera.hxx +++ b/src/Vrml/Vrml_PerspectiveCamera.hxx @@ -23,7 +23,6 @@ #include #include -#include #include diff --git a/src/Vrml/Vrml_PointLight.cxx b/src/Vrml/Vrml_PointLight.cxx index d1d24d84a7..bb83044674 100644 --- a/src/Vrml/Vrml_PointLight.cxx +++ b/src/Vrml/Vrml_PointLight.cxx @@ -12,8 +12,6 @@ // commercial license or contractual agreement. -#include -#include #include Vrml_PointLight::Vrml_PointLight(): diff --git a/src/Vrml/Vrml_PointLight.hxx b/src/Vrml/Vrml_PointLight.hxx index b382b848e7..2445ce4959 100644 --- a/src/Vrml/Vrml_PointLight.hxx +++ b/src/Vrml/Vrml_PointLight.hxx @@ -21,8 +21,6 @@ #include #include -#include -#include #include #include #include diff --git a/src/Vrml/Vrml_PointSet.hxx b/src/Vrml/Vrml_PointSet.hxx index 67a4dfa214..4e850fe843 100644 --- a/src/Vrml/Vrml_PointSet.hxx +++ b/src/Vrml/Vrml_PointSet.hxx @@ -21,7 +21,6 @@ #include #include -#include #include diff --git a/src/Vrml/Vrml_SFImage.hxx b/src/Vrml/Vrml_SFImage.hxx index 3ac24c3ac3..604e2a9ae4 100644 --- a/src/Vrml/Vrml_SFImage.hxx +++ b/src/Vrml/Vrml_SFImage.hxx @@ -23,7 +23,6 @@ #include #include #include -#include #include diff --git a/src/Vrml/Vrml_Scale.cxx b/src/Vrml/Vrml_Scale.cxx index c91858e7a4..bc1a495085 100644 --- a/src/Vrml/Vrml_Scale.cxx +++ b/src/Vrml/Vrml_Scale.cxx @@ -12,7 +12,6 @@ // commercial license or contractual agreement. -#include #include Vrml_Scale::Vrml_Scale() diff --git a/src/Vrml/Vrml_SpotLight.cxx b/src/Vrml/Vrml_SpotLight.cxx index 605098cfc2..31b9b24240 100644 --- a/src/Vrml/Vrml_SpotLight.cxx +++ b/src/Vrml/Vrml_SpotLight.cxx @@ -12,8 +12,6 @@ // commercial license or contractual agreement. -#include -#include #include Vrml_SpotLight::Vrml_SpotLight(): diff --git a/src/Vrml/Vrml_SpotLight.hxx b/src/Vrml/Vrml_SpotLight.hxx index 91ba29de4c..c510773589 100644 --- a/src/Vrml/Vrml_SpotLight.hxx +++ b/src/Vrml/Vrml_SpotLight.hxx @@ -21,8 +21,6 @@ #include #include -#include -#include #include #include #include diff --git a/src/Vrml/Vrml_Switch.hxx b/src/Vrml/Vrml_Switch.hxx index 83bac436d3..bbeac0c5c8 100644 --- a/src/Vrml/Vrml_Switch.hxx +++ b/src/Vrml/Vrml_Switch.hxx @@ -21,7 +21,6 @@ #include #include -#include #include diff --git a/src/Vrml/Vrml_Texture2Transform.cxx b/src/Vrml/Vrml_Texture2Transform.cxx index becb5ffb68..95f72f4fe8 100644 --- a/src/Vrml/Vrml_Texture2Transform.cxx +++ b/src/Vrml/Vrml_Texture2Transform.cxx @@ -12,7 +12,6 @@ // commercial license or contractual agreement. -#include #include Vrml_Texture2Transform::Vrml_Texture2Transform() diff --git a/src/Vrml/Vrml_Texture2Transform.hxx b/src/Vrml/Vrml_Texture2Transform.hxx index 827a094502..a73e248a4c 100644 --- a/src/Vrml/Vrml_Texture2Transform.hxx +++ b/src/Vrml/Vrml_Texture2Transform.hxx @@ -22,7 +22,6 @@ #include #include -#include #include diff --git a/src/Vrml/Vrml_Transform.cxx b/src/Vrml/Vrml_Transform.cxx index 29ee339e4f..17228cbbc4 100644 --- a/src/Vrml/Vrml_Transform.cxx +++ b/src/Vrml/Vrml_Transform.cxx @@ -12,8 +12,6 @@ // commercial license or contractual agreement. -#include -#include #include Vrml_Transform::Vrml_Transform() diff --git a/src/Vrml/Vrml_Translation.cxx b/src/Vrml/Vrml_Translation.cxx index c53c69dee4..cd827353b0 100644 --- a/src/Vrml/Vrml_Translation.cxx +++ b/src/Vrml/Vrml_Translation.cxx @@ -12,7 +12,6 @@ // commercial license or contractual agreement. -#include #include Vrml_Translation::Vrml_Translation() diff --git a/src/Vrml/Vrml_WWWAnchor.cxx b/src/Vrml/Vrml_WWWAnchor.cxx index a92d176cf8..cb02879477 100644 --- a/src/Vrml/Vrml_WWWAnchor.cxx +++ b/src/Vrml/Vrml_WWWAnchor.cxx @@ -12,7 +12,6 @@ // commercial license or contractual agreement. -#include #include Vrml_WWWAnchor::Vrml_WWWAnchor(const TCollection_AsciiString& aName, diff --git a/src/Vrml/Vrml_WWWInline.cxx b/src/Vrml/Vrml_WWWInline.cxx index 1a68bba216..294223dc45 100644 --- a/src/Vrml/Vrml_WWWInline.cxx +++ b/src/Vrml/Vrml_WWWInline.cxx @@ -12,7 +12,6 @@ // commercial license or contractual agreement. -#include #include #include diff --git a/src/Vrml/Vrml_WWWInline.hxx b/src/Vrml/Vrml_WWWInline.hxx index 8d762a69b5..24d8619b49 100644 --- a/src/Vrml/Vrml_WWWInline.hxx +++ b/src/Vrml/Vrml_WWWInline.hxx @@ -19,7 +19,6 @@ #include #include -#include #include #include diff --git a/src/VrmlAPI/VrmlAPI.hxx b/src/VrmlAPI/VrmlAPI.hxx index ccc78523a6..ee7850aaef 100644 --- a/src/VrmlAPI/VrmlAPI.hxx +++ b/src/VrmlAPI/VrmlAPI.hxx @@ -21,7 +21,6 @@ #include #include -#include class TopoDS_Shape; diff --git a/src/VrmlAPI/VrmlAPI_Writer.cxx b/src/VrmlAPI/VrmlAPI_Writer.cxx index f4a4f49a80..70cc2ef969 100644 --- a/src/VrmlAPI/VrmlAPI_Writer.cxx +++ b/src/VrmlAPI/VrmlAPI_Writer.cxx @@ -16,7 +16,6 @@ #include #include #include -#include #include #include #include @@ -24,7 +23,6 @@ #include #include #include -#include #include #include #include diff --git a/src/VrmlAPI/VrmlAPI_Writer.hxx b/src/VrmlAPI/VrmlAPI_Writer.hxx index 2d4312544e..5fb66fcbc7 100644 --- a/src/VrmlAPI/VrmlAPI_Writer.hxx +++ b/src/VrmlAPI/VrmlAPI_Writer.hxx @@ -21,9 +21,7 @@ #include #include -#include #include -#include #include class VrmlConverter_Drawer; diff --git a/src/VrmlConverter/VrmlConverter_Curve.cxx b/src/VrmlConverter/VrmlConverter_Curve.cxx index d8fbd89f37..5c1f63c978 100644 --- a/src/VrmlConverter/VrmlConverter_Curve.cxx +++ b/src/VrmlConverter/VrmlConverter_Curve.cxx @@ -13,13 +13,9 @@ #include -#include -#include #include #include #include -#include -#include #include #include #include diff --git a/src/VrmlConverter/VrmlConverter_Curve.hxx b/src/VrmlConverter/VrmlConverter_Curve.hxx index a4acd9e828..9f1153820f 100644 --- a/src/VrmlConverter/VrmlConverter_Curve.hxx +++ b/src/VrmlConverter/VrmlConverter_Curve.hxx @@ -22,7 +22,6 @@ #include #include -#include #include class Adaptor3d_Curve; class VrmlConverter_Drawer; diff --git a/src/VrmlConverter/VrmlConverter_DeflectionCurve.cxx b/src/VrmlConverter/VrmlConverter_DeflectionCurve.cxx index 6d17eb41ca..6664391d78 100644 --- a/src/VrmlConverter/VrmlConverter_DeflectionCurve.cxx +++ b/src/VrmlConverter/VrmlConverter_DeflectionCurve.cxx @@ -17,12 +17,9 @@ #include #include #include -#include #include #include #include -#include -#include #include #include #include diff --git a/src/VrmlConverter/VrmlConverter_DeflectionCurve.hxx b/src/VrmlConverter/VrmlConverter_DeflectionCurve.hxx index c4ec24fa98..85d3dfb0ed 100644 --- a/src/VrmlConverter/VrmlConverter_DeflectionCurve.hxx +++ b/src/VrmlConverter/VrmlConverter_DeflectionCurve.hxx @@ -22,7 +22,6 @@ #include #include -#include #include #include class Adaptor3d_Curve; diff --git a/src/VrmlConverter/VrmlConverter_Drawer.hxx b/src/VrmlConverter/VrmlConverter_Drawer.hxx index 0bb46183dd..b64b8f18a7 100644 --- a/src/VrmlConverter/VrmlConverter_Drawer.hxx +++ b/src/VrmlConverter/VrmlConverter_Drawer.hxx @@ -21,9 +21,7 @@ #include #include -#include #include -#include #include class VrmlConverter_IsoAspect; class VrmlConverter_LineAspect; diff --git a/src/VrmlConverter/VrmlConverter_IsoAspect.cxx b/src/VrmlConverter/VrmlConverter_IsoAspect.cxx index c4194641a2..a75d34300f 100644 --- a/src/VrmlConverter/VrmlConverter_IsoAspect.cxx +++ b/src/VrmlConverter/VrmlConverter_IsoAspect.cxx @@ -12,7 +12,6 @@ // commercial license or contractual agreement. -#include #include #include diff --git a/src/VrmlConverter/VrmlConverter_IsoAspect.hxx b/src/VrmlConverter/VrmlConverter_IsoAspect.hxx index aa5b7cf4db..a6c820da75 100644 --- a/src/VrmlConverter/VrmlConverter_IsoAspect.hxx +++ b/src/VrmlConverter/VrmlConverter_IsoAspect.hxx @@ -22,7 +22,6 @@ #include #include -#include class Vrml_Material; diff --git a/src/VrmlConverter/VrmlConverter_LineAspect.cxx b/src/VrmlConverter/VrmlConverter_LineAspect.cxx index 0c19228bcb..07fb3b3dc4 100644 --- a/src/VrmlConverter/VrmlConverter_LineAspect.cxx +++ b/src/VrmlConverter/VrmlConverter_LineAspect.cxx @@ -12,7 +12,6 @@ // commercial license or contractual agreement. -#include #include #include diff --git a/src/VrmlConverter/VrmlConverter_LineAspect.hxx b/src/VrmlConverter/VrmlConverter_LineAspect.hxx index 63fefdd891..26ceb430cf 100644 --- a/src/VrmlConverter/VrmlConverter_LineAspect.hxx +++ b/src/VrmlConverter/VrmlConverter_LineAspect.hxx @@ -20,7 +20,6 @@ #include #include -#include #include class Vrml_Material; diff --git a/src/VrmlConverter/VrmlConverter_PointAspect.cxx b/src/VrmlConverter/VrmlConverter_PointAspect.cxx index afa907bb5b..bf85bdddb3 100644 --- a/src/VrmlConverter/VrmlConverter_PointAspect.cxx +++ b/src/VrmlConverter/VrmlConverter_PointAspect.cxx @@ -12,7 +12,6 @@ // commercial license or contractual agreement. -#include #include #include diff --git a/src/VrmlConverter/VrmlConverter_PointAspect.hxx b/src/VrmlConverter/VrmlConverter_PointAspect.hxx index 500b56d3cd..49d39bb65d 100644 --- a/src/VrmlConverter/VrmlConverter_PointAspect.hxx +++ b/src/VrmlConverter/VrmlConverter_PointAspect.hxx @@ -20,7 +20,6 @@ #include #include -#include #include class Vrml_Material; diff --git a/src/VrmlConverter/VrmlConverter_Projector.cxx b/src/VrmlConverter/VrmlConverter_Projector.cxx index b65fc76dc5..0db9159c57 100644 --- a/src/VrmlConverter/VrmlConverter_Projector.cxx +++ b/src/VrmlConverter/VrmlConverter_Projector.cxx @@ -19,14 +19,11 @@ #include #include #include -#include #include #include #include #include #include -#include -#include #include #include diff --git a/src/VrmlConverter/VrmlConverter_ShadedShape.cxx b/src/VrmlConverter/VrmlConverter_ShadedShape.cxx index efdaf1fc9b..414a2fb6e3 100644 --- a/src/VrmlConverter/VrmlConverter_ShadedShape.cxx +++ b/src/VrmlConverter/VrmlConverter_ShadedShape.cxx @@ -14,41 +14,28 @@ #include #include #include -#include -#include #include -#include #include #include #include -#include -#include #include #include #include #include #include #include -#include #include #include #include -#include -#include #include #include #include -#include -#include #include #include -#include #include #include #include #include -#include -#include #include #include diff --git a/src/VrmlConverter/VrmlConverter_ShadingAspect.cxx b/src/VrmlConverter/VrmlConverter_ShadingAspect.cxx index 0d3c26f2b9..56023e7a9a 100644 --- a/src/VrmlConverter/VrmlConverter_ShadingAspect.cxx +++ b/src/VrmlConverter/VrmlConverter_ShadingAspect.cxx @@ -14,7 +14,6 @@ #include #include -#include #include IMPLEMENT_STANDARD_RTTIEXT(VrmlConverter_ShadingAspect,Standard_Transient) diff --git a/src/VrmlConverter/VrmlConverter_ShadingAspect.hxx b/src/VrmlConverter/VrmlConverter_ShadingAspect.hxx index c76f152606..1849bfdd35 100644 --- a/src/VrmlConverter/VrmlConverter_ShadingAspect.hxx +++ b/src/VrmlConverter/VrmlConverter_ShadingAspect.hxx @@ -21,7 +21,6 @@ #include #include -#include #include class Vrml_Material; diff --git a/src/VrmlConverter/VrmlConverter_WFDeflectionRestrictedFace.cxx b/src/VrmlConverter/VrmlConverter_WFDeflectionRestrictedFace.cxx index 4c67a6c4a2..bfba8b13be 100644 --- a/src/VrmlConverter/VrmlConverter_WFDeflectionRestrictedFace.cxx +++ b/src/VrmlConverter/VrmlConverter_WFDeflectionRestrictedFace.cxx @@ -16,9 +16,7 @@ #include #include #include -#include #include -#include #include #include #include diff --git a/src/VrmlConverter/VrmlConverter_WFDeflectionShape.cxx b/src/VrmlConverter/VrmlConverter_WFDeflectionShape.cxx index 8ce2254c1f..7b46cc9de2 100644 --- a/src/VrmlConverter/VrmlConverter_WFDeflectionShape.cxx +++ b/src/VrmlConverter/VrmlConverter_WFDeflectionShape.cxx @@ -15,13 +15,11 @@ #include #include #include -#include #include #include #include #include #include -#include #include #include #include @@ -29,10 +27,8 @@ #include #include #include -#include #include #include -#include #include //========================================================================= diff --git a/src/VrmlConverter/VrmlConverter_WFRestrictedFace.cxx b/src/VrmlConverter/VrmlConverter_WFRestrictedFace.cxx index 3a897a4a22..fd23d50898 100644 --- a/src/VrmlConverter/VrmlConverter_WFRestrictedFace.cxx +++ b/src/VrmlConverter/VrmlConverter_WFRestrictedFace.cxx @@ -15,8 +15,6 @@ #include #include #include -#include -#include #include #include #include diff --git a/src/VrmlConverter/VrmlConverter_WFShape.cxx b/src/VrmlConverter/VrmlConverter_WFShape.cxx index 73cbc833d3..2ee9766e0a 100644 --- a/src/VrmlConverter/VrmlConverter_WFShape.cxx +++ b/src/VrmlConverter/VrmlConverter_WFShape.cxx @@ -15,11 +15,8 @@ #include #include #include -#include -#include #include #include -#include #include #include #include diff --git a/src/VrmlData/VrmlData_Geometry.cxx b/src/VrmlData/VrmlData_Geometry.cxx index 36a01a9b44..ba7ef08958 100644 --- a/src/VrmlData/VrmlData_Geometry.cxx +++ b/src/VrmlData/VrmlData_Geometry.cxx @@ -23,14 +23,12 @@ #include #include #include -#include #include #include #include #include #include #include -#include #include IMPLEMENT_STANDARD_RTTIEXT(VrmlData_Geometry,VrmlData_Node) diff --git a/src/VrmlData/VrmlData_Group.cxx b/src/VrmlData/VrmlData_Group.cxx index 7229dfd5cf..3af1d8c706 100644 --- a/src/VrmlData/VrmlData_Group.cxx +++ b/src/VrmlData/VrmlData_Group.cxx @@ -14,7 +14,6 @@ // commercial license or contractual agreement. #include -#include #include #include #include diff --git a/src/VrmlData/VrmlData_InBuffer.hxx b/src/VrmlData/VrmlData_InBuffer.hxx index 8b2008a361..ea6af18dbb 100644 --- a/src/VrmlData/VrmlData_InBuffer.hxx +++ b/src/VrmlData/VrmlData_InBuffer.hxx @@ -17,7 +17,6 @@ #define VrmlData_InBuffer_HeaderFile #include -#include /** * Structure passed to the methods dealing with input stream. */ diff --git a/src/VrmlData/VrmlData_IndexedFaceSet.cxx b/src/VrmlData/VrmlData_IndexedFaceSet.cxx index 50621df328..3b0c346e9a 100644 --- a/src/VrmlData/VrmlData_IndexedFaceSet.cxx +++ b/src/VrmlData/VrmlData_IndexedFaceSet.cxx @@ -16,7 +16,6 @@ #include #include #include -#include #include #include #include diff --git a/src/VrmlData/VrmlData_Node.cxx b/src/VrmlData/VrmlData_Node.cxx index 57f0c984e3..d4a85824aa 100644 --- a/src/VrmlData/VrmlData_Node.cxx +++ b/src/VrmlData/VrmlData_Node.cxx @@ -21,8 +21,6 @@ #include #include #include -#include -#include #include #include #include diff --git a/src/VrmlData/VrmlData_Node.hxx b/src/VrmlData/VrmlData_Node.hxx index ef516a3ca5..fed5337283 100644 --- a/src/VrmlData/VrmlData_Node.hxx +++ b/src/VrmlData/VrmlData_Node.hxx @@ -16,7 +16,6 @@ #ifndef VrmlData_Node_HeaderFile #define VrmlData_Node_HeaderFile -#include #include #include #include diff --git a/src/VrmlData/VrmlData_Scene.cxx b/src/VrmlData/VrmlData_Scene.cxx index 332757ce2e..ec8acc331c 100644 --- a/src/VrmlData/VrmlData_Scene.cxx +++ b/src/VrmlData/VrmlData_Scene.cxx @@ -14,12 +14,9 @@ // commercial license or contractual agreement. #include -#include #include #include -#include #include -#include #include #include #include @@ -36,9 +33,7 @@ #include //#include #include -#include #include -#include #include #include #include diff --git a/src/VrmlData/VrmlData_Scene.hxx b/src/VrmlData/VrmlData_Scene.hxx index b60162ca9a..495d8dea8e 100644 --- a/src/VrmlData/VrmlData_Scene.hxx +++ b/src/VrmlData/VrmlData_Scene.hxx @@ -19,7 +19,6 @@ #include #include #include -#include #include #include #include diff --git a/src/VrmlData/VrmlData_ShapeConvert.cxx b/src/VrmlData/VrmlData_ShapeConvert.cxx index 1dc31a3d37..6411c778de 100644 --- a/src/VrmlData/VrmlData_ShapeConvert.cxx +++ b/src/VrmlData/VrmlData_ShapeConvert.cxx @@ -16,7 +16,6 @@ #include #include #include -#include #include #include #include @@ -28,16 +27,12 @@ #include #include #include -#include -#include -#include #include #include //#include #include #include #include -#include #include #include #include @@ -45,7 +40,6 @@ #include #include #include -#include #include #include #include diff --git a/src/VrmlData/VrmlData_ShapeConvert.hxx b/src/VrmlData/VrmlData_ShapeConvert.hxx index f93861ee12..1ccb05aa76 100644 --- a/src/VrmlData/VrmlData_ShapeConvert.hxx +++ b/src/VrmlData/VrmlData_ShapeConvert.hxx @@ -17,7 +17,6 @@ #define VrmlData_ShapeConvert_HeaderFile #include -#include #include #include #include diff --git a/src/WNT/WNT_Dword.hxx b/src/WNT/WNT_Dword.hxx index 0e8edc321d..e3ff61df34 100644 --- a/src/WNT/WNT_Dword.hxx +++ b/src/WNT/WNT_Dword.hxx @@ -34,11 +34,6 @@ # endif // THIS # endif // __WINDOWS_H_INCLUDED -# ifndef __STANDARD_TYPE_HXX_INCLUDED -# define __STANDARD_TYPE_HXX_INCLUDED -# include -# endif // __STANDARD_TYPE_HXX_INCLUDED - typedef DWORD WNT_Dword; #endif // __WNT_Dword_HeaderFile diff --git a/src/WNT/WNT_WClass.hxx b/src/WNT/WNT_WClass.hxx index f3ffb76fdb..55808add07 100644 --- a/src/WNT/WNT_WClass.hxx +++ b/src/WNT/WNT_WClass.hxx @@ -23,10 +23,8 @@ #include #include -#include #include #include -#include #include //! This class defines a Windows NT window class. diff --git a/src/WNT/WNT_Window.cxx b/src/WNT/WNT_Window.cxx index 10edc7a242..fff008000d 100644 --- a/src/WNT/WNT_Window.cxx +++ b/src/WNT/WNT_Window.cxx @@ -23,7 +23,6 @@ #include #include -#include #include #include #include diff --git a/src/Wasm/Wasm_Window.hxx b/src/Wasm/Wasm_Window.hxx index 5043f83cdd..d1337aa967 100644 --- a/src/Wasm/Wasm_Window.hxx +++ b/src/Wasm/Wasm_Window.hxx @@ -18,7 +18,6 @@ #include #include -#include #include class Aspect_WindowInputListener; diff --git a/src/XCAFApp/XCAFApp_Application.cxx b/src/XCAFApp/XCAFApp_Application.cxx index 05c305b72c..ca33c1626b 100644 --- a/src/XCAFApp/XCAFApp_Application.cxx +++ b/src/XCAFApp/XCAFApp_Application.cxx @@ -17,7 +17,6 @@ #include #include #include -#include #include #include #include diff --git a/src/XCAFApp/XCAFApp_Application.hxx b/src/XCAFApp/XCAFApp_Application.hxx index 6f1d3bcc02..a64eb54ffe 100644 --- a/src/XCAFApp/XCAFApp_Application.hxx +++ b/src/XCAFApp/XCAFApp_Application.hxx @@ -20,7 +20,6 @@ #include #include -#include #include diff --git a/src/XCAFDimTolObjects/XCAFDimTolObjects_DatumObject.hxx b/src/XCAFDimTolObjects/XCAFDimTolObjects_DatumObject.hxx index 3ecb65b161..db29b20fa1 100644 --- a/src/XCAFDimTolObjects/XCAFDimTolObjects_DatumObject.hxx +++ b/src/XCAFDimTolObjects/XCAFDimTolObjects_DatumObject.hxx @@ -18,7 +18,6 @@ #define _XCAFDimTolObjects_DatumObject_HeaderFile #include -#include #include #include @@ -29,7 +28,6 @@ #include #include #include -#include #include class XCAFDimTolObjects_DatumObject; diff --git a/src/XCAFDimTolObjects/XCAFDimTolObjects_DimensionObject.cxx b/src/XCAFDimTolObjects/XCAFDimTolObjects_DimensionObject.cxx index 9de6d4acd6..6724e94141 100644 --- a/src/XCAFDimTolObjects/XCAFDimTolObjects_DimensionObject.cxx +++ b/src/XCAFDimTolObjects/XCAFDimTolObjects_DimensionObject.cxx @@ -13,7 +13,6 @@ #include -#include #include IMPLEMENT_STANDARD_RTTIEXT(XCAFDimTolObjects_DimensionObject,Standard_Transient) diff --git a/src/XCAFDimTolObjects/XCAFDimTolObjects_DimensionObject.hxx b/src/XCAFDimTolObjects/XCAFDimTolObjects_DimensionObject.hxx index cccfdc3bc4..c34f6b6165 100644 --- a/src/XCAFDimTolObjects/XCAFDimTolObjects_DimensionObject.hxx +++ b/src/XCAFDimTolObjects/XCAFDimTolObjects_DimensionObject.hxx @@ -25,7 +25,6 @@ #include #include #include -#include #include #include #include @@ -39,7 +38,6 @@ #include #include #include -#include #include class XCAFDimTolObjects_DimensionObject; diff --git a/src/XCAFDimTolObjects/XCAFDimTolObjects_GeomToleranceObject.hxx b/src/XCAFDimTolObjects/XCAFDimTolObjects_GeomToleranceObject.hxx index 15e746518c..0743736c61 100644 --- a/src/XCAFDimTolObjects/XCAFDimTolObjects_GeomToleranceObject.hxx +++ b/src/XCAFDimTolObjects/XCAFDimTolObjects_GeomToleranceObject.hxx @@ -18,9 +18,7 @@ #define _XCAFDimTolObjects_GeomToleranceObject_HeaderFile #include -#include -#include #include #include #include @@ -30,7 +28,6 @@ #include #include #include -#include #include #include #include diff --git a/src/XCAFDimTolObjects/XCAFDimTolObjects_Tool.cxx b/src/XCAFDimTolObjects/XCAFDimTolObjects_Tool.cxx index b70ef39e14..0aaf70d3aa 100644 --- a/src/XCAFDimTolObjects/XCAFDimTolObjects_Tool.cxx +++ b/src/XCAFDimTolObjects/XCAFDimTolObjects_Tool.cxx @@ -19,7 +19,6 @@ #include #include #include -#include #include #include #include diff --git a/src/XCAFDoc/XCAFDoc.cxx b/src/XCAFDoc/XCAFDoc.cxx index 88ec31a3c2..9faf73353c 100644 --- a/src/XCAFDoc/XCAFDoc.cxx +++ b/src/XCAFDoc/XCAFDoc.cxx @@ -14,12 +14,7 @@ #include #include -#include - -#include #include -#include -#include #include #include #include @@ -30,12 +25,10 @@ #include #include #include -#include #include #include #include #include -#include #include #include #include diff --git a/src/XCAFDoc/XCAFDoc_Area.hxx b/src/XCAFDoc/XCAFDoc_Area.hxx index 8227e539ab..de12923090 100644 --- a/src/XCAFDoc/XCAFDoc_Area.hxx +++ b/src/XCAFDoc/XCAFDoc_Area.hxx @@ -21,7 +21,6 @@ #include #include -#include #include class Standard_GUID; class TDF_Label; diff --git a/src/XCAFDoc/XCAFDoc_AssemblyItemRef.cxx b/src/XCAFDoc/XCAFDoc_AssemblyItemRef.cxx index 73fb97f360..2ab3a0838e 100644 --- a/src/XCAFDoc/XCAFDoc_AssemblyItemRef.cxx +++ b/src/XCAFDoc/XCAFDoc_AssemblyItemRef.cxx @@ -15,7 +15,6 @@ #include -#include #include #include #include diff --git a/src/XCAFDoc/XCAFDoc_AssemblyItemRef.hxx b/src/XCAFDoc/XCAFDoc_AssemblyItemRef.hxx index 2c90f97b16..37586d05d9 100644 --- a/src/XCAFDoc/XCAFDoc_AssemblyItemRef.hxx +++ b/src/XCAFDoc/XCAFDoc_AssemblyItemRef.hxx @@ -17,8 +17,6 @@ #define _XCAFDoc_AssemblyItemRef_HeaderFile #include -#include -#include #include #include diff --git a/src/XCAFDoc/XCAFDoc_Centroid.hxx b/src/XCAFDoc/XCAFDoc_Centroid.hxx index b7d522f989..4b747e0054 100644 --- a/src/XCAFDoc/XCAFDoc_Centroid.hxx +++ b/src/XCAFDoc/XCAFDoc_Centroid.hxx @@ -17,7 +17,6 @@ #define _XCAFDoc_Centroid_HeaderFile #include -#include #include #include diff --git a/src/XCAFDoc/XCAFDoc_Color.hxx b/src/XCAFDoc/XCAFDoc_Color.hxx index 5009b5121c..f64c842302 100644 --- a/src/XCAFDoc/XCAFDoc_Color.hxx +++ b/src/XCAFDoc/XCAFDoc_Color.hxx @@ -17,13 +17,10 @@ #define _XCAFDoc_Color_HeaderFile #include -#include -#include #include #include #include -#include class Standard_GUID; class TDF_Label; class Quantity_Color; diff --git a/src/XCAFDoc/XCAFDoc_ColorTool.cxx b/src/XCAFDoc/XCAFDoc_ColorTool.cxx index 1f32a97baa..42e924c171 100644 --- a/src/XCAFDoc/XCAFDoc_ColorTool.cxx +++ b/src/XCAFDoc/XCAFDoc_ColorTool.cxx @@ -13,9 +13,6 @@ #include -#include -#include -#include #include #include #include @@ -25,8 +22,6 @@ #include #include #include -#include -#include #include #include #include diff --git a/src/XCAFDoc/XCAFDoc_DataMapOfShapeLabel.hxx b/src/XCAFDoc/XCAFDoc_DataMapOfShapeLabel.hxx index 7c4ef5cedf..65ad1effb0 100644 --- a/src/XCAFDoc/XCAFDoc_DataMapOfShapeLabel.hxx +++ b/src/XCAFDoc/XCAFDoc_DataMapOfShapeLabel.hxx @@ -16,7 +16,6 @@ #ifndef XCAFDoc_DataMapOfShapeLabel_HeaderFile #define XCAFDoc_DataMapOfShapeLabel_HeaderFile -#include #include #include #include diff --git a/src/XCAFDoc/XCAFDoc_Datum.cxx b/src/XCAFDoc/XCAFDoc_Datum.cxx index 67ec506729..b70cd88ac0 100644 --- a/src/XCAFDoc/XCAFDoc_Datum.cxx +++ b/src/XCAFDoc/XCAFDoc_Datum.cxx @@ -13,9 +13,7 @@ #include -#include #include -#include #include #include #include @@ -25,7 +23,6 @@ #include #include #include -#include #include #include #include diff --git a/src/XCAFDoc/XCAFDoc_DimTolTool.cxx b/src/XCAFDoc/XCAFDoc_DimTolTool.cxx index bdc6a0b954..3d54642338 100644 --- a/src/XCAFDoc/XCAFDoc_DimTolTool.cxx +++ b/src/XCAFDoc/XCAFDoc_DimTolTool.cxx @@ -13,16 +13,12 @@ #include -#include -#include #include -#include #include #include #include #include #include -#include #include #include #include diff --git a/src/XCAFDoc/XCAFDoc_DimTolTool.hxx b/src/XCAFDoc/XCAFDoc_DimTolTool.hxx index d43085c7f4..1282719f1c 100644 --- a/src/XCAFDoc/XCAFDoc_DimTolTool.hxx +++ b/src/XCAFDoc/XCAFDoc_DimTolTool.hxx @@ -26,7 +26,6 @@ #include #include #include -#include #include class XCAFDoc_ShapeTool; diff --git a/src/XCAFDoc/XCAFDoc_Dimension.cxx b/src/XCAFDoc/XCAFDoc_Dimension.cxx index 2f73076a6e..dd2acbac26 100644 --- a/src/XCAFDoc/XCAFDoc_Dimension.cxx +++ b/src/XCAFDoc/XCAFDoc_Dimension.cxx @@ -17,7 +17,6 @@ #include #include #include -#include #include #include #include @@ -25,7 +24,6 @@ #include #include #include -#include #include #include #include diff --git a/src/XCAFDoc/XCAFDoc_DocumentTool.cxx b/src/XCAFDoc/XCAFDoc_DocumentTool.cxx index cc4eba53b0..af6ffd69b3 100644 --- a/src/XCAFDoc/XCAFDoc_DocumentTool.cxx +++ b/src/XCAFDoc/XCAFDoc_DocumentTool.cxx @@ -15,14 +15,12 @@ #include -#include #include #include #include #include #include #include -#include #include #include #include diff --git a/src/XCAFDoc/XCAFDoc_Editor.hxx b/src/XCAFDoc/XCAFDoc_Editor.hxx index dffc46bd16..832d522d2d 100644 --- a/src/XCAFDoc/XCAFDoc_Editor.hxx +++ b/src/XCAFDoc/XCAFDoc_Editor.hxx @@ -16,9 +16,7 @@ #ifndef _XCAFDoc_Editor_HeaderFile #define _XCAFDoc_Editor_HeaderFile -#include #include -#include #include #include #include diff --git a/src/XCAFDoc/XCAFDoc_GeomTolerance.cxx b/src/XCAFDoc/XCAFDoc_GeomTolerance.cxx index e86f6e9d7e..3eb81bdddd 100644 --- a/src/XCAFDoc/XCAFDoc_GeomTolerance.cxx +++ b/src/XCAFDoc/XCAFDoc_GeomTolerance.cxx @@ -26,7 +26,6 @@ #include #include #include -#include #include IMPLEMENT_DERIVED_ATTRIBUTE(XCAFDoc_GeomTolerance,TDataStd_GenericEmpty) diff --git a/src/XCAFDoc/XCAFDoc_GraphNode.hxx b/src/XCAFDoc/XCAFDoc_GraphNode.hxx index ca21030adf..8fb1aa141c 100644 --- a/src/XCAFDoc/XCAFDoc_GraphNode.hxx +++ b/src/XCAFDoc/XCAFDoc_GraphNode.hxx @@ -17,12 +17,10 @@ #define _XCAFDoc_GraphNode_HeaderFile #include -#include #include #include #include -#include #include #include class TDF_Label; diff --git a/src/XCAFDoc/XCAFDoc_LayerTool.cxx b/src/XCAFDoc/XCAFDoc_LayerTool.cxx index 50e92c6d93..42917fe4e9 100644 --- a/src/XCAFDoc/XCAFDoc_LayerTool.cxx +++ b/src/XCAFDoc/XCAFDoc_LayerTool.cxx @@ -15,7 +15,6 @@ #include -#include #include #include #include diff --git a/src/XCAFDoc/XCAFDoc_LayerTool.hxx b/src/XCAFDoc/XCAFDoc_LayerTool.hxx index 8b7235d4a3..386cf9c204 100644 --- a/src/XCAFDoc/XCAFDoc_LayerTool.hxx +++ b/src/XCAFDoc/XCAFDoc_LayerTool.hxx @@ -20,7 +20,6 @@ #include #include -#include #include #include class XCAFDoc_ShapeTool; diff --git a/src/XCAFDoc/XCAFDoc_LengthUnit.hxx b/src/XCAFDoc/XCAFDoc_LengthUnit.hxx index 4eb82ac6d5..2e1f7e2d59 100644 --- a/src/XCAFDoc/XCAFDoc_LengthUnit.hxx +++ b/src/XCAFDoc/XCAFDoc_LengthUnit.hxx @@ -20,7 +20,6 @@ #include #include -#include #include #include diff --git a/src/XCAFDoc/XCAFDoc_Location.hxx b/src/XCAFDoc/XCAFDoc_Location.hxx index be49b6ea85..ee28b3c9ac 100644 --- a/src/XCAFDoc/XCAFDoc_Location.hxx +++ b/src/XCAFDoc/XCAFDoc_Location.hxx @@ -17,7 +17,6 @@ #define _XCAFDoc_Location_HeaderFile #include -#include #include #include diff --git a/src/XCAFDoc/XCAFDoc_MaterialTool.cxx b/src/XCAFDoc/XCAFDoc_MaterialTool.cxx index 8802d90bbf..2950189d86 100644 --- a/src/XCAFDoc/XCAFDoc_MaterialTool.cxx +++ b/src/XCAFDoc/XCAFDoc_MaterialTool.cxx @@ -13,9 +13,7 @@ #include -#include #include -#include #include #include #include diff --git a/src/XCAFDoc/XCAFDoc_Note.cxx b/src/XCAFDoc/XCAFDoc_Note.cxx index 0a474df07e..5cf55a0c8d 100644 --- a/src/XCAFDoc/XCAFDoc_Note.cxx +++ b/src/XCAFDoc/XCAFDoc_Note.cxx @@ -14,7 +14,6 @@ #include #include -#include #include #include #include @@ -22,7 +21,6 @@ #include #include #include -#include #include #include #include diff --git a/src/XCAFDoc/XCAFDoc_Note.hxx b/src/XCAFDoc/XCAFDoc_Note.hxx index d488d64bb1..981e390a97 100644 --- a/src/XCAFDoc/XCAFDoc_Note.hxx +++ b/src/XCAFDoc/XCAFDoc_Note.hxx @@ -15,9 +15,7 @@ #define _XCAFDoc_Note_HeaderFile #include -#include #include -#include #include #include #include diff --git a/src/XCAFDoc/XCAFDoc_NotesTool.cxx b/src/XCAFDoc/XCAFDoc_NotesTool.cxx index 45e3bb9619..28f46daa1a 100644 --- a/src/XCAFDoc/XCAFDoc_NotesTool.cxx +++ b/src/XCAFDoc/XCAFDoc_NotesTool.cxx @@ -13,11 +13,8 @@ #include -#include -#include #include #include -#include #include #include #include diff --git a/src/XCAFDoc/XCAFDoc_ShapeMapTool.hxx b/src/XCAFDoc/XCAFDoc_ShapeMapTool.hxx index cd559ded77..2fa7d0bc04 100644 --- a/src/XCAFDoc/XCAFDoc_ShapeMapTool.hxx +++ b/src/XCAFDoc/XCAFDoc_ShapeMapTool.hxx @@ -17,7 +17,6 @@ #define _XCAFDoc_ShapeMapTool_HeaderFile #include -#include #include #include diff --git a/src/XCAFDoc/XCAFDoc_ShapeTool.cxx b/src/XCAFDoc/XCAFDoc_ShapeTool.cxx index 294c97461a..84bafa4dbb 100644 --- a/src/XCAFDoc/XCAFDoc_ShapeTool.cxx +++ b/src/XCAFDoc/XCAFDoc_ShapeTool.cxx @@ -18,13 +18,11 @@ #include #include #include -#include #include #include #include #include #include -#include #include #include #include @@ -34,12 +32,10 @@ #include #include #include -#include #include #include #include #include -#include #include #include #include diff --git a/src/XCAFDoc/XCAFDoc_ShapeTool.hxx b/src/XCAFDoc/XCAFDoc_ShapeTool.hxx index 281641efcb..7aca2734a2 100644 --- a/src/XCAFDoc/XCAFDoc_ShapeTool.hxx +++ b/src/XCAFDoc/XCAFDoc_ShapeTool.hxx @@ -17,7 +17,6 @@ #define _XCAFDoc_ShapeTool_HeaderFile #include -#include #include #include diff --git a/src/XCAFDoc/XCAFDoc_View.cxx b/src/XCAFDoc/XCAFDoc_View.cxx index 53b01255e6..4515b3f340 100644 --- a/src/XCAFDoc/XCAFDoc_View.cxx +++ b/src/XCAFDoc/XCAFDoc_View.cxx @@ -15,17 +15,13 @@ #include -#include #include #include #include -#include #include #include -#include #include #include -#include #include #include diff --git a/src/XCAFDoc/XCAFDoc_ViewTool.cxx b/src/XCAFDoc/XCAFDoc_ViewTool.cxx index 58c5f8baa3..9943934737 100644 --- a/src/XCAFDoc/XCAFDoc_ViewTool.cxx +++ b/src/XCAFDoc/XCAFDoc_ViewTool.cxx @@ -15,7 +15,6 @@ #include -#include #include #include #include @@ -24,7 +23,6 @@ #include #include #include -#include #include #include #include diff --git a/src/XCAFDoc/XCAFDoc_VisMaterialCommon.hxx b/src/XCAFDoc/XCAFDoc_VisMaterialCommon.hxx index 88148f2dfa..9a914eb603 100644 --- a/src/XCAFDoc/XCAFDoc_VisMaterialCommon.hxx +++ b/src/XCAFDoc/XCAFDoc_VisMaterialCommon.hxx @@ -14,7 +14,6 @@ #ifndef _XCAFDoc_VisMaterialCommon_HeaderFile #define _XCAFDoc_VisMaterialCommon_HeaderFile -#include #include #include #include diff --git a/src/XCAFDoc/XCAFDoc_VisMaterialPBR.hxx b/src/XCAFDoc/XCAFDoc_VisMaterialPBR.hxx index 123a815a87..7fb2843534 100644 --- a/src/XCAFDoc/XCAFDoc_VisMaterialPBR.hxx +++ b/src/XCAFDoc/XCAFDoc_VisMaterialPBR.hxx @@ -14,7 +14,6 @@ #ifndef _XCAFDoc_VisMaterialPBR_HeaderFile #define _XCAFDoc_VisMaterialPBR_HeaderFile -#include #include #include #include diff --git a/src/XCAFDoc/XCAFDoc_VisMaterialTool.cxx b/src/XCAFDoc/XCAFDoc_VisMaterialTool.cxx index fb19c9e1d6..4bfc4c6cc0 100644 --- a/src/XCAFDoc/XCAFDoc_VisMaterialTool.cxx +++ b/src/XCAFDoc/XCAFDoc_VisMaterialTool.cxx @@ -13,15 +13,12 @@ #include -#include #include #include -#include #include #include #include #include -#include #include #include #include diff --git a/src/XCAFDoc/XCAFDoc_VisMaterialTool.hxx b/src/XCAFDoc/XCAFDoc_VisMaterialTool.hxx index bd88971cc3..e99196851e 100644 --- a/src/XCAFDoc/XCAFDoc_VisMaterialTool.hxx +++ b/src/XCAFDoc/XCAFDoc_VisMaterialTool.hxx @@ -15,7 +15,6 @@ #define _XCAFDoc_VisMaterialTool_HeaderFile #include -#include #include class TopoDS_Shape; diff --git a/src/XCAFDoc/XCAFDoc_Volume.hxx b/src/XCAFDoc/XCAFDoc_Volume.hxx index feaab230bd..3e6a6bf045 100644 --- a/src/XCAFDoc/XCAFDoc_Volume.hxx +++ b/src/XCAFDoc/XCAFDoc_Volume.hxx @@ -20,7 +20,6 @@ #include #include -#include #include class Standard_GUID; class TDF_Label; diff --git a/src/XCAFPrs/XCAFPrs.cxx b/src/XCAFPrs/XCAFPrs.cxx index e7ff3a3cc3..07a5978274 100644 --- a/src/XCAFPrs/XCAFPrs.cxx +++ b/src/XCAFPrs/XCAFPrs.cxx @@ -15,16 +15,11 @@ #include -#include -#include #include -#include #include #include #include #include -#include -#include #include #include #include diff --git a/src/XCAFPrs/XCAFPrs_AISObject.cxx b/src/XCAFPrs/XCAFPrs_AISObject.cxx index 5d01a9079f..e890665988 100644 --- a/src/XCAFPrs/XCAFPrs_AISObject.cxx +++ b/src/XCAFPrs/XCAFPrs_AISObject.cxx @@ -15,13 +15,10 @@ #include -#include #include #include #include #include -#include -#include #include #include #include @@ -29,13 +26,11 @@ #include #include #include -#include #include #include #include #include #include -#include #include IMPLEMENT_STANDARD_RTTIEXT(XCAFPrs_AISObject,AIS_ColoredShape) diff --git a/src/XCAFPrs/XCAFPrs_DataMapOfStyleShape.hxx b/src/XCAFPrs/XCAFPrs_DataMapOfStyleShape.hxx index 4822e6bd27..7576a7985a 100644 --- a/src/XCAFPrs/XCAFPrs_DataMapOfStyleShape.hxx +++ b/src/XCAFPrs/XCAFPrs_DataMapOfStyleShape.hxx @@ -16,7 +16,6 @@ #ifndef XCAFPrs_DataMapOfStyleShape_HeaderFile #define XCAFPrs_DataMapOfStyleShape_HeaderFile -#include #include #include #include diff --git a/src/XCAFPrs/XCAFPrs_DataMapOfStyleTransient.hxx b/src/XCAFPrs/XCAFPrs_DataMapOfStyleTransient.hxx index e8e6635499..6520c85f42 100644 --- a/src/XCAFPrs/XCAFPrs_DataMapOfStyleTransient.hxx +++ b/src/XCAFPrs/XCAFPrs_DataMapOfStyleTransient.hxx @@ -18,7 +18,6 @@ #include #include -#include #include typedef NCollection_DataMap XCAFPrs_DataMapOfStyleTransient; diff --git a/src/XCAFPrs/XCAFPrs_DocumentExplorer.hxx b/src/XCAFPrs/XCAFPrs_DocumentExplorer.hxx index c5afb8a823..98fbb01fb3 100644 --- a/src/XCAFPrs/XCAFPrs_DocumentExplorer.hxx +++ b/src/XCAFPrs/XCAFPrs_DocumentExplorer.hxx @@ -16,7 +16,6 @@ #define _XCAFPrs_DocumentExplorer_HeaderFile #include -#include #include #include #include diff --git a/src/XCAFPrs/XCAFPrs_DocumentIdIterator.hxx b/src/XCAFPrs/XCAFPrs_DocumentIdIterator.hxx index 5d0c9dc2f4..85165658fc 100644 --- a/src/XCAFPrs/XCAFPrs_DocumentIdIterator.hxx +++ b/src/XCAFPrs/XCAFPrs_DocumentIdIterator.hxx @@ -17,10 +17,6 @@ #include -#include -#include -#include - //! Auxiliary tool for iterating through Path identification string. class XCAFPrs_DocumentIdIterator { diff --git a/src/XCAFPrs/XCAFPrs_Driver.hxx b/src/XCAFPrs/XCAFPrs_Driver.hxx index 91a9ceb973..30165d3672 100644 --- a/src/XCAFPrs/XCAFPrs_Driver.hxx +++ b/src/XCAFPrs/XCAFPrs_Driver.hxx @@ -20,7 +20,6 @@ #include #include -#include class TDF_Label; class AIS_InteractiveObject; class Standard_GUID; diff --git a/src/XCAFPrs/XCAFPrs_IndexedDataMapOfShapeStyle.hxx b/src/XCAFPrs/XCAFPrs_IndexedDataMapOfShapeStyle.hxx index e3b48a28c2..0b84459608 100644 --- a/src/XCAFPrs/XCAFPrs_IndexedDataMapOfShapeStyle.hxx +++ b/src/XCAFPrs/XCAFPrs_IndexedDataMapOfShapeStyle.hxx @@ -16,7 +16,6 @@ #ifndef XCAFPrs_IndexedDataMapOfShapeStyle_HeaderFile #define XCAFPrs_IndexedDataMapOfShapeStyle_HeaderFile -#include #include #include #include diff --git a/src/XCAFView/XCAFView_Object.hxx b/src/XCAFView/XCAFView_Object.hxx index 5a94e91884..b80b032acf 100644 --- a/src/XCAFView/XCAFView_Object.hxx +++ b/src/XCAFView/XCAFView_Object.hxx @@ -20,7 +20,6 @@ #include #include -#include #include #include #include diff --git a/src/XDEDRAW/XDEDRAW.hxx b/src/XDEDRAW/XDEDRAW.hxx index c26574fd5c..e40d1de911 100644 --- a/src/XDEDRAW/XDEDRAW.hxx +++ b/src/XDEDRAW/XDEDRAW.hxx @@ -18,7 +18,6 @@ #include #include -#include #include diff --git a/src/XDEDRAW/XDEDRAW_Colors.cxx b/src/XDEDRAW/XDEDRAW_Colors.cxx index 83f31c0c36..2ab74cad05 100644 --- a/src/XDEDRAW/XDEDRAW_Colors.cxx +++ b/src/XDEDRAW/XDEDRAW_Colors.cxx @@ -24,7 +24,6 @@ #include #include #include -#include #include #include #include diff --git a/src/XDEDRAW/XDEDRAW_Colors.hxx b/src/XDEDRAW/XDEDRAW_Colors.hxx index e616ea0356..efa03676db 100644 --- a/src/XDEDRAW/XDEDRAW_Colors.hxx +++ b/src/XDEDRAW/XDEDRAW_Colors.hxx @@ -18,7 +18,6 @@ #include #include -#include #include diff --git a/src/XDEDRAW/XDEDRAW_Common.cxx b/src/XDEDRAW/XDEDRAW_Common.cxx index e69e19dc77..e047a2522a 100644 --- a/src/XDEDRAW/XDEDRAW_Common.cxx +++ b/src/XDEDRAW/XDEDRAW_Common.cxx @@ -27,24 +27,18 @@ #include #include #include -#include #include #include #include -#include -#include #include #include #include -#include #include #include #include #include #include #include -#include -#include #include #include diff --git a/src/XDEDRAW/XDEDRAW_Common.hxx b/src/XDEDRAW/XDEDRAW_Common.hxx index 189a2905b2..d945f419ee 100644 --- a/src/XDEDRAW/XDEDRAW_Common.hxx +++ b/src/XDEDRAW/XDEDRAW_Common.hxx @@ -18,7 +18,6 @@ #include #include -#include #include diff --git a/src/XDEDRAW/XDEDRAW_GDTs.cxx b/src/XDEDRAW/XDEDRAW_GDTs.cxx index e338b354f7..58a0073b59 100644 --- a/src/XDEDRAW/XDEDRAW_GDTs.cxx +++ b/src/XDEDRAW/XDEDRAW_GDTs.cxx @@ -25,35 +25,23 @@ #include #include -#include -#include #include #include #include #include -#include #include #include #include -#include #include -#include -#include -#include -#include -#include #include #include #include #include -#include #include #include #include -#include -#include #include #include diff --git a/src/XDEDRAW/XDEDRAW_Layers.cxx b/src/XDEDRAW/XDEDRAW_Layers.cxx index ac308f8b65..50d4733f90 100644 --- a/src/XDEDRAW/XDEDRAW_Layers.cxx +++ b/src/XDEDRAW/XDEDRAW_Layers.cxx @@ -18,9 +18,6 @@ #include #include #include -#include -#include -#include #include #include #include @@ -28,7 +25,6 @@ #include #include #include -#include #include //======================================================================= diff --git a/src/XDEDRAW/XDEDRAW_Layers.hxx b/src/XDEDRAW/XDEDRAW_Layers.hxx index aba4e41036..47ae83163a 100644 --- a/src/XDEDRAW/XDEDRAW_Layers.hxx +++ b/src/XDEDRAW/XDEDRAW_Layers.hxx @@ -18,7 +18,6 @@ #include #include -#include #include diff --git a/src/XDEDRAW/XDEDRAW_Notes.cxx b/src/XDEDRAW/XDEDRAW_Notes.cxx index 21ee24349e..61223236fd 100644 --- a/src/XDEDRAW/XDEDRAW_Notes.cxx +++ b/src/XDEDRAW/XDEDRAW_Notes.cxx @@ -20,7 +20,6 @@ #include #include #include -#include #include #include #include diff --git a/src/XDEDRAW/XDEDRAW_Notes.hxx b/src/XDEDRAW/XDEDRAW_Notes.hxx index c7392af4ea..bed8e76321 100644 --- a/src/XDEDRAW/XDEDRAW_Notes.hxx +++ b/src/XDEDRAW/XDEDRAW_Notes.hxx @@ -18,7 +18,6 @@ #include #include -#include #include diff --git a/src/XDEDRAW/XDEDRAW_Props.cxx b/src/XDEDRAW/XDEDRAW_Props.cxx index 3e87e312b1..98f4790b4b 100644 --- a/src/XDEDRAW/XDEDRAW_Props.cxx +++ b/src/XDEDRAW/XDEDRAW_Props.cxx @@ -28,7 +28,6 @@ #include #include #include -#include #include #include #include @@ -36,13 +35,11 @@ #include #include #include -#include #include #include #include #include #include -#include #include #include #include diff --git a/src/XDEDRAW/XDEDRAW_Props.hxx b/src/XDEDRAW/XDEDRAW_Props.hxx index 4d602340e0..59665563da 100644 --- a/src/XDEDRAW/XDEDRAW_Props.hxx +++ b/src/XDEDRAW/XDEDRAW_Props.hxx @@ -18,7 +18,6 @@ #include #include -#include #include diff --git a/src/XDEDRAW/XDEDRAW_Shapes.cxx b/src/XDEDRAW/XDEDRAW_Shapes.cxx index e8614d8765..eccc5612c3 100644 --- a/src/XDEDRAW/XDEDRAW_Shapes.cxx +++ b/src/XDEDRAW/XDEDRAW_Shapes.cxx @@ -20,15 +20,10 @@ #include #include #include -#include -#include -#include -#include #include #include #include #include -#include #include #include #include diff --git a/src/XDEDRAW/XDEDRAW_Shapes.hxx b/src/XDEDRAW/XDEDRAW_Shapes.hxx index 08bd013edc..c78fc577b2 100644 --- a/src/XDEDRAW/XDEDRAW_Shapes.hxx +++ b/src/XDEDRAW/XDEDRAW_Shapes.hxx @@ -18,7 +18,6 @@ #include #include -#include #include diff --git a/src/XDEDRAW/XDEDRAW_Views.cxx b/src/XDEDRAW/XDEDRAW_Views.cxx index c1d1f9033c..70f3aac009 100644 --- a/src/XDEDRAW/XDEDRAW_Views.cxx +++ b/src/XDEDRAW/XDEDRAW_Views.cxx @@ -20,10 +20,8 @@ #include #include #include -#include #include #include -#include #include #include #include diff --git a/src/XSAlgo/XSAlgo_AlgoContainer.cxx b/src/XSAlgo/XSAlgo_AlgoContainer.cxx index 60da82932b..ab91acdb45 100644 --- a/src/XSAlgo/XSAlgo_AlgoContainer.cxx +++ b/src/XSAlgo/XSAlgo_AlgoContainer.cxx @@ -23,8 +23,6 @@ #include #include #include -#include -#include #include #include #include @@ -34,7 +32,6 @@ #include #include #include -#include #include #include #include @@ -48,10 +45,8 @@ #include #include #include -#include #include #include -#include #include #include #include diff --git a/src/XSAlgo/XSAlgo_AlgoContainer.hxx b/src/XSAlgo/XSAlgo_AlgoContainer.hxx index c83dbae22f..513fe54f91 100644 --- a/src/XSAlgo/XSAlgo_AlgoContainer.hxx +++ b/src/XSAlgo/XSAlgo_AlgoContainer.hxx @@ -20,9 +20,6 @@ #include #include -#include -#include -#include #include #include diff --git a/src/XSControl/XSControl_ConnectedShapes.hxx b/src/XSControl/XSControl_ConnectedShapes.hxx index 6b41ebed4c..5ef4a72210 100644 --- a/src/XSControl/XSControl_ConnectedShapes.hxx +++ b/src/XSControl/XSControl_ConnectedShapes.hxx @@ -21,7 +21,6 @@ #include #include -#include #include #include #include diff --git a/src/XSControl/XSControl_Controller.cxx b/src/XSControl/XSControl_Controller.cxx index c7a04a42e8..08ddcf2b22 100644 --- a/src/XSControl/XSControl_Controller.cxx +++ b/src/XSControl/XSControl_Controller.cxx @@ -17,7 +17,6 @@ #include #include #include -#include #include #include #include @@ -33,25 +32,16 @@ #include #include #include -#include -#include -#include #include -#include #include -#include -#include #include #include #include #include #include -#include -#include #include #include #include -#include #include #include #include @@ -59,7 +49,6 @@ #include #include #include -#include #include IMPLEMENT_STANDARD_RTTIEXT(XSControl_Controller,Standard_Transient) diff --git a/src/XSControl/XSControl_Controller.hxx b/src/XSControl/XSControl_Controller.hxx index 6d6172337a..d6b77ea240 100644 --- a/src/XSControl/XSControl_Controller.hxx +++ b/src/XSControl/XSControl_Controller.hxx @@ -22,15 +22,12 @@ #include #include -#include #include #include #include #include #include -#include #include -#include #include class IFSelect_WorkLibrary; diff --git a/src/XSControl/XSControl_FuncShape.cxx b/src/XSControl/XSControl_FuncShape.cxx index 287def65d3..d161a2c064 100644 --- a/src/XSControl/XSControl_FuncShape.cxx +++ b/src/XSControl/XSControl_FuncShape.cxx @@ -14,37 +14,24 @@ #include #include -#include #include #include -#include #include #include -#include -#include #include #include #include #include -#include -#include #include #include -#include #include -#include #include #include #include -#include -#include -#include -#include #include #include #include #include -#include #include #include #include @@ -52,7 +39,6 @@ #include #include #include -#include #include #include diff --git a/src/XSControl/XSControl_FuncShape.hxx b/src/XSControl/XSControl_FuncShape.hxx index 8fdcac1d3c..fb1fb50e33 100644 --- a/src/XSControl/XSControl_FuncShape.hxx +++ b/src/XSControl/XSControl_FuncShape.hxx @@ -24,7 +24,6 @@ #include #include #include -#include class XSControl_WorkSession; class TCollection_AsciiString; diff --git a/src/XSControl/XSControl_Functions.cxx b/src/XSControl/XSControl_Functions.cxx index 0a9d9221d0..efe8bb8e3f 100644 --- a/src/XSControl/XSControl_Functions.cxx +++ b/src/XSControl/XSControl_Functions.cxx @@ -16,26 +16,17 @@ #include #include #include -#include -#include -#include #include #include #include -#include #include -#include -#include -#include #include -#include #include #include #include #include #include #include -#include #include // ####################################################################### diff --git a/src/XSControl/XSControl_Functions.hxx b/src/XSControl/XSControl_Functions.hxx index f2d1f074f9..3e959430bb 100644 --- a/src/XSControl/XSControl_Functions.hxx +++ b/src/XSControl/XSControl_Functions.hxx @@ -17,8 +17,6 @@ #ifndef _XSControl_Functions_HeaderFile #define _XSControl_Functions_HeaderFile -#include - //! Functions from XSControl gives access to actions which can be //! commanded with the resources provided by XSControl: especially //! Controller and Transfer diff --git a/src/XSControl/XSControl_Reader.cxx b/src/XSControl/XSControl_Reader.cxx index c729b4b117..02107b2176 100644 --- a/src/XSControl/XSControl_Reader.cxx +++ b/src/XSControl/XSControl_Reader.cxx @@ -16,10 +16,7 @@ #include #include -#include -#include #include -#include #include #include #include @@ -27,7 +24,6 @@ #include #include #include -#include #include #include #include diff --git a/src/XSControl/XSControl_Reader.hxx b/src/XSControl/XSControl_Reader.hxx index 8036bf2efd..99211cd72b 100644 --- a/src/XSControl/XSControl_Reader.hxx +++ b/src/XSControl/XSControl_Reader.hxx @@ -21,7 +21,6 @@ #include #include -#include #include #include #include diff --git a/src/XSControl/XSControl_SelectForTransfer.hxx b/src/XSControl/XSControl_SelectForTransfer.hxx index a4bea1ab71..f2dc3f95d3 100644 --- a/src/XSControl/XSControl_SelectForTransfer.hxx +++ b/src/XSControl/XSControl_SelectForTransfer.hxx @@ -21,7 +21,6 @@ #include #include -#include #include class XSControl_TransferReader; class Transfer_ActorOfTransientProcess; diff --git a/src/XSControl/XSControl_SignTransferStatus.cxx b/src/XSControl/XSControl_SignTransferStatus.cxx index a49830ce5c..0290bc74a0 100644 --- a/src/XSControl/XSControl_SignTransferStatus.cxx +++ b/src/XSControl/XSControl_SignTransferStatus.cxx @@ -17,7 +17,6 @@ #include #include #include -#include #include #include #include diff --git a/src/XSControl/XSControl_SignTransferStatus.hxx b/src/XSControl/XSControl_SignTransferStatus.hxx index fbf3c21825..0260dda403 100644 --- a/src/XSControl/XSControl_SignTransferStatus.hxx +++ b/src/XSControl/XSControl_SignTransferStatus.hxx @@ -21,7 +21,6 @@ #include #include -#include class XSControl_TransferReader; class Transfer_TransientProcess; class Standard_Transient; diff --git a/src/XSControl/XSControl_TransferReader.cxx b/src/XSControl/XSControl_TransferReader.cxx index 47b43f28a8..d1f73102bb 100644 --- a/src/XSControl/XSControl_TransferReader.cxx +++ b/src/XSControl/XSControl_TransferReader.cxx @@ -18,21 +18,15 @@ #include #include #include -#include #include #include -#include #include #include #include #include -#include #include -#include #include #include -#include -#include #include #include #include @@ -48,7 +42,6 @@ #include #include #include -#include #include #include #include diff --git a/src/XSControl/XSControl_TransferWriter.cxx b/src/XSControl/XSControl_TransferWriter.cxx index 35347e0b71..ec6871d8f7 100644 --- a/src/XSControl/XSControl_TransferWriter.cxx +++ b/src/XSControl/XSControl_TransferWriter.cxx @@ -14,17 +14,13 @@ #include #include -#include #include #include #include -#include #include #include #include -#include #include -#include #include #include #include diff --git a/src/XSControl/XSControl_Utils.cxx b/src/XSControl/XSControl_Utils.cxx index c2770997e5..2df8058d79 100644 --- a/src/XSControl/XSControl_Utils.cxx +++ b/src/XSControl/XSControl_Utils.cxx @@ -29,7 +29,6 @@ #include #include #include -#include #include #include #include diff --git a/src/XSControl/XSControl_Utils.hxx b/src/XSControl/XSControl_Utils.hxx index ca461c473c..58c44ed387 100644 --- a/src/XSControl/XSControl_Utils.hxx +++ b/src/XSControl/XSControl_Utils.hxx @@ -22,11 +22,9 @@ #include #include -#include #include #include #include -#include #include #include #include diff --git a/src/XSControl/XSControl_Vars.cxx b/src/XSControl/XSControl_Vars.cxx index e772178b27..73f763191b 100644 --- a/src/XSControl/XSControl_Vars.cxx +++ b/src/XSControl/XSControl_Vars.cxx @@ -15,7 +15,6 @@ #include #include #include -#include #include #include #include diff --git a/src/XSControl/XSControl_Vars.hxx b/src/XSControl/XSControl_Vars.hxx index e82a7b8d76..87111f18a8 100644 --- a/src/XSControl/XSControl_Vars.hxx +++ b/src/XSControl/XSControl_Vars.hxx @@ -20,9 +20,6 @@ #include #include -#include -#include -#include #include #include #include diff --git a/src/XSControl/XSControl_WorkSession.cxx b/src/XSControl/XSControl_WorkSession.cxx index 852a51115a..07ff5ce3eb 100644 --- a/src/XSControl/XSControl_WorkSession.cxx +++ b/src/XSControl/XSControl_WorkSession.cxx @@ -15,26 +15,16 @@ #include #include -#include -#include #include #include -#include #include #include #include -#include -#include #include -#include -#include -#include -#include #include #include #include #include -#include #include #include #include diff --git a/src/XSControl/XSControl_Writer.cxx b/src/XSControl/XSControl_Writer.cxx index 9cafde9015..ec8e89527c 100644 --- a/src/XSControl/XSControl_Writer.cxx +++ b/src/XSControl/XSControl_Writer.cxx @@ -14,10 +14,8 @@ //:i1 gka 03.04.99 BUC60301 #include -#include #include #include -#include #include #include diff --git a/src/XSControl/XSControl_Writer.hxx b/src/XSControl/XSControl_Writer.hxx index 5fbda90f59..970c43a0d4 100644 --- a/src/XSControl/XSControl_Writer.hxx +++ b/src/XSControl/XSControl_Writer.hxx @@ -22,7 +22,6 @@ #include #include -#include #include #include #include diff --git a/src/XSDRAW/XSDRAW_Functions.hxx b/src/XSDRAW/XSDRAW_Functions.hxx index 32c937cf06..b2b15c0cab 100644 --- a/src/XSDRAW/XSDRAW_Functions.hxx +++ b/src/XSDRAW/XSDRAW_Functions.hxx @@ -17,8 +17,6 @@ #ifndef _XSDRAW_Functions_HeaderFile #define _XSDRAW_Functions_HeaderFile -#include - //! Defines additional commands for XSDRAW to : //! - control of initialisation (xinit, xnorm, newmodel) //! - analyse of the result of a transfer (recorded in a diff --git a/src/XSDRAW/XSDRAW_Vars.hxx b/src/XSDRAW/XSDRAW_Vars.hxx index c1a694745e..3edc215633 100644 --- a/src/XSDRAW/XSDRAW_Vars.hxx +++ b/src/XSDRAW/XSDRAW_Vars.hxx @@ -21,8 +21,6 @@ #include #include -#include -#include class Standard_Transient; class Geom_Geometry; class Geom2d_Curve; diff --git a/src/XSDRAWIGES/XSDRAWIGES.cxx b/src/XSDRAWIGES/XSDRAWIGES.cxx index 571a2d74d2..980be1f738 100644 --- a/src/XSDRAWIGES/XSDRAWIGES.cxx +++ b/src/XSDRAWIGES/XSDRAWIGES.cxx @@ -19,44 +19,24 @@ #include #include #include -#include -#include #include #include #include #include #include -#include -#include #include #include -#include #include -#include -#include -#include -#include -#include -#include -#include #include #include -#include -#include #include #include #include #include -#include #include -#include #include -#include -#include #include -#include #include -#include #include #include #include diff --git a/src/XSDRAWIGES/XSDRAWIGES.hxx b/src/XSDRAWIGES/XSDRAWIGES.hxx index ad9a83e274..e78351cdd1 100644 --- a/src/XSDRAWIGES/XSDRAWIGES.hxx +++ b/src/XSDRAWIGES/XSDRAWIGES.hxx @@ -19,7 +19,6 @@ #include #include -#include #include diff --git a/src/XSDRAWSTEP/XSDRAWSTEP.cxx b/src/XSDRAWSTEP/XSDRAWSTEP.cxx index 3edd421600..3eaf3df394 100644 --- a/src/XSDRAWSTEP/XSDRAWSTEP.cxx +++ b/src/XSDRAWSTEP/XSDRAWSTEP.cxx @@ -18,11 +18,9 @@ #include #include #include -#include #include #include #include -#include #include #include #include @@ -34,20 +32,13 @@ #include #include #include -#include #include -#include #include #include -#include -#include #include -#include #include #include #include -#include -#include #include #include #include diff --git a/src/XSDRAWSTEP/XSDRAWSTEP.hxx b/src/XSDRAWSTEP/XSDRAWSTEP.hxx index 4313c18899..9c2673ba25 100644 --- a/src/XSDRAWSTEP/XSDRAWSTEP.hxx +++ b/src/XSDRAWSTEP/XSDRAWSTEP.hxx @@ -19,7 +19,6 @@ #include #include -#include #include diff --git a/src/XSDRAWSTLVRML/XSDRAWSTLVRML_CoordsMap.hxx b/src/XSDRAWSTLVRML/XSDRAWSTLVRML_CoordsMap.hxx index 0eef2e09c0..05f130df44 100644 --- a/src/XSDRAWSTLVRML/XSDRAWSTLVRML_CoordsMap.hxx +++ b/src/XSDRAWSTLVRML/XSDRAWSTLVRML_CoordsMap.hxx @@ -16,7 +16,6 @@ #ifndef XSDRAWSTLVRML_CoordsMap_HeaderFile #define XSDRAWSTLVRML_CoordsMap_HeaderFile -#include #include #include #include diff --git a/src/XSDRAWSTLVRML/XSDRAWSTLVRML_DataSource.cxx b/src/XSDRAWSTLVRML/XSDRAWSTLVRML_DataSource.cxx index a7311cc820..f6e95ccbba 100644 --- a/src/XSDRAWSTLVRML/XSDRAWSTLVRML_DataSource.cxx +++ b/src/XSDRAWSTLVRML/XSDRAWSTLVRML_DataSource.cxx @@ -17,8 +17,6 @@ #include #include -#include -#include #include IMPLEMENT_STANDARD_RTTIEXT(XSDRAWSTLVRML_DataSource,MeshVS_DataSource) diff --git a/src/XSDRAWSTLVRML/XSDRAWSTLVRML_DataSource.hxx b/src/XSDRAWSTLVRML/XSDRAWSTLVRML_DataSource.hxx index 99282554da..656d0dce07 100644 --- a/src/XSDRAWSTLVRML/XSDRAWSTLVRML_DataSource.hxx +++ b/src/XSDRAWSTLVRML/XSDRAWSTLVRML_DataSource.hxx @@ -17,19 +17,15 @@ #define _XSDRAWSTLVRML_DataSource_HeaderFile #include -#include -#include #include #include #include -#include #include #include #include #include #include -#include #include diff --git a/src/XSDRAWSTLVRML/XSDRAWSTLVRML_DataSource3D.hxx b/src/XSDRAWSTLVRML/XSDRAWSTLVRML_DataSource3D.hxx index 1f71e14143..13b7b3877b 100644 --- a/src/XSDRAWSTLVRML/XSDRAWSTLVRML_DataSource3D.hxx +++ b/src/XSDRAWSTLVRML/XSDRAWSTLVRML_DataSource3D.hxx @@ -19,19 +19,16 @@ #include #include -#include #include #include #include #include -#include #include #include #include #include #include #include -#include class XSDRAWSTLVRML_DataSource3D; diff --git a/src/XSDRAWSTLVRML/XSDRAWSTLVRML_ElemNodesMap.hxx b/src/XSDRAWSTLVRML/XSDRAWSTLVRML_ElemNodesMap.hxx index c952f65924..c1f3c6e574 100644 --- a/src/XSDRAWSTLVRML/XSDRAWSTLVRML_ElemNodesMap.hxx +++ b/src/XSDRAWSTLVRML/XSDRAWSTLVRML_ElemNodesMap.hxx @@ -16,7 +16,6 @@ #ifndef XSDRAWSTLVRML_ElemNodesMap_HeaderFile #define XSDRAWSTLVRML_ElemNodesMap_HeaderFile -#include #include #include #include diff --git a/src/XmlDrivers/XmlDrivers.cxx b/src/XmlDrivers/XmlDrivers.cxx index 9d05606592..38204b84af 100644 --- a/src/XmlDrivers/XmlDrivers.cxx +++ b/src/XmlDrivers/XmlDrivers.cxx @@ -29,8 +29,6 @@ #include #include -#include -#include static Standard_GUID XmlStorageDriver ("03a56820-8269-11d5-aab2-0050044b1af1"); static Standard_GUID XmlRetrievalDriver("03a56822-8269-11d5-aab2-0050044b1af1"); diff --git a/src/XmlDrivers/XmlDrivers_DocumentRetrievalDriver.cxx b/src/XmlDrivers/XmlDrivers_DocumentRetrievalDriver.cxx index ec654ed488..b95a7e6986 100644 --- a/src/XmlDrivers/XmlDrivers_DocumentRetrievalDriver.cxx +++ b/src/XmlDrivers/XmlDrivers_DocumentRetrievalDriver.cxx @@ -19,7 +19,6 @@ #include #include #include -#include #include #include #include diff --git a/src/XmlDrivers/XmlDrivers_DocumentStorageDriver.hxx b/src/XmlDrivers/XmlDrivers_DocumentStorageDriver.hxx index 6e43ff9669..db9cad58e0 100644 --- a/src/XmlDrivers/XmlDrivers_DocumentStorageDriver.hxx +++ b/src/XmlDrivers/XmlDrivers_DocumentStorageDriver.hxx @@ -20,7 +20,6 @@ #include #include -#include #include class TCollection_ExtendedString; class XmlMDF_ADriverTable; diff --git a/src/XmlLDrivers/XmlLDrivers.cxx b/src/XmlLDrivers/XmlLDrivers.cxx index d5ab23eba9..cd480b8b30 100644 --- a/src/XmlLDrivers/XmlLDrivers.cxx +++ b/src/XmlLDrivers/XmlLDrivers.cxx @@ -28,7 +28,6 @@ #include #include -#include #include static Standard_GUID XmlLStorageDriver ("13a56820-8269-11d5-aab2-0050044b1af1"); static Standard_GUID XmlLRetrievalDriver("13a56822-8269-11d5-aab2-0050044b1af1"); diff --git a/src/XmlLDrivers/XmlLDrivers_DocumentRetrievalDriver.cxx b/src/XmlLDrivers/XmlLDrivers_DocumentRetrievalDriver.cxx index 96f4bad242..80a4e15727 100644 --- a/src/XmlLDrivers/XmlLDrivers_DocumentRetrievalDriver.cxx +++ b/src/XmlLDrivers/XmlLDrivers_DocumentRetrievalDriver.cxx @@ -15,16 +15,11 @@ #include -#include #include #include #include -#include -#include -#include #include #include -#include #include #include #include @@ -39,7 +34,6 @@ #include #include #include -#include #include IMPLEMENT_STANDARD_RTTIEXT(XmlLDrivers_DocumentRetrievalDriver,PCDM_RetrievalDriver) @@ -48,7 +42,6 @@ IMPLEMENT_STANDARD_RTTIEXT(XmlLDrivers_DocumentRetrievalDriver,PCDM_RetrievalDri # include #endif // _MSC_VER -#include #include #include diff --git a/src/XmlLDrivers/XmlLDrivers_DocumentRetrievalDriver.hxx b/src/XmlLDrivers/XmlLDrivers_DocumentRetrievalDriver.hxx index 429cc8d3e8..0f9f6a22e6 100644 --- a/src/XmlLDrivers/XmlLDrivers_DocumentRetrievalDriver.hxx +++ b/src/XmlLDrivers/XmlLDrivers_DocumentRetrievalDriver.hxx @@ -23,7 +23,6 @@ #include #include #include -#include #include #include class XmlMDF_ADriverTable; diff --git a/src/XmlLDrivers/XmlLDrivers_DocumentStorageDriver.cxx b/src/XmlLDrivers/XmlLDrivers_DocumentStorageDriver.cxx index bd6a537ac7..a66c24191b 100644 --- a/src/XmlLDrivers/XmlLDrivers_DocumentStorageDriver.cxx +++ b/src/XmlLDrivers/XmlLDrivers_DocumentStorageDriver.cxx @@ -15,17 +15,13 @@ #include -#include #include #include #include -#include -#include #include #include #include #include -#include #include #include #include @@ -44,7 +40,6 @@ #include #include -#include IMPLEMENT_STANDARD_RTTIEXT(XmlLDrivers_DocumentStorageDriver,PCDM_StorageDriver) #define STORAGE_VERSION "STORAGE_VERSION: " diff --git a/src/XmlLDrivers/XmlLDrivers_DocumentStorageDriver.hxx b/src/XmlLDrivers/XmlLDrivers_DocumentStorageDriver.hxx index b62c16e204..80c094269c 100644 --- a/src/XmlLDrivers/XmlLDrivers_DocumentStorageDriver.hxx +++ b/src/XmlLDrivers/XmlLDrivers_DocumentStorageDriver.hxx @@ -23,7 +23,6 @@ #include #include #include -#include #include #include #include diff --git a/src/XmlLDrivers/XmlLDrivers_NamespaceDef.cxx b/src/XmlLDrivers/XmlLDrivers_NamespaceDef.cxx index 2f23b1056c..f305227806 100644 --- a/src/XmlLDrivers/XmlLDrivers_NamespaceDef.cxx +++ b/src/XmlLDrivers/XmlLDrivers_NamespaceDef.cxx @@ -14,7 +14,6 @@ // commercial license or contractual agreement. -#include #include //======================================================================= diff --git a/src/XmlMDF/XmlMDF.cxx b/src/XmlMDF/XmlMDF.cxx index b4cf1451f2..9df07988a9 100644 --- a/src/XmlMDF/XmlMDF.cxx +++ b/src/XmlMDF/XmlMDF.cxx @@ -18,24 +18,18 @@ #include #include #include -#include #include #include #include #include -#include #include -#include #include #include #include -#include #include #include #include -#include #include -#include #include #include #include diff --git a/src/XmlMDF/XmlMDF.hxx b/src/XmlMDF/XmlMDF.hxx index 10c8f59d51..277d9b68fc 100644 --- a/src/XmlMDF/XmlMDF.hxx +++ b/src/XmlMDF/XmlMDF.hxx @@ -21,10 +21,7 @@ #include #include -#include #include -#include -#include #include #include diff --git a/src/XmlMDF/XmlMDF_ADriver.hxx b/src/XmlMDF/XmlMDF_ADriver.hxx index 4b8120a008..853071745d 100644 --- a/src/XmlMDF/XmlMDF_ADriver.hxx +++ b/src/XmlMDF/XmlMDF_ADriver.hxx @@ -23,8 +23,6 @@ #include #include #include -#include -#include #include #include class Message_Messenger; diff --git a/src/XmlMDF/XmlMDF_ADriverTable.cxx b/src/XmlMDF/XmlMDF_ADriverTable.cxx index 21865a7b90..db81d873dc 100644 --- a/src/XmlMDF/XmlMDF_ADriverTable.cxx +++ b/src/XmlMDF/XmlMDF_ADriverTable.cxx @@ -16,7 +16,6 @@ #include #include -#include #include #include #include diff --git a/src/XmlMDF/XmlMDF_ADriverTable.hxx b/src/XmlMDF/XmlMDF_ADriverTable.hxx index c357736dde..4ff02ba434 100644 --- a/src/XmlMDF/XmlMDF_ADriverTable.hxx +++ b/src/XmlMDF/XmlMDF_ADriverTable.hxx @@ -17,7 +17,6 @@ #define _XmlMDF_ADriverTable_HeaderFile #include -#include #include #include diff --git a/src/XmlMDF/XmlMDF_MapOfDriver.hxx b/src/XmlMDF/XmlMDF_MapOfDriver.hxx index f518a6fc24..de6ebd1ae2 100644 --- a/src/XmlMDF/XmlMDF_MapOfDriver.hxx +++ b/src/XmlMDF/XmlMDF_MapOfDriver.hxx @@ -18,7 +18,6 @@ #include #include -#include #include typedef NCollection_DataMap XmlMDF_MapOfDriver; diff --git a/src/XmlMDF/XmlMDF_ReferenceDriver.cxx b/src/XmlMDF/XmlMDF_ReferenceDriver.cxx index e1042061ce..7b164ca5d6 100644 --- a/src/XmlMDF/XmlMDF_ReferenceDriver.cxx +++ b/src/XmlMDF/XmlMDF_ReferenceDriver.cxx @@ -17,7 +17,6 @@ #include #include -#include #include #include #include diff --git a/src/XmlMDF/XmlMDF_ReferenceDriver.hxx b/src/XmlMDF/XmlMDF_ReferenceDriver.hxx index a0ac78f64d..08ebd6e2d9 100644 --- a/src/XmlMDF/XmlMDF_ReferenceDriver.hxx +++ b/src/XmlMDF/XmlMDF_ReferenceDriver.hxx @@ -20,7 +20,6 @@ #include #include -#include #include #include class Message_Messenger; diff --git a/src/XmlMDF/XmlMDF_TagSourceDriver.cxx b/src/XmlMDF/XmlMDF_TagSourceDriver.cxx index b6fda8cb39..db35b28fd7 100644 --- a/src/XmlMDF/XmlMDF_TagSourceDriver.cxx +++ b/src/XmlMDF/XmlMDF_TagSourceDriver.cxx @@ -17,7 +17,6 @@ #include #include -#include #include #include #include diff --git a/src/XmlMDF/XmlMDF_TagSourceDriver.hxx b/src/XmlMDF/XmlMDF_TagSourceDriver.hxx index fb863ac25c..e0e3328eaa 100644 --- a/src/XmlMDF/XmlMDF_TagSourceDriver.hxx +++ b/src/XmlMDF/XmlMDF_TagSourceDriver.hxx @@ -20,7 +20,6 @@ #include #include -#include #include #include class Message_Messenger; diff --git a/src/XmlMDataStd/XmlMDataStd_AsciiStringDriver.hxx b/src/XmlMDataStd/XmlMDataStd_AsciiStringDriver.hxx index 6eaf00314f..7c50b4051f 100644 --- a/src/XmlMDataStd/XmlMDataStd_AsciiStringDriver.hxx +++ b/src/XmlMDataStd/XmlMDataStd_AsciiStringDriver.hxx @@ -20,7 +20,6 @@ #include #include -#include #include #include class Message_Messenger; diff --git a/src/XmlMDataStd/XmlMDataStd_BooleanArrayDriver.cxx b/src/XmlMDataStd/XmlMDataStd_BooleanArrayDriver.cxx index 51e2788951..02cf310fc8 100644 --- a/src/XmlMDataStd/XmlMDataStd_BooleanArrayDriver.cxx +++ b/src/XmlMDataStd/XmlMDataStd_BooleanArrayDriver.cxx @@ -17,7 +17,6 @@ #include #include #include -#include #include #include #include diff --git a/src/XmlMDataStd/XmlMDataStd_BooleanArrayDriver.hxx b/src/XmlMDataStd/XmlMDataStd_BooleanArrayDriver.hxx index 8095e52e68..7a432a2923 100644 --- a/src/XmlMDataStd/XmlMDataStd_BooleanArrayDriver.hxx +++ b/src/XmlMDataStd/XmlMDataStd_BooleanArrayDriver.hxx @@ -20,7 +20,6 @@ #include #include -#include #include #include class Message_Messenger; diff --git a/src/XmlMDataStd/XmlMDataStd_BooleanListDriver.hxx b/src/XmlMDataStd/XmlMDataStd_BooleanListDriver.hxx index 08b5cf1074..1c4c83dc67 100644 --- a/src/XmlMDataStd/XmlMDataStd_BooleanListDriver.hxx +++ b/src/XmlMDataStd/XmlMDataStd_BooleanListDriver.hxx @@ -20,7 +20,6 @@ #include #include -#include #include #include class Message_Messenger; diff --git a/src/XmlMDataStd/XmlMDataStd_ByteArrayDriver.cxx b/src/XmlMDataStd/XmlMDataStd_ByteArrayDriver.cxx index 53f4d1e688..5e7fb71952 100644 --- a/src/XmlMDataStd/XmlMDataStd_ByteArrayDriver.cxx +++ b/src/XmlMDataStd/XmlMDataStd_ByteArrayDriver.cxx @@ -17,7 +17,6 @@ #include #include #include -#include #include #include #include diff --git a/src/XmlMDataStd/XmlMDataStd_ByteArrayDriver.hxx b/src/XmlMDataStd/XmlMDataStd_ByteArrayDriver.hxx index d9bd04448f..9e0809d3ef 100644 --- a/src/XmlMDataStd/XmlMDataStd_ByteArrayDriver.hxx +++ b/src/XmlMDataStd/XmlMDataStd_ByteArrayDriver.hxx @@ -20,7 +20,6 @@ #include #include -#include #include #include class Message_Messenger; diff --git a/src/XmlMDataStd/XmlMDataStd_ExpressionDriver.hxx b/src/XmlMDataStd/XmlMDataStd_ExpressionDriver.hxx index eafa4dc99f..764031a943 100644 --- a/src/XmlMDataStd/XmlMDataStd_ExpressionDriver.hxx +++ b/src/XmlMDataStd/XmlMDataStd_ExpressionDriver.hxx @@ -20,7 +20,6 @@ #include #include -#include #include #include class Message_Messenger; diff --git a/src/XmlMDataStd/XmlMDataStd_ExtStringArrayDriver.cxx b/src/XmlMDataStd/XmlMDataStd_ExtStringArrayDriver.cxx index a8ab6faff4..baa82fb55d 100644 --- a/src/XmlMDataStd/XmlMDataStd_ExtStringArrayDriver.cxx +++ b/src/XmlMDataStd/XmlMDataStd_ExtStringArrayDriver.cxx @@ -15,7 +15,6 @@ #include -#include #include #include #include @@ -25,7 +24,6 @@ #include #include #include -#include IMPLEMENT_STANDARD_RTTIEXT(XmlMDataStd_ExtStringArrayDriver,XmlMDF_ADriver) IMPLEMENT_DOMSTRING (FirstIndexString, "first") diff --git a/src/XmlMDataStd/XmlMDataStd_ExtStringArrayDriver.hxx b/src/XmlMDataStd/XmlMDataStd_ExtStringArrayDriver.hxx index c3491e5d34..96937d7bf6 100644 --- a/src/XmlMDataStd/XmlMDataStd_ExtStringArrayDriver.hxx +++ b/src/XmlMDataStd/XmlMDataStd_ExtStringArrayDriver.hxx @@ -20,7 +20,6 @@ #include #include -#include #include #include class Message_Messenger; diff --git a/src/XmlMDataStd/XmlMDataStd_ExtStringListDriver.cxx b/src/XmlMDataStd/XmlMDataStd_ExtStringListDriver.cxx index c9685ad9a1..3e2508dd85 100644 --- a/src/XmlMDataStd/XmlMDataStd_ExtStringListDriver.cxx +++ b/src/XmlMDataStd/XmlMDataStd_ExtStringListDriver.cxx @@ -15,7 +15,6 @@ #include -#include #include #include #include diff --git a/src/XmlMDataStd/XmlMDataStd_ExtStringListDriver.hxx b/src/XmlMDataStd/XmlMDataStd_ExtStringListDriver.hxx index 53d86b7609..955584e668 100644 --- a/src/XmlMDataStd/XmlMDataStd_ExtStringListDriver.hxx +++ b/src/XmlMDataStd/XmlMDataStd_ExtStringListDriver.hxx @@ -20,7 +20,6 @@ #include #include -#include #include #include class Message_Messenger; diff --git a/src/XmlMDataStd/XmlMDataStd_GenericEmptyDriver.hxx b/src/XmlMDataStd/XmlMDataStd_GenericEmptyDriver.hxx index 44b3d962f5..8d31405c11 100644 --- a/src/XmlMDataStd/XmlMDataStd_GenericEmptyDriver.hxx +++ b/src/XmlMDataStd/XmlMDataStd_GenericEmptyDriver.hxx @@ -18,7 +18,6 @@ #include #include -#include #include #include class Message_Messenger; diff --git a/src/XmlMDataStd/XmlMDataStd_GenericExtStringDriver.hxx b/src/XmlMDataStd/XmlMDataStd_GenericExtStringDriver.hxx index d1afb7b6e7..cf6773ed94 100644 --- a/src/XmlMDataStd/XmlMDataStd_GenericExtStringDriver.hxx +++ b/src/XmlMDataStd/XmlMDataStd_GenericExtStringDriver.hxx @@ -18,7 +18,6 @@ #include #include -#include #include #include class Message_Messenger; diff --git a/src/XmlMDataStd/XmlMDataStd_IntPackedMapDriver.cxx b/src/XmlMDataStd/XmlMDataStd_IntPackedMapDriver.cxx index 9e3e2245ec..1bc28beb19 100644 --- a/src/XmlMDataStd/XmlMDataStd_IntPackedMapDriver.cxx +++ b/src/XmlMDataStd/XmlMDataStd_IntPackedMapDriver.cxx @@ -17,7 +17,6 @@ #include #include #include -#include #include #include #include diff --git a/src/XmlMDataStd/XmlMDataStd_IntPackedMapDriver.hxx b/src/XmlMDataStd/XmlMDataStd_IntPackedMapDriver.hxx index 9124c7265f..7d5675e15b 100644 --- a/src/XmlMDataStd/XmlMDataStd_IntPackedMapDriver.hxx +++ b/src/XmlMDataStd/XmlMDataStd_IntPackedMapDriver.hxx @@ -20,7 +20,6 @@ #include #include -#include #include #include class Message_Messenger; diff --git a/src/XmlMDataStd/XmlMDataStd_IntegerArrayDriver.hxx b/src/XmlMDataStd/XmlMDataStd_IntegerArrayDriver.hxx index 8617bb20aa..b05fe75266 100644 --- a/src/XmlMDataStd/XmlMDataStd_IntegerArrayDriver.hxx +++ b/src/XmlMDataStd/XmlMDataStd_IntegerArrayDriver.hxx @@ -20,7 +20,6 @@ #include #include -#include #include #include class Message_Messenger; diff --git a/src/XmlMDataStd/XmlMDataStd_IntegerDriver.hxx b/src/XmlMDataStd/XmlMDataStd_IntegerDriver.hxx index 89589ba346..40468ead31 100644 --- a/src/XmlMDataStd/XmlMDataStd_IntegerDriver.hxx +++ b/src/XmlMDataStd/XmlMDataStd_IntegerDriver.hxx @@ -20,7 +20,6 @@ #include #include -#include #include #include class Message_Messenger; diff --git a/src/XmlMDataStd/XmlMDataStd_IntegerListDriver.cxx b/src/XmlMDataStd/XmlMDataStd_IntegerListDriver.cxx index c0fb4b4ad3..11cb8d9358 100644 --- a/src/XmlMDataStd/XmlMDataStd_IntegerListDriver.cxx +++ b/src/XmlMDataStd/XmlMDataStd_IntegerListDriver.cxx @@ -17,7 +17,6 @@ #include #include #include -#include #include #include #include diff --git a/src/XmlMDataStd/XmlMDataStd_IntegerListDriver.hxx b/src/XmlMDataStd/XmlMDataStd_IntegerListDriver.hxx index aad5d9e92c..4146cfe25d 100644 --- a/src/XmlMDataStd/XmlMDataStd_IntegerListDriver.hxx +++ b/src/XmlMDataStd/XmlMDataStd_IntegerListDriver.hxx @@ -20,7 +20,6 @@ #include #include -#include #include #include class Message_Messenger; diff --git a/src/XmlMDataStd/XmlMDataStd_NamedDataDriver.cxx b/src/XmlMDataStd/XmlMDataStd_NamedDataDriver.cxx index efe756ab38..4518826b5f 100644 --- a/src/XmlMDataStd/XmlMDataStd_NamedDataDriver.cxx +++ b/src/XmlMDataStd/XmlMDataStd_NamedDataDriver.cxx @@ -15,23 +15,8 @@ #include -#include #include #include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include #include #include #include diff --git a/src/XmlMDataStd/XmlMDataStd_NamedDataDriver.hxx b/src/XmlMDataStd/XmlMDataStd_NamedDataDriver.hxx index e688f77ffe..20b825c162 100644 --- a/src/XmlMDataStd/XmlMDataStd_NamedDataDriver.hxx +++ b/src/XmlMDataStd/XmlMDataStd_NamedDataDriver.hxx @@ -20,7 +20,6 @@ #include #include -#include #include #include class Message_Messenger; diff --git a/src/XmlMDataStd/XmlMDataStd_RealArrayDriver.cxx b/src/XmlMDataStd/XmlMDataStd_RealArrayDriver.cxx index 182332cdfa..7b8621a977 100644 --- a/src/XmlMDataStd/XmlMDataStd_RealArrayDriver.cxx +++ b/src/XmlMDataStd/XmlMDataStd_RealArrayDriver.cxx @@ -18,9 +18,7 @@ #include #include #include -#include #include -#include #include #include #include diff --git a/src/XmlMDataStd/XmlMDataStd_RealArrayDriver.hxx b/src/XmlMDataStd/XmlMDataStd_RealArrayDriver.hxx index df7bf13b50..396361ba6c 100644 --- a/src/XmlMDataStd/XmlMDataStd_RealArrayDriver.hxx +++ b/src/XmlMDataStd/XmlMDataStd_RealArrayDriver.hxx @@ -20,7 +20,6 @@ #include #include -#include #include #include class Message_Messenger; diff --git a/src/XmlMDataStd/XmlMDataStd_RealDriver.hxx b/src/XmlMDataStd/XmlMDataStd_RealDriver.hxx index 6ab6960226..981fcc827b 100644 --- a/src/XmlMDataStd/XmlMDataStd_RealDriver.hxx +++ b/src/XmlMDataStd/XmlMDataStd_RealDriver.hxx @@ -20,7 +20,6 @@ #include #include -#include #include #include class Message_Messenger; diff --git a/src/XmlMDataStd/XmlMDataStd_RealListDriver.cxx b/src/XmlMDataStd/XmlMDataStd_RealListDriver.cxx index b0eb2a1f6b..e3f3c2a1d8 100644 --- a/src/XmlMDataStd/XmlMDataStd_RealListDriver.cxx +++ b/src/XmlMDataStd/XmlMDataStd_RealListDriver.cxx @@ -17,7 +17,6 @@ #include #include #include -#include #include #include #include diff --git a/src/XmlMDataStd/XmlMDataStd_RealListDriver.hxx b/src/XmlMDataStd/XmlMDataStd_RealListDriver.hxx index bf66a9ada0..8bf16d84fb 100644 --- a/src/XmlMDataStd/XmlMDataStd_RealListDriver.hxx +++ b/src/XmlMDataStd/XmlMDataStd_RealListDriver.hxx @@ -20,7 +20,6 @@ #include #include -#include #include #include class Message_Messenger; diff --git a/src/XmlMDataStd/XmlMDataStd_ReferenceArrayDriver.cxx b/src/XmlMDataStd/XmlMDataStd_ReferenceArrayDriver.cxx index e7b41a0b5e..7565d96d2b 100644 --- a/src/XmlMDataStd/XmlMDataStd_ReferenceArrayDriver.cxx +++ b/src/XmlMDataStd/XmlMDataStd_ReferenceArrayDriver.cxx @@ -15,7 +15,6 @@ #include -#include #include #include #include diff --git a/src/XmlMDataStd/XmlMDataStd_ReferenceArrayDriver.hxx b/src/XmlMDataStd/XmlMDataStd_ReferenceArrayDriver.hxx index 06bfadf3d3..88d1c64958 100644 --- a/src/XmlMDataStd/XmlMDataStd_ReferenceArrayDriver.hxx +++ b/src/XmlMDataStd/XmlMDataStd_ReferenceArrayDriver.hxx @@ -20,7 +20,6 @@ #include #include -#include #include #include class Message_Messenger; diff --git a/src/XmlMDataStd/XmlMDataStd_ReferenceListDriver.cxx b/src/XmlMDataStd/XmlMDataStd_ReferenceListDriver.cxx index b69e890cff..e56d36b7b3 100644 --- a/src/XmlMDataStd/XmlMDataStd_ReferenceListDriver.cxx +++ b/src/XmlMDataStd/XmlMDataStd_ReferenceListDriver.cxx @@ -15,7 +15,6 @@ #include -#include #include #include #include diff --git a/src/XmlMDataStd/XmlMDataStd_ReferenceListDriver.hxx b/src/XmlMDataStd/XmlMDataStd_ReferenceListDriver.hxx index 56f4484691..7e09a8cd63 100644 --- a/src/XmlMDataStd/XmlMDataStd_ReferenceListDriver.hxx +++ b/src/XmlMDataStd/XmlMDataStd_ReferenceListDriver.hxx @@ -20,7 +20,6 @@ #include #include -#include #include #include class Message_Messenger; diff --git a/src/XmlMDataStd/XmlMDataStd_TreeNodeDriver.cxx b/src/XmlMDataStd/XmlMDataStd_TreeNodeDriver.cxx index 1d7a3fcded..9af5cf8a7d 100644 --- a/src/XmlMDataStd/XmlMDataStd_TreeNodeDriver.cxx +++ b/src/XmlMDataStd/XmlMDataStd_TreeNodeDriver.cxx @@ -23,7 +23,6 @@ #include #include #include -#include IMPLEMENT_STANDARD_RTTIEXT(XmlMDataStd_TreeNodeDriver,XmlMDF_ADriver) IMPLEMENT_DOMSTRING (TreeIdString, "treeid") diff --git a/src/XmlMDataStd/XmlMDataStd_TreeNodeDriver.hxx b/src/XmlMDataStd/XmlMDataStd_TreeNodeDriver.hxx index eb415fea17..6f68500bb7 100644 --- a/src/XmlMDataStd/XmlMDataStd_TreeNodeDriver.hxx +++ b/src/XmlMDataStd/XmlMDataStd_TreeNodeDriver.hxx @@ -20,7 +20,6 @@ #include #include -#include #include #include class Message_Messenger; diff --git a/src/XmlMDataStd/XmlMDataStd_UAttributeDriver.hxx b/src/XmlMDataStd/XmlMDataStd_UAttributeDriver.hxx index 054efd98b2..2cf8f3844e 100644 --- a/src/XmlMDataStd/XmlMDataStd_UAttributeDriver.hxx +++ b/src/XmlMDataStd/XmlMDataStd_UAttributeDriver.hxx @@ -20,7 +20,6 @@ #include #include -#include #include #include class Message_Messenger; diff --git a/src/XmlMDataStd/XmlMDataStd_VariableDriver.hxx b/src/XmlMDataStd/XmlMDataStd_VariableDriver.hxx index 7aea8eaed8..b119f5215f 100644 --- a/src/XmlMDataStd/XmlMDataStd_VariableDriver.hxx +++ b/src/XmlMDataStd/XmlMDataStd_VariableDriver.hxx @@ -20,7 +20,6 @@ #include #include -#include #include #include class Message_Messenger; diff --git a/src/XmlMDataXtd/XmlMDataXtd_ConstraintDriver.hxx b/src/XmlMDataXtd/XmlMDataXtd_ConstraintDriver.hxx index 70a6b50527..2c6e23e84f 100644 --- a/src/XmlMDataXtd/XmlMDataXtd_ConstraintDriver.hxx +++ b/src/XmlMDataXtd/XmlMDataXtd_ConstraintDriver.hxx @@ -20,7 +20,6 @@ #include #include -#include #include #include class Message_Messenger; diff --git a/src/XmlMDataXtd/XmlMDataXtd_GeometryDriver.hxx b/src/XmlMDataXtd/XmlMDataXtd_GeometryDriver.hxx index 3b96e63168..c9485b3cf5 100644 --- a/src/XmlMDataXtd/XmlMDataXtd_GeometryDriver.hxx +++ b/src/XmlMDataXtd/XmlMDataXtd_GeometryDriver.hxx @@ -20,7 +20,6 @@ #include #include -#include #include #include class Message_Messenger; diff --git a/src/XmlMDataXtd/XmlMDataXtd_PatternStdDriver.hxx b/src/XmlMDataXtd/XmlMDataXtd_PatternStdDriver.hxx index e1bc56c3cc..9420ae56ac 100644 --- a/src/XmlMDataXtd/XmlMDataXtd_PatternStdDriver.hxx +++ b/src/XmlMDataXtd/XmlMDataXtd_PatternStdDriver.hxx @@ -20,7 +20,6 @@ #include #include -#include #include #include class Message_Messenger; diff --git a/src/XmlMDataXtd/XmlMDataXtd_PositionDriver.cxx b/src/XmlMDataXtd/XmlMDataXtd_PositionDriver.cxx index 9054631b49..35c71ed2de 100644 --- a/src/XmlMDataXtd/XmlMDataXtd_PositionDriver.cxx +++ b/src/XmlMDataXtd/XmlMDataXtd_PositionDriver.cxx @@ -16,7 +16,6 @@ #include #include -#include #include #include #include diff --git a/src/XmlMDataXtd/XmlMDataXtd_PositionDriver.hxx b/src/XmlMDataXtd/XmlMDataXtd_PositionDriver.hxx index b399002534..286b9991c0 100644 --- a/src/XmlMDataXtd/XmlMDataXtd_PositionDriver.hxx +++ b/src/XmlMDataXtd/XmlMDataXtd_PositionDriver.hxx @@ -17,10 +17,8 @@ #define _XmlMDataXtd_PositionDriver_HeaderFile #include -#include #include -#include #include #include class Message_Messenger; diff --git a/src/XmlMDataXtd/XmlMDataXtd_PresentationDriver.cxx b/src/XmlMDataXtd/XmlMDataXtd_PresentationDriver.cxx index 08bbc850b3..c3a68541dc 100644 --- a/src/XmlMDataXtd/XmlMDataXtd_PresentationDriver.cxx +++ b/src/XmlMDataXtd/XmlMDataXtd_PresentationDriver.cxx @@ -17,7 +17,6 @@ #include #include -#include #include #include #include diff --git a/src/XmlMDataXtd/XmlMDataXtd_PresentationDriver.hxx b/src/XmlMDataXtd/XmlMDataXtd_PresentationDriver.hxx index a03139d433..4a68f03161 100644 --- a/src/XmlMDataXtd/XmlMDataXtd_PresentationDriver.hxx +++ b/src/XmlMDataXtd/XmlMDataXtd_PresentationDriver.hxx @@ -17,10 +17,8 @@ #define _XmlMDataXtd_PresentationDriver_HeaderFile #include -#include #include -#include #include #include class Message_Messenger; diff --git a/src/XmlMDataXtd/XmlMDataXtd_TriangulationDriver.cxx b/src/XmlMDataXtd/XmlMDataXtd_TriangulationDriver.cxx index 5a9177ca77..e6133b8627 100644 --- a/src/XmlMDataXtd/XmlMDataXtd_TriangulationDriver.cxx +++ b/src/XmlMDataXtd/XmlMDataXtd_TriangulationDriver.cxx @@ -17,7 +17,6 @@ #include #include #include -#include #include #include #include diff --git a/src/XmlMDataXtd/XmlMDataXtd_TriangulationDriver.hxx b/src/XmlMDataXtd/XmlMDataXtd_TriangulationDriver.hxx index dfad90bd27..d7dcb8b6e9 100644 --- a/src/XmlMDataXtd/XmlMDataXtd_TriangulationDriver.hxx +++ b/src/XmlMDataXtd/XmlMDataXtd_TriangulationDriver.hxx @@ -17,10 +17,8 @@ #define _XmlMDataXtd_TriangulationDriver_HeaderFile #include -#include #include -#include #include #include class Message_Messenger; diff --git a/src/XmlMDocStd/XmlMDocStd_XLinkDriver.cxx b/src/XmlMDocStd/XmlMDocStd_XLinkDriver.cxx index 24e6c9b9fc..ab5f3d9525 100644 --- a/src/XmlMDocStd/XmlMDocStd_XLinkDriver.cxx +++ b/src/XmlMDocStd/XmlMDocStd_XLinkDriver.cxx @@ -16,7 +16,6 @@ #include #include -#include #include #include #include diff --git a/src/XmlMDocStd/XmlMDocStd_XLinkDriver.hxx b/src/XmlMDocStd/XmlMDocStd_XLinkDriver.hxx index f1c1bba778..4fb262dc11 100644 --- a/src/XmlMDocStd/XmlMDocStd_XLinkDriver.hxx +++ b/src/XmlMDocStd/XmlMDocStd_XLinkDriver.hxx @@ -20,7 +20,6 @@ #include #include -#include #include #include class Message_Messenger; diff --git a/src/XmlMFunction/XmlMFunction_FunctionDriver.cxx b/src/XmlMFunction/XmlMFunction_FunctionDriver.cxx index 24c6eedd4c..aace71b8fb 100644 --- a/src/XmlMFunction/XmlMFunction_FunctionDriver.cxx +++ b/src/XmlMFunction/XmlMFunction_FunctionDriver.cxx @@ -16,7 +16,6 @@ #include #include -#include #include #include #include diff --git a/src/XmlMFunction/XmlMFunction_FunctionDriver.hxx b/src/XmlMFunction/XmlMFunction_FunctionDriver.hxx index f99aedd731..bf4731430d 100644 --- a/src/XmlMFunction/XmlMFunction_FunctionDriver.hxx +++ b/src/XmlMFunction/XmlMFunction_FunctionDriver.hxx @@ -20,7 +20,6 @@ #include #include -#include #include #include class Message_Messenger; diff --git a/src/XmlMFunction/XmlMFunction_GraphNodeDriver.cxx b/src/XmlMFunction/XmlMFunction_GraphNodeDriver.cxx index 0163311fac..9d86e10c70 100644 --- a/src/XmlMFunction/XmlMFunction_GraphNodeDriver.cxx +++ b/src/XmlMFunction/XmlMFunction_GraphNodeDriver.cxx @@ -16,8 +16,6 @@ #include #include -#include -#include #include #include #include diff --git a/src/XmlMFunction/XmlMFunction_GraphNodeDriver.hxx b/src/XmlMFunction/XmlMFunction_GraphNodeDriver.hxx index 6362aa7474..725c4b791c 100644 --- a/src/XmlMFunction/XmlMFunction_GraphNodeDriver.hxx +++ b/src/XmlMFunction/XmlMFunction_GraphNodeDriver.hxx @@ -20,7 +20,6 @@ #include #include -#include #include #include class Message_Messenger; diff --git a/src/XmlMFunction/XmlMFunction_ScopeDriver.cxx b/src/XmlMFunction/XmlMFunction_ScopeDriver.cxx index fa3725177f..b5d79bb846 100644 --- a/src/XmlMFunction/XmlMFunction_ScopeDriver.cxx +++ b/src/XmlMFunction/XmlMFunction_ScopeDriver.cxx @@ -15,16 +15,9 @@ #include -#include #include -#include -#include -#include #include -#include -#include #include -#include #include #include #include diff --git a/src/XmlMFunction/XmlMFunction_ScopeDriver.hxx b/src/XmlMFunction/XmlMFunction_ScopeDriver.hxx index a0144aeab6..92b62a71ff 100644 --- a/src/XmlMFunction/XmlMFunction_ScopeDriver.hxx +++ b/src/XmlMFunction/XmlMFunction_ScopeDriver.hxx @@ -20,7 +20,6 @@ #include #include -#include #include #include class Message_Messenger; diff --git a/src/XmlMNaming/XmlMNaming_NamedShapeDriver.cxx b/src/XmlMNaming/XmlMNaming_NamedShapeDriver.cxx index 844cdec736..0b11d517b1 100644 --- a/src/XmlMNaming/XmlMNaming_NamedShapeDriver.cxx +++ b/src/XmlMNaming/XmlMNaming_NamedShapeDriver.cxx @@ -22,14 +22,11 @@ #include #include #include -#include #include #include #include #include #include -#include -#include #include #include #include diff --git a/src/XmlMNaming/XmlMNaming_NamedShapeDriver.hxx b/src/XmlMNaming/XmlMNaming_NamedShapeDriver.hxx index 61d3111583..9a26f080f3 100644 --- a/src/XmlMNaming/XmlMNaming_NamedShapeDriver.hxx +++ b/src/XmlMNaming/XmlMNaming_NamedShapeDriver.hxx @@ -21,7 +21,6 @@ #include #include -#include #include #include #include diff --git a/src/XmlMNaming/XmlMNaming_NamingDriver.cxx b/src/XmlMNaming/XmlMNaming_NamingDriver.cxx index efd28ad13b..37a1993b67 100644 --- a/src/XmlMNaming/XmlMNaming_NamingDriver.cxx +++ b/src/XmlMNaming/XmlMNaming_NamingDriver.cxx @@ -16,13 +16,9 @@ #include #include -#include #include #include #include -#include -#include -#include #include #include #include diff --git a/src/XmlMNaming/XmlMNaming_NamingDriver.hxx b/src/XmlMNaming/XmlMNaming_NamingDriver.hxx index 67fb9d9903..6e5f21ca89 100644 --- a/src/XmlMNaming/XmlMNaming_NamingDriver.hxx +++ b/src/XmlMNaming/XmlMNaming_NamingDriver.hxx @@ -18,7 +18,6 @@ #include #include -#include #include #include class Message_Messenger; diff --git a/src/XmlMNaming/XmlMNaming_Shape1.cxx b/src/XmlMNaming/XmlMNaming_Shape1.cxx index f613a2cd7d..b751aad247 100644 --- a/src/XmlMNaming/XmlMNaming_Shape1.cxx +++ b/src/XmlMNaming/XmlMNaming_Shape1.cxx @@ -16,7 +16,6 @@ #include #include -#include #include #include #include diff --git a/src/XmlMNaming/XmlMNaming_Shape1.hxx b/src/XmlMNaming/XmlMNaming_Shape1.hxx index f8d33b97c2..830ca641f8 100644 --- a/src/XmlMNaming/XmlMNaming_Shape1.hxx +++ b/src/XmlMNaming/XmlMNaming_Shape1.hxx @@ -18,10 +18,8 @@ #include #include -#include #include -#include #include #include class TopoDS_Shape; diff --git a/src/XmlMXCAFDoc/XmlMXCAFDoc_AssemblyItemRefDriver.cxx b/src/XmlMXCAFDoc/XmlMXCAFDoc_AssemblyItemRefDriver.cxx index 378c71eda2..fe5f21a3dd 100644 --- a/src/XmlMXCAFDoc/XmlMXCAFDoc_AssemblyItemRefDriver.cxx +++ b/src/XmlMXCAFDoc/XmlMXCAFDoc_AssemblyItemRefDriver.cxx @@ -15,7 +15,6 @@ #include #include -#include #include #include #include diff --git a/src/XmlMXCAFDoc/XmlMXCAFDoc_AssemblyItemRefDriver.hxx b/src/XmlMXCAFDoc/XmlMXCAFDoc_AssemblyItemRefDriver.hxx index ceee404bfd..3be8e42937 100644 --- a/src/XmlMXCAFDoc/XmlMXCAFDoc_AssemblyItemRefDriver.hxx +++ b/src/XmlMXCAFDoc/XmlMXCAFDoc_AssemblyItemRefDriver.hxx @@ -20,7 +20,6 @@ #include #include -#include #include #include diff --git a/src/XmlMXCAFDoc/XmlMXCAFDoc_CentroidDriver.cxx b/src/XmlMXCAFDoc/XmlMXCAFDoc_CentroidDriver.cxx index 95280fab56..0d35b6314b 100644 --- a/src/XmlMXCAFDoc/XmlMXCAFDoc_CentroidDriver.cxx +++ b/src/XmlMXCAFDoc/XmlMXCAFDoc_CentroidDriver.cxx @@ -15,9 +15,7 @@ #include -#include #include -#include #include #include #include diff --git a/src/XmlMXCAFDoc/XmlMXCAFDoc_CentroidDriver.hxx b/src/XmlMXCAFDoc/XmlMXCAFDoc_CentroidDriver.hxx index 170eb46807..025b7aa422 100644 --- a/src/XmlMXCAFDoc/XmlMXCAFDoc_CentroidDriver.hxx +++ b/src/XmlMXCAFDoc/XmlMXCAFDoc_CentroidDriver.hxx @@ -20,7 +20,6 @@ #include #include -#include #include #include class Message_Messenger; diff --git a/src/XmlMXCAFDoc/XmlMXCAFDoc_ColorDriver.cxx b/src/XmlMXCAFDoc/XmlMXCAFDoc_ColorDriver.cxx index 557ec06f61..3ddb9fde59 100644 --- a/src/XmlMXCAFDoc/XmlMXCAFDoc_ColorDriver.cxx +++ b/src/XmlMXCAFDoc/XmlMXCAFDoc_ColorDriver.cxx @@ -16,7 +16,6 @@ #include #include -#include #include #include #include diff --git a/src/XmlMXCAFDoc/XmlMXCAFDoc_ColorDriver.hxx b/src/XmlMXCAFDoc/XmlMXCAFDoc_ColorDriver.hxx index 52b1d313d0..5eb502b6f6 100644 --- a/src/XmlMXCAFDoc/XmlMXCAFDoc_ColorDriver.hxx +++ b/src/XmlMXCAFDoc/XmlMXCAFDoc_ColorDriver.hxx @@ -20,7 +20,6 @@ #include #include -#include #include #include class Message_Messenger; diff --git a/src/XmlMXCAFDoc/XmlMXCAFDoc_DatumDriver.cxx b/src/XmlMXCAFDoc/XmlMXCAFDoc_DatumDriver.cxx index cdca87b703..3447f65d28 100644 --- a/src/XmlMXCAFDoc/XmlMXCAFDoc_DatumDriver.cxx +++ b/src/XmlMXCAFDoc/XmlMXCAFDoc_DatumDriver.cxx @@ -18,7 +18,6 @@ #include #include #include -#include #include #include #include diff --git a/src/XmlMXCAFDoc/XmlMXCAFDoc_DatumDriver.hxx b/src/XmlMXCAFDoc/XmlMXCAFDoc_DatumDriver.hxx index 559433c1c1..46afdef267 100644 --- a/src/XmlMXCAFDoc/XmlMXCAFDoc_DatumDriver.hxx +++ b/src/XmlMXCAFDoc/XmlMXCAFDoc_DatumDriver.hxx @@ -20,7 +20,6 @@ #include #include -#include #include #include class Message_Messenger; diff --git a/src/XmlMXCAFDoc/XmlMXCAFDoc_DimTolDriver.cxx b/src/XmlMXCAFDoc/XmlMXCAFDoc_DimTolDriver.cxx index e851551b8c..d4347cc8d3 100644 --- a/src/XmlMXCAFDoc/XmlMXCAFDoc_DimTolDriver.cxx +++ b/src/XmlMXCAFDoc/XmlMXCAFDoc_DimTolDriver.cxx @@ -17,8 +17,6 @@ #include #include #include -#include -#include #include #include #include diff --git a/src/XmlMXCAFDoc/XmlMXCAFDoc_DimTolDriver.hxx b/src/XmlMXCAFDoc/XmlMXCAFDoc_DimTolDriver.hxx index 0084150ffe..5b945c77bd 100644 --- a/src/XmlMXCAFDoc/XmlMXCAFDoc_DimTolDriver.hxx +++ b/src/XmlMXCAFDoc/XmlMXCAFDoc_DimTolDriver.hxx @@ -20,7 +20,6 @@ #include #include -#include #include #include class Message_Messenger; diff --git a/src/XmlMXCAFDoc/XmlMXCAFDoc_GraphNodeDriver.cxx b/src/XmlMXCAFDoc/XmlMXCAFDoc_GraphNodeDriver.cxx index 193b1732e6..2001530966 100644 --- a/src/XmlMXCAFDoc/XmlMXCAFDoc_GraphNodeDriver.cxx +++ b/src/XmlMXCAFDoc/XmlMXCAFDoc_GraphNodeDriver.cxx @@ -17,7 +17,6 @@ #include #include #include -#include #include #include #include diff --git a/src/XmlMXCAFDoc/XmlMXCAFDoc_GraphNodeDriver.hxx b/src/XmlMXCAFDoc/XmlMXCAFDoc_GraphNodeDriver.hxx index 66f5c20f56..68ac483b40 100644 --- a/src/XmlMXCAFDoc/XmlMXCAFDoc_GraphNodeDriver.hxx +++ b/src/XmlMXCAFDoc/XmlMXCAFDoc_GraphNodeDriver.hxx @@ -20,7 +20,6 @@ #include #include -#include #include #include class Message_Messenger; diff --git a/src/XmlMXCAFDoc/XmlMXCAFDoc_LengthUnitDriver.cxx b/src/XmlMXCAFDoc/XmlMXCAFDoc_LengthUnitDriver.cxx index a2dbabd0d7..be0134ceee 100644 --- a/src/XmlMXCAFDoc/XmlMXCAFDoc_LengthUnitDriver.cxx +++ b/src/XmlMXCAFDoc/XmlMXCAFDoc_LengthUnitDriver.cxx @@ -15,7 +15,6 @@ #include #include -#include #include #include #include diff --git a/src/XmlMXCAFDoc/XmlMXCAFDoc_LengthUnitDriver.hxx b/src/XmlMXCAFDoc/XmlMXCAFDoc_LengthUnitDriver.hxx index e0954f6308..917b27623f 100644 --- a/src/XmlMXCAFDoc/XmlMXCAFDoc_LengthUnitDriver.hxx +++ b/src/XmlMXCAFDoc/XmlMXCAFDoc_LengthUnitDriver.hxx @@ -15,10 +15,8 @@ #define _XmlMXCAFDoc_LengthUnitDriver_HeaderFile #include -#include #include -#include #include #include class Message_Messenger; diff --git a/src/XmlMXCAFDoc/XmlMXCAFDoc_LocationDriver.cxx b/src/XmlMXCAFDoc/XmlMXCAFDoc_LocationDriver.cxx index 063e982d82..4786801f74 100644 --- a/src/XmlMXCAFDoc/XmlMXCAFDoc_LocationDriver.cxx +++ b/src/XmlMXCAFDoc/XmlMXCAFDoc_LocationDriver.cxx @@ -16,13 +16,10 @@ #include #include -#include #include #include -#include #include #include -#include #include #include #include diff --git a/src/XmlMXCAFDoc/XmlMXCAFDoc_LocationDriver.hxx b/src/XmlMXCAFDoc/XmlMXCAFDoc_LocationDriver.hxx index a069ea8223..b473be78f5 100644 --- a/src/XmlMXCAFDoc/XmlMXCAFDoc_LocationDriver.hxx +++ b/src/XmlMXCAFDoc/XmlMXCAFDoc_LocationDriver.hxx @@ -21,7 +21,6 @@ #include #include -#include #include #include #include diff --git a/src/XmlMXCAFDoc/XmlMXCAFDoc_MaterialDriver.cxx b/src/XmlMXCAFDoc/XmlMXCAFDoc_MaterialDriver.cxx index 3826b61b34..46c83acb71 100644 --- a/src/XmlMXCAFDoc/XmlMXCAFDoc_MaterialDriver.cxx +++ b/src/XmlMXCAFDoc/XmlMXCAFDoc_MaterialDriver.cxx @@ -17,7 +17,6 @@ #include #include #include -#include #include #include #include diff --git a/src/XmlMXCAFDoc/XmlMXCAFDoc_MaterialDriver.hxx b/src/XmlMXCAFDoc/XmlMXCAFDoc_MaterialDriver.hxx index 2c33a500bf..6144592f1c 100644 --- a/src/XmlMXCAFDoc/XmlMXCAFDoc_MaterialDriver.hxx +++ b/src/XmlMXCAFDoc/XmlMXCAFDoc_MaterialDriver.hxx @@ -20,7 +20,6 @@ #include #include -#include #include #include class Message_Messenger; diff --git a/src/XmlMXCAFDoc/XmlMXCAFDoc_NoteBinDataDriver.cxx b/src/XmlMXCAFDoc/XmlMXCAFDoc_NoteBinDataDriver.cxx index c7d64dd0d4..98be51f53d 100644 --- a/src/XmlMXCAFDoc/XmlMXCAFDoc_NoteBinDataDriver.cxx +++ b/src/XmlMXCAFDoc/XmlMXCAFDoc_NoteBinDataDriver.cxx @@ -15,7 +15,6 @@ #include #include -#include #include #include #include diff --git a/src/XmlMXCAFDoc/XmlMXCAFDoc_NoteCommentDriver.cxx b/src/XmlMXCAFDoc/XmlMXCAFDoc_NoteCommentDriver.cxx index 8acb765098..a1d05f1aa2 100644 --- a/src/XmlMXCAFDoc/XmlMXCAFDoc_NoteCommentDriver.cxx +++ b/src/XmlMXCAFDoc/XmlMXCAFDoc_NoteCommentDriver.cxx @@ -15,7 +15,6 @@ #include #include -#include #include #include #include diff --git a/src/XmlMXCAFDoc/XmlMXCAFDoc_NoteDriver.cxx b/src/XmlMXCAFDoc/XmlMXCAFDoc_NoteDriver.cxx index 450806e7e6..6ec76ed9d0 100644 --- a/src/XmlMXCAFDoc/XmlMXCAFDoc_NoteDriver.cxx +++ b/src/XmlMXCAFDoc/XmlMXCAFDoc_NoteDriver.cxx @@ -15,7 +15,6 @@ #include #include -#include #include #include #include diff --git a/src/XmlMXCAFDoc/XmlMXCAFDoc_NoteDriver.hxx b/src/XmlMXCAFDoc/XmlMXCAFDoc_NoteDriver.hxx index 3f8231b57f..90a0a1df09 100644 --- a/src/XmlMXCAFDoc/XmlMXCAFDoc_NoteDriver.hxx +++ b/src/XmlMXCAFDoc/XmlMXCAFDoc_NoteDriver.hxx @@ -20,7 +20,6 @@ #include #include -#include #include #include diff --git a/src/XmlMXCAFDoc/XmlMXCAFDoc_VisMaterialDriver.hxx b/src/XmlMXCAFDoc/XmlMXCAFDoc_VisMaterialDriver.hxx index f2bb61acaa..7553eba9ec 100644 --- a/src/XmlMXCAFDoc/XmlMXCAFDoc_VisMaterialDriver.hxx +++ b/src/XmlMXCAFDoc/XmlMXCAFDoc_VisMaterialDriver.hxx @@ -15,10 +15,8 @@ #define _XmlMXCAFDoc_VisMaterialDriver_HeaderFile #include -#include #include -#include #include #include diff --git a/src/XmlObjMgt/XmlObjMgt.cxx b/src/XmlObjMgt/XmlObjMgt.cxx index cb26845faa..49b8f18072 100644 --- a/src/XmlObjMgt/XmlObjMgt.cxx +++ b/src/XmlObjMgt/XmlObjMgt.cxx @@ -15,7 +15,6 @@ #include -#include #include #include #include diff --git a/src/XmlObjMgt/XmlObjMgt.hxx b/src/XmlObjMgt/XmlObjMgt.hxx index de410089f9..6c54b57ab0 100644 --- a/src/XmlObjMgt/XmlObjMgt.hxx +++ b/src/XmlObjMgt/XmlObjMgt.hxx @@ -23,7 +23,6 @@ #include #include #include -#include #include #include class TCollection_ExtendedString; diff --git a/src/XmlObjMgt/XmlObjMgt_Array1.cxx b/src/XmlObjMgt/XmlObjMgt_Array1.cxx index 05359f7d0b..a82baebc9f 100644 --- a/src/XmlObjMgt/XmlObjMgt_Array1.cxx +++ b/src/XmlObjMgt/XmlObjMgt_Array1.cxx @@ -15,7 +15,6 @@ //AGV 130202: Changed prototype LDOM_Node::getOwnerDocument() -#include #include #include #include diff --git a/src/XmlObjMgt/XmlObjMgt_Array1.hxx b/src/XmlObjMgt/XmlObjMgt_Array1.hxx index 8e618ba036..2a8cf7a341 100644 --- a/src/XmlObjMgt/XmlObjMgt_Array1.hxx +++ b/src/XmlObjMgt/XmlObjMgt_Array1.hxx @@ -19,7 +19,6 @@ #include #include -#include #include #include diff --git a/src/XmlObjMgt/XmlObjMgt_GP.cxx b/src/XmlObjMgt/XmlObjMgt_GP.cxx index ddb9db049e..9b90906449 100644 --- a/src/XmlObjMgt/XmlObjMgt_GP.cxx +++ b/src/XmlObjMgt/XmlObjMgt_GP.cxx @@ -14,13 +14,11 @@ // commercial license or contractual agreement. -#include #include #include #include #include -#include static const char * Translate (const char * theStr, gp_Mat& M); static const char * Translate (const char * theStr, gp_XYZ& P); diff --git a/src/XmlObjMgt/XmlObjMgt_GP.hxx b/src/XmlObjMgt/XmlObjMgt_GP.hxx index 339bbabdd2..b09d449277 100644 --- a/src/XmlObjMgt/XmlObjMgt_GP.hxx +++ b/src/XmlObjMgt/XmlObjMgt_GP.hxx @@ -16,10 +16,8 @@ #include #include -#include #include -#include class gp_Trsf; class gp_Mat; class gp_XYZ; diff --git a/src/XmlObjMgt/XmlObjMgt_Persistent.cxx b/src/XmlObjMgt/XmlObjMgt_Persistent.cxx index 438f3e5637..c7a8e5ada7 100644 --- a/src/XmlObjMgt/XmlObjMgt_Persistent.cxx +++ b/src/XmlObjMgt/XmlObjMgt_Persistent.cxx @@ -15,7 +15,6 @@ //AGV 130202: Changed prototype LDOM_Node::getOwnerDocument() -#include #include #include #include diff --git a/src/XmlObjMgt/XmlObjMgt_Persistent.hxx b/src/XmlObjMgt/XmlObjMgt_Persistent.hxx index 9d6f624723..7e65289da2 100644 --- a/src/XmlObjMgt/XmlObjMgt_Persistent.hxx +++ b/src/XmlObjMgt/XmlObjMgt_Persistent.hxx @@ -18,7 +18,6 @@ #include #include -#include #include #include diff --git a/src/XmlTObjDrivers/XmlTObjDrivers.cxx b/src/XmlTObjDrivers/XmlTObjDrivers.cxx index abfc2e98fc..453aeb2ee1 100644 --- a/src/XmlTObjDrivers/XmlTObjDrivers.cxx +++ b/src/XmlTObjDrivers/XmlTObjDrivers.cxx @@ -17,7 +17,6 @@ #include #include -#include #include #include #include diff --git a/src/XmlTObjDrivers/XmlTObjDrivers_IntSparseArrayDriver.cxx b/src/XmlTObjDrivers/XmlTObjDrivers_IntSparseArrayDriver.cxx index 0600a2f3ed..070441a91d 100644 --- a/src/XmlTObjDrivers/XmlTObjDrivers_IntSparseArrayDriver.cxx +++ b/src/XmlTObjDrivers/XmlTObjDrivers_IntSparseArrayDriver.cxx @@ -17,10 +17,8 @@ #include #include -#include #include #include -#include #include #include diff --git a/src/XmlTObjDrivers/XmlTObjDrivers_IntSparseArrayDriver.hxx b/src/XmlTObjDrivers/XmlTObjDrivers_IntSparseArrayDriver.hxx index 5b9dc4bb5d..9a98b32c96 100644 --- a/src/XmlTObjDrivers/XmlTObjDrivers_IntSparseArrayDriver.hxx +++ b/src/XmlTObjDrivers/XmlTObjDrivers_IntSparseArrayDriver.hxx @@ -18,7 +18,6 @@ #ifndef XmlTObjDrivers_IntSparseArrayDriver_HeaderFile #define XmlTObjDrivers_IntSparseArrayDriver_HeaderFile -#include #include class XmlTObjDrivers_IntSparseArrayDriver : public XmlMDF_ADriver diff --git a/src/XmlTObjDrivers/XmlTObjDrivers_ModelDriver.cxx b/src/XmlTObjDrivers/XmlTObjDrivers_ModelDriver.cxx index 0734dadbbf..db74292445 100644 --- a/src/XmlTObjDrivers/XmlTObjDrivers_ModelDriver.cxx +++ b/src/XmlTObjDrivers/XmlTObjDrivers_ModelDriver.cxx @@ -18,12 +18,10 @@ #include "XmlTObjDrivers_ModelDriver.hxx" -#include #include #include #include #include -#include #include #include diff --git a/src/XmlTObjDrivers/XmlTObjDrivers_ModelDriver.hxx b/src/XmlTObjDrivers/XmlTObjDrivers_ModelDriver.hxx index 340e18fc54..4a31a72586 100644 --- a/src/XmlTObjDrivers/XmlTObjDrivers_ModelDriver.hxx +++ b/src/XmlTObjDrivers/XmlTObjDrivers_ModelDriver.hxx @@ -18,7 +18,6 @@ #ifndef XmlTObjDrivers_ModelDriver_HeaderFile #define XmlTObjDrivers_ModelDriver_HeaderFile -#include #include class XmlTObjDrivers_ModelDriver : public XmlMDF_ADriver diff --git a/src/XmlTObjDrivers/XmlTObjDrivers_ReferenceDriver.cxx b/src/XmlTObjDrivers/XmlTObjDrivers_ReferenceDriver.cxx index cf2abb5b5a..c255c083b1 100644 --- a/src/XmlTObjDrivers/XmlTObjDrivers_ReferenceDriver.cxx +++ b/src/XmlTObjDrivers/XmlTObjDrivers_ReferenceDriver.cxx @@ -18,7 +18,6 @@ #include "XmlTObjDrivers_ReferenceDriver.hxx" -#include #include #include @@ -30,7 +29,6 @@ #include #include #include -#include IMPLEMENT_STANDARD_RTTIEXT(XmlTObjDrivers_ReferenceDriver,XmlMDF_ADriver) diff --git a/src/XmlTObjDrivers/XmlTObjDrivers_ReferenceDriver.hxx b/src/XmlTObjDrivers/XmlTObjDrivers_ReferenceDriver.hxx index 11212786b1..6228f278aa 100644 --- a/src/XmlTObjDrivers/XmlTObjDrivers_ReferenceDriver.hxx +++ b/src/XmlTObjDrivers/XmlTObjDrivers_ReferenceDriver.hxx @@ -19,7 +19,6 @@ #ifndef XmlTObjDrivers_ReferenceDriver_HeaderFile #define XmlTObjDrivers_ReferenceDriver_HeaderFile -#include #include class XmlTObjDrivers_ReferenceDriver : public XmlMDF_ADriver diff --git a/src/XmlTObjDrivers/XmlTObjDrivers_XYZDriver.cxx b/src/XmlTObjDrivers/XmlTObjDrivers_XYZDriver.cxx index 4f097842eb..61c5637d6d 100644 --- a/src/XmlTObjDrivers/XmlTObjDrivers_XYZDriver.cxx +++ b/src/XmlTObjDrivers/XmlTObjDrivers_XYZDriver.cxx @@ -19,7 +19,6 @@ #include #include -#include #include #include diff --git a/src/XmlTObjDrivers/XmlTObjDrivers_XYZDriver.hxx b/src/XmlTObjDrivers/XmlTObjDrivers_XYZDriver.hxx index 6b276c3254..430f5cb457 100644 --- a/src/XmlTObjDrivers/XmlTObjDrivers_XYZDriver.hxx +++ b/src/XmlTObjDrivers/XmlTObjDrivers_XYZDriver.hxx @@ -19,7 +19,6 @@ #ifndef XmlTObjDrivers_XYZDriver_HeaderFile #define XmlTObjDrivers_XYZDriver_HeaderFile -#include #include class XmlTObjDrivers_XYZDriver : public XmlMDF_ADriver diff --git a/src/Xw/Xw_Window.cxx b/src/Xw/Xw_Window.cxx index 8ffa13480c..548767a4fe 100644 --- a/src/Xw/Xw_Window.cxx +++ b/src/Xw/Xw_Window.cxx @@ -19,8 +19,6 @@ #include #include #include -#include -#include #if defined(HAVE_XLIB) #include diff --git a/src/Xw/Xw_Window.hxx b/src/Xw/Xw_Window.hxx index 1df71351a2..9add87984a 100644 --- a/src/Xw/Xw_Window.hxx +++ b/src/Xw/Xw_Window.hxx @@ -19,7 +19,6 @@ #include #include -#include class Aspect_DisplayConnection; class Aspect_WindowInputListener; From 07e803dee1ae102c01765df5ddabf69f783bd92c Mon Sep 17 00:00:00 2001 From: jgv Date: Sat, 30 Apr 2022 23:05:07 +0300 Subject: [PATCH 321/639] 0032999: Modeling Algorithms - New option in ShapeUpgrade_ShapeDivide algorithm: splitting into N parts, into N*M parts 1. Multiple changes in ShapeUpgrade_ShapeDivideArea, ShapeUpgrade_FaceDivide, ShapeUpgrade_FaceDivideArea, ShapeUpgrade_SplitSurface, ShapeUpgrade_SplitSurfaceArea: new methods NbParts and SetSplittingByNumber, changes in ShapeUpgrade_FaceDivideArea::Perform and ShapeUpgrade_SplitSurfaceArea::Compute concerning new modes of splitting. 2. New Draw command "DT_SplitByNumber" for testing new modes of splitting. 3. New subgroups "split_number" and "split_two_numbers" in the group of tests "heal" for testing new modes of splitting. --- src/SWDRAW/SWDRAW_ShapeUpgrade.cxx | 48 +++++++++++ .../ShapeUpgrade_ClosedFaceDivide.cxx | 2 +- .../ShapeUpgrade_ClosedFaceDivide.hxx | 2 +- src/ShapeUpgrade/ShapeUpgrade_FaceDivide.cxx | 8 +- src/ShapeUpgrade/ShapeUpgrade_FaceDivide.hxx | 10 ++- .../ShapeUpgrade_FaceDivideArea.cxx | 82 ++++++++++++------- .../ShapeUpgrade_FaceDivideArea.hxx | 19 ++++- .../ShapeUpgrade_FaceDivideArea.lxx | 18 ++++ .../ShapeUpgrade_ShapeDivideArea.cxx | 9 ++ .../ShapeUpgrade_ShapeDivideArea.hxx | 22 ++++- .../ShapeUpgrade_ShapeDivideArea.lxx | 21 +++++ .../ShapeUpgrade_SplitSurface.cxx | 30 ++++++- .../ShapeUpgrade_SplitSurface.hxx | 8 +- .../ShapeUpgrade_SplitSurfaceArea.cxx | 42 ++++++++-- .../ShapeUpgrade_SplitSurfaceArea.hxx | 14 ++++ .../ShapeUpgrade_SplitSurfaceArea.lxx | 12 +++ tests/heal/grids.list | 4 +- tests/heal/split_number/A1 | 8 ++ tests/heal/split_number/A2 | 8 ++ tests/heal/split_number/A3 | 10 +++ tests/heal/split_number/A4 | 10 +++ tests/heal/split_number/A5 | 8 ++ tests/heal/split_number/A6 | 8 ++ tests/heal/split_number/A7 | 8 ++ tests/heal/split_number/A8 | 8 ++ tests/heal/split_number/B1 | 7 ++ tests/heal/split_number/B2 | 7 ++ tests/heal/split_number/B3 | 12 +++ tests/heal/split_number/B4 | 12 +++ tests/heal/split_number/B5 | 12 +++ tests/heal/split_number/B6 | 12 +++ tests/heal/split_number/C1 | 7 ++ tests/heal/split_number/C2 | 7 ++ tests/heal/split_number/D1 | 13 +++ tests/heal/split_number/D2 | 13 +++ tests/heal/split_number/end | 1 + tests/heal/split_two_numbers/A1 | 8 ++ tests/heal/split_two_numbers/A2 | 8 ++ tests/heal/split_two_numbers/A3 | 8 ++ tests/heal/split_two_numbers/A4 | 10 +++ tests/heal/split_two_numbers/B1 | 7 ++ tests/heal/split_two_numbers/B2 | 7 ++ tests/heal/split_two_numbers/B3 | 7 ++ tests/heal/split_two_numbers/B4 | 12 +++ tests/heal/split_two_numbers/end | 1 + 45 files changed, 540 insertions(+), 50 deletions(-) create mode 100644 tests/heal/split_number/A1 create mode 100644 tests/heal/split_number/A2 create mode 100644 tests/heal/split_number/A3 create mode 100644 tests/heal/split_number/A4 create mode 100644 tests/heal/split_number/A5 create mode 100644 tests/heal/split_number/A6 create mode 100644 tests/heal/split_number/A7 create mode 100644 tests/heal/split_number/A8 create mode 100644 tests/heal/split_number/B1 create mode 100644 tests/heal/split_number/B2 create mode 100644 tests/heal/split_number/B3 create mode 100644 tests/heal/split_number/B4 create mode 100644 tests/heal/split_number/B5 create mode 100644 tests/heal/split_number/B6 create mode 100644 tests/heal/split_number/C1 create mode 100644 tests/heal/split_number/C2 create mode 100644 tests/heal/split_number/D1 create mode 100644 tests/heal/split_number/D2 create mode 100644 tests/heal/split_number/end create mode 100644 tests/heal/split_two_numbers/A1 create mode 100644 tests/heal/split_two_numbers/A2 create mode 100644 tests/heal/split_two_numbers/A3 create mode 100644 tests/heal/split_two_numbers/A4 create mode 100644 tests/heal/split_two_numbers/B1 create mode 100644 tests/heal/split_two_numbers/B2 create mode 100644 tests/heal/split_two_numbers/B3 create mode 100644 tests/heal/split_two_numbers/B4 create mode 100644 tests/heal/split_two_numbers/end diff --git a/src/SWDRAW/SWDRAW_ShapeUpgrade.cxx b/src/SWDRAW/SWDRAW_ShapeUpgrade.cxx index e0d534deed..f2a94082d7 100644 --- a/src/SWDRAW/SWDRAW_ShapeUpgrade.cxx +++ b/src/SWDRAW/SWDRAW_ShapeUpgrade.cxx @@ -1190,6 +1190,52 @@ static Standard_Integer splitarea (Draw_Interpretor& di, return 0; } +static Standard_Integer splitbynumber (Draw_Interpretor& di, + Standard_Integer argc, + const char** argv) +{ + if (argc < 4) { + di << "bad number of arguments\n"; + return 1; + } + + TopoDS_Shape inputShape=DBRep::Get(argv[2], TopAbs_FACE); + if (inputShape.IsNull()) { + di << "Unknown face\n"; + return 1; + } + + Standard_Integer aNbParts, aNumber1 = 0, aNumber2 = 0; + aNbParts = aNumber1 = Draw::Atoi (argv[3]); + if (argc > 4) + aNumber2 = Draw::Atoi (argv[4]); + + if (argc == 4 && aNbParts <= 0) + { + di << "Incorrect number of parts\n"; + return 1; + } + if (argc == 5 && + (aNumber1 <= 0 || aNumber2 <= 0)) + { + di << "Incorrect numbers in U or V\n"; + return 1; + } + + ShapeUpgrade_ShapeDivideArea tool (inputShape); + tool.SetSplittingByNumber (Standard_True); + if (argc == 4) + tool.NbParts() = aNbParts; + else + tool.SetNumbersUVSplits (aNumber1, aNumber2); + tool.Perform(); + TopoDS_Shape res = tool.Result(); + + ShapeFix::SameParameter ( res, Standard_False ); + DBRep::Set ( argv[1], res ); + return 0; +} + static Standard_Integer removeinternalwires (Draw_Interpretor& di, Standard_Integer argc, const char** argv) @@ -1624,6 +1670,8 @@ static Standard_Integer reshape(Draw_Interpretor& /*theDI*/, __FILE__,splitclosed,g); theCommands.Add ("DT_SplitByArea","result shape maxarea [preci]", __FILE__,splitarea,g); + theCommands.Add ("DT_SplitByNumber","result face number [number2]", + __FILE__,splitbynumber,g); theCommands.Add ("RemoveIntWires","result minarea wholeshape [faces or wires] [moderemoveface ]", __FILE__,removeinternalwires,g); diff --git a/src/ShapeUpgrade/ShapeUpgrade_ClosedFaceDivide.cxx b/src/ShapeUpgrade/ShapeUpgrade_ClosedFaceDivide.cxx index 332a87e3ea..5f06125da1 100644 --- a/src/ShapeUpgrade/ShapeUpgrade_ClosedFaceDivide.cxx +++ b/src/ShapeUpgrade/ShapeUpgrade_ClosedFaceDivide.cxx @@ -67,7 +67,7 @@ ShapeUpgrade_ClosedFaceDivide::ShapeUpgrade_ClosedFaceDivide(const TopoDS_Face& //purpose : //======================================================================= -Standard_Boolean ShapeUpgrade_ClosedFaceDivide::SplitSurface() +Standard_Boolean ShapeUpgrade_ClosedFaceDivide::SplitSurface(const Standard_Real) { Handle(ShapeUpgrade_SplitSurface) SplitSurf = GetSplitSurfaceTool(); if ( SplitSurf.IsNull() ) return Standard_False; diff --git a/src/ShapeUpgrade/ShapeUpgrade_ClosedFaceDivide.hxx b/src/ShapeUpgrade/ShapeUpgrade_ClosedFaceDivide.hxx index 71cc375834..ca5d97cacd 100644 --- a/src/ShapeUpgrade/ShapeUpgrade_ClosedFaceDivide.hxx +++ b/src/ShapeUpgrade/ShapeUpgrade_ClosedFaceDivide.hxx @@ -44,7 +44,7 @@ public: //! Performs splitting of surface and computes the shell //! from source face. - Standard_EXPORT virtual Standard_Boolean SplitSurface() Standard_OVERRIDE; + Standard_EXPORT virtual Standard_Boolean SplitSurface(const Standard_Real theArea = 0.) Standard_OVERRIDE; //! Sets the number of cutting lines by which closed face will be split. //! The resulting faces will be num+1. diff --git a/src/ShapeUpgrade/ShapeUpgrade_FaceDivide.cxx b/src/ShapeUpgrade/ShapeUpgrade_FaceDivide.cxx index e27af14a5f..39249cc8d6 100644 --- a/src/ShapeUpgrade/ShapeUpgrade_FaceDivide.cxx +++ b/src/ShapeUpgrade/ShapeUpgrade_FaceDivide.cxx @@ -92,12 +92,12 @@ void ShapeUpgrade_FaceDivide::SetSurfaceSegmentMode(const Standard_Boolean Segme //purpose : //======================================================================= -Standard_Boolean ShapeUpgrade_FaceDivide::Perform () +Standard_Boolean ShapeUpgrade_FaceDivide::Perform (const Standard_Real theArea) { myStatus = ShapeExtend::EncodeStatus ( ShapeExtend_OK ); if ( myFace.IsNull() ) return Standard_False; myResult = myFace; - SplitSurface(); + SplitSurface (theArea); SplitCurves(); return Status ( ShapeExtend_DONE ); } @@ -107,7 +107,7 @@ Standard_Boolean ShapeUpgrade_FaceDivide::Perform () //purpose : //======================================================================= -Standard_Boolean ShapeUpgrade_FaceDivide::SplitSurface () +Standard_Boolean ShapeUpgrade_FaceDivide::SplitSurface (const Standard_Real theArea) { Handle(ShapeUpgrade_SplitSurface) SplitSurf = GetSplitSurfaceTool(); if ( SplitSurf.IsNull() ) return Standard_False; @@ -144,7 +144,7 @@ Standard_Boolean ShapeUpgrade_FaceDivide::SplitSurface () if (Vl < aSVl) Vl += Min(dV, aSVl - Vl); } - SplitSurf->Init ( surf, Uf, Ul, Vf, Vl ); + SplitSurf->Init (surf, Uf, Ul, Vf, Vl, theArea); SplitSurf->Perform(mySegmentMode); // If surface was neither split nor modified, do nothing diff --git a/src/ShapeUpgrade/ShapeUpgrade_FaceDivide.hxx b/src/ShapeUpgrade/ShapeUpgrade_FaceDivide.hxx index 9db1c50854..d07744a1ef 100644 --- a/src/ShapeUpgrade/ShapeUpgrade_FaceDivide.hxx +++ b/src/ShapeUpgrade/ShapeUpgrade_FaceDivide.hxx @@ -72,11 +72,17 @@ public: //! The context is used to keep track of former splittings //! in order to keep sharings. It is updated according to //! modifications made. - Standard_EXPORT virtual Standard_Boolean Perform(); + //! The optional argument is used to initialize + //! the tool for splitting surface in the case of + //! splitting into N parts where N is user-defined. + Standard_EXPORT virtual Standard_Boolean Perform(const Standard_Real theArea = 0.); //! Performs splitting of surface and computes the shell //! from source face. - Standard_EXPORT virtual Standard_Boolean SplitSurface(); + //! The optional argument is used to initialize + //! the tool for splitting surface in the case of + //! splitting into N parts where N is user-defined. + Standard_EXPORT virtual Standard_Boolean SplitSurface(const Standard_Real theArea = 0.); //! Performs splitting of curves of all the edges in the //! shape and divides these edges. diff --git a/src/ShapeUpgrade/ShapeUpgrade_FaceDivideArea.cxx b/src/ShapeUpgrade/ShapeUpgrade_FaceDivideArea.cxx index 6399d63da3..03ca53df1f 100644 --- a/src/ShapeUpgrade/ShapeUpgrade_FaceDivideArea.cxx +++ b/src/ShapeUpgrade/ShapeUpgrade_FaceDivideArea.cxx @@ -35,6 +35,9 @@ IMPLEMENT_STANDARD_RTTIEXT(ShapeUpgrade_FaceDivideArea,ShapeUpgrade_FaceDivide) ShapeUpgrade_FaceDivideArea::ShapeUpgrade_FaceDivideArea() { myMaxArea = Precision::Infinite(); + myNbParts = 0; + myUnbSplit = myVnbSplit = -1; + myIsSplittingByNumber = Standard_False; SetPrecision(1.e-5); SetSplitSurfaceTool (new ShapeUpgrade_SplitSurfaceArea); } @@ -47,6 +50,9 @@ ShapeUpgrade_FaceDivideArea::ShapeUpgrade_FaceDivideArea() ShapeUpgrade_FaceDivideArea::ShapeUpgrade_FaceDivideArea(const TopoDS_Face& F) { myMaxArea = Precision::Infinite(); + myNbParts = 0; + myUnbSplit = myVnbSplit = -1; + myIsSplittingByNumber = Standard_False; SetPrecision(1.e-5); SetSplitSurfaceTool (new ShapeUpgrade_SplitSurfaceArea); Init(F); @@ -57,54 +63,74 @@ ShapeUpgrade_FaceDivideArea::ShapeUpgrade_FaceDivideArea(const TopoDS_Face& F) //purpose : //======================================================================= - Standard_Boolean ShapeUpgrade_FaceDivideArea::Perform() + Standard_Boolean ShapeUpgrade_FaceDivideArea::Perform(const Standard_Real) { myStatus = ShapeExtend::EncodeStatus ( ShapeExtend_OK ); GProp_GProps aGprop; - + BRepGProp::SurfaceProperties(myFace,aGprop,Precision()); Standard_Real anArea = aGprop.Mass(); + + Standard_Integer anbParts = 0; + if (myMaxArea == -1) + { + anbParts = myNbParts; + myMaxArea = anArea / anbParts; + } + if((anArea - myMaxArea) < Precision::Confusion()) return Standard_False; - - Standard_Integer anbParts = RealToInt(ceil(anArea/myMaxArea)); + + if (anbParts == 0) + anbParts = RealToInt(ceil(anArea/myMaxArea)); + Handle(ShapeUpgrade_SplitSurfaceArea) aSurfTool= Handle(ShapeUpgrade_SplitSurfaceArea):: DownCast(GetSplitSurfaceTool ()); if(aSurfTool.IsNull()) return Standard_False; aSurfTool->NbParts() = anbParts; - if(!ShapeUpgrade_FaceDivide::Perform()) + if (myIsSplittingByNumber) + { + aSurfTool->SetSplittingIntoSquares(Standard_True); + aSurfTool->SetNumbersUVSplits (myUnbSplit, myVnbSplit); + } + if (!ShapeUpgrade_FaceDivide::Perform (anArea)) return Standard_False; TopoDS_Shape aResult = Result(); if(aResult.ShapeType() == TopAbs_FACE) return Standard_False; Standard_Integer aStatus = myStatus; - TopExp_Explorer aExpF(aResult,TopAbs_FACE); - TopoDS_Shape aCopyRes = aResult.EmptyCopied(); - - Standard_Boolean isModified = Standard_False; - for( ; aExpF.More() ; aExpF.Next()) { - TopoDS_Shape aSh = Context()->Apply(aExpF.Current()); - TopoDS_Face aFace = TopoDS::Face(aSh); - Init(aFace); - BRep_Builder aB; - if(Perform()) { - isModified = Standard_True; - TopoDS_Shape aRes = Result(); - TopExp_Explorer aExpR(aRes,TopAbs_FACE); - for( ; aExpR.More(); aExpR.Next()) - aB.Add(aCopyRes,aExpR.Current()); - } - else - aB.Add(aCopyRes,aFace); - } - if(isModified) + + if (!myIsSplittingByNumber) { - if (aCopyRes.ShapeType() == TopAbs_WIRE || aCopyRes.ShapeType() == TopAbs_SHELL) - aCopyRes.Closed (BRep_Tool::IsClosed (aCopyRes)); - Context()->Replace(aResult,aCopyRes); + TopExp_Explorer aExpF(aResult,TopAbs_FACE); + TopoDS_Shape aCopyRes = aResult.EmptyCopied(); + + Standard_Boolean isModified = Standard_False; + for( ; aExpF.More() ; aExpF.Next()) { + TopoDS_Shape aSh = Context()->Apply(aExpF.Current()); + TopoDS_Face aFace = TopoDS::Face(aSh); + Init(aFace); + BRep_Builder aB; + if(Perform()) { + isModified = Standard_True; + TopoDS_Shape aRes = Result(); + TopExp_Explorer aExpR(aRes,TopAbs_FACE); + for( ; aExpR.More(); aExpR.Next()) + aB.Add(aCopyRes,aExpR.Current()); + } + else + aB.Add(aCopyRes,aFace); + } + if(isModified) + { + if (aCopyRes.ShapeType() == TopAbs_WIRE || aCopyRes.ShapeType() == TopAbs_SHELL) + aCopyRes.Closed (BRep_Tool::IsClosed (aCopyRes)); + Context()->Replace(aResult,aCopyRes); + } } + myStatus |= aStatus; myResult = Context()->Apply ( aResult ); return Status ( ShapeExtend_DONE ); diff --git a/src/ShapeUpgrade/ShapeUpgrade_FaceDivideArea.hxx b/src/ShapeUpgrade/ShapeUpgrade_FaceDivideArea.hxx index bfb3d1b62f..3595c16585 100644 --- a/src/ShapeUpgrade/ShapeUpgrade_FaceDivideArea.hxx +++ b/src/ShapeUpgrade/ShapeUpgrade_FaceDivideArea.hxx @@ -40,12 +40,24 @@ public: //! Performs splitting and computes the resulting shell //! The context is used to keep track of former splittings - Standard_EXPORT virtual Standard_Boolean Perform() Standard_OVERRIDE; + Standard_EXPORT virtual Standard_Boolean Perform(const Standard_Real theArea = 0.) Standard_OVERRIDE; //! Set max area allowed for faces Standard_Real& MaxArea(); + //! Set number of parts expected + Standard_Integer& NbParts(); + //! Set fixed numbers of splits in U and V directions. + //! Only for "Splitting By Numbers" mode + void SetNumbersUVSplits(const Standard_Integer theNbUsplits, + const Standard_Integer theNbVsplits); + + //! Set splitting mode + //! If the mode is "splitting by number", + //! the face is splitted approximately into parts, + //! the parts are similar to squares in 2D. + void SetSplittingByNumber(const Standard_Boolean theIsSplittingByNumber); DEFINE_STANDARD_RTTIEXT(ShapeUpgrade_FaceDivideArea,ShapeUpgrade_FaceDivide) @@ -59,7 +71,10 @@ private: Standard_Real myMaxArea; - + Standard_Integer myNbParts; + Standard_Integer myUnbSplit; + Standard_Integer myVnbSplit; + Standard_Boolean myIsSplittingByNumber; }; diff --git a/src/ShapeUpgrade/ShapeUpgrade_FaceDivideArea.lxx b/src/ShapeUpgrade/ShapeUpgrade_FaceDivideArea.lxx index 8bdf0388b3..9d16e77243 100644 --- a/src/ShapeUpgrade/ShapeUpgrade_FaceDivideArea.lxx +++ b/src/ShapeUpgrade/ShapeUpgrade_FaceDivideArea.lxx @@ -17,3 +17,21 @@ inline Standard_Real& ShapeUpgrade_FaceDivideArea::MaxArea() } +inline Standard_Integer& ShapeUpgrade_FaceDivideArea::NbParts() +{ + return myNbParts; +} + +inline void ShapeUpgrade_FaceDivideArea::SetSplittingByNumber(const Standard_Boolean theIsSplittingByNumber) +{ + myIsSplittingByNumber = theIsSplittingByNumber; +} + +inline void ShapeUpgrade_FaceDivideArea::SetNumbersUVSplits(const Standard_Integer theNbUsplits, + const Standard_Integer theNbVsplits) +{ + myUnbSplit = theNbUsplits; + myVnbSplit = theNbVsplits; + if (myUnbSplit > 0 && myVnbSplit > 0) + myNbParts = myUnbSplit * myVnbSplit; +} diff --git a/src/ShapeUpgrade/ShapeUpgrade_ShapeDivideArea.cxx b/src/ShapeUpgrade/ShapeUpgrade_ShapeDivideArea.cxx index 2cb65e3191..0e9ac2917e 100644 --- a/src/ShapeUpgrade/ShapeUpgrade_ShapeDivideArea.cxx +++ b/src/ShapeUpgrade/ShapeUpgrade_ShapeDivideArea.cxx @@ -26,6 +26,9 @@ ShapeUpgrade_ShapeDivideArea::ShapeUpgrade_ShapeDivideArea(): ShapeUpgrade_ShapeDivide() { myMaxArea = Precision::Infinite(); + myNbParts = 0; + myUnbSplit = myVnbSplit = -1; + myIsSplittingByNumber = Standard_False; } //======================================================================= @@ -38,6 +41,9 @@ ShapeUpgrade_ShapeDivideArea::ShapeUpgrade_ShapeDivideArea(const TopoDS_Shape& S { myMaxArea = Precision::Infinite(); + myNbParts = 0; + myUnbSplit = myVnbSplit = -1; + myIsSplittingByNumber = Standard_False; } //======================================================================= @@ -49,6 +55,9 @@ ShapeUpgrade_ShapeDivideArea::ShapeUpgrade_ShapeDivideArea(const TopoDS_Shape& S { Handle(ShapeUpgrade_FaceDivideArea) aFaceTool = new ShapeUpgrade_FaceDivideArea; aFaceTool->MaxArea() = myMaxArea; + aFaceTool->NbParts() = myNbParts; + aFaceTool->SetNumbersUVSplits (myUnbSplit, myVnbSplit); + aFaceTool->SetSplittingByNumber (myIsSplittingByNumber); return aFaceTool; } diff --git a/src/ShapeUpgrade/ShapeUpgrade_ShapeDivideArea.hxx b/src/ShapeUpgrade/ShapeUpgrade_ShapeDivideArea.hxx index cf0b13674b..18aeacc506 100644 --- a/src/ShapeUpgrade/ShapeUpgrade_ShapeDivideArea.hxx +++ b/src/ShapeUpgrade/ShapeUpgrade_ShapeDivideArea.hxx @@ -41,7 +41,20 @@ public: //! Set max area allowed for faces Standard_Real& MaxArea(); - + //! Set number of parts expected + //! for the case of splitting by number + Standard_Integer& NbParts(); + + //! Set fixed numbers of splits in U and V directions. + //! Only for "Splitting By Numbers" mode + void SetNumbersUVSplits(const Standard_Integer theNbUsplits, + const Standard_Integer theNbVsplits); + + //! Set splitting mode + //! If the mode is "splitting by number", + //! the face is splitted approximately into parts, + //! the parts are similar to squares in 2D. + void SetSplittingByNumber(const Standard_Boolean theIsSplittingByNumber); protected: @@ -57,8 +70,11 @@ private: - Standard_Real myMaxArea; - + Standard_Real myMaxArea; + Standard_Integer myNbParts; + Standard_Integer myUnbSplit; + Standard_Integer myVnbSplit; + Standard_Boolean myIsSplittingByNumber; }; diff --git a/src/ShapeUpgrade/ShapeUpgrade_ShapeDivideArea.lxx b/src/ShapeUpgrade/ShapeUpgrade_ShapeDivideArea.lxx index a3340b0c13..fb1230d8bd 100644 --- a/src/ShapeUpgrade/ShapeUpgrade_ShapeDivideArea.lxx +++ b/src/ShapeUpgrade/ShapeUpgrade_ShapeDivideArea.lxx @@ -16,4 +16,25 @@ inline Standard_Real& ShapeUpgrade_ShapeDivideArea::MaxArea() return myMaxArea; } +inline Standard_Integer& ShapeUpgrade_ShapeDivideArea::NbParts() +{ + return myNbParts; +} + +inline void ShapeUpgrade_ShapeDivideArea::SetSplittingByNumber(const Standard_Boolean theIsSplittingByNumber) +{ + myIsSplittingByNumber = theIsSplittingByNumber; + if (myIsSplittingByNumber) + myMaxArea = -1; +} +inline void ShapeUpgrade_ShapeDivideArea::SetNumbersUVSplits(const Standard_Integer theNbUsplits, + const Standard_Integer theNbVsplits) +{ + myIsSplittingByNumber = Standard_True; + myMaxArea = -1; + myUnbSplit = theNbUsplits; + myVnbSplit = theNbVsplits; + if (myUnbSplit > 0 && myVnbSplit > 0) + myNbParts = myUnbSplit * myVnbSplit; +} diff --git a/src/ShapeUpgrade/ShapeUpgrade_SplitSurface.cxx b/src/ShapeUpgrade/ShapeUpgrade_SplitSurface.cxx index f5b5180ac4..9bac8b4458 100644 --- a/src/ShapeUpgrade/ShapeUpgrade_SplitSurface.cxx +++ b/src/ShapeUpgrade/ShapeUpgrade_SplitSurface.cxx @@ -35,6 +35,10 @@ #include #include #include +#include +#include +#include +#include IMPLEMENT_STANDARD_RTTIEXT(ShapeUpgrade_SplitSurface,Standard_Transient) @@ -79,8 +83,10 @@ void ShapeUpgrade_SplitSurface::Init(const Handle(Geom_Surface)& S) //purpose : //======================================================================= -void ShapeUpgrade_SplitSurface::Init(const Handle(Geom_Surface)& S, const Standard_Real UFirst,const Standard_Real ULast, - const Standard_Real VFirst, const Standard_Real VLast) +void ShapeUpgrade_SplitSurface::Init(const Handle(Geom_Surface)& S, + const Standard_Real UFirst, const Standard_Real ULast, + const Standard_Real VFirst, const Standard_Real VLast, + const Standard_Real theArea) { myStatus = ShapeExtend::EncodeStatus (ShapeExtend_OK); @@ -92,6 +98,8 @@ void ShapeUpgrade_SplitSurface::Init(const Handle(Geom_Surface)& S, const Standa myNbResultingRow =1; myNbResultingCol =1; + myArea = theArea; + Standard_Real U1,U2,V1,V2; mySurface->Bounds(U1,U2,V1,V2); Standard_Real precision = Precision::PConfusion(); @@ -116,6 +124,24 @@ void ShapeUpgrade_SplitSurface::Init(const Handle(Geom_Surface)& S, const Standa VF = Max(V1,VFirst); VL = Min(V2,VLast); } + + if (myArea != 0.) + { + // is set and will be used with and + //in further computations + Standard_Real Umid = (UF + UL)/2, Vmid = (VF + VL)/2; + Handle (Geom_RectangularTrimmedSurface) aTrSurf = + new Geom_RectangularTrimmedSurface (mySurface, UF, UL, VF, VL); + Handle(Geom_Curve) anUiso = aTrSurf->UIso (Umid); + Handle(Geom_Curve) aViso = aTrSurf->VIso (Vmid); + TopoDS_Edge anEdgeUiso = BRepLib_MakeEdge (anUiso); + TopoDS_Edge anEdgeViso = BRepLib_MakeEdge (aViso); + GProp_GProps aGprop1, aGprop2; + BRepGProp::LinearProperties (anEdgeViso, aGprop1); + myUsize = aGprop1.Mass(); + BRepGProp::LinearProperties (anEdgeUiso, aGprop2); + myVsize = aGprop2.Mass(); + } if(UL-UF < precision) { Standard_Real p2 = precision/2.; diff --git a/src/ShapeUpgrade/ShapeUpgrade_SplitSurface.hxx b/src/ShapeUpgrade/ShapeUpgrade_SplitSurface.hxx index 15c8f80f65..61f726b145 100644 --- a/src/ShapeUpgrade/ShapeUpgrade_SplitSurface.hxx +++ b/src/ShapeUpgrade/ShapeUpgrade_SplitSurface.hxx @@ -49,7 +49,10 @@ public: Standard_EXPORT void Init (const Handle(Geom_Surface)& S); //! Initializes with single supporting surface with bounding parameters. - Standard_EXPORT void Init (const Handle(Geom_Surface)& S, const Standard_Real UFirst, const Standard_Real ULast, const Standard_Real VFirst, const Standard_Real VLast); + Standard_EXPORT void Init (const Handle(Geom_Surface)& S, + const Standard_Real UFirst, const Standard_Real ULast, + const Standard_Real VFirst, const Standard_Real VLast, + const Standard_Real theArea = 0.); //! Sets U parameters where splitting has to be done Standard_EXPORT void SetUSplitValues (const Handle(TColStd_HSequenceOfReal)& UValues); @@ -109,6 +112,9 @@ protected: Handle(Geom_Surface) mySurface; Standard_Integer myStatus; Handle(ShapeExtend_CompositeSurface) myResSurfaces; + Standard_Real myArea; + Standard_Real myUsize; + Standard_Real myVsize; private: diff --git a/src/ShapeUpgrade/ShapeUpgrade_SplitSurfaceArea.cxx b/src/ShapeUpgrade/ShapeUpgrade_SplitSurfaceArea.cxx index c746b9d2f0..72941c2bcb 100644 --- a/src/ShapeUpgrade/ShapeUpgrade_SplitSurfaceArea.cxx +++ b/src/ShapeUpgrade/ShapeUpgrade_SplitSurfaceArea.cxx @@ -26,7 +26,9 @@ IMPLEMENT_STANDARD_RTTIEXT(ShapeUpgrade_SplitSurfaceArea,ShapeUpgrade_SplitSurfa ShapeUpgrade_SplitSurfaceArea::ShapeUpgrade_SplitSurfaceArea(): ShapeUpgrade_SplitSurface() { - myNbParts =1; + myNbParts = 1; + myUnbSplit = myVnbSplit = -1; + myIsSplittingIntoSquares = Standard_False; } //======================================================================= @@ -52,12 +54,42 @@ ShapeUpgrade_SplitSurfaceArea::ShapeUpgrade_SplitSurfaceArea(): Standard_Real aNbUV = aUSize/aVSize; Handle(TColStd_HSequenceOfReal) aFirstSplit = (aNbUV <1. ? myVSplitValues : myUSplitValues); Handle(TColStd_HSequenceOfReal) aSecondSplit = (aNbUV <1. ? myUSplitValues : myVSplitValues); + Standard_Boolean anIsUFirst = (aNbUV > 1.); if(aNbUV<1) aNbUV = 1./aNbUV; - - Standard_Integer nbSplitF = (aNbUV >= myNbParts ? myNbParts : RealToInt(ceil(sqrt(myNbParts*ceil(aNbUV))))); - Standard_Integer nbSplitS = (aNbUV >= myNbParts ? 0 : RealToInt(ceil((Standard_Real)myNbParts/(Standard_Real)nbSplitF))); - if(nbSplitS ==1) + + Standard_Boolean anIsFixedUVnbSplits = (myUnbSplit > 0 && myVnbSplit > 0); + Standard_Integer nbSplitF, nbSplitS; + if (myIsSplittingIntoSquares && myNbParts > 0) + { + if (!anIsFixedUVnbSplits) //(myUnbSplit <= 0 || myVnbSplit <= 0) + { + Standard_Real aSquareSize = Sqrt (myArea / myNbParts); + myUnbSplit = (Standard_Integer)(myUsize / aSquareSize); + myVnbSplit = (Standard_Integer)(myVsize / aSquareSize); + if (myUnbSplit == 0) + myUnbSplit = 1; + if (myVnbSplit == 0) + myVnbSplit = 1; + } + + if (anIsUFirst) + { + nbSplitF = myUnbSplit; + nbSplitS = myVnbSplit; + } + else + { + nbSplitF = myVnbSplit; + nbSplitS = myUnbSplit; + } + } + else + { + nbSplitF = (aNbUV >= myNbParts ? myNbParts : RealToInt(ceil(sqrt(myNbParts*ceil(aNbUV))))); + nbSplitS = (aNbUV >= myNbParts ? 0 : RealToInt(ceil((Standard_Real)myNbParts/(Standard_Real)nbSplitF))); + } + if(nbSplitS ==1 && !anIsFixedUVnbSplits) nbSplitS++; if(!nbSplitF) return; diff --git a/src/ShapeUpgrade/ShapeUpgrade_SplitSurfaceArea.hxx b/src/ShapeUpgrade/ShapeUpgrade_SplitSurfaceArea.hxx index 96eafcfe24..bbc2561ce1 100644 --- a/src/ShapeUpgrade/ShapeUpgrade_SplitSurfaceArea.hxx +++ b/src/ShapeUpgrade/ShapeUpgrade_SplitSurfaceArea.hxx @@ -40,6 +40,17 @@ public: //! Set number of split for surfaces Standard_Integer& NbParts(); + //! Set splitting mode + //! If the mode is "splitting into squares", + //! the face is splitted approximately into parts, + //! the parts are similar to squares in 2D. + void SetSplittingIntoSquares(const Standard_Boolean theIsSplittingIntoSquares); + + //! Set fixed numbers of splits in U and V directions. + //! Only for "Splitting Into Squares" mode + void SetNumbersUVSplits(const Standard_Integer theNbUsplits, + const Standard_Integer theNbVsplits); + Standard_EXPORT virtual void Compute (const Standard_Boolean Segment = Standard_True) Standard_OVERRIDE; @@ -56,6 +67,9 @@ private: Standard_Integer myNbParts; + Standard_Integer myUnbSplit; + Standard_Integer myVnbSplit; + Standard_Boolean myIsSplittingIntoSquares; }; diff --git a/src/ShapeUpgrade/ShapeUpgrade_SplitSurfaceArea.lxx b/src/ShapeUpgrade/ShapeUpgrade_SplitSurfaceArea.lxx index 2127f5373d..b43390f4a7 100644 --- a/src/ShapeUpgrade/ShapeUpgrade_SplitSurfaceArea.lxx +++ b/src/ShapeUpgrade/ShapeUpgrade_SplitSurfaceArea.lxx @@ -16,4 +16,16 @@ inline Standard_Integer& ShapeUpgrade_SplitSurfaceArea::NbParts() return myNbParts; } +inline void ShapeUpgrade_SplitSurfaceArea::SetSplittingIntoSquares(const Standard_Boolean theIsSplittingIntoSquares) +{ + myIsSplittingIntoSquares = theIsSplittingIntoSquares; +} +inline void ShapeUpgrade_SplitSurfaceArea::SetNumbersUVSplits(const Standard_Integer theNbUsplits, + const Standard_Integer theNbVsplits) +{ + myUnbSplit = theNbUsplits; + myVnbSplit = theNbVsplits; + if (myUnbSplit > 0 && myVnbSplit > 0) + myNbParts = myUnbSplit * myVnbSplit; +} diff --git a/tests/heal/grids.list b/tests/heal/grids.list index 53e9a0af1e..b5f90d47aa 100644 --- a/tests/heal/grids.list +++ b/tests/heal/grids.list @@ -23,4 +23,6 @@ 023 unify_same_domain 024 same_parameter_locked 025 update_tolerance_locked -026 checkshape \ No newline at end of file +026 checkshape +027 split_number +028 split_two_numbers \ No newline at end of file diff --git a/tests/heal/split_number/A1 b/tests/heal/split_number/A1 new file mode 100644 index 0000000000..26e78ce2ba --- /dev/null +++ b/tests/heal/split_number/A1 @@ -0,0 +1,8 @@ +psphere a 10 0 90 +fit +explode a f + +DT_SplitByNumber result a_1 10 + +checknbshapes result -t -face 10 + diff --git a/tests/heal/split_number/A2 b/tests/heal/split_number/A2 new file mode 100644 index 0000000000..30afecb059 --- /dev/null +++ b/tests/heal/split_number/A2 @@ -0,0 +1,8 @@ +psphere a 10 0 90 +fit +explode a f + +DT_SplitByNumber result a_1 100 + +checknbshapes result -t -face 102 + diff --git a/tests/heal/split_number/A3 b/tests/heal/split_number/A3 new file mode 100644 index 0000000000..f1aa41dda1 --- /dev/null +++ b/tests/heal/split_number/A3 @@ -0,0 +1,10 @@ +psphere a 10 0 90 +pcylinder cc 4 15 +ttranslate cc 0 -5 0 +bcut b a cc +explode b f + +DT_SplitByNumber result b_1 10 + +checknbshapes result -t -face 10 + diff --git a/tests/heal/split_number/A4 b/tests/heal/split_number/A4 new file mode 100644 index 0000000000..70250732a1 --- /dev/null +++ b/tests/heal/split_number/A4 @@ -0,0 +1,10 @@ +psphere a 10 0 90 +pcylinder cc 4 15 +ttranslate cc 0 -5 0 +bcut b a cc +explode b f + +DT_SplitByNumber result b_1 100 + +checknbshapes result -t -face 101 + diff --git a/tests/heal/split_number/A5 b/tests/heal/split_number/A5 new file mode 100644 index 0000000000..4847793123 --- /dev/null +++ b/tests/heal/split_number/A5 @@ -0,0 +1,8 @@ +psphere a 10 0 90 90 +trotate a 0 0 0 0 0 1 -90 +explode a f + +DT_SplitByNumber result a_1 10 + +checknbshapes result -t -face 8 + diff --git a/tests/heal/split_number/A6 b/tests/heal/split_number/A6 new file mode 100644 index 0000000000..633c45ca81 --- /dev/null +++ b/tests/heal/split_number/A6 @@ -0,0 +1,8 @@ +psphere a 10 0 90 90 +trotate a 0 0 0 0 0 1 -90 +explode a f + +DT_SplitByNumber result a_1 100 + +checknbshapes result -t -face 96 + diff --git a/tests/heal/split_number/A7 b/tests/heal/split_number/A7 new file mode 100644 index 0000000000..12a1b0d87a --- /dev/null +++ b/tests/heal/split_number/A7 @@ -0,0 +1,8 @@ +psphere a 10 +fit +explode a f + +DT_SplitByNumber result a_1 10 + +checknbshapes result -t -face 10 + diff --git a/tests/heal/split_number/A8 b/tests/heal/split_number/A8 new file mode 100644 index 0000000000..a618014d60 --- /dev/null +++ b/tests/heal/split_number/A8 @@ -0,0 +1,8 @@ +psphere a 10 +fit +explode a f + +DT_SplitByNumber result a_1 100 + +checknbshapes result -t -face 136 + diff --git a/tests/heal/split_number/B1 b/tests/heal/split_number/B1 new file mode 100644 index 0000000000..662f33a9f6 --- /dev/null +++ b/tests/heal/split_number/B1 @@ -0,0 +1,7 @@ +restore [locate_data_file HOMAG_004.brep] a +explode a f + +DT_SplitByNumber result a_4 10 + +checknbshapes result -t -face 9 + diff --git a/tests/heal/split_number/B2 b/tests/heal/split_number/B2 new file mode 100644 index 0000000000..3d828ece72 --- /dev/null +++ b/tests/heal/split_number/B2 @@ -0,0 +1,7 @@ +restore [locate_data_file HOMAG_004.brep] a +explode a f + +DT_SplitByNumber result a_4 100 + +checknbshapes result -t -face 106 + diff --git a/tests/heal/split_number/B3 b/tests/heal/split_number/B3 new file mode 100644 index 0000000000..0319e0481b --- /dev/null +++ b/tests/heal/split_number/B3 @@ -0,0 +1,12 @@ +restore [locate_data_file HOMAG_004.brep] a +explode a f +pcylinder cc 60 30 +explode cc f +ttranslate cc_1 100 100 0 +bcut b a_4 cc_1 +explode b + +DT_SplitByNumber result b_1 10 + +checknbshapes result -t -face 15 + diff --git a/tests/heal/split_number/B4 b/tests/heal/split_number/B4 new file mode 100644 index 0000000000..c995334fa4 --- /dev/null +++ b/tests/heal/split_number/B4 @@ -0,0 +1,12 @@ +restore [locate_data_file HOMAG_004.brep] a +explode a f +pcylinder cc 60 30 +explode cc f +ttranslate cc_1 100 100 0 +bcut b a_4 cc_1 +explode b + +DT_SplitByNumber result b_1 100 + +checknbshapes result -t -face 125 + diff --git a/tests/heal/split_number/B5 b/tests/heal/split_number/B5 new file mode 100644 index 0000000000..a5ad2b4d31 --- /dev/null +++ b/tests/heal/split_number/B5 @@ -0,0 +1,12 @@ +restore [locate_data_file HOMAG_004.brep] a +explode a f +pcylinder cc 5 30 +explode cc f +ttranslate cc_1 100 100 0 +bcut b a_4 cc_1 +explode b + +DT_SplitByNumber result b_1 10 + +checknbshapes result -t -face 9 + diff --git a/tests/heal/split_number/B6 b/tests/heal/split_number/B6 new file mode 100644 index 0000000000..a922f3311e --- /dev/null +++ b/tests/heal/split_number/B6 @@ -0,0 +1,12 @@ +restore [locate_data_file HOMAG_004.brep] a +explode a f +pcylinder cc 5 30 +explode cc f +ttranslate cc_1 100 100 0 +bcut b a_4 cc_1 +explode b + +DT_SplitByNumber result b_1 100 + +checknbshapes result -t -face 106 + diff --git a/tests/heal/split_number/C1 b/tests/heal/split_number/C1 new file mode 100644 index 0000000000..91d6b12128 --- /dev/null +++ b/tests/heal/split_number/C1 @@ -0,0 +1,7 @@ +polyline a 0 0 0 10 0 0 2 5 0 0 0 0 +mkplane a a + +DT_SplitByNumber result a 10 + +checknbshapes result -t -face 14 + diff --git a/tests/heal/split_number/C2 b/tests/heal/split_number/C2 new file mode 100644 index 0000000000..f206d6f780 --- /dev/null +++ b/tests/heal/split_number/C2 @@ -0,0 +1,7 @@ +polyline a 0 0 0 10 0 0 2 5 0 0 0 0 +mkplane a a + +DT_SplitByNumber result a 100 + +checknbshapes result -t -face 118 + diff --git a/tests/heal/split_number/D1 b/tests/heal/split_number/D1 new file mode 100644 index 0000000000..3f524dce77 --- /dev/null +++ b/tests/heal/split_number/D1 @@ -0,0 +1,13 @@ +pcylinder a 10 50 +plane pp -20 0 10 1 0 0 +pcylinder b1 pp 3 40 +plane pp 0 -20 30 0 1 0 +pcylinder b2 pp 5 40 +bcut a a b1 +bcut a a b2 +explode a f + +DT_SplitByNumber result a_1 10 + +checknbshapes result -t -face 6 + diff --git a/tests/heal/split_number/D2 b/tests/heal/split_number/D2 new file mode 100644 index 0000000000..3b040fb05b --- /dev/null +++ b/tests/heal/split_number/D2 @@ -0,0 +1,13 @@ +pcylinder a 10 50 +plane pp -20 0 10 1 0 0 +pcylinder b1 pp 3 40 +plane pp 0 -20 30 0 1 0 +pcylinder b2 pp 5 40 +bcut a a b1 +bcut a a b2 +explode a f + +DT_SplitByNumber result a_1 100 + +checknbshapes result -t -face 99 + diff --git a/tests/heal/split_number/end b/tests/heal/split_number/end new file mode 100644 index 0000000000..245dc21f94 --- /dev/null +++ b/tests/heal/split_number/end @@ -0,0 +1 @@ +puts [checkshape result] diff --git a/tests/heal/split_two_numbers/A1 b/tests/heal/split_two_numbers/A1 new file mode 100644 index 0000000000..bc7a19331d --- /dev/null +++ b/tests/heal/split_two_numbers/A1 @@ -0,0 +1,8 @@ +psphere a 10 0 90 +fit +explode a f + +DT_SplitByNumber result a_1 3 5 + +checknbshapes result -t -face 15 + diff --git a/tests/heal/split_two_numbers/A2 b/tests/heal/split_two_numbers/A2 new file mode 100644 index 0000000000..73654c696c --- /dev/null +++ b/tests/heal/split_two_numbers/A2 @@ -0,0 +1,8 @@ +psphere a 10 0 90 +fit +explode a f + +DT_SplitByNumber result a_1 1 5 + +checknbshapes result -t -face 5 + diff --git a/tests/heal/split_two_numbers/A3 b/tests/heal/split_two_numbers/A3 new file mode 100644 index 0000000000..1d55b31b84 --- /dev/null +++ b/tests/heal/split_two_numbers/A3 @@ -0,0 +1,8 @@ +psphere a 10 0 90 +fit +explode a f + +DT_SplitByNumber result a_1 5 1 + +checknbshapes result -t -face 5 + diff --git a/tests/heal/split_two_numbers/A4 b/tests/heal/split_two_numbers/A4 new file mode 100644 index 0000000000..5cf785ee02 --- /dev/null +++ b/tests/heal/split_two_numbers/A4 @@ -0,0 +1,10 @@ +psphere a 10 0 90 +pcylinder cc 4 15 +ttranslate cc 0 -5 0 +bcut b a cc +explode b f + +DT_SplitByNumber result b_1 3 5 + +checknbshapes result -t -face 16 + diff --git a/tests/heal/split_two_numbers/B1 b/tests/heal/split_two_numbers/B1 new file mode 100644 index 0000000000..544226b199 --- /dev/null +++ b/tests/heal/split_two_numbers/B1 @@ -0,0 +1,7 @@ +restore [locate_data_file HOMAG_004.brep] a +explode a f + +DT_SplitByNumber result a_4 3 5 + +checknbshapes result -t -face 15 + diff --git a/tests/heal/split_two_numbers/B2 b/tests/heal/split_two_numbers/B2 new file mode 100644 index 0000000000..de83038cd6 --- /dev/null +++ b/tests/heal/split_two_numbers/B2 @@ -0,0 +1,7 @@ +restore [locate_data_file HOMAG_004.brep] a +explode a f + +DT_SplitByNumber result a_4 1 5 + +checknbshapes result -t -face 5 + diff --git a/tests/heal/split_two_numbers/B3 b/tests/heal/split_two_numbers/B3 new file mode 100644 index 0000000000..3ac928b193 --- /dev/null +++ b/tests/heal/split_two_numbers/B3 @@ -0,0 +1,7 @@ +restore [locate_data_file HOMAG_004.brep] a +explode a f + +DT_SplitByNumber result a_4 5 1 + +checknbshapes result -t -face 5 + diff --git a/tests/heal/split_two_numbers/B4 b/tests/heal/split_two_numbers/B4 new file mode 100644 index 0000000000..475935cd6f --- /dev/null +++ b/tests/heal/split_two_numbers/B4 @@ -0,0 +1,12 @@ +restore [locate_data_file HOMAG_004.brep] a +explode a f +pcylinder cc 60 30 +explode cc f +ttranslate cc_1 100 100 0 +bcut b a_4 cc_1 +explode b + +DT_SplitByNumber result b_1 3 5 + +checknbshapes result -t -face 14 + diff --git a/tests/heal/split_two_numbers/end b/tests/heal/split_two_numbers/end new file mode 100644 index 0000000000..245dc21f94 --- /dev/null +++ b/tests/heal/split_two_numbers/end @@ -0,0 +1 @@ +puts [checkshape result] From a0ffd4a521eab428c2a808e4dfd870bd6895b4fd Mon Sep 17 00:00:00 2001 From: akaftasev Date: Wed, 29 Jun 2022 10:32:52 +0300 Subject: [PATCH 322/639] 0032445: BRepOffsetAPI_MakePipeShell crash when using -DT mode and DT_ShapeDivide on the spine Added test case --- tests/bugs/modalg_7/bug32445 | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 tests/bugs/modalg_7/bug32445 diff --git a/tests/bugs/modalg_7/bug32445 b/tests/bugs/modalg_7/bug32445 new file mode 100644 index 0000000000..984f5f70f5 --- /dev/null +++ b/tests/bugs/modalg_7/bug32445 @@ -0,0 +1,28 @@ +puts "============================================" +puts "0032445: BRepOffsetAPI_MakePipeShell crash when using -DT mode and DT_ShapeDivide on the spine" +puts "============================================" +puts "" + +restore [locate_data_file bug32445_spine.brep] s +restore [locate_data_file bug32445_profile_1.brep] p1 +restore [locate_data_file bug32445_profile_2.brep] p2 +restore [locate_data_file bug32445_profile_3.brep] p3 +restore [locate_data_file bug32445_profile_4.brep] p4 +restore [locate_data_file bug32445_profile_5.brep] p5 +restore [locate_data_file bug32445_profile_6.brep] p6 + +DT_ShapeDivide s s 0.01 + +mksweep s +setsweep -DT +addsweep p1 +addsweep p2 +addsweep p3 +addsweep p4 +addsweep p5 +addsweep p6 + +buildsweep r -C -S + +checkshape r +checkview -display r -2d -path ${imagedir}/${test_image}.png From b284dc42dc5c9e8270b0d8052c4a7964fa990ab1 Mon Sep 17 00:00:00 2001 From: akaftasev Date: Wed, 29 Jun 2022 10:33:37 +0300 Subject: [PATCH 323/639] 0032446: BRepOffsetAPI_MakePipeShell crash when using -DT mode and DT_ShapeDivide on the spine Added test case --- tests/bugs/modalg_7/bug32446 | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 tests/bugs/modalg_7/bug32446 diff --git a/tests/bugs/modalg_7/bug32446 b/tests/bugs/modalg_7/bug32446 new file mode 100644 index 0000000000..a7921fb54a --- /dev/null +++ b/tests/bugs/modalg_7/bug32446 @@ -0,0 +1,28 @@ +puts "============================================" +puts "0032446: BRepOffsetAPI_MakePipeShell crash when using -DT mode and DT_ShapeDivide on the spine" +puts "============================================" +puts "" + +restore [locate_data_file bug32446_spine.brep] s +restore [locate_data_file bug32446_profile_1.brep] p1 +restore [locate_data_file bug32446_profile_2.brep] p2 +restore [locate_data_file bug32446_profile_3.brep] p3 +restore [locate_data_file bug32446_profile_4.brep] p4 +restore [locate_data_file bug32446_profile_5.brep] p5 +restore [locate_data_file bug32446_profile_6.brep] p6 + +DT_ShapeDivide s s 0.05 + +mksweep s +setsweep -DT +addsweep p1 +addsweep p2 +addsweep p3 +addsweep p4 +addsweep p5 +addsweep p6 + +buildsweep r -C -S + +checkshape r +checkview -display r -2d -path ${imagedir}/${test_image}.png From ca1491f88b7610968b0c89def35d10bc5f788acb Mon Sep 17 00:00:00 2001 From: mgerus Date: Wed, 29 Jun 2022 09:27:09 +0300 Subject: [PATCH 324/639] 0030398: Modeling Algorithms - thrusection produces twisted solid Change FirstBary to PrevBary to correct Offset calculation relative prev wire instead of first wire --- src/BRepFill/BRepFill_CompatibleWires.cxx | 8 +++++--- tests/bugs/modalg_7/bug30398 | 14 ++++++++++++++ 2 files changed, 19 insertions(+), 3 deletions(-) create mode 100644 tests/bugs/modalg_7/bug30398 diff --git a/src/BRepFill/BRepFill_CompatibleWires.cxx b/src/BRepFill/BRepFill_CompatibleWires.cxx index 13212c52a1..ebb01adf79 100644 --- a/src/BRepFill/BRepFill_CompatibleWires.cxx +++ b/src/BRepFill/BRepFill_CompatibleWires.cxx @@ -1585,7 +1585,7 @@ void BRepFill_CompatibleWires::ComputeOrigin(const Standard_Boolean /*polar*/ ) NbSamples = 4; gp_Pln FirstPlane; PlaneOfWire(TopoDS::Wire(myWork(ideb)), FirstPlane); - gp_Pnt FirstBary = FirstPlane.Location(); + gp_Pnt PrevBary = FirstPlane.Location(); gp_Vec NormalOfFirstPlane = FirstPlane.Axis().Direction(); for (i = ideb+1; i <= ifin; i++) { @@ -1596,10 +1596,10 @@ void BRepFill_CompatibleWires::ComputeOrigin(const Standard_Boolean /*polar*/ ) gp_Pln CurPlane; PlaneOfWire(aWire, CurPlane); gp_Pnt CurBary = CurPlane.Location(); - gp_Vec aVec(FirstBary, CurBary); + gp_Vec aVec(PrevBary, CurBary); gp_Vec anOffsetProj = (aVec * NormalOfFirstPlane) * NormalOfFirstPlane; CurBary.Translate(-anOffsetProj); //projected current bary center - gp_Vec Offset(CurBary, FirstBary); + gp_Vec Offset(CurBary, PrevBary); TopoDS_Wire newwire; BRep_Builder BB; @@ -1804,6 +1804,8 @@ void BRepFill_CompatibleWires::ComputeOrigin(const Standard_Boolean /*polar*/ ) newwire.Closed( Standard_True ); newwire.Orientation( TopAbs_FORWARD ); myWork(i) = newwire; + + PrevBary = CurBary; } #ifdef OCCT_DEBUG_EFV diff --git a/tests/bugs/modalg_7/bug30398 b/tests/bugs/modalg_7/bug30398 new file mode 100644 index 0000000000..9f4804dd32 --- /dev/null +++ b/tests/bugs/modalg_7/bug30398 @@ -0,0 +1,14 @@ +puts "=================================================" +puts "0030398: Modeling Algorithms - thrusection produces twisted solid" +puts "=================================================" +puts "" + +restore [locate_data_file bug30398.brep] a +eval thrusections r 1 1 [explode a w] + +checkshape r +checknbshapes r -shell 1 -face 630 -wire 630 -edge 1260 + +smallview +fit +checkview -screenshot -2d -path ${imagedir}/${test_image}.png \ No newline at end of file From ef4e5e3bf18a219eb309862499ede748b868d320 Mon Sep 17 00:00:00 2001 From: aml Date: Mon, 27 Jun 2022 19:20:41 +0300 Subject: [PATCH 325/639] 0033040: Coding - get rid of unused headers [Storage to TopOpeBRepTool] --- src/SWDRAW/SWDRAW.cxx | 3 - src/SWDRAW/SWDRAW_ShapeAnalysis.cxx | 2 - src/SWDRAW/SWDRAW_ShapeAnalysis.hxx | 1 - src/SWDRAW/SWDRAW_ShapeCustom.cxx | 3 - src/SWDRAW/SWDRAW_ShapeCustom.hxx | 1 - src/SWDRAW/SWDRAW_ShapeExtend.cxx | 1 - src/SWDRAW/SWDRAW_ShapeExtend.hxx | 1 - src/SWDRAW/SWDRAW_ShapeFix.cxx | 10 ---- src/SWDRAW/SWDRAW_ShapeFix.hxx | 1 - src/SWDRAW/SWDRAW_ShapeProcess.hxx | 1 - src/SWDRAW/SWDRAW_ShapeProcessAPI.cxx | 1 - src/SWDRAW/SWDRAW_ShapeProcessAPI.hxx | 1 - src/SWDRAW/SWDRAW_ShapeTool.cxx | 6 -- src/SWDRAW/SWDRAW_ShapeTool.hxx | 1 - src/SWDRAW/SWDRAW_ShapeUpgrade.cxx | 10 ---- src/SWDRAW/SWDRAW_ShapeUpgrade.hxx | 1 - src/Storage/Storage_BaseDriver.cxx | 3 - src/Storage/Storage_BaseDriver.hxx | 3 - src/Storage/Storage_CallBack.cxx | 3 - src/Storage/Storage_Data.cxx | 1 - src/Storage/Storage_Data.hxx | 3 - src/Storage/Storage_HArrayOfCallBack.hxx | 1 - src/Storage/Storage_HArrayOfSchema.hxx | 1 - src/Storage/Storage_HPArray.hxx | 1 - src/Storage/Storage_HSeqOfRoot.hxx | 1 - src/Storage/Storage_HeaderData.hxx | 2 - src/Storage/Storage_InternalData.cxx | 1 - src/Storage/Storage_InternalData.hxx | 1 - src/Storage/Storage_MapOfCallBack.hxx | 1 - src/Storage/Storage_MapOfPers.hxx | 1 - src/Storage/Storage_PType.hxx | 1 - src/Storage/Storage_Root.cxx | 1 - src/Storage/Storage_RootData.cxx | 1 - src/Storage/Storage_RootData.hxx | 1 - src/Storage/Storage_Schema.cxx | 15 ----- src/Storage/Storage_Schema.hxx | 3 - .../Storage_StreamUnknownTypeError.hxx | 1 - src/Storage/Storage_TypeData.cxx | 1 - src/Storage/Storage_TypeData.hxx | 1 - src/Storage/Storage_TypedCallBack.cxx | 1 - src/Sweep/Sweep_NumShape.hxx | 1 - src/Sweep/Sweep_NumShapeIterator.cxx | 2 - src/Sweep/Sweep_NumShapeIterator.hxx | 2 - src/Sweep/Sweep_NumShapeTool.cxx | 1 - src/Sweep/Sweep_NumShapeTool.hxx | 2 - .../TColGeom_HArray1OfBSplineCurve.hxx | 1 - src/TColGeom/TColGeom_HArray1OfCurve.hxx | 1 - src/TColGeom/TColGeom_HArray1OfSurface.hxx | 1 - src/TColGeom/TColGeom_HArray2OfSurface.hxx | 1 - src/TColGeom/TColGeom_HSequenceOfCurve.hxx | 1 - src/TColGeom2d/TColGeom2d_HArray1OfCurve.hxx | 1 - .../TColGeom2d_HSequenceOfBoundedCurve.hxx | 1 - .../TColGeom2d_HSequenceOfCurve.hxx | 1 - src/TColStd/TColStd_Array1OfBoolean.hxx | 1 - src/TColStd/TColStd_Array1OfByte.hxx | 1 - src/TColStd/TColStd_Array1OfCharacter.hxx | 1 - src/TColStd/TColStd_Array1OfReal.hxx | 1 - src/TColStd/TColStd_Array2OfBoolean.hxx | 1 - src/TColStd/TColStd_Array2OfCharacter.hxx | 1 - src/TColStd/TColStd_Array2OfReal.hxx | 1 - .../TColStd_DataMapOfAsciiStringInteger.hxx | 1 - .../TColStd_DataMapOfIntegerInteger.hxx | 1 - src/TColStd/TColStd_DataMapOfIntegerReal.hxx | 1 - .../TColStd_DataMapOfStringInteger.hxx | 2 - .../TColStd_DataMapOfTransientTransient.hxx | 1 - src/TColStd/TColStd_HArray1OfBoolean.hxx | 1 - src/TColStd/TColStd_HArray1OfByte.hxx | 1 - .../TColStd_HArray1OfListOfInteger.hxx | 1 - src/TColStd/TColStd_HArray1OfReal.hxx | 1 - src/TColStd/TColStd_HArray2OfReal.hxx | 1 - src/TColStd/TColStd_HPackedMapOfInteger.cxx | 1 - src/TColStd/TColStd_HPackedMapOfInteger.hxx | 1 - .../TColStd_HSequenceOfHAsciiString.hxx | 1 - .../TColStd_HSequenceOfHExtendedString.hxx | 1 - src/TColStd/TColStd_HSequenceOfReal.hxx | 1 - ...Std_IndexedDataMapOfTransientTransient.hxx | 1 - src/TColStd/TColStd_IndexedMapOfReal.hxx | 1 - src/TColStd/TColStd_ListOfReal.hxx | 1 - src/TColStd/TColStd_MapOfAsciiString.hxx | 1 - src/TColStd/TColStd_MapOfReal.hxx | 1 - src/TColStd/TColStd_MapRealHasher.hxx | 1 - src/TColStd/TColStd_PackedMapOfInteger.cxx | 1 - src/TColStd/TColStd_SequenceOfBoolean.hxx | 1 - src/TColStd/TColStd_SequenceOfReal.hxx | 1 - src/TColgp/TColgp_HArray1OfVec.hxx | 1 - src/TColgp/TColgp_HArray1OfXYZ.hxx | 1 - src/TCollection/TCollection.hxx | 1 - src/TCollection/TCollection_AsciiString.cxx | 1 - src/TCollection/TCollection_AsciiString.hxx | 3 - .../TCollection_ExtendedString.cxx | 6 -- src/TCollection/TCollection_HAsciiString.cxx | 3 - src/TCollection/TCollection_HAsciiString.hxx | 3 - .../TCollection_HExtendedString.cxx | 6 -- .../TCollection_HExtendedString.hxx | 3 - src/TDF/TDF.cxx | 2 - src/TDF/TDF_Attribute.cxx | 2 - src/TDF/TDF_Attribute.hxx | 1 - src/TDF/TDF_AttributeDataMap.hxx | 1 - src/TDF/TDF_AttributeDelta.hxx | 1 - src/TDF/TDF_AttributeDoubleMap.hxx | 1 - src/TDF/TDF_AttributeIterator.hxx | 1 - src/TDF/TDF_ChildIDIterator.cxx | 3 - src/TDF/TDF_ChildIDIterator.hxx | 1 - src/TDF/TDF_ChildIterator.cxx | 1 - src/TDF/TDF_ChildIterator.hxx | 2 - src/TDF/TDF_ClosureMode.hxx | 1 - src/TDF/TDF_ClosureTool.cxx | 4 -- src/TDF/TDF_ComparisonTool.cxx | 8 --- src/TDF/TDF_ComparisonTool.hxx | 1 - src/TDF/TDF_CopyLabel.cxx | 4 -- src/TDF/TDF_CopyLabel.hxx | 1 - src/TDF/TDF_CopyTool.cxx | 9 --- src/TDF/TDF_CopyTool.hxx | 1 - src/TDF/TDF_Data.cxx | 6 -- src/TDF/TDF_Data.hxx | 1 - src/TDF/TDF_DataSet.cxx | 2 - src/TDF/TDF_DataSet.hxx | 1 - src/TDF/TDF_DefaultDeltaOnModification.cxx | 1 - src/TDF/TDF_DefaultDeltaOnRemoval.cxx | 2 - src/TDF/TDF_DefaultDeltaOnRemoval.hxx | 1 - src/TDF/TDF_Delta.cxx | 3 - src/TDF/TDF_Delta.hxx | 1 - src/TDF/TDF_DeltaOnAddition.cxx | 1 - src/TDF/TDF_DeltaOnForget.cxx | 2 - src/TDF/TDF_DeltaOnForget.hxx | 1 - src/TDF/TDF_DeltaOnModification.cxx | 2 - src/TDF/TDF_DeltaOnModification.hxx | 1 - src/TDF/TDF_DeltaOnRemoval.cxx | 2 - src/TDF/TDF_DeltaOnRemoval.hxx | 1 - src/TDF/TDF_DeltaOnResume.hxx | 1 - src/TDF/TDF_GUIDProgIDMap.hxx | 2 - src/TDF/TDF_IDFilter.cxx | 3 - src/TDF/TDF_IDFilter.hxx | 1 - src/TDF/TDF_IDMap.hxx | 1 - src/TDF/TDF_Label.cxx | 5 -- src/TDF/TDF_Label.hxx | 1 - src/TDF/TDF_LabelDataMap.hxx | 1 - src/TDF/TDF_LabelDoubleMap.hxx | 3 - src/TDF/TDF_LabelIndexedMap.hxx | 1 - src/TDF/TDF_Reference.hxx | 1 - src/TDF/TDF_RelocationTable.cxx | 5 -- src/TDF/TDF_RelocationTable.hxx | 2 - src/TDF/TDF_Tool.cxx | 3 - src/TDF/TDF_Tool.hxx | 1 - src/TDF/TDF_Transaction.hxx | 1 - src/TDataStd/TDataStd.cxx | 9 --- src/TDataStd/TDataStd_AsciiString.hxx | 2 - src/TDataStd/TDataStd_BooleanArray.hxx | 2 - src/TDataStd/TDataStd_BooleanList.hxx | 2 - src/TDataStd/TDataStd_ByteArray.hxx | 3 - src/TDataStd/TDataStd_Current.hxx | 1 - src/TDataStd/TDataStd_DataMapOfStringByte.hxx | 2 - ...ataStd_DataMapOfStringHArray1OfInteger.hxx | 1 - .../TDataStd_DataMapOfStringHArray1OfReal.hxx | 1 - src/TDataStd/TDataStd_DataMapOfStringReal.hxx | 2 - .../TDataStd_DataMapOfStringString.hxx | 2 - ...DataStd_DeltaOnModificationOfByteArray.cxx | 2 - ...DataStd_DeltaOnModificationOfByteArray.hxx | 1 - ...td_DeltaOnModificationOfExtStringArray.cxx | 2 - ...td_DeltaOnModificationOfExtStringArray.hxx | 1 - ...TDataStd_DeltaOnModificationOfIntArray.cxx | 2 - ...TDataStd_DeltaOnModificationOfIntArray.hxx | 1 - ...aStd_DeltaOnModificationOfIntPackedMap.cxx | 3 - ...aStd_DeltaOnModificationOfIntPackedMap.hxx | 1 - ...DataStd_DeltaOnModificationOfRealArray.cxx | 2 - ...DataStd_DeltaOnModificationOfRealArray.hxx | 1 - src/TDataStd/TDataStd_Directory.cxx | 2 - src/TDataStd/TDataStd_Expression.hxx | 1 - src/TDataStd/TDataStd_ExtStringArray.hxx | 2 - src/TDataStd/TDataStd_ExtStringList.hxx | 2 - .../TDataStd_HDataMapOfStringByte.hxx | 1 - ...taStd_HDataMapOfStringHArray1OfInteger.hxx | 1 - ...TDataStd_HDataMapOfStringHArray1OfReal.hxx | 1 - .../TDataStd_HDataMapOfStringInteger.hxx | 1 - .../TDataStd_HDataMapOfStringReal.hxx | 1 - .../TDataStd_HDataMapOfStringString.hxx | 1 - src/TDataStd/TDataStd_IntPackedMap.hxx | 1 - src/TDataStd/TDataStd_Integer.hxx | 2 - src/TDataStd/TDataStd_IntegerArray.hxx | 2 - src/TDataStd/TDataStd_IntegerList.hxx | 2 - src/TDataStd/TDataStd_ListOfByte.hxx | 1 - src/TDataStd/TDataStd_NamedData.hxx | 2 - src/TDataStd/TDataStd_NoteBook.cxx | 2 - src/TDataStd/TDataStd_Real.hxx | 2 - src/TDataStd/TDataStd_RealArray.hxx | 2 - src/TDataStd/TDataStd_RealList.hxx | 2 - src/TDataStd/TDataStd_ReferenceArray.hxx | 2 - src/TDataStd/TDataStd_ReferenceList.cxx | 1 - src/TDataStd/TDataStd_ReferenceList.hxx | 2 - src/TDataStd/TDataStd_TreeNode.hxx | 2 - src/TDataStd/TDataStd_UAttribute.hxx | 1 - src/TDataStd/TDataStd_Variable.cxx | 2 - src/TDataStd/TDataStd_Variable.hxx | 2 - src/TDataXtd/TDataXtd_Axis.cxx | 8 --- src/TDataXtd/TDataXtd_Constraint.hxx | 1 - src/TDataXtd/TDataXtd_Geometry.cxx | 7 --- src/TDataXtd/TDataXtd_Geometry.hxx | 1 - src/TDataXtd/TDataXtd_PatternStd.cxx | 2 - src/TDataXtd/TDataXtd_PatternStd.hxx | 1 - src/TDataXtd/TDataXtd_Plane.cxx | 5 -- src/TDataXtd/TDataXtd_Point.cxx | 4 -- src/TDataXtd/TDataXtd_Position.hxx | 1 - src/TDataXtd/TDataXtd_Presentation.cxx | 2 - src/TDataXtd/TDataXtd_Presentation.hxx | 1 - src/TDataXtd/TDataXtd_Shape.cxx | 5 -- src/TDataXtd/TDataXtd_Triangulation.cxx | 1 - src/TDataXtd/TDataXtd_Triangulation.hxx | 2 - src/TDocStd/TDocStd.cxx | 1 - src/TDocStd/TDocStd_Application.cxx | 2 - src/TDocStd/TDocStd_Application.hxx | 3 - src/TDocStd/TDocStd_ApplicationDelta.cxx | 1 - src/TDocStd/TDocStd_ApplicationDelta.hxx | 1 - src/TDocStd/TDocStd_CompoundDelta.hxx | 1 - src/TDocStd/TDocStd_Document.cxx | 3 - src/TDocStd/TDocStd_Document.hxx | 3 - src/TDocStd/TDocStd_Modified.cxx | 1 - src/TDocStd/TDocStd_Modified.hxx | 1 - .../TDocStd_MultiTransactionManager.hxx | 2 - src/TDocStd/TDocStd_PathParser.hxx | 1 - src/TDocStd/TDocStd_XLink.cxx | 3 - src/TDocStd/TDocStd_XLink.hxx | 2 - src/TDocStd/TDocStd_XLinkIterator.cxx | 1 - src/TDocStd/TDocStd_XLinkTool.cxx | 9 --- .../TFunction_DataMapOfGUIDDriver.hxx | 1 - .../TFunction_DataMapOfLabelListOfLabel.hxx | 1 - src/TFunction/TFunction_Driver.cxx | 3 - src/TFunction/TFunction_Driver.hxx | 2 - src/TFunction/TFunction_DriverTable.hxx | 1 - src/TFunction/TFunction_Function.cxx | 4 -- src/TFunction/TFunction_Function.hxx | 1 - src/TFunction/TFunction_GraphNode.cxx | 1 - src/TFunction/TFunction_GraphNode.hxx | 1 - ...TFunction_HArray1OfDataMapOfGUIDDriver.hxx | 1 - src/TFunction/TFunction_IFunction.cxx | 11 ---- src/TFunction/TFunction_IFunction.hxx | 1 - src/TFunction/TFunction_Iterator.cxx | 7 --- src/TFunction/TFunction_Iterator.hxx | 1 - src/TFunction/TFunction_Logbook.cxx | 3 - src/TFunction/TFunction_Logbook.hxx | 1 - src/TFunction/TFunction_Scope.cxx | 2 - src/TFunction/TFunction_Scope.hxx | 1 - src/TNaming/TNaming.cxx | 11 ---- src/TNaming/TNaming.hxx | 1 - src/TNaming/TNaming_CopyShape.cxx | 5 -- .../TNaming_DataMapOfShapeShapesSet.hxx | 1 - src/TNaming/TNaming_DeltaOnModification.cxx | 1 - src/TNaming/TNaming_Identifier.cxx | 2 - src/TNaming/TNaming_Identifier.hxx | 2 - src/TNaming/TNaming_Iterator.hxx | 1 - src/TNaming/TNaming_Localizer.cxx | 11 ---- src/TNaming/TNaming_Localizer.hxx | 1 - src/TNaming/TNaming_MapOfNamedShape.hxx | 1 - src/TNaming/TNaming_Name.cxx | 11 ---- src/TNaming/TNaming_Name.hxx | 1 - src/TNaming/TNaming_NamedShape.cxx | 8 --- src/TNaming/TNaming_NamedShape.hxx | 1 - src/TNaming/TNaming_Naming.cxx | 11 ---- src/TNaming/TNaming_Naming.hxx | 1 - src/TNaming/TNaming_NamingTool.cxx | 1 - src/TNaming/TNaming_NewShapeIterator.hxx | 1 - src/TNaming/TNaming_OldShapeIterator.hxx | 1 - src/TNaming/TNaming_SameShapeIterator.hxx | 1 - src/TNaming/TNaming_Scope.cxx | 1 - src/TNaming/TNaming_Scope.hxx | 1 - src/TNaming/TNaming_Selector.cxx | 3 - src/TNaming/TNaming_Selector.hxx | 1 - src/TNaming/TNaming_ShapesSet.cxx | 1 - src/TNaming/TNaming_ShapesSet.hxx | 2 - src/TNaming/TNaming_Tool.cxx | 8 --- src/TNaming/TNaming_Tool.hxx | 1 - src/TNaming/TNaming_TranslateTool.cxx | 4 -- src/TNaming/TNaming_Translator.cxx | 1 - src/TNaming/TNaming_Translator.hxx | 2 - src/TNaming/TNaming_UsedShapes.cxx | 2 - src/TNaming/TNaming_UsedShapes.hxx | 1 - src/TObj/TObj_Application.cxx | 2 - src/TObj/TObj_Application.hxx | 1 - src/TObj/TObj_Assistant.hxx | 1 - src/TObj/TObj_CheckModel.cxx | 2 - src/TObj/TObj_CheckModel.hxx | 1 - src/TObj/TObj_Common.hxx | 4 -- src/TObj/TObj_Model.cxx | 7 --- src/TObj/TObj_Model.hxx | 1 - src/TObj/TObj_ModelIterator.hxx | 1 - src/TObj/TObj_Object.cxx | 1 - src/TObj/TObj_ReferenceIterator.cxx | 1 - src/TObj/TObj_SequenceOfObject.hxx | 2 - src/TObj/TObj_TIntSparseArray.cxx | 1 - src/TObj/TObj_TIntSparseArray.hxx | 1 - src/TObj/TObj_TNameContainer.hxx | 1 - src/TObjDRAW/TObjDRAW.cxx | 6 -- src/TObjDRAW/TObjDRAW.hxx | 1 - src/TopBas/TopBas_TestInterference.hxx | 1 - src/TopCnx/TopCnx_EdgeFaceTransition.cxx | 1 - src/TopCnx/TopCnx_EdgeFaceTransition.hxx | 2 - src/TopExp/TopExp.cxx | 1 - src/TopExp/TopExp.hxx | 1 - src/TopLoc/TopLoc_Datum3D.cxx | 1 - src/TopLoc/TopLoc_ItemLocation.cxx | 1 - src/TopLoc/TopLoc_Location.cxx | 3 - src/TopLoc/TopLoc_Location.hxx | 1 - src/TopLoc/TopLoc_MapOfLocation.hxx | 1 - src/TopLoc/TopLoc_SListNodeOfItemLocation.cxx | 2 - src/TopLoc/TopLoc_SListNodeOfItemLocation.hxx | 1 - src/TopLoc/TopLoc_SListOfItemLocation.hxx | 1 - src/TopOpeBRep/TopOpeBRep_Bipoint.hxx | 1 - src/TopOpeBRep/TopOpeBRep_DSFiller.cxx | 6 -- src/TopOpeBRep/TopOpeBRep_DSFiller.hxx | 1 - src/TopOpeBRep/TopOpeBRep_EdgesFiller.cxx | 2 - src/TopOpeBRep/TopOpeBRep_EdgesFiller.hxx | 3 - .../TopOpeBRep_EdgesIntersector.cxx | 7 --- .../TopOpeBRep_EdgesIntersector.hxx | 2 - .../TopOpeBRep_EdgesIntersector_1.cxx | 8 --- src/TopOpeBRep/TopOpeBRep_FFDumper.cxx | 10 +--- src/TopOpeBRep/TopOpeBRep_FFDumper.hxx | 1 - .../TopOpeBRep_FFTransitionTool.cxx | 8 --- .../TopOpeBRep_FFTransitionTool.hxx | 1 - src/TopOpeBRep/TopOpeBRep_FaceEdgeFiller.cxx | 3 - src/TopOpeBRep/TopOpeBRep_FaceEdgeFiller.hxx | 2 - .../TopOpeBRep_FaceEdgeIntersector.cxx | 2 - .../TopOpeBRep_FaceEdgeIntersector.hxx | 3 - src/TopOpeBRep/TopOpeBRep_FacesFiller.cxx | 10 ---- src/TopOpeBRep/TopOpeBRep_FacesFiller.hxx | 7 --- src/TopOpeBRep/TopOpeBRep_FacesFiller_1.cxx | 12 ---- .../TopOpeBRep_FacesIntersector.cxx | 6 +- .../TopOpeBRep_FacesIntersector.hxx | 1 - src/TopOpeBRep/TopOpeBRep_GeomTool.cxx | 2 - src/TopOpeBRep/TopOpeBRep_GeomTool.hxx | 2 - .../TopOpeBRep_HArray1OfLineInter.hxx | 1 - .../TopOpeBRep_HArray1OfVPointInter.hxx | 1 - src/TopOpeBRep/TopOpeBRep_Hctxee2d.cxx | 5 -- src/TopOpeBRep/TopOpeBRep_Hctxff2d.cxx | 1 - src/TopOpeBRep/TopOpeBRep_LineInter.cxx | 5 -- src/TopOpeBRep/TopOpeBRep_Point2d.cxx | 7 --- src/TopOpeBRep/TopOpeBRep_Point2d.hxx | 2 - src/TopOpeBRep/TopOpeBRep_PointClassifier.cxx | 1 - src/TopOpeBRep/TopOpeBRep_PointGeomTool.cxx | 1 - src/TopOpeBRep/TopOpeBRep_PointGeomTool.hxx | 2 - src/TopOpeBRep/TopOpeBRep_ProcessGR.cxx | 33 ----------- .../TopOpeBRep_ProcessSectionEdges.cxx | 7 --- .../TopOpeBRep_ShapeIntersector.cxx | 11 ---- .../TopOpeBRep_ShapeIntersector.hxx | 3 - .../TopOpeBRep_ShapeIntersector2d.cxx | 6 -- src/TopOpeBRep/TopOpeBRep_ShapeScanner.cxx | 2 - src/TopOpeBRep/TopOpeBRep_ShapeScanner.hxx | 1 - src/TopOpeBRep/TopOpeBRep_VPointInter.cxx | 6 -- src/TopOpeBRep/TopOpeBRep_VPointInter.hxx | 3 - .../TopOpeBRep_VPointInterClassifier.cxx | 2 - .../TopOpeBRep_VPointInterClassifier.hxx | 3 - .../TopOpeBRep_VPointInterIterator.cxx | 1 - .../TopOpeBRep_VPointInterIterator.hxx | 2 - src/TopOpeBRep/TopOpeBRep_WPointInter.cxx | 1 - src/TopOpeBRep/TopOpeBRep_WPointInter.hxx | 2 - .../TopOpeBRep_WPointInterIterator.cxx | 1 - .../TopOpeBRep_WPointInterIterator.hxx | 2 - src/TopOpeBRep/TopOpeBRep_kpart.cxx | 15 ----- src/TopOpeBRep/TopOpeBRep_mergePDS.cxx | 2 - src/TopOpeBRep/TopOpeBRep_sort.cxx | 1 - src/TopOpeBRep/TopOpeBRep_vpr.cxx | 16 ------ src/TopOpeBRep/TopOpeBRep_vprclo.cxx | 15 ----- src/TopOpeBRep/TopOpeBRep_vprdeg.cxx | 16 ------ .../TopOpeBRepBuild_Area1dBuilder.cxx | 7 --- .../TopOpeBRepBuild_Area1dBuilder.hxx | 1 - .../TopOpeBRepBuild_AreaBuilder.cxx | 2 - .../TopOpeBRepBuild_AreaBuilder.hxx | 1 - .../TopOpeBRepBuild_BlockBuilder.cxx | 2 - .../TopOpeBRepBuild_BlockBuilder.hxx | 1 - .../TopOpeBRepBuild_BlockIterator.cxx | 1 - .../TopOpeBRepBuild_BlockIterator.hxx | 1 - .../TopOpeBRepBuild_BuildEdges.cxx | 16 ------ .../TopOpeBRepBuild_BuildFaces.cxx | 15 ----- .../TopOpeBRepBuild_BuildVertices.cxx | 19 ------- .../TopOpeBRepBuild_Builder.cxx | 15 ----- .../TopOpeBRepBuild_Builder.hxx | 2 - .../TopOpeBRepBuild_Builder1.cxx | 2 - .../TopOpeBRepBuild_Builder1.hxx | 4 -- .../TopOpeBRepBuild_Builder1_1.cxx | 28 ---------- .../TopOpeBRepBuild_Builder1_2.cxx | 12 ---- .../TopOpeBRepBuild_BuilderON.cxx | 2 - .../TopOpeBRepBuild_BuilderON.hxx | 1 - .../TopOpeBRepBuild_BuilderON2d.cxx | 2 - .../TopOpeBRepBuild_CompositeClassifier.cxx | 1 - .../TopOpeBRepBuild_CompositeClassifier.hxx | 1 - .../TopOpeBRepBuild_CorrectFace2d.cxx | 1 - .../TopOpeBRepBuild_CorrectFace2d.hxx | 2 - .../TopOpeBRepBuild_EdgeBuilder.cxx | 4 -- .../TopOpeBRepBuild_EdgeBuilder.hxx | 1 - src/TopOpeBRepBuild/TopOpeBRepBuild_End.cxx | 23 -------- src/TopOpeBRepBuild/TopOpeBRepBuild_FREGU.cxx | 25 --------- .../TopOpeBRepBuild_FaceBuilder.cxx | 7 --- .../TopOpeBRepBuild_FaceBuilder.hxx | 2 - .../TopOpeBRepBuild_FuseFace.cxx | 6 -- .../TopOpeBRepBuild_FuseFace.hxx | 2 - src/TopOpeBRepBuild/TopOpeBRepBuild_GIter.hxx | 2 - src/TopOpeBRepBuild/TopOpeBRepBuild_GTool.hxx | 1 - src/TopOpeBRepBuild/TopOpeBRepBuild_GTopo.cxx | 1 - src/TopOpeBRepBuild/TopOpeBRepBuild_GTopo.hxx | 4 -- src/TopOpeBRepBuild/TopOpeBRepBuild_Grid.cxx | 20 ------- .../TopOpeBRepBuild_GridEE.cxx | 20 ------- .../TopOpeBRepBuild_GridFF.cxx | 14 ----- .../TopOpeBRepBuild_GridSS.cxx | 20 ------- .../TopOpeBRepBuild_Griddump.cxx | 56 ++----------------- .../TopOpeBRepBuild_HBuilder.cxx | 3 - .../TopOpeBRepBuild_HBuilder.hxx | 1 - src/TopOpeBRepBuild/TopOpeBRepBuild_KPart.cxx | 20 ------- src/TopOpeBRepBuild/TopOpeBRepBuild_Loop.cxx | 3 - src/TopOpeBRepBuild/TopOpeBRepBuild_Loop.hxx | 1 - .../TopOpeBRepBuild_LoopClassifier.cxx | 1 - .../TopOpeBRepBuild_LoopSet.cxx | 1 - src/TopOpeBRepBuild/TopOpeBRepBuild_Merge.cxx | 17 ------ src/TopOpeBRepBuild/TopOpeBRepBuild_Pave.cxx | 3 - src/TopOpeBRepBuild/TopOpeBRepBuild_Pave.hxx | 2 - .../TopOpeBRepBuild_PaveClassifier.cxx | 1 - .../TopOpeBRepBuild_PaveClassifier.hxx | 2 - .../TopOpeBRepBuild_PaveSet.cxx | 4 -- .../TopOpeBRepBuild_PaveSet.hxx | 3 - src/TopOpeBRepBuild/TopOpeBRepBuild_SREGU.cxx | 22 -------- .../TopOpeBRepBuild_Section.cxx | 19 ------- .../TopOpeBRepBuild_ShapeListOfShape.cxx | 1 - .../TopOpeBRepBuild_ShapeSet.cxx | 1 - .../TopOpeBRepBuild_ShapeSet.hxx | 3 - .../TopOpeBRepBuild_ShellFaceClassifier.cxx | 3 - .../TopOpeBRepBuild_ShellFaceClassifier.hxx | 4 -- .../TopOpeBRepBuild_ShellFaceSet.cxx | 3 - .../TopOpeBRepBuild_ShellFaceSet.hxx | 1 - .../TopOpeBRepBuild_ShellToSolid.cxx | 3 - .../TopOpeBRepBuild_ShellToSolid.hxx | 1 - .../TopOpeBRepBuild_SolidAreaBuilder.hxx | 2 - .../TopOpeBRepBuild_SolidBuilder.cxx | 4 -- .../TopOpeBRepBuild_SolidBuilder.hxx | 2 - src/TopOpeBRepBuild/TopOpeBRepBuild_Tools.cxx | 20 ------- src/TopOpeBRepBuild/TopOpeBRepBuild_Tools.hxx | 3 - .../TopOpeBRepBuild_Tools2d.cxx | 3 - .../TopOpeBRepBuild_Tools2d.hxx | 1 - .../TopOpeBRepBuild_Tools_1.cxx | 13 ----- .../TopOpeBRepBuild_VertexInfo.cxx | 2 - .../TopOpeBRepBuild_VertexInfo.hxx | 2 - .../TopOpeBRepBuild_WireEdgeClassifier.cxx | 16 ------ .../TopOpeBRepBuild_WireEdgeSet.cxx | 5 -- .../TopOpeBRepBuild_WireEdgeSet.hxx | 3 - .../TopOpeBRepBuild_WireToFace.cxx | 3 - .../TopOpeBRepBuild_WireToFace.hxx | 1 - .../TopOpeBRepBuild_fctwes.cxx | 20 ------- src/TopOpeBRepBuild/TopOpeBRepBuild_ffsfs.cxx | 16 ------ .../TopOpeBRepBuild_ffwesk.cxx | 21 ------- src/TopOpeBRepBuild/TopOpeBRepBuild_keep.cxx | 20 ------- .../TopOpeBRepBuild_kpkole.cxx | 24 -------- .../TopOpeBRepBuild_makeedges.cxx | 17 ------ .../TopOpeBRepBuild_makefaces.cxx | 25 --------- .../TopOpeBRepBuild_makesolids.cxx | 24 -------- src/TopOpeBRepBuild/TopOpeBRepBuild_on.cxx | 20 ------- src/TopOpeBRepDS/TopOpeBRepDS.cxx | 1 - src/TopOpeBRepDS/TopOpeBRepDS.hxx | 3 - src/TopOpeBRepDS/TopOpeBRepDS_Association.cxx | 2 - src/TopOpeBRepDS/TopOpeBRepDS_Association.hxx | 1 - src/TopOpeBRepDS/TopOpeBRepDS_BuildTool.cxx | 22 -------- src/TopOpeBRepDS/TopOpeBRepDS_Check.cxx | 6 -- src/TopOpeBRepDS/TopOpeBRepDS_Check.hxx | 1 - src/TopOpeBRepDS/TopOpeBRepDS_Curve.cxx | 1 - src/TopOpeBRepDS/TopOpeBRepDS_Curve.hxx | 3 - src/TopOpeBRepDS/TopOpeBRepDS_CurveData.cxx | 1 - .../TopOpeBRepDS_CurveExplorer.hxx | 3 - .../TopOpeBRepDS_CurveIterator.hxx | 1 - .../TopOpeBRepDS_CurvePointInterference.cxx | 1 - .../TopOpeBRepDS_CurvePointInterference.hxx | 1 - ...ataMapOfInterferenceListOfInterference.hxx | 1 - .../TopOpeBRepDS_DataStructure.cxx | 8 --- .../TopOpeBRepDS_DataStructure.hxx | 2 - .../TopOpeBRepDS_DoubleMapOfIntegerShape.hxx | 2 - src/TopOpeBRepDS/TopOpeBRepDS_Dumper.cxx | 34 ----------- src/TopOpeBRepDS/TopOpeBRepDS_Dumper.hxx | 4 -- src/TopOpeBRepDS/TopOpeBRepDS_EIR.cxx | 1 - src/TopOpeBRepDS/TopOpeBRepDS_EXPORT.cxx | 7 --- .../TopOpeBRepDS_Edge3dInterferenceTool.cxx | 4 -- .../TopOpeBRepDS_Edge3dInterferenceTool.hxx | 2 - .../TopOpeBRepDS_EdgeInterferenceTool.cxx | 1 - .../TopOpeBRepDS_EdgeVertexInterference.cxx | 1 - .../TopOpeBRepDS_EdgeVertexInterference.hxx | 1 - src/TopOpeBRepDS/TopOpeBRepDS_Explorer.cxx | 4 -- src/TopOpeBRepDS/TopOpeBRepDS_Explorer.hxx | 1 - src/TopOpeBRepDS/TopOpeBRepDS_FIR.cxx | 8 --- .../TopOpeBRepDS_FaceEdgeInterference.cxx | 1 - .../TopOpeBRepDS_FaceEdgeInterference.hxx | 1 - .../TopOpeBRepDS_FaceInterferenceTool.cxx | 6 -- .../TopOpeBRepDS_FaceInterferenceTool.hxx | 2 - src/TopOpeBRepDS/TopOpeBRepDS_Filter.cxx | 5 -- .../TopOpeBRepDS_FilterCurveInterferences.cxx | 4 -- .../TopOpeBRepDS_FilterEdgeInterferences.cxx | 6 -- .../TopOpeBRepDS_FilterFaceInterferences.cxx | 8 --- src/TopOpeBRepDS/TopOpeBRepDS_GapFiller.cxx | 4 -- src/TopOpeBRepDS/TopOpeBRepDS_GapFiller.hxx | 1 - src/TopOpeBRepDS/TopOpeBRepDS_GapTool.cxx | 5 -- src/TopOpeBRepDS/TopOpeBRepDS_GapTool.hxx | 2 - ...y1OfDataMapOfIntegerListOfInterference.hxx | 1 - .../TopOpeBRepDS_HDataStructure.cxx | 9 --- .../TopOpeBRepDS_HDataStructure.hxx | 4 -- .../TopOpeBRepDS_Interference.cxx | 3 - .../TopOpeBRepDS_Interference.hxx | 1 - .../TopOpeBRepDS_InterferenceIterator.cxx | 1 - .../TopOpeBRepDS_InterferenceTool.cxx | 4 -- .../TopOpeBRepDS_InterferenceTool.hxx | 2 - .../TopOpeBRepDS_ListOfShapeOn1State.cxx | 1 - .../TopOpeBRepDS_ListOfShapeOn1State.hxx | 1 - .../TopOpeBRepDS_MapOfIntegerShapeData.hxx | 1 - src/TopOpeBRepDS/TopOpeBRepDS_Marker.hxx | 1 - src/TopOpeBRepDS/TopOpeBRepDS_Point.cxx | 1 - src/TopOpeBRepDS/TopOpeBRepDS_Point.hxx | 2 - src/TopOpeBRepDS/TopOpeBRepDS_PointData.cxx | 1 - src/TopOpeBRepDS/TopOpeBRepDS_PointData.hxx | 1 - .../TopOpeBRepDS_PointExplorer.hxx | 3 - .../TopOpeBRepDS_PointIterator.cxx | 1 - .../TopOpeBRepDS_PointIterator.hxx | 2 - .../TopOpeBRepDS_ProcessEdgeInterferences.cxx | 8 --- .../TopOpeBRepDS_ProcessFaceInterferences.cxx | 15 ----- .../TopOpeBRepDS_ProcessInterferencesTool.cxx | 5 -- .../TopOpeBRepDS_ProcessInterferencesTool.hxx | 1 - src/TopOpeBRepDS/TopOpeBRepDS_ShapeData.hxx | 3 - .../TopOpeBRepDS_ShapeShapeInterference.cxx | 2 - .../TopOpeBRepDS_ShapeShapeInterference.hxx | 1 - .../TopOpeBRepDS_ShapeWithState.cxx | 1 - .../TopOpeBRepDS_SolidSurfaceInterference.cxx | 1 - .../TopOpeBRepDS_SolidSurfaceInterference.hxx | 1 - .../TopOpeBRepDS_SurfaceCurveInterference.cxx | 1 - .../TopOpeBRepDS_SurfaceCurveInterference.hxx | 2 - src/TopOpeBRepDS/TopOpeBRepDS_SurfaceData.cxx | 1 - src/TopOpeBRepDS/TopOpeBRepDS_SurfaceData.hxx | 1 - .../TopOpeBRepDS_SurfaceExplorer.hxx | 3 - .../TopOpeBRepDS_SurfaceIterator.cxx | 1 - .../TopOpeBRepDS_SurfaceIterator.hxx | 1 - src/TopOpeBRepDS/TopOpeBRepDS_TKI.cxx | 2 - src/TopOpeBRepDS/TopOpeBRepDS_TKI.hxx | 2 - src/TopOpeBRepDS/TopOpeBRepDS_TOOL.cxx | 5 -- src/TopOpeBRepDS/TopOpeBRepDS_TOOL.hxx | 1 - src/TopOpeBRepDS/TopOpeBRepDS_Transition.cxx | 1 - src/TopOpeBRepDS/TopOpeBRepDS_Transition.hxx | 4 -- src/TopOpeBRepDS/TopOpeBRepDS_funk.cxx | 19 +------ src/TopOpeBRepDS/TopOpeBRepDS_redu.cxx | 3 - src/TopOpeBRepDS/TopOpeBRepDS_repvg.cxx | 6 -- src/TopOpeBRepTool/TopOpeBRepTool.hxx | 1 - src/TopOpeBRepTool/TopOpeBRepTool_2d.cxx | 5 -- .../TopOpeBRepTool_AncestorsTool.cxx | 1 - .../TopOpeBRepTool_AncestorsTool.hxx | 1 - src/TopOpeBRepTool/TopOpeBRepTool_BoxSort.cxx | 4 -- src/TopOpeBRepTool/TopOpeBRepTool_C2DF.cxx | 1 - src/TopOpeBRepTool/TopOpeBRepTool_C2DF.hxx | 2 - src/TopOpeBRepTool/TopOpeBRepTool_CLASSI.cxx | 2 - src/TopOpeBRepTool/TopOpeBRepTool_CLASSI.hxx | 3 - src/TopOpeBRepTool/TopOpeBRepTool_CORRISO.cxx | 6 -- src/TopOpeBRepTool/TopOpeBRepTool_CORRISO.hxx | 4 -- .../TopOpeBRepTool_CurveTool.cxx | 1 - .../TopOpeBRepTool_CurveTool.hxx | 2 - .../TopOpeBRepTool_FuseEdges.cxx | 9 --- .../TopOpeBRepTool_FuseEdges.hxx | 3 - .../TopOpeBRepTool_GEOMETRY.cxx | 1 - .../TopOpeBRepTool_GEOMETRY.hxx | 2 - .../TopOpeBRepTool_GeomTool.hxx | 2 - .../TopOpeBRepTool_HBoxTool.cxx | 2 - .../TopOpeBRepTool_HBoxTool.hxx | 1 - ...epTool_IndexedDataMapOfSolidClassifier.hxx | 1 - src/TopOpeBRepTool/TopOpeBRepTool_PROJECT.cxx | 7 --- src/TopOpeBRepTool/TopOpeBRepTool_PROJECT.hxx | 2 - src/TopOpeBRepTool/TopOpeBRepTool_PURGE.cxx | 10 ---- .../TopOpeBRepTool_PurgeInternalEdges.cxx | 3 - .../TopOpeBRepTool_PurgeInternalEdges.hxx | 2 - src/TopOpeBRepTool/TopOpeBRepTool_REGUS.cxx | 5 -- src/TopOpeBRepTool/TopOpeBRepTool_REGUS.hxx | 2 - src/TopOpeBRepTool/TopOpeBRepTool_REGUW.cxx | 7 --- src/TopOpeBRepTool/TopOpeBRepTool_REGUW.hxx | 3 - .../TopOpeBRepTool_RegularizeW.cxx | 4 +- src/TopOpeBRepTool/TopOpeBRepTool_SC.cxx | 1 + src/TopOpeBRepTool/TopOpeBRepTool_SC.hxx | 2 - .../TopOpeBRepTool_ShapeClassifier.cxx | 4 -- .../TopOpeBRepTool_ShapeClassifier.hxx | 3 - .../TopOpeBRepTool_ShapeTool.cxx | 2 - .../TopOpeBRepTool_ShapeTool.hxx | 2 - .../TopOpeBRepTool_SolidClassifier.cxx | 2 - .../TopOpeBRepTool_SolidClassifier.hxx | 4 -- src/TopOpeBRepTool/TopOpeBRepTool_TOOL.cxx | 3 - src/TopOpeBRepTool/TopOpeBRepTool_TOOL.hxx | 2 - .../TopOpeBRepTool_TOPOLOGY.cxx | 7 --- .../TopOpeBRepTool_TOPOLOGY.hxx | 7 --- src/TopOpeBRepTool/TopOpeBRepTool_box.hxx | 1 - .../TopOpeBRepTool_connexity.cxx | 1 - .../TopOpeBRepTool_connexity.hxx | 1 - src/TopOpeBRepTool/TopOpeBRepTool_face.cxx | 3 - src/TopOpeBRepTool/TopOpeBRepTool_face.hxx | 2 - src/TopOpeBRepTool/TopOpeBRepTool_faulty.cxx | 7 --- .../TopOpeBRepTool_makeTransition.cxx | 3 - .../TopOpeBRepTool_makeTransition.hxx | 3 - src/TopOpeBRepTool/TopOpeBRepTool_matter.cxx | 3 - .../TopOpeBRepTool_mkTondgE.cxx | 3 - .../TopOpeBRepTool_mkTondgE.hxx | 3 - src/TopOpeBRepTool/TopOpeBRepTool_tol.cxx | 1 - src/TopOpeBRepTool/TopOpeBRepTool_tol.hxx | 2 - src/TopoDS/TopoDS.hxx | 1 - src/TopoDS/TopoDS_AlertAttribute.hxx | 1 - src/TopoDS/TopoDS_Builder.cxx | 6 -- src/TopoDS/TopoDS_CompSolid.hxx | 1 - src/TopoDS/TopoDS_Compound.hxx | 1 - src/TopoDS/TopoDS_Edge.hxx | 1 - src/TopoDS/TopoDS_Face.hxx | 1 - src/TopoDS/TopoDS_HShape.cxx | 1 - src/TopoDS/TopoDS_HShape.hxx | 1 - src/TopoDS/TopoDS_Iterator.cxx | 3 - src/TopoDS/TopoDS_Shape.cxx | 1 - src/TopoDS/TopoDS_Shape.hxx | 3 - src/TopoDS/TopoDS_Shell.hxx | 1 - src/TopoDS/TopoDS_Solid.hxx | 1 - src/TopoDS/TopoDS_TCompSolid.cxx | 1 - src/TopoDS/TopoDS_TCompound.cxx | 1 - src/TopoDS/TopoDS_TEdge.cxx | 2 - src/TopoDS/TopoDS_TEdge.hxx | 1 - src/TopoDS/TopoDS_TFace.cxx | 1 - src/TopoDS/TopoDS_TShape.hxx | 1 - src/TopoDS/TopoDS_TShell.cxx | 1 - src/TopoDS/TopoDS_TSolid.cxx | 1 - src/TopoDS/TopoDS_TVertex.cxx | 2 - src/TopoDS/TopoDS_TVertex.hxx | 1 - src/TopoDS/TopoDS_TWire.cxx | 1 - src/TopoDS/TopoDS_Vertex.hxx | 1 - src/TopoDS/TopoDS_Wire.hxx | 1 - src/TopoDSToStep/TopoDSToStep.cxx | 12 ---- src/TopoDSToStep/TopoDSToStep_Builder.cxx | 4 -- src/TopoDSToStep/TopoDSToStep_FacetedTool.hxx | 1 - .../TopoDSToStep_MakeGeometricCurveSet.cxx | 5 -- .../TopoDSToStep_MakeStepEdge.cxx | 4 -- .../TopoDSToStep_MakeStepFace.cxx | 13 ----- .../TopoDSToStep_MakeStepVertex.cxx | 2 - .../TopoDSToStep_MakeStepWire.cxx | 6 -- src/TopoDSToStep/TopoDSToStep_Tool.cxx | 6 -- src/TopoDSToStep/TopoDSToStep_Tool.hxx | 2 - .../TopoDSToStep_WireframeBuilder.cxx | 13 ----- .../TopoDSToStep_WireframeBuilder.hxx | 1 - 633 files changed, 11 insertions(+), 2217 deletions(-) diff --git a/src/SWDRAW/SWDRAW.cxx b/src/SWDRAW/SWDRAW.cxx index e428fa46cd..f60bc0e90e 100644 --- a/src/SWDRAW/SWDRAW.cxx +++ b/src/SWDRAW/SWDRAW.cxx @@ -16,9 +16,6 @@ #include #include #include -#include -#include -#include #include #include #include diff --git a/src/SWDRAW/SWDRAW_ShapeAnalysis.cxx b/src/SWDRAW/SWDRAW_ShapeAnalysis.cxx index e47730d8a1..c07e225f40 100644 --- a/src/SWDRAW/SWDRAW_ShapeAnalysis.cxx +++ b/src/SWDRAW/SWDRAW_ShapeAnalysis.cxx @@ -36,7 +36,6 @@ #include #include #include -#include #include #include #include @@ -53,7 +52,6 @@ #include #include #include -#include #include #include #include diff --git a/src/SWDRAW/SWDRAW_ShapeAnalysis.hxx b/src/SWDRAW/SWDRAW_ShapeAnalysis.hxx index 42aeabe06d..ddf75364c6 100644 --- a/src/SWDRAW/SWDRAW_ShapeAnalysis.hxx +++ b/src/SWDRAW/SWDRAW_ShapeAnalysis.hxx @@ -19,7 +19,6 @@ #include #include -#include #include diff --git a/src/SWDRAW/SWDRAW_ShapeCustom.cxx b/src/SWDRAW/SWDRAW_ShapeCustom.cxx index 70a1199814..12916aba5e 100644 --- a/src/SWDRAW/SWDRAW_ShapeCustom.cxx +++ b/src/SWDRAW/SWDRAW_ShapeCustom.cxx @@ -18,7 +18,6 @@ #include #include #include -#include #include #include #include @@ -27,7 +26,6 @@ #include #include #include -#include #include #include #include @@ -38,7 +36,6 @@ #include #include #include -#include #include #include #include diff --git a/src/SWDRAW/SWDRAW_ShapeCustom.hxx b/src/SWDRAW/SWDRAW_ShapeCustom.hxx index 55df8f8754..517ab3252e 100644 --- a/src/SWDRAW/SWDRAW_ShapeCustom.hxx +++ b/src/SWDRAW/SWDRAW_ShapeCustom.hxx @@ -19,7 +19,6 @@ #include #include -#include #include diff --git a/src/SWDRAW/SWDRAW_ShapeExtend.cxx b/src/SWDRAW/SWDRAW_ShapeExtend.cxx index a22fc9d484..3ea21efbcd 100644 --- a/src/SWDRAW/SWDRAW_ShapeExtend.cxx +++ b/src/SWDRAW/SWDRAW_ShapeExtend.cxx @@ -20,7 +20,6 @@ #include #include #include -#include static Standard_Integer sortcompound (Draw_Interpretor& di, Standard_Integer argc, const char** argv) { diff --git a/src/SWDRAW/SWDRAW_ShapeExtend.hxx b/src/SWDRAW/SWDRAW_ShapeExtend.hxx index 2704c97b93..9f3646c787 100644 --- a/src/SWDRAW/SWDRAW_ShapeExtend.hxx +++ b/src/SWDRAW/SWDRAW_ShapeExtend.hxx @@ -19,7 +19,6 @@ #include #include -#include #include diff --git a/src/SWDRAW/SWDRAW_ShapeFix.cxx b/src/SWDRAW/SWDRAW_ShapeFix.cxx index 9568345c65..b52761a1c2 100644 --- a/src/SWDRAW/SWDRAW_ShapeFix.cxx +++ b/src/SWDRAW/SWDRAW_ShapeFix.cxx @@ -24,21 +24,13 @@ #include #include #include -#include -#include #include #include #include -#include #include -#include #include -#include -#include #include -#include #include -#include #include #include #include @@ -48,7 +40,6 @@ #include #include #include -#include #include #include #include @@ -68,7 +59,6 @@ #include #endif #include -#include //======================================================================= //function : edgesameparam diff --git a/src/SWDRAW/SWDRAW_ShapeFix.hxx b/src/SWDRAW/SWDRAW_ShapeFix.hxx index 964bc857a1..cee5ceaba9 100644 --- a/src/SWDRAW/SWDRAW_ShapeFix.hxx +++ b/src/SWDRAW/SWDRAW_ShapeFix.hxx @@ -19,7 +19,6 @@ #include #include -#include #include diff --git a/src/SWDRAW/SWDRAW_ShapeProcess.hxx b/src/SWDRAW/SWDRAW_ShapeProcess.hxx index 12de9fff07..ea120bc13f 100644 --- a/src/SWDRAW/SWDRAW_ShapeProcess.hxx +++ b/src/SWDRAW/SWDRAW_ShapeProcess.hxx @@ -19,7 +19,6 @@ #include #include -#include #include diff --git a/src/SWDRAW/SWDRAW_ShapeProcessAPI.cxx b/src/SWDRAW/SWDRAW_ShapeProcessAPI.cxx index 28751b6dc8..a6c412498f 100644 --- a/src/SWDRAW/SWDRAW_ShapeProcessAPI.cxx +++ b/src/SWDRAW/SWDRAW_ShapeProcessAPI.cxx @@ -22,7 +22,6 @@ #include #include -#include //======================================================================= //function : ApplySequence //purpose : diff --git a/src/SWDRAW/SWDRAW_ShapeProcessAPI.hxx b/src/SWDRAW/SWDRAW_ShapeProcessAPI.hxx index 0ebddaf133..dd5e93e1d8 100644 --- a/src/SWDRAW/SWDRAW_ShapeProcessAPI.hxx +++ b/src/SWDRAW/SWDRAW_ShapeProcessAPI.hxx @@ -19,7 +19,6 @@ #include #include -#include #include diff --git a/src/SWDRAW/SWDRAW_ShapeTool.cxx b/src/SWDRAW/SWDRAW_ShapeTool.cxx index c6e6d16912..3efe62790c 100644 --- a/src/SWDRAW/SWDRAW_ShapeTool.cxx +++ b/src/SWDRAW/SWDRAW_ShapeTool.cxx @@ -28,25 +28,19 @@ #include #include #include -#include -#include #include #include -#include #include #include #include -#include #include #include -#include #include #include #include #include #include #include -#include #include #include diff --git a/src/SWDRAW/SWDRAW_ShapeTool.hxx b/src/SWDRAW/SWDRAW_ShapeTool.hxx index 8640e1eb37..50e494cb3a 100644 --- a/src/SWDRAW/SWDRAW_ShapeTool.hxx +++ b/src/SWDRAW/SWDRAW_ShapeTool.hxx @@ -19,7 +19,6 @@ #include #include -#include #include diff --git a/src/SWDRAW/SWDRAW_ShapeUpgrade.cxx b/src/SWDRAW/SWDRAW_ShapeUpgrade.cxx index f2a94082d7..a999b5da87 100644 --- a/src/SWDRAW/SWDRAW_ShapeUpgrade.cxx +++ b/src/SWDRAW/SWDRAW_ShapeUpgrade.cxx @@ -24,7 +24,6 @@ #include #include #include -#include #include #include #include @@ -33,7 +32,6 @@ #include #include #include -#include #include #include #include @@ -43,7 +41,6 @@ #include #include #include -#include #include #include #include @@ -61,18 +58,11 @@ #include #include #include -#include #include #include -#include #include -#include -#include #include -#include #include -#include -#include #include //#include diff --git a/src/SWDRAW/SWDRAW_ShapeUpgrade.hxx b/src/SWDRAW/SWDRAW_ShapeUpgrade.hxx index 7088653070..ea313be140 100644 --- a/src/SWDRAW/SWDRAW_ShapeUpgrade.hxx +++ b/src/SWDRAW/SWDRAW_ShapeUpgrade.hxx @@ -19,7 +19,6 @@ #include #include -#include #include diff --git a/src/Storage/Storage_BaseDriver.cxx b/src/Storage/Storage_BaseDriver.cxx index 6772e12c46..6e7edaaa6c 100644 --- a/src/Storage/Storage_BaseDriver.cxx +++ b/src/Storage/Storage_BaseDriver.cxx @@ -15,9 +15,6 @@ #include #include -#include -#include -#include #include #include diff --git a/src/Storage/Storage_BaseDriver.hxx b/src/Storage/Storage_BaseDriver.hxx index 31206f3d1c..0c1b0ed613 100644 --- a/src/Storage/Storage_BaseDriver.hxx +++ b/src/Storage/Storage_BaseDriver.hxx @@ -17,10 +17,7 @@ #ifndef _Storage_BaseDriver_HeaderFile #define _Storage_BaseDriver_HeaderFile -#include - #include -#include #include #include #include diff --git a/src/Storage/Storage_CallBack.cxx b/src/Storage/Storage_CallBack.cxx index a5ab528379..f72454d4ca 100644 --- a/src/Storage/Storage_CallBack.cxx +++ b/src/Storage/Storage_CallBack.cxx @@ -13,9 +13,6 @@ // commercial license or contractual agreement. -#include -#include -#include #include #include diff --git a/src/Storage/Storage_Data.cxx b/src/Storage/Storage_Data.cxx index a07b4afce3..4ff095359e 100644 --- a/src/Storage/Storage_Data.cxx +++ b/src/Storage/Storage_Data.cxx @@ -17,7 +17,6 @@ #include #include #include -#include #include #include #include diff --git a/src/Storage/Storage_Data.hxx b/src/Storage/Storage_Data.hxx index f898b680e4..7324a5899c 100644 --- a/src/Storage/Storage_Data.hxx +++ b/src/Storage/Storage_Data.hxx @@ -21,13 +21,10 @@ #include #include -#include #include -#include #include #include #include -#include #include class Storage_HeaderData; class Storage_RootData; diff --git a/src/Storage/Storage_HArrayOfCallBack.hxx b/src/Storage/Storage_HArrayOfCallBack.hxx index 37c2d14290..9674ad5046 100644 --- a/src/Storage/Storage_HArrayOfCallBack.hxx +++ b/src/Storage/Storage_HArrayOfCallBack.hxx @@ -17,7 +17,6 @@ #ifndef Storage_HArrayOfCallBack_HeaderFile #define Storage_HArrayOfCallBack_HeaderFile -#include #include #include diff --git a/src/Storage/Storage_HArrayOfSchema.hxx b/src/Storage/Storage_HArrayOfSchema.hxx index d9cf43c64b..6b59be1385 100644 --- a/src/Storage/Storage_HArrayOfSchema.hxx +++ b/src/Storage/Storage_HArrayOfSchema.hxx @@ -17,7 +17,6 @@ #ifndef Storage_HArrayOfSchema_HeaderFile #define Storage_HArrayOfSchema_HeaderFile -#include #include #include diff --git a/src/Storage/Storage_HPArray.hxx b/src/Storage/Storage_HPArray.hxx index 363b723b32..b677bd0daa 100644 --- a/src/Storage/Storage_HPArray.hxx +++ b/src/Storage/Storage_HPArray.hxx @@ -17,7 +17,6 @@ #ifndef Storage_HPArray_HeaderFile #define Storage_HPArray_HeaderFile -#include #include #include diff --git a/src/Storage/Storage_HSeqOfRoot.hxx b/src/Storage/Storage_HSeqOfRoot.hxx index 4e6328faca..bd4e6ddb5b 100644 --- a/src/Storage/Storage_HSeqOfRoot.hxx +++ b/src/Storage/Storage_HSeqOfRoot.hxx @@ -17,7 +17,6 @@ #ifndef Storage_HSeqOfRoot_HeaderFile #define Storage_HSeqOfRoot_HeaderFile -#include #include #include diff --git a/src/Storage/Storage_HeaderData.hxx b/src/Storage/Storage_HeaderData.hxx index ac5a48cef0..5ca75def6c 100644 --- a/src/Storage/Storage_HeaderData.hxx +++ b/src/Storage/Storage_HeaderData.hxx @@ -21,8 +21,6 @@ #include #include -#include -#include #include #include #include diff --git a/src/Storage/Storage_InternalData.cxx b/src/Storage/Storage_InternalData.cxx index 6d573078ca..d22b0430eb 100644 --- a/src/Storage/Storage_InternalData.cxx +++ b/src/Storage/Storage_InternalData.cxx @@ -13,7 +13,6 @@ // commercial license or contractual agreement. -#include #include #include diff --git a/src/Storage/Storage_InternalData.hxx b/src/Storage/Storage_InternalData.hxx index 81a25d3aa8..a9047cf969 100644 --- a/src/Storage/Storage_InternalData.hxx +++ b/src/Storage/Storage_InternalData.hxx @@ -18,7 +18,6 @@ #define _Storage_InternalData_HeaderFile #include -#include #include #include diff --git a/src/Storage/Storage_MapOfCallBack.hxx b/src/Storage/Storage_MapOfCallBack.hxx index 26e0072a5a..079eba5f66 100644 --- a/src/Storage/Storage_MapOfCallBack.hxx +++ b/src/Storage/Storage_MapOfCallBack.hxx @@ -19,7 +19,6 @@ #include #include -#include #include typedef NCollection_DataMap Storage_MapOfCallBack; diff --git a/src/Storage/Storage_MapOfPers.hxx b/src/Storage/Storage_MapOfPers.hxx index 3db76062e5..cbde1b89a9 100644 --- a/src/Storage/Storage_MapOfPers.hxx +++ b/src/Storage/Storage_MapOfPers.hxx @@ -17,7 +17,6 @@ #ifndef Storage_MapOfPers_HeaderFile #define Storage_MapOfPers_HeaderFile -#include #include #include #include diff --git a/src/Storage/Storage_PType.hxx b/src/Storage/Storage_PType.hxx index bb73f3ac11..9a90b69cbf 100644 --- a/src/Storage/Storage_PType.hxx +++ b/src/Storage/Storage_PType.hxx @@ -19,7 +19,6 @@ #include #include -#include #include typedef NCollection_IndexedDataMap Storage_PType; diff --git a/src/Storage/Storage_Root.cxx b/src/Storage/Storage_Root.cxx index eec9382574..bb09a8b3f6 100644 --- a/src/Storage/Storage_Root.cxx +++ b/src/Storage/Storage_Root.cxx @@ -13,7 +13,6 @@ // commercial license or contractual agreement. -#include #include #include #include diff --git a/src/Storage/Storage_RootData.cxx b/src/Storage/Storage_RootData.cxx index e8cf7fbe45..b5093120a9 100644 --- a/src/Storage/Storage_RootData.cxx +++ b/src/Storage/Storage_RootData.cxx @@ -15,7 +15,6 @@ #include #include -#include #include #include #include diff --git a/src/Storage/Storage_RootData.hxx b/src/Storage/Storage_RootData.hxx index 17f8ae1dac..4fd65007a7 100644 --- a/src/Storage/Storage_RootData.hxx +++ b/src/Storage/Storage_RootData.hxx @@ -26,7 +26,6 @@ #include #include #include -#include class Storage_BaseDriver; class Storage_Root; class Standard_Persistent; diff --git a/src/Storage/Storage_Schema.cxx b/src/Storage/Storage_Schema.cxx index 16f03a1024..bb617809b0 100644 --- a/src/Storage/Storage_Schema.cxx +++ b/src/Storage/Storage_Schema.cxx @@ -14,37 +14,22 @@ #include -#include #include #include #include -#include -#include #include -#include #include #include #include -#include #include -#include #include -#include #include -#include -#include -#include -#include -#include -#include #include #include #include #include #include -#include -#include #include IMPLEMENT_STANDARD_RTTIEXT(Storage_Schema,Standard_Transient) diff --git a/src/Storage/Storage_Schema.hxx b/src/Storage/Storage_Schema.hxx index 7e83c38a5d..311cddec85 100644 --- a/src/Storage/Storage_Schema.hxx +++ b/src/Storage/Storage_Schema.hxx @@ -18,12 +18,9 @@ #define _Storage_Schema_HeaderFile #include -#include #include #include -#include #include -#include #include class Storage_CallBack; diff --git a/src/Storage/Storage_StreamUnknownTypeError.hxx b/src/Storage/Storage_StreamUnknownTypeError.hxx index daa18fa672..f07f79bfbf 100644 --- a/src/Storage/Storage_StreamUnknownTypeError.hxx +++ b/src/Storage/Storage_StreamUnknownTypeError.hxx @@ -18,7 +18,6 @@ #define _Storage_StreamUnknownTypeError_HeaderFile #include -#include #include #include diff --git a/src/Storage/Storage_TypeData.cxx b/src/Storage/Storage_TypeData.cxx index 5335777c37..ee0cb721b6 100644 --- a/src/Storage/Storage_TypeData.cxx +++ b/src/Storage/Storage_TypeData.cxx @@ -14,7 +14,6 @@ #include -#include #include #include #include diff --git a/src/Storage/Storage_TypeData.hxx b/src/Storage/Storage_TypeData.hxx index 24e345a141..3ac2f538aa 100644 --- a/src/Storage/Storage_TypeData.hxx +++ b/src/Storage/Storage_TypeData.hxx @@ -25,7 +25,6 @@ #include #include #include -#include #include class Storage_BaseDriver; diff --git a/src/Storage/Storage_TypedCallBack.cxx b/src/Storage/Storage_TypedCallBack.cxx index aa041a1d2a..c3c0d9e198 100644 --- a/src/Storage/Storage_TypedCallBack.cxx +++ b/src/Storage/Storage_TypedCallBack.cxx @@ -13,7 +13,6 @@ // commercial license or contractual agreement. -#include #include #include #include diff --git a/src/Sweep/Sweep_NumShape.hxx b/src/Sweep/Sweep_NumShape.hxx index 3bf6f2c1a6..a8e14ae657 100644 --- a/src/Sweep/Sweep_NumShape.hxx +++ b/src/Sweep/Sweep_NumShape.hxx @@ -22,7 +22,6 @@ #include #include -#include #include #include diff --git a/src/Sweep/Sweep_NumShapeIterator.cxx b/src/Sweep/Sweep_NumShapeIterator.cxx index 1c86522688..695a47ced6 100644 --- a/src/Sweep/Sweep_NumShapeIterator.cxx +++ b/src/Sweep/Sweep_NumShapeIterator.cxx @@ -15,9 +15,7 @@ // commercial license or contractual agreement. -#include #include -#include #include //======================================================================= diff --git a/src/Sweep/Sweep_NumShapeIterator.hxx b/src/Sweep/Sweep_NumShapeIterator.hxx index e97850e63a..dbfb4d1891 100644 --- a/src/Sweep/Sweep_NumShapeIterator.hxx +++ b/src/Sweep/Sweep_NumShapeIterator.hxx @@ -19,11 +19,9 @@ #include #include -#include #include #include -#include #include diff --git a/src/Sweep/Sweep_NumShapeTool.cxx b/src/Sweep/Sweep_NumShapeTool.cxx index 249635d4dd..130aa0dbca 100644 --- a/src/Sweep/Sweep_NumShapeTool.cxx +++ b/src/Sweep/Sweep_NumShapeTool.cxx @@ -17,7 +17,6 @@ #include #include -#include #include //======================================================================= diff --git a/src/Sweep/Sweep_NumShapeTool.hxx b/src/Sweep/Sweep_NumShapeTool.hxx index b475eb68a5..d22d45b28b 100644 --- a/src/Sweep/Sweep_NumShapeTool.hxx +++ b/src/Sweep/Sweep_NumShapeTool.hxx @@ -19,13 +19,11 @@ #include #include -#include #include #include #include #include -#include //! This class provides the indexation and type analysis diff --git a/src/TColGeom/TColGeom_HArray1OfBSplineCurve.hxx b/src/TColGeom/TColGeom_HArray1OfBSplineCurve.hxx index 9ceb6cf187..42029a6980 100644 --- a/src/TColGeom/TColGeom_HArray1OfBSplineCurve.hxx +++ b/src/TColGeom/TColGeom_HArray1OfBSplineCurve.hxx @@ -17,7 +17,6 @@ #ifndef TColGeom_HArray1OfBSplineCurve_HeaderFile #define TColGeom_HArray1OfBSplineCurve_HeaderFile -#include #include #include diff --git a/src/TColGeom/TColGeom_HArray1OfCurve.hxx b/src/TColGeom/TColGeom_HArray1OfCurve.hxx index 652a7dc118..4b31382c18 100644 --- a/src/TColGeom/TColGeom_HArray1OfCurve.hxx +++ b/src/TColGeom/TColGeom_HArray1OfCurve.hxx @@ -17,7 +17,6 @@ #ifndef TColGeom_HArray1OfCurve_HeaderFile #define TColGeom_HArray1OfCurve_HeaderFile -#include #include #include diff --git a/src/TColGeom/TColGeom_HArray1OfSurface.hxx b/src/TColGeom/TColGeom_HArray1OfSurface.hxx index 3c827e67c1..e64b777440 100644 --- a/src/TColGeom/TColGeom_HArray1OfSurface.hxx +++ b/src/TColGeom/TColGeom_HArray1OfSurface.hxx @@ -17,7 +17,6 @@ #ifndef TColGeom_HArray1OfSurface_HeaderFile #define TColGeom_HArray1OfSurface_HeaderFile -#include #include #include diff --git a/src/TColGeom/TColGeom_HArray2OfSurface.hxx b/src/TColGeom/TColGeom_HArray2OfSurface.hxx index 6760981d9a..63d1e52e55 100644 --- a/src/TColGeom/TColGeom_HArray2OfSurface.hxx +++ b/src/TColGeom/TColGeom_HArray2OfSurface.hxx @@ -17,7 +17,6 @@ #ifndef TColGeom_HArray2OfSurface_HeaderFile #define TColGeom_HArray2OfSurface_HeaderFile -#include #include #include diff --git a/src/TColGeom/TColGeom_HSequenceOfCurve.hxx b/src/TColGeom/TColGeom_HSequenceOfCurve.hxx index e357af223c..7beaa9dd48 100644 --- a/src/TColGeom/TColGeom_HSequenceOfCurve.hxx +++ b/src/TColGeom/TColGeom_HSequenceOfCurve.hxx @@ -17,7 +17,6 @@ #ifndef TColGeom_HSequenceOfCurve_HeaderFile #define TColGeom_HSequenceOfCurve_HeaderFile -#include #include #include diff --git a/src/TColGeom2d/TColGeom2d_HArray1OfCurve.hxx b/src/TColGeom2d/TColGeom2d_HArray1OfCurve.hxx index d7fd13a8be..71a5f6cce9 100644 --- a/src/TColGeom2d/TColGeom2d_HArray1OfCurve.hxx +++ b/src/TColGeom2d/TColGeom2d_HArray1OfCurve.hxx @@ -17,7 +17,6 @@ #ifndef TColGeom2d_HArray1OfCurve_HeaderFile #define TColGeom2d_HArray1OfCurve_HeaderFile -#include #include #include diff --git a/src/TColGeom2d/TColGeom2d_HSequenceOfBoundedCurve.hxx b/src/TColGeom2d/TColGeom2d_HSequenceOfBoundedCurve.hxx index 720aa34042..7623f97795 100644 --- a/src/TColGeom2d/TColGeom2d_HSequenceOfBoundedCurve.hxx +++ b/src/TColGeom2d/TColGeom2d_HSequenceOfBoundedCurve.hxx @@ -17,7 +17,6 @@ #ifndef TColGeom2d_HSequenceOfBoundedCurve_HeaderFile #define TColGeom2d_HSequenceOfBoundedCurve_HeaderFile -#include #include #include diff --git a/src/TColGeom2d/TColGeom2d_HSequenceOfCurve.hxx b/src/TColGeom2d/TColGeom2d_HSequenceOfCurve.hxx index 532b19c659..be9b976a6d 100644 --- a/src/TColGeom2d/TColGeom2d_HSequenceOfCurve.hxx +++ b/src/TColGeom2d/TColGeom2d_HSequenceOfCurve.hxx @@ -17,7 +17,6 @@ #ifndef TColGeom2d_HSequenceOfCurve_HeaderFile #define TColGeom2d_HSequenceOfCurve_HeaderFile -#include #include #include diff --git a/src/TColStd/TColStd_Array1OfBoolean.hxx b/src/TColStd/TColStd_Array1OfBoolean.hxx index 922644fb8d..dfb34148c9 100644 --- a/src/TColStd/TColStd_Array1OfBoolean.hxx +++ b/src/TColStd/TColStd_Array1OfBoolean.hxx @@ -15,7 +15,6 @@ #ifndef TColStd_Array1OfBoolean_HeaderFile #define TColStd_Array1OfBoolean_HeaderFile -#include #include typedef NCollection_Array1 TColStd_Array1OfBoolean; diff --git a/src/TColStd/TColStd_Array1OfByte.hxx b/src/TColStd/TColStd_Array1OfByte.hxx index 7061b99b1a..9357701f9d 100644 --- a/src/TColStd/TColStd_Array1OfByte.hxx +++ b/src/TColStd/TColStd_Array1OfByte.hxx @@ -15,7 +15,6 @@ #ifndef TColStd_Array1OfByte_HeaderFile #define TColStd_Array1OfByte_HeaderFile -#include #include typedef NCollection_Array1 TColStd_Array1OfByte; diff --git a/src/TColStd/TColStd_Array1OfCharacter.hxx b/src/TColStd/TColStd_Array1OfCharacter.hxx index 8c86bd7a1c..454abcb857 100644 --- a/src/TColStd/TColStd_Array1OfCharacter.hxx +++ b/src/TColStd/TColStd_Array1OfCharacter.hxx @@ -15,7 +15,6 @@ #ifndef TColStd_Array1OfCharacter_HeaderFile #define TColStd_Array1OfCharacter_HeaderFile -#include #include typedef NCollection_Array1 TColStd_Array1OfCharacter; diff --git a/src/TColStd/TColStd_Array1OfReal.hxx b/src/TColStd/TColStd_Array1OfReal.hxx index 01f3c3125d..8412481c27 100644 --- a/src/TColStd/TColStd_Array1OfReal.hxx +++ b/src/TColStd/TColStd_Array1OfReal.hxx @@ -15,7 +15,6 @@ #ifndef TColStd_Array1OfReal_HeaderFile #define TColStd_Array1OfReal_HeaderFile -#include #include typedef NCollection_Array1 TColStd_Array1OfReal; diff --git a/src/TColStd/TColStd_Array2OfBoolean.hxx b/src/TColStd/TColStd_Array2OfBoolean.hxx index 016c7ed981..9838dd9890 100644 --- a/src/TColStd/TColStd_Array2OfBoolean.hxx +++ b/src/TColStd/TColStd_Array2OfBoolean.hxx @@ -15,7 +15,6 @@ #ifndef TColStd_Array2OfBoolean_HeaderFile #define TColStd_Array2OfBoolean_HeaderFile -#include #include typedef NCollection_Array2 TColStd_Array2OfBoolean; diff --git a/src/TColStd/TColStd_Array2OfCharacter.hxx b/src/TColStd/TColStd_Array2OfCharacter.hxx index 804baf610e..7a32591374 100644 --- a/src/TColStd/TColStd_Array2OfCharacter.hxx +++ b/src/TColStd/TColStd_Array2OfCharacter.hxx @@ -15,7 +15,6 @@ #ifndef TColStd_Array2OfCharacter_HeaderFile #define TColStd_Array2OfCharacter_HeaderFile -#include #include typedef NCollection_Array2 TColStd_Array2OfCharacter; diff --git a/src/TColStd/TColStd_Array2OfReal.hxx b/src/TColStd/TColStd_Array2OfReal.hxx index e258ca6e06..0f1cf042a4 100644 --- a/src/TColStd/TColStd_Array2OfReal.hxx +++ b/src/TColStd/TColStd_Array2OfReal.hxx @@ -15,7 +15,6 @@ #ifndef TColStd_Array2OfReal_HeaderFile #define TColStd_Array2OfReal_HeaderFile -#include #include typedef NCollection_Array2 TColStd_Array2OfReal; diff --git a/src/TColStd/TColStd_DataMapOfAsciiStringInteger.hxx b/src/TColStd/TColStd_DataMapOfAsciiStringInteger.hxx index 2c6bfd64e6..eeb07c31b9 100644 --- a/src/TColStd/TColStd_DataMapOfAsciiStringInteger.hxx +++ b/src/TColStd/TColStd_DataMapOfAsciiStringInteger.hxx @@ -17,7 +17,6 @@ #include #include -#include #include typedef NCollection_DataMap TColStd_DataMapOfAsciiStringInteger; diff --git a/src/TColStd/TColStd_DataMapOfIntegerInteger.hxx b/src/TColStd/TColStd_DataMapOfIntegerInteger.hxx index 3b1056e8b8..ce0297b28b 100644 --- a/src/TColStd/TColStd_DataMapOfIntegerInteger.hxx +++ b/src/TColStd/TColStd_DataMapOfIntegerInteger.hxx @@ -15,7 +15,6 @@ #ifndef TColStd_DataMapOfIntegerInteger_HeaderFile #define TColStd_DataMapOfIntegerInteger_HeaderFile -#include #include #include #include diff --git a/src/TColStd/TColStd_DataMapOfIntegerReal.hxx b/src/TColStd/TColStd_DataMapOfIntegerReal.hxx index d1239daa2a..35d806363a 100644 --- a/src/TColStd/TColStd_DataMapOfIntegerReal.hxx +++ b/src/TColStd/TColStd_DataMapOfIntegerReal.hxx @@ -16,7 +16,6 @@ #define TColStd_DataMapOfIntegerReal_HeaderFile #include -#include #include #include diff --git a/src/TColStd/TColStd_DataMapOfStringInteger.hxx b/src/TColStd/TColStd_DataMapOfStringInteger.hxx index 7f79ae7d28..e6566aa603 100644 --- a/src/TColStd/TColStd_DataMapOfStringInteger.hxx +++ b/src/TColStd/TColStd_DataMapOfStringInteger.hxx @@ -15,8 +15,6 @@ #ifndef TColStd_DataMapOfStringInteger_HeaderFile #define TColStd_DataMapOfStringInteger_HeaderFile -#include -#include #include #include diff --git a/src/TColStd/TColStd_DataMapOfTransientTransient.hxx b/src/TColStd/TColStd_DataMapOfTransientTransient.hxx index 9c2a86ecc5..35beea3c0c 100644 --- a/src/TColStd/TColStd_DataMapOfTransientTransient.hxx +++ b/src/TColStd/TColStd_DataMapOfTransientTransient.hxx @@ -15,7 +15,6 @@ #ifndef TColStd_DataMapOfTransientTransient_HeaderFile #define TColStd_DataMapOfTransientTransient_HeaderFile -#include #include #include #include diff --git a/src/TColStd/TColStd_HArray1OfBoolean.hxx b/src/TColStd/TColStd_HArray1OfBoolean.hxx index ff249dcaf9..7b31d50105 100644 --- a/src/TColStd/TColStd_HArray1OfBoolean.hxx +++ b/src/TColStd/TColStd_HArray1OfBoolean.hxx @@ -15,7 +15,6 @@ #ifndef TColStd_HArray1OfBoolean_HeaderFile #define TColStd_HArray1OfBoolean_HeaderFile -#include #include #include diff --git a/src/TColStd/TColStd_HArray1OfByte.hxx b/src/TColStd/TColStd_HArray1OfByte.hxx index 682d9b1d2a..993ccf8e14 100644 --- a/src/TColStd/TColStd_HArray1OfByte.hxx +++ b/src/TColStd/TColStd_HArray1OfByte.hxx @@ -15,7 +15,6 @@ #ifndef TColStd_HArray1OfByte_HeaderFile #define TColStd_HArray1OfByte_HeaderFile -#include #include #include diff --git a/src/TColStd/TColStd_HArray1OfListOfInteger.hxx b/src/TColStd/TColStd_HArray1OfListOfInteger.hxx index f0d37fb70c..da7e326cfc 100644 --- a/src/TColStd/TColStd_HArray1OfListOfInteger.hxx +++ b/src/TColStd/TColStd_HArray1OfListOfInteger.hxx @@ -15,7 +15,6 @@ #ifndef TColStd_HArray1OfListOfInteger_HeaderFile #define TColStd_HArray1OfListOfInteger_HeaderFile -#include #include #include diff --git a/src/TColStd/TColStd_HArray1OfReal.hxx b/src/TColStd/TColStd_HArray1OfReal.hxx index 76c5efa571..982d3bae81 100644 --- a/src/TColStd/TColStd_HArray1OfReal.hxx +++ b/src/TColStd/TColStd_HArray1OfReal.hxx @@ -15,7 +15,6 @@ #ifndef TColStd_HArray1OfReal_HeaderFile #define TColStd_HArray1OfReal_HeaderFile -#include #include #include diff --git a/src/TColStd/TColStd_HArray2OfReal.hxx b/src/TColStd/TColStd_HArray2OfReal.hxx index 46981dc6a9..21ce8dde40 100644 --- a/src/TColStd/TColStd_HArray2OfReal.hxx +++ b/src/TColStd/TColStd_HArray2OfReal.hxx @@ -15,7 +15,6 @@ #ifndef TColStd_HArray2OfReal_HeaderFile #define TColStd_HArray2OfReal_HeaderFile -#include #include #include diff --git a/src/TColStd/TColStd_HPackedMapOfInteger.cxx b/src/TColStd/TColStd_HPackedMapOfInteger.cxx index 9d4d74c35a..b704f78c65 100644 --- a/src/TColStd/TColStd_HPackedMapOfInteger.cxx +++ b/src/TColStd/TColStd_HPackedMapOfInteger.cxx @@ -14,7 +14,6 @@ // commercial license or contractual agreement. -#include #include IMPLEMENT_STANDARD_RTTIEXT(TColStd_HPackedMapOfInteger,Standard_Transient) diff --git a/src/TColStd/TColStd_HPackedMapOfInteger.hxx b/src/TColStd/TColStd_HPackedMapOfInteger.hxx index 5ef0b8e2c0..e760c97c9e 100644 --- a/src/TColStd/TColStd_HPackedMapOfInteger.hxx +++ b/src/TColStd/TColStd_HPackedMapOfInteger.hxx @@ -17,7 +17,6 @@ #define _TColStd_HPackedMapOfInteger_HeaderFile #include -#include #include #include diff --git a/src/TColStd/TColStd_HSequenceOfHAsciiString.hxx b/src/TColStd/TColStd_HSequenceOfHAsciiString.hxx index 4c177707f4..ab27fbfb8a 100644 --- a/src/TColStd/TColStd_HSequenceOfHAsciiString.hxx +++ b/src/TColStd/TColStd_HSequenceOfHAsciiString.hxx @@ -15,7 +15,6 @@ #ifndef TColStd_HSequenceOfHAsciiString_HeaderFile #define TColStd_HSequenceOfHAsciiString_HeaderFile -#include #include #include diff --git a/src/TColStd/TColStd_HSequenceOfHExtendedString.hxx b/src/TColStd/TColStd_HSequenceOfHExtendedString.hxx index 50053ed2ac..4daf91727e 100644 --- a/src/TColStd/TColStd_HSequenceOfHExtendedString.hxx +++ b/src/TColStd/TColStd_HSequenceOfHExtendedString.hxx @@ -15,7 +15,6 @@ #ifndef TColStd_HSequenceOfHExtendedString_HeaderFile #define TColStd_HSequenceOfHExtendedString_HeaderFile -#include #include #include diff --git a/src/TColStd/TColStd_HSequenceOfReal.hxx b/src/TColStd/TColStd_HSequenceOfReal.hxx index a17caaf6a5..0549c6420d 100644 --- a/src/TColStd/TColStd_HSequenceOfReal.hxx +++ b/src/TColStd/TColStd_HSequenceOfReal.hxx @@ -15,7 +15,6 @@ #ifndef TColStd_HSequenceOfReal_HeaderFile #define TColStd_HSequenceOfReal_HeaderFile -#include #include #include diff --git a/src/TColStd/TColStd_IndexedDataMapOfTransientTransient.hxx b/src/TColStd/TColStd_IndexedDataMapOfTransientTransient.hxx index 1fc0bdec3d..c7c2654680 100644 --- a/src/TColStd/TColStd_IndexedDataMapOfTransientTransient.hxx +++ b/src/TColStd/TColStd_IndexedDataMapOfTransientTransient.hxx @@ -15,7 +15,6 @@ #ifndef TColStd_IndexedDataMapOfTransientTransient_HeaderFile #define TColStd_IndexedDataMapOfTransientTransient_HeaderFile -#include #include #include #include diff --git a/src/TColStd/TColStd_IndexedMapOfReal.hxx b/src/TColStd/TColStd_IndexedMapOfReal.hxx index 8bb3b89018..bc5e8601c8 100644 --- a/src/TColStd/TColStd_IndexedMapOfReal.hxx +++ b/src/TColStd/TColStd_IndexedMapOfReal.hxx @@ -15,7 +15,6 @@ #ifndef TColStd_IndexedMapOfReal_HeaderFile #define TColStd_IndexedMapOfReal_HeaderFile -#include #include #include diff --git a/src/TColStd/TColStd_ListOfReal.hxx b/src/TColStd/TColStd_ListOfReal.hxx index 124b933b45..cd3b7862bd 100644 --- a/src/TColStd/TColStd_ListOfReal.hxx +++ b/src/TColStd/TColStd_ListOfReal.hxx @@ -15,7 +15,6 @@ #ifndef TColStd_ListOfReal_HeaderFile #define TColStd_ListOfReal_HeaderFile -#include #include typedef NCollection_List TColStd_ListOfReal; diff --git a/src/TColStd/TColStd_MapOfAsciiString.hxx b/src/TColStd/TColStd_MapOfAsciiString.hxx index f283a67e56..05e287750d 100644 --- a/src/TColStd/TColStd_MapOfAsciiString.hxx +++ b/src/TColStd/TColStd_MapOfAsciiString.hxx @@ -15,7 +15,6 @@ #ifndef TColStd_MapOfAsciiString_HeaderFile #define TColStd_MapOfAsciiString_HeaderFile -#include #include #include diff --git a/src/TColStd/TColStd_MapOfReal.hxx b/src/TColStd/TColStd_MapOfReal.hxx index 0d3ffbd770..0fb8a50930 100644 --- a/src/TColStd/TColStd_MapOfReal.hxx +++ b/src/TColStd/TColStd_MapOfReal.hxx @@ -15,7 +15,6 @@ #ifndef TColStd_MapOfReal_HeaderFile #define TColStd_MapOfReal_HeaderFile -#include #include #include diff --git a/src/TColStd/TColStd_MapRealHasher.hxx b/src/TColStd/TColStd_MapRealHasher.hxx index 68fdd57d83..df075d0028 100644 --- a/src/TColStd/TColStd_MapRealHasher.hxx +++ b/src/TColStd/TColStd_MapRealHasher.hxx @@ -15,7 +15,6 @@ #ifndef TColStd_MapRealHasher_HeaderFile #define TColStd_MapRealHasher_HeaderFile -#include #include typedef NCollection_DefaultHasher TColStd_MapRealHasher; diff --git a/src/TColStd/TColStd_PackedMapOfInteger.cxx b/src/TColStd/TColStd_PackedMapOfInteger.cxx index 3903c1c3ab..07650da631 100644 --- a/src/TColStd/TColStd_PackedMapOfInteger.cxx +++ b/src/TColStd/TColStd_PackedMapOfInteger.cxx @@ -17,7 +17,6 @@ #include #include -#include //======================================================================= //function : TColStd_intMapNode_findNext diff --git a/src/TColStd/TColStd_SequenceOfBoolean.hxx b/src/TColStd/TColStd_SequenceOfBoolean.hxx index b2d3c9d539..15cb8fe8c5 100644 --- a/src/TColStd/TColStd_SequenceOfBoolean.hxx +++ b/src/TColStd/TColStd_SequenceOfBoolean.hxx @@ -15,7 +15,6 @@ #ifndef TColStd_SequenceOfBoolean_HeaderFile #define TColStd_SequenceOfBoolean_HeaderFile -#include #include typedef NCollection_Sequence TColStd_SequenceOfBoolean; diff --git a/src/TColStd/TColStd_SequenceOfReal.hxx b/src/TColStd/TColStd_SequenceOfReal.hxx index d0090ff69a..486fd33db2 100644 --- a/src/TColStd/TColStd_SequenceOfReal.hxx +++ b/src/TColStd/TColStd_SequenceOfReal.hxx @@ -15,7 +15,6 @@ #ifndef TColStd_SequenceOfReal_HeaderFile #define TColStd_SequenceOfReal_HeaderFile -#include #include typedef NCollection_Sequence TColStd_SequenceOfReal; diff --git a/src/TColgp/TColgp_HArray1OfVec.hxx b/src/TColgp/TColgp_HArray1OfVec.hxx index 2c5a0c0045..fd0937cc63 100644 --- a/src/TColgp/TColgp_HArray1OfVec.hxx +++ b/src/TColgp/TColgp_HArray1OfVec.hxx @@ -17,7 +17,6 @@ #ifndef TColgp_HArray1OfVec_HeaderFile #define TColgp_HArray1OfVec_HeaderFile -#include #include #include diff --git a/src/TColgp/TColgp_HArray1OfXYZ.hxx b/src/TColgp/TColgp_HArray1OfXYZ.hxx index ff9a297ac8..b085e5a514 100644 --- a/src/TColgp/TColgp_HArray1OfXYZ.hxx +++ b/src/TColgp/TColgp_HArray1OfXYZ.hxx @@ -17,7 +17,6 @@ #ifndef TColgp_HArray1OfXYZ_HeaderFile #define TColgp_HArray1OfXYZ_HeaderFile -#include #include #include diff --git a/src/TCollection/TCollection.hxx b/src/TCollection/TCollection.hxx index ce65214689..9867b943b9 100644 --- a/src/TCollection/TCollection.hxx +++ b/src/TCollection/TCollection.hxx @@ -20,7 +20,6 @@ #include #include #include -#include //! The package provides the services for the //! transient basic data structures. diff --git a/src/TCollection/TCollection_AsciiString.cxx b/src/TCollection/TCollection_AsciiString.cxx index 36bc538957..3234a888bd 100644 --- a/src/TCollection/TCollection_AsciiString.cxx +++ b/src/TCollection/TCollection_AsciiString.cxx @@ -25,7 +25,6 @@ #include #include -#include #include // Shortcuts to standard allocate and reallocate functions diff --git a/src/TCollection/TCollection_AsciiString.hxx b/src/TCollection/TCollection_AsciiString.hxx index d2592e9a08..ccb68cde32 100644 --- a/src/TCollection/TCollection_AsciiString.hxx +++ b/src/TCollection/TCollection_AsciiString.hxx @@ -22,11 +22,8 @@ #include #include -#include #include -#include #include -#include #include #include class TCollection_ExtendedString; diff --git a/src/TCollection/TCollection_ExtendedString.cxx b/src/TCollection/TCollection_ExtendedString.cxx index 30597cb0ce..2a83bab603 100644 --- a/src/TCollection/TCollection_ExtendedString.cxx +++ b/src/TCollection/TCollection_ExtendedString.cxx @@ -16,16 +16,10 @@ #include #include -#include -#include #include -#include -#include #include #include -#include -#include namespace { diff --git a/src/TCollection/TCollection_HAsciiString.cxx b/src/TCollection/TCollection_HAsciiString.cxx index 858f248e85..db99faa44d 100644 --- a/src/TCollection/TCollection_HAsciiString.cxx +++ b/src/TCollection/TCollection_HAsciiString.cxx @@ -15,10 +15,7 @@ #include #include -#include -#include #include -#include #include #include diff --git a/src/TCollection/TCollection_HAsciiString.hxx b/src/TCollection/TCollection_HAsciiString.hxx index 466d4b2937..51ef876ef7 100644 --- a/src/TCollection/TCollection_HAsciiString.hxx +++ b/src/TCollection/TCollection_HAsciiString.hxx @@ -23,10 +23,7 @@ #include #include #include -#include #include -#include -#include #include class TCollection_HExtendedString; diff --git a/src/TCollection/TCollection_HExtendedString.cxx b/src/TCollection/TCollection_HExtendedString.cxx index 2c81d2e1e4..558e2418cd 100644 --- a/src/TCollection/TCollection_HExtendedString.cxx +++ b/src/TCollection/TCollection_HExtendedString.cxx @@ -14,15 +14,9 @@ //Modified: C. LEYNADIER Nov,21 1997 (Token et ChangeString) -#include -#include #include #include -#include -#include #include -#include -#include #include #include diff --git a/src/TCollection/TCollection_HExtendedString.hxx b/src/TCollection/TCollection_HExtendedString.hxx index c84196d8bb..6c5a7a3460 100644 --- a/src/TCollection/TCollection_HExtendedString.hxx +++ b/src/TCollection/TCollection_HExtendedString.hxx @@ -23,10 +23,7 @@ #include #include #include -#include -#include #include -#include #include class TCollection_HAsciiString; diff --git a/src/TDF/TDF.cxx b/src/TDF/TDF.cxx index c4a418c278..4dd6d2ab1e 100644 --- a/src/TDF/TDF.cxx +++ b/src/TDF/TDF.cxx @@ -15,8 +15,6 @@ #include -#include -#include #include static TDF_GUIDProgIDMap guidprogidmap; diff --git a/src/TDF/TDF_Attribute.cxx b/src/TDF/TDF_Attribute.cxx index 2baacc3b97..201a44ee13 100644 --- a/src/TDF/TDF_Attribute.cxx +++ b/src/TDF/TDF_Attribute.cxx @@ -20,7 +20,6 @@ #include #include -#include #include #include #include @@ -39,7 +38,6 @@ #include #include #include -#include #include IMPLEMENT_STANDARD_RTTIEXT(TDF_Attribute,Standard_Transient) diff --git a/src/TDF/TDF_Attribute.hxx b/src/TDF/TDF_Attribute.hxx index 6ea9a836b5..e7aa964b80 100644 --- a/src/TDF/TDF_Attribute.hxx +++ b/src/TDF/TDF_Attribute.hxx @@ -22,7 +22,6 @@ #include #include #include -#include #include #include class TDF_Label; diff --git a/src/TDF/TDF_AttributeDataMap.hxx b/src/TDF/TDF_AttributeDataMap.hxx index b223594d8f..b679eea2e1 100644 --- a/src/TDF/TDF_AttributeDataMap.hxx +++ b/src/TDF/TDF_AttributeDataMap.hxx @@ -16,7 +16,6 @@ #ifndef TDF_AttributeDataMap_HeaderFile #define TDF_AttributeDataMap_HeaderFile -#include #include #include #include diff --git a/src/TDF/TDF_AttributeDelta.hxx b/src/TDF/TDF_AttributeDelta.hxx index 218dff3080..74b5bb040f 100644 --- a/src/TDF/TDF_AttributeDelta.hxx +++ b/src/TDF/TDF_AttributeDelta.hxx @@ -17,7 +17,6 @@ #define _TDF_AttributeDelta_HeaderFile #include -#include #include #include diff --git a/src/TDF/TDF_AttributeDoubleMap.hxx b/src/TDF/TDF_AttributeDoubleMap.hxx index 5d4b5486db..acbc467847 100644 --- a/src/TDF/TDF_AttributeDoubleMap.hxx +++ b/src/TDF/TDF_AttributeDoubleMap.hxx @@ -19,7 +19,6 @@ #include #include #include -#include #include typedef NCollection_DoubleMap TDF_AttributeDoubleMap; diff --git a/src/TDF/TDF_AttributeIterator.hxx b/src/TDF/TDF_AttributeIterator.hxx index 05e588f67a..3afd6ab793 100644 --- a/src/TDF/TDF_AttributeIterator.hxx +++ b/src/TDF/TDF_AttributeIterator.hxx @@ -22,7 +22,6 @@ #ifndef TDF_AttributeIterator_HeaderFile #define TDF_AttributeIterator_HeaderFile -#include #include #include diff --git a/src/TDF/TDF_ChildIDIterator.cxx b/src/TDF/TDF_ChildIDIterator.cxx index 01b26d8ac3..1ac9a91ae3 100644 --- a/src/TDF/TDF_ChildIDIterator.cxx +++ b/src/TDF/TDF_ChildIDIterator.cxx @@ -18,13 +18,10 @@ //Version Date Purpose // 0.0 Nov 20 1997 Creation -#include -#include #include #include #include #include -#include #define ChildIDIterator_FindNext \ { while( myItr.More() && !myItr.Value().FindAttribute(myID,myAtt)) myItr.Next(); } diff --git a/src/TDF/TDF_ChildIDIterator.hxx b/src/TDF/TDF_ChildIDIterator.hxx index a1ef304caf..3d89f2c584 100644 --- a/src/TDF/TDF_ChildIDIterator.hxx +++ b/src/TDF/TDF_ChildIDIterator.hxx @@ -22,7 +22,6 @@ #include #include -#include class TDF_Attribute; class TDF_Label; diff --git a/src/TDF/TDF_ChildIterator.cxx b/src/TDF/TDF_ChildIterator.cxx index e9b382da87..dbf71443b6 100644 --- a/src/TDF/TDF_ChildIterator.cxx +++ b/src/TDF/TDF_ChildIterator.cxx @@ -21,7 +21,6 @@ #include #include #include -#include #define ChildIterator_UpToBrother \ { \ diff --git a/src/TDF/TDF_ChildIterator.hxx b/src/TDF/TDF_ChildIterator.hxx index 84da9cbe15..dc1c15cea9 100644 --- a/src/TDF/TDF_ChildIterator.hxx +++ b/src/TDF/TDF_ChildIterator.hxx @@ -20,8 +20,6 @@ #include #include -#include -#include #include #include class TDF_Label; diff --git a/src/TDF/TDF_ClosureMode.hxx b/src/TDF/TDF_ClosureMode.hxx index 9693608a8f..89cea9891c 100644 --- a/src/TDF/TDF_ClosureMode.hxx +++ b/src/TDF/TDF_ClosureMode.hxx @@ -20,7 +20,6 @@ #include #include -#include #include diff --git a/src/TDF/TDF_ClosureTool.cxx b/src/TDF/TDF_ClosureTool.cxx index 40a7624b26..f7aad675b3 100644 --- a/src/TDF/TDF_ClosureTool.cxx +++ b/src/TDF/TDF_ClosureTool.cxx @@ -19,9 +19,7 @@ // 0.0 Sep 8 1998 Creation #include -#include #include -#include #include #include #include @@ -30,8 +28,6 @@ #include #include #include -#include -#include //======================================================================= //function : Closure diff --git a/src/TDF/TDF_ComparisonTool.cxx b/src/TDF/TDF_ComparisonTool.cxx index 53ee4f4ccf..12c6547150 100644 --- a/src/TDF/TDF_ComparisonTool.cxx +++ b/src/TDF/TDF_ComparisonTool.cxx @@ -18,22 +18,14 @@ //Version Date Purpose // 0.0 Sep 4 1997 Creation -#include -#include #include -#include #include #include -#include -#include #include #include #include -#include #include #include -#include -#include #include //======================================================================= diff --git a/src/TDF/TDF_ComparisonTool.hxx b/src/TDF/TDF_ComparisonTool.hxx index 2d2a81057a..38e596a7c7 100644 --- a/src/TDF/TDF_ComparisonTool.hxx +++ b/src/TDF/TDF_ComparisonTool.hxx @@ -20,7 +20,6 @@ #include #include -#include #include class TDF_DataSet; class TDF_IDFilter; diff --git a/src/TDF/TDF_CopyLabel.cxx b/src/TDF/TDF_CopyLabel.cxx index 1a392375ec..e2c701774c 100644 --- a/src/TDF/TDF_CopyLabel.cxx +++ b/src/TDF/TDF_CopyLabel.cxx @@ -16,7 +16,6 @@ #include -#include #include #include #include @@ -26,9 +25,6 @@ #include #include #include -#include -#include -#include #include #include diff --git a/src/TDF/TDF_CopyLabel.hxx b/src/TDF/TDF_CopyLabel.hxx index 33bd46ef35..f606045869 100644 --- a/src/TDF/TDF_CopyLabel.hxx +++ b/src/TDF/TDF_CopyLabel.hxx @@ -24,7 +24,6 @@ #include #include #include -#include class TDF_RelocationTable; class TDF_DataSet; diff --git a/src/TDF/TDF_CopyTool.cxx b/src/TDF/TDF_CopyTool.cxx index 66a024c948..c355d3a97f 100644 --- a/src/TDF/TDF_CopyTool.cxx +++ b/src/TDF/TDF_CopyTool.cxx @@ -18,24 +18,15 @@ //Version Date Purpose // 0.0 Mar 11 1997 Creation -#include -#include -#include #include -#include #include -#include #include -#include -#include #include #include #include #include #include #include -#include -#include #include //======================================================================= diff --git a/src/TDF/TDF_CopyTool.hxx b/src/TDF/TDF_CopyTool.hxx index d3553ac93d..6cf331be9c 100644 --- a/src/TDF/TDF_CopyTool.hxx +++ b/src/TDF/TDF_CopyTool.hxx @@ -20,7 +20,6 @@ #include #include -#include #include #include #include diff --git a/src/TDF/TDF_Data.cxx b/src/TDF/TDF_Data.cxx index 76d580d213..50e85d0fc2 100644 --- a/src/TDF/TDF_Data.cxx +++ b/src/TDF/TDF_Data.cxx @@ -16,15 +16,11 @@ #include #include -#include -#include #include #include #include #include -#include #include -#include #include #include #include @@ -36,9 +32,7 @@ #include #include #include -#include #include -#include typedef NCollection_Array1 TDF_Array1OfAttributeIDelta; diff --git a/src/TDF/TDF_Data.hxx b/src/TDF/TDF_Data.hxx index f1c8cf1e01..32dbfbba1d 100644 --- a/src/TDF/TDF_Data.hxx +++ b/src/TDF/TDF_Data.hxx @@ -21,7 +21,6 @@ #include #include -#include #include #include #include diff --git a/src/TDF/TDF_DataSet.cxx b/src/TDF/TDF_DataSet.cxx index b71c288513..7504d8df19 100644 --- a/src/TDF/TDF_DataSet.cxx +++ b/src/TDF/TDF_DataSet.cxx @@ -18,8 +18,6 @@ //Version Date Purpose // 0.0 Mar 11 1997 Creation -#include -#include #include #include #include diff --git a/src/TDF/TDF_DataSet.hxx b/src/TDF/TDF_DataSet.hxx index f05c85ed27..6f7a49d6b2 100644 --- a/src/TDF/TDF_DataSet.hxx +++ b/src/TDF/TDF_DataSet.hxx @@ -17,7 +17,6 @@ #define _TDF_DataSet_HeaderFile #include -#include #include #include diff --git a/src/TDF/TDF_DefaultDeltaOnModification.cxx b/src/TDF/TDF_DefaultDeltaOnModification.cxx index 7952bb21be..13ea860b96 100644 --- a/src/TDF/TDF_DefaultDeltaOnModification.cxx +++ b/src/TDF/TDF_DefaultDeltaOnModification.cxx @@ -20,7 +20,6 @@ #include #include -#include #include #include diff --git a/src/TDF/TDF_DefaultDeltaOnRemoval.cxx b/src/TDF/TDF_DefaultDeltaOnRemoval.cxx index 3269a534fb..c1d8cc425b 100644 --- a/src/TDF/TDF_DefaultDeltaOnRemoval.cxx +++ b/src/TDF/TDF_DefaultDeltaOnRemoval.cxx @@ -18,8 +18,6 @@ //Version Date Purpose // 0.0 Oct 10 1997 Creation -#include -#include #include #include diff --git a/src/TDF/TDF_DefaultDeltaOnRemoval.hxx b/src/TDF/TDF_DefaultDeltaOnRemoval.hxx index d6df9f935e..2fd3781c60 100644 --- a/src/TDF/TDF_DefaultDeltaOnRemoval.hxx +++ b/src/TDF/TDF_DefaultDeltaOnRemoval.hxx @@ -17,7 +17,6 @@ #define _TDF_DefaultDeltaOnRemoval_HeaderFile #include -#include #include class TDF_Attribute; diff --git a/src/TDF/TDF_Delta.cxx b/src/TDF/TDF_Delta.cxx index 09221db2d2..60d5b7c79b 100644 --- a/src/TDF/TDF_Delta.cxx +++ b/src/TDF/TDF_Delta.cxx @@ -21,11 +21,8 @@ #include #include #include -#include #include -#include #include -#include #include #include #include diff --git a/src/TDF/TDF_Delta.hxx b/src/TDF/TDF_Delta.hxx index f65bb86f3d..4071c33dc9 100644 --- a/src/TDF/TDF_Delta.hxx +++ b/src/TDF/TDF_Delta.hxx @@ -23,7 +23,6 @@ #include #include #include -#include #include #include class TDF_AttributeDelta; diff --git a/src/TDF/TDF_DeltaOnAddition.cxx b/src/TDF/TDF_DeltaOnAddition.cxx index fefc18630e..7cac5799de 100644 --- a/src/TDF/TDF_DeltaOnAddition.cxx +++ b/src/TDF/TDF_DeltaOnAddition.cxx @@ -20,7 +20,6 @@ #include #include -#include #include #include diff --git a/src/TDF/TDF_DeltaOnForget.cxx b/src/TDF/TDF_DeltaOnForget.cxx index ed8e309451..29847d736c 100644 --- a/src/TDF/TDF_DeltaOnForget.cxx +++ b/src/TDF/TDF_DeltaOnForget.cxx @@ -18,8 +18,6 @@ //Version Date Purpose // 0.0 Nov 3 1997 Creation -#include -#include #include #include diff --git a/src/TDF/TDF_DeltaOnForget.hxx b/src/TDF/TDF_DeltaOnForget.hxx index e39c4407f3..046f089f7c 100644 --- a/src/TDF/TDF_DeltaOnForget.hxx +++ b/src/TDF/TDF_DeltaOnForget.hxx @@ -17,7 +17,6 @@ #define _TDF_DeltaOnForget_HeaderFile #include -#include #include class TDF_Attribute; diff --git a/src/TDF/TDF_DeltaOnModification.cxx b/src/TDF/TDF_DeltaOnModification.cxx index 33330a968e..f07b51a92c 100644 --- a/src/TDF/TDF_DeltaOnModification.cxx +++ b/src/TDF/TDF_DeltaOnModification.cxx @@ -18,8 +18,6 @@ //Version Date Purpose // 0.0 Oct 10 1997 Creation -#include -#include #include IMPLEMENT_STANDARD_RTTIEXT(TDF_DeltaOnModification,TDF_AttributeDelta) diff --git a/src/TDF/TDF_DeltaOnModification.hxx b/src/TDF/TDF_DeltaOnModification.hxx index 7fbc0a081d..d0413f5ad7 100644 --- a/src/TDF/TDF_DeltaOnModification.hxx +++ b/src/TDF/TDF_DeltaOnModification.hxx @@ -17,7 +17,6 @@ #define _TDF_DeltaOnModification_HeaderFile #include -#include #include class TDF_Attribute; diff --git a/src/TDF/TDF_DeltaOnRemoval.cxx b/src/TDF/TDF_DeltaOnRemoval.cxx index e3a2dbd9a9..1c05b1854e 100644 --- a/src/TDF/TDF_DeltaOnRemoval.cxx +++ b/src/TDF/TDF_DeltaOnRemoval.cxx @@ -18,8 +18,6 @@ //Version Date Purpose // 0.0 Oct 10 1997 Creation -#include -#include #include IMPLEMENT_STANDARD_RTTIEXT(TDF_DeltaOnRemoval,TDF_AttributeDelta) diff --git a/src/TDF/TDF_DeltaOnRemoval.hxx b/src/TDF/TDF_DeltaOnRemoval.hxx index 8c1200656a..e5ebb43595 100644 --- a/src/TDF/TDF_DeltaOnRemoval.hxx +++ b/src/TDF/TDF_DeltaOnRemoval.hxx @@ -17,7 +17,6 @@ #define _TDF_DeltaOnRemoval_HeaderFile #include -#include #include class TDF_Attribute; diff --git a/src/TDF/TDF_DeltaOnResume.hxx b/src/TDF/TDF_DeltaOnResume.hxx index c27e0bb4fb..79bb570945 100644 --- a/src/TDF/TDF_DeltaOnResume.hxx +++ b/src/TDF/TDF_DeltaOnResume.hxx @@ -17,7 +17,6 @@ #define _TDF_DeltaOnResume_HeaderFile #include -#include #include class TDF_Attribute; diff --git a/src/TDF/TDF_GUIDProgIDMap.hxx b/src/TDF/TDF_GUIDProgIDMap.hxx index 89cbcb12d0..ebb4be6cee 100644 --- a/src/TDF/TDF_GUIDProgIDMap.hxx +++ b/src/TDF/TDF_GUIDProgIDMap.hxx @@ -16,8 +16,6 @@ #ifndef TDF_GUIDProgIDMap_HeaderFile #define TDF_GUIDProgIDMap_HeaderFile -#include -#include #include #include #include diff --git a/src/TDF/TDF_IDFilter.cxx b/src/TDF/TDF_IDFilter.cxx index 5b24e6ac24..abe3fee551 100644 --- a/src/TDF/TDF_IDFilter.cxx +++ b/src/TDF/TDF_IDFilter.cxx @@ -18,11 +18,8 @@ //Version Date Purpose // 0.0 May 26 1997 Creation -#include -#include #include #include -#include #include // To avoid too much resizing actions, et 23 est un nombre premier. diff --git a/src/TDF/TDF_IDFilter.hxx b/src/TDF/TDF_IDFilter.hxx index aad20f1763..b80858170f 100644 --- a/src/TDF/TDF_IDFilter.hxx +++ b/src/TDF/TDF_IDFilter.hxx @@ -20,7 +20,6 @@ #include #include -#include #include #include #include diff --git a/src/TDF/TDF_IDMap.hxx b/src/TDF/TDF_IDMap.hxx index 3463dfb7e1..51f3f2ad53 100644 --- a/src/TDF/TDF_IDMap.hxx +++ b/src/TDF/TDF_IDMap.hxx @@ -16,7 +16,6 @@ #ifndef TDF_IDMap_HeaderFile #define TDF_IDMap_HeaderFile -#include #include #include diff --git a/src/TDF/TDF_Label.cxx b/src/TDF/TDF_Label.cxx index 97459bbe39..7431ae9490 100644 --- a/src/TDF/TDF_Label.cxx +++ b/src/TDF/TDF_Label.cxx @@ -15,18 +15,13 @@ #include -#include #include #include -#include -#include -#include #include #include #include #include #include -#include #include #include #include diff --git a/src/TDF/TDF_Label.hxx b/src/TDF/TDF_Label.hxx index 66517c5be0..0cadd9d69f 100644 --- a/src/TDF/TDF_Label.hxx +++ b/src/TDF/TDF_Label.hxx @@ -23,7 +23,6 @@ #include #include -#include #include #include class TDF_Attribute; diff --git a/src/TDF/TDF_LabelDataMap.hxx b/src/TDF/TDF_LabelDataMap.hxx index f9c9e490c8..d428d85b65 100644 --- a/src/TDF/TDF_LabelDataMap.hxx +++ b/src/TDF/TDF_LabelDataMap.hxx @@ -16,7 +16,6 @@ #ifndef TDF_LabelDataMap_HeaderFile #define TDF_LabelDataMap_HeaderFile -#include #include #include #include diff --git a/src/TDF/TDF_LabelDoubleMap.hxx b/src/TDF/TDF_LabelDoubleMap.hxx index e6a5842fa2..1c6213b3b7 100644 --- a/src/TDF/TDF_LabelDoubleMap.hxx +++ b/src/TDF/TDF_LabelDoubleMap.hxx @@ -16,9 +16,6 @@ #ifndef TDF_LabelDoubleMap_HeaderFile #define TDF_LabelDoubleMap_HeaderFile -#include -#include -#include #include #include diff --git a/src/TDF/TDF_LabelIndexedMap.hxx b/src/TDF/TDF_LabelIndexedMap.hxx index 7642edcc17..8aba7f2dff 100644 --- a/src/TDF/TDF_LabelIndexedMap.hxx +++ b/src/TDF/TDF_LabelIndexedMap.hxx @@ -16,7 +16,6 @@ #ifndef TDF_LabelIndexedMap_HeaderFile #define TDF_LabelIndexedMap_HeaderFile -#include #include #include diff --git a/src/TDF/TDF_Reference.hxx b/src/TDF/TDF_Reference.hxx index 7a6540b6b3..6f0572e9a1 100644 --- a/src/TDF/TDF_Reference.hxx +++ b/src/TDF/TDF_Reference.hxx @@ -17,7 +17,6 @@ #define _TDF_Reference_HeaderFile #include -#include #include #include diff --git a/src/TDF/TDF_RelocationTable.cxx b/src/TDF/TDF_RelocationTable.cxx index 9b95993ee8..7f9b6588b8 100644 --- a/src/TDF/TDF_RelocationTable.cxx +++ b/src/TDF/TDF_RelocationTable.cxx @@ -19,11 +19,6 @@ // 0.0 Mar 7 1997 Creation #include -#include -#include -#include -#include -#include #include IMPLEMENT_STANDARD_RTTIEXT(TDF_RelocationTable,Standard_Transient) diff --git a/src/TDF/TDF_RelocationTable.hxx b/src/TDF/TDF_RelocationTable.hxx index b17509e2ed..14e178d272 100644 --- a/src/TDF/TDF_RelocationTable.hxx +++ b/src/TDF/TDF_RelocationTable.hxx @@ -17,9 +17,7 @@ #define _TDF_RelocationTable_HeaderFile #include -#include -#include #include #include #include diff --git a/src/TDF/TDF_Tool.cxx b/src/TDF/TDF_Tool.cxx index efa6ae9328..ca2228f9be 100644 --- a/src/TDF/TDF_Tool.cxx +++ b/src/TDF/TDF_Tool.cxx @@ -19,9 +19,6 @@ // 0.0 Mar 13 1997 Creation #include -#include -#include -#include #include #include #include diff --git a/src/TDF/TDF_Tool.hxx b/src/TDF/TDF_Tool.hxx index ca74adbace..086f887f88 100644 --- a/src/TDF/TDF_Tool.hxx +++ b/src/TDF/TDF_Tool.hxx @@ -21,7 +21,6 @@ #include #include -#include #include #include #include diff --git a/src/TDF/TDF_Transaction.hxx b/src/TDF/TDF_Transaction.hxx index c3fd291ca0..bd6013db71 100644 --- a/src/TDF/TDF_Transaction.hxx +++ b/src/TDF/TDF_Transaction.hxx @@ -22,7 +22,6 @@ #include #include -#include class TDF_Data; class TDF_Delta; diff --git a/src/TDataStd/TDataStd.cxx b/src/TDataStd/TDataStd.cxx index 0348e6b031..45a22f03a0 100644 --- a/src/TDataStd/TDataStd.cxx +++ b/src/TDataStd/TDataStd.cxx @@ -16,24 +16,15 @@ #include -#include #include #include #include #include #include #include -#include -#include -#include -#include -#include #include -#include -#include #include #include -#include //======================================================================= //function : IDList diff --git a/src/TDataStd/TDataStd_AsciiString.hxx b/src/TDataStd/TDataStd_AsciiString.hxx index 424b810f76..2c534b9a3b 100644 --- a/src/TDataStd/TDataStd_AsciiString.hxx +++ b/src/TDataStd/TDataStd_AsciiString.hxx @@ -17,11 +17,9 @@ #define _TDataStd_AsciiString_HeaderFile #include -#include #include #include -#include #include #include diff --git a/src/TDataStd/TDataStd_BooleanArray.hxx b/src/TDataStd/TDataStd_BooleanArray.hxx index 45772f3369..97c3c71e15 100644 --- a/src/TDataStd/TDataStd_BooleanArray.hxx +++ b/src/TDataStd/TDataStd_BooleanArray.hxx @@ -17,12 +17,10 @@ #define _TDataStd_BooleanArray_HeaderFile #include -#include #include #include #include -#include #include #include class TDF_Label; diff --git a/src/TDataStd/TDataStd_BooleanList.hxx b/src/TDataStd/TDataStd_BooleanList.hxx index b78051c666..c46a475679 100644 --- a/src/TDataStd/TDataStd_BooleanList.hxx +++ b/src/TDataStd/TDataStd_BooleanList.hxx @@ -17,11 +17,9 @@ #define _TDataStd_BooleanList_HeaderFile #include -#include #include #include -#include #include #include #include diff --git a/src/TDataStd/TDataStd_ByteArray.hxx b/src/TDataStd/TDataStd_ByteArray.hxx index 213c672360..29ec59e8ec 100644 --- a/src/TDataStd/TDataStd_ByteArray.hxx +++ b/src/TDataStd/TDataStd_ByteArray.hxx @@ -17,13 +17,10 @@ #define _TDataStd_ByteArray_HeaderFile #include -#include #include -#include #include #include -#include #include #include diff --git a/src/TDataStd/TDataStd_Current.hxx b/src/TDataStd/TDataStd_Current.hxx index 6b63979c3c..7aedcda0f0 100644 --- a/src/TDataStd/TDataStd_Current.hxx +++ b/src/TDataStd/TDataStd_Current.hxx @@ -18,7 +18,6 @@ #define _TDataStd_Current_HeaderFile #include -#include #include #include diff --git a/src/TDataStd/TDataStd_DataMapOfStringByte.hxx b/src/TDataStd/TDataStd_DataMapOfStringByte.hxx index d7282e23b5..cca3c899b6 100644 --- a/src/TDataStd/TDataStd_DataMapOfStringByte.hxx +++ b/src/TDataStd/TDataStd_DataMapOfStringByte.hxx @@ -17,8 +17,6 @@ #ifndef TDataStd_DataMapOfStringByte_HeaderFile #define TDataStd_DataMapOfStringByte_HeaderFile -#include -#include #include #include diff --git a/src/TDataStd/TDataStd_DataMapOfStringHArray1OfInteger.hxx b/src/TDataStd/TDataStd_DataMapOfStringHArray1OfInteger.hxx index 3344d6c4e0..ece7a88275 100644 --- a/src/TDataStd/TDataStd_DataMapOfStringHArray1OfInteger.hxx +++ b/src/TDataStd/TDataStd_DataMapOfStringHArray1OfInteger.hxx @@ -19,7 +19,6 @@ #include #include -#include #include typedef NCollection_DataMap TDataStd_DataMapOfStringHArray1OfInteger; diff --git a/src/TDataStd/TDataStd_DataMapOfStringHArray1OfReal.hxx b/src/TDataStd/TDataStd_DataMapOfStringHArray1OfReal.hxx index d98fcf9770..c6c702a5e1 100644 --- a/src/TDataStd/TDataStd_DataMapOfStringHArray1OfReal.hxx +++ b/src/TDataStd/TDataStd_DataMapOfStringHArray1OfReal.hxx @@ -19,7 +19,6 @@ #include #include -#include #include typedef NCollection_DataMap TDataStd_DataMapOfStringHArray1OfReal; diff --git a/src/TDataStd/TDataStd_DataMapOfStringReal.hxx b/src/TDataStd/TDataStd_DataMapOfStringReal.hxx index 5815845b79..942e20040c 100644 --- a/src/TDataStd/TDataStd_DataMapOfStringReal.hxx +++ b/src/TDataStd/TDataStd_DataMapOfStringReal.hxx @@ -17,8 +17,6 @@ #ifndef TDataStd_DataMapOfStringReal_HeaderFile #define TDataStd_DataMapOfStringReal_HeaderFile -#include -#include #include #include diff --git a/src/TDataStd/TDataStd_DataMapOfStringString.hxx b/src/TDataStd/TDataStd_DataMapOfStringString.hxx index b711e6859a..7738b8cc5f 100644 --- a/src/TDataStd/TDataStd_DataMapOfStringString.hxx +++ b/src/TDataStd/TDataStd_DataMapOfStringString.hxx @@ -17,8 +17,6 @@ #ifndef TDataStd_DataMapOfStringString_HeaderFile #define TDataStd_DataMapOfStringString_HeaderFile -#include -#include #include #include diff --git a/src/TDataStd/TDataStd_DeltaOnModificationOfByteArray.cxx b/src/TDataStd/TDataStd_DeltaOnModificationOfByteArray.cxx index 279e2349ce..54c623167b 100644 --- a/src/TDataStd/TDataStd_DeltaOnModificationOfByteArray.cxx +++ b/src/TDataStd/TDataStd_DeltaOnModificationOfByteArray.cxx @@ -18,10 +18,8 @@ #include #include #include -#include #include #include -#include #include #include diff --git a/src/TDataStd/TDataStd_DeltaOnModificationOfByteArray.hxx b/src/TDataStd/TDataStd_DeltaOnModificationOfByteArray.hxx index 2ac2558fbd..720c9c36dc 100644 --- a/src/TDataStd/TDataStd_DeltaOnModificationOfByteArray.hxx +++ b/src/TDataStd/TDataStd_DeltaOnModificationOfByteArray.hxx @@ -17,7 +17,6 @@ #define _TDataStd_DeltaOnModificationOfByteArray_HeaderFile #include -#include #include #include diff --git a/src/TDataStd/TDataStd_DeltaOnModificationOfExtStringArray.cxx b/src/TDataStd/TDataStd_DeltaOnModificationOfExtStringArray.cxx index edfa878b8c..2d55759218 100644 --- a/src/TDataStd/TDataStd_DeltaOnModificationOfExtStringArray.cxx +++ b/src/TDataStd/TDataStd_DeltaOnModificationOfExtStringArray.cxx @@ -17,10 +17,8 @@ #include #include -#include #include #include -#include #include #include diff --git a/src/TDataStd/TDataStd_DeltaOnModificationOfExtStringArray.hxx b/src/TDataStd/TDataStd_DeltaOnModificationOfExtStringArray.hxx index 3225fc3834..210a7ab908 100644 --- a/src/TDataStd/TDataStd_DeltaOnModificationOfExtStringArray.hxx +++ b/src/TDataStd/TDataStd_DeltaOnModificationOfExtStringArray.hxx @@ -17,7 +17,6 @@ #define _TDataStd_DeltaOnModificationOfExtStringArray_HeaderFile #include -#include #include #include diff --git a/src/TDataStd/TDataStd_DeltaOnModificationOfIntArray.cxx b/src/TDataStd/TDataStd_DeltaOnModificationOfIntArray.cxx index 5fc47bda80..89f197109e 100644 --- a/src/TDataStd/TDataStd_DeltaOnModificationOfIntArray.cxx +++ b/src/TDataStd/TDataStd_DeltaOnModificationOfIntArray.cxx @@ -17,10 +17,8 @@ #include #include -#include #include #include -#include #include #include diff --git a/src/TDataStd/TDataStd_DeltaOnModificationOfIntArray.hxx b/src/TDataStd/TDataStd_DeltaOnModificationOfIntArray.hxx index e8edd6c428..f473c5d53b 100644 --- a/src/TDataStd/TDataStd_DeltaOnModificationOfIntArray.hxx +++ b/src/TDataStd/TDataStd_DeltaOnModificationOfIntArray.hxx @@ -17,7 +17,6 @@ #define _TDataStd_DeltaOnModificationOfIntArray_HeaderFile #include -#include #include #include diff --git a/src/TDataStd/TDataStd_DeltaOnModificationOfIntPackedMap.cxx b/src/TDataStd/TDataStd_DeltaOnModificationOfIntPackedMap.cxx index 05947ca823..e3957fbae1 100644 --- a/src/TDataStd/TDataStd_DeltaOnModificationOfIntPackedMap.cxx +++ b/src/TDataStd/TDataStd_DeltaOnModificationOfIntPackedMap.cxx @@ -16,9 +16,6 @@ #include #include -#include -#include -#include #include #include #include diff --git a/src/TDataStd/TDataStd_DeltaOnModificationOfIntPackedMap.hxx b/src/TDataStd/TDataStd_DeltaOnModificationOfIntPackedMap.hxx index a6b1237e5c..aa9a36efdd 100644 --- a/src/TDataStd/TDataStd_DeltaOnModificationOfIntPackedMap.hxx +++ b/src/TDataStd/TDataStd_DeltaOnModificationOfIntPackedMap.hxx @@ -17,7 +17,6 @@ #define _TDataStd_DeltaOnModificationOfIntPackedMap_HeaderFile #include -#include #include class TColStd_HPackedMapOfInteger; diff --git a/src/TDataStd/TDataStd_DeltaOnModificationOfRealArray.cxx b/src/TDataStd/TDataStd_DeltaOnModificationOfRealArray.cxx index 6553ac15d1..d0b4b70f59 100644 --- a/src/TDataStd/TDataStd_DeltaOnModificationOfRealArray.cxx +++ b/src/TDataStd/TDataStd_DeltaOnModificationOfRealArray.cxx @@ -17,10 +17,8 @@ #include #include -#include #include #include -#include #include #include diff --git a/src/TDataStd/TDataStd_DeltaOnModificationOfRealArray.hxx b/src/TDataStd/TDataStd_DeltaOnModificationOfRealArray.hxx index 2f163ec730..320033535a 100644 --- a/src/TDataStd/TDataStd_DeltaOnModificationOfRealArray.hxx +++ b/src/TDataStd/TDataStd_DeltaOnModificationOfRealArray.hxx @@ -17,7 +17,6 @@ #define _TDataStd_DeltaOnModificationOfRealArray_HeaderFile #include -#include #include #include diff --git a/src/TDataStd/TDataStd_Directory.cxx b/src/TDataStd/TDataStd_Directory.cxx index 6746a4b1dc..4efa5848e5 100644 --- a/src/TDataStd/TDataStd_Directory.cxx +++ b/src/TDataStd/TDataStd_Directory.cxx @@ -17,8 +17,6 @@ #include #include -#include -#include #include #include #include diff --git a/src/TDataStd/TDataStd_Expression.hxx b/src/TDataStd/TDataStd_Expression.hxx index 71b21e7a7c..9bf2bfb4a7 100644 --- a/src/TDataStd/TDataStd_Expression.hxx +++ b/src/TDataStd/TDataStd_Expression.hxx @@ -18,7 +18,6 @@ #define _TDataStd_Expression_HeaderFile #include -#include #include #include diff --git a/src/TDataStd/TDataStd_ExtStringArray.hxx b/src/TDataStd/TDataStd_ExtStringArray.hxx index dc46b012ab..0c3cb3f9f0 100644 --- a/src/TDataStd/TDataStd_ExtStringArray.hxx +++ b/src/TDataStd/TDataStd_ExtStringArray.hxx @@ -17,10 +17,8 @@ #define _TDataStd_ExtStringArray_HeaderFile #include -#include #include -#include #include #include #include diff --git a/src/TDataStd/TDataStd_ExtStringList.hxx b/src/TDataStd/TDataStd_ExtStringList.hxx index 6d99cf6120..65948ead97 100644 --- a/src/TDataStd/TDataStd_ExtStringList.hxx +++ b/src/TDataStd/TDataStd_ExtStringList.hxx @@ -17,11 +17,9 @@ #define _TDataStd_ExtStringList_HeaderFile #include -#include #include #include -#include #include #include #include diff --git a/src/TDataStd/TDataStd_HDataMapOfStringByte.hxx b/src/TDataStd/TDataStd_HDataMapOfStringByte.hxx index 4101d92c83..440aa5e0c8 100644 --- a/src/TDataStd/TDataStd_HDataMapOfStringByte.hxx +++ b/src/TDataStd/TDataStd_HDataMapOfStringByte.hxx @@ -17,7 +17,6 @@ #define _TDataStd_HDataMapOfStringByte_HeaderFile #include -#include #include #include diff --git a/src/TDataStd/TDataStd_HDataMapOfStringHArray1OfInteger.hxx b/src/TDataStd/TDataStd_HDataMapOfStringHArray1OfInteger.hxx index 78f5e9b640..6c3cfe11ed 100644 --- a/src/TDataStd/TDataStd_HDataMapOfStringHArray1OfInteger.hxx +++ b/src/TDataStd/TDataStd_HDataMapOfStringHArray1OfInteger.hxx @@ -17,7 +17,6 @@ #define _TDataStd_HDataMapOfStringHArray1OfInteger_HeaderFile #include -#include #include #include diff --git a/src/TDataStd/TDataStd_HDataMapOfStringHArray1OfReal.hxx b/src/TDataStd/TDataStd_HDataMapOfStringHArray1OfReal.hxx index 8b27fbfc79..826aa3de15 100644 --- a/src/TDataStd/TDataStd_HDataMapOfStringHArray1OfReal.hxx +++ b/src/TDataStd/TDataStd_HDataMapOfStringHArray1OfReal.hxx @@ -17,7 +17,6 @@ #define _TDataStd_HDataMapOfStringHArray1OfReal_HeaderFile #include -#include #include #include diff --git a/src/TDataStd/TDataStd_HDataMapOfStringInteger.hxx b/src/TDataStd/TDataStd_HDataMapOfStringInteger.hxx index 025eb50136..ab67fad654 100644 --- a/src/TDataStd/TDataStd_HDataMapOfStringInteger.hxx +++ b/src/TDataStd/TDataStd_HDataMapOfStringInteger.hxx @@ -17,7 +17,6 @@ #define _TDataStd_HDataMapOfStringInteger_HeaderFile #include -#include #include #include diff --git a/src/TDataStd/TDataStd_HDataMapOfStringReal.hxx b/src/TDataStd/TDataStd_HDataMapOfStringReal.hxx index ad89572316..e9d7c6f497 100644 --- a/src/TDataStd/TDataStd_HDataMapOfStringReal.hxx +++ b/src/TDataStd/TDataStd_HDataMapOfStringReal.hxx @@ -17,7 +17,6 @@ #define _TDataStd_HDataMapOfStringReal_HeaderFile #include -#include #include #include diff --git a/src/TDataStd/TDataStd_HDataMapOfStringString.hxx b/src/TDataStd/TDataStd_HDataMapOfStringString.hxx index 4e95d665ef..51e0459906 100644 --- a/src/TDataStd/TDataStd_HDataMapOfStringString.hxx +++ b/src/TDataStd/TDataStd_HDataMapOfStringString.hxx @@ -17,7 +17,6 @@ #define _TDataStd_HDataMapOfStringString_HeaderFile #include -#include #include #include diff --git a/src/TDataStd/TDataStd_IntPackedMap.hxx b/src/TDataStd/TDataStd_IntPackedMap.hxx index 2a13cb118f..3fed39f5b5 100644 --- a/src/TDataStd/TDataStd_IntPackedMap.hxx +++ b/src/TDataStd/TDataStd_IntPackedMap.hxx @@ -17,7 +17,6 @@ #define _TDataStd_IntPackedMap_HeaderFile #include -#include #include #include diff --git a/src/TDataStd/TDataStd_Integer.hxx b/src/TDataStd/TDataStd_Integer.hxx index 299f2dd88c..f670721b2b 100644 --- a/src/TDataStd/TDataStd_Integer.hxx +++ b/src/TDataStd/TDataStd_Integer.hxx @@ -18,11 +18,9 @@ #define _TDataStd_Integer_HeaderFile #include -#include #include #include -#include #include #include diff --git a/src/TDataStd/TDataStd_IntegerArray.hxx b/src/TDataStd/TDataStd_IntegerArray.hxx index 514587927a..2672aac31d 100644 --- a/src/TDataStd/TDataStd_IntegerArray.hxx +++ b/src/TDataStd/TDataStd_IntegerArray.hxx @@ -18,10 +18,8 @@ #define _TDataStd_IntegerArray_HeaderFile #include -#include #include -#include #include #include #include diff --git a/src/TDataStd/TDataStd_IntegerList.hxx b/src/TDataStd/TDataStd_IntegerList.hxx index 883cb33a8d..4b36444244 100644 --- a/src/TDataStd/TDataStd_IntegerList.hxx +++ b/src/TDataStd/TDataStd_IntegerList.hxx @@ -17,11 +17,9 @@ #define _TDataStd_IntegerList_HeaderFile #include -#include #include #include -#include #include #include #include diff --git a/src/TDataStd/TDataStd_ListOfByte.hxx b/src/TDataStd/TDataStd_ListOfByte.hxx index 3728480b04..ccc95b2b07 100644 --- a/src/TDataStd/TDataStd_ListOfByte.hxx +++ b/src/TDataStd/TDataStd_ListOfByte.hxx @@ -17,7 +17,6 @@ #ifndef TDataStd_ListOfByte_HeaderFile #define TDataStd_ListOfByte_HeaderFile -#include #include typedef NCollection_List TDataStd_ListOfByte; diff --git a/src/TDataStd/TDataStd_NamedData.hxx b/src/TDataStd/TDataStd_NamedData.hxx index d3b58d5c95..e147aea23f 100644 --- a/src/TDataStd/TDataStd_NamedData.hxx +++ b/src/TDataStd/TDataStd_NamedData.hxx @@ -18,8 +18,6 @@ #include #include -#include -#include #include #include #include diff --git a/src/TDataStd/TDataStd_NoteBook.cxx b/src/TDataStd/TDataStd_NoteBook.cxx index 3265e93a27..0cb316b10f 100644 --- a/src/TDataStd/TDataStd_NoteBook.cxx +++ b/src/TDataStd/TDataStd_NoteBook.cxx @@ -17,8 +17,6 @@ #include #include -#include -#include #include #include #include diff --git a/src/TDataStd/TDataStd_Real.hxx b/src/TDataStd/TDataStd_Real.hxx index b390b6749d..c638d9bb98 100644 --- a/src/TDataStd/TDataStd_Real.hxx +++ b/src/TDataStd/TDataStd_Real.hxx @@ -18,12 +18,10 @@ #define _TDataStd_Real_HeaderFile #include -#include #include #include #include -#include #include #include diff --git a/src/TDataStd/TDataStd_RealArray.hxx b/src/TDataStd/TDataStd_RealArray.hxx index 0fe5f3937e..1e6fb80e2b 100644 --- a/src/TDataStd/TDataStd_RealArray.hxx +++ b/src/TDataStd/TDataStd_RealArray.hxx @@ -18,10 +18,8 @@ #define _TDataStd_RealArray_HeaderFile #include -#include #include -#include #include #include #include diff --git a/src/TDataStd/TDataStd_RealList.hxx b/src/TDataStd/TDataStd_RealList.hxx index f78cdd4c23..b3bba0f8a9 100644 --- a/src/TDataStd/TDataStd_RealList.hxx +++ b/src/TDataStd/TDataStd_RealList.hxx @@ -17,11 +17,9 @@ #define _TDataStd_RealList_HeaderFile #include -#include #include #include -#include #include #include #include diff --git a/src/TDataStd/TDataStd_ReferenceArray.hxx b/src/TDataStd/TDataStd_ReferenceArray.hxx index b832db2594..dcd9a7f849 100644 --- a/src/TDataStd/TDataStd_ReferenceArray.hxx +++ b/src/TDataStd/TDataStd_ReferenceArray.hxx @@ -17,13 +17,11 @@ #define _TDataStd_ReferenceArray_HeaderFile #include -#include #include #include #include #include -#include #include #include diff --git a/src/TDataStd/TDataStd_ReferenceList.cxx b/src/TDataStd/TDataStd_ReferenceList.cxx index 8fa9610cc5..1787685dda 100644 --- a/src/TDataStd/TDataStd_ReferenceList.cxx +++ b/src/TDataStd/TDataStd_ReferenceList.cxx @@ -21,7 +21,6 @@ #include #include #include -#include #include #include diff --git a/src/TDataStd/TDataStd_ReferenceList.hxx b/src/TDataStd/TDataStd_ReferenceList.hxx index d2ff32c66c..1fa506db85 100644 --- a/src/TDataStd/TDataStd_ReferenceList.hxx +++ b/src/TDataStd/TDataStd_ReferenceList.hxx @@ -17,11 +17,9 @@ #define _TDataStd_ReferenceList_HeaderFile #include -#include #include #include -#include #include #include #include diff --git a/src/TDataStd/TDataStd_TreeNode.hxx b/src/TDataStd/TDataStd_TreeNode.hxx index 8fe4d02979..f5aa93a5c5 100644 --- a/src/TDataStd/TDataStd_TreeNode.hxx +++ b/src/TDataStd/TDataStd_TreeNode.hxx @@ -18,12 +18,10 @@ #define _TDataStd_TreeNode_HeaderFile #include -#include #include #include #include -#include #include #include class TDF_Label; diff --git a/src/TDataStd/TDataStd_UAttribute.hxx b/src/TDataStd/TDataStd_UAttribute.hxx index 7d9bcccbc7..0dc2d2865a 100644 --- a/src/TDataStd/TDataStd_UAttribute.hxx +++ b/src/TDataStd/TDataStd_UAttribute.hxx @@ -18,7 +18,6 @@ #define _TDataStd_UAttribute_HeaderFile #include -#include #include #include diff --git a/src/TDataStd/TDataStd_Variable.cxx b/src/TDataStd/TDataStd_Variable.cxx index 9a37fcae93..eb3b998400 100644 --- a/src/TDataStd/TDataStd_Variable.cxx +++ b/src/TDataStd/TDataStd_Variable.cxx @@ -18,10 +18,8 @@ #include #include -#include #include #include -#include #include #include #include diff --git a/src/TDataStd/TDataStd_Variable.hxx b/src/TDataStd/TDataStd_Variable.hxx index ec8022eaa5..97c803ee80 100644 --- a/src/TDataStd/TDataStd_Variable.hxx +++ b/src/TDataStd/TDataStd_Variable.hxx @@ -18,9 +18,7 @@ #define _TDataStd_Variable_HeaderFile #include -#include -#include #include #include #include diff --git a/src/TDataXtd/TDataXtd_Axis.cxx b/src/TDataXtd/TDataXtd_Axis.cxx index 186fa823e8..1a31262f74 100644 --- a/src/TDataXtd/TDataXtd_Axis.cxx +++ b/src/TDataXtd/TDataXtd_Axis.cxx @@ -16,24 +16,16 @@ #include #include #include -#include -#include -#include #include #include -#include #include -#include #include #include #include #include #include #include -#include #include -#include -#include #include #include diff --git a/src/TDataXtd/TDataXtd_Constraint.hxx b/src/TDataXtd/TDataXtd_Constraint.hxx index a9a79897f5..98dbe9743d 100644 --- a/src/TDataXtd/TDataXtd_Constraint.hxx +++ b/src/TDataXtd/TDataXtd_Constraint.hxx @@ -20,7 +20,6 @@ #include #include -#include #include #include #include diff --git a/src/TDataXtd/TDataXtd_Geometry.cxx b/src/TDataXtd/TDataXtd_Geometry.cxx index f2e5beefc1..d9b258a5b0 100644 --- a/src/TDataXtd/TDataXtd_Geometry.cxx +++ b/src/TDataXtd/TDataXtd_Geometry.cxx @@ -27,24 +27,17 @@ #include #include #include -#include #include #include -#include -#include #include -#include #include #include #include #include #include -#include #include -#include #include #include -#include #include IMPLEMENT_STANDARD_RTTIEXT(TDataXtd_Geometry,TDF_Attribute) diff --git a/src/TDataXtd/TDataXtd_Geometry.hxx b/src/TDataXtd/TDataXtd_Geometry.hxx index 836d7533b2..7b38c5d951 100644 --- a/src/TDataXtd/TDataXtd_Geometry.hxx +++ b/src/TDataXtd/TDataXtd_Geometry.hxx @@ -21,7 +21,6 @@ #include #include -#include #include class TDF_Label; class TNaming_NamedShape; diff --git a/src/TDataXtd/TDataXtd_PatternStd.cxx b/src/TDataXtd/TDataXtd_PatternStd.cxx index 058c9e9ac5..f40867bb15 100644 --- a/src/TDataXtd/TDataXtd_PatternStd.cxx +++ b/src/TDataXtd/TDataXtd_PatternStd.cxx @@ -15,11 +15,9 @@ #include -#include #include #include #include -#include #include #include #include diff --git a/src/TDataXtd/TDataXtd_PatternStd.hxx b/src/TDataXtd/TDataXtd_PatternStd.hxx index a41975edb6..432ec23142 100644 --- a/src/TDataXtd/TDataXtd_PatternStd.hxx +++ b/src/TDataXtd/TDataXtd_PatternStd.hxx @@ -20,7 +20,6 @@ #include #include -#include #include #include #include diff --git a/src/TDataXtd/TDataXtd_Plane.cxx b/src/TDataXtd/TDataXtd_Plane.cxx index f9e583dd3f..9b72408808 100644 --- a/src/TDataXtd/TDataXtd_Plane.cxx +++ b/src/TDataXtd/TDataXtd_Plane.cxx @@ -17,21 +17,16 @@ #include #include #include -#include #include #include -#include #include -#include #include #include #include #include #include #include -#include #include -#include #include #include diff --git a/src/TDataXtd/TDataXtd_Point.cxx b/src/TDataXtd/TDataXtd_Point.cxx index d3fc872d5a..3cd6c8f0a5 100644 --- a/src/TDataXtd/TDataXtd_Point.cxx +++ b/src/TDataXtd/TDataXtd_Point.cxx @@ -18,18 +18,14 @@ #include #include #include -#include #include -#include #include #include #include #include #include #include -#include #include -#include #include #include diff --git a/src/TDataXtd/TDataXtd_Position.hxx b/src/TDataXtd/TDataXtd_Position.hxx index 62097520ec..592a970165 100644 --- a/src/TDataXtd/TDataXtd_Position.hxx +++ b/src/TDataXtd/TDataXtd_Position.hxx @@ -21,7 +21,6 @@ #include #include -#include class TDF_Label; class Standard_GUID; class TDF_RelocationTable; diff --git a/src/TDataXtd/TDataXtd_Presentation.cxx b/src/TDataXtd/TDataXtd_Presentation.cxx index 5656ae13cb..c4c266e1df 100644 --- a/src/TDataXtd/TDataXtd_Presentation.cxx +++ b/src/TDataXtd/TDataXtd_Presentation.cxx @@ -17,8 +17,6 @@ #include #include -#include -#include #include #include diff --git a/src/TDataXtd/TDataXtd_Presentation.hxx b/src/TDataXtd/TDataXtd_Presentation.hxx index 23f47b3d0c..276d690eeb 100644 --- a/src/TDataXtd/TDataXtd_Presentation.hxx +++ b/src/TDataXtd/TDataXtd_Presentation.hxx @@ -17,7 +17,6 @@ #define _TDataXtd_Presentation_HeaderFile #include -#include #include #include diff --git a/src/TDataXtd/TDataXtd_Shape.cxx b/src/TDataXtd/TDataXtd_Shape.cxx index 8a89135755..6b9e5cdbda 100644 --- a/src/TDataXtd/TDataXtd_Shape.cxx +++ b/src/TDataXtd/TDataXtd_Shape.cxx @@ -15,21 +15,16 @@ #include -#include #include -#include #include #include #include #include #include #include -#include #include -#include #include #include -#include IMPLEMENT_DERIVED_ATTRIBUTE(TDataXtd_Shape, TDataStd_GenericEmpty) diff --git a/src/TDataXtd/TDataXtd_Triangulation.cxx b/src/TDataXtd/TDataXtd_Triangulation.cxx index 389e09d1af..54d1dd2cc3 100644 --- a/src/TDataXtd/TDataXtd_Triangulation.cxx +++ b/src/TDataXtd/TDataXtd_Triangulation.cxx @@ -15,7 +15,6 @@ #include #include -#include #include #include #include diff --git a/src/TDataXtd/TDataXtd_Triangulation.hxx b/src/TDataXtd/TDataXtd_Triangulation.hxx index 11ed2b767c..8c7a4acf41 100644 --- a/src/TDataXtd/TDataXtd_Triangulation.hxx +++ b/src/TDataXtd/TDataXtd_Triangulation.hxx @@ -17,11 +17,9 @@ #define _TDataXtd_Triangulation_HeaderFile #include -#include #include #include -#include #include #include class Standard_GUID; diff --git a/src/TDocStd/TDocStd.cxx b/src/TDocStd/TDocStd.cxx index 04261f149d..b6f56ede0b 100644 --- a/src/TDocStd/TDocStd.cxx +++ b/src/TDocStd/TDocStd.cxx @@ -22,7 +22,6 @@ #include -#include #include //#include diff --git a/src/TDocStd/TDocStd_Application.cxx b/src/TDocStd/TDocStd_Application.cxx index d172b0228f..7157746eb8 100644 --- a/src/TDocStd/TDocStd_Application.cxx +++ b/src/TDocStd/TDocStd_Application.cxx @@ -22,14 +22,12 @@ #include #include #include -#include #include #include #include #include #include #include -#include #include #include #include diff --git a/src/TDocStd/TDocStd_Application.hxx b/src/TDocStd/TDocStd_Application.hxx index 80f0c94de3..c14fdf2ea1 100644 --- a/src/TDocStd/TDocStd_Application.hxx +++ b/src/TDocStd/TDocStd_Application.hxx @@ -18,12 +18,9 @@ #define _TDocStd_Application_HeaderFile #include -#include -#include #include #include -#include #include #include #include diff --git a/src/TDocStd/TDocStd_ApplicationDelta.cxx b/src/TDocStd/TDocStd_ApplicationDelta.cxx index 6c64a88506..96e5dbef9f 100644 --- a/src/TDocStd/TDocStd_ApplicationDelta.cxx +++ b/src/TDocStd/TDocStd_ApplicationDelta.cxx @@ -16,7 +16,6 @@ #include #include -#include #include #include diff --git a/src/TDocStd/TDocStd_ApplicationDelta.hxx b/src/TDocStd/TDocStd_ApplicationDelta.hxx index f95d0281e9..b91b026699 100644 --- a/src/TDocStd/TDocStd_ApplicationDelta.hxx +++ b/src/TDocStd/TDocStd_ApplicationDelta.hxx @@ -17,7 +17,6 @@ #define _TDocStd_ApplicationDelta_HeaderFile #include -#include #include #include diff --git a/src/TDocStd/TDocStd_CompoundDelta.hxx b/src/TDocStd/TDocStd_CompoundDelta.hxx index f28731c916..9e92489e62 100644 --- a/src/TDocStd/TDocStd_CompoundDelta.hxx +++ b/src/TDocStd/TDocStd_CompoundDelta.hxx @@ -16,7 +16,6 @@ #define _TDocStd_CompoundDelta_HeaderFile #include -#include #include diff --git a/src/TDocStd/TDocStd_Document.cxx b/src/TDocStd/TDocStd_Document.cxx index a8bd3c9cc0..94c732866c 100644 --- a/src/TDocStd/TDocStd_Document.cxx +++ b/src/TDocStd/TDocStd_Document.cxx @@ -22,12 +22,9 @@ #include #include #include -#include #include #include -#include #include -#include #include #include #include diff --git a/src/TDocStd/TDocStd_Document.hxx b/src/TDocStd/TDocStd_Document.hxx index 2980a7e10c..4e0c752b31 100644 --- a/src/TDocStd/TDocStd_Document.hxx +++ b/src/TDocStd/TDocStd_Document.hxx @@ -18,13 +18,10 @@ #define _TDocStd_Document_HeaderFile #include -#include -#include #include #include #include -#include #include #include #include diff --git a/src/TDocStd/TDocStd_Modified.cxx b/src/TDocStd/TDocStd_Modified.cxx index df67833818..fa945dc276 100644 --- a/src/TDocStd/TDocStd_Modified.cxx +++ b/src/TDocStd/TDocStd_Modified.cxx @@ -20,7 +20,6 @@ #include #include #include -#include #include #include diff --git a/src/TDocStd/TDocStd_Modified.hxx b/src/TDocStd/TDocStd_Modified.hxx index e3d7697ef9..1c0674904b 100644 --- a/src/TDocStd/TDocStd_Modified.hxx +++ b/src/TDocStd/TDocStd_Modified.hxx @@ -18,7 +18,6 @@ #define _TDocStd_Modified_HeaderFile #include -#include #include #include diff --git a/src/TDocStd/TDocStd_MultiTransactionManager.hxx b/src/TDocStd/TDocStd_MultiTransactionManager.hxx index d0c46f9d73..38101662f2 100644 --- a/src/TDocStd/TDocStd_MultiTransactionManager.hxx +++ b/src/TDocStd/TDocStd_MultiTransactionManager.hxx @@ -17,9 +17,7 @@ #define _TDocStd_MultiTransactionManager_HeaderFile #include -#include -#include #include #include #include diff --git a/src/TDocStd/TDocStd_PathParser.hxx b/src/TDocStd/TDocStd_PathParser.hxx index d39d21e42c..7a1633fb09 100644 --- a/src/TDocStd/TDocStd_PathParser.hxx +++ b/src/TDocStd/TDocStd_PathParser.hxx @@ -22,7 +22,6 @@ #include #include -#include //! parse an OS path diff --git a/src/TDocStd/TDocStd_XLink.cxx b/src/TDocStd/TDocStd_XLink.cxx index be54a25ccb..76e0fc7426 100644 --- a/src/TDocStd/TDocStd_XLink.cxx +++ b/src/TDocStd/TDocStd_XLink.cxx @@ -20,8 +20,6 @@ #include -#include -#include #include #include #include @@ -34,7 +32,6 @@ #include #include #include -#include #include IMPLEMENT_STANDARD_RTTIEXT(TDocStd_XLink,TDF_Attribute) diff --git a/src/TDocStd/TDocStd_XLink.hxx b/src/TDocStd/TDocStd_XLink.hxx index fb70716913..af30002242 100644 --- a/src/TDocStd/TDocStd_XLink.hxx +++ b/src/TDocStd/TDocStd_XLink.hxx @@ -17,12 +17,10 @@ #define _TDocStd_XLink_HeaderFile #include -#include #include #include #include -#include #include class TDF_Label; class TDF_Reference; diff --git a/src/TDocStd/TDocStd_XLinkIterator.cxx b/src/TDocStd/TDocStd_XLinkIterator.cxx index 84809a9fc9..3e61c98c40 100644 --- a/src/TDocStd/TDocStd_XLinkIterator.cxx +++ b/src/TDocStd/TDocStd_XLinkIterator.cxx @@ -21,7 +21,6 @@ #include #include -#include #include #include #include diff --git a/src/TDocStd/TDocStd_XLinkTool.cxx b/src/TDocStd/TDocStd_XLinkTool.cxx index 8fefef9f19..cb51806e60 100644 --- a/src/TDocStd/TDocStd_XLinkTool.cxx +++ b/src/TDocStd/TDocStd_XLinkTool.cxx @@ -16,22 +16,13 @@ #include -#include -#include -#include #include #include #include -#include #include #include #include -#include #include -#include -#include -#include -#include #include #include #include diff --git a/src/TFunction/TFunction_DataMapOfGUIDDriver.hxx b/src/TFunction/TFunction_DataMapOfGUIDDriver.hxx index 89ea3ca881..44b0da4e42 100644 --- a/src/TFunction/TFunction_DataMapOfGUIDDriver.hxx +++ b/src/TFunction/TFunction_DataMapOfGUIDDriver.hxx @@ -17,7 +17,6 @@ #ifndef TFunction_DataMapOfGUIDDriver_HeaderFile #define TFunction_DataMapOfGUIDDriver_HeaderFile -#include #include #include #include diff --git a/src/TFunction/TFunction_DataMapOfLabelListOfLabel.hxx b/src/TFunction/TFunction_DataMapOfLabelListOfLabel.hxx index 7fb277f2dd..c542ad488d 100644 --- a/src/TFunction/TFunction_DataMapOfLabelListOfLabel.hxx +++ b/src/TFunction/TFunction_DataMapOfLabelListOfLabel.hxx @@ -17,7 +17,6 @@ #ifndef TFunction_DataMapOfLabelListOfLabel_HeaderFile #define TFunction_DataMapOfLabelListOfLabel_HeaderFile -#include #include #include #include diff --git a/src/TFunction/TFunction_Driver.cxx b/src/TFunction/TFunction_Driver.cxx index 667af55996..230d0049c3 100644 --- a/src/TFunction/TFunction_Driver.cxx +++ b/src/TFunction/TFunction_Driver.cxx @@ -15,9 +15,6 @@ // commercial license or contractual agreement. -#include -#include -#include #include #include diff --git a/src/TFunction/TFunction_Driver.hxx b/src/TFunction/TFunction_Driver.hxx index c82dc7baf4..fb1b822800 100644 --- a/src/TFunction/TFunction_Driver.hxx +++ b/src/TFunction/TFunction_Driver.hxx @@ -18,9 +18,7 @@ #define _TFunction_Driver_HeaderFile #include -#include -#include #include #include #include diff --git a/src/TFunction/TFunction_DriverTable.hxx b/src/TFunction/TFunction_DriverTable.hxx index 67992b625b..c7c05ef1de 100644 --- a/src/TFunction/TFunction_DriverTable.hxx +++ b/src/TFunction/TFunction_DriverTable.hxx @@ -23,7 +23,6 @@ #include #include #include -#include #include #include class Standard_GUID; diff --git a/src/TFunction/TFunction_Function.cxx b/src/TFunction/TFunction_Function.cxx index c5f1f500af..721a4b7335 100644 --- a/src/TFunction/TFunction_Function.cxx +++ b/src/TFunction/TFunction_Function.cxx @@ -17,15 +17,11 @@ #include #include -#include #include -#include #include #include #include #include -#include -#include IMPLEMENT_STANDARD_RTTIEXT(TFunction_Function,TDF_Attribute) diff --git a/src/TFunction/TFunction_Function.hxx b/src/TFunction/TFunction_Function.hxx index d191a56931..438169d90b 100644 --- a/src/TFunction/TFunction_Function.hxx +++ b/src/TFunction/TFunction_Function.hxx @@ -23,7 +23,6 @@ #include #include #include -#include #include class TDF_Label; class TDF_RelocationTable; diff --git a/src/TFunction/TFunction_GraphNode.cxx b/src/TFunction/TFunction_GraphNode.cxx index b6b80b4eb2..29a1d61707 100644 --- a/src/TFunction/TFunction_GraphNode.cxx +++ b/src/TFunction/TFunction_GraphNode.cxx @@ -16,7 +16,6 @@ #include #include -#include #include #include #include diff --git a/src/TFunction/TFunction_GraphNode.hxx b/src/TFunction/TFunction_GraphNode.hxx index 7d00f1ed7b..d0986bfff9 100644 --- a/src/TFunction/TFunction_GraphNode.hxx +++ b/src/TFunction/TFunction_GraphNode.hxx @@ -22,7 +22,6 @@ #include #include #include -#include #include #include class TDF_Label; diff --git a/src/TFunction/TFunction_HArray1OfDataMapOfGUIDDriver.hxx b/src/TFunction/TFunction_HArray1OfDataMapOfGUIDDriver.hxx index a3a3c4ea91..b0063fa306 100644 --- a/src/TFunction/TFunction_HArray1OfDataMapOfGUIDDriver.hxx +++ b/src/TFunction/TFunction_HArray1OfDataMapOfGUIDDriver.hxx @@ -17,7 +17,6 @@ #ifndef TFunction_HArray1OfDataMapOfGUIDDriver_HeaderFile #define TFunction_HArray1OfDataMapOfGUIDDriver_HeaderFile -#include #include #include diff --git a/src/TFunction/TFunction_IFunction.cxx b/src/TFunction/TFunction_IFunction.cxx index 8a2938e6ae..17d92c26c1 100644 --- a/src/TFunction/TFunction_IFunction.cxx +++ b/src/TFunction/TFunction_IFunction.cxx @@ -14,22 +14,11 @@ // commercial license or contractual agreement. -#include -#include -#include -#include -#include -#include -#include -#include #include -#include -#include #include #include #include #include -#include #include //======================================================================= diff --git a/src/TFunction/TFunction_IFunction.hxx b/src/TFunction/TFunction_IFunction.hxx index b8c8f51426..45ce4420fe 100644 --- a/src/TFunction/TFunction_IFunction.hxx +++ b/src/TFunction/TFunction_IFunction.hxx @@ -21,7 +21,6 @@ #include #include -#include #include #include #include diff --git a/src/TFunction/TFunction_Iterator.cxx b/src/TFunction/TFunction_Iterator.cxx index b1836e18ac..872b9e0273 100644 --- a/src/TFunction/TFunction_Iterator.cxx +++ b/src/TFunction/TFunction_Iterator.cxx @@ -14,15 +14,8 @@ // commercial license or contractual agreement. -#include #include -#include -#include #include -#include -#include -#include -#include #include #include #include diff --git a/src/TFunction/TFunction_Iterator.hxx b/src/TFunction/TFunction_Iterator.hxx index 4db065f083..86e928c3db 100644 --- a/src/TFunction/TFunction_Iterator.hxx +++ b/src/TFunction/TFunction_Iterator.hxx @@ -21,7 +21,6 @@ #include #include -#include #include #include #include diff --git a/src/TFunction/TFunction_Logbook.cxx b/src/TFunction/TFunction_Logbook.cxx index 448088bbab..3808968cb2 100644 --- a/src/TFunction/TFunction_Logbook.cxx +++ b/src/TFunction/TFunction_Logbook.cxx @@ -16,11 +16,8 @@ #include -#include #include #include -#include -#include #include #include #include diff --git a/src/TFunction/TFunction_Logbook.hxx b/src/TFunction/TFunction_Logbook.hxx index 76fa46dca4..0a558f1a1c 100644 --- a/src/TFunction/TFunction_Logbook.hxx +++ b/src/TFunction/TFunction_Logbook.hxx @@ -23,7 +23,6 @@ #include #include -#include #include class TDF_Label; class Standard_GUID; diff --git a/src/TFunction/TFunction_Scope.cxx b/src/TFunction/TFunction_Scope.cxx index 67eedbab2c..949a1acc4b 100644 --- a/src/TFunction/TFunction_Scope.cxx +++ b/src/TFunction/TFunction_Scope.cxx @@ -16,9 +16,7 @@ #include #include -#include #include -#include #include #include diff --git a/src/TFunction/TFunction_Scope.hxx b/src/TFunction/TFunction_Scope.hxx index 68e470d429..77b4cce7af 100644 --- a/src/TFunction/TFunction_Scope.hxx +++ b/src/TFunction/TFunction_Scope.hxx @@ -23,7 +23,6 @@ #include #include #include -#include #include class TDF_Label; class Standard_GUID; diff --git a/src/TNaming/TNaming.cxx b/src/TNaming/TNaming.cxx index 3e9bd279dc..9051d0d615 100644 --- a/src/TNaming/TNaming.cxx +++ b/src/TNaming/TNaming.cxx @@ -22,23 +22,16 @@ #include #include #include -#include #include #include #include -#include #include -#include -#include -#include -#include #include #include #include #include #include #include -#include #include #include #include @@ -48,13 +41,9 @@ #include #include #include -#include -#include #include #include -#include #include -#include #include // CopyShape diff --git a/src/TNaming/TNaming.hxx b/src/TNaming/TNaming.hxx index d63f3544ba..ffe0ab18d0 100644 --- a/src/TNaming/TNaming.hxx +++ b/src/TNaming/TNaming.hxx @@ -22,7 +22,6 @@ #include #include -#include #include #include #include diff --git a/src/TNaming/TNaming_CopyShape.cxx b/src/TNaming/TNaming_CopyShape.cxx index 4ebb16a607..759bb200db 100644 --- a/src/TNaming/TNaming_CopyShape.cxx +++ b/src/TNaming/TNaming_CopyShape.cxx @@ -16,14 +16,9 @@ #include #include -#include #include -#include -#include -#include #include #include -#include //======================================================================= //function : CopyTool diff --git a/src/TNaming/TNaming_DataMapOfShapeShapesSet.hxx b/src/TNaming/TNaming_DataMapOfShapeShapesSet.hxx index 8dd2fa5e6b..b8e5d622c6 100644 --- a/src/TNaming/TNaming_DataMapOfShapeShapesSet.hxx +++ b/src/TNaming/TNaming_DataMapOfShapeShapesSet.hxx @@ -17,7 +17,6 @@ #ifndef TNaming_DataMapOfShapeShapesSet_HeaderFile #define TNaming_DataMapOfShapeShapesSet_HeaderFile -#include #include #include #include diff --git a/src/TNaming/TNaming_DeltaOnModification.cxx b/src/TNaming/TNaming_DeltaOnModification.cxx index 1ef2b2359e..1a2aac8bfb 100644 --- a/src/TNaming/TNaming_DeltaOnModification.cxx +++ b/src/TNaming/TNaming_DeltaOnModification.cxx @@ -20,7 +20,6 @@ #include #include #include -#include #include #include diff --git a/src/TNaming/TNaming_Identifier.cxx b/src/TNaming/TNaming_Identifier.cxx index 6b5e5e3d8e..15e6ae0e49 100644 --- a/src/TNaming/TNaming_Identifier.cxx +++ b/src/TNaming/TNaming_Identifier.cxx @@ -20,13 +20,11 @@ #include #include #include -#include #include #include #include #include #include -#include #include //#define MDTV_DEB_IDF diff --git a/src/TNaming/TNaming_Identifier.hxx b/src/TNaming/TNaming_Identifier.hxx index 9c65f60027..aca03a0014 100644 --- a/src/TNaming/TNaming_Identifier.hxx +++ b/src/TNaming/TNaming_Identifier.hxx @@ -22,8 +22,6 @@ #include #include -#include -#include #include #include #include diff --git a/src/TNaming/TNaming_Iterator.hxx b/src/TNaming/TNaming_Iterator.hxx index f837937098..0644988794 100644 --- a/src/TNaming/TNaming_Iterator.hxx +++ b/src/TNaming/TNaming_Iterator.hxx @@ -23,7 +23,6 @@ #include #include -#include #include class Standard_NoMoreObject; class Standard_NoSuchObject; diff --git a/src/TNaming/TNaming_Localizer.cxx b/src/TNaming/TNaming_Localizer.cxx index 5fb2296777..5f789a0ead 100644 --- a/src/TNaming/TNaming_Localizer.cxx +++ b/src/TNaming/TNaming_Localizer.cxx @@ -15,30 +15,19 @@ // commercial license or contractual agreement. -#include -#include -#include #include #include -#include -#include -#include -#include #include #include #include -#include #include -#include #include #include #include #include #include #include -#include #include -#include #ifdef OCCT_DEBUG //#define MDTV_DEB_SC diff --git a/src/TNaming/TNaming_Localizer.hxx b/src/TNaming/TNaming_Localizer.hxx index a441425ca0..e322d2fa7b 100644 --- a/src/TNaming/TNaming_Localizer.hxx +++ b/src/TNaming/TNaming_Localizer.hxx @@ -31,7 +31,6 @@ #include #include #include -#include class TNaming_UsedShapes; class TopoDS_Shape; class TDF_Label; diff --git a/src/TNaming/TNaming_MapOfNamedShape.hxx b/src/TNaming/TNaming_MapOfNamedShape.hxx index 6721aa993e..490512b3e9 100644 --- a/src/TNaming/TNaming_MapOfNamedShape.hxx +++ b/src/TNaming/TNaming_MapOfNamedShape.hxx @@ -17,7 +17,6 @@ #ifndef TNaming_MapOfNamedShape_HeaderFile #define TNaming_MapOfNamedShape_HeaderFile -#include #include #include diff --git a/src/TNaming/TNaming_Name.cxx b/src/TNaming/TNaming_Name.cxx index 34ee0bdb9e..7238eda6a2 100644 --- a/src/TNaming/TNaming_Name.cxx +++ b/src/TNaming/TNaming_Name.cxx @@ -23,17 +23,12 @@ #include #include #include -#include #include -#include -#include #include #include #include #include #include -#include -#include #include #include #include @@ -41,7 +36,6 @@ #include #include #include -#include #include #include #include @@ -53,14 +47,9 @@ #include #include #include -#include -#include -#include #include #include -#include #include -#include #include // mpv modifications 08.04.2002 diff --git a/src/TNaming/TNaming_Name.hxx b/src/TNaming/TNaming_Name.hxx index 873a4050ba..f3808d119d 100644 --- a/src/TNaming/TNaming_Name.hxx +++ b/src/TNaming/TNaming_Name.hxx @@ -28,7 +28,6 @@ #include #include #include -#include #include class TNaming_NamedShape; class TDF_RelocationTable; diff --git a/src/TNaming/TNaming_NamedShape.cxx b/src/TNaming/TNaming_NamedShape.cxx index a056e10152..5c298e5356 100644 --- a/src/TNaming/TNaming_NamedShape.cxx +++ b/src/TNaming/TNaming_NamedShape.cxx @@ -16,7 +16,6 @@ #include -#include #include #include #include @@ -24,14 +23,9 @@ #include #include #include -#include #include -#include -#include #include #include -#include -#include #include #include #include @@ -44,13 +38,11 @@ #include #include #include -#include #include #include #include #include #include -#include IMPLEMENT_STANDARD_RTTIEXT(TNaming_NamedShape,TDF_Attribute) diff --git a/src/TNaming/TNaming_NamedShape.hxx b/src/TNaming/TNaming_NamedShape.hxx index b3189c0d65..1710151f96 100644 --- a/src/TNaming/TNaming_NamedShape.hxx +++ b/src/TNaming/TNaming_NamedShape.hxx @@ -24,7 +24,6 @@ #include #include #include -#include #include class Standard_GUID; class TopoDS_Shape; diff --git a/src/TNaming/TNaming_Naming.cxx b/src/TNaming/TNaming_Naming.cxx index c2d2b5785c..4392035071 100644 --- a/src/TNaming/TNaming_Naming.cxx +++ b/src/TNaming/TNaming_Naming.cxx @@ -17,16 +17,10 @@ #include #include -#include -#include #include -#include #include -#include #include -#include #include -#include #include #include #include @@ -40,7 +34,6 @@ #include #include #include -#include #include #include #include @@ -56,15 +49,11 @@ #include #include #include -#include #include #include #include #include -#include #include -#include -#include #include IMPLEMENT_STANDARD_RTTIEXT(TNaming_Naming,TDF_Attribute) diff --git a/src/TNaming/TNaming_Naming.hxx b/src/TNaming/TNaming_Naming.hxx index 6951044fa2..c6dd3d5c3e 100644 --- a/src/TNaming/TNaming_Naming.hxx +++ b/src/TNaming/TNaming_Naming.hxx @@ -22,7 +22,6 @@ #include #include -#include #include #include #include diff --git a/src/TNaming/TNaming_NamingTool.cxx b/src/TNaming/TNaming_NamingTool.cxx index 55211009d7..5477dac219 100644 --- a/src/TNaming/TNaming_NamingTool.cxx +++ b/src/TNaming/TNaming_NamingTool.cxx @@ -17,7 +17,6 @@ #include #include #include -#include #include #include #include diff --git a/src/TNaming/TNaming_NewShapeIterator.hxx b/src/TNaming/TNaming_NewShapeIterator.hxx index 5bc2bfc650..db873b9888 100644 --- a/src/TNaming/TNaming_NewShapeIterator.hxx +++ b/src/TNaming/TNaming_NewShapeIterator.hxx @@ -23,7 +23,6 @@ #include #include -#include class Standard_NoMoreObject; class Standard_NoSuchObject; class TNaming_Tool; diff --git a/src/TNaming/TNaming_OldShapeIterator.hxx b/src/TNaming/TNaming_OldShapeIterator.hxx index 5167b0c857..e82cc189e2 100644 --- a/src/TNaming/TNaming_OldShapeIterator.hxx +++ b/src/TNaming/TNaming_OldShapeIterator.hxx @@ -23,7 +23,6 @@ #include #include -#include class Standard_NoMoreObject; class Standard_NoSuchObject; class TNaming_Tool; diff --git a/src/TNaming/TNaming_SameShapeIterator.hxx b/src/TNaming/TNaming_SameShapeIterator.hxx index 0a60484f31..270a542911 100644 --- a/src/TNaming/TNaming_SameShapeIterator.hxx +++ b/src/TNaming/TNaming_SameShapeIterator.hxx @@ -22,7 +22,6 @@ #include #include -#include class Standard_NoMoreObject; class Standard_NoSuchObject; class TNaming_Tool; diff --git a/src/TNaming/TNaming_Scope.cxx b/src/TNaming/TNaming_Scope.cxx index c20bcd8199..95b0bd217a 100644 --- a/src/TNaming/TNaming_Scope.cxx +++ b/src/TNaming/TNaming_Scope.cxx @@ -17,7 +17,6 @@ #include #include -#include #include #include #include diff --git a/src/TNaming/TNaming_Scope.hxx b/src/TNaming/TNaming_Scope.hxx index 53a758ef8f..1d75311b1e 100644 --- a/src/TNaming/TNaming_Scope.hxx +++ b/src/TNaming/TNaming_Scope.hxx @@ -21,7 +21,6 @@ #include #include -#include #include class TDF_Label; class TopoDS_Shape; diff --git a/src/TNaming/TNaming_Selector.cxx b/src/TNaming/TNaming_Selector.cxx index ec24d19b82..bba7a914da 100644 --- a/src/TNaming/TNaming_Selector.cxx +++ b/src/TNaming/TNaming_Selector.cxx @@ -83,13 +83,10 @@ static void Write(const TopoDS_Shape& shape, #define ORIENTATION_DSOPT #ifdef ORIENTATION_DSOPT -#include #include #include #include #include -#include -#include //========================================================================================== inline static void MapOfOrientedShapes(const TopoDS_Shape& S, TopTools_MapOfOrientedShape& M) { diff --git a/src/TNaming/TNaming_Selector.hxx b/src/TNaming/TNaming_Selector.hxx index fe8f3fd205..f3ee751efe 100644 --- a/src/TNaming/TNaming_Selector.hxx +++ b/src/TNaming/TNaming_Selector.hxx @@ -22,7 +22,6 @@ #include #include -#include #include #include class TopoDS_Shape; diff --git a/src/TNaming/TNaming_ShapesSet.cxx b/src/TNaming/TNaming_ShapesSet.cxx index f299e99562..5dfc4a3e1e 100644 --- a/src/TNaming/TNaming_ShapesSet.cxx +++ b/src/TNaming/TNaming_ShapesSet.cxx @@ -15,7 +15,6 @@ // commercial license or contractual agreement. -#include #include #include #include diff --git a/src/TNaming/TNaming_ShapesSet.hxx b/src/TNaming/TNaming_ShapesSet.hxx index 5993e26fd7..9a9d816a36 100644 --- a/src/TNaming/TNaming_ShapesSet.hxx +++ b/src/TNaming/TNaming_ShapesSet.hxx @@ -19,11 +19,9 @@ #include #include -#include #include #include -#include #include class TopoDS_Shape; diff --git a/src/TNaming/TNaming_Tool.cxx b/src/TNaming/TNaming_Tool.cxx index 1b68d00471..4763f9753e 100644 --- a/src/TNaming/TNaming_Tool.cxx +++ b/src/TNaming/TNaming_Tool.cxx @@ -16,29 +16,21 @@ #include -#include -#include #include #include -#include -#include #include #include -#include -#include #include #include #include #include #include -#include #include #include #include #include #include #include -#include #include //======================================================================= diff --git a/src/TNaming/TNaming_Tool.hxx b/src/TNaming/TNaming_Tool.hxx index 25d587fde7..7f844db47f 100644 --- a/src/TNaming/TNaming_Tool.hxx +++ b/src/TNaming/TNaming_Tool.hxx @@ -23,7 +23,6 @@ #include #include -#include #include #include #include diff --git a/src/TNaming/TNaming_TranslateTool.cxx b/src/TNaming/TNaming_TranslateTool.cxx index e8e7b18dc8..b4a2b4d96b 100644 --- a/src/TNaming/TNaming_TranslateTool.cxx +++ b/src/TNaming/TNaming_TranslateTool.cxx @@ -22,9 +22,6 @@ #include #include #include -#include -#include -#include #include #include #include @@ -40,7 +37,6 @@ #include #include #include -#include #include #include #include diff --git a/src/TNaming/TNaming_Translator.cxx b/src/TNaming/TNaming_Translator.cxx index 3aa4d2dc45..b8037de747 100644 --- a/src/TNaming/TNaming_Translator.cxx +++ b/src/TNaming/TNaming_Translator.cxx @@ -20,7 +20,6 @@ #include #include #include -#include #include #include #include diff --git a/src/TNaming/TNaming_Translator.hxx b/src/TNaming/TNaming_Translator.hxx index 4836879c6c..1b9ca53a0b 100644 --- a/src/TNaming/TNaming_Translator.hxx +++ b/src/TNaming/TNaming_Translator.hxx @@ -19,9 +19,7 @@ #include #include -#include -#include #include #include class TopoDS_Shape; diff --git a/src/TNaming/TNaming_UsedShapes.cxx b/src/TNaming/TNaming_UsedShapes.cxx index 1d4e45276d..c52a581bfc 100644 --- a/src/TNaming/TNaming_UsedShapes.cxx +++ b/src/TNaming/TNaming_UsedShapes.cxx @@ -24,9 +24,7 @@ #include #include #include -#include #include -#include #include #include #include diff --git a/src/TNaming/TNaming_UsedShapes.hxx b/src/TNaming/TNaming_UsedShapes.hxx index ac349cafba..78894fcb67 100644 --- a/src/TNaming/TNaming_UsedShapes.hxx +++ b/src/TNaming/TNaming_UsedShapes.hxx @@ -22,7 +22,6 @@ #include #include -#include #include class Standard_GUID; class TDF_AttributeDelta; diff --git a/src/TObj/TObj_Application.cxx b/src/TObj/TObj_Application.cxx index 44e7457fd9..185e6732f6 100644 --- a/src/TObj/TObj_Application.cxx +++ b/src/TObj/TObj_Application.cxx @@ -18,10 +18,8 @@ #include #include -#include #include #include -#include #include #include #include diff --git a/src/TObj/TObj_Application.hxx b/src/TObj/TObj_Application.hxx index c7166f86b6..933ee7e5a9 100644 --- a/src/TObj/TObj_Application.hxx +++ b/src/TObj/TObj_Application.hxx @@ -22,7 +22,6 @@ #include #include #include -#include //! //! This is a base class for OCAF based TObj models diff --git a/src/TObj/TObj_Assistant.hxx b/src/TObj/TObj_Assistant.hxx index 982a6377a6..f9ac21778f 100644 --- a/src/TObj/TObj_Assistant.hxx +++ b/src/TObj/TObj_Assistant.hxx @@ -20,7 +20,6 @@ #include #include -#include #include class TObj_Model; diff --git a/src/TObj/TObj_CheckModel.cxx b/src/TObj/TObj_CheckModel.cxx index df34c5b923..bc65cc9a94 100644 --- a/src/TObj/TObj_CheckModel.cxx +++ b/src/TObj/TObj_CheckModel.cxx @@ -18,9 +18,7 @@ #include #include -#include #include -#include IMPLEMENT_STANDARD_RTTIEXT(TObj_CheckModel,Message_Algorithm) diff --git a/src/TObj/TObj_CheckModel.hxx b/src/TObj/TObj_CheckModel.hxx index 664d980e03..b62fcddcff 100644 --- a/src/TObj/TObj_CheckModel.hxx +++ b/src/TObj/TObj_CheckModel.hxx @@ -18,7 +18,6 @@ #ifndef TObj_CheckModel_HeaderFile #define TObj_CheckModel_HeaderFile -#include #include #include diff --git a/src/TObj/TObj_Common.hxx b/src/TObj/TObj_Common.hxx index f6fe6bfbe3..3f6a057758 100644 --- a/src/TObj/TObj_Common.hxx +++ b/src/TObj/TObj_Common.hxx @@ -22,12 +22,8 @@ #define TObj_Common_HeaderFile //! Basic CASCADE definitions -#include -#include #include -#include #include -#include //! Methods inline implementation for HExtendedString diff --git a/src/TObj/TObj_Model.cxx b/src/TObj/TObj_Model.cxx index 4b6f97a18d..f85a21c51f 100644 --- a/src/TObj/TObj_Model.cxx +++ b/src/TObj/TObj_Model.cxx @@ -18,15 +18,8 @@ #include #include -#include -#include -#include -#include #include -#include #include -#include -#include #include #include diff --git a/src/TObj/TObj_Model.hxx b/src/TObj/TObj_Model.hxx index 6f4b6b0ba5..87baa91b48 100644 --- a/src/TObj/TObj_Model.hxx +++ b/src/TObj/TObj_Model.hxx @@ -19,7 +19,6 @@ #define TObj_Model_HeaderFile #include -#include #include #include diff --git a/src/TObj/TObj_ModelIterator.hxx b/src/TObj/TObj_ModelIterator.hxx index d96fac0d26..617da2a256 100644 --- a/src/TObj/TObj_ModelIterator.hxx +++ b/src/TObj/TObj_ModelIterator.hxx @@ -19,7 +19,6 @@ #define TObj_ModelIterator_HeaderFile #include -#include #include diff --git a/src/TObj/TObj_Object.cxx b/src/TObj/TObj_Object.cxx index 3be096cad7..d754de9620 100644 --- a/src/TObj/TObj_Object.cxx +++ b/src/TObj/TObj_Object.cxx @@ -18,7 +18,6 @@ #include #include -#include #include #include #include diff --git a/src/TObj/TObj_ReferenceIterator.cxx b/src/TObj/TObj_ReferenceIterator.cxx index 50f3012a88..e0310e99d3 100644 --- a/src/TObj/TObj_ReferenceIterator.cxx +++ b/src/TObj/TObj_ReferenceIterator.cxx @@ -15,7 +15,6 @@ // The original implementation Copyright: (C) RINA S.p.A -#include #include #include diff --git a/src/TObj/TObj_SequenceOfObject.hxx b/src/TObj/TObj_SequenceOfObject.hxx index 56cfc97aa8..9dc6b70316 100644 --- a/src/TObj/TObj_SequenceOfObject.hxx +++ b/src/TObj/TObj_SequenceOfObject.hxx @@ -21,8 +21,6 @@ #include #include -#include - class TObj_Object; typedef NCollection_Sequence TObj_SequenceOfObject; diff --git a/src/TObj/TObj_TIntSparseArray.cxx b/src/TObj/TObj_TIntSparseArray.cxx index b9a5d2ee75..37924424dc 100644 --- a/src/TObj/TObj_TIntSparseArray.cxx +++ b/src/TObj/TObj_TIntSparseArray.cxx @@ -19,7 +19,6 @@ #include #include #include -#include #include diff --git a/src/TObj/TObj_TIntSparseArray.hxx b/src/TObj/TObj_TIntSparseArray.hxx index e6c5ad9503..49d0017b38 100644 --- a/src/TObj/TObj_TIntSparseArray.hxx +++ b/src/TObj/TObj_TIntSparseArray.hxx @@ -21,7 +21,6 @@ #include #include -#include #include typedef NCollection_SparseArray TObj_TIntSparseArray_VecOfData; diff --git a/src/TObj/TObj_TNameContainer.hxx b/src/TObj/TObj_TNameContainer.hxx index 5a83017d2a..bc3de641b4 100644 --- a/src/TObj/TObj_TNameContainer.hxx +++ b/src/TObj/TObj_TNameContainer.hxx @@ -18,7 +18,6 @@ #ifndef TObj_TNameContainer_HeaderFile #define TObj_TNameContainer_HeaderFile -#include #include #include diff --git a/src/TObjDRAW/TObjDRAW.cxx b/src/TObjDRAW/TObjDRAW.cxx index e26c991474..24ac5acea6 100644 --- a/src/TObjDRAW/TObjDRAW.cxx +++ b/src/TObjDRAW/TObjDRAW.cxx @@ -18,18 +18,12 @@ #include #include #include -#include #include -#include -#include #include -#include #include -#include #include #include #include -#include #include #include #include diff --git a/src/TObjDRAW/TObjDRAW.hxx b/src/TObjDRAW/TObjDRAW.hxx index 005be69c56..f017f29de4 100644 --- a/src/TObjDRAW/TObjDRAW.hxx +++ b/src/TObjDRAW/TObjDRAW.hxx @@ -18,7 +18,6 @@ #include #include -#include #include diff --git a/src/TopBas/TopBas_TestInterference.hxx b/src/TopBas/TopBas_TestInterference.hxx index 7da4f17c69..083ce6162f 100644 --- a/src/TopBas/TopBas_TestInterference.hxx +++ b/src/TopBas/TopBas_TestInterference.hxx @@ -22,7 +22,6 @@ #include #include -#include #include diff --git a/src/TopCnx/TopCnx_EdgeFaceTransition.cxx b/src/TopCnx/TopCnx_EdgeFaceTransition.cxx index c8c9c374d7..0a75ab46c3 100644 --- a/src/TopCnx/TopCnx_EdgeFaceTransition.cxx +++ b/src/TopCnx/TopCnx_EdgeFaceTransition.cxx @@ -15,7 +15,6 @@ // commercial license or contractual agreement. -#include #include //======================================================================= diff --git a/src/TopCnx/TopCnx_EdgeFaceTransition.hxx b/src/TopCnx/TopCnx_EdgeFaceTransition.hxx index a3ebba8ee4..98b7c5a2f9 100644 --- a/src/TopCnx/TopCnx_EdgeFaceTransition.hxx +++ b/src/TopCnx/TopCnx_EdgeFaceTransition.hxx @@ -22,8 +22,6 @@ #include #include -#include -#include #include class gp_Dir; diff --git a/src/TopExp/TopExp.cxx b/src/TopExp/TopExp.cxx index c5f2eb44ff..5424c7a8b5 100644 --- a/src/TopExp/TopExp.cxx +++ b/src/TopExp/TopExp.cxx @@ -28,7 +28,6 @@ #include #include #include -#include #include //======================================================================= diff --git a/src/TopExp/TopExp.hxx b/src/TopExp/TopExp.hxx index 33b39ab7e3..d65c002c44 100644 --- a/src/TopExp/TopExp.hxx +++ b/src/TopExp/TopExp.hxx @@ -21,7 +21,6 @@ #include #include -#include #include #include #include diff --git a/src/TopLoc/TopLoc_Datum3D.cxx b/src/TopLoc/TopLoc_Datum3D.cxx index 7837327cf9..4c1e1fc0ef 100644 --- a/src/TopLoc/TopLoc_Datum3D.cxx +++ b/src/TopLoc/TopLoc_Datum3D.cxx @@ -15,7 +15,6 @@ // commercial license or contractual agreement. -#include #include #include #include diff --git a/src/TopLoc/TopLoc_ItemLocation.cxx b/src/TopLoc/TopLoc_ItemLocation.cxx index a8355e411c..5c8aeaab4a 100644 --- a/src/TopLoc/TopLoc_ItemLocation.cxx +++ b/src/TopLoc/TopLoc_ItemLocation.cxx @@ -19,7 +19,6 @@ #include #include #include -#include //======================================================================= //function : TopLoc_ItemLocation diff --git a/src/TopLoc/TopLoc_Location.cxx b/src/TopLoc/TopLoc_Location.cxx index f96af9d2e5..7949e4708c 100644 --- a/src/TopLoc/TopLoc_Location.cxx +++ b/src/TopLoc/TopLoc_Location.cxx @@ -18,11 +18,8 @@ #include -#include -#include #include #include -#include #include #include diff --git a/src/TopLoc/TopLoc_Location.hxx b/src/TopLoc/TopLoc_Location.hxx index c5361d1cc8..7bab1f9630 100644 --- a/src/TopLoc/TopLoc_Location.hxx +++ b/src/TopLoc/TopLoc_Location.hxx @@ -22,7 +22,6 @@ #include #include -#include #include #include diff --git a/src/TopLoc/TopLoc_MapOfLocation.hxx b/src/TopLoc/TopLoc_MapOfLocation.hxx index 69380ea176..9d9873b8b0 100644 --- a/src/TopLoc/TopLoc_MapOfLocation.hxx +++ b/src/TopLoc/TopLoc_MapOfLocation.hxx @@ -17,7 +17,6 @@ #ifndef TopLoc_MapOfLocation_HeaderFile #define TopLoc_MapOfLocation_HeaderFile -#include #include #include diff --git a/src/TopLoc/TopLoc_SListNodeOfItemLocation.cxx b/src/TopLoc/TopLoc_SListNodeOfItemLocation.cxx index a10c55ed3b..0b0c1e3efd 100644 --- a/src/TopLoc/TopLoc_SListNodeOfItemLocation.cxx +++ b/src/TopLoc/TopLoc_SListNodeOfItemLocation.cxx @@ -13,8 +13,6 @@ // commercial license or contractual agreement. -#include -#include #include #include diff --git a/src/TopLoc/TopLoc_SListNodeOfItemLocation.hxx b/src/TopLoc/TopLoc_SListNodeOfItemLocation.hxx index cf6aff6dd0..48f99c22c4 100644 --- a/src/TopLoc/TopLoc_SListNodeOfItemLocation.hxx +++ b/src/TopLoc/TopLoc_SListNodeOfItemLocation.hxx @@ -18,7 +18,6 @@ #define _TopLoc_SListNodeOfItemLocation_HeaderFile #include -#include #include #include diff --git a/src/TopLoc/TopLoc_SListOfItemLocation.hxx b/src/TopLoc/TopLoc_SListOfItemLocation.hxx index a0093d5c69..2ce729cc0c 100644 --- a/src/TopLoc/TopLoc_SListOfItemLocation.hxx +++ b/src/TopLoc/TopLoc_SListOfItemLocation.hxx @@ -21,7 +21,6 @@ #include #include -#include class TopLoc_SListNodeOfItemLocation; class TopLoc_ItemLocation; diff --git a/src/TopOpeBRep/TopOpeBRep_Bipoint.hxx b/src/TopOpeBRep/TopOpeBRep_Bipoint.hxx index 580e40805e..8dff6c9308 100644 --- a/src/TopOpeBRep/TopOpeBRep_Bipoint.hxx +++ b/src/TopOpeBRep/TopOpeBRep_Bipoint.hxx @@ -19,7 +19,6 @@ #include #include -#include #include diff --git a/src/TopOpeBRep/TopOpeBRep_DSFiller.cxx b/src/TopOpeBRep/TopOpeBRep_DSFiller.cxx index 58ffc7348c..9952806b43 100644 --- a/src/TopOpeBRep/TopOpeBRep_DSFiller.cxx +++ b/src/TopOpeBRep/TopOpeBRep_DSFiller.cxx @@ -17,12 +17,8 @@ #include #include -#include #include -#include -#include #include -#include #include #include #include @@ -34,10 +30,8 @@ #include #include #include -#include #include #include -#include #include #include #include diff --git a/src/TopOpeBRep/TopOpeBRep_DSFiller.hxx b/src/TopOpeBRep/TopOpeBRep_DSFiller.hxx index 2579c3882a..f6e647ee25 100644 --- a/src/TopOpeBRep/TopOpeBRep_DSFiller.hxx +++ b/src/TopOpeBRep/TopOpeBRep_DSFiller.hxx @@ -27,7 +27,6 @@ #include #include #include -#include class TopoDS_Shape; class TopOpeBRepDS_HDataStructure; class TopoDS_Face; diff --git a/src/TopOpeBRep/TopOpeBRep_EdgesFiller.cxx b/src/TopOpeBRep/TopOpeBRep_EdgesFiller.cxx index eb2dbe30ec..6b665f4720 100644 --- a/src/TopOpeBRep/TopOpeBRep_EdgesFiller.cxx +++ b/src/TopOpeBRep/TopOpeBRep_EdgesFiller.cxx @@ -17,9 +17,7 @@ #include #include -#include #include -#include #include #include #include diff --git a/src/TopOpeBRep/TopOpeBRep_EdgesFiller.hxx b/src/TopOpeBRep/TopOpeBRep_EdgesFiller.hxx index 68a64ff4eb..7f5ebe441f 100644 --- a/src/TopOpeBRep/TopOpeBRep_EdgesFiller.hxx +++ b/src/TopOpeBRep/TopOpeBRep_EdgesFiller.hxx @@ -25,12 +25,9 @@ #include #include #include -#include #include -#include #include #include -#include #include class TopOpeBRepDS_HDataStructure; class TopoDS_Shape; diff --git a/src/TopOpeBRep/TopOpeBRep_EdgesIntersector.cxx b/src/TopOpeBRep/TopOpeBRep_EdgesIntersector.cxx index 25e4a12634..6cebc0ab1e 100644 --- a/src/TopOpeBRep/TopOpeBRep_EdgesIntersector.cxx +++ b/src/TopOpeBRep/TopOpeBRep_EdgesIntersector.cxx @@ -34,18 +34,13 @@ static void CurveToString(const GeomAbs_CurveType t, TCollection_AsciiString& N) #include #include -#include -#include #include #include #include #include #include -#include #include #include -#include -#include #include #include #include @@ -54,8 +49,6 @@ static void CurveToString(const GeomAbs_CurveType t, TCollection_AsciiString& N) #include #include #include -#include -#include #include #include #include diff --git a/src/TopOpeBRep/TopOpeBRep_EdgesIntersector.hxx b/src/TopOpeBRep/TopOpeBRep_EdgesIntersector.hxx index 9fa0d458ee..ece4ab26c3 100644 --- a/src/TopOpeBRep/TopOpeBRep_EdgesIntersector.hxx +++ b/src/TopOpeBRep/TopOpeBRep_EdgesIntersector.hxx @@ -25,9 +25,7 @@ #include #include #include -#include #include -#include #include #include #include diff --git a/src/TopOpeBRep/TopOpeBRep_EdgesIntersector_1.cxx b/src/TopOpeBRep/TopOpeBRep_EdgesIntersector_1.cxx index 434eb73553..0b81e48acc 100644 --- a/src/TopOpeBRep/TopOpeBRep_EdgesIntersector_1.cxx +++ b/src/TopOpeBRep/TopOpeBRep_EdgesIntersector_1.cxx @@ -15,22 +15,14 @@ // commercial license or contractual agreement. -#include #include -#include -#include #include #include -#include -#include -#include #include -#include #include #include #include #include -#include #include #include #include diff --git a/src/TopOpeBRep/TopOpeBRep_FFDumper.cxx b/src/TopOpeBRep/TopOpeBRep_FFDumper.cxx index aa568955e0..4eb0e745ec 100644 --- a/src/TopOpeBRep/TopOpeBRep_FFDumper.cxx +++ b/src/TopOpeBRep/TopOpeBRep_FFDumper.cxx @@ -16,18 +16,10 @@ #include -#include -#include #include #include -#include -#include #include -#include -#include -#include #include -#include #include #include #include @@ -35,6 +27,8 @@ #include #include #include +#include +#include #include IMPLEMENT_STANDARD_RTTIEXT(TopOpeBRep_FFDumper,Standard_Transient) diff --git a/src/TopOpeBRep/TopOpeBRep_FFDumper.hxx b/src/TopOpeBRep/TopOpeBRep_FFDumper.hxx index 954b00a30e..ae7ce84249 100644 --- a/src/TopOpeBRep/TopOpeBRep_FFDumper.hxx +++ b/src/TopOpeBRep/TopOpeBRep_FFDumper.hxx @@ -26,7 +26,6 @@ #include #include #include -#include class TopOpeBRep_LineInter; class TopOpeBRep_VPointInter; class TopoDS_Shape; diff --git a/src/TopOpeBRep/TopOpeBRep_FFTransitionTool.cxx b/src/TopOpeBRep/TopOpeBRep_FFTransitionTool.cxx index 5df87f741b..0f30fdde7d 100644 --- a/src/TopOpeBRep/TopOpeBRep_FFTransitionTool.cxx +++ b/src/TopOpeBRep/TopOpeBRep_FFTransitionTool.cxx @@ -20,20 +20,12 @@ #include #include #include -#include -#include -#include -#include #include #include -#include #include #include #include #include -#include -#include -#include #include //----------------------------------------------------------------------- diff --git a/src/TopOpeBRep/TopOpeBRep_FFTransitionTool.hxx b/src/TopOpeBRep/TopOpeBRep_FFTransitionTool.hxx index b6e99f4b55..37ce05daf4 100644 --- a/src/TopOpeBRep/TopOpeBRep_FFTransitionTool.hxx +++ b/src/TopOpeBRep/TopOpeBRep_FFTransitionTool.hxx @@ -19,7 +19,6 @@ #include #include -#include #include #include diff --git a/src/TopOpeBRep/TopOpeBRep_FaceEdgeFiller.cxx b/src/TopOpeBRep/TopOpeBRep_FaceEdgeFiller.cxx index 94c5b36e06..d10701e106 100644 --- a/src/TopOpeBRep/TopOpeBRep_FaceEdgeFiller.cxx +++ b/src/TopOpeBRep/TopOpeBRep_FaceEdgeFiller.cxx @@ -17,14 +17,11 @@ #include #include -#include -#include #include #include #include #include #include -#include #include #include #include diff --git a/src/TopOpeBRep/TopOpeBRep_FaceEdgeFiller.hxx b/src/TopOpeBRep/TopOpeBRep_FaceEdgeFiller.hxx index 00acce327d..efa5fd7a7c 100644 --- a/src/TopOpeBRep/TopOpeBRep_FaceEdgeFiller.hxx +++ b/src/TopOpeBRep/TopOpeBRep_FaceEdgeFiller.hxx @@ -21,8 +21,6 @@ #include #include -#include -#include #include #include class TopoDS_Shape; diff --git a/src/TopOpeBRep/TopOpeBRep_FaceEdgeIntersector.cxx b/src/TopOpeBRep/TopOpeBRep_FaceEdgeIntersector.cxx index 80496bed89..a53eb4da9d 100644 --- a/src/TopOpeBRep/TopOpeBRep_FaceEdgeIntersector.cxx +++ b/src/TopOpeBRep/TopOpeBRep_FaceEdgeIntersector.cxx @@ -24,11 +24,9 @@ #include #include #include -#include #include #include #include -#include #include #include #include diff --git a/src/TopOpeBRep/TopOpeBRep_FaceEdgeIntersector.hxx b/src/TopOpeBRep/TopOpeBRep_FaceEdgeIntersector.hxx index 014b122ee2..4df42edc60 100644 --- a/src/TopOpeBRep/TopOpeBRep_FaceEdgeIntersector.hxx +++ b/src/TopOpeBRep/TopOpeBRep_FaceEdgeIntersector.hxx @@ -19,12 +19,9 @@ #include #include -#include #include #include -#include -#include #include #include #include diff --git a/src/TopOpeBRep/TopOpeBRep_FacesFiller.cxx b/src/TopOpeBRep/TopOpeBRep_FacesFiller.cxx index ac4cd524f4..d0d60bfddd 100644 --- a/src/TopOpeBRep/TopOpeBRep_FacesFiller.cxx +++ b/src/TopOpeBRep/TopOpeBRep_FacesFiller.cxx @@ -17,34 +17,24 @@ #include #include -#include -#include #include #include -#include #include #include #include -#include #include #include -#include #include #include #include -#include #include #include #include #include #include -#include #include -#include -#include #include #include -#include #include #include diff --git a/src/TopOpeBRep/TopOpeBRep_FacesFiller.hxx b/src/TopOpeBRep/TopOpeBRep_FacesFiller.hxx index 7d2b03a0f5..3319d3fbeb 100644 --- a/src/TopOpeBRep/TopOpeBRep_FacesFiller.hxx +++ b/src/TopOpeBRep/TopOpeBRep_FacesFiller.hxx @@ -21,23 +21,16 @@ #include #include -#include #include #include #include #include #include -#include -#include -#include #include -#include #include #include -#include #include #include -#include class TopOpeBRepDS_HDataStructure; class TopOpeBRep_FFDumper; class TopoDS_Shape; diff --git a/src/TopOpeBRep/TopOpeBRep_FacesFiller_1.cxx b/src/TopOpeBRep/TopOpeBRep_FacesFiller_1.cxx index 2fd48b130b..d29dc21e2d 100644 --- a/src/TopOpeBRep/TopOpeBRep_FacesFiller_1.cxx +++ b/src/TopOpeBRep/TopOpeBRep_FacesFiller_1.cxx @@ -15,39 +15,27 @@ // commercial license or contractual agreement. -#include #include #include #include #include #include #include -#include #include #include #include -#include #include -#include -#include #include #include #include #include #include #include -#include #include #include -#include #include -#include -#include -#include -#include #include #include -#include #include #include #include diff --git a/src/TopOpeBRep/TopOpeBRep_FacesIntersector.cxx b/src/TopOpeBRep/TopOpeBRep_FacesIntersector.cxx index 10754a83c2..351a175c68 100644 --- a/src/TopOpeBRep/TopOpeBRep_FacesIntersector.cxx +++ b/src/TopOpeBRep/TopOpeBRep_FacesIntersector.cxx @@ -15,8 +15,6 @@ // commercial license or contractual agreement. -#include -#include #include #include #include @@ -31,14 +29,13 @@ #include #include #include +#include #include #include #include #include #include #include -#include -#include #include #include @@ -113,7 +110,6 @@ static void TestWLinesToAnArc(IntPatch_SequenceOfLine& slin, // modified by NIZHNY-OFV Fri Mar 29 12:37:21 2002.BEGIN #include #include -#include #include #include #include diff --git a/src/TopOpeBRep/TopOpeBRep_FacesIntersector.hxx b/src/TopOpeBRep/TopOpeBRep_FacesIntersector.hxx index 60e5ebed6c..b3f93ad075 100644 --- a/src/TopOpeBRep/TopOpeBRep_FacesIntersector.hxx +++ b/src/TopOpeBRep/TopOpeBRep_FacesIntersector.hxx @@ -21,7 +21,6 @@ #include #include #include -#include #include #include #include diff --git a/src/TopOpeBRep/TopOpeBRep_GeomTool.cxx b/src/TopOpeBRep/TopOpeBRep_GeomTool.cxx index 78db5135e6..571ac36b7c 100644 --- a/src/TopOpeBRep/TopOpeBRep_GeomTool.cxx +++ b/src/TopOpeBRep/TopOpeBRep_GeomTool.cxx @@ -22,7 +22,6 @@ #include #include #include -#include #include #include #include @@ -32,7 +31,6 @@ #include #include #include -#include //======================================================================= //function : MakeCurves diff --git a/src/TopOpeBRep/TopOpeBRep_GeomTool.hxx b/src/TopOpeBRep/TopOpeBRep_GeomTool.hxx index 2fe68795e4..097d332df4 100644 --- a/src/TopOpeBRep/TopOpeBRep_GeomTool.hxx +++ b/src/TopOpeBRep/TopOpeBRep_GeomTool.hxx @@ -21,8 +21,6 @@ #include #include -#include -#include #include class TopOpeBRep_LineInter; class TopoDS_Shape; diff --git a/src/TopOpeBRep/TopOpeBRep_HArray1OfLineInter.hxx b/src/TopOpeBRep/TopOpeBRep_HArray1OfLineInter.hxx index 083b462689..6d5e7dc03c 100644 --- a/src/TopOpeBRep/TopOpeBRep_HArray1OfLineInter.hxx +++ b/src/TopOpeBRep/TopOpeBRep_HArray1OfLineInter.hxx @@ -17,7 +17,6 @@ #ifndef TopOpeBRep_HArray1OfLineInter_HeaderFile #define TopOpeBRep_HArray1OfLineInter_HeaderFile -#include #include #include diff --git a/src/TopOpeBRep/TopOpeBRep_HArray1OfVPointInter.hxx b/src/TopOpeBRep/TopOpeBRep_HArray1OfVPointInter.hxx index ed45397180..9b41cc9e4d 100644 --- a/src/TopOpeBRep/TopOpeBRep_HArray1OfVPointInter.hxx +++ b/src/TopOpeBRep/TopOpeBRep_HArray1OfVPointInter.hxx @@ -17,7 +17,6 @@ #ifndef TopOpeBRep_HArray1OfVPointInter_HeaderFile #define TopOpeBRep_HArray1OfVPointInter_HeaderFile -#include #include #include diff --git a/src/TopOpeBRep/TopOpeBRep_Hctxee2d.cxx b/src/TopOpeBRep/TopOpeBRep_Hctxee2d.cxx index a5b0b24d63..2f7a0e57e6 100644 --- a/src/TopOpeBRep/TopOpeBRep_Hctxee2d.cxx +++ b/src/TopOpeBRep/TopOpeBRep_Hctxee2d.cxx @@ -17,14 +17,10 @@ #include #include -#include -#include #include -#include #include #include #include -#include #include #include #include @@ -32,7 +28,6 @@ #include #include #include -#include IMPLEMENT_STANDARD_RTTIEXT(TopOpeBRep_Hctxee2d,Standard_Transient) diff --git a/src/TopOpeBRep/TopOpeBRep_Hctxff2d.cxx b/src/TopOpeBRep/TopOpeBRep_Hctxff2d.cxx index 3cf6f20d3a..4d1b5c4fee 100644 --- a/src/TopOpeBRep/TopOpeBRep_Hctxff2d.cxx +++ b/src/TopOpeBRep/TopOpeBRep_Hctxff2d.cxx @@ -17,7 +17,6 @@ #include #include -#include #include #include #include diff --git a/src/TopOpeBRep/TopOpeBRep_LineInter.cxx b/src/TopOpeBRep/TopOpeBRep_LineInter.cxx index f31d9f7d0f..7f6768cdaa 100644 --- a/src/TopOpeBRep/TopOpeBRep_LineInter.cxx +++ b/src/TopOpeBRep/TopOpeBRep_LineInter.cxx @@ -18,7 +18,6 @@ #include #include -#include #include #include #include @@ -26,7 +25,6 @@ #include #include #include -#include #include #include #include @@ -36,11 +34,8 @@ #include #include #include -#include -#include #include #include -#include #include #include #include diff --git a/src/TopOpeBRep/TopOpeBRep_Point2d.cxx b/src/TopOpeBRep/TopOpeBRep_Point2d.cxx index 784ee1ddd1..908c398014 100644 --- a/src/TopOpeBRep/TopOpeBRep_Point2d.cxx +++ b/src/TopOpeBRep/TopOpeBRep_Point2d.cxx @@ -20,14 +20,7 @@ #include -#include -#include -#include -#include -#include #include -#include -#include #include #include #include diff --git a/src/TopOpeBRep/TopOpeBRep_Point2d.hxx b/src/TopOpeBRep/TopOpeBRep_Point2d.hxx index ba7dec3705..21c797deaa 100644 --- a/src/TopOpeBRep/TopOpeBRep_Point2d.hxx +++ b/src/TopOpeBRep/TopOpeBRep_Point2d.hxx @@ -22,10 +22,8 @@ #include #include -#include #include #include -#include #include #include #include diff --git a/src/TopOpeBRep/TopOpeBRep_PointClassifier.cxx b/src/TopOpeBRep/TopOpeBRep_PointClassifier.cxx index 6faae127a7..bba5ad5ff6 100644 --- a/src/TopOpeBRep/TopOpeBRep_PointClassifier.cxx +++ b/src/TopOpeBRep/TopOpeBRep_PointClassifier.cxx @@ -16,7 +16,6 @@ #include -#include #include #include #include diff --git a/src/TopOpeBRep/TopOpeBRep_PointGeomTool.cxx b/src/TopOpeBRep/TopOpeBRep_PointGeomTool.cxx index b592cb1b3b..cdd8d0627d 100644 --- a/src/TopOpeBRep/TopOpeBRep_PointGeomTool.cxx +++ b/src/TopOpeBRep/TopOpeBRep_PointGeomTool.cxx @@ -17,7 +17,6 @@ #include #include -#include #include #include #include diff --git a/src/TopOpeBRep/TopOpeBRep_PointGeomTool.hxx b/src/TopOpeBRep/TopOpeBRep_PointGeomTool.hxx index b3229a4c25..b3aa8d2e74 100644 --- a/src/TopOpeBRep/TopOpeBRep_PointGeomTool.hxx +++ b/src/TopOpeBRep/TopOpeBRep_PointGeomTool.hxx @@ -19,9 +19,7 @@ #include #include -#include -#include class TopOpeBRepDS_Point; class TopOpeBRep_VPointInter; class TopOpeBRep_Point2d; diff --git a/src/TopOpeBRep/TopOpeBRep_ProcessGR.cxx b/src/TopOpeBRep/TopOpeBRep_ProcessGR.cxx index 2ccb30cda6..40856d81b7 100644 --- a/src/TopOpeBRep/TopOpeBRep_ProcessGR.cxx +++ b/src/TopOpeBRep/TopOpeBRep_ProcessGR.cxx @@ -15,59 +15,26 @@ // commercial license or contractual agreement. -#include -#include -#include #include -#include #include #include -#include #include -#include -#include -#include -#include -#include -#include #include #ifdef DRAW #include #endif -#include -#include -#include #include -#include -#include -#include -#include #include -#include -#include //#include -#include -#include -#include #include -#include -#include -#include #include -#include -#include -#include -#include -#include -#include #include #include #include #include #include -#include #include #include #include diff --git a/src/TopOpeBRep/TopOpeBRep_ProcessSectionEdges.cxx b/src/TopOpeBRep/TopOpeBRep_ProcessSectionEdges.cxx index 103f34c2fc..bbec44f579 100644 --- a/src/TopOpeBRep/TopOpeBRep_ProcessSectionEdges.cxx +++ b/src/TopOpeBRep/TopOpeBRep_ProcessSectionEdges.cxx @@ -16,13 +16,10 @@ #include -#include #include -#include #include #include #include -#include #include #include #include @@ -34,10 +31,6 @@ #include #include #include -#include -#include -#include -#include #include #include #include diff --git a/src/TopOpeBRep/TopOpeBRep_ShapeIntersector.cxx b/src/TopOpeBRep/TopOpeBRep_ShapeIntersector.cxx index 0a8bac0e65..845b2deaa0 100644 --- a/src/TopOpeBRep/TopOpeBRep_ShapeIntersector.cxx +++ b/src/TopOpeBRep/TopOpeBRep_ShapeIntersector.cxx @@ -16,13 +16,6 @@ #include -#include -#include -#include -#include -#include -#include -#include #include #include #include @@ -42,11 +35,7 @@ void seteefff(const Standard_Integer e1,const Standard_Integer e2, const Standar // modified by NIZHNY-OFV Thu Apr 18 17:15:38 2002 (S) #include -#include -#include -#include #include -#include #include #include #include diff --git a/src/TopOpeBRep/TopOpeBRep_ShapeIntersector.hxx b/src/TopOpeBRep/TopOpeBRep_ShapeIntersector.hxx index 51c90beabc..fa9d42fe81 100644 --- a/src/TopOpeBRep/TopOpeBRep_ShapeIntersector.hxx +++ b/src/TopOpeBRep/TopOpeBRep_ShapeIntersector.hxx @@ -21,15 +21,12 @@ #include #include -#include #include #include #include -#include #include #include #include -#include #include #include class TopOpeBRepTool_HBoxTool; diff --git a/src/TopOpeBRep/TopOpeBRep_ShapeIntersector2d.cxx b/src/TopOpeBRep/TopOpeBRep_ShapeIntersector2d.cxx index e4bd47c55a..1038c74262 100644 --- a/src/TopOpeBRep/TopOpeBRep_ShapeIntersector2d.cxx +++ b/src/TopOpeBRep/TopOpeBRep_ShapeIntersector2d.cxx @@ -15,12 +15,6 @@ // commercial license or contractual agreement. -#include -#include -#include -#include -#include -#include #include #include #include diff --git a/src/TopOpeBRep/TopOpeBRep_ShapeScanner.cxx b/src/TopOpeBRep/TopOpeBRep_ShapeScanner.cxx index 5c93de7e73..a79e9f7519 100644 --- a/src/TopOpeBRep/TopOpeBRep_ShapeScanner.cxx +++ b/src/TopOpeBRep/TopOpeBRep_ShapeScanner.cxx @@ -15,8 +15,6 @@ // commercial license or contractual agreement. -#include -#include #include #include #include diff --git a/src/TopOpeBRep/TopOpeBRep_ShapeScanner.hxx b/src/TopOpeBRep/TopOpeBRep_ShapeScanner.hxx index 6ebfb8c30f..7b1149c303 100644 --- a/src/TopOpeBRep/TopOpeBRep_ShapeScanner.hxx +++ b/src/TopOpeBRep/TopOpeBRep_ShapeScanner.hxx @@ -25,7 +25,6 @@ #include #include #include -#include #include class TopoDS_Shape; class TopOpeBRepTool_ShapeExplorer; diff --git a/src/TopOpeBRep/TopOpeBRep_VPointInter.cxx b/src/TopOpeBRep/TopOpeBRep_VPointInter.cxx index 9f7f8ab843..87b14dfd92 100644 --- a/src/TopOpeBRep/TopOpeBRep_VPointInter.cxx +++ b/src/TopOpeBRep/TopOpeBRep_VPointInter.cxx @@ -15,16 +15,11 @@ // commercial license or contractual agreement. -#include -#include -#include #include #include #include -#include #include #include -#include #include #include #include @@ -32,7 +27,6 @@ #include #include #include -#include #include #ifdef OCCT_DEBUG diff --git a/src/TopOpeBRep/TopOpeBRep_VPointInter.hxx b/src/TopOpeBRep/TopOpeBRep_VPointInter.hxx index c4a01095f4..249acf14f2 100644 --- a/src/TopOpeBRep/TopOpeBRep_VPointInter.hxx +++ b/src/TopOpeBRep/TopOpeBRep_VPointInter.hxx @@ -19,14 +19,11 @@ #include #include -#include #include #include #include -#include #include -#include #include #include class gp_Pnt; diff --git a/src/TopOpeBRep/TopOpeBRep_VPointInterClassifier.cxx b/src/TopOpeBRep/TopOpeBRep_VPointInterClassifier.cxx index 4b6d414e82..dfedd4c6ad 100644 --- a/src/TopOpeBRep/TopOpeBRep_VPointInterClassifier.cxx +++ b/src/TopOpeBRep/TopOpeBRep_VPointInterClassifier.cxx @@ -16,12 +16,10 @@ #include -#include #include #include #include #include -#include #include #include #include diff --git a/src/TopOpeBRep/TopOpeBRep_VPointInterClassifier.hxx b/src/TopOpeBRep/TopOpeBRep_VPointInterClassifier.hxx index 6cbcebde1b..3e36466737 100644 --- a/src/TopOpeBRep/TopOpeBRep_VPointInterClassifier.hxx +++ b/src/TopOpeBRep/TopOpeBRep_VPointInterClassifier.hxx @@ -19,14 +19,11 @@ #include #include -#include #include #include #include #include -#include -#include class TopOpeBRep_VPointInter; class TopOpeBRep_PointClassifier; diff --git a/src/TopOpeBRep/TopOpeBRep_VPointInterIterator.cxx b/src/TopOpeBRep/TopOpeBRep_VPointInterIterator.cxx index 3e5c5dc0e3..51122c7f29 100644 --- a/src/TopOpeBRep/TopOpeBRep_VPointInterIterator.cxx +++ b/src/TopOpeBRep/TopOpeBRep_VPointInterIterator.cxx @@ -15,7 +15,6 @@ // commercial license or contractual agreement. -#include #include #include #include diff --git a/src/TopOpeBRep/TopOpeBRep_VPointInterIterator.hxx b/src/TopOpeBRep/TopOpeBRep_VPointInterIterator.hxx index 229f6f297c..a165b1dfb4 100644 --- a/src/TopOpeBRep/TopOpeBRep_VPointInterIterator.hxx +++ b/src/TopOpeBRep/TopOpeBRep_VPointInterIterator.hxx @@ -19,11 +19,9 @@ #include #include -#include #include #include -#include class TopOpeBRep_VPointInter; diff --git a/src/TopOpeBRep/TopOpeBRep_WPointInter.cxx b/src/TopOpeBRep/TopOpeBRep_WPointInter.cxx index 1008ef54d6..ecfe81ab67 100644 --- a/src/TopOpeBRep/TopOpeBRep_WPointInter.cxx +++ b/src/TopOpeBRep/TopOpeBRep_WPointInter.cxx @@ -15,7 +15,6 @@ // commercial license or contractual agreement. -#include #include #include #include diff --git a/src/TopOpeBRep/TopOpeBRep_WPointInter.hxx b/src/TopOpeBRep/TopOpeBRep_WPointInter.hxx index e6ab6f40e1..7a8b7fc41c 100644 --- a/src/TopOpeBRep/TopOpeBRep_WPointInter.hxx +++ b/src/TopOpeBRep/TopOpeBRep_WPointInter.hxx @@ -19,10 +19,8 @@ #include #include -#include #include -#include class gp_Pnt2d; class gp_Pnt; diff --git a/src/TopOpeBRep/TopOpeBRep_WPointInterIterator.cxx b/src/TopOpeBRep/TopOpeBRep_WPointInterIterator.cxx index 5cb52ed48e..4703d1152a 100644 --- a/src/TopOpeBRep/TopOpeBRep_WPointInterIterator.cxx +++ b/src/TopOpeBRep/TopOpeBRep_WPointInterIterator.cxx @@ -15,7 +15,6 @@ // commercial license or contractual agreement. -#include #include #include #include diff --git a/src/TopOpeBRep/TopOpeBRep_WPointInterIterator.hxx b/src/TopOpeBRep/TopOpeBRep_WPointInterIterator.hxx index c3073d88c7..12c410fbcd 100644 --- a/src/TopOpeBRep/TopOpeBRep_WPointInterIterator.hxx +++ b/src/TopOpeBRep/TopOpeBRep_WPointInterIterator.hxx @@ -19,11 +19,9 @@ #include #include -#include #include #include -#include class TopOpeBRep_WPointInter; diff --git a/src/TopOpeBRep/TopOpeBRep_kpart.cxx b/src/TopOpeBRep/TopOpeBRep_kpart.cxx index 5d21732487..e1971bc8ea 100644 --- a/src/TopOpeBRep/TopOpeBRep_kpart.cxx +++ b/src/TopOpeBRep/TopOpeBRep_kpart.cxx @@ -15,38 +15,23 @@ // commercial license or contractual agreement. -#include -#include -#include -#include -#include -#include #include -#include #include #include #include #include #include -#include #include #include #include #include #include -#include -#include -#include -#include #include -#include #include #include #include -#include #include #include -#include #ifdef OCCT_DEBUG extern Standard_Boolean TopOpeBRep_GetcontextNEWKP(); diff --git a/src/TopOpeBRep/TopOpeBRep_mergePDS.cxx b/src/TopOpeBRep/TopOpeBRep_mergePDS.cxx index ddd63bae84..207f768258 100644 --- a/src/TopOpeBRep/TopOpeBRep_mergePDS.cxx +++ b/src/TopOpeBRep/TopOpeBRep_mergePDS.cxx @@ -16,10 +16,8 @@ #include #include -#include #include #include -#include #include #include diff --git a/src/TopOpeBRep/TopOpeBRep_sort.cxx b/src/TopOpeBRep/TopOpeBRep_sort.cxx index 95fcbbbd05..6d58412339 100644 --- a/src/TopOpeBRep/TopOpeBRep_sort.cxx +++ b/src/TopOpeBRep/TopOpeBRep_sort.cxx @@ -15,7 +15,6 @@ // commercial license or contractual agreement. #include -#include #include #include #include diff --git a/src/TopOpeBRep/TopOpeBRep_vpr.cxx b/src/TopOpeBRep/TopOpeBRep_vpr.cxx index 7a2ea2e715..1e5338e88a 100644 --- a/src/TopOpeBRep/TopOpeBRep_vpr.cxx +++ b/src/TopOpeBRep/TopOpeBRep_vpr.cxx @@ -15,21 +15,14 @@ // commercial license or contractual agreement. -#include -#include -#include #include #include #include #include -#include #include #include #include -#include -#include #include -#include #include #ifdef DRAW @@ -38,29 +31,20 @@ #include #include -#include -#include #include #include #include -#include #include #include #include -#include #include #include -#include -#include #include -#include -#include #include #include -#include #include #include #include diff --git a/src/TopOpeBRep/TopOpeBRep_vprclo.cxx b/src/TopOpeBRep/TopOpeBRep_vprclo.cxx index ef99be702d..5c7a0a0fd2 100644 --- a/src/TopOpeBRep/TopOpeBRep_vprclo.cxx +++ b/src/TopOpeBRep/TopOpeBRep_vprclo.cxx @@ -16,35 +16,20 @@ #include -#include -#include -#include -#include #include #include -#include #include -#include #include -#include #include #include -#include #include #include -#include -#include -#include #include #include #include -#include -#include -#include #include #include #include -#include // LOIinfsup #define M_ON(st) (st == TopAbs_ON) diff --git a/src/TopOpeBRep/TopOpeBRep_vprdeg.cxx b/src/TopOpeBRep/TopOpeBRep_vprdeg.cxx index 0316d9bd80..1ac5ca1c1a 100644 --- a/src/TopOpeBRep/TopOpeBRep_vprdeg.cxx +++ b/src/TopOpeBRep/TopOpeBRep_vprdeg.cxx @@ -15,41 +15,25 @@ // commercial license or contractual agreement. -#include -#include -#include #include #include #include #include -#include #include #include #include -#include -#include #include -#include #include #ifdef DRAW #include #endif -#include -#include -#include - #include -#include -#include -#include //#include #include #include -#include #include -#include #include #include diff --git a/src/TopOpeBRepBuild/TopOpeBRepBuild_Area1dBuilder.cxx b/src/TopOpeBRepBuild/TopOpeBRepBuild_Area1dBuilder.cxx index 90865d58bd..6d04335a6e 100644 --- a/src/TopOpeBRepBuild/TopOpeBRepBuild_Area1dBuilder.cxx +++ b/src/TopOpeBRepBuild/TopOpeBRepBuild_Area1dBuilder.cxx @@ -15,16 +15,9 @@ // commercial license or contractual agreement. -#include -#include -#include -#include #include #include -#include #include -#include -#include #include #include diff --git a/src/TopOpeBRepBuild/TopOpeBRepBuild_Area1dBuilder.hxx b/src/TopOpeBRepBuild/TopOpeBRepBuild_Area1dBuilder.hxx index c7b81e0ec8..ebdb57325b 100644 --- a/src/TopOpeBRepBuild/TopOpeBRepBuild_Area1dBuilder.hxx +++ b/src/TopOpeBRepBuild/TopOpeBRepBuild_Area1dBuilder.hxx @@ -25,7 +25,6 @@ #include #include #include -#include class TopOpeBRepBuild_PaveSet; class TopOpeBRepBuild_PaveClassifier; class TopOpeBRepBuild_LoopSet; diff --git a/src/TopOpeBRepBuild/TopOpeBRepBuild_AreaBuilder.cxx b/src/TopOpeBRepBuild/TopOpeBRepBuild_AreaBuilder.cxx index 47f2874cc9..ff352553c0 100644 --- a/src/TopOpeBRepBuild/TopOpeBRepBuild_AreaBuilder.cxx +++ b/src/TopOpeBRepBuild/TopOpeBRepBuild_AreaBuilder.cxx @@ -20,8 +20,6 @@ // Celine // Voyage au bout de la nuit -#include -#include #include #include #include diff --git a/src/TopOpeBRepBuild/TopOpeBRepBuild_AreaBuilder.hxx b/src/TopOpeBRepBuild/TopOpeBRepBuild_AreaBuilder.hxx index c591b3452c..b57c66b30e 100644 --- a/src/TopOpeBRepBuild/TopOpeBRepBuild_AreaBuilder.hxx +++ b/src/TopOpeBRepBuild/TopOpeBRepBuild_AreaBuilder.hxx @@ -23,7 +23,6 @@ #include #include -#include #include #include #include diff --git a/src/TopOpeBRepBuild/TopOpeBRepBuild_BlockBuilder.cxx b/src/TopOpeBRepBuild/TopOpeBRepBuild_BlockBuilder.cxx index faa9b97d12..a9ee1ce702 100644 --- a/src/TopOpeBRepBuild/TopOpeBRepBuild_BlockBuilder.cxx +++ b/src/TopOpeBRepBuild/TopOpeBRepBuild_BlockBuilder.cxx @@ -15,8 +15,6 @@ // commercial license or contractual agreement. -#include -#include #include #include #include diff --git a/src/TopOpeBRepBuild/TopOpeBRepBuild_BlockBuilder.hxx b/src/TopOpeBRepBuild/TopOpeBRepBuild_BlockBuilder.hxx index 41ff37d27d..6208840f03 100644 --- a/src/TopOpeBRepBuild/TopOpeBRepBuild_BlockBuilder.hxx +++ b/src/TopOpeBRepBuild/TopOpeBRepBuild_BlockBuilder.hxx @@ -24,7 +24,6 @@ #include #include #include -#include #include class TopOpeBRepBuild_ShapeSet; class TopOpeBRepBuild_BlockIterator; diff --git a/src/TopOpeBRepBuild/TopOpeBRepBuild_BlockIterator.cxx b/src/TopOpeBRepBuild/TopOpeBRepBuild_BlockIterator.cxx index 0f1b03284d..fc698d1fab 100644 --- a/src/TopOpeBRepBuild/TopOpeBRepBuild_BlockIterator.cxx +++ b/src/TopOpeBRepBuild/TopOpeBRepBuild_BlockIterator.cxx @@ -15,7 +15,6 @@ // commercial license or contractual agreement. -#include #include //======================================================================= diff --git a/src/TopOpeBRepBuild/TopOpeBRepBuild_BlockIterator.hxx b/src/TopOpeBRepBuild/TopOpeBRepBuild_BlockIterator.hxx index cc4300b624..5d6151fbfb 100644 --- a/src/TopOpeBRepBuild/TopOpeBRepBuild_BlockIterator.hxx +++ b/src/TopOpeBRepBuild/TopOpeBRepBuild_BlockIterator.hxx @@ -21,7 +21,6 @@ #include #include -#include #include diff --git a/src/TopOpeBRepBuild/TopOpeBRepBuild_BuildEdges.cxx b/src/TopOpeBRepBuild/TopOpeBRepBuild_BuildEdges.cxx index 6a2bf5072e..5bdb161264 100644 --- a/src/TopOpeBRepBuild/TopOpeBRepBuild_BuildEdges.cxx +++ b/src/TopOpeBRepBuild/TopOpeBRepBuild_BuildEdges.cxx @@ -15,34 +15,18 @@ // commercial license or contractual agreement. -#include -#include -#include #include #include -#include -#include #include -#include -#include #include #include -#include -#include -#include #include -#include -#include -#include -#include #include #include #include #include #include #include -#include -#include #ifdef OCCT_DEBUG extern Standard_Boolean TopOpeBRepBuild_GettraceCU(); diff --git a/src/TopOpeBRepBuild/TopOpeBRepBuild_BuildFaces.cxx b/src/TopOpeBRepBuild/TopOpeBRepBuild_BuildFaces.cxx index 71b3004d36..c1347a0bd4 100644 --- a/src/TopOpeBRepBuild/TopOpeBRepBuild_BuildFaces.cxx +++ b/src/TopOpeBRepBuild/TopOpeBRepBuild_BuildFaces.cxx @@ -17,30 +17,15 @@ #include #include -#include -#include -#include -#include -#include #include -#include -#include #include -#include #include #include #include -#include -#include -#include -#include #include #include #include #include -#include -#include -#include #ifdef OCCT_DEBUG extern Standard_Boolean TopOpeBRepBuild_GettraceCU(); diff --git a/src/TopOpeBRepBuild/TopOpeBRepBuild_BuildVertices.cxx b/src/TopOpeBRepBuild/TopOpeBRepBuild_BuildVertices.cxx index 63d33010d8..bdfc194257 100644 --- a/src/TopOpeBRepBuild/TopOpeBRepBuild_BuildVertices.cxx +++ b/src/TopOpeBRepBuild/TopOpeBRepBuild_BuildVertices.cxx @@ -16,29 +16,10 @@ #include -#include -#include -#include -#include -#include -#include -#include -#include -#include #include #include -#include -#include -#include -#include -#include #include -#include #include -#include -#include -#include -#include //======================================================================= //function : BuildVertices diff --git a/src/TopOpeBRepBuild/TopOpeBRepBuild_Builder.cxx b/src/TopOpeBRepBuild/TopOpeBRepBuild_Builder.cxx index 8cd666c2c5..4125bdbb15 100644 --- a/src/TopOpeBRepBuild/TopOpeBRepBuild_Builder.cxx +++ b/src/TopOpeBRepBuild/TopOpeBRepBuild_Builder.cxx @@ -15,32 +15,21 @@ // commercial license or contractual agreement. -#include -#include #include -#include #include #include #include -#include #include -#include #include #include -#include #include -#include #include -#include #include -#include #include #include #include #include #include -#include -#include #include #include #include @@ -48,17 +37,13 @@ #include #include #include -#include -#include #include #include #include #include #include -#include #include #include -#include #include #include diff --git a/src/TopOpeBRepBuild/TopOpeBRepBuild_Builder.hxx b/src/TopOpeBRepBuild/TopOpeBRepBuild_Builder.hxx index c64f2111ae..43e21a2228 100644 --- a/src/TopOpeBRepBuild/TopOpeBRepBuild_Builder.hxx +++ b/src/TopOpeBRepBuild/TopOpeBRepBuild_Builder.hxx @@ -30,7 +30,6 @@ #include #include #include -#include #include #include #include @@ -46,7 +45,6 @@ #include #include #include -#include #include #include class TopOpeBRepDS_HDataStructure; diff --git a/src/TopOpeBRepBuild/TopOpeBRepBuild_Builder1.cxx b/src/TopOpeBRepBuild/TopOpeBRepBuild_Builder1.cxx index bc1b16c7d7..8369bcfb0c 100644 --- a/src/TopOpeBRepBuild/TopOpeBRepBuild_Builder1.cxx +++ b/src/TopOpeBRepBuild/TopOpeBRepBuild_Builder1.cxx @@ -25,7 +25,6 @@ #include #include #include -#include #include #include #include @@ -39,7 +38,6 @@ #include #include #include -#include #include #include #include diff --git a/src/TopOpeBRepBuild/TopOpeBRepBuild_Builder1.hxx b/src/TopOpeBRepBuild/TopOpeBRepBuild_Builder1.hxx index bfa0246b1c..344f90aea5 100644 --- a/src/TopOpeBRepBuild/TopOpeBRepBuild_Builder1.hxx +++ b/src/TopOpeBRepBuild/TopOpeBRepBuild_Builder1.hxx @@ -25,14 +25,10 @@ #include #include #include -#include -#include -#include #include #include #include #include -#include #include #include class TopOpeBRepDS_BuildTool; diff --git a/src/TopOpeBRepBuild/TopOpeBRepBuild_Builder1_1.cxx b/src/TopOpeBRepBuild/TopOpeBRepBuild_Builder1_1.cxx index f667366ca9..498fe590b0 100644 --- a/src/TopOpeBRepBuild/TopOpeBRepBuild_Builder1_1.cxx +++ b/src/TopOpeBRepBuild/TopOpeBRepBuild_Builder1_1.cxx @@ -15,57 +15,29 @@ // commercial license or contractual agreement. -#include -#include #include #include #include #include #include -#include -#include -#include #include #include #include -#include #include -#include -#include -#include -#include -#include #include #include #include -#include -#include -#include #include -#include -#include -#include #include -#include #include -#include -#include #include -#include #include #include -#include -#include -#include #include -#include #include -#include -#include #include #include #include -#include #include //define parameter division number as 10*e^(-PI) = 0.43213918 diff --git a/src/TopOpeBRepBuild/TopOpeBRepBuild_Builder1_2.cxx b/src/TopOpeBRepBuild/TopOpeBRepBuild_Builder1_2.cxx index 39e3e9a0f7..897576e1b3 100644 --- a/src/TopOpeBRepBuild/TopOpeBRepBuild_Builder1_2.cxx +++ b/src/TopOpeBRepBuild/TopOpeBRepBuild_Builder1_2.cxx @@ -14,29 +14,17 @@ // commercial license or contractual agreement. -#include #include -#include #include -#include -#include #include -#include -#include -#include -#include -#include #include #include #include -#include #include -#include #include #include #include #include -#include #include //======================================================================= diff --git a/src/TopOpeBRepBuild/TopOpeBRepBuild_BuilderON.cxx b/src/TopOpeBRepBuild/TopOpeBRepBuild_BuilderON.cxx index d02bc73760..3b16f0bb09 100644 --- a/src/TopOpeBRepBuild/TopOpeBRepBuild_BuilderON.cxx +++ b/src/TopOpeBRepBuild/TopOpeBRepBuild_BuilderON.cxx @@ -16,7 +16,6 @@ #include -#include #include #include #include @@ -26,7 +25,6 @@ #include #include #include -#include #include #include #include diff --git a/src/TopOpeBRepBuild/TopOpeBRepBuild_BuilderON.hxx b/src/TopOpeBRepBuild/TopOpeBRepBuild_BuilderON.hxx index 99b4edfe32..75df6fecb4 100644 --- a/src/TopOpeBRepBuild/TopOpeBRepBuild_BuilderON.hxx +++ b/src/TopOpeBRepBuild/TopOpeBRepBuild_BuilderON.hxx @@ -27,7 +27,6 @@ #include #include #include -#include class TopOpeBRepDS_Interference; diff --git a/src/TopOpeBRepBuild/TopOpeBRepBuild_BuilderON2d.cxx b/src/TopOpeBRepBuild/TopOpeBRepBuild_BuilderON2d.cxx index 391d9eee75..e86e905763 100644 --- a/src/TopOpeBRepBuild/TopOpeBRepBuild_BuilderON2d.cxx +++ b/src/TopOpeBRepBuild/TopOpeBRepBuild_BuilderON2d.cxx @@ -16,7 +16,6 @@ #include -#include #include #include #include @@ -26,7 +25,6 @@ #include #include #include -#include #include #include #include diff --git a/src/TopOpeBRepBuild/TopOpeBRepBuild_CompositeClassifier.cxx b/src/TopOpeBRepBuild/TopOpeBRepBuild_CompositeClassifier.cxx index ea50a7697c..0295422c93 100644 --- a/src/TopOpeBRepBuild/TopOpeBRepBuild_CompositeClassifier.cxx +++ b/src/TopOpeBRepBuild/TopOpeBRepBuild_CompositeClassifier.cxx @@ -16,7 +16,6 @@ #include -#include #include #include #include diff --git a/src/TopOpeBRepBuild/TopOpeBRepBuild_CompositeClassifier.hxx b/src/TopOpeBRepBuild/TopOpeBRepBuild_CompositeClassifier.hxx index 51020ecebc..cbf0d031c8 100644 --- a/src/TopOpeBRepBuild/TopOpeBRepBuild_CompositeClassifier.hxx +++ b/src/TopOpeBRepBuild/TopOpeBRepBuild_CompositeClassifier.hxx @@ -24,7 +24,6 @@ #include #include #include -#include class TopOpeBRepBuild_BlockBuilder; class TopOpeBRepBuild_Loop; class TopoDS_Shape; diff --git a/src/TopOpeBRepBuild/TopOpeBRepBuild_CorrectFace2d.cxx b/src/TopOpeBRepBuild/TopOpeBRepBuild_CorrectFace2d.cxx index 560cf16073..9c1054aa0f 100644 --- a/src/TopOpeBRepBuild/TopOpeBRepBuild_CorrectFace2d.cxx +++ b/src/TopOpeBRepBuild/TopOpeBRepBuild_CorrectFace2d.cxx @@ -41,7 +41,6 @@ #include #include #include -#include #include #include diff --git a/src/TopOpeBRepBuild/TopOpeBRepBuild_CorrectFace2d.hxx b/src/TopOpeBRepBuild/TopOpeBRepBuild_CorrectFace2d.hxx index 5127dd865b..4f3534007e 100644 --- a/src/TopOpeBRepBuild/TopOpeBRepBuild_CorrectFace2d.hxx +++ b/src/TopOpeBRepBuild/TopOpeBRepBuild_CorrectFace2d.hxx @@ -21,9 +21,7 @@ #include #include -#include #include -#include #include #include #include diff --git a/src/TopOpeBRepBuild/TopOpeBRepBuild_EdgeBuilder.cxx b/src/TopOpeBRepBuild/TopOpeBRepBuild_EdgeBuilder.cxx index 0392148a16..ef8103db40 100644 --- a/src/TopOpeBRepBuild/TopOpeBRepBuild_EdgeBuilder.cxx +++ b/src/TopOpeBRepBuild/TopOpeBRepBuild_EdgeBuilder.cxx @@ -15,11 +15,7 @@ // commercial license or contractual agreement. -#include #include -#include -#include -#include #include #include diff --git a/src/TopOpeBRepBuild/TopOpeBRepBuild_EdgeBuilder.hxx b/src/TopOpeBRepBuild/TopOpeBRepBuild_EdgeBuilder.hxx index 367e13c266..34c5b1f61c 100644 --- a/src/TopOpeBRepBuild/TopOpeBRepBuild_EdgeBuilder.hxx +++ b/src/TopOpeBRepBuild/TopOpeBRepBuild_EdgeBuilder.hxx @@ -23,7 +23,6 @@ #include #include -#include class TopOpeBRepBuild_PaveSet; class TopOpeBRepBuild_PaveClassifier; class TopOpeBRepBuild_LoopSet; diff --git a/src/TopOpeBRepBuild/TopOpeBRepBuild_End.cxx b/src/TopOpeBRepBuild/TopOpeBRepBuild_End.cxx index 4410ce08f1..871ef9b261 100644 --- a/src/TopOpeBRepBuild/TopOpeBRepBuild_End.cxx +++ b/src/TopOpeBRepBuild/TopOpeBRepBuild_End.cxx @@ -15,47 +15,24 @@ // commercial license or contractual agreement. -#include -#include -#include #include #include -#include #include #include -#include #include #include -#include #include #include -#include #include #include #include -#include -#include #include -#include -#include #include -#include -#include -#include -#include -#include -#include -#include -#include #include #include -#include -#include -#include #include #include #include -#include //#include #ifdef OCCT_DEBUG diff --git a/src/TopOpeBRepBuild/TopOpeBRepBuild_FREGU.cxx b/src/TopOpeBRepBuild/TopOpeBRepBuild_FREGU.cxx index f118f8a6d7..a08ead4ed1 100644 --- a/src/TopOpeBRepBuild/TopOpeBRepBuild_FREGU.cxx +++ b/src/TopOpeBRepBuild/TopOpeBRepBuild_FREGU.cxx @@ -15,37 +15,12 @@ // commercial license or contractual agreement. -#include -#include -#include -#include -#include -#include -#include -#include #include -#include -#include #include -#include -#include -#include -#include -#include #include #include #include -#include -#include -#include -#include #include -#include -#include -#include -#include -#include -#include #include #include diff --git a/src/TopOpeBRepBuild/TopOpeBRepBuild_FaceBuilder.cxx b/src/TopOpeBRepBuild/TopOpeBRepBuild_FaceBuilder.cxx index ecd0b7ca87..2cf6c55221 100644 --- a/src/TopOpeBRepBuild/TopOpeBRepBuild_FaceBuilder.cxx +++ b/src/TopOpeBRepBuild/TopOpeBRepBuild_FaceBuilder.cxx @@ -18,18 +18,14 @@ #include #include #include -#include #include -#include #include #include #include #include -#include #include #include #include -#include #include #include #include @@ -38,9 +34,6 @@ #include #include #include -#include -#include -#include #include #include #include diff --git a/src/TopOpeBRepBuild/TopOpeBRepBuild_FaceBuilder.hxx b/src/TopOpeBRepBuild/TopOpeBRepBuild_FaceBuilder.hxx index eca0555c99..8b107bb993 100644 --- a/src/TopOpeBRepBuild/TopOpeBRepBuild_FaceBuilder.hxx +++ b/src/TopOpeBRepBuild/TopOpeBRepBuild_FaceBuilder.hxx @@ -19,7 +19,6 @@ #include #include -#include #include #include @@ -27,7 +26,6 @@ #include #include #include -#include #include #include #include diff --git a/src/TopOpeBRepBuild/TopOpeBRepBuild_FuseFace.cxx b/src/TopOpeBRepBuild/TopOpeBRepBuild_FuseFace.cxx index ccb35cd316..7401a9c4be 100644 --- a/src/TopOpeBRepBuild/TopOpeBRepBuild_FuseFace.cxx +++ b/src/TopOpeBRepBuild/TopOpeBRepBuild_FuseFace.cxx @@ -17,20 +17,14 @@ #include #include -#include #include -#include #include -#include #include #include #include -#include -#include -#include #include #include diff --git a/src/TopOpeBRepBuild/TopOpeBRepBuild_FuseFace.hxx b/src/TopOpeBRepBuild/TopOpeBRepBuild_FuseFace.hxx index b3b2ded75d..7242ecc7f2 100644 --- a/src/TopOpeBRepBuild/TopOpeBRepBuild_FuseFace.hxx +++ b/src/TopOpeBRepBuild/TopOpeBRepBuild_FuseFace.hxx @@ -23,8 +23,6 @@ #include #include -#include - class TopOpeBRepBuild_FuseFace diff --git a/src/TopOpeBRepBuild/TopOpeBRepBuild_GIter.hxx b/src/TopOpeBRepBuild/TopOpeBRepBuild_GIter.hxx index ac3aa0fc12..abf7a04598 100644 --- a/src/TopOpeBRepBuild/TopOpeBRepBuild_GIter.hxx +++ b/src/TopOpeBRepBuild/TopOpeBRepBuild_GIter.hxx @@ -21,8 +21,6 @@ #include #include -#include -#include #include #include #include diff --git a/src/TopOpeBRepBuild/TopOpeBRepBuild_GTool.hxx b/src/TopOpeBRepBuild/TopOpeBRepBuild_GTool.hxx index 6ea7fc2ad7..c085300b44 100644 --- a/src/TopOpeBRepBuild/TopOpeBRepBuild_GTool.hxx +++ b/src/TopOpeBRepBuild/TopOpeBRepBuild_GTool.hxx @@ -19,7 +19,6 @@ #include #include -#include #include #include diff --git a/src/TopOpeBRepBuild/TopOpeBRepBuild_GTopo.cxx b/src/TopOpeBRepBuild/TopOpeBRepBuild_GTopo.cxx index fea7f880c0..86488cf2ac 100644 --- a/src/TopOpeBRepBuild/TopOpeBRepBuild_GTopo.cxx +++ b/src/TopOpeBRepBuild/TopOpeBRepBuild_GTopo.cxx @@ -16,7 +16,6 @@ #include -#include #include #include #include diff --git a/src/TopOpeBRepBuild/TopOpeBRepBuild_GTopo.hxx b/src/TopOpeBRepBuild/TopOpeBRepBuild_GTopo.hxx index 13ecd5112b..3f2f395d73 100644 --- a/src/TopOpeBRepBuild/TopOpeBRepBuild_GTopo.hxx +++ b/src/TopOpeBRepBuild/TopOpeBRepBuild_GTopo.hxx @@ -19,16 +19,12 @@ #include #include -#include -#include #include #include #include #include #include -#include - class TopOpeBRepBuild_GTopo diff --git a/src/TopOpeBRepBuild/TopOpeBRepBuild_Grid.cxx b/src/TopOpeBRepBuild/TopOpeBRepBuild_Grid.cxx index b6da61d8a2..6e0b209fd6 100644 --- a/src/TopOpeBRepBuild/TopOpeBRepBuild_Grid.cxx +++ b/src/TopOpeBRepBuild/TopOpeBRepBuild_Grid.cxx @@ -15,32 +15,12 @@ // commercial license or contractual agreement. -#include -#include -#include #include #include -#include -#include #include -#include -#include #include -#include -#include #include -#include -#include -#include -#include -#include -#include -#include -#include #include -#include -#include -#include #ifdef OCCT_DEBUG extern Standard_Boolean TopOpeBRepBuild_GetcontextSPEON(); diff --git a/src/TopOpeBRepBuild/TopOpeBRepBuild_GridEE.cxx b/src/TopOpeBRepBuild/TopOpeBRepBuild_GridEE.cxx index 8c7ce3a766..ef438227d6 100644 --- a/src/TopOpeBRepBuild/TopOpeBRepBuild_GridEE.cxx +++ b/src/TopOpeBRepBuild/TopOpeBRepBuild_GridEE.cxx @@ -16,36 +16,19 @@ #include -#include -#include -#include -#include -#include -#include -#include #include #include -#include #include -#include #include -#include -#include -#include -#include -#include #include -#include #include #include -#include #include #ifdef DRAW #include #endif -#include #include #include #include @@ -53,7 +36,6 @@ #include #include #include -#include #include #include #include @@ -61,10 +43,8 @@ #include #include #include -#include #include #include -#include #include #include diff --git a/src/TopOpeBRepBuild/TopOpeBRepBuild_GridFF.cxx b/src/TopOpeBRepBuild/TopOpeBRepBuild_GridFF.cxx index aaaf444417..2baa392faf 100644 --- a/src/TopOpeBRepBuild/TopOpeBRepBuild_GridFF.cxx +++ b/src/TopOpeBRepBuild/TopOpeBRepBuild_GridFF.cxx @@ -17,34 +17,20 @@ #include #include -#include -#include #include #include -#include -#include #include -#include -#include #include -#include #include #include -#include #include #include -#include -#include #include #include -#include #include -#include #include #include -#include #include -#include #include #include #include diff --git a/src/TopOpeBRepBuild/TopOpeBRepBuild_GridSS.cxx b/src/TopOpeBRepBuild/TopOpeBRepBuild_GridSS.cxx index 315117e45c..d6183fadc5 100644 --- a/src/TopOpeBRepBuild/TopOpeBRepBuild_GridSS.cxx +++ b/src/TopOpeBRepBuild/TopOpeBRepBuild_GridSS.cxx @@ -15,21 +15,14 @@ // commercial license or contractual agreement. -#include #include #include #include #include #include -#include #include -#include -#include #include -#include -#include #include -#include #include #include #include @@ -37,37 +30,25 @@ #include #include #include -#include #include -#include #include #include #include #include -#include #include -#include -#include #include -#include -#include #include #include -#include -#include #include #include #include #include #include #include -#include #include #include #include -#include #include -#include #include #include #include @@ -75,7 +56,6 @@ #include #include #include -#include #include #ifdef DRAW diff --git a/src/TopOpeBRepBuild/TopOpeBRepBuild_Griddump.cxx b/src/TopOpeBRepBuild/TopOpeBRepBuild_Griddump.cxx index 8f90b433b1..a83222487e 100644 --- a/src/TopOpeBRepBuild/TopOpeBRepBuild_Griddump.cxx +++ b/src/TopOpeBRepBuild/TopOpeBRepBuild_Griddump.cxx @@ -15,72 +15,26 @@ // commercial license or contractual agreement. -#include -#include -#include -#include -#include -#include -#include -#include #include #include #include -#include -#include -#include #include -#include #include -#include -#include -#include -#include -#include -#include #include -#include #ifdef DRAW #include #endif +#include +#include #include -#include -#include -#include -#include -#include -#include -#include #include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include #include -#include -#include -#include -#include +#include +#include #include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include #ifdef OCCT_DEBUG static TCollection_AsciiString PRODINS("dins "); diff --git a/src/TopOpeBRepBuild/TopOpeBRepBuild_HBuilder.cxx b/src/TopOpeBRepBuild/TopOpeBRepBuild_HBuilder.cxx index 94cdb4e6ad..a5b37062a2 100644 --- a/src/TopOpeBRepBuild/TopOpeBRepBuild_HBuilder.cxx +++ b/src/TopOpeBRepBuild/TopOpeBRepBuild_HBuilder.cxx @@ -16,13 +16,11 @@ #include -#include #include #include #include #include #include -#include #include #include #include @@ -33,7 +31,6 @@ #include #include #include -#include #include #include diff --git a/src/TopOpeBRepBuild/TopOpeBRepBuild_HBuilder.hxx b/src/TopOpeBRepBuild/TopOpeBRepBuild_HBuilder.hxx index 14b04058e2..e7900bb653 100644 --- a/src/TopOpeBRepBuild/TopOpeBRepBuild_HBuilder.hxx +++ b/src/TopOpeBRepBuild/TopOpeBRepBuild_HBuilder.hxx @@ -23,7 +23,6 @@ #include #include #include -#include #include #include #include diff --git a/src/TopOpeBRepBuild/TopOpeBRepBuild_KPart.cxx b/src/TopOpeBRepBuild/TopOpeBRepBuild_KPart.cxx index 9e030c3d23..f41a9ee587 100644 --- a/src/TopOpeBRepBuild/TopOpeBRepBuild_KPart.cxx +++ b/src/TopOpeBRepBuild/TopOpeBRepBuild_KPart.cxx @@ -15,16 +15,10 @@ // commercial license or contractual agreement. -#include -#include #include #include #include #include -#include -#include -#include -#include #include #include #include @@ -32,31 +26,17 @@ #include #include #include -#include -#include #include -#include -#include -#include -#include -#include #include #include #include #include -#include -#include -#include -#include -#include #include #include #include #include #include -#include #include -#include #include #include #include diff --git a/src/TopOpeBRepBuild/TopOpeBRepBuild_Loop.cxx b/src/TopOpeBRepBuild/TopOpeBRepBuild_Loop.cxx index 292cec4488..76108c92a8 100644 --- a/src/TopOpeBRepBuild/TopOpeBRepBuild_Loop.cxx +++ b/src/TopOpeBRepBuild/TopOpeBRepBuild_Loop.cxx @@ -15,9 +15,6 @@ // commercial license or contractual agreement. -#include -#include -#include #include IMPLEMENT_STANDARD_RTTIEXT(TopOpeBRepBuild_Loop,Standard_Transient) diff --git a/src/TopOpeBRepBuild/TopOpeBRepBuild_Loop.hxx b/src/TopOpeBRepBuild/TopOpeBRepBuild_Loop.hxx index bc166c52e7..2e30d3464e 100644 --- a/src/TopOpeBRepBuild/TopOpeBRepBuild_Loop.hxx +++ b/src/TopOpeBRepBuild/TopOpeBRepBuild_Loop.hxx @@ -18,7 +18,6 @@ #define _TopOpeBRepBuild_Loop_HeaderFile #include -#include #include #include diff --git a/src/TopOpeBRepBuild/TopOpeBRepBuild_LoopClassifier.cxx b/src/TopOpeBRepBuild/TopOpeBRepBuild_LoopClassifier.cxx index 0a6aca8739..2a36306d2e 100644 --- a/src/TopOpeBRepBuild/TopOpeBRepBuild_LoopClassifier.cxx +++ b/src/TopOpeBRepBuild/TopOpeBRepBuild_LoopClassifier.cxx @@ -15,7 +15,6 @@ // commercial license or contractual agreement. -#include #include TopOpeBRepBuild_LoopClassifier::~TopOpeBRepBuild_LoopClassifier() diff --git a/src/TopOpeBRepBuild/TopOpeBRepBuild_LoopSet.cxx b/src/TopOpeBRepBuild/TopOpeBRepBuild_LoopSet.cxx index 29ce2239c9..669a7737ed 100644 --- a/src/TopOpeBRepBuild/TopOpeBRepBuild_LoopSet.cxx +++ b/src/TopOpeBRepBuild/TopOpeBRepBuild_LoopSet.cxx @@ -15,7 +15,6 @@ // commercial license or contractual agreement. -#include #include //======================================================================= diff --git a/src/TopOpeBRepBuild/TopOpeBRepBuild_Merge.cxx b/src/TopOpeBRepBuild/TopOpeBRepBuild_Merge.cxx index 3de8f48df6..07a1771604 100644 --- a/src/TopOpeBRepBuild/TopOpeBRepBuild_Merge.cxx +++ b/src/TopOpeBRepBuild/TopOpeBRepBuild_Merge.cxx @@ -15,40 +15,23 @@ // commercial license or contractual agreement. -#include -#include #include #include #include #include -#include -#include -#include -#include #include #include -#include -#include -#include #include -#include -#include #include #include #include -#include #include -#include #include #include #include -#include #include -#include #include #include -#include -#include #include #include #include diff --git a/src/TopOpeBRepBuild/TopOpeBRepBuild_Pave.cxx b/src/TopOpeBRepBuild/TopOpeBRepBuild_Pave.cxx index eede0adac3..7e9be00665 100644 --- a/src/TopOpeBRepBuild/TopOpeBRepBuild_Pave.cxx +++ b/src/TopOpeBRepBuild/TopOpeBRepBuild_Pave.cxx @@ -15,9 +15,6 @@ // commercial license or contractual agreement. -#include -#include -#include #include IMPLEMENT_STANDARD_RTTIEXT(TopOpeBRepBuild_Pave,TopOpeBRepBuild_Loop) diff --git a/src/TopOpeBRepBuild/TopOpeBRepBuild_Pave.hxx b/src/TopOpeBRepBuild/TopOpeBRepBuild_Pave.hxx index 117b0912e2..f62e60c260 100644 --- a/src/TopOpeBRepBuild/TopOpeBRepBuild_Pave.hxx +++ b/src/TopOpeBRepBuild/TopOpeBRepBuild_Pave.hxx @@ -18,9 +18,7 @@ #define _TopOpeBRepBuild_Pave_HeaderFile #include -#include -#include #include #include #include diff --git a/src/TopOpeBRepBuild/TopOpeBRepBuild_PaveClassifier.cxx b/src/TopOpeBRepBuild/TopOpeBRepBuild_PaveClassifier.cxx index e1192dc3bf..540009c775 100644 --- a/src/TopOpeBRepBuild/TopOpeBRepBuild_PaveClassifier.cxx +++ b/src/TopOpeBRepBuild/TopOpeBRepBuild_PaveClassifier.cxx @@ -23,7 +23,6 @@ #include #include #include -#include #include #include diff --git a/src/TopOpeBRepBuild/TopOpeBRepBuild_PaveClassifier.hxx b/src/TopOpeBRepBuild/TopOpeBRepBuild_PaveClassifier.hxx index 980b5c02a0..6fb609911c 100644 --- a/src/TopOpeBRepBuild/TopOpeBRepBuild_PaveClassifier.hxx +++ b/src/TopOpeBRepBuild/TopOpeBRepBuild_PaveClassifier.hxx @@ -22,8 +22,6 @@ #include #include -#include -#include #include #include #include diff --git a/src/TopOpeBRepBuild/TopOpeBRepBuild_PaveSet.cxx b/src/TopOpeBRepBuild/TopOpeBRepBuild_PaveSet.cxx index 018e7c7daa..5e6e7c71ca 100644 --- a/src/TopOpeBRepBuild/TopOpeBRepBuild_PaveSet.cxx +++ b/src/TopOpeBRepBuild/TopOpeBRepBuild_PaveSet.cxx @@ -19,15 +19,11 @@ #include #include #include -#include #include #include #include -#include #include #include -#include -#include #include #ifdef OCCT_DEBUG diff --git a/src/TopOpeBRepBuild/TopOpeBRepBuild_PaveSet.hxx b/src/TopOpeBRepBuild/TopOpeBRepBuild_PaveSet.hxx index 3c8b4cf259..1c14ff80a9 100644 --- a/src/TopOpeBRepBuild/TopOpeBRepBuild_PaveSet.hxx +++ b/src/TopOpeBRepBuild/TopOpeBRepBuild_PaveSet.hxx @@ -22,10 +22,7 @@ #include #include -#include #include -#include -#include #include class TopoDS_Shape; class TopOpeBRepBuild_Pave; diff --git a/src/TopOpeBRepBuild/TopOpeBRepBuild_SREGU.cxx b/src/TopOpeBRepBuild/TopOpeBRepBuild_SREGU.cxx index 76886cde3c..e7340490cd 100644 --- a/src/TopOpeBRepBuild/TopOpeBRepBuild_SREGU.cxx +++ b/src/TopOpeBRepBuild/TopOpeBRepBuild_SREGU.cxx @@ -15,36 +15,14 @@ // commercial license or contractual agreement. -#include -#include -#include -#include -#include -#include #include -#include -#include #include -#include -#include -#include -#include -#include -#include #include #include #include -#include #include #include -#include -#include -#include -#include #include -#include -#include -#include #include #include diff --git a/src/TopOpeBRepBuild/TopOpeBRepBuild_Section.cxx b/src/TopOpeBRepBuild/TopOpeBRepBuild_Section.cxx index 2a494208ee..020074919f 100644 --- a/src/TopOpeBRepBuild/TopOpeBRepBuild_Section.cxx +++ b/src/TopOpeBRepBuild/TopOpeBRepBuild_Section.cxx @@ -15,46 +15,27 @@ // commercial license or contractual agreement. -#include -#include -#include #include -#include #include #include -#include #include -#include #include #include -#include -#include #include -#include -#include #include #include -#include #include #include #include #include -#include -#include #include -#include -#include #include #include #include -#include #include -#include #include -#include #include #include -#include #include #include #include diff --git a/src/TopOpeBRepBuild/TopOpeBRepBuild_ShapeListOfShape.cxx b/src/TopOpeBRepBuild/TopOpeBRepBuild_ShapeListOfShape.cxx index 687da7af29..f469f15609 100644 --- a/src/TopOpeBRepBuild/TopOpeBRepBuild_ShapeListOfShape.cxx +++ b/src/TopOpeBRepBuild/TopOpeBRepBuild_ShapeListOfShape.cxx @@ -15,7 +15,6 @@ // commercial license or contractual agreement. -#include #include #include diff --git a/src/TopOpeBRepBuild/TopOpeBRepBuild_ShapeSet.cxx b/src/TopOpeBRepBuild/TopOpeBRepBuild_ShapeSet.cxx index 496ac26ab0..f642dc603b 100644 --- a/src/TopOpeBRepBuild/TopOpeBRepBuild_ShapeSet.cxx +++ b/src/TopOpeBRepBuild/TopOpeBRepBuild_ShapeSet.cxx @@ -18,7 +18,6 @@ #include #include #include -#include #include #include #include diff --git a/src/TopOpeBRepBuild/TopOpeBRepBuild_ShapeSet.hxx b/src/TopOpeBRepBuild/TopOpeBRepBuild_ShapeSet.hxx index 80d4ee043b..d01dd57e1e 100644 --- a/src/TopOpeBRepBuild/TopOpeBRepBuild_ShapeSet.hxx +++ b/src/TopOpeBRepBuild/TopOpeBRepBuild_ShapeSet.hxx @@ -19,18 +19,15 @@ #include #include -#include #include #include #include -#include #include #include #include #include #include -#include #include diff --git a/src/TopOpeBRepBuild/TopOpeBRepBuild_ShellFaceClassifier.cxx b/src/TopOpeBRepBuild/TopOpeBRepBuild_ShellFaceClassifier.cxx index 9576369fe5..2f01be0e66 100644 --- a/src/TopOpeBRepBuild/TopOpeBRepBuild_ShellFaceClassifier.cxx +++ b/src/TopOpeBRepBuild/TopOpeBRepBuild_ShellFaceClassifier.cxx @@ -15,7 +15,6 @@ // commercial license or contractual agreement. -#include #include #include #include @@ -23,8 +22,6 @@ #include #include #include -#include -#include #include #include diff --git a/src/TopOpeBRepBuild/TopOpeBRepBuild_ShellFaceClassifier.hxx b/src/TopOpeBRepBuild/TopOpeBRepBuild_ShellFaceClassifier.hxx index 26fd01964b..1b05316190 100644 --- a/src/TopOpeBRepBuild/TopOpeBRepBuild_ShellFaceClassifier.hxx +++ b/src/TopOpeBRepBuild/TopOpeBRepBuild_ShellFaceClassifier.hxx @@ -19,12 +19,8 @@ #include #include -#include -#include #include -#include -#include #include #include #include diff --git a/src/TopOpeBRepBuild/TopOpeBRepBuild_ShellFaceSet.cxx b/src/TopOpeBRepBuild/TopOpeBRepBuild_ShellFaceSet.cxx index 26961279ac..1486f1a11f 100644 --- a/src/TopOpeBRepBuild/TopOpeBRepBuild_ShellFaceSet.cxx +++ b/src/TopOpeBRepBuild/TopOpeBRepBuild_ShellFaceSet.cxx @@ -20,11 +20,8 @@ static TCollection_AsciiString PRODINS("dins "); #endif -#include #include #include -#include -#include #include #include diff --git a/src/TopOpeBRepBuild/TopOpeBRepBuild_ShellFaceSet.hxx b/src/TopOpeBRepBuild/TopOpeBRepBuild_ShellFaceSet.hxx index a54103fbf0..c4af95cdb6 100644 --- a/src/TopOpeBRepBuild/TopOpeBRepBuild_ShellFaceSet.hxx +++ b/src/TopOpeBRepBuild/TopOpeBRepBuild_ShellFaceSet.hxx @@ -19,7 +19,6 @@ #include #include -#include #include #include diff --git a/src/TopOpeBRepBuild/TopOpeBRepBuild_ShellToSolid.cxx b/src/TopOpeBRepBuild/TopOpeBRepBuild_ShellToSolid.cxx index 091ca8ab03..01f610780e 100644 --- a/src/TopOpeBRepBuild/TopOpeBRepBuild_ShellToSolid.cxx +++ b/src/TopOpeBRepBuild/TopOpeBRepBuild_ShellToSolid.cxx @@ -15,14 +15,11 @@ // commercial license or contractual agreement. -#include -#include #include #include #include #include #include -#include //======================================================================= //function : TopOpeBRepBuild_ShellToSolid diff --git a/src/TopOpeBRepBuild/TopOpeBRepBuild_ShellToSolid.hxx b/src/TopOpeBRepBuild/TopOpeBRepBuild_ShellToSolid.hxx index 003d50d27f..302316ca4a 100644 --- a/src/TopOpeBRepBuild/TopOpeBRepBuild_ShellToSolid.hxx +++ b/src/TopOpeBRepBuild/TopOpeBRepBuild_ShellToSolid.hxx @@ -19,7 +19,6 @@ #include #include -#include #include class TopoDS_Shell; diff --git a/src/TopOpeBRepBuild/TopOpeBRepBuild_SolidAreaBuilder.hxx b/src/TopOpeBRepBuild/TopOpeBRepBuild_SolidAreaBuilder.hxx index 08134c3f71..20492f82a4 100644 --- a/src/TopOpeBRepBuild/TopOpeBRepBuild_SolidAreaBuilder.hxx +++ b/src/TopOpeBRepBuild/TopOpeBRepBuild_SolidAreaBuilder.hxx @@ -19,10 +19,8 @@ #include #include -#include #include -#include class TopOpeBRepBuild_LoopSet; class TopOpeBRepBuild_LoopClassifier; diff --git a/src/TopOpeBRepBuild/TopOpeBRepBuild_SolidBuilder.cxx b/src/TopOpeBRepBuild/TopOpeBRepBuild_SolidBuilder.cxx index 7eab8c47c4..2e016fef0f 100644 --- a/src/TopOpeBRepBuild/TopOpeBRepBuild_SolidBuilder.cxx +++ b/src/TopOpeBRepBuild/TopOpeBRepBuild_SolidBuilder.cxx @@ -16,10 +16,6 @@ #include -#include -#include -#include -#include #include #include #include diff --git a/src/TopOpeBRepBuild/TopOpeBRepBuild_SolidBuilder.hxx b/src/TopOpeBRepBuild/TopOpeBRepBuild_SolidBuilder.hxx index 9a2844c836..7b8b20978f 100644 --- a/src/TopOpeBRepBuild/TopOpeBRepBuild_SolidBuilder.hxx +++ b/src/TopOpeBRepBuild/TopOpeBRepBuild_SolidBuilder.hxx @@ -19,13 +19,11 @@ #include #include -#include #include #include #include #include -#include #include class TopOpeBRepBuild_ShellFaceSet; class TopoDS_Shape; diff --git a/src/TopOpeBRepBuild/TopOpeBRepBuild_Tools.cxx b/src/TopOpeBRepBuild/TopOpeBRepBuild_Tools.cxx index b629b1a0de..30bda5260c 100644 --- a/src/TopOpeBRepBuild/TopOpeBRepBuild_Tools.cxx +++ b/src/TopOpeBRepBuild/TopOpeBRepBuild_Tools.cxx @@ -16,35 +16,21 @@ #include -#include -#include #include #include #include #include -#include -#include -#include -#include #include -#include #include -#include #include #include -#include -#include #include -#include #include -#include -#include #include #include #include #include #include -#include #include #include #include @@ -52,23 +38,17 @@ #include #include #include -#include #include #include -#include #include -#include #include #include #include -#include #include #include #include #include -#include #include -#include #include //define parameter division number as 10*e^(-PI) = 0.43213918 diff --git a/src/TopOpeBRepBuild/TopOpeBRepBuild_Tools.hxx b/src/TopOpeBRepBuild/TopOpeBRepBuild_Tools.hxx index 19a5a95433..48b48954ac 100644 --- a/src/TopOpeBRepBuild/TopOpeBRepBuild_Tools.hxx +++ b/src/TopOpeBRepBuild/TopOpeBRepBuild_Tools.hxx @@ -19,7 +19,6 @@ #include #include -#include #include #include @@ -29,10 +28,8 @@ #include #include #include -#include #include #include -#include class TopoDS_Shape; class TopOpeBRepTool_ShapeClassifier; class TopoDS_Face; diff --git a/src/TopOpeBRepBuild/TopOpeBRepBuild_Tools2d.cxx b/src/TopOpeBRepBuild/TopOpeBRepBuild_Tools2d.cxx index d0d49e211f..8abf553298 100644 --- a/src/TopOpeBRepBuild/TopOpeBRepBuild_Tools2d.cxx +++ b/src/TopOpeBRepBuild/TopOpeBRepBuild_Tools2d.cxx @@ -18,12 +18,9 @@ #include #include #include -#include #include #include #include -#include -#include #include #include diff --git a/src/TopOpeBRepBuild/TopOpeBRepBuild_Tools2d.hxx b/src/TopOpeBRepBuild/TopOpeBRepBuild_Tools2d.hxx index a012f830f2..81c7a363ad 100644 --- a/src/TopOpeBRepBuild/TopOpeBRepBuild_Tools2d.hxx +++ b/src/TopOpeBRepBuild/TopOpeBRepBuild_Tools2d.hxx @@ -19,7 +19,6 @@ #include #include -#include #include #include diff --git a/src/TopOpeBRepBuild/TopOpeBRepBuild_Tools_1.cxx b/src/TopOpeBRepBuild/TopOpeBRepBuild_Tools_1.cxx index bf4fadaa5d..d51c363ae4 100644 --- a/src/TopOpeBRepBuild/TopOpeBRepBuild_Tools_1.cxx +++ b/src/TopOpeBRepBuild/TopOpeBRepBuild_Tools_1.cxx @@ -16,21 +16,12 @@ #include #include -#include #include -#include -#include -#include #include -#include -#include -#include #include #include -#include #include #include -#include #include #include #include @@ -45,11 +36,7 @@ #include #include #include -#include -#include #include -#include -#include #include #include #include diff --git a/src/TopOpeBRepBuild/TopOpeBRepBuild_VertexInfo.cxx b/src/TopOpeBRepBuild/TopOpeBRepBuild_VertexInfo.cxx index c303592cec..d307c3eeb4 100644 --- a/src/TopOpeBRepBuild/TopOpeBRepBuild_VertexInfo.cxx +++ b/src/TopOpeBRepBuild/TopOpeBRepBuild_VertexInfo.cxx @@ -13,8 +13,6 @@ #include -#include -#include #include #include diff --git a/src/TopOpeBRepBuild/TopOpeBRepBuild_VertexInfo.hxx b/src/TopOpeBRepBuild/TopOpeBRepBuild_VertexInfo.hxx index 4debef8a24..eb1873fd96 100644 --- a/src/TopOpeBRepBuild/TopOpeBRepBuild_VertexInfo.hxx +++ b/src/TopOpeBRepBuild/TopOpeBRepBuild_VertexInfo.hxx @@ -19,11 +19,9 @@ #include #include -#include #include #include -#include #include #include #include diff --git a/src/TopOpeBRepBuild/TopOpeBRepBuild_WireEdgeClassifier.cxx b/src/TopOpeBRepBuild/TopOpeBRepBuild_WireEdgeClassifier.cxx index 099ef2cf6a..411d3c2066 100644 --- a/src/TopOpeBRepBuild/TopOpeBRepBuild_WireEdgeClassifier.cxx +++ b/src/TopOpeBRepBuild/TopOpeBRepBuild_WireEdgeClassifier.cxx @@ -15,41 +15,25 @@ // commercial license or contractual agreement. -#include -#include -#include #include #ifdef DRAW #include #endif -#include #include -#include #include -#include #include -#include -#include -#include #include #include -#include -#include -#include #include -#include #include -#include #include #include #include #include -#include -#include #include #ifdef OCCT_DEBUG diff --git a/src/TopOpeBRepBuild/TopOpeBRepBuild_WireEdgeSet.cxx b/src/TopOpeBRepBuild/TopOpeBRepBuild_WireEdgeSet.cxx index 4bad75db04..a3e98020d0 100644 --- a/src/TopOpeBRepBuild/TopOpeBRepBuild_WireEdgeSet.cxx +++ b/src/TopOpeBRepBuild/TopOpeBRepBuild_WireEdgeSet.cxx @@ -19,15 +19,12 @@ static TCollection_AsciiString PRODINS("dins "); #endif -#include #include #include -#include #include #include #include #include -#include #include #include #include @@ -36,7 +33,6 @@ static TCollection_AsciiString PRODINS("dins "); #include #include #include -#include #include #include #include @@ -44,7 +40,6 @@ static TCollection_AsciiString PRODINS("dins "); #include #include #include -#include #ifdef OCCT_DEBUG extern Standard_Boolean TopOpeBRep_GettraceSHA(const Standard_Integer i); diff --git a/src/TopOpeBRepBuild/TopOpeBRepBuild_WireEdgeSet.hxx b/src/TopOpeBRepBuild/TopOpeBRepBuild_WireEdgeSet.hxx index a601585452..ee88c091ab 100644 --- a/src/TopOpeBRepBuild/TopOpeBRepBuild_WireEdgeSet.hxx +++ b/src/TopOpeBRepBuild/TopOpeBRepBuild_WireEdgeSet.hxx @@ -19,13 +19,10 @@ #include #include -#include #include #include -#include #include -#include #include #include #include diff --git a/src/TopOpeBRepBuild/TopOpeBRepBuild_WireToFace.cxx b/src/TopOpeBRepBuild/TopOpeBRepBuild_WireToFace.cxx index 17e8d0b3ab..10e1d34987 100644 --- a/src/TopOpeBRepBuild/TopOpeBRepBuild_WireToFace.cxx +++ b/src/TopOpeBRepBuild/TopOpeBRepBuild_WireToFace.cxx @@ -15,14 +15,11 @@ // commercial license or contractual agreement. -#include -#include #include #include #include #include #include -#include //======================================================================= //function : TopOpeBRepBuild_WireToFace diff --git a/src/TopOpeBRepBuild/TopOpeBRepBuild_WireToFace.hxx b/src/TopOpeBRepBuild/TopOpeBRepBuild_WireToFace.hxx index 1a26ea2879..0cbcce3157 100644 --- a/src/TopOpeBRepBuild/TopOpeBRepBuild_WireToFace.hxx +++ b/src/TopOpeBRepBuild/TopOpeBRepBuild_WireToFace.hxx @@ -19,7 +19,6 @@ #include #include -#include #include class TopoDS_Wire; diff --git a/src/TopOpeBRepBuild/TopOpeBRepBuild_fctwes.cxx b/src/TopOpeBRepBuild/TopOpeBRepBuild_fctwes.cxx index 32e54b676f..6477fb9547 100644 --- a/src/TopOpeBRepBuild/TopOpeBRepBuild_fctwes.cxx +++ b/src/TopOpeBRepBuild/TopOpeBRepBuild_fctwes.cxx @@ -15,37 +15,17 @@ // commercial license or contractual agreement. -#include -#include -#include -#include -#include #include -#include -#include #include -#include -#include #include -#include -#include #include -#include -#include -#include -#include -#include #include #include #include #include #include #include -#include -#include #include -#include -#include #include #ifdef OCCT_DEBUG diff --git a/src/TopOpeBRepBuild/TopOpeBRepBuild_ffsfs.cxx b/src/TopOpeBRepBuild/TopOpeBRepBuild_ffsfs.cxx index 69fcde8bf4..928e9616e4 100644 --- a/src/TopOpeBRepBuild/TopOpeBRepBuild_ffsfs.cxx +++ b/src/TopOpeBRepBuild/TopOpeBRepBuild_ffsfs.cxx @@ -19,35 +19,19 @@ #include #include #include -#include -#include #include -#include #include #include -#include -#include #include -#include #include #include #include -#include -#include #include #include -#include -#include -#include -#include #include #include -#include -#include -#include #include #include -#include #ifdef OCCT_DEBUG #define DEBSHASET(sarg,meth,shaset,str) TCollection_AsciiString sarg((meth));(sarg)=(sarg)+(shaset).DEBNumber()+(str); diff --git a/src/TopOpeBRepBuild/TopOpeBRepBuild_ffwesk.cxx b/src/TopOpeBRepBuild/TopOpeBRepBuild_ffwesk.cxx index 6d7152af97..c963b2737a 100644 --- a/src/TopOpeBRepBuild/TopOpeBRepBuild_ffwesk.cxx +++ b/src/TopOpeBRepBuild/TopOpeBRepBuild_ffwesk.cxx @@ -15,35 +15,14 @@ // commercial license or contractual agreement. -#include -#include -#include #include -#include -#include #include -#include -#include #include -#include -#include #include -#include -#include -#include -#include -#include #include #include -#include -#include #include #include -#include -#include -#include -#include -#include #ifdef OCCT_DEBUG Standard_EXPORT void debfctwesmess(const Standard_Integer i,const TCollection_AsciiString& s = ""); diff --git a/src/TopOpeBRepBuild/TopOpeBRepBuild_keep.cxx b/src/TopOpeBRepBuild/TopOpeBRepBuild_keep.cxx index 421a32c7ba..9cfd5523cf 100644 --- a/src/TopOpeBRepBuild/TopOpeBRepBuild_keep.cxx +++ b/src/TopOpeBRepBuild/TopOpeBRepBuild_keep.cxx @@ -15,30 +15,10 @@ // commercial license or contractual agreement. -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include #include #include #include -#include -#include -#include -#include -#include -#include -#include #include -#include -#include -#include #ifdef OCCT_DEBUG extern Standard_Integer GLOBAL_iexE; diff --git a/src/TopOpeBRepBuild/TopOpeBRepBuild_kpkole.cxx b/src/TopOpeBRepBuild/TopOpeBRepBuild_kpkole.cxx index a9cc3a1f16..3c7deac589 100644 --- a/src/TopOpeBRepBuild/TopOpeBRepBuild_kpkole.cxx +++ b/src/TopOpeBRepBuild/TopOpeBRepBuild_kpkole.cxx @@ -15,42 +15,18 @@ // commercial license or contractual agreement. -#include -#include -#include -#include -#include -#include #include #include -#include -#include #include -#include -#include -#include -#include -#include #include -#include -#include -#include #include #include -#include -#include -#include -#include -#include #include #include #include #include -#include #include -#include #include -#include #include #include diff --git a/src/TopOpeBRepBuild/TopOpeBRepBuild_makeedges.cxx b/src/TopOpeBRepBuild/TopOpeBRepBuild_makeedges.cxx index 850e2141fc..62d9e25ca3 100644 --- a/src/TopOpeBRepBuild/TopOpeBRepBuild_makeedges.cxx +++ b/src/TopOpeBRepBuild/TopOpeBRepBuild_makeedges.cxx @@ -15,33 +15,16 @@ // commercial license or contractual agreement. -#include -#include -#include -#include #include #include -#include -#include #include -#include -#include #include #include -#include #include -#include #include -#include -#include #include -#include #include -#include -#include #include -#include -#include #include #include diff --git a/src/TopOpeBRepBuild/TopOpeBRepBuild_makefaces.cxx b/src/TopOpeBRepBuild/TopOpeBRepBuild_makefaces.cxx index ee5a4443ba..4d58febb9d 100644 --- a/src/TopOpeBRepBuild/TopOpeBRepBuild_makefaces.cxx +++ b/src/TopOpeBRepBuild/TopOpeBRepBuild_makefaces.cxx @@ -15,44 +15,19 @@ // commercial license or contractual agreement. -#include -#include #include -#include #include #include -#include -#include -#include -#include #include -#include #include #include -#include -#include -#include #include -#include -#include -#include #include -#include #include -#include -#include -#include -#include -#include -#include #include -#include #include -#include #include #include -#include -#include #include #include #include diff --git a/src/TopOpeBRepBuild/TopOpeBRepBuild_makesolids.cxx b/src/TopOpeBRepBuild/TopOpeBRepBuild_makesolids.cxx index a36eb828be..02c3dc6622 100644 --- a/src/TopOpeBRepBuild/TopOpeBRepBuild_makesolids.cxx +++ b/src/TopOpeBRepBuild/TopOpeBRepBuild_makesolids.cxx @@ -15,40 +15,16 @@ // commercial license or contractual agreement. -#include -#include -#include -#include -#include #include -#include #include #include -#include -#include -#include #include -#include -#include -#include #include -#include -#include -#include -#include -#include -#include #include #include -#include #include -#include -#include -#include -#include #include #include -#include #include #ifdef OCCT_DEBUG diff --git a/src/TopOpeBRepBuild/TopOpeBRepBuild_on.cxx b/src/TopOpeBRepBuild/TopOpeBRepBuild_on.cxx index f46931bd34..357b7f6018 100644 --- a/src/TopOpeBRepBuild/TopOpeBRepBuild_on.cxx +++ b/src/TopOpeBRepBuild/TopOpeBRepBuild_on.cxx @@ -15,31 +15,11 @@ // commercial license or contractual agreement. -#include -#include -#include -#include -#include -#include -#include -#include #include #include -#include -#include #include -#include -#include -#include -#include -#include #include -#include #include -#include -#include -#include -#include //Standard_IMPORT extern Standard_Boolean GLOBAL_faces2d; extern Standard_Boolean GLOBAL_faces2d; diff --git a/src/TopOpeBRepDS/TopOpeBRepDS.cxx b/src/TopOpeBRepDS/TopOpeBRepDS.cxx index 538f786f1c..6f99f85bcb 100644 --- a/src/TopOpeBRepDS/TopOpeBRepDS.cxx +++ b/src/TopOpeBRepDS/TopOpeBRepDS.cxx @@ -16,7 +16,6 @@ #include -#include #include #include diff --git a/src/TopOpeBRepDS/TopOpeBRepDS.hxx b/src/TopOpeBRepDS/TopOpeBRepDS.hxx index 5af2f91bb9..ed304a7691 100644 --- a/src/TopOpeBRepDS/TopOpeBRepDS.hxx +++ b/src/TopOpeBRepDS/TopOpeBRepDS.hxx @@ -22,14 +22,11 @@ #include #include -#include #include -#include #include #include #include #include -#include class TCollection_AsciiString; diff --git a/src/TopOpeBRepDS/TopOpeBRepDS_Association.cxx b/src/TopOpeBRepDS/TopOpeBRepDS_Association.cxx index eb5857bf4f..5e0170c801 100644 --- a/src/TopOpeBRepDS/TopOpeBRepDS_Association.cxx +++ b/src/TopOpeBRepDS/TopOpeBRepDS_Association.cxx @@ -15,10 +15,8 @@ // commercial license or contractual agreement. -#include #include #include -#include IMPLEMENT_STANDARD_RTTIEXT(TopOpeBRepDS_Association,Standard_Transient) diff --git a/src/TopOpeBRepDS/TopOpeBRepDS_Association.hxx b/src/TopOpeBRepDS/TopOpeBRepDS_Association.hxx index bc380a8e24..25e34ffc8f 100644 --- a/src/TopOpeBRepDS/TopOpeBRepDS_Association.hxx +++ b/src/TopOpeBRepDS/TopOpeBRepDS_Association.hxx @@ -18,7 +18,6 @@ #define _TopOpeBRepDS_Association_HeaderFile #include -#include #include #include diff --git a/src/TopOpeBRepDS/TopOpeBRepDS_BuildTool.cxx b/src/TopOpeBRepDS/TopOpeBRepDS_BuildTool.cxx index 81b8dc02d2..9675131b9d 100644 --- a/src/TopOpeBRepDS/TopOpeBRepDS_BuildTool.cxx +++ b/src/TopOpeBRepDS/TopOpeBRepDS_BuildTool.cxx @@ -19,34 +19,17 @@ #include #include #include -#include -#include -#include #include -#include #include #include -#include -#include #include #include -#include -#include -#include #include -#include -#include #include -#include -#include -#include -#include -#include #include #include #include #include -#include #include #include #include @@ -54,10 +37,7 @@ #include #include #include -#include #include -#include -#include #include #include #include @@ -66,8 +46,6 @@ #include #include #include -#include -#include #include #include #include diff --git a/src/TopOpeBRepDS/TopOpeBRepDS_Check.cxx b/src/TopOpeBRepDS/TopOpeBRepDS_Check.cxx index e093e32327..0302e68634 100644 --- a/src/TopOpeBRepDS/TopOpeBRepDS_Check.cxx +++ b/src/TopOpeBRepDS/TopOpeBRepDS_Check.cxx @@ -18,30 +18,24 @@ #include #include #include -#include #include #include #include -#include #include #include #include #include -#include #include #include #include #include #include #include -#include #include #include #include -#include #include -#include IMPLEMENT_STANDARD_RTTIEXT(TopOpeBRepDS_Check,Standard_Transient) //======================================================================= diff --git a/src/TopOpeBRepDS/TopOpeBRepDS_Check.hxx b/src/TopOpeBRepDS/TopOpeBRepDS_Check.hxx index 45d875d418..09ced6724e 100644 --- a/src/TopOpeBRepDS/TopOpeBRepDS_Check.hxx +++ b/src/TopOpeBRepDS/TopOpeBRepDS_Check.hxx @@ -22,7 +22,6 @@ #include #include -#include #include #include #include diff --git a/src/TopOpeBRepDS/TopOpeBRepDS_Curve.cxx b/src/TopOpeBRepDS/TopOpeBRepDS_Curve.cxx index 902edd62aa..4b21b4023c 100644 --- a/src/TopOpeBRepDS/TopOpeBRepDS_Curve.cxx +++ b/src/TopOpeBRepDS/TopOpeBRepDS_Curve.cxx @@ -18,7 +18,6 @@ #include #include #include -#include #include #include #include diff --git a/src/TopOpeBRepDS/TopOpeBRepDS_Curve.hxx b/src/TopOpeBRepDS/TopOpeBRepDS_Curve.hxx index 5aa3ee871d..771ed79b57 100644 --- a/src/TopOpeBRepDS/TopOpeBRepDS_Curve.hxx +++ b/src/TopOpeBRepDS/TopOpeBRepDS_Curve.hxx @@ -21,11 +21,8 @@ #include #include -#include -#include #include #include -#include class Geom_Curve; class TopOpeBRepDS_Interference; class Geom2d_Curve; diff --git a/src/TopOpeBRepDS/TopOpeBRepDS_CurveData.cxx b/src/TopOpeBRepDS/TopOpeBRepDS_CurveData.cxx index a433e006e5..15d696cdec 100644 --- a/src/TopOpeBRepDS/TopOpeBRepDS_CurveData.cxx +++ b/src/TopOpeBRepDS/TopOpeBRepDS_CurveData.cxx @@ -15,7 +15,6 @@ // commercial license or contractual agreement. -#include #include #include diff --git a/src/TopOpeBRepDS/TopOpeBRepDS_CurveExplorer.hxx b/src/TopOpeBRepDS/TopOpeBRepDS_CurveExplorer.hxx index f45dd421c2..c25856e9db 100644 --- a/src/TopOpeBRepDS/TopOpeBRepDS_CurveExplorer.hxx +++ b/src/TopOpeBRepDS/TopOpeBRepDS_CurveExplorer.hxx @@ -19,11 +19,8 @@ #include #include -#include #include -#include -#include class TopOpeBRepDS_DataStructure; class TopOpeBRepDS_Curve; diff --git a/src/TopOpeBRepDS/TopOpeBRepDS_CurveIterator.hxx b/src/TopOpeBRepDS/TopOpeBRepDS_CurveIterator.hxx index 7f269398e7..155424d811 100644 --- a/src/TopOpeBRepDS/TopOpeBRepDS_CurveIterator.hxx +++ b/src/TopOpeBRepDS/TopOpeBRepDS_CurveIterator.hxx @@ -23,7 +23,6 @@ #include #include -#include #include #include #include diff --git a/src/TopOpeBRepDS/TopOpeBRepDS_CurvePointInterference.cxx b/src/TopOpeBRepDS/TopOpeBRepDS_CurvePointInterference.cxx index fb0b290ae5..3c7e9e16bd 100644 --- a/src/TopOpeBRepDS/TopOpeBRepDS_CurvePointInterference.cxx +++ b/src/TopOpeBRepDS/TopOpeBRepDS_CurvePointInterference.cxx @@ -15,7 +15,6 @@ // commercial license or contractual agreement. -#include #include #include diff --git a/src/TopOpeBRepDS/TopOpeBRepDS_CurvePointInterference.hxx b/src/TopOpeBRepDS/TopOpeBRepDS_CurvePointInterference.hxx index 9fff39cb11..63c488cbcd 100644 --- a/src/TopOpeBRepDS/TopOpeBRepDS_CurvePointInterference.hxx +++ b/src/TopOpeBRepDS/TopOpeBRepDS_CurvePointInterference.hxx @@ -18,7 +18,6 @@ #define _TopOpeBRepDS_CurvePointInterference_HeaderFile #include -#include #include #include diff --git a/src/TopOpeBRepDS/TopOpeBRepDS_DataMapOfInterferenceListOfInterference.hxx b/src/TopOpeBRepDS/TopOpeBRepDS_DataMapOfInterferenceListOfInterference.hxx index 9e6fce8f4e..3a504ee62d 100644 --- a/src/TopOpeBRepDS/TopOpeBRepDS_DataMapOfInterferenceListOfInterference.hxx +++ b/src/TopOpeBRepDS/TopOpeBRepDS_DataMapOfInterferenceListOfInterference.hxx @@ -17,7 +17,6 @@ #ifndef TopOpeBRepDS_DataMapOfInterferenceListOfInterference_HeaderFile #define TopOpeBRepDS_DataMapOfInterferenceListOfInterference_HeaderFile -#include #include #include #include diff --git a/src/TopOpeBRepDS/TopOpeBRepDS_DataStructure.cxx b/src/TopOpeBRepDS/TopOpeBRepDS_DataStructure.cxx index 1ee761c238..1e61a11711 100644 --- a/src/TopOpeBRepDS/TopOpeBRepDS_DataStructure.cxx +++ b/src/TopOpeBRepDS/TopOpeBRepDS_DataStructure.cxx @@ -15,27 +15,19 @@ // commercial license or contractual agreement. -#include -#include #include -#include #include -#include -#include #include #include #include #include #include #include -#include #include #include #include #include -#include #include -#include //======================================================================= //function : TopOpeBRepDS_DataStructure diff --git a/src/TopOpeBRepDS/TopOpeBRepDS_DataStructure.hxx b/src/TopOpeBRepDS/TopOpeBRepDS_DataStructure.hxx index 7162356c28..119da1c142 100644 --- a/src/TopOpeBRepDS/TopOpeBRepDS_DataStructure.hxx +++ b/src/TopOpeBRepDS/TopOpeBRepDS_DataStructure.hxx @@ -34,10 +34,8 @@ #include #include #include -#include #include #include -#include class Geom_Surface; class TopoDS_Edge; class TopOpeBRepDS_Interference; diff --git a/src/TopOpeBRepDS/TopOpeBRepDS_DoubleMapOfIntegerShape.hxx b/src/TopOpeBRepDS/TopOpeBRepDS_DoubleMapOfIntegerShape.hxx index acdde76d05..559a973f6f 100644 --- a/src/TopOpeBRepDS/TopOpeBRepDS_DoubleMapOfIntegerShape.hxx +++ b/src/TopOpeBRepDS/TopOpeBRepDS_DoubleMapOfIntegerShape.hxx @@ -17,8 +17,6 @@ #ifndef TopOpeBRepDS_DoubleMapOfIntegerShape_HeaderFile #define TopOpeBRepDS_DoubleMapOfIntegerShape_HeaderFile -#include -#include #include #include #include diff --git a/src/TopOpeBRepDS/TopOpeBRepDS_Dumper.cxx b/src/TopOpeBRepDS/TopOpeBRepDS_Dumper.cxx index 9f8620eedb..549941723e 100644 --- a/src/TopOpeBRepDS/TopOpeBRepDS_Dumper.cxx +++ b/src/TopOpeBRepDS/TopOpeBRepDS_Dumper.cxx @@ -17,50 +17,16 @@ #include #include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include #include #include -#include -#include #include #include -#include -#include -#include #include -#include #include -#include #include #include #include -#include -#include -#include -#include -#include -#include -#include -#include -#include //======================================================================= //function : TopOpeBRepDS_Dumper::TopOpeBRepDS_Dumper //purpose : diff --git a/src/TopOpeBRepDS/TopOpeBRepDS_Dumper.hxx b/src/TopOpeBRepDS/TopOpeBRepDS_Dumper.hxx index 26aca5d4db..2334067f30 100644 --- a/src/TopOpeBRepDS/TopOpeBRepDS_Dumper.hxx +++ b/src/TopOpeBRepDS/TopOpeBRepDS_Dumper.hxx @@ -21,12 +21,8 @@ #include #include -#include -#include #include #include -#include -#include #include #include class TopOpeBRepDS_HDataStructure; diff --git a/src/TopOpeBRepDS/TopOpeBRepDS_EIR.cxx b/src/TopOpeBRepDS/TopOpeBRepDS_EIR.cxx index d964eb34c2..278bd8723c 100644 --- a/src/TopOpeBRepDS/TopOpeBRepDS_EIR.cxx +++ b/src/TopOpeBRepDS/TopOpeBRepDS_EIR.cxx @@ -24,7 +24,6 @@ #include #include #include -#include #include #include #include diff --git a/src/TopOpeBRepDS/TopOpeBRepDS_EXPORT.cxx b/src/TopOpeBRepDS/TopOpeBRepDS_EXPORT.cxx index ec6b96d3d1..cb67638f1c 100644 --- a/src/TopOpeBRepDS/TopOpeBRepDS_EXPORT.cxx +++ b/src/TopOpeBRepDS/TopOpeBRepDS_EXPORT.cxx @@ -16,21 +16,15 @@ // Modified by xpu, Wed May 20 10:47:38 1998 -#include -#include #include -#include #include -#include #include #include #include #include #include -#include #include -#include #include #include #include @@ -39,7 +33,6 @@ #include #include -#include #include #include #include diff --git a/src/TopOpeBRepDS/TopOpeBRepDS_Edge3dInterferenceTool.cxx b/src/TopOpeBRepDS/TopOpeBRepDS_Edge3dInterferenceTool.cxx index 2fcfd692e4..2100cc4c1f 100644 --- a/src/TopOpeBRepDS/TopOpeBRepDS_Edge3dInterferenceTool.cxx +++ b/src/TopOpeBRepDS/TopOpeBRepDS_Edge3dInterferenceTool.cxx @@ -16,14 +16,10 @@ #include -#include -#include #include -#include #include #include #include -#include #include #include #include diff --git a/src/TopOpeBRepDS/TopOpeBRepDS_Edge3dInterferenceTool.hxx b/src/TopOpeBRepDS/TopOpeBRepDS_Edge3dInterferenceTool.hxx index e5e7793113..311f138605 100644 --- a/src/TopOpeBRepDS/TopOpeBRepDS_Edge3dInterferenceTool.hxx +++ b/src/TopOpeBRepDS/TopOpeBRepDS_Edge3dInterferenceTool.hxx @@ -23,8 +23,6 @@ #include #include -#include -#include #include #include #include diff --git a/src/TopOpeBRepDS/TopOpeBRepDS_EdgeInterferenceTool.cxx b/src/TopOpeBRepDS/TopOpeBRepDS_EdgeInterferenceTool.cxx index b7ebf13980..4848430443 100644 --- a/src/TopOpeBRepDS/TopOpeBRepDS_EdgeInterferenceTool.cxx +++ b/src/TopOpeBRepDS/TopOpeBRepDS_EdgeInterferenceTool.cxx @@ -17,7 +17,6 @@ #include #include -#include #include #include #include diff --git a/src/TopOpeBRepDS/TopOpeBRepDS_EdgeVertexInterference.cxx b/src/TopOpeBRepDS/TopOpeBRepDS_EdgeVertexInterference.cxx index b84adf43e1..c7e8ad6014 100644 --- a/src/TopOpeBRepDS/TopOpeBRepDS_EdgeVertexInterference.cxx +++ b/src/TopOpeBRepDS/TopOpeBRepDS_EdgeVertexInterference.cxx @@ -15,7 +15,6 @@ // commercial license or contractual agreement. -#include #include #include #include diff --git a/src/TopOpeBRepDS/TopOpeBRepDS_EdgeVertexInterference.hxx b/src/TopOpeBRepDS/TopOpeBRepDS_EdgeVertexInterference.hxx index 818f51219e..940cbcd356 100644 --- a/src/TopOpeBRepDS/TopOpeBRepDS_EdgeVertexInterference.hxx +++ b/src/TopOpeBRepDS/TopOpeBRepDS_EdgeVertexInterference.hxx @@ -18,7 +18,6 @@ #define _TopOpeBRepDS_EdgeVertexInterference_HeaderFile #include -#include #include #include diff --git a/src/TopOpeBRepDS/TopOpeBRepDS_Explorer.cxx b/src/TopOpeBRepDS/TopOpeBRepDS_Explorer.cxx index a9844fab27..e55fa62514 100644 --- a/src/TopOpeBRepDS/TopOpeBRepDS_Explorer.cxx +++ b/src/TopOpeBRepDS/TopOpeBRepDS_Explorer.cxx @@ -19,12 +19,8 @@ #include -#include #include -#include -#include #include -#include #include #include #include diff --git a/src/TopOpeBRepDS/TopOpeBRepDS_Explorer.hxx b/src/TopOpeBRepDS/TopOpeBRepDS_Explorer.hxx index 1cc33caee8..f896906732 100644 --- a/src/TopOpeBRepDS/TopOpeBRepDS_Explorer.hxx +++ b/src/TopOpeBRepDS/TopOpeBRepDS_Explorer.hxx @@ -23,7 +23,6 @@ #include #include -#include class TopOpeBRepDS_HDataStructure; class TopoDS_Shape; class TopoDS_Face; diff --git a/src/TopOpeBRepDS/TopOpeBRepDS_FIR.cxx b/src/TopOpeBRepDS/TopOpeBRepDS_FIR.cxx index 34ff41d62e..f3e7f76686 100644 --- a/src/TopOpeBRepDS/TopOpeBRepDS_FIR.cxx +++ b/src/TopOpeBRepDS/TopOpeBRepDS_FIR.cxx @@ -14,19 +14,11 @@ // Robert Boehne 30 May 2000 : Dec Osf -#include -#include -#include #include #include -#include -#include -#include #include #include -#include #include -#include #include #include #include diff --git a/src/TopOpeBRepDS/TopOpeBRepDS_FaceEdgeInterference.cxx b/src/TopOpeBRepDS/TopOpeBRepDS_FaceEdgeInterference.cxx index 49153e865b..0021521624 100644 --- a/src/TopOpeBRepDS/TopOpeBRepDS_FaceEdgeInterference.cxx +++ b/src/TopOpeBRepDS/TopOpeBRepDS_FaceEdgeInterference.cxx @@ -15,7 +15,6 @@ // commercial license or contractual agreement. -#include #include #include #include diff --git a/src/TopOpeBRepDS/TopOpeBRepDS_FaceEdgeInterference.hxx b/src/TopOpeBRepDS/TopOpeBRepDS_FaceEdgeInterference.hxx index 31fbba1b8f..ee73ecf86b 100644 --- a/src/TopOpeBRepDS/TopOpeBRepDS_FaceEdgeInterference.hxx +++ b/src/TopOpeBRepDS/TopOpeBRepDS_FaceEdgeInterference.hxx @@ -18,7 +18,6 @@ #define _TopOpeBRepDS_FaceEdgeInterference_HeaderFile #include -#include #include #include diff --git a/src/TopOpeBRepDS/TopOpeBRepDS_FaceInterferenceTool.cxx b/src/TopOpeBRepDS/TopOpeBRepDS_FaceInterferenceTool.cxx index 34dbd4dc69..28c40191e4 100644 --- a/src/TopOpeBRepDS/TopOpeBRepDS_FaceInterferenceTool.cxx +++ b/src/TopOpeBRepDS/TopOpeBRepDS_FaceInterferenceTool.cxx @@ -16,21 +16,15 @@ #include -#include -#include #include #include #include #include #include #include -#include #include #include -#include -#include #include -#include #include #include #include diff --git a/src/TopOpeBRepDS/TopOpeBRepDS_FaceInterferenceTool.hxx b/src/TopOpeBRepDS/TopOpeBRepDS_FaceInterferenceTool.hxx index 7b55297ad2..424c27ad02 100644 --- a/src/TopOpeBRepDS/TopOpeBRepDS_FaceInterferenceTool.hxx +++ b/src/TopOpeBRepDS/TopOpeBRepDS_FaceInterferenceTool.hxx @@ -22,13 +22,11 @@ #include #include -#include #include #include #include #include #include -#include class TopOpeBRepDS_Interference; class TopOpeBRepDS_Curve; diff --git a/src/TopOpeBRepDS/TopOpeBRepDS_Filter.cxx b/src/TopOpeBRepDS/TopOpeBRepDS_Filter.cxx index 1df21e9b92..2c6c874680 100644 --- a/src/TopOpeBRepDS/TopOpeBRepDS_Filter.cxx +++ b/src/TopOpeBRepDS/TopOpeBRepDS_Filter.cxx @@ -15,13 +15,8 @@ // commercial license or contractual agreement. -#include -#include #include #include -#include -#include -#include //======================================================================= //function : TopOpeBRepDS_Filter diff --git a/src/TopOpeBRepDS/TopOpeBRepDS_FilterCurveInterferences.cxx b/src/TopOpeBRepDS/TopOpeBRepDS_FilterCurveInterferences.cxx index e724528478..ab5b4054eb 100644 --- a/src/TopOpeBRepDS/TopOpeBRepDS_FilterCurveInterferences.cxx +++ b/src/TopOpeBRepDS/TopOpeBRepDS_FilterCurveInterferences.cxx @@ -16,10 +16,6 @@ #include -#include -#include -#include -#include #include //======================================================================= diff --git a/src/TopOpeBRepDS/TopOpeBRepDS_FilterEdgeInterferences.cxx b/src/TopOpeBRepDS/TopOpeBRepDS_FilterEdgeInterferences.cxx index a6ddd5d9b9..e125bef7cb 100644 --- a/src/TopOpeBRepDS/TopOpeBRepDS_FilterEdgeInterferences.cxx +++ b/src/TopOpeBRepDS/TopOpeBRepDS_FilterEdgeInterferences.cxx @@ -15,13 +15,7 @@ // commercial license or contractual agreement. -#include -#include -#include #include -#include -#include -#include #include #include diff --git a/src/TopOpeBRepDS/TopOpeBRepDS_FilterFaceInterferences.cxx b/src/TopOpeBRepDS/TopOpeBRepDS_FilterFaceInterferences.cxx index 7216907070..53ad548631 100644 --- a/src/TopOpeBRepDS/TopOpeBRepDS_FilterFaceInterferences.cxx +++ b/src/TopOpeBRepDS/TopOpeBRepDS_FilterFaceInterferences.cxx @@ -15,16 +15,8 @@ // commercial license or contractual agreement. -#include -#include -#include -#include #include -#include -#include -#include #include -#include #include Standard_EXPORT Standard_Integer FUN_unkeepFdoubleGBoundinterferences(TopOpeBRepDS_ListOfInterference& LI,const TopOpeBRepDS_DataStructure& BDS,const Standard_Integer SIX); diff --git a/src/TopOpeBRepDS/TopOpeBRepDS_GapFiller.cxx b/src/TopOpeBRepDS/TopOpeBRepDS_GapFiller.cxx index 46b0614def..baf9ba1482 100644 --- a/src/TopOpeBRepDS/TopOpeBRepDS_GapFiller.cxx +++ b/src/TopOpeBRepDS/TopOpeBRepDS_GapFiller.cxx @@ -24,9 +24,7 @@ #include #include #include -#include #include -#include #include #include #include @@ -38,9 +36,7 @@ #include #include #include -#include #include -#include #include //======================================================================= diff --git a/src/TopOpeBRepDS/TopOpeBRepDS_GapFiller.hxx b/src/TopOpeBRepDS/TopOpeBRepDS_GapFiller.hxx index 6d523df560..e3795e5f9a 100644 --- a/src/TopOpeBRepDS/TopOpeBRepDS_GapFiller.hxx +++ b/src/TopOpeBRepDS/TopOpeBRepDS_GapFiller.hxx @@ -22,7 +22,6 @@ #include #include -#include #include class TopOpeBRepDS_HDataStructure; class TopOpeBRepDS_GapTool; diff --git a/src/TopOpeBRepDS/TopOpeBRepDS_GapTool.cxx b/src/TopOpeBRepDS/TopOpeBRepDS_GapTool.cxx index f648d9fac3..f86c1193da 100644 --- a/src/TopOpeBRepDS/TopOpeBRepDS_GapTool.cxx +++ b/src/TopOpeBRepDS/TopOpeBRepDS_GapTool.cxx @@ -15,15 +15,10 @@ // commercial license or contractual agreement. -#include -#include -#include -#include #include #include #include #include -#include IMPLEMENT_STANDARD_RTTIEXT(TopOpeBRepDS_GapTool,Standard_Transient) diff --git a/src/TopOpeBRepDS/TopOpeBRepDS_GapTool.hxx b/src/TopOpeBRepDS/TopOpeBRepDS_GapTool.hxx index ace42cf8af..a17de716ed 100644 --- a/src/TopOpeBRepDS/TopOpeBRepDS_GapTool.hxx +++ b/src/TopOpeBRepDS/TopOpeBRepDS_GapTool.hxx @@ -25,8 +25,6 @@ #include #include #include -#include -#include class TopOpeBRepDS_HDataStructure; class TopOpeBRepDS_Interference; class TopOpeBRepDS_Curve; diff --git a/src/TopOpeBRepDS/TopOpeBRepDS_HArray1OfDataMapOfIntegerListOfInterference.hxx b/src/TopOpeBRepDS/TopOpeBRepDS_HArray1OfDataMapOfIntegerListOfInterference.hxx index 5d2ffbec99..4aea19a98c 100644 --- a/src/TopOpeBRepDS/TopOpeBRepDS_HArray1OfDataMapOfIntegerListOfInterference.hxx +++ b/src/TopOpeBRepDS/TopOpeBRepDS_HArray1OfDataMapOfIntegerListOfInterference.hxx @@ -17,7 +17,6 @@ #ifndef TopOpeBRepDS_HArray1OfDataMapOfIntegerListOfInterference_HeaderFile #define TopOpeBRepDS_HArray1OfDataMapOfIntegerListOfInterference_HeaderFile -#include #include #include diff --git a/src/TopOpeBRepDS/TopOpeBRepDS_HDataStructure.cxx b/src/TopOpeBRepDS/TopOpeBRepDS_HDataStructure.cxx index 6a440c5abe..94d2851eeb 100644 --- a/src/TopOpeBRepDS/TopOpeBRepDS_HDataStructure.cxx +++ b/src/TopOpeBRepDS/TopOpeBRepDS_HDataStructure.cxx @@ -19,26 +19,17 @@ #include #include #include -#include #include -#include #include #include #include -#include #include -#include #include -#include -#include -#include #include #include -#include #include #include #include -#include #include #include #include diff --git a/src/TopOpeBRepDS/TopOpeBRepDS_HDataStructure.hxx b/src/TopOpeBRepDS/TopOpeBRepDS_HDataStructure.hxx index 8757e82cc4..7fb0c20e38 100644 --- a/src/TopOpeBRepDS/TopOpeBRepDS_HDataStructure.hxx +++ b/src/TopOpeBRepDS/TopOpeBRepDS_HDataStructure.hxx @@ -21,17 +21,13 @@ #include #include -#include #include #include #include #include -#include #include #include #include -#include -#include class TopoDS_Shape; class TopOpeBRepDS_Surface; class TopOpeBRepDS_CurveIterator; diff --git a/src/TopOpeBRepDS/TopOpeBRepDS_Interference.cxx b/src/TopOpeBRepDS/TopOpeBRepDS_Interference.cxx index fc59d6410d..8582da84b8 100644 --- a/src/TopOpeBRepDS/TopOpeBRepDS_Interference.cxx +++ b/src/TopOpeBRepDS/TopOpeBRepDS_Interference.cxx @@ -15,9 +15,6 @@ // commercial license or contractual agreement. -#include -#include -#include #include #include #include diff --git a/src/TopOpeBRepDS/TopOpeBRepDS_Interference.hxx b/src/TopOpeBRepDS/TopOpeBRepDS_Interference.hxx index 19f47308e4..55354c7ae2 100644 --- a/src/TopOpeBRepDS/TopOpeBRepDS_Interference.hxx +++ b/src/TopOpeBRepDS/TopOpeBRepDS_Interference.hxx @@ -24,7 +24,6 @@ #include #include #include -#include #include diff --git a/src/TopOpeBRepDS/TopOpeBRepDS_InterferenceIterator.cxx b/src/TopOpeBRepDS/TopOpeBRepDS_InterferenceIterator.cxx index f22804a7bc..a2e4c4915d 100644 --- a/src/TopOpeBRepDS/TopOpeBRepDS_InterferenceIterator.cxx +++ b/src/TopOpeBRepDS/TopOpeBRepDS_InterferenceIterator.cxx @@ -15,7 +15,6 @@ // commercial license or contractual agreement. -#include #include //======================================================================= diff --git a/src/TopOpeBRepDS/TopOpeBRepDS_InterferenceTool.cxx b/src/TopOpeBRepDS/TopOpeBRepDS_InterferenceTool.cxx index 39165f0498..956a1ded34 100644 --- a/src/TopOpeBRepDS/TopOpeBRepDS_InterferenceTool.cxx +++ b/src/TopOpeBRepDS/TopOpeBRepDS_InterferenceTool.cxx @@ -16,10 +16,6 @@ #include -#include -#include -#include -#include #include #include #include diff --git a/src/TopOpeBRepDS/TopOpeBRepDS_InterferenceTool.hxx b/src/TopOpeBRepDS/TopOpeBRepDS_InterferenceTool.hxx index 6607107c8c..61e4745e25 100644 --- a/src/TopOpeBRepDS/TopOpeBRepDS_InterferenceTool.hxx +++ b/src/TopOpeBRepDS/TopOpeBRepDS_InterferenceTool.hxx @@ -23,8 +23,6 @@ #include #include -#include -#include #include class TopOpeBRepDS_Interference; class TopOpeBRepDS_Transition; diff --git a/src/TopOpeBRepDS/TopOpeBRepDS_ListOfShapeOn1State.cxx b/src/TopOpeBRepDS/TopOpeBRepDS_ListOfShapeOn1State.cxx index a572aead7f..ef7ecf5216 100644 --- a/src/TopOpeBRepDS/TopOpeBRepDS_ListOfShapeOn1State.cxx +++ b/src/TopOpeBRepDS/TopOpeBRepDS_ListOfShapeOn1State.cxx @@ -15,7 +15,6 @@ // commercial license or contractual agreement. -#include #include //======================================================================= diff --git a/src/TopOpeBRepDS/TopOpeBRepDS_ListOfShapeOn1State.hxx b/src/TopOpeBRepDS/TopOpeBRepDS_ListOfShapeOn1State.hxx index 12b8caf5d5..2e27d27335 100644 --- a/src/TopOpeBRepDS/TopOpeBRepDS_ListOfShapeOn1State.hxx +++ b/src/TopOpeBRepDS/TopOpeBRepDS_ListOfShapeOn1State.hxx @@ -22,7 +22,6 @@ #include #include -#include #include diff --git a/src/TopOpeBRepDS/TopOpeBRepDS_MapOfIntegerShapeData.hxx b/src/TopOpeBRepDS/TopOpeBRepDS_MapOfIntegerShapeData.hxx index 6b334540b0..6dd5be6afd 100644 --- a/src/TopOpeBRepDS/TopOpeBRepDS_MapOfIntegerShapeData.hxx +++ b/src/TopOpeBRepDS/TopOpeBRepDS_MapOfIntegerShapeData.hxx @@ -17,7 +17,6 @@ #ifndef TopOpeBRepDS_MapOfIntegerShapeData_HeaderFile #define TopOpeBRepDS_MapOfIntegerShapeData_HeaderFile -#include #include #include #include diff --git a/src/TopOpeBRepDS/TopOpeBRepDS_Marker.hxx b/src/TopOpeBRepDS/TopOpeBRepDS_Marker.hxx index 4cefe2ff33..e1b9ae3086 100644 --- a/src/TopOpeBRepDS/TopOpeBRepDS_Marker.hxx +++ b/src/TopOpeBRepDS/TopOpeBRepDS_Marker.hxx @@ -23,7 +23,6 @@ #include #include #include -#include #include diff --git a/src/TopOpeBRepDS/TopOpeBRepDS_Point.cxx b/src/TopOpeBRepDS/TopOpeBRepDS_Point.cxx index ec2aafae55..265dc39ffb 100644 --- a/src/TopOpeBRepDS/TopOpeBRepDS_Point.cxx +++ b/src/TopOpeBRepDS/TopOpeBRepDS_Point.cxx @@ -15,7 +15,6 @@ // commercial license or contractual agreement. -#include #include #include #include diff --git a/src/TopOpeBRepDS/TopOpeBRepDS_Point.hxx b/src/TopOpeBRepDS/TopOpeBRepDS_Point.hxx index 1b2fbc0edf..55d15f4b79 100644 --- a/src/TopOpeBRepDS/TopOpeBRepDS_Point.hxx +++ b/src/TopOpeBRepDS/TopOpeBRepDS_Point.hxx @@ -22,8 +22,6 @@ #include #include -#include -#include class TopoDS_Shape; diff --git a/src/TopOpeBRepDS/TopOpeBRepDS_PointData.cxx b/src/TopOpeBRepDS/TopOpeBRepDS_PointData.cxx index 8ad538cf17..30fb81a244 100644 --- a/src/TopOpeBRepDS/TopOpeBRepDS_PointData.cxx +++ b/src/TopOpeBRepDS/TopOpeBRepDS_PointData.cxx @@ -15,7 +15,6 @@ // commercial license or contractual agreement. -#include #include #include #include diff --git a/src/TopOpeBRepDS/TopOpeBRepDS_PointData.hxx b/src/TopOpeBRepDS/TopOpeBRepDS_PointData.hxx index 8cc69e2d33..3befcd5068 100644 --- a/src/TopOpeBRepDS/TopOpeBRepDS_PointData.hxx +++ b/src/TopOpeBRepDS/TopOpeBRepDS_PointData.hxx @@ -19,7 +19,6 @@ #include #include -#include #include #include diff --git a/src/TopOpeBRepDS/TopOpeBRepDS_PointExplorer.hxx b/src/TopOpeBRepDS/TopOpeBRepDS_PointExplorer.hxx index 9e653e1876..ad99b663b3 100644 --- a/src/TopOpeBRepDS/TopOpeBRepDS_PointExplorer.hxx +++ b/src/TopOpeBRepDS/TopOpeBRepDS_PointExplorer.hxx @@ -19,11 +19,8 @@ #include #include -#include #include -#include -#include #include class TopOpeBRepDS_DataStructure; diff --git a/src/TopOpeBRepDS/TopOpeBRepDS_PointIterator.cxx b/src/TopOpeBRepDS/TopOpeBRepDS_PointIterator.cxx index 0d83cd56cc..2578d35cd3 100644 --- a/src/TopOpeBRepDS/TopOpeBRepDS_PointIterator.cxx +++ b/src/TopOpeBRepDS/TopOpeBRepDS_PointIterator.cxx @@ -15,7 +15,6 @@ // commercial license or contractual agreement. -#include #include #include #include diff --git a/src/TopOpeBRepDS/TopOpeBRepDS_PointIterator.hxx b/src/TopOpeBRepDS/TopOpeBRepDS_PointIterator.hxx index b8e45892b7..fbf4a54e18 100644 --- a/src/TopOpeBRepDS/TopOpeBRepDS_PointIterator.hxx +++ b/src/TopOpeBRepDS/TopOpeBRepDS_PointIterator.hxx @@ -23,11 +23,9 @@ #include #include -#include #include #include #include -#include class TopOpeBRepDS_Interference; diff --git a/src/TopOpeBRepDS/TopOpeBRepDS_ProcessEdgeInterferences.cxx b/src/TopOpeBRepDS/TopOpeBRepDS_ProcessEdgeInterferences.cxx index 2385817aec..c217ab605d 100644 --- a/src/TopOpeBRepDS/TopOpeBRepDS_ProcessEdgeInterferences.cxx +++ b/src/TopOpeBRepDS/TopOpeBRepDS_ProcessEdgeInterferences.cxx @@ -14,21 +14,13 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -#include #include -#include -#include #include #include -#include -#include #include #include #include -#include -#include #include -#include #include #include #include diff --git a/src/TopOpeBRepDS/TopOpeBRepDS_ProcessFaceInterferences.cxx b/src/TopOpeBRepDS/TopOpeBRepDS_ProcessFaceInterferences.cxx index fcecdaf10a..7c76e98149 100644 --- a/src/TopOpeBRepDS/TopOpeBRepDS_ProcessFaceInterferences.cxx +++ b/src/TopOpeBRepDS/TopOpeBRepDS_ProcessFaceInterferences.cxx @@ -16,30 +16,15 @@ #include #include -#include -#include #include -#include -#include -#include -#include -#include #include -#include -#include #include -#include -#include -#include #include #include -#include #include #include -#include -#include #include #include #include diff --git a/src/TopOpeBRepDS/TopOpeBRepDS_ProcessInterferencesTool.cxx b/src/TopOpeBRepDS/TopOpeBRepDS_ProcessInterferencesTool.cxx index 59d5643b19..068670c4a9 100644 --- a/src/TopOpeBRepDS/TopOpeBRepDS_ProcessInterferencesTool.cxx +++ b/src/TopOpeBRepDS/TopOpeBRepDS_ProcessInterferencesTool.cxx @@ -17,16 +17,11 @@ #include #include #include -#include #include #include -#include #include //#include #include -#include -#include -#include #include #include #include diff --git a/src/TopOpeBRepDS/TopOpeBRepDS_ProcessInterferencesTool.hxx b/src/TopOpeBRepDS/TopOpeBRepDS_ProcessInterferencesTool.hxx index 2e4b922c1d..791b6aa77f 100644 --- a/src/TopOpeBRepDS/TopOpeBRepDS_ProcessInterferencesTool.hxx +++ b/src/TopOpeBRepDS/TopOpeBRepDS_ProcessInterferencesTool.hxx @@ -17,7 +17,6 @@ #ifndef _TopOpeBRepDS_ProcessInterferencesTool_HeaderFile #define _TopOpeBRepDS_ProcessInterferencesTool_HeaderFile -#include #include Standard_EXPORT Handle(TopOpeBRepDS_Interference) MakeCPVInterference (const TopOpeBRepDS_Transition& T, // transition diff --git a/src/TopOpeBRepDS/TopOpeBRepDS_ShapeData.hxx b/src/TopOpeBRepDS/TopOpeBRepDS_ShapeData.hxx index 1337a8abde..386dfad427 100644 --- a/src/TopOpeBRepDS/TopOpeBRepDS_ShapeData.hxx +++ b/src/TopOpeBRepDS/TopOpeBRepDS_ShapeData.hxx @@ -19,15 +19,12 @@ #include #include -#include #include #include #include #include #include -#include - class TopOpeBRepDS_ShapeData diff --git a/src/TopOpeBRepDS/TopOpeBRepDS_ShapeShapeInterference.cxx b/src/TopOpeBRepDS/TopOpeBRepDS_ShapeShapeInterference.cxx index 8a3500e373..faf685a1a9 100644 --- a/src/TopOpeBRepDS/TopOpeBRepDS_ShapeShapeInterference.cxx +++ b/src/TopOpeBRepDS/TopOpeBRepDS_ShapeShapeInterference.cxx @@ -15,8 +15,6 @@ // commercial license or contractual agreement. -#include -#include #include #include #include diff --git a/src/TopOpeBRepDS/TopOpeBRepDS_ShapeShapeInterference.hxx b/src/TopOpeBRepDS/TopOpeBRepDS_ShapeShapeInterference.hxx index 294fb471fa..99046a291d 100644 --- a/src/TopOpeBRepDS/TopOpeBRepDS_ShapeShapeInterference.hxx +++ b/src/TopOpeBRepDS/TopOpeBRepDS_ShapeShapeInterference.hxx @@ -20,7 +20,6 @@ #include #include -#include #include #include #include diff --git a/src/TopOpeBRepDS/TopOpeBRepDS_ShapeWithState.cxx b/src/TopOpeBRepDS/TopOpeBRepDS_ShapeWithState.cxx index 2e8312e295..fc0ff428b8 100644 --- a/src/TopOpeBRepDS/TopOpeBRepDS_ShapeWithState.cxx +++ b/src/TopOpeBRepDS/TopOpeBRepDS_ShapeWithState.cxx @@ -15,7 +15,6 @@ // commercial license or contractual agreement. -#include #include #include diff --git a/src/TopOpeBRepDS/TopOpeBRepDS_SolidSurfaceInterference.cxx b/src/TopOpeBRepDS/TopOpeBRepDS_SolidSurfaceInterference.cxx index daee40ec11..5b2e576b3b 100644 --- a/src/TopOpeBRepDS/TopOpeBRepDS_SolidSurfaceInterference.cxx +++ b/src/TopOpeBRepDS/TopOpeBRepDS_SolidSurfaceInterference.cxx @@ -15,7 +15,6 @@ // commercial license or contractual agreement. -#include #include #include diff --git a/src/TopOpeBRepDS/TopOpeBRepDS_SolidSurfaceInterference.hxx b/src/TopOpeBRepDS/TopOpeBRepDS_SolidSurfaceInterference.hxx index ce9da00a35..d1bf2323e7 100644 --- a/src/TopOpeBRepDS/TopOpeBRepDS_SolidSurfaceInterference.hxx +++ b/src/TopOpeBRepDS/TopOpeBRepDS_SolidSurfaceInterference.hxx @@ -18,7 +18,6 @@ #define _TopOpeBRepDS_SolidSurfaceInterference_HeaderFile #include -#include #include #include diff --git a/src/TopOpeBRepDS/TopOpeBRepDS_SurfaceCurveInterference.cxx b/src/TopOpeBRepDS/TopOpeBRepDS_SurfaceCurveInterference.cxx index 8dcad5b830..d5a385aa56 100644 --- a/src/TopOpeBRepDS/TopOpeBRepDS_SurfaceCurveInterference.cxx +++ b/src/TopOpeBRepDS/TopOpeBRepDS_SurfaceCurveInterference.cxx @@ -17,7 +17,6 @@ #include #include -#include #include #include diff --git a/src/TopOpeBRepDS/TopOpeBRepDS_SurfaceCurveInterference.hxx b/src/TopOpeBRepDS/TopOpeBRepDS_SurfaceCurveInterference.hxx index 3b9d965cb8..89a37f9bc8 100644 --- a/src/TopOpeBRepDS/TopOpeBRepDS_SurfaceCurveInterference.hxx +++ b/src/TopOpeBRepDS/TopOpeBRepDS_SurfaceCurveInterference.hxx @@ -23,8 +23,6 @@ #include #include #include -#include -#include class Geom2d_Curve; class TopOpeBRepDS_Transition; diff --git a/src/TopOpeBRepDS/TopOpeBRepDS_SurfaceData.cxx b/src/TopOpeBRepDS/TopOpeBRepDS_SurfaceData.cxx index 521d2fafc3..9166de3dae 100644 --- a/src/TopOpeBRepDS/TopOpeBRepDS_SurfaceData.cxx +++ b/src/TopOpeBRepDS/TopOpeBRepDS_SurfaceData.cxx @@ -15,7 +15,6 @@ // commercial license or contractual agreement. -#include #include #include diff --git a/src/TopOpeBRepDS/TopOpeBRepDS_SurfaceData.hxx b/src/TopOpeBRepDS/TopOpeBRepDS_SurfaceData.hxx index 909be7b22e..c1797ef233 100644 --- a/src/TopOpeBRepDS/TopOpeBRepDS_SurfaceData.hxx +++ b/src/TopOpeBRepDS/TopOpeBRepDS_SurfaceData.hxx @@ -19,7 +19,6 @@ #include #include -#include #include #include diff --git a/src/TopOpeBRepDS/TopOpeBRepDS_SurfaceExplorer.hxx b/src/TopOpeBRepDS/TopOpeBRepDS_SurfaceExplorer.hxx index aac2c3b393..63d3db45cd 100644 --- a/src/TopOpeBRepDS/TopOpeBRepDS_SurfaceExplorer.hxx +++ b/src/TopOpeBRepDS/TopOpeBRepDS_SurfaceExplorer.hxx @@ -19,11 +19,8 @@ #include #include -#include #include -#include -#include #include class TopOpeBRepDS_DataStructure; diff --git a/src/TopOpeBRepDS/TopOpeBRepDS_SurfaceIterator.cxx b/src/TopOpeBRepDS/TopOpeBRepDS_SurfaceIterator.cxx index d873494b9e..34185f0113 100644 --- a/src/TopOpeBRepDS/TopOpeBRepDS_SurfaceIterator.cxx +++ b/src/TopOpeBRepDS/TopOpeBRepDS_SurfaceIterator.cxx @@ -15,7 +15,6 @@ // commercial license or contractual agreement. -#include #include //======================================================================= diff --git a/src/TopOpeBRepDS/TopOpeBRepDS_SurfaceIterator.hxx b/src/TopOpeBRepDS/TopOpeBRepDS_SurfaceIterator.hxx index ebd288a16a..0b95f208a5 100644 --- a/src/TopOpeBRepDS/TopOpeBRepDS_SurfaceIterator.hxx +++ b/src/TopOpeBRepDS/TopOpeBRepDS_SurfaceIterator.hxx @@ -23,7 +23,6 @@ #include #include -#include #include #include diff --git a/src/TopOpeBRepDS/TopOpeBRepDS_TKI.cxx b/src/TopOpeBRepDS/TopOpeBRepDS_TKI.cxx index d8a7b23abc..18c88e12a6 100644 --- a/src/TopOpeBRepDS/TopOpeBRepDS_TKI.cxx +++ b/src/TopOpeBRepDS/TopOpeBRepDS_TKI.cxx @@ -18,8 +18,6 @@ #include #include #include -#include -#include #include #include #include diff --git a/src/TopOpeBRepDS/TopOpeBRepDS_TKI.hxx b/src/TopOpeBRepDS/TopOpeBRepDS_TKI.hxx index 953f4965e7..48f6e980c3 100644 --- a/src/TopOpeBRepDS/TopOpeBRepDS_TKI.hxx +++ b/src/TopOpeBRepDS/TopOpeBRepDS_TKI.hxx @@ -23,11 +23,9 @@ #include #include -#include #include #include #include -#include class TopOpeBRepDS_Interference; diff --git a/src/TopOpeBRepDS/TopOpeBRepDS_TOOL.cxx b/src/TopOpeBRepDS/TopOpeBRepDS_TOOL.cxx index 58a12152a5..ab9554d4e4 100644 --- a/src/TopOpeBRepDS/TopOpeBRepDS_TOOL.cxx +++ b/src/TopOpeBRepDS/TopOpeBRepDS_TOOL.cxx @@ -18,13 +18,8 @@ #include #include #include -#include #include #include -#include -#include -#include -#include #include #include #include diff --git a/src/TopOpeBRepDS/TopOpeBRepDS_TOOL.hxx b/src/TopOpeBRepDS/TopOpeBRepDS_TOOL.hxx index 02a08af5e9..19cd7d073b 100644 --- a/src/TopOpeBRepDS/TopOpeBRepDS_TOOL.hxx +++ b/src/TopOpeBRepDS/TopOpeBRepDS_TOOL.hxx @@ -23,7 +23,6 @@ #include #include -#include #include class TopOpeBRepDS_HDataStructure; class TopoDS_Edge; diff --git a/src/TopOpeBRepDS/TopOpeBRepDS_Transition.cxx b/src/TopOpeBRepDS/TopOpeBRepDS_Transition.cxx index d8f7087310..9f38cc6df1 100644 --- a/src/TopOpeBRepDS/TopOpeBRepDS_Transition.cxx +++ b/src/TopOpeBRepDS/TopOpeBRepDS_Transition.cxx @@ -15,7 +15,6 @@ // commercial license or contractual agreement. -#include #include #include diff --git a/src/TopOpeBRepDS/TopOpeBRepDS_Transition.hxx b/src/TopOpeBRepDS/TopOpeBRepDS_Transition.hxx index cdde7f7df6..52c9ff7f04 100644 --- a/src/TopOpeBRepDS/TopOpeBRepDS_Transition.hxx +++ b/src/TopOpeBRepDS/TopOpeBRepDS_Transition.hxx @@ -19,15 +19,11 @@ #include #include -#include #include #include #include #include -#include -#include - class TopOpeBRepDS_Transition diff --git a/src/TopOpeBRepDS/TopOpeBRepDS_funk.cxx b/src/TopOpeBRepDS/TopOpeBRepDS_funk.cxx index cc141dc451..8f278bad66 100644 --- a/src/TopOpeBRepDS/TopOpeBRepDS_funk.cxx +++ b/src/TopOpeBRepDS/TopOpeBRepDS_funk.cxx @@ -18,29 +18,14 @@ #include #include -#include #include -#include #include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include #include -#include -#include #include #include -#include #include +#include #include -#include #include #include #include @@ -49,10 +34,8 @@ #include #include #include -#include #include #include -#include Standard_EXPORT Handle(Geom2d_Curve) MakePCurve(const ProjLib_ProjectedCurve& PC); diff --git a/src/TopOpeBRepDS/TopOpeBRepDS_redu.cxx b/src/TopOpeBRepDS/TopOpeBRepDS_redu.cxx index aa7d49af3e..4243889767 100644 --- a/src/TopOpeBRepDS/TopOpeBRepDS_redu.cxx +++ b/src/TopOpeBRepDS/TopOpeBRepDS_redu.cxx @@ -17,12 +17,9 @@ #include #include -#include -#include #include #include -#include #include #define M_FORWARD(st) (st == TopAbs_FORWARD) diff --git a/src/TopOpeBRepDS/TopOpeBRepDS_repvg.cxx b/src/TopOpeBRepDS/TopOpeBRepDS_repvg.cxx index 12c3825cf8..b7ab7f15ed 100644 --- a/src/TopOpeBRepDS/TopOpeBRepDS_repvg.cxx +++ b/src/TopOpeBRepDS/TopOpeBRepDS_repvg.cxx @@ -16,10 +16,7 @@ #include #include -#include -#include -#include #include #include @@ -27,13 +24,10 @@ #include #include #include -#include #include #include -#include #include -#include #define MDSdmoiloi TopOpeBRepDS_DataMapOfIntegerListOfInterference #define MDSdmiodmoiloi TopOpeBRepDS_DataMapIteratorOfDataMapOfIntegerListOfInterference diff --git a/src/TopOpeBRepTool/TopOpeBRepTool.hxx b/src/TopOpeBRepTool/TopOpeBRepTool.hxx index 912ac17f8c..5c1ec0d021 100644 --- a/src/TopOpeBRepTool/TopOpeBRepTool.hxx +++ b/src/TopOpeBRepTool/TopOpeBRepTool.hxx @@ -24,7 +24,6 @@ #include #include #include -#include #include #include #include diff --git a/src/TopOpeBRepTool/TopOpeBRepTool_2d.cxx b/src/TopOpeBRepTool/TopOpeBRepTool_2d.cxx index da51e0ea60..1ce1bae625 100644 --- a/src/TopOpeBRepTool/TopOpeBRepTool_2d.cxx +++ b/src/TopOpeBRepTool/TopOpeBRepTool_2d.cxx @@ -22,15 +22,10 @@ #include #include #include -#include -#include -#include -#include #include #include #include #include -#include #include #include #include diff --git a/src/TopOpeBRepTool/TopOpeBRepTool_AncestorsTool.cxx b/src/TopOpeBRepTool/TopOpeBRepTool_AncestorsTool.cxx index 9421cda1e1..3c3cfc0df3 100644 --- a/src/TopOpeBRepTool/TopOpeBRepTool_AncestorsTool.cxx +++ b/src/TopOpeBRepTool/TopOpeBRepTool_AncestorsTool.cxx @@ -15,7 +15,6 @@ // commercial license or contractual agreement. -#include #include #include #include diff --git a/src/TopOpeBRepTool/TopOpeBRepTool_AncestorsTool.hxx b/src/TopOpeBRepTool/TopOpeBRepTool_AncestorsTool.hxx index 9608fb90db..ba0cb59638 100644 --- a/src/TopOpeBRepTool/TopOpeBRepTool_AncestorsTool.hxx +++ b/src/TopOpeBRepTool/TopOpeBRepTool_AncestorsTool.hxx @@ -19,7 +19,6 @@ #include #include -#include #include #include diff --git a/src/TopOpeBRepTool/TopOpeBRepTool_BoxSort.cxx b/src/TopOpeBRepTool/TopOpeBRepTool_BoxSort.cxx index 82ea6e7069..0b62ca1ac9 100644 --- a/src/TopOpeBRepTool/TopOpeBRepTool_BoxSort.cxx +++ b/src/TopOpeBRepTool/TopOpeBRepTool_BoxSort.cxx @@ -18,17 +18,13 @@ #include #include #include -#include #include #include #include #include #include #include -#include -#include #include -#include #include #include #include diff --git a/src/TopOpeBRepTool/TopOpeBRepTool_C2DF.cxx b/src/TopOpeBRepTool/TopOpeBRepTool_C2DF.cxx index c34975c734..e0048823ba 100644 --- a/src/TopOpeBRepTool/TopOpeBRepTool_C2DF.cxx +++ b/src/TopOpeBRepTool/TopOpeBRepTool_C2DF.cxx @@ -16,7 +16,6 @@ #include -#include #include #include diff --git a/src/TopOpeBRepTool/TopOpeBRepTool_C2DF.hxx b/src/TopOpeBRepTool/TopOpeBRepTool_C2DF.hxx index f411bb6a12..41b15cdc00 100644 --- a/src/TopOpeBRepTool/TopOpeBRepTool_C2DF.hxx +++ b/src/TopOpeBRepTool/TopOpeBRepTool_C2DF.hxx @@ -21,9 +21,7 @@ #include #include -#include #include -#include class Geom2d_Curve; diff --git a/src/TopOpeBRepTool/TopOpeBRepTool_CLASSI.cxx b/src/TopOpeBRepTool/TopOpeBRepTool_CLASSI.cxx index abd41708b3..b520802632 100644 --- a/src/TopOpeBRepTool/TopOpeBRepTool_CLASSI.cxx +++ b/src/TopOpeBRepTool/TopOpeBRepTool_CLASSI.cxx @@ -19,7 +19,6 @@ #include #include #include -#include #include #include #include @@ -29,7 +28,6 @@ #include #include #include -#include #include #include #include diff --git a/src/TopOpeBRepTool/TopOpeBRepTool_CLASSI.hxx b/src/TopOpeBRepTool/TopOpeBRepTool_CLASSI.hxx index b33704b15f..7bc116e281 100644 --- a/src/TopOpeBRepTool/TopOpeBRepTool_CLASSI.hxx +++ b/src/TopOpeBRepTool/TopOpeBRepTool_CLASSI.hxx @@ -19,14 +19,11 @@ #include #include -#include #include #include #include -#include #include -#include #include #include class TopoDS_Shape; diff --git a/src/TopOpeBRepTool/TopOpeBRepTool_CORRISO.cxx b/src/TopOpeBRepTool/TopOpeBRepTool_CORRISO.cxx index 5fc6248527..691e3c157b 100644 --- a/src/TopOpeBRepTool/TopOpeBRepTool_CORRISO.cxx +++ b/src/TopOpeBRepTool/TopOpeBRepTool_CORRISO.cxx @@ -18,22 +18,16 @@ #include #include #include -#include -#include #include #include #include -#include -#include #include #include -#include #include #include #include #include #include -#include #include #include #include diff --git a/src/TopOpeBRepTool/TopOpeBRepTool_CORRISO.hxx b/src/TopOpeBRepTool/TopOpeBRepTool_CORRISO.hxx index b5896f6588..2985656d82 100644 --- a/src/TopOpeBRepTool/TopOpeBRepTool_CORRISO.hxx +++ b/src/TopOpeBRepTool/TopOpeBRepTool_CORRISO.hxx @@ -19,17 +19,13 @@ #include #include -#include #include #include -#include -#include #include #include #include #include -#include #include class TopoDS_Edge; class TopOpeBRepTool_C2DF; diff --git a/src/TopOpeBRepTool/TopOpeBRepTool_CurveTool.cxx b/src/TopOpeBRepTool/TopOpeBRepTool_CurveTool.cxx index 7ee2221ded..4f4f0a7a59 100644 --- a/src/TopOpeBRepTool/TopOpeBRepTool_CurveTool.cxx +++ b/src/TopOpeBRepTool/TopOpeBRepTool_CurveTool.cxx @@ -48,7 +48,6 @@ #include #include #include -#include #include #include #include diff --git a/src/TopOpeBRepTool/TopOpeBRepTool_CurveTool.hxx b/src/TopOpeBRepTool/TopOpeBRepTool_CurveTool.hxx index 6c0fb650f2..11364559ba 100644 --- a/src/TopOpeBRepTool/TopOpeBRepTool_CurveTool.hxx +++ b/src/TopOpeBRepTool/TopOpeBRepTool_CurveTool.hxx @@ -23,8 +23,6 @@ #include #include -#include -#include #include #include class Geom_Curve; diff --git a/src/TopOpeBRepTool/TopOpeBRepTool_FuseEdges.cxx b/src/TopOpeBRepTool/TopOpeBRepTool_FuseEdges.cxx index dc37d527f1..9b9b8a202d 100644 --- a/src/TopOpeBRepTool/TopOpeBRepTool_FuseEdges.cxx +++ b/src/TopOpeBRepTool/TopOpeBRepTool_FuseEdges.cxx @@ -24,10 +24,7 @@ #include #include #include -#include #include -#include -#include #include #include #include @@ -42,10 +39,6 @@ #include #include #include -#include -#include -#include -#include #include #include #include @@ -60,9 +53,7 @@ #include #include #include -#include #include -#include #include #include diff --git a/src/TopOpeBRepTool/TopOpeBRepTool_FuseEdges.hxx b/src/TopOpeBRepTool/TopOpeBRepTool_FuseEdges.hxx index df5fde710d..559620dc9b 100644 --- a/src/TopOpeBRepTool/TopOpeBRepTool_FuseEdges.hxx +++ b/src/TopOpeBRepTool/TopOpeBRepTool_FuseEdges.hxx @@ -19,17 +19,14 @@ #include #include -#include #include -#include #include #include #include #include #include #include -#include #include #include class TopoDS_Vertex; diff --git a/src/TopOpeBRepTool/TopOpeBRepTool_GEOMETRY.cxx b/src/TopOpeBRepTool/TopOpeBRepTool_GEOMETRY.cxx index eb67413ff6..78f6697ace 100644 --- a/src/TopOpeBRepTool/TopOpeBRepTool_GEOMETRY.cxx +++ b/src/TopOpeBRepTool/TopOpeBRepTool_GEOMETRY.cxx @@ -20,7 +20,6 @@ #include #include #include -#include #include #include #include diff --git a/src/TopOpeBRepTool/TopOpeBRepTool_GEOMETRY.hxx b/src/TopOpeBRepTool/TopOpeBRepTool_GEOMETRY.hxx index f770ab4d86..26c85a2a31 100644 --- a/src/TopOpeBRepTool/TopOpeBRepTool_GEOMETRY.hxx +++ b/src/TopOpeBRepTool/TopOpeBRepTool_GEOMETRY.hxx @@ -21,9 +21,7 @@ #include #include -#include #include -#include #include #include #include diff --git a/src/TopOpeBRepTool/TopOpeBRepTool_GeomTool.hxx b/src/TopOpeBRepTool/TopOpeBRepTool_GeomTool.hxx index 9b64eab763..c6746e4d94 100644 --- a/src/TopOpeBRepTool/TopOpeBRepTool_GeomTool.hxx +++ b/src/TopOpeBRepTool/TopOpeBRepTool_GeomTool.hxx @@ -22,8 +22,6 @@ #include #include -#include -#include #include diff --git a/src/TopOpeBRepTool/TopOpeBRepTool_HBoxTool.cxx b/src/TopOpeBRepTool/TopOpeBRepTool_HBoxTool.cxx index cc26755282..36cc841b83 100644 --- a/src/TopOpeBRepTool/TopOpeBRepTool_HBoxTool.cxx +++ b/src/TopOpeBRepTool/TopOpeBRepTool_HBoxTool.cxx @@ -15,14 +15,12 @@ // commercial license or contractual agreement. -#include #include #include #include #include #include #include -#include #include #include #include diff --git a/src/TopOpeBRepTool/TopOpeBRepTool_HBoxTool.hxx b/src/TopOpeBRepTool/TopOpeBRepTool_HBoxTool.hxx index 8a4b189824..86e5237d7a 100644 --- a/src/TopOpeBRepTool/TopOpeBRepTool_HBoxTool.hxx +++ b/src/TopOpeBRepTool/TopOpeBRepTool_HBoxTool.hxx @@ -24,7 +24,6 @@ #include #include #include -#include class TopoDS_Shape; class Bnd_Box; diff --git a/src/TopOpeBRepTool/TopOpeBRepTool_IndexedDataMapOfSolidClassifier.hxx b/src/TopOpeBRepTool/TopOpeBRepTool_IndexedDataMapOfSolidClassifier.hxx index e98c77526a..00b3cebd19 100644 --- a/src/TopOpeBRepTool/TopOpeBRepTool_IndexedDataMapOfSolidClassifier.hxx +++ b/src/TopOpeBRepTool/TopOpeBRepTool_IndexedDataMapOfSolidClassifier.hxx @@ -17,7 +17,6 @@ #ifndef TopOpeBRepTool_IndexedDataMapOfSolidClassifier_HeaderFile #define TopOpeBRepTool_IndexedDataMapOfSolidClassifier_HeaderFile -#include #include #include #include diff --git a/src/TopOpeBRepTool/TopOpeBRepTool_PROJECT.cxx b/src/TopOpeBRepTool/TopOpeBRepTool_PROJECT.cxx index d800c5b839..3eb89109d1 100644 --- a/src/TopOpeBRepTool/TopOpeBRepTool_PROJECT.cxx +++ b/src/TopOpeBRepTool/TopOpeBRepTool_PROJECT.cxx @@ -16,21 +16,14 @@ #include -#include -#include #include #include #include #include #include -#include -#include -#include -#include #include #include #include -#include #include #include diff --git a/src/TopOpeBRepTool/TopOpeBRepTool_PROJECT.hxx b/src/TopOpeBRepTool/TopOpeBRepTool_PROJECT.hxx index 42adc2362f..30ab18e6c4 100644 --- a/src/TopOpeBRepTool/TopOpeBRepTool_PROJECT.hxx +++ b/src/TopOpeBRepTool/TopOpeBRepTool_PROJECT.hxx @@ -20,8 +20,6 @@ #include #include -#include -#include #include #include #include diff --git a/src/TopOpeBRepTool/TopOpeBRepTool_PURGE.cxx b/src/TopOpeBRepTool/TopOpeBRepTool_PURGE.cxx index 8ccd846e11..752ed2d9f6 100644 --- a/src/TopOpeBRepTool/TopOpeBRepTool_PURGE.cxx +++ b/src/TopOpeBRepTool/TopOpeBRepTool_PURGE.cxx @@ -19,23 +19,13 @@ #include #include #include -#include #include -#include -#include -#include -#include #include -#include #include -#include -#include -#include #include #include #include -#include #include #include #include diff --git a/src/TopOpeBRepTool/TopOpeBRepTool_PurgeInternalEdges.cxx b/src/TopOpeBRepTool/TopOpeBRepTool_PurgeInternalEdges.cxx index 89d7df5525..0c412c320c 100644 --- a/src/TopOpeBRepTool/TopOpeBRepTool_PurgeInternalEdges.cxx +++ b/src/TopOpeBRepTool/TopOpeBRepTool_PurgeInternalEdges.cxx @@ -16,17 +16,14 @@ #include -#include #include #include #include #include #include #include -#include #include #include -#include #include #include diff --git a/src/TopOpeBRepTool/TopOpeBRepTool_PurgeInternalEdges.hxx b/src/TopOpeBRepTool/TopOpeBRepTool_PurgeInternalEdges.hxx index bf292f6df9..ab83957329 100644 --- a/src/TopOpeBRepTool/TopOpeBRepTool_PurgeInternalEdges.hxx +++ b/src/TopOpeBRepTool/TopOpeBRepTool_PurgeInternalEdges.hxx @@ -19,10 +19,8 @@ #include #include -#include #include -#include #include #include #include diff --git a/src/TopOpeBRepTool/TopOpeBRepTool_REGUS.cxx b/src/TopOpeBRepTool/TopOpeBRepTool_REGUS.cxx index fb0581e26f..818cdc3a4a 100644 --- a/src/TopOpeBRepTool/TopOpeBRepTool_REGUS.cxx +++ b/src/TopOpeBRepTool/TopOpeBRepTool_REGUS.cxx @@ -16,17 +16,12 @@ #include -#include #include #include #include -#include -#include #include #include #include -#include -#include #include #include #include diff --git a/src/TopOpeBRepTool/TopOpeBRepTool_REGUS.hxx b/src/TopOpeBRepTool/TopOpeBRepTool_REGUS.hxx index 68469bc188..d992c00219 100644 --- a/src/TopOpeBRepTool/TopOpeBRepTool_REGUS.hxx +++ b/src/TopOpeBRepTool/TopOpeBRepTool_REGUS.hxx @@ -19,9 +19,7 @@ #include #include -#include -#include #include #include #include diff --git a/src/TopOpeBRepTool/TopOpeBRepTool_REGUW.cxx b/src/TopOpeBRepTool/TopOpeBRepTool_REGUW.cxx index 7472c6b764..ead25c61bd 100644 --- a/src/TopOpeBRepTool/TopOpeBRepTool_REGUW.cxx +++ b/src/TopOpeBRepTool/TopOpeBRepTool_REGUW.cxx @@ -17,16 +17,9 @@ #include #include -#include #include #include -#include -#include #include -#include -#include -#include -#include #include #include #include diff --git a/src/TopOpeBRepTool/TopOpeBRepTool_REGUW.hxx b/src/TopOpeBRepTool/TopOpeBRepTool_REGUW.hxx index c20aa52c97..c37a5ffa08 100644 --- a/src/TopOpeBRepTool/TopOpeBRepTool_REGUW.hxx +++ b/src/TopOpeBRepTool/TopOpeBRepTool_REGUW.hxx @@ -19,17 +19,14 @@ #include #include -#include #include #include -#include #include #include #include #include #include -#include #include #include #include diff --git a/src/TopOpeBRepTool/TopOpeBRepTool_RegularizeW.cxx b/src/TopOpeBRepTool/TopOpeBRepTool_RegularizeW.cxx index 879aa3ed20..9e9177d21f 100644 --- a/src/TopOpeBRepTool/TopOpeBRepTool_RegularizeW.cxx +++ b/src/TopOpeBRepTool/TopOpeBRepTool_RegularizeW.cxx @@ -15,14 +15,12 @@ // commercial license or contractual agreement. #include -#include #include #include #include -#include #include +#include #include -#include #include #ifdef DRAW diff --git a/src/TopOpeBRepTool/TopOpeBRepTool_SC.cxx b/src/TopOpeBRepTool/TopOpeBRepTool_SC.cxx index 44fde1ff86..ff9780aa9e 100644 --- a/src/TopOpeBRepTool/TopOpeBRepTool_SC.cxx +++ b/src/TopOpeBRepTool/TopOpeBRepTool_SC.cxx @@ -17,6 +17,7 @@ #include #include #include +#include #include // ---------------------------------------------------------------------- diff --git a/src/TopOpeBRepTool/TopOpeBRepTool_SC.hxx b/src/TopOpeBRepTool/TopOpeBRepTool_SC.hxx index 7ee22ccf17..52e6512eda 100644 --- a/src/TopOpeBRepTool/TopOpeBRepTool_SC.hxx +++ b/src/TopOpeBRepTool/TopOpeBRepTool_SC.hxx @@ -17,9 +17,7 @@ #ifndef _TopOpeBRepTool_SC_HeaderFile #define _TopOpeBRepTool_SC_HeaderFile -#include #include -#include Standard_EXPORT TopOpeBRepTool_ShapeClassifier& FSC_GetPSC(void); Standard_EXPORT TopOpeBRepTool_ShapeClassifier& FSC_GetPSC(const TopoDS_Shape& S); diff --git a/src/TopOpeBRepTool/TopOpeBRepTool_ShapeClassifier.cxx b/src/TopOpeBRepTool/TopOpeBRepTool_ShapeClassifier.cxx index 76b485044f..722c94e5c5 100644 --- a/src/TopOpeBRepTool/TopOpeBRepTool_ShapeClassifier.cxx +++ b/src/TopOpeBRepTool/TopOpeBRepTool_ShapeClassifier.cxx @@ -15,11 +15,8 @@ // commercial license or contractual agreement. -#include #include -#include #include -#include #include #include #include @@ -27,7 +24,6 @@ #include #include #include -#include #include #include #include diff --git a/src/TopOpeBRepTool/TopOpeBRepTool_ShapeClassifier.hxx b/src/TopOpeBRepTool/TopOpeBRepTool_ShapeClassifier.hxx index 72cf5a09e4..972b797570 100644 --- a/src/TopOpeBRepTool/TopOpeBRepTool_ShapeClassifier.hxx +++ b/src/TopOpeBRepTool/TopOpeBRepTool_ShapeClassifier.hxx @@ -19,13 +19,10 @@ #include #include -#include #include #include #include -#include -#include #include #include #include diff --git a/src/TopOpeBRepTool/TopOpeBRepTool_ShapeTool.cxx b/src/TopOpeBRepTool/TopOpeBRepTool_ShapeTool.cxx index 87f2661057..7b86a04d8b 100644 --- a/src/TopOpeBRepTool/TopOpeBRepTool_ShapeTool.cxx +++ b/src/TopOpeBRepTool/TopOpeBRepTool_ShapeTool.cxx @@ -16,7 +16,6 @@ #include -#include #include #include #include @@ -31,7 +30,6 @@ #include #include #include -#include #include #include #include diff --git a/src/TopOpeBRepTool/TopOpeBRepTool_ShapeTool.hxx b/src/TopOpeBRepTool/TopOpeBRepTool_ShapeTool.hxx index 776a3b950d..1d35ec992a 100644 --- a/src/TopOpeBRepTool/TopOpeBRepTool_ShapeTool.hxx +++ b/src/TopOpeBRepTool/TopOpeBRepTool_ShapeTool.hxx @@ -21,8 +21,6 @@ #include #include -#include -#include class TopoDS_Shape; class gp_Pnt; class Geom_Curve; diff --git a/src/TopOpeBRepTool/TopOpeBRepTool_SolidClassifier.cxx b/src/TopOpeBRepTool/TopOpeBRepTool_SolidClassifier.cxx index 0ace45e00b..13533527db 100644 --- a/src/TopOpeBRepTool/TopOpeBRepTool_SolidClassifier.cxx +++ b/src/TopOpeBRepTool/TopOpeBRepTool_SolidClassifier.cxx @@ -17,8 +17,6 @@ #include #include -#include -#include #include //======================================================================= diff --git a/src/TopOpeBRepTool/TopOpeBRepTool_SolidClassifier.hxx b/src/TopOpeBRepTool/TopOpeBRepTool_SolidClassifier.hxx index 3c9bfb5683..4463b2b3c2 100644 --- a/src/TopOpeBRepTool/TopOpeBRepTool_SolidClassifier.hxx +++ b/src/TopOpeBRepTool/TopOpeBRepTool_SolidClassifier.hxx @@ -19,15 +19,11 @@ #include #include -#include #include #include #include -#include -#include #include -#include class gp_Pnt; diff --git a/src/TopOpeBRepTool/TopOpeBRepTool_TOOL.cxx b/src/TopOpeBRepTool/TopOpeBRepTool_TOOL.cxx index dc7ad74a27..d87c9d7a85 100644 --- a/src/TopOpeBRepTool/TopOpeBRepTool_TOOL.cxx +++ b/src/TopOpeBRepTool/TopOpeBRepTool_TOOL.cxx @@ -18,7 +18,6 @@ #include #include #include -#include #include #include #include @@ -36,7 +35,6 @@ #include #include #include -#include #include #include #include @@ -45,7 +43,6 @@ #include #include #include -#include #include #include #include diff --git a/src/TopOpeBRepTool/TopOpeBRepTool_TOOL.hxx b/src/TopOpeBRepTool/TopOpeBRepTool_TOOL.hxx index 2313c8361e..6b97d14eff 100644 --- a/src/TopOpeBRepTool/TopOpeBRepTool_TOOL.hxx +++ b/src/TopOpeBRepTool/TopOpeBRepTool_TOOL.hxx @@ -22,9 +22,7 @@ #include #include -#include #include -#include #include #include #include diff --git a/src/TopOpeBRepTool/TopOpeBRepTool_TOPOLOGY.cxx b/src/TopOpeBRepTool/TopOpeBRepTool_TOPOLOGY.cxx index 9671176ec8..b12ffbea8a 100644 --- a/src/TopOpeBRepTool/TopOpeBRepTool_TOPOLOGY.cxx +++ b/src/TopOpeBRepTool/TopOpeBRepTool_TOPOLOGY.cxx @@ -14,12 +14,7 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -#include #include -#include -#include -#include -#include #include #include #include @@ -36,8 +31,6 @@ #include #include #include -#include -#include #include #include #include diff --git a/src/TopOpeBRepTool/TopOpeBRepTool_TOPOLOGY.hxx b/src/TopOpeBRepTool/TopOpeBRepTool_TOPOLOGY.hxx index 1b606b85ed..bcdad61b4b 100644 --- a/src/TopOpeBRepTool/TopOpeBRepTool_TOPOLOGY.hxx +++ b/src/TopOpeBRepTool/TopOpeBRepTool_TOPOLOGY.hxx @@ -17,20 +17,13 @@ #ifndef _TopOpeBRepTool_TOPOLOGY_HeaderFile #define _TopOpeBRepTool_TOPOLOGY_HeaderFile -#include - #include #include #include -#include -#include #include #include -#include #include -#include #include -#include //#include Standard_EXPORT void FUN_tool_tolUV(const TopoDS_Face& F,Standard_Real& tolu,Standard_Real& tolv); diff --git a/src/TopOpeBRepTool/TopOpeBRepTool_box.hxx b/src/TopOpeBRepTool/TopOpeBRepTool_box.hxx index 770f1d3222..d560305f49 100644 --- a/src/TopOpeBRepTool/TopOpeBRepTool_box.hxx +++ b/src/TopOpeBRepTool/TopOpeBRepTool_box.hxx @@ -17,7 +17,6 @@ #ifndef _TopOpeBRepTool_box_HeaderFile #define _TopOpeBRepTool_box_HeaderFile -#include #include #ifdef OCCT_DEBUG diff --git a/src/TopOpeBRepTool/TopOpeBRepTool_connexity.cxx b/src/TopOpeBRepTool/TopOpeBRepTool_connexity.cxx index 0a20552757..722fd3a332 100644 --- a/src/TopOpeBRepTool/TopOpeBRepTool_connexity.cxx +++ b/src/TopOpeBRepTool/TopOpeBRepTool_connexity.cxx @@ -15,7 +15,6 @@ // commercial license or contractual agreement. -#include #include #include #include diff --git a/src/TopOpeBRepTool/TopOpeBRepTool_connexity.hxx b/src/TopOpeBRepTool/TopOpeBRepTool_connexity.hxx index 54613756e9..885fb7975a 100644 --- a/src/TopOpeBRepTool/TopOpeBRepTool_connexity.hxx +++ b/src/TopOpeBRepTool/TopOpeBRepTool_connexity.hxx @@ -23,7 +23,6 @@ #include #include -#include #include #include diff --git a/src/TopOpeBRepTool/TopOpeBRepTool_face.cxx b/src/TopOpeBRepTool/TopOpeBRepTool_face.cxx index bd3ba61690..a484ce280f 100644 --- a/src/TopOpeBRepTool/TopOpeBRepTool_face.cxx +++ b/src/TopOpeBRepTool/TopOpeBRepTool_face.cxx @@ -16,15 +16,12 @@ #include -#include #include -#include #include #include #include #include #include -#include #include //======================================================================= diff --git a/src/TopOpeBRepTool/TopOpeBRepTool_face.hxx b/src/TopOpeBRepTool/TopOpeBRepTool_face.hxx index dc2877145e..72e445fc6c 100644 --- a/src/TopOpeBRepTool/TopOpeBRepTool_face.hxx +++ b/src/TopOpeBRepTool/TopOpeBRepTool_face.hxx @@ -19,10 +19,8 @@ #include #include -#include #include -#include #include diff --git a/src/TopOpeBRepTool/TopOpeBRepTool_faulty.cxx b/src/TopOpeBRepTool/TopOpeBRepTool_faulty.cxx index cb41cff39b..b66dab5408 100644 --- a/src/TopOpeBRepTool/TopOpeBRepTool_faulty.cxx +++ b/src/TopOpeBRepTool/TopOpeBRepTool_faulty.cxx @@ -14,15 +14,8 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -#include -#include #include -#include #include -#include -#include -#include -#include #define M_FORWARD(sta) (sta == TopAbs_FORWARD) #define M_REVERSED(sta) (sta == TopAbs_REVERSED) diff --git a/src/TopOpeBRepTool/TopOpeBRepTool_makeTransition.cxx b/src/TopOpeBRepTool/TopOpeBRepTool_makeTransition.cxx index 3ca65e0f3a..10437ae618 100644 --- a/src/TopOpeBRepTool/TopOpeBRepTool_makeTransition.cxx +++ b/src/TopOpeBRepTool/TopOpeBRepTool_makeTransition.cxx @@ -16,13 +16,10 @@ #include -#include #include #include #include -#include #include -#include #include #include #include diff --git a/src/TopOpeBRepTool/TopOpeBRepTool_makeTransition.hxx b/src/TopOpeBRepTool/TopOpeBRepTool_makeTransition.hxx index 892e56dd93..d9e32b49e3 100644 --- a/src/TopOpeBRepTool/TopOpeBRepTool_makeTransition.hxx +++ b/src/TopOpeBRepTool/TopOpeBRepTool_makeTransition.hxx @@ -19,13 +19,10 @@ #include #include -#include #include -#include #include #include -#include #include diff --git a/src/TopOpeBRepTool/TopOpeBRepTool_matter.cxx b/src/TopOpeBRepTool/TopOpeBRepTool_matter.cxx index 10e1c5c1c6..55ea7f7c43 100644 --- a/src/TopOpeBRepTool/TopOpeBRepTool_matter.cxx +++ b/src/TopOpeBRepTool/TopOpeBRepTool_matter.cxx @@ -14,12 +14,9 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -#include -#include #include #include #include -#include #include #include diff --git a/src/TopOpeBRepTool/TopOpeBRepTool_mkTondgE.cxx b/src/TopOpeBRepTool/TopOpeBRepTool_mkTondgE.cxx index 90a2d98200..8848a2648d 100644 --- a/src/TopOpeBRepTool/TopOpeBRepTool_mkTondgE.cxx +++ b/src/TopOpeBRepTool/TopOpeBRepTool_mkTondgE.cxx @@ -17,15 +17,12 @@ #include #include -#include #include #include #include #include #include -#include #include -#include #include #include #include diff --git a/src/TopOpeBRepTool/TopOpeBRepTool_mkTondgE.hxx b/src/TopOpeBRepTool/TopOpeBRepTool_mkTondgE.hxx index 762fcef528..02801574fd 100644 --- a/src/TopOpeBRepTool/TopOpeBRepTool_mkTondgE.hxx +++ b/src/TopOpeBRepTool/TopOpeBRepTool_mkTondgE.hxx @@ -19,15 +19,12 @@ #include #include -#include #include #include #include #include -#include #include -#include #include #include diff --git a/src/TopOpeBRepTool/TopOpeBRepTool_tol.cxx b/src/TopOpeBRepTool/TopOpeBRepTool_tol.cxx index 1e7bd03173..241602ba7a 100644 --- a/src/TopOpeBRepTool/TopOpeBRepTool_tol.cxx +++ b/src/TopOpeBRepTool/TopOpeBRepTool_tol.cxx @@ -20,7 +20,6 @@ #include #include #include -#include #include #include #include diff --git a/src/TopOpeBRepTool/TopOpeBRepTool_tol.hxx b/src/TopOpeBRepTool/TopOpeBRepTool_tol.hxx index b326445814..1fb963902d 100644 --- a/src/TopOpeBRepTool/TopOpeBRepTool_tol.hxx +++ b/src/TopOpeBRepTool/TopOpeBRepTool_tol.hxx @@ -18,9 +18,7 @@ #define _TopOpeBRepTool_tol_HeaderFile #include -#include #include -#include Standard_EXPORT void FTOL_FaceTolerances (const Bnd_Box& B1,const Bnd_Box& B2, diff --git a/src/TopoDS/TopoDS.hxx b/src/TopoDS/TopoDS.hxx index eccbb08a69..4803790d9d 100644 --- a/src/TopoDS/TopoDS.hxx +++ b/src/TopoDS/TopoDS.hxx @@ -19,7 +19,6 @@ #include #include -#include class TopoDS_Vertex; class TopoDS_Shape; diff --git a/src/TopoDS/TopoDS_AlertAttribute.hxx b/src/TopoDS/TopoDS_AlertAttribute.hxx index f6cb752c7a..b9b7ad2fbe 100644 --- a/src/TopoDS/TopoDS_AlertAttribute.hxx +++ b/src/TopoDS/TopoDS_AlertAttribute.hxx @@ -17,7 +17,6 @@ #define _TopoDS_AlertAttribute_HeaderFile #include -#include #include #include diff --git a/src/TopoDS/TopoDS_Builder.cxx b/src/TopoDS/TopoDS_Builder.cxx index a0c946a00b..68db158886 100644 --- a/src/TopoDS/TopoDS_Builder.cxx +++ b/src/TopoDS/TopoDS_Builder.cxx @@ -17,18 +17,12 @@ #include #include -#include -#include #include #include #include -#include -#include -#include #include #include #include -#include //======================================================================= //function : MakeShape diff --git a/src/TopoDS/TopoDS_CompSolid.hxx b/src/TopoDS/TopoDS_CompSolid.hxx index a7d37e64e5..e042fdaffb 100644 --- a/src/TopoDS/TopoDS_CompSolid.hxx +++ b/src/TopoDS/TopoDS_CompSolid.hxx @@ -19,7 +19,6 @@ #include #include -#include #include diff --git a/src/TopoDS/TopoDS_Compound.hxx b/src/TopoDS/TopoDS_Compound.hxx index f21180aef0..639ddd7311 100644 --- a/src/TopoDS/TopoDS_Compound.hxx +++ b/src/TopoDS/TopoDS_Compound.hxx @@ -19,7 +19,6 @@ #include #include -#include #include diff --git a/src/TopoDS/TopoDS_Edge.hxx b/src/TopoDS/TopoDS_Edge.hxx index 8357aaad5f..934dbd141b 100644 --- a/src/TopoDS/TopoDS_Edge.hxx +++ b/src/TopoDS/TopoDS_Edge.hxx @@ -19,7 +19,6 @@ #include #include -#include #include diff --git a/src/TopoDS/TopoDS_Face.hxx b/src/TopoDS/TopoDS_Face.hxx index f88be76d9f..6ed9083c53 100644 --- a/src/TopoDS/TopoDS_Face.hxx +++ b/src/TopoDS/TopoDS_Face.hxx @@ -19,7 +19,6 @@ #include #include -#include #include diff --git a/src/TopoDS/TopoDS_HShape.cxx b/src/TopoDS/TopoDS_HShape.cxx index 01aa7b678a..8afcdd9236 100644 --- a/src/TopoDS/TopoDS_HShape.cxx +++ b/src/TopoDS/TopoDS_HShape.cxx @@ -15,7 +15,6 @@ // commercial license or contractual agreement. -#include #include #include diff --git a/src/TopoDS/TopoDS_HShape.hxx b/src/TopoDS/TopoDS_HShape.hxx index 0fe5303aa4..fb8384a626 100644 --- a/src/TopoDS/TopoDS_HShape.hxx +++ b/src/TopoDS/TopoDS_HShape.hxx @@ -18,7 +18,6 @@ #define _TopoDS_HShape_HeaderFile #include -#include #include #include diff --git a/src/TopoDS/TopoDS_Iterator.cxx b/src/TopoDS/TopoDS_Iterator.cxx index 141711a020..307e73e794 100644 --- a/src/TopoDS/TopoDS_Iterator.cxx +++ b/src/TopoDS/TopoDS_Iterator.cxx @@ -18,9 +18,6 @@ #include -#include -#include - //======================================================================= //function : Initialize //purpose : diff --git a/src/TopoDS/TopoDS_Shape.cxx b/src/TopoDS/TopoDS_Shape.cxx index 8550758618..c78121649b 100644 --- a/src/TopoDS/TopoDS_Shape.cxx +++ b/src/TopoDS/TopoDS_Shape.cxx @@ -18,7 +18,6 @@ #include #include -#include #include #include #include diff --git a/src/TopoDS/TopoDS_Shape.hxx b/src/TopoDS/TopoDS_Shape.hxx index 4106967b07..12b5918cc7 100644 --- a/src/TopoDS/TopoDS_Shape.hxx +++ b/src/TopoDS/TopoDS_Shape.hxx @@ -17,10 +17,7 @@ #ifndef _TopoDS_Shape_HeaderFile #define _TopoDS_Shape_HeaderFile -#include #include -#include -#include #include #include diff --git a/src/TopoDS/TopoDS_Shell.hxx b/src/TopoDS/TopoDS_Shell.hxx index 858d5d3fa4..a422f2c355 100644 --- a/src/TopoDS/TopoDS_Shell.hxx +++ b/src/TopoDS/TopoDS_Shell.hxx @@ -19,7 +19,6 @@ #include #include -#include #include diff --git a/src/TopoDS/TopoDS_Solid.hxx b/src/TopoDS/TopoDS_Solid.hxx index c90c572365..c21397c448 100644 --- a/src/TopoDS/TopoDS_Solid.hxx +++ b/src/TopoDS/TopoDS_Solid.hxx @@ -19,7 +19,6 @@ #include #include -#include #include diff --git a/src/TopoDS/TopoDS_TCompSolid.cxx b/src/TopoDS/TopoDS_TCompSolid.cxx index 6f3e3f0196..2b040d17b9 100644 --- a/src/TopoDS/TopoDS_TCompSolid.cxx +++ b/src/TopoDS/TopoDS_TCompSolid.cxx @@ -16,7 +16,6 @@ #include -#include #include #include diff --git a/src/TopoDS/TopoDS_TCompound.cxx b/src/TopoDS/TopoDS_TCompound.cxx index 248d3b660c..371a1aa9c5 100644 --- a/src/TopoDS/TopoDS_TCompound.cxx +++ b/src/TopoDS/TopoDS_TCompound.cxx @@ -16,7 +16,6 @@ #include -#include #include #include diff --git a/src/TopoDS/TopoDS_TEdge.cxx b/src/TopoDS/TopoDS_TEdge.cxx index f98754ee0a..522a93ca42 100644 --- a/src/TopoDS/TopoDS_TEdge.cxx +++ b/src/TopoDS/TopoDS_TEdge.cxx @@ -15,8 +15,6 @@ // commercial license or contractual agreement. -#include -#include #include #include diff --git a/src/TopoDS/TopoDS_TEdge.hxx b/src/TopoDS/TopoDS_TEdge.hxx index 6bf84b9d15..5e51314f3a 100644 --- a/src/TopoDS/TopoDS_TEdge.hxx +++ b/src/TopoDS/TopoDS_TEdge.hxx @@ -18,7 +18,6 @@ #define _TopoDS_TEdge_HeaderFile #include -#include #include #include diff --git a/src/TopoDS/TopoDS_TFace.cxx b/src/TopoDS/TopoDS_TFace.cxx index 592af6764c..fb6bd2b9cc 100644 --- a/src/TopoDS/TopoDS_TFace.cxx +++ b/src/TopoDS/TopoDS_TFace.cxx @@ -16,7 +16,6 @@ #include -#include #include #include diff --git a/src/TopoDS/TopoDS_TShape.hxx b/src/TopoDS/TopoDS_TShape.hxx index 90581e958b..6cf9a3637d 100644 --- a/src/TopoDS/TopoDS_TShape.hxx +++ b/src/TopoDS/TopoDS_TShape.hxx @@ -17,7 +17,6 @@ #ifndef _TopoDS_TShape_HeaderFile #define _TopoDS_TShape_HeaderFile -#include #include #include #include diff --git a/src/TopoDS/TopoDS_TShell.cxx b/src/TopoDS/TopoDS_TShell.cxx index b84a460341..62a935989b 100644 --- a/src/TopoDS/TopoDS_TShell.cxx +++ b/src/TopoDS/TopoDS_TShell.cxx @@ -16,7 +16,6 @@ #include -#include #include #include diff --git a/src/TopoDS/TopoDS_TSolid.cxx b/src/TopoDS/TopoDS_TSolid.cxx index 18eba52ab2..9b617456e8 100644 --- a/src/TopoDS/TopoDS_TSolid.cxx +++ b/src/TopoDS/TopoDS_TSolid.cxx @@ -16,7 +16,6 @@ #include -#include #include #include diff --git a/src/TopoDS/TopoDS_TVertex.cxx b/src/TopoDS/TopoDS_TVertex.cxx index 58ae31c7f2..49c14c1b68 100644 --- a/src/TopoDS/TopoDS_TVertex.cxx +++ b/src/TopoDS/TopoDS_TVertex.cxx @@ -15,8 +15,6 @@ // commercial license or contractual agreement. -#include -#include #include #include diff --git a/src/TopoDS/TopoDS_TVertex.hxx b/src/TopoDS/TopoDS_TVertex.hxx index 795998d5f7..d118236ffa 100644 --- a/src/TopoDS/TopoDS_TVertex.hxx +++ b/src/TopoDS/TopoDS_TVertex.hxx @@ -18,7 +18,6 @@ #define _TopoDS_TVertex_HeaderFile #include -#include #include #include diff --git a/src/TopoDS/TopoDS_TWire.cxx b/src/TopoDS/TopoDS_TWire.cxx index c83c788ae1..e93576e218 100644 --- a/src/TopoDS/TopoDS_TWire.cxx +++ b/src/TopoDS/TopoDS_TWire.cxx @@ -16,7 +16,6 @@ #include -#include #include #include diff --git a/src/TopoDS/TopoDS_Vertex.hxx b/src/TopoDS/TopoDS_Vertex.hxx index ec3e6eb408..fdc778db02 100644 --- a/src/TopoDS/TopoDS_Vertex.hxx +++ b/src/TopoDS/TopoDS_Vertex.hxx @@ -19,7 +19,6 @@ #include #include -#include #include diff --git a/src/TopoDS/TopoDS_Wire.hxx b/src/TopoDS/TopoDS_Wire.hxx index b772cd88d4..73c973822e 100644 --- a/src/TopoDS/TopoDS_Wire.hxx +++ b/src/TopoDS/TopoDS_Wire.hxx @@ -19,7 +19,6 @@ #include #include -#include #include diff --git a/src/TopoDSToStep/TopoDSToStep.cxx b/src/TopoDSToStep/TopoDSToStep.cxx index f38ea4fd32..568cbceab1 100644 --- a/src/TopoDSToStep/TopoDSToStep.cxx +++ b/src/TopoDSToStep/TopoDSToStep.cxx @@ -18,26 +18,14 @@ #include #include -#include -#include -#include #include -#include -#include -#include -#include -#include -#include #include #include -#include #include #include #include #include -//#include -//#include Handle(TCollection_HAsciiString) TopoDSToStep::DecodeBuilderError(const TopoDSToStep_BuilderError E) { diff --git a/src/TopoDSToStep/TopoDSToStep_Builder.cxx b/src/TopoDSToStep/TopoDSToStep_Builder.cxx index 0a2130e1db..9d189627e5 100644 --- a/src/TopoDSToStep/TopoDSToStep_Builder.cxx +++ b/src/TopoDSToStep/TopoDSToStep_Builder.cxx @@ -24,19 +24,15 @@ #include #include #include -#include #include #include #include -#include #include -#include #include #include #include #include #include -#include // ============================================================================ // Method : TopoDSToStep_Builder::TopoDSToStep_Builder diff --git a/src/TopoDSToStep/TopoDSToStep_FacetedTool.hxx b/src/TopoDSToStep/TopoDSToStep_FacetedTool.hxx index 0b854364c1..cc34d47821 100644 --- a/src/TopoDSToStep/TopoDSToStep_FacetedTool.hxx +++ b/src/TopoDSToStep/TopoDSToStep_FacetedTool.hxx @@ -19,7 +19,6 @@ #include #include -#include #include class TopoDS_Shape; diff --git a/src/TopoDSToStep/TopoDSToStep_MakeGeometricCurveSet.cxx b/src/TopoDSToStep/TopoDSToStep_MakeGeometricCurveSet.cxx index c3aea8c8a2..9cde3288e5 100644 --- a/src/TopoDSToStep/TopoDSToStep_MakeGeometricCurveSet.cxx +++ b/src/TopoDSToStep/TopoDSToStep_MakeGeometricCurveSet.cxx @@ -20,17 +20,12 @@ #include #include #include -#include -#include -#include #include #include -#include #include #include #include #include -#include //============================================================================= // Create a GeometricCurveSet of StepShape from a Shape of TopoDS diff --git a/src/TopoDSToStep/TopoDSToStep_MakeStepEdge.cxx b/src/TopoDSToStep/TopoDSToStep_MakeStepEdge.cxx index e6d4c0cd90..edf9f1b5f7 100644 --- a/src/TopoDSToStep/TopoDSToStep_MakeStepEdge.cxx +++ b/src/TopoDSToStep/TopoDSToStep_MakeStepEdge.cxx @@ -19,20 +19,16 @@ #include #include #include -#include -#include #include #include #include #include #include -#include #include #include #include #include #include -#include #include #include #include diff --git a/src/TopoDSToStep/TopoDSToStep_MakeStepFace.cxx b/src/TopoDSToStep/TopoDSToStep_MakeStepFace.cxx index 8afeff398a..00c4c5475d 100644 --- a/src/TopoDSToStep/TopoDSToStep_MakeStepFace.cxx +++ b/src/TopoDSToStep/TopoDSToStep_MakeStepFace.cxx @@ -22,29 +22,24 @@ // abv 30.11.99: fix %30 pdn changed to produce SurfaceOfRevolution instead of DegenerateToroidalSurface #include -#include #include #include #include #include #include -#include #include #include -#include #include #include #include #include #include #include -#include #include #include #include #include #include -#include #include #include #include @@ -53,14 +48,9 @@ #include #include #include -#include -#include #include -#include #include -#include #include -#include #include #include #include @@ -69,15 +59,12 @@ #include #include #include -#include #include #include #include #include -#include #include #include -#include #include #include #include diff --git a/src/TopoDSToStep/TopoDSToStep_MakeStepVertex.cxx b/src/TopoDSToStep/TopoDSToStep_MakeStepVertex.cxx index 24896e4fff..0acd883c3a 100644 --- a/src/TopoDSToStep/TopoDSToStep_MakeStepVertex.cxx +++ b/src/TopoDSToStep/TopoDSToStep_MakeStepVertex.cxx @@ -21,10 +21,8 @@ #include #include #include -#include #include #include -#include #include #include #include diff --git a/src/TopoDSToStep/TopoDSToStep_MakeStepWire.cxx b/src/TopoDSToStep/TopoDSToStep_MakeStepWire.cxx index 8189b9efcf..252fc3a0e4 100644 --- a/src/TopoDSToStep/TopoDSToStep_MakeStepWire.cxx +++ b/src/TopoDSToStep/TopoDSToStep_MakeStepWire.cxx @@ -20,14 +20,9 @@ #include #include #include -#include #include -#include #include #include -#include -#include -#include #include #include #include @@ -36,7 +31,6 @@ #include #include #include -#include #include #include #include diff --git a/src/TopoDSToStep/TopoDSToStep_Tool.cxx b/src/TopoDSToStep/TopoDSToStep_Tool.cxx index 8158038100..864b6bc9bf 100644 --- a/src/TopoDSToStep/TopoDSToStep_Tool.cxx +++ b/src/TopoDSToStep/TopoDSToStep_Tool.cxx @@ -18,12 +18,6 @@ #include #include #include -#include -#include -#include -#include -#include -#include #include //======================================================================= diff --git a/src/TopoDSToStep/TopoDSToStep_Tool.hxx b/src/TopoDSToStep/TopoDSToStep_Tool.hxx index 2ea4c294a6..11d0e85c2d 100644 --- a/src/TopoDSToStep/TopoDSToStep_Tool.hxx +++ b/src/TopoDSToStep/TopoDSToStep_Tool.hxx @@ -22,8 +22,6 @@ #include #include -#include -#include #include #include #include diff --git a/src/TopoDSToStep/TopoDSToStep_WireframeBuilder.cxx b/src/TopoDSToStep/TopoDSToStep_WireframeBuilder.cxx index 9fd8d9dafb..673e55459a 100644 --- a/src/TopoDSToStep/TopoDSToStep_WireframeBuilder.cxx +++ b/src/TopoDSToStep/TopoDSToStep_WireframeBuilder.cxx @@ -23,8 +23,6 @@ #include #include #include -#include -#include #include #include #include @@ -33,36 +31,25 @@ #include #include #include -#include #include #include #include #include #include -#include #include -#include -#include #include #include #include -#include #include #include -#include #include -#include #include #include -#include #include #include -#include -#include #include #include #include -#include // ============================================================================ // Method : TopoDSToStep_Builder::TopoDSToStep_Builder diff --git a/src/TopoDSToStep/TopoDSToStep_WireframeBuilder.hxx b/src/TopoDSToStep/TopoDSToStep_WireframeBuilder.hxx index 3772320519..8f3f0dbbc5 100644 --- a/src/TopoDSToStep/TopoDSToStep_WireframeBuilder.hxx +++ b/src/TopoDSToStep/TopoDSToStep_WireframeBuilder.hxx @@ -24,7 +24,6 @@ #include #include #include -#include #include class TopoDS_Shape; class TopoDSToStep_Tool; From 34c407eb34927409b1b5ec1ca35722f07c74415b Mon Sep 17 00:00:00 2001 From: ona Date: Wed, 29 Jun 2022 10:14:53 +0300 Subject: [PATCH 326/639] 0029415: Data Exchange - Step reader cannot read the surfaces of the main body of the shape Test for model reading check is added --- tests/bugs/step/bug29415 | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 tests/bugs/step/bug29415 diff --git a/tests/bugs/step/bug29415 b/tests/bugs/step/bug29415 new file mode 100644 index 0000000000..2af454f49a --- /dev/null +++ b/tests/bugs/step/bug29415 @@ -0,0 +1,17 @@ +puts "============" +puts "0029415: Data Exchange - Step reader cannot read the surfaces of the main body of the shape" +puts "============" +puts "" + +vclear +vinit +ReadStep D [locate_data_file bug29415_Test_JT_Part.step] + +XGetOneShape result D + +XDisplay D -dispMode 1 +vfit + +checkview -screenshot -3d -path ${imagedir}/${test_image}.png +checkprops result -v 2.28963e+08 +checknbshapes result -vertex 5840 -edge 5863 -wire 1215 -face 1181 -shell 1180 -solid 1 -compsolid 0 -compound 15 -shape 15295 From e01ce0cd52b37150679c833d1db2cc5edd620341 Mon Sep 17 00:00:00 2001 From: ona Date: Mon, 27 Jun 2022 17:12:11 +0300 Subject: [PATCH 327/639] 0029854: XCAF GD&T: Clear contents of reserved labels only Clear attributes from reserved child labels only --- src/XCAFDoc/XCAFDoc_Datum.cxx | 11 ++-- src/XCAFDoc/XCAFDoc_Dimension.cxx | 11 ++-- src/XCAFDoc/XCAFDoc_GeomTolerance.cxx | 11 ++-- tests/bugs/xde/bug29854 | 74 +++++++++++++++++++++++++++ 4 files changed, 92 insertions(+), 15 deletions(-) create mode 100644 tests/bugs/xde/bug29854 diff --git a/src/XCAFDoc/XCAFDoc_Datum.cxx b/src/XCAFDoc/XCAFDoc_Datum.cxx index b70cd88ac0..83c9d7fd16 100644 --- a/src/XCAFDoc/XCAFDoc_Datum.cxx +++ b/src/XCAFDoc/XCAFDoc_Datum.cxx @@ -33,7 +33,8 @@ IMPLEMENT_STANDARD_RTTIEXT(XCAFDoc_Datum,TDF_Attribute) enum ChildLab { - ChildLab_Name = 1, + ChildLab_Begin = 1, + ChildLab_Name = ChildLab_Begin, ChildLab_Position, ChildLab_Modifiers, ChildLab_ModifierWithValue, @@ -51,7 +52,8 @@ enum ChildLab ChildLab_PlaneRef, ChildLab_Pnt, ChildLab_PntText, - ChildLab_Presentation + ChildLab_Presentation, + ChildLab_End }; //======================================================================= @@ -176,10 +178,9 @@ void XCAFDoc_Datum::SetObject(const Handle(XCAFDimTolObjects_DatumObject)& theOb TDataStd_Name::Set(Label(), str); } - TDF_ChildIterator anIter(Label()); - for(;anIter.More(); anIter.Next()) + for (int aChild = ChildLab_Begin; aChild < ChildLab_End; aChild++) { - anIter.Value().ForgetAllAttributes(); + Label().FindChild(aChild).ForgetAllAttributes(); } if (!theObject->GetName().IsNull() && !theObject->GetName()->IsEmpty()) Handle(TDataStd_AsciiString) anAttName = TDataStd_AsciiString::Set(Label().FindChild(ChildLab_Name), diff --git a/src/XCAFDoc/XCAFDoc_Dimension.cxx b/src/XCAFDoc/XCAFDoc_Dimension.cxx index dd2acbac26..5347c340f5 100644 --- a/src/XCAFDoc/XCAFDoc_Dimension.cxx +++ b/src/XCAFDoc/XCAFDoc_Dimension.cxx @@ -33,7 +33,8 @@ IMPLEMENT_DERIVED_ATTRIBUTE(XCAFDoc_Dimension,TDataStd_GenericEmpty) enum ChildLab { - ChildLab_Type = 1, + ChildLab_Begin = 1, + ChildLab_Type = ChildLab_Begin, ChildLab_Value, ChildLab_Qualifier, ChildLab_AngularQualifier, @@ -50,7 +51,8 @@ enum ChildLab ChildLab_PntText, ChildLab_Presentation, ChildLab_Descriptions, - ChildLab_DescriptionNames + ChildLab_DescriptionNames, + ChildLab_End }; //======================================================================= @@ -104,10 +106,9 @@ void XCAFDoc_Dimension::SetObject (const Handle(XCAFDimTolObjects_DimensionObjec TDataStd_Name::Set(Label(), str); } - TDF_ChildIterator anIter(Label()); - for(;anIter.More(); anIter.Next()) + for (int aChild = ChildLab_Begin; aChild < ChildLab_End; aChild++) { - anIter.Value().ForgetAllAttributes(); + Label().FindChild(aChild).ForgetAllAttributes(); } Handle(TDataStd_Integer) aType = TDataStd_Integer::Set(Label().FindChild(ChildLab_Type), theObject->GetType()); diff --git a/src/XCAFDoc/XCAFDoc_GeomTolerance.cxx b/src/XCAFDoc/XCAFDoc_GeomTolerance.cxx index 3eb81bdddd..76f8b6e2f7 100644 --- a/src/XCAFDoc/XCAFDoc_GeomTolerance.cxx +++ b/src/XCAFDoc/XCAFDoc_GeomTolerance.cxx @@ -32,7 +32,8 @@ IMPLEMENT_DERIVED_ATTRIBUTE(XCAFDoc_GeomTolerance,TDataStd_GenericEmpty) enum ChildLab { - ChildLab_Type = 1, + ChildLab_Begin = 1, + ChildLab_Type = ChildLab_Begin, ChildLab_TypeOfValue, ChildLab_Value, ChildLab_MatReqModif, @@ -49,7 +50,8 @@ enum ChildLab ChildLab_Pnt, ChildLab_PntText, ChildLab_Presentation, - ChildLab_AffectedPlane + ChildLab_AffectedPlane, + ChildLab_End }; //======================================================================= @@ -105,10 +107,9 @@ void XCAFDoc_GeomTolerance::SetObject (const Handle(XCAFDimTolObjects_GeomTolera TDataStd_Name::Set(Label(), str); } - TDF_ChildIterator anIter(Label()); - for(;anIter.More(); anIter.Next()) + for (int aChild = ChildLab_Begin; aChild < ChildLab_End; aChild++) { - anIter.Value().ForgetAllAttributes(); + Label().FindChild(aChild).ForgetAllAttributes(); } Handle(TDataStd_Integer) aType = TDataStd_Integer::Set(Label().FindChild(ChildLab_Type), theObject->GetType()); diff --git a/tests/bugs/xde/bug29854 b/tests/bugs/xde/bug29854 new file mode 100644 index 0000000000..2e32414f06 --- /dev/null +++ b/tests/bugs/xde/bug29854 @@ -0,0 +1,74 @@ +puts "============" +puts "0029854: XCAF GD&T: Clear contents of reserved labels only" +puts "============" +puts "" + +pload DCAF + +box b 10 10 10 + +# create document with object +NewDocument D +set L [XAddShape D b] + +# create datum with reserved children +set datumL [XAddDatum D $L] +set aTagNumber 20 +for {set i 1} {${i}<${aTagNumber}} {incr i} { + NewChild D $datumL +} + +set val 100 + +# add datum child with attribute +set childL [NewChild D $datumL] +SetInteger D $childL $val + +# call setObject func +XSetDatumPosition D $datumL 2 + +# check that the new child attribute exists and correct +set currVal [GetInteger D $childL] +if { ${val} != ${currVal} } { + puts "Error: TDataStd_Integer attribute value is not expected for datum child" +} + +# create tolerance with reserved children +set TL [XAddGeomTolerance D $L] +set aTagNumber 19 +for {set i 1} {${i}<${aTagNumber}} {incr i} { + NewChild D $TL +} + +# add tolerance child with attribute +set childL [NewChild D $TL] +SetInteger D $childL $val + +# call setObject func +XSetToleranceValue D $L 0.5 + +# check that the new child attribute exists and correct +set currVal [GetInteger D $childL] +if { ${val} != ${currVal} } { + puts "Error: TDataStd_Integer attribute value is not expected for tolerance child" +} + +# create dimension with reserved children +set DL [XAddDimension D $L] +set aTagNumber 19 +for {set i 1} {${i}<${aTagNumber}} {incr i} { + NewChild D $DL +} + +# add dimension child with attribute +set childL [NewChild D $DL] +SetInteger D $childL $val + +# call setObject func +XSetDimensionValue D $L 0.5 + +# check that the new child attribute exists and correct +set currVal [GetInteger D $childL] +if { ${val} != ${currVal} } { + puts "Error: TDataStd_Integer attribute value is not expected for dimension child" +} From 4f53e7b37c799209066ab8fe0c6860cbafba9100 Mon Sep 17 00:00:00 2001 From: dpasukhi Date: Tue, 28 Jun 2022 16:10:13 +0300 Subject: [PATCH 328/639] 0033011: Data Exchange - Backward compatibility XBF format Fixed problem with moving the attribute position. Made the same positions as version 7.5 with adding to the end. --- src/XCAFDoc/XCAFDoc_Dimension.cxx | 2 +- tests/bugs/step/bug32731 | 4 +-- tests/bugs/xde/bug33011 | 43 +++++++++++++++++++++++++++++++ 3 files changed, 46 insertions(+), 3 deletions(-) create mode 100644 tests/bugs/xde/bug33011 diff --git a/src/XCAFDoc/XCAFDoc_Dimension.cxx b/src/XCAFDoc/XCAFDoc_Dimension.cxx index 5347c340f5..1ba7bdd4a2 100644 --- a/src/XCAFDoc/XCAFDoc_Dimension.cxx +++ b/src/XCAFDoc/XCAFDoc_Dimension.cxx @@ -37,7 +37,6 @@ enum ChildLab ChildLab_Type = ChildLab_Begin, ChildLab_Value, ChildLab_Qualifier, - ChildLab_AngularQualifier, ChildLab_Class, ChildLab_Dec, ChildLab_Modifiers, @@ -52,6 +51,7 @@ enum ChildLab ChildLab_Presentation, ChildLab_Descriptions, ChildLab_DescriptionNames, + ChildLab_AngularQualifier, ChildLab_End }; diff --git a/tests/bugs/step/bug32731 b/tests/bugs/step/bug32731 index f5779f111e..a1b204ce88 100644 --- a/tests/bugs/step/bug32731 +++ b/tests/bugs/step/bug32731 @@ -10,8 +10,8 @@ Close D -silent ReadStep D [locate_data_file bug32731_A5E46910589A.stp] #Checking -XGetShape repr0 D 0:1:4:106:16 +XGetShape repr0 D 0:1:4:106:15 checkgravitycenter repr0 -l -109.847 153.679 0 1e-7 -XGetShape repr1 D 0:1:4:56:16 +XGetShape repr1 D 0:1:4:56:15 checkgravitycenter repr1 -l -68.7 123.272 -18.5624 1e-7 diff --git a/tests/bugs/xde/bug33011 b/tests/bugs/xde/bug33011 new file mode 100644 index 0000000000..4d32025336 --- /dev/null +++ b/tests/bugs/xde/bug33011 @@ -0,0 +1,43 @@ +puts "==========" +puts "0033011: Data Exchange - Backward compatibility XBF format" +puts "==========" +puts "" + +pload XDE +pload OCAF + +Close D -silent + +# create test document +box b 1 1 1 +box bb 2 0 0 1 1 1 +compound b bb c +XNewDoc D +XAddShape D c 0 +# 0:1:1:1 +XAddShape D b +# 0:1:1:2 +explode b f +# b_1 b_2 b_3 b_4 b_5 b_6 +XAddSubShape D b_1 0:1:1:1 +# 0:1:1:1:1 +XAddSubShape D b_1 0:1:1:2 +# 0:1:1:2:1 + +XAddDimension D c b +#0:1:4:1 +XSetDimensionType D 0:1:4:1 2 +XSetDimensionValue D 0:1:4:1 6 +XSetDimensionPlusMinusTol D 0:1:4:1 -0.001 0.002 +vertex v1 10 10 10 +vertex v2 20 20 20 +XSetDimensionPoints D 0:1:4:1 v1 v2 + +box pres 0.5 0.5 0.5 +XSetGDTPresentation D 0:1:4:1 pres "temp presentation" + +# DO NOT CHANGE THE LABEL +XGetShape pres_shape D 0:1:4:1:15 + +checknbshapes pres_shape -vertex 8 -edge 12 -wire 6 -face 6 +checkprops pres_shape -s 1.5 -eps 1e-2 From 3a2ca49b6d5dffd6064cc035243c32b98b40efff Mon Sep 17 00:00:00 2001 From: ichesnok Date: Tue, 29 Mar 2022 17:02:02 +0300 Subject: [PATCH 329/639] 0032867: Data Exchange - Implement Draco compression for writing glTF Draco compression added in RWGltf_CafWriter class. --- adm/cmake/draco.cmake | 94 +++++- src/RWGltf/FILES | 1 + src/RWGltf/RWGltf_CafWriter.cxx | 447 +++++++++++++++++++++++--- src/RWGltf/RWGltf_CafWriter.hxx | 37 ++- src/RWGltf/RWGltf_DracoParameters.hxx | 41 +++ src/XSDRAWSTLVRML/XSDRAWSTLVRML.cxx | 81 ++++- tests/de_mesh/gltf_write/010 | 16 + tests/de_mesh/gltf_write/Diamond | 16 + tests/de_mesh/gltf_write/as1draco | 18 ++ tests/de_mesh/gltf_write/bearing | 16 + tests/de_mesh/gltf_write/bull | 16 + tests/de_mesh/gltf_write/screw | 18 ++ tests/de_mesh/gltf_write/soapbox | 17 + tests/de_mesh/gltf_write/test | 20 ++ 14 files changed, 770 insertions(+), 68 deletions(-) create mode 100644 src/RWGltf/RWGltf_DracoParameters.hxx create mode 100644 tests/de_mesh/gltf_write/010 create mode 100644 tests/de_mesh/gltf_write/Diamond create mode 100644 tests/de_mesh/gltf_write/as1draco create mode 100644 tests/de_mesh/gltf_write/bearing create mode 100644 tests/de_mesh/gltf_write/bull create mode 100644 tests/de_mesh/gltf_write/screw create mode 100644 tests/de_mesh/gltf_write/soapbox create mode 100644 tests/de_mesh/gltf_write/test diff --git a/adm/cmake/draco.cmake b/adm/cmake/draco.cmake index 53cf90a954..755391fa52 100644 --- a/adm/cmake/draco.cmake +++ b/adm/cmake/draco.cmake @@ -1,4 +1,96 @@ # Draco - a library for a lossy vertex data compression, used as extension to glTF format. # https://github.com/google/draco -THIRDPARTY_PRODUCT("DRACO" "draco/compression/decode.h" "CSF_Draco" "") +OCCT_INCLUDE_CMAKE_FILE ("adm/cmake/occt_macros") + +if (NOT DEFINED INSTALL_DRACO) + set (INSTALL_DRACO OFF CACHE BOOL "${INSTALL_DRACO_DESCR}") +endif() + +if (NOT DEFINED 3RDPARTY_DRACO_DIR) + set (3RDPARTY_DRACO_DIR "" CACHE PATH "The directory containing Draco") +endif() + +if (NOT DEFINED 3RDPARTY_DRACO_INCLUDE_DIR) + set (3RDPARTY_DRACO_INCLUDE_DIR "" CACHE PATH "The directory containing headers of the Draco") +endif() + +if (NOT DEFINED 3RDPARTY_DRACO_LIBRARY OR NOT 3RDPARTY_DRACO_LIBRARY_DIR OR NOT EXISTS "${3RDPARTY_DRACO_LIBRARY_DIR}") + set (3RDPARTY_DRACO_LIBRARY "" CACHE FILEPATH "Draco library" FORCE) +endif() + +if (NOT DEFINED 3RDPARTY_DRACO_LIBRARY_DIR) + set (3RDPARTY_DRACO_LIBRARY_DIR "" CACHE PATH "The directory containing Draco library") +endif() + +if (3RDPARTY_DIR AND EXISTS "${3RDPARTY_DIR}") + if (NOT 3RDPARTY_DRACO_DIR OR NOT EXISTS "${3RDPARTY_DRACO_DIR}") + FIND_PRODUCT_DIR("${3RDPARTY_DIR}" draco DRACO_DIR_NAME) + if (DRACO_DIR_NAME) + set (3RDPARTY_DRACO_DIR "${3RDPARTY_DIR}/${DRACO_DIR_NAME}" CACHE PATH "The directory containing Draco" FORCE) + endif() + endif() +endif() + +if (3RDPARTY_DRACO_DIR AND EXISTS "${3RDPARTY_DRACO_DIR}") + set (DRACO_INCLUDE_PATH "${3RDPARTY_DRACO_DIR}/include") + set (DRACO_LIBRARY_PATH "${3RDPARTY_DRACO_DIR}/lib") +endif() + +if (NOT 3RDPARTY_DRACO_INCLUDE_DIR) + if (DRACO_INCLUDE_PATH AND EXISTS "${DRACO_INCLUDE_PATH}") + set (3RDPARTY_DRACO_INCLUDE_DIR "${DRACO_INCLUDE_PATH}" CACHE FILEPATH "The directory containing headers of DRACO" FORCE) + endif() +endif() + +if (NOT 3RDPARTY_DRACO_LIBRARY_DIR) + if (DRACO_LIBRARY_PATH AND EXISTS "${DRACO_LIBRARY_PATH}") + set (3RDPARTY_DRACO_LIBRARY_DIR "${DRACO_LIBRARY_PATH}" CACHE FILEPATH "The directory containing DRACO library" FORCE) + endif() +endif() + +if (3RDPARTY_DRACO_INCLUDE_DIR AND EXISTS "${3RDPARTY_DRACO_INCLUDE_DIR}") + list (APPEND 3RDPARTY_INCLUDE_DIRS "${3RDPARTY_DRACO_INCLUDE_DIR}") +else() + list (APPEND 3RDPARTY_NOT_INCLUDED 3RDPARTY_DRACO_INCLUDE_DIR) +endif() + +if (3RDPARTY_DRACO_DIR AND EXISTS "${3RDPARTY_DRACO_DIR}") + if (NOT 3RDPARTY_DRACO_LIBRARY OR NOT EXISTS "${3RDPARTY_DRACO_LIBRARY}") + set (CMAKE_FIND_LIBRARY_SUFFIXES .lib .so .dylib .a) + set (3RDPARTY_DRACO_LIBRARY "3RDPARTY_DRACO_LIBRARY-NOTFOUND" CACHE FILEPATH "The path to Draco library" FORCE) + + find_library (3RDPARTY_DRACO_LIBRARY NAMES ${CSF_Draco} + PATHS "${3RDPARTY_DRACO_LIBRARY_DIR}" + PATH_SUFFIXES lib + CMAKE_FIND_ROOT_PATH_BOTH + NO_DEFAULT_PATH) + if (3RDPARTY_DRACO_LIBRARY AND EXISTS "${3RDPARTY_DRACO_LIBRARY}") + get_filename_component (3RDPARTY_DRACO_LIBRARY_DIR "${3RDPARTY_DRACO_LIBRARY}" PATH) + set (3RDPARTY_DRACO_LIBRARY_DIR "${3RDPARTY_DRACO_LIBRARY_DIR}" CACHE FILEPATH "The directory containing Draco library" FORCE) + endif() + endif() +endif() + +if (3RDPARTY_DRACO_LIBRARY_DIR AND EXISTS "${3RDPARTY_DRACO_LIBRARY_DIR}") + list (APPEND 3RDPARTY_LIBRARY_DIRS "${3RDPARTY_DRACO_LIBRARY_DIR}") +else() + list (APPEND 3RDPARTY_NO_LIBS 3RDPARTY_DRACO_LIBRARY_DIR) +endif() + +if (INSTALL_DRACO) + get_filename_component(3RDPARTY_DRACO_LIBRARY_REALPATH ${3RDPARTY_DRACO_LIBRARY} REALPATH) + if (SINGLE_GENERATOR) + install (FILES ${3RDPARTY_DRACO_LIBRARY_REALPATH} DESTINATION "${INSTALL_DIR_LIB}") + else() + install (FILES ${3RDPARTY_DRACO_LIBRARY_REALPATH} + CONFIGURATIONS Release + DESTINATION "${INSTALL_DIR_LIB}") + install (FILES ${3RDPARTY_DRACO_LIBRARY_REALPATH} + CONFIGURATIONS RelWithDebInfo + DESTINATION "${INSTALL_DIR_LIB}i") + install (FILES ${3RDPARTY_DRACO_LIBRARY_REALPATH} + CONFIGURATIONS Debug + DESTINATION "${INSTALL_DIR_LIB}d") + endif() +endif() diff --git a/src/RWGltf/FILES b/src/RWGltf/FILES index 5d580a2052..fc24654adf 100644 --- a/src/RWGltf/FILES +++ b/src/RWGltf/FILES @@ -4,6 +4,7 @@ RWGltf_CafWriter.cxx RWGltf_CafWriter.hxx RWGltf_ConfigurationNode.cxx RWGltf_ConfigurationNode.hxx +RWGltf_DracoParameters.hxx RWGltf_GltfAccessor.hxx RWGltf_GltfAccessorCompType.hxx RWGltf_GltfAccessorLayout.hxx diff --git a/src/RWGltf/RWGltf_CafWriter.cxx b/src/RWGltf/RWGltf_CafWriter.cxx index 5e0c8cf0ba..836d15b86e 100644 --- a/src/RWGltf/RWGltf_CafWriter.cxx +++ b/src/RWGltf/RWGltf_CafWriter.cxx @@ -22,7 +22,7 @@ #include #include #include -#include +#include #include #include #include @@ -44,6 +44,10 @@ #include #endif +#ifdef HAVE_DRACO + #include +#endif + IMPLEMENT_STANDARD_RTTIEXT(RWGltf_CafWriter, Standard_Transient) namespace @@ -84,6 +88,84 @@ namespace { theStream.write ((const char* )theTri.GetData(), sizeof(theTri)); } + +#ifdef HAVE_DRACO + //! Write nodes to Draco mesh + static void writeNodesToDracoMesh (draco::Mesh& theMesh, + const std::vector& theNodes) + { + if (theNodes.empty()) + { + return; + } + + draco::PointAttribute anAttr; + anAttr.Init (draco::GeometryAttribute::POSITION, 3, draco::DT_FLOAT32, false, sizeof(float) * 3); + const int anId = theMesh.AddAttribute (anAttr, true, uint32_t(theNodes.size())); + draco::PointAttribute* aPtr = theMesh.attribute (anId); + draco::PointIndex anIndex(0); + for (size_t aNodeInd = 0; aNodeInd < theNodes.size(); ++aNodeInd, ++anIndex) + { + aPtr->SetAttributeValue (aPtr->mapped_index(anIndex), theNodes[aNodeInd].GetData()); + } + } + + //! Write normals to Draco mesh + static void writeNormalsToDracoMesh (draco::Mesh& theMesh, + const std::vector& theNormals) + { + if (theNormals.empty()) + { + return; + } + + draco::PointAttribute anAttr; + anAttr.Init (draco::GeometryAttribute::NORMAL, 3, draco::DT_FLOAT32, false, sizeof(float) * 3); + const int anId = theMesh.AddAttribute (anAttr, true, uint32_t(theNormals.size())); + draco::PointAttribute* aPtr = theMesh.attribute (anId); + draco::PointIndex anIndex(0); + for (size_t aNormInd = 0; aNormInd < theNormals.size(); ++aNormInd, ++anIndex) + { + aPtr->SetAttributeValue (aPtr->mapped_index(anIndex), theNormals[aNormInd].GetData()); + } + } + + //! Write texture UV coordinates to Draco mesh + static void writeTexCoordsToDracoMesh (draco::Mesh& theMesh, + const std::vector& theTexCoord) + { + if (theTexCoord.empty()) + { + return; + } + + draco::PointAttribute anAttr; + anAttr.Init (draco::GeometryAttribute::TEX_COORD, 2, draco::DT_FLOAT32, false, sizeof(float) * 2); + const int anId = theMesh.AddAttribute (anAttr, true, uint32_t(theTexCoord.size())); + draco::PointAttribute* aPtr = theMesh.attribute (anId); + draco::PointIndex anIndex(0); + for (size_t aTexInd = 0; aTexInd < theTexCoord.size(); ++aTexInd, ++anIndex) + { + aPtr->SetAttributeValue (aPtr->mapped_index(anIndex), theTexCoord[aTexInd].GetData()); + } + } + + //! Write indices to Draco mesh + static void writeIndicesToDracoMesh (draco::Mesh& theMesh, + const std::vector& theIndices) + { + draco::Mesh::Face aFace; + int anIndex = 0; + for (size_t anInd = 0; anInd < theIndices.size(); ++anInd, ++anIndex) + { + const Poly_Triangle& anElem = theIndices[anInd]; + aFace[0] = anElem.Value(1); + aFace[1] = anElem.Value(2); + aFace[2] = anElem.Value(3); + theMesh.SetFace (draco::FaceIndex (anIndex), aFace); + } + } +#endif } //================================================================ @@ -150,7 +232,8 @@ Standard_Boolean RWGltf_CafWriter::toSkipFaceMesh (const RWMesh_FaceIterator& th void RWGltf_CafWriter::saveNodes (RWGltf_GltfFace& theGltfFace, std::ostream& theBinFile, const RWMesh_FaceIterator& theFaceIter, - Standard_Integer& theAccessorNb) const + Standard_Integer& theAccessorNb, + const std::shared_ptr& theMesh) const { if (theGltfFace.NodePos.Id == RWGltf_GltfAccessor::INVALID_ID) { @@ -161,8 +244,11 @@ void RWGltf_CafWriter::saveNodes (RWGltf_GltfFace& theGltfFace, } else { - const int64_t aPos = theGltfFace.NodePos.ByteOffset + myBuffViewPos.ByteOffset + theGltfFace.NodePos.Count * sizeof(Graphic3d_Vec3); - Standard_ASSERT_RAISE (aPos == (int64_t )theBinFile.tellp(), "wrong offset"); + if (theMesh.get() == nullptr) + { + const int64_t aPos = theGltfFace.NodePos.ByteOffset + myBuffViewPos.ByteOffset + theGltfFace.NodePos.Count * sizeof(Graphic3d_Vec3); + Standard_ASSERT_RAISE(aPos == (int64_t)theBinFile.tellp(), "wrong offset"); + } } theGltfFace.NodePos.Count += theFaceIter.NbNodes(); @@ -172,7 +258,14 @@ void RWGltf_CafWriter::saveNodes (RWGltf_GltfFace& theGltfFace, gp_XYZ aNode = theFaceIter.NodeTransformed (aNodeIter).XYZ(); myCSTrsf.TransformPosition (aNode); theGltfFace.NodePos.BndBox.Add (Graphic3d_Vec3d(aNode.X(), aNode.Y(), aNode.Z())); - writeVec3 (theBinFile, aNode); + if (theMesh.get() != nullptr) + { + theMesh->NodesVec.push_back(Graphic3d_Vec3(float(aNode.X()), float(aNode.Y()), float(aNode.Z()))); + } + else + { + writeVec3(theBinFile, aNode); + } } } @@ -183,7 +276,8 @@ void RWGltf_CafWriter::saveNodes (RWGltf_GltfFace& theGltfFace, void RWGltf_CafWriter::saveNormals (RWGltf_GltfFace& theGltfFace, std::ostream& theBinFile, RWMesh_FaceIterator& theFaceIter, - Standard_Integer& theAccessorNb) const + Standard_Integer& theAccessorNb, + const std::shared_ptr& theMesh) const { if (!theFaceIter.HasNormals()) { @@ -199,8 +293,11 @@ void RWGltf_CafWriter::saveNormals (RWGltf_GltfFace& theGltfFace, } else { - const int64_t aPos = theGltfFace.NodeNorm.ByteOffset + myBuffViewNorm.ByteOffset + theGltfFace.NodeNorm.Count * sizeof(Graphic3d_Vec3); - Standard_ASSERT_RAISE (aPos == (int64_t )theBinFile.tellp(), "wrong offset"); + if (theMesh.get() == nullptr) + { + const int64_t aPos = theGltfFace.NodeNorm.ByteOffset + myBuffViewNorm.ByteOffset + theGltfFace.NodeNorm.Count * sizeof(Graphic3d_Vec3); + Standard_ASSERT_RAISE(aPos == (int64_t)theBinFile.tellp(), "wrong offset"); + } } theGltfFace.NodeNorm.Count += theFaceIter.NbNodes(); @@ -210,7 +307,14 @@ void RWGltf_CafWriter::saveNormals (RWGltf_GltfFace& theGltfFace, const gp_Dir aNormal = theFaceIter.NormalTransformed (aNodeIter); Graphic3d_Vec3 aVecNormal ((float )aNormal.X(), (float )aNormal.Y(), (float )aNormal.Z()); myCSTrsf.TransformNormal (aVecNormal); - writeVec3 (theBinFile, aVecNormal); + if (theMesh.get() != nullptr) + { + theMesh->NormalsVec.push_back(aVecNormal); + } + else + { + writeVec3(theBinFile, aVecNormal); + } } } @@ -221,7 +325,8 @@ void RWGltf_CafWriter::saveNormals (RWGltf_GltfFace& theGltfFace, void RWGltf_CafWriter::saveTextCoords (RWGltf_GltfFace& theGltfFace, std::ostream& theBinFile, const RWMesh_FaceIterator& theFaceIter, - Standard_Integer& theAccessorNb) const + Standard_Integer& theAccessorNb, + const std::shared_ptr& theMesh) const { if (!theFaceIter.HasTexCoords()) { @@ -253,8 +358,11 @@ void RWGltf_CafWriter::saveTextCoords (RWGltf_GltfFace& theGltfFace, } else { - const int64_t aPos = theGltfFace.NodeUV.ByteOffset + myBuffViewTextCoord.ByteOffset + theGltfFace.NodeUV.Count * sizeof(Graphic3d_Vec2); - Standard_ASSERT_RAISE (aPos == (int64_t )theBinFile.tellp(), "wrong offset"); + if (theMesh.get() == nullptr) + { + const int64_t aPos = theGltfFace.NodeUV.ByteOffset + myBuffViewTextCoord.ByteOffset + theGltfFace.NodeUV.Count * sizeof(Graphic3d_Vec2); + Standard_ASSERT_RAISE(aPos == (int64_t)theBinFile.tellp(), "wrong offset"); + } } theGltfFace.NodeUV.Count += theFaceIter.NbNodes(); @@ -263,7 +371,14 @@ void RWGltf_CafWriter::saveTextCoords (RWGltf_GltfFace& theGltfFace, { gp_Pnt2d aTexCoord = theFaceIter.NodeTexCoord (aNodeIter); aTexCoord.SetY (1.0 - aTexCoord.Y()); - writeVec2 (theBinFile, aTexCoord.XY()); + if (theMesh.get() != nullptr) + { + theMesh->TexCoordsVec.push_back(Graphic3d_Vec2((float)aTexCoord.X(), (float)aTexCoord.Y())); + } + else + { + writeVec2(theBinFile, aTexCoord.XY()); + } } } @@ -274,7 +389,8 @@ void RWGltf_CafWriter::saveTextCoords (RWGltf_GltfFace& theGltfFace, void RWGltf_CafWriter::saveIndices (RWGltf_GltfFace& theGltfFace, std::ostream& theBinFile, const RWMesh_FaceIterator& theFaceIter, - Standard_Integer& theAccessorNb) + Standard_Integer& theAccessorNb, + const std::shared_ptr& theMesh) { if (theGltfFace.Indices.Id == RWGltf_GltfAccessor::INVALID_ID) { @@ -287,11 +403,14 @@ void RWGltf_CafWriter::saveIndices (RWGltf_GltfFace& theGltfFace, } else { - const int64_t aRefPos = (int64_t )theBinFile.tellp(); - const int64_t aPos = theGltfFace.Indices.ByteOffset - + myBuffViewInd.ByteOffset - + theGltfFace.Indices.Count * (theGltfFace.Indices.ComponentType == RWGltf_GltfAccessorCompType_UInt32 ? sizeof(uint32_t) : sizeof(uint16_t)); - Standard_ASSERT_RAISE (aPos == aRefPos, "wrong offset"); + if (theMesh.get() == nullptr) + { + const int64_t aRefPos = (int64_t )theBinFile.tellp(); + const int64_t aPos = theGltfFace.Indices.ByteOffset + + myBuffViewInd.ByteOffset + + theGltfFace.Indices.Count * (theGltfFace.Indices.ComponentType == RWGltf_GltfAccessorCompType_UInt32 ? sizeof(uint32_t) : sizeof(uint16_t)); + Standard_ASSERT_RAISE (aPos == aRefPos, "wrong offset"); + } } const Standard_Integer aNodeFirst = theGltfFace.NbIndexedNodes - theFaceIter.ElemLower(); @@ -306,13 +425,20 @@ void RWGltf_CafWriter::saveIndices (RWGltf_GltfFace& theGltfFace, aTri(1) += aNodeFirst; aTri(2) += aNodeFirst; aTri(3) += aNodeFirst; - if (theGltfFace.Indices.ComponentType == RWGltf_GltfAccessorCompType_UInt16) + if (theMesh.get() != nullptr) { - writeTriangle16 (theBinFile, NCollection_Vec3((uint16_t)aTri(1), (uint16_t)aTri(2), (uint16_t)aTri(3))); + theMesh->IndicesVec.push_back(aTri); } else { - writeTriangle32 (theBinFile, Graphic3d_Vec3i (aTri(1), aTri(2), aTri(3))); + if (theGltfFace.Indices.ComponentType == RWGltf_GltfAccessorCompType_UInt16) + { + writeTriangle16(theBinFile, NCollection_Vec3((uint16_t)aTri(1), (uint16_t)aTri(2), (uint16_t)aTri(3))); + } + else + { + writeTriangle32(theBinFile, Graphic3d_Vec3i(aTri(1), aTri(2), aTri(3))); + } } } } @@ -373,6 +499,14 @@ bool RWGltf_CafWriter::writeBinData (const Handle(TDocStd_Document)& theDocument const TColStd_MapOfAsciiString* theLabelFilter, const Message_ProgressRange& theProgress) { +#ifndef HAVE_DRACO + if (myDracoParameters.DracoCompression) + { + Message::SendFail ("Error: cannot use Draco compression, Draco library missing."); + return false; + } +#endif + myBuffViewPos.Id = RWGltf_GltfAccessor::INVALID_ID; myBuffViewPos.ByteOffset = 0; myBuffViewPos.ByteLength = 0; @@ -396,6 +530,8 @@ bool RWGltf_CafWriter::writeBinData (const Handle(TDocStd_Document)& theDocument myBuffViewInd.ByteLength = 0; myBuffViewInd.Target = RWGltf_GltfBufferViewTarget_ELEMENT_ARRAY_BUFFER; + myBuffViewsDraco.clear(); + myBinDataMap.Clear(); myBinDataLen64 = 0; @@ -508,6 +644,7 @@ bool RWGltf_CafWriter::writeBinData (const Handle(TDocStd_Document)& theDocument } } + std::vector> aMeshes; Standard_Integer aNbAccessors = 0; NCollection_Map aWrittenFaces; NCollection_DataMap aWrittenPrimData; @@ -526,6 +663,7 @@ bool RWGltf_CafWriter::writeBinData (const Handle(TDocStd_Document)& theDocument aBuffView->ByteOffset = aBinFile->tellp(); aWrittenFaces.Clear (false); aWrittenPrimData.Clear (false); + size_t aMeshIndex = 0; for (ShapeToGltfFaceMap::Iterator aBinDataIter (myBinDataMap); aBinDataIter.More() && aPSentryBin.More(); aBinDataIter.Next()) { const Handle(RWGltf_GltfFaceList)& aGltfFaceList = aBinDataIter.Value(); @@ -533,6 +671,23 @@ bool RWGltf_CafWriter::writeBinData (const Handle(TDocStd_Document)& theDocument { continue; } + + std::shared_ptr aMeshPtr; + ++aMeshIndex; + #ifdef HAVE_DRACO + if (myDracoParameters.DracoCompression) + { + if (aMeshIndex <= aMeshes.size()) + { + aMeshPtr = aMeshes.at(aMeshIndex - 1); + } + else + { + aMeshes.push_back(std::make_shared(RWGltf_CafWriter::Mesh())); + aMeshPtr = aMeshes.back(); + } + } + #endif for (RWGltf_GltfFaceList::Iterator aGltfFaceIter (*aGltfFaceList); aGltfFaceIter.More() && aPSentryBin.More(); aGltfFaceIter.Next()) { @@ -579,22 +734,22 @@ bool RWGltf_CafWriter::writeBinData (const Handle(TDocStd_Document)& theDocument case RWGltf_GltfArrayType_Position: { aGltfFace->NbIndexedNodes = 0; // reset to zero before RWGltf_GltfArrayType_Indices step - saveNodes (*aGltfFace, *aBinFile, aFaceIter, aNbAccessors); + saveNodes (*aGltfFace, *aBinFile, aFaceIter, aNbAccessors, aMeshPtr); break; } case RWGltf_GltfArrayType_Normal: { - saveNormals (*aGltfFace, *aBinFile, aFaceIter, aNbAccessors); + saveNormals (*aGltfFace, *aBinFile, aFaceIter, aNbAccessors, aMeshPtr); break; } case RWGltf_GltfArrayType_TCoord0: { - saveTextCoords (*aGltfFace, *aBinFile, aFaceIter, aNbAccessors); + saveTextCoords (*aGltfFace, *aBinFile, aFaceIter, aNbAccessors, aMeshPtr); break; } case RWGltf_GltfArrayType_Indices: { - saveIndices (*aGltfFace, *aBinFile, aFaceIter, aNbAccessors); + saveIndices (*aGltfFace, *aBinFile, aFaceIter, aNbAccessors, aMeshPtr); break; } default: @@ -611,16 +766,22 @@ bool RWGltf_CafWriter::writeBinData (const Handle(TDocStd_Document)& theDocument } // add alignment by 4 bytes (might happen on RWGltf_GltfAccessorCompType_UInt16 indices) - int64_t aContentLen64 = (int64_t)aBinFile->tellp(); - while (aContentLen64 % 4 != 0) + if (!myDracoParameters.DracoCompression) { - aBinFile->write (" ", 1); - ++aContentLen64; + int64_t aContentLen64 = (int64_t)aBinFile->tellp(); + while (aContentLen64 % 4 != 0) + { + aBinFile->write(" ", 1); + ++aContentLen64; + } } } } - aBuffView->ByteLength = (int64_t )aBinFile->tellp() - aBuffView->ByteOffset; + if (!myDracoParameters.DracoCompression) + { + aBuffView->ByteLength = (int64_t)aBinFile->tellp() - aBuffView->ByteOffset; + } if (!aPSentryBin.More()) { return false; @@ -629,6 +790,72 @@ bool RWGltf_CafWriter::writeBinData (const Handle(TDocStd_Document)& theDocument aPSentryBin.Next(); } + if (myDracoParameters.DracoCompression) + { +#ifdef HAVE_DRACO + OSD_Timer aDracoTimer; + aDracoTimer.Start(); + int aBuffId = 0; + draco::Encoder aDracoEncoder; + aDracoEncoder.SetAttributeQuantization (draco::GeometryAttribute::POSITION, myDracoParameters.QuantizePositionBits); + aDracoEncoder.SetAttributeQuantization (draco::GeometryAttribute::NORMAL, myDracoParameters.QuantizeNormalBits); + aDracoEncoder.SetAttributeQuantization (draco::GeometryAttribute::TEX_COORD, myDracoParameters.QuantizeTexcoordBits); + aDracoEncoder.SetAttributeQuantization (draco::GeometryAttribute::COLOR, myDracoParameters.QuantizeColorBits); + aDracoEncoder.SetAttributeQuantization (draco::GeometryAttribute::GENERIC, myDracoParameters.QuantizeGenericBits); + aDracoEncoder.SetSpeedOptions (myDracoParameters.CompressionLevel, myDracoParameters.CompressionLevel); + for (size_t aMeshInd = 0; aMeshInd != aMeshes.size(); ++aMeshInd) + { + const std::shared_ptr& aCurrentMesh = aMeshes[aMeshInd]; + if (aCurrentMesh->NodesVec.empty()) + { + continue; + } + + draco::Mesh aDracoMesh; + writeNodesToDracoMesh (aDracoMesh, aCurrentMesh->NodesVec); + if (!aCurrentMesh->NormalsVec.empty()) + { + writeNormalsToDracoMesh (aDracoMesh, aCurrentMesh->NormalsVec); + } + if (!aCurrentMesh->TexCoordsVec.empty()) + { + writeTexCoordsToDracoMesh (aDracoMesh, aCurrentMesh->TexCoordsVec); + } + writeIndicesToDracoMesh (aDracoMesh, aCurrentMesh->IndicesVec); + + draco::EncoderBuffer anEncoderBuff; + draco::Status aStatus = aDracoEncoder.EncodeMeshToBuffer (aDracoMesh, &anEncoderBuff); + if (!aStatus.ok()) + { + Message::SendFail (TCollection_AsciiString("Error: mesh cannot be encoded in draco buffer.")); + return false; + } + + RWGltf_GltfBufferView aBuffViewDraco; + aBuffViewDraco.Id = aBuffId++; + aBuffViewDraco.ByteOffset = aBinFile->tellp(); + aBinFile->write (anEncoderBuff.data(), std::streamsize(anEncoderBuff.size())); + if (!aBinFile->good()) + { + Message::SendFail (TCollection_AsciiString("File '") + myBinFileNameFull + "' cannot be written"); + return false; + } + + int64_t aLength = (int64_t)aBinFile->tellp(); + while (aLength % 4 != 0) + { + aBinFile->write(" ", 1); + ++aLength; + } + + aBuffViewDraco.ByteLength = aLength - aBuffViewDraco.ByteOffset; + myBuffViewsDraco.push_back (aBuffViewDraco); + } + aDracoTimer.Stop(); + Message::SendInfo (TCollection_AsciiString("Draco compression time: ") + aDracoTimer.ElapsedTime() + " s"); +#endif + } + if (myIsBinary && myToEmbedTexturesInGlb) { @@ -1020,10 +1247,13 @@ void RWGltf_CafWriter::writePositions (const RWGltf_GltfFace& theGltfFace) } myWriter->StartObject(); - myWriter->Key ("bufferView"); - myWriter->Int (myBuffViewPos.Id); - myWriter->Key ("byteOffset"); - myWriter->Int64 (theGltfFace.NodePos.ByteOffset); + if (!myDracoParameters.DracoCompression) + { + myWriter->Key ("bufferView"); + myWriter->Int (myBuffViewPos.Id); + myWriter->Key ("byteOffset"); + myWriter->Int64 (theGltfFace.NodePos.ByteOffset); + } myWriter->Key ("componentType"); myWriter->Int (theGltfFace.NodePos.ComponentType); myWriter->Key ("count"); @@ -1068,10 +1298,13 @@ void RWGltf_CafWriter::writeNormals (const RWGltf_GltfFace& theGltfFace) } myWriter->StartObject(); - myWriter->Key ("bufferView"); - myWriter->Int (myBuffViewNorm.Id); - myWriter->Key ("byteOffset"); - myWriter->Int64 (theGltfFace.NodeNorm.ByteOffset); + if (!myDracoParameters.DracoCompression) + { + myWriter->Key ("bufferView"); + myWriter->Int (myBuffViewNorm.Id); + myWriter->Key ("byteOffset"); + myWriter->Int64 (theGltfFace.NodeNorm.ByteOffset); + } myWriter->Key ("componentType"); myWriter->Int (theGltfFace.NodeNorm.ComponentType); myWriter->Key ("count"); @@ -1116,10 +1349,13 @@ void RWGltf_CafWriter::writeTextCoords (const RWGltf_GltfFace& theGltfFace) } myWriter->StartObject(); - myWriter->Key ("bufferView"); - myWriter->Int (myBuffViewTextCoord.Id); - myWriter->Key ("byteOffset"); - myWriter->Int64 (theGltfFace.NodeUV.ByteOffset); + if (!myDracoParameters.DracoCompression) + { + myWriter->Key ("bufferView"); + myWriter->Int (myBuffViewTextCoord.Id); + myWriter->Key ("byteOffset"); + myWriter->Int64 (theGltfFace.NodeUV.ByteOffset); + } myWriter->Key ("componentType"); myWriter->Int (theGltfFace.NodeUV.ComponentType); myWriter->Key ("count"); @@ -1164,10 +1400,13 @@ void RWGltf_CafWriter::writeIndices (const RWGltf_GltfFace& theGltfFace) } myWriter->StartObject(); - myWriter->Key ("bufferView"); - myWriter->Int (myBuffViewInd.Id); - myWriter->Key ("byteOffset"); - myWriter->Int64 (theGltfFace.Indices.ByteOffset); + if (!myDracoParameters.DracoCompression) + { + myWriter->Key("bufferView"); + myWriter->Int(myBuffViewInd.Id); + myWriter->Key("byteOffset"); + myWriter->Int64(theGltfFace.Indices.ByteOffset); + } myWriter->Key ("componentType"); myWriter->Int (theGltfFace.Indices.ComponentType); myWriter->Key ("count"); @@ -1309,6 +1548,24 @@ void RWGltf_CafWriter::writeBufferViews (const Standard_Integer theBinDataBuffer myWriter->Int (myBuffViewInd.Target); myWriter->EndObject(); } + if (myDracoParameters.DracoCompression) + { + for (size_t aBufInd = 0; aBufInd != myBuffViewsDraco.size(); ++aBufInd) + { + if (myBuffViewsDraco[aBufInd].Id != RWGltf_GltfAccessor::INVALID_ID) + { + aBuffViewId++; + myWriter->StartObject(); + myWriter->Key("buffer"); + myWriter->Int(theBinDataBufferId); + myWriter->Key("byteLength"); + myWriter->Int64(myBuffViewsDraco[aBufInd].ByteLength); + myWriter->Key("byteOffset"); + myWriter->Int64(myBuffViewsDraco[aBufInd].ByteOffset); + myWriter->EndObject(); + } + } + } myMaterialMap->FlushGlbBufferViews (myWriter.get(), theBinDataBufferId, aBuffViewId); @@ -1352,7 +1609,28 @@ void RWGltf_CafWriter::writeBuffers() // ======================================================================= void RWGltf_CafWriter::writeExtensions() { +#ifdef HAVE_RAPIDJSON Standard_ProgramError_Raise_if (myWriter.get() == NULL, "Internal error: RWGltf_CafWriter::writeExtensions()"); + + if (myDracoParameters.DracoCompression) + { + myWriter->Key(RWGltf_GltfRootElementName(RWGltf_GltfRootElement_ExtensionsUsed)); + + myWriter->StartArray(); + { + myWriter->Key("KHR_draco_mesh_compression"); + } + myWriter->EndArray(); + + myWriter->Key(RWGltf_GltfRootElementName(RWGltf_GltfRootElement_ExtensionsRequired)); + + myWriter->StartArray(); + { + myWriter->Key("KHR_draco_mesh_compression"); + } + myWriter->EndArray(); + } +#endif } // ======================================================================= @@ -1425,6 +1703,7 @@ void RWGltf_CafWriter::writeMaterials (const RWGltf_GltfSceneNodeMap& theSceneNo // ======================================================================= void RWGltf_CafWriter::writePrimArray (const RWGltf_GltfFace& theGltfFace, const TCollection_AsciiString& theName, + const int theDracoBufInd, bool& theToStartPrims) { #ifdef HAVE_RAPIDJSON @@ -1471,12 +1750,48 @@ void RWGltf_CafWriter::writePrimArray (const RWGltf_GltfFace& theGltfFace, } myWriter->Key ("mode"); myWriter->Int (RWGltf_GltfPrimitiveMode_Triangles); + + if (myDracoParameters.DracoCompression) + { + myWriter->Key("extensions"); + myWriter->StartObject(); + { + myWriter->Key("KHR_draco_mesh_compression"); + myWriter->StartObject(); + myWriter->Key("bufferView"); + myWriter->Int(myBuffViewsDraco[theDracoBufInd].Id); + myWriter->Key("attributes"); + myWriter->StartObject(); + { + int anAttrInd = 0; + if (theGltfFace.NodePos.Id != RWGltf_GltfAccessor::INVALID_ID) + { + myWriter->Key("POSITION"); + myWriter->Int(anAttrInd++); + } + if (theGltfFace.NodeNorm.Id != RWGltf_GltfAccessor::INVALID_ID) + { + myWriter->Key("NORMAL"); + myWriter->Int(anAttrInd++); + } + if (theGltfFace.NodeUV.Id != RWGltf_GltfAccessor::INVALID_ID) + { + myWriter->Key("TEXCOORD_0"); + myWriter->Int(anAttrInd++); + } + } + myWriter->EndObject(); + myWriter->EndObject(); + } + myWriter->EndObject(); + } } myWriter->EndObject(); #else (void )theGltfFace; (void )theName; (void )theToStartPrims; + (void )theDracoBufInd; #endif } @@ -1492,6 +1807,8 @@ void RWGltf_CafWriter::writeMeshes (const RWGltf_GltfSceneNodeMap& theSceneNodeM myWriter->Key (RWGltf_GltfRootElementName (RWGltf_GltfRootElement_Meshes)); myWriter->StartArray(); + int aDracoBufInd = 0; + NCollection_IndexedDataMap aDracoBufIndMap; NCollection_Map aWrittenFaces; for (RWGltf_GltfSceneNodeMap::Iterator aSceneNodeIter (theSceneNodeMap); aSceneNodeIter.More(); aSceneNodeIter.Next()) { @@ -1522,7 +1839,23 @@ void RWGltf_CafWriter::writeMeshes (const RWGltf_GltfSceneNodeMap& theSceneNodeM for (RWGltf_GltfFaceList::Iterator aFaceGroupIter (*aGltfFaceList); aFaceGroupIter.More(); aFaceGroupIter.Next()) { const Handle(RWGltf_GltfFace)& aGltfFace = aFaceGroupIter.Value(); - writePrimArray (*aGltfFace, aNodeName, toStartPrims); + const int aPrevSize = aDracoBufIndMap.Size(); + const int aTempDracoBufInd = aDracoBufInd; + if (myDracoParameters.DracoCompression + && !aDracoBufIndMap.FindFromKey (aGltfFace->NodePos.Id, aDracoBufInd)) + { + aDracoBufIndMap.Add (aGltfFace->NodePos.Id, aDracoBufInd); + } + + writePrimArray (*aGltfFace, aNodeName, aDracoBufInd, toStartPrims); + if (aTempDracoBufInd != aDracoBufInd) + { + aDracoBufInd = aTempDracoBufInd; + } + if (!myDracoParameters.DracoCompression || aDracoBufIndMap.Size() > aPrevSize) + { + ++aDracoBufInd; + } } } else @@ -1542,7 +1875,23 @@ void RWGltf_CafWriter::writeMeshes (const RWGltf_GltfSceneNodeMap& theSceneNodeM } const Handle(RWGltf_GltfFace)& aGltfFace = aGltfFaceList->First(); - writePrimArray (*aGltfFace, aNodeName, toStartPrims); + const int aPrevSize = aDracoBufIndMap.Size(); + const int aTempDracoBufInd = aDracoBufInd; + if (myDracoParameters.DracoCompression + && !aDracoBufIndMap.FindFromKey(aGltfFace->NodePos.Id, aDracoBufInd)) + { + aDracoBufIndMap.Add(aGltfFace->NodePos.Id, aDracoBufInd); + } + + writePrimArray (*aGltfFace, aNodeName, aDracoBufInd, toStartPrims); + if (aTempDracoBufInd != aDracoBufInd) + { + aDracoBufInd = aTempDracoBufInd; + } + if (!myDracoParameters.DracoCompression || aDracoBufIndMap.Size() > aPrevSize) + { + ++aDracoBufInd; + } } } diff --git a/src/RWGltf/RWGltf_CafWriter.hxx b/src/RWGltf/RWGltf_CafWriter.hxx index 6e8b976733..be1d8a344d 100644 --- a/src/RWGltf/RWGltf_CafWriter.hxx +++ b/src/RWGltf/RWGltf_CafWriter.hxx @@ -18,12 +18,14 @@ #include #include #include +#include #include #include #include #include #include #include +#include #include @@ -40,6 +42,15 @@ class RWGltf_CafWriter : public Standard_Transient DEFINE_STANDARD_RTTIEXT(RWGltf_CafWriter, Standard_Transient) public: + //! Mesh + struct Mesh + { + std::vector NodesVec; //!< vector for mesh nodes + std::vector NormalsVec; //!< vector for mesh normals + std::vector TexCoordsVec; //!< vector for mesh texture UV coordinates + std::vector IndicesVec; //!< vector for mesh indices + }; + //! Main constructor. //! @param theFile [in] path to output glTF file //! @param theIsBinary [in] flag to write into binary glTF format (.glb) @@ -114,6 +125,12 @@ public: //! May reduce binary data size thanks to smaller triangle indexes. void SetSplitIndices16 (bool theToSplit) { myToSplitIndices16 = theToSplit; } + //! Return Draco parameters + const RWGltf_DracoParameters& CompressionParameters() const { return myDracoParameters; } + + //! Set Draco parameters + void SetCompressionParameters(const RWGltf_DracoParameters& theDracoParameters) { myDracoParameters = theDracoParameters; } + //! Write glTF file and associated binary file. //! Triangulation data should be precomputed within shapes! //! @param theDocument [in] input document @@ -186,40 +203,48 @@ protected: //! @param theBinFile [out] output file to write into //! @param theFaceIter [in] current face to write //! @param theAccessorNb [in] [out] last accessor index + //! @param theMesh [in] [out] mesh Standard_EXPORT virtual void saveNodes (RWGltf_GltfFace& theGltfFace, std::ostream& theBinFile, const RWMesh_FaceIterator& theFaceIter, - Standard_Integer& theAccessorNb) const; + Standard_Integer& theAccessorNb, + const std::shared_ptr& theMesh) const; //! Write mesh normals into binary file. //! @param theGltfFace [out] glTF face definition //! @param theBinFile [out] output file to write into //! @param theFaceIter [in] current face to write //! @param theAccessorNb [in] [out] last accessor index + //! @param theMesh [in] [out] mesh Standard_EXPORT virtual void saveNormals (RWGltf_GltfFace& theGltfFace, std::ostream& theBinFile, RWMesh_FaceIterator& theFaceIter, - Standard_Integer& theAccessorNb) const; + Standard_Integer& theAccessorNb, + const std::shared_ptr& theMesh) const; //! Write mesh texture UV coordinates into binary file. //! @param theGltfFace [out] glTF face definition //! @param theBinFile [out] output file to write into //! @param theFaceIter [in] current face to write //! @param theAccessorNb [in] [out] last accessor index + //! @param theMesh [in] [out] mesh Standard_EXPORT virtual void saveTextCoords (RWGltf_GltfFace& theGltfFace, std::ostream& theBinFile, const RWMesh_FaceIterator& theFaceIter, - Standard_Integer& theAccessorNb) const; + Standard_Integer& theAccessorNb, + const std::shared_ptr& theMesh) const; //! Write mesh indexes into binary file. //! @param theGltfFace [out] glTF face definition //! @param theBinFile [out] output file to write into //! @param theFaceIter [in] current face to write //! @param theAccessorNb [in] [out] last accessor index + //! @param theMesh [in] [out] mesh Standard_EXPORT virtual void saveIndices (RWGltf_GltfFace& theGltfFace, std::ostream& theBinFile, const RWMesh_FaceIterator& theFaceIter, - Standard_Integer& theAccessorNb); + Standard_Integer& theAccessorNb, + const std::shared_ptr& theMesh); protected: @@ -280,9 +305,11 @@ protected: //! Write a primitive array to RWGltf_GltfRootElement_Meshes section. //! @param[in] theGltfFace face to write //! @param[in] theName primitive array name + //! @param[in] theDracoBufInd draco buffer index //! @param[in,out] theToStartPrims flag indicating that primitive array has been started Standard_EXPORT virtual void writePrimArray (const RWGltf_GltfFace& theGltfFace, const TCollection_AsciiString& theName, + const int theDracoBufInd, bool& theToStartPrims); //! Write RWGltf_GltfRootElement_Nodes section. @@ -369,6 +396,8 @@ protected: ShapeToGltfFaceMap myBinDataMap; //!< map for TopoDS_Face to glTF face (merging duplicates) int64_t myBinDataLen64; //!< length of binary file + std::vector myBuffViewsDraco; //!< vector of buffers view with compression data + RWGltf_DracoParameters myDracoParameters; //!< Draco parameters }; #endif // _RWGltf_CafWriter_HeaderFiler diff --git a/src/RWGltf/RWGltf_DracoParameters.hxx b/src/RWGltf/RWGltf_DracoParameters.hxx new file mode 100644 index 0000000000..7e3f48349a --- /dev/null +++ b/src/RWGltf/RWGltf_DracoParameters.hxx @@ -0,0 +1,41 @@ +// Copyright (c) 2022 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 _RWGltf_DracoParameters_HeaderFile +#define _RWGltf_DracoParameters_HeaderFile + +//! Draco compression parameters +struct RWGltf_DracoParameters +{ + RWGltf_DracoParameters() + : DracoCompression (false), + CompressionLevel (7), + QuantizePositionBits (14), + QuantizeNormalBits (10), + QuantizeTexcoordBits (12), + QuantizeColorBits (8), + QuantizeGenericBits (12), + UnifiedQuantization (false) + {} + + bool DracoCompression; //!< flag to use Draco compression (FALSE by default). If it is TRUE, compression is used + int CompressionLevel; //!< Draco compression level [0-10] (7 by default) + int QuantizePositionBits; //!< quantization bits for position attribute (14 by default) + int QuantizeNormalBits; //!< quantization bits for normal attribute (10 by default) + int QuantizeTexcoordBits; //!< quantization bits for texture coordinate attribute (12 by default) + int QuantizeColorBits; //!< quantization bits for color attributes (8 by default) + int QuantizeGenericBits; //!< quantization bits for skinning and custom attributes (12 by default) + bool UnifiedQuantization; //!< quantize positions of all primitives using the same quantization grid (FALSE by default) +}; + +#endif diff --git a/src/XSDRAWSTLVRML/XSDRAWSTLVRML.cxx b/src/XSDRAWSTLVRML/XSDRAWSTLVRML.cxx index 5abe0d7b87..7976a23ecb 100644 --- a/src/XSDRAWSTLVRML/XSDRAWSTLVRML.cxx +++ b/src/XSDRAWSTLVRML/XSDRAWSTLVRML.cxx @@ -44,6 +44,7 @@ #include #include #include +#include #include #include #include @@ -384,6 +385,7 @@ static Standard_Integer WriteGltf (Draw_Interpretor& theDI, bool toMergeFaces = false, toSplitIndices16 = false; RWMesh_NameFormat aNodeNameFormat = RWMesh_NameFormat_InstanceOrProduct; RWMesh_NameFormat aMeshNameFormat = RWMesh_NameFormat_Product; + RWGltf_DracoParameters aDracoParameters; for (Standard_Integer anArgIter = 1; anArgIter < theNbArgs; ++anArgIter) { TCollection_AsciiString anArgCase (theArgVec[anArgIter]); @@ -516,6 +518,44 @@ static Standard_Integer WriteGltf (Draw_Interpretor& theDI, { toEmbedTexturesInGlb = false; } + else if (anArgCase == "-draco") + { + aDracoParameters.DracoCompression = Draw::ParseOnOffIterator(theNbArgs, theArgVec, anArgIter); + } + else if (anArgCase == "-compressionlevel" && (anArgIter + 1) < theNbArgs + && Draw::ParseInteger(theArgVec[anArgIter + 1], aDracoParameters.CompressionLevel)) + { + ++anArgIter; + } + else if (anArgCase == "-quantizepositionbits" && (anArgIter + 1) < theNbArgs + && Draw::ParseInteger(theArgVec[anArgIter + 1], aDracoParameters.QuantizePositionBits)) + { + ++anArgIter; + } + else if (anArgCase == "-quantizenormalbits" && (anArgIter + 1) < theNbArgs + && Draw::ParseInteger(theArgVec[anArgIter + 1], aDracoParameters.QuantizeNormalBits)) + { + ++anArgIter; + } + else if (anArgCase == "-quantizetexcoordbits" && (anArgIter + 1) < theNbArgs + && Draw::ParseInteger(theArgVec[anArgIter + 1], aDracoParameters.QuantizeTexcoordBits)) + { + ++anArgIter; + } + else if (anArgCase == "-quantizecolorbits" && (anArgIter + 1) < theNbArgs + && Draw::ParseInteger(theArgVec[anArgIter + 1], aDracoParameters.QuantizeColorBits)) + { + ++anArgIter; + } + else if (anArgCase == "-quantizegenericbits" && (anArgIter + 1) < theNbArgs + && Draw::ParseInteger(theArgVec[anArgIter + 1], aDracoParameters.QuantizeGenericBits)) + { + ++anArgIter; + } + else if (anArgCase == "-unifiedquantization") + { + aDracoParameters.UnifiedQuantization = Draw::ParseOnOffIterator(theNbArgs, theArgVec, anArgIter); + } else { Message::SendFail() << "Syntax error at '" << theArgVec[anArgIter] << "'"; @@ -547,6 +587,7 @@ static Standard_Integer WriteGltf (Draw_Interpretor& theDI, aWriter.SetToEmbedTexturesInGlb (toEmbedTexturesInGlb); aWriter.SetMergeFaces (toMergeFaces); aWriter.SetSplitIndices16 (toSplitIndices16); + aWriter.SetCompressionParameters(aDracoParameters); aWriter.ChangeCoordinateSystemConverter().SetInputLengthUnit (aScaleFactorM); aWriter.ChangeCoordinateSystemConverter().SetInputCoordinateSystem (aSystemCoordSys); aWriter.Perform (aDoc, aFileInfo, aProgress->Start()); @@ -2361,20 +2402,32 @@ void XSDRAWSTLVRML::InitCommands (Draw_Interpretor& theCommands) __FILE__, ReadGltf, g); theCommands.Add ("WriteGltf", "WriteGltf Doc file [-trsfFormat {compact|TRS|mat4}]=compact" - "\n\t\t: [-systemCoordSys {Zup|Yup}]=Zup" - "\n\t\t: [-comments Text] [-author Name]" - "\n\t\t: [-forceUVExport]=0 [-texturesSeparate]=0 [-mergeFaces]=0 [-splitIndices16]=0" - "\n\t\t: [-nodeNameFormat {empty|product|instance|instOrProd|prodOrInst|prodAndInst|verbose}]=instOrProd" - "\n\t\t: [-meshNameFormat {empty|product|instance|instOrProd|prodOrInst|prodAndInst|verbose}]=product" - "\n\t\t: Write XDE document into glTF file." - "\n\t\t: -trsfFormat preferred transformation format" - "\n\t\t: -systemCoordSys system coordinate system; Zup when not specified" - "\n\t\t: -mergeFaces merge Faces within the same Mesh" - "\n\t\t: -splitIndices16 split Faces to keep 16-bit indices when -mergeFaces is enabled" - "\n\t\t: -forceUVExport always export UV coordinates" - "\n\t\t: -texturesSeparate write textures to separate files" - "\n\t\t: -nodeNameFormat name format for Nodes" - "\n\t\t: -meshNameFormat name format for Meshes", + "\n\t\t: [-systemCoordSys {Zup|Yup}]=Zup" + "\n\t\t: [-comments Text] [-author Name]" + "\n\t\t: [-forceUVExport]=0 [-texturesSeparate]=0 [-mergeFaces]=0 [-splitIndices16]=0" + "\n\t\t: [-nodeNameFormat {empty|product|instance|instOrProd|prodOrInst|prodAndInst|verbose}]=instOrProd" + "\n\t\t: [-meshNameFormat {empty|product|instance|instOrProd|prodOrInst|prodAndInst|verbose}]=product" + "\n\t\t: [-draco]=0 [-compressionLevel {0-10}]=7 [-quantizePositionBits Value]=14 [-quantizeNormalBits Value]=10" + "\n\t\t: [-quantizeTexcoordBits Value]=12 [-quantizeColorBits Value]=8 [-quantizeGenericBits Value]=12" + "\n\t\t: [-unifiedQuantization]=0" + "\n\t\t: Write XDE document into glTF file." + "\n\t\t: -trsfFormat preferred transformation format" + "\n\t\t: -systemCoordSys system coordinate system; Zup when not specified" + "\n\t\t: -mergeFaces merge Faces within the same Mesh" + "\n\t\t: -splitIndices16 split Faces to keep 16-bit indices when -mergeFaces is enabled" + "\n\t\t: -forceUVExport always export UV coordinates" + "\n\t\t: -texturesSeparate write textures to separate files" + "\n\t\t: -nodeNameFormat name format for Nodes" + "\n\t\t: -meshNameFormat name format for Meshes" + "\n\t\t: -draco use Draco compression 3D geometric meshes" + "\n\t\t: -compressionLevel draco compression level [0-10] (by default 7), a value of 0 will apply sequential encoding and preserve face order" + "\n\t\t: -quantizePositionBits quantization bits for position attribute when using Draco compression (by default 14)" + "\n\t\t: -quantizeNormalBits quantization bits for normal attribute when using Draco compression (by default 10)" + "\n\t\t: -quantizeTexcoordBits quantization bits for texture coordinate attribute when using Draco compression (by default 12)" + "\n\t\t: -quantizeColorBits quantization bits for color attribute when using Draco compression (by default 8)" + "\n\t\t: -quantizeGenericBits quantization bits for skinning attribute (joint indices and joint weights)" + "\n and custom attributes when using Draco compression (by default 12)" + "\n\t\t: -unifiedQuantization quantization is applied on each primitive separately if this option is false", __FILE__, WriteGltf, g); theCommands.Add ("writegltf", "writegltf shape file", diff --git a/tests/de_mesh/gltf_write/010 b/tests/de_mesh/gltf_write/010 new file mode 100644 index 0000000000..b9b5d1be71 --- /dev/null +++ b/tests/de_mesh/gltf_write/010 @@ -0,0 +1,16 @@ +puts "========" +puts "0032867: Data Exchange - Implement Draco compression for writing glTF" +puts "Test case exporting model into glb (binary glTF) file." +puts "========" + +Close D0 -silent +ReadGltf D0 [locate_data_file bug32867_010.glb] + +set aGltfFile1 "${imagedir}/${casename}_tmp1.glb" +set aGltfFile2 "${imagedir}/${casename}_tmp2.glb" + +WriteGltf D0 "$aGltfFile1" -draco on -mergefaces +WriteGltf D0 "$aGltfFile2" -draco on + +ReadGltf D1 "$aGltfFile1" +ReadGltf D "$aGltfFile2" diff --git a/tests/de_mesh/gltf_write/Diamond b/tests/de_mesh/gltf_write/Diamond new file mode 100644 index 0000000000..f020c335eb --- /dev/null +++ b/tests/de_mesh/gltf_write/Diamond @@ -0,0 +1,16 @@ +puts "========" +puts "0032867: Data Exchange - Implement Draco compression for writing glTF" +puts "Test case exporting model into glb (binary glTF) file." +puts "========" + +Close D0 -silent +ReadGltf D0 [locate_data_file bug32867_Diamond.glb] + +set aGltfFile1 "${imagedir}/${casename}_tmp1.glb" +set aGltfFile2 "${imagedir}/${casename}_tmp2.glb" + +WriteGltf D0 "$aGltfFile1" -draco on +WriteGltf D0 "$aGltfFile2" -draco on -mergefaces + +ReadGltf D1 "$aGltfFile1" +ReadGltf D "$aGltfFile2" diff --git a/tests/de_mesh/gltf_write/as1draco b/tests/de_mesh/gltf_write/as1draco new file mode 100644 index 0000000000..f07a25a3c9 --- /dev/null +++ b/tests/de_mesh/gltf_write/as1draco @@ -0,0 +1,18 @@ +puts "========" +puts "0032867: Data Exchange - Implement Draco compression for writing glTF" +puts "Test case exporting model into glb (binary glTF) file." +puts "========" + +Close D0 -silent +ReadStep D0 [locate_data_file as1-oc-214-mat.stp] +XGetOneShape ss D0 +incmesh ss 1.0 + +set aGltfFile1 "${imagedir}/${casename}_tmp1.glb" +set aGltfFile2 "${imagedir}/${casename}_tmp2.glb" + +WriteGltf D0 "$aGltfFile1" -draco on +WriteGltf D0 "$aGltfFile2" -draco on -mergefaces + +ReadGltf D1 "$aGltfFile1" +ReadGltf D "$aGltfFile2" diff --git a/tests/de_mesh/gltf_write/bearing b/tests/de_mesh/gltf_write/bearing new file mode 100644 index 0000000000..46d8ae6d15 --- /dev/null +++ b/tests/de_mesh/gltf_write/bearing @@ -0,0 +1,16 @@ +puts "========" +puts "0032867: Data Exchange - Implement Draco compression for writing glTF" +puts "Test case exporting model into glb (binary glTF) file." +puts "========" + +restore [locate_data_file bearing.brep] b +incmesh b 0.1 + +set aGltfFile1 "${imagedir}/${casename}_tmp1.glb" +set aGltfFile2 "${imagedir}/${casename}_tmp2.glb" + +WriteGltf b "$aGltfFile1" -draco on +WriteGltf b "$aGltfFile2" -draco on -mergefaces + +ReadGltf D0 "$aGltfFile1" +ReadGltf D "$aGltfFile2" diff --git a/tests/de_mesh/gltf_write/bull b/tests/de_mesh/gltf_write/bull new file mode 100644 index 0000000000..5d7de77f3c --- /dev/null +++ b/tests/de_mesh/gltf_write/bull @@ -0,0 +1,16 @@ +puts "========" +puts "0032867: Data Exchange - Implement Draco compression for writing glTF" +puts "Test case exporting model into glb (binary glTF) file." +puts "========" + +Close D0 -silent +ReadGltf D0 [locate_data_file bug32867_bull.glb] + +set aGltfFile1 "${imagedir}/${casename}_tmp1.glb" +set aGltfFile2 "${imagedir}/${casename}_tmp2.glb" + +WriteGltf D0 "$aGltfFile1" -draco on +WriteGltf D0 "$aGltfFile2" -draco on -mergefaces + +ReadGltf D1 "$aGltfFile1" +ReadGltf D "$aGltfFile2" diff --git a/tests/de_mesh/gltf_write/screw b/tests/de_mesh/gltf_write/screw new file mode 100644 index 0000000000..fa7bee51c8 --- /dev/null +++ b/tests/de_mesh/gltf_write/screw @@ -0,0 +1,18 @@ +puts "========" +puts "0032867: Data Exchange - Implement Draco compression for writing glTF" +puts "Test case exporting model into glb (binary glTF) file." +puts "========" + +Close D0 -silent +ReadStep D0 [locate_data_file screw.step] +XGetOneShape ss D0 +incmesh ss 1.0 + +set aGltfFile1 "${imagedir}/${casename}_tmp1.glb" +set aGltfFile2 "${imagedir}/${casename}_tmp2.glb" + +WriteGltf D0 "$aGltfFile1" -draco on -mergefaces +WriteGltf D0 "$aGltfFile2" -draco on + +ReadGltf D1 "$aGltfFile1" +ReadGltf D "$aGltfFile2" \ No newline at end of file diff --git a/tests/de_mesh/gltf_write/soapbox b/tests/de_mesh/gltf_write/soapbox new file mode 100644 index 0000000000..2ec1901886 --- /dev/null +++ b/tests/de_mesh/gltf_write/soapbox @@ -0,0 +1,17 @@ +puts "========" +puts "0032867: Data Exchange - Implement Draco compression for writing glTF" +puts "Test case exporting model into glb (binary glTF) file." +puts "========" + +ReadStep D0 [locate_data_file ec_soapbox-A.stp] +XGetOneShape ss D0 +incmesh ss 1.0 + +set aGltfFile1 "${imagedir}/${casename}_tmp1.glb" +set aGltfFile2 "${imagedir}/${casename}_tmp2.glb" + +WriteGltf D0 "$aGltfFile1" -draco on +WriteGltf D0 "$aGltfFile2" -draco on -mergefaces + +ReadGltf D1 "$aGltfFile1" +ReadGltf D "$aGltfFile2" \ No newline at end of file diff --git a/tests/de_mesh/gltf_write/test b/tests/de_mesh/gltf_write/test new file mode 100644 index 0000000000..708cfe088e --- /dev/null +++ b/tests/de_mesh/gltf_write/test @@ -0,0 +1,20 @@ +puts "========" +puts "0032867: Data Exchange - Implement Draco compression for writing glTF" +puts "Test case exporting model into glb (binary glTF) file." +puts "========" + +Close D0 -silent +ReadGltf D0 [locate_data_file bug32867_test.glb] + +set aGltfFile1 "${imagedir}/${casename}_tmp1.glb" +set aGltfFile2 "${imagedir}/${casename}_tmp2.glb" + +WriteGltf D0 "$aGltfFile1" -draco on +WriteGltf D0 "$aGltfFile2" -draco on -mergefaces + +ReadGltf D1 "$aGltfFile1" +XGetOneShape s1 D1 +checktrinfo s1 -tri 9366 +ReadGltf D "$aGltfFile2" +XGetOneShape s2 D +checktrinfo s2 -tri 9366 From c2eed2a326269c7e901fae0c0dae8e78f1f4ca54 Mon Sep 17 00:00:00 2001 From: aml Date: Mon, 4 Jul 2022 12:41:15 +0300 Subject: [PATCH 330/639] 0033048: Foundation Classes - math_ComputeKronrodPointsAndWeights indexation goes beyond the limit Add test and explanatory comment. --- src/QABugs/QABugs_20.cxx | 27 +++++++++++++++++++ .../math_ComputeKronrodPointsAndWeights.cxx | 5 +++- tests/bugs/fclasses/bug33048 | 9 +++++++ 3 files changed, 40 insertions(+), 1 deletion(-) create mode 100644 tests/bugs/fclasses/bug33048 diff --git a/src/QABugs/QABugs_20.cxx b/src/QABugs/QABugs_20.cxx index a70b333fdf..8a5443f139 100644 --- a/src/QABugs/QABugs_20.cxx +++ b/src/QABugs/QABugs_20.cxx @@ -65,6 +65,7 @@ #include #include #include +#include #include @@ -4261,6 +4262,28 @@ static Standard_Integer OCC33009(Draw_Interpretor&, Standard_Integer, const char return 0; } +static Standard_Integer OCC33048(Draw_Interpretor&, Standard_Integer, const char**) +{ + Standard_Real isOK = true; + try + { + // This method uses raw pointers for memory manipulations and not used in OCCT. + math_ComputeKronrodPointsAndWeights aCalc(125); + isOK = aCalc.IsDone(); + } + catch (...) + { + isOK = false; + } + + if (isOK) + std::cout << "OK: Kronrod points and weights are calculated successfully." << std::endl; + else + std::cout << "Error: Problem occurred during calculation of Kronrod points and weights." << std::endl; + + return 0; +} + //======================================================================= //function : QACheckBends //purpose : @@ -4435,6 +4458,10 @@ void QABugs::Commands_20(Draw_Interpretor& theCommands) { "Tests the case when", __FILE__, OCC33009, group); + theCommands.Add("OCC33048", + "Kronrod points and weights calculation", + __FILE__, OCC33048, group); + theCommands.Add("QACheckBends", "QACheckBends curve [CosMaxAngle [theNbPoints]]", __FILE__, diff --git a/src/math/math_ComputeKronrodPointsAndWeights.cxx b/src/math/math_ComputeKronrodPointsAndWeights.cxx index d8e1188e6d..339dc85f94 100644 --- a/src/math/math_ComputeKronrodPointsAndWeights.cxx +++ b/src/math/math_ComputeKronrodPointsAndWeights.cxx @@ -54,7 +54,10 @@ math_ComputeKronrodPointsAndWeights::math_ComputeKronrodPointsAndWeights(const S aSubDiag(i) = 0.; } - // Initialization of temporary data structures. + // Algorithm calculates weights and points symmetrically and uses -1 index + // by design. Memory corruption is avoided by moving pointer `s` to the + // next element and saving original pointer into `ss` for the proper memory + // releasing. Similarly, `t` and `tt` are addressed. Standard_Integer aNd2 = Number/2; Standard_Real *s = new Standard_Real[aNd2 + 2]; Standard_Real *t = new Standard_Real[aNd2 + 2]; diff --git a/tests/bugs/fclasses/bug33048 b/tests/bugs/fclasses/bug33048 new file mode 100644 index 0000000000..d47f4c990e --- /dev/null +++ b/tests/bugs/fclasses/bug33048 @@ -0,0 +1,9 @@ +puts "============" +puts "0033048: Foundation Classes - math_ComputeKronrodPointsAndWeights indexation go beyond the limit" +puts "============" +puts "" + +cpulimit 30 + +pload QAcommands +OCC33048 From dee5eb82b5ba746070e144250bd1363f630dedfa Mon Sep 17 00:00:00 2001 From: kgv Date: Wed, 6 Jul 2022 21:32:46 +0300 Subject: [PATCH 331/639] 0033054: Configuration - link errors due to missing references to new TKXDE toolkit src/OS/DataExchange.tcl - added missing new toolkits. TKRWMesh - added missing reference to TKTopAlgo (for using BRepLib_PointCloudShape). Removed redundant dependency from TKBinXCAF. DRAWEXE - added missing references for a static build. THE_CONFIGURATION_SCOPE definition has been corrected to postpoine calling constructor till the first variable usage. Fixed compiler warning at SelectMgr_Frustum<3>::DumpJson() due to misleading Standard_EXPORT for an inline template method definition. --- src/DE/DE_Wrapper.cxx | 17 ++++++++++++----- .../DEBRepCascade_ConfigurationNode.cxx | 13 ++++++++++--- .../DEXCAFCascade_ConfigurationNode.cxx | 13 ++++++++++--- src/DRAWEXE/EXTERNLIB_STATIC | 5 +++++ .../IGESCAFControl_ConfigurationNode.cxx | 13 ++++++++++--- src/OS/DataExchange.tcl | 8 +++++--- src/RWGltf/RWGltf_ConfigurationNode.cxx | 13 ++++++++++--- src/RWObj/RWObj_ConfigurationNode.cxx | 13 ++++++++++--- src/RWStl/RWStl_ConfigurationNode.cxx | 13 ++++++++++--- .../STEPCAFControl_ConfigurationNode.cxx | 13 ++++++++++--- src/SelectMgr/SelectMgr_Frustum.hxx | 2 +- src/TKRWMesh/EXTERNLIB | 2 +- src/TKSTL/EXTERNLIB | 1 - src/TKVRML/EXTERNLIB | 1 - src/TKXDECascade/EXTERNLIB | 5 +++++ src/TKXDEIGES/EXTERNLIB | 1 - src/TKXDESTEP/EXTERNLIB | 1 - src/Vrml/Vrml_ConfigurationNode.cxx | 13 ++++++++++--- 18 files changed, 109 insertions(+), 38 deletions(-) diff --git a/src/DE/DE_Wrapper.cxx b/src/DE/DE_Wrapper.cxx index ca4ef5b6b9..c9f5b06517 100644 --- a/src/DE/DE_Wrapper.cxx +++ b/src/DE/DE_Wrapper.cxx @@ -27,7 +27,14 @@ IMPLEMENT_STANDARD_RTTIEXT(DE_Wrapper, Standard_Transient) -static const TCollection_AsciiString THE_CONFIGURATION_SCOPE = "global"; +namespace +{ + static const TCollection_AsciiString& THE_CONFIGURATION_SCOPE() + { + static const TCollection_AsciiString aScope ("global"); + return aScope; + } +} //======================================================================= // function : DE_Wrapper @@ -253,7 +260,7 @@ Standard_Boolean DE_Wrapper::Load(const TCollection_AsciiString& theResource, Standard_Boolean DE_Wrapper::Load(const Handle(DE_ConfigurationContext)& theResource, const Standard_Boolean theIsRecursive) { - GlobalParameters.LengthUnit = theResource->RealVal("general.length.unit", GlobalParameters.LengthUnit, THE_CONFIGURATION_SCOPE); + GlobalParameters.LengthUnit = theResource->RealVal("general.length.unit", GlobalParameters.LengthUnit, THE_CONFIGURATION_SCOPE()); if (theIsRecursive) { for (DE_ConfigurationFormatMap::Iterator aFormatIter(myConfiguration); @@ -326,7 +333,7 @@ TCollection_AsciiString DE_Wrapper::Save(const Standard_Boolean theIsRecursive, aFormatIter.More(); aFormatIter.Next()) { const TCollection_AsciiString& aFormat = aFormatIter.Key(); - aResult += THE_CONFIGURATION_SCOPE + '.' + "priority" + '.' + aFormat + " :\t "; + aResult += THE_CONFIGURATION_SCOPE() + '.' + "priority" + '.' + aFormat + " :\t "; for (DE_ConfigurationVendorMap::Iterator aVendorIter(aFormatIter.Value()); aVendorIter.More(); aVendorIter.Next()) { @@ -337,7 +344,7 @@ TCollection_AsciiString DE_Wrapper::Save(const Standard_Boolean theIsRecursive, } aResult += "!Global parameters. Used for all providers\n"; aResult += "!Length scale unit value. Should be more the 0. Default value: 1.0(MM)\n"; - aResult += THE_CONFIGURATION_SCOPE + ".general.length.unit :\t " + GlobalParameters.LengthUnit + "\n"; + aResult += THE_CONFIGURATION_SCOPE() + ".general.length.unit :\t " + GlobalParameters.LengthUnit + "\n"; if (theIsRecursive) { for (DE_ConfigurationFormatMap::Iterator aFormatIter(myConfiguration); @@ -525,7 +532,7 @@ Standard_Boolean DE_Wrapper::findProvider(const TCollection_AsciiString& thePath //======================================================================= void DE_Wrapper::sort(const Handle(DE_ConfigurationContext)& theResource) { - const TCollection_AsciiString aScope(THE_CONFIGURATION_SCOPE + '.' + "priority"); + const TCollection_AsciiString aScope(THE_CONFIGURATION_SCOPE() + '.' + "priority"); NCollection_List aVendors; for (DE_ConfigurationFormatMap::Iterator aFormatIter(myConfiguration); aFormatIter.More(); aFormatIter.Next()) diff --git a/src/DEBRepCascade/DEBRepCascade_ConfigurationNode.cxx b/src/DEBRepCascade/DEBRepCascade_ConfigurationNode.cxx index 69856fd661..6a5234c1d3 100644 --- a/src/DEBRepCascade/DEBRepCascade_ConfigurationNode.cxx +++ b/src/DEBRepCascade/DEBRepCascade_ConfigurationNode.cxx @@ -19,7 +19,14 @@ IMPLEMENT_STANDARD_RTTIEXT(DEBRepCascade_ConfigurationNode, DE_ConfigurationNode) -static const TCollection_AsciiString THE_CONFIGURATION_SCOPE = "provider"; +namespace +{ + static const TCollection_AsciiString& THE_CONFIGURATION_SCOPE() + { + static const TCollection_AsciiString aScope = "provider"; + return aScope; + } +} //======================================================================= // function : DEBRepCascade_ConfigurationNode @@ -48,7 +55,7 @@ DEBRepCascade_ConfigurationNode::DEBRepCascade_ConfigurationNode(const Handle(DE //======================================================================= bool DEBRepCascade_ConfigurationNode::Load(const Handle(DE_ConfigurationContext)& theResource) { - TCollection_AsciiString aScope = THE_CONFIGURATION_SCOPE + "." + GetFormat() + "." + GetVendor(); + TCollection_AsciiString aScope = THE_CONFIGURATION_SCOPE() + "." + GetFormat() + "." + GetVendor(); InternalParameters.WriteBinary = theResource->BooleanVal("write.binary", InternalParameters.WriteBinary, aScope); @@ -72,7 +79,7 @@ TCollection_AsciiString DEBRepCascade_ConfigurationNode::Save() const TCollection_AsciiString aResult; aResult += "!*****************************************************************************\n"; aResult = aResult + "!Configuration Node " + " Vendor: " + GetVendor() + " Format: " + GetFormat() + "\n"; - TCollection_AsciiString aScope = THE_CONFIGURATION_SCOPE + "." + GetFormat() + "." + GetVendor() + "."; + TCollection_AsciiString aScope = THE_CONFIGURATION_SCOPE() + "." + GetFormat() + "." + GetVendor() + "."; aResult += "!\n"; aResult += "!Write parameters:\n"; diff --git a/src/DEXCAFCascade/DEXCAFCascade_ConfigurationNode.cxx b/src/DEXCAFCascade/DEXCAFCascade_ConfigurationNode.cxx index 98edcd1388..e666a3c188 100644 --- a/src/DEXCAFCascade/DEXCAFCascade_ConfigurationNode.cxx +++ b/src/DEXCAFCascade/DEXCAFCascade_ConfigurationNode.cxx @@ -19,7 +19,14 @@ IMPLEMENT_STANDARD_RTTIEXT(DEXCAFCascade_ConfigurationNode, DE_ConfigurationNode) -static const TCollection_AsciiString THE_CONFIGURATION_SCOPE = "provider"; +namespace +{ + static const TCollection_AsciiString& THE_CONFIGURATION_SCOPE() + { + static const TCollection_AsciiString aScope = "provider"; + return aScope; + } +} //======================================================================= // function : DEXCAFCascade_ConfigurationNode @@ -48,7 +55,7 @@ DEXCAFCascade_ConfigurationNode::DEXCAFCascade_ConfigurationNode(const Handle(DE //======================================================================= bool DEXCAFCascade_ConfigurationNode::Load(const Handle(DE_ConfigurationContext)& theResource) { - TCollection_AsciiString aScope = THE_CONFIGURATION_SCOPE + "." + GetFormat() + "." + GetVendor(); + TCollection_AsciiString aScope = THE_CONFIGURATION_SCOPE() + "." + GetFormat() + "." + GetVendor(); InternalParameters.ReadAppendMode = (PCDM_ReaderFilter::AppendMode) theResource->IntegerVal("read.append.mode", InternalParameters.ReadAppendMode, aScope); @@ -67,7 +74,7 @@ TCollection_AsciiString DEXCAFCascade_ConfigurationNode::Save() const TCollection_AsciiString aResult; aResult += "!*****************************************************************************\n"; aResult = aResult + "!Configuration Node " + " Vendor: " + GetVendor() + " Format: " + GetFormat() + "\n"; - TCollection_AsciiString aScope = THE_CONFIGURATION_SCOPE + "." + GetFormat() + "." + GetVendor() + "."; + TCollection_AsciiString aScope = THE_CONFIGURATION_SCOPE() + "." + GetFormat() + "." + GetVendor() + "."; aResult += "!\n"; aResult += "!Read parameters:\n"; diff --git a/src/DRAWEXE/EXTERNLIB_STATIC b/src/DRAWEXE/EXTERNLIB_STATIC index f99e4d4449..ca4c8fa4ee 100644 --- a/src/DRAWEXE/EXTERNLIB_STATIC +++ b/src/DRAWEXE/EXTERNLIB_STATIC @@ -7,6 +7,10 @@ TKOpenGlesTest TKViewerTest TKDraw TKMeshVS +TKXDECascade +TKTObj +TKBinTObj +TKXmlTObj TKXDESTEP TKSTEP TKSTEPAttr @@ -18,6 +22,7 @@ TKXSBase TKVRML TKSTL TKRWMesh +TKXDE TKBinXCAF TKXmlXCAF TKBin diff --git a/src/IGESCAFControl/IGESCAFControl_ConfigurationNode.cxx b/src/IGESCAFControl/IGESCAFControl_ConfigurationNode.cxx index 59a02de833..51956d9db6 100644 --- a/src/IGESCAFControl/IGESCAFControl_ConfigurationNode.cxx +++ b/src/IGESCAFControl/IGESCAFControl_ConfigurationNode.cxx @@ -19,7 +19,14 @@ IMPLEMENT_STANDARD_RTTIEXT(IGESCAFControl_ConfigurationNode, DE_ConfigurationNode) -static const TCollection_AsciiString THE_CONFIGURATION_SCOPE = "provider"; +namespace +{ + static const TCollection_AsciiString& THE_CONFIGURATION_SCOPE() + { + static const TCollection_AsciiString aScope = "provider"; + return aScope; + } +} //======================================================================= // function : IGESCAFControl_ConfigurationNode @@ -48,7 +55,7 @@ IGESCAFControl_ConfigurationNode::IGESCAFControl_ConfigurationNode(const Handle( //======================================================================= bool IGESCAFControl_ConfigurationNode::Load(const Handle(DE_ConfigurationContext)& theResource) { - TCollection_AsciiString aScope = THE_CONFIGURATION_SCOPE + "." + GetFormat() + "." + GetVendor(); + TCollection_AsciiString aScope = THE_CONFIGURATION_SCOPE() + "." + GetFormat() + "." + GetVendor(); InternalParameters.ReadBSplineContinuity = (ReadMode_BSplineContinuity) theResource->IntegerVal("read.iges.bspline.continuity", InternalParameters.ReadBSplineContinuity, aScope); @@ -129,7 +136,7 @@ TCollection_AsciiString IGESCAFControl_ConfigurationNode::Save() const TCollection_AsciiString aResult; aResult += "!*****************************************************************************\n"; aResult = aResult + "!Configuration Node " + " Vendor: " + GetVendor() + " Format: " + GetFormat() + "\n"; - TCollection_AsciiString aScope = THE_CONFIGURATION_SCOPE + "." + GetFormat() + "." + GetVendor() + "."; + TCollection_AsciiString aScope = THE_CONFIGURATION_SCOPE() + "." + GetFormat() + "." + GetVendor() + "."; aResult += "!\n"; aResult += "!Common parameters:\n"; diff --git a/src/OS/DataExchange.tcl b/src/OS/DataExchange.tcl index 25c823990c..3f3b5badc7 100644 --- a/src/OS/DataExchange.tcl +++ b/src/OS/DataExchange.tcl @@ -15,10 +15,12 @@ ;# Liste des toolkits WOK sous forme de full path ;# proc DataExchange:toolkits { } { - return [list TKXSBase TKSTEPBase TKSTEPAttr TKSTEP209 TKSTEP TKIGES \ - TKXCAF TKXDEIGES TKXDESTEP \ - TKSTL TKVRML TKXmlXCAF TKBinXCAF TKRWMesh] + return [list TKXSBase TKSTEPBase TKSTEPAttr TKSTEP209 TKSTEP TKIGES \ + TKXCAF TKXDEIGES TKXDESTEP \ + TKXDE TKXDECascade \ + TKSTL TKVRML TKXmlXCAF TKBinXCAF TKRWMesh] } + ;# ;# Autres UDs a prendre. ;# diff --git a/src/RWGltf/RWGltf_ConfigurationNode.cxx b/src/RWGltf/RWGltf_ConfigurationNode.cxx index 65d85e4d84..ad42b0c958 100644 --- a/src/RWGltf/RWGltf_ConfigurationNode.cxx +++ b/src/RWGltf/RWGltf_ConfigurationNode.cxx @@ -18,7 +18,14 @@ IMPLEMENT_STANDARD_RTTIEXT(RWGltf_ConfigurationNode, DE_ConfigurationNode) -static const TCollection_AsciiString THE_CONFIGURATION_SCOPE = "provider"; +namespace +{ + static const TCollection_AsciiString& THE_CONFIGURATION_SCOPE() + { + static const TCollection_AsciiString aScope = "provider"; + return aScope; + } +} //======================================================================= // function : RWGltf_ConfigurationNode @@ -47,7 +54,7 @@ RWGltf_ConfigurationNode::RWGltf_ConfigurationNode(const Handle(RWGltf_Configura //======================================================================= bool RWGltf_ConfigurationNode::Load(const Handle(DE_ConfigurationContext)& theResource) { - TCollection_AsciiString aScope = THE_CONFIGURATION_SCOPE + "." + GetFormat() + "." + GetVendor(); + TCollection_AsciiString aScope = THE_CONFIGURATION_SCOPE() + "." + GetFormat() + "." + GetVendor(); InternalParameters.FileLengthUnit = theResource->RealVal("file.length.unit", InternalParameters.FileLengthUnit, aScope); @@ -114,7 +121,7 @@ TCollection_AsciiString RWGltf_ConfigurationNode::Save() const TCollection_AsciiString aResult; aResult += "!*****************************************************************************\n"; aResult = aResult + "!Configuration Node " + " Vendor: " + GetVendor() + " Format: " + GetFormat() + "\n"; - TCollection_AsciiString aScope = THE_CONFIGURATION_SCOPE + "." + GetFormat() + "." + GetVendor() + "."; + TCollection_AsciiString aScope = THE_CONFIGURATION_SCOPE() + "." + GetFormat() + "." + GetVendor() + "."; aResult += "!\n"; aResult += "!Common parameters:\n"; diff --git a/src/RWObj/RWObj_ConfigurationNode.cxx b/src/RWObj/RWObj_ConfigurationNode.cxx index 5295802b3b..f860d800cf 100644 --- a/src/RWObj/RWObj_ConfigurationNode.cxx +++ b/src/RWObj/RWObj_ConfigurationNode.cxx @@ -18,7 +18,14 @@ IMPLEMENT_STANDARD_RTTIEXT(RWObj_ConfigurationNode, DE_ConfigurationNode) -static const TCollection_AsciiString THE_CONFIGURATION_SCOPE = "provider"; +namespace +{ + static const TCollection_AsciiString& THE_CONFIGURATION_SCOPE() + { + static const TCollection_AsciiString aScope = "provider"; + return aScope; + } +} //======================================================================= // function : RWObj_ConfigurationNode @@ -47,7 +54,7 @@ RWObj_ConfigurationNode::RWObj_ConfigurationNode(const Handle(RWObj_Configuratio //======================================================================= bool RWObj_ConfigurationNode::Load(const Handle(DE_ConfigurationContext)& theResource) { - TCollection_AsciiString aScope = THE_CONFIGURATION_SCOPE + "." + GetFormat() + "." + GetVendor(); + TCollection_AsciiString aScope = THE_CONFIGURATION_SCOPE() + "." + GetFormat() + "." + GetVendor(); InternalParameters.FileLengthUnit = theResource->RealVal("file.length.unit", InternalParameters.FileLengthUnit, aScope); InternalParameters.SystemCS = (RWMesh_CoordinateSystem) @@ -84,7 +91,7 @@ TCollection_AsciiString RWObj_ConfigurationNode::Save() const TCollection_AsciiString aResult; aResult += "!*****************************************************************************\n"; aResult = aResult + "!Configuration Node " + " Vendor: " + GetVendor() + " Format: " + GetFormat() + "\n"; - TCollection_AsciiString aScope = THE_CONFIGURATION_SCOPE + "." + GetFormat() + "." + GetVendor() + "."; + TCollection_AsciiString aScope = THE_CONFIGURATION_SCOPE() + "." + GetFormat() + "." + GetVendor() + "."; aResult += "!\n"; aResult += "!Common parameters:\n"; diff --git a/src/RWStl/RWStl_ConfigurationNode.cxx b/src/RWStl/RWStl_ConfigurationNode.cxx index 7afe7cded2..edc4c13aad 100644 --- a/src/RWStl/RWStl_ConfigurationNode.cxx +++ b/src/RWStl/RWStl_ConfigurationNode.cxx @@ -19,7 +19,14 @@ IMPLEMENT_STANDARD_RTTIEXT(RWStl_ConfigurationNode, DE_ConfigurationNode) -static const TCollection_AsciiString THE_CONFIGURATION_SCOPE = "provider"; +namespace +{ + static const TCollection_AsciiString& THE_CONFIGURATION_SCOPE() + { + static const TCollection_AsciiString aScope = "provider"; + return aScope; + } +} //======================================================================= // function : STEPCAFControl_ConfigurationNode @@ -48,7 +55,7 @@ RWStl_ConfigurationNode::RWStl_ConfigurationNode(const Handle(RWStl_Configuratio //======================================================================= bool RWStl_ConfigurationNode::Load(const Handle(DE_ConfigurationContext)& theResource) { - TCollection_AsciiString aScope = THE_CONFIGURATION_SCOPE + "." + GetFormat() + "." + GetVendor(); + TCollection_AsciiString aScope = THE_CONFIGURATION_SCOPE() + "." + GetFormat() + "." + GetVendor(); InternalParameters.ReadMergeAngle = theResource->RealVal("read.merge.angle", InternalParameters.ReadMergeAngle, aScope); @@ -68,7 +75,7 @@ TCollection_AsciiString RWStl_ConfigurationNode::Save() const TCollection_AsciiString aResult; aResult += "!*****************************************************************************\n"; aResult = aResult + "!Configuration Node " + " Vendor: " + GetVendor() + " Format: " + GetFormat() + "\n"; - TCollection_AsciiString aScope = THE_CONFIGURATION_SCOPE + "." + GetFormat() + "." + GetVendor() + "."; + TCollection_AsciiString aScope = THE_CONFIGURATION_SCOPE() + "." + GetFormat() + "." + GetVendor() + "."; aResult += "!\n"; aResult += "!Read parameters:\n"; diff --git a/src/STEPCAFControl/STEPCAFControl_ConfigurationNode.cxx b/src/STEPCAFControl/STEPCAFControl_ConfigurationNode.cxx index 42042d88ea..5405ec67bd 100644 --- a/src/STEPCAFControl/STEPCAFControl_ConfigurationNode.cxx +++ b/src/STEPCAFControl/STEPCAFControl_ConfigurationNode.cxx @@ -19,7 +19,14 @@ IMPLEMENT_STANDARD_RTTIEXT(STEPCAFControl_ConfigurationNode, DE_ConfigurationNode) -static const TCollection_AsciiString THE_CONFIGURATION_SCOPE = "provider"; +namespace +{ + static const TCollection_AsciiString& THE_CONFIGURATION_SCOPE() + { + static const TCollection_AsciiString aScope = "provider"; + return aScope; + } +} //======================================================================= // function : STEPCAFControl_ConfigurationNode @@ -48,7 +55,7 @@ STEPCAFControl_ConfigurationNode::STEPCAFControl_ConfigurationNode(const Handle( //======================================================================= bool STEPCAFControl_ConfigurationNode::Load(const Handle(DE_ConfigurationContext)& theResource) { - TCollection_AsciiString aScope = THE_CONFIGURATION_SCOPE + "." + GetFormat() + "." + GetVendor(); + TCollection_AsciiString aScope = THE_CONFIGURATION_SCOPE() + "." + GetFormat() + "." + GetVendor(); InternalParameters.ReadBSplineContinuity = (ReadMode_BSplineContinuity) theResource->IntegerVal("read.iges.bspline.continuity", InternalParameters.ReadBSplineContinuity, aScope); @@ -157,7 +164,7 @@ TCollection_AsciiString STEPCAFControl_ConfigurationNode::Save() const TCollection_AsciiString aResult; aResult += "!*****************************************************************************\n"; aResult = aResult + "!Configuration Node " + " Vendor: " + GetVendor() + " Format: " + GetFormat() + "\n"; - TCollection_AsciiString aScope = THE_CONFIGURATION_SCOPE + "." + GetFormat() + "." + GetVendor() + "."; + TCollection_AsciiString aScope = THE_CONFIGURATION_SCOPE() + "." + GetFormat() + "." + GetVendor() + "."; aResult += "!\n"; aResult += "!Common parameters:\n"; diff --git a/src/SelectMgr/SelectMgr_Frustum.hxx b/src/SelectMgr/SelectMgr_Frustum.hxx index 6299db613b..35f2147808 100644 --- a/src/SelectMgr/SelectMgr_Frustum.hxx +++ b/src/SelectMgr/SelectMgr_Frustum.hxx @@ -59,7 +59,7 @@ public: } //! Dumps the content of me into the stream - Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const Standard_OVERRIDE; + inline virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const Standard_OVERRIDE; protected: diff --git a/src/TKRWMesh/EXTERNLIB b/src/TKRWMesh/EXTERNLIB index 3807a923bc..23b9a92984 100644 --- a/src/TKRWMesh/EXTERNLIB +++ b/src/TKRWMesh/EXTERNLIB @@ -1,4 +1,3 @@ -TKBinXCAF TKernel TKMath TKMesh @@ -7,6 +6,7 @@ TKLCAF TKV3d TKBRep TKG3d +TKTopAlgo TKXDE TKService CSF_RapidJSON diff --git a/src/TKSTL/EXTERNLIB b/src/TKSTL/EXTERNLIB index d1d1380f02..8a5b1c21d1 100755 --- a/src/TKSTL/EXTERNLIB +++ b/src/TKSTL/EXTERNLIB @@ -1,4 +1,3 @@ -TKBinXCAF TKXDE TKernel TKMath diff --git a/src/TKVRML/EXTERNLIB b/src/TKVRML/EXTERNLIB index c2679194b5..b267b66d9d 100755 --- a/src/TKVRML/EXTERNLIB +++ b/src/TKVRML/EXTERNLIB @@ -1,4 +1,3 @@ -TKBinXCAF TKBRep TKXDE TKTopAlgo diff --git a/src/TKXDECascade/EXTERNLIB b/src/TKXDECascade/EXTERNLIB index 08343f97d7..f0c0f03911 100644 --- a/src/TKXDECascade/EXTERNLIB +++ b/src/TKXDECascade/EXTERNLIB @@ -2,6 +2,7 @@ TKBin TKBinL TKBinTObj TKBinXCAF +TKBRep TKStd TKXml TKXmlL @@ -9,4 +10,8 @@ TKXmlTObj TKXmlXCAF TKXDE TKernel +TKMath TKLCAF +TKXCAF +TKStdL +TKCDF diff --git a/src/TKXDEIGES/EXTERNLIB b/src/TKXDEIGES/EXTERNLIB index fd9f8dae93..d40184c29d 100755 --- a/src/TKXDEIGES/EXTERNLIB +++ b/src/TKXDEIGES/EXTERNLIB @@ -1,4 +1,3 @@ -TKBinXCAF TKBRep TKXDE TKernel diff --git a/src/TKXDESTEP/EXTERNLIB b/src/TKXDESTEP/EXTERNLIB index 9e3e191a18..547cb01bb2 100755 --- a/src/TKXDESTEP/EXTERNLIB +++ b/src/TKXDESTEP/EXTERNLIB @@ -1,4 +1,3 @@ -TKBinXCAF TKXDE TKBRep TKSTEPAttr diff --git a/src/Vrml/Vrml_ConfigurationNode.cxx b/src/Vrml/Vrml_ConfigurationNode.cxx index 1fafdb77fc..d04fcebc33 100644 --- a/src/Vrml/Vrml_ConfigurationNode.cxx +++ b/src/Vrml/Vrml_ConfigurationNode.cxx @@ -18,7 +18,14 @@ IMPLEMENT_STANDARD_RTTIEXT(Vrml_ConfigurationNode, DE_ConfigurationNode) -static const TCollection_AsciiString THE_CONFIGURATION_SCOPE = "provider"; +namespace +{ + static const TCollection_AsciiString& THE_CONFIGURATION_SCOPE() + { + static const TCollection_AsciiString aScope = "provider"; + return aScope; + } +} //======================================================================= // function : STEPCAFControl_ConfigurationNode @@ -47,7 +54,7 @@ Vrml_ConfigurationNode::Vrml_ConfigurationNode(const Handle(Vrml_ConfigurationNo //======================================================================= bool Vrml_ConfigurationNode::Load(const Handle(DE_ConfigurationContext)& theResource) { - TCollection_AsciiString aScope = THE_CONFIGURATION_SCOPE + "." + GetFormat() + "." + GetVendor(); + TCollection_AsciiString aScope = THE_CONFIGURATION_SCOPE() + "." + GetFormat() + "." + GetVendor(); InternalParameters.WriterVersion = (WriteMode_WriterVersion) theResource->IntegerVal("writer.version", InternalParameters.WriterVersion, aScope); @@ -66,7 +73,7 @@ TCollection_AsciiString Vrml_ConfigurationNode::Save() const TCollection_AsciiString aResult; aResult += "!*****************************************************************************\n"; aResult = aResult + "!Configuration Node " + " Vendor: " + GetVendor() + " Format: " + GetFormat() + "\n"; - TCollection_AsciiString aScope = THE_CONFIGURATION_SCOPE + "." + GetFormat() + "." + GetVendor() + "."; + TCollection_AsciiString aScope = THE_CONFIGURATION_SCOPE() + "." + GetFormat() + "." + GetVendor() + "."; aResult += "!\n"; aResult += "!Write parameters:\n"; From e1f7382910e308e08ec9a72998a987f492492b8b Mon Sep 17 00:00:00 2001 From: ifv Date: Tue, 5 Jul 2022 17:30:35 +0300 Subject: [PATCH 332/639] 0028243: Bad result of the canonical recognition LProp/LProp_CLProps.gxx - minor modification to avoid floating overflow because of multiplication of large values --- src/LProp/LProp_CLProps.gxx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/LProp/LProp_CLProps.gxx b/src/LProp/LProp_CLProps.gxx index 8afa74d53c..499bab6cda 100644 --- a/src/LProp/LProp_CLProps.gxx +++ b/src/LProp/LProp_CLProps.gxx @@ -232,14 +232,15 @@ Standard_Real LProp_CLProps::Curvature () { Standard_Real N = myDerivArr[0].CrossSquareMagnitude(myDerivArr[1]); // if d[0] and d[1] are colinear the curvature is null. - Standard_Real t = N/(DD1*DD2); + //Standard_Real t = N/(DD1*DD2); + Standard_Real t = N / DD1 / DD2; if (t<=Tol) { myCurvature = 0.0; } else { - myCurvature = sqrt(N) / (DD1*sqrt(DD1)); + myCurvature = sqrt(N) / DD1 / sqrt(DD1); } } From e1d576bf3103060320b9d8b1fdf2608ac152230e Mon Sep 17 00:00:00 2001 From: aml Date: Thu, 30 Jun 2022 11:47:41 +0300 Subject: [PATCH 333/639] 0033046: Modeling algorithms - improve performance of per-facet shape construction Add new class (BRepBuilderAPI_MakeShapeOnMesh) to reconstruct shape from triangulation on per-facet basis. --- .../BRepBuilderAPI_MakeShapeOnMesh.cxx | 247 ++++++++++++++++++ .../BRepBuilderAPI_MakeShapeOnMesh.hxx | 46 ++++ src/BRepBuilderAPI/FILES | 2 + src/StlAPI/StlAPI_Reader.cxx | 65 +---- tests/bugs/fclasses/bug23192_1 | 2 +- tests/bugs/fclasses/bug23192_2 | 2 +- tests/bugs/stlvrml/bug27622 | 4 +- tests/bugs/xde/bug22670_1 | 2 +- tests/bugs/xde/bug22670_2 | 2 +- tests/perf/de/bug33046 | 17 ++ 10 files changed, 327 insertions(+), 62 deletions(-) create mode 100644 src/BRepBuilderAPI/BRepBuilderAPI_MakeShapeOnMesh.cxx create mode 100644 src/BRepBuilderAPI/BRepBuilderAPI_MakeShapeOnMesh.hxx create mode 100644 tests/perf/de/bug33046 diff --git a/src/BRepBuilderAPI/BRepBuilderAPI_MakeShapeOnMesh.cxx b/src/BRepBuilderAPI/BRepBuilderAPI_MakeShapeOnMesh.cxx new file mode 100644 index 0000000000..5d74c71856 --- /dev/null +++ b/src/BRepBuilderAPI/BRepBuilderAPI_MakeShapeOnMesh.cxx @@ -0,0 +1,247 @@ +// Created on: 2022-06-30 +// Created by: Alexander MALYSHEV +// Copyright (c) 2022-2022 OPEN CASCADE SAS +// +// This file is part of Open CASCADE Technology software library. +// +// This library is free software; you can redistribute it and/or modify it under +// the terms of the GNU Lesser General Public License version 2.1 as published +// by the Free Software Foundation, with special exception defined in the file +// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT +// distribution for complete text of the license and disclaimer of any warranty. +// +// Alternatively, this file may be used under the terms of Open CASCADE +// commercial license or contractual agreement. + +#include + +#include +#include +#include +#include +#include +#include +#include + +namespace +{ + //! Structure representing mesh edge. + struct Edge + { + //! Constructor. Sets edge nodes. + Edge(const Standard_Integer TheIdx1, + const Standard_Integer TheIdx2) + : Idx1(Min(TheIdx1, TheIdx2)), + Idx2(Max(TheIdx1, TheIdx2)) + {} + + //! Comparison operator. + Standard_Boolean operator<(const Edge& other) const + { + if (Idx1 < other.Idx1 || + (Idx1 == other.Idx1 && Idx2 < other.Idx2)) + { + return Standard_True; + } + + return Standard_False; + } + + //! First index. It is lower or equal than the second. + Standard_Integer Idx1; + + //! Second index. + Standard_Integer Idx2; + }; + + //! Hasher of Edge structure. + struct EdgeHasher + { + + //! Returns hash code for the given edge. + static Standard_Integer HashCode(const Edge& theEdge, + const Standard_Integer theUpperBound) + { + // Circle-based collisions. + return ::HashCode(theEdge.Idx1 * theEdge.Idx1 + theEdge.Idx2 * theEdge.Idx2, theUpperBound); + } + + //! Returns true if two edges are equal. + static Standard_Boolean IsEqual(const Edge& theEdge1, + const Edge& theEdge2) + { + return theEdge1.Idx1 == theEdge2.Idx1 && theEdge1.Idx2 == theEdge2.Idx2; + } + + }; +} + +//======================================================================= +//function : Build +//purpose : +//======================================================================= +void BRepBuilderAPI_MakeShapeOnMesh::Build(const Message_ProgressRange& theRange) +{ + // Generally, this method guarantees topology sharing by mapping mesh primitives + // into topological counterparts. + // mesh points -> topological vertices + // mesh edges -> topological edges + + // Cannot reconstruct anything from null or empty mesh. + if (myMesh.IsNull() || myMesh->NbNodes() == 0 || myMesh->NbTriangles() == 0) + return; + + const Standard_Integer aNbNodes = myMesh->NbNodes(); + const Standard_Integer aNbTriangles = myMesh->NbTriangles(); + + // We are going to have three loops: iterate once over nodes and iterate twice + // over triangles of input mesh. + Message_ProgressScope aPS(theRange, + "Per-facet shape construction", + Standard_Real(aNbNodes + 2 * aNbTriangles)); + + // Build shared vertices. + NCollection_IndexedDataMap aPnt2VertexMap; + + for (Standard_Integer i = 1; i <= aNbNodes; ++i) + { + aPS.Next(); + if (aPS.UserBreak()) + return; + + const gp_Pnt aP = myMesh->Node(i); + const TopoDS_Vertex aV = BRepBuilderAPI_MakeVertex(aP); + aPnt2VertexMap.Add(i, aV); + } + + // Build shared edges. + NCollection_IndexedDataMap anEdgeToTEgeMap; + for (Standard_Integer i = 1; i <= aNbTriangles; ++i) + { + aPS.Next(); + if (aPS.UserBreak()) + return; + + Standard_Integer anIdx[3]; + const Poly_Triangle& aTriangle = myMesh->Triangle(i); + aTriangle.Get(anIdx[0], anIdx[1], anIdx[2]); + + // Skip degenerated triangles. + if (anIdx[0] == anIdx[1] || anIdx[0] == anIdx[2] || anIdx[1] == anIdx[2]) + continue; + + const gp_Pnt aP1 = myMesh->Node(anIdx[0]); + const gp_Pnt aP2 = myMesh->Node(anIdx[1]); + const gp_Pnt aP3 = myMesh->Node(anIdx[2]); + const Standard_Real aD1 = aP1.SquareDistance(aP2); + const Standard_Real aD2 = aP1.SquareDistance(aP3); + const Standard_Real aD3 = aP2.SquareDistance(aP3); + if (aD1 < gp::Resolution() || + aD2 < gp::Resolution() || + aD3 < gp::Resolution()) + { + continue; + } + + // Edges are constructed in forward order for the existing normals orientation. + // In Poly_Triangulation, positive direction is defined as cross product: + // (aV1, aV2) x (aV1, aV3). + const TopoDS_Vertex& aV1 = aPnt2VertexMap.FindFromKey(anIdx[0]); + const TopoDS_Vertex& aV2 = aPnt2VertexMap.FindFromKey(anIdx[1]); + const TopoDS_Vertex& aV3 = aPnt2VertexMap.FindFromKey(anIdx[2]); + + const Edge aMeshEdge1(anIdx[0], anIdx[1]); + const Edge aMeshEdge2(anIdx[1], anIdx[2]); + const Edge aMeshEdge3(anIdx[2], anIdx[0]); + + BRepBuilderAPI_MakeEdge aMaker1(aV1, aV2); + BRepBuilderAPI_MakeEdge aMaker2(aV2, aV3); + BRepBuilderAPI_MakeEdge aMaker3(aV3, aV1); + + TopoDS_Edge aTE1 = aMaker1.Edge(); + if (anIdx[1] < anIdx[0]) + aTE1.Reverse(); + + TopoDS_Edge aTE2 = aMaker2.Edge(); + if (anIdx[2] < anIdx[1]) + aTE2.Reverse(); + + TopoDS_Edge aTE3 = aMaker3.Edge(); + if (anIdx[0] < anIdx[2]) + aTE3.Reverse(); + + anEdgeToTEgeMap.Add(aMeshEdge1, aTE1); + anEdgeToTEgeMap.Add(aMeshEdge2, aTE2); + anEdgeToTEgeMap.Add(aMeshEdge3, aTE3); + } + + // Construct planar faces using shared topology. + TopoDS_Compound aResult; + BRep_Builder aBB; + aBB.MakeCompound(aResult); + for (Standard_Integer i = 1; i <= aNbTriangles; ++i) + { + aPS.Next(); + if (aPS.UserBreak()) + return; + + Standard_Integer anIdx[3]; + const Poly_Triangle& aTriangle = myMesh->Triangle(i); + aTriangle.Get(anIdx[0], anIdx[1], anIdx[2]); + + const Edge aMeshEdge1(anIdx[0], anIdx[1]); + const Edge aMeshEdge2(anIdx[1], anIdx[2]); + const Edge aMeshEdge3(anIdx[2], anIdx[0]); + const Standard_Boolean isReversed1 = anIdx[1] < anIdx[0]; + const Standard_Boolean isReversed2 = anIdx[2] < anIdx[1]; + const Standard_Boolean isReversed3 = anIdx[0] < anIdx[2]; + + // Edges can be skipped in case of mesh defects - topologically or geometrically + // degenerated triangles. + const Standard_Boolean aHasAllEdges = anEdgeToTEgeMap.Contains(aMeshEdge1) && + anEdgeToTEgeMap.Contains(aMeshEdge2) && + anEdgeToTEgeMap.Contains(aMeshEdge3) ; + if (!aHasAllEdges) + continue; + + TopoDS_Edge aTEdge1 = anEdgeToTEgeMap.FindFromKey(aMeshEdge1); + if (isReversed1) + aTEdge1.Reverse(); + TopoDS_Edge aTEdge2 = anEdgeToTEgeMap.FindFromKey(aMeshEdge2); + if (isReversed2) + aTEdge2.Reverse(); + TopoDS_Edge aTEdge3 = anEdgeToTEgeMap.FindFromKey(aMeshEdge3); + if (isReversed3) + aTEdge3.Reverse(); + + BRepBuilderAPI_MakeWire aWireMaker; + aWireMaker.Add(aTEdge1); + aWireMaker.Add(aTEdge2); + aWireMaker.Add(aTEdge3); + const TopoDS_Wire aWire = aWireMaker.Wire(); + + // Construct plane explicitly since it is faster than automatic construction + // within BRepBuilderAPI_MakeFace. + BRepAdaptor_Curve aC1(aTEdge1); + BRepAdaptor_Curve aC2(aTEdge2); + const gp_Dir aD1 = aC1.Line().Direction(); + const gp_Dir aD2 = aC2.Line().Direction(); + gp_XYZ aN = aD1.XYZ().Crossed(aD2.XYZ()); + if (aN.SquareModulus() < Precision::SquareConfusion()) + continue; + if (aTEdge1.Orientation() == TopAbs_REVERSED) + aN.Reverse(); + if (aTEdge2.Orientation() == TopAbs_REVERSED) + aN.Reverse(); + const gp_Dir aNorm(aN); + gp_Pln aPln(myMesh->Node(anIdx[0]), aNorm); + + BRepBuilderAPI_MakeFace aFaceMaker(aPln, aWire); + const TopoDS_Face aFace = aFaceMaker.Face(); + + aBB.Add(aResult, aFace); + } + + this->Done(); + myShape = aResult; +} diff --git a/src/BRepBuilderAPI/BRepBuilderAPI_MakeShapeOnMesh.hxx b/src/BRepBuilderAPI/BRepBuilderAPI_MakeShapeOnMesh.hxx new file mode 100644 index 0000000000..17a5db828a --- /dev/null +++ b/src/BRepBuilderAPI/BRepBuilderAPI_MakeShapeOnMesh.hxx @@ -0,0 +1,46 @@ +// Created on: 2022-06-30 +// Created by: Alexander MALYSHEV +// Copyright (c) 2022-2022 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 _BRepBuilderAPI_MakeShapeOnMesh_HeaderFile +#define _BRepBuilderAPI_MakeShapeOnMesh_HeaderFile + +#include +#include + +//! Builds shape on per-facet basis on the input mesh. Resulting shape has shared +//! edges by construction, but no maximization (unify same domain) is applied. +//! No generation history is provided. +class BRepBuilderAPI_MakeShapeOnMesh : public BRepBuilderAPI_MakeShape +{ +public: + + DEFINE_STANDARD_ALLOC + + //! Ctor. Sets mesh to process. + //! @param theMesh [in] - Mesh to construct shape for. + BRepBuilderAPI_MakeShapeOnMesh(const Handle(Poly_Triangulation)& theMesh) + : myMesh(theMesh) + {} + + //! Builds shape on mesh. + Standard_EXPORT virtual void Build(const Message_ProgressRange& theRange = Message_ProgressRange()) Standard_OVERRIDE; + +private: + + Handle(Poly_Triangulation) myMesh; + +}; + +#endif // _BRepBuilderAPI_MakeShapeOnMesh_HeaderFile diff --git a/src/BRepBuilderAPI/FILES b/src/BRepBuilderAPI/FILES index 4cd5112637..aff1334a50 100644 --- a/src/BRepBuilderAPI/FILES +++ b/src/BRepBuilderAPI/FILES @@ -26,6 +26,8 @@ BRepBuilderAPI_MakePolygon.cxx BRepBuilderAPI_MakePolygon.hxx BRepBuilderAPI_MakeShape.cxx BRepBuilderAPI_MakeShape.hxx +BRepBuilderAPI_MakeShapeOnMesh.cxx +BRepBuilderAPI_MakeShapeOnMesh.hxx BRepBuilderAPI_MakeShell.cxx BRepBuilderAPI_MakeShell.hxx BRepBuilderAPI_MakeSolid.cxx diff --git a/src/StlAPI/StlAPI_Reader.cxx b/src/StlAPI/StlAPI_Reader.cxx index 748d6557eb..347b89f403 100644 --- a/src/StlAPI/StlAPI_Reader.cxx +++ b/src/StlAPI/StlAPI_Reader.cxx @@ -13,18 +13,9 @@ #include -#include -#include -#include -#include +#include #include -#include #include -#include -#include -#include -#include -#include //============================================================================= //function : Read @@ -35,55 +26,17 @@ Standard_Boolean StlAPI_Reader::Read (TopoDS_Shape& theShape, { Handle(Poly_Triangulation) aMesh = RWStl::ReadFile (theFileName); if (aMesh.IsNull()) - { return Standard_False; - } - TopoDS_Vertex aTriVertexes[3]; - TopoDS_Face aFace; - TopoDS_Wire aWire; - BRepBuilderAPI_Sewing aSewingTool; - aSewingTool.Init (1.0e-06, Standard_True); - - TopoDS_Compound aComp; - BRep_Builder BuildTool; - BuildTool.MakeCompound (aComp); - - for (Standard_Integer aTriIdx = 1; aTriIdx <= aMesh->NbTriangles(); ++aTriIdx) - { - const Poly_Triangle aTriangle = aMesh->Triangle (aTriIdx); - - Standard_Integer anId[3]; - aTriangle.Get(anId[0], anId[1], anId[2]); - - const gp_Pnt aPnt1 = aMesh->Node (anId[0]); - const gp_Pnt aPnt2 = aMesh->Node (anId[1]); - const gp_Pnt aPnt3 = aMesh->Node (anId[2]); - if (!(aPnt1.IsEqual (aPnt2, 0.0)) - && !(aPnt1.IsEqual (aPnt3, 0.0))) - { - aTriVertexes[0] = BRepBuilderAPI_MakeVertex (aPnt1); - aTriVertexes[1] = BRepBuilderAPI_MakeVertex (aPnt2); - aTriVertexes[2] = BRepBuilderAPI_MakeVertex (aPnt3); + BRepBuilderAPI_MakeShapeOnMesh aConverter(aMesh); + aConverter.Build(); + if (!aConverter.IsDone()) + return Standard_False; - aWire = BRepBuilderAPI_MakePolygon (aTriVertexes[0], aTriVertexes[1], aTriVertexes[2], Standard_True); - if (!aWire.IsNull()) - { - aFace = BRepBuilderAPI_MakeFace (aWire); - if (!aFace.IsNull()) - { - BuildTool.Add (aComp, aFace); - } - } - } - } + TopoDS_Shape aResult = aConverter.Shape(); + if (aResult.IsNull()) + return Standard_False; - aSewingTool.Load (aComp); - aSewingTool.Perform(); - theShape = aSewingTool.SewedShape(); - if (theShape.IsNull()) - { - theShape = aComp; - } + theShape = aResult; return Standard_True; } diff --git a/tests/bugs/fclasses/bug23192_1 b/tests/bugs/fclasses/bug23192_1 index 56a7b162a5..00032fc677 100755 --- a/tests/bugs/fclasses/bug23192_1 +++ b/tests/bugs/fclasses/bug23192_1 @@ -24,7 +24,7 @@ catch {exec chmod 777 ${aFile}} if { [file exists ${aFile}] } { readstl result ${aFile} -brep -checknbshapes result -vertex 8 -edge 18 -wire 12 -face 12 -shell 1 -solid 0 -compsolid 0 -compound 0 -shape 51 +checknbshapes result -vertex 8 -edge 18 -wire 12 -face 12 -shell 0 -solid 0 -compsolid 0 -compound 1 -shape 51 # Check file size set size_status 0 set filesize [ file size ${aFile} ] diff --git a/tests/bugs/fclasses/bug23192_2 b/tests/bugs/fclasses/bug23192_2 index 3081072bd2..53775e0908 100755 --- a/tests/bugs/fclasses/bug23192_2 +++ b/tests/bugs/fclasses/bug23192_2 @@ -24,7 +24,7 @@ catch {exec chmod 777 ${aFile}} if { [file exists ${aFile}] } { readstl result ${aFile} -brep -checknbshapes result -vertex 8 -edge 18 -wire 12 -face 12 -shell 1 -solid 0 -compsolid 0 -compound 0 -shape 51 +checknbshapes result -vertex 8 -edge 18 -wire 12 -face 12 -shell 0 -solid 0 -compsolid 0 -compound 1 -shape 51 # Check file size set size_status 0 set filesize [ file size ${aFile} ] diff --git a/tests/bugs/stlvrml/bug27622 b/tests/bugs/stlvrml/bug27622 index a19f4d2fc8..94b46b50a7 100644 --- a/tests/bugs/stlvrml/bug27622 +++ b/tests/bugs/stlvrml/bug27622 @@ -14,10 +14,10 @@ Number of shapes in result EDGE : 5 WIRE : 2 FACE : 2 - SHELL : 1 + SHELL : 0 SOLID : 0 COMPSOLID : 0 - COMPOUND : 0 + COMPOUND : 1 SHAPE : 14 " checknbshapes result -ref ${nbshapes_expected} -t -m "Result of STL-reading operation" diff --git a/tests/bugs/xde/bug22670_1 b/tests/bugs/xde/bug22670_1 index 1718c22cac..24a19a081e 100755 --- a/tests/bugs/xde/bug22670_1 +++ b/tests/bugs/xde/bug22670_1 @@ -21,5 +21,5 @@ catch {exec chmod 777 ${aFile}} readstl result ${aFile} -brep -checknbshapes result -vertex 8 -edge 18 -wire 12 -face 12 -shell 1 -solid 0 -compsolid 0 -compound 0 -shape 51 +checknbshapes result -vertex 8 -edge 18 -wire 12 -face 12 -shell 0 -solid 0 -compsolid 0 -compound 1 -shape 51 checkview -display result -2d -path ${imagedir}/${test_image}.png diff --git a/tests/bugs/xde/bug22670_2 b/tests/bugs/xde/bug22670_2 index d9d4938f01..2c50324fc5 100755 --- a/tests/bugs/xde/bug22670_2 +++ b/tests/bugs/xde/bug22670_2 @@ -32,7 +32,7 @@ if { [catch { readstl res_mesh $filepath -brep } catch_result] } { readstl result ${aFile} -brep - checknbshapes result -vertex 8 -edge 18 -wire 12 -face 12 -shell 1 -solid 0 -compsolid 0 -compound 0 -shape 51 + checknbshapes result -vertex 8 -edge 18 -wire 12 -face 12 -shell 0 -solid 0 -compsolid 0 -compound 1 -shape 51 } checkprops result -s 600 checkshape result diff --git a/tests/perf/de/bug33046 b/tests/perf/de/bug33046 new file mode 100644 index 0000000000..5cc1831f31 --- /dev/null +++ b/tests/perf/de/bug33046 @@ -0,0 +1,17 @@ +puts "========" +puts "0033046: Modeling algorithms - improve performance of per-facet shape construction" +puts "Checks execution time of new shape construction method from STL file." +puts "========" + +cpulimit 25 + +# Run stl loading and translation to the shape. +chrono c reset; chrono c start; +readstl m [locate_data_file model_stl_025.stl] -brep +chrono c stop; chrono c show; + +# Check that model is converted succesfully. +checknbshapes m -face 54337; + +# Visual check +checkview -display m -2d -path ${imagedir}/${test_image}.png \ No newline at end of file From 9db675b3d6833d18fee6187fee259d666bc048f8 Mon Sep 17 00:00:00 2001 From: kgv Date: Wed, 6 Jul 2022 23:39:14 +0300 Subject: [PATCH 334/639] 0033056: Visualization - add front face culling option Added Graphic3d_TypeOfBackfacingModel_FrontCulled enumeration value. OpenGl_Context::SetFaceCulling() now supports GL_FRONT in addition to GL_BACK. Added -faceCulling option to vaspects Draw command. --- .../BinMXCAFDoc_VisMaterialDriver.cxx | 2 + .../Graphic3d_TypeOfBackfacingModel.hxx | 3 +- src/OpenGl/OpenGl_Context.cxx | 25 +++++--- src/OpenGl/OpenGl_Context.hxx | 15 ++++- src/OpenGl/OpenGl_PrimitiveArray.cxx | 5 +- src/OpenGl/OpenGl_Workspace.cxx | 37 +++++++----- src/RWGltf/RWGltf_GltfMaterialMap.cxx | 3 +- src/ViewerTest/ViewerTest.cxx | 60 ++++++++++++++++++- src/XDEDRAW/XDEDRAW_Colors.cxx | 7 +++ .../XmlMXCAFDoc_VisMaterialDriver.cxx | 26 ++++---- tests/opengl/data/general/cullface | 42 +++++++++++++ 11 files changed, 183 insertions(+), 42 deletions(-) create mode 100644 tests/opengl/data/general/cullface diff --git a/src/BinMXCAFDoc/BinMXCAFDoc_VisMaterialDriver.cxx b/src/BinMXCAFDoc/BinMXCAFDoc_VisMaterialDriver.cxx index 7e18a19043..b6f8031978 100644 --- a/src/BinMXCAFDoc/BinMXCAFDoc_VisMaterialDriver.cxx +++ b/src/BinMXCAFDoc/BinMXCAFDoc_VisMaterialDriver.cxx @@ -54,6 +54,7 @@ static Standard_Byte faceCullToChar (Graphic3d_TypeOfBackfacingModel theMode) { case Graphic3d_TypeOfBackfacingModel_Auto: return '0'; case Graphic3d_TypeOfBackfacingModel_BackCulled: return 'B'; + case Graphic3d_TypeOfBackfacingModel_FrontCulled: return 'F'; case Graphic3d_TypeOfBackfacingModel_DoubleSided: return '1'; } return '0'; @@ -66,6 +67,7 @@ static Graphic3d_TypeOfBackfacingModel faceCullFromChar (Standard_Byte theMode) { case '0': return Graphic3d_TypeOfBackfacingModel_Auto; case 'B': return Graphic3d_TypeOfBackfacingModel_BackCulled; + case 'F': return Graphic3d_TypeOfBackfacingModel_FrontCulled; case '1': return Graphic3d_TypeOfBackfacingModel_DoubleSided; } return Graphic3d_TypeOfBackfacingModel_Auto; diff --git a/src/Graphic3d/Graphic3d_TypeOfBackfacingModel.hxx b/src/Graphic3d/Graphic3d_TypeOfBackfacingModel.hxx index aae849b5cd..20e7b8a0a5 100644 --- a/src/Graphic3d/Graphic3d_TypeOfBackfacingModel.hxx +++ b/src/Graphic3d/Graphic3d_TypeOfBackfacingModel.hxx @@ -23,7 +23,8 @@ enum Graphic3d_TypeOfBackfacingModel Graphic3d_TypeOfBackfacingModel_Auto, //!< automatic back face culling enabled for opaque groups with closed flag //! (e.g. solids, see Graphic3d_Group::IsClosed()) Graphic3d_TypeOfBackfacingModel_DoubleSided, //!< no culling (double-sided shading) - Graphic3d_TypeOfBackfacingModel_BackCulled, //!< back face culling + Graphic3d_TypeOfBackfacingModel_BackCulled, //!< back face culling + Graphic3d_TypeOfBackfacingModel_FrontCulled, //!< front face culling // old aliases Graphic3d_TOBM_AUTOMATIC = Graphic3d_TypeOfBackfacingModel_Auto, Graphic3d_TOBM_FORCE = Graphic3d_TypeOfBackfacingModel_DoubleSided, diff --git a/src/OpenGl/OpenGl_Context.cxx b/src/OpenGl/OpenGl_Context.cxx index e3655c8d1a..9380b93672 100644 --- a/src/OpenGl/OpenGl_Context.cxx +++ b/src/OpenGl/OpenGl_Context.cxx @@ -237,7 +237,7 @@ OpenGl_Context::OpenGl_Context (const Handle(OpenGl_Caps)& theCaps) myRenderMode (GL_RENDER), myShadeModel (GL_SMOOTH), myPolygonMode (GL_FILL), - myToCullBackFaces (false), + myFaceCulling (Graphic3d_TypeOfBackfacingModel_DoubleSided), myReadBuffer (0), myDrawBuffers (0, 7), myDefaultVao (0), @@ -547,26 +547,35 @@ void OpenGl_Context::SetFrameBufferSRGB (bool theIsFbo, bool theIsFboSRgb) } // ======================================================================= -// function : SetCullBackFaces +// function : SetFaceCulling // purpose : // ======================================================================= -void OpenGl_Context::SetCullBackFaces (bool theToEnable) +void OpenGl_Context::SetFaceCulling (Graphic3d_TypeOfBackfacingModel theMode) { - if (myToCullBackFaces == theToEnable) + if (myFaceCulling == theMode) { return; } - myToCullBackFaces = theToEnable; - if (theToEnable) + if (theMode == Graphic3d_TypeOfBackfacingModel_BackCulled) { - //glCullFace (GL_BACK); GL_BACK by default + if (myFaceCulling == Graphic3d_TypeOfBackfacingModel_FrontCulled) + { + core11fwd->glCullFace (GL_BACK); + } + core11fwd->glEnable (GL_CULL_FACE); + } + else if (theMode == Graphic3d_TypeOfBackfacingModel_FrontCulled) + { + core11fwd->glCullFace (GL_FRONT); core11fwd->glEnable (GL_CULL_FACE); } else { + core11fwd->glCullFace (GL_BACK); core11fwd->glDisable (GL_CULL_FACE); } + myFaceCulling = theMode; } // ======================================================================= @@ -3084,7 +3093,7 @@ void OpenGl_Context::DumpJson (Standard_OStream& theOStream, Standard_Integer th OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myRenderMode) OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myPolygonMode) OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &myPolygonOffset) - OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myToCullBackFaces) + OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myFaceCulling) OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myReadBuffer) OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myDefaultVao) diff --git a/src/OpenGl/OpenGl_Context.hxx b/src/OpenGl/OpenGl_Context.hxx index 2d42736de5..f86c4cc461 100644 --- a/src/OpenGl/OpenGl_Context.hxx +++ b/src/OpenGl/OpenGl_Context.hxx @@ -803,10 +803,19 @@ public: //! @name methods to alter or retrieve current state Standard_EXPORT bool SetSampleAlphaToCoverage (bool theToEnable); //! Return back face culling state. - bool ToCullBackFaces() const { return myToCullBackFaces; } + Graphic3d_TypeOfBackfacingModel FaceCulling() const { return myFaceCulling; } //! Enable or disable back face culling (glEnable (GL_CULL_FACE)). - Standard_EXPORT void SetCullBackFaces (bool theToEnable); + Standard_EXPORT void SetFaceCulling (Graphic3d_TypeOfBackfacingModel theMode); + + //! Return back face culling state. + bool ToCullBackFaces() const { return myFaceCulling == Graphic3d_TypeOfBackfacingModel_BackCulled; } + + //! Enable or disable back face culling (glCullFace() + glEnable(GL_CULL_FACE)). + void SetCullBackFaces (bool theToEnable) + { + SetFaceCulling (theToEnable ? Graphic3d_TypeOfBackfacingModel_BackCulled : Graphic3d_TypeOfBackfacingModel_DoubleSided); + } //! Fetch OpenGl context state. This class tracks value of several OpenGl //! state variables. Consulting the cached values is quicker than @@ -1155,7 +1164,7 @@ private: //! @name fields tracking current state Standard_Integer myShadeModel; //!< currently used shade model (glShadeModel) Standard_Integer myPolygonMode; //!< currently used polygon rasterization mode (glPolygonMode) Graphic3d_PolygonOffset myPolygonOffset; //!< currently applied polygon offset - bool myToCullBackFaces; //!< back face culling mode enabled state (glIsEnabled (GL_CULL_FACE)) + Graphic3d_TypeOfBackfacingModel myFaceCulling; //!< back face culling mode enabled state (glIsEnabled (GL_CULL_FACE)) Standard_Integer myReadBuffer; //!< current read buffer NCollection_Array1 myDrawBuffers; //!< current draw buffers diff --git a/src/OpenGl/OpenGl_PrimitiveArray.cxx b/src/OpenGl/OpenGl_PrimitiveArray.cxx index 5f1747ba4d..151d1cc40a 100644 --- a/src/OpenGl/OpenGl_PrimitiveArray.cxx +++ b/src/OpenGl/OpenGl_PrimitiveArray.cxx @@ -1030,10 +1030,9 @@ void OpenGl_PrimitiveArray::Render (const Handle(OpenGl_Workspace)& theWorkspace anOutlineProgram->SetUniform (aCtx, anOutlineProgram->GetStateLocation (OpenGl_OCCT_ORTHO_SCALE), anOrthoScale); aCtx->SetColor4fv (anAspectFace->Aspect()->EdgeColorRGBA()); - aCtx->core11fwd->glCullFace (GL_FRONT); + aCtx->SetFaceCulling (Graphic3d_TypeOfBackfacingModel_FrontCulled); drawArray (theWorkspace, NULL, false); - - aCtx->core11fwd->glCullFace (GL_BACK); + aCtx->SetFaceCulling (Graphic3d_TypeOfBackfacingModel_BackCulled); } if (isForcedBlend) diff --git a/src/OpenGl/OpenGl_Workspace.cxx b/src/OpenGl/OpenGl_Workspace.cxx index a59d494af3..91d1fa604f 100644 --- a/src/OpenGl/OpenGl_Workspace.cxx +++ b/src/OpenGl/OpenGl_Workspace.cxx @@ -255,27 +255,34 @@ const OpenGl_Aspects* OpenGl_Workspace::SetAspects (const OpenGl_Aspects* theAsp // ======================================================================= const OpenGl_Aspects* OpenGl_Workspace::ApplyAspects (bool theToBindTextures) { - bool toSuppressBackFaces = myView->BackfacingModel() == Graphic3d_TypeOfBackfacingModel_BackCulled; - if (myView->BackfacingModel() == Graphic3d_TypeOfBackfacingModel_Auto) + //bool toSuppressBackFaces = myView->BackfacingModel() == Graphic3d_TypeOfBackfacingModel_BackCulled; + Graphic3d_TypeOfBackfacingModel aCullFacesMode = myView->BackfacingModel(); + if (aCullFacesMode == Graphic3d_TypeOfBackfacingModel_Auto) { - toSuppressBackFaces = myAspectsSet->Aspect()->FaceCulling() == Graphic3d_TypeOfBackfacingModel_BackCulled; - if (myAspectsSet->Aspect()->FaceCulling() == Graphic3d_TypeOfBackfacingModel_Auto - && myToAllowFaceCulling) + aCullFacesMode = myAspectsSet->Aspect()->FaceCulling(); + if (aCullFacesMode == Graphic3d_TypeOfBackfacingModel_Auto) { - toSuppressBackFaces = true; - if (myAspectsSet->Aspect()->InteriorStyle() == Aspect_IS_HATCH - || myAspectsSet->Aspect()->AlphaMode() == Graphic3d_AlphaMode_Blend - || myAspectsSet->Aspect()->AlphaMode() == Graphic3d_AlphaMode_Mask - || myAspectsSet->Aspect()->AlphaMode() == Graphic3d_AlphaMode_MaskBlend - || (myAspectsSet->Aspect()->AlphaMode() == Graphic3d_AlphaMode_BlendAuto - && myAspectsSet->Aspect()->FrontMaterial().Transparency() != 0.0f)) + aCullFacesMode = Graphic3d_TypeOfBackfacingModel_DoubleSided; + if (myToAllowFaceCulling) { - // disable culling in case of translucent shading aspect - toSuppressBackFaces = false; + if (myAspectsSet->Aspect()->InteriorStyle() == Aspect_IS_HATCH + || myAspectsSet->Aspect()->AlphaMode() == Graphic3d_AlphaMode_Blend + || myAspectsSet->Aspect()->AlphaMode() == Graphic3d_AlphaMode_Mask + || myAspectsSet->Aspect()->AlphaMode() == Graphic3d_AlphaMode_MaskBlend + || (myAspectsSet->Aspect()->AlphaMode() == Graphic3d_AlphaMode_BlendAuto + && myAspectsSet->Aspect()->FrontMaterial().Transparency() != 0.0f)) + { + // disable culling in case of translucent shading aspect + aCullFacesMode = Graphic3d_TypeOfBackfacingModel_DoubleSided; + } + else + { + aCullFacesMode = Graphic3d_TypeOfBackfacingModel_BackCulled; + } } } } - myGlContext->SetCullBackFaces (toSuppressBackFaces); + myGlContext->SetFaceCulling (aCullFacesMode); if (myAspectsSet->Aspect() == myAspectsApplied && myHighlightStyle == myAspectFaceAppliedWithHL) diff --git a/src/RWGltf/RWGltf_GltfMaterialMap.cxx b/src/RWGltf/RWGltf_GltfMaterialMap.cxx index a5f4ee3e11..d3c8cee6c7 100644 --- a/src/RWGltf/RWGltf_GltfMaterialMap.cxx +++ b/src/RWGltf/RWGltf_GltfMaterialMap.cxx @@ -493,7 +493,8 @@ void RWGltf_GltfMaterialMap::DefineMaterial (const XCAFPrs_Style& theStyle, // as both may share the same material having "auto" flag if (theStyle.Material().IsNull() || theStyle.Material()->FaceCulling() == Graphic3d_TypeOfBackfacingModel_Auto - || theStyle.Material()->FaceCulling() == Graphic3d_TypeOfBackfacingModel_DoubleSided) + || theStyle.Material()->FaceCulling() == Graphic3d_TypeOfBackfacingModel_DoubleSided + || theStyle.Material()->FaceCulling() == Graphic3d_TypeOfBackfacingModel_FrontCulled) // front culling flag cannot be exported to glTF { myWriter->Key ("doubleSided"); myWriter->Bool (true); diff --git a/src/ViewerTest/ViewerTest.cxx b/src/ViewerTest/ViewerTest.cxx index 2acf5a4f4c..0d9fe25ead 100644 --- a/src/ViewerTest/ViewerTest.cxx +++ b/src/ViewerTest/ViewerTest.cxx @@ -1683,6 +1683,9 @@ struct ViewerTest_AspectsChangeSet Graphic3d_AlphaMode AlphaMode; Standard_ShortReal AlphaCutoff; + Standard_Integer ToSetFaceCulling; + Graphic3d_TypeOfBackfacingModel FaceCulling; + Standard_Integer ToSetMaterial; Graphic3d_NameOfMaterial Material; TCollection_AsciiString MatName; @@ -1764,6 +1767,8 @@ struct ViewerTest_AspectsChangeSet ToSetAlphaMode (0), AlphaMode (Graphic3d_AlphaMode_BlendAuto), AlphaCutoff (0.5f), + ToSetFaceCulling (0), + FaceCulling (Graphic3d_TypeOfBackfacingModel_Auto), ToSetMaterial (0), Material (Graphic3d_NameOfMaterial_DEFAULT), ToSetShowFreeBoundary (0), @@ -1811,6 +1816,7 @@ struct ViewerTest_AspectsChangeSet && ToSetLineWidth == 0 && ToSetTransparency == 0 && ToSetAlphaMode == 0 + && ToSetFaceCulling == 0 && ToSetColor == 0 && ToSetBackFaceColor == 0 && ToSetMaterial == 0 @@ -2064,6 +2070,15 @@ struct ViewerTest_AspectsChangeSet theDrawer->ShadingAspect()->Aspect()->SetAlphaMode (AlphaMode, AlphaCutoff); } } + if (ToSetFaceCulling != 0) + { + if (ToSetFaceCulling != -1 + || theDrawer->HasOwnShadingAspect()) + { + toRecompute = theDrawer->SetupOwnShadingAspect (aDefDrawer) || toRecompute; + theDrawer->ShadingAspect()->Aspect()->SetFaceCulling (FaceCulling); + } + } if (ToSetHatch != 0) { if (ToSetHatch != -1 @@ -2557,6 +2572,47 @@ static Standard_Integer VAspects (Draw_Interpretor& theDI, } } } + else if (anArg == "-setfaceculling" + || anArg == "-faceculling") + { + if (++anArgIter >= theArgNb) + { + Message::SendFail() << "Error: wrong syntax at " << anArg; + return 1; + } + + aChangeSet->ToSetFaceCulling = 1; + { + TCollection_AsciiString aParam (theArgVec[anArgIter]); + aParam.LowerCase(); + if (aParam == "auto") + { + aChangeSet->FaceCulling = Graphic3d_TypeOfBackfacingModel_Auto; + } + else if (aParam == "backculled" + || aParam == "backcull" + || aParam == "back") + { + aChangeSet->FaceCulling = Graphic3d_TypeOfBackfacingModel_BackCulled; + } + else if (aParam == "frontculled" + || aParam == "frontcull" + || aParam == "front") + { + aChangeSet->FaceCulling = Graphic3d_TypeOfBackfacingModel_FrontCulled; + } + else if (aParam == "doublesided" + || aParam == "off") + { + aChangeSet->FaceCulling = Graphic3d_TypeOfBackfacingModel_DoubleSided; + } + else + { + Message::SendFail() << "Error: wrong syntax at '" << aParam << "'"; + return 1; + } + } + } else if (anArg == "-setvis" || anArg == "-setvisibility" || anArg == "-visibility") @@ -3192,6 +3248,8 @@ static Standard_Integer VAspects (Draw_Interpretor& theDI, aChangeSet->ToSetAlphaMode = -1; aChangeSet->AlphaMode = Graphic3d_AlphaMode_BlendAuto; aChangeSet->AlphaCutoff = 0.5f; + aChangeSet->ToSetFaceCulling = -1; + aChangeSet->FaceCulling = Graphic3d_TypeOfBackfacingModel_Auto; aChangeSet->ToSetColor = -1; aChangeSet->Color = DEFAULT_COLOR; //aChangeSet->ToSetBackFaceColor = -1; // should be reset by ToSetColor @@ -6708,7 +6766,7 @@ vsub 0/1 (off/on) [obj] : Subintensity(on/off) of selected objects vaspects [-noupdate|-update] [name1 [name2 [...]] | -defaults] [-subshapes subname1 [subname2 [...]]] [-visibility {0|1}] [-color {ColorName | R G B}] [-unsetColor] - [-backfaceColor Color] + [-backfaceColor Color] [-faceCulling {auto|back|front|doublesided}] [-material MatName] [-unsetMaterial] [-transparency Transp] [-unsetTransparency] [-width LineWidth] [-unsetWidth] diff --git a/src/XDEDRAW/XDEDRAW_Colors.cxx b/src/XDEDRAW/XDEDRAW_Colors.cxx index 2ab74cad05..faf8258d83 100644 --- a/src/XDEDRAW/XDEDRAW_Colors.cxx +++ b/src/XDEDRAW/XDEDRAW_Colors.cxx @@ -99,6 +99,7 @@ static const char* faceCullToString (Graphic3d_TypeOfBackfacingModel theMode) { case Graphic3d_TypeOfBackfacingModel_Auto: return "Auto"; case Graphic3d_TypeOfBackfacingModel_BackCulled: return "BackCulled"; + case Graphic3d_TypeOfBackfacingModel_FrontCulled: return "FrontCulled"; case Graphic3d_TypeOfBackfacingModel_DoubleSided: return "DoubleSided"; } return ""; @@ -1161,6 +1162,12 @@ static Standard_Integer XAddVisMaterial (Draw_Interpretor& , Standard_Integer th { aMode = Graphic3d_TypeOfBackfacingModel_BackCulled; } + else if (aCullStr == "frontculled" + || aCullStr == "frontcull" + || aCullStr == "front") + { + aMode = Graphic3d_TypeOfBackfacingModel_FrontCulled; + } else if (aCullStr == "doublesided") { aMode = Graphic3d_TypeOfBackfacingModel_DoubleSided; diff --git a/src/XmlMXCAFDoc/XmlMXCAFDoc_VisMaterialDriver.cxx b/src/XmlMXCAFDoc/XmlMXCAFDoc_VisMaterialDriver.cxx index c63fcd1905..257620e455 100644 --- a/src/XmlMXCAFDoc/XmlMXCAFDoc_VisMaterialDriver.cxx +++ b/src/XmlMXCAFDoc/XmlMXCAFDoc_VisMaterialDriver.cxx @@ -256,11 +256,14 @@ Standard_Boolean XmlMXCAFDoc_VisMaterialDriver::Paste (const XmlObjMgt_Persisten aDoubleSidedStr.GetInteger (aDoubleSidedInt); Standard_ShortReal anAlphaCutOff = 0.5f; readReal (theSource, ::AlphaCutOff(), anAlphaCutOff); - aMat->SetFaceCulling (aDoubleSidedInt == 1 - ? Graphic3d_TypeOfBackfacingModel_DoubleSided - : (aDoubleSidedInt == 2 - ? Graphic3d_TypeOfBackfacingModel_BackCulled - : Graphic3d_TypeOfBackfacingModel_Auto)); + switch (aDoubleSidedInt) + { + case 1: aMat->SetFaceCulling (Graphic3d_TypeOfBackfacingModel_DoubleSided); break; + case 2: aMat->SetFaceCulling (Graphic3d_TypeOfBackfacingModel_BackCulled); break; + case 3: aMat->SetFaceCulling (Graphic3d_TypeOfBackfacingModel_FrontCulled); break; + case 0: + default: aMat->SetFaceCulling (Graphic3d_TypeOfBackfacingModel_Auto); break; + } aMat->SetAlphaMode (alphaModeFromString (theSource.Element().getAttribute (::AlphaMode()).GetString()), anAlphaCutOff); Quantity_ColorRGBA aBaseColor; @@ -307,11 +310,14 @@ void XmlMXCAFDoc_VisMaterialDriver::Paste (const Handle(TDF_Attribute)& theSourc XmlObjMgt_SRelocationTable& ) const { Handle(XCAFDoc_VisMaterial) aMat = Handle(XCAFDoc_VisMaterial)::DownCast(theSource); - Standard_Integer aDoubleSidedInt = aMat->FaceCulling() == Graphic3d_TypeOfBackfacingModel_DoubleSided - ? 1 - : (aMat->FaceCulling() == Graphic3d_TypeOfBackfacingModel_BackCulled - ? 2 - : 0); + Standard_Integer aDoubleSidedInt = 0; + switch (aMat->FaceCulling()) + { + case Graphic3d_TypeOfBackfacingModel_DoubleSided: aDoubleSidedInt = 1; break; + case Graphic3d_TypeOfBackfacingModel_BackCulled: aDoubleSidedInt = 2; break; + case Graphic3d_TypeOfBackfacingModel_FrontCulled: aDoubleSidedInt = 3; break; + case Graphic3d_TypeOfBackfacingModel_Auto: aDoubleSidedInt = 0; break; + } theTarget.Element().setAttribute (::IsDoubleSided(), aDoubleSidedInt); theTarget.Element().setAttribute (::AlphaMode(), alphaModeToString (aMat->AlphaMode())); writeReal (theTarget, ::AlphaCutOff(), aMat->AlphaCutOff()); diff --git a/tests/opengl/data/general/cullface b/tests/opengl/data/general/cullface new file mode 100644 index 0000000000..9eddd98fac --- /dev/null +++ b/tests/opengl/data/general/cullface @@ -0,0 +1,42 @@ +puts "========" +puts "0033056: Visualization - add front face culling option" +puts "Check face culling options" +puts "========" + +set THE_NB_BOXES 4 +set THE_COLORS { ORANGE ORANGE ORANGE ORANGE } +set THE_MODES { AUTO BACK FRONT DOUBLESIDED } + +pload MODELING VISUALIZATION +vclear +vinit View1 +vcamera -persp -fovy 80 +vfront + +set x 1 +set z 1 +for { set i 1 } { $i <= $THE_NB_BOXES } { incr i } { + box b$i [expr $x * 300] 0 [expr $z * 400] 200 300 300 + vdisplay -dispMode 1 b$i + vsetcolor b$i [lindex $THE_COLORS [expr $i - 1]] + vaspects b$i -faceCulling [lindex $THE_MODES [expr $i - 1]] + + vdrawtext t$i [lindex $THE_MODES [expr $i - 1]] -pos [expr $x * 300] 0 [expr $z * 400 + 300] -height 16 -color RED -font MONOSPACE -aspect BOLD -valign top + + incr x + if { $i == 2 } { + set x 1 + set z 2 + } +} +vfit + +vaspects -faceBoundaryDraw 1 -faceBoundaryColor RED +vdump $::imagedir/${::casename}_bnds.png + +vaspects -faceBoundaryDraw 0 +vclipplane c -equation 0 1 0 -100 -set +vdump $::imagedir/${::casename}_clip.png + +vclipplane c off +vdump $::imagedir/${::casename}.png From 7a52478f162c44757007fb3f24692038b912aee0 Mon Sep 17 00:00:00 2001 From: kgv Date: Wed, 6 Jul 2022 22:12:52 +0300 Subject: [PATCH 335/639] 0032952: Coding Rules, Graphic3d_DisplayPriority - rename inconsistent Below2/Above1 enties Below/Below2/Below3 triplet has been renamed to Below/Below1/Below2 for consistency with Above/Above1/Above2 --- src/Graphic3d/Graphic3d_DisplayPriority.hxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Graphic3d/Graphic3d_DisplayPriority.hxx b/src/Graphic3d/Graphic3d_DisplayPriority.hxx index b832b5b73f..e01b695dc6 100644 --- a/src/Graphic3d/Graphic3d_DisplayPriority.hxx +++ b/src/Graphic3d/Graphic3d_DisplayPriority.hxx @@ -23,8 +23,8 @@ enum Graphic3d_DisplayPriority Graphic3d_DisplayPriority_INVALID = -1, Graphic3d_DisplayPriority_Bottom = 0, Graphic3d_DisplayPriority_AlmostBottom = 1, - Graphic3d_DisplayPriority_Below3 = 2, - Graphic3d_DisplayPriority_Below2 = 3, + Graphic3d_DisplayPriority_Below2 = 2, + Graphic3d_DisplayPriority_Below1 = 3, Graphic3d_DisplayPriority_Below = 4, Graphic3d_DisplayPriority_Normal = 5, Graphic3d_DisplayPriority_Above = 6, From b47b075ac57d62d1b77c90ee432b75958da17af9 Mon Sep 17 00:00:00 2001 From: ifv Date: Sun, 15 May 2022 08:04:58 +0300 Subject: [PATCH 336/639] 0032995: Modeling algorithms - Interface for checking canonical geometry GeomConvert_CurveToAnaCurve, GeomConvert_SurfToAnaSurf - geometrical algorithms for converting geometrical curve and surfaces in canonical geometry with given tolerance. ShapeAnalysis_CanonicalRecognition - interface for checking canonical geometry. --- .../modeling_data/modeling_data.md | 3 +- .../shape_healing/shape_healing.md | 19 + src/GeomConvert/FILES | 5 + src/GeomConvert/GeomConvert_ConvType.hxx | 23 + .../GeomConvert_CurveToAnaCurve.cxx | 768 +++++++++ .../GeomConvert_CurveToAnaCurve.hxx | 133 ++ src/GeomConvert/GeomConvert_SurfToAnaSurf.cxx | 764 +++++++++ src/GeomConvert/GeomConvert_SurfToAnaSurf.hxx | 91 ++ .../GeomliteTest_SurfaceCommands.cxx | 114 +- src/SWDRAW/SWDRAW_ShapeAnalysis.cxx | 209 +++ src/ShapeAnalysis/FILES | 8 + .../ShapeAnalysis_CanonicalRecognition.cxx | 1415 +++++++++++++++++ .../ShapeAnalysis_CanonicalRecognition.hxx | 169 ++ .../ShapeAnalysis_FuncConeLSDist.cxx | 68 + .../ShapeAnalysis_FuncConeLSDist.hxx | 66 + .../ShapeAnalysis_FuncCylinderLSDist.cxx | 140 ++ .../ShapeAnalysis_FuncCylinderLSDist.hxx | 100 ++ .../ShapeAnalysis_FuncSphereLSDist.cxx | 115 ++ .../ShapeAnalysis_FuncSphereLSDist.hxx | 77 + src/gce/gce_MakeCirc.cxx | 19 +- tests/cr/approx/A1 | 12 + tests/cr/approx/A2 | 15 + tests/cr/approx/A3 | 15 + tests/cr/approx/A4 | 16 + tests/cr/base/A1 | 13 + tests/cr/base/A2 | 12 + tests/cr/base/A3 | 13 + tests/cr/base/A4 | 15 + tests/cr/base/A5 | 15 + tests/cr/base/A6 | 15 + tests/cr/base/B1 | 15 + tests/cr/base/B2 | 14 + tests/cr/base/B3 | 13 + tests/cr/base/B4 | 12 + tests/cr/base/B5 | 25 + tests/cr/base/B6 | 25 + tests/cr/base/B7 | 25 + tests/cr/base/B8 | 25 + tests/cr/base/B9 | 40 + tests/cr/begin | 14 + tests/cr/end | 3 + tests/cr/grids.list | 2 + 42 files changed, 4652 insertions(+), 8 deletions(-) create mode 100644 src/GeomConvert/GeomConvert_ConvType.hxx create mode 100644 src/GeomConvert/GeomConvert_CurveToAnaCurve.cxx create mode 100644 src/GeomConvert/GeomConvert_CurveToAnaCurve.hxx create mode 100644 src/GeomConvert/GeomConvert_SurfToAnaSurf.cxx create mode 100644 src/GeomConvert/GeomConvert_SurfToAnaSurf.hxx create mode 100644 src/ShapeAnalysis/ShapeAnalysis_CanonicalRecognition.cxx create mode 100644 src/ShapeAnalysis/ShapeAnalysis_CanonicalRecognition.hxx create mode 100644 src/ShapeAnalysis/ShapeAnalysis_FuncConeLSDist.cxx create mode 100644 src/ShapeAnalysis/ShapeAnalysis_FuncConeLSDist.hxx create mode 100644 src/ShapeAnalysis/ShapeAnalysis_FuncCylinderLSDist.cxx create mode 100644 src/ShapeAnalysis/ShapeAnalysis_FuncCylinderLSDist.hxx create mode 100644 src/ShapeAnalysis/ShapeAnalysis_FuncSphereLSDist.cxx create mode 100644 src/ShapeAnalysis/ShapeAnalysis_FuncSphereLSDist.hxx create mode 100644 tests/cr/approx/A1 create mode 100644 tests/cr/approx/A2 create mode 100644 tests/cr/approx/A3 create mode 100644 tests/cr/approx/A4 create mode 100644 tests/cr/base/A1 create mode 100644 tests/cr/base/A2 create mode 100644 tests/cr/base/A3 create mode 100644 tests/cr/base/A4 create mode 100644 tests/cr/base/A5 create mode 100644 tests/cr/base/A6 create mode 100644 tests/cr/base/B1 create mode 100644 tests/cr/base/B2 create mode 100644 tests/cr/base/B3 create mode 100644 tests/cr/base/B4 create mode 100644 tests/cr/base/B5 create mode 100644 tests/cr/base/B6 create mode 100644 tests/cr/base/B7 create mode 100644 tests/cr/base/B8 create mode 100644 tests/cr/base/B9 create mode 100644 tests/cr/begin create mode 100644 tests/cr/end create mode 100644 tests/cr/grids.list diff --git a/dox/user_guides/modeling_data/modeling_data.md b/dox/user_guides/modeling_data/modeling_data.md index 1e90d98938..6c153507aa 100644 --- a/dox/user_guides/modeling_data/modeling_data.md +++ b/dox/user_guides/modeling_data/modeling_data.md @@ -338,7 +338,8 @@ The GeomConvert package also provides the following: * a splitting algorithm, which determines the curves along which a BSpline surface should be cut in order to obtain patches with the same degree of continuity, * global functions to construct BSpline surfaces created by this splitting algorithm, or by other types of BSpline surface segmentation, * an algorithm, which converts a BSpline surface into a series of adjacent Bezier surfaces, - * an algorithm, which converts a grid of adjacent Bezier surfaces into a BSpline surface. + * an algorithm, which converts a grid of adjacent Bezier surfaces into a BSpline surface. + * algorithms that converts NURBS, Bezier and other general parametrized curves and surface into anaytical curves and surfaces. @subsection occt_modat_1_4 Points on Curves diff --git a/dox/user_guides/shape_healing/shape_healing.md b/dox/user_guides/shape_healing/shape_healing.md index 0f811679ed..fe479e25ec 100644 --- a/dox/user_guides/shape_healing/shape_healing.md +++ b/dox/user_guides/shape_healing/shape_healing.md @@ -1007,6 +1007,25 @@ Standard_Integer aNbOffsetSurfaces = aCheckContents.NbOffsetSurf(); Handle(TopTools_HSequenceOfShape) aSeqFaces = aCheckContents.OffsetSurfaceSec(); ~~~~ +@subsubsection occt_shg_3_2_4 Analysis of shape underlined geometry + +Class *ShapeAnalysis_CanonicalRecognition* provides tools that analyze geometry of shape and explore the possibility of converting geometry into a canonical form. +Canonical forms for curves are lines, circles and ellipses. +Canonical forms for surfaces are planar, cylindrical, conical and spherical surfaces. + +Recognition and converting into canonical form is performed according to maximal deviation criterium: maximal distance between initial and canonical geometrical objects must be less, than given value. + +Analysis of curves is allowed for following shapes: + * edge - algorithm checks 3d curve of edge + * wire - algorithm checks 3d curves of all edges in order to convert them in the same analytical curve + +Analysis of surfaces is allowed for following shapes: + * face - algorithm checks surface of face + * shell - algorithm checks surfaces of all faces in order to convert them in the same analytical surface + * edge - algorithm checks all surfaces that are shared by given edge in order convert one of them in analytical surface, which most close to the input sample surface. + * wire - the same as for edge, but algorithm checks all edges of wire in order to find analytical surface, which most close to the input sample surface. + + @section occt_shg_4 Upgrading Upgrading tools are intended for adaptation of shapes for better use by Open CASCADE Technology or for customization to particular needs, i.e. for export to another system. diff --git a/src/GeomConvert/FILES b/src/GeomConvert/FILES index 029d1cb1a2..06ae4fe8f8 100755 --- a/src/GeomConvert/FILES +++ b/src/GeomConvert/FILES @@ -20,3 +20,8 @@ GeomConvert_CompCurveToBSplineCurve.cxx GeomConvert_CompCurveToBSplineCurve.hxx GeomConvert_Units.cxx GeomConvert_Units.hxx +GeomConvert_CurveToAnaCurve.cxx +GeomConvert_CurveToAnaCurve.hxx +GeomConvert_SurfToAnaSurf.cxx +GeomConvert_SurfToAnaSurf.hxx +GeomConvert_ConvType.hxx diff --git a/src/GeomConvert/GeomConvert_ConvType.hxx b/src/GeomConvert/GeomConvert_ConvType.hxx new file mode 100644 index 0000000000..56592c7aeb --- /dev/null +++ b/src/GeomConvert/GeomConvert_ConvType.hxx @@ -0,0 +1,23 @@ +// Copyright (c) 2022 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 _GeomConvert_ConvType_HeaderFile +#define _GeomConvert_ConvType_HeaderFile +enum GeomConvert_ConvType +{ + GeomConvert_Target, + GeomConvert_Simplest, + GeomConvert_MinGap +}; + +#endif // _GeomConvert_ConvType_HeaderFile diff --git a/src/GeomConvert/GeomConvert_CurveToAnaCurve.cxx b/src/GeomConvert/GeomConvert_CurveToAnaCurve.cxx new file mode 100644 index 0000000000..8e135e1edb --- /dev/null +++ b/src/GeomConvert/GeomConvert_CurveToAnaCurve.cxx @@ -0,0 +1,768 @@ +// Created: 2001-05-21 +// +// Copyright (c) 2001-2013 OPEN CASCADE SAS +// +// This file is part of commercial software by OPEN CASCADE SAS, +// furnished in accordance with the terms and conditions of the contract +// and with the inclusion of this copyright notice. +// This file or any part thereof may not be provided or otherwise +// made available to any third party. +// +// No ownership title to the software is transferred hereby. +// +// OPEN CASCADE SAS makes no representation or warranties with respect to the +// performance of this software, and specifically disclaims any responsibility +// for any damages, special or consequential, connected with its use. + + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + + +GeomConvert_CurveToAnaCurve::GeomConvert_CurveToAnaCurve(): + myGap(Precision::Infinite()), + myConvType(GeomConvert_MinGap), + myTarget(GeomAbs_Line) +{ +} + +GeomConvert_CurveToAnaCurve::GeomConvert_CurveToAnaCurve(const Handle(Geom_Curve)& C) : + myGap(Precision::Infinite()), + myConvType(GeomConvert_MinGap), + myTarget(GeomAbs_Line) +{ + myCurve = C; +} + +void GeomConvert_CurveToAnaCurve::Init(const Handle(Geom_Curve)& C) +{ + myCurve = C; + myGap = Precision::Infinite(); +} + +//======================================================================= +//function : ConvertToAnalytical +//purpose : +//======================================================================= + +Standard_Boolean GeomConvert_CurveToAnaCurve::ConvertToAnalytical(const Standard_Real tol, + Handle(Geom_Curve)& theResultCurve, + const Standard_Real F, const Standard_Real L, + Standard_Real& NewF, Standard_Real& NewL) +{ + if(myCurve.IsNull()) + return Standard_False; + + Handle(Geom_Curve) aCurve = myCurve; + while (aCurve->IsKind(STANDARD_TYPE(Geom_TrimmedCurve))) { + Handle(Geom_TrimmedCurve) aTrimmed = Handle(Geom_TrimmedCurve):: + DownCast(aCurve); + aCurve = aTrimmed->BasisCurve(); + } + + Handle(Geom_Curve) C = ComputeCurve(aCurve,tol,F, L, NewF, NewL, myGap, myConvType, myTarget); + + if(C.IsNull()) return Standard_False; + theResultCurve = C; + return Standard_True; +} + +//======================================================================= +//function : IsLinear +//purpose : +//======================================================================= + +Standard_Boolean GeomConvert_CurveToAnaCurve::IsLinear(const TColgp_Array1OfPnt& aPoles, + const Standard_Real tolerance, + Standard_Real& Deviation) +{ + Standard_Integer nbPoles = aPoles.Length(); + if(nbPoles < 2) + return Standard_False; + + Standard_Real dMax = 0; + Standard_Integer iMax1=0,iMax2=0; + + Standard_Integer i; + for(i = 1; i < nbPoles; i++) + for(Standard_Integer j = i+1; j <= nbPoles; j++) { + Standard_Real dist = aPoles(i).SquareDistance(aPoles(j)); + if(dist > dMax) { + dMax = dist; + iMax1 = i; + iMax2 = j; + } + } + + if (dMax < Precision::SquareConfusion()) + return Standard_False; + + Standard_Real tol2 = tolerance*tolerance; + gp_Vec avec (aPoles(iMax1),aPoles(iMax2)); gp_Dir adir (avec); gp_Lin alin (aPoles(iMax1),adir); + + Standard_Real aMax = 0.; + for(i = 1; i <= nbPoles; i++) { + Standard_Real dist = alin.SquareDistance(aPoles(i)); + if(dist > tol2) + return Standard_False; + if(dist > aMax) + aMax = dist; + } + Deviation = sqrt(aMax); + + return Standard_True; +} + +//======================================================================= +//function : GetLine +//purpose : +//======================================================================= + +gp_Lin GeomConvert_CurveToAnaCurve::GetLine(const gp_Pnt& P1, const gp_Pnt& P2, + Standard_Real& cf, Standard_Real& cl) +{ + gp_Vec avec(P1, P2); gp_Dir adir(avec); gp_Lin alin(P1, adir); + cf = ElCLib::Parameter(alin, P1); + cl = ElCLib::Parameter(alin, P2); + return alin; +} +//======================================================================= +//function : ComputeLine +//purpose : +//======================================================================= + +Handle(Geom_Line) GeomConvert_CurveToAnaCurve::ComputeLine (const Handle(Geom_Curve)& curve, + const Standard_Real tolerance, + const Standard_Real c1, const Standard_Real c2, + Standard_Real& cf, Standard_Real& cl, + Standard_Real& Deviation) +{ + Handle(Geom_Line) line; + if (curve.IsNull()) return line; + line = Handle(Geom_Line)::DownCast(curve); // qui sait + if (!line.IsNull()) { + cf = c1; + cl = c2; + Deviation = 0.; + return line; + } + + gp_Pnt P1 = curve->Value (c1); + gp_Pnt P2 = curve->Value (c2); + if(P1.SquareDistance(P2) < Precision::SquareConfusion()) + return line; + cf = c1; cl = c2; + + Handle(TColgp_HArray1OfPnt) Poles; + Standard_Integer nbPoles; + Handle(Geom_BSplineCurve) bsc = Handle(Geom_BSplineCurve)::DownCast(curve); + if (!bsc.IsNull()) { + nbPoles = bsc->NbPoles(); + Poles = new TColgp_HArray1OfPnt(1, nbPoles); + bsc->Poles(Poles->ChangeArray1()); + } + else + { + Handle(Geom_BezierCurve) bzc = Handle(Geom_BezierCurve)::DownCast(curve); + if (!bzc.IsNull()) { + nbPoles = bzc->NbPoles(); + Poles = new TColgp_HArray1OfPnt(1, nbPoles); + bzc->Poles(Poles->ChangeArray1()); + } + else + { + nbPoles = 23; + Poles = new TColgp_HArray1OfPnt(1, nbPoles); + Standard_Real dt = (c2 - c1) / (nbPoles - 1); + Poles->SetValue(1, P1); + Poles->SetValue(nbPoles, P2); + Standard_Integer i; + for (i = 2; i < nbPoles; ++i) + { + Poles->SetValue(i, curve->Value(c1 + (i - 1) * dt)); + } + } + } + if(!IsLinear(Poles->Array1(),tolerance,Deviation)) return line; // non + gp_Lin alin = GetLine (P1, P2, cf, cl); + line = new Geom_Line (alin); + return line; +} + +//======================================================================= +//function : GetCircle +//purpose : +//======================================================================= + +Standard_Boolean GeomConvert_CurveToAnaCurve::GetCircle (gp_Circ& crc, + const gp_Pnt& P0,const gp_Pnt& P1, const gp_Pnt& P2) +{ +// Control if points are not aligned (should be done by MakeCirc + Standard_Real aMaxCoord = Sqrt(Precision::Infinite()); + if (Abs(P0.X()) > aMaxCoord || Abs(P0.Y()) > aMaxCoord || Abs(P0.Z()) > aMaxCoord) + return Standard_False; + if (Abs(P1.X()) > aMaxCoord || Abs(P1.Y()) > aMaxCoord || Abs(P1.Z()) > aMaxCoord) + return Standard_False; + if (Abs(P2.X()) > aMaxCoord || Abs(P2.Y()) > aMaxCoord || Abs(P2.Z()) > aMaxCoord) + return Standard_False; + +// Building the circle + gce_MakeCirc mkc (P0,P1,P2); + if (!mkc.IsDone()) return Standard_False; + crc = mkc.Value(); + if (crc.Radius() < gp::Resolution()) return Standard_False; + // Recalage sur P0 + gp_Pnt PC = crc.Location(); + gp_Ax2 axe = crc.Position(); + gp_Vec VX (PC,P0); + axe.SetXDirection (VX); + crc.SetPosition (axe); + return Standard_True; +} + +//======================================================================= +//function : ComputeCircle +//purpose : +//======================================================================= + +Handle(Geom_Curve) GeomConvert_CurveToAnaCurve::ComputeCircle (const Handle(Geom_Curve)& c3d, + const Standard_Real tol, + const Standard_Real c1, const Standard_Real c2, + Standard_Real& cf, Standard_Real& cl, + Standard_Real& Deviation) +{ + if (c3d->IsKind (STANDARD_TYPE(Geom_Circle))) { + cf = c1; + cl = c2; + Deviation = 0.; + Handle(Geom_Circle) aCirc = Handle(Geom_Circle)::DownCast(c3d); + return aCirc; + } + + Handle(Geom_Circle) circ; + gp_Pnt P0,P1,P2; + Standard_Real ca = (c1+c1+c2) / 3; Standard_Real cb = (c1+c2+c2) / 3; + P0 = c3d->Value(c1); + P1 = c3d->Value(ca); + P2 = c3d->Value(cb); + + gp_Circ crc; + if (!GetCircle (crc,P0,P1,P2)) return circ; + + // Reste a controler que c est bien un cercle : prendre 20 points + Standard_Real du = (c2-c1)/20; + Standard_Integer i; + Standard_Real aMax = 0.; + for (i = 0; i <= 20; i ++) { + Standard_Real u = c1+(du*i); + gp_Pnt PP = c3d->Value(u); + Standard_Real dist = crc.Distance(PP); + if (dist > tol) return circ; // not done + if (dist > aMax) + aMax = dist; + } + Deviation = aMax; + + // defining the parameters + Standard_Real PI2 = 2 * M_PI; + + cf = ElCLib::Parameter (crc,c3d->Value (c1)); + cf = ElCLib::InPeriod(cf, 0., PI2); + + //first parameter should be closed to zero + + if(Abs(cf) < Precision::PConfusion() || Abs(PI2-cf) < Precision::PConfusion()) + cf = 0.; + + Standard_Real cm = ElCLib::Parameter (crc,c3d->Value ((c1+c2)/2.)); + cm = ElCLib::InPeriod(cm, cf, cf + PI2); + + cl = ElCLib::Parameter (crc,c3d->Value (c2)); + cl = ElCLib::InPeriod(cl, cm, cm + PI2); + + circ = new Geom_Circle (crc); + return circ; +} + +//======================================================================= +// Compute Ellipse +//======================================================================= + +//======================================================================= +//function : IsArrayPntPlanar +//purpose : +//======================================================================= + +static Standard_Boolean IsArrayPntPlanar(const Handle(TColgp_HArray1OfPnt)& HAP, + gp_Dir& Norm, const Standard_Real prec) +{ + Standard_Integer size = HAP->Length(); + if(size<3) + return Standard_False; + gp_Pnt P1 = HAP->Value(1); + gp_Pnt P2 = HAP->Value(2); + gp_Pnt P3 = HAP->Value(3); + Standard_Real dist1 = P1.Distance(P2); + Standard_Real dist2 = P1.Distance(P3); + if( dist13) { + for(i=4; i<=size; i++) { + gp_Pnt PN = HAP->Value(i); + dist1 = P1.Distance(PN); + if (dist1 < prec || Precision::IsInfinite(dist1)) + { + return Standard_False; + } + gp_Vec VN(P1,PN); + if(!NV.IsNormal(VN,prec)) + return Standard_False; + } + } + Norm = NV; + return Standard_True; +} + +//======================================================================= +//function : ConicdDefinition +//purpose : +//======================================================================= + +static Standard_Boolean ConicDefinition + ( const Standard_Real a, const Standard_Real b1, const Standard_Real c, + const Standard_Real d1, const Standard_Real e1, const Standard_Real f, + const Standard_Boolean IsParab, const Standard_Boolean IsEllip, + gp_Pnt& Center, gp_Dir& MainAxis, Standard_Real& Rmin, Standard_Real& Rmax ) +{ + Standard_Real Xcen = 0.,Ycen = 0., Xax = 0.,Yax = 0.; + Standard_Real b,d,e; + // conic : a*x2 + 2*b*x*y + c*y2 + 2*d*x + 2*e*y + f = 0. + //Equation (a,b,c,d,e,f); + b = b1/2.; d = d1/2.; e = e1/2.; // chgt de variable + + Standard_Real eps = 1.E-08; // ?? comme ComputedForm + + if (IsParab) { + + } + else { + // -> Conique a centre, cas general + // On utilise les Determinants des matrices : + // | a b d | + // gdet (3x3) = | b c e | et pdet (2X2) = | a b | + // | d e f | | b c | + + Standard_Real gdet = a*c*f + 2*b*d*e - c*d*d - a*e*e - b*b*f; + Standard_Real pdet = a*c - b*b; + + Xcen = (b*e - c*d) / pdet; + Ycen = (b*d - a*e) / pdet; + + Standard_Real term1 = a-c; + Standard_Real term2 = 2*b; + Standard_Real cos2t; + Standard_Real auxil; + + if (Abs(term2) <= eps && Abs(term1) <= eps) { + cos2t = 1.; + auxil = 0.; + } + else { + if (Abs(term1) < eps) + { + return Standard_False; + } + Standard_Real t2d = term2/term1; //skl 21.11.2001 + cos2t = 1./sqrt(1+t2d*t2d); + auxil = sqrt (term1*term1 + term2*term2); + } + + Standard_Real cost = sqrt ( (1+cos2t)/2. ); + Standard_Real sint = sqrt ( (1-cos2t)/2. ); + + Standard_Real aprim = (a+c+auxil)/2.; + Standard_Real cprim = (a+c-auxil)/2.; + + if (Abs(aprim) < gp::Resolution() || Abs(cprim) < gp::Resolution()) + return Standard_False; + + term1 = -gdet/(aprim*pdet); + term2 = -gdet/(cprim*pdet); + + if (IsEllip) { + Xax = cost; + Yax = sint; + Rmin = sqrt ( term1); + Rmax = sqrt ( term2); + if(RmaxIsKind (STANDARD_TYPE(Geom_Ellipse))) { + cf = c1; + cl = c2; + Deviation = 0.; + Handle(Geom_Ellipse) anElips = Handle(Geom_Ellipse)::DownCast(c3d); + return anElips; + } + + Handle(Geom_Curve) res; + Standard_Real prec = Precision::PConfusion(); + + Standard_Real AF,BF,CF,DF,EF,Q1,Q2,Q3,c2n; + Standard_Integer i; + + gp_Pnt PStart = c3d->Value(c1); + gp_Pnt PEnd = c3d->Value(c2); + + const Standard_Boolean IsClos = PStart.Distance(PEnd) < prec; + if (IsClos) + { + c2n=c2-(c2-c1)/5; + } + else + c2n=c2; + // + gp_XYZ aBC; + Handle(TColgp_HArray1OfPnt) AP = new TColgp_HArray1OfPnt(1,5); + AP->SetValue(1,PStart); + aBC += PStart.XYZ(); + Standard_Real dc=(c2n-c1)/4; + for (i = 1; i < 5; i++) + { + gp_Pnt aP = c3d->Value(c1 + dc*i); + AP->SetValue(i + 1, aP); + aBC += aP.XYZ(); + } + aBC /= 5; + aBC *= -1; + gp_Vec aTrans(aBC); + for (i = 1; i <= 5; ++i) + { + AP->ChangeValue(i).Translate(aTrans); + } + gp_Dir ndir; + if(!IsArrayPntPlanar(AP,ndir,prec)) + return res; + + if (Abs(ndir.X()) < gp::Resolution() && Abs(ndir.Y()) < gp::Resolution() + && Abs(ndir.Z()) < gp::Resolution()) + return res; + + gp_Ax3 AX(gp_Pnt(0,0,0),ndir); + gp_Trsf Tr; + Tr.SetTransformation(AX); + gp_Trsf Tr2 = Tr.Inverted(); + + math_Matrix Dt(1, 5, 1, 5); + math_Vector F(1, 5), Sl(1, 5); + + Standard_Real XN,YN,ZN = 0.; + gp_Pnt PT,PP; + for(i=1; i<=5; i++) { + PT = AP->Value(i).Transformed(Tr); + PT.Coord(XN,YN,ZN); + Dt(i, 1) = XN*XN; + Dt(i, 2) = XN*YN; + Dt(i, 3) = YN*YN; + Dt(i, 4) = XN; + Dt(i, 5) = YN; + F(i) = -1.; + } + + math_Gauss aSolver(Dt); + if (!aSolver.IsDone()) + return res; + + aSolver.Solve(F, Sl); + + AF=Sl(1); + BF=Sl(2); + CF=Sl(3); + DF=Sl(4); + EF=Sl(5); + + Q1=AF*CF+BF*EF*DF/4-CF*DF*DF/4-BF*BF/4-AF*EF*EF/4; + Q2=AF*CF-BF*BF/4; + Q3=AF+CF; + + Standard_Real Rmax, Rmin; + gp_Pnt Center; + gp_Dir MainAxis; + Standard_Boolean IsParab = Standard_False, IsEllip = Standard_False; + +if (Q2 > 0 && Q1*Q3 < 0) { + // ellipse + IsEllip = Standard_True; + if (ConicDefinition(AF, BF, CF, DF, EF, 1., IsParab, IsEllip, + Center, MainAxis, Rmin, Rmax)) { + // create ellipse + if (Rmax - Rmin < Precision::Confusion()) + { + return res; //really it is circle, which must be recognized in other method + } + aTrans *= -1; + Center.SetZ(ZN); + gp_Pnt NewCenter = Center.Transformed(Tr2); + gp_Pnt Ptmp(Center.X() + MainAxis.X() * 10, + Center.Y() + MainAxis.Y() * 10, + Center.Z() + MainAxis.Z() * 10); + gp_Pnt NewPtmp = Ptmp.Transformed(Tr2); + gp_Dir NewMainAxis(NewPtmp.X() - NewCenter.X(), + NewPtmp.Y() - NewCenter.Y(), + NewPtmp.Z() - NewCenter.Z()); + gp_Ax2 ax2(NewCenter, ndir, NewMainAxis); + + gp_Elips anEllipse(ax2, Rmax, Rmin); + anEllipse.Translate(aTrans); + Handle(Geom_Ellipse) gell = new Geom_Ellipse(anEllipse); + + // test for 20 points + Standard_Real param2 = 0; + dc = (c2 - c1) / 20; + for (i = 1; i <= 20; i++) { + PP = c3d->Value(c1 + i*dc); + Standard_Real aPar = ElCLib::Parameter(anEllipse, PP); + Standard_Real dist = gell->Value(aPar).Distance(PP); + if (dist > tol) return res; // not done + if (dist > param2) + param2 = dist; + } + + + Deviation = param2; + + Standard_Real PI2 = 2 * M_PI; + cf = ElCLib::Parameter(anEllipse, c3d->Value(c1)); + cf = ElCLib::InPeriod(cf, 0., PI2); + + //first parameter should be closed to zero + + if (Abs(cf) < Precision::PConfusion() || Abs(PI2 - cf) < Precision::PConfusion()) + cf = 0.; + + Standard_Real cm = ElCLib::Parameter(anEllipse, c3d->Value((c1 + c2) / 2.)); + cm = ElCLib::InPeriod(cm, cf, cf + PI2); + + cl = ElCLib::Parameter(anEllipse, c3d->Value(c2)); + cl = ElCLib::InPeriod(cl, cm, cm + PI2); + + res = gell; + } +} +/* +if (Q2 < 0 && Q1 != 0) { + // hyberbola +} + +if (Q2 == 0 && Q1 != 0) { + // parabola +} +*/ +return res; +} + + +//======================================================================= +//function : ComputeCurve +//purpose : +//======================================================================= + +Handle(Geom_Curve) GeomConvert_CurveToAnaCurve::ComputeCurve(const Handle(Geom_Curve)& theC3d, + const Standard_Real tolerance, + const Standard_Real c1, const Standard_Real c2, + Standard_Real& cf, Standard_Real& cl, + Standard_Real& theGap, + const GeomConvert_ConvType theConvType, const GeomAbs_CurveType theTarget) +{ + cf = c1; cl = c2; + Handle(Geom_Curve) c3d, newc3d[3]; + Standard_Integer i, imin = -1; + c3d = theC3d; + if (c3d.IsNull()) return newc3d[imin]; + gp_Pnt P1 = c3d->Value(c1); + gp_Pnt P2 = c3d->Value(c2); + gp_Pnt P3 = c3d->Value(c1 + (c2 - c1) / 2); + Standard_Real d[3] = { RealLast(), RealLast(), RealLast() }; + Standard_Real fp[3], lp[3]; + + if (c3d->IsKind(STANDARD_TYPE(Geom_TrimmedCurve))) { + Handle(Geom_TrimmedCurve) aTc = Handle(Geom_TrimmedCurve)::DownCast(c3d); + c3d = aTc->BasisCurve(); + } + + if (theConvType == GeomConvert_Target) + { + theGap = RealLast(); + if (theTarget == GeomAbs_Line) + { + newc3d[0] = ComputeLine(c3d, tolerance, c1, c2, fp[0], lp[0], theGap); + cf = fp[0]; + cl = lp[0]; + return newc3d[0]; + } + if (theTarget == GeomAbs_Circle) + { + newc3d[1] = ComputeCircle(c3d, tolerance, c1, c2, fp[1], lp[1], theGap); + cf = fp[1]; + cl = lp[1]; + return newc3d[1]; + } + if (theTarget == GeomAbs_Ellipse) + { + newc3d[2] = ComputeEllipse(c3d, tolerance, c1, c2, fp[2], lp[2], theGap); + cf = fp[2]; + cl = lp[2]; + return newc3d[2]; + } + } + // + if (theConvType == GeomConvert_Simplest) + { + theGap = RealLast(); + newc3d[0] = ComputeLine(c3d, tolerance, c1, c2, fp[0], lp[0], theGap); + if (!newc3d[0].IsNull()) + { + cf = fp[0]; + cl = lp[0]; + return newc3d[0]; + } + theGap = RealLast(); + newc3d[1] = ComputeCircle(c3d, tolerance, c1, c2, fp[1], lp[1], theGap); + if (!newc3d[1].IsNull()) + { + cf = fp[1]; + cl = lp[1]; + return newc3d[1]; + } + theGap = RealLast(); + newc3d[2] = ComputeEllipse(c3d, tolerance, c1, c2, fp[2], lp[2], theGap); + if (!newc3d[2].IsNull()) + { + cf = fp[2]; + cl = lp[2]; + return newc3d[2]; + } + // Conversion failed, returns null curve + return newc3d[0]; + } + + // theConvType == GeomConvert_MinGap + // recognition in case of small curve + imin = -1; + if((P1.Distance(P2) < 2*tolerance) && (P1.Distance(P3) < 2*tolerance)) { + newc3d[1] = ComputeCircle(c3d, tolerance, c1, c2, fp[1], lp[1], d[1]); + newc3d[0] = ComputeLine(c3d, tolerance, c1, c2, fp[0], lp[0], d[0]); + imin = 1; + if (newc3d[1].IsNull() || d[0] < d[1]) + { + imin = 0; + } + } + else { + d[0] = RealLast(); + newc3d[0] = ComputeLine (c3d,tolerance,c1,c2,fp[0],lp[0],d[0]); + Standard_Real tol = Min(tolerance, d[0]); + if (!Precision::IsInfinite(c1) && !Precision::IsInfinite(c2)) + { + d[1] = RealLast(); + newc3d[1] = ComputeCircle(c3d, tol, c1, c2, fp[1], lp[1], d[1]); + tol = Min(tol, d[1]); + d[2] = RealLast(); + newc3d[2] = ComputeEllipse(c3d, tol, c1, c2, fp[2], lp[2], d[2]); + } + Standard_Real dd = RealLast(); + for (i = 0; i < 3; ++i) + { + if (newc3d[i].IsNull()) continue; + if (d[i] < dd) + { + dd = d[i]; + imin = i; + } + } + } + + if (imin >= 0) + { + cf = fp[imin]; + cl = lp[imin]; + theGap = d[imin]; + return newc3d[imin]; + } + else + { + cf = c1; + cl = c2; + theGap = -1.; + return newc3d[0]; // must be null curve; + } +} diff --git a/src/GeomConvert/GeomConvert_CurveToAnaCurve.hxx b/src/GeomConvert/GeomConvert_CurveToAnaCurve.hxx new file mode 100644 index 0000000000..5bffa86d57 --- /dev/null +++ b/src/GeomConvert/GeomConvert_CurveToAnaCurve.hxx @@ -0,0 +1,133 @@ +// Created: 2001-05-21 +// +// Copyright (c) 2001-2013 OPEN CASCADE SAS +// +// This file is part of commercial software by OPEN CASCADE SAS, +// furnished in accordance with the terms and conditions of the contract +// and with the inclusion of this copyright notice. +// This file or any part thereof may not be provided or otherwise +// made available to any third party. +// +// No ownership title to the software is transferred hereby. +// +// OPEN CASCADE SAS makes no representation or warranties with respect to the +// performance of this software, and specifically disclaims any responsibility +// for any damages, special or consequential, connected with its use. + +#ifndef _GeomConvert_CurveToAnaCurve_HeaderFile +#define _GeomConvert_CurveToAnaCurve_HeaderFile + +#include +#include +#include +#include +#include +#include +#include +#include + +class Geom_Curve; +class Geom_Line; +class gp_Lin; +class gp_Pnt; +class gp_Circ; + + + +class GeomConvert_CurveToAnaCurve +{ +public: + + DEFINE_STANDARD_ALLOC + + Standard_EXPORT GeomConvert_CurveToAnaCurve(); + + Standard_EXPORT GeomConvert_CurveToAnaCurve(const Handle(Geom_Curve)& C); + + Standard_EXPORT void Init (const Handle(Geom_Curve)& C); + + //! Converts me to analytical if possible with given + //! tolerance. The new first and last parameters are + //! returned to newF, newL + Standard_EXPORT Standard_Boolean ConvertToAnalytical (const Standard_Real theTol, Handle(Geom_Curve)& theResultCurve, const Standard_Real F, const Standard_Real L, Standard_Real& newF, Standard_Real& newL); + + Standard_EXPORT static Handle(Geom_Curve) ComputeCurve (const Handle(Geom_Curve)& curve, const Standard_Real tolerance, + const Standard_Real c1, const Standard_Real c2, Standard_Real& cf, Standard_Real& cl, + Standard_Real& theGap, const GeomConvert_ConvType theCurvType = GeomConvert_MinGap, const GeomAbs_CurveType theTarget = GeomAbs_Line); + + //! Tries to convert the given curve to circle with given + //! tolerance. Returns NULL curve if conversion is + //! not possible. + Standard_EXPORT static Handle(Geom_Curve) ComputeCircle (const Handle(Geom_Curve)& curve, const Standard_Real tolerance, const Standard_Real c1, const Standard_Real c2, Standard_Real& cf, Standard_Real& cl, Standard_Real& Deviation); + + //! Tries to convert the given curve to ellipse with given + //! tolerance. Returns NULL curve if conversion is + //! not possible. + Standard_EXPORT static Handle(Geom_Curve) ComputeEllipse (const Handle(Geom_Curve)& curve, const Standard_Real tolerance, const Standard_Real c1, const Standard_Real c2, Standard_Real& cf, Standard_Real& cl, Standard_Real& Deviation); + + //! Tries to convert the given curve to line with given + //! tolerance. Returns NULL curve if conversion is + //! not possible. + Standard_EXPORT static Handle(Geom_Line) ComputeLine (const Handle(Geom_Curve)& curve, const Standard_Real tolerance, const Standard_Real c1, const Standard_Real c2, Standard_Real& cf, Standard_Real& cl, Standard_Real& Deviation); + + //! Returns true if the set of points is linear with given + //! tolerance + Standard_EXPORT static Standard_Boolean IsLinear (const TColgp_Array1OfPnt& aPoints, const Standard_Real tolerance, Standard_Real& Deviation); + + //! Creates line on two points. + //! Resulting parameters returned + Standard_EXPORT static gp_Lin GetLine(const gp_Pnt& P1, const gp_Pnt& P2, Standard_Real& cf, Standard_Real& cl); + + //! Creates circle on points. Returns true if OK. + Standard_EXPORT static Standard_Boolean GetCircle(gp_Circ& Circ, const gp_Pnt& P0, const gp_Pnt& P1, const gp_Pnt& P2); + + //! Returns maximal deviation of converted surface from the original + //! one computed by last call to ConvertToAnalytical + Standard_Real Gap() const + { + return myGap; + } + + //! Returns conversion type + GeomConvert_ConvType GetConvType() const + { + return myConvType; + } + + //! Sets type of convertion + void SetConvType(const GeomConvert_ConvType theConvType) + { + myConvType = theConvType; + } + + //! Returns target curve type + GeomAbs_CurveType GetTarget() const + { + return myTarget; + } + + //! Sets target curve type + void SetTarget(const GeomAbs_CurveType theTarget) + { + myTarget = theTarget; + } + + +protected: + + + + + +private: + + Handle(Geom_Curve) myCurve; + Standard_Real myGap; + GeomConvert_ConvType myConvType; + GeomAbs_CurveType myTarget; + +}; + + + +#endif // _GeomConvert_CurveToAnaCurve_HeaderFile diff --git a/src/GeomConvert/GeomConvert_SurfToAnaSurf.cxx b/src/GeomConvert/GeomConvert_SurfToAnaSurf.cxx new file mode 100644 index 0000000000..37ed349ebb --- /dev/null +++ b/src/GeomConvert/GeomConvert_SurfToAnaSurf.cxx @@ -0,0 +1,764 @@ +// Created: 1998-06-03 +// +// Copyright (c) 1999-2013 OPEN CASCADE SAS +// +// This file is part of commercial software by OPEN CASCADE SAS, +// furnished in accordance with the terms and conditions of the contract +// and with the inclusion of this copyright notice. +// This file or any part thereof may not be provided or otherwise +// made available to any third party. +// +// No ownership title to the software is transferred hereby. +// +// OPEN CASCADE SAS makes no representation or warranties with respect to the +// performance of this software, and specifically disclaims any responsibility +// for any damages, special or consequential, connected with its use. + +//abv 06.01.99 fix of misprint +//:p6 abv 26.02.99: make ConvertToPeriodic() return Null if nothing done + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +//static method for checking surface of revolution +//To avoid two-parts cone-like surface +static void CheckVTrimForRevSurf(const Handle(Geom_SurfaceOfRevolution)& aRevSurf, + Standard_Real& V1, Standard_Real& V2) +{ + const Handle(Geom_Curve)& aBC = aRevSurf->BasisCurve(); + Handle(Geom_Line) aLine = Handle(Geom_Line)::DownCast(aBC); + if (aLine.IsNull()) + return; + const gp_Ax1& anAxis = aRevSurf->Axis(); + + gp_Lin anALin(anAxis); + Extrema_ExtElC anExtLL(aLine->Lin(), anALin, Precision::Angular()); + if (!anExtLL.IsDone() || anExtLL.IsParallel()) + return; + Standard_Integer aNbExt = anExtLL.NbExt(); + if (aNbExt == 0) + return; + + Standard_Integer i; + Standard_Integer imin = 0; + for (i = 1; i <= aNbExt; ++i) + { + if (anExtLL.SquareDistance(i) < Precision::SquareConfusion()) + { + imin = i; + break; + } + } + if (imin == 0) + return; + + Extrema_POnCurv aP1, aP2; + anExtLL.Points(imin, aP1, aP2); + Standard_Real aVExt = aP1.Parameter(); + if (aVExt <= V1 || aVExt >= V2) + return; + + if (aVExt - V1 > V2 - aVExt) + { + V2 = aVExt; + } + else + { + V1 = aVExt; + } + +} + +// static method to try create toroidal surface. +// In case = Standard_True try to use V isoline radius as minor radaius. +static Handle(Geom_Surface) TryTorusSphere(const Handle(Geom_Surface)& theSurf, + const Handle(Geom_Circle)& circle, + const Handle(Geom_Circle)& otherCircle, + const Standard_Real Param1, + const Standard_Real Param2, + const Standard_Real aParam1ToCrv, + const Standard_Real aParam2ToCrv, + const Standard_Real toler, + const Standard_Boolean isTryUMajor) +{ + Handle(Geom_Surface) newSurface; + Standard_Real cf, cl; + Handle(Geom_Curve) IsoCrv1; + Handle(Geom_Curve) IsoCrv2; + Standard_Real aGap1, aGap2; + // initial radius + Standard_Real R = circle->Circ().Radius(); + // iso lines + + if (isTryUMajor) + { + IsoCrv1 = theSurf->VIso(Param1 + ((Param2 - Param1) / 3.)); + IsoCrv2 = theSurf->VIso(Param1 + ((Param2 - Param1)*2. / 3)); + } + else + { + IsoCrv1 = theSurf->UIso(Param1 + ((Param2 - Param1) / 3.)); + IsoCrv2 = theSurf->UIso(Param1 + ((Param2 - Param1)*2. / 3)); + } + + Handle(Geom_Curve) Crv1 = GeomConvert_CurveToAnaCurve::ComputeCurve(IsoCrv1, toler, aParam1ToCrv, aParam2ToCrv, cf, cl, + aGap1); + Handle(Geom_Curve) Crv2 = GeomConvert_CurveToAnaCurve::ComputeCurve(IsoCrv2, toler, aParam1ToCrv, aParam2ToCrv, cf, cl, + aGap2); + if (Crv1.IsNull() || Crv2.IsNull() || + !Crv1->IsKind(STANDARD_TYPE(Geom_Circle)) || + !Crv2->IsKind(STANDARD_TYPE(Geom_Circle))) + return newSurface; + + Handle(Geom_Circle) aCircle1 = Handle(Geom_Circle)::DownCast(Crv1); + Handle(Geom_Circle) aCircle2 = Handle(Geom_Circle)::DownCast(Crv2); + Standard_Real R1 = aCircle1->Circ().Radius(); + Standard_Real R2 = aCircle2->Circ().Radius(); + + // check radiuses + if ((Abs(R - R1) > toler) || (Abs(R - R2) > toler)) + return newSurface; + + // get centers of the major radius + gp_Pnt aPnt1, aPnt2, aPnt3; + aPnt1 = circle->Circ().Location(); + aPnt2 = aCircle1->Circ().Location(); + aPnt3 = aCircle2->Circ().Location(); + + //Standard_Real eps = 1.e-09; // angular resolution + Standard_Real d0 = aPnt1.Distance(aPnt2); Standard_Real d1 = aPnt1.Distance(aPnt3); + gp_Circ circ; + + if (d0 < toler || d1 < toler) + { + // compute sphere + gp_Dir MainDir = otherCircle->Circ().Axis().Direction(); + gp_Ax3 Axes(circle->Circ().Location(), MainDir); + Handle(Geom_SphericalSurface) anObject = + new Geom_SphericalSurface(Axes, R); + if (!anObject.IsNull()) + newSurface = anObject; + + return newSurface; + } + + if (!GeomConvert_CurveToAnaCurve::GetCircle(circ, aPnt1, aPnt2, aPnt3) /*, d0, d1, eps)*/) + return newSurface; + + Standard_Real aMajorR = circ.Radius(); + gp_Pnt aCenter = circ.Location(); + gp_Dir aDir((aPnt1.XYZ() - aCenter.XYZ()) ^ (aPnt3.XYZ() - aCenter.XYZ())); + gp_Ax3 anAx3(aCenter, aDir); + newSurface = new Geom_ToroidalSurface(anAx3, aMajorR, R); + return newSurface; +} + +static Standard_Real ComputeGap(const Handle(Geom_Surface)& theSurf, + const Standard_Real theU1, const Standard_Real theU2, const Standard_Real theV1, const Standard_Real theV2, + const Handle(Geom_Surface) theNewSurf, const Standard_Real theTol = RealLast()) +{ + GeomAdaptor_Surface aGAS(theNewSurf); + GeomAbs_SurfaceType aSType = aGAS.GetType(); + gp_Pln aPln; + gp_Cylinder aCyl; + gp_Cone aCon; + gp_Sphere aSphere; + gp_Torus aTor; + switch (aSType) + { + case GeomAbs_Plane: + aPln = aGAS.Plane(); + break; + case GeomAbs_Cylinder: + aCyl = aGAS.Cylinder(); + break; + case GeomAbs_Cone: + aCon = aGAS.Cone(); + break; + case GeomAbs_Sphere: + aSphere = aGAS.Sphere(); + break; + case GeomAbs_Torus: + aTor = aGAS.Torus(); + break; + default: + return Precision::Infinite(); + break; + } + + Standard_Real aGap = 0.; + Standard_Boolean onSurface = Standard_True; + + Standard_Real S, T; + gp_Pnt P3d, P3d2; + + const Standard_Integer NP = 21; + Standard_Real DU, DV; + Standard_Integer j, i; + DU = (theU2 - theU1) / (NP - 1); + DV = (theV2 - theV1) / (NP - 1); + Standard_Real DU2 = DU / 2., DV2 = DV / 2.; + for (j = 1; (j < NP) && onSurface; j++) { + Standard_Real V = theV1 + DV*(j - 1) + DV2; + for (i = 1; i <= NP; i++) { + Standard_Real U = theU1 + DU*(i - 1) + DU2; + theSurf->D0(U, V, P3d); + + switch (aSType) { + + case GeomAbs_Plane: + { + ElSLib::Parameters(aPln, P3d, S, T); + P3d2 = ElSLib::Value(S, T, aPln); + break; + } + case GeomAbs_Cylinder: + { + ElSLib::Parameters(aCyl, P3d, S, T); + P3d2 = ElSLib::Value(S, T, aCyl); + break; + } + case GeomAbs_Cone: + { + ElSLib::Parameters(aCon, P3d, S, T); + P3d2 = ElSLib::Value(S, T, aCon); + break; + } + case GeomAbs_Sphere: + { + ElSLib::Parameters(aSphere, P3d, S, T); + P3d2 = ElSLib::Value(S, T, aSphere); + break; + } + case GeomAbs_Torus: + { + ElSLib::Parameters(aTor, P3d, S, T); + P3d2 = ElSLib::Value(S, T, aTor); + break; + } + default: + S = 0.; T = 0.; + theNewSurf->D0(S, T, P3d2); + break; + } + + Standard_Real dis = P3d.Distance(P3d2); + if (dis > aGap) aGap = dis; + + if (aGap > theTol) { + onSurface = Standard_False; + break; + } + } + } + return aGap; +} +//======================================================================= +//function : GeomConvert_SurfToAnaSurf +//purpose : +//======================================================================= +GeomConvert_SurfToAnaSurf::GeomConvert_SurfToAnaSurf() : + myGap (-1.), + myConvType (GeomConvert_Simplest), + myTarget (GeomAbs_Plane) +{ +} + +//======================================================================= +//function : GeomConvert_SurfToAnaSurf +//purpose : +//======================================================================= + +GeomConvert_SurfToAnaSurf::GeomConvert_SurfToAnaSurf (const Handle(Geom_Surface)& S) : + myGap(-1.), + myConvType(GeomConvert_Simplest), + myTarget(GeomAbs_Plane) +{ + Init ( S ); +} + +//======================================================================= +//function : Init +//purpose : +//======================================================================= + +void GeomConvert_SurfToAnaSurf::Init (const Handle(Geom_Surface)& S) +{ + mySurf = S; +} + +//======================================================================= +//function : ConvertToAnalytical +//purpose : +//======================================================================= + +Handle(Geom_Surface) GeomConvert_SurfToAnaSurf::ConvertToAnalytical (const Standard_Real InitialToler) +{ + Standard_Real U1, U2, V1, V2; + mySurf->Bounds(U1, U2, V1, V2); + if(Precision::IsInfinite(U1) && Precision::IsInfinite(U2) ) { + U1 = -1.; + U2 = 1.; + } + if(Precision::IsInfinite(V1) && Precision::IsInfinite(V2) ) { + V1 = -1.; + V2 = 1.; + Handle(Geom_SurfaceOfRevolution) aRevSurf = Handle(Geom_SurfaceOfRevolution)::DownCast(mySurf); + if (!aRevSurf.IsNull()) + { + CheckVTrimForRevSurf(aRevSurf, V1, V2); + } + } + return ConvertToAnalytical(InitialToler, U1, U2, V1, V2); +} + +//======================================================================= +//function : ConvertToAnalytical +//purpose : +//======================================================================= +Handle(Geom_Surface) GeomConvert_SurfToAnaSurf::ConvertToAnalytical(const Standard_Real InitialToler, + const Standard_Real Umin, const Standard_Real Umax, + const Standard_Real Vmin, const Standard_Real Vmax) +{ + // + GeomAdaptor_Surface aGAS(mySurf); + GeomAbs_SurfaceType aSType = aGAS.GetType(); + switch (aSType) + { + case GeomAbs_Plane: + { + myGap = 0.; + return new Geom_Plane(aGAS.Plane()); + } + case GeomAbs_Cylinder: + { + myGap = 0.; + return new Geom_CylindricalSurface(aGAS.Cylinder()); + } + case GeomAbs_Cone: + { + myGap = 0.; + return new Geom_ConicalSurface(aGAS.Cone()); + } + case GeomAbs_Sphere: + { + myGap = 0.; + return new Geom_SphericalSurface(aGAS.Sphere()); + } + case GeomAbs_Torus: + { + myGap = 0.; + return new Geom_ToroidalSurface(aGAS.Torus()); + } + default: + break; + } + // + Standard_Real toler = InitialToler; + Handle(Geom_Surface) newSurf[5]; + Standard_Real dd[5] = { -1., -1., -1., -1., -1 }; + + //Check boundaries + Standard_Real U1, U2, V1, V2; + mySurf->Bounds(U1, U2, V1, V2); + Standard_Boolean aDoSegment = Standard_False; + Standard_Real aTolBnd = Precision::PConfusion(); + Standard_Integer isurf = 0; + if (Umin < U1 || Umax > U2 || Vmin < V1 || Vmax > V2) + { + return newSurf[isurf]; + } + else + { + if (Umin - U1 > aTolBnd) + { + U1 = Umin; + aDoSegment = Standard_True; + } + if (U2 - Umax > aTolBnd) + { + U2 = Umax; + aDoSegment = Standard_True; + } + if (Vmin - V1 > aTolBnd) + { + V1 = Vmin; + aDoSegment = Standard_True; + } + if (V2 - Vmax > aTolBnd) + { + V2 = Vmax; + aDoSegment = Standard_True; + } + + } + + Standard_Boolean IsBz = aSType == GeomAbs_BezierSurface; + Standard_Boolean IsBs = aSType == GeomAbs_BSplineSurface; + + Handle(Geom_Surface) aTempS = mySurf; + if (IsBs) + { + Handle(Geom_BSplineSurface) aBs = Handle(Geom_BSplineSurface)::DownCast(mySurf->Copy()); + if (aDoSegment) + { + aBs->Segment(U1, U2, V1, V2); + } + aTempS = aBs; + } + else if (IsBz) + { + Handle(Geom_BezierSurface) aBz = Handle(Geom_BezierSurface)::DownCast(mySurf->Copy()); + if (aDoSegment) + { + aBz->Segment(U1, U2, V1, V2); + } + aTempS = aBz; + } + // check the planarity first + if (!IsBs && !IsBz) + { + aTempS = new Geom_RectangularTrimmedSurface(aTempS, U1, U2, V1, V2); + } + isurf = 0; // set plane + GeomLib_IsPlanarSurface GeomIsPlanar(aTempS, toler); + if (GeomIsPlanar.IsPlanar()) { + gp_Pln newPln = GeomIsPlanar.Plan(); + newSurf[isurf] = new Geom_Plane(newPln); + dd[isurf] = ComputeGap(aTempS, U1, U2, V1, V2, newSurf[isurf]); + if ( myConvType == GeomConvert_Simplest || + (myConvType == GeomConvert_Target && myTarget == GeomAbs_Plane)) + { + myGap = dd[isurf]; + return newSurf[isurf]; + } + } + else + { + if (myConvType == GeomConvert_Target && myTarget == GeomAbs_Plane) + { + myGap = dd[isurf]; + return newSurf[isurf]; + } + } + + Standard_Real diagonal = mySurf->Value(U1, V1).Distance(mySurf->Value((U1 + U2), (V1 + V2) / 2)); + Standard_Real twist = 1000; + if (toler > diagonal / twist) toler = diagonal / twist; + + isurf = 1; // set cylinder + Standard_Boolean aCylinderConus = Standard_False; + Standard_Boolean aToroidSphere = Standard_False; + + //convert middle uiso and viso to canonical representation + Standard_Real VMid = 0.5*(V1 + V2); + Standard_Real UMid = 0.5*(U1 + U2); + Handle(Geom_Surface) TrSurf = aTempS; + if(!aDoSegment) + TrSurf = new Geom_RectangularTrimmedSurface(aTempS, U1, U2, V1, V2); + + Handle(Geom_Curve) UIso = TrSurf->UIso(UMid); + Handle(Geom_Curve) VIso = TrSurf->VIso(VMid); + + Standard_Real cuf, cul, cvf, cvl, aGap1, aGap2; + Handle(Geom_Curve) umidiso = GeomConvert_CurveToAnaCurve::ComputeCurve(UIso, toler, V1, V2, cuf, cul, aGap1); + Handle(Geom_Curve) vmidiso = GeomConvert_CurveToAnaCurve::ComputeCurve(VIso, toler, U1, U2, cvf, cvl, aGap2); + if (umidiso.IsNull() || vmidiso.IsNull()) { + return newSurf[isurf]; + } + + // + Standard_Boolean VCase = Standard_False; + + if (umidiso->IsKind(STANDARD_TYPE(Geom_Circle)) && vmidiso->IsKind(STANDARD_TYPE(Geom_Circle))) + { + aToroidSphere = Standard_True; + if (myConvType == GeomConvert_Target && (myTarget == GeomAbs_Cylinder || myTarget == GeomAbs_Cone)) + { + isurf = 1; + myGap = dd[isurf]; + return newSurf[isurf]; + } + isurf = 3; // set sphere + } + else if (umidiso->IsKind(STANDARD_TYPE(Geom_Line)) && vmidiso->IsKind(STANDARD_TYPE(Geom_Circle))) { + aCylinderConus = Standard_True; VCase = Standard_True; + if (myConvType == GeomConvert_Target && (myTarget == GeomAbs_Sphere || myTarget == GeomAbs_Torus)) + { + isurf = 3; + myGap = dd[isurf]; + return newSurf[isurf]; + } + isurf = 1;// set cylinder + } + else if (umidiso->IsKind(STANDARD_TYPE(Geom_Circle)) && vmidiso->IsKind(STANDARD_TYPE(Geom_Line))) + { + aCylinderConus = Standard_True; + if (myConvType == GeomConvert_Target && (myTarget == GeomAbs_Sphere || myTarget == GeomAbs_Torus)) + { + isurf = 3; + myGap = dd[isurf]; + return newSurf[isurf]; + } + isurf = 1;// set cylinder + } + Standard_Real cl = 0.0; + //case of torus-sphere + if (aToroidSphere) { + + isurf = 3; // Set spherical surface + + Handle(Geom_Circle) Ucircle = Handle(Geom_Circle)::DownCast(umidiso); + Handle(Geom_Circle) Vcircle = Handle(Geom_Circle)::DownCast(vmidiso); + // torus + // try when V isolines is with same radius + Handle(Geom_Surface) anObject = + TryTorusSphere(mySurf, Vcircle, Ucircle, V1, V2, U1, U2, toler, Standard_True); + if (anObject.IsNull()) // try when U isolines is with same radius + anObject = TryTorusSphere(mySurf, Ucircle, Vcircle, U1, U2, V1, V2, toler, Standard_False); + + if (!anObject.IsNull()) + { + if (anObject->IsKind(STANDARD_TYPE(Geom_ToroidalSurface))) + { + isurf = 4; // set torus + } + newSurf[isurf] = anObject; + } + else + { + myGap = dd[isurf]; + } + } + //case of cone - cylinder + else if (aCylinderConus) { + Standard_Real param1, param2, cf1, cf2; + Handle(Geom_Curve) firstiso, lastiso; + Handle(Geom_Circle) firstisocirc, lastisocirc, midisocirc; + gp_Dir isoline; + if (VCase) { + param1 = U1; param2 = U2; + firstiso = TrSurf->VIso(V1); + lastiso = TrSurf->VIso(V2); + midisocirc = Handle(Geom_Circle)::DownCast(vmidiso); + isoline = Handle(Geom_Line)::DownCast(umidiso)->Lin().Direction(); + } + else { + param1 = V1; param2 = V2; + firstiso = TrSurf->UIso(U1); + lastiso = TrSurf->UIso(U2); + midisocirc = Handle(Geom_Circle)::DownCast(umidiso); + isoline = Handle(Geom_Line)::DownCast(vmidiso)->Lin().Direction(); + } + firstisocirc = Handle(Geom_Circle)::DownCast(GeomConvert_CurveToAnaCurve::ComputeCurve(firstiso, toler, param1, param2, cf1, cl, aGap1)); + lastisocirc = Handle(Geom_Circle)::DownCast(GeomConvert_CurveToAnaCurve::ComputeCurve(lastiso, toler, param1, param2, cf2, cl, aGap2)); + if (!firstisocirc.IsNull() || !lastisocirc.IsNull()) { + Standard_Real R1, R2, R3; + gp_Pnt P1, P2, P3; + if (!firstisocirc.IsNull()) { + R1 = firstisocirc->Circ().Radius(); + P1 = firstisocirc->Circ().Location(); + } + else { + R1 = 0; + P1 = firstiso->Value((firstiso->LastParameter() - firstiso->FirstParameter()) / 2); + } + R2 = midisocirc->Circ().Radius(); + P2 = midisocirc->Circ().Location(); + if (!lastisocirc.IsNull()) { + R3 = lastisocirc->Circ().Radius(); + P3 = lastisocirc->Circ().Location(); + } + else { + R3 = 0; + P3 = lastiso->Value((lastiso->LastParameter() - lastiso->FirstParameter()) / 2); + } + //cylinder + if (((Abs(R2 - R1)) < toler) && ((Abs(R3 - R1)) < toler) && + ((Abs(R3 - R2)) < toler)) { + isurf = 1; + gp_Ax3 Axes(P1, gp_Dir(gp_Vec(P1, P3))); + Handle(Geom_CylindricalSurface) anObject = + new Geom_CylindricalSurface(Axes, R1); + if (myConvType == GeomConvert_Target && myTarget != GeomAbs_Cylinder) + { + return newSurf[isurf]; + } + newSurf[isurf] = anObject; + } + //cone + else if ((((Abs(R1)) > (Abs(R2))) && ((Abs(R2)) > (Abs(R3)))) || + (((Abs(R3)) > (Abs(R2))) && ((Abs(R2)) > (Abs(R1))))) { + Standard_Real radius; + gp_Ax3 Axes; + Standard_Real semiangle = + gp_Vec(isoline).Angle(gp_Vec(P3, P1)); + if (semiangle>M_PI / 2) semiangle = M_PI - semiangle; + if (R1 > R3) { + radius = R3; + Axes = gp_Ax3(P3, gp_Dir(gp_Vec(P3, P1))); + } + else { + radius = R1; + Axes = gp_Ax3(P1, gp_Dir(gp_Vec(P1, P3))); + } + Handle(Geom_ConicalSurface) anObject = + new Geom_ConicalSurface(Axes, semiangle, radius); + isurf = 2; + if (myConvType == GeomConvert_Target && myTarget != GeomAbs_Cone) + { + return newSurf[isurf]; + } + newSurf[isurf] = anObject; + } + } + else + { + myGap = dd[isurf]; + } + } + // + //--------------------------------------------------------------------- + // verification + //--------------------------------------------------------------------- + GeomAbs_SurfaceType aSTypes[5] = { GeomAbs_Plane, GeomAbs_Cylinder, + GeomAbs_Cone, GeomAbs_Sphere, GeomAbs_Torus }; + Standard_Integer imin = -1; + Standard_Real aDmin = RealLast(); + for (isurf = 0; isurf < 5; ++isurf) + { + if (newSurf[isurf].IsNull()) + continue; + dd[isurf] = ComputeGap(TrSurf, U1, U2, V1, V2, newSurf[isurf], toler); + if (dd[isurf] <= toler) + { + if (myConvType == GeomConvert_Simplest || (myConvType == GeomConvert_Target && myTarget == aSTypes[isurf])) + { + myGap = dd[isurf]; + return newSurf[isurf]; + } + else if (myConvType == GeomConvert_MinGap) + { + if (dd[isurf] < aDmin) + { + aDmin = dd[isurf]; + imin = isurf; + } + } + } + } + // + if (imin >= 0) + { + myGap = dd[imin]; + return newSurf[imin]; + } + + return newSurf[0]; +} + +//======================================================================= +//function : IsSame +//purpose : +//======================================================================= + +Standard_Boolean GeomConvert_SurfToAnaSurf::IsSame(const Handle(Geom_Surface)& S1, + const Handle(Geom_Surface)& S2, + const Standard_Real tol) +{ + // only elementary surfaces are processed + if(!S1->IsKind(STANDARD_TYPE(Geom_ElementarySurface)) || + !S2->IsKind(STANDARD_TYPE(Geom_ElementarySurface))) + return Standard_False; + + Handle(GeomAdaptor_Surface) anAdaptor1 = new GeomAdaptor_Surface(S1); + Handle(GeomAdaptor_Surface) anAdaptor2 = new GeomAdaptor_Surface(S2); + + GeomAbs_SurfaceType aST1 = anAdaptor1->GetType(); + GeomAbs_SurfaceType aST2 = anAdaptor2->GetType(); + + if (aST1 != aST2) + { + return Standard_False; + } + + IntAna_QuadQuadGeo interii; + if (aST1 == GeomAbs_Plane) + { + interii.Perform(anAdaptor1->Plane(), anAdaptor2->Plane(), tol, tol); + } + else if (aST1 == GeomAbs_Cylinder) + { + interii.Perform(anAdaptor1->Cylinder(), anAdaptor2->Cylinder(), tol); + } + else if (aST1 == GeomAbs_Cone) + { + interii.Perform(anAdaptor1->Cone(), anAdaptor2->Cone(), tol); + } + else if (aST1 == GeomAbs_Sphere) + { + interii.Perform(anAdaptor1->Sphere(), anAdaptor2->Sphere(), tol); + } + else if (aST1 == GeomAbs_Torus) + { + interii.Perform(anAdaptor1->Torus(), anAdaptor2->Torus(), tol); + } + + if (!interii.IsDone()) + return Standard_False; + + IntAna_ResultType aTypeRes = interii.TypeInter(); + + return aTypeRes == IntAna_Same; + +} + + +//======================================================================= +//function : IsCanonical +//purpose : +//======================================================================= + +Standard_Boolean GeomConvert_SurfToAnaSurf::IsCanonical(const Handle(Geom_Surface)& S) +{ + if(S.IsNull()) + return Standard_False; + + if ( S->IsKind(STANDARD_TYPE(Geom_Plane)) + || S->IsKind(STANDARD_TYPE(Geom_CylindricalSurface)) + || S->IsKind(STANDARD_TYPE(Geom_ConicalSurface)) + || S->IsKind(STANDARD_TYPE(Geom_SphericalSurface)) + || S->IsKind(STANDARD_TYPE(Geom_ToroidalSurface))) + return Standard_True; + + return Standard_False; +} + diff --git a/src/GeomConvert/GeomConvert_SurfToAnaSurf.hxx b/src/GeomConvert/GeomConvert_SurfToAnaSurf.hxx new file mode 100644 index 0000000000..016956590e --- /dev/null +++ b/src/GeomConvert/GeomConvert_SurfToAnaSurf.hxx @@ -0,0 +1,91 @@ +// Created: 1998-06-03 +// +// Copyright (c) 1999-2013 OPEN CASCADE SAS +// +// This file is part of commercial software by OPEN CASCADE SAS, +// furnished in accordance with the terms and conditions of the contract +// and with the inclusion of this copyright notice. +// This file or any part thereof may not be provided or otherwise +// made available to any third party. +// +// No ownership title to the software is transferred hereby. +// +// OPEN CASCADE SAS makes no representation or warranties with respect to the +// performance of this software, and specifically disclaims any responsibility +// for any damages, special or consequential, connected with its use. + +#ifndef _GeomConvert_SurfToAnaSurf_HeaderFile +#define _GeomConvert_SurfToAnaSurf_HeaderFile + +#include +#include +#include + +#include +#include +#include +#include +class Geom_Surface; + + +//! Converts a surface to the analitical form with given +//! precision. Conversion is done only the surface is bspline +//! of bezier and this can be approximed by some analytical +//! surface with that precision. +class GeomConvert_SurfToAnaSurf +{ +public: + + DEFINE_STANDARD_ALLOC + + Standard_EXPORT GeomConvert_SurfToAnaSurf(); + + Standard_EXPORT GeomConvert_SurfToAnaSurf(const Handle(Geom_Surface)& S); + + Standard_EXPORT void Init (const Handle(Geom_Surface)& S); + + void SetConvType(const GeomConvert_ConvType theConvType = GeomConvert_Simplest) + { + myConvType = theConvType; + } + void SetTarget(const GeomAbs_SurfaceType theSurfType = GeomAbs_Plane) + { + myTarget = theSurfType; + } + + //! Returns maximal deviation of converted surface from the original + //! one computed by last call to ConvertToAnalytical + Standard_Real Gap() const + { + return myGap; + } + + //! Tries to convert the Surface to an Analytic form + //! Returns the result + //! In case of failure, returns a Null Handle + //! + Standard_EXPORT Handle(Geom_Surface) ConvertToAnalytical (const Standard_Real InitialToler); + Standard_EXPORT Handle(Geom_Surface) ConvertToAnalytical (const Standard_Real InitialToler, + const Standard_Real Umin, const Standard_Real Umax, + const Standard_Real Vmin, const Standard_Real Vmax); + + //! Returns true if surfaces is same with the given tolerance + Standard_EXPORT static Standard_Boolean IsSame (const Handle(Geom_Surface)& S1, const Handle(Geom_Surface)& S2, const Standard_Real tol); + + //! Returns true, if surface is canonical + Standard_EXPORT static Standard_Boolean IsCanonical (const Handle(Geom_Surface)& S); + + +protected: + +private: + + Handle(Geom_Surface) mySurf; + Standard_Real myGap; + GeomConvert_ConvType myConvType; + GeomAbs_SurfaceType myTarget; + +}; + + +#endif // _GeomConvert_SurfToAnaSurf_HeaderFile diff --git a/src/GeomliteTest/GeomliteTest_SurfaceCommands.cxx b/src/GeomliteTest/GeomliteTest_SurfaceCommands.cxx index 4becc6f98a..37bf62d118 100644 --- a/src/GeomliteTest/GeomliteTest_SurfaceCommands.cxx +++ b/src/GeomliteTest/GeomliteTest_SurfaceCommands.cxx @@ -59,7 +59,9 @@ #include #include #include - +#include +#include +#include #include #include @@ -522,6 +524,111 @@ static Standard_Integer converting(Draw_Interpretor& , Standard_Integer n, const return 0; } +//======================================================================= +//function : converting to canonical +//purpose : +//======================================================================= + +static Standard_Integer tocanon(Draw_Interpretor& di, Standard_Integer n, const char ** a) +{ + if (n < 3) return 1; + + GeomConvert_ConvType aConvType = GeomConvert_Simplest; + GeomAbs_CurveType aCurv = GeomAbs_Line; + GeomAbs_SurfaceType aSurf = GeomAbs_Plane; + if (n > 4) + { + if (strcmp(a[4], "sim") == 0) { + aConvType = GeomConvert_Simplest; + } + else if (strcmp(a[4], "gap") == 0) { + aConvType = GeomConvert_MinGap; + } + else if (strcmp(a[4], "lin") == 0) { + aConvType = GeomConvert_Target; + aCurv = GeomAbs_Line; + } + else if (strcmp(a[4], "cir") == 0) { + aConvType = GeomConvert_Target; + aCurv = GeomAbs_Circle; + } + else if (strcmp(a[4], "ell") == 0) { + aConvType = GeomConvert_Target; + aCurv = GeomAbs_Ellipse; + } + else if (strcmp(a[4], "pln") == 0) { + aConvType = GeomConvert_Target; + aSurf = GeomAbs_Plane; + } + else if (strcmp(a[4], "cyl") == 0) { + aConvType = GeomConvert_Target; + aSurf = GeomAbs_Cylinder; + } + else if (strcmp(a[4], "con") == 0) { + aConvType = GeomConvert_Target; + aSurf = GeomAbs_Cone; + } + else if (strcmp(a[4], "sph") == 0) { + aConvType = GeomConvert_Target; + aSurf = GeomAbs_Sphere; + } + else if (strcmp(a[4], "tor") == 0) { + aConvType = GeomConvert_Target; + aSurf = GeomAbs_Torus; + } + } + + Standard_Real tol = Precision::Confusion(); + if (n > 3) + { + tol = Draw::Atof(a[3]); + } + + Handle(Geom_Curve) GC = DrawTrSurf::GetCurve(a[2]); + if (GC.IsNull()) { + Handle(Geom_Surface) GS = DrawTrSurf::GetSurface(a[2]); + if (GS.IsNull()) { + return 1; + } + else { + GeomConvert_SurfToAnaSurf aSurfToAna(GS); + aSurfToAna.SetConvType(aConvType); + if(aConvType == GeomConvert_Target) + aSurfToAna.SetTarget(aSurf); + Handle(Geom_Surface) anAnaSurf = aSurfToAna.ConvertToAnalytical(tol); + if (!anAnaSurf.IsNull()) + { + DrawTrSurf::Set(a[1], anAnaSurf); + Standard_Real aGap = aSurfToAna.Gap(); + di << "Gap = " << aGap << "\n"; + } + else + di << "Conversion failed" << "\n"; + } + } + else { + GeomConvert_CurveToAnaCurve aCurvToAna(GC); + aCurvToAna.SetConvType(aConvType); + if (aConvType == GeomConvert_Target) + aCurvToAna.SetTarget(aCurv); + + Handle(Geom_Curve) anAnaCurv; + Standard_Real tf = GC->FirstParameter(), tl = GC->LastParameter(), ntf, ntl; + Standard_Boolean isdone = aCurvToAna.ConvertToAnalytical(tol, anAnaCurv, tf, tl, ntf, ntl); + if (isdone) + { + anAnaCurv = new Geom_TrimmedCurve(anAnaCurv, ntf, ntl); + DrawTrSurf::Set(a[1], anAnaCurv); + Standard_Real aGap = aCurvToAna.Gap(); + di << "Gap = " << aGap << "\n"; + } + else + di << "Conversion failed" << "\n"; + } + + return 0; +} + //======================================================================= //function : tobezier @@ -1714,6 +1821,11 @@ void GeomliteTest::SurfaceCommands(Draw_Interpretor& theCommands) __FILE__, converting,g); + theCommands.Add("tocanon", + "tocanon result c3d/surf [tol [sim gap lin cir ell pln cyl con sph tor]]", + __FILE__, + tocanon, g); + theCommands.Add("tobezier", "tobezier result c2d/c3d/surf [ufirst, ulast / ufirst, ulast, vfirst, vlast]", __FILE__, diff --git a/src/SWDRAW/SWDRAW_ShapeAnalysis.cxx b/src/SWDRAW/SWDRAW_ShapeAnalysis.cxx index c07e225f40..26b00cbe47 100644 --- a/src/SWDRAW/SWDRAW_ShapeAnalysis.cxx +++ b/src/SWDRAW/SWDRAW_ShapeAnalysis.cxx @@ -61,6 +61,14 @@ #include #include #include +#include +#include +#include +#include +#include +#include +#include +#include #include static Standard_Integer tolerance @@ -976,6 +984,203 @@ static Standard_Integer checkedge(Draw_Interpretor& di, Standard_Integer argc, c return 0; } +//======================================================================= +// getanasurf +//======================================================================= +static Standard_Integer getanasurf(Draw_Interpretor& di, + Standard_Integer n, const char** a) + +{ + if (n < 3) { + di << "Usage: \n"; + di << "getanasurf res shape [target [tol [sample]]] \n"; + di << "target is reqired type of surface and can be: pln, cyl, con sph \n"; + di << "sample is surface of required type, which parameters are used as starting \n"; + di << "point for seaching parametrs of surface by Least Square method when input shape \n"; + di << "is edge or wire \n"; + return 1; + } + TopoDS_Shape sh = DBRep::Get(a[2]); + if (sh.IsNull()) return 1; + TopAbs_ShapeEnum aShType = sh.ShapeType(); + if (!(aShType == TopAbs_SHELL || aShType == TopAbs_FACE || aShType == TopAbs_EDGE || aShType == TopAbs_WIRE)) + { + di << "Wrong shape type, shape can be shell or face or edge or wire\n"; + return 1; + } + + GeomAbs_SurfaceType aTargets[] = { GeomAbs_Plane, GeomAbs_Cylinder, GeomAbs_Cone, GeomAbs_Sphere }; + Standard_Integer isurf = 0; + if (n > 3) + { + if (strcmp(a[3], "pln") == 0) + isurf = 0; + else if (strcmp(a[3], "cyl") == 0) + isurf = 1; + else if (strcmp(a[3], "con") == 0) + isurf = 2; + else if (strcmp(a[3], "sph") == 0) + isurf = 3; + } + + Standard_Real tol = 1.e-7; + if (n > 4) + tol = Draw::Atof(a[4]); + + // get sample target for edge and wire + GeomAdaptor_Surface aSampleSurf; + if (n > 5 && (sh.ShapeType() == TopAbs_EDGE || sh.ShapeType() == TopAbs_WIRE )) + { + Handle(Geom_Surface) aGSurf = DrawTrSurf::GetSurface(a[5]); + if (aGSurf.IsNull()) + { + di << "Sample surface is null" << "\n"; + return 1; + } + aSampleSurf.Load(aGSurf); + GeomAbs_SurfaceType aSType = aSampleSurf.GetType(); + if (aSType != aTargets[isurf]) + { + di << "Sample surface has wrong type" << "\n"; + return 1; + } + } + + ShapeAnalysis_CanonicalRecognition aCanonRec(sh); + Handle(Geom_Surface) aRes; + switch (aTargets[isurf]) + { + case GeomAbs_Plane: + { + gp_Pln aPln; + if (aSampleSurf.GetType() == GeomAbs_Plane) + aPln = aSampleSurf.Plane(); + if (aCanonRec.IsPlane(tol, aPln)) + aRes = new Geom_Plane(aPln); + break; + } + case GeomAbs_Cylinder: + { + gp_Cylinder aCyl; + if (aSampleSurf.GetType() == GeomAbs_Cylinder) + aCyl = aSampleSurf.Cylinder(); + if (aCanonRec.IsCylinder(tol, aCyl)) + aRes = new Geom_CylindricalSurface(aCyl); + break; + } + case GeomAbs_Cone: + { + gp_Cone aCon; + if (aSampleSurf.GetType() == GeomAbs_Cone) + aCon = aSampleSurf.Cone(); + if (aCanonRec.IsCone(tol, aCon)) + aRes = new Geom_ConicalSurface(aCon); + break; + } + case GeomAbs_Sphere: + { + gp_Sphere aSph; + if (aSampleSurf.GetType() == GeomAbs_Sphere) + aSph = aSampleSurf.Sphere(); + if (aCanonRec.IsSphere(tol, aSph)) + aRes = new Geom_SphericalSurface(aSph); + break; + } + default: + break; + } + + if (!aRes.IsNull()) + { + DrawTrSurf::Set(a[1], aRes); + di << "Gap = " << aCanonRec.GetGap() << "\n"; + } + else + { + di << "Cannot get required surface" << "\n"; + } + return 0; +} +//======================================================================= +//function : getanacurve +//purpose : +//======================================================================= + +Standard_Integer getanacurve(Draw_Interpretor& di, + Standard_Integer n, const char** a) +{ + if (n < 3) { + di << "Usage: \n"; + di << "getanacurve res shape [target [tol]] \n"; + di << "target is reqired type of curve and can be: lin, cir, ell \n"; + return 1; + } + TopoDS_Shape sh = DBRep::Get(a[2]); + if (sh.IsNull()) return 1; + TopAbs_ShapeEnum aShType = sh.ShapeType(); + if (!(aShType == TopAbs_WIRE || aShType == TopAbs_EDGE)) + { + di << "Wrong shape type, shape can be wire or or edge \n"; + return 1; + } + + GeomAbs_CurveType aTargets[] = { GeomAbs_Line, GeomAbs_Circle, GeomAbs_Ellipse }; + Standard_Integer icurv = 0; + if (n > 3) + { + if (strcmp(a[3],"lin") == 0) + icurv = 0; + else if (strcmp(a[3], "cir") == 0) + icurv = 1; + else if (strcmp(a[3], "ell") == 0) + icurv = 2; + } + + Standard_Real tol = Precision::Confusion(); + if (n > 4) + tol = Draw::Atof(a[4]); + + ShapeAnalysis_CanonicalRecognition aCanonRec(sh); + Handle(Geom_Curve) aRes; + switch (aTargets[icurv]) + { + case GeomAbs_Line: + { + gp_Lin aLin; + if (aCanonRec.IsLine(tol, aLin)) + aRes = new Geom_Line(aLin); + break; + } + case GeomAbs_Circle: + { + gp_Circ aCirc; + if (aCanonRec.IsCircle(tol, aCirc)) + aRes = new Geom_Circle(aCirc); + break; + } + case GeomAbs_Ellipse: + { + gp_Elips anElips; + if (aCanonRec.IsEllipse(tol, anElips)) + aRes = new Geom_Ellipse(anElips); + break; + } + default: + break; + } + + if (!aRes.IsNull()) + { + DrawTrSurf::Set(a[1], aRes); + di << "Gap = " << aCanonRec.GetGap() << "\n"; + } + else + { + di << "Cannot get required curve" << "\n"; + } + return 0; + +} //======================================================================= //function : InitCommands @@ -1018,4 +1223,8 @@ static Standard_Integer checkedge(Draw_Interpretor& di, Standard_Integer argc, c theCommands.Add("getareacontour","wire ",__FILE__, getareacontour, groupold); theCommands.Add ("checkselfintersection","wire [face]", __FILE__,checkselfintersection,g); theCommands.Add ("checkedge","edge [face]", __FILE__,checkedge,g); + theCommands.Add("getanasurf", "getanasurf res shape [target [tol [sample]]] ", __FILE__, getanasurf, g); + theCommands.Add("getanacurve", "getanacurve res shape [target [tol]]", __FILE__, getanacurve, g); + + } diff --git a/src/ShapeAnalysis/FILES b/src/ShapeAnalysis/FILES index 50a8c769d3..d9510dcbe9 100755 --- a/src/ShapeAnalysis/FILES +++ b/src/ShapeAnalysis/FILES @@ -44,3 +44,11 @@ ShapeAnalysis_WireOrder.cxx ShapeAnalysis_WireOrder.hxx ShapeAnalysis_WireVertex.cxx ShapeAnalysis_WireVertex.hxx +ShapeAnalysis_CanonicalRecognition.cxx +ShapeAnalysis_CanonicalRecognition.hxx +ShapeAnalysis_FuncSphereLSDist.cxx +ShapeAnalysis_FuncSphereLSDist.hxx +ShapeAnalysis_FuncCylinderLSDist.cxx +ShapeAnalysis_FuncCylinderLSDist.hxx +ShapeAnalysis_FuncConeLSDist.cxx +ShapeAnalysis_FuncConeLSDist.hxx diff --git a/src/ShapeAnalysis/ShapeAnalysis_CanonicalRecognition.cxx b/src/ShapeAnalysis/ShapeAnalysis_CanonicalRecognition.cxx new file mode 100644 index 0000000000..3abf8c12b5 --- /dev/null +++ b/src/ShapeAnalysis/ShapeAnalysis_CanonicalRecognition.cxx @@ -0,0 +1,1415 @@ +// Created on: 2000-01-20 +// Created by: data exchange team +// Copyright (c) 2000-2014 OPEN CASCADE SAS +// +// This file is part of Open CASCADE Technology software library. +// +// This library is free software{ you can redistribute it and/or modify it under +// the terms of the GNU Lesser General Public License version 2.1 as published +// by the Free Software Foundation, with special exception defined in the file +// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT +// distribution for complete text of the license and disclaimer of any warranty. +// +// Alternatively, this file may be used under the terms of Open CASCADE +// commercial license or contractual agreement. + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + + +//Declaration of static functions +static Standard_Integer GetNbPars(const GeomAbs_CurveType theTarget); +static Standard_Integer GetNbPars(const GeomAbs_SurfaceType theTarget); +static Standard_Boolean SetConicParameters(const GeomAbs_CurveType theTarget, const Handle(Geom_Curve)& theConic, + gp_Ax2& thePos, TColStd_Array1OfReal& theParams); +static Standard_Boolean CompareConicParams(const GeomAbs_CurveType theTarget, const Standard_Real theTol, + const gp_Ax2& theRefPos, const TColStd_Array1OfReal& theRefParams, + const gp_Ax2& thePos, const TColStd_Array1OfReal& theParams); +static Standard_Boolean SetSurfParams(const GeomAbs_SurfaceType theTarget, const Handle(Geom_Surface)& theElemSurf, + gp_Ax3& thePos, TColStd_Array1OfReal& theParams); +static Standard_Boolean CompareSurfParams(const GeomAbs_SurfaceType theTarget, const Standard_Real theTol, + const gp_Ax3& theRefPos, const TColStd_Array1OfReal& theRefParams, + const gp_Ax3& thePos, const TColStd_Array1OfReal& theParams); +static Standard_Real DeviationSurfParams(const GeomAbs_SurfaceType theTarget, + const gp_Ax3& theRefPos, const TColStd_Array1OfReal& theRefParams, + const gp_Ax3& thePos, const TColStd_Array1OfReal& theParams); +static Standard_Boolean GetSamplePoints(const TopoDS_Wire& theWire, + const Standard_Real theTol, const Standard_Integer theMaxNbInt, + Handle(TColgp_HArray1OfXYZ)& thePoints); +static Standard_Real GetLSGap(const Handle(TColgp_HArray1OfXYZ)& thePoints, const GeomAbs_SurfaceType theTarget, + const gp_Ax3& thePos, const TColStd_Array1OfReal& theParams); +static void FillSolverData(const GeomAbs_SurfaceType theTarget, + const gp_Ax3& thePos, const TColStd_Array1OfReal& theParams, + math_Vector& theStartPoint, + math_Vector& theFBnd, math_Vector& theLBnd, const Standard_Real theRelDev = 0.2); +static void SetCanonicParameters(const GeomAbs_SurfaceType theTarget, + const math_Vector& theSol, gp_Ax3& thePos, TColStd_Array1OfReal& theParams); + + +//======================================================================= +//function : Constructor +//purpose : +//======================================================================= + +ShapeAnalysis_CanonicalRecognition::ShapeAnalysis_CanonicalRecognition() : + mySType(TopAbs_SHAPE), myGap(-1.), myStatus(-1) +{ +} + +ShapeAnalysis_CanonicalRecognition::ShapeAnalysis_CanonicalRecognition(const TopoDS_Shape& theShape) : + mySType(TopAbs_SHAPE), myGap(-1.), myStatus(-1) +{ + Init(theShape); +} + +void ShapeAnalysis_CanonicalRecognition::SetShape(const TopoDS_Shape& theShape) +{ + Init(theShape); +} + +//======================================================================= +//function : Init +//purpose : +//======================================================================= + +void ShapeAnalysis_CanonicalRecognition::Init(const TopoDS_Shape& theShape) +{ + TopAbs_ShapeEnum aT = theShape.ShapeType(); + switch (aT) + { + case TopAbs_SHELL: + case TopAbs_FACE: + case TopAbs_WIRE: + case TopAbs_EDGE: + myShape = theShape; + mySType = aT; + myStatus = 0; + break; + default : + myStatus = 1; + break; + } +} + +//======================================================================= +//function : IsElementarySurf +//purpose : +//======================================================================= + +Standard_Boolean ShapeAnalysis_CanonicalRecognition::IsElementarySurf(const GeomAbs_SurfaceType theTarget, + const Standard_Real theTol, + gp_Ax3& thePos, TColStd_Array1OfReal& theParams) +{ + if (myStatus != 0) + return Standard_False; + // + if (mySType == TopAbs_FACE) + { + Handle(Geom_Surface) anElemSurf = GetSurface(TopoDS::Face(myShape), + theTol, GeomConvert_Target, theTarget, myGap, + myStatus); + if (anElemSurf.IsNull()) + return Standard_False; + // + Standard_Boolean isOK = SetSurfParams(theTarget, anElemSurf, thePos, theParams); + if (!isOK) + { + myStatus = 1; + return Standard_False; + } + return Standard_True; + } + else if (mySType == TopAbs_SHELL) + { + Handle(Geom_Surface) anElemSurf = GetSurface(TopoDS::Shell(myShape), theTol, + GeomConvert_Target, theTarget, myGap, myStatus); + if (anElemSurf.IsNull()) + { + return Standard_False; + } + Standard_Boolean isOK = SetSurfParams(theTarget, anElemSurf, thePos, theParams); + if (!isOK) + { + myStatus = 1; + return Standard_False; + } + return Standard_True; + } + else if (mySType == TopAbs_EDGE) + { + Handle(Geom_Surface) anElemSurf = GetSurface(TopoDS::Edge(myShape), + theTol, + GeomConvert_Target, theTarget, + thePos, theParams, + myGap, myStatus); + + Standard_Boolean isOK = SetSurfParams(theTarget, anElemSurf, thePos, theParams); + if (!isOK) + { + myStatus = 1; + return Standard_False; + } + return Standard_True; + } + else if (mySType == TopAbs_WIRE) + { + Handle(Geom_Surface) anElemSurf = GetSurface(TopoDS::Wire(myShape), + theTol, + GeomConvert_Target, theTarget, + thePos, theParams, + myGap, myStatus); + + Standard_Boolean isOK = SetSurfParams(theTarget, anElemSurf, thePos, theParams); + if (!isOK) + { + myStatus = 1; + return Standard_False; + } + return Standard_True; + } + return Standard_False; +} + +//======================================================================= +//function : IsPlane +//purpose : +//======================================================================= + +Standard_Boolean ShapeAnalysis_CanonicalRecognition::IsPlane(const Standard_Real theTol, gp_Pln& thePln) +{ + gp_Ax3 aPos = thePln.Position(); + TColStd_Array1OfReal aParams(1, 1); + // + GeomAbs_SurfaceType aTarget = GeomAbs_Plane; + if (IsElementarySurf(aTarget, theTol, aPos, aParams)) + { + thePln.SetPosition(aPos); + return Standard_True; + } + //Try to build plane for wire or edge + if (mySType == TopAbs_EDGE || mySType == TopAbs_WIRE) + { + BRepLib_FindSurface aFndSurf(myShape, theTol, Standard_True, Standard_False); + if (aFndSurf.Found()) + { + Handle(Geom_Plane) aPlane = Handle(Geom_Plane)::DownCast(aFndSurf.Surface()); + thePln = aPlane->Pln(); + myGap = aFndSurf.ToleranceReached(); + myStatus = 0; + return Standard_True; + } + else + myStatus = 1; + } + return Standard_False; +} + +//======================================================================= +//function : IsCylinder +//purpose : +//======================================================================= + +Standard_Boolean ShapeAnalysis_CanonicalRecognition::IsCylinder(const Standard_Real theTol, gp_Cylinder& theCyl) +{ + gp_Ax3 aPos = theCyl.Position(); + TColStd_Array1OfReal aParams(1, 1); + aParams(1) = theCyl.Radius(); + // + GeomAbs_SurfaceType aTarget = GeomAbs_Cylinder; + if (IsElementarySurf(aTarget, theTol, aPos, aParams)) + { + theCyl.SetPosition(aPos); + theCyl.SetRadius(aParams(1)); + return Standard_True; + } + + if (aParams(1) > Precision::Infinite()) + { + //Sample cylinder does not seem to be set, least square method is not applicable. + return Standard_False; + } + if (myShape.ShapeType() == TopAbs_EDGE || myShape.ShapeType() == TopAbs_WIRE) + { + //Try to build surface by least square method; + TopoDS_Wire aWire; + if (myShape.ShapeType() == TopAbs_EDGE) + { + BRep_Builder aBB; + aBB.MakeWire(aWire); + aBB.Add(aWire, myShape); + } + else + { + aWire = TopoDS::Wire(myShape); + } + Standard_Boolean isDone = GetSurfaceByLS(aWire, theTol, aTarget, aPos, aParams, myGap, myStatus); + if (isDone) + { + theCyl.SetPosition(aPos); + theCyl.SetRadius(aParams(1)); + return Standard_True; + } + } + return Standard_False; +} + +//======================================================================= +//function : IsCone +//purpose : +//======================================================================= + +Standard_Boolean ShapeAnalysis_CanonicalRecognition::IsCone(const Standard_Real theTol, gp_Cone& theCone) +{ + gp_Ax3 aPos = theCone.Position(); + TColStd_Array1OfReal aParams(1, 2); + aParams(1) = theCone.SemiAngle(); + aParams(2) = theCone.RefRadius(); + // + GeomAbs_SurfaceType aTarget = GeomAbs_Cone; + if (IsElementarySurf(aTarget, theTol, aPos, aParams)) + { + theCone.SetPosition(aPos); + theCone.SetSemiAngle(aParams(1)); + theCone.SetRadius(aParams(2)); + return Standard_True; + } + + + if (aParams(2) > Precision::Infinite()) + { + //Sample cone does not seem to be set, least square method is not applicable. + return Standard_False; + } + if (myShape.ShapeType() == TopAbs_EDGE || myShape.ShapeType() == TopAbs_WIRE) + { + //Try to build surface by least square method; + TopoDS_Wire aWire; + if (myShape.ShapeType() == TopAbs_EDGE) + { + BRep_Builder aBB; + aBB.MakeWire(aWire); + aBB.Add(aWire, myShape); + } + else + { + aWire = TopoDS::Wire(myShape); + } + Standard_Boolean isDone = GetSurfaceByLS(aWire, theTol, aTarget, aPos, aParams, myGap, myStatus); + if (isDone) + { + theCone.SetPosition(aPos); + theCone.SetSemiAngle(aParams(1)); + theCone.SetRadius(aParams(2)); + return Standard_True; + } + } + return Standard_False; +} + +//======================================================================= +//function : IsSphere +//purpose : +//======================================================================= + +Standard_Boolean ShapeAnalysis_CanonicalRecognition::IsSphere(const Standard_Real theTol, gp_Sphere& theSphere) +{ + gp_Ax3 aPos = theSphere.Position(); + TColStd_Array1OfReal aParams(1, 1); + aParams(1) = theSphere.Radius(); + // + GeomAbs_SurfaceType aTarget = GeomAbs_Sphere; + if (IsElementarySurf(aTarget, theTol, aPos, aParams)) + { + theSphere.SetPosition(aPos); + theSphere.SetRadius(aParams(1)); + return Standard_True; + } + // + if (aParams(1) > Precision::Infinite()) + { + //Sample sphere does not seem to be set, least square method is not applicable. + return Standard_False; + } + if (myShape.ShapeType() == TopAbs_EDGE || myShape.ShapeType() == TopAbs_WIRE) + { + //Try to build surface by least square method; + TopoDS_Wire aWire; + if (myShape.ShapeType() == TopAbs_EDGE) + { + BRep_Builder aBB; + aBB.MakeWire(aWire); + aBB.Add(aWire, myShape); + } + else + { + aWire = TopoDS::Wire(myShape); + } + Standard_Boolean isDone = GetSurfaceByLS(aWire, theTol, aTarget, aPos, aParams, myGap, myStatus); + if (isDone) + { + theSphere.SetPosition(aPos); + theSphere.SetRadius(aParams(1)); + return Standard_True; + } + } + return Standard_False; +} + +//======================================================================= +//function : IsConic +//purpose : +//======================================================================= + +Standard_Boolean ShapeAnalysis_CanonicalRecognition::IsConic(const GeomAbs_CurveType theTarget, + const Standard_Real theTol, + gp_Ax2& thePos, TColStd_Array1OfReal& theParams) +{ + if (myStatus != 0) + return Standard_False; + + if (mySType == TopAbs_EDGE) + { + Handle(Geom_Curve) aConic = GetCurve(TopoDS::Edge(myShape), theTol, + GeomConvert_Target, theTarget, myGap, myStatus); + + if (aConic.IsNull()) + return Standard_False; + + Standard_Boolean isOK = SetConicParameters(theTarget, aConic, thePos, theParams); + + if(!isOK) + { + myStatus = 1; + return Standard_False; + } + return Standard_True; + } + else if (mySType == TopAbs_WIRE) + { + TopoDS_Iterator anIter(myShape); + if (!anIter.More()) + { + myStatus = 1; + return Standard_False; + } + gp_Ax2 aPos; + TColStd_Array1OfReal aParams(1, theParams.Length()); + const TopoDS_Shape& anEdge = anIter.Value(); + + Handle(Geom_Curve) aConic = GetCurve(TopoDS::Edge(anEdge), theTol, + GeomConvert_Target, theTarget, myGap, myStatus); + if (aConic.IsNull()) + { + return Standard_False; + } + Standard_Boolean isOK = SetConicParameters(theTarget, aConic, thePos, theParams); + if (!isOK) + { + myStatus = 1; + return Standard_False; + } + if (!anIter.More()) + { + return Standard_True; + } + else + { + anIter.Next(); + } + for (; anIter.More(); anIter.Next()) + { + aConic = GetCurve(TopoDS::Edge(anIter.Value()), theTol, + GeomConvert_Target, theTarget, myGap, myStatus); + if (aConic.IsNull()) + { + return Standard_False; + } + isOK = SetConicParameters(theTarget, aConic, aPos, aParams); + isOK = CompareConicParams(theTarget, theTol, thePos, theParams, aPos, aParams); + + if (!isOK) + { + return Standard_False; + } + } + return Standard_True; + } + myStatus = 1; + return Standard_False; +} + + +//======================================================================= +//function : IsLine +//purpose : +//======================================================================= + +Standard_Boolean ShapeAnalysis_CanonicalRecognition::IsLine(const Standard_Real theTol, gp_Lin& theLin) +{ + gp_Ax2 aPos; + TColStd_Array1OfReal aParams(1, 1); + + GeomAbs_CurveType aTarget = GeomAbs_Line; + Standard_Boolean isOK = IsConic(aTarget, theTol, aPos, aParams); + if (isOK) + { + theLin.SetPosition(aPos.Axis()); + } + return isOK; +} + +//======================================================================= +//function : IsCircle +//purpose : +//======================================================================= + +Standard_Boolean ShapeAnalysis_CanonicalRecognition::IsCircle(const Standard_Real theTol, gp_Circ& theCirc) +{ + gp_Ax2 aPos; + TColStd_Array1OfReal aParams(1, 1); + + GeomAbs_CurveType aTarget = GeomAbs_Circle; + Standard_Boolean isOK = IsConic(aTarget, theTol, aPos, aParams); + if (isOK) + { + theCirc.SetPosition(aPos); + theCirc.SetRadius(aParams(1)); + } + return isOK; +} + +//======================================================================= +//function : IsEllipse +//purpose : +//======================================================================= + +Standard_Boolean ShapeAnalysis_CanonicalRecognition::IsEllipse(const Standard_Real theTol, gp_Elips& theElips) +{ + gp_Ax2 aPos; + TColStd_Array1OfReal aParams(1, 2); + + GeomAbs_CurveType aTarget = GeomAbs_Ellipse; + Standard_Boolean isOK = IsConic(aTarget, theTol, aPos, aParams); + if (isOK) + { + theElips.SetPosition(aPos); + theElips.SetMajorRadius(aParams(1)); + theElips.SetMinorRadius(aParams(2)); + } + return isOK; +} + + +//======================================================================= +//function : GetSurface +//purpose : +//======================================================================= + +Handle(Geom_Surface) ShapeAnalysis_CanonicalRecognition::GetSurface(const TopoDS_Face& theFace, + const Standard_Real theTol, + const GeomConvert_ConvType theType, const GeomAbs_SurfaceType theTarget, + Standard_Real& theGap, Standard_Integer& theStatus) +{ + theStatus = 0; + TopLoc_Location aLoc; + const Handle(Geom_Surface)& aSurf = BRep_Tool::Surface(theFace, aLoc); + if (aSurf.IsNull()) + { + theStatus = 1; + return aSurf; + } + GeomConvert_SurfToAnaSurf aConv(aSurf); + aConv.SetConvType(theType); + aConv.SetTarget(theTarget); + Handle(Geom_Surface) anAnaSurf = aConv.ConvertToAnalytical(theTol); + if (anAnaSurf.IsNull()) + return anAnaSurf; + // + if (!aLoc.IsIdentity()) + anAnaSurf->Transform(aLoc.Transformation()); + // + theGap = aConv.Gap(); + return anAnaSurf; +} + +//======================================================================= +//function : GetSurface +//purpose : +//======================================================================= + +Handle(Geom_Surface) ShapeAnalysis_CanonicalRecognition::GetSurface(const TopoDS_Shell& theShell, + const Standard_Real theTol, + const GeomConvert_ConvType theType, const GeomAbs_SurfaceType theTarget, + Standard_Real& theGap, Standard_Integer& theStatus) +{ + Handle(Geom_Surface) anElemSurf; + TopoDS_Iterator anIter(theShell); + if (!anIter.More()) + { + theStatus = 1; + return anElemSurf; + } + gp_Ax3 aPos1; + TColStd_Array1OfReal aParams1(1, Max(1, GetNbPars(theTarget))); + const TopoDS_Shape& aFace = anIter.Value(); + + anElemSurf = GetSurface(TopoDS::Face(aFace), theTol, + theType, theTarget, theGap, theStatus); + if (anElemSurf.IsNull()) + { + return anElemSurf; + } + SetSurfParams(theTarget, anElemSurf, aPos1, aParams1); + if (!anIter.More()) + { + return anElemSurf; + } + else + { + anIter.Next(); + } + gp_Ax3 aPos; + TColStd_Array1OfReal aParams(1, Max(1, GetNbPars(theTarget))); + Standard_Boolean isOK; + for (; anIter.More(); anIter.Next()) + { + Handle(Geom_Surface) anElemSurf1 = GetSurface(TopoDS::Face(anIter.Value()), theTol, + theType, theTarget, theGap, theStatus); + if (anElemSurf1.IsNull()) + { + return anElemSurf1; + } + SetSurfParams(theTarget, anElemSurf, aPos, aParams); + isOK = CompareSurfParams(theTarget, theTol, aPos1, aParams1, aPos, aParams); + + if (!isOK) + { + anElemSurf.Nullify(); + return anElemSurf; + } + } + return anElemSurf; +} + +//======================================================================= +//function : GetSurface +//purpose : +//======================================================================= + +Handle(Geom_Surface) ShapeAnalysis_CanonicalRecognition::GetSurface(const TopoDS_Edge& theEdge, + const Standard_Real theTol, + const GeomConvert_ConvType theType, const GeomAbs_SurfaceType theTarget, + gp_Ax3& thePos, TColStd_Array1OfReal& theParams, + Standard_Real& theGap, Standard_Integer& theStatus) +{ + //Get surface list + NCollection_Vector aSurfs; + NCollection_Vector aGaps; + Standard_Integer j = 0; + for (;;) { + j++; + Handle(Geom_Surface) aSurf; + TopLoc_Location aLoc; + Handle(Geom2d_Curve) aPCurve; + Standard_Real ff, ll; + BRep_Tool::CurveOnSurface(theEdge, aPCurve, aSurf, aLoc, ff, ll, j); + if (aSurf.IsNull()) { + break; + } + GeomConvert_SurfToAnaSurf aConv(aSurf); + aConv.SetConvType(theType); + aConv.SetTarget(theTarget); + Handle(Geom_Surface) anAnaSurf = aConv.ConvertToAnalytical(theTol); + if (anAnaSurf.IsNull()) + continue; + // + if (!aLoc.IsIdentity()) + anAnaSurf->Transform(aLoc.Transformation()); + // + aGaps.Append(aConv.Gap()); + aSurfs.Append(anAnaSurf); + } + + if (aSurfs.Size() == 0) + { + theStatus = 1; + return NULL; + } + + gp_Ax3 aPos; + Standard_Integer aNbPars = Max(1, GetNbPars(theTarget)); + TColStd_Array1OfReal aParams(1, aNbPars); + + Standard_Integer ifit = -1, i; + Standard_Real aMinDev = RealLast(); + if (aSurfs.Size() == 1) + { + ifit = 0; + } + else + { + for (i = 0; i < aSurfs.Size(); ++i) + { + SetSurfParams(theTarget, aSurfs(i), aPos, aParams); + Standard_Real aDev = DeviationSurfParams(theTarget, thePos, theParams, aPos, aParams); + if (aDev < aMinDev) + { + aMinDev = aDev; + ifit = i; + } + } + } + if (ifit >= 0) + { + SetSurfParams(theTarget, aSurfs(ifit), thePos, theParams); + theGap = aGaps(ifit); + return aSurfs(ifit); + } + else + { + theStatus = 1; + return NULL; + } +} + +//======================================================================= +//function : GetSurface +//purpose : +//======================================================================= + +Handle(Geom_Surface) ShapeAnalysis_CanonicalRecognition::GetSurface(const TopoDS_Wire& theWire, + const Standard_Real theTol, + const GeomConvert_ConvType theType, const GeomAbs_SurfaceType theTarget, + gp_Ax3& thePos, TColStd_Array1OfReal& theParams, + Standard_Real& theGap, Standard_Integer& theStatus) +{ + //Get surface list + NCollection_Vector aSurfs; + NCollection_Vector aGaps; + + TopoDS_Iterator anIter(theWire); + if (!anIter.More()) + { + // Empty wire + theStatus = 1; + return NULL; + } + //First edge + const TopoDS_Edge& anEdge1 = TopoDS::Edge(anIter.Value()); + gp_Ax3 aPos1 = thePos; + Standard_Integer aNbPars = GetNbPars(theTarget); + TColStd_Array1OfReal aParams1(1, Max(1, aNbPars)); + Standard_Real aGap1; + Standard_Integer i; + for (i = 1; i <= aNbPars; ++i) + { + aParams1(i) = theParams(i); + } + Handle(Geom_Surface) anElemSurf1 = GetSurface(anEdge1, theTol, + theType, theTarget, aPos1, aParams1, aGap1, theStatus); + if (theStatus != 0 || anElemSurf1.IsNull()) + { + return NULL; + } + anIter.Next(); + for(; anIter.More(); anIter.Next()) + { + gp_Ax3 aPos = aPos1; + aNbPars = GetNbPars(theTarget); + TColStd_Array1OfReal aParams(1, Max(1, aNbPars)); + for (i = 1; i <= aNbPars; ++i) + { + aParams(i) = aParams1(i); + } + Standard_Real aGap; + const TopoDS_Edge& anEdge = TopoDS::Edge(anIter.Value()); + Handle(Geom_Surface) anElemSurf = GetSurface(anEdge, theTol, + theType, theTarget, aPos, aParams, aGap, theStatus); + if (theStatus != 0 || anElemSurf.IsNull()) + { + return NULL; + } + Standard_Boolean isOK = CompareSurfParams(theTarget, theTol, + aPos1, aParams1, aPos, aParams); + if (!isOK) + { + return NULL; + } + } + + SetSurfParams(theTarget, anElemSurf1, thePos, theParams); + theGap = aGap1; + return anElemSurf1; + +} +//======================================================================= +//function : GetSurfaceByLS +//purpose : +//======================================================================= + +Standard_Boolean ShapeAnalysis_CanonicalRecognition::GetSurfaceByLS(const TopoDS_Wire& theWire, + const Standard_Real theTol, + const GeomAbs_SurfaceType theTarget, + gp_Ax3& thePos, TColStd_Array1OfReal& theParams, + Standard_Real& theGap, Standard_Integer& theStatus) +{ + Handle(TColgp_HArray1OfXYZ) aPoints; + Standard_Integer aNbMaxInt = 100; + if (!GetSamplePoints(theWire, theTol, aNbMaxInt, aPoints)) + return Standard_False; + + theGap = GetLSGap(aPoints, theTarget, thePos, theParams); + if (theGap <= theTol) + { + theStatus = 0; + return Standard_True; + } + + Standard_Integer aNbVar = 0; + if (theTarget == GeomAbs_Sphere) + aNbVar = 4; + else if (theTarget == GeomAbs_Cylinder) + aNbVar = 4; + else if (theTarget == GeomAbs_Cone) + aNbVar = 5; + else + return Standard_False; + + math_Vector aFBnd(1, aNbVar), aLBnd(1, aNbVar), aStartPoint(1, aNbVar); + + Standard_Real aRelDev = 0.2; //Customer can set parameters of sample surface + // with relative precision about aRelDev. + // For example, if radius of sample surface is R, + // it means, that "exact" vaue is in interav + //[R - aRelDev*R, R + aRelDev*R]. This intrrval is set + // for R as boundary values for dptimization algo. + FillSolverData(theTarget, thePos, theParams, + aStartPoint, aFBnd, aLBnd, aRelDev); + + // + Standard_Real aTol = Precision::Confusion(); + math_MultipleVarFunction* aPFunc; + ShapeAnalysis_FuncSphereLSDist aFuncSph(aPoints); + ShapeAnalysis_FuncCylinderLSDist aFuncCyl(aPoints, thePos.Direction()); + ShapeAnalysis_FuncConeLSDist aFuncCon(aPoints, thePos.Direction()); + if (theTarget == GeomAbs_Sphere) + { + aPFunc = (math_MultipleVarFunction*)&aFuncSph; + } + else if (theTarget == GeomAbs_Cylinder) + { + aPFunc = (math_MultipleVarFunction*)&aFuncCyl; + } + else if (theTarget == GeomAbs_Cone) + { + aPFunc = (math_MultipleVarFunction*)&aFuncCon; + } + else + aPFunc = NULL; + // + math_Vector aSteps(1, aNbVar); + Standard_Integer aNbInt = 10; + Standard_Integer i; + for (i = 1; i <= aNbVar; ++i) + { + aSteps(i) = (aLBnd(i) - aFBnd(i)) / aNbInt; + } + math_PSO aGlobSolver(aPFunc, aFBnd, aLBnd, aSteps); + Standard_Real aLSDist; + aGlobSolver.Perform(aSteps, aLSDist, aStartPoint); + SetCanonicParameters(theTarget, aStartPoint, thePos, theParams); + + theGap = GetLSGap(aPoints, theTarget, thePos, theParams); + if (theGap <= theTol) + { + theStatus = 0; + return Standard_True; + } + // + math_Matrix aDirMatrix(1, aNbVar, 1, aNbVar, 0.0); + for (i = 1; i <= aNbVar; i++) + aDirMatrix(i, i) = 1.0; + + if (theTarget == GeomAbs_Cylinder || theTarget == GeomAbs_Cone) + { + //Set search direction for location to be perpendicular to axis to avoid + //seaching along axis + const gp_Dir aDir = thePos.Direction(); + gp_Pln aPln(thePos.Location(), aDir); + gp_Dir aUDir = aPln.Position().XDirection(); + gp_Dir aVDir = aPln.Position().YDirection(); + for (i = 1; i <= 3; ++i) + { + aDirMatrix(i, 1) = aUDir.Coord(i); + aDirMatrix(i, 2) = aVDir.Coord(i); + gp_Dir aUVDir(aUDir.XYZ() + aVDir.XYZ()); + aDirMatrix(i, 3) = aUVDir.Coord(i); + } + } + + math_Powell aSolver(*aPFunc, aTol); + aSolver.Perform(*aPFunc, aStartPoint, aDirMatrix); + + if (aSolver.IsDone()) + { + aSolver.Location(aStartPoint); + theStatus = 0; + SetCanonicParameters(theTarget, aStartPoint, thePos, theParams); + theGap = GetLSGap(aPoints, theTarget, thePos, theParams); + theStatus = 0; + if(theGap <= theTol) + return Standard_True; + } + else + theStatus = 1; + + return Standard_False; + +} + +//======================================================================= +//function : GetCurve +//purpose : +//======================================================================= + +Handle(Geom_Curve) ShapeAnalysis_CanonicalRecognition::GetCurve(const TopoDS_Edge& theEdge, + const Standard_Real theTol, + const GeomConvert_ConvType theType, const GeomAbs_CurveType theTarget, + Standard_Real& theGap, Standard_Integer& theStatus) +{ + theStatus = 0; + TopLoc_Location aLoc; + Standard_Real f, l, nf, nl; + const Handle(Geom_Curve)& aCurv = BRep_Tool::Curve(theEdge, aLoc, f, l); + if (aCurv.IsNull()) + { + theStatus = 1; + return aCurv; + } + GeomConvert_CurveToAnaCurve aConv(aCurv); + aConv.SetConvType(theType); + aConv.SetTarget(theTarget); + Handle(Geom_Curve) anAnaCurv; + aConv.ConvertToAnalytical(theTol, anAnaCurv, f, l, nf, nl); + if (anAnaCurv.IsNull()) + return anAnaCurv; + // + if (!aLoc.IsIdentity()) + anAnaCurv->Transform(aLoc.Transformation()); + // + theGap = aConv.Gap(); + return anAnaCurv; +} + +//Static methods +//======================================================================= +//function : GetNbPars +//purpose : +//======================================================================= + +Standard_Integer GetNbPars(const GeomAbs_CurveType theTarget) +{ + Standard_Integer aNbPars = 0; + switch (theTarget) + { + case GeomAbs_Line: + aNbPars = 0; + break; + case GeomAbs_Circle: + aNbPars = 1; + break; + case GeomAbs_Ellipse: + aNbPars = 2; + break; + default: + aNbPars = 0; + break; + } + + return aNbPars; +} + +//======================================================================= +//function : GetNbPars +//purpose : +//======================================================================= + +Standard_Integer GetNbPars(const GeomAbs_SurfaceType theTarget) +{ + Standard_Integer aNbPars = 0; + switch (theTarget) + { + case GeomAbs_Plane: + aNbPars = 0; + break; + case GeomAbs_Cylinder: + case GeomAbs_Sphere: + aNbPars = 1; + break; + case GeomAbs_Cone: + aNbPars = 2; + break; + default: + aNbPars = 0; + break; + } + + return aNbPars; +} + +//======================================================================= +//function : SetConicParameters +//purpose : +//======================================================================= + +Standard_Boolean SetConicParameters(const GeomAbs_CurveType theTarget, const Handle(Geom_Curve)& theConic, + gp_Ax2& thePos, TColStd_Array1OfReal& theParams) +{ + if (theConic.IsNull()) + return Standard_False; + GeomAdaptor_Curve aGAC(theConic); + if(aGAC.GetType() != theTarget) + return Standard_False; + + if (theTarget == GeomAbs_Line) + { + gp_Lin aLin = aGAC.Line(); + thePos.SetAxis(aLin.Position()); + } + else if (theTarget == GeomAbs_Circle) + { + gp_Circ aCirc = aGAC.Circle(); + thePos = aCirc.Position(); + theParams(1) = aCirc.Radius(); + } + else if (theTarget == GeomAbs_Ellipse) + { + gp_Elips anElips = aGAC.Ellipse(); + thePos = anElips.Position(); + theParams(1) = anElips.MajorRadius(); + theParams(2) = anElips.MinorRadius(); + } + else + return Standard_False; + return Standard_True; + +} + +//======================================================================= +//function : CompareConicParams +//purpose : +//======================================================================= + +Standard_Boolean CompareConicParams(const GeomAbs_CurveType theTarget, const Standard_Real theTol, + const gp_Ax2& theRefPos, const TColStd_Array1OfReal& theRefParams, + const gp_Ax2& thePos, const TColStd_Array1OfReal& theParams) +{ + Standard_Integer i, aNbPars = GetNbPars(theTarget); + + for (i = 1; i <= aNbPars; ++i) + { + if (Abs(theRefParams(i) - theParams(i)) > theTol) + return Standard_False; + } + + Standard_Real anAngTol = theTol / (2. * M_PI); + Standard_Real aTol = theTol; + if (theTarget == GeomAbs_Line) + aTol = Precision::Infinite(); + + const gp_Ax1& aRef = theRefPos.Axis(); + const gp_Ax1& anAx1 = thePos.Axis(); + gp_Ax1 anAx1Rev = anAx1.Reversed(); + + if (aRef.IsCoaxial(anAx1, anAngTol, aTol) || aRef.IsCoaxial(anAx1Rev, anAngTol, aTol)) + { + return Standard_True; + } + return Standard_False; +} + +//======================================================================= +//function : SetSurfParams +//purpose : +//======================================================================= + +Standard_Boolean SetSurfParams(const GeomAbs_SurfaceType theTarget, const Handle(Geom_Surface)& theElemSurf, + gp_Ax3& thePos, TColStd_Array1OfReal& theParams) +{ + // + if (theElemSurf.IsNull()) + return Standard_False; + GeomAdaptor_Surface aGAS(theElemSurf); + if (aGAS.GetType() != theTarget) + return Standard_False; + + Standard_Real aNbPars = GetNbPars(theTarget); + if (theParams.Length() < aNbPars) + return Standard_False; + + if (theTarget == GeomAbs_Plane) + { + gp_Pln aPln = aGAS.Plane(); + thePos = aPln.Position(); + } + else if (theTarget == GeomAbs_Cylinder) + { + gp_Cylinder aCyl = aGAS.Cylinder(); + thePos = aCyl.Position(); + theParams(1) = aCyl.Radius(); + } + else if (theTarget == GeomAbs_Cone) + { + gp_Cone aCon = aGAS.Cone(); + thePos = aCon.Position(); + theParams(1) = aCon.SemiAngle(); + theParams(2) = aCon.RefRadius(); + } + else if (theTarget == GeomAbs_Sphere) + { + gp_Sphere aSph = aGAS.Sphere(); + thePos = aSph.Position(); + theParams(1) = aSph.Radius(); + } + else + { + return Standard_False; + } + return Standard_True; +} + +//======================================================================= +//function : CompareSurfParams +//purpose : +//======================================================================= + +Standard_Boolean CompareSurfParams(const GeomAbs_SurfaceType theTarget, const Standard_Real theTol, + const gp_Ax3& theRefPos, const TColStd_Array1OfReal& theRefParams, + const gp_Ax3& thePos, const TColStd_Array1OfReal& theParams) +{ + if (theTarget != GeomAbs_Plane) + { + if (Abs(theRefParams(1) - theParams(1)) > theTol) + { + return Standard_False; + } + } + // + if (theTarget == GeomAbs_Sphere) + { + gp_Pnt aRefLoc = theRefPos.Location(), aLoc = thePos.Location(); + if (aRefLoc.SquareDistance(aLoc) <= theTol*theTol) + { + return Standard_True; + } + return Standard_False; + } + // + Standard_Real anAngTol = theTol / (2. * M_PI); + Standard_Real aTol = theTol; + if (theTarget == GeomAbs_Cylinder || theTarget == GeomAbs_Cone) + { + aTol = Precision::Infinite(); + } + + const gp_Ax1& aRef = theRefPos.Axis(); + const gp_Ax1& anAx1 = thePos.Axis(); + gp_Ax1 anAx1Rev = anAx1.Reversed(); + if (!(aRef.IsCoaxial(anAx1, anAngTol, aTol) || aRef.IsCoaxial(anAx1Rev, anAngTol, aTol))) + { + return Standard_False; + } + + if (theTarget == GeomAbs_Cone) + { + gp_Cone aRefCone(theRefPos, theRefParams(1), theRefParams(2)); + gp_Cone aCone(thePos, theParams(1), theParams(2)); + gp_Pnt aRefApex = aRefCone.Apex(); + gp_Pnt anApex = aCone.Apex(); + if (aRefApex.SquareDistance(anApex) <= theTol*theTol) + { + return Standard_True; + } + return Standard_False; + } + + return Standard_True; +} + +//======================================================================= +//function : DeviationSurfParams +//purpose : +//======================================================================= + +Standard_Real DeviationSurfParams(const GeomAbs_SurfaceType theTarget, + const gp_Ax3& theRefPos, const TColStd_Array1OfReal& theRefParams, + const gp_Ax3& thePos, const TColStd_Array1OfReal& theParams) +{ + Standard_Real aDevPars = 0.; + if (theTarget != GeomAbs_Plane) + { + aDevPars = Abs(theRefParams(1) - theParams(1)); + } + // + if (theTarget == GeomAbs_Sphere) + { + gp_Pnt aRefLoc = theRefPos.Location(), aLoc = thePos.Location(); + aDevPars += aRefLoc.Distance(aLoc); + } + else + { + const gp_Dir& aRefDir = theRefPos.Direction(); + const gp_Dir& aDir = thePos.Direction(); + Standard_Real anAngDev = (1. - Abs(aRefDir * aDir)); + aDevPars += anAngDev; + } + + return aDevPars; +} + +//======================================================================= +//function : GetSamplePoints +//purpose : +//======================================================================= + +Standard_Boolean GetSamplePoints(const TopoDS_Wire& theWire, + const Standard_Real theTol, + const Standard_Integer theMaxNbInt, + Handle(TColgp_HArray1OfXYZ)& thePoints) +{ + NCollection_Vector aLengths; + NCollection_Vector aCurves; + NCollection_Vector aPoints; + Standard_Real aTol = Max(1.e-3, theTol/10.); + Standard_Real aTotalLength = 0.; + TopoDS_Iterator anEIter(theWire); + for (; anEIter.More(); anEIter.Next()) + { + const TopoDS_Edge& anE = TopoDS::Edge(anEIter.Value()); + if (BRep_Tool::Degenerated(anE)) + continue; + BRepAdaptor_Curve aBAC(anE); + Standard_Real aClength = GCPnts_AbscissaPoint::Length(aBAC, aTol); + aTotalLength += aClength; + aCurves.Append(aBAC); + aLengths.Append(aClength); + } + + if(aTotalLength < theTol) + return Standard_False; + + Standard_Integer i, aNb = aLengths.Length(); + for (i = 0; i < aNb; ++i) + { + const BRepAdaptor_Curve& aC = aCurves(i); + Standard_Real aClength = GCPnts_AbscissaPoint::Length(aC, aTol); + Standard_Integer aNbPoints = RealToInt(aClength / aTotalLength * theMaxNbInt + 1); + aNbPoints = Max(2, aNbPoints); + GCPnts_QuasiUniformAbscissa aPointGen(aC, aNbPoints); + if (!aPointGen.IsDone()) + continue; + aNbPoints = aPointGen.NbPoints(); + Standard_Integer j; + for (j = 1; j <= aNbPoints; ++j) + { + Standard_Real t = aPointGen.Parameter(j); + gp_Pnt aP = aC.Value(t); + aPoints.Append(aP.XYZ()); + } + } + + if (aPoints.Length() < 1) + return Standard_False; + + thePoints = new TColgp_HArray1OfXYZ(1, aPoints.Length()); + for (i = 0; i < aPoints.Length(); ++i) + { + thePoints->SetValue(i + 1, aPoints(i)); + } + + return Standard_True; + +} + +//======================================================================= +//function : GetLSGap +//purpose : +//======================================================================= + +static Standard_Real GetLSGap(const Handle(TColgp_HArray1OfXYZ)& thePoints, const GeomAbs_SurfaceType theTarget, + const gp_Ax3& thePos, const TColStd_Array1OfReal& theParams) +{ + + Standard_Real aGap = 0.; + gp_XYZ aLoc = thePos.Location().XYZ(); + gp_Vec aDir(thePos.Direction()); + + + Standard_Integer i; + if (theTarget == GeomAbs_Sphere) + { + Standard_Real anR = theParams(1); + for (i = thePoints->Lower(); i <= thePoints->Upper(); ++i) + { + gp_XYZ aD = thePoints->Value(i) - aLoc; + aGap = Max(aGap, Abs((aD.Modulus() - anR))); + } + } + else if (theTarget == GeomAbs_Cylinder) + { + Standard_Real anR = theParams(1); + for (i = thePoints->Lower(); i <= thePoints->Upper(); ++i) + { + gp_Vec aD(thePoints->Value(i) - aLoc); + aD.Cross(aDir); + aGap = Max(aGap, Abs((aD.Magnitude() - anR))); + } + } + else if (theTarget == GeomAbs_Cone) + { + Standard_Real anAng = theParams(1); + Standard_Real anR = theParams(2); + for (i = thePoints->Lower(); i <= thePoints->Upper(); ++i) + { + Standard_Real u, v; + gp_Pnt aPi(thePoints->Value(i)); + ElSLib::ConeParameters(thePos, anR, anAng, aPi, u, v); + gp_Pnt aPp; + ElSLib::ConeD0(u, v, thePos, anR, anAng, aPp); + aGap = Max(aGap, aPi.SquareDistance(aPp)); + } + aGap = Sqrt(aGap); + } + + return aGap; +} + +//======================================================================= +//function : FillSolverData +//purpose : +//======================================================================= + +void FillSolverData(const GeomAbs_SurfaceType theTarget, + const gp_Ax3& thePos, const TColStd_Array1OfReal& theParams, + math_Vector& theStartPoint, + math_Vector& theFBnd, math_Vector& theLBnd, const Standard_Real theRelDev) +{ + if (theTarget == GeomAbs_Sphere || theTarget == GeomAbs_Cylinder) + { + theStartPoint(1) = thePos.Location().X(); + theStartPoint(2) = thePos.Location().Y(); + theStartPoint(3) = thePos.Location().Z(); + theStartPoint(4) = theParams(1); + Standard_Real aDR = theRelDev * theParams(1); + Standard_Real aDXYZ = aDR; + Standard_Integer i; + for (i = 1; i <= 3; ++i) + { + theFBnd(i) = theStartPoint(i) - aDXYZ; + theLBnd(i) = theStartPoint(i) + aDXYZ; + } + theFBnd(4) = theStartPoint(4) - aDR; + theLBnd(4) = theStartPoint(4) + aDR; + } + if (theTarget == GeomAbs_Cone) + { + theStartPoint(1) = thePos.Location().X(); + theStartPoint(2) = thePos.Location().Y(); + theStartPoint(3) = thePos.Location().Z(); + theStartPoint(4) = theParams(1); //SemiAngle + theStartPoint(5) = theParams(2); //Radius + Standard_Real aDR = theRelDev * theParams(2); + if (aDR < Precision::Confusion()) + { + aDR = 0.1; + } + Standard_Real aDXYZ = aDR; + Standard_Real aDAng = theRelDev * Abs(theParams(1)); + Standard_Integer i; + for (i = 1; i <= 3; ++i) + { + theFBnd(i) = theStartPoint(i) - aDXYZ; + theLBnd(i) = theStartPoint(i) + aDXYZ; + } + if (theParams(1) >= 0.) + { + theFBnd(4) = theStartPoint(4) - aDAng; + theLBnd(4) = Min(M_PI_2, theStartPoint(4) + aDR); + } + else + { + theFBnd(4) = Max(-M_PI_2, theStartPoint(4) - aDAng); + theLBnd(4) = theStartPoint(4) + aDAng; + } + theFBnd(5) = theStartPoint(5) - aDR; + theLBnd(5) = theStartPoint(5) + aDR; + } + +} + +//======================================================================= +//function : SetCanonicParameters +//purpose : +//======================================================================= + +void SetCanonicParameters(const GeomAbs_SurfaceType theTarget, + const math_Vector& theSol, gp_Ax3& thePos, TColStd_Array1OfReal& theParams) +{ + gp_Pnt aLoc(theSol(1), theSol(2), theSol(3)); + thePos.SetLocation(aLoc); + if (theTarget == GeomAbs_Sphere || theTarget == GeomAbs_Cylinder) + { + theParams(1) = theSol(4);//radius + } + else if (theTarget == GeomAbs_Cone) + { + theParams(1) = theSol(4);//semiangle + theParams(2) = theSol(5);//radius + } + +} \ No newline at end of file diff --git a/src/ShapeAnalysis/ShapeAnalysis_CanonicalRecognition.hxx b/src/ShapeAnalysis/ShapeAnalysis_CanonicalRecognition.hxx new file mode 100644 index 0000000000..7fa079b82c --- /dev/null +++ b/src/ShapeAnalysis/ShapeAnalysis_CanonicalRecognition.hxx @@ -0,0 +1,169 @@ +// Copyright (c) 2022 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 _ShapeAnalysis_CanonicalRecognition_HeaderFile +#define _ShapeAnalysis_CanonicalRecognition_HeaderFile + +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +class gp_Pln; +class gp_Cone; +class gp_Cylinder; +class gp_Sphere; +class gp_Lin; +class gp_Circ; +class gp_Elips; +class Geom_Curve; +class Geom_Surface; + +//! This class provides operators for analysis surfaces and curves of shapes +//! in order to find out more simple geometry entities, which could replace +//! existing complex (for exampe, BSpline) geometry objects with given tolerance. +class ShapeAnalysis_CanonicalRecognition +{ +public: + + DEFINE_STANDARD_ALLOC + + + //! Empty constructor + Standard_EXPORT ShapeAnalysis_CanonicalRecognition(); + + //! constructor with shape initialisation + Standard_EXPORT ShapeAnalysis_CanonicalRecognition(const TopoDS_Shape& theShape); + + //! Sets shape + Standard_EXPORT void SetShape(const TopoDS_Shape& theShape); + + //! Returns input shape + const TopoDS_Shape& GetShape() const + { + return myShape; + } + + //! Returns deviation between input geometry entity and analytical entity + Standard_Real GetGap() const + { + return myGap; + } + + //! Returns status of operation. + //! Current meaning of possible values of status: + //! -1 - algorithm is not initalazed by shape + //! 0 - no errors + //! 1 - error during any operation (usually - because of wrong input data) + //! Any operation (calling any methods like IsPlane(...), ...) can be performed + //! when current staue is equal 0. + //! If after any operation status != 0, it is necessary to set it 0 by method ClearStatus() + //! before calling other operation. + Standard_Integer GetStatus() const + { + return myStatus; + } + + //! Returns status to be equal 0. + void ClearStatus() + { + myStatus = 0; + } + + //! Returns true if the underlined surface can be represent by plane with tolerance theTol + //! and sets in thePln the result plane. + Standard_EXPORT Standard_Boolean IsPlane(const Standard_Real theTol, gp_Pln& thePln); + + //! Returns true if the underlined surface can be represent by cylindrical one with tolerance theTol + //! and sets in theCyl the result cylinrical surface. + Standard_EXPORT Standard_Boolean IsCylinder(const Standard_Real theTol, gp_Cylinder& theCyl); + + //! Returns true if the underlined surface can be represent by conical one with tolerance theTol + //! and sets in theCone the result conical surface. + Standard_EXPORT Standard_Boolean IsCone(const Standard_Real theTol, gp_Cone& theCone); + + //! Returns true if the underlined surface can be represent by spherical one with tolerance theTol + //! and sets in theSphere the result spherical surface. + Standard_EXPORT Standard_Boolean IsSphere(const Standard_Real theTol, gp_Sphere& theSphere); + + //! Returns true if the underlined curve can be represent by line with tolerance theTol + //! and sets in theLin the result line. + Standard_EXPORT Standard_Boolean IsLine(const Standard_Real theTol, gp_Lin& theLin); + + //! Returns true if the underlined curve can be represent by circle with tolerance theTol + //! and sets in theCirc the result circle. + Standard_EXPORT Standard_Boolean IsCircle(const Standard_Real theTol, gp_Circ& theCirc); + + //! Returns true if the underlined curve can be represent by ellipse with tolerance theTol + //! and sets in theCirc the result ellipse. + Standard_EXPORT Standard_Boolean IsEllipse(const Standard_Real theTol, gp_Elips& theElips); + + +private: + Standard_Boolean IsElementarySurf(const GeomAbs_SurfaceType theTarget, const Standard_Real theTol, + gp_Ax3& thePos, TColStd_Array1OfReal& theParams); + + Standard_Boolean IsConic(const GeomAbs_CurveType theTarget, const Standard_Real theTol, + gp_Ax2& thePos, TColStd_Array1OfReal& theParams); + + static Handle(Geom_Surface) GetSurface(const TopoDS_Face& theFace, const Standard_Real theTol, + const GeomConvert_ConvType theType, const GeomAbs_SurfaceType theTarget, + Standard_Real& theGap, Standard_Integer& theStatus); + + static Handle(Geom_Surface) GetSurface(const TopoDS_Shell& theShell, const Standard_Real theTol, + const GeomConvert_ConvType theType, const GeomAbs_SurfaceType theTarget, + Standard_Real& theGap, Standard_Integer& theStatus); + + static Handle(Geom_Surface) GetSurface(const TopoDS_Edge& theEdge, const Standard_Real theTol, + const GeomConvert_ConvType theType, const GeomAbs_SurfaceType theTarget, + gp_Ax3& thePos, TColStd_Array1OfReal& theParams, + Standard_Real& theGap, Standard_Integer& theStatus); + + static Handle(Geom_Surface) GetSurface(const TopoDS_Wire& theWire, const Standard_Real theTol, + const GeomConvert_ConvType theType, const GeomAbs_SurfaceType theTarget, + gp_Ax3& thePos, TColStd_Array1OfReal& theParams, + Standard_Real& theGap, Standard_Integer& theStatus); + + static Handle(Geom_Curve) GetCurve(const TopoDS_Edge& theEdge, const Standard_Real theTol, + const GeomConvert_ConvType theType, const GeomAbs_CurveType theTarget, + Standard_Real& theGap, Standard_Integer& theStatus); + + static Standard_Boolean GetSurfaceByLS(const TopoDS_Wire& theWire, const Standard_Real theTol, + const GeomAbs_SurfaceType theTarget, + gp_Ax3& thePos, TColStd_Array1OfReal& theParams, + Standard_Real& theGap, Standard_Integer& theStatus); + + void Init(const TopoDS_Shape& theShape); + +private: + + TopoDS_Shape myShape; + TopAbs_ShapeEnum mySType; + Standard_Real myGap; + Standard_Integer myStatus; + +}; + +#endif // _ShapeAnalysis_CanonicalRecognition_HeaderFile diff --git a/src/ShapeAnalysis/ShapeAnalysis_FuncConeLSDist.cxx b/src/ShapeAnalysis/ShapeAnalysis_FuncConeLSDist.cxx new file mode 100644 index 0000000000..865d9e872a --- /dev/null +++ b/src/ShapeAnalysis/ShapeAnalysis_FuncConeLSDist.cxx @@ -0,0 +1,68 @@ +// Copyright (c) 1995-1999 Matra Datavision +// Copyright (c) 1999-2022 OPEN CASCADE SAS +// +// This file is part of Open CASCADE Technology software library. +// +// This library is free software; you can redistribute it and/or modify it under +// the terms of the GNU Lesser General Public License version 2.1 as published +// by the Free Software Foundation, with special exception defined in the file +// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT +// distribution for complete text of the license and disclaimer of any warranty. +// +// Alternatively, this file may be used under the terms of Open CASCADE +// commercial license or contractual agreement. + + +#include +#include +#include +#include +#include +#include + +//======================================================================= +//function : ShapeAnalysis_FuncConeLSDist +//purpose : +//======================================================================= +ShapeAnalysis_FuncConeLSDist::ShapeAnalysis_FuncConeLSDist( + const Handle(TColgp_HArray1OfXYZ)& thePoints, + const gp_Dir& theDir): + myPoints(thePoints), myDir(theDir) +{ +} + +//======================================================================= +//function : NbVariables +//purpose : +//======================================================================= +Standard_Integer ShapeAnalysis_FuncConeLSDist::NbVariables () const +{ + return 5; +} + +//======================================================================= +//function : Value +//purpose : +//======================================================================= +Standard_Boolean ShapeAnalysis_FuncConeLSDist::Value(const math_Vector& X, Standard_Real& F) +{ + gp_Pnt aLoc(X(1), X(2), X(3)); + Standard_Real aSemiAngle = X(4), anR = X(5); + gp_Ax3 aPos(aLoc, myDir); + + F = 0.; + Standard_Integer i; + for (i = myPoints->Lower(); i <= myPoints->Upper(); ++i) + { + Standard_Real u, v; + gp_Pnt aPi(myPoints->Value(i)); + ElSLib::ConeParameters(aPos, anR, aSemiAngle, aPi, u, v); + gp_Pnt aPp; + ElSLib::ConeD0(u, v, aPos, anR, aSemiAngle, aPp); + F += aPi.SquareDistance(aPp); + } + + return Standard_True; +} + + diff --git a/src/ShapeAnalysis/ShapeAnalysis_FuncConeLSDist.hxx b/src/ShapeAnalysis/ShapeAnalysis_FuncConeLSDist.hxx new file mode 100644 index 0000000000..381b86cc3f --- /dev/null +++ b/src/ShapeAnalysis/ShapeAnalysis_FuncConeLSDist.hxx @@ -0,0 +1,66 @@ +// Copyright (c) 1991-1999 Matra Datavision +// Copyright (c) 1999-2022 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 _ShapeAnalysis_FuncConeLSDist_HeaderFile +#define _ShapeAnalysis_FuncConeLSDist_HeaderFile + +#include +#include + +#include +#include +#include +#include + +//! Function for search of Cone canonic parameters: coordinates of center local coordinate system, +//! direction of axis, radius and semi-angle from set of points +//! by least square method. +//! +//! +class ShapeAnalysis_FuncConeLSDist : public math_MultipleVarFunction +{ +public: + + DEFINE_STANDARD_ALLOC + + //! Constructor. + Standard_EXPORT ShapeAnalysis_FuncConeLSDist() {}; + + Standard_EXPORT ShapeAnalysis_FuncConeLSDist(const Handle(TColgp_HArray1OfXYZ)& thePoints, + const gp_Dir& theDir); + + void SetPoints(const Handle(TColgp_HArray1OfXYZ)& thePoints) + { + myPoints = thePoints; + } + + void SetDir(const gp_Dir& theDir) + { + myDir = theDir; + } + + //! Number of variables. + Standard_EXPORT Standard_Integer NbVariables() const Standard_OVERRIDE; + + //! Value. + Standard_EXPORT Standard_Boolean Value(const math_Vector& X,Standard_Real& F) Standard_OVERRIDE; + + +private: + + Handle(TColgp_HArray1OfXYZ) myPoints; + gp_Dir myDir; + +}; +#endif // _ShapeAnalysis_FuncConeLSDist_HeaderFile diff --git a/src/ShapeAnalysis/ShapeAnalysis_FuncCylinderLSDist.cxx b/src/ShapeAnalysis/ShapeAnalysis_FuncCylinderLSDist.cxx new file mode 100644 index 0000000000..681bef12f2 --- /dev/null +++ b/src/ShapeAnalysis/ShapeAnalysis_FuncCylinderLSDist.cxx @@ -0,0 +1,140 @@ +// Copyright (c) 1995-1999 Matra Datavision +// Copyright (c) 1999-2022 OPEN CASCADE SAS +// +// This file is part of Open CASCADE Technology software library. +// +// This library is free software; you can redistribute it and/or modify it under +// the terms of the GNU Lesser General Public License version 2.1 as published +// by the Free Software Foundation, with special exception defined in the file +// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT +// distribution for complete text of the license and disclaimer of any warranty. +// +// Alternatively, this file may be used under the terms of Open CASCADE +// commercial license or contractual agreement. + + +#include +#include +#include +#include + +//======================================================================= +//function : ShapeAnalysis_FuncCylinderLSDist +//purpose : +//======================================================================= +ShapeAnalysis_FuncCylinderLSDist::ShapeAnalysis_FuncCylinderLSDist( + const Handle(TColgp_HArray1OfXYZ)& thePoints, + const gp_Dir& theDir): + myPoints(thePoints), myDir(theDir) +{ +} + +//======================================================================= +//function : NbVariables +//purpose : +//======================================================================= +Standard_Integer ShapeAnalysis_FuncCylinderLSDist::NbVariables () const +{ + return 4; +} + +//======================================================================= +//function : Value +//purpose : +//======================================================================= +Standard_Boolean ShapeAnalysis_FuncCylinderLSDist::Value(const math_Vector& X,Standard_Real& F) +{ + gp_XYZ aLoc(X(1), X(2), X(3)); + Standard_Real anR2 = X(4)*X(4); + + F = 0.; + Standard_Integer i; + for (i = myPoints->Lower(); i <= myPoints->Upper(); ++i) + { + gp_Vec aV(myPoints->Value(i) - aLoc); + Standard_Real aD2 = aV.CrossSquareMagnitude(myDir); + Standard_Real d = aD2 - anR2; + F += d * d; + } + + return Standard_True; +} + +//======================================================================= +//function : Gradient +//purpose : +//======================================================================= +Standard_Boolean ShapeAnalysis_FuncCylinderLSDist::Gradient(const math_Vector& X,math_Vector& G) + +{ + gp_XYZ aLoc(X(1), X(2), X(3)); + Standard_Real anR = X(4), anR2 = anR * anR; + Standard_Real x = myDir.X(), y = myDir.Y(), z = myDir.Z(); + G.Init(0.); + + Standard_Integer i; + for (i = myPoints->Lower(); i <= myPoints->Upper(); ++i) + { + gp_Vec aV(myPoints->Value(i) - aLoc); + Standard_Real aD2 = aV.CrossSquareMagnitude(myDir); + Standard_Real d = aD2 - anR2; + Standard_Real Dx0 = 2.*(aV.Z()*x - aV.X()*z)*z + -2.*(aV.X()*y - aV.Y()*x)*y; + Standard_Real Dy0 = -2.*(aV.Y()*z - aV.Z()*y)*z + +2.*(aV.X()*y - aV.Y()*x)*x; + Standard_Real Dz0 = 2.*(aV.Y()*z - aV.Z()*y)*y + -2.*(aV.Z()*x - aV.X()*z)*x; + + G(1) += d * Dx0; + G(2) += d * Dy0; + G(3) += d * Dz0; + // + G(4) += d; + } + + G *= 2; + G(6) *= -2.*anR; + + return Standard_True; +} + +//======================================================================= +//function : Values +//purpose : +//======================================================================= +Standard_Boolean ShapeAnalysis_FuncCylinderLSDist::Values(const math_Vector& X,Standard_Real& F,math_Vector& G) +{ + gp_XYZ aLoc(X(1), X(2), X(3)); + Standard_Real anR = X(4), anR2 = anR * anR; + Standard_Real x = myDir.X(), y = myDir.Y(), z = myDir.Z(); + + F = 0.; + G.Init(0.); + Standard_Integer i; + for (i = myPoints->Lower(); i <= myPoints->Upper(); ++i) + { + gp_Vec aV(myPoints->Value(i) - aLoc); + Standard_Real aD2 = aV.CrossSquareMagnitude(myDir); + Standard_Real d = aD2 - anR2; + Standard_Real Dx0 = 2.*(aV.Z()*x - aV.X()*z)*z + - 2.*(aV.X()*y - aV.Y()*x)*y; + Standard_Real Dy0 = -2.*(aV.Y()*z - aV.Z()*y)*z + + 2.*(aV.X()*y - aV.Y()*x)*x; + Standard_Real Dz0 = 2.*(aV.Y()*z - aV.Z()*y)*y + - 2.*(aV.Z()*x - aV.X()*z)*x; + + G(1) += d * Dx0; + G(2) += d * Dy0; + G(3) += d * Dz0; + // + G(4) += d; + // + F += d * d; + } + + G *= 2; + G(4) *= -2.*anR; + + return true; +} + diff --git a/src/ShapeAnalysis/ShapeAnalysis_FuncCylinderLSDist.hxx b/src/ShapeAnalysis/ShapeAnalysis_FuncCylinderLSDist.hxx new file mode 100644 index 0000000000..3375e522e7 --- /dev/null +++ b/src/ShapeAnalysis/ShapeAnalysis_FuncCylinderLSDist.hxx @@ -0,0 +1,100 @@ +// Copyright (c) 1991-1999 Matra Datavision +// Copyright (c) 1999-2022 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 _ShapeAnalysis_FuncCylinderLSDist_HeaderFile +#define _ShapeAnalysis_FuncCylinderLSDist_HeaderFile + +#include +#include + +#include +#include +#include +#include + +//! Function for search of cylinder canonic parameters: coordinates of center local coordinate system, +//! direction of axis and radius from set of points +//! by least square method. +//! +//! The class inherits math_MultipleVarFunctionWithGradient and thus is intended +//! for use in math_BFGS algorithm. +//! +//! Parametrisation: +//! Cylinder is defined by its axis and radius. Axis is defined by 3 cartesian coordinats it location x0, y0, z0 +//! and direction, which is constant and set by user: +//! dir.x, dir.y, dir.z +//! The criteria is: +//! F(x0, y0, z0, theta, phi, R) = Sum[|(P(i) - Loc)^dir|^2 - R^2]^2 => min +//! P(i) is i-th sample point, Loc, dir - axis location and direction, R - radius +//! +//! The square vector product |(P(i) - Loc)^dir|^2 is: +//! +//! [(y - y0)*dir.z - (z - z0)*dir.y]^2 + +//! [(z - z0)*dir.x - (x - x0)*dir.z]^2 + +//! [(x - x0)*dir.y - (y - y0)*dir.x]^2 +//! +//! First derivative of square vector product are: +//! Dx0 = 2*[(z - z0)*dir.x - (x - x0)*dir.z]*dir.z +//! -2*[(x - x0)*dir.y - (y - y0)*dir.x]*dir.y +//! Dy0 = -2*[(y - y0)*dir.z - (z - z0)*dir.y]*dir.z +//! +2*[(x - x0)*dir.y - (y - y0)*dir.x]*dir.x +//! Dz0 = 2*[(y - y0)*dir.z - (z - z0)*dir.y]*dir.y +//! -2*[(z - z0)*dir.x - (x - x0)*dir.z]*dir.x +//! +//! dF/dx0 : G1(...) = 2*Sum{[...]*Dx0} +//! dF/dy0 : G2(...) = 2*Sum{[...]*Dy0} +//! dF/dz0 : G3(...) = 2*Sum{[...]*Dz0} +//! dF/dR : G4(...) = -4*R*Sum[...] +//! [...] = [|(P(i) - Loc)^dir|^2 - R^2] +class ShapeAnalysis_FuncCylinderLSDist : public math_MultipleVarFunctionWithGradient +{ +public: + + DEFINE_STANDARD_ALLOC + + //! Constructor. + Standard_EXPORT ShapeAnalysis_FuncCylinderLSDist() {}; + + Standard_EXPORT ShapeAnalysis_FuncCylinderLSDist(const Handle(TColgp_HArray1OfXYZ)& thePoints, + const gp_Dir& theDir); + + void SetPoints(const Handle(TColgp_HArray1OfXYZ)& thePoints) + { + myPoints = thePoints; + } + + void SetDir(const gp_Dir& theDir) + { + myDir = theDir; + } + + //! Number of variables. + Standard_EXPORT Standard_Integer NbVariables() const Standard_OVERRIDE; + + //! Value. + Standard_EXPORT Standard_Boolean Value(const math_Vector& X,Standard_Real& F) Standard_OVERRIDE; + + //! Gradient. + Standard_EXPORT Standard_Boolean Gradient(const math_Vector& X,math_Vector& G) Standard_OVERRIDE; + + //! Value and gradient. + Standard_EXPORT Standard_Boolean Values(const math_Vector& X,Standard_Real& F,math_Vector& G) Standard_OVERRIDE; + +private: + + Handle(TColgp_HArray1OfXYZ) myPoints; + gp_Dir myDir; + +}; +#endif // _ShapeAnalysis_FuncCylinderLSDist_HeaderFile diff --git a/src/ShapeAnalysis/ShapeAnalysis_FuncSphereLSDist.cxx b/src/ShapeAnalysis/ShapeAnalysis_FuncSphereLSDist.cxx new file mode 100644 index 0000000000..7bf64af460 --- /dev/null +++ b/src/ShapeAnalysis/ShapeAnalysis_FuncSphereLSDist.cxx @@ -0,0 +1,115 @@ +// Created on: 2016-05-10 +// Created by: Alexander MALYSHEV +// Copyright (c) 1995-1999 Matra Datavision +// Copyright (c) 1999-2016 OPEN CASCADE SAS +// +// This file is part of Open CASCADE Technology software library. +// +// This library is free software; you can redistribute it and/or modify it under +// the terms of the GNU Lesser General Public License version 2.1 as published +// by the Free Software Foundation, with special exception defined in the file +// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT +// distribution for complete text of the license and disclaimer of any warranty. +// +// Alternatively, this file may be used under the terms of Open CASCADE +// commercial license or contractual agreement. + + +#include +#include +#include +#include + +//======================================================================= +//function : ShapeAnalysis_FuncSphereLSDist +//purpose : +//======================================================================= +ShapeAnalysis_FuncSphereLSDist::ShapeAnalysis_FuncSphereLSDist(const Handle(TColgp_HArray1OfXYZ)& thePoints): + myPoints(thePoints) +{ +} + +//======================================================================= +//function : NbVariables +//purpose : +//======================================================================= +Standard_Integer ShapeAnalysis_FuncSphereLSDist::NbVariables () const +{ + return 4; +} + +//======================================================================= +//function : Value +//purpose : +//======================================================================= +Standard_Boolean ShapeAnalysis_FuncSphereLSDist::Value(const math_Vector& X,Standard_Real& F) +{ + gp_XYZ aLoc(X(1), X(2), X(3)); + Standard_Real anR2 = X(4)*X(4); + + F = 0.; + Standard_Integer i; + for (i = myPoints->Lower(); i <= myPoints->Upper(); ++i) + { + Standard_Real d = (myPoints->Value(i) - aLoc).SquareModulus() - anR2; + F += d * d; + } + + return Standard_True; +} + +//======================================================================= +//function : Gradient +//purpose : +//======================================================================= +Standard_Boolean ShapeAnalysis_FuncSphereLSDist::Gradient(const math_Vector& X,math_Vector& G) + +{ + gp_XYZ aLoc(X(1), X(2), X(3)); + Standard_Real anR = X(4), anR2 = anR * anR; + + G.Init(0.); + Standard_Integer i; + for (i = myPoints->Lower(); i <= myPoints->Upper(); ++i) + { + gp_XYZ dLoc = myPoints->Value(i) - aLoc; + Standard_Real d = dLoc.SquareModulus() - anR2; + G(1) += d * dLoc.X(); + G(2) += d * dLoc.Y(); + G(3) += d * dLoc.Z(); + G(4) += d; + } + G *= -4; + G(4) *= anR; + + return Standard_True; +} + +//======================================================================= +//function : Values +//purpose : +//======================================================================= +Standard_Boolean ShapeAnalysis_FuncSphereLSDist::Values(const math_Vector& X,Standard_Real& F,math_Vector& G) +{ + gp_XYZ aLoc(X(1), X(2), X(3)); + Standard_Real anR = X(4), anR2 = anR * anR; + + G.Init(0.); + F = 0.; + Standard_Integer i; + for (i = myPoints->Lower(); i <= myPoints->Upper(); ++i) + { + gp_XYZ dLoc = myPoints->Value(i) - aLoc; + Standard_Real d = dLoc.SquareModulus() - anR2; + G(1) += d * dLoc.X(); + G(2) += d * dLoc.Y(); + G(3) += d * dLoc.Z(); + G(4) += d; + F += d * d; + } + G *= -4; + G(4) *= anR; + + return true; +} + diff --git a/src/ShapeAnalysis/ShapeAnalysis_FuncSphereLSDist.hxx b/src/ShapeAnalysis/ShapeAnalysis_FuncSphereLSDist.hxx new file mode 100644 index 0000000000..fae0ffa8c6 --- /dev/null +++ b/src/ShapeAnalysis/ShapeAnalysis_FuncSphereLSDist.hxx @@ -0,0 +1,77 @@ + +// Copyright (c) 1991-1999 Matra Datavision +// Copyright (c) 1999-2022 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 _ShapeAnalysis_FuncSphereLSDist_HeaderFile +#define _ShapeAnalysis_FuncSphereLSDist_HeaderFile + +#include +#include + +#include +#include +#include + +//! Function for search of sphere canonic parameters: coordinates of center and radius from set of moints +//! by least square method. +//! //! +//! The class inherits math_MultipleVarFunctionWithGradient and thus is intended +//! for use in math_BFGS algorithm. +//! +//! The criteria is: +//! F(x0, y0, z0, R) = Sum[(x(i) - x0)^2 + (y(i) - y0)^2 + (z(i) - z0)^2 - R^2]^2 => min, +//! x(i), y(i), z(i) - coordinates of sample points, x0, y0, z0, R - coordinates of center and radius of sphere, +//! which must be defined +//! +//! The first derivative are: +//! dF/dx0 : G1(x0, y0, z0, R) = -4*Sum{[...]*(x(i) - x0)} +//! dF/dy0 : G2(x0, y0, z0, R) = -4*Sum{[...]*(y(i) - y0)} +//! dF/dz0 : G3(x0, y0, z0, R) = -4*Sum{[...]*(z(i) - z0)} +//! dF/dR : G4(x0, y0, z0, R) = -4*R*Sum[...] +//! [...] = [(x(i) - x0)^2 + (y(i) - y0)^2 + (z(i) - z0)^2 - R^2] +//! +class ShapeAnalysis_FuncSphereLSDist : public math_MultipleVarFunctionWithGradient +{ +public: + + DEFINE_STANDARD_ALLOC + + //! Constructor. + Standard_EXPORT ShapeAnalysis_FuncSphereLSDist() {}; + + Standard_EXPORT ShapeAnalysis_FuncSphereLSDist(const Handle(TColgp_HArray1OfXYZ)& thePoints); + + void SetPoints(const Handle(TColgp_HArray1OfXYZ)& thePoints) + { + myPoints = thePoints; + } + + //! Number of variables. + Standard_EXPORT Standard_Integer NbVariables() const Standard_OVERRIDE; + + //! Value. + Standard_EXPORT Standard_Boolean Value(const math_Vector& X,Standard_Real& F) Standard_OVERRIDE; + + //! Gradient. + Standard_EXPORT Standard_Boolean Gradient(const math_Vector& X,math_Vector& G) Standard_OVERRIDE; + + //! Value and gradient. + Standard_EXPORT Standard_Boolean Values(const math_Vector& X,Standard_Real& F,math_Vector& G) Standard_OVERRIDE; + +private: + + Handle(TColgp_HArray1OfXYZ) myPoints; + +}; +#endif // _ShapeAnalysis_FuncSphereLSDist_HeaderFile diff --git a/src/gce/gce_MakeCirc.cxx b/src/gce/gce_MakeCirc.cxx index 3e74a49982..18ecf6b2b1 100644 --- a/src/gce/gce_MakeCirc.cxx +++ b/src/gce/gce_MakeCirc.cxx @@ -53,7 +53,7 @@ gce_MakeCirc::gce_MakeCirc(const gp_Pnt& P1 , //========================================================================= Standard_Real dist1, dist2, dist3, aResolution; // - aResolution=gp::Resolution(); + aResolution = gp::Resolution(); // dist1 = P1.Distance(P2); dist2 = P1.Distance(P3); @@ -76,7 +76,7 @@ gce_MakeCirc::gce_MakeCirc(const gp_Pnt& P1 , P2.Coord(x2,y2,z2); P3.Coord(x3,y3,z3); gp_Dir Dir1(x2-x1,y2-y1,z2-z1); - gp_Dir Dir2(x3-x2,y3-y2,z3-z2); + gp_Vec VDir2(x3-x2,y3-y2,z3-z2); // gp_Ax1 anAx1(P1, Dir1); gp_Lin aL12 (anAx1); @@ -85,14 +85,21 @@ gce_MakeCirc::gce_MakeCirc(const gp_Pnt& P1 , return; } // - gp_Dir Dir3 = Dir1.Crossed(Dir2); + gp_Vec VDir1(Dir1); + gp_Vec VDir3 = VDir1.Crossed(VDir2); + if(VDir3.SquareMagnitude() < aResolution) + { + TheError = gce_ColinearPoints; + return; + } // + gp_Dir Dir3(VDir3); gp_Dir dir = Dir1.Crossed(Dir3); gp_Lin L1(gp_Pnt((P1.XYZ()+P2.XYZ())/2.),dir); - dir = Dir2.Crossed(Dir3); + dir = VDir2.Crossed(Dir3); gp_Lin L2(gp_Pnt((P3.XYZ()+P2.XYZ())/2.),dir); - Standard_Real Tol = 0.000000001; + Standard_Real Tol = Precision::PConfusion(); Extrema_ExtElC distmin(L1,L2,Tol); if (!distmin.IsDone()) { @@ -139,7 +146,7 @@ gce_MakeCirc::gce_MakeCirc(const gp_Pnt& P1 , //Dir2 = gp_Dir(x2-x3,y2-y3,z2-z3); //modified by NIZNHY-PKV Thu Mar 3 11:31:13 2005t // - TheCirc = gp_Circ(gp_Ax2(pInt, Dir3, Dir1),(dist1+dist2+dist3)/3.); + TheCirc = gp_Circ(gp_Ax2(pInt, gp_Dir(VDir3), Dir1),(dist1+dist2+dist3)/3.); TheError = gce_Done; } } diff --git a/tests/cr/approx/A1 b/tests/cr/approx/A1 new file mode 100644 index 0000000000..f449dafb29 --- /dev/null +++ b/tests/cr/approx/A1 @@ -0,0 +1,12 @@ +polyline w 0 0 0 1 0 0 1 1 0 0 1 0 0 0 0 +getanasurf res w pln 1.e-3 +if {[isdraw res]} { + set log [dump res] + if { [regexp {Plane} $log ] != 1 } { + puts "Error: surface is not a plane" + } +} else { + puts "Error: required surface is not got" +} + + diff --git a/tests/cr/approx/A2 b/tests/cr/approx/A2 new file mode 100644 index 0000000000..5ac2f8f5c0 --- /dev/null +++ b/tests/cr/approx/A2 @@ -0,0 +1,15 @@ +cylinder cyl 0 0 0 1 1 1 1 +mkface f cyl 0 2 0 1 +explode f w +nurbsconvert w f_1 +cylinder cyl 0.1 0.1 0.1 1 1 1 .9 +getanasurf res w cyl 1.e-3 cyl +if {[isdraw res]} { + set log [dump res] + if { [regexp {CylindricalSurface} $log ] != 1 } { + puts "Error: surface is not a cylindrical surface" + } +} else { + puts "Error: required surface is not got" +} + diff --git a/tests/cr/approx/A3 b/tests/cr/approx/A3 new file mode 100644 index 0000000000..f59b3c6305 --- /dev/null +++ b/tests/cr/approx/A3 @@ -0,0 +1,15 @@ +plane pl 0 0 0 1 1 1 +pcone con pl 2 1 3 60 +explode con w +nurbsconvert w con_1 +cone con 0.1 .1 .1 1 1 1 -17 1.9 +getanasurf res w con 1.e-3 con +if {[isdraw res]} { + set log [dump res] + if { [regexp {ConicalSurface} $log ] != 1 } { + puts "Error: surface is not a conical surface" + } +} else { + puts "Error: required surface is not got" +} + diff --git a/tests/cr/approx/A4 b/tests/cr/approx/A4 new file mode 100644 index 0000000000..d1c3384f30 --- /dev/null +++ b/tests/cr/approx/A4 @@ -0,0 +1,16 @@ +sphere sph 1 +mkface f sph 0 2 0 pi/2 +explode f w +nurbsconvert w f_1 +sphere sph 0.1 0.1 0.1 1 +getanasurf res w sph 1.e-3 sph +if {[isdraw res]} { + set log [dump res] + if { [regexp {SphericalSurface} $log ] != 1 } { + puts "Error: surface is not a spherical surface" + } +} else { + puts "Error: required surface is not got" +} + + diff --git a/tests/cr/base/A1 b/tests/cr/base/A1 new file mode 100644 index 0000000000..4de2c8d7bb --- /dev/null +++ b/tests/cr/base/A1 @@ -0,0 +1,13 @@ +beziercurve bz 3 0 0 0 .5 .5e-3 0 1 0 0 +mkedge e bz +getanacurve c e lin 1.e-3 +if {[isdraw c]} { + set log [dump c] + if { [regexp {Line} $log ] != 1 } { + puts "Error: curve is not a line" + } +} else { + puts "Error: required curve is not got" +} + + diff --git a/tests/cr/base/A2 b/tests/cr/base/A2 new file mode 100644 index 0000000000..5f66a23ee4 --- /dev/null +++ b/tests/cr/base/A2 @@ -0,0 +1,12 @@ +beziercurve bz 3 0 0 0 .5 .5e-3 0 1 0 0 +mkedge e bz +getanacurve c e cir 1.e-3 +if {[isdraw c]} { + set log [dump c] + if { [regexp {Circle} $log ] != 1 } { + puts "Error: curve is not a circle" + } +} else { + puts "Error: required curve is not got" +} + diff --git a/tests/cr/base/A3 b/tests/cr/base/A3 new file mode 100644 index 0000000000..97d6e1ec5d --- /dev/null +++ b/tests/cr/base/A3 @@ -0,0 +1,13 @@ +ellipse bz 0 0 0 0 0 1 1 .5 +convert bz bz +mkedge e bz +getanacurve c e ell 1.e-7 +if {[isdraw c]} { + set log [dump c] + if { [regexp {Ellipse} $log ] != 1 } { + puts "Error: curve is not an ellipse" + } +} else { + puts "Error: required curve is not got" +} + diff --git a/tests/cr/base/A4 b/tests/cr/base/A4 new file mode 100644 index 0000000000..76c26f34b4 --- /dev/null +++ b/tests/cr/base/A4 @@ -0,0 +1,15 @@ +beziercurve bz 3 0 0 0 .5 .5e-6 0 1 0 0 +mkedge e1 bz 0 .3 +mkedge e2 bz .3 0.7 +mkedge e3 bz .7 1. +wire w e1 e2 e3 +getanacurve c w lin 1.e-3 +if {[isdraw c]} { + set log [dump c] + if { [regexp {Line} $log ] != 1 } { + puts "Error: curve is not a line" + } +} else { + puts "Error: required curve is not got" +} + diff --git a/tests/cr/base/A5 b/tests/cr/base/A5 new file mode 100644 index 0000000000..7323a6221a --- /dev/null +++ b/tests/cr/base/A5 @@ -0,0 +1,15 @@ +circle bz 0 0 0 0 0 1 1 +convert bz bz +mkedge e1 bz 0 1 +mkedge e2 bz 1 2.5 +mkedge e3 bz 2.5 6 +wire w e1 e2 e3 +getanacurve c w cir 1.e-7 +if {[isdraw c]} { + set log [dump c] + if { [regexp {Circle} $log ] != 1 } { + puts "Error: curve is not a circle" + } +} else { + puts "Error: required curve is not got" +} diff --git a/tests/cr/base/A6 b/tests/cr/base/A6 new file mode 100644 index 0000000000..dabfd08c3e --- /dev/null +++ b/tests/cr/base/A6 @@ -0,0 +1,15 @@ +ellipse bz 0 0 0 0 0 1 1 .5 +convert bz bz +mkedge e1 bz 0 1 +mkedge e2 bz 1 2.5 +mkedge e3 bz 2.5 6 +wire w e1 e2 e3 +getanacurve c w ell 1.e-7 +if {[isdraw c]} { + set log [dump c] + if { [regexp {Ellipse} $log ] != 1 } { + puts "Error: curve is not an ellipse" + } +} else { + puts "Error: required curve is not got" +} diff --git a/tests/cr/base/B1 b/tests/cr/base/B1 new file mode 100644 index 0000000000..87498c8809 --- /dev/null +++ b/tests/cr/base/B1 @@ -0,0 +1,15 @@ +plane surf +trim surf surf -1 1 -1 1 +convert surf surf +mkface f surf +getanasurf asurf f pln 1.e-7 +if {[isdraw asurf]} { + set log [dump asurf] + if { [regexp {Plane} $log ] != 1 } { + puts "Error: surface is not a plane" + } +} else { + puts "Error: required surface is not got" +} + + diff --git a/tests/cr/base/B2 b/tests/cr/base/B2 new file mode 100644 index 0000000000..312e25ab4b --- /dev/null +++ b/tests/cr/base/B2 @@ -0,0 +1,14 @@ +cylinder surf 1 +trimv surf surf -1 1 +convert surf surf +mkface f surf +getanasurf asurf f cyl 1.e-7 +if {[isdraw asurf]} { + set log [dump asurf] + if { [regexp {CylindricalSurface} $log ] != 1 } { + puts "Error: surface is not a cylindrical surface" + } +} else { + puts "Error: required surface is not got" +} + diff --git a/tests/cr/base/B3 b/tests/cr/base/B3 new file mode 100644 index 0000000000..ce1e30b4b1 --- /dev/null +++ b/tests/cr/base/B3 @@ -0,0 +1,13 @@ +cone surf 30 0 +trimv surf surf -1 0 +convert surf surf +mkface f surf +getanasurf asurf f con 1.e-7 +if {[isdraw asurf]} { + set log [dump asurf] + if { [regexp {ConicalSurface} $log ] != 1 } { + puts "Error: surface is not a conical surface" + } +} else { + puts "Error: required surface is not got" +} diff --git a/tests/cr/base/B4 b/tests/cr/base/B4 new file mode 100644 index 0000000000..7259721402 --- /dev/null +++ b/tests/cr/base/B4 @@ -0,0 +1,12 @@ +sphere surf 1 +convert surf surf +mkface f surf +getanasurf asurf f sph 1.e-7 +if {[isdraw asurf]} { + set log [dump asurf] + if { [regexp {SphericalSurface} $log ] != 1 } { + puts "Error: surface is not a spherical surface" + } +} else { + puts "Error: required surface is not got" +} diff --git a/tests/cr/base/B5 b/tests/cr/base/B5 new file mode 100644 index 0000000000..58c4d5b223 --- /dev/null +++ b/tests/cr/base/B5 @@ -0,0 +1,25 @@ +plane surf +trim surf1 surf -1 0 -1 0 +convert surf1 surf1 +mkface f1 surf1 +trim surf2 surf -1 0 0 1 +convert surf2 surf2 +mkface f2 surf2 +trim surf3 surf 0 1 0 1 +convert surf3 surf3 +mkface f3 surf3 +trim surf4 surf 0 1 -1 0 +convert surf4 surf4 +mkface f4 surf4 +sewing sh f1 f2 f3 f4 +getanasurf asurf sh pln 1.e-7 +if {[isdraw asurf]} { + set log [dump asurf] + if { [regexp {Plane} $log ] != 1 } { + puts "Error: surface is not a plane" + } +} else { + puts "Error: required surface is not got" +} + + diff --git a/tests/cr/base/B6 b/tests/cr/base/B6 new file mode 100644 index 0000000000..db670f3a5d --- /dev/null +++ b/tests/cr/base/B6 @@ -0,0 +1,25 @@ +cylinder surf 1 +trim surf1 surf 0 3 -1 0 +convert surf1 surf1 +mkface f1 surf1 +trim surf2 surf 0 3 0 1 +convert surf2 surf2 +mkface f2 surf2 +trim surf3 surf 3 6 0 1 +convert surf3 surf3 +mkface f3 surf3 +trim surf4 surf 3 6 -1 0 +convert surf4 surf4 +mkface f4 surf4 +sewing sh f1 f2 f3 f4 +getanasurf asurf sh cyl 1.e-7 +if {[isdraw asurf]} { + set log [dump asurf] + if { [regexp {CylindricalSurface} $log ] != 1 } { + puts "Error: surface is not a cylindrical surface" + } +} else { + puts "Error: required surface is not got" +} + + diff --git a/tests/cr/base/B7 b/tests/cr/base/B7 new file mode 100644 index 0000000000..2c2d5f2fc4 --- /dev/null +++ b/tests/cr/base/B7 @@ -0,0 +1,25 @@ +cone surf 30 0 +trim surf1 surf 0 3 0 1 +convert surf1 surf1 +mkface f1 surf1 +trim surf2 surf 0 3 1 2 +convert surf2 surf2 +mkface f2 surf2 +trim surf3 surf 3 6 1 2 +convert surf3 surf3 +mkface f3 surf3 +trim surf4 surf 3 6 0 1 +convert surf4 surf4 +mkface f4 surf4 +sewing sh f1 f2 f3 f4 +getanasurf asurf sh con 1.e-7 +if {[isdraw asurf]} { + set log [dump asurf] + if { [regexp {ConicalSurface} $log ] != 1 } { + puts "Error: surface is not a conical surface" + } +} else { + puts "Error: required surface is not got" +} + + diff --git a/tests/cr/base/B8 b/tests/cr/base/B8 new file mode 100644 index 0000000000..64e69c9959 --- /dev/null +++ b/tests/cr/base/B8 @@ -0,0 +1,25 @@ +sphere surf 1 +trim surf1 surf 0 3 -1.5 0 +convert surf1 surf1 +mkface f1 surf1 +trim surf2 surf 0 3 0 1.5 +convert surf2 surf2 +mkface f2 surf2 +trim surf3 surf 3 6 0 1.5 +convert surf3 surf3 +mkface f3 surf3 +trim surf4 surf 3 6 -1.5 0 +convert surf4 surf4 +mkface f4 surf4 +sewing sh f1 f2 f3 f4 +getanasurf asurf sh sph 1.e-7 +if {[isdraw asurf]} { + set log [dump asurf] + if { [regexp {SphericalSurface} $log ] != 1 } { + puts "Error: surface is not a spherical surface" + } +} else { + puts "Error: required surface is not got" +} + + diff --git a/tests/cr/base/B9 b/tests/cr/base/B9 new file mode 100644 index 0000000000..195c30074a --- /dev/null +++ b/tests/cr/base/B9 @@ -0,0 +1,40 @@ +cylinder surf 1 +trim surf1 surf 0 1 -1 1 +convert surf1 surf1 +mkface f1 surf1 +trim surf2 surf 1 2 -1 1 +convert surf2 surf2 +mkface f2 surf2 +trim surf3 surf 2 3 -1 1 +convert surf3 surf3 +mkface f3 surf3 +trim surf4 surf 3 4 -1 1 +convert surf4 surf4 +mkface f4 surf4 +sewing sh f1 f2 f3 f4 +cylinder cyl 0 0 -2.5 1 0 0 3 +trimv cyl1 cyl -2 2 +mkface fcyl cyl1 +nurbsconvert fcyl fcyl +bsection ss fcyl sh +explode ss e +shape w w +add ss_1 w +add ss_2 w +add ss_3 w +add ss_4 w +add ss_5 w +getanasurf asurf w cyl 1.e-7 cyl +if {[isdraw asurf]} { + set log [dump asurf] + if { [regexp {CylindricalSurface} $log ] != 1 } { + puts "Error: surface is not a cylindrical surface" + } + if { [regexp {Radius :3} $log ] != 1 } { + puts "Error: surface is not a sample surface" + } +} else { + puts "Error: required surface is not got" +} + + diff --git a/tests/cr/begin b/tests/cr/begin new file mode 100644 index 0000000000..f86d1068c6 --- /dev/null +++ b/tests/cr/begin @@ -0,0 +1,14 @@ +if { [array get Draw_Groups "TOPOLOGY Check commands"] == "" } { + pload TOPTEST +} + +# To prevent loops limit to 5 minutes +cpulimit 300 + +if { [info exists imagedir] == 0 } { + set imagedir . +} + +if { [info exists test_image ] == 0 } { + set test_image photo +} diff --git a/tests/cr/end b/tests/cr/end new file mode 100644 index 0000000000..601b1e1213 --- /dev/null +++ b/tests/cr/end @@ -0,0 +1,3 @@ + +# to end a test script +puts "TEST COMPLETED" diff --git a/tests/cr/grids.list b/tests/cr/grids.list new file mode 100644 index 0000000000..8eb5c913e5 --- /dev/null +++ b/tests/cr/grids.list @@ -0,0 +1,2 @@ +001 base +002 approx From d74b1e9dd3d1aaa1b2e96d930dfc1b53a41456e9 Mon Sep 17 00:00:00 2001 From: azv Date: Fri, 1 Jul 2022 15:59:40 +0300 Subject: [PATCH 337/639] 0033049: Command 'tclean -geom' does not remove all geometric objects from the shape Remove unused P-curves when cleaning the geometry --- src/BRepTools/BRepTools.cxx | 2 ++ tests/bugs/moddata_3/bug33049 | 25 +++++++++++++++++++++++++ 2 files changed, 27 insertions(+) create mode 100644 tests/bugs/moddata_3/bug33049 diff --git a/src/BRepTools/BRepTools.cxx b/src/BRepTools/BRepTools.cxx index de3716bd97..7f2c71c14b 100644 --- a/src/BRepTools/BRepTools.cxx +++ b/src/BRepTools/BRepTools.cxx @@ -893,6 +893,8 @@ void BRepTools::CleanGeometry(const TopoDS_Shape& theShape) aBuilder.UpdateEdge(anEdge, Handle(Geom_Curve)(), TopLoc_Location(), BRep_Tool::Tolerance(anEdge)); } + + RemoveUnusedPCurves(theShape); } diff --git a/tests/bugs/moddata_3/bug33049 b/tests/bugs/moddata_3/bug33049 new file mode 100644 index 0000000000..c5923a9466 --- /dev/null +++ b/tests/bugs/moddata_3/bug33049 @@ -0,0 +1,25 @@ +puts "=================================================================" +puts "0033049: Command 'tclean -geom' does not remove all geometric objects from the shape" +puts "=================================================================" +puts "" + +psphere s1 10 +pcylinder s2 8 20 +pcone s3 10 8 5 +ttranslate s1 0 0 25 +ttranslate s3 0 0 -5 + +baddobjects s1 +baddtools s2 s3 +bfillds +bbop s fuse + +incmesh s 0.1 +tclean -geom s + +regexp {Dump of ([0-9+-]*) Curve2ds.*Dump of ([0-9+-]*) Curves.*Dump of ([0-9+-]*) surfaces} [dump s] full nbC2d nbC3d nbSurf +if {$nbC2d != 0 || $nbC3d != 0 || $nbSurf != 0} { + puts "Error: geometry is not fully removed" +} else { + puts "OK: shape has no geometry" +} From 315ed0be41065702f85c2d51610b36ac65201a04 Mon Sep 17 00:00:00 2001 From: abulyche Date: Wed, 20 Apr 2022 17:14:07 +0300 Subject: [PATCH 338/639] 0032716: Modeling Algorithms - BRepBuilderAPI_Transform discards triangulation * Implement methods for copying tessellation to BRepTools_TrsfModification to keep the triangulation during transformation. * Add tests to reproduce the problem. --- .../BRepBuilderAPI_Transform.cxx | 25 +- .../BRepBuilderAPI_Transform.hxx | 29 ++- src/BRepTest/BRepTest_BasicCommands.cxx | 19 +- src/BRepTools/BRepTools_TrsfModification.cxx | 218 +++++++++++++++++- src/BRepTools/BRepTools_TrsfModification.hxx | 19 ++ tests/bugs/modalg_8/bug32716_1 | 57 +++++ tests/bugs/modalg_8/bug32716_2 | 57 +++++ tests/bugs/modalg_8/bug32716_3 | 54 +++++ tests/bugs/modalg_8/bug32716_4 | 54 +++++ 9 files changed, 504 insertions(+), 28 deletions(-) create mode 100644 tests/bugs/modalg_8/bug32716_1 create mode 100644 tests/bugs/modalg_8/bug32716_2 create mode 100644 tests/bugs/modalg_8/bug32716_3 create mode 100644 tests/bugs/modalg_8/bug32716_4 diff --git a/src/BRepBuilderAPI/BRepBuilderAPI_Transform.cxx b/src/BRepBuilderAPI/BRepBuilderAPI_Transform.cxx index 3b5b233e69..d161d1a73e 100644 --- a/src/BRepBuilderAPI/BRepBuilderAPI_Transform.cxx +++ b/src/BRepBuilderAPI/BRepBuilderAPI_Transform.cxx @@ -36,13 +36,14 @@ BRepBuilderAPI_Transform::BRepBuilderAPI_Transform (const gp_Trsf& T) : //purpose : //======================================================================= -BRepBuilderAPI_Transform::BRepBuilderAPI_Transform (const TopoDS_Shape& S, - const gp_Trsf& T, - const Standard_Boolean Copy) : - myTrsf(T) +BRepBuilderAPI_Transform::BRepBuilderAPI_Transform (const TopoDS_Shape& theShape, + const gp_Trsf& theTrsf, + const Standard_Boolean theCopyGeom, + const Standard_Boolean theCopyMesh) + : myTrsf(theTrsf) { - myModification = new BRepTools_TrsfModification(T); - Perform(S,Copy); + myModification = new BRepTools_TrsfModification(theTrsf); + Perform(theShape, theCopyGeom, theCopyMesh); } @@ -52,19 +53,21 @@ BRepBuilderAPI_Transform::BRepBuilderAPI_Transform (const TopoDS_Shape& S, //purpose : //======================================================================= -void BRepBuilderAPI_Transform::Perform(const TopoDS_Shape& S, - const Standard_Boolean Copy) +void BRepBuilderAPI_Transform::Perform(const TopoDS_Shape& theShape, + const Standard_Boolean theCopyGeom, + const Standard_Boolean theCopyMesh) { - myUseModif = Copy || myTrsf.IsNegative() || (Abs(Abs(myTrsf.ScaleFactor()) - 1.) > TopLoc_Location::ScalePrec()); + myUseModif = theCopyGeom || myTrsf.IsNegative() || (Abs(Abs(myTrsf.ScaleFactor()) - 1.) > TopLoc_Location::ScalePrec()); if (myUseModif) { Handle(BRepTools_TrsfModification) theModif = Handle(BRepTools_TrsfModification)::DownCast(myModification); theModif->Trsf() = myTrsf; - DoModif(S,myModification); + theModif->IsCopyMesh() = theCopyMesh; + DoModif(theShape, myModification); } else { myLocation = myTrsf; - myShape = S.Moved(myLocation); + myShape = theShape.Moved(myLocation); Done(); } diff --git a/src/BRepBuilderAPI/BRepBuilderAPI_Transform.hxx b/src/BRepBuilderAPI/BRepBuilderAPI_Transform.hxx index ac27d62600..b0cdaa1813 100644 --- a/src/BRepBuilderAPI/BRepBuilderAPI_Transform.hxx +++ b/src/BRepBuilderAPI/BRepBuilderAPI_Transform.hxx @@ -50,28 +50,37 @@ public: //! to define the shape to transform. Standard_EXPORT BRepBuilderAPI_Transform(const gp_Trsf& T); - //! Creates a transformation from the gp_Trsf , and - //! applies it to the shape . If the transformation + //! Creates a transformation from the gp_Trsf , and + //! applies it to the shape . If the transformation //! is direct and isometric (determinant = 1) and - //! = Standard_False, the resulting shape is - //! on which a new location has been set. + //! = Standard_False, the resulting shape is + //! on which a new location has been set. //! Otherwise, the transformation is applied on a - //! duplication of . - Standard_EXPORT BRepBuilderAPI_Transform(const TopoDS_Shape& S, const gp_Trsf& T, const Standard_Boolean Copy = Standard_False); + //! duplication of . + //! If is true, the triangulation will be copied, + //! and the copy will be assigned to the result shape. + Standard_EXPORT BRepBuilderAPI_Transform(const TopoDS_Shape& theShape, + const gp_Trsf& theTrsf, + const Standard_Boolean theCopyGeom = Standard_False, + const Standard_Boolean theCopyMesh = Standard_False); - //! pplies the geometric transformation defined at the + //! Applies the geometric transformation defined at the //! time of construction of this framework to the shape S. //! - If the transformation T is direct and isometric, in //! other words, if the determinant of the vectorial part - //! of T is equal to 1., and if Copy equals false (the + //! of T is equal to 1., and if theCopyGeom equals false (the //! default value), the resulting shape is the same as //! the original but with a new location assigned to it. - //! - In all other cases, the transformation is applied to a duplicate of S. + //! - In all other cases, the transformation is applied to a duplicate of theShape. + //! - If theCopyMesh is true, the triangulation will be copied, + //! and the copy will be assigned to the result shape. //! Use the function Shape to access the result. //! Note: this framework can be reused to apply the same //! geometric transformation to other shapes. You only //! need to specify them by calling the function Perform again. - Standard_EXPORT void Perform (const TopoDS_Shape& S, const Standard_Boolean Copy = Standard_False); + Standard_EXPORT void Perform (const TopoDS_Shape& theShape, + const Standard_Boolean theCopyGeom = Standard_False, + const Standard_Boolean theCopyMesh = Standard_False); //! Returns the modified shape corresponding to . Standard_EXPORT virtual TopoDS_Shape ModifiedShape (const TopoDS_Shape& S) const Standard_OVERRIDE; diff --git a/src/BRepTest/BRepTest_BasicCommands.cxx b/src/BRepTest/BRepTest_BasicCommands.cxx index 216dc8ccf4..76019fd643 100644 --- a/src/BRepTest/BRepTest_BasicCommands.cxx +++ b/src/BRepTest/BRepTest_BasicCommands.cxx @@ -124,7 +124,14 @@ static Standard_Integer transform(Draw_Interpretor&,Standard_Integer n,const cha Standard_Boolean isBasic = Standard_False; Standard_Boolean isForced = Standard_False; Standard_Boolean isCopy = Standard_False; + Standard_Boolean isCopyMesh = Standard_False; + // Check "copymesh" flag. + if (!strcmp(a[n - 1], "-copymesh")) + { + isCopyMesh = Standard_True; + last = --n; + } // Check "copy" flag. if (!strcmp(a[n-1], "-copy")) { isCopy = Standard_True; @@ -218,7 +225,7 @@ static Standard_Integer transform(Draw_Interpretor&,Standard_Integer n,const cha return 1; } else { - trf.Perform(S, isCopy); + trf.Perform(S, isCopy, isCopyMesh); if (!trf.IsDone()) return 1; DBRep::Set(a[i],trf.Shape()); @@ -1487,27 +1494,27 @@ void BRepTest::BasicCommands(Draw_Interpretor& theCommands) transform,g); theCommands.Add("tmove", - "tmove name1 name2 ... name, set location from name [-copy]", + "tmove name1 name2 ... name, set location from name [-copy] [-copymesh]", __FILE__, transform,g); theCommands.Add("ttranslate", - "ttranslate name1 name2 ... dx dy dz [-copy]", + "ttranslate name1 name2 ... dx dy dz [-copy [-copymesh]]", __FILE__, transform,g); theCommands.Add("trotate", - "trotate name1 name2 ... x y z dx dy dz angle [-copy]", + "trotate name1 name2 ... x y z dx dy dz angle [-copy [-copymesh]]", __FILE__, transform,g); theCommands.Add("tmirror", - "tmirror name x y z dx dy dz [-copy]", + "tmirror name x y z dx dy dz [-copy] [-copymesh]", __FILE__, transform,g); theCommands.Add("tscale", - "tscale name x y z scale [-copy]", + "tscale name x y z scale [-copy] [-copymesh]", __FILE__, transform,g); diff --git a/src/BRepTools/BRepTools_TrsfModification.cxx b/src/BRepTools/BRepTools_TrsfModification.cxx index acf1d6773f..238afe6970 100644 --- a/src/BRepTools/BRepTools_TrsfModification.cxx +++ b/src/BRepTools/BRepTools_TrsfModification.cxx @@ -23,6 +23,7 @@ #include #include #include +#include #include #include #include @@ -43,7 +44,8 @@ IMPLEMENT_STANDARD_RTTIEXT(BRepTools_TrsfModification,BRepTools_Modification) //purpose : //======================================================================= BRepTools_TrsfModification::BRepTools_TrsfModification(const gp_Trsf& T) : -myTrsf(T) +myTrsf(T), +myCopyMesh(Standard_False) { } @@ -58,6 +60,16 @@ gp_Trsf& BRepTools_TrsfModification::Trsf () return myTrsf; } +//======================================================================= +//function : IsCopyMesh +//purpose : +//======================================================================= + +Standard_Boolean& BRepTools_TrsfModification::IsCopyMesh() +{ + return myCopyMesh; +} + //======================================================================= //function : NewSurface //purpose : @@ -72,6 +84,12 @@ Standard_Boolean BRepTools_TrsfModification::NewSurface Standard_Boolean& RevFace) { S = BRep_Tool::Surface(F,L); + if (S.IsNull()) + { + //processing cases when there is no geometry + return Standard_False; + } + Tol = BRep_Tool::Tolerance(F); Tol *= Abs(myTrsf.ScaleFactor()); RevWires = Standard_False; @@ -87,6 +105,194 @@ Standard_Boolean BRepTools_TrsfModification::NewSurface return Standard_True; } +//======================================================================= +//function : NewTriangulation +//purpose : +//======================================================================= + +Standard_Boolean BRepTools_TrsfModification::NewTriangulation +(const TopoDS_Face& theFace, + Handle(Poly_Triangulation)& theTriangulation) +{ + if (!myCopyMesh) + { + return Standard_False; + } + + TopLoc_Location aLoc; + theTriangulation = BRep_Tool::Triangulation(theFace, aLoc); + + if (theTriangulation.IsNull()) + { + return Standard_False; + } + + gp_Trsf aTrsf = myTrsf; + if (!aLoc.IsIdentity()) + { + aTrsf = aLoc.Transformation().Inverted() * aTrsf * aLoc.Transformation(); + } + + theTriangulation = theTriangulation->Copy(); + theTriangulation->SetCachedMinMax(Bnd_Box()); // clear bounding box + theTriangulation->Deflection(theTriangulation->Deflection() * Abs(myTrsf.ScaleFactor())); + // apply transformation to 3D nodes + for (Standard_Integer anInd = 1; anInd <= theTriangulation->NbNodes(); ++anInd) + { + gp_Pnt aP = theTriangulation->Node(anInd); + aP.Transform(aTrsf); + theTriangulation->SetNode(anInd, aP); + } + // modify 2D nodes + Handle(Geom_Surface) aSurf = BRep_Tool::Surface(theFace, aLoc); + if (theTriangulation->HasUVNodes() && !aSurf.IsNull()) + { + for (Standard_Integer anInd = 1; anInd <= theTriangulation->NbNodes(); ++anInd) + { + gp_Pnt2d aP2d = theTriangulation->UVNode(anInd); + aSurf->TransformParameters(aP2d.ChangeCoord().ChangeCoord(1), + aP2d.ChangeCoord().ChangeCoord(2), + myTrsf); + theTriangulation->SetUVNode(anInd, aP2d); + } + } + // modify triangles orientation in case of mirror transformation + if (myTrsf.ScaleFactor() < 0.0) + { + for (Standard_Integer anInd = 1; anInd <= theTriangulation->NbTriangles(); ++anInd) + { + Poly_Triangle aTria = theTriangulation->Triangle(anInd); + Standard_Integer aN1, aN2, aN3; + aTria.Get(aN1, aN2, aN3); + aTria.Set(aN1, aN3, aN2); + theTriangulation->SetTriangle(anInd, aTria); + } + } + // modify normals + if (theTriangulation->HasNormals()) + { + for (Standard_Integer anInd = 1; anInd <= theTriangulation->NbTriangles(); ++anInd) + { + gp_Dir aNormal = theTriangulation->Normal(anInd); + aNormal.Transform(aTrsf); + theTriangulation->SetNormal(anInd, aNormal); + } + } + + return Standard_True; +} + +//======================================================================= +//function : NewPolygon +//purpose : +//======================================================================= + +Standard_Boolean BRepTools_TrsfModification::NewPolygon +(const TopoDS_Edge& theE, + Handle(Poly_Polygon3D)& theP) +{ + if (!myCopyMesh) + { + return Standard_False; + } + + TopLoc_Location aLoc; + theP = BRep_Tool::Polygon3D(theE, aLoc); + if (theP.IsNull()) + { + return Standard_False; + } + + gp_Trsf aTrsf = myTrsf; + if (!aLoc.IsIdentity()) + { + aTrsf = aLoc.Transformation().Inverted() * aTrsf * aLoc.Transformation(); + } + + theP = theP->Copy(); + theP->Deflection(theP->Deflection() * Abs(myTrsf.ScaleFactor())); + TColgp_Array1OfPnt& aNodesArray = theP->ChangeNodes(); + for (Standard_Integer anId = aNodesArray.Lower(); anId <= aNodesArray.Upper(); ++anId) + { + //Applying the transformation to each node of polygon + aNodesArray.ChangeValue(anId).Transform(aTrsf); + } + // transform the parametrization + if (theP->HasParameters()) + { + TopLoc_Location aCurveLoc; + Standard_Real aFirst, aLast; + Handle(Geom_Curve) aCurve = BRep_Tool::Curve(theE, aCurveLoc, aFirst, aLast); + if (!aCurve.IsNull()) + { + Standard_Real aReparametrization = aCurve->ParametricTransformation(aTrsf); + if (Abs(aReparametrization - 1.0) > Precision::PConfusion()) + { + TColStd_Array1OfReal& aParams = theP->ChangeParameters(); + for (Standard_Integer anInd = aParams.Lower(); anInd <= aParams.Upper(); ++anInd) + { + aParams(anInd) *= aReparametrization; + } + } + } + } + return Standard_True; +} + +//======================================================================= +//function : NewPolygonOnTriangulation +//purpose : +//======================================================================= + +Standard_Boolean BRepTools_TrsfModification::NewPolygonOnTriangulation +(const TopoDS_Edge& theE, + const TopoDS_Face& theF, + Handle(Poly_PolygonOnTriangulation)& theP) +{ + if (!myCopyMesh) + { + return Standard_False; + } + + TopLoc_Location aLoc; + Handle(Poly_Triangulation) aT = BRep_Tool::Triangulation(theF, aLoc); + if (aT.IsNull()) + { + theP = Handle(Poly_PolygonOnTriangulation) (); + return Standard_False; + } + + theP = BRep_Tool::PolygonOnTriangulation(theE, aT, aLoc); + if (theP.IsNull()) + { + return Standard_False; + } + theP = theP->Copy(); + theP->Deflection(theP->Deflection() * Abs(myTrsf.ScaleFactor())); + + // transform the parametrization + Handle(Geom_Surface) aSurf = BRep_Tool::Surface(theF, aLoc); + Standard_Real aFirst, aLast; + Handle(Geom2d_Curve) aC2d = BRep_Tool::CurveOnSurface(theE, theF, aFirst, aLast); + if (!aSurf.IsNull() && !aC2d.IsNull() && Abs(Abs(myTrsf.ScaleFactor()) - 1.0) > TopLoc_Location::ScalePrec()) + { + gp_GTrsf2d aGTrsf = aSurf->ParametricTransformation(myTrsf); + if (aGTrsf.Form() != gp_Identity) + { + Handle(Geom2d_Curve) aNewC2d = GeomLib::GTransform(aC2d, aGTrsf); + for (Standard_Integer anInd = 1; anInd <= theP->NbNodes(); ++anInd) + { + Standard_Real aParam = theP->Parameter(anInd); + gp_Pnt2d aP2d = aC2d->Value(aParam); + aGTrsf.Transforms(aP2d.ChangeCoord()); + GeomLib_Tool::Parameter(aNewC2d, aP2d, theP->Deflection(), aParam); + theP->SetParameter(anInd, aParam); + } + } + } + + return Standard_True; +} //======================================================================= //function : NewCurve @@ -101,6 +307,10 @@ Standard_Boolean BRepTools_TrsfModification::NewCurve { Standard_Real f,l; C = BRep_Tool::Curve(E,L,f,l); + if (C.IsNull()) + { + return Standard_False; + } Tol = BRep_Tool::Tolerance(E); Tol *= Abs(myTrsf.ScaleFactor()); @@ -153,6 +363,12 @@ Standard_Boolean BRepTools_TrsfModification::NewCurve2d Standard_Real scale = myTrsf.ScaleFactor(); Tol *= Abs(scale); const Handle(Geom_Surface)& S = BRep_Tool::Surface(F,loc); + + if (S.IsNull()) + { + // processing the case when the surface (geometry) is deleted + return Standard_False; + } GeomAdaptor_Surface GAsurf(S); if (GAsurf.GetType() == GeomAbs_Plane) return Standard_False; diff --git a/src/BRepTools/BRepTools_TrsfModification.hxx b/src/BRepTools/BRepTools_TrsfModification.hxx index f0df27766b..2215b3d03b 100644 --- a/src/BRepTools/BRepTools_TrsfModification.hxx +++ b/src/BRepTools/BRepTools_TrsfModification.hxx @@ -50,6 +50,9 @@ public: //! Provides access to the gp_Trsf associated with this //! modification. The transformation can be changed. Standard_EXPORT gp_Trsf& Trsf(); + + //! Sets a flag to indicate the need to copy mesh. + Standard_EXPORT Standard_Boolean& IsCopyMesh(); //! Returns true if the face F has been modified. //! If the face has been modified: @@ -64,6 +67,21 @@ public: //! associated with this modification is negative. Standard_EXPORT Standard_Boolean NewSurface (const TopoDS_Face& F, Handle(Geom_Surface)& S, TopLoc_Location& L, Standard_Real& Tol, Standard_Boolean& RevWires, Standard_Boolean& RevFace) Standard_OVERRIDE; + //! Returns true if the face has been modified according to changed triangulation. + //! If the face has been modified: + //! - T is a new triangulation on the face + Standard_EXPORT Standard_Boolean NewTriangulation(const TopoDS_Face& F, Handle(Poly_Triangulation)& T) Standard_OVERRIDE; + + //! Returns true if the edge has been modified according to changed polygon. + //! If the edge has been modified: + //! - P is a new polygon + Standard_EXPORT Standard_Boolean NewPolygon(const TopoDS_Edge& E, Handle(Poly_Polygon3D)& P) Standard_OVERRIDE; + + //! Returns true if the edge has been modified according to changed polygon on triangulation. + //! If the edge has been modified: + //! - P is a new polygon on triangulation + Standard_EXPORT Standard_Boolean NewPolygonOnTriangulation(const TopoDS_Edge& E, const TopoDS_Face& F, Handle(Poly_PolygonOnTriangulation)& P) Standard_OVERRIDE; + //! Returns true if the edge E has been modified. //! If the edge has been modified: //! - C is the new geometric support of the edge, @@ -120,6 +138,7 @@ private: gp_Trsf myTrsf; + Standard_Boolean myCopyMesh; }; diff --git a/tests/bugs/modalg_8/bug32716_1 b/tests/bugs/modalg_8/bug32716_1 new file mode 100644 index 0000000000..2b20b3f38b --- /dev/null +++ b/tests/bugs/modalg_8/bug32716_1 @@ -0,0 +1,57 @@ +puts "=================================================================" +puts "0032716: Modeling Algorithms - BRepBuilderAPI_Transform discards triangulation" +puts "=================================================================" +puts "" + +psphere s1 10 +pcylinder s2 8 20 +pcone s3 10 8 5 +ttranslate s1 0 0 25 +ttranslate s3 0 0 -5 + +baddobjects s1 +baddtools s2 s3 +bfillds +bbop s fuse + +incmesh s 0.1 + +# reference data +regexp {([0-9+-.eE]*) faces.* ([0-9+-.eE]*) triangles.* ([0-9+-.eE]*) nodes} [trinfo s] full nbFaces nbTri nbNodes + +# scaling +tscale s 0 0 0 2 -copymesh +checkshape s +checktrinfo s -face $nbFaces -nod $nbNodes -tri $nbTri +if {[tricheck s] != ""} { + puts "ERROR: Wrong triangulation" +} + +# mirror +tmirror s 1 0 0 1 1 1 -copymesh +checkshape s +checktrinfo s -face $nbFaces -nod $nbNodes -tri $nbTri +if {[tricheck s] != ""} { + puts "ERROR: Wrong triangulation" +} + +# translate +ttranslate s 0 0 10 +checkshape s +checktrinfo s -face $nbFaces -nod $nbNodes -tri $nbTri +if {[tricheck s] != ""} { + puts "ERROR: Wrong triangulation" +} + +# rotate +trotate s 0 0 0 0 0 1 45 +checkshape s +checktrinfo s -face $nbFaces -nod $nbNodes -tri $nbTri +if {[tricheck s] != ""} { + puts "ERROR: Wrong triangulation" +} + +# display shape +triangles s +isos s 0 +checkview -display s -2d -path ${imagedir}/${test_image}.png diff --git a/tests/bugs/modalg_8/bug32716_2 b/tests/bugs/modalg_8/bug32716_2 new file mode 100644 index 0000000000..bfe1fc077f --- /dev/null +++ b/tests/bugs/modalg_8/bug32716_2 @@ -0,0 +1,57 @@ +puts "=================================================================" +puts "0032716: Modeling Algorithms - BRepBuilderAPI_Transform discards triangulation" +puts "=================================================================" +puts "" + +psphere s1 10 +pcylinder s2 8 20 +pcone s3 10 8 5 +ttranslate s1 0 0 25 +ttranslate s3 0 0 -5 + +baddobjects s1 +baddtools s2 s3 +bfillds +bbop s fuse + +incmesh s 0.1 + +# reference data +regexp {([0-9+-.eE]*) faces.* ([0-9+-.eE]*) triangles.* ([0-9+-.eE]*) nodes} [trinfo s] full nbFaces nbTri nbNodes + +# scaling +tscale s 0 0 0 2 -copy -copymesh +checkshape s +checktrinfo s -face $nbFaces -nod $nbNodes -tri $nbTri +if {[tricheck s] != ""} { + puts "ERROR: Wrong triangulation" +} + +# mirror +tmirror s 1 0 0 1 1 1 -copy -copymesh +checkshape s +checktrinfo s -face $nbFaces -nod $nbNodes -tri $nbTri +if {[tricheck s] != ""} { + puts "ERROR: Wrong triangulation" +} + +# translate +ttranslate s 0 0 10 -copy -copymesh +checkshape s +checktrinfo s -face $nbFaces -nod $nbNodes -tri $nbTri +if {[tricheck s] != ""} { + puts "ERROR: Wrong triangulation" +} + +# rotate +trotate s 0 0 0 0 0 1 45 -copy -copymesh +checkshape s +checktrinfo s -face $nbFaces -nod $nbNodes -tri $nbTri +if {[tricheck s] != ""} { + puts "ERROR: Wrong triangulation" +} + +# display shape +triangles s +isos s 0 +checkview -display s -2d -path ${imagedir}/${test_image}.png diff --git a/tests/bugs/modalg_8/bug32716_3 b/tests/bugs/modalg_8/bug32716_3 new file mode 100644 index 0000000000..706a36d4dc --- /dev/null +++ b/tests/bugs/modalg_8/bug32716_3 @@ -0,0 +1,54 @@ +puts "=================================================================" +puts "0032716: Modeling Algorithms - BRepBuilderAPI_Transform discards triangulation" +puts "=================================================================" +puts "" + +psphere s1 10 +pcylinder s2 8 20 +pcone s3 10 8 5 +ttranslate s1 0 0 25 +ttranslate s3 0 0 -5 + +baddobjects s1 +baddtools s2 s3 +bfillds +bbop s fuse + +incmesh s 0.1 +tclean -geom s + +# reference data +regexp {([0-9+-.eE]*) faces.* ([0-9+-.eE]*) triangles.* ([0-9+-.eE]*) nodes} [trinfo s] full nbFaces nbTri nbNodes + +# scaling +tscale s 0 0 0 2 -copymesh +checktrinfo s -face $nbFaces -nod $nbNodes -tri $nbTri +if {[tricheck s] != ""} { + puts "ERROR: Wrong triangulation" +} + +# mirror +tmirror s 1 0 0 1 1 1 -copymesh +checktrinfo s -face $nbFaces -nod $nbNodes -tri $nbTri +if {[tricheck s] != ""} { + puts "ERROR: Wrong triangulation" +} + +# translate +ttranslate s 0 0 10 +checktrinfo s -face $nbFaces -nod $nbNodes -tri $nbTri +if {[tricheck s] != ""} { + puts "ERROR: Wrong triangulation" +} + +# rotate +trotate s 0 0 0 0 0 1 45 +checktrinfo s -face $nbFaces -nod $nbNodes -tri $nbTri +if {[tricheck s] != ""} { + puts "ERROR: Wrong triangulation" +} + +# display shape +triangles s +isos s 0 +checkview -display s -2d -path ${imagedir}/${test_image}.png diff --git a/tests/bugs/modalg_8/bug32716_4 b/tests/bugs/modalg_8/bug32716_4 new file mode 100644 index 0000000000..79e6783328 --- /dev/null +++ b/tests/bugs/modalg_8/bug32716_4 @@ -0,0 +1,54 @@ +puts "=================================================================" +puts "0032716: Modeling Algorithms - BRepBuilderAPI_Transform discards triangulation" +puts "=================================================================" +puts "" + +psphere s1 10 +pcylinder s2 8 20 +pcone s3 10 8 5 +ttranslate s1 0 0 25 +ttranslate s3 0 0 -5 + +baddobjects s1 +baddtools s2 s3 +bfillds +bbop s fuse + +incmesh s 0.1 +tclean -geom s + +# reference data +regexp {([0-9+-.eE]*) faces.* ([0-9+-.eE]*) triangles.* ([0-9+-.eE]*) nodes} [trinfo s] full nbFaces nbTri nbNodes + +# scaling +tscale s 0 0 0 2 -copy -copymesh +checktrinfo s -face $nbFaces -nod $nbNodes -tri $nbTri +if {[tricheck s] != ""} { + puts "ERROR: Wrong triangulation" +} + +# mirror +tmirror s 1 0 0 1 1 1 -copy -copymesh +checktrinfo s -face $nbFaces -nod $nbNodes -tri $nbTri +if {[tricheck s] != ""} { + puts "ERROR: Wrong triangulation" +} + +# translate +ttranslate s 0 0 10 -copy -copymesh +checktrinfo s -face $nbFaces -nod $nbNodes -tri $nbTri +if {[tricheck s] != ""} { + puts "ERROR: Wrong triangulation" +} + +# rotate +trotate s 0 0 0 0 0 1 45 -copy -copymesh +checktrinfo s -face $nbFaces -nod $nbNodes -tri $nbTri +if {[tricheck s] != ""} { + puts "ERROR: Wrong triangulation" +} + +# display shape +triangles s +isos s 0 +checkview -display s -2d -path ${imagedir}/${test_image}.png From 33c8a72788661285860902f261062e39f32a2d46 Mon Sep 17 00:00:00 2001 From: azv Date: Fri, 1 Jul 2022 16:46:55 +0300 Subject: [PATCH 339/639] 0031479: Modeling Algorithms - exception on geometry transformation of triangulation-only shapes (without geometry surface) * Avoid crash in BRepBuilderAPI_GTransform algorithm. The crash in BRepBuilder_Transform has been solved by 0032716. * Move copying modifier to BRepTools package. * Implement copying of triangulation in BRepTools_NurbsConvertModification. * Implement transformation of a triangulation in BRepTools_GTrsfModification. * Update test case bugs/mesh/bug22778 to clean the triangulation after conversion to NURBS (reproduce the same behavior as before). --- src/BRepBuilderAPI/BRepBuilderAPI_Copy.cxx | 186 +-------- src/BRepTools/BRepTools_CopyModification.cxx | 215 +++++++++++ src/BRepTools/BRepTools_CopyModification.hxx | 124 ++++++ src/BRepTools/BRepTools_GTrsfModification.cxx | 125 +++++- src/BRepTools/BRepTools_GTrsfModification.hxx | 19 + .../BRepTools_NurbsConvertModification.cxx | 358 +++++++++++++++--- .../BRepTools_NurbsConvertModification.hxx | 26 +- src/BRepTools/FILES | 2 + tests/bugs/mesh/bug22778 | 1 + tests/bugs/modalg_8/bug31479_1 | 31 ++ tests/bugs/modalg_8/bug31479_2 | 17 + 11 files changed, 865 insertions(+), 239 deletions(-) create mode 100644 src/BRepTools/BRepTools_CopyModification.cxx create mode 100644 src/BRepTools/BRepTools_CopyModification.hxx create mode 100644 tests/bugs/modalg_8/bug31479_1 create mode 100644 tests/bugs/modalg_8/bug31479_2 diff --git a/src/BRepBuilderAPI/BRepBuilderAPI_Copy.cxx b/src/BRepBuilderAPI/BRepBuilderAPI_Copy.cxx index 36c25a41e5..fab7de94b7 100644 --- a/src/BRepBuilderAPI/BRepBuilderAPI_Copy.cxx +++ b/src/BRepBuilderAPI/BRepBuilderAPI_Copy.cxx @@ -15,186 +15,8 @@ // commercial license or contractual agreement. -#include #include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace { - -//! Tool class implementing necessary functionality for copying geometry -class BRepBuilderAPI_Copy_Modification : public BRepTools_Modification -{ -public: - BRepBuilderAPI_Copy_Modification (const Standard_Boolean copyGeom, - const Standard_Boolean copyMesh) - : myCopyGeom(copyGeom), - myCopyMesh(copyMesh) - { - } - - //! Returns true to indicate the need to copy face; - //! copies surface if requested - Standard_Boolean NewSurface (const TopoDS_Face& F, Handle(Geom_Surface)& S, - TopLoc_Location& L, Standard_Real& Tol, - Standard_Boolean& RevWires, Standard_Boolean& RevFace) Standard_OVERRIDE - { - S = BRep_Tool::Surface(F,L); - Tol = BRep_Tool::Tolerance(F); - RevWires = RevFace = Standard_False; - - if ( ! S.IsNull() && myCopyGeom ) - S = Handle(Geom_Surface)::DownCast(S->Copy()); - - return Standard_True; - } - - //! Returns true to indicate the need to copy triangulation; - //! copies it if required - Standard_Boolean NewTriangulation(const TopoDS_Face& F, Handle(Poly_Triangulation)& T) Standard_OVERRIDE - { - if (!myCopyMesh - && BRep_Tool::IsGeometric (F)) - { - return Standard_False; - } - - TopLoc_Location L; - T = BRep_Tool::Triangulation(F, L); - - if (T.IsNull()) - return Standard_False; - - // mesh is copied if and only if the geometry need to be copied too - if (myCopyGeom) - T = T->Copy(); - return Standard_True; - } - - //! Returns true to indicate the need to copy edge; - //! copies curves if requested - Standard_Boolean NewCurve (const TopoDS_Edge& E, Handle(Geom_Curve)& C, - TopLoc_Location& L, Standard_Real& Tol) Standard_OVERRIDE - { - Standard_Real f,l; - C = BRep_Tool::Curve (E, L, f, l); - Tol = BRep_Tool::Tolerance(E); - - if ( ! C.IsNull() && myCopyGeom ) - C = Handle(Geom_Curve)::DownCast(C->Copy()); - - return Standard_True; - } - - //! Returns true to indicate the need to copy polygon; - //! copies it if required - Standard_Boolean NewPolygon(const TopoDS_Edge& E, Handle(Poly_Polygon3D)& P) Standard_OVERRIDE - { - if (!myCopyMesh - && BRep_Tool::IsGeometric (E)) - { - return Standard_False; - } - - TopLoc_Location aLoc; - P = BRep_Tool::Polygon3D(E, aLoc); - - if (P.IsNull()) - return Standard_False; - - // polygon is copied if and only if the geometry need to be copied too - if (myCopyGeom) - P = P->Copy(); - return Standard_True; - } - - //! Returns true to indicate the need to copy polygon; - //! copies it if required - Standard_Boolean NewPolygonOnTriangulation(const TopoDS_Edge& E, const TopoDS_Face& F, - Handle(Poly_PolygonOnTriangulation)& P) Standard_OVERRIDE - { - if (!myCopyMesh - && BRep_Tool::IsGeometric (E)) - { - return Standard_False; - } - - TopLoc_Location aLoc; - Handle(Poly_Triangulation) aTria = BRep_Tool::Triangulation(F, aLoc); - P = BRep_Tool::PolygonOnTriangulation(E, aTria, aLoc); - - if (P.IsNull()) - return Standard_False; - - // polygon is copied if and only if the geometry need to be copied too - if (myCopyGeom) - P = P->Copy(); - return Standard_True; - } - - //! Returns true to indicate the need to copy vertex - Standard_Boolean NewPoint (const TopoDS_Vertex& V, gp_Pnt& P, - Standard_Real& Tol) Standard_OVERRIDE - { - P = BRep_Tool::Pnt(V); - Tol = BRep_Tool::Tolerance(V); - return Standard_True; - } - - //! Returns true to indicate the need to copy edge; - //! copies pcurve if requested - Standard_Boolean NewCurve2d (const TopoDS_Edge& E, - const TopoDS_Face& F, - const TopoDS_Edge& /*NewE*/, - const TopoDS_Face& /*NewF*/, - Handle(Geom2d_Curve)& C, - Standard_Real& Tol) Standard_OVERRIDE - { - Tol = BRep_Tool::Tolerance(E); - Standard_Real f, l; - C = BRep_Tool::CurveOnSurface (E, F, f, l); - - if ( ! C.IsNull() && myCopyGeom ) - C = Handle(Geom2d_Curve)::DownCast (C->Copy()); - - return Standard_True; - } - - //! Returns true to indicate the need to copy vertex - Standard_Boolean NewParameter (const TopoDS_Vertex& V, const TopoDS_Edge& E, - Standard_Real& P, Standard_Real& Tol) Standard_OVERRIDE - { - if (V.IsNull()) return Standard_False; // infinite edge may have Null vertex - - Tol = BRep_Tool::Tolerance(V); - P = BRep_Tool::Parameter (V, E); - - return Standard_True; - } - - //! Returns the continuity of E between F1 and F2 - GeomAbs_Shape Continuity (const TopoDS_Edge& E, const TopoDS_Face& F1, - const TopoDS_Face& F2, const TopoDS_Edge&, - const TopoDS_Face&, const TopoDS_Face&) Standard_OVERRIDE - { - return BRep_Tool::Continuity (E, F1, F2); - } - -public: - DEFINE_STANDARD_RTTI_INLINE(BRepBuilderAPI_Copy_Modification,BRepTools_Modification) - -private: - Standard_Boolean myCopyGeom; - Standard_Boolean myCopyMesh; -}; - -} // anonymous namespace +#include //======================================================================= //function : BRepBuilderAPI_Copy @@ -203,7 +25,7 @@ class BRepBuilderAPI_Copy_Modification : public BRepTools_Modification BRepBuilderAPI_Copy::BRepBuilderAPI_Copy () { - myModification = new BRepBuilderAPI_Copy_Modification(Standard_True, Standard_False); + myModification = new BRepTools_CopyModification(Standard_True, Standard_False); } @@ -214,7 +36,7 @@ BRepBuilderAPI_Copy::BRepBuilderAPI_Copy () BRepBuilderAPI_Copy::BRepBuilderAPI_Copy(const TopoDS_Shape& S, const Standard_Boolean copyGeom, const Standard_Boolean copyMesh) { - myModification = new BRepBuilderAPI_Copy_Modification(copyGeom, copyMesh); + myModification = new BRepTools_CopyModification(copyGeom, copyMesh); DoModif(S); } @@ -226,7 +48,7 @@ BRepBuilderAPI_Copy::BRepBuilderAPI_Copy(const TopoDS_Shape& S, const Standard_B void BRepBuilderAPI_Copy::Perform(const TopoDS_Shape& S, const Standard_Boolean copyGeom, const Standard_Boolean copyMesh) { - myModification = new BRepBuilderAPI_Copy_Modification(copyGeom, copyMesh); + myModification = new BRepTools_CopyModification(copyGeom, copyMesh); NotDone(); // on force la copie si on vient deja d`en faire une DoModif(S); } diff --git a/src/BRepTools/BRepTools_CopyModification.cxx b/src/BRepTools/BRepTools_CopyModification.cxx new file mode 100644 index 0000000000..7d9a7b2933 --- /dev/null +++ b/src/BRepTools/BRepTools_CopyModification.cxx @@ -0,0 +1,215 @@ +// Copyright (c) 1999-2022 OPEN CASCADE SAS +// +// This file is part of Open CASCADE Technology software library. +// +// This library is free software; you can redistribute it and/or modify it under +// the terms of the GNU Lesser General Public License version 2.1 as published +// by the Free Software Foundation, with special exception defined in the file +// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT +// distribution for complete text of the license and disclaimer of any warranty. +// +// Alternatively, this file may be used under the terms of Open CASCADE +// commercial license or contractual agreement. + + +#include + +#include +#include +#include + +IMPLEMENT_STANDARD_RTTIEXT(BRepTools_CopyModification, BRepTools_Modification) + +//======================================================================= +//function : BRepTools_CopyModification +//purpose : +//======================================================================= +BRepTools_CopyModification::BRepTools_CopyModification(const Standard_Boolean copyGeom, + const Standard_Boolean copyMesh) + : myCopyGeom(copyGeom), + myCopyMesh(copyMesh) +{ +} + +//======================================================================= +//function : NewSurface +//purpose : +//======================================================================= +Standard_Boolean BRepTools_CopyModification::NewSurface(const TopoDS_Face& theFace, + Handle(Geom_Surface)& theSurf, + TopLoc_Location& theLoc, + Standard_Real& theTol, + Standard_Boolean& theRevWires, + Standard_Boolean& theRevFace) +{ + theSurf = BRep_Tool::Surface(theFace, theLoc); + theTol = BRep_Tool::Tolerance(theFace); + theRevWires = theRevFace = Standard_False; + + if (!theSurf.IsNull() && myCopyGeom) + theSurf = Handle(Geom_Surface)::DownCast(theSurf->Copy()); + + return Standard_True; +} + +//======================================================================= +//function : NewTriangulation +//purpose : +//======================================================================= +Standard_Boolean BRepTools_CopyModification::NewTriangulation(const TopoDS_Face& theFace, + Handle(Poly_Triangulation)& theTri) +{ + if (!myCopyMesh && BRep_Tool::IsGeometric(theFace)) + { + return Standard_False; + } + + TopLoc_Location aLoc; + theTri = BRep_Tool::Triangulation(theFace, aLoc); + + if (theTri.IsNull()) + return Standard_False; + + // mesh is copied if and only if the geometry need to be copied too + if (myCopyGeom) + theTri = theTri->Copy(); + return Standard_True; +} + +//======================================================================= +//function : NewCurve +//purpose : +//======================================================================= +Standard_Boolean BRepTools_CopyModification::NewCurve(const TopoDS_Edge& theEdge, + Handle(Geom_Curve)& theCurve, + TopLoc_Location& theLoc, + Standard_Real& theTol) +{ + Standard_Real aFirst, aLast; + theCurve = BRep_Tool::Curve(theEdge, theLoc, aFirst, aLast); + theTol = BRep_Tool::Tolerance(theEdge); + + if (!theCurve.IsNull() && myCopyGeom) + theCurve = Handle(Geom_Curve)::DownCast(theCurve->Copy()); + + return Standard_True; +} + +//======================================================================= +//function : NewPolygon +//purpose : +//======================================================================= +Standard_Boolean BRepTools_CopyModification::NewPolygon(const TopoDS_Edge& theEdge, + Handle(Poly_Polygon3D)& thePoly) +{ + if (!myCopyMesh && BRep_Tool::IsGeometric(theEdge)) + { + return Standard_False; + } + + TopLoc_Location aLoc; + thePoly = BRep_Tool::Polygon3D(theEdge, aLoc); + + if (thePoly.IsNull()) + return Standard_False; + + // polygon is copied if and only if the geometry need to be copied too + if (myCopyGeom) + thePoly = thePoly->Copy(); + return Standard_True; +} + +//======================================================================= +//function : NewPolygonOnTriangulation +//purpose : +//======================================================================= +Standard_Boolean BRepTools_CopyModification::NewPolygonOnTriangulation( + const TopoDS_Edge& theEdge, + const TopoDS_Face& theFace, + Handle(Poly_PolygonOnTriangulation)& thePoly) +{ + if (!myCopyMesh && BRep_Tool::IsGeometric(theEdge)) + { + return Standard_False; + } + + TopLoc_Location aLoc; + Handle(Poly_Triangulation) aTria = BRep_Tool::Triangulation(theFace, aLoc); + thePoly = BRep_Tool::PolygonOnTriangulation(theEdge, aTria, aLoc); + + if (thePoly.IsNull()) + return Standard_False; + + // polygon is copied if and only if the geometry need to be copied too + if (myCopyGeom) + thePoly = thePoly->Copy(); + return Standard_True; +} + +//======================================================================= +//function : NewPoint +//purpose : +//======================================================================= +Standard_Boolean BRepTools_CopyModification::NewPoint(const TopoDS_Vertex& theVertex, + gp_Pnt& thePnt, + Standard_Real& theTol) +{ + thePnt = BRep_Tool::Pnt(theVertex); + theTol = BRep_Tool::Tolerance(theVertex); + return Standard_True; +} + +//======================================================================= +//function : NewCurve2d +//purpose : +//======================================================================= +Standard_Boolean BRepTools_CopyModification::NewCurve2d(const TopoDS_Edge& theEdge, + const TopoDS_Face& theFace, + const TopoDS_Edge&, + const TopoDS_Face&, + Handle(Geom2d_Curve)& theCurve, + Standard_Real& theTol) +{ + theTol = BRep_Tool::Tolerance(theEdge); + Standard_Real aFirst, aLast; + theCurve = BRep_Tool::CurveOnSurface(theEdge, theFace, aFirst, aLast); + + if (!theCurve.IsNull() && myCopyGeom) + theCurve = Handle(Geom2d_Curve)::DownCast(theCurve->Copy()); + + return Standard_True; +} + +//======================================================================= +//function : NewParameter +//purpose : +//======================================================================= +Standard_Boolean BRepTools_CopyModification::NewParameter(const TopoDS_Vertex& theVertex, + const TopoDS_Edge& theEdge, + Standard_Real& thePnt, + Standard_Real& theTol) +{ + if (theVertex.IsNull()) + return Standard_False; // infinite edge may have Null vertex + + theTol = BRep_Tool::Tolerance(theVertex); + thePnt = BRep_Tool::Parameter(theVertex, theEdge); + + return Standard_True; +} + +//======================================================================= +//function : Continuity +//purpose : +//======================================================================= +GeomAbs_Shape BRepTools_CopyModification::Continuity(const TopoDS_Edge& theEdge, + const TopoDS_Face& theFace1, + const TopoDS_Face& theFace2, + const TopoDS_Edge&, + const TopoDS_Face&, + const TopoDS_Face&) +{ + return BRep_Tool::Continuity(theEdge, theFace1, theFace2); +} + + diff --git a/src/BRepTools/BRepTools_CopyModification.hxx b/src/BRepTools/BRepTools_CopyModification.hxx new file mode 100644 index 0000000000..9caf2fb662 --- /dev/null +++ b/src/BRepTools/BRepTools_CopyModification.hxx @@ -0,0 +1,124 @@ +// Copyright (c) 1999-2022 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 _BRepTools_CopyModification_HeaderFile +#define _BRepTools_CopyModification_HeaderFile + +#include + +class BRepTools_CopyModification; +DEFINE_STANDARD_HANDLE(BRepTools_CopyModification, BRepTools_Modification) + +//! Tool class implementing necessary functionality for copying geometry and triangulation. +class BRepTools_CopyModification : public BRepTools_Modification +{ +public: + //! Constructor. + //! \param[in] theCopyGeom indicates that the geomtery (surfaces and curves) should be copied + //! \param[in] theCopyMesh indicates that the triangulation should be copied + Standard_EXPORT explicit BRepTools_CopyModification(const Standard_Boolean theCopyGeom = Standard_True, + const Standard_Boolean theCopyMesh = Standard_True); + + //! Returns true if theFace has been modified. + //! If the face has been modified: + //! - theSurf is the new geometry of the face, + //! - theLoc is its new location, and + //! - theTol is the new tolerance. + //! theRevWires, theRevFace are always set to false, because the orientaion is not changed. + Standard_EXPORT Standard_Boolean NewSurface(const TopoDS_Face& theFace, + Handle(Geom_Surface)& theSurf, + TopLoc_Location& theLoc, + Standard_Real& theTol, + Standard_Boolean& theRevWires, + Standard_Boolean& theRevFace) Standard_OVERRIDE; + + //! Returns true if theEdge has been modified. + //! If the edge has been modified: + //! - theCurve is the new geometric support of the edge, + //! - theLoc is the new location, and + //! - theTol is the new tolerance. + //! If the edge has not been modified, this function + //! returns false, and the values of theCurve, theLoc and theTol are not significant. + Standard_EXPORT Standard_Boolean NewCurve(const TopoDS_Edge& theEdge, + Handle(Geom_Curve)& theCurve, + TopLoc_Location& theLoc, + Standard_Real& theTol) Standard_OVERRIDE; + + //! Returns true if theVertex has been modified. + //! If the vertex has been modified: + //! - thePnt is the new geometry of the vertex, and + //! - theTol is the new tolerance. + //! If the vertex has not been modified this function + //! returns false, and the values of thePnt and theTol are not significant. + Standard_EXPORT Standard_Boolean NewPoint(const TopoDS_Vertex& theVertex, gp_Pnt& thePnt, Standard_Real& theTol) Standard_OVERRIDE; + + //! Returns true if theEdge has a new curve on surface on theFace. + //! If a new curve exists: + //! - theCurve is the new geometric support of the edge, + //! - theTol the new tolerance. + //! If no new curve exists, this function returns false, and + //! the values of theCurve and theTol are not significant. + Standard_EXPORT Standard_Boolean NewCurve2d(const TopoDS_Edge& theEdge, + const TopoDS_Face& theFace, + const TopoDS_Edge& theNewEdge, + const TopoDS_Face& theNewFace, + Handle(Geom2d_Curve)& theCurve, + Standard_Real& theTol) Standard_OVERRIDE; + + //! Returns true if theVertex has a new parameter on theEdge. + //! If a new parameter exists: + //! - thePnt is the parameter, and + //! - theTol is the new tolerance. + //! If no new parameter exists, this function returns false, + //! and the values of thePnt and theTol are not significant. + Standard_EXPORT Standard_Boolean NewParameter(const TopoDS_Vertex& theVertex, + const TopoDS_Edge& theEdge, + Standard_Real& thePnt, + Standard_Real& theTol) Standard_OVERRIDE; + + //! Returns the continuity of theNewEdge between theNewFace1 and theNewFace2. + //! + //! theNewEdge is the new edge created from theEdge. theNewFace1 + //! (resp. theNewFace2) is the new face created from theFace1 (resp. theFace2). + Standard_EXPORT GeomAbs_Shape Continuity(const TopoDS_Edge& theEdge, + const TopoDS_Face& theFace1, + const TopoDS_Face& theFace2, + const TopoDS_Edge& theNewEdge, + const TopoDS_Face& theNewFace1, + const TopoDS_Face& theNewFace2) Standard_OVERRIDE; + + //! Returns true if the face has been modified according to changed triangulation. + //! If the face has been modified: + //! - theTri is a new triangulation on the face + Standard_EXPORT Standard_Boolean NewTriangulation(const TopoDS_Face& theFace, Handle(Poly_Triangulation)& theTri) Standard_OVERRIDE; + + //! Returns true if the edge has been modified according to changed polygon. + //! If the edge has been modified: + //! - thePoly is a new polygon + Standard_EXPORT Standard_Boolean NewPolygon(const TopoDS_Edge& theEdge, Handle(Poly_Polygon3D)& thePoly) Standard_OVERRIDE; + + //! Returns true if the edge has been modified according to changed polygon on triangulation. + //! If the edge has been modified: + //! - thePoly is a new polygon on triangulation + Standard_EXPORT Standard_Boolean NewPolygonOnTriangulation(const TopoDS_Edge& theEdge, + const TopoDS_Face& theFace, + Handle(Poly_PolygonOnTriangulation)& thePoly) Standard_OVERRIDE; + + DEFINE_STANDARD_RTTIEXT(BRepTools_CopyModification, BRepTools_Modification) + +private: + Standard_Boolean myCopyGeom; + Standard_Boolean myCopyMesh; +}; + +#endif // _BRepTools_CopyModification_HeaderFile diff --git a/src/BRepTools/BRepTools_GTrsfModification.cxx b/src/BRepTools/BRepTools_GTrsfModification.cxx index dfb116dc88..7f2d9731d6 100644 --- a/src/BRepTools/BRepTools_GTrsfModification.cxx +++ b/src/BRepTools/BRepTools_GTrsfModification.cxx @@ -29,6 +29,7 @@ #include #include #include +#include #include #include #include @@ -88,7 +89,13 @@ Standard_Boolean BRepTools_GTrsfModification::NewSurface gp_GTrsf gtrsf; gtrsf.SetVectorialPart(myGTrsf.VectorialPart()); gtrsf.SetTranslationPart(myGTrsf.TranslationPart()); - S = Handle(Geom_Surface)::DownCast(BRep_Tool::Surface(F,L)->Copy()); + S = BRep_Tool::Surface(F, L); + if (S.IsNull()) + { + //processing the case when there is no geometry + return Standard_False; + } + S = Handle(Geom_Surface)::DownCast(S->Copy()); Tol = BRep_Tool::Tolerance(F); Tol *= myGScale; @@ -173,7 +180,7 @@ Standard_Boolean BRepTools_GTrsfModification::NewCurve C = new Geom_TrimmedCurve(C, f, l); } L.Identity() ; - return Standard_True; + return !C.IsNull(); } //======================================================================= @@ -214,6 +221,11 @@ Standard_Boolean BRepTools_GTrsfModification::NewCurve2d Tol *= myGScale; Standard_Real f,l; C = BRep_Tool::CurveOnSurface(E,F,f,l); + if (C.IsNull()) + { + //processing the case when there is no geometry + return Standard_False; + } C = new Geom2d_TrimmedCurve(C, f, l); return Standard_True; } @@ -251,4 +263,113 @@ GeomAbs_Shape BRepTools_GTrsfModification::Continuity return BRep_Tool::Continuity(E,F1,F2); } +//======================================================================= +//function : NewTriangulation +//purpose : +//======================================================================= + +Standard_Boolean BRepTools_GTrsfModification::NewTriangulation(const TopoDS_Face& theFace, + Handle(Poly_Triangulation)& theTriangulation) +{ + TopLoc_Location aLoc; + theTriangulation = BRep_Tool::Triangulation(theFace, aLoc); + if (theTriangulation.IsNull()) + { + return Standard_False; + } + + gp_GTrsf aGTrsf; + aGTrsf.SetVectorialPart(myGTrsf.VectorialPart()); + aGTrsf.SetTranslationPart(myGTrsf.TranslationPart()); + aGTrsf.Multiply(aLoc.Transformation()); + + theTriangulation = theTriangulation->Copy(); + theTriangulation->SetCachedMinMax(Bnd_Box()); // clear bounding box + theTriangulation->Deflection(theTriangulation->Deflection() * Abs(myGScale)); + // apply transformation to 3D nodes + for (Standard_Integer anInd = 1; anInd <= theTriangulation->NbNodes(); ++anInd) + { + gp_Pnt aP = theTriangulation->Node(anInd); + aGTrsf.Transforms(aP.ChangeCoord()); + theTriangulation->SetNode(anInd, aP); + } + // modify triangles orientation in case of mirror transformation + if (myGScale < 0.0) + { + for (Standard_Integer anInd = 1; anInd <= theTriangulation->NbTriangles(); ++anInd) + { + Poly_Triangle aTria = theTriangulation->Triangle(anInd); + Standard_Integer aN1, aN2, aN3; + aTria.Get(aN1, aN2, aN3); + aTria.Set(aN1, aN3, aN2); + theTriangulation->SetTriangle(anInd, aTria); + } + } + // modify normals + if (theTriangulation->HasNormals()) + { + for (Standard_Integer anInd = 1; anInd <= theTriangulation->NbTriangles(); ++anInd) + { + gp_Dir aNormal = theTriangulation->Normal(anInd); + aNormal.Transform(aGTrsf.Trsf()); + theTriangulation->SetNormal(anInd, aNormal); + } + } + + return Standard_True; +} + +//======================================================================= +//function : NewPolygon +//purpose : +//======================================================================= + +Standard_Boolean BRepTools_GTrsfModification::NewPolygon(const TopoDS_Edge& theEdge, + Handle(Poly_Polygon3D)& thePoly) +{ + TopLoc_Location aLoc; + thePoly = BRep_Tool::Polygon3D(theEdge, aLoc); + if (thePoly.IsNull()) + { + return Standard_False; + } + + gp_GTrsf aGTrsf; + aGTrsf.SetVectorialPart(myGTrsf.VectorialPart()); + aGTrsf.SetTranslationPart(myGTrsf.TranslationPart()); + aGTrsf.Multiply(aLoc.Transformation()); + + thePoly = thePoly->Copy(); + thePoly->Deflection(thePoly->Deflection() * Abs(myGScale)); + // transform nodes + TColgp_Array1OfPnt& aNodesArray = thePoly->ChangeNodes(); + for (Standard_Integer anId = aNodesArray.Lower(); anId <= aNodesArray.Upper(); ++anId) + { + gp_Pnt& aP = aNodesArray.ChangeValue(anId); + aGTrsf.Transforms(aP.ChangeCoord()); + } + return Standard_True; +} + +//======================================================================= +//function : NewPolygonOnTriangulation +//purpose : +//======================================================================= +Standard_Boolean BRepTools_GTrsfModification::NewPolygonOnTriangulation + (const TopoDS_Edge& theEdge, + const TopoDS_Face& theFace, + Handle(Poly_PolygonOnTriangulation)& thePoly) +{ + TopLoc_Location aLoc; + Handle(Poly_Triangulation) aT = BRep_Tool::Triangulation(theFace, aLoc); + if (aT.IsNull()) + { + return Standard_False; + } + + thePoly = BRep_Tool::PolygonOnTriangulation(theEdge, aT, aLoc); + if (!thePoly.IsNull()) + thePoly = thePoly->Copy(); + return Standard_True; +} diff --git a/src/BRepTools/BRepTools_GTrsfModification.hxx b/src/BRepTools/BRepTools_GTrsfModification.hxx index 20c9ca7f72..1494397c61 100644 --- a/src/BRepTools/BRepTools_GTrsfModification.hxx +++ b/src/BRepTools/BRepTools_GTrsfModification.hxx @@ -101,6 +101,25 @@ public: //! (resp. ). Standard_EXPORT GeomAbs_Shape Continuity (const TopoDS_Edge& E, const TopoDS_Face& F1, const TopoDS_Face& F2, const TopoDS_Edge& NewE, const TopoDS_Face& NewF1, const TopoDS_Face& NewF2) Standard_OVERRIDE; + //! Returns true if the face has been modified according to changed triangulation. + //! If the face has been modified: + //! - theTri is a new triangulation on the face + Standard_EXPORT Standard_Boolean NewTriangulation(const TopoDS_Face& theFace, + Handle(Poly_Triangulation)& theTri) Standard_OVERRIDE; + + //! Returns true if the edge has been modified according to changed polygon. + //! If the edge has been modified: + //! - thePoly is a new polygon + Standard_EXPORT Standard_Boolean NewPolygon(const TopoDS_Edge& theEdge, + Handle(Poly_Polygon3D)& thePoly) Standard_OVERRIDE; + + //! Returns true if the edge has been modified according to changed polygon on triangulation. + //! If the edge has been modified: + //! - thePoly is a new polygon on triangulation + Standard_EXPORT Standard_Boolean NewPolygonOnTriangulation(const TopoDS_Edge& theEdge, + const TopoDS_Face& theFace, + Handle(Poly_PolygonOnTriangulation)& thePoly) Standard_OVERRIDE; + diff --git a/src/BRepTools/BRepTools_NurbsConvertModification.cxx b/src/BRepTools/BRepTools_NurbsConvertModification.cxx index fff0a4d6b8..85a30c63c6 100644 --- a/src/BRepTools/BRepTools_NurbsConvertModification.cxx +++ b/src/BRepTools/BRepTools_NurbsConvertModification.cxx @@ -20,7 +20,10 @@ #include #include #include +#include +#include #include +#include #include #include #include @@ -47,30 +50,163 @@ #include #include #include -IMPLEMENT_STANDARD_RTTIEXT(BRepTools_NurbsConvertModification,BRepTools_Modification) + +IMPLEMENT_STANDARD_RTTIEXT(BRepTools_NurbsConvertModification,BRepTools_CopyModification) // -static void GeomLib_ChangeUBounds(Handle(Geom_BSplineSurface)& aSurface, - const Standard_Real newU1, - const Standard_Real newU2) -{ - TColStd_Array1OfReal knots(1,aSurface->NbUKnots()) ; - aSurface->UKnots(knots) ; - BSplCLib::Reparametrize(newU1, - newU2, - knots) ; - aSurface->SetUKnots(knots) ; -} -static void GeomLib_ChangeVBounds(Handle(Geom_BSplineSurface)& aSurface, - const Standard_Real newV1, - const Standard_Real newV2) +namespace { - TColStd_Array1OfReal knots(1,aSurface->NbVKnots()) ; - aSurface->VKnots(knots) ; - BSplCLib::Reparametrize(newV1, - newV2, - knots) ; - aSurface->SetVKnots(knots) ; + static void GeomLib_ChangeUBounds(Handle(Geom_BSplineSurface)& aSurface, + const Standard_Real newU1, + const Standard_Real newU2) + { + TColStd_Array1OfReal knots(1, aSurface->NbUKnots()); + aSurface->UKnots(knots); + BSplCLib::Reparametrize(newU1, newU2, knots); + aSurface->SetUKnots(knots); + } + + static void GeomLib_ChangeVBounds(Handle(Geom_BSplineSurface)& aSurface, + const Standard_Real newV1, + const Standard_Real newV2) + { + TColStd_Array1OfReal knots(1, aSurface->NbVKnots()); + aSurface->VKnots(knots); + BSplCLib::Reparametrize(newV1, newV2, knots); + aSurface->SetVKnots(knots); + } + + // find 3D curve from theEdge in theMap, and return the transformed curve or NULL + static Handle(Geom_Curve) newCurve(const TColStd_IndexedDataMapOfTransientTransient& theMap, + const TopoDS_Edge& theEdge, + Standard_Real& theFirst, + Standard_Real& theLast) + { + Handle(Geom_Curve) aNewCurve; + + TopLoc_Location aLoc; + Handle(Geom_Curve) aCurve = BRep_Tool::Curve(theEdge, aLoc, theFirst, theLast); + if (!aCurve.IsNull() && theMap.Contains(aCurve)) + { + aNewCurve = Handle(Geom_Curve)::DownCast(theMap.FindFromKey(aCurve)); + aNewCurve = Handle(Geom_Curve)::DownCast(aNewCurve->Transformed(aLoc.Transformation())); + } + return aNewCurve; + } + + // find 2D curve from theEdge on theFace in theMap, and return the transformed curve or NULL + static Handle(Geom2d_Curve) newCurve(const TColStd_IndexedDataMapOfTransientTransient& theMap, + const TopoDS_Edge& theEdge, + const TopoDS_Face& theFace, + Standard_Real& theFirst, + Standard_Real& theLast) + { + Handle(Geom2d_Curve) aC2d = BRep_Tool::CurveOnSurface(theEdge, theFace, theFirst, theLast); + return (!aC2d.IsNull() && theMap.Contains(aC2d)) ? Handle(Geom2d_Curve)::DownCast(theMap.FindFromKey(aC2d)) + : Handle(Geom2d_Curve)(); + } + + // find surface from theFace in theMap, and return the transformed surface or NULL + static Handle(Geom_Surface) newSurface(const TColStd_IndexedDataMapOfTransientTransient& theMap, + const TopoDS_Face& theFace) + { + Handle(Geom_Surface) aNewSurf; + + TopLoc_Location aLoc; + Handle(Geom_Surface) aSurf = BRep_Tool::Surface(theFace, aLoc); + if (!aSurf.IsNull() && theMap.Contains(aSurf)) + { + aNewSurf = Handle(Geom_Surface)::DownCast(theMap.FindFromKey(aSurf)); + aNewSurf = Handle(Geom_Surface)::DownCast(aNewSurf->Transformed(aLoc.Transformation())); + } + return aNewSurf; + } + + static Standard_Boolean newParameter(const gp_Pnt& thePoint, + const Handle(Geom_Curve)& theCurve, + const Standard_Real theFirst, + const Standard_Real theLast, + const Standard_Real theTol, + Standard_Real& theParam) + { + GeomAdaptor_Curve anAdaptor(theCurve); + Extrema_LocateExtPC proj(thePoint, anAdaptor, theParam, theFirst, theLast, Precision::PConfusion()); + if (proj.IsDone()) + { + Standard_Real aDist2Min = proj.SquareDistance(); + if (aDist2Min < theTol * theTol) + { + theParam = proj.Point().Parameter(); + return Standard_True; + } + } + return Standard_False; + } + + static Standard_Boolean newParameter(const gp_Pnt2d& theUV, + const Handle(Geom2d_Curve)& theCurve2d, + const Standard_Real theFirst, + const Standard_Real theLast, + const Standard_Real theTol, + Standard_Real& theParam) + { + Geom2dAdaptor_Curve anAdaptor(theCurve2d); + Extrema_LocateExtPC2d aProj(theUV, anAdaptor, theParam, Precision::PConfusion()); + if (aProj.IsDone()) + { + Standard_Real aDist2Min = aProj.SquareDistance(); + if (aDist2Min < theTol * theTol) + { + theParam = aProj.Point().Parameter(); + return Standard_True; + } + } + else + { + // Try to use general extrema to find the parameter, because Extrema_LocateExtPC2d + // sometimes could not find a solution if the parameter's first approach is several + // spans away from the expected solution (test bugs/modalg_7/bug28722). + Extrema_ExtPC2d anExt(theUV, anAdaptor, theFirst, theLast); + if (anExt.IsDone()) + { + Standard_Integer aMinInd = 0; + Standard_Real aMinSqDist = Precision::Infinite(); + for (Standard_Integer anIndex = 1; anIndex <= anExt.NbExt(); ++anIndex) + if (anExt.SquareDistance(anIndex) < aMinSqDist) + { + aMinSqDist = anExt.SquareDistance(anIndex); + aMinInd = anIndex; + } + if (aMinSqDist < theTol * theTol) + { + theParam = anExt.Point(aMinInd).Parameter(); + return Standard_True; + } + } + } + return Standard_False; + } + + static Standard_Boolean newUV(const gp_Pnt& thePoint, + const Handle(Geom_Surface)& theSurf, + const Standard_Real theTol, + gp_Pnt2d& theUV) + { + GeomAdaptor_Surface anAdaptor(theSurf); + Extrema_GenLocateExtPS aProj(anAdaptor); + aProj.Perform(thePoint, theUV.X(), theUV.Y()); + if (aProj.IsDone()) + { + Standard_Real aDist2Min = aProj.SquareDistance(); + if (aDist2Min < theTol * theTol) + { + gp_XY& aUV = theUV.ChangeCoord(); + aProj.Point().Parameter(aUV.ChangeCoord(1), aUV.ChangeCoord(2)); + return Standard_True; + } + } + return Standard_False; + } } //======================================================================= @@ -102,6 +238,12 @@ Standard_Boolean BRepTools_NurbsConvertModification::NewSurface RevWires = Standard_False; RevFace = Standard_False; Handle(Geom_Surface) SS = BRep_Tool::Surface(F,L); + if (SS.IsNull()) + { + //processing the case when there is no geometry + return Standard_False; + } + Handle(Standard_Type) TheTypeSS = SS->DynamicType(); if ((TheTypeSS == STANDARD_TYPE(Geom_BSplineSurface)) || (TheTypeSS == STANDARD_TYPE(Geom_BezierSurface))) { @@ -115,7 +257,7 @@ Standard_Boolean BRepTools_NurbsConvertModification::NewSurface //OCC466(apo)-> U1 = curvU1; U2 = curvU2; V1 = curvV1; V2 = curvV2; - SS->Bounds(surfU1,surfU2,surfV1,surfV2); + S->Bounds(surfU1,surfU2,surfV1,surfV2); if (Abs(U1 - surfU1) <= TolPar) U1 = surfU1; @@ -192,10 +334,10 @@ Standard_Boolean BRepTools_NurbsConvertModification::NewSurface if (Abs(surfU1-U1) > Tol || Abs(surfU2-U2) > Tol || Abs(surfV1-V1) > Tol || Abs(surfV2-V2) > Tol) - SS = new Geom_RectangularTrimmedSurface(S, U1, U2, V1, V2); - SS->Bounds(surfU1,surfU2,surfV1,surfV2); + S = new Geom_RectangularTrimmedSurface(S, U1, U2, V1, V2); + S->Bounds(surfU1,surfU2,surfV1,surfV2); - S = GeomConvert::SurfaceToBSplineSurface(SS); + S = GeomConvert::SurfaceToBSplineSurface(S); Handle(Geom_BSplineSurface) BS = Handle(Geom_BSplineSurface)::DownCast(S) ; BS->Resolution(Tol, UTol, VTol) ; @@ -210,6 +352,9 @@ Standard_Boolean BRepTools_NurbsConvertModification::NewSurface GeomLib_ChangeVBounds(BS, V1, V2) ; } + if (!myMap.Contains(SS)) { + myMap.Add(SS, S); + } return Standard_True; } @@ -234,6 +379,41 @@ static Standard_Boolean IsConvert(const TopoDS_Edge& E) } +//======================================================================= +//function : NewTriangulation +//purpose : +//======================================================================= + +Standard_Boolean BRepTools_NurbsConvertModification::NewTriangulation(const TopoDS_Face& theFace, + Handle(Poly_Triangulation)& theTri) +{ + if (!BRepTools_CopyModification::NewTriangulation(theFace, theTri)) + { + return Standard_False; + } + + // convert UV nodes of the mesh + if (theTri->HasUVNodes()) + { + TopLoc_Location aLoc; + Handle(Geom_Surface) aSurf = BRep_Tool::Surface(theFace, aLoc); + Handle(Geom_Surface) aNewSurf = newSurface(myMap, theFace); + if (!aSurf.IsNull() && !aNewSurf.IsNull()) + { + Standard_Real aTol = BRep_Tool::Tolerance(theFace); + for (Standard_Integer anInd = 1; anInd <= theTri->NbNodes(); ++anInd) + { + gp_Pnt2d aUV = theTri->UVNode(anInd); + gp_Pnt aPoint = aSurf->Value(aUV.X(), aUV.Y()); + if (newUV(aPoint, aNewSurf, aTol, aUV)) + theTri->SetUVNode(anInd, aUV); + } + } + } + + return Standard_True; +} + //======================================================================= //function : NewCurve //purpose : @@ -312,6 +492,40 @@ Standard_Boolean BRepTools_NurbsConvertModification::NewCurve return Standard_True ; } +//======================================================================= +//function : NewPolygon +//purpose : +//======================================================================= + +Standard_Boolean BRepTools_NurbsConvertModification::NewPolygon(const TopoDS_Edge& theEdge, + Handle(Poly_Polygon3D)& thePoly) +{ + if (!BRepTools_CopyModification::NewPolygon(theEdge, thePoly)) + { + return Standard_False; + } + + // update parameters of polygon + if (thePoly->HasParameters()) + { + Standard_Real aTol = BRep_Tool::Tolerance(theEdge); + Standard_Real aFirst, aLast; + Handle(Geom_Curve) aCurve = BRep_Tool::Curve(theEdge, aFirst, aLast); + Handle(Geom_Curve) aNewCurve = newCurve(myMap, theEdge, aFirst, aLast); + if (!aCurve.IsNull() && !aNewCurve.IsNull()) // skip processing degenerated edges + { + TColStd_Array1OfReal& aParams = thePoly->ChangeParameters(); + for (Standard_Integer anInd = aParams.Lower(); anInd <= aParams.Upper(); ++anInd) + { + Standard_Real& aParam = aParams(anInd); + gp_Pnt aPoint = aCurve->Value(aParam); + newParameter(aPoint, aNewCurve, aFirst, aLast, aTol, aParam); + } + } + } + return Standard_True; +} + //======================================================================= //function : NewPoint //purpose : @@ -340,7 +554,7 @@ Standard_Boolean BRepTools_NurbsConvertModification::NewCurve2d Tol = BRep_Tool::Tolerance(E); Standard_Real f2d,l2d; - Handle(Geom2d_Curve) C2d = BRep_Tool::CurveOnSurface(E,F,f2d,l2d); + Handle(Geom2d_Curve) aBaseC2d = BRep_Tool::CurveOnSurface(E,F,f2d,l2d); Standard_Real f3d,l3d; TopLoc_Location Loc; Handle(Geom_Curve) C3d = BRep_Tool::Curve(E, Loc, f3d,l3d); @@ -348,6 +562,7 @@ Standard_Boolean BRepTools_NurbsConvertModification::NewCurve2d !C3d->IsKind(STANDARD_TYPE(Geom_BezierCurve))) || IsConvert(E)); + Handle(Geom2d_Curve) C2d = aBaseC2d; if(BRep_Tool::Degenerated(E)) { //Curve2d = C2d; if(!C2d->IsKind(STANDARD_TYPE(Geom2d_TrimmedCurve))) @@ -356,6 +571,7 @@ Standard_Boolean BRepTools_NurbsConvertModification::NewCurve2d C2d = aTrimC; } Curve2d = Geom2dConvert::CurveToBSplineCurve(C2d); + myMap.Add(aBaseC2d, Curve2d); return Standard_True; } if(!BRepTools::IsReallyClosed(E,F)) { @@ -381,9 +597,11 @@ Standard_Boolean BRepTools_NurbsConvertModification::NewCurve2d if(!newE.IsNull()) { C3d = BRep_Tool::Curve(newE, f3d, l3d); } - else { + if (C3d.IsNull()) { C3d = BRep_Tool::Curve(E,f3d,l3d); } + if (C3d.IsNull()) + return Standard_False; GeomAdaptor_Curve G3dAC(C3d, f3d, l3d); Handle(GeomAdaptor_Curve) G3dAHC = new GeomAdaptor_Curve(G3dAC); @@ -403,13 +621,16 @@ Standard_Boolean BRepTools_NurbsConvertModification::NewCurve2d Tol = newTol; myUpdatedEdges.Append(newE); } + myMap.Add(aBaseC2d, Curve2d); return Standard_True; } return Standard_False; } } else { - S = BRep_Tool::Surface(newF); + Handle(Geom_Surface) aNewS = BRep_Tool::Surface(newF); + if (!aNewS.IsNull()) + S = aNewS; } S->Bounds(Uinf, Usup, Vinf, Vsup); //Uinf -= 1e-9; Usup += 1e-9; Vinf -= 1e-9; Vsup += 1e-9; @@ -451,6 +672,7 @@ Standard_Boolean BRepTools_NurbsConvertModification::NewCurve2d Tol = newTol; myUpdatedEdges.Append(newE); } + myMap.Add(aBaseC2d, Curve2d); return Standard_True; } Curve2d = ProjOnCurve.BSpline(); @@ -460,6 +682,7 @@ Standard_Boolean BRepTools_NurbsConvertModification::NewCurve2d Tol = newTol; myUpdatedEdges.Append(newE); } + myMap.Add(aBaseC2d, Curve2d); return Standard_True; } @@ -502,6 +725,7 @@ Standard_Boolean BRepTools_NurbsConvertModification::NewCurve2d Tol = newTol; myUpdatedEdges.Append(newE); } + myMap.Add(aBaseC2d, Curve2d); return Standard_True; } else { @@ -512,6 +736,7 @@ Standard_Boolean BRepTools_NurbsConvertModification::NewCurve2d Tol = newTol; myUpdatedEdges.Append(newE); } + myMap.Add(aBaseC2d, Curve2d); return Standard_True; } } @@ -557,6 +782,7 @@ Standard_Boolean BRepTools_NurbsConvertModification::NewCurve2d Tol = newTol; myUpdatedEdges.Append(newE); } + myMap.Add(aBaseC2d, Curve2d); return Standard_True; } return Standard_False; @@ -582,6 +808,7 @@ Standard_Boolean BRepTools_NurbsConvertModification::NewCurve2d Tol = newTol; myUpdatedEdges.Append(newE); } + myMap.Add(aBaseC2d, Curve2d); return Standard_True; } return Standard_False; @@ -629,6 +856,7 @@ Standard_Boolean BRepTools_NurbsConvertModification::NewCurve2d Tol = newTol; myUpdatedEdges.Append(newE); } + myMap.Add(aBaseC2d, Curve2d); return Standard_True; } else { @@ -640,6 +868,7 @@ Standard_Boolean BRepTools_NurbsConvertModification::NewCurve2d myUpdatedEdges.Append(newE); } mylcu.Append(C2dBis); + myMap.Add(aBaseC2d, Curve2d); return Standard_True; } } @@ -651,11 +880,58 @@ Standard_Boolean BRepTools_NurbsConvertModification::NewCurve2d return Standard_False; } Curve2d = Geom2dConvert::CurveToBSplineCurve(C2d); + myMap.Add(aBaseC2d, Curve2d); return Standard_True; } } } +//======================================================================= +//function : NewPolygonOnTriangulation +//purpose : +//======================================================================= +Standard_Boolean BRepTools_NurbsConvertModification::NewPolygonOnTriangulation( + const TopoDS_Edge& theEdge, + const TopoDS_Face& theFace, + Handle(Poly_PolygonOnTriangulation)& thePoly) +{ + if (!BRepTools_CopyModification::NewPolygonOnTriangulation(theEdge, theFace, thePoly)) + { + return Standard_False; + } + + // update parameters of 2D polygon + if (thePoly->HasParameters()) + { + Standard_Real aTol = Max(BRep_Tool::Tolerance(theEdge), thePoly->Deflection()); + TopLoc_Location aLoc; + Handle(Geom_Surface) aSurf = BRep_Tool::Surface(theFace, aLoc); + Handle(Geom_Surface) aNewSurf = newSurface(myMap, theFace); + Standard_Real aFirst, aLast; + Handle(Geom2d_Curve) aC2d = BRep_Tool::CurveOnSurface(theEdge, theFace, aFirst, aLast); + Handle(Geom2d_Curve) aNewC2d = newCurve(myMap, theEdge, theFace, aFirst, aLast); + if (!aSurf.IsNull() && !aC2d.IsNull() && !aNewSurf.IsNull() && !aNewC2d.IsNull()) + { + // compute 2D tolerance + GeomAdaptor_Surface aSurfAdapt(aSurf); + Standard_Real aTol2D = Max(aSurfAdapt.UResolution(aTol), aSurfAdapt.VResolution(aTol)); + + for (Standard_Integer anInd = 1; anInd <= thePoly->NbNodes(); ++anInd) + { + Standard_Real aParam = thePoly->Parameter(anInd); + gp_Pnt2d aUV = aC2d->Value(aParam); + gp_Pnt aPoint = aSurf->Value(aUV.X(), aUV.Y()); + if (newUV(aPoint, aNewSurf, aTol, aUV) && + newParameter(aUV, aNewC2d, aFirst, aLast, aTol2D, aParam)) + { + thePoly->SetParameter(anInd, aParam); + } + } + } + } + return Standard_True; +} + //======================================================================= //function : NewParameter //purpose : @@ -670,30 +946,12 @@ Standard_Boolean BRepTools_NurbsConvertModification::NewParameter Tol = BRep_Tool::Tolerance(V); if(BRep_Tool::Degenerated(E)) return Standard_False; - Standard_Real f, l, param = BRep_Tool::Parameter(V,E); - TopLoc_Location L; - - Handle(Geom_Curve) gc = BRep_Tool::Curve(E, L, f, l); - if(!myMap.Contains(gc)) - return Standard_False; - - Handle(Geom_BSplineCurve) gcc = - Handle(Geom_BSplineCurve)::DownCast(myMap.FindFromKey(gc)); - gcc = Handle(Geom_BSplineCurve)::DownCast(gcc->Transformed(L.Transformation())); - - GeomAdaptor_Curve ac(gcc); gp_Pnt pnt = BRep_Tool::Pnt(V); - - Extrema_LocateExtPC proj(pnt, ac, param, f, l, Tol); - if(proj.IsDone()) { - Standard_Real Dist2Min = proj.SquareDistance(); - if (Dist2Min < Tol*Tol) { - P = proj.Point().Parameter(); - return Standard_True; - } - } - return Standard_False; + P = BRep_Tool::Parameter(V,E); + Standard_Real aFirst, aLast; + Handle(Geom_Curve) aNewCurve = newCurve(myMap, E, aFirst, aLast); + return !aNewCurve.IsNull() && newParameter(pnt, aNewCurve, aFirst, aLast, Tol, P); } //======================================================================= diff --git a/src/BRepTools/BRepTools_NurbsConvertModification.hxx b/src/BRepTools/BRepTools_NurbsConvertModification.hxx index 8bed3a7ae5..e12620de2f 100644 --- a/src/BRepTools/BRepTools_NurbsConvertModification.hxx +++ b/src/BRepTools/BRepTools_NurbsConvertModification.hxx @@ -22,7 +22,7 @@ #include #include #include -#include +#include #include #include class TopoDS_Face; @@ -36,12 +36,12 @@ class Geom2d_Curve; class BRepTools_NurbsConvertModification; -DEFINE_STANDARD_HANDLE(BRepTools_NurbsConvertModification, BRepTools_Modification) +DEFINE_STANDARD_HANDLE(BRepTools_NurbsConvertModification, BRepTools_CopyModification) //! Defines a modification of the geometry by a Trsf //! from gp. All methods return True and transform the //! geometry. -class BRepTools_NurbsConvertModification : public BRepTools_Modification +class BRepTools_NurbsConvertModification : public BRepTools_CopyModification { public: @@ -100,11 +100,27 @@ public: //! (resp. ). Standard_EXPORT GeomAbs_Shape Continuity (const TopoDS_Edge& E, const TopoDS_Face& F1, const TopoDS_Face& F2, const TopoDS_Edge& NewE, const TopoDS_Face& NewF1, const TopoDS_Face& NewF2) Standard_OVERRIDE; - Standard_EXPORT const TopTools_ListOfShape& GetUpdatedEdges() const; + //! Returns true if the face has been modified according to changed triangulation. + //! If the face has been modified: + //! - theTri is a new triangulation on the face + Standard_EXPORT Standard_Boolean NewTriangulation(const TopoDS_Face& theFace, Handle(Poly_Triangulation)& theTri) Standard_OVERRIDE; + + //! Returns true if the edge has been modified according to changed polygon. + //! If the edge has been modified: + //! - thePoly is a new polygon + Standard_EXPORT Standard_Boolean NewPolygon(const TopoDS_Edge& theEdge, Handle(Poly_Polygon3D)& thePoly) Standard_OVERRIDE; + //! Returns true if the edge has been modified according to changed polygon on triangulation. + //! If the edge has been modified: + //! - thePoly is a new polygon on triangulation + Standard_EXPORT Standard_Boolean NewPolygonOnTriangulation(const TopoDS_Edge& theEdge, + const TopoDS_Face& theFace, + Handle(Poly_PolygonOnTriangulation)& thePoly) Standard_OVERRIDE; + + Standard_EXPORT const TopTools_ListOfShape& GetUpdatedEdges() const; - DEFINE_STANDARD_RTTIEXT(BRepTools_NurbsConvertModification,BRepTools_Modification) + DEFINE_STANDARD_RTTIEXT(BRepTools_NurbsConvertModification,BRepTools_CopyModification) protected: diff --git a/src/BRepTools/FILES b/src/BRepTools/FILES index 60a0c86804..3b1286ee80 100644 --- a/src/BRepTools/FILES +++ b/src/BRepTools/FILES @@ -1,5 +1,7 @@ BRepTools.cxx BRepTools.hxx +BRepTools_CopyModification.cxx +BRepTools_CopyModification.hxx BRepTools_DataMapIteratorOfMapOfVertexPnt2d.hxx BRepTools_Debug.cxx BRepTools_GTrsfModification.cxx diff --git a/tests/bugs/mesh/bug22778 b/tests/bugs/mesh/bug22778 index f0ace0936c..078f1d9282 100644 --- a/tests/bugs/mesh/bug22778 +++ b/tests/bugs/mesh/bug22778 @@ -14,6 +14,7 @@ regexp {([0-9]+) triangles} $trinfo_s str nbtri_s # face converted to NURBS nurbsconvert r s checkshape r +tclean r incmesh r 0.001 set trinfo_r [trinfo r] regexp {([0-9]+) triangles} $trinfo_r str nbtri_r diff --git a/tests/bugs/modalg_8/bug31479_1 b/tests/bugs/modalg_8/bug31479_1 new file mode 100644 index 0000000000..a9f80be161 --- /dev/null +++ b/tests/bugs/modalg_8/bug31479_1 @@ -0,0 +1,31 @@ +puts "=================================================================" +puts "0031479: Modeling Algorithms - exceptiion geometry transformation" +puts " of triangulation-only shapes (without geometry surface) " +puts "=================================================================" +puts "" + +restore [locate_data_file bug31479_P-51-Mustang-2.brep] s + +# reference data +regexp {([0-9+-.eE]*) faces.* ([0-9+-.eE]*) triangles.* ([0-9+-.eE]*) nodes} [trinfo s] full nbFaces nbTri nbNodes +regexp {Mass :\s*([0-9+-.eE]*)} [vprops s] full mass + +set scale 2 +set mass [expr $mass * $scale * $scale * $scale] + +# scaling +tscale s 0 0 0 $scale -copymesh +checktrinfo s -face $nbFaces -nod $nbNodes -tri $nbTri +checkprops s -v $mass -eps 1.e-5 + +# rotation +trotate s 0 0 0 0 0 1 90 -copymesh +checktrinfo s -face $nbFaces -nod $nbNodes -tri $nbTri +checkprops s -v $mass -eps 1.e-5 + +# translation +ttranslate s 0 0 10 -copymesh +checktrinfo s -face $nbFaces -nod $nbNodes -tri $nbTri +checkprops s -v $mass -eps 1.e-5 + +checkview -display s -2d -path ${imagedir}/${test_image}.png diff --git a/tests/bugs/modalg_8/bug31479_2 b/tests/bugs/modalg_8/bug31479_2 new file mode 100644 index 0000000000..f3d82b727a --- /dev/null +++ b/tests/bugs/modalg_8/bug31479_2 @@ -0,0 +1,17 @@ +puts "=================================================================" +puts "0031479: Modeling Algorithms - exceptiion geometry transformation" +puts " of triangulation-only shapes (without geometry surface) " +puts "=================================================================" +puts "" + +restore [locate_data_file bug31479_P-51-Mustang-2.brep] s + +# reference data +regexp {([0-9+-.eE]*) faces.* ([0-9+-.eE]*) triangles.* ([0-9+-.eE]*) nodes} [trinfo s] full nbFaces nbTri nbNodes +regexp {Mass :\s*([0-9+-.eE]*)} [vprops s] full mass + +deform res s 2 3 4 +checktrinfo res -face $nbFaces -nod $nbNodes -tri $nbTri +checkprops res -v [expr $mass * 2 * 3 * 4] -eps 1.e-5 + +checkview -display res -2d -path ${imagedir}/${test_image}.png From 0bab2704ae134830197b63708349e51f5a875564 Mon Sep 17 00:00:00 2001 From: ona Date: Fri, 1 Jul 2022 11:30:01 +0300 Subject: [PATCH 340/639] 0031080: Data Exchange, STL reader - improve API for reading multi-domain STL files reading of multidomain stl files into separate Poly_Triangulation objects --- src/RWStl/RWStl.cxx | 47 ++++++++++++++++++++++ src/RWStl/RWStl.hxx | 13 +++++- src/RWStl/RWStl_Reader.cxx | 6 +++ src/RWStl/RWStl_Reader.hxx | 6 ++- src/XSDRAWSTLVRML/XSDRAWSTLVRML.cxx | 62 ++++++++++++++++++++++++----- tests/bugs/stlvrml/bug31080 | 44 ++++++++++++++++++++ 6 files changed, 166 insertions(+), 12 deletions(-) create mode 100644 tests/bugs/stlvrml/bug31080 diff --git a/src/RWStl/RWStl.cxx b/src/RWStl/RWStl.cxx index 86eaeb601e..49807eb7a2 100644 --- a/src/RWStl/RWStl.cxx +++ b/src/RWStl/RWStl.cxx @@ -99,11 +99,42 @@ namespace return aPoly; } + protected: + void Clear() + { + myNodes.Clear(); + myTriangles.Clear(); + } + private: NCollection_Vector myNodes; NCollection_Vector myTriangles; }; + class MultiDomainReader : public Reader + { + public: + //! Add new solid + //! Add triangulation to triangulation list for multi-domain case + virtual void AddSolid() Standard_OVERRIDE + { + if (Handle(Poly_Triangulation) aCurrentTri = GetTriangulation()) + { + myTriangulationList.Append(aCurrentTri); + } + Clear(); + } + + //! Returns triangulation list for multi-domain case + NCollection_Sequence& ChangeTriangulationList() + { + return myTriangulationList; + } + + private: + NCollection_Sequence myTriangulationList; + }; + } //============================================================================= @@ -122,6 +153,22 @@ Handle(Poly_Triangulation) RWStl::ReadFile (const Standard_CString theFile, return aReader.GetTriangulation(); } +//============================================================================= +//function : ReadFile +//purpose : +//============================================================================= +void RWStl::ReadFile(const Standard_CString theFile, + const Standard_Real theMergeAngle, + NCollection_Sequence& theTriangList, + const Message_ProgressRange& theProgress) +{ + MultiDomainReader aReader; + aReader.SetMergeAngle (theMergeAngle); + aReader.Read (theFile, theProgress); + theTriangList.Clear(); + theTriangList.Append (aReader.ChangeTriangulationList()); +} + //============================================================================= //function : ReadFile //purpose : diff --git a/src/RWStl/RWStl.hxx b/src/RWStl/RWStl.hxx index d513ce1a69..f329bba495 100644 --- a/src/RWStl/RWStl.hxx +++ b/src/RWStl/RWStl.hxx @@ -20,6 +20,7 @@ #include #include #include +#include //! This class provides methods to read and write triangulation from / to the STL files. class RWStl @@ -61,7 +62,17 @@ public: Standard_EXPORT static Handle(Poly_Triangulation) ReadFile (const Standard_CString theFile, const Standard_Real theMergeAngle, const Message_ProgressRange& theProgress = Message_ProgressRange()); - + + //! Read specified STL file and fills triangulation list for multi-domain case. + //! @param[in] theFile file path to read + //! @param[in] theMergeAngle maximum angle in radians between triangles to merge equal nodes; M_PI/2 means ignore angle + //! @param[out] theTriangList triangulation list for multi-domain case + //! @param[in] theProgress progress indicator + Standard_EXPORT static void ReadFile(const Standard_CString theFile, + const Standard_Real theMergeAngle, + NCollection_Sequence& theTriangList, + const Message_ProgressRange& theProgress = Message_ProgressRange()); + //! Read triangulation from a binary STL file //! In case of error, returns Null handle. Standard_EXPORT static Handle(Poly_Triangulation) ReadBinary (const OSD_Path& thePath, diff --git a/src/RWStl/RWStl_Reader.cxx b/src/RWStl/RWStl_Reader.cxx index ad7ad321ed..10801140fc 100644 --- a/src/RWStl/RWStl_Reader.cxx +++ b/src/RWStl/RWStl_Reader.cxx @@ -180,6 +180,7 @@ Standard_Boolean RWStl_Reader::Read (const char* theFile, } } *aStream >> std::ws; // skip any white spaces + AddSolid(); } return ! aStream->fail(); } @@ -300,6 +301,11 @@ Standard_Boolean RWStl_Reader::ReadAscii (Standard_IStream& theStream, // skip header "solid ..." aLine = theBuffer.ReadLine (theStream, aLineLen); + // skip empty lines + while (aLine && !*aLine) + { + aLine = theBuffer.ReadLine (theStream, aLineLen); + } if (aLine == NULL) { Message::SendFail ("Error: premature end of file"); diff --git a/src/RWStl/RWStl_Reader.hxx b/src/RWStl/RWStl_Reader.hxx index 0a6955b748..d09098773a 100644 --- a/src/RWStl/RWStl_Reader.hxx +++ b/src/RWStl/RWStl_Reader.hxx @@ -39,7 +39,8 @@ public: Standard_EXPORT RWStl_Reader(); //! Reads data from STL file (either binary or Ascii). - //! This function supports reading multi-domain STL files formed by concatenation of several "plain" files. + //! This function supports reading multi-domain STL files formed by concatenation + //! of several "plain" files. //! The mesh nodes are not merged between domains. //! Unicode paths can be given in UTF-8 encoding. //! Format is recognized automatically by analysis of the file header. @@ -84,6 +85,9 @@ public: //! Should create new triangle built on specified nodes in the target model. virtual void AddTriangle (Standard_Integer theN1, Standard_Integer theN2, Standard_Integer theN3) = 0; + //! Callback function to be implemented in descendant. + //! Should create a new triangulation for a solid in multi-domain case. + virtual void AddSolid() {} public: //! Return merge tolerance; M_PI/2 by default - all nodes are merged regardless angle between triangles. diff --git a/src/XSDRAWSTLVRML/XSDRAWSTLVRML.cxx b/src/XSDRAWSTLVRML/XSDRAWSTLVRML.cxx index 7976a23ecb..f0c2c917e0 100644 --- a/src/XSDRAWSTLVRML/XSDRAWSTLVRML.cxx +++ b/src/XSDRAWSTLVRML/XSDRAWSTLVRML.cxx @@ -626,6 +626,7 @@ static Standard_Integer readstl(Draw_Interpretor& theDI, { TCollection_AsciiString aShapeName, aFilePath; bool toCreateCompOfTris = false; + bool anIsMulti = false; double aMergeAngle = M_PI / 2.0; for (Standard_Integer anArgIter = 1; anArgIter < theArgc; ++anArgIter) { @@ -648,6 +649,15 @@ static Standard_Integer readstl(Draw_Interpretor& theDI, ++anArgIter; } } + else if (anArg == "-multi") + { + anIsMulti = true; + if (anArgIter + 1 < theArgc + && Draw::ParseOnOff (theArgv[anArgIter + 1], anIsMulti)) + { + ++anArgIter; + } + } else if (anArg == "-mergeangle" || anArg == "-smoothangle" || anArg == "-nomergeangle" @@ -689,15 +699,46 @@ static Standard_Integer readstl(Draw_Interpretor& theDI, TopoDS_Shape aShape; if (!toCreateCompOfTris) { - // Read STL file to the triangulation. - Handle(Draw_ProgressIndicator) aProgress = new Draw_ProgressIndicator (theDI, 1); - Handle(Poly_Triangulation) aTriangulation = RWStl::ReadFile (aFilePath.ToCString(), aMergeAngle, aProgress->Start()); + Handle(Draw_ProgressIndicator) aProgress = new Draw_ProgressIndicator (theDI,1); + if(anIsMulti) + { + NCollection_Sequence aTriangList; + // Read STL file to the triangulation list. + RWStl::ReadFile(aFilePath.ToCString(),aMergeAngle,aTriangList,aProgress->Start()); + BRep_Builder aB; + TopoDS_Face aFace; + if (aTriangList.Size() == 1) + { + aB.MakeFace (aFace); + aB.UpdateFace (aFace,aTriangList.First()); + aShape = aFace; + } + else + { + TopoDS_Compound aCmp; + aB.MakeCompound (aCmp); + + NCollection_Sequence::Iterator anIt (aTriangList); + for (; anIt.More(); anIt.Next()) + { + aB.MakeFace (aFace); + aB.UpdateFace (aFace,anIt.Value()); + aB.Add (aCmp,aFace); + } + aShape = aCmp; + } + } + else + { + // Read STL file to the triangulation. + Handle(Poly_Triangulation) aTriangulation = RWStl::ReadFile (aFilePath.ToCString(),aMergeAngle,aProgress->Start()); - TopoDS_Face aFace; - BRep_Builder aB; - aB.MakeFace (aFace); - aB.UpdateFace (aFace, aTriangulation); - aShape = aFace; + TopoDS_Face aFace; + BRep_Builder aB; + aB.MakeFace (aFace); + aB.UpdateFace (aFace,aTriangulation); + aShape = aFace; + } } else { @@ -2435,11 +2476,12 @@ void XSDRAWSTLVRML::InitCommands (Draw_Interpretor& theCommands) theCommands.Add ("writevrml", "shape file [version VRML#1.0/VRML#2.0 (1/2): 2 by default] [representation shaded/wireframe/both (0/1/2): 1 by default]",__FILE__,writevrml,g); theCommands.Add ("writestl", "shape file [ascii/binary (0/1) : 1 by default] [InParallel (0/1) : 0 by default]",__FILE__,writestl,g); theCommands.Add ("readstl", - "readstl shape file [-brep] [-mergeAngle Angle]" + "readstl shape file [-brep] [-mergeAngle Angle] [-multi]" "\n\t\t: Reads STL file and creates a new shape with specified name." "\n\t\t: When -brep is specified, creates a Compound of per-triangle Faces." "\n\t\t: Single triangulation-only Face is created otherwise (default)." - "\n\t\t: -mergeAngle specifies maximum angle in degrees between triangles to merge equal nodes; disabled by default.", + "\n\t\t: -mergeAngle specifies maximum angle in degrees between triangles to merge equal nodes; disabled by default." + "\n\t\t: -multi creates a face per solid in multi-domain files; ignored when -brep is set.", __FILE__, readstl, g); theCommands.Add ("loadvrml" , "shape file",__FILE__,loadvrml,g); theCommands.Add ("ReadObj", diff --git a/tests/bugs/stlvrml/bug31080 b/tests/bugs/stlvrml/bug31080 new file mode 100644 index 0000000000..2108c9a0c7 --- /dev/null +++ b/tests/bugs/stlvrml/bug31080 @@ -0,0 +1,44 @@ +puts "========" +puts "0031080: Data Exchange, STL reader - improve API for reading multi-domain STL files" +puts "========" +puts "" + +pload ALL + +# create two boxes with mesh +box b1 5 5 5 +box b2 5 5 5 +ttranslate b2 10 10 10 +incmesh b1 0.1 +incmesh b2 0.1 + +# write each box to Ascii STL +writestl b1 $imagedir/${casename}_1.stl 0 +writestl b2 $imagedir/${casename}_2.stl 0 + +set aTmpStl "${imagedir}/${casename}_cat.stl" +file delete $aTmpStl +set file_res [open $aTmpStl a+] + +# cat each stl files content to file_res +set file_stl [open $imagedir/${casename}_1.stl r] +set buffer [read $file_stl]; +puts $file_res $buffer +close $file_stl + +set file_stl [open $imagedir/${casename}_2.stl r] +set buffer [read $file_stl]; +puts $file_res $buffer +close $file_stl +close $file_res + +# load multi-domain STL +readstl result ${imagedir}/${casename}_cat.stl -multi + +vinit +vdisplay result -dispmode 1 +vfit + +checknbshapes result -face 2 -compound 1 +checktrinfo result -tri 24 -nod 16 +checkview -screenshot -3d -path ${imagedir}/${test_image}.png From bbf49a300cb2815ace6e91c2d818851285245561 Mon Sep 17 00:00:00 2001 From: kgv Date: Fri, 15 Jul 2022 16:06:02 +0300 Subject: [PATCH 341/639] 0033066: Visualization - null pointer dereference in MeshVS_ElementalColorPrsBuilder::Build() function Added missing Boolean flag check. --- src/MeshVS/MeshVS_ElementalColorPrsBuilder.cxx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/MeshVS/MeshVS_ElementalColorPrsBuilder.cxx b/src/MeshVS/MeshVS_ElementalColorPrsBuilder.cxx index 919d64d6c0..27cad1e550 100644 --- a/src/MeshVS/MeshVS_ElementalColorPrsBuilder.cxx +++ b/src/MeshVS/MeshVS_ElementalColorPrsBuilder.cxx @@ -625,7 +625,10 @@ void MeshVS_ElementalColorPrsBuilder::Build ( const Handle(Prs3d_Presentation)& } aGroup2->AddPrimitiveArray (aFaceTriangles); - aSGroup->AddPrimitiveArray (anEdgeSegments); + if (anEdgeOn) + { + aSGroup->AddPrimitiveArray (anEdgeSegments); + } } } From 411ad1a819017ae731c10311db5c084c88d7a03e Mon Sep 17 00:00:00 2001 From: atychini Date: Mon, 11 Jul 2022 16:07:23 +0300 Subject: [PATCH 342/639] 0033055: Data Exchange, RWPly_Provider - remove dependency from BRepLib_PointCloudShape Removing PointCloud writing feature from the RWPly_Provider class. Getting rid of Pointcloud-related parameters in the RWPly_ConfigurationNode. --- src/RWPly/RWPly_ConfigurationNode.cxx | 32 ------ src/RWPly/RWPly_ConfigurationNode.hxx | 4 - src/RWPly/RWPly_Provider.cxx | 137 +++++--------------------- src/TKRWMesh/EXTERNLIB | 1 - tests/de_wrapper/configuration/A3 | 4 - 5 files changed, 24 insertions(+), 154 deletions(-) diff --git a/src/RWPly/RWPly_ConfigurationNode.cxx b/src/RWPly/RWPly_ConfigurationNode.cxx index 6e0c7719fc..ecd16f4bbb 100644 --- a/src/RWPly/RWPly_ConfigurationNode.cxx +++ b/src/RWPly/RWPly_ConfigurationNode.cxx @@ -56,14 +56,6 @@ bool RWPly_ConfigurationNode::Load(const Handle(DE_ConfigurationContext)& theRes InternalParameters.FileCS = (RWMesh_CoordinateSystem)(theResource->IntegerVal("file.cs", (int)InternalParameters.SystemCS, aScope) % 2); - InternalParameters.WritePntSet = - theResource->BooleanVal("write.pnt.set", InternalParameters.WritePntSet, aScope); - InternalParameters.WriteDistance = - theResource->RealVal("write.distance", InternalParameters.WriteDistance, aScope); - InternalParameters.WriteDensity = - theResource->RealVal("write.density", InternalParameters.WriteDensity, aScope); - InternalParameters.WriteTolerance = - theResource->RealVal("write.tolerance", InternalParameters.WriteTolerance, aScope); InternalParameters.WriteNormals = theResource->BooleanVal("write.normals", InternalParameters.WriteNormals, aScope); InternalParameters.WriteColors = @@ -118,30 +110,6 @@ TCollection_AsciiString RWPly_ConfigurationNode::Save() const aResult += "!Write parameters:\n"; aResult += "!\n"; - aResult += "!\n"; - aResult += "!Flag for write point cloud instead without triangulation indices\n"; - aResult += "!Default value: 0(false). Available values: 0(false), 1(true)\n"; - aResult += aScope + "write.pnt.set :\t " + InternalParameters.WritePntSet + "\n"; - aResult += "!\n"; - - aResult += "!\n"; - aResult += "!Distance from shape into the range [0, Value]\n"; - aResult += "!Default value: 0. Available values: [0, Value]\n"; - aResult += aScope + "write.distance :\t " + InternalParameters.WriteDistance + "\n"; - aResult += "!\n"; - - aResult += "!\n"; - aResult += "!Density of points to generate randomly on surface\n"; - aResult += "!Default value: 2.e+100. Available values: [0, inf]\n"; - aResult += aScope + "write.density :\t " + InternalParameters.WriteDensity + "\n"; - aResult += "!\n"; - - aResult += "!\n"; - aResult += "!Internal tolerance\n"; - aResult += "!Default value: 1.e-7. Available values: [0, inf]\n"; - aResult += aScope + "write.tolerance :\t " + InternalParameters.WriteTolerance + "\n"; - aResult += "!\n"; - aResult += "!\n"; aResult += "!Flag for write normals\n"; aResult += "!Default value: 1(true). Available values: 0(false), 1(true)\n"; diff --git a/src/RWPly/RWPly_ConfigurationNode.hxx b/src/RWPly/RWPly_ConfigurationNode.hxx index 0b4e122b71..93ac598d8e 100644 --- a/src/RWPly/RWPly_ConfigurationNode.hxx +++ b/src/RWPly/RWPly_ConfigurationNode.hxx @@ -94,10 +94,6 @@ public: RWMesh_CoordinateSystem SystemCS = RWMesh_CoordinateSystem_Zup; //!< System origin coordinate system to perform conversion into during read RWMesh_CoordinateSystem FileCS = RWMesh_CoordinateSystem_Yup; //!< File origin coordinate system to perform conversion during read // Writing - bool WritePntSet = false; //!< Flag for write point cloud instead without triangulation indices - double WriteDistance = 0.0; //!< Distance from shape into the range [0, Value] - double WriteDensity = Precision::Infinite(); //!< Density of points to generate randomly on surface - double WriteTolerance = Precision::Confusion(); //!< Internal tolerance bool WriteNormals = true; //!< Flag for write normals bool WriteColors = true; //!< Flag for write colors bool WriteTexCoords = false; //!< Flag for write UV / texture coordinates diff --git a/src/RWPly/RWPly_Provider.cxx b/src/RWPly/RWPly_Provider.cxx index c13f9571be..1f81de5bbc 100644 --- a/src/RWPly/RWPly_Provider.cxx +++ b/src/RWPly/RWPly_Provider.cxx @@ -14,7 +14,6 @@ #include #include -#include #include #include #include @@ -80,122 +79,34 @@ bool RWPly_Provider::Write(const TCollection_AsciiString& thePath, return Standard_True; } - if (aNode->InternalParameters.WritePntSet) + TColStd_IndexedDataMapOfStringString aFileInfo; + if (!aNode->InternalParameters.WriteAuthor.IsEmpty()) { - class PointCloudPlyWriter : public BRepLib_PointCloudShape, public RWPly_PlyWriterContext - { - public: - PointCloudPlyWriter(Standard_Real theTol) - : BRepLib_PointCloudShape(TopoDS_Shape(), theTol) - {} - - void AddFaceColor(const TopoDS_Shape& theFace, const Graphic3d_Vec4ub& theColor) - { - myFaceColor.Bind(theFace, theColor); - } - - protected: - virtual void addPoint(const gp_Pnt& thePoint, - const gp_Vec& theNorm, - const gp_Pnt2d& theUV, - const TopoDS_Shape& theFace) - { - Graphic3d_Vec4ub aColor; - myFaceColor.Find(theFace, aColor); - RWPly_PlyWriterContext::WriteVertex(thePoint, - Graphic3d_Vec3((float)theNorm.X(), (float)theNorm.Y(), (float)theNorm.Z()), - Graphic3d_Vec2((float)theUV.X(), (float)theUV.Y()), - aColor); - } - - private: - NCollection_DataMap myFaceColor; - }; - - PointCloudPlyWriter aPlyCtx(aNode->InternalParameters.WriteTolerance); - aPlyCtx.SetNormals(aNode->InternalParameters.WriteNormals); - aPlyCtx.SetColors(aNode->InternalParameters.WriteColors); - aPlyCtx.SetTexCoords(aNode->InternalParameters.WriteTexCoords); - - TopoDS_Compound aComp; - BRep_Builder().MakeCompound(aComp); - for (XCAFPrs_DocumentExplorer aDocExplorer(theDocument, aRootLabels, XCAFPrs_DocumentExplorerFlags_OnlyLeafNodes); - aDocExplorer.More(); aDocExplorer.Next()) - { - const XCAFPrs_DocumentNode& aDocNode = aDocExplorer.Current(); - for (RWMesh_FaceIterator aFaceIter(aDocNode.RefLabel, aDocNode.Location, true, aDocNode.Style); aFaceIter.More(); aFaceIter.Next()) - { - BRep_Builder().Add(aComp, aFaceIter.Face()); - Graphic3d_Vec4ub aColorVec(255); - if (aFaceIter.HasFaceColor()) - { - Graphic3d_Vec4 aColorF = aFaceIter.FaceColor(); - aColorVec.SetValues((unsigned char)int(aColorF.r() * 255.0f), - (unsigned char)int(aColorF.g() * 255.0f), - (unsigned char)int(aColorF.b() * 255.0f), - (unsigned char)int(aColorF.a() * 255.0f)); - } - aPlyCtx.AddFaceColor(aFaceIter.Face(), aColorVec); - } - } - aPlyCtx.SetShape(aComp); - Standard_Integer aNbPoints = aNode->InternalParameters.WriteDensity > 0 - ? aPlyCtx.NbPointsByDensity(aNode->InternalParameters.WriteDensity) - : aPlyCtx.NbPointsByTriangulation(); - if (aNbPoints <= 0) - { - Message::SendFail() << "Error in the RWPly_Provider during writing the file " << - thePath << "\t: Incorrect number of points"; - return false; - } - - if (!aPlyCtx.Open(thePath) - || !aPlyCtx.WriteHeader(aNbPoints, 0, TColStd_IndexedDataMapOfStringString())) - { - Message::SendFail() << "Error in the RWPly_Provider during writing the file " << thePath; - return false; - } - - Standard_Boolean isDone = aNode->InternalParameters.WriteDensity > 0 - ? aPlyCtx.GeneratePointsByDensity(aNode->InternalParameters.WriteDensity) - : aPlyCtx.GeneratePointsByTriangulation(); - if (!isDone) - { - Message::SendFail() << "Error in the RWPly_Provider during writing the file " - << thePath << "\t: Error during generating point process"; - return false; - } + aFileInfo.Add("Author", aNode->InternalParameters.WriteAuthor); } - else + if (!aNode->InternalParameters.WriteComment.IsEmpty()) { - TColStd_IndexedDataMapOfStringString aFileInfo; - if (!aNode->InternalParameters.WriteAuthor.IsEmpty()) - { - aFileInfo.Add("Author", aNode->InternalParameters.WriteAuthor); - } - if (!aNode->InternalParameters.WriteComment.IsEmpty()) - { - aFileInfo.Add("Comments", aNode->InternalParameters.WriteComment); - } - RWMesh_CoordinateSystemConverter aConverter; - aConverter.SetInputLengthUnit(aNode->GlobalParameters.LengthUnit / 1000); - aConverter.SetInputCoordinateSystem(aNode->InternalParameters.SystemCS); - aConverter.SetOutputLengthUnit(aNode->InternalParameters.FileLengthUnit); - aConverter.SetOutputCoordinateSystem(aNode->InternalParameters.FileCS); - - RWPly_CafWriter aPlyCtx(thePath); - aPlyCtx.SetNormals(aNode->InternalParameters.WriteNormals); - aPlyCtx.SetColors(aNode->InternalParameters.WriteColors); - aPlyCtx.SetTexCoords(aNode->InternalParameters.WriteTexCoords); - aPlyCtx.SetPartId(aNode->InternalParameters.WritePartId); - aPlyCtx.SetFaceId(aNode->InternalParameters.WriteFaceId); - if (!aPlyCtx.Perform(theDocument, aFileInfo, theProgress)) - { - Message::SendFail() << "Error in the RWPly_Provider during writing the file " - << thePath << "\t: Cannot perform the document"; - return false; - } + aFileInfo.Add("Comments", aNode->InternalParameters.WriteComment); + } + RWMesh_CoordinateSystemConverter aConverter; + aConverter.SetInputLengthUnit(aNode->GlobalParameters.LengthUnit / 1000); + aConverter.SetInputCoordinateSystem(aNode->InternalParameters.SystemCS); + aConverter.SetOutputLengthUnit(aNode->InternalParameters.FileLengthUnit); + aConverter.SetOutputCoordinateSystem(aNode->InternalParameters.FileCS); + + RWPly_CafWriter aPlyCtx(thePath); + aPlyCtx.SetNormals(aNode->InternalParameters.WriteNormals); + aPlyCtx.SetColors(aNode->InternalParameters.WriteColors); + aPlyCtx.SetTexCoords(aNode->InternalParameters.WriteTexCoords); + aPlyCtx.SetPartId(aNode->InternalParameters.WritePartId); + aPlyCtx.SetFaceId(aNode->InternalParameters.WriteFaceId); + if (!aPlyCtx.Perform(theDocument, aFileInfo, theProgress)) + { + Message::SendFail() << "Error in the RWPly_Provider during writing the file " + << thePath << "\t: Cannot perform the document"; + return false; } + return true; } diff --git a/src/TKRWMesh/EXTERNLIB b/src/TKRWMesh/EXTERNLIB index 23b9a92984..80c75df27f 100644 --- a/src/TKRWMesh/EXTERNLIB +++ b/src/TKRWMesh/EXTERNLIB @@ -6,7 +6,6 @@ TKLCAF TKV3d TKBRep TKG3d -TKTopAlgo TKXDE TKService CSF_RapidJSON diff --git a/tests/de_wrapper/configuration/A3 b/tests/de_wrapper/configuration/A3 index 6c80b290d6..2e0d1456fc 100644 --- a/tests/de_wrapper/configuration/A3 +++ b/tests/de_wrapper/configuration/A3 @@ -145,10 +145,6 @@ provider.IGES.OCC.write.layer : 1 provider.PLY.OCC.file.length.unit : 1 provider.PLY.OCC.system.cs : 0 provider.PLY.OCC.file.cs : 1 -provider.PLY.OCC.write.pnt.set : 0 -provider.PLY.OCC.write.distance : 0 -provider.PLY.OCC.write.density : 2e+100 -provider.PLY.OCC.write.tolerance : 1e-07 provider.PLY.OCC.write.normals : 1 provider.PLY.OCC.write.colors : 1 provider.PLY.OCC.write.tex.coords : 0 From b315a85dd706112461a23714c991d328b7e70d17 Mon Sep 17 00:00:00 2001 From: ifv Date: Mon, 11 Jul 2022 11:09:33 +0300 Subject: [PATCH 343/639] 0032940: Canonical Recognition: Some surfaces are not recognized as cylindrical surfaces New method for recognizing cylindrical surfaces based on analysis Gaussian field of initial surface is added in class GeomConvert_SurfToAnaSurf --- src/GeomConvert/FILES | 6 + .../GeomConvert_FuncConeLSDist.cxx} | 10 +- .../GeomConvert_FuncConeLSDist.hxx} | 12 +- .../GeomConvert_FuncCylinderLSDist.cxx} | 14 +- .../GeomConvert_FuncCylinderLSDist.hxx} | 12 +- .../GeomConvert_FuncSphereLSDist.cxx} | 14 +- .../GeomConvert_FuncSphereLSDist.hxx} | 12 +- src/GeomConvert/GeomConvert_SurfToAnaSurf.cxx | 619 ++++++++++++++---- src/GeomConvert/GeomConvert_SurfToAnaSurf.hxx | 46 +- src/ShapeAnalysis/FILES | 6 - .../ShapeAnalysis_CanonicalRecognition.cxx | 12 +- tests/cr/base/B10 | 18 + 12 files changed, 586 insertions(+), 195 deletions(-) rename src/{ShapeAnalysis/ShapeAnalysis_FuncConeLSDist.cxx => GeomConvert/GeomConvert_FuncConeLSDist.cxx} (86%) rename src/{ShapeAnalysis/ShapeAnalysis_FuncConeLSDist.hxx => GeomConvert/GeomConvert_FuncConeLSDist.hxx} (81%) rename src/{ShapeAnalysis/ShapeAnalysis_FuncCylinderLSDist.cxx => GeomConvert/GeomConvert_FuncCylinderLSDist.cxx} (87%) rename src/{ShapeAnalysis/ShapeAnalysis_FuncCylinderLSDist.hxx => GeomConvert/GeomConvert_FuncCylinderLSDist.hxx} (88%) rename src/{ShapeAnalysis/ShapeAnalysis_FuncSphereLSDist.cxx => GeomConvert/GeomConvert_FuncSphereLSDist.cxx} (83%) rename src/{ShapeAnalysis/ShapeAnalysis_FuncSphereLSDist.hxx => GeomConvert/GeomConvert_FuncSphereLSDist.hxx} (86%) create mode 100644 tests/cr/base/B10 diff --git a/src/GeomConvert/FILES b/src/GeomConvert/FILES index 06ae4fe8f8..3589aa1b11 100755 --- a/src/GeomConvert/FILES +++ b/src/GeomConvert/FILES @@ -25,3 +25,9 @@ GeomConvert_CurveToAnaCurve.hxx GeomConvert_SurfToAnaSurf.cxx GeomConvert_SurfToAnaSurf.hxx GeomConvert_ConvType.hxx +GeomConvert_FuncSphereLSDist.cxx +GeomConvert_FuncSphereLSDist.hxx +GeomConvert_FuncCylinderLSDist.cxx +GeomConvert_FuncCylinderLSDist.hxx +GeomConvert_FuncConeLSDist.cxx +GeomConvert_FuncConeLSDist.hxx diff --git a/src/ShapeAnalysis/ShapeAnalysis_FuncConeLSDist.cxx b/src/GeomConvert/GeomConvert_FuncConeLSDist.cxx similarity index 86% rename from src/ShapeAnalysis/ShapeAnalysis_FuncConeLSDist.cxx rename to src/GeomConvert/GeomConvert_FuncConeLSDist.cxx index 865d9e872a..6fc85d538b 100644 --- a/src/ShapeAnalysis/ShapeAnalysis_FuncConeLSDist.cxx +++ b/src/GeomConvert/GeomConvert_FuncConeLSDist.cxx @@ -13,7 +13,7 @@ // commercial license or contractual agreement. -#include +#include #include #include #include @@ -21,10 +21,10 @@ #include //======================================================================= -//function : ShapeAnalysis_FuncConeLSDist +//function : GeomConvert_FuncConeLSDist //purpose : //======================================================================= -ShapeAnalysis_FuncConeLSDist::ShapeAnalysis_FuncConeLSDist( +GeomConvert_FuncConeLSDist::GeomConvert_FuncConeLSDist( const Handle(TColgp_HArray1OfXYZ)& thePoints, const gp_Dir& theDir): myPoints(thePoints), myDir(theDir) @@ -35,7 +35,7 @@ ShapeAnalysis_FuncConeLSDist::ShapeAnalysis_FuncConeLSDist( //function : NbVariables //purpose : //======================================================================= -Standard_Integer ShapeAnalysis_FuncConeLSDist::NbVariables () const +Standard_Integer GeomConvert_FuncConeLSDist::NbVariables () const { return 5; } @@ -44,7 +44,7 @@ Standard_Integer ShapeAnalysis_FuncConeLSDist::NbVariables () const //function : Value //purpose : //======================================================================= -Standard_Boolean ShapeAnalysis_FuncConeLSDist::Value(const math_Vector& X, Standard_Real& F) +Standard_Boolean GeomConvert_FuncConeLSDist::Value(const math_Vector& X, Standard_Real& F) { gp_Pnt aLoc(X(1), X(2), X(3)); Standard_Real aSemiAngle = X(4), anR = X(5); diff --git a/src/ShapeAnalysis/ShapeAnalysis_FuncConeLSDist.hxx b/src/GeomConvert/GeomConvert_FuncConeLSDist.hxx similarity index 81% rename from src/ShapeAnalysis/ShapeAnalysis_FuncConeLSDist.hxx rename to src/GeomConvert/GeomConvert_FuncConeLSDist.hxx index 381b86cc3f..97c7fc4a24 100644 --- a/src/ShapeAnalysis/ShapeAnalysis_FuncConeLSDist.hxx +++ b/src/GeomConvert/GeomConvert_FuncConeLSDist.hxx @@ -12,8 +12,8 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -#ifndef _ShapeAnalysis_FuncConeLSDist_HeaderFile -#define _ShapeAnalysis_FuncConeLSDist_HeaderFile +#ifndef _GeomConvert_FuncConeLSDist_HeaderFile +#define _GeomConvert_FuncConeLSDist_HeaderFile #include #include @@ -28,16 +28,16 @@ //! by least square method. //! //! -class ShapeAnalysis_FuncConeLSDist : public math_MultipleVarFunction +class GeomConvert_FuncConeLSDist : public math_MultipleVarFunction { public: DEFINE_STANDARD_ALLOC //! Constructor. - Standard_EXPORT ShapeAnalysis_FuncConeLSDist() {}; + Standard_EXPORT GeomConvert_FuncConeLSDist() {}; - Standard_EXPORT ShapeAnalysis_FuncConeLSDist(const Handle(TColgp_HArray1OfXYZ)& thePoints, + Standard_EXPORT GeomConvert_FuncConeLSDist(const Handle(TColgp_HArray1OfXYZ)& thePoints, const gp_Dir& theDir); void SetPoints(const Handle(TColgp_HArray1OfXYZ)& thePoints) @@ -63,4 +63,4 @@ private: gp_Dir myDir; }; -#endif // _ShapeAnalysis_FuncConeLSDist_HeaderFile +#endif // _GeomConvert_FuncConeLSDist_HeaderFile diff --git a/src/ShapeAnalysis/ShapeAnalysis_FuncCylinderLSDist.cxx b/src/GeomConvert/GeomConvert_FuncCylinderLSDist.cxx similarity index 87% rename from src/ShapeAnalysis/ShapeAnalysis_FuncCylinderLSDist.cxx rename to src/GeomConvert/GeomConvert_FuncCylinderLSDist.cxx index 681bef12f2..af9e83a9a3 100644 --- a/src/ShapeAnalysis/ShapeAnalysis_FuncCylinderLSDist.cxx +++ b/src/GeomConvert/GeomConvert_FuncCylinderLSDist.cxx @@ -13,16 +13,16 @@ // commercial license or contractual agreement. -#include +#include #include #include #include //======================================================================= -//function : ShapeAnalysis_FuncCylinderLSDist +//function : GeomConvert_FuncCylinderLSDist //purpose : //======================================================================= -ShapeAnalysis_FuncCylinderLSDist::ShapeAnalysis_FuncCylinderLSDist( +GeomConvert_FuncCylinderLSDist::GeomConvert_FuncCylinderLSDist( const Handle(TColgp_HArray1OfXYZ)& thePoints, const gp_Dir& theDir): myPoints(thePoints), myDir(theDir) @@ -33,7 +33,7 @@ ShapeAnalysis_FuncCylinderLSDist::ShapeAnalysis_FuncCylinderLSDist( //function : NbVariables //purpose : //======================================================================= -Standard_Integer ShapeAnalysis_FuncCylinderLSDist::NbVariables () const +Standard_Integer GeomConvert_FuncCylinderLSDist::NbVariables () const { return 4; } @@ -42,7 +42,7 @@ Standard_Integer ShapeAnalysis_FuncCylinderLSDist::NbVariables () const //function : Value //purpose : //======================================================================= -Standard_Boolean ShapeAnalysis_FuncCylinderLSDist::Value(const math_Vector& X,Standard_Real& F) +Standard_Boolean GeomConvert_FuncCylinderLSDist::Value(const math_Vector& X,Standard_Real& F) { gp_XYZ aLoc(X(1), X(2), X(3)); Standard_Real anR2 = X(4)*X(4); @@ -64,7 +64,7 @@ Standard_Boolean ShapeAnalysis_FuncCylinderLSDist::Value(const math_Vector& X,St //function : Gradient //purpose : //======================================================================= -Standard_Boolean ShapeAnalysis_FuncCylinderLSDist::Gradient(const math_Vector& X,math_Vector& G) +Standard_Boolean GeomConvert_FuncCylinderLSDist::Gradient(const math_Vector& X,math_Vector& G) { gp_XYZ aLoc(X(1), X(2), X(3)); @@ -102,7 +102,7 @@ Standard_Boolean ShapeAnalysis_FuncCylinderLSDist::Gradient(const math_Vector& X //function : Values //purpose : //======================================================================= -Standard_Boolean ShapeAnalysis_FuncCylinderLSDist::Values(const math_Vector& X,Standard_Real& F,math_Vector& G) +Standard_Boolean GeomConvert_FuncCylinderLSDist::Values(const math_Vector& X,Standard_Real& F,math_Vector& G) { gp_XYZ aLoc(X(1), X(2), X(3)); Standard_Real anR = X(4), anR2 = anR * anR; diff --git a/src/ShapeAnalysis/ShapeAnalysis_FuncCylinderLSDist.hxx b/src/GeomConvert/GeomConvert_FuncCylinderLSDist.hxx similarity index 88% rename from src/ShapeAnalysis/ShapeAnalysis_FuncCylinderLSDist.hxx rename to src/GeomConvert/GeomConvert_FuncCylinderLSDist.hxx index 3375e522e7..7c308181e0 100644 --- a/src/ShapeAnalysis/ShapeAnalysis_FuncCylinderLSDist.hxx +++ b/src/GeomConvert/GeomConvert_FuncCylinderLSDist.hxx @@ -12,8 +12,8 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -#ifndef _ShapeAnalysis_FuncCylinderLSDist_HeaderFile -#define _ShapeAnalysis_FuncCylinderLSDist_HeaderFile +#ifndef _GeomConvert_FuncCylinderLSDist_HeaderFile +#define _GeomConvert_FuncCylinderLSDist_HeaderFile #include #include @@ -57,16 +57,16 @@ //! dF/dz0 : G3(...) = 2*Sum{[...]*Dz0} //! dF/dR : G4(...) = -4*R*Sum[...] //! [...] = [|(P(i) - Loc)^dir|^2 - R^2] -class ShapeAnalysis_FuncCylinderLSDist : public math_MultipleVarFunctionWithGradient +class GeomConvert_FuncCylinderLSDist : public math_MultipleVarFunctionWithGradient { public: DEFINE_STANDARD_ALLOC //! Constructor. - Standard_EXPORT ShapeAnalysis_FuncCylinderLSDist() {}; + Standard_EXPORT GeomConvert_FuncCylinderLSDist() {}; - Standard_EXPORT ShapeAnalysis_FuncCylinderLSDist(const Handle(TColgp_HArray1OfXYZ)& thePoints, + Standard_EXPORT GeomConvert_FuncCylinderLSDist(const Handle(TColgp_HArray1OfXYZ)& thePoints, const gp_Dir& theDir); void SetPoints(const Handle(TColgp_HArray1OfXYZ)& thePoints) @@ -97,4 +97,4 @@ private: gp_Dir myDir; }; -#endif // _ShapeAnalysis_FuncCylinderLSDist_HeaderFile +#endif // _GeomConvert_FuncCylinderLSDist_HeaderFile diff --git a/src/ShapeAnalysis/ShapeAnalysis_FuncSphereLSDist.cxx b/src/GeomConvert/GeomConvert_FuncSphereLSDist.cxx similarity index 83% rename from src/ShapeAnalysis/ShapeAnalysis_FuncSphereLSDist.cxx rename to src/GeomConvert/GeomConvert_FuncSphereLSDist.cxx index 7bf64af460..c2a5fe9594 100644 --- a/src/ShapeAnalysis/ShapeAnalysis_FuncSphereLSDist.cxx +++ b/src/GeomConvert/GeomConvert_FuncSphereLSDist.cxx @@ -15,16 +15,16 @@ // commercial license or contractual agreement. -#include +#include #include #include #include //======================================================================= -//function : ShapeAnalysis_FuncSphereLSDist +//function : GeomConvert_FuncSphereLSDist //purpose : //======================================================================= -ShapeAnalysis_FuncSphereLSDist::ShapeAnalysis_FuncSphereLSDist(const Handle(TColgp_HArray1OfXYZ)& thePoints): +GeomConvert_FuncSphereLSDist::GeomConvert_FuncSphereLSDist(const Handle(TColgp_HArray1OfXYZ)& thePoints): myPoints(thePoints) { } @@ -33,7 +33,7 @@ ShapeAnalysis_FuncSphereLSDist::ShapeAnalysis_FuncSphereLSDist(const Handle(TCol //function : NbVariables //purpose : //======================================================================= -Standard_Integer ShapeAnalysis_FuncSphereLSDist::NbVariables () const +Standard_Integer GeomConvert_FuncSphereLSDist::NbVariables () const { return 4; } @@ -42,7 +42,7 @@ Standard_Integer ShapeAnalysis_FuncSphereLSDist::NbVariables () const //function : Value //purpose : //======================================================================= -Standard_Boolean ShapeAnalysis_FuncSphereLSDist::Value(const math_Vector& X,Standard_Real& F) +Standard_Boolean GeomConvert_FuncSphereLSDist::Value(const math_Vector& X,Standard_Real& F) { gp_XYZ aLoc(X(1), X(2), X(3)); Standard_Real anR2 = X(4)*X(4); @@ -62,7 +62,7 @@ Standard_Boolean ShapeAnalysis_FuncSphereLSDist::Value(const math_Vector& X,Stan //function : Gradient //purpose : //======================================================================= -Standard_Boolean ShapeAnalysis_FuncSphereLSDist::Gradient(const math_Vector& X,math_Vector& G) +Standard_Boolean GeomConvert_FuncSphereLSDist::Gradient(const math_Vector& X,math_Vector& G) { gp_XYZ aLoc(X(1), X(2), X(3)); @@ -89,7 +89,7 @@ Standard_Boolean ShapeAnalysis_FuncSphereLSDist::Gradient(const math_Vector& X,m //function : Values //purpose : //======================================================================= -Standard_Boolean ShapeAnalysis_FuncSphereLSDist::Values(const math_Vector& X,Standard_Real& F,math_Vector& G) +Standard_Boolean GeomConvert_FuncSphereLSDist::Values(const math_Vector& X,Standard_Real& F,math_Vector& G) { gp_XYZ aLoc(X(1), X(2), X(3)); Standard_Real anR = X(4), anR2 = anR * anR; diff --git a/src/ShapeAnalysis/ShapeAnalysis_FuncSphereLSDist.hxx b/src/GeomConvert/GeomConvert_FuncSphereLSDist.hxx similarity index 86% rename from src/ShapeAnalysis/ShapeAnalysis_FuncSphereLSDist.hxx rename to src/GeomConvert/GeomConvert_FuncSphereLSDist.hxx index fae0ffa8c6..f6743e0f9c 100644 --- a/src/ShapeAnalysis/ShapeAnalysis_FuncSphereLSDist.hxx +++ b/src/GeomConvert/GeomConvert_FuncSphereLSDist.hxx @@ -13,8 +13,8 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -#ifndef _ShapeAnalysis_FuncSphereLSDist_HeaderFile -#define _ShapeAnalysis_FuncSphereLSDist_HeaderFile +#ifndef _GeomConvert_FuncSphereLSDist_HeaderFile +#define _GeomConvert_FuncSphereLSDist_HeaderFile #include #include @@ -41,16 +41,16 @@ //! dF/dR : G4(x0, y0, z0, R) = -4*R*Sum[...] //! [...] = [(x(i) - x0)^2 + (y(i) - y0)^2 + (z(i) - z0)^2 - R^2] //! -class ShapeAnalysis_FuncSphereLSDist : public math_MultipleVarFunctionWithGradient +class GeomConvert_FuncSphereLSDist : public math_MultipleVarFunctionWithGradient { public: DEFINE_STANDARD_ALLOC //! Constructor. - Standard_EXPORT ShapeAnalysis_FuncSphereLSDist() {}; + Standard_EXPORT GeomConvert_FuncSphereLSDist() {}; - Standard_EXPORT ShapeAnalysis_FuncSphereLSDist(const Handle(TColgp_HArray1OfXYZ)& thePoints); + Standard_EXPORT GeomConvert_FuncSphereLSDist(const Handle(TColgp_HArray1OfXYZ)& thePoints); void SetPoints(const Handle(TColgp_HArray1OfXYZ)& thePoints) { @@ -74,4 +74,4 @@ private: Handle(TColgp_HArray1OfXYZ) myPoints; }; -#endif // _ShapeAnalysis_FuncSphereLSDist_HeaderFile +#endif // _GeomConvert_FuncSphereLSDist_HeaderFile diff --git a/src/GeomConvert/GeomConvert_SurfToAnaSurf.cxx b/src/GeomConvert/GeomConvert_SurfToAnaSurf.cxx index 37ed349ebb..7e946956c3 100644 --- a/src/GeomConvert/GeomConvert_SurfToAnaSurf.cxx +++ b/src/GeomConvert/GeomConvert_SurfToAnaSurf.cxx @@ -47,10 +47,20 @@ #include #include #include +#include +#include +#include +#include +#include +#include +//======================================================================= +//function : CheckVTrimForRevSurf +//purpose : //static method for checking surface of revolution //To avoid two-parts cone-like surface -static void CheckVTrimForRevSurf(const Handle(Geom_SurfaceOfRevolution)& aRevSurf, +//======================================================================= +void GeomConvert_SurfToAnaSurf::CheckVTrimForRevSurf(const Handle(Geom_SurfaceOfRevolution)& aRevSurf, Standard_Real& V1, Standard_Real& V2) { const Handle(Geom_Curve)& aBC = aRevSurf->BasisCurve(); @@ -96,10 +106,369 @@ static void CheckVTrimForRevSurf(const Handle(Geom_SurfaceOfRevolution)& aRevSur } } +//======================================================================= +//function : TryCylinderCone +//purpose : +//static method to try create cylindrical or conical surface +//======================================================================= +Handle(Geom_Surface) GeomConvert_SurfToAnaSurf::TryCylinerCone(const Handle(Geom_Surface)& theSurf, const Standard_Boolean theVCase, + const Handle(Geom_Curve)& theUmidiso, const Handle(Geom_Curve)& theVmidiso, + const Standard_Real theU1, const Standard_Real theU2, const Standard_Real theV1, const Standard_Real theV2, + const Standard_Real theToler) +{ + Handle(Geom_Surface) aNewSurf; + Standard_Real param1, param2, cf1, cf2, cl1, cl2, aGap1, aGap2; + Handle(Geom_Curve) firstiso, lastiso; + Handle(Geom_Circle) firstisocirc, lastisocirc, midisocirc; + gp_Dir isoline; + if (theVCase) { + param1 = theU1; param2 = theU2; + firstiso = theSurf->VIso(theV1); + lastiso = theSurf->VIso(theV2); + midisocirc = Handle(Geom_Circle)::DownCast(theVmidiso); + isoline = Handle(Geom_Line)::DownCast(theUmidiso)->Lin().Direction(); + } + else { + param1 = theV1; param2 = theV2; + firstiso = theSurf->UIso(theU1); + lastiso = theSurf->UIso(theU2); + midisocirc = Handle(Geom_Circle)::DownCast(theUmidiso); + isoline = Handle(Geom_Line)::DownCast(theVmidiso)->Lin().Direction(); + } + firstisocirc = Handle(Geom_Circle)::DownCast(GeomConvert_CurveToAnaCurve::ComputeCurve(firstiso, theToler, + param1, param2, cf1, cl1, aGap1)); + lastisocirc = Handle(Geom_Circle)::DownCast(GeomConvert_CurveToAnaCurve::ComputeCurve(lastiso, theToler, + param1, param2, cf2, cl2, aGap2)); + if (!firstisocirc.IsNull() || !lastisocirc.IsNull()) { + Standard_Real R1, R2, R3; + gp_Pnt P1, P2, P3; + if (!firstisocirc.IsNull()) { + R1 = firstisocirc->Circ().Radius(); + P1 = firstisocirc->Circ().Location(); + } + else { + R1 = 0; + P1 = firstiso->Value((firstiso->LastParameter() - firstiso->FirstParameter()) / 2); + } + R2 = midisocirc->Circ().Radius(); + P2 = midisocirc->Circ().Location(); + if (!lastisocirc.IsNull()) { + R3 = lastisocirc->Circ().Radius(); + P3 = lastisocirc->Circ().Location(); + } + else { + R3 = 0; + P3 = lastiso->Value((lastiso->LastParameter() - lastiso->FirstParameter()) / 2); + } + //cylinder + if (((Abs(R2 - R1)) < theToler) && ((Abs(R3 - R1)) < theToler) && + ((Abs(R3 - R2)) < theToler)) { + gp_Ax3 Axes(P1, gp_Dir(gp_Vec(P1, P3))); + aNewSurf = new Geom_CylindricalSurface(Axes, R1); + } + //cone + else if ((((Abs(R1)) > (Abs(R2))) && ((Abs(R2)) > (Abs(R3)))) || + (((Abs(R3)) > (Abs(R2))) && ((Abs(R2)) > (Abs(R1))))) { + Standard_Real radius; + gp_Ax3 Axes; + Standard_Real semiangle = + gp_Vec(isoline).Angle(gp_Vec(P3, P1)); + if (semiangle > M_PI / 2) semiangle = M_PI - semiangle; + if (R1 > R3) { + radius = R3; + Axes = gp_Ax3(P3, gp_Dir(gp_Vec(P3, P1))); + } + else { + radius = R1; + Axes = gp_Ax3(P1, gp_Dir(gp_Vec(P1, P3))); + } + aNewSurf = new Geom_ConicalSurface(Axes, semiangle, radius); + } + } + return aNewSurf; +} + +//======================================================================= +//function : GetCylByLS +//purpose : +//static method to create cylinrical surface using least square method +//======================================================================= +static void GetLSGap(const Handle(TColgp_HArray1OfXYZ)& thePoints, const gp_Ax3& thePos, + const Standard_Real theR, Standard_Real& theGap) +{ + theGap = 0.; + Standard_Integer i; + gp_XYZ aLoc = thePos.Location().XYZ(); + gp_Dir aDir = thePos.Direction(); + for (i = thePoints->Lower(); i <= thePoints->Upper(); ++i) + { + gp_Vec aD(thePoints->Value(i) - aLoc); + aD.Cross(aDir); + theGap = Max(theGap, Abs((aD.Magnitude() - theR))); + } + +} +Standard_Boolean GeomConvert_SurfToAnaSurf::GetCylByLS(const Handle(TColgp_HArray1OfXYZ)& thePoints, + const Standard_Real theTol, + gp_Ax3& thePos, Standard_Real& theR, + Standard_Real& theGap) +{ + + GetLSGap(thePoints, thePos, theR, theGap); + if (theGap <= Precision::Confusion()) + { + return Standard_True; + } + + Standard_Integer i; + + Standard_Integer aNbVar = 4; + + math_Vector aFBnd(1, aNbVar), aLBnd(1, aNbVar), aStartPoint(1, aNbVar); + + Standard_Real aRelDev = 0.2; //Customer can set parameters of sample surface + // with relative precision about aRelDev. + // For example, if radius of sample surface is R, + // it means, that "exact" vaue is in interav + //[R - aRelDev*R, R + aRelDev*R]. This intrrval is set + // for R as boundary values for dptimization algo. + + aStartPoint(1) = thePos.Location().X(); + aStartPoint(2) = thePos.Location().Y(); + aStartPoint(3) = thePos.Location().Z(); + aStartPoint(4) = theR; + Standard_Real aDR = aRelDev * theR; + Standard_Real aDXYZ = aDR; + for (i = 1; i <= 3; ++i) + { + aFBnd(i) = aStartPoint(i) - aDXYZ; + aLBnd(i) = aStartPoint(i) + aDXYZ; + } + aFBnd(4) = aStartPoint(4) - aDR; + aLBnd(4) = aStartPoint(4) + aDR; + + // + Standard_Real aTol = Precision::Confusion(); + math_MultipleVarFunction* aPFunc; + GeomConvert_FuncCylinderLSDist aFuncCyl(thePoints, thePos.Direction()); + aPFunc = (math_MultipleVarFunction*)&aFuncCyl; + // + math_Vector aSteps(1, aNbVar); + Standard_Integer aNbInt = 10; + for (i = 1; i <= aNbVar; ++i) + { + aSteps(i) = (aLBnd(i) - aFBnd(i)) / aNbInt; + } + math_PSO aGlobSolver(aPFunc, aFBnd, aLBnd, aSteps); + Standard_Real aLSDist; + aGlobSolver.Perform(aSteps, aLSDist, aStartPoint); + // + gp_Pnt aLoc(aStartPoint(1), aStartPoint(2), aStartPoint(3)); + thePos.SetLocation(aLoc); + theR = aStartPoint(4); + + GetLSGap(thePoints, thePos, theR, theGap); + if (theGap <= aTol) + { + return Standard_True; + } + // + math_Matrix aDirMatrix(1, aNbVar, 1, aNbVar, 0.0); + for (i = 1; i <= aNbVar; i++) + aDirMatrix(i, i) = 1.0; + + //Set search direction for location to be perpendicular to axis to avoid + //seaching along axis + const gp_Dir aDir = thePos.Direction(); + gp_Pln aPln(thePos.Location(), aDir); + gp_Dir aUDir = aPln.Position().XDirection(); + gp_Dir aVDir = aPln.Position().YDirection(); + for (i = 1; i <= 3; ++i) + { + aDirMatrix(i, 1) = aUDir.Coord(i); + aDirMatrix(i, 2) = aVDir.Coord(i); + gp_Dir aUVDir(aUDir.XYZ() + aVDir.XYZ()); + aDirMatrix(i, 3) = aUVDir.Coord(i); + } + + math_Powell aSolver(*aPFunc, aTol); + aSolver.Perform(*aPFunc, aStartPoint, aDirMatrix); + + if (aSolver.IsDone()) + { + gp_Ax3 aPos2 = thePos; + aSolver.Location(aStartPoint); + aLoc.SetCoord(aStartPoint(1), aStartPoint(2), aStartPoint(3)); + aPos2.SetLocation(aLoc); + Standard_Real anR2 = aStartPoint(4), aGap2 = 0.; + // + GetLSGap(thePoints, aPos2, anR2, aGap2); + // + if (aGap2 < theGap) + { + theGap = aGap2; + thePos = aPos2; + theR = anR2; + } + } + if (theGap <= theTol) + { + return Standard_True; + } + return Standard_False; +} + +//======================================================================= +//function : TryCylinderByGaussField +//purpose : +//static method to try create cylinrical surface based on its Gauss field +//======================================================================= +Handle(Geom_Surface) GeomConvert_SurfToAnaSurf::TryCylinderByGaussField(const Handle(Geom_Surface)& theSurf, + const Standard_Real theU1, const Standard_Real theU2, const Standard_Real theV1, const Standard_Real theV2, + const Standard_Real theToler, const Standard_Integer theNbU, const Standard_Integer theNbV, + const Standard_Boolean theLeastSquare) +{ + Handle(Geom_Surface) aNewSurf; + Standard_Real du = (theU2 - theU1) / theNbU, dv = (theV2 - theV1) / theNbV; + Standard_Real aSigmaR = 0.; + Standard_Real aTol = 100. * theToler; + TColStd_Array1OfReal anRs(1, theNbU*theNbV); + Handle(TColgp_HArray1OfXYZ) aPoints; + if (theLeastSquare) + { + aPoints = new TColgp_HArray1OfXYZ(1, theNbU*theNbU); + } + // + GeomLProp_SLProps aProps(theSurf, 2, Precision::Confusion()); + Standard_Real anAvMaxCurv = 0., anAvMinCurv = 0., anAvR = 0, aSign = 1.; + gp_XYZ anAvDir; + gp_Dir aMinD, aMaxD; + Standard_Integer i, j, n = 0; + Standard_Real anU, aV; + for (i = 1, anU = theU1 + du / 2.; i <= theNbU; ++i, anU += du) + { + for (j = 1, aV = theV1 + dv / 2.; j <= theNbV; ++j, aV += dv) + { + aProps.SetParameters(anU, aV); + if (!aProps.IsCurvatureDefined()) + { + return aNewSurf; + } + if (aProps.IsUmbilic()) + { + return aNewSurf; + } + ++n; + Standard_Real aMinCurv = aProps.MinCurvature(); + Standard_Real aMaxCurv = aProps.MaxCurvature(); + Standard_Real aGaussCurv = Abs(aProps.GaussianCurvature()); + Standard_Real aK1 = Sqrt(aGaussCurv); + if (aK1 > theToler ) + { + return aNewSurf; + } + gp_XYZ aD; + aProps.CurvatureDirections(aMaxD, aMinD); + aMinCurv = Abs(aMinCurv); + aMaxCurv = Abs(aMaxCurv); + if (aMinCurv > aMaxCurv) + { + //aMinCurv < 0; + aSign = -1.; + std::swap(aMinCurv, aMaxCurv); + gp_Dir aDummy = aMaxD; + aMaxD = aMinD; + aMinD = aDummy; + } + Standard_Real anR = 1. / aMaxCurv; + Standard_Real anR2 = anR * anR; + anRs(n) = anR; + // + if (n > 1) + { + if (Abs(aMaxCurv - anAvMaxCurv / (n - 1)) > aTol / anR2) + { + return aNewSurf; + } + if (Abs(aMinCurv - anAvMinCurv / (n - 1)) > aTol) + { + return aNewSurf; + } + } + aD = aMinD.XYZ(); + anAvR += anR; + anAvDir += aD; + anAvMaxCurv += aMaxCurv; + anAvMinCurv += aMinCurv; + if (theLeastSquare) + { + aPoints->SetValue(n, aProps.Value().XYZ()); + } + } + } + anAvMaxCurv /= n; + anAvMinCurv /= n; + anAvR /= n; + anAvDir /= n; + // + if (Abs(anAvMinCurv) > theToler) + { + return aNewSurf; + } + // + for (i = 1; i <= n; ++i) + { + Standard_Real d = (anRs(i) - anAvR); + aSigmaR += d * d; + } + aSigmaR = Sqrt(aSigmaR / n); + aTol = 3.*aSigmaR / Sqrt(n); + if (aTol > 100. * theToler) + { + return aNewSurf; + } + aProps.SetParameters(theU1, theV1); + if (!aProps.IsCurvatureDefined()) + { + return aNewSurf; + } + gp_Dir aNorm = aProps.Normal(); + gp_Pnt aLoc = aProps.Value(); + gp_Dir anAxD(anAvDir); + gp_Vec aT(aSign*anAvR*aNorm.XYZ()); + aLoc.Translate(aT); + gp_Ax1 anAx1(aLoc, anAxD); + gp_Cylinder aCyl; + aCyl.SetAxis(anAx1); + aCyl.SetRadius(anAvR); + + if (theLeastSquare) + { + gp_Ax3 aPos = aCyl.Position(); + Standard_Real anR = aCyl.Radius(); + Standard_Real aGap = 0.; + Standard_Boolean IsDone = GetCylByLS(aPoints, theToler, aPos, anR, aGap); + if (IsDone) + { + aCyl.SetPosition(aPos); + aCyl.SetRadius(anR); + } + } + + aNewSurf = new Geom_CylindricalSurface(aCyl); + + return aNewSurf; +} + +//======================================================================= +//function : TryTorusSphere +//purpose : // static method to try create toroidal surface. // In case = Standard_True try to use V isoline radius as minor radaius. -static Handle(Geom_Surface) TryTorusSphere(const Handle(Geom_Surface)& theSurf, +//======================================================================= + +Handle(Geom_Surface) GeomConvert_SurfToAnaSurf::TryTorusSphere(const Handle(Geom_Surface)& theSurf, const Handle(Geom_Circle)& circle, const Handle(Geom_Circle)& otherCircle, const Standard_Real Param1, @@ -181,9 +550,14 @@ static Handle(Geom_Surface) TryTorusSphere(const Handle(Geom_Surface)& theSurf, return newSurface; } -static Standard_Real ComputeGap(const Handle(Geom_Surface)& theSurf, +//======================================================================= +//function : ComputeGap +//purpose : +//======================================================================= + +Standard_Real GeomConvert_SurfToAnaSurf::ComputeGap(const Handle(Geom_Surface)& theSurf, const Standard_Real theU1, const Standard_Real theU2, const Standard_Real theV1, const Standard_Real theV2, - const Handle(Geom_Surface) theNewSurf, const Standard_Real theTol = RealLast()) + const Handle(Geom_Surface) theNewSurf, const Standard_Real theTol) { GeomAdaptor_Surface aGAS(theNewSurf); GeomAbs_SurfaceType aSType = aGAS.GetType(); @@ -228,7 +602,7 @@ static Standard_Real ComputeGap(const Handle(Geom_Surface)& theSurf, Standard_Real DU2 = DU / 2., DV2 = DV / 2.; for (j = 1; (j < NP) && onSurface; j++) { Standard_Real V = theV1 + DV*(j - 1) + DV2; - for (i = 1; i <= NP; i++) { + for (i = 1; i < NP; i++) { Standard_Real U = theU1 + DU*(i - 1) + DU2; theSurf->D0(U, V, P3d); @@ -384,7 +758,9 @@ Handle(Geom_Surface) GeomConvert_SurfToAnaSurf::ConvertToAnalytical(const Standa // Standard_Real toler = InitialToler; Handle(Geom_Surface) newSurf[5]; - Standard_Real dd[5] = { -1., -1., -1., -1., -1 }; + Standard_Real dd[5] = { RealLast(), RealLast(), RealLast(), RealLast(), RealLast() }; + GeomAbs_SurfaceType aSTypes[5] = { GeomAbs_Plane, GeomAbs_Cylinder, + GeomAbs_Cone, GeomAbs_Sphere, GeomAbs_Torus }; //Check boundaries Standard_Real U1, U2, V1, V2; @@ -481,183 +857,136 @@ Handle(Geom_Surface) GeomConvert_SurfToAnaSurf::ConvertToAnalytical(const Standa //convert middle uiso and viso to canonical representation Standard_Real VMid = 0.5*(V1 + V2); Standard_Real UMid = 0.5*(U1 + U2); - Handle(Geom_Surface) TrSurf = aTempS; - if(!aDoSegment) - TrSurf = new Geom_RectangularTrimmedSurface(aTempS, U1, U2, V1, V2); + // Handle(Geom_Surface) TrSurf = aTempS; - Handle(Geom_Curve) UIso = TrSurf->UIso(UMid); - Handle(Geom_Curve) VIso = TrSurf->VIso(VMid); + Handle(Geom_Curve) UIso = aTempS->UIso(UMid); + Handle(Geom_Curve) VIso = aTempS->VIso(VMid); Standard_Real cuf, cul, cvf, cvl, aGap1, aGap2; Handle(Geom_Curve) umidiso = GeomConvert_CurveToAnaCurve::ComputeCurve(UIso, toler, V1, V2, cuf, cul, aGap1); Handle(Geom_Curve) vmidiso = GeomConvert_CurveToAnaCurve::ComputeCurve(VIso, toler, U1, U2, cvf, cvl, aGap2); - if (umidiso.IsNull() || vmidiso.IsNull()) { - return newSurf[isurf]; - } + if (!umidiso.IsNull() && !vmidiso.IsNull()) + { - // - Standard_Boolean VCase = Standard_False; + // + Standard_Boolean VCase = Standard_False; - if (umidiso->IsKind(STANDARD_TYPE(Geom_Circle)) && vmidiso->IsKind(STANDARD_TYPE(Geom_Circle))) - { - aToroidSphere = Standard_True; - if (myConvType == GeomConvert_Target && (myTarget == GeomAbs_Cylinder || myTarget == GeomAbs_Cone)) + if (umidiso->IsKind(STANDARD_TYPE(Geom_Circle)) && vmidiso->IsKind(STANDARD_TYPE(Geom_Circle))) { - isurf = 1; - myGap = dd[isurf]; - return newSurf[isurf]; + aToroidSphere = Standard_True; + if (myConvType == GeomConvert_Target && (myTarget == GeomAbs_Cylinder || myTarget == GeomAbs_Cone)) + { + isurf = 1; + myGap = dd[isurf]; + return newSurf[isurf]; + } + isurf = 3; // set sphere } - isurf = 3; // set sphere - } - else if (umidiso->IsKind(STANDARD_TYPE(Geom_Line)) && vmidiso->IsKind(STANDARD_TYPE(Geom_Circle))) { - aCylinderConus = Standard_True; VCase = Standard_True; - if (myConvType == GeomConvert_Target && (myTarget == GeomAbs_Sphere || myTarget == GeomAbs_Torus)) - { - isurf = 3; - myGap = dd[isurf]; - return newSurf[isurf]; + else if (umidiso->IsKind(STANDARD_TYPE(Geom_Line)) && vmidiso->IsKind(STANDARD_TYPE(Geom_Circle))) { + aCylinderConus = Standard_True; VCase = Standard_True; + if (myConvType == GeomConvert_Target && (myTarget == GeomAbs_Sphere || myTarget == GeomAbs_Torus)) + { + isurf = 3; + myGap = dd[isurf]; + return newSurf[isurf]; + } + isurf = 1;// set cylinder } - isurf = 1;// set cylinder - } - else if (umidiso->IsKind(STANDARD_TYPE(Geom_Circle)) && vmidiso->IsKind(STANDARD_TYPE(Geom_Line))) - { - aCylinderConus = Standard_True; - if (myConvType == GeomConvert_Target && (myTarget == GeomAbs_Sphere || myTarget == GeomAbs_Torus)) + else if (umidiso->IsKind(STANDARD_TYPE(Geom_Circle)) && vmidiso->IsKind(STANDARD_TYPE(Geom_Line))) { - isurf = 3; - myGap = dd[isurf]; - return newSurf[isurf]; + aCylinderConus = Standard_True; + if (myConvType == GeomConvert_Target && (myTarget == GeomAbs_Sphere || myTarget == GeomAbs_Torus)) + { + isurf = 3; + myGap = dd[isurf]; + return newSurf[isurf]; + } + isurf = 1;// set cylinder } - isurf = 1;// set cylinder - } - Standard_Real cl = 0.0; - //case of torus-sphere - if (aToroidSphere) { - isurf = 3; // Set spherical surface - Handle(Geom_Circle) Ucircle = Handle(Geom_Circle)::DownCast(umidiso); - Handle(Geom_Circle) Vcircle = Handle(Geom_Circle)::DownCast(vmidiso); - // torus - // try when V isolines is with same radius - Handle(Geom_Surface) anObject = - TryTorusSphere(mySurf, Vcircle, Ucircle, V1, V2, U1, U2, toler, Standard_True); - if (anObject.IsNull()) // try when U isolines is with same radius - anObject = TryTorusSphere(mySurf, Ucircle, Vcircle, U1, U2, V1, V2, toler, Standard_False); + //case of torus-sphere + if (aToroidSphere) { - if (!anObject.IsNull()) - { - if (anObject->IsKind(STANDARD_TYPE(Geom_ToroidalSurface))) + isurf = 3; // Set spherical surface + + Handle(Geom_Circle) Ucircle = Handle(Geom_Circle)::DownCast(umidiso); + Handle(Geom_Circle) Vcircle = Handle(Geom_Circle)::DownCast(vmidiso); + // torus + // try when V isolines is with same radius + Handle(Geom_Surface) anObject = + TryTorusSphere(mySurf, Vcircle, Ucircle, V1, V2, U1, U2, toler, Standard_True); + if (anObject.IsNull()) // try when U isolines is with same radius + anObject = TryTorusSphere(mySurf, Ucircle, Vcircle, U1, U2, V1, V2, toler, Standard_False); + + if (!anObject.IsNull()) { - isurf = 4; // set torus - } - newSurf[isurf] = anObject; - } - else - { - myGap = dd[isurf]; - } - } - //case of cone - cylinder - else if (aCylinderConus) { - Standard_Real param1, param2, cf1, cf2; - Handle(Geom_Curve) firstiso, lastiso; - Handle(Geom_Circle) firstisocirc, lastisocirc, midisocirc; - gp_Dir isoline; - if (VCase) { - param1 = U1; param2 = U2; - firstiso = TrSurf->VIso(V1); - lastiso = TrSurf->VIso(V2); - midisocirc = Handle(Geom_Circle)::DownCast(vmidiso); - isoline = Handle(Geom_Line)::DownCast(umidiso)->Lin().Direction(); - } - else { - param1 = V1; param2 = V2; - firstiso = TrSurf->UIso(U1); - lastiso = TrSurf->UIso(U2); - midisocirc = Handle(Geom_Circle)::DownCast(umidiso); - isoline = Handle(Geom_Line)::DownCast(vmidiso)->Lin().Direction(); - } - firstisocirc = Handle(Geom_Circle)::DownCast(GeomConvert_CurveToAnaCurve::ComputeCurve(firstiso, toler, param1, param2, cf1, cl, aGap1)); - lastisocirc = Handle(Geom_Circle)::DownCast(GeomConvert_CurveToAnaCurve::ComputeCurve(lastiso, toler, param1, param2, cf2, cl, aGap2)); - if (!firstisocirc.IsNull() || !lastisocirc.IsNull()) { - Standard_Real R1, R2, R3; - gp_Pnt P1, P2, P3; - if (!firstisocirc.IsNull()) { - R1 = firstisocirc->Circ().Radius(); - P1 = firstisocirc->Circ().Location(); - } - else { - R1 = 0; - P1 = firstiso->Value((firstiso->LastParameter() - firstiso->FirstParameter()) / 2); - } - R2 = midisocirc->Circ().Radius(); - P2 = midisocirc->Circ().Location(); - if (!lastisocirc.IsNull()) { - R3 = lastisocirc->Circ().Radius(); - P3 = lastisocirc->Circ().Location(); - } - else { - R3 = 0; - P3 = lastiso->Value((lastiso->LastParameter() - lastiso->FirstParameter()) / 2); - } - //cylinder - if (((Abs(R2 - R1)) < toler) && ((Abs(R3 - R1)) < toler) && - ((Abs(R3 - R2)) < toler)) { - isurf = 1; - gp_Ax3 Axes(P1, gp_Dir(gp_Vec(P1, P3))); - Handle(Geom_CylindricalSurface) anObject = - new Geom_CylindricalSurface(Axes, R1); - if (myConvType == GeomConvert_Target && myTarget != GeomAbs_Cylinder) + if (anObject->IsKind(STANDARD_TYPE(Geom_ToroidalSurface))) { - return newSurf[isurf]; + isurf = 4; // set torus } newSurf[isurf] = anObject; - } - //cone - else if ((((Abs(R1)) > (Abs(R2))) && ((Abs(R2)) > (Abs(R3)))) || - (((Abs(R3)) > (Abs(R2))) && ((Abs(R2)) > (Abs(R1))))) { - Standard_Real radius; - gp_Ax3 Axes; - Standard_Real semiangle = - gp_Vec(isoline).Angle(gp_Vec(P3, P1)); - if (semiangle>M_PI / 2) semiangle = M_PI - semiangle; - if (R1 > R3) { - radius = R3; - Axes = gp_Ax3(P3, gp_Dir(gp_Vec(P3, P1))); + if (myConvType == GeomConvert_Target && (myTarget != aSTypes[isurf])) + { + myGap = RealLast(); + return NULL; } - else { - radius = R1; - Axes = gp_Ax3(P1, gp_Dir(gp_Vec(P1, P3))); + } + else + { + myGap = dd[isurf]; + } + } + //case of cone - cylinder + else if (aCylinderConus) { + isurf = 1; //set cylindrical surface + Handle(Geom_Surface) anObject = TryCylinerCone(aTempS, VCase, umidiso, vmidiso, + U1, U2, V1, V2, toler); + if (!anObject.IsNull()) + { + if (anObject->IsKind(STANDARD_TYPE(Geom_ConicalSurface))) + { + isurf = 2; // set conical surface } - Handle(Geom_ConicalSurface) anObject = - new Geom_ConicalSurface(Axes, semiangle, radius); - isurf = 2; - if (myConvType == GeomConvert_Target && myTarget != GeomAbs_Cone) + if (myConvType == GeomConvert_Target && (myTarget != aSTypes[isurf])) { - return newSurf[isurf]; + myGap = RealLast(); + return NULL; } newSurf[isurf] = anObject; } + else + { + myGap = dd[isurf]; + } } - else + } + //Additional checking for case of cylinder + if (!aCylinderConus && !aToroidSphere) + { + //Try cylinder using Gauss field + Standard_Integer aNbU = 7, aNbV = 7; + Standard_Boolean aLeastSquare = Standard_True; + Handle(Geom_Surface) anObject = TryCylinderByGaussField(aTempS, U1, U2, V1, V2, toler, + aNbU, aNbV, aLeastSquare); + if (!anObject.IsNull()) { - myGap = dd[isurf]; + isurf = 1; + newSurf[isurf] = anObject; } } + // //--------------------------------------------------------------------- // verification //--------------------------------------------------------------------- - GeomAbs_SurfaceType aSTypes[5] = { GeomAbs_Plane, GeomAbs_Cylinder, - GeomAbs_Cone, GeomAbs_Sphere, GeomAbs_Torus }; Standard_Integer imin = -1; Standard_Real aDmin = RealLast(); for (isurf = 0; isurf < 5; ++isurf) { if (newSurf[isurf].IsNull()) continue; - dd[isurf] = ComputeGap(TrSurf, U1, U2, V1, V2, newSurf[isurf], toler); + dd[isurf] = ComputeGap(aTempS, U1, U2, V1, V2, newSurf[isurf], toler); if (dd[isurf] <= toler) { if (myConvType == GeomConvert_Simplest || (myConvType == GeomConvert_Target && myTarget == aSTypes[isurf])) @@ -682,7 +1011,7 @@ Handle(Geom_Surface) GeomConvert_SurfToAnaSurf::ConvertToAnalytical(const Standa return newSurf[imin]; } - return newSurf[0]; + return NULL; } //======================================================================= diff --git a/src/GeomConvert/GeomConvert_SurfToAnaSurf.hxx b/src/GeomConvert/GeomConvert_SurfToAnaSurf.hxx index 016956590e..ee333f54aa 100644 --- a/src/GeomConvert/GeomConvert_SurfToAnaSurf.hxx +++ b/src/GeomConvert/GeomConvert_SurfToAnaSurf.hxx @@ -25,8 +25,10 @@ #include #include #include +#include class Geom_Surface; - +class Geom_SurfaceOfRevolution; +class Geom_Circle; //! Converts a surface to the analitical form with given //! precision. Conversion is done only the surface is bspline @@ -75,6 +77,48 @@ public: //! Returns true, if surface is canonical Standard_EXPORT static Standard_Boolean IsCanonical (const Handle(Geom_Surface)& S); +private: + //!static method for checking surface of revolution + //!To avoid two-parts cone-like surface + static void CheckVTrimForRevSurf(const Handle(Geom_SurfaceOfRevolution)& aRevSurf, + Standard_Real& V1, Standard_Real& V2); + + //!static method to try create cylindrical or conical surface + static Handle(Geom_Surface) TryCylinerCone(const Handle(Geom_Surface)& theSurf, const Standard_Boolean theVCase, + const Handle(Geom_Curve)& theUmidiso, const Handle(Geom_Curve)& theVmidiso, + const Standard_Real theU1, const Standard_Real theU2, const Standard_Real theV1, const Standard_Real theV2, + const Standard_Real theToler); + + //!static method to try create cylinrical surface using least square method + static Standard_Boolean GetCylByLS(const Handle(TColgp_HArray1OfXYZ)& thePoints, + const Standard_Real theTol, + gp_Ax3& thePos, Standard_Real& theR, + Standard_Real& theGap); + + //!static method to try create cylinrical surface based on its Gauss field + static Handle(Geom_Surface) TryCylinderByGaussField(const Handle(Geom_Surface)& theSurf, + const Standard_Real theU1, const Standard_Real theU2, const Standard_Real theV1, const Standard_Real theV2, + const Standard_Real theToler, const Standard_Integer theNbU = 20, const Standard_Integer theNbV = 20, + const Standard_Boolean theLeastSquare = Standard_False); + + //! static method to try create toroidal surface. + //! In case = Standard_True try to use V isoline radius as minor radaius. + static Handle(Geom_Surface) TryTorusSphere(const Handle(Geom_Surface)& theSurf, + const Handle(Geom_Circle)& circle, + const Handle(Geom_Circle)& otherCircle, + const Standard_Real Param1, + const Standard_Real Param2, + const Standard_Real aParam1ToCrv, + const Standard_Real aParam2ToCrv, + const Standard_Real toler, + const Standard_Boolean isTryUMajor); + + static Standard_Real ComputeGap(const Handle(Geom_Surface)& theSurf, + const Standard_Real theU1, const Standard_Real theU2, const Standard_Real theV1, const Standard_Real theV2, + const Handle(Geom_Surface) theNewSurf, const Standard_Real theTol = RealLast()); + + + protected: diff --git a/src/ShapeAnalysis/FILES b/src/ShapeAnalysis/FILES index d9510dcbe9..1b4ea4c918 100755 --- a/src/ShapeAnalysis/FILES +++ b/src/ShapeAnalysis/FILES @@ -46,9 +46,3 @@ ShapeAnalysis_WireVertex.cxx ShapeAnalysis_WireVertex.hxx ShapeAnalysis_CanonicalRecognition.cxx ShapeAnalysis_CanonicalRecognition.hxx -ShapeAnalysis_FuncSphereLSDist.cxx -ShapeAnalysis_FuncSphereLSDist.hxx -ShapeAnalysis_FuncCylinderLSDist.cxx -ShapeAnalysis_FuncCylinderLSDist.hxx -ShapeAnalysis_FuncConeLSDist.cxx -ShapeAnalysis_FuncConeLSDist.hxx diff --git a/src/ShapeAnalysis/ShapeAnalysis_CanonicalRecognition.cxx b/src/ShapeAnalysis/ShapeAnalysis_CanonicalRecognition.cxx index 3abf8c12b5..9fa226eb37 100644 --- a/src/ShapeAnalysis/ShapeAnalysis_CanonicalRecognition.cxx +++ b/src/ShapeAnalysis/ShapeAnalysis_CanonicalRecognition.cxx @@ -51,9 +51,9 @@ #include #include #include -#include -#include -#include +#include +#include +#include #include #include #include @@ -834,9 +834,9 @@ Standard_Boolean ShapeAnalysis_CanonicalRecognition::GetSurfaceByLS(const TopoDS // Standard_Real aTol = Precision::Confusion(); math_MultipleVarFunction* aPFunc; - ShapeAnalysis_FuncSphereLSDist aFuncSph(aPoints); - ShapeAnalysis_FuncCylinderLSDist aFuncCyl(aPoints, thePos.Direction()); - ShapeAnalysis_FuncConeLSDist aFuncCon(aPoints, thePos.Direction()); + GeomConvert_FuncSphereLSDist aFuncSph(aPoints); + GeomConvert_FuncCylinderLSDist aFuncCyl(aPoints, thePos.Direction()); + GeomConvert_FuncConeLSDist aFuncCon(aPoints, thePos.Direction()); if (theTarget == GeomAbs_Sphere) { aPFunc = (math_MultipleVarFunction*)&aFuncSph; diff --git a/tests/cr/base/B10 b/tests/cr/base/B10 new file mode 100644 index 0000000000..b890b67b29 --- /dev/null +++ b/tests/cr/base/B10 @@ -0,0 +1,18 @@ +cylinder surf 1 +trimv surf surf -10 10 +plane pp 0 0 0 1 0 1 +intersect ii surf pp +extsurf surf ii 0 0 1 +trimv surf surf -1 1 +convert surf surf +mkface f surf +getanasurf asurf f cyl 1.e-7 +if {[isdraw asurf]} { + set log [dump asurf] + if { [regexp {CylindricalSurface} $log ] != 1 } { + puts "Error: surface is not a cylindrical surface" + } +} else { + puts "Error: required surface is not got" +} + From 0acc1ab47cddb49221b46152342f1c13bdee843c Mon Sep 17 00:00:00 2001 From: oan Date: Fri, 8 Jul 2022 13:49:11 +0300 Subject: [PATCH 344/639] 0033060: [Regression to 7.4.0] Mesh - Sub-precisional links provoke failure on face Slightly increase exact resolution so to cover links with approximate length equal to resolution itself on sub-resolution differences. --- src/BRepMesh/BRepMesh_DefaultRangeSplitter.cxx | 6 ++++-- tests/bugs/mesh/bug33060 | 17 +++++++++++++++++ 2 files changed, 21 insertions(+), 2 deletions(-) create mode 100644 tests/bugs/mesh/bug33060 diff --git a/src/BRepMesh/BRepMesh_DefaultRangeSplitter.cxx b/src/BRepMesh/BRepMesh_DefaultRangeSplitter.cxx index a7359f8ee9..dee351928b 100644 --- a/src/BRepMesh/BRepMesh_DefaultRangeSplitter.cxx +++ b/src/BRepMesh/BRepMesh_DefaultRangeSplitter.cxx @@ -124,10 +124,12 @@ void BRepMesh_DefaultRangeSplitter::computeTolerance( const Standard_Real aDiffU = myRangeU.second - myRangeU.first; const Standard_Real aDiffV = myRangeV.second - myRangeV.first; + // Slightly increase exact resolution so to cover links with approximate + // length equal to resolution itself on sub-resolution differences. const Standard_Real aTolerance = BRep_Tool::Tolerance (myDFace->GetFace()); const Adaptor3d_Surface& aSurface = GetSurface()->Surface(); - const Standard_Real aResU = aSurface.UResolution (aTolerance); - const Standard_Real aResV = aSurface.VResolution (aTolerance); + const Standard_Real aResU = aSurface.UResolution (aTolerance) * 1.1; + const Standard_Real aResV = aSurface.VResolution (aTolerance) * 1.1; const Standard_Real aDeflectionUV = 1.e-05; myTolerance.first = Max(Min(aDeflectionUV, aResU), 1e-7 * aDiffU); diff --git a/tests/bugs/mesh/bug33060 b/tests/bugs/mesh/bug33060 new file mode 100644 index 0000000000..ba63924da5 --- /dev/null +++ b/tests/bugs/mesh/bug33060 @@ -0,0 +1,17 @@ +puts "========" +puts "0033060: Mesh - Sub-precisional links provoke f a i l u r e on face" +puts "========" +puts "" + +restore [locate_data_file bug33060.brep] result + +tclean result + +checkview -display result -3d -path ${imagedir}/${test_image}.png + +set log [tricheck result] +if { [llength $log] != 0 } { + puts "Error : Invalid mesh" +} else { + puts "Mesh is OK" +} From c2e01cc5cc1411ca03479ed8b9072235859d5c27 Mon Sep 17 00:00:00 2001 From: abulyche Date: Wed, 6 Jul 2022 02:14:57 +0300 Subject: [PATCH 345/639] 0024049: Modeling Algorithms - crash in BRepOffsetAPI_MakePipe Added the test for this ticket. --- tests/pipe/bugs/bug24049 | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 tests/pipe/bugs/bug24049 diff --git a/tests/pipe/bugs/bug24049 b/tests/pipe/bugs/bug24049 new file mode 100644 index 0000000000..9f9002e340 --- /dev/null +++ b/tests/pipe/bugs/bug24049 @@ -0,0 +1,19 @@ +puts "=============" +puts "OCC24049: Modeling Algorithms - cras-h in BRepOffsetAPI_MakePipe" +puts "=============" +puts "" + +pload MODELING + +restore [locate_data_file bug24049_spine.brep] spine + +mkedge spine spine +wire spine spine + +circle profile 27378.59961 -1139.028442 -621 0 0 -1 -1 0 -0 6.349999904633 +mkedge profile profile + +pipe pipe spine profile 2 +checkshape pipe + +puts "TEST COMPLETED" \ No newline at end of file From 18559e93cfcc1023eaec817aa991e820eaa3c1cb Mon Sep 17 00:00:00 2001 From: kgv Date: Thu, 21 Jul 2022 23:30:00 +0300 Subject: [PATCH 346/639] 0033072: Configuration - ViewerTest_EventManager.cxx compilation error due to missing header on Emscripten Added missing `#include `. --- src/ViewerTest/ViewerTest_EventManager.cxx | 1 + 1 file changed, 1 insertion(+) diff --git a/src/ViewerTest/ViewerTest_EventManager.cxx b/src/ViewerTest/ViewerTest_EventManager.cxx index 99141ed81c..2bb2362f35 100644 --- a/src/ViewerTest/ViewerTest_EventManager.cxx +++ b/src/ViewerTest/ViewerTest_EventManager.cxx @@ -22,6 +22,7 @@ #include #include #include +#include #include #include #include From 617a2905a9b62f55e12f9d5b96aa4d16ffc124e6 Mon Sep 17 00:00:00 2001 From: kgv Date: Fri, 22 Jul 2022 09:53:33 +0300 Subject: [PATCH 347/639] 0033073: Coding Rules, RWGltf_CafWriter - suppress CLang warning coming from Draco library --- src/RWGltf/RWGltf_CafWriter.cxx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/RWGltf/RWGltf_CafWriter.cxx b/src/RWGltf/RWGltf_CafWriter.cxx index 836d15b86e..b5776fd882 100644 --- a/src/RWGltf/RWGltf_CafWriter.cxx +++ b/src/RWGltf/RWGltf_CafWriter.cxx @@ -45,7 +45,9 @@ #endif #ifdef HAVE_DRACO + #include #include + #include #endif IMPLEMENT_STANDARD_RTTIEXT(RWGltf_CafWriter, Standard_Transient) From cb8519be19a3533b741f016d703119320de72ea6 Mon Sep 17 00:00:00 2001 From: kgv Date: Fri, 22 Jul 2022 10:55:28 +0300 Subject: [PATCH 348/639] 0033074: Visualization, TKOpenGl - PBR shader compilation error on Mesa OpenGL 3.10033074 Graphic3d_ShaderManager::getPBREnvBakingProgram() - fix setting Graphic3d_ShaderProgram::SetPBR() before defining GLSL version via defaultGlslVersion() that relies on this property. --- src/Graphic3d/Graphic3d_ShaderManager.cxx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/Graphic3d/Graphic3d_ShaderManager.cxx b/src/Graphic3d/Graphic3d_ShaderManager.cxx index 9edd8e1443..6c6edc6eef 100644 --- a/src/Graphic3d/Graphic3d_ShaderManager.cxx +++ b/src/Graphic3d/Graphic3d_ShaderManager.cxx @@ -1547,7 +1547,7 @@ Handle(Graphic3d_ShaderProgram) Graphic3d_ShaderManager::getStdProgramPhong (con } Handle(Graphic3d_ShaderProgram) aProgramSrc = new Graphic3d_ShaderProgram(); - aProgramSrc->SetPBR (theIsPBR); + aProgramSrc->SetPBR (theIsPBR); // should be set before defaultGlslVersion() TCollection_AsciiString aSrcVert, aSrcVertExtraFunc, aSrcVertExtraMain; TCollection_AsciiString aSrcFrag, aSrcFragGetVertColor, aSrcFragExtraMain; @@ -1987,6 +1987,8 @@ Handle(Graphic3d_ShaderProgram) Graphic3d_ShaderManager::getPBREnvBakingProgram { Standard_ASSERT_RAISE (theIndex >= 0 && theIndex <= 2,""); Handle(Graphic3d_ShaderProgram) aProgramSrc = new Graphic3d_ShaderProgram(); + aProgramSrc->SetPBR (true); // should be set before defaultGlslVersion() + Graphic3d_ShaderObject::ShaderVariableList aUniforms, aStageInOuts; TCollection_AsciiString aSrcVert = TCollection_AsciiString() @@ -2033,7 +2035,6 @@ Handle(Graphic3d_ShaderProgram) Graphic3d_ShaderManager::getPBREnvBakingProgram aProgramSrc->SetNbLightsMax (0); aProgramSrc->SetNbShadowMaps (0); aProgramSrc->SetNbClipPlanesMax (0); - aProgramSrc->SetPBR (true); aProgramSrc->AttachShader (Graphic3d_ShaderObject::CreateFromSource (aSrcVert, Graphic3d_TOS_VERTEX, aUniforms, aStageInOuts)); aProgramSrc->AttachShader (Graphic3d_ShaderObject::CreateFromSource (aSrcFrag, Graphic3d_TOS_FRAGMENT, aUniforms, aStageInOuts)); return aProgramSrc; From 1b423e32873ea474da686712a526c2c6721be86e Mon Sep 17 00:00:00 2001 From: dpasukhi Date: Mon, 20 Jun 2022 16:28:50 +0300 Subject: [PATCH 349/639] 0033068: Draw Harness, XDEDRAW - improve XGetProperties command to work with all document labels Upgrade DRAW function XGetProperties to work with all document labels or sequence of labels --- src/XDEDRAW/XDEDRAW_Shapes.cxx | 150 +++++++++++++++++++++++++-------- 1 file changed, 117 insertions(+), 33 deletions(-) diff --git a/src/XDEDRAW/XDEDRAW_Shapes.cxx b/src/XDEDRAW/XDEDRAW_Shapes.cxx index eccc5612c3..709808406b 100644 --- a/src/XDEDRAW/XDEDRAW_Shapes.cxx +++ b/src/XDEDRAW/XDEDRAW_Shapes.cxx @@ -19,7 +19,10 @@ #include #include #include +#include +#include #include +#include #include #include #include @@ -934,59 +937,140 @@ static Standard_Integer updateAssemblies(Draw_Interpretor& di, Standard_Integer return 0; } -static Standard_Integer XGetProperties(Draw_Interpretor& di, Standard_Integer argc, const char** argv) +static Standard_Integer XGetProperties(Draw_Interpretor& theDI, + Standard_Integer theArgc, + const char** theArgv) { - if (argc != 3) + if (theArgc < 2) { - di << "Syntax error: wrong number of arguments\nUse: " << argv[0] << " Doc Label\n"; + theDI.PrintHelp(theArgv[0]); return 1; } Handle(TDocStd_Document) aDoc; - DDocStd::GetDocument(argv[1], aDoc); + DDocStd::GetDocument(theArgv[1], aDoc); if (aDoc.IsNull()) { - di << "Syntax error: " << argv[1] << " is not a document\n"; + theDI << "Syntax error: " << theArgv[1] << " is not a document\n"; return 1; } - - TDF_Label aLabel; - TDF_Tool::Label(aDoc->GetData(), argv[2], aLabel); - - // Get XDE shape tool Handle(XCAFDoc_ShapeTool) aShapeTool = XCAFDoc_DocumentTool::ShapeTool(aDoc->Main()); - - Handle(TDataStd_NamedData) aNamedData = aShapeTool->GetNamedProperties(aLabel); - - if (aNamedData.IsNull()) + NCollection_IndexedDataMap aNameDataMap; + for (Standard_Integer anInd = 2; anInd < theArgc; anInd++) { - di << argv[2] << " has no properties\n"; - return 0; - } - - aNamedData->LoadDeferredData(); - if (aNamedData->HasIntegers()) - { - TColStd_DataMapOfStringInteger anIntProperties = aNamedData->GetIntegersContainer(); - for (TColStd_DataMapIteratorOfDataMapOfStringInteger anIter(anIntProperties); anIter.More(); anIter.Next()) + TDF_Label aLabel; + const TCollection_AsciiString anEntry = theArgv[anInd]; + TDF_Tool::Label(aDoc->GetData(), anEntry, aLabel); + if (aLabel.IsNull()) + { + TopoDS_Shape aShape = DBRep::Get(theArgv[anInd]); + if (!aShape.IsNull()) + { + aLabel = aShapeTool->FindShape(aShape); + } + } + if (!aLabel.IsNull()) + { + Handle(TDataStd_NamedData) aNamedData = aShapeTool->GetNamedProperties(aLabel); + if (!aNamedData.IsNull()) + { + aNameDataMap.Add(anEntry, aNamedData); + } + } + else { - di << anIter.Key() << " : " << anIter.Value() << "\n"; + Message::SendWarning() << "Warning: incorrect argument [" << theArgv[anInd] << "]" << " is not a label"; } } - if (aNamedData->HasReals()) + if (theArgc == 2) { - TDataStd_DataMapOfStringReal aRealProperties = aNamedData->GetRealsContainer(); - for (TDataStd_DataMapIteratorOfDataMapOfStringReal anIter(aRealProperties); anIter.More(); anIter.Next()) + for (TDF_ChildIterator anIter(aShapeTool->Label(), Standard_True); + anIter.More(); anIter.Next()) { - di << anIter.Key() << " : " << anIter.Value() << "\n"; + const TDF_Label& aLabel = anIter.Value(); + TCollection_AsciiString anEntry; + TDF_Tool::Entry(aLabel, anEntry); + Handle(TDataStd_NamedData) aNamedData = aShapeTool->GetNamedProperties(aLabel); + if (!aNamedData.IsNull()) + { + aNameDataMap.Add(anEntry, aNamedData); + } } } - if (aNamedData->HasStrings()) + for (NCollection_IndexedDataMap::Iterator aNamedDataIter(aNameDataMap); + aNamedDataIter.More(); aNamedDataIter.Next()) { - TDataStd_DataMapOfStringString aStringProperties = aNamedData->GetStringsContainer(); - for (TDataStd_DataMapIteratorOfDataMapOfStringString anIter(aStringProperties); anIter.More(); anIter.Next()) + if (theArgc != 3) + { + theDI << "Property for [" << aNamedDataIter.Key() << "]:\n"; + } + const Handle(TDataStd_NamedData)& aNamedData = aNamedDataIter.Value(); + aNamedData->LoadDeferredData(); + if (aNamedData->HasIntegers()) + { + const TColStd_DataMapOfStringInteger& anIntProperties = aNamedData->GetIntegersContainer(); + for (TColStd_DataMapIteratorOfDataMapOfStringInteger anIter(anIntProperties); anIter.More(); anIter.Next()) + { + theDI << anIter.Key() << " : " << anIter.Value() << "\n"; + } + } + if (aNamedData->HasReals()) { - di << anIter.Key() << " : " << anIter.Value() << "\n"; + const TDataStd_DataMapOfStringReal& aRealProperties = aNamedData->GetRealsContainer(); + for (TDataStd_DataMapIteratorOfDataMapOfStringReal anIter(aRealProperties); anIter.More(); anIter.Next()) + { + theDI << anIter.Key() << " : " << anIter.Value() << "\n"; + } + } + if (aNamedData->HasStrings()) + { + const TDataStd_DataMapOfStringString& aStringProperties = aNamedData->GetStringsContainer(); + for (TDataStd_DataMapIteratorOfDataMapOfStringString anIter(aStringProperties); anIter.More(); anIter.Next()) + { + theDI << anIter.Key() << " : " << anIter.Value() << "\n"; + } + } + if (aNamedData->HasBytes()) + { + const TDataStd_DataMapOfStringByte& aByteProperties = aNamedData->GetBytesContainer(); + for (TDataStd_DataMapOfStringByte::Iterator anIter(aByteProperties); anIter.More(); anIter.Next()) + { + theDI << anIter.Key() << " : " << anIter.Value() << "\n"; + } + } + if (aNamedData->HasArraysOfIntegers()) + { + const TDataStd_DataMapOfStringHArray1OfInteger& anArrayIntegerProperties = + aNamedData->GetArraysOfIntegersContainer(); + for (TDataStd_DataMapOfStringHArray1OfInteger::Iterator anIter(anArrayIntegerProperties); + anIter.More(); anIter.Next()) + { + TCollection_AsciiString aMessage(anIter.Key() + " : "); + for (TColStd_HArray1OfInteger::Iterator anSubIter(anIter.Value()->Array1()); + anSubIter.More(); anSubIter.Next()) + { + aMessage += " "; + aMessage += anSubIter.Value(); + } + theDI << aMessage << "\n"; + } + } + if (aNamedData->HasArraysOfReals()) + { + const TDataStd_DataMapOfStringHArray1OfReal& anArrayRealsProperties = + aNamedData->GetArraysOfRealsContainer(); + for (TDataStd_DataMapOfStringHArray1OfReal::Iterator anIter(anArrayRealsProperties); + anIter.More(); anIter.Next()) + { + TCollection_AsciiString aMessage(anIter.Key() + " : "); + for (TColStd_HArray1OfReal::Iterator anSubIter(anIter.Value()->Array1()); + anSubIter.More(); anSubIter.Next()) + { + aMessage += " "; + aMessage += anSubIter.Value(); + } + theDI << aMessage << "\n"; + } } } @@ -1142,7 +1226,7 @@ void XDEDRAW_Shapes::InitCommands(Draw_Interpretor& di) di.Add ("XUpdateAssemblies","Doc \t: updates assembly compounds", __FILE__, updateAssemblies, g); - di.Add("XGetProperties", "Doc Label \t: prints named properties assigned to the Label", + di.Add("XGetProperties", "Doc [label1, label2, ...] [shape1, shape2, ...]\t: prints named properties assigned to the all document's shape labels or chosen labels of shapes", __FILE__, XGetProperties, g); di.Add ("XAutoNaming","Doc [0|1]\t: Disable/enable autonaming to Document", From 92d22d7d626fc83b9a42b780de8cc0359ca7d097 Mon Sep 17 00:00:00 2001 From: jgv Date: Thu, 28 Jul 2022 16:11:45 +0300 Subject: [PATCH 350/639] 0033080: Wrong projection point from ShapeAnalysis_Surface Correct Draw command "projface" so that it really finds only projection points belonging to the face. --- src/SWDRAW/SWDRAW_ShapeAnalysis.cxx | 63 +++++++++++++++++++++-------- tests/bugs/modalg_8/bug33080 | 30 ++++++++++++++ 2 files changed, 76 insertions(+), 17 deletions(-) create mode 100644 tests/bugs/modalg_8/bug33080 diff --git a/src/SWDRAW/SWDRAW_ShapeAnalysis.cxx b/src/SWDRAW/SWDRAW_ShapeAnalysis.cxx index 26b00cbe47..d1045f3e0a 100644 --- a/src/SWDRAW/SWDRAW_ShapeAnalysis.cxx +++ b/src/SWDRAW/SWDRAW_ShapeAnalysis.cxx @@ -141,13 +141,18 @@ static Standard_Integer tolerance static Standard_Integer projface (Draw_Interpretor& di, Standard_Integer argc, const char** argv) { - if (argc < 4) { di<<"Give FACE name and X Y [Z]\n"; return 1 /* Error */; } + if (argc < 4) + { + di << "Give FACE name and X Y [Z]\n"; + return 1; + } Standard_CString arg1 = argv[1]; TopoDS_Shape Shape = DBRep::Get(arg1); if (Shape.IsNull()) { di<<"Shape unknown : "<Value (U,V); di<<" => reproj X = "<ValueOfUV (P3D,BRep_Tool::Tolerance(F)); - suval.Coord(U,V); - di<<"** ShapeAnalysis_Surface gives U = "<Value(U,V); - di<<" => reproj X = "<Value(U,V); - di<<" => proj X = "<Value(U,V); + di<<" => reproj X = "<Value(U,V); + di << " => proj X = " << P3D.X() << " Y = " << P3D.Y() << " Z = " << P3D.Z() << "\n"; + } } return 0; } @@ -1199,7 +1228,7 @@ Standard_Integer getanacurve(Draw_Interpretor& di, Standard_CString g = SWDRAW::GroupName(); theCommands.Add ("tolerance","shape [tolmin tolmax:real]", __FILE__,tolerance,g); - theCommands.Add ("projface","nom_face X Y [Z]", __FILE__,projface,g); + theCommands.Add ("projface","nom_face X Y [Z] - returns the closest orthogonal projection if exists", __FILE__,projface,g); theCommands.Add ("projcurve","nom_edge | curve3d | curve3d first last + X Y Z", __FILE__,projcurve,g); theCommands.Add("projpcurve", "edge face tol x y z [start_param]", diff --git a/tests/bugs/modalg_8/bug33080 b/tests/bugs/modalg_8/bug33080 new file mode 100644 index 0000000000..32e52a95c6 --- /dev/null +++ b/tests/bugs/modalg_8/bug33080 @@ -0,0 +1,30 @@ +puts "================================" +puts "OCC33080: Wrong projection point" +puts "================================" +puts "" + +restore [locate_data_file bug33080.brep] a + +set log [projface a -0.21115 1.17515 1.4504] + +regexp {n0 1 Distance ([0-9+-.eE]*)} $log full dist + +if { $dist > 0.1240364 } { + puts "Error distance: projection is wrong" +} + +regexp {U = ([0-9+-.eE]*)} $log full uparam + +if { $uparam < 869.174321 || $uparam > 869.174322 } { + puts "Error point: projection is wrong" +} + +regexp {V = ([0-9+-.eE]*)} $log full vparam + +if { $vparam < 732.602489 || $vparam > 732.602490 } { + puts "Error point: projection is wrong" +} + +if {![regexp "Found 1 Points" $log]} { + puts "Error number of points: projection is wrong" +} From e1b097eb670f5c3d4aae5999e60e07cf8b38f059 Mon Sep 17 00:00:00 2001 From: jgv Date: Sat, 23 Jul 2022 17:22:30 +0300 Subject: [PATCH 351/639] 0033006: Modelling Algorithms - UnifySameDomain raises exception Correct processing cases where a group of faces lies on U-periodic and V-periodic (torus-like) surface. Add comments according to the remarks --- .../ShapeUpgrade_UnifySameDomain.cxx | 879 ++++++++++-------- tests/bugs/heal/bug27894 | 2 +- tests/bugs/heal/bug32213 | 2 +- tests/bugs/heal/bug33006 | 22 + tests/heal/unify_same_domain/A9 | 2 - tests/heal/unify_same_domain/B1 | 2 - 6 files changed, 504 insertions(+), 405 deletions(-) create mode 100644 tests/bugs/heal/bug33006 diff --git a/src/ShapeUpgrade/ShapeUpgrade_UnifySameDomain.cxx b/src/ShapeUpgrade/ShapeUpgrade_UnifySameDomain.cxx index 9a722f77e0..fe63901416 100644 --- a/src/ShapeUpgrade/ShapeUpgrade_UnifySameDomain.cxx +++ b/src/ShapeUpgrade/ShapeUpgrade_UnifySameDomain.cxx @@ -105,6 +105,43 @@ static Standard_Boolean IsOnSingularity(const TopTools_ListOfShape& theEdgeList) return Standard_False; } +//======================================================================= +//function : IsUiso +//purpose : only for seam edges assumed to be U- or V- isolines +//======================================================================= +static Standard_Boolean IsUiso (const TopoDS_Edge& theEdge, + const TopoDS_Face& theFace) +{ + BRepAdaptor_Curve2d aBAcurve2d (theEdge, theFace); + gp_Pnt2d aP2d; + gp_Vec2d aVec; + aBAcurve2d.D1 (aBAcurve2d.FirstParameter(), aP2d, aVec); + return (Abs(aVec.Y()) > Abs(aVec.X())); +} + +static Standard_Boolean IsLinear (const BRepAdaptor_Curve& theBAcurve, + gp_Dir& theDir) +{ + GeomAbs_CurveType aType = theBAcurve.GetType(); + + if (aType == GeomAbs_Line) + { + theDir = theBAcurve.Line().Position().Direction(); + return Standard_True; + } + + if ((aType == GeomAbs_BezierCurve || aType == GeomAbs_BSplineCurve) && + theBAcurve.NbPoles() == 2) + { + gp_Pnt aFirstPnt = theBAcurve.Value (theBAcurve.FirstParameter()); + gp_Pnt aLastPnt = theBAcurve.Value (theBAcurve.LastParameter()); + theDir = gp_Vec (aFirstPnt, aLastPnt); + return Standard_True; + } + + return Standard_False; +} + static void SplitWire (const TopoDS_Wire& theWire, const TopoDS_Face& theFace, const TopTools_IndexedMapOfShape& theVmap, @@ -119,6 +156,76 @@ static Standard_Real TrueValueOfOffset(const Standard_Real theValue, return (-thePeriod); } +//======================================================================= +//function : GetFaceFromSeq +//purpose : gets a face from the sequence that has a common boundary +// with already got . If it is possible, +// gets a face that has a common boundary in 2D space too +// (excludes seam edges). +// returns the Index of the face in the sequence. +//======================================================================= +static TopoDS_Face GetFaceFromSeq(const TopTools_SequenceOfShape& theFaces, + const TopoDS_Face& theRefFace, + const TopTools_IndexedDataMapOfShapeListOfShape& theMapEF, + TopTools_IndexedMapOfShape& theUsedFaces, + Standard_Integer& theIndFace) +{ + if (theUsedFaces.IsEmpty()) + { + theIndFace = 1; + theUsedFaces.Add (theFaces(1)); + return TopoDS::Face(theFaces(1)); + } + + TopoDS_Edge aSeamEdge; + TopoDS_Face aTargetFace; + for (Standard_Integer ii = 1; ii <= theUsedFaces.Extent(); ii++) + { + const TopoDS_Face& aUsedFace = TopoDS::Face (theUsedFaces(ii)); + TopExp_Explorer anExplo (aUsedFace, TopAbs_EDGE); + for (; anExplo.More(); anExplo.Next()) + { + const TopoDS_Edge& anEdge = TopoDS::Edge (anExplo.Current()); + const TopTools_ListOfShape& aFaceList = theMapEF.FindFromKey(anEdge); + if (aFaceList.Extent() < 2) + continue; + + const TopoDS_Face& aFace = (aFaceList.First().IsSame (aUsedFace))? + TopoDS::Face (aFaceList.Last()) : TopoDS::Face (aFaceList.First()); + + if (theUsedFaces.Contains (aFace)) + continue; + + if (BRep_Tool::IsClosed (anEdge, theRefFace)) + { + aSeamEdge = anEdge; + continue; + } + + aTargetFace = aFace; + break; + } + if (aTargetFace.IsNull() && !aSeamEdge.IsNull()) + { + const TopTools_ListOfShape& aFaceList = theMapEF.FindFromKey(aSeamEdge); + aTargetFace = (aFaceList.First().IsSame (aUsedFace))? + TopoDS::Face (aFaceList.Last()) : TopoDS::Face (aFaceList.First()); + } + if (!aTargetFace.IsNull()) + break; + } + + theUsedFaces.Add (aTargetFace); + for (Standard_Integer ii = 2; ii <= theFaces.Length(); ii++) + if (theFaces(ii).IsSame (aTargetFace)) + { + theIndFace = ii; + break; + } + + return aTargetFace; +} + //======================================================================= //function : UpdateBoundaries //purpose : auxiliary @@ -126,8 +233,9 @@ static Standard_Real TrueValueOfOffset(const Standard_Real theValue, static void UpdateBoundaries(const Handle(Geom2d_Curve)& thePCurve, const Standard_Real theFirst, const Standard_Real theLast, - Standard_Real& theUfirst, - Standard_Real& theUlast) + const Standard_Integer theIndCoord, + Standard_Real& theMinCoord, + Standard_Real& theMaxCoord) { const Standard_Integer NbSamples = 4; Standard_Real Delta = (theLast - theFirst)/NbSamples; @@ -136,10 +244,12 @@ static void UpdateBoundaries(const Handle(Geom2d_Curve)& thePCurve, { Standard_Real aParam = theFirst + i*Delta; gp_Pnt2d aPoint = thePCurve->Value(aParam); - if (aPoint.X() < theUfirst) - theUfirst = aPoint.X(); - if (aPoint.X() > theUlast) - theUlast = aPoint.X(); + + if (aPoint.Coord(theIndCoord) < theMinCoord) + theMinCoord = aPoint.Coord(theIndCoord); + + if (aPoint.Coord(theIndCoord) > theMaxCoord) + theMaxCoord = aPoint.Coord(theIndCoord); } } @@ -184,6 +294,8 @@ static void RemoveEdgeFromMap(const TopoDS_Edge& theEdge, TopExp::Vertices(theEdge, VV[0], VV[1]); for (Standard_Integer i = 0; i < 2; i++) { + if (!theVEmap.Contains (VV[i])) + continue; TopTools_ListOfShape& Elist = theVEmap.ChangeFromKey(VV[i]); TopTools_ListIteratorOfListOfShape itl(Elist); while (itl.More()) @@ -228,19 +340,31 @@ static Standard_Real ComputeMinEdgeSize(const TopTools_SequenceOfShape& theEdges return MinSize; } -static void FindFaceWithMaxUbound(const TopTools_SequenceOfShape& theFaces, - const TopoDS_Face& theRefFace, - const TopTools_MapOfShape& theEdgesMap, - Standard_Real& theUmax, - Standard_Integer& theIndFaceMax) +static void FindCoordBounds(const TopTools_SequenceOfShape& theFaces, + const TopoDS_Face& theRefFace, + const TopTools_IndexedDataMapOfShapeListOfShape& theMapEF, + const TopTools_MapOfShape& theEdgesMap, + const Standard_Integer theIndCoord, + const Standard_Real thePeriod, + Standard_Real& theMinCoord, + Standard_Real& theMaxCoord, + Standard_Integer& theNumberOfIntervals, + Standard_Integer& theIndFaceMax) { - theUmax = RealFirst(); + NCollection_Sequence> aPairSeq; + + Standard_Real aSimpleMax = RealFirst(); theIndFaceMax = 0; + + TopTools_IndexedMapOfShape aUsedFaces; + TopoDS_Face aLastFace; for (Standard_Integer ii = 1; ii <= theFaces.Length(); ii++) { - const TopoDS_Face& face_ii = TopoDS::Face(theFaces(ii)); - Standard_Real Ufirst = RealLast(), Ulast = RealFirst(); - TopExp_Explorer Explo(face_ii, TopAbs_EDGE); + Standard_Integer anIndFace = 0; + //Get a face bordering with previous ones + TopoDS_Face aFace = GetFaceFromSeq (theFaces, theRefFace, theMapEF, aUsedFaces, anIndFace); + Standard_Real aMinCoord = RealLast(), aMaxCoord = RealFirst(); + TopExp_Explorer Explo(aFace, TopAbs_EDGE); for (; Explo.More(); Explo.Next()) { const TopoDS_Edge& anEdge = TopoDS::Edge(Explo.Current()); @@ -248,24 +372,81 @@ static void FindFaceWithMaxUbound(const TopTools_SequenceOfShape& theFaces, continue; Standard_Real fpar, lpar; Handle(Geom2d_Curve) aPCurve = BRep_Tool::CurveOnSurface(anEdge, theRefFace, fpar, lpar); - UpdateBoundaries(aPCurve, fpar, lpar, Ufirst, Ulast); + UpdateBoundaries (aPCurve, fpar, lpar, theIndCoord, aMinCoord, aMaxCoord); + } + + if (Precision::IsInfinite (aMinCoord) || + Precision::IsInfinite (aMaxCoord)) + continue; + + if (aMaxCoord > aSimpleMax) + { + aSimpleMax = aMaxCoord; + theIndFaceMax = anIndFace; } - if (Ulast > theUmax) + + //Insert new interval (aMinCoord, aMaxCoord) into sequence of intervals + Standard_Boolean anIsInInterval = Standard_False; + for (Standard_Integer jj = 1; jj <= aPairSeq.Length(); jj++) + { + Standard_Real aLocalMin = aPairSeq(jj).first; + Standard_Real aLocalMax = aPairSeq(jj).second; + if (aMinCoord >= aLocalMin && aMinCoord <= aLocalMax && + aMaxCoord >= aLocalMin && aMaxCoord <= aLocalMax) + { + anIsInInterval = Standard_True; + break; + } + + if (aMinCoord < aLocalMin && (aMaxCoord >= aLocalMin && aMaxCoord <= aLocalMax)) + { + aPairSeq(jj).first = aMinCoord; + anIsInInterval = Standard_True; + break; + } + else if (aMinCoord < aLocalMin && aMaxCoord > aLocalMax) + { + aPairSeq(jj).first = aMinCoord; + aPairSeq(jj).second = aMaxCoord; + anIsInInterval = Standard_True; + break; + } + else if ((aMinCoord >= aLocalMin && aMinCoord <= aLocalMax) && aMaxCoord > aLocalMax) + { + aPairSeq(jj).second = aMaxCoord; + anIsInInterval = Standard_True; + break; + } + } + if (!anIsInInterval) { - theUmax = Ulast; - theIndFaceMax = ii; + std::pair anInterval (aMinCoord, aMaxCoord); + if (!aPairSeq.IsEmpty() && aMaxCoord < aPairSeq(1).first) + aPairSeq.Prepend (anInterval); + else + aPairSeq.Append (anInterval); } } + + theNumberOfIntervals = aPairSeq.Length(); + + if (aPairSeq.Length() == 2) + theMinCoord = aPairSeq(2).first - thePeriod; + else + theMinCoord = aPairSeq(1).first; + + theMaxCoord = aPairSeq(1).second; } static void RelocatePCurvesToNewUorigin(const TopTools_SequenceOfShape& theEdges, const TopoDS_Shape& theFirstFace, const TopoDS_Face& theRefFace, const Standard_Real theCoordTol, - const Standard_Real theUperiod, + const Standard_Integer theIndCoord, + const Standard_Real thePeriod, TopTools_IndexedDataMapOfShapeListOfShape& theVEmap, NCollection_DataMap& theEdgeNewPCurve, - TopTools_MapOfShape& theUsedEdges) + TopTools_MapOfShape& theUsedEdges) { TopTools_MapOfShape EdgesOfFirstFace; TopExp::MapShapes(theFirstFace, EdgesOfFirstFace); @@ -277,7 +458,7 @@ static void RelocatePCurvesToNewUorigin(const TopTools_SequenceOfShape& theEdges //2. has minimum U-coord of its start point TopoDS_Edge StartEdge; TopAbs_Orientation anOr = TopAbs_FORWARD; - Standard_Real anUmin = RealLast(); + Standard_Real aCoordMin = RealLast(); for (Standard_Integer ii = 1; ii <= theEdges.Length(); ii++) { const TopoDS_Edge& anEdge = TopoDS::Edge(theEdges(ii)); @@ -302,14 +483,14 @@ static void RelocatePCurvesToNewUorigin(const TopTools_SequenceOfShape& theEdges } gp_Pnt2d aFirstPoint = StartBAcurve.Value(aFirstParam); gp_Pnt2d aLastPoint = StartBAcurve.Value(aLastParam); - if (aFirstPoint.X() < aLastPoint.X()) + if (aFirstPoint.Coord(theIndCoord) < aLastPoint.Coord(theIndCoord)) { - anUmin = aFirstPoint.X(); + aCoordMin = aFirstPoint.Coord(theIndCoord); anOr = TopAbs_FORWARD; } else { - anUmin = aLastPoint.X(); + aCoordMin = aLastPoint.Coord(theIndCoord); anOr = TopAbs_REVERSED; } } @@ -329,16 +510,16 @@ static void RelocatePCurvesToNewUorigin(const TopTools_SequenceOfShape& theEdges } gp_Pnt2d aFirstPoint = aBAcurve.Value(aFirstParam); gp_Pnt2d aLastPoint = aBAcurve.Value(aLastParam); - if (aFirstPoint.X() < anUmin) + if (aFirstPoint.Coord(theIndCoord) < aCoordMin) { StartEdge = anEdge; - anUmin = aFirstPoint.X(); + aCoordMin = aFirstPoint.Coord(theIndCoord); anOr = TopAbs_FORWARD; } - if (aLastPoint.X() < anUmin) + if (aLastPoint.Coord(theIndCoord) < aCoordMin) { StartEdge = anEdge; - anUmin = aLastPoint.X(); + aCoordMin = aLastPoint.Coord(theIndCoord); anOr = TopAbs_REVERSED; } } @@ -357,10 +538,9 @@ static void RelocatePCurvesToNewUorigin(const TopTools_SequenceOfShape& theEdges theEdgeNewPCurve.Bind(CurEdge, CurPCurve); if (CurEdge.Orientation() == TopAbs_REVERSED) { Standard_Real tmp = fpar; fpar = lpar; lpar = tmp; } - //Standard_Real StartParam = (anOr == TopAbs_FORWARD)? fpar : lpar; Standard_Real CurParam = (anOr == TopAbs_FORWARD)? lpar : fpar; - //gp_Pnt2d StartPoint = CurPCurve->Value(StartParam); gp_Pnt2d CurPoint = CurPCurve->Value(CurParam); + for (;;) //collect pcurves of a contour { RemoveEdgeFromMap(CurEdge, theVEmap); @@ -389,15 +569,19 @@ static void RelocatePCurvesToNewUorigin(const TopTools_SequenceOfShape& theEdges { Standard_Real tmp = fpar; fpar = lpar; lpar = tmp; } Standard_Real aParam = (anOr == TopAbs_FORWARD)? fpar : lpar; gp_Pnt2d aPoint = aPCurve->Value(aParam); - Standard_Real anOffset = CurPoint.X() - aPoint.X(); + Standard_Real anOffset = CurPoint.Coord(theIndCoord) - aPoint.Coord(theIndCoord); if (!(Abs(anOffset) < theCoordTol || - Abs(Abs(anOffset) - theUperiod) < theCoordTol)) + Abs(Abs(anOffset) - thePeriod) < theCoordTol)) continue; //may be if CurVertex is deg.vertex - if (Abs(anOffset) > theUperiod/2) + if (Abs(anOffset) > thePeriod/2) { - anOffset = TrueValueOfOffset(anOffset, theUperiod); - gp_Vec2d aVec(anOffset, 0.); + anOffset = TrueValueOfOffset(anOffset, thePeriod); + gp_Vec2d aVec; + if (theIndCoord == 1) + aVec.SetCoord (anOffset, 0.); + else + aVec.SetCoord (0., anOffset); Handle(Geom2d_Curve) aNewPCurve = Handle(Geom2d_Curve)::DownCast(aPCurve->Copy()); aNewPCurve->Translate(aVec); aPCurve = aNewPCurve; @@ -531,242 +715,71 @@ static Standard_Boolean FindClosestPoints(const TopoDS_Edge& theEdge1, //function : ReconstructMissedSeam //purpose : auxiliary //======================================================================= -static void ReconstructMissedSeam(const TopTools_SequenceOfShape& theEdges, - const TopTools_SequenceOfShape& theRemovedEdges, - const TopTools_MapOfShape& theUsedEdges, +static void ReconstructMissedSeam(const TopTools_SequenceOfShape& theRemovedEdges, const TopoDS_Face& theFrefFace, + const TopoDS_Edge& theCurEdge, const TopoDS_Vertex& theCurVertex, const gp_Pnt2d& theCurPoint, - const Standard_Real thePeriod, - const Standard_Real theFaceCoordMin, - const Standard_Boolean theIsU, - const Standard_Real theCoordTol, - TopoDS_Edge& theNextEdge, - TopoDS_Wire& theNewWire, - gp_Pnt2d& theNextPoint, - gp_Pnt2d& theStartOfNextEdge, - TopoDS_Vertex& theLastVertexOfSeam, - TopTools_IndexedDataMapOfShapeListOfShape& theVEmap) - + const Standard_Real theUperiod, + const Standard_Real theVperiod, + TopoDS_Edge& theSeamEdge, + gp_Pnt2d& theNextPoint) { Handle(Geom_Surface) RefSurf = BRep_Tool::Surface(theFrefFace); - GeomAbs_Shape aContinuity; - if (theIsU) - aContinuity = (RefSurf->IsUPeriodic())? GeomAbs_CN : GeomAbs_C0; - else - aContinuity = (RefSurf->IsVPeriodic())? GeomAbs_CN : GeomAbs_C0; - Standard_Integer IndCoord = theIsU? 1 : 2; - - Standard_Real SeamDir = 1.; //up or right - if (theIsU && Abs(theCurPoint.Coord(IndCoord) - theFaceCoordMin) <= theCoordTol) - SeamDir = -1.; //down - else if (!theIsU && Abs(theCurPoint.Coord(IndCoord) - theFaceCoordMin) > theCoordTol) - SeamDir = -1.; //left - - //Consider as the candidate to be next edge: - //only the edge that has first point with X(or Y)-coordinate close to X(or Y)-coordinate of theCurPoint - //Choose from candidates the edge that is closest to theCurPoint in the defined direction SeamDir - Standard_Real MinDeltaSeamCoord = RealLast(); - for (Standard_Integer ind = 1; ind <= theEdges.Length(); ind++) - { - const TopoDS_Edge& aCandidate = TopoDS::Edge(theEdges(ind)); - if (theUsedEdges.Contains(aCandidate)) - continue; - BRepAdaptor_Curve2d BAcurve2d(aCandidate, theFrefFace); - Standard_Real CandParam = (aCandidate.Orientation() == TopAbs_FORWARD)? - BAcurve2d.FirstParameter() : BAcurve2d.LastParameter(); - gp_Pnt2d CandPoint = BAcurve2d.Value(CandParam); - Standard_Real DeltaCoord = Abs(CandPoint.Coord(IndCoord) - theCurPoint.Coord(IndCoord)); - if (DeltaCoord > theCoordTol) - continue; - - Standard_Real DeltaSeamCoord = CandPoint.Coord(3-IndCoord) - theCurPoint.Coord(3-IndCoord); - DeltaSeamCoord *= SeamDir; - if (DeltaSeamCoord < 0.) //on the other side from CurPoint - continue; - if (DeltaSeamCoord < MinDeltaSeamCoord) - { - MinDeltaSeamCoord = DeltaSeamCoord; - theNextEdge = aCandidate; - theStartOfNextEdge = CandPoint; - } - } - - //Build missed seam edge - theLastVertexOfSeam = TopExp::FirstVertex(theNextEdge, Standard_True); //with orientation - TopoDS_Vertex V1, V2; - Standard_Real Param1, Param2, aCoord = 0.; - Handle(Geom_Curve) Iso; - - TopoDS_Edge aRemovedEdge; //try to find it in + //Find seam edge between removed edges + theSeamEdge.Nullify(); for (Standard_Integer i = 1; i <= theRemovedEdges.Length(); i++) { - const TopoDS_Edge& anEdge = TopoDS::Edge(theRemovedEdges(i)); + TopoDS_Edge anEdge = TopoDS::Edge(theRemovedEdges(i)); + if (anEdge.IsSame (theCurEdge)) + continue; + Standard_Real Param1, Param2; Handle(Geom2d_Curve) aPC = BRep_Tool::CurveOnSurface(anEdge, theFrefFace, Param1, Param2); if (aPC.IsNull()) continue; - GeomAbs_Shape aContOnRefFace = BRep_Tool::Continuity(anEdge, theFrefFace, theFrefFace); - if (aContOnRefFace > aContinuity) - aContinuity = aContOnRefFace; + TopoDS_Vertex aFirstVertex, aLastVertex; + TopExp::Vertices (anEdge, aFirstVertex, aLastVertex, Standard_True); - TopoDS_Vertex aV1, aV2; - TopExp::Vertices(anEdge, aV1, aV2); - if ((aV1.IsSame(theCurVertex) && aV2.IsSame(theLastVertexOfSeam)) || - (aV1.IsSame(theLastVertexOfSeam) && aV2.IsSame(theCurVertex))) - { - aRemovedEdge = anEdge; - break; - } - } - if (aRemovedEdge.IsNull()) - { - Standard_Real CurTol = BRep_Tool::Tolerance(theCurVertex); - Standard_Real LastTol = BRep_Tool::Tolerance(theLastVertexOfSeam); - aCoord = (CurTol < LastTol)? theCurPoint.Coord(IndCoord) : theStartOfNextEdge.Coord(IndCoord); - Iso = (theIsU)? RefSurf->UIso(aCoord) : RefSurf->VIso(aCoord); - if (SeamDir > 0) - { - V1 = theCurVertex; V2 = theLastVertexOfSeam; - Param1 = theCurPoint.Coord(3-IndCoord); Param2 = theStartOfNextEdge.Coord(3-IndCoord); - } - else - { - V1 = theLastVertexOfSeam; V2 = theCurVertex; - Param1 = theStartOfNextEdge.Coord(3-IndCoord); Param2 = theCurPoint.Coord(3-IndCoord); + if ((aFirstVertex.IsSame(theCurVertex) || aLastVertex.IsSame(theCurVertex)) && + BRep_Tool::IsClosed(anEdge, theFrefFace)) + { + Standard_Real aParam = (anEdge.Orientation() == TopAbs_FORWARD)? + Param1 : Param2; + gp_Pnt2d aPoint = aPC->Value(aParam); + Standard_Real aUdiff = Abs(aPoint.X() - theCurPoint.X()); + Standard_Real aVdiff = Abs(aPoint.Y() - theCurPoint.Y()); + if ((theUperiod != 0. && aUdiff > theUperiod/2) || + (theVperiod != 0. && aVdiff > theVperiod/2)) + { + anEdge.Reverse(); + aPC = BRep_Tool::CurveOnSurface(anEdge, theFrefFace, Param1, Param2); + aParam = (anEdge.Orientation() == TopAbs_FORWARD)? Param1 : Param2; + aPoint = aPC->Value(aParam); + aUdiff = Abs(aPoint.X() - theCurPoint.X()); + aVdiff = Abs(aPoint.Y() - theCurPoint.Y()); + } + if ((theUperiod == 0. || aUdiff < theUperiod/2) && + (theVperiod == 0. || aVdiff < theVperiod/2)) + { + aFirstVertex = TopExp::FirstVertex (anEdge, Standard_True); + if (aFirstVertex.IsSame (theCurVertex)) + { + theSeamEdge = anEdge; + break; + } + } } } - else - { - TopExp::Vertices(aRemovedEdge, V1, V2); - Iso = BRep_Tool::Curve(aRemovedEdge, Param1, Param2); - } - - TopoDS_Edge MissedSeam = BRepLib_MakeEdge(Iso, V1, V2, Param1, Param2); - BRep_Builder BB; - - //gp_Vec2d Offset(theUperiod, 0.); - gp_Vec2d Offset; - if (theIsU) - Offset.SetCoord(thePeriod, 0.); - else - Offset.SetCoord(0., thePeriod); - if (aRemovedEdge.IsNull()) - { - Standard_Real SeamCoordOrigin = 0.; - //Correct Param1 and Param2 if needed: - //when iso-curve is periodic and Param1 and Param2 do not fit into SeamCoord-range of surface, - //(for example, V-range of sphere) - //BRepLib_MakeEdge may shift Param1 and Param2 - Standard_Real InitialParam1 = Param1, InitialParam2 = Param2; - Handle(Geom_Curve) MissedCurve = BRep_Tool::Curve(MissedSeam, Param1, Param2); - if ((Param1 != InitialParam1 || Param2 != InitialParam2) && - MissedCurve->IsPeriodic()) - { - //Vorigin = -(MissedCurve->Period()); - SeamCoordOrigin = -(Param1 - InitialParam1); - } - ///////////////////////////////////// - //Handle(Geom2d_Line) PC1 = new Geom2d_Line(gp_Pnt2d(anU, Vorigin), gp_Dir2d(0., 1.)); - Handle(Geom2d_Line) PC1; - if (theIsU) - PC1 = new Geom2d_Line(gp_Pnt2d(aCoord, SeamCoordOrigin), gp_Dir2d(0., 1.)); - else - PC1 = new Geom2d_Line(gp_Pnt2d(SeamCoordOrigin, aCoord), gp_Dir2d(1., 0.)); - - Handle(Geom2d_Curve) PC2 = Handle(Geom2d_Curve)::DownCast(PC1->Copy()); - if (theIsU && SeamDir > 0) - Offset *= -1; - else if (!theIsU && SeamDir < 0) - Offset *= -1; - PC2->Translate(Offset); - - if (SeamDir > 0) - BB.UpdateEdge(MissedSeam, PC1, PC2, theFrefFace, 0.); - else - BB.UpdateEdge(MissedSeam, PC2, PC1, theFrefFace, 0.); - if (SeamDir < 0) - MissedSeam.Reverse(); - } - else + if (!theSeamEdge.IsNull()) { - MissedSeam = aRemovedEdge; - MissedSeam.Orientation(TopAbs_FORWARD); - if (!theCurVertex.IsSame(V1)) - MissedSeam.Reverse(); + Standard_Real Param1, Param2; + Handle(Geom2d_Curve) aPC = BRep_Tool::CurveOnSurface(theSeamEdge, theFrefFace, Param1, Param2); + Standard_Real aParam = (theSeamEdge.Orientation() == TopAbs_FORWARD)? Param2 : Param1; + theNextPoint = aPC->Value (aParam); } - - if (!BRep_Tool::IsClosed (MissedSeam, theFrefFace)) - { - //make edge a real seam edge with 2 pcurves on ref face - Handle(Geom2d_Curve) aPC = BRep_Tool::CurveOnSurface (MissedSeam, theFrefFace, Param1, Param2); - Handle(Geom2d_Curve) aCopyPC = Handle(Geom2d_Curve)::DownCast(aPC->Copy()); - - gp_Pnt2d aP2d = aPC->Value(Param1); - if (Abs(aP2d.Coord(IndCoord) - theCurPoint.Coord(IndCoord)) > thePeriod/2) - { - Standard_Real anOffset = 0.; - if (aP2d.Coord(IndCoord) < theCurPoint.Coord(IndCoord)) - anOffset = thePeriod; - else - anOffset = -thePeriod; - - if (theIsU) - Offset.SetCoord (anOffset, 0.); - else - Offset.SetCoord (0., anOffset); - - aCopyPC->Translate(Offset); - } - gp_Pnt2d aFirstP2d, aLastP2d; - if (MissedSeam.Orientation() == TopAbs_FORWARD) - { - aFirstP2d = aCopyPC->Value(Param1); - aLastP2d = aCopyPC->Value(Param2); - } - else - { - aFirstP2d = aCopyPC->Value(Param2); - aLastP2d = aCopyPC->Value(Param1); - } - if (theIsU) - { - if (aFirstP2d.Y() < aLastP2d.Y()) - Offset.SetCoord (-thePeriod, 0.); - else - Offset.SetCoord (thePeriod, 0.); - } - else - { - if (aFirstP2d.X() < aLastP2d.X()) - Offset.SetCoord (0., thePeriod); - else - Offset.SetCoord (0., -thePeriod); - } - Handle(Geom2d_Curve) AnotherPC = Handle(Geom2d_Curve)::DownCast(aCopyPC->Copy()); - AnotherPC->Translate(Offset); - TopoDS_Edge F_MissedSeam = MissedSeam; - F_MissedSeam.Orientation (TopAbs_FORWARD); - Handle(Geom2d_Curve) NullPC; - BB.UpdateEdge (F_MissedSeam, NullPC, theFrefFace, 0.); - if (MissedSeam.Orientation() == TopAbs_FORWARD) - BB.UpdateEdge (F_MissedSeam, aCopyPC, AnotherPC, theFrefFace, 0.); - else - BB.UpdateEdge (F_MissedSeam, AnotherPC, aCopyPC, theFrefFace, 0.); - } - - BB.Continuity(MissedSeam, theFrefFace, theFrefFace, aContinuity); - BB.Add(theNewWire, MissedSeam); - //add newly created edge into VEmap - MissedSeam.Reverse(); - TopExp::MapShapesAndUniqueAncestors(MissedSeam, TopAbs_VERTEX, TopAbs_EDGE, theVEmap); - - BRepAdaptor_Curve2d BAcurve2d(theNextEdge, theFrefFace); - Standard_Real ParamOfNextPoint = (theNextEdge.Orientation() == TopAbs_FORWARD)? - BAcurve2d.LastParameter() : BAcurve2d.FirstParameter(); - theNextPoint = BAcurve2d.Value(ParamOfNextPoint); } //======================================================================= @@ -999,10 +1012,18 @@ static void TransformPCurves(const TopoDS_Face& theRefFace, if (!aEmap.Add(anEdge)) continue; + TopAbs_Orientation anOr = anEdge.Orientation(); + Standard_Real fpar, lpar; Handle(Geom2d_Curve) PCurveOnRef = BRep_Tool::CurveOnSurface(anEdge, theRefFace, fpar, lpar); - if (!PCurveOnRef.IsNull() && !(ToModify || ToProject)) - continue; + Handle(Geom2d_Curve) PCurve2; + if (!PCurveOnRef.IsNull()/* && !(ToModify || ToProject)*/) + { + anEdge.Reverse(); + PCurve2 = BRep_Tool::CurveOnSurface(anEdge, theRefFace, fpar, lpar); + if (PCurve2 != PCurveOnRef) //two pcurves + continue; + } Handle(Geom2d_Curve) PCurves [2], NewPCurves [2]; anEdge.Orientation (TopAbs_FORWARD); @@ -1042,12 +1063,41 @@ static void TransformPCurves(const TopoDS_Face& theRefFace, anEdge.Orientation (TopAbs_FORWARD); - theMapEdgesWithTemporaryPCurves.Add(anEdge); - if (NbPcurves == 1) - BB.UpdateEdge(anEdge, NewPCurves[0], theRefFace, 0.); + { + if (PCurve2.IsNull() || (!RefSurf->IsUClosed() && !RefSurf->IsVClosed())) + { + BB.UpdateEdge(anEdge, NewPCurves[0], theRefFace, 0.); + theMapEdgesWithTemporaryPCurves.Add(anEdge); + } + else + { + //check: may be it is the same pcurve + Standard_Real aUmin, aUmax, aVmin, aVmax; + RefSurf->Bounds (aUmin, aUmax, aVmin, aVmax); + Standard_Real aUperiod = (RefSurf->IsUClosed())? (aUmax - aUmin) : 0.; + Standard_Real aVperiod = (RefSurf->IsVClosed())? (aVmax - aVmin) : 0.; + gp_Pnt2d aP2dOnPCurve1 = PCurveOnRef->Value(fpar); + gp_Pnt2d aP2dOnPCurve2 = NewPCurves[0]->Value(fpar); + if ((aUperiod != 0. && Abs(aP2dOnPCurve1.X() - aP2dOnPCurve2.X()) > aUperiod/2) || + (aVperiod != 0. && Abs(aP2dOnPCurve1.Y() - aP2dOnPCurve2.Y()) > aVperiod/2)) + { + Handle(Geom2d_Curve) NullPCurve; + BB.UpdateEdge(anEdge, NullPCurve, theRefFace, 0.); + if (anOr == TopAbs_FORWARD) + BB.UpdateEdge(anEdge, NewPCurves[0], PCurveOnRef, theRefFace, 0.); + else + BB.UpdateEdge(anEdge, PCurveOnRef, NewPCurves[0], theRefFace, 0.); + + theMapEdgesWithTemporaryPCurves.Add(anEdge); + } + } + } else + { BB.UpdateEdge(anEdge, NewPCurves[0], NewPCurves[1], theRefFace, 0.); + theMapEdgesWithTemporaryPCurves.Add(anEdge); + } BB.Range(anEdge, fpar, lpar); } @@ -1583,6 +1633,8 @@ void ShapeUpgrade_UnifySameDomain::UnionPCurves(const TopTools_SequenceOfShape& if (myFaceNewFace.IsBound(aFace)) aFace = TopoDS::Face (myFaceNewFace(aFace)); + aFace.Orientation (TopAbs_FORWARD); //to get proper pcurves of seam edges + BRepAdaptor_Surface aBAsurf (aFace, Standard_False); if (aBAsurf.GetType() == GeomAbs_Plane) continue; @@ -1611,6 +1663,7 @@ void ShapeUpgrade_UnifySameDomain::UnionPCurves(const TopTools_SequenceOfShape& TColStd_SequenceOfReal ResLasts; TColStd_SequenceOfReal aTolVerSeq; TopoDS_Edge aPrevEdge; + Standard_Boolean anIsSeam = Standard_False; for (Standard_Integer j = 1; j <= aFaceSeq.Length(); j++) { @@ -1626,11 +1679,28 @@ void ShapeUpgrade_UnifySameDomain::UnionPCurves(const TopTools_SequenceOfShape& TopoDS_Edge anEdge = TopoDS::Edge(theChain.Value(i)); Standard_Boolean isForward = (anEdge.Orientation() != TopAbs_REVERSED); + if (anIsSeam && j == 2) //second pass + anEdge.Reverse(); + Handle(Geom2d_Curve) aPCurve = BRep_Tool::CurveOnSurface(anEdge, TopoDS::Face(aFaceSeq(j)), aFirst, aLast); if (aPCurve.IsNull()) continue; + if (aFaceSeq.Length() == 1) + { + TopoDS_Edge aReversedEdge = anEdge; + aReversedEdge.Reverse(); + Handle(Geom2d_Curve) aPCurve2 = BRep_Tool::CurveOnSurface(aReversedEdge, + TopoDS::Face(aFaceSeq(j)), + aFirst, aLast); + if (aPCurve != aPCurve2) + { + anIsSeam = Standard_True; + aFaceSeq.Append (aFaceSeq(j)); + } + } + Geom2dAdaptor_Curve anAdaptor(aPCurve); GeomAbs_CurveType aType = anAdaptor.GetType(); @@ -1896,10 +1966,15 @@ void ShapeUpgrade_UnifySameDomain::UnionPCurves(const TopTools_SequenceOfShape& } //for (Standard_Integer ii = 1; ii <= ResPCurves.Length(); ii++) } - for (Standard_Integer j = 1; j <= ResPCurves.Length(); j++) + if (anIsSeam) { - aBuilder.UpdateEdge(theEdge, ResPCurves(j), TopoDS::Face(aFaceSeq(j)), aTolEdge); + aBuilder.UpdateEdge(theEdge, ResPCurves(1), ResPCurves(2), TopoDS::Face(aFaceSeq(1)), aTolEdge); } + else + for (Standard_Integer j = 1; j <= ResPCurves.Length(); j++) + { + aBuilder.UpdateEdge(theEdge, ResPCurves(j), TopoDS::Face(aFaceSeq(j)), aTolEdge); + } } //======================================================================= @@ -1972,6 +2047,10 @@ Standard_Boolean ShapeUpgrade_UnifySameDomain::MergeSubSeq(const TopTools_Sequen c3d1 = BRep_Tool::Curve(edge1,fp1,lp1); c3d2 = BRep_Tool::Curve(edge2,fp2,lp2); + BRepAdaptor_Curve aBAcurve1(edge1); + BRepAdaptor_Curve aBAcurve2(edge2); + gp_Dir aDir1, aDir2; + if(c3d1.IsNull() || c3d2.IsNull()) return Standard_False; @@ -1985,12 +2064,10 @@ Standard_Boolean ShapeUpgrade_UnifySameDomain::MergeSubSeq(const TopTools_Sequen Handle(Geom_TrimmedCurve)::DownCast(c3d2); c3d2 = tc->BasisCurve(); } - if( c3d1->IsKind(STANDARD_TYPE(Geom_Line)) && c3d2->IsKind(STANDARD_TYPE(Geom_Line)) ) { + if (IsLinear (aBAcurve1, aDir1) && IsLinear (aBAcurve2, aDir2)) { Handle(Geom_Line) L1 = Handle(Geom_Line)::DownCast(c3d1); Handle(Geom_Line) L2 = Handle(Geom_Line)::DownCast(c3d2); - gp_Dir Dir1 = L1->Position().Direction(); - gp_Dir Dir2 = L2->Position().Direction(); - if (!Dir1.IsParallel (Dir2, myAngTol)) + if (!aDir1.IsParallel (aDir2, myAngTol)) IsUnionOfLinesPossible = Standard_False; } else @@ -2245,8 +2322,11 @@ static Standard_Boolean IsMergingPossible(const TopoDS_Edge& edge1, const TopoDS return Standard_False; } - if( ( (t1 != GeomAbs_BezierCurve && t1 != GeomAbs_BSplineCurve) || - (t2 != GeomAbs_BezierCurve && t2 != GeomAbs_BSplineCurve)) && t1 != t2) + gp_Dir aDir1, aDir2; + if (!(IsLinear(ade1, aDir1) && IsLinear(ade2, aDir2)) && + ((t1 != GeomAbs_BezierCurve && t1 != GeomAbs_BSplineCurve) || + (t2 != GeomAbs_BezierCurve && t2 != GeomAbs_BSplineCurve)) && + t1 != t2) return Standard_False; gp_Vec Diff1, Diff2; @@ -3007,7 +3087,8 @@ void ShapeUpgrade_UnifySameDomain::IntUnifyFaces(const TopoDS_Shape& theInpShape TopExp::MapShapesAndUniqueAncestors(edges(ind), TopAbs_VERTEX, TopAbs_EDGE, VEmap); //Try to find seam edge and an edge that is not seam but has 2 pcurves on the surface - Standard_Boolean SeamFound = Standard_False; + Standard_Boolean SeamFound = Standard_False, + UseamFound = Standard_False, VseamFound = Standard_False; TopoDS_Edge EdgeWith2pcurves; for (Standard_Integer ii = 1; ii <= faces.Length(); ii++) { @@ -3020,12 +3101,18 @@ void ShapeUpgrade_UnifySameDomain::IntUnifyFaces(const TopoDS_Shape& theInpShape if (BRep_Tool::IsClosed (anEdge, face_ii)) { if (BRepTools::IsReallyClosed(anEdge, face_ii)) - SeamFound = Standard_True; + { + if (IsUiso (anEdge, face_ii)) + UseamFound = Standard_True; + else + VseamFound = Standard_True; + } else EdgeWith2pcurves = anEdge; } } } + SeamFound = UseamFound || VseamFound; Standard_Boolean aIsEdgeWith2pcurvesSmooth = Standard_False; if (myConcatBSplines && !EdgeWith2pcurves.IsNull() && !SeamFound) @@ -3103,86 +3190,100 @@ void ShapeUpgrade_UnifySameDomain::IntUnifyFaces(const TopoDS_Shape& theInpShape //Perform relocating to new U-origin //Define boundaries in 2d space of RefFace - if (Uperiod != 0.) - { - //if seam edge exists, do nothing - if (!SeamFound) + Standard_Real aPeriods [2] = {Uperiod, Vperiod}; + Standard_Boolean anIsSeamFound [2] = {UseamFound, VseamFound}; + Standard_Real aSurfMin [2], aSurfMax [2]; + aBaseSurface->Bounds (aSurfMin[0], aSurfMax[0], aSurfMin[1], aSurfMax[1]); + + for (Standard_Integer ii = 0; ii < 2; ii++) + if (aPeriods[ii] != 0.) { - //try to find the origin of U in 2d space - //so that all the faces are in [origin, origin + Uperiod] - Standard_Real Umax; - Standard_Integer i_face_max; - FindFaceWithMaxUbound(faces, F_RefFace, edgesMap, Umax, i_face_max); - - TopTools_MapOfShape UsedEdges; - NCollection_DataMap EdgeNewPCurve; - - //Relocate pcurves to new U-origin - RelocatePCurvesToNewUorigin(edges, faces(i_face_max), F_RefFace, CoordTol, Uperiod, - VEmap, EdgeNewPCurve, UsedEdges); - - //PCurves from unused edges (may be degenerated edges) - for (Standard_Integer ind = 1; ind <= edges.Length(); ind++) - { - const TopoDS_Edge& anEdge = TopoDS::Edge(edges(ind)); - if (!UsedEdges.Contains(anEdge)) - { - Standard_Real fpar, lpar; - Handle(Geom2d_Curve) aPCurve = BRep_Tool::CurveOnSurface(anEdge, F_RefFace, fpar, lpar); - aPCurve = new Geom2d_TrimmedCurve(aPCurve, fpar, lpar); - EdgeNewPCurve.Bind(anEdge, aPCurve); - } - } - - //Restore VEmap - VEmap.Clear(); - for (Standard_Integer ind = 1; ind <= edges.Length(); ind++) - TopExp::MapShapesAndUniqueAncestors(edges(ind), TopAbs_VERTEX, TopAbs_EDGE, VEmap); - - //Find NewUmin and NewUmax - Standard_Real NewUmin = RealLast(), NewUmax = RealFirst(); - for (Standard_Integer ii = 1; ii <= edges.Length(); ii++) + //if seam edge exists, do nothing + if (!anIsSeamFound[ii]) { - const Handle(Geom2d_Curve)& aPCurve = EdgeNewPCurve(edges(ii)); - UpdateBoundaries(aPCurve, aPCurve->FirstParameter(), aPCurve->LastParameter(), - NewUmin, NewUmax); - } - - if (NewUmax - NewUmin < Uperiod - CoordTol && - !(-Precision::Confusion() < NewUmin && NewUmin < Uperiod+Precision::Confusion() && - -Precision::Confusion() < NewUmax && NewUmax < Uperiod+Precision::Confusion())) - { - //we can build a face without seam edge: - //update the edges with earlier computed relocated pcurves - //fitting into (NewUorigin, NewUorigin + Uperiod) - Standard_Real umin, umax, vmin, vmax; - aBaseSurface->Bounds(umin, umax, vmin, vmax); - Standard_Real RestSpaceInU = Uperiod - (NewUmax - NewUmin); - Standard_Real NewUorigin = NewUmin - RestSpaceInU/2; - if (NewUorigin < umin) - NewUorigin = umin; - Handle(Geom_Surface) NewSurf; - if (NewUorigin == umin) - NewSurf = aBaseSurface; - else - NewSurf = new Geom_RectangularTrimmedSurface(aBaseSurface, - NewUorigin, NewUorigin + Uperiod, - Standard_True); //trim U - TopoDS_Face OldRefFace = RefFace; - Handle(Geom2d_Curve) NullPCurve; - RefFace.Nullify(); - BB.MakeFace(RefFace, NewSurf, aBaseLocation, 0.); - for (Standard_Integer ii = 1; ii <= edges.Length(); ii++) + //try to find the origin of U in 2d space + //so that all the faces are in [origin, origin + Uperiod] + Standard_Real aMinCoord, aMaxCoord; //Umin, Umax; + Standard_Integer aNumberOfIntervals, i_face_max; + FindCoordBounds (faces, F_RefFace, aMapEF, edgesMap, ii+1, aPeriods[ii], + aMinCoord, aMaxCoord, aNumberOfIntervals, i_face_max); + + if (aMaxCoord - aMinCoord > aPeriods[ii] - 1.e-5) + anIsSeamFound[ii] = Standard_True; + else if (aNumberOfIntervals == 2) { - TopoDS_Edge anEdge = TopoDS::Edge(edges(ii)); - if (MapEdgesWithTemporaryPCurves.Contains(anEdge)) - BB.UpdateEdge(anEdge, NullPCurve, OldRefFace, 0.); - const Handle(Geom2d_Curve)& aPCurve = EdgeNewPCurve(anEdge); - BB.UpdateEdge(anEdge, aPCurve, RefFace, 0.); - } - } - } //if (!SeamFound) - } //if (Uperiod != 0.) + TopTools_MapOfShape UsedEdges; + NCollection_DataMap EdgeNewPCurve; + + //Relocate pcurves to new U-origin + RelocatePCurvesToNewUorigin(edges, faces(i_face_max), F_RefFace, CoordTol, + ii+1, aPeriods[ii], + VEmap, EdgeNewPCurve, UsedEdges); + + //PCurves from unused edges (may be degenerated edges) + for (Standard_Integer ind = 1; ind <= edges.Length(); ind++) + { + const TopoDS_Edge& anEdge = TopoDS::Edge(edges(ind)); + if (!UsedEdges.Contains(anEdge)) + { + Standard_Real fpar, lpar; + Handle(Geom2d_Curve) aPCurve = BRep_Tool::CurveOnSurface(anEdge, F_RefFace, fpar, lpar); + aPCurve = new Geom2d_TrimmedCurve(aPCurve, fpar, lpar); + EdgeNewPCurve.Bind(anEdge, aPCurve); + } + } + + //Restore VEmap + VEmap.Clear(); + for (Standard_Integer ind = 1; ind <= edges.Length(); ind++) + TopExp::MapShapesAndUniqueAncestors(edges(ind), TopAbs_VERTEX, TopAbs_EDGE, VEmap); + + //Find NewUmin and NewUmax + Standard_Real NewCoordMin = RealLast(), NewCoordMax = RealFirst(); + for (Standard_Integer jj = 1; jj <= edges.Length(); jj++) + { + const Handle(Geom2d_Curve)& aPCurve = EdgeNewPCurve(edges(jj)); + UpdateBoundaries(aPCurve, aPCurve->FirstParameter(), aPCurve->LastParameter(), + ii+1, NewCoordMin, NewCoordMax); + } + + if (NewCoordMax - NewCoordMin < aPeriods[ii] - CoordTol && + !(-Precision::Confusion() < NewCoordMin && NewCoordMin < aPeriods[ii]+Precision::Confusion() && + -Precision::Confusion() < NewCoordMax && NewCoordMax < aPeriods[ii]+Precision::Confusion())) + { + //we can build a face without seam edge: + //update the edges with earlier computed relocated pcurves + //fitting into (NewUorigin, NewUorigin + Uperiod) + Standard_Real RestSpaceInCoord = aPeriods[ii] - (NewCoordMax - NewCoordMin); + Standard_Real NewCoordOrigin = NewCoordMin - RestSpaceInCoord/2; + if (NewCoordOrigin < aSurfMin[ii]) + NewCoordOrigin = aSurfMin[ii]; + Handle(Geom_Surface) NewSurf; + Standard_Boolean anIsInU = (ii == 0); + if (NewCoordOrigin == aSurfMin[ii]) + NewSurf = aBaseSurface; + else + NewSurf = new Geom_RectangularTrimmedSurface(aBaseSurface, + NewCoordOrigin, NewCoordOrigin + aPeriods[ii], + anIsInU); //trim in U or V + TopoDS_Face OldRefFace = RefFace; + Handle(Geom2d_Curve) NullPCurve; + RefFace.Nullify(); + BB.MakeFace(RefFace, NewSurf, aBaseLocation, 0.); + for (Standard_Integer jj = 1; jj <= edges.Length(); jj++) + { + TopoDS_Edge anEdge = TopoDS::Edge(edges(jj)); + if (MapEdgesWithTemporaryPCurves.Contains(anEdge)) + BB.UpdateEdge(anEdge, NullPCurve, OldRefFace, 0.); + const Handle(Geom2d_Curve)& aPCurve = EdgeNewPCurve(anEdge); + BB.UpdateEdge(anEdge, aPCurve, RefFace, 0.); + } + } + } //else (Umax - Umin < Uperiod - 1.e-5, no Useam) + } //if (!UseamFound) + } //if (Uperiod != 0.) + UseamFound = anIsSeamFound[0]; + VseamFound = anIsSeamFound[1]; //////////////////////////////////// F_RefFace = RefFace; F_RefFace.Orientation(TopAbs_FORWARD); @@ -3267,35 +3368,25 @@ void ShapeUpgrade_UnifySameDomain::IntUnifyFaces(const TopoDS_Shape& theInpShape { TopoDS_Edge NextEdge; gp_Pnt2d NextPoint; - - const TopTools_ListOfShape& Elist = VEmap.FindFromKey(CurVertex); + + TopTools_ListOfShape Elist; + //const TopTools_ListOfShape& Elist = VEmap.FindFromKey(CurVertex); + if (VEmap.Contains (CurVertex)) + Elist = VEmap.FindFromKey(CurVertex); TopTools_ListIteratorOfListOfShape itl(Elist); if (Elist.IsEmpty()) { if (CurVertex.IsSame(StartVertex)) { //Points of two vertices coincide in 3d but may be not in 2d - if (Uperiod != 0. && - Abs(StartPoint.X() - CurPoint.X()) > Uperiod/2) //end of parametric space - { - // do not contain seams => we must reconstruct the seam up to - gp_Pnt2d StartOfNextEdge; - TopoDS_Vertex LastVertexOfSeam; - ReconstructMissedSeam(edges, RemovedEdges, UsedEdges, F_RefFace, CurVertex, - CurPoint, Uperiod, FaceUmin, Standard_True, CoordTol, - NextEdge, aNewWire, NextPoint, - StartOfNextEdge, LastVertexOfSeam, VEmap); - } - else if (Vperiod != 0. && - Abs(StartPoint.Y() - CurPoint.Y()) > Vperiod/2) //end of parametric space + if ((Uperiod != 0. && Abs(StartPoint.X() - CurPoint.X()) > Uperiod/2) || + (Vperiod != 0. && Abs(StartPoint.Y() - CurPoint.Y()) > Vperiod/2)) //end of parametric space { // do not contain seams => we must reconstruct the seam up to gp_Pnt2d StartOfNextEdge; TopoDS_Vertex LastVertexOfSeam; - ReconstructMissedSeam(edges, RemovedEdges, UsedEdges, F_RefFace, CurVertex, - CurPoint, Vperiod, FaceVmin, Standard_False, CoordTol, - NextEdge, aNewWire, NextPoint, - StartOfNextEdge, LastVertexOfSeam, VEmap); + ReconstructMissedSeam (RemovedEdges, F_RefFace, CurEdge, CurVertex, CurPoint, + Uperiod, Vperiod, NextEdge, NextPoint); } else { @@ -3378,40 +3469,22 @@ void ShapeUpgrade_UnifySameDomain::IntUnifyFaces(const TopoDS_Shape& theInpShape DiffV > CoordTol && Abs(DiffV - Vperiod) > CoordTol) //may be it is a deg.vertex continue; - + //Check: may be and are on Period from each other - if (Uperiod != 0. && DiffU > Uperiod/2) //end of parametric space + if ((Uperiod != 0. && DiffU > Uperiod/2) || + (Vperiod != 0. && DiffV > Vperiod/2)) //end of parametric space { // do not contain seams => we must reconstruct the seam up to gp_Pnt2d StartOfNextEdge; TopoDS_Vertex LastVertexOfSeam; - ReconstructMissedSeam(edges, RemovedEdges, UsedEdges, F_RefFace, CurVertex, - CurPoint, Uperiod, FaceUmin, Standard_True, CoordTol, - NextEdge, aNewWire, NextPoint, - StartOfNextEdge, LastVertexOfSeam, VEmap); + ReconstructMissedSeam (RemovedEdges, F_RefFace, CurEdge, CurVertex, CurPoint, + Uperiod, Vperiod, NextEdge, NextPoint); //Check: may be it is the end if (LastVertexOfSeam.IsSame(StartVertex) && Abs(StartPoint.X() - StartOfNextEdge.X()) < Uperiod/2) EndOfWire = Standard_True; - break; - } //if (Uperiod != 0. && Abs(aPoint.X() - CurPoint.X()) > Uperiod/2) - else if (Vperiod != 0. && DiffV > Vperiod/2) //end of parametric space - { - // do not contain seams => we must reconstruct the seam up to - gp_Pnt2d StartOfNextEdge; - TopoDS_Vertex LastVertexOfSeam; - ReconstructMissedSeam(edges, RemovedEdges, UsedEdges, F_RefFace, CurVertex, - CurPoint, Vperiod, FaceVmin, Standard_False, CoordTol, - NextEdge, aNewWire, NextPoint, - StartOfNextEdge, LastVertexOfSeam, VEmap); - - //Check: may be it is the end - if (LastVertexOfSeam.IsSame(StartVertex) && - Abs(StartPoint.Y() - StartOfNextEdge.Y()) < Vperiod/2) - EndOfWire = Standard_True; - break; } else @@ -3429,19 +3502,27 @@ void ShapeUpgrade_UnifySameDomain::IntUnifyFaces(const TopoDS_Shape& theInpShape if (NextEdge.IsNull()) { - //throw Standard_ConstructionError("Construction of unified wire failed: no proper edge found"); - return; - } - else - { - CurPoint = NextPoint; - CurEdge = NextEdge; - CurVertex = TopExp::LastVertex(CurEdge, Standard_True); //with orientation - BB.Add(aNewWire, CurEdge); - UsedEdges.Add(CurEdge); - RemoveEdgeFromMap(CurEdge, VEmap); + if (Uperiod != 0. || Vperiod != 0.) + { + if (CurVertex.IsSame(StartVertex) && + (Uperiod == 0. || Abs(StartPoint.X() - CurPoint.X()) < Uperiod/2) && + (Vperiod == 0. || Abs(StartPoint.Y() - CurPoint.Y()) < Vperiod/2)) + break; //end of wire + + ReconstructMissedSeam (RemovedEdges, F_RefFace, CurEdge, CurVertex, CurPoint, + Uperiod, Vperiod, NextEdge, NextPoint); + } + else + return; } + CurPoint = NextPoint; + CurEdge = NextEdge; + CurVertex = TopExp::LastVertex(CurEdge, Standard_True); //with orientation + BB.Add(aNewWire, CurEdge); + UsedEdges.Add(CurEdge); + RemoveEdgeFromMap(CurEdge, VEmap); } //for (;;) + aNewWire.Closed(Standard_True); UsedEdges.Add(StartEdge); diff --git a/tests/bugs/heal/bug27894 b/tests/bugs/heal/bug27894 index fe1d1c4fd9..447bd9d764 100644 --- a/tests/bugs/heal/bug27894 +++ b/tests/bugs/heal/bug27894 @@ -10,7 +10,7 @@ stepread [locate_data_file bug27894_usd_raises_Standard_NullObject.stp] a * renamevar a_1 a unifysamedom result a -checknbshapes result -m UnifySameDomain -face 12 -edge 29 +checknbshapes result -m UnifySameDomain -face 12 -edge 30 checkshape result diff --git a/tests/bugs/heal/bug32213 b/tests/bugs/heal/bug32213 index 36109b740a..096b27df1d 100644 --- a/tests/bugs/heal/bug32213 +++ b/tests/bugs/heal/bug32213 @@ -9,7 +9,7 @@ unifysamedom result a checkshape result -checknbshapes result -solid 1 -shell 1 -face 21 -wire 22 -edge 58 -vertex 38 +checknbshapes result -solid 1 -shell 1 -face 21 -wire 22 -edge 57 -vertex 37 set tolres [checkmaxtol result] diff --git a/tests/bugs/heal/bug33006 b/tests/bugs/heal/bug33006 new file mode 100644 index 0000000000..082070596d --- /dev/null +++ b/tests/bugs/heal/bug33006 @@ -0,0 +1,22 @@ +puts "=========================================" +puts "OCC33006: UnifySameDomain raises exceptio" +puts "=========================================" +puts "" + +restore [locate_data_file bug33006.brep] a + +unifysamedom result a + +checkshape result + +checknbshapes result -t -solid 1 -shell 1 -face 3 -wire 4 -edge 11 -vertex 4 + +set tolres [checkmaxtol result] + +if { ${tolres} > 0.004416} { + puts "Error: bad tolerance of result" +} + +checkprops result -s 77917.5 -v 195647 + +checkview -display result -2d -path ${imagedir}/${test_image}.png \ No newline at end of file diff --git a/tests/heal/unify_same_domain/A9 b/tests/heal/unify_same_domain/A9 index 61e9b734cd..790ba3185f 100644 --- a/tests/heal/unify_same_domain/A9 +++ b/tests/heal/unify_same_domain/A9 @@ -1,5 +1,3 @@ -puts "TODO OCC29040 ALL: Error: the history of the removed edges is incorrect" - puts "=======" puts "0028913" puts "=======" diff --git a/tests/heal/unify_same_domain/B1 b/tests/heal/unify_same_domain/B1 index 3bb0f8cfe9..4cb20a25f9 100644 --- a/tests/heal/unify_same_domain/B1 +++ b/tests/heal/unify_same_domain/B1 @@ -1,5 +1,3 @@ -puts "TODO OCC29040 ALL: Error: the history of the removed edges is incorrect" - puts "=======" puts "0028913" puts "=======" From 6072d3093c49abce097feaaa7c602dd27892550b Mon Sep 17 00:00:00 2001 From: ngavrilo Date: Thu, 14 Jul 2022 16:53:58 +0300 Subject: [PATCH 352/639] 0032992: Visualization - Font_TextFormatter should wrap words when possible --- src/Font/Font_TextFormatter.cxx | 22 ++++++++++++++++++- src/Font/Font_TextFormatter.hxx | 15 +++++++++++++ src/ViewerTest/ViewerTest_ObjectCommands.cxx | 6 +++++ tests/opengl/data/text/text_wrapped | 23 ++++++++++++++------ 4 files changed, 58 insertions(+), 8 deletions(-) diff --git a/src/Font/Font_TextFormatter.cxx b/src/Font/Font_TextFormatter.cxx index eddc4bc83e..e8d2d6b2f4 100644 --- a/src/Font/Font_TextFormatter.cxx +++ b/src/Font/Font_TextFormatter.cxx @@ -60,6 +60,7 @@ Font_TextFormatter::Font_TextFormatter() myAlignY (Graphic3d_VTA_TOP), myTabSize (8), myWrappingWidth (0.0f), + myIsWordWrapping (true), myLastSymbolWidth (0.0f), myMaxSymbolWidth (0.0f), // @@ -249,6 +250,7 @@ void Font_TextFormatter::Format() } } + Standard_Utf32Char aCharPrev = 0; for (Font_TextFormatter::Iterator aFormatterIt(*this); aFormatterIt.More(); aFormatterIt.Next()) { @@ -269,12 +271,30 @@ void Font_TextFormatter::Format() Font_Rect aBndBox; GlyphBoundingBox (aRectIter, aBndBox); const Standard_ShortReal aNextXPos = aBndBox.Right - BottomLeft (aFirstCornerId).x(); - if (aNextXPos > aMaxLineWidth) // wrap the line and do processing of the symbol + Standard_Boolean isCurWordFits = true; + if(myIsWordWrapping && IsSeparatorSymbol(aCharPrev)) + { + for (Font_TextFormatter::Iterator aWordIt = aFormatterIt; aWordIt.More(); aWordIt.Next()) + { + if (IsSeparatorSymbol(aWordIt.Symbol())) + { + break; + } + float aWordWidthPx = myCorners[aWordIt.SymbolPosition()].x() - myCorners[aRectIter].x(); + if (aNextXPos + aWordWidthPx > aMaxLineWidth) + { + isCurWordFits = false; + break; + } + } + } + if (aNextXPos > aMaxLineWidth || !isCurWordFits) // wrap the line and do processing of the symbol { const Standard_Integer aLastRect = aRectIter - 1; // last rect on current line newLine (aLastRect, aMaxLineWidth); } } + aCharPrev = aCharThis; } myBndWidth = aMaxLineWidth; diff --git a/src/Font/Font_TextFormatter.hxx b/src/Font/Font_TextFormatter.hxx index 1d917f22bb..5ef5d0aeae 100755 --- a/src/Font/Font_TextFormatter.hxx +++ b/src/Font/Font_TextFormatter.hxx @@ -220,6 +220,12 @@ public: //! Returns text maximum width, zero means that the text is not bounded by width Standard_ShortReal Wrapping() const { return myWrappingWidth; } + //! returns TRUE when trying not to break words when wrapping text + Standard_Boolean WordWrapping () const { return myIsWordWrapping; } + + //! returns TRUE when trying not to break words when wrapping text + void SetWordWrapping (const Standard_Boolean theIsWordWrapping) { myIsWordWrapping = theIsWordWrapping; } + //! @return width of formatted text. inline Standard_ShortReal ResultWidth() const { @@ -274,6 +280,14 @@ public: return Standard_False; } + //! Returns true if the symbol separates words when wrapping is enabled + static Standard_Boolean IsSeparatorSymbol (const Standard_Utf32Char& theSymbol) + { + return theSymbol == '\x0A' // new line + || theSymbol == ' ' // space + || theSymbol == '\x09'; // tab + } + DEFINE_STANDARD_RTTIEXT (Font_TextFormatter, Standard_Transient) protected: //! @name class auxiliary methods @@ -288,6 +302,7 @@ protected: //! @name configuration Graphic3d_VerticalTextAlignment myAlignY; //!< vertical alignment style Standard_Integer myTabSize; //!< horizontal tabulation width (number of space symbols) Standard_ShortReal myWrappingWidth; //!< text is wrapped by the width if defined (more 0) + Standard_Boolean myIsWordWrapping; //!< if TRUE try not to break words when wrapping text (true by default) Standard_ShortReal myLastSymbolWidth; //!< width of the last symbol Standard_ShortReal myMaxSymbolWidth; //!< maximum symbol width of the formatter string diff --git a/src/ViewerTest/ViewerTest_ObjectCommands.cxx b/src/ViewerTest/ViewerTest_ObjectCommands.cxx index d2f9763539..98ae2e622a 100644 --- a/src/ViewerTest/ViewerTest_ObjectCommands.cxx +++ b/src/ViewerTest/ViewerTest_ObjectCommands.cxx @@ -2500,6 +2500,11 @@ static int VDrawText (Draw_Interpretor& theDI, } aTextFormatter->SetWrapping ((Standard_ShortReal)Draw::Atof(theArgVec[++anArgIt])); } + else if (aParam == "-wordwrapping") + { + const bool isWordWrapping = Draw::ParseOnOffNoIterator(theArgsNb, theArgVec, anArgIt); + aTextFormatter->SetWordWrapping(isWordWrapping); + } else if (aParam == "-aspect" && anArgIt + 1 < theArgsNb) { @@ -6925,6 +6930,7 @@ vdrawtext name text [-zoom {0|1}]=0 [-height height]=16 [-wrapping width]=40 + [-wordwrapping {0|1}]=1 [-aspect {regular|bold|italic|boldItalic}]=regular [-font font]=Times [-2d] [-perspos {X Y Z}]={0 0 0} diff --git a/tests/opengl/data/text/text_wrapped b/tests/opengl/data/text/text_wrapped index 3063a2e1be..9117431357 100644 --- a/tests/opengl/data/text/text_wrapped +++ b/tests/opengl/data/text/text_wrapped @@ -4,21 +4,30 @@ puts "" puts "===========" pload MODELING VISUALIZATION -vinit View1 +vinit View1 -width 500 vclear vaxo -box b1 10 0 360 10 180 40 +box b1 10 0 460 10 180 40 vdisplay b1 -vdrawtext t1 "Top text on plane yOz\n(not wrapped)" -pos 10 5 400 -color green -plane 1 0 0 0 1 0 -valign top -font SansFont -zoom 1 +vdrawtext t1 "Top text on plane yOz\n(not wrapped)" -pos 10 5 500 -color green -plane 1 0 0 0 1 0 -valign top -font SansFont -zoom 1 -box b2 10 0 240 10 130 60 +box b2 10 0 340 10 130 60 vdisplay b2 -vdrawtext t2 "Top text on plane yOz\n(wrapping=120)" -pos 10 5 300 -color green -wrapping 120 -plane 1 0 0 0 1 0 -valign top -font SansFont -zoom 1 +vdrawtext t2 "Top text on plane yOz\n(wrapping=120)" -pos 10 5 400 -color green -wrapping 120 -plane 1 0 0 0 1 0 -valign top -font SansFont -zoom 1 -box b3 10 0 60 10 60 150 +box b3 10 0 160 10 60 150 vdisplay b3 -vdrawtext t3 "Top text on plane yOz\n(wrapping=50)" -pos 10 5 200 -color green -wrapping 50 -plane 1 0 0 0 1 0 -valign top -font SansFont -zoom 1 +vdrawtext t3 "Top text on plane yOz\n(wrapping=50)" -pos 10 5 300 -color green -wrapping 50 -plane 1 0 0 0 1 0 -valign top -font SansFont -zoom 1 + +box b4 10 200 400 10 130 100 +vdisplay b4 +vdrawtext t4 "Top text on plane yOz\n(wrapping=120, word wrapping disabled)" -pos 10 205 500 -color green -wrapping 120 -plane 1 0 0 0 1 0 -valign top -font SansFont -zoom 1 -wordwrapping 0 + +box b5 10 200 160 10 60 200 +vdisplay b5 +vdrawtext t5 "Top text on plane yOz\n(wrapping=50, word wrapping disabled)" -pos 10 205 350 -color green -wrapping 50 -plane 1 0 0 0 1 0 -valign top -font SansFont -zoom 1 -wordwrapping 0 + vright vfit From 81d569625e986cb41bc1e6e1ce1424cfabf420ff Mon Sep 17 00:00:00 2001 From: mzernova Date: Wed, 3 Aug 2022 12:46:53 +0300 Subject: [PATCH 353/639] 0033084: Visualization - Cylindrical prism is selectable only by its base when extruded in some directions Fixed bounding boxes for Select3D_SensitiveCylinder. Added display of Select3D_SensitiveCylinder presentation using the "vsensdis" command. Added test vselect/bugs/bug33084. --- src/Select3D/Select3D_SensitiveCylinder.cxx | 19 ++++---- src/Select3D/Select3D_SensitiveCylinder.hxx | 12 ++++++ src/SelectMgr/SelectMgr.cxx | 43 +++++++++++++++++++ src/StdSelect/StdSelect_BRepSelectionTool.cxx | 14 ++++-- tests/vselect/bugs/bug33084 | 26 +++++++++++ 5 files changed, 100 insertions(+), 14 deletions(-) create mode 100644 tests/vselect/bugs/bug33084 diff --git a/src/Select3D/Select3D_SensitiveCylinder.cxx b/src/Select3D/Select3D_SensitiveCylinder.cxx index 62fe013b25..6c2ebf181e 100644 --- a/src/Select3D/Select3D_SensitiveCylinder.cxx +++ b/src/Select3D/Select3D_SensitiveCylinder.cxx @@ -81,17 +81,14 @@ Handle(Select3D_SensitiveEntity) Select3D_SensitiveCylinder::GetConnected() Select3D_BndBox3d Select3D_SensitiveCylinder::BoundingBox() { Standard_Real aMaxRad = Max (myBottomRadius, myTopRadius); - gp_Pnt aCenterBottom (0, 0, 0); - gp_Pnt aCenterTop (0, 0, myHeight); - aCenterBottom.Transform (myTrsf); - aCenterTop.Transform (myTrsf); - const SelectMgr_Vec3 aMinPnt (Min (aCenterBottom.X(), aCenterTop.X()) - aMaxRad, - Min (aCenterBottom.Y(), aCenterTop.Y()) - aMaxRad, - Min (aCenterBottom.Z(), aCenterTop.Z()) - aMaxRad); - const SelectMgr_Vec3 aMaxPnt (Max (aCenterBottom.X(), aCenterTop.X()) + aMaxRad, - Max (aCenterBottom.Y(), aCenterTop.Y()) + aMaxRad, - Max (aCenterBottom.Z(), aCenterTop.Z()) + aMaxRad); - return Select3D_BndBox3d (aMinPnt, aMaxPnt); + Graphic3d_Mat4d aTrsf; + myTrsf.GetMat4 (aTrsf); + + Select3D_BndBox3d aBox (SelectMgr_Vec3 (-aMaxRad, -aMaxRad, 0), + SelectMgr_Vec3 (aMaxRad, aMaxRad, myHeight)); + aBox.Transform (aTrsf); + + return aBox; } //================================================== diff --git a/src/Select3D/Select3D_SensitiveCylinder.hxx b/src/Select3D/Select3D_SensitiveCylinder.hxx index 533341ee54..7a963e224a 100644 --- a/src/Select3D/Select3D_SensitiveCylinder.hxx +++ b/src/Select3D/Select3D_SensitiveCylinder.hxx @@ -54,6 +54,18 @@ public: //! Returns center of the cylinder with transformation applied Standard_EXPORT virtual gp_Pnt CenterOfGeometry() const Standard_OVERRIDE; + //! Returns cylinder transformation + const gp_Trsf& Transformation() const { return myTrsf; } + + //! Returns cylinder top radius + Standard_Real TopRadius() const { return myTopRadius; } + + //! Returns cylinder bottom radius + Standard_Real BottomRadius() const { return myBottomRadius; } + + //! Returns cylinder height + Standard_Real Height() const { return myHeight; } + protected: gp_Trsf myTrsf; //!< cylinder transformation to apply Standard_Real myBottomRadius; //!< cylinder bottom radius diff --git a/src/SelectMgr/SelectMgr.cxx b/src/SelectMgr/SelectMgr.cxx index a6134b4508..b0999fae33 100644 --- a/src/SelectMgr/SelectMgr.cxx +++ b/src/SelectMgr/SelectMgr.cxx @@ -13,6 +13,7 @@ #include +#include #include #include #include @@ -22,6 +23,7 @@ #include #include #include +#include #include #include #include @@ -130,6 +132,43 @@ namespace theSeqLines.Append (aPoints); } } + + //! Fill in cylinder polylines. + static void addCylinder (Prs3d_NListOfSequenceOfPnt& theSeqLines, + const Handle(Select3D_SensitiveCylinder)& theSensCyl) + { + Handle(TColgp_HSequenceOfPnt) aVertLines[2]; + aVertLines[0] = new TColgp_HSequenceOfPnt(); + aVertLines[1] = new TColgp_HSequenceOfPnt(); + const gp_Trsf& aTrsf = theSensCyl->Transformation(); + const Standard_Real aHeight = theSensCyl->Height(); + const Standard_Real anUStep = 0.1; + + for (int aCircNum = 0; aCircNum < 3; aCircNum++) + { + Standard_Real aRadius = 0.5 * (2 - aCircNum) * theSensCyl->BottomRadius() + + 0.5 * aCircNum * theSensCyl->TopRadius(); + Geom_Circle aGeom (gp_Ax2(), aRadius); + Handle(TColgp_HSequenceOfPnt) aPoints = new TColgp_HSequenceOfPnt(); + gp_XYZ aVec (0, 0, aHeight * 0.5 * aCircNum); + + if (aCircNum != 1) + { + aVertLines[0]->Append (gp_Pnt(aGeom.Value (0).Coord() + aVec).Transformed (aTrsf)); + aVertLines[1]->Append (gp_Pnt(aGeom.Value (M_PI).Coord() + aVec).Transformed (aTrsf)); + } + + for (Standard_Real anU = 0.0f; anU < (2.0 * M_PI + anUStep); anU += anUStep) + { + gp_Pnt aCircPnt = aGeom.Value (anU).Coord() + aVec; + aCircPnt.Transform (aTrsf); + aPoints->Append (aCircPnt); + } + theSeqLines.Append (aPoints); + } + theSeqLines.Append (aVertLines[0]); + theSeqLines.Append (aVertLines[1]); + } } //======================================================================= @@ -152,6 +191,10 @@ void SelectMgr::ComputeSensitivePrs (const Handle(Graphic3d_Structure)& thePrs, { addBoundingBox (aSeqLines, aSensBox, theLoc); } + else if (Handle(Select3D_SensitiveCylinder) aSensCyl = Handle(Select3D_SensitiveCylinder)::DownCast (anEnt)) + { + addCylinder (aSeqLines, aSensCyl); + } else if (Handle(Select3D_SensitiveFace) aFace = Handle(Select3D_SensitiveFace)::DownCast(anEnt)) { Handle(TColgp_HArray1OfPnt) aSensPnts; diff --git a/src/StdSelect/StdSelect_BRepSelectionTool.cxx b/src/StdSelect/StdSelect_BRepSelectionTool.cxx index 630d328d91..36e5ce9fca 100644 --- a/src/StdSelect/StdSelect_BRepSelectionTool.cxx +++ b/src/StdSelect/StdSelect_BRepSelectionTool.cxx @@ -390,15 +390,23 @@ void StdSelect_BRepSelectionTool::ComputeSensitive (const TopoDS_Shape& theShape { if (!aGeomPlanes[0].IsNull() && !aGeomPlanes[1].IsNull() - && aGeomPlanes[0]->Position().Direction().IsEqual (aGeomCyl->Position().Direction(), Precision::Angular()) - && aGeomPlanes[1]->Position().Direction().IsEqual (aGeomCyl->Position().Direction(), Precision::Angular())) + && aGeomPlanes[0]->Position().Direction().IsParallel (aGeomCyl->Position().Direction(), Precision::Angular()) + && aGeomPlanes[1]->Position().Direction().IsParallel (aGeomCyl->Position().Direction(), Precision::Angular())) { const gp_Cylinder aCyl = BRepAdaptor_Surface (*aFaces[aConIndex]).Cylinder(); const Standard_Real aRad = aCyl.Radius(); const Standard_Real aHeight = aGeomPlanes[0]->Location().Transformed (*aGeomPlanesLoc[0]) .Distance (aGeomPlanes[1]->Location().Transformed (*aGeomPlanesLoc[1])); + gp_Trsf aTrsf; - aTrsf.SetTransformation (aCyl.Position(), gp_Ax3()); + gp_Ax3 aPos = aCyl.Position(); + if (aGeomPlanes[0]->Position().IsCoplanar (aGeomPlanes[1]->Position(), Precision::Angular(), Precision::Angular())) + { + // cylinders created as a prism have an inverse vector of the cylindrical surface + aPos.SetDirection (aPos.Direction().Reversed()); + } + aTrsf.SetTransformation (aPos, gp_Ax3()); + Handle(Select3D_SensitiveCylinder) aSensSCyl = new Select3D_SensitiveCylinder (theOwner, aRad, aRad, aHeight, aTrsf); theSelection->Add (aSensSCyl); break; diff --git a/tests/vselect/bugs/bug33084 b/tests/vselect/bugs/bug33084 new file mode 100644 index 0000000000..c047df260a --- /dev/null +++ b/tests/vselect/bugs/bug33084 @@ -0,0 +1,26 @@ +puts "=============" +puts "0033084: Visualization - Cylindrical prism is selectable only by its base when extruded in some directions" +puts "=============" + +pload MODELING VISUALIZATION +profile p1 c 1 360 ww +mkplane f p1 +prism pr1 f 0 0 2 +prism pr2 f 0 0 -2 +ttranslate pr1 1 1 1 +ttranslate pr2 -1 -1 -1 + +vinit View1 +vclear +vaxo +vdisplay -dispmode 1 pr1 pr2 +vfit +vsensdis + +vdump $imagedir/${casename}_prism_sensitive_prs.png + +vmoveto 130 330 +if { ![string match "*Select3D_SensitiveCylinder*" [vstate -entities]] } { puts "Error: cylinder should be detected" } + +vmoveto 270 130 +if { ![string match "*Select3D_SensitiveCylinder*" [vstate -entities]] } { puts "Error: cylinder should be detected" } From 621ed3bc362bbb1685004abe24ba56523697e50d Mon Sep 17 00:00:00 2001 From: dpasukhi Date: Wed, 10 Aug 2022 15:17:13 +0300 Subject: [PATCH 354/639] 0033095: Data Exchange, Step Import - Wrong PMI values when loading a *.stp file in m Fixed problem with dimension tolerance values (upper/lower) - Update supported type for tolerance measure unit, now we can handle base class --- src/STEPCAFControl/STEPCAFControl_Reader.cxx | 31 +++++++------ tests/bugs/step/bug33095 | 32 +++++++++++++ tests/gdt/import/A3 | 48 ++++++++++---------- tests/gdt/import/A5 | 8 ++-- 4 files changed, 76 insertions(+), 43 deletions(-) create mode 100644 tests/bugs/step/bug33095 diff --git a/src/STEPCAFControl/STEPCAFControl_Reader.cxx b/src/STEPCAFControl/STEPCAFControl_Reader.cxx index cdefa06fa7..04fc8af7d3 100644 --- a/src/STEPCAFControl/STEPCAFControl_Reader.cxx +++ b/src/STEPCAFControl/STEPCAFControl_Reader.cxx @@ -3365,17 +3365,17 @@ static void setDimObjectToXCAF(const Handle(Standard_Transient)& theEnt, if (anUnit.IsNull()) continue; if (!(anUnit.CaseNum(anUnit.Value()) == 1)) continue; Handle(StepBasic_NamedUnit) NU = anUnit.NamedUnit(); - STEPConstruct_UnitContext anUnitCtx; - anUnitCtx.ComputeFactors(NU); - if (aMWU->IsKind(STANDARD_TYPE(StepBasic_LengthMeasureWithUnit)) || - aMWU->IsKind(STANDARD_TYPE(StepRepr_ReprItemAndLengthMeasureWithUnitAndQRI))) + STEPConstruct_UnitContext anUnitCtxUpperBound; + anUnitCtxUpperBound.ComputeFactors(NU); + if (aMWU->IsKind(STANDARD_TYPE(StepBasic_PlaneAngleMeasureWithUnit)) || + aMWU->IsKind(STANDARD_TYPE(StepRepr_ReprItemAndPlaneAngleMeasureWithUnitAndQRI))) { - aVal = aVal * anUnitCtx.LengthFactor(); + convertAngleValue(anUnitCtxUpperBound, aVal); } - else if (aMWU->IsKind(STANDARD_TYPE(StepBasic_PlaneAngleMeasureWithUnit)) || - aMWU->IsKind(STANDARD_TYPE(StepRepr_ReprItemAndPlaneAngleMeasureWithUnitAndQRI))) + else if ((aMWU->IsKind(STANDARD_TYPE(StepBasic_MeasureWithUnit)) && anUnitCtxUpperBound.LengthFactor() > 0.) || + aMWU->IsKind(STANDARD_TYPE(StepRepr_ReprItemAndLengthMeasureWithUnitAndQRI))) { - convertAngleValue(anUnitCtx, aVal); + aVal = aVal * anUnitCtxUpperBound.LengthFactor(); } aDim3 = aVal; @@ -3401,16 +3401,17 @@ static void setDimObjectToXCAF(const Handle(Standard_Transient)& theEnt, if (anUnit.IsNull()) continue; if (!(anUnit.CaseNum(anUnit.Value()) == 1)) continue; NU = anUnit.NamedUnit(); - anUnitCtx.ComputeFactors(NU); - if (aMWU->IsKind(STANDARD_TYPE(StepBasic_LengthMeasureWithUnit)) || - aMWU->IsKind(STANDARD_TYPE(StepRepr_ReprItemAndLengthMeasureWithUnitAndQRI))) + STEPConstruct_UnitContext anUnitCtxLowerBound; + anUnitCtxLowerBound.ComputeFactors(NU); + if (aMWU->IsKind(STANDARD_TYPE(StepBasic_PlaneAngleMeasureWithUnit)) || + aMWU->IsKind(STANDARD_TYPE(StepRepr_ReprItemAndPlaneAngleMeasureWithUnitAndQRI))) { - aVal = aVal * anUnitCtx.LengthFactor(); + convertAngleValue(anUnitCtxLowerBound, aVal); } - else if (aMWU->IsKind(STANDARD_TYPE(StepBasic_PlaneAngleMeasureWithUnit)) || - aMWU->IsKind(STANDARD_TYPE(StepRepr_ReprItemAndPlaneAngleMeasureWithUnitAndQRI))) + else if ((aMWU->IsKind(STANDARD_TYPE(StepBasic_MeasureWithUnit)) && anUnitCtxLowerBound.LengthFactor() > 0.) || + aMWU->IsKind(STANDARD_TYPE(StepRepr_ReprItemAndLengthMeasureWithUnitAndQRI))) { - convertAngleValue(anUnitCtx, aVal); + aVal = aVal * anUnitCtxLowerBound.LengthFactor(); } aDim2 = Abs(aVal); } diff --git a/tests/bugs/step/bug33095 b/tests/bugs/step/bug33095 new file mode 100644 index 0000000000..269189c7ee --- /dev/null +++ b/tests/bugs/step/bug33095 @@ -0,0 +1,32 @@ +puts "=======" +puts "0033095: Data Exchange, Step Import - Wrong PMI values when loading a *.stp file in m" +puts "=======" + +pload OCAF + +catch { Close D_mm } +catch { Close D_m } + +# Read file in mm +ReadStep D_mm [locate_data_file bug33095_cad_with_pmi.stp] +set plusMinusTol_mm [XGetDimensionPlusMinusTol D_mm 0:1:4:77] + +# Read file in m +XNewDoc D_m +XSetLengthUnit D_m m +ReadStep D_m [locate_data_file bug33095_cad_with_pmi.stp] +set plusMinusTol_m [XGetDimensionPlusMinusTol D_m 0:1:4:77] + +# Checking +regexp {lower +([-0-9.+eE]+) +upper +([-0-9.+eE]+)} $plusMinusTol_m full lower_m upper_m +regexp {lower +([-0-9.+eE]+) +upper +([-0-9.+eE]+)} $plusMinusTol_mm full lower_mm upper_mm + +set lower_m_to_mm [expr {$lower_m * 1000}] +set upper_m_to_mm [expr {$upper_m * 1000}] + +if {[expr {abs($lower_m_to_mm - $lower_mm)}] > 1e-2} { + puts "Error: incorrect scaling lower toleranse value" +} +if {[expr {abs($upper_m_to_mm - $upper_mm)}] > 1e-2} { + puts "Error: incorrect scaling upper toleranse value" +} diff --git a/tests/gdt/import/A3 b/tests/gdt/import/A3 index e222d568eb..8274c76b3d 100644 --- a/tests/gdt/import/A3 +++ b/tests/gdt/import/A3 @@ -12,45 +12,45 @@ set ref_data { 0:1:1:2:2 Shape.5 0:1:4:1 GeomTolerance.5.1 ( N "Feature Control Frame (4)" T 12 TV 0, V 0.254 ) 0:1:1:2:7 Shape.10 - 0:1:4:6 Dimension.10.1 ( N "linear distance" T 2, V 20.827999999999996, VL 2.54, VU 2.54, P 0 ) + 0:1:4:6 Dimension.10.1 ( N "linear distance" T 2, V 20.827999999999996, VL 64.515999999999991, VU 64.515999999999991, P 0 ) 0:1:1:2:19 Shape.22 - 0:1:4:39 Dimension.22.1 ( N "diameter" T 15, V 11.1252, VL 2.54, VU 2.54, P 0 ) + 0:1:4:39 Dimension.22.1 ( N "diameter" T 15, V 11.1252, VL 64.515999999999991, VU 64.515999999999991, P 0 ) 0:1:4:35 GeomTolerance.22.1 ( N "Feature Control Frame (40)" T 10 TV 1, V 1.27, MR 1 ) 0:1:4:36 Datum.22.1.1 ( N "Feature Control Frame (40)" ) 0:1:4:37 Datum.22.1.2 ( N "Feature Control Frame (40)", M 15 ) 0:1:4:38 Datum.22.1.3 ( N "Feature Control Frame (40)", M 15 ) 0:1:1:2:20 Shape.23 - 0:1:4:39 Dimension.23.1 ( N "diameter" T 15, V 11.1252, VL 2.54, VU 2.54, P 0 ) + 0:1:4:39 Dimension.23.1 ( N "diameter" T 15, V 11.1252, VL 64.515999999999991, VU 64.515999999999991, P 0 ) 0:1:4:35 GeomTolerance.23.1 ( N "Feature Control Frame (40)" T 10 TV 1, V 1.27, MR 1 ) 0:1:4:36 Datum.23.1.1 ( N "Feature Control Frame (40)" ) 0:1:4:37 Datum.23.1.2 ( N "Feature Control Frame (40)", M 15 ) 0:1:4:38 Datum.23.1.3 ( N "Feature Control Frame (40)", M 15 ) 0:1:1:2:21 Shape.24 - 0:1:4:39 Dimension.24.1 ( N "diameter" T 15, V 11.1252, VL 2.54, VU 2.54, P 0 ) + 0:1:4:39 Dimension.24.1 ( N "diameter" T 15, V 11.1252, VL 64.515999999999991, VU 64.515999999999991, P 0 ) 0:1:4:35 GeomTolerance.24.1 ( N "Feature Control Frame (40)" T 10 TV 1, V 1.27, MR 1 ) 0:1:4:36 Datum.24.1.1 ( N "Feature Control Frame (40)" ) 0:1:4:37 Datum.24.1.2 ( N "Feature Control Frame (40)", M 15 ) 0:1:4:38 Datum.24.1.3 ( N "Feature Control Frame (40)", M 15 ) 0:1:1:2:22 Shape.25 - 0:1:4:39 Dimension.25.1 ( N "diameter" T 15, V 11.1252, VL 2.54, VU 2.54, P 0 ) + 0:1:4:39 Dimension.25.1 ( N "diameter" T 15, V 11.1252, VL 64.515999999999991, VU 64.515999999999991, P 0 ) 0:1:4:35 GeomTolerance.25.1 ( N "Feature Control Frame (40)" T 10 TV 1, V 1.27, MR 1 ) 0:1:4:36 Datum.25.1.1 ( N "Feature Control Frame (40)" ) 0:1:4:37 Datum.25.1.2 ( N "Feature Control Frame (40)", M 15 ) 0:1:4:38 Datum.25.1.3 ( N "Feature Control Frame (40)", M 15 ) 0:1:1:2:28 Shape.31 - 0:1:4:6 Dimension.31.1 ( N "linear distance" T 2, V 20.827999999999996, VL 2.54, VU 2.54, P 0 ) + 0:1:4:6 Dimension.31.1 ( N "linear distance" T 2, V 20.827999999999996, VL 64.515999999999991, VU 64.515999999999991, P 0 ) 0:1:4:2 GeomTolerance.31.1 ( N "Feature Control Frame (24)" T 12 TV 0, V 0.76200000000000001 ) 0:1:4:3 Datum.31.1.1 ( N "Feature Control Frame (24)" ) 0:1:4:4 Datum.31.1.2 ( N "Feature Control Frame (24)" ) 0:1:4:5 Datum.31.1.3 ( N "Feature Control Frame (24)" ) 0:1:1:2:39 Shape.42 - 0:1:4:14 Dimension.42.1 ( N "diameter" T 15, V 50.799999999999997, VL 2.54, VU 2.54, P 0 ) + 0:1:4:14 Dimension.42.1 ( N "diameter" T 15, V 50.799999999999997, VL 64.515999999999991, VU 64.515999999999991, P 0 ) 0:1:4:15 GeomTolerance.42.1 ( N "Feature Control Frame (16)" T 10 TV 1, V 1.524 ) 0:1:4:16 Datum.42.1.1 ( N "Feature Control Frame (16)" ) 0:1:4:17 Datum.42.1.2 ( N "Feature Control Frame (16)" ) 0:1:4:18 Datum.42.1.3 ( N "Feature Control Frame (16)" ) 0:1:1:2:40 Shape.43 - 0:1:4:14 Dimension.43.1 ( N "diameter" T 15, V 50.799999999999997, VL 2.54, VU 2.54, P 0 ) + 0:1:4:14 Dimension.43.1 ( N "diameter" T 15, V 50.799999999999997, VL 64.515999999999991, VU 64.515999999999991, P 0 ) 0:1:4:15 GeomTolerance.43.1 ( N "Feature Control Frame (16)" T 10 TV 1, V 1.524 ) 0:1:4:16 Datum.43.1.1 ( N "Feature Control Frame (16)" ) 0:1:4:17 Datum.43.1.2 ( N "Feature Control Frame (16)" ) @@ -58,7 +58,7 @@ set ref_data { 0:1:1:2:48 Shape.51 0:1:4:30 Dimension.51.1 ( N "linear distance" T 2, V 19.049999999999997, P 0 ) 0:1:1:2:49 Shape.52 - 0:1:4:19 Dimension.52.1 ( N "diameter" T 15, V 38.099999999999994, VL 2.54, VU 2.54, P 0 ) + 0:1:4:19 Dimension.52.1 ( N "diameter" T 15, V 38.099999999999994, VL 64.515999999999991, VU 64.515999999999991, P 0 ) 0:1:4:20 GeomTolerance.52.1 ( N "Feature Control Frame (18)" T 10 TV 1, V 2.032 ) 0:1:4:21 Datum.52.1.1 ( N "Feature Control Frame (18)" ) 0:1:4:22 Datum.52.1.2 ( N "Feature Control Frame (18)" ) @@ -68,7 +68,7 @@ set ref_data { 0:1:4:27 Datum.52.2.2 ( N "Feature Control Frame (20)" ) 0:1:4:28 Datum.52.2.3 ( N "Feature Control Frame (20)" ) 0:1:1:2:50 Shape.53 - 0:1:4:19 Dimension.53.1 ( N "diameter" T 15, V 38.099999999999994, VL 2.54, VU 2.54, P 0 ) + 0:1:4:19 Dimension.53.1 ( N "diameter" T 15, V 38.099999999999994, VL 64.515999999999991, VU 64.515999999999991, P 0 ) 0:1:4:24 Dimension.53.2 ( N "linear distance" T 2, V 38.099999999999994, P 0 ) 0:1:4:20 GeomTolerance.53.1 ( N "Feature Control Frame (18)" T 10 TV 1, V 2.032 ) 0:1:4:21 Datum.53.1.1 ( N "Feature Control Frame (18)" ) @@ -79,49 +79,49 @@ set ref_data { 0:1:4:27 Datum.53.2.2 ( N "Feature Control Frame (20)" ) 0:1:4:28 Datum.53.2.3 ( N "Feature Control Frame (20)" ) 0:1:1:2:51 Shape.54 - 0:1:4:29 Dimension.54.1 ( N "diameter" T 15, V 15.875, VL 2.54, VU 2.54, P 0 ) + 0:1:4:29 Dimension.54.1 ( N "diameter" T 15, V 15.875, VL 64.515999999999991, VU 64.515999999999991, P 0 ) 0:1:4:31 GeomTolerance.54.1 ( N "Feature Control Frame (36)" T 10 TV 1, V 1.27, MR 1 ) 0:1:4:32 Datum.54.1.1 ( N "Feature Control Frame (36)" ) 0:1:4:33 Datum.54.1.2 ( N "Feature Control Frame (36)" ) 0:1:4:34 Datum.54.1.3 ( N "Feature Control Frame (36)" ) 0:1:1:2:52 Shape.55 - 0:1:4:29 Dimension.55.1 ( N "diameter" T 15, V 15.875, VL 2.54, VU 2.54, P 0 ) + 0:1:4:29 Dimension.55.1 ( N "diameter" T 15, V 15.875, VL 64.515999999999991, VU 64.515999999999991, P 0 ) 0:1:4:31 GeomTolerance.55.1 ( N "Feature Control Frame (36)" T 10 TV 1, V 1.27, MR 1 ) 0:1:4:32 Datum.55.1.1 ( N "Feature Control Frame (36)" ) 0:1:4:33 Datum.55.1.2 ( N "Feature Control Frame (36)" ) 0:1:4:34 Datum.55.1.3 ( N "Feature Control Frame (36)" ) 0:1:1:2:53 Shape.56 - 0:1:4:29 Dimension.56.1 ( N "diameter" T 15, V 15.875, VL 2.54, VU 2.54, P 0 ) + 0:1:4:29 Dimension.56.1 ( N "diameter" T 15, V 15.875, VL 64.515999999999991, VU 64.515999999999991, P 0 ) 0:1:4:31 GeomTolerance.56.1 ( N "Feature Control Frame (36)" T 10 TV 1, V 1.27, MR 1 ) 0:1:4:32 Datum.56.1.1 ( N "Feature Control Frame (36)" ) 0:1:4:33 Datum.56.1.2 ( N "Feature Control Frame (36)" ) 0:1:4:34 Datum.56.1.3 ( N "Feature Control Frame (36)" ) 0:1:1:2:54 Shape.57 - 0:1:4:29 Dimension.57.1 ( N "diameter" T 15, V 15.875, VL 2.54, VU 2.54, P 0 ) + 0:1:4:29 Dimension.57.1 ( N "diameter" T 15, V 15.875, VL 64.515999999999991, VU 64.515999999999991, P 0 ) 0:1:4:31 GeomTolerance.57.1 ( N "Feature Control Frame (36)" T 10 TV 1, V 1.27, MR 1 ) 0:1:4:32 Datum.57.1.1 ( N "Feature Control Frame (36)" ) 0:1:4:33 Datum.57.1.2 ( N "Feature Control Frame (36)" ) 0:1:4:34 Datum.57.1.3 ( N "Feature Control Frame (36)" ) 0:1:1:2:55 Shape.58 - 0:1:4:29 Dimension.58.1 ( N "diameter" T 15, V 15.875, VL 2.54, VU 2.54, P 0 ) + 0:1:4:29 Dimension.58.1 ( N "diameter" T 15, V 15.875, VL 64.515999999999991, VU 64.515999999999991, P 0 ) 0:1:4:31 GeomTolerance.58.1 ( N "Feature Control Frame (36)" T 10 TV 1, V 1.27, MR 1 ) 0:1:4:32 Datum.58.1.1 ( N "Feature Control Frame (36)" ) 0:1:4:33 Datum.58.1.2 ( N "Feature Control Frame (36)" ) 0:1:4:34 Datum.58.1.3 ( N "Feature Control Frame (36)" ) 0:1:1:2:56 Shape.59 - 0:1:4:29 Dimension.59.1 ( N "diameter" T 15, V 15.875, VL 2.54, VU 2.54, P 0 ) + 0:1:4:29 Dimension.59.1 ( N "diameter" T 15, V 15.875, VL 64.515999999999991, VU 64.515999999999991, P 0 ) 0:1:4:31 GeomTolerance.59.1 ( N "Feature Control Frame (36)" T 10 TV 1, V 1.27, MR 1 ) 0:1:4:32 Datum.59.1.1 ( N "Feature Control Frame (36)" ) 0:1:4:33 Datum.59.1.2 ( N "Feature Control Frame (36)" ) 0:1:4:34 Datum.59.1.3 ( N "Feature Control Frame (36)" ) 0:1:1:2:57 Shape.60 - 0:1:4:29 Dimension.60.1 ( N "diameter" T 15, V 15.875, VL 2.54, VU 2.54, P 0 ) + 0:1:4:29 Dimension.60.1 ( N "diameter" T 15, V 15.875, VL 64.515999999999991, VU 64.515999999999991, P 0 ) 0:1:4:31 GeomTolerance.60.1 ( N "Feature Control Frame (36)" T 10 TV 1, V 1.27, MR 1 ) 0:1:4:32 Datum.60.1.1 ( N "Feature Control Frame (36)" ) 0:1:4:33 Datum.60.1.2 ( N "Feature Control Frame (36)" ) 0:1:4:34 Datum.60.1.3 ( N "Feature Control Frame (36)" ) 0:1:1:2:58 Shape.61 - 0:1:4:29 Dimension.61.1 ( N "diameter" T 15, V 15.875, VL 2.54, VU 2.54, P 0 ) + 0:1:4:29 Dimension.61.1 ( N "diameter" T 15, V 15.875, VL 64.515999999999991, VU 64.515999999999991, P 0 ) 0:1:4:31 GeomTolerance.61.1 ( N "Feature Control Frame (36)" T 10 TV 1, V 1.27, MR 1 ) 0:1:4:32 Datum.61.1.1 ( N "Feature Control Frame (36)" ) 0:1:4:33 Datum.61.1.2 ( N "Feature Control Frame (36)" ) @@ -137,28 +137,28 @@ set ref_data { 0:1:1:2:129 Shape.132 0:1:4:1 GeomTolerance.132.1 ( N "Feature Control Frame (4)" T 12 TV 0, V 0.254 ) 0:1:1:2:134 Shape.137 - 0:1:4:40 Dimension.137.1 ( N "diameter" T 15, V 27.050999999999998, VL 2.54, VU 2.54, P 0 ) + 0:1:4:40 Dimension.137.1 ( N "diameter" T 15, V 27.050999999999998, VL 64.515999999999991, VU 64.515999999999991, P 0 ) 0:1:4:41 GeomTolerance.137.1 ( N "Feature Control Frame (30)" T 9 TV 1, V 0.254 ) 0:1:4:42 Datum.137.1.1 ( N "Feature Control Frame (30)" ) 0:1:1:2:135 Shape.138 - 0:1:4:40 Dimension.138.1 ( N "diameter" T 15, V 27.050999999999998, VL 2.54, VU 2.54, P 0 ) + 0:1:4:40 Dimension.138.1 ( N "diameter" T 15, V 27.050999999999998, VL 64.515999999999991, VU 64.515999999999991, P 0 ) 0:1:4:41 GeomTolerance.138.1 ( N "Feature Control Frame (30)" T 9 TV 1, V 0.254 ) 0:1:4:42 Datum.138.1.1 ( N "Feature Control Frame (30)" ) 0:1:1:2:153 Shape.156 - 0:1:4:7 Dimension.156.1 ( N "diameter" T 15, V 11.1252, VL 2.54, VU 2.54, P 0 ) + 0:1:4:7 Dimension.156.1 ( N "diameter" T 15, V 11.1252, VL 64.515999999999991, VU 64.515999999999991, P 0 ) 0:1:4:9 GeomTolerance.156.1 ( N "Feature Control Frame (10)" T 9 TV 1, V 0.254 ) 0:1:4:10 Datum.156.1.1 ( N "Feature Control Frame (10)" ) 0:1:1:2:154 Shape.157 - 0:1:4:7 Dimension.157.1 ( N "diameter" T 15, V 11.1252, VL 2.54, VU 2.54, P 0 ) + 0:1:4:7 Dimension.157.1 ( N "diameter" T 15, V 11.1252, VL 64.515999999999991, VU 64.515999999999991, P 0 ) 0:1:4:9 GeomTolerance.157.1 ( N "Feature Control Frame (10)" T 9 TV 1, V 0.254 ) 0:1:4:10 Datum.157.1.1 ( N "Feature Control Frame (10)" ) 0:1:1:2:155 Shape.158 - 0:1:4:8 Dimension.158.1 ( N "diameter" T 15, V 11.1252, VL 2.54, VU 2.54, P 0 ) + 0:1:4:8 Dimension.158.1 ( N "diameter" T 15, V 11.1252, VL 64.515999999999991, VU 64.515999999999991, P 0 ) 0:1:4:11 GeomTolerance.158.1 ( N "Feature Control Frame (11)" T 10 TV 1, V 0.50800000000000001 ) 0:1:4:12 Datum.158.1.1 ( N "Feature Control Frame (11)" ) 0:1:4:13 Datum.158.1.2 ( N "Feature Control Frame (11)" ) 0:1:1:2:156 Shape.159 - 0:1:4:8 Dimension.159.1 ( N "diameter" T 15, V 11.1252, VL 2.54, VU 2.54, P 0 ) + 0:1:4:8 Dimension.159.1 ( N "diameter" T 15, V 11.1252, VL 64.515999999999991, VU 64.515999999999991, P 0 ) 0:1:4:11 GeomTolerance.159.1 ( N "Feature Control Frame (11)" T 10 TV 1, V 0.50800000000000001 ) 0:1:4:12 Datum.159.1.1 ( N "Feature Control Frame (11)" ) 0:1:4:13 Datum.159.1.2 ( N "Feature Control Frame (11)" ) diff --git a/tests/gdt/import/A5 b/tests/gdt/import/A5 index f27f3ac388..6b689aa0ab 100644 --- a/tests/gdt/import/A5 +++ b/tests/gdt/import/A5 @@ -10,9 +10,9 @@ set ref_data { NbOfDatumTarget : 2 0:1:1:2:2 Shape.5 - 0:1:4:14 Dimension.5.1 ( N "linear distance" T 2, V 127, VL 2.54, VU 2.54, P 0 ) + 0:1:4:14 Dimension.5.1 ( N "linear distance" T 2, V 127, VL 64.515999999999991, VU 64.515999999999991, P 0 ) 0:1:1:2:8 Shape.11 - 0:1:4:14 Dimension.11.1 ( N "linear distance" T 2, V 127, VL 2.54, VU 2.54, P 0 ) + 0:1:4:14 Dimension.11.1 ( N "linear distance" T 2, V 127, VL 64.515999999999991, VU 64.515999999999991, P 0 ) 0:1:1:2:9 Shape.12 0:1:4:1 GeomTolerance.12.1 ( N "Feature Control Frame (11)" T 13 TV 0, V 0.127 ) 0:1:1:2:66 Shape.69 @@ -57,9 +57,9 @@ set ref_data { 0:1:4:7 GeomTolerance.203.1 ( N "Feature Control Frame (4)" T 2 TV 0, V 0.050799999999999998 ) 0:1:4:8 Datum.203.1.1 ( N "Feature Control Frame (4)" ) 0:1:1:2:206 Shape.209 - 0:1:4:11 Dimension.209.1 ( N "linear distance" T 2, V 254, VL 2.54, VU 2.54, P 0 ) + 0:1:4:11 Dimension.209.1 ( N "linear distance" T 2, V 254, VL 64.515999999999991, VU 64.515999999999991, P 0 ) 0:1:1:2:207 Shape.210 - 0:1:4:11 Dimension.210.1 ( N "linear distance" T 2, V 254, VL 2.54, VU 2.54, P 0 ) + 0:1:4:11 Dimension.210.1 ( N "linear distance" T 2, V 254, VL 64.515999999999991, VU 64.515999999999991, P 0 ) 0:1:1:3:1 Shape.211 0:1:4:1 GeomTolerance.211.1 ( N "Feature Control Frame (11)" T 13 TV 0, V 0.127 ) } From f74f684b16a3f2f1495ecd2760de3ed83fbe40bd Mon Sep 17 00:00:00 2001 From: ichesnok Date: Tue, 26 Jul 2022 14:06:58 +0300 Subject: [PATCH 355/639] 0032979: Data Exchange, RWGltf_CafWriter - support multi-threaded Draco compression 'MultiThread' field was added to structure RWGltf_DracoParameters for using multithreading. Class CafWriter_DracoEncodingFunctor was added for multithreaded compression. --- src/RWGltf/RWGltf_CafWriter.cxx | 110 ++++++++++++++++++------- src/RWGltf/RWGltf_CafWriter.hxx | 7 ++ src/XSDRAWSTLVRML/XSDRAWSTLVRML.cxx | 13 ++- tests/de_mesh/gltf_write/bull_parallel | 13 +++ 4 files changed, 112 insertions(+), 31 deletions(-) create mode 100644 tests/de_mesh/gltf_write/bull_parallel diff --git a/src/RWGltf/RWGltf_CafWriter.cxx b/src/RWGltf/RWGltf_CafWriter.cxx index b5776fd882..e6bcdbefc0 100644 --- a/src/RWGltf/RWGltf_CafWriter.cxx +++ b/src/RWGltf/RWGltf_CafWriter.cxx @@ -21,6 +21,7 @@ #include #include #include +#include #include #include #include @@ -170,6 +171,72 @@ namespace #endif } +#ifdef HAVE_DRACO +//! Functor for parallel execution of encoding meshes to Draco buffers. +class DracoEncodingFunctor +{ +public: + + DracoEncodingFunctor (const Message_ProgressRange& theProgress, + draco::Encoder& theDracoEncoder, + const std::vector>& theMeshes, + std::vector>& theEncoderBuffers) + : myProgress(theProgress, "Draco compression", Max(1, int(theMeshes.size()))), + myDracoEncoder(&theDracoEncoder), + myRanges(0, int(theMeshes.size()) - 1), + myMeshes(&theMeshes), + myEncoderBuffers(&theEncoderBuffers) + { + for (int anIndex = 0; anIndex != int(theMeshes.size()); ++anIndex) + { + myRanges.SetValue(anIndex, myProgress.Next()); + } + } + + void operator () (int theMeshIndex) const + { + const std::shared_ptr& aCurrentMesh = myMeshes->at(theMeshIndex); + if (aCurrentMesh->NodesVec.empty()) + { + return; + } + + Message_ProgressScope aScope(myRanges[theMeshIndex], NULL, 1); + + draco::Mesh aMesh; + writeNodesToDracoMesh (aMesh, aCurrentMesh->NodesVec); + + if (!aCurrentMesh->NormalsVec.empty()) + { + writeNormalsToDracoMesh (aMesh, aCurrentMesh->NormalsVec); + } + + if (!aCurrentMesh->TexCoordsVec.empty()) + { + writeTexCoordsToDracoMesh (aMesh, aCurrentMesh->TexCoordsVec); + } + + writeIndicesToDracoMesh (aMesh, aCurrentMesh->IndicesVec); + + std::shared_ptr anEncoderBuffer = std::make_shared(); + draco::Status aStatus = myDracoEncoder->EncodeMeshToBuffer (aMesh, anEncoderBuffer.get()); + if (aStatus.ok()) + { + myEncoderBuffers->at(theMeshIndex) = anEncoderBuffer; + } + + aScope.Next(); + } + +private: + Message_ProgressScope myProgress; + draco::Encoder* myDracoEncoder; + NCollection_Array1 myRanges; + const std::vector>* myMeshes; + std::vector>* myEncoderBuffers; +}; +#endif + //================================================================ // Function : Constructor // Purpose : @@ -185,7 +252,8 @@ RWGltf_CafWriter::RWGltf_CafWriter (const TCollection_AsciiString& theFile, myToEmbedTexturesInGlb (true), myToMergeFaces (false), myToSplitIndices16 (false), - myBinDataLen64 (0) + myBinDataLen64 (0), + myToParallel (false) { myCSTrsf.SetOutputLengthUnit (1.0); // meters myCSTrsf.SetOutputCoordinateSystem (RWMesh_CoordinateSystem_glTF); @@ -537,6 +605,8 @@ bool RWGltf_CafWriter::writeBinData (const Handle(TDocStd_Document)& theDocument myBinDataMap.Clear(); myBinDataLen64 = 0; + Message_ProgressScope aScope(theProgress, "Write binary data", myDracoParameters.DracoCompression ? 2 : 1); + const Handle(OSD_FileSystem)& aFileSystem = OSD_FileSystem::DefaultFileSystem(); std::shared_ptr aBinFile = aFileSystem->OpenOStream (myBinFileNameFull, std::ios::out | std::ios::binary); if (aBinFile.get() == NULL @@ -546,7 +616,7 @@ bool RWGltf_CafWriter::writeBinData (const Handle(TDocStd_Document)& theDocument return false; } - Message_ProgressScope aPSentryBin (theProgress, "Binary data", 4); + Message_ProgressScope aPSentryBin (aScope.Next(), "Binary data", 4); const RWGltf_GltfArrayType anArrTypes[4] = { RWGltf_GltfArrayType_Position, @@ -797,7 +867,6 @@ bool RWGltf_CafWriter::writeBinData (const Handle(TDocStd_Document)& theDocument #ifdef HAVE_DRACO OSD_Timer aDracoTimer; aDracoTimer.Start(); - int aBuffId = 0; draco::Encoder aDracoEncoder; aDracoEncoder.SetAttributeQuantization (draco::GeometryAttribute::POSITION, myDracoParameters.QuantizePositionBits); aDracoEncoder.SetAttributeQuantization (draco::GeometryAttribute::NORMAL, myDracoParameters.QuantizeNormalBits); @@ -805,38 +874,23 @@ bool RWGltf_CafWriter::writeBinData (const Handle(TDocStd_Document)& theDocument aDracoEncoder.SetAttributeQuantization (draco::GeometryAttribute::COLOR, myDracoParameters.QuantizeColorBits); aDracoEncoder.SetAttributeQuantization (draco::GeometryAttribute::GENERIC, myDracoParameters.QuantizeGenericBits); aDracoEncoder.SetSpeedOptions (myDracoParameters.CompressionLevel, myDracoParameters.CompressionLevel); - for (size_t aMeshInd = 0; aMeshInd != aMeshes.size(); ++aMeshInd) - { - const std::shared_ptr& aCurrentMesh = aMeshes[aMeshInd]; - if (aCurrentMesh->NodesVec.empty()) - { - continue; - } - draco::Mesh aDracoMesh; - writeNodesToDracoMesh (aDracoMesh, aCurrentMesh->NodesVec); - if (!aCurrentMesh->NormalsVec.empty()) - { - writeNormalsToDracoMesh (aDracoMesh, aCurrentMesh->NormalsVec); - } - if (!aCurrentMesh->TexCoordsVec.empty()) - { - writeTexCoordsToDracoMesh (aDracoMesh, aCurrentMesh->TexCoordsVec); - } - writeIndicesToDracoMesh (aDracoMesh, aCurrentMesh->IndicesVec); + std::vector> anEncoderBuffers(aMeshes.size()); + DracoEncodingFunctor aFunctor (aScope.Next(), aDracoEncoder, aMeshes, anEncoderBuffers); + OSD_Parallel::For (0, int(aMeshes.size()), aFunctor, !myToParallel); - draco::EncoderBuffer anEncoderBuff; - draco::Status aStatus = aDracoEncoder.EncodeMeshToBuffer (aDracoMesh, &anEncoderBuff); - if (!aStatus.ok()) + for (size_t aBuffInd = 0; aBuffInd != anEncoderBuffers.size(); ++aBuffInd) + { + if (anEncoderBuffers.at(aBuffInd).get() == nullptr) { - Message::SendFail (TCollection_AsciiString("Error: mesh cannot be encoded in draco buffer.")); + Message::SendFail(TCollection_AsciiString("Error: mesh not encoded in draco buffer.")); return false; } - RWGltf_GltfBufferView aBuffViewDraco; - aBuffViewDraco.Id = aBuffId++; + aBuffViewDraco.Id = (int)aBuffInd; aBuffViewDraco.ByteOffset = aBinFile->tellp(); - aBinFile->write (anEncoderBuff.data(), std::streamsize(anEncoderBuff.size())); + const draco::EncoderBuffer& anEncoderBuff = *anEncoderBuffers.at(aBuffInd); + aBinFile->write(anEncoderBuff.data(), std::streamsize(anEncoderBuff.size())); if (!aBinFile->good()) { Message::SendFail (TCollection_AsciiString("File '") + myBinFileNameFull + "' cannot be written"); diff --git a/src/RWGltf/RWGltf_CafWriter.hxx b/src/RWGltf/RWGltf_CafWriter.hxx index be1d8a344d..be5d05f637 100644 --- a/src/RWGltf/RWGltf_CafWriter.hxx +++ b/src/RWGltf/RWGltf_CafWriter.hxx @@ -125,6 +125,12 @@ public: //! May reduce binary data size thanks to smaller triangle indexes. void SetSplitIndices16 (bool theToSplit) { myToSplitIndices16 = theToSplit; } + //! Return TRUE if multithreaded optimizations are allowed; FALSE by default. + bool ToParallel() const { return myToParallel; } + + //! Setup multithreaded execution. + void SetParallel (bool theToParallel) { myToParallel = theToParallel; } + //! Return Draco parameters const RWGltf_DracoParameters& CompressionParameters() const { return myDracoParameters; } @@ -397,6 +403,7 @@ protected: int64_t myBinDataLen64; //!< length of binary file std::vector myBuffViewsDraco; //!< vector of buffers view with compression data + Standard_Boolean myToParallel; //!< flag to use multithreading; FALSE by default RWGltf_DracoParameters myDracoParameters; //!< Draco parameters }; diff --git a/src/XSDRAWSTLVRML/XSDRAWSTLVRML.cxx b/src/XSDRAWSTLVRML/XSDRAWSTLVRML.cxx index f0c2c917e0..62aaad6e2e 100644 --- a/src/XSDRAWSTLVRML/XSDRAWSTLVRML.cxx +++ b/src/XSDRAWSTLVRML/XSDRAWSTLVRML.cxx @@ -383,6 +383,7 @@ static Standard_Integer WriteGltf (Draw_Interpretor& theDI, RWMesh_CoordinateSystem aSystemCoordSys = RWMesh_CoordinateSystem_Zup; bool toForceUVExport = false, toEmbedTexturesInGlb = true; bool toMergeFaces = false, toSplitIndices16 = false; + bool isParallel = false; RWMesh_NameFormat aNodeNameFormat = RWMesh_NameFormat_InstanceOrProduct; RWMesh_NameFormat aMeshNameFormat = RWMesh_NameFormat_Product; RWGltf_DracoParameters aDracoParameters; @@ -556,6 +557,10 @@ static Standard_Integer WriteGltf (Draw_Interpretor& theDI, { aDracoParameters.UnifiedQuantization = Draw::ParseOnOffIterator(theNbArgs, theArgVec, anArgIter); } + else if (anArgCase == "-parallel") + { + isParallel = Draw::ParseOnOffIterator(theNbArgs, theArgVec, anArgIter); + } else { Message::SendFail() << "Syntax error at '" << theArgVec[anArgIter] << "'"; @@ -587,6 +592,7 @@ static Standard_Integer WriteGltf (Draw_Interpretor& theDI, aWriter.SetToEmbedTexturesInGlb (toEmbedTexturesInGlb); aWriter.SetMergeFaces (toMergeFaces); aWriter.SetSplitIndices16 (toSplitIndices16); + aWriter.SetParallel(isParallel); aWriter.SetCompressionParameters(aDracoParameters); aWriter.ChangeCoordinateSystemConverter().SetInputLengthUnit (aScaleFactorM); aWriter.ChangeCoordinateSystemConverter().SetInputCoordinateSystem (aSystemCoordSys); @@ -2450,7 +2456,7 @@ void XSDRAWSTLVRML::InitCommands (Draw_Interpretor& theCommands) "\n\t\t: [-meshNameFormat {empty|product|instance|instOrProd|prodOrInst|prodAndInst|verbose}]=product" "\n\t\t: [-draco]=0 [-compressionLevel {0-10}]=7 [-quantizePositionBits Value]=14 [-quantizeNormalBits Value]=10" "\n\t\t: [-quantizeTexcoordBits Value]=12 [-quantizeColorBits Value]=8 [-quantizeGenericBits Value]=12" - "\n\t\t: [-unifiedQuantization]=0" + "\n\t\t: [-unifiedQuantization]=0 [-parallel]=0" "\n\t\t: Write XDE document into glTF file." "\n\t\t: -trsfFormat preferred transformation format" "\n\t\t: -systemCoordSys system coordinate system; Zup when not specified" @@ -2460,7 +2466,7 @@ void XSDRAWSTLVRML::InitCommands (Draw_Interpretor& theCommands) "\n\t\t: -texturesSeparate write textures to separate files" "\n\t\t: -nodeNameFormat name format for Nodes" "\n\t\t: -meshNameFormat name format for Meshes" - "\n\t\t: -draco use Draco compression 3D geometric meshes" + "\n\t\t: -draco use Draco compression 3D geometric meshes" "\n\t\t: -compressionLevel draco compression level [0-10] (by default 7), a value of 0 will apply sequential encoding and preserve face order" "\n\t\t: -quantizePositionBits quantization bits for position attribute when using Draco compression (by default 14)" "\n\t\t: -quantizeNormalBits quantization bits for normal attribute when using Draco compression (by default 10)" @@ -2468,7 +2474,8 @@ void XSDRAWSTLVRML::InitCommands (Draw_Interpretor& theCommands) "\n\t\t: -quantizeColorBits quantization bits for color attribute when using Draco compression (by default 8)" "\n\t\t: -quantizeGenericBits quantization bits for skinning attribute (joint indices and joint weights)" "\n and custom attributes when using Draco compression (by default 12)" - "\n\t\t: -unifiedQuantization quantization is applied on each primitive separately if this option is false", + "\n\t\t: -unifiedQuantization quantization is applied on each primitive separately if this option is false" + "\n\t\t: -parallel use multithreading for Draco compression", __FILE__, WriteGltf, g); theCommands.Add ("writegltf", "writegltf shape file", diff --git a/tests/de_mesh/gltf_write/bull_parallel b/tests/de_mesh/gltf_write/bull_parallel new file mode 100644 index 0000000000..5e3967bd4d --- /dev/null +++ b/tests/de_mesh/gltf_write/bull_parallel @@ -0,0 +1,13 @@ +puts "========" +puts "0032867: Data Exchange - Implement Draco compression for writing glTF" +puts "Test case exporting model into glb (binary glTF) file." +puts "========" + +Close D0 -silent +ReadGltf D0 [locate_data_file bug32867_bull.glb] + +set aGltfFile1 "${imagedir}/${casename}_tmp1.glb" + +WriteGltf D0 "$aGltfFile1" -draco on -parallel + +ReadGltf D "$aGltfFile1" From fd5c113a0367cc5e0b086544f2e900265545aa72 Mon Sep 17 00:00:00 2001 From: msv Date: Thu, 11 Aug 2022 23:46:23 +0300 Subject: [PATCH 356/639] 0033100: Modeling Algorithms - XCAFDoc_Editor::RescaleGeometry does not rescale triangulations Make XCAFDoc_Editor::RescaleGeometry to pass the flag theCopyMesh==true in call to BRepBuilderAPI_Transform::Perform. Correct the help of the command XRescaleGeometry. --- src/XCAFDoc/XCAFDoc_Editor.cxx | 4 ++-- src/XDEDRAW/XDEDRAW.cxx | 2 +- tests/bugs/xde/bug33100 | 15 +++++++++++++++ 3 files changed, 18 insertions(+), 3 deletions(-) create mode 100644 tests/bugs/xde/bug33100 diff --git a/src/XCAFDoc/XCAFDoc_Editor.cxx b/src/XCAFDoc/XCAFDoc_Editor.cxx index 944351b7ae..e76fcedf4d 100644 --- a/src/XCAFDoc/XCAFDoc_Editor.cxx +++ b/src/XCAFDoc/XCAFDoc_Editor.cxx @@ -515,7 +515,7 @@ static void rescaleDimensionRefLabels(const TDF_LabelSequence& theRefLabels, if (aL.FindAttribute(TNaming_NamedShape::GetID(), aNS)) { TopoDS_Shape aShape = aNS->Get(); - theBRepTrsf.Perform(aShape, Standard_True); + theBRepTrsf.Perform(aShape, Standard_True, Standard_True); if (!theBRepTrsf.IsDone()) { Standard_SStream aSS; @@ -664,7 +664,7 @@ Standard_Boolean XCAFDoc_Editor::RescaleGeometry(const TDF_Label& theLabel, if (aNodeType == XCAFDoc_AssemblyGraph::NodeType_Part) { const TopoDS_Shape aShape = aShapeTool->GetShape(aLabel); - aBRepTrsf.Perform(aShape, Standard_True); + aBRepTrsf.Perform(aShape, Standard_True, Standard_True); if (!aBRepTrsf.IsDone()) { Standard_SStream aSS; diff --git a/src/XDEDRAW/XDEDRAW.cxx b/src/XDEDRAW/XDEDRAW.cxx index 1e9ff6e180..71561d359e 100644 --- a/src/XDEDRAW/XDEDRAW.cxx +++ b/src/XDEDRAW/XDEDRAW.cxx @@ -1836,7 +1836,7 @@ void XDEDRAW::Init(Draw_Interpretor& di) "Doc [-names]: Prints number of assembly instances", __FILE__, XDumpNomenclature, g); di.Add("XRescaleGeometry", - "Doc -scale factor [-root label]: Applies geometrical scale to assembly", + "Doc factor [-root label] [-force]: Applies geometrical scale to assembly", __FILE__, XRescaleGeometry, g); // Specialized commands diff --git a/tests/bugs/xde/bug33100 b/tests/bugs/xde/bug33100 new file mode 100644 index 0000000000..ea11cf3411 --- /dev/null +++ b/tests/bugs/xde/bug33100 @@ -0,0 +1,15 @@ +puts "0033100: Modeling Algorithms - XCAFDoc_Editor::RescaleGeometry does not rescale triangulations" + +pload DCAF +Close d -silent +ReadStep d [locate_data_file "bug33100_window.step"] + +XGetOneShape a d +set ref_diag [eval distpp [bounding a]] + +XRescaleGeometry d 1000 + +XGetOneShape a d +set diag [eval distpp [bounding a]] + +checkreal "bounding box diagonal" $diag [expr $ref_diag * 1000] 0 0.001 From 1a1739b20085bd648b850f633ca234a805897ee2 Mon Sep 17 00:00:00 2001 From: ddzama Date: Wed, 17 Aug 2022 11:11:26 +0300 Subject: [PATCH 357/639] 0032957: Add Standard_Noexcept definition into Standard_Macro.hxx and employ Standard_Noexcept. --- src/NCollection/NCollection_AliasedArray.hxx | 3 ++- src/Poly/Poly_ArrayOfNodes.hxx | 5 +++-- src/Poly/Poly_ArrayOfUVNodes.hxx | 5 +++-- src/Standard/Standard_Handle.hxx | 5 +++-- src/Standard/Standard_Macro.hxx | 16 ++++++++++++++++ src/TCollection/TCollection_AsciiString.hxx | 5 +++-- src/TCollection/TCollection_ExtendedString.hxx | 5 +++-- src/TopLoc/TopLoc_SListOfItemLocation.hxx | 5 +++-- 8 files changed, 36 insertions(+), 13 deletions(-) diff --git a/src/NCollection/NCollection_AliasedArray.hxx b/src/NCollection/NCollection_AliasedArray.hxx index 678939bfc3..c8916b366c 100644 --- a/src/NCollection/NCollection_AliasedArray.hxx +++ b/src/NCollection/NCollection_AliasedArray.hxx @@ -18,6 +18,7 @@ #include #include #include +#include //! Defines an array of values of configurable size. //! For instance, this class allows defining an array of 32-bit or 64-bit integer values with bitness determined in runtime. @@ -63,7 +64,7 @@ public: } //! Move constructor - NCollection_AliasedArray (NCollection_AliasedArray&& theOther) noexcept + NCollection_AliasedArray (NCollection_AliasedArray&& theOther) Standard_Noexcept : myData (theOther.myData), myStride (theOther.myStride), mySize (theOther.mySize), myDeletable (theOther.myDeletable) { theOther.myDeletable = false; diff --git a/src/Poly/Poly_ArrayOfNodes.hxx b/src/Poly/Poly_ArrayOfNodes.hxx index 94f26b887d..81a8e45ae0 100644 --- a/src/Poly/Poly_ArrayOfNodes.hxx +++ b/src/Poly/Poly_ArrayOfNodes.hxx @@ -17,6 +17,7 @@ #include #include #include +#include //! Defines an array of 3D nodes of single/double precision configurable at construction time. class Poly_ArrayOfNodes : public NCollection_AliasedArray<> @@ -85,14 +86,14 @@ public: Poly_ArrayOfNodes& operator= (const Poly_ArrayOfNodes& theOther) { return Assign (theOther); } //! Move constructor - Poly_ArrayOfNodes (Poly_ArrayOfNodes&& theOther) noexcept + Poly_ArrayOfNodes (Poly_ArrayOfNodes&& theOther) Standard_Noexcept : NCollection_AliasedArray (std::move (theOther)) { // } //! Move assignment operator; @sa Move() - Poly_ArrayOfNodes& operator= (Poly_ArrayOfNodes&& theOther) noexcept + Poly_ArrayOfNodes& operator= (Poly_ArrayOfNodes&& theOther) Standard_Noexcept { return Move (theOther); } diff --git a/src/Poly/Poly_ArrayOfUVNodes.hxx b/src/Poly/Poly_ArrayOfUVNodes.hxx index 682be382d2..19f4e2491a 100644 --- a/src/Poly/Poly_ArrayOfUVNodes.hxx +++ b/src/Poly/Poly_ArrayOfUVNodes.hxx @@ -17,6 +17,7 @@ #include #include #include +#include //! Defines an array of 2D nodes of single/double precision configurable at construction time. class Poly_ArrayOfUVNodes : public NCollection_AliasedArray<> @@ -85,14 +86,14 @@ public: Poly_ArrayOfUVNodes& operator= (const Poly_ArrayOfUVNodes& theOther) { return Assign (theOther); } //! Move constructor - Poly_ArrayOfUVNodes (Poly_ArrayOfUVNodes&& theOther) noexcept + Poly_ArrayOfUVNodes (Poly_ArrayOfUVNodes&& theOther) Standard_Noexcept : NCollection_AliasedArray (std::move (theOther)) { // } //! Move assignment operator; @sa Move() - Poly_ArrayOfUVNodes& operator= (Poly_ArrayOfUVNodes&& theOther) noexcept + Poly_ArrayOfUVNodes& operator= (Poly_ArrayOfUVNodes&& theOther) Standard_Noexcept { return Move (theOther); } diff --git a/src/Standard/Standard_Handle.hxx b/src/Standard/Standard_Handle.hxx index 723dd90324..6c212951b3 100644 --- a/src/Standard/Standard_Handle.hxx +++ b/src/Standard/Standard_Handle.hxx @@ -18,6 +18,7 @@ #include #include #include +#include class Standard_Transient; @@ -71,7 +72,7 @@ namespace opencascade { } //! Move constructor - handle (handle&& theHandle) noexcept : entity(theHandle.entity) + handle (handle&& theHandle) Standard_Noexcept : entity(theHandle.entity) { theHandle.entity = 0; } @@ -112,7 +113,7 @@ namespace opencascade { } //! Move operator - handle& operator= (handle&& theHandle) noexcept + handle& operator= (handle&& theHandle) Standard_Noexcept { std::swap (this->entity, theHandle.entity); return *this; diff --git a/src/Standard/Standard_Macro.hxx b/src/Standard/Standard_Macro.hxx index a2f949d357..85f2785eae 100644 --- a/src/Standard/Standard_Macro.hxx +++ b/src/Standard/Standard_Macro.hxx @@ -315,5 +315,21 @@ #define Standard_ATOMIC(theType) theType #endif +//! @def Standard_Noexcept +//! Definition of Standard_Noexcept: +//! if noexcept is accessible, Standard_Noexcept is "noexcept" and "throw()" otherwise. +#ifdef _MSC_VER + #if _MSC_VER >= 1900 + #define Standard_Noexcept noexcept + #else + #define Standard_Noexcept throw() + #endif +#else + #if __cplusplus >= 201103L + #define Standard_Noexcept noexcept + #else + #define Standard_Noexcept throw() + #endif +#endif #endif diff --git a/src/TCollection/TCollection_AsciiString.hxx b/src/TCollection/TCollection_AsciiString.hxx index ccb68cde32..0e5d2ff82a 100644 --- a/src/TCollection/TCollection_AsciiString.hxx +++ b/src/TCollection/TCollection_AsciiString.hxx @@ -26,6 +26,7 @@ #include #include #include +#include class TCollection_ExtendedString; //! Class defines a variable-length sequence of 8-bit characters. @@ -74,7 +75,7 @@ public: Standard_EXPORT TCollection_AsciiString(const TCollection_AsciiString& astring); //! Move constructor - TCollection_AsciiString (TCollection_AsciiString&& theOther) noexcept + TCollection_AsciiString (TCollection_AsciiString&& theOther) Standard_Noexcept : mystring (theOther.mystring), mylength (theOther.mylength) { @@ -276,7 +277,7 @@ void operator = (const TCollection_AsciiString& fromwhere) Standard_EXPORT void Swap (TCollection_AsciiString& theOther); //! Move assignment operator - TCollection_AsciiString& operator= (TCollection_AsciiString&& theOther) noexcept { Swap (theOther); return *this; } + TCollection_AsciiString& operator= (TCollection_AsciiString&& theOther) Standard_Noexcept { Swap (theOther); return *this; } //! Frees memory allocated by AsciiString. Standard_EXPORT ~TCollection_AsciiString(); diff --git a/src/TCollection/TCollection_ExtendedString.hxx b/src/TCollection/TCollection_ExtendedString.hxx index 1786028e79..f71869ac6f 100644 --- a/src/TCollection/TCollection_ExtendedString.hxx +++ b/src/TCollection/TCollection_ExtendedString.hxx @@ -31,6 +31,7 @@ #include #include #include +#include class TCollection_AsciiString; @@ -98,7 +99,7 @@ public: Standard_EXPORT TCollection_ExtendedString(const TCollection_ExtendedString& astring); //! Move constructor - TCollection_ExtendedString (TCollection_ExtendedString&& theOther) noexcept + TCollection_ExtendedString (TCollection_ExtendedString&& theOther) Standard_Noexcept : mystring (theOther.mystring), mylength (theOther.mylength) { @@ -153,7 +154,7 @@ void operator = (const TCollection_ExtendedString& fromwhere) Standard_EXPORT void Swap (TCollection_ExtendedString& theOther); //! Move assignment operator - TCollection_ExtendedString& operator= (TCollection_ExtendedString&& theOther) noexcept { Swap (theOther); return *this; } + TCollection_ExtendedString& operator= (TCollection_ExtendedString&& theOther) Standard_Noexcept { Swap (theOther); return *this; } //! Frees memory allocated by ExtendedString. Standard_EXPORT ~TCollection_ExtendedString(); diff --git a/src/TopLoc/TopLoc_SListOfItemLocation.hxx b/src/TopLoc/TopLoc_SListOfItemLocation.hxx index 2ce729cc0c..b80cc8ed72 100644 --- a/src/TopLoc/TopLoc_SListOfItemLocation.hxx +++ b/src/TopLoc/TopLoc_SListOfItemLocation.hxx @@ -21,6 +21,7 @@ #include #include +#include class TopLoc_SListNodeOfItemLocation; class TopLoc_ItemLocation; @@ -69,13 +70,13 @@ public: } //! Move constructor - TopLoc_SListOfItemLocation (TopLoc_SListOfItemLocation&& theOther) noexcept + TopLoc_SListOfItemLocation (TopLoc_SListOfItemLocation&& theOther) Standard_Noexcept : myNode(std::move (theOther.myNode)) { } //! Move operator - TopLoc_SListOfItemLocation& operator= (TopLoc_SListOfItemLocation&& theOther) noexcept + TopLoc_SListOfItemLocation& operator= (TopLoc_SListOfItemLocation&& theOther) Standard_Noexcept { myNode = std::move (theOther.myNode); return *this; From 53152e6dd9cfd9248bccce27f0911de8d1480fe7 Mon Sep 17 00:00:00 2001 From: gka Date: Wed, 17 Aug 2022 16:58:24 +0300 Subject: [PATCH 358/639] 0033101: Data Exchange - STEP reader makes unexpected enormous scaling of some parts Modification to apply units scale factor for faces based on the triangulation --- src/StepToTopoDS/StepToTopoDS_TranslateFace.cxx | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/StepToTopoDS/StepToTopoDS_TranslateFace.cxx b/src/StepToTopoDS/StepToTopoDS_TranslateFace.cxx index 998c8e1687..209eb69338 100644 --- a/src/StepToTopoDS/StepToTopoDS_TranslateFace.cxx +++ b/src/StepToTopoDS/StepToTopoDS_TranslateFace.cxx @@ -46,6 +46,7 @@ #include #include #include +#include #include #include #include @@ -488,9 +489,11 @@ StepToTopoDS_TranslateFace::createMesh(const Handle(StepVisual_TriangulatedFace) const Standard_Boolean aHasNormals = (theTF->NbNormals() > 0); Handle(Poly_Triangulation) aMesh = new Poly_Triangulation(theTF->NbPnindex(), theTF->NbTriangles(), aHasUVNodes, aHasNormals); + const Standard_Real aLF = StepData_GlobalFactors::Intance().LengthFactor(); for (Standard_Integer j = 1; j <= theTF->NbPnindex(); ++j) { - aMesh->SetNode(j, aNodes->Value(theTF->PnindexValue(j))); + const gp_XYZ& aPoint = aNodes->Value(theTF->PnindexValue(j)); + aMesh->SetNode(j, aPoint * aLF); } for (Standard_Integer k = 1; k <= theTF->NbTriangles(); ++k) @@ -573,9 +576,11 @@ StepToTopoDS_TranslateFace::createMesh(const Handle(StepVisual_ComplexTriangulat Handle(Poly_Triangulation) aMesh = new Poly_Triangulation(theTF->NbPnindex(), aNbTriaStrips + aNbTriaFans, aHasUVNodes, aHasNormals); + const Standard_Real aLF = StepData_GlobalFactors::Intance().LengthFactor(); for (Standard_Integer j = 1; j <= theTF->NbPnindex(); ++j) { - aMesh->SetNode(j, aNodes->Value(theTF->PnindexValue(j))); + const gp_XYZ& aPoint = aNodes->Value(theTF->PnindexValue(j)); + aMesh->SetNode(j, aLF * aPoint); } Standard_Integer k = 1; From da76ea432b2b0261219cbe49f49ffed5c4451b8a Mon Sep 17 00:00:00 2001 From: ngavrilo Date: Fri, 19 Aug 2022 12:33:52 +0300 Subject: [PATCH 359/639] 0032782: Visualization, TKD3DHost - improve robustness of test case opengl/drivers/d3dhost --- src/D3DHost/D3DHost_View.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/D3DHost/D3DHost_View.cxx b/src/D3DHost/D3DHost_View.cxx index af3306d140..a0e90e33f9 100644 --- a/src/D3DHost/D3DHost_View.cxx +++ b/src/D3DHost/D3DHost_View.cxx @@ -371,7 +371,7 @@ bool D3DHost_View::d3dSwap() } const HRESULT isOK = myD3dDevice->Present (NULL, NULL, NULL, NULL); - if (isOK != D3D_OK) + if (isOK != D3D_OK && isOK != S_PRESENT_OCCLUDED) { myWorkspace->GetGlContext()->PushMessage (GL_DEBUG_SOURCE_APPLICATION, GL_DEBUG_TYPE_ERROR, 0, GL_DEBUG_SEVERITY_HIGH, TCollection_AsciiString("Direct3D9, Present device failed, ") + d3dFormatError (isOK)); From 7aaed2ce3b1b48635f66fae074853d8ec81a37b3 Mon Sep 17 00:00:00 2001 From: mzernova Date: Thu, 18 Aug 2022 17:12:03 +0300 Subject: [PATCH 360/639] 0032547: Visualization, Select3D_SensitiveCylinder - implement picking of a hollow cylinder Select3D_SensitiveCircle now inherits directly from Select3D_SensitiveEntity. The sensitive circle sector is created using the Select3D_SensitivePoly class directly. Added appropriate methods for selecting sensitive circles. Added parameter myIsHollow to Select3D_SensitiveCylinder class. It allows you to search for intersections with cylinders without covers. The Draw vcircle command has been extended with UStart and UEnd parameters to create a sector of a circle. Added tests: vselect/cone_cylinder/circle_sector vselect/cone_cylinder/circle_wire vselect/cone_cylinder/filled_circle vselect/cone_cylinder/transformed vselect/cone_cylinder/hollow_cone_cyl --- src/AIS/AIS_Circle.cxx | 55 ++- src/AIS/AIS_Manipulator.cxx | 7 +- src/PrsDim/PrsDim_ConcentricRelation.cxx | 46 +- src/PrsDim/PrsDim_EqualDistanceRelation.cxx | 131 +++--- src/Select3D/Select3D_SensitiveCircle.cxx | 307 ++---------- src/Select3D/Select3D_SensitiveCircle.hxx | 97 ++-- src/Select3D/Select3D_SensitiveCylinder.cxx | 12 +- src/Select3D/Select3D_SensitiveCylinder.hxx | 15 +- src/Select3D/Select3D_SensitivePoly.cxx | 146 +++++- src/Select3D/Select3D_SensitivePoly.hxx | 34 +- .../SelectBasics_SelectingVolumeManager.hxx | 24 +- src/SelectMgr/SelectMgr.cxx | 58 ++- src/SelectMgr/SelectMgr_AxisIntersector.cxx | 102 +++- src/SelectMgr/SelectMgr_AxisIntersector.hxx | 21 + src/SelectMgr/SelectMgr_BaseIntersector.cxx | 31 +- src/SelectMgr/SelectMgr_BaseIntersector.hxx | 45 +- src/SelectMgr/SelectMgr_Frustum.hxx | 24 +- src/SelectMgr/SelectMgr_Frustum.lxx | 189 ++++++-- .../SelectMgr_RectangularFrustum.cxx | 180 ++++++- .../SelectMgr_RectangularFrustum.hxx | 33 ++ .../SelectMgr_SelectingVolumeManager.cxx | 40 +- .../SelectMgr_SelectingVolumeManager.hxx | 20 + src/SelectMgr/SelectMgr_TriangularFrustum.cxx | 34 +- src/SelectMgr/SelectMgr_TriangularFrustum.hxx | 21 + .../SelectMgr_TriangularFrustumSet.cxx | 239 +++++++++- .../SelectMgr_TriangularFrustumSet.hxx | 40 +- src/StdSelect/StdSelect_BRepSelectionTool.cxx | 443 ++++++++++++------ src/StdSelect/StdSelect_BRepSelectionTool.hxx | 53 ++- src/ViewerTest/ViewerTest_ObjectCommands.cxx | 148 ++++-- tests/v3d/manipulator/rotate | 2 +- tests/vselect/bugs/bug27477 | 4 +- tests/vselect/cone_cylinder/circle_sector | 46 ++ tests/vselect/cone_cylinder/circle_wire | 67 +++ tests/vselect/cone_cylinder/filled_circle | 67 +++ tests/vselect/cone_cylinder/hollow_cone_cyl | 61 +++ .../vselect/cone_cylinder/transformed_circle | 41 ++ tests/vselect/cone_cylinder/trsf_cone | 4 +- tests/vselect/cone_cylinder/trsf_cyl | 4 +- 38 files changed, 2112 insertions(+), 779 deletions(-) create mode 100644 tests/vselect/cone_cylinder/circle_sector create mode 100644 tests/vselect/cone_cylinder/circle_wire create mode 100644 tests/vselect/cone_cylinder/filled_circle create mode 100644 tests/vselect/cone_cylinder/hollow_cone_cyl create mode 100644 tests/vselect/cone_cylinder/transformed_circle diff --git a/src/AIS/AIS_Circle.cxx b/src/AIS/AIS_Circle.cxx index 70c7e7957e..ef85e9b0ce 100644 --- a/src/AIS/AIS_Circle.cxx +++ b/src/AIS/AIS_Circle.cxx @@ -27,6 +27,7 @@ #include #include #include +#include #include #include #include @@ -41,9 +42,9 @@ IMPLEMENT_STANDARD_RTTIEXT(AIS_Circle,AIS_InteractiveObject) AIS_Circle::AIS_Circle(const Handle(Geom_Circle)& aComponent): AIS_InteractiveObject(PrsMgr_TOP_AllView), myComponent(aComponent), -myUStart(0.), -myUEnd(2*M_PI), -myCircleIsArc(Standard_False), +myUStart (0.0), +myUEnd (2.0 * M_PI), +myCircleIsArc (Standard_False), myIsFilledCircleSens (Standard_False) { } @@ -60,7 +61,7 @@ AIS_Circle::AIS_Circle(const Handle(Geom_Circle)& theComponent, myComponent (theComponent), myUStart (theUStart), myUEnd (theUEnd), - myCircleIsArc (Standard_True), + myCircleIsArc (Abs (Abs (theUEnd - theUStart) - 2.0 * M_PI) > gp::Resolution()), myIsFilledCircleSens (theIsFilledCircleSens) { } @@ -207,14 +208,14 @@ void AIS_Circle::UnsetWidth() //function : ComputeCircle //purpose : //======================================================================= -void AIS_Circle::ComputeCircle( const Handle(Prs3d_Presentation)& aPresentation) +void AIS_Circle::ComputeCircle (const Handle(Prs3d_Presentation)& thePresentation) { GeomAdaptor_Curve curv(myComponent); Standard_Real prevdev = myDrawer->DeviationCoefficient(); - myDrawer->SetDeviationCoefficient(1.e-5); - StdPrs_DeflectionCurve::Add(aPresentation,curv,myDrawer); - myDrawer->SetDeviationCoefficient(prevdev); + myDrawer->SetDeviationCoefficient (1.e-5); + StdPrs_DeflectionCurve::Add (thePresentation, curv, myDrawer); + myDrawer->SetDeviationCoefficient (prevdev); } @@ -223,13 +224,13 @@ void AIS_Circle::ComputeCircle( const Handle(Prs3d_Presentation)& aPresentation) //purpose : //======================================================================= -void AIS_Circle::ComputeArc( const Handle(Prs3d_Presentation)& aPresentation) +void AIS_Circle::ComputeArc (const Handle(Prs3d_Presentation)& thePresentation) { - GeomAdaptor_Curve curv(myComponent,myUStart,myUEnd); + GeomAdaptor_Curve curv(myComponent, myUStart, myUEnd); Standard_Real prevdev = myDrawer->DeviationCoefficient(); - myDrawer->SetDeviationCoefficient(1.e-5); - StdPrs_DeflectionCurve::Add(aPresentation,curv,myDrawer); - myDrawer->SetDeviationCoefficient(prevdev); + myDrawer->SetDeviationCoefficient (1.e-5); + StdPrs_DeflectionCurve::Add (thePresentation, curv, myDrawer); + myDrawer->SetDeviationCoefficient (prevdev); } //======================================================================= @@ -237,27 +238,25 @@ void AIS_Circle::ComputeArc( const Handle(Prs3d_Presentation)& aPresentation) //purpose : //======================================================================= -void AIS_Circle::ComputeCircleSelection(const Handle(SelectMgr_Selection)& aSelection) +void AIS_Circle::ComputeCircleSelection (const Handle(SelectMgr_Selection)& theSelection) { - Handle(SelectMgr_EntityOwner) eown = new SelectMgr_EntityOwner(this); - Handle(Select3D_SensitiveCircle) seg = new Select3D_SensitiveCircle (eown, - myComponent->Circ(), - myIsFilledCircleSens); - aSelection->Add(seg); + Handle(SelectMgr_EntityOwner) anOwner = new SelectMgr_EntityOwner(this); + Handle(Select3D_SensitiveCircle) aCirc = new Select3D_SensitiveCircle (anOwner, + myComponent->Circ(), + myIsFilledCircleSens); + theSelection->Add (aCirc); } //======================================================================= //function : ComputeArcSelection //purpose : //======================================================================= -void AIS_Circle::ComputeArcSelection(const Handle(SelectMgr_Selection)& aSelection) +void AIS_Circle::ComputeArcSelection (const Handle(SelectMgr_Selection)& theSelection) { - - - Handle(SelectMgr_EntityOwner) eown = new SelectMgr_EntityOwner(this); - Handle(Select3D_SensitiveCircle) seg = new Select3D_SensitiveCircle (eown, - myComponent->Circ(), - myUStart, myUEnd, - myIsFilledCircleSens); - aSelection->Add(seg); + Handle(SelectMgr_EntityOwner) anOwner = new SelectMgr_EntityOwner(this); + Handle(Select3D_SensitivePoly) aSeg = new Select3D_SensitivePoly (anOwner, + myComponent->Circ(), + myUStart, myUEnd, + myIsFilledCircleSens); + theSelection->Add (aSeg); } diff --git a/src/AIS/AIS_Manipulator.cxx b/src/AIS/AIS_Manipulator.cxx index 43da955306..a6f739bdb0 100644 --- a/src/AIS/AIS_Manipulator.cxx +++ b/src/AIS/AIS_Manipulator.cxx @@ -84,9 +84,8 @@ namespace public: //! Main constructor. ManipSensCircle (const Handle(SelectMgr_EntityOwner)& theOwnerId, - const gp_Circ& theCircle, - const Standard_Integer theNbPnts) - : Select3D_SensitiveCircle (theOwnerId, theCircle, Standard_False, theNbPnts), + const gp_Circ& theCircle) + : Select3D_SensitiveCircle (theOwnerId, theCircle, Standard_False), ManipSensRotation (theCircle.Position().Direction()) {} //! Checks whether the circle overlaps current selecting volume @@ -1168,7 +1167,7 @@ void AIS_Manipulator::ComputeSelection (const Handle(SelectMgr_Selection)& theSe } // define sensitivity by circle const gp_Circ aGeomCircle (gp_Ax2 (gp::Origin(), anAxis.ReferenceAxis().Direction()), anAxis.RotatorDiskRadius()); - Handle(Select3D_SensitiveCircle) aCircle = new ManipSensCircle (anOwner, aGeomCircle, anAxis.FacettesNumber()); + Handle(Select3D_SensitiveCircle) aCircle = new ManipSensCircle (anOwner, aGeomCircle); aCircle->SetSensitivityFactor (15); theSelection->Add (aCircle); // enlarge sensitivity by triangulation diff --git a/src/PrsDim/PrsDim_ConcentricRelation.cxx b/src/PrsDim/PrsDim_ConcentricRelation.cxx index 807b6cd366..6f283e13e1 100644 --- a/src/PrsDim/PrsDim_ConcentricRelation.cxx +++ b/src/PrsDim/PrsDim_ConcentricRelation.cxx @@ -213,37 +213,39 @@ void PrsDim_ConcentricRelation::ComputeTwoEdgesConcentric(const Handle(Prs3d_Pre //purpose : //======================================================================= -void PrsDim_ConcentricRelation::ComputeSelection(const Handle(SelectMgr_Selection)& aSelection, - const Standard_Integer) +void PrsDim_ConcentricRelation::ComputeSelection (const Handle(SelectMgr_Selection)& aSelection, + const Standard_Integer) { - Handle(SelectMgr_EntityOwner) own = new SelectMgr_EntityOwner(this,7); + Handle(SelectMgr_EntityOwner) anOwner = new SelectMgr_EntityOwner(this,7); //Creation of 2 sensitive circles - // the greater - gp_Ax2 ax(myCenter, myDir); - gp_Circ aCirc (ax, myRad); - Handle(Select3D_SensitiveCircle) sensit = new Select3D_SensitiveCircle (own, aCirc); - aSelection->Add(sensit); - // the smaller - aCirc.SetRadius(myRad/2); - sensit = new Select3D_SensitiveCircle (own, aCirc); - aSelection->Add(sensit); + + // the greater + gp_Ax2 anAx (myCenter, myDir); + gp_Circ aCirc (anAx, myRad); + Handle(Select3D_SensitiveCircle) sensit = new Select3D_SensitiveCircle (anOwner, aCirc); + aSelection->Add (sensit); + + // the smaller + aCirc.SetRadius (myRad / 2); + sensit = new Select3D_SensitiveCircle (anOwner, aCirc); + aSelection->Add (sensit); //Creation of 2 segments sensitive for the cross Handle(Select3D_SensitiveSegment) seg; gp_Pnt otherPnt = myPnt.Mirrored(myCenter); - seg = new Select3D_SensitiveSegment(own, - otherPnt, - myPnt); - aSelection->Add(seg); + seg = new Select3D_SensitiveSegment(anOwner, + otherPnt, + myPnt); + aSelection->Add (seg); gp_Ax1 RotateAxis(myCenter, myDir); - gp_Pnt FPnt = myCenter.Rotated(RotateAxis, M_PI/2); - gp_Pnt SPnt = myCenter.Rotated(RotateAxis, -M_PI/2); - seg = new Select3D_SensitiveSegment(own, - FPnt, - SPnt); - aSelection->Add(seg); + gp_Pnt FPnt = myCenter.Rotated (RotateAxis, M_PI_2); + gp_Pnt SPnt = myCenter.Rotated (RotateAxis, -M_PI_2); + seg = new Select3D_SensitiveSegment(anOwner, + FPnt, + SPnt); + aSelection->Add (seg); } diff --git a/src/PrsDim/PrsDim_EqualDistanceRelation.cxx b/src/PrsDim/PrsDim_EqualDistanceRelation.cxx index 830edbb9ba..cea28b70a9 100644 --- a/src/PrsDim/PrsDim_EqualDistanceRelation.cxx +++ b/src/PrsDim/PrsDim_EqualDistanceRelation.cxx @@ -36,7 +36,7 @@ #include #include #include -#include +#include #include #include #include @@ -202,124 +202,141 @@ void PrsDim_EqualDistanceRelation::Compute (const Handle(PrsMgr_PresentationMana //======================================================================= //function : ComputeSelection -//purpose : +//purpose : //======================================================================= -void PrsDim_EqualDistanceRelation::ComputeSelection( const Handle( SelectMgr_Selection )& aSelection, - const Standard_Integer ) +void PrsDim_EqualDistanceRelation::ComputeSelection (const Handle( SelectMgr_Selection )& aSelection, + const Standard_Integer) { Handle( SelectMgr_EntityOwner ) own = new SelectMgr_EntityOwner( this, 7 ); Handle( Select3D_SensitiveSegment ) seg; seg = new Select3D_SensitiveSegment( own, myPoint1, myPoint2 ); - aSelection->Add( seg ); + aSelection->Add (seg); seg = new Select3D_SensitiveSegment( own, myPoint3, myPoint4 ); - aSelection->Add( seg ); + aSelection->Add (seg); // Line between two middles - gp_Pnt Middle12( (myPoint1.XYZ() + myPoint2.XYZ()) * 0.5 ), + gp_Pnt Middle12( (myPoint1.XYZ() + myPoint2.XYZ()) * 0.5 ), Middle34( (myPoint3.XYZ() + myPoint4.XYZ()) *0.5 ); seg = new Select3D_SensitiveSegment( own, Middle12, Middle34 ); - aSelection->Add( seg ); + aSelection->Add (seg); gp_Pnt Middle((Middle12.XYZ() + Middle34.XYZ())*0.5); Standard_Real SmallDist = .001; - Handle( Select3D_SensitiveBox ) box = new Select3D_SensitiveBox( own, - Middle.X() - SmallDist, - Middle.Y() - SmallDist, - Middle.Z() - SmallDist, - Middle.X() + SmallDist, - Middle.Y() + SmallDist, - Middle.Z() + SmallDist ); - aSelection->Add(box); - - if (myFShape.ShapeType() == TopAbs_EDGE){ + Handle( Select3D_SensitiveBox ) box = new Select3D_SensitiveBox(own, + Middle.X() - SmallDist, + Middle.Y() - SmallDist, + Middle.Z() - SmallDist, + Middle.X() + SmallDist, + Middle.Y() + SmallDist, + Middle.Z() + SmallDist); + aSelection->Add (box); + + if (myFShape.ShapeType() == TopAbs_EDGE) + { BRepAdaptor_Curve aCurve(TopoDS::Edge(myFShape)); - if (aCurve.GetType() == GeomAbs_Line){ - //add sensetive element - line + if (aCurve.GetType() == GeomAbs_Line) + { + //add sensetive element - line seg = new Select3D_SensitiveSegment( own, myAttachPoint1, myPoint1); - aSelection->Add( seg ); + aSelection->Add (seg); } - else if (aCurve.GetType() == GeomAbs_Circle){ + else if (aCurve.GetType() == GeomAbs_Circle) + { Handle(Geom_Circle) aCircle = Handle(Geom_Circle)::DownCast(aCurve.Curve().Curve()); Standard_Real FirstPar = ElCLib::Parameter(aCircle->Circ(), myAttachPoint1), LastPar = ElCLib::Parameter(aCircle->Circ(), myPoint1); - if (LastPar < FirstPar ) LastPar+=M_PI*2; - Handle(Select3D_SensitiveCircle) circ = new Select3D_SensitiveCircle (own, aCircle->Circ(), FirstPar, LastPar); - aSelection->Add( circ ); + if (LastPar < FirstPar ) LastPar += M_PI * 2; + Handle(Select3D_SensitivePoly) circ = new Select3D_SensitivePoly (own, aCircle->Circ(), FirstPar, LastPar); + aSelection->Add (circ); } } - else { + else + { seg = new Select3D_SensitiveSegment( own, myAttachPoint1, myPoint1); - aSelection->Add( seg ); - } - - if (mySShape.ShapeType() == TopAbs_EDGE){ + aSelection->Add (seg); + } + + if (mySShape.ShapeType() == TopAbs_EDGE) + { BRepAdaptor_Curve aCurve(TopoDS::Edge(mySShape)); - if (aCurve.GetType() == GeomAbs_Line) { + if (aCurve.GetType() == GeomAbs_Line) + { //add sensetive element - line seg = new Select3D_SensitiveSegment( own, myAttachPoint2, myPoint2); - aSelection->Add( seg ); + aSelection->Add (seg); } - else if (aCurve.GetType() == GeomAbs_Circle){ + else if (aCurve.GetType() == GeomAbs_Circle) + { Handle(Geom_Circle) aCircle = Handle(Geom_Circle)::DownCast(aCurve.Curve().Curve()); Standard_Real FirstPar = ElCLib::Parameter(aCircle->Circ(), myAttachPoint2), LastPar = ElCLib::Parameter(aCircle->Circ(), myPoint2); - if (LastPar < FirstPar ) LastPar+=M_PI*2; - Handle(Select3D_SensitiveCircle) circ = new Select3D_SensitiveCircle (own, aCircle->Circ(), FirstPar, LastPar); - aSelection->Add( circ ); + if (LastPar < FirstPar) LastPar += M_PI * 2; + Handle(Select3D_SensitivePoly) circ = new Select3D_SensitivePoly (own, aCircle->Circ(), FirstPar, LastPar); + aSelection->Add (circ); } } - else { + else + { seg = new Select3D_SensitiveSegment( own, myAttachPoint2, myPoint2); - aSelection->Add( seg ); + aSelection->Add (seg); } - if (myShape3.ShapeType() == TopAbs_EDGE){ + if (myShape3.ShapeType() == TopAbs_EDGE) + { BRepAdaptor_Curve aCurve(TopoDS::Edge(myShape3)); - if (aCurve.GetType() == GeomAbs_Line) { + if (aCurve.GetType() == GeomAbs_Line) + { //add sensetive element - line seg = new Select3D_SensitiveSegment( own, myAttachPoint3, myPoint3); - aSelection->Add( seg ); + aSelection->Add (seg); } - else if (aCurve.GetType() == GeomAbs_Circle){ + else if (aCurve.GetType() == GeomAbs_Circle) + { Handle(Geom_Circle) aCircle = Handle(Geom_Circle)::DownCast(aCurve.Curve().Curve()); Standard_Real FirstPar = ElCLib::Parameter(aCircle->Circ(), myAttachPoint3), LastPar = ElCLib::Parameter(aCircle->Circ(), myPoint3); - if (LastPar < FirstPar ) LastPar+=M_PI*2; - Handle(Select3D_SensitiveCircle) circ = new Select3D_SensitiveCircle (own, aCircle->Circ(), FirstPar, LastPar); - aSelection->Add( circ ); + if (LastPar < FirstPar) LastPar += M_PI * 2; + Handle(Select3D_SensitivePoly) circ = new Select3D_SensitivePoly (own, aCircle->Circ(), FirstPar, LastPar); + aSelection->Add (circ); } - else { + else + { seg = new Select3D_SensitiveSegment( own, myAttachPoint3, myPoint3); - aSelection->Add( seg ); + aSelection->Add (seg); } } - else { + else + { seg = new Select3D_SensitiveSegment( own, myAttachPoint3, myPoint3); - aSelection->Add( seg ); + aSelection->Add (seg); } - if (myShape4.ShapeType() == TopAbs_EDGE){ + if (myShape4.ShapeType() == TopAbs_EDGE) + { BRepAdaptor_Curve aCurve(TopoDS::Edge(myShape4)); - if (aCurve.GetType() == GeomAbs_Line) { + if (aCurve.GetType() == GeomAbs_Line) + { //add sensetive element - line seg = new Select3D_SensitiveSegment( own, myAttachPoint4, myPoint4); - aSelection->Add( seg ); + aSelection->Add (seg); } - else if (aCurve.GetType() == GeomAbs_Circle){ + else if (aCurve.GetType() == GeomAbs_Circle) + { Handle(Geom_Circle) aCircle = Handle(Geom_Circle)::DownCast(aCurve.Curve().Curve()); Standard_Real FirstPar = ElCLib::Parameter(aCircle->Circ(), myAttachPoint4), LastPar = ElCLib::Parameter(aCircle->Circ(), myPoint4); - if (LastPar < FirstPar ) LastPar+=M_PI*2; - Handle(Select3D_SensitiveCircle) circ = new Select3D_SensitiveCircle (own, aCircle->Circ(), FirstPar, LastPar); + if (LastPar < FirstPar) LastPar += M_PI * 2; + Handle(Select3D_SensitivePoly) circ = new Select3D_SensitivePoly (own, aCircle->Circ(), FirstPar, LastPar); aSelection->Add( circ ); } } - else { + else + { seg = new Select3D_SensitiveSegment( own, myAttachPoint4, myPoint4); - aSelection->Add( seg ); + aSelection->Add (seg); } } diff --git a/src/Select3D/Select3D_SensitiveCircle.cxx b/src/Select3D/Select3D_SensitiveCircle.cxx index 6a4864c7dd..1e24dd8ba7 100644 --- a/src/Select3D/Select3D_SensitiveCircle.cxx +++ b/src/Select3D/Select3D_SensitiveCircle.cxx @@ -16,195 +16,29 @@ #include -#include -#include -#include +#include -IMPLEMENT_STANDARD_RTTIEXT(Select3D_SensitiveCircle,Select3D_SensitivePoly) - -namespace -{ - static Standard_Integer GetCircleNbPoints (const gp_Circ& theCircle, - const Standard_Integer theNbPnts) - { - // Check if number of points is invalid. - // In this case myPolyg raises Standard_ConstructionError - // exception (see constructor below). - if (theNbPnts <= 0) - return 0; - - if (theCircle.Radius() > Precision::Confusion()) - return 2 * theNbPnts + 1; - - // The radius is too small and circle degenerates into point - return 1; - } - - //! Definition of circle polyline - static void initCircle (Select3D_PointData& thePolygon, - const gp_Circ& theCircle, - const Standard_Real theU1, - const Standard_Real theU2, - const Standard_Integer theNbPnts) - { - const Standard_Real aStep = (theU2 - theU1) / theNbPnts; - const Standard_Real aRadius = theCircle.Radius(); - Standard_Integer aPntIdx = 0; - Standard_Real aCurU = theU1; - gp_Pnt aP1; - gp_Vec aV1; - for (Standard_Integer anIndex = 1; anIndex <= theNbPnts; ++anIndex, aCurU += aStep) - { - ElCLib::CircleD1 (aCurU, theCircle.Position(), theCircle.Radius(), aP1, aV1); - thePolygon.SetPnt (aPntIdx++, aP1); - - aV1.Normalize(); - const gp_Pnt aP2 = aP1.XYZ() + aV1.XYZ() * Tan (aStep * 0.5) * aRadius; - thePolygon.SetPnt (aPntIdx++, aP2); - } - aP1 = ElCLib::CircleValue (theU2, theCircle.Position(), theCircle.Radius()); - thePolygon.SetPnt (theNbPnts * 2, aP1); - } -} +IMPLEMENT_STANDARD_RTTIEXT(Select3D_SensitiveCircle, Select3D_SensitiveEntity) //======================================================================= //function : Select3D_SensitiveCircle (constructor) //purpose : Definition of a sensitive circle //======================================================================= -Select3D_SensitiveCircle::Select3D_SensitiveCircle(const Handle(SelectMgr_EntityOwner)& theOwnerId, - const gp_Circ& theCircle, - const Standard_Boolean theIsFilled, - const Standard_Integer theNbPnts) -: Select3D_SensitivePoly (theOwnerId, !theIsFilled, GetCircleNbPoints (theCircle, theNbPnts)), - myCircle (theCircle), - myStart (0.0), - myEnd (2.0 * M_PI) -{ - mySensType = theIsFilled ? Select3D_TOS_INTERIOR : Select3D_TOS_BOUNDARY; - myCenter3D = theCircle.Position().Location(); - if (myPolyg.Size() != 1) - { - initCircle (myPolyg, theCircle, myStart, myEnd, theNbPnts); - } - // Radius = 0.0 - else - { - myPolyg.SetPnt (0, theCircle.Position().Location()); - } - - if (mySensType == Select3D_TOS_BOUNDARY) - { - SetSensitivityFactor (6); - } -} - -//======================================================================= -//function : Select3D_SensitiveCircle (constructor) -//purpose : Definition of a sensitive arc -//======================================================================= Select3D_SensitiveCircle::Select3D_SensitiveCircle (const Handle(SelectMgr_EntityOwner)& theOwnerId, const gp_Circ& theCircle, - const Standard_Real theU1, - const Standard_Real theU2, - const Standard_Boolean theIsFilled, - const Standard_Integer theNbPnts) -: Select3D_SensitivePoly (theOwnerId, !theIsFilled, GetCircleNbPoints (theCircle, theNbPnts)), - myCircle (theCircle), - myStart (Min (theU1, theU2)), - myEnd (Max (theU1, theU2)) + const Standard_Boolean theIsFilled) +: Select3D_SensitiveEntity (theOwnerId) { - mySensType = theIsFilled ? Select3D_TOS_INTERIOR : Select3D_TOS_BOUNDARY; - myCenter3D = theCircle.Position().Location(); - if (myPolyg.Size() != 1) - { - initCircle (myPolyg, theCircle, myStart, myEnd, theNbPnts); - } - else - { - myPolyg.SetPnt (0, theCircle.Position().Location()); - } + myRadius = theCircle.Radius(); + myTrsf.SetTransformation (theCircle.Position(), gp::XOY()); - if (mySensType == Select3D_TOS_BOUNDARY) - { - SetSensitivityFactor (6); - } -} - -//======================================================================= -//function : Select3D_SensitiveCircle -//purpose : -//======================================================================= -Select3D_SensitiveCircle::Select3D_SensitiveCircle(const Handle(SelectMgr_EntityOwner)& theOwnerId, - const Handle(TColgp_HArray1OfPnt)& thePnts3d, - const Standard_Boolean theIsFilled) -: Select3D_SensitivePoly (theOwnerId, thePnts3d, static_cast (!theIsFilled)), - myStart (0), - myEnd (0) -{ mySensType = theIsFilled ? Select3D_TOS_INTERIOR : Select3D_TOS_BOUNDARY; - - if (myPolyg.Size() != 1) - computeCenter3D(); - else - myCenter3D = myPolyg.Pnt (0); - - if (mySensType == Select3D_TOS_BOUNDARY) - { - SetSensitivityFactor (6); - } -} - -//======================================================================= -//function : Select3D_SensitiveCircle -//purpose : -//======================================================================= - -Select3D_SensitiveCircle::Select3D_SensitiveCircle(const Handle(SelectMgr_EntityOwner)& theOwnerId, - const TColgp_Array1OfPnt& thePnts3d, - const Standard_Boolean theIsFilled) -: Select3D_SensitivePoly (theOwnerId, thePnts3d, !theIsFilled), - myStart (0), - myEnd (0) -{ - mySensType = theIsFilled ? Select3D_TOS_INTERIOR : Select3D_TOS_BOUNDARY; - - if (myPolyg.Size() != 1) - computeCenter3D(); - else - myCenter3D = myPolyg.Pnt (0); - if (mySensType == Select3D_TOS_BOUNDARY) { SetSensitivityFactor (6); } } -//======================================================================= -// function : BVH -// purpose : Builds BVH tree for a circle's edge segments if needed -//======================================================================= -void Select3D_SensitiveCircle::BVH() -{ - if (mySensType == Select3D_TOS_BOUNDARY) - { - Select3D_SensitivePoly::BVH(); - } -} - -//======================================================================= -// function : ToBuildBVH -// purpose : -//======================================================================= -Standard_Boolean Select3D_SensitiveCircle::ToBuildBVH() const -{ - if (mySensType != Select3D_TOS_BOUNDARY) - { - return Standard_False; - } - - return Select3D_SensitivePoly::ToBuildBVH(); -} - //======================================================================= // function : Matches // purpose : Checks whether the circle overlaps current selecting volume @@ -212,41 +46,27 @@ Standard_Boolean Select3D_SensitiveCircle::ToBuildBVH() const Standard_Boolean Select3D_SensitiveCircle::Matches (SelectBasics_SelectingVolumeManager& theMgr, SelectBasics_PickResult& thePickResult) { - if (mySensType == Select3D_TOS_BOUNDARY) - { - if (!Select3D_SensitivePoly::Matches (theMgr, thePickResult)) - { - return Standard_False; - } - } - else if (mySensType == Select3D_TOS_INTERIOR) + const Standard_Boolean aIsFilled = mySensType == Select3D_TOS_INTERIOR; + + if (theMgr.GetActiveSelectionType() != SelectMgr_SelectionType_Point) { - Handle(TColgp_HArray1OfPnt) anArrayOfPnt; - Points3D (anArrayOfPnt); if (!theMgr.IsOverlapAllowed()) { - if (theMgr.GetActiveSelectionType() == SelectMgr_SelectionType_Polyline) - { - SelectBasics_PickResult aDummy; - return theMgr.OverlapsPolygon (anArrayOfPnt->Array1(), mySensType, aDummy); - } - for (Standard_Integer aPntIdx = anArrayOfPnt->Lower(); aPntIdx <= anArrayOfPnt->Upper(); ++aPntIdx) - { - if (!theMgr.OverlapsPoint (anArrayOfPnt->Value(aPntIdx))) - { - return Standard_False; - } - } - return Standard_True; + bool isInside = true; + return theMgr.OverlapsCircle (myRadius, myTrsf, aIsFilled, &isInside) && isInside; } - - if (!theMgr.OverlapsPolygon (anArrayOfPnt->Array1(), Select3D_TOS_INTERIOR, thePickResult)) + else { - return Standard_False; + return theMgr.OverlapsCircle (myRadius, myTrsf, aIsFilled, NULL); } - thePickResult.SetDistToGeomCenter(distanceToCOG(theMgr)); + } + if (!theMgr.OverlapsCircle (myRadius, myTrsf, aIsFilled, thePickResult)) + { + return false; } + thePickResult.SetDistToGeomCenter (theMgr.DistToGeometryCenter (CenterOfGeometry())); + return Standard_True; } @@ -254,81 +74,36 @@ Standard_Boolean Select3D_SensitiveCircle::Matches (SelectBasics_SelectingVolume //function : GetConnected //purpose : //======================================================================= - Handle(Select3D_SensitiveEntity) Select3D_SensitiveCircle::GetConnected() { - Standard_Boolean isFilled = mySensType == Select3D_TOS_INTERIOR; - // Create a copy of this - Handle(Select3D_SensitiveEntity) aNewEntity; - // this was constructed using Handle(Geom_Circle) - if (!Precision::IsInfinite (myCircle.Radius())) - { - if ((myEnd - myStart) > Precision::Confusion()) - { - // Arc - aNewEntity = new Select3D_SensitiveCircle (myOwnerId, myCircle, myStart, myEnd, isFilled); - } - else - { - // Circle - aNewEntity = new Select3D_SensitiveCircle (myOwnerId, myCircle, isFilled); - } - } - // this was constructed using TColgp_Array1OfPnt - else - { - Standard_Integer aSize = myPolyg.Size(); - TColgp_Array1OfPnt aPolyg (1, aSize); - for(Standard_Integer anIndex = 1; anIndex <= aSize; ++anIndex) - { - aPolyg.SetValue(anIndex, myPolyg.Pnt (anIndex-1)); - } - aNewEntity = new Select3D_SensitiveCircle (myOwnerId, aPolyg, isFilled); - } - + Standard_Boolean anIsFilled = mySensType == Select3D_TOS_INTERIOR; + Handle(Select3D_SensitiveEntity) aNewEntity = new Select3D_SensitiveCircle (myOwnerId, + Circle(), + anIsFilled); return aNewEntity; } -//======================================================================= -//function : computeCenter3D -//purpose : -//======================================================================= -void Select3D_SensitiveCircle::computeCenter3D() +//================================================== +// Function: BoundingBox +// Purpose : +//================================================== +Select3D_BndBox3d Select3D_SensitiveCircle::BoundingBox() { - gp_XYZ aCenter; - Standard_Integer aNbPnts = myPolyg.Size(); - if (aNbPnts != 1) - { - // The mass of points system - Standard_Integer aMass = aNbPnts - 1; - // Find the circle barycenter - for (Standard_Integer anIndex = 0; anIndex < aNbPnts - 1; ++anIndex) - { - aCenter += myPolyg.Pnt(anIndex); - } - myCenter3D = aCenter / aMass; - } - else - { - myCenter3D = myPolyg.Pnt(0); - } -} + Graphic3d_Mat4d aTrsf; + myTrsf.GetMat4 (aTrsf); -//======================================================================= -// function : CenterOfGeometry -// purpose : Returns center of the circle. If location transformation -// is set, it will be applied -//======================================================================= -gp_Pnt Select3D_SensitiveCircle::CenterOfGeometry() const -{ - return myCenter3D; + Select3D_BndBox3d aBox (SelectMgr_Vec3 (-myRadius, -myRadius, 0), + SelectMgr_Vec3 (myRadius, myRadius, 0)); + aBox.Transform (aTrsf); + + return aBox; } -//======================================================================= -// function : distanceToCOG -// purpose : -//======================================================================= -Standard_Real Select3D_SensitiveCircle::distanceToCOG (SelectBasics_SelectingVolumeManager& theMgr) +//================================================== +// Function: CenterOfGeometry +// Purpose : +//================================================== +gp_Pnt Select3D_SensitiveCircle::CenterOfGeometry() const { - return theMgr.DistToGeometryCenter (myCenter3D); + return gp_Pnt (myTrsf.TranslationPart()); } diff --git a/src/Select3D/Select3D_SensitiveCircle.hxx b/src/Select3D/Select3D_SensitiveCircle.hxx index 075c2658cf..ce0e103d4a 100644 --- a/src/Select3D/Select3D_SensitiveCircle.hxx +++ b/src/Select3D/Select3D_SensitiveCircle.hxx @@ -17,93 +17,70 @@ #ifndef _Select3D_SensitiveCircle_HeaderFile #define _Select3D_SensitiveCircle_HeaderFile +#include + #include -#include -#include -#include -#include - -//! A framework to define sensitive 3D arcs and circles. -//! In some cases this class can raise Standard_ConstructionError and -//! Standard_OutOfRange exceptions. For more details see Select3D_SensitivePoly. -class Select3D_SensitiveCircle : public Select3D_SensitivePoly + +//! A framework to define sensitive 3D circles. +class Select3D_SensitiveCircle : public Select3D_SensitiveEntity { - DEFINE_STANDARD_RTTIEXT(Select3D_SensitiveCircle, Select3D_SensitivePoly) + DEFINE_STANDARD_RTTIEXT(Select3D_SensitiveCircle, Select3D_SensitiveEntity) public: //! Constructs the sensitive circle object defined by the - //! owner theOwnerId, the circle theCircle, the boolean - //! theIsFilled and the number of points theNbPnts. + //! owner theOwnerId, the circle theCircle and the boolean theIsFilled. Standard_EXPORT Select3D_SensitiveCircle (const Handle(SelectMgr_EntityOwner)& theOwnerId, const gp_Circ& theCircle, - const Standard_Boolean theIsFilled = Standard_False, - const Standard_Integer theNbPnts = 12); - - //! Constructs the sensitive arc object defined by the - //! owner theOwnerId, the circle theCircle, the parameters theU1 - //! and theU2, the boolean theIsFilled and the number of points theNbPnts. - //! theU1 and theU2 define the first and last points of the arc on theCircle. - Standard_EXPORT Select3D_SensitiveCircle (const Handle(SelectMgr_EntityOwner)& theOwnerId, - const gp_Circ& theCircle, - const Standard_Real theU1, - const Standard_Real theU2, - const Standard_Boolean theIsFilled = Standard_False, - const Standard_Integer theNbPnts = 12); - - //! Constructs the sensitive circle object defined by the - //! owner theOwnerId, the array of triangles thePnts3d, and the boolean theIsFilled. - //! thePnts3d is an array of consecutive triangles on the - //! circle. The triangle i+1 lies on the intersection of the - //! tangents to the circle of i and i+2. Note, that the first point of thePnts3d - //! must be equal to the last point of thePnts3d. - Standard_EXPORT Select3D_SensitiveCircle (const Handle(SelectMgr_EntityOwner)& theOwnerId, - const Handle(TColgp_HArray1OfPnt)& thePnts3d, const Standard_Boolean theIsFilled = Standard_False); //! Constructs the sensitive circle object defined by the - //! owner theOwnerId, the array of points thePnts3d, and the boolean theIsFilled. - //! If the length of thePnts3d is more then 1, the first point of thePnts3d - //! must be equal to the last point of thePnts3d. - Standard_EXPORT Select3D_SensitiveCircle (const Handle(SelectMgr_EntityOwner)& theOwnerId, - const TColgp_Array1OfPnt& thePnts3d, - const Standard_Boolean theIsFilled = Standard_False); + //! owner theOwnerId, the circle theCircle, the boolean + //! theIsFilled and the number of points theNbPnts. + Standard_DEPRECATED("Deprecated constructor, theNbPnts parameter will be ignored") + Select3D_SensitiveCircle (const Handle(SelectMgr_EntityOwner)& theOwnerId, + const gp_Circ& theCircle, + const Standard_Boolean theIsFilled, + const Standard_Integer /*theNbPnts*/) + : Select3D_SensitiveCircle (theOwnerId, theCircle, theIsFilled) + { } //! Checks whether the circle overlaps current selecting volume Standard_EXPORT virtual Standard_Boolean Matches (SelectBasics_SelectingVolumeManager& theMgr, SelectBasics_PickResult& thePickResult) Standard_OVERRIDE; + //! Returns a copy of this sensitive circle Standard_EXPORT virtual Handle(Select3D_SensitiveEntity) GetConnected() Standard_OVERRIDE; - //! Returns center of the circle. If location - //! transformation is set, it will be applied - Standard_EXPORT virtual gp_Pnt CenterOfGeometry() const Standard_OVERRIDE; + //! Returns bounding box of the circle. + //! If location transformation is set, it will be applied + Standard_EXPORT virtual Select3D_BndBox3d BoundingBox() Standard_OVERRIDE; - //! Builds BVH tree for a circle's edge segments if needed - Standard_EXPORT virtual void BVH() Standard_OVERRIDE; + //! Always returns Standard_False + virtual Standard_Boolean ToBuildBVH() const Standard_OVERRIDE { return Standard_False; } - //! Returns TRUE if BVH tree is in invalidated state - Standard_EXPORT virtual Standard_Boolean ToBuildBVH() const Standard_OVERRIDE; + //! Returns the amount of points + virtual Standard_Integer NbSubElements() const Standard_OVERRIDE { return 1; } -protected: + //! Returns center of the circle with transformation applied + Standard_EXPORT virtual gp_Pnt CenterOfGeometry() const Standard_OVERRIDE; - //! Calculates distance from the 3d projection of used-picked screen point - //! to center of the geometry - Standard_EXPORT virtual Standard_Real distanceToCOG (SelectBasics_SelectingVolumeManager& theMgr) Standard_OVERRIDE; + //! The transformation for gp::XOY() with center in gp::Origin(), + //! it specifies the position and orientation of the circle. + const gp_Trsf& Transformation() const { return myTrsf; } -private: + //! Returns circle + gp_Circ Circle() const { return gp_Circ (gp::XOY().Transformed (myTrsf), myRadius); } - //! Computes myCenter3D as the barycenter of points from mypolyg3d - void computeCenter3D(); + //! Returns circle radius + Standard_Real Radius() const { return myRadius; } private: - Select3D_TypeOfSensitivity mySensType; //!< True if type of selection is interior, false otherwise - gp_Pnt myCenter3D; //!< Center of a circle - gp_Circ myCircle; //!< Points of the circle - Standard_Real myStart; //!< Sensitive arc parameter - Standard_Real myEnd; //!< Sensitive arc parameter + Select3D_TypeOfSensitivity mySensType; //!< Type of sensitivity: boundary or interior + gp_Trsf myTrsf; //!< Circle transformation to apply + Standard_Real myRadius; //!< Circle radius }; -DEFINE_STANDARD_HANDLE(Select3D_SensitiveCircle, Select3D_SensitivePoly) +DEFINE_STANDARD_HANDLE(Select3D_SensitiveCircle, Select3D_SensitiveEntity) #endif // _Select3D_SensitiveCircle_HeaderFile diff --git a/src/Select3D/Select3D_SensitiveCylinder.cxx b/src/Select3D/Select3D_SensitiveCylinder.cxx index 6c2ebf181e..288795d0cb 100644 --- a/src/Select3D/Select3D_SensitiveCylinder.cxx +++ b/src/Select3D/Select3D_SensitiveCylinder.cxx @@ -25,12 +25,14 @@ Select3D_SensitiveCylinder::Select3D_SensitiveCylinder (const Handle(SelectMgr_E const Standard_Real theBottomRad, const Standard_Real theTopRad, const Standard_Real theHeight, - const gp_Trsf& theTrsf) + const gp_Trsf& theTrsf, + const Standard_Boolean theIsHollow) : Select3D_SensitiveEntity (theOwnerId), myTrsf (theTrsf), myBottomRadius (theBottomRad), myTopRadius (theTopRad), - myHeight (theHeight) + myHeight (theHeight), + myIsHollow (theIsHollow) { } @@ -46,14 +48,14 @@ Standard_Boolean Select3D_SensitiveCylinder::Matches (SelectBasics_SelectingVolu if (!theMgr.IsOverlapAllowed()) { bool isInside = true; - return theMgr.OverlapsCylinder (myBottomRadius, myTopRadius, myHeight, myTrsf, &isInside) && isInside; + return theMgr.OverlapsCylinder (myBottomRadius, myTopRadius, myHeight, myTrsf, myIsHollow, &isInside) && isInside; } else { - return theMgr.OverlapsCylinder (myBottomRadius, myTopRadius, myHeight, myTrsf, NULL); + return theMgr.OverlapsCylinder (myBottomRadius, myTopRadius, myHeight, myTrsf, myIsHollow, NULL); } } - if (!theMgr.OverlapsCylinder (myBottomRadius, myTopRadius, myHeight, myTrsf, thePickResult)) + if (!theMgr.OverlapsCylinder (myBottomRadius, myTopRadius, myHeight, myTrsf, myIsHollow, thePickResult)) { return false; } diff --git a/src/Select3D/Select3D_SensitiveCylinder.hxx b/src/Select3D/Select3D_SensitiveCylinder.hxx index 7a963e224a..30f789197c 100644 --- a/src/Select3D/Select3D_SensitiveCylinder.hxx +++ b/src/Select3D/Select3D_SensitiveCylinder.hxx @@ -32,7 +32,8 @@ public: const Standard_Real theBottomRad, const Standard_Real theTopRad, const Standard_Real theHeight, - const gp_Trsf& theTrsf); + const gp_Trsf& theTrsf, + const Standard_Boolean theIsHollow = Standard_False); //! Checks whether the cylinder overlaps current selecting volume Standard_EXPORT virtual Standard_Boolean Matches (SelectBasics_SelectingVolumeManager& theMgr, @@ -66,11 +67,15 @@ public: //! Returns cylinder height Standard_Real Height() const { return myHeight; } + //! Returns true if the cylinder is empty inside + Standard_Boolean IsHollow() const { return myIsHollow; } + protected: - gp_Trsf myTrsf; //!< cylinder transformation to apply - Standard_Real myBottomRadius; //!< cylinder bottom radius - Standard_Real myTopRadius; //!< cylinder top radius - Standard_Real myHeight; //!< cylinder height + gp_Trsf myTrsf; //!< cylinder transformation to apply + Standard_Real myBottomRadius; //!< cylinder bottom radius + Standard_Real myTopRadius; //!< cylinder top radius + Standard_Real myHeight; //!< cylinder height + Standard_Boolean myIsHollow; //!< true if the cylinder is empty inside }; #endif // _Select3D_SensitiveSphere_HeaderFile diff --git a/src/Select3D/Select3D_SensitivePoly.cxx b/src/Select3D/Select3D_SensitivePoly.cxx index 33e733b1ea..162af349ff 100644 --- a/src/Select3D/Select3D_SensitivePoly.cxx +++ b/src/Select3D/Select3D_SensitivePoly.cxx @@ -13,8 +13,71 @@ #include +#include + IMPLEMENT_STANDARD_RTTIEXT(Select3D_SensitivePoly,Select3D_SensitiveSet) +namespace +{ + static Standard_Integer GetCircleNbPoints (const gp_Circ& theCircle, + const Standard_Integer theNbPnts, + const Standard_Real theU1, + const Standard_Real theU2, + const Standard_Boolean theIsFilled) + { + // Check if number of points is invalid. + // In this case myPolyg raises Standard_ConstructionError + // exception (see constructor below). + if (theNbPnts <= 0) + { + return 0; + } + + if (theCircle.Radius() > Precision::Confusion()) + { + const Standard_Boolean isSector = theIsFilled && Abs (Abs (theU2 - theU1) - 2.0 * M_PI) > gp::Resolution(); + return 2 * theNbPnts + 1 + (isSector ? 2 : 0); + } + + // The radius is too small and circle degenerates into point + return 1; + } + + //! Definition of circle polyline + static void initCircle (Select3D_PointData& thePolygon, + const gp_Circ& theCircle, + const Standard_Real theU1, + const Standard_Real theU2, + const Standard_Boolean theIsFilled, + const Standard_Integer theNbPnts) + { + const Standard_Real aStep = (theU2 - theU1) / theNbPnts; + const Standard_Real aRadius = theCircle.Radius(); + Standard_Integer aPntIdx = 0; + Standard_Real aCurU = theU1; + gp_Pnt aP1; + gp_Vec aV1; + + const Standard_Boolean isSector = Abs (theU2 - theU1 - 2.0 * M_PI) > gp::Resolution(); + + if (isSector && theIsFilled) { thePolygon.SetPnt (aPntIdx++, theCircle.Location()); } + + for (Standard_Integer anIndex = 1; anIndex <= theNbPnts; ++anIndex, aCurU += aStep) + { + ElCLib::CircleD1 (aCurU, theCircle.Position(), theCircle.Radius(), aP1, aV1); + thePolygon.SetPnt (aPntIdx++, aP1); + + aV1.Normalize(); + const gp_Pnt aP2 = aP1.XYZ() + aV1.XYZ() * Tan (aStep * 0.5) * aRadius; + thePolygon.SetPnt (aPntIdx++, aP2); + } + aP1 = ElCLib::CircleValue (theU2, theCircle.Position(), theCircle.Radius()); + thePolygon.SetPnt (aPntIdx++, aP1); + + if (isSector && theIsFilled) { thePolygon.SetPnt (aPntIdx++, theCircle.Location()); } + } +} + //================================================== // Function: Select3D_SensitivePoly // Purpose : @@ -23,7 +86,8 @@ Select3D_SensitivePoly::Select3D_SensitivePoly (const Handle(SelectMgr_EntityOwn const TColgp_Array1OfPnt& thePoints, const Standard_Boolean theIsBVHEnabled) : Select3D_SensitiveSet (theOwnerId), - myPolyg (thePoints.Upper() - thePoints.Lower() + 1) + myPolyg (thePoints.Upper() - thePoints.Lower() + 1), + mySensType (Select3D_TOS_BOUNDARY) { Standard_Integer aLowerIdx = thePoints.Lower(); Standard_Integer anUpperIdx = thePoints.Upper(); @@ -64,7 +128,8 @@ Select3D_SensitivePoly::Select3D_SensitivePoly (const Handle(SelectMgr_EntityOwn const Handle(TColgp_HArray1OfPnt)& thePoints, const Standard_Boolean theIsBVHEnabled) : Select3D_SensitiveSet (theOwnerId), - myPolyg (thePoints->Upper() - thePoints->Lower() + 1) + myPolyg (thePoints->Upper() - thePoints->Lower() + 1), + mySensType (Select3D_TOS_BOUNDARY) { Standard_Integer aLowerIdx = thePoints->Lower(); Standard_Integer anUpperIdx = thePoints->Upper(); @@ -105,7 +170,8 @@ Select3D_SensitivePoly::Select3D_SensitivePoly (const Handle(SelectMgr_EntityOwn const Standard_Boolean theIsBVHEnabled, const Standard_Integer theNbPnts) : Select3D_SensitiveSet (theOwnerId), - myPolyg (theNbPnts) + myPolyg (theNbPnts), + mySensType (Select3D_TOS_BOUNDARY) { if (theIsBVHEnabled) { @@ -119,6 +185,80 @@ Select3D_SensitivePoly::Select3D_SensitivePoly (const Handle(SelectMgr_EntityOwn myIsComputed = Standard_False; } +//================================================== +// Function: Creation +// Purpose : +//================================================== +Select3D_SensitivePoly::Select3D_SensitivePoly (const Handle(SelectMgr_EntityOwner)& theOwnerId, + const gp_Circ& theCircle, + const Standard_Real theU1, + const Standard_Real theU2, + const Standard_Boolean theIsFilled, + const Standard_Integer theNbPnts) +: Select3D_SensitivePoly (theOwnerId, !theIsFilled, GetCircleNbPoints (theCircle, theNbPnts, theU1, theU2, theIsFilled)) +{ + mySensType = theIsFilled ? Select3D_TOS_INTERIOR : Select3D_TOS_BOUNDARY; + + if (myPolyg.Size() != 1) + { + initCircle (myPolyg, theCircle, Min (theU1, theU2), Max (theU1, theU2), theIsFilled, theNbPnts); + } + else + { + myPolyg.SetPnt (0, theCircle.Position().Location()); + } + + if (!theIsFilled) + { + SetSensitivityFactor (6); + } +} + +//======================================================================= +// function : Matches +// purpose : +//======================================================================= +Standard_Boolean Select3D_SensitivePoly::Matches (SelectBasics_SelectingVolumeManager& theMgr, + SelectBasics_PickResult& thePickResult) +{ + if (mySensType == Select3D_TOS_BOUNDARY) + { + if (!Select3D_SensitiveSet::Matches (theMgr, thePickResult)) + { + return Standard_False; + } + } + else if (mySensType == Select3D_TOS_INTERIOR) + { + Handle(TColgp_HArray1OfPnt) anArrayOfPnt; + Points3D (anArrayOfPnt); + if (!theMgr.IsOverlapAllowed()) + { + if (theMgr.GetActiveSelectionType() == SelectMgr_SelectionType_Polyline) + { + SelectBasics_PickResult aDummy; + return theMgr.OverlapsPolygon (anArrayOfPnt->Array1(), mySensType, aDummy); + } + for (Standard_Integer aPntIdx = anArrayOfPnt->Lower(); aPntIdx <= anArrayOfPnt->Upper(); ++aPntIdx) + { + if (!theMgr.OverlapsPoint (anArrayOfPnt->Value(aPntIdx))) + { + return Standard_False; + } + } + return Standard_True; + } + + if (!theMgr.OverlapsPolygon (anArrayOfPnt->Array1(), Select3D_TOS_INTERIOR, thePickResult)) + { + return Standard_False; + } + thePickResult.SetDistToGeomCenter (distanceToCOG(theMgr)); + } + + return Standard_True; +} + //================================================== // function : BoundingBox // purpose : Returns bounding box of a polygon. If location diff --git a/src/Select3D/Select3D_SensitivePoly.hxx b/src/Select3D/Select3D_SensitivePoly.hxx index fa96f412bd..77ead4bc7d 100644 --- a/src/Select3D/Select3D_SensitivePoly.hxx +++ b/src/Select3D/Select3D_SensitivePoly.hxx @@ -14,13 +14,13 @@ #ifndef _Select3D_SensitivePoly_HeaderFile #define _Select3D_SensitivePoly_HeaderFile +#include #include #include #include #include #include - //! Sensitive Entity to make a face selectable. //! In some cases this class can raise Standard_ConstructionError and //! Standard_OutOfRange exceptions from its member Select3D_PointData @@ -46,13 +46,28 @@ public: const Handle(TColgp_HArray1OfPnt)& thePoints, const Standard_Boolean theIsBVHEnabled); - //! Constructs the sensitive circle object defined by the - //! owner OwnerId, the circle Circle, the Boolean - //! FilledCircle and the number of points NbOfPoints. + //! Constructs the sensitive arc object defined by the + //! owner theOwnerId, the circle theCircle, the parameters theU1 + //! and theU2, the boolean theIsFilled and the number of points theNbPnts. + //! theU1 and theU2 define the first and last points of the arc on theCircle. + Standard_EXPORT Select3D_SensitivePoly (const Handle(SelectMgr_EntityOwner)& theOwnerId, + const gp_Circ& theCircle, + const Standard_Real theU1, + const Standard_Real theU2, + const Standard_Boolean theIsFilled = Standard_False, + const Standard_Integer theNbPnts = 12); + + //! Constructs a sensitive curve or arc object defined by the + //! owner theOwnerId, the theIsBVHEnabled flag, and the + //! maximum number of points on the curve: theNbPnts. Standard_EXPORT Select3D_SensitivePoly (const Handle(SelectMgr_EntityOwner)& theOwnerId, const Standard_Boolean theIsBVHEnabled, const Standard_Integer theNbPnts = 6); + //! Checks whether the poly overlaps current selecting volume + Standard_EXPORT virtual Standard_Boolean Matches (SelectBasics_SelectingVolumeManager& theMgr, + SelectBasics_PickResult& thePickResult) Standard_OVERRIDE; + //! Returns the amount of segments in poly Standard_EXPORT virtual Standard_Integer NbSubElements() const Standard_OVERRIDE; @@ -128,11 +143,12 @@ protected: protected: - Select3D_PointData myPolyg; //!< Points of the poly - mutable gp_Pnt myCOG; //!< Center of the poly - Handle(TColStd_HArray1OfInteger) mySegmentIndexes; //!< Segment indexes for BVH tree build - Select3D_BndBox3d myBndBox; //!< Bounding box of the poly - mutable Standard_Boolean myIsComputed; //!< Is true if all the points and data structures of polygon are initialized + Select3D_PointData myPolyg; //!< Points of the poly + mutable gp_Pnt myCOG; //!< Center of the poly + Handle(TColStd_HArray1OfInteger) mySegmentIndexes; //!< Segment indexes for BVH tree build + Select3D_BndBox3d myBndBox; //!< Bounding box of the poly + Select3D_TypeOfSensitivity mySensType; //!< Type of sensitivity: boundary or interior + mutable Standard_Boolean myIsComputed; //!< Is true if all the points and data structures of polygon are initialized }; DEFINE_STANDARD_HANDLE(Select3D_SensitivePoly, Select3D_SensitiveSet) diff --git a/src/SelectBasics/SelectBasics_SelectingVolumeManager.hxx b/src/SelectBasics/SelectBasics_SelectingVolumeManager.hxx index 5fa66b04f4..88009fca9a 100644 --- a/src/SelectBasics/SelectBasics_SelectingVolumeManager.hxx +++ b/src/SelectBasics/SelectBasics_SelectingVolumeManager.hxx @@ -96,21 +96,41 @@ public: Standard_Boolean* theInside = NULL) const = 0; //! Returns true if selecting volume is overlapped by cylinder (or cone) with radiuses theBottomRad - //! and theTopRad, height theHeight and transformation to apply theTrsf. + //! and theTopRad, height theHeight, the boolean theIsHollow and transformation to apply theTrsf. virtual Standard_Boolean OverlapsCylinder (const Standard_Real theBottomRad, const Standard_Real theTopRad, const Standard_Real theHeight, const gp_Trsf& theTrsf, + const Standard_Boolean theIsHollow, SelectBasics_PickResult& thePickResult) const = 0; //! Returns true if selecting volume is overlapped by cylinder (or cone) with radiuses theBottomRad - //! and theTopRad, height theHeight and transformation to apply theTrsf. + //! and theTopRad, height theHeight, the boolean theIsHollow and transformation to apply theTrsf. virtual Standard_Boolean OverlapsCylinder (const Standard_Real theBottomRad, const Standard_Real theTopRad, const Standard_Real theHeight, const gp_Trsf& theTrsf, + const Standard_Boolean theIsHollow, Standard_Boolean* theInside = NULL) const = 0; + //! Returns true if selecting volume is overlapped by circle with radius theRadius, + //! the boolean theIsFilled, and transformation to apply theTrsf. + //! The position and orientation of the circle are specified + //! via theTrsf transformation for gp::XOY() with center in gp::Origin(). + virtual Standard_Boolean OverlapsCircle (const Standard_Real theRadius, + const gp_Trsf& theTrsf, + const Standard_Boolean theIsFilled, + SelectBasics_PickResult& thePickResult) const = 0; + + //! Returns true if selecting volume is overlapped by circle with radius theRadius, + //! the boolean theIsFilled, and transformation to apply theTrsf. + //! The position and orientation of the circle are specified + //! via theTrsf transformation for gp::XOY() with center in gp::Origin(). + virtual Standard_Boolean OverlapsCircle (const Standard_Real theRadius, + const gp_Trsf& theTrsf, + const Standard_Boolean theIsFilled, + Standard_Boolean* theInside = NULL) const = 0; + public: //! Calculates distance from 3d projection of user-defined selection point diff --git a/src/SelectMgr/SelectMgr.cxx b/src/SelectMgr/SelectMgr.cxx index b0999fae33..1f647b3d28 100644 --- a/src/SelectMgr/SelectMgr.cxx +++ b/src/SelectMgr/SelectMgr.cxx @@ -23,6 +23,7 @@ #include #include #include +#include #include #include #include @@ -133,41 +134,56 @@ namespace } } + //! Fill in circle polylines. + static void addCircle (Prs3d_NListOfSequenceOfPnt& theSeqLines, + const Standard_Real theRadius, + const gp_Trsf& theTrsf, + const Standard_Real theHeight = 0) + { + const Standard_Real anUStep = 0.1; + gp_XYZ aVec (0, 0, theHeight); + + Handle(TColgp_HSequenceOfPnt) aPoints = new TColgp_HSequenceOfPnt(); + Geom_Circle aGeom (gp_Ax2(), theRadius); + for (Standard_Real anU = 0.0f; anU < (2.0 * M_PI + anUStep); anU += anUStep) + { + gp_Pnt aCircPnt = aGeom.Value (anU).Coord() + aVec; + aCircPnt.Transform (theTrsf); + aPoints->Append (aCircPnt); + } + theSeqLines.Append (aPoints); + } + //! Fill in cylinder polylines. static void addCylinder (Prs3d_NListOfSequenceOfPnt& theSeqLines, - const Handle(Select3D_SensitiveCylinder)& theSensCyl) + const Handle(Select3D_SensitiveCylinder)& theSensCyl, + const gp_Trsf& theLoc) { - Handle(TColgp_HSequenceOfPnt) aVertLines[2]; - aVertLines[0] = new TColgp_HSequenceOfPnt(); - aVertLines[1] = new TColgp_HSequenceOfPnt(); - const gp_Trsf& aTrsf = theSensCyl->Transformation(); + Handle(TColgp_HSequenceOfPnt) aVertLine1 = new TColgp_HSequenceOfPnt(); + Handle(TColgp_HSequenceOfPnt) aVertLine2 = new TColgp_HSequenceOfPnt(); + + const gp_Trsf& aTrsf = theLoc.Multiplied (theSensCyl->Transformation()); const Standard_Real aHeight = theSensCyl->Height(); - const Standard_Real anUStep = 0.1; for (int aCircNum = 0; aCircNum < 3; aCircNum++) { Standard_Real aRadius = 0.5 * (2 - aCircNum) * theSensCyl->BottomRadius() + 0.5 * aCircNum * theSensCyl->TopRadius(); - Geom_Circle aGeom (gp_Ax2(), aRadius); - Handle(TColgp_HSequenceOfPnt) aPoints = new TColgp_HSequenceOfPnt(); - gp_XYZ aVec (0, 0, aHeight * 0.5 * aCircNum); + const gp_XYZ aVec (0, 0, aHeight * 0.5 * aCircNum); if (aCircNum != 1) { - aVertLines[0]->Append (gp_Pnt(aGeom.Value (0).Coord() + aVec).Transformed (aTrsf)); - aVertLines[1]->Append (gp_Pnt(aGeom.Value (M_PI).Coord() + aVec).Transformed (aTrsf)); + aVertLine1->Append (gp_Pnt (gp_XYZ (aRadius, 0, 0) + aVec).Transformed (aTrsf)); + aVertLine2->Append (gp_Pnt (gp_XYZ (-aRadius, 0, 0) + aVec).Transformed (aTrsf)); } - for (Standard_Real anU = 0.0f; anU < (2.0 * M_PI + anUStep); anU += anUStep) + if (aRadius > Precision::Confusion()) { - gp_Pnt aCircPnt = aGeom.Value (anU).Coord() + aVec; - aCircPnt.Transform (aTrsf); - aPoints->Append (aCircPnt); + addCircle (theSeqLines, aRadius, aTrsf, aVec.Z()); } - theSeqLines.Append (aPoints); } - theSeqLines.Append (aVertLines[0]); - theSeqLines.Append (aVertLines[1]); + theSeqLines.Append (aVertLine1); + theSeqLines.Append (aVertLine2); } } @@ -193,7 +209,11 @@ void SelectMgr::ComputeSensitivePrs (const Handle(Graphic3d_Structure)& thePrs, } else if (Handle(Select3D_SensitiveCylinder) aSensCyl = Handle(Select3D_SensitiveCylinder)::DownCast (anEnt)) { - addCylinder (aSeqLines, aSensCyl); + addCylinder (aSeqLines, aSensCyl, theLoc); + } + else if (Handle(Select3D_SensitiveCircle) aSensCircle = Handle(Select3D_SensitiveCircle)::DownCast (anEnt)) + { + addCircle (aSeqLines, aSensCircle->Radius(), theLoc.Multiplied (aSensCircle->Transformation())); } else if (Handle(Select3D_SensitiveFace) aFace = Handle(Select3D_SensitiveFace)::DownCast(anEnt)) { diff --git a/src/SelectMgr/SelectMgr_AxisIntersector.cxx b/src/SelectMgr/SelectMgr_AxisIntersector.cxx index c4cbf1fa74..44ff25b752 100644 --- a/src/SelectMgr/SelectMgr_AxisIntersector.cxx +++ b/src/SelectMgr/SelectMgr_AxisIntersector.cxx @@ -227,7 +227,7 @@ Standard_Boolean SelectMgr_AxisIntersector::OverlapsBox (const SelectMgr_Vec3& t Standard_Boolean* theInside) const { Standard_ASSERT_RAISE(mySelectionType == SelectMgr_SelectionType_Point, - "Error! SelectMgr_AxisIntersector::Overlaps() should be called after selection axis initialization"); + "Error! SelectMgr_AxisIntersector::OverlapsBox() should be called after selection axis initialization"); (void )theInside; Standard_Real aTimeEnter, aTimeLeave; @@ -252,7 +252,7 @@ Standard_Boolean SelectMgr_AxisIntersector::OverlapsBox (const SelectMgr_Vec3& t SelectBasics_PickResult& thePickResult) const { Standard_ASSERT_RAISE(mySelectionType == SelectMgr_SelectionType_Point, - "Error! SelectMgr_AxisIntersector::Overlaps() should be called after selection axis initialization"); + "Error! SelectMgr_AxisIntersector::OverlapsBox() should be called after selection axis initialization"); Standard_Real aTimeEnter, aTimeLeave; if (!hasIntersection (theBoxMin, theBoxMax, aTimeEnter, aTimeLeave)) @@ -283,7 +283,7 @@ Standard_Boolean SelectMgr_AxisIntersector::OverlapsPoint (const gp_Pnt& thePnt, SelectBasics_PickResult& thePickResult) const { Standard_ASSERT_RAISE(mySelectionType == SelectMgr_SelectionType_Point, - "Error! SelectMgr_AxisIntersector::Overlaps() should be called after selection axis initialization"); + "Error! SelectMgr_AxisIntersector::OverlapsPoint() should be called after selection axis initialization"); Standard_Real aDepth = 0.0; if (!hasIntersection (thePnt, aDepth)) @@ -304,7 +304,7 @@ Standard_Boolean SelectMgr_AxisIntersector::OverlapsPoint (const gp_Pnt& thePnt, Standard_Boolean SelectMgr_AxisIntersector::OverlapsPoint (const gp_Pnt& thePnt) const { Standard_ASSERT_RAISE(mySelectionType == SelectMgr_SelectionType_Point, - "Error! SelectMgr_AxisIntersector::Overlaps() should be called after selection axis initialization"); + "Error! SelectMgr_AxisIntersector::OverlapsPoint() should be called after selection axis initialization"); Standard_Real aDepth = 0.0; return hasIntersection (thePnt, aDepth); @@ -320,7 +320,7 @@ Standard_Boolean SelectMgr_AxisIntersector::OverlapsSegment (const gp_Pnt& thePn SelectBasics_PickResult& thePickResult) const { Standard_ASSERT_RAISE(mySelectionType == SelectMgr_SelectionType_Point, - "Error! SelectMgr_AxisIntersector::Overlaps() should be called after selection axis initialization"); + "Error! SelectMgr_AxisIntersector::OverlapsSegment() should be called after selection axis initialization"); if (!raySegmentDistance (thePnt1, thePnt2, thePickResult)) { @@ -340,7 +340,7 @@ Standard_Boolean SelectMgr_AxisIntersector::OverlapsPolygon (const TColgp_Array1 SelectBasics_PickResult& thePickResult) const { Standard_ASSERT_RAISE(mySelectionType == SelectMgr_SelectionType_Point, - "Error! SelectMgr_AxisIntersector::Overlaps() should be called after selection axis initialization"); + "Error! SelectMgr_AxisIntersector::OverlapsPolygon() should be called after selection axis initialization"); if (theSensType == Select3D_TOS_BOUNDARY) { @@ -400,7 +400,7 @@ Standard_Boolean SelectMgr_AxisIntersector::OverlapsTriangle (const gp_Pnt& theP SelectBasics_PickResult& thePickResult) const { Standard_ASSERT_RAISE(mySelectionType == SelectMgr_SelectionType_Point, - "Error! SelectMgr_AxisIntersector::Overlaps() should be called after selection axis initialization"); + "Error! SelectMgr_AxisIntersector::OverlapsTriangle() should be called after selection axis initialization"); if (theSensType == Select3D_TOS_BOUNDARY) { @@ -503,7 +503,7 @@ Standard_Boolean SelectMgr_AxisIntersector::OverlapsSphere (const gp_Pnt& theCen Standard_Boolean* theInside) const { Standard_ASSERT_RAISE (mySelectionType == SelectMgr_SelectionType_Point, - "Error! SelectMgr_AxisIntersector::Overlaps() should be called after selection axis initialization"); + "Error! SelectMgr_AxisIntersector::OverlapsSphere() should be called after selection axis initialization"); (void )theInside; Standard_Real aTimeEnter = 0.0, aTimeLeave = 0.0; if (!RaySphereIntersection (theCenter, theRadius, myAxis.Location(), myAxis.Direction(), aTimeEnter, aTimeLeave)) @@ -527,7 +527,7 @@ Standard_Boolean SelectMgr_AxisIntersector::OverlapsSphere (const gp_Pnt& theCen SelectBasics_PickResult& thePickResult) const { Standard_ASSERT_RAISE (mySelectionType == SelectMgr_SelectionType_Point, - "Error! SelectMgr_AxisIntersector::Overlaps() should be called after selection axis initialization"); + "Error! SelectMgr_AxisIntersector::OverlapsSphere() should be called after selection axis initialization"); Standard_Real aTimeEnter = 0.0, aTimeLeave = 0.0; if (!RaySphereIntersection (theCenter, theRadius, myAxis.Location(), myAxis.Direction(), aTimeEnter, aTimeLeave)) { @@ -558,22 +558,24 @@ Standard_Boolean SelectMgr_AxisIntersector::OverlapsCylinder (const Standard_Rea const Standard_Real theTopRad, const Standard_Real theHeight, const gp_Trsf& theTrsf, + const Standard_Boolean theIsHollow, const SelectMgr_ViewClipRange& theClipRange, SelectBasics_PickResult& thePickResult) const { Standard_ASSERT_RAISE (mySelectionType == SelectMgr_SelectionType_Point, - "Error! SelectMgr_AxisIntersector::Overlaps() should be called after selection axis initialization"); + "Error! SelectMgr_AxisIntersector::OverlapsCylinder() should be called after selection axis initialization"); Standard_Real aTimeEnter = 0.0, aTimeLeave = 0.0; gp_Trsf aTrsfInv = theTrsf.Inverted(); gp_Pnt aLoc = myAxis.Location() .Transformed (aTrsfInv); gp_Dir aRayDir = myAxis.Direction().Transformed (aTrsfInv); - if (!RayCylinderIntersection (theBottomRad, theTopRad, theHeight, aLoc, aRayDir, aTimeEnter, aTimeLeave)) + if (!RayCylinderIntersection (theBottomRad, theTopRad, theHeight, aLoc, aRayDir, + theIsHollow, aTimeEnter, aTimeLeave)) { return false; } Standard_Real aDepth = 0.0; - Bnd_Range aRange (Max (aTimeEnter, 0.0), aTimeLeave); + Bnd_Range aRange (Max (aTimeEnter, 0.0), Max (aTimeEnter, aTimeLeave)); aRange.GetMin (aDepth); if (!theClipRange.GetNearestDepth (aRange, aDepth)) { @@ -606,15 +608,17 @@ Standard_Boolean SelectMgr_AxisIntersector::OverlapsCylinder (const Standard_Rea const Standard_Real theTopRad, const Standard_Real theHeight, const gp_Trsf& theTrsf, - Standard_Boolean* theInside) const + const Standard_Boolean theIsHollow, + Standard_Boolean* theInside) const { Standard_ASSERT_RAISE (mySelectionType == SelectMgr_SelectionType_Point, - "Error! SelectMgr_AxisIntersector::Overlaps() should be called after selection axis initialization"); + "Error! SelectMgr_AxisIntersector::OverlapsCylinder() should be called after selection axis initialization"); Standard_Real aTimeEnter = 0.0, aTimeLeave = 0.0; gp_Trsf aTrsfInv = theTrsf.Inverted(); gp_Pnt aLoc = myAxis.Location() .Transformed (aTrsfInv); gp_Dir aRayDir = myAxis.Direction().Transformed (aTrsfInv); - if (!RayCylinderIntersection (theBottomRad, theTopRad, theHeight, aLoc, aRayDir, aTimeEnter, aTimeLeave)) + if (!RayCylinderIntersection (theBottomRad, theTopRad, theHeight, aLoc, aRayDir, + theIsHollow, aTimeEnter, aTimeLeave)) { return false; } @@ -625,6 +629,74 @@ Standard_Boolean SelectMgr_AxisIntersector::OverlapsCylinder (const Standard_Rea return true; } +//======================================================================= +// function : OverlapsCircle +// purpose : +//======================================================================= +Standard_Boolean SelectMgr_AxisIntersector::OverlapsCircle (const Standard_Real theRadius, + const gp_Trsf& theTrsf, + const Standard_Boolean theIsFilled, + const SelectMgr_ViewClipRange& theClipRange, + SelectBasics_PickResult& thePickResult) const +{ + Standard_ASSERT_RAISE (mySelectionType == SelectMgr_SelectionType_Point, + "Error! SelectMgr_AxisIntersector::OverlapsCircle() should be called after selection axis initialization"); + Standard_Real aTime = 0.0; + gp_Trsf aTrsfInv = theTrsf.Inverted(); + gp_Pnt aLoc = myAxis.Location().Transformed (aTrsfInv); + gp_Dir aRayDir = myAxis.Direction().Transformed (aTrsfInv); + if (!RayCircleIntersection (theRadius, aLoc, aRayDir, theIsFilled, aTime)) + { + return false; + } + + Standard_Real aDepth = Max (aTime, 0.0); + if (theClipRange.IsClipped (aDepth)) + { + return false; + } + + const gp_Pnt aPntOnCylinder = aLoc.XYZ() + aRayDir.XYZ() * aDepth; + thePickResult.SetDepth (aDepth); + thePickResult.SetPickedPoint (aPntOnCylinder.Transformed (theTrsf)); + if (Abs (aPntOnCylinder.Z()) < Precision::Confusion()) + { + thePickResult.SetSurfaceNormal (-gp::DZ().Transformed (theTrsf)); + } + else + { + thePickResult.SetSurfaceNormal (gp_Vec (aPntOnCylinder.X(), aPntOnCylinder.Y(), 0.0).Transformed (theTrsf)); + } + + return true; +} + +//======================================================================= +// function : OverlapsCircle +// purpose : +//======================================================================= +Standard_Boolean SelectMgr_AxisIntersector::OverlapsCircle (const Standard_Real theRadius, + const gp_Trsf& theTrsf, + const Standard_Boolean theIsFilled, + Standard_Boolean* theInside) const +{ + Standard_ASSERT_RAISE (mySelectionType == SelectMgr_SelectionType_Point, + "Error! SelectMgr_AxisIntersector::OverlapsCircle() should be called after selection axis initialization"); + Standard_Real aTime = 0.0; + gp_Trsf aTrsfInv = theTrsf.Inverted(); + gp_Pnt aLoc = myAxis.Location().Transformed (aTrsfInv); + gp_Dir aRayDir = myAxis.Direction().Transformed (aTrsfInv); + if (!RayCircleIntersection (theRadius, aLoc, aRayDir, theIsFilled, aTime)) + { + return false; + } + if (theInside != NULL) + { + *theInside &= (aTime >= 0.0); + } + return true; +} + //======================================================================= // function : GetNearPnt // purpose : diff --git a/src/SelectMgr/SelectMgr_AxisIntersector.hxx b/src/SelectMgr/SelectMgr_AxisIntersector.hxx index 543c4e6175..6a6b60bc09 100644 --- a/src/SelectMgr/SelectMgr_AxisIntersector.hxx +++ b/src/SelectMgr/SelectMgr_AxisIntersector.hxx @@ -117,6 +117,7 @@ public: const Standard_Real theTopRad, const Standard_Real theHeight, const gp_Trsf& theTrsf, + const Standard_Boolean theIsHollow, const SelectMgr_ViewClipRange& theClipRange, SelectBasics_PickResult& thePickResult) const Standard_OVERRIDE; @@ -126,8 +127,28 @@ public: const Standard_Real theTopRad, const Standard_Real theHeight, const gp_Trsf& theTrsf, + const Standard_Boolean theIsHollow, Standard_Boolean* theInside = NULL) const Standard_OVERRIDE; + //! Returns true if selecting volume is overlapped by circle with radius theRadius, + //! boolean theIsFilled and transformation to apply theTrsf. + //! The position and orientation of the circle are specified + //! via theTrsf transformation for gp::XOY() with center in gp::Origin(). + Standard_EXPORT virtual Standard_Boolean OverlapsCircle (const Standard_Real theRadius, + const gp_Trsf& theTrsf, + const Standard_Boolean theIsFilled, + const SelectMgr_ViewClipRange& theClipRange, + SelectBasics_PickResult& thePickResult) const Standard_OVERRIDE; + + //! Returns true if selecting volume is overlapped by circle with radius theRadius, + //! boolean theIsFilled and transformation to apply theTrsf. + //! The position and orientation of the circle are specified + //! via theTrsf transformation for gp::XOY() with center in gp::Origin(). + Standard_EXPORT virtual Standard_Boolean OverlapsCircle (const Standard_Real theRadius, + const gp_Trsf& theTrsf, + const Standard_Boolean theIsFilled, + Standard_Boolean* theInside = NULL) const Standard_OVERRIDE; + public: //! Measures distance between start axis point and given point theCOG. diff --git a/src/SelectMgr/SelectMgr_BaseIntersector.cxx b/src/SelectMgr/SelectMgr_BaseIntersector.cxx index 2ce3de8123..bc3d93e45e 100644 --- a/src/SelectMgr/SelectMgr_BaseIntersector.cxx +++ b/src/SelectMgr/SelectMgr_BaseIntersector.cxx @@ -176,15 +176,15 @@ Standard_Boolean SelectMgr_BaseIntersector::RayCylinderIntersection (const Stand const Standard_Real theHeight, const gp_Pnt& theLoc, const gp_Dir& theRayDir, + const Standard_Boolean theIsHollow, Standard_Real& theTimeEnter, Standard_Real& theTimeLeave) const { Standard_Integer aNbIntersections = 0; Standard_Real anIntersections[4] = { RealLast(), RealLast(), RealLast(), RealLast() }; - //NCollection_Vector anIntersections; // vector for all intersections // Check intersections with end faces // point of intersection theRayDir and z = 0 - if (theRayDir.Z() != 0) + if (!theIsHollow && theRayDir.Z() != 0) { const Standard_Real aTime1 = (0 - theLoc.Z()) / theRayDir.Z(); const Standard_Real aX1 = theLoc.X() + theRayDir.X() * aTime1; @@ -293,6 +293,33 @@ Standard_Boolean SelectMgr_BaseIntersector::RayCylinderIntersection (const Stand return true; } +//======================================================================= +// function : RayCircleIntersection +// purpose : +//======================================================================= +Standard_Boolean SelectMgr_BaseIntersector::RayCircleIntersection (const Standard_Real theRadius, + const gp_Pnt& theLoc, + const gp_Dir& theRayDir, + const Standard_Boolean theIsFilled, + Standard_Real& theTime) const +{ + if (theRayDir.Z() != 0) + { + const Standard_Real aTime = (0 - theLoc.Z()) / theRayDir.Z(); + const Standard_Real aX1 = theLoc.X() + theRayDir.X() * aTime; + const Standard_Real anY1 = theLoc.Y() + theRayDir.Y() * aTime; + + const Standard_Real aK = aX1 * aX1 + anY1 * anY1; + if ((theIsFilled && aK <= theRadius * theRadius) + || (!theIsFilled && Abs (sqrt (aK) - theRadius) <= Precision::Confusion())) + { + theTime = aTime; + return true; + } + } + return false; +} + //======================================================================= // function : DistToGeometryCenter // purpose : diff --git a/src/SelectMgr/SelectMgr_BaseIntersector.hxx b/src/SelectMgr/SelectMgr_BaseIntersector.hxx index 5ab38e9ea9..e9bd50edfc 100644 --- a/src/SelectMgr/SelectMgr_BaseIntersector.hxx +++ b/src/SelectMgr/SelectMgr_BaseIntersector.hxx @@ -187,6 +187,7 @@ public: const Standard_Real theTopRad, const Standard_Real theHeight, const gp_Trsf& theTrsf, + const Standard_Boolean theIsHollow, const SelectMgr_ViewClipRange& theClipRange, SelectBasics_PickResult& thePickResult) const = 0; @@ -196,8 +197,28 @@ public: const Standard_Real theTopRad, const Standard_Real theHeight, const gp_Trsf& theTrsf, + const Standard_Boolean theIsHollow, Standard_Boolean* theInside = NULL) const = 0; + //! Returns true if selecting volume is overlapped by circle with radius theRadius, + //! boolean theIsFilled and transformation to apply theTrsf. + //! The position and orientation of the circle are specified + //! via theTrsf transformation for gp::XOY() with center in gp::Origin(). + virtual Standard_Boolean OverlapsCircle (const Standard_Real theBottomRad, + const gp_Trsf& theTrsf, + const Standard_Boolean theIsFilled, + const SelectMgr_ViewClipRange& theClipRange, + SelectBasics_PickResult& thePickResult) const = 0; + + //! Returns true if selecting volume is overlapped by circle with radius theRadius, + //! boolean theIsFilled and transformation to apply theTrsf. + //! The position and orientation of the circle are specified + //! via theTrsf transformation for gp::XOY() with center in gp::Origin(). + virtual Standard_Boolean OverlapsCircle (const Standard_Real theBottomRad, + const gp_Trsf& theTrsf, + const Standard_Boolean theIsFilled, + Standard_Boolean* theInside = NULL) const = 0; + public: //! Measures distance between 3d projection of user-picked @@ -224,15 +245,37 @@ public: Standard_Real& theTimeLeave) const; //! Checks whether the ray that starts at the point theLoc and directs with the direction theRayDir intersects - //! with the cylinder (or cone) with radiuses theBottomRad and theTopRad and height theHeights + //! with the hollow cylinder (or cone) + //! @param[in] theBottomRadius the bottom cylinder radius + //! @param[in] theTopRadius the top cylinder radius + //! @param[in] theHeight the cylinder height + //! @param[in] theLoc the location of the ray + //! @param[in] theRayDir the ray direction + //! @param[in] theIsHollow true if the cylinder is hollow + //! @param[out] theTimeEnter the entering the intersection + //! @param[out] theTimeLeave the leaving the intersection Standard_EXPORT virtual Standard_Boolean RayCylinderIntersection (const Standard_Real theBottomRadius, const Standard_Real theTopRadius, const Standard_Real theHeight, const gp_Pnt& theLoc, const gp_Dir& theRayDir, + const Standard_Boolean theIsHollow, Standard_Real& theTimeEnter, Standard_Real& theTimeLeave) const; + //! Checks whether the ray that starts at the point theLoc and directs with the direction theRayDir intersects + //! with the circle + //! @param[in] theRadius the circle radius + //! @param[in] theLoc the location of the ray + //! @param[in] theRayDir the ray direction + //! @param[in] theIsFilled true if it's a circle, false if it's a circle outline + //! @param[out] theTime the intersection + Standard_EXPORT virtual Standard_Boolean RayCircleIntersection (const Standard_Real theRadius, + const gp_Pnt& theLoc, + const gp_Dir& theRayDir, + const Standard_Boolean theIsFilled, + Standard_Real& theTime) const; + DEFINE_STANDARD_RTTIEXT(SelectMgr_BaseIntersector,Standard_Transient) protected: diff --git a/src/SelectMgr/SelectMgr_Frustum.hxx b/src/SelectMgr/SelectMgr_Frustum.hxx index 35f2147808..8a77af6b39 100644 --- a/src/SelectMgr/SelectMgr_Frustum.hxx +++ b/src/SelectMgr/SelectMgr_Frustum.hxx @@ -98,11 +98,25 @@ protected: const Standard_Real theTopRad, const Standard_Real theHeight, const gp_Trsf& theTrsf, + const Standard_Boolean theIsHollow, Standard_Boolean* theInside = NULL) const; + //! Intersection test between defined volume and given circle. + Standard_Boolean hasCircleOverlap (const Standard_Real theRadius, + const gp_Trsf& theTrsf, + const Standard_Boolean theIsFilled, + Standard_Boolean* theInside = NULL) const; + + //! Returns True if all vertices (theVertices) are inside the top and bottom sides of the cylinder. + Standard_Boolean isInsideCylinderEndFace (const Standard_Real theBottomRad, + const Standard_Real theTopRad, + const Standard_Real theHeight, + const gp_Trsf& theTrsf, + const TColgp_Array1OfPnt& theVertices) const; + //! Checking whether the point thePnt is inside the shape with borders theVertices. //! thePnt and theVertices lie in the same plane. - Standard_Boolean IsDotInside (const gp_Pnt& thePnt, + Standard_Boolean isDotInside (const gp_Pnt& thePnt, const TColgp_Array1OfPnt& theVertices) const; private: @@ -116,10 +130,10 @@ private: //! Checking whether the borders theVertices of the shape intersect //! the cylinder (or cone) end face with the center theCenter and radius theRadius - Standard_Boolean isIntersectCylinderEndFace (const Standard_Real theRad, - const gp_Pnt& theCenter, - const gp_Trsf& theTrsf, - const TColgp_Array1OfPnt& theVertices) const; + Standard_Boolean isIntersectCircle (const Standard_Real theRadius, + const gp_Pnt& theCenter, + const gp_Trsf& theTrsf, + const TColgp_Array1OfPnt& theVertices) const; //! Checks if AABB and frustum are separated along the given axis Standard_Boolean isSeparated (const SelectMgr_Vec3& theBoxMin, diff --git a/src/SelectMgr/SelectMgr_Frustum.lxx b/src/SelectMgr/SelectMgr_Frustum.lxx index 07be0d8d99..c01e50b6bf 100644 --- a/src/SelectMgr/SelectMgr_Frustum.lxx +++ b/src/SelectMgr/SelectMgr_Frustum.lxx @@ -1,4 +1,4 @@ -// Created on: 2015-03-16 +// Created on: 2015-03-16 // Created by: Varvara POSKONINA // Copyright (c) 2005-2014 OPEN CASCADE SAS // @@ -520,7 +520,7 @@ Standard_Boolean SelectMgr_Frustum::hasSphereOverlap (const gp_Pnt& thePnt, // purpose : // ======================================================================= template -Standard_Boolean SelectMgr_Frustum::IsDotInside (const gp_Pnt& thePnt, +Standard_Boolean SelectMgr_Frustum::isDotInside (const gp_Pnt& thePnt, const TColgp_Array1OfPnt& theVertices) const { Standard_Real anAngle = 0.0; @@ -598,14 +598,14 @@ Standard_Boolean SelectMgr_Frustum::isSegmentsIntersect (const gp_Pnt& thePnt } // ======================================================================= -// function : isIntersectCylinderEndFace +// function : isIntersectCircle // purpose : // ======================================================================= template -Standard_Boolean SelectMgr_Frustum::isIntersectCylinderEndFace (const Standard_Real theRad, - const gp_Pnt& theCenter, - const gp_Trsf& theTrsf, - const TColgp_Array1OfPnt& theVertices) const +Standard_Boolean SelectMgr_Frustum::isIntersectCircle (const Standard_Real theRadius, + const gp_Pnt& theCenter, + const gp_Trsf& theTrsf, + const TColgp_Array1OfPnt& theVertices) const { const gp_Trsf aTrsfInv = theTrsf.Inverted(); const gp_Dir aRayDir = gp_Dir (myEdgeDirs[N == 4 ? 4 : 0]).Transformed (aTrsfInv); @@ -633,7 +633,7 @@ Standard_Boolean SelectMgr_Frustum::isIntersectCylinderEndFace (const Standar // Solving quadratic equation anA * T^2 + 2 * aK * T + aC = 0 const Standard_Real anA = (aX1 - aX2) * (aX1 - aX2) + (anY1 - anY2) * (anY1 - anY2); const Standard_Real aK = aX1 * (aX2 - aX1) + anY1 * (anY2 - anY1); - const Standard_Real aC = aX1 * aX1 + anY1 * anY1 - theRad * theRad; + const Standard_Real aC = aX1 * aX1 + anY1 * anY1 - theRadius * theRadius; const Standard_Real aDiscr = aK * aK - anA * aC; if (aDiscr >= 0.0) @@ -649,6 +649,47 @@ Standard_Boolean SelectMgr_Frustum::isIntersectCylinderEndFace (const Standar return false; } +// ======================================================================= +// function : isInsideCylinderEndFace +// purpose : +// ======================================================================= +template +Standard_Boolean SelectMgr_Frustum::isInsideCylinderEndFace (const Standard_Real theBottomRad, + const Standard_Real theTopRad, + const Standard_Real theHeight, + const gp_Trsf& theTrsf, + const TColgp_Array1OfPnt& theVertices) const +{ + const gp_Trsf aTrsfInv = theTrsf.Inverted(); + const gp_Dir aRayDir = gp_Dir (myEdgeDirs[N == 4 ? 4 : 0]).Transformed (aTrsfInv); + if (aRayDir.Z() == 0.0) + { + return false; + } + + for (Standard_Integer anIdx = theVertices.Lower(); anIdx <= theVertices.Upper(); anIdx++) + { + const gp_Pnt aLoc = theVertices.Value (anIdx).Transformed (aTrsfInv); + + const Standard_Real aTime1 = (0 - aLoc.Z()) / aRayDir.Z(); + const Standard_Real aX1 = aLoc.X() + aRayDir.X() * aTime1; + const Standard_Real anY1 = aLoc.Y() + aRayDir.Y() * aTime1; + + const Standard_Real aTime2 = (theHeight - aLoc.Z()) / aRayDir.Z(); + const Standard_Real aX2 = aLoc.X() + aRayDir.X() * aTime2; + const Standard_Real anY2 = aLoc.Y() + aRayDir.Y() * aTime2; + + if (aX1 * aX1 + anY1 * anY1 <= theBottomRad * theBottomRad + && aX2 * aX2 + anY2 * anY2 <= theTopRad * theTopRad) + { + continue; + } + + return false; + } + return true; +} + // ======================================================================= // function : hasCylinderOverlap // purpose : @@ -658,8 +699,37 @@ Standard_Boolean SelectMgr_Frustum::hasCylinderOverlap (const Standard_Real t const Standard_Real theTopRad, const Standard_Real theHeight, const gp_Trsf& theTrsf, + const Standard_Boolean theIsHollow, Standard_Boolean* theInside) const { + gp_Pnt aVerticesBuf[N]; + TColgp_Array1OfPnt aVertices (aVerticesBuf[0], 0, N - 1); + const Standard_Integer anIncFactor = (Camera()->IsOrthographic() && N == 4) ? 2 : 1; + if (anIncFactor == 2) + { + const Standard_Integer anIndices[] = { 0, 2, 6, 4 }; + for (Standard_Integer anIdx = 0; anIdx < N; anIdx++) + { + aVertices.SetValue (anIdx, myVertices[anIndices[anIdx]]); + } + } + else + { + for (Standard_Integer anIdx = 0; anIdx < N; anIdx++) + { + aVertices.SetValue (anIdx, myVertices[anIdx]); + } + } + + if (theIsHollow && isInsideCylinderEndFace (theBottomRad, theTopRad, theHeight, theTrsf, aVertices)) + { + if (theInside != NULL) + { + *theInside = false; + } + return false; + } + const gp_Dir aCylNorm (gp::DZ().Transformed (theTrsf)); const gp_Pnt aBottomCenter (gp::Origin().Transformed (theTrsf)); const gp_Pnt aTopCenter = aBottomCenter.XYZ() + aCylNorm.XYZ() * theHeight; @@ -698,29 +768,11 @@ Standard_Boolean SelectMgr_Frustum::hasCylinderOverlap (const Standard_Real t aPoints[5] = aBottomCenterProject.XYZ() - aDirEndFaces.XYZ() * theBottomRad; const TColgp_Array1OfPnt aPointsArr (aPoints[0], 0, 5); - gp_Pnt aVerticesBuf[N]; - TColgp_Array1OfPnt aVertices (aVerticesBuf[0], 0, N - 1); - const Standard_Integer anIncFactor = (Camera()->IsOrthographic() && N == 4) ? 2 : 1; - if (anIncFactor == 2) - { - const Standard_Integer anIndices[] = { 0, 2, 6, 4 }; - for (Standard_Integer anIdx = 0; anIdx < N; anIdx++) - { - aVertices.SetValue (anIdx, myVertices[anIndices[anIdx]]); - } - } - else - { - for (Standard_Integer anIdx = 0; anIdx < N; anIdx++) - { - aVertices.SetValue (anIdx, myVertices[anIdx]); - } - } for (Standard_Integer anIdx = 0; anIdx < N; anIdx++) { if ((aCylNormProject.Dot (aCylNormProject) == 0.0 && aVertices.Value (anIdx).Distance (aPoints[0]) <= Max (theTopRad, theBottomRad)) - || IsDotInside (aVertices.Value (anIdx), aPointsArr)) + || isDotInside (aVertices.Value (anIdx), aPointsArr)) { if (theInside != NULL) { @@ -747,8 +799,9 @@ Standard_Boolean SelectMgr_Frustum::hasCylinderOverlap (const Standard_Real t } } - if (isIntersectCylinderEndFace (theBottomRad, gp_Pnt (0, 0, 0), theTrsf, aVertices) - || isIntersectCylinderEndFace (theTopRad, gp_Pnt (0, 0, theHeight), theTrsf, aVertices)) + if (!theIsHollow + && (isIntersectCircle (theBottomRad, gp_Pnt (0, 0, 0), theTrsf, aVertices) + || isIntersectCircle (theTopRad, gp_Pnt (0, 0, theHeight), theTrsf, aVertices))) { if (theInside != NULL) { @@ -759,7 +812,7 @@ Standard_Boolean SelectMgr_Frustum::hasCylinderOverlap (const Standard_Real t bool isCylInsideRec = true; for (int i = 0; i < 6; ++i) { - isCylInsideRec &= IsDotInside (aPoints[i], aVertices); + isCylInsideRec &= isDotInside (aPoints[i], aVertices); } if (theInside != NULL) { @@ -768,6 +821,82 @@ Standard_Boolean SelectMgr_Frustum::hasCylinderOverlap (const Standard_Real t return isCylInsideRec; } +// ======================================================================= +// function : hasCircleOverlap +// purpose : +// ======================================================================= +template +Standard_Boolean SelectMgr_Frustum::hasCircleOverlap (const Standard_Real theRadius, + const gp_Trsf& theTrsf, + const Standard_Boolean theIsFilled, + Standard_Boolean* theInside) const +{ + gp_Pnt aVerticesBuf[N]; + TColgp_Array1OfPnt aVertices (aVerticesBuf[0], 0, N - 1); + const Standard_Integer anIncFactor = (Camera()->IsOrthographic() && N == 4) ? 2 : 1; + if (anIncFactor == 2) + { + const Standard_Integer anIndices[] = { 0, 2, 6, 4 }; + for (Standard_Integer anIdx = 0; anIdx < N; anIdx++) + { + aVertices.SetValue (anIdx, myVertices[anIndices[anIdx]]); + } + } + else + { + for (Standard_Integer anIdx = 0; anIdx < N; anIdx++) + { + aVertices.SetValue (anIdx, myVertices[anIdx]); + } + } + + if (isIntersectCircle (theRadius, gp_Pnt (0, 0, 0), theTrsf, aVertices)) + { + if (theInside != NULL) + { + *theInside = false; + } + return true; + } + + gp_Pnt aCircCenter = gp::Origin();//.Transformed (theTrsf); + const gp_Dir aViewRayDir = gp_Dir (myEdgeDirs[N == 4 ? 4 : 0]); + const gp_Pln aPln (myVertices[0], aViewRayDir); + Standard_Real aCoefA, aCoefB, aCoefC, aCoefD; + aPln.Coefficients (aCoefA, aCoefB, aCoefC, aCoefD); + + const Standard_Real aTCenter = -(aCircCenter.XYZ().Dot (aViewRayDir.XYZ()) + aCoefD); + const gp_Pnt aCenterProject (aCoefA * aTCenter, + aCoefB * aTCenter, + aCoefC * aTCenter); + if (isDotInside (aCenterProject, aVertices)) + { + return true; + } + + Standard_Boolean isInside = true; + for (Standard_Integer anIdx = aVertices.Lower(); anIdx <= aVertices.Upper(); anIdx++) + { + if (aVertices.Value (anIdx).Distance (aCenterProject) > theRadius) + { + isInside = false; + break; + } + } + + if (theInside != NULL) + { + *theInside = false; + } + + if (!theIsFilled && isInside) + { + return false; + } + + return isInside; +} + //======================================================================= //function : DumpJson //purpose : diff --git a/src/SelectMgr/SelectMgr_RectangularFrustum.cxx b/src/SelectMgr/SelectMgr_RectangularFrustum.cxx index 12f45aac66..0031c5f275 100644 --- a/src/SelectMgr/SelectMgr_RectangularFrustum.cxx +++ b/src/SelectMgr/SelectMgr_RectangularFrustum.cxx @@ -748,6 +748,7 @@ Standard_Boolean SelectMgr_RectangularFrustum::OverlapsCylinder (const Standard_ const Standard_Real theTopRad, const Standard_Real theHeight, const gp_Trsf& theTrsf, + const Standard_Boolean theIsHollow, const SelectMgr_ViewClipRange& theClipRange, SelectBasics_PickResult& thePickResult) const { @@ -757,7 +758,7 @@ Standard_Boolean SelectMgr_RectangularFrustum::OverlapsCylinder (const Standard_ const gp_Trsf aTrsfInv = theTrsf.Inverted(); const gp_Pnt aLoc = myNearPickedPnt.Transformed (aTrsfInv); const gp_Dir aRayDir = myViewRayDir .Transformed (aTrsfInv); - if (!RayCylinderIntersection (theBottomRad, theTopRad, theHeight, aLoc, aRayDir, aTimes[0], aTimes[1])) + if (!RayCylinderIntersection (theBottomRad, theTopRad, theHeight, aLoc, aRayDir, theIsHollow, aTimes[0], aTimes[1])) { return Standard_False; } @@ -787,6 +788,165 @@ Standard_Boolean SelectMgr_RectangularFrustum::OverlapsCylinder (const Standard_ return !theClipRange.IsClipped (thePickResult.Depth()); } +//======================================================================= +// function : OverlapsCircle +// purpose : +//======================================================================= +Standard_Boolean SelectMgr_RectangularFrustum::OverlapsCircle (const Standard_Real theRadius, + const gp_Trsf& theTrsf, + const Standard_Boolean theIsFilled, + const SelectMgr_ViewClipRange& theClipRange, + SelectBasics_PickResult& thePickResult) const +{ + Standard_ASSERT_RAISE (mySelectionType == SelectMgr_SelectionType_Point || mySelectionType == SelectMgr_SelectionType_Box, + "Error! SelectMgr_RectangularFrustum::Overlaps() should be called after selection frustum initialization"); + Standard_Real aTime = 0.0; + const gp_Trsf aTrsfInv = theTrsf.Inverted(); + const gp_Pnt aLoc = myNearPickedPnt.Transformed (aTrsfInv); + const gp_Dir aRayDir = myViewRayDir.Transformed (aTrsfInv); + if (!theIsFilled) + { + if (!hasCircleOverlap (theRadius, theTrsf, theIsFilled, NULL)) + { + return Standard_False; + } + if (aRayDir.Z() != 0) + { + aTime = (0 - aLoc.Z()) / aRayDir.Z(); + } + } + else if (!RayCircleIntersection (theRadius, aLoc, aRayDir, theIsFilled, aTime)) + { + return Standard_False; + } + + thePickResult.SetDepth (aTime * myScale); + if (theClipRange.IsClipped (thePickResult.Depth())) + { + thePickResult.SetDepth (aTime * myScale); + } + + const gp_Pnt aPntOnCircle = aLoc.XYZ() + aRayDir.XYZ() * aTime; + if (Abs (aPntOnCircle.Z()) < Precision::Confusion()) + { + thePickResult.SetSurfaceNormal (-gp::DZ().Transformed (theTrsf)); + } + else + { + thePickResult.SetSurfaceNormal (gp_Vec (aPntOnCircle.X(), aPntOnCircle.Y(), 0.0).Transformed (theTrsf)); + } + thePickResult.SetPickedPoint (aPntOnCircle.Transformed (theTrsf)); + return !theClipRange.IsClipped (thePickResult.Depth()); +} + +//======================================================================= +// function : isIntersectCircle +// purpose : +//======================================================================= +Standard_Boolean SelectMgr_RectangularFrustum::isIntersectCircle (const Standard_Real theRadius, + const gp_Pnt& theCenter, + const gp_Trsf& theTrsf, + const TColgp_Array1OfPnt& theVertices) const +{ + const gp_Trsf aTrsfInv = theTrsf.Inverted(); + const gp_Dir aRayDir = gp_Dir (myEdgeDirs[4 == 4 ? 4 : 0]).Transformed (aTrsfInv); + if (aRayDir.Z() == 0.0) + { + return false; + } + + for (Standard_Integer anIdx = theVertices.Lower(); anIdx <= theVertices.Upper(); anIdx++) + { + const gp_Pnt aPntStart = theVertices.Value (anIdx).Transformed (aTrsfInv); + const gp_Pnt aPntFinish = anIdx == theVertices.Upper() + ? theVertices.Value (theVertices.Lower()).Transformed (aTrsfInv) + : theVertices.Value (anIdx + 1).Transformed (aTrsfInv); + + // Project points on the end face plane + const Standard_Real aParam1 = (theCenter.Z() - aPntStart.Z()) / aRayDir.Z(); + const Standard_Real aX1 = aPntStart.X() + aRayDir.X() * aParam1; + const Standard_Real anY1 = aPntStart.Y() + aRayDir.Y() * aParam1; + + const Standard_Real aParam2 = (theCenter.Z() - aPntFinish.Z()) / aRayDir.Z(); + const Standard_Real aX2 = aPntFinish.X() + aRayDir.X() * aParam2; + const Standard_Real anY2 = aPntFinish.Y() + aRayDir.Y() * aParam2; + + // Solving quadratic equation anA * T^2 + 2 * aK * T + aC = 0 + const Standard_Real anA = (aX1 - aX2) * (aX1 - aX2) + (anY1 - anY2) * (anY1 - anY2); + const Standard_Real aK = aX1 * (aX2 - aX1) + anY1 * (anY2 - anY1); + const Standard_Real aC = aX1 * aX1 + anY1 * anY1 - theRadius * theRadius; + + const Standard_Real aDiscr = aK * aK - anA * aC; + if (aDiscr >= 0.0) + { + const Standard_Real aT1 = (-aK + Sqrt (aDiscr)) / anA; + const Standard_Real aT2 = (-aK - Sqrt (aDiscr)) / anA; + if ((aT1 >= 0 && aT1 <= 1) || (aT2 >= 0 && aT2 <= 1)) + { + return true; + } + } + } + return false; +} + +//======================================================================= +// function : isSegmentsIntersect +// purpose : +//======================================================================= +Standard_Boolean SelectMgr_RectangularFrustum::isSegmentsIntersect (const gp_Pnt& thePnt1Seg1, + const gp_Pnt& thePnt2Seg1, + const gp_Pnt& thePnt1Seg2, + const gp_Pnt& thePnt2Seg2) const +{ + const gp_Mat aMatPln (thePnt2Seg1.X() - thePnt1Seg1.X(), thePnt2Seg1.Y() - thePnt1Seg1.Y(), thePnt2Seg1.Z() - thePnt1Seg1.Z(), + thePnt1Seg2.X() - thePnt1Seg1.X(), thePnt1Seg2.Y() - thePnt1Seg1.Y(), thePnt1Seg2.Z() - thePnt1Seg1.Z(), + thePnt2Seg2.X() - thePnt1Seg1.X(), thePnt2Seg2.Y() - thePnt1Seg1.Y(), thePnt2Seg2.Z() - thePnt1Seg1.Z()); + if (Abs (aMatPln.Determinant()) > Precision::Confusion()) + { + return false; + } + + Standard_Real aFst[4] = { thePnt1Seg1.X(), thePnt2Seg1.X(), thePnt1Seg2.X(), thePnt2Seg2.X() }; + Standard_Real aSnd[4] = { thePnt1Seg1.Y(), thePnt2Seg1.Y(), thePnt1Seg2.Y(), thePnt2Seg2.Y() }; + if (aFst[0] == aFst[2] && aFst[1] == aFst[3]) + { + aFst[0] = thePnt1Seg1.Z(); + aFst[1] = thePnt2Seg1.Z(); + aFst[2] = thePnt1Seg2.Z(); + aFst[3] = thePnt2Seg2.Z(); + } + if (aSnd[0] == aSnd[2] + && aSnd[1] == aSnd[3]) + { + aSnd[0] = thePnt1Seg1.Z(); + aSnd[1] = thePnt2Seg1.Z(); + aSnd[2] = thePnt1Seg2.Z(); + aSnd[3] = thePnt2Seg2.Z(); + } + const gp_Mat2d aMat (gp_XY (aFst[0] - aFst[1], aSnd[0] - aSnd[1]), + gp_XY (aFst[3] - aFst[2], aSnd[3] - aSnd[2])); + + const gp_Mat2d aMatU (gp_XY (aFst[0] - aFst[2], aSnd[0] - aSnd[2]), + gp_XY (aFst[3] - aFst[2], aSnd[3] - aSnd[2])); + + const gp_Mat2d aMatV (gp_XY (aFst[0] - aFst[1], aSnd[0] - aSnd[1]), + gp_XY (aFst[0] - aFst[2], aSnd[0] - aSnd[2])); + if (aMat.Determinant() == 0.0) + { + return false; + } + + const Standard_Real anU = aMatU.Determinant() / aMat.Determinant(); + const Standard_Real aV = aMatV.Determinant() / aMat.Determinant(); + if (anU >= 0.0 && anU <= 1.0 + && aV >= 0.0 && aV <= 1.0) + { + return true; + } + return false; +} + //======================================================================= // function : OverlapsCylinder // purpose : @@ -795,12 +955,28 @@ Standard_Boolean SelectMgr_RectangularFrustum::OverlapsCylinder (const Standard_ const Standard_Real theTopRad, const Standard_Real theHeight, const gp_Trsf& theTrsf, + const Standard_Boolean theIsHollow, Standard_Boolean* theInside) const { Standard_ASSERT_RAISE (mySelectionType == SelectMgr_SelectionType_Point || mySelectionType == SelectMgr_SelectionType_Box, "Error! SelectMgr_RectangularFrustum::Overlaps() should be called after selection frustum initialization"); - return hasCylinderOverlap (theBottomRad, theTopRad, theHeight, theTrsf, theInside); + return hasCylinderOverlap (theBottomRad, theTopRad, theHeight, theTrsf, theIsHollow, theInside); +} + +//======================================================================= +// function : OverlapsCircle +// purpose : +//======================================================================= +Standard_Boolean SelectMgr_RectangularFrustum::OverlapsCircle (const Standard_Real theRadius, + const gp_Trsf& theTrsf, + const Standard_Boolean theIsFilled, + Standard_Boolean* theInside) const +{ + Standard_ASSERT_RAISE (mySelectionType == SelectMgr_SelectionType_Point || mySelectionType == SelectMgr_SelectionType_Box, + "Error! SelectMgr_RectangularFrustum::Overlaps() should be called after selection frustum initialization"); + + return hasCircleOverlap (theRadius, theTrsf, theIsFilled, theInside); } // ======================================================================= diff --git a/src/SelectMgr/SelectMgr_RectangularFrustum.hxx b/src/SelectMgr/SelectMgr_RectangularFrustum.hxx index 8788a4af51..bcebbb626b 100644 --- a/src/SelectMgr/SelectMgr_RectangularFrustum.hxx +++ b/src/SelectMgr/SelectMgr_RectangularFrustum.hxx @@ -66,6 +66,18 @@ public: Standard_EXPORT void Init (const gp_Pnt2d& theMinPnt, const gp_Pnt2d& theMaxPnt); + //! Returns True if Frustum (theVertices) intersects the circle. + Standard_EXPORT Standard_Boolean isIntersectCircle (const Standard_Real theRadius, + const gp_Pnt& theCenter, + const gp_Trsf& theTrsf, + const TColgp_Array1OfPnt& theVertices) const; + + //! Returns True if Seg1 (thePnt1Seg1, thePnt2Seg1) and Seg2 (thePnt1Seg2, thePnt2Seg2) intersect. + Standard_EXPORT Standard_Boolean isSegmentsIntersect (const gp_Pnt& thePnt1Seg1, + const gp_Pnt& thePnt2Seg1, + const gp_Pnt& thePnt1Seg2, + const gp_Pnt& thePnt2Seg2) const; + //! Builds volume according to internal parameters. //! NOTE: it should be called after Init() method Standard_EXPORT virtual void Build() Standard_OVERRIDE; @@ -150,6 +162,7 @@ public: const Standard_Real theTopRad, const Standard_Real theHeight, const gp_Trsf& theTrsf, + const Standard_Boolean theIsHollow, const SelectMgr_ViewClipRange& theClipRange, SelectBasics_PickResult& thePickResult) const Standard_OVERRIDE; @@ -159,8 +172,28 @@ public: const Standard_Real theTopRad, const Standard_Real theHeight, const gp_Trsf& theTrsf, + const Standard_Boolean theIsHollow, Standard_Boolean* theInside = NULL) const Standard_OVERRIDE; + //! Returns true if selecting volume is overlapped by circle with radius theRadius, + //! boolean theIsFilled and transformation to apply theTrsf. + //! The position and orientation of the circle are specified + //! via theTrsf transformation for gp::XOY() with center in gp::Origin(). + Standard_EXPORT virtual Standard_Boolean OverlapsCircle (const Standard_Real theBottomRad, + const gp_Trsf& theTrsf, + const Standard_Boolean theIsFilled, + const SelectMgr_ViewClipRange& theClipRange, + SelectBasics_PickResult& thePickResult) const Standard_OVERRIDE; + + //! Returns true if selecting volume is overlapped by circle with radius theRadius, + //! boolean theIsFilled and transformation to apply theTrsf. + //! The position and orientation of the circle are specified + //! via theTrsf transformation for gp::XOY() with center in gp::Origin(). + Standard_EXPORT virtual Standard_Boolean OverlapsCircle (const Standard_Real theBottomRad, + const gp_Trsf& theTrsf, + const Standard_Boolean theIsFilled, + Standard_Boolean* theInside = NULL) const Standard_OVERRIDE; + //! Measures distance between 3d projection of user-picked //! screen point and given point theCOG. //! It makes sense only for frustums built on a single point. diff --git a/src/SelectMgr/SelectMgr_SelectingVolumeManager.cxx b/src/SelectMgr/SelectMgr_SelectingVolumeManager.cxx index d4eee16aec..df3159d98f 100644 --- a/src/SelectMgr/SelectMgr_SelectingVolumeManager.cxx +++ b/src/SelectMgr/SelectMgr_SelectingVolumeManager.cxx @@ -426,13 +426,15 @@ Standard_Boolean SelectMgr_SelectingVolumeManager::OverlapsCylinder (const Stand const Standard_Real theTopRad, const Standard_Real theHeight, const gp_Trsf& theTrsf, + const Standard_Boolean theIsHollow, SelectBasics_PickResult& thePickResult) const { if (myActiveSelectingVolume.IsNull()) { return false; } - return myActiveSelectingVolume->OverlapsCylinder (theBottomRad, theTopRad, theHeight, theTrsf, myViewClipRange, thePickResult); + return myActiveSelectingVolume->OverlapsCylinder (theBottomRad, theTopRad, theHeight, theTrsf, + theIsHollow, myViewClipRange, thePickResult); } //======================================================================= @@ -443,13 +445,47 @@ Standard_Boolean SelectMgr_SelectingVolumeManager::OverlapsCylinder (const Stand const Standard_Real theTopRad, const Standard_Real theHeight, const gp_Trsf& theTrsf, + const Standard_Boolean theIsHollow, Standard_Boolean* theInside) const { if (myActiveSelectingVolume.IsNull()) { return false; } - return myActiveSelectingVolume->OverlapsCylinder (theBottomRad, theTopRad, theHeight, theTrsf, theInside); + return myActiveSelectingVolume->OverlapsCylinder (theBottomRad, theTopRad, theHeight, + theTrsf, theIsHollow, theInside); +} + +//======================================================================= +// function : OverlapsCircle +// purpose : +//======================================================================= +Standard_Boolean SelectMgr_SelectingVolumeManager::OverlapsCircle (const Standard_Real theRadius, + const gp_Trsf& theTrsf, + const Standard_Boolean theIsFilled, + SelectBasics_PickResult& thePickResult) const +{ + if (myActiveSelectingVolume.IsNull()) + { + return false; + } + return myActiveSelectingVolume->OverlapsCircle (theRadius, theTrsf, theIsFilled, myViewClipRange, thePickResult); +} + +//======================================================================= +// function : OverlapsCircle +// purpose : +//======================================================================= +Standard_Boolean SelectMgr_SelectingVolumeManager::OverlapsCircle (const Standard_Real theRadius, + const gp_Trsf& theTrsf, + const Standard_Boolean theIsFilled, + Standard_Boolean* theInside) const +{ + if (myActiveSelectingVolume.IsNull()) + { + return false; + } + return myActiveSelectingVolume->OverlapsCircle (theRadius, theTrsf, theIsFilled, theInside); } //======================================================================= diff --git a/src/SelectMgr/SelectMgr_SelectingVolumeManager.hxx b/src/SelectMgr/SelectMgr_SelectingVolumeManager.hxx index 580e206cda..708e7a885f 100644 --- a/src/SelectMgr/SelectMgr_SelectingVolumeManager.hxx +++ b/src/SelectMgr/SelectMgr_SelectingVolumeManager.hxx @@ -168,6 +168,7 @@ public: const Standard_Real theTopRad, const Standard_Real theHeight, const gp_Trsf& theTrsf, + const Standard_Boolean theIsHollow, SelectBasics_PickResult& thePickResult) const Standard_OVERRIDE; //! Returns true if selecting volume is overlapped by cylinder (or cone) with radiuses theBottomRad @@ -176,8 +177,27 @@ public: const Standard_Real theTopRad, const Standard_Real theHeight, const gp_Trsf& theTrsf, + const Standard_Boolean theIsHollow, Standard_Boolean* theInside = NULL) const Standard_OVERRIDE; + //! Returns true if selecting volume is overlapped by circle with radius theRadius, + //! boolean theIsFilled and transformation to apply theTrsf. + //! The position and orientation of the circle are specified + //! via theTrsf transformation for gp::XOY() with center in gp::Origin(). + Standard_EXPORT virtual Standard_Boolean OverlapsCircle (const Standard_Real theBottomRad, + const gp_Trsf& theTrsf, + const Standard_Boolean theIsFilled, + SelectBasics_PickResult& thePickResult) const Standard_OVERRIDE; + + //! Returns true if selecting volume is overlapped by circle with radius theRadius, + //! boolean theIsFilled and transformation to apply theTrsf. + //! The position and orientation of the circle are specified + //! via theTrsf transformation for gp::XOY() with center in gp::Origin(). + Standard_EXPORT virtual Standard_Boolean OverlapsCircle (const Standard_Real theBottomRad, + const gp_Trsf& theTrsf, + const Standard_Boolean theIsFilled, + Standard_Boolean* theInside = NULL) const Standard_OVERRIDE; + //! Measures distance between 3d projection of user-picked //! screen point and given point theCOG Standard_EXPORT virtual Standard_Real DistToGeometryCenter (const gp_Pnt& theCOG) const Standard_OVERRIDE; diff --git a/src/SelectMgr/SelectMgr_TriangularFrustum.cxx b/src/SelectMgr/SelectMgr_TriangularFrustum.cxx index 44e8dac76d..efaf686e28 100644 --- a/src/SelectMgr/SelectMgr_TriangularFrustum.cxx +++ b/src/SelectMgr/SelectMgr_TriangularFrustum.cxx @@ -337,12 +337,13 @@ Standard_Boolean SelectMgr_TriangularFrustum::OverlapsCylinder (const Standard_R const Standard_Real theTopRad, const Standard_Real theHeight, const gp_Trsf& theTrsf, + const Standard_Boolean theIsHollow, const SelectMgr_ViewClipRange& theClipRange, SelectBasics_PickResult& thePickResult) const { (void)theClipRange; (void)thePickResult; - return hasCylinderOverlap (theBottomRad, theTopRad, theHeight, theTrsf); + return hasCylinderOverlap (theBottomRad, theTopRad, theHeight, theTrsf, theIsHollow); } //======================================================================= @@ -353,10 +354,39 @@ Standard_Boolean SelectMgr_TriangularFrustum::OverlapsCylinder (const Standard_R const Standard_Real theTopRad, const Standard_Real theHeight, const gp_Trsf& theTrsf, + const Standard_Boolean theIsHollow, Standard_Boolean* theInside) const { (void) theInside; - return hasCylinderOverlap (theBottomRad, theTopRad, theHeight, theTrsf); + return hasCylinderOverlap (theBottomRad, theTopRad, theHeight, theTrsf, theIsHollow); +} + +//======================================================================= +// function : OverlapsCircle +// purpose : +//======================================================================= +Standard_Boolean SelectMgr_TriangularFrustum::OverlapsCircle (const Standard_Real theRadius, + const gp_Trsf& theTrsf, + const Standard_Boolean theIsFilled, + const SelectMgr_ViewClipRange& theClipRange, + SelectBasics_PickResult& thePickResult) const +{ + (void)theClipRange; + (void)thePickResult; + return hasCircleOverlap (theRadius, theTrsf, theIsFilled); +} + +//======================================================================= +// function : OverlapsCircle +// purpose : +//======================================================================= +Standard_Boolean SelectMgr_TriangularFrustum::OverlapsCircle (const Standard_Real theRadius, + const gp_Trsf& theTrsf, + const Standard_Boolean theIsFilled, + Standard_Boolean* theInside) const +{ + (void)theInside; + return hasCircleOverlap (theRadius, theTrsf, theIsFilled); } // ======================================================================= diff --git a/src/SelectMgr/SelectMgr_TriangularFrustum.hxx b/src/SelectMgr/SelectMgr_TriangularFrustum.hxx index a5c7d08576..a13067b033 100644 --- a/src/SelectMgr/SelectMgr_TriangularFrustum.hxx +++ b/src/SelectMgr/SelectMgr_TriangularFrustum.hxx @@ -123,6 +123,7 @@ public: //! @name SAT Tests for different objects const Standard_Real theTopRad, const Standard_Real theHeight, const gp_Trsf& theTrsf, + const Standard_Boolean theIsHollow, const SelectMgr_ViewClipRange& theClipRange, SelectBasics_PickResult& thePickResult) const Standard_OVERRIDE; @@ -132,8 +133,28 @@ public: //! @name SAT Tests for different objects const Standard_Real theTopRad, const Standard_Real theHeight, const gp_Trsf& theTrsf, + const Standard_Boolean theIsHollow, Standard_Boolean* theInside = NULL) const Standard_OVERRIDE; + //! Returns true if selecting volume is overlapped by circle with radius theRadius, + //! boolean theIsFilled and transformation to apply theTrsf. + //! The position and orientation of the circle are specified + //! via theTrsf transformation for gp::XOY() with center in gp::Origin(). + Standard_EXPORT virtual Standard_Boolean OverlapsCircle (const Standard_Real theRadius, + const gp_Trsf& theTrsf, + const Standard_Boolean theIsFilled, + const SelectMgr_ViewClipRange& theClipRange, + SelectBasics_PickResult& thePickResult) const Standard_OVERRIDE; + + //! Returns true if selecting volume is overlapped by circle with radius theRadius, + //! boolean theIsFilled and transformation to apply theTrsf. + //! The position and orientation of the circle are specified + //! via theTrsf transformation for gp::XOY() with center in gp::Origin(). + Standard_EXPORT virtual Standard_Boolean OverlapsCircle (const Standard_Real theRadius, + const gp_Trsf& theTrsf, + const Standard_Boolean theIsFilled, + Standard_Boolean* theInside = NULL) const Standard_OVERRIDE; + public: //! Nullifies the handle to corresponding builder instance to prevent memory leaks diff --git a/src/SelectMgr/SelectMgr_TriangularFrustumSet.cxx b/src/SelectMgr/SelectMgr_TriangularFrustumSet.cxx index 31cc5e69f4..907a854061 100644 --- a/src/SelectMgr/SelectMgr_TriangularFrustumSet.cxx +++ b/src/SelectMgr/SelectMgr_TriangularFrustumSet.cxx @@ -17,6 +17,10 @@ #include #include +#include +#include +#include +#include #include #include @@ -506,6 +510,7 @@ Standard_Boolean SelectMgr_TriangularFrustumSet::OverlapsCylinder (const Standar const Standard_Real theTopRad, const Standard_Real theHeight, const gp_Trsf& theTrsf, + const Standard_Boolean theIsHollow, const SelectMgr_ViewClipRange& theClipRange, SelectBasics_PickResult& thePickResult) const { @@ -513,7 +518,8 @@ Standard_Boolean SelectMgr_TriangularFrustumSet::OverlapsCylinder (const Standar "Error! SelectMgr_TriangularFrustumSet::Overlaps() should be called after selection frustum initialization"); for (SelectMgr_TriangFrustums::Iterator anIter (myFrustums); anIter.More(); anIter.Next()) { - if (anIter.Value()->OverlapsCylinder (theBottomRad, theTopRad, theHeight, theTrsf, theClipRange, thePickResult)) + if (anIter.Value()->OverlapsCylinder (theBottomRad, theTopRad, theHeight, theTrsf, + theIsHollow, theClipRange, thePickResult)) { return true; } @@ -529,6 +535,7 @@ Standard_Boolean SelectMgr_TriangularFrustumSet::OverlapsCylinder (const Standar const Standard_Real theTopRad, const Standard_Real theHeight, const gp_Trsf& theTrsf, + const Standard_Boolean theIsHollow, Standard_Boolean* theInside) const { const gp_Dir aCylNorm (gp::DZ().Transformed (theTrsf)); @@ -589,7 +596,7 @@ Standard_Boolean SelectMgr_TriangularFrustumSet::OverlapsCylinder (const Standar { aVertices[anIdx] = anIter.Value()->myVertices[anIdx]; } - if (anIter.Value()->IsDotInside (aPoints[i], aVertices)) + if (anIter.Value()->isDotInside (aPoints[i], aVertices)) { isInside = true; break; @@ -607,7 +614,7 @@ Standard_Boolean SelectMgr_TriangularFrustumSet::OverlapsCylinder (const Standar } for (SelectMgr_TriangFrustums::Iterator anIter (myFrustums); anIter.More(); anIter.Next()) { - if (anIter.Value()->OverlapsCylinder (theBottomRad, theTopRad, theHeight, theTrsf, theInside)) + if (anIter.Value()->OverlapsCylinder (theBottomRad, theTopRad, theHeight, theTrsf, theIsHollow, theInside)) { return true; } @@ -615,6 +622,109 @@ Standard_Boolean SelectMgr_TriangularFrustumSet::OverlapsCylinder (const Standar return false; } +//======================================================================= +// function : OverlapsCircle +// purpose : +//======================================================================= +Standard_Boolean SelectMgr_TriangularFrustumSet::OverlapsCircle (const Standard_Real theRadius, + const gp_Trsf& theTrsf, + const Standard_Boolean theIsFilled, + const SelectMgr_ViewClipRange& theClipRange, + SelectBasics_PickResult& thePickResult) const +{ + Standard_ASSERT_RAISE (mySelectionType == SelectMgr_SelectionType_Polyline, + "Error! SelectMgr_TriangularFrustumSet::Overlaps() should be called after selection frustum initialization"); + for (SelectMgr_TriangFrustums::Iterator anIter (myFrustums); anIter.More(); anIter.Next()) + { + if (anIter.Value()->OverlapsCircle (theRadius, theTrsf, theIsFilled, theClipRange, thePickResult)) + { + return true; + } + } + return false; +} + +//======================================================================= +// function : OverlapsCircle +// purpose : +//======================================================================= +Standard_Boolean SelectMgr_TriangularFrustumSet::OverlapsCircle (const Standard_Real theRadius, + const gp_Trsf& theTrsf, + const Standard_Boolean theIsFilled, + Standard_Boolean* theInside) const +{ + const gp_Pnt aCenter (gp::Origin().Transformed (theTrsf)); + const gp_Vec aVecPlane1 (myFrustums.First()->myVertices[0], myFrustums.First()->myVertices[1]); + const gp_Vec aVecPlane2 (myFrustums.First()->myVertices[0], myFrustums.First()->myVertices[2]); + + const gp_Dir aDirNorm (aVecPlane1.Crossed (aVecPlane2)); + const gp_Pln aPln (myFrustums.First()->myVertices[0], aDirNorm); + Standard_Real aCoefA, aCoefB, aCoefC, aCoefD; + aPln.Coefficients (aCoefA, aCoefB, aCoefC, aCoefD); + + const Standard_Real aT = -(aCenter.XYZ().Dot (aDirNorm.XYZ()) + aCoefD) / aDirNorm.Dot (aDirNorm); + const gp_Pnt aCenterProject (aCoefA * aT + aCenter.X(), + aCoefB * aT + aCenter.Y(), + aCoefC * aT + aCenter.Z()); + + gp_Pnt aVerticesBuf[3]; + TColgp_Array1OfPnt aVertices (aVerticesBuf[0], 0, 2); + + if (!theIsFilled) + { + for (SelectMgr_TriangFrustums::Iterator anIter (myFrustums); anIter.More(); anIter.Next()) + { + if (!anIter.Value()->OverlapsCircle (theRadius, theTrsf, theIsFilled, theInside)) + { + continue; + } + + if (myToAllowOverlap) + { + return Standard_True; + } + + if (isIntersectBoundary (theRadius, theTrsf, theIsFilled)) + { + if (theInside != NULL) + { + *theInside &= Standard_False; + } + return Standard_False; + } + return Standard_True; + } + } + else + { + for (SelectMgr_TriangFrustums::Iterator anIter (myFrustums); anIter.More(); anIter.Next()) + { + if (!anIter.Value()->OverlapsCircle (theRadius, theTrsf, theIsFilled, theInside)) + { + continue; + } + + if (myToAllowOverlap) + { + return Standard_True; + } + + if (isIntersectBoundary (theRadius, theTrsf, theIsFilled)) + { + return Standard_False; + } + return Standard_True; + } + } + + if (theInside != NULL) + { + *theInside &= Standard_False; + } + + return Standard_False; +} + // ======================================================================= // function : GetPlanes // purpose : @@ -638,6 +748,127 @@ void SelectMgr_TriangularFrustumSet::SetAllowOverlapDetection (const Standard_Bo myToAllowOverlap = theIsToAllow; } +//======================================================================= +// function : PointInTriangle +// purpose : +//======================================================================= +Standard_Boolean SelectMgr_TriangularFrustumSet::pointInTriangle (const gp_Pnt& thePnt, + const gp_Pnt& theV1, const gp_Pnt& theV2, const gp_Pnt& theV3) +{ + gp_Vec a = theV1.XYZ() - thePnt.XYZ(); + gp_Vec b = theV2.XYZ() - thePnt.XYZ(); + gp_Vec c = theV3.XYZ() - thePnt.XYZ(); + + gp_Vec u = b.Crossed (c); + gp_Vec v = c.Crossed (a); + gp_Vec w = a.Crossed (b); + + if (u.Dot (v) < 0.0 || u.Dot (w) < 0.0) { + return false; + } + + return true; +} + +//======================================================================= +// function : segmentSegmentIntersection +// purpose : +//======================================================================= +Standard_Boolean SelectMgr_TriangularFrustumSet::segmentSegmentIntersection (const gp_Pnt& theStartPnt1, + const gp_Pnt& theEndPnt1, + const gp_Pnt& theStartPnt2, + const gp_Pnt& theEndPnt2) +{ + gp_XYZ aVec1 = theEndPnt1.XYZ() - theStartPnt1.XYZ(); + gp_XYZ aVec2 = theEndPnt2.XYZ() - theStartPnt2.XYZ(); + gp_XYZ aVec21 = theStartPnt2.XYZ() - theStartPnt1.XYZ(); + gp_XYZ aVec12 = theStartPnt1.XYZ() - theStartPnt2.XYZ(); + if (Abs (aVec21.DotCross (aVec1, aVec2)) > Precision::Confusion() || + Abs (aVec12.DotCross (aVec2, aVec1)) > Precision::Confusion()) + { + // lines are not coplanar + return false; + } + + double aValue1 = aVec21.Crossed (aVec2).Dot (aVec1.Crossed (aVec2)) / aVec1.Crossed (aVec2).SquareModulus(); + double aValue2 = aVec12.Crossed (aVec1).Dot (aVec2.Crossed (aVec1)) / aVec2.Crossed (aVec1).SquareModulus(); + if (aValue1 < 0.0 || aValue1 > 1.0 || aValue2 < 0.0 || aValue2 > 1.0) + { + return false; + } + return true; +} + +//======================================================================= +// function : isIntersectBoundary +// purpose : +//======================================================================= +Standard_Boolean SelectMgr_TriangularFrustumSet::isIntersectBoundary (const Standard_Real theRadius, + const gp_Trsf& theTrsf, + const Standard_Boolean theIsFilled) const +{ + Standard_Integer aFacesNb = myBoundaryPoints.Size() / 2; + + const gp_Pnt& aCircCenter = theTrsf.TranslationPart(); + gp_Ax2 anAxis; + anAxis.Transform (theTrsf); + Handle(Geom_Circle) aCirc = new Geom_Circle (anAxis, theRadius); + + gp_Dir aCircNorm = gp_Dir(0, 0, 1).Transformed (theTrsf); + Handle(Geom_Surface) aCircPlane = new Geom_Plane(aCircCenter, aCircNorm); + + for (Standard_Integer anIdx = myBoundaryPoints.Lower(); anIdx < aFacesNb + myBoundaryPoints.Lower(); anIdx++) + { + gp_Pnt aFace[4] = { myBoundaryPoints.Value (anIdx), + myBoundaryPoints.Value (anIdx + aFacesNb), + myBoundaryPoints.Value (anIdx % aFacesNb + 1 + aFacesNb), + myBoundaryPoints.Value (anIdx % aFacesNb + 1) }; + + gp_Dir aBndPlaneNorm = gp_Vec (aFace[0], aFace[1]).Crossed (gp_Vec(aFace[0], aFace[2])); + Handle(Geom_Surface) aBndPlane = new Geom_Plane(aFace[0], aBndPlaneNorm); + + GeomInt_IntSS anInterSS (aCircPlane, aBndPlane, Precision::Confusion()); + if (!anInterSS.IsDone() || anInterSS.NbLines() == 0) + { + continue; + } + + const Handle(Geom_Line)& anInterLine = Handle(Geom_Line)::DownCast (anInterSS.Line(1)); + Standard_Real aDistance = anInterLine->Lin().Distance (aCircCenter); + if (aDistance > theRadius) + { + continue; + } + + gp_Lin aLine = anInterLine->Lin(); + gp_Lin aNormalLine = aLine.Normal (aCircCenter); + gp_Pnt aCrossPoint = aCircCenter.Translated (aNormalLine.Direction().Reversed().XYZ() * aDistance); + + Standard_Real anOffset = Sqrt (theRadius * theRadius - aDistance * aDistance); + // Line-circle intersection points + gp_Pnt aP1 = aCrossPoint.Translated (aLine.Direction().XYZ() * anOffset); + gp_Pnt aP2 = aCrossPoint.Translated (aLine.Direction().Reversed().XYZ() * anOffset); + + if (pointInTriangle (aP1, aFace[0], aFace[1], aFace[2]) + || pointInTriangle (aP1, aFace[0], aFace[2], aFace[3]) + || pointInTriangle (aP2, aFace[0], aFace[1], aFace[2]) + || pointInTriangle (aP2, aFace[0], aFace[2], aFace[3])) + { + return Standard_True; + } + + if (theIsFilled + || segmentSegmentIntersection (aP1, aP2, aFace[0], aFace[1]) + || segmentSegmentIntersection (aP1, aP2, aFace[1], aFace[2]) + || segmentSegmentIntersection (aP1, aP2, aFace[2], aFace[3]) + || segmentSegmentIntersection (aP1, aP2, aFace[0], aFace[3])) + { + return Standard_True; + } + } + return Standard_False; +} + //======================================================================= // function : isIntersectBoundary // purpose : @@ -669,7 +900,7 @@ Standard_Boolean SelectMgr_TriangularFrustumSet::isIntersectBoundary (const gp_P // purpose : Moller-Trumbore ray-triangle intersection test //======================================================================= Standard_Boolean SelectMgr_TriangularFrustumSet::segmentTriangleIntersection (const gp_Pnt& theOrig, const gp_Vec& theDir, - const gp_Pnt& theV1, const gp_Pnt& theV2, const gp_Pnt& theV3) const + const gp_Pnt& theV1, const gp_Pnt& theV2, const gp_Pnt& theV3) { gp_Vec aPVec, aTVec, aQVec; Standard_Real aD, aInvD, anU, aV, aT; diff --git a/src/SelectMgr/SelectMgr_TriangularFrustumSet.hxx b/src/SelectMgr/SelectMgr_TriangularFrustumSet.hxx index f5c51f31a0..694c3efc55 100644 --- a/src/SelectMgr/SelectMgr_TriangularFrustumSet.hxx +++ b/src/SelectMgr/SelectMgr_TriangularFrustumSet.hxx @@ -124,6 +124,7 @@ public: const Standard_Real theTopRad, const Standard_Real theHeight, const gp_Trsf& theTrsf, + const Standard_Boolean theIsHollow, const SelectMgr_ViewClipRange& theClipRange, SelectBasics_PickResult& thePickResult) const Standard_OVERRIDE; @@ -133,8 +134,24 @@ public: const Standard_Real theTopRad, const Standard_Real theHeight, const gp_Trsf& theTrsf, + const Standard_Boolean theIsHollow, Standard_Boolean* theInside = NULL) const Standard_OVERRIDE; + //! Returns true if selecting volume is overlapped by cylinder (or cone) with radiuses theBottomRad + //! and theTopRad, height theHeight and transformation to apply theTrsf. + Standard_EXPORT virtual Standard_Boolean OverlapsCircle (const Standard_Real theBottomRad, + const gp_Trsf& theTrsf, + const Standard_Boolean theIsFilled, + const SelectMgr_ViewClipRange& theClipRange, + SelectBasics_PickResult& thePickResult) const Standard_OVERRIDE; + + //! Returns true if selecting volume is overlapped by cylinder (or cone) with radiuses theBottomRad + //! and theTopRad, height theHeight and transformation to apply theTrsf. + Standard_EXPORT virtual Standard_Boolean OverlapsCircle (const Standard_Real theBottomRad, + const gp_Trsf& theTrsf, + const Standard_Boolean theIsFilled, + Standard_Boolean* theInside = NULL) const Standard_OVERRIDE; + //! Stores plane equation coefficients (in the following form: //! Ax + By + Cz + D = 0) to the given vector Standard_EXPORT virtual void GetPlanes (NCollection_Vector& thePlaneEquations) const Standard_OVERRIDE; @@ -151,15 +168,34 @@ private: //! Checks whether the segment intersects with the boundary of the current volume selection Standard_EXPORT Standard_Boolean isIntersectBoundary (const gp_Pnt& thePnt1, const gp_Pnt& thePnt2) const; + //! Checks whether the circle intersects with the boundary of the current volume selection + Standard_EXPORT Standard_Boolean isIntersectBoundary (const Standard_Real theRadius, + const gp_Trsf& theTrsf, + const Standard_Boolean theIsFilled) const; + //! Checks whether the triangle intersects with a segment - Standard_EXPORT Standard_Boolean segmentTriangleIntersection (const gp_Pnt &theOrig, const gp_Vec& theDir, - const gp_Pnt& theV1, const gp_Pnt& theV2, const gp_Pnt& theV3) const; + Standard_EXPORT static Standard_Boolean segmentTriangleIntersection (const gp_Pnt &theOrig, const gp_Vec& theDir, + const gp_Pnt& theV1, const gp_Pnt& theV2, const gp_Pnt& theV3); + + Standard_EXPORT static Standard_Boolean segmentSegmentIntersection (const gp_Pnt& theStartPnt1, + const gp_Pnt& theEndPnt1, + const gp_Pnt& theStartPnt2, + const gp_Pnt& theEndPnt2); + + Standard_EXPORT static Standard_Boolean pointInTriangle (const gp_Pnt& thePnt, + const gp_Pnt& theV1, const gp_Pnt& theV2, const gp_Pnt& theV3); private: SelectMgr_TriangFrustums myFrustums; //!< set of triangular frustums SelectionPolyline mySelPolyline; //!< parameters of selection polyline (it is used to build triangle frustum set) TColgp_Array1OfPnt myBoundaryPoints; //!< boundary points + //! 1_____2 + //! /| |\ . + //! 4/_|_____|_\3 + //! | 5|_____|6 | + //! | / \ | + //! 8|/_________\|7 Standard_Boolean myToAllowOverlap; //!< flag to detect only fully included sensitives or not }; diff --git a/src/StdSelect/StdSelect_BRepSelectionTool.cxx b/src/StdSelect/StdSelect_BRepSelectionTool.cxx index 36e5ce9fca..07b5a96543 100644 --- a/src/StdSelect/StdSelect_BRepSelectionTool.cxx +++ b/src/StdSelect/StdSelect_BRepSelectionTool.cxx @@ -40,6 +40,7 @@ #include #include #include +#include #include #include #include @@ -60,7 +61,6 @@ #include #include #include -#include #define BVH_PRIMITIVE_LIMIT 800000 @@ -249,6 +249,7 @@ void StdSelect_BRepSelectionTool::ComputeSensitive (const TopoDS_Shape& theShape case TopAbs_FACE: { const TopoDS_Face& aFace = TopoDS::Face (theShape); + Select3D_EntitySequence aSensitiveList; GetSensitiveForFace (aFace, theOwner, aSensitiveList, @@ -266,159 +267,15 @@ void StdSelect_BRepSelectionTool::ComputeSensitive (const TopoDS_Shape& theShape { TopTools_IndexedMapOfShape aSubfacesMap; TopExp::MapShapes (theShape, TopAbs_FACE, aSubfacesMap); - if (aSubfacesMap.Extent() == 2) // detect cone - { - const TopoDS_Face* aFaces[2] = - { - &TopoDS::Face (aSubfacesMap.FindKey (1)), - &TopoDS::Face (aSubfacesMap.FindKey (2)) - }; - - TopLoc_Location aLocSurf[2]; - const Handle(Geom_Surface)* aSurfaces[2] = - { - &BRep_Tool::Surface (*aFaces[0], aLocSurf[0]), - &BRep_Tool::Surface (*aFaces[1], aLocSurf[1]) - }; - Standard_Integer aConIndex = 0; - Handle(Geom_ConicalSurface) aGeomCone = Handle(Geom_ConicalSurface)::DownCast (*aSurfaces[0]); - Handle(Geom_Plane) aGeomPln; - if (!aGeomCone.IsNull()) - { - aGeomPln = Handle(Geom_Plane)::DownCast (*aSurfaces[1]); - } - else - { - aConIndex = 1; - aGeomCone = Handle(Geom_ConicalSurface)::DownCast (*aSurfaces[1]); - aGeomPln = Handle(Geom_Plane)::DownCast (*aSurfaces[0]); - } - if (!aGeomCone.IsNull() - && !aGeomPln.IsNull() - && aGeomPln->Position().Direction().IsEqual (aGeomCone->Position().Direction(), Precision::Angular())) - { - const gp_Cone aCone = BRepAdaptor_Surface (*aFaces[aConIndex]).Cone(); - const Standard_Real aRad1 = aCone.RefRadius(); - const Standard_Real aHeight = (aRad1 != 0.0) - ? aRad1 / Abs (Tan (aCone.SemiAngle())) - : aCone.Location().Distance (aGeomPln->Location().Transformed (aLocSurf[aConIndex == 0 ? 1 : 0])); - const Standard_Real aRad2 = (aRad1 != 0.0) ? 0.0 : Tan (aCone.SemiAngle()) * aHeight; - gp_Trsf aTrsf; - aTrsf.SetTransformation (aCone.Position(), gp_Ax3()); - Handle(Select3D_SensitiveCylinder) aSensSCyl = new Select3D_SensitiveCylinder (theOwner, aRad1, aRad2, aHeight, aTrsf); - theSelection->Add (aSensSCyl); - break; - } - } - if (aSubfacesMap.Extent() == 3) // detect cylinder or truncated cone + if (!GetSensitiveForCylinder (aSubfacesMap, theOwner, theSelection)) { - const TopoDS_Face* aFaces[3] = - { - &TopoDS::Face (aSubfacesMap.FindKey (1)), - &TopoDS::Face (aSubfacesMap.FindKey (2)), - &TopoDS::Face (aSubfacesMap.FindKey (3)) - }; - - TopLoc_Location aLocSurf[3]; - const Handle(Geom_Surface)* aSurfaces[3] = - { - &BRep_Tool::Surface (*aFaces[0], aLocSurf[0]), - &BRep_Tool::Surface (*aFaces[1], aLocSurf[1]), - &BRep_Tool::Surface (*aFaces[2], aLocSurf[2]) - }; - - Standard_Integer aConIndex = -1, aNbPlanes = 0; - Handle(Geom_ConicalSurface) aGeomCone; - Handle(Geom_CylindricalSurface) aGeomCyl; - Handle(Geom_Plane) aGeomPlanes[2]; - const TopLoc_Location* aGeomPlanesLoc[2]; - for (Standard_Integer aSurfIter = 0; aSurfIter < 3; ++aSurfIter) + for (Standard_Integer aShIndex = 1; aShIndex <= aSubfacesMap.Extent(); ++aShIndex) { - const Handle(Geom_Surface)& aSurf = *aSurfaces[aSurfIter]; - if (aConIndex == -1) - { - aGeomCone = Handle (Geom_ConicalSurface)::DownCast (aSurf); - if (!aGeomCone.IsNull()) - { - aConIndex = aSurfIter; - continue; - } - aGeomCyl = Handle (Geom_CylindricalSurface)::DownCast (aSurf); - if (!aGeomCyl.IsNull()) - { - aConIndex = aSurfIter; - continue; - } - } - if (aNbPlanes < 2) - { - aGeomPlanes[aNbPlanes] = Handle(Geom_Plane)::DownCast (aSurf); - if (!aGeomPlanes[aNbPlanes].IsNull()) - { - aGeomPlanesLoc[aNbPlanes] = &aLocSurf[aSurfIter]; - ++aNbPlanes; - } - } + ComputeSensitive (aSubfacesMap.FindKey (aShIndex), theOwner, + theSelection, + theDeflection, theDeviationAngle, theNbPOnEdge, theMaxParam, isAutoTriangulation); } - - if (!aGeomCone.IsNull()) - { - if (!aGeomPlanes[0].IsNull() - && !aGeomPlanes[1].IsNull() - && aGeomPlanes[0]->Position().Direction().IsEqual (aGeomCone->Position().Direction(), Precision::Angular()) - && aGeomPlanes[1]->Position().Direction().IsEqual (aGeomCone->Position().Direction(), Precision::Angular())) - { - const gp_Cone aCone = BRepAdaptor_Surface (*aFaces[aConIndex]).Cone(); - const Standard_Real aRad1 = aCone.RefRadius(); - const Standard_Real aHeight = aGeomPlanes[0]->Location().Transformed (*aGeomPlanesLoc[0]) - .Distance (aGeomPlanes[1]->Location().Transformed (*aGeomPlanesLoc[1])); - gp_Trsf aTrsf; - aTrsf.SetTransformation (aCone.Position(), gp_Ax3()); - const Standard_Real aTriangleHeight = (aCone.SemiAngle() > 0.0) - ? aRad1 / Tan (aCone.SemiAngle()) - : aRad1 / Tan (Abs (aCone.SemiAngle())) - aHeight; - const Standard_Real aRad2 = (aCone.SemiAngle() > 0.0) - ? aRad1 * (aTriangleHeight + aHeight) / aTriangleHeight - : aRad1 * aTriangleHeight / (aTriangleHeight + aHeight); - Handle(Select3D_SensitiveCylinder) aSensSCyl = new Select3D_SensitiveCylinder (theOwner, aRad1, aRad2, aHeight, aTrsf); - theSelection->Add (aSensSCyl); - break; - } - } - else if (!aGeomCyl.IsNull()) - { - if (!aGeomPlanes[0].IsNull() - && !aGeomPlanes[1].IsNull() - && aGeomPlanes[0]->Position().Direction().IsParallel (aGeomCyl->Position().Direction(), Precision::Angular()) - && aGeomPlanes[1]->Position().Direction().IsParallel (aGeomCyl->Position().Direction(), Precision::Angular())) - { - const gp_Cylinder aCyl = BRepAdaptor_Surface (*aFaces[aConIndex]).Cylinder(); - const Standard_Real aRad = aCyl.Radius(); - const Standard_Real aHeight = aGeomPlanes[0]->Location().Transformed (*aGeomPlanesLoc[0]) - .Distance (aGeomPlanes[1]->Location().Transformed (*aGeomPlanesLoc[1])); - - gp_Trsf aTrsf; - gp_Ax3 aPos = aCyl.Position(); - if (aGeomPlanes[0]->Position().IsCoplanar (aGeomPlanes[1]->Position(), Precision::Angular(), Precision::Angular())) - { - // cylinders created as a prism have an inverse vector of the cylindrical surface - aPos.SetDirection (aPos.Direction().Reversed()); - } - aTrsf.SetTransformation (aPos, gp_Ax3()); - - Handle(Select3D_SensitiveCylinder) aSensSCyl = new Select3D_SensitiveCylinder (theOwner, aRad, aRad, aHeight, aTrsf); - theSelection->Add (aSensSCyl); - break; - } - } - } - - for (Standard_Integer aShIndex = 1; aShIndex <= aSubfacesMap.Extent(); ++aShIndex) - { - ComputeSensitive (aSubfacesMap.FindKey (aShIndex), theOwner, - theSelection, - theDeflection, theDeviationAngle, theNbPOnEdge, theMaxParam, isAutoTriangulation); } break; } @@ -633,8 +490,7 @@ void StdSelect_BRepSelectionTool::GetEdgeSensitive (const TopoDS_Shape& theShape } else { - theSensitive = new Select3D_SensitiveCircle (theOwner, aCircle, - aParamFirst, aParamLast, Standard_False, 16); + theSensitive = new Select3D_SensitivePoly (theOwner, aCircle, aParamFirst, aParamLast, Standard_False); } break; } @@ -705,6 +561,57 @@ void StdSelect_BRepSelectionTool::GetEdgeSensitive (const TopoDS_Shape& theShape } } +//======================================================================= +//function : getCylinderHeight +//purpose : +//======================================================================= +static Standard_Real getCylinderHeight (const Handle(Poly_Triangulation)& theTriangulation, + const TopLoc_Location& theLoc) +{ + Bnd_Box aBox; + gp_Trsf aScaleTrsf; + aScaleTrsf.SetScaleFactor (theLoc.Transformation().ScaleFactor()); + theTriangulation->MinMax (aBox, aScaleTrsf); + return aBox.CornerMax().Z() - aBox.CornerMin().Z(); +} + +//======================================================================= +//function : isCylinderOrCone +//purpose : +//======================================================================= +static Standard_Boolean isCylinderOrCone (const TopoDS_Face& theHollowCylinder, const gp_Pnt& theLocation, gp_Dir& theDirection) +{ + Standard_Integer aCirclesNb = 0; + Standard_Boolean isCylinder = Standard_False; + gp_Pnt aPos; + + TopExp_Explorer anEdgeExp; + for (anEdgeExp.Init (theHollowCylinder, TopAbs_EDGE); anEdgeExp.More(); anEdgeExp.Next()) + { + const TopoDS_Edge& anEdge = TopoDS::Edge (anEdgeExp.Current()); + BRepAdaptor_Curve anAdaptor (anEdge); + + if (anAdaptor.GetType() == GeomAbs_Circle + && BRep_Tool::IsClosed (anEdge)) + { + aCirclesNb++; + isCylinder = Standard_True; + if (aCirclesNb == 2) + { + // Reverse the direction of the cylinder, relevant if the cylinder was created as a prism + if (aPos.IsEqual (theLocation, Precision::Confusion())) + { + theDirection.Reverse(); + } + return Standard_True; + } + aPos = anAdaptor.Circle().Location().XYZ(); + } + } + + return isCylinder; +} + //======================================================================= //function : GetSensitiveEntityForFace //purpose : @@ -749,6 +656,76 @@ Standard_Boolean StdSelect_BRepSelectionTool::GetSensitiveForFace (const TopoDS_ return Standard_True; } } + else if (Handle(Geom_ConicalSurface) aGeomCone = Handle(Geom_ConicalSurface)::DownCast (aSurf)) + { + gp_Dir aDummyDir; + if (isCylinderOrCone (theFace, gp_Pnt(), aDummyDir)) + { + const gp_Cone aCone = BRepAdaptor_Surface (theFace).Cone(); + const Standard_Real aRad1 = aCone.RefRadius(); + const Standard_Real aHeight = getCylinderHeight (aTriangulation, aLoc); + + gp_Trsf aTrsf; + aTrsf.SetTransformation (aCone.Position(), gp::XOY()); + + Standard_Real aRad2; + if (aRad1 == 0.0) + { + aRad2 = Tan (aCone.SemiAngle()) * aHeight; + } + else + { + const Standard_Real aTriangleHeight = (aCone.SemiAngle() > 0.0) + ? aRad1 / Tan (aCone.SemiAngle()) + : aRad1 / Tan (Abs (aCone.SemiAngle())) - aHeight; + aRad2 = (aCone.SemiAngle() > 0.0) + ? aRad1 * (aTriangleHeight + aHeight) / aTriangleHeight + : aRad1 * aTriangleHeight / (aTriangleHeight + aHeight); + } + + Handle(Select3D_SensitiveCylinder) aSensSCyl = new Select3D_SensitiveCylinder (theOwner, aRad1, aRad2, aHeight, aTrsf, true); + theSensitiveList.Append (aSensSCyl); + return Standard_True; + } + } + else if (Handle(Geom_CylindricalSurface) aGeomCyl = Handle(Geom_CylindricalSurface)::DownCast (aSurf)) + { + const gp_Cylinder aCyl = BRepAdaptor_Surface (theFace).Cylinder(); + gp_Ax3 aPos = aCyl.Position(); + gp_Dir aDirection = aPos.Direction(); + + if (isCylinderOrCone (theFace, aPos.Location(), aDirection)) + { + const Standard_Real aRad = aCyl.Radius(); + const Standard_Real aHeight = getCylinderHeight (aTriangulation, aLoc); + + gp_Trsf aTrsf; + aPos.SetDirection (aDirection); + aTrsf.SetTransformation (aPos, gp::XOY()); + + Handle(Select3D_SensitiveCylinder) aSensSCyl = new Select3D_SensitiveCylinder (theOwner, aRad, aRad, aHeight, aTrsf, true); + theSensitiveList.Append (aSensSCyl); + return Standard_True; + } + } + else if (Handle(Geom_Plane) aGeomPlane = Handle(Geom_Plane)::DownCast (aSurf)) + { + TopTools_IndexedMapOfShape aSubfacesMap; + TopExp::MapShapes (theFace, TopAbs_EDGE, aSubfacesMap); + if (aSubfacesMap.Extent() == 1) + { + const TopoDS_Edge& anEdge = TopoDS::Edge (aSubfacesMap.FindKey (1)); + BRepAdaptor_Curve anAdaptor (anEdge); + if (anAdaptor.GetType() == GeomAbs_Circle + && BRep_Tool::IsClosed (anEdge)) + { + Handle(Select3D_SensitiveCircle) aSensSCyl = new Select3D_SensitiveCircle (theOwner, anAdaptor.Circle(), theInteriorFlag); + theSensitiveList.Append (aSensSCyl); + return Standard_True; + } + } + } + Handle(Select3D_SensitiveTriangulation) STG = new Select3D_SensitiveTriangulation (theOwner, aTriangulation, aLoc, theInteriorFlag); theSensitiveList.Append (STG); return Standard_True; @@ -877,7 +854,7 @@ Standard_Boolean StdSelect_BRepSelectionTool::GetSensitiveForFace (const TopoDS_ } else { - theSensitiveList.Append (new Select3D_SensitiveCircle (theOwner, cu3d.Circle(), theInteriorFlag, 16)); + theSensitiveList.Append (new Select3D_SensitiveCircle (theOwner, cu3d.Circle(), theInteriorFlag)); } } } @@ -947,3 +924,163 @@ Standard_Boolean StdSelect_BRepSelectionTool::GetSensitiveForFace (const TopoDS_ } return Standard_True; } + +//======================================================================= +//function : GetSensitiveForCylinder +//purpose : +//======================================================================= +Standard_Boolean StdSelect_BRepSelectionTool::GetSensitiveForCylinder (const TopTools_IndexedMapOfShape& theSubfacesMap, + const Handle(SelectMgr_EntityOwner)& theOwner, + const Handle(SelectMgr_Selection)& theSelection) +{ + if (theSubfacesMap.Extent() == 2) // detect cone + { + const TopoDS_Face* aFaces[2] = + { + &TopoDS::Face (theSubfacesMap.FindKey (1)), + &TopoDS::Face (theSubfacesMap.FindKey (2)) + }; + + TopLoc_Location aLocSurf[2]; + const Handle(Geom_Surface)* aSurfaces[2] = + { + &BRep_Tool::Surface (*aFaces[0], aLocSurf[0]), + &BRep_Tool::Surface (*aFaces[1], aLocSurf[1]) + }; + + Standard_Integer aConIndex = 0; + Handle(Geom_ConicalSurface) aGeomCone = Handle(Geom_ConicalSurface)::DownCast (*aSurfaces[0]); + Handle(Geom_Plane) aGeomPln; + if (!aGeomCone.IsNull()) + { + aGeomPln = Handle(Geom_Plane)::DownCast (*aSurfaces[1]); + } + else + { + aConIndex = 1; + aGeomCone = Handle(Geom_ConicalSurface)::DownCast (*aSurfaces[1]); + aGeomPln = Handle(Geom_Plane)::DownCast (*aSurfaces[0]); + } + if (!aGeomCone.IsNull() + && !aGeomPln.IsNull() + && aGeomPln->Position().Direction().IsEqual (aGeomCone->Position().Direction(), Precision::Angular())) + { + const gp_Cone aCone = BRepAdaptor_Surface (*aFaces[aConIndex]).Cone(); + const Standard_Real aRad1 = aCone.RefRadius(); + const Standard_Real aHeight = (aRad1 != 0.0) + ? aRad1 / Abs (Tan (aCone.SemiAngle())) + : aCone.Location().Distance (aGeomPln->Location().Transformed (aLocSurf[aConIndex == 0 ? 1 : 0])); + const Standard_Real aRad2 = (aRad1 != 0.0) ? 0.0 : Tan (aCone.SemiAngle()) * aHeight; + gp_Trsf aTrsf; + aTrsf.SetTransformation (aCone.Position(), gp::XOY()); + Handle(Select3D_SensitiveCylinder) aSensSCyl = new Select3D_SensitiveCylinder (theOwner, aRad1, aRad2, aHeight, aTrsf); + theSelection->Add (aSensSCyl); + return Standard_True; + } + } + if (theSubfacesMap.Extent() == 3) // detect cylinder or truncated cone + { + const TopoDS_Face* aFaces[3] = + { + &TopoDS::Face (theSubfacesMap.FindKey (1)), + &TopoDS::Face (theSubfacesMap.FindKey (2)), + &TopoDS::Face (theSubfacesMap.FindKey (3)) + }; + + TopLoc_Location aLocSurf[3]; + const Handle(Geom_Surface)* aSurfaces[3] = + { + &BRep_Tool::Surface (*aFaces[0], aLocSurf[0]), + &BRep_Tool::Surface (*aFaces[1], aLocSurf[1]), + &BRep_Tool::Surface (*aFaces[2], aLocSurf[2]) + }; + + Standard_Integer aConIndex = -1, aNbPlanes = 0; + Handle(Geom_ConicalSurface) aGeomCone; + Handle(Geom_CylindricalSurface) aGeomCyl; + Handle(Geom_Plane) aGeomPlanes[2]; + const TopLoc_Location* aGeomPlanesLoc[2]; + for (Standard_Integer aSurfIter = 0; aSurfIter < 3; ++aSurfIter) + { + const Handle(Geom_Surface)& aSurf = *aSurfaces[aSurfIter]; + if (aConIndex == -1) + { + aGeomCone = Handle (Geom_ConicalSurface)::DownCast (aSurf); + if (!aGeomCone.IsNull()) + { + aConIndex = aSurfIter; + continue; + } + aGeomCyl = Handle (Geom_CylindricalSurface)::DownCast (aSurf); + if (!aGeomCyl.IsNull()) + { + aConIndex = aSurfIter; + continue; + } + } + if (aNbPlanes < 2) + { + aGeomPlanes[aNbPlanes] = Handle(Geom_Plane)::DownCast (aSurf); + if (!aGeomPlanes[aNbPlanes].IsNull()) + { + aGeomPlanesLoc[aNbPlanes] = &aLocSurf[aSurfIter]; + ++aNbPlanes; + } + } + } + + if (!aGeomCone.IsNull()) + { + if (!aGeomPlanes[0].IsNull() + && !aGeomPlanes[1].IsNull() + && aGeomPlanes[0]->Position().Direction().IsEqual (aGeomCone->Position().Direction(), Precision::Angular()) + && aGeomPlanes[1]->Position().Direction().IsEqual (aGeomCone->Position().Direction(), Precision::Angular())) + { + const gp_Cone aCone = BRepAdaptor_Surface (*aFaces[aConIndex]).Cone(); + const Standard_Real aRad1 = aCone.RefRadius(); + const Standard_Real aHeight = aGeomPlanes[0]->Location().Transformed (*aGeomPlanesLoc[0]) + .Distance (aGeomPlanes[1]->Location().Transformed (*aGeomPlanesLoc[1])); + gp_Trsf aTrsf; + aTrsf.SetTransformation (aCone.Position(), gp::XOY()); + const Standard_Real aTriangleHeight = (aCone.SemiAngle() > 0.0) + ? aRad1 / Tan (aCone.SemiAngle()) + : aRad1 / Tan (Abs (aCone.SemiAngle())) - aHeight; + const Standard_Real aRad2 = (aCone.SemiAngle() > 0.0) + ? aRad1 * (aTriangleHeight + aHeight) / aTriangleHeight + : aRad1 * aTriangleHeight / (aTriangleHeight + aHeight); + + Handle(Select3D_SensitiveCylinder) aSensSCyl = new Select3D_SensitiveCylinder (theOwner, aRad1, aRad2, aHeight, aTrsf); + theSelection->Add (aSensSCyl); + return Standard_True; + } + } + else if (!aGeomCyl.IsNull()) + { + if (!aGeomPlanes[0].IsNull() + && !aGeomPlanes[1].IsNull() + && aGeomPlanes[0]->Position().Direction().IsParallel (aGeomCyl->Position().Direction(), Precision::Angular()) + && aGeomPlanes[1]->Position().Direction().IsParallel (aGeomCyl->Position().Direction(), Precision::Angular())) + { + const gp_Cylinder aCyl = BRepAdaptor_Surface (*aFaces[aConIndex]).Cylinder(); + const Standard_Real aRad = aCyl.Radius(); + const Standard_Real aHeight = aGeomPlanes[0]->Location().Transformed (*aGeomPlanesLoc[0]) + .Distance (aGeomPlanes[1]->Location().Transformed (*aGeomPlanesLoc[1])); + + gp_Trsf aTrsf; + gp_Ax3 aPos = aCyl.Position(); + if (aGeomPlanes[0]->Position().IsCoplanar (aGeomPlanes[1]->Position(), Precision::Angular(), Precision::Angular())) + { + // cylinders created as a prism have an inverse vector of the cylindrical surface + aPos.SetDirection (aPos.Direction().Reversed()); + } + aTrsf.SetTransformation (aPos, gp::XOY()); + + Handle(Select3D_SensitiveCylinder) aSensSCyl = new Select3D_SensitiveCylinder (theOwner, aRad, aRad, aHeight, aTrsf); + theSelection->Add (aSensSCyl); + return Standard_True; + } + } + } + + return Standard_False; +} diff --git a/src/StdSelect/StdSelect_BRepSelectionTool.hxx b/src/StdSelect/StdSelect_BRepSelectionTool.hxx index 45dd97b5db..1c677fc3da 100644 --- a/src/StdSelect/StdSelect_BRepSelectionTool.hxx +++ b/src/StdSelect/StdSelect_BRepSelectionTool.hxx @@ -28,6 +28,7 @@ #include #include #include +#include class SelectMgr_SelectableObject; class TopoDS_Face; @@ -124,14 +125,14 @@ public: } //! Computes the sensitive primitives, stores them in the SelectMgr_Selection object, and returns this object. - //! @param theShape shape to compute sensitive entities - //! @param theOwner selectable owner object - //! @param theSelection selection to append new sensitive entities - //! @param theDeflection linear deflection - //! @param theDeflAngle angular deflection - //! @param theNbPOnEdge sensitivity parameters for edges and wires - //! @param theMaxiParam sensitivity parameters for infinite objects (the default value is 500) - //! @param theAutoTriang flag to compute triangulation for the faces which have none + //! @param[in] theShape shape to compute sensitive entities + //! @param[in] theOwner selectable owner object + //! @param[in] theSelection selection to append new sensitive entities + //! @param[in] theDeflection linear deflection + //! @param[in] theDeflAngle angular deflection + //! @param[in] theNbPOnEdge sensitivity parameters for edges and wires + //! @param[in] theMaxiParam sensitivity parameters for infinite objects (the default value is 500) + //! @param[in] theAutoTriang flag to compute triangulation for the faces which have none Standard_EXPORT static void ComputeSensitive (const TopoDS_Shape& theShape, const Handle(SelectMgr_EntityOwner)& theOwner, const Handle(SelectMgr_Selection)& theSelection, @@ -142,13 +143,13 @@ public: const Standard_Boolean theAutoTriang = Standard_True); //! Creates the 3D sensitive entities for Face selection. - //! @param theFace face to compute sensitive entities - //! @param theOwner selectable owner object - //! @param theOutList output result list to append created entities - //! @param theAutoTriang obsolete flag (has no effect) - //! @param theNbPOnEdge sensitivity parameters - //! @param theMaxiParam sensitivity parameters - //! @param theInteriorFlag flag indicating that face interior (TRUE) or face boundary (FALSE) should be selectable + //! @param[in] theFace face to compute sensitive entities + //! @param[in] theOwner selectable owner object + //! @param[out] theOutList output result list to append created entities + //! @param[in] theAutoTriang obsolete flag (has no effect) + //! @param[in] theNbPOnEdge sensitivity parameters + //! @param[in] theMaxiParam sensitivity parameters + //! @param[in] theInteriorFlag flag indicating that face interior (TRUE) or face boundary (FALSE) should be selectable Standard_EXPORT static Standard_Boolean GetSensitiveForFace (const TopoDS_Face& theFace, const Handle(SelectMgr_EntityOwner)& theOwner, Select3D_EntitySequence& theOutList, @@ -157,14 +158,22 @@ public: const Standard_Real theMaxiParam = 500, const Standard_Boolean theInteriorFlag = Standard_True); + //! Creates a sensitive cylinder. + //! @param[in] theSubfacesMap map of cylinder faces + //! @param[in] theOwner selectable owner object + //! @param[in] theSelection selection to append new sensitive entities + Standard_EXPORT static Standard_Boolean GetSensitiveForCylinder (const TopTools_IndexedMapOfShape& theSubfacesMap, + const Handle(SelectMgr_EntityOwner)& theOwner, + const Handle(SelectMgr_Selection)& theSelection); + //! Create a sensitive edge or sensitive wire. - //! @param theShape either TopoDS_Edge or TopoDS_Wire to compute sensitive entities - //! @param theOwner selectable owner object - //! @param theSelection selection to append new sensitive entities - //! @param theDeflection linear deflection - //! @param theDeviationAngle angular deflection - //! @param theNbPOnEdge sensitivity parameters - //! @param theMaxiParam sensitivity parameters + //! @param[in] theShape either TopoDS_Edge or TopoDS_Wire to compute sensitive entities + //! @param[in] theOwner selectable owner object + //! @param[in] theSelection selection to append new sensitive entities + //! @param[in] theDeflection linear deflection + //! @param[in] theDeviationAngle angular deflection + //! @param[in] theNbPOnEdge sensitivity parameters + //! @param[out] theMaxiParam sensitivity parameters Standard_EXPORT static void GetEdgeSensitive (const TopoDS_Shape& theShape, const Handle(SelectMgr_EntityOwner)& theOwner, const Handle(SelectMgr_Selection)& theSelection, diff --git a/src/ViewerTest/ViewerTest_ObjectCommands.cxx b/src/ViewerTest/ViewerTest_ObjectCommands.cxx index 98ae2e622a..69481addee 100644 --- a/src/ViewerTest/ViewerTest_ObjectCommands.cxx +++ b/src/ViewerTest/ViewerTest_ObjectCommands.cxx @@ -132,6 +132,7 @@ #include #include #include +#include #include #include @@ -1965,8 +1966,14 @@ class FilledCircle : public AIS_InteractiveObject // CASCADE RTTI DEFINE_STANDARD_RTTI_INLINE(FilledCircle, AIS_InteractiveObject); - FilledCircle (const gp_Pnt& theCenter, Standard_Real theRadius); - FilledCircle (Handle(Geom_Circle) theCircle); + FilledCircle (const Handle(Geom_Circle)& theCircle, + const Standard_Real theUStart, + const Standard_Real theUEnd); + + FilledCircle (const gp_Pnt& theCenter, + const Standard_Real theRadius, + const Standard_Real theUStart, + const Standard_Real theUEnd); private: TopoDS_Face ComputeFace(); @@ -1982,35 +1989,50 @@ class FilledCircle : public AIS_InteractiveObject protected: Handle(Geom_Circle) myCircle; - Standard_Boolean myFilledStatus; + Standard_Real myUStart; + Standard_Real myUEnd; + Standard_Boolean myFilledStatus; }; - -FilledCircle::FilledCircle(const gp_Pnt& theCenter, Standard_Real theRadius) -{ - myCircle = CreateCircle(theCenter, theRadius); - myFilledStatus = Standard_True; -} - -FilledCircle::FilledCircle(Handle(Geom_Circle) theCircle) -{ - myCircle = theCircle; - myFilledStatus = Standard_True; -} - -TopoDS_Face FilledCircle::ComputeFace() +FilledCircle::FilledCircle (const Handle(Geom_Circle)& theCircle, + const Standard_Real theUStart, + const Standard_Real theUEnd) +: myCircle (theCircle), + myUStart (theUStart), + myUEnd (theUEnd), + myFilledStatus (Standard_True) +{ } + +FilledCircle::FilledCircle (const gp_Pnt& theCenter, + const Standard_Real theRadius, + const Standard_Real theUStart, + const Standard_Real theUEnd) +: FilledCircle (CreateCircle (theCenter, theRadius), theUStart, theUEnd) +{ } + +TopoDS_Face FilledCircle::ComputeFace() { - // Create edge from myCircle - BRepBuilderAPI_MakeEdge anEdgeMaker(myCircle->Circ()); - TopoDS_Edge anEdge = anEdgeMaker.Edge(); + // Create edge from myCircle + BRepBuilderAPI_MakeEdge anEdgeMaker (myCircle->Circ(), myUStart, myUEnd); + TopoDS_Edge anEdge = anEdgeMaker.Edge(); - // Create wire from anEdge - BRepBuilderAPI_MakeWire aWireMaker(anEdge); + // Create wire from anEdge + BRepBuilderAPI_MakeWire aWireMaker; + if (Abs (Abs (myUEnd - myUStart) - 2.0 * M_PI) > gp::Resolution()) + { + TopoDS_Edge anEndCenterEdge = BRepBuilderAPI_MakeEdge (myCircle->Value (myUEnd), myCircle->Location()).Edge(); + TopoDS_Edge aStartCenterEdge = BRepBuilderAPI_MakeEdge (myCircle->Location(), myCircle->Value (myUStart)).Edge(); + aWireMaker = BRepBuilderAPI_MakeWire (anEdge, anEndCenterEdge, aStartCenterEdge); + } + else + { + aWireMaker = BRepBuilderAPI_MakeWire (anEdge); + } TopoDS_Wire aWire = aWireMaker.Wire(); // Create face from aWire - BRepBuilderAPI_MakeFace aFaceMaker(aWire); + BRepBuilderAPI_MakeFace aFaceMaker (aWire); TopoDS_Face aFace = aFaceMaker.Face(); return aFace; @@ -2030,12 +2052,22 @@ void FilledCircle::Compute (const Handle(PrsMgr_PresentationManager)& , StdPrs_ShadedShape::Add (thePrs, aFace, myDrawer); } -void FilledCircle::ComputeSelection(const Handle(SelectMgr_Selection) &theSelection, - const Standard_Integer /*theMode*/) +void FilledCircle::ComputeSelection (const Handle(SelectMgr_Selection) &theSelection, + const Standard_Integer /*theMode*/) { Handle(SelectMgr_EntityOwner) anEntityOwner = new SelectMgr_EntityOwner(this); - Handle(Select3D_SensitiveCircle) aSensitiveCircle = new Select3D_SensitiveCircle (anEntityOwner, myCircle->Circ(), myFilledStatus); - theSelection->Add(aSensitiveCircle); + Handle(Select3D_SensitiveEntity) aSensitiveCircle; + + if (Abs (Abs (myUEnd - myUStart) - 2.0 * M_PI) > gp::Resolution()) + { + aSensitiveCircle = new Select3D_SensitivePoly (anEntityOwner, myCircle->Circ(), myUStart, myUEnd, myFilledStatus); + } + else + { + aSensitiveCircle = new Select3D_SensitiveCircle (anEntityOwner, myCircle->Circ(), myFilledStatus); + } + + theSelection->Add (aSensitiveCircle); } //============================================================================== @@ -2046,51 +2078,63 @@ void FilledCircle::ComputeSelection(const Handle(SelectMgr_Selection) &theSelect //============================================================================== //function : VCircleBuilder //purpose : Build an AIS_Circle -//Draw arg : vcircle CircleName PlaneName PointName Radius IsFilled -// PointName PointName PointName IsFilled +//Draw arg : vcircle CircleName PlaneName PointName Radius IsFilled UStart UEnd +// PointName PointName PointName IsFilled UStart UEnd //============================================================================== -void DisplayCircle (Handle (Geom_Circle) theGeomCircle, - TCollection_AsciiString theName, - Standard_Boolean isFilled) +void DisplayCircle (const Handle(Geom_Circle)& theGeomCircle, + const TCollection_AsciiString& theName, + const Standard_Boolean isFilled, + const Standard_Real theUStart, + const Standard_Real theUEnd) { Handle(AIS_InteractiveObject) aCircle; - if (isFilled) + if (isFilled) { - aCircle = new FilledCircle(theGeomCircle); + aCircle = new FilledCircle (theGeomCircle, theUStart, theUEnd); } else { - aCircle = new AIS_Circle(theGeomCircle); - Handle(AIS_Circle)::DownCast (aCircle)->SetFilledCircleSens (Standard_False); + aCircle = new AIS_Circle (theGeomCircle, theUStart, theUEnd, Standard_False); } // Check if there is an object with given name // and remove it from context - if (GetMapOfAIS().IsBound2(theName)) + if (GetMapOfAIS().IsBound2(theName)) { - Handle(AIS_InteractiveObject) anInterObj = GetMapOfAIS().Find2(theName); - TheAISContext()->Remove(anInterObj, Standard_False); - GetMapOfAIS().UnBind2(theName); + Handle(AIS_InteractiveObject) anInterObj = GetMapOfAIS().Find2 (theName); + TheAISContext()->Remove (anInterObj, Standard_False); + GetMapOfAIS().UnBind2 (theName); } // Bind the circle to its name - GetMapOfAIS().Bind(aCircle, theName); + GetMapOfAIS().Bind (aCircle, theName); // Display the circle TheAISContext()->Display (aCircle, Standard_True); - } -static int VCircleBuilder(Draw_Interpretor& /*di*/, Standard_Integer argc, const char** argv) +static int VCircleBuilder (Draw_Interpretor& /*di*/, Standard_Integer argc, const char** argv) { - if (argc > 6 || argc < 2) - { + if (argc > 8 || argc < 2) + { Message::SendFail ("Syntax error: wrong number of arguments"); return 1; } - if (argc == 6) + Standard_Real anUStart = 0, anUEnd = M_PI * 2.0; + if (argc == 8) + { + anUStart = Draw::Atof (argv[6]) * M_PI / 180.0; + anUEnd = Draw::Atof (argv[7]) * M_PI / 180.0; + } + else if (argc == 4) + { + anUStart = Draw::Atof (argv[2]) * M_PI / 180.0; + anUEnd = Draw::Atof (argv[3]) * M_PI / 180.0; + } + + if (argc == 6 || argc == 8) { TCollection_AsciiString aName (argv[1]); Standard_Boolean isFilled = Draw::Atoi(argv[5]) != 0; @@ -2159,7 +2203,7 @@ static int VCircleBuilder(Draw_Interpretor& /*di*/, Standard_Integer argc, const return 1; } - DisplayCircle (aGeomCircle, aName, isFilled); + DisplayCircle (aGeomCircle, aName, isFilled, anUStart, anUEnd); } // Arguments: AIS_Plane AIS_Point Real @@ -2203,7 +2247,7 @@ static int VCircleBuilder(Draw_Interpretor& /*di*/, Standard_Integer argc, const return 1; } - DisplayCircle (aGeomCircle, aName, isFilled); + DisplayCircle (aGeomCircle, aName, isFilled, anUStart, anUEnd); } else { @@ -2263,7 +2307,7 @@ static int VCircleBuilder(Draw_Interpretor& /*di*/, Standard_Integer argc, const return 1; } - DisplayCircle (aGeomCircle, aName, isFilled); + DisplayCircle (aGeomCircle, aName, isFilled, anUStart, anUEnd); } else if (aShapeA.ShapeType() == TopAbs_FACE) { @@ -2307,7 +2351,7 @@ static int VCircleBuilder(Draw_Interpretor& /*di*/, Standard_Integer argc, const return 1; } - DisplayCircle (aGeomCircle, aName, isFilled); + DisplayCircle (aGeomCircle, aName, isFilled, anUStart, anUEnd); } else { @@ -6914,8 +6958,8 @@ Creates a line from coordinates, named or interactively selected vertices. )" /* [vline] */); addCmd ("vcircle", VCircleBuilder, /* [vcircle] */ R"( -vcircle CircleName [PointName PointName PointName IsFilled] - [PlaneName PointName Radius IsFilled] +vcircle CircleName [PointName PointName PointName IsFilled] [UStart UEnd] + [PlaneName PointName Radius IsFilled] [UStart UEnd] Creates a circle from named or interactively selected entities. Parameter IsFilled is defined as 0 or 1. )" /* [vcircle] */); diff --git a/tests/v3d/manipulator/rotate b/tests/v3d/manipulator/rotate index b648749d73..4b87f97fb6 100644 --- a/tests/v3d/manipulator/rotate +++ b/tests/v3d/manipulator/rotate @@ -113,7 +113,7 @@ vmanipulator m -followRotation 0 # test rotation around y axis (world reference frame) # --------------------------------------------------- -set mouse_pick {211 087} +set mouse_pick {205 087} set mouse_drag {232 127} vmoveto {*}$mouse_pick diff --git a/tests/vselect/bugs/bug27477 b/tests/vselect/bugs/bug27477 index 7ce18aef2a..5c0a69e228 100644 --- a/tests/vselect/bugs/bug27477 +++ b/tests/vselect/bugs/bug27477 @@ -8,7 +8,7 @@ proc check_output {theInfo} { for {set i 0} {$i < $aSize} {incr i} { if {[string equal [lindex $theInfo $i] "Depth:"]} { set aDepth [lindex $theInfo [expr $i + 1]] - if {[string equal $aDepth "17.5691"]} { + if {[string equal $aDepth "17.4833"]} { return 1 } else { return $aDepth @@ -35,7 +35,7 @@ set aResult [check_output $anInfo] if {$aResult == 1} { puts "OK" } else { - puts "ERROR: the depth value is incorrect: should be 17.5691, but is equal to:" + puts "ERROR: the depth value is incorrect: should be 17.4833, but is equal to:" puts $aResult } diff --git a/tests/vselect/cone_cylinder/circle_sector b/tests/vselect/cone_cylinder/circle_sector new file mode 100644 index 0000000000..00d6cfe577 --- /dev/null +++ b/tests/vselect/cone_cylinder/circle_sector @@ -0,0 +1,46 @@ +puts "=================================" +puts "0032547: Visualization, Select3D_SensitiveCylinder - implement picking of a hollow cylinder" +puts "" +puts "=================================" + +pload VISUALIZATION OPENGL +vinit View1 + +# Filled circle sector +vpoint C1P1 10 10 10 +vpoint C1P2 60 60 -10 +vpoint C1P3 35 100 10 +vcircle c1 C1P1 C1P2 C1P3 1 90 150 + +# Circle arc +vpoint C2P1 10 -10 -10 +vpoint C2P2 60 -60 10 +vpoint C2P3 35 -100 10 +vcircle c2 C2P1 C2P2 C2P3 0 90 150 + +# Filled circle +vpoint C3P1 -80 -10 10 +vpoint C3P2 -140 -50 -10 +vpoint C3P3 -110 -100 -10 +vcircle c3 C3P1 C3P2 C3P3 1 0 360 + +# Circle wire +vpoint C4P1 -80 10 10 +vpoint C4P2 -140 60 10 +vpoint C4P3 -110 100 -10 +vcircle c4 C4P1 C4P2 C4P3 0 0 360 + +vbottom +vfit + +vselect 100 100 +if { ![string match "*Select3D_SensitiveCircle*" [vstate -entities]] } { puts "Error: filled circle should be detected" } + +vselect 100 225 +if { ![string match "*Select3D_SensitiveCircle*" [vstate -entities]] } { puts "Error: circle wire should be detected" } + +vselect 390 50 +if { ![string match "*Select3D_SensitivePoly*" [vstate -entities]] } { puts "Error: circle arc should be detected" } + +vselect 360 350 +if { ![string match "*Select3D_SensitivePoly*" [vstate -entities]] } { puts "Error: circle sector should be detected" } diff --git a/tests/vselect/cone_cylinder/circle_wire b/tests/vselect/cone_cylinder/circle_wire new file mode 100644 index 0000000000..5b3b6ea143 --- /dev/null +++ b/tests/vselect/cone_cylinder/circle_wire @@ -0,0 +1,67 @@ +puts "=================================" +puts "0032547: Visualization, Select3D_SensitiveCylinder - implement picking of a hollow cylinder" +puts "" +puts "=================================" + +pload VISUALIZATION OPENGL +vinit View1 + +vpoint radP1 0 0 0 +vpoint radP2 50 50 0 +vpoint radP3 100 0 0 +vcircle circle radP1 radP2 radP3 0 +vaxo +vfit + +# Single click selection +# point inside a circle +vselect 200 200 +if { [string match "*Select3D_SensitiveCircle*" [vstate -entities]] } { puts "Error: circle should not be detected" } + +# point on circle +vselect 177 285 +if { ![string match "*Select3D_SensitiveCircle*" [vstate -entities]] } { puts "Error: circle should be detected" } + +# point outside a circle +vselect 360 360 +if { [string match "*Select3D_SensitiveCircle*" [vstate -entities]] } { puts "Error: circle should not be detected" } + + +# Selection with polygon +# circle inside a polygon +vselect 50 300 360 300 360 100 50 100 +if { ![string match "*Select3D_SensitiveCircle*" [vstate -entities]] } { puts "Error: circle inside a polygon should be detected" } + +# circle is partially covered by a polygon +vselect 250 300 360 300 360 100 250 100 -allowoverlap 0 +if { [string match "*Select3D_SensitiveCircle*" [vstate -entities]] } { puts "Error: circle partially covered by a polygon should not be detected" } + +vselect 250 300 360 300 360 100 250 100 -allowoverlap 1 +if { ![string match "*Select3D_SensitiveCircle*" [vstate -entities]] } { puts "Error: circle partially covered by a polygon should be detected" } + +# polygon inside a circle +vselect 150 200 200 200 200 150 150 150 -allowoverlap 0 +if { [string match "*Select3D_SensitiveCircle*" [vstate -entities]] } { puts "Error: circle around the polygon should not be detected" } + +vselect 150 200 200 200 200 150 150 150 -allowoverlap 1 +if { [string match "*Select3D_SensitiveCircle*" [vstate -entities]] } { puts "Error: circle around the polygon should not be detected" } + + +# Selection with rectangle +# circle inside a rectangle +vselect 50 300 360 100 +if { ![string match "*Select3D_SensitiveCircle*" [vstate -entities]] } { puts "Error: circle inside a rectangle should be detected" } + +# circle is partially covered by a rectangle +vselect 250 300 360 100 -allowoverlap 0 +if { [string match "*Select3D_SensitiveCircle*" [vstate -entities]] } { puts "Error: circle partially covered by a rectangle should not be detected" } + +vselect 250 300 360 100 -allowoverlap 1 +if { ![string match "*Select3D_SensitiveCircle*" [vstate -entities]] } { puts "Error: circle partially covered by a rectangle should be detected" } + +# rectangle inside a circle +vselect 150 200 200 150 -allowoverlap 0 +if { [string match "*Select3D_SensitiveCircle*" [vstate -entities]] } { puts "Error: circle around the rectangle should not be detected" } + +vselect 150 200 200 150 -allowoverlap 1 +if { [string match "*Select3D_SensitiveCircle*" [vstate -entities]] } { puts "Error: circle around the rectangle should not be detected" } diff --git a/tests/vselect/cone_cylinder/filled_circle b/tests/vselect/cone_cylinder/filled_circle new file mode 100644 index 0000000000..9d35f96c04 --- /dev/null +++ b/tests/vselect/cone_cylinder/filled_circle @@ -0,0 +1,67 @@ +puts "=================================" +puts "0032547: Visualization, Select3D_SensitiveCylinder - implement picking of a hollow cylinder" +puts "" +puts "=================================" + +pload VISUALIZATION OPENGL +vinit View1 + +vpoint radP1 0 0 0 +vpoint radP2 50 50 0 +vpoint radP3 100 0 0 +vcircle circle radP1 radP2 radP3 1 +vaxo +vfit + +# Single click selection +# point inside a circle +vselect 200 200 +if { ![string match "*Select3D_SensitiveCircle*" [vstate -entities]] } { puts "Error: circle should be detected" } + +# point on circle +vselect 177 279 +if { ![string match "*Select3D_SensitiveCircle*" [vstate -entities]] } { puts "Error: circle should be detected" } + +# point outside a circle +vselect 360 360 +if { [string match "*Select3D_SensitiveCircle*" [vstate -entities]] } { puts "Error: circle should not be detected" } + + +# Selection with polygon +# circle inside a polygon +vselect 50 300 360 300 360 100 50 100 +if { ![string match "*Select3D_SensitiveCircle*" [vstate -entities]] } { puts "Error: circle inside a polygon should be detected" } + +# circle is partially covered by a polygon +vselect 250 300 360 300 360 100 250 100 -allowoverlap 0 +if { [string match "*Select3D_SensitiveCircle*" [vstate -entities]] } { puts "Error: circle partially covered by a polygon should not be detected" } + +vselect 250 300 360 300 360 100 250 100 -allowoverlap 1 +if { ![string match "*Select3D_SensitiveCircle*" [vstate -entities]] } { puts "Error: circle partially covered by a polygon should be detected" } + +# polygon inside a circle +vselect 150 200 200 200 200 150 150 150 -allowoverlap 0 +if { [string match "*Select3D_SensitiveCircle*" [vstate -entities]] } { puts "Error: circle around the polygon should not be detected" } + +vselect 150 200 200 200 200 150 150 150 -allowoverlap 1 +if { ![string match "*Select3D_SensitiveCircle*" [vstate -entities]] } { puts "Error: circle around the polygon should be detected" } + + +# Selection with rectangle +# circle inside a rectangle +vselect 50 300 360 100 +if { ![string match "*Select3D_SensitiveCircle*" [vstate -entities]] } { puts "Error: circle inside a rectangle should be detected" } + +# circle is partially covered by a rectangle +vselect 250 300 360 100 -allowoverlap 0 +if { [string match "*Select3D_SensitiveCircle*" [vstate -entities]] } { puts "Error: circle partially covered by a rectangle should not be detected" } + +vselect 250 300 360 100 -allowoverlap 1 +if { ![string match "*Select3D_SensitiveCircle*" [vstate -entities]] } { puts "Error: circle partially covered by a rectangle should be detected" } + +# rectangle inside a circle +vselect 150 200 200 150 -allowoverlap 0 +if { [string match "*Select3D_SensitiveCircle*" [vstate -entities]] } { puts "Error: circle around the rectangle should not be detected" } + +vselect 150 200 200 150 -allowoverlap 1 +if { ![string match "*Select3D_SensitiveCircle*" [vstate -entities]] } { puts "Error: circle around the rectangle should be detected" } diff --git a/tests/vselect/cone_cylinder/hollow_cone_cyl b/tests/vselect/cone_cylinder/hollow_cone_cyl new file mode 100644 index 0000000000..4e870ff2e5 --- /dev/null +++ b/tests/vselect/cone_cylinder/hollow_cone_cyl @@ -0,0 +1,61 @@ +puts "=================================" +puts "0032547: Visualization, Select3D_SensitiveCylinder - implement picking of a hollow cylinder" +puts " " +puts "=================================" + +pload MODELING VISUALIZATION +pcone cone 10 5 10 +trotate cone 0 0 0 1 1 0 30 +ttranslate cone 15 15 0 + +pcylinder cyl 7 7 +trotate cyl 0 0 0 1 1 0 30 + +explode cyl F +explode cone F + +vdisplay -dispmode 1 cyl_1 cone_1 + +vaxo +vfit + +vselect 60 220 140 220 140 190 60 190 -allowoverlap 0 +if { [string match "*Select3D_SensitiveCylinder*" [vstate -entities]] } { puts "Error: cylinder should not be detected" } + +vselect 60 220 140 220 140 190 60 190 -allowoverlap 1 +if { [string match "*Select3D_SensitiveCylinder*" [vstate -entities]] } { puts "Error: cylinder should not be detected" } + +vselect 60 220 140 190 -allowoverlap 0 +if { [string match "*Select3D_SensitiveCylinder*" [vstate -entities]] } { puts "Error: cylinder should not be detected" } + +vselect 60 220 140 190 -allowoverlap 1 +if { [string match "*Select3D_SensitiveCylinder*" [vstate -entities]] } { puts "Error: cylinder should not be detected" } + +vselect 270 210 310 210 310 160 270 160 -allowoverlap 0 +if { [string match "*Select3D_SensitiveCylinder*" [vstate -entities]] } { puts "Error: cone should not be detected" } + +vselect 270 210 310 210 310 160 270 160 -allowoverlap 1 +if { [string match "*Select3D_SensitiveCylinder*" [vstate -entities]] } { puts "Error: cone should not be detected" } + +vselect 270 210 310 160 -allowoverlap 0 +if { [string match "*Select3D_SensitiveCylinder*" [vstate -entities]] } { puts "Error: cone should not be detected" } + +vselect 270 210 310 160 -allowoverlap 1 +if { [string match "*Select3D_SensitiveCylinder*" [vstate -entities]] } { puts "Error: cone should not be detected" } + + +vselect 60 210 310 210 310 200 60 200 -allowoverlap 0 +if { [string match "*Select3D_SensitiveCylinder*" [vstate -entities]]} { puts "Error: cone should not be detected" } + +vselect 60 210 310 210 310 200 60 200 -allowoverlap 1 +if { ![string match "*Select3D_SensitiveCylinder*" [vstate -entities]] + && [string first "Select3D_SensitiveCylinder" [vstate -entities]] + != [string last "Select3D_SensitiveCylinder" [vstate -entities]]} { puts "Error: cone should be detected" } + +vselect 60 210 310 200 -allowoverlap 0 +if { [string match "*Select3D_SensitiveCylinder*" [vstate -entities]] } { puts "Error: cone should not be detected" } + +vselect 60 210 310 200 -allowoverlap 1 +if { ![string match "*Select3D_SensitiveCylinder*" [vstate -entities]] + && [string first "Select3D_SensitiveCylinder" [vstate -entities]] + != [string last "Select3D_SensitiveCylinder" [vstate -entities]] } { puts "Error: cone should be detected" } diff --git a/tests/vselect/cone_cylinder/transformed_circle b/tests/vselect/cone_cylinder/transformed_circle new file mode 100644 index 0000000000..c068dd4f31 --- /dev/null +++ b/tests/vselect/cone_cylinder/transformed_circle @@ -0,0 +1,41 @@ +puts "=================================" +puts "0032547: Visualization, Select3D_SensitiveCylinder - implement picking of a hollow cylinder" +puts "" +puts "=================================" + +pload VISUALIZATION OPENGL +vinit View1 + +vpoint C1P1 10 10 10 +vpoint C1P2 60 60 -10 +vpoint C1P3 35 100 10 +vcircle c1 C1P1 C1P2 C1P3 1 + +vpoint C2P1 10 -10 -10 +vpoint C2P2 60 -60 10 +vpoint C2P3 35 -100 10 +vcircle c2 C2P1 C2P2 C2P3 1 + +vpoint C3P1 -80 -10 10 +vpoint C3P2 -140 -50 -10 +vpoint C3P3 -110 -100 -10 +vcircle c3 C3P1 C3P2 C3P3 1 + +vpoint C4P1 -80 10 10 +vpoint C4P2 -140 60 10 +vpoint C4P3 -110 100 -10 +vcircle c4 C4P1 C4P2 C4P3 1 + +vbottom +vfit + +vmoveto 100 100 +if {[vreadpixel 100 100 rgb name] != "TURQUOISE"} { puts "ERROR: the circle should be highlighted" } + +vmoveto 200 200 + +vseldump $imagedir/${casename}_selnorm.png -type surfNormal + +vsensdis + +vseldump $imagedir/${casename}.png diff --git a/tests/vselect/cone_cylinder/trsf_cone b/tests/vselect/cone_cylinder/trsf_cone index a87ecd58d4..4b21f5575b 100644 --- a/tests/vselect/cone_cylinder/trsf_cone +++ b/tests/vselect/cone_cylinder/trsf_cone @@ -11,7 +11,7 @@ ttranslate c 2500 3500 1000 vinit View1 -# check Select3D_SensitiveTriangulation +# check Select3D_SensitiveCircle vclear vaxo compound {*}[explode c Sh] cc @@ -21,7 +21,7 @@ vselaxis 2500 3498 1001 0 1 0 -display a -showNormal set aPntTris [vmoveto 200 200] vpoint pp {*}$aPntTris checkpoint aPntTris_p $aPntTris {2500.42 3499.54 1000.81} 0.1 -if { ![string match "*Select3D_SensitiveTriangulation*" [vstate -entities]] } { puts "Error: triangulation should be detected" } +if { ![string match "*Select3D_SensitiveCircle*" [vstate -entities]] } { puts "Error: circle should be detected" } vfit vdump $imagedir/${casename}_prs_tris.png vseldump $imagedir/${casename}_selnorm_tris.png -type surfNormal diff --git a/tests/vselect/cone_cylinder/trsf_cyl b/tests/vselect/cone_cylinder/trsf_cyl index 6711eb2609..48dd8373d7 100644 --- a/tests/vselect/cone_cylinder/trsf_cyl +++ b/tests/vselect/cone_cylinder/trsf_cyl @@ -11,7 +11,7 @@ ttranslate c 2500 3500 1000 vinit View1 -# check Select3D_SensitiveTriangulation +# check Select3D_SensitiveCircle vclear vaxo compound {*}[explode c Sh] cc @@ -21,7 +21,7 @@ vselaxis 2500 3498 1001 0 1 0 -display a -showNormal set aPntTris [vmoveto 200 200] vpoint pp {*}$aPntTris checkpoint aPntTris_p $aPntTris {2500.9 3499.0 1001.6} 0.1 -if { ![string match "*Select3D_SensitiveTriangulation*" [vstate -entities]] } { puts "Error: triangulation should be detected" } +if { ![string match "*Select3D_SensitiveCircle*" [vstate -entities]] } { puts "Error: circle should be detected" } vfit vdump $imagedir/${casename}_prs_tris.png vseldump $imagedir/${casename}_selnorm_tris.png -type surfNormal From acac44d571c379b974e609ab8376ab3fb38f992e Mon Sep 17 00:00:00 2001 From: dpasukhi Date: Tue, 5 Jul 2022 16:10:36 +0300 Subject: [PATCH 361/639] 0033053: Data Exchange, Step Export - Compound with vertex is ignored Fixed problem with deep compound including with vertex group. --- src/STEPControl/STEPControl_ActorWrite.cxx | 100 +++++++++++++++------ src/STEPControl/STEPControl_ActorWrite.hxx | 9 ++ tests/bugs/step/bug33053 | 23 +++++ 3 files changed, 104 insertions(+), 28 deletions(-) create mode 100644 tests/bugs/step/bug33053 diff --git a/src/STEPControl/STEPControl_ActorWrite.cxx b/src/STEPControl/STEPControl_ActorWrite.cxx index 69dc9db8a3..6b0706c9fe 100644 --- a/src/STEPControl/STEPControl_ActorWrite.cxx +++ b/src/STEPControl/STEPControl_ActorWrite.cxx @@ -341,6 +341,43 @@ void STEPControl_ActorWrite::mergeInfoForNM(const Handle(Transfer_FinderProcess) } } +//======================================================================= +//function : separateShapeToSoloVertex +//purpose : +//======================================================================= +Standard_Boolean STEPControl_ActorWrite::separateShapeToSoloVertex(const TopoDS_Shape& theShape, + TopTools_SequenceOfShape& theVertices) +{ + if (theShape.IsNull()) + { + return Standard_False; + } + switch (theShape.ShapeType()) + { + case TopAbs_COMPOUND: + { + for (TopoDS_Iterator anIter(theShape); anIter.More(); anIter.Next()) + { + if (!separateShapeToSoloVertex(anIter.Value(), theVertices)) + { + return Standard_False; + } + } + break; + } + case TopAbs_VERTEX: + { + theVertices.Append(theShape); + break; + } + default: + { + theVertices.Clear(); + return Standard_False; + } + } + return Standard_True; +} //======================================================================= //function : SetMode @@ -814,42 +851,49 @@ Handle(Transfer_Binder) STEPControl_ActorWrite::TransferShape // create a list of items to translate Handle(TopTools_HSequenceOfShape) RepItemSeq = new TopTools_HSequenceOfShape(); - - Standard_Boolean isSeparateVertices = + + Standard_Boolean isSeparateVertices = Interface_Static::IVal("write.step.vertex.mode") == 0;//bug 23950 // PTV 16.09.2002 OCC725 separate shape from solo vertices. Standard_Boolean isOnlyVertices = Standard_False; - if (theShape.ShapeType() == TopAbs_COMPOUND) { - Standard_Integer countVrtx = 0; - Standard_Integer countSh = 0; + if (theShape.ShapeType() == TopAbs_COMPOUND && isSeparateVertices) + { TopoDS_Compound aNewShape, aCompOfVrtx; - BRep_Builder aB; - aB.MakeCompound(aNewShape); - aB.MakeCompound(aCompOfVrtx); - TopoDS_Iterator anCompIt(theShape); - if (isSeparateVertices) { - for (; anCompIt.More(); anCompIt.Next()) { - TopoDS_Shape aCurSh = anCompIt.Value(); - if (aCurSh.ShapeType() != TopAbs_VERTEX) { - aB.Add(aNewShape, aCurSh); - countSh++; + BRep_Builder aBuilder; + aBuilder.MakeCompound(aNewShape); + aBuilder.MakeCompound(aCompOfVrtx); + TopTools_SequenceOfShape aVertices; + isOnlyVertices = separateShapeToSoloVertex(theShape, aVertices); + if (!isOnlyVertices) + { + for (TopoDS_Iterator anCompIt(theShape); anCompIt.More(); anCompIt.Next()) + { + const TopoDS_Shape& aCurSh = anCompIt.Value(); + TopTools_SequenceOfShape aVerticesOfSubSh; + if (separateShapeToSoloVertex(aCurSh, aVerticesOfSubSh)) + { + aVertices.Append(aVerticesOfSubSh); } - else { - aB.Add(aCompOfVrtx, aCurSh); - countVrtx++; + else + { + aBuilder.Add(aNewShape, aCurSh); } } - // replace the shapes - if (countSh) - theShape = aNewShape; - if (countVrtx) - RepItemSeq->Append(aCompOfVrtx); - if (countSh == 0) - isOnlyVertices = Standard_True; + theShape = aNewShape; } - } - - if (theShape.ShapeType() == TopAbs_COMPOUND) { + for (TopTools_HSequenceOfShape::Iterator anIterV(aVertices); + anIterV.More(); anIterV.Next()) + { + aBuilder.Add(aCompOfVrtx, anIterV.Value()); + } + if (!aVertices.IsEmpty()) + { + RepItemSeq->Append(aCompOfVrtx); + } + } + + if (theShape.ShapeType() == TopAbs_COMPOUND) + { TopExp_Explorer SolidExp, ShellExp, FaceExp; if (mymode != STEPControl_GeometricCurveSet) { for (SolidExp.Init(theShape, TopAbs_SOLID); diff --git a/src/STEPControl/STEPControl_ActorWrite.hxx b/src/STEPControl/STEPControl_ActorWrite.hxx index accdf962b8..d9d09b20d2 100644 --- a/src/STEPControl/STEPControl_ActorWrite.hxx +++ b/src/STEPControl/STEPControl_ActorWrite.hxx @@ -117,6 +117,15 @@ private: //! bind already written shared faces to STEP entity for non-manifold Standard_EXPORT void mergeInfoForNM(const Handle(Transfer_FinderProcess)& theFP, const Handle(Standard_Transient) &theInfo) const; + //! Gets sequence of vertices of all compounds level by recursive + //! @param[in] theShape shape to iterate, checked for compound type and sub shapes vertex type + //! @param[out] theVertices sequence of found vertices via recursively iterate of shape + //! @return TRUE if one or more vertex was found and all shapes were compound or vertex + Standard_Boolean separateShapeToSoloVertex(const TopoDS_Shape& theShape, + TopTools_SequenceOfShape& theVertices); + + + Standard_Integer mygroup; Standard_Real mytoler; STEPConstruct_ContextTool myContext; diff --git a/tests/bugs/step/bug33053 b/tests/bugs/step/bug33053 new file mode 100644 index 0000000000..edf34e1257 --- /dev/null +++ b/tests/bugs/step/bug33053 @@ -0,0 +1,23 @@ +puts "====================================" +puts "0033053: Data Exchange, Step Export - Compound with vertex is ignored" +puts "====================================" +puts "" + +pload OCAF + +Close D_orig -silent +Close D_comp -silent + +ReadStep D_orig [locate_data_file bug33053_shapes_2d.stp] + +WriteStep D_orig $imagedir/${casename}_D.stp + +ReadStep D_comp $imagedir/${casename}_D.stp + +file delete $imagedir/${casename}_D.stp + +XGetOneShape orig D_orig +XGetOneShape comp D_comp + +checkshape comp +checknbshapes orig -ref [nbshapes comp] From 06aa200142ee691919dd364162992f47b1ae4b01 Mon Sep 17 00:00:00 2001 From: mzernova Date: Wed, 24 Aug 2022 15:04:10 +0300 Subject: [PATCH 362/639] 0032172: Visualization, TKOpenGl - implement simple shadow mapping for a spot light source added test: opengl/data/shadows/spotlight --- src/Graphic3d/Graphic3d_CLight.cxx | 3 +- src/Graphic3d/Graphic3d_ShaderManager.cxx | 49 +++++++++++-------- src/OpenGl/OpenGl_ShaderManager.hxx | 2 +- src/OpenGl/OpenGl_ShadowMap.cxx | 38 ++++++++++++-- src/OpenGl/OpenGl_View.cxx | 7 ++- src/Shaders/FILES | 4 +- ...ionalLightShadow.glsl => LightShadow.glsl} | 8 +-- src/Shaders/PBRSpotLight.glsl | 5 +- src/Shaders/PhongSpotLight.glsl | 8 +-- ..._glsl.pxx => Shaders_LightShadow_glsl.pxx} | 12 ++--- src/Shaders/Shaders_PBRSpotLight_glsl.pxx | 5 +- src/Shaders/Shaders_PhongSpotLight_glsl.pxx | 8 +-- src/ViewerTest/ViewerTest_ViewerCommands.cxx | 9 ++-- tests/opengl/data/shadows/spotlight | 39 +++++++++++++++ 14 files changed, 143 insertions(+), 54 deletions(-) rename src/Shaders/{DirectionalLightShadow.glsl => LightShadow.glsl} (88%) rename src/Shaders/{Shaders_DirectionalLightShadow_glsl.pxx => Shaders_LightShadow_glsl.pxx} (86%) create mode 100644 tests/opengl/data/shadows/spotlight diff --git a/src/Graphic3d/Graphic3d_CLight.cxx b/src/Graphic3d/Graphic3d_CLight.cxx index 4aa8a4bdfb..8283af632d 100644 --- a/src/Graphic3d/Graphic3d_CLight.cxx +++ b/src/Graphic3d/Graphic3d_CLight.cxx @@ -149,7 +149,8 @@ void Graphic3d_CLight::SetEnabled (Standard_Boolean theIsOn) // ======================================================================= void Graphic3d_CLight::SetCastShadows (Standard_Boolean theToCast) { - if (myType != Graphic3d_TypeOfLightSource_Directional) + if (myType != Graphic3d_TypeOfLightSource_Directional + && myType != Graphic3d_TypeOfLightSource_Spot) { throw Standard_NotImplemented ("Graphic3d_CLight::SetCastShadows() is not implemented for this light type"); } diff --git a/src/Graphic3d/Graphic3d_ShaderManager.cxx b/src/Graphic3d/Graphic3d_ShaderManager.cxx index 6c6edc6eef..8650a554df 100644 --- a/src/Graphic3d/Graphic3d_ShaderManager.cxx +++ b/src/Graphic3d/Graphic3d_ShaderManager.cxx @@ -18,7 +18,7 @@ #include #include -#include "../Shaders/Shaders_DirectionalLightShadow_glsl.pxx" +#include "../Shaders/Shaders_LightShadow_glsl.pxx" #include "../Shaders/Shaders_PBRDistribution_glsl.pxx" #include "../Shaders/Shaders_PBRDirectionalLight_glsl.pxx" #include "../Shaders/Shaders_PBRGeometry_glsl.pxx" @@ -1165,20 +1165,6 @@ TCollection_AsciiString Graphic3d_ShaderManager::stdComputeLighting (Standard_In if (theNbLights <= THE_NB_UNROLLED_LIGHTS_MAX) { Standard_Integer anIndex = 0; - if (theNbShadowMaps > 0) - { - for (Graphic3d_LightSet::Iterator aLightIter (theLights, Graphic3d_LightSet::IterationFilter_ExcludeDisabledAndAmbient); - aLightIter.More(); aLightIter.Next()) - { - if (aLightIter.Value()->Type() == Graphic3d_TypeOfLightSource_Directional - && aLightIter.Value()->ToCastShadows()) - { - aLightsLoop = aLightsLoop + EOL" occDirectionalLight (" + anIndex + ", theNormal, theView, theIsFront," - EOL" occDirectionalLightShadow (occShadowMapSamplers[" + anIndex + "], " + anIndex + ", theNormal));"; - ++anIndex; - } - } - } for (Graphic3d_LightSet::Iterator aLightIter (theLights, Graphic3d_LightSet::IterationFilter_ExcludeDisabledAndAmbient); aLightIter.More(); aLightIter.Next()) { @@ -1193,9 +1179,14 @@ TCollection_AsciiString Graphic3d_ShaderManager::stdComputeLighting (Standard_In if (theNbShadowMaps > 0 && aLightIter.Value()->ToCastShadows()) { - break; + aLightsLoop = aLightsLoop + + EOL" occDirectionalLight (" + anIndex + ", theNormal, theView, theIsFront," + EOL" occLightShadow (occShadowMapSamplers[" + anIndex + "], " + anIndex + ", theNormal));"; + } + else + { + aLightsLoop = aLightsLoop + EOL" occDirectionalLight (" + anIndex + ", theNormal, theView, theIsFront, 1.0);"; } - aLightsLoop = aLightsLoop + EOL" occDirectionalLight (" + anIndex + ", theNormal, theView, theIsFront, 1.0);"; ++anIndex; break; } @@ -1207,7 +1198,17 @@ TCollection_AsciiString Graphic3d_ShaderManager::stdComputeLighting (Standard_In } case Graphic3d_TypeOfLightSource_Spot: { - aLightsLoop = aLightsLoop + EOL" occSpotLight (" + anIndex + ", theNormal, theView, aPoint, theIsFront);"; + if (theNbShadowMaps > 0 + && aLightIter.Value()->ToCastShadows()) + { + aLightsLoop = aLightsLoop + + EOL" occSpotLight (" + anIndex + ", theNormal, theView, aPoint, theIsFront," + EOL" occLightShadow (occShadowMapSamplers[" + anIndex + "], " + anIndex + ", theNormal));"; + } + else + { + aLightsLoop = aLightsLoop + EOL" occSpotLight (" + anIndex + ", theNormal, theView, aPoint, theIsFront, 1.0);"; + } ++anIndex; break; } @@ -1254,7 +1255,7 @@ TCollection_AsciiString Graphic3d_ShaderManager::stdComputeLighting (Standard_In aLightsLoop += EOL" if (aType == OccLightType_Spot)" EOL" {" - EOL" occSpotLight (anIndex, theNormal, theView, aPoint, theIsFront);" + EOL" occSpotLight (anIndex, theNormal, theView, aPoint, theIsFront, 1.0);" EOL" }"; } aLightsLoop += EOL" }"; @@ -1269,6 +1270,7 @@ TCollection_AsciiString Graphic3d_ShaderManager::stdComputeLighting (Standard_In aLightsFunc += Shaders_PBRIllumination_glsl; } + bool isShadowShaderAdded = false; if (theLights->NbEnabledLightsOfType (Graphic3d_TypeOfLightSource_Directional) == 1 && theNbLights == 1 && !theIsPBR @@ -1280,9 +1282,10 @@ TCollection_AsciiString Graphic3d_ShaderManager::stdComputeLighting (Standard_In } else if (theLights->NbEnabledLightsOfType (Graphic3d_TypeOfLightSource_Directional) > 0) { - if (theNbShadowMaps > 0) + if (theNbShadowMaps > 0 && !isShadowShaderAdded) { - aLightsFunc += Shaders_DirectionalLightShadow_glsl; + aLightsFunc += Shaders_LightShadow_glsl; + isShadowShaderAdded = true; } aLightsFunc += theIsPBR ? Shaders_PBRDirectionalLight_glsl : Shaders_PhongDirectionalLight_glsl; } @@ -1292,6 +1295,10 @@ TCollection_AsciiString Graphic3d_ShaderManager::stdComputeLighting (Standard_In } if (theLights->NbEnabledLightsOfType (Graphic3d_TypeOfLightSource_Spot) > 0) { + if (theNbShadowMaps > 0 && !isShadowShaderAdded) + { + aLightsFunc += Shaders_LightShadow_glsl; + } aLightsFunc += theIsPBR ? Shaders_PBRSpotLight_glsl : Shaders_PhongSpotLight_glsl; } } diff --git a/src/OpenGl/OpenGl_ShaderManager.hxx b/src/OpenGl/OpenGl_ShaderManager.hxx index 00cbbb1e5f..f8dc9da70b 100644 --- a/src/OpenGl/OpenGl_ShaderManager.hxx +++ b/src/OpenGl/OpenGl_ShaderManager.hxx @@ -268,7 +268,7 @@ public: { if (myLightSourceState.ShadowMaps().IsNull() || myLightSourceState.ToCastShadows() == theToCast) - { + { return myLightSourceState.ToCastShadows(); } diff --git a/src/OpenGl/OpenGl_ShadowMap.cxx b/src/OpenGl/OpenGl_ShadowMap.cxx index 2ca10fd601..14854d9128 100644 --- a/src/OpenGl/OpenGl_ShadowMap.cxx +++ b/src/OpenGl/OpenGl_ShadowMap.cxx @@ -138,9 +138,41 @@ bool OpenGl_ShadowMap::UpdateCamera (const Graphic3d_CView& theView, } case Graphic3d_TypeOfLightSource_Spot: { - //myShadowCamera->SetProjectionType (Graphic3d_Camera::Projection_Perspective); - //myShadowCamera->SetEye (theCastShadowLight->Position()); - return false; // not implemented + if (theOrigin != NULL) + { + Graphic3d_Mat4d aTrans; + aTrans.Translate (Graphic3d_Vec3d (theOrigin->X(), theOrigin->Y(), theOrigin->Z())); + Graphic3d_Mat4d anOrientMat = myShadowCamera->OrientationMatrix() * aTrans; + myLightMatrix = myShadowCamera->ProjectionMatrixF() * Graphic3d_Mat4 (anOrientMat); + return true; + } + + Graphic3d_Vec4d aDir (myShadowLight->Direction().X(), myShadowLight->Direction().Y(), myShadowLight->Direction().Z(), 0.0); + if (myShadowLight->IsHeadlight()) + { + Graphic3d_Mat4d anOrientInv; + theView.Camera()->OrientationMatrix().Inverted (anOrientInv); + aDir = anOrientInv * aDir; + } + + myShadowCamera->SetZeroToOneDepth (theView.Camera()->IsZeroToOneDepth()); + myShadowCamera->SetProjectionType (Graphic3d_Camera::Projection_Perspective); + + const gp_Pnt& aLightPos = myShadowLight->Position(); + Standard_Real aDistance (aMinMaxBox.Distance (Bnd_Box (aLightPos, aLightPos)) + + aMinMaxBox.CornerMin().Distance (aMinMaxBox.CornerMax())); + myShadowCamera->SetDistance (aDistance); + myShadowCamera->MoveEyeTo (aLightPos); + myShadowCamera->SetDirectionFromEye (myShadowLight->Direction()); + myShadowCamera->SetUp (!myShadowCamera->Direction().IsParallel (gp::DY(), Precision::Angular()) + ? gp::DY() + : gp::DX()); + myShadowCamera->OrthogonalizeUp(); + myShadowCamera->SetZRange (1.0, aDistance); + + myLightMatrix = myShadowCamera->ProjectionMatrixF() * myShadowCamera->OrientationMatrixF(); + + return true; } } return false; diff --git a/src/OpenGl/OpenGl_View.cxx b/src/OpenGl/OpenGl_View.cxx index 9eb16aeae7..7907795567 100644 --- a/src/OpenGl/OpenGl_View.cxx +++ b/src/OpenGl/OpenGl_View.cxx @@ -2334,9 +2334,12 @@ void OpenGl_View::renderShadowMap (const Handle(OpenGl_ShadowMap)& theShadowMap) aCtx->core11fwd->glClearDepth (1.0); aCtx->core11fwd->glClear (GL_DEPTH_BUFFER_BIT); + Graphic3d_Camera::Projection aProjection = theShadowMap->LightSource()->Type() == Graphic3d_TypeOfLightSource_Directional + ? Graphic3d_Camera::Projection_Orthographic + : Graphic3d_Camera::Projection_Perspective; myWorkspace->SetRenderFilter (myWorkspace->RenderFilter() | OpenGl_RenderFilter_SkipTrsfPersistence); - renderScene (Graphic3d_Camera::Projection_Orthographic, aShadowBuffer.get(), NULL, false); - myWorkspace->SetRenderFilter (myWorkspace->RenderFilter() & ~(Standard_Integer )OpenGl_RenderFilter_SkipTrsfPersistence); + renderScene (aProjection, aShadowBuffer.get(), NULL, false); + myWorkspace->SetRenderFilter (myWorkspace->RenderFilter() & ~(Standard_Integer)OpenGl_RenderFilter_SkipTrsfPersistence); aCtx->SetColorMask (true); myWorkspace->ResetAppliedAspect(); diff --git a/src/Shaders/FILES b/src/Shaders/FILES index 2a1d29017d..f509a23877 100644 --- a/src/Shaders/FILES +++ b/src/Shaders/FILES @@ -1,6 +1,6 @@ srcinc:::Declarations.glsl srcinc:::DeclarationsImpl.glsl -srcinc:::DirectionalLightShadow.glsl +srcinc:::LightShadow.glsl srcinc:::PBRCookTorrance.glsl srcinc:::PBRDirectionalLight.glsl srcinc:::PBRDistribution.glsl @@ -27,7 +27,7 @@ srcinc:::TangentSpaceNormal.glsl srcinc:::SkydomBackground.fs Shaders_Declarations_glsl.pxx Shaders_DeclarationsImpl_glsl.pxx -Shaders_DirectionalLightShadow_glsl.pxx +Shaders_LightShadow_glsl.pxx Shaders_Display_fs.pxx Shaders_PBRCookTorrance_glsl.pxx Shaders_PBRDirectionalLight_glsl.pxx diff --git a/src/Shaders/DirectionalLightShadow.glsl b/src/Shaders/LightShadow.glsl similarity index 88% rename from src/Shaders/DirectionalLightShadow.glsl rename to src/Shaders/LightShadow.glsl index d0447fd570..82dafeafb2 100644 --- a/src/Shaders/DirectionalLightShadow.glsl +++ b/src/Shaders/LightShadow.glsl @@ -9,10 +9,10 @@ const vec2 occPoissonDisk16[16] = vec2[]( ); #endif -//! Function computes directional light shadow attenuation (1.0 means no shadow). -float occDirectionalLightShadow (in sampler2D theShadow, - in int theId, - in vec3 theNormal) +//! Function computes directional and spot light shadow attenuation (1.0 means no shadow). +float occLightShadow (in sampler2D theShadow, + in int theId, + in vec3 theNormal) { vec4 aPosLightSpace = PosLightSpace[occLight_Index(theId)]; vec3 aLightDir = occLight_Position (theId); diff --git a/src/Shaders/PBRSpotLight.glsl b/src/Shaders/PBRSpotLight.glsl index 4692f7be02..b1ad34281c 100644 --- a/src/Shaders/PBRSpotLight.glsl +++ b/src/Shaders/PBRSpotLight.glsl @@ -9,7 +9,8 @@ void occSpotLight (in int theId, in vec3 theNormal, in vec3 theView, in vec3 thePoint, - in bool theIsFront) + in bool theIsFront, + in float theShadow) { vec3 aLight = occLight_Position (theId) - thePoint; @@ -40,5 +41,5 @@ void occSpotLight (in int theId, DirectLighting += occPBRIllumination (theView, aLight, theNormal, BaseColor, Metallic, Roughness, IOR, occLight_Specular(theId), - occLight_Intensity(theId) * anAtten); + occLight_Intensity(theId) * anAtten) * theShadow; } diff --git a/src/Shaders/PhongSpotLight.glsl b/src/Shaders/PhongSpotLight.glsl index aab56c1bf8..611ceb5543 100644 --- a/src/Shaders/PhongSpotLight.glsl +++ b/src/Shaders/PhongSpotLight.glsl @@ -5,11 +5,13 @@ //! @param theView view direction //! @param thePoint 3D position (world space) //! @param theIsFront front/back face flag +//! @param theShadow the value from shadow map void occSpotLight (in int theId, in vec3 theNormal, in vec3 theView, in vec3 thePoint, - in bool theIsFront) + in bool theIsFront, + in float theShadow) { vec3 aLight = occLight_Position (theId) - thePoint; @@ -45,6 +47,6 @@ void occSpotLight (in int theId, aSpecl = pow (aNdotH, occMaterial_Shininess (theIsFront)); } - Diffuse += occLight_Diffuse (theId) * aNdotL * anAtten; - Specular += occLight_Specular(theId) * aSpecl * anAtten; + Diffuse += occLight_Diffuse (theId) * aNdotL * anAtten * theShadow; + Specular += occLight_Specular(theId) * aSpecl * anAtten * theShadow; } diff --git a/src/Shaders/Shaders_DirectionalLightShadow_glsl.pxx b/src/Shaders/Shaders_LightShadow_glsl.pxx similarity index 86% rename from src/Shaders/Shaders_DirectionalLightShadow_glsl.pxx rename to src/Shaders/Shaders_LightShadow_glsl.pxx index d84223d3a2..c35efe671c 100644 --- a/src/Shaders/Shaders_DirectionalLightShadow_glsl.pxx +++ b/src/Shaders/Shaders_LightShadow_glsl.pxx @@ -1,6 +1,6 @@ -// This file has been automatically generated from resource file src/Shaders/DirectionalLightShadow.glsl +// This file has been automatically generated from resource file src/Shaders/LightShadow.glsl -static const char Shaders_DirectionalLightShadow_glsl[] = +static const char Shaders_LightShadow_glsl[] = "#if (__VERSION__ >= 120)\n" "//! Coefficients for gathering close samples for antialiasing.\n" "//! Use only with decent OpenGL (array constants cannot be initialized with GLSL 1.1 / GLSL ES 1.1)\n" @@ -12,10 +12,10 @@ static const char Shaders_DirectionalLightShadow_glsl[] = ");\n" "#endif\n" "\n" - "//! Function computes directional light shadow attenuation (1.0 means no shadow).\n" - "float occDirectionalLightShadow (in sampler2D theShadow,\n" - " in int theId,\n" - " in vec3 theNormal)\n" + "//! Function computes directional and spot light shadow attenuation (1.0 means no shadow).\n" + "float occLightShadow (in sampler2D theShadow,\n" + " in int theId,\n" + " in vec3 theNormal)\n" "{\n" " vec4 aPosLightSpace = PosLightSpace[occLight_Index(theId)];\n" " vec3 aLightDir = occLight_Position (theId);\n" diff --git a/src/Shaders/Shaders_PBRSpotLight_glsl.pxx b/src/Shaders/Shaders_PBRSpotLight_glsl.pxx index 92734288a1..00734d888b 100644 --- a/src/Shaders/Shaders_PBRSpotLight_glsl.pxx +++ b/src/Shaders/Shaders_PBRSpotLight_glsl.pxx @@ -12,7 +12,8 @@ static const char Shaders_PBRSpotLight_glsl[] = " in vec3 theNormal,\n" " in vec3 theView,\n" " in vec3 thePoint,\n" - " in bool theIsFront)\n" + " in bool theIsFront,\n" + " in float theShadow)\n" "{\n" " vec3 aLight = occLight_Position (theId) - thePoint;\n" "\n" @@ -43,5 +44,5 @@ static const char Shaders_PBRSpotLight_glsl[] = " DirectLighting += occPBRIllumination (theView, aLight, theNormal,\n" " BaseColor, Metallic, Roughness, IOR,\n" " occLight_Specular(theId),\n" - " occLight_Intensity(theId) * anAtten);\n" + " occLight_Intensity(theId) * anAtten) * theShadow;\n" "}\n"; diff --git a/src/Shaders/Shaders_PhongSpotLight_glsl.pxx b/src/Shaders/Shaders_PhongSpotLight_glsl.pxx index 0725975a90..e6c649337c 100644 --- a/src/Shaders/Shaders_PhongSpotLight_glsl.pxx +++ b/src/Shaders/Shaders_PhongSpotLight_glsl.pxx @@ -8,11 +8,13 @@ static const char Shaders_PhongSpotLight_glsl[] = "//! @param theView view direction\n" "//! @param thePoint 3D position (world space)\n" "//! @param theIsFront front/back face flag\n" + "//! @param theShadow the value from shadow map\n" "void occSpotLight (in int theId,\n" " in vec3 theNormal,\n" " in vec3 theView,\n" " in vec3 thePoint,\n" - " in bool theIsFront)\n" + " in bool theIsFront,\n" + " in float theShadow)\n" "{\n" " vec3 aLight = occLight_Position (theId) - thePoint;\n" "\n" @@ -48,6 +50,6 @@ static const char Shaders_PhongSpotLight_glsl[] = " aSpecl = pow (aNdotH, occMaterial_Shininess (theIsFront));\n" " }\n" "\n" - " Diffuse += occLight_Diffuse (theId) * aNdotL * anAtten;\n" - " Specular += occLight_Specular(theId) * aSpecl * anAtten;\n" + " Diffuse += occLight_Diffuse (theId) * aNdotL * anAtten * theShadow;\n" + " Specular += occLight_Specular(theId) * aSpecl * anAtten * theShadow;\n" "}\n"; diff --git a/src/ViewerTest/ViewerTest_ViewerCommands.cxx b/src/ViewerTest/ViewerTest_ViewerCommands.cxx index b295489e47..c26d53e340 100644 --- a/src/ViewerTest/ViewerTest_ViewerCommands.cxx +++ b/src/ViewerTest/ViewerTest_ViewerCommands.cxx @@ -9858,13 +9858,13 @@ static int VLight (Draw_Interpretor& theDi, << (aLight->IsEnabled() ? "ON" : "OFF") << "\n"; switch (aLight->Type()) { - case V3d_AMBIENT: + case Graphic3d_TypeOfLightSource_Ambient: { theDi << " Type: Ambient\n" << " Intensity: " << aLight->Intensity() << "\n"; break; } - case V3d_DIRECTIONAL: + case Graphic3d_TypeOfLightSource_Directional: { theDi << " Type: Directional\n" << " Intensity: " << aLight->Intensity() << "\n" @@ -9874,7 +9874,7 @@ static int VLight (Draw_Interpretor& theDi, << " Direction: " << aLight->PackedDirection().x() << " " << aLight->PackedDirection().y() << " " << aLight->PackedDirection().z() << "\n"; break; } - case V3d_POSITIONAL: + case Graphic3d_TypeOfLightSource_Positional: { theDi << " Type: Positional\n" << " Intensity: " << aLight->Intensity() << "\n" @@ -9886,7 +9886,7 @@ static int VLight (Draw_Interpretor& theDi, << " Range: " << aLight->Range() << "\n"; break; } - case V3d_SPOT: + case Graphic3d_TypeOfLightSource_Spot: { theDi << " Type: Spot\n" << " Intensity: " << aLight->Intensity() << "\n" @@ -14592,6 +14592,7 @@ Spot light parameters: -spotAngle sets spotlight angle; -spotExp sets spotlight exponenta; -headlight sets headlight flag; + -castShadows enables/disables shadow casting; -constAtten (obsolete) sets constant attenuation factor; -linearAtten (obsolete) sets linear attenuation factor. diff --git a/tests/opengl/data/shadows/spotlight b/tests/opengl/data/shadows/spotlight new file mode 100644 index 0000000000..7bed4793ed --- /dev/null +++ b/tests/opengl/data/shadows/spotlight @@ -0,0 +1,39 @@ +puts "========" +puts "0032172: Visualization, TKOpenGl - implement simple shadow mapping for a spot light source" +puts "Test shadow map from a spot light source on a box geometry." +puts "========" + +pload MODELING VISUALIZATION +if { $::tcl_platform(os) == "Darwin" } { vcaps -core } +box b 1 2 3 +box bb -5 -5 0 10 10 0 -preview +vclear +vinit View1 +vrenderparams -shadingModel phong +vdisplay -dispMode 1 b bb +vaspects b -material STONE -color blue +vaspects bb -material STONE -color red +vfit +vlight -clear +vlight lamp1 -add spot -castShadows 1 -direction 1 1 -1 -position -10 -10 10 +vlight lamp2 -add spot -castShadows 1 -direction -1 -1 -1 -position 10 10 10 -intensity 1000 +vdump $::imagedir/${::casename}_two_spots.png + +vlight -remove lamp1 + +vline lin1 10 10 10 -5 -5 -0.5 +vline lin2 10 10 10 -3.5 -5 -0.5 +vline lin3 10 10 10 -5 -2 -0.5 + +if { ![string match "OpenGL ES 2.0*" [vglinfo VERSION]] && ![string match "OpenGL ES 3.0*" [vglinfo VERSION]] } { + vraytrace 1 + vdump $::imagedir/${::casename}_raytrace.png +} + +vraytrace 0 +vrenderparams -shadingModel phong +vrenderparams -shadowMapBias 0.001 +vdump $::imagedir/${::casename}_phong.png + +vrenderparams -shadingModel pbr +vdump $::imagedir/${::casename}_pbr.png From 92915edda8e14a89c064d2f678a1e8b7bb3018ac Mon Sep 17 00:00:00 2001 From: akaftasev Date: Wed, 31 Aug 2022 17:35:00 +0300 Subject: [PATCH 363/639] 0030955: [Regression to 7.3.0] Modeling Algorithms - Incorrect result of fuse operation Added test case. --- tests/bugs/modalg_8/bug30955 | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 tests/bugs/modalg_8/bug30955 diff --git a/tests/bugs/modalg_8/bug30955 b/tests/bugs/modalg_8/bug30955 new file mode 100644 index 0000000000..6ac9be549c --- /dev/null +++ b/tests/bugs/modalg_8/bug30955 @@ -0,0 +1,16 @@ +puts "=========================================================================" +puts "0030955: Modeling Algorithms - Incorrect result of fuse operation" +puts "=========================================================================" +puts "" + +restore [locate_data_file bug30407_fuse3.brep] s +set exp [explode s so] +bclearobjects +bcleartools +baddobjects s_1 +eval baddtools [lrange $exp 1 end] +bfillds +bbop r 1 +checkshape r + +checkview -display r -2d -path ${imagedir}/${test_image}.png From 2182812a5bcfb9396208ba8693e89a783a23e474 Mon Sep 17 00:00:00 2001 From: mzernova Date: Fri, 2 Sep 2022 10:43:19 +0300 Subject: [PATCH 364/639] 0033112: Visualization - AIS_InteractiveContext::RecomputeSelectionOnly() may should handle selection tolerance changes --- src/AIS/AIS_InteractiveContext.cxx | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/src/AIS/AIS_InteractiveContext.cxx b/src/AIS/AIS_InteractiveContext.cxx index 8bd2d868c4..04d50baf78 100644 --- a/src/AIS/AIS_InteractiveContext.cxx +++ b/src/AIS/AIS_InteractiveContext.cxx @@ -1,4 +1,4 @@ -// Created on: 1997-01-17 +// Created on: 1997-01-17 // Created by: Robert COUBLANC // Copyright (c) 1997-1999 Matra Datavision // Copyright (c) 1999-2014 OPEN CASCADE SAS @@ -1001,6 +1001,14 @@ void AIS_InteractiveContext::RecomputeSelectionOnly (const Handle(AIS_Interactiv return; } + TColStd_ListOfInteger aModes; + ActivatedModes (theIO, aModes); + + for (TColStd_ListIteratorOfListOfInteger aModesIter (aModes); aModesIter.More(); aModesIter.Next()) + { + mgrSelector->Deactivate (theIO, aModesIter.Value()); + } + mgrSelector->RecomputeSelection (theIO); const Handle(AIS_GlobalStatus)* aStatus = myObjects.Seek (theIO); @@ -1010,10 +1018,7 @@ void AIS_InteractiveContext::RecomputeSelectionOnly (const Handle(AIS_Interactiv return; } - TColStd_ListOfInteger aModes; - ActivatedModes (theIO, aModes); - TColStd_ListIteratorOfListOfInteger aModesIter (aModes); - for (; aModesIter.More(); aModesIter.Next()) + for (TColStd_ListIteratorOfListOfInteger aModesIter (aModes); aModesIter.More(); aModesIter.Next()) { mgrSelector->Activate (theIO, aModesIter.Value()); } From ed6a17ef6ced522b465befb183e36112a66cff80 Mon Sep 17 00:00:00 2001 From: ifv Date: Wed, 24 Aug 2022 09:14:05 +0300 Subject: [PATCH 365/639] 0033104: Modeling Algorithms - Checking for canonical geometry: surface, close to a cylinder, is not recognized Adjusting parameters of algorithm for recognizing cylindrical surfaces. Test case added --- src/GeomConvert/GeomConvert_SurfToAnaSurf.cxx | 36 ++++++++++++------- tests/bugs/modalg_8/bug33104 | 16 +++++++++ 2 files changed, 40 insertions(+), 12 deletions(-) create mode 100644 tests/bugs/modalg_8/bug33104 diff --git a/src/GeomConvert/GeomConvert_SurfToAnaSurf.cxx b/src/GeomConvert/GeomConvert_SurfToAnaSurf.cxx index 7e946956c3..4a6a8c125a 100644 --- a/src/GeomConvert/GeomConvert_SurfToAnaSurf.cxx +++ b/src/GeomConvert/GeomConvert_SurfToAnaSurf.cxx @@ -136,9 +136,9 @@ Handle(Geom_Surface) GeomConvert_SurfToAnaSurf::TryCylinerCone(const Handle(Geom isoline = Handle(Geom_Line)::DownCast(theVmidiso)->Lin().Direction(); } firstisocirc = Handle(Geom_Circle)::DownCast(GeomConvert_CurveToAnaCurve::ComputeCurve(firstiso, theToler, - param1, param2, cf1, cl1, aGap1)); + param1, param2, cf1, cl1, aGap1, GeomConvert_Target, GeomAbs_Circle)); lastisocirc = Handle(Geom_Circle)::DownCast(GeomConvert_CurveToAnaCurve::ComputeCurve(lastiso, theToler, - param1, param2, cf2, cl2, aGap2)); + param1, param2, cf2, cl2, aGap2, GeomConvert_Target, GeomAbs_Circle)); if (!firstisocirc.IsNull() || !lastisocirc.IsNull()) { Standard_Real R1, R2, R3; gp_Pnt P1, P2, P3; @@ -162,7 +162,8 @@ Handle(Geom_Surface) GeomConvert_SurfToAnaSurf::TryCylinerCone(const Handle(Geom } //cylinder if (((Abs(R2 - R1)) < theToler) && ((Abs(R3 - R1)) < theToler) && - ((Abs(R3 - R2)) < theToler)) { + ((Abs(R3 - R2)) < theToler)) + { gp_Ax3 Axes(P1, gp_Dir(gp_Vec(P1, P3))); aNewSurf = new Geom_CylindricalSurface(Axes, R1); } @@ -332,7 +333,7 @@ Handle(Geom_Surface) GeomConvert_SurfToAnaSurf::TryCylinderByGaussField(const Ha Handle(Geom_Surface) aNewSurf; Standard_Real du = (theU2 - theU1) / theNbU, dv = (theV2 - theV1) / theNbV; Standard_Real aSigmaR = 0.; - Standard_Real aTol = 100. * theToler; + Standard_Real aTol = 1.e3 * theToler; TColStd_Array1OfReal anRs(1, theNbU*theNbV); Handle(TColgp_HArray1OfXYZ) aPoints; if (theLeastSquare) @@ -423,8 +424,8 @@ Handle(Geom_Surface) GeomConvert_SurfToAnaSurf::TryCylinderByGaussField(const Ha aSigmaR += d * d; } aSigmaR = Sqrt(aSigmaR / n); - aTol = 3.*aSigmaR / Sqrt(n); - if (aTol > 100. * theToler) + aSigmaR = 3.*aSigmaR / Sqrt(n); + if (aSigmaR > aTol) { return aNewSurf; } @@ -499,9 +500,9 @@ Handle(Geom_Surface) GeomConvert_SurfToAnaSurf::TryTorusSphere(const Handle(Geom } Handle(Geom_Curve) Crv1 = GeomConvert_CurveToAnaCurve::ComputeCurve(IsoCrv1, toler, aParam1ToCrv, aParam2ToCrv, cf, cl, - aGap1); + aGap1, GeomConvert_Target, GeomAbs_Circle); Handle(Geom_Curve) Crv2 = GeomConvert_CurveToAnaCurve::ComputeCurve(IsoCrv2, toler, aParam1ToCrv, aParam2ToCrv, cf, cl, - aGap2); + aGap2, GeomConvert_Target, GeomAbs_Circle); if (Crv1.IsNull() || Crv2.IsNull() || !Crv1->IsKind(STANDARD_TYPE(Geom_Circle)) || !Crv2->IsKind(STANDARD_TYPE(Geom_Circle))) @@ -863,11 +864,21 @@ Handle(Geom_Surface) GeomConvert_SurfToAnaSurf::ConvertToAnalytical(const Standa Handle(Geom_Curve) VIso = aTempS->VIso(VMid); Standard_Real cuf, cul, cvf, cvl, aGap1, aGap2; - Handle(Geom_Curve) umidiso = GeomConvert_CurveToAnaCurve::ComputeCurve(UIso, toler, V1, V2, cuf, cul, aGap1); - Handle(Geom_Curve) vmidiso = GeomConvert_CurveToAnaCurve::ComputeCurve(VIso, toler, U1, U2, cvf, cvl, aGap2); + Standard_Boolean aLineIso = Standard_False; + Handle(Geom_Curve) umidiso = GeomConvert_CurveToAnaCurve::ComputeCurve(UIso, toler, V1, V2, cuf, cul, aGap1, + GeomConvert_Simplest); + if (!umidiso.IsNull()) + { + aLineIso = umidiso->IsKind(STANDARD_TYPE(Geom_Line)); + } + Handle(Geom_Curve) vmidiso = GeomConvert_CurveToAnaCurve::ComputeCurve(VIso, toler, U1, U2, cvf, cvl, aGap2, + GeomConvert_Simplest); + if (!vmidiso.IsNull() && !aLineIso) + { + aLineIso = vmidiso->IsKind(STANDARD_TYPE(Geom_Line)); + } if (!umidiso.IsNull() && !vmidiso.IsNull()) { - // Standard_Boolean VCase = Standard_False; @@ -957,12 +968,13 @@ Handle(Geom_Surface) GeomConvert_SurfToAnaSurf::ConvertToAnalytical(const Standa } else { + aCylinderConus = Standard_False; myGap = dd[isurf]; } } } //Additional checking for case of cylinder - if (!aCylinderConus && !aToroidSphere) + if (!aCylinderConus && !aToroidSphere && aLineIso) { //Try cylinder using Gauss field Standard_Integer aNbU = 7, aNbV = 7; diff --git a/tests/bugs/modalg_8/bug33104 b/tests/bugs/modalg_8/bug33104 new file mode 100644 index 0000000000..e8187a6132 --- /dev/null +++ b/tests/bugs/modalg_8/bug33104 @@ -0,0 +1,16 @@ +puts "================================" +puts "0033104: Modeling Algorithms - Checking for canonical geometry: surface, close to a cylinder, is not recognized" +puts "================================" + +restore [locate_data_file bug33104.brep] f + +getanasurf asurf f cyl 0.1 +if {[isdraw asurf]} { + set log [dump asurf] + if { [regexp {CylindricalSurface} $log ] != 1 } { + puts "Error: surface is not a cylindrical surface" + } +} else { + puts "Error: required surface is not got" +} + From 80d4753574abed00d72ee49181c8194ec45896b9 Mon Sep 17 00:00:00 2001 From: abulyche Date: Thu, 1 Sep 2022 15:41:59 +0300 Subject: [PATCH 366/639] 0032876: Modeling algorithms - BRepClass_FaceClassifier issue Modification of checking points for the state "ON" in BRepClass_Intersector.cxx; Added the test for this ticket; test case lowalgos/classifier/bug377: BAD -> OK --- src/BRepClass/BRepClass_Intersector.cxx | 16 +++++++++++--- tests/bugs/modalg_6/bug32876 | 29 +++++++++++++++++++++++++ tests/lowalgos/classifier/bug377 | 2 -- 3 files changed, 42 insertions(+), 5 deletions(-) create mode 100644 tests/bugs/modalg_6/bug32876 diff --git a/src/BRepClass/BRepClass_Intersector.cxx b/src/BRepClass/BRepClass_Intersector.cxx index dae1ef8b12..b0665864e1 100644 --- a/src/BRepClass/BRepClass_Intersector.cxx +++ b/src/BRepClass/BRepClass_Intersector.cxx @@ -197,10 +197,12 @@ Standard_Boolean CheckOn(IntRes2d_IntersectionPoint& thePntInter, if (aMinDist <= theTolZ) { IntRes2d_Transition aTrOnLin(IntRes2d_Head); IntRes2d_Position aPosOnCurve = IntRes2d_Middle; - if (Abs(aPar - theDeb) <= Precision::Confusion()) { + if ((Abs(aPar - theDeb) <= Precision::Confusion()) + || (aPar < theDeb)) { aPosOnCurve = IntRes2d_Head; } - else if (Abs(aPar - theFin) <= Precision::Confusion()) { + else if ((Abs(aPar - theFin) <= Precision::Confusion()) + || (aPar > theFin)) { aPosOnCurve = IntRes2d_End; } // @@ -381,8 +383,16 @@ void BRepClass_Intersector::Perform(const gp_Lin2d& L, { Standard_Boolean aStatusOn = Standard_False; IntRes2d_IntersectionPoint aPntInter; + Standard_Real aDebTol = deb; + Standard_Real aFinTol = fin; + if (aTolZ > Precision::Confusion()) + { + aDebTol = deb - aTolZ; + aFinTol = fin + aTolZ; + } + Geom2dAdaptor_Curve aCurAdaptor(aC2D, aDebTol, aFinTol); - aStatusOn = CheckOn(aPntInter, F, L, C, aTolZ, fin, deb); + aStatusOn = CheckOn(aPntInter, F, L, aCurAdaptor, aTolZ, fin, deb); if (aStatusOn) { Append(aPntInter); diff --git a/tests/bugs/modalg_6/bug32876 b/tests/bugs/modalg_6/bug32876 new file mode 100644 index 0000000000..4cb84cd04a --- /dev/null +++ b/tests/bugs/modalg_6/bug32876 @@ -0,0 +1,29 @@ +puts "============================" +puts "0032876: Modeling algorithms - BRepClass_FaceClassifier issue" +puts "============================" +puts "" + +plane p +trim p p 0 4 0 2 +mkface face p + +point p1 4.02 -0.02 +point p2 4.06 -0.02 +point p3 3.8 -0.08 +point p4 4.09 0 + +if ![regexp "ON" [b2dclassify face p1 0.1]] { + puts "Error: point p1 is classified as OUT" +} + +if ![regexp "ON" [b2dclassify face p2 0.1]] { + puts "Error: point p2 is classified as OUT" +} + +if ![regexp "ON" [b2dclassify face p3 0.1]] { + puts "Error: point p2 is classified as OUT" +} + +if ![regexp "ON" [b2dclassify face p4 0.1]] { + puts "Error: point p2 is classified as OUT" +} diff --git a/tests/lowalgos/classifier/bug377 b/tests/lowalgos/classifier/bug377 index 9f76dbe60e..3ab05756f3 100644 --- a/tests/lowalgos/classifier/bug377 +++ b/tests/lowalgos/classifier/bug377 @@ -1,5 +1,3 @@ -puts "TODO OCC11111 ALL: Error : OCC377" - pload QAcommands puts "========" From d7eefb11bf8e9649e338d337b9f979e23efc71ef Mon Sep 17 00:00:00 2001 From: ddzama Date: Fri, 19 Aug 2022 14:41:49 +0300 Subject: [PATCH 367/639] 0032986: Samples - csharp sample is crashed on compilation with VC++ 2022 While demanding c++ language standard c++20, the error of OCCTProxy compilation is occured: warning C4857: C++/CLI mode does not support C++ versions newer than C++17; setting language to /std:c++17 error C7681: two-phase name lookup is not supported for C++/CLI or C++/CX; use /Zc:twoPhase- Officially, C++/CLI mode does not support C++ version newer than C++17, so we should not demand C++20 to compile csharp samples. Alternative solution - using /permissive (ConformanceMode = false), rather than default value /permissive- (ConformanceMode = true) option to compile OCCTProxy. But alternative solution has been denied. So, here is nothing to do to fix compilation of OCCTProxy project. Nevertheless, error occures in IE_WPF_WinForms and IE_WinForms - if we trying to compile with VC++ 2022 (not demanding c++20): warning MSB3274: The primary reference "*\OCCTProxy.dll" could not be resolved because it was built against the ".NETFramework,Version=v4.7.2" framework. This is a higher version than the currently targeted framework ".NETFramework,Version=v4.0". To solve the problem it is proposed to demand by default the highest version of NETFramework - 4.8. So, demanding NETFramework v4.8 does not crashing compilation of csharp samples with VC++ 2015. --- samples/CSharp/WPF_D3D/IE_WPF_D3D.csproj | 2 +- samples/CSharp/WPF_D3D/app.config | 2 +- samples/CSharp/WPF_WinForms/IE_WPF_WinForms.csproj | 2 +- samples/CSharp/WPF_WinForms/app.config | 2 +- samples/CSharp/WinForms/IE_WinForms.csproj | 2 +- samples/CSharp/WinForms/app.config | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/samples/CSharp/WPF_D3D/IE_WPF_D3D.csproj b/samples/CSharp/WPF_D3D/IE_WPF_D3D.csproj index 91cc3260ed..1e326d7b8b 100644 --- a/samples/CSharp/WPF_D3D/IE_WPF_D3D.csproj +++ b/samples/CSharp/WPF_D3D/IE_WPF_D3D.csproj @@ -10,7 +10,7 @@ Properties IE_WPF_D3D IE_WPF_D3D - v4.0 + v4.8 512 {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} 4 diff --git a/samples/CSharp/WPF_D3D/app.config b/samples/CSharp/WPF_D3D/app.config index e365603337..786a845b30 100644 --- a/samples/CSharp/WPF_D3D/app.config +++ b/samples/CSharp/WPF_D3D/app.config @@ -1,3 +1,3 @@ - + diff --git a/samples/CSharp/WPF_WinForms/IE_WPF_WinForms.csproj b/samples/CSharp/WPF_WinForms/IE_WPF_WinForms.csproj index 4996b0755b..a49e95f164 100644 --- a/samples/CSharp/WPF_WinForms/IE_WPF_WinForms.csproj +++ b/samples/CSharp/WPF_WinForms/IE_WPF_WinForms.csproj @@ -10,7 +10,7 @@ Properties IE_WPF_WinForms IE_WPF_WinForms - v4.0 + v4.8 512 {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} 4 diff --git a/samples/CSharp/WPF_WinForms/app.config b/samples/CSharp/WPF_WinForms/app.config index e365603337..786a845b30 100644 --- a/samples/CSharp/WPF_WinForms/app.config +++ b/samples/CSharp/WPF_WinForms/app.config @@ -1,3 +1,3 @@ - + diff --git a/samples/CSharp/WinForms/IE_WinForms.csproj b/samples/CSharp/WinForms/IE_WinForms.csproj index 54b7b2aa39..7d232b571a 100644 --- a/samples/CSharp/WinForms/IE_WinForms.csproj +++ b/samples/CSharp/WinForms/IE_WinForms.csproj @@ -27,7 +27,7 @@ 3.5 - v4.0 + v4.8 publish\ true diff --git a/samples/CSharp/WinForms/app.config b/samples/CSharp/WinForms/app.config index cb021ce515..a7c484feaa 100644 --- a/samples/CSharp/WinForms/app.config +++ b/samples/CSharp/WinForms/app.config @@ -35,4 +35,4 @@ - + From 05cfce4d8361f65f36dabf0d93269b50f1052ec0 Mon Sep 17 00:00:00 2001 From: abv Date: Thu, 2 Apr 2020 01:21:08 +0300 Subject: [PATCH 368/639] 0031481: Data Exchange - provide parser of STEP EXPRESS schema for generation of new STEP entities Integration of ExpToCas tool ported to modern state of OCCT: - new package Express and toolkit TKExpress for EXPRESS data structures and OCCT class generator - executable ExpToCasExe including lax/yacc parsers, for parsing a Part 21 file and generating classes Formatting added files from package Express following OCCT Coding Rules Changes for correspondence generated files to OCCT Code Rules. Add generation hxx files with declaration of arrays. If field is a HArray1 method for get length of array and method for get element of array by its index are generated. Changes for generation parser from Lex and YACC files. Update description file ReadMe.md --- CMakeLists.txt | 6 + adm/MODULES | 2 +- adm/UDLIST | 3 + adm/cmake/bison.cmake | 4 +- adm/cmake/flex.cmake | 4 +- adm/cmake/occt_toolkit.cmake | 19 + src/ExpToCasExe/CMakeLists.txt | 5 + src/ExpToCasExe/EXTERNLIB | 2 + src/ExpToCasExe/ExpToCasExe.cxx | 395 +++ src/ExpToCasExe/FILES | 7 + src/ExpToCasExe/FlexLexer.h | 220 ++ src/ExpToCasExe/ReadMe.md | 171 ++ src/ExpToCasExe/exptocas.lex | 203 ++ src/ExpToCasExe/exptocas.tab.cxx | 1531 ++++++++++++ src/ExpToCasExe/exptocas.tab.hxx | 910 +++++++ src/ExpToCasExe/exptocas.yacc | 506 ++++ src/ExpToCasExe/lex.exptocas.cxx | 2108 +++++++++++++++++ .../occt_existed_step_entities.lst | 942 ++++++++ src/Express/Express.cxx | 129 + src/Express/Express.hxx | 52 + src/Express/Express_Alias.cxx | 71 + src/Express/Express_Alias.hxx | 55 + src/Express/Express_Array.hxx | 21 + src/Express/Express_Bag.hxx | 21 + src/Express/Express_Boolean.cxx | 39 + src/Express/Express_Boolean.hxx | 42 + src/Express/Express_ComplexType.cxx | 114 + src/Express/Express_ComplexType.hxx | 61 + .../Express_DataMapOfAsciiStringItem.hxx | 24 + src/Express/Express_Entity.cxx | 1770 ++++++++++++++ src/Express/Express_Entity.hxx | 114 + src/Express/Express_Enum.cxx | 107 + src/Express/Express_Enum.hxx | 50 + src/Express/Express_Field.cxx | 89 + src/Express/Express_Field.hxx | 63 + src/Express/Express_HSequenceOfEntity.hxx | 22 + src/Express/Express_HSequenceOfField.hxx | 22 + src/Express/Express_HSequenceOfItem.hxx | 22 + src/Express/Express_Integer.cxx | 39 + src/Express/Express_Integer.hxx | 42 + src/Express/Express_Item.cxx | 335 +++ src/Express/Express_Item.hxx | 150 ++ src/Express/Express_List.hxx | 21 + src/Express/Express_Logical.cxx | 70 + src/Express/Express_Logical.hxx | 51 + src/Express/Express_NamedType.cxx | 167 ++ src/Express/Express_NamedType.hxx | 81 + src/Express/Express_Number.hxx | 21 + src/Express/Express_PredefinedType.cxx | 38 + src/Express/Express_PredefinedType.hxx | 41 + src/Express/Express_Real.cxx | 39 + src/Express/Express_Real.hxx | 42 + src/Express/Express_Reference.cxx | 49 + src/Express/Express_Reference.hxx | 65 + src/Express/Express_Schema.cxx | 330 +++ src/Express/Express_Schema.hxx | 92 + src/Express/Express_Select.cxx | 650 +++++ src/Express/Express_Select.hxx | 63 + src/Express/Express_SequenceOfEntity.hxx | 22 + src/Express/Express_SequenceOfField.hxx | 22 + src/Express/Express_SequenceOfItem.hxx | 22 + src/Express/Express_Set.hxx | 21 + src/Express/Express_String.cxx | 49 + src/Express/Express_String.hxx | 45 + src/Express/Express_Type.cxx | 76 + src/Express/Express_Type.hxx | 63 + src/Express/FILES | 48 + src/OS/DataExchange.tcl | 3 +- src/TKExpress/CMakeLists.txt | 3 + src/TKExpress/EXTERNLIB | 1 + src/TKExpress/FILES | 2 + src/TKExpress/PACKAGES | 1 + 72 files changed, 12682 insertions(+), 8 deletions(-) create mode 100644 src/ExpToCasExe/CMakeLists.txt create mode 100644 src/ExpToCasExe/EXTERNLIB create mode 100644 src/ExpToCasExe/ExpToCasExe.cxx create mode 100644 src/ExpToCasExe/FILES create mode 100644 src/ExpToCasExe/FlexLexer.h create mode 100644 src/ExpToCasExe/ReadMe.md create mode 100644 src/ExpToCasExe/exptocas.lex create mode 100644 src/ExpToCasExe/exptocas.tab.cxx create mode 100644 src/ExpToCasExe/exptocas.tab.hxx create mode 100644 src/ExpToCasExe/exptocas.yacc create mode 100644 src/ExpToCasExe/lex.exptocas.cxx create mode 100644 src/ExpToCasExe/occt_existed_step_entities.lst create mode 100644 src/Express/Express.cxx create mode 100644 src/Express/Express.hxx create mode 100644 src/Express/Express_Alias.cxx create mode 100644 src/Express/Express_Alias.hxx create mode 100644 src/Express/Express_Array.hxx create mode 100644 src/Express/Express_Bag.hxx create mode 100644 src/Express/Express_Boolean.cxx create mode 100644 src/Express/Express_Boolean.hxx create mode 100644 src/Express/Express_ComplexType.cxx create mode 100644 src/Express/Express_ComplexType.hxx create mode 100644 src/Express/Express_DataMapOfAsciiStringItem.hxx create mode 100644 src/Express/Express_Entity.cxx create mode 100644 src/Express/Express_Entity.hxx create mode 100644 src/Express/Express_Enum.cxx create mode 100644 src/Express/Express_Enum.hxx create mode 100644 src/Express/Express_Field.cxx create mode 100644 src/Express/Express_Field.hxx create mode 100644 src/Express/Express_HSequenceOfEntity.hxx create mode 100644 src/Express/Express_HSequenceOfField.hxx create mode 100644 src/Express/Express_HSequenceOfItem.hxx create mode 100644 src/Express/Express_Integer.cxx create mode 100644 src/Express/Express_Integer.hxx create mode 100644 src/Express/Express_Item.cxx create mode 100644 src/Express/Express_Item.hxx create mode 100644 src/Express/Express_List.hxx create mode 100644 src/Express/Express_Logical.cxx create mode 100644 src/Express/Express_Logical.hxx create mode 100644 src/Express/Express_NamedType.cxx create mode 100644 src/Express/Express_NamedType.hxx create mode 100644 src/Express/Express_Number.hxx create mode 100644 src/Express/Express_PredefinedType.cxx create mode 100644 src/Express/Express_PredefinedType.hxx create mode 100644 src/Express/Express_Real.cxx create mode 100644 src/Express/Express_Real.hxx create mode 100644 src/Express/Express_Reference.cxx create mode 100644 src/Express/Express_Reference.hxx create mode 100644 src/Express/Express_Schema.cxx create mode 100644 src/Express/Express_Schema.hxx create mode 100644 src/Express/Express_Select.cxx create mode 100644 src/Express/Express_Select.hxx create mode 100644 src/Express/Express_SequenceOfEntity.hxx create mode 100644 src/Express/Express_SequenceOfField.hxx create mode 100644 src/Express/Express_SequenceOfItem.hxx create mode 100644 src/Express/Express_Set.hxx create mode 100644 src/Express/Express_String.cxx create mode 100644 src/Express/Express_String.hxx create mode 100644 src/Express/Express_Type.cxx create mode 100644 src/Express/Express_Type.hxx create mode 100644 src/Express/FILES create mode 100644 src/TKExpress/CMakeLists.txt create mode 100644 src/TKExpress/EXTERNLIB create mode 100644 src/TKExpress/FILES create mode 100644 src/TKExpress/PACKAGES diff --git a/CMakeLists.txt b/CMakeLists.txt index 23dd2d377b..a131471a1f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -800,6 +800,12 @@ else() OCCT_CHECK_AND_UNSET ("3RDPARTY_DOT_EXECUTABLE") endif() +# ExpToCasExe +if (EMSCRIPTEN) + list (REMOVE_ITEM BUILD_TOOLKITS TKExpress) + list (REMOVE_ITEM BUILD_TOOLKITS ExpToCasExe) +endif() + # bison if (BUILD_YACCLEX) OCCT_INCLUDE_CMAKE_FILE ("adm/cmake/bison") diff --git a/adm/MODULES b/adm/MODULES index c2f433decd..f471f8dc8d 100644 --- a/adm/MODULES +++ b/adm/MODULES @@ -3,5 +3,5 @@ ModelingData TKG2d TKG3d TKGeomBase TKBRep ModelingAlgorithms TKGeomAlgo TKTopAlgo TKPrim TKBO TKBool TKHLR TKFillet TKOffset TKFeat TKMesh TKXMesh TKShHealing Visualization TKService TKV3d TKOpenGl TKOpenGles TKMeshVS TKIVtk TKD3DHost ApplicationFramework TKCDF TKLCAF TKCAF TKBinL TKXmlL TKBin TKXml TKStdL TKStd TKTObj TKBinTObj TKXmlTObj TKVCAF -DataExchange TKXDE TKXSBase TKSTEPBase TKSTEPAttr TKSTEP209 TKSTEP TKIGES TKXCAF TKXDEIGES TKXDESTEP TKSTL TKVRML TKXmlXCAF TKBinXCAF TKRWMesh TKXDECascade +DataExchange TKXDE TKXSBase TKSTEPBase TKSTEPAttr TKSTEP209 TKSTEP TKIGES TKXCAF TKXDEIGES TKXDESTEP TKSTL TKVRML TKXmlXCAF TKBinXCAF TKRWMesh TKXDECascade TKExpress ExpToCasExe Draw TKDraw TKTopTest TKOpenGlTest TKOpenGlesTest TKD3DHostTest TKViewerTest TKXSDRAW TKDCAF TKXDEDRAW TKTObjDRAW TKQADraw TKIVtkDraw DRAWEXE diff --git a/adm/UDLIST b/adm/UDLIST index a38b937608..0fd9b49e53 100644 --- a/adm/UDLIST +++ b/adm/UDLIST @@ -480,3 +480,6 @@ n TreeModel n View n ViewControl n VInspector +n Express +t TKExpress +x ExpToCasExe diff --git a/adm/cmake/bison.cmake b/adm/cmake/bison.cmake index dcf44d4518..83d8da5466 100644 --- a/adm/cmake/bison.cmake +++ b/adm/cmake/bison.cmake @@ -22,6 +22,4 @@ if (3RDPARTY_DIR) endforeach() endif() -# bison 3.2 is required because it provides options to avoid generation of redundant header -# files and embedding of local paths in the generated code -find_package (BISON 3.2) +find_package (BISON 3.7.4) diff --git a/adm/cmake/flex.cmake b/adm/cmake/flex.cmake index 2f48dc9315..b59a9cff79 100644 --- a/adm/cmake/flex.cmake +++ b/adm/cmake/flex.cmake @@ -26,9 +26,7 @@ if (3RDPARTY_DIR) endforeach() endif() -# flex 2.5.37 is required because closest known lower version, 2.5.3 from WOK 6.8.0, -# generates code which is unusable on Windows (includes unistd.h without any way to avoid this) -find_package (FLEX 2.5.37) +find_package (FLEX 2.6.4) if (NOT FLEX_FOUND OR NOT FLEX_INCLUDE_DIR OR NOT EXISTS "${FLEX_INCLUDE_DIR}/FlexLexer.h") list (APPEND 3RDPARTY_NOT_INCLUDED FLEX_INCLUDE_DIR) diff --git a/adm/cmake/occt_toolkit.cmake b/adm/cmake/occt_toolkit.cmake index ed5f142a1d..8cbb8106e5 100644 --- a/adm/cmake/occt_toolkit.cmake +++ b/adm/cmake/occt_toolkit.cmake @@ -106,6 +106,12 @@ foreach (OCCT_PACKAGE ${USED_PACKAGES}) set (BISON_OUTPUT_FILE_EXT "cxx") endif() endforeach() + + if (EXISTS ${FLEX_BISON_TARGET_DIR}/FlexLexer.h) + message (STATUS "Info: remove old FLEX header file: ${FLEX_BISON_TARGET_DIR}/FlexLexer.h") + file(REMOVE ${FLEX_BISON_TARGET_DIR}/FlexLexer.h) + endif() + file (STRINGS "${CURRENT_FLEX_FILE}" FILE_FLEX_CONTENT) foreach (FILE_FLEX_CONTENT_LINE ${FILE_FLEX_CONTENT}) string (REGEX MATCH "%option c\\+\\+" CXX_FLEX_LANGUAGE_FOUND ${FILE_FLEX_CONTENT_LINE}) @@ -121,6 +127,19 @@ foreach (OCCT_PACKAGE ${USED_PACKAGES}) set (BISON_OUTPUT_FILE ${CURRENT_BISON_FILE_NAME}.tab.${BISON_OUTPUT_FILE_EXT}) set (FLEX_OUTPUT_FILE lex.${CURRENT_FLEX_FILE_NAME}.${FLEX_OUTPUT_FILE_EXT}) + if (EXISTS ${FLEX_BISON_TARGET_DIR}/${CURRENT_BISON_FILE_NAME}.tab.${BISON_OUTPUT_FILE_EXT}) + message (STATUS "Info: remove old output BISON file: ${FLEX_BISON_TARGET_DIR}/${CURRENT_BISON_FILE_NAME}.tab.${BISON_OUTPUT_FILE_EXT}") + file(REMOVE ${FLEX_BISON_TARGET_DIR}/${CURRENT_BISON_FILE_NAME}.tab.${BISON_OUTPUT_FILE_EXT}) + endif() + if (EXISTS ${FLEX_BISON_TARGET_DIR}/${CURRENT_BISON_FILE_NAME}.tab.hxx) + message (STATUS "Info: remove old output BISON file: ${FLEX_BISON_TARGET_DIR}/${CURRENT_BISON_FILE_NAME}.tab.hxx") + file(REMOVE ${FLEX_BISON_TARGET_DIR}/${CURRENT_BISON_FILE_NAME}.tab.hxx) + endif() + if (EXISTS ${FLEX_BISON_TARGET_DIR}/${FLEX_OUTPUT_FILE}) + message (STATUS "Info: remove old output FLEX file: ${FLEX_BISON_TARGET_DIR}/${FLEX_OUTPUT_FILE}") + file(REMOVE ${FLEX_BISON_TARGET_DIR}/${FLEX_OUTPUT_FILE}) + endif() + BISON_TARGET (Parser_${CURRENT_BISON_FILE_NAME} ${CURRENT_BISON_FILE} "${FLEX_BISON_TARGET_DIR}/${BISON_OUTPUT_FILE}" COMPILE_FLAGS "-p ${CURRENT_BISON_FILE_NAME} -l -M ${CMAKE_SOURCE_DIR}/${RELATIVE_SOURCES_DIR}/=") FLEX_TARGET (Scanner_${CURRENT_FLEX_FILE_NAME} ${CURRENT_FLEX_FILE} "${FLEX_BISON_TARGET_DIR}/${FLEX_OUTPUT_FILE}" diff --git a/src/ExpToCasExe/CMakeLists.txt b/src/ExpToCasExe/CMakeLists.txt new file mode 100644 index 0000000000..52a433b1bb --- /dev/null +++ b/src/ExpToCasExe/CMakeLists.txt @@ -0,0 +1,5 @@ +project(ExpToCasExe) + +set (EXECUTABLE_PROJECT ON) +OCCT_INCLUDE_CMAKE_FILE (adm/cmake/occt_toolkit) +unset (EXECUTABLE_PROJECT) \ No newline at end of file diff --git a/src/ExpToCasExe/EXTERNLIB b/src/ExpToCasExe/EXTERNLIB new file mode 100644 index 0000000000..9a5a7e59c4 --- /dev/null +++ b/src/ExpToCasExe/EXTERNLIB @@ -0,0 +1,2 @@ +TKernel +TKExpress diff --git a/src/ExpToCasExe/ExpToCasExe.cxx b/src/ExpToCasExe/ExpToCasExe.cxx new file mode 100644 index 0000000000..c0b25eeab1 --- /dev/null +++ b/src/ExpToCasExe/ExpToCasExe.cxx @@ -0,0 +1,395 @@ +// Created: Mon Nov 1 12:50:27 1999 +// Author: Andrey BETENEV +// Copyright (c) 1999-2020 OPEN CASCADE SAS +// +// This file is part of Open CASCADE Technology software library. +// +// This library is free software; you can redistribute it and/or modify it under +// the terms of the GNU Lesser General Public License version 2.1 as published +// by the Free Software Foundation, with special exception defined in the file +// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT +// distribution for complete text of the license and disclaimer of any warranty. +// +// Alternatively, this file may be used under the terms of Open CASCADE +// commercial license or contractual agreement. + +#include +#include +#include +#include +#include +#include +#include +#include +#include "exptocas.tab.hxx" + +//======================================================================= +// function : GetSchema +// purpose : interface to parser +//======================================================================= +Handle(Express_Schema) GetSchema (const char* theFileName) +{ + std::ifstream aFileStream; + OSD_OpenStream(aFileStream, theFileName, std::ios_base::in | std::ios_base::binary); + exptocas::scanner aScanner(&aFileStream); + aScanner.yyrestart(&aFileStream); + // uncomment next string for debug of parser + //aScanner.set_debug(1); + exptocas::parser aParser(&aScanner); + aParser.parse(); + return Express::Schema(); +} + +//======================================================================= +// function : LoadList +// purpose : Load list of (class name, package name) from the file +// Package names and optional mark flag are set to items in the schema +//======================================================================= +static Standard_Boolean LoadList (const char *theFileName, + const Handle(Express_Schema)& theSchema, + const Standard_Boolean theMark) +{ + const Handle(OSD_FileSystem)& aFileSystem = OSD_FileSystem::DefaultFileSystem(); + std::shared_ptr aStreamPtr = aFileSystem->OpenIStream (theFileName, std::ios::in); + Standard_IStream& anIS = *aStreamPtr; + + if (aStreamPtr == nullptr) + { + Message::SendFail() << "Error: cannot open " << theFileName; + return Standard_False; + } + + Message::SendInfo() << "Loading " << theFileName << "..."; + char aBuf[512]; + Standard_Integer aLineNum = 0; + // a line entry in file has the next format: + // item_name package_name [shortname [check_flag(0 or 1) [fillshared_flag(0 or 1) [category]]]] + while (anIS.getline (aBuf, 512)) + { + char* aCurPos = aBuf; + char* anItemName; + char* aPackageName; + char* aShortName; + char* aCheckFlag; + char* aFillSharedFlag; + char* aCategoryName; + Standard_Size aSepIdx = 0; + aLineNum += 1; + // ------------------------------------------------------------- + // first word is an item name + // ------------------------------------------------------------- + // skip any whitespace character in the line + while (*aCurPos && (aSepIdx = strcspn (aCurPos, " \t\r\n")) == 0) + { + aCurPos++; + } + // to next line if first word isn't found or comment started + if (*aCurPos == '\0' || *aCurPos == '#') + { + continue; + } + // get the name of the item + anItemName = aCurPos; + // shift the position + if (aCurPos[aSepIdx] == '\0') + { + aCurPos += aSepIdx; + } + else + { + aCurPos[aSepIdx] = '\0'; + aCurPos += aSepIdx + 1; + } + Handle(Express_Item) anItem = theSchema->Item (anItemName, Standard_True); + // skip any class name not in schema + if (anItem.IsNull()) + { + continue; + } + // ------------------------------------------------------------- + // second word is a package name + // ------------------------------------------------------------- + // skip any whitespace character in the rest of the line + while (*aCurPos && (aSepIdx = strcspn (aCurPos, " \t\r\n")) == 0) + { + aCurPos++; + } + // to next line if second word isn't found or comment started + if (*aCurPos == '\0' || *aCurPos == '#') + { + continue; + } + // get the name of the package + aPackageName = aCurPos; + // shift the position + if (aCurPos[aSepIdx] == '\0') + { + aCurPos += aSepIdx; + } + else + { + aCurPos[aSepIdx] = '\0'; + aCurPos += aSepIdx + 1; + } + // make warning if there is another package for the item + if (anItem->IsPackageNameSet() && anItem->GetPackageName().IsDifferent (aPackageName)) + { + Message::SendWarning() << "Warning: Package is redefined for item " << anItemName; + } + anItem->SetPackageName (aPackageName); + anItem->SetGenMode (theMark ? Express_Item::GM_GenByUser : Express_Item::GM_NoGen); + // ------------------------------------------------------------- + // third word is an item short name (optional) + // ------------------------------------------------------------- + // skip any whitespace character in the line + while (*aCurPos && (aSepIdx = strcspn (aCurPos, " \t\r\n")) == 0) + { + aCurPos++; + } + // to next line if third word isn't found or comment started + if (*aCurPos == '\0' || *aCurPos == '#') + { + continue; + } + // get the short name + aShortName = aCurPos; + // shift the position + if (aCurPos[aSepIdx] == '\0') + { + aCurPos += aSepIdx; + } + else + { + aCurPos[aSepIdx] = '\0'; + aCurPos += aSepIdx + 1; + } + if (!std::isalpha (*aShortName)) + { + Message::SendWarning() << "Warning: Not recognized a shortname at the line " << aLineNum; + continue; + } + // if short name "-" then just do not set it + if (*aShortName != '-') + { + Handle(TCollection_HAsciiString) anItemShortName = new TCollection_HAsciiString(aShortName); + if (anItemShortName->Length() > 0) + { + anItem->SetShortName (anItemShortName); + } + } + // ------------------------------------------------------------- + // fourth word is an item check flag (optional) + // ------------------------------------------------------------- + // skip any whitespace character in the line + while (*aCurPos && (aSepIdx = strcspn (aCurPos, " \t\r\n")) == 0) + { + aCurPos++; + } + // to next line if fourth word isn't found or comment started + if (*aCurPos == '\0' || *aCurPos == '#') + { + continue; + } + // get the check flag + aCheckFlag = aCurPos; + // shift the position + if (aCurPos[aSepIdx] == '\0') + { + aCurPos += aSepIdx; + } + else + { + aCurPos[aSepIdx] = '\0'; + aCurPos += aSepIdx + 1; + } + if (!(*aCheckFlag == '0' || *aCheckFlag == '1')) + { + Message::SendWarning() << "Warning: Not recognized a check flag at the line " << aLineNum; + continue; + } + Standard_Boolean hasCheck = (*aCheckFlag == '0' ? Standard_False : Standard_True); + anItem->SetCheckFlag (hasCheck); + // ------------------------------------------------------------- + // fifth word is an item fill share flag (optional) + // ------------------------------------------------------------- + // skip any whitespace character in the line + while (*aCurPos && (aSepIdx = strcspn (aCurPos, " \t\r\n")) == 0) + { + aCurPos++; + } + // to next line if fifth word isn't found or comment started + if (*aCurPos == '\0' || *aCurPos == '#') + { + continue; + } + // get the fill share flag + aFillSharedFlag = aCurPos; + // shift the position + if (aCurPos[aSepIdx] == '\0') + { + aCurPos += aSepIdx; + } + else + { + aCurPos[aSepIdx] = '\0'; + aCurPos += aSepIdx + 1; + } + if (!(*aFillSharedFlag == '0' || *aFillSharedFlag == '1')) + { + Message::SendWarning() << "Warning: Not recognized a fill shared flag at the line " << aLineNum; + continue; + } + Standard_Boolean hasFillShared = (*aFillSharedFlag == '0' ? Standard_False : Standard_True); + anItem->SetFillSharedFlag (hasFillShared); + // ------------------------------------------------------------- + // sixth word is an item category name (optional) + // ------------------------------------------------------------- + // skip any whitespace character in the line + while (*aCurPos && (aSepIdx = strcspn (aCurPos, " \t\r\n")) == 0) + { + aCurPos++; + } + // to next line if sixth word isn't found or comment started + if (*aCurPos == '\0' || *aCurPos == '#') + { + continue; + } + // get the category name + aCategoryName = aCurPos; + aCurPos[aSepIdx] = '\0'; + if (!std::isalpha (*aCategoryName)) + { + Message::SendWarning() << "Warning: Not recognized a category name at the line " << aLineNum; + continue; + } + // if category name "-" then just do not set it + if (*aCategoryName != '-') + { + Handle(TCollection_HAsciiString) anItemCategoryName = new TCollection_HAsciiString(aCategoryName); + if (anItemCategoryName->Length() > 0) + { + anItem->SetShortName (anItemCategoryName); + } + } + } + Message::SendInfo() << " Done"; + + return Standard_True; +} + +//======================================================================= +// function : main +// purpose : +//======================================================================= +Standard_Integer main (const Standard_Integer argc, const char* argv[]) +{ + if (argc < 2) + { + Message::SendInfo() << "EXPRESS -> CASCADE/XSTEP classes generator 3.0\n" + "Use: ExpToCas [ [ [start_index]]]\n" + "Where: \n" + "- schema.exp is a file with EXPRESS schema \n" + "- create.lst is a file with list of types to generate (all if none)\n" + " (or \"-\" for creating all entities in the schema)\n" + "- packaging.lst is a file with classes distribution per package\n" + " in the form of the list (one item per line) \" \"\n" + " If package not defined for some type, \"StepStep\" assumed\n" + "- start_index - a first number for auxiliary generated files with data\n" + " to copy into StepAP214_Protocol.cxx, RWStepAP214_GeneralModule.cxx and\n" + " RWStepAP214_ReadWriteModule.cxx"; + return 0; + } + + //================================= + // Step 1: parsing EXPRESS file + // open schema file + OSD_Path aPath (argv[1]); + OSD_File aFile (aPath); + if (!aFile.IsReadable()) + { + Message::SendFail() << "Error: Cannot open " << argv[1]; + return -1; + } + + // parse + Message::SendInfo() << "Starting parsing " << argv[1]; + Handle(Express_Schema) aSchema = GetSchema (argv[1]); + + if (aSchema.IsNull()) + { + Message::SendFail() << "Error: Parsing finished with no result"; + return -1; + } + else + { + Message::SendInfo() << "Schema " << aSchema->Name()->ToCString() << " successfully parsed"; + } + Message::SendInfo() << "Total " << aSchema->NbItems() << " items"; + + //================================= + // Step 2: Prepare data for creating classes + + // load packaging information + if (argc > 3) + { + if (!LoadList (argv[3], aSchema, Standard_False)) + { + return -1; + } + } + // load list of classes to generate + if (argc > 2) + { + if (argv[2][0] == '-') + { + // set mark for all items + for (Standard_Integer num = 1; num <= aSchema->NbItems(); num++) + { + aSchema->Item (num)->SetGenMode (Express_Item::GM_GenByUser); + } + } + else if (!LoadList (argv[2], aSchema, Standard_True)) + { + return -1; + } + } + + // get starting index + Standard_Integer anIndex = -1; + if (argc > 4) + { + char* aStopSymbol; + anIndex = (Standard_Integer) strtol (argv[4], &aStopSymbol, 10); + if (*aStopSymbol != '\0') + { + Message::SendFail() << "Error: invalid starting index: " << argv[4]; + return -1; + } + } + + //================================= + // Step 3: Iterate over new items and set the package name if need + const TCollection_AsciiString aUserName("user"); + for (Standard_Integer aNum = 1; aNum <= aSchema->NbItems(); aNum++) + { + if (aSchema->Item (aNum)->GetGenMode() == Express_Item::GM_GenByUser) + { + aSchema->Item (aNum)->Use2(aUserName, Express_Item::GetUnknownPackageName()); + } + } + + //================================= + // Step 4: Iterate by items and generate classes + Standard_Boolean isDone = Standard_False; + Express_Item::SetIndex (anIndex); + do + { + isDone = Standard_False; + for (Standard_Integer aNum = 1; aNum <= aSchema->NbItems(); aNum++) + { + isDone = isDone || aSchema->Item (aNum)->Generate(); + } + } while (isDone); + + return 0; +} diff --git a/src/ExpToCasExe/FILES b/src/ExpToCasExe/FILES new file mode 100644 index 0000000000..61973b5d99 --- /dev/null +++ b/src/ExpToCasExe/FILES @@ -0,0 +1,7 @@ +exptocas.lex +expltocas.yacc +lex.exptocas.cxx +exptocas.tab.hxx +exptocas.tab.cxx +ExpToCasExe.cxx + diff --git a/src/ExpToCasExe/FlexLexer.h b/src/ExpToCasExe/FlexLexer.h new file mode 100644 index 0000000000..c4dad2b142 --- /dev/null +++ b/src/ExpToCasExe/FlexLexer.h @@ -0,0 +1,220 @@ +// -*-C++-*- +// FlexLexer.h -- define interfaces for lexical analyzer classes generated +// by flex + +// Copyright (c) 1993 The Regents of the University of California. +// All rights reserved. +// +// This code is derived from software contributed to Berkeley by +// Kent Williams and Tom Epperly. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: + +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. + +// Neither the name of the University nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. + +// THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR +// IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED +// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +// PURPOSE. + +// This file defines FlexLexer, an abstract class which specifies the +// external interface provided to flex C++ lexer objects, and yyFlexLexer, +// which defines a particular lexer class. +// +// If you want to create multiple lexer classes, you use the -P flag +// to rename each yyFlexLexer to some other xxFlexLexer. You then +// include in your other sources once per lexer class: +// +// #undef yyFlexLexer +// #define yyFlexLexer xxFlexLexer +// #include +// +// #undef yyFlexLexer +// #define yyFlexLexer zzFlexLexer +// #include +// ... + +#ifndef __FLEX_LEXER_H +// Never included before - need to define base class. +#define __FLEX_LEXER_H + +#include + +extern "C++" { + +struct yy_buffer_state; +typedef int yy_state_type; + +class FlexLexer +{ +public: + virtual ~FlexLexer() { } + + const char* YYText() const { return yytext; } + int YYLeng() const { return yyleng; } + + virtual void + yy_switch_to_buffer( yy_buffer_state* new_buffer ) = 0; + virtual yy_buffer_state* yy_create_buffer( std::istream* s, int size ) = 0; + virtual yy_buffer_state* yy_create_buffer( std::istream& s, int size ) = 0; + virtual void yy_delete_buffer( yy_buffer_state* b ) = 0; + virtual void yyrestart( std::istream* s ) = 0; + virtual void yyrestart( std::istream& s ) = 0; + + virtual int yylex() = 0; + + // Call yylex with new input/output sources. + int yylex( std::istream& new_in, std::ostream& new_out ) + { + switch_streams( new_in, new_out ); + return yylex(); + } + + int yylex( std::istream* new_in, std::ostream* new_out = 0) + { + switch_streams( new_in, new_out ); + return yylex(); + } + + // Switch to new input/output streams. A nil stream pointer + // indicates "keep the current one". + virtual void switch_streams( std::istream* new_in, + std::ostream* new_out ) = 0; + virtual void switch_streams( std::istream& new_in, + std::ostream& new_out ) = 0; + + int lineno() const { return yylineno; } + + int debug() const { return yy_flex_debug; } + void set_debug( int flag ) { yy_flex_debug = flag; } + +protected: + char* yytext; + int yyleng; + int yylineno; // only maintained if you use %option yylineno + int yy_flex_debug; // only has effect with -d or "%option debug" +}; + +} +#endif // FLEXLEXER_H + +#if defined(yyFlexLexer) || ! defined(yyFlexLexerOnce) +// Either this is the first time through (yyFlexLexerOnce not defined), +// or this is a repeated include to define a different flavor of +// yyFlexLexer, as discussed in the flex manual. +# define yyFlexLexerOnce + +extern "C++" { + +class yyFlexLexer : public FlexLexer { +public: + // arg_yyin and arg_yyout default to the cin and cout, but we + // only make that assignment when initializing in yylex(). + yyFlexLexer( std::istream& arg_yyin, std::ostream& arg_yyout ); + yyFlexLexer( std::istream* arg_yyin = 0, std::ostream* arg_yyout = 0 ); +private: + void ctor_common(); + +public: + + virtual ~yyFlexLexer(); + + void yy_switch_to_buffer( yy_buffer_state* new_buffer ); + yy_buffer_state* yy_create_buffer( std::istream* s, int size ); + yy_buffer_state* yy_create_buffer( std::istream& s, int size ); + void yy_delete_buffer( yy_buffer_state* b ); + void yyrestart( std::istream* s ); + void yyrestart( std::istream& s ); + + void yypush_buffer_state( yy_buffer_state* new_buffer ); + void yypop_buffer_state(); + + virtual int yylex(); + virtual void switch_streams( std::istream& new_in, std::ostream& new_out ); + virtual void switch_streams( std::istream* new_in = 0, std::ostream* new_out = 0 ); + virtual int yywrap(); + +protected: + virtual int LexerInput( char* buf, int max_size ); + virtual void LexerOutput( const char* buf, int size ); + virtual void LexerError( const char* msg ); + + void yyunput( int c, char* buf_ptr ); + int yyinput(); + + void yy_load_buffer_state(); + void yy_init_buffer( yy_buffer_state* b, std::istream& s ); + void yy_flush_buffer( yy_buffer_state* b ); + + int yy_start_stack_ptr; + int yy_start_stack_depth; + int* yy_start_stack; + + void yy_push_state( int new_state ); + void yy_pop_state(); + int yy_top_state(); + + yy_state_type yy_get_previous_state(); + yy_state_type yy_try_NUL_trans( yy_state_type current_state ); + int yy_get_next_buffer(); + + std::istream yyin; // input source for default LexerInput + std::ostream yyout; // output sink for default LexerOutput + + // yy_hold_char holds the character lost when yytext is formed. + char yy_hold_char; + + // Number of characters read into yy_ch_buf. + int yy_n_chars; + + // Points to current character in buffer. + char* yy_c_buf_p; + + int yy_init; // whether we need to initialize + int yy_start; // start state number + + // Flag which is used to allow yywrap()'s to do buffer switches + // instead of setting up a fresh yyin. A bit of a hack ... + int yy_did_buffer_switch_on_eof; + + + size_t yy_buffer_stack_top; /**< index of top of stack. */ + size_t yy_buffer_stack_max; /**< capacity of stack. */ + yy_buffer_state ** yy_buffer_stack; /**< Stack as an array. */ + void yyensure_buffer_stack(void); + + // The following are not always needed, but may be depending + // on use of certain flex features (like REJECT or yymore()). + + yy_state_type yy_last_accepting_state; + char* yy_last_accepting_cpos; + + yy_state_type* yy_state_buf; + yy_state_type* yy_state_ptr; + + char* yy_full_match; + int* yy_full_state; + int yy_full_lp; + + int yy_lp; + int yy_looking_for_trail_begin; + + int yy_more_flag; + int yy_more_len; + int yy_more_offset; + int yy_prev_more_offset; +}; + +} + +#endif // yyFlexLexer || ! yyFlexLexerOnce diff --git a/src/ExpToCasExe/ReadMe.md b/src/ExpToCasExe/ReadMe.md new file mode 100644 index 0000000000..3b14a3d413 --- /dev/null +++ b/src/ExpToCasExe/ReadMe.md @@ -0,0 +1,171 @@ +# STEP express schema to OCCT classes + +## 1. Introduction + +**ExpToCasExe** is an auxiliary tool to generate code for implementation +of new STEP entities into OCCT. +This tool consists of two packages: **ExpToCasExe** and **TKExpress**. + +*ExpToCasExe* package is the basic package for generation. +It parses the express schema, makes a list of entities described in the schema, +and starts generating classes according to the specified lists. +This package has the file *occt_existed_step_entities.lst* witch contains list +of STEP entities implemented in *OCCT* at this moment. + +*TKExpress* package generates files with description of the STEP entities +to use in *OCCT* taking into account their dependencies. +Below is a set of generated files using the example +of the *Condition* entity from the *StepAP214* package. + +* **StepAP214_Condition.hxx** - contains declaration of the class that describes STEP entity +* **StepAP214_Condition.cxx** - contains definition of the class that describes STEP entity +* **RWStepAP214_RWCondition.hxx** - contains declaration of the class that reads (writes) STEP entity from STEP file +* **RWStepAP214_RWCondition.cxx** - contains definition of the class that reads (writes) STEP entity from STEP file +* **category.txt** - common file for all generated entities with part of code to insert to *RWStepAP214_GeneralModule.cxx* file +* **fillshared.txt** - common file for all generated entities with part of code to insert to *RWStepAP214_GeneralModule.cxx* file +* **inc.txt** - common file for all generated entities with part of code to insert to *StepAP214_Protocol.cxx* +* **newvoid.txt** - common file for all generated entities with part of code to insert to *RWStepAP214_GeneralModule.cxx* file +* **protocol.txt** - common file for all generated entities with part of code to insert to *StepAP214_Protocol.cxx* file +* **readstep.txt** - common file for all generated entities with part of code to insert to *RWStepAP214_ReadWriteModule.cxx* file +* **reco.txt** - common file for all generated entities with part of code to insert to *RWStepAP214_ReadWriteModule.cxx* file +* **rwinc.txt** - common file for all generated entities with part of code to insert to *RWStepAP214_ReadWriteModule.cxx* file +* **steptype.txt** - common file for all generated entities with part of code to insert to *RWStepAP214_ReadWriteModule.cxx* file +* **typebind.txt** - common file for all generated entities with part of code to insert to *RWStepAP214_ReadWriteModule.cxx* file +* **writestep.txt** - common file for all generated entities with part of code to insert to *RWStepAP214_ReadWriteModule.cxx* file + +## 2. Build + +The build process is automated, but has some specifics. *ExpToCasExe* package contains file *exptocas.lex* +which contains rules for lexical analyzer builder (*FLEX*), and file *exptocas.yacc* +which contains rules for syntax analyzer builder (*GNU Bison*). + +During build process *FLEX* and *Bison* generate the next files: + + * FlexLexer.h + * lex.exptocas.cxx + * exptocas.tab.cxx + * exptocas.tab.hxx + +These files are placed to the source directory ("*src/ExpToCasExe*") due to *CMAKE* script specific. +Then standard Visual Studio build process continues. + +There is no necessary to include these files to the *git* repository, due to automatic generation. +To change the behaviour of Express schema parser, the user need to modify original files: +*exptocas.lex* and *exptocas.yacc*. + +## 3. Usage + +**ExpToCasExe** program has the following call pattern: + +~~~~ +> ExpToCasExe [ [ [start_index]]] +~~~~ + +where: + + * **schema.exp** - file with STEP Express schema + * **new.lst** - file with list of new STEP entities which we have to generate + * **existed.lst** - file with list of already implemented STEP entities + * **start_index** - a first index for entity registration + (value of it you can receive after analyse of *StepAP214_Protocol.cxx* file) + +If *new.lst* file is set to "-" then all entities from Express schema are considered as new. + +*new.lst* and *existed.lst* are the text files. Line in file describes the class name +of STEP entity and to witch *OCCT* package it's belong. Line has the following format: + +~~~~ +item_name package_name [shortname [check_flag(0 or 1) [fillshared_flag(0 or 1) [category]]]] +~~~~ + +where: + + * **item_name** is the class name of the STEP entity (*ProductDefinitionOrReference* for example) + * **package_name** is the name of the *OCCT* package (*StepBasic* for example) + * **shortname** is the short name of the STEP entity + * **check_flag** is the flag to generate the *Check* function in the class + * **fillshared_flag** is the flag to generate the *FillShared* function in the class + * **category** is the name of category to witch entity belongs to + +These file can include comments after the symbol "#". + +The result of generation consists of several folders: + +* two folders (*\_package_name\_* and *RW\_package_name\_*) for each package for which new entities were generated. +* a folder *Registration* with *\*.txt* files with code to copy into common files (see the example in the first section). + +For generation, it is easy to copy to separate directory following files: + +* **ExpToCasExe.exe**, **TKernel.dll** and **TKExpress.dll** from OCCT +* STEP Express schema +* **occt_existed_step_entities.lst** from package *ExpToCasExe* + +create a file with needed entities **new.lst** and from this directory execute command: + +~~~~ +> ExpToCasExe.exe schema.exp new.lst occt_existed_step_entities.lst 1000 +~~~~ + +## 4. Disclaimer + +**NOTE**: +Some STEP schemes may be not fully corresponded to the rules which set in our generator. +If during generation we receive a message about syntax error you can try to edit schema +file in order to avoid it. Such approach is reasonable if number of errors is small. +If there are many errors we have to change existed rules (for debug parser process you can +uncomment string "//aScanner.set_debug(1);" in the file *exptocas.yacc*). +TIP: remove upper case from name after SCHEMA key word. + +**NOTE**: +Please, take into account that most of existed entities were generated many years ago. +Some of them can be not corresponded to last versions of schemes. + +For example, we don't have classes for entity: + +~~~~ + ENTITY founded_item + SUPERTYPE OF ((ONEOF(b_spline_curve_knot_locator, b_spline_curve_segment, b_spline_surface_knot_locator, + b_spline_surface_patch, b_spline_surface_strip, + boundary_curve_of_b_spline_or_rectangular_composite_surface, box_domain, + character_glyph_style_outline, character_glyph_style_stroke, composite_curve_segment, + composite_curve_transition_locator, curve_style, curve_style_font, curve_style_font_and_scaling, + curve_style_font_pattern, externally_defined_style, fill_area_style, + interpolated_configuration_segment, kinematic_path_segment, plane_angle_and_length_pair, + plane_angle_and_ratio_pair, point_style, presentation_style_assignment, + rectangular_composite_surface_transition_locator, surface_patch, surface_side_style, + surface_style_boundary, surface_style_control_grid, surface_style_fill_area, + surface_style_parameter_line, surface_style_segmentation_curve, surface_style_silhouette, + surface_style_usage, symbol_style, text_style, view_volume)) ANDOR + (ONEOF(character_glyph_style_outline, character_glyph_style_stroke, curve_style, curve_style_font, + curve_style_font_and_scaling, curve_style_font_pattern, externally_defined_style, + fill_area_style, point_style, presentation_style_assignment, surface_side_style, + surface_style_boundary, surface_style_control_grid, surface_style_fill_area, + surface_style_parameter_line, surface_style_segmentation_curve, surface_style_silhouette, + surface_style_usage, symbol_style, text_style))); + DERIVE + users : SET [0 : ?] OF founded_item_select := using_items(SELF, []); + WHERE + WR1: SIZEOF(users) > 0; + WR2: NOT (SELF IN users); + END_ENTITY; +~~~~ + +But some of existed entities (for example - *composite_curve_segment*) must be inherited from +this missing entity (at present such existed entities are inherited from *Standard_Transient*): + +~~~~ + ENTITY composite_curve_segment + SUBTYPE OF (founded_item); + transition : transition_code; + same_sense : BOOLEAN; + parent_curve : curve; + INVERSE + using_curves : BAG[1:?] OF composite_curve FOR segments; + WHERE + wr1 : ('AUTOMOTIVE_DESIGN.BOUNDED_CURVE' IN TYPEOF(parent_curve)); + END_ENTITY; -- 10303-42: geometry_schema +~~~~ + +**NOTE**: To facilitate the work of those who will use this program after you, +it is strongly recommended update the file **occt_existed_step_entities.lst** +after each generation and not to forget to change update date in the first line of this file. diff --git a/src/ExpToCasExe/exptocas.lex b/src/ExpToCasExe/exptocas.lex new file mode 100644 index 0000000000..ac71e0a878 --- /dev/null +++ b/src/ExpToCasExe/exptocas.lex @@ -0,0 +1,203 @@ +%{ + +// Created: Thu Oct 28 12:21:16 1999 +// Author: Andrey BETENEV +// Copyright (c) 1999-2020 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. + +/***************************************************************************** + +This LEX scanner is performs lexical analysis of EXPRESS schema file +for EXPRESS -> CASCADE/XSTEP classes generator + +On the stage of lexical scanner comments (single- and multi-line), +definitions of CONSTANT, FUNCTION, RULE items and clauses WHERE, INVERSE +and DERIVE of TYPE amd ENTITY items are dismissed (ignored) + +Then, keywords such as ENTITY, SUPERTYPE, SET etc., names of items +and special symbols are identified and returned to parser (yacc) as tokens + +Also, error processing and current line number tracking functions are defined + +*****************************************************************************/ + +/************************************/ +/* Section 1 */ +/* definitions */ + +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +#include "exptocas.tab.hxx" /* define tokens */ + +/* Auxiliary functions */ + +static int fun_level=0; +static int ec_linenum=1; +static int ec_state = 0; + +int yywrap(void) { return 1; } + +int ec_curline ( void ) +{ + return ec_linenum; +} + +int ec_error ( const std::string& s, const std::string& text ) +{ + printf ( "\nError at line %d: %s \"%s\"\n", ec_curline(), s.c_str(), text.c_str() ); + return 0; +} + +%} + +/* + c++ generate C++ parser class +*/ +%option c++ +%option noyywrap +%option yyclass="exptocas::scanner" +%option nounistd + +%s TYP ENT +%x COMM SKP RULE FUN + +%a 4000 +%o 6000 + +%top{ +// Pre-include stdlib.h to avoid redefinition of integer type macros (INT8_MIN and similar in generated code) +#if !defined(_MSC_VER) || (_MSC_VER >= 1600) // Visual Studio 2010+ +#include "stdint.h" +#endif +} + +%{ + +// Tell flex which function to define +#ifdef YY_DECL +# undef YY_DECL +#endif +#define YY_DECL int exptocas::scanner::lex (exptocas::parser::semantic_type* yylval) + +typedef exptocas::parser::token token; + +/************************************/ +/* Section 2 */ +/* parsing rules */ +%} + +%% + +"--".* { /* Eat line comments */ } +"(*" { ec_state = YYSTATE; BEGIN(COMM); } +. { /* Eat multiline comments */ } +"*)" { BEGIN(ec_state); } + +"SCHEMA" { return yylval->num = token::KSCHEM; } +"END_SCHEMA" { return yylval->num = token::KENDS; } + +"TYPE" { BEGIN(TYP); return yylval->num = token::KTYP; } +"END_TYPE" { BEGIN(0); return yylval->num = token::KENDT; } + +"ENTITY" { BEGIN(ENT); return yylval->num = token::KENT; } +"END_ENTITY" { BEGIN(0); return yylval->num = token::KENDE; } + +"INVERSE" | +"DERIVE" | +"WHERE" { BEGIN(SKP); } +. { /* eat contents of WHERE and DERIVE subclauses of ENTITY and TYPE */ } + +"SELECT" { return yylval->num = token::KSEL; } +"ENUMERATION" { return yylval->num = token::KENUM; } +"LIST" { return yylval->num = token::KLIST; } +"ARRAY" { return yylval->num = token::KARR; } +"SET" { return yylval->num = token::KSET; } +"BAG" { return yylval->num = token::KBAG; } +"OF" { return yylval->num = token::KOF; } + +"NUMBER" { return yylval->num = token::KNUM; } +"INTEGER" { return yylval->num = token::KINT; } +"REAL" { return yylval->num = token::KDBL; } +"STRING" { return yylval->num = token::KSTR; } +"LOGICAL" { return yylval->num = token::KLOG; } +"BOOLEAN" { return yylval->num = token::KBOOL; } + +"OPTIONAL" { return yylval->num = token::KOPT; } +"UNIQUE" { return yylval->num = token::KUNIQ; } +"SELF" { return yylval->num = token::KSELF; } + +"ABSTRACT" { return yylval->num = token::KABSTR; } +"SUBTYPE" { return yylval->num = token::KSUBT; } +"SUPERTYPE" { return yylval->num = token::KSPRT; } +"ANDOR" { return yylval->num = token::KANDOR; } +"ONEOF" { return yylval->num = token::K1OF; } +"AND" { return yylval->num = token::KAND; } + +"UR"[0-9]+ { yylval->str = strdup ( yytext ); return token::NAME; } + +[a-z_][a-z_0-9]* { yylval->str = strdup ( yytext ); return token::NAME; } + +[0-9]+ { yylval->num = atoi ( yytext ); return token::NUMBER; } +[,=();?:.\\]|"["|"]" { return yylval->num = yytext[0]; } + +"FUNCTION" { BEGIN(FUN); fun_level++; } +"(*" { ec_state = YYSTATE; BEGIN(COMM); /* eat comments in functions */ } +"--".* { /* Eat line comments in functions */ } +[A-Za-z_0-9]* { /* eat FUNCTIONs - skip IDs explicitly */ } +\'[^\']*\' { /* eat FUNCTIONs - skip strings explicitly */ } +. { /* eat FUNCTIONs - skip all other symbols in functions */ } +"END_FUNCTION;" { fun_level--; if ( ! fun_level ) BEGIN(0); } + +"RULE" { BEGIN(RULE); /* eat RULEs */ } +. { /* eat RULEs */ } +"END_RULE;" { BEGIN(0); } + +"CONSTANT"[ \t\na-z_0-9:=;'()|-]+"END_CONSTANT;" { /* eat CONSTANTs */ + char *s = yytext; /* but don't forget to count lines.. */ + while ( *s ) if ( *(s++) == '\n' ) ec_linenum++; + } + +[ \t]+ { /* eat spaces */ } +[A-Za-z0-9_]+ { ec_error ( "unknown keyword ", yytext ); /* put unrecognized keywords to cerr */ } +. { ec_error ( "unknown symbol ", yytext ); /* put unrecognized data to cerr */ } + +\n { ec_linenum++; /* count lines */ } + +%% + +/************************************/ +/* Section 3 */ +/* auxiliary procedures */ + +exptocas::scanner::scanner(std::istream* in, std::ostream* out) + : exptocasFlexLexer(in, out) +{ +} + +/* +int main ( void ) +{ + yylex(); +} +*/ + diff --git a/src/ExpToCasExe/exptocas.tab.cxx b/src/ExpToCasExe/exptocas.tab.cxx new file mode 100644 index 0000000000..f213ed2006 --- /dev/null +++ b/src/ExpToCasExe/exptocas.tab.cxx @@ -0,0 +1,1531 @@ +// A Bison parser, made by GNU Bison 3.7.4. + +// Skeleton implementation for Bison LALR(1) parsers in C++ + +// Copyright (C) 2002-2015, 2018-2020 Free Software Foundation, Inc. + +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . + +// As a special exception, you may create a larger work that contains +// part or all of the Bison parser skeleton and distribute that work +// under terms of your choice, so long as that work isn't itself a +// parser generator using the skeleton or a modified version thereof +// as a parser skeleton. Alternatively, if you modify or redistribute +// the parser skeleton itself, you may (at your option) remove this +// special exception, which will cause the skeleton and the resulting +// Bison output files to be licensed under the GNU General Public +// License without this special exception. + +// This special exception was added by the Free Software Foundation in +// version 2.2 of Bison. + +// DO NOT RELY ON FEATURES THAT ARE NOT DOCUMENTED in the manual, +// especially those whose name start with YY_ or yy_. They are +// private implementation details that can be changed or removed. + +// "%code top" blocks. + + // Created: Thu Oct 28 12:21:16 1999 + // Author: Andrey BETENEV + // Copyright (c) 1999-2020 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. + + /***************************************************************************** + + This YACC parser implements parsing algorithm for EXPRESS -> CASCADE/XSTEP + classes generator + + Input in the form of tokens is obtained from lexical analyser. Then, data + structure representing schema is created on the basis of grammar analysis. + + NOTE: The grammar currently implemented is not full. + FUNCTION, RULE and CONSTANT items, WHERE, INVERSE and DERIVE clauses + of TYPE and ENTITY items are not considered (ignored on the level of lexical + scanner). + SUPERTYPE and UNIQUE clauses of ENTITY item are recognized but ignored. + Also, complex constructs such as using call to function in dimensions of + complex time or redefinition of inherited field are ignored. + + *****************************************************************************/ + + +// Take the name prefix into account. +#define yylex exptocaslex + + + +#include "exptocas.tab.hxx" + + +// Unqualified %code blocks. + +#undef yylex +#define yylex scanner->lex +// disable MSVC warnings in bison code +#ifdef _MSC_VER +#pragma warning(disable:4244 4800) +#endif + +/************************************************/ +/* ERROR MESSAGE FUNCTION */ + +/* external functions (from exptocas.l) */ +int ec_error ( const std::string& s, const std::string& text ); +int ec_curline ( void ); + +//int yyerror ( char *s ) +//{ +// printf ( "\nParse error at line %d: %s\n", ec_curline(), s ); +// return 0; +//} + +/************************************************/ +/* FUNCTIONS FOR CREATING SCHEMA REPRESENTATION */ + +static Express_Schema *mkschema ( char *name, Express_HSequenceOfItem *ilist ); +static Express_HSequenceOfItem *mkilist ( Express_Item *item, Express_HSequenceOfItem *seq ); +static Express_Item *mkenum ( char *name, TColStd_HSequenceOfHAsciiString *tlist ); +static Express_Item *mkselect ( char *name, TColStd_HSequenceOfHAsciiString *tlist ); +static Express_Item *mkalias ( char *name, Express_Type *type ); +static Express_Item *mkentity ( char *name, TColStd_HSequenceOfHAsciiString *inherit, + Express_HSequenceOfField *field, int isabstract ); +static Express_Reference *mkrefs ( char *name, TColStd_HSequenceOfHAsciiString *items); +static TColStd_HSequenceOfHAsciiString *mktlist ( char *name, TColStd_HSequenceOfHAsciiString *tlist ); +static TColStd_HSequenceOfHAsciiString *mktlists ( TColStd_HSequenceOfHAsciiString *tlist1, TColStd_HSequenceOfHAsciiString *tlist2 ); +static Express_Type *mktstd ( int keyword ); +static Express_Type *mktname ( char *name ); +static Express_Type *mktset ( int keyword, int ilow, int ihigh, Express_Type *of ); +static Express_Field *mkfield ( char *name, Express_Type *type, int optional ); +static Express_HSequenceOfField *mkflist ( Express_Field *field, Express_HSequenceOfField *seq ); + + + +#ifndef YY_ +# if defined YYENABLE_NLS && YYENABLE_NLS +# if ENABLE_NLS +# include // FIXME: INFRINGES ON USER NAME SPACE. +# define YY_(msgid) dgettext ("bison-runtime", msgid) +# endif +# endif +# ifndef YY_ +# define YY_(msgid) msgid +# endif +#endif + + +// Whether we are compiled with exception support. +#ifndef YY_EXCEPTIONS +# if defined __GNUC__ && !defined __EXCEPTIONS +# define YY_EXCEPTIONS 0 +# else +# define YY_EXCEPTIONS 1 +# endif +#endif + + + +// Enable debugging if requested. +#if YYDEBUG + +// A pseudo ostream that takes yydebug_ into account. +# define YYCDEBUG if (yydebug_) (*yycdebug_) + +# define YY_SYMBOL_PRINT(Title, Symbol) \ + do { \ + if (yydebug_) \ + { \ + *yycdebug_ << Title << ' '; \ + yy_print_ (*yycdebug_, Symbol); \ + *yycdebug_ << '\n'; \ + } \ + } while (false) + +# define YY_REDUCE_PRINT(Rule) \ + do { \ + if (yydebug_) \ + yy_reduce_print_ (Rule); \ + } while (false) + +# define YY_STACK_PRINT() \ + do { \ + if (yydebug_) \ + yy_stack_print_ (); \ + } while (false) + +#else // !YYDEBUG + +# define YYCDEBUG if (false) std::cerr +# define YY_SYMBOL_PRINT(Title, Symbol) YYUSE (Symbol) +# define YY_REDUCE_PRINT(Rule) static_cast (0) +# define YY_STACK_PRINT() static_cast (0) + +#endif // !YYDEBUG + +#define yyerrok (yyerrstatus_ = 0) +#define yyclearin (yyla.clear ()) + +#define YYACCEPT goto yyacceptlab +#define YYABORT goto yyabortlab +#define YYERROR goto yyerrorlab +#define YYRECOVERING() (!!yyerrstatus_) + +namespace exptocas { + + /// Build a parser object. + parser::parser (exptocas::scanner* scanner_yyarg) +#if YYDEBUG + : yydebug_ (false), + yycdebug_ (&std::cerr), +#else + : +#endif + scanner (scanner_yyarg) + {} + + parser::~parser () + {} + + parser::syntax_error::~syntax_error () YY_NOEXCEPT YY_NOTHROW + {} + + /*---------------. + | symbol kinds. | + `---------------*/ + + // basic_symbol. + template + parser::basic_symbol::basic_symbol (const basic_symbol& that) + : Base (that) + , value (that.value) + {} + + + /// Constructor for valueless symbols. + template + parser::basic_symbol::basic_symbol (typename Base::kind_type t) + : Base (t) + , value () + {} + + template + parser::basic_symbol::basic_symbol (typename Base::kind_type t, YY_RVREF (semantic_type) v) + : Base (t) + , value (YY_MOVE (v)) + {} + + template + parser::symbol_kind_type + parser::basic_symbol::type_get () const YY_NOEXCEPT + { + return this->kind (); + } + + template + bool + parser::basic_symbol::empty () const YY_NOEXCEPT + { + return this->kind () == symbol_kind::S_YYEMPTY; + } + + template + void + parser::basic_symbol::move (basic_symbol& s) + { + super_type::move (s); + value = YY_MOVE (s.value); + } + + // by_kind. + parser::by_kind::by_kind () + : kind_ (symbol_kind::S_YYEMPTY) + {} + +#if 201103L <= YY_CPLUSPLUS + parser::by_kind::by_kind (by_kind&& that) + : kind_ (that.kind_) + { + that.clear (); + } +#endif + + parser::by_kind::by_kind (const by_kind& that) + : kind_ (that.kind_) + {} + + parser::by_kind::by_kind (token_kind_type t) + : kind_ (yytranslate_ (t)) + {} + + void + parser::by_kind::clear () + { + kind_ = symbol_kind::S_YYEMPTY; + } + + void + parser::by_kind::move (by_kind& that) + { + kind_ = that.kind_; + that.clear (); + } + + parser::symbol_kind_type + parser::by_kind::kind () const YY_NOEXCEPT + { + return kind_; + } + + parser::symbol_kind_type + parser::by_kind::type_get () const YY_NOEXCEPT + { + return this->kind (); + } + + + // by_state. + parser::by_state::by_state () YY_NOEXCEPT + : state (empty_state) + {} + + parser::by_state::by_state (const by_state& that) YY_NOEXCEPT + : state (that.state) + {} + + void + parser::by_state::clear () YY_NOEXCEPT + { + state = empty_state; + } + + void + parser::by_state::move (by_state& that) + { + state = that.state; + that.clear (); + } + + parser::by_state::by_state (state_type s) YY_NOEXCEPT + : state (s) + {} + + parser::symbol_kind_type + parser::by_state::kind () const YY_NOEXCEPT + { + if (state == empty_state) + return symbol_kind::S_YYEMPTY; + else + return YY_CAST (symbol_kind_type, yystos_[+state]); + } + + parser::stack_symbol_type::stack_symbol_type () + {} + + parser::stack_symbol_type::stack_symbol_type (YY_RVREF (stack_symbol_type) that) + : super_type (YY_MOVE (that.state), YY_MOVE (that.value)) + { +#if 201103L <= YY_CPLUSPLUS + // that is emptied. + that.state = empty_state; +#endif + } + + parser::stack_symbol_type::stack_symbol_type (state_type s, YY_MOVE_REF (symbol_type) that) + : super_type (s, YY_MOVE (that.value)) + { + // that is emptied. + that.kind_ = symbol_kind::S_YYEMPTY; + } + +#if YY_CPLUSPLUS < 201103L + parser::stack_symbol_type& + parser::stack_symbol_type::operator= (const stack_symbol_type& that) + { + state = that.state; + value = that.value; + return *this; + } + + parser::stack_symbol_type& + parser::stack_symbol_type::operator= (stack_symbol_type& that) + { + state = that.state; + value = that.value; + // that is emptied. + that.state = empty_state; + return *this; + } +#endif + + template + void + parser::yy_destroy_ (const char* yymsg, basic_symbol& yysym) const + { + if (yymsg) + YY_SYMBOL_PRINT (yymsg, yysym); + + // User destructor. + YYUSE (yysym.kind ()); + } + +#if YYDEBUG + template + void + parser::yy_print_ (std::ostream& yyo, const basic_symbol& yysym) const + { + std::ostream& yyoutput = yyo; + YYUSE (yyoutput); + if (yysym.empty ()) + yyo << "empty symbol"; + else + { + symbol_kind_type yykind = yysym.kind (); + yyo << (yykind < YYNTOKENS ? "token" : "nterm") + << ' ' << yysym.name () << " ("; + YYUSE (yykind); + yyo << ')'; + } + } +#endif + + void + parser::yypush_ (const char* m, YY_MOVE_REF (stack_symbol_type) sym) + { + if (m) + YY_SYMBOL_PRINT (m, sym); + yystack_.push (YY_MOVE (sym)); + } + + void + parser::yypush_ (const char* m, state_type s, YY_MOVE_REF (symbol_type) sym) + { +#if 201103L <= YY_CPLUSPLUS + yypush_ (m, stack_symbol_type (s, std::move (sym))); +#else + stack_symbol_type ss (s, sym); + yypush_ (m, ss); +#endif + } + + void + parser::yypop_ (int n) + { + yystack_.pop (n); + } + +#if YYDEBUG + std::ostream& + parser::debug_stream () const + { + return *yycdebug_; + } + + void + parser::set_debug_stream (std::ostream& o) + { + yycdebug_ = &o; + } + + + parser::debug_level_type + parser::debug_level () const + { + return yydebug_; + } + + void + parser::set_debug_level (debug_level_type l) + { + yydebug_ = l; + } +#endif // YYDEBUG + + parser::state_type + parser::yy_lr_goto_state_ (state_type yystate, int yysym) + { + int yyr = yypgoto_[yysym - YYNTOKENS] + yystate; + if (0 <= yyr && yyr <= yylast_ && yycheck_[yyr] == yystate) + return yytable_[yyr]; + else + return yydefgoto_[yysym - YYNTOKENS]; + } + + bool + parser::yy_pact_value_is_default_ (int yyvalue) + { + return yyvalue == yypact_ninf_; + } + + bool + parser::yy_table_value_is_error_ (int yyvalue) + { + return yyvalue == yytable_ninf_; + } + + int + parser::operator() () + { + return parse (); + } + + int + parser::parse () + { + int yyn; + /// Length of the RHS of the rule being reduced. + int yylen = 0; + + // Error handling. + int yynerrs_ = 0; + int yyerrstatus_ = 0; + + /// The lookahead symbol. + symbol_type yyla; + + /// The return value of parse (). + int yyresult; + +#if YY_EXCEPTIONS + try +#endif // YY_EXCEPTIONS + { + YYCDEBUG << "Starting parse\n"; + + + /* Initialize the stack. The initial state will be set in + yynewstate, since the latter expects the semantical and the + location values to have been already stored, initialize these + stacks with a primary value. */ + yystack_.clear (); + yypush_ (YY_NULLPTR, 0, YY_MOVE (yyla)); + + /*-----------------------------------------------. + | yynewstate -- push a new symbol on the stack. | + `-----------------------------------------------*/ + yynewstate: + YYCDEBUG << "Entering state " << int (yystack_[0].state) << '\n'; + YY_STACK_PRINT (); + + // Accept? + if (yystack_[0].state == yyfinal_) + YYACCEPT; + + goto yybackup; + + + /*-----------. + | yybackup. | + `-----------*/ + yybackup: + // Try to take a decision without lookahead. + yyn = yypact_[+yystack_[0].state]; + if (yy_pact_value_is_default_ (yyn)) + goto yydefault; + + // Read a lookahead token. + if (yyla.empty ()) + { + YYCDEBUG << "Reading a token\n"; +#if YY_EXCEPTIONS + try +#endif // YY_EXCEPTIONS + { + yyla.kind_ = yytranslate_ (yylex (&yyla.value)); + } +#if YY_EXCEPTIONS + catch (const syntax_error& yyexc) + { + YYCDEBUG << "Caught exception: " << yyexc.what() << '\n'; + error (yyexc); + goto yyerrlab1; + } +#endif // YY_EXCEPTIONS + } + YY_SYMBOL_PRINT ("Next token is", yyla); + + if (yyla.kind () == symbol_kind::S_YYerror) + { + // The scanner already issued an error message, process directly + // to error recovery. But do not keep the error token as + // lookahead, it is too special and may lead us to an endless + // loop in error recovery. */ + yyla.kind_ = symbol_kind::S_YYUNDEF; + goto yyerrlab1; + } + + /* If the proper action on seeing token YYLA.TYPE is to reduce or + to detect an error, take that action. */ + yyn += yyla.kind (); + if (yyn < 0 || yylast_ < yyn || yycheck_[yyn] != yyla.kind ()) + { + goto yydefault; + } + + // Reduce or error. + yyn = yytable_[yyn]; + if (yyn <= 0) + { + if (yy_table_value_is_error_ (yyn)) + goto yyerrlab; + yyn = -yyn; + goto yyreduce; + } + + // Count tokens shifted since error; after three, turn off error status. + if (yyerrstatus_) + --yyerrstatus_; + + // Shift the lookahead token. + yypush_ ("Shifting", state_type (yyn), YY_MOVE (yyla)); + goto yynewstate; + + + /*-----------------------------------------------------------. + | yydefault -- do the default action for the current state. | + `-----------------------------------------------------------*/ + yydefault: + yyn = yydefact_[+yystack_[0].state]; + if (yyn == 0) + goto yyerrlab; + goto yyreduce; + + + /*-----------------------------. + | yyreduce -- do a reduction. | + `-----------------------------*/ + yyreduce: + yylen = yyr2_[yyn]; + { + stack_symbol_type yylhs; + yylhs.state = yy_lr_goto_state_ (yystack_[yylen].state, yyr1_[yyn]); + /* If YYLEN is nonzero, implement the default value of the + action: '$$ = $1'. Otherwise, use the top of the stack. + + Otherwise, the following line sets YYLHS.VALUE to garbage. + This behavior is undocumented and Bison users should not rely + upon it. */ + if (yylen) + yylhs.value = yystack_[yylen - 1].value; + else + yylhs.value = yystack_[0].value; + + + // Perform the reduction. + YY_REDUCE_PRINT (yyn); +#if YY_EXCEPTIONS + try +#endif // YY_EXCEPTIONS + { + switch (yyn) + { + case 2: // SCHEMA: KSCHEM NAME ';' ILIST KENDS ';' + { (yylhs.value.schema) = mkschema ( (yystack_[4].value.str), (yystack_[2].value.ilist) ); /* Root: EXPRESS schema */ } + break; + + case 3: // ILIST: ITEM + { (yylhs.value.ilist) = mkilist ( (yystack_[0].value.item), 0 ); /* list of items for schema */ } + break; + + case 4: // ILIST: ITEM ILIST + { (yylhs.value.ilist) = mkilist ( (yystack_[1].value.item), (yystack_[0].value.ilist) ); } + break; + + case 5: // ITEM: ENUM + { (yylhs.value.item) = (yystack_[0].value.item); } + break; + + case 6: // ITEM: SELECT + { (yylhs.value.item) = (yystack_[0].value.item); } + break; + + case 7: // ITEM: ALIAS + { (yylhs.value.item) = (yystack_[0].value.item); } + break; + + case 9: // ITEM: ENTITY + { (yylhs.value.item) = (yystack_[0].value.item); /* item of schema (type definition) */ } + break; + + case 10: // ENUM: KTYP NAME '=' KENUM KOF TLIST1 ';' KENDT ';' + { (yylhs.value.item) = mkenum ( (yystack_[7].value.str), (yystack_[3].value.tlist) ); /* TYPE ENUMERATION definition */ } + break; + + case 11: // SELECT: KTYP NAME '=' KSEL TLIST1 ';' KENDT ';' + { (yylhs.value.item) = mkselect ( (yystack_[6].value.str), (yystack_[3].value.tlist) ); /* TYPE SELECT definition */ } + break; + + case 12: // ALIAS: KTYP NAME '=' TYPE ';' KENDT ';' + { (yylhs.value.item) = mkalias ( (yystack_[5].value.str), (yystack_[3].value.type) ); /* TYPE '=' definition (alias) */ } + break; + + case 13: // ENTITY: KENT NAME SUPERT SUBT ';' FLIST1 UNIQUE KENDE ';' + { (yylhs.value.item) = mkentity ( (yystack_[7].value.str), (yystack_[5].value.tlist), (yystack_[3].value.flist), 0 ); /* ENTITY definition */ } + break; + + case 14: // ENTITY: KENT NAME KABSTR SUPERT SUBT ';' FLIST1 UNIQUE KENDE ';' + { (yylhs.value.item) = mkentity ( (yystack_[8].value.str), (yystack_[5].value.tlist), (yystack_[3].value.flist), 1 ); /* ENTITY definition */ } + break; + + case 15: // REFERENCE: KREF KFROM NAME TLIST1 ';' + { (yylhs.value.ref) = mkrefs ( (yystack_[2].value.str), (yystack_[1].value.tlist) ); /* REFERENCE FROM definition */ } + break; + + case 16: // TLIST: NAME + { (yylhs.value.tlist) = mktlist ( (yystack_[0].value.str), 0 ); /* list of (type) names */ } + break; + + case 17: // TLIST: NAME ',' TLIST + { (yylhs.value.tlist) = mktlist ( (yystack_[2].value.str), (yystack_[0].value.tlist) ); } + break; + + case 18: // TLIST1: '(' TLIST ')' + { (yylhs.value.tlist) = (yystack_[1].value.tlist); /* TLIST in brackets */ } + break; + + case 19: // TYPE: TSTD + { (yylhs.value.type) = (yystack_[0].value.type); } + break; + + case 20: // TYPE: TNAME + { (yylhs.value.type) = (yystack_[0].value.type); } + break; + + case 21: // TYPE: TSET + { (yylhs.value.type) = (yystack_[0].value.type); /* type, simple or complex */ } + break; + + case 22: // TSTD: KINT + { (yylhs.value.type) = mktstd ( (yystack_[0].value.num) ); /* predefined type: INTEGER */ } + break; + + case 23: // TSTD: KNUM + { (yylhs.value.type) = mktstd ( (yystack_[0].value.num) ); /* predefined type: NUMBER */ } + break; + + case 24: // TSTD: KDBL + { (yylhs.value.type) = mktstd ( (yystack_[0].value.num) ); /* predefined type: REAL */ } + break; + + case 25: // TSTD: KSTR + { (yylhs.value.type) = mktstd ( (yystack_[0].value.num) ); /* predefined type: STRING */ } + break; + + case 26: // TSTD: KLOG + { (yylhs.value.type) = mktstd ( (yystack_[0].value.num) ); /* predefined type: LOGICAL */ } + break; + + case 27: // TSTD: KBOOL + { (yylhs.value.type) = mktstd ( (yystack_[0].value.num) ); /* predefined type: BOOLEAN */ } + break; + + case 28: // TNAME: NAME + { (yylhs.value.type) = mktname ( (yystack_[0].value.str) ); /* named type */ } + break; + + case 29: // TSET: KLIST '[' INDEX ':' INDEX ']' KOF OPTUNI TYPE + { (yylhs.value.type) = mktset ( (yystack_[8].value.num), (yystack_[6].value.num), (yystack_[4].value.num), (yystack_[0].value.type) ); /* complex type: LIST */ } + break; + + case 30: // TSET: KARR '[' INDEX ':' INDEX ']' KOF OPTUNI TYPE + { (yylhs.value.type) = mktset ( (yystack_[8].value.num), (yystack_[6].value.num), (yystack_[4].value.num), (yystack_[0].value.type) ); /* complex type: ARRAY */ } + break; + + case 31: // TSET: KSET '[' INDEX ':' INDEX ']' KOF OPTUNI TYPE + { (yylhs.value.type) = mktset ( (yystack_[8].value.num), (yystack_[6].value.num), (yystack_[4].value.num), (yystack_[0].value.type) ); /* complex type: SET */ } + break; + + case 32: // TSET: KBAG '[' INDEX ':' INDEX ']' KOF OPTUNI TYPE + { (yylhs.value.type) = mktset ( (yystack_[8].value.num), (yystack_[6].value.num), (yystack_[4].value.num), (yystack_[0].value.type) ); /* complex type: BAG */ } + break; + + case 33: // INDEX: NUMBER + { (yylhs.value.num) = (yystack_[0].value.num); /* index for array, set, bag, list range */ } + break; + + case 34: // INDEX: '?' + { (yylhs.value.num) = -1; /* undefined */ } + break; + + case 35: // INDEX: NAME '(' NAME ')' + {(yylhs.value.num) = -1; printf ( "Warning at line %d: index function %s(%s) ignored\n", ec_curline(), (yystack_[3].value.str), (yystack_[1].value.str) ); /* some function.. */ } + break; + + case 36: // OPTUNI: %empty + { (yylhs.value.num) = 0; /* UNIQUE keyword for complex type definition */ } + break; + + case 37: // OPTUNI: KUNIQ + { (yylhs.value.num) = 1; } + break; + + case 38: // SUBT: %empty + { (yylhs.value.tlist) = NULL; /* no subtype clause */ } + break; + + case 39: // SUBT: KSUBT KOF TLIST1 + { (yylhs.value.tlist) = (yystack_[0].value.tlist); /* subtype clause */ } + break; + + case 40: // SUPERT: %empty + { (yylhs.value.num) = 0; /* no supertype clause */ } + break; + + case 41: // SUPERT: KSPRT + { (yylhs.value.num) = 0; /* supertype clause (ignored) */ } + break; + + case 42: // SUPERT: KSPRT KOF SUPLST + { (yylhs.value.num) = 0; /* supertype clause (ignored) */ } + break; + + case 43: // SUPLST: NAME + { (yylhs.value.num) = 0; /* simple list of supertypes */ } + break; + + case 44: // SUPLST: '(' SUPLST ')' + { (yylhs.value.num) = 0; /* allow bracketing */ } + break; + + case 45: // SUPLST: NAME ',' SUPLST + { (yylhs.value.num) = 0; /* ... */ } + break; + + case 46: // SUPLST: K1OF SUPLST + { (yylhs.value.num) = 0; /* ONEOF construct */ } + break; + + case 47: // SUPLST: SUPLST KANDOR SUPLST + { (yylhs.value.num) = 0; /* ANDOR construct */ } + break; + + case 48: // FLIST: FIELD + { (yylhs.value.flist) = mkflist ( (yystack_[0].value.field), 0 ); /* list of fields of ENTITY item */ } + break; + + case 49: // FLIST: FIELD FLIST + { (yylhs.value.flist) = mkflist ( (yystack_[1].value.field), (yystack_[0].value.flist) ); } + break; + + case 50: // FLIST: REDEF + { (yylhs.value.flist) = 0; /* redefinition of inherited field, just skip */ } + break; + + case 51: // FLIST: REDEF FLIST + { (yylhs.value.flist) = (yystack_[0].value.flist); /* ignore redefinition of inherited field, take trailing list */ } + break; + + case 52: // FLIST1: %empty + { (yylhs.value.flist) = NULL; /* empty list of fields */ } + break; + + case 53: // FLIST1: FLIST + { (yylhs.value.flist) = (yystack_[0].value.flist); /* or not empty.. just to fix reduce/reduce conflict */ } + break; + + case 54: // FIELD: NAME ':' OPTNL TYPE ';' + { (yylhs.value.field) = mkfield ( (yystack_[4].value.str), (yystack_[1].value.type), (yystack_[2].value.num) ); } + break; + + case 55: // REDEF: KSELF '\\' SPECIF ':' TYPE ';' + { (yylhs.value.num) = 0; printf ( "Warning at line %d: field redefinition ignored\n", ec_curline() ); /* redefinition of inherited field */ } + break; + + case 56: // SPECIF: NAME + { (yylhs.value.tlist) = mktlist ( (yystack_[0].value.str), 0 ); /* inherited field specification */ } + break; + + case 57: // SPECIF: NAME '.' SPECIF + { (yylhs.value.tlist) = mktlist ( (yystack_[2].value.str), (yystack_[0].value.tlist) ); } + break; + + case 58: // OPTNL: %empty + { (yylhs.value.num) = 0; } + break; + + case 59: // OPTNL: KOPT + { (yylhs.value.num) = 1; } + break; + + case 60: // UNIQIT: NAME ':' TLIST ';' + { (yylhs.value.tlist) = (yystack_[1].value.tlist); /* UNIQUE statement */ } + break; + + case 61: // UNIQIT: NAME ':' SPCLST ';' + { (yylhs.value.tlist) = NULL; /* UNIQUE statement */ } + break; + + case 62: // UNIQLS: UNIQIT + { (yylhs.value.tlist) = NULL; /* list of 1 UNIQUE statements */ } + break; + + case 63: // UNIQLS: UNIQIT UNIQLS + { (yylhs.value.tlist) = mktlists ( (yystack_[1].value.tlist), (yystack_[0].value.tlist) );/* list of UNIQUE statements */ } + break; + + case 64: // UNIQUE: %empty + { (yylhs.value.tlist) = NULL; /* no UNIQUE clause in ENTITY */ } + break; + + case 65: // UNIQUE: KUNIQ UNIQLS + { (yylhs.value.tlist) = (yystack_[0].value.tlist); /* UNIQUE clause in ENTITY */ } + break; + + case 66: // SPCLST: KSELF '\\' SPECIF + { (yylhs.value.num) = 0; /* list of specifications */ } + break; + + case 67: // SPCLST: KSELF '\\' SPECIF ',' SPCLST + { (yylhs.value.num) = 0; } + break; + + case 68: // SPCLST: NAME ',' SPCLST + { (yylhs.value.num) = 0; } + break; + + + + default: + break; + } + } +#if YY_EXCEPTIONS + catch (const syntax_error& yyexc) + { + YYCDEBUG << "Caught exception: " << yyexc.what() << '\n'; + error (yyexc); + YYERROR; + } +#endif // YY_EXCEPTIONS + YY_SYMBOL_PRINT ("-> $$ =", yylhs); + yypop_ (yylen); + yylen = 0; + + // Shift the result of the reduction. + yypush_ (YY_NULLPTR, YY_MOVE (yylhs)); + } + goto yynewstate; + + + /*--------------------------------------. + | yyerrlab -- here on detecting error. | + `--------------------------------------*/ + yyerrlab: + // If not already recovering from an error, report this error. + if (!yyerrstatus_) + { + ++yynerrs_; + std::string msg = YY_("syntax error"); + error (YY_MOVE (msg)); + } + + + if (yyerrstatus_ == 3) + { + /* If just tried and failed to reuse lookahead token after an + error, discard it. */ + + // Return failure if at end of input. + if (yyla.kind () == symbol_kind::S_YYEOF) + YYABORT; + else if (!yyla.empty ()) + { + yy_destroy_ ("Error: discarding", yyla); + yyla.clear (); + } + } + + // Else will try to reuse lookahead token after shifting the error token. + goto yyerrlab1; + + + /*---------------------------------------------------. + | yyerrorlab -- error raised explicitly by YYERROR. | + `---------------------------------------------------*/ + yyerrorlab: + /* Pacify compilers when the user code never invokes YYERROR and + the label yyerrorlab therefore never appears in user code. */ + if (false) + YYERROR; + + /* Do not reclaim the symbols of the rule whose action triggered + this YYERROR. */ + yypop_ (yylen); + yylen = 0; + YY_STACK_PRINT (); + goto yyerrlab1; + + + /*-------------------------------------------------------------. + | yyerrlab1 -- common code for both syntax error and YYERROR. | + `-------------------------------------------------------------*/ + yyerrlab1: + yyerrstatus_ = 3; // Each real token shifted decrements this. + // Pop stack until we find a state that shifts the error token. + for (;;) + { + yyn = yypact_[+yystack_[0].state]; + if (!yy_pact_value_is_default_ (yyn)) + { + yyn += symbol_kind::S_YYerror; + if (0 <= yyn && yyn <= yylast_ + && yycheck_[yyn] == symbol_kind::S_YYerror) + { + yyn = yytable_[yyn]; + if (0 < yyn) + break; + } + } + + // Pop the current state because it cannot handle the error token. + if (yystack_.size () == 1) + YYABORT; + + yy_destroy_ ("Error: popping", yystack_[0]); + yypop_ (); + YY_STACK_PRINT (); + } + { + stack_symbol_type error_token; + + + // Shift the error token. + error_token.state = state_type (yyn); + yypush_ ("Shifting", YY_MOVE (error_token)); + } + goto yynewstate; + + + /*-------------------------------------. + | yyacceptlab -- YYACCEPT comes here. | + `-------------------------------------*/ + yyacceptlab: + yyresult = 0; + goto yyreturn; + + + /*-----------------------------------. + | yyabortlab -- YYABORT comes here. | + `-----------------------------------*/ + yyabortlab: + yyresult = 1; + goto yyreturn; + + + /*-----------------------------------------------------. + | yyreturn -- parsing is finished, return the result. | + `-----------------------------------------------------*/ + yyreturn: + if (!yyla.empty ()) + yy_destroy_ ("Cleanup: discarding lookahead", yyla); + + /* Do not reclaim the symbols of the rule whose action triggered + this YYABORT or YYACCEPT. */ + yypop_ (yylen); + YY_STACK_PRINT (); + while (1 < yystack_.size ()) + { + yy_destroy_ ("Cleanup: popping", yystack_[0]); + yypop_ (); + } + + return yyresult; + } +#if YY_EXCEPTIONS + catch (...) + { + YYCDEBUG << "Exception caught: cleaning lookahead and stack\n"; + // Do not try to display the values of the reclaimed symbols, + // as their printers might throw an exception. + if (!yyla.empty ()) + yy_destroy_ (YY_NULLPTR, yyla); + + while (1 < yystack_.size ()) + { + yy_destroy_ (YY_NULLPTR, yystack_[0]); + yypop_ (); + } + throw; + } +#endif // YY_EXCEPTIONS + } + + void + parser::error (const syntax_error& yyexc) + { + error (yyexc.what ()); + } + +#if YYDEBUG || 0 + const char * + parser::symbol_name (symbol_kind_type yysymbol) + { + return yytname_[yysymbol]; + } +#endif // #if YYDEBUG || 0 + + + + + + const short parser::yypact_ninf_ = -134; + + const signed char parser::yytable_ninf_ = -1; + + const short + parser::yypact_[] = + { + 24, 3, 51, 5, -134, 73, 20, 34, 60, 70, + 73, -134, -134, -134, -134, -134, 42, 44, 47, 48, + -134, -1, 54, 68, 58, 49, -134, 49, 72, 50, + 52, 53, 55, -134, -134, -134, -134, -134, -134, -134, + 61, -134, -134, -134, 58, 38, 74, 62, 65, 64, + 66, 49, -8, -8, -8, -8, 88, 67, 38, 69, + 38, 71, 49, 12, 75, 57, -134, 99, 76, -134, + 77, -134, 78, 79, 80, 81, 82, 12, -134, 38, + 1, 38, -134, 63, 83, -134, 84, 12, 12, 65, + -134, 87, 100, 91, -8, -8, -8, -8, -134, 84, + -134, -134, -134, 92, 89, 93, 103, -134, -134, -134, + -134, 94, 90, 86, 95, 96, 97, 106, 98, 101, + -134, 43, 104, 93, -134, 105, -134, -134, 114, 115, + 116, 117, 108, 92, 43, 110, 26, -134, -134, 111, + 111, 111, 111, -134, -134, 112, -134, 107, 118, 113, + 119, -134, 43, 43, 43, 43, -134, 92, 26, -134, + -134, -134, -134, -134, -134, 121, -134, 41, 122, -134, + 41 + }; + + const signed char + parser::yydefact_[] = + { + 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, + 3, 5, 6, 7, 9, 8, 0, 40, 0, 0, + 4, 0, 40, 41, 38, 0, 2, 0, 0, 0, + 0, 0, 0, 23, 22, 24, 25, 26, 27, 28, + 0, 19, 20, 21, 38, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 43, + 0, 42, 0, 52, 16, 0, 15, 0, 0, 33, + 0, 34, 0, 0, 0, 0, 0, 52, 46, 0, + 0, 0, 39, 0, 0, 53, 64, 48, 50, 0, + 18, 0, 0, 0, 0, 0, 0, 0, 12, 64, + 45, 44, 47, 0, 58, 0, 0, 49, 51, 17, + 11, 0, 0, 0, 0, 0, 0, 0, 56, 0, + 59, 0, 0, 62, 65, 0, 10, 35, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 63, 13, 36, + 36, 36, 36, 14, 57, 0, 54, 0, 16, 0, + 0, 37, 0, 0, 0, 0, 55, 0, 0, 60, + 61, 29, 30, 32, 31, 66, 68, 0, 0, 67, + 0 + }; + + const short + parser::yypgoto_[] = + { + -134, -134, 125, -134, -134, -134, -134, -134, -134, -48, + -23, -105, -134, -134, -134, -52, -133, 120, 128, -26, + -64, 31, -134, -134, -127, -134, -134, -7, 18, -131 + }; + + const short + parser::yydefgoto_[] = + { + -1, 2, 9, 10, 11, 12, 13, 14, 15, 109, + 49, 40, 41, 42, 43, 72, 152, 47, 24, 61, + 85, 86, 87, 88, 119, 121, 123, 124, 106, 166 + }; + + const unsigned char + parser::yytable_[] = + { + 65, 73, 74, 75, 50, 150, 144, 153, 154, 155, + 27, 28, 29, 30, 31, 32, 135, 33, 34, 35, + 36, 37, 38, 107, 108, 69, 70, 1, 68, 145, + 165, 81, 78, 39, 80, 71, 169, 3, 83, 82, + 101, 5, 113, 114, 115, 116, 84, 161, 162, 163, + 164, 4, 147, 100, 16, 102, 29, 30, 31, 32, + 148, 33, 34, 35, 36, 37, 38, 147, 17, 58, + 18, 22, 59, 23, 19, 168, 60, 39, 6, 21, + 7, 25, 8, 23, 26, 45, 46, 48, 149, 51, + 52, 62, 53, 54, 76, 55, 90, 56, 63, 64, + 66, 81, 67, 77, 79, 91, 111, 103, 99, 105, + 89, 125, 92, 120, 132, 93, 137, 117, 98, 94, + 95, 96, 97, 110, 104, 112, 118, 122, 128, 127, + 126, 139, 140, 141, 142, 20, 151, 129, 130, 131, + 0, 138, 134, 133, 143, 136, 146, 0, 156, 159, + 44, 157, 0, 158, 0, 160, 167, 170, 0, 0, + 0, 0, 0, 0, 57 + }; + + const short + parser::yycheck_[] = + { + 48, 53, 54, 55, 27, 136, 133, 140, 141, 142, + 11, 12, 13, 14, 15, 16, 121, 18, 19, 20, + 21, 22, 23, 87, 88, 33, 34, 3, 51, 134, + 157, 30, 58, 34, 60, 43, 167, 34, 26, 62, + 39, 36, 94, 95, 96, 97, 34, 152, 153, 154, + 155, 0, 26, 79, 34, 81, 13, 14, 15, 16, + 34, 18, 19, 20, 21, 22, 23, 26, 34, 31, + 10, 27, 34, 29, 4, 34, 38, 34, 5, 37, + 7, 34, 9, 29, 36, 17, 28, 38, 136, 17, + 40, 17, 40, 40, 6, 40, 39, 36, 36, 34, + 36, 30, 36, 36, 35, 6, 6, 44, 77, 25, + 35, 8, 36, 24, 8, 38, 123, 99, 36, 41, + 41, 41, 41, 36, 41, 34, 34, 34, 42, 39, + 36, 17, 17, 17, 17, 10, 25, 42, 42, 42, + -1, 36, 41, 45, 36, 41, 36, -1, 36, 36, + 22, 44, -1, 35, -1, 36, 35, 35, -1, -1, + -1, -1, -1, -1, 44 + }; + + const signed char + parser::yystos_[] = + { + 0, 3, 47, 34, 0, 36, 5, 7, 9, 48, + 49, 50, 51, 52, 53, 54, 34, 34, 10, 4, + 48, 37, 27, 29, 64, 34, 36, 11, 12, 13, + 14, 15, 16, 18, 19, 20, 21, 22, 23, 34, + 57, 58, 59, 60, 64, 17, 28, 63, 38, 56, + 56, 17, 40, 40, 40, 40, 36, 63, 31, 34, + 38, 65, 17, 36, 34, 55, 36, 36, 56, 33, + 34, 43, 61, 61, 61, 61, 6, 36, 65, 35, + 65, 30, 56, 26, 34, 66, 67, 68, 69, 35, + 39, 6, 36, 38, 41, 41, 41, 41, 36, 67, + 65, 39, 65, 44, 41, 25, 74, 66, 66, 55, + 36, 6, 34, 61, 61, 61, 61, 74, 34, 70, + 24, 71, 34, 72, 73, 8, 36, 39, 42, 42, + 42, 42, 8, 45, 41, 57, 41, 73, 36, 17, + 17, 17, 17, 36, 70, 57, 36, 26, 34, 55, + 75, 25, 62, 62, 62, 62, 36, 44, 35, 36, + 36, 57, 57, 57, 57, 70, 75, 35, 34, 75, + 35 + }; + + const signed char + parser::yyr1_[] = + { + 0, 46, 47, 48, 48, 49, 49, 49, 49, 49, + 50, 51, 52, 53, 53, 54, 55, 55, 56, 57, + 57, 57, 58, 58, 58, 58, 58, 58, 59, 60, + 60, 60, 60, 61, 61, 61, 62, 62, 63, 63, + 64, 64, 64, 65, 65, 65, 65, 65, 66, 66, + 66, 66, 67, 67, 68, 69, 70, 70, 71, 71, + 72, 72, 73, 73, 74, 74, 75, 75, 75 + }; + + const signed char + parser::yyr2_[] = + { + 0, 2, 6, 1, 2, 1, 1, 1, 1, 1, + 9, 8, 7, 9, 10, 5, 1, 3, 3, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 9, + 9, 9, 9, 1, 1, 4, 0, 1, 0, 3, + 0, 1, 3, 1, 3, 3, 2, 3, 1, 2, + 1, 2, 0, 1, 5, 6, 1, 3, 0, 1, + 4, 4, 1, 2, 0, 2, 3, 5, 3 + }; + + +#if YYDEBUG + // 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\"", "error", "\"invalid token\"", "KSCHEM", "KENDS", + "KTYP", "KENDT", "KENT", "KENDE", "KREF", "KFROM", "KSEL", "KENUM", + "KLIST", "KARR", "KBAG", "KSET", "KOF", "KNUM", "KINT", "KDBL", "KSTR", + "KLOG", "KBOOL", "KOPT", "KUNIQ", "KSELF", "KABSTR", "KSUBT", "KSPRT", + "KANDOR", "K1OF", "KAND", "NUMBER", "NAME", "','", "';'", "'='", "'('", + "')'", "'['", "':'", "']'", "'?'", "'\\\\'", "'.'", "$accept", "SCHEMA", + "ILIST", "ITEM", "ENUM", "SELECT", "ALIAS", "ENTITY", "REFERENCE", + "TLIST", "TLIST1", "TYPE", "TSTD", "TNAME", "TSET", "INDEX", "OPTUNI", + "SUBT", "SUPERT", "SUPLST", "FLIST", "FLIST1", "FIELD", "REDEF", + "SPECIF", "OPTNL", "UNIQIT", "UNIQLS", "UNIQUE", "SPCLST", YY_NULLPTR + }; +#endif + + +#if YYDEBUG + const short + parser::yyrline_[] = + { + 0, 230, 230, 232, 233, 236, 237, 238, 239, 240, + 242, 244, 246, 248, 249, 252, 255, 256, 258, 261, + 262, 263, 265, 266, 267, 268, 269, 270, 272, 274, + 275, 276, 277, 279, 280, 281, 283, 284, 287, 288, + 290, 291, 292, 294, 295, 296, 297, 298, 301, 302, + 303, 304, 306, 307, 309, 311, 313, 314, 317, 318, + 321, 322, 324, 325, 327, 328, 330, 331, 332 + }; + + void + parser::yy_stack_print_ () const + { + *yycdebug_ << "Stack now"; + for (stack_type::const_iterator + i = yystack_.begin (), + i_end = yystack_.end (); + i != i_end; ++i) + *yycdebug_ << ' ' << int (i->state); + *yycdebug_ << '\n'; + } + + void + parser::yy_reduce_print_ (int yyrule) const + { + int yylno = yyrline_[yyrule]; + int yynrhs = yyr2_[yyrule]; + // Print the symbols being reduced, and their result. + *yycdebug_ << "Reducing stack by rule " << yyrule - 1 + << " (line " << yylno << "):\n"; + // The symbols being reduced. + for (int yyi = 0; yyi < yynrhs; yyi++) + YY_SYMBOL_PRINT (" $" << yyi + 1 << " =", + yystack_[(yynrhs) - (yyi + 1)]); + } +#endif // YYDEBUG + + parser::symbol_kind_type + parser::yytranslate_ (int t) + { + // YYTRANSLATE[TOKEN-NUM] -- Symbol number corresponding to + // TOKEN-NUM as returned by yylex. + static + const signed char + translate_table[] = + { + 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 38, 39, 2, 2, 35, 2, 45, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 41, 36, + 2, 37, 2, 43, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 40, 44, 42, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 1, 2, 3, 4, + 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, + 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, + 25, 26, 27, 28, 29, 30, 31, 32, 33, 34 + }; + // Last valid token kind. + const int code_max = 289; + + if (t <= 0) + return symbol_kind::S_YYEOF; + else if (t <= code_max) + return YY_CAST (symbol_kind_type, translate_table[t]); + else + return symbol_kind::S_YYUNDEF; + } + +} // exptocas + + + +/************************************************/ +/* FUNCTIONS FOR CREATING SCHEMA REPRESENTATION */ + +static Express_Schema *mkschema ( char *name, Express_HSequenceOfItem *ilist ) +{ + Express_Schema *sch = new Express_Schema ( name, ilist ); + Express::Schema() = sch; + return sch; +} + +static Express_HSequenceOfItem *mkilist ( Express_Item *item, Express_HSequenceOfItem *seq ) +{ + if ( ! seq ) { + seq = new Express_HSequenceOfItem; + seq->Append ( item ); + } + else seq->Prepend ( item ); + return seq; +} + +static Express_Item *mkenum ( char *name, TColStd_HSequenceOfHAsciiString *tlist ) +{ + return new Express_Enum ( name, tlist ); +} + +static Express_Item *mkselect ( char *name, TColStd_HSequenceOfHAsciiString *tlist ) +{ + return new Express_Select ( name, tlist ); +} + +static Express_Item *mkalias ( char *name, Express_Type *type ) +{ + return new Express_Alias ( name, type ); +} + +static Express_Item *mkentity ( char *name, TColStd_HSequenceOfHAsciiString *inherit, + Express_HSequenceOfField *field, int isabstract ) +{ + Express_Entity *ent = new Express_Entity ( name, inherit, field ); + if ( isabstract ) ent->SetAbstractFlag ( Standard_True ); + return ent; +} + +static Express_Reference *mkrefs ( char *name, TColStd_HSequenceOfHAsciiString *items) +{ + return new Express_Reference ( name, items ); +} + +static TColStd_HSequenceOfHAsciiString *mktlist ( char *name, TColStd_HSequenceOfHAsciiString *tlist ) +{ + Handle(TCollection_HAsciiString) str = new TCollection_HAsciiString ( name ); + if ( tlist ) tlist->Prepend ( str ); + else { + tlist = new TColStd_HSequenceOfHAsciiString; + tlist->Append ( str ); + } + return tlist; +} + +static TColStd_HSequenceOfHAsciiString *mktlists ( TColStd_HSequenceOfHAsciiString *tlist1, + TColStd_HSequenceOfHAsciiString *tlist2 ) +{ + if ( ! tlist1 ) return tlist2; + if ( ! tlist2 ) return tlist1; + for ( int i=1; i <= tlist2->Length(); i++ ) + tlist1->Append ( tlist2->Value(i) ); + return tlist1; +} + +static Express_Type *mktstd ( int keyword ) +{ + switch ( keyword ) { + case exptocas::parser::token::KINT : return new Express_Integer; + case exptocas::parser::token::KNUM : return new Express_Number; + case exptocas::parser::token::KDBL : return new Express_Real; + case exptocas::parser::token::KSTR : return new Express_String; + case exptocas::parser::token::KBOOL: return new Express_Boolean; + case exptocas::parser::token::KLOG : return new Express_Logical; + default : ec_error ( "Predefined type not treated!", "" ); + return NULL; + } +} + +static Express_Type *mktname ( char *name ) +{ + return new Express_NamedType ( name ); +} + +static Express_Type *mktset ( int keyword, int ilow, int ihigh, Express_Type *of ) +{ + switch ( keyword ) { + case exptocas::parser::token::KLIST: return new Express_List ( ilow, ihigh, of ); + case exptocas::parser::token::KARR : return new Express_Array ( ilow, ihigh, of ); + case exptocas::parser::token::KBAG : return new Express_Bag ( ilow, ihigh, of ); + case exptocas::parser::token::KSET : return new Express_Set ( ilow, ihigh, of ); + default : ec_error ( "Complex type not treated!", "" ); + return NULL; + } +} + +static Express_Field *mkfield ( char *name, Express_Type *type, int optional ) +{ + return new Express_Field ( name, type, optional ); +} + +static Express_HSequenceOfField *mkflist ( Express_Field *field, Express_HSequenceOfField *seq ) +{ + if ( seq ) seq->Prepend ( field ); + else { + seq = new Express_HSequenceOfField; + seq->Append ( field ); + } + return seq; +} + +/*******************************************************************/ +/* MAIN & co */ + +/* +void tlistfree ( struct tlist *list ) +{ + if ( ! list ) return; + tlistfree ( list->next ); + list->next = 0; + free ( list->str ); + list->str = 0; +} +* / + +int printtlist ( struct ec_tlist *tl ) +{ + int num=0; + while ( tl ) { + num++; + printf ( "%s\n", tl->name ); + tl = tl->next; + } + return num; +} + +int main ( void ) +{ + int num = 0; + yyparse(); + + printf ( "\nFinished\n" ); + if ( schema ) { + struct ec_item *it; + it = schema->items; + printf ( "\nSchema %s", schema->name ); + printf ( "\nItems:" ); + while ( it ) { + num++; + printf ( "\n%s", it->name ); + it = it->next; + } +// num = printtlist ( res ); + printf ( "\nTotal %d", num ); + } + +// tlistfree ( yylval.tlist ); + return num; +} +*/ + +void exptocas::parser::error(const std::string& s) +{ + printf("\nParse error at line %d: %s\n", scanner->lineno(), s.c_str()); +} + diff --git a/src/ExpToCasExe/exptocas.tab.hxx b/src/ExpToCasExe/exptocas.tab.hxx new file mode 100644 index 0000000000..039b4bb374 --- /dev/null +++ b/src/ExpToCasExe/exptocas.tab.hxx @@ -0,0 +1,910 @@ +// A Bison parser, made by GNU Bison 3.7.4. + +// Skeleton interface for Bison LALR(1) parsers in C++ + +// Copyright (C) 2002-2015, 2018-2020 Free Software Foundation, Inc. + +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . + +// As a special exception, you may create a larger work that contains +// part or all of the Bison parser skeleton and distribute that work +// under terms of your choice, so long as that work isn't itself a +// parser generator using the skeleton or a modified version thereof +// as a parser skeleton. Alternatively, if you modify or redistribute +// the parser skeleton itself, you may (at your option) remove this +// special exception, which will cause the skeleton and the resulting +// Bison output files to be licensed under the GNU General Public +// License without this special exception. + +// This special exception was added by the Free Software Foundation in +// version 2.2 of Bison. + + +/** + ** \file ExpToCasExe/exptocas.tab.hxx + ** Define the exptocas::parser class. + */ + +// C++ LALR(1) parser skeleton written by Akim Demaille. + +// DO NOT RELY ON FEATURES THAT ARE NOT DOCUMENTED in the manual, +// especially those whose name start with YY_ or yy_. They are +// private implementation details that can be changed or removed. + +#ifndef YY_EXPTOCAS_EXPTOCASEXE_EXPTOCAS_TAB_HXX_INCLUDED +# define YY_EXPTOCAS_EXPTOCASEXE_EXPTOCAS_TAB_HXX_INCLUDED +// "%code requires" blocks. + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +namespace exptocas { + class scanner; +}; +#ifdef _MSC_VER +// disable MSVC warning C4522: 'exptocas::parser::stack_symbol_type': multiple assignment operators +#pragma warning(disable: 4522) +#endif + + + +# include // std::abort +# include +# include +# include +# include + +#if defined __cplusplus +# define YY_CPLUSPLUS __cplusplus +#else +# define YY_CPLUSPLUS 199711L +#endif + +// Support move semantics when possible. +#if 201103L <= YY_CPLUSPLUS +# define YY_MOVE std::move +# define YY_MOVE_OR_COPY move +# define YY_MOVE_REF(Type) Type&& +# define YY_RVREF(Type) Type&& +# define YY_COPY(Type) Type +#else +# define YY_MOVE +# define YY_MOVE_OR_COPY copy +# define YY_MOVE_REF(Type) Type& +# define YY_RVREF(Type) const Type& +# define YY_COPY(Type) const Type& +#endif + +// Support noexcept when possible. +#if 201103L <= YY_CPLUSPLUS +# define YY_NOEXCEPT noexcept +# define YY_NOTHROW +#else +# define YY_NOEXCEPT +# define YY_NOTHROW throw () +#endif + +// Support constexpr when possible. +#if 201703 <= YY_CPLUSPLUS +# define YY_CONSTEXPR constexpr +#else +# define YY_CONSTEXPR +#endif + + + +#ifndef YY_ATTRIBUTE_PURE +# if defined __GNUC__ && 2 < __GNUC__ + (96 <= __GNUC_MINOR__) +# define YY_ATTRIBUTE_PURE __attribute__ ((__pure__)) +# else +# define YY_ATTRIBUTE_PURE +# endif +#endif + +#ifndef YY_ATTRIBUTE_UNUSED +# if defined __GNUC__ && 2 < __GNUC__ + (7 <= __GNUC_MINOR__) +# define YY_ATTRIBUTE_UNUSED __attribute__ ((__unused__)) +# else +# define YY_ATTRIBUTE_UNUSED +# endif +#endif + +/* Suppress unused-variable warnings by "using" E. */ +#if ! defined lint || defined __GNUC__ +# define YYUSE(E) ((void) (E)) +#else +# define YYUSE(E) /* empty */ +#endif + +#if defined __GNUC__ && ! defined __ICC && 407 <= __GNUC__ * 100 + __GNUC_MINOR__ +/* Suppress an incorrect diagnostic about yylval being uninitialized. */ +# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \ + _Pragma ("GCC diagnostic push") \ + _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"") \ + _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"") +# define YY_IGNORE_MAYBE_UNINITIALIZED_END \ + _Pragma ("GCC diagnostic pop") +#else +# define YY_INITIAL_VALUE(Value) Value +#endif +#ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN +# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN +# define YY_IGNORE_MAYBE_UNINITIALIZED_END +#endif +#ifndef YY_INITIAL_VALUE +# define YY_INITIAL_VALUE(Value) /* Nothing. */ +#endif + +#if defined __cplusplus && defined __GNUC__ && ! defined __ICC && 6 <= __GNUC__ +# define YY_IGNORE_USELESS_CAST_BEGIN \ + _Pragma ("GCC diagnostic push") \ + _Pragma ("GCC diagnostic ignored \"-Wuseless-cast\"") +# define YY_IGNORE_USELESS_CAST_END \ + _Pragma ("GCC diagnostic pop") +#endif +#ifndef YY_IGNORE_USELESS_CAST_BEGIN +# define YY_IGNORE_USELESS_CAST_BEGIN +# define YY_IGNORE_USELESS_CAST_END +#endif + +# ifndef YY_CAST +# ifdef __cplusplus +# define YY_CAST(Type, Val) static_cast (Val) +# define YY_REINTERPRET_CAST(Type, Val) reinterpret_cast (Val) +# else +# define YY_CAST(Type, Val) ((Type) (Val)) +# define YY_REINTERPRET_CAST(Type, Val) ((Type) (Val)) +# endif +# endif +# ifndef YY_NULLPTR +# if defined __cplusplus +# if 201103L <= __cplusplus +# define YY_NULLPTR nullptr +# else +# define YY_NULLPTR 0 +# endif +# else +# define YY_NULLPTR ((void*)0) +# endif +# endif + +/* Debug traces. */ +#ifndef YYDEBUG +# define YYDEBUG 0 +#endif + +namespace exptocas { + + + + + /// A Bison parser. + class parser + { + public: +#ifndef YYSTYPE + /// Symbol semantic values. + union semantic_type + { + + int num; + char *str; + TColStd_HSequenceOfHAsciiString *tlist; + Express_HSequenceOfField *flist; + Express_HSequenceOfItem *ilist; + Express_Field *field; + Express_Item *item; + Express_Type *type; + Express_Schema *schema; + Express_Reference *ref; + + + }; +#else + typedef YYSTYPE semantic_type; +#endif + + /// Syntax errors thrown from user actions. + struct syntax_error : std::runtime_error + { + syntax_error (const std::string& m) + : std::runtime_error (m) + {} + + syntax_error (const syntax_error& s) + : std::runtime_error (s.what ()) + {} + + ~syntax_error () YY_NOEXCEPT YY_NOTHROW; + }; + + /// Token kinds. + struct token + { + enum token_kind_type + { + YYEMPTY = -2, + YYEOF = 0, // "end of file" + YYerror = 256, // error + YYUNDEF = 257, // "invalid token" + KSCHEM = 258, // KSCHEM + KENDS = 259, // KENDS + KTYP = 260, // KTYP + KENDT = 261, // KENDT + KENT = 262, // KENT + KENDE = 263, // KENDE + KREF = 264, // KREF + KFROM = 265, // KFROM + KSEL = 266, // KSEL + KENUM = 267, // KENUM + KLIST = 268, // KLIST + KARR = 269, // KARR + KBAG = 270, // KBAG + KSET = 271, // KSET + KOF = 272, // KOF + KNUM = 273, // KNUM + KINT = 274, // KINT + KDBL = 275, // KDBL + KSTR = 276, // KSTR + KLOG = 277, // KLOG + KBOOL = 278, // KBOOL + KOPT = 279, // KOPT + KUNIQ = 280, // KUNIQ + KSELF = 281, // KSELF + KABSTR = 282, // KABSTR + KSUBT = 283, // KSUBT + KSPRT = 284, // KSPRT + KANDOR = 285, // KANDOR + K1OF = 286, // K1OF + KAND = 287, // KAND + NUMBER = 288, // NUMBER + NAME = 289 // NAME + }; + /// Backward compatibility alias (Bison 3.6). + typedef token_kind_type yytokentype; + }; + + /// Token kind, as returned by yylex. + typedef token::yytokentype token_kind_type; + + /// Backward compatibility alias (Bison 3.6). + typedef token_kind_type token_type; + + /// Symbol kinds. + struct symbol_kind + { + enum symbol_kind_type + { + YYNTOKENS = 46, ///< Number of tokens. + S_YYEMPTY = -2, + S_YYEOF = 0, // "end of file" + S_YYerror = 1, // error + S_YYUNDEF = 2, // "invalid token" + S_KSCHEM = 3, // KSCHEM + S_KENDS = 4, // KENDS + S_KTYP = 5, // KTYP + S_KENDT = 6, // KENDT + S_KENT = 7, // KENT + S_KENDE = 8, // KENDE + S_KREF = 9, // KREF + S_KFROM = 10, // KFROM + S_KSEL = 11, // KSEL + S_KENUM = 12, // KENUM + S_KLIST = 13, // KLIST + S_KARR = 14, // KARR + S_KBAG = 15, // KBAG + S_KSET = 16, // KSET + S_KOF = 17, // KOF + S_KNUM = 18, // KNUM + S_KINT = 19, // KINT + S_KDBL = 20, // KDBL + S_KSTR = 21, // KSTR + S_KLOG = 22, // KLOG + S_KBOOL = 23, // KBOOL + S_KOPT = 24, // KOPT + S_KUNIQ = 25, // KUNIQ + S_KSELF = 26, // KSELF + S_KABSTR = 27, // KABSTR + S_KSUBT = 28, // KSUBT + S_KSPRT = 29, // KSPRT + S_KANDOR = 30, // KANDOR + S_K1OF = 31, // K1OF + S_KAND = 32, // KAND + S_NUMBER = 33, // NUMBER + S_NAME = 34, // NAME + S_35_ = 35, // ',' + S_36_ = 36, // ';' + S_37_ = 37, // '=' + S_38_ = 38, // '(' + S_39_ = 39, // ')' + S_40_ = 40, // '[' + S_41_ = 41, // ':' + S_42_ = 42, // ']' + S_43_ = 43, // '?' + S_44_ = 44, // '\\' + S_45_ = 45, // '.' + S_YYACCEPT = 46, // $accept + S_SCHEMA = 47, // SCHEMA + S_ILIST = 48, // ILIST + S_ITEM = 49, // ITEM + S_ENUM = 50, // ENUM + S_SELECT = 51, // SELECT + S_ALIAS = 52, // ALIAS + S_ENTITY = 53, // ENTITY + S_REFERENCE = 54, // REFERENCE + S_TLIST = 55, // TLIST + S_TLIST1 = 56, // TLIST1 + S_TYPE = 57, // TYPE + S_TSTD = 58, // TSTD + S_TNAME = 59, // TNAME + S_TSET = 60, // TSET + S_INDEX = 61, // INDEX + S_OPTUNI = 62, // OPTUNI + S_SUBT = 63, // SUBT + S_SUPERT = 64, // SUPERT + S_SUPLST = 65, // SUPLST + S_FLIST = 66, // FLIST + S_FLIST1 = 67, // FLIST1 + S_FIELD = 68, // FIELD + S_REDEF = 69, // REDEF + S_SPECIF = 70, // SPECIF + S_OPTNL = 71, // OPTNL + S_UNIQIT = 72, // UNIQIT + S_UNIQLS = 73, // UNIQLS + S_UNIQUE = 74, // UNIQUE + S_SPCLST = 75 // SPCLST + }; + }; + + /// (Internal) symbol kind. + typedef symbol_kind::symbol_kind_type symbol_kind_type; + + /// The number of tokens. + static const symbol_kind_type YYNTOKENS = symbol_kind::YYNTOKENS; + + /// A complete symbol. + /// + /// Expects its Base type to provide access to the symbol kind + /// via kind (). + /// + /// Provide access to semantic value. + template + struct basic_symbol : Base + { + /// Alias to Base. + typedef Base super_type; + + /// Default constructor. + basic_symbol () + : value () + {} + +#if 201103L <= YY_CPLUSPLUS + /// Move constructor. + basic_symbol (basic_symbol&& that) + : Base (std::move (that)) + , value (std::move (that.value)) + {} +#endif + + /// Copy constructor. + basic_symbol (const basic_symbol& that); + /// Constructor for valueless symbols. + basic_symbol (typename Base::kind_type t); + + /// Constructor for symbols with semantic value. + basic_symbol (typename Base::kind_type t, + YY_RVREF (semantic_type) v); + + /// Destroy the symbol. + ~basic_symbol () + { + clear (); + } + + /// Destroy contents, and record that is empty. + void clear () + { + Base::clear (); + } + +#if YYDEBUG || 0 + /// The user-facing name of this symbol. + const char *name () const YY_NOEXCEPT + { + return parser::symbol_name (this->kind ()); + } +#endif // #if YYDEBUG || 0 + + + /// Backward compatibility (Bison 3.6). + symbol_kind_type type_get () const YY_NOEXCEPT; + + /// Whether empty. + bool empty () const YY_NOEXCEPT; + + /// Destructive move, \a s is emptied into this. + void move (basic_symbol& s); + + /// The semantic value. + semantic_type value; + + private: +#if YY_CPLUSPLUS < 201103L + /// Assignment operator. + basic_symbol& operator= (const basic_symbol& that); +#endif + }; + + /// Type access provider for token (enum) based symbols. + struct by_kind + { + /// Default constructor. + by_kind (); + +#if 201103L <= YY_CPLUSPLUS + /// Move constructor. + by_kind (by_kind&& that); +#endif + + /// Copy constructor. + by_kind (const by_kind& that); + + /// The symbol kind as needed by the constructor. + typedef token_kind_type kind_type; + + /// Constructor from (external) token numbers. + by_kind (kind_type t); + + /// Record that this symbol is empty. + void clear (); + + /// Steal the symbol kind from \a that. + void move (by_kind& that); + + /// The (internal) type number (corresponding to \a type). + /// \a empty when empty. + symbol_kind_type kind () const YY_NOEXCEPT; + + /// Backward compatibility (Bison 3.6). + symbol_kind_type type_get () const YY_NOEXCEPT; + + /// The symbol kind. + /// \a S_YYEMPTY when empty. + symbol_kind_type kind_; + }; + + /// Backward compatibility for a private implementation detail (Bison 3.6). + typedef by_kind by_type; + + /// "External" symbols: returned by the scanner. + struct symbol_type : basic_symbol + {}; + + /// Build a parser object. + parser (exptocas::scanner* scanner_yyarg); + virtual ~parser (); + +#if 201103L <= YY_CPLUSPLUS + /// Non copyable. + parser (const parser&) = delete; + /// Non copyable. + parser& operator= (const parser&) = delete; +#endif + + /// Parse. An alias for parse (). + /// \returns 0 iff parsing succeeded. + int operator() (); + + /// Parse. + /// \returns 0 iff parsing succeeded. + virtual int parse (); + +#if YYDEBUG + /// The current debugging stream. + std::ostream& debug_stream () const YY_ATTRIBUTE_PURE; + /// Set the current debugging stream. + void set_debug_stream (std::ostream &); + + /// Type for debugging levels. + typedef int debug_level_type; + /// The current debugging level. + debug_level_type debug_level () const YY_ATTRIBUTE_PURE; + /// Set the current debugging level. + void set_debug_level (debug_level_type l); +#endif + + /// Report a syntax error. + /// \param msg a description of the syntax error. + virtual void error (const std::string& msg); + + /// Report a syntax error. + void error (const syntax_error& err); + +#if YYDEBUG || 0 + /// The user-facing name of the symbol whose (internal) number is + /// YYSYMBOL. No bounds checking. + static const char *symbol_name (symbol_kind_type yysymbol); +#endif // #if YYDEBUG || 0 + + + + + private: +#if YY_CPLUSPLUS < 201103L + /// Non copyable. + parser (const parser&); + /// Non copyable. + parser& operator= (const parser&); +#endif + + + /// Stored state numbers (used for stacks). + typedef unsigned char state_type; + + /// Compute post-reduction state. + /// \param yystate the current state + /// \param yysym the nonterminal to push on the stack + static state_type yy_lr_goto_state_ (state_type yystate, int yysym); + + /// Whether the given \c yypact_ value indicates a defaulted state. + /// \param yyvalue the value to check + static bool yy_pact_value_is_default_ (int yyvalue); + + /// Whether the given \c yytable_ value indicates a syntax error. + /// \param yyvalue the value to check + static bool yy_table_value_is_error_ (int yyvalue); + + static const short yypact_ninf_; + static const signed char yytable_ninf_; + + /// Convert a scanner token kind \a t to a symbol kind. + /// In theory \a t should be a token_kind_type, but character literals + /// are valid, yet not members of the token_type enum. + static symbol_kind_type yytranslate_ (int t); + +#if YYDEBUG || 0 + /// For a symbol, its name in clear. + static const char* const yytname_[]; +#endif // #if YYDEBUG || 0 + + + // Tables. + // YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing + // STATE-NUM. + static const short yypact_[]; + + // YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM. + // Performed when YYTABLE does not specify something else to do. Zero + // means the default is an error. + static const signed char yydefact_[]; + + // YYPGOTO[NTERM-NUM]. + static const short yypgoto_[]; + + // YYDEFGOTO[NTERM-NUM]. + static const short yydefgoto_[]; + + // YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If + // positive, shift that token. If negative, reduce the rule whose + // number is the opposite. If YYTABLE_NINF, syntax error. + static const unsigned char yytable_[]; + + static const short yycheck_[]; + + // YYSTOS[STATE-NUM] -- The (internal number of the) accessing + // symbol of state STATE-NUM. + static const signed char yystos_[]; + + // YYR1[YYN] -- Symbol number of symbol that rule YYN derives. + static const signed char yyr1_[]; + + // YYR2[YYN] -- Number of symbols on the right hand side of rule YYN. + static const signed char yyr2_[]; + + +#if YYDEBUG + // YYRLINE[YYN] -- Source line where rule number YYN was defined. + static const short yyrline_[]; + /// Report on the debug stream that the rule \a r is going to be reduced. + virtual void yy_reduce_print_ (int r) const; + /// Print the state stack on the debug stream. + virtual void yy_stack_print_ () const; + + /// Debugging level. + int yydebug_; + /// Debug stream. + std::ostream* yycdebug_; + + /// \brief Display a symbol kind, value and location. + /// \param yyo The output stream. + /// \param yysym The symbol. + template + void yy_print_ (std::ostream& yyo, const basic_symbol& yysym) const; +#endif + + /// \brief Reclaim the memory associated to a symbol. + /// \param yymsg Why this token is reclaimed. + /// If null, print nothing. + /// \param yysym The symbol. + template + void yy_destroy_ (const char* yymsg, basic_symbol& yysym) const; + + private: + /// Type access provider for state based symbols. + struct by_state + { + /// Default constructor. + by_state () YY_NOEXCEPT; + + /// The symbol kind as needed by the constructor. + typedef state_type kind_type; + + /// Constructor. + by_state (kind_type s) YY_NOEXCEPT; + + /// Copy constructor. + by_state (const by_state& that) YY_NOEXCEPT; + + /// Record that this symbol is empty. + void clear () YY_NOEXCEPT; + + /// Steal the symbol kind from \a that. + void move (by_state& that); + + /// The symbol kind (corresponding to \a state). + /// \a symbol_kind::S_YYEMPTY when empty. + symbol_kind_type kind () const YY_NOEXCEPT; + + /// The state number used to denote an empty symbol. + /// We use the initial state, as it does not have a value. + enum { empty_state = 0 }; + + /// The state. + /// \a empty when empty. + state_type state; + }; + + /// "Internal" symbol: element of the stack. + struct stack_symbol_type : basic_symbol + { + /// Superclass. + typedef basic_symbol super_type; + /// Construct an empty symbol. + stack_symbol_type (); + /// Move or copy construction. + stack_symbol_type (YY_RVREF (stack_symbol_type) that); + /// Steal the contents from \a sym to build this. + stack_symbol_type (state_type s, YY_MOVE_REF (symbol_type) sym); +#if YY_CPLUSPLUS < 201103L + /// Assignment, needed by push_back by some old implementations. + /// Moves the contents of that. + stack_symbol_type& operator= (stack_symbol_type& that); + + /// Assignment, needed by push_back by other implementations. + /// Needed by some other old implementations. + stack_symbol_type& operator= (const stack_symbol_type& that); +#endif + }; + + /// A stack with random access from its top. + template > + class stack + { + public: + // Hide our reversed order. + typedef typename S::iterator iterator; + typedef typename S::const_iterator const_iterator; + typedef typename S::size_type size_type; + typedef typename std::ptrdiff_t index_type; + + stack (size_type n = 200) + : seq_ (n) + {} + +#if 201103L <= YY_CPLUSPLUS + /// Non copyable. + stack (const stack&) = delete; + /// Non copyable. + stack& operator= (const stack&) = delete; +#endif + + /// Random access. + /// + /// Index 0 returns the topmost element. + const T& + operator[] (index_type i) const + { + return seq_[size_type (size () - 1 - i)]; + } + + /// Random access. + /// + /// Index 0 returns the topmost element. + T& + operator[] (index_type i) + { + return seq_[size_type (size () - 1 - i)]; + } + + /// Steal the contents of \a t. + /// + /// Close to move-semantics. + void + push (YY_MOVE_REF (T) t) + { + seq_.push_back (T ()); + operator[] (0).move (t); + } + + /// Pop elements from the stack. + void + pop (std::ptrdiff_t n = 1) YY_NOEXCEPT + { + for (; 0 < n; --n) + seq_.pop_back (); + } + + /// Pop all elements from the stack. + void + clear () YY_NOEXCEPT + { + seq_.clear (); + } + + /// Number of elements on the stack. + index_type + size () const YY_NOEXCEPT + { + return index_type (seq_.size ()); + } + + /// Iterator on top of the stack (going downwards). + const_iterator + begin () const YY_NOEXCEPT + { + return seq_.begin (); + } + + /// Bottom of the stack. + const_iterator + end () const YY_NOEXCEPT + { + return seq_.end (); + } + + /// Present a slice of the top of a stack. + class slice + { + public: + slice (const stack& stack, index_type range) + : stack_ (stack) + , range_ (range) + {} + + const T& + operator[] (index_type i) const + { + return stack_[range_ - i]; + } + + private: + const stack& stack_; + index_type range_; + }; + + private: +#if YY_CPLUSPLUS < 201103L + /// Non copyable. + stack (const stack&); + /// Non copyable. + stack& operator= (const stack&); +#endif + /// The wrapped container. + S seq_; + }; + + + /// Stack type. + typedef stack stack_type; + + /// The stack. + stack_type yystack_; + + /// Push a new state on the stack. + /// \param m a debug message to display + /// if null, no trace is output. + /// \param sym the symbol + /// \warning the contents of \a s.value is stolen. + void yypush_ (const char* m, YY_MOVE_REF (stack_symbol_type) sym); + + /// Push a new look ahead token on the state on the stack. + /// \param m a debug message to display + /// if null, no trace is output. + /// \param s the state + /// \param sym the symbol (for its value and location). + /// \warning the contents of \a sym.value is stolen. + void yypush_ (const char* m, state_type s, YY_MOVE_REF (symbol_type) sym); + + /// Pop \a n symbols from the stack. + void yypop_ (int n = 1); + + /// Constants. + enum + { + yylast_ = 164, ///< Last index in yytable_. + yynnts_ = 30, ///< Number of nonterminal symbols. + yyfinal_ = 4 ///< Termination state number. + }; + + + // User arguments. + exptocas::scanner* scanner; + + }; + + +} // exptocas + + +// "%code provides" blocks. + +#if !defined(yyFlexLexer) && !defined(FlexLexerOnce) +#define yyFlexLexer exptocasFlexLexer +#include "FlexLexer.h" +#endif +namespace exptocas { + // To feed data back to bison, the yylex method needs yylval and + // yylloc parameters. Since the exptocasFlexLexer class is defined in the + // system header the signature of its yylex() method + // can not be changed anymore. This makes it necessary to derive a + // scanner class that provides a method with the desired signature: + class scanner : public exptocasFlexLexer + { + public: + explicit scanner(std::istream* in = 0, std::ostream* out = 0); + + int lex(exptocas::parser::semantic_type* yylval); + }; +}; + + + +#endif // !YY_EXPTOCAS_EXPTOCASEXE_EXPTOCAS_TAB_HXX_INCLUDED diff --git a/src/ExpToCasExe/exptocas.yacc b/src/ExpToCasExe/exptocas.yacc new file mode 100644 index 0000000000..1f703d6072 --- /dev/null +++ b/src/ExpToCasExe/exptocas.yacc @@ -0,0 +1,506 @@ +/* + Copyright (c) 1999-2022 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. +*/ + +%code top { + // Created: Thu Oct 28 12:21:16 1999 + // Author: Andrey BETENEV + // Copyright (c) 1999-2020 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. + + /***************************************************************************** + + This YACC parser implements parsing algorithm for EXPRESS -> CASCADE/XSTEP + classes generator + + Input in the form of tokens is obtained from lexical analyser. Then, data + structure representing schema is created on the basis of grammar analysis. + + NOTE: The grammar currently implemented is not full. + FUNCTION, RULE and CONSTANT items, WHERE, INVERSE and DERIVE clauses + of TYPE and ENTITY items are not considered (ignored on the level of lexical + scanner). + SUPERTYPE and UNIQUE clauses of ENTITY item are recognized but ignored. + Also, complex constructs such as using call to function in dimensions of + complex time or redefinition of inherited field are ignored. + + *****************************************************************************/ +} + +%language "C++" +%require "3.2" +%parse-param {exptocas::scanner* scanner} + +%code requires { +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +namespace exptocas { + class scanner; +}; +#ifdef _MSC_VER +// disable MSVC warning C4522: 'exptocas::parser::stack_symbol_type': multiple assignment operators +#pragma warning(disable: 4522) +#endif +} + +%code { +#undef yylex +#define yylex scanner->lex +// disable MSVC warnings in bison code +#ifdef _MSC_VER +#pragma warning(disable:4244 4800) +#endif + +/************************************************/ +/* ERROR MESSAGE FUNCTION */ + +/* external functions (from exptocas.l) */ +int ec_error ( const std::string& s, const std::string& text ); +int ec_curline ( void ); + +//int yyerror ( char *s ) +//{ +// printf ( "\nParse error at line %d: %s\n", ec_curline(), s ); +// return 0; +//} + +/************************************************/ +/* FUNCTIONS FOR CREATING SCHEMA REPRESENTATION */ + +static Express_Schema *mkschema ( char *name, Express_HSequenceOfItem *ilist ); +static Express_HSequenceOfItem *mkilist ( Express_Item *item, Express_HSequenceOfItem *seq ); +static Express_Item *mkenum ( char *name, TColStd_HSequenceOfHAsciiString *tlist ); +static Express_Item *mkselect ( char *name, TColStd_HSequenceOfHAsciiString *tlist ); +static Express_Item *mkalias ( char *name, Express_Type *type ); +static Express_Item *mkentity ( char *name, TColStd_HSequenceOfHAsciiString *inherit, + Express_HSequenceOfField *field, int isabstract ); +static Express_Reference *mkrefs ( char *name, TColStd_HSequenceOfHAsciiString *items); +static TColStd_HSequenceOfHAsciiString *mktlist ( char *name, TColStd_HSequenceOfHAsciiString *tlist ); +static TColStd_HSequenceOfHAsciiString *mktlists ( TColStd_HSequenceOfHAsciiString *tlist1, TColStd_HSequenceOfHAsciiString *tlist2 ); +static Express_Type *mktstd ( int keyword ); +static Express_Type *mktname ( char *name ); +static Express_Type *mktset ( int keyword, int ilow, int ihigh, Express_Type *of ); +static Express_Field *mkfield ( char *name, Express_Type *type, int optional ); +static Express_HSequenceOfField *mkflist ( Express_Field *field, Express_HSequenceOfField *seq ); +} + +%code provides { +#if !defined(yyFlexLexer) && !defined(FlexLexerOnce) +#define yyFlexLexer exptocasFlexLexer +#include "FlexLexer.h" +#endif +namespace exptocas { + // To feed data back to bison, the yylex method needs yylval and + // yylloc parameters. Since the exptocasFlexLexer class is defined in the + // system header the signature of its yylex() method + // can not be changed anymore. This makes it necessary to derive a + // scanner class that provides a method with the desired signature: + class scanner : public exptocasFlexLexer + { + public: + explicit scanner(std::istream* in = 0, std::ostream* out = 0); + + int lex(exptocas::parser::semantic_type* yylval); + }; +}; +} + +/* Definition of possible types of expressions */ +%union { + int num; + char *str; + TColStd_HSequenceOfHAsciiString *tlist; + Express_HSequenceOfField *flist; + Express_HSequenceOfItem *ilist; + Express_Field *field; + Express_Item *item; + Express_Type *type; + Express_Schema *schema; + Express_Reference *ref; +} + +/* Definition of keywords */ + +%token KSCHEM /* SCHEMA keyword */ +%token KENDS /* END_SCHEMA keyword */ +%token KTYP /* TYPE keyword */ +%token KENDT /* END_TYPE keyword */ +%token KENT /* ENTITY keyword */ +%token KENDE /* END_ENTITY keyword */ +%token KREF /* REFERENCE keyword */ +%token KFROM /* FROM keyword */ + +%token KSEL /* SELECT keyword */ +%token KENUM /* ENUMERATION keyword */ +%token KLIST /* LIST keyword */ +%token KARR /* ARRAY keyword */ +%token KBAG /* BAG keyword */ +%token KSET /* SET keyword */ +%token KOF /* OF keyword */ + +%token KNUM /* NUMBER keyword */ +%token KINT /* INTEGER keyword */ +%token KDBL /* REAL keyword */ +%token KSTR /* STRING keyword */ +%token KLOG /* LOGICAL keyword */ +%token KBOOL /* BOOLEAN keyword */ + +%token KOPT /* OPTIONAL keyword */ +%token KUNIQ /* UNIQUE keyword */ +%token KSELF /* SELF keyword */ + +%token KABSTR /* ABSTRACT keyword */ +%token KSUBT /* SUBTYPE keyword */ +%token KSPRT /* SUPERTYPE keyword */ +%left KANDOR /* ANDOR keyword (%left is for eliminating shift/reduce conflict on SUPLST) */ +%left K1OF /* ONEOF keyword */ +%token KAND /* AND keyword */ + +%token NUMBER /* integer value */ +%token NAME /* name of type or entity */ + +%left ',' /* to eliminate shift/reduce conflict in SUPERTYPE */ + + /* Definition of expressions and their types */ + +%type INDEX OPTNL OPTUNI SUPERT SUPLST REDEF SPCLST +%type TLIST TLIST1 UNIQIT UNIQLS UNIQUE SUBT SPECIF +%type TYPE TSTD TNAME TSET +%type ENUM SELECT ALIAS ENTITY ITEM +%type ILIST +%type FIELD +%type FLIST FLIST1 +%type SCHEMA +%type REFERENCE + +%% + + /************************************************/ + /* Definition of parsing rules (expressions) */ + /************************************************/ + +SCHEMA: KSCHEM NAME ';' ILIST KENDS ';' { $$ = mkschema ( $2, $4 ); /* Root: EXPRESS schema */ } + ; +ILIST : ITEM { $$ = mkilist ( $1, 0 ); /* list of items for schema */ } + | ITEM ILIST { $$ = mkilist ( $1, $2 ); } + ; + +ITEM : ENUM + | SELECT + | ALIAS + | REFERENCE + | ENTITY { $$ = $1; /* item of schema (type definition) */ } + ; +ENUM : KTYP NAME '=' KENUM KOF TLIST1 ';' KENDT ';' { $$ = mkenum ( $2, $6 ); /* TYPE ENUMERATION definition */ } + ; +SELECT: KTYP NAME '=' KSEL TLIST1 ';' KENDT ';' { $$ = mkselect ( $2, $5 ); /* TYPE SELECT definition */ } + ; +ALIAS : KTYP NAME '=' TYPE ';' KENDT ';' { $$ = mkalias ( $2, $4 ); /* TYPE '=' definition (alias) */ } + ; +ENTITY: KENT NAME SUPERT SUBT ';' FLIST1 UNIQUE KENDE ';' { $$ = mkentity ( $2, $4, $6, 0 ); /* ENTITY definition */ } + | KENT NAME KABSTR SUPERT SUBT ';' FLIST1 UNIQUE KENDE ';' { $$ = mkentity ( $2, $5, $7, 1 ); /* ENTITY definition */ } + ; + +REFERENCE: KREF KFROM NAME TLIST1 ';' { $$ = mkrefs ( $3, $4 ); /* REFERENCE FROM definition */ } + ; + +TLIST : NAME { $$ = mktlist ( $1, 0 ); /* list of (type) names */ } + | NAME ',' TLIST { $$ = mktlist ( $1, $3 ); } + ; +TLIST1: '(' TLIST ')' { $$ = $2; /* TLIST in brackets */ } + ; + +TYPE : TSTD + | TNAME + | TSET { $$ = $1; /* type, simple or complex */ } + ; +TSTD : KINT { $$ = mktstd ( $1 ); /* predefined type: INTEGER */ } + | KNUM { $$ = mktstd ( $1 ); /* predefined type: NUMBER */ } + | KDBL { $$ = mktstd ( $1 ); /* predefined type: REAL */ } + | KSTR { $$ = mktstd ( $1 ); /* predefined type: STRING */ } + | KLOG { $$ = mktstd ( $1 ); /* predefined type: LOGICAL */ } + | KBOOL { $$ = mktstd ( $1 ); /* predefined type: BOOLEAN */ } + ; +TNAME : NAME { $$ = mktname ( $1 ); /* named type */ } + ; +TSET : KLIST '[' INDEX ':' INDEX ']' KOF OPTUNI TYPE { $$ = mktset ( $1, $3, $5, $9 ); /* complex type: LIST */ } + | KARR '[' INDEX ':' INDEX ']' KOF OPTUNI TYPE { $$ = mktset ( $1, $3, $5, $9 ); /* complex type: ARRAY */ } + | KSET '[' INDEX ':' INDEX ']' KOF OPTUNI TYPE { $$ = mktset ( $1, $3, $5, $9 ); /* complex type: SET */ } + | KBAG '[' INDEX ':' INDEX ']' KOF OPTUNI TYPE { $$ = mktset ( $1, $3, $5, $9 ); /* complex type: BAG */ } + ; +INDEX : NUMBER { $$ = $1; /* index for array, set, bag, list range */ } + | '?' { $$ = -1; /* undefined */ } + | NAME '(' NAME ')' {$$ = -1; printf ( "Warning at line %d: index function %s(%s) ignored\n", ec_curline(), $1, $3 ); /* some function.. */ } + ; +OPTUNI: /* empty */ { $$ = 0; /* UNIQUE keyword for complex type definition */ } + | KUNIQ { $$ = 1; } + ; + +SUBT : /* empty */ { $$ = NULL; /* no subtype clause */ } + | KSUBT KOF TLIST1 { $$ = $3; /* subtype clause */ } + ; +SUPERT: /* empty */ { $$ = 0; /* no supertype clause */ } + | KSPRT { $$ = 0; /* supertype clause (ignored) */ } + | KSPRT KOF SUPLST { $$ = 0; /* supertype clause (ignored) */ } + ; +SUPLST: NAME { $$ = 0; /* simple list of supertypes */ } + | '(' SUPLST ')' { $$ = 0; /* allow bracketing */ } + | NAME ',' SUPLST { $$ = 0; /* ... */ } + | K1OF SUPLST { $$ = 0; /* ONEOF construct */ } + | SUPLST KANDOR SUPLST { $$ = 0; /* ANDOR construct */ } + ; + +FLIST : FIELD { $$ = mkflist ( $1, 0 ); /* list of fields of ENTITY item */ } + | FIELD FLIST { $$ = mkflist ( $1, $2 ); } + | REDEF { $$ = 0; /* redefinition of inherited field, just skip */ } + | REDEF FLIST { $$ = $2; /* ignore redefinition of inherited field, take trailing list */ } + ; +FLIST1: /* empty */ { $$ = NULL; /* empty list of fields */ } + | FLIST { $$ = $1; /* or not empty.. just to fix reduce/reduce conflict */ } + ; +FIELD : NAME ':' OPTNL TYPE ';' { $$ = mkfield ( $1, $4, $3 ); } + ; +REDEF : KSELF '\\' SPECIF ':' TYPE ';' { $$ = 0; printf ( "Warning at line %d: field redefinition ignored\n", ec_curline() ); /* redefinition of inherited field */ } + ; +SPECIF: NAME { $$ = mktlist ( $1, 0 ); /* inherited field specification */ } + | NAME '.' SPECIF { $$ = mktlist ( $1, $3 ); } + ; + +OPTNL : /* empty */ { $$ = 0; } + | KOPT { $$ = 1; } + ; + +UNIQIT: NAME ':' TLIST ';' { $$ = $3; /* UNIQUE statement */ } + | NAME ':' SPCLST ';' { $$ = NULL; /* UNIQUE statement */ } + ; +UNIQLS: UNIQIT { $$ = NULL; /* list of 1 UNIQUE statements */ } + | UNIQIT UNIQLS { $$ = mktlists ( $1, $2 );/* list of UNIQUE statements */ } + ; +UNIQUE: /* empty */ { $$ = NULL; /* no UNIQUE clause in ENTITY */ } + | KUNIQ UNIQLS { $$ = $2; /* UNIQUE clause in ENTITY */ } + ; +SPCLST: KSELF '\\' SPECIF { $$ = 0; /* list of specifications */ } + | KSELF '\\' SPECIF ',' SPCLST { $$ = 0; } + | NAME ',' SPCLST { $$ = 0; } + ; + +%% + +/************************************************/ +/* FUNCTIONS FOR CREATING SCHEMA REPRESENTATION */ + +static Express_Schema *mkschema ( char *name, Express_HSequenceOfItem *ilist ) +{ + Express_Schema *sch = new Express_Schema ( name, ilist ); + Express::Schema() = sch; + return sch; +} + +static Express_HSequenceOfItem *mkilist ( Express_Item *item, Express_HSequenceOfItem *seq ) +{ + if ( ! seq ) { + seq = new Express_HSequenceOfItem; + seq->Append ( item ); + } + else seq->Prepend ( item ); + return seq; +} + +static Express_Item *mkenum ( char *name, TColStd_HSequenceOfHAsciiString *tlist ) +{ + return new Express_Enum ( name, tlist ); +} + +static Express_Item *mkselect ( char *name, TColStd_HSequenceOfHAsciiString *tlist ) +{ + return new Express_Select ( name, tlist ); +} + +static Express_Item *mkalias ( char *name, Express_Type *type ) +{ + return new Express_Alias ( name, type ); +} + +static Express_Item *mkentity ( char *name, TColStd_HSequenceOfHAsciiString *inherit, + Express_HSequenceOfField *field, int isabstract ) +{ + Express_Entity *ent = new Express_Entity ( name, inherit, field ); + if ( isabstract ) ent->SetAbstractFlag ( Standard_True ); + return ent; +} + +static Express_Reference *mkrefs ( char *name, TColStd_HSequenceOfHAsciiString *items) +{ + return new Express_Reference ( name, items ); +} + +static TColStd_HSequenceOfHAsciiString *mktlist ( char *name, TColStd_HSequenceOfHAsciiString *tlist ) +{ + Handle(TCollection_HAsciiString) str = new TCollection_HAsciiString ( name ); + if ( tlist ) tlist->Prepend ( str ); + else { + tlist = new TColStd_HSequenceOfHAsciiString; + tlist->Append ( str ); + } + return tlist; +} + +static TColStd_HSequenceOfHAsciiString *mktlists ( TColStd_HSequenceOfHAsciiString *tlist1, + TColStd_HSequenceOfHAsciiString *tlist2 ) +{ + if ( ! tlist1 ) return tlist2; + if ( ! tlist2 ) return tlist1; + for ( int i=1; i <= tlist2->Length(); i++ ) + tlist1->Append ( tlist2->Value(i) ); + return tlist1; +} + +static Express_Type *mktstd ( int keyword ) +{ + switch ( keyword ) { + case exptocas::parser::token::KINT : return new Express_Integer; + case exptocas::parser::token::KNUM : return new Express_Number; + case exptocas::parser::token::KDBL : return new Express_Real; + case exptocas::parser::token::KSTR : return new Express_String; + case exptocas::parser::token::KBOOL: return new Express_Boolean; + case exptocas::parser::token::KLOG : return new Express_Logical; + default : ec_error ( "Predefined type not treated!", "" ); + return NULL; + } +} + +static Express_Type *mktname ( char *name ) +{ + return new Express_NamedType ( name ); +} + +static Express_Type *mktset ( int keyword, int ilow, int ihigh, Express_Type *of ) +{ + switch ( keyword ) { + case exptocas::parser::token::KLIST: return new Express_List ( ilow, ihigh, of ); + case exptocas::parser::token::KARR : return new Express_Array ( ilow, ihigh, of ); + case exptocas::parser::token::KBAG : return new Express_Bag ( ilow, ihigh, of ); + case exptocas::parser::token::KSET : return new Express_Set ( ilow, ihigh, of ); + default : ec_error ( "Complex type not treated!", "" ); + return NULL; + } +} + +static Express_Field *mkfield ( char *name, Express_Type *type, int optional ) +{ + return new Express_Field ( name, type, optional ); +} + +static Express_HSequenceOfField *mkflist ( Express_Field *field, Express_HSequenceOfField *seq ) +{ + if ( seq ) seq->Prepend ( field ); + else { + seq = new Express_HSequenceOfField; + seq->Append ( field ); + } + return seq; +} + +/*******************************************************************/ +/* MAIN & co */ + +/* +void tlistfree ( struct tlist *list ) +{ + if ( ! list ) return; + tlistfree ( list->next ); + list->next = 0; + free ( list->str ); + list->str = 0; +} +* / + +int printtlist ( struct ec_tlist *tl ) +{ + int num=0; + while ( tl ) { + num++; + printf ( "%s\n", tl->name ); + tl = tl->next; + } + return num; +} + +int main ( void ) +{ + int num = 0; + yyparse(); + + printf ( "\nFinished\n" ); + if ( schema ) { + struct ec_item *it; + it = schema->items; + printf ( "\nSchema %s", schema->name ); + printf ( "\nItems:" ); + while ( it ) { + num++; + printf ( "\n%s", it->name ); + it = it->next; + } +// num = printtlist ( res ); + printf ( "\nTotal %d", num ); + } + +// tlistfree ( yylval.tlist ); + return num; +} +*/ + +void exptocas::parser::error(const std::string& s) +{ + printf("\nParse error at line %d: %s\n", scanner->lineno(), s.c_str()); +} + diff --git a/src/ExpToCasExe/lex.exptocas.cxx b/src/ExpToCasExe/lex.exptocas.cxx new file mode 100644 index 0000000000..59c0574de6 --- /dev/null +++ b/src/ExpToCasExe/lex.exptocas.cxx @@ -0,0 +1,2108 @@ +// Pre-include stdlib.h to avoid redefinition of integer type macros (INT8_MIN and similar in generated code) +#if !defined(_MSC_VER) || (_MSC_VER >= 1600) // Visual Studio 2010+ +#include "stdint.h" +#endif + +#define YY_INT_ALIGNED short int + +/* A lexical scanner generated by flex */ + +#define FLEX_SCANNER +#define YY_FLEX_MAJOR_VERSION 2 +#define YY_FLEX_MINOR_VERSION 6 +#define YY_FLEX_SUBMINOR_VERSION 4 +#if YY_FLEX_SUBMINOR_VERSION > 0 +#define FLEX_BETA +#endif + + /* The c++ scanner is a mess. The FlexLexer.h header file relies on the + * following macro. This is required in order to pass the c++-multiple-scanners + * test in the regression suite. We get reports that it breaks inheritance. + * We will address this in a future release of flex, or omit the C++ scanner + * altogether. + */ + #define yyFlexLexer exptocasFlexLexer + +#ifdef yyalloc +#define exptocasalloc_ALREADY_DEFINED +#else +#define yyalloc exptocasalloc +#endif + +#ifdef yyrealloc +#define exptocasrealloc_ALREADY_DEFINED +#else +#define yyrealloc exptocasrealloc +#endif + +#ifdef yyfree +#define exptocasfree_ALREADY_DEFINED +#else +#define yyfree exptocasfree +#endif + +/* First, we deal with platform-specific or compiler-specific issues. */ + +/* begin standard C headers. */ + +/* end standard C headers. */ + +/* flex integer type definitions */ + +#ifndef FLEXINT_H +#define FLEXINT_H + +/* C99 systems have . Non-C99 systems may or may not. */ + +#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L + +/* C99 says to define __STDC_LIMIT_MACROS before including stdint.h, + * if you want the limit (max/min) macros for int types. + */ +#ifndef __STDC_LIMIT_MACROS +#define __STDC_LIMIT_MACROS 1 +#endif + +#include +typedef int8_t flex_int8_t; +typedef uint8_t flex_uint8_t; +typedef int16_t flex_int16_t; +typedef uint16_t flex_uint16_t; +typedef int32_t flex_int32_t; +typedef uint32_t flex_uint32_t; +#else +typedef signed char flex_int8_t; +typedef short int flex_int16_t; +typedef int flex_int32_t; +typedef unsigned char flex_uint8_t; +typedef unsigned short int flex_uint16_t; +typedef unsigned int flex_uint32_t; + +/* Limits of integral types. */ +#ifndef INT8_MIN +#define INT8_MIN (-128) +#endif +#ifndef INT16_MIN +#define INT16_MIN (-32767-1) +#endif +#ifndef INT32_MIN +#define INT32_MIN (-2147483647-1) +#endif +#ifndef INT8_MAX +#define INT8_MAX (127) +#endif +#ifndef INT16_MAX +#define INT16_MAX (32767) +#endif +#ifndef INT32_MAX +#define INT32_MAX (2147483647) +#endif +#ifndef UINT8_MAX +#define UINT8_MAX (255U) +#endif +#ifndef UINT16_MAX +#define UINT16_MAX (65535U) +#endif +#ifndef UINT32_MAX +#define UINT32_MAX (4294967295U) +#endif + +#ifndef SIZE_MAX +#define SIZE_MAX (~(size_t)0) +#endif + +#endif /* ! C99 */ + +#endif /* ! FLEXINT_H */ + +/* begin standard C++ headers. */ +#include +#include +#include +#include +#include +/* end standard C++ headers. */ + +/* TODO: this is always defined, so inline it */ +#define yyconst const + +#if defined(__GNUC__) && __GNUC__ >= 3 +#define yynoreturn __attribute__((__noreturn__)) +#else +#define yynoreturn +#endif + +/* Returned upon end-of-file. */ +#define YY_NULL 0 + +/* Promotes a possibly negative, possibly signed char to an + * integer in range [0..255] for use as an array index. + */ +#define YY_SC_TO_UI(c) ((YY_CHAR) (c)) + +/* Enter a start condition. This macro really ought to take a parameter, + * but we do it the disgusting crufty way forced on us by the ()-less + * definition of BEGIN. + */ +#define BEGIN (yy_start) = 1 + 2 * +/* Translate the current start state into a value that can be later handed + * to BEGIN to return to the state. The YYSTATE alias is for lex + * compatibility. + */ +#define YY_START (((yy_start) - 1) / 2) +#define YYSTATE YY_START +/* Action number for EOF rule of a given start state. */ +#define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1) +/* Special action meaning "start processing a new file". */ +#define YY_NEW_FILE yyrestart( yyin ) +#define YY_END_OF_BUFFER_CHAR 0 + +/* Size of default input buffer. */ +#ifndef YY_BUF_SIZE +#ifdef __ia64__ +/* On IA-64, the buffer size is 16k, not 8k. + * Moreover, YY_BUF_SIZE is 2*YY_READ_BUF_SIZE in the general case. + * Ditto for the __ia64__ case accordingly. + */ +#define YY_BUF_SIZE 32768 +#else +#define YY_BUF_SIZE 16384 +#endif /* __ia64__ */ +#endif + +/* The state buf must be large enough to hold one state per character in the main buffer. + */ +#define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type)) + +#ifndef YY_TYPEDEF_YY_BUFFER_STATE +#define YY_TYPEDEF_YY_BUFFER_STATE +typedef struct yy_buffer_state *YY_BUFFER_STATE; +#endif + +#ifndef YY_TYPEDEF_YY_SIZE_T +#define YY_TYPEDEF_YY_SIZE_T +typedef size_t yy_size_t; +#endif + +extern int yyleng; + +#define EOB_ACT_CONTINUE_SCAN 0 +#define EOB_ACT_END_OF_FILE 1 +#define EOB_ACT_LAST_MATCH 2 + + #define YY_LESS_LINENO(n) + #define YY_LINENO_REWIND_TO(ptr) + +/* Return all but the first "n" matched characters back to the input stream. */ +#define yyless(n) \ + do \ + { \ + /* Undo effects of setting up yytext. */ \ + int yyless_macro_arg = (n); \ + YY_LESS_LINENO(yyless_macro_arg);\ + *yy_cp = (yy_hold_char); \ + YY_RESTORE_YY_MORE_OFFSET \ + (yy_c_buf_p) = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \ + YY_DO_BEFORE_ACTION; /* set up yytext again */ \ + } \ + while ( 0 ) +#define unput(c) yyunput( c, (yytext_ptr) ) + +#ifndef YY_STRUCT_YY_BUFFER_STATE +#define YY_STRUCT_YY_BUFFER_STATE +struct yy_buffer_state + { + + std::streambuf* yy_input_file; + + char *yy_ch_buf; /* input buffer */ + char *yy_buf_pos; /* current position in input buffer */ + + /* Size of input buffer in bytes, not including room for EOB + * characters. + */ + int yy_buf_size; + + /* Number of characters read into yy_ch_buf, not including EOB + * characters. + */ + int yy_n_chars; + + /* Whether we "own" the buffer - i.e., we know we created it, + * and can realloc() it to grow it, and should free() it to + * delete it. + */ + int yy_is_our_buffer; + + /* Whether this is an "interactive" input source; if so, and + * if we're using stdio for input, then we want to use getc() + * instead of fread(), to make sure we stop fetching input after + * each newline. + */ + int yy_is_interactive; + + /* Whether we're considered to be at the beginning of a line. + * If so, '^' rules will be active on the next match, otherwise + * not. + */ + int yy_at_bol; + + int yy_bs_lineno; /**< The line count. */ + int yy_bs_column; /**< The column count. */ + + /* Whether to try to fill the input buffer when we reach the + * end of it. + */ + int yy_fill_buffer; + + int yy_buffer_status; + +#define YY_BUFFER_NEW 0 +#define YY_BUFFER_NORMAL 1 + /* When an EOF's been seen but there's still some text to process + * then we mark the buffer as YY_EOF_PENDING, to indicate that we + * shouldn't try reading from the input source any more. We might + * still have a bunch of tokens to match, though, because of + * possible backing-up. + * + * When we actually see the EOF, we change the status to "new" + * (via yyrestart()), so that the user can continue scanning by + * just pointing yyin at a new input file. + */ +#define YY_BUFFER_EOF_PENDING 2 + + }; +#endif /* !YY_STRUCT_YY_BUFFER_STATE */ + +/* We provide macros for accessing buffer states in case in the + * future we want to put the buffer states in a more general + * "scanner state". + * + * Returns the top of the stack, or NULL. + */ +#define YY_CURRENT_BUFFER ( (yy_buffer_stack) \ + ? (yy_buffer_stack)[(yy_buffer_stack_top)] \ + : NULL) +/* Same as previous macro, but useful when we know that the buffer stack is not + * NULL or when we need an lvalue. For internal use only. + */ +#define YY_CURRENT_BUFFER_LVALUE (yy_buffer_stack)[(yy_buffer_stack_top)] + +void *yyalloc ( yy_size_t ); +void *yyrealloc ( void *, yy_size_t ); +void yyfree ( void * ); + +#define yy_new_buffer yy_create_buffer +#define yy_set_interactive(is_interactive) \ + { \ + if ( ! YY_CURRENT_BUFFER ){ \ + yyensure_buffer_stack (); \ + YY_CURRENT_BUFFER_LVALUE = \ + yy_create_buffer( yyin, YY_BUF_SIZE ); \ + } \ + YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \ + } +#define yy_set_bol(at_bol) \ + { \ + if ( ! YY_CURRENT_BUFFER ){\ + yyensure_buffer_stack (); \ + YY_CURRENT_BUFFER_LVALUE = \ + yy_create_buffer( yyin, YY_BUF_SIZE ); \ + } \ + YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \ + } +#define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol) + +/* Begin user sect3 */ +#define YY_SKIP_YYWRAP +typedef flex_uint8_t YY_CHAR; + +#define yytext_ptr yytext +#define YY_INTERACTIVE + +#include + +inline int yyFlexLexer::yywrap() { return 1; } +int yyFlexLexer::yylex() + { + LexerError( "yyFlexLexer::yylex invoked but %option yyclass used" ); + return 0; + } + +#define YY_DECL int exptocas::scanner::yylex() + +/* Done after the current pattern has been matched and before the + * corresponding action - sets up yytext. + */ +#define YY_DO_BEFORE_ACTION \ + (yytext_ptr) = yy_bp; \ + yyleng = (int) (yy_cp - yy_bp); \ + (yy_hold_char) = *yy_cp; \ + *yy_cp = '\0'; \ + (yy_c_buf_p) = yy_cp; +#define YY_NUM_RULES 56 +#define YY_END_OF_BUFFER 57 +/* This struct is not used in this scanner, + but its presence is necessary. */ +struct yy_trans_info + { + flex_int32_t yy_verify; + flex_int32_t yy_nxt; + }; +static const flex_int16_t yy_accept[306] = + { 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 44, 44, 57, 54, 52, 55, 40, 40, + 54, 39, 53, 53, 53, 53, 53, 53, 53, 53, + 53, 53, 53, 53, 53, 53, 38, 53, 53, 53, + 53, 53, 3, 3, 14, 14, 49, 49, 46, 46, + 46, 46, 44, 44, 44, 52, 2, 1, 39, 53, + 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, + 53, 53, 21, 53, 53, 53, 53, 53, 53, 53, + 53, 53, 53, 53, 38, 53, 53, 53, 53, 53, + 4, 0, 0, 0, 45, 42, 43, 44, 44, 44, + + 1, 53, 36, 53, 20, 53, 53, 53, 53, 53, + 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, + 53, 19, 53, 53, 53, 53, 53, 37, 53, 53, + 53, 53, 53, 0, 0, 43, 44, 44, 53, 53, + 53, 53, 53, 53, 53, 53, 53, 53, 17, 53, + 53, 53, 53, 24, 48, 53, 53, 30, 53, 53, + 53, 7, 53, 53, 53, 53, 53, 53, 0, 0, + 44, 44, 53, 34, 18, 53, 53, 53, 53, 53, + 53, 53, 53, 53, 35, 53, 53, 53, 53, 53, + 53, 53, 53, 13, 53, 53, 53, 0, 0, 0, + + 44, 44, 53, 53, 53, 53, 9, 53, 53, 53, + 53, 22, 53, 5, 15, 25, 53, 53, 29, 53, + 12, 53, 53, 0, 0, 0, 44, 44, 53, 27, + 53, 53, 53, 53, 23, 26, 53, 32, 53, 53, + 53, 11, 0, 0, 0, 44, 44, 31, 53, 53, + 53, 41, 28, 53, 8, 53, 0, 8, 0, 44, + 41, 0, 53, 53, 53, 33, 53, 0, 50, 44, + 0, 53, 6, 53, 10, 10, 44, 0, 53, 16, + 44, 0, 53, 44, 0, 53, 47, 0, 53, 0, + 53, 0, 53, 0, 53, 0, 53, 0, 53, 0, + + 53, 0, 53, 51, 0 + } ; + +static const YY_CHAR yy_ec[256] = + { 0, + 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 2, 1, 1, 1, 1, 1, 1, 4, 5, + 6, 7, 1, 8, 9, 8, 1, 10, 10, 10, + 10, 10, 10, 10, 10, 10, 10, 11, 12, 1, + 11, 1, 8, 1, 13, 14, 15, 16, 17, 18, + 19, 20, 21, 22, 22, 23, 24, 25, 26, 27, + 28, 29, 30, 31, 32, 33, 34, 22, 35, 22, + 36, 8, 37, 1, 38, 1, 39, 39, 39, 39, + + 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, + 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, + 39, 39, 1, 40, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1 + } ; + +static const YY_CHAR yy_meta[41] = + { 0, + 1, 2, 3, 2, 2, 2, 1, 1, 2, 4, + 2, 2, 5, 5, 5, 5, 4, 5, 5, 5, + 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, + 5, 5, 5, 5, 5, 1, 1, 4, 4, 2 + } ; + +static const flex_int16_t yy_base[316] = + { 0, + 0, 0, 24, 26, 29, 35, 52, 54, 45, 51, + 61, 62, 79, 119, 412, 413, 409, 413, 403, 413, + 400, 398, 75, 79, 381, 0, 381, 373, 379, 45, + 371, 49, 76, 86, 367, 48, 60, 376, 380, 382, + 373, 372, 413, 390, 413, 370, 413, 369, 413, 389, + 385, 382, 0, 365, 357, 386, 413, 0, 377, 0, + 356, 369, 355, 364, 356, 356, 78, 355, 348, 348, + 358, 352, 0, 358, 343, 360, 349, 351, 83, 341, + 115, 342, 347, 357, 101, 116, 349, 336, 118, 102, + 413, 348, 347, 358, 413, 413, 0, 0, 345, 335, + + 0, 328, 332, 344, 0, 333, 325, 316, 332, 328, + 336, 333, 318, 327, 333, 320, 324, 321, 326, 325, + 95, 0, 320, 309, 322, 321, 309, 326, 297, 305, + 312, 294, 314, 292, 291, 0, 290, 312, 297, 296, + 289, 306, 291, 291, 289, 302, 287, 298, 0, 301, + 298, 296, 287, 0, 0, 288, 296, 0, 285, 274, + 279, 0, 275, 113, 289, 272, 121, 275, 129, 274, + 284, 270, 287, 0, 0, 286, 285, 282, 261, 266, + 273, 276, 279, 262, 0, 265, 276, 257, 268, 259, + 254, 267, 248, 0, 265, 256, 250, 254, 243, 245, + + 244, 254, 259, 248, 247, 251, 0, 257, 243, 239, + 244, 0, 253, 0, 0, 0, 248, 229, 0, 236, + 0, 231, 244, 229, 232, 235, 232, 230, 224, 0, + 223, 236, 221, 226, 0, 0, 227, 0, 222, 231, + 226, 0, 225, 228, 227, 228, 217, 0, 159, 212, + 210, 0, 0, 179, 0, 164, 163, 413, 181, 161, + 0, 174, 173, 176, 162, 0, 152, 151, 413, 164, + 159, 158, 0, 157, 0, 413, 155, 164, 163, 0, + 153, 139, 138, 163, 159, 158, 413, 146, 141, 141, + 133, 127, 124, 122, 121, 132, 128, 82, 77, 64, + + 44, 60, 37, 413, 413, 199, 204, 209, 214, 216, + 221, 223, 228, 233, 237 + } ; + +static const flex_int16_t yy_def[316] = + { 0, + 305, 1, 1, 1, 1, 1, 306, 306, 307, 307, + 308, 308, 309, 309, 305, 305, 305, 305, 305, 305, + 305, 310, 310, 310, 310, 310, 310, 310, 310, 310, + 310, 310, 310, 310, 310, 310, 310, 310, 310, 310, + 310, 310, 305, 305, 305, 305, 305, 305, 305, 311, + 305, 305, 312, 312, 312, 305, 305, 313, 310, 310, + 310, 310, 310, 310, 310, 310, 310, 310, 310, 310, + 310, 310, 310, 310, 310, 310, 310, 310, 310, 310, + 310, 310, 310, 310, 310, 310, 310, 310, 310, 310, + 305, 305, 305, 311, 305, 305, 314, 312, 312, 312, + + 313, 310, 310, 310, 310, 310, 310, 310, 310, 310, + 310, 310, 310, 310, 310, 310, 310, 310, 310, 310, + 310, 310, 310, 310, 310, 310, 310, 310, 310, 310, + 310, 310, 310, 305, 305, 314, 312, 312, 310, 310, + 310, 310, 310, 310, 310, 310, 310, 310, 310, 310, + 310, 310, 310, 310, 310, 310, 310, 310, 310, 310, + 310, 310, 310, 310, 310, 310, 310, 310, 305, 305, + 312, 312, 310, 310, 310, 310, 310, 310, 310, 310, + 310, 310, 310, 310, 310, 310, 310, 310, 310, 310, + 310, 310, 310, 310, 310, 310, 310, 305, 305, 305, + + 312, 312, 310, 310, 310, 310, 310, 310, 310, 310, + 310, 310, 310, 310, 310, 310, 310, 310, 310, 310, + 310, 310, 310, 305, 305, 305, 312, 312, 310, 310, + 310, 310, 310, 310, 310, 310, 310, 310, 310, 310, + 310, 310, 305, 305, 305, 312, 312, 310, 310, 310, + 310, 310, 310, 310, 310, 310, 305, 305, 305, 312, + 312, 315, 249, 310, 310, 310, 310, 305, 305, 312, + 305, 310, 310, 310, 310, 305, 312, 305, 310, 310, + 312, 305, 310, 312, 305, 310, 305, 305, 310, 305, + 310, 305, 310, 305, 310, 305, 310, 305, 310, 305, + + 310, 305, 310, 305, 0, 305, 305, 305, 305, 305, + 305, 305, 305, 305, 305 + } ; + +static const flex_int16_t yy_nxt[454] = + { 0, + 16, 17, 18, 16, 19, 20, 16, 20, 21, 22, + 20, 20, 23, 24, 25, 26, 27, 28, 26, 26, + 29, 26, 30, 26, 31, 32, 26, 26, 33, 34, + 35, 36, 26, 26, 26, 20, 20, 37, 37, 16, + 38, 26, 38, 26, 40, 41, 26, 18, 304, 42, + 40, 41, 26, 18, 18, 42, 18, 39, 44, 39, + 44, 46, 39, 18, 18, 70, 73, 46, 39, 85, + 71, 304, 83, 74, 303, 75, 84, 48, 48, 49, + 49, 18, 50, 51, 49, 49, 49, 52, 61, 49, + 49, 64, 76, 108, 302, 54, 55, 85, 85, 62, + + 78, 301, 79, 63, 65, 121, 300, 77, 109, 110, + 85, 157, 158, 122, 49, 49, 80, 81, 49, 49, + 49, 18, 50, 51, 49, 49, 49, 52, 124, 49, + 49, 129, 112, 132, 133, 54, 55, 196, 85, 85, + 299, 125, 178, 193, 298, 198, 109, 110, 109, 110, + 178, 297, 296, 295, 49, 49, 294, 293, 49, 199, + 262, 262, 262, 262, 262, 292, 291, 262, 263, 262, + 262, 290, 289, 288, 287, 286, 285, 284, 283, 282, + 281, 280, 279, 278, 277, 276, 275, 274, 273, 272, + 271, 270, 269, 268, 267, 266, 263, 263, 262, 43, + + 43, 43, 43, 43, 45, 45, 45, 45, 45, 47, + 47, 47, 47, 47, 53, 53, 53, 53, 53, 60, + 60, 94, 94, 94, 94, 94, 98, 98, 101, 101, + 265, 101, 101, 136, 136, 264, 136, 136, 262, 262, + 262, 261, 260, 259, 258, 257, 256, 255, 254, 253, + 252, 251, 250, 249, 248, 247, 246, 245, 244, 243, + 242, 241, 240, 239, 238, 237, 236, 235, 234, 233, + 232, 231, 230, 229, 228, 227, 226, 225, 224, 223, + 222, 221, 220, 219, 218, 217, 216, 215, 214, 213, + 212, 211, 210, 209, 208, 207, 206, 205, 204, 203, + + 202, 201, 200, 197, 195, 194, 192, 191, 190, 189, + 188, 187, 186, 185, 184, 183, 182, 181, 180, 179, + 178, 177, 176, 175, 174, 173, 172, 171, 170, 169, + 168, 167, 166, 165, 164, 128, 163, 162, 161, 160, + 159, 156, 155, 154, 153, 152, 151, 150, 149, 148, + 147, 146, 145, 144, 143, 142, 141, 140, 139, 138, + 137, 95, 135, 134, 131, 130, 128, 127, 126, 123, + 120, 119, 118, 117, 116, 115, 114, 113, 112, 111, + 107, 106, 105, 104, 103, 102, 59, 56, 100, 99, + 97, 96, 95, 93, 92, 91, 90, 89, 88, 87, + + 86, 82, 72, 69, 68, 67, 66, 59, 58, 57, + 56, 305, 15, 305, 305, 305, 305, 305, 305, 305, + 305, 305, 305, 305, 305, 305, 305, 305, 305, 305, + 305, 305, 305, 305, 305, 305, 305, 305, 305, 305, + 305, 305, 305, 305, 305, 305, 305, 305, 305, 305, + 305, 305, 305 + } ; + +static const flex_int16_t yy_chk[454] = + { 0, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 3, 3, 4, 4, 5, 5, 5, 9, 303, 5, + 6, 6, 6, 10, 7, 6, 8, 3, 7, 4, + 8, 9, 5, 11, 12, 30, 32, 10, 6, 37, + 30, 302, 36, 32, 301, 32, 36, 11, 12, 13, + 13, 13, 13, 13, 13, 13, 13, 13, 23, 13, + 13, 24, 33, 67, 300, 13, 13, 37, 37, 23, + + 34, 299, 34, 23, 24, 79, 298, 33, 67, 67, + 85, 121, 121, 79, 13, 13, 34, 34, 13, 14, + 14, 14, 14, 14, 14, 14, 14, 14, 81, 14, + 14, 86, 90, 89, 90, 14, 14, 167, 85, 85, + 297, 81, 164, 164, 296, 169, 86, 86, 89, 89, + 167, 295, 294, 293, 14, 14, 292, 291, 14, 169, + 249, 249, 249, 249, 249, 290, 289, 249, 249, 249, + 249, 288, 286, 285, 284, 283, 282, 281, 279, 278, + 277, 274, 272, 271, 270, 268, 267, 265, 264, 263, + 262, 260, 259, 257, 256, 254, 249, 249, 249, 306, + + 306, 306, 306, 306, 307, 307, 307, 307, 307, 308, + 308, 308, 308, 308, 309, 309, 309, 309, 309, 310, + 310, 311, 311, 311, 311, 311, 312, 312, 313, 313, + 251, 313, 313, 314, 314, 250, 314, 314, 315, 315, + 315, 247, 246, 245, 244, 243, 241, 240, 239, 237, + 234, 233, 232, 231, 229, 228, 227, 226, 225, 224, + 223, 222, 220, 218, 217, 213, 211, 210, 209, 208, + 206, 205, 204, 203, 202, 201, 200, 199, 198, 197, + 196, 195, 193, 192, 191, 190, 189, 188, 187, 186, + 184, 183, 182, 181, 180, 179, 178, 177, 176, 173, + + 172, 171, 170, 168, 166, 165, 163, 161, 160, 159, + 157, 156, 153, 152, 151, 150, 148, 147, 146, 145, + 144, 143, 142, 141, 140, 139, 138, 137, 135, 134, + 133, 132, 131, 130, 129, 128, 127, 126, 125, 124, + 123, 120, 119, 118, 117, 116, 115, 114, 113, 112, + 111, 110, 109, 108, 107, 106, 104, 103, 102, 100, + 99, 94, 93, 92, 88, 87, 84, 83, 82, 80, + 78, 77, 76, 75, 74, 72, 71, 70, 69, 68, + 66, 65, 64, 63, 62, 61, 59, 56, 55, 54, + 52, 51, 50, 48, 46, 44, 42, 41, 40, 39, + + 38, 35, 31, 29, 28, 27, 25, 22, 21, 19, + 17, 15, 305, 305, 305, 305, 305, 305, 305, 305, + 305, 305, 305, 305, 305, 305, 305, 305, 305, 305, + 305, 305, 305, 305, 305, 305, 305, 305, 305, 305, + 305, 305, 305, 305, 305, 305, 305, 305, 305, 305, + 305, 305, 305 + } ; + +/* The intent behind this definition is that it'll catch + * any uses of REJECT which flex missed. + */ +#define REJECT reject_used_but_not_detected +#define yymore() yymore_used_but_not_detected +#define YY_MORE_ADJ 0 +#define YY_RESTORE_YY_MORE_OFFSET + +// Created: Thu Oct 28 12:21:16 1999 +// Author: Andrey BETENEV +// Copyright (c) 1999-2020 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. + +/***************************************************************************** + +This LEX scanner is performs lexical analysis of EXPRESS schema file +for EXPRESS -> CASCADE/XSTEP classes generator + +On the stage of lexical scanner comments (single- and multi-line), +definitions of CONSTANT, FUNCTION, RULE items and clauses WHERE, INVERSE +and DERIVE of TYPE amd ENTITY items are dismissed (ignored) + +Then, keywords such as ENTITY, SUPERTYPE, SET etc., names of items +and special symbols are identified and returned to parser (yacc) as tokens + +Also, error processing and current line number tracking functions are defined + +*****************************************************************************/ + +/************************************/ +/* Section 1 */ +/* definitions */ + +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +#include "exptocas.tab.hxx" /* define tokens */ + +/* Auxiliary functions */ + +static int fun_level=0; +static int ec_linenum=1; +static int ec_state = 0; + +int yywrap(void) { return 1; } + +int ec_curline ( void ) +{ + return ec_linenum; +} + +int ec_error ( const std::string& s, const std::string& text ) +{ + printf ( "\nError at line %d: %s \"%s\"\n", ec_curline(), s.c_str(), text.c_str() ); + return 0; +} + +/* + c++ generate C++ parser class +*/ +#define YY_NO_UNISTD_H 1 + +// Tell flex which function to define +#ifdef YY_DECL +# undef YY_DECL +#endif +#define YY_DECL int exptocas::scanner::lex (exptocas::parser::semantic_type* yylval) + +typedef exptocas::parser::token token; + +/************************************/ +/* Section 2 */ +/* parsing rules */ + +#define INITIAL 0 +#define TYP 1 +#define ENT 2 +#define COMM 3 +#define SKP 4 +#define RULE 5 +#define FUN 6 + +#ifndef YY_NO_UNISTD_H +/* Special case for "unistd.h", since it is non-ANSI. We include it way + * down here because we want the user's section 1 to have been scanned first. + * The user has a chance to override it with an option. + */ +#include +#endif + +#ifndef YY_EXTRA_TYPE +#define YY_EXTRA_TYPE void * +#endif + +#ifndef yytext_ptr +static void yy_flex_strncpy ( char *, const char *, int ); +#endif + +#ifdef YY_NEED_STRLEN +static int yy_flex_strlen ( const char * ); +#endif + +#ifndef YY_NO_INPUT + +#endif + +/* Amount of stuff to slurp up with each read. */ +#ifndef YY_READ_BUF_SIZE +#ifdef __ia64__ +/* On IA-64, the buffer size is 16k, not 8k */ +#define YY_READ_BUF_SIZE 16384 +#else +#define YY_READ_BUF_SIZE 8192 +#endif /* __ia64__ */ +#endif + +/* Copy whatever the last rule matched to the standard output. */ +#ifndef ECHO +#define ECHO LexerOutput( yytext, yyleng ) +#endif + +/* Gets input and stuffs it into "buf". number of characters read, or YY_NULL, + * is returned in "result". + */ +#ifndef YY_INPUT +#define YY_INPUT(buf,result,max_size) \ +\ + if ( (int)(result = LexerInput( (char *) buf, max_size )) < 0 ) \ + YY_FATAL_ERROR( "input in flex scanner failed" ); + +#endif + +/* No semi-colon after return; correct usage is to write "yyterminate();" - + * we don't want an extra ';' after the "return" because that will cause + * some compilers to complain about unreachable statements. + */ +#ifndef yyterminate +#define yyterminate() return YY_NULL +#endif + +/* Number of entries by which start-condition stack grows. */ +#ifndef YY_START_STACK_INCR +#define YY_START_STACK_INCR 25 +#endif + +/* Report a fatal error. */ +#ifndef YY_FATAL_ERROR +#define YY_FATAL_ERROR(msg) LexerError( msg ) +#endif + +/* end tables serialization structures and prototypes */ + +/* Default declaration of generated scanner - a define so the user can + * easily add parameters. + */ +#ifndef YY_DECL +#define YY_DECL_IS_OURS 1 +#define YY_DECL int yyFlexLexer::yylex() +#endif /* !YY_DECL */ + +/* Code executed at the beginning of each rule, after yytext and yyleng + * have been set up. + */ +#ifndef YY_USER_ACTION +#define YY_USER_ACTION +#endif + +/* Code executed at the end of each rule. */ +#ifndef YY_BREAK +#define YY_BREAK /*LINTED*/break; +#endif + +#define YY_RULE_SETUP \ + YY_USER_ACTION + +/** The main scanner function which does all the work. + */ +YY_DECL +{ + yy_state_type yy_current_state; + char *yy_cp, *yy_bp; + int yy_act; + + if ( !(yy_init) ) + { + (yy_init) = 1; + +#ifdef YY_USER_INIT + YY_USER_INIT; +#endif + + if ( ! (yy_start) ) + (yy_start) = 1; /* first start state */ + + if ( ! yyin ) + yyin.rdbuf(std::cin.rdbuf()); + + if ( ! yyout ) + yyout.rdbuf(std::cout.rdbuf()); + + if ( ! YY_CURRENT_BUFFER ) { + yyensure_buffer_stack (); + YY_CURRENT_BUFFER_LVALUE = + yy_create_buffer( yyin, YY_BUF_SIZE ); + } + + yy_load_buffer_state( ); + } + + { + + while ( /*CONSTCOND*/1 ) /* loops until end-of-file is reached */ + { + yy_cp = (yy_c_buf_p); + + /* Support of yytext. */ + *yy_cp = (yy_hold_char); + + /* yy_bp points to the position in yy_ch_buf of the start of + * the current run. + */ + yy_bp = yy_cp; + + yy_current_state = (yy_start); +yy_match: + do + { + YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)] ; + if ( yy_accept[yy_current_state] ) + { + (yy_last_accepting_state) = yy_current_state; + (yy_last_accepting_cpos) = yy_cp; + } + while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) + { + yy_current_state = (int) yy_def[yy_current_state]; + if ( yy_current_state >= 306 ) + yy_c = yy_meta[yy_c]; + } + yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; + ++yy_cp; + } + while ( yy_base[yy_current_state] != 413 ); + +yy_find_action: + yy_act = yy_accept[yy_current_state]; + if ( yy_act == 0 ) + { /* have to back up */ + yy_cp = (yy_last_accepting_cpos); + yy_current_state = (yy_last_accepting_state); + yy_act = yy_accept[yy_current_state]; + } + + YY_DO_BEFORE_ACTION; + +do_action: /* This label is used only to access EOF actions. */ + + switch ( yy_act ) + { /* beginning of action switch */ + case 0: /* must back up */ + /* undo the effects of YY_DO_BEFORE_ACTION */ + *yy_cp = (yy_hold_char); + yy_cp = (yy_last_accepting_cpos); + yy_current_state = (yy_last_accepting_state); + goto yy_find_action; + +case 1: +YY_RULE_SETUP +{ /* Eat line comments */ } + YY_BREAK +case 2: +YY_RULE_SETUP +{ ec_state = YYSTATE; BEGIN(COMM); } + YY_BREAK +case 3: +YY_RULE_SETUP +{ /* Eat multiline comments */ } + YY_BREAK +case 4: +YY_RULE_SETUP +{ BEGIN(ec_state); } + YY_BREAK +case 5: +YY_RULE_SETUP +{ return yylval->num = token::KSCHEM; } + YY_BREAK +case 6: +YY_RULE_SETUP +{ return yylval->num = token::KENDS; } + YY_BREAK +case 7: +YY_RULE_SETUP +{ BEGIN(TYP); return yylval->num = token::KTYP; } + YY_BREAK +case 8: +YY_RULE_SETUP +{ BEGIN(0); return yylval->num = token::KENDT; } + YY_BREAK +case 9: +YY_RULE_SETUP +{ BEGIN(ENT); return yylval->num = token::KENT; } + YY_BREAK +case 10: +YY_RULE_SETUP +{ BEGIN(0); return yylval->num = token::KENDE; } + YY_BREAK +case 11: +case 12: +case 13: +YY_RULE_SETUP +{ BEGIN(SKP); } + YY_BREAK +case 14: +YY_RULE_SETUP +{ /* eat contents of WHERE and DERIVE subclauses of ENTITY and TYPE */ } + YY_BREAK +case 15: +YY_RULE_SETUP +{ return yylval->num = token::KSEL; } + YY_BREAK +case 16: +YY_RULE_SETUP +{ return yylval->num = token::KENUM; } + YY_BREAK +case 17: +YY_RULE_SETUP +{ return yylval->num = token::KLIST; } + YY_BREAK +case 18: +YY_RULE_SETUP +{ return yylval->num = token::KARR; } + YY_BREAK +case 19: +YY_RULE_SETUP +{ return yylval->num = token::KSET; } + YY_BREAK +case 20: +YY_RULE_SETUP +{ return yylval->num = token::KBAG; } + YY_BREAK +case 21: +YY_RULE_SETUP +{ return yylval->num = token::KOF; } + YY_BREAK +case 22: +YY_RULE_SETUP +{ return yylval->num = token::KNUM; } + YY_BREAK +case 23: +YY_RULE_SETUP +{ return yylval->num = token::KINT; } + YY_BREAK +case 24: +YY_RULE_SETUP +{ return yylval->num = token::KDBL; } + YY_BREAK +case 25: +YY_RULE_SETUP +{ return yylval->num = token::KSTR; } + YY_BREAK +case 26: +YY_RULE_SETUP +{ return yylval->num = token::KLOG; } + YY_BREAK +case 27: +YY_RULE_SETUP +{ return yylval->num = token::KBOOL; } + YY_BREAK +case 28: +YY_RULE_SETUP +{ return yylval->num = token::KOPT; } + YY_BREAK +case 29: +YY_RULE_SETUP +{ return yylval->num = token::KUNIQ; } + YY_BREAK +case 30: +YY_RULE_SETUP +{ return yylval->num = token::KSELF; } + YY_BREAK +case 31: +YY_RULE_SETUP +{ return yylval->num = token::KABSTR; } + YY_BREAK +case 32: +YY_RULE_SETUP +{ return yylval->num = token::KSUBT; } + YY_BREAK +case 33: +YY_RULE_SETUP +{ return yylval->num = token::KSPRT; } + YY_BREAK +case 34: +YY_RULE_SETUP +{ return yylval->num = token::KANDOR; } + YY_BREAK +case 35: +YY_RULE_SETUP +{ return yylval->num = token::K1OF; } + YY_BREAK +case 36: +YY_RULE_SETUP +{ return yylval->num = token::KAND; } + YY_BREAK +case 37: +YY_RULE_SETUP +{ yylval->str = strdup ( yytext ); return token::NAME; } + YY_BREAK +case 38: +YY_RULE_SETUP +{ yylval->str = strdup ( yytext ); return token::NAME; } + YY_BREAK +case 39: +YY_RULE_SETUP +{ yylval->num = atoi ( yytext ); return token::NUMBER; } + YY_BREAK +case 40: +YY_RULE_SETUP +{ return yylval->num = yytext[0]; } + YY_BREAK +case 41: +YY_RULE_SETUP +{ BEGIN(FUN); fun_level++; } + YY_BREAK +case 42: +YY_RULE_SETUP +{ ec_state = YYSTATE; BEGIN(COMM); /* eat comments in functions */ } + YY_BREAK +case 43: +YY_RULE_SETUP +{ /* Eat line comments in functions */ } + YY_BREAK +case 44: +YY_RULE_SETUP +{ /* eat FUNCTIONs - skip IDs explicitly */ } + YY_BREAK +case 45: +/* rule 45 can match eol */ +YY_RULE_SETUP +{ /* eat FUNCTIONs - skip strings explicitly */ } + YY_BREAK +case 46: +YY_RULE_SETUP +{ /* eat FUNCTIONs - skip all other symbols in functions */ } + YY_BREAK +case 47: +YY_RULE_SETUP +{ fun_level--; if ( ! fun_level ) BEGIN(0); } + YY_BREAK +case 48: +YY_RULE_SETUP +{ BEGIN(RULE); /* eat RULEs */ } + YY_BREAK +case 49: +YY_RULE_SETUP +{ /* eat RULEs */ } + YY_BREAK +case 50: +YY_RULE_SETUP +{ BEGIN(0); } + YY_BREAK +case 51: +/* rule 51 can match eol */ +YY_RULE_SETUP +{ /* eat CONSTANTs */ + char *s = yytext; /* but don't forget to count lines.. */ + while ( *s ) if ( *(s++) == '\n' ) ec_linenum++; + } + YY_BREAK +case 52: +YY_RULE_SETUP +{ /* eat spaces */ } + YY_BREAK +case 53: +YY_RULE_SETUP +{ ec_error ( "unknown keyword ", yytext ); /* put unrecognized keywords to cerr */ } + YY_BREAK +case 54: +YY_RULE_SETUP +{ ec_error ( "unknown symbol ", yytext ); /* put unrecognized data to cerr */ } + YY_BREAK +case 55: +/* rule 55 can match eol */ +YY_RULE_SETUP +{ ec_linenum++; /* count lines */ } + YY_BREAK +case 56: +YY_RULE_SETUP +ECHO; + YY_BREAK +case YY_STATE_EOF(INITIAL): +case YY_STATE_EOF(TYP): +case YY_STATE_EOF(ENT): +case YY_STATE_EOF(COMM): +case YY_STATE_EOF(SKP): +case YY_STATE_EOF(RULE): +case YY_STATE_EOF(FUN): + yyterminate(); + + case YY_END_OF_BUFFER: + { + /* Amount of text matched not including the EOB char. */ + int yy_amount_of_matched_text = (int) (yy_cp - (yytext_ptr)) - 1; + + /* Undo the effects of YY_DO_BEFORE_ACTION. */ + *yy_cp = (yy_hold_char); + YY_RESTORE_YY_MORE_OFFSET + + if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW ) + { + /* We're scanning a new file or input source. It's + * possible that this happened because the user + * just pointed yyin at a new source and called + * yylex(). If so, then we have to assure + * consistency between YY_CURRENT_BUFFER and our + * globals. Here is the right place to do so, because + * this is the first action (other than possibly a + * back-up) that will match for the new input source. + */ + (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; + YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin.rdbuf(); + YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL; + } + + /* Note that here we test for yy_c_buf_p "<=" to the position + * of the first EOB in the buffer, since yy_c_buf_p will + * already have been incremented past the NUL character + * (since all states make transitions on EOB to the + * end-of-buffer state). Contrast this with the test + * in input(). + */ + if ( (yy_c_buf_p) <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] ) + { /* This was really a NUL. */ + yy_state_type yy_next_state; + + (yy_c_buf_p) = (yytext_ptr) + yy_amount_of_matched_text; + + yy_current_state = yy_get_previous_state( ); + + /* Okay, we're now positioned to make the NUL + * transition. We couldn't have + * yy_get_previous_state() go ahead and do it + * for us because it doesn't know how to deal + * with the possibility of jamming (and we don't + * want to build jamming into it because then it + * will run more slowly). + */ + + yy_next_state = yy_try_NUL_trans( yy_current_state ); + + yy_bp = (yytext_ptr) + YY_MORE_ADJ; + + if ( yy_next_state ) + { + /* Consume the NUL. */ + yy_cp = ++(yy_c_buf_p); + yy_current_state = yy_next_state; + goto yy_match; + } + + else + { + yy_cp = (yy_c_buf_p); + goto yy_find_action; + } + } + + else switch ( yy_get_next_buffer( ) ) + { + case EOB_ACT_END_OF_FILE: + { + (yy_did_buffer_switch_on_eof) = 0; + + if ( yywrap( ) ) + { + /* Note: because we've taken care in + * yy_get_next_buffer() to have set up + * yytext, we can now set up + * yy_c_buf_p so that if some total + * hoser (like flex itself) wants to + * call the scanner after we return the + * YY_NULL, it'll still work - another + * YY_NULL will get returned. + */ + (yy_c_buf_p) = (yytext_ptr) + YY_MORE_ADJ; + + yy_act = YY_STATE_EOF(YY_START); + goto do_action; + } + + else + { + if ( ! (yy_did_buffer_switch_on_eof) ) + YY_NEW_FILE; + } + break; + } + + case EOB_ACT_CONTINUE_SCAN: + (yy_c_buf_p) = + (yytext_ptr) + yy_amount_of_matched_text; + + yy_current_state = yy_get_previous_state( ); + + yy_cp = (yy_c_buf_p); + yy_bp = (yytext_ptr) + YY_MORE_ADJ; + goto yy_match; + + case EOB_ACT_LAST_MATCH: + (yy_c_buf_p) = + &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)]; + + yy_current_state = yy_get_previous_state( ); + + yy_cp = (yy_c_buf_p); + yy_bp = (yytext_ptr) + YY_MORE_ADJ; + goto yy_find_action; + } + break; + } + + default: + YY_FATAL_ERROR( + "fatal flex scanner internal error--no action found" ); + } /* end of action switch */ + } /* end of scanning one token */ + } /* end of user's declarations */ +} /* end of yylex */ + +/* The contents of this function are C++ specific, so the () macro is not used. + * This constructor simply maintains backward compatibility. + * DEPRECATED + */ +yyFlexLexer::yyFlexLexer( std::istream* arg_yyin, std::ostream* arg_yyout ): + yyin(arg_yyin ? arg_yyin->rdbuf() : std::cin.rdbuf()), + yyout(arg_yyout ? arg_yyout->rdbuf() : std::cout.rdbuf()) +{ + ctor_common(); +} + +/* The contents of this function are C++ specific, so the () macro is not used. + */ +yyFlexLexer::yyFlexLexer( std::istream& arg_yyin, std::ostream& arg_yyout ): + yyin(arg_yyin.rdbuf()), + yyout(arg_yyout.rdbuf()) +{ + ctor_common(); +} + +/* The contents of this function are C++ specific, so the () macro is not used. + */ +void yyFlexLexer::ctor_common() +{ + yy_c_buf_p = 0; + yy_init = 0; + yy_start = 0; + yy_flex_debug = 0; + yylineno = 1; // this will only get updated if %option yylineno + + yy_did_buffer_switch_on_eof = 0; + + yy_looking_for_trail_begin = 0; + yy_more_flag = 0; + yy_more_len = 0; + yy_more_offset = yy_prev_more_offset = 0; + + yy_start_stack_ptr = yy_start_stack_depth = 0; + yy_start_stack = NULL; + + yy_buffer_stack = NULL; + yy_buffer_stack_top = 0; + yy_buffer_stack_max = 0; + + yy_state_buf = 0; + +} + +/* The contents of this function are C++ specific, so the () macro is not used. + */ +yyFlexLexer::~yyFlexLexer() +{ + delete [] yy_state_buf; + yyfree( yy_start_stack ); + yy_delete_buffer( YY_CURRENT_BUFFER ); + yyfree( yy_buffer_stack ); +} + +/* The contents of this function are C++ specific, so the () macro is not used. + */ +void yyFlexLexer::switch_streams( std::istream& new_in, std::ostream& new_out ) +{ + // was if( new_in ) + yy_delete_buffer( YY_CURRENT_BUFFER ); + yy_switch_to_buffer( yy_create_buffer( new_in, YY_BUF_SIZE ) ); + + // was if( new_out ) + yyout.rdbuf(new_out.rdbuf()); +} + +/* The contents of this function are C++ specific, so the () macro is not used. + */ +void yyFlexLexer::switch_streams( std::istream* new_in, std::ostream* new_out ) +{ + if( ! new_in ) { + new_in = &yyin; + } + + if ( ! new_out ) { + new_out = &yyout; + } + + switch_streams(*new_in, *new_out); +} + +#ifdef YY_INTERACTIVE +int yyFlexLexer::LexerInput( char* buf, int /* max_size */ ) +#else +int yyFlexLexer::LexerInput( char* buf, int max_size ) +#endif +{ + if ( yyin.eof() || yyin.fail() ) + return 0; + +#ifdef YY_INTERACTIVE + yyin.get( buf[0] ); + + if ( yyin.eof() ) + return 0; + + if ( yyin.bad() ) + return -1; + + return 1; + +#else + (void) yyin.read( buf, max_size ); + + if ( yyin.bad() ) + return -1; + else + return yyin.gcount(); +#endif +} + +void yyFlexLexer::LexerOutput( const char* buf, int size ) +{ + (void) yyout.write( buf, size ); +} + +/* yy_get_next_buffer - try to read in a new buffer + * + * Returns a code representing an action: + * EOB_ACT_LAST_MATCH - + * EOB_ACT_CONTINUE_SCAN - continue scanning from current position + * EOB_ACT_END_OF_FILE - end of file + */ +int yyFlexLexer::yy_get_next_buffer() +{ + char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf; + char *source = (yytext_ptr); + int number_to_move, i; + int ret_val; + + if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] ) + YY_FATAL_ERROR( + "fatal flex scanner internal error--end of buffer missed" ); + + if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 ) + { /* Don't try to fill the buffer, so this is an EOF. */ + if ( (yy_c_buf_p) - (yytext_ptr) - YY_MORE_ADJ == 1 ) + { + /* We matched a single character, the EOB, so + * treat this as a final EOF. + */ + return EOB_ACT_END_OF_FILE; + } + + else + { + /* We matched some text prior to the EOB, first + * process it. + */ + return EOB_ACT_LAST_MATCH; + } + } + + /* Try to read more data. */ + + /* First move last chars to start of buffer. */ + number_to_move = (int) ((yy_c_buf_p) - (yytext_ptr) - 1); + + for ( i = 0; i < number_to_move; ++i ) + *(dest++) = *(source++); + + if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING ) + /* don't do the read, it's not guaranteed to return an EOF, + * just force an EOF + */ + YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars) = 0; + + else + { + int num_to_read = + YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1; + + while ( num_to_read <= 0 ) + { /* Not enough room in the buffer - grow it. */ + + /* just a shorter name for the current buffer */ + YY_BUFFER_STATE b = YY_CURRENT_BUFFER_LVALUE; + + int yy_c_buf_p_offset = + (int) ((yy_c_buf_p) - b->yy_ch_buf); + + if ( b->yy_is_our_buffer ) + { + int new_size = b->yy_buf_size * 2; + + if ( new_size <= 0 ) + b->yy_buf_size += b->yy_buf_size / 8; + else + b->yy_buf_size *= 2; + + b->yy_ch_buf = (char *) + /* Include room in for 2 EOB chars. */ + yyrealloc( (void *) b->yy_ch_buf, + (yy_size_t) (b->yy_buf_size + 2) ); + } + else + /* Can't grow it, we don't own it. */ + b->yy_ch_buf = NULL; + + if ( ! b->yy_ch_buf ) + YY_FATAL_ERROR( + "fatal error - scanner input buffer overflow" ); + + (yy_c_buf_p) = &b->yy_ch_buf[yy_c_buf_p_offset]; + + num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size - + number_to_move - 1; + + } + + if ( num_to_read > YY_READ_BUF_SIZE ) + num_to_read = YY_READ_BUF_SIZE; + + /* Read in more data. */ + YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]), + (yy_n_chars), num_to_read ); + + YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars); + } + + if ( (yy_n_chars) == 0 ) + { + if ( number_to_move == YY_MORE_ADJ ) + { + ret_val = EOB_ACT_END_OF_FILE; + yyrestart( yyin ); + } + + else + { + ret_val = EOB_ACT_LAST_MATCH; + YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = + YY_BUFFER_EOF_PENDING; + } + } + + else + ret_val = EOB_ACT_CONTINUE_SCAN; + + if (((yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) { + /* Extend the array by 50%, plus the number we really need. */ + int new_size = (yy_n_chars) + number_to_move + ((yy_n_chars) >> 1); + YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) yyrealloc( + (void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf, (yy_size_t) new_size ); + if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf ) + YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" ); + /* "- 2" to take care of EOB's */ + YY_CURRENT_BUFFER_LVALUE->yy_buf_size = (int) (new_size - 2); + } + + (yy_n_chars) += number_to_move; + YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] = YY_END_OF_BUFFER_CHAR; + YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] = YY_END_OF_BUFFER_CHAR; + + (yytext_ptr) = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0]; + + return ret_val; +} + +/* yy_get_previous_state - get the state just before the EOB char was reached */ + + yy_state_type yyFlexLexer::yy_get_previous_state() +{ + yy_state_type yy_current_state; + char *yy_cp; + + yy_current_state = (yy_start); + + for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp ) + { + YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1); + if ( yy_accept[yy_current_state] ) + { + (yy_last_accepting_state) = yy_current_state; + (yy_last_accepting_cpos) = yy_cp; + } + while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) + { + yy_current_state = (int) yy_def[yy_current_state]; + if ( yy_current_state >= 306 ) + yy_c = yy_meta[yy_c]; + } + yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; + } + + return yy_current_state; +} + +/* yy_try_NUL_trans - try to make a transition on the NUL character + * + * synopsis + * next_state = yy_try_NUL_trans( current_state ); + */ + yy_state_type yyFlexLexer::yy_try_NUL_trans( yy_state_type yy_current_state ) +{ + int yy_is_jam; + char *yy_cp = (yy_c_buf_p); + + YY_CHAR yy_c = 1; + if ( yy_accept[yy_current_state] ) + { + (yy_last_accepting_state) = yy_current_state; + (yy_last_accepting_cpos) = yy_cp; + } + while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) + { + yy_current_state = (int) yy_def[yy_current_state]; + if ( yy_current_state >= 306 ) + yy_c = yy_meta[yy_c]; + } + yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; + yy_is_jam = (yy_current_state == 305); + + return yy_is_jam ? 0 : yy_current_state; +} + +#ifndef YY_NO_UNPUT + void yyFlexLexer::yyunput( int c, char* yy_bp) +{ + char *yy_cp; + + yy_cp = (yy_c_buf_p); + + /* undo effects of setting up yytext */ + *yy_cp = (yy_hold_char); + + if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 ) + { /* need to shift things up to make room */ + /* +2 for EOB chars. */ + int number_to_move = (yy_n_chars) + 2; + char *dest = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[ + YY_CURRENT_BUFFER_LVALUE->yy_buf_size + 2]; + char *source = + &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]; + + while ( source > YY_CURRENT_BUFFER_LVALUE->yy_ch_buf ) + *--dest = *--source; + + yy_cp += (int) (dest - source); + yy_bp += (int) (dest - source); + YY_CURRENT_BUFFER_LVALUE->yy_n_chars = + (yy_n_chars) = (int) YY_CURRENT_BUFFER_LVALUE->yy_buf_size; + + if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 ) + YY_FATAL_ERROR( "flex scanner push-back overflow" ); + } + + *--yy_cp = (char) c; + + (yytext_ptr) = yy_bp; + (yy_hold_char) = *yy_cp; + (yy_c_buf_p) = yy_cp; +} +#endif + + int yyFlexLexer::yyinput() +{ + int c; + + *(yy_c_buf_p) = (yy_hold_char); + + if ( *(yy_c_buf_p) == YY_END_OF_BUFFER_CHAR ) + { + /* yy_c_buf_p now points to the character we want to return. + * If this occurs *before* the EOB characters, then it's a + * valid NUL; if not, then we've hit the end of the buffer. + */ + if ( (yy_c_buf_p) < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] ) + /* This was really a NUL. */ + *(yy_c_buf_p) = '\0'; + + else + { /* need more input */ + int offset = (int) ((yy_c_buf_p) - (yytext_ptr)); + ++(yy_c_buf_p); + + switch ( yy_get_next_buffer( ) ) + { + case EOB_ACT_LAST_MATCH: + /* This happens because yy_g_n_b() + * sees that we've accumulated a + * token and flags that we need to + * try matching the token before + * proceeding. But for input(), + * there's no matching to consider. + * So convert the EOB_ACT_LAST_MATCH + * to EOB_ACT_END_OF_FILE. + */ + + /* Reset buffer status. */ + yyrestart( yyin ); + + /*FALLTHROUGH*/ + + case EOB_ACT_END_OF_FILE: + { + if ( yywrap( ) ) + return 0; + + if ( ! (yy_did_buffer_switch_on_eof) ) + YY_NEW_FILE; +#ifdef __cplusplus + return yyinput(); +#else + return input(); +#endif + } + + case EOB_ACT_CONTINUE_SCAN: + (yy_c_buf_p) = (yytext_ptr) + offset; + break; + } + } + } + + c = *(unsigned char *) (yy_c_buf_p); /* cast for 8-bit char's */ + *(yy_c_buf_p) = '\0'; /* preserve yytext */ + (yy_hold_char) = *++(yy_c_buf_p); + + return c; +} + +/** Immediately switch to a different input stream. + * @param input_file A readable stream. + * + * @note This function does not reset the start condition to @c INITIAL . + */ + void yyFlexLexer::yyrestart( std::istream& input_file ) +{ + + if ( ! YY_CURRENT_BUFFER ){ + yyensure_buffer_stack (); + YY_CURRENT_BUFFER_LVALUE = + yy_create_buffer( yyin, YY_BUF_SIZE ); + } + + yy_init_buffer( YY_CURRENT_BUFFER, input_file ); + yy_load_buffer_state( ); +} + +/** Delegate to the new version that takes an istream reference. + * @param input_file A readable stream. + * + * @note This function does not reset the start condition to @c INITIAL . + */ +void yyFlexLexer::yyrestart( std::istream* input_file ) +{ + if( ! input_file ) { + input_file = &yyin; + } + yyrestart( *input_file ); +} + +/** Switch to a different input buffer. + * @param new_buffer The new input buffer. + * + */ + void yyFlexLexer::yy_switch_to_buffer( YY_BUFFER_STATE new_buffer ) +{ + + /* TODO. We should be able to replace this entire function body + * with + * yypop_buffer_state(); + * yypush_buffer_state(new_buffer); + */ + yyensure_buffer_stack (); + if ( YY_CURRENT_BUFFER == new_buffer ) + return; + + if ( YY_CURRENT_BUFFER ) + { + /* Flush out information for old buffer. */ + *(yy_c_buf_p) = (yy_hold_char); + YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p); + YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars); + } + + YY_CURRENT_BUFFER_LVALUE = new_buffer; + yy_load_buffer_state( ); + + /* We don't actually know whether we did this switch during + * EOF (yywrap()) processing, but the only time this flag + * is looked at is after yywrap() is called, so it's safe + * to go ahead and always set it. + */ + (yy_did_buffer_switch_on_eof) = 1; +} + + void yyFlexLexer::yy_load_buffer_state() +{ + (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; + (yytext_ptr) = (yy_c_buf_p) = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos; + yyin.rdbuf(YY_CURRENT_BUFFER_LVALUE->yy_input_file); + (yy_hold_char) = *(yy_c_buf_p); +} + +/** Allocate and initialize an input buffer state. + * @param file A readable stream. + * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE. + * + * @return the allocated buffer state. + */ + YY_BUFFER_STATE yyFlexLexer::yy_create_buffer( std::istream& file, int size ) +{ + YY_BUFFER_STATE b; + + b = (YY_BUFFER_STATE) yyalloc( sizeof( struct yy_buffer_state ) ); + if ( ! b ) + YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" ); + + b->yy_buf_size = size; + + /* yy_ch_buf has to be 2 characters longer than the size given because + * we need to put in 2 end-of-buffer characters. + */ + b->yy_ch_buf = (char *) yyalloc( (yy_size_t) (b->yy_buf_size + 2) ); + if ( ! b->yy_ch_buf ) + YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" ); + + b->yy_is_our_buffer = 1; + + yy_init_buffer( b, file ); + + return b; +} + +/** Delegate creation of buffers to the new version that takes an istream reference. + * @param file A readable stream. + * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE. + * + * @return the allocated buffer state. + */ + YY_BUFFER_STATE yyFlexLexer::yy_create_buffer( std::istream* file, int size ) +{ + return yy_create_buffer( *file, size ); +} + +/** Destroy the buffer. + * @param b a buffer created with yy_create_buffer() + * + */ + void yyFlexLexer::yy_delete_buffer( YY_BUFFER_STATE b ) +{ + + if ( ! b ) + return; + + if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */ + YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0; + + if ( b->yy_is_our_buffer ) + yyfree( (void *) b->yy_ch_buf ); + + yyfree( (void *) b ); +} + +/* Initializes or reinitializes a buffer. + * This function is sometimes called more than once on the same buffer, + * such as during a yyrestart() or at EOF. + */ + void yyFlexLexer::yy_init_buffer( YY_BUFFER_STATE b, std::istream& file ) + +{ + int oerrno = errno; + + yy_flush_buffer( b ); + + b->yy_input_file = file.rdbuf(); + b->yy_fill_buffer = 1; + + /* If b is the current buffer, then yy_init_buffer was _probably_ + * called from yyrestart() or through yy_get_next_buffer. + * In that case, we don't want to reset the lineno or column. + */ + if (b != YY_CURRENT_BUFFER){ + b->yy_bs_lineno = 1; + b->yy_bs_column = 0; + } + + b->yy_is_interactive = 0; + errno = oerrno; +} + +/** Discard all buffered characters. On the next scan, YY_INPUT will be called. + * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER. + * + */ + void yyFlexLexer::yy_flush_buffer( YY_BUFFER_STATE b ) +{ + if ( ! b ) + return; + + b->yy_n_chars = 0; + + /* We always need two end-of-buffer characters. The first causes + * a transition to the end-of-buffer state. The second causes + * a jam in that state. + */ + b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR; + b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR; + + b->yy_buf_pos = &b->yy_ch_buf[0]; + + b->yy_at_bol = 1; + b->yy_buffer_status = YY_BUFFER_NEW; + + if ( b == YY_CURRENT_BUFFER ) + yy_load_buffer_state( ); +} + +/** Pushes the new state onto the stack. The new state becomes + * the current state. This function will allocate the stack + * if necessary. + * @param new_buffer The new state. + * + */ +void yyFlexLexer::yypush_buffer_state (YY_BUFFER_STATE new_buffer) +{ + if (new_buffer == NULL) + return; + + yyensure_buffer_stack(); + + /* This block is copied from yy_switch_to_buffer. */ + if ( YY_CURRENT_BUFFER ) + { + /* Flush out information for old buffer. */ + *(yy_c_buf_p) = (yy_hold_char); + YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p); + YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars); + } + + /* Only push if top exists. Otherwise, replace top. */ + if (YY_CURRENT_BUFFER) + (yy_buffer_stack_top)++; + YY_CURRENT_BUFFER_LVALUE = new_buffer; + + /* copied from yy_switch_to_buffer. */ + yy_load_buffer_state( ); + (yy_did_buffer_switch_on_eof) = 1; +} + +/** Removes and deletes the top of the stack, if present. + * The next element becomes the new top. + * + */ +void yyFlexLexer::yypop_buffer_state (void) +{ + if (!YY_CURRENT_BUFFER) + return; + + yy_delete_buffer(YY_CURRENT_BUFFER ); + YY_CURRENT_BUFFER_LVALUE = NULL; + if ((yy_buffer_stack_top) > 0) + --(yy_buffer_stack_top); + + if (YY_CURRENT_BUFFER) { + yy_load_buffer_state( ); + (yy_did_buffer_switch_on_eof) = 1; + } +} + +/* Allocates the stack if it does not exist. + * Guarantees space for at least one push. + */ +void yyFlexLexer::yyensure_buffer_stack(void) +{ + yy_size_t num_to_alloc; + + if (!(yy_buffer_stack)) { + + /* First allocation is just for 2 elements, since we don't know if this + * scanner will even need a stack. We use 2 instead of 1 to avoid an + * immediate realloc on the next call. + */ + num_to_alloc = 1; /* After all that talk, this was set to 1 anyways... */ + (yy_buffer_stack) = (struct yy_buffer_state**)yyalloc + (num_to_alloc * sizeof(struct yy_buffer_state*) + ); + if ( ! (yy_buffer_stack) ) + YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" ); + + memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*)); + + (yy_buffer_stack_max) = num_to_alloc; + (yy_buffer_stack_top) = 0; + return; + } + + if ((yy_buffer_stack_top) >= ((yy_buffer_stack_max)) - 1){ + + /* Increase the buffer to prepare for a possible push. */ + yy_size_t grow_size = 8 /* arbitrary grow size */; + + num_to_alloc = (yy_buffer_stack_max) + grow_size; + (yy_buffer_stack) = (struct yy_buffer_state**)yyrealloc + ((yy_buffer_stack), + num_to_alloc * sizeof(struct yy_buffer_state*) + ); + if ( ! (yy_buffer_stack) ) + YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" ); + + /* zero only the new slots.*/ + memset((yy_buffer_stack) + (yy_buffer_stack_max), 0, grow_size * sizeof(struct yy_buffer_state*)); + (yy_buffer_stack_max) = num_to_alloc; + } +} + + void yyFlexLexer::yy_push_state( int _new_state ) +{ + if ( (yy_start_stack_ptr) >= (yy_start_stack_depth) ) + { + yy_size_t new_size; + + (yy_start_stack_depth) += YY_START_STACK_INCR; + new_size = (yy_size_t) (yy_start_stack_depth) * sizeof( int ); + + if ( ! (yy_start_stack) ) + (yy_start_stack) = (int *) yyalloc( new_size ); + + else + (yy_start_stack) = (int *) yyrealloc( + (void *) (yy_start_stack), new_size ); + + if ( ! (yy_start_stack) ) + YY_FATAL_ERROR( "out of memory expanding start-condition stack" ); + } + + (yy_start_stack)[(yy_start_stack_ptr)++] = YY_START; + + BEGIN(_new_state); +} + + void yyFlexLexer::yy_pop_state() +{ + if ( --(yy_start_stack_ptr) < 0 ) + YY_FATAL_ERROR( "start-condition stack underflow" ); + + BEGIN((yy_start_stack)[(yy_start_stack_ptr)]); +} + + int yyFlexLexer::yy_top_state() +{ + return (yy_start_stack)[(yy_start_stack_ptr) - 1]; +} + +#ifndef YY_EXIT_FAILURE +#define YY_EXIT_FAILURE 2 +#endif + +void yyFlexLexer::LexerError( const char* msg ) +{ + std::cerr << msg << std::endl; + exit( YY_EXIT_FAILURE ); +} + +/* Redefine yyless() so it works in section 3 code. */ + +#undef yyless +#define yyless(n) \ + do \ + { \ + /* Undo effects of setting up yytext. */ \ + int yyless_macro_arg = (n); \ + YY_LESS_LINENO(yyless_macro_arg);\ + yytext[yyleng] = (yy_hold_char); \ + (yy_c_buf_p) = yytext + yyless_macro_arg; \ + (yy_hold_char) = *(yy_c_buf_p); \ + *(yy_c_buf_p) = '\0'; \ + yyleng = yyless_macro_arg; \ + } \ + while ( 0 ) + +/* Accessor methods (get/set functions) to struct members. */ + +/* + * Internal utility routines. + */ + +#ifndef yytext_ptr +static void yy_flex_strncpy (char* s1, const char * s2, int n ) +{ + + int i; + for ( i = 0; i < n; ++i ) + s1[i] = s2[i]; +} +#endif + +#ifdef YY_NEED_STRLEN +static int yy_flex_strlen (const char * s ) +{ + int n; + for ( n = 0; s[n]; ++n ) + ; + + return n; +} +#endif + +void *yyalloc (yy_size_t size ) +{ + return malloc(size); +} + +void *yyrealloc (void * ptr, yy_size_t size ) +{ + + /* The cast to (char *) in the following accommodates both + * implementations that use char* generic pointers, and those + * that use void* generic pointers. It works with the latter + * because both ANSI C and C++ allow castless assignment from + * any pointer type to void*, and deal with argument conversions + * as though doing an assignment. + */ + return realloc(ptr, size); +} + +void yyfree (void * ptr ) +{ + free( (char *) ptr ); /* see yyrealloc() for (char *) cast */ +} + +#define YYTABLES_NAME "yytables" + +/************************************/ +/* Section 3 */ +/* auxiliary procedures */ + +exptocas::scanner::scanner(std::istream* in, std::ostream* out) + : exptocasFlexLexer(in, out) +{ +} + +/* +int main ( void ) +{ + yylex(); +} +*/ + diff --git a/src/ExpToCasExe/occt_existed_step_entities.lst b/src/ExpToCasExe/occt_existed_step_entities.lst new file mode 100644 index 0000000000..290db61a95 --- /dev/null +++ b/src/ExpToCasExe/occt_existed_step_entities.lst @@ -0,0 +1,942 @@ +# Last update 27.10.2021 +#=============================================== +# package StepAP203 +#=============================================== +ApprovedItem StepAP203 +CcDesignApproval StepAP203 +CcDesignCertification StepAP203 +CcDesignContract StepAP203 +CcDesignDateAndTimeAssignment StepAP203 +CcDesignPersonAndOrganizationAssignment StepAP203 +CcDesignSecurityClassification StepAP203 +CcDesignSpecificationReference StepAP203 +CertifiedItem StepAP203 +Change StepAP203 +ChangeRequest StepAP203 +ChangeRequestItem StepAP203 +ClassifiedItem StepAP203 +ContractedItem StepAP203 +DateTimeItem StepAP203 +PersonOrganizationItem StepAP203 +SpecifiedItem StepAP203 +StartRequest StepAP203 +StartRequestItem StepAP203 +StartWork StepAP203 +WorkItem StepAP203 + +#=============================================== +# package StepAP214 +#=============================================== +AppliedApprovalAssignment StepAP214 +AppliedDateAndTimeAssignment StepAP214 +AppliedDateAssignment StepAP214 +AppliedDocumentReference StepAP214 +AppliedExternalIdentificationAssignment StepAP214 +AppliedGroupAssignment StepAP214 +AppliedOrganizationAssignment StepAP214 +AppliedPersonAndOrganizationAssignment StepAP214 +AppliedPresentedItem StepAP214 +AppliedSecurityClassificationAssignment StepAP214 +ApprovalItem StepAP214 +AutoDesignActualDateAndTimeAssignment StepAP214 +AutoDesignActualDateAssignment StepAP214 +AutoDesignApprovalAssignment StepAP214 +AutoDesignDateAndPersonAssignment StepAP214 +AutoDesignDateAndPersonItem StepAP214 +AutoDesignDateAndTimeItem StepAP214 +AutoDesignDatedItem StepAP214 +AutoDesignDocumentReference StepAP214 +AutoDesignGeneralOrgItem StepAP214 +AutoDesignGroupAssignment StepAP214 +AutoDesignGroupedItem StepAP214 +AutoDesignNominalDateAndTimeAssignment StepAP214 +AutoDesignNominalDateAssignment StepAP214 +AutoDesignOrganizationAssignment StepAP214 +AutoDesignOrganizationItem StepAP214 +AutoDesignPersonAndOrganizationAssignment StepAP214 +AutoDesignPresentedItem StepAP214 +AutoDesignPresentedItemSelect StepAP214 +AutoDesignReferencingItem StepAP214 +AutoDesignSecurityClassificationAssignment StepAP214 +Class StepAP214 +DateAndTimeItem StepAP214 +DateItem StepAP214 +DocumentReferenceItem StepAP214 +ExternalIdentificationItem StepAP214 +ExternallyDefinedClass StepAP214 +ExternallyDefinedGeneralProperty StepAP214 +GroupItem StepAP214 +OrganizationItem StepAP214 +PersonAndOrganizationItem StepAP214 +PresentedItemSelect StepAP214 +Protocol StepAP214 +RepItemGroup StepAP214 +SecurityClassificationItem StepAP214 + +#=============================================== +# package StepAP242 +#=============================================== +DraughtingModelItemAssociation StepAP242 +GeometricItemSpecificUsage StepAP242 +IdAttribute StepAP242 +IdAttributeSelect StepAP242 +ItemIdentifiedRepresentationUsage StepAP242 +ItemIdentifiedRepresentationUsageDefinition StepAP242 + +#=============================================== +# package StepBasic +#=============================================== +Action StepBasic +ActionAssignment StepBasic +ActionMethod StepBasic +ActionRequestAssignment StepBasic +ActionRequestSolution StepBasic +Address StepBasic +AheadOrBehind StepBasic +ApplicationContext StepBasic +ApplicationContextElement StepBasic +ApplicationProtocolDefinition StepBasic +Approval StepBasic +ApprovalAssignment StepBasic +ApprovalDateTime StepBasic +ApprovalPersonOrganization StepBasic +ApprovalRelationship StepBasic +ApprovalRole StepBasic +ApprovalStatus StepBasic +AreaUnit StepBasic +CalendarDate StepBasic +Certification StepBasic +CertificationAssignment StepBasic +CertificationType StepBasic +CharacterizedObject StepBasic +Contract StepBasic +ContractAssignment StepBasic +ContractType StepBasic +ConversionBasedUnit StepBasic +ConversionBasedUnitAndAreaUnit StepBasic +ConversionBasedUnitAndLengthUnit StepBasic +ConversionBasedUnitAndMassUnit StepBasic +ConversionBasedUnitAndPlaneAngleUnit StepBasic +ConversionBasedUnitAndRatioUnit StepBasic +ConversionBasedUnitAndSolidAngleUnit StepBasic +ConversionBasedUnitAndTimeUnit StepBasic +ConversionBasedUnitAndVolumeUnit StepBasic +CoordinatedUniversalTimeOffset StepBasic +Date StepBasic +DateAndTime StepBasic +DateAndTimeAssignment StepBasic +DateAssignment StepBasic +DateRole StepBasic +DateTimeRole StepBasic +DateTimeSelect StepBasic +DerivedUnit StepBasic +DerivedUnitElement StepBasic +DesignContext StepBasic +DigitalDocument StepBasic +DimensionalExponents StepBasic +Document StepBasic +DocumentFile StepBasic +DocumentProductAssociation StepBasic +DocumentProductEquivalence StepBasic +DocumentReference StepBasic +DocumentRelationship StepBasic +DocumentRepresentationType StepBasic +DocumentType StepBasic +DocumentUsageConstraint StepBasic +Effectivity StepBasic +EffectivityAssignment StepBasic +EulerAngles StepBasic +ExternalIdentificationAssignment StepBasic +ExternallyDefinedItem StepBasic +ExternalSource StepBasic +GeneralProperty StepBasic +Group StepBasic +GroupAssignment StepBasic +GroupRelationship StepBasic +IdentificationAssignment StepBasic +IdentificationRole StepBasic +LengthMeasureWithUnit StepBasic +LengthUnit StepBasic +LocalTime StepBasic +MassMeasureWithUnit StepBasic +MassUnit StepBasic +MeasureValueMember StepBasic +MeasureWithUnit StepBasic +MechanicalContext StepBasic +NameAssignment StepBasic +NamedUnit StepBasic +ObjectRole StepBasic +OrdinalDate StepBasic +Organization StepBasic +OrganizationalAddress StepBasic +OrganizationAssignment StepBasic +OrganizationRole StepBasic +Person StepBasic +PersonalAddress StepBasic +PersonAndOrganization StepBasic +PersonAndOrganizationAssignment StepBasic +PersonAndOrganizationRole StepBasic +PersonOrganizationSelect StepBasic +PhysicallyModeledProductDefinition StepBasic +PlaneAngleMeasureWithUnit StepBasic +PlaneAngleUnit StepBasic +Product StepBasic +ProductCategory StepBasic +ProductCategoryRelationship StepBasic +ProductConceptContext StepBasic +ProductContext StepBasic +ProductDefinition StepBasic +ProductDefinitionContext StepBasic +ProductDefinitionEffectivity StepBasic +ProductDefinitionFormation StepBasic +ProductDefinitionFormationRelationship StepBasic +ProductDefinitionFormationWithSpecifiedSource StepBasic +ProductDefinitionOrReference StepBasic +ProductDefinitionReference StepBasic +ProductDefinitionReferenceWithLocalRepresentation StepBasic +ProductDefinitionRelationship StepBasic +ProductDefinitionWithAssociatedDocuments StepBasic +ProductOrFormationOrDefinition StepBasic +ProductRelatedProductCategory StepBasic +ProductType StepBasic +RatioMeasureWithUnit StepBasic +RatioUnit StepBasic +RoleAssociation StepBasic +RoleSelect StepBasic +SecurityClassification StepBasic +SecurityClassificationAssignment StepBasic +SecurityClassificationLevel StepBasic +SiPrefix StepBasic +SiUnit StepBasic +SiUnitAndAreaUnit StepBasic +SiUnitAndLengthUnit StepBasic +SiUnitAndMassUnit StepBasic +SiUnitAndPlaneAngleUnit StepBasic +SiUnitAndRatioUnit StepBasic +SiUnitAndSolidAngleUnit StepBasic +SiUnitAndThermodynamicTemperatureUnit StepBasic +SiUnitAndTimeUnit StepBasic +SiUnitAndVolumeUnit StepBasic +SiUnitName StepBasic +SizeMember StepBasic +SizeSelect StepBasic +SolidAngleMeasureWithUnit StepBasic +SolidAngleUnit StepBasic +Source StepBasic +SourceItem StepBasic +ThermodynamicTemperatureUnit StepBasic +TimeMeasureWithUnit StepBasic +TimeUnit StepBasic +UncertaintyMeasureWithUnit StepBasic +Unit StepBasic +VersionedActionRequest StepBasic +VolumeUnit StepBasic +WeekOfYearAndDayDate StepBasic + +#=============================================== +# package StepDimTol +#=============================================== +AngularityTolerance StepDimTol +AreaUnitType StepDimTol +CircularRunoutTolerance StepDimTol +CoaxialityTolerance StepDimTol +CommonDatum StepDimTol +ConcentricityTolerance StepDimTol +CylindricityTolerance StepDimTol +Datum StepDimTol +DatumFeature StepDimTol +DatumOrCommonDatum StepDimTol +DatumReference StepDimTol +DatumReferenceCompartment StepDimTol +DatumReferenceElement StepDimTol +DatumReferenceModifier StepDimTol +DatumReferenceModifierType StepDimTol +DatumReferenceModifierWithValue StepDimTol +DatumSystem StepDimTol +DatumSystemOrReference StepDimTol +DatumTarget StepDimTol +FlatnessTolerance StepDimTol +GeneralDatumReference StepDimTol +GeometricTolerance StepDimTol +GeometricToleranceModifier StepDimTol +GeometricToleranceRelationship StepDimTol +GeometricToleranceTarget StepDimTol +GeometricToleranceType StepDimTol +GeometricToleranceWithDatumReference StepDimTol +GeometricToleranceWithDefinedAreaUnit StepDimTol +GeometricToleranceWithDefinedUnit StepDimTol +GeometricToleranceWithMaximumTolerance StepDimTol +GeometricToleranceWithModifiers StepDimTol +GeoTolAndGeoTolWthDatRef StepDimTol +GeoTolAndGeoTolWthDatRefAndGeoTolWthMaxTol StepDimTol +GeoTolAndGeoTolWthDatRefAndGeoTolWthMod StepDimTol +GeoTolAndGeoTolWthDatRefAndModGeoTolAndPosTol StepDimTol +GeoTolAndGeoTolWthDatRefAndUneqDisGeoTol StepDimTol +GeoTolAndGeoTolWthMaxTol StepDimTol +GeoTolAndGeoTolWthMod StepDimTol +LimitCondition StepDimTol +LineProfileTolerance StepDimTol +ModifiedGeometricTolerance StepDimTol +NonUniformZoneDefinition StepDimTol +ParallelismTolerance StepDimTol +PerpendicularityTolerance StepDimTol +PlacedDatumTargetFeature StepDimTol +PositionTolerance StepDimTol +ProjectedZoneDefinition StepDimTol +RoundnessTolerance StepDimTol +RunoutZoneDefinition StepDimTol +RunoutZoneOrientation StepDimTol +ShapeToleranceSelect StepDimTol +SimpleDatumReferenceModifier StepDimTol +SimpleDatumReferenceModifierMember StepDimTol +StraightnessTolerance StepDimTol +SurfaceProfileTolerance StepDimTol +SymmetryTolerance StepDimTol +ToleranceZone StepDimTol +ToleranceZoneDefinition StepDimTol +ToleranceZoneForm StepDimTol +ToleranceZoneTarget StepDimTol +TotalRunoutTolerance StepDimTol +UnequallyDisposedGeometricTolerance StepDimTol + +#=============================================== +# package StepElement +#=============================================== +AnalysisItemWithinRepresentation StepElement +Curve3dElementDescriptor StepElement +CurveEdge StepElement +CurveElementEndReleasePacket StepElement +CurveElementFreedom StepElement +CurveElementFreedomMember StepElement +CurveElementPurpose StepElement +CurveElementPurposeMember StepElement +CurveElementSectionDefinition StepElement +CurveElementSectionDerivedDefinitions StepElement +Element2dShape StepElement +ElementAspect StepElement +ElementAspectMember StepElement +ElementDescriptor StepElement +ElementMaterial StepElement +ElementOrder StepElement +ElementVolume StepElement +EnumeratedCurveElementFreedom StepElement +EnumeratedCurveElementPurpose StepElement +EnumeratedSurfaceElementPurpose StepElement +EnumeratedVolumeElementPurpose StepElement +MeasureOrUnspecifiedValue StepElement +MeasureOrUnspecifiedValueMember StepElement +Surface3dElementDescriptor StepElement +SurfaceElementProperty StepElement +SurfaceElementPurpose StepElement +SurfaceElementPurposeMember StepElement +SurfaceSection StepElement +SurfaceSectionField StepElement +SurfaceSectionFieldConstant StepElement +SurfaceSectionFieldVarying StepElement +UniformSurfaceSection StepElement +UnspecifiedValue StepElement +Volume3dElementDescriptor StepElement +Volume3dElementShape StepElement +VolumeElementPurpose StepElement +VolumeElementPurposeMember StepElement + +#=============================================== +# package StepFEA +#=============================================== +AlignedCurve3dElementCoordinateSystem StepFEA +AlignedSurface3dElementCoordinateSystem StepFEA +ArbitraryVolume3dElementCoordinateSystem StepFEA +ConstantSurface3dElementCoordinateSystem StepFEA +CoordinateSystemType StepFEA +Curve3dElementProperty StepFEA +Curve3dElementRepresentation StepFEA +CurveEdge StepFEA +CurveElementEndCoordinateSystem StepFEA +CurveElementEndOffset StepFEA +CurveElementEndRelease StepFEA +CurveElementInterval StepFEA +CurveElementIntervalConstant StepFEA +CurveElementIntervalLinearlyVarying StepFEA +CurveElementLocation StepFEA +DegreeOfFreedom StepFEA +DegreeOfFreedomMember StepFEA +DummyNode StepFEA +ElementGeometricRelationship StepFEA +ElementGroup StepFEA +ElementOrElementGroup StepFEA +ElementRepresentation StepFEA +ElementVolume StepFEA +EnumeratedDegreeOfFreedom StepFEA +FeaAreaDensity StepFEA +FeaAxis2Placement3d StepFEA +FeaCurveSectionGeometricRelationship StepFEA +FeaGroup StepFEA +FeaLinearElasticity StepFEA +FeaMassDensity StepFEA +FeaMaterialPropertyRepresentation StepFEA +FeaMaterialPropertyRepresentationItem StepFEA +FeaModel StepFEA +FeaModel3d StepFEA +FeaModelDefinition StepFEA +FeaMoistureAbsorption StepFEA +FeaParametricPoint StepFEA +FeaRepresentationItem StepFEA +FeaSecantCoefficientOfLinearThermalExpansion StepFEA +FeaShellBendingStiffness StepFEA +FeaShellMembraneBendingCouplingStiffness StepFEA +FeaShellMembraneStiffness StepFEA +FeaShellShearStiffness StepFEA +FeaSurfaceSectionGeometricRelationship StepFEA +FeaTangentialCoefficientOfLinearThermalExpansion StepFEA +FreedomAndCoefficient StepFEA +FreedomsList StepFEA +GeometricNode StepFEA +Node StepFEA +NodeDefinition StepFEA +NodeGroup StepFEA +NodeRepresentation StepFEA +NodeSet StepFEA +NodeWithSolutionCoordinateSystem StepFEA +NodeWithVector StepFEA +ParametricCurve3dElementCoordinateDirection StepFEA +ParametricCurve3dElementCoordinateSystem StepFEA +ParametricSurface3dElementCoordinateSystem StepFEA +Surface3dElementRepresentation StepFEA +SymmetricTensor22d StepFEA +SymmetricTensor23d StepFEA +SymmetricTensor23dMember StepFEA +SymmetricTensor42d StepFEA +SymmetricTensor43d StepFEA +SymmetricTensor43dMember StepFEA +UnspecifiedValue StepFEA +Volume3dElementRepresentation StepFEA + +#=============================================== +# package StepGeom +#=============================================== +Axis1Placement StepGeom +Axis2Placement StepGeom +Axis2Placement2d StepGeom +Axis2Placement3d StepGeom +BezierCurve StepGeom +BezierCurveAndRationalBSplineCurve StepGeom +BezierSurface StepGeom +BezierSurfaceAndRationalBSplineSurface StepGeom +BoundaryCurve StepGeom +BoundedCurve StepGeom +BoundedSurface StepGeom +BSplineCurve StepGeom +BSplineCurveForm StepGeom +BSplineCurveWithKnots StepGeom +BSplineCurveWithKnotsAndRationalBSplineCurve StepGeom +BSplineSurface StepGeom +BSplineSurfaceForm StepGeom +BSplineSurfaceWithKnots StepGeom +BSplineSurfaceWithKnotsAndRationalBSplineSurface StepGeom +CartesianPoint StepGeom +CartesianTransformationOperator StepGeom +CartesianTransformationOperator2d StepGeom +CartesianTransformationOperator3d StepGeom +Circle StepGeom +CompositeCurve StepGeom +CompositeCurveOnSurface StepGeom +CompositeCurveSegment StepGeom +Conic StepGeom +ConicalSurface StepGeom +Curve StepGeom +CurveBoundedSurface StepGeom +CurveOnSurface StepGeom +CurveReplica StepGeom +CylindricalSurface StepGeom +DegeneratePcurve StepGeom +DegenerateToroidalSurface StepGeom +Direction StepGeom +ElementarySurface StepGeom +Ellipse StepGeom +EvaluatedDegeneratePcurve StepGeom +GeometricRepresentationContext StepGeom +GeometricRepresentationContextAndGlobalUnitAssignedContext StepGeom +GeometricRepresentationContextAndParametricRepresentationContext StepGeom +GeometricRepresentationItem StepGeom +GeomRepContextAndGlobUnitAssCtxAndGlobUncertaintyAssCtx StepGeom +Hyperbola StepGeom +IntersectionCurve StepGeom +KnotType StepGeom +Line StepGeom +OffsetCurve3d StepGeom +OffsetSurface StepGeom +OrientedSurface StepGeom +OuterBoundaryCurve StepGeom +Parabola StepGeom +Pcurve StepGeom +PcurveOrSurface StepGeom +Placement StepGeom +Plane StepGeom +Point StepGeom +PointOnCurve StepGeom +PointOnSurface StepGeom +PointReplica StepGeom +Polyline StepGeom +PreferredSurfaceCurveRepresentation StepGeom +QuasiUniformCurve StepGeom +QuasiUniformCurveAndRationalBSplineCurve StepGeom +QuasiUniformSurface StepGeom +QuasiUniformSurfaceAndRationalBSplineSurface StepGeom +RationalBSplineCurve StepGeom +RationalBSplineSurface StepGeom +RectangularCompositeSurface StepGeom +RectangularTrimmedSurface StepGeom +ReparametrisedCompositeCurveSegment StepGeom +SeamCurve StepGeom +SphericalSurface StepGeom +SuParameters StepGeom +Surface StepGeom +SurfaceBoundary StepGeom +SurfaceCurve StepGeom +SurfaceCurveAndBoundedCurve StepGeom +SurfaceOfLinearExtrusion StepGeom +SurfaceOfRevolution StepGeom +SurfacePatch StepGeom +SurfaceReplica StepGeom +SweptSurface StepGeom +ToroidalSurface StepGeom +TransitionCode StepGeom +TrimmedCurve StepGeom +TrimmingMember StepGeom +TrimmingPreference StepGeom +TrimmingSelect StepGeom +UniformCurve StepGeom +UniformCurveAndRationalBSplineCurve StepGeom +UniformSurface StepGeom +UniformSurfaceAndRationalBSplineSurface StepGeom +Vector StepGeom +VectorOrDirection StepGeom + +#=============================================== +# package StepKinematics +#=============================================== +ActuatedDirection StepKinematics +ActuatedKinematicPair StepKinematics +ActuatedKinPairAndOrderKinPair StepKinematics +ContextDependentKinematicLinkRepresentation StepKinematics +CylindricalPair StepKinematics +CylindricalPairValue StepKinematics +CylindricalPairWithRange StepKinematics +FullyConstrainedPair StepKinematics +GearPair StepKinematics +GearPairValue StepKinematics +GearPairWithRange StepKinematics +HighOrderKinematicPair StepKinematics +HomokineticPair StepKinematics +KinematicJoint StepKinematics +KinematicLink StepKinematics +KinematicLinkRepresentation StepKinematics +KinematicLinkRepresentationAssociation StepKinematics +KinematicPair StepKinematics +KinematicPropertyDefinitionRepresentation StepKinematics +KinematicPropertyMechanismRepresentation StepKinematics +KinematicTopologyDirectedStructure StepKinematics +KinematicTopologyNetworkStructure StepKinematics +KinematicTopologyRepresentationSelect StepKinematics +KinematicTopologyStructure StepKinematics +LinearFlexibleAndPinionPair StepKinematics +LinearFlexibleAndPlanarCurvePair StepKinematics +LinearFlexibleLinkRepresentation StepKinematics +LowOrderKinematicPair StepKinematics +LowOrderKinematicPairValue StepKinematics +LowOrderKinematicPairWithMotionCoupling StepKinematics +LowOrderKinematicPairWithRange StepKinematics +MechanismRepresentation StepKinematics +MechanismStateRepresentation StepKinematics +OrientedJoint StepKinematics +PairRepresentationRelationship StepKinematics +PairValue StepKinematics +PlanarCurvePair StepKinematics +PlanarCurvePairRange StepKinematics +PlanarPair StepKinematics +PlanarPairValue StepKinematics +PlanarPairWithRange StepKinematics +PointOnPlanarCurvePair StepKinematics +PointOnPlanarCurvePairValue StepKinematics +PointOnPlanarCurvePairWithRange StepKinematics +PointOnSurfacePair StepKinematics +PointOnSurfacePairValue StepKinematics +PointOnSurfacePairWithRange StepKinematics +PrismaticPair StepKinematics +PrismaticPairValue StepKinematics +PrismaticPairWithRange StepKinematics +ProductDefinitionKinematics StepKinematics +ProductDefinitionRelationshipKinematics StepKinematics +RackAndPinionPair StepKinematics +RackAndPinionPairValue StepKinematics +RackAndPinionPairWithRange StepKinematics +RevolutePair StepKinematics +RevolutePairValue StepKinematics +RevolutePairWithRange StepKinematics +RigidLinkRepresentation StepKinematics +RigidPlacement StepKinematics +RollingCurvePair StepKinematics +RollingCurvePairValue StepKinematics +RollingSurfacePair StepKinematics +RollingSurfacePairValue StepKinematics +RotationAboutDirection StepKinematics +ScrewPair StepKinematics +ScrewPairValue StepKinematics +ScrewPairWithRange StepKinematics +SlidingCurvePair StepKinematics +SlidingCurvePairValue StepKinematics +SlidingSurfacePair StepKinematics +SlidingSurfacePairValue StepKinematics +SpatialRotation StepKinematics +SphericalPair StepKinematics +SphericalPairSelect StepKinematics +SphericalPairValue StepKinematics +SphericalPairWithPin StepKinematics +SphericalPairWithPinAndRange StepKinematics +SphericalPairWithRange StepKinematics +SurfacePair StepKinematics +SurfacePairWithRange StepKinematics +UnconstrainedPair StepKinematics +UnconstrainedPairValue StepKinematics +UniversalPair StepKinematics +UniversalPairValue StepKinematics +UniversalPairWithRange StepKinematics + +#=============================================== +# package StepRepr +#=============================================== +AllAroundShapeAspect StepRepr +Apex StepRepr +AssemblyComponentUsage StepRepr +AssemblyComponentUsageSubstitute StepRepr +BetweenShapeAspect StepRepr +CentreOfSymmetry StepRepr +CharacterizedDefinition StepRepr +CharacterizedRepresentation StepRepr +CompGroupShAspAndCompShAspAndDatumFeatAndShAsp StepRepr +CompositeGroupShapeAspect StepRepr +CompositeShapeAspect StepRepr +CompoundRepresentationItem StepRepr +CompShAspAndDatumFeatAndShAsp StepRepr +ConfigurationDesign StepRepr +ConfigurationDesignItem StepRepr +ConfigurationEffectivity StepRepr +ConfigurationItem StepRepr +ConstructiveGeometryRepresentation StepRepr +ConstructiveGeometryRepresentationRelationship StepRepr +ContinuosShapeAspect StepRepr +DataEnvironment StepRepr +DefinitionalRepresentation StepRepr +DerivedShapeAspect StepRepr +DescriptiveRepresentationItem StepRepr +Extension StepRepr +ExternallyDefinedRepresentation StepRepr +FeatureForDatumTargetRelationship StepRepr +FunctionallyDefinedTransformation StepRepr +GeometricAlignment StepRepr +GlobalUncertaintyAssignedContext StepRepr +GlobalUnitAssignedContext StepRepr +IntegerRepresentationItem StepRepr +ItemDefinedTransformation StepRepr +MakeFromUsageOption StepRepr +MappedItem StepRepr +MaterialDesignation StepRepr +MaterialProperty StepRepr +MaterialPropertyRepresentation StepRepr +MeasureRepresentationItem StepRepr +NextAssemblyUsageOccurrence StepRepr +ParallelOffset StepRepr +ParametricRepresentationContext StepRepr +PerpendicularTo StepRepr +ProductConcept StepRepr +ProductDefinitionShape StepRepr +ProductDefinitionUsage StepRepr +PromissoryUsageOccurrence StepRepr +PropertyDefinition StepRepr +PropertyDefinitionRelationship StepRepr +PropertyDefinitionRepresentation StepRepr +QuantifiedAssemblyComponentUsage StepRepr +Representation StepRepr +RepresentationContext StepRepr +RepresentationContextReference StepRepr +RepresentationItem StepRepr +RepresentationMap StepRepr +RepresentationOrRepresentationReference StepRepr +RepresentationReference StepRepr +RepresentationRelationship StepRepr +RepresentationRelationshipWithTransformation StepRepr +RepresentedDefinition StepRepr +ReprItemAndLengthMeasureWithUnit StepRepr +ReprItemAndLengthMeasureWithUnitAndQRI StepRepr +ReprItemAndMeasureWithUnit StepRepr +ReprItemAndMeasureWithUnitAndQRI StepRepr +ReprItemAndPlaneAngleMeasureWithUnit StepRepr +ReprItemAndPlaneAngleMeasureWithUnitAndQRI StepRepr +ShapeAspect StepRepr +ShapeAspectDerivingRelationship StepRepr +ShapeAspectRelationship StepRepr +ShapeAspectTransition StepRepr +ShapeDefinition StepRepr +ShapeRepresentationRelationship StepRepr +ShapeRepresentationRelationshipWithTransformation StepRepr +SpecifiedHigherUsageOccurrence StepRepr +StructuralResponseProperty StepRepr +StructuralResponsePropertyDefinitionRepresentation StepRepr +SuppliedPartRelationship StepRepr +Tangent StepRepr +Transformation StepRepr +ValueRange StepRepr +ValueRepresentationItem StepRepr + +#=============================================== +# package StepShape +#=============================================== +AdvancedBrepShapeRepresentation StepShape +AdvancedFace StepShape +AngleRelator StepShape +AngularLocation StepShape +AngularSize StepShape +Block StepShape +BooleanOperand StepShape +BooleanOperator StepShape +BooleanResult StepShape +BoxDomain StepShape +BoxedHalfSpace StepShape +BrepWithVoids StepShape +ClosedShell StepShape +CompoundShapeRepresentation StepShape +ConnectedEdgeSet StepShape +ConnectedFaceSet StepShape +ConnectedFaceShapeRepresentation StepShape +ConnectedFaceSubSet StepShape +ContextDependentShapeRepresentation StepShape +CsgPrimitive StepShape +CsgSelect StepShape +CsgShapeRepresentation StepShape +CsgSolid StepShape +DefinitionalRepresentationAndShapeRepresentation StepShape +DimensionalCharacteristic StepShape +DimensionalCharacteristicRepresentation StepShape +DimensionalLocation StepShape +DimensionalLocationWithPath StepShape +DimensionalSize StepShape +DimensionalSizeWithPath StepShape +DirectedDimensionalLocation StepShape +Edge StepShape +EdgeBasedWireframeModel StepShape +EdgeBasedWireframeShapeRepresentation StepShape +EdgeCurve StepShape +EdgeLoop StepShape +ExtrudedAreaSolid StepShape +ExtrudedFaceSolid StepShape +Face StepShape +FaceBasedSurfaceModel StepShape +FaceBound StepShape +FaceOuterBound StepShape +FaceSurface StepShape +FacetedBrep StepShape +FacetedBrepAndBrepWithVoids StepShape +FacetedBrepShapeRepresentation StepShape +GeometricallyBoundedSurfaceShapeRepresentation StepShape +GeometricallyBoundedWireframeShapeRepresentation StepShape +GeometricCurveSet StepShape +GeometricSet StepShape +GeometricSetSelect StepShape +HalfSpaceSolid StepShape +LimitsAndFits StepShape +Loop StepShape +LoopAndPath StepShape +ManifoldSolidBrep StepShape +ManifoldSurfaceShapeRepresentation StepShape +MeasureQualification StepShape +MeasureRepresentationItemAndQualifiedRepresentationItem StepShape +NonManifoldSurfaceShapeRepresentation StepShape +OpenShell StepShape +OrientedClosedShell StepShape +OrientedEdge StepShape +OrientedFace StepShape +OrientedOpenShell StepShape +OrientedPath StepShape +Path StepShape +PlusMinusTolerance StepShape +PointRepresentation StepShape +PolyLoop StepShape +PrecisionQualifier StepShape +QualifiedRepresentationItem StepShape +ReversibleTopologyItem StepShape +RevolvedAreaSolid StepShape +RevolvedFaceSolid StepShape +RightAngularWedge StepShape +RightCircularCone StepShape +RightCircularCylinder StepShape +SeamEdge StepShape +ShapeDefinitionRepresentation StepShape +ShapeDimensionRepresentation StepShape +ShapeDimensionRepresentationItem StepShape +ShapeRepresentation StepShape +ShapeRepresentationWithParameters StepShape +Shell StepShape +ShellBasedSurfaceModel StepShape +SolidModel StepShape +SolidReplica StepShape +Sphere StepShape +Subedge StepShape +Subface StepShape +SurfaceModel StepShape +SweptAreaSolid StepShape +SweptFaceSolid StepShape +ToleranceMethodDefinition StepShape +ToleranceValue StepShape +TopologicalRepresentationItem StepShape +Torus StepShape +TransitionalShapeRepresentation StepShape +TypeQualifier StepShape +ValueFormatTypeQualifier StepShape +ValueQualifier StepShape +Vertex StepShape +VertexLoop StepShape +VertexPoint StepShape + +#=============================================== +# package StepVisual +#=============================================== +AnnotationCurveOccurrence StepVisual +AnnotationCurveOccurrenceAndGeomReprItem StepVisual +AnnotationFillArea StepVisual +AnnotationFillAreaOccurrence StepVisual +AnnotationOccurrence StepVisual +AnnotationPlane StepVisual +AnnotationPlaneElement StepVisual +AnnotationText StepVisual +AnnotationTextOccurrence StepVisual +AreaInSet StepVisual +AreaOrView StepVisual +BackgroundColour StepVisual +BoxCharacteristicSelect StepVisual +CameraImage StepVisual +CameraImage2dWithScale StepVisual +CameraImage3dWithScale StepVisual +CameraModel StepVisual +CameraModelD2 StepVisual +CameraModelD3 StepVisual +CameraModelD3MultiClipping StepVisual +CameraModelD3MultiClippingInterectionSelect StepVisual +CameraModelD3MultiClippingIntersection StepVisual +CameraModelD3MultiClippingUnion StepVisual +CameraModelD3MultiClippingUnionSelect StepVisual +CameraUsage StepVisual +CentralOrParallel StepVisual +CharacterizedObjAndRepresentationAndDraughtingModel StepVisual +Colour StepVisual +ColourRgb StepVisual +ColourSpecification StepVisual +ComplexTriangulatedFace StepVisual +ComplexTriangulatedSurfaceSet StepVisual +CompositeText StepVisual +CompositeTextWithExtent StepVisual +ContextDependentInvisibility StepVisual +ContextDependentOverRidingStyledItem StepVisual +CoordinatesList StepVisual +CubicBezierTessellatedEdge StepVisual +CubicBezierTriangulatedFace StepVisual +CurveStyle StepVisual +CurveStyleFont StepVisual +CurveStyleFontPattern StepVisual +CurveStyleFontSelect StepVisual +DirectionCountSelect StepVisual +DraughtingAnnotationOccurrence StepVisual +DraughtingCallout StepVisual +DraughtingCalloutElement StepVisual +DraughtingModel StepVisual +DraughtingPreDefinedColour StepVisual +DraughtingPreDefinedCurveFont StepVisual +EdgeOrCurve StepVisual +ExternallyDefinedCurveFont StepVisual +ExternallyDefinedTextFont StepVisual +FaceOrSurface StepVisual +FillAreaStyle StepVisual +FillAreaStyleColour StepVisual +FillStyleSelect StepVisual +FontSelect StepVisual +Invisibility StepVisual +InvisibilityContext StepVisual +InvisibleItem StepVisual +LayeredItem StepVisual +MarkerMember StepVisual +MarkerSelect StepVisual +MarkerType StepVisual +MechanicalDesignGeometricPresentationArea StepVisual +MechanicalDesignGeometricPresentationRepresentation StepVisual +NullStyle StepVisual +NullStyleMember StepVisual +OverRidingStyledItem StepVisual +PathOrCompositeCurve StepVisual +PlanarBox StepVisual +PlanarExtent StepVisual +PointStyle StepVisual +PreDefinedColour StepVisual +PreDefinedCurveFont StepVisual +PreDefinedItem StepVisual +PreDefinedTextFont StepVisual +PresentationArea StepVisual +PresentationLayerAssignment StepVisual +PresentationLayerUsage StepVisual +PresentationRepresentation StepVisual +PresentationRepresentationSelect StepVisual +PresentationSet StepVisual +PresentationSize StepVisual +PresentationSizeAssignmentSelect StepVisual +PresentationStyleAssignment StepVisual +PresentationStyleByContext StepVisual +PresentationStyleSelect StepVisual +PresentationView StepVisual +PresentedItem StepVisual +PresentedItemRepresentation StepVisual +RenderingPropertiesSelect StepVisual +RepositionedTessellatedGeometricSet StepVisual +RepositionedTessellatedItem StepVisual +ShadingSurfaceMethod StepVisual +StyleContextSelect StepVisual +StyledItem StepVisual +StyledItemTarget StepVisual +SurfaceSide StepVisual +SurfaceSideStyle StepVisual +SurfaceStyleBoundary StepVisual +SurfaceStyleControlGrid StepVisual +SurfaceStyleElementSelect StepVisual +SurfaceStyleFillArea StepVisual +SurfaceStyleParameterLine StepVisual +SurfaceStyleReflectanceAmbient StepVisual +SurfaceStyleRendering StepVisual +SurfaceStyleRenderingWithProperties StepVisual +SurfaceStyleSegmentationCurve StepVisual +SurfaceStyleSilhouette StepVisual +SurfaceStyleTransparent StepVisual +SurfaceStyleUsage StepVisual +Template StepVisual +TemplateInstance StepVisual +TessellatedAnnotationOccurrence StepVisual +TessellatedConnectingEdge StepVisual +TessellatedCurveSet StepVisual +TessellatedEdge StepVisual +TessellatedEdgeOrVertex StepVisual +TessellatedFace StepVisual +TessellatedGeometricSet StepVisual +TessellatedItem StepVisual +TessellatedPointSet StepVisual +TessellatedShapeRepresentation StepVisual +TessellatedShapeRepresentationWithAccuracyParameters StepVisual +TessellatedShell StepVisual +TessellatedSolid StepVisual +TessellatedStructuredItem StepVisual +TessellatedSurfaceSet StepVisual +TessellatedVertex StepVisual +TessellatedWire StepVisual +TextLiteral StepVisual +TextOrCharacter StepVisual +TextPath StepVisual +TextStyle StepVisual +TextStyleForDefinedFont StepVisual +TextStyleWithBoxCharacteristics StepVisual +TriangulatedFace StepVisual +ViewVolume StepVisual diff --git a/src/Express/Express.cxx b/src/Express/Express.cxx new file mode 100644 index 0000000000..45715b076d --- /dev/null +++ b/src/Express/Express.cxx @@ -0,0 +1,129 @@ +// Created: Wed Nov 3 14:39:28 1999 +// Author: Andrey BETENEV +// Copyright (c) 1999-2020 OPEN CASCADE SAS +// +// This file is part of Open CASCADE Technology software library. +// +// This library is free software; you can redistribute it and/or modify it under +// the terms of the GNU Lesser General Public License version 2.1 as published +// by the Free Software Foundation, with special exception defined in the file +// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT +// distribution for complete text of the license and disclaimer of any warranty. +// +// Alternatively, this file may be used under the terms of Open CASCADE +// commercial license or contractual agreement. + +#include + +#include +#include +#include +#include +#include + +//======================================================================= +// function : Schema +// purpose : +//======================================================================= + +Handle(Express_Schema)& Express::Schema() +{ + static Handle(Express_Schema) aSchema; + return aSchema; +} + +//======================================================================= +// function : WriteFileStamp +// purpose : Write header of HXX or CXX file +//======================================================================= + +void Express::WriteFileStamp (Standard_OStream& theOS) +{ + static const char* EC_VERSION = "2.0"; + + OSD_Process aProcess; + Quantity_Date aCurTime = aProcess.SystemDate(); + OSD_Environment anEnv ("EXPTOCAS_TIME"); + TCollection_AsciiString aTimeString = anEnv.Value(); + if (aTimeString.IsEmpty()) + { + aTimeString += aCurTime.Year(); + aTimeString += "-"; + aTimeString += aCurTime.Month(); + aTimeString += "-"; + aTimeString += aCurTime.Day(); + } + + theOS << "// Created on : " << aTimeString << "\n" + "// Created by: " << aProcess.UserName() << "\n" + "// Generator: ExpToCasExe (EXPRESS -> CASCADE/XSTEP Translator) V" << EC_VERSION << "\n" + "// Copyright (c) Open CASCADE " << aCurTime.Year() << "\n" + "//\n" + "// This file is part of Open CASCADE Technology software library.\n" + "//\n" + "// This library is free software; you can redistribute it and/or modify it under\n" + "// the terms of the GNU Lesser General Public License version 2.1 as published\n" + "// by the Free Software Foundation, with special exception defined in the file\n" + "// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT\n" + "// distribution for complete text of the license and disclaimer of any warranty.\n" + "//\n" + "// Alternatively, this file may be used under the terms of Open CASCADE\n" + "// commercial license or contractual agreement.\n" + "\n"; +} + +//======================================================================= +// function : WriteMethodStamp +// purpose : +//======================================================================= + +void Express::WriteMethodStamp (Standard_OStream& theOS, const TCollection_AsciiString& theName) +{ + theOS << "\n" + "//=======================================================================\n" + "// function : " << theName << "\n" + "// purpose :\n" + "//=======================================================================\n" + "\n"; +} + +//======================================================================= +// function : ToStepName +// purpose : +//======================================================================= + +TCollection_AsciiString Express::ToStepName (const TCollection_AsciiString& theName) +{ + TCollection_AsciiString aStepName(theName); + for (Standard_Integer i = 2; i <= aStepName.Length(); i++) + { + if (isupper (aStepName.Value (i))) + { + aStepName.Insert (i++, '_'); + } + } + aStepName.LowerCase(); + + return aStepName; +} + +//======================================================================= +// function : GetPrefixEnum +// purpose : +//======================================================================= + +TCollection_AsciiString Express::EnumPrefix (const TCollection_AsciiString& theName) +{ + TCollection_AsciiString aStepName; + for (Standard_Integer i = 1; i <= theName.Length(); i++) + { + if (isupper (theName.Value (i))) + { + aStepName += theName.Value (i); + } + } + aStepName.LowerCase(); + + return aStepName; +} + diff --git a/src/Express/Express.hxx b/src/Express/Express.hxx new file mode 100644 index 0000000000..0dcb80ee96 --- /dev/null +++ b/src/Express/Express.hxx @@ -0,0 +1,52 @@ +// Copyright (c) 1999-2020 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 _Express_HeaderFile +#define _Express_HeaderFile + +#include +#include +#include + +class Express_Schema; +class TCollection_AsciiString; + +//! Provides data structures for representation of EXPRESS schema +//! (items, types, entities etc.) +//! and tools for generating XSTEP classes (HXX and CXX) from +//! items of the schema +class Express +{ +public: + + DEFINE_STANDARD_ALLOC + + //! Returns (modifiable) handle to static schema object + Standard_EXPORT static Handle(Express_Schema)& Schema(); + + //! Writes standard copyright stamp (creation date/time, user, etc.) + Standard_EXPORT static void WriteFileStamp (Standard_OStream& theOS); + + //! Writes standard comment for method in CXX file + Standard_EXPORT static void WriteMethodStamp (Standard_OStream& theOS, const TCollection_AsciiString& theName); + + //! Converts item name from CASCADE to STEP style + //! e.g. BoundedCurve -> bounded_curve + Standard_EXPORT static TCollection_AsciiString ToStepName (const TCollection_AsciiString& theName); + + //! Converts item name from CASCADE to STEP style + //! e.g. BoundedCurve -> bounded_curve + Standard_EXPORT static TCollection_AsciiString EnumPrefix (const TCollection_AsciiString& theName); +}; + +#endif // _Express_HeaderFile diff --git a/src/Express/Express_Alias.cxx b/src/Express/Express_Alias.cxx new file mode 100644 index 0000000000..3d1ffcc5da --- /dev/null +++ b/src/Express/Express_Alias.cxx @@ -0,0 +1,71 @@ +// Created: Tue Nov 2 14:40:06 1999 +// Author: Andrey BETENEV +// Copyright (c) 1999-2020 OPEN CASCADE SAS +// +// This file is part of Open CASCADE Technology software library. +// +// This library is free software; you can redistribute it and/or modify it under +// the terms of the GNU Lesser General Public License version 2.1 as published +// by the Free Software Foundation, with special exception defined in the file +// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT +// distribution for complete text of the license and disclaimer of any warranty. +// +// Alternatively, this file may be used under the terms of Open CASCADE +// commercial license or contractual agreement. + +#include + +#include +#include + +IMPLEMENT_STANDARD_RTTIEXT(Express_Alias, Express_Item) + +//======================================================================= +// function : Express_Alias +// purpose : +//======================================================================= + +Express_Alias::Express_Alias (const Standard_CString theName, const Handle(Express_Type)& theType) +: Express_Item (theName), myType (theType) +{ +} + +//======================================================================= +// function : Type +// purpose : +//======================================================================= + +const Handle(Express_Type)& Express_Alias::Type() const +{ + return myType; +} + +//======================================================================= +// function : CPPName +// purpose : +//======================================================================= + +const TCollection_AsciiString Express_Alias::CPPName() const +{ + return myType->CPPName(); +} + +//======================================================================= +// function : GenerateClass +// purpose : +//======================================================================= + +Standard_Boolean Express_Alias::GenerateClass() const +{ + Message::SendInfo() << "ALIAS " << Name() << " = " << Type()->CPPName() << " used; no generation is needed"; + return Standard_False; +} + +//======================================================================= +// function : PropagateUse +// purpose : +//======================================================================= + +void Express_Alias::PropagateUse() const +{ +} diff --git a/src/Express/Express_Alias.hxx b/src/Express/Express_Alias.hxx new file mode 100644 index 0000000000..5f8115af34 --- /dev/null +++ b/src/Express/Express_Alias.hxx @@ -0,0 +1,55 @@ +// Copyright (c) 1999-2020 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 _Express_Alias_HeaderFile +#define _Express_Alias_HeaderFile + +#include +#include +#include + +class TCollection_AsciiString; + +//! Implements TYPE = type (alias) item of the EXPRESS +//! schema, with interface for deferred Item class. +class Express_Alias : public Express_Item +{ + +public: + + //! Create ALIAS item and initialize it + Standard_EXPORT Express_Alias (const Standard_CString theName, const Handle(Express_Type)& theType); + + //! Returns aliased type + Standard_EXPORT const Handle(Express_Type)& Type() const; + + //! Returns name of aliased type + Standard_EXPORT virtual const TCollection_AsciiString CPPName() const Standard_OVERRIDE; + + //! Create HXX/CXX files from item + Standard_EXPORT virtual Standard_Boolean GenerateClass() const Standard_OVERRIDE; + + //! Propagates the calls of Use function + Standard_EXPORT virtual void PropagateUse() const Standard_OVERRIDE; + + DEFINE_STANDARD_RTTIEXT(Express_Alias, Express_Item) + +protected: + +private: + + Handle(Express_Type) myType; + +}; + +#endif // _Express_Alias_HeaderFile diff --git a/src/Express/Express_Array.hxx b/src/Express/Express_Array.hxx new file mode 100644 index 0000000000..8757064a95 --- /dev/null +++ b/src/Express/Express_Array.hxx @@ -0,0 +1,21 @@ +// Copyright (c) 1999-2020 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 _Express_Array_HeaderFile +#define _Express_Array_HeaderFile + +#include + +typedef Express_ComplexType Express_Array; + +#endif // _Express_Array_HeaderFile diff --git a/src/Express/Express_Bag.hxx b/src/Express/Express_Bag.hxx new file mode 100644 index 0000000000..e55a2b6a05 --- /dev/null +++ b/src/Express/Express_Bag.hxx @@ -0,0 +1,21 @@ +// Copyright (c) 1999-2020 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 _Express_Bag_HeaderFile +#define _Express_Bag_HeaderFile + +#include + +typedef Express_ComplexType Express_Bag; + +#endif // _Express_Bag_HeaderFile diff --git a/src/Express/Express_Boolean.cxx b/src/Express/Express_Boolean.cxx new file mode 100644 index 0000000000..65550b3e1e --- /dev/null +++ b/src/Express/Express_Boolean.cxx @@ -0,0 +1,39 @@ +// Created: Tue Nov 2 15:27:26 1999 +// Author: Andrey BETENEV +// Copyright (c) 1999-2020 OPEN CASCADE SAS +// +// This file is part of Open CASCADE Technology software library. +// +// This library is free software; you can redistribute it and/or modify it under +// the terms of the GNU Lesser General Public License version 2.1 as published +// by the Free Software Foundation, with special exception defined in the file +// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT +// distribution for complete text of the license and disclaimer of any warranty. +// +// Alternatively, this file may be used under the terms of Open CASCADE +// commercial license or contractual agreement. + +#include + +#include + +IMPLEMENT_STANDARD_RTTIEXT(Express_Boolean, Express_PredefinedType) + +//======================================================================= +// function : Express_Boolean +// purpose : +//======================================================================= + +Express_Boolean::Express_Boolean() +{ +} + +//======================================================================= +// function : CPPName +// purpose : +//======================================================================= + +const TCollection_AsciiString Express_Boolean::CPPName() const +{ + return "Standard_Boolean"; +} diff --git a/src/Express/Express_Boolean.hxx b/src/Express/Express_Boolean.hxx new file mode 100644 index 0000000000..a761f2d12b --- /dev/null +++ b/src/Express/Express_Boolean.hxx @@ -0,0 +1,42 @@ +// Copyright (c) 1999-2020 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 _Express_Boolean_HeaderFile +#define _Express_Boolean_HeaderFile + +#include +#include + +class TCollection_AsciiString; + +//! Implements EXPRESS type 'BOOLEAN' +class Express_Boolean : public Express_PredefinedType +{ + +public: + + //! Empty constructor + Standard_EXPORT Express_Boolean(); + + //! Returns "Standard_Boolean" + Standard_EXPORT virtual const TCollection_AsciiString CPPName() const Standard_OVERRIDE; + + DEFINE_STANDARD_RTTIEXT(Express_Boolean, Express_PredefinedType) + +protected: + +private: + +}; + +#endif // _Express_Boolean_HeaderFile diff --git a/src/Express/Express_ComplexType.cxx b/src/Express/Express_ComplexType.cxx new file mode 100644 index 0000000000..db93859444 --- /dev/null +++ b/src/Express/Express_ComplexType.cxx @@ -0,0 +1,114 @@ +// Created: Tue Nov 2 15:13:31 1999 +// Author: Andrey BETENEV +// Copyright (c) 1999-2020 OPEN CASCADE SAS +// +// This file is part of Open CASCADE Technology software library. +// +// This library is free software; you can redistribute it and/or modify it under +// the terms of the GNU Lesser General Public License version 2.1 as published +// by the Free Software Foundation, with special exception defined in the file +// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT +// distribution for complete text of the license and disclaimer of any warranty. +// +// Alternatively, this file may be used under the terms of Open CASCADE +// commercial license or contractual agreement. + +#include + +#include + +IMPLEMENT_STANDARD_RTTIEXT(Express_ComplexType, Express_Type) + +//======================================================================= +// function : Express_ComplexType +// purpose : +//======================================================================= + +Express_ComplexType::Express_ComplexType (const Standard_Integer theImin, + const Standard_Integer theImax, + const Handle(Express_Type)& theType) +{ + myMin = theImin; + myMax = theImax; + myType = theType; +} + +//======================================================================= +// function : Type +// purpose : +//======================================================================= + +const Handle(Express_Type)& Express_ComplexType::Type() const +{ + return myType; +} + +//======================================================================= +// function : CPPName +// purpose : +//======================================================================= + +const TCollection_AsciiString Express_ComplexType::CPPName() const +{ + // check if array 2 + Handle(Express_Type) aType = myType; + if (aType->IsKind (STANDARD_TYPE(Express_ComplexType))) + { + Handle(Express_ComplexType) aType2 = Handle(Express_ComplexType)::DownCast (aType); + aType = aType2->Type(); + } + + // parse name of array argument + TCollection_AsciiString aName = aType->CPPName(); + Standard_Integer aSplitIdx = aName.Location (1, '_', 1, aName.Length()); + TCollection_AsciiString aClassName; + if (aSplitIdx) + { + aClassName = aName.Split (aSplitIdx); + } + else + { + aClassName = aName; + } + Standard_Integer anIdx = aName.Location ("TCollection", 1, aName.Length()); + if (anIdx) + { + aName = "Interface_"; + } + // generate name + if (aType->IsStandard() || !aSplitIdx) + { + aName = "TColStd_"; + } + if (aType == myType) + { + aName += "HArray1Of"; + } + else + { + aName += "HArray2Of"; + } + aName += aClassName; + + return aName; +} + +//======================================================================= +// function : Use +// purpose : +//======================================================================= + +Standard_Boolean Express_ComplexType::Use() const +{ + return myType->Use(); +} + +//======================================================================= +// function : Use2 +// purpose : +//======================================================================= + +void Express_ComplexType::Use2 (const TCollection_AsciiString& theRefName, const TCollection_AsciiString& theRefPack) const +{ + myType->Use2 (theRefName, theRefPack); +} diff --git a/src/Express/Express_ComplexType.hxx b/src/Express/Express_ComplexType.hxx new file mode 100644 index 0000000000..e789ee89b2 --- /dev/null +++ b/src/Express/Express_ComplexType.hxx @@ -0,0 +1,61 @@ +// Copyright (c) 1999-2020 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 _Express_ComplexType_HeaderFile +#define _Express_ComplexType_HeaderFile + +#include +#include + +class TCollection_AsciiString; + +//! Base class for complex types (ARRAY, LIST, BAG, SET) +//! in EXPRESS schema +//! Stores type of elements and +class Express_ComplexType : public Express_Type +{ + +public: + + //! Creates an object and initializes fields + Standard_EXPORT Express_ComplexType (const Standard_Integer theImin, + const Standard_Integer theImax, + const Handle(Express_Type)& theType); + + //! Returns type of complex type items + Standard_EXPORT const Handle(Express_Type)& Type() const; + + //! Returns CPP-style name of the type + Standard_EXPORT virtual const TCollection_AsciiString CPPName() const Standard_OVERRIDE; + + //! Declares type as used by some item being generated. + //! Calls Use() for type of elements + Standard_EXPORT virtual Standard_Boolean Use() const Standard_OVERRIDE; + + //! Declares type as used by some item being generated. + //! Calls Use() for type of elements + Standard_EXPORT virtual void Use2 (const TCollection_AsciiString& theRefName, const TCollection_AsciiString& theRefPack) const Standard_OVERRIDE; + + DEFINE_STANDARD_RTTIEXT(Express_ComplexType, Express_Type) + +protected: + +private: + + Standard_Integer myMin; + Standard_Integer myMax; + Handle(Express_Type) myType; + +}; + +#endif // _Express_ComplexType_HeaderFile diff --git a/src/Express/Express_DataMapOfAsciiStringItem.hxx b/src/Express/Express_DataMapOfAsciiStringItem.hxx new file mode 100644 index 0000000000..8d2683f467 --- /dev/null +++ b/src/Express/Express_DataMapOfAsciiStringItem.hxx @@ -0,0 +1,24 @@ +// Copyright (c) 1999-2020 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 Express_DataMapOfAsciiStringItem_HeaderFile +#define Express_DataMapOfAsciiStringItem_HeaderFile + +#include +#include +#include + +typedef NCollection_DataMap Express_DataMapOfAsciiStringItem; + +#endif diff --git a/src/Express/Express_Entity.cxx b/src/Express/Express_Entity.cxx new file mode 100644 index 0000000000..96a3bfcc5a --- /dev/null +++ b/src/Express/Express_Entity.cxx @@ -0,0 +1,1770 @@ +// Created: Tue Nov 2 14:40:06 1999 +// Author: Andrey BETENEV +// Copyright (c) 1999-2020 OPEN CASCADE SAS +// +// This file is part of Open CASCADE Technology software library. +// +// This library is free software; you can redistribute it and/or modify it under +// the terms of the GNU Lesser General Public License version 2.1 as published +// by the Free Software Foundation, with special exception defined in the file +// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT +// distribution for complete text of the license and disclaimer of any warranty. +// +// Alternatively, this file may be used under the terms of Open CASCADE +// commercial license or contractual agreement. + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +IMPLEMENT_STANDARD_RTTIEXT(Express_Entity, Express_Item) + +//======================================================================= +// function : Express_Entity +// purpose : +//======================================================================= + +Express_Entity::Express_Entity (const Standard_CString theName, + const Handle(TColStd_HSequenceOfHAsciiString)& theInherit, + const Handle(Express_HSequenceOfField)& theFields) +: Express_Item (theName), mySupers (theInherit), myFields (theFields) +{ + // make empty lists to avoid checking every time + myInherit = new Express_HSequenceOfEntity; + if (mySupers.IsNull()) + { + mySupers = new TColStd_HSequenceOfHAsciiString; + } + if (myFields.IsNull()) + { + myFields = new Express_HSequenceOfField; + } + myIsAbstract = Standard_False; +} + +//======================================================================= +// function : SuperTypes +// purpose : +//======================================================================= + +const Handle(TColStd_HSequenceOfHAsciiString)& Express_Entity::SuperTypes() const +{ + return mySupers; +} + +//======================================================================= +// function : Inherit +// purpose : +//======================================================================= + +const Handle(Express_HSequenceOfEntity)& Express_Entity::Inherit() const +{ + return myInherit; +} + +//======================================================================= +// function : Fields +// purpose : +//======================================================================= + +const Handle(Express_HSequenceOfField)& Express_Entity::Fields() const +{ + return myFields; +} +//======================================================================= +// function : NbFields +// purpose : +//======================================================================= + +Standard_Integer Express_Entity::NbFields (const Standard_Boolean theInherited) const +{ + Standard_Integer aNb = myFields->Length(); + if (theInherited) + { + for (Standard_Integer i = 1; i <= myInherit->Length(); i++) + { + aNb += myInherit->Value (i)->NbFields (theInherited); + } + } + return aNb; +} + +//======================================================================= +// function : WriteGetMethod +// purpose : +//======================================================================= + +static void writeGetMethod ( + Standard_OStream& theOS, + const TCollection_AsciiString& theName, + const TCollection_AsciiString& theField, + const TCollection_AsciiString& theType, + const Standard_Boolean isHandle, + const Standard_Boolean /*isSimple*/) +{ + const TCollection_AsciiString& aMethod = theField; + Express::WriteMethodStamp (theOS, aMethod); + theOS << (isHandle ? "Handle(" : "") << theType << (isHandle ? ") " : " ") << theName << "::" << aMethod << "() const\n" + "{\n" + " return my" << theField << ";\n" + "}\n"; +} + +//======================================================================= +// function : WriteSetMethod +// purpose : +//======================================================================= + +static void writeSetMethod ( + Standard_OStream& theOS, + const TCollection_AsciiString& theName, + const TCollection_AsciiString& theField, + const TCollection_AsciiString& theType, + const Standard_Boolean isHandle, + const Standard_Boolean isSimple) +{ + TCollection_AsciiString aMethod = "Set"; + aMethod += theField; + Express::WriteMethodStamp (theOS, aMethod); + theOS << "void " << theName << "::" << aMethod << " (const " << (isHandle ? "Handle(" : "") << theType << (isHandle ? ")" : "") << + (isSimple ? "" : "&") << " the" << theField << ")\n" + "{\n" + " my" << theField << " = the" << theField << ";\n" + "}\n"; +} + +//======================================================================= +// function : WriteSpaces +// purpose : +//======================================================================= + +static inline void writeSpaces (Standard_OStream& theOS, Standard_Integer theNum) +{ + for (Standard_Integer i = 0; i < theNum; i++) + theOS << " "; +} + +//======================================================================= +// function : GenerateClass +// purpose : +//======================================================================= + +Standard_Boolean Express_Entity::GenerateClass() const +{ + const TCollection_AsciiString aCPPName = CPPName(); + Message::SendInfo() << "Generating ENTITY " << aCPPName; + + // create a package directory (if not yet exist) + OSD_Protection aProt (OSD_RWXD, OSD_RWXD, OSD_RX, OSD_RX); + TCollection_AsciiString aPack = GetPackageName(); + OSD_Path aPath (aPack); + OSD_Directory aDir (aPath); + aDir.Build (aProt); + aPack += "/"; + aPack += aCPPName; + const Handle(OSD_FileSystem)& aFileSystem = OSD_FileSystem::DefaultFileSystem(); + + //=============================== + // Step 1: generating HXX + TCollection_AsciiString anInheritName; + { + // Open HXX file + std::shared_ptr aStreamPtr = aFileSystem->OpenOStream (aPack.Cat (".hxx"), std::ios::out | std::ios::binary); + Standard_OStream& anOS = *aStreamPtr; + + // write header + Express::WriteFileStamp (anOS); + + // write include protection and "standard" includes + anOS << "#ifndef _" << aCPPName << "_HeaderFile_\n" + "#define _" << aCPPName << "_HeaderFile_\n" + "\n" + "#include \n" + "#include \n"; + if (myInherit->Length() < 1) + { + anInheritName = "Standard_Transient"; + anOS << "#include <" << anInheritName << ".hxx>\n"; + } + else + { + // first inherited class will be actually inherited + Handle(Express_Entity) anEntity = myInherit->Value (1); + anInheritName = anEntity->CPPName(); + // make warning if there are more than one inherits + if (myInherit->Length() > 1) + { + Message::SendWarning() << "Warning: ENTITY " << Name() << " defined with multiple inheritance;"; + Message::SendWarning() << "Warning: only first base class " << anInheritName << " is actually inherited, others are made fields"; + } + } + // write other includes (inherits and used types) + writeIncludes (anOS); + + // write HANDLE MACRO + anOS << "\n" + "DEFINE_STANDARD_HANDLE(" << aCPPName << ", " << anInheritName << ")\n" + "\n"; + + // write start of declaration (inheritance) + anOS << "//! Representation of STEP entity " << Name() << "\n" + "class " << aCPPName << " : public " << anInheritName << "\n" + "{\n" + "\n" + "public :\n" + "\n"; + + // write constructor + anOS << " //! default constructor\n" + " Standard_EXPORT " << aCPPName << "();\n" + "\n"; + + // write Init methods + if (myInherit->Length() > 1 || myFields->Length() > 0) + { + anOS << " //! Initialize all fields (own and inherited)\n" + " Standard_EXPORT void Init ("; + makeInit (anOS, 29, Standard_True, 0); + anOS << ");\n" + "\n"; + } + + // write methods Get/Set + for (Standard_Integer i = 2; i <= myInherit->Length(); i++) + { + Handle(Express_Entity) anEntity = myInherit->Value (i); + const TCollection_AsciiString& aName = anEntity->Name(); + const TCollection_AsciiString& anEntityCPPName = anEntity->CPPName(); + anOS << " //! Returns data for supertype " << aName << "\n" + " Standard_EXPORT Handle(" << anEntityCPPName << ") " << aName << "() const;\n" + " //! Sets data for supertype " << aName << "\n" + " Standard_EXPORT void Set" << aName << " (const Handle(" << anEntityCPPName << ")& the" << aName << ");\n" + "\n"; + } + for (Standard_Integer i = 1; i <= myFields->Length(); i++) + { + Handle(Express_Field) aField = myFields->Value (i); + Handle(Express_Type) aFieldType = aField->Type(); + TCollection_AsciiString aFieldCPPName = aFieldType->CPPName(); + anOS << " //! Returns field " << aField->Name() << "\n"; + if (aFieldType->IsHandle()) + { + anOS << " Standard_EXPORT Handle(" << aFieldCPPName << ") " << aField->Name() << "() const;\n"; + } + else + { + anOS << " Standard_EXPORT " << aFieldCPPName << " " << aField->Name() << "() const;\n"; + } + anOS << "\n" + " //! Sets field " << aField->Name() << "\n"; + if (aFieldType->IsHandle()) + { + anOS << " Standard_EXPORT void Set" << aField->Name() << " (const Handle(" + << aFieldCPPName << ")& the" << aField->Name() << ");\n"; + } + else + { + anOS << " Standard_EXPORT void Set" << aField->Name() << " (const " + << aFieldCPPName << (aFieldType->IsSimple() ? "" : "&") + << " the" << aField->Name() << ");\n"; + } + if (aField->IsOptional()) + { + anOS << "\n" + " //! Returns True if optional field " << aField->Name() << " is defined\n" + " Standard_EXPORT Standard_Boolean Has" << aField->Name() << "() const;\n"; + } + anOS << "\n"; + + // prepare additional methods for HArray1 field (NbField() and FieldValue(int num)) + Standard_Integer aFindPos = aFieldCPPName.Search ("_HArray"); + if (aFindPos > -1) + { + TCollection_AsciiString aNamePack = aFieldCPPName.SubString (1, aFindPos); + TCollection_AsciiString aNameClass; + if (aNamePack.IsEqual ("TColStd_")) + { + Standard_Integer aFindPos2 = aFieldCPPName.Search ("Integer"); + if (aFindPos2 > -1) + { + aNameClass = "Standard_Integer"; + } + else + { + aFindPos2 = aFieldCPPName.Search ("Real"); + if (aFindPos2 > -1) + { + aNameClass = "Standard_Real"; + } + else + { + aNameClass = "Standard_Boolean"; + } + } + } + else + { + if (aNamePack.IsEqual ("Interface_")) + { + aNameClass = "Handle(TCollection_HAsciiString)"; + } + else + { + aNameClass = "Handle("; + aNameClass += aNamePack; + aNameClass += aFieldCPPName.SubString (aFindPos + 10, aFieldCPPName.Length()); + aNameClass += ")"; + } + } + anOS << " //! Returns number of " << aField->Name() << "\n" + " Standard_EXPORT Standard_Integer Nb" << aField->Name() << "() const;\n" + "\n" + " //! Returns value of " << aField->Name() << " by its num\n" + " Standard_EXPORT " << aNameClass << " " << aField->Name() << "Value (const Standard_Integer theNum) const;\n" + "\n"; + } + } + + anOS << " DEFINE_STANDARD_RTTIEXT(" << aCPPName << ", " << anInheritName << ")\n" + "\n"; + + // write fields section + if (myInherit->Length() > 1 || myFields->Length() > 0) + { + anOS << "private:\n" + "\n"; + for (Standard_Integer i = 2; i <= myInherit->Length(); i++) + { + Handle(Express_Entity) anEntity = myInherit->Value (i); + anOS << " Handle(" << anEntity->CPPName() << ") my" << anEntity->Name() << "; //!< supertype\n"; + } + for (Standard_Integer i = 1; i <= myFields->Length(); i++) + { + Handle(Express_Field) aField = myFields->Value (i); + Handle(Express_Type) aFieldType = aField->Type(); + if (aFieldType->IsHandle()) + { + anOS << " Handle(" << aFieldType->CPPName() << ") my" << aField->Name() << ";"; + } + else + { + anOS << " " << aFieldType->CPPName() << " my" << aField->Name() << ";"; + } + if (aField->IsOptional()) + { + anOS << " //!< optional"; + } + anOS << "\n"; + } + // optional fields: flag 'is field set' + for (Standard_Integer i = 1; i <= myFields->Length(); i++) + { + Handle(Express_Field) aField = myFields->Value (i); + if (!aField->IsOptional()) + { + continue; + } + anOS << " Standard_Boolean myHas" << aField->Name() << "; //!< flag \"is " + << aField->Name() << " defined\"\n"; + } + anOS << "\n"; + } + + // write end + anOS << "};\n" + "\n" + "#endif // _" << aCPPName << "_HeaderFile_\n"; + aStreamPtr.reset(); + } + //=============================== + // Step 2: generating CXX + { + // Open CXX file + std::shared_ptr aStreamPtr = aFileSystem->OpenOStream (aPack.Cat (".cxx"), std::ios::out | std::ios::binary); + Standard_OStream& anOS = *aStreamPtr; + + // write header + Express::WriteFileStamp (anOS); + + // write include section + anOS << "#include <" << aCPPName << ".hxx>\n" + "\n" + "IMPLEMENT_STANDARD_RTTIEXT(" << aCPPName << ", " << anInheritName << ")\n"; + + // write constructor + Express::WriteMethodStamp (anOS, aCPPName); + anOS << aCPPName << "::" << aCPPName << "()\n" + "{\n"; + for (Standard_Integer i = 1; i <= myFields->Length(); i++) + { + Handle(Express_Field) aField = myFields->Value (i); + if (aField->IsOptional()) + anOS << " myHas" << aField->Name() << " = Standard_False;\n"; + } + anOS << "}\n"; + + // write method Init() + if (myInherit->Length() > 1 || myFields->Length() > 0) + { + Express::WriteMethodStamp (anOS, "Init"); + anOS << "void " << aCPPName << "::Init ("; + makeInit (anOS, 13 + aCPPName.Length(), Standard_True, 1); + anOS << ")\n" + "{"; + makeInit (anOS, -2, Standard_True, 3); + anOS << "\n" + "}\n"; + } + + // write "methods" section + for (Standard_Integer i = 2; i <= myInherit->Length(); i++) + { + Handle(Express_Entity) anEntity = myInherit->Value (i); + const TCollection_AsciiString& anEntityCPPName = anEntity->CPPName(); + writeGetMethod (anOS, aCPPName, anEntity->Name(), anEntityCPPName, Standard_True, Standard_False); + writeSetMethod (anOS, aCPPName, anEntity->Name(), anEntityCPPName, Standard_True, Standard_False); + } + for (Standard_Integer i = 1; i <= myFields->Length(); i++) + { + Handle(Express_Field) aField = myFields->Value (i); + Handle(Express_Type) aFieldType = aField->Type(); + TCollection_AsciiString aFieldCPPName = aFieldType->CPPName(); + writeGetMethod (anOS, aCPPName, aField->Name(), aFieldCPPName, aFieldType->IsHandle(), aFieldType->IsSimple()); + writeSetMethod (anOS, aCPPName, aField->Name(), aFieldCPPName, aFieldType->IsHandle(), aFieldType->IsSimple()); + if (aField->IsOptional()) + { + TCollection_AsciiString aMethod = "Has"; + aMethod += aField->Name(); + Express::WriteMethodStamp (anOS, aMethod); + anOS << "Standard_Boolean " << aCPPName << "::" << aMethod << "() const\n" + "{\n" + " return myHas" << aField->Name() << ";\n" + "}\n"; + } + + // prepare additional methods for HArray1 field + Standard_Integer aFindPos = aFieldCPPName.Search ("_HArray1"); + if (aFindPos > -1) + { + TCollection_AsciiString aNamePack = aFieldCPPName.SubString (1, aFindPos); + TCollection_AsciiString aNameClass (""); + if (aNamePack.IsEqual ("TColStd_")) + { + Standard_Integer aFindPos2 = aFieldCPPName.Search ("Integer"); + if (aFindPos2 > -1) + { + aNameClass = "Standard_Integer"; + } + else + { + aFindPos2 = aFieldCPPName.Search ("Real"); + if (aFindPos2 > -1) + { + aNameClass = "Standard_Real"; + } + else + { + aNameClass = "Standard_Boolean"; + } + } + } + else + { + if (aNamePack.IsEqual ("Interface_")) + { + aNameClass = "Handle(TCollection_HAsciiString)"; + } + else + { + aNameClass = "Handle("; + aNameClass += aNamePack; + aNameClass += aFieldCPPName.SubString (aFindPos + 10, aFieldCPPName.Length()); + aNameClass += ")"; + } + } + // write method ::NbField() + anOS << "\n"; + TCollection_AsciiString aMethodName = "Nb"; + aMethodName += aField->Name(); + Express::WriteMethodStamp (anOS, aMethodName); + anOS << "Standard_Integer " << aCPPName << "::Nb" << aField->Name() << "() const;\n" + "{\n" + " if (my" << aField->Name() << ".IsNull())\n" + " {\n" + " return 0;\n" + " }\n" + " return my" << aField->Name() << "->Length();\n" + "}\n"; + // write method ::FieldValue(num) + anOS << "\n"; + aMethodName = aField->Name(); + aMethodName += "Value"; + Express::WriteMethodStamp (anOS, aMethodName); + anOS << aNameClass << " " << aCPPName << "::" << aField->Name() << "Value (const Standard_Integer theNum) const;\n" + "{\n" + " return my" << aField->Name() << "->Value (theNum);\n" + "}\n"; + } + } + + // close + aStreamPtr.reset(); + + if (AbstractFlag()) + { + // generation of RW class is not needed + return Standard_True; + } + } + //=============================== + // Step 3: generating HXX for Reader/Writer class + TCollection_AsciiString aRWCPPName; + { + // Open HXX file + aRWCPPName = "RW"; + aRWCPPName += GetPackageName(); + aRWCPPName += "_RW"; + aRWCPPName += Name(); + + aPack = "RW"; + aPack += GetPackageName(); + OSD_Path aRWPath (aPack); + OSD_Directory aRWDir (aRWPath); + aRWDir.Build (aProt); + aPack += "/"; + aPack += aRWCPPName; + + std::shared_ptr aStreamPtr = aFileSystem->OpenOStream (aPack.Cat (".hxx"), std::ios::out | std::ios::binary); + Standard_OStream& anOS = *aStreamPtr; + + // write header + Express::WriteFileStamp (anOS); + + anOS << "#ifndef _" << aRWCPPName << "_HeaderFile_\n" + "#define _" << aRWCPPName << "_HeaderFile_\n" + "\n"; + + // write includes + anOS << "#include \n" + "#include \n" + "#include \n" + "\n" + "class StepData_StepReaderData;\n" + "class Interface_Check;\n" + "class StepData_StepWriter;\n" + "class Interface_EntityIterator;\n" + "class " << aCPPName << ";\n" + "\n"; + + // write start of declaration (inheritance) + anOS << "//! Read & Write tool for " << Name() << "\n" + "class " << aRWCPPName << "\n" + "{\n" + "\n" + "public:\n" + "\n" + " DEFINE_STANDARD_ALLOC\n" + "\n"; + + // default constructor + anOS << " Standard_EXPORT " << aRWCPPName << "();\n" + "\n"; + + // read step + anOS << " Standard_EXPORT void ReadStep (const Handle(StepData_StepReaderData)& theData,\n" + " const Standard_Integer theNum,\n" + " Handle(Interface_Check)& theCheck,\n" + " const Handle(" << aCPPName << ")& theEnt) const;\n" + "\n"; + + // write step + anOS << " Standard_EXPORT void WriteStep (StepData_StepWriter& theSW,\n" + " const Handle(" << aCPPName << ")& theEnt) const;\n" + "\n"; + + // share + anOS << " Standard_EXPORT void Share (const Handle(" << aCPPName << ")& theEnt,\n" + " Interface_EntityIterator& theIter) const;\n" + "\n"; + + // write end + anOS << "};\n" + "\n" + "#endif // _" << aRWCPPName << "_HeaderFile_\n"; + aStreamPtr.reset(); + } + //=============================== + // Step 4: generating CXX for Read/Write tool + { + // Open CXX file + std::shared_ptr aStreamPtr = aFileSystem->OpenOStream (aPack.Cat (".cxx"), std::ios::out | std::ios::binary); + Standard_OStream& anOS = *aStreamPtr; + + // write header + Express::WriteFileStamp (anOS); + + // write include section + anOS << "#include <" << aRWCPPName << ".hxx>\n"; + anOS << "#include <" << aCPPName << ".hxx>\n"; + anOS << "#include \n" + "#include \n" + "#include \n"; + // write constructor + Express::WriteMethodStamp (anOS, aRWCPPName); + anOS << aRWCPPName << "::" << aRWCPPName << "() {}\n" + "\n"; + + // write method ReadStep + Express::WriteMethodStamp (anOS, "ReadStep"); + if (aRWCPPName.Length() < 40) + { + anOS << "void " << aRWCPPName << "::ReadStep (const Handle(StepData_StepReaderData)& theData,\n"; + writeSpaces (anOS, 17 + aRWCPPName.Length()); + anOS << "const Standard_Integer theNum,\n"; + writeSpaces (anOS, 17 + aRWCPPName.Length()); + anOS << "Handle(Interface_Check)& theCheck,\n"; + writeSpaces (anOS, 17 + aRWCPPName.Length()); + anOS << "const Handle(" << aCPPName << ")& theEnt) const\n"; + } + else + { + anOS << "void " << aRWCPPName << "::ReadStep (\n" + " const Handle(StepData_StepReaderData)& theData,\n" + " const Standard_Integer theNum,\n" + " Handle(Interface_Check)& theCheck,\n" + " const Handle(" << aCPPName << ")& theEnt) const\n"; + } + anOS << "{\n"; + Standard_Integer aNbFields = NbFields (Standard_True); + + anOS << " // Check number of parameters\n" + " if (!theData->CheckNbParams (theNum, " << aNbFields << ", theCheck, \"" << Express::ToStepName (Name()) << "\"))\n" + " {\n" + " return;\n" + " }\n"; + writeRWReadCode (anOS, 1, Standard_True); // write code for reading inherited and own fields + anOS << "\n" + " // Initialize entity\n" + " theEnt->Init ("; + makeInit (anOS, 15, Standard_True, 4); + anOS << ");\n" + "}\n"; + + // write method WriteStep + Express::WriteMethodStamp (anOS, "WriteStep"); + if (aRWCPPName.Length() < 40) + { + anOS << "void " << aRWCPPName << "::WriteStep (StepData_StepWriter& theSW,\n"; + writeSpaces (anOS, 18 + aRWCPPName.Length()); + anOS << "const Handle(" << aCPPName << ")& theEnt) const\n"; + } + else + { + anOS << "void " << aRWCPPName << "::WriteStep (\n" + " StepData_StepWriter& theSW,\n" + " const Handle(" << aCPPName << ")& theEnt) const\n"; + } + anOS << "{\n"; + + writeRWWriteCode (anOS, 0, Standard_True); // write code for writing inherited and own fields + anOS << "}\n"; + + // write method Share + Express::WriteMethodStamp (anOS, "Share"); + std::ostringstream aStringOS; + Standard_Integer aNnFileds2 = writeRWShareCode (aStringOS, 1, Standard_True); // write code for filling graph of references + if (aRWCPPName.Length() < 40) + { + anOS << "void " << aRWCPPName << "::Share (const Handle(" << aCPPName << ")&" << ((aNnFileds2 > 1) ? "theEnt," : ",") << "\n"; + writeSpaces (anOS, 14 + aRWCPPName.Length()); + if (aNnFileds2 > 1) + { + anOS << "Interface_EntityIterator& theIter) const\n"; + } + else + { + anOS << "Interface_EntityIterator&) const\n"; + } + } + else + { + anOS << "void " << aRWCPPName << "::Share(\n" + " const Handle(" << aCPPName << ")&" << ((aNnFileds2 > 1) ? "theEnt," : ",") << "\n"; + if (aNnFileds2 > 1) + { + anOS << "Interface_EntityIterator& theIter) const\n"; + } + else + { + anOS << "Interface_EntityIterator&) const\n"; + } + } + anOS << "{\n"; + if (aNnFileds2 > 1) + { + anOS << aStringOS.str(); + } + anOS << "}\n"; + if (CheckFlag()) + { + Express::WriteMethodStamp (anOS, "Check"); + anOS << "void " << aRWCPPName << "::Check (const Handle(Standard_Transient)& entt,\n"; + writeSpaces (anOS, 18 + aRWCPPName.Length()); + anOS << "const Interface_ShareTool& shares,\n"; + writeSpaces (anOS, 18 + aRWCPPName.Length()); + anOS << "Interface_Check& check) const\n" + "{\n"; + // DownCast entity to it's type + anOS << " Handle(" << aCPPName << ") ent = Handle(" << aCPPName << ")::DownCast(entt);\n" + "}\n"; + } + if (FillSharedFlag()) + { + Express::WriteMethodStamp (anOS, "FillShared"); + anOS << "void " << aRWCPPName << "::Share(const Handle(Interface_InterfaceModel)& model,\n"; + writeSpaces (anOS, 18 + aRWCPPName.Length()); + anOS << "const Handle(Standard_Transient)& entt,\n"; + writeSpaces (anOS, 18 + aRWCPPName.Length()); + anOS << "Interface_EntityIterator& iter) const\n" + "{\n"; + // DownCast entity to it's type + anOS << " Handle(" << aCPPName << ") ent = Handle(" << aCPPName << ")::DownCast(entt)\n" + "}\n"; + } + + // close + aStreamPtr.reset(); + } + //=============================== + // Step 5: adding method for registration of entities and include + { + Standard_Integer anIndex = Express_Item::Index(); + TCollection_AsciiString aRegDir = "Registration"; + OSD_Path aPathReg (aRegDir); + OSD_Directory aDirReg (aRegDir); + aDirReg.Build (aProt); + aRegDir += "/"; + + // write file with includes + { + TCollection_AsciiString aPackNameInc = "inc.txt"; + std::shared_ptr aStreamPtr = aFileSystem->OpenOStream (aRegDir.Cat (aPackNameInc), std::ios::out | std::ios::binary | std::ios::app); + Standard_OStream& anOS = *aStreamPtr; + anOS << "#include <" << aCPPName << ".hxx>\n"; + aStreamPtr.reset(); + } + // write file with RW includes + { + TCollection_AsciiString aPackNameRWInc = "rwinc.txt"; + std::shared_ptr aStreamPtr = aFileSystem->OpenOStream (aRegDir.Cat (aPackNameRWInc), std::ios::out | std::ios::binary | std::ios::app); + Standard_OStream& anOS = *aStreamPtr; + anOS << "#include <" << aRWCPPName << ".hxx>\n"; + aStreamPtr.reset(); + } + + // generate data for entity registration + if (anIndex > 0) + { + // StepAP214_Protocol.cxx + { + TCollection_AsciiString aPackNameProtocol = "protocol.txt"; + std::shared_ptr aStreamPtr = aFileSystem->OpenOStream (aRegDir.Cat (aPackNameProtocol), std::ios::out | std::ios::binary | std::ios::app); + Standard_OStream& anOS = *aStreamPtr; + anOS << "types.Bind (STANDARD_TYPE(" << aCPPName << "), " << anIndex << ");\n"; + aStreamPtr.reset(); + } + // RWStepAP214_GeneralModule.cxx + // FillSharedCase + { + TCollection_AsciiString aPackNameFillShared = "fillshared.txt"; + std::shared_ptr aStreamPtr = aFileSystem->OpenOStream (aRegDir.Cat (aPackNameFillShared), std::ios::out | std::ios::binary | std::ios::app); + Standard_OStream& anOS = *aStreamPtr; + anOS << " case " << anIndex << ":\n" + " {\n" + " DeclareAndCast (" << aCPPName << ", anent, ent);\n" + " " << aRWCPPName << " aTool;\n" + " aTool.Share(anent, iter);\n" + " }\n" + " break;\n"; + aStreamPtr.reset(); + } + // NewVoid + { + TCollection_AsciiString aPackNameNewVoid = "newvoid.txt"; + std::shared_ptr aStreamPtr = aFileSystem->OpenOStream (aRegDir.Cat (aPackNameNewVoid), std::ios::out | std::ios::binary | std::ios::app); + Standard_OStream& anOS = *aStreamPtr; + anOS << " case " << anIndex << ":\n" + " ent = new " << aCPPName << ";\n" + " break;\n"; + aStreamPtr.reset(); + } + // CategoryNumber + { + TCollection_AsciiString aPackNameCategory = "category.txt"; + std::shared_ptr aStreamPtr = aFileSystem->OpenOStream (aRegDir.Cat (aPackNameCategory), std::ios::out | std::ios::binary | std::ios::app); + Standard_OStream& anOS = *aStreamPtr; + anOS << " case " << anIndex << ": return " << Category() << ";\n"; + aStreamPtr.reset(); + } + // RWStepAP214_ReadWriteModule.cxx + // Reco + { + TCollection_AsciiString aRecoName = Express::ToStepName (Name()); + aRecoName.UpperCase(); + TCollection_AsciiString aPackNameReco = "reco.txt"; + std::shared_ptr aStreamPtr = aFileSystem->OpenOStream (aRegDir.Cat (aPackNameReco), std::ios::out | std::ios::binary | std::ios::app); + Standard_OStream& anOS = *aStreamPtr; + anOS << " static TCollection_AsciiString Reco_" << Name() << " (\"" << aRecoName << "\");\n"; + aStreamPtr.reset(); + } + // type bind + { + TCollection_AsciiString aPackNameTypeBind = "typebind.txt"; + std::shared_ptr aStreamPtr = aFileSystem->OpenOStream (aRegDir.Cat (aPackNameTypeBind), std::ios::out | std::ios::binary | std::ios::app); + Standard_OStream& anOS = *aStreamPtr; + anOS << " typenums.Bind (Reco_" << Name() << ", " << anIndex << ");\n"; + aStreamPtr.reset(); + } + // StepType + { + TCollection_AsciiString aPackNameStepType = "steptype.txt"; + std::shared_ptr aStreamPtr = aFileSystem->OpenOStream (aRegDir.Cat (aPackNameStepType), std::ios::out | std::ios::binary | std::ios::app); + Standard_OStream& anOS = *aStreamPtr; + anOS << " case " << anIndex << ": return Reco_" << Name() << ";\n"; + aStreamPtr.reset(); + } + // ReadStep + { + TCollection_AsciiString aPackNameReadStep = "readstep.txt"; + std::shared_ptr aStreamPtr = aFileSystem->OpenOStream (aRegDir.Cat (aPackNameReadStep), std::ios::out | std::ios::binary | std::ios::app); + Standard_OStream& anOS = *aStreamPtr; + anOS << " case " << anIndex << ":\n" + " {\n" + " DeclareAndCast (" << aCPPName << ", anent, ent);\n" + " " << aRWCPPName << " aTool;\n" + " aTool.ReadStep (data, num, ach, anent);\n" + " }\n" + " break;\n"; + aStreamPtr.reset(); + } + // WriteStep + { + TCollection_AsciiString aPackNameWriteStep = "writestep.txt"; + std::shared_ptr aStreamPtr = aFileSystem->OpenOStream (aRegDir.Cat (aPackNameWriteStep), std::ios::out | std::ios::binary | std::ios::app); + Standard_OStream& anOS = *aStreamPtr; + anOS << " case " << anIndex << ":\n" + " {\n" + " DeclareAndCast (" << aCPPName << ", anent, ent);\n" + " " << aRWCPPName << " aTool;\n" + " aTool.WriteStep (SW, anent);\n" + " }\n" + " break;\n"; + aStreamPtr.reset(); + } + Express_Item::SetIndex (anIndex + 1); + } + } + return Standard_True; +} + +//======================================================================= +// function : PropagateUse +// purpose : +//======================================================================= + +void Express_Entity::PropagateUse() const +{ + const TCollection_AsciiString& aPack = GetPackageName(); + const TCollection_AsciiString& aName = Name(); + + for (Standard_Integer i = 1; i <= myInherit->Length(); i++) + { + Handle(Express_Entity) anEntity = myInherit->Value (i); + anEntity->Use2 (aName, aPack); + } + for (Standard_Integer i = 1; i <= myFields->Length(); i++) + { + Handle(Express_Type) aType = myFields->Value (i)->Type(); + aType->Use2 (aName, aPack); + } +} + +//======================================================================= +// function : WriteIncludes +// purpose : +//======================================================================= + +Standard_Boolean Express_Entity::writeIncludes (Standard_OStream& theOS) const +{ + DataMapOfStringInteger aDict; + + for (Standard_Integer i = 1; i <= myInherit->Length(); i++) + { + Handle(Express_Entity) anEntity = myInherit->Value (i); + anEntity->Use(); + const TCollection_AsciiString& anEntityCPPName = anEntity->CPPName(); + if (aDict.IsBound (anEntityCPPName)) + { + continue; // avoid duplicating + } + aDict.Bind (anEntityCPPName, 1); + theOS << "#include <" << anEntityCPPName << ".hxx>\n"; + } + // write includes for own fields + for (Standard_Integer i = 1; i <= myFields->Length(); i++) + { + Handle(Express_Type) aType = myFields->Value (i)->Type(); + aType->Use(); + const TCollection_AsciiString aTypeCPPName = aType->CPPName(); + if (aDict.IsBound (aTypeCPPName)) + { + continue; // avoid duplicating + } + aDict.Bind (aTypeCPPName, 1); + if (aType->IsStandard()) + { + continue; + } + theOS << "#include <" << aTypeCPPName << ".hxx>\n"; + const TCollection_AsciiString& aPack = GetPackageName(); + // check that last include is for array + TCollection_AsciiString aStrForSearch = aPack; + aStrForSearch += "_HArray"; + Standard_Integer aFindPos = aTypeCPPName.Search (aStrForSearch.ToCString()); + if (aFindPos > -1) + { + // prepare file names + aFindPos = aPack.Length(); + const TCollection_AsciiString& aNameHA = aTypeCPPName; + TCollection_AsciiString aNameA = aNameHA.SubString (1, aFindPos + 1); + aNameA += aNameHA.SubString (aFindPos + 3, aNameHA.Length()); + TCollection_AsciiString aNameClass = aNameHA.SubString (aFindPos + 11, aNameHA.Length()); + const Handle(OSD_FileSystem)& aFileSystem = OSD_FileSystem::DefaultFileSystem(); + // create a package directory (if not yet exist) + OSD_Protection aProt (OSD_RWXD, OSD_RWXD, OSD_RX, OSD_RX); + OSD_Path aPath (aPack); + OSD_Directory aDir (aPath); + aDir.Build (aProt); + // create hxx files for Array1 + { + // Open HXX file + TCollection_AsciiString aFileName = aPack; + aFileName += "/"; + aFileName += aNameA; + std::shared_ptr aStreamPtr = aFileSystem->OpenOStream (aFileName.Cat (".hxx"), std::ios::out | std::ios::binary); + Standard_OStream& anOS = *aStreamPtr; + // write header + Express::WriteFileStamp (anOS); + anOS << "\n" + "#ifndef " << aNameA << "_HeaderFile\n" + "#define " << aNameA << "_HeaderFile\n" + "\n" + "#include <" << aPack << "_" << aNameClass << ".hxx>\n" + "#include \n" + "\n" + "typedef NCollection_" << aNameHA.SubString (aFindPos + 3, aFindPos + 8) << " " << aNameA << ";\n" + "\n" + "#endif\n"; + aStreamPtr.reset(); + } + // create hxx files for HArray1 + { + // Open HXX file + TCollection_AsciiString aFileName = aPack; + aFileName += "/"; + aFileName += aNameHA; + std::shared_ptr aStreamPtr = aFileSystem->OpenOStream (aFileName.Cat (".hxx"), std::ios::out | std::ios::binary); + Standard_OStream& anOS = *aStreamPtr; + // write header + Express::WriteFileStamp (anOS); + anOS << "\n" + "#ifndef " << aNameHA << "_HeaderFile\n" + "#define " << aNameHA << "_HeaderFile\n" + "\n" + "#include <" << aNameA << ".hxx>\n" + "#include \n" + "\n" + "DEFINE_HARRAY" << aNameHA.SubString (aFindPos + 8, aFindPos + 8) << "(" << aNameHA << ", " << aNameA << ");\n" + "\n" + "#endif\n"; + aStreamPtr.reset(); + } + } + } + + return Standard_True; +} + +//======================================================================= +// function : typeToSTEPName +// purpose : auxiliary for WriteRWReadField +//======================================================================= + +static TCollection_AsciiString typeToSTEPName (const Handle(Express_Type)& theType) +{ + TCollection_AsciiString aCPPName = theType->CPPName(); + TCollection_AsciiString aCls = aCPPName.Token ("_", 2); + if (aCls.Length() < 1) + { + aCls = aCPPName; + } + return Express::ToStepName (aCls); +} + +//======================================================================= +// function : WriteRWReadField +// purpose : +//======================================================================= + +static void writeRWReadField (Standard_OStream& theOS, + const TCollection_AsciiString& theIndex, + const TCollection_AsciiString& theSTEPName, + const TCollection_AsciiString& theVarName, + const Handle(Express_Type)& theVarType, + const Standard_Integer theLevel, + const Standard_Boolean isOptional) +{ + // indent + TCollection_AsciiString anIdent (" "); + Standard_Integer aLevel = 0; + for (; aLevel < theLevel; aLevel++) + { + anIdent += " "; + } + aLevel += 2; + + // name of variable identifying number of parameter in data + TCollection_AsciiString aParam ("theNum"); + if (theLevel > 0) + { + aParam = TCollection_AsciiString ("aNum"); + aParam += TCollection_AsciiString (theLevel); + } + + // decode aliased types + Handle(Express_Type) aType = theVarType; + const TCollection_AsciiString aTypeCPPName = aType->CPPName(); + while (aType->IsKind (STANDARD_TYPE(Express_NamedType))) + { + Handle(Express_NamedType) aNamedType = Handle(Express_NamedType)::DownCast (aType); + if (!aNamedType->Item()->IsKind (STANDARD_TYPE(Express_Alias))) + { + break; + } + Handle(Express_Alias) anAlias = Handle(Express_Alias)::DownCast (aNamedType->Item()); + aType = anAlias->Type(); + } + + // declare variable + if (aType->IsHandle()) + { + theOS << anIdent << "Handle(" << aTypeCPPName << ") a"; + } + else + { + theOS << anIdent << aTypeCPPName << " a"; + } + theOS << theVarName << ";\n"; + + if (isOptional) + { + theOS << anIdent << "Standard_Boolean has" << theVarName << " = Standard_True;\n" << + anIdent << "if (theData->IsParamDefined (" << aParam << ", " << theIndex << "))\n" << + anIdent << "{\n"; + anIdent += " "; + aLevel++; + } + + // read variable depending on its type + if (aType->IsKind (STANDARD_TYPE(Express_NamedType))) + { + Handle(Express_NamedType) aNamedType = Handle(Express_NamedType)::DownCast (aType); + if (aNamedType->Item()->IsKind (STANDARD_TYPE(Express_Entity))) + { + theOS << anIdent << "theData->ReadEntity (" << aParam << ", " << theIndex << ", \"" << theSTEPName << "\", theCheck,\n" << + anIdent << " STANDARD_TYPE(" << aNamedType->CPPName() << "), a" << theVarName << ");\n"; + } + else if (aNamedType->Item()->IsKind (STANDARD_TYPE(Express_Select))) + { + theOS << anIdent << "theData->ReadEntity (" << aParam << ", " << theIndex << ", \"" << theSTEPName << + "\", theCheck, a" << theVarName << ");\n"; + } + else if (aNamedType->Item()->IsKind (STANDARD_TYPE(Express_Enum))) + { + theOS << anIdent << "if (theData->ParamType(" << aParam << ", " << theIndex << ") == Interface_ParamEnum)\n" << + anIdent << "{\n" << + anIdent << " Standard_CString text = theData->ParamCValue(" << aParam << ", " << theIndex << ");\n"; + Handle(Express_Enum) anEnum = Handle(Express_Enum)::DownCast (aNamedType->Item()); + TCollection_AsciiString aPrefix = Express::EnumPrefix (anEnum->Name()); + Handle(TColStd_HSequenceOfHAsciiString) aNames = anEnum->Names(); + TCollection_AsciiString anEnumPack = anEnum->GetPackageName(); + for (Standard_Integer i = 1; i <= aNames->Length(); i++) + { + TCollection_AsciiString anEnumName = Express::ToStepName (aNames->Value (i)->String()); + anEnumName.UpperCase(); + theOS << anIdent << (i == 1 ? " if " : " else if") << " (strcmp (text, \"." << anEnumName << ".\")) a" << + theVarName << " = " << anEnumPack << "_" << aPrefix << aNames->Value (i)->String() << ";\n"; + } + theOS << anIdent << " else\n" << + anIdent << " {\n" << + anIdent << " theCheck->AddFail (\"Parameter #" << theIndex << " (" << theSTEPName << ") has not allowed value\");\n" << + anIdent << " }\n" << + anIdent << "}\n" << + anIdent << "else\n" << + anIdent << "{\n" << + anIdent << " theCheck->AddFail (\"Parameter #" << theIndex << " (" << theSTEPName << ") is not enumeration\");\n" << + anIdent << "}\n"; + } + } + else if (aType->IsKind (STANDARD_TYPE(Express_ComplexType))) + { + Handle(Express_ComplexType) aComplex = Handle(Express_ComplexType)::DownCast (aType); + theOS << anIdent << "Standard_Integer aSub" << theIndex << " = 0;\n" << + anIdent << "if (theData->ReadSubList (" << aParam << ", " << theIndex << ", \"" << theSTEPName << "\", theCheck, aSub" << theIndex << "))\n" << + anIdent << "{\n" << + anIdent << " Standard_Integer aNb" << theLevel << " = theData->NbParams (aSub" << theIndex << ");\n"; + TCollection_AsciiString anIterI = theLevel; + anIterI.Prepend ("i"); + TCollection_AsciiString aVar = theLevel; + aVar.Prepend ("nIt"); + if (aComplex->Type()->IsKind (STANDARD_TYPE(Express_ComplexType))) + { + // array 2 + Handle(Express_ComplexType) aComplex2 = Handle(Express_ComplexType)::DownCast (aComplex->Type()); + TCollection_AsciiString anIterJ = theLevel; + anIterJ.Prepend ("j"); + theOS << anIdent << " Standard_Integer nbj" << theLevel << " = theData->NbParams (theData->ParamNumber (aSub" << theIndex << ", 1));\n" << + anIdent << " a" << theVarName << " = new " << aTypeCPPName << "(1, aNb" << theLevel << ", 1, nbj" << theLevel << ");\n" << + anIdent << " for (Standard_Integer " << anIterI << " = 1; " << anIterI << " <= aNb" << theLevel << "; " << anIterI << "++)\n" << + anIdent << " {\n" << + anIdent << " Standard_Integer subj" << theIndex << " = 0;\n" << + anIdent << " if ( theData->ReadSubList (aSub" << theIndex << ", " << anIterI << ", \"sub-part(" << theSTEPName << ")\", theCheck, subj" << theIndex << ") ) {\n" << + anIdent << " Standard_Integer aNum" << aLevel + 2 << " = subj" << theIndex << ";\n" << + anIdent << " for (Standard_Integer " << anIterJ << " = 1; " << anIterJ << " <= nbj" << theLevel << "; " << anIterJ << "++)\n" << + anIdent << " {\n"; + TCollection_AsciiString aSubName = typeToSTEPName (aComplex2->Type()); + writeRWReadField (theOS, anIterJ, aSubName, aVar, aComplex2->Type(), aLevel + 2, Standard_False); + theOS << anIdent << " a" << theVarName << "->SetValue(" << anIterI << "," << anIterJ << ", a" << aVar << ");\n" << + anIdent << " }\n" << + anIdent << " }\n"; + } + else + { + // simple array + theOS << anIdent << " a" << theVarName << " = new " << aTypeCPPName << "(1, aNb" << theLevel << ");\n" << + anIdent << " Standard_Integer aNum" << aLevel << " = aSub" << theIndex << ";\n" << + anIdent << " for (Standard_Integer " << anIterI << " = 1; " << anIterI << " <= aNb" << theLevel << "; " << anIterI << "++)\n" << + anIdent << " {\n"; + TCollection_AsciiString aSubName = typeToSTEPName (aComplex->Type()); + writeRWReadField (theOS, anIterI, aSubName, aVar, aComplex->Type(), aLevel, Standard_False); + theOS << anIdent << " a" << theVarName << "->SetValue(" << anIterI << ", a" << aVar << ");\n"; + } + theOS << anIdent << " }\n" << + anIdent << "}\n"; + } + else if (aType->IsKind (STANDARD_TYPE(Express_String))) + { + if (theSTEPName.Length() + theVarName.Length() < 70) + { + theOS << anIdent << "theData->ReadString (" << aParam << ", " << theIndex << ", \"" << theSTEPName << "\", theCheck, a" << theVarName << ");\n"; + } + else + { + theOS << anIdent << "theData->ReadString (" << aParam << ", " << theIndex << ", \"" << theSTEPName << "\", theCheck,\n" << + anIdent << " a" << theVarName << ");\n"; + } + } + else if (aType->IsKind (STANDARD_TYPE(Express_Logical))) + { + theOS << anIdent << "theData->ReadLogical (" << aParam << ", " << theIndex << ", \"" << theSTEPName << "\", theCheck, a" << theVarName << ");\n"; + } + else if (aType->IsKind (STANDARD_TYPE(Express_Boolean))) + { + theOS << anIdent << "theData->ReadBoolean (" << aParam << ", " << theIndex << ", \"" << theSTEPName << "\", theCheck, a" << theVarName << ");\n"; + } + else if (aType->IsKind (STANDARD_TYPE(Express_Number)) || aType->IsKind (STANDARD_TYPE(Express_Integer))) + { + theOS << anIdent << "theData->ReadInteger (" << aParam << ", " << theIndex << ", \"" << theSTEPName << "\", theCheck, a" << theVarName << ");\n"; + } + else if (aType->IsKind (STANDARD_TYPE(Express_Real))) + { + theOS << anIdent << "theData->ReadReal (" << aParam << ", " << theIndex << ", \"" << theSTEPName << "\", theCheck, a" << theVarName << ");\n"; + } + + if (isOptional) + { + anIdent.Remove (1, 2); + theOS << anIdent << "}\n" << + anIdent << "else\n" << + anIdent << "{\n" << + anIdent << " has" << theVarName << " = Standard_False;\n" << + anIdent << " a" << theVarName; + if (aType->IsHandle()) + { + theOS << ".Nullify();"; + } + else if (aType->IsStandard()) + { + theOS << " = 0;"; + } + else + { + theOS << " = " << aTypeCPPName << "();"; + } + theOS << "\n"; + theOS << anIdent << "}\n"; + } +} + +//======================================================================= +// function : WriteRWReadCode +// purpose : +//======================================================================= + +Standard_Integer Express_Entity::writeRWReadCode (Standard_OStream& theOS, + const Standard_Integer theStart, + const Standard_Integer theOwn) const +{ + Standard_Integer aNum = theStart; + + // write code for reading inherited fields + for (Standard_Integer i = 1; i <= myInherit->Length(); i++) + { + aNum = myInherit->Value (i)->writeRWReadCode (theOS, aNum, Standard_False); + } + + // write code for reading own fields + if (myFields->Length() > 0) + { + if (aNum > 0) + theOS << "\n"; + theOS << " // " << (theOwn ? "Own" : "Inherited") << " fields of " << Name() << "\n"; + } + + for (Standard_Integer i = 1; i <= myFields->Length(); i++) + { + Handle(Express_Field) aField = myFields->Value (i); + TCollection_AsciiString aSTEPName = Express::ToStepName (aField->Name()); + if (!theOwn) + { + aSTEPName.Prepend (Express::ToStepName (Name().Cat ("."))); + } + TCollection_AsciiString aVarName (aField->Name()); + if (!theOwn) + { + aVarName.Prepend (Name().Cat ("_")); + } + theOS << "\n"; + writeRWReadField (theOS, TCollection_AsciiString (aNum), aSTEPName, aVarName, aField->Type(), 0, aField->IsOptional()); + aNum++; + } + + return aNum; +} + +//======================================================================= +// function : WriteRWWriteField +// purpose : +//======================================================================= + +static void writeRWWriteField (Standard_OStream& theOS, + const TCollection_AsciiString& theVarName, + const Handle(Express_Type)& theVarType, + const Standard_Integer theIndex, + const Standard_Integer theLevel) +{ + // indent + TCollection_AsciiString anIdent (" "); + Standard_Integer aLevel = 0; + for (; aLevel < theLevel; aLevel++) + { + anIdent += " "; + } + aLevel++; + + // decode aliased types + Handle(Express_Type) aType = theVarType; + while (aType->IsKind (STANDARD_TYPE(Express_NamedType))) + { + Handle(Express_NamedType) aNamedType = Handle(Express_NamedType)::DownCast (aType); + if (!aNamedType->Item()->IsKind (STANDARD_TYPE(Express_Alias))) + { + break; + } + Handle(Express_Alias) anAlias = Handle(Express_Alias)::DownCast (aNamedType->Item()); + aType = anAlias->Type(); + } + + // write variable depending on its type + if (aType->IsKind (STANDARD_TYPE(Express_ComplexType))) + { + Handle(Express_ComplexType) aComplex = Handle(Express_ComplexType)::DownCast (aType); + aType = aComplex->Type(); + TCollection_AsciiString aVar (theLevel); + aVar.Prepend ("aVar"); + theOS << anIdent << "theSW.OpenSub();\n" << + anIdent << "for (Standard_Integer i" << theIndex << " = 1; i" << theIndex << " <= "; + if (aType->IsKind (STANDARD_TYPE(Express_ComplexType))) + { + // array 2 + Handle(Express_ComplexType) complex2 = Handle(Express_ComplexType)::DownCast (aType); + aType = complex2->Type(); + theOS << theVarName << "->RowLength(); i" << theIndex << "++)\n" << + anIdent << "{\n" << + anIdent << " theSW.NewLine(Standard_False);\n" << + anIdent << " theSW.OpenSub();\n" << + anIdent << " for (Standard_Integer j" << theIndex << " = 1; j" << theIndex << " <= " << theVarName << "->ColLength(); j" << theIndex << "++)\n" << + anIdent << " {\n" << + anIdent << " " << (aType->IsHandle() ? " Handle(" : " ") << aType->CPPName() << (aType->IsHandle() ? ") " : " ") << aVar << " = " << theVarName << "->Value (i" << theIndex << ", j" << theIndex << ");\n"; + writeRWWriteField (theOS, aVar, aType, theIndex + 1, aLevel + 1); + theOS << anIdent << " }\n" << + anIdent << " theSW.CloseSub();\n"; + } + else + { + // simple array + theOS << theVarName << "->Length(); i" << theIndex << "++)\n" << + anIdent << "{\n" << + anIdent << (aType->IsHandle() ? " Handle(" : " ") << aType->CPPName() << (aType->IsHandle() ? ") " : " ") << aVar << " = " << theVarName << "->Value (i" << theIndex << ");\n"; + writeRWWriteField (theOS, aVar, aType, theIndex + 1, aLevel); + } + theOS << anIdent << "}\n" << + anIdent << "theSW.CloseSub();\n"; + } + else if (aType->IsKind (STANDARD_TYPE(Express_Boolean))) + { + theOS << anIdent << "theSW.SendBoolean (" << theVarName << ");\n"; + } + else if (aType->IsKind (STANDARD_TYPE(Express_Logical))) + { + theOS << anIdent << "theSW.SendLogical (" << theVarName << ");\n"; + } + else + { + Handle(Express_NamedType) aNamedType = Handle(Express_NamedType)::DownCast (aType); + if (!aNamedType.IsNull() && aNamedType->Item()->IsKind (STANDARD_TYPE(Express_Enum))) + { + Handle(Express_Enum) anEnum = Handle(Express_Enum)::DownCast (aNamedType->Item()); + TCollection_AsciiString aPrefix = Express::EnumPrefix (anEnum->Name()); + Handle(TColStd_HSequenceOfHAsciiString) aNames = anEnum->Names(); + TCollection_AsciiString anEnumPack = anEnum->GetPackageName(); + theOS << anIdent << "switch (" << theVarName << ")\n"; + theOS << anIdent << "{\n"; + for (Standard_Integer i = 1; i <= aNames->Length(); i++) + { + TCollection_AsciiString anEnumName = Express::ToStepName (aNames->Value (i)->String()); + anEnumName.UpperCase(); + theOS << anIdent << " case " << anEnumPack << "_" << aPrefix << aNames->Value (i)->String() << ": theSW.SendEnum (\"." << anEnumName << ".\"); break;\n"; + } + theOS << anIdent << "}\n"; + } + else + { + theOS << anIdent << "theSW.Send (" << theVarName; + if (!aNamedType.IsNull() && aNamedType->Item()->IsKind (STANDARD_TYPE(Express_Select))) + { + theOS << ".Value()"; + } + theOS << ");\n"; + } + } +} + +//======================================================================= +// function : WriteRWWriteCode +// purpose : +//======================================================================= + +Standard_Integer Express_Entity::writeRWWriteCode (Standard_OStream& theOS, + const Standard_Integer theStart, + const Standard_Integer theOwn) const +{ + Standard_Integer aNum = theStart; + + // write code for writing inherited fields + for (Standard_Integer i = 1; i <= myInherit->Length(); i++) + { + aNum = myInherit->Value (i)->writeRWWriteCode (theOS, aNum, (i > 1 ? -1 : 1)); + } + + // write code for writing own fields + if (myFields->Length() > 0) + { + theOS << "\n" + " // " << (theOwn == 1 ? "Own" : "Inherited") << " fields of " << Name() << "\n"; + } + + for (Standard_Integer i = 1; i <= myFields->Length(); i++) + { + Handle(Express_Field) aField = myFields->Value (i); + TCollection_AsciiString aVarName (aField->Name()); + if (!theOwn) + { + aVarName.Prepend (CPPName().Cat ("::")); + } + else if (theOwn == -1) + { + // inherited base class implemented as field + aVarName.Prepend (Name().Cat ("()->")); + } + aVarName.Prepend ("theEnt->"); + aVarName += "()"; + theOS << "\n"; + + if (aField->IsOptional()) + { + theOS << " if (theEnt->"; + if (!theOwn) + { + theOS << CPPName() << "::"; + } + else if (theOwn == -1) + { + theOS << Name() << "()->"; + } + theOS << "Has" << aField->Name() << "())\n"; + theOS << " {\n"; + } + writeRWWriteField (theOS, aVarName, aField->Type(), aNum, (aField->IsOptional() ? 1 : 0)); + if (aField->IsOptional()) + { + theOS << " }\n" + " else\n" + " {\n" + " theSW.SendUndef();\n" + " }\n"; + } + aNum++; + } + + return aNum; +} + +//======================================================================= +// function : WriteRWShareField +// purpose : +//======================================================================= + +static Standard_Boolean writeRWShareField (Standard_OStream& theOS, + const TCollection_AsciiString& theVarName, + const Handle(Express_Type)& theVarType, + const Standard_Integer theIndex, + const Standard_Integer theLevel) +{ + // indent + TCollection_AsciiString anIdent (" "); + Standard_Integer aLevel = 0; + for (; aLevel < theLevel; aLevel++) + { + anIdent += " "; + } + aLevel++; + + // decode aliased types + Handle(Express_Type) aType = theVarType; + while (aType->IsKind (STANDARD_TYPE(Express_NamedType))) + { + Handle(Express_NamedType) aNamedType = Handle(Express_NamedType)::DownCast (aType); + if (!aNamedType->Item()->IsKind (STANDARD_TYPE(Express_Alias))) + { + break; + } + Handle(Express_Alias) anAlias = Handle(Express_Alias)::DownCast (aNamedType->Item()); + aType = anAlias->Type(); + } + + // write variable depending on its type + if (aType->IsKind (STANDARD_TYPE(Express_ComplexType))) + { + Handle(Express_ComplexType) aComplex = Handle(Express_ComplexType)::DownCast (aType); + aType = aComplex->Type(); + TCollection_AsciiString aVar (theLevel); + aVar.Prepend ("aVar"); + std::ostringstream aStringOS; + if (!writeRWShareField (aStringOS, aVar, aType, theIndex + 1, aLevel)) + { + return Standard_False; + } + theOS << anIdent << "for (Standard_Integer i" << theIndex << " = 1; i" << theIndex << " <= " << theVarName << "->Length(); i" << theIndex << "++)\n" << + anIdent << "{\n" << + anIdent << (aType->IsHandle() ? " Handle(" : " ") << aType->CPPName() << (aType->IsHandle() ? ") " : " ") << aVar << " = " << theVarName << "->Value (i" << theIndex << ");\n"; + theOS << aStringOS.str(); + theOS << anIdent << "}\n"; + return Standard_True; + } + if (aType->IsKind (STANDARD_TYPE(Express_NamedType))) + { + Handle(Express_NamedType) aNamedType = Handle(Express_NamedType)::DownCast (aType); + if (aNamedType->Item()->IsKind (STANDARD_TYPE(Express_Entity))) + { + theOS << anIdent << "theIter.AddItem (" << theVarName << ");\n"; + return Standard_True; + } + if (aNamedType->Item()->IsKind (STANDARD_TYPE(Express_Select))) + { + theOS << anIdent << "theIter.AddItem (" << theVarName << ".Value());\n"; + return Standard_True; + } + } + + return Standard_False; +} + +//======================================================================= +// function : WriteRWShareCode +// purpose : +//======================================================================= + +Standard_Integer Express_Entity::writeRWShareCode (Standard_OStream& theOS, + const Standard_Integer theStart, + const Standard_Integer theOwn) const +{ + Standard_Integer aNum = theStart; + + // write code for sharing inherited fields + for (Standard_Integer i = 1; i <= myInherit->Length(); i++) + { + aNum = myInherit->Value (i)->writeRWShareCode (theOS, aNum, (i > 1 ? -1 : Standard_False)); + } + + // write code for sharing own fields + if (myFields->Length() > 0) + { + theOS << "\n" + " // " << (theOwn == 1 ? "Own" : "Inherited") << " fields of " << Name() << "\n"; + } + + for (Standard_Integer i = 1; i <= myFields->Length(); i++) + { + Handle(Express_Field) aField = myFields->Value (i); + TCollection_AsciiString aVarName (aField->Name()); + if (!theOwn) + { + aVarName.Prepend (CPPName().Cat ("::")); + } + else if (theOwn == -1) + { + // inherited base class implemented as field + aVarName.Prepend (Name().Cat ("()->")); + } + aVarName.Prepend ("theEnt->"); + aVarName += "()"; + + std::ostringstream aStringOS; + if (!writeRWShareField (aStringOS, aVarName, aField->Type(), aNum, (aField->IsOptional() ? 1 : 0))) + { + continue; + } + aNum++; + theOS << "\n"; + if (aField->IsOptional()) + { + theOS << " if (theEnt->"; + if (!theOwn) + theOS << CPPName() << "::"; + else if (theOwn == -1) + theOS << Name() << "()->"; + theOS << "Has" << aField->Name() << "())\n" + " {\n"; + } + theOS << aStringOS.str(); + if (aField->IsOptional()) + { + theOS << " }\n"; + } + } + + return aNum; +} + +//======================================================================= +// function : MakeInit +// purpose : +//======================================================================= + +Standard_Integer Express_Entity::makeInit (Standard_OStream& theOS, + const Standard_Integer theShift, + const Standard_Integer theOwn, + const Standard_Integer theMode) const +{ + Standard_Integer aShift = theShift; + + // write code for inherited fields + for (Standard_Integer i = 1; i <= myInherit->Length(); i++) + { + Handle(Express_Entity) anEntity = myInherit->Value (i); + const TCollection_AsciiString& anEntityCPPName = anEntity->CPPName(); + if (theMode == 3) + { + Standard_Integer aShift2 = 0; + if (i > 1) + { + theOS << "\n my" << anEntity->Name() << " = new " << anEntityCPPName << ";" + "\n my" << anEntity->Name() << "->Init ("; + aShift2 = 12 + anEntity->Name().Length(); + } + else + { + theOS << "\n " << anEntityCPPName << "::Init ("; + aShift2 = 10 + anEntityCPPName.Length(); + } + anEntity->makeInit (theOS, aShift2, Standard_False, 2); + theOS << ");"; + } + else + { + aShift = anEntity->makeInit (theOS, aShift, (i > 1 ? -1 : Standard_False), theMode); + } + } + + // write code for own fields + for (Standard_Integer i = 1; i <= myFields->Length(); i++) + { + Handle(Express_Field) aField = myFields->Value (i); + Handle(Express_Type) aFieldType = aField->Type(); + TCollection_AsciiString aVarName(aField->Name()); + if (theOwn != 1) + { + aVarName.Prepend (Name().Cat ("_")); + } + + // make CR and indent + TCollection_AsciiString aSpaces = ""; + for (Standard_Integer aSpaceNum = 0; aSpaceNum < abs (aShift); aSpaceNum++) + { + aSpaces += " "; + } + Standard_Character aDelim = (theMode == 0 ? ',' : (theMode == 3 ? '\n' : ',')); + if (aShift < 0) + { + if (i == 1 && myInherit->Length() == 0 && theMode == 3) + { + theOS << aDelim << aSpaces; + } + else if (theMode == 4) + { + theOS << ", "; + } + else + { + theOS << aDelim << "\n" << aSpaces; + } + } + else + { + aShift = -aShift; + } + + if (aField->IsOptional()) + { + if (theMode == 0) + { + theOS << "const Standard_Boolean theHas" << aVarName << ",\n" << aSpaces; + } + else if (theMode == 1) + { + theOS << "const Standard_Boolean theHas" << aVarName << ",\n" << aSpaces; + } + else if (theMode == 2) + { + theOS << "has" << aVarName << ",\n" << aSpaces; + } + else if (theMode == 4) + { + theOS << "has" << aVarName << ", "; + } + } + + // write field + if (theMode == 0 || theMode == 1) + { + theOS << "const " << (aFieldType->IsHandle() ? "Handle(" : "") << aFieldType->CPPName() << (aFieldType->IsHandle() ? ")" : "") << + (aFieldType->IsSimple() ? " the" : "& the") << aVarName; + } + else if (theMode == 2) + { + theOS << "the" << aVarName; + } + else if (theMode == 4) + { + theOS << "a" << aVarName; + } + else + { + if (aField->IsOptional()) + { + theOS << "myHas" << aField->Name() << " = theHas" << aVarName << ";\n" + " if (myHas" << aField->Name() << ")\n" + " {\n" + " my" << aField->Name() << " = the" << aVarName << ";\n" + " }\n" + " else\n" + " {\n" + " my" << aField->Name(); + if (aFieldType->IsHandle()) + { + theOS << ".Nullify();"; + } + else if (aFieldType->IsStandard()) + { + theOS << " = 0;"; + } + else + { + theOS << " = " << aFieldType->CPPName() << "();"; + } + theOS << "\n }"; + } + else + { + theOS << "my" << aField->Name() << " = the" << aVarName << ";"; + } + } + if (aShift > 0) + { + aShift = -aShift; + } + } + + return aShift; +} + +//======================================================================= +// function : SetAbstractFlag +// purpose : +//======================================================================= + +void Express_Entity::SetAbstractFlag (const Standard_Boolean isAbstract) +{ + myIsAbstract = isAbstract; +} + +//======================================================================= +// function : AbstractFlag +// purpose : +//======================================================================= + +Standard_Boolean Express_Entity::AbstractFlag() const +{ + return myIsAbstract; +} diff --git a/src/Express/Express_Entity.hxx b/src/Express/Express_Entity.hxx new file mode 100644 index 0000000000..76e4043f23 --- /dev/null +++ b/src/Express/Express_Entity.hxx @@ -0,0 +1,114 @@ +// Copyright (c) 1999-2020 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 _Express_Entity_HeaderFile +#define _Express_Entity_HeaderFile + +#include +#include +#include +#include +#include + +class Express_HSequenceOfEntity; + +class Express_HSequenceOfField; + +class Dico_DictionaryOfInteger; + +//! Implements ENTITY item of the EXPRESS +//! schema, with interface for deferred Item class. +class Express_Entity : public Express_Item +{ + +public: + + //! Create ENTITY item and initialize it + //! flags hasCheck and hasFillShared mark if generated class has + //! methods Check and FillShared correspondingly. + Standard_EXPORT Express_Entity (const Standard_CString theName, + const Handle(TColStd_HSequenceOfHAsciiString)& theInherit, + const Handle(Express_HSequenceOfField)& theFields); + + //! Returns sequence of inherited classes (names) + Standard_EXPORT const Handle(TColStd_HSequenceOfHAsciiString)& SuperTypes() const; + + //! Returns sequence of inherited items + Standard_EXPORT const Handle(Express_HSequenceOfEntity)& Inherit() const; + + //! Returns sequence of fields + Standard_EXPORT const Handle(Express_HSequenceOfField)& Fields() const; + + //! Returns number of fields (only own fields if inherited is False + //! and including fields of all supertypes if it is True) + Standard_EXPORT Standard_Integer NbFields (const Standard_Boolean theInherited = Standard_False) const; + + //! Sets abstruct flag for entity; + Standard_EXPORT void SetAbstractFlag (const Standard_Boolean theIsAbstract); + + //! Returns abstract flag. + Standard_EXPORT inline Standard_Boolean AbstractFlag() const; + + DEFINE_STANDARD_RTTIEXT(Express_Entity, Express_Item) + +protected: + +private: + + typedef NCollection_DataMap DataMapOfStringInteger; + + //! Create HXX/CXX files from item + Standard_EXPORT virtual Standard_Boolean GenerateClass() const Standard_OVERRIDE; + + //! Propagates the calls of Use function + Standard_EXPORT virtual void PropagateUse() const Standard_OVERRIDE; + + //! Writes includes section of HXX + Standard_EXPORT Standard_Boolean writeIncludes (Standard_OStream& theOS) const; + + //! Writes code for reading all fields + Standard_EXPORT Standard_Integer writeRWReadCode (Standard_OStream& theOS, + const Standard_Integer theStart, + const Standard_Integer theOwn) const; + + //! Writes code for writing all fields + Standard_EXPORT Standard_Integer writeRWWriteCode (Standard_OStream& theOS, + const Standard_Integer theStart, + const Standard_Integer theOwn) const; + + //! Writes code for adding shared entities to the graph + Standard_EXPORT Standard_Integer writeRWShareCode (Standard_OStream& theOS, + const Standard_Integer theStart, + const Standard_Integer theOwn) const; + + //! Writes arguments and code for method Init() + //! Mode identifies what code is being written: + //! 0 - HXX declaration + //! 1 - CXX declaration + //! 2 - call (argument list) + //! 3 - implementation + //! 4 - call (argument list for RW) + Standard_EXPORT Standard_Integer makeInit (Standard_OStream& theOS, + const Standard_Integer theShift, + const Standard_Integer theOwn, + const Standard_Integer theMode) const; + +private: + + Handle(TColStd_HSequenceOfHAsciiString) mySupers; + Handle(Express_HSequenceOfEntity) myInherit; + Handle(Express_HSequenceOfField) myFields; + Standard_Boolean myIsAbstract; +}; + +#endif // _Express_Entity_HeaderFile diff --git a/src/Express/Express_Enum.cxx b/src/Express/Express_Enum.cxx new file mode 100644 index 0000000000..397edb7094 --- /dev/null +++ b/src/Express/Express_Enum.cxx @@ -0,0 +1,107 @@ +// Created: Tue Nov 2 14:40:06 1999 +// Author: Andrey BETENEV +// Copyright (c) 1999-2020 OPEN CASCADE SAS +// +// This file is part of Open CASCADE Technology software library. +// +// This library is free software; you can redistribute it and/or modify it under +// the terms of the GNU Lesser General Public License version 2.1 as published +// by the Free Software Foundation, with special exception defined in the file +// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT +// distribution for complete text of the license and disclaimer of any warranty. +// +// Alternatively, this file may be used under the terms of Open CASCADE +// commercial license or contractual agreement. + +#include + +#include +#include +#include +#include +#include +#include + +IMPLEMENT_STANDARD_RTTIEXT(Express_Enum, Express_Item) + +//======================================================================= +// function : Express_Enum +// purpose : +//======================================================================= + +Express_Enum::Express_Enum (const Standard_CString theName, const Handle(TColStd_HSequenceOfHAsciiString)& theNames) +: Express_Item (theName), myNames (theNames) +{ +} + +//======================================================================= +// function : Names +// purpose : +//======================================================================= + +const Handle(TColStd_HSequenceOfHAsciiString)& Express_Enum::Names() const +{ + return myNames; +} + +//======================================================================= +// function : GenerateClass +// purpose : +//======================================================================= + +Standard_Boolean Express_Enum::GenerateClass() const +{ + const TCollection_AsciiString aCPPName = CPPName(); + Message::SendInfo() << "Generating ENUMERATION " << aCPPName; + + // create a package directory (if not yet exist) + OSD_Protection aProt (OSD_RWXD, OSD_RWXD, OSD_RX, OSD_RX); + TCollection_AsciiString aPack = GetPackageName(); + OSD_Path aPath (aPack); + OSD_Directory aDir (aPath); + aDir.Build (aProt); + aPack += "/"; + aPack += aCPPName; + const Handle(OSD_FileSystem)& aFileSystem = OSD_FileSystem::DefaultFileSystem(); + + // Open HXX file + std::shared_ptr aStreamPtr = aFileSystem->OpenOStream (aPack.Cat (".hxx"), std::ios::out | std::ios::ate); + Standard_OStream& anOS = *aStreamPtr; + + // write header + Express::WriteFileStamp (anOS); + + // write defines + anOS << "#ifndef _" << aCPPName << "_HeaderFile\n" + "#define _" << aCPPName << "_HeaderFile\n" + "\n" + "enum " << aCPPName << "\n" + "{\n"; + TCollection_AsciiString aPrefix = Express::EnumPrefix (Name()); + for (Standard_Integer i = 1; i <= myNames->Length(); i++) + { + if (i > 1) + { + anOS << ",\n"; + } + anOS << " " << GetPackageName() << "_" << aPrefix << myNames->Value (i)->String(); + } + + anOS << "\n" + "};\n" + "\n" + "#endif // _" << aCPPName << "_HeaderFile\n"; + + aStreamPtr.reset(); + + return Standard_False; +} + +//======================================================================= +// function : PropagateUse +// purpose : +//======================================================================= + +void Express_Enum::PropagateUse() const +{ +} diff --git a/src/Express/Express_Enum.hxx b/src/Express/Express_Enum.hxx new file mode 100644 index 0000000000..3b8cec30eb --- /dev/null +++ b/src/Express/Express_Enum.hxx @@ -0,0 +1,50 @@ +// Copyright (c) 1999-2020 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 _Express_Enum_HeaderFile +#define _Express_Enum_HeaderFile + +#include +#include +#include + +//! Implements TYPE ENUMERATION item of the EXPRESS +//! schema, with interface for deferred Item class. +class Express_Enum : public Express_Item +{ + +public: + + //! Create ENUM item and initialize it + Standard_EXPORT Express_Enum (const Standard_CString theName, const Handle(TColStd_HSequenceOfHAsciiString)& theNames); + + //! Returns names of enumeration variants + Standard_EXPORT const Handle(TColStd_HSequenceOfHAsciiString)& Names() const; + + //! Create HXX/CXX files from item + Standard_EXPORT virtual Standard_Boolean GenerateClass() const Standard_OVERRIDE; + + //! Propagates the calls of Use function + Standard_EXPORT virtual void PropagateUse() const Standard_OVERRIDE; + + DEFINE_STANDARD_RTTIEXT(Express_Enum, Express_Item) + +protected: + +private: + + Handle(TColStd_HSequenceOfHAsciiString) myNames; + +}; + +#endif // _Express_Enum_HeaderFile diff --git a/src/Express/Express_Field.cxx b/src/Express/Express_Field.cxx new file mode 100644 index 0000000000..b8b2204dac --- /dev/null +++ b/src/Express/Express_Field.cxx @@ -0,0 +1,89 @@ +// Created: Tue Nov 2 16:40:51 1999 +// Author: Andrey BETENEV +// Copyright (c) 1999-2020 OPEN CASCADE SAS +// +// This file is part of Open CASCADE Technology software library. +// +// This library is free software; you can redistribute it and/or modify it under +// the terms of the GNU Lesser General Public License version 2.1 as published +// by the Free Software Foundation, with special exception defined in the file +// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT +// distribution for complete text of the license and disclaimer of any warranty. +// +// Alternatively, this file may be used under the terms of Open CASCADE +// commercial license or contractual agreement. + +#include + +#include +#include + +IMPLEMENT_STANDARD_RTTIEXT(Express_Field, Standard_Transient) + +//======================================================================= +// function : Express_Field +// purpose : +//======================================================================= + +Express_Field::Express_Field (const Standard_CString theName, + const Handle(Express_Type)& theType, + const Standard_Boolean theOpt) +{ + myName = new TCollection_HAsciiString (theName); + myType = theType; + myOpt = theOpt; +} + +//======================================================================= +// function : Express_Field +// purpose : +//======================================================================= + +Express_Field::Express_Field (const Handle(TCollection_HAsciiString)& theName, + const Handle(Express_Type)& theType, + const Standard_Boolean theOpt) +{ + myName = theName; + myType = theType; + myOpt = theOpt; +} + +//======================================================================= +// function : Name +// purpose : +//======================================================================= + +const TCollection_AsciiString& Express_Field::Name() const +{ + return myName->String(); +} + +//======================================================================= +// function : HName +// purpose : +//======================================================================= + +Handle(TCollection_HAsciiString) Express_Field::HName() const +{ + return myName; +} + +//======================================================================= +// function : Type +// purpose : +//======================================================================= + +const Handle(Express_Type)& Express_Field::Type() const +{ + return myType; +} + +//======================================================================= +// function : IsOptional +// purpose : +//======================================================================= + +Standard_Boolean Express_Field::IsOptional() const +{ + return myOpt; +} diff --git a/src/Express/Express_Field.hxx b/src/Express/Express_Field.hxx new file mode 100644 index 0000000000..f2143fd017 --- /dev/null +++ b/src/Express/Express_Field.hxx @@ -0,0 +1,63 @@ +// Copyright (c) 1999-2020 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 _Express_Field_HeaderFile +#define _Express_Field_HeaderFile + +#include + +class Express_Type; +class TCollection_HAsciiString; +class TCollection_AsciiString; + +//! Represents field of the ENTITY item in the EXPRESS schema +class Express_Field : public Standard_Transient +{ + +public: + + //! Create object and initialize it + Standard_EXPORT Express_Field (const Standard_CString theName, + const Handle(Express_Type)& theType, + const Standard_Boolean theOpt); + + //! Create object and initialize it + Standard_EXPORT Express_Field (const Handle(TCollection_HAsciiString)& theName, + const Handle(Express_Type)& theType, + const Standard_Boolean theOpt); + + //! Returns field name + Standard_EXPORT const TCollection_AsciiString& Name() const; + + //! Returns a pointer to the field name to modify it + Standard_EXPORT Handle(TCollection_HAsciiString) HName() const; + + //! Returns field type + Standard_EXPORT const Handle(Express_Type)& Type() const; + + //! Returns True if field is optional + Standard_EXPORT Standard_Boolean IsOptional() const; + + DEFINE_STANDARD_RTTIEXT(Express_Field, Standard_Transient) + +protected: + +private: + + Handle(TCollection_HAsciiString) myName; + Handle(Express_Type) myType; + Standard_Boolean myOpt; + +}; + +#endif // _Express_Field_HeaderFile diff --git a/src/Express/Express_HSequenceOfEntity.hxx b/src/Express/Express_HSequenceOfEntity.hxx new file mode 100644 index 0000000000..649e818469 --- /dev/null +++ b/src/Express/Express_HSequenceOfEntity.hxx @@ -0,0 +1,22 @@ +// Copyright (c) 1999-2020 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 Express_HSequenceOfEntity_HeaderFile +#define Express_HSequenceOfEntity_HeaderFile + +#include +#include + +DEFINE_HSEQUENCE(Express_HSequenceOfEntity, Express_SequenceOfEntity) + +#endif diff --git a/src/Express/Express_HSequenceOfField.hxx b/src/Express/Express_HSequenceOfField.hxx new file mode 100644 index 0000000000..4fde3dee92 --- /dev/null +++ b/src/Express/Express_HSequenceOfField.hxx @@ -0,0 +1,22 @@ +// Copyright (c) 1999-2020 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 Express_HSequenceOfField_HeaderFile +#define Express_HSequenceOfField_HeaderFile + +#include +#include + +DEFINE_HSEQUENCE(Express_HSequenceOfField, Express_SequenceOfField) + +#endif diff --git a/src/Express/Express_HSequenceOfItem.hxx b/src/Express/Express_HSequenceOfItem.hxx new file mode 100644 index 0000000000..a6ea4fa99a --- /dev/null +++ b/src/Express/Express_HSequenceOfItem.hxx @@ -0,0 +1,22 @@ +// Copyright (c) 1999-2020 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 Express_HSequenceOfItem_HeaderFile +#define Express_HSequenceOfItem_HeaderFile + +#include +#include + +DEFINE_HSEQUENCE(Express_HSequenceOfItem, Express_SequenceOfItem) + +#endif diff --git a/src/Express/Express_Integer.cxx b/src/Express/Express_Integer.cxx new file mode 100644 index 0000000000..fe1fb0b68e --- /dev/null +++ b/src/Express/Express_Integer.cxx @@ -0,0 +1,39 @@ +// Created: Tue Nov 2 15:27:26 1999 +// Author: Andrey BETENEV +// Copyright (c) 1999-2020 OPEN CASCADE SAS +// +// This file is part of Open CASCADE Technology software library. +// +// This library is free software; you can redistribute it and/or modify it under +// the terms of the GNU Lesser General Public License version 2.1 as published +// by the Free Software Foundation, with special exception defined in the file +// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT +// distribution for complete text of the license and disclaimer of any warranty. +// +// Alternatively, this file may be used under the terms of Open CASCADE +// commercial license or contractual agreement. + +#include + +#include + +IMPLEMENT_STANDARD_RTTIEXT(Express_Integer, Express_PredefinedType) + +//======================================================================= +// function : Express_Integer +// purpose : +//======================================================================= + +Express_Integer::Express_Integer() +{ +} + +//======================================================================= +// function : CPPName +// purpose : +//======================================================================= + +const TCollection_AsciiString Express_Integer::CPPName() const +{ + return "Standard_Integer"; +} diff --git a/src/Express/Express_Integer.hxx b/src/Express/Express_Integer.hxx new file mode 100644 index 0000000000..67bea6933e --- /dev/null +++ b/src/Express/Express_Integer.hxx @@ -0,0 +1,42 @@ +// Copyright (c) 1999-2020 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 _Express_Integer_HeaderFile +#define _Express_Integer_HeaderFile + +#include +#include + +class TCollection_AsciiString; + +//! Implements EXPRESS type 'INTEGER' +class Express_Integer : public Express_PredefinedType +{ + +public: + + //! Empty constructor + Standard_EXPORT Express_Integer(); + + //! Returns "Standard_Integer" + Standard_EXPORT virtual const TCollection_AsciiString CPPName() const Standard_OVERRIDE; + + DEFINE_STANDARD_RTTIEXT(Express_Integer, Express_PredefinedType) + +protected: + +private: + +}; + +#endif // _Express_Integer_HeaderFile diff --git a/src/Express/Express_Item.cxx b/src/Express/Express_Item.cxx new file mode 100644 index 0000000000..2e78e9e172 --- /dev/null +++ b/src/Express/Express_Item.cxx @@ -0,0 +1,335 @@ +// Created: Tue Nov 2 13:14:31 1999 +// Author: Andrey BETENEV +// Copyright (c) 1999-2020 OPEN CASCADE SAS +// +// This file is part of Open CASCADE Technology software library. +// +// This library is free software; you can redistribute it and/or modify it under +// the terms of the GNU Lesser General Public License version 2.1 as published +// by the Free Software Foundation, with special exception defined in the file +// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT +// distribution for complete text of the license and disclaimer of any warranty. +// +// Alternatively, this file may be used under the terms of Open CASCADE +// commercial license or contractual agreement. + +#include + +#include +#include +#include + +IMPLEMENT_STANDARD_RTTIEXT(Express_Item, Standard_Transient) + +Standard_Integer Express_Item::myIndex = -1; + +//======================================================================= +// function : Express_Item +// purpose : +//======================================================================= + +Express_Item::Express_Item (const Standard_CString theName) +{ + myName = new TCollection_HAsciiString (theName); + myGenMode = GM_Undefined; + myShortName = new TCollection_HAsciiString; + myCategory = new TCollection_HAsciiString; + myhasCheck = Standard_False; + myhasFillShared = Standard_False; + myLoopFlag = Standard_False; +} + +//======================================================================= +// function : Express_Item +// purpose : +//======================================================================= + +Express_Item::Express_Item (const Handle(TCollection_HAsciiString)& theName) +{ + myName = theName; + myGenMode = GM_Undefined; + myShortName = new TCollection_HAsciiString; + myCategory = new TCollection_HAsciiString; + myhasCheck = Standard_False; + myhasFillShared = Standard_False; + myLoopFlag = Standard_False; +} + +//======================================================================= +// function : Name +// purpose : +//======================================================================= + +const TCollection_AsciiString& Express_Item::Name() const +{ + return myName->String(); +} + +//======================================================================= +// function : HName +// purpose : +//======================================================================= + +Handle(TCollection_HAsciiString) Express_Item::HName() const +{ + return myName; +} + +//======================================================================= +// function : CPPName +// purpose : +//======================================================================= + +const TCollection_AsciiString Express_Item::CPPName() const +{ + TCollection_AsciiString aName = GetPackageName(); + aName += "_"; + aName += Name(); + return aName; +} + +//======================================================================= +// function : SetPackageName +// purpose : +//======================================================================= + +void Express_Item::SetPackageName (const TCollection_AsciiString& thePack) +{ + myPack = new TCollection_HAsciiString(thePack); +} + +//======================================================================= +// function : GetPackageName +// purpose : +//======================================================================= + +const TCollection_AsciiString& Express_Item::GetPackageName() const +{ + if (myPack.IsNull()) + { + Message::SendWarning() << "Warning: item " << Name() << " still has no package assigned, used " << GetUnknownPackageName(); + return GetUnknownPackageName(); + } + return myPack->String(); +} + +//======================================================================= +// function : IsPackageNameSet +// purpose : +//======================================================================= + +Standard_Boolean Express_Item::IsPackageNameSet() const +{ + return !myPack.IsNull(); +} + +//======================================================================= +// function : GetUnknownPackageName +// purpose : +//======================================================================= + +TCollection_AsciiString& Express_Item::GetUnknownPackageName() +{ + static TCollection_AsciiString aUnknownPackageName = "StepStep"; + + return aUnknownPackageName; +} + +//======================================================================= +// function : GetGenMode +// purpose : +//======================================================================= + +Express_Item::GenMode Express_Item::GetGenMode() const +{ + return myGenMode; +} + +//======================================================================= +// function : SetGenMode +// purpose : +//======================================================================= + +void Express_Item::SetGenMode (const Express_Item::GenMode theGenMode) +{ + myGenMode = theGenMode; +} + +//======================================================================= +// function : ResetLoopFlag +// purpose : +//======================================================================= + +void Express_Item::ResetLoopFlag() +{ + myLoopFlag = Standard_False; +} + +//======================================================================= +// function : Generate +// purpose : +//======================================================================= + +Standard_Boolean Express_Item::Generate() +{ + // skip items without "generate" mark + GenMode aMode = GetGenMode(); + if (!(aMode == GM_GenByUser || aMode == GM_GenByAlgo)) + { + return Standard_False; + } + // manage indent for cout in order to mark structure of calls + static Standard_Integer aShift = -1; + aShift++; + for (Standard_Integer i = 0; i < aShift; i++) + { + std::cout << " "; + } + // sets the mode to generated before "GenerateClass" function to avoid looping + SetGenMode (GM_Generated); + Standard_Boolean aRes = GenerateClass(); + aShift--; + + return aRes; +} + +//======================================================================= +// function : Use +// purpose : +//======================================================================= + +Standard_Boolean Express_Item::Use() +{ + // if Item is not mentioned by the user but is used, then it is necessary to generate + if (GetGenMode() != GM_Undefined) + { + return Standard_False; + } + SetGenMode (GM_GenByAlgo); + + return Generate(); +} + +//======================================================================= +// function : Use2 +// purpose : +//======================================================================= + +void Express_Item::Use2 (const TCollection_AsciiString& theRefName, const TCollection_AsciiString& theRefPack) +{ + if (myLoopFlag) + { + return; + } + else + { + myLoopFlag = Standard_True; + } + // issue a warning message if item does not have package assigned + if (!IsPackageNameSet()) + { + Message::SendWarning() << "Warning: item " << Name() << " has no package assigned but used by " << theRefName << ", setting " << theRefPack; + SetPackageName (theRefPack); + } + + PropagateUse(); +} + +//======================================================================= +// function : SetCategory +// purpose : +//======================================================================= + +void Express_Item::SetCategory (const Handle(TCollection_HAsciiString)& theCateg) +{ + myCategory = theCateg; +} + +//======================================================================= +// function : Cartegory +// purpose : +//======================================================================= + +const TCollection_AsciiString& Express_Item::Category() const +{ + return myCategory->String(); +} + +//======================================================================= +// function : SetShortName +// purpose : +//======================================================================= + +void Express_Item::SetShortName (const Handle(TCollection_HAsciiString)& theShName) +{ + myShortName = theShName; +} + +//======================================================================= +// function : ShortName +// purpose : +//======================================================================= + +Handle(TCollection_HAsciiString) Express_Item::ShortName() const +{ + return myShortName; +} +//======================================================================= +// function : SetCheckFlag +// purpose : +//======================================================================= + +void Express_Item::SetCheckFlag (const Standard_Boolean theCheckFlag) +{ + myhasCheck = theCheckFlag; +} + +//======================================================================= +// function : CheckFlag +// purpose : +//======================================================================= + +Standard_Boolean Express_Item::CheckFlag() const +{ + return myhasCheck; +} + +//======================================================================= +// function : SetFillSharedFlag +// purpose : +//======================================================================= + +void Express_Item::SetFillSharedFlag (const Standard_Boolean theFillSharedFlag) +{ + myhasFillShared = theFillSharedFlag; +} + +//======================================================================= +// function : FillSharedFlag +// purpose : +//======================================================================= + +Standard_Boolean Express_Item::FillSharedFlag() const +{ + return myhasFillShared; +} + +//======================================================================= +// function : SetIndex +// purpose : +//======================================================================= + +void Express_Item::SetIndex (const Standard_Integer theIndex) +{ + myIndex = theIndex; +} + +//======================================================================= +// function : Index +// purpose : +//======================================================================= + +Standard_Integer Express_Item::Index() +{ + return myIndex; +} diff --git a/src/Express/Express_Item.hxx b/src/Express/Express_Item.hxx new file mode 100644 index 0000000000..89015e91f8 --- /dev/null +++ b/src/Express/Express_Item.hxx @@ -0,0 +1,150 @@ +// Copyright (c) 1999-2020 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 _Express_Item_HeaderFile +#define _Express_Item_HeaderFile + +#include +#include +#include +#include +#include + +class TCollection_AsciiString; +class TCollection_HAsciiString; + +//! Base class for items of the schema. Stores a name of the class, +//! package name and flag used to mark items for generation. +//! Provides interface for writing generated class definitions to HXX +//! and CXX files. +class Express_Item : public Standard_Transient +{ + +public: + enum GenMode + { + GM_NoGen, // Item in existed list - no need to generate + GM_GenByUser, // Item in new list - need to generate + GM_GenByAlgo, // Item isn't in any list but is used by needed item + GM_Undefined, // Item isn't in any list + GM_Generated // Item has been generated + }; + + //! Returns item name + Standard_EXPORT const TCollection_AsciiString& Name() const; + + //! Returns a pointer to the item name to modify it + Standard_EXPORT Handle(TCollection_HAsciiString) HName() const; + + //! Returns (generated) name for the item in CXX-style (Package_Class) + Standard_EXPORT virtual const TCollection_AsciiString CPPName() const; + + //! Returns package name + //! If not defined, returns unknown package name: "StepStep" + Standard_EXPORT const TCollection_AsciiString& GetPackageName() const; + + //! Returns whether the package name is set. + Standard_EXPORT Standard_Boolean IsPackageNameSet() const; + + //! Returns unknown package name: "StepStep" + Standard_EXPORT static TCollection_AsciiString& GetUnknownPackageName(); + + //! Sets package name + Standard_EXPORT void SetPackageName (const TCollection_AsciiString& thePack); + + //! Returns item generation mode + Standard_EXPORT GenMode GetGenMode() const; + + //! Change generation mode for item + Standard_EXPORT void SetGenMode (const GenMode theGenMode); + + //! Reset loop flag + Standard_EXPORT void ResetLoopFlag(); + + //! General interface for creating HXX/CXX files from item + Standard_EXPORT virtual Standard_Boolean GenerateClass() const = 0; + + //! Propagates the calls of Use function + Standard_EXPORT virtual void PropagateUse() const = 0; + + //! Checks that item is marked for generation and if yes, + //! generate it by calling GenerateClass. But firstly define + //! PackageName to "StepStep" if not yet defined and drop Mark flag. + Standard_EXPORT Standard_Boolean Generate(); + + //! Declares item as used by other item being generated + //! If Item is not mentioned by the user (as new or existed) but is used, + //! then it sets GenMode to GM_GenByAlgo and Calls Generate(). + Standard_EXPORT Standard_Boolean Use(); + + //! Mark Item as visited in PropagateUse flow and defined the package name if not set. + Standard_EXPORT void Use2 (const TCollection_AsciiString& theRefName, const TCollection_AsciiString& theRefPack); + + //! Set category for item + Standard_EXPORT void SetCategory (const Handle(TCollection_HAsciiString)& theCateg); + + //! Get item category + Standard_EXPORT const TCollection_AsciiString& Category() const; + + //! Set short name for item + Standard_EXPORT void SetShortName (const Handle(TCollection_HAsciiString)& theShName); + + //! Get item short name + Standard_EXPORT Handle(TCollection_HAsciiString) ShortName() const; + + //! Set flag for presence of method Check in the class + Standard_EXPORT void SetCheckFlag (const Standard_Boolean theCheckFlag); + + //! Get flag resposible for presence of method Check in the class + Standard_EXPORT Standard_Boolean CheckFlag() const; + + //! Set flag for presence of method FillShared in the class + Standard_EXPORT void SetFillSharedFlag (const Standard_Boolean theFillSharedFlag); + + //! Get flag resposible for presence of method FillShared in the class + Standard_EXPORT Standard_Boolean FillSharedFlag() const; + + //! Set start entity index + Standard_EXPORT static void SetIndex (const Standard_Integer theIndex); + + //! Get current entity index + Standard_EXPORT static Standard_Integer Index(); + + DEFINE_STANDARD_RTTIEXT(Express_Item, Standard_Transient) + +protected: + + //! Creates object and initializes fields PackageName and + //! CreateFlag by 0 + Standard_EXPORT Express_Item (const Standard_CString theName); + + //! Creates object and initializes fields PackageName and + //! CreateFlag by 0 + Standard_EXPORT Express_Item (const Handle(TCollection_HAsciiString)& theName); + +private: + + Handle(TCollection_HAsciiString) myName; + Handle(TCollection_HAsciiString) myPack; + // "Generate" mark. If is TRUE a class will be generated for the item + GenMode myGenMode; + // Flag to avoid looping + Standard_Boolean myLoopFlag; + Handle(TCollection_HAsciiString) myShortName; + Handle(TCollection_HAsciiString) myCategory; + Standard_Boolean myhasCheck; + Standard_Boolean myhasFillShared; + static Standard_Integer myIndex; +}; + +#endif // _Express_Item_HeaderFile diff --git a/src/Express/Express_List.hxx b/src/Express/Express_List.hxx new file mode 100644 index 0000000000..ec0a961578 --- /dev/null +++ b/src/Express/Express_List.hxx @@ -0,0 +1,21 @@ +// Copyright (c) 1999-2020 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 _Express_List_HeaderFile +#define _Express_List_HeaderFile + +#include + +typedef Express_ComplexType Express_List; + +#endif // _Express_List_HeaderFile diff --git a/src/Express/Express_Logical.cxx b/src/Express/Express_Logical.cxx new file mode 100644 index 0000000000..290efa7ef4 --- /dev/null +++ b/src/Express/Express_Logical.cxx @@ -0,0 +1,70 @@ +// Created: Tue Nov 2 15:27:26 1999 +// Author: Andrey BETENEV +// Copyright (c) 1999-2020 OPEN CASCADE SAS +// +// This file is part of Open CASCADE Technology software library. +// +// This library is free software; you can redistribute it and/or modify it under +// the terms of the GNU Lesser General Public License version 2.1 as published +// by the Free Software Foundation, with special exception defined in the file +// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT +// distribution for complete text of the license and disclaimer of any warranty. +// +// Alternatively, this file may be used under the terms of Open CASCADE +// commercial license or contractual agreement. + +#include + +#include + +IMPLEMENT_STANDARD_RTTIEXT(Express_Logical, Express_PredefinedType) + +//======================================================================= +// function : Express_Logical +// purpose : +//======================================================================= + +Express_Logical::Express_Logical() +{ +} + +//======================================================================= +// function : CPPName +// purpose : +//======================================================================= + +const TCollection_AsciiString Express_Logical::CPPName() const +{ + return "StepData_Logical"; +} + +//======================================================================= +// function : IsStandard +// purpose : +//======================================================================= + +Standard_Boolean Express_Logical::IsStandard() const +{ + return Standard_False; +} + +//======================================================================= +// function : IsSimple +// purpose : +//======================================================================= + +Standard_Boolean Express_Logical::IsSimple() const +{ + return Standard_True; +} + +//======================================================================= +// function : IsHandle +// purpose : +//======================================================================= + +Standard_Boolean Express_Logical::IsHandle() const +{ + return Standard_False; +} + diff --git a/src/Express/Express_Logical.hxx b/src/Express/Express_Logical.hxx new file mode 100644 index 0000000000..581a841311 --- /dev/null +++ b/src/Express/Express_Logical.hxx @@ -0,0 +1,51 @@ +// Copyright (c) 1999-2020 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 _Express_Logical_HeaderFile +#define _Express_Logical_HeaderFile + +#include +#include + +class TCollection_AsciiString; + +//! Implements EXPRESS type 'LOGICAL' +class Express_Logical : public Express_PredefinedType +{ + +public: + + //! Empty constructor + Standard_EXPORT Express_Logical(); + + //! Returns "StepData_Logical" + Standard_EXPORT virtual const TCollection_AsciiString CPPName() const Standard_OVERRIDE; + + //! Return False + Standard_EXPORT virtual Standard_Boolean IsStandard() const Standard_OVERRIDE; + + //! Return False + Standard_EXPORT virtual Standard_Boolean IsSimple() const Standard_OVERRIDE; + + //! Return False + Standard_EXPORT virtual Standard_Boolean IsHandle() const Standard_OVERRIDE; + + DEFINE_STANDARD_RTTIEXT(Express_Logical, Express_PredefinedType) + +protected: + +private: + +}; + +#endif // _Express_Logical_HeaderFile diff --git a/src/Express/Express_NamedType.cxx b/src/Express/Express_NamedType.cxx new file mode 100644 index 0000000000..fc86d5a71e --- /dev/null +++ b/src/Express/Express_NamedType.cxx @@ -0,0 +1,167 @@ +// Created: Tue Nov 2 15:13:31 1999 +// Author: Andrey BETENEV +// Copyright (c) 1999-2020 OPEN CASCADE SAS +// +// This file is part of Open CASCADE Technology software library. +// +// This library is free software; you can redistribute it and/or modify it under +// the terms of the GNU Lesser General Public License version 2.1 as published +// by the Free Software Foundation, with special exception defined in the file +// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT +// distribution for complete text of the license and disclaimer of any warranty. +// +// Alternatively, this file may be used under the terms of Open CASCADE +// commercial license or contractual agreement. + +#include + +#include +#include +#include +#include +#include + +IMPLEMENT_STANDARD_RTTIEXT(Express_NamedType, Express_Type) + +//======================================================================= +// function : Express_NamedType +// purpose : +//======================================================================= + +Express_NamedType::Express_NamedType (const Standard_CString theName) +{ + myName = new TCollection_HAsciiString (theName); +} + +//======================================================================= +// function : Express_NamedType +// purpose : +//======================================================================= + +Express_NamedType::Express_NamedType (const Handle(TCollection_HAsciiString)& theName) +{ + myName = theName; +} + +//======================================================================= +// function : Name +// purpose : +//======================================================================= + +const TCollection_AsciiString& Express_NamedType::Name() const +{ + return myName->String(); +} + +//======================================================================= +// function : HName +// purpose : +//======================================================================= + +Handle(TCollection_HAsciiString) Express_NamedType::HName() const +{ + return myName; +} + +//======================================================================= +// function : Item +// purpose : +//======================================================================= + +const Handle(Express_Item)& Express_NamedType::Item() const +{ + return myItem; +} + +//======================================================================= +// function : SetItem +// purpose : +//======================================================================= + +void Express_NamedType::SetItem (const Handle(Express_Item)& theItem) +{ + myItem = theItem; +} + +//======================================================================= +// function : CPPName +// purpose : +//======================================================================= + +const TCollection_AsciiString Express_NamedType::CPPName() const +{ + return myItem->CPPName(); +} + +//======================================================================= +// function : IsStandard +// purpose : +//======================================================================= + +Standard_Boolean Express_NamedType::IsStandard() const +{ + if (myItem->IsKind (STANDARD_TYPE(Express_Alias))) + { + Handle(Express_Alias) anAlias = Handle(Express_Alias)::DownCast (myItem); + return anAlias->Type()->IsStandard(); + } + return Standard_False; +} + +//======================================================================= +// function : IsSimple +// purpose : +//======================================================================= + +Standard_Boolean Express_NamedType::IsSimple() const +{ + if (myItem->IsKind (STANDARD_TYPE(Express_Alias))) + { + Handle(Express_Alias) anAlias = Handle(Express_Alias)::DownCast (myItem); + return anAlias->Type()->IsSimple(); + } + if (myItem->IsKind (STANDARD_TYPE(Express_Enum))) + { + return Standard_True; + } + return Standard_False; // SELECT & ENTITY +} + +//======================================================================= +// function : IsHandle +// purpose : +//======================================================================= + +Standard_Boolean Express_NamedType::IsHandle() const +{ + if (myItem->IsKind (STANDARD_TYPE(Express_Alias))) + { + Handle(Express_Alias) alias = Handle(Express_Alias)::DownCast (myItem); + return alias->Type()->IsHandle(); + } + if (myItem->IsKind (STANDARD_TYPE(Express_Entity))) + { + return Standard_True; + } + return Standard_False; // SELECT & ENUMERATION +} + +//======================================================================= +// function : Use +// purpose : +//======================================================================= + +Standard_Boolean Express_NamedType::Use() const +{ + return myItem->Use(); +} + +//======================================================================= +// function : Use2 +// purpose : +//======================================================================= + +void Express_NamedType::Use2 (const TCollection_AsciiString& theRefName, const TCollection_AsciiString& theRefPack) const +{ + myItem->Use2 (theRefName, theRefPack); +} diff --git a/src/Express/Express_NamedType.hxx b/src/Express/Express_NamedType.hxx new file mode 100644 index 0000000000..cd5431e0a8 --- /dev/null +++ b/src/Express/Express_NamedType.hxx @@ -0,0 +1,81 @@ +// Copyright (c) 1999-2020 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 _Express_NamedType_HeaderFile +#define _Express_NamedType_HeaderFile + +#include +#include + +class Express_Item; +class TCollection_AsciiString; +class TCollection_HAsciiString; + +//! Base class for complex types (ARRAY, LIST, BAG, SET) +//! in EXPRESS schema +//! Stores type of elements and +class Express_NamedType : public Express_Type +{ + +public: + + //! Creates an object and initializes by name + Standard_EXPORT Express_NamedType (const Standard_CString theName); + + //! Creates an object and initializes by name + Standard_EXPORT Express_NamedType (const Handle(TCollection_HAsciiString)& theName); + + //! Returns name of type (item in schema) + Standard_EXPORT const TCollection_AsciiString& Name() const; + + //! Returns a pointer to the type name to modify it + Standard_EXPORT Handle(TCollection_HAsciiString) HName() const; + + //! Returns handle to referred item in schema + Standard_EXPORT const Handle(Express_Item)& Item() const; + + //! Sets handle to referred item in schema + Standard_EXPORT void SetItem (const Handle(Express_Item)& theItem); + + //! Returns CPP-style name of the type + Standard_EXPORT virtual const TCollection_AsciiString CPPName() const Standard_OVERRIDE; + + //! Return True if type is defined in package Standard + Standard_EXPORT virtual Standard_Boolean IsStandard() const Standard_OVERRIDE; + + //! Return True if type is simple (not a class) + Standard_EXPORT virtual Standard_Boolean IsSimple() const Standard_OVERRIDE; + + //! Return True if type is inherited from Transient + Standard_EXPORT virtual Standard_Boolean IsHandle() const Standard_OVERRIDE; + + //! Declares type as used by some item being generated. + //! Calls Use() for referred item (found by name). + Standard_EXPORT virtual Standard_Boolean Use() const Standard_OVERRIDE; + + //! Declares type as used by some item being generated. + //! Calls Use() for referred item (found by name). + Standard_EXPORT virtual void Use2 (const TCollection_AsciiString& theRefName, const TCollection_AsciiString& theRefPack) const Standard_OVERRIDE; + + DEFINE_STANDARD_RTTIEXT(Express_NamedType, Express_Type) + +protected: + +private: + + Handle(TCollection_HAsciiString) myName; + Handle(Express_Item) myItem; + +}; + +#endif // _Express_NamedType_HeaderFile diff --git a/src/Express/Express_Number.hxx b/src/Express/Express_Number.hxx new file mode 100644 index 0000000000..7094c0ed2b --- /dev/null +++ b/src/Express/Express_Number.hxx @@ -0,0 +1,21 @@ +// Copyright (c) 1999-2020 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 _Express_Number_HeaderFile +#define _Express_Number_HeaderFile + +#include + +typedef Express_Integer Express_Number; + +#endif // _Express_Number_HeaderFile diff --git a/src/Express/Express_PredefinedType.cxx b/src/Express/Express_PredefinedType.cxx new file mode 100644 index 0000000000..08f16fd557 --- /dev/null +++ b/src/Express/Express_PredefinedType.cxx @@ -0,0 +1,38 @@ +// Created: Tue Nov 2 15:13:31 1999 +// Author: Andrey BETENEV +// Copyright (c) 1999-2020 OPEN CASCADE SAS +// +// This file is part of Open CASCADE Technology software library. +// +// This library is free software; you can redistribute it and/or modify it under +// the terms of the GNU Lesser General Public License version 2.1 as published +// by the Free Software Foundation, with special exception defined in the file +// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT +// distribution for complete text of the license and disclaimer of any warranty. +// +// Alternatively, this file may be used under the terms of Open CASCADE +// commercial license or contractual agreement. + +#include + +IMPLEMENT_STANDARD_RTTIEXT(Express_PredefinedType, Express_Type) + +//======================================================================= +// function : Express_PredefinedType +// purpose : +//======================================================================= + +Express_PredefinedType::Express_PredefinedType() +{ +} + +//======================================================================= +// function : IsStandard +// purpose : +//======================================================================= + +Standard_Boolean Express_PredefinedType::IsStandard() const +{ + return Standard_True; +} + diff --git a/src/Express/Express_PredefinedType.hxx b/src/Express/Express_PredefinedType.hxx new file mode 100644 index 0000000000..75e0cd7ddd --- /dev/null +++ b/src/Express/Express_PredefinedType.hxx @@ -0,0 +1,41 @@ +// Copyright (c) 1999-2020 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 _Express_PredefinedType_HeaderFile +#define _Express_PredefinedType_HeaderFile + +#include +#include + +//! Base class for predefined types (like NUMBER or STRING) +//! in EXPRESS schema +class Express_PredefinedType : public Express_Type +{ + +public: + + //! Returns True + Standard_EXPORT virtual Standard_Boolean IsStandard() const Standard_OVERRIDE; + + DEFINE_STANDARD_RTTIEXT(Express_PredefinedType, Express_Type) + +protected: + + //! Empty constructor + Standard_EXPORT Express_PredefinedType(); + +private: + +}; + +#endif // _Express_PredefinedType_HeaderFile diff --git a/src/Express/Express_Real.cxx b/src/Express/Express_Real.cxx new file mode 100644 index 0000000000..5211519385 --- /dev/null +++ b/src/Express/Express_Real.cxx @@ -0,0 +1,39 @@ +// Created: Tue Nov 2 15:27:26 1999 +// Author: Andrey BETENEV +// Copyright (c) 1999-2020 OPEN CASCADE SAS +// +// This file is part of Open CASCADE Technology software library. +// +// This library is free software; you can redistribute it and/or modify it under +// the terms of the GNU Lesser General Public License version 2.1 as published +// by the Free Software Foundation, with special exception defined in the file +// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT +// distribution for complete text of the license and disclaimer of any warranty. +// +// Alternatively, this file may be used under the terms of Open CASCADE +// commercial license or contractual agreement. + +#include + +#include + +IMPLEMENT_STANDARD_RTTIEXT(Express_Real,Express_PredefinedType) + +//======================================================================= +// function : Express_Real +// purpose : +//======================================================================= + +Express_Real::Express_Real() +{ +} + +//======================================================================= +// function : CPPName +// purpose : +//======================================================================= + +const TCollection_AsciiString Express_Real::CPPName() const +{ + return "Standard_Real"; +} diff --git a/src/Express/Express_Real.hxx b/src/Express/Express_Real.hxx new file mode 100644 index 0000000000..05d5dd5630 --- /dev/null +++ b/src/Express/Express_Real.hxx @@ -0,0 +1,42 @@ +// Copyright (c) 1999-2020 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 _Express_Real_HeaderFile +#define _Express_Real_HeaderFile + +#include +#include + +class TCollection_AsciiString; + +//! Implements EXPRESS type 'REAL' +class Express_Real : public Express_PredefinedType +{ + +public: + + //! Empty constructor + Standard_EXPORT Express_Real(); + + //! Returns "Standard_Real" + Standard_EXPORT virtual const TCollection_AsciiString CPPName() const Standard_OVERRIDE; + + DEFINE_STANDARD_RTTIEXT(Express_Real, Express_PredefinedType) + +protected: + +private: + +}; + +#endif // _Express_Real_HeaderFile diff --git a/src/Express/Express_Reference.cxx b/src/Express/Express_Reference.cxx new file mode 100644 index 0000000000..9620cd8c0f --- /dev/null +++ b/src/Express/Express_Reference.cxx @@ -0,0 +1,49 @@ +// Created: Fri Nov 22 13:32:26 2002 +// Author: Andrey BETENEV +// Copyright (c) 1999-2020 OPEN CASCADE SAS +// +// This file is part of Open CASCADE Technology software library. +// +// This library is free software; you can redistribute it and/or modify it under +// the terms of the GNU Lesser General Public License version 2.1 as published +// by the Free Software Foundation, with special exception defined in the file +// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT +// distribution for complete text of the license and disclaimer of any warranty. +// +// Alternatively, this file may be used under the terms of Open CASCADE +// commercial license or contractual agreement. + +#include + +IMPLEMENT_STANDARD_RTTIEXT(Express_Reference, Express_Item) + +//======================================================================= +// function : Express_Reference +// purpose : +//======================================================================= + +Express_Reference::Express_Reference (const Standard_CString theName, + const Handle(TColStd_HSequenceOfHAsciiString)& theTypes) +: Express_Item (theName) +{ + myTypes = theTypes; +} + +//======================================================================= +// function : GenerateClass +// purpose : dummy method +//======================================================================= + +Standard_Boolean Express_Reference::GenerateClass() const +{ + return Standard_False; +} + +//======================================================================= +// function : PropagateUse +// purpose : dummy method +//======================================================================= + +void Express_Reference::PropagateUse() const +{ +} diff --git a/src/Express/Express_Reference.hxx b/src/Express/Express_Reference.hxx new file mode 100644 index 0000000000..216c19c989 --- /dev/null +++ b/src/Express/Express_Reference.hxx @@ -0,0 +1,65 @@ +// Copyright (c) 1999-2020 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 _Express_Reference_HeaderFile +#define _Express_Reference_HeaderFile + +#include +#include +#include + +class Express_HSequenceOfItem; + +//! Implements REFERENCE FROM (list of types used from other schema) +//! item of the EXPRESS schema, with interface for Item class. +class Express_Reference : public Express_Item +{ + +public: + + //! Create Reference item and initialize it + Standard_EXPORT Express_Reference (const Standard_CString theName, + const Handle(TColStd_HSequenceOfHAsciiString)& theTypes); + + //! Returns list of types referenced + const Handle(TColStd_HSequenceOfHAsciiString)& Types() const + { + return myTypes; + } + + //! Returns handle to sequence of items corresponding to + //! listed types + const Handle(Express_HSequenceOfItem)& Items() const + { + return myItems; + } + + //! Redefined to empty (in order to be able to instantiate) + //! Return False + Standard_EXPORT virtual Standard_Boolean GenerateClass() const Standard_OVERRIDE; + + //! Propagates the calls of Use function + Standard_EXPORT virtual void PropagateUse() const Standard_OVERRIDE; + + DEFINE_STANDARD_RTTIEXT(Express_Reference, Express_Item) + +protected: + +private: + + Handle(TColStd_HSequenceOfHAsciiString) myTypes; + Handle(Express_HSequenceOfItem) myItems; + +}; + +#endif // _Express_Reference_HeaderFile diff --git a/src/Express/Express_Schema.cxx b/src/Express/Express_Schema.cxx new file mode 100644 index 0000000000..ae08c4e2a0 --- /dev/null +++ b/src/Express/Express_Schema.cxx @@ -0,0 +1,330 @@ +// Created: Tue Nov 2 12:29:06 1999 +// Author: Andrey BETENEV +// Copyright (c) 1999-2020 OPEN CASCADE SAS +// +// This file is part of Open CASCADE Technology software library. +// +// This library is free software; you can redistribute it and/or modify it under +// the terms of the GNU Lesser General Public License version 2.1 as published +// by the Free Software Foundation, with special exception defined in the file +// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT +// distribution for complete text of the license and disclaimer of any warranty. +// +// Alternatively, this file may be used under the terms of Open CASCADE +// commercial license or contractual agreement. + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +IMPLEMENT_STANDARD_RTTIEXT(Express_Schema, Standard_Transient) + +//======================================================================= +// function : Express_Schema +// purpose : +//======================================================================= + +Express_Schema::Express_Schema (const Standard_CString theName, + const Handle(Express_HSequenceOfItem)& theItems) +{ + myName = new TCollection_HAsciiString (theName); + myItems = theItems; + Prepare(); +} + +//======================================================================= +// function : Express_Schema +// purpose : +//======================================================================= + +Express_Schema::Express_Schema (const Handle(TCollection_HAsciiString)& theName, + const Handle(Express_HSequenceOfItem)& theItems) +{ + myName = theName; + myItems = theItems; + Prepare(); +} + +//======================================================================= +// function : Name +// purpose : +//======================================================================= + +const Handle(TCollection_HAsciiString)& Express_Schema::Name() const +{ + return myName; +} + +//======================================================================= +// function : Items +// purpose : +//======================================================================= + +const Handle(Express_HSequenceOfItem)& Express_Schema::Items() const +{ + return myItems; +} + +//======================================================================= +// function : NbItems +// purpose : +//======================================================================= + +Standard_Integer Express_Schema::NbItems() const +{ + return myItems->Length(); +} + +//======================================================================= +// function : Item +// purpose : +//======================================================================= + +Handle(Express_Item) Express_Schema::Item (const Standard_Integer theNum) const +{ + return myItems->Value (theNum); +} + +//======================================================================= +// function : Item +// purpose : +//======================================================================= + +Handle(Express_Item) Express_Schema::Item (const Standard_CString theName, + const Standard_Boolean theSilent) const +{ + if (!myDict.IsBound (theName)) + { + if (!theSilent) + { + Message::SendFail() << "Error: attempt to access unknown item by name " << theName; + } + return {}; + } + return myDict.Find (theName); +} + +//======================================================================= +// function : Item +// purpose : +//======================================================================= + +Handle(Express_Item) Express_Schema::Item (const TCollection_AsciiString& theName) const +{ + return Item (theName.ToCString()); +} + +//======================================================================= +// function : Item +// purpose : +//======================================================================= + +Handle(Express_Item) Express_Schema::Item (const Handle(TCollection_HAsciiString)& theName) const +{ + return Item (theName->ToCString()); +} + +//======================================================================= +// function : nameToCasCade +// purpose : auxilary for Prepare() +// Convert STEP-style name (lowercase, with underscores) +// to CASCADE-style name (each word starts with uppercase, no intervals) +//======================================================================= +static void nameToCasCade (const Handle(TCollection_HAsciiString)& theName) +{ + if (theName.IsNull()) + { + return; + } + for (Standard_Integer i = 1; i <= theName->Length(); i++) + { + if (theName->Value (i) == '_') + { + theName->Remove (i); + } + else if (i > 1) + { + continue; + } + theName->SetValue (i, UpperCase (theName->Value (i))); + } +} + +//======================================================================= +// function : nameToCasCade +// purpose : auxilary for Prepare() +// Convert names for Type object +//======================================================================= +static void nameToCasCade (const Handle(Express_Type)& theType) +{ + if (theType->IsKind (STANDARD_TYPE(Express_NamedType))) + { + const Handle(Express_NamedType) aNamedType = Handle(Express_NamedType)::DownCast (theType); + nameToCasCade (aNamedType->HName()); + } + else if (theType->IsKind (STANDARD_TYPE(Express_ComplexType))) + { + const Handle(Express_ComplexType) aComplexType = Handle(Express_ComplexType)::DownCast (theType); + nameToCasCade (aComplexType->Type()); + } +} + +//======================================================================= +// function : Prepare +// purpose : Prepare data: convert names to CasCade, fill dictionary of typenames +// and set handles to items where they are referenced by names +//======================================================================= + +void Express_Schema::Prepare() +{ + myDict.Clear(); + if (myItems.IsNull()) + { + return; + } + + Standard_Integer aNbItems = NbItems(); + + // convert names and fill dictionary + for (Standard_Integer aNum = 1; aNum <= aNbItems; aNum++) + { + // get item + const Handle(Express_Item) anItem = Item (aNum); + + // change item name + nameToCasCade (anItem->HName()); + + // change names of referred types and other names + if (anItem->IsKind (STANDARD_TYPE(Express_Alias))) + { + const Handle(Express_Alias) anAlias = Handle(Express_Alias)::DownCast (anItem); + nameToCasCade (anAlias->Type()); + } + else if (anItem->IsKind (STANDARD_TYPE(Express_Select))) + { + const Handle(Express_Select) aSelect = Handle(Express_Select)::DownCast (anItem); + for (Standard_Integer i = 1; i <= aSelect->Names()->Length(); i++) + { + nameToCasCade (aSelect->Names()->Value (i)); + } + } + else if (anItem->IsKind (STANDARD_TYPE(Express_Enum))) + { + const Handle(Express_Enum) anEnum = Handle(Express_Enum)::DownCast (anItem); + for (Standard_Integer i = 1; i <= anEnum->Names()->Length(); i++) + { + nameToCasCade (anEnum->Names()->Value (i)); + } + } + else if (anItem->IsKind (STANDARD_TYPE(Express_Entity))) + { + const Handle(Express_Entity) anEntity = Handle(Express_Entity)::DownCast (anItem); + for (Standard_Integer i = 1; i <= anEntity->SuperTypes()->Length(); i++) + { + nameToCasCade (anEntity->SuperTypes()->Value (i)); + } + const Handle(Express_HSequenceOfField) aFields = anEntity->Fields(); + for (Standard_Integer i = 1; i <= aFields->Length(); i++) + { + nameToCasCade (aFields->Value (i)->HName()); + nameToCasCade (aFields->Value (i)->Type()); + } + } + + // add to dictionary + myDict.Bind (anItem->Name(), anItem); + } + + // set references to items from other items and types + for (Standard_Integer aNum = 1; aNum <= aNbItems; aNum++) + { + const Handle(Express_Item) anItem = Item (aNum); + + if (anItem->IsKind (STANDARD_TYPE(Express_Alias))) + { + const Handle(Express_Alias) anAlias = Handle(Express_Alias)::DownCast (anItem); + PrepareType (anAlias->Type()); + // for aliases, define package to avoid warnings + anAlias->SetPackageName ("Standard"); + continue; + } + else if (anItem->IsKind (STANDARD_TYPE(Express_Select))) + { + const Handle(Express_Select) aSelect = Handle(Express_Select)::DownCast (anItem); + Handle(TColStd_HSequenceOfHAsciiString) aNames = aSelect->Names(); + Handle(Express_HSequenceOfItem) anItems = aSelect->Items(); + for (Standard_Integer i = 1; i <= aNames->Length(); i++) + { + Handle(Express_Item) aSubItem = Item (aNames->Value (i)); + // if select refers to another select, expand it + if (aSubItem->IsKind (STANDARD_TYPE(Express_Select))) + { + Message::SendInfo() << "Info: SELECT " << anItem->Name() << " refers to another SELECT " << aSubItem->Name() << "; expanded"; + const Handle(Express_Select) aSubSelect = Handle(Express_Select)::DownCast (aSubItem); + Standard_Integer j = 1; + for (; j <= aSubSelect->Names()->Length(); j++) + { + aNames->InsertBefore (i + j - 1, aSubSelect->Names()->Value (j)); + } + aNames->Remove (i + j - 1); + i--; + continue; + } + anItems->Append (aSubItem); + } + } + else if (anItem->IsKind (STANDARD_TYPE(Express_Entity))) + { + const Handle(Express_Entity) anEntity = Handle(Express_Entity)::DownCast (anItem); + Handle(TColStd_HSequenceOfHAsciiString) aNames = anEntity->SuperTypes(); + Handle(Express_HSequenceOfEntity) anInhItems = anEntity->Inherit(); + for (Standard_Integer i = 1; i <= aNames->Length(); i++) + { + Handle(Express_Entity) aSubEntity = Handle(Express_Entity)::DownCast (Item (aNames->Value (i))); + if (!aSubEntity.IsNull()) + { + anInhItems->Append (aSubEntity); + } + else + { + Message::SendFail() << "Error in " << anItem->Name() << ": supertype " << aNames->Value (i)->String() << " is not an ENTITY; ignored"; + } + } + const Handle(Express_HSequenceOfField) aFields = anEntity->Fields(); + for (Standard_Integer i = 1; i <= aFields->Length(); i++) + { + PrepareType (aFields->Value (i)->Type()); + } + } + } + +} + +//======================================================================= +// function : PrepareType +// purpose : +//======================================================================= + +void Express_Schema::PrepareType (const Handle(Express_Type)& theType) const +{ + if (theType->IsKind (STANDARD_TYPE(Express_NamedType))) + { + Handle(Express_NamedType) aNamedType = Handle(Express_NamedType)::DownCast (theType); + aNamedType->SetItem (Item (aNamedType->Name())); + } + else if (theType->IsKind (STANDARD_TYPE(Express_ComplexType))) + { + Handle(Express_ComplexType) aComplexType = Handle(Express_ComplexType)::DownCast (theType); + PrepareType (aComplexType->Type()); + } +} diff --git a/src/Express/Express_Schema.hxx b/src/Express/Express_Schema.hxx new file mode 100644 index 0000000000..2f53b83db3 --- /dev/null +++ b/src/Express/Express_Schema.hxx @@ -0,0 +1,92 @@ +// Copyright (c) 1999-2020 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 _Express_Schema_HeaderFile +#define _Express_Schema_HeaderFile + +#include +#include +#include + +class TCollection_HAsciiString; +class Express_HSequenceOfItem; +class Express_Item; +class TCollection_AsciiString; +class Express_Type; + +//! Represents a schema as a list of items and provides general +//! tools for generating HXX/CXX files (including dictionary of +//! item names) +class Express_Schema : public Standard_Transient +{ + +public: + + //! Creates a schema with given name and given set of items + //! and calls Prepare() + Standard_EXPORT Express_Schema (const Standard_CString theName, + const Handle(Express_HSequenceOfItem)& theItems); + + //! Creates a schema with given name and given set of items + //! and calls Prepare() + Standard_EXPORT Express_Schema (const Handle(TCollection_HAsciiString)& theName, + const Handle(Express_HSequenceOfItem)& theItems); + + //! Returns schema name + Standard_EXPORT const Handle(TCollection_HAsciiString)& Name() const; + + //! Returns sequence of items + Standard_EXPORT const Handle(Express_HSequenceOfItem)& Items() const; + + //! Returns number of items + Standard_EXPORT Standard_Integer NbItems() const; + + //! Returns item by index + Standard_EXPORT Handle(Express_Item) Item (const Standard_Integer theNum) const; + + //! Returns item by name + Standard_EXPORT Handle(Express_Item) Item (const Standard_CString theName, + const Standard_Boolean theSilent = Standard_False) const; + + //! Returns item by name + Standard_EXPORT Handle(Express_Item) Item (const TCollection_AsciiString& theName) const; + + //! Returns item by name + Standard_EXPORT Handle(Express_Item) Item (const Handle(TCollection_HAsciiString)& theName) const; + + DEFINE_STANDARD_RTTIEXT(Express_Schema, Standard_Transient) + +protected: + +private: + + //! Prepares data for further work. Converts all item names + //! from EXPRESS style (aaa_bb) to CASCADE style (AaaBb). + //! Then, makes a dictionary of item names and sets handles + //! to all items referred initially by name + Standard_EXPORT void Prepare(); + + //! Prepares type for work by setting its handle to item in the + //! schema according to dictionary (for types which refer items + //! by name) + Standard_EXPORT void PrepareType (const Handle(Express_Type)& theType) const; + +private: + + Handle(TCollection_HAsciiString) myName; + Handle(Express_HSequenceOfItem) myItems; + Express_DataMapOfAsciiStringItem myDict; + +}; + +#endif // _Express_Schema_HeaderFile diff --git a/src/Express/Express_Select.cxx b/src/Express/Express_Select.cxx new file mode 100644 index 0000000000..bcfa50e761 --- /dev/null +++ b/src/Express/Express_Select.cxx @@ -0,0 +1,650 @@ +// Created: Tue Nov 2 14:40:06 1999 +// Author: Andrey BETENEV +// Copyright (c) 1999-2020 OPEN CASCADE SAS +// +// This file is part of Open CASCADE Technology software library. +// +// This library is free software; you can redistribute it and/or modify it under +// the terms of the GNU Lesser General Public License version 2.1 as published +// by the Free Software Foundation, with special exception defined in the file +// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT +// distribution for complete text of the license and disclaimer of any warranty. +// +// Alternatively, this file may be used under the terms of Open CASCADE +// commercial license or contractual agreement. + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +IMPLEMENT_STANDARD_RTTIEXT(Express_Select, Express_Item) + +//======================================================================= +// function : Express_Select +// purpose : +//======================================================================= + +Express_Select::Express_Select ( const Standard_CString theName, + const Handle(TColStd_HSequenceOfHAsciiString)& theNames) +: Express_Item (theName), myNames (theNames) +{ + myItems = new Express_HSequenceOfItem; +} + +//======================================================================= +// function : Names +// purpose : +//======================================================================= + +const Handle(TColStd_HSequenceOfHAsciiString)& Express_Select::Names() const +{ + return myNames; +} + +//======================================================================= +// function : Items +// purpose : +//======================================================================= + +const Handle(Express_HSequenceOfItem)& Express_Select::Items() const +{ + return myItems; +} + +//======================================================================= +// function : GenerateClass +// purpose : +//======================================================================= + +Standard_Boolean Express_Select::GenerateClass() const +{ + const TCollection_AsciiString aCPPName = CPPName(); + + Handle(TColStd_HSequenceOfInteger) aSeqMember = new TColStd_HSequenceOfInteger; + Handle(TColStd_HSequenceOfInteger) aSeqEntities = new TColStd_HSequenceOfInteger; + for (Standard_Integer i = 1; i <= myItems->Length(); i++) + { + Handle(Express_Item) anItem = myItems->Value (i); + if (anItem->IsKind (STANDARD_TYPE(Express_Entity)) || anItem->IsKind (STANDARD_TYPE(Express_Select)) + || anItem->IsKind (STANDARD_TYPE(Express_Alias)) || anItem->IsKind (STANDARD_TYPE(Express_ComplexType))) + { + aSeqEntities->Append (i); + } + else + { + aSeqMember->Append (i); + } + } + Message::SendInfo() << "Generating SELECT " << aCPPName; + if (!aSeqMember->IsEmpty()) + { + Message::SendInfo() << "Generating SELECTMember " << aCPPName << "Member"; + generateSelectMember (aSeqMember); + } + // create a package directory (if not yet exist) + OSD_Protection aProt (OSD_RWXD, OSD_RWXD, OSD_RX, OSD_RX); + TCollection_AsciiString aPack = GetPackageName(); + OSD_Path aPath (aPack); + OSD_Directory aDir (aPath); + aDir.Build (aProt); + aPack += "/"; + aPack += aCPPName; + const Handle(OSD_FileSystem)& aFileSystem = OSD_FileSystem::DefaultFileSystem(); + + //=============================== + // Step 1: generating HXX + { + // Open HXX file + std::shared_ptr aStreamPtr = aFileSystem->OpenOStream (aPack.Cat (".hxx"), std::ios::out | std::ios::binary); + Standard_OStream& anOS = *aStreamPtr; + + // write header + Express::WriteFileStamp (anOS); + + // write start define + anOS << "#ifndef _" << aCPPName << "_HeaderFile\n" + "#define _" << aCPPName << "_HeaderFile\n" + "\n"; + + // write common includes + anOS << "#include \n" + "#include \n" + "#include \n" + "#include \n" + "#include \n" + "\n"; + + anOS << "class Standard_Transient;\n"; + if (!aSeqMember->IsEmpty()) + anOS << "class StepData_SelectMember;\n"; + + Standard_Integer jj = 1; + for (Standard_Integer i = 1; i <= myItems->Length(); i++) + { + Handle(Express_Item) anItem = myItems->Value (i); + anItem->Use(); + if (anItem->IsKind (STANDARD_TYPE(Express_Alias))) + { + Handle(Express_Type) aType = Handle(Express_Alias)::DownCast (anItem)->Type(); + if (aType->IsStandard()) + { + continue; + } + } + anOS << "class " << anItem->CPPName() << ";\n"; + jj++; + } + anOS << "\n"; + + // class declaration + anOS << "//! Representation of STEP SELECT type " << Name() << "\n" + "class " << aCPPName << " : public StepData_SelectType\n" + "{\n" + "\n" + "public:\n" + "\n" + " DEFINE_STANDARD_ALLOC\n" + "\n"; + + // default constructor + anOS << " //! Empty constructor\n" + " Standard_EXPORT " << aCPPName << "();\n" + "\n"; + + // write common methods section + anOS << " //! Recognizes a kind of " << Name() << " select type\n"; + for (Standard_Integer i = 1; i <= aSeqEntities->Length(); i++) + { + Standard_Integer anIdx = aSeqEntities->Value (i); + anOS << " //! -- " << i << " -> " << myNames->Value (anIdx)->String() << "\n"; + } + anOS << " Standard_EXPORT Standard_Integer CaseNum (const Handle(Standard_Transient)& theEnt) const Standard_OVERRIDE;\n" + "\n"; + + if (!aSeqMember->IsEmpty()) + { + anOS << " //! Recognizes items of select member " << Name() << "Member\n"; + for (Standard_Integer i = 1; i <= aSeqMember->Length(); i++) + { + Standard_Integer anIdx = aSeqMember->Value (i); + anOS << " //! -- " << i << " -> " << myNames->Value (anIdx)->String() << "\n"; + } + anOS << " //! -- 0 else\n" + " Standard_EXPORT virtual Standard_Integer CaseMem (const Handle(StepData_SelectMember)& theEnt) const Standard_OVERRIDE;\n" + "\n" + " //! Returns a new select member the type " << Name() << "Member\n" + " Standard_EXPORT virtual Handle(StepData_SelectMember) NewMember() const Standard_OVERRIDE;\n" + "\n"; + } + + // write methods get for entities + for (Standard_Integer i = 1; i <= aSeqEntities->Length(); i++) + { + Standard_Integer anIdx = aSeqEntities->Value (i); + Handle(Express_Item) anItem = myItems->Value (anIdx); + const TCollection_AsciiString& aName = anItem->Name(); + anOS << " //! Returns Value as " << aName << " (or Null if another type)\n" + " Standard_EXPORT Handle(" << anItem->CPPName() << ") " << aName << "() const;\n" + "\n"; + } + + // writes method set and get for enum , integer, real and string. + for (Standard_Integer i = 1; i <= aSeqMember->Length(); i++) + { + Standard_Integer anIdx = aSeqMember->Value (i); + Handle(Express_Item) anItem = myItems->Value (anIdx); + const TCollection_AsciiString& aName = anItem->Name(); + const TCollection_AsciiString& anItemCPPName = anItem->CPPName(); + anOS << " //! Set Value for " << aName << "\n" + " Standard_EXPORT void Set" << aName << " (const " << anItemCPPName << " theVal);\n" + "\n" + " //! Returns Value as " << aName << " (or Null if another type)\n" + " " << anItemCPPName << " " << aName << "() const;\n" + "\n"; + } + + // write end + anOS << "};\n" + "#endif // _" << aCPPName << "_HeaderFile\n"; + aStreamPtr.reset(); + } + //=============================== + // Step 2: generating CXX + { + // Open CXX file + std::shared_ptr aStreamPtr = aFileSystem->OpenOStream (aPack.Cat (".cxx"), std::ios::out | std::ios::binary); + Standard_OStream& anOS = *aStreamPtr; + + // write header + Express::WriteFileStamp (anOS); + + // write include section + anOS << "#include <" << aCPPName << ".hxx>\n"; + if (!aSeqMember->IsEmpty()) + { + anOS << "#include <" << aCPPName << "Member.hxx>\n" + "#include \n"; + } + for (Standard_Integer i = 1; i <= aSeqEntities->Length(); i++) + { + Standard_Integer anIdx = aSeqEntities->Value (i); + anOS << "#include <" << myItems->Value (anIdx)->CPPName() << ".hxx>\n"; + } + + // write constructor + Express::WriteMethodStamp (anOS, aCPPName); + anOS << aCPPName << "::" << aCPPName << "()\n" + "{\n" + "}\n"; + + // write CaseNum method + Express::WriteMethodStamp (anOS, "CaseNum"); + anOS << "Standard_Integer " << aCPPName << "::CaseNum (const Handle(Standard_Transient)& theEnt) const\n" + "{\n"; + + if (!aSeqEntities->IsEmpty()) + { + anOS << " if (theEnt.IsNull()) return 0;\n"; + for (Standard_Integer i = 1; i <= aSeqEntities->Length(); i++) + { + Standard_Integer anIdx = aSeqEntities->Value (i); + anOS << " if (theEnt->IsKind (STANDARD_TYPE(" << myItems->Value (anIdx)->CPPName() << "))) return " << i << ";\n"; + } + anOS << " return 0;\n" + "}\n"; + } + else + { + anOS << " return 0;\n" + "}\n"; + } + + if (!aSeqMember->IsEmpty()) + { + // write CaseMem method + Express::WriteMethodStamp (anOS, "CaseMem"); + anOS << "Standard_Integer " << aCPPName << "::CaseMem (const Handle(StepData_SelectMember)& theEnt) const\n" + "{\n" + " if (theEnt.IsNull()) return 0;\n"; + for (int j = 1; j <= aSeqMember->Length(); j++) + { + Standard_Integer anIdx = aSeqMember->Value (j); + if (j == 1) + { + anOS << " if (theEnt->Matches (\"" << myNames->Value (anIdx)->String() << "\")) return " << j << ";\n"; + } + else + { + anOS << " else if (theEnt->Matches (\"" << myNames->Value (anIdx)->String() << "\")) return " << j << ";\n"; + } + } + anOS << " else return 0;\n" + "}\n"; + + // write NewMember method + Express::WriteMethodStamp (anOS, "NewMember"); + anOS << "Handle(StepData_SelectMember) " << aCPPName << "::NewMember() const\n" + "{\n" + " return new " << aCPPName << "Member;\n" + "}\n"; + } + + // write methods Get for entities. + for (Standard_Integer i = 1; i <= aSeqEntities->Length(); i++) + { + Standard_Integer anIdx = aSeqEntities->Value (i); + Handle(Express_Item) anItem = myItems->Value (anIdx); + const TCollection_AsciiString& aName = anItem->Name(); + const TCollection_AsciiString& anItemCPPName = anItem->CPPName(); + Express::WriteMethodStamp (anOS, aName); + anOS << "Handle(" << anItemCPPName << ") " << aCPPName << "::" << aName << "() const\n" + "{\n" + " return Handle(" << anItemCPPName << ")::DownCast(Value());\n" + "}\n"; + } + + // write methods Set and Get for Integer, Real, String and Enum + for (Standard_Integer i = 1; i <= aSeqMember->Length(); i++) + { + Standard_Integer anIdx = aSeqMember->Value (i); + Handle(Express_Item) anItem = myItems->Value (anIdx); + const TCollection_AsciiString& aName = anItem->Name(); + const TCollection_AsciiString& anItemCPPName = anItem->CPPName(); + TCollection_AsciiString aStamp = "Set"; + aStamp += aName; + Express::WriteMethodStamp (anOS, aStamp); + + Standard_Boolean isString = (anItemCPPName.Location ("HAsciiString", 1, anItemCPPName.Length()) > 0); + TCollection_AsciiString aNameFunc; + TCollection_AsciiString aFunc; + Standard_Boolean isEnum = anItem->IsKind (STANDARD_TYPE(Express_Enum)); + if (!isEnum) + { + if (isString) + { + aFunc += "String"; + } + else + { + aNameFunc += anItemCPPName; + aFunc = aNameFunc; + Standard_Integer aSplitInd = aNameFunc.Location ("_", 1, anItemCPPName.Length()); + if (aSplitInd) + { + aFunc = aNameFunc.Split (aSplitInd); + } + } + } + + // write method set + if (isString) + { + anOS << "void " << aCPPName << "::Set" << aName << " (const Handle(" << anItemCPPName << ") &theVal)\n"; + } + else + { + anOS << "void " << aCPPName << "::Set" << aName << " (const " << anItemCPPName << " theVal)\n"; + } + + anOS << "{\n" + " Handle(" << aCPPName << "Member) SelMem = Handle(" << aCPPName << "Member)::DownCast(Value());\n" + " if (SelMem.IsNull()) return;\n" + " Handle(TCollection_HAsciiString) aName = new TCollection_HAsciiString(\"" << aName << "\");\n" + " SelMem->SetName (aName->ToCString());\n"; + if (isEnum) + { + anOS << " SelMem->SetEnum ((Standard_Integer)theVal);\n"; + } + else if (isString) + { + anOS << " SelMem->Set" << aFunc << " (theVal->ToCString());\n"; + } + else + { + anOS << " SelMem->Set" << aFunc << " (theVal);\n"; + } + anOS << "}\n"; + + // write method get + Express::WriteMethodStamp (anOS, aName); + if (isString) + { + anOS << "Handle(" << anItemCPPName << ") " << aCPPName << "::" << aName << "() const\n"; + } + else + { + anOS << anItemCPPName << " " << aCPPName << "::" << aName << "() const\n"; + } + + anOS << "{\n" + " Handle(" << aCPPName << "Member) SelMem = Handle(" << aCPPName << "Member)::DownCast (Value());\n" + " if (SelMem.IsNull()) return 0;\n" + " Handle(TCollection_HAsciiString) aName = new TCollection_HAsciiString;\n" + " aName->AssignCat (SelMem->Name());\n" + " Handle(TCollection_HAsciiString) aNameItem = new TCollection_HAsciiString(\"" << aName << "\");\n" + " if (aName->IsDifferent (aNameItem)) return 0;\n"; + if (isEnum) + { + anOS << " Standard_Integer aNumIt = SelMem->Enum();\n" + " " << anItemCPPName << " aVal;\n" + " switch (aNumIt)\n" + " {\n"; + Handle(Express_Enum) anEnum = Handle(Express_Enum)::DownCast (anItem); + Handle(TColStd_HSequenceOfHAsciiString) anEnItems = anEnum->Names(); + TCollection_AsciiString aPrefix = Express::EnumPrefix (aName); + for (Standard_Integer k = 1; k <= anEnItems->Length(); k++) + { + anOS << " case " << k << " : aVal = " << aName << "_" << aPrefix << anEnItems->Value (k)->String() << "; break;\n"; + } + anOS << " default : return 0; break;\n" + " }\n"; + } + else if (isString) + { + anOS << " Handle(TCollection_HAsciiString) aVal = new TCollection_HAsciiString;\n" + " aVal->AssignCat (SelMem->String());\n"; + } + else + { + anOS << " " << anItemCPPName << " aVal = SelMem->" << aFunc << "();\n"; + } + + anOS << " return aVal;\n" + "}\n"; + + } + aStreamPtr.reset(); + } + + return Standard_True; +} + +//======================================================================= +// function : PropagateUse +// purpose : +//======================================================================= + +void Express_Select::PropagateUse() const +{ + const TCollection_AsciiString& aPack = GetPackageName(); + const TCollection_AsciiString& aName = Name(); + + for (Standard_Integer i = 1; i <= myItems->Length(); i++) + { + Handle(Express_Item) anItem = myItems->Value (i); + anItem->Use2 (aName, aPack); + } +} + +//======================================================================= +// function : GenerateSelectMember +// purpose : +//======================================================================= + +Standard_Boolean Express_Select::generateSelectMember (const Handle(TColStd_HSequenceOfInteger)& theSeqMember) const +{ + TCollection_AsciiString aCPPname = CPPName(); + aCPPname += "Member"; + + // create a package directory (if not yet exist) + OSD_Protection aProt (OSD_RWXD, OSD_RWXD, OSD_RX, OSD_RX); + TCollection_AsciiString aPack = GetPackageName(); + OSD_Path aPath (aPack); + OSD_Directory aDir (aPath); + aDir.Build (aProt); + aPack += "/"; + aPack += aCPPname; + const Handle(OSD_FileSystem)& aFileSystem = OSD_FileSystem::DefaultFileSystem(); + + // Step 1: generating HXX + { + // Open HXX file + std::shared_ptr aStreamPtr = aFileSystem->OpenOStream (aPack.Cat (".hxx"), std::ios::out | std::ios::binary); + Standard_OStream& anOS = *aStreamPtr; + // write header + Express::WriteFileStamp (anOS); + + // write start define + anOS << "#ifndef _" << aCPPname << "_HeaderFile\n" + "#define _" << aCPPname << "_HeaderFile\n" + "\n"; + + // includes + anOS << "#include \n" + "#include \n" + "#include \n" + "#include \n" + "#include \n" + "#include \n" + "\n" + "DEFINE_STANDARD_HANDLE(" << aCPPname << ", StepData_SelectNamed)\n" + "\n"; + + // write start of declaration (inheritance) + anOS << " //! Representation of member for STEP SELECT type " << Name() << "\n" + "class " << aCPPname << " : public StepData_SelectNamed\n" + "{\n" + "public:\n"; + + // write methods + anOS << " //! Empty constructor\n" + " Standard_EXPORT " << aCPPname << "();\n" + "\n" + " //! Returns True if has name\n" + " Standard_EXPORT virtual Standard_Boolean HasName() const Standard_OVERRIDE;\n" + "\n" + " //! Returns name\n" + " Standard_EXPORT virtual Standard_CString Name() const Standard_OVERRIDE;\n" + "\n" + " //! Set name\n" + " Standard_EXPORT virtual Standard_Boolean SetName(const Standard_CString name) Standard_OVERRIDE;\n" + "\n" + " //! Tells if the name of a SelectMember matches a given one;\n" + " Standard_EXPORT virtual Standard_Boolean Matches (const Standard_CString name) const Standard_OVERRIDE;\n" + "\n"; + + // write fields + anOS << "private:\n" + " Standard_Integer myCase;\n" + "\n"; + // write end + anOS << "};\n" + "#endif // _" << aCPPname << "_HeaderFile\n"; + aStreamPtr.reset(); + } + //=============================== + // Step 2: generating CXX + { + // Open CXX file + std::shared_ptr aStreamPtr = aFileSystem->OpenOStream (aPack.Cat (".cxx"), std::ios::out | std::ios::binary); + Standard_OStream& anOS = *aStreamPtr; + + // write header + Express::WriteFileStamp (anOS); + + // write include section + anOS << "#include <" << aCPPname << ".hxx>\n" + "#include \n"; + // write constructor + Express::WriteMethodStamp (anOS, aCPPname); + anOS << aCPPname << "::" << aCPPname << "() : myCase(0) \n" + "{\n" + "}\n"; + + // write method HasName + Express::WriteMethodStamp (anOS, "HasName"); + anOS << "Standard_Boolean " << aCPPname << "::HasName() const\n" + "{\n" + " return myCase > 0;\n" + "}\n"; + + Standard_Boolean hasEnum = Standard_False; + // write method Name + Express::WriteMethodStamp (anOS, "Name"); + anOS << "Standard_CString " << aCPPname << "::Name() const\n" + "{\n" + " Handle(TCollection_HAsciiString) aName = new TCollection_HAsciiString;\n" + " switch (myCase)" + " {\n"; + for (Standard_Integer i = 1; i <= theSeqMember->Length(); i++) + { + Standard_Integer anIdx = theSeqMember->Value (i); + Handle(Express_Item) anItem = myItems->Value (anIdx); + if (anItem->IsKind (STANDARD_TYPE(Express_Enum))) + { + hasEnum = Standard_True; + } + anOS << " case " << i << " : aName->AssignCat (\"" << myNames->Value (anIdx)->String() << "\"); break;\n"; + } + anOS << " default : break;\n" + " }\n" + " return aName->String();\n" + "}\n"; + + // write static method for compare name + Express::WriteMethodStamp (anOS, "CompareNames"); + anOS << "static Standard_Integer CompareNames (const Standard_CString theName"; + if (hasEnum) + { + anOS << ", Standard_Integer &theNumEn)\n"; + } + else + { + anOS << ")\n"; + } + anOS << "{\n" + " Standard_Integer aCase = 0;\n" + " if (!theName || theName[0] == \'/0\') aCase = 0;\n"; + for (Standard_Integer i = 1; i <= theSeqMember->Length(); i++) + { + Standard_Integer anIdx = theSeqMember->Value (i); + Handle(Express_Item) anItem = myItems->Value (anIdx); + if (anItem->IsKind (STANDARD_TYPE(Express_Enum))) + { + Handle(Express_Enum) en = Handle(Express_Enum)::DownCast (anItem); + for (Standard_Integer k = 1; k <= en->Names()->Length(); k++) + { + anOS << " else if (!strcmp (theName, \"" << en->Names()->Value (k)->String() << "\"))\n" + " {\n" + " aCase = " << i << ";\n" + " theNumEn = " << k << ";\n" + " }\n"; + } + } + else + { + anOS << " else if (!strcmp (theName, \"" << myNames->Value (anIdx)->String() << "\")) aCase = " << i << ";\n"; + } + } + anOS << " return aCase;\n" + "}\n"; + + // write method SetName + Express::WriteMethodStamp (anOS, "SetName"); + anOS << "Standard_Boolean " << aCPPname << "::SetName (const Standard_CString theName) \n" + "{\n"; + if (hasEnum) + { + anOS << " Standard_Integer aNumIt = 0;\n" + " myCase = CompareNames (theName, aNumIt);\n" + " if (aNumIt) SetInteger (aNumIt);\n"; + } + else + { + anOS << " myCase = CompareNames (theName);\n"; + } + anOS << " return (myCase > 0);\n" + "}\n"; + + // write method Matches + Express::WriteMethodStamp (anOS, "Matches"); + anOS << "Standard_Boolean " << aCPPname << "::Matches (const Standard_CString theName) const\n" + "{\n"; + if (hasEnum) + { + anOS << " Standard_Integer aNumIt = 0;\n" + " Standard_Integer aCase = CompareNames (theName, aNumIt);\n"; + } + else + { + anOS << " Standard_Integer aCase = CompareNames (theName);\n"; + } + anOS << " return (aCase > 0);\n" + "}\n"; + aStreamPtr.reset(); + } + + return Standard_True; +} diff --git a/src/Express/Express_Select.hxx b/src/Express/Express_Select.hxx new file mode 100644 index 0000000000..3ba1f62683 --- /dev/null +++ b/src/Express/Express_Select.hxx @@ -0,0 +1,63 @@ +// Copyright (c) 1999-2020 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 _Express_Select_HeaderFile +#define _Express_Select_HeaderFile + +#include + +#include +#include +#include +#include +#include + +class Express_HSequenceOfItem; + +//! Implements TYPE SELECT item of the EXPRESS +//! schema, with interface for deferred Item class. +class Express_Select : public Express_Item +{ + +public: + + //! Create SELECT item and initialize it + Standard_EXPORT Express_Select (const Standard_CString theName, + const Handle(TColStd_HSequenceOfHAsciiString)& theNames); + + //! Returns names of types included in this SELECT + Standard_EXPORT const Handle(TColStd_HSequenceOfHAsciiString)& Names() const; + + //! Returns sequence of items corresponding to typenames + Standard_EXPORT const Handle(Express_HSequenceOfItem)& Items() const; + + //! Create HXX/CXX files from item + Standard_EXPORT virtual Standard_Boolean GenerateClass() const Standard_OVERRIDE; + + //! Propagates the calls of Use function + Standard_EXPORT virtual void PropagateUse() const Standard_OVERRIDE; + + DEFINE_STANDARD_RTTIEXT(Express_Select, Express_Item) + +protected: + +private: + + Standard_EXPORT Standard_Boolean generateSelectMember (const Handle(TColStd_HSequenceOfInteger)& theSeqMember) const; + + Handle(TColStd_HSequenceOfHAsciiString) myNames; + Handle(Express_HSequenceOfItem) myItems; + +}; + +#endif // _Express_Select_HeaderFile diff --git a/src/Express/Express_SequenceOfEntity.hxx b/src/Express/Express_SequenceOfEntity.hxx new file mode 100644 index 0000000000..621e6dd1a1 --- /dev/null +++ b/src/Express/Express_SequenceOfEntity.hxx @@ -0,0 +1,22 @@ +// Copyright (c) 1999-2020 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 Express_SequenceOfEntity_HeaderFile +#define Express_SequenceOfEntity_HeaderFile + +#include +#include + +typedef NCollection_Sequence Express_SequenceOfEntity; + +#endif diff --git a/src/Express/Express_SequenceOfField.hxx b/src/Express/Express_SequenceOfField.hxx new file mode 100644 index 0000000000..77f6150585 --- /dev/null +++ b/src/Express/Express_SequenceOfField.hxx @@ -0,0 +1,22 @@ +// Copyright (c) 1999-2020 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 Express_SequenceOfField_HeaderFile +#define Express_SequenceOfField_HeaderFile + +#include +#include + +typedef NCollection_Sequence Express_SequenceOfField; + +#endif diff --git a/src/Express/Express_SequenceOfItem.hxx b/src/Express/Express_SequenceOfItem.hxx new file mode 100644 index 0000000000..4ab9afd9ea --- /dev/null +++ b/src/Express/Express_SequenceOfItem.hxx @@ -0,0 +1,22 @@ +// Copyright (c) 1999-2020 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 Express_SequenceOfItem_HeaderFile +#define Express_SequenceOfItem_HeaderFile + +#include +#include + +typedef NCollection_Sequence Express_SequenceOfItem; + +#endif diff --git a/src/Express/Express_Set.hxx b/src/Express/Express_Set.hxx new file mode 100644 index 0000000000..686115d4bf --- /dev/null +++ b/src/Express/Express_Set.hxx @@ -0,0 +1,21 @@ +// Copyright (c) 1999-2020 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 _Express_Set_HeaderFile +#define _Express_Set_HeaderFile + +#include + +typedef Express_ComplexType Express_Set; + +#endif // _Express_Set_HeaderFile diff --git a/src/Express/Express_String.cxx b/src/Express/Express_String.cxx new file mode 100644 index 0000000000..c986e82bf5 --- /dev/null +++ b/src/Express/Express_String.cxx @@ -0,0 +1,49 @@ +// Created: Tue Nov 2 15:27:26 1999 +// Author: Andrey BETENEV +// Copyright (c) 1999-2020 OPEN CASCADE SAS +// +// This file is part of Open CASCADE Technology software library. +// +// This library is free software; you can redistribute it and/or modify it under +// the terms of the GNU Lesser General Public License version 2.1 as published +// by the Free Software Foundation, with special exception defined in the file +// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT +// distribution for complete text of the license and disclaimer of any warranty. +// +// Alternatively, this file may be used under the terms of Open CASCADE +// commercial license or contractual agreement. + +#include +#include + +IMPLEMENT_STANDARD_RTTIEXT(Express_String, Express_PredefinedType) + +//======================================================================= +// function : Express_String +// purpose : +//======================================================================= + +Express_String::Express_String() +{ +} + +//======================================================================= +// function : CPPName +// purpose : +//======================================================================= + +const TCollection_AsciiString Express_String::CPPName() const +{ + return "TCollection_HAsciiString"; +} + +//======================================================================= +// function : IsStandard +// purpose : +//======================================================================= + +Standard_Boolean Express_String::IsStandard() const +{ + return Standard_False; +} + diff --git a/src/Express/Express_String.hxx b/src/Express/Express_String.hxx new file mode 100644 index 0000000000..c5109ef456 --- /dev/null +++ b/src/Express/Express_String.hxx @@ -0,0 +1,45 @@ +// Copyright (c) 1999-2020 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 _Express_String_HeaderFile +#define _Express_String_HeaderFile + +#include +#include + +class TCollection_AsciiString; + +//! Implements EXPRESS type 'STRING' +class Express_String : public Express_PredefinedType +{ + +public: + + //! Empty constructor + Standard_EXPORT Express_String(); + + //! Returns "TCollection_HAsciiString" + Standard_EXPORT virtual const TCollection_AsciiString CPPName() const Standard_OVERRIDE; + + //! Returns False + Standard_EXPORT virtual Standard_Boolean IsStandard() const Standard_OVERRIDE; + + DEFINE_STANDARD_RTTIEXT(Express_String, Express_PredefinedType) + +protected: + +private: + +}; + +#endif // _Express_String_HeaderFile diff --git a/src/Express/Express_Type.cxx b/src/Express/Express_Type.cxx new file mode 100644 index 0000000000..b1c77b2e49 --- /dev/null +++ b/src/Express/Express_Type.cxx @@ -0,0 +1,76 @@ +// Created: Tue Nov 2 15:11:36 1999 +// Author: Andrey BETENEV +// Copyright (c) 1999-2020 OPEN CASCADE SAS +// +// This file is part of Open CASCADE Technology software library. +// +// This library is free software; you can redistribute it and/or modify it under +// the terms of the GNU Lesser General Public License version 2.1 as published +// by the Free Software Foundation, with special exception defined in the file +// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT +// distribution for complete text of the license and disclaimer of any warranty. +// +// Alternatively, this file may be used under the terms of Open CASCADE +// commercial license or contractual agreement. + +#include + +IMPLEMENT_STANDARD_RTTIEXT(Express_Type, Standard_Transient) + +//======================================================================= +// function : Express_Type +// purpose : +//======================================================================= + +Express_Type::Express_Type() +{ +} + +//======================================================================= +// function : IsStandard +// purpose : +//======================================================================= + +Standard_Boolean Express_Type::IsStandard() const +{ + return Standard_False; +} + +//======================================================================= +// function : IsSimple +// purpose : +//======================================================================= + +Standard_Boolean Express_Type::IsSimple() const +{ + return IsStandard(); +} + +//======================================================================= +// function : IsHandle +// purpose : +//======================================================================= + +Standard_Boolean Express_Type::IsHandle() const +{ + return !IsSimple(); +} + +//======================================================================= +// function : Use +// purpose : +//======================================================================= + +Standard_Boolean Express_Type::Use() const +{ + return Standard_False; +} + +//======================================================================= +// function : Use2 +// purpose : +//======================================================================= + +void Express_Type::Use2 (const TCollection_AsciiString&, const TCollection_AsciiString&) const +{ +} diff --git a/src/Express/Express_Type.hxx b/src/Express/Express_Type.hxx new file mode 100644 index 0000000000..62dbe2a36b --- /dev/null +++ b/src/Express/Express_Type.hxx @@ -0,0 +1,63 @@ +// Copyright (c) 1999-2020 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 _Express_Type_HeaderFile +#define _Express_Type_HeaderFile + +#include + +class TCollection_AsciiString; + +//! Provides basis for identification (reference) to some type +//! in express schema +class Express_Type : public Standard_Transient +{ + +public: + + //! Returns CPP-style name of the type + Standard_EXPORT virtual const TCollection_AsciiString CPPName() const = 0; + + //! Return True if type is defined in package Standard (False by default) + Standard_EXPORT virtual Standard_Boolean IsStandard() const; + + //! Return True if type is simple (not a class) + //! (by default returns IsStandard()) + Standard_EXPORT virtual Standard_Boolean IsSimple() const; + + //! Return True if type is Transient + //! (by default returns ! IsSimple()) + Standard_EXPORT virtual Standard_Boolean IsHandle() const; + + //! Declares type as used by some item being generated. + //! Calls Use() for all referred types and schema items. + //! Default instantiation does nothing + Standard_EXPORT virtual Standard_Boolean Use() const; + + //! Declares type as used by some item being generated. + //! Calls Use() for all referred types and schema items. + //! Default instantiation does nothing + Standard_EXPORT virtual void Use2 (const TCollection_AsciiString& theRefName, const TCollection_AsciiString& theRefPack) const; + + DEFINE_STANDARD_RTTIEXT(Express_Type, Standard_Transient) + +protected: + + //! Empty constructor + Standard_EXPORT Express_Type(); + +private: + +}; + +#endif // _Express_Type_HeaderFile diff --git a/src/Express/FILES b/src/Express/FILES new file mode 100644 index 0000000000..3f35ed5963 --- /dev/null +++ b/src/Express/FILES @@ -0,0 +1,48 @@ +Express.cxx +Express.hxx +Express_Alias.cxx +Express_Alias.hxx +Express_Array.hxx +Express_Bag.hxx +Express_Boolean.cxx +Express_Boolean.hxx +Express_ComplexType.cxx +Express_ComplexType.hxx +Express_DataMapOfAsciiStringItem.hxx +Express_Entity.cxx +Express_Entity.hxx +Express_Enum.cxx +Express_Enum.hxx +Express_Field.cxx +Express_Field.hxx +Express_HSequenceOfEntity.hxx +Express_HSequenceOfField.hxx +Express_HSequenceOfItem.hxx +Express_Integer.cxx +Express_Integer.hxx +Express_Item.cxx +Express_Item.hxx +Express_List.hxx +Express_Logical.cxx +Express_Logical.hxx +Express_NamedType.cxx +Express_NamedType.hxx +Express_Number.hxx +Express_PredefinedType.cxx +Express_PredefinedType.hxx +Express_Real.cxx +Express_Real.hxx +Express_Reference.cxx +Express_Reference.hxx +Express_Schema.cxx +Express_Schema.hxx +Express_Select.cxx +Express_Select.hxx +Express_SequenceOfEntity.hxx +Express_SequenceOfField.hxx +Express_SequenceOfItem.hxx +Express_Set.hxx +Express_String.cxx +Express_String.hxx +Express_Type.cxx +Express_Type.hxx diff --git a/src/OS/DataExchange.tcl b/src/OS/DataExchange.tcl index 3f3b5badc7..cbb12e7d56 100644 --- a/src/OS/DataExchange.tcl +++ b/src/OS/DataExchange.tcl @@ -18,7 +18,7 @@ proc DataExchange:toolkits { } { return [list TKXSBase TKSTEPBase TKSTEPAttr TKSTEP209 TKSTEP TKIGES \ TKXCAF TKXDEIGES TKXDESTEP \ TKXDE TKXDECascade \ - TKSTL TKVRML TKXmlXCAF TKBinXCAF TKRWMesh] + TKSTL TKVRML TKXmlXCAF TKBinXCAF TKRWMesh TKExpress] } ;# @@ -29,6 +29,7 @@ proc DataExchange:ressources { } { [list both r XSMessage {} ] \ [list both r SHMessage {} ] \ [list both r XSTEPResource {} ] \ + [list both x ExpToCasExe {} ] \ ] } ;# diff --git a/src/TKExpress/CMakeLists.txt b/src/TKExpress/CMakeLists.txt new file mode 100644 index 0000000000..078099e012 --- /dev/null +++ b/src/TKExpress/CMakeLists.txt @@ -0,0 +1,3 @@ +project(TKExpress) + +OCCT_INCLUDE_CMAKE_FILE (adm/cmake/occt_toolkit) diff --git a/src/TKExpress/EXTERNLIB b/src/TKExpress/EXTERNLIB new file mode 100644 index 0000000000..58c24f0d95 --- /dev/null +++ b/src/TKExpress/EXTERNLIB @@ -0,0 +1 @@ +TKernel diff --git a/src/TKExpress/FILES b/src/TKExpress/FILES new file mode 100644 index 0000000000..ca4f0e567b --- /dev/null +++ b/src/TKExpress/FILES @@ -0,0 +1,2 @@ +EXTERNLIB +PACKAGES diff --git a/src/TKExpress/PACKAGES b/src/TKExpress/PACKAGES new file mode 100644 index 0000000000..8e2074197b --- /dev/null +++ b/src/TKExpress/PACKAGES @@ -0,0 +1 @@ +Express From b71cb85f671f0019067a3e115f1b2acdbc88c585 Mon Sep 17 00:00:00 2001 From: jgv Date: Mon, 22 Aug 2022 12:15:42 +0300 Subject: [PATCH 369/639] 0032214: Modeling Algorithms - 2d Offset produces wrong result Add new option to convert input contours into ones consisting of 2D circular arcs and 2D linear segments only. Update documentation --- .../modeling_data/modeling_data.md | 3 +- src/BRepAlgo/BRepAlgo.cxx | 169 ++++ src/BRepAlgo/BRepAlgo.hxx | 23 + .../BRepOffsetAPI_MakeOffset.cxx | 103 +- .../BRepOffsetAPI_MakeOffset.hxx | 6 + src/BRepTest/BRepTest_CurveCommands.cxx | 121 ++- src/Geom2dConvert/FILES | 5 + .../Geom2dConvert_ApproxArcsSegments.cxx | 911 ++++++++++++++++++ .../Geom2dConvert_ApproxArcsSegments.hxx | 113 +++ src/Geom2dConvert/Geom2dConvert_PPoint.cxx | 54 ++ src/Geom2dConvert/Geom2dConvert_PPoint.hxx | 76 ++ .../Geom2dConvert_SequenceOfPPoint.hxx | 25 + tests/bugs/modalg_8/bug32214_1 | 23 + tests/bugs/modalg_8/bug32214_2 | 24 + tests/bugs/modalg_8/bug32214_3 | 30 + tests/bugs/modalg_8/bug32214_4 | 52 + tests/bugs/modalg_8/bug32214_5 | 52 + tests/bugs/modalg_8/bug32214_6 | 52 + 18 files changed, 1830 insertions(+), 12 deletions(-) create mode 100644 src/Geom2dConvert/Geom2dConvert_ApproxArcsSegments.cxx create mode 100644 src/Geom2dConvert/Geom2dConvert_ApproxArcsSegments.hxx create mode 100644 src/Geom2dConvert/Geom2dConvert_PPoint.cxx create mode 100644 src/Geom2dConvert/Geom2dConvert_PPoint.hxx create mode 100644 src/Geom2dConvert/Geom2dConvert_SequenceOfPPoint.hxx create mode 100644 tests/bugs/modalg_8/bug32214_1 create mode 100644 tests/bugs/modalg_8/bug32214_2 create mode 100644 tests/bugs/modalg_8/bug32214_3 create mode 100644 tests/bugs/modalg_8/bug32214_4 create mode 100644 tests/bugs/modalg_8/bug32214_5 create mode 100644 tests/bugs/modalg_8/bug32214_6 diff --git a/dox/user_guides/modeling_data/modeling_data.md b/dox/user_guides/modeling_data/modeling_data.md index 6c153507aa..9ab0afd1db 100644 --- a/dox/user_guides/modeling_data/modeling_data.md +++ b/dox/user_guides/modeling_data/modeling_data.md @@ -326,7 +326,8 @@ The Geom2dConvert package provides the following: * a global function which is used to construct a BSpline curve from a bounded curve based on a 2D curve from the Geom2d package, * a splitting algorithm which computes the points at which a 2D BSpline curve should be cut in order to obtain arcs with the same degree of continuity, * global functions used to construct the BSpline curves created by this splitting algorithm, or by other types of segmentation of the BSpline curve, - * an algorithm which converts a 2D BSpline curve into a series of adjacent Bezier curves. + * an algorithm which converts a 2D BSpline curve into a series of adjacent Bezier curves, + * an algorithm which converts an arbitrary 2D curve into a series of adjacent 2D circular arcs and 2D linear segments. The GeomConvert package also provides the following: diff --git a/src/BRepAlgo/BRepAlgo.cxx b/src/BRepAlgo/BRepAlgo.cxx index 6e334d67c7..f7a1c0ea36 100644 --- a/src/BRepAlgo/BRepAlgo.cxx +++ b/src/BRepAlgo/BRepAlgo.cxx @@ -15,8 +15,13 @@ // commercial license or contractual agreement. +#include #include +#include +#include +#include #include +#include #include #include #include @@ -25,10 +30,13 @@ #include #include #include +#include +#include #include #include #include #include +#include #include #include #include @@ -40,6 +48,7 @@ #include #include #include +#include #include #include #include @@ -47,6 +56,166 @@ #include #include +// The minimal tolerance of approximation (edges can be defined with yet smaller tolerance) +static const Standard_Real MINIMAL_TOLERANCE = 0.0001; + +namespace { + +struct OrientedCurve +{ + Handle(Geom2d_TrimmedCurve) Curve; + Standard_Boolean IsReverse; + inline gp_Pnt2d Point (const Standard_Boolean isEnd) const + { + if (isEnd == IsReverse) + return Curve->StartPoint(); + return Curve->EndPoint(); + } +}; + +} + +//======================================================================= +//function : ConvertWire +//purpose : +//======================================================================= + +TopoDS_Wire BRepAlgo::ConvertWire(const TopoDS_Wire& theWire, + const Standard_Real theAngleTol, + const TopoDS_Face& theFace) +{ + TopoDS_Wire aResult; + Standard_Real aMaxTol(0.); + const Handle(Geom_Surface) aSurf = BRep_Tool::Surface(theFace); + NCollection_Vector vecCurve; + + BRepTools_WireExplorer anExpE(theWire, theFace); + // Explore the edges in the current wire, in their connection order + for (; anExpE.More(); anExpE.Next()) { + const TopoDS_Edge& anEdge = anExpE.Current(); + BRepAdaptor_Curve2d aCurve(anEdge, theFace); + Standard_Real aTol = BRep_Tool::Tolerance(anEdge); + if (aTol < MINIMAL_TOLERANCE) + aTol = MINIMAL_TOLERANCE; + if (aTol > aMaxTol) + aMaxTol = aTol; + Geom2dConvert_ApproxArcsSegments anAlgo(aCurve, aTol, theAngleTol); + const TColGeom2d_SequenceOfCurve& aResultApprox = anAlgo.GetResult(); + + // Form the array of approximated elementary curves + if (anEdge.Orientation() == TopAbs_REVERSED) { + for (Standard_Integer iCrv = aResultApprox.Length(); iCrv > 0 ; iCrv--) { + const Handle(Geom2d_Curve)& aCrv = aResultApprox(iCrv); + if (aCrv.IsNull() == Standard_False) { + OrientedCurve& anOCurve = vecCurve.Append(OrientedCurve()); + anOCurve.Curve = Handle(Geom2d_TrimmedCurve)::DownCast(aCrv); + anOCurve.IsReverse = Standard_True; + } + } + } else { + for (Standard_Integer iCrv = 1; iCrv <= aResultApprox.Length(); iCrv++) { + const Handle(Geom2d_Curve)& aCrv = aResultApprox(iCrv); + if (aCrv.IsNull() == Standard_False) { + OrientedCurve& anOCurve = vecCurve.Append(OrientedCurve()); + anOCurve.Curve = Handle(Geom2d_TrimmedCurve)::DownCast(aCrv); + anOCurve.IsReverse = Standard_False; + } + } + } + } + + if (vecCurve.Length() > 0) + { + // Build the first vertex + BRep_Builder aVBuilder; + gp_Pnt2d aPnt[2] = { + vecCurve(0).Point(Standard_False), + vecCurve(vecCurve.Length() - 1).Point(Standard_True) + }; + Standard_Real aDist = aPnt[0].Distance(aPnt[1]); + if (aDist > aMaxTol + Precision::Confusion()) + aDist = Precision::Confusion(); + else { + aDist = 0.5 * aDist + Precision::Confusion(); + aPnt[0] = 0.5 * (aPnt[0].XY() + aPnt[1].XY()); + } + gp_Pnt aPnt3d; + aSurf->D0(aPnt[0].X(), aPnt[0].Y(), aPnt3d); + TopoDS_Vertex aFirstVertex; + aVBuilder.MakeVertex(aFirstVertex, aPnt3d, aDist); + + // Loop creating edges + BRepBuilderAPI_MakeWire aMkWire; + TopoDS_Edge anEdgeRes; + TopoDS_Vertex aVertex = aFirstVertex; + for (Standard_Integer iCrv = 0; iCrv < vecCurve.Length(); iCrv++) { + const OrientedCurve& anOCurve = vecCurve(iCrv); + TopoDS_Vertex aNextVertex; + aPnt[0] = anOCurve.Point(Standard_True); + if (iCrv == vecCurve.Length() - 1) { + aPnt[1] = vecCurve(0).Point(Standard_False); + aDist = aPnt[0].Distance(aPnt[1]); + if (aDist > aMaxTol + Precision::Confusion()) { + aSurf->D0(aPnt[0].X(), aPnt[0].Y(), aPnt3d); + aVBuilder.MakeVertex(aNextVertex, aPnt3d, Precision::Confusion()); + } else { + aNextVertex = aFirstVertex; + } + } else { + aPnt[1] = vecCurve(iCrv + 1).Point(Standard_False); + aDist = 0.5 * (aPnt[0].Distance(aPnt[1])) + Precision::Confusion(); + aPnt[0] = 0.5 * (aPnt[0].XY() + aPnt[1].XY()); + aSurf->D0(aPnt[0].X(), aPnt[0].Y(), aPnt3d); + aVBuilder.MakeVertex(aNextVertex, aPnt3d, aDist); + } + const Standard_Real aParam[2] = { + anOCurve.Curve->FirstParameter(), + anOCurve.Curve->LastParameter() + }; + if (anOCurve.IsReverse) { + BRepBuilderAPI_MakeEdge aMkEdge(anOCurve.Curve, aSurf, aNextVertex, + aVertex, aParam[0], aParam[1]); + anEdgeRes = aMkEdge.Edge(); + anEdgeRes.Orientation(TopAbs_REVERSED); + } else { + BRepBuilderAPI_MakeEdge aMkEdge(anOCurve.Curve, aSurf, aVertex, + aNextVertex, aParam[0], aParam[1]); + anEdgeRes = aMkEdge.Edge(); + } + aVertex = aNextVertex; + aMkWire.Add(anEdgeRes); + } + + if (aMkWire.IsDone()) + aResult = aMkWire.Wire(); + } + return aResult; +} + +//======================================================================= +//function : ConvertFace +//purpose : +//======================================================================= + +TopoDS_Face BRepAlgo::ConvertFace (const TopoDS_Face& theFace, + const Standard_Real theAngleTolerance) +{ + TopoDS_Face aResult; + const Handle(Geom_Surface) aSurf = BRep_Tool::Surface(theFace); + BRepBuilderAPI_MakeFace aMkFace(aSurf,Precision::Confusion()); + + TopExp_Explorer anExp(theFace, TopAbs_WIRE); + for (; anExp.More(); anExp.Next()) { + const TopoDS_Wire& aWire = TopoDS::Wire(anExp.Current()); + const TopoDS_Wire aNewWire = ConvertWire(aWire, theAngleTolerance, theFace); + aMkFace.Add(aNewWire); + } + if (aMkFace.IsDone()) { + aResult = aMkFace.Face(); + } + return aResult; +} + //======================================================================= //function : ConcatenateWire //purpose : diff --git a/src/BRepAlgo/BRepAlgo.hxx b/src/BRepAlgo/BRepAlgo.hxx index 380592c946..3e915d02e3 100644 --- a/src/BRepAlgo/BRepAlgo.hxx +++ b/src/BRepAlgo/BRepAlgo.hxx @@ -21,6 +21,7 @@ #include class TopoDS_Wire; class TopoDS_Edge; +class TopoDS_Face; class TopoDS_Shape; @@ -43,6 +44,28 @@ public: //! Junction points between edges of wire may be sharp, //! resulting curve of the resulting edge may be C0. Standard_EXPORT static TopoDS_Edge ConcatenateWireC0 (const TopoDS_Wire& Wire); + + //! Method of wire conversion, calls BRepAlgo_Approx internally. + //! @param theWire + //! Input Wire object. + //! @param theAngleTolerance + //! Angle (in radians) defining the continuity of the wire: if two vectors + //! differ by less than this angle, the result will be smooth (zero angle of + //! tangent lines between curve elements). + //! @return + //! The new TopoDS_Wire object consisting of edges each representing an arc + //! of circle or a linear segment. The accuracy of conversion is defined + //! as the maximal tolerance of edges in theWire. + static Standard_EXPORT TopoDS_Wire ConvertWire + (const TopoDS_Wire& theWire, + const Standard_Real theAngleTolerance, + const TopoDS_Face& theFace); + + //! Method of face conversion. The API corresponds to the method ConvertWire. + //! This is a shortcut for calling ConvertWire() for each wire in theFace. + static Standard_EXPORT TopoDS_Face ConvertFace + (const TopoDS_Face& theFace, + const Standard_Real theAngleTolerance); //! Checks if the shape is "correct". If not, returns //! , else returns . diff --git a/src/BRepOffsetAPI/BRepOffsetAPI_MakeOffset.cxx b/src/BRepOffsetAPI/BRepOffsetAPI_MakeOffset.cxx index 02b8959bfb..fda3234e48 100644 --- a/src/BRepOffsetAPI/BRepOffsetAPI_MakeOffset.cxx +++ b/src/BRepOffsetAPI/BRepOffsetAPI_MakeOffset.cxx @@ -17,9 +17,12 @@ #include #include +#include #include +#include #include #include +#include #include #include #include @@ -41,6 +44,49 @@ static Standard_Boolean AffichSpine = Standard_False; #endif +static Standard_Boolean NeedsConvertion (const TopoDS_Wire& theWire) +{ + TopoDS_Iterator anIter (theWire); + for (; anIter.More(); anIter.Next()) + { + const TopoDS_Edge& anEdge = TopoDS::Edge (anIter.Value()); + BRepAdaptor_Curve aBAcurve (anEdge); + GeomAbs_CurveType aType = aBAcurve.GetType(); + if (aType != GeomAbs_Line && + aType != GeomAbs_Circle) + return Standard_True; + } + + return Standard_False; +} + +static TopoDS_Face ConvertFace (const TopoDS_Face& theFace, + const Standard_Real theAngleTolerance) +{ + TopAbs_Orientation anOr = theFace.Orientation(); + TopoDS_Face aFace = theFace; + aFace.Orientation (TopAbs_FORWARD); + + TopoDS_Face aNewFace = TopoDS::Face (aFace.EmptyCopied()); + BRep_Builder aBB; + TopoDS_Iterator anIter (aFace); + for (; anIter.More(); anIter.Next()) + { + TopoDS_Wire aWire = TopoDS::Wire (anIter.Value()); + if (NeedsConvertion (aWire)) + { + TopAbs_Orientation anOrOfWire = aWire.Orientation(); + aWire = BRepAlgo::ConvertWire (aWire, theAngleTolerance, aFace); + BRepLib::BuildCurves3d (aWire); + aWire.Orientation (anOrOfWire); + } + aBB.Add (aNewFace, aWire); + } + aNewFace.Orientation (anOr); + + return aNewFace; +} + //======================================================================= //function : BRepOffsetAPI_MakeOffset //purpose : @@ -49,7 +95,8 @@ static Standard_Boolean AffichSpine = Standard_False; BRepOffsetAPI_MakeOffset::BRepOffsetAPI_MakeOffset() : myIsInitialized( Standard_False), myJoin(GeomAbs_Arc), - myIsOpenResult(Standard_False) + myIsOpenResult(Standard_False), + myIsToApprox(Standard_False) { } @@ -80,6 +127,7 @@ void BRepOffsetAPI_MakeOffset::Init(const TopoDS_Face& Spine, myIsInitialized = Standard_True; myJoin = Join; myIsOpenResult = IsOpenResult; + myIsToApprox = Standard_False; TopExp_Explorer exp; for (exp.Init(myFace,TopAbs_WIRE); exp.More();exp.Next()) { myWires.Append(exp.Current()); @@ -99,6 +147,7 @@ BRepOffsetAPI_MakeOffset::BRepOffsetAPI_MakeOffset(const TopoDS_Wire& Spine, myIsInitialized = Standard_True; myJoin = Join; myIsOpenResult = IsOpenResult; + myIsToApprox = Standard_False; } //======================================================================= @@ -113,6 +162,18 @@ void BRepOffsetAPI_MakeOffset::Init(const GeomAbs_JoinType Join, myIsOpenResult = IsOpenResult; } +//======================================================================= +//function : SetApprox +//purpose : Set approximation flag +// for convertion input contours into ones consisting of +// 2D circular arcs and 2D linear segments only +//======================================================================= + +void BRepOffsetAPI_MakeOffset::SetApprox(const Standard_Boolean ToApprox) +{ + myIsToApprox = ToApprox; +} + //======================================================================= //function : BRepOffsetAPI_MakeOffset //purpose : @@ -289,6 +350,46 @@ void BRepOffsetAPI_MakeOffset::Perform(const Standard_Real Offset, try { + if (myIsToApprox) + { + Standard_Real aTol = 0.01; + if (myFace.IsNull()) + { + TopoDS_Face aFace; + Standard_Boolean OnlyPlane = Standard_True; + TopTools_ListIteratorOfListOfShape anItl (myWires); + for (; anItl.More(); anItl.Next()) + { + BRepBuilderAPI_MakeFace aFaceMaker (TopoDS::Wire(anItl.Value()), OnlyPlane); + if (aFaceMaker.Error() == BRepBuilderAPI_FaceDone) + { + aFace = aFaceMaker.Face(); + break; + } + } + for (anItl.Initialize(myWires); anItl.More(); anItl.Next()) + { + const TopoDS_Wire& aWire = TopoDS::Wire(anItl.Value()); + if (NeedsConvertion (aWire)) + { + TopoDS_Wire aNewWire = BRepAlgo::ConvertWire (aWire, aTol, aFace); + BRepLib::BuildCurves3d (aNewWire); + aNewWire.Orientation (aWire.Orientation()); + anItl.ChangeValue() = aNewWire; + } + } + } + else + { + myFace = ConvertFace (myFace, aTol); + BRepLib::BuildCurves3d (myFace); + myWires.Clear(); + TopoDS_Iterator anIter (myFace); + for (; anIter.More(); anIter.Next()) + myWires.Append (anIter.Value()); + } + } + Standard_Integer i = 1; BRepFill_ListIteratorOfListOfOffsetWire itOW; TopoDS_Compound Res; diff --git a/src/BRepOffsetAPI/BRepOffsetAPI_MakeOffset.hxx b/src/BRepOffsetAPI/BRepOffsetAPI_MakeOffset.hxx index 0a09eb5693..43fd383af0 100644 --- a/src/BRepOffsetAPI/BRepOffsetAPI_MakeOffset.hxx +++ b/src/BRepOffsetAPI/BRepOffsetAPI_MakeOffset.hxx @@ -63,6 +63,11 @@ public: //! Initialize the evaluation of Offsetting. Standard_EXPORT void Init (const GeomAbs_JoinType Join = GeomAbs_Arc, const Standard_Boolean IsOpenResult = Standard_False); + //! Set approximation flag + //! for convertion input contours into ones consisting of + //! 2D circular arcs and 2D linear segments only. + Standard_EXPORT void SetApprox (const Standard_Boolean ToApprox); + //! Initializes the algorithm to construct parallels to the wire Spine. Standard_EXPORT void AddWire (const TopoDS_Wire& Spine); @@ -96,6 +101,7 @@ private: Standard_Boolean myLastIsLeft; GeomAbs_JoinType myJoin; Standard_Boolean myIsOpenResult; + Standard_Boolean myIsToApprox; TopoDS_Face myFace; TopTools_ListOfShape myWires; BRepFill_ListOfOffsetWire myLeft; diff --git a/src/BRepTest/BRepTest_CurveCommands.cxx b/src/BRepTest/BRepTest_CurveCommands.cxx index 37e39897d8..b0f58d031e 100644 --- a/src/BRepTest/BRepTest_CurveCommands.cxx +++ b/src/BRepTest/BRepTest_CurveCommands.cxx @@ -1530,10 +1530,23 @@ Standard_Integer mkoffset(Draw_Interpretor& di, char name[100]; BRepOffsetAPI_MakeOffset Paral; + + Standard_Boolean ToApprox = Standard_False; GeomAbs_JoinType theJoinType = GeomAbs_Arc; - if (n >= 6 && strcmp(a[5], "i") == 0) - theJoinType = GeomAbs_Intersection; - Paral.Init(theJoinType); + + Standard_Integer anIndArg = 6; + if (n >= 6) + { + if (strcmp(a[5], "-approx") == 0) + { + ToApprox = Standard_True; + anIndArg++; + } + + if (n >= anIndArg && strcmp(a[anIndArg-1], "i") == 0) + theJoinType = GeomAbs_Intersection; + } + TopoDS_Shape Base = DBRep::Get(a[2],TopAbs_FACE); if ( Base.IsNull()) @@ -1553,6 +1566,7 @@ Standard_Integer mkoffset(Draw_Interpretor& di, Base.Orientation(TopAbs_FORWARD); Paral.Init(TopoDS::Face(Base), theJoinType); } + Paral.SetApprox (ToApprox); Standard_Real U, dU; Standard_Integer Nb; @@ -1560,8 +1574,8 @@ Standard_Integer mkoffset(Draw_Interpretor& di, Nb = Draw::Atoi(a[3]); Standard_Real Alt = 0.; - if ( n == 7) - Alt = Draw::Atof(a[6]); + if (n > anIndArg) + Alt = Draw::Atof(a[anIndArg]); Standard_Integer Compt = 1; @@ -1598,16 +1612,30 @@ Standard_Integer openoffset(Draw_Interpretor& di, char name[100]; BRepOffsetAPI_MakeOffset Paral; + + Standard_Boolean ToApprox = Standard_False; GeomAbs_JoinType theJoinType = GeomAbs_Arc; - if (n == 6 && strcmp(a[5], "i") == 0) - theJoinType = GeomAbs_Intersection; - Paral.Init(theJoinType, Standard_True); + + Standard_Integer anIndArg = 6; + if (n >= 6) + { + if (strcmp(a[5], "-approx") == 0) + { + ToApprox = Standard_True; + anIndArg++; + } + + if (n >= anIndArg && strcmp(a[anIndArg-1], "i") == 0) + theJoinType = GeomAbs_Intersection; + } + TopoDS_Shape Base = DBRep::Get(a[2] ,TopAbs_FACE); if ( Base.IsNull()) { Base = DBRep::Get(a[2], TopAbs_WIRE); if (Base.IsNull()) return 1; + Paral.Init(theJoinType, Standard_True); Paral.AddWire(TopoDS::Wire(Base)); } else @@ -1615,6 +1643,7 @@ Standard_Integer openoffset(Draw_Interpretor& di, Base.Orientation(TopAbs_FORWARD); Paral.Init(TopoDS::Face(Base), theJoinType, Standard_True); } + Paral.SetApprox (ToApprox); Standard_Real U, dU; Standard_Integer Nb; @@ -1755,6 +1784,72 @@ Standard_Integer edgeintersector(Draw_Interpretor& di, } +//================================================================================= +//function : arclinconvert +//purpose : Convert a single face to a face with contour made of arcs and segments +//================================================================================= + +static Standard_Integer arclinconvert (Draw_Interpretor& /*dout*/, Standard_Integer n, const char** a) +{ + // Check the command arguments + if (n < 3) { + std::cout<<"Error: "< 3) + aTol = Draw::Atof(a[3]); + std::cout<<"Info: tolerance is set to "< + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +static const Standard_Integer MAXPOINTS = 100; +static const Standard_Real MyCurvatureTolerance = 0.0001; + +static Standard_Boolean checkContinuity (const Handle(Geom2d_Curve)& theCurve1, + const Handle(Geom2d_Curve)& theCurve2, + const Standard_Real theAnglTol); + +static Geom2dConvert_PPoint getParameter (const gp_XY& theXY1, + const Standard_Real theFirstPar, + const Standard_Real theLastPar, + const Adaptor2d_Curve2d& theCurve); + +static Standard_Boolean isInflectionPoint (const Standard_Real theParam, + const Adaptor2d_Curve2d& theCurve); + +static Standard_Boolean isInflectionPoint (const Standard_Real theParam, + const Geom2dConvert_PPoint& theFirstInf, + const Adaptor2d_Curve2d& theCurve, + const Standard_Real theAnglTol); + + +//======================================================================= +//function : Geom2dConvert_ApproxArcsSegments() +//purpose : Constructor +//======================================================================= + +Geom2dConvert_ApproxArcsSegments::Geom2dConvert_ApproxArcsSegments + (const Adaptor2d_Curve2d& theCurve, + const Standard_Real theTolerance, + const Standard_Real theAngleTol) + : myCurve (theCurve), + myAlloc (new NCollection_IncAllocator(4000)), + myTolerance (theTolerance), + myAngleTolerance (theAngleTol), + mySeqParams (myAlloc), + myStatus (StatusNotDone) +{ + myExt[0] = Geom2dConvert_PPoint(myCurve.FirstParameter(), myCurve); + myExt[1] = Geom2dConvert_PPoint(myCurve.LastParameter(), myCurve); + + switch (myCurve.GetType()) + { + case GeomAbs_Line: + { + // Create a single line segment. + const Standard_Real aDist = myExt[0].Dist(myExt[1]); + if (aDist > Precision::Confusion()) { + const gp_Ax2d anAx2d(myExt[0].Point(), gp_Vec2d(myExt[0].Point(), + myExt[1].Point())); + const Handle(Geom2d_Line) aLine = new Geom2d_Line(anAx2d); + mySeqCurves.Append(new Geom2d_TrimmedCurve(aLine, 0., aDist)); + myStatus = StatusOK; + } + } + break; + case GeomAbs_Circle: + { + // Create a couple of arcs of equal size. + const Geom2dConvert_PPoint aPP(.5 *(myExt[0].Parameter() + + myExt[1].Parameter()), myCurve); + Handle(Geom2d_Curve) aCurve = makeCircle (myExt[0], aPP); + if (aCurve.IsNull() == Standard_False) { + mySeqCurves.Append(aCurve); + aCurve = makeCircle (aPP, myExt[1]); + if (aCurve.IsNull() == Standard_False) + mySeqCurves.Append(aCurve); + } + } + break; + default: + makeFreeform(); + } + + // Check status of the calculation + if (myStatus == StatusNotDone) { + if (mySeqCurves.IsEmpty() == Standard_False) + myStatus = StatusOK; + else { + //std::cout << "GeomConv2d_Approx: no geometry converted." << std::endl; + myStatus = StatusError; + } + } +} + +//======================================================================= +//function : makeCircle +//purpose : method for creation of circle +//======================================================================= + +Handle(Geom2d_Curve) Geom2dConvert_ApproxArcsSegments::makeCircle + (const Geom2dConvert_PPoint& theFirst, + const Geom2dConvert_PPoint& theLast) const +{ + Handle(Geom2d_Curve) aResult; + gp_Pnt2d aPointM (0.0,0.0); + const Standard_Real aParaM = (theFirst.Parameter() + theLast.Parameter()) *.5; + myCurve.D0(aParaM, aPointM); + GCE2d_MakeArcOfCircle aMakeArc1(theFirst.Point(), aPointM, theLast.Point()); + + if (aMakeArc1.IsDone()) + aResult = aMakeArc1.Value(); + //else + //std::cout << "makeCircle(): Circle not built" << std::endl; + return aResult; +} + +//======================================================================= +//function : makeArc +//purpose : creation arcs by two points and derivative in the first point +/// : parameter isFirst specified direction of the arc. +//======================================================================= + +Standard_Boolean Geom2dConvert_ApproxArcsSegments::makeArc + (const Geom2dConvert_PPoint& theParam1, + Geom2dConvert_PPoint& theParam2, + const Standard_Boolean isFirst, + Handle(Geom2d_TrimmedCurve)& theCurve) const +{ + const gp_XY aP1 (theParam1.Point()); + const gp_XY aP2 (theParam2.Point()); + const gp_XY aVec (isFirst? theParam1.D1() : -theParam1.D1()); + + // Detect the sense (CCW means positive) + const gp_XY aDelta = aP2 - aP1; + Standard_Real aSense = aVec ^ aDelta; + if (aSense > Precision::Angular()) + aSense = 1.; + else if (aSense < -Precision::Angular()) + aSense = -1.; + else { + //std::cout << "makeArc(): Arc Not Built" << std::endl; + return Standard_False; + } + + // Find the centre of the circle + const gp_XY aMiddle = (aP2 + aP1) * 0.5; + const Standard_Real prodP1V = aP1 * aVec; + const Standard_Real prodDeM = aDelta * aMiddle; + const Standard_Real vprodVD = aVec ^ aDelta; + const Standard_Real aResolution = gp::Resolution(); + + if (vprodVD < -aResolution || vprodVD > aResolution) { + const gp_Pnt2d aCenter((prodP1V * aDelta.Y() - prodDeM * aVec.Y())/vprodVD, + (prodDeM * aVec.X() - prodP1V * aDelta.X())/vprodVD); + const Standard_Real aRad = + (aCenter.Distance(aP1) + aCenter.Distance(aP2)) * 0.5; + const gp_Ax22d ax22d (aCenter, gp_Dir2d(1., 0.), gp_Dir2d(0., 1.)); + const gp_Circ2d aCir (ax22d, aRad); + const Handle(Geom2d_Circle) Circ = new Geom2d_Circle(aCir); + + //calculation parameters first and last points of arc. + Standard_Real anAlpha1, anAlpha2; + if (isFirst) { + anAlpha1 = ElCLib::Parameter(aCir, aP1); + anAlpha2 = ElCLib::Parameter(aCir, aP2); + } else { + anAlpha1 = ElCLib::Parameter(aCir, aP2); + anAlpha2 = ElCLib::Parameter(aCir, aP1); + aSense = -aSense; + } + + if (fabs (anAlpha1 - anAlpha2) < 1e-100) + // very small value, just to avoid exact match + return Standard_False; + + // Reverse the circle if the sense is negative + if (aSense < 0.) { + anAlpha1 = Circ->ReversedParameter(anAlpha1); + anAlpha2 = Circ->ReversedParameter(anAlpha2); + Circ->Reverse(); + } + theCurve = new Geom2d_TrimmedCurve(Circ, anAlpha1, anAlpha2); + // Correct the direction in the opposite point + const gp_XY aRadV = theParam2.Point() - aCenter.XY(); + theParam2.SetD1(gp_XY(- aRadV.Y() * aSense, aRadV.X() * aSense)); + return Standard_True; + } + + // Algorithm failed, possibly because aVec is normal to the chorde + return Standard_False; +} + +//======================================================================= +//function : makeLine +//purpose : method for creation of line +//======================================================================= + +Handle(Geom2d_TrimmedCurve) Geom2dConvert_ApproxArcsSegments::makeLine + (Geom2dConvert_PPoint& theFirst, + Geom2dConvert_PPoint& theLast, + const Standard_Boolean isCheck) const +{ + Handle(Geom2d_TrimmedCurve) aResult; + + gp_XY aSlope = theLast.Point() - theFirst.Point(); + if (fabs(aSlope.SquareModulus()) < gp::Resolution()) + return aResult; + gp_Dir2d aDirLine(aSlope); + + if (isCheck) { + if (theFirst.D1().SquareModulus() < gp::Resolution() || + theLast.D1().SquareModulus() < gp::Resolution()) + return aResult; + + // Angular continuity (G1) is only checked when the end of the line is not + // on the extremity of the curve + Standard_Real absAngle[2] = { 0., 0. }; + if (theFirst != myExt[0]) { + const Standard_Real anAng = aDirLine.Angle(theFirst.D1()); + absAngle[0] = (anAng > 0. ? anAng : -anAng); + } + if (theLast != myExt[1]) { + const Standard_Real anAng = aDirLine.Angle(theLast.D1()); + absAngle[1] = (anAng > 0. ? anAng : -anAng); + } + + // if the derivatives in the end points differ from the derivative line + // more than value of the specified continuity tolerance + // then a biarc should be build instead of a line. + const Standard_Real aContTolerance = ::Max(myAngleTolerance, 0.01); + if (absAngle[0] > aContTolerance || absAngle[1] > aContTolerance) { + //std::cout << "makeLine(): Line not built" << std::endl; + return aResult; + } + } // end if (isCheck) + + //bulding segment of line + GCE2d_MakeSegment aMakeSeg (theFirst.Point(), theLast.Point()); + if (aMakeSeg.IsDone()) { + Handle(Geom2d_TrimmedCurve) aCurve = aMakeSeg.Value(); + if (checkCurve (aCurve, theFirst.Parameter(), theLast.Parameter())) { + aResult = aCurve; + // correct the derivatives fields in both arguments + const gp_XY aNewD1 (theLast.Point() - theFirst.Point()); + theFirst.SetD1(aNewD1); + theLast.SetD1(aNewD1); + } + } + //else + //std::cout << "makeLine(): Line not built" << std::endl; + return aResult; +} + +//======================================================================= +//function : makeFreeform +//purpose : get a sequence of Geom curves from one curve +//======================================================================= + +Standard_Boolean Geom2dConvert_ApproxArcsSegments::makeFreeform() +{ + Geom2dConvert_SequenceOfPPoint seqParamPoints(myAlloc); + Geom2dConvert_PPoint* aPrevParam = &myExt[0]; + + //calculation of the inflection points. + getLinearParts(seqParamPoints); + const Standard_Boolean isNoInfPoints = seqParamPoints.IsEmpty(); + + TColGeom2d_SequenceOfCurve aSeqLinearParts; + Standard_Boolean isDone (Standard_True); + Standard_Integer i; + for (i = 1; i < seqParamPoints.Length(); i += 2) + { + Handle(Geom2d_Curve) aLineCurve; + Geom2dConvert_PPoint& aParam0 = seqParamPoints.ChangeValue(i); + Geom2dConvert_PPoint& aParam1 = seqParamPoints.ChangeValue(i+1); + if (aParam0 != aParam1) + //linear part of the curve lies between odd and even values of i. + //parameters from parameter's sequence. + aLineCurve = makeLine (aParam0, aParam1, Standard_False); + aSeqLinearParts.Append(aLineCurve); + } + + for (i = 1; i < seqParamPoints.Length(); i += 2) + { + //approximation for non-linear part preceding the linear part + if (seqParamPoints(i) != * aPrevParam) { + const Standard_Integer aLastInd = mySeqCurves.Length(); + isDone = makeApproximation (* aPrevParam, seqParamPoints(i)); + if (isDone && aLastInd && mySeqCurves.Length() > aLastInd) + isDone = checkContinuity(mySeqCurves.Value(aLastInd), + mySeqCurves.Value(aLastInd+1), + myAngleTolerance); + if (!isDone) { + myStatus = StatusError; + break; + } + } + + const Handle(Geom2d_Curve)& aCurve = aSeqLinearParts.Value((i+1)/2); + if (aCurve.IsNull() == Standard_False) + mySeqCurves.Append(aCurve); + else { + Geom2dConvert_PPoint& aParam0 = seqParamPoints.ChangeValue(i); + Geom2dConvert_PPoint& aParam1 = seqParamPoints.ChangeValue(i+1); + const Standard_Integer aLastInd = mySeqCurves.Length(); + isDone = makeApproximation (aParam0, aParam1); + if (isDone && aLastInd && mySeqCurves.Length() > aLastInd) + isDone = checkContinuity(mySeqCurves.Value(aLastInd), + mySeqCurves.Value(aLastInd+1), + myAngleTolerance); + + if (!isDone) { + myStatus = StatusError; + //std::cout << "makeOther: Line not built" << std::endl; + break; + } + } + aPrevParam = &seqParamPoints(i+1); + } + + //approximation for non-linear part following the last linear part + if (isDone && (* aPrevParam != myExt[1])) + { + // Case of a closed edge like an ellipse + if (isNoInfPoints && + (myExt[0].Point() - myExt[1].Point()).Modulus() < myTolerance) + { + Geom2dConvert_PPoint aPPoint(0.5 * (myExt[0].Parameter() + + myExt[1].Parameter()), myCurve); + isDone = makeApproximation (myExt[0], aPPoint); + if (isDone) + isDone = makeApproximation (aPPoint, myExt[1]); + } else { + isDone = makeApproximation (* aPrevParam, myExt[1]); + } + if (!isDone) { + myStatus = StatusError; + //std::cout << "makeOther: Line not built" << std::endl; + } + } + + return (mySeqCurves.Length() && myStatus != StatusError); +} + +//======================================================================= +//function : getLinearParts +//purpose : method for geting inflection points +//======================================================================= + +void Geom2dConvert_ApproxArcsSegments::getLinearParts (Geom2dConvert_SequenceOfPPoint& theSeqPar) +{ + Standard_Integer i; + // Fill the sequences with values along the curve + mySeqParams.Clear(); + Adaptor2d_Curve2d& myCurveMut = const_cast(myCurve); + GCPnts_QuasiUniformDeflection aQUDefAlgo (myCurveMut, myTolerance * 0.5); + Standard_Boolean isUniformDone = aQUDefAlgo.IsDone(); + + gp_XY aLastPnt(myExt[0].Point()); + if (isUniformDone) { + for (i = 1; i <= aQUDefAlgo.NbPoints(); i++) { + const Geom2dConvert_PPoint aPP (aQUDefAlgo.Parameter(i), myCurve); + mySeqParams.Append(aPP); + aLastPnt = aPP.Point(); + } + } else { + const Standard_Real aParamStep = + (myExt[1].Parameter() - myExt[0].Parameter()) / MAXPOINTS; + for (i = 1; i <= MAXPOINTS; i++) { + const Standard_Real aParam = myExt[0].Parameter() + aParamStep * i; + const Geom2dConvert_PPoint aPP (aParam, myCurve); + mySeqParams.Append(aPP); + aLastPnt = aPP.Point(); + } + } + + //check if the curve may be linearised + gp_XY aDir = myExt[1].Point() - myExt[0].Point(); + const Standard_Real aMod2 = aDir.SquareModulus(); + if (aMod2 > Precision::Confusion()) + { + Standard_Boolean isLinear = Standard_True; + aDir /= sqrt(aMod2); + for (i = 1; i <= mySeqParams.Length(); i++) { + // Distance from point "i" to the segment between two extremities + const Standard_Real aDist = aDir ^ (mySeqParams(i).Point() - + myExt[0].Point()); + if (aDist > myTolerance * 0.5 || aDist < -myTolerance * 0.5) { + isLinear = Standard_False; + break; + } + } + if (isLinear) { + theSeqPar.Append(myExt[0]); + theSeqPar.Append(myExt[1]); + return; + } + } + + //check if point for First Parameter is inflection point. + Standard_Integer indStartLinear (0); + Geom2dConvert_PPoint aLastInflParam = myExt[0]; + Geom2dConvert_PPoint aFirstInflParam = myExt[0]; + + // Getting further inflection points with step by parameter. + // The point with index 1 is the same as myExt[0] + for (i = 1; i <= mySeqParams.Length(); i++) + { + const Geom2dConvert_PPoint& aCurParam = mySeqParams(i); + if (indStartLinear) { + Standard_Boolean isStillInflectionFirst = + isInflectionPoint (aFirstInflParam.Parameter(), aCurParam, + myCurve, myAngleTolerance); + if (isInflectionPoint (aCurParam.Parameter(), aFirstInflParam, + myCurve, myAngleTolerance)) + { + aLastInflParam = mySeqParams(i); + while (isStillInflectionFirst == Standard_False) { + if (++indStartLinear >= i) { + indStartLinear = 0; + break; + } + aFirstInflParam = mySeqParams(indStartLinear); + isStillInflectionFirst = + isInflectionPoint (aFirstInflParam.Parameter(), aCurParam, + myCurve, myAngleTolerance); + } + } else { + // Add the interval in the output sequence + // The interval is added only if it is more than 10 times the tolerance + aLastInflParam = findInflection (aLastInflParam, aCurParam); + if (!isInflectionPoint (aFirstInflParam.Parameter(), aLastInflParam, + myCurve, myAngleTolerance)) + { + aFirstInflParam = findInflection (aLastInflParam, aFirstInflParam); + } + const Standard_Real aDist((aFirstInflParam.Point() - + aLastInflParam.Point()).Modulus()); + if (aFirstInflParam.Parameter() < aLastInflParam.Parameter() && + aDist > 10 * myTolerance) + { + theSeqPar.Append(aFirstInflParam); + theSeqPar.Append(aLastInflParam); + } + indStartLinear = 0; + } + } else + if (isInflectionPoint (aCurParam.Parameter(), myCurve)) { + aLastInflParam = aCurParam; + if (i > 1) + aFirstInflParam = findInflection (aCurParam, mySeqParams(i-1)); + indStartLinear = i; + } + } + + const Standard_Real aDist((aFirstInflParam.Point() - + myExt[1].Point()).Modulus()); + if (indStartLinear && aDist > 10 * myTolerance) + { + theSeqPar.Append(aFirstInflParam); + theSeqPar.Append(myExt[1]); + } +} + +//======================================================================= +//function : findInflection +//purpose : Dichotomic search of the boundary of inflection interval, between +// two parameters on the Curve +//======================================================================= + +Geom2dConvert_PPoint Geom2dConvert_ApproxArcsSegments::findInflection + (const Geom2dConvert_PPoint& theParamIsInfl, + const Geom2dConvert_PPoint& theParamNoInfl) const +{ + Standard_Real aLower (theParamIsInfl.Parameter()); + Standard_Real anUpper (theParamNoInfl.Parameter()); + Standard_Real aTest(0.); + for (Standard_Integer i = 0; i < 3; i++) { // 3 iterations + aTest = (aLower + anUpper) * 0.5; + if (isInflectionPoint (aTest, theParamIsInfl, myCurve, myAngleTolerance)) + aLower = aTest; + else + anUpper = aTest; + } + return Geom2dConvert_PPoint(aTest, myCurve); +} + +//======================================================================= +//function : makeApproximation +//purpose : make approximation non-linear part of the other curve +//======================================================================= + +Standard_Boolean Geom2dConvert_ApproxArcsSegments::makeApproximation + (Geom2dConvert_PPoint& theFirstParam, + Geom2dConvert_PPoint& theLastParam) +{ + // if difference between parameters is less than Precision::PConfusion + //approximation was not made. + Standard_Boolean isDone = Standard_False; + if (theLastParam != theFirstParam) { + const Standard_Real aDistance = + (theFirstParam.Point() - theLastParam.Point()).Modulus(); + if (aDistance < myTolerance) + { + const Handle(Geom2d_Curve) aCurve = makeLine(theFirstParam, theLastParam, + Standard_True); + isDone = !aCurve.IsNull(); + if (isDone && mySeqCurves.Length()) + isDone = checkContinuity(mySeqCurves.Last(), aCurve, myAngleTolerance); + if (isDone || aDistance < Precision::Confusion()) { + mySeqCurves.Append(aCurve); + return isDone; + } + } + //calculate biarc + isDone = calculateBiArcs (theFirstParam, theLastParam); + + // if biarc was not calculated calculation is repeated on half the interval. + if (!isDone) + { + Geom2dConvert_PPoint aParaM + (theFirstParam.Parameter() + + (theLastParam.Parameter() - theFirstParam.Parameter()) * 0.55, + myCurve); + isDone = makeApproximation (theFirstParam, aParaM); + if (isDone) + isDone = makeApproximation (aParaM, theLastParam); + } + } + return isDone; +} + +//======================================================================= +//function : calculateBiArcs +//purpose : method for calculation of the biarcs. +//======================================================================= + +Standard_Boolean Geom2dConvert_ApproxArcsSegments::calculateBiArcs + (Geom2dConvert_PPoint& theFirstParam, + Geom2dConvert_PPoint& theLastParam) +{ + const Standard_Real aResolution = gp::Resolution(); + + if (theFirstParam.D1().SquareModulus() < aResolution || + theLastParam.D1().SquareModulus() < aResolution) + { + //std::cout << "calculateBiArcs(): bad initial data" << std::endl; + return Standard_False; + } + const gp_XY aPnt[2] = { + theFirstParam.Point(), + theLastParam.Point() + }; + gp_Dir2d aDir[2] = { + theFirstParam.D1(), + theLastParam.D1() + }; + + // Try to approximate the curve by a single arc. The criterion for that is + // more rigid if the curve is the entire input curve + // (possible pb. connecting with other boundaries) + const gp_Vec2d aDelta (aPnt[1] - aPnt[0]); + Standard_Real anAngle1 = aDelta.Angle(gp_Vec2d(aDir[0])); + if (anAngle1 < 0.) + anAngle1 = -anAngle1; + Standard_Real anAngle2 = aDelta.Angle(gp_Vec2d(aDir[1])); + if (anAngle2 < 0.) + anAngle2 = -anAngle2; + + //in the case when two angles are equal one arc can be built. + Standard_Real anAngleThreshold (Precision::Angular() * 10.); + if (theFirstParam != myExt[0] || theLastParam != myExt[1]) + anAngleThreshold = myAngleTolerance * 0.1; + if (fabs(anAngle1 - anAngle2) < anAngleThreshold) + { + Handle(Geom2d_TrimmedCurve) aCurve; + // protect the theLastParam from modification of D1, when + // the created arc is rejected. + Geom2dConvert_PPoint aLastParam (theLastParam); + if (!makeArc (theFirstParam, aLastParam, Standard_True, aCurve)) + return Standard_False; + if (checkCurve(aCurve, theFirstParam.Parameter(), aLastParam.Parameter())) + { + theLastParam = aLastParam; + mySeqCurves.Append(aCurve); + return Standard_True; + } + } + + // if one arc was not built or for other cases biarc will be built + // method for building biarc was taken from article Ahmad H. Nasri et al. + // "A Recursive Subdivision Algorithm for Piecewise Circular Spline", + // Computer Graphics Forum, 2001. + + // definition of point of intersection two tangent directions in the points + // corresponding FirstParameter and LastParameter. + aDir[1].Reverse(); + + // Direct calculation of intersection point, replaces a class call below + const Standard_Real aProd [3] = { + aPnt[0] ^ aDir[0].XY(), + aPnt[1] ^ aDir[1].XY(), + aDir[1] ^ aDir[0].XY() + }; + gp_XY aIntPoint((aProd[0] * aDir[1].X() - aProd[1] * aDir[0].X()) / aProd[2], + (aProd[0] * aDir[1].Y() - aProd[1] * aDir[0].Y()) / aProd[2]); + const gp_XY aDiff[2] = { + aIntPoint - aPnt[0], + aIntPoint - aPnt[1] + }; + if (aDiff[0] * aDir[0].XY() < 0. || aDiff[1] * aDir[1].XY() < 0.) + { + return Standard_False; + } + + //calculation middle point for building biarc. + const Standard_Real ad1 = aDiff[0].Modulus(); + const Standard_Real ad2 = aDiff[1].Modulus(); + const Standard_Real ad12 = aDelta.Magnitude(); + + const Standard_Real aB1 = ad1 / (ad1 + ad2); + if (fabs(aB1 - 0.5) < 0.0001) + return Standard_False; + + gp_XY aXY[2] = { + aPnt[0] + aDir[0].XY() * ad12 * ad1 / (ad12 + ad1 + ad2), + aPnt[1] + aDir[1].XY() * ad12 * ad2 / (ad12 + ad1 + ad2) + }; + + const gp_XY aXYmidArc (aXY[0] + aB1*(aXY[1] - aXY[0])); + Geom2dConvert_PPoint aParamMidArc = + getParameter (aXYmidArc, theFirstParam.Parameter(), + theLastParam.Parameter(), myCurve); + + //building first arc from biarc. + Handle(Geom2d_TrimmedCurve) aCurve1, aCurve2; + if (!makeArc (theFirstParam, aParamMidArc, Standard_True, aCurve1)) + return Standard_False; + + if (!checkCurve (aCurve1, theFirstParam.Parameter(), + aParamMidArc.Parameter())) + return Standard_False; + + //building second arc from biarc. + if (makeArc (theLastParam, aParamMidArc, Standard_False, aCurve2)) { + if (checkCurve (aCurve2, aParamMidArc.Parameter(), + theLastParam.Parameter())) { + mySeqCurves.Append(aCurve1); + mySeqCurves.Append(aCurve2); + return Standard_True; + } + } + return Standard_False; +} + +//======================================================================= +//function : calculateLines +//purpose : method for calculation of the linear interpolation. +//======================================================================= + +Standard_Boolean Geom2dConvert_ApproxArcsSegments::calculateLines + (Geom2dConvert_PPoint& theFirstParam, + Geom2dConvert_PPoint& theLastParam) +{ + Geom2dConvert_PPoint* aPrevParam = &theFirstParam; + for (int i = 1; i <= mySeqParams.Length(); i++) + { + Geom2dConvert_PPoint& aCurParam = mySeqParams.ChangeValue(i); + if (aCurParam.Parameter() < (*aPrevParam).Parameter()) { + continue; + } + if (aCurParam.Parameter() > theLastParam.Parameter()) { + break; + } + + // build line segment + if (aCurParam != *aPrevParam) + { + const Standard_Real aDistance = + (aCurParam.Point() - (*aPrevParam).Point()).Modulus(); + if (aDistance > myTolerance) + { + const Handle(Geom2d_Curve) aCurve = + makeLine(*aPrevParam, aCurParam, Standard_False); + if (aCurve.IsNull()) { + return Standard_False; + } + + mySeqCurves.Append(aCurve); + aPrevParam = &mySeqParams(i); + } + } + } + return Standard_True; +} + +//======================================================================= +//function : checkCurve +//purpose : method for checking max deflection Geom curve from Adaptor Curve +//======================================================================= + +Standard_Boolean Geom2dConvert_ApproxArcsSegments::checkCurve + (const Handle(Geom2d_Curve)& aCurve, + const Standard_Real theFirstParam, + const Standard_Real theLastParam) const +{ + if (aCurve.IsNull()) + return Standard_False; // check fails on empty input + Standard_Boolean isUniformDone = !mySeqParams.IsEmpty(); + //calcualtion sequence of the parameters or step by parameter. + Standard_Integer aNbPnts = (isUniformDone ? mySeqParams.Length() :MAXPOINTS); + Standard_Real aParamStep = (theLastParam - theFirstParam)/MAXPOINTS; + + Handle(Geom2d_Curve) aCurve1 = aCurve; + Handle(Geom2d_TrimmedCurve) aTrCurve = + Handle(Geom2d_TrimmedCurve)::DownCast(aCurve); + if (!aTrCurve.IsNull()) + aCurve1 = aTrCurve->BasisCurve(); + gp_Lin2d aLin2d; + gp_Circ2d aCirc2d; + Handle(Geom2d_Line) aGeomLine = Handle(Geom2d_Line)::DownCast(aCurve1); + Standard_Boolean isLine = (!aGeomLine.IsNull()); + Standard_Boolean isCircle = (!isLine); + if (isLine) + aLin2d = aGeomLine->Lin2d(); + + else { + Handle(Geom2d_Circle) aGeomCircle = + Handle(Geom2d_Circle)::DownCast(aCurve1); + isCircle = (!aGeomCircle.IsNull()); + if (isCircle) + aCirc2d = aGeomCircle->Circ2d(); + else + return Standard_False; + } + + //calculation of the max deflection points from CurveAdaptor from Geom curve. + Standard_Boolean isLess = Standard_True; + Standard_Integer i = 1; + for (; i <= aNbPnts && isLess; i++) + { + + Standard_Real aParam = (isUniformDone ? mySeqParams.Value(i).Parameter() : + (theFirstParam + i*aParamStep)); + if (aParam < (theFirstParam - Precision::PConfusion()) || + aParam > (theLastParam + Precision::PConfusion())) continue; + + //getting point from adaptor curve by specified parameter. + gp_Pnt2d aPointAdaptor(0., 0.); + gp_Pnt2d aProjPoint(0., 0.); + myCurve.D0(aParam, aPointAdaptor); + Standard_Real aParameterCurve = 0.0; + + //getting point from geom curve by specified parameter. + if (isLine) + { + aParameterCurve = ElCLib::Parameter(aLin2d, aPointAdaptor); + aProjPoint = ElCLib::Value(aParameterCurve, aLin2d); + } + else if (isCircle) + { + + aParameterCurve = ElCLib::Parameter(aCirc2d, aPointAdaptor); + aProjPoint = ElCLib::Value(aParameterCurve, aCirc2d); + } + else isLess = Standard_False; + + isLess = (aProjPoint.Distance(aPointAdaptor) < + myTolerance + Precision::PConfusion()); + } + return isLess; +} + +//======================================================================= +//function : checkContinuity +//purpose : check continuty first derivative between two curves. +//======================================================================= + +Standard_Boolean checkContinuity (const Handle(Geom2d_Curve)& theCurve1, + const Handle(Geom2d_Curve)& theCurve2, + const Standard_Real theAngleTol) +{ + gp_Vec2d v11,v21; + gp_Pnt2d p1, p2; + theCurve1->D1(theCurve1->LastParameter(), p1, v11); + theCurve2->D1(theCurve2->FirstParameter(), p2, v21); + + //check continuity with the specified tolerance. + return (v11.IsParallel(v21, theAngleTol)); +} + +//======================================================================= +//function : getParameter +//purpose : getting the nearest point on AdaptorCurve to the specified point. +//======================================================================= + +Geom2dConvert_PPoint getParameter (const gp_XY& theXY1, + const Standard_Real theFirstParam, + const Standard_Real theLastParam, + const Adaptor2d_Curve2d& theCurve) +{ + Geom2dConvert_PPoint aResult; + Standard_Real prevParam = theFirstParam; + Standard_Real af1 = theFirstParam; + Standard_Real af2 = theLastParam; + + // for finding nearest point use method half division. + Standard_Real aMinDist = RealLast(); + Standard_Integer i = 1; + for (; i <= MAXPOINTS; i++) + { + aResult = Geom2dConvert_PPoint(af1, theCurve); + Standard_Real adist1 = (theXY1 - aResult.Point()).Modulus(); + if (adist1 < Precision::Confusion()) + { + return aResult; + } + + aResult = Geom2dConvert_PPoint(af2, theCurve); + Standard_Real adist2 = (theXY1 - aResult.Point()).Modulus(); + if (adist2 < Precision::Confusion()) + { + return aResult; + } + + if (aMinDist <= adist2 -Precision::Confusion() && + aMinDist <= adist1 -Precision::Confusion()) + { + break; + } + + if (adist1 < adist2 -Precision::Confusion()) + { + prevParam = af1; + aMinDist = adist1; + af2 = (af1 + af2) * 0.5; + } + else + { + prevParam = af2; + aMinDist = adist2; + af1 = (af1 + af2) * 0.5; + } + } + aResult = Geom2dConvert_PPoint(prevParam, theCurve); + return aResult; +} + +//======================================================================= +//function : isInflectionPoint +//purpose : method calculating that point specified by parameter +// is inflection point +//======================================================================= + +Standard_Boolean isInflectionPoint (const Standard_Real theParam, + const Adaptor2d_Curve2d& theCurve) +{ + gp_Pnt2d aP1; + gp_Vec2d aD1, aD2; + theCurve.D2(theParam, aP1, aD1, aD2); + const Standard_Real aSqMod = aD1.XY().SquareModulus(); + const Standard_Real aCurvature = + fabs (aD1.XY() ^ aD2.XY()) / (aSqMod * sqrt(aSqMod)); + return (aCurvature < MyCurvatureTolerance); +} + +//======================================================================= +//function : isInflectionPoint +//purpose : method calculating that point specified by parameter +// is inflection point +//======================================================================= + +Standard_Boolean isInflectionPoint (const Standard_Real theParam, + const Geom2dConvert_PPoint& theFirstInfl, + const Adaptor2d_Curve2d& theCurve, + const Standard_Real theAngleTol) +{ + gp_Pnt2d aP1; + gp_Vec2d aD1, aD2; + theCurve.D2(theParam, aP1, aD1, aD2); + const Standard_Real aSqMod = aD1.XY().SquareModulus(); + const Standard_Real aCurvature = + fabs (aD1.XY() ^ aD2.XY()) / (aSqMod * sqrt(aSqMod)); + Standard_Real aContAngle = + fabs(gp_Vec2d(aP1.XY() - theFirstInfl.Point()).Angle(aD1)); + aContAngle = ::Min(aContAngle, fabs(M_PI - aContAngle)); + return (aCurvature < MyCurvatureTolerance && aContAngle < theAngleTol); +} diff --git a/src/Geom2dConvert/Geom2dConvert_ApproxArcsSegments.hxx b/src/Geom2dConvert/Geom2dConvert_ApproxArcsSegments.hxx new file mode 100644 index 0000000000..0bab7f5365 --- /dev/null +++ b/src/Geom2dConvert/Geom2dConvert_ApproxArcsSegments.hxx @@ -0,0 +1,113 @@ +// Created: 2009-01-20 +// +// Copyright (c) 2009-2013 OPEN CASCADE SAS +// +// This file is part of commercial software by OPEN CASCADE SAS, +// furnished in accordance with the terms and conditions of the contract +// and with the inclusion of this copyright notice. +// This file or any part thereof may not be provided or otherwise +// made available to any third party. +// +// No ownership title to the software is transferred hereby. +// +// OPEN CASCADE SAS makes no representation or warranties with respect to the +// performance of this software, and specifically disclaims any responsibility +// for any damages, special or consequential, connected with its use. + +#ifndef _Geom2dConvert_ApproxArcsSegments_HeaderFile +#define _Geom2dConvert_ApproxArcsSegments_HeaderFile + +#include +#include +#include +#include + +//! Approximation of a free-form curve by a sequence of arcs+segments. +class Geom2dConvert_ApproxArcsSegments +{ + public: + // ---------- PUBLIC METHODS ---------- + + enum Status { + StatusOK = 0, + StatusNotDone, + StatusError + }; + + //! Constructor. + Standard_EXPORT Geom2dConvert_ApproxArcsSegments (const Adaptor2d_Curve2d& theCurve, + const Standard_Real theTolerance, + const Standard_Real theAngleTol); + + //! Get the result curve after approximation. + const TColGeom2d_SequenceOfCurve& GetResult() const + { return mySeqCurves; } + +private: + + //! Create arc of circle by three points (knowing that myCurve is circle). + Handle(Geom2d_Curve) + makeCircle (const Geom2dConvert_PPoint& theFirst, + const Geom2dConvert_PPoint& theLast) const; + + //! Create an arc of circle using 2 points and a derivative in the first point. + Standard_Boolean makeArc (const Geom2dConvert_PPoint& theParam1, + Geom2dConvert_PPoint& theParam2, + const Standard_Boolean isFirst, + Handle(Geom2d_TrimmedCurve)& theCurve) const; + + //! Make a line from myCurve in the limits by parameter from theFirst to theLast + Handle(Geom2d_TrimmedCurve) + makeLine (Geom2dConvert_PPoint& theFirst, + Geom2dConvert_PPoint& theLast, + const Standard_Boolean isCheck) const; + + //! Create a sequence of elementary curves from a free-form adaptor curve. + Standard_Boolean makeFreeform (); + + //! Obtain the linear intervals on the curve using as criteria + //! curvature tolerance (indicating either linear part or inflection) + void getLinearParts (Geom2dConvert_SequenceOfPPoint& theSeqParam); + + //! Dichotomic search of the boundary of inflection interval, between + //! two parameters on the Curve + Geom2dConvert_PPoint findInflection(const Geom2dConvert_PPoint& theParamIsIn, + const Geom2dConvert_PPoint& theParamNoIn) const; + + //! Make approximation non-linear part of the other curve. + Standard_Boolean makeApproximation + (Geom2dConvert_PPoint& theFirstParam, + Geom2dConvert_PPoint& theLastParam); + + //! Method for calculation of a biarc. + Standard_Boolean calculateBiArcs(Geom2dConvert_PPoint& theFirstParam, + Geom2dConvert_PPoint& theLastParam); + + //! Method for calculation of a linear interpolation. + Standard_Boolean calculateLines(Geom2dConvert_PPoint& theFirstParam, + Geom2dConvert_PPoint& theLastParam); + + //! Checking max deflection Geom curve from Adaptor Curve + Standard_Boolean checkCurve (const Handle(Geom2d_Curve)& aCurve, + const Standard_Real theFirstParam, + const Standard_Real theLastParam) const; + + private: + // ---------- PRIVATE FIELDS ---------- + + const Adaptor2d_Curve2d& myCurve; + Geom2dConvert_PPoint myExt[2]; + + Handle(NCollection_BaseAllocator) myAlloc; + Standard_Real myTolerance; + Standard_Real myAngleTolerance; + + Geom2dConvert_SequenceOfPPoint mySeqParams; + TColGeom2d_SequenceOfCurve mySeqCurves; + Status myStatus; + + //! Protection against compiler warning + void operator= (const Geom2dConvert_ApproxArcsSegments&); +}; + +#endif diff --git a/src/Geom2dConvert/Geom2dConvert_PPoint.cxx b/src/Geom2dConvert/Geom2dConvert_PPoint.cxx new file mode 100644 index 0000000000..bf9264ffc8 --- /dev/null +++ b/src/Geom2dConvert/Geom2dConvert_PPoint.cxx @@ -0,0 +1,54 @@ +// Created: 2009-02-02 +// +// Copyright (c) 2009-2013 OPEN CASCADE SAS +// +// This file is part of commercial software by OPEN CASCADE SAS, +// furnished in accordance with the terms and conditions of the contract +// and with the inclusion of this copyright notice. +// This file or any part thereof may not be provided or otherwise +// made available to any third party. +// +// No ownership title to the software is transferred hereby. +// +// OPEN CASCADE SAS makes no representation or warranties with respect to the +// performance of this software, and specifically disclaims any responsibility +// for any damages, special or consequential, connected with its use. + +#include + +#include +#include + +//======================================================================= +//function : Geom2dConvert_PPoint +//purpose : Constructor +//======================================================================= + +Geom2dConvert_PPoint::Geom2dConvert_PPoint (const Standard_Real theParameter, + const Adaptor2d_Curve2d& theAdaptor) + : myParameter (theParameter) +{ + theAdaptor.D1(theParameter, myPoint, myD1); +} + +//======================================================================= +//function : Geom2dConvert_PPoint::operator == +//purpose : Compare two values of this type. +//======================================================================= + +Standard_Boolean Geom2dConvert_PPoint::operator == + (const Geom2dConvert_PPoint& theOther) const +{ + return (fabs(myParameter - theOther.Parameter()) <= Precision::PConfusion()); +} + +//======================================================================= +//function : Geom2dConvert_PPoint::operator != +//purpose : Compare two values of this type. +//======================================================================= + +Standard_Boolean Geom2dConvert_PPoint::operator != + (const Geom2dConvert_PPoint& theOther) const +{ + return (fabs(myParameter - theOther.Parameter()) > Precision::PConfusion()); +} diff --git a/src/Geom2dConvert/Geom2dConvert_PPoint.hxx b/src/Geom2dConvert/Geom2dConvert_PPoint.hxx new file mode 100644 index 0000000000..2e35fa6281 --- /dev/null +++ b/src/Geom2dConvert/Geom2dConvert_PPoint.hxx @@ -0,0 +1,76 @@ +// Created: 2009-01-21 +// +// Copyright (c) 2009-2013 OPEN CASCADE SAS +// +// This file is part of commercial software by OPEN CASCADE SAS, +// furnished in accordance with the terms and conditions of the contract +// and with the inclusion of this copyright notice. +// This file or any part thereof may not be provided or otherwise +// made available to any third party. +// +// No ownership title to the software is transferred hereby. +// +// OPEN CASCADE SAS makes no representation or warranties with respect to the +// performance of this software, and specifically disclaims any responsibility +// for any damages, special or consequential, connected with its use. + +#ifndef _Geom2dConvert_PPoint_HeaderFile +#define _Geom2dConvert_PPoint_HeaderFile + +#include +#include + +class Adaptor2d_Curve2d; + +//! Class representing a point on curve, with 2D coordinate and the tangent +class Geom2dConvert_PPoint +{ +public: + //! Empty constructor. + Standard_EXPORT inline Geom2dConvert_PPoint () + : myParameter (::RealLast()), + myPoint (0., 0.), + myD1 (0., 0.) {} + + //! Constructor. + Standard_EXPORT inline Geom2dConvert_PPoint (const Standard_Real theParameter, + const gp_XY& thePoint, + const gp_XY& theD1) + : myParameter (theParameter), + myPoint (thePoint), + myD1 (theD1) {} + + //! Constructor. + Standard_EXPORT Geom2dConvert_PPoint (const Standard_Real theParameter, + const Adaptor2d_Curve2d& theAdaptor); + + //! Compute the distance betwwen two 2d points. + inline Standard_Real Dist (const Geom2dConvert_PPoint& theOth) const + { return myPoint.Distance(theOth.myPoint); } + + //! Query the parmeter value. + inline Standard_Real Parameter () const { return myParameter; } + + //! Query the point location. + inline const gp_XY& Point () const { return myPoint.XY(); } + + //! Query the first derivatives. + inline const gp_XY& D1 () const { return myD1.XY(); } + + //! Change the value of the derivative at the point. + inline void SetD1 (const gp_XY& theD1) + { myD1.SetXY (theD1); } + + //! Compare two values of this type. + Standard_EXPORT Standard_Boolean operator == (const Geom2dConvert_PPoint&) const; + + //! Compare two values of this type. + Standard_EXPORT Standard_Boolean operator != (const Geom2dConvert_PPoint&) const; + +private: + Standard_Real myParameter; //! Parameter value + gp_Pnt2d myPoint; //! Point location + gp_Vec2d myD1; //! derivatives by parameter (components of the tangent). +}; + +#endif diff --git a/src/Geom2dConvert/Geom2dConvert_SequenceOfPPoint.hxx b/src/Geom2dConvert/Geom2dConvert_SequenceOfPPoint.hxx new file mode 100644 index 0000000000..e87f5c85ff --- /dev/null +++ b/src/Geom2dConvert/Geom2dConvert_SequenceOfPPoint.hxx @@ -0,0 +1,25 @@ +// Created: 2009-01-09 +// +// Copyright (c) 2009-2013 OPEN CASCADE SAS +// +// This file is part of commercial software by OPEN CASCADE SAS, +// furnished in accordance with the terms and conditions of the contract +// and with the inclusion of this copyright notice. +// This file or any part thereof may not be provided or otherwise +// made available to any third party. +// +// No ownership title to the software is transferred hereby. +// +// OPEN CASCADE SAS makes no representation or warranties with respect to the +// performance of this software, and specifically disclaims any responsibility +// for any damages, special or consequential, connected with its use. + +#ifndef _Geom2dConvert_SequenceOfPPoint_HeaderFile +#define _Geom2dConvert_SequenceOfPPoint_HeaderFile + +#include +class Geom2dConvert_PPoint; + +typedef NCollection_Sequence Geom2dConvert_SequenceOfPPoint; + +#endif diff --git a/tests/bugs/modalg_8/bug32214_1 b/tests/bugs/modalg_8/bug32214_1 new file mode 100644 index 0000000000..591f839d57 --- /dev/null +++ b/tests/bugs/modalg_8/bug32214_1 @@ -0,0 +1,23 @@ +puts "=========================================" +puts "OCC32214: 2d Offset produces wrong result" +puts "=========================================" +puts "" + +restore [locate_data_file bug32214.brep] a +wire ww a + +arclinconvert result ww +build3d result + +checkshape result + +checknbshapes result -t -vertex 50 -edge 49 -wire 1 + +set tolres [checkmaxtol result] + +if { ${tolres} > 1.001e-7} { + puts "Error: bad tolerance of result" +} + +checkprops result -l 1.88301 + diff --git a/tests/bugs/modalg_8/bug32214_2 b/tests/bugs/modalg_8/bug32214_2 new file mode 100644 index 0000000000..82c0fdd997 --- /dev/null +++ b/tests/bugs/modalg_8/bug32214_2 @@ -0,0 +1,24 @@ +puts "=========================================" +puts "OCC32214: 2d Offset produces wrong result" +puts "=========================================" +puts "" + +restore [locate_data_file bug31992.brep] a +wire a a +mkplane a a + +arclinconvert result a +build3d result + +checkshape result + +checknbshapes result -t -vertex 187 -edge 187 -wire 1 -face 1 + +set tolres [checkmaxtol result] + +if { ${tolres} > 1.001e-7} { + puts "Error: bad tolerance of result" +} + +checkprops result -s 3.13603 + diff --git a/tests/bugs/modalg_8/bug32214_3 b/tests/bugs/modalg_8/bug32214_3 new file mode 100644 index 0000000000..36d9848e48 --- /dev/null +++ b/tests/bugs/modalg_8/bug32214_3 @@ -0,0 +1,30 @@ +puts "=========================================" +puts "OCC32214: 2d Offset produces wrong result" +puts "=========================================" +puts "" + +beziercurve c1 9 3 3 0 10 0 10 0 100 -3 3 0 10 -10 0 0 100 -3 -3 0 10 0 -10 0 100 3 -3 0 10 10 0 0 100 3 3 0 10 +beziercurve c2 5 3 0 0 0 3 0 -3 0 0 0 -3 0 3 0 0 +mkedge e1 c1 +mkedge e2 c2 +wire w1 e1 +wire w2 e2 +orientation w2 R +mkplane a w1 +add w2 a + +arclinconvert result a +build3d result + +checkshape result + +checknbshapes result -t -vertex 170 -edge 170 -wire 2 -face 1 + +set tolres [checkmaxtol result] + +if { ${tolres} > 1.001e-7} { + puts "Error: bad tolerance of result" +} + +checkprops result -s 106.6 + diff --git a/tests/bugs/modalg_8/bug32214_4 b/tests/bugs/modalg_8/bug32214_4 new file mode 100644 index 0000000000..31d1217a40 --- /dev/null +++ b/tests/bugs/modalg_8/bug32214_4 @@ -0,0 +1,52 @@ +puts "=========================================" +puts "OCC32214: 2d Offset produces wrong result" +puts "=========================================" +puts "" + +restore [locate_data_file bug32214.brep] a +wire ww a +donly ww + +mkoffset result ww 14 0.1 -approx + +front +fit + +checkview -screenshot -2d -path ${imagedir}/${test_image}.png + +for {set i 1} {$i<=14} {incr i} { + checkshape result_${i} + set tolres [checkmaxtol result_${i}] + if { ${tolres} > 1.001e-7} { + puts "Error: bad tolerance of result" + } +} + +checknbshapes result_1 -t -vertex 114 -edge 114 -wire 1 +checkprops result_1 -l 4.39365 +checknbshapes result_2 -t -vertex 110 -edge 110 -wire 1 +checkprops result_2 -l 5.02084 +checknbshapes result_3 -t -vertex 104 -edge 104 -wire 1 +checkprops result_3 -l 5.64778 +checknbshapes result_4 -t -vertex 101 -edge 101 -wire 1 +checkprops result_4 -l 6.27443 +checknbshapes result_5 -t -vertex 95 -edge 95 -wire 1 +checkprops result_5 -l 6.89816 +checknbshapes result_6 -t -vertex 92 -edge 92 -wire 1 +checkprops result_6 -l 7.51255 +checknbshapes result_7 -t -vertex 88 -edge 88 -wire 1 +checkprops result_7 -l 8.12807 +checknbshapes result_8 -t -vertex 81 -edge 81 -wire 1 +checkprops result_8 -l 8.74586 +checknbshapes result_9 -t -vertex 72 -edge 72 -wire 1 +checkprops result_9 -l 9.36292 +checknbshapes result_10 -t -vertex 65 -edge 65 -wire 1 +checkprops result_10 -l 9.97455 +checknbshapes result_11 -t -vertex 60 -edge 60 -wire 1 +checkprops result_11 -l 10.5864 +checknbshapes result_12 -t -vertex 59 -edge 59 -wire 1 +checkprops result_12 -l 11.2017 +checknbshapes result_13 -t -vertex 57 -edge 57 -wire 1 +checkprops result_13 -l 11.8196 +checknbshapes result_14 -t -vertex 55 -edge 55 -wire 1 +checkprops result_14 -l 12.4395 diff --git a/tests/bugs/modalg_8/bug32214_5 b/tests/bugs/modalg_8/bug32214_5 new file mode 100644 index 0000000000..fa6eb5c7c6 --- /dev/null +++ b/tests/bugs/modalg_8/bug32214_5 @@ -0,0 +1,52 @@ +puts "=========================================" +puts "OCC32214: 2d Offset produces wrong result" +puts "=========================================" +puts "" + +restore [locate_data_file bug32214.brep] a +wire ww a +donly ww + +openoffset result ww 14 0.1 -approx + +front +fit + +checkview -screenshot -2d -path ${imagedir}/${test_image}.png + +for {set i 1} {$i<=14} {incr i} { + checkshape result_${i} + set tolres [checkmaxtol result_${i}] + if { ${tolres} > 1.001e-7} { + puts "Error: bad tolerance of result" + } +} + +checknbshapes result_1 -t -vertex 61 -edge 60 -wire 1 +checkprops result_1 -l 2.04858 +checknbshapes result_2 -t -vertex 61 -edge 60 -wire 1 +checkprops result_2 -l 2.21414 +checknbshapes result_3 -t -vertex 61 -edge 60 -wire 1 +checkprops result_3 -l 2.37971 +checknbshapes result_4 -t -vertex 61 -edge 60 -wire 1 +checkprops result_4 -l 2.54528 +checknbshapes result_5 -t -vertex 61 -edge 60 -wire 1 +checkprops result_5 -l 2.71084 +checknbshapes result_6 -t -vertex 61 -edge 60 -wire 1 +checkprops result_6 -l 2.87641 +checknbshapes result_7 -t -vertex 61 -edge 60 -wire 1 +checkprops result_7 -l 3.04198 +checknbshapes result_8 -t -vertex 56 -edge 55 -wire 1 +checkprops result_8 -l 3.20723 +checknbshapes result_9 -t -vertex 50 -edge 49 -wire 1 +checkprops result_9 -l 3.38587 +checknbshapes result_10 -t -vertex 48 -edge 47 -wire 1 +checkprops result_10 -l 3.58204 +checknbshapes result_11 -t -vertex 45 -edge 44 -wire 1 +checkprops result_11 -l 3.73715 +checknbshapes result_12 -t -vertex 45 -edge 44 -wire 1 +checkprops result_12 -l 3.97323 +checknbshapes result_13 -t -vertex 43 -edge 42 -wire 1 +checkprops result_13 -l 4.14242 +checknbshapes result_14 -t -vertex 43 -edge 42 -wire 1 +checkprops result_14 -l 4.37544 diff --git a/tests/bugs/modalg_8/bug32214_6 b/tests/bugs/modalg_8/bug32214_6 new file mode 100644 index 0000000000..732073bbef --- /dev/null +++ b/tests/bugs/modalg_8/bug32214_6 @@ -0,0 +1,52 @@ +puts "=========================================" +puts "OCC32214: 2d Offset produces wrong result" +puts "=========================================" +puts "" + +restore [locate_data_file bug32214.brep] a +wire ww a +donly ww + +openoffset result ww 14 -0.1 -approx + +front +fit + +checkview -screenshot -2d -path ${imagedir}/${test_image}.png + +for {set i 1} {$i<=14} {incr i} { + checkshape result_${i} + set tolres [checkmaxtol result_${i}] + if { ${tolres} > 1.001e-7} { + puts "Error: bad tolerance of result" + } +} + +checknbshapes result_1 -t -vertex 50 -edge 49 -wire 1 +checkprops result_1 -l 1.66475 +checknbshapes result_2 -t -vertex 46 -edge 45 -wire 1 +checkprops result_2 -l 1.57655 +checknbshapes result_3 -t -vertex 40 -edge 39 -wire 1 +checkprops result_3 -l 1.48755 +checknbshapes result_4 -t -vertex 37 -edge 36 -wire 1 +checkprops result_4 -l 1.39682 +checknbshapes result_5 -t -vertex 31 -edge 30 -wire 1 +checkprops result_5 -l 1.30715 +checknbshapes result_6 -t -vertex 28 -edge 27 -wire 1 +checkprops result_6 -l 1.27033 +checknbshapes result_7 -t -vertex 24 -edge 23 -wire 1 +checkprops result_7 -l 1.1996 +checknbshapes result_8 -t -vertex 22 -edge 21 -wire 1 +checkprops result_8 -l 1.1737 +checknbshapes result_9 -t -vertex 18 -edge 17 -wire 1 +checkprops result_9 -l 1.17713 +checknbshapes result_10 -t -vertex 17 -edge 16 -wire 1 +checkprops result_10 -l 1.22711 +checknbshapes result_11 -t -vertex 14 -edge 13 -wire 1 +checkprops result_11 -l 1.2663 +checknbshapes result_12 -t -vertex 14 -edge 13 -wire 1 +checkprops result_12 -l 1.33108 +checknbshapes result_13 -t -vertex 14 -edge 13 -wire 1 +checkprops result_13 -l 1.39586 +checknbshapes result_14 -t -vertex 14 -edge 13 -wire 1 +checkprops result_14 -l 1.46064 From e92d322d4090d9611930bf7cabcc74fa981432b0 Mon Sep 17 00:00:00 2001 From: ddzama Date: Wed, 4 May 2022 12:57:51 +0300 Subject: [PATCH 370/639] 0032921: Configuration, CMake - allow selecting C++ standard. Make C++ standard to be enable from cmake settings: User will be able choosing C++ language standard by selecting cmake variable BUILD_CPP_STANDARD. For correct working, CMAKE_CXX_STANDARD cmake built-in variable should be available. To enable CMAKE_CXX_STANDARD, minimum CMAKE version has been updated to 3.1. Available next standard items: C++11 C++14 C++17 C++20 C++23 This issue consists from several steps to achive main goal: 1) Configuratiuon, CMake - allow selecting C++ standard. 2) Require minimum CMAKE version 3.1 (for enabling CMAKE_CXX_STANDARD). 3) More flexible CMAKE_CXX_COMPILER_ID identification (fixups previous commit!) 4) Add description of new CMAKE variable `BUILD_CPP_STANDARD` into documentation. 5) Update CMAKE requirements in documentation. 6) Set C++11 standard for several projects. --- CMakeLists.txt | 22 ++++++++++++++++++- adm/cmake/cotire.cmake | 16 ++++++-------- adm/cmake/occt_defs_flags.cmake | 16 ++++---------- adm/cmake/occt_macros.cmake | 18 +++++---------- adm/cmake/occt_toolkit.cmake | 4 ++-- dox/build/build_occt/building_occt.md | 3 ++- dox/introduction/introduction.md | 2 +- samples/glfw/CMakeLists.txt | 1 - samples/glfw/adm/cmake/FindOpenCASCADE.cmake | 4 ++-- .../jniviewer/app/src/main/jni/CMakeLists.txt | 2 +- .../mfc/standard/01_Geometry/CMakeLists.txt | 8 ++++++- .../mfc/standard/02_Modeling/CMakeLists.txt | 8 ++++++- .../standard/03_ImportExport/CMakeLists.txt | 8 ++++++- samples/mfc/standard/04_HLR/CMakeLists.txt | 8 ++++++- samples/mfc/standard/mfcsample/CMakeLists.txt | 8 ++++++- samples/webgl/CMakeLists.txt | 1 - tools/CMakeLists.txt | 8 ++++++- tools/TInspectorEXE/CMakeLists.txt | 5 +++++ tools/TKDFBrowser/CMakeLists.txt | 5 +++++ tools/TKMessageModel/CMakeLists.txt | 5 +++++ tools/TKMessageView/CMakeLists.txt | 5 +++++ tools/TKShapeView/CMakeLists.txt | 5 +++++ tools/TKTInspector/CMakeLists.txt | 5 +++++ tools/TKTInspectorAPI/CMakeLists.txt | 6 ++++- tools/TKToolsDraw/CMakeLists.txt | 5 +++++ tools/TKTreeModel/CMakeLists.txt | 5 +++++ tools/TKVInspector/CMakeLists.txt | 5 +++++ tools/TKView/CMakeLists.txt | 5 +++++ 28 files changed, 143 insertions(+), 50 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index a131471a1f..fd17283f77 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required (VERSION 2.8.12 FATAL_ERROR) +cmake_minimum_required (VERSION 3.1 FATAL_ERROR) set (CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/adm/cmake") @@ -6,6 +6,26 @@ set (CMAKE_SUPPRESS_REGENERATION TRUE) set (CMAKE_CONFIGURATION_TYPES Release Debug RelWithDebInfo CACHE INTERNAL "" FORCE) +# set using C++ standard +set (BUILD_CPP_STANDARD "C++11" CACHE STRING "Select using c++ standard.") +set_property(CACHE BUILD_CPP_STANDARD PROPERTY STRINGS "C++11" "C++14" "C++17" "C++20" "C++23") + +# Set desired C++ standard +if ("${BUILD_CPP_STANDARD}" STREQUAL "C++11") + set (CMAKE_CXX_STANDARD 11) +elseif ("${BUILD_CPP_STANDARD}" STREQUAL "C++14") + set (CMAKE_CXX_STANDARD 14) +elseif ("${BUILD_CPP_STANDARD}" STREQUAL "C++17") + set (CMAKE_CXX_STANDARD 17) +elseif ("${BUILD_CPP_STANDARD}" STREQUAL "C++20") + set (CMAKE_CXX_STANDARD 20) +elseif ("${BUILD_CPP_STANDARD}" STREQUAL "C++23") + set (CMAKE_CXX_STANDARD 23) +else () + message (FATAL_ERROR, "misprint in c++ standard name") +endif() +set (CMAKE_CXX_STANDARD_REQUIRED ON) + # macro: include patched file if it exists macro (OCCT_INCLUDE_CMAKE_FILE BEING_INCLUDED_FILE) if (BUILD_PATCH AND EXISTS "${BUILD_PATCH}/${BEING_INCLUDED_FILE}.cmake") diff --git a/adm/cmake/cotire.cmake b/adm/cmake/cotire.cmake index a63f3ceaf3..b8b98a7119 100644 --- a/adm/cmake/cotire.cmake +++ b/adm/cmake/cotire.cmake @@ -32,15 +32,13 @@ if(__COTIRE_INCLUDED) endif() set(__COTIRE_INCLUDED TRUE) -# call cmake_minimum_required, but prevent modification of the CMake policy stack in include mode -# cmake_minimum_required also sets the policy version as a side effect, which we have to avoid -if (NOT CMAKE_SCRIPT_MODE_FILE) - cmake_policy(PUSH) -endif() -cmake_minimum_required(VERSION 2.8.12) -if (NOT CMAKE_SCRIPT_MODE_FILE) - cmake_policy(POP) -endif() +# Caution! Be careful, when increase minimal cmake version: +# using of newer version may leads (by default) to applying +# of some new policies. It may break compilation. +# For canceling of applying new policies use: +# cmake_policy(PUSH) before `cmake_minimum_required` +# and cmake_policy(POP) after. +cmake_minimum_required(VERSION 3.1 FATAL_ERROR) set (COTIRE_CMAKE_MODULE_FILE "${CMAKE_CURRENT_LIST_FILE}") set (COTIRE_CMAKE_MODULE_VERSION "1.7.9") diff --git a/adm/cmake/occt_defs_flags.cmake b/adm/cmake/occt_defs_flags.cmake index dc20cc283b..33b50e8ce7 100644 --- a/adm/cmake/occt_defs_flags.cmake +++ b/adm/cmake/occt_defs_flags.cmake @@ -116,9 +116,9 @@ if (MSVC) else() set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /W4") endif() -elseif (CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX OR "${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang") +elseif (CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX OR (CMAKE_CXX_COMPILER_ID MATCHES "[Cc][Ll][Aa][Nn][Gg]")) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra") - if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang") + if (CMAKE_CXX_COMPILER_ID MATCHES "[Cc][Ll][Aa][Nn][Gg]") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wshorten-64-to-32") endif() if (BUILD_SHARED_LIBS) @@ -130,14 +130,10 @@ elseif (CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX OR "${CMAKE_CXX_COMP endif() endif() -if ("x${CMAKE_CXX_COMPILER_ID}" STREQUAL "xClang") +if (CMAKE_CXX_COMPILER_ID MATCHES "[Cc][Ll][Aa][Nn][Gg]") if (APPLE) # CLang can be used with both libstdc++ and libc++, however on OS X libstdc++ is outdated. - set (CMAKE_CXX_FLAGS "-std=c++0x -stdlib=libc++ ${CMAKE_CXX_FLAGS}") - elseif(NOT WIN32) - # CLang for Windows (at least CLang 8.0 distributed with VS 2019) - # does not support option "-std=c++0x" - set (CMAKE_CXX_FLAGS "-std=c++0x ${CMAKE_CXX_FLAGS}") + set (CMAKE_CXX_FLAGS "-stdlib=libc++ ${CMAKE_CXX_FLAGS}") endif() # Optimize size of binaries set (CMAKE_SHARED_LINKER_FLAGS "-Wl,-s ${CMAKE_SHARED_LINKER_FLAGS}") @@ -148,14 +144,10 @@ elseif(MINGW) # workaround bugs in mingw with vtable export set (CMAKE_SHARED_LINKER_FLAGS "-Wl,--export-all-symbols") - # Require C++11 - set (CMAKE_CXX_FLAGS "-std=gnu++0x ${CMAKE_CXX_FLAGS}") # Optimize size of binaries set (CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -s") set (CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -s") elseif (DEFINED CMAKE_COMPILER_IS_GNUCXX) - # Require C++11 - set (CMAKE_CXX_FLAGS "-std=c++0x ${CMAKE_CXX_FLAGS}") # Optimize size of binaries set (CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -s") set (CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -s") diff --git a/adm/cmake/occt_macros.cmake b/adm/cmake/occt_macros.cmake index 0a38794527..4a060665f6 100644 --- a/adm/cmake/occt_macros.cmake +++ b/adm/cmake/occt_macros.cmake @@ -80,9 +80,9 @@ macro (OCCT_MAKE_COMPILER_SHORT_NAME) set (COMPILER gcc) elseif (DEFINED CMAKE_COMPILER_IS_GNUCXX) set (COMPILER gxx) - elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang") + elseif (CMAKE_CXX_COMPILER_ID MATCHES "[Cc][Ll][Aa][Nn][Gg]") set (COMPILER clang) - elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Intel") + elseif (CMAKE_CXX_COMPILER_ID MATCHES "[Ii][Nn][Tt][Ee][Ll]") set (COMPILER icc) else() set (COMPILER ${CMAKE_GENERATOR}) @@ -589,9 +589,7 @@ macro (OCCT_UPDATE_TARGET_FILE) endif() install (CODE - "cmake_policy(PUSH) - cmake_policy(SET CMP0007 NEW) - string (TOLOWER \"\${CMAKE_INSTALL_CONFIG_NAME}\" CMAKE_INSTALL_CONFIG_NAME_LOWERCASE) + "string (TOLOWER \"\${CMAKE_INSTALL_CONFIG_NAME}\" CMAKE_INSTALL_CONFIG_NAME_LOWERCASE) file (GLOB ALL_OCCT_TARGET_FILES \"${INSTALL_DIR}/${INSTALL_DIR_CMAKE}/OpenCASCADE*Targets-\${CMAKE_INSTALL_CONFIG_NAME_LOWERCASE}.cmake\") foreach(TARGET_FILENAME \${ALL_OCCT_TARGET_FILES}) file (STRINGS \"\${TARGET_FILENAME}\" TARGET_FILE_CONTENT) @@ -600,8 +598,7 @@ macro (OCCT_UPDATE_TARGET_FILE) string (REGEX REPLACE \"[\\\\]?[\\\$]{OCCT_INSTALL_BIN_LETTER}\" \"\${OCCT_INSTALL_BIN_LETTER}\" line \"\${line}\") file (APPEND \"\${TARGET_FILENAME}\" \"\${line}\\n\") endforeach() - endforeach() - cmake_policy(POP)") + endforeach()") endmacro() macro (OCCT_INSERT_CODE_FOR_TARGET) @@ -615,17 +612,14 @@ macro (OCCT_INSERT_CODE_FOR_TARGET) endmacro() macro (OCCT_UPDATE_DRAW_DEFAULT_FILE) - install(CODE "cmake_policy(PUSH) - cmake_policy(SET CMP0007 NEW) - set (DRAW_DEFAULT_FILE_NAME \"${INSTALL_DIR}/${INSTALL_DIR_RESOURCE}/DrawResources/DrawPlugin\") + install(CODE "set (DRAW_DEFAULT_FILE_NAME \"${INSTALL_DIR}/${INSTALL_DIR_RESOURCE}/DrawResources/DrawPlugin\") file (STRINGS \"\${DRAW_DEFAULT_FILE_NAME}\" DRAW_DEFAULT_CONTENT) file (REMOVE \"\${DRAW_DEFAULT_FILE_NAME}\") foreach (line IN LISTS DRAW_DEFAULT_CONTENT) string (REGEX MATCH \": TK\([a-zA-Z]+\)$\" IS_TK_LINE \"\${line}\") string (REGEX REPLACE \": TK\([a-zA-Z]+\)$\" \": TK\${CMAKE_MATCH_1}${BUILD_SHARED_LIBRARY_NAME_POSTFIX}\" line \"\${line}\") file (APPEND \"\${DRAW_DEFAULT_FILE_NAME}\" \"\${line}\\n\") - endforeach() - cmake_policy(POP)") + endforeach()") endmacro() macro (OCCT_CREATE_SYMLINK_TO_FILE LIBRARY_NAME LINK_NAME) diff --git a/adm/cmake/occt_toolkit.cmake b/adm/cmake/occt_toolkit.cmake index 8cbb8106e5..4ed3d4a66f 100644 --- a/adm/cmake/occt_toolkit.cmake +++ b/adm/cmake/occt_toolkit.cmake @@ -339,10 +339,10 @@ foreach (USED_ITEM ${USED_EXTERNLIB_AND_TOOLKITS}) else() # get CSF_ value set (CURRENT_CSF ${${USED_ITEM}}) if (NOT "x${CURRENT_CSF}" STREQUAL "x") - if ("${CURRENT_CSF}" STREQUAL "CSF_OpenGlLibs") + if ("${CURRENT_CSF}" STREQUAL "${CSF_OpenGlLibs}") add_definitions (-DHAVE_OPENGL) endif() - if ("${CURRENT_CSF}" STREQUAL "CSF_OpenGlesLibs") + if ("${CURRENT_CSF}" STREQUAL "${CSF_OpenGlesLibs}") add_definitions (-DHAVE_GLES2) endif() diff --git a/dox/build/build_occt/building_occt.md b/dox/build/build_occt/building_occt.md index 2e1c7ec18a..8180c85cb9 100644 --- a/dox/build/build_occt/building_occt.md +++ b/dox/build/build_occt/building_occt.md @@ -17,7 +17,7 @@ On Linux and macOS we recommend to use libraries maintained by distributive deve @section build_occt_win_cmake Building with CMake tool This chapter describes the [CMake](https://cmake.org/download/)-based build process, which is now suggested as a standard way to produce the binaries of Open CASCADE Technology from sources. -OCCT requires CMake version 2.8.12 or later. +OCCT requires CMake version 3.1 or later. CMake is a tool that generates the actual project files for the selected target build system (e.g. Unix makefiles) or IDE (e.g. Visual Studio 2010). Here we describe the build procedure on the example of Windows platform with Visual Studio 2010. @@ -113,6 +113,7 @@ The following table gives the full list of environment variables used at the con | BUILD_PATCH | Path | Points to the directory recognized as a "patch" for OCCT. If specified, the files from this directory take precedence over the corresponding native OCCT sources. This way you are able to introduce patches to Open CASCADE Technology not affecting the original source distribution | | BUILD_WITH_DEBUG | Boolean | Enables extended messages of many OCCT algorithms, usually printed to cout. These include messages on internal errors and special cases encountered, timing, etc. | | BUILD_ENABLE_FPE_SIGNAL_HANDLER | Boolean | Enable/Disable the floating point exceptions (FPE) during DRAW execution only. Corresponding environment variable (CSF_FPE) can be changed manually in custom.bat/sh scripts without regeneration by CMake. | +| BUILD_CPP_STANDARD | String | Employ corresponding c++ standard (C++11, C++14, ..C++23) for building OCCT | | CMAKE_CONFIGURATION_TYPES | String | Semicolon-separated CMake configurations | | INSTALL_DIR | Path | Points to the installation directory. *INSTALL_DIR* is a synonym of *CMAKE_INSTALL_PREFIX*. The user can specify both *INSTALL_DIR* or *CMAKE_INSTALL_PREFIX* | | INSTALL_DIR_BIN | Path | Relative path to the binaries installation directory (absolute path is ${INSTALL_DIR}/${INSTALL_DIR_BIN}) | diff --git a/dox/introduction/introduction.md b/dox/introduction/introduction.md index 0e18f48aa8..edfc7e9412 100644 --- a/dox/introduction/introduction.md +++ b/dox/introduction/introduction.md @@ -359,7 +359,7 @@ https://dev.opencascade.org/resources/download/3rd-party-components | Component | Where to find | Used for | Purpose | | --------- | ------------- | -------- | -------------------- | -| CMake 2.8+ | https://cmake.org/ | Configuration | Build from sources | +| CMake 3.1+ | https://cmake.org/ | Configuration | Build from sources | | Intel TBB 4.x or later | https://oneapi-src.github.io/oneTBB/ | All | Parallelization of algorithms (alternative to built-in thread pool) | | OpenGL 3.3+, OpenGL ES 2.0+ | System | Visualization | Required for using 3D Viewer | | OpenVR 1.10+ | https://github.com/ValveSoftware/openvr | Visualization | VR (Virtual Reality) support in 3D Viewer | diff --git a/samples/glfw/CMakeLists.txt b/samples/glfw/CMakeLists.txt index d40add62ce..c647b13519 100644 --- a/samples/glfw/CMakeLists.txt +++ b/samples/glfw/CMakeLists.txt @@ -4,7 +4,6 @@ project(glfw-occt-demo) set (CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/adm/cmake" ${CMAKE_MODULE_PATH}) -set(CMAKE_CXX_STANDARD 11) set(APP_VERSION_MAJOR 1) set(APP_VERSION_MINOR 0) set(APP_TARGET glfwocct) diff --git a/samples/glfw/adm/cmake/FindOpenCASCADE.cmake b/samples/glfw/adm/cmake/FindOpenCASCADE.cmake index 0b5a9eeeba..f079c15425 100644 --- a/samples/glfw/adm/cmake/FindOpenCASCADE.cmake +++ b/samples/glfw/adm/cmake/FindOpenCASCADE.cmake @@ -39,9 +39,9 @@ elseif (DEFINED CMAKE_COMPILER_IS_GNUCC) set (MY_COMPILER gcc) elseif (DEFINED CMAKE_COMPILER_IS_GNUCXX) set (MY_COMPILER gcc) -elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang") +elseif (CMAKE_CXX_COMPILER_ID MATCHES "[Cc][Ll][Aa][Nn][Gg]") set (MY_COMPILER clang) -elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Intel") +elseif (CMAKE_CXX_COMPILER_ID MATCHES "[Ii][Nn][Tt][Ee][Ll]") set (MY_COMPILER icc) else() set (MY_COMPILER ${CMAKE_GENERATOR}) diff --git a/samples/java/jniviewer/app/src/main/jni/CMakeLists.txt b/samples/java/jniviewer/app/src/main/jni/CMakeLists.txt index 59e131dfc0..e399de7601 100644 --- a/samples/java/jniviewer/app/src/main/jni/CMakeLists.txt +++ b/samples/java/jniviewer/app/src/main/jni/CMakeLists.txt @@ -37,7 +37,7 @@ list(APPEND aLibDeps lib_FreeType) # system libraries list(APPEND aLibDeps EGL GLESv2 log android) -set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -Wall -frtti -fexceptions -fpermissive") +set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -frtti -fexceptions -fpermissive") add_library(TKJniSample SHARED ${SOURCE_FILES}) target_link_libraries(TKJniSample ${aLibDeps}) diff --git a/samples/mfc/standard/01_Geometry/CMakeLists.txt b/samples/mfc/standard/01_Geometry/CMakeLists.txt index 62d612231f..0e4a25598e 100644 --- a/samples/mfc/standard/01_Geometry/CMakeLists.txt +++ b/samples/mfc/standard/01_Geometry/CMakeLists.txt @@ -1,4 +1,10 @@ -cmake_minimum_required (VERSION 2.6) +# Caution! Be careful, when increase minimal cmake version: +# using of newer version may leads (by default) to applying +# of some new policies. It may break compilation. +# For canceling of applying new policies use: +# cmake_policy(PUSH) before `cmake_minimum_required` +# and cmake_policy(POP) after. +cmake_minimum_required (VERSION 3.1 FATAL_ERROR) project (Geometry) diff --git a/samples/mfc/standard/02_Modeling/CMakeLists.txt b/samples/mfc/standard/02_Modeling/CMakeLists.txt index 6a690ba834..29b562d013 100644 --- a/samples/mfc/standard/02_Modeling/CMakeLists.txt +++ b/samples/mfc/standard/02_Modeling/CMakeLists.txt @@ -1,4 +1,10 @@ -cmake_minimum_required (VERSION 2.6) +# Caution! Be careful, when increase minimal cmake version: +# using of newer version may leads (by default) to applying +# of some new policies. It may break compilation. +# For canceling of applying new policies use: +# cmake_policy(PUSH) before `cmake_minimum_required` +# and cmake_policy(POP) after. +cmake_minimum_required (VERSION 3.1 FATAL_ERROR) project (Modeling) diff --git a/samples/mfc/standard/03_ImportExport/CMakeLists.txt b/samples/mfc/standard/03_ImportExport/CMakeLists.txt index 93f728e36c..c0e975516c 100644 --- a/samples/mfc/standard/03_ImportExport/CMakeLists.txt +++ b/samples/mfc/standard/03_ImportExport/CMakeLists.txt @@ -1,4 +1,10 @@ -cmake_minimum_required (VERSION 2.6) +# Caution! Be careful, when increase minimal cmake version: +# using of newer version may leads (by default) to applying +# of some new policies. It may break compilation. +# For canceling of applying new policies use: +# cmake_policy(PUSH) before `cmake_minimum_required` +# and cmake_policy(POP) after. +cmake_minimum_required (VERSION 3.1 FATAL_ERROR) project (ImportExport) diff --git a/samples/mfc/standard/04_HLR/CMakeLists.txt b/samples/mfc/standard/04_HLR/CMakeLists.txt index 68785a28cf..14c8cc3850 100644 --- a/samples/mfc/standard/04_HLR/CMakeLists.txt +++ b/samples/mfc/standard/04_HLR/CMakeLists.txt @@ -1,4 +1,10 @@ -cmake_minimum_required (VERSION 2.6) +# Caution! Be careful, when increase minimal cmake version: +# using of newer version may leads (by default) to applying +# of some new policies. It may break compilation. +# For canceling of applying new policies use: +# cmake_policy(PUSH) before `cmake_minimum_required` +# and cmake_policy(POP) after. +cmake_minimum_required (VERSION 3.1 FATAL_ERROR) project (HLR) diff --git a/samples/mfc/standard/mfcsample/CMakeLists.txt b/samples/mfc/standard/mfcsample/CMakeLists.txt index 8b759a89d8..55c6e49159 100644 --- a/samples/mfc/standard/mfcsample/CMakeLists.txt +++ b/samples/mfc/standard/mfcsample/CMakeLists.txt @@ -1,4 +1,10 @@ -cmake_minimum_required (VERSION 2.6) +# Caution! Be careful, when increase minimal cmake version: +# using of newer version may leads (by default) to applying +# of some new policies. It may break compilation. +# For canceling of applying new policies use: +# cmake_policy(PUSH) before `cmake_minimum_required` +# and cmake_policy(POP) after. +cmake_minimum_required (VERSION 3.1 FATAL_ERROR) project (mfcsample) diff --git a/samples/webgl/CMakeLists.txt b/samples/webgl/CMakeLists.txt index 5a2a323aa9..4991d154e4 100644 --- a/samples/webgl/CMakeLists.txt +++ b/samples/webgl/CMakeLists.txt @@ -2,7 +2,6 @@ cmake_minimum_required(VERSION 3.2) project(occt-webgl-sample) -set(CMAKE_CXX_STANDARD 11) set(APP_VERSION_MAJOR 1) set(APP_VERSION_MINOR 0) set(APP_TARGET occt-webgl-sample) diff --git a/tools/CMakeLists.txt b/tools/CMakeLists.txt index f73a2d824b..beb934f720 100644 --- a/tools/CMakeLists.txt +++ b/tools/CMakeLists.txt @@ -1,4 +1,10 @@ -cmake_minimum_required (VERSION 2.8.12 FATAL_ERROR) +# Caution! Be careful, when increase minimal cmake version: +# using of newer version may leads (by default) to applying +# of some new policies. It may break compilation. +# For canceling of applying new policies use: +# cmake_policy(PUSH) before `cmake_minimum_required` +# and cmake_policy(POP) after. +cmake_minimum_required (VERSION 3.1 FATAL_ERROR) set (ADDITIONAL_INLCUDE_DIR_DESCR "Additional directory to be added in the projects include section") if (NOT DEFINED ADDITIONAL_INLCUDE_DIR) diff --git a/tools/TInspectorEXE/CMakeLists.txt b/tools/TInspectorEXE/CMakeLists.txt index 3aa2537e2f..2ebcc6e40a 100644 --- a/tools/TInspectorEXE/CMakeLists.txt +++ b/tools/TInspectorEXE/CMakeLists.txt @@ -5,3 +5,8 @@ set (EXECUTABLE_PROJECT ON) OCCT_INCLUDE_CMAKE_FILE (adm/cmake/occt_toolkit) unset (EXECUTABLE_PROJECT) OCCT_INCLUDE_CMAKE_FILE (adm/cmake/occt_toolkit_prepare_tool) + +# This project depends from Qt. +# Qt 5.11.2 is incompatible with c++20. +# So, it should be compiled with c++11/c++14 language standard. +set_property(TARGET ${PROJECT_NAME} PROPERTY CXX_STANDARD 11) diff --git a/tools/TKDFBrowser/CMakeLists.txt b/tools/TKDFBrowser/CMakeLists.txt index 29b45e9843..a2a5445156 100644 --- a/tools/TKDFBrowser/CMakeLists.txt +++ b/tools/TKDFBrowser/CMakeLists.txt @@ -3,3 +3,8 @@ project(TKDFBrowser) OCCT_INCLUDE_CMAKE_FILE (adm/cmake/occt_toolkit_prepare_tool) OCCT_INCLUDE_CMAKE_FILE (adm/cmake/occt_toolkit) OCCT_INCLUDE_CMAKE_FILE (adm/cmake/occt_toolkit_prepare_tool) + +# This project depends from Qt. +# Qt 5.11.2 is incompatible with c++20. +# So, it should be compiled with c++11/c++14 language standard. +set_property(TARGET ${PROJECT_NAME} PROPERTY CXX_STANDARD 11) diff --git a/tools/TKMessageModel/CMakeLists.txt b/tools/TKMessageModel/CMakeLists.txt index 911ffb1fbe..a6ef727d9e 100644 --- a/tools/TKMessageModel/CMakeLists.txt +++ b/tools/TKMessageModel/CMakeLists.txt @@ -3,3 +3,8 @@ project(TKMessageModel) OCCT_INCLUDE_CMAKE_FILE (adm/cmake/occt_toolkit_prepare_tool) OCCT_INCLUDE_CMAKE_FILE (adm/cmake/occt_toolkit) OCCT_INCLUDE_CMAKE_FILE (adm/cmake/occt_toolkit_prepare_tool) + +# This project depends from Qt. +# Qt 5.11.2 is incompatible with c++20. +# So, it should be compiled with c++11/c++14 language standard. +set_property(TARGET ${PROJECT_NAME} PROPERTY CXX_STANDARD 11) diff --git a/tools/TKMessageView/CMakeLists.txt b/tools/TKMessageView/CMakeLists.txt index 9b3c1aaec7..ee948ecc72 100644 --- a/tools/TKMessageView/CMakeLists.txt +++ b/tools/TKMessageView/CMakeLists.txt @@ -3,3 +3,8 @@ project(TKMessageView) OCCT_INCLUDE_CMAKE_FILE (adm/cmake/occt_toolkit_prepare_tool) OCCT_INCLUDE_CMAKE_FILE (adm/cmake/occt_toolkit) OCCT_INCLUDE_CMAKE_FILE (adm/cmake/occt_toolkit_prepare_tool) + +# This project depends from Qt. +# Qt 5.11.2 is incompatible with c++20. +# So, it should be compiled with c++11/c++14 language standard. +set_property(TARGET ${PROJECT_NAME} PROPERTY CXX_STANDARD 11) diff --git a/tools/TKShapeView/CMakeLists.txt b/tools/TKShapeView/CMakeLists.txt index 928a72f1e8..c4dd2e935b 100644 --- a/tools/TKShapeView/CMakeLists.txt +++ b/tools/TKShapeView/CMakeLists.txt @@ -3,3 +3,8 @@ project(TKShapeView) OCCT_INCLUDE_CMAKE_FILE (adm/cmake/occt_toolkit_prepare_tool) OCCT_INCLUDE_CMAKE_FILE (adm/cmake/occt_toolkit) OCCT_INCLUDE_CMAKE_FILE (adm/cmake/occt_toolkit_prepare_tool) + +# This project depends from Qt. +# Qt 5.11.2 is incompatible with c++20. +# So, it should be compiled with c++11/c++14 language standard. +set_property(TARGET ${PROJECT_NAME} PROPERTY CXX_STANDARD 11) diff --git a/tools/TKTInspector/CMakeLists.txt b/tools/TKTInspector/CMakeLists.txt index 0a05b7ca15..23389b74cd 100644 --- a/tools/TKTInspector/CMakeLists.txt +++ b/tools/TKTInspector/CMakeLists.txt @@ -6,4 +6,9 @@ OCCT_INCLUDE_CMAKE_FILE (adm/cmake/occt_toolkit_prepare_tool) OCCT_INCLUDE_CMAKE_FILE (adm/cmake/occt_toolkit) OCCT_INCLUDE_CMAKE_FILE (adm/cmake/occt_toolkit_prepare_tool) +# This project depends from Qt. +# Qt 5.11.2 is incompatible with c++20. +# So, it should be compiled with c++11/c++14 language standard. +set_property(TARGET ${PROJECT_NAME} PROPERTY CXX_STANDARD 11) + unset (INSTALL_API) diff --git a/tools/TKTInspectorAPI/CMakeLists.txt b/tools/TKTInspectorAPI/CMakeLists.txt index d2f21e0f9b..06b3798301 100644 --- a/tools/TKTInspectorAPI/CMakeLists.txt +++ b/tools/TKTInspectorAPI/CMakeLists.txt @@ -6,5 +6,9 @@ OCCT_INCLUDE_CMAKE_FILE (adm/cmake/occt_toolkit_prepare_tool) OCCT_INCLUDE_CMAKE_FILE (adm/cmake/occt_toolkit) OCCT_INCLUDE_CMAKE_FILE (adm/cmake/occt_toolkit_prepare_tool) -UNSET (TOOL_API_LIBRARY) +# This project depends from Qt. +# Qt 5.11.2 is incompatible with c++20. +# So, it should be compiled with c++11/c++14 language standard. +set_property(TARGET ${PROJECT_NAME} PROPERTY CXX_STANDARD 11) +UNSET (TOOL_API_LIBRARY) diff --git a/tools/TKToolsDraw/CMakeLists.txt b/tools/TKToolsDraw/CMakeLists.txt index f57982cf05..d448d51881 100644 --- a/tools/TKToolsDraw/CMakeLists.txt +++ b/tools/TKToolsDraw/CMakeLists.txt @@ -3,3 +3,8 @@ project(TKToolsDraw) OCCT_INCLUDE_CMAKE_FILE (adm/cmake/occt_toolkit_prepare_tool) OCCT_INCLUDE_CMAKE_FILE (adm/cmake/occt_toolkit) OCCT_INCLUDE_CMAKE_FILE (adm/cmake/occt_toolkit_prepare_tool) + +# This project depends from Qt. +# Qt 5.11.2 is incompatible with c++20. +# So, it should be compiled with c++11/c++14 language standard. +set_property(TARGET ${PROJECT_NAME} PROPERTY CXX_STANDARD 11) diff --git a/tools/TKTreeModel/CMakeLists.txt b/tools/TKTreeModel/CMakeLists.txt index 99fc025494..0b2d9c65eb 100644 --- a/tools/TKTreeModel/CMakeLists.txt +++ b/tools/TKTreeModel/CMakeLists.txt @@ -3,3 +3,8 @@ project(TKTreeModel) OCCT_INCLUDE_CMAKE_FILE (adm/cmake/occt_toolkit_prepare_tool) OCCT_INCLUDE_CMAKE_FILE (adm/cmake/occt_toolkit) OCCT_INCLUDE_CMAKE_FILE (adm/cmake/occt_toolkit_prepare_tool) + +# This project depends from Qt. +# Qt 5.11.2 is incompatible with c++20. +# So, it should be compiled with c++11/c++14 language standard. +set_property(TARGET ${PROJECT_NAME} PROPERTY CXX_STANDARD 11) diff --git a/tools/TKVInspector/CMakeLists.txt b/tools/TKVInspector/CMakeLists.txt index 1a6de1456a..cbe9037f6d 100644 --- a/tools/TKVInspector/CMakeLists.txt +++ b/tools/TKVInspector/CMakeLists.txt @@ -3,3 +3,8 @@ project(TKVInspector) OCCT_INCLUDE_CMAKE_FILE (adm/cmake/occt_toolkit_prepare_tool) OCCT_INCLUDE_CMAKE_FILE (adm/cmake/occt_toolkit) OCCT_INCLUDE_CMAKE_FILE (adm/cmake/occt_toolkit_prepare_tool) + +# This project depends from Qt. +# Qt 5.11.2 is incompatible with c++20. +# So, it should be compiled with c++11/c++14 language standard. +set_property(TARGET ${PROJECT_NAME} PROPERTY CXX_STANDARD 11) diff --git a/tools/TKView/CMakeLists.txt b/tools/TKView/CMakeLists.txt index ed33343886..d630f5bbe3 100644 --- a/tools/TKView/CMakeLists.txt +++ b/tools/TKView/CMakeLists.txt @@ -3,3 +3,8 @@ project(TKView) OCCT_INCLUDE_CMAKE_FILE (adm/cmake/occt_toolkit_prepare_tool) OCCT_INCLUDE_CMAKE_FILE (adm/cmake/occt_toolkit) OCCT_INCLUDE_CMAKE_FILE (adm/cmake/occt_toolkit_prepare_tool) + +# This project depends from Qt. +# Qt 5.11.2 is incompatible with c++20. +# So, it should be compiled with c++11/c++14 language standard. +set_property(TARGET ${PROJECT_NAME} PROPERTY CXX_STANDARD 11) From 8da28014965697596aa3bde1c2827fe5c061468f Mon Sep 17 00:00:00 2001 From: atychini Date: Tue, 5 Jul 2022 18:39:08 +0300 Subject: [PATCH 371/639] 0033058: JT Import - perform XT translation in multiple threads Creating mutex for proper parallel processing. --- src/ShapeProcess/ShapeProcess_Context.cxx | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/ShapeProcess/ShapeProcess_Context.cxx b/src/ShapeProcess/ShapeProcess_Context.cxx index a010e8382b..7bce89474f 100644 --- a/src/ShapeProcess/ShapeProcess_Context.cxx +++ b/src/ShapeProcess/ShapeProcess_Context.cxx @@ -20,6 +20,7 @@ #include #include #include +#include #include #include #include @@ -27,6 +28,8 @@ #include IMPLEMENT_STANDARD_RTTIEXT(ShapeProcess_Context,Standard_Transient) +static Standard_Mutex THE_SHAPE_PROCESS_MUTEX; + //======================================================================= //function : ShapeProcess_Context //purpose : @@ -73,6 +76,9 @@ Standard_Boolean ShapeProcess_Context::Init (const Standard_CString file, Handle(Resource_Manager) ShapeProcess_Context::LoadResourceManager (const Standard_CString name) { + // Mutex is needed because we are initializing and changing static variables here, so + // without mutex it leads to race condition. + Standard_Mutex::Sentry aLock(&THE_SHAPE_PROCESS_MUTEX); // Optimisation of loading resource file: file is load only once // and reloaded only if file date has changed static Handle(Resource_Manager) sRC; @@ -127,7 +133,10 @@ Handle(Resource_Manager) ShapeProcess_Context::LoadResourceManager (const Standa sUMtime = aUMtime; } } - return sRC; + // Creating copy of sRC for thread safety of Resource_Manager variables + // We should return copy because calling of Resource_Manager::SetResource() for one object + // in multiple threads causes race condition + return new Resource_Manager(*sRC); } //======================================================================= From dfb5aebd3515fb8df568fecf292bb17131752f7a Mon Sep 17 00:00:00 2001 From: oan Date: Fri, 26 Aug 2022 18:54:33 +0300 Subject: [PATCH 372/639] 0032982: [Regression to 7.3.0] Mesh - Meshing the shape takes too long and visualization is bad New formula to calculate number of points along V axis of a cone depending on ratio of its size along V and U. --- src/BRepMesh/BRepMesh_ConeRangeSplitter.cxx | 9 ++++++--- tests/bugs/mesh/bug25042 | 2 +- tests/bugs/mesh/bug25287 | 2 +- tests/bugs/mesh/bug32692_1 | 2 +- tests/bugs/mesh/bug32767 | 2 +- tests/bugs/mesh/bug32982_1 | 19 +++++++++++++++++++ tests/bugs/mesh/bug32982_2 | 21 +++++++++++++++++++++ 7 files changed, 50 insertions(+), 7 deletions(-) create mode 100644 tests/bugs/mesh/bug32982_1 create mode 100644 tests/bugs/mesh/bug32982_2 diff --git a/src/BRepMesh/BRepMesh_ConeRangeSplitter.cxx b/src/BRepMesh/BRepMesh_ConeRangeSplitter.cxx index add0a50374..cc61eedb9d 100644 --- a/src/BRepMesh/BRepMesh_ConeRangeSplitter.cxx +++ b/src/BRepMesh/BRepMesh_ConeRangeSplitter.cxx @@ -41,10 +41,13 @@ std::pair BRepMesh_ConeRangeSplitter::GetSplitStep const Standard_Real aDiffU = aRangeU.second - aRangeU.first; const Standard_Real aDiffV = aRangeV.second - aRangeV.first; - Standard_Integer nbU = (Standard_Integer) (aDiffU / Du); - Standard_Integer nbV = (Standard_Integer) (nbU * (aDiffV) / (aDiffU * aRadius)); + const Standard_Real aScale = (Du * aRadius); + const Standard_Real aRatio = Max(1., Log(aDiffV / aScale)); + const Standard_Integer nbU = (Standard_Integer)(aDiffU / Du); + const Standard_Integer nbV = (Standard_Integer)(aDiffV / aScale / aRatio); + Du = aDiffU / (nbU + 1); - Dv = aDiffV / (nbV + 1); + Dv = aDiffV / (nbV + static_cast(aRatio)); theStepsNb.first = nbU; theStepsNb.second = nbV; diff --git a/tests/bugs/mesh/bug25042 b/tests/bugs/mesh/bug25042 index 8f53da4b87..cdee565d5a 100644 --- a/tests/bugs/mesh/bug25042 +++ b/tests/bugs/mesh/bug25042 @@ -14,7 +14,7 @@ vviewparams -scale 1.81755 -proj 0.88572 0.104526 0.452299 -up -0.0339444 0.9862 checkview -screenshot -3d -path ${imagedir}/${test_image}.png -checktrinfo result -tri 957 -nod 558 -defl 1.1088499641289298 -tol_abs_defl 1e-6 +checktrinfo result -tri 509 -nod 327 -defl 1.5916215272983552 -tol_abs_defl 1e-6 set log [tricheck result] if { [llength $log] != 0 } { diff --git a/tests/bugs/mesh/bug25287 b/tests/bugs/mesh/bug25287 index 5b51eeeb95..80336f81b3 100644 --- a/tests/bugs/mesh/bug25287 +++ b/tests/bugs/mesh/bug25287 @@ -11,7 +11,7 @@ renamevar a_1 result incmesh result 0.0001 -a 30 -force_face_def -parallel -checktrinfo result -tri 13854 -nod 9190 -defl 0.00028360162213471898 -tol_abs_defl 1e-6 +checktrinfo result -tri 12512 -nod 8519 -defl 0.00031502118964205414 -tol_abs_defl 1e-6 vinit vsetdispmode 1 diff --git a/tests/bugs/mesh/bug32692_1 b/tests/bugs/mesh/bug32692_1 index db139cb93d..5a85bff3db 100644 --- a/tests/bugs/mesh/bug32692_1 +++ b/tests/bugs/mesh/bug32692_1 @@ -8,4 +8,4 @@ puts "REQUIRED ALL: Meshing statuses: SelfIntersectingWire Failure" restore [locate_data_file bug32692.brep] s incmesh s 0.01 -parallel -checktrinfo s -nod 7511 -tri 7625 -empty 9 -face 309 +checktrinfo s -nod 7427 -tri 7457 -empty 9 -face 309 diff --git a/tests/bugs/mesh/bug32767 b/tests/bugs/mesh/bug32767 index b5e472cfe6..d336f9c9d5 100644 --- a/tests/bugs/mesh/bug32767 +++ b/tests/bugs/mesh/bug32767 @@ -6,4 +6,4 @@ puts "" restore [locate_data_file bug32767.brep] s tclean s incmesh s 0.01 -checktrinfo s -tri 3220 -nod 1770 -defl 0.018398669654253779 -tol_abs_defl 1e-6 \ No newline at end of file +checktrinfo s -tri 1512 -nod 909 -defl 0.035378595363471328 -tol_abs_defl 1e-6 \ No newline at end of file diff --git a/tests/bugs/mesh/bug32982_1 b/tests/bugs/mesh/bug32982_1 new file mode 100644 index 0000000000..e4640ef7bc --- /dev/null +++ b/tests/bugs/mesh/bug32982_1 @@ -0,0 +1,19 @@ +puts "=========" +puts "OCC32982: Mesh - Meshing the shape takes too long and visualization is bad" +puts "=========" +puts "" + +restore [locate_data_file bug32982.brep] result +incmesh result 5.58 + +checktrinfo result -nod 4036 -tri 7450 + +vinit +vdefaults -autoTriang 0 +vdisplay result +vsetdispmode 1 +vfit +vpan -5 198 +vzoom 150 + +checkview -screenshot -3d -path ${imagedir}/${test_image}.png diff --git a/tests/bugs/mesh/bug32982_2 b/tests/bugs/mesh/bug32982_2 new file mode 100644 index 0000000000..1cf708972c --- /dev/null +++ b/tests/bugs/mesh/bug32982_2 @@ -0,0 +1,21 @@ +puts "=========" +puts "OCC32982: Mesh - Meshing the shape takes too long and visualization is bad" +puts "=========" +puts "" + +restore [locate_data_file bug32982.brep] result + +tscale result 9.7978019714355504 25.567642604431001 42.7875250671255 0.001 +incmesh result 0.00558 + +checktrinfo result -nod 4036 -tri 7450 + +vinit +vdefaults -autoTriang 0 +vdisplay result +vsetdispmode 1 +vfit +vpan -5 198 +vzoom 150 + +checkview -screenshot -3d -path ${imagedir}/${test_image}.png From 2949b238c1afc43e3cd3347b25d7ba59bfcc3369 Mon Sep 17 00:00:00 2001 From: ddzama Date: Fri, 9 Sep 2022 09:29:27 +0300 Subject: [PATCH 373/639] 0033137: Updating minimal supported Microsoft Visual Studio version up to 2015 (VC140). Microsoft Visual C++ compiler of version 2015 or higher should used to compile OCCT and Products on Windows. --- dox/introduction/introduction.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dox/introduction/introduction.md b/dox/introduction/introduction.md index edfc7e9412..866ef18100 100644 --- a/dox/introduction/introduction.md +++ b/dox/introduction/introduction.md @@ -341,7 +341,7 @@ The tables below describe the recommended software configurations for which OCCT | OS | Compiler | | --------- | ----------- | -| Windows | Microsoft Visual Studio: 2013 Update 5, 2015 Update 3, 2017 1, 2019, 2022
    , LLVM (ClangCL), GCC 4.3+ (Mingw-w64)| +| Windows | Microsoft Visual Studio: 2015 Update 3, 2017 1, 2019, 2022
    , LLVM (ClangCL), GCC 4.3+ (Mingw-w64)| | Linux | GNU gcc 4.3+
    LLVM CLang 3.6+ | | OS X / macOS | XCode 6 or newer | | Android | NDK r12, GNU gcc 4.9 or newer | From 526c506cb0a6a5c9c168ab5efd0a4e5211e30bf4 Mon Sep 17 00:00:00 2001 From: ifv Date: Thu, 8 Sep 2022 14:08:00 +0300 Subject: [PATCH 374/639] 0032859: Modeling Algorithms - BRepLib_FindSurface not return an expect plane BRepLib/BRepLib_FindSurface.cxx = removing very small values from coordinate of normal bug32859 - test case added --- src/BRepLib/BRepLib_FindSurface.cxx | 9 ++++++++- tests/bugs/modalg_8/bug32859 | 21 +++++++++++++++++++++ 2 files changed, 29 insertions(+), 1 deletion(-) create mode 100644 tests/bugs/modalg_8/bug32859 diff --git a/src/BRepLib/BRepLib_FindSurface.cxx b/src/BRepLib/BRepLib_FindSurface.cxx index 15ae27de86..029abf4df3 100644 --- a/src/BRepLib/BRepLib_FindSurface.cxx +++ b/src/BRepLib/BRepLib_FindSurface.cxx @@ -506,7 +506,14 @@ void BRepLib_FindSurface::Init(const TopoDS_Shape& S, if (!isSolved) return; - + //Removing very small values + Standard_Real aMaxV = Max(Abs(aVec(1)), Max(Abs(aVec(2)), Abs(aVec(3)))); + Standard_Real eps = Epsilon(aMaxV); + for (i = 1; i <= 3; ++i) + { + if (Abs(aVec(i)) <= eps) + aVec(i) = 0.; + } gp_Vec aN (aVec (1), aVec (2), aVec (3)); Handle(Geom_Plane) aPlane = new Geom_Plane (aBaryCenter, aN); myTolReached = Controle (aPoints, aPlane); diff --git a/tests/bugs/modalg_8/bug32859 b/tests/bugs/modalg_8/bug32859 new file mode 100644 index 0000000000..b0f435e82c --- /dev/null +++ b/tests/bugs/modalg_8/bug32859 @@ -0,0 +1,21 @@ +puts "=============================================================================================" +puts "0032859: Modeling Algorithms - BRepLib_FindSurface not return an expect plane" +puts "=============================================================================================" +puts "" + +vertex v1 -500 25 -6 +vertex v2 -450 -25 -6 +vertex v3 450 -25 -6 +vertex v4 500 25 -6 +edge e1 v1 v2 +edge e2 v2 v3 +edge e3 v3 v4 +edge e4 v4 v1 + +wire w e1 e2 e3 e4 +mkplane p w +mksurface s p +set log [eval dump s] +if {[regexp "Axis :0, 0, 1" ${log}] != 1} { + puts "Error: BRepLib_FindSurface algorithm does not return valid result" +} \ No newline at end of file From d6baf70a93a9adaa249cc7f7d2111a3bbb65e03a Mon Sep 17 00:00:00 2001 From: ddzama Date: Mon, 29 Aug 2022 17:27:16 +0300 Subject: [PATCH 375/639] 0032960: Wrong result of BRepExtrema_DistShapeShape after translation. Add corresponding test. --- tests/bugs/fclasses/bug32960 | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 tests/bugs/fclasses/bug32960 diff --git a/tests/bugs/fclasses/bug32960 b/tests/bugs/fclasses/bug32960 new file mode 100644 index 0000000000..380c6546a4 --- /dev/null +++ b/tests/bugs/fclasses/bug32960 @@ -0,0 +1,16 @@ +puts "========" +puts "OCC32960: Wrong result of BRepExtrema_DistShapeShape after translation" +puts "========" +# Correct distance is 1.0 + +restore [locate_data_file bug32960.brep] aShape +explode aShape +set anInfo [distmini d aShape_1 aShape_2] + +# Check extrema distance +set absTol 1.0e-7 +set relTol 1.0e-7 +set aDist_Exp 1.0 +set aDist [dval d_val] +checkreal "Distance value check" $aDist $aDist_Exp $absTol $relTol + From 03b0ca59cb9e0769bbfab4e9aa4aab1427221642 Mon Sep 17 00:00:00 2001 From: kgv Date: Tue, 13 Sep 2022 14:31:47 +0300 Subject: [PATCH 376/639] 0033142: Configuration, genproj - ExpToCasExe building fails with generated VS projects Generate executable single MSVC project per-Unit instead of per-source file. --- adm/genproj.tcl | 171 +++++++++++++++++++++++------------------------- 1 file changed, 81 insertions(+), 90 deletions(-) diff --git a/adm/genproj.tcl b/adm/genproj.tcl index 90ab8d16ae..feba01e567 100644 --- a/adm/genproj.tcl +++ b/adm/genproj.tcl @@ -1233,28 +1233,11 @@ proc osutils:convertModules { theModules theSrcDir theSourceDirOther theProjects lappend aProjectsInModule($aModule) $aToolKit lappend aDependencies [LibToLink $aToolKit $theSrcDir $theSourceDirOther] } - # executables, assume one project per cxx file... + # executables foreach aUnit [OS:executable ${aModule}] { - set aUnitLoc $aUnit - set src_files [_get_used_files $aUnit $theSrcDir false] - set aSrcFiles {} - foreach s $src_files { - regexp {source ([^\s]+)} $s dummy name - lappend aSrcFiles $name - } - foreach aSrcFile $aSrcFiles { - set aFileExtension [file extension $aSrcFile] - if { $aFileExtension == ".cxx" } { - set aPrjName [file rootname $aSrcFile] - lappend aProjects $aPrjName - lappend aProjectsInModule($aModule) $aPrjName - if {[file isdirectory $path/$theSrcDir/$aUnitLoc]} { - lappend aDependencies [LibToLinkX $aUnitLoc [file rootname $aSrcFile] $theSrcDir $theSourceDirOther] - } else { - lappend aDependencies {} - } - } - } + lappend aProjects $aUnit + lappend aProjectsInModule($aModule) $aUnit + lappend aDependencies [LibToLink $aUnit $theSrcDir $theSourceDirOther] } } } @@ -2110,98 +2093,106 @@ proc osutils:tk:execfiles { theFiles theOutDir theCommand thePrefix theExtension # Generate Visual Studio project file for executable proc osutils:vcprojx { theVcVer isUWP theOutDir theToolKit theGuidsMap theSrcDir theSourceDirOther } { set aVcFiles {} - foreach f [osutils:tk:cxxfiles $theToolKit wnt $theSrcDir] { - set aProjTmpl [osutils:vcproj:readtemplate $theVcVer $isUWP 1] - - set aProjName [file rootname [file tail $f]] - set l_compilable [osutils:compilable wnt] - regsub -all -- {__XQTNAM__} $aProjTmpl $aProjName aProjTmpl + set aProjTmpl [osutils:vcproj:readtemplate $theVcVer $isUWP 1] - upvar $theGuidsMap aGuidsMap - if { ! [info exists aGuidsMap($aProjName)] } { - set aGuidsMap($aProjName) [OS:genGUID] - } - regsub -all -- {__PROJECT_GUID__} $aProjTmpl $aGuidsMap($aProjName) aProjTmpl + set aProjName $theToolKit + set l_compilable [osutils:compilable wnt] + regsub -all -- {__XQTNAM__} $aProjTmpl $aProjName aProjTmpl - set aUsedLibs [list] - foreach tkx [osutils:commonUsedTK $theToolKit $theSrcDir $theSourceDirOther] { - lappend aUsedLibs "${tkx}.lib" - } + upvar $theGuidsMap aGuidsMap + if { ! [info exists aGuidsMap($aProjName)] } { + set aGuidsMap($aProjName) [OS:genGUID] + } + regsub -all -- {__PROJECT_GUID__} $aProjTmpl $aGuidsMap($aProjName) aProjTmpl - set anOsReleaseLibs {} - set anOsDebugLibs {} - osutils:usedOsLibs $theToolKit "wnt" anOsReleaseLibs aFrameworks $theSrcDir true - osutils:usedOsLibs $theToolKit "wnt" anOsDebugLibs aFrameworks $theSrcDir false + set aUsedLibs [list] + foreach tkx [osutils:commonUsedTK $theToolKit $theSrcDir $theSourceDirOther] { + lappend aUsedLibs "${tkx}.lib" + } - set aVCRTVer [string range $theVcVer 0 3] - regsub -all -- {__TKDEP__} $aProjTmpl [osutils:depLibraries $aUsedLibs $anOsReleaseLibs $theVcVer] aProjTmpl - regsub -all -- {__TKDEP_DEBUG__} $aProjTmpl [osutils:depLibraries $aUsedLibs $anOsDebugLibs $theVcVer] aProjTmpl - regsub -all -- {__TKDEFINES__} $aProjTmpl "" aProjTmpl + set anOsReleaseLibs {} + set anOsDebugLibs {} + osutils:usedOsLibs $theToolKit "wnt" anOsReleaseLibs aFrameworks $theSrcDir true + osutils:usedOsLibs $theToolKit "wnt" anOsDebugLibs aFrameworks $theSrcDir false - set aFilesSection "" - set aVcFilesCxx(units) "" - set aVcFilesHxx(units) "" + set aVCRTVer [string range $theVcVer 0 3] + regsub -all -- {__TKDEP__} $aProjTmpl [osutils:depLibraries $aUsedLibs $anOsReleaseLibs $theVcVer] aProjTmpl + regsub -all -- {__TKDEP_DEBUG__} $aProjTmpl [osutils:depLibraries $aUsedLibs $anOsDebugLibs $theVcVer] aProjTmpl + regsub -all -- {__TKDEFINES__} $aProjTmpl "" aProjTmpl - if { ![info exists written([file tail $f])] } { - set written([file tail $f]) 1 + set aFilesSection "" + set aVcFilesCxx(units) "" + set aVcFilesHxx(units) "" - if { "$theVcVer" != "vc7" && "$theVcVer" != "vc8" && "$theVcVer" != "vc9" } { + if { "$theVcVer" != "vc7" && "$theVcVer" != "vc8" && "$theVcVer" != "vc9" } { + foreach f [osutils:tk:cxxfiles $theToolKit wnt $theSrcDir] { + if { ![info exists written([file tail $f])] } { + set written([file tail $f]) 1 append aFilesSection [osutils:vcxproj:cxxfile $f "" 3] if { ! [info exists aVcFilesCxx($theToolKit)] } { lappend aVcFilesCxx(units) $theToolKit } lappend aVcFilesCxx($theToolKit) $f } else { - append aFilesSection "\t\t\t\n" + puts "Warning : in vcproj there are more than one occurrences for [file tail $f]" + } + } + } else { + append aFilesSection "\t\t\t\n" + foreach f [osutils:tk:cxxfiles $theToolKit wnt $theSrcDir] { + if { ![info exists written([file tail $f])] } { + set written([file tail $f]) 1 append aFilesSection [osutils:vcproj:file $theVcVer $f ""] - append aFilesSection "\t\t\t" + } else { + puts "Warning : in vcproj there are more than one occurrences for [file tail $f]" } - } else { - puts "Warning : in vcproj there are more than one occurrences for [file tail $f]" } - #puts "$aProjTmpl $aFilesSection" - set anIncPaths "..\\..\\..\\inc" - regsub -all -- {__TKINC__} $aProjTmpl $anIncPaths aProjTmpl - regsub -all -- {__FILES__} $aProjTmpl $aFilesSection aProjTmpl - regsub -all -- {__CONF__} $aProjTmpl Application aProjTmpl + append aFilesSection "\t\t\t" + } - regsub -all -- {__XQTEXT__} $aProjTmpl "exe" aProjTmpl + #puts "$aProjTmpl $aFilesSection" + set anIncPaths "..\\..\\..\\inc" + regsub -all -- {__TKINC__} $aProjTmpl $anIncPaths aProjTmpl + regsub -all -- {__FILES__} $aProjTmpl $aFilesSection aProjTmpl + regsub -all -- {__CONF__} $aProjTmpl Application aProjTmpl - set aFile [open [set aVcFilePath [file join $theOutDir ${aProjName}.[osutils:vcproj:ext $theVcVer]]] w] - fconfigure $aFile -translation crlf - puts $aFile $aProjTmpl - close $aFile + regsub -all -- {__XQTEXT__} $aProjTmpl "exe" aProjTmpl + + set aFile [open [set aVcFilePath [file join $theOutDir ${aProjName}.[osutils:vcproj:ext $theVcVer]]] w] + fconfigure $aFile -translation crlf + puts $aFile $aProjTmpl + close $aFile - set aCommonSettingsFile "$aVcFilePath.user" - lappend aVcFiles $aVcFilePath + set aCommonSettingsFile "$aVcFilePath.user" + lappend aVcFiles $aVcFilePath - # write filters file for vc10 - if { "$theVcVer" != "vc7" && "$theVcVer" != "vc8" && "$theVcVer" != "vc9" } { - lappend aVcFiles [osutils:vcxproj:filters $theOutDir $aProjName aVcFilesCxx aVcFilesHxx] - } + # write filters file for vc10 + if { "$theVcVer" != "vc7" && "$theVcVer" != "vc8" && "$theVcVer" != "vc9" } { + lappend aVcFiles [osutils:vcxproj:filters $theOutDir $aProjName aVcFilesCxx aVcFilesHxx] + } - # write resource file - lappend aVcFiles [osutils:readtemplate:rc $theOutDir $aProjName] + # write resource file + lappend aVcFiles [osutils:readtemplate:rc $theOutDir $aProjName] - set aCommonSettingsFileTmpl "" - if { "$theVcVer" == "vc7" || "$theVcVer" == "vc8" } { - # nothing - } elseif { "$theVcVer" == "vc9" } { - set aCommonSettingsFileTmpl [wokUtils:FILES:FileToString "$::THE_CASROOT/adm/templates/vcproj.user.vc9x"] - } else { - set aCommonSettingsFileTmpl [wokUtils:FILES:FileToString "$::THE_CASROOT/adm/templates/vcxproj.user.vc10x"] - } - if { "$aCommonSettingsFileTmpl" != "" } { - regsub -all -- {__VCVER__} $aCommonSettingsFileTmpl $aVCRTVer aCommonSettingsFileTmpl + set aCommonSettingsFileTmpl "" + if { "$theVcVer" == "vc7" || "$theVcVer" == "vc8" } { + # nothing + } elseif { "$theVcVer" == "vc9" } { + set aCommonSettingsFileTmpl [wokUtils:FILES:FileToString "$::THE_CASROOT/adm/templates/vcproj.user.vc9x"] + } else { + set aCommonSettingsFileTmpl [wokUtils:FILES:FileToString "$::THE_CASROOT/adm/templates/vcxproj.user.vc10x"] + } + if { "$aCommonSettingsFileTmpl" != "" } { + regsub -all -- {__VCVER__} $aCommonSettingsFileTmpl $aVCRTVer aCommonSettingsFileTmpl - set aFile [open [set aVcFilePath "$aCommonSettingsFile"] w] - fconfigure $aFile -translation crlf - puts $aFile $aCommonSettingsFileTmpl - close $aFile + set aFile [open [set aVcFilePath "$aCommonSettingsFile"] w] + fconfigure $aFile -translation crlf + puts $aFile $aCommonSettingsFileTmpl + close $aFile - lappend aVcFiles "$aCommonSettingsFile" - } + lappend aVcFiles "$aCommonSettingsFile" } + return $aVcFiles } From 78aade75692bf11cd7cf06d74e4b5a5a367a7012 Mon Sep 17 00:00:00 2001 From: knosulko Date: Fri, 5 Aug 2022 12:44:29 +0300 Subject: [PATCH 377/639] 0033017: Implement an algorithm to find a proximity between a pair of shapes Extend "proximity" command to be able to compute the proximity value; Implement classes for calculate proximity value between two shapes; Add possibility to set up the number of sample points for the input shapes; Add tests lowalgos/proximity. --- dox/upgrade/upgrade.md | 5 + .../BRepExtrema_ProximityDistTool.cxx | 460 ++++++++++++++++++ .../BRepExtrema_ProximityDistTool.hxx | 200 ++++++++ .../BRepExtrema_ProximityValueTool.cxx | 161 ++++++ .../BRepExtrema_ProximityValueTool.hxx | 126 +++++ .../BRepExtrema_SelfIntersection.hxx | 4 +- .../BRepExtrema_ShapeProximity.cxx | 87 +++- .../BRepExtrema_ShapeProximity.hxx | 109 ++++- src/BRepExtrema/BRepExtrema_TriangleSet.cxx | 205 ++++++-- src/BRepExtrema/BRepExtrema_TriangleSet.hxx | 53 +- src/BRepExtrema/FILES | 4 + src/BRepTest/BRepTest_ExtremaCommands.cxx | 104 +++- src/BVH/BVH_Tools.hxx | 142 ++++-- tests/lowalgos/grids.list | 1 + tests/lowalgos/proximity/A1 | 24 + tests/lowalgos/proximity/A2 | 26 + tests/lowalgos/proximity/A3 | 28 ++ tests/lowalgos/proximity/A4 | 26 + tests/lowalgos/proximity/A5 | 31 ++ tests/lowalgos/proximity/B1 | 28 ++ tests/lowalgos/proximity/B2 | 28 ++ tests/lowalgos/proximity/B3 | 28 ++ tests/lowalgos/proximity/B4 | 28 ++ tests/lowalgos/proximity/B5 | 27 + tests/lowalgos/proximity/B6 | 27 + tests/lowalgos/proximity/C1 | 29 ++ tests/lowalgos/proximity/C2 | 29 ++ tests/lowalgos/proximity/C3 | 28 ++ tests/lowalgos/proximity/C4 | 28 ++ tests/lowalgos/proximity/D1 | 28 ++ tests/lowalgos/proximity/D2 | 26 + tests/lowalgos/proximity/D3 | 33 ++ tests/lowalgos/proximity/E1 | 30 ++ tests/lowalgos/proximity/E2 | 27 + tests/lowalgos/proximity/end | 19 + 35 files changed, 2098 insertions(+), 141 deletions(-) create mode 100644 src/BRepExtrema/BRepExtrema_ProximityDistTool.cxx create mode 100644 src/BRepExtrema/BRepExtrema_ProximityDistTool.hxx create mode 100644 src/BRepExtrema/BRepExtrema_ProximityValueTool.cxx create mode 100644 src/BRepExtrema/BRepExtrema_ProximityValueTool.hxx create mode 100644 tests/lowalgos/proximity/A1 create mode 100644 tests/lowalgos/proximity/A2 create mode 100644 tests/lowalgos/proximity/A3 create mode 100644 tests/lowalgos/proximity/A4 create mode 100644 tests/lowalgos/proximity/A5 create mode 100644 tests/lowalgos/proximity/B1 create mode 100644 tests/lowalgos/proximity/B2 create mode 100644 tests/lowalgos/proximity/B3 create mode 100644 tests/lowalgos/proximity/B4 create mode 100644 tests/lowalgos/proximity/B5 create mode 100644 tests/lowalgos/proximity/B6 create mode 100644 tests/lowalgos/proximity/C1 create mode 100644 tests/lowalgos/proximity/C2 create mode 100644 tests/lowalgos/proximity/C3 create mode 100644 tests/lowalgos/proximity/C4 create mode 100644 tests/lowalgos/proximity/D1 create mode 100644 tests/lowalgos/proximity/D2 create mode 100644 tests/lowalgos/proximity/D3 create mode 100644 tests/lowalgos/proximity/E1 create mode 100644 tests/lowalgos/proximity/E2 create mode 100644 tests/lowalgos/proximity/end diff --git a/dox/upgrade/upgrade.md b/dox/upgrade/upgrade.md index 329bbacb9f..7bf9c8d2dd 100644 --- a/dox/upgrade/upgrade.md +++ b/dox/upgrade/upgrade.md @@ -2338,3 +2338,8 @@ or to include system OpenGL headers in advance (with help of `OpenGl_GlNative.hx Method `StdPrs_ToolTriangulatedShape::Normal()` has been removed. Please use `BRepLib_ToolTriangulatedShape::ComputeNormals()` to fill in normal attributes in triangulation and fetch them directly using `Poly_Triangulation::Normal()`. + +@subsection upgrade_occt770_shapeproximity BRepExtrema_ShapeProximity + +A new way of using the `BRepExtrema_ShapeProximity` class was provided for computing a proximity value between two shapes. +If at initialization of the `BRepExtrema_ShapeProximity` class the *theTolerance* parameter is not defined (Precision::Infinite() by default), the proximity value will be computed. diff --git a/src/BRepExtrema/BRepExtrema_ProximityDistTool.cxx b/src/BRepExtrema/BRepExtrema_ProximityDistTool.cxx new file mode 100644 index 0000000000..cd51510d76 --- /dev/null +++ b/src/BRepExtrema/BRepExtrema_ProximityDistTool.cxx @@ -0,0 +1,460 @@ +// Created on: 2022-08-08 +// Created by: Kseniya NOSULKO +// Copyright (c) 2022 OPEN CASCADE SAS +// +// This file is part of Open CASCADE Technology software library. +// +// This library is free software; you can redistribute it and/or modify it under +// the terms of the GNU Lesser General Public License version 2.1 as published +// by the Free Software Foundation, with special exception defined in the file +// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT +// distribution for complete text of the license and disclaimer of any warranty. +// +// Alternatively, this file may be used under the terms of Open CASCADE +// commercial license or contractual agreement. + +#include + +#include +#include +#include +#include +#include +#include +#include + +//======================================================================= +//function : BRepExtrema_ProximityDistTool +//purpose : Creates new unitialized tool +//======================================================================= +BRepExtrema_ProximityDistTool::BRepExtrema_ProximityDistTool() +: myMinDistance (std::numeric_limits::max()), + myProxDist (-1.), + myPntStatus1 (ProxPnt_Status_UNKNOWN), + myPntStatus2 (ProxPnt_Status_UNKNOWN), + myNbSamples1 (0), + myProxVtxIdx1 (-1) +{ +} + +//======================================================================= +//function : BRepExtrema_ProximityDistTool +//purpose : Creates new tool for the given element sets +//======================================================================= +BRepExtrema_ProximityDistTool::BRepExtrema_ProximityDistTool (const Handle(BRepExtrema_TriangleSet)& theSet1, + const Standard_Integer theNbSamples1, + const Handle(BRepExtrema_TriangleSet)& theSet2, + const BRepExtrema_ShapeList& theShapeList1, + const BRepExtrema_ShapeList& theShapeList2) +: myMinDistance (std::numeric_limits::max()), + myProxDist (-1.), + myPntStatus1 (ProxPnt_Status_UNKNOWN), + myPntStatus2 (ProxPnt_Status_UNKNOWN), + myNbSamples1 (theNbSamples1), + myProxVtxIdx1 (-1) +{ + LoadTriangleSets (theSet1, theSet2); + LoadShapeLists (theShapeList1, theShapeList2); +} + +//======================================================================= +//function : LoadTriangleSets +//purpose : Loads the given element sets into the tool +//======================================================================= +void BRepExtrema_ProximityDistTool::LoadTriangleSets (const Handle(BRepExtrema_TriangleSet)& theSet1, + const Handle(BRepExtrema_TriangleSet)& theSet2) +{ + mySet1 = theSet1; + mySet2 = theSet2; +} + +//======================================================================= +//function : LoadTriangleSets +//purpose : Loads the given list of subshapes into the proximity tool +//======================================================================= +void BRepExtrema_ProximityDistTool::LoadShapeLists (const BRepExtrema_ShapeList& theShapeList1, + const BRepExtrema_ShapeList& theShapeList2) +{ + myShapeList1 = theShapeList1; + myShapeList2 = theShapeList2; +} +//======================================================================= +//function : Perform +//purpose : Performs searching of the proximity distance +//======================================================================= +void BRepExtrema_ProximityDistTool::Perform() +{ + SetBVHSet (mySet2.get()); + + const BVH_Array3d& aVertices1 = mySet1->GetVertices(); + Standard_Integer aVtxSize = (Standard_Integer)aVertices1.size(); + Standard_Integer aVtxStep = Max (myNbSamples1 <= 0 ? 1 : aVtxSize / myNbSamples1, 1); + for (Standard_Integer aVtxIdx = 0; aVtxIdx < aVtxSize; aVtxIdx += aVtxStep) + { + myDistance = std::numeric_limits::max(); + myMinDistance = std::numeric_limits::max(); + myIsDone = Standard_False; + SetObject (aVertices1[aVtxIdx]); + + ComputeDistance(); + + if (!IsDone() && myProxDist < 0.) return; + + if (IsDone() && myDistance > myProxDist) + { + myPnt1 = aVertices1[aVtxIdx]; + myPnt2 = myExtremaPoint; + myProxDist = myDistance; + myProxVtxIdx1 = aVtxIdx; + myProxPrjState = myExtPrjState; + } + } + + myIsDone = myProxDist > -1.; + + if (myIsDone) + { + DefineStatusProxPnt(); + } +} + +static Standard_Real pointBoxSquareMaxDistance (const BVH_Vec3d& thePoint, + const BVH_Vec3d& theCMin, + const BVH_Vec3d& theCMax) +{ + Standard_Real aDist = 0; + for (int i = 0; i < 3; ++i) + { + if (thePoint[i] <= 0.5 * (theCMax[i] + theCMin[i])) { Standard_Real d = theCMax[i] - thePoint[i]; d *= d; aDist += d; } + else { Standard_Real d = thePoint[i] - theCMin[i]; d *= d; aDist += d; } + } + return aDist; +} + +//======================================================================= +//function : Branch rejection +//purpose : Defines the rules for node rejection by bounding box +//======================================================================= +Standard_Boolean BRepExtrema_ProximityDistTool::RejectNode (const BVH_Vec3d& theCornerMin, + const BVH_Vec3d& theCornerMax, + Standard_Real& theMetric) const +{ + theMetric = sqrt (BVH_Tools::PointBoxSquareDistance (myObject, + theCornerMin, + theCornerMax)); + + Standard_Real aMaxMetric = sqrt (pointBoxSquareMaxDistance (myObject, + theCornerMin, + theCornerMax)); + + return theMetric > myDistance || aMaxMetric < myProxDist; +} + +//======================================================================= +//function : Leaf acceptance +//purpose : Defines the rules for leaf acceptance +//======================================================================= +Standard_Boolean BRepExtrema_ProximityDistTool::Accept (const Standard_Integer theTrgIdx, + const Standard_Real&) +{ + BVH_Vec3d aTrgVert1; + BVH_Vec3d aTrgVert2; + BVH_Vec3d aTrgVert3; + + BVH_PrjState aBVH_PrjState; + Standard_Integer aNumberOfFirstNode = -1; + Standard_Integer aNumberOfLastNode = -1; + + mySet2->GetVertices (theTrgIdx, aTrgVert1, aTrgVert2, aTrgVert3); + + BVH_Vec3d aNearestPnt = BVH_Tools::PointTriangleProjection (myObject, + aTrgVert1, aTrgVert2, aTrgVert3, + &aBVH_PrjState, + &aNumberOfFirstNode, &aNumberOfLastNode); + + PrjState aPrjState (theTrgIdx, aBVH_PrjState, aNumberOfFirstNode, aNumberOfLastNode); + BVH_Vec3d aDirect = myObject - aNearestPnt; + Standard_Real aSqDistance = aDirect.Dot(aDirect); + + if (aSqDistance > Precision::SquareConfusion()) // point belongs to triangle + { + const BVH_Vec3d aAB = aTrgVert2 - aTrgVert1; + + BVH_Vec3d aNorm; + if (aTrgVert2.IsEqual (aTrgVert3)) // is this degenerate triangle (= segment) + { + const BVH_Vec3d aAP = myObject - aTrgVert1; + aNorm = BVH_Vec3d::Cross (BVH_Vec3d::Cross (aAP, aAB), aAB); + } + else + { + const BVH_Vec3d aAC = aTrgVert3 - aTrgVert1; + aNorm = BVH_Vec3d::Cross (aAB, aAC); + } + + Standard_Real aNormSqLen = aNorm.Dot (aNorm); + + // check if the distance is under perpendicular + const BVH_Vec3d aCrossCross = BVH_Vec3d::Cross (aDirect, aNorm); + Standard_Real aCrossCrossSqLen = aCrossCross.Dot (aCrossCross); + if (aCrossCrossSqLen > Precision::SquareConfusion() * aSqDistance * aNormSqLen) + { + // the distance is not under perpendicular + if (myMinDistance - sqrt (aSqDistance) > Precision::Confusion()) + { + myMinDistance = sqrt (aSqDistance); + myMinDistPoint = aNearestPnt; + myMinPrjState = aPrjState; + } + + return Standard_False; + } + } + + // the distance is under perpendicular + if (myDistance - sqrt (aSqDistance) > Precision::Confusion()) + { + myDistance = sqrt (aSqDistance); + myExtremaPoint = aNearestPnt; + myExtPrjState = aPrjState; + + return Standard_True; + } + + return Standard_False; +} + +//======================================================================= +//function : ComputeDistance +//purpose : Computes the distance between object and BVH tree +//======================================================================= +Standard_Real BRepExtrema_ProximityDistTool::ComputeDistance() +{ + myIsDone = this->Select() > 0; + + if (!myIsDone) + { + if (myMinDistance < std::numeric_limits::max()) + { + myExtremaPoint = myMinDistPoint; + myExtPrjState = myMinPrjState; + myIsDone = true; + } + + myDistance = myMinDistance; + } + + return myDistance; +} + +static Standard_Boolean isNodeOnBorder (const Standard_Integer theNodeIdx, const Handle (Poly_Triangulation)& theTr) +{ + Poly_Connect aPolyConnect (theTr); + + Standard_Integer aContTrg; //index of triangle containing exploring node + for (aPolyConnect.Initialize (theNodeIdx); aPolyConnect.More(); aPolyConnect.Next()) + { + aContTrg = aPolyConnect.Value(); + + Standard_Integer aContTrgNodes[3]; + theTr->Triangle (aContTrg).Get (aContTrgNodes[0], aContTrgNodes[1], aContTrgNodes[2]); //indices of nodes of the triangle + + Standard_Integer aAdjTrg[3]; + aPolyConnect.Triangles (aContTrg, aAdjTrg[0], aAdjTrg[1], aAdjTrg[2]); //indices of adjacent triangles + + for (Standard_Integer j = 0; j < 3; j++) + { + Standard_Integer k = (j + 1) % 3; + if (aAdjTrg[j] == 0) //free segment of triangle + { + //aContTrgNodes[j], aContTrgNodes[k] are ends of free segment and it is a part of border + if (aContTrgNodes[j] == theNodeIdx || aContTrgNodes[k] == theNodeIdx) + { + return Standard_True; + } + } + } + } + + return Standard_False; +} + +//======================================================================= +//function : defineStatusProxPnt1 +//purpose : Defines the status of proximity point from 1st BVH +//======================================================================= +void BRepExtrema_ProximityDistTool::defineStatusProxPnt1() +{ + Standard_Integer aFaceID1 = mySet1->GetShapeIDOfVtx (myProxVtxIdx1); + + if (myShapeList1 (aFaceID1).ShapeType() == TopAbs_EDGE) + { + const BVH_Array3d& aVertices1 = mySet1->GetVertices(); + Standard_Integer aVtxSize = (Standard_Integer)aVertices1.size(); + Standard_Integer aLastIdx = aVtxSize - 1; + + if ((aVertices1[0] - aVertices1[aLastIdx]).Modulus() < Precision::Confusion()) // if closed + { + myPntStatus1 = ProxPnt_Status_MIDDLE; + return; + } + + if (myProxVtxIdx1 == 0 || myProxVtxIdx1 == aLastIdx) + { + myPntStatus1 = ProxPnt_Status_BORDER; + } + else + { + myPntStatus1 = ProxPnt_Status_MIDDLE; + } + } + else if (myShapeList1 (aFaceID1).ShapeType() == TopAbs_FACE) + { + Standard_Integer aNodeIdx = mySet1->GetVtxIdxInShape (myProxVtxIdx1) + 1; + + TopLoc_Location aLocation; + const TopoDS_Face& aF = TopoDS::Face (myShapeList1 (aFaceID1)); + Handle (Poly_Triangulation) aTr = BRep_Tool::Triangulation (aF, aLocation); + + if (isNodeOnBorder (aNodeIdx, aTr)) + { + myPntStatus1 = ProxPnt_Status_BORDER; + } + else + { + myPntStatus1 = ProxPnt_Status_MIDDLE; + } + } +} + +//======================================================================= +//function : defineStatusProxPnt2 +//purpose : Defines the status of proximity point from 2nd BVH +//======================================================================= +void BRepExtrema_ProximityDistTool::defineStatusProxPnt2() +{ + Standard_Integer aTrgIdx = myProxPrjState.GetTrgIdx(); + Standard_Integer aFaceID2 = mySet2->GetFaceID (aTrgIdx); + + if (myShapeList2 (aFaceID2).ShapeType() == TopAbs_EDGE) + { + if (myProxPrjState.GetPrjState() == BVH_PrjState::BVH_PrjStateInTriangle_INNER) + { + return; + } + else + { + const BVH_Array3d& aVertices2 = mySet2->GetVertices(); + Standard_Integer aVtxSize = (Standard_Integer)aVertices2.size(); + Standard_Integer aLastIdx = aVtxSize - 1; + + if ((aVertices2[0] - aVertices2[aLastIdx]).Modulus() < Precision::Confusion()) // if closed + { + myPntStatus2 = ProxPnt_Status_MIDDLE; + return; + } + + NCollection_Array1 aVtxIndicesOfTrg; + mySet2->GetVtxIndices (aTrgIdx, aVtxIndicesOfTrg); + + Standard_Integer aFirstNodeNum = myProxPrjState.GetNumberOfFirstNode(); + Standard_Integer aFirstVtxIdx = aVtxIndicesOfTrg[aFirstNodeNum]; + + if (myProxPrjState.GetPrjState() == BVH_PrjState::BVH_PrjStateInTriangle_VERTEX) + { + if (aFirstVtxIdx == 0 || aFirstVtxIdx == aLastIdx) + { + myPntStatus2 = ProxPnt_Status_BORDER; + } + else + { + myPntStatus2 = ProxPnt_Status_MIDDLE; + } + } + else if (myProxPrjState.GetPrjState() == BVH_PrjState::BVH_PrjStateInTriangle_EDGE) + { + Standard_Integer aLastNodeNum = myProxPrjState.GetNumberOfLastNode(); + Standard_Integer aLastVtxIdx = aVtxIndicesOfTrg[aLastNodeNum]; + + // it could be border only in case projection is on a degenerated edge + if (aFirstVtxIdx == aLastVtxIdx && (aFirstVtxIdx == 0 || aFirstVtxIdx == aLastIdx)) + { + myPntStatus2 = ProxPnt_Status_BORDER; + } + else + { + myPntStatus2 = ProxPnt_Status_MIDDLE; + } + } + } + } + else if (myShapeList2 (aFaceID2).ShapeType() == TopAbs_FACE) + { + if (myProxPrjState.GetPrjState() == BVH_PrjState::BVH_PrjStateInTriangle_INNER) + { + myPntStatus2 = ProxPnt_Status_MIDDLE; + } + else + { + TopLoc_Location aLocation; + const TopoDS_Face& aF = TopoDS::Face (myShapeList2 (aFaceID2)); + Handle (Poly_Triangulation) aTr = BRep_Tool::Triangulation (aF, aLocation); + + NCollection_Array1 aVtxIndicesOfTrg; + mySet2->GetVtxIndices (aTrgIdx, aVtxIndicesOfTrg); + + if (myProxPrjState.GetPrjState() == BVH_PrjState::BVH_PrjStateInTriangle_VERTEX) + { + Standard_Integer aNodeNum = myProxPrjState.GetNumberOfFirstNode(); + Standard_Integer aNodeIdx = mySet2->GetVtxIdxInShape (aVtxIndicesOfTrg[aNodeNum]) + 1; + + if (isNodeOnBorder (aNodeIdx, aTr)) + { + myPntStatus2 = ProxPnt_Status_BORDER; + } + else + { + myPntStatus2 = ProxPnt_Status_MIDDLE; + } + } + else if (myProxPrjState.GetPrjState() == BVH_PrjState::BVH_PrjStateInTriangle_EDGE) + { + myPntStatus2 = ProxPnt_Status_MIDDLE; + + Poly_Connect aPolyConnect (aTr); + Standard_Integer aTrgIdxInShape = mySet2->GetTrgIdxInShape (aTrgIdx) + 1; + + Standard_Integer aAdjTrg[3]; + aPolyConnect.Triangles (aTrgIdxInShape, aAdjTrg[0], aAdjTrg[1], aAdjTrg[2]); //indices of adjacent triangles + + for (Standard_Integer j = 0; j < 3; j++) + { + Standard_Integer k = (j + 1) % 3; + if (aAdjTrg[j] == 0) //free segment of triangle + { + //aVtxIndicesOfTrg[j] and aVtxIndicesOfTrg[k] are ends of free segment and it is a part of border + if (j == myProxPrjState.GetNumberOfFirstNode() && + k == myProxPrjState.GetNumberOfLastNode()) + { + myPntStatus2 = ProxPnt_Status_BORDER; + break; + } + } + } + } //else if (myProxPrjState.GetPrjState() == BVH_PrjState::BVH_PrjStateInTriangle_EDGE) + } + } //else if (myShapeList1 (aFaceID1).ShapeType() == TopAbs_FACE) +} + +//======================================================================= +//function : DefineStatusProxPnt +//purpose : Defines the status of proximity points +//======================================================================= +void BRepExtrema_ProximityDistTool::DefineStatusProxPnt() +{ + // define the status of proximity point from 1st BVH + defineStatusProxPnt1(); + + // define the status of proximity point from 2nd BVH + defineStatusProxPnt2(); +} diff --git a/src/BRepExtrema/BRepExtrema_ProximityDistTool.hxx b/src/BRepExtrema/BRepExtrema_ProximityDistTool.hxx new file mode 100644 index 0000000000..3739fff1ad --- /dev/null +++ b/src/BRepExtrema/BRepExtrema_ProximityDistTool.hxx @@ -0,0 +1,200 @@ +// Created on: 2022-08-08 +// Created by: Kseniya NOSULKO +// Copyright (c) 2022 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 _BRepExtrema_ProximityDistTool_HeaderFile +#define _BRepExtrema_ProximityDistTool_HeaderFile + +#include +#include +#include +#include +#include + +//! Tool class for computation the proximity distance from first +//! primitive set to second one that is the maximal from minimum +//! perpendicular distances. If no perpendicular distance is found, the +//! minimum distance will be returned. +//! This tool is not intended to be used independently, and is integrated +//! in other classes, implementing algorithms based on shape tessellation +//! (BRepExtrema_ProximityValueTool). +//! +//! Please note that algorithm results are approximate and depend greatly +//! on the quality of input tessellation(s). +class BRepExtrema_ProximityDistTool : public BVH_Distance +{ +public: + + typedef typename BVH_Tools::BVH_PrjStateInTriangle BVH_PrjState; + + enum ProxPnt_Status + { + ProxPnt_Status_BORDER, + ProxPnt_Status_MIDDLE, + ProxPnt_Status_UNKNOWN + }; + +public: + + //! Struct with information about projection point state from 2nd BVH, + //! providing proximity point of 2nd shape + struct PrjState + { + PrjState() + : myTrgIdx (0), + myPrjState (BVH_PrjState::BVH_PrjStateInTriangle_INNER), + myNumberOfFirstNode (0), + myNumberOfLastNode (0) + {} + + PrjState (const Standard_Integer theTrgIdx, + const BVH_PrjState thePrjState, + const Standard_Integer theNumberOfFirstNode, + const Standard_Integer theNumberOfLastNode) + : myTrgIdx (theTrgIdx), + myPrjState (thePrjState), + myNumberOfFirstNode (theNumberOfFirstNode), + myNumberOfLastNode (theNumberOfLastNode) + {} + + Standard_Integer GetTrgIdx() const { return myTrgIdx; } + + BVH_PrjState GetPrjState() const { return myPrjState; } + + Standard_Integer GetNumberOfFirstNode() const { return myNumberOfFirstNode; } + + Standard_Integer GetNumberOfLastNode() const { return myNumberOfLastNode; } + + private: + + Standard_Integer myTrgIdx; //!< Index of triangle on which the projection is located + BVH_PrjState myPrjState; //!< Position of a projection on the triangle (vertex, edge, inner) + Standard_Integer myNumberOfFirstNode; //!< The 1st vtx of the triangle edge on which the projection is located + Standard_Integer myNumberOfLastNode; //!< The 2nd vtx of the triangle edge on which the projection is located + }; + +public: + + //! Creates new unitialized tool. + Standard_EXPORT BRepExtrema_ProximityDistTool(); + + //! Creates new tool for the given element sets. + Standard_EXPORT BRepExtrema_ProximityDistTool (const Handle(BRepExtrema_TriangleSet)& theSet1, + const Standard_Integer theNbSamples1, + const Handle(BRepExtrema_TriangleSet)& theSet2, + const BRepExtrema_ShapeList& theShapeList1, + const BRepExtrema_ShapeList& theShapeList2); + +public: + + //! Loads the given element sets into the tool. + Standard_EXPORT void LoadTriangleSets (const Handle(BRepExtrema_TriangleSet)& theSet1, + const Handle(BRepExtrema_TriangleSet)& theSet2); + + //! Loads the given list of subshapes into the tool. + Standard_EXPORT void LoadShapeLists (const BRepExtrema_ShapeList& theShapeList1, + const BRepExtrema_ShapeList& theShapeList2); + + //! Performs searching of the proximity distance. + Standard_EXPORT void Perform(); + +public: //! @name Reject/Accept implementations + + //! Defines the rules for node rejection by bounding box. + Standard_EXPORT virtual Standard_Boolean RejectNode (const BVH_Vec3d& theCornerMin, + const BVH_Vec3d& theCornerMax, + Standard_Real& theMetric) const Standard_OVERRIDE; + + //! Defines the rules for leaf acceptance. + Standard_EXPORT virtual Standard_Boolean Accept (const Standard_Integer theSgmIdx, + const Standard_Real&) Standard_OVERRIDE; + + //! Returns points on triangles sets, which provide the proximity distance. + void ProximityPoints (BVH_Vec3d& thePoint1, BVH_Vec3d& thePoint2) const + { + thePoint1 = myPnt1; + thePoint2 = myPnt2; + } + + //! Returns status of points on triangles sets, which provide the proximity distance. + void ProximityPointsStatus (ProxPnt_Status& thePointStatus1, ProxPnt_Status& thePointStatus2) const + { + thePointStatus1 = myPntStatus1; + thePointStatus2 = myPntStatus2; + } + + //! Returns the computed distance + Standard_Real ProximityDistance() const { return myProxDist; } + +protected: + + //! Computes the distance between object and BVH tree. + Standard_EXPORT Standard_Real ComputeDistance(); + + //! Defines the status of proximity points. + Standard_EXPORT void DefineStatusProxPnt(); + +private: + + //! Defines the status of proximity point from 1st BVH. + void defineStatusProxPnt1(); + + //! Defines the status of proximity point from 2nd BVH. + void defineStatusProxPnt2(); + +protected: + + Standard_Real myMinDistance; //!< Minimal distance from point to BVH, could be not equal to myDistance + BVH_Vec3d myMinDistPoint; //!< Point on BVH providing the minimal distance + + BVH_Vec3d myExtremaPoint; //!< Point on BVH providing the extrema + + Standard_Real myProxDist; //!< Proximity distance + + //! Proximity points + BVH_Vec3d myPnt1, myPnt2; + + //! Proximity points' status + ProxPnt_Status myPntStatus1, myPntStatus2; + +private: + + //! Set of all mesh elements (triangles) of the 1st shape. + Handle(BRepExtrema_TriangleSet) mySet1; + //! Set of all mesh elements (triangles) of the 2nd shape. + Handle(BRepExtrema_TriangleSet) mySet2; + + //! List of subshapes of the 1st shape. + BRepExtrema_ShapeList myShapeList1; + //! List of subshapes of the 2nd shape. + BRepExtrema_ShapeList myShapeList2; + + Standard_Integer myNbSamples1; //!< Number of samples points on the first shape + + //! Vertex index from 1st BVH corresponding to proximity point of 1st shape + Standard_Integer myProxVtxIdx1; + + //! Information of projection point state from 2nd BVH providing proximity point of 2nd shape + PrjState myProxPrjState; + + //! Information of projection point state from 2nd BVH providing the extrema + PrjState myExtPrjState; + + //! Information of projection point state from 2nd BVH providing the minimal distance + PrjState myMinPrjState; + +}; + +#endif // _BRepExtrema_ProximityDistTool_HeaderFile diff --git a/src/BRepExtrema/BRepExtrema_ProximityValueTool.cxx b/src/BRepExtrema/BRepExtrema_ProximityValueTool.cxx new file mode 100644 index 0000000000..a816be8b8f --- /dev/null +++ b/src/BRepExtrema/BRepExtrema_ProximityValueTool.cxx @@ -0,0 +1,161 @@ +// Created on: 2022-08-08 +// Created by: Kseniya NOSULKO +// Copyright (c) 2022 OPEN CASCADE SAS +// +// This file is part of Open CASCADE Technology software library. +// +// This library is free software; you can redistribute it and/or modify it under +// the terms of the GNU Lesser General Public License version 2.1 as published +// by the Free Software Foundation, with special exception defined in the file +// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT +// distribution for complete text of the license and disclaimer of any warranty. +// +// Alternatively, this file may be used under the terms of Open CASCADE +// commercial license or contractual agreement. + +#include + +//======================================================================= +//function : BRepExtrema_ProximityValueTool +//purpose : Creates new unitialized proximity tool +//======================================================================= +BRepExtrema_ProximityValueTool::BRepExtrema_ProximityValueTool() +: myDistance (std::numeric_limits::max()), + myIsDone (Standard_False), + myNbSamples1(0), + myNbSamples2(0) +{} + +//======================================================================= +//function : BRepExtrema_ProximityValueTool +//purpose : Creates new proximity tool for the given element sets +//======================================================================= +BRepExtrema_ProximityValueTool::BRepExtrema_ProximityValueTool (const Handle(BRepExtrema_TriangleSet)& theSet1, + const Handle(BRepExtrema_TriangleSet)& theSet2, + const BRepExtrema_ShapeList& theShapeList1, + const BRepExtrema_ShapeList& theShapeList2) +: myDistance (std::numeric_limits::max()), + myIsDone (Standard_False), + myNbSamples1(0), + myNbSamples2(0) +{ + LoadTriangleSets (theSet1, theSet2); + LoadShapeLists (theShapeList1, theShapeList2); +} + +//======================================================================= +//function : LoadTriangleSets +//purpose : Loads the given element sets into the proximity tool +//======================================================================= +void BRepExtrema_ProximityValueTool::LoadTriangleSets (const Handle(BRepExtrema_TriangleSet)& theSet1, + const Handle(BRepExtrema_TriangleSet)& theSet2) +{ + mySet1 = theSet1; + mySet2 = theSet2; + + myIsDone = Standard_False; +} + +//======================================================================= +//function : LoadTriangleSets +//purpose : Loads the given list of subshapes into the proximity tool +//======================================================================= +void BRepExtrema_ProximityValueTool::LoadShapeLists (const BRepExtrema_ShapeList& theShapeList1, + const BRepExtrema_ShapeList& theShapeList2) +{ + myShapeList1 = theShapeList1; + myShapeList2 = theShapeList2; + + myIsDone = Standard_False; +} + +//======================================================================= +//function : SetNbSamplePoints +//purpose : Sets number of sample points used for proximity calculation for each shape +//======================================================================= +void BRepExtrema_ProximityValueTool::SetNbSamplePoints(const Standard_Integer theSamples1, + const Standard_Integer theSamples2) +{ + myNbSamples1 = theSamples1; + myNbSamples2 = theSamples2; + + myIsDone = Standard_False; +} + +//======================================================================= +//function : computeProximityValue +//purpose : Returns the computed proximity value from first BVH to another one +//======================================================================= +Standard_Real BRepExtrema_ProximityValueTool::computeProximityDist (const Handle(BRepExtrema_TriangleSet)& theSet1, + const Standard_Integer theNbSamples1, + const Handle(BRepExtrema_TriangleSet)& theSet2, + const BRepExtrema_ShapeList& theShapeList1, + const BRepExtrema_ShapeList& theShapeList2, + BVH_Vec3d& thePoint1, + BVH_Vec3d& thePoint2, + ProxPnt_Status& thePointStatus1, + ProxPnt_Status& thePointStatus2) const +{ + BRepExtrema_ProximityDistTool aProxDistTool (theSet1, theNbSamples1, theSet2, theShapeList1, theShapeList2); + aProxDistTool.Perform(); + + if (!aProxDistTool.IsDone()) + return -1.; + + aProxDistTool.ProximityPoints (thePoint1, thePoint2); + aProxDistTool.ProximityPointsStatus (thePointStatus1, thePointStatus2); + + return aProxDistTool.ProximityDistance(); +} + +//======================================================================= +//function : Perform +//purpose : Performs the computation of the proximity value +//======================================================================= +void BRepExtrema_ProximityValueTool::Perform (Standard_Real& theTolerance) +{ + myIsDone = Standard_False; + + // max(min) dist from the 1st shape to the 2nd one + BVH_Vec3d aP1_1, aP1_2; + ProxPnt_Status aPointStatus1_1 = ProxPnt_Status::ProxPnt_Status_UNKNOWN; + ProxPnt_Status aPointStatus1_2 = ProxPnt_Status::ProxPnt_Status_UNKNOWN; + + Standard_Real aProximityDist1 = computeProximityDist (mySet1, myNbSamples1, mySet2, myShapeList1, myShapeList2, + aP1_1, aP1_2, aPointStatus1_1, aPointStatus1_2); + + if (aProximityDist1 < 0.) + return; + + // max(min) dist from the 2nd shape to t he 1st one + BVH_Vec3d aP2_1, aP2_2; + ProxPnt_Status aPointStatus2_1 = ProxPnt_Status::ProxPnt_Status_UNKNOWN; + ProxPnt_Status aPointStatus2_2 = ProxPnt_Status::ProxPnt_Status_UNKNOWN; + + Standard_Real aProximityDist2 = computeProximityDist (mySet2, myNbSamples2, mySet1, myShapeList2, myShapeList1, + aP2_2, aP2_1, aPointStatus2_2, aPointStatus2_1); + + if (aProximityDist2 < 0.) + return; + + // min dist of the two max(min) dists + if (aProximityDist1 < aProximityDist2) + { + myDistance = aProximityDist1; + myPnt1.SetCoord(aP1_1.x(), aP1_1.y(), aP1_1.z()); + myPnt2.SetCoord(aP1_2.x(), aP1_2.y(), aP1_2.z()); + myPntStatus1 = aPointStatus1_1; + myPntStatus2 = aPointStatus1_2; + } + else + { + myDistance = aProximityDist2; + myPnt1.SetCoord(aP2_1.x(), aP2_1.y(), aP2_1.z()); + myPnt2.SetCoord(aP2_2.x(), aP2_2.y(), aP2_2.z()); + myPntStatus1 = aPointStatus2_1; + myPntStatus2 = aPointStatus2_2; + } + + myIsDone = Standard_True; + theTolerance = myDistance; +} diff --git a/src/BRepExtrema/BRepExtrema_ProximityValueTool.hxx b/src/BRepExtrema/BRepExtrema_ProximityValueTool.hxx new file mode 100644 index 0000000000..09610c8d92 --- /dev/null +++ b/src/BRepExtrema/BRepExtrema_ProximityValueTool.hxx @@ -0,0 +1,126 @@ +// Created on: 2022-08-08 +// Created by: Kseniya NOSULKO +// Copyright (c) 2022 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 _BRepExtrema_ProximityValueTool_HeaderFile +#define _BRepExtrema_ProximityValueTool_HeaderFile + +#include +#include + +//! Tool class for computation of the proximity value from one BVH +//! primitive set to another, solving max(min) problem. +//! This tool is not intended to be used independently, and is integrated +//! in other classes, implementing algorithms based on shape tessellation +//! (BRepExtrema_ShapeProximity and BRepExtrema_SelfIntersection). +//! +//! Please note that algorithm results are approximate and depend greatly +//! on the quality of input tessellation(s). +class BRepExtrema_ProximityValueTool +{ +public: + typedef typename BRepExtrema_ProximityDistTool::ProxPnt_Status ProxPnt_Status; + +public: + + //! Creates new unitialized proximity tool. + Standard_EXPORT BRepExtrema_ProximityValueTool(); + + //! Creates new proximity tool for the given element sets. + Standard_EXPORT BRepExtrema_ProximityValueTool (const Handle(BRepExtrema_TriangleSet)& theSet1, + const Handle(BRepExtrema_TriangleSet)& theSet2, + const BRepExtrema_ShapeList& theShapeList1, + const BRepExtrema_ShapeList& theShapeList2); + +public: + + //! Loads the given element sets into the proximity tool. + Standard_EXPORT void LoadTriangleSets (const Handle (BRepExtrema_TriangleSet)& theSet1, + const Handle (BRepExtrema_TriangleSet)& theSet2); + + //! Loads the given list of subshapes into the proximity tool. + Standard_EXPORT void LoadShapeLists (const BRepExtrema_ShapeList& theShapeList1, + const BRepExtrema_ShapeList& theShapeList2); + + //! Sets number of sample points used for proximity calculation for each shape. + //! If number is less or equal zero, all triangulation nodes are used. + Standard_EXPORT void SetNbSamplePoints (const Standard_Integer theSamples1 = 0, + const Standard_Integer theSamples2 = 0); + + //! Performs the computation of the proximity value. + Standard_EXPORT void Perform (Standard_Real& theTolerance); + + //! Is proximity test completed? + Standard_Boolean IsDone() const { return myIsDone; } + + //! Marks test results as outdated. + void MarkDirty() { myIsDone = Standard_False; } + + //! Returns the computed distance. + Standard_Real Distance() const { return myDistance; } + + //! Returns points on triangles sets, which provide the proximity distance. + void ProximityPoints(gp_Pnt& thePoint1, gp_Pnt& thePoint2) const + { + thePoint1 = myPnt1; + thePoint2 = myPnt2; + } + + //! Returns status of points on triangles sets, which provide the proximity distance. + void ProximityPointsStatus (ProxPnt_Status& thePointStatus1, ProxPnt_Status& thePointStatus2) const + { + thePointStatus1 = myPntStatus1; + thePointStatus2 = myPntStatus2; + } + +private: + + //! Returns the computed proximity value from first BVH to another one. + Standard_Real computeProximityDist (const Handle(BRepExtrema_TriangleSet)& theSet1, + const Standard_Integer theNbSamples1, + const Handle(BRepExtrema_TriangleSet)& theSet2, + const BRepExtrema_ShapeList& theShapeList1, + const BRepExtrema_ShapeList& theShapeList2, + BVH_Vec3d& thePoint1, + BVH_Vec3d& thePoint2, + ProxPnt_Status& thePointStatus1, + ProxPnt_Status& thePointStatus2) const; + +private: + + //! Set of all mesh primitives of the 1st shape. + Handle(BRepExtrema_TriangleSet) mySet1; + //! Set of all mesh primitives of the 2nd shape. + Handle(BRepExtrema_TriangleSet) mySet2; + + //! List of subshapes of the 1st shape. + BRepExtrema_ShapeList myShapeList1; + //! List of subshapes of the 2nd shape. + BRepExtrema_ShapeList myShapeList2; + + Standard_Real myDistance; //!< Distance + Standard_Boolean myIsDone; //!< State of the algorithm + + Standard_Integer myNbSamples1; //!< Number of samples points on the first shape + Standard_Integer myNbSamples2; //!< Number of samples points on the second shape + + //! Proximity points + gp_Pnt myPnt1, myPnt2; + + //! Proximity points' status + ProxPnt_Status myPntStatus1, myPntStatus2; + +}; + +#endif // _BRepExtrema_ProximityValueTool_HeaderFile diff --git a/src/BRepExtrema/BRepExtrema_SelfIntersection.hxx b/src/BRepExtrema/BRepExtrema_SelfIntersection.hxx index dbad243766..efb1b39fd0 100644 --- a/src/BRepExtrema/BRepExtrema_SelfIntersection.hxx +++ b/src/BRepExtrema/BRepExtrema_SelfIntersection.hxx @@ -18,6 +18,8 @@ #include +#include + //! Tool class for detection of self-sections in the given shape. //! This class is based on BRepExtrema_OverlapTool and thus uses //! shape tessellation to detect incorrect mesh fragments (pairs @@ -76,7 +78,7 @@ public: //! Returns sub-shape from the shape for the given index (started from 0). const TopoDS_Face& GetSubShape (const Standard_Integer theID) const { - return myFaceList.Value (theID); + return TopoDS::Face(myFaceList.Value(theID)); } //! Returns set of all the face triangles of the shape. diff --git a/src/BRepExtrema/BRepExtrema_ShapeProximity.cxx b/src/BRepExtrema/BRepExtrema_ShapeProximity.cxx index 65b2e69589..09efa4e585 100644 --- a/src/BRepExtrema/BRepExtrema_ShapeProximity.cxx +++ b/src/BRepExtrema/BRepExtrema_ShapeProximity.cxx @@ -18,6 +18,28 @@ #include #include +// Assign a map of sub-shapes (edges/faces) of a given shape +static Standard_Boolean initSubShapes(const TopoDS_Shape& theShape, + BRepExtrema_ShapeList& theSubshapesList, + Handle(BRepExtrema_TriangleSet)& theTriangleSet) +{ + theSubshapesList.Clear(); + + for (TopExp_Explorer anIter(theShape, TopAbs_FACE); anIter.More(); anIter.Next()) + { + theSubshapesList.Append(anIter.Current()); + } + + for (TopExp_Explorer anIter(theShape, TopAbs_EDGE); anIter.More(); anIter.Next()) + { + theSubshapesList.Append(anIter.Current()); + } + + if (theTriangleSet.IsNull()) + theTriangleSet = new BRepExtrema_TriangleSet; + return theTriangleSet->Init(theSubshapesList); +} + //======================================================================= //function : BRepExtrema_ShapeProximity //purpose : Creates uninitialized proximity tool @@ -25,7 +47,9 @@ BRepExtrema_ShapeProximity::BRepExtrema_ShapeProximity (const Standard_Real theTolerance) : myTolerance (theTolerance), myElementSet1 (new BRepExtrema_TriangleSet), - myElementSet2 (new BRepExtrema_TriangleSet) + myElementSet2 (new BRepExtrema_TriangleSet), + myNbSamples1 (0), + myNbSamples2 (0) { // Should be initialized later myIsInitS1 = myIsInitS2 = Standard_False; @@ -40,7 +64,9 @@ BRepExtrema_ShapeProximity::BRepExtrema_ShapeProximity (const TopoDS_Shape& theS const Standard_Real theTolerance) : myTolerance (theTolerance), myElementSet1 (new BRepExtrema_TriangleSet), - myElementSet2 (new BRepExtrema_TriangleSet) + myElementSet2 (new BRepExtrema_TriangleSet), + myNbSamples1 (0), + myNbSamples2 (0) { LoadShape1 (theShape1); LoadShape2 (theShape2); @@ -52,16 +78,18 @@ BRepExtrema_ShapeProximity::BRepExtrema_ShapeProximity (const TopoDS_Shape& theS //======================================================================= Standard_Boolean BRepExtrema_ShapeProximity::LoadShape1 (const TopoDS_Shape& theShape1) { - myFaceList1.Clear(); + myIsInitS1 = initSubShapes(theShape1, myShapeList1, myElementSet1); - for (TopExp_Explorer anIter (theShape1, TopAbs_FACE); anIter.More(); anIter.Next()) + if (myTolerance == Precision::Infinite()) { - myFaceList1.Append (static_cast (anIter.Current())); + myProxValTool.MarkDirty(); + } + else + { + myOverlapTool.MarkDirty(); } - myOverlapTool.MarkDirty(); - - return myIsInitS1 = myElementSet1->Init (myFaceList1); + return myIsInitS1; } //======================================================================= @@ -70,16 +98,18 @@ Standard_Boolean BRepExtrema_ShapeProximity::LoadShape1 (const TopoDS_Shape& the //======================================================================= Standard_Boolean BRepExtrema_ShapeProximity::LoadShape2 (const TopoDS_Shape& theShape2) { - myFaceList2.Clear(); + myIsInitS2 = initSubShapes(theShape2, myShapeList2, myElementSet2); - for (TopExp_Explorer anIter (theShape2, TopAbs_FACE); anIter.More(); anIter.Next()) + if (myTolerance == Precision::Infinite()) { - myFaceList2.Append (static_cast (anIter.Current())); + myProxValTool.MarkDirty(); + } + else + { + myOverlapTool.MarkDirty(); } - myOverlapTool.MarkDirty(); - - return myIsInitS2 = myElementSet2->Init (myFaceList2); + return myIsInitS2; } //======================================================================= @@ -88,13 +118,32 @@ Standard_Boolean BRepExtrema_ShapeProximity::LoadShape2 (const TopoDS_Shape& the //======================================================================= void BRepExtrema_ShapeProximity::Perform() { - if (!myIsInitS1 || !myIsInitS2 || myOverlapTool.IsDone()) + if (myTolerance == Precision::Infinite()) { - return; + if (!myIsInitS1 || !myIsInitS2 || myProxValTool.IsDone()) + { + return; + } + + myProxValTool.LoadTriangleSets (myElementSet1, + myElementSet2); + myProxValTool.LoadShapeLists (myShapeList1, + myShapeList2); + + myProxValTool.Perform (myTolerance); + myProxValTool.ProximityPoints(myProxPoint1, myProxPoint2); + myProxValTool.ProximityPointsStatus (myProxPntStatus1, myProxPntStatus2); } + else + { + if (!myIsInitS1 || !myIsInitS2 || myOverlapTool.IsDone()) + { + return; + } - myOverlapTool.LoadTriangleSets (myElementSet1, - myElementSet2); + myOverlapTool.LoadTriangleSets (myElementSet1, + myElementSet2); - myOverlapTool.Perform (myTolerance); + myOverlapTool.Perform (myTolerance); + } } diff --git a/src/BRepExtrema/BRepExtrema_ShapeProximity.hxx b/src/BRepExtrema/BRepExtrema_ShapeProximity.hxx index d863742136..c6f6d77721 100644 --- a/src/BRepExtrema/BRepExtrema_ShapeProximity.hxx +++ b/src/BRepExtrema/BRepExtrema_ShapeProximity.hxx @@ -16,31 +16,48 @@ #ifndef _BRepExtrema_ShapeProximity_HeaderFile #define _BRepExtrema_ShapeProximity_HeaderFile +#include +#include +#include + +#include +#include #include -//! Tool class for shape proximity detection. +//! @brief Tool class for shape proximity detection. +//! +//! First approach: //! For two given shapes and given tolerance (offset from the mesh) the algorithm allows //! to determine whether or not they are overlapped. The algorithm input consists of any //! shapes which can be decomposed into individual faces (used as basic shape elements). -//! High performance is achieved through the use of existing triangulation of faces. So -//! poly triangulation (with the desired deflection) should already be built. Note that -//! solution is approximate (and corresponds to the deflection used for triangulation). //! //! The algorithm can be run in two modes. If tolerance is set to zero, the algorithm //! will detect only intersecting faces (containing triangles with common points). If //! tolerance is set to positive value, the algorithm will also detect faces located //! on distance less than the given tolerance from each other. +//! +//! Second approach: +//! Compute the proximity value between two shapes if the tolerance is not defined (Precision::Infinite()). +//! In this case the proximity value is a minimal thickness of a layer containing both shapes. +//! +//! For the both approaches the high performance is achieved through the use of existing +//! triangulation of faces. So, poly triangulation (with the desired deflection) should already +//! be built. Note that solution is approximate (and corresponds to the deflection used for +//! triangulation). class BRepExtrema_ShapeProximity { +public: + typedef typename BRepExtrema_ProximityValueTool::ProxPnt_Status ProxPnt_Status; + public: //! Creates empty proximity tool. - Standard_EXPORT BRepExtrema_ShapeProximity (const Standard_Real theTolerance = 0.0); + Standard_EXPORT BRepExtrema_ShapeProximity (const Standard_Real theTolerance = Precision::Infinite()); //! Creates proximity tool for the given two shapes. Standard_EXPORT BRepExtrema_ShapeProximity (const TopoDS_Shape& theShape1, const TopoDS_Shape& theShape2, - const Standard_Real theTolerance = 0.0); + const Standard_Real theTolerance = Precision::Infinite()); public: @@ -56,19 +73,33 @@ public: myTolerance = theTolerance; } + //! Returns proximity value calculated for the whole input shapes. + Standard_Real Proximity() const + { + return Tolerance(); + } + //! Loads 1st shape into proximity tool. Standard_EXPORT Standard_Boolean LoadShape1 (const TopoDS_Shape& theShape1); //! Loads 2nd shape into proximity tool. Standard_EXPORT Standard_Boolean LoadShape2 (const TopoDS_Shape& theShape2); + //! Set number of sample points on the 1st shape used to compute the proximity value. + //! In case of 0, all triangulation nodes will be used. + void SetNbSamples1(const Standard_Integer theNbSamples) { myNbSamples1 = theNbSamples; } + + //! Set number of sample points on the 2nd shape used to compute the proximity value. + //! In case of 0, all triangulation nodes will be used. + void SetNbSamples2(const Standard_Integer theNbSamples) { myNbSamples2 = theNbSamples; } + //! Performs search of overlapped faces. Standard_EXPORT void Perform(); //! True if the search is completed. Standard_Boolean IsDone() const { - return myOverlapTool.IsDone(); + return myOverlapTool.IsDone() || myProxValTool.IsDone(); } //! Returns set of IDs of overlapped faces of 1st shape (started from 0). @@ -84,15 +115,15 @@ public: } //! Returns sub-shape from 1st shape with the given index (started from 0). - const TopoDS_Face& GetSubShape1 (const Standard_Integer theID) const + const TopoDS_Shape& GetSubShape1 (const Standard_Integer theID) const { - return myFaceList1.Value (theID); + return myShapeList1.Value (theID); } //! Returns sub-shape from 1st shape with the given index (started from 0). - const TopoDS_Face& GetSubShape2 (const Standard_Integer theID) const + const TopoDS_Shape& GetSubShape2 (const Standard_Integer theID) const { - return myFaceList2.Value (theID); + return myShapeList2.Value (theID); } //! Returns set of all the face triangles of the 1st shape. @@ -107,6 +138,34 @@ public: return myElementSet2; } + //! Returns the point on the 1st shape, which could be used as a reference point + //! for the value of the proximity. + const gp_Pnt& ProximityPoint1() const + { + return myProxPoint1; + } + + //! Returns the point on the 2nd shape, which could be used as a reference point + //! for the value of the proximity. + const gp_Pnt& ProximityPoint2() const + { + return myProxPoint2; + } + + //! Returns the status of point on the 1st shape, which could be used as a reference point + //! for the value of the proximity. + const ProxPnt_Status& ProxPntStatus1() const + { + return myProxPntStatus1; + } + + //! Returns the status of point on the 2nd shape, which could be used as a reference point + //! for the value of the proximity. + const ProxPnt_Status& ProxPntStatus2() const + { + return myProxPntStatus2; + } + private: //! Maximum overlapping distance. @@ -117,19 +176,39 @@ private: //! Is the 2nd shape initialized? Standard_Boolean myIsInitS2; - //! List of faces of the 1st shape. - BRepExtrema_ShapeList myFaceList1; - //! List of faces of the 2nd shape. - BRepExtrema_ShapeList myFaceList2; + //! List of subshapes of the 1st shape. + BRepExtrema_ShapeList myShapeList1; + //! List of subshapes of the 2nd shape. + BRepExtrema_ShapeList myShapeList2; //! Set of all the face triangles of the 1st shape. Handle(BRepExtrema_TriangleSet) myElementSet1; //! Set of all the face triangles of the 2nd shape. Handle(BRepExtrema_TriangleSet) myElementSet2; + //! Number of sample points on the 1st shape used to compute the proximity value + //! (if zero (default), all triangulation nodes will be used). + Standard_Integer myNbSamples1; + //! Number of sample points on the 2nd shape used to compute the proximity value + //! (if zero (default), all triangulation nodes will be used). + Standard_Integer myNbSamples2; + + //! Reference point of the proximity value on the 1st shape. + gp_Pnt myProxPoint1; + //! Reference point of the proximity value on the 2st shape. + gp_Pnt myProxPoint2; + + //! Status of reference points of the proximity value. + ProxPnt_Status myProxPntStatus1, myProxPntStatus2; + //! Overlap tool used for intersection/overlap test. BRepExtrema_OverlapTool myOverlapTool; + //! Shape-shape proximity tool used for computation of + //! the minimal diameter of a tube containing both edges or + //! the minimal thickness of a shell containing both faces. + BRepExtrema_ProximityValueTool myProxValTool; + }; #endif // _BRepExtrema_ShapeProximity_HeaderFile diff --git a/src/BRepExtrema/BRepExtrema_TriangleSet.cxx b/src/BRepExtrema/BRepExtrema_TriangleSet.cxx index 48189a4add..e1f843d809 100644 --- a/src/BRepExtrema/BRepExtrema_TriangleSet.cxx +++ b/src/BRepExtrema/BRepExtrema_TriangleSet.cxx @@ -18,6 +18,7 @@ #include #include #include +#include IMPLEMENT_STANDARD_RTTIEXT(BRepExtrema_TriangleSet, BVH_PrimitiveSet3d) @@ -114,17 +115,65 @@ void BRepExtrema_TriangleSet::Swap (const Standard_Integer theIndex1, const Stan { std::swap (myTriangles[theIndex1], myTriangles[theIndex2]); + + std::swap (myTrgIdxMap (theIndex1), + myTrgIdxMap (theIndex2)); } //======================================================================= //function : GetFaceID -//purpose : Returns face ID of the given triangle +//purpose : Returns face ID of the given vertex //======================================================================= Standard_Integer BRepExtrema_TriangleSet::GetFaceID (const Standard_Integer theIndex) const { return myTriangles[theIndex].w(); } +//======================================================================= +//function : GetShapeIDOfVtx +//purpose : Returns shape ID of the given vertex index +//======================================================================= +Standard_Integer BRepExtrema_TriangleSet::GetShapeIDOfVtx (const Standard_Integer theIndex) const +{ + return myShapeIdxOfVtxVec.Value (theIndex); +} + +//======================================================================= +//function : GetVtxIdxInShape +//purpose : Returns vertex index in tringulation of the shape, which vertex belongs, +// with the given vtx ID in whole set +//======================================================================= +Standard_Integer BRepExtrema_TriangleSet::GetVtxIdxInShape (const Standard_Integer theIndex) const +{ + Standard_Integer aShID = myShapeIdxOfVtxVec.Value (theIndex); + Standard_Integer aNumVertices = 0; + + for (Standard_Integer aSIdx = 0; aSIdx < aShID; aSIdx++) + { + aNumVertices += myNumVtxInShapeVec.Value (aSIdx); + } + + return theIndex - aNumVertices; +} + +//======================================================================= +//function : GetTrgIdxInShape +//purpose : Returns triangle index (before swapping) in tringulation of the shape, which triangle belongs, +// with the given trg ID in whole set (after swapping) +//======================================================================= +Standard_Integer BRepExtrema_TriangleSet::GetTrgIdxInShape (const Standard_Integer theIndex) const +{ + Standard_Integer aShID = GetFaceID (theIndex); + Standard_Integer aNumTriangles = 0; + + for (Standard_Integer aSIdx = 0; aSIdx < aShID; aSIdx++) + { + aNumTriangles += myNumTrgInShapeVec.Value (aSIdx); + } + + return myTrgIdxMap (theIndex) - aNumTriangles; +} + //======================================================================= //function : GetVertices //purpose : Returns vertices of the given triangle @@ -141,6 +190,21 @@ void BRepExtrema_TriangleSet::GetVertices (const Standard_Integer theIndex, theVertex3 = myVertexArray[aTriangle.z()]; } +//======================================================================= +//function : GetVertices +//purpose : Returns vertices of the given triangle +//======================================================================= +void BRepExtrema_TriangleSet::GetVtxIndices (const Standard_Integer theIndex, + NCollection_Array1& theVtxIndices) const +{ + BVH_Vec4i aTriangle = myTriangles[theIndex]; + + theVtxIndices = NCollection_Array1 (0, 2); + theVtxIndices.SetValue (0, aTriangle.x()); + theVtxIndices.SetValue (1, aTriangle.y()); + theVtxIndices.SetValue (2, aTriangle.z()); +} + //======================================================================= //function : Clear //purpose : Clears triangle set data @@ -158,41 +222,26 @@ void BRepExtrema_TriangleSet::Clear() //function : Init //purpose : Initializes triangle set //======================================================================= -Standard_Boolean BRepExtrema_TriangleSet::Init (const BRepExtrema_ShapeList& theFaces) +Standard_Boolean BRepExtrema_TriangleSet::Init (const BRepExtrema_ShapeList& theShapes) { Clear(); - for (Standard_Integer aFaceIdx = 0; aFaceIdx < theFaces.Size(); ++aFaceIdx) + Standard_Boolean isOK = Standard_True; + for (Standard_Integer aShapeIdx = 0; aShapeIdx < theShapes.Size() && isOK; ++aShapeIdx) + { + if (theShapes (aShapeIdx).ShapeType() == TopAbs_FACE) + isOK = initFace (TopoDS::Face (theShapes(aShapeIdx)), aShapeIdx); + else if (theShapes (aShapeIdx).ShapeType() == TopAbs_EDGE) + isOK = initEdge (TopoDS::Edge (theShapes(aShapeIdx)), aShapeIdx); + } + + Standard_Integer aNumTrg = static_cast (myTriangles.size()); + myTrgIdxMap.Clear(); + myTrgIdxMap.ReSize (aNumTrg); + + for (Standard_Integer aTrgIdx = 0; aTrgIdx < aNumTrg; ++aTrgIdx) { - TopLoc_Location aLocation; - - Handle(Poly_Triangulation) aTriangulation = - BRep_Tool::Triangulation (theFaces (aFaceIdx), aLocation); - - if (aTriangulation.IsNull()) - { - return Standard_False; - } - - const Standard_Integer aVertOffset = - static_cast (myVertexArray.size()) - 1; - - for (Standard_Integer aVertIdx = 1; aVertIdx <= aTriangulation->NbNodes(); ++aVertIdx) - { - gp_Pnt aVertex = aTriangulation->Node (aVertIdx); - aVertex.Transform (aLocation.Transformation()); - myVertexArray.push_back (BVH_Vec3d (aVertex.X(), aVertex.Y(), aVertex.Z())); - } - - for (Standard_Integer aTriIdx = 1; aTriIdx <= aTriangulation->NbTriangles(); ++aTriIdx) - { - Standard_Integer aVertex1, aVertex2, aVertex3; - aTriangulation->Triangle (aTriIdx).Get (aVertex1, aVertex2, aVertex3); - myTriangles.push_back (BVH_Vec4i (aVertex1 + aVertOffset, - aVertex2 + aVertOffset, - aVertex3 + aVertOffset, - aFaceIdx)); - } + myTrgIdxMap.Bind (aTrgIdx, aTrgIdx); } MarkDirty(); // needs BVH rebuilding @@ -203,3 +252,95 @@ Standard_Boolean BRepExtrema_TriangleSet::Init (const BRepExtrema_ShapeList& the return Standard_True; } +//======================================================================= +//function : initFace +//purpose : Initializes triangle set +//======================================================================= +Standard_Boolean BRepExtrema_TriangleSet::initFace (const TopoDS_Face& theFace, const Standard_Integer theIndex) +{ + TopLoc_Location aLocation; + + Handle(Poly_Triangulation) aTriangulation = BRep_Tool::Triangulation (theFace, aLocation); + if (aTriangulation.IsNull()) + { + return Standard_False; + } + + const Standard_Integer aVertOffset = + static_cast (myVertexArray.size()) - 1; + + initNodes (aTriangulation->MapNodeArray()->ChangeArray1(), aLocation.Transformation(), theIndex); + + for (Standard_Integer aTriIdx = 1; aTriIdx <= aTriangulation->NbTriangles(); ++aTriIdx) + { + Standard_Integer aVertex1; + Standard_Integer aVertex2; + Standard_Integer aVertex3; + + aTriangulation->Triangle (aTriIdx).Get (aVertex1, + aVertex2, + aVertex3); + + myTriangles.push_back (BVH_Vec4i (aVertex1 + aVertOffset, + aVertex2 + aVertOffset, + aVertex3 + aVertOffset, + theIndex)); + } + + myNumTrgInShapeVec.SetValue (theIndex, aTriangulation->NbTriangles()); + + return Standard_True; +} + +//======================================================================= +//function : initEdge +//purpose : Initializes triangle set +//======================================================================= +Standard_Boolean BRepExtrema_TriangleSet::initEdge (const TopoDS_Edge& theEdge, const Standard_Integer theIndex) +{ + TopLoc_Location aLocation; + + Handle(Poly_Polygon3D) aPolygon = BRep_Tool::Polygon3D (theEdge, aLocation); + if (aPolygon.IsNull()) + { + return Standard_False; + } + + const Standard_Integer aVertOffset = + static_cast (myVertexArray.size()) - 1; + + initNodes (aPolygon->Nodes(), aLocation.Transformation(), theIndex); + + for (Standard_Integer aVertIdx = 1; aVertIdx < aPolygon->NbNodes(); ++aVertIdx) + { + // segment as degenerate triangle + myTriangles.push_back (BVH_Vec4i (aVertIdx + aVertOffset, + aVertIdx + aVertOffset + 1, + aVertIdx + aVertOffset + 1, + theIndex)); + } + return Standard_True; +} + +//======================================================================= +//function : initNodes +//purpose : Initializes nodes +//======================================================================= +void BRepExtrema_TriangleSet::initNodes (const TColgp_Array1OfPnt& theNodes, + const gp_Trsf& theTrsf, + const Standard_Integer theIndex) +{ + for (Standard_Integer aVertIdx = 1; aVertIdx <= theNodes.Size(); ++aVertIdx) + { + gp_Pnt aVertex = theNodes.Value (aVertIdx); + + aVertex.Transform (theTrsf); + + myVertexArray.push_back (BVH_Vec3d (aVertex.X(), + aVertex.Y(), + aVertex.Z())); + myShapeIdxOfVtxVec.Append (theIndex); + } + + myNumVtxInShapeVec.SetValue (theIndex, theNodes.Size()); +} diff --git a/src/BRepExtrema/BRepExtrema_TriangleSet.hxx b/src/BRepExtrema/BRepExtrema_TriangleSet.hxx index 3b0414c75b..eb87430cb1 100644 --- a/src/BRepExtrema/BRepExtrema_TriangleSet.hxx +++ b/src/BRepExtrema/BRepExtrema_TriangleSet.hxx @@ -16,11 +16,14 @@ #ifndef _BRepExtrema_TriangleSet_HeaderFile #define _BRepExtrema_TriangleSet_HeaderFile -#include #include +#include +#include +#include +#include //! List of shapes and their IDs for collision detection. -typedef NCollection_Vector BRepExtrema_ShapeList; +typedef NCollection_Vector BRepExtrema_ShapeList; //! Triangle set corresponding to specific face. class BRepExtrema_TriangleSet : public BVH_PrimitiveSet3d @@ -59,7 +62,10 @@ public: Standard_EXPORT void Clear(); //! Initializes triangle set. - Standard_EXPORT Standard_Boolean Init (const BRepExtrema_ShapeList& theFaces); + Standard_EXPORT Standard_Boolean Init (const BRepExtrema_ShapeList& theShapes); + + //! Returns all vertices. + Standard_EXPORT const BVH_Array3d& GetVertices() const { return myVertexArray; } //! Returns vertices of the given triangle. Standard_EXPORT void GetVertices (const Standard_Integer theIndex, @@ -67,9 +73,37 @@ public: BVH_Vec3d& theVertex2, BVH_Vec3d& theVertex3) const; + //! Returns vertex indices of the given triangle. + Standard_EXPORT void GetVtxIndices (const Standard_Integer theIndex, + NCollection_Array1& theVtxIndices) const; + //! Returns face ID of the given triangle. Standard_EXPORT Standard_Integer GetFaceID (const Standard_Integer theIndex) const; + //! Returns shape ID of the given vertex index. + Standard_EXPORT Standard_Integer GetShapeIDOfVtx (const Standard_Integer theIndex) const; + + //! Returns vertex index in tringulation of the shape, which vertex belongs, + //! with the given vtx ID in whole set. + Standard_EXPORT Standard_Integer GetVtxIdxInShape (const Standard_Integer theIndex) const; + + //! Returns triangle index (before swapping) in tringulation of the shape, which triangle belongs, + //! with the given trg ID in whole set (after swapping). + Standard_EXPORT Standard_Integer GetTrgIdxInShape (const Standard_Integer theIndex) const; + +private: + + //! Initializes triangle set from the face + Standard_Boolean initFace (const TopoDS_Face& theFace, const Standard_Integer theIndex); + + //! Initializes polygon from the edge + Standard_Boolean initEdge (const TopoDS_Edge& theEdge, const Standard_Integer theIndex); + + //! Initializes nodes + void initNodes (const TColgp_Array1OfPnt& theNodes, + const gp_Trsf& theTrsf, + const Standard_Integer theIndex); + protected: //! Array of vertex indices. @@ -78,6 +112,19 @@ protected: //! Array of vertex coordinates. BVH_Array3d myVertexArray; + //! Vector of shapes' indices where index of item corresponds to index of vertex, + //! belonging to this shape. + NCollection_Vector myShapeIdxOfVtxVec; + + //! Vector of vertexes' number belonging to shape which index corresponds item's index. + NCollection_Vector myNumVtxInShapeVec; + + //! Vector of triangles' number belonging to shape which index corresponds item's index. + NCollection_Vector myNumTrgInShapeVec; + + //! Map of triangles' indices after (key) and before (value) swapping. + TColStd_DataMapOfIntegerInteger myTrgIdxMap; + public: DEFINE_STANDARD_RTTIEXT(BRepExtrema_TriangleSet, BVH_PrimitiveSet3d) diff --git a/src/BRepExtrema/FILES b/src/BRepExtrema/FILES index e9fc5d2f30..b7405afc30 100644 --- a/src/BRepExtrema/FILES +++ b/src/BRepExtrema/FILES @@ -18,6 +18,10 @@ BRepExtrema_OverlapTool.cxx BRepExtrema_OverlapTool.hxx BRepExtrema_Poly.cxx BRepExtrema_Poly.hxx +BRepExtrema_ProximityValueTool.cxx +BRepExtrema_ProximityValueTool.hxx +BRepExtrema_ProximityDistTool.cxx +BRepExtrema_ProximityDistTool.hxx BRepExtrema_SelfIntersection.cxx BRepExtrema_SelfIntersection.hxx BRepExtrema_SeqOfSolution.hxx diff --git a/src/BRepTest/BRepTest_ExtremaCommands.cxx b/src/BRepTest/BRepTest_ExtremaCommands.cxx index ee9d0f4f7d..0976a5349b 100644 --- a/src/BRepTest/BRepTest_ExtremaCommands.cxx +++ b/src/BRepTest/BRepTest_ExtremaCommands.cxx @@ -173,7 +173,7 @@ static int ShapeProximity (Draw_Interpretor& theDI, Standard_Integer theNbArgs, { if (theNbArgs < 3 || theNbArgs > 6) { - Message::SendFail() << "Usage: " << theArgs[0] << " Shape1 Shape2 [-tol ] [-profile]"; + Message::SendFail() << "Usage: " << theArgs[0] << " Shape1 Shape2 [-tol | -value] [-profile]"; return 1; } @@ -186,9 +186,11 @@ static int ShapeProximity (Draw_Interpretor& theDI, Standard_Integer theNbArgs, return 1; } - BRepExtrema_ShapeProximity aTool; + BRepExtrema_ShapeProximity aTool(0.0); Standard_Boolean aProfile = Standard_False; + Standard_Boolean isTolerance = Standard_False; + Standard_Boolean isValue = Standard_False; for (Standard_Integer anArgIdx = 3; anArgIdx < theNbArgs; ++anArgIdx) { @@ -197,6 +199,7 @@ static int ShapeProximity (Draw_Interpretor& theDI, Standard_Integer theNbArgs, if (aFlag == "-tol") { + isTolerance = Standard_True; if (++anArgIdx >= theNbArgs) { Message::SendFail() << "Error: wrong syntax at argument '" << aFlag; @@ -214,13 +217,23 @@ static int ShapeProximity (Draw_Interpretor& theDI, Standard_Integer theNbArgs, aTool.SetTolerance (aTolerance); } } - - if (aFlag == "-profile") + else if (aFlag == "-value") + { + isValue = Standard_True; + aTool.SetTolerance(Precision::Infinite()); + } + else if (aFlag == "-profile") { aProfile = Standard_True; } } + if (isTolerance && isValue) + { + Message::SendFail() << "Error: Proximity value could not be computed if the tolerance is set"; + return 1; + } + Standard_Real aInitTime = 0.0; Standard_Real aWorkTime = 0.0; @@ -264,38 +277,73 @@ static int ShapeProximity (Draw_Interpretor& theDI, Standard_Integer theNbArgs, theDI << "Executing proximity test: " << aWorkTime << "\n"; } - TopoDS_Builder aCompBuilder; + if (isValue) + { + theDI << "Proximity value: " << aTool.Proximity() << "\n"; - TopoDS_Compound aFaceCompound1; - aCompBuilder.MakeCompound (aFaceCompound1); + // proximity points + TopoDS_Vertex aProxVtx1 = BRepLib_MakeVertex (aTool.ProximityPoint1()); + TopoDS_Vertex aProxVtx2 = BRepLib_MakeVertex (aTool.ProximityPoint2()); - for (BRepExtrema_MapOfIntegerPackedMapOfInteger::Iterator anIt1 (aTool.OverlapSubShapes1()); anIt1.More(); anIt1.Next()) - { - TCollection_AsciiString aStr = TCollection_AsciiString (theArgs[1]) + "_" + (anIt1.Key() + 1); + DBRep::Set ("ProxPnt1", aProxVtx1); + DBRep::Set ("ProxPnt2", aProxVtx2); - const TopoDS_Face& aFace = aTool.GetSubShape1 (anIt1.Key()); - aCompBuilder.Add (aFaceCompound1, aFace); - DBRep::Set (aStr.ToCString(), aFace); + // proximity points' status + TCollection_AsciiString ProxPntStatus1; + TCollection_AsciiString ProxPntStatus2; - theDI << aStr << " \n"; - } + switch (aTool.ProxPntStatus1()) + { + case 0: ProxPntStatus1 = "Border"; break; + case 1: ProxPntStatus1 = "Middle"; break; + default: ProxPntStatus1 = "Unknown"; + } - TopoDS_Compound aFaceCompound2; - aCompBuilder.MakeCompound (aFaceCompound2); + switch (aTool.ProxPntStatus2()) + { + case 0: ProxPntStatus2 = "Border"; break; + case 1: ProxPntStatus2 = "Middle"; break; + default: ProxPntStatus2 = "Unknown"; + } - for (BRepExtrema_MapOfIntegerPackedMapOfInteger::Iterator anIt2 (aTool.OverlapSubShapes2()); anIt2.More(); anIt2.Next()) + theDI << " Status of ProxPnt1 on " << theArgs[1] << " : " << ProxPntStatus1 << "\n"; + theDI << " Status of ProxPnt2 on " << theArgs[2] << " : " << ProxPntStatus2 << "\n"; + } + else { - TCollection_AsciiString aStr = TCollection_AsciiString (theArgs[2]) + "_" + (anIt2.Key() + 1); + TopoDS_Builder aCompBuilder; - const TopoDS_Face& aFace = aTool.GetSubShape2 (anIt2.Key()); - aCompBuilder.Add (aFaceCompound2, aFace); - DBRep::Set (aStr.ToCString(), aFace); + TopoDS_Compound aFaceCompound1; + aCompBuilder.MakeCompound(aFaceCompound1); - theDI << aStr << " \n"; - } + for (BRepExtrema_MapOfIntegerPackedMapOfInteger::Iterator anIt1(aTool.OverlapSubShapes1()); anIt1.More(); anIt1.Next()) + { + TCollection_AsciiString aStr = TCollection_AsciiString(theArgs[1]) + "_" + (anIt1.Key() + 1); + + const TopoDS_Shape& aShape = aTool.GetSubShape1(anIt1.Key()); + aCompBuilder.Add(aFaceCompound1, aShape); + DBRep::Set(aStr.ToCString(), aShape); + + theDI << aStr << " \n"; + } + + TopoDS_Compound aFaceCompound2; + aCompBuilder.MakeCompound(aFaceCompound2); + + for (BRepExtrema_MapOfIntegerPackedMapOfInteger::Iterator anIt2(aTool.OverlapSubShapes2()); anIt2.More(); anIt2.Next()) + { + TCollection_AsciiString aStr = TCollection_AsciiString(theArgs[2]) + "_" + (anIt2.Key() + 1); - DBRep::Set ((TCollection_AsciiString (theArgs[1]) + "_" + "overlapped").ToCString(), aFaceCompound1); - DBRep::Set ((TCollection_AsciiString (theArgs[2]) + "_" + "overlapped").ToCString(), aFaceCompound2); + const TopoDS_Shape& aShape = aTool.GetSubShape2(anIt2.Key()); + aCompBuilder.Add(aFaceCompound2, aShape); + DBRep::Set(aStr.ToCString(), aShape); + + theDI << aStr << " \n"; + } + + DBRep::Set((TCollection_AsciiString(theArgs[1]) + "_" + "overlapped").ToCString(), aFaceCompound1); + DBRep::Set((TCollection_AsciiString(theArgs[2]) + "_" + "overlapped").ToCString(), aFaceCompound2); + } return 0; } @@ -445,12 +493,14 @@ void BRepTest::ExtremaCommands (Draw_Interpretor& theCommands) aGroup); theCommands.Add ("proximity", - "proximity Shape1 Shape2 [-tol ] [-profile]" + "proximity Shape1 Shape2 [-tol | -value] [-profile]" "\n\t\t: Searches for pairs of overlapping faces of the given shapes." "\n\t\t: The options are:" "\n\t\t: -tol : non-negative tolerance value used for overlapping" "\n\t\t: test (for zero tolerance, the strict intersection" "\n\t\t: test will be performed)" + "\n\t\t: -value : compute the proximity value (minimal value which" + "\n\t\t: shows both shapes fully overlapped)" "\n\t\t: -profile : outputs execution time for main algorithm stages", __FILE__, ShapeProximity, diff --git a/src/BVH/BVH_Tools.hxx b/src/BVH/BVH_Tools.hxx index b90034778b..1aee086ffb 100644 --- a/src/BVH/BVH_Tools.hxx +++ b/src/BVH/BVH_Tools.hxx @@ -30,6 +30,15 @@ public: //! @name public types typedef typename BVH::VectorType::Type BVH_VecNt; +public: + + enum BVH_PrjStateInTriangle + { + BVH_PrjStateInTriangle_VERTEX, + BVH_PrjStateInTriangle_EDGE, + BVH_PrjStateInTriangle_INNER + }; + public: //! @name Box-Box Square distance //! Computes Square distance between Axis aligned bounding boxes @@ -113,11 +122,14 @@ public: //! @name Point-Box projection public: //! @name Point-Triangle Square distance - //! Computes square distance between point and triangle - static T PointTriangleSquareDistance (const BVH_VecNt& thePoint, - const BVH_VecNt& theNode0, - const BVH_VecNt& theNode1, - const BVH_VecNt& theNode2) + //! Find nearest point on a triangle for the given point + static BVH_VecNt PointTriangleProjection (const BVH_VecNt& thePoint, + const BVH_VecNt& theNode0, + const BVH_VecNt& theNode1, + const BVH_VecNt& theNode2, + BVH_PrjStateInTriangle* thePrjState = nullptr, + Standard_Integer* theNumberOfFirstNode = nullptr, + Standard_Integer* theNumberOfLastNode = nullptr) { const BVH_VecNt aAB = theNode1 - theNode0; const BVH_VecNt aAC = theNode2 - theNode0; @@ -128,68 +140,110 @@ public: //! @name Point-Triangle Square distance if (aABdotAP <= 0. && aACdotAP <= 0.) { - return aAP.Dot(aAP); + if (thePrjState != nullptr) + { + *thePrjState = BVH_PrjStateInTriangle_VERTEX; + *theNumberOfFirstNode = 0; + *theNumberOfLastNode = 0; + } + return theNode0; } - + const BVH_VecNt aBC = theNode2 - theNode1; const BVH_VecNt aBP = thePoint - theNode1; - - T aBAdotBP = -(aAB.Dot(aBP)); - T aBCdotBP = (aBC.Dot(aBP)); - + + T aBAdotBP = -(aAB.Dot (aBP)); + T aBCdotBP = (aBC.Dot (aBP)); + if (aBAdotBP <= 0. && aBCdotBP <= 0.) { - return (aBP.Dot(aBP)); + if (thePrjState != nullptr) + { + *thePrjState = BVH_PrjStateInTriangle_VERTEX; + *theNumberOfFirstNode = 1; + *theNumberOfLastNode = 1; + } + return theNode1; } - + const BVH_VecNt aCP = thePoint - theNode2; - - T aCBdotCP = -(aBC.Dot(aCP)); - T aCAdotCP = -(aAC.Dot(aCP)); - + + T aCBdotCP = -(aBC.Dot (aCP)); + T aCAdotCP = -(aAC.Dot (aCP)); + if (aCAdotCP <= 0. && aCBdotCP <= 0.) { - return (aCP.Dot(aCP)); + if (thePrjState != nullptr) + { + *thePrjState = BVH_PrjStateInTriangle_VERTEX; + *theNumberOfFirstNode = 2; + *theNumberOfLastNode = 2; + } + return theNode2; } - - T aACdotBP = (aAC.Dot(aBP)); - + + T aACdotBP = (aAC.Dot (aBP)); + T aVC = aABdotAP * aACdotBP + aBAdotBP * aACdotAP; - + if (aVC <= 0. && aABdotAP > 0. && aBAdotBP > 0.) { - const BVH_VecNt aDirect = aAP - aAB * (aABdotAP / (aABdotAP + aBAdotBP)); - - return (aDirect.Dot(aDirect)); + if (thePrjState != nullptr) + { + *thePrjState = BVH_PrjStateInTriangle_EDGE; + *theNumberOfFirstNode = 0; + *theNumberOfLastNode = 1; + } + return theNode0 + aAB * (aABdotAP / (aABdotAP + aBAdotBP)); } - - T aABdotCP = (aAB.Dot(aCP)); - + + T aABdotCP = (aAB.Dot (aCP)); + T aVA = aBAdotBP * aCAdotCP - aABdotCP * aACdotBP; - + if (aVA <= 0. && aBCdotBP > 0. && aCBdotCP > 0.) { - const BVH_VecNt aDirect = aBP - aBC * (aBCdotBP / (aBCdotBP + aCBdotCP)); - - return (aDirect.Dot(aDirect)); + if (thePrjState != nullptr) + { + *thePrjState = BVH_PrjStateInTriangle_EDGE; + *theNumberOfFirstNode = 1; + *theNumberOfLastNode = 2; + } + return theNode1 + aBC * (aBCdotBP / (aBCdotBP + aCBdotCP)); } - + T aVB = aABdotCP * aACdotAP + aABdotAP * aCAdotCP; - + if (aVB <= 0. && aACdotAP > 0. && aCAdotCP > 0.) { - const BVH_VecNt aDirect = aAP - aAC * (aACdotAP / (aACdotAP + aCAdotCP)); - - return (aDirect.Dot(aDirect)); + if (thePrjState != nullptr) + { + *thePrjState = BVH_PrjStateInTriangle_EDGE; + *theNumberOfFirstNode = 2; + *theNumberOfLastNode = 0; + } + return theNode0 + aAC * (aACdotAP / (aACdotAP + aCAdotCP)); } - + T aNorm = aVA + aVB + aVC; - - const BVH_VecNt& aDirect = thePoint - (theNode0 * aVA + - theNode1 * aVB + - theNode2 * aVC) / aNorm; - - return (aDirect.Dot(aDirect)); + + if (thePrjState != nullptr) + { + *thePrjState = BVH_PrjStateInTriangle_INNER; + } + + return (theNode0 * aVA + theNode1 * aVB + theNode2 * aVC) / aNorm; + } + + //! Computes square distance between point and triangle + static T PointTriangleSquareDistance (const BVH_VecNt& thePoint, + const BVH_VecNt& theNode0, + const BVH_VecNt& theNode1, + const BVH_VecNt& theNode2) + { + const BVH_VecNt aProj = PointTriangleProjection(thePoint, theNode0, theNode1, theNode2); + const BVH_VecNt aPP = aProj - thePoint; + return aPP.Dot(aPP); } public: //! @name Ray-Box Intersection diff --git a/tests/lowalgos/grids.list b/tests/lowalgos/grids.list index cb983a9781..6b1835d322 100644 --- a/tests/lowalgos/grids.list +++ b/tests/lowalgos/grids.list @@ -9,3 +9,4 @@ 009 bvh 010 progress 011 2ddeviation +012 proximity diff --git a/tests/lowalgos/proximity/A1 b/tests/lowalgos/proximity/A1 new file mode 100644 index 0000000000..2a7025c155 --- /dev/null +++ b/tests/lowalgos/proximity/A1 @@ -0,0 +1,24 @@ +puts "============" +puts "0033017: Implement an algorithm to find a proximity between a pair of shapes" +puts "===========" +puts "" + +circle c 0 0 0 1 0 0 5 +mkedge e1 c pi/2 pi +mkedge e2 c -pi/2 0 +incmesh e1 1.e-3 +incmesh e2 1.e-3 + +set log [proximity e1 e2 -value -profile] + +regexp {Proximity value: ([0-9+-.eE]*)} $log full val +set tol 1.e-3 +set expected 10.0 + +regexp {Status of ProxPnt1 on ([A-Za-z0-9._-]*) : ([A-Za-z]*)} $log full val1 val2 +set status1 ${val2} +set expected_status1 Middle + +regexp {Status of ProxPnt2 on ([A-Za-z0-9._-]*) : ([A-Za-z]*)} $log full val1 val2 +set status2 ${val2} +set expected_status2 Middle \ No newline at end of file diff --git a/tests/lowalgos/proximity/A2 b/tests/lowalgos/proximity/A2 new file mode 100644 index 0000000000..61a92c1112 --- /dev/null +++ b/tests/lowalgos/proximity/A2 @@ -0,0 +1,26 @@ +puts "============" +puts "0033017: Implement an algorithm to find a proximity between a pair of shapes" +puts "===========" +puts "" + +circle c1 0 0 0 1 0 0 1 +mkedge e1 c1 +incmesh e1 1.e-3 + +circle c2 0 0 0 0 1 0 1 +mkedge e2 c2 +incmesh e2 1.e-3 + +set log [proximity e1 e2 -value -profile] +regexp {Proximity value: ([0-9+-.eE]*)} $log full val; + +set tol 1.e-3 +set expected 2.0 + +regexp {Status of ProxPnt1 on ([A-Za-z0-9._-]*) : ([A-Za-z]*)} $log full val1 val2 +set status1 ${val2} +set expected_status1 Middle + +regexp {Status of ProxPnt2 on ([A-Za-z0-9._-]*) : ([A-Za-z]*)} $log full val1 val2 +set status2 ${val2} +set expected_status2 Middle \ No newline at end of file diff --git a/tests/lowalgos/proximity/A3 b/tests/lowalgos/proximity/A3 new file mode 100644 index 0000000000..f878329398 --- /dev/null +++ b/tests/lowalgos/proximity/A3 @@ -0,0 +1,28 @@ +puts "============" +puts "0033017: Implement an algorithm to find a proximity between a pair of shapes" +puts "===========" +puts "" + +circle c1 0 -1 0 1 0 0 1 +trim c1 c1 -pi 0 +mkedge e1 c1 +incmesh e1 1.e-3 + +circle c2 0 1 0 1 0 0 1 +trim c2 c2 0 pi +mkedge e2 c2 +incmesh e2 1.e-3 + +set log [proximity e1 e2 -value -profile] +regexp {Proximity value: ([0-9+-.eE]*)} $log full val; + +set tol 1.e-3 +set expected [expr {sqrt(5.0) - 1.}] + +regexp {Status of ProxPnt1 on ([A-Za-z0-9._-]*) : ([A-Za-z]*)} $log full val1 val2 +set status1 ${val2} +set expected_status1 Middle + +regexp {Status of ProxPnt2 on ([A-Za-z0-9._-]*) : ([A-Za-z]*)} $log full val1 val2 +set status2 ${val2} +set expected_status2 Border \ No newline at end of file diff --git a/tests/lowalgos/proximity/A4 b/tests/lowalgos/proximity/A4 new file mode 100644 index 0000000000..29c72fdc9e --- /dev/null +++ b/tests/lowalgos/proximity/A4 @@ -0,0 +1,26 @@ +puts "============" +puts "0033017: Implement an algorithm to find a proximity between a pair of shapes" +puts "===========" +puts "" + +circle c1 0 0 0 1 0 0 1 +mkedge e1 c1 +incmesh e1 1.e-3 + +circle c2 0 0 0 -1 0.5 0 1 +mkedge e2 c2 +incmesh e2 1.e-3 + +set log [proximity e1 e2 -value -profile] +regexp {Proximity value: ([0-9+-.eE]*)} $log full val; + +set tol 1.e-3 +set expected 2.0 + +regexp {Status of ProxPnt1 on ([A-Za-z0-9._-]*) : ([A-Za-z]*)} $log full val1 val2 +set status1 ${val2} +set expected_status1 Middle + +regexp {Status of ProxPnt2 on ([A-Za-z0-9._-]*) : ([A-Za-z]*)} $log full val1 val2 +set status2 ${val2} +set expected_status2 Middle \ No newline at end of file diff --git a/tests/lowalgos/proximity/A5 b/tests/lowalgos/proximity/A5 new file mode 100644 index 0000000000..19a1daed9a --- /dev/null +++ b/tests/lowalgos/proximity/A5 @@ -0,0 +1,31 @@ +puts "============" +puts "0033017: Implement an algorithm to find a proximity between a pair of shapes" +puts "===========" +puts "" + +circle c1 0 0 0 1 0 0 1 +trim c1 c1 -pi/2. pi/2. +mkedge e1 c1 +incmesh e1 1.e-3 + +circle c2 0 0 0 1 0.5 0 1 +trim c2 c2 0 pi +mkedge e2 c2 +incmesh e2 1.e-3 + +set log [proximity e1 e2 -value -profile] +regexp {Proximity value: ([0-9+-.eE]*)} $log full val; + +set tol 1.e-3 +explode e1 v +explode e2 v +distmini d e1_1 e2_1 +regexp {([-0-9.+eE]+)$} [dump d_val] full expected + +regexp {Status of ProxPnt1 on ([A-Za-z0-9._-]*) : ([A-Za-z]*)} $log full val1 val2 +set status1 ${val2} +set expected_status1 Middle + +regexp {Status of ProxPnt2 on ([A-Za-z0-9._-]*) : ([A-Za-z]*)} $log full val1 val2 +set status2 ${val2} +set expected_status2 Border \ No newline at end of file diff --git a/tests/lowalgos/proximity/B1 b/tests/lowalgos/proximity/B1 new file mode 100644 index 0000000000..68d434859b --- /dev/null +++ b/tests/lowalgos/proximity/B1 @@ -0,0 +1,28 @@ +puts "============" +puts "0033017: Implement an algorithm to find a proximity between a pair of shapes" +puts "===========" +puts "" + +plane p1 0 0 0 0 0 1 +trim p1 p1 -1 1 -1 1 +mkface f1 p1 +incmesh f1 1.e-1 + +plane p2 0 0 1 0 0 1 +trim p2 p2 -1 1 -1 1 +mkface f2 p2 +incmesh f2 1.e-1 + +set log [proximity f1 f2 -value -profile] +regexp {Proximity value: ([0-9+-.eE]*)} $log full val; + +set tol 1.e-3 +set expected 1.0 + +regexp {Status of ProxPnt1 on ([A-Za-z0-9._-]*) : ([A-Za-z]*)} $log full val1 val2 +set status1 ${val2} +set expected_status1 Border + +regexp {Status of ProxPnt2 on ([A-Za-z0-9._-]*) : ([A-Za-z]*)} $log full val1 val2 +set status2 ${val2} +set expected_status2 Border \ No newline at end of file diff --git a/tests/lowalgos/proximity/B2 b/tests/lowalgos/proximity/B2 new file mode 100644 index 0000000000..aff0e9a10b --- /dev/null +++ b/tests/lowalgos/proximity/B2 @@ -0,0 +1,28 @@ +puts "============" +puts "0033017: Implement an algorithm to find a proximity between a pair of shapes" +puts "===========" +puts "" + +plane p1 0 0 0 0 0 1 +trim p1 p1 -1 1 -1 1 +mkface f1 p1 +incmesh f1 1.e-1 + +plane p2 0 0 1 -1 0 0 +trim p2 p2 -1 1 -1 1 +mkface f2 p2 +incmesh f2 1.e-1 + +set log [proximity f1 f2 -value -profile] +regexp {Proximity value: ([0-9+-.eE]*)} $log full val; + +set tol 1.e-3 +set expected 1.0 + +regexp {Status of ProxPnt1 on ([A-Za-z0-9._-]*) : ([A-Za-z]*)} $log full val1 val2 +set status1 ${val2} +set expected_status1 Border + +regexp {Status of ProxPnt2 on ([A-Za-z0-9._-]*) : ([A-Za-z]*)} $log full val1 val2 +set status2 ${val2} +set expected_status2 Border \ No newline at end of file diff --git a/tests/lowalgos/proximity/B3 b/tests/lowalgos/proximity/B3 new file mode 100644 index 0000000000..67f0c62a6f --- /dev/null +++ b/tests/lowalgos/proximity/B3 @@ -0,0 +1,28 @@ +puts "============" +puts "0033017: Implement an algorithm to find a proximity between a pair of shapes" +puts "===========" +puts "" + +plane p1 0 0 0 0 0 1 +trim p1 p1 -1 1 -1 1 +mkface f1 p1 +incmesh f1 1.e-1 + +plane p2 0 0 0 -1 0 0 +trim p2 p2 -1 1 -1 1 +mkface f2 p2 +incmesh f2 1.e-1 + +set log [proximity f1 f2 -value -profile] +regexp {Proximity value: ([0-9+-.eE]*)} $log full val; + +set tol 1.e-3 +set expected 1.0 + +regexp {Status of ProxPnt1 on ([A-Za-z0-9._-]*) : ([A-Za-z]*)} $log full val1 val2 +set status1 ${val2} +set expected_status1 Border + +regexp {Status of ProxPnt2 on ([A-Za-z0-9._-]*) : ([A-Za-z]*)} $log full val1 val2 +set status2 ${val2} +set expected_status2 Border \ No newline at end of file diff --git a/tests/lowalgos/proximity/B4 b/tests/lowalgos/proximity/B4 new file mode 100644 index 0000000000..1250bbf6fb --- /dev/null +++ b/tests/lowalgos/proximity/B4 @@ -0,0 +1,28 @@ +puts "============" +puts "0033017: Implement an algorithm to find a proximity between a pair of shapes" +puts "===========" +puts "" + +plane p1 0 0 0 0 0 1 +trim p1 p1 -1 1 -1 1 +mkface f1 p1 +incmesh f1 1.e-1 + +plane p2 0 0 0.5 -1 0 0 +trim p2 p2 -1 1 -1 1 +mkface f2 p2 +incmesh f2 1.e-1 + +set log [proximity f1 f2 -value -profile] +regexp {Proximity value: ([0-9+-.eE]*)} $log full val; + +set tol 1.e-3 +set expected 1.0 + +regexp {Status of ProxPnt1 on ([A-Za-z0-9._-]*) : ([A-Za-z]*)} $log full val1 val2 +set status1 ${val2} +set expected_status1 Border + +regexp {Status of ProxPnt2 on ([A-Za-z0-9._-]*) : ([A-Za-z]*)} $log full val1 val2 +set status2 ${val2} +set expected_status2 Border \ No newline at end of file diff --git a/tests/lowalgos/proximity/B5 b/tests/lowalgos/proximity/B5 new file mode 100644 index 0000000000..048d1834b9 --- /dev/null +++ b/tests/lowalgos/proximity/B5 @@ -0,0 +1,27 @@ +puts "============" +puts "0033017: Implement an algorithm to find a proximity between a pair of shapes" +puts "===========" +puts "" + +plane p1 0 0 0 0 0 1 +trim p1 p1 -1 1 -1 1 +mkface f1 p1 +incmesh f1 1.e-3 + +polyline f2 -1 -1 1 -1 1 1 1 1 2 1 -1 2 -1 -1 1 +mkplane f2 f2 +incmesh f2 1.e-3 + +set log [proximity f1 f2 -value -profile] +regexp {Proximity value: ([0-9+-.eE]*)} $log full val; + +set tol 1.e-3 +set expected [expr {0.8 * sqrt(5.0)}] + +regexp {Status of ProxPnt1 on ([A-Za-z0-9._-]*) : ([A-Za-z]*)} $log full val1 val2 +set status1 ${val2} +set expected_status1 Border + +regexp {Status of ProxPnt2 on ([A-Za-z0-9._-]*) : ([A-Za-z]*)} $log full val1 val2 +set status2 ${val2} +set expected_status2 Border \ No newline at end of file diff --git a/tests/lowalgos/proximity/B6 b/tests/lowalgos/proximity/B6 new file mode 100644 index 0000000000..860919a914 --- /dev/null +++ b/tests/lowalgos/proximity/B6 @@ -0,0 +1,27 @@ +puts "============" +puts "0033017: Implement an algorithm to find a proximity between a pair of shapes" +puts "===========" +puts "" + +plane p1 0 0 0 0 0 1 +trim p1 p1 -1 1 -1 1 +mkface f1 p1 +incmesh f1 1.e-3 + +circle c 0 0 1 1 +mkedge e1 c +incmesh e1 1.e-3 + +set log [proximity f1 e1 -value -profile] +regexp {Proximity value: ([0-9+-.eE]*)} $log full val; + +set tol 1.e-3 +set expected 1.0 + +regexp {Status of ProxPnt1 on ([A-Za-z0-9._-]*) : ([A-Za-z]*)} $log full val1 val2 +set status1 ${val2} +set expected_status1 Border + +regexp {Status of ProxPnt2 on ([A-Za-z0-9._-]*) : ([A-Za-z]*)} $log full val1 val2 +set status2 ${val2} +set expected_status2 Middle \ No newline at end of file diff --git a/tests/lowalgos/proximity/C1 b/tests/lowalgos/proximity/C1 new file mode 100644 index 0000000000..457512464c --- /dev/null +++ b/tests/lowalgos/proximity/C1 @@ -0,0 +1,29 @@ +puts "============" +puts "0033017: Implement an algorithm to find a proximity between a pair of shapes" +puts "===========" +puts "" + +plane p1 0 0 0 0 0 1 +trim p1 p1 -1 1 -1 1 +mkface f1 p1 +incmesh f1 1.e-3 + +dset lo pi/2. la 0. +cylinder cy1 0 0 0 cos(la)*cos(lo) cos(la)*sin(lo) sin(la) 0.1 +trimv cy1 cy1 0 1 +mkface fcy1 cy1 +incmesh fcy1 1.e-3 + +set log [proximity f1 fcy1 -value -profile] +regexp {Proximity value: ([0-9+-.eE]*)} $log full val; + +set tol 1.e-3 +set expected 0.1 + +regexp {Status of ProxPnt1 on ([A-Za-z0-9._-]*) : ([A-Za-z]*)} $log full val1 val2 +set status1 ${val2} +set expected_status1 Middle + +regexp {Status of ProxPnt2 on ([A-Za-z0-9._-]*) : ([A-Za-z]*)} $log full val1 val2 +set status2 ${val2} +set expected_status2 Border \ No newline at end of file diff --git a/tests/lowalgos/proximity/C2 b/tests/lowalgos/proximity/C2 new file mode 100644 index 0000000000..2920e41c82 --- /dev/null +++ b/tests/lowalgos/proximity/C2 @@ -0,0 +1,29 @@ +puts "============" +puts "0033017: Implement an algorithm to find a proximity between a pair of shapes" +puts "===========" +puts "" + +plane p1 0 0 0 0 0 1 +trim p1 p1 -2 2 -2 2 +mkface f1 p1 +incmesh f1 1.e-3 + +dset lo pi/2. la pi/4. +cylinder cy1 0 0 1 cos(la)*cos(lo) cos(la)*sin(lo) sin(la) 0.1 +trimv cy1 cy1 0 1 +mkface fcy1 cy1 +incmesh fcy1 1.e-3 + +set log [proximity f1 fcy1 -value -profile] +regexp {Proximity value: ([0-9+-.eE]*)} $log full val; + +set tol 1.e-3 +set expected [expr {1. + 1.1 * sqrt(2.)/2.}] + +regexp {Status of ProxPnt1 on ([A-Za-z0-9._-]*) : ([A-Za-z]*)} $log full val1 val2 +set status1 ${val2} +set expected_status1 Middle + +regexp {Status of ProxPnt2 on ([A-Za-z0-9._-]*) : ([A-Za-z]*)} $log full val1 val2 +set status2 ${val2} +set expected_status2 Border \ No newline at end of file diff --git a/tests/lowalgos/proximity/C3 b/tests/lowalgos/proximity/C3 new file mode 100644 index 0000000000..9323eb8574 --- /dev/null +++ b/tests/lowalgos/proximity/C3 @@ -0,0 +1,28 @@ +puts "============" +puts "0033017: Implement an algorithm to find a proximity between a pair of shapes" +puts "===========" +puts "" + +cylinder cy1 0 0 1 1 0 0 0.1 +trimv cy1 cy1 0 1 +mkface fcy1 cy1 +incmesh fcy1 1.e-3 + +cylinder cy2 0 0 0 1 0 0 0.1 +trimv cy2 cy2 0 1 +mkface fcy2 cy2 +incmesh fcy2 1.e-3 + +set log [proximity fcy1 fcy2 -value -profile] +regexp {Proximity value: ([0-9+-.eE]*)} $log full val; + +set tol 1.e-3 +set expected 1.0 + +regexp {Status of ProxPnt1 on ([A-Za-z0-9._-]*) : ([A-Za-z]*)} $log full val1 val2 +set status1 ${val2} +set expected_status1 Border + +regexp {Status of ProxPnt2 on ([A-Za-z0-9._-]*) : ([A-Za-z]*)} $log full val1 val2 +set status2 ${val2} +set expected_status2 Border \ No newline at end of file diff --git a/tests/lowalgos/proximity/C4 b/tests/lowalgos/proximity/C4 new file mode 100644 index 0000000000..acbaf9ff78 --- /dev/null +++ b/tests/lowalgos/proximity/C4 @@ -0,0 +1,28 @@ +puts "============" +puts "0033017: Implement an algorithm to find a proximity between a pair of shapes" +puts "===========" +puts "" + +cylinder cy1 0 0 1 1 0 0 0.1 +trim cy1 cy1 -pi/2. pi/2. 0 1 +mkface fcy1 cy1 +incmesh fcy1 1.e-5 + +cylinder cy2 0 0 0 1 0 0 0.1 +trim cy2 cy2 pi/2. -pi/2. 0 1 +mkface fcy2 cy2 +incmesh fcy2 1.e-5 + +set log [proximity fcy1 fcy2 -value -profile] +regexp {Proximity value: ([0-9+-.eE]*)} $log full val; + +set tol 1.e-3 +set expected 1.2 + +regexp {Status of ProxPnt1 on ([A-Za-z0-9._-]*) : ([A-Za-z]*)} $log full val1 val2 +set status1 ${val2} +set expected_status1 Border + +regexp {Status of ProxPnt2 on ([A-Za-z0-9._-]*) : ([A-Za-z]*)} $log full val1 val2 +set status2 ${val2} +set expected_status2 Border \ No newline at end of file diff --git a/tests/lowalgos/proximity/D1 b/tests/lowalgos/proximity/D1 new file mode 100644 index 0000000000..2e8dccc185 --- /dev/null +++ b/tests/lowalgos/proximity/D1 @@ -0,0 +1,28 @@ +puts "============" +puts "0033017: Implement an algorithm to find a proximity between a pair of shapes" +puts "===========" +puts "" + +sphere s1 0 1 0 0 0 1 1 +trimu s1 s1 0 pi +mkface fs1 s1 +incmesh fs1 1e-3 + +sphere s2 0 -1 0 0 0 1 1 +trimu s2 s2 -pi 0 +mkface fs2 s2 +incmesh fs2 1e-3 + +set log [proximity fs1 fs2 -value -profile] +regexp {Proximity value: ([0-9+-.eE]*)} $log full val; + +set tol 1.e-2 +set expected 4.0 + +regexp {Status of ProxPnt1 on ([A-Za-z0-9._-]*) : ([A-Za-z]*)} $log full val1 val2 +set status1 ${val2} +set expected_status1 Middle + +regexp {Status of ProxPnt2 on ([A-Za-z0-9._-]*) : ([A-Za-z]*)} $log full val1 val2 +set status2 ${val2} +set expected_status2 Middle \ No newline at end of file diff --git a/tests/lowalgos/proximity/D2 b/tests/lowalgos/proximity/D2 new file mode 100644 index 0000000000..0c19db3fbb --- /dev/null +++ b/tests/lowalgos/proximity/D2 @@ -0,0 +1,26 @@ +puts "============" +puts "0033017: Implement an algorithm to find a proximity between a pair of shapes" +puts "===========" +puts "" + +sphere s1 0 1 0 0 0 1 1 +mkface fs1 s1 +incmesh fs1 1e-3 + +sphere s2 0 -1 0 0 0 1 1 +mkface fs2 s2 +incmesh fs2 1e-3 + +set log [proximity fs1 fs2 -value -profile] +regexp {Proximity value: ([0-9+-.eE]*)} $log full val; + +set tol 1.e-2 +set expected 4.0 + +regexp {Status of ProxPnt1 on ([A-Za-z0-9._-]*) : ([A-Za-z]*)} $log full val1 val2 +set status1 ${val2} +set expected_status1 Middle + +regexp {Status of ProxPnt2 on ([A-Za-z0-9._-]*) : ([A-Za-z]*)} $log full val1 val2 +set status2 ${val2} +set expected_status2 Middle \ No newline at end of file diff --git a/tests/lowalgos/proximity/D3 b/tests/lowalgos/proximity/D3 new file mode 100644 index 0000000000..8a3704cb1f --- /dev/null +++ b/tests/lowalgos/proximity/D3 @@ -0,0 +1,33 @@ +puts "============" +puts "0033017: Implement an algorithm to find a proximity between a pair of shapes" +puts "===========" +puts "" + +sphere s1 0 1 0 0 0 1 1 +trimu s1_1 s1 0 0.5*pi +trimu s1_2 s1 0.5*pi pi + +mkface fs1_1 s1_1 +mkface fs1_2 s1_2 +compound fs1_1 fs1_2 fs1 +incmesh fs1 1e-3 + +plane p1 0 0 0 0 1 0 +trim p1 p1 -2 2 -2 2 +mkface f2 p1 +incmesh f2 0.001 + +set log [proximity fs1 f2 -value -profile] + +regexp {Proximity value: ([0-9+-.eE]*)} $log full val; + +set tol 1.e-2 +set expected 2.0 + +regexp {Status of ProxPnt1 on ([A-Za-z0-9._-]*) : ([A-Za-z]*)} $log full val1 val2 +set status1 ${val2} +set expected_status1 Border + +regexp {Status of ProxPnt2 on ([A-Za-z0-9._-]*) : ([A-Za-z]*)} $log full val1 val2 +set status2 ${val2} +set expected_status2 Middle \ No newline at end of file diff --git a/tests/lowalgos/proximity/E1 b/tests/lowalgos/proximity/E1 new file mode 100644 index 0000000000..0997c1139d --- /dev/null +++ b/tests/lowalgos/proximity/E1 @@ -0,0 +1,30 @@ +puts "============" +puts "0033017: Implement an algorithm to find a proximity between a pair of shapes" +puts "===========" +puts "" + +beziercurve bc1 7 10 84 0 54 96 0 145 146 0 167 167 0 185 212 0 187 234 0 176 302 0 +beziercurve bc2 8 120 72 0 170 87 0 227 118 0 238 126 0 243 157 0 203 216 0 134 281 0 94 324 0 + +mkedge e1 bc1 +mkedge e2 bc2 + +incmesh e1 1.e-3 +incmesh e2 1.e-3 + +set log [proximity e1 e2 -value -profile] +regexp {Proximity value: ([0-9+-.eE]*)} $log full val; + +set tol 1.e-3 +explode e1 v +explode e2 v +distmini d e1_2 e2_2 +regexp {([-0-9.+eE]+)$} [dump d_val] full expected + +regexp {Status of ProxPnt1 on ([A-Za-z0-9._-]*) : ([A-Za-z]*)} $log full val1 val2 +set status1 ${val2} +set expected_status1 Border + +regexp {Status of ProxPnt2 on ([A-Za-z0-9._-]*) : ([A-Za-z]*)} $log full val1 val2 +set status2 ${val2} +set expected_status2 Border \ No newline at end of file diff --git a/tests/lowalgos/proximity/E2 b/tests/lowalgos/proximity/E2 new file mode 100644 index 0000000000..ffdd658156 --- /dev/null +++ b/tests/lowalgos/proximity/E2 @@ -0,0 +1,27 @@ +puts "============" +puts "0033017: Implement an algorithm to find a proximity between a pair of shapes" +puts "===========" +puts "" + +beziercurve bc1 6 54 96 0 145 146 0 167 167 0 185 212 0 187 234 0 176 302 0 +beziercurve bc2 7 120 72 0 170 87 0 227 118 0 238 126 0 243 157 0 203 216 0 134 281 0 + +mkedge e1 bc1 +mkedge e2 bc2 + +incmesh e1 1.e-3 +incmesh e2 1.e-3 + +set log [proximity e1 e2 -value -profile] +regexp {Proximity value: ([0-9+-.eE]*)} $log full val; + +set tol 1.e-3 +set expected 76.34 + +regexp {Status of ProxPnt1 on ([A-Za-z0-9._-]*) : ([A-Za-z]*)} $log full val1 val2 +set status1 ${val2} +set expected_status1 Middle + +regexp {Status of ProxPnt2 on ([A-Za-z0-9._-]*) : ([A-Za-z]*)} $log full val1 val2 +set status2 ${val2} +set expected_status2 Middle \ No newline at end of file diff --git a/tests/lowalgos/proximity/end b/tests/lowalgos/proximity/end new file mode 100644 index 0000000000..43cebceab4 --- /dev/null +++ b/tests/lowalgos/proximity/end @@ -0,0 +1,19 @@ +set er [expr abs(${expected} - ${val})] + +if {${er} > ${tol}} { + puts "Error: bad proximity value" +} else { + puts "OK" +} + +if {${status1} != ${expected_status1}} { + puts "Error: bad 1st proximity point status" +} else { + puts "OK" +} + +if {${status2} != ${expected_status2}} { + puts "Error: bad 2nd proximity point status" +} else { + puts "OK" +} \ No newline at end of file From f3573fb54b3c6bec23007ac2fe824c89f0466299 Mon Sep 17 00:00:00 2001 From: oan Date: Thu, 1 Sep 2022 13:49:19 +0300 Subject: [PATCH 378/639] 0031449: Mesh - BRepMesh works too long and produces many free nodes on a valid face Added test cases --- tests/bugs/mesh/bug31449_1 | 20 ++++++++++++++++++++ tests/bugs/mesh/bug31449_2 | 17 +++++++++++++++++ tests/bugs/mesh/bug31449_3 | 19 +++++++++++++++++++ 3 files changed, 56 insertions(+) create mode 100644 tests/bugs/mesh/bug31449_1 create mode 100644 tests/bugs/mesh/bug31449_2 create mode 100644 tests/bugs/mesh/bug31449_3 diff --git a/tests/bugs/mesh/bug31449_1 b/tests/bugs/mesh/bug31449_1 new file mode 100644 index 0000000000..f117e4a33c --- /dev/null +++ b/tests/bugs/mesh/bug31449_1 @@ -0,0 +1,20 @@ +puts "================" +puts "0031449: Mesh - BRepMesh works too long and produces many free nodes on a valid face" +puts "================" +puts "" + +pload XDE + +set aTmpFile ${imagedir}/${casename}.stp +ReadStep D [locate_data_file bug31301.stp] +WriteStep D ${aTmpFile} +param xstep.cascade.unit M +ReadStep Q ${aTmpFile} +XShow Q +vfit +vsetdispmode 1 + +XGetOneShape result Q +checktrinfo result -tri 9025 -nod 6562 + +checkview -screenshot -3d -path ${imagedir}/${test_image}.png diff --git a/tests/bugs/mesh/bug31449_2 b/tests/bugs/mesh/bug31449_2 new file mode 100644 index 0000000000..50d626d3ff --- /dev/null +++ b/tests/bugs/mesh/bug31449_2 @@ -0,0 +1,17 @@ +puts "================" +puts "0031449: Mesh - BRepMesh works too long and produces many free nodes on a valid face" +puts "================" +puts "" + +restore [locate_data_file bug31449_face_loopback_M.brep] result + +incmesh result 0.0001 + +set info_good [tricheck result] +if { [string compare $info_good "" ] != 0 } { + puts "Error : something wierd has been produced, like free nodes, or links" +} + +checktrinfo result -tri 65 -nod 67 + +checkview -display result -3d -path ${imagedir}/${test_image}.png diff --git a/tests/bugs/mesh/bug31449_3 b/tests/bugs/mesh/bug31449_3 new file mode 100644 index 0000000000..f77c0646c0 --- /dev/null +++ b/tests/bugs/mesh/bug31449_3 @@ -0,0 +1,19 @@ +puts "================" +puts "0031449: Mesh - BRepMesh works too long and produces many free nodes on a valid face" +puts "================" +puts "" + +pload XDE + +set aTmpFile ${imagedir}/${casename}.stp +ReadStep D [locate_data_file bug31301.stp] +WriteStep D ${aTmpFile} +param xstep.cascade.unit M +ReadStep Q ${aTmpFile} +XGetOneShape result Q + +incmesh result 0.00039624 -a 20 -min 0.0001 -parallel + +checktrinfo result -tri 7661 -nod 5810 + +checkview -display result -3d -path ${imagedir}/${test_image}.png From c4ea4ca3d1985c8acf77c86f9dc2b42a068eecf2 Mon Sep 17 00:00:00 2001 From: oan Date: Fri, 9 Sep 2022 11:29:38 +0300 Subject: [PATCH 379/639] 0032241: Mesh - wrong shading display of thrusections [regression since OCCT 7.4.0] 0032422: Mesh - Weird rendering 0029641: Mesher produce 'bad' result for extruded spline with given deviation coefficient Added method BRepMesh_NURBSRangeSplitter::getUndefinedInterval() intended to compute checkpoint parameters for those NURBS surfaces which have no intervals at all. In this case number of poles is used to produce artificial regular grid which can be refined further. Add at least one midpoint for surfaces with one interval and only two poles. Added BRepMesh_ExtrusionRangeSplitter and BRepMesh_UndefinedRangeSplitter derivatives from BRepMesh_NURBSRangeSplitter intended to handle special cases of extrusion surfaces and general surfaces with undefined parameters. --- .../BRepMesh_ExtrusionRangeSplitter.cxx | 45 ++++++++++++ .../BRepMesh_ExtrusionRangeSplitter.hxx | 45 ++++++++++++ src/BRepMesh/BRepMesh_MeshAlgoFactory.cxx | 15 +++- src/BRepMesh/BRepMesh_NURBSRangeSplitter.cxx | 72 +++++++++++++++---- src/BRepMesh/BRepMesh_NURBSRangeSplitter.hxx | 14 ++++ .../BRepMesh_UndefinedRangeSplitter.cxx | 28 ++++++++ .../BRepMesh_UndefinedRangeSplitter.hxx | 46 ++++++++++++ src/BRepMesh/FILES | 4 ++ tests/bugs/iges/buc60820_1 | 2 +- tests/bugs/iges/buc60820_2 | 2 +- tests/bugs/iges/buc60823 | 2 +- tests/bugs/iges/bug306 | 2 +- tests/bugs/mesh/bug23631 | 2 +- tests/bugs/mesh/bug25287 | 2 +- tests/bugs/mesh/bug27845 | 2 +- tests/bugs/mesh/bug29149 | 2 +- tests/bugs/mesh/bug29641 | 20 ++++++ tests/bugs/mesh/bug30008_1 | 2 +- tests/bugs/mesh/bug30167 | 2 +- tests/bugs/mesh/bug31251 | 4 +- tests/bugs/mesh/bug32241 | 31 ++++++++ tests/bugs/mesh/bug32422 | 32 +++++++++ tests/bugs/modalg_2/bug264_0 | 2 +- tests/bugs/modalg_2/bug292 | 2 +- tests/bugs/modalg_2/bug358 | 10 ++- tests/bugs/moddata_1/bug15519 | 2 +- tests/bugs/moddata_1/bug22759 | 2 +- tests/bugs/moddata_2/bug428 | 2 +- tests/de_mesh/shape_write_stl/A11 | 2 +- tests/de_mesh/shape_write_stl/A4 | 2 +- tests/hlr/poly_hlr/C12 | 2 +- tests/hlr/poly_hlr/C14 | 4 +- tests/hlr/poly_hlr/C15 | 2 +- tests/hlr/poly_hlr/C16 | 4 +- tests/hlr/poly_hlr/C17 | 2 +- tests/hlr/poly_hlr/C3 | 2 +- tests/hlr/poly_hlr/C7 | 2 +- tests/hlr/poly_hlr/bug23625_1 | 2 +- tests/hlr/poly_hlr/bug23625_2 | 2 +- tests/hlr/poly_hlr/bug23625_3 | 2 +- tests/hlr/poly_hlr/bug27719_102 | 2 +- tests/hlr/poly_hlr/bug27719_103 | 2 +- tests/hlr/poly_hlr/bug27719_104 | 2 +- tests/hlr/poly_hlr/bug27719_105 | 2 +- tests/mesh/data/advanced/B8 | 2 +- tests/mesh/data/standard/L2 | 2 +- tests/mesh/data/standard/M8 | 2 +- tests/mesh/data/standard/Q3 | 2 +- tests/mesh/data/standard/U2 | 4 +- tests/mesh/data/standard/W6 | 2 +- tests/mesh/data/standard/W7 | 2 +- tests/mesh/data/standard/X1 | 4 +- tests/perf/mesh/bug26965 | 2 +- tests/v3d/bugs/bug288_5 | 2 +- 54 files changed, 392 insertions(+), 64 deletions(-) create mode 100644 src/BRepMesh/BRepMesh_ExtrusionRangeSplitter.cxx create mode 100644 src/BRepMesh/BRepMesh_ExtrusionRangeSplitter.hxx create mode 100644 src/BRepMesh/BRepMesh_UndefinedRangeSplitter.cxx create mode 100644 src/BRepMesh/BRepMesh_UndefinedRangeSplitter.hxx create mode 100644 tests/bugs/mesh/bug29641 create mode 100644 tests/bugs/mesh/bug32241 create mode 100644 tests/bugs/mesh/bug32422 diff --git a/src/BRepMesh/BRepMesh_ExtrusionRangeSplitter.cxx b/src/BRepMesh/BRepMesh_ExtrusionRangeSplitter.cxx new file mode 100644 index 0000000000..e83693654a --- /dev/null +++ b/src/BRepMesh/BRepMesh_ExtrusionRangeSplitter.cxx @@ -0,0 +1,45 @@ +// Created on: 2022-09-07 +// Copyright (c) 2022 OPEN CASCADE SAS +// Created by: Oleg AGASHIN +// +// This file is part of Open CASCADE Technology software library. +// +// This library is free software; you can redistribute it and/or modify it under +// the terms of the GNU Lesser General Public License version 2.1 as published +// by the Free Software Foundation, with special exception defined in the file +// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT +// distribution for complete text of the license and disclaimer of any warranty. +// +// Alternatively, this file may be used under the terms of Open CASCADE +// commercial license or contractual agreement. + +#include + +//======================================================================= +// Function: getUndefinedIntervalNb +// Purpose : +//======================================================================= +Standard_Integer BRepMesh_ExtrusionRangeSplitter::getUndefinedIntervalNb( + const Handle(Adaptor3d_Surface)& theSurface, + const Standard_Boolean /*isU*/, + const GeomAbs_Shape theContinuity) const +{ + // Here we need just a regular grid along dimension with no + // geometrical data regarding intervals like extrusion surface. + const Handle(Adaptor3d_Curve) aCurve = theSurface->BasisCurve(); + Standard_Integer aIntervalsNb = aCurve->NbIntervals(theContinuity); + if (aIntervalsNb == 1) + { + const GeomAbs_CurveType aCurveType = aCurve->GetType(); + const Standard_Boolean isBSplineCurve = + aCurveType == GeomAbs_BezierCurve || + aCurveType == GeomAbs_BSplineCurve; + + if (isBSplineCurve) + { + aIntervalsNb = aCurve->NbPoles() - 1; + } + } + + return aIntervalsNb; +} diff --git a/src/BRepMesh/BRepMesh_ExtrusionRangeSplitter.hxx b/src/BRepMesh/BRepMesh_ExtrusionRangeSplitter.hxx new file mode 100644 index 0000000000..c1fda20d0a --- /dev/null +++ b/src/BRepMesh/BRepMesh_ExtrusionRangeSplitter.hxx @@ -0,0 +1,45 @@ +// Created on: 2022-09-07 +// Copyright (c) 2022 OPEN CASCADE SAS +// Created by: Oleg AGASHIN +// +// 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 _BRepMesh_ExtrusionRangeSplitter_HeaderFile +#define _BRepMesh_ExtrusionRangeSplitter_HeaderFile + +#include + +//! Auxiliary class analysing extrusion surface in order to generate internal nodes. +class BRepMesh_ExtrusionRangeSplitter : public BRepMesh_NURBSRangeSplitter +{ +public: + + //! Constructor. + BRepMesh_ExtrusionRangeSplitter() + { + } + + //! Destructor. + virtual ~BRepMesh_ExtrusionRangeSplitter() + { + } + +protected: + + //! Returns number of intervals computed using available geometrical parameters. + Standard_EXPORT virtual Standard_Integer getUndefinedIntervalNb( + const Handle(Adaptor3d_Surface)& theSurface, + const Standard_Boolean isU, + const GeomAbs_Shape theContinuity) const Standard_OVERRIDE; +}; + +#endif diff --git a/src/BRepMesh/BRepMesh_MeshAlgoFactory.cxx b/src/BRepMesh/BRepMesh_MeshAlgoFactory.cxx index 00fd9f9556..ce7cb6fba9 100644 --- a/src/BRepMesh/BRepMesh_MeshAlgoFactory.cxx +++ b/src/BRepMesh/BRepMesh_MeshAlgoFactory.cxx @@ -21,6 +21,8 @@ #include #include #include +#include +#include IMPLEMENT_STANDARD_RTTIEXT(BRepMesh_MeshAlgoFactory, IMeshTools_MeshAlgoFactory) @@ -98,7 +100,18 @@ Handle(IMeshTools_MeshAlgo) BRepMesh_MeshAlgoFactory::GetAlgo( return new DeflectionControlMeshAlgo::Type; break; - default: + case GeomAbs_SurfaceOfExtrusion: + return new DeflectionControlMeshAlgo::Type; + break; + + case GeomAbs_BezierSurface: + case GeomAbs_BSplineSurface: return new DeflectionControlMeshAlgo::Type; + break; + + case GeomAbs_OffsetSurface: + case GeomAbs_OtherSurface: + default: + return new DeflectionControlMeshAlgo::Type; } } diff --git a/src/BRepMesh/BRepMesh_NURBSRangeSplitter.cxx b/src/BRepMesh/BRepMesh_NURBSRangeSplitter.cxx index 7b0bdb67ad..186eca8059 100644 --- a/src/BRepMesh/BRepMesh_NURBSRangeSplitter.cxx +++ b/src/BRepMesh/BRepMesh_NURBSRangeSplitter.cxx @@ -392,27 +392,73 @@ Handle(IMeshData::ListOfPnt2d) BRepMesh_NURBSRangeSplitter::GenerateSurfaceNodes return aNodes; } +//======================================================================= +// Function: getUndefinedIntervalNb +// Purpose : +//======================================================================= +Standard_Integer BRepMesh_NURBSRangeSplitter::getUndefinedIntervalNb( + const Handle(Adaptor3d_Surface)& theSurface, + const Standard_Boolean isU, + const GeomAbs_Shape /*theContinuity*/) const +{ + return (isU ? theSurface->NbUPoles() : theSurface->NbVPoles()) - 1; +} + +//======================================================================= +// Function: getUndefinedInterval +// Purpose : +//======================================================================= +void BRepMesh_NURBSRangeSplitter::getUndefinedInterval( + const Handle(Adaptor3d_Surface)& theSurface, + const Standard_Boolean isU, + const GeomAbs_Shape theContinuity, + const std::pair& theRange, + TColStd_Array1OfReal& theIntervals) const +{ + Standard_Integer aIntervalsNb = isU ? + theSurface->NbUIntervals(theContinuity) : + theSurface->NbVIntervals(theContinuity); + + if (aIntervalsNb == 1) + { + aIntervalsNb = getUndefinedIntervalNb(theSurface, isU, theContinuity); + if (aIntervalsNb > 1) + { + theIntervals = TColStd_Array1OfReal(1, aIntervalsNb - 1); + const Standard_Real aDiff = (theRange.second - theRange.first) / aIntervalsNb; + for (Standard_Integer i = theIntervals.Lower(); i <= theIntervals.Upper(); ++i) + { + theIntervals.SetValue(i, theRange.first + i * aDiff); + } + } + } + + if (theIntervals.IsEmpty()) + { + theIntervals = TColStd_Array1OfReal(1, aIntervalsNb + 1); + if (isU) + { + theSurface->UIntervals(theIntervals, theContinuity); + } + else + { + theSurface->VIntervals(theIntervals, theContinuity); + } + } +} + //======================================================================= // Function: initParameters // Purpose : //======================================================================= Standard_Boolean BRepMesh_NURBSRangeSplitter::initParameters() const { - const Handle(BRepAdaptor_Surface)& aSurface = GetSurface(); - const GeomAbs_Shape aContinuity = GeomAbs_CN; - const std::pair aIntervalsNb( - aSurface->NbUIntervals(aContinuity), - aSurface->NbVIntervals(aContinuity) - ); - - TColStd_Array1OfReal aIntervals[2] = { - TColStd_Array1OfReal(1, aIntervalsNb.first + 1), - TColStd_Array1OfReal(1, aIntervalsNb.second + 1) - }; + const Handle(BRepAdaptor_Surface)& aSurface = GetSurface(); - aSurface->UIntervals(aIntervals[0], aContinuity); - aSurface->VIntervals(aIntervals[1], aContinuity); + TColStd_Array1OfReal aIntervals[2]; + getUndefinedInterval(aSurface, Standard_True, aContinuity, GetRangeU(), aIntervals[0]); + getUndefinedInterval(aSurface, Standard_False, aContinuity, GetRangeV(), aIntervals[1]); const Standard_Boolean isSplitIntervals = toSplitIntervals (aSurface->Surface().Surface(), aIntervals); diff --git a/src/BRepMesh/BRepMesh_NURBSRangeSplitter.hxx b/src/BRepMesh/BRepMesh_NURBSRangeSplitter.hxx index 9dfc40973b..525b44a4f3 100644 --- a/src/BRepMesh/BRepMesh_NURBSRangeSplitter.hxx +++ b/src/BRepMesh/BRepMesh_NURBSRangeSplitter.hxx @@ -49,7 +49,21 @@ protected: //! Initializes U and V parameters lists using CN continuity intervals. Standard_EXPORT virtual Standard_Boolean initParameters() const; + //! Returns number of intervals computed using available geometrical parameters. + Standard_EXPORT virtual Standard_Integer getUndefinedIntervalNb( + const Handle(Adaptor3d_Surface)& theSurface, + const Standard_Boolean isU, + const GeomAbs_Shape theContinuity) const; + private: + //! Tries to compute intervals even for cases with no intervals + //! at all using available geometrical parameters. + void getUndefinedInterval( + const Handle(Adaptor3d_Surface)& theSurface, + const Standard_Boolean isU, + const GeomAbs_Shape theContinuity, + const std::pair& theRange, + TColStd_Array1OfReal& theIntervals) const; //! Computes parameters of filter and applies it to the source parameters. Handle(IMeshData::SequenceOfReal) computeGrainAndFilterParameters( diff --git a/src/BRepMesh/BRepMesh_UndefinedRangeSplitter.cxx b/src/BRepMesh/BRepMesh_UndefinedRangeSplitter.cxx new file mode 100644 index 0000000000..4e0c8ab249 --- /dev/null +++ b/src/BRepMesh/BRepMesh_UndefinedRangeSplitter.cxx @@ -0,0 +1,28 @@ +// Created on: 2022-09-07 +// Copyright (c) 2022 OPEN CASCADE SAS +// Created by: Oleg AGASHIN +// +// This file is part of Open CASCADE Technology software library. +// +// This library is free software; you can redistribute it and/or modify it under +// the terms of the GNU Lesser General Public License version 2.1 as published +// by the Free Software Foundation, with special exception defined in the file +// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT +// distribution for complete text of the license and disclaimer of any warranty. +// +// Alternatively, this file may be used under the terms of Open CASCADE +// commercial license or contractual agreement. + +#include + +//======================================================================= +// Function: getUndefinedIntervalNb +// Purpose : +//======================================================================= +Standard_Integer BRepMesh_UndefinedRangeSplitter::getUndefinedIntervalNb( + const Handle(Adaptor3d_Surface)& /*theSurface*/, + const Standard_Boolean /*isU*/, + const GeomAbs_Shape /*theContinuity*/) const +{ + return 1; +} diff --git a/src/BRepMesh/BRepMesh_UndefinedRangeSplitter.hxx b/src/BRepMesh/BRepMesh_UndefinedRangeSplitter.hxx new file mode 100644 index 0000000000..2ca7ec01fb --- /dev/null +++ b/src/BRepMesh/BRepMesh_UndefinedRangeSplitter.hxx @@ -0,0 +1,46 @@ +// Created on: 2022-09-07 +// Copyright (c) 2022 OPEN CASCADE SAS +// Created by: Oleg AGASHIN +// +// 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 _BRepMesh_UndefinedRangeSplitter_HeaderFile +#define _BRepMesh_UndefinedRangeSplitter_HeaderFile + +#include + +//! Auxiliary class provides safe value for surfaces that looks like NURBS +//! but has no poles or other characteristics. +class BRepMesh_UndefinedRangeSplitter : public BRepMesh_NURBSRangeSplitter +{ +public: + + //! Constructor. + BRepMesh_UndefinedRangeSplitter() + { + } + + //! Destructor. + virtual ~BRepMesh_UndefinedRangeSplitter() + { + } + +protected: + + //! Returns number of intervals computed using available geometrical parameters. + Standard_EXPORT virtual Standard_Integer getUndefinedIntervalNb( + const Handle(Adaptor3d_Surface)& theSurface, + const Standard_Boolean isU, + const GeomAbs_Shape theContinuity) const Standard_OVERRIDE; +}; + +#endif diff --git a/src/BRepMesh/FILES b/src/BRepMesh/FILES index d1d2fa3511..07fbe7e0dd 100755 --- a/src/BRepMesh/FILES +++ b/src/BRepMesh/FILES @@ -40,6 +40,8 @@ BRepMesh_EdgeDiscret.hxx BRepMesh_EdgeParameterProvider.hxx BRepMesh_EdgeTessellationExtractor.cxx BRepMesh_EdgeTessellationExtractor.hxx +BRepMesh_ExtrusionRangeSplitter.cxx +BRepMesh_ExtrusionRangeSplitter.hxx BRepMesh_FaceChecker.cxx BRepMesh_FaceChecker.hxx BRepMesh_FaceDiscret.cxx @@ -80,6 +82,8 @@ BRepMesh_SphereRangeSplitter.hxx BRepMesh_TorusRangeSplitter.cxx BRepMesh_TorusRangeSplitter.hxx BRepMesh_Triangle.hxx +BRepMesh_UndefinedRangeSplitter.cxx +BRepMesh_UndefinedRangeSplitter.hxx BRepMesh_UVParamRangeSplitter.hxx BRepMesh_Vertex.hxx BRepMesh_VertexInspector.hxx diff --git a/tests/bugs/iges/buc60820_1 b/tests/bugs/iges/buc60820_1 index ff82704d2c..9abdd7c07c 100755 --- a/tests/bugs/iges/buc60820_1 +++ b/tests/bugs/iges/buc60820_1 @@ -12,5 +12,5 @@ tclean result incmesh result 0.1 triangles result -checktrinfo result -tri 638 -nod 564 +checktrinfo result -tri 736 -nod 613 checkview -display result -2d -path ${imagedir}/${test_image}.png diff --git a/tests/bugs/iges/buc60820_2 b/tests/bugs/iges/buc60820_2 index 2ceebe03c0..06cfcf9687 100755 --- a/tests/bugs/iges/buc60820_2 +++ b/tests/bugs/iges/buc60820_2 @@ -13,6 +13,6 @@ vdisplay result vsetdispmode result 1 vfit -checktrinfo result -tri 200 -nod 215 +checktrinfo result -tri 202 -nod 216 checkview -display result -2d -path ${imagedir}/${test_image}.png diff --git a/tests/bugs/iges/buc60823 b/tests/bugs/iges/buc60823 index e80b533a86..70902ee48c 100755 --- a/tests/bugs/iges/buc60823 +++ b/tests/bugs/iges/buc60823 @@ -14,6 +14,6 @@ vdisplay result vsetdispmode result 1 vfit -checktrinfo result -tri 2722 -nod 2618 +checktrinfo result -tri 3496 -nod 3005 checkview -display result -2d -path ${imagedir}/${test_image}.png diff --git a/tests/bugs/iges/bug306 b/tests/bugs/iges/bug306 index 0e844344e3..a772296c97 100755 --- a/tests/bugs/iges/bug306 +++ b/tests/bugs/iges/bug306 @@ -20,7 +20,7 @@ vsetdispmode result 1 vdisplay result vfit -checktrinfo result -tri 5812 -nod 5809 +checktrinfo result -tri 6014 -nod 5910 checkmaxtol result -ref 0.92213088179312575 checknbshapes result -shell 1 diff --git a/tests/bugs/mesh/bug23631 b/tests/bugs/mesh/bug23631 index 2c2e7bda24..d90bc34066 100644 --- a/tests/bugs/mesh/bug23631 +++ b/tests/bugs/mesh/bug23631 @@ -13,7 +13,7 @@ restore [locate_data_file OCC396_f2903.brep] result incmesh result 0.01 triangles result -checktrinfo result -tri 57 -nod 59 +checktrinfo result -tri 75 -nod 68 vinit vdisplay result diff --git a/tests/bugs/mesh/bug25287 b/tests/bugs/mesh/bug25287 index 80336f81b3..2905c18057 100644 --- a/tests/bugs/mesh/bug25287 +++ b/tests/bugs/mesh/bug25287 @@ -11,7 +11,7 @@ renamevar a_1 result incmesh result 0.0001 -a 30 -force_face_def -parallel -checktrinfo result -tri 12512 -nod 8519 -defl 0.00031502118964205414 -tol_abs_defl 1e-6 +checktrinfo result -tri 14494 -nod 9510 -defl 0.00031502118964205414 -tol_abs_defl 1e-6 vinit vsetdispmode 1 diff --git a/tests/bugs/mesh/bug27845 b/tests/bugs/mesh/bug27845 index ce91dc3ea4..6287701923 100644 --- a/tests/bugs/mesh/bug27845 +++ b/tests/bugs/mesh/bug27845 @@ -14,7 +14,7 @@ vdisplay result vfit checkview -screenshot -3d -path ${imagedir}/${test_image}.png -checktrinfo result -tri 3006 -nod 4360 -defl 3.0544822246414993 -tol_abs_defl 1e-6 +checktrinfo result -tri 3828 -nod 4771 -defl 3.0544822246414993 -tol_abs_defl 1e-6 set log [tricheck result] if { [llength $log] != 0 } { diff --git a/tests/bugs/mesh/bug29149 b/tests/bugs/mesh/bug29149 index dacd0d686c..1581ca660e 100644 --- a/tests/bugs/mesh/bug29149 +++ b/tests/bugs/mesh/bug29149 @@ -7,7 +7,7 @@ restore [locate_data_file bug29149.brep] result tclean result incmesh result 0.1 -checktrinfo result -tri 7998 -nod 4931 -defl 1.9852316024615062 -tol_abs_defl 1e-6 +checktrinfo result -tri 8972 -nod 5418 -defl 1.4639409344792007 -tol_abs_defl 1e-6 # Reduce shape tolerance in order to hard check of mesh quality settolerance result 1.0e-7 diff --git a/tests/bugs/mesh/bug29641 b/tests/bugs/mesh/bug29641 new file mode 100644 index 0000000000..f6c75ad069 --- /dev/null +++ b/tests/bugs/mesh/bug29641 @@ -0,0 +1,20 @@ +puts "========" +puts "0029641: Mesher produce 'bad' result for extruded spline with given deviation coefficient" +puts "========" +puts "" + +restore [locate_data_file bug29641.brep] result +tclean result + +vinit +vdefaults -devCoeff 0.0001 + +vsetdispmode 1 +vdisplay result +vtop +vrotate -0.1 0.1 1 0 0 0 +vfit + +checktrinfo result -tri 29040 -nod 15358 + +checkview -screenshot -3d -path ${imagedir}/${test_image}.png diff --git a/tests/bugs/mesh/bug30008_1 b/tests/bugs/mesh/bug30008_1 index 16804a4c3d..034531a702 100644 --- a/tests/bugs/mesh/bug30008_1 +++ b/tests/bugs/mesh/bug30008_1 @@ -12,6 +12,6 @@ vdisplay result vviewparams -scale 8.46292 -proj 0.653203 -0.644806 0.396926 -up -0.0109833 0.51609 0.856464 -at 347.559 1026.89 219.262 -eye 2080.75 -684.022 1272.45 tricheck result -checktrinfo result -tri 6978 -nod 4890 -defl 8.4394056682382157 -tol_abs_defl 1e-6 +checktrinfo result -tri 6996 -nod 4899 -defl 8.4394056682382157 -tol_abs_defl 1e-6 checkview -screenshot -3d -path ${imagedir}/${test_image}.png diff --git a/tests/bugs/mesh/bug30167 b/tests/bugs/mesh/bug30167 index 74edff3f44..70932914c2 100644 --- a/tests/bugs/mesh/bug30167 +++ b/tests/bugs/mesh/bug30167 @@ -12,6 +12,6 @@ vdisplay result vfit tricheck result -checktrinfo result -tri 3424 -nod 1801 -max_defl 0.55846824898476011 -tol_abs_defl 1.0e-6 +checktrinfo result -tri 2954 -nod 1566 -max_defl 0.66166700094601016 -tol_abs_defl 1.0e-6 checkview -screenshot -3d -path ${imagedir}/${test_image}.png diff --git a/tests/bugs/mesh/bug31251 b/tests/bugs/mesh/bug31251 index 923d621ba8..d1af096e35 100644 --- a/tests/bugs/mesh/bug31251 +++ b/tests/bugs/mesh/bug31251 @@ -15,7 +15,7 @@ vdefaults -autoTriang 0 tclean result incmesh result 0.004 -a 14 -checktrinfo result -tri 70556 -nod 39944 -defl 0.24607185555570676 -tol_abs_defl 1e-6 +checktrinfo result -tri 72522 -nod 40927 -defl 0.24607185555570676 -tol_abs_defl 1e-6 vdisplay result -redisplay vfit @@ -23,7 +23,7 @@ checkview -screenshot -3d -path ${imagedir}/${test_image}_default.png tclean result incmesh result 0.004 -a 14 -force_face_def -checktrinfo result -tri 292556 -nod 150944 -defl 0.16388671063364907 -tol_abs_defl 1e-6 +checktrinfo result -tri 288022 -nod 148677 -defl 0.16388671063364907 -tol_abs_defl 1e-6 vdisplay result -redisplay vfit diff --git a/tests/bugs/mesh/bug32241 b/tests/bugs/mesh/bug32241 new file mode 100644 index 0000000000..9eab9b1b25 --- /dev/null +++ b/tests/bugs/mesh/bug32241 @@ -0,0 +1,31 @@ +puts "========" +puts "0032241: Mesh - wrong shading display of thrusections" +puts "========" +puts "" + +pload MODELING VISUALIZATION + +circle c0 0 0 0 0 0 1 30 +circle c1 0 0 0 0 0 1 30 +rotate c1 2000 0 0 0 1 0 15 +circle c2 0 0 0 0 0 1 30 +rotate c2 2000 0 0 0 1 0 30 +circle c3 0 0 0 0 0 1 30 +rotate c3 2000 0 0 0 1 0 45 +circle c4 0 0 0 0 0 1 30 +rotate c4 2000 0 0 0 1 0 60 +mkedge e0 c0 +mkedge e1 c1 +mkedge e2 c2 +mkedge e3 c3 +mkedge e4 c4 +wire w0 e0 +wire w1 e1 +wire w2 e2 +wire w3 e3 +wire w4 e4 +thrusections result issolid w0 w1 w2 w3 w4 + +checkview -display result -3d -path ${imagedir}/${test_image}.png + +checktrinfo result -tri 2744 -nod 1420 diff --git a/tests/bugs/mesh/bug32422 b/tests/bugs/mesh/bug32422 new file mode 100644 index 0000000000..c6657451cd --- /dev/null +++ b/tests/bugs/mesh/bug32422 @@ -0,0 +1,32 @@ +puts "========" +puts "0032422: Mesh - Weird rendering" +puts "========" +puts "" + +pload MODELING VISUALIZATION + +pbsplinecurve sp1 3 9 0 2 73.198335334976 1 109.22594821708 1 168.29694729401 1 244.58155163942 1 307.53411471698 1 344.2978168401 1 379.98768527731 1 399.75469301329 2 77.34874687409 77.303696496535 0 1 -37.404350826922 66.469283013615 0 1 -38.129049645989 51.427809605917 0 1 45.003598352348 23.760586819334 0 1 -76.009618710498 -14.499612221562 0 1 44.396611605217 -43.851734118626 0 1 119.71153838454 27.656796734959 0 1 38.244406969565 24.98300747794 0 1 68.787902964874 60.998473938995 0 1 +mkedge eg1 sp1 +wire wr1 eg1 +mkplane fc1 wr1 +prism result fc1 0 0 100 +checkshape result + +vinit +vdisplay -dispMode 1 result +vfit + +checktrinfo result -tri 1286 -nod 863 + +explode result F +tessellate r result_1 50 50 + +vdisplay r -dispMode 1 +vaspects r -material STONE -color GREEN +vlocation r -location 0 0 -100 +vleft +vfit + +checktrinfo r -tri 5000 -nod 2601 + +checkview -screenshot -3d -path ${imagedir}/${test_image}.png diff --git a/tests/bugs/modalg_2/bug264_0 b/tests/bugs/modalg_2/bug264_0 index 3377959ff7..8816be638a 100755 --- a/tests/bugs/modalg_2/bug264_0 +++ b/tests/bugs/modalg_2/bug264_0 @@ -15,6 +15,6 @@ vclear isos result 0 triangles result -checktrinfo result -tri 10 -nod 12 +checktrinfo result -tri 14 -nod 14 checkprops result -s 1.3135 checkview -display result -3d -path ${imagedir}/${test_image}.png diff --git a/tests/bugs/modalg_2/bug292 b/tests/bugs/modalg_2/bug292 index 2060e1a3d2..dbb567ff41 100755 --- a/tests/bugs/modalg_2/bug292 +++ b/tests/bugs/modalg_2/bug292 @@ -19,6 +19,6 @@ vsetdispmode result 1 isos result 0 triangles result -checktrinfo result -tri 10 -nod 12 +checktrinfo result -tri 14 -nod 14 checkprops result -s 1.3135 checkview -display result -3d -path ${imagedir}/${test_image}.png diff --git a/tests/bugs/modalg_2/bug358 b/tests/bugs/modalg_2/bug358 index 620f147091..dc4d9f4d19 100755 --- a/tests/bugs/modalg_2/bug358 +++ b/tests/bugs/modalg_2/bug358 @@ -6,6 +6,14 @@ puts "========================" puts "The helical pipe is not shaded in AISViewer" ##### +if { [regexp {Windows} [dversion]] } { + set tri_n 19922 + set nod_n 10395 +} else { + set tri_n 19882 + set nod_n 10375 +} + restore [locate_data_file OCC358a.brep] f checkshape f @@ -19,7 +27,7 @@ vdisplay result vfit vsetdispmode result 1 -checktrinfo result -tri 21654 -nod 11261 +checktrinfo result -tri $tri_n -nod $nod_n checkprops result -s 24861.2 checkshape result checkview -display result -2d -path ${imagedir}/${test_image}.png diff --git a/tests/bugs/moddata_1/bug15519 b/tests/bugs/moddata_1/bug15519 index 4474ff3231..d7ade0deef 100755 --- a/tests/bugs/moddata_1/bug15519 +++ b/tests/bugs/moddata_1/bug15519 @@ -14,5 +14,5 @@ tclean result set Deflection 1. catch {incmesh result ${Deflection} } -checktrinfo result -tri 52956 -nod 46525 -defl 1.2592398118022043 -tol_rel_defl 0.001 -tol_rel_tri 0.001 -tol_rel_nod 0.001 +checktrinfo result -tri 59881 -nod 49987 -defl 1.6213275001104823 -tol_rel_defl 0.001 -tol_rel_tri 0.001 -tol_rel_nod 0.001 checkview -display result -2d -path ${imagedir}/${test_image}.png diff --git a/tests/bugs/moddata_1/bug22759 b/tests/bugs/moddata_1/bug22759 index e4f4976193..e3d701b477 100755 --- a/tests/bugs/moddata_1/bug22759 +++ b/tests/bugs/moddata_1/bug22759 @@ -19,7 +19,7 @@ tclean result set Deflection 0.001 incmesh result ${Deflection} -checktrinfo result -tri 375392 -nod 190670 -defl 0.080199363667810539 -tol_rel_defl 0.001 -tol_rel_tri 0.001 -tol_rel_nod 0.001 +checktrinfo result -tri 326712 -nod 166330 -defl 0.080199363667810539 -tol_rel_defl 0.001 -tol_rel_tri 0.001 -tol_rel_nod 0.001 vinit vdisplay result diff --git a/tests/bugs/moddata_2/bug428 b/tests/bugs/moddata_2/bug428 index 559d0ddb6f..db0bba7e45 100755 --- a/tests/bugs/moddata_2/bug428 +++ b/tests/bugs/moddata_2/bug428 @@ -19,5 +19,5 @@ isos result 0 triangles result fit -checktrinfo result -tri 7863 -nod 6342 +checktrinfo result -tri 7769 -nod 6295 checkview -screenshot -2d -path ${imagedir}/${test_image}_axo.png diff --git a/tests/de_mesh/shape_write_stl/A11 b/tests/de_mesh/shape_write_stl/A11 index 0761581555..3cfd7b57ed 100644 --- a/tests/de_mesh/shape_write_stl/A11 +++ b/tests/de_mesh/shape_write_stl/A11 @@ -9,7 +9,7 @@ writestl m $imagedir/${casename} readstl res $imagedir/${casename} file delete $imagedir/${casename} -checktrinfo res -tri 58 -nod 31 +checktrinfo res -tri 60 -nod 32 # Visual check checkview -display res -2d -path ${imagedir}/${test_image}.png diff --git a/tests/de_mesh/shape_write_stl/A4 b/tests/de_mesh/shape_write_stl/A4 index 80520051a3..706db284cd 100644 --- a/tests/de_mesh/shape_write_stl/A4 +++ b/tests/de_mesh/shape_write_stl/A4 @@ -9,7 +9,7 @@ writestl m $imagedir/${casename} readstl res $imagedir/${casename} file delete $imagedir/${casename} -checktrinfo res -tri 106 -nod 55 +checktrinfo res -tri 110 -nod 57 # Visual check checkview -display res -2d -path ${imagedir}/${test_image}.png diff --git a/tests/hlr/poly_hlr/C12 b/tests/hlr/poly_hlr/C12 index 3495b2dafc..69baa1a86d 100644 --- a/tests/hlr/poly_hlr/C12 +++ b/tests/hlr/poly_hlr/C12 @@ -1,5 +1,5 @@ set viewname "vright" -set length 514.884 +set length 516.649 testreadstep [locate_data_file bug27341_Adapter_Zylinder_2_CAD.stp] a COMPUTE_HLR $viewname $algotype diff --git a/tests/hlr/poly_hlr/C14 b/tests/hlr/poly_hlr/C14 index 5fde7169f6..7d32bbf757 100644 --- a/tests/hlr/poly_hlr/C14 +++ b/tests/hlr/poly_hlr/C14 @@ -1,7 +1,5 @@ -puts "TODO OCC30286 ALL: Error : The length of result shape is 5499.*, expected 5934.34" - set viewname "vright" -set length 5934.34 +set length 5502.06 testreadstep [locate_data_file bug27341_Assembly_BILZ_WFL2_1_CAD.stp] a COMPUTE_HLR $viewname $algotype diff --git a/tests/hlr/poly_hlr/C15 b/tests/hlr/poly_hlr/C15 index 08111c4f08..526f80eca3 100644 --- a/tests/hlr/poly_hlr/C15 +++ b/tests/hlr/poly_hlr/C15 @@ -1,5 +1,5 @@ set viewname "vright" -set length 5117.25 +set length 5102.18 testreadstep [locate_data_file bug27341_Assembly_GMS_Kurz_CAD.stp] a COMPUTE_HLR $viewname $algotype diff --git a/tests/hlr/poly_hlr/C16 b/tests/hlr/poly_hlr/C16 index aed240802e..4c2ecbe5c2 100644 --- a/tests/hlr/poly_hlr/C16 +++ b/tests/hlr/poly_hlr/C16 @@ -1,7 +1,5 @@ -puts "TODO OCC30286 ALL: Error : The length of result shape is 1664.\\d+, expected 1664.48" - set viewname "vright" -set length 1664.48 +set length 1662.85 testreadstep [locate_data_file bug27341_CCS_Adapter_CAD.stp] a COMPUTE_HLR $viewname $algotype diff --git a/tests/hlr/poly_hlr/C17 b/tests/hlr/poly_hlr/C17 index 028db8b5d3..bca493e4e6 100644 --- a/tests/hlr/poly_hlr/C17 +++ b/tests/hlr/poly_hlr/C17 @@ -1,5 +1,5 @@ set viewname "vright" -set length 2234.38 +set length 2239.23 testreadstep [locate_data_file bug27341_CCT_PMK_32_L_o_CAD.stp] a COMPUTE_HLR $viewname $algotype diff --git a/tests/hlr/poly_hlr/C3 b/tests/hlr/poly_hlr/C3 index 9c0397e884..6efe35f15c 100644 --- a/tests/hlr/poly_hlr/C3 +++ b/tests/hlr/poly_hlr/C3 @@ -1,5 +1,5 @@ set viewname "vright" -set length 3060.33 +set length 3059.05 testreadstep [locate_data_file bug27341_570-DWLNL-40-08-L_131LANG_16VERSATZ_DIN.stp] a COMPUTE_HLR $viewname $algotype diff --git a/tests/hlr/poly_hlr/C7 b/tests/hlr/poly_hlr/C7 index 74ed18c563..471a9cd4ef 100644 --- a/tests/hlr/poly_hlr/C7 +++ b/tests/hlr/poly_hlr/C7 @@ -1,5 +1,5 @@ set viewname "vright" -set length 2257 +set length 2261.22 testreadstep [locate_data_file bug27341_AIF_Grundhalter_GR1_CAD.stp] a COMPUTE_HLR $viewname $algotype diff --git a/tests/hlr/poly_hlr/bug23625_1 b/tests/hlr/poly_hlr/bug23625_1 index 9484d87381..49d3709ec7 100644 --- a/tests/hlr/poly_hlr/bug23625_1 +++ b/tests/hlr/poly_hlr/bug23625_1 @@ -6,7 +6,7 @@ puts "" puts "REQUIRED All: Meshing statuses: SelfIntersectingWire Failure" set viewname "vfront" -set length 28388 +set length 26881.1 restore [locate_data_file bug23625_a1.brep] a diff --git a/tests/hlr/poly_hlr/bug23625_2 b/tests/hlr/poly_hlr/bug23625_2 index 10b31c6352..af647e97e0 100644 --- a/tests/hlr/poly_hlr/bug23625_2 +++ b/tests/hlr/poly_hlr/bug23625_2 @@ -4,7 +4,7 @@ puts "============" puts "" set viewname "vfront" -set length 29113.3 +set length 27461.9 restore [locate_data_file bug23625_a2.brep] a COMPUTE_HLR $viewname $algotype diff --git a/tests/hlr/poly_hlr/bug23625_3 b/tests/hlr/poly_hlr/bug23625_3 index 264015f5c8..904e40f261 100644 --- a/tests/hlr/poly_hlr/bug23625_3 +++ b/tests/hlr/poly_hlr/bug23625_3 @@ -4,7 +4,7 @@ puts "============" puts "" set viewname "vtop" -set length 19604.4 +set length 19259.1 restore [locate_data_file bug23625_a3.brep] a COMPUTE_HLR $viewname $algotype diff --git a/tests/hlr/poly_hlr/bug27719_102 b/tests/hlr/poly_hlr/bug27719_102 index 6c3dd212bc..05492298d2 100644 --- a/tests/hlr/poly_hlr/bug27719_102 +++ b/tests/hlr/poly_hlr/bug27719_102 @@ -4,7 +4,7 @@ puts "=====================================" puts "" set viewname "vtop" -set length 5.7955 +set length 5.79554 restore [locate_data_file bug27719_Extruded.brep] a COMPUTE_HLR $viewname $algotype diff --git a/tests/hlr/poly_hlr/bug27719_103 b/tests/hlr/poly_hlr/bug27719_103 index 1487c3285f..03581f9274 100644 --- a/tests/hlr/poly_hlr/bug27719_103 +++ b/tests/hlr/poly_hlr/bug27719_103 @@ -4,7 +4,7 @@ puts "=====================================" puts "" set viewname "vbottom" -set length 6.14978 +set length 6.14989 restore [locate_data_file bug27719_Extruded.brep] a COMPUTE_HLR $viewname $algotype diff --git a/tests/hlr/poly_hlr/bug27719_104 b/tests/hlr/poly_hlr/bug27719_104 index 20d2811270..23f60bcc58 100644 --- a/tests/hlr/poly_hlr/bug27719_104 +++ b/tests/hlr/poly_hlr/bug27719_104 @@ -4,7 +4,7 @@ puts "=====================================" puts "" set viewname "vfront" -set length 7.4551 +set length 7.45513 restore [locate_data_file bug27719_Extruded.brep] a COMPUTE_HLR $viewname $algotype diff --git a/tests/hlr/poly_hlr/bug27719_105 b/tests/hlr/poly_hlr/bug27719_105 index ffdd518e82..81fe405518 100644 --- a/tests/hlr/poly_hlr/bug27719_105 +++ b/tests/hlr/poly_hlr/bug27719_105 @@ -4,7 +4,7 @@ puts "=====================================" puts "" set viewname "vback" -set length 7.48367 +set length 7.48374 restore [locate_data_file bug27719_Extruded.brep] a COMPUTE_HLR $viewname $algotype diff --git a/tests/mesh/data/advanced/B8 b/tests/mesh/data/advanced/B8 index 62f5350c5d..87bf1b5e3c 100755 --- a/tests/mesh/data/advanced/B8 +++ b/tests/mesh/data/advanced/B8 @@ -2,5 +2,5 @@ set TheFileName OCC357.brep if { [string compare $command "shading"] == 0 } { #set bug_area "OCC22687" set max_rel_tol_diff 0.25 - set rel_tol 1.7957583466671934 + set rel_tol 1.299910771524823 } diff --git a/tests/mesh/data/standard/L2 b/tests/mesh/data/standard/L2 index ac3c960853..6973536383 100755 --- a/tests/mesh/data/standard/L2 +++ b/tests/mesh/data/standard/L2 @@ -1,5 +1,5 @@ set TheFileName shading_101.brep if { [string compare $command "shading"] != 0 } { set max_rel_tol_diff 0.1 - set rel_tol 1.2162834127672983 + set rel_tol 0.3408446823303861 } diff --git a/tests/mesh/data/standard/M8 b/tests/mesh/data/standard/M8 index 76e189fee3..bbf534ac91 100755 --- a/tests/mesh/data/standard/M8 +++ b/tests/mesh/data/standard/M8 @@ -3,7 +3,7 @@ set max_rel_tol_diff 1 if { [string compare $command "shading"] == 0 } { set rel_tol 0.241 } else { - set rel_tol 6.376860334255998 + set rel_tol 3.2394842919345677 } #set bug_freenodes "M8" #set nbfreenodes(All) 1 diff --git a/tests/mesh/data/standard/Q3 b/tests/mesh/data/standard/Q3 index e8a44d2e65..ad0d842065 100755 --- a/tests/mesh/data/standard/Q3 +++ b/tests/mesh/data/standard/Q3 @@ -1,5 +1,5 @@ set TheFileName shading_147.brep if { [string compare $command "shading"] == 0 } { - set rel_tol 0.8791879462861206 + set rel_tol 0.8369721827353692 set max_rel_tol_diff 0.001 } diff --git a/tests/mesh/data/standard/U2 b/tests/mesh/data/standard/U2 index f5c48950be..9f1f17bc81 100755 --- a/tests/mesh/data/standard/U2 +++ b/tests/mesh/data/standard/U2 @@ -1,9 +1,9 @@ set TheFileName shading_wrongshape_004.brep ###set bug_area "OCC22687" if { [string compare $command "shading"] == 0 } { - set rel_tol 0.06073194250400039 + set rel_tol 0.07204699336483454 } else { - set rel_tol 0.003702162749171707 + set rel_tol 0.008767384551980804 } set max_rel_tol_diff 0.001 ###set bug_withouttri "OCC22687" diff --git a/tests/mesh/data/standard/W6 b/tests/mesh/data/standard/W6 index 44e267dd7e..c74273990c 100755 --- a/tests/mesh/data/standard/W6 +++ b/tests/mesh/data/standard/W6 @@ -1,6 +1,6 @@ set TheFileName shading_wrongshape_026.brep if { [string compare $command "shading"] == 0 } { - set rel_tol 0.06893312870606805 + set rel_tol 0.08526389274308782 } else { set rel_tol 0.0020125629706199506 } diff --git a/tests/mesh/data/standard/W7 b/tests/mesh/data/standard/W7 index e6df883e0a..d7130aea93 100755 --- a/tests/mesh/data/standard/W7 +++ b/tests/mesh/data/standard/W7 @@ -7,5 +7,5 @@ if { [string compare $command "shading"] != 0 } { set rel_tol 0.19838215623500813 } else { set max_rel_tol_diff 0.01 - set rel_tol 0.12561722204279838 + set rel_tol 0.18116134043436827 } diff --git a/tests/mesh/data/standard/X1 b/tests/mesh/data/standard/X1 index 2c66fdf882..cca36dd09f 100755 --- a/tests/mesh/data/standard/X1 +++ b/tests/mesh/data/standard/X1 @@ -6,8 +6,8 @@ set TheFileName shading_wrongshape_030.brep set bug_cross "OCC22687" set nbcross(All) 4 if { [string compare $command "shading"] == 0 } { - set rel_tol 0.5456843734442471 + set rel_tol 0.5225697108844659 } else { - set rel_tol 0.1783852555846471 + set rel_tol 0.1856053577754922 } set max_rel_tol_diff 0.001 diff --git a/tests/perf/mesh/bug26965 b/tests/perf/mesh/bug26965 index 6adc45da7c..8eda1a2b86 100644 --- a/tests/perf/mesh/bug26965 +++ b/tests/perf/mesh/bug26965 @@ -16,4 +16,4 @@ dchrono h vfit checkview -screenshot -3d -path ${imagedir}/${test_image}.png -checktrinfo a -tri 14764 -nod 7587 -defl 0.29573935005082458 -tol_abs_defl 1e-6 +checktrinfo a -tri 15564 -nod 7987 -defl 0.25696012112765304 -tol_abs_defl 1e-6 diff --git a/tests/v3d/bugs/bug288_5 b/tests/v3d/bugs/bug288_5 index 0486edd2bc..729d25add8 100644 --- a/tests/v3d/bugs/bug288_5 +++ b/tests/v3d/bugs/bug288_5 @@ -14,5 +14,5 @@ isos result 0 triangles result vfit -checktrinfo result -tri 8048 -nod 8247 +checktrinfo result -tri 8130 -nod 8288 vdump $imagedir/${casename}.png From a939fd40eb473e79134ba740ed8e3f8aa4df37a7 Mon Sep 17 00:00:00 2001 From: oan Date: Fri, 16 Sep 2022 17:28:22 +0300 Subject: [PATCH 380/639] 0031853: Mesh - holes in triangulation with large linear deflection 0030442: Mesh - broken triangulation on pipe shape Scale down min size parameter for NURBS taking into account its U and V resolution in order to prevent comparison of 2d parameters with 3d value involved in filtering process. --- src/BRepMesh/BRepMesh_NURBSRangeSplitter.cxx | 9 +++++-- tests/bugs/iges/buc60820_1 | 2 +- tests/bugs/iges/buc60820_2 | 2 +- tests/bugs/iges/buc60823 | 2 +- tests/bugs/mesh/bug27384_2 | 2 +- tests/bugs/mesh/bug27845 | 2 +- tests/bugs/mesh/bug28247 | 6 ++--- tests/bugs/mesh/bug29685 | 2 +- tests/bugs/mesh/bug29962 | 2 +- tests/bugs/mesh/bug30008_1 | 2 +- tests/bugs/mesh/bug30442 | 25 ++++++++++++++++++++ tests/bugs/mesh/bug31251 | 4 ++-- tests/bugs/mesh/bug31853 | 17 +++++++++++++ tests/bugs/mesh/bug32241 | 10 +++++++- tests/bugs/modalg_2/bug264_0 | 2 +- tests/bugs/modalg_2/bug264_11 | 2 +- tests/bugs/modalg_2/bug292 | 2 +- tests/bugs/moddata_1/bug15519 | 2 +- tests/bugs/moddata_2/bug428 | 2 +- tests/bugs/moddata_2/fra62476_2 | 2 +- tests/de_mesh/shape_write_stl/A4 | 2 +- tests/hlr/poly_hlr/C12 | 2 +- tests/hlr/poly_hlr/C13 | 2 +- tests/hlr/poly_hlr/C14 | 2 +- tests/hlr/poly_hlr/C15 | 2 +- tests/hlr/poly_hlr/C16 | 2 +- tests/hlr/poly_hlr/C17 | 2 +- tests/hlr/poly_hlr/C20 | 2 +- tests/hlr/poly_hlr/C4 | 4 +--- tests/hlr/poly_hlr/C5 | 4 +--- tests/hlr/poly_hlr/C6 | 2 +- tests/hlr/poly_hlr/C7 | 2 +- tests/hlr/poly_hlr/bug23625_1 | 2 +- tests/hlr/poly_hlr/bug23625_2 | 2 +- tests/hlr/poly_hlr/bug23625_3 | 2 +- tests/hlr/poly_hlr/bug27979_2 | 4 +--- tests/mesh/data/standard/W6 | 2 +- tests/mesh/data/standard/X1 | 2 +- 38 files changed, 95 insertions(+), 46 deletions(-) create mode 100644 tests/bugs/mesh/bug30442 create mode 100644 tests/bugs/mesh/bug31853 diff --git a/src/BRepMesh/BRepMesh_NURBSRangeSplitter.cxx b/src/BRepMesh/BRepMesh_NURBSRangeSplitter.cxx index 186eca8059..d0cb22ea67 100644 --- a/src/BRepMesh/BRepMesh_NURBSRangeSplitter.cxx +++ b/src/BRepMesh/BRepMesh_NURBSRangeSplitter.cxx @@ -553,12 +553,17 @@ Handle(IMeshData::SequenceOfReal) BRepMesh_NURBSRangeSplitter::computeGrainAndFi aMinDiff /= theDelta; } - aMinDiff = Max(theParameters.MinSize, aMinDiff); + const Handle(BRepAdaptor_Surface)& aSurface = GetSurface(); + const Standard_Real aMinSize2d = Max( + aSurface->UResolution(theParameters.MinSize), + aSurface->UResolution(theParameters.MinSize)); + + aMinDiff = Max(aMinSize2d, aMinDiff); const Standard_Real aDiffMaxLim = 0.1 * theRangeDiff; const Standard_Real aDiffMinLim = Max(0.005 * theRangeDiff, 2. * theTol2d); - const Standard_Real aDiff = Max(theParameters.MinSize, + const Standard_Real aDiff = Max(aMinSize2d, Min(aDiffMaxLim, aDiffMinLim)); return filterParameters(theSourceParams, aMinDiff, aDiff, theAllocator); } diff --git a/tests/bugs/iges/buc60820_1 b/tests/bugs/iges/buc60820_1 index 9abdd7c07c..3253afd1af 100755 --- a/tests/bugs/iges/buc60820_1 +++ b/tests/bugs/iges/buc60820_1 @@ -12,5 +12,5 @@ tclean result incmesh result 0.1 triangles result -checktrinfo result -tri 736 -nod 613 +checktrinfo result -tri 748 -nod 619 checkview -display result -2d -path ${imagedir}/${test_image}.png diff --git a/tests/bugs/iges/buc60820_2 b/tests/bugs/iges/buc60820_2 index 06cfcf9687..e030c94fcb 100755 --- a/tests/bugs/iges/buc60820_2 +++ b/tests/bugs/iges/buc60820_2 @@ -13,6 +13,6 @@ vdisplay result vsetdispmode result 1 vfit -checktrinfo result -tri 202 -nod 216 +checktrinfo result -tri 278 -nod 254 checkview -display result -2d -path ${imagedir}/${test_image}.png diff --git a/tests/bugs/iges/buc60823 b/tests/bugs/iges/buc60823 index 70902ee48c..13dd8fef4f 100755 --- a/tests/bugs/iges/buc60823 +++ b/tests/bugs/iges/buc60823 @@ -14,6 +14,6 @@ vdisplay result vsetdispmode result 1 vfit -checktrinfo result -tri 3496 -nod 3005 +checktrinfo result -tri 3552 -nod 3033 checkview -display result -2d -path ${imagedir}/${test_image}.png diff --git a/tests/bugs/mesh/bug27384_2 b/tests/bugs/mesh/bug27384_2 index e80517c6e0..640c5ca59a 100644 --- a/tests/bugs/mesh/bug27384_2 +++ b/tests/bugs/mesh/bug27384_2 @@ -17,7 +17,7 @@ vdefaults -autoTriang 0 vdisplay result vfit -set rel_tol 0.6928018366802983 +set rel_tol 0.7607262575544315 set max_rel_tol_diff 0.001 set area_eps 1 diff --git a/tests/bugs/mesh/bug27845 b/tests/bugs/mesh/bug27845 index 6287701923..5428d732a7 100644 --- a/tests/bugs/mesh/bug27845 +++ b/tests/bugs/mesh/bug27845 @@ -14,7 +14,7 @@ vdisplay result vfit checkview -screenshot -3d -path ${imagedir}/${test_image}.png -checktrinfo result -tri 3828 -nod 4771 -defl 3.0544822246414993 -tol_abs_defl 1e-6 +checktrinfo result -tri 3832 -nod 4773 -defl 3.0509255143612428 -tol_abs_defl 1e-6 set log [tricheck result] if { [llength $log] != 0 } { diff --git a/tests/bugs/mesh/bug28247 b/tests/bugs/mesh/bug28247 index 408b30c595..aeaf5888b6 100644 --- a/tests/bugs/mesh/bug28247 +++ b/tests/bugs/mesh/bug28247 @@ -19,7 +19,7 @@ incmesh result 0.59 vdisplay result -redisplay vfit -checktrinfo result -tri 1235 +checktrinfo result -tri 1863 checkview -screenshot -3d -path ${imagedir}/${test_image}-1.png tclean result @@ -27,7 +27,7 @@ incmesh result 0.59 -a 11.45 vdisplay result -redisplay vfit -checktrinfo result -tri 6438 +checktrinfo result -tri 6422 checkview -screenshot -3d -path ${imagedir}/${test_image}-2.png tclean result @@ -35,6 +35,6 @@ incmesh result 0.59 -a 11.45 -min 0.035 vdisplay result -redisplay vfit -checktrinfo result -tri 7079 +checktrinfo result -tri 6427 checkview -screenshot -3d -path ${imagedir}/${test_image}-3.png diff --git a/tests/bugs/mesh/bug29685 b/tests/bugs/mesh/bug29685 index a8cfc3e5a3..12c292d498 100644 --- a/tests/bugs/mesh/bug29685 +++ b/tests/bugs/mesh/bug29685 @@ -16,6 +16,6 @@ if { [llength $log] != 0 } { puts "Mesh is OK" } -checktrinfo result -tri 148 -nod 103 -defl 0.34778084099529977 -tol_abs_defl 1e-6 +checktrinfo result -tri 156 -nod 107 -defl 0.29785837547864635 -tol_abs_defl 1e-6 checkview -screenshot -3d -path ${imagedir}/${test_image}.png diff --git a/tests/bugs/mesh/bug29962 b/tests/bugs/mesh/bug29962 index be507083dd..8845afb25b 100644 --- a/tests/bugs/mesh/bug29962 +++ b/tests/bugs/mesh/bug29962 @@ -15,7 +15,7 @@ if { [llength $log1] != 0 } { puts "Mesh is OK" } -checktrinfo result -tri 2 -nod 4 -defl 5.5579174982152475 -tol_abs_defl 1e-6 +checktrinfo result -tri 344 -nod 175 -defl 48.278808345584679 -tol_abs_defl 1e-6 tclean result incmesh result 0.01 diff --git a/tests/bugs/mesh/bug30008_1 b/tests/bugs/mesh/bug30008_1 index 034531a702..add7ddfaab 100644 --- a/tests/bugs/mesh/bug30008_1 +++ b/tests/bugs/mesh/bug30008_1 @@ -12,6 +12,6 @@ vdisplay result vviewparams -scale 8.46292 -proj 0.653203 -0.644806 0.396926 -up -0.0109833 0.51609 0.856464 -at 347.559 1026.89 219.262 -eye 2080.75 -684.022 1272.45 tricheck result -checktrinfo result -tri 6996 -nod 4899 -defl 8.4394056682382157 -tol_abs_defl 1e-6 +checktrinfo result -tri 9470 -nod 6136 -defl 4.7757836297551908 -tol_abs_defl 1e-6 checkview -screenshot -3d -path ${imagedir}/${test_image}.png diff --git a/tests/bugs/mesh/bug30442 b/tests/bugs/mesh/bug30442 new file mode 100644 index 0000000000..3744389850 --- /dev/null +++ b/tests/bugs/mesh/bug30442 @@ -0,0 +1,25 @@ +puts "=======" +puts "0030442: Mesh - broken triangulation on pipe shape" +puts "=======" +puts "" + +bsmooth aSmoothCurve 1.0 [locate_data_file bug30442_points.txt] + +circle aCircle 0 0 0 1 1 1 20 + +mkedge aSpineEdge aSmoothCurve +mkedge aProfileEdge aCircle + +wire aSpineWire aSpineEdge +wire aProfileWire aProfileEdge + +pipe result aSpineWire aProfileWire + +vinit View1 +vdisplay result +vsetdispmode 1 +vfit + +checktrinfo result -tri 25814 -nod 12955 + +checkview -screenshot -3d -path ${imagedir}/${test_image}.png diff --git a/tests/bugs/mesh/bug31251 b/tests/bugs/mesh/bug31251 index d1af096e35..d8693fe8e2 100644 --- a/tests/bugs/mesh/bug31251 +++ b/tests/bugs/mesh/bug31251 @@ -15,7 +15,7 @@ vdefaults -autoTriang 0 tclean result incmesh result 0.004 -a 14 -checktrinfo result -tri 72522 -nod 40927 -defl 0.24607185555570676 -tol_abs_defl 1e-6 +checktrinfo result -tri 72570 -nod 40951 -defl 0.24607185555570676 -tol_abs_defl 1e-6 vdisplay result -redisplay vfit @@ -23,7 +23,7 @@ checkview -screenshot -3d -path ${imagedir}/${test_image}_default.png tclean result incmesh result 0.004 -a 14 -force_face_def -checktrinfo result -tri 288022 -nod 148677 -defl 0.16388671063364907 -tol_abs_defl 1e-6 +checktrinfo result -tri 287990 -nod 148661 -defl 0.16388671063364907 -tol_abs_defl 1e-6 vdisplay result -redisplay vfit diff --git a/tests/bugs/mesh/bug31853 b/tests/bugs/mesh/bug31853 new file mode 100644 index 0000000000..a309192618 --- /dev/null +++ b/tests/bugs/mesh/bug31853 @@ -0,0 +1,17 @@ +puts "=======" +puts "0031853: Mesh - holes in triangulation with large linear deflection" +puts "=======" +puts "" + +pload MODELING XDE VISUALIZATION + +testreadstep [locate_data_file bug31853_WR16-30.step] result + +incmesh result 1 -a 6 +checktrinfo result -tri 142834 -nod 72496 + +vinit View1 +vdefaults -autoTriang 0 +vdisplay -dispMode 1 result +vfit +checkview -screenshot -3d -path ${imagedir}/${test_image}.png diff --git a/tests/bugs/mesh/bug32241 b/tests/bugs/mesh/bug32241 index 9eab9b1b25..90b826a019 100644 --- a/tests/bugs/mesh/bug32241 +++ b/tests/bugs/mesh/bug32241 @@ -3,6 +3,14 @@ puts "0032241: Mesh - wrong shading display of thrusections" puts "========" puts "" +if { [regexp {Windows} [dversion]] } { + set tri_n 2702 + set nod_n 1399 +} else { + set tri_n 2766 + set nod_n 1431 +} + pload MODELING VISUALIZATION circle c0 0 0 0 0 0 1 30 @@ -28,4 +36,4 @@ thrusections result issolid w0 w1 w2 w3 w4 checkview -display result -3d -path ${imagedir}/${test_image}.png -checktrinfo result -tri 2744 -nod 1420 +checktrinfo result -tri $tri_n -nod $nod_n diff --git a/tests/bugs/modalg_2/bug264_0 b/tests/bugs/modalg_2/bug264_0 index 8816be638a..95078bc7cd 100755 --- a/tests/bugs/modalg_2/bug264_0 +++ b/tests/bugs/modalg_2/bug264_0 @@ -15,6 +15,6 @@ vclear isos result 0 triangles result -checktrinfo result -tri 14 -nod 14 +checktrinfo result -tri 26 -nod 20 checkprops result -s 1.3135 checkview -display result -3d -path ${imagedir}/${test_image}.png diff --git a/tests/bugs/modalg_2/bug264_11 b/tests/bugs/modalg_2/bug264_11 index eda4fb2af3..a733dbcb47 100755 --- a/tests/bugs/modalg_2/bug264_11 +++ b/tests/bugs/modalg_2/bug264_11 @@ -18,6 +18,6 @@ vclear isos result 0 triangles result -checktrinfo result -tri 55 -nod 40 +checktrinfo result -tri 31 -nod 28 checkprops result -s 0 checkview -display result -3d -path ${imagedir}/${test_image}.png diff --git a/tests/bugs/modalg_2/bug292 b/tests/bugs/modalg_2/bug292 index dbb567ff41..f0f9ad97dc 100755 --- a/tests/bugs/modalg_2/bug292 +++ b/tests/bugs/modalg_2/bug292 @@ -19,6 +19,6 @@ vsetdispmode result 1 isos result 0 triangles result -checktrinfo result -tri 14 -nod 14 +checktrinfo result -tri 26 -nod 20 checkprops result -s 1.3135 checkview -display result -3d -path ${imagedir}/${test_image}.png diff --git a/tests/bugs/moddata_1/bug15519 b/tests/bugs/moddata_1/bug15519 index d7ade0deef..639785f18a 100755 --- a/tests/bugs/moddata_1/bug15519 +++ b/tests/bugs/moddata_1/bug15519 @@ -14,5 +14,5 @@ tclean result set Deflection 1. catch {incmesh result ${Deflection} } -checktrinfo result -tri 59881 -nod 49987 -defl 1.6213275001104823 -tol_rel_defl 0.001 -tol_rel_tri 0.001 -tol_rel_nod 0.001 +checktrinfo result -tri 60069 -nod 50081 -defl 1.6213275001104823 -tol_rel_defl 0.001 -tol_rel_tri 0.001 -tol_rel_nod 0.001 checkview -display result -2d -path ${imagedir}/${test_image}.png diff --git a/tests/bugs/moddata_2/bug428 b/tests/bugs/moddata_2/bug428 index db0bba7e45..d4cce3e9f8 100755 --- a/tests/bugs/moddata_2/bug428 +++ b/tests/bugs/moddata_2/bug428 @@ -19,5 +19,5 @@ isos result 0 triangles result fit -checktrinfo result -tri 7769 -nod 6295 +checktrinfo result -tri 10463 -nod 7643 checkview -screenshot -2d -path ${imagedir}/${test_image}_axo.png diff --git a/tests/bugs/moddata_2/fra62476_2 b/tests/bugs/moddata_2/fra62476_2 index feebf5b4a4..a9c53d81e0 100755 --- a/tests/bugs/moddata_2/fra62476_2 +++ b/tests/bugs/moddata_2/fra62476_2 @@ -13,5 +13,5 @@ tclean result incmesh result .1 triangles result -checktrinfo result -tri 335 -nod 200 +checktrinfo result -tri 163 -nod 114 checkview -display result -3d -path ${imagedir}/${test_image}.png diff --git a/tests/de_mesh/shape_write_stl/A4 b/tests/de_mesh/shape_write_stl/A4 index 706db284cd..f413f878c2 100644 --- a/tests/de_mesh/shape_write_stl/A4 +++ b/tests/de_mesh/shape_write_stl/A4 @@ -9,7 +9,7 @@ writestl m $imagedir/${casename} readstl res $imagedir/${casename} file delete $imagedir/${casename} -checktrinfo res -tri 110 -nod 57 +checktrinfo res -tri 116 -nod 60 # Visual check checkview -display res -2d -path ${imagedir}/${test_image}.png diff --git a/tests/hlr/poly_hlr/C12 b/tests/hlr/poly_hlr/C12 index 69baa1a86d..fc3d46b17f 100644 --- a/tests/hlr/poly_hlr/C12 +++ b/tests/hlr/poly_hlr/C12 @@ -1,5 +1,5 @@ set viewname "vright" -set length 516.649 +set length 516.281 testreadstep [locate_data_file bug27341_Adapter_Zylinder_2_CAD.stp] a COMPUTE_HLR $viewname $algotype diff --git a/tests/hlr/poly_hlr/C13 b/tests/hlr/poly_hlr/C13 index 3b9c705210..bd4cf9a1cc 100644 --- a/tests/hlr/poly_hlr/C13 +++ b/tests/hlr/poly_hlr/C13 @@ -1,5 +1,5 @@ set viewname "vright" -set length 9546.99 +set length 9548.13 testreadstep [locate_data_file bug27341_Assembly_ABS_1_CAD.stp] a COMPUTE_HLR $viewname $algotype diff --git a/tests/hlr/poly_hlr/C14 b/tests/hlr/poly_hlr/C14 index 7d32bbf757..c49df14909 100644 --- a/tests/hlr/poly_hlr/C14 +++ b/tests/hlr/poly_hlr/C14 @@ -1,5 +1,5 @@ set viewname "vright" -set length 5502.06 +set length 5497.6 testreadstep [locate_data_file bug27341_Assembly_BILZ_WFL2_1_CAD.stp] a COMPUTE_HLR $viewname $algotype diff --git a/tests/hlr/poly_hlr/C15 b/tests/hlr/poly_hlr/C15 index 526f80eca3..804df0c48f 100644 --- a/tests/hlr/poly_hlr/C15 +++ b/tests/hlr/poly_hlr/C15 @@ -1,5 +1,5 @@ set viewname "vright" -set length 5102.18 +set length 5101.26 testreadstep [locate_data_file bug27341_Assembly_GMS_Kurz_CAD.stp] a COMPUTE_HLR $viewname $algotype diff --git a/tests/hlr/poly_hlr/C16 b/tests/hlr/poly_hlr/C16 index 4c2ecbe5c2..21f8c48b6c 100644 --- a/tests/hlr/poly_hlr/C16 +++ b/tests/hlr/poly_hlr/C16 @@ -1,5 +1,5 @@ set viewname "vright" -set length 1662.85 +set length 1662.87 testreadstep [locate_data_file bug27341_CCS_Adapter_CAD.stp] a COMPUTE_HLR $viewname $algotype diff --git a/tests/hlr/poly_hlr/C17 b/tests/hlr/poly_hlr/C17 index bca493e4e6..f89ae7c2a2 100644 --- a/tests/hlr/poly_hlr/C17 +++ b/tests/hlr/poly_hlr/C17 @@ -1,5 +1,5 @@ set viewname "vright" -set length 2239.23 +set length 2239.26 testreadstep [locate_data_file bug27341_CCT_PMK_32_L_o_CAD.stp] a COMPUTE_HLR $viewname $algotype diff --git a/tests/hlr/poly_hlr/C20 b/tests/hlr/poly_hlr/C20 index aa685c0767..0697995c73 100644 --- a/tests/hlr/poly_hlr/C20 +++ b/tests/hlr/poly_hlr/C20 @@ -1,5 +1,5 @@ set viewname "vright" -set length 1704.87 +set length 1704.6 testreadstep [locate_data_file bug27341_Drehkopf_HSK_Gewinde_R_CAD.stp] a COMPUTE_HLR $viewname $algotype diff --git a/tests/hlr/poly_hlr/C4 b/tests/hlr/poly_hlr/C4 index be7953c784..dd6b6c582f 100644 --- a/tests/hlr/poly_hlr/C4 +++ b/tests/hlr/poly_hlr/C4 @@ -1,7 +1,5 @@ -puts "TODO OCC30286 ALL: Error : The length of result shape is 2705.91, expected 2765.47" - set viewname "vright" -set length 2765.47 +set length 2711.37 testreadstep [locate_data_file bug27341_82-01_Solid_End_Mill_Radius_with_Shrink_Fit_and_extension_HeavyModel.stp] a COMPUTE_HLR $viewname $algotype diff --git a/tests/hlr/poly_hlr/C5 b/tests/hlr/poly_hlr/C5 index 8213d96e56..140df6fbfd 100644 --- a/tests/hlr/poly_hlr/C5 +++ b/tests/hlr/poly_hlr/C5 @@ -1,7 +1,5 @@ -puts "TODO OCC30286 ALL: Error : The length of result shape is 1723.\\d+, expected 1721.69" - set viewname "vright" -set length 1721.69 +set length 1718.9 testreadstep [locate_data_file bug27341_ABS_Adapter_CAD.stp] a COMPUTE_HLR $viewname $algotype diff --git a/tests/hlr/poly_hlr/C6 b/tests/hlr/poly_hlr/C6 index e149469bd2..b63823c549 100644 --- a/tests/hlr/poly_hlr/C6 +++ b/tests/hlr/poly_hlr/C6 @@ -1,5 +1,5 @@ set viewname "vright" -set length 2832.69 +set length 2832.05 testreadstep [locate_data_file bug27341_ABS_Grundhalter_CAD.stp] a COMPUTE_HLR $viewname $algotype diff --git a/tests/hlr/poly_hlr/C7 b/tests/hlr/poly_hlr/C7 index 471a9cd4ef..76688f7cad 100644 --- a/tests/hlr/poly_hlr/C7 +++ b/tests/hlr/poly_hlr/C7 @@ -1,5 +1,5 @@ set viewname "vright" -set length 2261.22 +set length 2261.81 testreadstep [locate_data_file bug27341_AIF_Grundhalter_GR1_CAD.stp] a COMPUTE_HLR $viewname $algotype diff --git a/tests/hlr/poly_hlr/bug23625_1 b/tests/hlr/poly_hlr/bug23625_1 index 49d3709ec7..598634bec4 100644 --- a/tests/hlr/poly_hlr/bug23625_1 +++ b/tests/hlr/poly_hlr/bug23625_1 @@ -6,7 +6,7 @@ puts "" puts "REQUIRED All: Meshing statuses: SelfIntersectingWire Failure" set viewname "vfront" -set length 26881.1 +set length 26411.7 restore [locate_data_file bug23625_a1.brep] a diff --git a/tests/hlr/poly_hlr/bug23625_2 b/tests/hlr/poly_hlr/bug23625_2 index af647e97e0..8ae9139745 100644 --- a/tests/hlr/poly_hlr/bug23625_2 +++ b/tests/hlr/poly_hlr/bug23625_2 @@ -4,7 +4,7 @@ puts "============" puts "" set viewname "vfront" -set length 27461.9 +set length 27126.9 restore [locate_data_file bug23625_a2.brep] a COMPUTE_HLR $viewname $algotype diff --git a/tests/hlr/poly_hlr/bug23625_3 b/tests/hlr/poly_hlr/bug23625_3 index 904e40f261..2ea799431c 100644 --- a/tests/hlr/poly_hlr/bug23625_3 +++ b/tests/hlr/poly_hlr/bug23625_3 @@ -4,7 +4,7 @@ puts "============" puts "" set viewname "vtop" -set length 19259.1 +set length 19649 restore [locate_data_file bug23625_a3.brep] a COMPUTE_HLR $viewname $algotype diff --git a/tests/hlr/poly_hlr/bug27979_2 b/tests/hlr/poly_hlr/bug27979_2 index 295b0b06ac..a5df15c581 100644 --- a/tests/hlr/poly_hlr/bug27979_2 +++ b/tests/hlr/poly_hlr/bug27979_2 @@ -1,12 +1,10 @@ -puts "TODO OCC30286 ALL: Error : The length of result shape is 12.\\d+, expected 12." - puts "========================================================================" puts "OCC27979: Parasolid converted BREP shows weird lines on hidden line Algo" puts "========================================================================" puts "" set viewname "vtop" -set length 12. +set length 13.0106 restore [locate_data_file bug27979_parsed.brep] a COMPUTE_HLR $viewname $algotype diff --git a/tests/mesh/data/standard/W6 b/tests/mesh/data/standard/W6 index c74273990c..8de8ecc13d 100755 --- a/tests/mesh/data/standard/W6 +++ b/tests/mesh/data/standard/W6 @@ -1,6 +1,6 @@ set TheFileName shading_wrongshape_026.brep if { [string compare $command "shading"] == 0 } { - set rel_tol 0.08526389274308782 + set rel_tol 0.1487107687729918 } else { set rel_tol 0.0020125629706199506 } diff --git a/tests/mesh/data/standard/X1 b/tests/mesh/data/standard/X1 index cca36dd09f..d09c119532 100755 --- a/tests/mesh/data/standard/X1 +++ b/tests/mesh/data/standard/X1 @@ -6,7 +6,7 @@ set TheFileName shading_wrongshape_030.brep set bug_cross "OCC22687" set nbcross(All) 4 if { [string compare $command "shading"] == 0 } { - set rel_tol 0.5225697108844659 + set rel_tol 0.48575382373356474 } else { set rel_tol 0.1856053577754922 } From b9f787f180253cafe326c4cecef69d296b161924 Mon Sep 17 00:00:00 2001 From: mzernova Date: Fri, 2 Sep 2022 18:08:46 +0300 Subject: [PATCH 381/639] 0033114: Visualization - AIS_Animation returns 0 elapsed time after finishing playback Added -elapsedTime option to DRAW vanim command --- src/AIS/AIS_Animation.cxx | 2 ++ src/ViewerTest/ViewerTest_ViewerCommands.cxx | 34 ++++++++++++++------ 2 files changed, 27 insertions(+), 9 deletions(-) diff --git a/src/AIS/AIS_Animation.cxx b/src/AIS/AIS_Animation.cxx index 26c6f9ba9e..ae9eb7574a 100644 --- a/src/AIS/AIS_Animation.cxx +++ b/src/AIS/AIS_Animation.cxx @@ -251,7 +251,9 @@ void AIS_Animation::Stop() myState = AnimationState_Stopped; if (!myTimer.IsNull()) { + const Standard_Real anElapsedTime = ElapsedTime(); myTimer->Stop(); + myTimer->Seek (Min (Duration(), anElapsedTime)); } for (NCollection_Sequence::Iterator anIter (myAnimations); anIter.More(); anIter.Next()) diff --git a/src/ViewerTest/ViewerTest_ViewerCommands.cxx b/src/ViewerTest/ViewerTest_ViewerCommands.cxx index c26d53e340..dd2389fa33 100644 --- a/src/ViewerTest/ViewerTest_ViewerCommands.cxx +++ b/src/ViewerTest/ViewerTest_ViewerCommands.cxx @@ -7296,9 +7296,10 @@ static Standard_Integer VAnimation (Draw_Interpretor& theDI, Standard_Real aPlaySpeed = 1.0; Standard_Real aPlayStartTime = anAnimation->StartPts(); Standard_Real aPlayDuration = anAnimation->Duration(); - Standard_Boolean isFreeCamera = Standard_False; + Standard_Boolean isFreeCamera = Standard_False; Standard_Boolean toPauseOnClick = Standard_True; - Standard_Boolean isLockLoop = Standard_False; + Standard_Boolean isLockLoop = Standard_False; + Standard_Boolean toPrintElapsedTime = Standard_False; // video recording parameters TCollection_AsciiString aRecFile; @@ -7352,6 +7353,11 @@ static Standard_Integer VAnimation (Draw_Interpretor& theDI, } } } + else if (anArg == "-elapsedtime" + || anArg == "-elapsed") + { + toPrintElapsedTime = Standard_True; + } else if (anArg == "-resume") { toPlay = Standard_True; @@ -7760,8 +7766,17 @@ static Standard_Integer VAnimation (Draw_Interpretor& theDI, } } - ViewerTest::CurrentEventManager()->AbortViewAnimation(); - ViewerTest::CurrentEventManager()->SetObjectsAnimation (Handle(AIS_Animation)()); + if (anAnimation.IsNull() || anAnimation->IsStopped()) + { + ViewerTest::CurrentEventManager()->AbortViewAnimation(); + ViewerTest::CurrentEventManager()->SetObjectsAnimation(Handle(AIS_Animation)()); + } + + if (toPrintElapsedTime) + { + theDI << "Elapsed Time: " << anAnimation->ElapsedTime() << " s\n"; + } + if (!toPlay && aRecFile.IsEmpty()) { return 0; @@ -14338,13 +14353,14 @@ List existing animations: vanim Animation playback: - vanim name {-play|-resume|-pause|-stop} [playFrom [playDuration]] - [-speed Coeff] [-freeLook] [-noPauseOnClick] [-lockLoop] + vanim name {-play|-resume|-pause|-stop} [playFrom [playDuration]] [-speed Coeff] + [-freeLook] [-noPauseOnClick] [-lockLoop] [-elapsedTime] - -speed playback speed (1.0 is normal speed) - -freeLook skip camera animations + -speed playback speed (1.0 is normal speed) + -freeLook skip camera animations -noPauseOnClick do not pause animation on mouse click - -lockLoop disable any interactions + -lockLoop disable any interactions + -elapsedTime prints elapsed time in seconds" Animation definition: vanim Name/sub/name [-clear] [-delete] From b0f92d3d5c78548a1e5d14f7b7c28463a3981092 Mon Sep 17 00:00:00 2001 From: ona Date: Wed, 7 Sep 2022 18:48:09 +0300 Subject: [PATCH 382/639] 0032239: Data Exchange, STEP import - bounding box is too large - ShapeFix_Face::FixMissingSeam method is fixed in order to handle degenerated torus - Calculation of degenerated torus bounding box is fixed - Test reference data is changed --- src/BndLib/BndLib.cxx | 106 +++++++++++++++++++++++++++++++++ src/ShapeFix/ShapeFix_Face.cxx | 21 ++++++- tests/bugs/moddata_1/bug15 | 2 +- tests/bugs/step/bug32239 | 57 ++++++++++++++++++ 4 files changed, 182 insertions(+), 4 deletions(-) create mode 100644 tests/bugs/step/bug32239 diff --git a/src/BndLib/BndLib.cxx b/src/BndLib/BndLib.cxx index 67f372816f..adbd0238bc 100644 --- a/src/BndLib/BndLib.cxx +++ b/src/BndLib/BndLib.cxx @@ -1221,6 +1221,105 @@ static void ComputeSphere (const gp_Sphere& Sphere, } } +//======================================================================= +//function : computeDegeneratedTorus +//purpose : compute bounding box for degenerated torus +//======================================================================= + +static void computeDegeneratedTorus (const gp_Torus& theTorus, + const Standard_Real theUMin, const Standard_Real theUMax, + const Standard_Real theVMin, const Standard_Real theVMax, + Bnd_Box& theB) +{ + gp_Pnt aP = theTorus.Location(); + Standard_Real aRa = theTorus.MajorRadius(); + Standard_Real aRi = theTorus.MinorRadius(); + Standard_Real aXmin,anYmin,aZmin,aXmax,anYmax,aZmax; + aXmin = aP.X() - aRa - aRi; + aXmax = aP.X() + aRa + aRi; + anYmin = aP.Y() - aRa - aRi; + anYmax = aP.Y() + aRa + aRi; + aZmin = aP.Z() - aRi; + aZmax = aP.Z() + aRi; + + Standard_Real aPhi = ACos (-aRa / aRi); + + Standard_Real anUper = 2. * M_PI - Precision::PConfusion(); + Standard_Real aVper = 2. * aPhi - Precision::PConfusion(); + if (theUMax - theUMin >= anUper && theVMax - theVMin >= aVper) + { + // a whole torus + theB.Update(aXmin, anYmin, aZmin, aXmax, anYmax, aZmax); + return; + } + + Standard_Real anU,aV; + Standard_Real anUmax = theUMin + 2. * M_PI; + const gp_Ax3& aPos = theTorus.Position(); + gp_Pnt aPExt = aP; + aPExt.SetX(aXmin); + ElSLib::TorusParameters(aPos,aRa,aRi,aPExt,anU,aV); + anU = ElCLib::InPeriod(anU,theUMin,anUmax); + if(anU >= theUMin && anU <= theUMax && aV >= theVMin && aV <= theVMax) + { + theB.Add(aPExt); + } + // + aPExt.SetX(aXmax); + ElSLib::TorusParameters(aPos,aRa,aRi,aPExt,anU,aV); + anU = ElCLib::InPeriod(anU,theUMin,anUmax); + if(anU >= theUMin && anU <= theUMax && aV >= theVMin && aV <= theVMax) + { + theB.Add(aPExt); + } + aPExt.SetX(aP.X()); + // + aPExt.SetY(anYmin); + ElSLib::TorusParameters(aPos,aRa,aRi,aPExt,anU,aV); + anU = ElCLib::InPeriod(anU,theUMin,anUmax); + if(anU >= theUMin && anU <= theUMax && aV >= theVMin && aV <= theVMax) + { + theB.Add(aPExt); + } + // + aPExt.SetY(anYmax); + ElSLib::TorusParameters(aPos,aRa,aRi,aPExt,anU,aV); + anU = ElCLib::InPeriod(anU,theUMin,anUmax); + if(anU >= theUMin && anU <= theUMax && aV >= theVMin && aV <= theVMax) + { + theB.Add(aPExt); + } + aPExt.SetY(aP.Y()); + // + aPExt.SetZ(aZmin); + ElSLib::TorusParameters(aPos,aRa,aRi,aPExt,anU,aV); + anU = ElCLib::InPeriod(anU,theUMin,anUmax); + if(anU >= theUMin && anU <= theUMax && aV >= theVMin && aV <= theVMax) + { + theB.Add(aPExt); + } + // + aPExt.SetZ(aZmax); + ElSLib::TorusParameters(aPos,aRa,aRi,aPExt,anU,aV); + anU = ElCLib::InPeriod(anU,theUMin,anUmax); + if(anU >= theUMin && anU <= theUMax && aV >= theVMin && aV <= theVMax) + { + theB.Add(aPExt); + } + // + // Add boundaries of patch + // UMin, UMax + gp_Circ aC = ElSLib::TorusUIso(aPos,aRa,aRi,theUMin); + BndLib::Add(aC,theVMin,theVMax,0.,theB); + aC = ElSLib::TorusUIso(aPos,aRa,aRi,theUMax); + BndLib::Add(aC,theVMin,theVMax,0.,theB); + // VMin, VMax + aC = ElSLib::TorusVIso(aPos,aRa,aRi,theVMin); + BndLib::Add(aC,theUMin,theUMax,0.,theB); + aC = ElSLib::TorusVIso(aPos,aRa,aRi,theVMax); + BndLib::Add(aC,theUMin,theUMax,0.,theB); +} + void BndLib::Add(const gp_Sphere& S,const Standard_Real UMin, const Standard_Real UMax,const Standard_Real VMin, const Standard_Real VMax,const Standard_Real Tol, Bnd_Box& B) @@ -1265,6 +1364,13 @@ void BndLib::Add(const gp_Torus& S,const Standard_Real UMin, if (Fi2 #include #include +#include #include #include #include @@ -1585,6 +1586,9 @@ Standard_Boolean ShapeFix_Face::FixMissingSeam() } BRep_Builder B; + Handle(Geom_ToroidalSurface) aTorSurf = Handle(Geom_ToroidalSurface)::DownCast(mySurf->Surface()); + Standard_Boolean anIsDegeneratedTor = ( aTorSurf.IsNull() ? Standard_False : aTorSurf->MajorRadius() < aTorSurf->MinorRadius() ); + if ( w1.IsNull() ) return Standard_False; else if ( w2.IsNull()) { // For spheres and BSpline cone-like surfaces(bug 24055): @@ -1595,7 +1599,18 @@ Standard_Boolean ShapeFix_Face::FixMissingSeam() gp_Dir2d d; Standard_Real aRange; - if ( ismodeu && mySurf->Surface()->IsKind(STANDARD_TYPE(Geom_SphericalSurface)) ) { + if( ismodeu && anIsDegeneratedTor ) + { + Standard_Real aRa = aTorSurf->MajorRadius(); + Standard_Real aRi = aTorSurf->MinorRadius(); + Standard_Real aPhi = ACos (-aRa / aRi); + p.SetCoord (0.0, ( ismodeu > 0 ? M_PI + aPhi : aPhi )); + + Standard_Real aXCoord = -ismodeu; + d.SetCoord ( aXCoord, 0.); + aRange = 2.*M_PI; + } + else if ( ismodeu && mySurf->Surface()->IsKind(STANDARD_TYPE(Geom_SphericalSurface)) ) { p.SetCoord ( ( ismodeu < 0 ? 0. : 2.*M_PI ), ismodeu * 0.5 * M_PI ); Standard_Real aXCoord = -ismodeu; d.SetCoord ( aXCoord, 0.); @@ -1663,7 +1678,7 @@ Standard_Boolean ShapeFix_Face::FixMissingSeam() // validity of orientation of the open wires in parametric space. // In case of U closed surface wire with minimal V coordinate should be directed in positive direction by U // In case of V closed surface wire with minimal U coordinate should be directed in negative direction by V - if (!vclosed || !uclosed) + if (!vclosed || !uclosed || anIsDegeneratedTor) { Standard_Real deltaOther = 0.5 * (m2[coord][0] + m2[coord][1]) - 0.5 * (m1[coord][0] + m1[coord][1]); if (deltaOther * isneg < 0) @@ -1711,7 +1726,7 @@ Standard_Boolean ShapeFix_Face::FixMissingSeam() // A special kind of FixShifted is necessary for torus-like // surfaces to adjust wires by period ALONG the missing SEAM direction // tr9_r0501-ug.stp #187640 - if ( uclosed && vclosed ) { + if ( uclosed && vclosed && !anIsDegeneratedTor ) { Standard_Real shiftw2 = ShapeAnalysis::AdjustByPeriod ( 0.5 * ( m2[coord][0] + m2[coord][1] ), 0.5 * ( m1[coord][0] + m1[coord][1] + diff --git a/tests/bugs/moddata_1/bug15 b/tests/bugs/moddata_1/bug15 index 0a25f8328e..ad0d312a0e 100755 --- a/tests/bugs/moddata_1/bug15 +++ b/tests/bugs/moddata_1/bug15 @@ -14,5 +14,5 @@ vdisplay result vsetdispmode result 1 vfit -checktrinfo result -tri 1075 -nod 635 +checktrinfo result -tri 1317 -nod 756 checkview -display result -2d -path ${imagedir}/${test_image}.png diff --git a/tests/bugs/step/bug32239 b/tests/bugs/step/bug32239 new file mode 100644 index 0000000000..7602c50b33 --- /dev/null +++ b/tests/bugs/step/bug32239 @@ -0,0 +1,57 @@ +puts "====================================" +puts "0032239: Data Exchange, STEP import - bounding box is too large" +puts "====================================" +puts "" + +pload ALL + +# Read file + +stepread [locate_data_file bug32239.STEP] b * + +# Check that shape is valid + +checkshape b_1 + +# Check bounding box + +set xmin0 -62.992562093513783 +set ymin0 -51.45371311501097 +set zmin0 -33.223762093513777 +set xmax0 43.263112093513783 +set ymax0 33.211062093513789 +set zmax0 37.744962093513792 +set bb [bounding b_1] +set xmin [lindex $bb 0] +set ymin [lindex $bb 1] +set zmin [lindex $bb 2] +set xmax [lindex $bb 3] +set ymax [lindex $bb 4] +set zmax [lindex $bb 5] + +if { [expr abs($xmin - $xmin0)] > 1.0e-5 } { + set bb_changed 1 +} +if { [expr abs($xmax - $xmax0)] > 1.0e-5 } { + set bb_changed 1 +} +if { [expr abs($ymin - $ymin0)] > 1.0e-5 } { + set bb_changed 1 +} +if { [expr abs($ymax - $ymax0)] > 1.0e-5 } { + set bb_changed 1 +} +if { [expr abs($zmin - $zmin0)] > 1.0e-5 } { + set bb_changed 1 +} +if { [expr abs($zmax - $zmax0)] > 1.0e-5 } { + set bb_changed 1 +} + +if { [info exists bb_changed] } { + puts "Error: not expected bounding box" +} + +renamevar b_1 result +checkview -display result -3d -path ${imagedir}/${test_image}.png + From 5bde4773f9e1c0a37e3e994ea6768ed35117eca7 Mon Sep 17 00:00:00 2001 From: atychini Date: Tue, 12 Jul 2022 23:48:02 +0300 Subject: [PATCH 383/639] 0032820: Data Exchange - add VRML reader to XCAF document Implementing VRML reader into XCAF document. Updating DE_Wrapper according to VRML Reader. --- src/TKVRML/EXTERNLIB | 1 + src/Vrml/Vrml_ConfigurationNode.cxx | 41 ++++++- src/Vrml/Vrml_ConfigurationNode.hxx | 7 ++ src/Vrml/Vrml_Provider.cxx | 31 +++-- src/VrmlAPI/FILES | 2 + src/VrmlAPI/VrmlAPI_CafReader.cxx | 137 +++++++++++++++++++++ src/VrmlAPI/VrmlAPI_CafReader.hxx | 37 ++++++ src/XDEDRAW/XDEDRAW_Common.cxx | 178 +++++++++++++++++++++++++++- tests/de_mesh/grids.list | 3 +- tests/de_mesh/vrml_read/A1 | 32 +++++ tests/de_mesh/vrml_read/A2 | 25 ++++ tests/de_mesh/vrml_read/A3 | 32 +++++ tests/de_mesh/vrml_read/A4 | 22 ++++ tests/de_mesh/vrml_read/begin | 5 + tests/de_wrapper/configuration/A3 | 5 + tests/de_wrapper/vrml/A5 | 10 +- tests/de_wrapper/vrml/A6 | 4 +- 17 files changed, 551 insertions(+), 21 deletions(-) create mode 100644 src/VrmlAPI/VrmlAPI_CafReader.cxx create mode 100644 src/VrmlAPI/VrmlAPI_CafReader.hxx create mode 100644 tests/de_mesh/vrml_read/A1 create mode 100644 tests/de_mesh/vrml_read/A2 create mode 100644 tests/de_mesh/vrml_read/A3 create mode 100644 tests/de_mesh/vrml_read/A4 create mode 100644 tests/de_mesh/vrml_read/begin diff --git a/src/TKVRML/EXTERNLIB b/src/TKVRML/EXTERNLIB index b267b66d9d..a996dc40ca 100755 --- a/src/TKVRML/EXTERNLIB +++ b/src/TKVRML/EXTERNLIB @@ -9,6 +9,7 @@ TKG2d TKG3d TKMesh TKHLR +TKRWMesh TKService TKGeomAlgo TKV3d diff --git a/src/Vrml/Vrml_ConfigurationNode.cxx b/src/Vrml/Vrml_ConfigurationNode.cxx index d04fcebc33..97c729d6f9 100644 --- a/src/Vrml/Vrml_ConfigurationNode.cxx +++ b/src/Vrml/Vrml_ConfigurationNode.cxx @@ -56,6 +56,15 @@ bool Vrml_ConfigurationNode::Load(const Handle(DE_ConfigurationContext)& theReso { TCollection_AsciiString aScope = THE_CONFIGURATION_SCOPE() + "." + GetFormat() + "." + GetVendor(); + InternalParameters.ReadFileUnit = + theResource->RealVal("read.file.unit", InternalParameters.ReadFileUnit, aScope); + InternalParameters.ReadFileCoordinateSys = (RWMesh_CoordinateSystem) + theResource->IntegerVal("read.file.coordinate.system", InternalParameters.ReadFileCoordinateSys, aScope); + InternalParameters.ReadSystemCoordinateSys = (RWMesh_CoordinateSystem) + theResource->IntegerVal("read.system.coordinate.system", InternalParameters.ReadSystemCoordinateSys, aScope); + InternalParameters.ReadFillIncomplete = + theResource->BooleanVal("read.fill.incomplete", InternalParameters.ReadFillIncomplete, aScope); + InternalParameters.WriterVersion = (WriteMode_WriterVersion) theResource->IntegerVal("writer.version", InternalParameters.WriterVersion, aScope); InternalParameters.WriteRepresentationType = (WriteMode_RepresentationType) @@ -75,19 +84,47 @@ TCollection_AsciiString Vrml_ConfigurationNode::Save() const aResult = aResult + "!Configuration Node " + " Vendor: " + GetVendor() + " Format: " + GetFormat() + "\n"; TCollection_AsciiString aScope = THE_CONFIGURATION_SCOPE() + "." + GetFormat() + "." + GetVendor() + "."; + aResult += "!\n"; + aResult += "!Read parameters:\n"; + aResult += "!\n"; + + aResult += "!\n"; + aResult += "!Set (override) file length units to convert from while reading the file, defined as scale factor for m (meters).\n"; + aResult += "!Default value: 1. Available values: positive double\n"; + aResult += aScope + "read.file.unit :\t " + InternalParameters.ReadFileUnit + "\n"; + aResult += "!\n"; + + aResult += "!\n"; + aResult += "!Set (override) file origin coordinate system to perform conversion during read.\n"; + aResult += "!Default value: Yup (1). { Zup (0) | Yup (1) }\n"; + aResult += aScope + "read.file.coordinate.system :\t " + InternalParameters.ReadFileCoordinateSys + "\n"; + aResult += "!\n"; + + aResult += "!\n"; + aResult += "!Set system origin coordinate system to perform conversion into during read.\n"; + aResult += "!Default value: Zup (0). Available values: { Zup (0) | Yup (1) }\n"; + aResult += aScope + "read.system.coordinate.system :\t " + InternalParameters.ReadSystemCoordinateSys + "\n"; + aResult += "!\n"; + + aResult += "!\n"; + aResult += "!Set flag allowing partially read file content to be put into the XDE document.\n"; + aResult += "!Default value: 1(\"ON\"). Available values: 0(\"OFF\"), 1(\"ON\")\n"; + aResult += aScope + "read.fill.incomplete :\t " + InternalParameters.ReadFillIncomplete + "\n"; + aResult += "!\n"; + aResult += "!\n"; aResult += "!Write parameters:\n"; aResult += "!\n"; aResult += "!\n"; - aResult += "!Setting up writer version\n"; + aResult += "!Setting up writer version.\n"; aResult += "!Default value: 2. Available values: 1, 2\n"; aResult += aScope + "writer.version :\t " + InternalParameters.WriterVersion + "\n"; aResult += "!\n"; aResult += "!\n"; aResult += "!Setting up representation\n"; - aResult += "!Default value: 1. Available values: 0(shaded), 1(wireframe), 2(both)\n"; + aResult += "!Default value: 1. Available values: 0(shaded), 1(wireframe), 2(both).\n"; aResult += aScope + "write.representation.type :\t " + InternalParameters.WriteRepresentationType + "\n"; aResult += "!\n"; diff --git a/src/Vrml/Vrml_ConfigurationNode.hxx b/src/Vrml/Vrml_ConfigurationNode.hxx index a2402752b9..df8b28403a 100644 --- a/src/Vrml/Vrml_ConfigurationNode.hxx +++ b/src/Vrml/Vrml_ConfigurationNode.hxx @@ -15,6 +15,7 @@ #define _Vrml_ConfigurationNode_HeaderFile #include +#include //! The purpose of this class is to configure the transfer process for VRML format //! Stores the necessary settings for Vrml_Provider. @@ -93,6 +94,12 @@ public: struct Vrml_InternalSection { + // Read + double ReadFileUnit = 1.; // #include #include +#include #include #include #include @@ -87,14 +88,27 @@ bool Vrml_Provider::Read(const TCollection_AsciiString& thePath, return false; } Handle(Vrml_ConfigurationNode) aNode = Handle(Vrml_ConfigurationNode)::DownCast(GetNode()); - TopoDS_Shape aShape; - if(!Read(thePath, aShape, theProgress)) + + VrmlAPI_CafReader aVrmlReader; + aVrmlReader.SetDocument(theDocument); + aVrmlReader.SetFileLengthUnit(aNode->InternalParameters.ReadFileUnit); + aVrmlReader.SetSystemLengthUnit(aNode->GlobalParameters.LengthUnit); + aVrmlReader.SetFileCoordinateSystem(aNode->InternalParameters.ReadFileCoordinateSys); + aVrmlReader.SetSystemCoordinateSystem(aNode->InternalParameters.ReadSystemCoordinateSys); + aVrmlReader.SetFillIncompleteDocument(aNode->InternalParameters.ReadFillIncomplete); + + XCAFDoc_DocumentTool::SetLengthUnit(theDocument, aNode->InternalParameters.ReadFileUnit); + + if (!aVrmlReader.Perform(thePath, theProgress)) { - return false; + if (aVrmlReader.ExtraStatus() != RWMesh_CafReaderStatusEx_Partial) + { + Message::SendFail() << "Error in the Vrml_Provider during reading the file '" << thePath << "'"; + return false; + } + Message::SendWarning() << "Warning in the Vrml_Provider during reading the file: file has been read paratially " << + "(due to unexpected EOF, syntax error, memory limit) '" << thePath << "'"; } - Handle(XCAFDoc_ShapeTool) aShTool = XCAFDoc_DocumentTool::ShapeTool(theDocument->Main()); - aShTool->AddShape(aShape); - XCAFDoc_DocumentTool::SetLengthUnit(theDocument, aNode->GlobalParameters.LengthUnit, UnitsMethods_LengthUnit_Millimeter); return true; } @@ -117,7 +131,7 @@ bool Vrml_Provider::Write(const TCollection_AsciiString& thePath, VrmlAPI_Writer aWriter; aWriter.SetRepresentation(static_cast(aNode->InternalParameters.WriteRepresentationType)); - Standard_Real aScaleFactorM = aNode->GlobalParameters.LengthUnit / 1000; + Standard_Real aScaleFactorM = aNode->GlobalParameters.LengthUnit; if (!aWriter.WriteDoc(theDocument, thePath.ToCString(), aScaleFactorM)) { Message::SendFail() << "Error in the Vrml_Provider during wtiting the file " << @@ -199,8 +213,7 @@ bool Vrml_Provider::Read(const TCollection_AsciiString& thePath, } VrmlData_Scene aScene; - Standard_Real anOCCUnitMM = aNode->GlobalParameters.LengthUnit; - aScene.SetLinearScale(1000. / anOCCUnitMM); + aScene.SetLinearScale(aNode->GlobalParameters.LengthUnit); aScene.SetVrmlDir(aVrmlDir); aScene << aStream; diff --git a/src/VrmlAPI/FILES b/src/VrmlAPI/FILES index 7f3fb4a3fa..97f69df8a9 100644 --- a/src/VrmlAPI/FILES +++ b/src/VrmlAPI/FILES @@ -1,5 +1,7 @@ VrmlAPI.cxx VrmlAPI.hxx +VrmlAPI_CafReader.cxx +VrmlAPI_CafReader.hxx VrmlAPI_RepresentationOfShape.hxx VrmlAPI_Writer.cxx VrmlAPI_Writer.hxx diff --git a/src/VrmlAPI/VrmlAPI_CafReader.cxx b/src/VrmlAPI/VrmlAPI_CafReader.cxx new file mode 100644 index 0000000000..523442da81 --- /dev/null +++ b/src/VrmlAPI/VrmlAPI_CafReader.cxx @@ -0,0 +1,137 @@ +// Copyright (c) 2022 OPEN CASCADE SAS +// +// This file is part of Open CASCADE Technology software library. +// +// This library is free software; you can redistribute it and/or modify it under +// the terms of the GNU Lesser General Public License version 2.1 as published +// by the Free Software Foundation, with special exception defined in the file +// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT +// distribution for complete text of the license and disclaimer of any warranty. +// +// Alternatively, this file may be used under the terms of Open CASCADE +// commercial license or contractual agreement. + +#include + +#include +#include +#include +#include +#include +#include +#include + +#include + +IMPLEMENT_STANDARD_RTTIEXT(VrmlAPI_CafReader, Standard_Transient) + +namespace +{ + //======================================================================= + // function : getVrmlErrorName + // purpose : + //======================================================================= + static TCollection_AsciiString getVrmlErrorName(VrmlData_ErrorStatus theStatus) + { + switch (theStatus) + { + case VrmlData_StatusOK: return ""; + case VrmlData_EmptyData: return "EmptyData"; + case VrmlData_UnrecoverableError: return "UnrecoverableError"; + case VrmlData_GeneralError: return "GeneralError"; + case VrmlData_EndOfFile: return "EndOfFile"; + case VrmlData_NotVrmlFile: return "NotVrmlFile"; + case VrmlData_CannotOpenFile: return "CannotOpenFile"; + case VrmlData_VrmlFormatError: return "VrmlFormatError"; + case VrmlData_NumericInputError: return "NumericInputError"; + case VrmlData_IrrelevantNumber: return "IrrelevantNumber"; + case VrmlData_BooleanInputError: return "BooleanInputError"; + case VrmlData_StringInputError: return "StringInputError"; + case VrmlData_NodeNameUnknown: return "NodeNameUnknown"; + case VrmlData_NonPositiveSize: return "NonPositiveSize"; + case VrmlData_ReadUnknownNode: return "ReadUnknownNode"; + case VrmlData_NonSupportedFeature: return "NonSupportedFeature"; + case VrmlData_OutputStreamUndefined: return "OutputStreamUndefined"; + case VrmlData_NotImplemented: return "NotImplemented"; + } + return "UNKNOWN"; + } + + //======================================================================= + // function : performMeshSubshape + // purpose : + //======================================================================= + static void performMeshSubshape(RWMesh_NodeAttributeMap& theAttribMap, + const VrmlData_DataMapOfShapeAppearance& theShapeAppMap, + const TopoDS_Shape& theShape) + { + Handle(VrmlData_Appearance) anAppearance; + if (theShapeAppMap.Find(theShape.TShape(), anAppearance)) + { + if (!anAppearance.IsNull() + && !anAppearance->Material().IsNull()) + { + RWMesh_NodeAttributes aFaceAttribs; + theAttribMap.Find(theShape, aFaceAttribs); + aFaceAttribs.Style.SetColorSurf(anAppearance->Material()->DiffuseColor()); + theAttribMap.Bind(theShape, aFaceAttribs); + } + } + + for (TopoDS_Iterator aSubShapeIter(theShape, true, false); aSubShapeIter.More(); aSubShapeIter.Next()) + { + performMeshSubshape(theAttribMap, theShapeAppMap, aSubShapeIter.Value()); + } + } +} + +//======================================================================= +// function : performMesh +// purpose : +//======================================================================= +bool VrmlAPI_CafReader::performMesh(const TCollection_AsciiString& theFile, + const Message_ProgressRange& theProgress, + const Standard_Boolean theToProbe) +{ + (void)theProgress; + Handle(OSD_FileSystem) aFile = OSD_FileSystem::DefaultFileSystem(); + std::shared_ptr aFileStream = aFile->OpenIStream(theFile, std::ios::in | std::ios::binary); + if (aFileStream.get() == nullptr || !aFileStream->good()) + { + Message::SendFail() << "Error in VrmlAPI_CafReader: file '" << theFile << "' is not found"; + return false; + } + if (theToProbe) + { + Message::SendFail() << "Error in VrmlAPI_CafReader: theToProbe parameter isn't supported"; + return false; // unsupported + } + + // determine file location to load associated files + TCollection_AsciiString aFolder; + TCollection_AsciiString aFileName; + OSD_Path::FolderAndFileFromPath(theFile, aFolder, aFileName); + + VrmlData_Scene aScene; + aScene.SetLinearScale(FileLengthUnit()); + aScene.SetVrmlDir(aFolder); + aScene << *aFileStream; + + VrmlData_DataMapOfShapeAppearance aShapeAppMap; + TopoDS_Shape aShape = aScene.GetShape(aShapeAppMap); + if (!aShape.IsNull()) + { + performMeshSubshape(myAttribMap, aShapeAppMap, aShape); + myRootShapes.Append(aShape); + } + if (aScene.Status() != VrmlData_StatusOK + || aShape.IsNull()) + { + Message::SendFail() << "Error in VrmlAPI_CafReader: " << getVrmlErrorName(aScene.Status()) + << "occurred at line " << aScene.GetLineError() + << "\nwhile reading VRML file '" << theFile << "'"; + return false; + } + + return true; +} diff --git a/src/VrmlAPI/VrmlAPI_CafReader.hxx b/src/VrmlAPI/VrmlAPI_CafReader.hxx new file mode 100644 index 0000000000..87af90d064 --- /dev/null +++ b/src/VrmlAPI/VrmlAPI_CafReader.hxx @@ -0,0 +1,37 @@ +// Copyright (c) 2022 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 _VrmlAPI_Reader_HeaderFile +#define _VrmlAPI_Reader_HeaderFile + +#include + +//! The Vrml mesh reader into XDE document. +class VrmlAPI_CafReader : public RWMesh_CafReader +{ + DEFINE_STANDARD_RTTIEXT(VrmlAPI_CafReader, RWMesh_CafReader) + +protected: + + //! Read the mesh data from specified file. + //! @param theFile file to read + //! @param theProgress progress indicator + //! @param theToProbe flag for probing file without complete reading. Not supported. + //! @return false when theToProbe is set to true or reading has completed with error. + Standard_EXPORT virtual Standard_Boolean performMesh(const TCollection_AsciiString& theFile, + const Message_ProgressRange& theProgress, + const Standard_Boolean theToProbe) Standard_OVERRIDE; + +}; + +#endif // _VrmlAPI_Reader_HeaderFile diff --git a/src/XDEDRAW/XDEDRAW_Common.cxx b/src/XDEDRAW/XDEDRAW_Common.cxx index e047a2522a..3da8366312 100644 --- a/src/XDEDRAW/XDEDRAW_Common.cxx +++ b/src/XDEDRAW/XDEDRAW_Common.cxx @@ -13,7 +13,6 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. - #include #include #include @@ -39,6 +38,7 @@ #include #include #include +#include #include #include @@ -49,6 +49,7 @@ #include #include #include +#include #include #include @@ -58,6 +59,30 @@ //============================================================ static NCollection_DataMap thedictws; +//======================================================================= +//function : parseCoordinateSystem +//purpose : Parse RWMesh_CoordinateSystem enumeration. +//======================================================================= +static bool parseCoordinateSystem(const char* theArg, + RWMesh_CoordinateSystem& theSystem) +{ + TCollection_AsciiString aCSStr(theArg); + aCSStr.LowerCase(); + if (aCSStr == "zup") + { + theSystem = RWMesh_CoordinateSystem_Zup; + } + else if (aCSStr == "yup") + { + theSystem = RWMesh_CoordinateSystem_Yup; + } + else + { + return Standard_False; + } + return Standard_True; +} + static Standard_Boolean ClearDicWS() { thedictws.Clear(); @@ -721,6 +746,142 @@ static Standard_Integer Extract(Draw_Interpretor& di, return 0; } +//======================================================================= +//function : ReadVrml +//purpose : +//======================================================================= +static Standard_Integer ReadVrml(Draw_Interpretor& theDI, + Standard_Integer theArgc, + const char** theArgv) +{ + if(theArgc < 3) + { + theDI.PrintHelp(theArgv[0]); + return 1; + } + + Handle(TDocStd_Document) aDoc; + Standard_Real aFileUnitFactor = 1.0; + RWMesh_CoordinateSystem aFileCoordSys = RWMesh_CoordinateSystem_Yup, aSystemCoordSys = RWMesh_CoordinateSystem_Zup; + Standard_Boolean toUseExistingDoc = Standard_False; + Standard_Boolean toFillIncomplete = Standard_True; + Standard_CString aDocName = NULL; + TCollection_AsciiString aFilePath; + + for(Standard_Integer anArgIt = 1; anArgIt < theArgc; anArgIt++) + { + TCollection_AsciiString anArg(theArgv[anArgIt]); + anArg.LowerCase(); + if(anArgIt + 1 < theArgc && anArg == "-fileunit") + { + const TCollection_AsciiString aUnitStr(theArgv[++anArgIt]); + aFileUnitFactor = UnitsAPI::AnyToSI(1.0, aUnitStr.ToCString()); + if (aFileUnitFactor <= 0.0) + { + Message::SendFail() << "Error: wrong length unit '" << aUnitStr << "'"; + return 1; + } + } + else if (anArgIt + 1 < theArgc && anArg == "-filecoordsys") + { + if (!parseCoordinateSystem(theArgv[++anArgIt], aFileCoordSys)) + { + Message::SendFail() << "Error: unknown coordinate system '" << theArgv[anArgIt] << "'"; + return 1; + } + } + else if (anArgIt + 1 < theArgc && anArg == "-systemcoordsys") + { + if (!parseCoordinateSystem(theArgv[++anArgIt], aSystemCoordSys)) + { + Message::SendFail() << "Error: unknown coordinate system '" << theArgv[anArgIt] << "'"; + return 1; + } + } + else if (anArg == "-fillincomplete") + { + toFillIncomplete = true; + if (anArgIt + 1 < theArgc && Draw::ParseOnOff(theArgv[anArgIt + 1], toFillIncomplete)) + { + ++anArgIt; + } + } + else if (anArg == "-nocreatedoc") + { + toUseExistingDoc = true; + } + else if (aDocName == nullptr) + { + aDocName = theArgv[anArgIt]; + DDocStd::GetDocument(aDocName, aDoc, Standard_False); + } + else if(aFilePath.IsEmpty()) + { + aFilePath = theArgv[anArgIt]; + } + else + { + Message::SendFail() << "Syntax error at '" << theArgv[anArgIt] << "'"; + return 1; + } + } + + if (aFilePath.IsEmpty() || aDocName == nullptr) + { + Message::SendFail() << "Syntax error: wrong number of arguments"; + return 1; + } + + if (aDoc.IsNull()) + { + if(toUseExistingDoc) + { + Message::SendFail() << "Error: document with name " << aDocName << " does not exist"; + return 1; + } + Handle(TDocStd_Application) anApp = DDocStd::GetApplication(); + anApp->NewDocument("BinXCAF", aDoc); + } + else if (!toUseExistingDoc) + { + Message::SendFail() << "Error: document with name " << aDocName << " already exists\n"; + return 1; + } + + Standard_Real aScaleFactor = 1.; + if (!XCAFDoc_DocumentTool::GetLengthUnit(aDoc, aScaleFactor)) + { + XSAlgo::AlgoContainer()->PrepareForTransfer(); + aScaleFactor = UnitsMethods::GetCasCadeLengthUnit(); + } + + VrmlAPI_CafReader aVrmlReader; + aVrmlReader.SetDocument(aDoc); + aVrmlReader.SetFileLengthUnit(aFileUnitFactor); + aVrmlReader.SetSystemLengthUnit(aScaleFactor); + aVrmlReader.SetFileCoordinateSystem(aFileCoordSys); + aVrmlReader.SetSystemCoordinateSystem(aSystemCoordSys); + aVrmlReader.SetFillIncompleteDocument(toFillIncomplete); + + Handle(Draw_ProgressIndicator) aProgress = new Draw_ProgressIndicator(theDI, 1); + if (!aVrmlReader.Perform(aFilePath, aProgress->Start())) + { + if (aVrmlReader.ExtraStatus() != RWMesh_CafReaderStatusEx_Partial) + { + Message::SendFail() << "Error: file reading failed '" << aFilePath << "'"; + return 1; + } + Message::SendWarning() << + "Warning: file has been read paratially (due to unexpected EOF, syntax error, memory limit) " << aFilePath; + } + + TDataStd_Name::Set(aDoc->GetData()->Root(), aDocName); + Handle(DDocStd_DrawDocument) aDD = new DDocStd_DrawDocument(aDoc); + Draw::Set(aDocName, aDD); + + return 0; +} + //======================================================================= //function : WriteVrml //purpose : Write DECAF document to Vrml @@ -1126,7 +1287,20 @@ void XDEDRAW_Common::InitCommands(Draw_Interpretor& di) "Extracts given srcLabel1 srcLabel2 ... from srcDoc into given Doc or assembly shape", __FILE__, Extract, g); - di.Add("WriteVrml", "Doc filename [version VRML#1.0/VRML#2.0 (1/2): 2 by default] [representation shaded/wireframe/both (0/1/2): 0 by default]", __FILE__, WriteVrml, g); + di.Add("ReadVrml", + "ReadVrml docName filePath [-fileCoordSys {Zup|Yup}] [-fileUnit Unit]" + "\n\t\t: [-systemCoordSys {Zup|Yup}] [-noCreateDoc] [-fillIncomplete {ON|OFF}]" + "\n\t\t: Read Vrml file into XDE document." + "\n\t\t: -fileCoordSys coordinate system defined by Vrml file; Yup when not specified." + "\n\t\t: -fileUnit length unit of Vrml file content." + "\n\t\t: -systemCoordSys result coordinate system; Zup when not specified." + "\n\t\t: -noCreateDoc read into existing XDE document." + "\n\t\t: -fillIncomplete fill the document with partially retrieved data even if reader has failed with " + "error; true when not specified", + __FILE__, ReadVrml, g); + di.Add("WriteVrml", + "WriteVrml Doc filename [version VRML#1.0/VRML#2.0 (1/2): 2 by default] [representation shaded/wireframe/both (0/1/2): 0 by default]", + __FILE__, WriteVrml, g); di.Add("DumpConfiguration", "DumpConfiguration [-path ] [-recursive {on|off}] [-format fmt1 fmt2 ...] [-vendor vend1 vend2 ...]\n" diff --git a/tests/de_mesh/grids.list b/tests/de_mesh/grids.list index 8c433645f0..52d9019732 100644 --- a/tests/de_mesh/grids.list +++ b/tests/de_mesh/grids.list @@ -7,4 +7,5 @@ 007 obj_write 008 ply_write 009 step_read -010 step_write \ No newline at end of file +010 step_write +011 vrml_read \ No newline at end of file diff --git a/tests/de_mesh/vrml_read/A1 b/tests/de_mesh/vrml_read/A1 new file mode 100644 index 0000000000..6d2c371bbf --- /dev/null +++ b/tests/de_mesh/vrml_read/A1 @@ -0,0 +1,32 @@ +puts "============" +puts "0032820: Data Exchange - add VRML reader to XCAF document" +puts "============" +puts "" + +set aFile [locate_data_file bug29597_vrml2.wrl] + +catch { Close D } + +loadvrml S_${casename} $aFile +vinit Driver1/View_${casename}_1/${casename}_1 +vdisplay S_${casename} -dispmode 1 +vfit +checkview -screenshot -3d -path ${imagedir}/${test_image}_1.png + +XNewDoc D +ReadVrml D $aFile -nocreatedoc +vinit Driver1/View_${casename}_2/${casename}_2 +XDisplay D -dispMode 1 +vfit +checkview -screenshot -3d -path ${imagedir}/${test_image}_2.png + +XGetOneShape S_New D +checktrinfo S_New -ref [trinfo S_${casename}] + +set ref_colors "TEAL " +set new_colors [ XGetAllColors D ] +if {[ string equal $new_colors $ref_colors ] == 0} { + puts "Error: Colors have been read incorrectly." +} + +Close D diff --git a/tests/de_mesh/vrml_read/A2 b/tests/de_mesh/vrml_read/A2 new file mode 100644 index 0000000000..868102f2f7 --- /dev/null +++ b/tests/de_mesh/vrml_read/A2 @@ -0,0 +1,25 @@ +puts "============" +puts "0032820: Data Exchange - add VRML reader to XCAF document" +puts "============" +puts "" + +set aFile [locate_data_file M_2056112640_E.wrl] + +catch { Close D } + +loadvrml S_${casename} $aFile +vinit Driver1/View_${casename}_1/${casename}_1 +vdisplay S_${casename} -dispmode 1 +vfit +checkview -screenshot -3d -path ${imagedir}/${test_image}_1.png + +XNewDoc D +ReadVrml D $aFile -nocreatedoc +vinit Driver1/View_${casename}_2/${casename}_2 +XDisplay D -dispMode 1 +vfit +checkview -screenshot -3d -path ${imagedir}/${test_image}_2.png + +XGetOneShape S_New D +checktrinfo S_New -ref [trinfo S_${casename}] +Close D diff --git a/tests/de_mesh/vrml_read/A3 b/tests/de_mesh/vrml_read/A3 new file mode 100644 index 0000000000..42b72856db --- /dev/null +++ b/tests/de_mesh/vrml_read/A3 @@ -0,0 +1,32 @@ +puts "============" +puts "0032820: Data Exchange - add VRML reader to XCAF document" +puts "============" +puts "" + +set aFile [locate_data_file OCC22092-sk97.wrl] + +catch { Close D } + +loadvrml S_${casename} $aFile +vinit Driver1/View_${casename}_1/${casename}_1 +vdisplay S_${casename} -dispmode 1 +vfit +checkview -screenshot -3d -path ${imagedir}/${test_image}_1.png + +XNewDoc D +ReadVrml D $aFile -nocreatedoc +vinit Driver1/View_${casename}_2/${casename}_2 +XDisplay D -dispMode 1 +vfit +checkview -screenshot -3d -path ${imagedir}/${test_image}_2.png + +XGetOneShape S_New D +checktrinfo S_New -tol_abs_defl 1e-14 -ref [trinfo S_${casename}] + +set ref_colors "BLACK " +set new_colors [ XGetAllColors D ] +if {[ string equal $new_colors $ref_colors ] == 0} { + puts "Error: Colors have been read incorrectly." +} + +Close D diff --git a/tests/de_mesh/vrml_read/A4 b/tests/de_mesh/vrml_read/A4 new file mode 100644 index 0000000000..a9e0ca4380 --- /dev/null +++ b/tests/de_mesh/vrml_read/A4 @@ -0,0 +1,22 @@ +puts "============" +puts "0032820: Data Exchange - add VRML reader to XCAF document" +puts "============" +puts "" + +set aFile [locate_data_file OCC23023-2056132060_2_tutnicht.wrl] + +catch { Close D } + +XNewDoc D +ReadVrml D $aFile -nocreatedoc +vinit Driver1/View_${casename}_1/${casename}_1 +XDisplay D -dispMode 1 +vfit +checkview -screenshot -3d -path ${imagedir}/${test_image}_1.png + +set ref_colors "GRAY76 GRAY64 WHITE TURQUOISE4 " +set d_colors [ XGetAllColors D ] + +if { [ string equal $d_colors $ref_colors ] == 0 } { + puts "Error: Colors have been read incorrectly." +} diff --git a/tests/de_mesh/vrml_read/begin b/tests/de_mesh/vrml_read/begin new file mode 100644 index 0000000000..23c0924765 --- /dev/null +++ b/tests/de_mesh/vrml_read/begin @@ -0,0 +1,5 @@ +# File: begin + +pload XDE +pload OCAF +pload TOPTEST diff --git a/tests/de_wrapper/configuration/A3 b/tests/de_wrapper/configuration/A3 index 2e0d1456fc..a54692fb9c 100644 --- a/tests/de_wrapper/configuration/A3 +++ b/tests/de_wrapper/configuration/A3 @@ -61,6 +61,11 @@ provider.STEP.OCC.write.name : 1 provider.STEP.OCC.write.layer : 1 provider.STEP.OCC.write.props : 1 provider.STEP.OCC.write.model.type : 0 +provider.VRML.OCC.read.file.unit : 1 +provider.VRML.OCC.read.memory.limit : -1 +provider.VRML.OCC.read.file.coordinate.system : 1 +provider.VRML.OCC.read.system.coordinate.system : 0 +provider.VRML.OCC.read.fill.incomplete : 1 provider.VRML.OCC.writer.version : 2 provider.VRML.OCC.write.representation.type : 1 provider.STL.OCC.read.merge.angle : 90 diff --git a/tests/de_wrapper/vrml/A5 b/tests/de_wrapper/vrml/A5 index f71d00449f..1a61df6fe4 100644 --- a/tests/de_wrapper/vrml/A5 +++ b/tests/de_wrapper/vrml/A5 @@ -19,25 +19,25 @@ if [catch {loadvrml res1 $filename} catch_result] { puts "OK : Reading is correct" } -if [catch {ReadFile D2 $filename} catch_result] { +if [catch {ReadFile D2 $filename -conf "provider.VRML.OCC.read.file.unit : 1000"} catch_result] { puts "Error : Problem with reading file" } else { puts "OK : Reading is correct" } XGetOneShape S2 D2 -if { [XGetLengthUnit D2] != "mm" } { +if { [XGetLengthUnit D2] != "km" } { puts "Error: incrorrect document's length unit" } XNewDoc D3 -if [catch {ReadFile D3 $filename -conf "global.general.length.unit : 1000 " } catch_result] { +if [catch {ReadFile D3 $filename -conf "provider.VRML.OCC.read.file.unit : 0.001" } catch_result] { puts "Error : Problem with reading file" } else { puts "OK : Reading is correct" } XGetOneShape S3 D3 -if [catch {readfile S4 $filename } catch_result] { +if [catch {readfile S4 $filename -conf "global.general.length.unit : 0.001 "} catch_result] { puts "Error : Problem with reading file" } else { puts "OK : Reading is correct" @@ -49,7 +49,7 @@ if [catch {readfile S5 $filename -conf "global.general.length.unit : 1000 " } ca puts "OK : Reading is correct" } -array set areas {0 5.3415e+06 1 5.3415 2 5.3415e+06 3 5.3415 4 5.3415e+06 5 5.3415} +array set areas {0 5.3415e+06 1 5.3415 2 5.3415e+06 3 5.3415e-06 4 5.3415e-06 5 5.3415e+06} array set results {0 res0 1 res1 2 S2 3 S3 4 S4 5 S5} for { set anind 0} { $anind < 6 } { incr anind } { checkprops $results($anind) -s $areas($anind) -eps 1e-2 diff --git a/tests/de_wrapper/vrml/A6 b/tests/de_wrapper/vrml/A6 index c823bf1326..449b313526 100644 --- a/tests/de_wrapper/vrml/A6 +++ b/tests/de_wrapper/vrml/A6 @@ -79,7 +79,7 @@ if [catch {WriteFile D0 $write_path} catch_result] { } else { puts "OK : Writing is correct" } -if [catch {ReadFile D6 $write_path -conf "global.general.length.unit : 1 "} catch_result] { +if [catch {ReadFile D6 $write_path -conf "provider.VRML.OCC.read.file.unit : 1"} catch_result] { puts "Error : Problem with reading file" } else { puts "OK : Reading is correct" @@ -91,7 +91,7 @@ if [catch {writefile S1 $write_path} catch_result] { } else { puts "OK : Writing is correct" } -if [catch {ReadFile D7 $write_path -conf "global.general.length.unit : 1000 "} catch_result] { +if [catch {ReadFile D7 $write_path -conf "provider.VRML.OCC.read.file.unit : 0.001"} catch_result] { puts "Error : Problem with reading file" } else { puts "OK : Reading is correct" From b95eefe1c2879453d2011ac7df247aa3f453167c Mon Sep 17 00:00:00 2001 From: jgv Date: Thu, 22 Sep 2022 12:51:18 +0300 Subject: [PATCH 384/639] 0031992: Modeling Algorithms - Offset of closed B-spline edge fails 1. Increase the tolerance of approximation. 2. Update auxiliary Draw command "topoload" for usage of option "-approx". Add missing comment --- .../BRepOffsetAPI_MakeOffset.cxx | 7 +- .../BRepOffsetAPI_MakeOffset.hxx | 5 +- src/BRepTest/BRepTest_MatCommands.cxx | 15 ++++- src/MAT2d/MAT2d_Tool2d.cxx | 35 +++++++++- src/TKDraw/EXTERNLIB | 1 - tests/bugs/modalg_8/bug31992 | 64 +++++++++++++++++++ tests/bugs/modalg_8/bug32214_4 | 28 ++++---- tests/bugs/modalg_8/bug32214_5 | 34 +++++----- tests/bugs/modalg_8/bug32214_6 | 42 ++++++------ 9 files changed, 170 insertions(+), 61 deletions(-) create mode 100644 tests/bugs/modalg_8/bug31992 diff --git a/src/BRepOffsetAPI/BRepOffsetAPI_MakeOffset.cxx b/src/BRepOffsetAPI/BRepOffsetAPI_MakeOffset.cxx index fda3234e48..806ae4aa71 100644 --- a/src/BRepOffsetAPI/BRepOffsetAPI_MakeOffset.cxx +++ b/src/BRepOffsetAPI/BRepOffsetAPI_MakeOffset.cxx @@ -60,8 +60,8 @@ static Standard_Boolean NeedsConvertion (const TopoDS_Wire& theWire) return Standard_False; } -static TopoDS_Face ConvertFace (const TopoDS_Face& theFace, - const Standard_Real theAngleTolerance) +TopoDS_Face BRepOffsetAPI_MakeOffset::ConvertFace (const TopoDS_Face& theFace, + const Standard_Real theAngleTolerance) { TopAbs_Orientation anOr = theFace.Orientation(); TopoDS_Face aFace = theFace; @@ -76,6 +76,7 @@ static TopoDS_Face ConvertFace (const TopoDS_Face& theFace, if (NeedsConvertion (aWire)) { TopAbs_Orientation anOrOfWire = aWire.Orientation(); + aWire.Orientation (TopAbs_FORWARD); aWire = BRepAlgo::ConvertWire (aWire, theAngleTolerance, aFace); BRepLib::BuildCurves3d (aWire); aWire.Orientation (anOrOfWire); @@ -352,7 +353,7 @@ void BRepOffsetAPI_MakeOffset::Perform(const Standard_Real Offset, { if (myIsToApprox) { - Standard_Real aTol = 0.01; + Standard_Real aTol = 0.1; if (myFace.IsNull()) { TopoDS_Face aFace; diff --git a/src/BRepOffsetAPI/BRepOffsetAPI_MakeOffset.hxx b/src/BRepOffsetAPI/BRepOffsetAPI_MakeOffset.hxx index 43fd383af0..42907bdcc6 100644 --- a/src/BRepOffsetAPI/BRepOffsetAPI_MakeOffset.hxx +++ b/src/BRepOffsetAPI/BRepOffsetAPI_MakeOffset.hxx @@ -84,7 +84,10 @@ public: //! from the shape . Standard_EXPORT virtual const TopTools_ListOfShape& Generated (const TopoDS_Shape& S) Standard_OVERRIDE; - + //! Converts each wire of the face into contour consisting only of + //! arcs and segments. New 3D curves are built too. + Standard_EXPORT static TopoDS_Face ConvertFace (const TopoDS_Face& theFace, + const Standard_Real theAngleTolerance); protected: diff --git a/src/BRepTest/BRepTest_MatCommands.cxx b/src/BRepTest/BRepTest_MatCommands.cxx index 04255f2aff..cbde7fe112 100644 --- a/src/BRepTest/BRepTest_MatCommands.cxx +++ b/src/BRepTest/BRepTest_MatCommands.cxx @@ -35,6 +35,7 @@ #include #include +#include #include #include #include @@ -44,6 +45,7 @@ #include #include +#include #ifdef _WIN32 Standard_IMPORT Draw_Viewer dout; @@ -70,7 +72,16 @@ static Standard_Integer topoload (Draw_Interpretor& , Standard_Integer argc, con if (C1.IsNull()) return 1; - anExplo.Perform (TopoDS::Face(C1)); + TopoDS_Face aFace = TopoDS::Face(C1); + + if (argc >= 3 && + (strcmp(argv[2], "-approx") == 0)) + { + Standard_Real aTol = 0.1; + aFace = BRepOffsetAPI_MakeOffset::ConvertFace (aFace, aTol); + } + + anExplo.Perform (aFace); return 0; } @@ -267,7 +278,7 @@ void DrawCurve(const Handle(Geom2d_Curve)& aCurve, void BRepTest::MatCommands (Draw_Interpretor& theCommands) { - theCommands.Add("topoload","load face",__FILE__,topoload); + theCommands.Add("topoload","load face: topoload face [-approx]",__FILE__,topoload); theCommands.Add("drawcont","display current contour",__FILE__,drawcont); theCommands.Add("mat","computes the mat: mat [a/i [o]]",__FILE__,mat); theCommands.Add("side","side left/right",__FILE__,side); diff --git a/src/MAT2d/MAT2d_Tool2d.cxx b/src/MAT2d/MAT2d_Tool2d.cxx index c2b73d8441..9c77259759 100644 --- a/src/MAT2d/MAT2d_Tool2d.cxx +++ b/src/MAT2d/MAT2d_Tool2d.cxx @@ -27,10 +27,8 @@ #include #include #include -#include #endif - #include #include #include @@ -229,10 +227,22 @@ Standard_Integer MAT2d_Tool2d::TangentBefore(const Standard_Integer anitem, type = theCircuit->Value(anitem)->DynamicType(); if ( type != STANDARD_TYPE(Geom2d_CartesianPoint)){ curve = Handle(Geom2d_Curve)::DownCast(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 = Handle(Geom2d_Curve)::DownCast(theCircuit->Value(item)); +#ifdef DRAW + char *name = new char[100]; + sprintf(name, "c%d", item); + DrawTrSurf::Set(name, curve); + delete [] name; +#endif Standard_Real param = (IsOpenResult && anitem == theCircuit->NumberOfItems())? curve->LastParameter() : curve->FirstParameter(); theGeomVecs.Bind(theNumberOfVecs,curve->DN(param,1)); @@ -265,6 +275,12 @@ Standard_Integer MAT2d_Tool2d::TangentAfter(const Standard_Integer anitem, type = theCircuit->Value(anitem)->DynamicType(); if ( type != STANDARD_TYPE(Geom2d_CartesianPoint)){ curve = Handle(Geom2d_Curve)::DownCast(theCircuit->Value(anitem)); +#ifdef DRAW + char *name = new char[100]; + sprintf(name, "c%d", anitem); + DrawTrSurf::Set(name, curve); + delete [] name; +#endif thevector = curve->DN(curve->FirstParameter(),1); } else { @@ -272,7 +288,14 @@ Standard_Integer MAT2d_Tool2d::TangentAfter(const Standard_Integer anitem, item = (anitem == 1) ? theCircuit->NumberOfItems() : (anitem - 1); else item = (anitem == 1) ? 2 : (anitem - 1); + curve = Handle(Geom2d_Curve)::DownCast(theCircuit->Value(item)); +#ifdef DRAW + char *name = new char[100]; + sprintf(name, "c%d", item); + DrawTrSurf::Set(name, curve); + delete [] name; +#endif Standard_Real param = (IsOpenResult && anitem == 1)? curve->FirstParameter() : curve->LastParameter(); thevector = curve->DN(param,1); @@ -397,6 +420,14 @@ void MAT2d_Tool2d::CreateBisector(const Handle(MAT_Bisector)& 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 Standard_Boolean AffichDraw = Standard_False; if (AffichDraw) Dump(abisector->BisectorNumber(),1); diff --git a/src/TKDraw/EXTERNLIB b/src/TKDraw/EXTERNLIB index 46fa6c978b..7afca519af 100755 --- a/src/TKDraw/EXTERNLIB +++ b/src/TKDraw/EXTERNLIB @@ -5,7 +5,6 @@ TKG3d TKMath TKBRep TKGeomAlgo -TKTopAlgo TKShHealing TKMesh TKService diff --git a/tests/bugs/modalg_8/bug31992 b/tests/bugs/modalg_8/bug31992 new file mode 100644 index 0000000000..7e74c4d0e7 --- /dev/null +++ b/tests/bugs/modalg_8/bug31992 @@ -0,0 +1,64 @@ +puts "==============================================" +puts "OCC31992: Offset of closed B-spline edge fails" +puts "==============================================" +puts "" + +restore [locate_data_file bug31992.brep] a +wire a a +mkplane a a + +mkoffset result a 20 0.1 -approx + +top +fit + +checkview -screenshot -2d -path ${imagedir}/${test_image}.png + +for {set i 1} {$i<=20} {incr i} { + checkshape result_${i} + set tolres [checkmaxtol result_${i}] + if { ${tolres} > 1.001e-7} { + puts "Error: bad tolerance of result" + } +} + +checknbshapes result_1 -t -vertex 175 -edge 175 -wire 1 +checkprops result_1 -l 9.16454 +checknbshapes result_2 -t -vertex 175 -edge 175 -wire 1 +checkprops result_2 -l 9.79285 +checknbshapes result_3 -t -vertex 175 -edge 175 -wire 1 +checkprops result_3 -l 10.4212 +checknbshapes result_4 -t -vertex 175 -edge 175 -wire 1 +checkprops result_4 -l 11.0495 +checknbshapes result_5 -t -vertex 175 -edge 175 -wire 1 +checkprops result_5 -l 11.6778 +checknbshapes result_6 -t -vertex 173 -edge 173 -wire 1 +checkprops result_6 -l 12.3061 +checknbshapes result_7 -t -vertex 169 -edge 169 -wire 1 +checkprops result_7 -l 12.9344 +checknbshapes result_8 -t -vertex 167 -edge 167 -wire 1 +checkprops result_8 -l 13.5626 +checknbshapes result_9 -t -vertex 165 -edge 165 -wire 1 +checkprops result_9 -l 14.1907 +checknbshapes result_10 -t -vertex 162 -edge 162 -wire 1 +checkprops result_10 -l 14.8189 +checknbshapes result_11 -t -vertex 158 -edge 158 -wire 1 +checkprops result_11 -l 15.447 +checknbshapes result_12 -t -vertex 155 -edge 155 -wire 1 +checkprops result_12 -l 16.0748 +checknbshapes result_13 -t -vertex 154 -edge 154 -wire 1 +checkprops result_13 -l 16.7025 +checknbshapes result_14 -t -vertex 152 -edge 152 -wire 1 +checkprops result_14 -l 17.3303 +checknbshapes result_15 -t -vertex 150 -edge 150 -wire 1 +checkprops result_15 -l 17.958 +checknbshapes result_16 -t -vertex 148 -edge 148 -wire 1 +checkprops result_16 -l 18.5855 +checknbshapes result_17 -t -vertex 147 -edge 147 -wire 1 +checkprops result_17 -l 19.213 +checknbshapes result_18 -t -vertex 147 -edge 147 -wire 1 +checkprops result_18 -l 19.8405 +checknbshapes result_19 -t -vertex 146 -edge 146 -wire 1 +checkprops result_19 -l 20.4681 +checknbshapes result_20 -t -vertex 145 -edge 145 -wire 1 +checkprops result_20 -l 21.0957 diff --git a/tests/bugs/modalg_8/bug32214_4 b/tests/bugs/modalg_8/bug32214_4 index 31d1217a40..ae71ced38f 100644 --- a/tests/bugs/modalg_8/bug32214_4 +++ b/tests/bugs/modalg_8/bug32214_4 @@ -22,31 +22,31 @@ for {set i 1} {$i<=14} {incr i} { } } -checknbshapes result_1 -t -vertex 114 -edge 114 -wire 1 +checknbshapes result_1 -t -vertex 83 -edge 83 -wire 1 checkprops result_1 -l 4.39365 -checknbshapes result_2 -t -vertex 110 -edge 110 -wire 1 +checknbshapes result_2 -t -vertex 79 -edge 79 -wire 1 checkprops result_2 -l 5.02084 -checknbshapes result_3 -t -vertex 104 -edge 104 -wire 1 +checknbshapes result_3 -t -vertex 76 -edge 76 -wire 1 checkprops result_3 -l 5.64778 -checknbshapes result_4 -t -vertex 101 -edge 101 -wire 1 +checknbshapes result_4 -t -vertex 74 -edge 74 -wire 1 checkprops result_4 -l 6.27443 -checknbshapes result_5 -t -vertex 95 -edge 95 -wire 1 +checknbshapes result_5 -t -vertex 70 -edge 70 -wire 1 checkprops result_5 -l 6.89816 -checknbshapes result_6 -t -vertex 92 -edge 92 -wire 1 +checknbshapes result_6 -t -vertex 66 -edge 66 -wire 1 checkprops result_6 -l 7.51255 -checknbshapes result_7 -t -vertex 88 -edge 88 -wire 1 +checknbshapes result_7 -t -vertex 65 -edge 65 -wire 1 checkprops result_7 -l 8.12807 -checknbshapes result_8 -t -vertex 81 -edge 81 -wire 1 +checknbshapes result_8 -t -vertex 59 -edge 59 -wire 1 checkprops result_8 -l 8.74586 -checknbshapes result_9 -t -vertex 72 -edge 72 -wire 1 +checknbshapes result_9 -t -vertex 53 -edge 53 -wire 1 checkprops result_9 -l 9.36292 -checknbshapes result_10 -t -vertex 65 -edge 65 -wire 1 +checknbshapes result_10 -t -vertex 51 -edge 51 -wire 1 checkprops result_10 -l 9.97455 -checknbshapes result_11 -t -vertex 60 -edge 60 -wire 1 +checknbshapes result_11 -t -vertex 50 -edge 50 -wire 1 checkprops result_11 -l 10.5864 -checknbshapes result_12 -t -vertex 59 -edge 59 -wire 1 +checknbshapes result_12 -t -vertex 49 -edge 49 -wire 1 checkprops result_12 -l 11.2017 -checknbshapes result_13 -t -vertex 57 -edge 57 -wire 1 +checknbshapes result_13 -t -vertex 49 -edge 49 -wire 1 checkprops result_13 -l 11.8196 -checknbshapes result_14 -t -vertex 55 -edge 55 -wire 1 +checknbshapes result_14 -t -vertex 47 -edge 47 -wire 1 checkprops result_14 -l 12.4395 diff --git a/tests/bugs/modalg_8/bug32214_5 b/tests/bugs/modalg_8/bug32214_5 index fa6eb5c7c6..47b83e43e5 100644 --- a/tests/bugs/modalg_8/bug32214_5 +++ b/tests/bugs/modalg_8/bug32214_5 @@ -22,31 +22,31 @@ for {set i 1} {$i<=14} {incr i} { } } -checknbshapes result_1 -t -vertex 61 -edge 60 -wire 1 +checknbshapes result_1 -t -vertex 47 -edge 46 -wire 1 checkprops result_1 -l 2.04858 -checknbshapes result_2 -t -vertex 61 -edge 60 -wire 1 +checknbshapes result_2 -t -vertex 47 -edge 46 -wire 1 checkprops result_2 -l 2.21414 -checknbshapes result_3 -t -vertex 61 -edge 60 -wire 1 +checknbshapes result_3 -t -vertex 47 -edge 46 -wire 1 checkprops result_3 -l 2.37971 -checknbshapes result_4 -t -vertex 61 -edge 60 -wire 1 +checknbshapes result_4 -t -vertex 47 -edge 46 -wire 1 checkprops result_4 -l 2.54528 -checknbshapes result_5 -t -vertex 61 -edge 60 -wire 1 +checknbshapes result_5 -t -vertex 47 -edge 46 -wire 1 checkprops result_5 -l 2.71084 -checknbshapes result_6 -t -vertex 61 -edge 60 -wire 1 +checknbshapes result_6 -t -vertex 47 -edge 46 -wire 1 checkprops result_6 -l 2.87641 -checknbshapes result_7 -t -vertex 61 -edge 60 -wire 1 +checknbshapes result_7 -t -vertex 47 -edge 46 -wire 1 checkprops result_7 -l 3.04198 -checknbshapes result_8 -t -vertex 56 -edge 55 -wire 1 +checknbshapes result_8 -t -vertex 43 -edge 42 -wire 1 checkprops result_8 -l 3.20723 -checknbshapes result_9 -t -vertex 50 -edge 49 -wire 1 -checkprops result_9 -l 3.38587 -checknbshapes result_10 -t -vertex 48 -edge 47 -wire 1 +checknbshapes result_9 -t -vertex 38 -edge 37 -wire 1 +checkprops result_9 -l 3.32866 +checknbshapes result_10 -t -vertex 38 -edge 37 -wire 1 checkprops result_10 -l 3.58204 -checknbshapes result_11 -t -vertex 45 -edge 44 -wire 1 -checkprops result_11 -l 3.73715 -checknbshapes result_12 -t -vertex 45 -edge 44 -wire 1 -checkprops result_12 -l 3.97323 -checknbshapes result_13 -t -vertex 43 -edge 42 -wire 1 +checknbshapes result_11 -t -vertex 37 -edge 36 -wire 1 +checkprops result_11 -l 3.67639 +checknbshapes result_12 -t -vertex 37 -edge 36 -wire 1 +checkprops result_12 -l 3.90941 +checknbshapes result_13 -t -vertex 37 -edge 36 -wire 1 checkprops result_13 -l 4.14242 -checknbshapes result_14 -t -vertex 43 -edge 42 -wire 1 +checknbshapes result_14 -t -vertex 37 -edge 36 -wire 1 checkprops result_14 -l 4.37544 diff --git a/tests/bugs/modalg_8/bug32214_6 b/tests/bugs/modalg_8/bug32214_6 index 732073bbef..251dd8e097 100644 --- a/tests/bugs/modalg_8/bug32214_6 +++ b/tests/bugs/modalg_8/bug32214_6 @@ -22,31 +22,31 @@ for {set i 1} {$i<=14} {incr i} { } } -checknbshapes result_1 -t -vertex 50 -edge 49 -wire 1 +checknbshapes result_1 -t -vertex 33 -edge 32 -wire 1 checkprops result_1 -l 1.66475 -checknbshapes result_2 -t -vertex 46 -edge 45 -wire 1 -checkprops result_2 -l 1.57655 -checknbshapes result_3 -t -vertex 40 -edge 39 -wire 1 -checkprops result_3 -l 1.48755 -checknbshapes result_4 -t -vertex 37 -edge 36 -wire 1 +checknbshapes result_2 -t -vertex 29 -edge 28 -wire 1 +checkprops result_2 -l 1.56032 +checknbshapes result_3 -t -vertex 26 -edge 25 -wire 1 +checkprops result_3 -l 1.45922 +checknbshapes result_4 -t -vertex 24 -edge 23 -wire 1 checkprops result_4 -l 1.39682 -checknbshapes result_5 -t -vertex 31 -edge 30 -wire 1 +checknbshapes result_5 -t -vertex 20 -edge 19 -wire 1 checkprops result_5 -l 1.30715 -checknbshapes result_6 -t -vertex 28 -edge 27 -wire 1 +checknbshapes result_6 -t -vertex 16 -edge 15 -wire 1 checkprops result_6 -l 1.27033 -checknbshapes result_7 -t -vertex 24 -edge 23 -wire 1 +checknbshapes result_7 -t -vertex 15 -edge 14 -wire 1 checkprops result_7 -l 1.1996 -checknbshapes result_8 -t -vertex 22 -edge 21 -wire 1 +checknbshapes result_8 -t -vertex 13 -edge 12 -wire 1 checkprops result_8 -l 1.1737 -checknbshapes result_9 -t -vertex 18 -edge 17 -wire 1 +checknbshapes result_9 -t -vertex 11 -edge 10 -wire 1 checkprops result_9 -l 1.17713 -checknbshapes result_10 -t -vertex 17 -edge 16 -wire 1 -checkprops result_10 -l 1.22711 -checknbshapes result_11 -t -vertex 14 -edge 13 -wire 1 -checkprops result_11 -l 1.2663 -checknbshapes result_12 -t -vertex 14 -edge 13 -wire 1 -checkprops result_12 -l 1.33108 -checknbshapes result_13 -t -vertex 14 -edge 13 -wire 1 -checkprops result_13 -l 1.39586 -checknbshapes result_14 -t -vertex 14 -edge 13 -wire 1 -checkprops result_14 -l 1.46064 +checknbshapes result_10 -t -vertex 9 -edge 8 -wire 1 +checkprops result_10 -l 1.11521 +checknbshapes result_11 -t -vertex 9 -edge 8 -wire 1 +checkprops result_11 -l 1.17655 +checknbshapes result_12 -t -vertex 8 -edge 7 -wire 1 +checkprops result_12 -l 1.10597 +checknbshapes result_13 -t -vertex 8 -edge 7 -wire 1 +checkprops result_13 -l 1.16139 +checknbshapes result_14 -t -vertex 6 -edge 5 -wire 1 +checkprops result_14 -l 1.06775 From b3284f3ba911e4d18477ff1788ace3d7201a8827 Mon Sep 17 00:00:00 2001 From: ddzama Date: Thu, 15 Sep 2022 09:40:48 +0300 Subject: [PATCH 385/639] 0033117: migration to intel oneTBB 2021.5.0 (c++20 ready) MSVC 2022/c++20. After employed c++20 language standard errors of compilation in intel oneTBB occurred. To get rid of compilation errors proposed moving on actual (2021.5.0) intel oneTBB occ products and occt. After migration errors of compilation of TKernel and TMath have been occurred... ...Error occurred if using c++20 standard with new oneTBB 2021.5.0. The error was: Error C2672 'tbb::v1::parallel_for_each': no matching overloaded function found TKernel could be 'void tbb::detail::d2::parallel_for_each(Iterator,Iterator,const Body &)' TKernel 'tbb::detail::d2::parallel_for_each': the associated constraints are not satisfied TKernel Note, that if we use c++14 or c++17, all ok, error does not occures. To solve the problem, i have to modify `UniversalIterator` class: `value_type` instead `UniversalIterator` converted to `IteratorInterface*` `pointer` = `reference` = `value_type` Method `DownCast` moved into `FunctorInterface` abstract class. argument `UniversalIterator& item` of the unary fuctions converted to `IteratorInterface*`. The proposed solution removes compilation error. Affected projects: TKernel, TMath Affected sources: src/OSD/OSD_Parallel.hxx, src/OSD/OSD_Parallel_Threads.cxx Affected classes: class OSD_Parallel, OSD_Parallel::UniversalIterator, OSD_Parallel::FunctorInterface, OSD_Parallel::FunctorWrapperIter, OSD_Parallel:;FunctorWrapperInt. --- adm/cmake/tbb.cmake | 348 ++++++++---------- adm/genconfdeps.tcl | 6 +- dox/build/build_3rdparty/building_3rdparty.md | 17 +- dox/introduction/introduction.md | 5 +- src/OSD/OSD_Parallel.hxx | 37 +- src/OSD/OSD_Parallel_Threads.cxx | 2 +- 6 files changed, 190 insertions(+), 225 deletions(-) diff --git a/adm/cmake/tbb.cmake b/adm/cmake/tbb.cmake index 670fa4d338..c39a1a9f2e 100644 --- a/adm/cmake/tbb.cmake +++ b/adm/cmake/tbb.cmake @@ -1,5 +1,13 @@ # tbb +if (NOT DEFINED 3RDPARTY_DIR) + message (FATAL_ERROR "3RDPARTY_DIR is not defined.") +endif() + +if ((NOT EXISTS "${3RDPARTY_DIR}") OR ("${3RDPARTY_DIR}" STREQUAL "")) + message (FATAL_ERROR "Directory ${3RDPARTY_DIR} is not set.") +endif() + if (NOT DEFINED INSTALL_TBB AND BUILD_SHARED_LIBS) set (INSTALL_TBB OFF CACHE BOOL "${INSTALL_TBB_DESCR}") endif() @@ -69,226 +77,186 @@ else() set (3RDPARTY_TBB_INCLUDE_DIR "" CACHE PATH "the path to tbb.h" FORCE) endif() -# common steps for tbb and tbbmalloc -macro (TBB_PRODUCT_SEARCH PRODUCT_LIBRARY_NAME) - - string (TOUPPER ${PRODUCT_LIBRARY_NAME} upper_PRODUCT_LIBRARY_NAME) +# Throw execution if 3RDPARTY_TBB_DIR is equal to void string. +if ("${3RDPARTY_TBB_DIR}" STREQUAL "") + message (FATAL_ERROR "Directory with one TBB have not found.") +endif() - # define required tbb/tbbmalloc variables - if (NOT DEFINED 3RDPARTY_${upper_PRODUCT_LIBRARY_NAME}_LIBRARY OR NOT 3RDPARTY_${upper_PRODUCT_LIBRARY_NAME}_LIBRARY_DIR OR NOT EXISTS "${3RDPARTY_${upper_PRODUCT_LIBRARY_NAME}_LIBRARY_DIR}") - set (3RDPARTY_${upper_PRODUCT_LIBRARY_NAME}_LIBRARY "" CACHE FILEPATH "${upper_PRODUCT_LIBRARY_NAME} library" FORCE) - endif() +# Searching TBBConfig.cmake and TBBTargets-release.cmake in 3RDPARTY_TBB_DIR +# TBBConfig.cmake - is required, TBBTargets-release.cmake is optional. +file (GLOB_RECURSE TBB_CONFIG_CMAKE_FILE "${3RDPARTY_TBB_DIR}/*TBBConfig.cmake") +if (NOT EXISTS "${TBB_CONFIG_CMAKE_FILE}") + message (FATAL_ERROR "TBBConfig.cmake has not been found.") +endif() +include ("${TBB_CONFIG_CMAKE_FILE}") - if (NOT DEFINED 3RDPARTY_${upper_PRODUCT_LIBRARY_NAME}_LIBRARY_DIR) - set (3RDPARTY_${upper_PRODUCT_LIBRARY_NAME}_LIBRARY_DIR "" CACHE PATH "The directory containing ${upper_PRODUCT_LIBRARY_NAME} library") - endif() +file (GLOB_RECURSE TBB_TARGET_CMAKE_FILE "${3RDPARTY_TBB_DIR}/*TBBTargets-release.cmake") +if (EXISTS "${TBB_TARGET_CMAKE_FILE}") + include ("${TBB_TARGET_CMAKE_FILE}") +endif() - if (WIN32) - if (NOT DEFINED 3RDPARTY_${upper_PRODUCT_LIBRARY_NAME}_DLL OR NOT 3RDPARTY_${upper_PRODUCT_LIBRARY_NAME}_DLL_DIR OR NOT EXISTS "${3RDPARTY_${upper_PRODUCT_LIBRARY_NAME}_DLL_DIR}") - set (3RDPARTY_${upper_PRODUCT_LIBRARY_NAME}_DLL "" CACHE FILEPATH "${upper_PRODUCT_LIBRARY_NAME} shared library" FORCE) +# We do not know, full path to file is pointed, or local. +# So, we should check it and output FULL PATH to FILE. +macro (TBB_FILE_NAME_TO_FILEPATH FL_NAME FL_PATH) + if (EXISTS "${FL_NAME}") + # FL_NAME is full path. + set (${FL_PATH} "${FL_NAME}") + else() + # Here we deal with local path, so assign to var full path to file. + # Acquire full path. + set (${FL_PATH} "${3RDPARTY_TBB_DIR}${FL_NAME}") + if (NOT EXISTS "${${FL_PATH}}") + message (FATAL_ERROR "TBB: needed file not found (${FL_PATH}).") endif() endif() +endmacro() - if (WIN32 AND NOT DEFINED 3RDPARTY_${upper_PRODUCT_LIBRARY_NAME}_DLL_DIR) - set (3RDPARTY_${upper_PRODUCT_LIBRARY_NAME}_DLL_DIR "" CACHE PATH "The directory containing ${upper_PRODUCT_LIBRARY_NAME} shared library") +# TARGET_NAME - is target name from oneTBB cmake file +# it is either "TBB::tbb", or "TBB::tbbmalloc" +# LIB_NAME_UC - is library id (TBB or TBBMALLOC) +# PROPERTY_TO_SET - LIBRARY or DLL +macro (WIN_TBB_PARSE TARGET_NAME LIB_NAME PROPERTY_TO_SET) + set (FILE_NAME "") + set (FILE_PATH "") + set (FILE_DIR "") + + if ("${PROPERTY_TO_SET}" STREQUAL "LIBRARY") + get_target_property (FILE_NAME "${TARGET_NAME}" IMPORTED_IMPLIB_RELEASE) + else() + get_target_property (FILE_NAME "${TARGET_NAME}" IMPORTED_LOCATION_RELEASE) endif() - # check 3RDPARTY_${upper_PRODUCT_LIBRARY_NAME}_ paths for consistency with specified 3RDPARTY_TBB_DIR - if (3RDPARTY_TBB_DIR AND EXISTS "${3RDPARTY_TBB_DIR}") - CHECK_PATH_FOR_CONSISTENCY (3RDPARTY_TBB_DIR 3RDPARTY_${upper_PRODUCT_LIBRARY_NAME}_LIBRARY FILEPATH "the path to ${upper_PRODUCT_LIBRARY_NAME} library") - - if (3RDPARTY_${upper_PRODUCT_LIBRARY_NAME}_LIBRARY AND EXISTS "${3RDPARTY_${upper_PRODUCT_LIBRARY_NAME}_LIBRARY}") - get_filename_component (3RDPARTY_${upper_PRODUCT_LIBRARY_NAME}_LIBRARY_DIR "${3RDPARTY_${upper_PRODUCT_LIBRARY_NAME}_LIBRARY}" PATH) - set (3RDPARTY_${upper_PRODUCT_LIBRARY_NAME}_LIBRARY_DIR "${3RDPARTY_${upper_PRODUCT_LIBRARY_NAME}_LIBRARY_DIR}" CACHE PATH "The directory containing ${upper_PRODUCT_LIBRARY_NAME} library" FORCE) - else() - CHECK_PATH_FOR_CONSISTENCY (3RDPARTY_TBB_DIR 3RDPARTY_${upper_PRODUCT_LIBRARY_NAME}_LIBRARY_DIR PATH "The directory containing ${upper_PRODUCT_LIBRARY_NAME} library") - endif() - - if (WIN32) - CHECK_PATH_FOR_CONSISTENCY (3RDPARTY_TBB_DIR 3RDPARTY_${upper_PRODUCT_LIBRARY_NAME}_DLL FILEPATH "the path to ${upper_PRODUCT_LIBRARY_NAME} shared library") + # acquire full path + TBB_FILE_NAME_TO_FILEPATH("${FILE_NAME}" FILE_PATH) - if (3RDPARTY_${upper_PRODUCT_LIBRARY_NAME}_DLL AND EXISTS "${3RDPARTY_${upper_PRODUCT_LIBRARY_NAME}_DLL}") - get_filename_component (3RDPARTY_${upper_PRODUCT_LIBRARY_NAME}_DLL_DIR "${3RDPARTY_${upper_PRODUCT_LIBRARY_NAME}_DLL}" PATH) - set (3RDPARTY_${upper_PRODUCT_LIBRARY_NAME}_DLL_DIR "${3RDPARTY_${upper_PRODUCT_LIBRARY_NAME}_DLL_DIR}" CACHE PATH "The directory containing ${upper_PRODUCT_LIBRARY_NAME} shared library" FORCE) - else() + get_filename_component (FILE_NAME "${FILE_PATH}" NAME) + get_filename_component (FILE_DIR "${FILE_PATH}" DIRECTORY) - CHECK_PATH_FOR_CONSISTENCY (3RDPARTY_TBB_DIR 3RDPARTY_${upper_PRODUCT_LIBRARY_NAME}_DLL_DIR PATH "The directory containing ${upper_PRODUCT_LIBRARY_NAME} shared library") - endif() - endif() - endif() - - OCCT_MAKE_COMPILER_SHORT_NAME() - OCCT_MAKE_COMPILER_BITNESS() + if (NOT EXISTS "${FILE_DIR}/${FILE_NAME}") + set (3RDPARTY_${LIB_NAME}_${PROPERTY_TO_SET} "" CACHE FILEPATH "${LIB_NAME} library" FORCE) + set (3RDPARTY_${LIB_NAME}_${PROPERTY_TO_SET}_DIR "" CACHE PATH "The directory containing ${LIB_NAME} shared library") - if (${COMPILER_BITNESS} EQUAL 32) - set (${upper_PRODUCT_LIBRARY_NAME}_ARCH_NAME ia32) - else() - set (${upper_PRODUCT_LIBRARY_NAME}_ARCH_NAME intel64) - endif() - - # tbb/tbbmalloc library - if (NOT 3RDPARTY_${upper_PRODUCT_LIBRARY_NAME}_LIBRARY OR NOT EXISTS "${3RDPARTY_${upper_PRODUCT_LIBRARY_NAME}_LIBRARY}") - - set (CMAKE_FIND_LIBRARY_SUFFIXES .lib .so .dylib .a) - set (PRODUCT_PATH_SUFFIXES lib ${PRODUCT_LIBRARY_NAME}) - - # set 3RDPARTY_${upper_PRODUCT_LIBRARY_NAME}_LIBRARY as notfound, otherwise find_library can't assign a new value to 3RDPARTY_${upper_PRODUCT_LIBRARY_NAME}_LIBRARY - set (3RDPARTY_${upper_PRODUCT_LIBRARY_NAME}_LIBRARY "3RDPARTY_${upper_PRODUCT_LIBRARY_NAME}_LIBRARY-NOTFOUND" CACHE FILEPATH "The path to ${upper_PRODUCT_LIBRARY_NAME} library" FORCE) - - if (3RDPARTY_TBB_DIR AND EXISTS "${3RDPARTY_TBB_DIR}") - if (NOT EXISTS "${3RDPARTY_TBB_DIR}/lib/${${upper_PRODUCT_LIBRARY_NAME}_ARCH_NAME}/${COMPILER}") - if (EXISTS "${3RDPARTY_TBB_DIR}/lib/${${upper_PRODUCT_LIBRARY_NAME}_ARCH_NAME}") - file (GLOB ${upper_PRODUCT_LIBRARY_NAME}_COMPILER_LIST "${3RDPARTY_TBB_DIR}/lib/${${upper_PRODUCT_LIBRARY_NAME}_ARCH_NAME}/*") - if (${upper_PRODUCT_LIBRARY_NAME}_COMPILER_LIST) - list (GET ${upper_PRODUCT_LIBRARY_NAME}_COMPILER_LIST -1 THE_MOST_FRESH_COMPILER_VERSION) - if (THE_MOST_FRESH_COMPILER_VERSION) - get_filename_component (THE_MOST_FRESH_COMPILER_VERSION_NAME "${THE_MOST_FRESH_COMPILER_VERSION}" NAME) - set (PRODUCT_PATH_SUFFIXES lib ${PRODUCT_LIBRARY_NAME} lib/${${upper_PRODUCT_LIBRARY_NAME}_ARCH_NAME}/${THE_MOST_FRESH_COMPILER_VERSION_NAME}) - endif() - endif() - endif() - else() - set (PRODUCT_PATH_SUFFIXES lib ${PRODUCT_LIBRARY_NAME} lib/${${upper_PRODUCT_LIBRARY_NAME}_ARCH_NAME}/${COMPILER}) - endif() - - find_library (3RDPARTY_${upper_PRODUCT_LIBRARY_NAME}_LIBRARY ${PRODUCT_LIBRARY_NAME} - PATHS "${3RDPARTY_${upper_PRODUCT_LIBRARY_NAME}_LIBRARY_DIR}" "${3RDPARTY_TBB_DIR}" - PATH_SUFFIXES ${PRODUCT_PATH_SUFFIXES} - CMAKE_FIND_ROOT_PATH_BOTH - NO_DEFAULT_PATH) + if ("${PROPERTY_TO_SET}" STREQUAL "LIBRARY") + list (APPEND 3RDPARTY_NO_LIBS 3RDPARTY_${LIB_NAME}_${PROPERTY_TO_SET}_DIR) else() - find_library (3RDPARTY_${upper_PRODUCT_LIBRARY_NAME}_LIBRARY ${PRODUCT_LIBRARY_NAME} - PATH_SUFFIXES ${PRODUCT_PATH_SUFFIXES} - CMAKE_FIND_ROOT_PATH_BOTH) + list (APPEND 3RDPARTY_NO_DLLS 3RDPARTY_${LIB_NAME}_${PROPERTY_TO_SET}_DIR) endif() + else() + set (3RDPARTY_${LIB_NAME}_${PROPERTY_TO_SET} "${FILE_DIR}/${FILE_NAME}" CACHE FILEPATH "${LIB_NAME} library" FORCE) + set (3RDPARTY_${LIB_NAME}_${PROPERTY_TO_SET}_DIR "${FILE_DIR}" CACHE PATH "The directory containing ${LIB_NAME} shared library") - if (3RDPARTY_${upper_PRODUCT_LIBRARY_NAME}_LIBRARY AND EXISTS "${3RDPARTY_${upper_PRODUCT_LIBRARY_NAME}_LIBRARY}") - get_filename_component (3RDPARTY_${upper_PRODUCT_LIBRARY_NAME}_LIBRARY_DIR "${3RDPARTY_${upper_PRODUCT_LIBRARY_NAME}_LIBRARY}" PATH) - set (3RDPARTY_${upper_PRODUCT_LIBRARY_NAME}_LIBRARY_DIR "${3RDPARTY_${upper_PRODUCT_LIBRARY_NAME}_LIBRARY_DIR}" CACHE PATH "The directory containing ${upper_PRODUCT_LIBRARY_NAME} library" FORCE) + if ("${PROPERTY_TO_SET}" STREQUAL "LIBRARY") + list (APPEND 3RDPARTY_LIBRARY_DIRS "${FILE_DIR}") else() - set (3RDPARTY_${upper_PRODUCT_LIBRARY_NAME}_LIBRARY_DIR "" CACHE PATH "The directory containing ${upper_PRODUCT_LIBRARY_NAME} library" FORCE) + list (APPEND 3RDPARTY_DLL_DIRS "${FILE_DIR}") endif() endif() +endmacro() - if (3RDPARTY_${upper_PRODUCT_LIBRARY_NAME}_LIBRARY_DIR AND EXISTS "${3RDPARTY_${upper_PRODUCT_LIBRARY_NAME}_LIBRARY_DIR}") - list (APPEND 3RDPARTY_LIBRARY_DIRS "${3RDPARTY_${upper_PRODUCT_LIBRARY_NAME}_LIBRARY_DIR}") - else() - list (APPEND 3RDPARTY_NO_LIBS 3RDPARTY_${upper_PRODUCT_LIBRARY_NAME}_LIBRARY_DIR) +# TARGET_NAME - is target name from oneTBB cmake file +# it is either "TBB::tbb", or "TBB::tbbmalloc" +# LIB_NAME_UC - is library id (TBB or TBBMALLOC) +macro (LIN_TBB_PARSE TARGET_NAME LIB_NAME) + set (FILE_NAME "") + set (FILE_PATH "") + set (FILE_DIR "") - set (3RDPARTY_${upper_PRODUCT_LIBRARY_NAME}_LIBRARY "" CACHE FILEPATH "The path to ${upper_PRODUCT_LIBRARY_NAME} library" FORCE) - endif() + get_target_property (FILE_NAME "${TARGET_NAME}" IMPORTED_LOCATION_RELEASE) - # tbb/tbbmalloc shared library - if (WIN32) - if (NOT 3RDPARTY_${upper_PRODUCT_LIBRARY_NAME}_DLL OR NOT EXISTS "${3RDPARTY_${upper_PRODUCT_LIBRARY_NAME}_DLL}") - set (CMAKE_FIND_LIBRARY_SUFFIXES .dll) - set (PRODUCT_PATH_SUFFIXES bin) - - # set 3RDPARTY_${upper_PRODUCT_LIBRARY_NAME}_DLL as notfound, otherwise find_library can't assign a new value to 3RDPARTY_${upper_PRODUCT_LIBRARY_NAME}_DLL - set (3RDPARTY_${upper_PRODUCT_LIBRARY_NAME}_DLL "3RDPARTY_${upper_PRODUCT_LIBRARY_NAME}_DLL-NOTFOUND" CACHE FILEPATH "${upper_PRODUCT_LIBRARY_NAME} shared library" FORCE) - - if (3RDPARTY_TBB_DIR AND EXISTS "${3RDPARTY_TBB_DIR}") - if (NOT EXISTS "${3RDPARTY_TBB_DIR}/bin/${${upper_PRODUCT_LIBRARY_NAME}_ARCH_NAME}/${COMPILER}") - if (EXISTS "${3RDPARTY_TBB_DIR}/bin/${${upper_PRODUCT_LIBRARY_NAME}_ARCH_NAME}") - file (GLOB ${upper_PRODUCT_LIBRARY_NAME}_COMPILER_LIST "${3RDPARTY_TBB_DIR}/bin/${${upper_PRODUCT_LIBRARY_NAME}_ARCH_NAME}/*") - if (${upper_PRODUCT_LIBRARY_NAME}_COMPILER_LIST) - list (GET ${upper_PRODUCT_LIBRARY_NAME}_COMPILER_LIST -1 THE_MOST_FRESH_COMPILER_VERSION) - if (THE_MOST_FRESH_COMPILER_VERSION) - get_filename_component (THE_MOST_FRESH_COMPILER_VERSION_NAME "${THE_MOST_FRESH_COMPILER_VERSION}" NAME) - set (PRODUCT_PATH_SUFFIXES bin bin/${${upper_PRODUCT_LIBRARY_NAME}_ARCH_NAME}/${THE_MOST_FRESH_COMPILER_VERSION_NAME}) - endif() - endif() - endif() - else() - set (PRODUCT_PATH_SUFFIXES bin bin/${${upper_PRODUCT_LIBRARY_NAME}_ARCH_NAME}/${COMPILER}) - endif() - - if (3RDPARTY_TBB_DIR AND EXISTS "${3RDPARTY_TBB_DIR}") - find_library (3RDPARTY_${upper_PRODUCT_LIBRARY_NAME}_DLL ${PRODUCT_LIBRARY_NAME} - PATHS "${3RDPARTY_TBB_DIR}" - PATH_SUFFIXES ${PRODUCT_PATH_SUFFIXES} - NO_DEFAULT_PATH) - else() - find_library (3RDPARTY_${upper_PRODUCT_LIBRARY_NAME}_DLL ${PRODUCT_LIBRARY_NAME} PATH_SUFFIXES ${PRODUCT_PATH_SUFFIXES}) - endif() - - if (3RDPARTY_${upper_PRODUCT_LIBRARY_NAME}_DLL AND EXISTS "${3RDPARTY_${upper_PRODUCT_LIBRARY_NAME}_DLL}") - get_filename_component (3RDPARTY_${upper_PRODUCT_LIBRARY_NAME}_DLL_DIR "${3RDPARTY_${upper_PRODUCT_LIBRARY_NAME}_DLL}" PATH) - set (3RDPARTY_${upper_PRODUCT_LIBRARY_NAME}_DLL_DIR "${3RDPARTY_${upper_PRODUCT_LIBRARY_NAME}_DLL_DIR}" CACHE PATH "The directory containing ${upper_PRODUCT_LIBRARY_NAME} library" FORCE) - else() - set (3RDPARTY_${upper_PRODUCT_LIBRARY_NAME}_DLL_DIR "" CACHE PATH "The directory containing ${upper_PRODUCT_LIBRARY_NAME} shared library" FORCE) - - set (3RDPARTY_${upper_PRODUCT_LIBRARY_NAME}_DLL "" CACHE FILEPATH "${upper_PRODUCT_LIBRARY_NAME} shared library" FORCE) - endif() - endif() - endif() + # acquire full path + TBB_FILE_NAME_TO_FILEPATH("${FILE_NAME}" FILE_PATH) - if (3RDPARTY_${upper_PRODUCT_LIBRARY_NAME}_DLL_DIR OR EXISTS "${3RDPARTY_${upper_PRODUCT_LIBRARY_NAME}_DLL_DIR}") - list (APPEND 3RDPARTY_DLL_DIRS "${3RDPARTY_${upper_PRODUCT_LIBRARY_NAME}_DLL_DIR}") - else() - list (APPEND 3RDPARTY_NO_DLLS 3RDPARTY_${upper_PRODUCT_LIBRARY_NAME}_DLL_DIR) - endif() - endif() + get_filename_component (FILE_NAME "${FILE_PATH}" NAME) + get_filename_component (FILE_DIR "${FILE_PATH}" DIRECTORY) - # install tbb/tbbmalloc - if (INSTALL_TBB) - OCCT_MAKE_OS_WITH_BITNESS() - OCCT_MAKE_COMPILER_SHORT_NAME() - - if (WIN32) - if (SINGLE_GENERATOR) - install (FILES ${3RDPARTY_${upper_PRODUCT_LIBRARY_NAME}_DLL} DESTINATION "${INSTALL_DIR_BIN}") - else() - install (FILES ${3RDPARTY_${upper_PRODUCT_LIBRARY_NAME}_DLL} - CONFIGURATIONS Release - DESTINATION "${INSTALL_DIR_BIN}") - install (FILES ${3RDPARTY_${upper_PRODUCT_LIBRARY_NAME}_DLL} - CONFIGURATIONS RelWithDebInfo - DESTINATION "${INSTALL_DIR_BIN}i") - install (FILES ${3RDPARTY_${upper_PRODUCT_LIBRARY_NAME}_DLL} - CONFIGURATIONS Debug - DESTINATION "${INSTALL_DIR_BIN}d") - endif() - else() - get_filename_component (PRODUCT_LIBRARY_NAME ${3RDPARTY_${upper_PRODUCT_LIBRARY_NAME}_LIBRARY} NAME) - - if (SINGLE_GENERATOR) - install (FILES ${3RDPARTY_${upper_PRODUCT_LIBRARY_NAME}_LIBRARY}.2 - DESTINATION "${INSTALL_DIR_LIB}" - RENAME ${PRODUCT_LIBRARY_NAME}.2) - else() - install (FILES ${3RDPARTY_${upper_PRODUCT_LIBRARY_NAME}_LIBRARY}.2 - CONFIGURATIONS Release - DESTINATION "${INSTALL_DIR_LIB}" - RENAME ${PRODUCT_LIBRARY_NAME}.2) - install (FILES ${3RDPARTY_${upper_PRODUCT_LIBRARY_NAME}_LIBRARY}.2 - CONFIGURATIONS RelWithDebInfo - DESTINATION "${INSTALL_DIR_LIB}i" - RENAME ${PRODUCT_LIBRARY_NAME}.2) - install (FILES ${3RDPARTY_${upper_PRODUCT_LIBRARY_NAME}_LIBRARY}.2 - CONFIGURATIONS Debug - DESTINATION "${INSTALL_DIR_LIB}d" - RENAME ${PRODUCT_LIBRARY_NAME}.2) - endif() - endif() + if (NOT EXISTS "${FILE_DIR}/${FILE_NAME}") + set (3RDPARTY_${LIB_NAME}_LIBRARY "" CACHE FILEPATH "${LIB_NAME} library" FORCE) + set (3RDPARTY_${LIB_NAME}_LIBRARY_DIR "" CACHE PATH "The directory containing ${LIB_NAME} shared library") + + list (APPEND 3RDPARTY_NO_LIBS 3RDPARTY_${LIB_NAME}_LIBRARY_DIR) + else() + set (3RDPARTY_${LIB_NAME}_LIBRARY "${FILE_DIR}/${FILE_NAME}" CACHE FILEPATH "${LIB_NAME} library" FORCE) + set (3RDPARTY_${LIB_NAME}_LIBRARY_DIR "${FILE_DIR}" CACHE PATH "The directory containing ${LIB_NAME} shared library") + + list (APPEND 3RDPARTY_LIBRARY_DIRS "${3RDPARTY_${LIB_NAME}_LIBRARY_DIR}") endif() - mark_as_advanced (3RDPARTY_${upper_PRODUCT_LIBRARY_NAME}_LIBRARY 3RDPARTY_${upper_PRODUCT_LIBRARY_NAME}_DLL) endmacro() -#if (BUILD_SHARED_LIBS) +if (WIN32) + # Here we should set: + # - 3RDPARTY_*_LIBRARY + # - 3RDPARTY_*_LIBRARY_DIR + # - 3RDPARTY_*_DLL + # - 3RDPARTY_*_DLL_DIR + # where * - is TBB or TBBMALLOC + separate_arguments (CSF_TBB) foreach (LIB IN LISTS CSF_TBB) - TBB_PRODUCT_SEARCH (${LIB}) + string(TOLOWER "${LIB}" LIB_LOWER) + string(TOUPPER "${LIB}" LIB_UPPER) + WIN_TBB_PARSE("TBB::${LIB_LOWER}" "${LIB_UPPER}" "LIBRARY") + WIN_TBB_PARSE("TBB::${LIB_LOWER}" "${LIB_UPPER}" "DLL") endforeach() +else() + # Here we should set: + # - 3RDPARTY_*_LIBRARY + # - 3RDPARTY_*_LIBRARY_DIR - if (INSTALL_TBB) - set (USED_3RDPARTY_TBB_DIR "") + separate_arguments (CSF_TBB) + foreach (LIB IN LISTS CSF_TBB) + string(TOLOWER "${LIB}" LIB_LOWER) + string(TOUPPER "${LIB}" LIB_UPPER) + LIN_TBB_PARSE("TBB::${LIB_LOWER}" "${LIB_UPPER}") + endforeach() +endif() + +# install tbb/tbbmalloc +if (INSTALL_TBB) + OCCT_MAKE_OS_WITH_BITNESS() + OCCT_MAKE_COMPILER_SHORT_NAME() + + if (WIN32) + if (SINGLE_GENERATOR) + foreach (LIB IN LISTS CSF_TBB) + string(TOUPPER "${LIB}" LIB_UPPER) + install (FILES ${3RDPARTY_${LIB_UPPER}_DLL} DESTINATION "${INSTALL_DIR_BIN}") + endforeach() + else() + foreach (LIB IN LISTS CSF_TBB) + string(TOUPPER "${LIB}" LIB_UPPER) + install (FILES ${3RDPARTY_${LIB_UPPER}_DLL} CONFIGURATIONS Release DESTINATION "${INSTALL_DIR_BIN}") + install (FILES ${3RDPARTY_${LIB_UPPER}_DLL} CONFIGURATIONS RelWithDebInfo DESTINATION "${INSTALL_DIR_BIN}i") + install (FILES ${3RDPARTY_${LIB_UPPER}_DLL} CONFIGURATIONS Debug DESTINATION "${INSTALL_DIR_BIN}d") + endforeach() + endif() else() - # the library directory for using by the executable - if (WIN32) - set (USED_3RDPARTY_TBB_DIR ${3RDPARTY_TBB_DLL_DIR}) + if (SINGLE_GENERATOR) + foreach (LIB IN LISTS CSF_TBB) + string(TOUPPER "${LIB}" LIB_UPPER) + install (FILES ${3RDPARTY_${LIB_UPPER}_LIBRARY} DESTINATION "${INSTALL_DIR_LIB}") + endforeach() else() - set (USED_3RDPARTY_TBB_DIR ${3RDPARTY_TBB_LIBRARY_DIR}) + foreach (LIB IN LISTS CSF_TBB) + string(TOUPPER "${LIB}" LIB_UPPER) + install (FILES ${3RDPARTY_${LIB_UPPER}_LIBRARY} CONFIGURATIONS Release DESTINATION "${INSTALL_DIR_LIB}") + install (FILES ${3RDPARTY_${LIB_UPPER}_LIBRARY} CONFIGURATIONS RelWithDebInfo DESTINATION "${INSTALL_DIR_LIB}i") + install (FILES ${3RDPARTY_${LIB_UPPER}_LIBRARY} CONFIGURATIONS Debug DESTINATION "${INSTALL_DIR_LIB}d") + endforeach() endif() endif() -#endif() +endif() +foreach (LIB IN LISTS CSF_TBB) + string(TOUPPER "${LIB}" LIB_UPPER) + mark_as_advanced (3RDPARTY_${LIB_UPPER}_LIBRARY 3RDPARTY_${LIB_UPPER}_DLL) +endforeach() + +if (INSTALL_TBB) + set (USED_3RDPARTY_TBB_DIR "") +else() + # the library directory for using by the executable + if (WIN32) + set (USED_3RDPARTY_TBB_DIR ${3RDPARTY_TBB_DLL_DIR}) + else() + set (USED_3RDPARTY_TBB_DIR ${3RDPARTY_TBB_LIBRARY_DIR}) + endif() +endif() diff --git a/adm/genconfdeps.tcl b/adm/genconfdeps.tcl index 1ffb65afdb..fe99b70dc6 100644 --- a/adm/genconfdeps.tcl +++ b/adm/genconfdeps.tcl @@ -780,14 +780,14 @@ proc wokdep:SearchTBB {theErrInc theErrLib32 theErrLib64 theErrBin32 theErrBin64 } } if { "$::tcl_platform(platform)" == "windows" } { - set aTbbDllPath [wokdep:SearchBin "tbb.dll" "$anArchIter"] + set aTbbDllPath [wokdep:SearchBin "tbb12.dll" "$anArchIter"] if { "$aTbbDllPath" == "" } { set aPath [wokdep:Preferred [glob -nocomplain -directory "$::PRODUCTS_PATH" -type d *{tbb}*] $aVcLib "$anArchIter" ] - set aTbbDllPath [wokdep:SearchBin "tbb.dll" "$anArchIter" "$aPath/bin/$aSubDir/$aVcLib"] + set aTbbDllPath [wokdep:SearchBin "tbb12.dll" "$anArchIter" "$aPath/bin/$aSubDir/$aVcLib"] if { "$aTbbDllPath" != "" } { lappend ::CSF_OPT_BIN$anArchIter "$aPath/bin/$aSubDir/$aVcLib" } else { - lappend anErrBin$anArchIter "Error: 'tbb.dll' not found (Intel TBB)" + lappend anErrBin$anArchIter "Error: 'tbb12.dll' not found (Intel TBB)" if { "$::ARCH" == "$anArchIter"} { set isFound "false" } } } diff --git a/dox/build/build_3rdparty/building_3rdparty.md b/dox/build/build_3rdparty/building_3rdparty.md index 2eee48c8eb..bc7d892671 100644 --- a/dox/build/build_3rdparty/building_3rdparty.md +++ b/dox/build/build_3rdparty/building_3rdparty.md @@ -128,8 +128,9 @@ You can download its sources from https://freetype.org/ @subsection dev_guides__building_3rdparty_win_3_1 TBB -This third-party product is installed with binaries from the archive that can be downloaded from https://github.com/intel/tbb. -Go to the **Download** page, find the release version you need (e.g. `tbb30_018oss`) and pick the archive for Windows platform. +This third-party product is installed with binaries from the archive that can be downloaded from https://github.com/oneapi-src/oneTBB/releases/tag/v2021.5.0. +Go to the **Download** page, find the release version you need (e.g. `oneTBB 2021.5.0`) and pick the archive for Windows platform. +To install, unpack the downloaded archive of TBB product (`oneapi-tbb-2021.5.0-win.zip`) Unpack the downloaded archive of TBB product into the `3rdparty` folder. @@ -304,9 +305,9 @@ Download the necessary archive from https://freetype.org/ and unpack it. @subsection dev_guides__building_3rdparty_linux_3_1 TBB -This third-party product is installed with binaries from the archive that can be downloaded from https://github.com/intel/tbb. -Go to the **Download** page, find the release version you need and pick the archive for Linux platform. -To install, unpack the downloaded archive of TBB product. +This third-party product is installed with binaries from the archive that can be downloaded from https://github.com/oneapi-src/oneTBB/releases/tag/v2021.5.0. +Go to the **Download** page, find the release version you need (e.g. `oneTBB 2021.5.0`) and pick the archive for Linux platform. +To install, unpack the downloaded archive of TBB product (`oneapi-tbb-2021.5.0-lin.tgz`). @subsection dev_guides__building_3rdparty_linux_3_3 FreeImage @@ -477,9 +478,9 @@ Download the necessary archive from https://freetype.org/ and unpack it. @subsection dev_guides__building_3rdparty_osx_3_1 TBB -This third-party product is installed with binaries from the archive that can be downloaded from https://github.com/intel/tbb. -Go to the **Download** page, find the release version you need (e.g. `tbb30_018oss`) and pick the archive for Mac OS X platform. -To install, unpack the downloaded archive of TBB product (`tbb30_018oss_osx.tgz`). +This third-party product is installed with binaries from the archive that can be downloaded from https://github.com/oneapi-src/oneTBB/releases/tag/v2021.5.0. +Go to the **Download** page, find the release version you need (e.g. `oneTBB 2021.5.0`) and pick the archive for Mac OS X platform. +To install, unpack the downloaded archive of TBB product (`oneapi-tbb-2021.5.0-mac.tgz`). @subsection dev_guides__building_3rdparty_osx_3_3 FreeImage diff --git a/dox/introduction/introduction.md b/dox/introduction/introduction.md index 866ef18100..fde58463d7 100644 --- a/dox/introduction/introduction.md +++ b/dox/introduction/introduction.md @@ -360,7 +360,7 @@ https://dev.opencascade.org/resources/download/3rd-party-components | Component | Where to find | Used for | Purpose | | --------- | ------------- | -------- | -------------------- | | CMake 3.1+ | https://cmake.org/ | Configuration | Build from sources | -| Intel TBB 4.x or later | https://oneapi-src.github.io/oneTBB/ | All | Parallelization of algorithms (alternative to built-in thread pool) | +| Intel oneTBB 2021.5.0 | https://github.com/oneapi-src/oneTBB/releases/tag/v2021.5.0 | All | Parallelization of algorithms (alternative to built-in thread pool) | | OpenGL 3.3+, OpenGL ES 2.0+ | System | Visualization | Required for using 3D Viewer | | OpenVR 1.10+ | https://github.com/ValveSoftware/openvr | Visualization | VR (Virtual Reality) support in 3D Viewer | | FreeType 2.4+ | https://www.freetype.org/download.html | Visualization | Text rendering in 3D Viewer | @@ -572,8 +572,7 @@ FreeType 2 is released under two open-source licenses: BSD-like FreeType License It is a library that helps you to take advantage of multi-core processor performance without having to be a threading expert. Threading Building Blocks is not just a threads-replacement library. It represents a higher-level, task-based parallelism that abstracts platform details and threading mechanisms for scalability and performance. -TBB version 2017 is available under Apache 2.0 license, while older versions -until 4.4 are available under GPLv2 license with the runtime exception (https://www.threadingbuildingblocks.org). +Intel oneTBB 2021.5.0 is available under Apache 2.0 license (https://www.threadingbuildingblocks.org). **OpenGL** is an industry standard API for 3D graphics used by OCCT for implementation of 3D viewer. OpenGL specification is developed by the diff --git a/src/OSD/OSD_Parallel.hxx b/src/OSD/OSD_Parallel.hxx index 7f24cf039c..190b49d329 100644 --- a/src/OSD/OSD_Parallel.hxx +++ b/src/OSD/OSD_Parallel.hxx @@ -125,10 +125,10 @@ protected: // Since C++20 inheritance from std::iterator is deprecated, so define predefined types manually: using iterator_category = std::forward_iterator_tag; - using value_type = UniversalIterator; + using value_type = IteratorInterface*; using difference_type = ptrdiff_t; - using pointer = UniversalIterator*; - using reference = UniversalIterator&; + using pointer = value_type; + using reference = value_type; UniversalIterator() {} @@ -171,18 +171,8 @@ protected: return aValue; } - const UniversalIterator& operator* () const { return *this; } - UniversalIterator& operator* () { return *this; } - - const UniversalIterator* operator->() const { return this; } - UniversalIterator* operator->() { return this; } - - // type cast to actual iterator - template - const Iterator& DownCast () const - { - return dynamic_cast*>(myPtr.get())->Value(); - } + reference operator* () const { return myPtr.get(); } + reference operator* () { return myPtr.get(); } private: std::unique_ptr myPtr; @@ -196,7 +186,14 @@ protected: public: virtual ~FunctorInterface() {} - virtual void operator () (UniversalIterator& theIterator) const = 0; + virtual void operator () (IteratorInterface* theIterator) const = 0; + + // type cast to actual iterator + template + static const Iterator& DownCast(IteratorInterface* theIterator) + { + return dynamic_cast*>(theIterator)->Value(); + } }; private: @@ -211,9 +208,9 @@ private: { } - virtual void operator() (UniversalIterator& theIterator) const Standard_OVERRIDE + virtual void operator() (IteratorInterface* theIterator) const Standard_OVERRIDE { - const Iterator& anIt = theIterator.DownCast(); + const Iterator& anIt = DownCast(theIterator); myFunctor(*anIt); } @@ -233,9 +230,9 @@ private: { } - virtual void operator() (UniversalIterator& theIterator) const Standard_OVERRIDE + virtual void operator() (IteratorInterface* theIterator) const Standard_OVERRIDE { - Standard_Integer anIndex = theIterator.DownCast(); + Standard_Integer anIndex = DownCast(theIterator); myFunctor(anIndex); } diff --git a/src/OSD/OSD_Parallel_Threads.cxx b/src/OSD/OSD_Parallel_Threads.cxx index 05066a0066..c36753ea9a 100644 --- a/src/OSD/OSD_Parallel_Threads.cxx +++ b/src/OSD/OSD_Parallel_Threads.cxx @@ -100,7 +100,7 @@ namespace { for (OSD_Parallel::UniversalIterator anIter = myRange.It(); anIter != myRange.End(); anIter = myRange.It()) { - myPerformer (anIter); + myPerformer (*anIter); } } From 0b4962a7f04caef12d090d087b7196cefde0703c Mon Sep 17 00:00:00 2001 From: smoskvin Date: Mon, 26 Sep 2022 20:06:01 +0300 Subject: [PATCH 386/639] Update version up to 7.7.0 --- src/Standard/Standard_Version.hxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Standard/Standard_Version.hxx b/src/Standard/Standard_Version.hxx index 752c060ad2..f09301df8d 100644 --- a/src/Standard/Standard_Version.hxx +++ b/src/Standard/Standard_Version.hxx @@ -42,7 +42,7 @@ //! - "dev" for development version between releases //! - "beta..." or "rc..." for beta releases or release candidates //! - "project..." for version containing project-specific fixes -#define OCC_VERSION_DEVELOPMENT "dev" +//#define OCC_VERSION_DEVELOPMENT "dev" // Derived (manually): version as real and string (major.minor) #define OCC_VERSION 7.7 From f0049a95994eef92886f88d9ffce5dcf546bc59a Mon Sep 17 00:00:00 2001 From: nmanchen Date: Tue, 27 Sep 2022 09:46:43 +0300 Subject: [PATCH 387/639] 0028640: Modeling Algorithms - BRepBuilderAPI_Transform builds invalid shape Adapt test case, the problem is not reproduced any more. Problem is fixed by the commit: 46478ffe32cfca537a35b744700e082f59ec4c4c (0030008: BRepMesh does not respect angular deflection in internal area of bspline surface) --- tests/bugs/modalg_7/bug28640 | 40 ++++++++++++++++++------------------ 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/tests/bugs/modalg_7/bug28640 b/tests/bugs/modalg_7/bug28640 index be1bd412fb..7afefceebe 100755 --- a/tests/bugs/modalg_7/bug28640 +++ b/tests/bugs/modalg_7/bug28640 @@ -1,37 +1,37 @@ -puts "TODO OCC28640 ALL: Faulty shapes in variables faulty_1" - -puts "========" -puts "OCC28640" -puts "========" +puts "================" +puts "0028640: Modeling Algorithms - BRepBuilderAPI_Transform builds invalid shape" +puts "================" puts "" -############################################## -# BRepBuilderAPI_Transform build invalid shape -############################################## +# Analyze triangulation after mirroring shape restore [locate_data_file bug28640_origin_copy.brep] a - -smallview -display a -front -fit +tmirror a 0 0 0 1 0 0 vinit vsetdispmode 1 vdisplay a vfront vfit +checkview -screenshot -3d -path ${imagedir}/${test_image}-mirror-3d_1.png -# +if {[tricheck a] != ""} { + puts "Error: invalid triangulation" +} +# Fix the shape and check its validity after mirroring +restore [locate_data_file bug28640_origin_copy.brep] a +fixshape a a +checkshape a tmirror a 0 0 0 1 0 0 - checkshape a -display a -fit -checkview -screenshot -2d -path ${imagedir}/${test_image}-mirror-2d.png - +# Check triangulation of healed and mirrored shape vclear vdisplay a +vfront vfit -checkview -screenshot -3d -path ${imagedir}/${test_image}-mirror-3d.png +checkview -screenshot -3d -path ${imagedir}/${test_image}-mirror-3d_2.png + +if {[tricheck a] != ""} { + puts "Error: invalid triangulation" +} From 13f5da81ad1f77e7a4e564c5ed90fe5512465498 Mon Sep 17 00:00:00 2001 From: ddzama Date: Mon, 3 Oct 2022 10:34:39 +0300 Subject: [PATCH 388/639] 0033152: Fix searching tbb in 3rdparty directory. Currently directory containing tbb 3rdparty installation should match the template tbb*. But after using oneTbb of version 2021.5 standard installation directory is onetbb*. So, for this 3rdparty modify searching template. --- adm/cmake/occt_macros.cmake | 2 ++ 1 file changed, 2 insertions(+) diff --git a/adm/cmake/occt_macros.cmake b/adm/cmake/occt_macros.cmake index 4a060665f6..9fd3ec4cfb 100644 --- a/adm/cmake/occt_macros.cmake +++ b/adm/cmake/occt_macros.cmake @@ -160,6 +160,8 @@ function (FIND_PRODUCT_DIR ROOT_DIR PRODUCT_NAME RESULT) if ("${lower_PRODUCT_NAME}" STREQUAL "egl") string (SUBSTRING "${lower_PRODUCT_NAME}" 1 -1 lower_PRODUCT_NAME) list (APPEND SEARCH_TEMPLATES "[^gl]+${lower_PRODUCT_NAME}.*") + elseif ("${lower_PRODUCT_NAME}" STREQUAL "tbb") + list (APPEND SEARCH_TEMPLATES "^.*${lower_PRODUCT_NAME}.*") else() list (APPEND SEARCH_TEMPLATES "^[^a-zA-Z]*${lower_PRODUCT_NAME}[^a-zA-Z]*${COMPILER}.*${COMPILER_BITNESS}") list (APPEND SEARCH_TEMPLATES "^[^a-zA-Z]*${lower_PRODUCT_NAME}[^a-zA-Z]*[0-9.]+.*${COMPILER}.*${COMPILER_BITNESS}") From 51329afcef941d7fe62ed59050f098670b9aac40 Mon Sep 17 00:00:00 2001 From: atereshi Date: Mon, 16 May 2022 16:17:12 +0300 Subject: [PATCH 389/639] 0028024: Data Exchange - create a convenient mechanism for managing shape healing options when reading STEP or IGES file Problem: There is no possibility to change shape healing options from DRAW without rewriting resource file. Change: Shape healing parameters from STEP and IGES resource files were duplicated to InterfaceStatic. Resource manager initialize from InterfaceStatic if resource file name is empty. Result: User can operationally change shape healing parameters from DRAW command using "param" command. --- src/IFSelect/IFSelect_Functions.cxx | 45 +++++++++++++-- src/IGESData/IGESData.cxx | 62 +++++++++++++++++++-- src/Interface/Interface_Static.cxx | 26 +++++++++ src/Interface/Interface_Static.hxx | 4 +- src/Resource/Resource_Manager.cxx | 19 +++++++ src/Resource/Resource_Manager.hxx | 6 ++ src/STEPControl/STEPControl_Controller.cxx | 64 ++++++++++++++++++++-- src/ShapeProcess/ShapeProcess_Context.cxx | 9 ++- src/XSAlgo/XSAlgo_AlgoContainer.cxx | 14 ++++- src/XSTEPResource/FILES | 0 src/XSTEPResource/IGES | 0 src/XSTEPResource/STEP | 0 tests/bugs/step/bug28024 | 47 ++++++++++++++++ tests/bugs/xde/bug6805 | 0 14 files changed, 275 insertions(+), 21 deletions(-) mode change 100755 => 100644 src/XSTEPResource/FILES mode change 100755 => 100644 src/XSTEPResource/IGES mode change 100755 => 100644 src/XSTEPResource/STEP create mode 100644 tests/bugs/step/bug28024 mode change 100755 => 100644 tests/bugs/xde/bug6805 diff --git a/src/IFSelect/IFSelect_Functions.cxx b/src/IFSelect/IFSelect_Functions.cxx index 4a89cb7a9b..c044591316 100644 --- a/src/IFSelect/IFSelect_Functions.cxx +++ b/src/IFSelect/IFSelect_Functions.cxx @@ -839,14 +839,38 @@ static IFSelect_ReturnStatus fun27 Standard_Integer argc = pilot->NbWords(); Handle(IFSelect_WorkSession) WS = pilot->Session(); const Standard_CString arg1 = pilot->Arg(1); - const Standard_CString arg2 = pilot->Arg(2); + Standard_CString arg2 = pilot->Arg(2); + const Standard_CString anEmptyStr = ""; + if (arg2 && strlen(arg2) == 2 && arg2[0] == '"' && arg2[1] == '"') + { + arg2 = anEmptyStr; + } // **** Param(Value) **** Message_Messenger::StreamBuffer sout = Message::SendInfo(); - if (argc < 2) { + if (argc < 2 || (argc == 3 && strcmp (arg1, "-p") == 0)) { Handle(TColStd_HSequenceOfHAsciiString) li = Interface_Static::Items(); - Standard_Integer i,nb = li->Length(); - sout<<" List of parameters : "<Length(), aPatternNb = 0; + size_t aPatternLen = strlen(arg2); + if (argc == 3) + { + for (i = 1; i <= nb; i ++) + { + if (strncmp(li->Value(i)->String().ToCString(), arg2, aPatternLen) == 0) + { + aPatternNb++; + } + } + } + else + { + aPatternNb = nb; + } + sout << " List of parameters : " << aPatternNb << " items : " << std::endl; for (i = 1; i <= nb; i ++) { + if (argc == 3 && strncmp(li->Value(i)->String().ToCString(), arg2, aPatternLen) != 0) + { + continue; + } sout<Value(i)->String(); sout<<" : "<Value(i)->ToCString())<& theMap) +{ + theMap.Clear(); + + NCollection_DataMap& aMap = MoniTool_TypedValue::Stats(); + + for (NCollection_DataMap::Iterator anIt(aMap); anIt.More(); anIt.Next()) + { + Handle(Interface_Static) aValue = Handle(Interface_Static)::DownCast(anIt.Value()); + if (aValue.IsNull()) + { + continue; + } + if (aValue->HStringValue().IsNull()) + { + continue; + } + + theMap.Bind (anIt.Key(), aValue->HStringValue()->String()); + } +} diff --git a/src/Interface/Interface_Static.hxx b/src/Interface/Interface_Static.hxx index 8c001e018f..7069c5f361 100644 --- a/src/Interface/Interface_Static.hxx +++ b/src/Interface/Interface_Static.hxx @@ -245,8 +245,8 @@ public: //! must be defined around it Standard_EXPORT static void Standards(); - - + //! Fills given string-to-string map with all static data + Standard_EXPORT static void FillMap(NCollection_DataMap& theMap); DEFINE_STANDARD_RTTIEXT(Interface_Static,Interface_TypedValue) diff --git a/src/Resource/Resource_Manager.cxx b/src/Resource/Resource_Manager.cxx index 6d94e9aa07..01b8ab443f 100644 --- a/src/Resource/Resource_Manager.cxx +++ b/src/Resource/Resource_Manager.cxx @@ -128,6 +128,16 @@ Resource_Manager::Resource_Manager(const Standard_CString aName, std::cout << "Resource Manager Warning: Environment variable \"CSF_" << aName << "UserDefaults\" not set." << std::endl; } +// ======================================================================= +// function : Resource_Manager +// purpose : +// ======================================================================= +Resource_Manager::Resource_Manager() + : myName(""), myVerbose(Standard_False) +{ + +} + // ======================================================================= // function : Load // purpose : @@ -538,3 +548,12 @@ void Resource_Manager::GetResourcePath (TCollection_AsciiString& aPath, const St anOSDPath.SystemName(aPath); } + +//======================================================================= +// function : GetMap +// purpose : +//======================================================================= +Resource_DataMapOfAsciiStringAsciiString& Resource_Manager::GetMap(Standard_Boolean theRefMap) +{ + return theRefMap ? myRefMap : myUserMap; +} diff --git a/src/Resource/Resource_Manager.hxx b/src/Resource/Resource_Manager.hxx index 7697ad29bd..64bf32abc3 100644 --- a/src/Resource/Resource_Manager.hxx +++ b/src/Resource/Resource_Manager.hxx @@ -54,6 +54,9 @@ public: //! syntax of an individual resource line is: Standard_EXPORT Resource_Manager(const Standard_CString aName, const Standard_Boolean Verbose = Standard_False); + //! Create an empty Resource manager + Standard_EXPORT Resource_Manager(); + //! Create a Resource manager. //! @param theName [in] description file name //! @param theDefaultsDirectory [in] default folder for looking description file @@ -112,6 +115,9 @@ public: //! or file doesn't exist returns empty string. Standard_EXPORT static void GetResourcePath (TCollection_AsciiString& aPath, const Standard_CString aName, const Standard_Boolean isUserDefaults); + //! Returns internal Ref or User map with parameters + Standard_EXPORT Resource_DataMapOfAsciiStringAsciiString& GetMap(Standard_Boolean theRefMap = Standard_True); + private: Standard_EXPORT void Load (const TCollection_AsciiString& thePath, diff --git a/src/STEPControl/STEPControl_Controller.cxx b/src/STEPControl/STEPControl_Controller.cxx index 2408e2c67a..1970fff87a 100644 --- a/src/STEPControl/STEPControl_Controller.cxx +++ b/src/STEPControl/STEPControl_Controller.cxx @@ -179,12 +179,66 @@ STEPControl_Controller::STEPControl_Controller () Interface_Static::Init ("step","write.step.vertex.mode",'&',"eval One Compound"); Interface_Static::Init ("step","write.step.vertex.mode",'&',"eval Single Vertex"); Interface_Static::SetIVal("write.step.vertex.mode",0); - + // abv 15.11.00: ShapeProcessing - Interface_Static::Init ("XSTEP","write.step.resource.name",'t',"STEP"); - Interface_Static::Init ("XSTEP","read.step.resource.name",'t',"STEP"); - Interface_Static::Init ("XSTEP","write.step.sequence",'t',"ToSTEP"); - Interface_Static::Init ("XSTEP","read.step.sequence",'t',"FromSTEP"); + Interface_Static::Init ("XSTEP", "write.step.resource.name", 't', "STEP"); + Interface_Static::Init ("XSTEP", "read.step.resource.name", 't', "STEP"); + Interface_Static::Init ("XSTEP", "write.step.sequence", 't', "ToSTEP"); + Interface_Static::Init ("XSTEP", "read.step.sequence", 't', "FromSTEP"); + Interface_Static::Init ("XSTEP", "ToSTEP.exec.op", 't', "SplitCommonVertex,DirectFaces"); + Interface_Static::Init ("XSTEP", "FromSTEP.exec.op", 't', "FixShape"); + Interface_Static::Init ("XSTEP", "FromSTEP.FixShape.Tolerance3d", 't', "&Runtime.Tolerance"); + Interface_Static::Init ("XSTEP", "FromSTEP.FixShape.MaxTolerance3d", 't', "&Runtime.MaxTolerance"); + Interface_Static::Init ("XSTEP", "FromSTEP.FixShape.MinTolerance3d", 't', "1.e-7"); + Interface_Static::Init ("XSTEP", "FromSTEP.FixShape.FixFreeShellMode", 't', "-1"); + Interface_Static::Init ("XSTEP", "FromSTEP.FixShape.FixFreeFaceMode", 't', "-1"); + Interface_Static::Init ("XSTEP", "FromSTEP.FixShape.FixFreeWireMode", 't', "-1"); + Interface_Static::Init ("XSTEP", "FromSTEP.FixShape.FixSameParameterMode", 't', "-1"); + Interface_Static::Init ("XSTEP", "FromSTEP.FixShape.FixSolidMode", 't', "-1"); + Interface_Static::Init ("XSTEP", "FromSTEP.FixShape.FixShellOrientationMode", 't', "-1"); + Interface_Static::Init ("XSTEP", "FromSTEP.FixShape.CreateOpenSolidMode", 't', "0"); + Interface_Static::Init ("XSTEP", "FromSTEP.FixShape.FixShellMode", 't', "-1"); + Interface_Static::Init ("XSTEP", "FromSTEP.FixShape.FixFaceOrientationMode", 't', "-1"); + Interface_Static::Init ("XSTEP", "FromSTEP.FixShape.FixFaceMode", 't', "-1"); + Interface_Static::Init ("XSTEP", "FromSTEP.FixShape.FixWireMode", 't', "-1"); + Interface_Static::Init ("XSTEP", "FromSTEP.FixShape.FixOrientationMode", 't', "-1"); + Interface_Static::Init ("XSTEP", "FromSTEP.FixShape.FixAddNaturalBoundMode", 't', "-1"); + Interface_Static::Init ("XSTEP", "FromSTEP.FixShape.FixMissingSeamMode", 't', "-1"); + Interface_Static::Init ("XSTEP", "FromSTEP.FixShape.FixSmallAreaWireMode", 't', "-1"); + Interface_Static::Init ("XSTEP", "FromSTEP.FixShape.RemoveSmallAreaFaceMode", 't', "-1"); + Interface_Static::Init ("XSTEP", "FromSTEP.FixShape.FixIntersectingWiresMode", 't', "-1"); + Interface_Static::Init ("XSTEP", "FromSTEP.FixShape.FixLoopWiresMode", 't', "-1"); + Interface_Static::Init ("XSTEP", "FromSTEP.FixShape.FixSplitFaceMode", 't', "-1"); + Interface_Static::Init ("XSTEP", "FromSTEP.FixShape.AutoCorrectPrecisionMode", 't', "1"); + Interface_Static::Init ("XSTEP", "FromSTEP.FixShape.ModifyTopologyMode", 't', "0"); + Interface_Static::Init ("XSTEP", "FromSTEP.FixShape.ModifyGeometryMode", 't', "1"); + Interface_Static::Init ("XSTEP", "FromSTEP.FixShape.ClosedWireMode", 't', "1"); + Interface_Static::Init ("XSTEP", "FromSTEP.FixShape.PreferencePCurveMode", 't', "1"); + Interface_Static::Init ("XSTEP", "FromSTEP.FixShape.FixReorderMode", 't', "-1"); + Interface_Static::Init ("XSTEP", "FromSTEP.FixShape.FixSmallMode", 't', "-1"); + Interface_Static::Init ("XSTEP", "FromSTEP.FixShape.FixConnectedMode", 't', "-1"); + Interface_Static::Init ("XSTEP", "FromSTEP.FixShape.FixEdgeCurvesMode", 't', "-1"); + Interface_Static::Init ("XSTEP", "FromSTEP.FixShape.FixDegeneratedMode", 't', "-1"); + Interface_Static::Init ("XSTEP", "FromSTEP.FixShape.FixLackingMode", 't', "-1"); + Interface_Static::Init ("XSTEP", "FromSTEP.FixShape.FixSelfIntersectionMode", 't', "-1"); + Interface_Static::Init ("XSTEP", "FromSTEP.FixShape.RemoveLoopMode", 't', "-1"); + Interface_Static::Init ("XSTEP", "FromSTEP.FixShape.FixReversed2dMode", 't', "-1"); + Interface_Static::Init ("XSTEP", "FromSTEP.FixShape.FixRemovePCurveMode", 't', "-1"); + Interface_Static::Init ("XSTEP", "FromSTEP.FixShape.FixRemoveCurve3dMode", 't', "-1"); + Interface_Static::Init ("XSTEP", "FromSTEP.FixShape.FixAddPCurveMode", 't', "-1"); + Interface_Static::Init ("XSTEP", "FromSTEP.FixShape.FixAddCurve3dMode", 't', "-1"); + Interface_Static::Init ("XSTEP", "FromSTEP.FixShape.FixSeamMode", 't', "-1"); + Interface_Static::Init ("XSTEP", "FromSTEP.FixShape.FixShiftedMode", 't', "-1"); + Interface_Static::Init ("XSTEP", "FromSTEP.FixShape.FixEdgeSameParameterMode", 't', "0"); + Interface_Static::Init ("XSTEP", "FromSTEP.FixShape.FixNotchedEdgesMode", 't', "-1"); + Interface_Static::Init ("XSTEP", "FromSTEP.FixShape.FixTailMode", 't', "0"); + Interface_Static::Init ("XSTEP", "FromSTEP.FixShape.MaxTailAngle", 't', "0.0"); + Interface_Static::Init ("XSTEP", "FromSTEP.FixShape.MaxTailWidth", 't', "-1.0"); + Interface_Static::Init ("XSTEP", "FromSTEP.FixShape.FixSelfIntersectingEdgeMode", 't', "-1"); + Interface_Static::Init ("XSTEP", "FromSTEP.FixShape.FixIntersectingEdgesMode", 't', "-1"); + Interface_Static::Init ("XSTEP", "FromSTEP.FixShape.FixNonAdjacentIntersectingEdgesMode", 't', "-1"); + Interface_Static::Init ("XSTEP", "FromSTEP.FixShape.FixVertexPositionMode", 't', "0"); + Interface_Static::Init ("XSTEP", "FromSTEP.FixShape.FixVertexToleranceMode", 't', "-1"); // ika 28.07.16: Parameter to read all top level solids and shells, // should be used only in case of invalid shape_representation without links to shapes. diff --git a/src/ShapeProcess/ShapeProcess_Context.cxx b/src/ShapeProcess/ShapeProcess_Context.cxx index 7bce89474f..1e9d891ef4 100644 --- a/src/ShapeProcess/ShapeProcess_Context.cxx +++ b/src/ShapeProcess/ShapeProcess_Context.cxx @@ -62,7 +62,14 @@ Standard_Boolean ShapeProcess_Context::Init (const Standard_CString file, const Standard_CString scope) { myScope.Nullify(); - myRC = LoadResourceManager ( file ); + if (file != nullptr && strlen (file) != 0) + { + myRC = LoadResourceManager ( file ); + } + else + { + myRC = new Resource_Manager(); + } if ( scope && scope[0] ) { SetScope ( scope ); } diff --git a/src/XSAlgo/XSAlgo_AlgoContainer.cxx b/src/XSAlgo/XSAlgo_AlgoContainer.cxx index ab91acdb45..6f3ccb3bcb 100644 --- a/src/XSAlgo/XSAlgo_AlgoContainer.cxx +++ b/src/XSAlgo/XSAlgo_AlgoContainer.cxx @@ -100,9 +100,17 @@ TopoDS_Shape XSAlgo_AlgoContainer::ProcessShape (const TopoDS_Shape& shape, if ( context.IsNull() ) { Standard_CString rscfile = Interface_Static::CVal(prscfile); - if (!rscfile) - rscfile = prscfile; - context = new ShapeProcess_ShapeContext(shape, rscfile); + if (rscfile != nullptr && strlen (rscfile) == 0) + { + context = new ShapeProcess_ShapeContext(shape, nullptr); + Interface_Static::FillMap(context->ResourceManager()->GetMap()); + } + else + { + if (!rscfile) + rscfile = prscfile; + context = new ShapeProcess_ShapeContext(shape, rscfile); + } context->SetDetalisation(TopAbs_EDGE); } context->SetNonManifold(NonManifold); diff --git a/src/XSTEPResource/FILES b/src/XSTEPResource/FILES old mode 100755 new mode 100644 diff --git a/src/XSTEPResource/IGES b/src/XSTEPResource/IGES old mode 100755 new mode 100644 diff --git a/src/XSTEPResource/STEP b/src/XSTEPResource/STEP old mode 100755 new mode 100644 diff --git a/tests/bugs/step/bug28024 b/tests/bugs/step/bug28024 new file mode 100644 index 0000000000..45df53c439 --- /dev/null +++ b/tests/bugs/step/bug28024 @@ -0,0 +1,47 @@ +puts "============" +puts "OCC28024 Data Exchange, Configuration - revise XSTEPResource initialization" +puts "============" +puts "" +##################################################### +# Testing the mechanism for changing options of ShapeHealing +# from DRAW +##################################################### + +pload MODELING XDE + +if { [info exists imagedir] == 0 } { + set imagedir ../bug28024 + if {![file exists ${imagedir}]} { + file mkdir ${imagedir} + } +} +set step_file ${imagedir}/inv_triangle.stp + +# Make simple triangle with INNER wire +vertex v1 0 0 0 +vertex v2 1 0 0 +vertex v3 0 1 0 +edge e1 v2 v1 +edge e2 v3 v2 +edge e3 v1 v3 +wire w1 e1 e3 e2 +plane p1 +mkface f1 p1 w1 norient + +# Save to STEP +testwritestep ${step_file} f1 + +# Empty resource file name to take params from InterfaceStatic +param "read.step.resource.name" "\"\"" +# Turn off FixOrientation procedure +param "FromSTEP.FixShape.FixOrientationMode" 0 + +# Read from STEP without shape healing +stepread ${step_file} r * +explode r_1 f + +# The area of triangle must be negative +checkarea r_1_1 -0.5 1e-6 0.001 + +param "read.step.resource.name" "STEP" +param "FromSTEP.FixShape.FixOrientationMode" -1 diff --git a/tests/bugs/xde/bug6805 b/tests/bugs/xde/bug6805 old mode 100755 new mode 100644 From f55fe3b3f700f283e2f918fb694b48e502937f76 Mon Sep 17 00:00:00 2001 From: kgv Date: Wed, 28 Sep 2022 19:56:48 +0300 Subject: [PATCH 390/639] 0033149: Mesh - misprint in BRepMesh_NURBSRangeSplitter::computeGrainAndFilterParameters() --- src/BRepMesh/BRepMesh_NURBSRangeSplitter.cxx | 2 +- tests/bugs/iges/buc60820_1 | 2 +- tests/bugs/iges/buc60820_2 | 2 +- tests/bugs/mesh/bug25287 | 2 +- tests/bugs/mesh/bug27384_2 | 2 +- tests/bugs/mesh/bug27845 | 2 +- tests/bugs/mesh/bug30008_1 | 2 +- tests/bugs/mesh/bug31251 | 4 ++-- tests/bugs/mesh/bug32424 | 2 +- tests/bugs/modalg_2/bug264_11 | 2 +- tests/bugs/moddata_2/bug428 | 2 +- tests/bugs/moddata_2/fra62476_1 | 1 - tests/bugs/moddata_2/fra62476_2 | 2 +- tests/hlr/poly_hlr/C13 | 2 +- tests/hlr/poly_hlr/C14 | 2 +- tests/hlr/poly_hlr/C16 | 2 +- tests/hlr/poly_hlr/C20 | 2 +- tests/hlr/poly_hlr/C5 | 2 +- tests/hlr/poly_hlr/C6 | 2 +- tests/hlr/poly_hlr/C7 | 2 +- tests/hlr/poly_hlr/bug23625_2 | 2 +- tests/mesh/data/standard/X1 | 2 +- 22 files changed, 22 insertions(+), 23 deletions(-) diff --git a/src/BRepMesh/BRepMesh_NURBSRangeSplitter.cxx b/src/BRepMesh/BRepMesh_NURBSRangeSplitter.cxx index d0cb22ea67..0f78d5e924 100644 --- a/src/BRepMesh/BRepMesh_NURBSRangeSplitter.cxx +++ b/src/BRepMesh/BRepMesh_NURBSRangeSplitter.cxx @@ -556,7 +556,7 @@ Handle(IMeshData::SequenceOfReal) BRepMesh_NURBSRangeSplitter::computeGrainAndFi const Handle(BRepAdaptor_Surface)& aSurface = GetSurface(); const Standard_Real aMinSize2d = Max( aSurface->UResolution(theParameters.MinSize), - aSurface->UResolution(theParameters.MinSize)); + aSurface->VResolution(theParameters.MinSize)); aMinDiff = Max(aMinSize2d, aMinDiff); diff --git a/tests/bugs/iges/buc60820_1 b/tests/bugs/iges/buc60820_1 index 3253afd1af..9abdd7c07c 100755 --- a/tests/bugs/iges/buc60820_1 +++ b/tests/bugs/iges/buc60820_1 @@ -12,5 +12,5 @@ tclean result incmesh result 0.1 triangles result -checktrinfo result -tri 748 -nod 619 +checktrinfo result -tri 736 -nod 613 checkview -display result -2d -path ${imagedir}/${test_image}.png diff --git a/tests/bugs/iges/buc60820_2 b/tests/bugs/iges/buc60820_2 index e030c94fcb..0c676d4af6 100755 --- a/tests/bugs/iges/buc60820_2 +++ b/tests/bugs/iges/buc60820_2 @@ -13,6 +13,6 @@ vdisplay result vsetdispmode result 1 vfit -checktrinfo result -tri 278 -nod 254 +checktrinfo result -tri 222 -nod 226 checkview -display result -2d -path ${imagedir}/${test_image}.png diff --git a/tests/bugs/mesh/bug25287 b/tests/bugs/mesh/bug25287 index 2905c18057..f03a9626d1 100644 --- a/tests/bugs/mesh/bug25287 +++ b/tests/bugs/mesh/bug25287 @@ -11,7 +11,7 @@ renamevar a_1 result incmesh result 0.0001 -a 30 -force_face_def -parallel -checktrinfo result -tri 14494 -nod 9510 -defl 0.00031502118964205414 -tol_abs_defl 1e-6 +checktrinfo result -tri 14058 -nod 9292 -defl 0.00031502118964205414 -tol_abs_defl 1e-6 vinit vsetdispmode 1 diff --git a/tests/bugs/mesh/bug27384_2 b/tests/bugs/mesh/bug27384_2 index 640c5ca59a..63e2923e22 100644 --- a/tests/bugs/mesh/bug27384_2 +++ b/tests/bugs/mesh/bug27384_2 @@ -17,7 +17,7 @@ vdefaults -autoTriang 0 vdisplay result vfit -set rel_tol 0.7607262575544315 +set rel_tol 0.7558889057543047 set max_rel_tol_diff 0.001 set area_eps 1 diff --git a/tests/bugs/mesh/bug27845 b/tests/bugs/mesh/bug27845 index 5428d732a7..6287701923 100644 --- a/tests/bugs/mesh/bug27845 +++ b/tests/bugs/mesh/bug27845 @@ -14,7 +14,7 @@ vdisplay result vfit checkview -screenshot -3d -path ${imagedir}/${test_image}.png -checktrinfo result -tri 3832 -nod 4773 -defl 3.0509255143612428 -tol_abs_defl 1e-6 +checktrinfo result -tri 3828 -nod 4771 -defl 3.0544822246414993 -tol_abs_defl 1e-6 set log [tricheck result] if { [llength $log] != 0 } { diff --git a/tests/bugs/mesh/bug30008_1 b/tests/bugs/mesh/bug30008_1 index add7ddfaab..0d6ccc4a9b 100644 --- a/tests/bugs/mesh/bug30008_1 +++ b/tests/bugs/mesh/bug30008_1 @@ -12,6 +12,6 @@ vdisplay result vviewparams -scale 8.46292 -proj 0.653203 -0.644806 0.396926 -up -0.0109833 0.51609 0.856464 -at 347.559 1026.89 219.262 -eye 2080.75 -684.022 1272.45 tricheck result -checktrinfo result -tri 9470 -nod 6136 -defl 4.7757836297551908 -tol_abs_defl 1e-6 +checktrinfo result -tri 9460 -nod 6131 -defl 4.7757836297551908 -tol_abs_defl 1e-6 checkview -screenshot -3d -path ${imagedir}/${test_image}.png diff --git a/tests/bugs/mesh/bug31251 b/tests/bugs/mesh/bug31251 index d8693fe8e2..9a4c55cfb3 100644 --- a/tests/bugs/mesh/bug31251 +++ b/tests/bugs/mesh/bug31251 @@ -15,7 +15,7 @@ vdefaults -autoTriang 0 tclean result incmesh result 0.004 -a 14 -checktrinfo result -tri 72570 -nod 40951 -defl 0.24607185555570676 -tol_abs_defl 1e-6 +checktrinfo result -tri 72562 -nod 40947 -defl 0.24607185555570676 -tol_abs_defl 1e-6 vdisplay result -redisplay vfit @@ -23,7 +23,7 @@ checkview -screenshot -3d -path ${imagedir}/${test_image}_default.png tclean result incmesh result 0.004 -a 14 -force_face_def -checktrinfo result -tri 287990 -nod 148661 -defl 0.16388671063364907 -tol_abs_defl 1e-6 +checktrinfo result -tri 287982 -nod 148657 -defl 0.16388671063364907 -tol_abs_defl 1e-6 vdisplay result -redisplay vfit diff --git a/tests/bugs/mesh/bug32424 b/tests/bugs/mesh/bug32424 index f5e12302e1..deb41d8bfa 100644 --- a/tests/bugs/mesh/bug32424 +++ b/tests/bugs/mesh/bug32424 @@ -8,7 +8,7 @@ restore [locate_data_file bug32424.brep] result incmesh result 0.17 -a 20 -checktrinfo result -tri 16168 -nod 8206 +checktrinfo result -tri 2360 -nod 1302 vinit vdefaults -autoTriang 0 diff --git a/tests/bugs/modalg_2/bug264_11 b/tests/bugs/modalg_2/bug264_11 index a733dbcb47..eda4fb2af3 100755 --- a/tests/bugs/modalg_2/bug264_11 +++ b/tests/bugs/modalg_2/bug264_11 @@ -18,6 +18,6 @@ vclear isos result 0 triangles result -checktrinfo result -tri 31 -nod 28 +checktrinfo result -tri 55 -nod 40 checkprops result -s 0 checkview -display result -3d -path ${imagedir}/${test_image}.png diff --git a/tests/bugs/moddata_2/bug428 b/tests/bugs/moddata_2/bug428 index d4cce3e9f8..913bb19935 100755 --- a/tests/bugs/moddata_2/bug428 +++ b/tests/bugs/moddata_2/bug428 @@ -19,5 +19,5 @@ isos result 0 triangles result fit -checktrinfo result -tri 10463 -nod 7643 +checktrinfo result -tri 10409 -nod 7615 checkview -screenshot -2d -path ${imagedir}/${test_image}_axo.png diff --git a/tests/bugs/moddata_2/fra62476_1 b/tests/bugs/moddata_2/fra62476_1 index 92646513ab..d06f426a18 100755 --- a/tests/bugs/moddata_2/fra62476_1 +++ b/tests/bugs/moddata_2/fra62476_1 @@ -1,5 +1,4 @@ puts "TODO OCC12345 ALL: Error: Number of triangles" -puts "TODO OCC12345 ALL: Error: Number of nodes" puts "============" puts "FRA62476" diff --git a/tests/bugs/moddata_2/fra62476_2 b/tests/bugs/moddata_2/fra62476_2 index a9c53d81e0..07a7bef755 100755 --- a/tests/bugs/moddata_2/fra62476_2 +++ b/tests/bugs/moddata_2/fra62476_2 @@ -13,5 +13,5 @@ tclean result incmesh result .1 triangles result -checktrinfo result -tri 163 -nod 114 +checktrinfo result -tri 159 -nod 112 checkview -display result -3d -path ${imagedir}/${test_image}.png diff --git a/tests/hlr/poly_hlr/C13 b/tests/hlr/poly_hlr/C13 index bd4cf9a1cc..6a502fbb74 100644 --- a/tests/hlr/poly_hlr/C13 +++ b/tests/hlr/poly_hlr/C13 @@ -1,5 +1,5 @@ set viewname "vright" -set length 9548.13 +set length 9547.12 testreadstep [locate_data_file bug27341_Assembly_ABS_1_CAD.stp] a COMPUTE_HLR $viewname $algotype diff --git a/tests/hlr/poly_hlr/C14 b/tests/hlr/poly_hlr/C14 index c49df14909..f76cc9ee72 100644 --- a/tests/hlr/poly_hlr/C14 +++ b/tests/hlr/poly_hlr/C14 @@ -1,5 +1,5 @@ set viewname "vright" -set length 5497.6 +set length 5501.45 testreadstep [locate_data_file bug27341_Assembly_BILZ_WFL2_1_CAD.stp] a COMPUTE_HLR $viewname $algotype diff --git a/tests/hlr/poly_hlr/C16 b/tests/hlr/poly_hlr/C16 index 21f8c48b6c..4c2ecbe5c2 100644 --- a/tests/hlr/poly_hlr/C16 +++ b/tests/hlr/poly_hlr/C16 @@ -1,5 +1,5 @@ set viewname "vright" -set length 1662.87 +set length 1662.85 testreadstep [locate_data_file bug27341_CCS_Adapter_CAD.stp] a COMPUTE_HLR $viewname $algotype diff --git a/tests/hlr/poly_hlr/C20 b/tests/hlr/poly_hlr/C20 index 0697995c73..ae4a9db262 100644 --- a/tests/hlr/poly_hlr/C20 +++ b/tests/hlr/poly_hlr/C20 @@ -1,5 +1,5 @@ set viewname "vright" -set length 1704.6 +set length 1704.86 testreadstep [locate_data_file bug27341_Drehkopf_HSK_Gewinde_R_CAD.stp] a COMPUTE_HLR $viewname $algotype diff --git a/tests/hlr/poly_hlr/C5 b/tests/hlr/poly_hlr/C5 index 140df6fbfd..1c072cb09d 100644 --- a/tests/hlr/poly_hlr/C5 +++ b/tests/hlr/poly_hlr/C5 @@ -1,5 +1,5 @@ set viewname "vright" -set length 1718.9 +set length 1723.27 testreadstep [locate_data_file bug27341_ABS_Adapter_CAD.stp] a COMPUTE_HLR $viewname $algotype diff --git a/tests/hlr/poly_hlr/C6 b/tests/hlr/poly_hlr/C6 index b63823c549..e0ad37efcc 100644 --- a/tests/hlr/poly_hlr/C6 +++ b/tests/hlr/poly_hlr/C6 @@ -1,5 +1,5 @@ set viewname "vright" -set length 2832.05 +set length 2832.09 testreadstep [locate_data_file bug27341_ABS_Grundhalter_CAD.stp] a COMPUTE_HLR $viewname $algotype diff --git a/tests/hlr/poly_hlr/C7 b/tests/hlr/poly_hlr/C7 index 76688f7cad..802b51a028 100644 --- a/tests/hlr/poly_hlr/C7 +++ b/tests/hlr/poly_hlr/C7 @@ -1,5 +1,5 @@ set viewname "vright" -set length 2261.81 +set length 2262.59 testreadstep [locate_data_file bug27341_AIF_Grundhalter_GR1_CAD.stp] a COMPUTE_HLR $viewname $algotype diff --git a/tests/hlr/poly_hlr/bug23625_2 b/tests/hlr/poly_hlr/bug23625_2 index 8ae9139745..09558857a0 100644 --- a/tests/hlr/poly_hlr/bug23625_2 +++ b/tests/hlr/poly_hlr/bug23625_2 @@ -4,7 +4,7 @@ puts "============" puts "" set viewname "vfront" -set length 27126.9 +set length 27223.1 restore [locate_data_file bug23625_a2.brep] a COMPUTE_HLR $viewname $algotype diff --git a/tests/mesh/data/standard/X1 b/tests/mesh/data/standard/X1 index d09c119532..fc5a589950 100755 --- a/tests/mesh/data/standard/X1 +++ b/tests/mesh/data/standard/X1 @@ -6,7 +6,7 @@ set TheFileName shading_wrongshape_030.brep set bug_cross "OCC22687" set nbcross(All) 4 if { [string compare $command "shading"] == 0 } { - set rel_tol 0.48575382373356474 + set rel_tol 0.4953655446472135 } else { set rel_tol 0.1856053577754922 } From 492b09dcaec31a4076241c578118bea129e60d25 Mon Sep 17 00:00:00 2001 From: gelin Date: Mon, 28 Feb 2022 09:13:31 +0300 Subject: [PATCH 391/639] 0032850: Modeling Algorithms - Surface Surface Intersect Lost one line IntStart_SearchOnBoundaries.gxx - improving tangent criteria --- src/IntPatch/IntPatch_ALineToWLine.cxx | 9 +++- src/IntStart/IntStart_SearchOnBoundaries.gxx | 52 +++++++++++++++----- tests/evolved/voluved/HMC010 | 2 +- tests/lowalgos/intss/bug32850 | 19 +++++++ 4 files changed, 68 insertions(+), 14 deletions(-) create mode 100644 tests/lowalgos/intss/bug32850 diff --git a/src/IntPatch/IntPatch_ALineToWLine.cxx b/src/IntPatch/IntPatch_ALineToWLine.cxx index 001d901a59..54f8f07453 100644 --- a/src/IntPatch/IntPatch_ALineToWLine.cxx +++ b/src/IntPatch/IntPatch_ALineToWLine.cxx @@ -714,7 +714,8 @@ void IntPatch_ALineToWLine::MakeWLine(const Handle(IntPatch_ALine)& theALine, } IntPatch_Point aVtx = theALine->Vertex(aVertexNumber); - const Standard_Real aNewVertexParam = aLinOn2S->NbPoints() + 1; + Standard_Real aNewVertexParam = aLinOn2S->NbPoints() + 1; + Standard_Integer aNbPointsPrev = aLinOn2S->NbPoints(); //ATTENTION!!! // IsPoleOrSeam inserts new point in aLinOn2S if aVtx respects @@ -748,6 +749,7 @@ void IntPatch_ALineToWLine::MakeWLine(const Handle(IntPatch_ALine)& theALine, aPrePointExist = IsPoleOrSeam(myS1, myS2, aPrefIso, aLinOn2S, aVtx, anArrPeriods, aTol, aSingularSurfaceID); + if (aPrePointExist == IntPatch_SPntPole || aPrePointExist == IntPatch_SPntPoleSeamU) { @@ -761,6 +763,11 @@ void IntPatch_ALineToWLine::MakeWLine(const Handle(IntPatch_ALine)& theALine, const Standard_Real aCurVertParam = aVtx.ParameterOnLine(); if(aPrePointExist != IntPatch_SPntNone) { + if (aNbPointsPrev == aLinOn2S->NbPoints()) + { + //Vertex coinsides any point of line and was not added into line + aNewVertexParam = aNbPointsPrev; + } aPrevParam = aParameter = aCurVertParam; } else diff --git a/src/IntStart/IntStart_SearchOnBoundaries.gxx b/src/IntStart/IntStart_SearchOnBoundaries.gxx index 8c013fbce1..59bac00346 100644 --- a/src/IntStart/IntStart_SearchOnBoundaries.gxx +++ b/src/IntStart/IntStart_SearchOnBoundaries.gxx @@ -354,6 +354,7 @@ void BoundedArc (const TheArc& A, { const IntSurf_Quadric& aQuadric = Func.Quadric(); GeomAbs_SurfaceType TypeQuad = aQuadric.TypeQuadric(); + GeomAbs_CurveType TypeConS = GeomAbs_OtherCurve; IntCurveSurface_HInter IntCS; Standard_Boolean IsIntCSdone = Standard_False; @@ -387,7 +388,7 @@ void BoundedArc (const TheArc& A, //Exact solution Handle(Adaptor3d_Surface) aSurf = Func.Surface(); Adaptor3d_CurveOnSurface ConS(A, aSurf); - GeomAbs_CurveType TypeConS = ConS.GetType(); + TypeConS = ConS.GetType(); #ifdef OCCT_DEBUG Handle(Geom_Curve) CurveConS; switch(TypeConS) @@ -608,13 +609,27 @@ void BoundedArc (const TheArc& A, para = aSI(i).Value(); Standard_Real param=(para+parap1)*0.5; - Standard_Real ym; - if(Func.Value(param,ym)) { - if(Abs(ym) 0.001) @@ -627,6 +642,7 @@ void BoundedArc (const TheArc& A, Standard_Integer aNbNodes = RealToInt(Ceiling((parap1 - para)/aTol)); Standard_Real aVal = RealLast(); + Standard_Real aValMax = 0.; //Standard_Integer aNbNodes = 23; Standard_Real aDelta = (parap1 - para)/(aNbNodes + 1.); Standard_Integer ii; @@ -637,17 +653,29 @@ void BoundedArc (const TheArc& A, aCurPar = (ii < aNbNodes + 1) ? para + ii*aDelta : parap1; if (Func.Value(aCurPar, aCurVal)) { - //if (aCurVal < aVal) { - if (Abs(aCurVal) < aVal) { - //aVal = aCurVal; - aVal = Abs(aCurVal); + Standard_Real anAbsVal = Abs(aCurVal); + if (anAbsVal < aVal) { + aVal = anAbsVal; param = aCurPar; } + if (anAbsVal > aValMax) + { + aValMax = anAbsVal; + } } } - // Modified by skv - Tue Aug 31 12:13:51 2004 OCC569 End - aSI(i).ChangeValue() = Pdeb - 1; - aSI(i + 1).ChangeValue() = param; + // At last, interval got by exact intersection can be considered as tangent if + // minimal distance is inside interval and + // minimal and maximal values are almost the same + if (IsIntCSdone && aNbNodes > 1) { + aTang = Abs(param - para) > EpsX && Abs(parap1 - param) > EpsX && + 0.01*aValMax <= aVal; + } + if (aTang) + { + aSI(i).ChangeValue() = Pdeb - 1; + aSI(i + 1).ChangeValue() = param; + } } } } diff --git a/tests/evolved/voluved/HMC010 b/tests/evolved/voluved/HMC010 index 6ea24a3b5e..dd63f25b95 100644 --- a/tests/evolved/voluved/HMC010 +++ b/tests/evolved/voluved/HMC010 @@ -2,7 +2,7 @@ puts "==========" puts "OCC29523" puts "==========" -cpulimit 60 +cpulimit 120 restore [locate_data_file bug29523_cut_extrudewire09.brep] sw restore [locate_data_file bug29523_cut_toolwire09.brep] tw diff --git a/tests/lowalgos/intss/bug32850 b/tests/lowalgos/intss/bug32850 new file mode 100644 index 0000000000..8312243c35 --- /dev/null +++ b/tests/lowalgos/intss/bug32850 @@ -0,0 +1,19 @@ +puts "========" +puts "0032850: Modeling Algorithms - Surface Surface Intersect Lost one line" +puts "========" +puts "" + +cylinder s1 25.8071575178163 0 -373.974517822281 0 1 0 -1.73024882663956e-06 0 0.999999999998503 408.974517822893 +trim s1 s1 0 0.0225015452057227 -146.010003766057 2146.01000376606 +cylinder s2 0 1974.19284248218 -373.974517822281 1 0 0 -0 1.73024882663956e-06 0.999999999998503 408.974517822893 +trim s2 s2 0 0.0225015452057227 -146.010003766057 946.010003766057 +mkface f1 s1; +mkface f2 s2; +set log [bopcurves f1 f2] +regexp {Tolerance Reached=+([-0-9.+eE]+)\n+([-0-9.+eE]+)} $log full Toler NbCurv +if {$NbCurv != 4} { + puts "Error: Number of curves is wrong" +} +if { $Toler > 1.0e-12} { + puts "Error: Big tolerance value" +} \ No newline at end of file From a453f9d12895e9e972d9fb361b352f884208a35a Mon Sep 17 00:00:00 2001 From: atereshi Date: Tue, 20 Sep 2022 11:48:14 +0300 Subject: [PATCH 392/639] 0028414: Data Exchange, STEP - Face on a closed surface with single inner wire and without natural bound not correctly read Problem: From the point of view of the STEP format (and others), it is allowed to describe a face on a surface with natural boundaries (torus, sphere) without specifying these boundaries. Thus, a face on a closed surface and containing an inner wire (or several) is correctly defined and describes a face with a cutout defined by this wire. At the same time, there is a function (ShapeFix_Face::FixOrientation) in the ShapeHealing procedure that corrects the orientation of the wires, and it starts before the function of adding natural boundaries (ShapeFix_Face::FixAddNaturalBound). There are many shapes that have incorrectly oriented wires and this procedure successfully heals them, but on a correctly specified face with single inner wire on closed surface, we do not get the entire surface with a cutout, but a part of the surface defined by the wire. This fix is intended to resolve this ambiguity. Change: 1. Added function isNeedAddNaturalBound that returns TRUE if face needs to add natural bounds. 2. Corrected condition in FixOrientation to ignoring faces that needs to add natural bounds. 3. For tests in which one wire was incorrectly oriented on a closed surface, flag AddNaturalBound was disabled. 5. Test with cutout from torus was created: bugs step bug28414. Result: By default, it is correct to add natural boundaries, because this case is correct from the point of view of the STEP format and others. --- src/ShapeFix/ShapeFix_Face.cxx | 72 +++++++++++++++++++++------- src/ShapeFix/ShapeFix_Face.hxx | 4 +- tests/bugs/begin | 44 +++++++++++++++++ tests/bugs/modalg_7/bug30273 | 26 ++++++++++ tests/bugs/step/bug28414 | 20 ++++++++ tests/bugs/step/bug32922 | 86 +++++----------------------------- tests/bugs/xde/bug6283 | 41 ++++++++++++---- tests/de/begin | 44 +++++++++++++++++ tests/de/end | 12 +++++ tests/de/iges_1/G8 | 36 ++++++++++++++ tests/de/iges_1/J9 | 36 ++++++++++++++ tests/de/step_1/E1 | 36 ++++++++++++++ tests/de/step_1/E2 | 36 ++++++++++++++ tests/de/step_1/G9 | 36 ++++++++++++++ tests/de/step_1/J6 | 8 ++-- tests/de/step_2/B3 | 36 ++++++++++++++ tests/de/step_2/Q5 | 37 +++++++++++++++ tests/de/step_2/Q6 | 37 +++++++++++++++ tests/de/step_3/B9 | 37 +++++++++++++++ tests/de/step_3/C8 | 37 +++++++++++++++ tests/de/step_3/E4 | 37 +++++++++++++++ 21 files changed, 656 insertions(+), 102 deletions(-) create mode 100644 tests/bugs/step/bug28414 diff --git a/src/ShapeFix/ShapeFix_Face.cxx b/src/ShapeFix/ShapeFix_Face.cxx index 20388e08f1..15016761eb 100644 --- a/src/ShapeFix/ShapeFix_Face.cxx +++ b/src/ShapeFix/ShapeFix_Face.cxx @@ -647,11 +647,10 @@ Standard_Boolean ShapeFix_Face::Perform() // fix natural bounds Standard_Boolean NeedSplit = Standard_True; - if ( NeedFix ( myFixAddNaturalBoundMode ) ) { - if ( FixAddNaturalBound() ) { - NeedSplit = Standard_False; - myStatus |= ShapeExtend::EncodeStatus ( ShapeExtend_DONE5 ); - } + if (FixAddNaturalBound()) + { + NeedSplit = Standard_False; + myStatus |= ShapeExtend::EncodeStatus ( ShapeExtend_DONE5 ); } // split face @@ -840,9 +839,11 @@ Standard_Boolean ShapeFix_Face::FixAddNaturalBound() return Standard_True; } - // check if surface is double-closed and fix is needed - if ( !IsSurfaceUVPeriodic (mySurf->Adaptor3d()) || ShapeAnalysis::IsOuterBound (myFace) ) + // check if surface doesn't need natural bounds + if (!isNeedAddNaturalBound(ws)) + { return Standard_False; + } // Collect information on free intervals in U and V TColgp_SequenceOfPnt2d intU, intV, centers; @@ -1002,6 +1003,50 @@ Standard_Boolean ShapeFix_Face::FixOrientation() return FixOrientation(MapWires); } +//======================================================================= +// function : isNeedAddNaturalBound +// purpose : +//======================================================================= +Standard_Boolean ShapeFix_Face::isNeedAddNaturalBound(const TopTools_SequenceOfShape& theOrientedWires) +{ + // if fix is not needed + if (!NeedFix (myFixAddNaturalBoundMode)) + { + return Standard_False; + } + // if surface is not double-closed + if (!IsSurfaceUVPeriodic (mySurf->Adaptor3d())) + { + return Standard_False; + } + // if face has an OUTER bound + if (ShapeAnalysis::IsOuterBound (myFace)) + { + return Standard_False; + } + // check that not any wire has a seam edge and not any edge is degenerated. + // because the presence of a seam or degenerated edge indicates that this wire should be an external one, + // and in case of its incorrect orientation, this will be corrected. + Standard_Integer aNbOriented = theOrientedWires.Length(); + for (Standard_Integer i = 1; i <= aNbOriented; i++) + { + TopoDS_Wire aWire = TopoDS::Wire(theOrientedWires.Value(i)); + for (TopoDS_Iterator anEdgeIt(aWire); anEdgeIt.More(); anEdgeIt.Next()) + { + TopoDS_Edge anEdge = TopoDS::Edge(anEdgeIt.Value()); + if (BRep_Tool::Degenerated(anEdge)) + { + return Standard_False; + } + if (BRep_Tool::IsClosed(anEdge, myFace)) + { + return Standard_False; + } + } + } + + return Standard_True; +} //======================================================================= //function : FixOrientation @@ -1071,9 +1116,8 @@ Standard_Boolean ShapeFix_Face::FixOrientation(TopTools_DataMapOfShapeListOfShap // if no wires, just do nothing if ( nb <= 0) return Standard_False; - Standard_Integer nbInternal=0; - Standard_Boolean isAddNaturalBounds = (NeedFix (myFixAddNaturalBoundMode) && IsSurfaceUVPeriodic(mySurf->Adaptor3d())); + Standard_Boolean isAddNaturalBounds = isNeedAddNaturalBound(ws); TColStd_SequenceOfInteger aSeqReversed; // if wire is only one, check its orientation if ( nb == 1 ) { @@ -1084,9 +1128,7 @@ Standard_Boolean ShapeFix_Face::FixOrientation(TopTools_DataMapOfShapeListOfShap af.Orientation ( TopAbs_FORWARD ); B.Add (af,ws.Value(1)); - if ((myFixAddNaturalBoundMode != 1 || - !IsSurfaceUVPeriodic(mySurf->Adaptor3d())) && - !ShapeAnalysis::IsOuterBound(af)) + if (!isAddNaturalBounds && !ShapeAnalysis::IsOuterBound(af)) { Handle(ShapeExtend_WireData) sbdw = new ShapeExtend_WireData(TopoDS::Wire(ws.Value(1))); @@ -1244,7 +1286,7 @@ Standard_Boolean ShapeFix_Face::FixOrientation(TopTools_DataMapOfShapeListOfShap if(!(stb==ste)) { sta = TopAbs_UNKNOWN; SI.Bind(aw,0); - j=nb; + j=nbAll; break; } } @@ -1363,11 +1405,9 @@ Standard_Boolean ShapeFix_Face::FixOrientation(TopTools_DataMapOfShapeListOfShap } - //done = (done && (nb ==1 || (isAddNaturalBounds || (!isAddNaturalBounds && nbInternal -1} { - puts "${BugNumber} : Error during reading attached IGES file" + puts "${BugNumber} : Error during reading attached STEP file" } else { tpcompound comp if [catch { set fixlist [fixshape result comp 1e-7] } res] { - puts "${BugNumber}: Error during fixshape" + puts "${BugNumber}: Error during fixshape" } else { - set index [string first "Segments were disordered; fixed\n" ${fixlist}] + set index [string first "Segments were disordered; fixed\n" ${fixlist}] if {$index != -1} { - puts "Faulty ${BugNumber}" + puts "Faulty ${BugNumber}" } else { - puts "OK ${BugNumber}" + puts "OK ${BugNumber}" } - checkprops result -s 2.22665e+06 -checkshape result - checkview -display result -2d -path ${imagedir}/${test_image}.png + checkprops result -s 2.22665e+06 + checkshape result + checkview -display result -2d -path ${imagedir}/${test_image}.png } } +# Restoring the path to the old resource file +set ::env(CSF_STEPDefaults) ${old_resource_path} + diff --git a/tests/de/begin b/tests/de/begin index 7dbfbf66fb..66bf8d3526 100644 --- a/tests/de/begin +++ b/tests/de/begin @@ -13,3 +13,47 @@ set lengthunit_start "" # Open a transaction NewCommand D + +# Reads resource file, returns options from file as key-value dict +proc parse_resource_file {theFileName} { + # Creating empty dictionary + set aDict [dict create]; + # Check for resource file + if { [info exists theFileName] == 0 } { + puts "Error: resource file \"${theFileName}\" isn't found" + return $aDict + } + # Open a resource file + set aFD [open "${theFileName}" "rb"] + set aLineNo 0 + # Read line by line + while {[gets $aFD aLine] !=-1 } { + incr aLineNo + # Clear the line from comment + if {[regexp {(^[^!]+)} $aLine match aClearLine]} { + # remove spaces + set aClearLine [string trim $aClearLine] + if {[string length $aClearLine] != 0} { + if {[regexp {(\S+)\s*:\s*(\S*)} $aClearLine match aKey aValue]} { + dict set aDict $aKey $aValue + } else { + puts "Error: syntax error in resource file at line: ${aLineNo}" + } + } + } + } + close $aFD + return $aDict +} + +# Creates new resource file with options as key-value dict +proc create_resource_file {theFileName theOptions} { + # Open a resource file + set aFD [open "${theFileName}" "wb"] + set aLineNo 0 + # Write line by line + dict for {aKey aValue} $theOptions { + puts $aFD "${aKey} : ${aValue}" + } + close $aFD +} diff --git a/tests/de/end b/tests/de/end index be9d6b28f0..cc0c34c71a 100644 --- a/tests/de/end +++ b/tests/de/end @@ -67,12 +67,24 @@ if { [string length $filename] > 1} { set tmp [param read.step.product.mode OFF] } set path_file [locate_data_file $filename] + + if { [info exists de_use_custom_scripts] } { + puts "Executing custom script for the test before reading data from file..." + set old_resource_path [de_before_script $filename] + } + if { [catch { $ReadCommand D_First $path_file } catch_result] } { set err_msg "Error: First - file was not read - exception " puts $err_msg append todo_msg $todo_mask $err_msg $end_line set mist 1 } + + if { [info exists de_use_custom_scripts] } { + puts "Executing custom script for the test after reading data from file..." + de_after_script $old_resource_path + unset de_use_custom_scripts + } } else { set mist 1 diff --git a/tests/de/iges_1/G8 b/tests/de/iges_1/G8 index 60f9cda3c5..f2b249db24 100644 --- a/tests/de/iges_1/G8 +++ b/tests/de/iges_1/G8 @@ -16,3 +16,39 @@ NLAYERS : NLayers = 0 ( 0 ) LAYERS : Layers = ( ) } + +# Due to the ambiguous interpretation of the "inner" wire on the surfaces +# that have natural bound (is it the cutout in the whole surface, or it's just wrong wire orientation), +# we must manually turn off the adding of the natural bound option of the shape healing for this test. + +set de_use_custom_scripts 1 + +proc de_before_script {TheFileName} { + if { [info exists imagedir] == 0 } { + set imagedir ../[file rootname $TheFileName] + if {![file exists ${imagedir}]} { + file mkdir ${imagedir} + } + } + # remember the path to the old resource file + set old_resource_path $::env(CSF_IGESDefaults) + # reading old resource file + set anOptions [parse_resource_file "${old_resource_path}/IGES"] + # activation of ignoring the adding of natural bound + dict set anOptions "FromIGES.FixShape.FixAddNaturalBoundMode" "0" + # path to new resource file + set new_resource_path ${imagedir} + # creating resource file + create_resource_file "${new_resource_path}/IGES" $anOptions + # changing the path to the resource file + set ::env(CSF_IGESDefaults) ${new_resource_path} + puts "New path to IGES resource file is: \"${new_resource_path}\"" + + return ${old_resource_path} +} + +proc de_after_script {old_resource_path} { + # Restoring the path to the old resource file + set ::env(CSF_IGESDefaults) ${old_resource_path} + puts "Restore path to IGES resource file: \"${old_resource_path}\"" +} diff --git a/tests/de/iges_1/J9 b/tests/de/iges_1/J9 index 516117f8f7..64b4f46cba 100644 --- a/tests/de/iges_1/J9 +++ b/tests/de/iges_1/J9 @@ -20,3 +20,39 @@ NLAYERS : NLayers = 0 ( 0 ) LAYERS : Layers = ( ) } + +# Due to the ambiguous interpretation of the "inner" wire on the surfaces +# that have natural bound (is it the cutout in the whole surface, or it's just wrong wire orientation), +# we must manually turn off the adding of the natural bound option of the shape healing for this test. + +set de_use_custom_scripts 1 + +proc de_before_script {TheFileName} { + if { [info exists imagedir] == 0 } { + set imagedir ../[file rootname $TheFileName] + if {![file exists ${imagedir}]} { + file mkdir ${imagedir} + } + } + # remember the path to the old resource file + set old_resource_path $::env(CSF_IGESDefaults) + # reading old resource file + set anOptions [parse_resource_file "${old_resource_path}/IGES"] + # activation of ignoring the adding of natural bound + dict set anOptions "FromIGES.FixShape.FixAddNaturalBoundMode" "0" + # path to new resource file + set new_resource_path ${imagedir} + # creating resource file + create_resource_file "${new_resource_path}/IGES" $anOptions + # changing the path to the resource file + set ::env(CSF_IGESDefaults) ${new_resource_path} + puts "New path to IGES resource file is: \"${new_resource_path}\"" + + return ${old_resource_path} +} + +proc de_after_script {old_resource_path} { + # Restoring the path to the old resource file + set ::env(CSF_IGESDefaults) ${old_resource_path} + puts "Restore path to IGES resource file: \"${old_resource_path}\"" +} diff --git a/tests/de/step_1/E1 b/tests/de/step_1/E1 index cf236b539a..b903a708cd 100644 --- a/tests/de/step_1/E1 +++ b/tests/de/step_1/E1 @@ -20,3 +20,39 @@ NLAYERS : NLayers = 0 ( 0 ) LAYERS : Layers = ( ) } + +# Due to the ambiguous interpretation of the "inner" wire on the surfaces +# that have natural bound (is it the cutout in the whole surface, or it's just wrong wire orientation), +# we must manually turn off the adding of the natural bound option of the shape healing for this test. + +set de_use_custom_scripts 1 + +proc de_before_script {TheFileName} { + if { [info exists imagedir] == 0 } { + set imagedir ../[file rootname $TheFileName] + if {![file exists ${imagedir}]} { + file mkdir ${imagedir} + } + } + # remember the path to the old resource file + set old_resource_path $::env(CSF_STEPDefaults) + # reading old resource file + set anOptions [parse_resource_file "${old_resource_path}/STEP"] + # activation of ignoring the adding of natural bound + dict set anOptions "FromSTEP.FixShape.FixAddNaturalBoundMode" "0" + # path to new resource file + set new_resource_path ${imagedir} + # creating resource file + create_resource_file "${new_resource_path}/STEP" $anOptions + # changing the path to the resource file + set ::env(CSF_STEPDefaults) ${new_resource_path} + puts "New path to STEP resource file is: \"${new_resource_path}\"" + + return ${old_resource_path} +} + +proc de_after_script {old_resource_path} { + # Restoring the path to the old resource file + set ::env(CSF_STEPDefaults) ${old_resource_path} + puts "Restore path to STEP resource file: \"${old_resource_path}\"" +} \ No newline at end of file diff --git a/tests/de/step_1/E2 b/tests/de/step_1/E2 index a9dc84a82c..141debb92f 100644 --- a/tests/de/step_1/E2 +++ b/tests/de/step_1/E2 @@ -20,3 +20,39 @@ NLAYERS : NLayers = 0 ( 0 ) LAYERS : Layers = ( ) } + +# Due to the ambiguous interpretation of the "inner" wire on the surfaces +# that have natural bound (is it the cutout in the whole surface, or it's just wrong wire orientation), +# we must manually turn off the adding of the natural bound option of the shape healing for this test. + +set de_use_custom_scripts 1 + +proc de_before_script {TheFileName} { + if { [info exists imagedir] == 0 } { + set imagedir ../[file rootname $TheFileName] + if {![file exists ${imagedir}]} { + file mkdir ${imagedir} + } + } + # remember the path to the old resource file + set old_resource_path $::env(CSF_STEPDefaults) + # reading old resource file + set anOptions [parse_resource_file "${old_resource_path}/STEP"] + # activation of ignoring the adding of natural bound + dict set anOptions "FromSTEP.FixShape.FixAddNaturalBoundMode" "0" + # path to new resource file + set new_resource_path ${imagedir} + # creating resource file + create_resource_file "${new_resource_path}/STEP" $anOptions + # changing the path to the resource file + set ::env(CSF_STEPDefaults) ${new_resource_path} + puts "New path to STEP resource file is: \"${new_resource_path}\"" + + return ${old_resource_path} +} + +proc de_after_script {old_resource_path} { + # Restoring the path to the old resource file + set ::env(CSF_STEPDefaults) ${old_resource_path} + puts "Restore path to STEP resource file: \"${old_resource_path}\"" +} \ No newline at end of file diff --git a/tests/de/step_1/G9 b/tests/de/step_1/G9 index ec8cda4fd2..712a3e5982 100644 --- a/tests/de/step_1/G9 +++ b/tests/de/step_1/G9 @@ -22,3 +22,39 @@ NLAYERS : NLayers = 0 ( 1 ) LAYERS : Layers = ( 001 ) } + +# Due to the ambiguous interpretation of the "inner" wire on the surfaces +# that have natural bound (is it the cutout in the whole surface, or it's just wrong wire orientation), +# we must manually turn off the adding of the natural bound option of the shape healing for this test. + +set de_use_custom_scripts 1 + +proc de_before_script {TheFileName} { + if { [info exists imagedir] == 0 } { + set imagedir ../[file rootname $TheFileName] + if {![file exists ${imagedir}]} { + file mkdir ${imagedir} + } + } + # remember the path to the old resource file + set old_resource_path $::env(CSF_STEPDefaults) + # reading old resource file + set anOptions [parse_resource_file "${old_resource_path}/STEP"] + # activation of ignoring the adding of natural bound + dict set anOptions "FromSTEP.FixShape.FixAddNaturalBoundMode" "0" + # path to new resource file + set new_resource_path ${imagedir} + # creating resource file + create_resource_file "${new_resource_path}/STEP" $anOptions + # changing the path to the resource file + set ::env(CSF_STEPDefaults) ${new_resource_path} + puts "New path to STEP resource file is: \"${new_resource_path}\"" + + return ${old_resource_path} +} + +proc de_after_script {old_resource_path} { + # Restoring the path to the old resource file + set ::env(CSF_STEPDefaults) ${old_resource_path} + puts "Restore path to STEP resource file: \"${old_resource_path}\"" +} diff --git a/tests/de/step_1/J6 b/tests/de/step_1/J6 index f98dd6f7c2..c684948fa6 100755 --- a/tests/de/step_1/J6 +++ b/tests/de/step_1/J6 @@ -1,6 +1,8 @@ # !!!! This file is generated automatically, do not edit manually! See end script puts "TODO CR23096 ALL: Update of 3D-Parameters has failed" -puts "TODO CR23096 ALL: CHECKSHAPE : Faulty" +puts "TODO CR23096 ALL: CHECKSHAPE : Faulty" +puts "TODO CR23096 ALL: NBSHAPES : Faulty" +puts "TODO CR23096 ALL: STATSHAPE : Faulty" set filename bm1_pe_t4.stp @@ -8,8 +10,8 @@ set ref_data { DATA : Faulties = 0 ( 0 ) Warnings = 0 ( 0 ) Summary = 0 ( 0 ) TPSTAT : Faulties = 0 ( 3 ) Warnings = 13 ( 30 ) Summary = 13 ( 33 ) CHECKSHAPE : Wires = 3 ( 2 ) Faces = 3 ( 3 ) Shells = 0 ( 0 ) Solids = 0 ( 0 ) -NBSHAPES : Solid = 0 ( 0 ) Shell = 12 ( 12 ) Face = 15 ( 15 ) -STATSHAPE : Solid = 0 ( 0 ) Shell = 12 ( 12 ) Face = 15 ( 15 ) FreeWire = 0 ( 0 ) +NBSHAPES : Solid = 0 ( 0 ) Shell = 13 ( 12 ) Face = 16 ( 15 ) +STATSHAPE : Solid = 0 ( 0 ) Shell = 13 ( 12 ) Face = 16 ( 15 ) FreeWire = 0 ( 0 ) TOLERANCE : MaxTol = 1562.051497 ( 1562.051497 ) AvgTol = 272.6255712 ( 211.9512858 ) LABELS : N0Labels = 1 ( 1 ) N1Labels = 0 ( 0 ) N2Labels = 0 ( 0 ) TotalLabels = 1 ( 1 ) NameLabels = 1 ( 1 ) ColorLabels = 0 ( 0 ) LayerLabels = 0 ( 0 ) PROPS : Centroid = 0 ( 0 ) Volume = 0 ( 0 ) Area = 0 ( 0 ) diff --git a/tests/de/step_2/B3 b/tests/de/step_2/B3 index efa4373c29..e08538bf00 100644 --- a/tests/de/step_2/B3 +++ b/tests/de/step_2/B3 @@ -20,3 +20,39 @@ NLAYERS : NLayers = 0 ( 0 ) LAYERS : Layers = ( ) } + +# Due to the ambiguous interpretation of the "inner" wire on the surfaces +# that have natural bound (is it the cutout in the whole surface, or it's just wrong wire orientation), +# we must manually turn off the adding of the natural bound option of the shape healing for this test. + +set de_use_custom_scripts 1 + +proc de_before_script {TheFileName} { + if { [info exists imagedir] == 0 } { + set imagedir ../[file rootname $TheFileName] + if {![file exists ${imagedir}]} { + file mkdir ${imagedir} + } + } + # remember the path to the old resource file + set old_resource_path $::env(CSF_STEPDefaults) + # reading old resource file + set anOptions [parse_resource_file "${old_resource_path}/STEP"] + # activation of ignoring the adding of natural bound + dict set anOptions "FromSTEP.FixShape.FixAddNaturalBoundMode" "0" + # path to new resource file + set new_resource_path ${imagedir} + # creating resource file + create_resource_file "${new_resource_path}/STEP" $anOptions + # changing the path to the resource file + set ::env(CSF_STEPDefaults) ${new_resource_path} + puts "New path to STEP resource file is: \"${new_resource_path}\"" + + return ${old_resource_path} +} + +proc de_after_script {old_resource_path} { + # Restoring the path to the old resource file + set ::env(CSF_STEPDefaults) ${old_resource_path} + puts "Restore path to STEP resource file: \"${old_resource_path}\"" +} diff --git a/tests/de/step_2/Q5 b/tests/de/step_2/Q5 index 807def6dc3..035864159a 100644 --- a/tests/de/step_2/Q5 +++ b/tests/de/step_2/Q5 @@ -16,3 +16,40 @@ NLAYERS : NLayers = 0 ( 0 ) LAYERS : Layers = ( ) } + +# Due to the ambiguous interpretation of the "inner" wire on the surfaces +# that have natural bound (is it the cutout in the whole surface, or it's just wrong wire orientation), +# we must manually turn off the adding of the natural bound option of the shape healing for this test. + +set de_use_custom_scripts 1 + +proc de_before_script {TheFileName} { + if { [info exists imagedir] == 0 } { + set imagedir ../[file rootname $TheFileName] + if {![file exists ${imagedir}]} { + file mkdir ${imagedir} + } + } + # remember the path to the old resource file + set old_resource_path $::env(CSF_STEPDefaults) + # reading old resource file + set anOptions [parse_resource_file "${old_resource_path}/STEP"] + # activation of ignoring the adding of natural bound + dict set anOptions "FromSTEP.FixShape.FixAddNaturalBoundMode" "0" + # path to new resource file + set new_resource_path ${imagedir} + # creating resource file + create_resource_file "${new_resource_path}/STEP" $anOptions + # changing the path to the resource file + set ::env(CSF_STEPDefaults) ${new_resource_path} + puts "New path to STEP resource file is: \"${new_resource_path}\"" + + return ${old_resource_path} +} + +proc de_after_script {old_resource_path} { + # Restoring the path to the old resource file + set ::env(CSF_STEPDefaults) ${old_resource_path} + puts "Restore path to STEP resource file: \"${old_resource_path}\"" +} + diff --git a/tests/de/step_2/Q6 b/tests/de/step_2/Q6 index 908b5fbf1c..1df2560691 100644 --- a/tests/de/step_2/Q6 +++ b/tests/de/step_2/Q6 @@ -16,3 +16,40 @@ NLAYERS : NLayers = 0 ( 0 ) LAYERS : Layers = ( ) } + +# Due to the ambiguous interpretation of the "inner" wire on the surfaces +# that have natural bound (is it the cutout in the whole surface, or it's just wrong wire orientation), +# we must manually turn off the adding of the natural bound option of the shape healing for this test. + +set de_use_custom_scripts 1 + +proc de_before_script {TheFileName} { + if { [info exists imagedir] == 0 } { + set imagedir ../[file rootname $TheFileName] + if {![file exists ${imagedir}]} { + file mkdir ${imagedir} + } + } + # remember the path to the old resource file + set old_resource_path $::env(CSF_STEPDefaults) + # reading old resource file + set anOptions [parse_resource_file "${old_resource_path}/STEP"] + # turn off the adding of natural bound + dict set anOptions "FromSTEP.FixShape.FixAddNaturalBoundMode" "0" + # path to new resource file + set new_resource_path ${imagedir} + # creating resource file + create_resource_file "${new_resource_path}/STEP" $anOptions + # changing the path to the resource file + set ::env(CSF_STEPDefaults) ${new_resource_path} + puts "New path to STEP resource file is: \"${new_resource_path}\"" + + return ${old_resource_path} +} + +proc de_after_script {old_resource_path} { + # Restoring the path to the old resource file + set ::env(CSF_STEPDefaults) ${old_resource_path} + puts "Restore path to STEP resource file: \"${old_resource_path}\"" +} + diff --git a/tests/de/step_3/B9 b/tests/de/step_3/B9 index a3cf0a8375..2e78a1347f 100644 --- a/tests/de/step_3/B9 +++ b/tests/de/step_3/B9 @@ -22,3 +22,40 @@ NLAYERS : NLayers = 0 ( 0 ) LAYERS : Layers = ( ) } + +# Due to the ambiguous interpretation of the "inner" wire on the surfaces +# that have natural bound (is it the cutout in the whole surface, or it's just wrong wire orientation), +# we must manually turn off the adding of the natural bound option of the shape healing for this test. + +set de_use_custom_scripts 1 + +proc de_before_script {TheFileName} { + if { [info exists imagedir] == 0 } { + set imagedir ../[file rootname $TheFileName] + if {![file exists ${imagedir}]} { + file mkdir ${imagedir} + } + } + # remember the path to the old resource file + set old_resource_path $::env(CSF_STEPDefaults) + # reading old resource file + set anOptions [parse_resource_file "${old_resource_path}/STEP"] + # activation of ignoring the adding of natural bound + dict set anOptions "FromSTEP.FixShape.FixAddNaturalBoundMode" "0" + # path to new resource file + set new_resource_path ${imagedir} + # creating resource file + create_resource_file "${new_resource_path}/STEP" $anOptions + # changing the path to the resource file + set ::env(CSF_STEPDefaults) ${new_resource_path} + puts "New path to STEP resource file is: \"${new_resource_path}\"" + + return ${old_resource_path} +} + +proc de_after_script {old_resource_path} { + # Restoring the path to the old resource file + set ::env(CSF_STEPDefaults) ${old_resource_path} + puts "Restore path to STEP resource file: \"${old_resource_path}\"" +} + diff --git a/tests/de/step_3/C8 b/tests/de/step_3/C8 index e9c1a96ca9..4f47b33248 100644 --- a/tests/de/step_3/C8 +++ b/tests/de/step_3/C8 @@ -20,3 +20,40 @@ NLAYERS : NLayers = 0 ( 0 ) LAYERS : Layers = ( ) } + +# Due to the ambiguous interpretation of the "inner" wire on the surfaces +# that have natural bound (is it the cutout in the whole surface, or it's just wrong wire orientation), +# we must manually turn off the adding of the natural bound option of the shape healing for this test. + +set de_use_custom_scripts 1 + +proc de_before_script {TheFileName} { + if { [info exists imagedir] == 0 } { + set imagedir ../[file rootname $TheFileName] + if {![file exists ${imagedir}]} { + file mkdir ${imagedir} + } + } + # remember the path to the old resource file + set old_resource_path $::env(CSF_STEPDefaults) + # reading old resource file + set anOptions [parse_resource_file "${old_resource_path}/STEP"] + # activation of ignoring the adding of natural bound + dict set anOptions "FromSTEP.FixShape.FixAddNaturalBoundMode" "0" + # path to new resource file + set new_resource_path ${imagedir} + # creating resource file + create_resource_file "${new_resource_path}/STEP" $anOptions + # changing the path to the resource file + set ::env(CSF_STEPDefaults) ${new_resource_path} + puts "New path to STEP resource file is: \"${new_resource_path}\"" + + return ${old_resource_path} +} + +proc de_after_script {old_resource_path} { + # Restoring the path to the old resource file + set ::env(CSF_STEPDefaults) ${old_resource_path} + puts "Restore path to STEP resource file: \"${old_resource_path}\"" +} + diff --git a/tests/de/step_3/E4 b/tests/de/step_3/E4 index 941eff477c..cc5b077c81 100644 --- a/tests/de/step_3/E4 +++ b/tests/de/step_3/E4 @@ -20,3 +20,40 @@ NLAYERS : NLayers = 0 ( 0 ) LAYERS : Layers = ( ) } + +# Due to the ambiguous interpretation of the "inner" wire on the surfaces +# that have natural bound (is it the cutout in the whole surface, or it's just wrong wire orientation), +# we must manually turn off the adding of the natural bound option of the shape healing for this test. + +set de_use_custom_scripts 1 + +proc de_before_script {TheFileName} { + if { [info exists imagedir] == 0 } { + set imagedir ../[file rootname $TheFileName] + if {![file exists ${imagedir}]} { + file mkdir ${imagedir} + } + } + # remember the path to the old resource file + set old_resource_path $::env(CSF_STEPDefaults) + # reading old resource file + set anOptions [parse_resource_file "${old_resource_path}/STEP"] + # activation of ignoring the adding of natural bound + dict set anOptions "FromSTEP.FixShape.FixAddNaturalBoundMode" "0" + # path to new resource file + set new_resource_path ${imagedir} + # creating resource file + create_resource_file "${new_resource_path}/STEP" $anOptions + # changing the path to the resource file + set ::env(CSF_STEPDefaults) ${new_resource_path} + puts "New path to STEP resource file is: \"${new_resource_path}\"" + + return ${old_resource_path} +} + +proc de_after_script {old_resource_path} { + # Restoring the path to the old resource file + set ::env(CSF_STEPDefaults) ${old_resource_path} + puts "Restore path to STEP resource file: \"${old_resource_path}\"" +} + From 92f1875fc025d1ba6c65b0815f40dabc1aa331cb Mon Sep 17 00:00:00 2001 From: ddzama Date: Mon, 3 Oct 2022 10:37:14 +0300 Subject: [PATCH 393/639] 0033147: [Regression to 7.6.3] Coding, Configuration - CMake Error TBB "Directory is not set". Previous approach do not taking into account, that oneTBB library may be installed in the system folder on Linux. So, solve the problem it is proposed to employ find_package utility, that works great as on Windows, as on Linux. --- adm/cmake/tbb.cmake | 406 +++++++++++++++++++++----------------------- 1 file changed, 192 insertions(+), 214 deletions(-) diff --git a/adm/cmake/tbb.cmake b/adm/cmake/tbb.cmake index c39a1a9f2e..4e5f724ac2 100644 --- a/adm/cmake/tbb.cmake +++ b/adm/cmake/tbb.cmake @@ -1,262 +1,240 @@ # tbb -if (NOT DEFINED 3RDPARTY_DIR) - message (FATAL_ERROR "3RDPARTY_DIR is not defined.") -endif() - -if ((NOT EXISTS "${3RDPARTY_DIR}") OR ("${3RDPARTY_DIR}" STREQUAL "")) - message (FATAL_ERROR "Directory ${3RDPARTY_DIR} is not set.") +if (MSVC AND BUILD_SHARED_LIBS) + add_definitions (-D__TBB_NO_IMPLICIT_LINKAGE) + add_definitions (-D__TBBMALLOC_NO_IMPLICIT_LINKAGE) endif() if (NOT DEFINED INSTALL_TBB AND BUILD_SHARED_LIBS) set (INSTALL_TBB OFF CACHE BOOL "${INSTALL_TBB_DESCR}") endif() -# tbb directory +# Initialize tbb directory. if (NOT DEFINED 3RDPARTY_TBB_DIR) set (3RDPARTY_TBB_DIR "" CACHE PATH "The directory containing tbb") endif() -if (MSVC AND BUILD_SHARED_LIBS) - add_definitions (-D__TBB_NO_IMPLICIT_LINKAGE) - add_definitions (-D__TBBMALLOC_NO_IMPLICIT_LINKAGE) -endif() - -# include occt macros. compiler_bitness, os_wiht_bit, compiler -OCCT_INCLUDE_CMAKE_FILE ("adm/cmake/occt_macros") +if (WIN32) + if (NOT DEFINED 3RDPARTY_DIR) + message (FATAL_ERROR "3RDPARTY_DIR is not defined.") + endif() + if ("${3RDPARTY_DIR}" STREQUAL "") + message (FATAL_ERROR "3RDPARTY_DIR is empty string.") + endif() + if (NOT EXISTS "${3RDPARTY_DIR}") + message (FATAL_ERROR "3RDPARTY_DIR is not exist.") + endif() -# specify TBB folder in connectin with 3RDPARTY_DIR -if (3RDPARTY_DIR AND EXISTS "${3RDPARTY_DIR}") - #CHECK_PATH_FOR_CONSISTENCY (3RDPARTY_DIR 3RDPARTY_TBB_DIR PATH "The directory containing tbb") + # Below, we have correct 3RDPARTY_DIR. - if (NOT 3RDPARTY_TBB_DIR OR NOT EXISTS "${3RDPARTY_TBB_DIR}") + # Initialize TBB folder in connectin with 3RDPARTY_DIR. + if (("${3RDPARTY_TBB_DIR}" STREQUAL "") OR (NOT EXISTS "${3RDPARTY_TBB_DIR}")) FIND_PRODUCT_DIR ("${3RDPARTY_DIR}" TBB TBB_DIR_NAME) if (TBB_DIR_NAME) set (3RDPARTY_TBB_DIR "${3RDPARTY_DIR}/${TBB_DIR_NAME}" CACHE PATH "The directory containing tbb" FORCE) endif() endif() -else() - #set (3RDPARTY_TBB_DIR "" CACHE PATH "The directory containing TBB" FORCE) -endif() - -if (NOT DEFINED 3RDPARTY_TBB_INCLUDE_DIR) - set (3RDPARTY_TBB_INCLUDE_DIR "" CACHE PATH "The directory containing headers of the TBB") -endif() - -if (3RDPARTY_TBB_DIR AND EXISTS "${3RDPARTY_TBB_DIR}") - # check 3RDPARTY_TBB_INCLUDE_DIR for consictency with specified 3RDPARTY_TBB_DIR - CHECK_PATH_FOR_CONSISTENCY (3RDPARTY_TBB_DIR 3RDPARTY_TBB_INCLUDE_DIR PATH "The directory containing headers of the TBB") -endif() - -# tbb.h -if (NOT 3RDPARTY_TBB_INCLUDE_DIR OR NOT EXISTS "${3RDPARTY_TBB_INCLUDE_DIR}") - set (HEADER_NAMES tbb.h tbb/tbb.h) - - # set 3RDPARTY_TBB_INCLUDE_DIR as notfound, otherwise find_library can't assign a new value to 3RDPARTY_TBB_INCLUDE_DIR - set (3RDPARTY_TBB_INCLUDE_DIR "3RDPARTY_TBB_INCLUDE_DIR-NOTFOUND" CACHE PATH "the path to tbb.h" FORCE) - - if (3RDPARTY_TBB_DIR AND EXISTS "${3RDPARTY_TBB_DIR}") - find_path (3RDPARTY_TBB_INCLUDE_DIR NAMES ${HEADER_NAMES} - PATHS ${3RDPARTY_TBB_DIR} - PATH_SUFFIXES include - CMAKE_FIND_ROOT_PATH_BOTH - NO_DEFAULT_PATH) - else() - find_path (3RDPARTY_TBB_INCLUDE_DIR NAMES ${HEADER_NAMES} - PATH_SUFFIXES include - CMAKE_FIND_ROOT_PATH_BOTH) - endif() -endif() - -if (3RDPARTY_TBB_INCLUDE_DIR AND EXISTS "${3RDPARTY_TBB_INCLUDE_DIR}") - list (APPEND 3RDPARTY_INCLUDE_DIRS "${3RDPARTY_TBB_INCLUDE_DIR}") -else() - list (APPEND 3RDPARTY_NOT_INCLUDED 3RDPARTY_TBB_INCLUDE_DIR) - - set (3RDPARTY_TBB_INCLUDE_DIR "" CACHE PATH "the path to tbb.h" FORCE) -endif() - -# Throw execution if 3RDPARTY_TBB_DIR is equal to void string. -if ("${3RDPARTY_TBB_DIR}" STREQUAL "") - message (FATAL_ERROR "Directory with one TBB have not found.") -endif() - -# Searching TBBConfig.cmake and TBBTargets-release.cmake in 3RDPARTY_TBB_DIR -# TBBConfig.cmake - is required, TBBTargets-release.cmake is optional. -file (GLOB_RECURSE TBB_CONFIG_CMAKE_FILE "${3RDPARTY_TBB_DIR}/*TBBConfig.cmake") -if (NOT EXISTS "${TBB_CONFIG_CMAKE_FILE}") - message (FATAL_ERROR "TBBConfig.cmake has not been found.") -endif() -include ("${TBB_CONFIG_CMAKE_FILE}") - -file (GLOB_RECURSE TBB_TARGET_CMAKE_FILE "${3RDPARTY_TBB_DIR}/*TBBTargets-release.cmake") -if (EXISTS "${TBB_TARGET_CMAKE_FILE}") - include ("${TBB_TARGET_CMAKE_FILE}") -endif() - -# We do not know, full path to file is pointed, or local. -# So, we should check it and output FULL PATH to FILE. -macro (TBB_FILE_NAME_TO_FILEPATH FL_NAME FL_PATH) - if (EXISTS "${FL_NAME}") - # FL_NAME is full path. - set (${FL_PATH} "${FL_NAME}") - else() - # Here we deal with local path, so assign to var full path to file. - # Acquire full path. - set (${FL_PATH} "${3RDPARTY_TBB_DIR}${FL_NAME}") - if (NOT EXISTS "${${FL_PATH}}") - message (FATAL_ERROR "TBB: needed file not found (${FL_PATH}).") + # Here we have full path name to installation directory of TBB. + # Employ it. + if (EXISTS "${3RDPARTY_TBB_DIR}") + find_package ( + TBB 2021.5 + PATHS "${3RDPARTY_TBB_DIR}" NO_DEFAULT_PATH + REQUIRED + CONFIG) + + # Achive include directory + get_target_property (TBB_INCLUDE_DIR TBB::tbb INTERFACE_INCLUDE_DIRECTORIES) + if (NOT DEFINED 3RDPARTY_TBB_INCLUDE_DIR) + set (3RDPARTY_TBB_INCLUDE_DIR "" CACHE PATH "The directory containing headers of the TBB") + endif() + if (EXISTS "${TBB_INCLUDE_DIR}") + set (3RDPARTY_TBB_INCLUDE_DIR "${TBB_INCLUDE_DIR}" CACHE PATH "The directory containing headers of the TBB" FORCE) + list (APPEND 3RDPARTY_INCLUDE_DIRS "${3RDPARTY_TBB_INCLUDE_DIR}") + else() + list (APPEND 3RDPARTY_NOT_INCLUDED 3RDPARTY_TBB_INCLUDE_DIR) endif() - endif() -endmacro() - -# TARGET_NAME - is target name from oneTBB cmake file -# it is either "TBB::tbb", or "TBB::tbbmalloc" -# LIB_NAME_UC - is library id (TBB or TBBMALLOC) -# PROPERTY_TO_SET - LIBRARY or DLL -macro (WIN_TBB_PARSE TARGET_NAME LIB_NAME PROPERTY_TO_SET) - set (FILE_NAME "") - set (FILE_PATH "") - set (FILE_DIR "") - - if ("${PROPERTY_TO_SET}" STREQUAL "LIBRARY") - get_target_property (FILE_NAME "${TARGET_NAME}" IMPORTED_IMPLIB_RELEASE) - else() - get_target_property (FILE_NAME "${TARGET_NAME}" IMPORTED_LOCATION_RELEASE) - endif() - - # acquire full path - TBB_FILE_NAME_TO_FILEPATH("${FILE_NAME}" FILE_PATH) - - get_filename_component (FILE_NAME "${FILE_PATH}" NAME) - get_filename_component (FILE_DIR "${FILE_PATH}" DIRECTORY) - - if (NOT EXISTS "${FILE_DIR}/${FILE_NAME}") - set (3RDPARTY_${LIB_NAME}_${PROPERTY_TO_SET} "" CACHE FILEPATH "${LIB_NAME} library" FORCE) - set (3RDPARTY_${LIB_NAME}_${PROPERTY_TO_SET}_DIR "" CACHE PATH "The directory containing ${LIB_NAME} shared library") - if ("${PROPERTY_TO_SET}" STREQUAL "LIBRARY") - list (APPEND 3RDPARTY_NO_LIBS 3RDPARTY_${LIB_NAME}_${PROPERTY_TO_SET}_DIR) + separate_arguments (CSF_TBB) + foreach (LIB IN LISTS CSF_TBB) + string(TOLOWER "${LIB}" LIB_LOWER) + string(TOUPPER "${LIB}" LIB_UPPER) + + # Achive *.lib files and directory containing it. + get_target_property (TBB_LIB_FILE "TBB::${LIB_LOWER}" IMPORTED_IMPLIB_RELEASE) + # Reserve cache variable for *.lib. + if (NOT DEFINED 3RDPARTY_${LIB_UPPER}_LIBRARY) + set (3RDPARTY_${LIB_UPPER}_LIBRARY "" CACHE FILEPATH "${LIB_UPPER} library (*.lib)") + endif() + # Reserve cache variable for directory containing *.lib file. + if (NOT DEFINED 3RDPARTY_${LIB_UPPER}_LIBRARY_DIR) + set (3RDPARTY_${LIB_UPPER}_LIBRARY_DIR "" CACHE PATH "The directory containing ${LIB_UPPER} library (*.lib)") + endif() + if (EXISTS "${TBB_LIB_FILE}") + set (3RDPARTY_${LIB_UPPER}_LIBRARY + "${TBB_LIB_FILE}" + CACHE FILEPATH + "${LIB_UPPER} library (*.lib)" + FORCE) + get_filename_component (TBB_LIB_FILE_DIRECTORY "${TBB_LIB_FILE}" DIRECTORY) + set (3RDPARTY_${LIB_UPPER}_LIBRARY_DIR + "${TBB_LIB_FILE_DIRECTORY}" + CACHE PATH + "The directory containing ${LIB_UPPER} library (*.lib)" + FORCE) + list (APPEND 3RDPARTY_LIBRARY_DIRS "${3RDPARTY_${LIB_UPPER}_LIBRARY_DIR}") + else() + list (APPEND 3RDPARTY_NO_LIBS 3RDPARTY_${LIB_UPPER}_LIBRARY_DIR) + endif() + + # Achive *.dll files and directory containing it. + get_target_property (TBB_DLL_FILE "TBB::${LIB_LOWER}" IMPORTED_LOCATION_RELEASE) + # Reserve cache variable for *.dll. + if (NOT DEFINED 3RDPARTY_${LIB_UPPER}_DLL) + set (3RDPARTY_${LIB_UPPER}_DLL "" CACHE FILEPATH "${LIB_UPPER} library (*.dll)") + endif() + # Reserve cache variable for directory containing *.dll file. + if (NOT DEFINED 3RDPARTY_${LIB_UPPER}_DLL_DIR) + set (3RDPARTY_${LIB_UPPER}_DLL_DIR "" CACHE PATH "The directory containing ${LIB_UPPER} library (*.dll)") + endif() + if (EXISTS "${TBB_DLL_FILE}") + set (3RDPARTY_${LIB_UPPER}_DLL + "${TBB_DLL_FILE}" + CACHE FILEPATH + "${LIB_UPPER} library (*.dll)" + FORCE) + get_filename_component (TBB_DLL_FILE_DIRECTORY "${TBB_DLL_FILE}" DIRECTORY) + set (3RDPARTY_${LIB_UPPER}_DLL_DIR + "${TBB_DLL_FILE_DIRECTORY}" + CACHE PATH + "The directory containing ${LIB_UPPER} library (*.dll)" + FORCE) + list (APPEND 3RDPARTY_DLL_DIRS "${3RDPARTY_${LIB_UPPER}_DLL_DIR}") + else() + list (APPEND 3RDPARTY_NO_DLLS 3RDPARTY_${LIB_UPPER}_DLL_DIR) + endif() + + # install *.dll (tbb & tbbmalloc) + if (INSTALL_TBB) + OCCT_MAKE_OS_WITH_BITNESS() + OCCT_MAKE_COMPILER_SHORT_NAME() + + if (SINGLE_GENERATOR) + install (FILES ${3RDPARTY_${LIB_UPPER}_DLL} DESTINATION "${INSTALL_DIR_BIN}") + else() + install (FILES ${3RDPARTY_${LIB_UPPER}_DLL} CONFIGURATIONS Release DESTINATION "${INSTALL_DIR_BIN}") + install (FILES ${3RDPARTY_${LIB_UPPER}_DLL} CONFIGURATIONS RelWithDebInfo DESTINATION "${INSTALL_DIR_BIN}i") + install (FILES ${3RDPARTY_${LIB_UPPER}_DLL} CONFIGURATIONS Debug DESTINATION "${INSTALL_DIR_BIN}d") + endif() + endif() + mark_as_advanced (3RDPARTY_${LIB_UPPER}_LIBRARY 3RDPARTY_${LIB_UPPER}_DLL) + endforeach() + if (INSTALL_TBB) + set (USED_3RDPARTY_TBB_DIR "") else() - list (APPEND 3RDPARTY_NO_DLLS 3RDPARTY_${LIB_NAME}_${PROPERTY_TO_SET}_DIR) + # the *.dll/*.so* directory for using by the executable + set (USED_3RDPARTY_TBB_DIR ${3RDPARTY_TBB_DLL_DIR}) endif() else() - set (3RDPARTY_${LIB_NAME}_${PROPERTY_TO_SET} "${FILE_DIR}/${FILE_NAME}" CACHE FILEPATH "${LIB_NAME} library" FORCE) - set (3RDPARTY_${LIB_NAME}_${PROPERTY_TO_SET}_DIR "${FILE_DIR}" CACHE PATH "The directory containing ${LIB_NAME} shared library") - - if ("${PROPERTY_TO_SET}" STREQUAL "LIBRARY") - list (APPEND 3RDPARTY_LIBRARY_DIRS "${FILE_DIR}") + message (FATAL_ERROR "Installation directory with TBB is not exist.") + endif() +else () + # NOT WIN32 branch + if ((DEFINED 3RDPARTY_DIR) AND (NOT "${3RDPARTY_DIR}" STREQUAL "") AND (EXISTS "${3RDPARTY_DIR}")) + # Here, we have correct 3RDPARTY_DIR. + # Trying to specify TBB folder in connection with 3RDPARTY_DIR + if (("${3RDPARTY_TBB_DIR}" STREQUAL "") OR (NOT EXISTS "${3RDPARTY_TBB_DIR}")) + FIND_PRODUCT_DIR ("${3RDPARTY_DIR}" TBB TBB_DIR_NAME) + if (TBB_DIR_NAME) + set (3RDPARTY_TBB_DIR "${3RDPARTY_DIR}/${TBB_DIR_NAME}" CACHE PATH "The directory containing tbb" FORCE) + endif() + endif() + if ((NOT "${3RDPARTY_TBB_DIR}" STREQUAL "") AND (EXISTS "${3RDPARTY_TBB_DIR}")) + # Find TBB 2021.5 in existing directory. + find_package ( + TBB 2021.5 + PATHS "${3RDPARTY_TBB_DIR}" NO_DEFAULT_PATH + REQUIRED + CONFIG) else() - list (APPEND 3RDPARTY_DLL_DIRS "${FILE_DIR}") + # Find TBB 2021.5 in system directory. + find_package ( + TBB 2021.5 + REQUIRED + CONFIG) endif() + else() + # Find TBB 2021.5 in system directory. + find_package ( + TBB 2021.5 + REQUIRED + CONFIG) endif() -endmacro() - -# TARGET_NAME - is target name from oneTBB cmake file -# it is either "TBB::tbb", or "TBB::tbbmalloc" -# LIB_NAME_UC - is library id (TBB or TBBMALLOC) -macro (LIN_TBB_PARSE TARGET_NAME LIB_NAME) - set (FILE_NAME "") - set (FILE_PATH "") - set (FILE_DIR "") - - get_target_property (FILE_NAME "${TARGET_NAME}" IMPORTED_LOCATION_RELEASE) - - # acquire full path - TBB_FILE_NAME_TO_FILEPATH("${FILE_NAME}" FILE_PATH) - - get_filename_component (FILE_NAME "${FILE_PATH}" NAME) - get_filename_component (FILE_DIR "${FILE_PATH}" DIRECTORY) + # TBB has been configured (in other case FATAL_ERROR occures). - if (NOT EXISTS "${FILE_DIR}/${FILE_NAME}") - set (3RDPARTY_${LIB_NAME}_LIBRARY "" CACHE FILEPATH "${LIB_NAME} library" FORCE) - set (3RDPARTY_${LIB_NAME}_LIBRARY_DIR "" CACHE PATH "The directory containing ${LIB_NAME} shared library") - - list (APPEND 3RDPARTY_NO_LIBS 3RDPARTY_${LIB_NAME}_LIBRARY_DIR) + # Achive include directory. + get_target_property (TBB_INCLUDE_DIR TBB::tbb INTERFACE_INCLUDE_DIRECTORIES) + if (NOT DEFINED 3RDPARTY_TBB_INCLUDE_DIR) + set (3RDPARTY_TBB_INCLUDE_DIR "" CACHE PATH "The directory containing headers of the TBB") + endif() + if (EXISTS "${TBB_INCLUDE_DIR}") + set (3RDPARTY_TBB_INCLUDE_DIR "${TBB_INCLUDE_DIR}" CACHE PATH "The directory containing headers of the TBB" FORCE) + list (APPEND 3RDPARTY_INCLUDE_DIRS "${3RDPARTY_TBB_INCLUDE_DIR}") else() - set (3RDPARTY_${LIB_NAME}_LIBRARY "${FILE_DIR}/${FILE_NAME}" CACHE FILEPATH "${LIB_NAME} library" FORCE) - set (3RDPARTY_${LIB_NAME}_LIBRARY_DIR "${FILE_DIR}" CACHE PATH "The directory containing ${LIB_NAME} shared library") - - list (APPEND 3RDPARTY_LIBRARY_DIRS "${3RDPARTY_${LIB_NAME}_LIBRARY_DIR}") + list (APPEND 3RDPARTY_NOT_INCLUDED 3RDPARTY_TBB_INCLUDE_DIR) endif() -endmacro() - -if (WIN32) - # Here we should set: - # - 3RDPARTY_*_LIBRARY - # - 3RDPARTY_*_LIBRARY_DIR - # - 3RDPARTY_*_DLL - # - 3RDPARTY_*_DLL_DIR - # where * - is TBB or TBBMALLOC separate_arguments (CSF_TBB) foreach (LIB IN LISTS CSF_TBB) string(TOLOWER "${LIB}" LIB_LOWER) string(TOUPPER "${LIB}" LIB_UPPER) - WIN_TBB_PARSE("TBB::${LIB_LOWER}" "${LIB_UPPER}" "LIBRARY") - WIN_TBB_PARSE("TBB::${LIB_LOWER}" "${LIB_UPPER}" "DLL") - endforeach() -else() - # Here we should set: - # - 3RDPARTY_*_LIBRARY - # - 3RDPARTY_*_LIBRARY_DIR - - separate_arguments (CSF_TBB) - foreach (LIB IN LISTS CSF_TBB) - string(TOLOWER "${LIB}" LIB_LOWER) - string(TOUPPER "${LIB}" LIB_UPPER) - LIN_TBB_PARSE("TBB::${LIB_LOWER}" "${LIB_UPPER}") - endforeach() -endif() -# install tbb/tbbmalloc -if (INSTALL_TBB) - OCCT_MAKE_OS_WITH_BITNESS() - OCCT_MAKE_COMPILER_SHORT_NAME() - - if (WIN32) - if (SINGLE_GENERATOR) - foreach (LIB IN LISTS CSF_TBB) - string(TOUPPER "${LIB}" LIB_UPPER) - install (FILES ${3RDPARTY_${LIB_UPPER}_DLL} DESTINATION "${INSTALL_DIR_BIN}") - endforeach() + # Achive *.so files and directory containing it. + get_target_property (TBB_SO_FILE "TBB::${LIB_LOWER}" IMPORTED_LOCATION_RELEASE) + # Reserve cache variable for *.so. + if (NOT DEFINED 3RDPARTY_${LIB_UPPER}_LIBRARY) + set (3RDPARTY_${LIB_UPPER}_LIBRARY "" CACHE FILEPATH "${LIB_UPPER} library (*.so)") + endif() + # Reserve cache variable for directory containing *.so file. + if (NOT DEFINED 3RDPARTY_${LIB_UPPER}_LIBRARY_DIR) + set (3RDPARTY_${LIB_UPPER}_LIBRARY_DIR "" CACHE PATH "The directory containing ${LIB_UPPER} library (*.so)") + endif() + if (EXISTS "${TBB_SO_FILE}") + set (3RDPARTY_${LIB_UPPER}_LIBRARY + "${TBB_SO_FILE}" + CACHE FILEPATH + "${LIB_UPPER} library (*.so)" + FORCE) + get_filename_component (TBB_SO_FILE_DIRECTORY "${TBB_SO_FILE}" DIRECTORY) + set (3RDPARTY_${LIB_UPPER}_LIBRARY_DIR + "${TBB_SO_FILE_DIRECTORY}" + CACHE PATH + "The directory containing ${LIB_UPPER} library (*.so)" + FORCE) + list (APPEND 3RDPARTY_LIBRARY_DIRS "${3RDPARTY_${LIB_UPPER}_LIBRARY_DIR}") else() - foreach (LIB IN LISTS CSF_TBB) - string(TOUPPER "${LIB}" LIB_UPPER) - install (FILES ${3RDPARTY_${LIB_UPPER}_DLL} CONFIGURATIONS Release DESTINATION "${INSTALL_DIR_BIN}") - install (FILES ${3RDPARTY_${LIB_UPPER}_DLL} CONFIGURATIONS RelWithDebInfo DESTINATION "${INSTALL_DIR_BIN}i") - install (FILES ${3RDPARTY_${LIB_UPPER}_DLL} CONFIGURATIONS Debug DESTINATION "${INSTALL_DIR_BIN}d") - endforeach() + list (APPEND 3RDPARTY_NO_LIBS 3RDPARTY_${LIB_UPPER}_LIBRARY_DIR) endif() - else() - if (SINGLE_GENERATOR) - foreach (LIB IN LISTS CSF_TBB) - string(TOUPPER "${LIB}" LIB_UPPER) + + # install *.so* (tbb & tbbmalloc) + if (INSTALL_TBB) + OCCT_MAKE_OS_WITH_BITNESS() + OCCT_MAKE_COMPILER_SHORT_NAME() + + if (SINGLE_GENERATOR) install (FILES ${3RDPARTY_${LIB_UPPER}_LIBRARY} DESTINATION "${INSTALL_DIR_LIB}") - endforeach() - else() - foreach (LIB IN LISTS CSF_TBB) - string(TOUPPER "${LIB}" LIB_UPPER) + else() install (FILES ${3RDPARTY_${LIB_UPPER}_LIBRARY} CONFIGURATIONS Release DESTINATION "${INSTALL_DIR_LIB}") install (FILES ${3RDPARTY_${LIB_UPPER}_LIBRARY} CONFIGURATIONS RelWithDebInfo DESTINATION "${INSTALL_DIR_LIB}i") install (FILES ${3RDPARTY_${LIB_UPPER}_LIBRARY} CONFIGURATIONS Debug DESTINATION "${INSTALL_DIR_LIB}d") - endforeach() + endif() endif() - endif() -endif() -foreach (LIB IN LISTS CSF_TBB) - string(TOUPPER "${LIB}" LIB_UPPER) - mark_as_advanced (3RDPARTY_${LIB_UPPER}_LIBRARY 3RDPARTY_${LIB_UPPER}_DLL) -endforeach() - -if (INSTALL_TBB) - set (USED_3RDPARTY_TBB_DIR "") -else() - # the library directory for using by the executable - if (WIN32) - set (USED_3RDPARTY_TBB_DIR ${3RDPARTY_TBB_DLL_DIR}) + endforeach() + if (INSTALL_TBB) + set (USED_3RDPARTY_TBB_DIR "") else() + # the *.so* directory for using by the executable set (USED_3RDPARTY_TBB_DIR ${3RDPARTY_TBB_LIBRARY_DIR}) endif() endif() From cb77bfc4f0181e4a8ab503933bd83510fc345eb1 Mon Sep 17 00:00:00 2001 From: ddzama Date: Tue, 4 Oct 2022 13:40:57 +0300 Subject: [PATCH 394/639] 0033155: Regression [0033117] Coding, relocation R_X86_64_PC32 against symbol `TT_RunIns' can not be used. After emploing intel oneTBB of version 2021.5 on NEXT platforms arises error on OCC Pr.: ` */ld: */libfreetype.a(truetype.o): relocation R_X86_64_PC32 against symbol `TT_RunIns' can not be used when making a shared object; recompile with -fPIC */ld: final link failed: bad value ` Proposed solution: linking with shared object of libfreetype, rather than with archive library. Despite that error occurred only in OCC Pr., it is worth to accept changes for OCCT too. --- adm/cmake/freetype.cmake | 31 ++++++++++++++++++++++++++----- 1 file changed, 26 insertions(+), 5 deletions(-) diff --git a/adm/cmake/freetype.cmake b/adm/cmake/freetype.cmake index 7f6f950b24..8563c24f28 100644 --- a/adm/cmake/freetype.cmake +++ b/adm/cmake/freetype.cmake @@ -110,8 +110,19 @@ if (IS_BUILTIN_SEARCH_REQUIRED) set (ENV{FREETYPE_DIR} "${3RDPARTY_FREETYPE_DIR}") endif() + unset (FREETYPE_LIBRARY_RELEASE) find_package(Freetype) + # Only for UNIX (not APPLE) + if ((NOT WIN32) AND (NOT APPLE)) + # To avoid linker error on Ubuntu 18.04 and others linux distributives we should + # link with freetype library, compiled as Position Independent Code (PIC), + # for example, with shared object. + if ((DEFINED FREETYPE_LIBRARY_RELEASE) AND (NOT "${FREETYPE_LIBRARY_RELEASE}" STREQUAL "") AND (EXISTS "${FREETYPE_LIBRARY_RELEASE}")) + string (REPLACE "\.a" "\.so" FREETYPE_LIBRARY_RELEASE "${FREETYPE_LIBRARY_RELEASE}") + endif() + endif() + # restore ENV{FREETYPE_DIR} if (3RDPARTY_FREETYPE_DIR AND EXISTS "${3RDPARTY_FREETYPE_DIR}") set (ENV{FREETYPE_DIR} ${CACHED_FREETYPE_DIR}) @@ -122,7 +133,7 @@ if (IS_BUILTIN_SEARCH_REQUIRED) CHECK_PATH_FOR_CONSISTENCY (3RDPARTY_FREETYPE_DIR FREETYPE_INCLUDE_DIR_ft2build FILEPATH "The directory containing ft2build.h header") CHECK_PATH_FOR_CONSISTENCY (3RDPARTY_FREETYPE_DIR FREETYPE_INCLUDE_DIR_freetype2 FILEPATH "The directory containing ftheader.h header") if (BUILD_SHARED_LIBS) - CHECK_PATH_FOR_CONSISTENCY (3RDPARTY_FREETYPE_DIR FREETYPE_LIBRARY FILEPATH "freetype library") + CHECK_PATH_FOR_CONSISTENCY (3RDPARTY_FREETYPE_DIR FREETYPE_LIBRARY_RELEASE FILEPATH "freetype library") endif() endif() @@ -141,8 +152,8 @@ if (IS_BUILTIN_SEARCH_REQUIRED) if (BUILD_SHARED_LIBS) if (NOT 3RDPARTY_FREETYPE_LIBRARY OR NOT EXISTS "${3RDPARTY_FREETYPE_LIBRARY}") - if (FREETYPE_LIBRARY AND EXISTS "${FREETYPE_LIBRARY}") - set (3RDPARTY_FREETYPE_LIBRARY "${FREETYPE_LIBRARY}" CACHE FILEPATH "The path to freetype library" FORCE) + if (FREETYPE_LIBRARY_RELEASE AND EXISTS "${FREETYPE_LIBRARY_RELEASE}") + set (3RDPARTY_FREETYPE_LIBRARY "${FREETYPE_LIBRARY_RELEASE}" CACHE FILEPATH "The path to freetype library" FORCE) endif() endif() @@ -220,7 +231,7 @@ endif() # freetype library #if (BUILD_SHARED_LIBS) if (NOT 3RDPARTY_FREETYPE_LIBRARY OR NOT EXISTS "${3RDPARTY_FREETYPE_LIBRARY}") - set (CMAKE_FIND_LIBRARY_SUFFIXES .lib .so .dylib .a) + set (CMAKE_FIND_LIBRARY_SUFFIXES .lib .so .dylib) set (FREETYPE_PATH_SUFFIXES lib) if (ANDROID) @@ -242,6 +253,16 @@ endif() CMAKE_FIND_ROOT_PATH_BOTH) endif() + # Only for UNIX (not APPLE) + if ((NOT WIN32) AND (NOT APPLE)) + # To avoid linker error on Ubuntu 18.04 and some others linux distributives we should + # link with freetype library, compiled as Position Independent Code (PIC), + # for example, with shared object. + if ((DEFINED 3RDPARTY_FREETYPE_LIBRARY) AND (NOT "${3RDPARTY_FREETYPE_LIBRARY}" STREQUAL "") AND (EXISTS "${3RDPARTY_FREETYPE_LIBRARY}")) + string (REPLACE "\.a" "\.so" 3RDPARTY_FREETYPE_LIBRARY "${3RDPARTY_FREETYPE_LIBRARY}") + endif() + endif() + if (3RDPARTY_FREETYPE_LIBRARY AND EXISTS "${3RDPARTY_FREETYPE_LIBRARY}") get_filename_component (3RDPARTY_FREETYPE_LIBRARY_DIR "${3RDPARTY_FREETYPE_LIBRARY}" PATH) set (3RDPARTY_FREETYPE_LIBRARY_DIR "${3RDPARTY_FREETYPE_LIBRARY_DIR}" CACHE PATH "The directory containing freetype library" FORCE) @@ -350,7 +371,7 @@ endif() # unset all redundant variables OCCT_CHECK_AND_UNSET(FREETYPE_INCLUDE_DIR_ft2build) OCCT_CHECK_AND_UNSET(FREETYPE_INCLUDE_DIR_freetype2) -OCCT_CHECK_AND_UNSET(FREETYPE_LIBRARY) +OCCT_CHECK_AND_UNSET(FREETYPE_LIBRARY_RELEASE) if (BUILD_SHARED_LIBS) mark_as_advanced (3RDPARTY_FREETYPE_LIBRARY 3RDPARTY_FREETYPE_DLL) From 3536158f113a003f983ad18556369e38b9297eaa Mon Sep 17 00:00:00 2001 From: ddzama Date: Thu, 6 Oct 2022 13:29:08 +0300 Subject: [PATCH 395/639] 0033153: Configuration: Linker error when building from source for VS2022 x64. With enabled flag BUILD_USE_PCH we get an error of compilation of TKService: 1>Image_VideoRecorder.obj : error LNK2019: unresolved external symbol "int __cdecl av_strerror(int,char *,unsigned __int64)" (?av_strerror@@YAHHPEAD_K@Z) referenced in function "protected: class TCollection_AsciiString __cdecl Image_VideoRecorder::formatAvError(int)const " (?formatAvError@Image_VideoRecorder@@IEBA?AVTCollection_AsciiString@@H@Z) 1>Media_FormatContext.obj : error LNK2001: unresolved external symbol "int __cdecl av_strerror(int,char *,unsigned __int64)" (?av_strerror@@YAHHPEAD_K@Z) And many other similar errors. Similar errors occures in some other projects too: TKService TKOpenGl TKOpenGles TKXCAF TKXDEDRAW TKDFBrowser TKMessageModel TKMessageView TKShapeView TKTInspector TKTreeModel TKVInspector TKView Proposed solution: turn off cotire from targets, whose compilation cause error while applying cotire tool. In this ticket migration to cotire 1.8.1 (from 1.7.9) is done. COTIRE_PREFIX_HEADER_IGNORE_PATH does not apply here, because its employing causes some errors in 3rdparty libraries (for example, in TKService project). Projects (TKDFBrowser TKMessageModel TKMessageView TKShapeView TKTInspector TKTreeModel TKVInspector TKView) which use Qt may be proceeded by cotire tool, but after fixing a bug of cotire: https://gitlab.kitware.com/cmake/cmake/-/issues/18353 0033153: Fix cotire bug, causing impossibility of compilation targets depending from Qt. Solution is proposed in: https://gitlab.kitware.com/cmake/cmake/-/issues/18353 --- adm/cmake/cotire.cmake | 477 ++++++++++++++++++++-------- adm/cmake/occt_toolkit.cmake | 24 ++ src/TKOpenGl/CMakeLists.txt | 2 + src/TKOpenGles/CMakeLists.txt | 2 + src/TKService/CMakeLists.txt | 2 + src/TKXCAF/CMakeLists.txt | 2 + src/TKXDEDRAW/CMakeLists.txt | 2 + tools/TKDFBrowser/CMakeLists.txt | 2 + tools/TKMessageModel/CMakeLists.txt | 2 + tools/TKMessageView/CMakeLists.txt | 2 + tools/TKShapeView/CMakeLists.txt | 2 + tools/TKTInspector/CMakeLists.txt | 2 + tools/TKTreeModel/CMakeLists.txt | 2 + tools/TKVInspector/CMakeLists.txt | 2 + tools/TKView/CMakeLists.txt | 2 + 15 files changed, 387 insertions(+), 140 deletions(-) diff --git a/adm/cmake/cotire.cmake b/adm/cmake/cotire.cmake index b8b98a7119..acdca71a9f 100644 --- a/adm/cmake/cotire.cmake +++ b/adm/cmake/cotire.cmake @@ -3,7 +3,7 @@ # See the cotire manual for usage hints. # #============================================================================= -# Copyright 2012-2016 Sascha Kratky +# Copyright 2012-2018 Sascha Kratky # # Permission is hereby granted, free of charge, to any person # obtaining a copy of this software and associated documentation @@ -32,16 +32,18 @@ if(__COTIRE_INCLUDED) endif() set(__COTIRE_INCLUDED TRUE) -# Caution! Be careful, when increase minimal cmake version: -# using of newer version may leads (by default) to applying -# of some new policies. It may break compilation. -# For canceling of applying new policies use: -# cmake_policy(PUSH) before `cmake_minimum_required` -# and cmake_policy(POP) after. -cmake_minimum_required(VERSION 3.1 FATAL_ERROR) +# call cmake_minimum_required, but prevent modification of the CMake policy stack in include mode +# cmake_minimum_required also sets the policy version as a side effect, which we have to avoid +if (NOT CMAKE_SCRIPT_MODE_FILE) + cmake_policy(PUSH) +endif() +cmake_minimum_required(VERSION 2.8.12) +if (NOT CMAKE_SCRIPT_MODE_FILE) + cmake_policy(POP) +endif() set (COTIRE_CMAKE_MODULE_FILE "${CMAKE_CURRENT_LIST_FILE}") -set (COTIRE_CMAKE_MODULE_VERSION "1.7.9") +set (COTIRE_CMAKE_MODULE_VERSION "1.8.1") # activate select policies if (POLICY CMP0025) @@ -104,6 +106,11 @@ if (POLICY CMP0054) cmake_policy(SET CMP0054 NEW) endif() +if (POLICY CMP0055) + # strict checking for break() command + cmake_policy(SET CMP0055 NEW) +endif() + include(CMakeParseArguments) include(ProcessorCount) @@ -232,7 +239,13 @@ function (cotire_filter_language_source_files _language _target _sourceFilesVar # add to excluded sources, if file has custom compile flags list (APPEND _excludedSourceFiles "${_sourceFile}") else() - list (APPEND _sourceFiles "${_sourceFile}") + get_source_file_property(_sourceCompileOptions "${_sourceFile}" COMPILE_OPTIONS) + if (_sourceCompileOptions) + # add to excluded sources, if file has list of custom compile options + list (APPEND _excludedSourceFiles "${_sourceFile}") + else() + list (APPEND _sourceFiles "${_sourceFile}") + endif() endif() endif() endforeach() @@ -291,7 +304,7 @@ function (cotire_get_source_file_property_values _valuesVar _property) set (${_valuesVar} ${_values} PARENT_SCOPE) endfunction() -function (cotire_resolve_config_properites _configurations _propertiesVar) +function (cotire_resolve_config_properties _configurations _propertiesVar) set (_properties "") foreach (_property ${ARGN}) if ("${_property}" MATCHES "") @@ -307,8 +320,8 @@ function (cotire_resolve_config_properites _configurations _propertiesVar) set (${_propertiesVar} ${_properties} PARENT_SCOPE) endfunction() -function (cotire_copy_set_properites _configurations _type _source _target) - cotire_resolve_config_properites("${_configurations}" _properties ${ARGN}) +function (cotire_copy_set_properties _configurations _type _source _target) + cotire_resolve_config_properties("${_configurations}" _properties ${ARGN}) foreach (_property ${_properties}) get_property(_isSet ${_type} ${_source} PROPERTY ${_property} SET) if (_isSet) @@ -318,13 +331,18 @@ function (cotire_copy_set_properites _configurations _type _source _target) endforeach() endfunction() -function (cotire_get_target_usage_requirements _target _targetRequirementsVar) +function (cotire_get_target_usage_requirements _target _config _targetRequirementsVar) set (_targetRequirements "") get_target_property(_librariesToProcess ${_target} LINK_LIBRARIES) while (_librariesToProcess) # remove from head list (GET _librariesToProcess 0 _library) list (REMOVE_AT _librariesToProcess 0) + if (_library MATCHES "^\\$<\\$:([A-Za-z0-9_:-]+)>$") + set (_library "${CMAKE_MATCH_1}") + elseif (_config STREQUAL "None" AND _library MATCHES "^\\$<\\$:([A-Za-z0-9_:-]+)>$") + set (_library "${CMAKE_MATCH_1}") + endif() if (TARGET ${_library}) list (FIND _targetRequirements ${_library} _index) if (_index LESS 0) @@ -439,7 +457,7 @@ function (cotire_get_target_compile_flags _config _language _target _flagsVar) # interface compile options from linked library targets if (_target) set (_linkedTargets "") - cotire_get_target_usage_requirements(${_target} _linkedTargets) + cotire_get_target_usage_requirements(${_target} ${_config} _linkedTargets) foreach (_linkedTarget ${_linkedTargets}) get_target_property(_targetOptions ${_linkedTarget} INTERFACE_COMPILE_OPTIONS) if (_targetOptions) @@ -571,7 +589,7 @@ function (cotire_get_target_include_directories _config _language _target _inclu # interface include directories from linked library targets if (_target) set (_linkedTargets "") - cotire_get_target_usage_requirements(${_target} _linkedTargets) + cotire_get_target_usage_requirements(${_target} ${_config} _linkedTargets) foreach (_linkedTarget ${_linkedTargets}) get_target_property(_linkedTargetType ${_linkedTarget} TYPE) if (CMAKE_INCLUDE_CURRENT_DIR_IN_INTERFACE AND NOT CMAKE_VERSION VERSION_LESS "3.4.0" AND @@ -625,7 +643,7 @@ function (cotire_get_target_include_directories _config _language _target _inclu if (CMAKE_${_language}_IMPLICIT_INCLUDE_DIRECTORIES) list (REMOVE_ITEM _includeDirs ${CMAKE_${_language}_IMPLICIT_INCLUDE_DIRECTORIES}) endif() - if (WIN32) + if (WIN32 AND NOT MINGW) # convert Windows paths in include directories to CMake paths if (_includeDirs) set (_paths "") @@ -701,7 +719,7 @@ function (cotire_get_target_compile_definitions _config _language _target _defin endif() # interface compile definitions from linked library targets set (_linkedTargets "") - cotire_get_target_usage_requirements(${_target} _linkedTargets) + cotire_get_target_usage_requirements(${_target} ${_config} _linkedTargets) foreach (_linkedTarget ${_linkedTargets}) get_target_property(_definitions ${_linkedTarget} INTERFACE_COMPILE_DEFINITIONS) if (_definitions) @@ -709,7 +727,7 @@ function (cotire_get_target_compile_definitions _config _language _target _defin endif() endforeach() # parse additional compile definitions from target compile flags - # and don't look at directory compile definitions, which we already handled + # and do not look at directory compile definitions, which we already handled set (_targetFlags "") cotire_get_target_compile_flags("${_config}" "${_language}" "${_target}" _targetFlags) cotire_filter_compile_flags("${_language}" "D" _definitions _ignore ${_targetFlags}) @@ -857,6 +875,9 @@ macro (cotire_set_cmd_to_prologue _cmdVar) list (APPEND ${_cmdVar} "--warn-uninitialized") endif() list (APPEND ${_cmdVar} "-DCOTIRE_BUILD_TYPE:STRING=$") + if (XCODE) + list (APPEND ${_cmdVar} "-DXCODE:BOOL=TRUE") + endif() if (COTIRE_VERBOSE) list (APPEND ${_cmdVar} "-DCOTIRE_VERBOSE:BOOL=ON") elseif("${CMAKE_GENERATOR}" MATCHES "Makefiles") @@ -874,6 +895,9 @@ function (cotire_init_compile_cmd _cmdVar _language _compilerLauncher _compilerE if (NOT _compilerArg1) set (_compilerArg1 ${CMAKE_${_language}_COMPILER_ARG1}) endif() + if (WIN32) + file (TO_NATIVE_PATH "${_compilerExe}" _compilerExe) + endif() string (STRIP "${_compilerArg1}" _compilerArg1) if ("${CMAKE_GENERATOR}" MATCHES "Make|Ninja") # compiler launcher is only supported for Makefile and Ninja @@ -900,16 +924,16 @@ function (cotire_add_includes_to_cmd _cmdVar _language _includesVar _systemInclu foreach (_include ${_includeDirs}) if (WIN32 AND CMAKE_${_language}_COMPILER_ID MATCHES "MSVC|Intel") file (TO_NATIVE_PATH "${_include}" _include) - list (APPEND ${_cmdVar} "${CMAKE_INCLUDE_FLAG_${_language}}${CMAKE_INCLUDE_FLAG_${_language}_SEP}${_include}") + list (APPEND ${_cmdVar} "${CMAKE_INCLUDE_FLAG_${_language}}${CMAKE_INCLUDE_FLAG_SEP_${_language}}${_include}") else() set (_index -1) if ("${CMAKE_INCLUDE_SYSTEM_FLAG_${_language}}" MATCHES ".+") list (FIND ${_systemIncludesVar} "${_include}" _index) endif() if (_index GREATER -1) - list (APPEND ${_cmdVar} "${CMAKE_INCLUDE_SYSTEM_FLAG_${_language}}${_include}") + list (APPEND ${_cmdVar} "${CMAKE_INCLUDE_SYSTEM_FLAG_${_language}}${CMAKE_INCLUDE_FLAG_SEP_${_language}}${_include}") else() - list (APPEND ${_cmdVar} "${CMAKE_INCLUDE_FLAG_${_language}}${CMAKE_INCLUDE_FLAG_${_language}_SEP}${_include}") + list (APPEND ${_cmdVar} "${CMAKE_INCLUDE_FLAG_${_language}}${CMAKE_INCLUDE_FLAG_SEP_${_language}}${_include}") endif() endif() endforeach() @@ -1044,10 +1068,10 @@ macro (cotire_check_ignore_header_file_path _headerFile _headerIsIgnoredVar) set (${_headerIsIgnoredVar} TRUE) elseif (IS_DIRECTORY "${_headerFile}") set (${_headerIsIgnoredVar} TRUE) - elseif ("${_headerFile}" MATCHES "\\.\\.|[_-]fixed" AND "${_headerFile}" MATCHES "\\.h$") - # heuristic: ignore C headers with embedded parent directory references or "-fixed" or "_fixed" in path + elseif ("${_headerFile}" MATCHES "\\.\\.|[_-]fixed") + # heuristic: ignore headers with embedded parent directory references or "-fixed" or "_fixed" in path # these often stem from using GCC #include_next tricks, which may break the precompiled header compilation - # with the error message "error: no include path in which to search for header.h" + # with the error message "error: no include path in which to search for header" set (${_headerIsIgnoredVar} TRUE) else() set (${_headerIsIgnoredVar} FALSE) @@ -1068,12 +1092,11 @@ endmacro() macro (cotire_parse_line _line _headerFileVar _headerDepthVar) if (MSVC) - # cl.exe /showIncludes output looks different depending on the language pack used, e.g.: + # cl.exe /showIncludes produces different output, depending on the language pack used, e.g.: # English: "Note: including file: C:\directory\file" # German: "Hinweis: Einlesen der Datei: C:\directory\file" # We use a very general regular expression, relying on the presence of the : characters if (_line MATCHES "( +)([a-zA-Z]:[^:]+)$") - # Visual Studio compiler output string (LENGTH "${CMAKE_MATCH_1}" ${_headerDepthVar}) get_filename_component(${_headerFileVar} "${CMAKE_MATCH_2}" ABSOLUTE) else() @@ -1231,11 +1254,19 @@ function (cotire_scan_includes _includesVar) set (${_includesVar} "" PARENT_SCOPE) return() endif() - list (APPEND _cmd ${_existingSourceFiles}) + # add source files to be scanned + if (WIN32) + foreach (_sourceFile ${_existingSourceFiles}) + file (TO_NATIVE_PATH "${_sourceFile}" _sourceFileNative) + list (APPEND _cmd "${_sourceFileNative}") + endforeach() + else() + list (APPEND _cmd ${_existingSourceFiles}) + endif() if (COTIRE_VERBOSE) message (STATUS "execute_process: ${_cmd}") endif() - if (_option_COMPILER_ID MATCHES "MSVC") + if (MSVC_IDE OR _option_COMPILER_ID MATCHES "MSVC") # cl.exe messes with the output streams unless the environment variable VS_UNICODE_OUTPUT is cleared unset (ENV{VS_UNICODE_OUTPUT}) endif() @@ -1471,11 +1502,16 @@ function (cotire_generate_prefix_header _prefixFile) if (_unparsedLines) if (COTIRE_VERBOSE OR _scanResult OR NOT _selectedHeaders) list (LENGTH _unparsedLines _skippedLineCount) - message (STATUS "${_skippedLineCount} line(s) skipped, see ${_unparsedLinesFile}") + if (WIN32) + file (TO_NATIVE_PATH "${_unparsedLinesFile}" _unparsedLinesLogPath) + else() + set (_unparsedLinesLogPath "${_unparsedLinesFile}") + endif() + message (STATUS "${_skippedLineCount} line(s) skipped, see ${_unparsedLinesLogPath}") endif() string (REPLACE ";" "\n" _unparsedLines "${_unparsedLines}") endif() - file (WRITE "${_unparsedLinesFile}" "${_unparsedLines}") + file (WRITE "${_unparsedLinesFile}" "${_unparsedLines}\n") endfunction() function (cotire_add_makedep_flags _language _compilerID _compilerVersion _flagsVar) @@ -1505,7 +1541,7 @@ function (cotire_add_makedep_flags _language _compilerID _compilerVersion _flags # append to list list (APPEND _flags -H -E) if (NOT "${_compilerVersion}" VERSION_LESS "4.3.0") - list (APPEND _flags "-fdirectives-only") + list (APPEND _flags -fdirectives-only) endif() else() # return as a flag string @@ -1515,16 +1551,36 @@ function (cotire_add_makedep_flags _language _compilerID _compilerVersion _flags endif() endif() elseif (_compilerID MATCHES "Clang") - # Clang options used - # -H print the name of each header file used - # -E invoke preprocessor - # -fno-color-diagnostics don't prints diagnostics in color - if (_flags) - # append to list - list (APPEND _flags -H -E -fno-color-diagnostics) - else() - # return as a flag string - set (_flags "-H -E -fno-color-diagnostics") + if (UNIX) + # Clang options used + # -H print the name of each header file used + # -E invoke preprocessor + # -fno-color-diagnostics do not print diagnostics in color + # -Eonly just run preprocessor, no output + if (_flags) + # append to list + list (APPEND _flags -H -E -fno-color-diagnostics -Xclang -Eonly) + else() + # return as a flag string + set (_flags "-H -E -fno-color-diagnostics -Xclang -Eonly") + endif() + elseif (WIN32) + # Clang-cl.exe options used + # /TC treat all files named on the command line as C source files + # /TP treat all files named on the command line as C++ source files + # /EP preprocess to stdout without #line directives + # -H print the name of each header file used + # -fno-color-diagnostics do not print diagnostics in color + # -Eonly just run preprocessor, no output + set (_sourceFileTypeC "/TC") + set (_sourceFileTypeCXX "/TP") + if (_flags) + # append to list + list (APPEND _flags "${_sourceFileType${_language}}" /EP -fno-color-diagnostics -Xclang -H -Xclang -Eonly) + else() + # return as a flag string + set (_flags "${_sourceFileType${_language}} /EP -fno-color-diagnostics -Xclang -H -Xclang -Eonly") + endif() endif() elseif (_compilerID MATCHES "Intel") if (WIN32) @@ -1598,8 +1654,8 @@ function (cotire_add_pch_compilation_flags _language _compilerID _compilerVersio set (_flags "${_flags} /Zm${COTIRE_PCH_MEMORY_SCALING_FACTOR}") endif() endif() - elseif (_compilerID MATCHES "GNU|Clang") - # GCC / Clang options used + elseif (_compilerID MATCHES "GNU") + # GCC options used # -x specify the source language # -c compile but do not link # -o place output in file @@ -1609,11 +1665,55 @@ function (cotire_add_pch_compilation_flags _language _compilerID _compilerVersio set (_xLanguage_CXX "c++-header") if (_flags) # append to list - list (APPEND _flags "-x" "${_xLanguage_${_language}}" "-c" "${_prefixFile}" -o "${_pchFile}") + list (APPEND _flags -x "${_xLanguage_${_language}}" -c "${_prefixFile}" -o "${_pchFile}") else() # return as a flag string set (_flags "-x ${_xLanguage_${_language}} -c \"${_prefixFile}\" -o \"${_pchFile}\"") endif() + elseif (_compilerID MATCHES "Clang") + if (UNIX) + # Clang options used + # -x specify the source language + # -c compile but do not link + # -o place output in file + # -fno-pch-timestamp disable inclusion of timestamp in precompiled headers (clang 4.0.0+) + set (_xLanguage_C "c-header") + set (_xLanguage_CXX "c++-header") + if (_flags) + # append to list + list (APPEND _flags -x "${_xLanguage_${_language}}" -c "${_prefixFile}" -o "${_pchFile}") + if (NOT "${_compilerVersion}" VERSION_LESS "4.0.0") + list (APPEND _flags -Xclang -fno-pch-timestamp) + endif() + else() + # return as a flag string + set (_flags "-x ${_xLanguage_${_language}} -c \"${_prefixFile}\" -o \"${_pchFile}\"") + if (NOT "${_compilerVersion}" VERSION_LESS "4.0.0") + set (_flags "${_flags} -Xclang -fno-pch-timestamp") + endif() + endif() + elseif (WIN32) + file (TO_NATIVE_PATH "${_prefixFile}" _prefixFileNative) + file (TO_NATIVE_PATH "${_pchFile}" _pchFileNative) + file (TO_NATIVE_PATH "${_hostFile}" _hostFileNative) + # Clang-cl.exe options used + # /Yc creates a precompiled header file + # /Fp specifies precompiled header binary file name + # /FI forces inclusion of file + # /Zs syntax check only + # /TC treat all files named on the command line as C source files + # /TP treat all files named on the command line as C++ source files + set (_sourceFileTypeC "/TC") + set (_sourceFileTypeCXX "/TP") + if (_flags) + # append to list + list (APPEND _flags "${_sourceFileType${_language}}" + "/Yc${_prefixFileNative}" "/Fp${_pchFileNative}" "/FI${_prefixFileNative}" /Zs "${_hostFileNative}") + else() + # return as a flag string + set (_flags "/Yc\"${_prefixFileNative}\" /Fp\"${_pchFileNative}\" /FI\"${_prefixFileNative}\"") + endif() + endif() elseif (_compilerID MATCHES "Intel") if (WIN32) file (TO_NATIVE_PATH "${_prefixFile}" _prefixFileNative) @@ -1655,20 +1755,28 @@ function (cotire_add_pch_compilation_flags _language _compilerID _compilerVersio get_filename_component(_pchName "${_pchFile}" NAME) set (_xLanguage_C "c-header") set (_xLanguage_CXX "c++-header") + set (_pchSuppressMessages FALSE) + if ("${CMAKE_${_language}_FLAGS}" MATCHES ".*-Wno-pch-messages.*") + set(_pchSuppressMessages TRUE) + endif() if (_flags) # append to list if ("${_language}" STREQUAL "CXX") list (APPEND _flags -Kc++) endif() - list (APPEND _flags "-include" "${_prefixFile}" "-pch-dir" "${_pchDir}" "-pch-create" "${_pchName}" "-fsyntax-only" "${_hostFile}") + list (APPEND _flags -include "${_prefixFile}" -pch-dir "${_pchDir}" -pch-create "${_pchName}" -fsyntax-only "${_hostFile}") if (NOT "${_compilerVersion}" VERSION_LESS "13.1.0") - list (APPEND _flags "-Wpch-messages") + if (NOT _pchSuppressMessages) + list (APPEND _flags -Wpch-messages) + endif() endif() else() # return as a flag string set (_flags "-include \"${_prefixFile}\" -pch-dir \"${_pchDir}\" -pch-create \"${_pchName}\"") if (NOT "${_compilerVersion}" VERSION_LESS "13.1.0") - set (_flags "${_flags} -Wpch-messages") + if (NOT _pchSuppressMessages) + set (_flags "${_flags} -Wpch-messages") + endif() endif() endif() endif() @@ -1719,23 +1827,48 @@ function (cotire_add_prefix_pch_inclusion_flags _language _compilerID _compilerV # note: ccache requires the -include flag to be used in order to process precompiled header correctly if (_flags) # append to list - list (APPEND _flags "-Winvalid-pch" "-include" "${_prefixFile}") + list (APPEND _flags -Winvalid-pch -include "${_prefixFile}") else() # return as a flag string set (_flags "-Winvalid-pch -include \"${_prefixFile}\"") endif() elseif (_compilerID MATCHES "Clang") - # Clang options used - # -include process include file as the first line of the primary source file - # -include-pch include precompiled header file - # -Qunused-arguments don't emit warning for unused driver arguments - # note: ccache requires the -include flag to be used in order to process precompiled header correctly - if (_flags) - # append to list - list (APPEND _flags "-Qunused-arguments" "-include" "${_prefixFile}") - else() - # return as a flag string - set (_flags "-Qunused-arguments -include \"${_prefixFile}\"") + if (UNIX) + # Clang options used + # -include process include file as the first line of the primary source file + # note: ccache requires the -include flag to be used in order to process precompiled header correctly + if (_flags) + # append to list + list (APPEND _flags -include "${_prefixFile}") + else() + # return as a flag string + set (_flags "-include \"${_prefixFile}\"") + endif() + elseif (WIN32) + file (TO_NATIVE_PATH "${_prefixFile}" _prefixFileNative) + # Clang-cl.exe options used + # /Yu uses a precompiled header file during build + # /Fp specifies precompiled header binary file name + # /FI forces inclusion of file + if (_pchFile) + file (TO_NATIVE_PATH "${_pchFile}" _pchFileNative) + if (_flags) + # append to list + list (APPEND _flags "/Yu${_prefixFileNative}" "/Fp${_pchFileNative}" "/FI${_prefixFileNative}") + else() + # return as a flag string + set (_flags "/Yu\"${_prefixFileNative}\" /Fp\"${_pchFileNative}\" /FI\"${_prefixFileNative}\"") + endif() + else() + # no precompiled header, force inclusion of prefix header + if (_flags) + # append to list + list (APPEND _flags "/FI${_prefixFileNative}") + else() + # return as a flag string + set (_flags "/FI\"${_prefixFileNative}\"") + endif() + endif() endif() elseif (_compilerID MATCHES "Intel") if (WIN32) @@ -1779,24 +1912,32 @@ function (cotire_add_prefix_pch_inclusion_flags _language _compilerID _compilerV if (_pchFile) get_filename_component(_pchDir "${_pchFile}" DIRECTORY) get_filename_component(_pchName "${_pchFile}" NAME) + set (_pchSuppressMessages FALSE) + if ("${CMAKE_${_language}_FLAGS}" MATCHES ".*-Wno-pch-messages.*") + set(_pchSuppressMessages TRUE) + endif() if (_flags) # append to list - list (APPEND _flags "-include" "${_prefixFile}" "-pch-dir" "${_pchDir}" "-pch-use" "${_pchName}") + list (APPEND _flags -include "${_prefixFile}" -pch-dir "${_pchDir}" -pch-use "${_pchName}") if (NOT "${_compilerVersion}" VERSION_LESS "13.1.0") - list (APPEND _flags "-Wpch-messages") + if (NOT _pchSuppressMessages) + list (APPEND _flags -Wpch-messages) + endif() endif() else() # return as a flag string set (_flags "-include \"${_prefixFile}\" -pch-dir \"${_pchDir}\" -pch-use \"${_pchName}\"") if (NOT "${_compilerVersion}" VERSION_LESS "13.1.0") - set (_flags "${_flags} -Wpch-messages") + if (NOT _pchSuppressMessages) + set (_flags "${_flags} -Wpch-messages") + endif() endif() endif() else() # no precompiled header, force inclusion of prefix header if (_flags) # append to list - list (APPEND _flags "-include" "${_prefixFile}") + list (APPEND _flags -include "${_prefixFile}") else() # return as a flag string set (_flags "-include \"${_prefixFile}\"") @@ -1834,9 +1975,17 @@ function (cotire_precompile_prefix_header _prefixFile _pchFile _hostFile) if (COTIRE_VERBOSE) message (STATUS "execute_process: ${_cmd}") endif() - if (_option_COMPILER_ID MATCHES "MSVC") + if (MSVC_IDE OR _option_COMPILER_ID MATCHES "MSVC") # cl.exe messes with the output streams unless the environment variable VS_UNICODE_OUTPUT is cleared unset (ENV{VS_UNICODE_OUTPUT}) + elseif (_option_COMPILER_ID MATCHES "Clang" AND _option_COMPILER_VERSION VERSION_LESS "4.0.0") + if (_option_COMPILER_LAUNCHER MATCHES "ccache" OR + _option_COMPILER_EXECUTABLE MATCHES "ccache") + # Newer versions of Clang embed a compilation timestamp into the precompiled header binary, + # which results in "file has been modified since the precompiled header was built" errors if ccache is used. + # We work around the problem by disabling ccache upon pre-compiling the prefix header. + set (ENV{CCACHE_DISABLE} "true") + endif() endif() execute_process( COMMAND ${_cmd} @@ -1851,7 +2000,7 @@ function (cotire_check_precompiled_header_support _language _target _msgVar) set (_unsupportedCompiler "Precompiled headers not supported for ${_language} compiler ${CMAKE_${_language}_COMPILER_ID}") if (CMAKE_${_language}_COMPILER_ID MATCHES "MSVC") - # supported since Visual Studio C++ 6.0 + # PCH supported since Visual Studio C++ 6.0 # and CMake does not support an earlier version set (${_msgVar} "" PARENT_SCOPE) elseif (CMAKE_${_language}_COMPILER_ID MATCHES "GNU") @@ -1862,8 +2011,16 @@ function (cotire_check_precompiled_header_support _language _target _msgVar) set (${_msgVar} "" PARENT_SCOPE) endif() elseif (CMAKE_${_language}_COMPILER_ID MATCHES "Clang") - # all Clang versions have PCH support - set (${_msgVar} "" PARENT_SCOPE) + if (UNIX) + # all Unix Clang versions have PCH support + set (${_msgVar} "" PARENT_SCOPE) + elseif (WIN32) + # only clang-cl is supported under Windows + get_filename_component(_compilerName "${CMAKE_${_language}_COMPILER}" NAME_WE) + if (NOT _compilerName MATCHES "cl$") + set (${_msgVar} "${_unsupportedCompiler} version ${CMAKE_${_language}_COMPILER_VERSION}. Use clang-cl instead." PARENT_SCOPE) + endif() + endif() elseif (CMAKE_${_language}_COMPILER_ID MATCHES "Intel") # Intel PCH support requires version >= 8.0.0 if ("${CMAKE_${_language}_COMPILER_VERSION}" VERSION_LESS "8.0.0") @@ -1874,29 +2031,38 @@ function (cotire_check_precompiled_header_support _language _target _msgVar) else() set (${_msgVar} "${_unsupportedCompiler}." PARENT_SCOPE) endif() + # check if ccache is used as a compiler launcher get_target_property(_launcher ${_target} ${_language}_COMPILER_LAUNCHER) - if (CMAKE_${_language}_COMPILER MATCHES "ccache" OR _launcher MATCHES "ccache") + get_filename_component(_realCompilerExe "${CMAKE_${_language}_COMPILER}" REALPATH) + if (_realCompilerExe MATCHES "ccache" OR _launcher MATCHES "ccache") + # verify that ccache configuration is compatible with precompiled headers + # always check environment variable CCACHE_SLOPPINESS, because earlier versions of ccache + # do not report the "sloppiness" setting correctly upon printing ccache configuration if (DEFINED ENV{CCACHE_SLOPPINESS}) - if (NOT "$ENV{CCACHE_SLOPPINESS}" MATCHES "pch_defines" OR NOT "$ENV{CCACHE_SLOPPINESS}" MATCHES "time_macros") + if (NOT "$ENV{CCACHE_SLOPPINESS}" MATCHES "pch_defines" OR + NOT "$ENV{CCACHE_SLOPPINESS}" MATCHES "time_macros") set (${_msgVar} "ccache requires the environment variable CCACHE_SLOPPINESS to be set to \"pch_defines,time_macros\"." PARENT_SCOPE) endif() else() - if (_launcher MATCHES "ccache") - get_filename_component(_ccacheExe "${_launcher}" REALPATH) + if (_realCompilerExe MATCHES "ccache") + set (_ccacheExe "${_realCompilerExe}") else() - get_filename_component(_ccacheExe "${CMAKE_${_language}_COMPILER}" REALPATH) + set (_ccacheExe "${_launcher}") endif() + # ccache 3.7.0 replaced --print-config with --show-config + # use -p instead, which seems to work for all version for now, sigh execute_process( - COMMAND "${_ccacheExe}" "--print-config" + COMMAND "${_ccacheExe}" "-p" WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}" RESULT_VARIABLE _result OUTPUT_VARIABLE _ccacheConfig OUTPUT_STRIP_TRAILING_WHITESPACE ERROR_QUIET) - if (_result OR NOT - _ccacheConfig MATCHES "sloppiness.*=.*time_macros" OR NOT - _ccacheConfig MATCHES "sloppiness.*=.*pch_defines") + if (_result) + set (${_msgVar} "ccache configuration cannot be determined." PARENT_SCOPE) + elseif (NOT _ccacheConfig MATCHES "sloppiness.*=.*time_macros" OR + NOT _ccacheConfig MATCHES "sloppiness.*=.*pch_defines") set (${_msgVar} "ccache requires configuration setting \"sloppiness\" to be set to \"pch_defines,time_macros\"." PARENT_SCOPE) @@ -2189,7 +2355,7 @@ function (cotire_generate_target_script _language _configurations _target _targe XCODE MSVC CMAKE_GENERATOR CMAKE_BUILD_TYPE CMAKE_CONFIGURATION_TYPES CMAKE_${_language}_COMPILER_ID CMAKE_${_language}_COMPILER_VERSION CMAKE_${_language}_COMPILER_LAUNCHER CMAKE_${_language}_COMPILER CMAKE_${_language}_COMPILER_ARG1 - CMAKE_INCLUDE_FLAG_${_language} CMAKE_INCLUDE_FLAG_${_language}_SEP + CMAKE_INCLUDE_FLAG_${_language} CMAKE_INCLUDE_FLAG_SEP_${_language} CMAKE_INCLUDE_SYSTEM_FLAG_${_language} CMAKE_${_language}_FRAMEWORK_SEARCH_FLAG CMAKE_${_language}_SYSTEM_FRAMEWORK_SEARCH_FLAG @@ -2222,8 +2388,9 @@ endfunction() function (cotire_setup_pch_file_compilation _language _target _targetScript _prefixFile _pchFile _hostFile) set (_sourceFiles ${ARGN}) - if (CMAKE_${_language}_COMPILER_ID MATCHES "MSVC|Intel") - # for Visual Studio and Intel, we attach the precompiled header compilation to the host file + if (CMAKE_${_language}_COMPILER_ID MATCHES "MSVC|Intel" OR + (WIN32 AND CMAKE_${_language}_COMPILER_ID MATCHES "Clang")) + # for MSVC, Intel and Clang-cl, we attach the precompiled header compilation to the host file # the remaining files include the precompiled header, see cotire_setup_pch_file_inclusion if (_sourceFiles) set (_flags "") @@ -2231,6 +2398,9 @@ function (cotire_setup_pch_file_compilation _language _target _targetScript _pre "${_language}" "${CMAKE_${_language}_COMPILER_ID}" "${CMAKE_${_language}_COMPILER_VERSION}" "${_prefixFile}" "${_pchFile}" "${_hostFile}" _flags) set_property (SOURCE ${_hostFile} APPEND_STRING PROPERTY COMPILE_FLAGS " ${_flags} ") + if (COTIRE_DEBUG) + message (STATUS "set_property: SOURCE ${_hostFile} APPEND_STRING COMPILE_FLAGS ${_flags}") + endif() set_property (SOURCE ${_hostFile} APPEND PROPERTY OBJECT_OUTPUTS "${_pchFile}") # make object file generated from host file depend on prefix header set_property (SOURCE ${_hostFile} APPEND PROPERTY OBJECT_DEPENDS "${_prefixFile}") @@ -2268,8 +2438,9 @@ function (cotire_setup_pch_file_compilation _language _target _targetScript _pre endfunction() function (cotire_setup_pch_file_inclusion _language _target _wholeTarget _prefixFile _pchFile _hostFile) - if (CMAKE_${_language}_COMPILER_ID MATCHES "MSVC|Intel") - # for Visual Studio and Intel, we include the precompiled header in all but the host file + if (CMAKE_${_language}_COMPILER_ID MATCHES "MSVC|Intel" OR + (WIN32 AND CMAKE_${_language}_COMPILER_ID MATCHES "Clang")) + # for MSVC, Intel and clang-cl, we include the precompiled header in all but the host file # the host file does the precompiled header compilation, see cotire_setup_pch_file_compilation set (_sourceFiles ${ARGN}) list (LENGTH _sourceFiles _numberOfSourceFiles) @@ -2281,6 +2452,9 @@ function (cotire_setup_pch_file_inclusion _language _target _wholeTarget _prefix "${_language}" "${CMAKE_${_language}_COMPILER_ID}" "${CMAKE_${_language}_COMPILER_VERSION}" "${_prefixFile}" "${_pchFile}" _flags) set_property (SOURCE ${_sourceFiles} APPEND_STRING PROPERTY COMPILE_FLAGS " ${_flags} ") + if (COTIRE_DEBUG) + message (STATUS "set_property: SOURCE ${_sourceFiles} APPEND_STRING COMPILE_FLAGS ${_flags}") + endif() # make object files generated from source files depend on precompiled header set_property (SOURCE ${_sourceFiles} APPEND PROPERTY OBJECT_DEPENDS "${_pchFile}") endif() @@ -2294,6 +2468,9 @@ function (cotire_setup_pch_file_inclusion _language _target _wholeTarget _prefix "${_language}" "${CMAKE_${_language}_COMPILER_ID}" "${CMAKE_${_language}_COMPILER_VERSION}" "${_prefixFile}" "${_pchFile}" _flags) set_property (SOURCE ${_sourceFiles} APPEND_STRING PROPERTY COMPILE_FLAGS " ${_flags} ") + if (COTIRE_DEBUG) + message (STATUS "set_property: SOURCE ${_sourceFiles} APPEND_STRING COMPILE_FLAGS ${_flags}") + endif() # mark sources as cotired to prevent them from being used in another cotired target set_source_files_properties(${_sourceFiles} PROPERTIES COTIRE_TARGET "${_target}") endif() @@ -2311,6 +2488,9 @@ function (cotire_setup_prefix_file_inclusion _language _target _prefixFile) "${_language}" "${CMAKE_${_language}_COMPILER_ID}" "${CMAKE_${_language}_COMPILER_VERSION}" "${_prefixFile}" "${_pchFile}" _flags) set_property (SOURCE ${_sourceFiles} APPEND_STRING PROPERTY COMPILE_FLAGS " ${_flags} ") + if (COTIRE_DEBUG) + message (STATUS "set_property: SOURCE ${_sourceFiles} APPEND_STRING COMPILE_FLAGS ${_flags}") + endif() # mark sources as cotired to prevent them from being used in another cotired target set_source_files_properties(${_sourceFiles} PROPERTIES COTIRE_TARGET "${_target}") # make object files generated from source files depend on prefix header @@ -2400,7 +2580,7 @@ function (cotire_setup_target_pch_usage _languages _target _wholeTarget) message (STATUS "add_custom_command: TARGET ${_target} PRE_BUILD ${_cmds}") endif() # because CMake PRE_BUILD command does not support dependencies, - # we check dependencies explicitly in cotire script mode when the pre-build action is run + # we check dependencies explicity in cotire script mode when the pre-build action is run add_custom_command( TARGET "${_target}" PRE_BUILD ${_cmds} @@ -2415,9 +2595,10 @@ function (cotire_setup_target_pch_usage _languages _target _wholeTarget) # if this is a single-language target without any excluded files if (_wholeTarget) set (_language "${_languages}") - # for Visual Studio and Intel, precompiled header inclusion is always done on the source file level + # for MSVC, Intel and clang-cl, precompiled header inclusion is always done on the source file level # see cotire_setup_pch_file_inclusion - if (NOT CMAKE_${_language}_COMPILER_ID MATCHES "MSVC|Intel") + if (NOT CMAKE_${_language}_COMPILER_ID MATCHES "MSVC|Intel" AND NOT + (WIN32 AND CMAKE_${_language}_COMPILER_ID MATCHES "Clang")) get_property(_prefixFile TARGET ${_target} PROPERTY COTIRE_${_language}_PREFIX_HEADER) if (_prefixFile) get_property(_pchFile TARGET ${_target} PROPERTY COTIRE_${_language}_PRECOMPILED_HEADER) @@ -2426,6 +2607,9 @@ function (cotire_setup_target_pch_usage _languages _target _wholeTarget) "${_language}" "${CMAKE_${_language}_COMPILER_ID}" "${CMAKE_${_language}_COMPILER_VERSION}" "${_prefixFile}" "${_pchFile}" _options) set_property(TARGET ${_target} APPEND PROPERTY ${_options}) + if (COTIRE_DEBUG) + message (STATUS "set_property: TARGET ${_target} APPEND PROPERTY ${_options}") + endif() endif() endif() endif() @@ -2452,7 +2636,8 @@ function (cotire_setup_unity_generation_commands _language _target _targetScript set_property (SOURCE "${_unityFile}" PROPERTY OBJECT_DEPENDS ${_objectDependsPaths}) endif() if (WIN32 AND CMAKE_${_language}_COMPILER_ID MATCHES "MSVC|Intel") - # unity file compilation results in potentially huge object file, thus use /bigobj by default unter MSVC and Windows Intel + # unity file compilation results in potentially huge object file, + # thus use /bigobj by default unter cl.exe and Windows Intel set_property (SOURCE "${_unityFile}" APPEND_STRING PROPERTY COMPILE_FLAGS "/bigobj") endif() cotire_set_cmd_to_prologue(_unityCmd) @@ -2658,6 +2843,9 @@ function (cotire_make_target_message _target _languages _disableMsg _targetMsgVa else() set (_targetMsg "${_languagesStr} target ${_target} cotired without unity build.") endif() + if (_disableMsg) + set (_targetMsg "${_targetMsg} ${_disableMsg}") + endif() else() if (_excludedStr) set (_targetMsg "${_languagesStr} target ${_target} cotired ${_excludedStr}.") @@ -2747,6 +2935,20 @@ function (cotire_choose_target_languages _target _targetLanguagesVar _wholeTarge set (_targetUsePCH FALSE) endif() endif() + if (_targetAddSCU) + # disable unity builds if automatic Qt processing is used + get_target_property(_targetAutoMoc ${_target} AUTOMOC) + get_target_property(_targetAutoUic ${_target} AUTOUIC) + get_target_property(_targetAutoRcc ${_target} AUTORCC) + if (_targetAutoMoc OR _targetAutoUic OR _targetAutoRcc) + if (_disableMsg) + set (_disableMsg "${_disableMsg} Target uses automatic CMake Qt processing.") + else() + set (_disableMsg "Target uses automatic CMake Qt processing.") + endif() + set (_targetAddSCU FALSE) + endif() + endif() set_property(TARGET ${_target} PROPERTY COTIRE_ENABLE_PRECOMPILED_HEADER ${_targetUsePCH}) set_property(TARGET ${_target} PROPERTY COTIRE_ADD_UNITY_BUILD ${_targetAddSCU}) cotire_make_target_message(${_target} "${_targetLanguages}" "${_disableMsg}" _targetMsg ${_allExcludedSourceFiles}) @@ -2774,7 +2976,11 @@ function (cotire_compute_unity_max_number_of_includes _target _maxIncludesVar) set (_sourceFiles ${ARGN}) get_target_property(_maxIncludes ${_target} COTIRE_UNITY_SOURCE_MAXIMUM_NUMBER_OF_INCLUDES) if (_maxIncludes MATCHES "(-j|--parallel|--jobs) ?([0-9]*)") - set (_numberOfThreads "${CMAKE_MATCH_2}") + if (DEFINED CMAKE_MATCH_2) + set (_numberOfThreads "${CMAKE_MATCH_2}") + else() + set (_numberOfThreads "") + endif() if (NOT _numberOfThreads) # use all available cores ProcessorCount(_numberOfThreads) @@ -2887,8 +3093,9 @@ function (cotire_setup_pch_target _languages _configurations _target) set (_dependsFiles "") foreach (_language ${_languages}) set (_props COTIRE_${_language}_PREFIX_HEADER COTIRE_${_language}_UNITY_SOURCE) - if (NOT CMAKE_${_language}_COMPILER_ID MATCHES "MSVC|Intel") - # Visual Studio and Intel only create precompiled header as a side effect + if (NOT CMAKE_${_language}_COMPILER_ID MATCHES "MSVC|Intel" AND NOT + (WIN32 AND CMAKE_${_language}_COMPILER_ID MATCHES "Clang")) + # MSVC, Intel and clang-cl only create precompiled header as a side effect list (INSERT _props 0 COTIRE_${_language}_PRECOMPILED_HEADER) endif() cotire_get_first_set_property_value(_dependsFile TARGET ${_target} ${_props}) @@ -2936,6 +3143,7 @@ function (cotire_collect_unity_target_sources _target _languages _unityTargetSou list (APPEND _unityTargetSources ${_unityFiles}) endif() endforeach() + # handle object libraries which are part of the target's sources get_target_property(_linkLibrariesStrategy ${_target} COTIRE_UNITY_LINK_LIBRARIES_INIT) if ("${_linkLibrariesStrategy}" MATCHES "^COPY_UNITY$") cotire_filter_object_libraries(${_target} _objectLibraries ${_targetSourceFiles}) @@ -2980,21 +3188,6 @@ function (cotire_setup_unity_build_target _languages _configurations _target) # determine unity target sources set (_unityTargetSources "") cotire_collect_unity_target_sources(${_target} "${_languages}" _unityTargetSources) - # handle automatic Qt processing - get_target_property(_targetAutoMoc ${_target} AUTOMOC) - get_target_property(_targetAutoUic ${_target} AUTOUIC) - get_target_property(_targetAutoRcc ${_target} AUTORCC) - if (_targetAutoMoc OR _targetAutoUic OR _targetAutoRcc) - # if the original target sources are subject to CMake's automatic Qt processing, - # also include implicitly generated _automoc.cpp file - if (CMAKE_VERSION VERSION_LESS "3.8.0") - list (APPEND _unityTargetSources "${_target}_automoc.cpp") - set_property (SOURCE "${_target}_automoc.cpp" PROPERTY GENERATED TRUE) - else() - list (APPEND _unityTargetSources "${_target}_autogen/moc_compilation.cpp") - set_property (SOURCE "${_target}_autogen/moc_compilation.cpp" PROPERTY GENERATED TRUE) - endif() - endif() # prevent AUTOMOC, AUTOUIC and AUTORCC properties from being set when the unity target is created set (CMAKE_AUTOMOC OFF) set (CMAKE_AUTOUIC OFF) @@ -3008,21 +3201,6 @@ function (cotire_setup_unity_build_target _languages _configurations _target) else() add_library(${_unityTargetName} ${_unityTargetSubType} EXCLUDE_FROM_ALL ${_unityTargetSources}) endif() - if ("${CMAKE_GENERATOR}" MATCHES "Visual Studio") - # depend on original target's automoc target, if it exists - if (TARGET ${_target}_automoc) - add_dependencies(${_unityTargetName} ${_target}_automoc) - endif() - else() - if (_targetAutoMoc OR _targetAutoUic OR _targetAutoRcc) - # depend on the original target's implicitly generated _automoc target - if (CMAKE_VERSION VERSION_LESS "3.8.0") - add_dependencies(${_unityTargetName} ${_target}_automoc) - else() - add_dependencies(${_unityTargetName} ${_target}_autogen) - endif() - endif() - endif() # copy output location properties set (_outputDirProperties ARCHIVE_OUTPUT_DIRECTORY ARCHIVE_OUTPUT_DIRECTORY_ @@ -3034,8 +3212,8 @@ function (cotire_setup_unity_build_target _languages _configurations _target) set (_outputDir "${COTIRE_UNITY_OUTPUT_DIRECTORY}") else() # append relative COTIRE_UNITY_OUTPUT_DIRECTORY to target's actual output directory - cotire_copy_set_properites("${_configurations}" TARGET ${_target} ${_unityTargetName} ${_outputDirProperties}) - cotire_resolve_config_properites("${_configurations}" _properties ${_outputDirProperties}) + cotire_copy_set_properties("${_configurations}" TARGET ${_target} ${_unityTargetName} ${_outputDirProperties}) + cotire_resolve_config_properties("${_configurations}" _properties ${_outputDirProperties}) foreach (_property ${_properties}) get_property(_outputDir TARGET ${_target} PROPERTY ${_property}) if (_outputDir) @@ -3055,11 +3233,11 @@ function (cotire_setup_unity_build_target _languages _configurations _target) RUNTIME_OUTPUT_DIRECTORY "${_outputDir}") endif() else() - cotire_copy_set_properites("${_configurations}" TARGET ${_target} ${_unityTargetName} + cotire_copy_set_properties("${_configurations}" TARGET ${_target} ${_unityTargetName} ${_outputDirProperties}) endif() # copy output name - cotire_copy_set_properites("${_configurations}" TARGET ${_target} ${_unityTargetName} + cotire_copy_set_properties("${_configurations}" TARGET ${_target} ${_unityTargetName} ARCHIVE_OUTPUT_NAME ARCHIVE_OUTPUT_NAME_ LIBRARY_OUTPUT_NAME LIBRARY_OUTPUT_NAME_ OUTPUT_NAME OUTPUT_NAME_ @@ -3067,7 +3245,7 @@ function (cotire_setup_unity_build_target _languages _configurations _target) PREFIX _POSTFIX SUFFIX IMPORT_PREFIX IMPORT_SUFFIX) # copy compile stuff - cotire_copy_set_properites("${_configurations}" TARGET ${_target} ${_unityTargetName} + cotire_copy_set_properties("${_configurations}" TARGET ${_target} ${_unityTargetName} COMPILE_DEFINITIONS COMPILE_DEFINITIONS_ COMPILE_FLAGS COMPILE_OPTIONS Fortran_FORMAT Fortran_MODULE_DIRECTORY @@ -3079,12 +3257,12 @@ function (cotire_setup_unity_build_target _languages _configurations _target) C_VISIBILITY_PRESET CXX_VISIBILITY_PRESET VISIBILITY_INLINES_HIDDEN C_CLANG_TIDY CXX_CLANG_TIDY) # copy compile features - cotire_copy_set_properites("${_configurations}" TARGET ${_target} ${_unityTargetName} + cotire_copy_set_properties("${_configurations}" TARGET ${_target} ${_unityTargetName} C_EXTENSIONS C_STANDARD C_STANDARD_REQUIRED CXX_EXTENSIONS CXX_STANDARD CXX_STANDARD_REQUIRED COMPILE_FEATURES) # copy interface stuff - cotire_copy_set_properites("${_configurations}" TARGET ${_target} ${_unityTargetName} + cotire_copy_set_properties("${_configurations}" TARGET ${_target} ${_unityTargetName} COMPATIBLE_INTERFACE_BOOL COMPATIBLE_INTERFACE_NUMBER_MAX COMPATIBLE_INTERFACE_NUMBER_MIN COMPATIBLE_INTERFACE_STRING INTERFACE_COMPILE_DEFINITIONS INTERFACE_COMPILE_FEATURES INTERFACE_COMPILE_OPTIONS @@ -3092,8 +3270,9 @@ function (cotire_setup_unity_build_target _languages _configurations _target) INTERFACE_POSITION_INDEPENDENT_CODE INTERFACE_SYSTEM_INCLUDE_DIRECTORIES INTERFACE_AUTOUIC_OPTIONS NO_SYSTEM_FROM_IMPORTED) # copy link stuff - cotire_copy_set_properites("${_configurations}" TARGET ${_target} ${_unityTargetName} - BUILD_WITH_INSTALL_RPATH INSTALL_RPATH INSTALL_RPATH_USE_LINK_PATH SKIP_BUILD_RPATH + cotire_copy_set_properties("${_configurations}" TARGET ${_target} ${_unityTargetName} + BUILD_WITH_INSTALL_RPATH BUILD_WITH_INSTALL_NAME_DIR + INSTALL_RPATH INSTALL_RPATH_USE_LINK_PATH SKIP_BUILD_RPATH LINKER_LANGUAGE LINK_DEPENDS LINK_DEPENDS_NO_SHARED LINK_FLAGS LINK_FLAGS_ LINK_INTERFACE_LIBRARIES LINK_INTERFACE_LIBRARIES_ @@ -3101,18 +3280,18 @@ function (cotire_setup_unity_build_target _languages _configurations _target) LINK_SEARCH_START_STATIC LINK_SEARCH_END_STATIC STATIC_LIBRARY_FLAGS STATIC_LIBRARY_FLAGS_ NO_SONAME SOVERSION VERSION - LINK_WHAT_YOU_USE) + LINK_WHAT_YOU_USE BUILD_RPATH) # copy cmake stuff - cotire_copy_set_properites("${_configurations}" TARGET ${_target} ${_unityTargetName} + cotire_copy_set_properties("${_configurations}" TARGET ${_target} ${_unityTargetName} IMPLICIT_DEPENDS_INCLUDE_TRANSFORM RULE_LAUNCH_COMPILE RULE_LAUNCH_CUSTOM RULE_LAUNCH_LINK) # copy Apple platform specific stuff - cotire_copy_set_properites("${_configurations}" TARGET ${_target} ${_unityTargetName} + cotire_copy_set_properties("${_configurations}" TARGET ${_target} ${_unityTargetName} BUNDLE BUNDLE_EXTENSION FRAMEWORK FRAMEWORK_VERSION INSTALL_NAME_DIR MACOSX_BUNDLE MACOSX_BUNDLE_INFO_PLIST MACOSX_FRAMEWORK_INFO_PLIST MACOSX_RPATH OSX_ARCHITECTURES OSX_ARCHITECTURES_ PRIVATE_HEADER PUBLIC_HEADER RESOURCE XCTEST - IOS_INSTALL_COMBINED) + IOS_INSTALL_COMBINED XCODE_EXPLICIT_FILE_TYPE XCODE_PRODUCT_TYPE) # copy Windows platform specific stuff - cotire_copy_set_properites("${_configurations}" TARGET ${_target} ${_unityTargetName} + cotire_copy_set_properties("${_configurations}" TARGET ${_target} ${_unityTargetName} GNUtoMS COMPILE_PDB_NAME COMPILE_PDB_NAME_ COMPILE_PDB_OUTPUT_DIRECTORY COMPILE_PDB_OUTPUT_DIRECTORY_ @@ -3126,15 +3305,19 @@ function (cotire_setup_unity_build_target _languages _configurations _target) VS_WINRT_COMPONENT VS_WINRT_EXTENSIONS VS_WINRT_REFERENCES WIN32_EXECUTABLE WINDOWS_EXPORT_ALL_SYMBOLS DEPLOYMENT_REMOTE_DIRECTORY VS_CONFIGURATION_TYPE - VS_SDK_REFERENCES) + VS_SDK_REFERENCES VS_USER_PROPS VS_DEBUGGER_WORKING_DIRECTORY) # copy Android platform specific stuff - cotire_copy_set_properites("${_configurations}" TARGET ${_target} ${_unityTargetName} + cotire_copy_set_properties("${_configurations}" TARGET ${_target} ${_unityTargetName} ANDROID_API ANDROID_API_MIN ANDROID_GUI ANDROID_ANT_ADDITIONAL_OPTIONS ANDROID_ARCH ANDROID_ASSETS_DIRECTORIES ANDROID_JAR_DEPENDENCIES ANDROID_JAR_DIRECTORIES ANDROID_JAVA_SOURCE_DIR ANDROID_NATIVE_LIB_DEPENDENCIES ANDROID_NATIVE_LIB_DIRECTORIES ANDROID_PROCESS_MAX ANDROID_PROGUARD ANDROID_PROGUARD_CONFIG_PATH ANDROID_SECURE_PROPS_PATH ANDROID_SKIP_ANT_STEP ANDROID_STL_TYPE) + # copy CUDA platform specific stuff + cotire_copy_set_properties("${_configurations}" TARGET ${_target} ${_unityTargetName} + CUDA_PTX_COMPILATION CUDA_SEPARABLE_COMPILATION CUDA_RESOLVE_DEVICE_SYMBOLS + CUDA_EXTENSIONS CUDA_STANDARD CUDA_STANDARD_REQUIRED) # use output name from original target get_target_property(_targetOutputName ${_unityTargetName} OUTPUT_NAME) if (NOT _targetOutputName) @@ -3148,6 +3331,13 @@ function (cotire_setup_unity_build_target _languages _configurations _target) set_property(TARGET ${_unityTargetName} PROPERTY ENABLE_EXPORTS TRUE) endif() endif() + # enable parallel compilation for MSVC + if (MSVC AND "${CMAKE_GENERATOR}" MATCHES "Visual Studio") + list (LENGTH _unityTargetSources _numberOfUnityTargetSources) + if (_numberOfUnityTargetSources GREATER 1) + set_property(TARGET ${_unityTargetName} APPEND PROPERTY COMPILE_OPTIONS "/MP") + endif() + endif() cotire_init_target(${_unityTargetName}) cotire_add_to_unity_all_target(${_unityTargetName}) set_property(TARGET ${_target} PROPERTY COTIRE_UNITY_TARGET_NAME "${_unityTargetName}") @@ -3306,6 +3496,13 @@ function (cotire_target_link_libraries _target) message (STATUS "unity target ${_unityTargetName} interface link libraries: ${_unityLinkInterfaceLibraries}") endif() endif() + get_target_property(_manualDependencies ${_target} MANUALLY_ADDED_DEPENDENCIES) + if (_manualDependencies) + cotire_map_libraries("${_linkLibrariesStrategy}" _unityManualDependencies ${_manualDependencies}) + if (_unityManualDependencies) + add_dependencies("${_unityTargetName}" ${_unityManualDependencies}) + endif() + endif() endif() endif() endfunction(cotire_target_link_libraries) @@ -3338,9 +3535,9 @@ function (cotire_init_target _targetName) set_target_properties(${_targetName} PROPERTIES FOLDER "${COTIRE_TARGETS_FOLDER}") endif() set_target_properties(${_targetName} PROPERTIES EXCLUDE_FROM_ALL TRUE) - if (MSVC_IDE) - set_target_properties(${_targetName} PROPERTIES EXCLUDE_FROM_DEFAULT_BUILD TRUE) - endif() + # if (MSVC_IDE) + # set_target_properties(${_targetName} PROPERTIES EXCLUDE_FROM_DEFAULT_BUILD TRUE) + # endif() endfunction() function (cotire_add_to_pch_all_target _pchTargetName) @@ -3602,7 +3799,7 @@ else() set (COTIRE_UNITY_SOURCE_EXCLUDE_EXTENSIONS "m;mm" CACHE STRING "Ignore sources with the listed file extensions from the generated unity source.") - set (COTIRE_MINIMUM_NUMBER_OF_TARGET_SOURCES "3" CACHE STRING + set (COTIRE_MINIMUM_NUMBER_OF_TARGET_SOURCES "2" CACHE STRING "Minimum number of sources in target required to enable use of precompiled header.") if (NOT DEFINED COTIRE_MAXIMUM_NUMBER_OF_UNITY_INCLUDES_INIT) @@ -3701,7 +3898,7 @@ else() FULL_DOCS "The variable can be set to an integer > 0." "If a target contains less than that number of source files, cotire will not enable the use of the precompiled header for the target." - "If not defined, defaults to 3." + "If not defined, defaults to 2." ) define_property( diff --git a/adm/cmake/occt_toolkit.cmake b/adm/cmake/occt_toolkit.cmake index 4ed3d4a66f..517d1b47fa 100644 --- a/adm/cmake/occt_toolkit.cmake +++ b/adm/cmake/occt_toolkit.cmake @@ -245,6 +245,18 @@ endif (USE_QT) if (EXECUTABLE_PROJECT) add_executable (${PROJECT_NAME} ${USED_SRCFILES} ${USED_INCFILES} ${USED_RCFILE} ${RESOURCE_FILES} ${${PROJECT_NAME}_MOC_FILES}) + if (DEFINED ${PROJECT_NAME}_DISABLE_COTIRE AND ${PROJECT_NAME}_DISABLE_COTIRE) + set_target_properties(${PROJECT_NAME} PROPERTIES COTIRE_ENABLE_PRECOMPILED_HEADER FALSE) + set_target_properties(${PROJECT_NAME} PROPERTIES COTIRE_ADD_UNITY_BUILD FALSE) + else() + # To avoid excluding of PROJECT_NAME from cotire tool, we may use cotire + # COTIRE_PREFIX_HEADER_IGNORE_PATH instead. But, practically it causes many 'undefined symbols' error. + # So, we just exclude PROJECT_NAME from cotire list. + # if (DEFINED ${PROJECT_NAME}_COTIRE_IGNORE_PATH) + # set_target_properties(${PROJECT_NAME} PROPERTIES COTIRE_PREFIX_HEADER_IGNORE_PATH "${${PROJECT_NAME}_COTIRE_IGNORE_PATH}") + # endif() + endif() + install (TARGETS ${PROJECT_NAME} DESTINATION "${INSTALL_DIR_BIN}\${OCCT_INSTALL_BIN_LETTER}") @@ -254,6 +266,18 @@ if (EXECUTABLE_PROJECT) else() add_library (${PROJECT_NAME} ${USED_SRCFILES} ${USED_INCFILES} ${USED_RCFILE} ${RESOURCE_FILES} ${${PROJECT_NAME}_MOC_FILES}) + if (DEFINED ${PROJECT_NAME}_DISABLE_COTIRE AND ${PROJECT_NAME}_DISABLE_COTIRE) + set_target_properties(${PROJECT_NAME} PROPERTIES COTIRE_ENABLE_PRECOMPILED_HEADER FALSE) + set_target_properties(${PROJECT_NAME} PROPERTIES COTIRE_ADD_UNITY_BUILD FALSE) + else() + # To avoid excluding of PROJECT_NAME from cotire tool, we may use cotire + # COTIRE_PREFIX_HEADER_IGNORE_PATH instead. But, practically it causes many 'undefined symbols' error. + # So, we just exclude PROJECT_NAME from cotire list. + # if (DEFINED ${PROJECT_NAME}_COTIRE_IGNORE_PATH) + # set_target_properties(${PROJECT_NAME} PROPERTIES COTIRE_PREFIX_HEADER_IGNORE_PATH "${${PROJECT_NAME}_COTIRE_IGNORE_PATH}") + # endif() + endif() + if (MSVC) if (BUILD_FORCE_RelWithDebInfo) set (aReleasePdbConf "Release") diff --git a/src/TKOpenGl/CMakeLists.txt b/src/TKOpenGl/CMakeLists.txt index ef9a09b27e..f1dd03f077 100644 --- a/src/TKOpenGl/CMakeLists.txt +++ b/src/TKOpenGl/CMakeLists.txt @@ -1,3 +1,5 @@ project(TKOpenGl) +set (TKOpenGl_DISABLE_COTIRE ON) + OCCT_INCLUDE_CMAKE_FILE (adm/cmake/occt_toolkit) diff --git a/src/TKOpenGles/CMakeLists.txt b/src/TKOpenGles/CMakeLists.txt index 097b28b559..fdbd6cb820 100644 --- a/src/TKOpenGles/CMakeLists.txt +++ b/src/TKOpenGles/CMakeLists.txt @@ -1,4 +1,6 @@ project(TKOpenGles) +set (TKOpenGles_DISABLE_COTIRE ON) + OCCT_INCLUDE_CMAKE_FILE (adm/cmake/occt_toolkit) #add_definitions("-DOCCT_OPENGL") diff --git a/src/TKService/CMakeLists.txt b/src/TKService/CMakeLists.txt index 90c6b1e1a6..98599c060e 100644 --- a/src/TKService/CMakeLists.txt +++ b/src/TKService/CMakeLists.txt @@ -1,3 +1,5 @@ project(TKService) +set (TKService_DISABLE_COTIRE ON) + OCCT_INCLUDE_CMAKE_FILE (adm/cmake/occt_toolkit) diff --git a/src/TKXCAF/CMakeLists.txt b/src/TKXCAF/CMakeLists.txt index 4262ce1bd4..054ee4e5ea 100644 --- a/src/TKXCAF/CMakeLists.txt +++ b/src/TKXCAF/CMakeLists.txt @@ -1,3 +1,5 @@ project(TKXCAF) +set (TKXCAF_DISABLE_COTIRE ON) + OCCT_INCLUDE_CMAKE_FILE (adm/cmake/occt_toolkit) diff --git a/src/TKXDEDRAW/CMakeLists.txt b/src/TKXDEDRAW/CMakeLists.txt index 918e593cc2..a8348ecea3 100644 --- a/src/TKXDEDRAW/CMakeLists.txt +++ b/src/TKXDEDRAW/CMakeLists.txt @@ -1,3 +1,5 @@ project(TKXDEDRAW) +set (TKXDEDRAW_DISABLE_COTIRE ON) + OCCT_INCLUDE_CMAKE_FILE (adm/cmake/occt_toolkit) diff --git a/tools/TKDFBrowser/CMakeLists.txt b/tools/TKDFBrowser/CMakeLists.txt index a2a5445156..94ffde503a 100644 --- a/tools/TKDFBrowser/CMakeLists.txt +++ b/tools/TKDFBrowser/CMakeLists.txt @@ -1,5 +1,7 @@ project(TKDFBrowser) +set (TKDFBrowser_DISABLE_COTIRE OFF) + OCCT_INCLUDE_CMAKE_FILE (adm/cmake/occt_toolkit_prepare_tool) OCCT_INCLUDE_CMAKE_FILE (adm/cmake/occt_toolkit) OCCT_INCLUDE_CMAKE_FILE (adm/cmake/occt_toolkit_prepare_tool) diff --git a/tools/TKMessageModel/CMakeLists.txt b/tools/TKMessageModel/CMakeLists.txt index a6ef727d9e..69ed7e846a 100644 --- a/tools/TKMessageModel/CMakeLists.txt +++ b/tools/TKMessageModel/CMakeLists.txt @@ -1,5 +1,7 @@ project(TKMessageModel) +set (TKMessageModel_DISABLE_COTIRE OFF) + OCCT_INCLUDE_CMAKE_FILE (adm/cmake/occt_toolkit_prepare_tool) OCCT_INCLUDE_CMAKE_FILE (adm/cmake/occt_toolkit) OCCT_INCLUDE_CMAKE_FILE (adm/cmake/occt_toolkit_prepare_tool) diff --git a/tools/TKMessageView/CMakeLists.txt b/tools/TKMessageView/CMakeLists.txt index ee948ecc72..f1865f107c 100644 --- a/tools/TKMessageView/CMakeLists.txt +++ b/tools/TKMessageView/CMakeLists.txt @@ -1,5 +1,7 @@ project(TKMessageView) +set (TKMessageView_DISABLE_COTIRE OFF) + OCCT_INCLUDE_CMAKE_FILE (adm/cmake/occt_toolkit_prepare_tool) OCCT_INCLUDE_CMAKE_FILE (adm/cmake/occt_toolkit) OCCT_INCLUDE_CMAKE_FILE (adm/cmake/occt_toolkit_prepare_tool) diff --git a/tools/TKShapeView/CMakeLists.txt b/tools/TKShapeView/CMakeLists.txt index c4dd2e935b..b4fe9f9741 100644 --- a/tools/TKShapeView/CMakeLists.txt +++ b/tools/TKShapeView/CMakeLists.txt @@ -1,5 +1,7 @@ project(TKShapeView) +set (TKShapeView_DISABLE_COTIRE OFF) + OCCT_INCLUDE_CMAKE_FILE (adm/cmake/occt_toolkit_prepare_tool) OCCT_INCLUDE_CMAKE_FILE (adm/cmake/occt_toolkit) OCCT_INCLUDE_CMAKE_FILE (adm/cmake/occt_toolkit_prepare_tool) diff --git a/tools/TKTInspector/CMakeLists.txt b/tools/TKTInspector/CMakeLists.txt index 23389b74cd..c7d6932ae9 100644 --- a/tools/TKTInspector/CMakeLists.txt +++ b/tools/TKTInspector/CMakeLists.txt @@ -1,5 +1,7 @@ project(TKTInspector) +set (TKTInspector_DISABLE_COTIRE OFF) + set (INSTALL_API ON) OCCT_INCLUDE_CMAKE_FILE (adm/cmake/occt_toolkit_prepare_tool) diff --git a/tools/TKTreeModel/CMakeLists.txt b/tools/TKTreeModel/CMakeLists.txt index 0b2d9c65eb..d00a9e69ed 100644 --- a/tools/TKTreeModel/CMakeLists.txt +++ b/tools/TKTreeModel/CMakeLists.txt @@ -1,5 +1,7 @@ project(TKTreeModel) +set (TKTreeModel_DISABLE_COTIRE OFF) + OCCT_INCLUDE_CMAKE_FILE (adm/cmake/occt_toolkit_prepare_tool) OCCT_INCLUDE_CMAKE_FILE (adm/cmake/occt_toolkit) OCCT_INCLUDE_CMAKE_FILE (adm/cmake/occt_toolkit_prepare_tool) diff --git a/tools/TKVInspector/CMakeLists.txt b/tools/TKVInspector/CMakeLists.txt index cbe9037f6d..f57f9f5c10 100644 --- a/tools/TKVInspector/CMakeLists.txt +++ b/tools/TKVInspector/CMakeLists.txt @@ -1,5 +1,7 @@ project(TKVInspector) +set (TKVInspector_DISABLE_COTIRE OFF) + OCCT_INCLUDE_CMAKE_FILE (adm/cmake/occt_toolkit_prepare_tool) OCCT_INCLUDE_CMAKE_FILE (adm/cmake/occt_toolkit) OCCT_INCLUDE_CMAKE_FILE (adm/cmake/occt_toolkit_prepare_tool) diff --git a/tools/TKView/CMakeLists.txt b/tools/TKView/CMakeLists.txt index d630f5bbe3..4733b3a698 100644 --- a/tools/TKView/CMakeLists.txt +++ b/tools/TKView/CMakeLists.txt @@ -1,5 +1,7 @@ project(TKView) +set (TKView_DISABLE_COTIRE OFF) + OCCT_INCLUDE_CMAKE_FILE (adm/cmake/occt_toolkit_prepare_tool) OCCT_INCLUDE_CMAKE_FILE (adm/cmake/occt_toolkit) OCCT_INCLUDE_CMAKE_FILE (adm/cmake/occt_toolkit_prepare_tool) From 259b9303793e2e821237de9b5fa8e66316b5bced Mon Sep 17 00:00:00 2001 From: abulyche Date: Fri, 9 Sep 2022 13:21:03 +0300 Subject: [PATCH 396/639] 0023954: Modeling Algorithms - BRepPrimAPI_MakeRevol fails to recognize a torus case Fixed the Toroidal surface recognition; The test case bugs/moddata_1/bug22296: the result is a torus with parameters: u [0, 2*PI], v [PI, 3*PI]; The test case bugs/modalg_5/bug23954: BAD -> OK. --- src/GeomAdaptor/GeomAdaptor_SurfaceOfRevolution.cxx | 11 +---------- tests/bugs/modalg_5/bug23954 | 2 -- tests/bugs/moddata_1/bug22296 | 4 ++-- 3 files changed, 3 insertions(+), 14 deletions(-) diff --git a/src/GeomAdaptor/GeomAdaptor_SurfaceOfRevolution.cxx b/src/GeomAdaptor/GeomAdaptor_SurfaceOfRevolution.cxx index eea5ae45c9..62eb29784e 100644 --- a/src/GeomAdaptor/GeomAdaptor_SurfaceOfRevolution.cxx +++ b/src/GeomAdaptor/GeomAdaptor_SurfaceOfRevolution.cxx @@ -502,16 +502,7 @@ GeomAbs_SurfaceType GeomAdaptor_SurfaceOfRevolution::GetType() const MajorRadius = aLin.Distance(aLC); if(MajorRadius > aR) { - Standard_Real aT = 0., aDx, dX; - gp_Pnt aPx; - - aPx = ElCLib::Value(aT, C); - aDx = aLin.Distance(aPx); - dX = aDx - MajorRadius - aR; - if (dX < 0.) - dX = -dX; - if (dX < TolConf) - return GeomAbs_Torus; + return GeomAbs_Torus; } } break; diff --git a/tests/bugs/modalg_5/bug23954 b/tests/bugs/modalg_5/bug23954 index 58555b2bcb..1dc0cc10da 100644 --- a/tests/bugs/modalg_5/bug23954 +++ b/tests/bugs/modalg_5/bug23954 @@ -1,5 +1,3 @@ -puts "TODO OCC23954 ALL: Error: result is not Toroidal surface" - puts "============" puts "OCC23954" puts "============" diff --git a/tests/bugs/moddata_1/bug22296 b/tests/bugs/moddata_1/bug22296 index 8a4cf3d154..5a0e4a2b59 100755 --- a/tests/bugs/moddata_1/bug22296 +++ b/tests/bugs/moddata_1/bug22296 @@ -23,8 +23,8 @@ if { ${E_Length} < 6} { set good_umin 0 set good_umax 6.28319 - set good_vmin 0 - set good_vmax 6.28319 + set good_vmin 3.14159 + set good_vmax 9.42478 set xlist [xbounds f] set umin [lindex $xlist 0] From 9218d04b9a64e5eb73c53c1a523b6c76357bd90c Mon Sep 17 00:00:00 2001 From: Eugeny Maltchikov Date: Mon, 12 Sep 2022 11:00:49 +0300 Subject: [PATCH 397/639] 0033138: [Foundation Classes] - NCollection_IncAllocator- Decrease the default block size Set default memory block size for IncAllocator to 12KB to make sure the Low Fragmentation Heap is used for memory allocations on Windows platform. --- .../foundation_classes/foundation_classes.md | 2 +- src/NCollection/NCollection_IncAllocator.hxx | 16 ++++++++++++++-- 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/dox/user_guides/foundation_classes/foundation_classes.md b/dox/user_guides/foundation_classes/foundation_classes.md index 75ee0e41db..83ac31168b 100644 --- a/dox/user_guides/foundation_classes/foundation_classes.md +++ b/dox/user_guides/foundation_classes/foundation_classes.md @@ -1331,7 +1331,7 @@ Therefore if the user of *NCollection* does not specify any allocator as a param Nevertheless, it is possible to define a custom *Allocator* type to manage the memory in the most optimal or convenient way for this algorithm. As one possible choice, the class *NCollection_IncAllocator* is included. -Unlike *NCollection_BaseAllocator*, the memory is allocated in big blocks (about 20kB) and the allocator keeps track of the amount of occupied memory. +Unlike *NCollection_BaseAllocator*, the memory is allocated in big blocks (about 12kB) and the allocator keeps track of the amount of occupied memory. The method *Allocate* just increments the pointer to non-occupied memory and returns its previous value. Memory is only released in the destructor of *NCollection_IncAllocator*, the method *Free* is empty. If used properly, this Allocator can greatly improve the performance of specific algorithms. diff --git a/src/NCollection/NCollection_IncAllocator.hxx b/src/NCollection/NCollection_IncAllocator.hxx index 08e4219f0b..7dfe560af5 100644 --- a/src/NCollection/NCollection_IncAllocator.hxx +++ b/src/NCollection/NCollection_IncAllocator.hxx @@ -33,7 +33,12 @@ class Standard_Mutex; * type "aligned_t". To modify the size of memory blocks requested from the * OS, use the parameter of the constructor (measured in bytes); if this * parameter is smaller than 25 bytes on 32bit or 49 bytes on 64bit, the - * block size will be the default 24 kbytes + * block size will be the default 12 kbytes. + * + * It is not recommended to use memory blocks larger than 16KB on Windows + * platform for the repeated operations because Low Fragmentation Heap is + * not going to be used for these allocations which may lead to memory + * fragmentation and the general performance slow down. * * Note that this allocator is most suitable for single-threaded algorithms * (consider creating dedicated allocators per working thread), @@ -50,6 +55,12 @@ class NCollection_IncAllocator : public NCollection_BaseAllocator //! Constructor. //! Note that this constructor does NOT setup mutex for using allocator concurrently from different threads, //! see SetThreadSafe() method. + //! + //! The default size of the memory blocks is 12KB. + //! It is not recommended to use memory blocks larger than 16KB on Windows + //! platform for the repeated operations (and thus multiple allocations) + //! because Low Fragmentation Heap is not going to be used for these allocations, + //! leading to memory fragmentation and eventual performance slow down. Standard_EXPORT NCollection_IncAllocator (size_t theBlockSize = DefaultBlockSize); //! Setup mutex for thread-safe allocations. @@ -83,7 +94,8 @@ class NCollection_IncAllocator : public NCollection_BaseAllocator Standard_EXPORT void Reset (const Standard_Boolean doReleaseMem=Standard_True); - static const size_t DefaultBlockSize = 24600; + //! Default size for the memory blocks - 12KB + static const size_t DefaultBlockSize = 12300; protected: struct IBlock; From 3453354ee16d9d1baa5fdd42a6e29f83d01135ee Mon Sep 17 00:00:00 2001 From: kgv Date: Tue, 13 Sep 2022 13:01:00 +0300 Subject: [PATCH 398/639] 0033141: BVH_BaseBox::Transformed() returns empty box for identity matrix --- src/BVH/BVH_Box.hxx | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/BVH/BVH_Box.hxx b/src/BVH/BVH_Box.hxx index 6d2d01b0c8..be2af6c330 100644 --- a/src/BVH/BVH_Box.hxx +++ b/src/BVH/BVH_Box.hxx @@ -64,19 +64,18 @@ public: //! given transformation to this box. BVH_Box Transformed (const NCollection_Mat4& theTransform) const { - BVH_Box aResultBox; - + const BVH_Box *aThis = static_cast*>(this); if (theTransform.IsIdentity()) { - return aResultBox; + return *aThis; } - const BVH_Box *aThis = static_cast*>(this); if (!aThis->IsValid()) { - return aResultBox; + return *aThis; } + BVH_Box aResultBox; for (size_t aX = 0; aX <= 1; ++aX) { for (size_t aY = 0; aY <= 1; ++aY) From 3a24514d48d9f43e7d976d1be822439535bdeb42 Mon Sep 17 00:00:00 2001 From: oan Date: Tue, 18 Oct 2022 15:50:59 +0300 Subject: [PATCH 399/639] 0031476: Wrong shading of a toroidal face from a SAT file Added test case --- tests/bugs/mesh/bug31476 | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 tests/bugs/mesh/bug31476 diff --git a/tests/bugs/mesh/bug31476 b/tests/bugs/mesh/bug31476 new file mode 100644 index 0000000000..58b529b2c2 --- /dev/null +++ b/tests/bugs/mesh/bug31476 @@ -0,0 +1,30 @@ +puts "================" +puts "0031476: Wrong shading of a toroidal face from a SAT file" +puts "================" +puts "" + +restore [locate_data_file bug31476_toroidal_face.brep] result + +fixshape result result +i + +vinit +vsetdispmode 1 +vdisplay result +vfit + +smallview +fit +isos result 0 +triangles result + +checktrinfo result -tri 135 -nod 104 + +set log [tricheck result] +if { [llength $log] != 0 } { + puts "Error : Invalid mesh" +} else { + puts "Mesh is OK" +} + +checkview -screenshot -3d -path ${imagedir}/${test_image}_3d.png +checkview -screenshot -2d -path ${imagedir}/${test_image}_2d.png From a24391a133723a4e93f5717a6678d503feefb37c Mon Sep 17 00:00:00 2001 From: oan Date: Wed, 19 Oct 2022 00:49:02 +0300 Subject: [PATCH 400/639] 0033163: Bad definition of values in IMeshData_Status Corrected value of status enum --- src/IMeshData/IMeshData_Status.hxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/IMeshData/IMeshData_Status.hxx b/src/IMeshData/IMeshData_Status.hxx index e8348773de..53e171592b 100644 --- a/src/IMeshData/IMeshData_Status.hxx +++ b/src/IMeshData/IMeshData_Status.hxx @@ -28,7 +28,7 @@ enum IMeshData_Status IMeshData_TooFewPoints = 0x20, //!< Discrete model contains too few boundary points to generate mesh. IMeshData_Outdated = 0x40, //!< Existing triangulation of some faces corresponds to greater deflection than specified by parameter. IMeshData_Reused = 0x80, //!< Existing triangulation of some faces is reused as far as it fits specified deflection. - IMeshData_UserBreak = 0x160 //!< User break + IMeshData_UserBreak = 0x100 //!< User break }; #endif From f73592edf0ad5231c84e5332c8c47f54ed178780 Mon Sep 17 00:00:00 2001 From: oan Date: Wed, 30 Oct 2019 12:08:19 +0300 Subject: [PATCH 401/639] 0028500: Artifact in shaded view of the shape Increase minimum number of discretization points by one explicitly on each iteration of model healer to cover cases degenerated to line (for cases when face consists of 2 edges only). --- src/BRepMesh/BRepMesh_CurveTessellator.cxx | 15 ++++++++++----- src/BRepMesh/BRepMesh_CurveTessellator.hxx | 7 +++++-- src/BRepMesh/BRepMesh_EdgeDiscret.cxx | 12 +++++++----- src/BRepMesh/BRepMesh_EdgeDiscret.hxx | 6 ++++-- src/BRepMesh/BRepMesh_ModelHealer.cxx | 20 +++++++++++++++++++- tests/bugs/mesh/bug25044_12 | 3 --- tests/bugs/mesh/bug25044_13 | 3 --- tests/bugs/mesh/bug25044_60 | 3 +++ tests/bugs/mesh/bug28500 | 18 ++++++++---------- tests/bugs/mesh/bug32692_1 | 2 +- tests/hlr/poly_hlr/C3 | 2 +- tests/hlr/poly_hlr/bug23625_1 | 10 +--------- 12 files changed, 59 insertions(+), 42 deletions(-) diff --git a/src/BRepMesh/BRepMesh_CurveTessellator.cxx b/src/BRepMesh/BRepMesh_CurveTessellator.cxx index fbb1b47305..3779a52425 100644 --- a/src/BRepMesh/BRepMesh_CurveTessellator.cxx +++ b/src/BRepMesh/BRepMesh_CurveTessellator.cxx @@ -35,11 +35,13 @@ IMPLEMENT_STANDARD_RTTIEXT(BRepMesh_CurveTessellator, IMeshTools_CurveTessellato //======================================================================= BRepMesh_CurveTessellator::BRepMesh_CurveTessellator( const IMeshData::IEdgeHandle& theEdge, - const IMeshTools_Parameters& theParameters) + const IMeshTools_Parameters& theParameters, + const Standard_Integer theMinPointsNb) : myDEdge(theEdge), myParameters(theParameters), myEdge(theEdge->GetEdge()), - myCurve(myEdge) + myCurve(myEdge), + myMinPointsNb (theMinPointsNb) { init(); } @@ -52,11 +54,13 @@ BRepMesh_CurveTessellator::BRepMesh_CurveTessellator ( const IMeshData::IEdgeHandle& theEdge, const TopAbs_Orientation theOrientation, const IMeshData::IFaceHandle& theFace, - const IMeshTools_Parameters& theParameters) + const IMeshTools_Parameters& theParameters, + const Standard_Integer theMinPointsNb) : myDEdge(theEdge), myParameters(theParameters), myEdge(TopoDS::Edge(theEdge->GetEdge().Oriented(theOrientation))), - myCurve(myEdge, theFace->GetFace()) + myCurve(myEdge, theFace->GetFace()), + myMinPointsNb (theMinPointsNb) { init(); } @@ -97,7 +101,8 @@ void BRepMesh_CurveTessellator::init() myEdgeSqTol = BRep_Tool::Tolerance (myEdge); myEdgeSqTol *= myEdgeSqTol; - const Standard_Integer aMinPntNb = (myCurve.GetType() == GeomAbs_Circle) ? 4 : 2; //OCC287 + const Standard_Integer aMinPntNb = Max(myMinPointsNb, + (myCurve.GetType() == GeomAbs_Circle) ? 4 : 2); //OCC287 myDiscretTool.Initialize (myCurve, myCurve.FirstParameter(), myCurve.LastParameter(), diff --git a/src/BRepMesh/BRepMesh_CurveTessellator.hxx b/src/BRepMesh/BRepMesh_CurveTessellator.hxx index ddf3bcfa52..d9406a8423 100644 --- a/src/BRepMesh/BRepMesh_CurveTessellator.hxx +++ b/src/BRepMesh/BRepMesh_CurveTessellator.hxx @@ -34,14 +34,16 @@ public: //! Constructor. Standard_EXPORT BRepMesh_CurveTessellator( const IMeshData::IEdgeHandle& theEdge, - const IMeshTools_Parameters& theParameters); + const IMeshTools_Parameters& theParameters, + const Standard_Integer theMinPointsNb = 2); //! Constructor. Standard_EXPORT BRepMesh_CurveTessellator ( const IMeshData::IEdgeHandle& theEdge, const TopAbs_Orientation theOrientation, const IMeshData::IFaceHandle& theFace, - const IMeshTools_Parameters& theParameters); + const IMeshTools_Parameters& theParameters, + const Standard_Integer theMinPointsNb = 2); //! Destructor. Standard_EXPORT virtual ~BRepMesh_CurveTessellator (); @@ -96,6 +98,7 @@ private: const IMeshTools_Parameters& myParameters; TopoDS_Edge myEdge; BRepAdaptor_Curve myCurve; + Standard_Integer myMinPointsNb; GCPnts_TangentialDeflection myDiscretTool; TopoDS_Vertex myFirstVertex; TopoDS_Vertex myLastVertex; diff --git a/src/BRepMesh/BRepMesh_EdgeDiscret.cxx b/src/BRepMesh/BRepMesh_EdgeDiscret.cxx index a68165a291..31c7963c59 100644 --- a/src/BRepMesh/BRepMesh_EdgeDiscret.cxx +++ b/src/BRepMesh/BRepMesh_EdgeDiscret.cxx @@ -49,9 +49,10 @@ BRepMesh_EdgeDiscret::~BRepMesh_EdgeDiscret () //======================================================================= Handle(IMeshTools_CurveTessellator) BRepMesh_EdgeDiscret::CreateEdgeTessellator( const IMeshData::IEdgeHandle& theDEdge, - const IMeshTools_Parameters& theParameters) + const IMeshTools_Parameters& theParameters, + const Standard_Integer theMinPointsNb) { - return new BRepMesh_CurveTessellator(theDEdge, theParameters); + return new BRepMesh_CurveTessellator(theDEdge, theParameters, theMinPointsNb); } //======================================================================= @@ -62,11 +63,12 @@ Handle(IMeshTools_CurveTessellator) BRepMesh_EdgeDiscret::CreateEdgeTessellator( const IMeshData::IEdgeHandle& theDEdge, const TopAbs_Orientation theOrientation, const IMeshData::IFaceHandle& theDFace, - const IMeshTools_Parameters& theParameters) + const IMeshTools_Parameters& theParameters, + const Standard_Integer theMinPointsNb) { return theDEdge->GetSameParam() ? - new BRepMesh_CurveTessellator(theDEdge, theParameters) : - new BRepMesh_CurveTessellator(theDEdge, theOrientation, theDFace, theParameters); + new BRepMesh_CurveTessellator(theDEdge, theParameters, theMinPointsNb) : + new BRepMesh_CurveTessellator(theDEdge, theOrientation, theDFace, theParameters, theMinPointsNb); } //======================================================================= diff --git a/src/BRepMesh/BRepMesh_EdgeDiscret.hxx b/src/BRepMesh/BRepMesh_EdgeDiscret.hxx index c8db5ec342..89b67eda39 100644 --- a/src/BRepMesh/BRepMesh_EdgeDiscret.hxx +++ b/src/BRepMesh/BRepMesh_EdgeDiscret.hxx @@ -38,14 +38,16 @@ public: //! Creates instance of free edge tessellator. Standard_EXPORT static Handle(IMeshTools_CurveTessellator) CreateEdgeTessellator( const IMeshData::IEdgeHandle& theDEdge, - const IMeshTools_Parameters& theParameters); + const IMeshTools_Parameters& theParameters, + const Standard_Integer theMinPointsNb = 2); //! Creates instance of edge tessellator. Standard_EXPORT static Handle(IMeshTools_CurveTessellator) CreateEdgeTessellator( const IMeshData::IEdgeHandle& theDEdge, const TopAbs_Orientation theOrientation, const IMeshData::IFaceHandle& theDFace, - const IMeshTools_Parameters& theParameters); + const IMeshTools_Parameters& theParameters, + const Standard_Integer theMinPointsNb = 2); //! Creates instance of tessellation extractor. Standard_EXPORT static Handle(IMeshTools_CurveTessellator) CreateEdgeTessellationExtractor( diff --git a/src/BRepMesh/BRepMesh_ModelHealer.cxx b/src/BRepMesh/BRepMesh_ModelHealer.cxx index def938d41a..4c2eed209a 100644 --- a/src/BRepMesh/BRepMesh_ModelHealer.cxx +++ b/src/BRepMesh/BRepMesh_ModelHealer.cxx @@ -50,14 +50,32 @@ namespace void operator()(const IMeshData::IEdgePtr& theDEdge) const { const IMeshData::IEdgeHandle aDEdge = theDEdge; + + Standard_Integer aPointsNb = aDEdge->GetCurve()->ParametersNb(); + aDEdge->Clear(Standard_True); aDEdge->SetDeflection(Max(aDEdge->GetDeflection() / 3., Precision::Confusion())); + for (Standard_Integer aPCurveIt = 0; aPCurveIt < aDEdge->PCurvesNb(); ++aPCurveIt) + { + const IMeshData::IPCurveHandle& aPCurve = aDEdge->GetPCurve(aPCurveIt); + const IMeshData::IFaceHandle aDFace = aPCurve->GetFace(); + + // Check that outer wire contains 2 edges or less and add an additional point. + const IMeshData::IWireHandle& aDWire = aDFace->GetWire(0); + if (aDWire->EdgesNb() <= 2) + { + ++aPointsNb; + break; + } + } + const IMeshData::IPCurveHandle& aPCurve = aDEdge->GetPCurve(0); const IMeshData::IFaceHandle aDFace = aPCurve->GetFace(); Handle(IMeshTools_CurveTessellator) aTessellator = BRepMesh_EdgeDiscret::CreateEdgeTessellator( - aDEdge, aPCurve->GetOrientation(), aDFace, myParameters); + aDEdge, aPCurve->GetOrientation(), aDFace, + myParameters, aPointsNb); BRepMesh_EdgeDiscret::Tessellate3d(aDEdge, aTessellator, Standard_False); BRepMesh_EdgeDiscret::Tessellate2d(aDEdge, Standard_False); diff --git a/tests/bugs/mesh/bug25044_12 b/tests/bugs/mesh/bug25044_12 index 1ddf82927d..31d1c179ad 100644 --- a/tests/bugs/mesh/bug25044_12 +++ b/tests/bugs/mesh/bug25044_12 @@ -1,6 +1,3 @@ -puts "TODO 25044 ALL: SelfIntersectingWire" -puts "TODO 25044 ALL: Number of triangles is equal to 0" - puts "=======" puts "0025044: BRepMesh tweaks" puts "=======" diff --git a/tests/bugs/mesh/bug25044_13 b/tests/bugs/mesh/bug25044_13 index f02bc31f58..12b8348b95 100644 --- a/tests/bugs/mesh/bug25044_13 +++ b/tests/bugs/mesh/bug25044_13 @@ -1,6 +1,3 @@ -puts "TODO 25044 ALL: SelfIntersectingWire" -puts "TODO 25044 ALL: Number of triangles is equal to 0" - puts "=======" puts "0025044: BRepMesh tweaks" puts "=======" diff --git a/tests/bugs/mesh/bug25044_60 b/tests/bugs/mesh/bug25044_60 index 78ae386109..6c89250587 100644 --- a/tests/bugs/mesh/bug25044_60 +++ b/tests/bugs/mesh/bug25044_60 @@ -3,6 +3,9 @@ puts "0025588: BRepMesh_ShapeTool::FindUV check for 2d points to be the same is puts "=======" puts "" +puts "TODO OCC25588 All: Not connected mesh inside face 893" +puts "TODO OCC25588 All: Not connected mesh inside face 1094" + pload XDE stepread [locate_data_file Median_cx-fs01_bicycle.stp] a * diff --git a/tests/bugs/mesh/bug28500 b/tests/bugs/mesh/bug28500 index 3bab0b6875..56e1699978 100644 --- a/tests/bugs/mesh/bug28500 +++ b/tests/bugs/mesh/bug28500 @@ -3,22 +3,20 @@ puts "CR28500: Artifact in shaded view of the shape" puts "=======" puts "" -puts "TODO CR28500 ALL: Artifact in shaded view of the shape" -puts "TODO CR30056 ALL: Meshing statuses: SelfIntersectingWire Failure Reused" +restore [locate_data_file bug28500_shape_mesh_artifact.brep] result -restore [locate_data_file bug28500_shape_mesh_artifact.brep] a - -incmesh a 0.01 +tclean result +incmesh result 0.01 vinit vsetdispmode 1 -vdisplay a +vdefaults -autoTriang 0 +vdisplay result vfit -set x 150 -set y 150 -if { [checkcolor $x $y 0 1 0] == 1 } { - puts "Error: Artifact in shaded view of the shape" +set log [tricheck result] +if { [llength $log] != 0 } { + puts "Error : Mesh contains faulties" } checkview -screenshot -3d -path ${imagedir}/${test_image}.png diff --git a/tests/bugs/mesh/bug32692_1 b/tests/bugs/mesh/bug32692_1 index 5a85bff3db..1712b35ab1 100644 --- a/tests/bugs/mesh/bug32692_1 +++ b/tests/bugs/mesh/bug32692_1 @@ -8,4 +8,4 @@ puts "REQUIRED ALL: Meshing statuses: SelfIntersectingWire Failure" restore [locate_data_file bug32692.brep] s incmesh s 0.01 -parallel -checktrinfo s -nod 7427 -tri 7457 -empty 9 -face 309 +checktrinfo s -nod 7389 -tri 7419 -empty 9 -face 309 diff --git a/tests/hlr/poly_hlr/C3 b/tests/hlr/poly_hlr/C3 index 6efe35f15c..b6806e8256 100644 --- a/tests/hlr/poly_hlr/C3 +++ b/tests/hlr/poly_hlr/C3 @@ -1,5 +1,5 @@ set viewname "vright" -set length 3059.05 +set length 3057.35 testreadstep [locate_data_file bug27341_570-DWLNL-40-08-L_131LANG_16VERSATZ_DIN.stp] a COMPUTE_HLR $viewname $algotype diff --git a/tests/hlr/poly_hlr/bug23625_1 b/tests/hlr/poly_hlr/bug23625_1 index 598634bec4..ed7a28c97a 100644 --- a/tests/hlr/poly_hlr/bug23625_1 +++ b/tests/hlr/poly_hlr/bug23625_1 @@ -3,16 +3,8 @@ puts "OCC23625" puts "============" puts "" -puts "REQUIRED All: Meshing statuses: SelfIntersectingWire Failure" - set viewname "vfront" -set length 26411.7 +set length 26411.2 restore [locate_data_file bug23625_a1.brep] a - -# workaround bug 0031426 until fix -vinit View1 -vdefaults -autoTriang 0 -incmesh a 7.6 - COMPUTE_HLR $viewname $algotype From 3c9178dd5c3c159b795648ffc64316b67f6caafa Mon Sep 17 00:00:00 2001 From: vmigunov Date: Wed, 19 Oct 2022 12:15:09 +0300 Subject: [PATCH 402/639] 0033165: Data exchange - Instance name is not saved during writing step file Instance name is saved also with identity location transformation --- src/STEPControl/STEPControl_ActorWrite.cxx | 4 ++- tests/bugs/modalg_8/bug33165 | 41 ++++++++++++++++++++++ 2 files changed, 44 insertions(+), 1 deletion(-) create mode 100644 tests/bugs/modalg_8/bug33165 diff --git a/src/STEPControl/STEPControl_ActorWrite.cxx b/src/STEPControl/STEPControl_ActorWrite.cxx index 6b0706c9fe..3caee36941 100644 --- a/src/STEPControl/STEPControl_ActorWrite.cxx +++ b/src/STEPControl/STEPControl_ActorWrite.cxx @@ -1595,8 +1595,10 @@ Handle(Transfer_Binder) STEPControl_ActorWrite::TransferSubShape // SINON, la shape est prise et transferee telle quelle TopoDS_Shape sh0 = shape; gp_Trsf aLoc; + Standard_Boolean isShapeLocated = Standard_False; if ( GroupMode() >0) { TopLoc_Location shloc = shape.Location(); + isShapeLocated = !shloc.IsIdentity(); aLoc = shloc.Transformation(); TopLoc_Location shident; sh0.Location (shident); @@ -1676,7 +1678,7 @@ Handle(Transfer_Binder) STEPControl_ActorWrite::TransferSubShape myContext.NextIndex(); // abv 16.10.00: bind CDSR (et al) to located shape in order to be able to track instances - if (mapper != start && aLoc.Form() != gp_Identity) { + if (mapper != start && isShapeLocated) { Handle(Transfer_Binder) bnd = FP->Find ( start ); for ( Standard_Integer j=1; j <= roots->Length(); j++ ) if ( bnd.IsNull() ) bnd = TransientResult ( roots->Value(j) ); diff --git a/tests/bugs/modalg_8/bug33165 b/tests/bugs/modalg_8/bug33165 new file mode 100644 index 0000000000..acc9a454af --- /dev/null +++ b/tests/bugs/modalg_8/bug33165 @@ -0,0 +1,41 @@ +puts "====================================" +puts "0033165: Data exchange - Instance name is not saved during writing step file" +puts "====================================" +puts "" + +pload OCAF XDEDRAW + +box b 1 1 1 +reset b +copy b b1 + +# set valid location with identity matrix +reset b1 + +ttranslate b 1 1 1 + +compound b1 b c +XNewDoc d +XAddShape d c 1 + +set label1 "0:1:1:1:1" +set label2 "0:1:1:1:2" +set name1 "name1" +set name2 "name2" + +SetName d $label1 $name1 +SetName d $label2 $name2 + +set file $imagedir/${test_image}.stp +WriteStep d $file +ReadStep d1 $file + +if { [GetName d1 $label1] != $name1 } { + puts "Error: The name is missed" +} + +if { [GetName d1 $label2] != $name2 } { + puts "Error: The name is missed" +} + +file delete -force ${file} \ No newline at end of file From 25b5e83a4c8c24c531d861272b06ae7f005a711c Mon Sep 17 00:00:00 2001 From: akaftasev Date: Tue, 18 Oct 2022 09:39:03 +0300 Subject: [PATCH 403/639] 0032691: Modeling Algorithms - Exception when trying to build solid during sweep algorithm Changed the condition for checking the correctness of the sweep algorithm. Exception is no longer raised, algorithm finishes with "Not done" status. --- src/BRepFill/BRepFill_Sweep.cxx | 2 +- tests/bugs/modalg_7/bug32691 | 19 +++++++++++++++++++ 2 files changed, 20 insertions(+), 1 deletion(-) create mode 100644 tests/bugs/modalg_7/bug32691 diff --git a/src/BRepFill/BRepFill_Sweep.cxx b/src/BRepFill/BRepFill_Sweep.cxx index 1be188dd79..e6a1e238b8 100644 --- a/src/BRepFill/BRepFill_Sweep.cxx +++ b/src/BRepFill/BRepFill_Sweep.cxx @@ -3002,7 +3002,7 @@ void BRepFill_Sweep::Build(TopTools_MapOfShape& ReversedEdges, } } - if (aNbFaces == 0) + if ((NbTrous > 0) ? (aNbFaces < NbLaw) : (aNbFaces == 0)) { isDone = Standard_False; return; diff --git a/tests/bugs/modalg_7/bug32691 b/tests/bugs/modalg_7/bug32691 new file mode 100644 index 0000000000..e3132262b5 --- /dev/null +++ b/tests/bugs/modalg_7/bug32691 @@ -0,0 +1,19 @@ +puts "==============================================" +puts "0032691: Modeling Algorithms - Crash when trying to build solid during sweep algorithm" +puts "==============================================" +puts "" + +puts "REQUIRED ALL: Buildsweep : Not Done" + +bsplinecurve s 3 8 0 4 1 3 2 3 3 3 4 3 5 3 6 3 7 4 65.1 7.3076 2.1 1 65.1 7.3027 1.9217 1 65.1 7.2978 1.7434 1 65.1 7.2928 1.5652 1 65.1 7.2899 1.4588 1 65.1 7.2869 1.3524 1 65.1 7.284 1.2461 1 65.1 7.272 1.2388 1 65.1 7.26 1.2315 1 65.1 7.248 1.2243 1 65.1 7.1717 1.1778 1 65.1 7.0954 1.1314 1 65.1 7.019 1.0849 1 65.1 6.9424 1.0379 1 65.1 6.8657 0.9909 1 65.1 6.789 0.9438 1 65.1 6.7782 0.9372 1 65.1 6.7673 0.9305 1 65.1 6.7565 0.9238 1 65.1 6.7436 0.9159 1 65.1 6.7307 0.908 1 65.1 6.7178 0.9 1 +mkedge s s +wire s s + +polyline p 65.09999999999999 7.3076 2.1 65.0855660928097 7.16839889506023 2.10383597533476 65.0746247111087 7.16953256986072 2.10380518704116 65.08905861829901 7.30873367480049 2.0999692117064 65.09999999999999 7.3076 2.1 + +mksweep s +addsweep p +setsweep -DT +if [catch {buildsweep r -C -S}] { + puts "Error: exception is raised" +} From 5cbd98a5be543f46a215b4e7bede5e04a1ccee2f Mon Sep 17 00:00:00 2001 From: akaftasev Date: Fri, 14 Oct 2022 11:00:50 +0300 Subject: [PATCH 404/639] 0029093: BOP PaveFiller hungs and constantly consumes memory Method IntWalk_PWalking::ExtendLineInCommonZone(...) now is not called if the already found intersection point is on surface boundary. As result, the intersection line going along any boundary will never be extended. It is appropriate for high-level OCCT-algorithm because they will take the boundary (not computed line) as intersection result. --- src/IntWalk/IntWalk_PWalking.cxx | 50 ++++++++++++++++++++++++++++++++ tests/perf/modalg/bug29093 | 30 +++++++++++++++++++ 2 files changed, 80 insertions(+) create mode 100644 tests/perf/modalg/bug29093 diff --git a/src/IntWalk/IntWalk_PWalking.cxx b/src/IntWalk/IntWalk_PWalking.cxx index 464e42f876..bc32b6a9ed 100644 --- a/src/IntWalk/IntWalk_PWalking.cxx +++ b/src/IntWalk/IntWalk_PWalking.cxx @@ -1694,6 +1694,20 @@ void IntWalk_PWalking::Perform(const TColStd_Array1OfReal& ParDep, Standard_Boolean IntWalk_PWalking::ExtendLineInCommonZone(const IntImp_ConstIsoparametric theChoixIso, const Standard_Boolean theDirectionFlag) { + // Caro1 and Caro2 + const Handle(Adaptor3d_Surface)& Caro1 = myIntersectionOn2S.Function().AuxillarSurface1(); + const Handle(Adaptor3d_Surface)& Caro2 = myIntersectionOn2S.Function().AuxillarSurface2(); + // + const Standard_Real UFirst1 = Adaptor3d_HSurfaceTool::FirstUParameter(Caro1); + const Standard_Real VFirst1 = Adaptor3d_HSurfaceTool::FirstVParameter(Caro1); + const Standard_Real ULast1 = Adaptor3d_HSurfaceTool::LastUParameter(Caro1); + const Standard_Real VLast1 = Adaptor3d_HSurfaceTool::LastVParameter(Caro1); + + const Standard_Real UFirst2 = Adaptor3d_HSurfaceTool::FirstUParameter(Caro2); + const Standard_Real VFirst2 = Adaptor3d_HSurfaceTool::FirstVParameter(Caro2); + const Standard_Real ULast2 = Adaptor3d_HSurfaceTool::LastUParameter(Caro2); + const Standard_Real VLast2 = Adaptor3d_HSurfaceTool::LastVParameter(Caro2); + Standard_Boolean bOutOfTangentZone = Standard_False; Standard_Boolean bStop = !myIntersectionOn2S.IsTangent(); Standard_Integer dIncKey = 1; @@ -1705,6 +1719,42 @@ Standard_Boolean IntWalk_PWalking::ExtendLineInCommonZone(const IntImp_ConstIsop Standard_Integer uvit = 0; IntSurf_SequenceOfPntOn2S aSeqOfNewPoint; + previousPoint.Parameters(Param(1), Param(2), Param(3), Param(4)); + + if (Param(1) - UFirst1 < ResoU1) + { + return bOutOfTangentZone; + } + else if (Param(2) - VFirst1 < ResoV1) + { + return bOutOfTangentZone; + } + else if (Param(3) - UFirst2 < ResoU2) + { + return bOutOfTangentZone; + } + else if (Param(4) - VFirst2 < ResoV2) + { + return bOutOfTangentZone; + } + + if (Param(1) - ULast1 > -ResoU1) + { + return bOutOfTangentZone; + } + else if (Param(2) - VLast1 > -ResoV1) + { + return bOutOfTangentZone; + } + else if (Param(3) - ULast2 > -ResoU2) + { + return bOutOfTangentZone; + } + else if (Param(4) - VLast2 > -ResoV2) + { + return bOutOfTangentZone; + } + while (!bStop) { nbIterWithoutAppend++; diff --git a/tests/perf/modalg/bug29093 b/tests/perf/modalg/bug29093 new file mode 100644 index 0000000000..43f155e093 --- /dev/null +++ b/tests/perf/modalg/bug29093 @@ -0,0 +1,30 @@ +puts "========" +puts "0029093: BOP PaveFiller hungs and constantly consumes memory" +puts "========" +puts "" + +bclearobjects; +bcleartools; + +restore [locate_data_file bug29093.brep] a + +explode a So +baddobjects a_7 +baddtools a_9 + +dchrono cr restart + +bfillds +bbuild result + +dchrono cr stop counter bbuild + +checkshape result +checkprops result -s 1329680 -v 34507100 +checknbshapes result -vertex 5 -edge 13 -wire 9 -face 9 -shell 3 -solid 3 + +smallview +donly result +fit + +checkview -display result -2d -path ${imagedir}/${test_image}.png From 3b5a94a165051ebb44e3cf9d099eb9f70a0355cc Mon Sep 17 00:00:00 2001 From: oan Date: Thu, 20 Oct 2022 14:25:26 +0300 Subject: [PATCH 405/639] 0033050: [Regression to OCCT 7.3.0] Mesh - meshing deflection is not reached Add parameter EnableControlSurfaceDeflectionAllSurfaces to IMeshTools_Parameters enabling possibility to optimize mesh even on analytical surfaces; Add corresponding parameter -surf_def_all to incmesh Draw command. --- src/BRepMesh/BRepMesh_MeshAlgoFactory.cxx | 28 +++++++++++----- src/IMeshTools/IMeshTools_Parameters.hxx | 5 +++ src/MeshTest/MeshTest.cxx | 6 ++++ tests/bugs/mesh/bug33050 | 41 +++++++++++++++++++++++ 4 files changed, 71 insertions(+), 9 deletions(-) create mode 100644 tests/bugs/mesh/bug33050 diff --git a/src/BRepMesh/BRepMesh_MeshAlgoFactory.cxx b/src/BRepMesh/BRepMesh_MeshAlgoFactory.cxx index ce7cb6fba9..917645f823 100644 --- a/src/BRepMesh/BRepMesh_MeshAlgoFactory.cxx +++ b/src/BRepMesh/BRepMesh_MeshAlgoFactory.cxx @@ -73,27 +73,37 @@ Handle(IMeshTools_MeshAlgo) BRepMesh_MeshAlgoFactory::GetAlgo( switch (theSurfaceType) { case GeomAbs_Plane: - return theParameters.InternalVerticesMode ? - new NodeInsertionMeshAlgo::Type : - new BaseMeshAlgo::Type; + return theParameters.EnableControlSurfaceDeflectionAllSurfaces ? + new DeflectionControlMeshAlgo::Type : + (theParameters.InternalVerticesMode ? + new NodeInsertionMeshAlgo::Type : + new BaseMeshAlgo::Type); break; case GeomAbs_Sphere: - return new NodeInsertionMeshAlgo::Type; + return theParameters.EnableControlSurfaceDeflectionAllSurfaces ? + new DeflectionControlMeshAlgo::Type : + new NodeInsertionMeshAlgo::Type; break; case GeomAbs_Cylinder: - return theParameters.InternalVerticesMode ? - new NodeInsertionMeshAlgo::Type : - new BaseMeshAlgo::Type; + return theParameters.EnableControlSurfaceDeflectionAllSurfaces ? + new DeflectionControlMeshAlgo::Type : + (theParameters.InternalVerticesMode ? + new NodeInsertionMeshAlgo::Type : + new BaseMeshAlgo::Type); break; case GeomAbs_Cone: - return new NodeInsertionMeshAlgo::Type; + return theParameters.EnableControlSurfaceDeflectionAllSurfaces ? + new DeflectionControlMeshAlgo::Type : + new NodeInsertionMeshAlgo::Type; break; case GeomAbs_Torus: - return new NodeInsertionMeshAlgo::Type; + return theParameters.EnableControlSurfaceDeflectionAllSurfaces ? + new DeflectionControlMeshAlgo::Type : + new NodeInsertionMeshAlgo::Type; break; case GeomAbs_SurfaceOfRevolution: diff --git a/src/IMeshTools/IMeshTools_Parameters.hxx b/src/IMeshTools/IMeshTools_Parameters.hxx index 4bbff6a902..be3ea1820b 100644 --- a/src/IMeshTools/IMeshTools_Parameters.hxx +++ b/src/IMeshTools/IMeshTools_Parameters.hxx @@ -35,6 +35,7 @@ struct IMeshTools_Parameters { Relative (Standard_False), InternalVerticesMode (Standard_True), ControlSurfaceDeflection (Standard_True), + EnableControlSurfaceDeflectionAllSurfaces(Standard_False), CleanModel (Standard_True), AdjustMinSize (Standard_False), ForceFaceDeflection (Standard_False), @@ -85,6 +86,10 @@ struct IMeshTools_Parameters { //! the face Standard_Boolean ControlSurfaceDeflection; + // Enables/disables check triggered by ControlSurfaceDeflection flag + // for all types of surfaces including analytical. + Standard_Boolean EnableControlSurfaceDeflectionAllSurfaces; + //! Cleans temporary data model when algorithm is finished. Standard_Boolean CleanModel; diff --git a/src/MeshTest/MeshTest.cxx b/src/MeshTest/MeshTest.cxx index 351b51379c..4c165a8822 100644 --- a/src/MeshTest/MeshTest.cxx +++ b/src/MeshTest/MeshTest.cxx @@ -116,6 +116,10 @@ static Standard_Integer incrementalmesh (Draw_Interpretor& theDI, { aMeshParams.ControlSurfaceDeflection = !Draw::ParseOnOffIterator (theNbArgs, theArgVec, anArgIter); } + else if (aNameCase == "-surf_def_all") + { + aMeshParams.EnableControlSurfaceDeflectionAllSurfaces = Draw::ParseOnOffIterator(theNbArgs, theArgVec, anArgIter); + } else if (aNameCase == "-adjust_min") { aMeshParams.AdjustMinSize = Draw::ParseOnOffNoIterator (theNbArgs, theArgVec, anArgIter); @@ -1620,6 +1624,8 @@ void MeshTest::Commands(Draw_Interpretor& theCommands) "\n\t\t: -ai angular deflection inside of faces in deg (~57.29 deg = 1 rad by default);" "\n\t\t: -int_vert_off disables insertion of internal vertices into mesh (enabled by default);" "\n\t\t: -surf_def_off disables control of deflection of mesh from real surface (enabled by default);" + "\n\t\t: -surf_def_all enables control of deflection of mesh from real surface for all types of surfaces" + "\n\t\t: (FALSE by default);" "\n\t\t: -adjust_min enables local adjustment of min size depending on edge size (FALSE by default);" "\n\t\t: -force_face_def disables usage of shape tolerances for computing face deflection (FALSE by default);" "\n\t\t: -decrease enforces the meshing of the shape even if current mesh satisfies the new criteria" diff --git a/tests/bugs/mesh/bug33050 b/tests/bugs/mesh/bug33050 new file mode 100644 index 0000000000..466cfe9a2f --- /dev/null +++ b/tests/bugs/mesh/bug33050 @@ -0,0 +1,41 @@ +puts "================" +puts "0033050: \[Regression to OCCT 7.3.0\] Mesh - meshing deflection is not reached" +puts "================" +puts "" + +restore [locate_data_file bug33050.brep] result + +################## Deflection: 0.001 ################## +tclean result +incmesh result 0.001 + +checktrinfo result -tri 27652 -nod 28016 -defl 0.0027132671526737435 -tol_abs_defl 1e-6 + +tclean result +incmesh result 0.001 -surf_def_all + +checktrinfo result -tri 30102 -nod 29241 -defl 0.0010301984083541042 -tol_abs_defl 1e-6 + +################## Deflection: 0.0001 ################# + +tclean result +incmesh result 0.0001 + +checktrinfo result -tri 88140 -nod 84304 -defl 0.00073349807253346574 -tol_abs_defl 1e-6 + +tclean result +incmesh result 0.0001 -surf_def_all + +checktrinfo result -tri 103376 -nod 91922 -defl 0.00012553867394267057 -tol_abs_defl 1e-6 + +################## Deflection: 0.00005 ################ + +tclean result +incmesh result 0.00005 + +checktrinfo result -tri 127538 -nod 119773 -defl 0.00043153032084638013 -tol_abs_defl 1e-6 + +tclean result +incmesh result 0.00005 -surf_def_all + +checktrinfo result -tri 154246 -nod 133127 -defl 5.1157129731636775e-05 -tol_abs_defl 1e-6 \ No newline at end of file From 59223e118db73b4b7dcaa45639f13287f8a48f59 Mon Sep 17 00:00:00 2001 From: oan Date: Wed, 31 Aug 2022 17:40:33 +0300 Subject: [PATCH 406/639] 0031926: Shape Healing - ShapeAnalysis::OuterWire() considers next iteration element always to be a wire causing skipping of primal one ShapeAnalysis::OuterWire(): fixed missed logic when TopoDS_Iterator notifies about more objects to iterate, but there are only vertices and no additional wires at all. --- src/ShapeAnalysis/ShapeAnalysis.cxx | 35 +++++++++++--------------- src/ShapeAnalysis/ShapeAnalysis.hxx | 9 +++---- tests/bugs/mesh/bug31144 | 1 - tests/bugs/mesh/bug31926 | 39 +++++++++++++++++++++++++++++ 4 files changed, 57 insertions(+), 27 deletions(-) create mode 100644 tests/bugs/mesh/bug31926 diff --git a/src/ShapeAnalysis/ShapeAnalysis.cxx b/src/ShapeAnalysis/ShapeAnalysis.cxx index 6e18ddd42c..5517a17b35 100644 --- a/src/ShapeAnalysis/ShapeAnalysis.cxx +++ b/src/ShapeAnalysis/ShapeAnalysis.cxx @@ -229,36 +229,31 @@ Standard_Boolean ShapeAnalysis::IsOuterBound(const TopoDS_Face& face) } //======================================================================= -//function : OuterBound -//purpose : replacement of bad BRepTools::OuterBound(), to be merged -// - skips internal vertices in face, if any, without exception -// - returns positively oriented wire rather than greater one +//function : OuterWire +//purpose : Returns positively oriented wire in the face. +// If there is no one - returns the last wire of the face. //======================================================================= -TopoDS_Wire ShapeAnalysis::OuterWire(const TopoDS_Face& face) +TopoDS_Wire ShapeAnalysis::OuterWire(const TopoDS_Face& theFace) { - TopoDS_Face F = face; - F.Orientation(TopAbs_FORWARD); + TopoDS_Face aF = theFace; + aF.Orientation (TopAbs_FORWARD); - BRep_Builder B; - TopoDS_Iterator anIt (F, Standard_False); + TopExp_Explorer anIt (aF, TopAbs_WIRE); while (anIt.More()) { - TopoDS_Shape aWire = anIt.Value(); + TopoDS_Wire aWire = TopoDS::Wire (anIt.Value()); anIt.Next(); - // skip possible internal vertices in face - if (aWire.ShapeType() != TopAbs_WIRE) - continue; - // if current wire is the last one, return it without analysis - if (! anIt.More()) - return TopoDS::Wire (aWire); + if (!anIt.More()) + return aWire; - TopoDS_Shape aTestFace = F.EmptyCopied(); - B.Add (aTestFace, aWire); - if (ShapeAnalysis::IsOuterBound (TopoDS::Face (aTestFace))) - return TopoDS::Wire (aWire); + // Check if the wire has positive area + Handle(ShapeExtend_WireData) aSEWD = new ShapeExtend_WireData (aWire); + Standard_Real anArea2d = ShapeAnalysis::TotCross2D (aSEWD, aF); + if (anArea2d >= 0.) + return aWire; } return TopoDS_Wire(); } diff --git a/src/ShapeAnalysis/ShapeAnalysis.hxx b/src/ShapeAnalysis/ShapeAnalysis.hxx index be6f228ab5..fc6bdccdd4 100644 --- a/src/ShapeAnalysis/ShapeAnalysis.hxx +++ b/src/ShapeAnalysis/ShapeAnalysis.hxx @@ -51,12 +51,9 @@ public: DEFINE_STANDARD_ALLOC - //! Returns the outer wire on the face . - //! This is replacement of the method BRepTools::OuterWire - //! until it works badly. - //! Returns the first wire oriented as outer according to - //! FClass2d_Classifier. If none, last wire is returned. - Standard_EXPORT static TopoDS_Wire OuterWire (const TopoDS_Face& face); + //! Returns positively oriented wire in the face. + //! If there is no such wire - returns the last wire of the face. + Standard_EXPORT static TopoDS_Wire OuterWire (const TopoDS_Face& theFace); //! Returns a total area of 2d wire Standard_EXPORT static Standard_Real TotCross2D (const Handle(ShapeExtend_WireData)& sewd, const TopoDS_Face& aFace); diff --git a/tests/bugs/mesh/bug31144 b/tests/bugs/mesh/bug31144 index 31f40afbe2..173e6403a7 100644 --- a/tests/bugs/mesh/bug31144 +++ b/tests/bugs/mesh/bug31144 @@ -2,7 +2,6 @@ puts "=======" puts "0031144: Shape Healing - ShapeAnalysis::OuterWire() infinite loop on solid obtained from IFC" puts "=======" puts "" -puts "REQUIRED ALL: Meshing statuses: Failure" cpulimit 10 diff --git a/tests/bugs/mesh/bug31926 b/tests/bugs/mesh/bug31926 new file mode 100644 index 0000000000..edc55f2e0f --- /dev/null +++ b/tests/bugs/mesh/bug31926 @@ -0,0 +1,39 @@ +puts "========" +puts "0031926: Shape Healing - ShapeAnalysis::OuterWire() considers next iteration element always to be a wire causing skipping of primal one" +puts "========" +puts "" + +vertex v11 0 1 0; vertex v12 1 0 0; vertex v13 0 0 0 +edge e11 v11 v12; edge e12 v12 v13; edge e13 v13 v11 +wire w1 e11 e12 e13 +mkplane f1 w1 + +vertex v21 0 0 2; vertex v22 1 0 0; vertex v23 0 0 0 +edge e21 v21 v22; edge e22 v22 v23; edge e23 v23 v21 +wire w2 e21 e22 e23 +mkplane f2 w2 + +vertex v31 0 0 2; vertex v32 0 1 0; vertex v33 1 0 0 +edge e31 v31 v32; edge e32 v32 v33; edge e33 v33 v31 +wire w3 e31 e32 e33 +mkplane f3 w3 + +vertex v41 0 0 2; vertex v42 0 0 0; vertex v43 0 1 0 +edge e41 v41 v42; edge e42 v42 v43; edge e43 v43 v41 +wire w4 e41 e42 e43 +mkplane f4 w4 + +psphere s1 1 +sewing sh2 f1 f2 f3 f4 +ssolid sh2 s2 +bcut result s1 s2 +incmesh result 1 + +checkview -display result -3d -path ${imagedir}/${test_image}.png + +set log [tricheck result] +if { [llength $log] != 0 } { + puts "Error : Invalid mesh" +} else { + puts "Mesh is OK" +} From b77de43fb0ee2ba27b9fd86e96e3ffb0592ad5b9 Mon Sep 17 00:00:00 2001 From: oan Date: Thu, 20 Oct 2022 21:09:09 +0300 Subject: [PATCH 407/639] 0032053: Mesh - Invalid mesh after shape scaling Added test case --- tests/bugs/mesh/bug32053 | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 tests/bugs/mesh/bug32053 diff --git a/tests/bugs/mesh/bug32053 b/tests/bugs/mesh/bug32053 new file mode 100644 index 0000000000..304534d136 --- /dev/null +++ b/tests/bugs/mesh/bug32053 @@ -0,0 +1,14 @@ +puts "=======" +puts "0032053: Mesh - Invalid mesh after shape scaling" +puts "=======" +puts "" + +restore [locate_data_file bug32053_prob_face.brep] a + +scaleshape result a 0.1 +vdisplay result -dispMode 1 +vfit + +checktrinfo result -tri 168 -nod 133 + +checkview -screenshot -3d -path ${imagedir}/${test_image}.png From 3e06b70623ce332356b80410347235d4a9d4a581 Mon Sep 17 00:00:00 2001 From: mahaidong <13501108114@163.com> Date: Fri, 14 May 2021 14:35:28 +0800 Subject: [PATCH 408/639] 0032350: Data Exchange - STEPControl_Writer.writeStream(std::ostream) STEPCAFControl_Writer::WriteStream(), STEPControl_Writer::WriteStream() - added interface for writing into stream. STEPCAFControl_Reader::ReadStream() - added stream reading method (similar to STEPControl_Reader::ReadStream()). Added option -stream to commands ReadStep, WriteStep, and testwritestep. --- src/STEPCAFControl/STEPCAFControl_Reader.cxx | 16 +- src/STEPCAFControl/STEPCAFControl_Reader.hxx | 17 +- src/STEPCAFControl/STEPCAFControl_Writer.cxx | 66 +++- src/STEPCAFControl/STEPCAFControl_Writer.hxx | 6 +- src/STEPControl/STEPControl_Writer.cxx | 34 +- src/STEPControl/STEPControl_Writer.hxx | 9 +- src/XDEDRAW/XDEDRAW_Common.cxx | 358 ++++++++++++------- src/XSDRAWSTEP/XSDRAWSTEP.cxx | 88 ++++- tests/bugs/step/bug32350 | 36 ++ 9 files changed, 443 insertions(+), 187 deletions(-) create mode 100644 tests/bugs/step/bug32350 diff --git a/src/STEPCAFControl/STEPCAFControl_Reader.cxx b/src/STEPCAFControl/STEPCAFControl_Reader.cxx index 04fc8af7d3..6c2ccfa8b4 100644 --- a/src/STEPCAFControl/STEPCAFControl_Reader.cxx +++ b/src/STEPCAFControl/STEPCAFControl_Reader.cxx @@ -336,14 +336,22 @@ TCollection_ExtendedString STEPCAFControl_Reader::convertName (const TCollection //======================================================================= //function : ReadFile -//purpose : +//purpose : //======================================================================= - -IFSelect_ReturnStatus STEPCAFControl_Reader::ReadFile(const Standard_CString filename) +IFSelect_ReturnStatus STEPCAFControl_Reader::ReadFile (const Standard_CString theFileName) { - return myReader.ReadFile(filename); + return myReader.ReadFile (theFileName); } +//======================================================================= +//function : ReadStream +//purpose : +//======================================================================= +IFSelect_ReturnStatus STEPCAFControl_Reader::ReadStream (const Standard_CString theName, + std::istream& theIStream) +{ + return myReader.ReadStream (theName, theIStream); +} //======================================================================= //function : NbRootsForTransfer diff --git a/src/STEPCAFControl/STEPCAFControl_Reader.hxx b/src/STEPCAFControl/STEPCAFControl_Reader.hxx index a32197d168..1b1ac0c55a 100644 --- a/src/STEPCAFControl/STEPCAFControl_Reader.hxx +++ b/src/STEPCAFControl/STEPCAFControl_Reader.hxx @@ -73,11 +73,20 @@ public: //! Clears the internal data structures and attaches to a new session //! Clears the session if it was not yet set for STEP Standard_EXPORT void Init (const Handle(XSControl_WorkSession)& WS, const Standard_Boolean scratch = Standard_True); - + //! Loads a file and returns the read status - //! Provided for use like single-file reader - Standard_EXPORT IFSelect_ReturnStatus ReadFile (const Standard_CString filename); - + //! Provided for use like single-file reader. + //! @param theFileName [in] file to open + //! @return read status + Standard_EXPORT IFSelect_ReturnStatus ReadFile (const Standard_CString theFileName); + + //! Loads a file from stream and returns the read status. + //! @param theName [in] auxiliary stream name + //! @param theIStream [in] stream to read from + //! @return read status + Standard_EXPORT IFSelect_ReturnStatus ReadStream (const Standard_CString theName, + std::istream& theIStream); + //! Returns number of roots recognized for transfer //! Shortcut for Reader().NbRootsForTransfer() Standard_EXPORT Standard_Integer NbRootsForTransfer(); diff --git a/src/STEPCAFControl/STEPCAFControl_Writer.cxx b/src/STEPCAFControl/STEPCAFControl_Writer.cxx index b5a617282a..521d043df4 100644 --- a/src/STEPCAFControl/STEPCAFControl_Writer.cxx +++ b/src/STEPCAFControl/STEPCAFControl_Writer.cxx @@ -302,34 +302,51 @@ void STEPCAFControl_Writer::Init (const Handle(XSControl_WorkSession)& WS, //function : Write //purpose : //======================================================================= - -IFSelect_ReturnStatus STEPCAFControl_Writer::Write (const Standard_CString filename) +IFSelect_ReturnStatus STEPCAFControl_Writer::Write (const Standard_CString theFileName) { - IFSelect_ReturnStatus status = myWriter.Write ( filename ); + IFSelect_ReturnStatus aStatus = myWriter.Write (theFileName); + if (aStatus != IFSelect_RetDone) + { + return aStatus; + } // get directory name of the main file - OSD_Path mainfile ( filename ); - mainfile.SetName ( "" ); - mainfile.SetExtension ( "" ); - TCollection_AsciiString dpath; - mainfile.SystemName ( dpath ); + TCollection_AsciiString aDirPath; + { + OSD_Path aMainFile (theFileName); + aMainFile.SetName (""); + aMainFile.SetExtension (""); + aMainFile.SystemName (aDirPath); + } - NCollection_DataMap::Iterator it(myFiles); - for ( ; it.More(); it.Next() ) { - Handle(STEPCAFControl_ExternFile) EF = it.Value(); - if ( EF->GetWriteStatus() != IFSelect_RetVoid ) continue; + for (NCollection_DataMap::Iterator anExtFileIter (myFiles); + anExtFileIter.More(); anExtFileIter.Next()) + { + Handle(STEPCAFControl_ExternFile) anExtFile = anExtFileIter.Value(); + if (anExtFile->GetWriteStatus() != IFSelect_RetVoid) + { + continue; + } // construct extern file name - TCollection_AsciiString fname = OSD_Path::AbsolutePath ( dpath, EF->GetName()->String() ); - if ( fname.Length() <= 0 ) fname = EF->GetName()->String(); + TCollection_AsciiString aFileName = OSD_Path::AbsolutePath (aDirPath, anExtFile->GetName()->String()); + if (aFileName.Length() <= 0) + { + aFileName = anExtFile->GetName()->String(); + } #ifdef OCCT_DEBUG - std::cout << "Writing external file: " << fname.ToCString() << std::endl; + std::cout << "Writing external file: " << aFileName << std::endl; #endif - EF->SetWriteStatus ( EF->GetWS()->SendAll ( fname.ToCString() ) ); + const IFSelect_ReturnStatus anExtStatus = anExtFile->GetWS()->SendAll (aFileName.ToCString()); + anExtFile->SetWriteStatus (anExtStatus); + if (anExtStatus != IFSelect_RetDone) + { + aStatus = anExtStatus; + } } - return status; + return aStatus; } //======================================================================= @@ -352,6 +369,21 @@ void STEPCAFControl_Writer::prepareUnit(const TDF_Label& theLabel, } } +//======================================================================= +//function : WriteStream +//purpose : +//======================================================================= +IFSelect_ReturnStatus STEPCAFControl_Writer::WriteStream (std::ostream& theStream) +{ + if (!myFiles.IsEmpty()) + { + // writing external files is unsupported via stream interface + return IFSelect_RetError; + } + + return myWriter.WriteStream (theStream); +} + //======================================================================= //function : Transfer //purpose : diff --git a/src/STEPCAFControl/STEPCAFControl_Writer.hxx b/src/STEPCAFControl/STEPCAFControl_Writer.hxx index df6a4545d6..ca7f4b5340 100644 --- a/src/STEPCAFControl/STEPCAFControl_Writer.hxx +++ b/src/STEPCAFControl/STEPCAFControl_Writer.hxx @@ -70,7 +70,11 @@ public: //! filename will be a name of root file, all other files //! have names of corresponding parts //! Provided for use like single-file writer - Standard_EXPORT IFSelect_ReturnStatus Write (const Standard_CString filename); + Standard_EXPORT IFSelect_ReturnStatus Write (const Standard_CString theFileName); + + //! Writes all the produced models into the stream. + //! Provided for use like single-file writer + Standard_EXPORT IFSelect_ReturnStatus WriteStream (std::ostream& theStream); //! Transfers a document (or single label) to a STEP model //! The mode of translation of shape is AsIs diff --git a/src/STEPControl/STEPControl_Writer.cxx b/src/STEPControl/STEPControl_Writer.cxx index 5ab4d6bff1..96756267ec 100644 --- a/src/STEPControl/STEPControl_Writer.cxx +++ b/src/STEPControl/STEPControl_Writer.cxx @@ -18,6 +18,9 @@ #include #include #include +#include +#include +#include #include #include #include @@ -147,14 +150,37 @@ IFSelect_ReturnStatus STEPControl_Writer::Transfer //======================================================================= //function : Write -//purpose : +//purpose : //======================================================================= - -IFSelect_ReturnStatus STEPControl_Writer::Write (const Standard_CString filename) +IFSelect_ReturnStatus STEPControl_Writer::Write (const Standard_CString theFileName) { - return thesession->SendAll(filename); + return thesession->SendAll (theFileName); } +//======================================================================= +//function : WriteStream +//purpose : +//======================================================================= +IFSelect_ReturnStatus STEPControl_Writer::WriteStream (std::ostream& theOStream) +{ + Handle(StepData_StepModel) aModel = Model(); + if (aModel.IsNull()) + { + return IFSelect_RetFail; + } + + Handle(StepData_Protocol) aProtocol = Handle(StepData_Protocol)::DownCast (aModel->Protocol()); + if (aProtocol.IsNull()) + { + return IFSelect_RetFail; + } + + StepData_StepWriter aWriter (aModel); + aWriter.SendModel (aProtocol); + return aWriter.Print (theOStream) + ? IFSelect_RetDone + : IFSelect_RetFail; +} //======================================================================= //function : PrintStatsTransfer diff --git a/src/STEPControl/STEPControl_Writer.hxx b/src/STEPControl/STEPControl_Writer.hxx index 247cd047e6..d179c0f722 100644 --- a/src/STEPControl/STEPControl_Writer.hxx +++ b/src/STEPControl/STEPControl_Writer.hxx @@ -88,10 +88,13 @@ public: const STEPControl_StepModelType mode, const Standard_Boolean compgraph = Standard_True, const Message_ProgressRange& theProgress = Message_ProgressRange()); - + //! Writes a STEP model in the file identified by filename. - Standard_EXPORT IFSelect_ReturnStatus Write (const Standard_CString filename); - + Standard_EXPORT IFSelect_ReturnStatus Write (const Standard_CString theFileName); + + //! Writes a STEP model in the std::ostream. + Standard_EXPORT IFSelect_ReturnStatus WriteStream (std::ostream& theOStream); + //! Displays the statistics for the //! last translation. what defines the kind of statistics that are displayed: //! - 0 gives general statistics (number of translated roots, diff --git a/src/XDEDRAW/XDEDRAW_Common.cxx b/src/XDEDRAW/XDEDRAW_Common.cxx index 3da8366312..509e2b7793 100644 --- a/src/XDEDRAW/XDEDRAW_Common.cxx +++ b/src/XDEDRAW/XDEDRAW_Common.cxx @@ -26,6 +26,9 @@ #include #include #include +#include +#include +#include #include #include #include @@ -375,19 +378,26 @@ static Standard_Integer WriteIges(Draw_Interpretor& di, Standard_Integer argc, c //function : ReadStep //purpose : Read STEP file to DECAF document //======================================================================= - static Standard_Integer ReadStep(Draw_Interpretor& di, Standard_Integer argc, const char** argv) { DeclareAndCast(STEPControl_Controller, ctl, XSDRAW::Controller()); - if (ctl.IsNull()) XSDRAW::SetNorm("STEP"); + if (ctl.IsNull()) + { + XSDRAW::SetNorm ("STEP"); + } Standard_CString aDocName = NULL; TCollection_AsciiString aFilePath, aModeStr; + bool toTestStream = false; for (Standard_Integer anArgIter = 1; anArgIter < argc; ++anArgIter) { TCollection_AsciiString anArgCase(argv[anArgIter]); anArgCase.LowerCase(); - if (aDocName == NULL) + if (anArgCase == "-stream") + { + toTestStream = true; + } + else if (aDocName == NULL) { aDocName = argv[anArgIter]; } @@ -406,26 +416,26 @@ static Standard_Integer ReadStep(Draw_Interpretor& di, Standard_Integer argc, co } } - TCollection_AsciiString fnom, rnom; - Standard_Boolean modfic = XSDRAW::FileAndVar(aFilePath.ToCString(), aDocName, "STEP", fnom, rnom); - if (modfic) di << " File STEP to read : " << fnom.ToCString() << "\n"; - else di << " Model taken from the session : " << fnom.ToCString() << "\n"; + TCollection_AsciiString aFileName, anOldVarName; + Standard_Boolean isFileMode = XSDRAW::FileAndVar (aFilePath.ToCString(), aDocName, "STEP", aFileName, anOldVarName); + if (isFileMode) di << " File STEP to read : " << aFileName << "\n"; + else di << " Model taken from the session : " << aFileName << "\n"; // di<<" -- Names of variables BREP-DRAW prefixed by : "<Start(), "STEP import", isFileMode ? 2 : 1); - Handle(Draw_ProgressIndicator) aProgress = new Draw_ProgressIndicator(di); - Message_ProgressScope aRootScope(aProgress->Start(), "STEP import", modfic ? 2 : 1); - - IFSelect_ReturnStatus readstat = IFSelect_RetVoid; - if (modfic) + IFSelect_ReturnStatus aReadStat = IFSelect_RetVoid; + if (isFileMode) { - Message_ProgressScope aReadScope(aRootScope.Next(), "File reading", 1); + Message_ProgressScope aReadScope (aRootScope.Next(), "File reading", 1); aReadScope.Show(); - readstat = reader.ReadFile(fnom.ToCString()); + if (toTestStream) + { + std::ifstream aStream; + OSD_OpenStream (aStream, aFileName.ToCString(), std::ios::in | std::ios::binary); + TCollection_AsciiString aFolder, aFileNameShort; + OSD_Path::FolderAndFileFromPath (aFileName, aFolder, aFileNameShort); + aReadStat = aReader.ReadStream (aFileNameShort.ToCString(), aStream); + } + else + { + aReadStat = aReader.ReadFile (aFileName.ToCString()); + } } else if (XSDRAW::Session()->NbStartingEntities() > 0) { - readstat = IFSelect_RetDone; + aReadStat = IFSelect_RetDone; } - if (readstat != IFSelect_RetDone) + if (aReadStat != IFSelect_RetDone) { - if (modfic) + if (isFileMode) { - di << "Could not read file " << fnom << " , abandon\n"; + di << "Could not read file " << aFileName << " , abandon\n"; } else { @@ -462,30 +483,29 @@ static Standard_Integer ReadStep(Draw_Interpretor& di, Standard_Integer argc, co return 1; } - Handle(TDocStd_Document) doc; - if (!DDocStd::GetDocument(aDocName, doc, Standard_False)) + Handle(TDocStd_Document) aDoc; + if (!DDocStd::GetDocument (aDocName, aDoc, Standard_False)) { - Handle(TDocStd_Application) A = DDocStd::GetApplication(); - A->NewDocument("BinXCAF", doc); - TDataStd_Name::Set(doc->GetData()->Root(), aDocName); - Handle(DDocStd_DrawDocument) DD = new DDocStd_DrawDocument(doc); - Draw::Set(aDocName, DD); + Handle(TDocStd_Application) anApp = DDocStd::GetApplication(); + anApp->NewDocument("BinXCAF", aDoc); + TDataStd_Name::Set (aDoc->GetData()->Root(), aDocName); + Handle(DDocStd_DrawDocument) aDrawDoc = new DDocStd_DrawDocument (aDoc); + Draw::Set (aDocName, aDrawDoc); // di << "Document saved with name " << aDocName; } - if (!reader.Transfer(doc, aRootScope.Next())) + if (!aReader.Transfer (aDoc, aRootScope.Next())) { di << "Cannot read any relevant data from the STEP file\n"; return 1; } - Handle(DDocStd_DrawDocument) DD = new DDocStd_DrawDocument(doc); - Draw::Set(aDocName, DD); + Handle(DDocStd_DrawDocument) aDrawDoc = new DDocStd_DrawDocument (aDoc); + Draw::Set (aDocName, aDrawDoc); di << "Document saved with name " << aDocName; - NCollection_DataMap DicFile = reader.ExternFiles(); - FillDicWS(DicFile); - AddWS(fnom, XSDRAW::Session()); - + NCollection_DataMap aDicFile = aReader.ExternFiles(); + FillDicWS (aDicFile); + AddWS (aFileName, XSDRAW::Session()); return 0; } @@ -493,131 +513,182 @@ static Standard_Integer ReadStep(Draw_Interpretor& di, Standard_Integer argc, co //function : WriteStep //purpose : Write DECAF document to STEP //======================================================================= - static Standard_Integer WriteStep(Draw_Interpretor& di, Standard_Integer argc, const char** argv) { - if (argc < 3) + DeclareAndCast(STEPControl_Controller,ctl,XSDRAW::Controller()); + if (ctl.IsNull()) { - di << "Use: " << argv[0] << " Doc filename [mode [multifile_prefix [label]]]: write document to the STEP file\n"; - di << "mode can be: a or 0 : AsIs (default)\n"; - di << " f or 1 : FacettedBRep s or 2 : ShellBasedSurfaceModel\n"; - di << " m or 3 : ManifoldSolidBrep w or 4 : GeometricCurveSet/WireFrame\n"; - di << "multifile_prefix: triggers writing assembly components as separate files,\n"; - di << " and defines common prefix for their names\n"; - di << "label: tag of the sub-assembly label to save only that sub-assembly\n"; - return 0; + XSDRAW::SetNorm ("STEP"); } + STEPCAFControl_Writer aWriter (XSDRAW::Session(), Standard_True); - Handle(TDocStd_Document) Doc; - DDocStd::GetDocument(argv[1], Doc); - if (Doc.IsNull()) - { - di << argv[1] << " is not a document\n"; - return 1; - } - Standard_CString multifile = 0; - - Standard_Integer k = 3; - DeclareAndCast(STEPControl_Controller, ctl, XSDRAW::Controller()); - if (ctl.IsNull()) XSDRAW::SetNorm("STEP"); - STEPCAFControl_Writer writer(XSDRAW::Session(), Standard_True); - - STEPControl_StepModelType mode = STEPControl_AsIs; - if (argc > k) + Handle(TDocStd_Document) aDoc; + TCollection_AsciiString aDocName, aFilePath; + STEPControl_StepModelType aMode = STEPControl_AsIs; + bool hasModeArg = false, toTestStream = false; + TCollection_AsciiString aMultiFilePrefix, aLabelName; + TDF_Label aLabel; + for (Standard_Integer anArgIter = 1; anArgIter < argc; ++anArgIter) { - switch (argv[k][0]) + TCollection_AsciiString anArgCase (argv[anArgIter]); + anArgCase.LowerCase(); + if (anArgCase == "-stream") { - case 'a': - case '0': mode = STEPControl_AsIs; break; - case 'f': - case '1': mode = STEPControl_FacetedBrep; break; - case 's': - case '2': mode = STEPControl_ShellBasedSurfaceModel; break; - case 'm': - case '3': mode = STEPControl_ManifoldSolidBrep; break; - case 'w': - case '4': mode = STEPControl_GeometricCurveSet; break; - default: di << "3rd arg = mode, incorrect [give fsmw]\n"; return 1; + toTestStream = true; } - Standard_Boolean wrmode = Standard_True; - for (Standard_Integer i = 0; argv[k][i]; i++) - switch (argv[3][i]) + else if (aDocName.IsEmpty()) + { + Standard_CString aDocNameStr = argv[anArgIter]; + DDocStd::GetDocument (aDocNameStr, aDoc); + if (aDoc.IsNull()) { - case '-': wrmode = Standard_False; break; - case '+': wrmode = Standard_True; break; - case 'c': writer.SetColorMode(wrmode); break; - case 'n': writer.SetNameMode(wrmode); break; - case 'l': writer.SetLayerMode(wrmode); break; - case 'v': writer.SetPropsMode(wrmode); break; + di << "Syntax error: '" << argv[anArgIter] << "' is not a document"; + return 1; } - k++; - } - TDF_Label label; - if (argc > k) - { - TCollection_AsciiString aStr(argv[k]); - if (aStr.Search(":") == -1) - multifile = argv[k++]; - - } - if (argc > k) - { - - if (!DDF::FindLabel(Doc->Main().Data(), argv[k], label) || label.IsNull()) + aDocName = aDocNameStr; + } + else if (aFilePath.IsEmpty()) + { + aFilePath = argv[anArgIter]; + } + else if (!hasModeArg) { - di << "No label for entry" << "\n"; + hasModeArg = true; + switch (anArgCase.Value (1)) + { + case 'a': + case '0': aMode = STEPControl_AsIs; break; + case 'f': + case '1': aMode = STEPControl_FacetedBrep; break; + case 's': + case '2': aMode = STEPControl_ShellBasedSurfaceModel; break; + case 'm': + case '3': aMode = STEPControl_ManifoldSolidBrep; break; + case 'w': + case '4': aMode = STEPControl_GeometricCurveSet; break; + default: + { + di << "Syntax error: mode '" << argv[anArgIter] << "' is incorrect [give fsmw]"; + return 1; + } + } + Standard_Boolean wrmode = Standard_True; + for (Standard_Integer i = 1; i <= anArgCase.Length(); ++i) + { + switch (anArgCase.Value (i)) + { + case '-' : wrmode = Standard_False; break; + case '+' : wrmode = Standard_True; break; + case 'c' : aWriter.SetColorMode (wrmode); break; + case 'n' : aWriter.SetNameMode (wrmode); break; + case 'l' : aWriter.SetLayerMode (wrmode); break; + case 'v' : aWriter.SetPropsMode (wrmode); break; + } + } + } + else if (aMultiFilePrefix.IsEmpty() + && anArgCase.Search (":") == -1) + { + aMultiFilePrefix = argv[anArgIter]; + } + else if (aLabel.IsNull()) + { + if (!DDF::FindLabel (aDoc->Main().Data(), argv[anArgIter], aLabel) + || aLabel.IsNull()) + { + di << "Syntax error: No label for entry '" << argv[anArgIter] << "'"; + return 1; + } + aLabelName = argv[anArgIter]; + } + else + { + di << "Syntax error: unknown argument '" << argv[anArgIter] << "'"; return 1; - } } + if (aFilePath.IsEmpty()) + { + di << "Syntax error: wrong number of arguments"; + return 1; + } - TCollection_AsciiString fnom, rnom; - const Standard_Boolean modfic = XSDRAW::FileAndVar(argv[2], argv[1], "STEP", fnom, rnom); + TCollection_AsciiString aFileName, anOldVarName; + const Standard_Boolean isFileMode = XSDRAW::FileAndVar (aFilePath.ToCString(), aDocName.ToCString(), "STEP", aFileName, anOldVarName); - Handle(Draw_ProgressIndicator) aProgress = new Draw_ProgressIndicator(di); - Message_ProgressScope aRootScope(aProgress->Start(), "STEP export", modfic ? 2 : 1); - if (!label.IsNull()) - { - di << "Translating label " << argv[k] << " of document " << argv[1] << " to STEP\n"; - if (!writer.Transfer(label, mode, multifile, aRootScope.Next())) + Handle(Draw_ProgressIndicator) aProgress = new Draw_ProgressIndicator (di); + Message_ProgressScope aRootScope (aProgress->Start(), "STEP export", isFileMode ? 2 : 1); + if (!aLabel.IsNull()) + { + di << "Translating label " << aLabelName << " of document " << aDocName << " to STEP\n"; + if (!aWriter.Transfer (aLabel, aMode, + !aMultiFilePrefix.IsEmpty() ? aMultiFilePrefix.ToCString() : NULL, + aRootScope.Next())) { - di << "The label of document cannot be translated or gives no result\n"; + di << "Error: the label of document cannot be translated or gives no result"; return 1; } } else { - di << "Translating document " << argv[1] << " to STEP\n"; - if (!writer.Transfer(Doc, mode, multifile, aRootScope.Next())) + di << "Translating document " << aDocName << " to STEP\n"; + if (!aWriter.Transfer (aDoc, aMode, + !aMultiFilePrefix.IsEmpty() ? aMultiFilePrefix.ToCString() : NULL, + aRootScope.Next())) { - di << "The document cannot be translated or gives no result\n"; + di << "Error: The document cannot be translated or gives no result\n"; } } - if (modfic) + if (!isFileMode) { - Message_ProgressScope aWriteScope(aRootScope.Next(), "File writing", 1); - aWriteScope.Show(); - di << "Writing STEP file " << argv[2] << "\n"; - IFSelect_ReturnStatus stat = writer.Write(argv[2]); - switch (stat) - { - case IFSelect_RetVoid: di << "No file written\n"; break; - case IFSelect_RetDone: - { - di << "File " << argv[2] << " written\n"; + di << "Document has been translated into the session"; + return 0; + } - NCollection_DataMap DicFile = writer.ExternFiles(); - FillDicWS(DicFile); - AddWS(argv[2], XSDRAW::Session()); - break; - } - default: di << "Error on writing file\n"; break; + Message_ProgressScope aWriteScope (aRootScope.Next(), "File writing", 1); + aWriteScope.Show(); + di << "Writing STEP file " << aFilePath << "\n"; + + IFSelect_ReturnStatus aStat = IFSelect_RetVoid; + if (toTestStream) + { + std::ofstream aStream; + OSD_OpenStream (aStream, aFilePath, std::ios::out | std::ios::binary); + aStat = aWriter.WriteStream (aStream); + aStream.close(); + if (!aStream.good() + && aStat == IFSelect_RetDone) + { + aStat = IFSelect_RetFail; } } else { - di << "Document has been translated into the session"; + aStat = aWriter.Write (aFilePath.ToCString()); + } + + switch (aStat) + { + case IFSelect_RetVoid: + { + di << "Error: no file written"; + break; + } + case IFSelect_RetDone: + { + di << "File " << aFilePath << " written\n"; + + NCollection_DataMap aDicFile = aWriter.ExternFiles(); + FillDicWS (aDicFile); + AddWS (aFilePath, XSDRAW::Session()); + break; + } + default: + { + di << "Error on writing file"; + break; + } } return 0; } @@ -1271,10 +1342,21 @@ void XDEDRAW_Common::InitCommands(Draw_Interpretor& di) di.Add("ReadIges", "Doc filename: Read IGES file to DECAF document", __FILE__, ReadIges, g); di.Add("WriteIges", "Doc filename: Write DECAF document to IGES file", __FILE__, WriteIges, g); di.Add("ReadStep", - "Doc filename [mode]" - "\n\t\t: Read STEP file to a document.", + "Doc filename [mode] [-stream]" + "\n\t\t: Read STEP file to a document." + "\n\t\t: -stream read using istream reading interface (testing)", __FILE__, ReadStep, g); - di.Add("WriteStep", "Doc filename [mode=a [multifile_prefix] [label]]: Write DECAF document to STEP file", __FILE__, WriteStep, g); + di.Add("WriteStep" , + "Doc filename [mode=a [multifile_prefix] [label]] [-stream]" + "\n\t\t: Write DECAF document to STEP file" + "\n\t\t: mode can be: a or 0 : AsIs (default)" + "\n\t\t: f or 1 : FacettedBRep s or 2 : ShellBasedSurfaceModel" + "\n\t\t: m or 3 : ManifoldSolidBrep w or 4 : GeometricCurveSet/WireFrame" + "\n\t\t: multifile_prefix: triggers writing assembly components as separate files," + "\n\t\t: and defines common prefix for their names" + "\n\t\t: label tag of the sub-assembly label to save only that sub-assembly" + "\n\t\t: -stream read using ostream writing interface (testing)", + __FILE__, WriteStep, g); di.Add("XFileList", "Print list of files that was transferred by the last transfer", __FILE__, GetDicWSList, g); di.Add("XFileCur", ": returns name of file which is set as current", __FILE__, GetCurWS, g); diff --git a/src/XSDRAWSTEP/XSDRAWSTEP.cxx b/src/XSDRAWSTEP/XSDRAWSTEP.cxx index 3eaf3df394..7ceff7987b 100644 --- a/src/XSDRAWSTEP/XSDRAWSTEP.cxx +++ b/src/XSDRAWSTEP/XSDRAWSTEP.cxx @@ -22,6 +22,8 @@ #include #include #include +#include +#include #include #include #include @@ -282,8 +284,11 @@ static Standard_Integer testreadstep (Draw_Interpretor& di, Standard_Integer arg IFSelect_ReturnStatus readstat; if (useStream) { - std::ifstream aStream (filename); - readstat = Reader.ReadStream(filename, aStream); + std::ifstream aStream; + OSD_OpenStream (aStream, filename, std::ios::in | std::ios::binary); + TCollection_AsciiString aFolder, aFileNameShort; + OSD_Path::FolderAndFileFromPath (filename, aFolder, aFileNameShort); + readstat = Reader.ReadStream (aFileNameShort.ToCString(), aStream); } else { @@ -435,22 +440,72 @@ static Standard_Integer stepwrite (Draw_Interpretor& di, Standard_Integer argc, //======================================================================= static Standard_Integer testwrite (Draw_Interpretor& di, Standard_Integer argc, const char** argv) { - if (argc != 3) - { - di << "ERROR in " << argv[0] << "Wrong Number of Arguments.\n"; - di << " Usage : " << argv[0] <<" file_name shape_name \n"; - return 1; + TCollection_AsciiString aFilePath; + TopoDS_Shape aShape; + bool toTestStream = false; + for (Standard_Integer anArgIter = 1; anArgIter < argc; ++anArgIter) + { + TCollection_AsciiString anArgCase (argv[anArgIter]); + anArgCase.LowerCase(); + if (anArgCase == "-stream") + { + toTestStream = true; } - STEPControl_Writer Writer; - Standard_CString filename = argv[1]; - TopoDS_Shape shape = DBRep::Get(argv[2]); - IFSelect_ReturnStatus stat = Writer.Transfer(shape,STEPControl_AsIs); - stat = Writer.Write(filename); - if(stat != IFSelect_RetDone){ - di<<"Error on writing file\n"; + else if (aFilePath.IsEmpty()) + { + aFilePath = argv[anArgIter]; + } + else if (aShape.IsNull()) + { + aShape = DBRep::Get (argv[anArgIter]); + if (aShape.IsNull()) + { + di << "Syntax error: '" << argv[anArgIter] << "' is not a shape"; + return 1; + } + } + else + { + di << "Syntax error: unknown argument '" << argv[anArgIter] << "'"; + return 1; + } + } + if (aShape.IsNull()) + { + di << "Syntax error: wrong number of arguments"; + return 1; + } + + STEPControl_Writer aWriter; + IFSelect_ReturnStatus aStat = aWriter.Transfer (aShape, STEPControl_AsIs); + if (aStat != IFSelect_RetDone) + { + di << "Error on transferring shape"; + return 1; + } + + if (toTestStream) + { + std::ofstream aStream; + OSD_OpenStream (aStream, aFilePath, std::ios::out | std::ios::binary); + aStat = aWriter.WriteStream (aStream); + aStream.close(); + if (!aStream.good() + && aStat == IFSelect_RetDone) + { + aStat = IFSelect_RetFail; + } + } + else + { + aStat = aWriter.Write (aFilePath.ToCString()); + } + if (aStat != IFSelect_RetDone) + { + di << "Error on writing file"; return 1; } - di<<"File Is Written\n"; + di << "File Is Written"; return 0; } @@ -550,7 +605,8 @@ void XSDRAWSTEP::InitCommands (Draw_Interpretor& theCommands) XSDRAWSTEP::Init(); XSDRAW::LoadDraw(theCommands); theCommands.Add("stepwrite" , "stepwrite mode[0-4 afsmw] shape", __FILE__, stepwrite, g); - theCommands.Add("testwritestep", "testwritestep filename.stp shape", __FILE__, testwrite, g); + theCommands.Add("testwritestep", "testwritestep filename.stp shape [-stream]", + __FILE__, testwrite, g); theCommands.Add("stepread", "stepread [file] [f or r (type of model full or reduced)]",__FILE__, stepread, g); theCommands.Add("testreadstep", "testreadstep file shape [-stream]",__FILE__, testreadstep, g); theCommands.Add("steptrans", "steptrans shape stepax1 stepax2", __FILE__, steptrans, g); diff --git a/tests/bugs/step/bug32350 b/tests/bugs/step/bug32350 new file mode 100644 index 0000000000..4fe9624748 --- /dev/null +++ b/tests/bugs/step/bug32350 @@ -0,0 +1,36 @@ +puts "===================================================" +puts "0032350: Data Exchange - STEPControl_Writer.writeStream(std::ostream)" +puts "===================================================" +puts "" + +pload XDE OCAF MODELING VISUALIZATION + +Close D -silent + +set aTmpFile1 "$imagedir/${casename}_1.stp" +set aTmpFile2 "$imagedir/${casename}_2.stp" + +ReadStep D [locate_data_file "as1-oc-214-mat.stp"] -stream + +WriteStep D "$aTmpFile1" +WriteStep D "$aTmpFile2" -stream + +ReadStep D1 "$aTmpFile1" +ReadStep D2 "$aTmpFile2" + +file delete "$aTmpFile1" +file delete "$aTmpFile2" + +vclear +vinit View1 +XDisplay -dispMode 1 D +vfit +vdump "$imagedir/${casename}_src.png" + +vclear +XDisplay -dispMode 1 D1 +vdump "$imagedir/${casename}_out1.png" + +vclear +XDisplay -dispMode 1 D2 +vdump "$imagedir/${casename}_out2.png" From aaacd8351086d623f183b662435ff134d4e454b8 Mon Sep 17 00:00:00 2001 From: azv Date: Wed, 29 Jun 2022 17:32:17 +0300 Subject: [PATCH 409/639] 0033032: Samples - Warning on Ubuntu 20.04 Fix warnings: * catching polymorphic type 'class Standard_Failure' by value [-Wcatch-value=] * this 'if' clause does not guard... [-Wmisleading-indentation] --- samples/qt/Interface/src/Translate.cxx | 72 +++++++++++++------------- 1 file changed, 36 insertions(+), 36 deletions(-) diff --git a/samples/qt/Interface/src/Translate.cxx b/samples/qt/Interface/src/Translate.cxx index b27b89fcce..88d424ad4a 100755 --- a/samples/qt/Interface/src/Translate.cxx +++ b/samples/qt/Interface/src/Translate.cxx @@ -221,7 +221,7 @@ Handle(TopTools_HSequenceOfShape) Translate::importModel( const int format, cons shapes = importSTEP( file ); break; } - } catch ( Standard_Failure ) { + } catch ( const Standard_Failure& ) { shapes.Nullify(); } return shapes; @@ -256,7 +256,7 @@ bool Translate::exportModel( const int format, const QString& file, const Handle case FormatSTL: return exportSTL ( file, shapes ); case FormatVRML: return exportVRML( file, shapes ); } - } catch ( Standard_Failure ) { + } catch ( const Standard_Failure& ) { // } return false; @@ -528,26 +528,26 @@ bool Translate::exportSTL( const QString& file, const Handle(TopTools_HSequenceO if ( shapes.IsNull() || shapes->IsEmpty() ) return false; - TopoDS_Compound res; - BRep_Builder builder; - builder.MakeCompound( res ); + TopoDS_Compound res; + BRep_Builder builder; + builder.MakeCompound( res ); - for ( int i = 1; i <= shapes->Length(); i++ ) - { - TopoDS_Shape shape = shapes->Value( i ); - if ( shape.IsNull() ) - { - myInfo = QObject::tr( "INF_TRANSLATE_ERROR_INVALIDSHAPE" ); - return false; + for ( int i = 1; i <= shapes->Length(); i++ ) + { + TopoDS_Shape shape = shapes->Value( i ); + if ( shape.IsNull() ) + { + myInfo = QObject::tr( "INF_TRANSLATE_ERROR_INVALIDSHAPE" ); + return false; } - builder.Add( res, shape ); - } + builder.Add( res, shape ); + } - StlAPI_Writer writer; - - const TCollection_AsciiString anUtf8Path (file.toUtf8().data()); - - writer.Write( res, anUtf8Path.ToCString() ); + StlAPI_Writer writer; + + const TCollection_AsciiString anUtf8Path (file.toUtf8().data()); + + writer.Write( res, anUtf8Path.ToCString() ); return true; } @@ -557,26 +557,26 @@ bool Translate::exportVRML( const QString& file, const Handle(TopTools_HSequence if ( shapes.IsNull() || shapes->IsEmpty() ) return false; - TopoDS_Compound res; - BRep_Builder builder; - builder.MakeCompound( res ); + TopoDS_Compound res; + BRep_Builder builder; + builder.MakeCompound( res ); - for ( int i = 1; i <= shapes->Length(); i++ ) - { - TopoDS_Shape shape = shapes->Value( i ); - if ( shape.IsNull() ) - { - myInfo = QObject::tr( "INF_TRANSLATE_ERROR_INVALIDSHAPE" ); - return false; + for ( int i = 1; i <= shapes->Length(); i++ ) + { + TopoDS_Shape shape = shapes->Value( i ); + if ( shape.IsNull() ) + { + myInfo = QObject::tr( "INF_TRANSLATE_ERROR_INVALIDSHAPE" ); + return false; } - builder.Add( res, shape ); - } + builder.Add( res, shape ); + } - VrmlAPI_Writer writer; - - const TCollection_AsciiString anUtf8Path (file.toUtf8().data()); - - writer.Write( res, anUtf8Path.ToCString() ); + VrmlAPI_Writer writer; + + const TCollection_AsciiString anUtf8Path (file.toUtf8().data()); + + writer.Write( res, anUtf8Path.ToCString() ); return true; } From f8d4cfbb80eebca67e16df4451edcbaf9f1cf430 Mon Sep 17 00:00:00 2001 From: aba Date: Mon, 8 Feb 2016 14:47:57 +0300 Subject: [PATCH 410/639] 0027142: Data Exchange - add possibility to set location in XCAFDoc_ShapeTool interface --- src/XCAFDoc/XCAFDoc_ShapeTool.cxx | 34 ++++++++ src/XCAFDoc/XCAFDoc_ShapeTool.hxx | 9 ++ src/XDEDRAW/XDEDRAW_Shapes.cxx | 137 ++++++++++++++++++++++++++++++ tests/bugs/xde/bug27142 | 98 +++++++++++++++++++++ 4 files changed, 278 insertions(+) create mode 100644 tests/bugs/xde/bug27142 diff --git a/src/XCAFDoc/XCAFDoc_ShapeTool.cxx b/src/XCAFDoc/XCAFDoc_ShapeTool.cxx index 84bafa4dbb..b226c6f133 100644 --- a/src/XCAFDoc/XCAFDoc_ShapeTool.cxx +++ b/src/XCAFDoc/XCAFDoc_ShapeTool.cxx @@ -416,6 +416,40 @@ void XCAFDoc_ShapeTool::MakeReference (const TDF_Label &L, SetLabelNameByLink(L); } +//======================================================================= +// function : SetLocation +// purpose : +//======================================================================= +Standard_Boolean XCAFDoc_ShapeTool::SetLocation (const TDF_Label& theShapeLabel, + const TopLoc_Location& theLoc, + TDF_Label& theRefLabel) +{ + if (theLoc.IsIdentity()) + { + theRefLabel = theShapeLabel; + return Standard_True; + } + // if input label is reference -> just change the location attribute + if (IsReference (theShapeLabel)) + { + TopLoc_Location anOldLoc; + anOldLoc = GetLocation (theShapeLabel); + TopLoc_Location aNewLoc (theLoc.Transformation() * anOldLoc.Transformation()); + XCAFDoc_Location::Set(theShapeLabel, aNewLoc); + theRefLabel = theShapeLabel; + return Standard_True; + } + // if input label is shape, and it is free -> create reference to the shape + if (IsShape(theShapeLabel) && IsFree(theShapeLabel)) + { + theRefLabel = TDF_TagSource::NewChild (Label()); + MakeReference (theRefLabel, theShapeLabel, theLoc); + return Standard_True; + } + // other cases of label meaning doesn't need to apply new location + return Standard_False; +} + //======================================================================= //function : addShape //purpose : private diff --git a/src/XCAFDoc/XCAFDoc_ShapeTool.hxx b/src/XCAFDoc/XCAFDoc_ShapeTool.hxx index 7aca2734a2..100b0f6b10 100644 --- a/src/XCAFDoc/XCAFDoc_ShapeTool.hxx +++ b/src/XCAFDoc/XCAFDoc_ShapeTool.hxx @@ -401,6 +401,15 @@ public: //! from upper_usage component to next_usage //! Returns null attribute if no SHUO found Standard_EXPORT static Standard_Boolean FindSHUO (const TDF_LabelSequence& Labels, Handle(XCAFDoc_GraphNode)& theSHUOAttr); + + //! Sets location to the shape label + //! If label is reference -> changes location attribute + //! If label is free shape -> creates reference with location to it + //! @param[in] theShapeLabel the shape label to change location + //! @param[in] theLoc location to set + //! @param[out] theRefLabel the reference label with new location + //! @return TRUE if new location was set + Standard_EXPORT Standard_Boolean SetLocation (const TDF_Label& theShapeLabel, const TopLoc_Location& theLoc, TDF_Label& theRefLabel); //! Convert Shape (compound/compsolid/shell/wire) to assembly Standard_EXPORT Standard_Boolean Expand (const TDF_Label& Shape); diff --git a/src/XDEDRAW/XDEDRAW_Shapes.cxx b/src/XDEDRAW/XDEDRAW_Shapes.cxx index 709808406b..dc0edf0b5e 100644 --- a/src/XDEDRAW/XDEDRAW_Shapes.cxx +++ b/src/XDEDRAW/XDEDRAW_Shapes.cxx @@ -18,6 +18,8 @@ #include #include #include +#include +#include #include #include #include @@ -1113,6 +1115,127 @@ static Standard_Integer XAutoNaming (Draw_Interpretor& theDI, return 0; } +//======================================================================= +// function : parseXYZ +// purpose : Converts three string arguments, to gp_XYZ with check +//======================================================================= +static Standard_Boolean parseXYZ (const char** theArgVec, gp_XYZ& thePnt) +{ + const TCollection_AsciiString aXYZ[3] = {theArgVec[0], theArgVec[1], theArgVec[2] }; + if (!aXYZ[0].IsRealValue (Standard_True) + || !aXYZ[1].IsRealValue (Standard_True) + || !aXYZ[2].IsRealValue (Standard_True)) + { + return Standard_False; + } + + thePnt.SetCoord (aXYZ[0].RealValue(), aXYZ[1].RealValue(), aXYZ[2].RealValue()); + return Standard_True; +} + +//======================================================================= +// function : setLocation +// purpose : Sets location to the shape at the label in XDE document +//======================================================================= +static Standard_Integer setLocation (Draw_Interpretor& , Standard_Integer theArgNb, const char** theArgVec) +{ + if (theArgNb < 4) + { + Message::SendFail() << "Error: not enough arguments, see help " << theArgVec[0] << " for details"; + return 1; + } + // get and check the document + Handle(TDocStd_Document) aDoc; + DDocStd::GetDocument (theArgVec[1], aDoc); + if (aDoc.IsNull ()) + { + Message::SendFail() << "Error: " << theArgVec[1] << " is not a document"; + return 1; + } + // get and check the label + TDF_Label aShapeLabel; + TDF_Tool::Label (aDoc->GetData(), theArgVec[2], aShapeLabel); + if (aShapeLabel.IsNull ()) + { + Message::SendFail() << "Error: no such Label: " << theArgVec[2]; + return 1; + } + // get the transformation + gp_Trsf aTransformation; + for (Standard_Integer anArgIter = 3; anArgIter < theArgNb; ++anArgIter) + { + gp_Trsf aCurTransformation; + gp_XYZ aMoveXYZ, aRotPnt, aRotAxis, aScalePnt; + Standard_Real aRotAngle, aScale; + TCollection_AsciiString anArg = theArgVec[anArgIter]; + anArg.LowerCase(); + + if (anArg == "-rotate" && + anArgIter + 7 < theArgNb && + parseXYZ (theArgVec + anArgIter + 1, aRotPnt) && + parseXYZ (theArgVec + anArgIter + 4, aRotAxis) && + Draw::ParseReal (theArgVec[anArgIter + 7], aRotAngle)) + { + anArgIter += 7; + aCurTransformation.SetRotation (gp_Ax1 (gp_Pnt (aRotPnt), gp_Dir (aRotAxis)), aRotAngle * (M_PI / 180.0)); + } + else if (anArg == "-move" && + anArgIter + 3 < theArgNb && + parseXYZ (theArgVec + anArgIter + 1, aMoveXYZ)) + { + anArgIter += 3; + aCurTransformation.SetTranslation (aMoveXYZ); + } + // first check scale with base point + else if (anArg == "-scale" && + anArgIter + 4 < theArgNb && + parseXYZ (theArgVec + anArgIter + 1, aScalePnt) && + Draw::ParseReal (theArgVec[anArgIter + 4], aScale)) + { + anArgIter += 4; + aCurTransformation.SetScale (gp_Pnt (aScalePnt), aScale); + } + // second check for scale with scale factor only + else if (anArg == "-scale" && + anArgIter + 1 < theArgNb && + Draw::ParseReal (theArgVec[anArgIter + 1], aScale)) + { + anArgIter += 1; + aCurTransformation.SetScaleFactor (aScale); + } + else + { + Message::SendFail() << "Syntax error: unknown options '" << anArg << "', or incorrect option parameters"; + return 1; + } + aTransformation.PreMultiply (aCurTransformation); + } + TopLoc_Location aLoc(aTransformation); + + // Create the ShapeTool and try to set location + Handle(XCAFDoc_ShapeTool) anAssembly = XCAFDoc_DocumentTool::ShapeTool (aDoc->Main()); + TDF_Label aRefLabel; + if (anAssembly->SetLocation (aShapeLabel, aLoc, aRefLabel)) + { + if (aShapeLabel == aRefLabel) + { + Message::SendInfo() << "New location was set"; + } + else + { + TCollection_AsciiString aLabelStr; + TDF_Tool::Entry(aRefLabel, aLabelStr); + Message::SendInfo() << "Reference to the shape at label " << aLabelStr << " was created and location was set"; + } + } + else + { + Message::SendFail() << "Error: an attempt to set the location to a shape to which there is a reference, or to not a shape at all"; + } + + return 0; +} + //======================================================================= //function : InitCommands //purpose : @@ -1222,6 +1345,20 @@ void XDEDRAW_Shapes::InitCommands(Draw_Interpretor& di) di.Add ("XSetInstanceSHUO","Doc shape \t: sets the SHUO structure for indicated component", __FILE__, setStyledComponent, g); + + di.Add ("XSetLocation", R"( +Doc Label transformation [transformation ... ] +Applies given complex transformation to the shape at Label from Document. +The label may contain a reference to a shape, an assembly or simple shape. +The assembly or simple shape should not be referred by any reference. +Transformations: + '-move x y z' - move shape + '-rotate x y z dx dy dz angle' - rotate shape + '-scale [x y z] factor' - scale shape +Transformations are applied from left to right. +There can be more than one transformation of the same type. +At least one transformation must be specified. +)", __FILE__, setLocation, g); di.Add ("XUpdateAssemblies","Doc \t: updates assembly compounds", __FILE__, updateAssemblies, g); diff --git a/tests/bugs/xde/bug27142 b/tests/bugs/xde/bug27142 new file mode 100644 index 0000000000..49a76ca165 --- /dev/null +++ b/tests/bugs/xde/bug27142 @@ -0,0 +1,98 @@ +puts "==========" +puts "0027142: Data Exchange - add possibility to set location in XCAFDoc_ShapeTool interface" +puts "==========" +puts "" + +puts "TODO 0027142 ALL: Error: area of d1" +puts "TODO 0027142 ALL: Error: area of d2" +puts "TODO 0027142 ALL: Error: center of gravity" + +pload OCAF XDE +Close Doc -silent +XNewDoc Doc + +# Create five boxes 'a', 'b', 'c', 'd', 'e' +# Box 'e' will stay at origin of coords +# Boxes 'a', 'b', 'c', 'd' should form the new box of the size 2x2x1 at the point (3 3 0) +box a 1 1 1 +box b 1 1 1 +ttranslate b 1 1 0 +compound a b ab +XAddShape Doc ab +SetName Doc 0:1:1:1 ab +SetName Doc 0:1:1:1:1 ref_a +SetName Doc 0:1:1:1:2 ref_b +SetName Doc 0:1:1:2 a +SetName Doc 0:1:1:3 b +box c 1 1 1 +ttranslate c 1 0 0 +box d 0.5 0.5 0.5 +XAddShape Doc c +SetName Doc 0:1:1:4 ref_c +SetName Doc 0:1:1:5 c +XAddShape Doc d +SetName Doc 0:1:1:6 d +box e 1 1 1 +XAddShape Doc e +SetName Doc 0:1:1:7 e + +# Set location to the assembly (compound of boxes 'a' and 'b') +XSetLocation Doc 0:1:1:1 -rotate 0 0 0 0 0 1 90 -move 4 2 0 +SetName Doc 0:1:1:8 ref_ab +# Set location to the reference to shape (box 'c') +XSetLocation Doc 0:1:1:4 -move 1 0 0 -move 1 3 0 +# Set location to the simple shape (box 'd') +XSetLocation Doc 0:1:1:6 -move 2 2 0 -scale 2 2 0 2 +SetName Doc 0:1:1:9 ref_d + +# Write the document to files of different formats +WriteStep Doc ${imagedir}/step.step +WriteIges Doc ${imagedir}/iges.iges +XSave Doc ${imagedir}/xbf.xbf +Close Doc + +# Read document back and make screenshots +vinit +ReadStep Doc1 ${imagedir}/step.step +XDisplay Doc1; vfit +vdump ${imagedir}/step.png +vclear +ReadIges Doc2 ${imagedir}/iges.iges +XDisplay Doc2; vfit +vdump ${imagedir}/iges.png +vclear +XOpen ${imagedir}/xbf.xbf Doc3 +XDisplay Doc3; vfit +vdump ${imagedir}/xbf.png +vclose + +# Get the box 'd' from the documents +XGetShape d1 Doc1 0:1:1:8 +XGetShape d2 Doc2 0:1:1:4 +XGetShape d3 Doc3 0:1:1:9 + +# Saving disk space +Close Doc1 +Close Doc2 +Close Doc3 +file delete $imagedir/step.step +file delete $imagedir/iges.iges +file delete $imagedir/xbf.xbf + +# Scale transformation doesn't apply in STEP format and incorrectly applies in IGES format + +# Check the areas of the "problem" box 'd' +puts "Check area of the box from STEP file" +checkarea d1 6 1e-7 0.001 +puts "Check area of the box from IGES file" +checkarea d2 6 1e-7 0.001 +puts "Check area of the box from XBF file" +checkarea d3 6 1e-7 0.001 + +# Check the gravity centers of the "problem" box 'd' +puts "Check gravity center of the box from STEP file" +checkgravitycenter d1 -s 2.5 2.5 0.5 1e-7 +puts "Check gravity center of the box from IGES file" +checkgravitycenter d2 -s 2.5 2.5 0.5 1e-7 +puts "Check gravity center of the box from XBF file" +checkgravitycenter d3 -s 2.5 2.5 0.5 1e-7 From 402ad277433fa56b8c27d0340af42999d70559bd Mon Sep 17 00:00:00 2001 From: atychini Date: Wed, 2 Nov 2022 22:10:10 +0300 Subject: [PATCH 411/639] 0033190: Error on de_wrapper/configuration/A3 Removing provider.VRML.OCC.read.memory.limit from the test because this parameter doesn't exist inside the Vrml_ConfigurationNode class --- tests/de_wrapper/configuration/A3 | 1 - 1 file changed, 1 deletion(-) diff --git a/tests/de_wrapper/configuration/A3 b/tests/de_wrapper/configuration/A3 index a54692fb9c..e3a1934835 100644 --- a/tests/de_wrapper/configuration/A3 +++ b/tests/de_wrapper/configuration/A3 @@ -62,7 +62,6 @@ provider.STEP.OCC.write.layer : 1 provider.STEP.OCC.write.props : 1 provider.STEP.OCC.write.model.type : 0 provider.VRML.OCC.read.file.unit : 1 -provider.VRML.OCC.read.memory.limit : -1 provider.VRML.OCC.read.file.coordinate.system : 1 provider.VRML.OCC.read.system.coordinate.system : 0 provider.VRML.OCC.read.fill.incomplete : 1 From 2923ef0df872d5e3f2d2a4af42d6ead910fec4c2 Mon Sep 17 00:00:00 2001 From: smoskvin Date: Wed, 9 Nov 2022 18:27:55 +0300 Subject: [PATCH 412/639] fixed compilation by the genproj tool --- src/Standard/Standard_MMgrTBBalloc.cxx | 1 + src/TKDraw/EXTERNLIB | 1 + 2 files changed, 2 insertions(+) diff --git a/src/Standard/Standard_MMgrTBBalloc.cxx b/src/Standard/Standard_MMgrTBBalloc.cxx index 8499e1af9e..8c7a2df17a 100644 --- a/src/Standard/Standard_MMgrTBBalloc.cxx +++ b/src/Standard/Standard_MMgrTBBalloc.cxx @@ -18,6 +18,7 @@ // paralleling with Intel TBB #ifdef HAVE_TBB +#pragma comment (lib, "tbbmalloc.lib") #include using namespace tbb; #else diff --git a/src/TKDraw/EXTERNLIB b/src/TKDraw/EXTERNLIB index 7afca519af..7ca5eec4e5 100755 --- a/src/TKDraw/EXTERNLIB +++ b/src/TKDraw/EXTERNLIB @@ -9,6 +9,7 @@ TKShHealing TKMesh TKService TKHLR +TKTopAlgo CSF_TclLibs CSF_TclTkLibs CSF_XwLibs From 185d29b92f6764ffa9fc195b7dbe7bba3c4ac855 Mon Sep 17 00:00:00 2001 From: dpasukhi Date: Fri, 11 Nov 2022 17:04:00 +0000 Subject: [PATCH 413/639] 0033198: Using a third-party Draco to compile in DEBUG mode Added new CMake variables to build using DRACO Windows OS works with Debug and Release configuration DRACO Linux works with Release configuration DRACO --- adm/cmake/draco.cmake | 77 +++++++++++++++++------------------- adm/cmake/occt_toolkit.cmake | 28 ++++++++++++- 2 files changed, 64 insertions(+), 41 deletions(-) diff --git a/adm/cmake/draco.cmake b/adm/cmake/draco.cmake index 755391fa52..cebc75df99 100644 --- a/adm/cmake/draco.cmake +++ b/adm/cmake/draco.cmake @@ -3,10 +3,6 @@ OCCT_INCLUDE_CMAKE_FILE ("adm/cmake/occt_macros") -if (NOT DEFINED INSTALL_DRACO) - set (INSTALL_DRACO OFF CACHE BOOL "${INSTALL_DRACO_DESCR}") -endif() - if (NOT DEFINED 3RDPARTY_DRACO_DIR) set (3RDPARTY_DRACO_DIR "" CACHE PATH "The directory containing Draco") endif() @@ -15,14 +11,24 @@ if (NOT DEFINED 3RDPARTY_DRACO_INCLUDE_DIR) set (3RDPARTY_DRACO_INCLUDE_DIR "" CACHE PATH "The directory containing headers of the Draco") endif() -if (NOT DEFINED 3RDPARTY_DRACO_LIBRARY OR NOT 3RDPARTY_DRACO_LIBRARY_DIR OR NOT EXISTS "${3RDPARTY_DRACO_LIBRARY_DIR}") - set (3RDPARTY_DRACO_LIBRARY "" CACHE FILEPATH "Draco library" FORCE) +if (NOT DEFINED 3RDPARTY_DRACO_LIBRARY) + set (3RDPARTY_DRACO_LIBRARY "" CACHE FILEPATH "Draco library") endif() if (NOT DEFINED 3RDPARTY_DRACO_LIBRARY_DIR) set (3RDPARTY_DRACO_LIBRARY_DIR "" CACHE PATH "The directory containing Draco library") endif() +if (WIN32) + if (NOT DEFINED 3RDPARTY_DRACO_LIBRARY_DEBUG) + set (3RDPARTY_DRACO_LIBRARY_DEBUG "" CACHE FILEPATH "Draco debug library") + endif() + + if (NOT DEFINED 3RDPARTY_DRACO_LIBRARY_DIR_DEBUG) + set (3RDPARTY_DRACO_LIBRARY_DIR_DEBUG "" CACHE PATH "The directory containing Draco debug library") + endif() +endif() + if (3RDPARTY_DIR AND EXISTS "${3RDPARTY_DIR}") if (NOT 3RDPARTY_DRACO_DIR OR NOT EXISTS "${3RDPARTY_DRACO_DIR}") FIND_PRODUCT_DIR("${3RDPARTY_DIR}" draco DRACO_DIR_NAME) @@ -32,20 +38,19 @@ if (3RDPARTY_DIR AND EXISTS "${3RDPARTY_DIR}") endif() endif() -if (3RDPARTY_DRACO_DIR AND EXISTS "${3RDPARTY_DRACO_DIR}") - set (DRACO_INCLUDE_PATH "${3RDPARTY_DRACO_DIR}/include") - set (DRACO_LIBRARY_PATH "${3RDPARTY_DRACO_DIR}/lib") -endif() +# header +if (NOT 3RDPARTY_DRACO_INCLUDE_DIR OR NOT EXISTS "${3RDPARTY_DRACO_INCLUDE_DIR}") + set (HEADER_NAMES draco) -if (NOT 3RDPARTY_DRACO_INCLUDE_DIR) - if (DRACO_INCLUDE_PATH AND EXISTS "${DRACO_INCLUDE_PATH}") - set (3RDPARTY_DRACO_INCLUDE_DIR "${DRACO_INCLUDE_PATH}" CACHE FILEPATH "The directory containing headers of DRACO" FORCE) - endif() -endif() + # set 3RDPARTY_DRACO_INCLUDE_DIR as notfound, otherwise find_path can't assign a new value to 3RDPARTY_DRACO_INCLUDE_DIR + set (3RDPARTY_DRACO_INCLUDE_DIR "3RDPARTY_DRACO_INCLUDE_DIR-NOTFOUND" CACHE FILEPATH "The directory containing headers of the Draco" FORCE) -if (NOT 3RDPARTY_DRACO_LIBRARY_DIR) - if (DRACO_LIBRARY_PATH AND EXISTS "${DRACO_LIBRARY_PATH}") - set (3RDPARTY_DRACO_LIBRARY_DIR "${DRACO_LIBRARY_PATH}" CACHE FILEPATH "The directory containing DRACO library" FORCE) + if (3RDPARTY_DRACO_DIR AND EXISTS "${3RDPARTY_DRACO_DIR}") + find_path (3RDPARTY_DRACO_INCLUDE_DIR NAMES ${HEADER_NAMES} + PATHS ${3RDPARTY_DRACO_DIR} + PATH_SUFFIXES "include" + CMAKE_FIND_ROOT_PATH_BOTH + NO_DEFAULT_PATH) endif() endif() @@ -57,11 +62,11 @@ endif() if (3RDPARTY_DRACO_DIR AND EXISTS "${3RDPARTY_DRACO_DIR}") if (NOT 3RDPARTY_DRACO_LIBRARY OR NOT EXISTS "${3RDPARTY_DRACO_LIBRARY}") - set (CMAKE_FIND_LIBRARY_SUFFIXES .lib .so .dylib .a) + set (CMAKE_FIND_LIBRARY_SUFFIXES .lib .a) set (3RDPARTY_DRACO_LIBRARY "3RDPARTY_DRACO_LIBRARY-NOTFOUND" CACHE FILEPATH "The path to Draco library" FORCE) find_library (3RDPARTY_DRACO_LIBRARY NAMES ${CSF_Draco} - PATHS "${3RDPARTY_DRACO_LIBRARY_DIR}" + PATHS "${3RDPARTY_DRACO_DIR}" PATH_SUFFIXES lib CMAKE_FIND_ROOT_PATH_BOTH NO_DEFAULT_PATH) @@ -70,27 +75,19 @@ if (3RDPARTY_DRACO_DIR AND EXISTS "${3RDPARTY_DRACO_DIR}") set (3RDPARTY_DRACO_LIBRARY_DIR "${3RDPARTY_DRACO_LIBRARY_DIR}" CACHE FILEPATH "The directory containing Draco library" FORCE) endif() endif() -endif() -if (3RDPARTY_DRACO_LIBRARY_DIR AND EXISTS "${3RDPARTY_DRACO_LIBRARY_DIR}") - list (APPEND 3RDPARTY_LIBRARY_DIRS "${3RDPARTY_DRACO_LIBRARY_DIR}") -else() - list (APPEND 3RDPARTY_NO_LIBS 3RDPARTY_DRACO_LIBRARY_DIR) -endif() + if (WIN32 AND (NOT 3RDPARTY_DRACO_LIBRARY_DEBUG OR NOT EXISTS "${3RDPARTY_DRACO_LIBRARY_DEBUG}")) + set (CMAKE_FIND_LIBRARY_SUFFIXES .lib .a) + set (3RDPARTY_DRACO_LIBRARY_DEBUG "3RDPARTY_DRACO_LIBRARY_DEBUG-NOTFOUND" CACHE FILEPATH "The path to debug Draco library" FORCE) -if (INSTALL_DRACO) - get_filename_component(3RDPARTY_DRACO_LIBRARY_REALPATH ${3RDPARTY_DRACO_LIBRARY} REALPATH) - if (SINGLE_GENERATOR) - install (FILES ${3RDPARTY_DRACO_LIBRARY_REALPATH} DESTINATION "${INSTALL_DIR_LIB}") - else() - install (FILES ${3RDPARTY_DRACO_LIBRARY_REALPATH} - CONFIGURATIONS Release - DESTINATION "${INSTALL_DIR_LIB}") - install (FILES ${3RDPARTY_DRACO_LIBRARY_REALPATH} - CONFIGURATIONS RelWithDebInfo - DESTINATION "${INSTALL_DIR_LIB}i") - install (FILES ${3RDPARTY_DRACO_LIBRARY_REALPATH} - CONFIGURATIONS Debug - DESTINATION "${INSTALL_DIR_LIB}d") + find_library (3RDPARTY_DRACO_LIBRARY_DEBUG NAMES ${CSF_Draco} + PATHS "${3RDPARTY_DRACO_DIR}" + PATH_SUFFIXES libd + CMAKE_FIND_ROOT_PATH_BOTH + NO_DEFAULT_PATH) + if (3RDPARTY_DRACO_LIBRARY_DEBUG AND EXISTS "${3RDPARTY_DRACO_LIBRARY_DEBUG}") + get_filename_component (3RDPARTY_DRACO_LIBRARY_DIR_DEBUG "${3RDPARTY_DRACO_LIBRARY_DEBUG}" PATH) + set (3RDPARTY_DRACO_LIBRARY_DIR_DEBUG "${3RDPARTY_DRACO_LIBRARY_DIR_DEBUG}" CACHE FILEPATH "The directory containing debug Draco library" FORCE) + endif() endif() endif() diff --git a/adm/cmake/occt_toolkit.cmake b/adm/cmake/occt_toolkit.cmake index 517d1b47fa..132890bc84 100644 --- a/adm/cmake/occt_toolkit.cmake +++ b/adm/cmake/occt_toolkit.cmake @@ -370,6 +370,10 @@ foreach (USED_ITEM ${USED_EXTERNLIB_AND_TOOLKITS}) add_definitions (-DHAVE_GLES2) endif() + if ("${CURRENT_CSF}" STREQUAL "${CSF_Draco}") + set (CURRENT_CSF "") + set (USED_DRACO 1) + endif() set (LIBRARY_FROM_CACHE 0) separate_arguments (CURRENT_CSF) foreach (CSF_LIBRARY ${CURRENT_CSF}) @@ -397,7 +401,7 @@ foreach (USED_ITEM ${USED_EXTERNLIB_AND_TOOLKITS}) endforeach() endforeach() - if (NOT ${LIBRARY_FROM_CACHE}) + if (NOT ${LIBRARY_FROM_CACHE} AND NOT "${CURRENT_CSF}" STREQUAL "") # prepare a list from a string with whitespaces separate_arguments (CURRENT_CSF) list (APPEND USED_EXTERNAL_LIBS_BY_CURRENT_PROJECT ${CURRENT_CSF}) @@ -408,6 +412,28 @@ foreach (USED_ITEM ${USED_EXTERNLIB_AND_TOOLKITS}) endif() endforeach() +if (USE_DRACO) + if (USED_DRACO) + set (USED_LIB_RELEASE ${3RDPARTY_DRACO_LIBRARY}) + if (WIN32) + set (USED_LIB_DEBUG ${3RDPARTY_DRACO_LIBRARY_DEBUG}) + else() + set (USED_LIB_DEBUG ${3RDPARTY_DRACO_LIBRARY}) + endif() + set (USED_LIB_CONF) + if (EXISTS ${USED_LIB_DEBUG}) + set (USED_LIB_CONF "$<$:${USED_LIB_DEBUG}>;${USED_LIB_CONF}") + endif() + if (EXISTS ${USED_LIB_RELEASE}) + set (USED_LIB_CONF "$<$:${USED_LIB_RELEASE}>;${USED_LIB_CONF}") + set (USED_LIB_CONF "$<$:${USED_LIB_RELEASE}>;${USED_LIB_CONF}") + endif() + if (DEFINED USED_LIB_CONF) + set_property (TARGET ${PROJECT_NAME} APPEND PROPERTY LINK_LIBRARIES "${USED_LIB_CONF}") + endif() + endif() +endif() + if (APPLE) list (FIND USED_EXTERNAL_LIBS_BY_CURRENT_PROJECT X11 IS_X11_FOUND) if (NOT ${IS_X11_FOUND} EQUAL -1) From eeba62cbd33d002cc92317e81d241903787369c8 Mon Sep 17 00:00:00 2001 From: smoskvin Date: Wed, 2 Nov 2022 13:27:07 +0300 Subject: [PATCH 414/639] Increment OCCT version up to 7.8.0dev --- src/Standard/Standard_Version.hxx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/Standard/Standard_Version.hxx b/src/Standard/Standard_Version.hxx index f09301df8d..da0836c415 100644 --- a/src/Standard/Standard_Version.hxx +++ b/src/Standard/Standard_Version.hxx @@ -34,7 +34,7 @@ // Primary definitions #define OCC_VERSION_MAJOR 7 -#define OCC_VERSION_MINOR 7 +#define OCC_VERSION_MINOR 8 #define OCC_VERSION_MAINTENANCE 0 //! This macro must be commented in official release, and set to non-empty @@ -42,12 +42,12 @@ //! - "dev" for development version between releases //! - "beta..." or "rc..." for beta releases or release candidates //! - "project..." for version containing project-specific fixes -//#define OCC_VERSION_DEVELOPMENT "dev" +#define OCC_VERSION_DEVELOPMENT "dev" // Derived (manually): version as real and string (major.minor) -#define OCC_VERSION 7.7 -#define OCC_VERSION_STRING "7.7" -#define OCC_VERSION_COMPLETE "7.7.0" +#define OCC_VERSION 7.8 +#define OCC_VERSION_STRING "7.8" +#define OCC_VERSION_COMPLETE "7.8.0" //! Derived: extended version as string ("major.minor.maintenance.dev") #ifdef OCC_VERSION_DEVELOPMENT From d444cc35c6dae06e923c7b1300554ed994b8cff1 Mon Sep 17 00:00:00 2001 From: Eugeny Maltchikov Date: Thu, 13 Oct 2022 17:44:47 +0300 Subject: [PATCH 415/639] 0033171: Modeling Algorithms - Invalid result of faces unification Avoid unification of the faces belonging to the different shells. --- .../ShapeUpgrade_UnifySameDomain.cxx | 80 ++++++++++++++++++- .../ShapeUpgrade_UnifySameDomain.hxx | 4 +- tests/bugs/heal/bug33171_1 | 71 ++++++++++++++++ tests/bugs/heal/bug33171_2 | 57 +++++++++++++ 4 files changed, 208 insertions(+), 4 deletions(-) create mode 100644 tests/bugs/heal/bug33171_1 create mode 100644 tests/bugs/heal/bug33171_2 diff --git a/src/ShapeUpgrade/ShapeUpgrade_UnifySameDomain.cxx b/src/ShapeUpgrade/ShapeUpgrade_UnifySameDomain.cxx index fe63901416..fdda539d6c 100644 --- a/src/ShapeUpgrade/ShapeUpgrade_UnifySameDomain.cxx +++ b/src/ShapeUpgrade/ShapeUpgrade_UnifySameDomain.cxx @@ -2745,6 +2745,26 @@ void ShapeUpgrade_UnifySameDomain::UnifyFaces() for (Standard_Integer i = 1; i <= aFaceMap.Extent(); i++) TopExp::MapShapesAndAncestors (aFaceMap(i), TopAbs_EDGE, TopAbs_FACE, aGMapEdgeFaces); + // creating map of face shells for the whole shape to avoid + // unification of faces belonging to the different shells + DataMapOfShapeMapOfShape aGMapFaceShells; + for (TopExp_Explorer anExp (myShape, TopAbs_SHELL); anExp.More(); anExp.Next()) + { + const TopoDS_Shape& aShell = anExp.Current(); + for (TopoDS_Iterator anItF (aShell); anItF.More(); anItF.Next()) + { + const TopoDS_Shape& aF = anItF.Value(); + if (TopTools_MapOfShape* pShells = aGMapFaceShells.ChangeSeek (aF)) + { + pShells->Add (aShell); + } + else + { + (aGMapFaceShells.Bound (aF, TopTools_MapOfShape()))->Add (aShell); + } + } + } + // creating map of free boundaries TopTools_MapOfShape aFreeBoundMap; // look at only shells not belonging to solids @@ -2766,7 +2786,7 @@ void ShapeUpgrade_UnifySameDomain::UnifyFaces() // unify faces in each shell separately TopExp_Explorer exps; for (exps.Init(myShape, TopAbs_SHELL); exps.More(); exps.Next()) - IntUnifyFaces(exps.Current(), aGMapEdgeFaces, aFreeBoundMap); + IntUnifyFaces(exps.Current(), aGMapEdgeFaces, aGMapFaceShells, aFreeBoundMap); // gather all faces out of shells in one compound and unify them at once BRep_Builder aBB; @@ -2777,7 +2797,10 @@ void ShapeUpgrade_UnifySameDomain::UnifyFaces() aBB.Add(aCmp, exps.Current()); if (nbf > 0) - IntUnifyFaces(aCmp, aGMapEdgeFaces, aFreeBoundMap); + { + // No connection to shells, thus no need to pass the face-shell map + IntUnifyFaces(aCmp, aGMapEdgeFaces, DataMapOfShapeMapOfShape(), aFreeBoundMap); + } myShape = myContext->Apply(myShape); } @@ -2800,13 +2823,52 @@ static void SetFixWireModes(ShapeFix_Face& theSff) aFixWire->FixSmallMode() = 0; } +//======================================================================= +//function : isSameSets +//purpose : Compares two sets of shapes. Returns true if they are the same, +// false otherwise. +//======================================================================= + +template +static Standard_Boolean isSameSets(const Container* theFShells1, + const Container* theFShells2) +{ + // If both are null - no problem + if (theFShells1 == nullptr && theFShells2 == nullptr) + { + return Standard_True; + } + // If only one is null - not the same + if (theFShells1 == nullptr || theFShells2 == nullptr) + { + return Standard_False; + } + // Both not null + if (theFShells1->Extent() != theFShells2->Extent()) + { + return Standard_False; + } + // number of shells in each set should be very small in normal cases - max 2. + // thus just check if all objects of one are contained in the other and vice versa. + for (typename Container::Iterator it1(*theFShells1), it2(*theFShells2); + it1.More() && it2.More(); it1.Next(), it2.Next()) + { + if (!theFShells1->Contains(it2.Value()) || !theFShells2->Contains(it1.Value())) + { + return Standard_False; + } + } + return Standard_True; +} + //======================================================================= //function : IntUnifyFaces //purpose : //======================================================================= void ShapeUpgrade_UnifySameDomain::IntUnifyFaces(const TopoDS_Shape& theInpShape, - TopTools_IndexedDataMapOfShapeListOfShape& theGMapEdgeFaces, + const TopTools_IndexedDataMapOfShapeListOfShape& theGMapEdgeFaces, + const DataMapOfShapeMapOfShape& theGMapFaceShells, const TopTools_MapOfShape& theFreeBoundMap) { // creating map of edge faces for the shape @@ -2855,6 +2917,9 @@ void ShapeUpgrade_UnifySameDomain::IntUnifyFaces(const TopoDS_Shape& theInpShape Standard_Real Uperiod = (aBaseSurface->IsUPeriodic())? aBaseSurface->UPeriod() : 0.; Standard_Real Vperiod = (aBaseSurface->IsVPeriodic())? aBaseSurface->VPeriod() : 0.; + // Get shells connected to the face (in normal cases should not be more than 2) + const TopTools_MapOfShape* pFShells1 = theGMapFaceShells.Seek (aFace); + // find adjacent faces to union Standard_Integer i; for (i = 1; i <= edges.Length(); i++) { @@ -2903,6 +2968,15 @@ void ShapeUpgrade_UnifySameDomain::IntUnifyFaces(const TopoDS_Shape& theInpShape if (aProcessed.Contains(aCheckedFace)) continue; + // Get shells connected to the checked face + const TopTools_MapOfShape* pFShells2 = theGMapFaceShells.Seek (aCheckedFace); + // Faces can be unified only if the shells of faces connected to + // these faces are the same. Otherwise, topology would be broken. + if (!isSameSets (pFShells1, pFShells2)) + { + continue; + } + if (bCheckNormals) { // get normal of checked face using the same parameter on edge gp_Dir aDN2; diff --git a/src/ShapeUpgrade/ShapeUpgrade_UnifySameDomain.hxx b/src/ShapeUpgrade/ShapeUpgrade_UnifySameDomain.hxx index a068959276..b2567e7d3c 100644 --- a/src/ShapeUpgrade/ShapeUpgrade_UnifySameDomain.hxx +++ b/src/ShapeUpgrade/ShapeUpgrade_UnifySameDomain.hxx @@ -70,6 +70,7 @@ class ShapeUpgrade_UnifySameDomain : public Standard_Transient public: typedef NCollection_DataMap DataMapOfFacePlane; + typedef NCollection_DataMap DataMapOfShapeMapOfShape; //! Empty constructor Standard_EXPORT ShapeUpgrade_UnifySameDomain(); @@ -168,7 +169,8 @@ protected: Standard_EXPORT void UnifyEdges(); void IntUnifyFaces(const TopoDS_Shape& theInpShape, - TopTools_IndexedDataMapOfShapeListOfShape& theGMapEdgeFaces, + const TopTools_IndexedDataMapOfShapeListOfShape& theGMapEdgeFaces, + const DataMapOfShapeMapOfShape& theGMapFaceShells, const TopTools_MapOfShape& theFreeBoundMap); //! Splits the sequence of edges into the sequence of chains diff --git a/tests/bugs/heal/bug33171_1 b/tests/bugs/heal/bug33171_1 new file mode 100644 index 0000000000..600d69de96 --- /dev/null +++ b/tests/bugs/heal/bug33171_1 @@ -0,0 +1,71 @@ +puts "========================" +puts " 0033171: Modeling Algorithms - Invalid result of faces unification" +puts "========================" +puts "" + +# make outer prism +polyline p 0 0 0 10 0 0 10 10 0 0 10 0 0 0 0 +mkplane f p +prism s f 0 0 5 + +# make section shells +polyline p1 3 10 0 3 7 0 6 7 0 6 3 0 10 3 0 +polyline p2 6 7 0 10 7 0 +polyline p3 8 7 0 8 10 0 +polyline p4 0 5 0 10 5 0 + +prism sh1 p1 0 0 5 +prism sh2 p2 0 0 5 +prism sh3 p3 0 0 5 +prism sh4 p4 0 0 5 + +# split the prism +bclearobjects +bcleartools +baddobjects s +baddtools sh1 sh2 sh3 sh4 +bfillds +bsplit r + +checkshape r +if {![regexp "This shape seems to be OK" [bopcheck r]]} { + puts "Error: invalid shape after split" +} + +# try to unify faces in the result compound +unifysamedom ru1 r +unifysamedom ru2 r +i + +checkshape ru1 +checkshape ru2 + +checknbshapes ru1 -ref [nbshapes r -t] -t +checknbshapes ru2 -ref [nbshapes r -t] -t + +if {![regexp "This shape seems to be OK" [bopcheck ru1]]} { + puts "Error: invalid shape after faces unification" +} +if {![regexp "This shape seems to be OK" [bopcheck ru2]]} { + puts "Error: invalid shape after faces unification" +} + +# make compound of shells +eval compound [explode r] shs + +unifysamedom shsu1 r +unifysamedom shsu2 r +i + +checkshape shsu1 +checkshape shsu2 + +checknbshapes shsu1 -ref [nbshapes shs -t] -t +checknbshapes shsu2 -ref [nbshapes shs -t] -t + +if {![regexp "This shape seems to be OK" [bopcheck shsu1]]} { + puts "Error: invalid shape after faces unification" +} +if {![regexp "This shape seems to be OK" [bopcheck shsu2]]} { + puts "Error: invalid shape after faces unification" +} + +checkview -display ru2 -2d -path ${imagedir}/${test_image}.png diff --git a/tests/bugs/heal/bug33171_2 b/tests/bugs/heal/bug33171_2 new file mode 100644 index 0000000000..d80bcabdb5 --- /dev/null +++ b/tests/bugs/heal/bug33171_2 @@ -0,0 +1,57 @@ +puts "========================" +puts " 0033171: Modeling Algorithms - Invalid result of faces unification" +puts "========================" +puts "" + +# make two solids +box b1 10 10 5 +box b2 10 0 0 5 5 5 +# make shared +bclearobjects +bcleartools +baddobjects b1 b2 +bfillds +bbuild r + +checkshape r +if {![regexp "This shape seems to be OK" [bopcheck r]]} { + puts "Error: invalid shape after fuse" +} + +# try to unify faces in the result compound +unifysamedom ru1 r +unifysamedom ru2 r +i + +checkshape ru1 +checkshape ru2 + +checknbshapes ru1 -ref [nbshapes r -t] -t +checknbshapes ru2 -ref [nbshapes r -t] -t + +if {![regexp "This shape seems to be OK" [bopcheck ru1]]} { + puts "Error: invalid shape after faces unification" +} +if {![regexp "This shape seems to be OK" [bopcheck ru2]]} { + puts "Error: invalid shape after faces unification" +} + +# make compound of shells +eval compound [explode r] shs + +unifysamedom shsu1 r +unifysamedom shsu2 r +i + +checkshape shsu1 +checkshape shsu2 + +checknbshapes shsu1 -ref [nbshapes shs -t] -t +checknbshapes shsu2 -ref [nbshapes shs -t] -t + +if {![regexp "This shape seems to be OK" [bopcheck shsu1]]} { + puts "Error: invalid shape after faces unification" +} +if {![regexp "This shape seems to be OK" [bopcheck shsu2]]} { + puts "Error: invalid shape after faces unification" +} + +checkview -display ru2 -2d -path ${imagedir}/${test_image}.png From d7d89acb391af223abb7895703e8ba038963028c Mon Sep 17 00:00:00 2001 From: ona Date: Tue, 11 Oct 2022 15:43:39 +0300 Subject: [PATCH 416/639] 0032977: OCC V7.5, V7.6 cannot read STEP color correctly for the root label, but v6.8 can - color overriding mechanism is implemented for assembles, parts and instances --- src/STEPCAFControl/STEPCAFControl_Reader.cxx | 470 +++++++++++++------ src/STEPConstruct/STEPConstruct_Styles.cxx | 46 +- src/STEPConstruct/STEPConstruct_Styles.hxx | 7 + src/XCAFDoc/XCAFDoc_ShapeTool.cxx | 30 +- tests/bugs/step/bug32977 | 58 +++ tests/de/step_2/K4 | 6 +- tests/de/step_2/K5 | 6 +- 7 files changed, 471 insertions(+), 152 deletions(-) create mode 100644 tests/bugs/step/bug32977 diff --git a/src/STEPCAFControl/STEPCAFControl_Reader.cxx b/src/STEPCAFControl/STEPCAFControl_Reader.cxx index 6c2ccfa8b4..a211ebbb94 100644 --- a/src/STEPCAFControl/STEPCAFControl_Reader.cxx +++ b/src/STEPCAFControl/STEPCAFControl_Reader.cxx @@ -221,6 +221,10 @@ #include #include #include +#include +#include +#include +#include #include #include @@ -937,6 +941,306 @@ static void propagateColorToParts(const Handle(XCAFDoc_ShapeTool)& theSTool, propagateColorToParts(theSTool, theCTool, anOriginalL); } } + +//======================================================================= +//function : SetAssemblyComponentStyle +//purpose : auxiliary: set override style for assembly components +//======================================================================= + +static void SetAssemblyComponentStyle(const Handle(Transfer_TransientProcess) &theTP, + const Handle(XCAFDoc_ColorTool)& theCTool, + const STEPConstruct_Styles& theStyles, + const Handle(StepVisual_ContextDependentOverRidingStyledItem)& theStyle) +{ + if (theStyle.IsNull()) return; + + Handle(StepVisual_Colour) aSurfCol, aBoundCol, aCurveCol, aRenderCol; + Standard_Real aRenderTransp; + // check if it is component style + Standard_Boolean anIsComponent = Standard_False; + if (!theStyles.GetColors(theStyle, aSurfCol, aBoundCol, aCurveCol, aRenderCol, aRenderTransp, anIsComponent)) + return; + + const Interface_Graph& aGraph = theTP->Graph(); + TopLoc_Location aLoc; // init; + // find shape + TopoDS_Shape aShape; + Handle(Transfer_Binder) aBinder; + Handle(StepShape_ShapeRepresentation) aRepr = Handle(StepShape_ShapeRepresentation)::DownCast(theStyle->ItemAP242 ().Value ()); + if (aRepr.IsNull()) + return; + Handle(StepRepr_ShapeRepresentationRelationship) aSRR; + Interface_EntityIterator aSubs = theTP->Graph().Sharings(aRepr); + for (aSubs.Start(); aSubs.More(); aSubs.Next()) { + const Handle(Standard_Transient)& aSubsVal = aSubs.Value(); + if (aSubsVal->IsKind (STANDARD_TYPE(StepRepr_ShapeRepresentationRelationship))) + { + // NB: C cast is used instead of DownCast() to improve performance on some cases. + // This saves ~10% of elapsed time on "testgrid perf de bug29* -parallel 0". + aSRR = (StepRepr_ShapeRepresentationRelationship*)(aSubsVal.get()); + } + } + + aBinder = theTP->Find(aSRR); + if (!aBinder.IsNull() ) { + aShape = TransferBRep::ShapeResult (aBinder); + } + if (aShape.IsNull()) + return; + + //get transformation + aSubs = aGraph.Shareds (theStyle); + aSubs.Start(); + for(; aSubs.More(); aSubs.Next()) + { + Handle(StepRepr_ShapeRepresentationRelationshipWithTransformation) aRelation = Handle(StepRepr_ShapeRepresentationRelationshipWithTransformation)::DownCast (aSubs.Value ()); + if(aRelation.IsNull()) continue; + + auto aTransf = aRelation->TransformationOperator (); + if(auto anItemTransf = aTransf.ItemDefinedTransformation ()) + { + Handle(StepGeom_Axis2Placement3d) anAxp1 = Handle(StepGeom_Axis2Placement3d)::DownCast(anItemTransf->TransformItem1 ()); + Handle(StepGeom_Axis2Placement3d) anAxp2 = Handle(StepGeom_Axis2Placement3d)::DownCast(anItemTransf->TransformItem2 ()); + + if(!anAxp1.IsNull() && !anAxp2.IsNull()) + { + Handle(Geom_Axis2Placement) anOrig = StepToGeom::MakeAxis2Placement (anAxp1); + Handle(Geom_Axis2Placement) aTarg = StepToGeom::MakeAxis2Placement (anAxp2); + gp_Ax3 anAx3Orig(anOrig->Ax2()); + gp_Ax3 anAx3Targ(aTarg->Ax2()); + + gp_Trsf aTr1; + aTr1.SetTransformation(anAx3Targ, anAx3Orig); + TopLoc_Location aLoc1 (aTr1); + aLoc = aLoc.Multiplied(aLoc1); + } + } + } + + aShape.Location( aLoc, Standard_False ); + + if(!aSurfCol.IsNull() || !aBoundCol.IsNull() || !aCurveCol.IsNull() || !aRenderCol.IsNull()) + { + Quantity_Color aSCol,aBCol,aCCol,aRCol; + Quantity_ColorRGBA aFullSCol; + if(!aSurfCol.IsNull()) { + theStyles.DecodeColor(aSurfCol,aSCol); + aFullSCol = Quantity_ColorRGBA(aSCol); + } + if(!aBoundCol.IsNull()) + theStyles.DecodeColor(aBoundCol,aBCol); + if(!aCurveCol.IsNull()) + theStyles.DecodeColor(aCurveCol,aCCol); + if(!aRenderCol.IsNull()) { + theStyles.DecodeColor(aRenderCol,aRCol); + aFullSCol = Quantity_ColorRGBA(aRCol,static_cast(1.0f - aRenderTransp)); + } + + if(!aSurfCol.IsNull() || !aRenderCol.IsNull()) + theCTool->SetInstanceColor(aShape,XCAFDoc_ColorSurf,aFullSCol); + if(!aBoundCol.IsNull()) + theCTool->SetInstanceColor(aShape,XCAFDoc_ColorCurv,aBCol); + if(!aCurveCol.IsNull()) + theCTool->SetInstanceColor(aShape,XCAFDoc_ColorCurv,aCCol); + } +} + +//======================================================================= +//function : SetStyle +//purpose : auxiliary: set style for parts and instances +//======================================================================= + +static void SetStyle(const Handle(XSControl_WorkSession) &theWS, + const XCAFDoc_DataMapOfShapeLabel& theMap, + const Handle(XCAFDoc_ColorTool)& theCTool, + const Handle(XCAFDoc_ShapeTool)& theSTool, + const STEPConstruct_Styles& theStyles, + const Handle(TColStd_HSequenceOfTransient)& theHSeqOfInvisStyle, + const Handle(StepVisual_StyledItem)& theStyle) +{ + if (theStyle.IsNull()) return; + + const Handle(Transfer_TransientProcess) &aTP = theWS->TransferReader()->TransientProcess(); + if (Handle(StepVisual_OverRidingStyledItem) anOverridingStyle = Handle(StepVisual_OverRidingStyledItem)::DownCast (theStyle)) + { + SetStyle (theWS, theMap, theCTool, theSTool, theStyles, theHSeqOfInvisStyle, anOverridingStyle->OverRiddenStyle ()); + if (Handle(StepVisual_ContextDependentOverRidingStyledItem) anAssemblyComponentStyle = Handle(StepVisual_ContextDependentOverRidingStyledItem)::DownCast (theStyle)) + { + SetAssemblyComponentStyle (aTP, theCTool, theStyles,anAssemblyComponentStyle); + return; + } + } + + Standard_Boolean anIsVisible = Standard_True; + // check the visibility of styled item. + for (Standard_Integer si = 1; si <= theHSeqOfInvisStyle->Length(); si++) { + if (theStyle != theHSeqOfInvisStyle->Value(si)) + continue; + // found that current style is invisible. + anIsVisible = Standard_False; + break; + } + Handle(StepVisual_Colour) aSurfCol, aBoundCol, aCurveCol, aRenderCol; + Standard_Real aRenderTransp; + // check if it is component style + Standard_Boolean anIsComponent = Standard_False; + if (!theStyles.GetColors(theStyle, aSurfCol, aBoundCol, aCurveCol, aRenderCol, aRenderTransp, anIsComponent) && anIsVisible) + return; + + // collect styled items + NCollection_Vector anItems; + if (!theStyle->ItemAP242().IsNull()) { + anItems.Append(theStyle->ItemAP242()); + } + + for (Standard_Integer itemIt = 0; itemIt < anItems.Length(); itemIt++) { + Standard_Integer anIndex = aTP->MapIndex(anItems.Value(itemIt).Value()); + TopoDS_Shape aS; + if (anIndex > 0) { + Handle(Transfer_Binder) aBinder = aTP->MapItem(anIndex); + aS = TransferBRep::ShapeResult(aBinder); + } + Standard_Boolean isSkipSHUOstyle = Standard_False; + // take shape with real location. + while (anIsComponent) { + // take SR of NAUO + Handle(StepShape_ShapeRepresentation) aSR; + findStyledSR(theStyle, aSR); + // search for SR along model + if (aSR.IsNull()) + break; + Interface_EntityIterator aSubs = theWS->HGraph()->Graph().Sharings(aSR); + Handle(StepShape_ShapeDefinitionRepresentation) aSDR; + for (aSubs.Start(); aSubs.More(); aSubs.Next()) { + aSDR = Handle(StepShape_ShapeDefinitionRepresentation)::DownCast(aSubs.Value()); + if (aSDR.IsNull()) + continue; + StepRepr_RepresentedDefinition aPDSselect = aSDR->Definition(); + Handle(StepRepr_ProductDefinitionShape) PDS = + Handle(StepRepr_ProductDefinitionShape)::DownCast(aPDSselect.PropertyDefinition()); + if (PDS.IsNull()) + continue; + StepRepr_CharacterizedDefinition aCharDef = PDS->Definition(); + + Handle(StepRepr_AssemblyComponentUsage) ACU = + Handle(StepRepr_AssemblyComponentUsage)::DownCast(aCharDef.ProductDefinitionRelationship()); + if (ACU.IsNull()) + continue; + // PTV 10.02.2003 skip styled item that refer to SHUO + if (ACU->IsKind(STANDARD_TYPE(StepRepr_SpecifiedHigherUsageOccurrence))) { + isSkipSHUOstyle = Standard_True; + break; + } + Handle(StepRepr_NextAssemblyUsageOccurrence) NAUO = + Handle(StepRepr_NextAssemblyUsageOccurrence)::DownCast(ACU); + if (NAUO.IsNull()) + continue; + + TopoDS_Shape aSh; + // PTV 10.02.2003 to find component of assembly CORRECTLY + STEPConstruct_Tool aTool(theWS); + TDF_Label aShLab = STEPCAFControl_Reader::FindInstance(NAUO, theCTool->ShapeTool(), aTool, theMap); + aSh = theCTool->ShapeTool()->GetShape(aShLab); + if (!aSh.IsNull()) { + aS = aSh; + break; + } + } + break; + } + if (isSkipSHUOstyle) + continue; // skip styled item which refer to SHUO + + if (aS.IsNull()) + continue; + + if (!aSurfCol.IsNull() || !aBoundCol.IsNull() || !aCurveCol.IsNull() || !aRenderCol.IsNull() || !anIsVisible) + { + TDF_Label aL; + Standard_Boolean isFound = theSTool->SearchUsingMap(aS, aL, Standard_False, Standard_True); + if (!aSurfCol.IsNull() || !aBoundCol.IsNull() || !aCurveCol.IsNull() || !aRenderCol.IsNull()) + { + Quantity_Color aSCol, aBCol, aCCol, aRCol; + Quantity_ColorRGBA aFullSCol; + if (!aSurfCol.IsNull()) { + theStyles.DecodeColor(aSurfCol, aSCol); + aFullSCol = Quantity_ColorRGBA(aSCol); + } + if (!aBoundCol.IsNull()) + theStyles.DecodeColor(aBoundCol, aBCol); + if (!aCurveCol.IsNull()) + theStyles.DecodeColor(aCurveCol, aCCol); + if (!aRenderCol.IsNull()) { + theStyles.DecodeColor(aRenderCol, aRCol); + aFullSCol = Quantity_ColorRGBA(aRCol, static_cast(1.0f - aRenderTransp)); + } + if (isFound) + { + if (!aSurfCol.IsNull() || !aRenderCol.IsNull()) + theCTool->SetColor(aL, aFullSCol, XCAFDoc_ColorSurf); + if (!aBoundCol.IsNull()) + theCTool->SetColor(aL, aBCol, XCAFDoc_ColorCurv); + if (!aCurveCol.IsNull()) + theCTool->SetColor(aL, aCCol, XCAFDoc_ColorCurv); + } + else + { + for (TopoDS_Iterator it(aS); it.More(); it.Next()) + { + TDF_Label aL1; + if (theSTool->SearchUsingMap(it.Value(), aL1, Standard_False, Standard_True)) + { + if (!aSurfCol.IsNull() || !aRenderCol.IsNull()) + theCTool->SetColor(aL1, aFullSCol, XCAFDoc_ColorSurf); + if (!aBoundCol.IsNull()) + theCTool->SetColor(aL1, aBCol, XCAFDoc_ColorCurv); + if (!aCurveCol.IsNull()) + theCTool->SetColor(aL1, aCCol, XCAFDoc_ColorCurv); + } + } + } + } + if (!anIsVisible) + { + // sets the invisibility for shape. + if (isFound) + theCTool->SetVisibility(aL, Standard_False); + } + } + } +} + +//======================================================================= +//function : IsOverriden +//purpose : auxiliary: check that style is overridden +//======================================================================= + +static Standard_Boolean IsOverriden(const Interface_Graph& theGraph, + const Handle(StepVisual_StyledItem)& theStyle, + Standard_Boolean theIsRoot) +{ + Interface_EntityIterator aSubs = theGraph.Sharings (theStyle); + aSubs.Start(); + for(; aSubs.More(); aSubs.Next()) + { + Handle(StepVisual_OverRidingStyledItem) anOverRidingStyle = Handle(StepVisual_OverRidingStyledItem)::DownCast (aSubs.Value ()); + if(!anOverRidingStyle.IsNull()) + { + if(!theIsRoot) + { + return Standard_True; + } + // for root style returns true only if it is overridden by other root style + auto anItem = anOverRidingStyle->ItemAP242 ().Value (); + if(!anItem.IsNull() && anItem->IsKind(STANDARD_TYPE(StepShape_ShapeRepresentation))) + { + return Standard_True; + } + } + } + return Standard_False; +} + //======================================================================= //function : ReadColors //purpose : @@ -961,152 +1265,36 @@ Standard_Boolean STEPCAFControl_Reader::ReadColors(const Handle(XSControl_WorkSe Handle(XCAFDoc_ShapeTool) STool = XCAFDoc_DocumentTool::ShapeTool(Doc->Main()); if (STool.IsNull()) return Standard_False; + const Interface_Graph& aGraph = Styles.Graph (); + // parse and search for color attributes - Standard_Integer nb = Styles.NbStyles(); - for (Standard_Integer i = 1; i <= nb; i++) { - Handle(StepVisual_StyledItem) style = Styles.Style(i); - if (style.IsNull()) continue; - - Standard_Boolean IsVisible = Standard_True; - // check the visibility of styled item. - for (Standard_Integer si = 1; si <= aHSeqOfInvisStyle->Length(); si++) { - if (style != aHSeqOfInvisStyle->Value(si)) - continue; - // found that current style is invisible. - IsVisible = Standard_False; - break; - } - - Handle(StepVisual_Colour) SurfCol, BoundCol, CurveCol, RenderCol; - Standard_Real RenderTransp; - // check if it is component style - Standard_Boolean IsComponent = Standard_False; - if (!Styles.GetColors(style, SurfCol, BoundCol, CurveCol, RenderCol, RenderTransp, IsComponent) && IsVisible) - continue; - - // collect styled items - NCollection_Vector anItems; - if (!style->ItemAP242().IsNull()) { - anItems.Append(style->ItemAP242()); + Standard_Integer nb = Styles.NbRootStyles(); + // apply root styles earlier, as they can be overridden + // function IsOverriden for root style returns true only if it is overridden by other root style + Standard_Boolean anIsRootStyle = Standard_True; + for(Standard_Integer i = 1; i <= nb; i++) + { + Handle(StepVisual_StyledItem) Style = Styles.RootStyle(i); + // check that style is overridden by other root style + if (!IsOverriden (aGraph, Style, anIsRootStyle)) + { + SetStyle (WS, myMap, CTool, STool, Styles, aHSeqOfInvisStyle, Style); } + } - const Handle(Transfer_TransientProcess) &TP = WS->TransferReader()->TransientProcess(); - for (Standard_Integer itemIt = 0; itemIt < anItems.Length(); itemIt++) { - Standard_Integer index = TP->MapIndex(anItems.Value(itemIt).Value()); - TopoDS_Shape S; - if (index > 0) { - Handle(Transfer_Binder) binder = TP->MapItem(index); - S = TransferBRep::ShapeResult(binder); - } - Standard_Boolean isSkipSHUOstyle = Standard_False; - // take shape with real location. - while (IsComponent) { - // take SR of NAUO - Handle(StepShape_ShapeRepresentation) aSR; - findStyledSR(style, aSR); - // search for SR along model - if (aSR.IsNull()) - break; - Interface_EntityIterator subs = WS->HGraph()->Graph().Sharings(aSR); - Handle(StepShape_ShapeDefinitionRepresentation) aSDR; - for (subs.Start(); subs.More(); subs.Next()) { - aSDR = Handle(StepShape_ShapeDefinitionRepresentation)::DownCast(subs.Value()); - if (aSDR.IsNull()) - continue; - StepRepr_RepresentedDefinition aPDSselect = aSDR->Definition(); - Handle(StepRepr_ProductDefinitionShape) PDS = - Handle(StepRepr_ProductDefinitionShape)::DownCast(aPDSselect.PropertyDefinition()); - if (PDS.IsNull()) - continue; - StepRepr_CharacterizedDefinition aCharDef = PDS->Definition(); - - Handle(StepRepr_AssemblyComponentUsage) ACU = - Handle(StepRepr_AssemblyComponentUsage)::DownCast(aCharDef.ProductDefinitionRelationship()); - if (ACU.IsNull()) - continue; - // PTV 10.02.2003 skip styled item that refer to SHUO - if (ACU->IsKind(STANDARD_TYPE(StepRepr_SpecifiedHigherUsageOccurrence))) { - isSkipSHUOstyle = Standard_True; - break; - } - Handle(StepRepr_NextAssemblyUsageOccurrence) NAUO = - Handle(StepRepr_NextAssemblyUsageOccurrence)::DownCast(ACU); - if (NAUO.IsNull()) - continue; - - TopoDS_Shape aSh; - // PTV 10.02.2003 to find component of assembly CORRECTLY - STEPConstruct_Tool Tool(WS); - TDF_Label aShLab = FindInstance(NAUO, CTool->ShapeTool(), Tool, myMap); - aSh = CTool->ShapeTool()->GetShape(aShLab); - if (!aSh.IsNull()) { - S = aSh; - break; - } - } - break; - } - if (isSkipSHUOstyle) - continue; // skip styled item which refer to SHUO - - if (S.IsNull()) - continue; - - if (!SurfCol.IsNull() || !BoundCol.IsNull() || !CurveCol.IsNull() || !RenderCol.IsNull() || !IsVisible) - { - TDF_Label aL; - Standard_Boolean isFound = STool->SearchUsingMap(S, aL, Standard_False, Standard_True); - if (!SurfCol.IsNull() || !BoundCol.IsNull() || !CurveCol.IsNull() || !RenderCol.IsNull()) - { - Quantity_Color aSCol, aBCol, aCCol, aRCol; - Quantity_ColorRGBA aFullSCol; - if (!SurfCol.IsNull()) { - Styles.DecodeColor(SurfCol, aSCol); - aFullSCol = Quantity_ColorRGBA(aSCol); - } - if (!BoundCol.IsNull()) - Styles.DecodeColor(BoundCol, aBCol); - if (!CurveCol.IsNull()) - Styles.DecodeColor(CurveCol, aCCol); - if (!RenderCol.IsNull()) { - Styles.DecodeColor(RenderCol, aRCol); - aFullSCol = Quantity_ColorRGBA(aRCol, static_cast(1.0f - RenderTransp)); - } - if (isFound) - { - if (!SurfCol.IsNull() || !RenderCol.IsNull()) - CTool->SetColor(aL, aFullSCol, XCAFDoc_ColorSurf); - if (!BoundCol.IsNull()) - CTool->SetColor(aL, aBCol, XCAFDoc_ColorCurv); - if (!CurveCol.IsNull()) - CTool->SetColor(aL, aCCol, XCAFDoc_ColorCurv); - } - else - { - for (TopoDS_Iterator it(S); it.More(); it.Next()) - { - TDF_Label aL1; - if (STool->SearchUsingMap(it.Value(), aL1, Standard_False, Standard_True)) - { - if (!SurfCol.IsNull() || !RenderCol.IsNull()) - CTool->SetColor(aL1, aFullSCol, XCAFDoc_ColorSurf); - if (!BoundCol.IsNull()) - CTool->SetColor(aL1, aBCol, XCAFDoc_ColorCurv); - if (!CurveCol.IsNull()) - CTool->SetColor(aL1, aCCol, XCAFDoc_ColorCurv); - } - } - } - } - if (!IsVisible) - { - // sets the invisibility for shape. - if (isFound) - CTool->SetVisibility(aL, Standard_False); - } - } + nb = Styles.NbStyles(); + // apply leaf styles, they can override root styles + anIsRootStyle = Standard_False; + for(Standard_Integer i = 1; i <= nb; i++) + { + Handle(StepVisual_StyledItem) Style = Styles.Style(i); + // check that style is overridden + if (!IsOverriden (aGraph, Style, anIsRootStyle)) + { + SetStyle (WS, myMap, CTool, STool, Styles, aHSeqOfInvisStyle, Style); } } + CTool->ReverseChainsOfTreeNodes(); // some colors can be attached to assemblies, propagate them to components diff --git a/src/STEPConstruct/STEPConstruct_Styles.cxx b/src/STEPConstruct/STEPConstruct_Styles.cxx index 71caf4ca0c..09c0efcabb 100644 --- a/src/STEPConstruct/STEPConstruct_Styles.cxx +++ b/src/STEPConstruct/STEPConstruct_Styles.cxx @@ -68,6 +68,8 @@ #include #include #include +#include +#include //======================================================================= //function : STEPConstruct_Styles @@ -124,6 +126,26 @@ Handle(StepVisual_StyledItem) STEPConstruct_Styles::Style (const Standard_Intege return Handle(StepVisual_StyledItem)::DownCast ( myStyles.FindKey(i) ); } +//======================================================================= +//function : NbRootStyles +//purpose : +//======================================================================= + +Standard_Integer STEPConstruct_Styles::NbRootStyles () const +{ + return myRootStyles.Extent(); +} + +//======================================================================= +//function : RootStyle +//purpose : +//======================================================================= + +Handle(StepVisual_StyledItem) STEPConstruct_Styles::RootStyle (const Standard_Integer i) const +{ + return Handle(StepVisual_StyledItem)::DownCast ( myRootStyles.FindKey(i) ); +} + //======================================================================= //function : ClearStyles @@ -134,6 +156,7 @@ void STEPConstruct_Styles::ClearStyles () { myStyles.Clear(); myPSA.Clear(); + myRootStyles.Clear(); } @@ -344,13 +367,15 @@ Standard_Boolean STEPConstruct_Styles::LoadStyles () { myStyles.Clear(); myPSA.Clear(); - + myRootStyles.Clear(); + // find all MDGPRs and DMs and collect all defined styles in myStyles Handle(Interface_InterfaceModel) model = Model(); Standard_Integer nb = model->NbEntities(); Handle(Standard_Type) tMDGPR = STANDARD_TYPE(StepVisual_MechanicalDesignGeometricPresentationRepresentation); Handle(Standard_Type) tDM = STANDARD_TYPE(StepVisual_DraughtingModel); Handle(Standard_Type) tSI = STANDARD_TYPE(StepVisual_StyledItem); + Handle(Standard_Type) tSR = STANDARD_TYPE(StepShape_ShapeRepresentation); for (Standard_Integer i = 1; i <= nb; i ++) { Handle(Standard_Transient) enti = model->Value(i); @@ -364,13 +389,26 @@ Standard_Boolean STEPConstruct_Styles::LoadStyles () Handle(StepVisual_StyledItem) style = Handle(StepVisual_StyledItem)::DownCast ( container->ItemsValue(j) ); if ( style.IsNull() ) continue; - myStyles.Add ( style ); + auto anItem = style->ItemAP242 ().Value (); + if (!anItem.IsNull() && anItem->IsKind(tSR)) + { + myRootStyles.Add (style); + } + else + { + myStyles.Add (style); + } } } - else if (enti->DynamicType() == tSI) + else if (enti->IsKind (STANDARD_TYPE(StepVisual_StyledItem))) { Handle(StepVisual_StyledItem) aStyledItem = Handle(StepVisual_StyledItem)::DownCast (enti); - if (!myStyles.Contains (aStyledItem)) + auto anItem = aStyledItem->ItemAP242 ().Value (); + if (!anItem.IsNull() && anItem->IsKind(tSR) && !myRootStyles.Contains (aStyledItem)) + { + myRootStyles.Add (aStyledItem); + } + else if (!myStyles.Contains (aStyledItem)) { myStyles.Add (aStyledItem); } diff --git a/src/STEPConstruct/STEPConstruct_Styles.hxx b/src/STEPConstruct/STEPConstruct_Styles.hxx index 722561d51f..5fc2cd6c86 100644 --- a/src/STEPConstruct/STEPConstruct_Styles.hxx +++ b/src/STEPConstruct/STEPConstruct_Styles.hxx @@ -69,6 +69,12 @@ public: //! Returns style with given index Standard_EXPORT Handle(StepVisual_StyledItem) Style (const Standard_Integer i) const; + + //! Returns number of override styles + Standard_EXPORT Standard_Integer NbRootStyles() const; + + //! Returns override style with given index + Standard_EXPORT Handle(StepVisual_StyledItem) RootStyle (const Standard_Integer i) const; //! Clears all defined styles and PSA sequence Standard_EXPORT void ClearStyles(); @@ -159,6 +165,7 @@ private: TColStd_IndexedDataMapOfTransientTransient myMapOfStyles; TColStd_IndexedMapOfTransient myStyles; + TColStd_IndexedMapOfTransient myRootStyles; TColStd_SequenceOfTransient myPSA; diff --git a/src/XCAFDoc/XCAFDoc_ShapeTool.cxx b/src/XCAFDoc/XCAFDoc_ShapeTool.cxx index b226c6f133..85e3ecc0e3 100644 --- a/src/XCAFDoc/XCAFDoc_ShapeTool.cxx +++ b/src/XCAFDoc/XCAFDoc_ShapeTool.cxx @@ -48,6 +48,7 @@ #include #include #include +#include IMPLEMENT_DERIVED_ATTRIBUTE_WITH_TYPE(XCAFDoc_ShapeTool,TDataStd_GenericEmpty,"xcaf","ShapeTool") @@ -1602,6 +1603,33 @@ Standard_Boolean XCAFDoc_ShapeTool::RemoveSHUO (const TDF_Label& L) const //purpose : auxiliary //======================================================================= +static Standard_Boolean IsEqual (const TopLoc_Location& theLoc1, const TopLoc_Location& theLoc2) +{ + if (theLoc1.IsEqual (theLoc2)) {return Standard_True; } + if (theLoc1.IsIdentity() || theLoc2.IsIdentity()) {return Standard_False; } + const Handle(TopLoc_Datum3D)& aDatum1 = theLoc1.FirstDatum(); + const Handle(TopLoc_Datum3D)& aDatum2 = theLoc2.FirstDatum(); + if (aDatum1 && aDatum2) + { + NCollection_Mat4 aMat41; + NCollection_Mat4 aMat42; + theLoc1.FirstDatum()->Transformation().GetMat4(aMat41); + theLoc2.FirstDatum()->Transformation().GetMat4(aMat42); + if ( !aMat41.IsEqual (aMat42)) {return Standard_False; } + } + else if (aDatum1 || aDatum2) {return Standard_False; } + if (theLoc1.FirstPower() != theLoc2.FirstPower() ) {return Standard_False; } + else { return IsEqual (theLoc1.NextLocation(), theLoc2.NextLocation());} +} + +static Standard_Boolean IsSame (const TopoDS_Shape& theShape1, const TopoDS_Shape& theShape2) +{ + + return theShape1.TShape() == theShape2.TShape() + && theShape1.Orientation() == theShape2.Orientation() + && IsEqual (theShape1.Location(), theShape2.Location()); +} + static Standard_Boolean checkForShape (const TopoDS_Shape& theShape, const TopoDS_Shape& theCurSh, const TDF_Label& theUserL, @@ -1616,7 +1644,7 @@ static Standard_Boolean checkForShape (const TopoDS_Shape& theShape, aCompLoc = aCompLoc.Multiplied( theCurSh.Location() ); aSupLoc = aSupLoc.Multiplied( aCompLoc ); aCopySh.Location( aSupLoc, Standard_False ); - if ( aCopySh.IsSame( theShape ) ) { + if ( IsSame ( theShape, aCopySh ) ) { theLabels.Prepend( theUserL ); return Standard_True; } diff --git a/tests/bugs/step/bug32977 b/tests/bugs/step/bug32977 new file mode 100644 index 0000000000..3948aeb0cf --- /dev/null +++ b/tests/bugs/step/bug32977 @@ -0,0 +1,58 @@ +puts "====================================" +puts "0032977: OCC V7.5, V7.6 cannot read STEP color correctly for the root label, but v6.8 can" +puts "====================================" +puts "" + +pload ALL + +# Read files +# Check colors number + +ReadStep D1 [locate_data_file bug32977_1.stp] +set info1 [XStat D1] +regexp {Number +of +colors += +([-0-9.+eE]+)} $info1 full nbcolor +regexp {Number +of +colors += +[-0-9.+eE]+\n([^\n]*)} $info1 full colors +if {[string compare ${colors} "RED BLACK GRAY74 GRAY26 "] != 0} { + puts "Error: not expected colors ${colors}" + } +if {$nbcolor != 4} { + puts "Error: not expected number of colors" + } + +ReadStep D2 [locate_data_file bug32977_2.step] +set info2 [XStat D2] +regexp {Number +of +colors += +([-0-9.+eE]+)} $info2 full nbcolor +regexp {Number +of +colors += +[-0-9.+eE]+\n([^\n]*)} $info2 full colors +if {[string compare ${colors} "LIGHTSTEELBLUE2 WHITE VIOLETRED3 GRAY25 "] != 0} { + puts "Error: not expected colors ${colors}" + } +if {$nbcolor != 4} { + puts "Error: not expected number of colors" + } + +ReadStep D3 [locate_data_file trj10_pm8-id-214.stp] +set info3 [XStat D3] +regexp {Number +of +colors += +([-0-9.+eE]+)} $info3 full nbcolor +regexp {Number +of +colors += +[-0-9.+eE]+\n([^\n]*)} $info3 full colors +if {[string compare ${colors} "MAGENTA RED ORANGERED ORANGE DEEPSKYBLUE2 GREEN "] != 0} { + puts "Error: not expected colors ${colors}" + } +if {$nbcolor != 6} { + puts "Error: not expected number of colors" + } + +vinit View1 +XDisplay D1 -dispmode 1 +vfit +checkview -screenshot -3d -path ${imagedir}/${test_image}1.png + +vclear +XDisplay D2 -dispmode 1 +vfit +checkview -screenshot -3d -path ${imagedir}/${test_image}2.png + +vclear +XDisplay D3 -dispmode 1 +vfit +checkview -screenshot -3d -path ${imagedir}/${test_image}3.png + diff --git a/tests/de/step_2/K4 b/tests/de/step_2/K4 index 50f99b358e..8671a0efe7 100644 --- a/tests/de/step_2/K4 +++ b/tests/de/step_2/K4 @@ -8,10 +8,10 @@ CHECKSHAPE : Wires = 0 ( 0 ) Faces = 0 ( 0 ) Shells = 0 ( 0 ) So NBSHAPES : Solid = 3 ( 3 ) Shell = 3 ( 3 ) Face = 492 ( 492 ) STATSHAPE : Solid = 57 ( 57 ) Shell = 57 ( 57 ) Face = 1894 ( 1894 ) FreeWire = 0 ( 0 ) TOLERANCE : MaxTol = 1e-007 ( 1e-007 ) AvgTol = 1e-007 ( 1e-007 ) -LABELS : N0Labels = 5 ( 5 ) N1Labels = 31 ( 31 ) N2Labels = 0 ( 0 ) TotalLabels = 36 ( 36 ) NameLabels = 36 ( 36 ) ColorLabels = 3 ( 3 ) LayerLabels = 0 ( 0 ) +LABELS : N0Labels = 5 ( 5 ) N1Labels = 32 ( 32 ) N2Labels = 0 ( 0 ) TotalLabels = 37 ( 37 ) NameLabels = 36 ( 36 ) ColorLabels = 4 ( 4 ) LayerLabels = 0 ( 0 ) PROPS : Centroid = 0 ( 0 ) Volume = 0 ( 0 ) Area = 0 ( 0 ) -NCOLORS : NColors = 3 ( 3 ) -COLORS : Colors = CYAN GREEN YELLOW ( CYAN GREEN YELLOW ) +NCOLORS : NColors = 4 ( 4 ) +COLORS : Colors = CYAN GREEN RED YELLOW ( CYAN GREEN RED YELLOW ) NLAYERS : NLayers = 0 ( 0 ) LAYERS : Layers = ( ) diff --git a/tests/de/step_2/K5 b/tests/de/step_2/K5 index a09559240c..62dfab9afa 100644 --- a/tests/de/step_2/K5 +++ b/tests/de/step_2/K5 @@ -8,10 +8,10 @@ CHECKSHAPE : Wires = 0 ( 0 ) Faces = 0 ( 0 ) Shells = 0 ( 0 ) So NBSHAPES : Solid = 3 ( 3 ) Shell = 3 ( 3 ) Face = 492 ( 492 ) STATSHAPE : Solid = 57 ( 57 ) Shell = 57 ( 57 ) Face = 1894 ( 1894 ) FreeWire = 0 ( 0 ) TOLERANCE : MaxTol = 1e-007 ( 1e-007 ) AvgTol = 1e-007 ( 1e-007 ) -LABELS : N0Labels = 5 ( 5 ) N1Labels = 31 ( 31 ) N2Labels = 0 ( 0 ) TotalLabels = 36 ( 36 ) NameLabels = 36 ( 36 ) ColorLabels = 3 ( 3 ) LayerLabels = 0 ( 0 ) +LABELS : N0Labels = 5 ( 5 ) N1Labels = 32 ( 32 ) N2Labels = 0 ( 0 ) TotalLabels = 37 ( 37 ) NameLabels = 36 ( 36 ) ColorLabels = 4 ( 4 ) LayerLabels = 0 ( 0 ) PROPS : Centroid = 0 ( 0 ) Volume = 0 ( 0 ) Area = 0 ( 0 ) -NCOLORS : NColors = 3 ( 3 ) -COLORS : Colors = CYAN GREEN YELLOW ( CYAN GREEN YELLOW ) +NCOLORS : NColors = 4 ( 4 ) +COLORS : Colors = CYAN GREEN RED YELLOW ( CYAN GREEN RED YELLOW ) NLAYERS : NLayers = 0 ( 0 ) LAYERS : Layers = ( ) From cc164fd7dcd29ac23209b92993400c49bc36c137 Mon Sep 17 00:00:00 2001 From: ifv Date: Fri, 14 Oct 2022 12:59:06 +0300 Subject: [PATCH 417/639] 0033170: Modeling Algorithms - Checking for canonical geometry: plane detection problems GeomLib_IsPlanarSurface.cxx - using poles for checking BSpline, Bezier curves and surface changed on checking by curve, surface points. BRepOffset_MakeOffset.cxx - set normal of plane surface according to normal of initial face surface tests/cr/bugs/bug33170 - new test case added --- src/BRepOffset/BRepOffset_MakeOffset.cxx | 47 ++++++++ src/GeomLib/GeomLib_IsPlanarSurface.cxx | 144 ++++++----------------- tests/cr/bugs/bug33170 | 30 +++++ tests/cr/grids.list | 1 + 4 files changed, 117 insertions(+), 105 deletions(-) create mode 100644 tests/cr/bugs/bug33170 diff --git a/src/BRepOffset/BRepOffset_MakeOffset.cxx b/src/BRepOffset/BRepOffset_MakeOffset.cxx index 7da4639d31..4579874778 100644 --- a/src/BRepOffset/BRepOffset_MakeOffset.cxx +++ b/src/BRepOffset/BRepOffset_MakeOffset.cxx @@ -4953,6 +4953,53 @@ Standard_Boolean BRepOffset_MakeOffset::IsPlanar() if (aPlanarityChecker.IsPlanar()) { gp_Pln aPln = aPlanarityChecker.Plan(); + Standard_Real u1, u2, v1, v2, um, vm; + aSurf->Bounds(u1, u2, v1, v2); + Standard_Boolean isInf1 = Precision::IsInfinite(u1), isInf2 = Precision::IsInfinite(u2); + if (!isInf1 && !isInf2) + { + um = (u1 + u2) / 2.; + } + else if(isInf1 && !isInf2) + { + um = u2 - 1.; + } + else if(!isInf1 && isInf2) + { + um = u1 + 1.; + } + else //isInf1 && isInf2 + { + um = 0.; + } + isInf1 = Precision::IsInfinite(v1), isInf2 = Precision::IsInfinite(v2); + if (!isInf1 && !isInf2) + { + vm = (v1 + v2) / 2.; + } + else if (isInf1 && !isInf2) + { + vm = v2 - 1.; + } + else if(!isInf1 && isInf2) + { + vm = v1 + 1.; + } + else //isInf1 && isInf2 + { + vm = 0.; + } + gp_Pnt aP; + gp_Vec aD1, aD2; + aBAS.D1(um, vm, aP, aD1, aD2); + gp_Vec aNorm = aD1.Crossed(aD2); + gp_Dir aPlnNorm = aPln.Position().Direction(); + if (aNorm.Dot(aPlnNorm) < 0.) + { + aPlnNorm.Reverse(); + gp_Ax1 anAx(aPln.Position().Location(), aPlnNorm); + aPln.SetAxis(anAx); + } Handle(Geom_Plane) aPlane = new Geom_Plane(aPln); TopoDS_Face aPlanarFace; aBB.MakeFace(aPlanarFace, aPlane, aTolForFace); diff --git a/src/GeomLib/GeomLib_IsPlanarSurface.cxx b/src/GeomLib/GeomLib_IsPlanarSurface.cxx index b0c04de57c..16ec51a963 100644 --- a/src/GeomLib/GeomLib_IsPlanarSurface.cxx +++ b/src/GeomLib/GeomLib_IsPlanarSurface.cxx @@ -30,18 +30,6 @@ #include #include -static Standard_Boolean Controle(const TColgp_Array1OfPnt& P, - const gp_Pln& Plan, - const Standard_Real Tol) -{ - Standard_Integer ii; - Standard_Boolean B=Standard_True; - - for (ii=1; ii<=P.Length() && B; ii++) - B = (Plan.Distance(P(ii)) < Tol); - - return B; -} static Standard_Boolean Controle(const TColgp_Array1OfPnt& Poles, const Standard_Real Tol, @@ -49,51 +37,36 @@ static Standard_Boolean Controle(const TColgp_Array1OfPnt& Poles, gp_Pln& Plan) { Standard_Boolean IsPlan = Standard_False; - Standard_Boolean Essai = Standard_True; Standard_Real gx,gy,gz; - Standard_Integer Nb = Poles.Length(); - gp_Pnt Bary; + gp_Pnt Bary; gp_Dir DX, DY; + Standard_Real aTolSingular = Precision::Confusion(); - - if (Nb > 10) { - // Test allege (pour une rejection rapide) - TColgp_Array1OfPnt Aux(1,5); - Aux(1) = Poles(1); - Aux(2) = Poles(Nb/3); - Aux(3) = Poles(Nb/2); - Aux(4) = Poles(Nb/2+Nb/3); - Aux(5) = Poles(Nb); - GeomLib::Inertia(Aux, Bary, DX, DY, gx, gy, gz); - Essai = (gzTol) { - gp_Pnt P; - gp_Vec DU, DV; - Standard_Real umin, umax, vmin, vmax; - S->Bounds(umin, umax, vmin, vmax); - S->D1( (umin+umax)/2, (vmin+vmax)/2, P, DU, DV); - // On prend DX le plus proche possible de DU - gp_Dir du(DU); - Standard_Real Angle1 = du.Angle(DX); - Standard_Real Angle2 = du.Angle(DY); - if (Angle1 > M_PI/2) Angle1 = M_PI-Angle1; - if (Angle2 > M_PI/2) Angle2 = M_PI-Angle2; - if (Angle2 < Angle1) { - du = DY; DY = DX; DX = du; - } - if (DX.Angle(DU) > M_PI/2) DX.Reverse(); - if (DY.Angle(DV) > M_PI/2) DY.Reverse(); - - gp_Ax3 axe(Bary, DX^DY, DX); - Plan.SetPosition(axe); - Plan.SetLocation(Bary); - IsPlan = Standard_True; + + GeomLib::Inertia(Poles, Bary, DX, DY, gx, gy, gz); + if (gz < Tol && gy > aTolSingular) { + gp_Pnt P; + gp_Vec DU, DV; + Standard_Real umin, umax, vmin, vmax; + S->Bounds(umin, umax, vmin, vmax); + S->D1((umin + umax) / 2, (vmin + vmax) / 2, P, DU, DV); + // On prend DX le plus proche possible de DU + gp_Dir du(DU); + Standard_Real Angle1 = du.Angle(DX); + Standard_Real Angle2 = du.Angle(DY); + if (Angle1 > M_PI / 2) Angle1 = M_PI - Angle1; + if (Angle2 > M_PI / 2) Angle2 = M_PI - Angle2; + if (Angle2 < Angle1) { + du = DY; DY = DX; DX = du; } - } + if (DX.Angle(DU) > M_PI / 2) DX.Reverse(); + if (DY.Angle(DV) > M_PI / 2) DY.Reverse(); + + gp_Ax3 axe(Bary, DX^DY, DX); + Plan.SetPosition(axe); + Plan.SetLocation(Bary); + IsPlan = Standard_True; + } return IsPlan; } @@ -106,8 +79,6 @@ static Standard_Boolean Controle(const Handle(Geom_Curve)& C, GeomAbs_CurveType Type; GeomAdaptor_Curve AC(C); Type = AC.GetType(); - Handle(TColgp_HArray1OfPnt) TabP; - TabP.Nullify(); switch (Type) { case GeomAbs_Line : @@ -131,40 +102,27 @@ static Standard_Boolean Controle(const Handle(Geom_Curve)& C, case GeomAbs_BezierCurve: { Nb = AC.NbPoles(); - Handle (Geom_BezierCurve) BZ = AC.Bezier(); - TabP = new (TColgp_HArray1OfPnt) (1, AC.NbPoles()); - for (ii=1; ii<=Nb; ii++) - TabP->SetValue(ii, BZ->Pole(ii)); break; } case GeomAbs_BSplineCurve: { Nb = AC.NbPoles(); - Handle (Geom_BSplineCurve) BZ = AC.BSpline(); - TabP = new (TColgp_HArray1OfPnt) (1, AC.NbPoles()); - for (ii=1; ii<=Nb; ii++) - TabP->SetValue(ii, BZ->Pole(ii)); break; } - default : - { - Nb = 8 + 3*AC.NbIntervals(GeomAbs_CN); - } - } - - if (TabP.IsNull()) { - Standard_Real u, du, f, l, d; - f = AC.FirstParameter(); - l = AC.LastParameter(); - du = (l-f)/(Nb-1); - for (ii=1; ii<=Nb && B ; ii++) { - u = (ii-1)*du + f; - d = Plan.Distance(C->Value(u)); - B = (d < Tol); + default : + { + Nb = 8 + 3*AC.NbIntervals(GeomAbs_CN); } } - else { - B = Controle(TabP->Array1(), Plan, Tol); + + Standard_Real u, du, f, l, d; + f = AC.FirstParameter(); + l = AC.LastParameter(); + du = (l - f) / (Nb - 1); + for (ii = 1; ii <= Nb && B; ii++) { + u = (ii - 1)*du + f; + d = Plan.Distance(C->Value(u)); + B = d < Tol; } return B; @@ -196,30 +154,6 @@ GeomLib_IsPlanarSurface::GeomLib_IsPlanarSurface(const Handle(Geom_Surface)& S, IsPlan = Standard_False; break; } - case GeomAbs_BezierSurface : - case GeomAbs_BSplineSurface : - { - Standard_Integer ii, jj, kk, - NbU = AS.NbUPoles(), NbV = AS.NbVPoles(); - TColgp_Array1OfPnt Poles(1, NbU*NbV); - if (Type == GeomAbs_BezierSurface) { - Handle(Geom_BezierSurface) BZ; - BZ = AS.Bezier(); - for(ii=1, kk=1; ii<=NbU; ii++) - for(jj=1; jj<=NbV; jj++,kk++) - Poles(kk) = BZ->Pole(ii,jj); - } - else { - Handle(Geom_BSplineSurface) BS; - BS = AS.BSpline(); - for(ii=1, kk=1; ii<=NbU; ii++) - for(jj=1; jj<=NbV; jj++,kk++) - Poles(kk) = BS->Pole(ii,jj); - } - - IsPlan = Controle(Poles, Tol, S, myPlan); - break; - } case GeomAbs_SurfaceOfRevolution : { @@ -299,7 +233,7 @@ GeomLib_IsPlanarSurface::GeomLib_IsPlanarSurface(const Handle(Geom_Surface)& S, break; } - default : + default : { Standard_Integer NbU,NbV, ii, jj, kk; NbU = 8 + 3*AS.NbUIntervals(GeomAbs_CN); diff --git a/tests/cr/bugs/bug33170 b/tests/cr/bugs/bug33170 new file mode 100644 index 0000000000..9313e54b76 --- /dev/null +++ b/tests/cr/bugs/bug33170 @@ -0,0 +1,30 @@ +puts "============" +puts "0033170: Modeling Algorithms - Checking for canonical geometry: plane detection problems" +puts "============" +puts "" + +set ExpectGap 0.0051495320504590563 +brestore [locate_data_file bug33170.brep] f +set log1 [getanasurf asurf1 f pln 0.006] +regexp {Gap = +([-0-9.+eE]+)} $log1 full gap1 +if {[isdraw asurf1]} { + set log [dump asurf1] + if { [regexp {Plane} $log ] != 1 } { + puts "Error: surface is not a plane" + } +} else { + puts "Error: required surface is not got" +} +checkreal FoundGap1 $gap1 $ExpectGap 1.0e-9 0.0 +# +set log2 [getanasurf asurf2 f pln 1.] +regexp {Gap = +([-0-9.+eE]+)} $log1 full gap2 +if {[isdraw asurf2]} { + set log [dump asurf2] + if { [regexp {Plane} $log ] != 1 } { + puts "Error: surface is not a plane" + } +} else { + puts "Error: required surface is not got" +} +checkreal FoundGap2 $gap2 $ExpectGap 1.0e-9 0.0 diff --git a/tests/cr/grids.list b/tests/cr/grids.list index 8eb5c913e5..809bfa6f44 100644 --- a/tests/cr/grids.list +++ b/tests/cr/grids.list @@ -1,2 +1,3 @@ 001 base 002 approx +003 bugs From aba5c241c606ce41dec2764e5ead9c078cc6fe31 Mon Sep 17 00:00:00 2001 From: knosulko Date: Thu, 20 Oct 2022 13:15:07 +0300 Subject: [PATCH 418/639] 0033144: Modeling Algorithms - Wrong result of Shape Proximity Added step of refinement the coarser of the two shapes meshes to produce two meshes with approximately the same density. Added tests lowalgos/proximity. Fixed accounting of parameters to adjust number of initial sample points --- .../BRepExtrema_ProximityDistTool.cxx | 131 +++-- .../BRepExtrema_ProximityDistTool.hxx | 30 ++ .../BRepExtrema_ProximityValueTool.cxx | 458 +++++++++++++++++- .../BRepExtrema_ProximityValueTool.hxx | 122 ++++- .../BRepExtrema_ShapeProximity.cxx | 1 + .../BRepExtrema_ShapeProximity.hxx | 5 +- tests/lowalgos/proximity/D4 | 29 ++ tests/lowalgos/proximity/{B6 => E3} | 19 +- 8 files changed, 725 insertions(+), 70 deletions(-) create mode 100644 tests/lowalgos/proximity/D4 rename tests/lowalgos/proximity/{B6 => E3} (55%) diff --git a/src/BRepExtrema/BRepExtrema_ProximityDistTool.cxx b/src/BRepExtrema/BRepExtrema_ProximityDistTool.cxx index cd51510d76..5607617f18 100644 --- a/src/BRepExtrema/BRepExtrema_ProximityDistTool.cxx +++ b/src/BRepExtrema/BRepExtrema_ProximityDistTool.cxx @@ -43,6 +43,8 @@ BRepExtrema_ProximityDistTool::BRepExtrema_ProximityDistTool() //======================================================================= BRepExtrema_ProximityDistTool::BRepExtrema_ProximityDistTool (const Handle(BRepExtrema_TriangleSet)& theSet1, const Standard_Integer theNbSamples1, + const BVH_Array3d& theAddVertices1, + const NCollection_Vector& theAddStatus1, const Handle(BRepExtrema_TriangleSet)& theSet2, const BRepExtrema_ShapeList& theShapeList1, const BRepExtrema_ShapeList& theShapeList2) @@ -55,6 +57,7 @@ BRepExtrema_ProximityDistTool::BRepExtrema_ProximityDistTool (const Handle(BRepE { LoadTriangleSets (theSet1, theSet2); LoadShapeLists (theShapeList1, theShapeList2); + LoadAdditionalPointsFirstSet (theAddVertices1, theAddStatus1); } //======================================================================= @@ -69,7 +72,7 @@ void BRepExtrema_ProximityDistTool::LoadTriangleSets (const Handle(BRepExtrema_T } //======================================================================= -//function : LoadTriangleSets +//function : LoadShapeLists //purpose : Loads the given list of subshapes into the proximity tool //======================================================================= void BRepExtrema_ProximityDistTool::LoadShapeLists (const BRepExtrema_ShapeList& theShapeList1, @@ -78,23 +81,33 @@ void BRepExtrema_ProximityDistTool::LoadShapeLists (const BRepExtrema_ShapeList& myShapeList1 = theShapeList1; myShapeList2 = theShapeList2; } + //======================================================================= -//function : Perform -//purpose : Performs searching of the proximity distance +//function : LoadAdditionalPointsFirstSet +//purpose : Loads given additional vertices and their statuses //======================================================================= -void BRepExtrema_ProximityDistTool::Perform() +void BRepExtrema_ProximityDistTool::LoadAdditionalPointsFirstSet (const BVH_Array3d& theAddVertices1, + const NCollection_Vector& theAddStatus1) { - SetBVHSet (mySet2.get()); + myAddVertices1 = theAddVertices1; + myAddStatus1 = theAddStatus1; +} - const BVH_Array3d& aVertices1 = mySet1->GetVertices(); - Standard_Integer aVtxSize = (Standard_Integer)aVertices1.size(); +//======================================================================= +//function : goThroughtSet1 +//purpose : Goes throught vertices from the 1st set +//======================================================================= +void BRepExtrema_ProximityDistTool::goThroughtSet1 (const BVH_Array3d& theVertices1, + const Standard_Boolean theIsAdditionalSet) +{ + Standard_Integer aVtxSize = (Standard_Integer)theVertices1.size(); Standard_Integer aVtxStep = Max (myNbSamples1 <= 0 ? 1 : aVtxSize / myNbSamples1, 1); for (Standard_Integer aVtxIdx = 0; aVtxIdx < aVtxSize; aVtxIdx += aVtxStep) { myDistance = std::numeric_limits::max(); myMinDistance = std::numeric_limits::max(); myIsDone = Standard_False; - SetObject (aVertices1[aVtxIdx]); + SetObject (theVertices1[aVtxIdx]); ComputeDistance(); @@ -102,20 +115,31 @@ void BRepExtrema_ProximityDistTool::Perform() if (IsDone() && myDistance > myProxDist) { - myPnt1 = aVertices1[aVtxIdx]; + myPnt1 = theVertices1[aVtxIdx]; myPnt2 = myExtremaPoint; myProxDist = myDistance; myProxVtxIdx1 = aVtxIdx; + myIsProxVtx1FromAddSet = theIsAdditionalSet; myProxPrjState = myExtPrjState; } } +} - myIsDone = myProxDist > -1.; +//======================================================================= +//function : Perform +//purpose : Performs searching of the proximity distance +//======================================================================= +void BRepExtrema_ProximityDistTool::Perform() +{ + SetBVHSet (mySet2.get()); + goThroughtSet1 (mySet1->GetVertices(), Standard_False); + goThroughtSet1 (myAddVertices1, Standard_True); - if (myIsDone) - { - DefineStatusProxPnt(); - } + myIsDone = myProxDist > -1.; + if (myIsDone) + { + DefineStatusProxPnt(); + } } static Standard_Real pointBoxSquareMaxDistance (const BVH_Vec3d& thePoint, @@ -247,7 +271,12 @@ Standard_Real BRepExtrema_ProximityDistTool::ComputeDistance() return myDistance; } -static Standard_Boolean isNodeOnBorder (const Standard_Integer theNodeIdx, const Handle (Poly_Triangulation)& theTr) +//======================================================================= +//function : IsNodeOnBorder +//purpose : Returns true if the node is on the boarder +//======================================================================= +Standard_Boolean BRepExtrema_ProximityDistTool::IsNodeOnBorder (const Standard_Integer theNodeIdx, + const Handle(Poly_Triangulation)& theTr) { Poly_Connect aPolyConnect (theTr); @@ -279,12 +308,49 @@ static Standard_Boolean isNodeOnBorder (const Standard_Integer theNodeIdx, const return Standard_False; } +//======================================================================= +//function : IsEdgeOnBorder +//purpose : Returns true if the edge is on the boarder +//======================================================================= +Standard_Boolean BRepExtrema_ProximityDistTool::IsEdgeOnBorder (const Standard_Integer theTrgIdx, + const Standard_Integer theFirstEdgeNodeIdx, + const Standard_Integer theSecondEdgeNodeIdx, + const Handle(Poly_Triangulation)& theTr) +{ + Poly_Connect aPolyConnect (theTr); + + Standard_Integer aAdjTrg[3]; + aPolyConnect.Triangles (theTrgIdx, aAdjTrg[0], aAdjTrg[1], aAdjTrg[2]); //indices of adjacent triangles + + for (Standard_Integer j = 0; j < 3; j++) + { + Standard_Integer k = (j + 1) % 3; + if (aAdjTrg[j] == 0) //free segment of triangle + { + //are ends of free segment and it is a part of border + if (j == theFirstEdgeNodeIdx && + k == theSecondEdgeNodeIdx) + { + return Standard_True; + } + } + } + + return Standard_False; +} + //======================================================================= //function : defineStatusProxPnt1 //purpose : Defines the status of proximity point from 1st BVH //======================================================================= void BRepExtrema_ProximityDistTool::defineStatusProxPnt1() { + if (myIsProxVtx1FromAddSet) + { + myPntStatus1 = myAddStatus1[myProxVtxIdx1]; + return; + } + Standard_Integer aFaceID1 = mySet1->GetShapeIDOfVtx (myProxVtxIdx1); if (myShapeList1 (aFaceID1).ShapeType() == TopAbs_EDGE) @@ -314,9 +380,9 @@ void BRepExtrema_ProximityDistTool::defineStatusProxPnt1() TopLoc_Location aLocation; const TopoDS_Face& aF = TopoDS::Face (myShapeList1 (aFaceID1)); - Handle (Poly_Triangulation) aTr = BRep_Tool::Triangulation (aF, aLocation); + Handle(Poly_Triangulation) aTr = BRep_Tool::Triangulation (aF, aLocation); - if (isNodeOnBorder (aNodeIdx, aTr)) + if (IsNodeOnBorder (aNodeIdx, aTr)) { myPntStatus1 = ProxPnt_Status_BORDER; } @@ -398,7 +464,7 @@ void BRepExtrema_ProximityDistTool::defineStatusProxPnt2() { TopLoc_Location aLocation; const TopoDS_Face& aF = TopoDS::Face (myShapeList2 (aFaceID2)); - Handle (Poly_Triangulation) aTr = BRep_Tool::Triangulation (aF, aLocation); + Handle(Poly_Triangulation) aTr = BRep_Tool::Triangulation (aF, aLocation); NCollection_Array1 aVtxIndicesOfTrg; mySet2->GetVtxIndices (aTrgIdx, aVtxIndicesOfTrg); @@ -408,7 +474,7 @@ void BRepExtrema_ProximityDistTool::defineStatusProxPnt2() Standard_Integer aNodeNum = myProxPrjState.GetNumberOfFirstNode(); Standard_Integer aNodeIdx = mySet2->GetVtxIdxInShape (aVtxIndicesOfTrg[aNodeNum]) + 1; - if (isNodeOnBorder (aNodeIdx, aTr)) + if (IsNodeOnBorder (aNodeIdx, aTr)) { myPntStatus2 = ProxPnt_Status_BORDER; } @@ -419,27 +485,18 @@ void BRepExtrema_ProximityDistTool::defineStatusProxPnt2() } else if (myProxPrjState.GetPrjState() == BVH_PrjState::BVH_PrjStateInTriangle_EDGE) { - myPntStatus2 = ProxPnt_Status_MIDDLE; - - Poly_Connect aPolyConnect (aTr); Standard_Integer aTrgIdxInShape = mySet2->GetTrgIdxInShape (aTrgIdx) + 1; - Standard_Integer aAdjTrg[3]; - aPolyConnect.Triangles (aTrgIdxInShape, aAdjTrg[0], aAdjTrg[1], aAdjTrg[2]); //indices of adjacent triangles - - for (Standard_Integer j = 0; j < 3; j++) + if (IsEdgeOnBorder (aTrgIdxInShape, + myProxPrjState.GetNumberOfFirstNode(), + myProxPrjState.GetNumberOfLastNode(), + aTr)) + { + myPntStatus2 = ProxPnt_Status_BORDER; + } + else { - Standard_Integer k = (j + 1) % 3; - if (aAdjTrg[j] == 0) //free segment of triangle - { - //aVtxIndicesOfTrg[j] and aVtxIndicesOfTrg[k] are ends of free segment and it is a part of border - if (j == myProxPrjState.GetNumberOfFirstNode() && - k == myProxPrjState.GetNumberOfLastNode()) - { - myPntStatus2 = ProxPnt_Status_BORDER; - break; - } - } + myPntStatus2 = ProxPnt_Status_MIDDLE; } } //else if (myProxPrjState.GetPrjState() == BVH_PrjState::BVH_PrjStateInTriangle_EDGE) } diff --git a/src/BRepExtrema/BRepExtrema_ProximityDistTool.hxx b/src/BRepExtrema/BRepExtrema_ProximityDistTool.hxx index 3739fff1ad..da6d5de076 100644 --- a/src/BRepExtrema/BRepExtrema_ProximityDistTool.hxx +++ b/src/BRepExtrema/BRepExtrema_ProximityDistTool.hxx @@ -21,6 +21,7 @@ #include #include #include +#include //! Tool class for computation the proximity distance from first //! primitive set to second one that is the maximal from minimum @@ -93,6 +94,8 @@ public: //! Creates new tool for the given element sets. Standard_EXPORT BRepExtrema_ProximityDistTool (const Handle(BRepExtrema_TriangleSet)& theSet1, const Standard_Integer theNbSamples1, + const BVH_Array3d& theAddVertices1, + const NCollection_Vector& theAddStatus1, const Handle(BRepExtrema_TriangleSet)& theSet2, const BRepExtrema_ShapeList& theShapeList1, const BRepExtrema_ShapeList& theShapeList2); @@ -107,6 +110,10 @@ public: Standard_EXPORT void LoadShapeLists (const BRepExtrema_ShapeList& theShapeList1, const BRepExtrema_ShapeList& theShapeList2); + //! Loads given additional vertices and their statuses. + void LoadAdditionalPointsFirstSet (const BVH_Array3d& theAddVertices1, + const NCollection_Vector& theAddStatus1); + //! Performs searching of the proximity distance. Standard_EXPORT void Perform(); @@ -121,6 +128,20 @@ public: //! @name Reject/Accept implementations Standard_EXPORT virtual Standard_Boolean Accept (const Standard_Integer theSgmIdx, const Standard_Real&) Standard_OVERRIDE; +public: + + //! Returns true if the node is on the boarder. + Standard_EXPORT static Standard_Boolean IsNodeOnBorder (const Standard_Integer theNodeIdx, + const Handle (Poly_Triangulation)& theTr); + + //! Returns true if the edge is on the boarder. + Standard_EXPORT static Standard_Boolean IsEdgeOnBorder (const Standard_Integer theTrgIdx, + const Standard_Integer theFirstEdgeNodeIdx, + const Standard_Integer theSecondEdgeNodeIdx, + const Handle (Poly_Triangulation)& theTr); + +public: + //! Returns points on triangles sets, which provide the proximity distance. void ProximityPoints (BVH_Vec3d& thePoint1, BVH_Vec3d& thePoint2) const { @@ -148,6 +169,10 @@ protected: private: + //! Goes throught vertices from the 1st set. + void goThroughtSet1 (const BVH_Array3d& aVertices1, + const Standard_Boolean theIsAdditionalSet); + //! Defines the status of proximity point from 1st BVH. void defineStatusProxPnt1(); @@ -183,6 +208,11 @@ private: Standard_Integer myNbSamples1; //!< Number of samples points on the first shape + //! Is vertex corresponding to proximity point of 1st shape from additional set + Standard_Integer myIsProxVtx1FromAddSet; + BVH_Array3d myAddVertices1; //!< Additional vertices on the 1st shape + NCollection_Vector myAddStatus1; //!< Status of additional vertices on the 1st shape + //! Vertex index from 1st BVH corresponding to proximity point of 1st shape Standard_Integer myProxVtxIdx1; diff --git a/src/BRepExtrema/BRepExtrema_ProximityValueTool.cxx b/src/BRepExtrema/BRepExtrema_ProximityValueTool.cxx index a816be8b8f..66a2bd1d4f 100644 --- a/src/BRepExtrema/BRepExtrema_ProximityValueTool.cxx +++ b/src/BRepExtrema/BRepExtrema_ProximityValueTool.cxx @@ -1,4 +1,4 @@ -// Created on: 2022-08-08 +// Created on: 2022-08-08 // Created by: Kseniya NOSULKO // Copyright (c) 2022 OPEN CASCADE SAS // @@ -14,17 +14,32 @@ // commercial license or contractual agreement. #include +#include + +#include +#include +#include +#include +#include +#include +#include +#include //======================================================================= //function : BRepExtrema_ProximityValueTool //purpose : Creates new unitialized proximity tool //======================================================================= BRepExtrema_ProximityValueTool::BRepExtrema_ProximityValueTool() -: myDistance (std::numeric_limits::max()), +: myIsRefinementRequired1 (Standard_False), + myIsRefinementRequired2 (Standard_False), + myDistance (std::numeric_limits::max()), myIsDone (Standard_False), myNbSamples1(0), myNbSamples2(0) -{} +{ + // Should be initialized later + myIsInitS1 = myIsInitS2 = Standard_False; +} //======================================================================= //function : BRepExtrema_ProximityValueTool @@ -34,13 +49,15 @@ BRepExtrema_ProximityValueTool::BRepExtrema_ProximityValueTool (const Handle(BRe const Handle(BRepExtrema_TriangleSet)& theSet2, const BRepExtrema_ShapeList& theShapeList1, const BRepExtrema_ShapeList& theShapeList2) -: myDistance (std::numeric_limits::max()), +: myIsRefinementRequired1 (Standard_False), + myIsRefinementRequired2 (Standard_False), + myDistance (std::numeric_limits::max()), myIsDone (Standard_False), - myNbSamples1(0), - myNbSamples2(0) + myNbSamples1 (0), + myNbSamples2 (0) { - LoadTriangleSets (theSet1, theSet2); LoadShapeLists (theShapeList1, theShapeList2); + LoadTriangleSets (theSet1, theSet2); } //======================================================================= @@ -53,7 +70,94 @@ void BRepExtrema_ProximityValueTool::LoadTriangleSets (const Handle(BRepExtrema_ mySet1 = theSet1; mySet2 = theSet2; - myIsDone = Standard_False; + MarkDirty(); +} + +//======================================================================= +//function : calcEdgeRefinementStep +//purpose : Calculates the edge refinement step +//======================================================================= +static Standard_Real calcEdgeRefinementStep (const TopoDS_Edge& theEdge, + const Standard_Integer theNbNodes) +{ + if (theNbNodes < 2) + return 0; + + BRepAdaptor_Curve aBAC (theEdge); + Standard_Real aLen = GCPnts_AbscissaPoint::Length (aBAC); + return aLen / (Standard_Real)(theNbNodes - 1); +} + +//======================================================================= +//function : calcFaceRefinementStep +//purpose : Calculates the face refinement step as an approximate square +// (Shape area / number triangles) * 2 +//======================================================================= +static Standard_Real calcFaceRefinementStep (const TopoDS_Face& theFace, + const Standard_Integer theNbTrg) +{ + if (theNbTrg < 1) + return 0; + + GProp_GProps props; + BRepGProp::SurfaceProperties (theFace, props); + Standard_Real aArea = props.Mass(); + return 2 * (aArea / (Standard_Real)theNbTrg); +} + +//======================================================================= +//function : getInfoForRefinement +//purpose : Gets shape data for further refinement +//======================================================================= +Standard_Boolean BRepExtrema_ProximityValueTool::getInfoForRefinement (const TopoDS_Shape& theShape, + TopAbs_ShapeEnum& theShapeType, + Standard_Integer& theNbNodes, + Standard_Real& theStep) +{ + if (theShape.ShapeType() == TopAbs_FACE) + { + theShapeType = TopAbs_FACE; + TopoDS_Face aF = TopoDS::Face (theShape); + + TopLoc_Location aLocation; + Handle(Poly_Triangulation) aTriangulation = BRep_Tool::Triangulation (aF, aLocation); + + if (aTriangulation.IsNull()) + { + return Standard_False; + } + + theNbNodes = aTriangulation->NbNodes(); + Standard_Integer aNbTrg = aTriangulation->NbTriangles(); + theStep = calcFaceRefinementStep (aF, aNbTrg); + } + else if (theShape.ShapeType() == TopAbs_EDGE) + { + theShapeType = TopAbs_EDGE; + TopoDS_Edge aE = TopoDS::Edge (theShape); + + TopLoc_Location aLocation; + Handle(Poly_Polygon3D) aPolygon = BRep_Tool::Polygon3D (aE, aLocation); + + if (aPolygon.IsNull()) + { + return Standard_False; + } + + theNbNodes = aPolygon->NbNodes(); + theStep = calcEdgeRefinementStep (aE, theNbNodes); + } + else + { + return Standard_False; + } + + if (theStep < Precision::Confusion()) + { + return Standard_False; + } + + return Standard_True; } //======================================================================= @@ -66,7 +170,13 @@ void BRepExtrema_ProximityValueTool::LoadShapeLists (const BRepExtrema_ShapeList myShapeList1 = theShapeList1; myShapeList2 = theShapeList2; - myIsDone = Standard_False; + myShape1 = theShapeList1 (0); + myIsInitS1 = getInfoForRefinement (myShape1, myShapeType1, myNbNodes1, myStep1); + + myShape2 = theShapeList2 (0); + myIsInitS2 = getInfoForRefinement (myShape2, myShapeType2, myNbNodes2, myStep2); + + MarkDirty(); } //======================================================================= @@ -79,7 +189,7 @@ void BRepExtrema_ProximityValueTool::SetNbSamplePoints(const Standard_Integer th myNbSamples1 = theSamples1; myNbSamples2 = theSamples2; - myIsDone = Standard_False; + MarkDirty(); } //======================================================================= @@ -88,6 +198,8 @@ void BRepExtrema_ProximityValueTool::SetNbSamplePoints(const Standard_Integer th //======================================================================= Standard_Real BRepExtrema_ProximityValueTool::computeProximityDist (const Handle(BRepExtrema_TriangleSet)& theSet1, const Standard_Integer theNbSamples1, + const BVH_Array3d& theAddVertices1, + const NCollection_Vector& theAddStatus1, const Handle(BRepExtrema_TriangleSet)& theSet2, const BRepExtrema_ShapeList& theShapeList1, const BRepExtrema_ShapeList& theShapeList2, @@ -96,7 +208,8 @@ Standard_Real BRepExtrema_ProximityValueTool::computeProximityDist (const Handle ProxPnt_Status& thePointStatus1, ProxPnt_Status& thePointStatus2) const { - BRepExtrema_ProximityDistTool aProxDistTool (theSet1, theNbSamples1, theSet2, theShapeList1, theShapeList2); + BRepExtrema_ProximityDistTool aProxDistTool (theSet1, theNbSamples1, theAddVertices1, theAddStatus1, + theSet2, theShapeList1, theShapeList2); aProxDistTool.Perform(); if (!aProxDistTool.IsDone()) @@ -108,21 +221,311 @@ Standard_Real BRepExtrema_ProximityValueTool::computeProximityDist (const Handle return aProxDistTool.ProximityDistance(); } +//======================================================================= +//function : getEdgeAdditionalVertices +//purpose : Gets additional vertices and their statuses on the edge with the input step +//======================================================================= +Standard_Boolean BRepExtrema_ProximityValueTool::getEdgeAdditionalVertices ( + const TopoDS_Edge& theEdge, + const Standard_Real theStep, + BVH_Array3d& theAddVertices, + NCollection_Vector& theAddStatuses) +{ + BRepAdaptor_Curve aBAC (theEdge); + + if (!aBAC.Is3DCurve() || theStep < Precision::Confusion()) + { + return Standard_False; + } + + Standard_Real aLen = GCPnts_AbscissaPoint::Length (aBAC); + Standard_Integer aNbSamplePoints = (Standard_Integer) (aLen / theStep) + 1; + + GCPnts_QuasiUniformAbscissa aGCPnts (aBAC, Max (3, aNbSamplePoints)); + + if (!aGCPnts.IsDone()) + return Standard_False; + + Standard_Integer aNbNodes = aGCPnts.NbPoints(); + for (Standard_Integer aVertIdx = 2; aVertIdx < aNbNodes; ++aVertIdx) //don't add extreme points + { + Standard_Real aPar = aGCPnts.Parameter (aVertIdx); + gp_Pnt aP = aBAC.Value (aPar); + + theAddVertices.push_back (BVH_Vec3d (aP.X(), aP.Y(), aP.Z())); + theAddStatuses.Append (ProxPnt_Status::ProxPnt_Status_MIDDLE); + } + + return Standard_True; +} + +//======================================================================= +//function : doRecurTrgSplit +//purpose : Splits the triangle into two ones recursively, halving the longest side +// untill the area of ​​the current triangle > input step +//! @param theTrg points of the triangle to be splitted +//! @param theEdgesStatus status of triangle edges - on the border or middle of the face +//! @param theTol telerance used in search of coincidence points +//! @param theStep minimum area of ​​the resulting triangle +//! @param theAddVertices vertices obtained halving sides +//! @param theAddStatuses status of obtained vertices - on the border or middle of the face, +//! from triangulation of which the input triangle is +//======================================================================= +void BRepExtrema_ProximityValueTool::doRecurTrgSplit (const gp_Pnt (&theTrg)[3], + const ProxPnt_Status (&theEdgesStatus)[3], + const Standard_Real theTol, + const Standard_Real theStep, + BVH_Array3d& theAddVertices, + NCollection_Vector& theAddStatuses) +{ + gp_XYZ aTrgSide1 = theTrg[1].Coord() - theTrg[0].Coord(); + gp_XYZ aTrgSide2 = theTrg[2].Coord() - theTrg[0].Coord(); + Standard_Real aTrgArea = 0.5 * aTrgSide1.CrossMagnitude (aTrgSide2); + + if (aTrgArea - theStep < Precision::SquareConfusion()) + return; + + Standard_Real aD[3] { theTrg[0].Distance (theTrg[1]), + theTrg[1].Distance (theTrg[2]), + theTrg[2].Distance (theTrg[0]) }; + Standard_Integer aBisectedEdgeIdx = aD[0] > aD[1] ? (aD[0] > aD[2] ? 0 : 2) : (aD[1] > aD[2] ? 1 : 2); + gp_Pnt aCenterOfMaxSide (theTrg[aBisectedEdgeIdx].Coord()); + aCenterOfMaxSide.BaryCenter (0.5, theTrg[(aBisectedEdgeIdx + 1) % 3], 0.5); + + Bnd_Box aBox; + aBox.Add (aCenterOfMaxSide); + aBox.Enlarge (theTol); + myInspector.SetCurrent (aCenterOfMaxSide.Coord()); + myCells.Inspect (aBox.CornerMin().XYZ(), aBox.CornerMax().XYZ(), myInspector); + + if (myInspector.IsNeedAdd()) //is point aCenterOfMaxSide unique + { + BVH_Vec3d aBisectingPnt (aCenterOfMaxSide.X(), aCenterOfMaxSide.Y(), aCenterOfMaxSide.Z()); + theAddVertices.push_back (aBisectingPnt); + theAddStatuses.Append (theEdgesStatus[aBisectedEdgeIdx]); + myInspector.Add (aCenterOfMaxSide.Coord()); + myCells.Add (static_cast(theAddVertices.size()), + aBox.CornerMin().XYZ(), aBox.CornerMax().XYZ()); + } + + gp_Pnt aTrg1[3] = { theTrg[0], theTrg[1], theTrg[2] }; + gp_Pnt aTrg2[3] = { theTrg[0], theTrg[1], theTrg[2] }; + ProxPnt_Status aEdgesStatus1[3] = { theEdgesStatus[0], theEdgesStatus[1], theEdgesStatus[2] }; + ProxPnt_Status aEdgesStatus2[3] = { theEdgesStatus[0], theEdgesStatus[1], theEdgesStatus[2] }; + switch (aBisectedEdgeIdx) + { + case 0: + aTrg1[0] = aTrg2[1] = aCenterOfMaxSide; + aEdgesStatus1[2] = aEdgesStatus2[1] = ProxPnt_Status::ProxPnt_Status_MIDDLE; + break; + case 1: + aTrg1[1] = aTrg2[2] = aCenterOfMaxSide; + aEdgesStatus1[0] = aEdgesStatus2[2] = ProxPnt_Status::ProxPnt_Status_MIDDLE; + break; + case 2: + aTrg1[2] = aTrg2[0] = aCenterOfMaxSide; + aEdgesStatus1[1] = aEdgesStatus2[0] = ProxPnt_Status::ProxPnt_Status_MIDDLE; + break; + } + + doRecurTrgSplit (aTrg1, aEdgesStatus1, theTol, theStep, theAddVertices, theAddStatuses); + doRecurTrgSplit (aTrg2, aEdgesStatus2, theTol, theStep, theAddVertices, theAddStatuses); +} + +static Standard_Real getModelRange (const TopLoc_Location& theLocation, + const Handle(Poly_Triangulation)& theTr) +{ + Bnd_Box aBox; + theTr->MinMax (aBox, theLocation.Transformation()); + Standard_Real aXm = 0.0, aYm = 0.0, aZm = 0.0, aXM = 0.0, aYM = 0.0, aZM = 0.0; + aBox.Get (aXm, aYm, aZm, aXM, aYM, aZM); + Standard_Real aRange = aXM - aXm; + aRange = Max (aRange, aYM - aYm); + aRange = Max (aRange, aZM - aZm); + + return aRange; +} + +static void getNodesOfTrg (const Standard_Integer theTriIdx, + const TopLoc_Location& theLocation, + const Handle (Poly_Triangulation)& theTr, + gp_Pnt (&theTrg)[3]) +{ + Standard_Integer aVtxIdx1; + Standard_Integer aVtxIdx2; + Standard_Integer aVtxIdx3; + + theTr->Triangle (theTriIdx).Get (aVtxIdx1, aVtxIdx2, aVtxIdx3); + + gp_Pnt aVtx1 = theTr->Node (aVtxIdx1); + aVtx1.Transform (theLocation); + theTrg[0] = aVtx1; + + gp_Pnt aVtx2 = theTr->Node (aVtxIdx2); + aVtx2.Transform (theLocation); + theTrg[1] = aVtx2; + + gp_Pnt aVtx3 = theTr->Node (aVtxIdx3); + aVtx3.Transform (theLocation); + theTrg[2] = aVtx3; +} + +// Gets status of triangle edges - on the border or middle of the face +static void getEdgesStatus(const Standard_Integer theTriIdx, + const Handle(Poly_Triangulation)& theTr, + ProxPnt_Status (&theEdgesStatus1)[3]) +{ + for (Standard_Integer j = 0; j < 3; j++) + { + Standard_Integer k = (j + 1) % 3; + + if (BRepExtrema_ProximityDistTool::IsEdgeOnBorder (theTriIdx, j, k, theTr)) + { + theEdgesStatus1[j] = ProxPnt_Status::ProxPnt_Status_BORDER; + } + else + { + theEdgesStatus1[j] = ProxPnt_Status::ProxPnt_Status_MIDDLE; + } + } +} + +//======================================================================= +//function : getFaceAdditionalVertices +//purpose : Gets additional vertices and their statuses on the face with the input step (triangle square) +//======================================================================= +Standard_Boolean BRepExtrema_ProximityValueTool::getFaceAdditionalVertices ( + const TopoDS_Face& theFace, + const Standard_Real theStep, + BVH_Array3d& theAddVertices, + NCollection_Vector& theAddStatuses) +{ + Standard_Real aTol = Precision::Confusion(); + + TopLoc_Location aLocation; + Handle(Poly_Triangulation) aTr = BRep_Tool::Triangulation (theFace, aLocation); + + if (aTr.IsNull()) + { + return Standard_False; + } + + myCells.Reset (Max (aTol, getModelRange (aLocation, aTr) / IntegerLast())); + + for (Standard_Integer aTriIdx = 1; aTriIdx <= aTr->NbTriangles(); ++aTriIdx) + { + gp_Pnt aTrg[3]; + ProxPnt_Status aEdgesStatus[3]; + getNodesOfTrg (aTriIdx, aLocation, aTr, aTrg); + getEdgesStatus (aTriIdx, aTr, aEdgesStatus); + doRecurTrgSplit (aTrg, aEdgesStatus, aTol, theStep, theAddVertices, theAddStatuses); + } + + return Standard_True; +} + +//======================================================================= +//function : getShapesVertices +//purpose : Gets additional vertices on shapes with refining a coarser one if it's needed +//======================================================================= +Standard_Boolean BRepExtrema_ProximityValueTool::getShapesAdditionalVertices() +{ + // estimate the density of meshes of shapes to add points to a coarcer one + // target steps for refinement + Standard_Real aStep1 = myStep1; + Standard_Real aStep2 = myStep2; + + if ((myShapeType1 == TopAbs_EDGE) && (myShapeType2 == TopAbs_EDGE)) + { + if (myNbSamples1 > myNbNodes1) // 1st edge needs refinement + { + aStep1 = calcEdgeRefinementStep (TopoDS::Edge (myShape1), myNbSamples1); + myIsRefinementRequired1 = Standard_True; + } + + if (myNbSamples2 > myNbNodes2) // 2nd edge needs refinement + { + aStep2 = calcEdgeRefinementStep (TopoDS::Edge (myShape2), myNbSamples2); + myIsRefinementRequired2 = Standard_True; + } + + if (aStep1 / aStep2 > 2.) // 1st edge needs refinement + { + myIsRefinementRequired1 = Standard_True; + aStep1 = aStep2; + } + else if (aStep2 / aStep1 > 2.) // 2nd edge needs refinement + { + myIsRefinementRequired2 = Standard_True; + aStep2 = aStep1; + } + + if (myIsRefinementRequired1) + { + if (!getEdgeAdditionalVertices (TopoDS::Edge (myShape1), aStep1, myAddVertices1, myAddStatus1)) + { + return Standard_False; + } + } + + if (myIsRefinementRequired2) + { + if (!getEdgeAdditionalVertices (TopoDS::Edge (myShape2), aStep2, myAddVertices2, myAddStatus2)) + { + return Standard_False; + } + } + } + else if ((myShapeType1 == TopAbs_FACE) && (myShapeType2 == TopAbs_FACE)) + { + if (aStep1 / aStep2 > 2) // 1st face needs refinement + { + myIsRefinementRequired1 = Standard_True; + aStep1 = myStep2; + } + else if (aStep2 / aStep1 > 2.) // 2nd face needs refinement + { + myIsRefinementRequired2 = Standard_True; + aStep2 = myStep1; + } + + if (myIsRefinementRequired1) + { + return getFaceAdditionalVertices (TopoDS::Face (myShape1), aStep1, myAddVertices1, myAddStatus1); + } + + if (myIsRefinementRequired2) + { + return getFaceAdditionalVertices (TopoDS::Face (myShape2), aStep2, myAddVertices2, myAddStatus2); + } + } + + return Standard_True; +} + //======================================================================= //function : Perform //purpose : Performs the computation of the proximity value //======================================================================= void BRepExtrema_ProximityValueTool::Perform (Standard_Real& theTolerance) { - myIsDone = Standard_False; + if (!myIsInitS1 || !myIsInitS2 || (myShapeType1 != myShapeType2)) + return; + + //get vertices on shapes with refining a coarser mesh if it's needed + if (!getShapesAdditionalVertices()) + return; // max(min) dist from the 1st shape to the 2nd one BVH_Vec3d aP1_1, aP1_2; ProxPnt_Status aPointStatus1_1 = ProxPnt_Status::ProxPnt_Status_UNKNOWN; ProxPnt_Status aPointStatus1_2 = ProxPnt_Status::ProxPnt_Status_UNKNOWN; - Standard_Real aProximityDist1 = computeProximityDist (mySet1, myNbSamples1, mySet2, myShapeList1, myShapeList2, - aP1_1, aP1_2, aPointStatus1_1, aPointStatus1_2); + Standard_Real aProximityDist1 = computeProximityDist (mySet1, myNbSamples1, myAddVertices1, myAddStatus1, + mySet2, + myShapeList1, myShapeList2, + aP1_1, aP1_2, + aPointStatus1_1, aPointStatus1_2); if (aProximityDist1 < 0.) return; @@ -132,8 +535,11 @@ void BRepExtrema_ProximityValueTool::Perform (Standard_Real& theTolerance) ProxPnt_Status aPointStatus2_1 = ProxPnt_Status::ProxPnt_Status_UNKNOWN; ProxPnt_Status aPointStatus2_2 = ProxPnt_Status::ProxPnt_Status_UNKNOWN; - Standard_Real aProximityDist2 = computeProximityDist (mySet2, myNbSamples2, mySet1, myShapeList2, myShapeList1, - aP2_2, aP2_1, aPointStatus2_2, aPointStatus2_1); + Standard_Real aProximityDist2 = computeProximityDist (mySet2, myNbSamples2, myAddVertices2, myAddStatus2, + mySet1, + myShapeList2, myShapeList1, + aP2_2, aP2_1, + aPointStatus2_2, aPointStatus2_1); if (aProximityDist2 < 0.) return; @@ -159,3 +565,23 @@ void BRepExtrema_ProximityValueTool::Perform (Standard_Real& theTolerance) myIsDone = Standard_True; theTolerance = myDistance; } + +//======================================================================= +//function : Inspect +//purpose : Used for selection and storage of coinciding nodes +//======================================================================= +NCollection_CellFilter_Action BRepExtrema_VertexInspector::Inspect (const Standard_Integer theTarget) +{ + myIsNeedAdd = Standard_True; + + const gp_XYZ& aPnt = myPoints.Value (theTarget - 1); + Standard_Real aDx, aDy, aDz; + aDx = myCurrent.X() - aPnt.X(); + aDy = myCurrent.Y() - aPnt.Y(); + aDz = myCurrent.Z() - aPnt.Z(); + + if ((aDx * aDx <= myTol) && (aDy * aDy <= myTol) && (aDz * aDz <= myTol)) + myIsNeedAdd = Standard_False; + + return CellFilter_Keep; +} \ No newline at end of file diff --git a/src/BRepExtrema/BRepExtrema_ProximityValueTool.hxx b/src/BRepExtrema/BRepExtrema_ProximityValueTool.hxx index 09610c8d92..ca65c28104 100644 --- a/src/BRepExtrema/BRepExtrema_ProximityValueTool.hxx +++ b/src/BRepExtrema/BRepExtrema_ProximityValueTool.hxx @@ -1,4 +1,4 @@ -// Created on: 2022-08-08 +// Created on: 2022-08-08 // Created by: Kseniya NOSULKO // Copyright (c) 2022 OPEN CASCADE SAS // @@ -18,9 +18,67 @@ #include #include +#include +#include + +typedef NCollection_Vector VectorOfPoint; + +//! Class BRepExtrema_VertexInspector +//! derived from NCollection_CellFilter_InspectorXYZ +//! This class define the Inspector interface for CellFilter algorithm, +//! working with gp_XYZ points in 3d space. +//! Used in search of coincidence points with a certain tolerance. +class BRepExtrema_VertexInspector : public NCollection_CellFilter_InspectorXYZ +{ +public: + typedef Standard_Integer Target; + + //! Constructor; remembers the tolerance + BRepExtrema_VertexInspector() + : myTol (Precision::SquareConfusion()), + myIsNeedAdd (Standard_True) + {} + + //! Keep the points used for comparison + void Add (const gp_XYZ& thePnt) + { + myPoints.Append (thePnt); + } + + //! Set tolerance for comparison of point coordinates + void SetTol (const Standard_Real theTol) + { + myTol = theTol; + } + + //! Set current point to search for coincidence + void SetCurrent (const gp_XYZ& theCurPnt) + { + myCurrent = theCurPnt; + myIsNeedAdd = Standard_True; + } + + Standard_Boolean IsNeedAdd() + { + return myIsNeedAdd; + } + + //! Implementation of inspection method + Standard_EXPORT NCollection_CellFilter_Action Inspect (const Standard_Integer theTarget); + +private: + Standard_Real myTol; + Standard_Boolean myIsNeedAdd; + VectorOfPoint myPoints; + gp_XYZ myCurrent; +}; + +typedef NCollection_CellFilter BRepExtrema_CellFilter; +typedef typename BRepExtrema_ProximityDistTool::ProxPnt_Status ProxPnt_Status; //! Tool class for computation of the proximity value from one BVH //! primitive set to another, solving max(min) problem. +//! Handles only edge/edge or face/face cases. //! This tool is not intended to be used independently, and is integrated //! in other classes, implementing algorithms based on shape tessellation //! (BRepExtrema_ShapeProximity and BRepExtrema_SelfIntersection). @@ -29,8 +87,6 @@ //! on the quality of input tessellation(s). class BRepExtrema_ProximityValueTool { -public: - typedef typename BRepExtrema_ProximityDistTool::ProxPnt_Status ProxPnt_Status; public: @@ -86,9 +142,17 @@ public: private: + //! Gets shape data for further refinement. + Standard_Boolean getInfoForRefinement (const TopoDS_Shape& theShapes, + TopAbs_ShapeEnum& theShapeType, + Standard_Integer& theNbNodes, + Standard_Real& theStep); + //! Returns the computed proximity value from first BVH to another one. Standard_Real computeProximityDist (const Handle(BRepExtrema_TriangleSet)& theSet1, const Standard_Integer theNbSamples1, + const BVH_Array3d& theAddVertices1, + const NCollection_Vector& theAddStatus1, const Handle(BRepExtrema_TriangleSet)& theSet2, const BRepExtrema_ShapeList& theShapeList1, const BRepExtrema_ShapeList& theShapeList2, @@ -97,6 +161,29 @@ private: ProxPnt_Status& thePointStatus1, ProxPnt_Status& thePointStatus2) const; + //! Gets additional vertices on shapes with refining a coarser one if it's needed. + Standard_Boolean getShapesAdditionalVertices(); + + //! Gets additional vertices and their statuses on the edge with the input step. + Standard_Boolean getEdgeAdditionalVertices (const TopoDS_Edge& theEdge, + const Standard_Real theStep, + BVH_Array3d& theAddVertices, + NCollection_Vector& theAddStatuses); + + //! Gets additional vertices and their statuses on the face with the input step (triangle square). + Standard_Boolean getFaceAdditionalVertices (const TopoDS_Face& theFace, + const Standard_Real theStep, + BVH_Array3d& theAddVertices, + NCollection_Vector& theAddStatuses); + + //! Splits the triangle recursively, halving the longest side + //! to the area of ​​the current triangle > input step + void doRecurTrgSplit (const gp_Pnt (&theTrg)[3], + const ProxPnt_Status (&theEdgesStatus)[3], + const Standard_Real theTol, + const Standard_Real theStep, + BVH_Array3d& theAddVertices, + NCollection_Vector& theAddStatuses); private: //! Set of all mesh primitives of the 1st shape. @@ -109,6 +196,35 @@ private: //! List of subshapes of the 2nd shape. BRepExtrema_ShapeList myShapeList2; + //! The 1st shape. + TopoDS_Shape myShape1; + //! The 2nd shape. + TopoDS_Shape myShape2; + + BVH_Array3d myAddVertices1; //!< Additional vertices on the 1st shape if its mesh is coarser. + BVH_Array3d myAddVertices2; //!< Additional vertices on the 2nd shape if its mesh is coarser. + + NCollection_Vector myAddStatus1; //!< Status of additional vertices on the 1st shape. + NCollection_Vector myAddStatus2; //!< Status of additional vertices on the 2nd shape. + + Standard_Boolean myIsInitS1; //!< Is the 1st shape initialized? + Standard_Boolean myIsInitS2; //!< Is the 2nd shape initialized? + + Standard_Boolean myIsRefinementRequired1; //!< Flag about the need to refine the 1st shape. + Standard_Boolean myIsRefinementRequired2; //!< Flag about the need to refine the 2nd shape. + + Standard_Integer myNbNodes1; //!< Number of nodes in triangulation of the 1st shape. + Standard_Integer myNbNodes2; //!< Number of nodes in triangulation of the 2nd shape. + + Standard_Real myStep1; //!< Step for getting vertices on the 1st shape. + Standard_Real myStep2; //!< Step for getting vertices on the 2nd shape. + + BRepExtrema_CellFilter myCells; + BRepExtrema_VertexInspector myInspector; + + TopAbs_ShapeEnum myShapeType1; //!< 1st shape type. + TopAbs_ShapeEnum myShapeType2; //!< 2nd shape type. + Standard_Real myDistance; //!< Distance Standard_Boolean myIsDone; //!< State of the algorithm diff --git a/src/BRepExtrema/BRepExtrema_ShapeProximity.cxx b/src/BRepExtrema/BRepExtrema_ShapeProximity.cxx index 09efa4e585..034f25e66e 100644 --- a/src/BRepExtrema/BRepExtrema_ShapeProximity.cxx +++ b/src/BRepExtrema/BRepExtrema_ShapeProximity.cxx @@ -129,6 +129,7 @@ void BRepExtrema_ShapeProximity::Perform() myElementSet2); myProxValTool.LoadShapeLists (myShapeList1, myShapeList2); + myProxValTool.SetNbSamplePoints (myNbSamples1, myNbSamples2); myProxValTool.Perform (myTolerance); myProxValTool.ProximityPoints(myProxPoint1, myProxPoint2); diff --git a/src/BRepExtrema/BRepExtrema_ShapeProximity.hxx b/src/BRepExtrema/BRepExtrema_ShapeProximity.hxx index c6f6d77721..63f56a941f 100644 --- a/src/BRepExtrema/BRepExtrema_ShapeProximity.hxx +++ b/src/BRepExtrema/BRepExtrema_ShapeProximity.hxx @@ -37,7 +37,8 @@ //! on distance less than the given tolerance from each other. //! //! Second approach: -//! Compute the proximity value between two shapes if the tolerance is not defined (Precision::Infinite()). +//! Compute the proximity value between two shapes (handles only edge/edge or face/face cases) +//! if the tolerance is not defined (Precision::Infinite()). //! In this case the proximity value is a minimal thickness of a layer containing both shapes. //! //! For the both approaches the high performance is achieved through the use of existing @@ -46,8 +47,6 @@ //! triangulation). class BRepExtrema_ShapeProximity { -public: - typedef typename BRepExtrema_ProximityValueTool::ProxPnt_Status ProxPnt_Status; public: diff --git a/tests/lowalgos/proximity/D4 b/tests/lowalgos/proximity/D4 new file mode 100644 index 0000000000..c463310b87 --- /dev/null +++ b/tests/lowalgos/proximity/D4 @@ -0,0 +1,29 @@ +puts "============" +puts "0033144: Modeling Algorithms - Wrong result of Shape Proximity" +puts "===========" +puts "" + +sphere s1 0 1 0 0 0 1 1 +trimu s1 s1 0 pi +mkface fs1 s1 +incmesh fs1 1e-3 + +plane p1 0 0 0 0 1 0 +trim p1 p1 -1 1 -1 1 +mkface f2 p1 +incmesh f2 1e-3 + +set log [proximity fs1 f2 -value -profile] + +regexp {Proximity value: ([0-9+-.eE]*)} $log full val; + +set tol 1.e-2 +set expected 2.0 + +regexp {Status of ProxPnt1 on ([A-Za-z0-9._-]*) : ([A-Za-z]*)} $log full val1 val2 +set status1 ${val2} +set expected_status1 Middle + +regexp {Status of ProxPnt2 on ([A-Za-z0-9._-]*) : ([A-Za-z]*)} $log full val1 val2 +set status2 ${val2} +set expected_status2 Middle \ No newline at end of file diff --git a/tests/lowalgos/proximity/B6 b/tests/lowalgos/proximity/E3 similarity index 55% rename from tests/lowalgos/proximity/B6 rename to tests/lowalgos/proximity/E3 index 860919a914..a7e5858183 100644 --- a/tests/lowalgos/proximity/B6 +++ b/tests/lowalgos/proximity/E3 @@ -1,26 +1,23 @@ puts "============" -puts "0033017: Implement an algorithm to find a proximity between a pair of shapes" +puts "0033144: Modeling Algorithms - Wrong result of Shape Proximity" puts "===========" puts "" -plane p1 0 0 0 0 0 1 -trim p1 p1 -1 1 -1 1 -mkface f1 p1 -incmesh f1 1.e-3 +restore [locate_data_file bug33144_e1.brep] e1 +restore [locate_data_file bug33144_e2.brep] e2 -circle c 0 0 1 1 -mkedge e1 c -incmesh e1 1.e-3 +incmesh e1 1e-3 +incmesh e2 1e-3 -set log [proximity f1 e1 -value -profile] +set log [proximity e1 e2 -value -profile] regexp {Proximity value: ([0-9+-.eE]*)} $log full val; set tol 1.e-3 -set expected 1.0 +set expected 0.6996 regexp {Status of ProxPnt1 on ([A-Za-z0-9._-]*) : ([A-Za-z]*)} $log full val1 val2 set status1 ${val2} -set expected_status1 Border +set expected_status1 Middle regexp {Status of ProxPnt2 on ([A-Za-z0-9._-]*) : ([A-Za-z]*)} $log full val1 val2 set status2 ${val2} From f9990707fec102f85688a9e197a64fd175b5dc4c Mon Sep 17 00:00:00 2001 From: atereshi Date: Wed, 26 Oct 2022 16:59:54 +0300 Subject: [PATCH 419/639] 0033187: Modeling Algorithms - Crash in postprocessing of imported shape Problem: Desynchronization of behaviors of GeomAdaptor_Curve::NbIntervals and GeomAdaptor_Curve::Intervals functions. First calculates number of intervals, then array is created and second fills the array. In some cases the size of array is less than need for filling. Change: 1. Added function BSplCLib::Intervals that calculates number of interval and fills the array with its (if needed). 2. Simplified the algorithm of intervals calculation. 3. GeomAdaptor_Curve::NbIntervals/Intervals and Geom2dAdaptor_Curve::NbIntervals/Intervals use BSplCLib::Intervals. 4. When creating an adapter for the base curve, the boundaries of the adapter for the offset curve are applied. 5. Test for problem shape was created: bugs modalg_8 bug33187. Result: The new approach eliminates the problem of writing outside the array bounds. --- src/BSplCLib/BSplCLib.cxx | 127 ++++ src/BSplCLib/BSplCLib.hxx | 22 +- src/Geom2dAdaptor/Geom2dAdaptor_Curve.cxx | 805 +++----------------- src/GeomAdaptor/GeomAdaptor_Curve.cxx | 847 +++------------------- tests/bugs/modalg_8/bug33187 | 9 + tests/hlr/poly_hlr/A1 | 2 +- tests/hlr/poly_hlr/A2 | 2 +- tests/hlr/poly_hlr/A3 | 2 +- tests/hlr/poly_hlr/A4 | 2 +- tests/hlr/poly_hlr/A5 | 2 +- tests/hlr/poly_hlr/A6 | 2 +- tests/hlr/poly_hlr/A7 | 2 +- 12 files changed, 333 insertions(+), 1491 deletions(-) create mode 100644 tests/bugs/modalg_8/bug33187 diff --git a/src/BSplCLib/BSplCLib.cxx b/src/BSplCLib/BSplCLib.cxx index cae229290b..6a2aa5f112 100644 --- a/src/BSplCLib/BSplCLib.cxx +++ b/src/BSplCLib/BSplCLib.cxx @@ -4234,6 +4234,133 @@ void BSplCLib::Resolution( Standard_Real& Poles, UTolerance = Tolerance3D / RealSmall(); } +//======================================================================= +// function : Intervals +// purpose : +//======================================================================= +Standard_Integer BSplCLib::Intervals (const TColStd_Array1OfReal& theKnots, + const TColStd_Array1OfInteger& theMults, + Standard_Integer theDegree, + Standard_Boolean isPeriodic, + Standard_Integer theContinuity, + Standard_Real theFirst, + Standard_Real theLast, + Standard_Real theTolerance, + TColStd_Array1OfReal* theIntervals) +{ + // remove all knots with multiplicity less or equal than (degree - continuity) except first and last + Standard_Integer aFirstIndex = isPeriodic ? 1 : FirstUKnotIndex (theDegree, theMults); + Standard_Integer aLastIndex = isPeriodic ? theKnots.Size() : LastUKnotIndex (theDegree, theMults); + TColStd_Array1OfReal aNewKnots (1, aLastIndex - aFirstIndex + 1); + Standard_Integer aNbNewKnots = 0; + for (Standard_Integer anIndex = aFirstIndex; anIndex <= aLastIndex; anIndex++) + { + if (theMults(anIndex) > (theDegree - theContinuity) || + anIndex == aFirstIndex || + anIndex == aLastIndex) + { + aNbNewKnots++; + aNewKnots(aNbNewKnots) = theKnots[anIndex]; + } + } + aNewKnots.Resize (1, aNbNewKnots, Standard_True); + + // the range boundaries + Standard_Real aCurFirst = theFirst; + Standard_Real aCurLast = theLast; + Standard_Real aPeriod = 0.0; + Standard_Integer aFirstPeriod = 0; + Standard_Integer aLastPeriod = 0; + // move boundaries into period + if (isPeriodic) + { + Standard_Real aLower = theKnots.First(); + Standard_Real anUpper = theKnots.Last(); + aPeriod = anUpper - aLower; + + while (aCurFirst < aLower) + { + aCurFirst += aPeriod; + aFirstPeriod--; + } + while (aCurLast < aLower) + { + aCurLast += aPeriod; + aLastPeriod--; + } + while (aCurFirst >= anUpper) + { + aCurFirst -= aPeriod; + aFirstPeriod += 1; + } + while (aCurLast >= anUpper) + { + aCurLast -= aPeriod; + aLastPeriod += 1; + } + } + // locate the left and nearest knot for boundaries + Standard_Integer anIndex1 = 0; + Standard_Integer anIndex2 = 0; + Standard_Real aDummyDouble; + // we use version of LocateParameter that doesn't need multiplicities + LocateParameter(theDegree, aNewKnots, TColStd_Array1OfInteger(), aCurFirst, Standard_False, 1, aNbNewKnots, anIndex1, aDummyDouble); + LocateParameter(theDegree, aNewKnots, TColStd_Array1OfInteger(), aCurLast, Standard_False, 1, aNbNewKnots, anIndex2, aDummyDouble); + // the case when the beginning of the range coincides with the next knot + if (anIndex1 < aNbNewKnots && Abs(aNewKnots[anIndex1 + 1] - aCurFirst) < theTolerance) + { + anIndex1 += 1; + } + // the case when the ending of the range coincides with the current knot + if (aNbNewKnots && Abs(aNewKnots[anIndex2] - aCurLast) < theTolerance) + { + anIndex2 -= 1; + } + Standard_Integer aNbIntervals = anIndex2 - anIndex1 + 1 + (aLastPeriod - aFirstPeriod) * (aNbNewKnots - 1); + + // fill the interval array + if (theIntervals) + { + theIntervals->Resize (1, aNbIntervals + 1, Standard_False); + if (isPeriodic && aLastPeriod != aFirstPeriod) + { + Standard_Integer anIndex = 1; + // part from the begging of range to the end of the first period + for (Standard_Integer i = anIndex1; i < aNewKnots.Size(); i++, anIndex++) + { + theIntervals->ChangeValue(anIndex) = aNewKnots[i] + aFirstPeriod * aPeriod; + } + // full periods + for (Standard_Integer aPeriodNum = aFirstPeriod + 1; aPeriodNum < aLastPeriod; aPeriodNum++) + { + for (Standard_Integer i = 1; i < aNewKnots.Size(); i++, anIndex++) + { + theIntervals->ChangeValue(anIndex) = aNewKnots[i] + aPeriodNum * aPeriod; + } + } + // part from the begging of the last period to the end of range + for (Standard_Integer i = 1; i <= anIndex2; i++, anIndex++) + { + theIntervals->ChangeValue(anIndex) = aNewKnots[i] + aLastPeriod * aPeriod; + } + } + else + { + Standard_Integer anIndex = 1; + for (Standard_Integer i = anIndex1; i <= anIndex2; i++, anIndex++) + { + theIntervals->ChangeValue(anIndex) = aNewKnots[i] + aFirstPeriod * aPeriod; + } + } + // update the first position (the begging of range doesn't coincide with the knot at anIndex1 in general) + theIntervals->ChangeValue(1) = theFirst; + // write the ending of the range (we didn't write it at all) + theIntervals->ChangeValue(aNbIntervals + 1) = theLast; + } + + return aNbIntervals; +} + //======================================================================= // function: FlatBezierKnots // purpose : diff --git a/src/BSplCLib/BSplCLib.hxx b/src/BSplCLib/BSplCLib.hxx index 92efed9613..710c204375 100644 --- a/src/BSplCLib/BSplCLib.hxx +++ b/src/BSplCLib/BSplCLib.hxx @@ -1456,8 +1456,26 @@ public: //! we have |f (u1) - f (u0)| < Tolerance3D Standard_EXPORT static void Resolution (const TColgp_Array1OfPnt2d& Poles, const TColStd_Array1OfReal* Weights, const Standard_Integer NumPoles, const TColStd_Array1OfReal& FlatKnots, const Standard_Integer Degree, const Standard_Real Tolerance3D, Standard_Real& UTolerance); - - + //! Splits the given range to BSpline intervals of given continuity + //! @param[in] theKnots the knots of BSpline + //! @param[in] theMults the knots' multiplicities + //! @param[in] theDegree the degree of BSpline + //! @param[in] isPeriodic the periodicity of BSpline + //! @param[in] theContinuity the target interval's continuity + //! @param[in] theFirst the begin of the target range + //! @param[in] theLast the end of the target range + //! @param[in] theTolerance the tolerance + //! @param[in,out] theIntervals the array to store intervals if isn't nullptr + //! @return the number of intervals + Standard_EXPORT static Standard_Integer Intervals (const TColStd_Array1OfReal& theKnots, + const TColStd_Array1OfInteger& theMults, + Standard_Integer theDegree, + Standard_Boolean isPeriodic, + Standard_Integer theContinuity, + Standard_Real theFirst, + Standard_Real theLast, + Standard_Real theTolerance, + TColStd_Array1OfReal* theIntervals); protected: diff --git a/src/Geom2dAdaptor/Geom2dAdaptor_Curve.cxx b/src/Geom2dAdaptor/Geom2dAdaptor_Curve.cxx index f6727ca8e7..10b014ae43 100644 --- a/src/Geom2dAdaptor/Geom2dAdaptor_Curve.cxx +++ b/src/Geom2dAdaptor/Geom2dAdaptor_Curve.cxx @@ -58,65 +58,6 @@ static const Standard_Real PosTol = Precision::PConfusion() / 2; IMPLEMENT_STANDARD_RTTIEXT(Geom2dAdaptor_Curve, Adaptor2d_Curve2d) -static void DefinFPeriod(const Standard_Real theLower, - const Standard_Real theUpper, - const Standard_Real theEps, - const Standard_Real thePeriod, - Standard_Real &theCurFirst, - Standard_Integer &theFPer); - -static void DefinLPeriod(const Standard_Real theLower, - const Standard_Real theUpper, - const Standard_Real theEps, - const Standard_Real thePeriod, - Standard_Real &theCurLast, - Standard_Integer &theLPer); - -static Standard_Integer LocalNbIntervals(const TColStd_Array1OfReal& theTK, - const TColStd_Array1OfInteger& theTM, - const TColStd_Array1OfInteger& theInter, - const Standard_Integer theCurDegree, - const Standard_Integer theNb, - const Standard_Integer theNbInt, - const Standard_Real theFirst, - const Standard_Real theLast, - const Standard_Real theEps, - const Standard_Boolean thePeriodicCur, - Standard_Integer theNbIntervals, - Standard_Real theLower = 0, - Standard_Real thePeriod = 0, - Standard_Integer theIndex1 = 0, - Standard_Integer theIndex2 = 0); - -static void WriteIntervals(const TColStd_Array1OfReal &theTK, - const TColStd_Array1OfInteger &theInter, - const Standard_Integer theNbInt, - const Standard_Integer theIndex1, - const Standard_Integer theIndex2, - const Standard_Real theCurPeriod, - const Standard_Boolean theFlagForFirst, - TColStd_Array1OfReal &theT, - TColStd_Array1OfInteger &theFinalIntervals, - Standard_Integer &theNbIntervals, - Standard_Integer &theCurInt); - -static void SpreadInt(const TColStd_Array1OfReal &theTK, - const TColStd_Array1OfInteger &theTM, - const TColStd_Array1OfInteger &theInter, - const Standard_Integer theCurDegree, - const Standard_Integer theNb, - const Standard_Integer theFPer, - const Standard_Integer theLPer, - const Standard_Integer theNbInt, - const Standard_Real theLower, - const Standard_Real theFirst, - const Standard_Real theLast, - const Standard_Real thePeriod, - const Standard_Real theLastParam, - const Standard_Real theEps, - TColStd_Array1OfReal &theT, - Standard_Integer &theNbIntervals); - //======================================================================= //function : ShallowCopy //purpose : @@ -355,345 +296,55 @@ GeomAbs_Shape Geom2dAdaptor_Curve::Continuity() const } //======================================================================= -//function : DefinFPeriod -//purpose : +//function : NbIntervals +//purpose : //======================================================================= -void DefinFPeriod(const Standard_Real theLower, - const Standard_Real theUpper, - const Standard_Real theEps, - const Standard_Real thePeriod, - Standard_Real &theCurFirst, - Standard_Integer &theFPer) +Standard_Integer Geom2dAdaptor_Curve::NbIntervals(const GeomAbs_Shape S) const { - if (theCurFirst >= theLower) + if (myTypeCurve == GeomAbs_BSplineCurve) { - while (theCurFirst >= theUpper) + if ((!myBSplineCurve->IsPeriodic() && S <= Continuity()) || S == GeomAbs_C0) { - theCurFirst = theCurFirst - thePeriod; - theFPer++; - } - if (Abs(theUpper - theCurFirst) <= theEps) - { - theFPer++; - theCurFirst = theLower; - } - } - else - { - while (theCurFirst < theLower) - { - theCurFirst = theCurFirst + thePeriod; - if (Abs(theLower - theCurFirst) > theEps) - { - theFPer--; - } + return 1; } + + Standard_Integer aDegree = myBSplineCurve->Degree(); + Standard_Integer aCont; - if (Abs(theUpper - theCurFirst) <= theEps) + switch (S) { - theCurFirst = theLower; - } - } -} - -//======================================================================= -//function : DefinLPeriod -//purpose : -//======================================================================= - -void DefinLPeriod(const Standard_Real theLower, - const Standard_Real theUpper, - const Standard_Real theEps, - const Standard_Real thePeriod, - Standard_Real &theCurLast, - Standard_Integer &theLPer) -{ - if (theCurLast >= theLower) - { - if ((theCurLast >= theUpper) && (Abs(theCurLast - theUpper) <= theEps)) - { - theCurLast = theUpper; - } - else - { - while (theCurLast >= theUpper) - { - theCurLast = theCurLast - thePeriod; - theLPer++; - } - if (Abs(theUpper - theCurLast) <= theEps) - { - theCurLast = theLower; - } - } - } - else - { - while (theCurLast < theLower) - { - theCurLast = theCurLast + thePeriod; - if (Abs(theLower - theCurLast) > theEps) - { - theLPer--; - } - } - if (Abs(theUpper - theCurLast) <= theEps) - { - theCurLast = theLower; - } - } -} - -//======================================================================= -//function : LocalNbIntervals -//purpose : -//======================================================================= - -Standard_Integer LocalNbIntervals(const TColStd_Array1OfReal& theTK, - const TColStd_Array1OfInteger& theTM, - const TColStd_Array1OfInteger& theInter, - const Standard_Integer theCurDegree, - const Standard_Integer theNb, - const Standard_Integer theNbInt, - const Standard_Real theFirst, - const Standard_Real theLast, - const Standard_Real theEps, - const Standard_Boolean thePeriodicCur, - Standard_Integer theNbIntervals, - Standard_Real theLower, - Standard_Real thePeriod, - Standard_Integer theIndex1, - Standard_Integer theIndex2) -{ - Standard_Real aNewFirst = theFirst; - Standard_Real aNewLast = theLast; - if (theIndex1 == 0) - { - BSplCLib::LocateParameter(theCurDegree, theTK, theTM, theFirst, - thePeriodicCur, 1, theNb, theIndex1, aNewFirst); - } - if (theIndex2 == 0) - { - BSplCLib::LocateParameter(theCurDegree, theTK, theTM, theLast, - thePeriodicCur, 1, theNb, theIndex2, aNewLast); - } - // Protection against theFirst = UFirst - eps, which located as ULast - eps - if (thePeriodicCur && ((aNewLast - aNewFirst) < Precision::PConfusion())) - { - if (Abs(aNewLast - theLower) < Precision::PConfusion()) - { - aNewLast += thePeriod; - } - else - { - aNewFirst -= thePeriod; - } - } - - if (Abs(aNewFirst - theTK(theIndex1 + 1)) < theEps) - { - theIndex1++; - } - if ((aNewLast - theTK(theIndex2)) > theEps) - { - theIndex2++; - } - for (Standard_Integer i = 1; i <= theNbInt; i++) - { - if (theInter(i) > theIndex1 && theInter(i) < theIndex2) theNbIntervals++; - } - return theNbIntervals; -} - -//======================================================================= -//function : NbIntervals -//purpose : -//======================================================================= - -Standard_Integer Geom2dAdaptor_Curve::NbIntervals(const GeomAbs_Shape S) const -{ - Standard_Integer myNbIntervals = 1; - Standard_Integer NbSplit; - if (myTypeCurve == GeomAbs_BSplineCurve) { - Standard_Integer FirstIndex = myBSplineCurve->FirstUKnotIndex(); - Standard_Integer LastIndex = myBSplineCurve->LastUKnotIndex(); - TColStd_Array1OfInteger Inter(1, LastIndex - FirstIndex + 1); - Standard_Boolean aContPer = (S >= Continuity()) && myBSplineCurve->IsPeriodic(); - Standard_Boolean aContNotPer = (S > Continuity()) && !myBSplineCurve->IsPeriodic(); - if (aContPer || aContNotPer) { - Standard_Integer Cont; - switch (S) { - case GeomAbs_G1: - case GeomAbs_G2: - throw Standard_DomainError("Geom2dAdaptor_Curve::NbIntervals"); - break; - case GeomAbs_C0: - myNbIntervals = 1; - break; case GeomAbs_C1: + aCont = 1; + break; case GeomAbs_C2: + aCont = 2; + break; case GeomAbs_C3: + aCont = 3; + break; case GeomAbs_CN: - { - if (S == GeomAbs_C1) Cont = 1; - else if (S == GeomAbs_C2) Cont = 2; - else if (S == GeomAbs_C3) Cont = 3; - else Cont = myBSplineCurve->Degree(); - Standard_Integer Degree = myBSplineCurve->Degree(); - Standard_Integer NbKnots = myBSplineCurve->NbKnots(); - TColStd_Array1OfInteger Mults(1, NbKnots); - myBSplineCurve->Multiplicities(Mults); - NbSplit = 1; - Standard_Integer Index = FirstIndex; - Inter(NbSplit) = Index; - Index++; - NbSplit++; - while (Index < LastIndex) - { - if (Degree - Mults(Index) < Cont) - { - Inter(NbSplit) = Index; - NbSplit++; - } - Index++; - } - Inter(NbSplit) = Index; - - Standard_Integer NbInt = NbSplit - 1; - - Standard_Integer Nb = myBSplineCurve->NbKnots(); - TColStd_Array1OfReal TK(1, Nb); - TColStd_Array1OfInteger TM(1, Nb); - myBSplineCurve->Knots(TK); - myBSplineCurve->Multiplicities(TM); - Standard_Real Eps = Min(Resolution(Precision::Confusion()), - Precision::PConfusion()); - - myNbIntervals = 1; - - if (!myBSplineCurve->IsPeriodic()) - { - myNbIntervals = LocalNbIntervals(TK, TM, Inter, Degree, Nb, NbInt, - myFirst, myLast, Eps, Standard_False, myNbIntervals); - } - else - { - Standard_Real aCurFirst = myFirst; - Standard_Real aCurLast = myLast; - - Standard_Real aLower = myBSplineCurve->FirstParameter(); - Standard_Real anUpper = myBSplineCurve->LastParameter(); - - if ((Abs(aCurFirst - aLower) < Eps) && (aCurFirst < aLower)) - { - aCurFirst = aLower; - } - if ((Abs(aCurLast - anUpper) < Eps) && (aCurLast < anUpper)) - { - aCurLast = anUpper; - } - - Standard_Real aPeriod = myBSplineCurve->Period(); - Standard_Integer aLPer = 1; Standard_Integer aFPer = 1; - - if ((Abs(aLower - myFirst) < Eps) && (aCurFirst < aLower)) - { - aCurFirst = aLower; - } - else - { - DefinFPeriod(aLower, anUpper, - Eps, aPeriod, aCurFirst, aFPer); - } - DefinLPeriod(aLower, anUpper, - Eps, aPeriod, aCurLast, aLPer); - - if ((Abs(aLower - myFirst) < Eps) && (Abs(anUpper - myLast) < Eps)) - { - myNbIntervals = NbInt; - } - else - { - Standard_Integer aSumPer = Abs(aLPer - aFPer); - - Standard_Real aFirst = 0; - if (aLower < 0 && anUpper == 0) - { - if (Abs(aCurLast) < Eps) - { - aCurLast = 0; - } - aFirst = aLower; - } - - if (aSumPer <= 1) - { - if ((Abs(myFirst - TK(Nb) - aPeriod * (aFPer - 1)) <= Eps) && (myLast < (TK(Nb) + aPeriod * (aLPer - 1)))) - { - myNbIntervals = LocalNbIntervals(TK, TM, Inter, Degree, Nb, NbInt, - myFirst, myLast, Eps, Standard_True, myNbIntervals, aLower, aPeriod); - return myNbIntervals; - } - if ((Abs(myFirst - aLower) < Eps) && (Abs(myLast - anUpper) < Eps)) - { - myNbIntervals = LocalNbIntervals(TK, TM, Inter, Degree, Nb, NbInt, - myFirst, myLast, Eps, Standard_True, myNbIntervals, aLower, aPeriod); - return myNbIntervals; - } - } - - if (aSumPer != 0) - { - Standard_Integer aFInt = 0; - Standard_Integer aLInt = 0; - Standard_Integer aPInt = NbInt; - - if ((aCurFirst != aPeriod) || ((aCurFirst != anUpper) && (Abs(myFirst) < Eps))) - { - aFInt = 1; - } - if ((aCurLast != 0) && (aCurLast != anUpper)) - { - aLInt = 1; - } - - aFInt = LocalNbIntervals(TK, TM, Inter, Degree, Nb, NbInt, - aCurFirst, anUpper, Eps, Standard_True, aFInt, aLower, aPeriod); - - if (aCurLast == anUpper) - { - aLInt = NbInt; - } - else - { - if (Abs(aCurLast - aFirst) > Eps) - { - aLInt = LocalNbIntervals(TK, TM, Inter, Degree, Nb, NbInt, - aFirst, aCurLast, Eps, Standard_True, aLInt, aLower, aPeriod, 1); - } - else - { - aLInt = LocalNbIntervals(TK, TM, Inter, Degree, Nb, NbInt, - aFirst, aCurLast, Eps, Standard_True, aLInt, aLower, aPeriod); - } - } - - myNbIntervals = aFInt + aLInt + aPInt * (aSumPer - 1); - } - else - { - myNbIntervals = LocalNbIntervals(TK, TM, Inter, Degree, Nb, NbInt, - aCurFirst, aCurLast, Eps, Standard_True, myNbIntervals, aLower, aPeriod); - } - } - } - } - break; - } + aCont = aDegree; + break; + default: + throw Standard_DomainError ("Geom2dAdaptor_Curve::NbIntervals()"); } + + Standard_Real anEps = Min(Resolution(Precision::Confusion()), Precision::PConfusion()); + + return BSplCLib::Intervals(myBSplineCurve->Knots(), + myBSplineCurve->Multiplicities(), + aDegree, + myBSplineCurve->IsPeriodic(), + aCont, + myFirst, + myLast, + anEps, + nullptr); } + else if (myTypeCurve == GeomAbs_OffsetCurve){ + Standard_Integer myNbIntervals = 1; GeomAbs_Shape BaseS=GeomAbs_C0; switch(S){ case GeomAbs_G1: @@ -705,366 +356,69 @@ Standard_Integer Geom2dAdaptor_Curve::NbIntervals(const GeomAbs_Shape S) const case GeomAbs_C2: BaseS = GeomAbs_C3; break; default: BaseS = GeomAbs_CN; } - Geom2dAdaptor_Curve anAdaptor( Handle(Geom2d_OffsetCurve)::DownCast(myCurve)->BasisCurve() ); + Geom2dAdaptor_Curve anAdaptor (Handle(Geom2d_OffsetCurve)::DownCast(myCurve)->BasisCurve(), myFirst, myLast); myNbIntervals = anAdaptor.NbIntervals(BaseS); + return myNbIntervals; } - return myNbIntervals; -} - -//======================================================================= -//function : WriteIntervals -//purpose : -//======================================================================= - -void WriteIntervals(const TColStd_Array1OfReal &theTK, - const TColStd_Array1OfInteger &theInter, - const Standard_Integer theNbInt, - const Standard_Integer theIndex1, - const Standard_Integer theIndex2, - const Standard_Real theCurPeriod, - const Standard_Boolean theFlagForFirst, - TColStd_Array1OfReal &theT, - TColStd_Array1OfInteger &theFinalIntervals, - Standard_Integer &theNbIntervals, - Standard_Integer &theCurInt) -{ - if (theFlagForFirst) - { - for (Standard_Integer anId = 1; anId <= theNbInt; anId++) - { - if (theInter(anId) > theIndex1 && theInter(anId) <= theIndex2) - { - theNbIntervals++; - theFinalIntervals(theNbIntervals) = theInter(anId); - } - } - } else { - for (Standard_Integer anId = 1; anId <= theNbInt; anId++) - { - if (theInter(anId) > theIndex1 && theInter(anId) < theIndex2) - { - theNbIntervals++; - theFinalIntervals(theNbIntervals) = theInter(anId); - } - } - } - - theFinalIntervals(theNbIntervals + 1) = theIndex2; - - for (Standard_Integer anId = theCurInt; anId <= theNbIntervals + 1; anId++) - { - theT(anId) = theTK(theFinalIntervals(anId)) + theCurPeriod; - theCurInt++; + return 1; } } //======================================================================= -//function : SpreadInt -//purpose : +//function : Intervals +//purpose : //======================================================================= -void SpreadInt(const TColStd_Array1OfReal &theTK, - const TColStd_Array1OfInteger &theTM, - const TColStd_Array1OfInteger &theInter, - const Standard_Integer theCurDegree, - const Standard_Integer theNb, - const Standard_Integer theFPer, - const Standard_Integer theLPer, - const Standard_Integer theNbInt, - const Standard_Real theLower, - const Standard_Real theFirst, - const Standard_Real theLast, - const Standard_Real thePeriod, - const Standard_Real theLastParam, - const Standard_Real theEps, - TColStd_Array1OfReal &theT, - Standard_Integer &theNbIntervals) -{ - Standard_Integer anIndex1 = 0; - Standard_Integer anIndex2 = 0; - Standard_Real aNewFirst, aNewLast; - Standard_Integer anUpper; - BSplCLib::LocateParameter(theCurDegree, theTK, theTM, theFirst, - Standard_True, 1, theNb, anIndex1, aNewFirst); - BSplCLib::LocateParameter(theCurDegree, theTK, theTM, theLastParam, - Standard_True, 1, theNb, anIndex2, aNewLast); - - if (Abs(aNewFirst - theTK(anIndex1 + 1)) < theEps) - { - anIndex1++; - } - if ((aNewLast - theTK(anIndex2)) > theEps) - { - anIndex2++; - } - theNbIntervals = 1; - - if (anIndex1 == theNb) - { - anIndex1 = 1; - } - - // Count the max number of boundaries of intervals - if (Abs(theLPer - theFPer) > 1) - { - anUpper = theNb - anIndex1 + anIndex2 + (theLPer - theFPer - 1) * theNb + 1; - } - else - { - anUpper = theNb - anIndex1 + anIndex2 + 1; - } - - if (theLPer == theFPer) - { - anUpper = theInter.Upper(); - } - TColStd_Array1OfInteger aFinalIntervals(1, anUpper); - aFinalIntervals(1) = anIndex1; - - // If first and last are in the same period - if ((Abs(theLPer - theFPer) == 0)) - { - Standard_Integer aCurInt = 1; - Standard_Real aCurPeriod = theFPer * thePeriod; - - if (theFirst == aNewFirst && theLast == aNewLast) - { - aCurPeriod = 0; - } - WriteIntervals(theTK, theInter, theNbInt, anIndex1, - anIndex2, aCurPeriod, Standard_False, theT, aFinalIntervals, theNbIntervals, aCurInt); - return; - } - // If the first and the last are in neighboring periods - if (Abs(theLPer - theFPer) == 1) +void Geom2dAdaptor_Curve::Intervals (TColStd_Array1OfReal& T, const GeomAbs_Shape S) const +{ + if (myTypeCurve == GeomAbs_BSplineCurve) { - Standard_Integer aCurInt = 1; - - if (Abs(theLastParam - theLower) < theEps) - { - WriteIntervals(theTK, theInter, theNbInt, anIndex1, - theNb, theFPer * thePeriod, Standard_True, theT, aFinalIntervals, theNbIntervals, aCurInt); - return; - } - else + if ((!myBSplineCurve->IsPeriodic() && S <= Continuity()) || S == GeomAbs_C0) { - // For period with first - WriteIntervals(theTK, theInter, theNbInt, anIndex1, - theNb, theFPer * thePeriod, Standard_True, theT, aFinalIntervals, theNbIntervals, aCurInt); - // For period with last - theNbIntervals++; - WriteIntervals(theTK, theInter, theNbInt, 1, - anIndex2, theLPer * thePeriod, Standard_False, theT, aFinalIntervals, theNbIntervals, aCurInt); + T( T.Lower() ) = myFirst; + T( T.Lower() + 1 ) = myLast; return; } - } - // If the first and the last are far apart - if (Abs(theLPer - theFPer) > 1) - { - Standard_Integer aCurInt = 1; - if (Abs(theLastParam - theLower) < theEps) - { - WriteIntervals(theTK, theInter, theNbInt, anIndex1, - theNb, theFPer * thePeriod, Standard_True, theT, aFinalIntervals, theNbIntervals, aCurInt); - - Standard_Integer aNbPer = Abs(theLPer - theFPer); - Standard_Integer aCurPer = theFPer + 1; - while (aNbPer > 1) - { - theNbIntervals++; - WriteIntervals(theTK, theInter, theNbInt, 1, - theNb, aCurPer * thePeriod, Standard_True, theT, aFinalIntervals, theNbIntervals, aCurInt); + Standard_Integer aDegree = myBSplineCurve->Degree(); + Standard_Integer aCont; - aNbPer--; - aCurPer++; - } - return; - } - else + switch (S) { - // For period with first - WriteIntervals(theTK, theInter, theNbInt, anIndex1, - theNb, theFPer * thePeriod, Standard_True, theT, aFinalIntervals, theNbIntervals, aCurInt); - - Standard_Integer aNbPer = Abs(theLPer - theFPer); - Standard_Integer aCurPer = theFPer + 1; - while (aNbPer > 1) - { - theNbIntervals++; - WriteIntervals(theTK, theInter, theNbInt, 1, - theNb, aCurPer * thePeriod, Standard_True, theT, aFinalIntervals, theNbIntervals, aCurInt); - - aNbPer--; - aCurPer++; - } - // For period with last - theNbIntervals++; - WriteIntervals(theTK, theInter, theNbInt, 1, - anIndex2, theLPer * thePeriod, Standard_False, theT, aFinalIntervals, theNbIntervals, aCurInt); - return; - } - } -} - -//======================================================================= -//function : Intervals -//purpose : -//======================================================================= - -void Geom2dAdaptor_Curve::Intervals(TColStd_Array1OfReal& T, - const GeomAbs_Shape S ) const -{ - Standard_Integer myNbIntervals = 1; - Standard_Integer NbSplit; - if (myTypeCurve == GeomAbs_BSplineCurve) { - Standard_Integer FirstIndex = myBSplineCurve->FirstUKnotIndex(); - Standard_Integer LastIndex = myBSplineCurve->LastUKnotIndex(); - TColStd_Array1OfInteger Inter (1, LastIndex-FirstIndex+1); - Standard_Boolean aContPer = (S >= Continuity()) && myBSplineCurve->IsPeriodic(); - Standard_Boolean aContNotPer = (S > Continuity()) && !myBSplineCurve->IsPeriodic(); - if (aContPer || aContNotPer) { - Standard_Integer Cont; - switch ( S) { - case GeomAbs_G1: - case GeomAbs_G2: - throw Standard_DomainError("Geom2dAdaptor_Curve::NbIntervals"); - break; - case GeomAbs_C0: - myNbIntervals = 1; - break; case GeomAbs_C1: + aCont = 1; + break; case GeomAbs_C2: - case GeomAbs_C3: - case GeomAbs_CN: - { - if (S == GeomAbs_C1) Cont = 1; - else if (S == GeomAbs_C2) Cont = 2; - else if (S == GeomAbs_C3) Cont = 3; - else Cont = myBSplineCurve->Degree(); - Standard_Integer Degree = myBSplineCurve->Degree(); - Standard_Integer NbKnots = myBSplineCurve->NbKnots(); - TColStd_Array1OfInteger Mults(1, NbKnots); - myBSplineCurve->Multiplicities(Mults); - NbSplit = 1; - Standard_Integer Index = FirstIndex; - Inter(NbSplit) = Index; - Index++; - NbSplit++; - while (Index < LastIndex) - { - if (Degree - Mults(Index) < Cont) - { - Inter(NbSplit) = Index; - NbSplit++; - } - Index++; - } - Inter(NbSplit) = Index; - Standard_Integer NbInt = NbSplit - 1; - - Standard_Integer Nb = myBSplineCurve->NbKnots(); - Standard_Integer Index1 = 0; - Standard_Integer Index2 = 0; - Standard_Real newFirst, newLast; - TColStd_Array1OfReal TK(1, Nb); - TColStd_Array1OfInteger TM(1, Nb); - myBSplineCurve->Knots(TK); - myBSplineCurve->Multiplicities(TM); - Standard_Real Eps = Min(Resolution(Precision::Confusion()), - Precision::PConfusion()); - - if (!myBSplineCurve->IsPeriodic()) - { - BSplCLib::LocateParameter(myBSplineCurve->Degree(), TK, TM, myFirst, - myBSplineCurve->IsPeriodic(), - 1, Nb, Index1, newFirst); - BSplCLib::LocateParameter(myBSplineCurve->Degree(), TK, TM, myLast, - myBSplineCurve->IsPeriodic(), - 1, Nb, Index2, newLast); - - - // On decale eventuellement les indices - // On utilise une "petite" tolerance, la resolution ne doit - // servir que pour les tres longue courbes....(PRO9248) - if (Abs(newFirst - TK(Index1 + 1)) < Eps) Index1++; - if (newLast - TK(Index2) > Eps) Index2++; - - Inter(1) = Index1; - myNbIntervals = 1; - for (Standard_Integer i = 1; i <= NbInt; i++) { - if (Inter(i) > Index1 && Inter(i) < Index2) { - myNbIntervals++; - Inter(myNbIntervals) = Inter(i); - } - } - Inter(myNbIntervals + 1) = Index2; - - Standard_Integer ii = T.Lower() - 1; - for (Standard_Integer I = 1; I <= myNbIntervals + 1; I++) { - T(ii + I) = TK(Inter(I)); - } - } - else - { - Standard_Real aFirst = myFirst; - Standard_Real aLast = myLast; - - Standard_Real aCurFirst = aFirst; - Standard_Real aCurLast = aLast; - - Standard_Real aPeriod = myBSplineCurve->Period(); - Standard_Real aLower = myBSplineCurve->FirstParameter(); - Standard_Real anUpper = myBSplineCurve->LastParameter(); - - Standard_Integer aLPer = 0; Standard_Integer aFPer = 0; - - if (Abs(myFirst - aLower) <= Eps) - { - aCurFirst = aLower; - aFirst = aCurFirst; - } - if (Abs(myLast - anUpper) <= Eps) - { - aCurLast = anUpper; - aLast = aCurLast; - } - - if ((Abs(aLower - myFirst) < Eps) && (aCurFirst < aLower)) - { - aCurFirst = aLower; - } - else - { - DefinFPeriod(aLower, anUpper, - Eps, aPeriod, aCurFirst, aFPer); - } - DefinLPeriod(aLower, anUpper, - Eps, aPeriod, aCurLast, aLPer); - - if (myFirst == aLower) - { - aFPer = 0; - } - - SpreadInt(TK, TM, Inter, myBSplineCurve->Degree(), Nb, aFPer, aLPer, NbInt, aLower, myFirst, myLast, aPeriod, - aCurLast, Eps, T, myNbIntervals); - T(T.Lower()) = aFirst; - T(T.Lower() + myNbIntervals) = aLast; - return; - - } - } - T(T.Lower()) = myFirst; - T(T.Lower() + myNbIntervals) = myLast; - return; - } + aCont = 2; + break; + case GeomAbs_C3: + aCont = 3; + break; + case GeomAbs_CN: + aCont = aDegree; + break; + default: + throw Standard_DomainError ("Geom2dAdaptor_Curve::Intervals()"); } + + Standard_Real anEps = Min(Resolution(Precision::Confusion()), Precision::PConfusion()); + + BSplCLib::Intervals(myBSplineCurve->Knots(), + myBSplineCurve->Multiplicities(), + aDegree, + myBSplineCurve->IsPeriodic(), + aCont, + myFirst, + myLast, + anEps, + &T); } + else if (myTypeCurve == GeomAbs_OffsetCurve){ + Standard_Integer myNbIntervals = 1; GeomAbs_Shape BaseS=GeomAbs_C0; switch(S){ case GeomAbs_G1: @@ -1077,13 +431,18 @@ void Geom2dAdaptor_Curve::Intervals(TColStd_Array1OfReal& T, default: BaseS = GeomAbs_CN; } - Geom2dAdaptor_Curve anAdaptor( Handle(Geom2d_OffsetCurve)::DownCast(myCurve)->BasisCurve() ); + Geom2dAdaptor_Curve anAdaptor (Handle(Geom2d_OffsetCurve)::DownCast(myCurve)->BasisCurve(), myFirst, myLast); myNbIntervals = anAdaptor.NbIntervals(BaseS); anAdaptor.Intervals(T, BaseS); + T( T.Lower() ) = myFirst; + T( T.Lower() + myNbIntervals ) = myLast; } - T( T.Lower() ) = myFirst; - T( T.Lower() + myNbIntervals ) = myLast; + else + { + T( T.Lower() ) = myFirst; + T( T.Lower() + 1 ) = myLast; + } } //======================================================================= diff --git a/src/GeomAdaptor/GeomAdaptor_Curve.cxx b/src/GeomAdaptor/GeomAdaptor_Curve.cxx index 24aacacb77..a68075eeb0 100644 --- a/src/GeomAdaptor/GeomAdaptor_Curve.cxx +++ b/src/GeomAdaptor/GeomAdaptor_Curve.cxx @@ -58,65 +58,6 @@ static const Standard_Real PosTol = Precision::PConfusion() / 2; IMPLEMENT_STANDARD_RTTIEXT(GeomAdaptor_Curve, Adaptor3d_Curve) -static void DefinFPeriod(const Standard_Real theLower, - const Standard_Real theUpper, - const Standard_Real theEps, - const Standard_Real thePeriod, - Standard_Real &theCurFirst, - Standard_Integer &theFPer); - -static void DefinLPeriod(const Standard_Real theLower, - const Standard_Real theUpper, - const Standard_Real theEps, - const Standard_Real thePeriod, - Standard_Real &theCurLast, - Standard_Integer &theLPer); - -static Standard_Integer LocalNbIntervals(const TColStd_Array1OfReal& theTK, - const TColStd_Array1OfInteger& theTM, - const TColStd_Array1OfInteger& theInter, - const Standard_Integer theCurDegree, - const Standard_Integer theNb, - const Standard_Integer theNbInt, - const Standard_Real theFirst, - const Standard_Real theLast, - const Standard_Real theEps, - const Standard_Boolean thePeriodicCur, - Standard_Integer theNbIntervals, - Standard_Real theLower = 0, - Standard_Real thePeriod = 0, - Standard_Integer theIndex1 = 0, - Standard_Integer theIndex2 = 0); - -static void WriteIntervals(const TColStd_Array1OfReal &theTK, - const TColStd_Array1OfInteger &theInter, - const Standard_Integer theNbInt, - const Standard_Integer theIndex1, - const Standard_Integer theIndex2, - const Standard_Real theCurPeriod, - const Standard_Boolean theFlagForFirst, - TColStd_Array1OfReal &theT, - TColStd_Array1OfInteger &theFinalIntervals, - Standard_Integer &theNbIntervals, - Standard_Integer &theCurInt); - -static void SpreadInt(const TColStd_Array1OfReal &theTK, - const TColStd_Array1OfInteger &theTM, - const TColStd_Array1OfInteger &theInter, - const Standard_Integer theCurDegree, - const Standard_Integer theNb, - const Standard_Integer theFPer, - const Standard_Integer theLPer, - const Standard_Integer theNbInt, - const Standard_Real theLower, - const Standard_Real theFirst, - const Standard_Real theLast, - const Standard_Real thePeriod, - const Standard_Real theLastParam, - const Standard_Real theEps, - TColStd_Array1OfReal &theT, - Standard_Integer &theNbIntervals); - //======================================================================= //function : ShallowCopy //purpose : @@ -311,366 +252,67 @@ GeomAbs_Shape GeomAdaptor_Curve::Continuity() const } //======================================================================= -//function : DefinFPeriod -//purpose : +//function : NbIntervals +//purpose : //======================================================================= -void DefinFPeriod(const Standard_Real theLower, - const Standard_Real theUpper, - const Standard_Real theEps, - const Standard_Real thePeriod, - Standard_Real &theCurFirst, - Standard_Integer &theFPer) +Standard_Integer GeomAdaptor_Curve::NbIntervals(const GeomAbs_Shape S) const { - if (theCurFirst >= theLower) - { - while (theCurFirst >= theUpper) - { - theCurFirst = theCurFirst - thePeriod; - theFPer++; - } - if (Abs(theUpper - theCurFirst) <= theEps) - { - theFPer++; - theCurFirst = theLower; - } - } - else + if (myTypeCurve == GeomAbs_BSplineCurve) { - while (theCurFirst < theLower) + if ((!myBSplineCurve->IsPeriodic() && S <= Continuity()) || S == GeomAbs_C0) { - theCurFirst = theCurFirst + thePeriod; - if ((Abs(theLower - theCurFirst)) > theEps) - { - theFPer--; - } + return 1; } - if (Abs(theUpper - theCurFirst) <= theEps) - { - theCurFirst = theLower; - } - } -} + Standard_Integer aDegree = myBSplineCurve->Degree(); + Standard_Integer aCont; -//======================================================================= -//function : DefinLPeriod -//purpose : -//======================================================================= - -void DefinLPeriod(const Standard_Real theLower, - const Standard_Real theUpper, - const Standard_Real theEps, - const Standard_Real thePeriod, - Standard_Real &theCurLast, - Standard_Integer &theLPer) -{ - if (theCurLast >= theLower) - { - if ((theCurLast >= theUpper) && (Abs(theCurLast - theUpper) <= theEps)) - { - theCurLast = theUpper; - } - else - { - while (theCurLast >= theUpper) - { - theCurLast = theCurLast - thePeriod; - theLPer++; - } - if (Abs(theUpper - theCurLast) <= theEps) - { - theCurLast = theLower; - } - } - } - else - { - while (theCurLast < theLower) - { - theCurLast = theCurLast + thePeriod; - if (Abs(theLower - theCurLast) > theEps) - { - theLPer--; - } - } - if ((theUpper - theCurLast) <= theEps) + switch (S) { - theCurLast = theLower; - } - } -} - -//======================================================================= -//function : LocalNbIntervals -//purpose : -//======================================================================= - -Standard_Integer LocalNbIntervals(const TColStd_Array1OfReal& theTK, - const TColStd_Array1OfInteger& theTM, - const TColStd_Array1OfInteger& theInter, - const Standard_Integer theCurDegree, - const Standard_Integer theNb, - const Standard_Integer theNbInt, - const Standard_Real theFirst, - const Standard_Real theLast, - const Standard_Real theEps, - const Standard_Boolean thePeriodicCur, - Standard_Integer theNbIntervals, - Standard_Real theLower, - Standard_Real thePeriod, - Standard_Integer theIndex1, - Standard_Integer theIndex2) -{ - Standard_Real aNewFirst = theFirst; - Standard_Real aNewLast = theLast; - if (theIndex1 == 0) - { - BSplCLib::LocateParameter(theCurDegree, theTK, theTM, theFirst, - thePeriodicCur, 1, theNb, theIndex1, aNewFirst); - } - if (theIndex2 == 0) - { - BSplCLib::LocateParameter(theCurDegree, theTK, theTM, theLast, - thePeriodicCur, 1, theNb, theIndex2, aNewLast); - } - // Protection against theFirst = UFirst - eps, which located as ULast - eps - if (thePeriodicCur && ((aNewLast - aNewFirst) < Precision::PConfusion())) - { - if (Abs(aNewLast - theLower) < Precision::PConfusion()) - { - aNewLast += thePeriod; - } - else - { - aNewFirst -= thePeriod; - } - } - - if (Abs(aNewFirst - theTK(theIndex1 + 1)) < theEps) - { - theIndex1++; - } - if ((aNewLast - theTK(theIndex2)) > theEps) - { - theIndex2++; - } - for (Standard_Integer i = 1; i <= theNbInt; i++) - { - if (theInter(i) > theIndex1 && theInter(i) < theIndex2) theNbIntervals++; - } - return theNbIntervals; -} - - -//======================================================================= -//function : NbIntervals -//purpose : -//======================================================================= - -Standard_Integer GeomAdaptor_Curve::NbIntervals(const GeomAbs_Shape S) const -{ - Standard_Integer myNbIntervals = 1; - Standard_Integer NbSplit; - if (myTypeCurve == GeomAbs_BSplineCurve) { - Standard_Integer FirstIndex = myBSplineCurve->FirstUKnotIndex(); - Standard_Integer LastIndex = myBSplineCurve->LastUKnotIndex(); - TColStd_Array1OfInteger Inter(1, LastIndex - FirstIndex + 1); - Standard_Boolean aContPer = (S >= Continuity()) && myBSplineCurve->IsPeriodic(); - Standard_Boolean aContNotPer = (S > Continuity()) && !myBSplineCurve->IsPeriodic(); - - if(aContPer || aContNotPer) { - Standard_Integer Cont; - switch (S) { - case GeomAbs_G1: - case GeomAbs_G2: - throw Standard_DomainError("GeomAdaptor_Curve::NbIntervals"); - break; - case GeomAbs_C0: - myNbIntervals = 1; - break; case GeomAbs_C1: + aCont = 1; + break; case GeomAbs_C2: + aCont = 2; + break; case GeomAbs_C3: + aCont = 3; + break; case GeomAbs_CN: - { - if (S == GeomAbs_C1) Cont = 1; - else if (S == GeomAbs_C2) Cont = 2; - else if (S == GeomAbs_C3) Cont = 3; - else Cont = myBSplineCurve->Degree(); - Standard_Integer Degree = myBSplineCurve->Degree(); - Standard_Integer NbKnots = myBSplineCurve->NbKnots(); - TColStd_Array1OfInteger Mults(1, NbKnots); - myBSplineCurve->Multiplicities(Mults); - NbSplit = 1; - Standard_Integer Index = FirstIndex; - Inter(NbSplit) = Index; - Index++; - NbSplit++; - while (Index < LastIndex) - { - if (Degree - Mults(Index) < Cont) - { - Inter(NbSplit) = Index; - NbSplit++; - } - Index++; - } - Inter(NbSplit) = Index; - - Standard_Integer NbInt = NbSplit - 1; - - Standard_Integer Nb = myBSplineCurve->NbKnots(); - Standard_Integer Index1 = 0; - Standard_Integer Index2 = 0; - const TColStd_Array1OfReal& TK = myBSplineCurve->Knots(); - const TColStd_Array1OfInteger& TM = myBSplineCurve->Multiplicities(); - Standard_Real Eps = Min(Resolution(Precision::Confusion()), - Precision::PConfusion()); - - myNbIntervals = 1; - - if (!myBSplineCurve->IsPeriodic()) - { - myNbIntervals = LocalNbIntervals(TK, TM, Inter, Degree, Nb, NbInt, - myFirst, myLast, Eps, Standard_False, myNbIntervals); - } - else - { - Standard_Real aCurFirst = myFirst; - Standard_Real aCurLast = myLast; - Standard_Real aLower = myBSplineCurve->FirstParameter(); - Standard_Real anUpper = myBSplineCurve->LastParameter(); - - if ((Abs(aCurFirst - aLower) < Eps) && (aCurFirst < aLower)) - { - aCurFirst = aLower; - } - if ((Abs(aCurLast - anUpper) < Eps) && (aCurLast < anUpper)) - { - aCurLast = anUpper; - } - - Standard_Real aPeriod = myBSplineCurve->Period(); - Standard_Integer aLPer = 1; Standard_Integer aFPer = 1; - if ((Abs(aLower - myFirst) < Eps) && (aCurFirst < aLower)) - { - aCurFirst = aLower; - } - else - { - DefinFPeriod(aLower, anUpper, - Eps, aPeriod, aCurFirst, aFPer); - } - DefinLPeriod(aLower, anUpper, - Eps, aPeriod, aCurLast, aLPer); - - Standard_Real aNewFirst; - Standard_Real aNewLast; - BSplCLib::LocateParameter(myBSplineCurve->Degree(), TK, TM, myFirst, - Standard_True, 1, Nb, Index1, aNewFirst); - BSplCLib::LocateParameter(myBSplineCurve->Degree(), TK, TM, myLast, - Standard_True, 1, Nb, Index2, aNewLast); - if ((aNewFirst == myFirst && aNewLast == myLast) && (aFPer != aLPer)) - { - myNbIntervals = LocalNbIntervals(TK, TM, Inter, Degree, Nb, NbInt, - myFirst, myLast, Eps, Standard_True, myNbIntervals, aLower, aPeriod); - } - else - { - Standard_Integer aSumPer = Abs(aLPer - aFPer); - - Standard_Real aFirst = 0; - if (aLower < 0 && anUpper == 0) - { - if (Abs(aCurLast) < Eps) - { - aCurLast = 0; - } - aFirst = aLower; - } - - if (aSumPer <= 1) - { - if ((Abs(myFirst - TK(Nb) - aPeriod * (aFPer - 1)) <= Eps) && (myLast < (TK(Nb) + aPeriod * (aLPer - 1)))) - { - myNbIntervals = LocalNbIntervals(TK, TM, Inter, Degree, Nb, NbInt, - myFirst, myLast, Eps, Standard_True, myNbIntervals, aLower, aPeriod); - return myNbIntervals; - } - if ((Abs(myFirst - aLower) < Eps) && (Abs(myLast - anUpper) < Eps)) - { - myNbIntervals = LocalNbIntervals(TK, TM, Inter, Degree, Nb, NbInt, - myFirst, myLast, Eps, Standard_True, myNbIntervals, aLower, aPeriod); - return myNbIntervals; - } - } - - if (aSumPer != 0) - { - Standard_Integer aFInt = 0; - Standard_Integer aLInt = 0; - Standard_Integer aPInt = NbInt; - - if ((aCurFirst != aPeriod) || ((aCurFirst != anUpper) && (Abs(myFirst) < Eps))) - { - aFInt = 1; - } - if ((aCurLast != aLower) && (aCurLast != anUpper)) - { - aLInt = 1; - } - - aFInt = LocalNbIntervals(TK, TM, Inter, Degree, Nb, NbInt, - aCurFirst, anUpper, Eps, Standard_True, aFInt, aLower, aPeriod); - - if (aCurLast == anUpper) - { - aLInt = NbInt; - } - else - { - if (Abs(aCurLast - aFirst) > Eps) - { - aLInt = LocalNbIntervals(TK, TM, Inter, Degree, Nb, NbInt, - aFirst, aCurLast, Eps, Standard_True, aLInt, aLower, aPeriod, 1); - } - else - { - aLInt = LocalNbIntervals(TK, TM, Inter, Degree, Nb, NbInt, - aFirst, aCurLast, Eps, Standard_True, aLInt, aLower, aPeriod); - } - } - - myNbIntervals = aFInt + aLInt + aPInt * (aSumPer - 1); - } - else - { - myNbIntervals = LocalNbIntervals(TK, TM, Inter, Degree, Nb, NbInt, - aCurFirst, aCurLast, Eps, Standard_True, myNbIntervals, aLower, aPeriod); - } - } - } - } - break; - } + aCont = aDegree; + break; + default: + throw Standard_DomainError ("GeomAdaptor_Curve::NbIntervals()"); } + + Standard_Real anEps = Min(Resolution(Precision::Confusion()), Precision::PConfusion()); + + return BSplCLib::Intervals(myBSplineCurve->Knots(), + myBSplineCurve->Multiplicities(), + aDegree, + myBSplineCurve->IsPeriodic(), + aCont, + myFirst, + myLast, + anEps, + nullptr); } else if (myTypeCurve == GeomAbs_OffsetCurve) { + Standard_Integer myNbIntervals = 1; GeomAbs_Shape BaseS=GeomAbs_C0; switch(S){ - case GeomAbs_G1: - case GeomAbs_G2: - throw Standard_DomainError("GeomAdaptor_Curve::NbIntervals"); - break; - case GeomAbs_C0: BaseS = GeomAbs_C1; break; - case GeomAbs_C1: BaseS = GeomAbs_C2; break; - case GeomAbs_C2: BaseS = GeomAbs_C3; break; - default: BaseS = GeomAbs_CN; - } - GeomAdaptor_Curve C - (Handle(Geom_OffsetCurve)::DownCast (myCurve)->BasisCurve()); + case GeomAbs_G1: + case GeomAbs_G2: + throw Standard_DomainError("GeomAdaptor_Curve::NbIntervals"); + break; + case GeomAbs_C0: BaseS = GeomAbs_C1; break; + case GeomAbs_C1: BaseS = GeomAbs_C2; break; + case GeomAbs_C2: BaseS = GeomAbs_C3; break; + default: BaseS = GeomAbs_CN; + } + GeomAdaptor_Curve C (Handle(Geom_OffsetCurve)::DownCast (myCurve)->BasisCurve(), myFirst, myLast); // akm 05/04/02 (OCC278) If our curve is trimmed we must recalculate // the number of intervals obtained from the basis to // vvv reflect parameter bounds @@ -680,388 +322,71 @@ Standard_Integer GeomAdaptor_Curve::NbIntervals(const GeomAbs_Shape S) const TColStd_Array1OfReal rdfInter(1,1+iNbBasisInt); C.Intervals(rdfInter,BaseS); for (iInt=1; iInt<=iNbBasisInt; iInt++) - if (rdfInter(iInt)>myFirst && rdfInter(iInt)myFirst && rdfInter(iInt) theIndex1 && theInter(anId) <= theIndex2) - { - theNbIntervals++; - theFinalIntervals(theNbIntervals) = theInter(anId); - } - } - } else { - for (Standard_Integer anId = 1; anId <= theNbInt; anId++) - { - if (theInter(anId) > theIndex1 && theInter(anId) < theIndex2) - { - theNbIntervals++; - theFinalIntervals(theNbIntervals) = theInter(anId); - } - } - } - - theFinalIntervals(theNbIntervals + 1) = theIndex2; - - for (Standard_Integer anId = theCurInt; anId <= theNbIntervals + 1; anId++) - { - theT(anId) = theTK(theFinalIntervals(anId)) + theCurPeriod; - theCurInt++; + return 1; } } //======================================================================= -//function : SpreadInt -//purpose : +//function : Intervals +//purpose : //======================================================================= -void SpreadInt(const TColStd_Array1OfReal &theTK, - const TColStd_Array1OfInteger &theTM, - const TColStd_Array1OfInteger &theInter, - const Standard_Integer theCurDegree, - const Standard_Integer theNb, - const Standard_Integer theFPer, - const Standard_Integer theLPer, - const Standard_Integer theNbInt, - const Standard_Real theLower, - const Standard_Real theFirst, - const Standard_Real theLast, - const Standard_Real thePeriod, - const Standard_Real theLastParam, - const Standard_Real theEps, - TColStd_Array1OfReal &theT, - Standard_Integer &theNbIntervals) +void GeomAdaptor_Curve::Intervals (TColStd_Array1OfReal& T, const GeomAbs_Shape S) const { - Standard_Integer anIndex1 = 0; - Standard_Integer anIndex2 = 0; - Standard_Real aNewFirst, aNewLast; - Standard_Integer anUpper; - BSplCLib::LocateParameter(theCurDegree, theTK, theTM, theFirst, - Standard_True, 1, theNb, anIndex1, aNewFirst); - BSplCLib::LocateParameter(theCurDegree, theTK, theTM, theLastParam, - Standard_True, 1, theNb, anIndex2, aNewLast); - - if (Abs(aNewFirst - theTK(anIndex1 + 1)) < theEps) - { - anIndex1++; - } - if ((aNewLast - theTK(anIndex2)) > theEps) - { - anIndex2++; - } - theNbIntervals = 1; - - if (anIndex1 == theNb) - { - anIndex1 = 1; - } - - // Count the max number of boundaries of intervals - if (Abs(theLPer - theFPer) > 1) - { - anUpper = theNb - anIndex1 + anIndex2 + (theLPer - theFPer - 1) * theNb + 1; - } - else - { - anUpper = theNb - anIndex1 + anIndex2 + 1; - } - - if (theLPer == theFPer) - { - anUpper = theInter.Upper(); - } - TColStd_Array1OfInteger aFinalIntervals(1, anUpper); - aFinalIntervals(1) = anIndex1; - - // If first and last are in the same period - if ((Abs(theLPer - theFPer) == 0)) - { - Standard_Integer aCurInt = 1; - Standard_Real aCurPeriod = theFPer * thePeriod; - - if (theFirst == aNewFirst && theLast == aNewLast) - { - aCurPeriod = 0; - } - WriteIntervals(theTK, theInter, theNbInt, anIndex1, - anIndex2, aCurPeriod, Standard_False, theT, aFinalIntervals, theNbIntervals, aCurInt); - return; - } - - // If the first and the last are in neighboring periods - if (Abs(theLPer - theFPer) == 1) + if (myTypeCurve == GeomAbs_BSplineCurve) { - Standard_Integer aCurInt = 1; - - if (Abs(theLastParam - theLower) < theEps) + if ((!myBSplineCurve->IsPeriodic() && S <= Continuity()) || S == GeomAbs_C0) { - WriteIntervals(theTK, theInter, theNbInt, anIndex1, - theNb, theFPer * thePeriod, Standard_True, theT, aFinalIntervals, theNbIntervals, aCurInt); + T( T.Lower() ) = myFirst; + T( T.Lower() + 1 ) = myLast; return; } - else - { - // For period with first - WriteIntervals(theTK, theInter, theNbInt, anIndex1, - theNb, theFPer * thePeriod, Standard_True, theT, aFinalIntervals, theNbIntervals, aCurInt); - // For period with last - theNbIntervals++; - WriteIntervals(theTK, theInter, theNbInt, 1, - anIndex2, theLPer * thePeriod, Standard_False, theT, aFinalIntervals, theNbIntervals, aCurInt); - return; - } - } - // If the first and the last are far apart - if (Abs(theLPer - theFPer) > 1) - { - Standard_Integer aCurInt = 1; - if (Abs(theLastParam - theLower) < theEps) - { - WriteIntervals(theTK, theInter, theNbInt, anIndex1, - theNb, theFPer * thePeriod, Standard_True, theT, aFinalIntervals, theNbIntervals, aCurInt); - - Standard_Integer aNbPer = Abs(theLPer - theFPer); - Standard_Integer aCurPer = theFPer + 1; - - while (aNbPer > 1) - { - theNbIntervals++; - WriteIntervals(theTK, theInter, theNbInt, 1, - theNb, aCurPer * thePeriod, Standard_True, theT, aFinalIntervals, theNbIntervals, aCurInt); - - aNbPer--; - aCurPer++; - } - return; - } - else - { - // For period with first - WriteIntervals(theTK, theInter, theNbInt, anIndex1, - theNb, theFPer * thePeriod, Standard_True, theT, aFinalIntervals, theNbIntervals, aCurInt); - - Standard_Integer aNbPer = Abs(theLPer - theFPer); - Standard_Integer aCurPer = theFPer + 1; - while (aNbPer > 1) - { - theNbIntervals++; - WriteIntervals(theTK, theInter, theNbInt, 1, - theNb, aCurPer * thePeriod, Standard_True, theT, aFinalIntervals, theNbIntervals, aCurInt); - - aNbPer--; - aCurPer++; - } - // For period with last - theNbIntervals++; - WriteIntervals(theTK, theInter, theNbInt, 1, - anIndex2, theLPer * thePeriod, Standard_False, theT, aFinalIntervals, theNbIntervals, aCurInt); - return; - } - } -} + Standard_Integer aDegree = myBSplineCurve->Degree(); + Standard_Integer aCont; -//======================================================================= -//function : Intervals -//purpose : -//======================================================================= - -void GeomAdaptor_Curve::Intervals(TColStd_Array1OfReal& T, - const GeomAbs_Shape S ) const -{ - Standard_Integer myNbIntervals = 1; - Standard_Integer NbSplit; - Standard_Real FirstParam = myFirst, LastParam = myLast; - - if (myTypeCurve == GeomAbs_BSplineCurve) - { - Standard_Integer FirstIndex = myBSplineCurve->FirstUKnotIndex(); - Standard_Integer LastIndex = myBSplineCurve->LastUKnotIndex(); - TColStd_Array1OfInteger Inter(1, LastIndex - FirstIndex + 1); - Standard_Boolean aContPer = (S >= Continuity()) && myBSplineCurve->IsPeriodic(); - Standard_Boolean aContNotPer = (S > Continuity()) && !myBSplineCurve->IsPeriodic(); - - if (aContPer || aContNotPer) { - Standard_Integer Cont; - switch (S) { - case GeomAbs_G1: - case GeomAbs_G2: - throw Standard_DomainError("Geom2dAdaptor_Curve::NbIntervals"); - break; - case GeomAbs_C0: - myNbIntervals = 1; - break; + switch (S) + { case GeomAbs_C1: + aCont = 1; + break; case GeomAbs_C2: + aCont = 2; + break; case GeomAbs_C3: + aCont = 3; + break; case GeomAbs_CN: - { - if (S == GeomAbs_C1) Cont = 1; - else if (S == GeomAbs_C2) Cont = 2; - else if (S == GeomAbs_C3) Cont = 3; - else Cont = myBSplineCurve->Degree(); - Standard_Integer Degree = myBSplineCurve->Degree(); - Standard_Integer NbKnots = myBSplineCurve->NbKnots(); - TColStd_Array1OfInteger Mults(1, NbKnots); - myBSplineCurve->Multiplicities(Mults); - NbSplit = 1; - Standard_Integer Index = FirstIndex; - Inter(NbSplit) = Index; - Index++; - NbSplit++; - while (Index < LastIndex) - { - if (Degree - Mults(Index) < Cont) - { - Inter(NbSplit) = Index; - NbSplit++; - } - Index++; - } - Inter(NbSplit) = Index; - Standard_Integer NbInt = NbSplit - 1; - // GeomConvert_BSplineCurveKnotSplitting Convector(myBspl, Cont); - // Standard_Integer NbInt = Convector.NbSplits()-1; - // TColStd_Array1OfInteger Inter(1,NbInt+1); - // Convector.Splitting( Inter); - - Standard_Integer Nb = myBSplineCurve->NbKnots(); - Standard_Integer Index1 = 0; - Standard_Integer Index2 = 0; - Standard_Real newFirst, newLast; - const TColStd_Array1OfReal& TK = myBSplineCurve->Knots(); - const TColStd_Array1OfInteger& TM = myBSplineCurve->Multiplicities(); - Standard_Real Eps = Min(Resolution(Precision::Confusion()), - Precision::PConfusion()); - - if (!myBSplineCurve->IsPeriodic() || ((Abs(myFirst - myBSplineCurve->FirstParameter()) < Eps) && - (Abs(myLast - myBSplineCurve->LastParameter()) < Eps))) - { - BSplCLib::LocateParameter(myBSplineCurve->Degree(), TK, TM, myFirst, - myBSplineCurve->IsPeriodic(), - 1, Nb, Index1, newFirst); - BSplCLib::LocateParameter(myBSplineCurve->Degree(), TK, TM, myLast, - myBSplineCurve->IsPeriodic(), - 1, Nb, Index2, newLast); - FirstParam = newFirst; - LastParam = newLast; - // Protection against myFirst = UFirst - eps, which located as ULast - eps - if (myBSplineCurve->IsPeriodic() && (LastParam - FirstParam) < Precision::PConfusion()) - { - if (Abs(LastParam - myBSplineCurve->FirstParameter()) < Precision::PConfusion()) - LastParam += myBSplineCurve->Period(); - else - FirstParam -= myBSplineCurve->Period(); - } - // On decale eventuellement les indices - // On utilise une "petite" tolerance, la resolution ne doit - // servir que pour les tres longue courbes....(PRO9248) - - if (Abs(FirstParam - TK(Index1 + 1)) < Eps) Index1++; - if (LastParam - TK(Index2) > Eps) Index2++; - - myNbIntervals = 1; - - TColStd_Array1OfInteger aFinalIntervals(1, Inter.Upper()); - aFinalIntervals(1) = Index1; - for (Standard_Integer i = 1; i <= NbInt; i++) { - if (Inter(i) > Index1 && Inter(i) < Index2) { - myNbIntervals++; - aFinalIntervals(myNbIntervals) = Inter(i); - } - } - aFinalIntervals(myNbIntervals + 1) = Index2; - - for (Standard_Integer I = 1; I <= myNbIntervals + 1; I++) { - T(I) = TK(aFinalIntervals(I)); - } - } - else - { - Standard_Real aFirst = myFirst; - Standard_Real aLast = myLast; - - Standard_Real aCurFirst = aFirst; - Standard_Real aCurLast = aLast; - - Standard_Real aPeriod = myBSplineCurve->Period(); - Standard_Real aLower = myBSplineCurve->FirstParameter(); - Standard_Real anUpper = myBSplineCurve->LastParameter(); - - Standard_Integer aLPer = 0; Standard_Integer aFPer = 0; - - if (Abs(myFirst - aLower) <= Eps) - { - aCurFirst = aLower; - aFirst = aCurFirst; - } - - if (Abs(myLast - anUpper) <= Eps) - { - aCurLast = anUpper; - aLast = aCurLast; - } - - if ((Abs(aLower - myFirst) < Eps) && (aCurFirst < aLower)) - { - aCurFirst = aLower; - } - else - { - DefinFPeriod(aLower, anUpper, - Eps, aPeriod, aCurFirst, aFPer); - } - DefinLPeriod(aLower, anUpper, - Eps, aPeriod, aCurLast, aLPer); - - if (myFirst == aLower) - { - aFPer = 0; - } - - SpreadInt(TK, TM, Inter, myBSplineCurve->Degree(), Nb, aFPer, aLPer, NbInt, aLower, myFirst, myLast, aPeriod, - aCurLast, Eps, T, myNbIntervals); - - T(T.Lower()) = aFirst; - T(T.Lower() + myNbIntervals) = aLast; - return; - } - } - T(T.Lower()) = myFirst; - T(T.Lower() + myNbIntervals) = myLast; - return; - } + aCont = aDegree; + break; + default: + throw Standard_DomainError ("GeomAdaptor_Curve::Intervals()"); } + + Standard_Real anEps = Min(Resolution(Precision::Confusion()), Precision::PConfusion()); + + BSplCLib::Intervals(myBSplineCurve->Knots(), + myBSplineCurve->Multiplicities(), + aDegree, + myBSplineCurve->IsPeriodic(), + aCont, + myFirst, + myLast, + anEps, + &T); } else if (myTypeCurve == GeomAbs_OffsetCurve){ + Standard_Integer myNbIntervals = 1; GeomAbs_Shape BaseS=GeomAbs_C0; switch(S){ case GeomAbs_G1: @@ -1073,8 +398,7 @@ void GeomAdaptor_Curve::Intervals(TColStd_Array1OfReal& T, case GeomAbs_C2: BaseS = GeomAbs_C3; break; default: BaseS = GeomAbs_CN; } - GeomAdaptor_Curve C - (Handle(Geom_OffsetCurve)::DownCast (myCurve)->BasisCurve()); + GeomAdaptor_Curve C (Handle(Geom_OffsetCurve)::DownCast (myCurve)->BasisCurve(), myFirst, myLast); // akm 05/04/02 (OCC278) If our curve is trimmed we must recalculate // the array of intervals obtained from the basis to // vvv reflect parameter bounds @@ -1090,10 +414,15 @@ void GeomAdaptor_Curve::Intervals(TColStd_Array1OfReal& T, // old - myNbIntervals = C.NbIntervals(BaseS); // old - C.Intervals(T, BaseS); // akm 05/04/02 ^^^ + T( T.Lower() ) = myFirst; + T( T.Lower() + myNbIntervals ) = myLast; } - T( T.Lower() ) = FirstParam; - T( T.Lower() + myNbIntervals ) = LastParam; + else + { + T( T.Lower() ) = myFirst; + T( T.Lower() + 1 ) = myLast; + } } //======================================================================= diff --git a/tests/bugs/modalg_8/bug33187 b/tests/bugs/modalg_8/bug33187 new file mode 100644 index 0000000000..34b14961e3 --- /dev/null +++ b/tests/bugs/modalg_8/bug33187 @@ -0,0 +1,9 @@ +puts "================================" +puts "0033187: Modeling Algorithms - Crash in postprocessing of imported shape" +puts "================================" + +restore [locate_data_file bug33187.brep] s + +if [catch { fixshape r s } catch_result] { + puts "${BugNumber}: Faulty" +} diff --git a/tests/hlr/poly_hlr/A1 b/tests/hlr/poly_hlr/A1 index 1b6e75a3cc..4a5e0ad98f 100644 --- a/tests/hlr/poly_hlr/A1 +++ b/tests/hlr/poly_hlr/A1 @@ -4,7 +4,7 @@ puts "=====================================" puts "" set viewname "" -set length 6.30238 +set length 6.30139 restore [locate_data_file bug27341_hlrsave.brep] a COMPUTE_HLR $viewname $algotype diff --git a/tests/hlr/poly_hlr/A2 b/tests/hlr/poly_hlr/A2 index c116d9dec9..39098da4e6 100644 --- a/tests/hlr/poly_hlr/A2 +++ b/tests/hlr/poly_hlr/A2 @@ -1,4 +1,4 @@ -puts "TODO OCC30286 ALL: Error : The length of result shape is 8.06872, expected 8.05281" +puts "TODO OCC30286 ALL: Error : The length of result shape is 7.9487, expected 8.05281" puts "=====================================" puts "OCC27341: Incorrect exact HLR results" diff --git a/tests/hlr/poly_hlr/A3 b/tests/hlr/poly_hlr/A3 index 3e71edfe30..804241eb90 100644 --- a/tests/hlr/poly_hlr/A3 +++ b/tests/hlr/poly_hlr/A3 @@ -4,7 +4,7 @@ puts "=====================================" puts "" set viewname "vbottom" -set length 8.39744 +set length 8.40196 restore [locate_data_file bug27341_hlrsave.brep] a COMPUTE_HLR $viewname $algotype diff --git a/tests/hlr/poly_hlr/A4 b/tests/hlr/poly_hlr/A4 index 72303a8910..980d50d0bf 100644 --- a/tests/hlr/poly_hlr/A4 +++ b/tests/hlr/poly_hlr/A4 @@ -1,4 +1,4 @@ -puts "TODO OCC30286 ALL: Error : The length of result shape is 7.44464, expected 7.39488" +puts "TODO OCC30286 ALL: Error : The length of result shape is 7.4452, expected 7.39488" puts "=====================================" puts "OCC27341: Incorrect exact HLR results" diff --git a/tests/hlr/poly_hlr/A5 b/tests/hlr/poly_hlr/A5 index f276fd4c4d..3423f470fa 100644 --- a/tests/hlr/poly_hlr/A5 +++ b/tests/hlr/poly_hlr/A5 @@ -1,4 +1,4 @@ -puts "TODO OCC30286 ALL: Error : The length of result shape is 9.10542, expected 9.47163" +puts "TODO OCC30286 ALL: Error : The length of result shape is 9.08401, expected 9.47163" puts "=====================================" puts "OCC27341: Incorrect exact HLR results" diff --git a/tests/hlr/poly_hlr/A6 b/tests/hlr/poly_hlr/A6 index f85f2d0066..f80e6dda04 100644 --- a/tests/hlr/poly_hlr/A6 +++ b/tests/hlr/poly_hlr/A6 @@ -4,7 +4,7 @@ puts "=====================================" puts "" set viewname "vleft" -set length 7.64599 +set length 7.64618 restore [locate_data_file bug27341_hlrsave.brep] a COMPUTE_HLR $viewname $algotype diff --git a/tests/hlr/poly_hlr/A7 b/tests/hlr/poly_hlr/A7 index dc38a1c33e..c9f00b1c14 100644 --- a/tests/hlr/poly_hlr/A7 +++ b/tests/hlr/poly_hlr/A7 @@ -4,7 +4,7 @@ puts "=====================================" puts "" set viewname "vright" -set length 9.30381 +set length 9.30402 restore [locate_data_file bug27341_hlrsave.brep] a COMPUTE_HLR $viewname $algotype From 8175a70c4e83bd5084931b82dfe50b7cd9ff1d6d Mon Sep 17 00:00:00 2001 From: ifv Date: Mon, 17 Oct 2022 17:22:44 +0300 Subject: [PATCH 420/639] 0033173: Modeling Algorithms - Regression in BRepExtrema_DistShapeShape causing Standard_OutOfRange exception Extrema/Extrema_ExtCC.cxx - checking number of solutions is added tests/bugs/modalg_8/bug33173 - test case added --- src/Extrema/Extrema_ExtCC.cxx | 5 ++++- tests/bugs/modalg_8/bug33173 | 15 +++++++++++++++ 2 files changed, 19 insertions(+), 1 deletion(-) create mode 100644 tests/bugs/modalg_8/bug33173 diff --git a/src/Extrema/Extrema_ExtCC.cxx b/src/Extrema/Extrema_ExtCC.cxx index def27cbe5e..06481b5539 100644 --- a/src/Extrema/Extrema_ExtCC.cxx +++ b/src/Extrema/Extrema_ExtCC.cxx @@ -674,7 +674,10 @@ void Extrema_ExtCC::PrepareParallelResult(const Standard_Real theUt11, Extrema_ExtPElC ExtPCir(aPCirc2, Extrema_CurveTool::Circle (*myC[0]), Precision::Confusion(), theUt11, theUt12); - + if (ExtPCir.NbExt() < 1) + { + continue; + } Standard_Real aMinSqD = ExtPCir.SquareDistance(1); for (Standard_Integer anExtID = 2; anExtID <= ExtPCir.NbExt(); anExtID++) { diff --git a/tests/bugs/modalg_8/bug33173 b/tests/bugs/modalg_8/bug33173 new file mode 100644 index 0000000000..beb793d69b --- /dev/null +++ b/tests/bugs/modalg_8/bug33173 @@ -0,0 +1,15 @@ +puts "========" +puts "0033173: Modeling Algorithms - Regression in BRepExtrema_DistShapeShape causing Standard_OutOfRange" +puts "========" +puts "" + +set MinDistExpected 7.049107166484117e-07 +restore [locate_data_file bug33173.brep] s +explode s +distmini dm s_1 s_2 +if {[isdraw dm]} { + checkreal MinDist $MinDistExpected [dval dm_val] 1.e-7 .01 +} else { + puts "Error: distmini failed" +} + From 91a2f58f8fb018c12311285f1c2f5bc44b8656f2 Mon Sep 17 00:00:00 2001 From: ifv Date: Fri, 30 Sep 2022 15:45:10 +0300 Subject: [PATCH 421/639] 0026441: Modeling Algorithms - BRepOffset_MakeOffset affects original shape BRepOffset_MakeOffset.cxx - tolerance control for building planar faces is implemented, updating tolerance for initial entities is avoided BRepAlgo_Loop.cxx - "total" setting tolerance 0.001 is removing BRepLib.cxx - checking of "locked" for vertex is removing in static function UpdShTol QABugs_20.cxx - add new command OCC26441 for checking tolerance differenses between two "identical" shapes tests/bugs/modalg_7/bug30054 - case now is "BAD", because really result shape is invalid: many faces has not closed wires with huge gaps between ends of edges. Result was "OK" only because tolerances of vertices were increased by algorithm to cover all gaps. tests/bugs/modalg_8/bug26441 - new test case added Other test: B3, C8, A7, C8: they were "BAD" and now are "BAD", only some problems are changed. --- src/BRepAlgo/BRepAlgo_Loop.cxx | 97 +++++++++---------- src/BRepAlgo/BRepAlgo_Loop.hxx | 14 ++- src/BRepLib/BRepLib.cxx | 29 +++--- src/BRepOffset/BRepOffset_MakeOffset.cxx | 118 ++++++++++++++++++----- src/QABugs/QABugs_20.cxx | 118 +++++++++++++++++++++++ tests/bugs/modalg_7/bug30054 | 2 +- tests/bugs/modalg_8/bug26441 | 40 ++++++++ tests/offset/faces_type_i/B3 | 6 +- tests/offset/faces_type_i/C8 | 1 + tests/offset/shape_type_i/A7 | 1 - tests/offset/shape_type_i/C8 | 1 + 11 files changed, 331 insertions(+), 96 deletions(-) create mode 100644 tests/bugs/modalg_8/bug26441 diff --git a/src/BRepAlgo/BRepAlgo_Loop.cxx b/src/BRepAlgo/BRepAlgo_Loop.cxx index 8fb739c23c..ba6b1e6052 100644 --- a/src/BRepAlgo/BRepAlgo_Loop.cxx +++ b/src/BRepAlgo/BRepAlgo_Loop.cxx @@ -42,12 +42,14 @@ #include #include +//#define OCCT_DEBUG_ALGO +//#define DRAW #ifdef DRAW #include #pragma comment(lib,"TKDraw") #endif #ifdef OCCT_DEBUG_ALGO -Standard_Boolean AffichLoop = Standard_False; +Standard_Boolean AffichLoop = Standard_True; Standard_Integer NbLoops = 0; Standard_Integer NbWires = 1; static char* name = new char[100]; @@ -58,7 +60,8 @@ static char* name = new char[100]; //purpose : //======================================================================= -BRepAlgo_Loop::BRepAlgo_Loop() +BRepAlgo_Loop::BRepAlgo_Loop(): + myTolConf (0.001) { } @@ -185,7 +188,6 @@ static TopoDS_Vertex UpdateClosedEdge(const TopoDS_Edge& E, Standard_Boolean OnStart = 0, OnEnd = 0; //// modified by jgv, 13.04.04 for OCC5634 //// TopExp::Vertices (E,V1,V2); - //Standard_Real Tol = Precision::Confusion(); Standard_Real Tol = BRep_Tool::Tolerance( V1 ); /////////////////////////////////////////////// @@ -427,13 +429,12 @@ static void StoreInMVE (const TopoDS_Face& F, TopoDS_Edge& E, TopTools_IndexedDataMapOfShapeListOfShape& MVE, Standard_Boolean& YaCouture, - TopTools_DataMapOfShapeShape& VerticesForSubstitute ) + TopTools_DataMapOfShapeShape& VerticesForSubstitute, + const Standard_Real theTolConf) { TopoDS_Vertex V1, V2, V; TopTools_ListOfShape Empty; - Standard_Real Tol = 0.001; //5.e-05; //5.e-07; -// gp_Pnt P1, P2, P; gp_Pnt P1, P; BRep_Builder BB; for (Standard_Integer iV = 1; iV <= MVE.Extent(); iV++) @@ -449,7 +450,7 @@ static void StoreInMVE (const TopoDS_Face& F, { V1 = TopoDS::Vertex( itl.Value() ); P1 = BRep_Tool::Pnt( V1 ); - if (P.IsEqual( P1, Tol ) && !V.IsSame(V1)) + if (P.IsEqual( P1, theTolConf ) && !V.IsSame(V1)) { V.Orientation( V1.Orientation() ); if (VerticesForSubstitute.IsBound( V1 )) @@ -574,7 +575,7 @@ void BRepAlgo_Loop::Perform() TopoDS_Edge& E = TopoDS::Edge(itl1.Value()); if (!Emap.Add(E)) continue; - StoreInMVE(myFace,E,MVE,YaCouture,myVerticesForSubstitute); + StoreInMVE(myFace,E,MVE,YaCouture,myVerticesForSubstitute, myTolConf); } } } @@ -586,7 +587,7 @@ void BRepAlgo_Loop::Perform() for (itl.Initialize(myConstEdges); itl.More(); itl.Next()) { TopoDS_Edge& E = TopoDS::Edge(itl.Value()); if (DejaVu.Add(E)) - StoreInMVE(myFace,E,MVE,YaCouture,myVerticesForSubstitute); + StoreInMVE(myFace,E,MVE,YaCouture,myVerticesForSubstitute, myTolConf); } #ifdef DRAW @@ -626,42 +627,42 @@ void BRepAlgo_Loop::Perform() //-------------------------------- RemovePendingEdges(MVE); - if (MVE.Extent() == 0) break; + if (MVE.Extent() == 0) break; //-------------------------------- // Start edge. //-------------------------------- EF = CE = TopoDS::Edge(MVE(1).First()); - TopExp::Vertices(CE,V1,V2); + TopExp::Vertices(CE, V1, V2); //-------------------------------- // VF vertex start of new wire //-------------------------------- - if (CE.Orientation() == TopAbs_FORWARD) { CV = VF = V1;} - else { CV = VF = V2;} + if (CE.Orientation() == TopAbs_FORWARD) { CV = VF = V1; } + else { CV = VF = V2; } if (!MVE.Contains(CV)) continue; TopTools_ListOfShape& aListEdges = MVE.ChangeFromKey(CV); - for ( itl.Initialize(aListEdges); itl.More(); itl.Next()) { + for (itl.Initialize(aListEdges); itl.More(); itl.Next()) { if (itl.Value().IsEqual(CE)) { - aListEdges.Remove(itl); - break; + aListEdges.Remove(itl); + break; } } - End = Standard_False; - + End = Standard_False; + while (!End) { //------------------------------- // Construction of a wire. //------------------------------- - TopExp::Vertices(CE,V1,V2); + TopExp::Vertices(CE, V1, V2); if (!CV.IsSame(V1)) CV = V1; else CV = V2; - B.Add (NW,CE); + B.Add(NW, CE); UsedEdges.Add(CE); if (!MVE.Contains(CV) || MVE.FindFromKey(CV).IsEmpty()) { End = Standard_True; } else { - End = !SelectEdge(myFace,CE,CV,NE,MVE.ChangeFromKey(CV)); + End = !SelectEdge(myFace, CE, CV, NE, MVE.ChangeFromKey(CV)); if (!End) { CE = NE; if (MVE.FindFromKey(CV).IsEmpty()) @@ -672,35 +673,41 @@ void BRepAlgo_Loop::Perform() //-------------------------------------------------- // Add new wire to the set of wires //------------------------------------------------ - Standard_Real Tol = 0.001; //5.e-05; //5.e-07; - TopExp_Explorer explo( NW, TopAbs_VERTEX ); - for (; explo.More(); explo.Next()) + + if (VF.IsSame(CV)) + { + if (SamePnt2d(VF, EF, CE, myFace)) { - const TopoDS_Vertex& aV = TopoDS::Vertex( explo.Current() ); - Handle(BRep_TVertex)& TV = *((Handle(BRep_TVertex)*) &(aV).TShape()); - TV->Tolerance( Tol ); - TV->Modified( Standard_True ); + NW.Closed(Standard_True); + myNewWires.Append(NW); } - for (explo.Init( NW, TopAbs_EDGE ); explo.More(); explo.Next()) + else if(BRep_Tool::Tolerance(VF) < myTolConf) { - const TopoDS_Edge& aE = TopoDS::Edge( explo.Current() ); - Handle(BRep_TEdge)& TE = *((Handle(BRep_TEdge)*) &(aE).TShape()); - TE->Tolerance( Tol ); - TE->Modified( Standard_True ); + BRep_Builder aBB; + aBB.UpdateVertex(VF, myTolConf); + if (SamePnt2d(VF, EF, CE, myFace)) + { + NW.Closed(Standard_True); + myNewWires.Append(NW); + } +#ifdef OCCT_DEBUG_ALGO + else + { + std::cout << "BRepAlgo_Loop: Open Wire" << std::endl; + if (AffichLoop) + std::cout << "OpenWire is : NW_" << NbLoops << "_" << NbWires << std::endl; + } +#endif } - - if (VF.IsSame(CV) && SamePnt2d(VF,EF,CE,myFace)) - { - NW.Closed (Standard_True); - myNewWires.Append (NW); } #ifdef OCCT_DEBUG_ALGO else { - std::cout <<"BRepAlgo_Loop: Open Wire"< d2) d2 = temp; } - d2 = 1.5*sqrt(d2); + d2 = 1.05*sqrt(d2); theEdTol = d2; } @@ -884,10 +884,6 @@ static void UpdShTol(const TopTools_DataMapOfShapeReal& theShToTol, case TopAbs_VERTEX: { const Handle(BRep_TVertex)& aTV = *((Handle(BRep_TVertex)*)&aNsh.TShape()); - // - if(aTV->Locked()) - throw TopoDS_LockedShape("BRep_Builder::UpdateVertex"); - // if (theVForceUpdate) aTV->Tolerance(aTol); else @@ -1709,8 +1705,8 @@ static void InternalUpdateTolerances(const TopoDS_Shape& theOldShape, for (iCur=1; iCur<=nbV; iCur++) { tol=0; const TopoDS_Vertex& V = TopoDS::Vertex(parents.FindKey(iCur)); - Bnd_Box box; - box.Add(BRep_Tool::Pnt(V)); + gp_Pnt aPV = BRep_Tool::Pnt(V); + Standard_Real aMaxDist = 0.; gp_Pnt p3d; for (lConx.Initialize(parents(iCur)); lConx.More(); lConx.Next()) { const TopoDS_Edge& E = TopoDS::Edge(lConx.Value()); @@ -1732,8 +1728,10 @@ static void InternalUpdateTolerances(const TopoDS_Shape& theOldShape, if (!C.IsNull()) { // edge non degenerated p3d = C->Value(par); p3d.Transform(L.Transformation()); - box.Add(p3d); - } + Standard_Real aDist = p3d.SquareDistance(aPV); + if (aDist > aMaxDist) + aMaxDist = aDist; + } } else if (cr->IsCurveOnSurface()) { const Handle(Geom_Surface)& Su = cr->Surface(); @@ -1745,21 +1743,22 @@ static void InternalUpdateTolerances(const TopoDS_Shape& theOldShape, gp_Pnt2d p2d = PC->Value(par); p3d = Su->Value(p2d.X(),p2d.Y()); p3d.Transform(L.Transformation()); - box.Add(p3d); + Standard_Real aDist = p3d.SquareDistance(aPV); + if (aDist > aMaxDist) + aMaxDist = aDist; if (!PC2.IsNull()) { p2d = PC2->Value(par); p3d = Su->Value(p2d.X(),p2d.Y()); p3d.Transform(L.Transformation()); - box.Add(p3d); + aDist = p3d.SquareDistance(aPV); + if (aDist > aMaxDist) + aMaxDist = aDist; } } itcr.Next(); } } - Standard_Real aXmin, aYmin, aZmin, aXmax, aYmax, aZmax; - box.Get(aXmin, aYmin, aZmin, aXmax, aYmax, aZmax); - aXmax -= aXmin; aYmax -= aYmin; aZmax -= aZmin; - tol = Max(tol,sqrt(aXmax*aXmax+aYmax*aYmax+aZmax*aZmax)); + tol = Max(tol, sqrt(aMaxDist)); tol += 2.*Epsilon(tol); // Standard_Real aVTol = BRep_Tool::Tolerance(V); diff --git a/src/BRepOffset/BRepOffset_MakeOffset.cxx b/src/BRepOffset/BRepOffset_MakeOffset.cxx index 4579874778..5d4d00d3db 100644 --- a/src/BRepOffset/BRepOffset_MakeOffset.cxx +++ b/src/BRepOffset/BRepOffset_MakeOffset.cxx @@ -336,8 +336,10 @@ static BRepOffset_Error checkSinglePoint(const Standard_Real theUParam, const NCollection_Vector& theBadPoints); //--------------------------------------------------------------------- -static void UpdateTolerance ( TopoDS_Shape& myShape, - const TopTools_IndexedMapOfShape& myFaces); +static void UpdateTolerance ( TopoDS_Shape& theShape, + const TopTools_IndexedMapOfShape& theFaces, + const TopoDS_Shape& theInitShape); + static Standard_Real ComputeMaxDist(const gp_Pln& thePlane, const Handle(Geom_Curve)& theCrv, const Standard_Real theFirst, @@ -1036,8 +1038,16 @@ void BRepOffset_MakeOffset::MakeOffsetShape(const Message_ProgressRange& theRang // MAJ Tolerance edge and Vertex // ---------------------------- if (!myOffsetShape.IsNull()) { - UpdateTolerance (myOffsetShape,myFaces); - BRepLib::UpdateTolerances( myOffsetShape ); + if (myThickening) + { + UpdateTolerance(myOffsetShape, myFaces, myShape); + } + else + { + TopoDS_Shape aDummy; + UpdateTolerance(myOffsetShape, myFaces, aDummy); + } + BRepLib::UpdateTolerances(myOffsetShape); } CorrectConicalFaces(); @@ -3165,13 +3175,38 @@ void BRepOffset_MakeOffset::MakeMissingWalls (const Message_ProgressRange& theRa } //if both edges are arcs of circles if (NewFace.IsNull()) { - BRepLib_MakeFace MF(theWire, Standard_True); //Only plane - if (MF.Error() == BRepLib_FaceDone) + Standard_Real anEdgeTol = BRep_Tool::Tolerance(anEdge); + //Tolerances of input shape should not be increased by BRepLib_MakeFace + BRepLib_FindSurface aFindPlane(theWire, anEdgeTol, Standard_True); //only plane + IsPlanar = Standard_False; + if(aFindPlane.Found() && aFindPlane.ToleranceReached() <= anEdgeTol) { - NewFace = MF.Face(); - IsPlanar = Standard_True; + Standard_Real f, l; + Handle(Geom_Curve) aGC = BRep_Tool::Curve(anEdge, f, l); + Handle(Geom_Plane) aPln = Handle(Geom_Plane)::DownCast(aFindPlane.Surface()); + Standard_Real aMaxDist = ComputeMaxDist(aPln->Pln(), aGC, f, l); + if (aMaxDist <= anEdgeTol) + { + BRepLib_MakeFace MF(aPln->Pln(), theWire); + if (MF.IsDone()) + { + NewFace = MF.Face(); + TopoDS_Iterator anItE(theWire); + for (; anItE.More(); anItE.Next()) + { + const TopoDS_Edge& anE = TopoDS::Edge(anItE.Value()); + if (anE.IsSame(anEdge)) + continue; + aGC = BRep_Tool::Curve(anE, f, l); + aMaxDist = ComputeMaxDist(aPln->Pln(), aGC, f, l); + BB.UpdateEdge(anE, aMaxDist); + } + IsPlanar = Standard_True; + } + } } - else //Extrusion (by thrusections) + // + if(!IsPlanar) //Extrusion (by thrusections) { Handle(Geom_Curve) EdgeCurve = BRep_Tool::Curve(anEdge, fpar, lpar); Handle(Geom_TrimmedCurve) TrEdgeCurve = @@ -3185,7 +3220,6 @@ void BRepOffset_MakeOffset::MakeMissingWalls (const Message_ProgressRange& theRa ThrusecGenerator.AddCurve( TrOffsetCurve ); ThrusecGenerator.Perform( Precision::PConfusion() ); theSurf = ThrusecGenerator.Surface(); - //theSurf = new Geom_SurfaceOfLinearExtrusion( TrOffsetCurve, OffsetDir ); Standard_Real Uf, Ul, Vf, Vl; theSurf->Bounds(Uf, Ul, Vf, Vl); TopLoc_Location Loc; @@ -3272,8 +3306,14 @@ void BRepOffset_MakeOffset::MakeMissingWalls (const Message_ProgressRange& theRa BB.Range( anE3, FirstPar, LastPar ); } } - BRepLib::SameParameter(NewFace); - BRepTools::Update(NewFace); + + if (!IsPlanar) + { + // For planar faces these operations are useless, + // because there are no curves on surface + BRepLib::SameParameter(NewFace); + BRepTools::Update(NewFace); + } //Check orientation TopAbs_Orientation anOr = OrientationOfEdgeInFace(anEdge, aFaceOfEdge); TopAbs_Orientation OrInNewFace = OrientationOfEdgeInFace(anEdge, NewFace); @@ -3781,6 +3821,7 @@ void BRepOffset_MakeOffset::EncodeRegularity () #endif } + //======================================================================= //function : ComputeMaxDist //purpose : @@ -3807,13 +3848,15 @@ Standard_Real ComputeMaxDist(const gp_Pln& thePlane, } return sqrt(aMaxDist)*1.05; } + //======================================================================= -//function : UpDateTolerance +//function : UpdateTolerance //purpose : //======================================================================= void UpdateTolerance (TopoDS_Shape& S, - const TopTools_IndexedMapOfShape& Faces) + const TopTools_IndexedMapOfShape& Faces, + const TopoDS_Shape& theInitShape) { BRep_Builder B; TopTools_MapOfShape View; @@ -3829,12 +3872,31 @@ void UpdateTolerance (TopoDS_Shape& S, } } + // The edges of initial shape are not modified + TopTools_MapOfShape aMapInitF; + if (!theInitShape.IsNull()) + { + TopExp_Explorer anExpF(theInitShape, TopAbs_FACE); + for (; anExpF.More(); anExpF.Next()) { + aMapInitF.Add(anExpF.Current()); + TopExp_Explorer anExpE; + for (anExpE.Init(anExpF.Current(), TopAbs_EDGE); anExpE.More(); anExpE.Next()) { + View.Add(anExpE.Current()); + TopoDS_Iterator anItV(anExpE.Current()); + for (; anItV.More(); anItV.Next()) + { + View.Add(anItV.Value()); + } + } + } + } + Standard_Real Tol; - TopExp_Explorer ExpF; - for (ExpF.Init(S, TopAbs_FACE); ExpF.More(); ExpF.Next()) + TopExp_Explorer anExpF(S, TopAbs_FACE); + for (; anExpF.More(); anExpF.Next()) { - const TopoDS_Shape& F = ExpF.Current(); - if (Faces.Contains(F)) + const TopoDS_Shape& F = anExpF.Current(); + if (Faces.Contains(F) || aMapInitF.Contains(F)) { continue; } @@ -3843,6 +3905,7 @@ void UpdateTolerance (TopoDS_Shape& S, for (Exp.Init(F, TopAbs_EDGE); Exp.More(); Exp.Next()) { TopoDS_Edge E = TopoDS::Edge(Exp.Current()); Standard_Boolean isUpdated = Standard_False; + Standard_Real aCurrTol = BRep_Tool::Tolerance(E); if (aBAS.GetType() == GeomAbs_Plane) { //Edge does not seem to have pcurve on plane, @@ -3850,17 +3913,22 @@ void UpdateTolerance (TopoDS_Shape& S, Standard_Real aFirst, aLast; Handle(Geom_Curve) aCrv = BRep_Tool::Curve(E, aFirst, aLast); Standard_Real aMaxDist = ComputeMaxDist(aBAS.Plane(), aCrv, aFirst, aLast); - E.Locked (Standard_False); - B.UpdateEdge(E, aMaxDist); - isUpdated = Standard_True; + if (aMaxDist > aCurrTol) + { + B.UpdateEdge(E, aMaxDist); + isUpdated = Standard_True; + } } if (View.Add(E)) { - + E.Locked(Standard_False); BRepCheck_Edge EdgeCorrector(E); Tol = EdgeCorrector.Tolerance(); - B.UpdateEdge(E, Tol); - isUpdated = Standard_True; + if (Tol > aCurrTol) + { + B.UpdateEdge(E, Tol); + isUpdated = Standard_True; + } } if (isUpdated) { @@ -3869,11 +3937,11 @@ void UpdateTolerance (TopoDS_Shape& S, TopExp::Vertices(E, V[0], V[1]); for (Standard_Integer i = 0; i <= 1; i++) { + V[i].Locked(Standard_False); if (View.Add(V[i])) { Handle(BRep_TVertex) TV = Handle(BRep_TVertex)::DownCast(V[i].TShape()); TV->Tolerance(0.); BRepCheck_Vertex VertexCorrector(V[i]); - V[i].Locked (Standard_False); B.UpdateVertex(V[i], VertexCorrector.Tolerance()); // use the occasion to clean the vertices. (TV->ChangePoints()).Clear(); diff --git a/src/QABugs/QABugs_20.cxx b/src/QABugs/QABugs_20.cxx index 8a5443f139..b055b1a57d 100644 --- a/src/QABugs/QABugs_20.cxx +++ b/src/QABugs/QABugs_20.cxx @@ -4359,6 +4359,120 @@ static Standard_Integer QACheckBends(Draw_Interpretor& theDI, return 0; } +static Standard_Integer OCC26441(Draw_Interpretor& theDi, Standard_Integer theNbArgs, const char** theArgVec) +{ + if (theNbArgs < 3) + { + theDi << "Syntax error: wrong number of arguments!\n"; + return 1; + } + + const TopoDS_Shape& aShape = DBRep::Get(theArgVec[1]); + if (aShape.IsNull()) + { + theDi << " Null Shape is not allowed here\n"; + return 1; + } + const TopoDS_Shape& aRefShape = DBRep::Get(theArgVec[2]); + if (aRefShape.IsNull()) + { + theDi << " Null Shape is not allowed here\n"; + return 1; + } + if(aShape.ShapeType() != aRefShape.ShapeType()) + { + theDi << " Shape types are not the same\n"; + return 1; + } + + Standard_Real anEps = Precision::Confusion(); + if (theNbArgs > 3) + { + anEps = Draw::Atof(theArgVec[3]); + } + + Standard_Boolean isAllDiff = Standard_False; + if (theNbArgs > 4) + { + Standard_Integer Inc = Draw::Atoi(theArgVec[4]); + if (Inc > 0) + isAllDiff = Standard_True; + } + + BRep_Builder aBB; + TopExp_Explorer anExp, anExpRef; + Standard_Real aMaxE = 0., aMaxV = 0.; + TopTools_MapOfShape aChecked; + TopoDS_Vertex aV[2], aRefV[2]; + + //Checking edge and vertex tolerances + TopoDS_Compound aBadEdges; + aBB.MakeCompound(aBadEdges); + TopoDS_Compound aBadVerts; + aBB.MakeCompound(aBadVerts); + anExp.Init(aShape, TopAbs_EDGE); + anExpRef.Init(aRefShape, TopAbs_EDGE); + for (; anExpRef.More(); anExpRef.Next()) + { + const TopoDS_Edge& aRefE = TopoDS::Edge(anExpRef.Current()); + if (!anExp.More()) + { + theDi << " Different number of edges\n"; + return 1; + } + const TopoDS_Edge& anE = TopoDS::Edge(anExp.Current()); + if (!aChecked.Add(anE)) + continue; + Standard_Real aTolRef = BRep_Tool::Tolerance(aRefE); + Standard_Real aTol = BRep_Tool::Tolerance(anE); + Standard_Real aDiff = aTol - aTolRef; + if (isAllDiff && aDiff < 0) + aDiff = -aDiff; + if (aDiff > anEps) + { + if (aDiff > aMaxE) + aMaxE = aDiff; + + aBB.Add(aBadEdges, anE); + } + TopExp::Vertices(aRefE, aRefV[0], aRefV[1]); + TopExp::Vertices(anE, aV[0], aV[1]); + + for (int i = 0; i < 2; ++i) + { + if (aRefV[i].IsNull()) + continue; + if (!aChecked.Add(aV[i])) + continue; + aTolRef = BRep_Tool::Tolerance(aRefV[i]); + aTol = BRep_Tool::Tolerance(aV[i]); + aDiff = aTol - aTolRef; + if (aDiff > anEps) + { + if (aDiff > aMaxV) + aMaxV = aDiff; + + aBB.Add(aBadVerts, aV[i]); + } + } + + anExp.Next(); + + } + + if (aMaxE > anEps) + { + theDi << " Maximal difference for edges : " << aMaxE << "\n"; + DBRep::Set("BadEdges", aBadEdges); + } + if (aMaxV > anEps) + { + theDi << " Maximal difference for vertices : " << aMaxV << "\n"; + DBRep::Set("BadVerts", aBadVerts); + } + + return 0; +} void QABugs::Commands_20(Draw_Interpretor& theCommands) { @@ -4466,6 +4580,10 @@ void QABugs::Commands_20(Draw_Interpretor& theCommands) { "QACheckBends curve [CosMaxAngle [theNbPoints]]", __FILE__, QACheckBends, group); + theCommands.Add("OCC26441", + "OCC26441 shape ref_shape [tol [all_diff 0/1]] \nif all_diff = 0, only icreasing tolerances is considered" , + __FILE__, + OCC26441, group); return; } diff --git a/tests/bugs/modalg_7/bug30054 b/tests/bugs/modalg_7/bug30054 index b187154b5a..9b16118a62 100644 --- a/tests/bugs/modalg_7/bug30054 +++ b/tests/bugs/modalg_7/bug30054 @@ -2,7 +2,7 @@ puts "=================================================" puts "0030054: BRepOffset_MakeOffset fails to build joints in intersection mode" puts "=================================================" puts "" - +puts "TODO OCC33166 ALL: Faulty shapes" restore [locate_data_file bug30054.brep] a thickshell result a 1 i diff --git a/tests/bugs/modalg_8/bug26441 b/tests/bugs/modalg_8/bug26441 new file mode 100644 index 0000000000..55071ba692 --- /dev/null +++ b/tests/bugs/modalg_8/bug26441 @@ -0,0 +1,40 @@ +puts "============" +puts "0026441: Modeling Algorithms - BRepOffset_MakeOffset affects original shape" +puts "============" +puts "" + +pload QAcommands +restore [locate_data_file bug26440_plate.brep] sh + +tcopy sh sh_ref +thickshell result sh 160 + +checkprops result -s 2.40831e+07 +checkshape result + +set nbshapes_expected " +Number of shapes in shape + VERTEX : 196 + EDGE : 308 + WIRE : 110 + FACE : 110 + SHELL : 1 + SOLID : 1 + COMPSOLID : 0 + COMPOUND : 0 + SHAPE : 726 +" +checknbshapes result -ref ${nbshapes_expected} -t -m "solid construction" +if { [info exist BadEdges] } { + unset BadEdges +} +if { [info exist BadVerts] } { + unset BadVerts +} + +OCC26441 sh sh_ref 1.e-7 1 + +if { [isdraw BadEdges] || [isdraw BadVerts]} { + puts "Error: tolerances of some subshapes of initial shape are changed" +} + diff --git a/tests/offset/faces_type_i/B3 b/tests/offset/faces_type_i/B3 index 429bc1596e..3e45add693 100644 --- a/tests/offset/faces_type_i/B3 +++ b/tests/offset/faces_type_i/B3 @@ -1,6 +1,6 @@ -puts "TODO OCC23748 ALL: ERROR. offsetperform operation not done." -puts "TODO OCC23748 ALL: Error: The command cannot be built" -puts "TODO OCC26556 ALL: Error : The offset cannot be built." +puts "TODO OCC26556 ALL: Error : The volume" +puts "TODO OCC26556 ALL: Faulty shapes" +puts "TODO OCC26556 ALL: Error : The area" pcone s 5 0 12 270 diff --git a/tests/offset/faces_type_i/C8 b/tests/offset/faces_type_i/C8 index 35d6dc4903..0a00d26119 100644 --- a/tests/offset/faces_type_i/C8 +++ b/tests/offset/faces_type_i/C8 @@ -1,5 +1,6 @@ puts "TODO OCC25406 ALL: Error : The volume of result shape is" puts "TODO OCC25406 ALL: Error: bsection of the result and s is not equal to zero" +puts "TODO OCC25406 ALL: Faulty shapes" ellipse w1 0 0 0 15 10 mkedge w1 w1 0 pi/2 diff --git a/tests/offset/shape_type_i/A7 b/tests/offset/shape_type_i/A7 index d3f9f7a6f4..e43caa9efb 100644 --- a/tests/offset/shape_type_i/A7 +++ b/tests/offset/shape_type_i/A7 @@ -1,5 +1,4 @@ puts "TODO OCC23068 ALL: Error : The volume of result shape " -puts "TODO OCC25406 ALL: Error: bsection of the result and s is not equal to zero" pcone s 5 0 12 270 diff --git a/tests/offset/shape_type_i/C8 b/tests/offset/shape_type_i/C8 index c9bd158b10..b57fd6e696 100644 --- a/tests/offset/shape_type_i/C8 +++ b/tests/offset/shape_type_i/C8 @@ -1,5 +1,6 @@ puts "TODO OCC23068 ALL: Error : The volume of result shape is" puts "TODO OCC23068 ALL: Error: bsection of the result and s is not equal to zero" +puts "TODO OCC23068 ALL: Faulty shapes" ellipse w1 0 0 0 15 10 mkedge w1 w1 0 pi/2 From c325231de692a48f7b6151b55d49b4798c9ff01a Mon Sep 17 00:00:00 2001 From: ifv Date: Mon, 24 Oct 2022 12:25:03 +0300 Subject: [PATCH 422/639] 0033179: Modeling Algorithms - Crash in ShapeFix_Shape with the attached object, when healing for fixing SameParameterFlag BSplCLib_2.cxx - method MergeBSplineKnots is modified in order to have always not empty result. Geom2dConvert.cxx - in static function MultNumandDenom tolerance for comparing knots is decreased. tests/bugs/modalg_8/bug33179 test case added --- src/BSplCLib/BSplCLib_2.cxx | 115 ++++++++++++++++------------ src/Geom2dConvert/Geom2dConvert.cxx | 26 +------ tests/bugs/modalg_8/bug33179 | 9 +++ 3 files changed, 78 insertions(+), 72 deletions(-) create mode 100644 tests/bugs/modalg_8/bug33179 diff --git a/src/BSplCLib/BSplCLib_2.cxx b/src/BSplCLib/BSplCLib_2.cxx index acef2d983a..0ae8628e5c 100644 --- a/src/BSplCLib/BSplCLib_2.cxx +++ b/src/BSplCLib/BSplCLib_2.cxx @@ -1157,82 +1157,97 @@ void BSplCLib::MergeBSplineKnots index, num_knots ; if (StartValue < EndValue - Tolerance) { - TColStd_Array1OfReal knots1(1,Knots1.Length()) ; - TColStd_Array1OfReal knots2(1,Knots2.Length()) ; - degree = Degree1 + Degree2 ; - index = 1 ; - - for (ii = Knots1.Lower() ; ii <= Knots1.Upper() ; ii++) { - knots1(index) = Knots1(ii) ; - index += 1 ; + TColStd_Array1OfReal knots1(1, Knots1.Length()); + TColStd_Array1OfReal knots2(1, Knots2.Length()); + degree = Degree1 + Degree2; + index = 1; + + for (ii = Knots1.Lower(); ii <= Knots1.Upper(); ii++) { + knots1(index) = Knots1(ii); + index += 1; } - index = 1 ; + index = 1; - for (ii = Knots2.Lower() ; ii <= Knots2.Upper() ; ii++) { - knots2(index) = Knots2(ii) ; - index += 1 ; + for (ii = Knots2.Lower(); ii <= Knots2.Upper(); ii++) { + knots2(index) = Knots2(ii); + index += 1; } BSplCLib::Reparametrize(StartValue, - EndValue, - knots1) ; - + EndValue, + knots1); + BSplCLib::Reparametrize(StartValue, - EndValue, - knots2) ; - num_knots = 0 ; - jj = 1 ; + EndValue, + knots2); + num_knots = 0; + jj = 1; - for (ii = 1 ; ii <= knots1.Length() ; ii++) { + for (ii = 1; ii <= knots1.Length(); ii++) { while (jj <= knots2.Length() && knots2(jj) <= knots1(ii) - Tolerance) { - jj += 1 ; - num_knots += 1 ; + jj += 1; + num_knots += 1; } while (jj <= knots2.Length() && knots2(jj) <= knots1(ii) + Tolerance) { - jj += 1 ; + jj += 1; } - num_knots += 1 ; + num_knots += 1; } - NewKnots = - new TColStd_HArray1OfReal(1,num_knots) ; + NewKnots = + new TColStd_HArray1OfReal(1, num_knots); NewMults = - new TColStd_HArray1OfInteger(1,num_knots) ; - num_knots = 1 ; - jj = 1 ; + new TColStd_HArray1OfInteger(1, num_knots); + num_knots = 1; + jj = 1; - for (ii = 1 ; ii <= knots1.Length() ; ii++) { + for (ii = 1; ii <= knots1.Length(); ii++) { while (jj <= knots2.Length() && knots2(jj) <= knots1(ii) - Tolerance) { - NewKnots->ChangeArray1()(num_knots) = knots2(jj) ; - NewMults->ChangeArray1()(num_knots) = Mults2(jj) + Degree1 ; - jj += 1 ; - num_knots += 1 ; + NewKnots->ChangeArray1()(num_knots) = knots2(jj); + NewMults->ChangeArray1()(num_knots) = Mults2(jj) + Degree1; + jj += 1; + num_knots += 1; } - set_mults_flag = 0 ; + set_mults_flag = 0; while (jj <= knots2.Length() && knots2(jj) <= knots1(ii) + Tolerance) { - continuity = Min(Degree1 - Mults1(ii), Degree2 - Mults2(jj)) ; - set_mults_flag = 1 ; - NewMults->ChangeArray1()(num_knots) = degree - continuity ; - jj += 1 ; + continuity = Min(Degree1 - Mults1(ii), Degree2 - Mults2(jj)); + set_mults_flag = 1; + NewMults->ChangeArray1()(num_knots) = degree - continuity; + jj += 1; } - NewKnots->ChangeArray1()(num_knots) = knots1(ii) ; - if (! set_mults_flag) { - NewMults->ChangeArray1()(num_knots) = Mults1(ii) + Degree2 ; + NewKnots->ChangeArray1()(num_knots) = knots1(ii); + if (!set_mults_flag) { + NewMults->ChangeArray1()(num_knots) = Mults1(ii) + Degree2; } - num_knots += 1 ; + num_knots += 1; } - num_knots -= 1 ; - NewMults->ChangeArray1()(1) = degree + 1 ; - NewMults->ChangeArray1()(num_knots) = degree + 1 ; - index = 0 ; + num_knots -= 1; + NewMults->ChangeArray1()(1) = degree + 1; + NewMults->ChangeArray1()(num_knots) = degree + 1; + index = 0; - for (ii = 1 ; ii <= num_knots ; ii++) { - index += NewMults->Value(ii) ; + for (ii = 1; ii <= num_knots; ii++) { + index += NewMults->Value(ii); } - NumPoles = index - degree - 1 ; + NumPoles = index - degree - 1; + } + else + { + degree = Degree1 + Degree2; + num_knots = 2; + NewKnots = + new TColStd_HArray1OfReal(1, num_knots); + NewKnots->ChangeArray1()(1) = StartValue; + NewKnots->ChangeArray1()(num_knots) = EndValue; + + NewMults = + new TColStd_HArray1OfInteger(1, num_knots); + NewMults->ChangeArray1()(1) = degree + 1; + NewMults->ChangeArray1()(num_knots) = degree + 1; + NumPoles = BSplCLib::NbPoles(degree, Standard_False, NewMults->Array1()); } } diff --git a/src/Geom2dConvert/Geom2dConvert.cxx b/src/Geom2dConvert/Geom2dConvert.cxx index dd3ba3da94..a120df013b 100644 --- a/src/Geom2dConvert/Geom2dConvert.cxx +++ b/src/Geom2dConvert/Geom2dConvert.cxx @@ -515,7 +515,6 @@ static Handle(Geom2d_BSplineCurve) MultNumandDenom(const Handle(Geom2d_BSplineCu Handle(TColStd_HArray1OfReal) resKnots; Handle(TColStd_HArray1OfInteger) resMults; Standard_Real start_value,end_value; - Standard_Real tolerance=Precision::Confusion(); Standard_Integer resNbPoles,degree, ii,jj, aStatus; @@ -527,6 +526,7 @@ static Handle(Geom2d_BSplineCurve) MultNumandDenom(const Handle(Geom2d_BSplineCu BS->KnotSequence(BSFlatKnots); start_value = BSKnots(1); end_value = BSKnots(BS->NbKnots()); + Standard_Real tolerance = 10.*Epsilon(Abs(end_value)); a->Knots(aKnots); a->Poles(aPoles); @@ -565,22 +565,6 @@ static Handle(Geom2d_BSplineCurve) MultNumandDenom(const Handle(Geom2d_BSplineCu degree, resDenPoles, aStatus); -// BSplCLib::FunctionMultiply(law_evaluator, -// BS->Degree(), -// BSFlatKnots, -// BSPoles, -// resFlatKnots, -// degree, -// resNumPoles, -// aStatus); -// BSplCLib::FunctionMultiply(law_evaluator, -// BS->Degree(), -// BSFlatKnots, -// BSWeights, -// resFlatKnots, -// degree, -// resDenPoles, -// aStatus); for (ii=1;ii<=resNbPoles;ii++) for(jj=1;jj<=2;jj++) resPoles(ii).SetCoord(jj,resNumPoles(ii).Coord(jj)/resDenPoles(ii)); @@ -1339,24 +1323,22 @@ void Geom2dConvert::ConcatC1(TColGeom2d_Array1OfBSplineCurve& ArrayOf Curve1Poles(ii).SetCoord(jj,Curve1Poles(ii).Coord(jj)*Curve1Weights(ii)); //POP pour NT Geom2dConvert_reparameterise_evaluator ev (aPolynomialCoefficient); -// BSplCLib::FunctionReparameterise(reparameterise_evaluator, BSplCLib::FunctionReparameterise(ev, Curve1->Degree(), Curve1FlatKnots, Curve1Poles, FlatKnots, - aNewCurveDegree, + aNewCurveDegree, NewPoles, aStatus ); - TColStd_Array1OfReal NewWeights(1, FlatKnots.Length() - (aNewCurveDegree + 1)); -// BSplCLib::FunctionReparameterise(reparameterise_evaluator, + TColStd_Array1OfReal NewWeights(1, FlatKnots.Length() - (aNewCurveDegree + 1)); BSplCLib::FunctionReparameterise(ev, Curve1->Degree(), Curve1FlatKnots, Curve1Weights, FlatKnots, - aNewCurveDegree, + aNewCurveDegree, NewWeights, aStatus ); diff --git a/tests/bugs/modalg_8/bug33179 b/tests/bugs/modalg_8/bug33179 new file mode 100644 index 0000000000..3ed700aca4 --- /dev/null +++ b/tests/bugs/modalg_8/bug33179 @@ -0,0 +1,9 @@ +puts "================================" +puts "0033179: Modeling Algorithms - Crash in in ShapeFix_Shape with the attached object, when healing for fixing SameParameterFlag" +puts "================================" + +restore [locate_data_file bug33179.brep] s + +fsameparameter s +checkshape s + From f706dd34b398d6e761ebb920adf43bc83102ab66 Mon Sep 17 00:00:00 2001 From: atereshi Date: Fri, 15 Jul 2022 14:09:09 +0300 Subject: [PATCH 423/639] 0027122: Data Exchange - invalid shapes are produced during model translation due to huge face tolerance Problem: The shape has two faces that dimensions are less than tolerance in the specified STEP file. This situation produces the invalid shape. Change: Shape process has operator FixFaceSize, that is exactly suitable for this shape. The only option of FixFaceSize operator was added to InterfaceStatic, to manage the operator from DRAW command. Result: The shape without artifacts can be reproduced from STEP file with an extra healing procedure. --- src/STEPControl/STEPControl_Controller.cxx | 1 + tests/bugs/step/bug27122 | 27 ++++++++++++++++++++++ 2 files changed, 28 insertions(+) create mode 100644 tests/bugs/step/bug27122 diff --git a/src/STEPControl/STEPControl_Controller.cxx b/src/STEPControl/STEPControl_Controller.cxx index 1970fff87a..bdb17f8f88 100644 --- a/src/STEPControl/STEPControl_Controller.cxx +++ b/src/STEPControl/STEPControl_Controller.cxx @@ -239,6 +239,7 @@ STEPControl_Controller::STEPControl_Controller () Interface_Static::Init ("XSTEP", "FromSTEP.FixShape.FixNonAdjacentIntersectingEdgesMode", 't', "-1"); Interface_Static::Init ("XSTEP", "FromSTEP.FixShape.FixVertexPositionMode", 't', "0"); Interface_Static::Init ("XSTEP", "FromSTEP.FixShape.FixVertexToleranceMode", 't', "-1"); + Interface_Static::Init ("XSTEP", "FromSTEP.FixFaceSize.Tolerance", 't', "1.e-7"); // ika 28.07.16: Parameter to read all top level solids and shells, // should be used only in case of invalid shape_representation without links to shapes. diff --git a/tests/bugs/step/bug27122 b/tests/bugs/step/bug27122 new file mode 100644 index 0000000000..b4c4f6ae0b --- /dev/null +++ b/tests/bugs/step/bug27122 @@ -0,0 +1,27 @@ +puts "================" +puts "OCC27122" +puts "================" +puts "" +##################################################################### +# STEP import regression: invalid shapes are produced during model translation due to huge face tolerance +##################################################################### + +pload XDE + +# Empty resource file name to take params from InterfaceStatic +param "read.step.resource.name" "\"\"" +# Add FixFaceSize operator +param "FromSTEP.exec.op" FixShape,FixFaceSize +# Set a tolerance exceeding the size of the problem face to FixFaceSize operator +param "FromSTEP.FixFaceSize.Tolerance" 0.0508 + +stepread [locate_data_file bug27122_280696.stp] a * + +# restore old params +param "read.step.resource.name" STEP +param "FromSTEP.exec.op" FixShape +param "FromSTEP.FixFaceSize.Tolerance" 1.e-7 + +checknbshapes a_1 -t -face 10 + +checkview -display a_1 -3d -path ${imagedir}/${test_image}.png From 195aac3a42fae7f643135c5338536b6ed89ee7be Mon Sep 17 00:00:00 2001 From: ifv Date: Sat, 12 Nov 2022 20:45:36 +0300 Subject: [PATCH 424/639] 0033193: Modeling Algorithms - Regression: UnifySameDomain raises SIGSEGV ShapeUpgrade_UnifySameDomain.cxx - method ReconstructMissedSeam is improved. tests/bugs/heal/bug33193 - new test case added --- .../ShapeUpgrade_UnifySameDomain.cxx | 20 ++++++++++++++++++- tests/bugs/heal/bug33193 | 19 ++++++++++++++++++ 2 files changed, 38 insertions(+), 1 deletion(-) create mode 100644 tests/bugs/heal/bug33193 diff --git a/src/ShapeUpgrade/ShapeUpgrade_UnifySameDomain.cxx b/src/ShapeUpgrade/ShapeUpgrade_UnifySameDomain.cxx index fdda539d6c..7d603b2dae 100644 --- a/src/ShapeUpgrade/ShapeUpgrade_UnifySameDomain.cxx +++ b/src/ShapeUpgrade/ShapeUpgrade_UnifySameDomain.cxx @@ -753,7 +753,25 @@ static void ReconstructMissedSeam(const TopTools_SequenceOfShape& theRemovedEdge if ((theUperiod != 0. && aUdiff > theUperiod/2) || (theVperiod != 0. && aVdiff > theVperiod/2)) { - anEdge.Reverse(); + if (aLastVertex.IsSame(theCurVertex) || (theUperiod != 0. && theVperiod != 0.)) + { + anEdge.Reverse(); + } + else + { + TopAbs_Orientation anOri = anEdge.Orientation(); + anEdge.Orientation(TopAbs_FORWARD); + Handle(Geom2d_Curve) aPC1 = BRep_Tool::CurveOnSurface(anEdge, theFrefFace, Param1, Param2); + anEdge.Reverse(); + Handle(Geom2d_Curve) aPC2 = BRep_Tool::CurveOnSurface(anEdge, theFrefFace, Param1, Param2); + anEdge.Reverse(); // again FORWARD + TopLoc_Location aLoc; + BRep_Builder aBB; + Standard_Real aTol = BRep_Tool::Tolerance(anEdge); + const Handle(Geom_Surface)& aSurf = BRep_Tool::Surface(theFrefFace, aLoc); + aBB.UpdateEdge(anEdge, aPC2, aPC1, aSurf, aLoc, aTol); + anEdge.Orientation(anOri); + } aPC = BRep_Tool::CurveOnSurface(anEdge, theFrefFace, Param1, Param2); aParam = (anEdge.Orientation() == TopAbs_FORWARD)? Param1 : Param2; aPoint = aPC->Value(aParam); diff --git a/tests/bugs/heal/bug33193 b/tests/bugs/heal/bug33193 new file mode 100644 index 0000000000..5726245a59 --- /dev/null +++ b/tests/bugs/heal/bug33193 @@ -0,0 +1,19 @@ +puts "=========================================" +puts "0033193: Modeling Algorithms - Regression: UnifySameDomain raises SIGSEGV" +puts "=========================================" +puts "" + +restore [locate_data_file bug33193.brep] a + +unifysamedom result a + +checkshape result + +checknbshapes result -t -solid 1 -shell 1 -face 152 -wire 202 -edge 411 -vertex 273 + +set tolres [checkmaxtol result] + +if { ${tolres} > 1.26e-7} { + puts "Error: bad tolerance of result" +} + From a85521514109a6a97b56aa940efed16c714a6b3d Mon Sep 17 00:00:00 2001 From: ika Date: Thu, 6 Oct 2022 12:39:03 +0300 Subject: [PATCH 425/639] 0030256: ACIS Import - crash while importing SAT file on constructing a pipe Fix for thin section with both first and last parameters located in one segment. --- src/GeomFill/GeomFill_SectionPlacement.cxx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/GeomFill/GeomFill_SectionPlacement.cxx b/src/GeomFill/GeomFill_SectionPlacement.cxx index a2616b4b1d..8d39b1c3cd 100644 --- a/src/GeomFill/GeomFill_SectionPlacement.cxx +++ b/src/GeomFill/GeomFill_SectionPlacement.cxx @@ -276,6 +276,8 @@ GeomFill_SectionPlacement(const Handle(GeomFill_LocationLaw)& L, Standard_Integer NbLocalPnts = 10; Standard_Integer NbPnts = (NbKnots-1) * NbLocalPnts; + if (NbPnts < 0) + NbPnts = 0; if (I1 != I2) NbPnts += NbLocalPnts; if (I3 != I4 && first < BC->Knot(I3)) From db2bfd1e834341e4b55e040d38e804ff014c7c38 Mon Sep 17 00:00:00 2001 From: gelin Date: Wed, 9 Feb 2022 13:26:39 +0800 Subject: [PATCH 426/639] 0032818: Modeling Algorithms - Result of sweep operation is invalid BRepFill_TrimShellCorner.cxx - setting correct orientation for NewEdge tests/pipe/bugs/bug32818 - new test case added --- src/BRepFill/BRepFill_TrimShellCorner.cxx | 21 +++++++++++++++++++++ tests/pipe/bugs/bug32818 | 18 ++++++++++++++++++ 2 files changed, 39 insertions(+) create mode 100644 tests/pipe/bugs/bug32818 diff --git a/src/BRepFill/BRepFill_TrimShellCorner.cxx b/src/BRepFill/BRepFill_TrimShellCorner.cxx index 77efa8fbab..ddbf218fd4 100644 --- a/src/BRepFill/BRepFill_TrimShellCorner.cxx +++ b/src/BRepFill/BRepFill_TrimShellCorner.cxx @@ -56,6 +56,7 @@ #include #include #include +#include static TopoDS_Edge FindEdgeCloseToBisectorPlane(const TopoDS_Vertex& theVertex, TopoDS_Compound& theComp, @@ -534,6 +535,26 @@ BRepFill_TrimShellCorner::MakeFacesNonSec(const Standard_Integer if(bHasNewEdge) { aNewEdge.Orientation(TopAbs_FORWARD); + + // Refer to BrepFill_Sweep.cxx BuildEdge Construct an edge via an iso + gp_Pnt P1, P2; + Standard_Real p11, p12, p21, p22; + P1 = BRep_Tool::Pnt(TopExp::FirstVertex(TopoDS::Edge(aNewEdge))); + P2 = BRep_Tool::Pnt(TopExp::LastVertex(TopoDS::Edge(aNewEdge))); + + TopoDS_Edge aERef = TopoDS::Edge(fit == 1 ? aE1 : aE2); + p11 = P1.Distance(BRep_Tool::Pnt(TopExp::FirstVertex(aERef))); + p22 = P2.Distance(BRep_Tool::Pnt(TopExp::LastVertex(aERef))); + p12 = P1.Distance(BRep_Tool::Pnt(TopExp::LastVertex(aERef))); + p21 = P2.Distance(BRep_Tool::Pnt(TopExp::FirstVertex(aERef))); + + if (p11 > p12 && p22 > p21) { + aNewEdge.Reverse(); + } + + // for nonPlane surface, we should add pCurve + Handle(ShapeFix_Edge) sfe = new ShapeFix_Edge(); + sfe->FixAddPCurve(aNewEdge, TopoDS::Face(aFace), Standard_False); } TopTools_ListOfShape aOrderedList; diff --git a/tests/pipe/bugs/bug32818 b/tests/pipe/bugs/bug32818 new file mode 100644 index 0000000000..46011451ba --- /dev/null +++ b/tests/pipe/bugs/bug32818 @@ -0,0 +1,18 @@ +puts "========" +puts "0032818: Modeling Algorithms - Result of sweep operation is invalid" +puts "========" +puts "" + +restore [locate_data_file bug32818.brep] +explode bug32818 +renamevar bug32818_1 p +renamevar bug32818_2 pr + +mksweep p +setsweep -CF +addsweep pr + +buildsweep result -R -S + +checkshape result +checknbshapes result -vertex 80 -edge 160 -wire 80 -face 80 -shell 1 -solid 1 \ No newline at end of file From 3837b3bf28356e454606c84cbaa3ca826d9f87af Mon Sep 17 00:00:00 2001 From: atereshi Date: Tue, 22 Nov 2022 16:46:06 +0300 Subject: [PATCH 427/639] 0033217: DRAW - Missed Standard_EXPORT attribute in DrawTrSurf_Set* functions --- src/DrawTrSurf/DrawTrSurf_Debug.cxx | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/DrawTrSurf/DrawTrSurf_Debug.cxx b/src/DrawTrSurf/DrawTrSurf_Debug.cxx index 1daa12d677..0a2a4b002d 100644 --- a/src/DrawTrSurf/DrawTrSurf_Debug.cxx +++ b/src/DrawTrSurf/DrawTrSurf_Debug.cxx @@ -27,7 +27,7 @@ // intended for use from debugger prompt (Command Window in Visual Studio) //! Save geometric object identified by pointer to handle -const char* DrawTrSurf_Set (const char* theNameStr, void* theHandlePtr) +Standard_EXPORT const char* DrawTrSurf_Set (const char* theNameStr, void* theHandlePtr) { if (theNameStr == 0 || theHandlePtr == 0) { @@ -57,7 +57,7 @@ const char* DrawTrSurf_Set (const char* theNameStr, void* theHandlePtr) } //! Set point to DRAW variable -const char* DrawTrSurf_SetPnt (const char* theNameStr, void* thePntPtr) +Standard_EXPORT const char* DrawTrSurf_SetPnt (const char* theNameStr, void* thePntPtr) { if (theNameStr == 0 || thePntPtr == 0) { @@ -77,7 +77,7 @@ const char* DrawTrSurf_SetPnt (const char* theNameStr, void* thePntPtr) } //! Set 2d point to DRAW variable -const char* DrawTrSurf_SetPnt2d (const char* theNameStr, void* thePnt2dPtr) +Standard_EXPORT const char* DrawTrSurf_SetPnt2d (const char* theNameStr, void* thePnt2dPtr) { if (theNameStr == 0 || thePnt2dPtr == 0) { @@ -102,17 +102,17 @@ const char* DrawTrSurf_SetPnt2d (const char* theNameStr, void* thePnt2dPtr) // work with them (DBX could, on SUN Solaris). #ifndef _MSC_VER -const char* DrawTrSurf_Set (const char* name, const Handle(Standard_Transient)& G) +Standard_EXPORT const char* DrawTrSurf_Set (const char* name, const Handle(Standard_Transient)& G) { return DrawTrSurf_Set (name, (void*)&G); } -const char* DrawTrSurf_Set (const char* theName, const gp_Pnt& thePnt) +Standard_EXPORT const char* DrawTrSurf_Set (const char* theName, const gp_Pnt& thePnt) { return DrawTrSurf_SetPnt (theName, (void*)&thePnt); } -const char* DrawTrSurf_Set (const char* theName, const gp_Pnt2d& thePnt2d) +Standard_EXPORT const char* DrawTrSurf_Set (const char* theName, const gp_Pnt2d& thePnt2d) { return DrawTrSurf_SetPnt2d (theName, (void*)&thePnt2d); } From 057dcfddf77c75cfad6a05e7f7be57d17db01e86 Mon Sep 17 00:00:00 2001 From: smoskvin Date: Sat, 26 Nov 2022 15:37:37 +0300 Subject: [PATCH 428/639] 0033225: Changing the status of tests on Ubuntu 20.04 and Windows 64 VC142 --- tests/boolean/bopfuse_simple/ZP6 | 2 + tests/bugs/caf/bug114 | 24 --- tests/bugs/caf/bug26293_2 | 17 -- tests/bugs/fclasses/bug24831 | 2 + tests/bugs/fclasses/bug7287_1 | 1 + tests/bugs/fclasses/bug7287_5 | 1 + tests/bugs/fclasses/bug7287_6 | 1 + tests/bugs/mesh/bug32424 | 18 --- tests/bugs/modalg_1/bug19071 | 5 + tests/bugs/modalg_5/bug25199 | 1 + tests/bugs/modalg_6/bug26616 | 20 --- tests/bugs/modalg_6/bug27884 | 2 + tests/bugs/modalg_7/bug29293_1 | 2 + tests/bugs/modalg_7/bug29843_1 | 48 ------ tests/bugs/moddata_3/bug162 | 3 + tests/bugs/xde/bug22898 | 1 + tests/de_mesh/gltf_write/010 | 16 -- tests/de_mesh/gltf_write/Diamond | 16 -- tests/de_mesh/gltf_write/as1draco | 18 --- tests/de_mesh/gltf_write/bearing | 16 -- tests/de_mesh/gltf_write/bull | 16 -- tests/de_mesh/gltf_write/bull_parallel | 13 -- tests/de_mesh/gltf_write/screw | 18 --- tests/de_mesh/gltf_write/soapbox | 17 -- tests/de_mesh/gltf_write/test | 20 --- tests/heal/checkshape/bug32448_10 | 8 - tests/hlr/poly_hlr/Plate | 2 +- tests/opengl/data/background/skydome | 43 ----- tests/opengl/data/general/bug25679 | 33 ---- tests/opengl/data/raytrace/bug25201 | 53 ------- tests/opengl/data/raytrace/dof_mono | 10 -- tests/opengl/data/raytrace/dof_stereo | 16 -- tests/opengl/data/raytrace/normal_map | 34 ---- tests/opengl/data/raytrace/pbr_spheres | 43 ----- tests/opengl/data/raytrace/sample_ball_alpha | 13 -- tests/opengl/data/raytrace/sample_ball_iss | 20 --- tests/opengl/data/raytrace/sample_ball_wood | 13 -- tests/opengl/data/raytrace/sample_cube | 8 - tests/opengl/data/raytrace/sample_cube_clamp | 22 --- .../opengl/data/raytrace/sample_cube_twosided | 19 --- tests/opengl/data/raytrace/sample_materials | 7 - tests/opengl/data/raytrace/tone_mapping | 14 -- tests/opengl/data/shading/pbr_spheres | 34 ---- tests/opengl/data/shading/shading_models | 68 -------- tests/opengl/data/textures/cubemap_dds | 36 ----- tests/opengl/data/textures/cubemap_ibl | 25 --- tests/opengl/data/textures/pbr_tangent_normal | 31 ---- tests/opengl/data/transparency/ior | 51 ------ tests/perf/fclasses/strtod | 2 + tests/tools/begin | 3 - tests/tools/dfbrowser/A1 | 12 -- tests/tools/dfbrowser/A2 | 23 --- tests/tools/dfbrowser/A3 | 2 - tests/tools/dfbrowser/A4 | 150 ------------------ tests/tools/dfbrowser/A5 | 78 --------- tests/tools/dfbrowser/A6 | 76 --------- tests/tools/dfbrowser/A7 | 6 - tests/tools/dfbrowser/A8 | 7 - tests/tools/dfbrowser/A9 | 12 -- tests/tools/end | 2 - tests/tools/grids.list | 3 - tests/tools/parse.rules | 3 - tests/tools/shapeview/A1 | 11 -- tests/tools/shapeview/A2 | 5 - tests/tools/vinspector/A1 | 18 --- tests/tools/vinspector/A2 | 9 -- tests/v3d/bugs/bug25760_2 | 118 -------------- tests/v3d/bugs/bug25853 | 50 ------ tests/v3d/bugs/bug30434 | 43 ----- tests/v3d/bugs/bug30437_1 | 32 ---- tests/v3d/materials/pbr1 | 16 -- tests/v3d/memory/bug172 | 25 --- tests/v3d/memory/bug26538 | 26 --- tests/v3d/memory/bug29412 | 28 ---- tests/v3d/trsf/bug24623_3 | 44 ----- tests/v3d/trsf/bug24623_4 | 37 ----- tests/v3d/trsf/bug25532 | 50 ------ tests/vselect/bugs/bug27318 | 34 ---- 78 files changed, 24 insertions(+), 1802 deletions(-) delete mode 100755 tests/bugs/caf/bug114 delete mode 100644 tests/bugs/caf/bug26293_2 delete mode 100644 tests/bugs/mesh/bug32424 delete mode 100644 tests/bugs/modalg_6/bug26616 delete mode 100644 tests/bugs/modalg_7/bug29843_1 delete mode 100644 tests/de_mesh/gltf_write/010 delete mode 100644 tests/de_mesh/gltf_write/Diamond delete mode 100644 tests/de_mesh/gltf_write/as1draco delete mode 100644 tests/de_mesh/gltf_write/bearing delete mode 100644 tests/de_mesh/gltf_write/bull delete mode 100644 tests/de_mesh/gltf_write/bull_parallel delete mode 100644 tests/de_mesh/gltf_write/screw delete mode 100644 tests/de_mesh/gltf_write/soapbox delete mode 100644 tests/de_mesh/gltf_write/test delete mode 100644 tests/heal/checkshape/bug32448_10 delete mode 100644 tests/opengl/data/background/skydome delete mode 100644 tests/opengl/data/general/bug25679 delete mode 100644 tests/opengl/data/raytrace/bug25201 delete mode 100644 tests/opengl/data/raytrace/dof_mono delete mode 100644 tests/opengl/data/raytrace/dof_stereo delete mode 100644 tests/opengl/data/raytrace/normal_map delete mode 100644 tests/opengl/data/raytrace/pbr_spheres delete mode 100644 tests/opengl/data/raytrace/sample_ball_alpha delete mode 100644 tests/opengl/data/raytrace/sample_ball_iss delete mode 100644 tests/opengl/data/raytrace/sample_ball_wood delete mode 100644 tests/opengl/data/raytrace/sample_cube delete mode 100644 tests/opengl/data/raytrace/sample_cube_clamp delete mode 100644 tests/opengl/data/raytrace/sample_cube_twosided delete mode 100644 tests/opengl/data/raytrace/sample_materials delete mode 100644 tests/opengl/data/raytrace/tone_mapping delete mode 100644 tests/opengl/data/shading/pbr_spheres delete mode 100644 tests/opengl/data/shading/shading_models delete mode 100644 tests/opengl/data/textures/cubemap_dds delete mode 100644 tests/opengl/data/textures/cubemap_ibl delete mode 100644 tests/opengl/data/textures/pbr_tangent_normal delete mode 100644 tests/opengl/data/transparency/ior delete mode 100644 tests/tools/begin delete mode 100644 tests/tools/dfbrowser/A1 delete mode 100644 tests/tools/dfbrowser/A2 delete mode 100644 tests/tools/dfbrowser/A3 delete mode 100644 tests/tools/dfbrowser/A4 delete mode 100644 tests/tools/dfbrowser/A5 delete mode 100644 tests/tools/dfbrowser/A6 delete mode 100644 tests/tools/dfbrowser/A7 delete mode 100644 tests/tools/dfbrowser/A8 delete mode 100644 tests/tools/dfbrowser/A9 delete mode 100644 tests/tools/end delete mode 100644 tests/tools/grids.list delete mode 100644 tests/tools/parse.rules delete mode 100644 tests/tools/shapeview/A1 delete mode 100644 tests/tools/shapeview/A2 delete mode 100644 tests/tools/vinspector/A1 delete mode 100644 tests/tools/vinspector/A2 delete mode 100644 tests/v3d/bugs/bug25760_2 delete mode 100644 tests/v3d/bugs/bug25853 delete mode 100644 tests/v3d/bugs/bug30434 delete mode 100644 tests/v3d/bugs/bug30437_1 delete mode 100644 tests/v3d/materials/pbr1 delete mode 100644 tests/v3d/memory/bug172 delete mode 100644 tests/v3d/memory/bug26538 delete mode 100644 tests/v3d/memory/bug29412 delete mode 100644 tests/v3d/trsf/bug24623_3 delete mode 100644 tests/v3d/trsf/bug24623_4 delete mode 100644 tests/v3d/trsf/bug25532 delete mode 100644 tests/vselect/bugs/bug27318 diff --git a/tests/boolean/bopfuse_simple/ZP6 b/tests/boolean/bopfuse_simple/ZP6 index f8b2fb8f4e..00cb1a188d 100755 --- a/tests/boolean/bopfuse_simple/ZP6 +++ b/tests/boolean/bopfuse_simple/ZP6 @@ -3,6 +3,8 @@ # #Create 3 torus +puts "TODO CR33225 Linux: Error : The area of result shape is 138625, expected 197700" + ptorus a0 100 20 tcopy a0 a1 tcopy a0 a2 diff --git a/tests/bugs/caf/bug114 b/tests/bugs/caf/bug114 deleted file mode 100755 index fafb52003c..0000000000 --- a/tests/bugs/caf/bug114 +++ /dev/null @@ -1,24 +0,0 @@ -puts "===========" -puts "OCC114" -puts "===========" - -# Max number of iterations for computing memory leackage -set i_max 10 -puts "Amount of iterations is $i_max" - -NewDocument D BinOcaf -UndoLimit D 10 - -restore [locate_data_file OCC294.brep] s - -set listmem {} -for {set i 1} {${i} <= ${i_max}} {incr i} { - - OpenCommand D - SetShape D 0:1 s - AbortCommand D - - # check memory usage (with tolerance equal to half page size) - lappend listmem [meminfo h] - checktrend $listmem 50 50 "Memory leak detected" -} diff --git a/tests/bugs/caf/bug26293_2 b/tests/bugs/caf/bug26293_2 deleted file mode 100644 index d8b8d9d23d..0000000000 --- a/tests/bugs/caf/bug26293_2 +++ /dev/null @@ -1,17 +0,0 @@ -puts "===========" -puts "OCC26293" -puts "===========" -puts "" -################################# -# Error opening the document -################################# - -Open [locate_data_file bug26293_all_geom.sgd] D -vinit -for {set i 1} {$i < 1065} {incr i} { - if { ![catch {GetShape D 0:1:$i:1:1:2 res$i}] } { - vdisplay res$i - } -} -vfit -checkview -screenshot -3d -path ${imagedir}/${test_image}.png \ No newline at end of file diff --git a/tests/bugs/fclasses/bug24831 b/tests/bugs/fclasses/bug24831 index 90d6d8de65..c1269d10b8 100644 --- a/tests/bugs/fclasses/bug24831 +++ b/tests/bugs/fclasses/bug24831 @@ -1,3 +1,5 @@ +puts "TODO ?CR33225 Windows: Failed class " + pload QAcommands QANTestStlIterators diff --git a/tests/bugs/fclasses/bug7287_1 b/tests/bugs/fclasses/bug7287_1 index 9c87d5ee3d..d6f8107bf0 100755 --- a/tests/bugs/fclasses/bug7287_1 +++ b/tests/bugs/fclasses/bug7287_1 @@ -1,3 +1,4 @@ +puts "TODO ?СК33225 Linux: Checking trend failed " puts "TODO ?OCC7287 Linux: Tcl Exception: Memory leak detected" puts "TODO ?OCC7287 Linux: TEST INCOMPLETE" puts "TODO ?OCC7287 MacOS: Tcl Exception: Memory leak detected" diff --git a/tests/bugs/fclasses/bug7287_5 b/tests/bugs/fclasses/bug7287_5 index 929094e2da..7142cffe71 100755 --- a/tests/bugs/fclasses/bug7287_5 +++ b/tests/bugs/fclasses/bug7287_5 @@ -1,3 +1,4 @@ +puts "TODO ?CR332257287 Linux: Checking trend failed: mean delta per step = 9432.0, sigma = 4220.013270121316, expected delta = 0" puts "TODO ?OCC7287 Linux: Tcl Exception: Memory leak detected" puts "TODO ?OCC7287 Linux: TEST INCOMPLETE" puts "TODO ?OCC7287 MacOS: Tcl Exception: Memory leak detected" diff --git a/tests/bugs/fclasses/bug7287_6 b/tests/bugs/fclasses/bug7287_6 index e40799f71e..25588729d3 100755 --- a/tests/bugs/fclasses/bug7287_6 +++ b/tests/bugs/fclasses/bug7287_6 @@ -1,3 +1,4 @@ +puts "TODO ?CR33225 Linux: Checking trend failed: mean delta per step = 7408.0, sigma = 2737.917456754312, expected delta = 0" puts "TODO ?OCC7287 Linux: Tcl Exception: Memory leak detected" puts "TODO ?OCC7287 Linux: TEST INCOMPLETE" puts "TODO ?OCC7287 MacOS: Tcl Exception: Memory leak detected" diff --git a/tests/bugs/mesh/bug32424 b/tests/bugs/mesh/bug32424 deleted file mode 100644 index deb41d8bfa..0000000000 --- a/tests/bugs/mesh/bug32424 +++ /dev/null @@ -1,18 +0,0 @@ -puts "=======" -puts "0032424: Mesh - Slow triangulation of a simple shape." -puts "=======" -puts "" -cpulimit 3 - -restore [locate_data_file bug32424.brep] result - -incmesh result 0.17 -a 20 - -checktrinfo result -tri 2360 -nod 1302 - -vinit -vdefaults -autoTriang 0 -vsetdispmode 1 -vdisplay result -vfit -checkview -screenshot -3d -path ${imagedir}/${test_image}.png diff --git a/tests/bugs/modalg_1/bug19071 b/tests/bugs/modalg_1/bug19071 index 5bec0ef2b0..8144c621b4 100755 --- a/tests/bugs/modalg_1/bug19071 +++ b/tests/bugs/modalg_1/bug19071 @@ -1,7 +1,12 @@ +puts "TODO CR33225 Linux: Error : The command is not valid. The area is 0." +puts "TODO CR33225 Linux: Error : The area of result shape is 0, expected 177462" +puts "TODO CR33225 Linux: is WRONG because number of " + puts "============" puts "OCC19071" puts "============" puts "" + ####################################################################### # The MakeFuse or the MakePartition function crash together on 2 torus ####################################################################### diff --git a/tests/bugs/modalg_5/bug25199 b/tests/bugs/modalg_5/bug25199 index 47d968a223..410c4600ef 100755 --- a/tests/bugs/modalg_5/bug25199 +++ b/tests/bugs/modalg_5/bug25199 @@ -1,4 +1,5 @@ puts "TODO CR30351 Windows: Faulty OCC25199: Bad tolerance edge generated by blend algorithm" +puts "TODO CR33225 Linux: Faulty OCC25199: Bad tolerance edge generated by blend algorithm" puts "============" puts "OCC25199" diff --git a/tests/bugs/modalg_6/bug26616 b/tests/bugs/modalg_6/bug26616 deleted file mode 100644 index 75391f0a0d..0000000000 --- a/tests/bugs/modalg_6/bug26616 +++ /dev/null @@ -1,20 +0,0 @@ -puts "========" -puts "OCC26616" -puts "========" -puts "" -############################################ -# Memory leak in IntTools_Context::Hatcher -############################################ - -restore [locate_data_file OCC26635_t0.brep] t0 -restore [locate_data_file OCC26635_t1.brep] t1 - -bfuse res t0 t1 - -set listmem {} -for {set i 1} {$i < 10} {incr i} { - bfuse res t0 t1 - - lappend listmem [meminfo h] - checktrend $listmem 0 64 "Memory leak detected" -} diff --git a/tests/bugs/modalg_6/bug27884 b/tests/bugs/modalg_6/bug27884 index e8bf7ec226..74509b211b 100644 --- a/tests/bugs/modalg_6/bug27884 +++ b/tests/bugs/modalg_6/bug27884 @@ -3,6 +3,8 @@ puts "OCC27884: Modeling Algorithms - Possible improvement for 2d classifier" puts "=================================================================" puts "" +puts "TODO ?CR33225 Windows: Error: algorithm slowed down" + pload ALL pload QAcommands diff --git a/tests/bugs/modalg_7/bug29293_1 b/tests/bugs/modalg_7/bug29293_1 index 9ff06449e0..5d4015de14 100644 --- a/tests/bugs/modalg_7/bug29293_1 +++ b/tests/bugs/modalg_7/bug29293_1 @@ -1,3 +1,5 @@ +puts "TODO ?CR33225 Windows: extra characters after close-quote " + puts "========" puts "OCC29293" puts "========" diff --git a/tests/bugs/modalg_7/bug29843_1 b/tests/bugs/modalg_7/bug29843_1 deleted file mode 100644 index 24e35fe3fb..0000000000 --- a/tests/bugs/modalg_7/bug29843_1 +++ /dev/null @@ -1,48 +0,0 @@ -puts "========" -puts "0029843: Modeling Algorithms - Boolean FUSE produces incorrect result" -puts "========" -puts "" - -restore [locate_data_file bug29843.brep] s - -explode s -bclearobjects -bcleartools -baddobjects s_1 -baddtools s_2 -bfillds - -bbop r_0 0 -bbop r_1 1 -bbop r_2 2 -bbop r_3 3 -bbop r_4 4 -bbuild r_5 - -foreach i { 0 1 2 3 4 5} { - checkshape r_$i - if {![regexp "OK" [bopcheck r_$i]]} { - puts "Error: r_$i is self-intersecting shape" - } -} - -checkprops r_0 -s 9.84429 -v 0.639311 -checknbshapes r_0 -wire 7 -face 5 -shell 1 -solid 1 -t - -checkprops r_1 -s 2121.39 -v 612.41 -checknbshapes r_1 -wire 38 -face 32 -shell 2 -solid 1 -t - -checkprops r_2 -s 2113.85 -v 611.569 -checknbshapes r_2 -wire 32 -face 26 -shell 2 -solid 1 -t - -checkprops r_3 -s 15.9893 -v 0.215264 -checknbshapes r_3 -wire 11 -face 9 -shell 2 -solid 2 -t - -checkprops r_4 -l 24.9725 -checksection r_4 -r 2 - -checkprops r_5 -s 2139.68 -v 612.402 -checknbshapes r_5 -wire 44 -face 36 -shell 5 -solid 4 -t - -checkview -display r_0 -2d -path ${imagedir}/${test_image}.png - diff --git a/tests/bugs/moddata_3/bug162 b/tests/bugs/moddata_3/bug162 index eff2020590..8638698c34 100644 --- a/tests/bugs/moddata_3/bug162 +++ b/tests/bugs/moddata_3/bug162 @@ -2,6 +2,9 @@ puts "========" puts "OCC162" puts "========" +puts "TODO ?CR33225 Linux: Checking trend failed " +puts "TODO ?CR33225 Linux: Tcl Exception: Memory leak detected" + pload QAcommands pload XDE diff --git a/tests/bugs/xde/bug22898 b/tests/bugs/xde/bug22898 index a86dbb8a89..39e9697788 100644 --- a/tests/bugs/xde/bug22898 +++ b/tests/bugs/xde/bug22898 @@ -1,4 +1,5 @@ puts "TODO OCC24156 MacOS: Error: unsupported locale specification" +puts "TODO CR33225 Linux: Error: unsupported locale specification" # Test for issue #22898 and other functionality that can be affected by locale. # Just run multiple conversions of the shape to and from different formats and diff --git a/tests/de_mesh/gltf_write/010 b/tests/de_mesh/gltf_write/010 deleted file mode 100644 index b9b5d1be71..0000000000 --- a/tests/de_mesh/gltf_write/010 +++ /dev/null @@ -1,16 +0,0 @@ -puts "========" -puts "0032867: Data Exchange - Implement Draco compression for writing glTF" -puts "Test case exporting model into glb (binary glTF) file." -puts "========" - -Close D0 -silent -ReadGltf D0 [locate_data_file bug32867_010.glb] - -set aGltfFile1 "${imagedir}/${casename}_tmp1.glb" -set aGltfFile2 "${imagedir}/${casename}_tmp2.glb" - -WriteGltf D0 "$aGltfFile1" -draco on -mergefaces -WriteGltf D0 "$aGltfFile2" -draco on - -ReadGltf D1 "$aGltfFile1" -ReadGltf D "$aGltfFile2" diff --git a/tests/de_mesh/gltf_write/Diamond b/tests/de_mesh/gltf_write/Diamond deleted file mode 100644 index f020c335eb..0000000000 --- a/tests/de_mesh/gltf_write/Diamond +++ /dev/null @@ -1,16 +0,0 @@ -puts "========" -puts "0032867: Data Exchange - Implement Draco compression for writing glTF" -puts "Test case exporting model into glb (binary glTF) file." -puts "========" - -Close D0 -silent -ReadGltf D0 [locate_data_file bug32867_Diamond.glb] - -set aGltfFile1 "${imagedir}/${casename}_tmp1.glb" -set aGltfFile2 "${imagedir}/${casename}_tmp2.glb" - -WriteGltf D0 "$aGltfFile1" -draco on -WriteGltf D0 "$aGltfFile2" -draco on -mergefaces - -ReadGltf D1 "$aGltfFile1" -ReadGltf D "$aGltfFile2" diff --git a/tests/de_mesh/gltf_write/as1draco b/tests/de_mesh/gltf_write/as1draco deleted file mode 100644 index f07a25a3c9..0000000000 --- a/tests/de_mesh/gltf_write/as1draco +++ /dev/null @@ -1,18 +0,0 @@ -puts "========" -puts "0032867: Data Exchange - Implement Draco compression for writing glTF" -puts "Test case exporting model into glb (binary glTF) file." -puts "========" - -Close D0 -silent -ReadStep D0 [locate_data_file as1-oc-214-mat.stp] -XGetOneShape ss D0 -incmesh ss 1.0 - -set aGltfFile1 "${imagedir}/${casename}_tmp1.glb" -set aGltfFile2 "${imagedir}/${casename}_tmp2.glb" - -WriteGltf D0 "$aGltfFile1" -draco on -WriteGltf D0 "$aGltfFile2" -draco on -mergefaces - -ReadGltf D1 "$aGltfFile1" -ReadGltf D "$aGltfFile2" diff --git a/tests/de_mesh/gltf_write/bearing b/tests/de_mesh/gltf_write/bearing deleted file mode 100644 index 46d8ae6d15..0000000000 --- a/tests/de_mesh/gltf_write/bearing +++ /dev/null @@ -1,16 +0,0 @@ -puts "========" -puts "0032867: Data Exchange - Implement Draco compression for writing glTF" -puts "Test case exporting model into glb (binary glTF) file." -puts "========" - -restore [locate_data_file bearing.brep] b -incmesh b 0.1 - -set aGltfFile1 "${imagedir}/${casename}_tmp1.glb" -set aGltfFile2 "${imagedir}/${casename}_tmp2.glb" - -WriteGltf b "$aGltfFile1" -draco on -WriteGltf b "$aGltfFile2" -draco on -mergefaces - -ReadGltf D0 "$aGltfFile1" -ReadGltf D "$aGltfFile2" diff --git a/tests/de_mesh/gltf_write/bull b/tests/de_mesh/gltf_write/bull deleted file mode 100644 index 5d7de77f3c..0000000000 --- a/tests/de_mesh/gltf_write/bull +++ /dev/null @@ -1,16 +0,0 @@ -puts "========" -puts "0032867: Data Exchange - Implement Draco compression for writing glTF" -puts "Test case exporting model into glb (binary glTF) file." -puts "========" - -Close D0 -silent -ReadGltf D0 [locate_data_file bug32867_bull.glb] - -set aGltfFile1 "${imagedir}/${casename}_tmp1.glb" -set aGltfFile2 "${imagedir}/${casename}_tmp2.glb" - -WriteGltf D0 "$aGltfFile1" -draco on -WriteGltf D0 "$aGltfFile2" -draco on -mergefaces - -ReadGltf D1 "$aGltfFile1" -ReadGltf D "$aGltfFile2" diff --git a/tests/de_mesh/gltf_write/bull_parallel b/tests/de_mesh/gltf_write/bull_parallel deleted file mode 100644 index 5e3967bd4d..0000000000 --- a/tests/de_mesh/gltf_write/bull_parallel +++ /dev/null @@ -1,13 +0,0 @@ -puts "========" -puts "0032867: Data Exchange - Implement Draco compression for writing glTF" -puts "Test case exporting model into glb (binary glTF) file." -puts "========" - -Close D0 -silent -ReadGltf D0 [locate_data_file bug32867_bull.glb] - -set aGltfFile1 "${imagedir}/${casename}_tmp1.glb" - -WriteGltf D0 "$aGltfFile1" -draco on -parallel - -ReadGltf D "$aGltfFile1" diff --git a/tests/de_mesh/gltf_write/screw b/tests/de_mesh/gltf_write/screw deleted file mode 100644 index fa7bee51c8..0000000000 --- a/tests/de_mesh/gltf_write/screw +++ /dev/null @@ -1,18 +0,0 @@ -puts "========" -puts "0032867: Data Exchange - Implement Draco compression for writing glTF" -puts "Test case exporting model into glb (binary glTF) file." -puts "========" - -Close D0 -silent -ReadStep D0 [locate_data_file screw.step] -XGetOneShape ss D0 -incmesh ss 1.0 - -set aGltfFile1 "${imagedir}/${casename}_tmp1.glb" -set aGltfFile2 "${imagedir}/${casename}_tmp2.glb" - -WriteGltf D0 "$aGltfFile1" -draco on -mergefaces -WriteGltf D0 "$aGltfFile2" -draco on - -ReadGltf D1 "$aGltfFile1" -ReadGltf D "$aGltfFile2" \ No newline at end of file diff --git a/tests/de_mesh/gltf_write/soapbox b/tests/de_mesh/gltf_write/soapbox deleted file mode 100644 index 2ec1901886..0000000000 --- a/tests/de_mesh/gltf_write/soapbox +++ /dev/null @@ -1,17 +0,0 @@ -puts "========" -puts "0032867: Data Exchange - Implement Draco compression for writing glTF" -puts "Test case exporting model into glb (binary glTF) file." -puts "========" - -ReadStep D0 [locate_data_file ec_soapbox-A.stp] -XGetOneShape ss D0 -incmesh ss 1.0 - -set aGltfFile1 "${imagedir}/${casename}_tmp1.glb" -set aGltfFile2 "${imagedir}/${casename}_tmp2.glb" - -WriteGltf D0 "$aGltfFile1" -draco on -WriteGltf D0 "$aGltfFile2" -draco on -mergefaces - -ReadGltf D1 "$aGltfFile1" -ReadGltf D "$aGltfFile2" \ No newline at end of file diff --git a/tests/de_mesh/gltf_write/test b/tests/de_mesh/gltf_write/test deleted file mode 100644 index 708cfe088e..0000000000 --- a/tests/de_mesh/gltf_write/test +++ /dev/null @@ -1,20 +0,0 @@ -puts "========" -puts "0032867: Data Exchange - Implement Draco compression for writing glTF" -puts "Test case exporting model into glb (binary glTF) file." -puts "========" - -Close D0 -silent -ReadGltf D0 [locate_data_file bug32867_test.glb] - -set aGltfFile1 "${imagedir}/${casename}_tmp1.glb" -set aGltfFile2 "${imagedir}/${casename}_tmp2.glb" - -WriteGltf D0 "$aGltfFile1" -draco on -WriteGltf D0 "$aGltfFile2" -draco on -mergefaces - -ReadGltf D1 "$aGltfFile1" -XGetOneShape s1 D1 -checktrinfo s1 -tri 9366 -ReadGltf D "$aGltfFile2" -XGetOneShape s2 D -checktrinfo s2 -tri 9366 diff --git a/tests/heal/checkshape/bug32448_10 b/tests/heal/checkshape/bug32448_10 deleted file mode 100644 index 0984113b23..0000000000 --- a/tests/heal/checkshape/bug32448_10 +++ /dev/null @@ -1,8 +0,0 @@ -puts "REQUIRED All: Faulty shapes in variables faulty_1 to faulty_6101" -puts "==========" -puts "0032448: Provide exact validating (as option) using GeomLib_CheckCurveOnSurface" -puts "==========" -puts "" - -restore [locate_data_file OCC54.brep] b -checkshape b -exact -parallel diff --git a/tests/hlr/poly_hlr/Plate b/tests/hlr/poly_hlr/Plate index 536d8018d5..54e63d22ea 100644 --- a/tests/hlr/poly_hlr/Plate +++ b/tests/hlr/poly_hlr/Plate @@ -1,5 +1,5 @@ puts "TODO OCC30286 Windows: Error : The length of result shape is 404.004, expected 404.386" -puts "TODO OCC30286 Linux: Error : The length of result shape is 404.492, expected 404.386" +puts "TODO CR33225 Linux: Error : The length of result shape is 404.004, expected 404.386" polyline f1 0 0 0 0 -10 0 100 -10 0 100 0 0 0 0 0 polyline f2 100 0 0 110 0 0 110 100 0 100 100 0 100 0 0 diff --git a/tests/opengl/data/background/skydome b/tests/opengl/data/background/skydome deleted file mode 100644 index 281bad22b6..0000000000 --- a/tests/opengl/data/background/skydome +++ /dev/null @@ -1,43 +0,0 @@ -puts "============" -puts "0032606: Visualization - add a shader for sky" -puts "============" -puts "" - -set THE_DIM 256 - -pload MODELING VISUALIZATION -psphere s 1 - -vinit View1 -width 768 -height 512 -vcamera -persp -fovy 120 - -chrono t restart -vbackground -skydome -size $THE_DIM -cloud 0.3 -sunDir 1.0 0.5 0.0 -time 10 -fog 0.3 -chrono t show -vaxo -vdump $imagedir/${casename}_day.png - -chrono t restart -vbackground -skydome -size $THE_DIM -cloud 0.3 -sunDir 1.0 -0.5 0.0 -time -10 -fog 0.05 -chrono t show -vaxo -vdump $imagedir/${casename}_night.png - -chrono t restart -vbackground -skydome -size $THE_DIM -cloud 0.15 -sunDir 1.0 0.15 0.0 -time 10 -chrono t show -vaxo -vdump $imagedir/${casename}_sunset.png - -chrono t restart -vbackground -skydome -size $THE_DIM -chrono t show -vaxo -vdump $imagedir/${casename}_defaults.png - -vdisplay -dispMode 1 s -vfit -vaspects s -material SILVER -vrenderparams -shadingModel pbr -vlight headlight -enabled 0 -vdump $imagedir/${casename}_pbr.png diff --git a/tests/opengl/data/general/bug25679 b/tests/opengl/data/general/bug25679 deleted file mode 100644 index 6a267ae414..0000000000 --- a/tests/opengl/data/general/bug25679 +++ /dev/null @@ -1,33 +0,0 @@ -puts "========" -puts "OCC25679: Visualization, TKOpenGl - View frustum culling clips wrong objects" -puts "========" -puts "" - -pload MODELING VISUALIZATION - -set LINES_IN_ROW 50 - -set aNoCulling $imagedir/${casename}_without.png -set aWithCulling $imagedir/${casename}_with.png -set aDiff $imagedir/${casename}_diff.png - -vinit View1 - -for {set i 0} {$i < $LINES_IN_ROW} {incr i} { - for {set j 0} {$j < $LINES_IN_ROW} {incr j} { - set aLineName "line" - append aLineName [expr $i * $LINES_IN_ROW + $j] - vline $aLineName 0 0 0 1 0 0 - vsetlocation $aLineName [expr $i * 3] [expr $j * 3] 0 - } -} - -vfit - -vrenderparams -frustumculling on -vdump $aWithCulling -vrenderparams -frustumculling off -vdump $aNoCulling - -set aDiffRes [diffimage $aWithCulling $aNoCulling 0.1 0 0 $aDiff] -if {$aDiffRes != 0} { puts "ERROR : Test failed: there is a difference between images rendered with and without frustum culling" } diff --git a/tests/opengl/data/raytrace/bug25201 b/tests/opengl/data/raytrace/bug25201 deleted file mode 100644 index 9896f29319..0000000000 --- a/tests/opengl/data/raytrace/bug25201 +++ /dev/null @@ -1,53 +0,0 @@ -puts "========" -puts "OCC25201: Visualization - Implementing soft shadows and ambient occlusion in OCCT ray-tracing core" -puts "========" - -pload MODELING VISUALIZATION - -# custom shapes -set aShape1 [locate_data_file occ/Top.brep] -set aShape2 [locate_data_file occ/Bottom.brep] - -# setup 3D viewer content -vinit name=View1 w=512 h=512 -vglinfo - -vvbo 0 -vsetdispmode 1 -vbackground -gradient B4C8FF B4B4B4 -gradientMode VERTICAL -vtextureenv on 4 -restore $aShape1 s1 -restore $aShape2 s2 -vdisplay s1 s2 -vsetmaterial s1 Gold -vsetmaterial s2 Silver -vsetlocation s1 0.0 0.1 0.0 -vlight -change 0 -dir 0.667 -0.667 -0.333 -smoothAngle 6 -intensity 100 -vturnview 3.0 -1.2 -0.1 -vfit - -# activate path tracing -vrenderparams -raytrace -vrenderparams -gi -vrenderparams -rayDepth 12 - -set aModeNum 0 - -vbsdf s1 roughness 6400 - -vfps 200 -vdump $imagedir/${casename}_${aModeNum}.png -incr aModeNum - -vsetmaterial s1 glass -vbsdf s1 absorpcoeff 1.0 - -vfps 200 -vdump $imagedir/${casename}_${aModeNum}.png -incr aModeNum - -vsetmaterial s2 plaster - -vfps 200 -vdump $imagedir/${casename}_${aModeNum}.png -incr aModeNum diff --git a/tests/opengl/data/raytrace/dof_mono b/tests/opengl/data/raytrace/dof_mono deleted file mode 100644 index b5ea196a06..0000000000 --- a/tests/opengl/data/raytrace/dof_mono +++ /dev/null @@ -1,10 +0,0 @@ -puts "========" -puts "Ray Tracing - check depth-of-field" -puts "========" - -source $env(CSF_OCCTSamplesPath)/tcl/pathtrace_cube.tcl - -vrenderparams -ray -gi -rayDepth 10 -iss -vrenderparams -aperture 0.1 -focal 2.0 -vfps 200 -vdump ${imagedir}/${casename}.png diff --git a/tests/opengl/data/raytrace/dof_stereo b/tests/opengl/data/raytrace/dof_stereo deleted file mode 100644 index 9e8d46260b..0000000000 --- a/tests/opengl/data/raytrace/dof_stereo +++ /dev/null @@ -1,16 +0,0 @@ -puts "========" -puts "Ray Tracing - check depth-of-field" -puts "========" - -source $env(CSF_OCCTSamplesPath)/tcl/pathtrace_cube.tcl - -vrenderparams -ray -gi -rayDepth 10 -iss -vrenderparams -aperture 0.1 -focal 2.0 - -# activate stereo -vstereo on -vstereo -mode anaglyph -vcamera -iod 0.1 -vfit -vfps 200 -vdump ${imagedir}/${casename}.png -stereo blend diff --git a/tests/opengl/data/raytrace/normal_map b/tests/opengl/data/raytrace/normal_map deleted file mode 100644 index f9e244866b..0000000000 --- a/tests/opengl/data/raytrace/normal_map +++ /dev/null @@ -1,34 +0,0 @@ -puts "========" -puts "0031275: Visualization, TKOpenGl - handle normal-map texture with Path-Tracing" -puts "========" - -pload XDE OCAF MODELING VISUALIZATION -Close D -silent -ReadGltf D [locate_data_file bug31275_SphereWithNormalMap.glb] - -vclear -vinit v -w 1024 -h 1024 -vbackground -cubemap [locate_data_file Circus_CubeMap_V.png] -vcamera -persp -vlight -clear -vlight -add ambient -XDisplay -dispmode 1 D -vback -vfit - -vrenderparams -ignoreNormalMap on -vrenderparams -ray -gi -rayDepth 10 -vfps 200 -vdump ${imagedir}/${casename}_without_normal_map.png - -vrenderparams -ignoreNormalMap off -vfps 200 -vdump ${imagedir}/${casename}_with_normal_map_back.png - -vfront -vfps 200 -vdump ${imagedir}/${casename}_with_normal_map_front.png - -vlight -add positional -pos 0 0 0 -head 1 -intensity 10 -vfps 200 -vdump ${imagedir}/${casename}_point_light.png diff --git a/tests/opengl/data/raytrace/pbr_spheres b/tests/opengl/data/raytrace/pbr_spheres deleted file mode 100644 index e2fbf0f72a..0000000000 --- a/tests/opengl/data/raytrace/pbr_spheres +++ /dev/null @@ -1,43 +0,0 @@ -puts "========" -puts "0031225: Visualization, TKOpenGl - support cubemap for environment texture within Ray-Tracing" -puts "Spheres grid with different roughness values" -puts "========" - -cpulimit 600 - -pload MODELING VISUALIZATION -vclear -vclose ALL -source $env(CSF_OCCTSamplesPath)/tcl/vis_pbr_spheres.tcl - -vrenderparams -ray -gi -rayDepth 10 -vcamera -ortho -vfit -vlight -change 1 -intensity 0.0001 -vfps 200 -vdump $::imagedir/${::casename}_ortho0.png - -vlight -change 1 -intensity 0.3 -vfps 200 -vdump $::imagedir/${::casename}_ortho30.png - -vcamera -persp -vfit -vlight -change 1 -intensity 0.0001 -vfps 200 -vdump $::imagedir/${::casename}_persp0.png - -vlight -change 1 -intensity 0.3 -vfps 200 -vdump $::imagedir/${::casename}_persp30.png - -set aCubeMap [locate_data_file Circus_CubeMap_V.png] -vlight -change 1 -intensity 1 -vbackground -cubemap $aCubeMap -vcamera -ortho -vfps 200 -vdump $::imagedir/${::casename}_orthoenv.png - -vcamera -persp -vfps 200 -vdump $::imagedir/${::casename}_perspenv.png diff --git a/tests/opengl/data/raytrace/sample_ball_alpha b/tests/opengl/data/raytrace/sample_ball_alpha deleted file mode 100644 index dfd7d58b71..0000000000 --- a/tests/opengl/data/raytrace/sample_ball_alpha +++ /dev/null @@ -1,13 +0,0 @@ -puts "============" -puts "Visualization - Path Tracing, Ball sample" -puts "============" -puts "" - -source $env(CSF_OCCTSamplesPath)/tcl/pathtrace_ball.tcl - -vtexture ball 21 -scale 0.1 0.1 -vsetmaterial ball plaster -vbsdf ball -coatFresnel Constant 0.0 - -vfps 100 -vdump $imagedir/${casename}_zoom.png diff --git a/tests/opengl/data/raytrace/sample_ball_iss b/tests/opengl/data/raytrace/sample_ball_iss deleted file mode 100644 index 32b9d31f1c..0000000000 --- a/tests/opengl/data/raytrace/sample_ball_iss +++ /dev/null @@ -1,20 +0,0 @@ -puts "============" -puts "Visualization - Path Tracing, Ball sample (ISS mode)" -puts "============" -puts "" - -cpulimit 1000 - -source $env(CSF_OCCTSamplesPath)/tcl/pathtrace_ball.tcl - -vrenderparams -iss -nbtiles 64 -vfps 1024 -vdump $imagedir/${casename}_iss_64.png - -vrenderparams -iss -nbtiles 256 -vfps 256 -vdump $imagedir/${casename}_iss_256.png - -vrenderparams -iss -nbtiles 1024 -vfps 64 -vdump $imagedir/${casename}_iss_1024.png diff --git a/tests/opengl/data/raytrace/sample_ball_wood b/tests/opengl/data/raytrace/sample_ball_wood deleted file mode 100644 index 3fd116873d..0000000000 --- a/tests/opengl/data/raytrace/sample_ball_wood +++ /dev/null @@ -1,13 +0,0 @@ -puts "============" -puts "0031135: Visualization, TKOpenGl - texture sRGB -> linear conversion is applied twice by Path Tracer" -puts "============" -puts "" - -source $env(CSF_OCCTSamplesPath)/tcl/pathtrace_ball.tcl - -vtexture ball 11 -scale 0.1 0.1 -vsetmaterial ball plaster -vbsdf ball -coatFresnel Constant 0.0 - -vfps 100 -vdump $imagedir/${casename}_zoom.png diff --git a/tests/opengl/data/raytrace/sample_cube b/tests/opengl/data/raytrace/sample_cube deleted file mode 100644 index 44c965afa9..0000000000 --- a/tests/opengl/data/raytrace/sample_cube +++ /dev/null @@ -1,8 +0,0 @@ -puts "============" -puts "Visualization - Path Tracing, Cube sample" -puts "============" -puts "" - -source $env(CSF_OCCTSamplesPath)/tcl/pathtrace_cube.tcl -vfps 200 -vdump ${imagedir}/${casename}.png diff --git a/tests/opengl/data/raytrace/sample_cube_clamp b/tests/opengl/data/raytrace/sample_cube_clamp deleted file mode 100644 index 338c7358b0..0000000000 --- a/tests/opengl/data/raytrace/sample_cube_clamp +++ /dev/null @@ -1,22 +0,0 @@ -puts "============" -puts "Visualization - Path Tracing, Cube sample with radiance clamping" -puts "============" -puts "" - -source $env(CSF_OCCTSamplesPath)/tcl/pathtrace_cube.tcl - -vrenderparams -maxrad 1.0 -vfps 100 -vdump $imagedir/${casename}_1.png - -vrenderparams -maxrad 2.0 -vfps 100 -vdump $imagedir/${casename}_2.png - -vrenderparams -maxrad 10.0 -vfps 100 -vdump $imagedir/${casename}_10.png - -vrenderparams -maxrad 100.0 -vfps 100 -vdump $imagedir/${casename}_100.png diff --git a/tests/opengl/data/raytrace/sample_cube_twosided b/tests/opengl/data/raytrace/sample_cube_twosided deleted file mode 100644 index ac872ad495..0000000000 --- a/tests/opengl/data/raytrace/sample_cube_twosided +++ /dev/null @@ -1,19 +0,0 @@ -puts "============" -puts "Visualization - Path Tracing, Cube sample" -puts "============" -puts "" - -source $env(CSF_OCCTSamplesPath)/tcl/pathtrace_cube.tcl - -vaxo -vfit -vfps 100 - -# Dump image produced with one-sided BSDFs -vdump $imagedir/${casename}_onesided.png - -vrenderparams -twoside -vfps 100 - -# Dump image produced with two-sided BSDFs -vdump $imagedir/${casename}_twosided.png diff --git a/tests/opengl/data/raytrace/sample_materials b/tests/opengl/data/raytrace/sample_materials deleted file mode 100644 index 95e25ea36c..0000000000 --- a/tests/opengl/data/raytrace/sample_materials +++ /dev/null @@ -1,7 +0,0 @@ -puts "============" -puts "Visualization - Path Tracing, Materials sample" -puts "============" -puts "" - -source $env(CSF_OCCTSamplesPath)/tcl/pathtrace_materials.tcl -vdump $imagedir/${casename}_materials.png diff --git a/tests/opengl/data/raytrace/tone_mapping b/tests/opengl/data/raytrace/tone_mapping deleted file mode 100644 index 90bd049577..0000000000 --- a/tests/opengl/data/raytrace/tone_mapping +++ /dev/null @@ -1,14 +0,0 @@ -puts "========" -puts "Ray Tracing - check tone mapping" -puts "========" - -source $env(CSF_OCCTSamplesPath)/tcl/pathtrace_cube.tcl - -vrenderparams -ray -gi -rayDepth 10 -iss - -vrenderparams -tonemapping filmic -vrenderparams -exposure -1.0 -vrenderparams -whitepoint 7.0 -vfit -vfps 200 -vdump ${imagedir}/${casename}.png diff --git a/tests/opengl/data/shading/pbr_spheres b/tests/opengl/data/shading/pbr_spheres deleted file mode 100644 index e3f3628304..0000000000 --- a/tests/opengl/data/shading/pbr_spheres +++ /dev/null @@ -1,34 +0,0 @@ -puts "========" -puts "0030700: Visualization, TKOpenGl - support PBR Metallic-Roughness shading model" -puts "Spheres grid with different roughness values" -puts "========" - -pload MODELING VISUALIZATION - -# PBR doesn't work with Compatible Profile on macOS -if { $::tcl_platform(os) == "Darwin" } { vcaps -core } - -vclear -vclose ALL -source $env(CSF_OCCTSamplesPath)/tcl/vis_pbr_spheres.tcl - -vcamera -ortho -vfit -vlight -change 1 -intensity 0.0001 -vdump $::imagedir/${::casename}_ortho0.png -vlight -change 1 -intensity 0.3 -vdump $::imagedir/${::casename}_ortho30.png -vcamera -persp -vfit -vlight -change 1 -intensity 0.0001 -vdump $::imagedir/${::casename}_persp0.png -vlight -change 1 -intensity 0.3 -vdump $::imagedir/${::casename}_persp30.png - -set aCubeMap [locate_data_file Circus_CubeMap_V.png] -vlight -change 1 -intensity 1 -vbackground -cubemap $aCubeMap -vcamera -ortho -vdump $::imagedir/${::casename}_orthoenv.png -vcamera -persp -vdump $::imagedir/${::casename}_perspenv.png diff --git a/tests/opengl/data/shading/shading_models b/tests/opengl/data/shading/shading_models deleted file mode 100644 index 76306ae990..0000000000 --- a/tests/opengl/data/shading/shading_models +++ /dev/null @@ -1,68 +0,0 @@ -puts "========" -puts "Test various Shading Models assigned per-object" -puts "========" - -pload MODELING VISUALIZATION - -# PBR doesn't work with Compatible Profile on macOS -#if { $::tcl_platform(os) == "Darwin" } { vcaps -core } - -# setup viewer -vclear -vclose ALL -vinit View1 -width 912 -height 912 - -# define spheres with a rough triangulation to easily distinguish Shading Models -psphere p0 10 -copytranslate p11 p0 0 0 0 -copytranslate p12 p0 40 0 0 -copytranslate p21 p0 0 20 0 -copytranslate p22 p0 40 20 0 -copytranslate p31 p0 0 40 0 -copytranslate p32 p0 40 40 0 -compound p11 p12 p21 p22 p31 p32 ss -incmesh ss 1 -vdefaults -autoTriang 0 - -# display objects -vdisplay -dispMode 1 p11 p12 p21 p22 p31 p32 -vdrawparray p41 triangles v 0 55 0 v 0 75 0 v 20 55 0 v 0 55 0 v 0 75 0 v 0 55 20 v 0 55 0 v 0 55 20 v 20 55 0 v 0 75 0 v 0 55 20 v 20 55 0 -vdrawparray p42 triangles v 40 55 0 v 40 75 0 v 60 55 0 v 40 55 0 v 40 75 0 v 40 55 20 v 40 55 0 v 40 55 20 v 60 55 0 v 40 75 0 v 40 55 20 v 60 55 0 -vtop -vrotate -0.9 0.1 0 -vfit - -vcaps -ffp 1 -vdump $::imagedir/${::casename}_defaults_ffp.png - -vcaps -ffp 0 -vdump $::imagedir/${::casename}_defaults.png - -# customize shading models -vaspects p11 -setShadingModel VERTEX -vdrawtext t11 Graphic3d_TOSM_VERTEX -pos 10 5 10 -color RED -aspect BOLD -vaspects p12 -setShadingModel FRAGMENT -vdrawtext t12 Graphic3d_TOSM_FRAGMENT -pos 50 5 10 -color RED -aspect BOLD - -vaspects p21 -setShadingModel PBR -vdrawtext t21 Graphic3d_TOSM_PBR -pos 10 25 10 -color RED -aspect BOLD -vaspects p22 -setShadingModel PBR_FACET -vdrawtext t22 Graphic3d_TOSM_PBR_FACET -pos 50 25 10 -color RED -aspect BOLD - -vaspects p31 -setShadingModel UNLIT -vdrawtext t31 Graphic3d_TOSM_UNLIT -pos 10 45 10 -color RED -aspect BOLD -vaspects p32 -setShadingModel FACET -vdrawtext t32 Graphic3d_TOSM_FACET -pos 50 45 10 -color RED -aspect BOLD -vaspects p41 -setShadingModel VERTEX -vdrawtext t41 Graphic3d_TOSM_VERTEX -pos 10 65 10 -color RED -aspect BOLD -vaspects p42 -setShadingModel FACET -vdrawtext t42 Graphic3d_TOSM_FACET -pos 50 65 10 -color RED -aspect BOLD -vdisplay -topmost t11 t12 t21 t22 t31 t32 t41 t42 - -vcaps -ffp 1 -vdump $::imagedir/${::casename}_ffp.png - -vcaps -ffp 0 -vlight -change 1 -intensity 0.1 -vrenderparams -shadingModel pbr -vdump $::imagedir/${::casename}.png diff --git a/tests/opengl/data/textures/cubemap_dds b/tests/opengl/data/textures/cubemap_dds deleted file mode 100644 index 60c727298e..0000000000 --- a/tests/opengl/data/textures/cubemap_dds +++ /dev/null @@ -1,36 +0,0 @@ -puts "============" -puts "0031478: Visualization, TKOpenGl - allow uploading Cubemap in compressed DDS format when supported by GPU" -puts "============" -puts "" - -pload MODELING VISUALIZATION - -if { $::tcl_platform(os) == "Darwin" } { - # PBR doesn't work with Compatible Profile on macOS - vcaps -core -} -if { [vdriver -default] == "TKOpenGles" } { - puts "Skipping test case 'DDS texture': OpenGL ES does not support sRGB S3TC_DXT1 texture format" - return -} - -set aCubeMapPNG [locate_data_file cubemap_labels.png] -set aCubeMapDDS [locate_data_file cubemap_labels.dds] - -box b 1 2 3 -psphere s 1 - -vclear -vinit View1 -w 512 -h 512 -vcamera -fovy 100 -vzbufftrihedron -#vdisplay -dispMode 1 b -vdisplay -dispMode 1 s -vfit - -vrenderparams -shadingModel pbr -vbackground -cubemap $aCubeMapPNG -invertedz -vdump $imagedir/${casename}_png.png - -vbackground -cubemap $aCubeMapDDS -invertedz -vdump $imagedir/${casename}_dds.png diff --git a/tests/opengl/data/textures/cubemap_ibl b/tests/opengl/data/textures/cubemap_ibl deleted file mode 100644 index 0f283af232..0000000000 --- a/tests/opengl/data/textures/cubemap_ibl +++ /dev/null @@ -1,25 +0,0 @@ -puts "============" -puts "0032590: Visualization, V3d_View - improve API for setting Image Based Lighting" -puts "============" -puts "" - -set aCubeMapLabs [locate_data_file cubemap_labels.png] - -pload MODELING VISUALIZATION - -# PBR doesn't work with Compatible Profile on macOS -if { $::tcl_platform(os) == "Darwin" } { vcaps -core } - -vclear -vclose ALL -source $env(CSF_OCCTSamplesPath)/tcl/vis_pbr_spheres.tcl -vcamera -fovy 100 - -vbackground -cubemap $aCubeMapLabs -pbrEnv noIBL -vdump $imagedir/${casename}_1.png - -vbackground -pbrEnv IBL -vdump $imagedir/${casename}_2.png - -vbackground BLACK -pbrEnv KEEP -vdump $imagedir/${casename}_3.png diff --git a/tests/opengl/data/textures/pbr_tangent_normal b/tests/opengl/data/textures/pbr_tangent_normal deleted file mode 100644 index e371c6cc30..0000000000 --- a/tests/opengl/data/textures/pbr_tangent_normal +++ /dev/null @@ -1,31 +0,0 @@ -puts "========" -puts "0031302: Visualization, TKOpenGl - wrong tangent space calculation for normal maps" -puts "Test for tangent space orientation." -puts "========" - -pload XDE OCAF MODELING VISUALIZATION - -# PBR doesn't work with Compatible Profile on macOS -if { $::tcl_platform(os) == "Darwin" } { vcaps -core } - -vclear -vclose ALL - -vinit v -w 1024 -h 1024 -vcamera -persp -vbackground -cubemap [locate_data_file Circus_CubeMap_V.png] -vrenderparams -shadingModel PBR - -vlight -clear -vlight -add ambient - -Close D -silent -ReadGltf D [locate_data_file bug31302_NormalTangentTest.gltf] -XDisplay -dispmode 1 D - -vfront -vfit -vdump $imagedir/${casename}_front.png - -vback -vdump $imagedir/${casename}_back.png diff --git a/tests/opengl/data/transparency/ior b/tests/opengl/data/transparency/ior deleted file mode 100644 index 1dd6f66da8..0000000000 --- a/tests/opengl/data/transparency/ior +++ /dev/null @@ -1,51 +0,0 @@ -puts "========" -puts "0031284: Visualization - XCAFDoc_VisMaterialPBR lacks Index of Refraction" -puts "========" - -pload MODELING XDE OCAF VISUALIZATION -if { $::tcl_platform(os) == "Darwin" } { vcaps -core } - -box b 0.5 1.0 -0.5 3 1 1 -psphere s1 0.5 -psphere s2 0.5 -psphere s3 0.5 -ttranslate s1 1 0 0 -ttranslate s2 2 0 0 -ttranslate s3 3 0 0 -Close D -silent -XNewDoc D -set l0 [XAddShape D b 0] -set l1 [XAddShape D s1 0] -set l2 [XAddShape D s2 0] -set l3 [XAddShape D s3 0] -XAddVisMaterial D m1 -baseColor GREEN -refractionIndex 1.0 -transparency 0.5 -metallic 0 -roughness 0 -XAddVisMaterial D m2 -baseColor GREEN -refractionIndex 1.3 -transparency 0.5 -metallic 0 -roughness 0 -XAddVisMaterial D m3 -baseColor GREEN -refractionIndex 2.5 -transparency 0.5 -metallic 0 -roughness 0 -XSetVisMaterial D $l1 m1 -XSetVisMaterial D $l2 m2 -XSetVisMaterial D $l3 m3 - -vclear -vinit View1 -vcamera -persp -vfront -XDisplay -dispMode 1 D -vfit -vviewparams -scale 245 -proj -0 -0.75 -0.66 -up 0 -0.66 0.75 -at 2.0 0.84 0.04 -vlight -change 0 -intensity 2.5 -vlight -change 1 -intensity 1.0 -set aCubeMap [locate_data_file Circus_CubeMap_V.png] -vbackground -cubemap $aCubeMap - -vrenderparams -shadingModel PBR -raster -vdump $imagedir/${casename}_pbr.png - -if { ![string match "OpenGL ES 2.0*" [vglinfo VERSION]] && ![string match "OpenGL ES 3.0*" [vglinfo VERSION]] } { - vrenderparams -raytrace -gi 0 -reflections 1 -rayDepth 10 - vfps 200 - vdump $imagedir/${casename}_rt.png - - vrenderparams -raytrace -gi 1 - vfps 200 - vdump $imagedir/${casename}_pt.png -} diff --git a/tests/perf/fclasses/strtod b/tests/perf/fclasses/strtod index 50a7369a71..71f52cb4cc 100644 --- a/tests/perf/fclasses/strtod +++ b/tests/perf/fclasses/strtod @@ -3,6 +3,8 @@ puts "Testing performance of Strtod() vs. standard strtod()" puts "=================================================================" puts "" +puts "TODO ?CR33225 Linux: is expected to be at least " + pload QAcommands # Check that performance of Strtod() and Atof() is at least twice better diff --git a/tests/tools/begin b/tests/tools/begin deleted file mode 100644 index 562c9109d9..0000000000 --- a/tests/tools/begin +++ /dev/null @@ -1,3 +0,0 @@ -if { [array get Draw_Groups "TOOLS Check commands"] == "" } { - pload TOOLS -} diff --git a/tests/tools/dfbrowser/A1 b/tests/tools/dfbrowser/A1 deleted file mode 100644 index 0c636d3e33..0000000000 --- a/tests/tools/dfbrowser/A1 +++ /dev/null @@ -1,12 +0,0 @@ -pload DCAF -pload INSPECTOR - -NewDocument Doc BinOcaf - -set aSetAttr1 100 -set aLabel 0:2 -SetInteger Doc ${aLabel} ${aSetAttr1} - -tinspector -plugins dfbrowser -tinspector -update - diff --git a/tests/tools/dfbrowser/A2 b/tests/tools/dfbrowser/A2 deleted file mode 100644 index e138425ac3..0000000000 --- a/tests/tools/dfbrowser/A2 +++ /dev/null @@ -1,23 +0,0 @@ -pload DCAF VISUALIZATION INSPECTOR - -NewDocument D BinOcaf -tinspector -plugins dfbrowser - -cpulimit 300 -UndoLimit D 100 - -NewCommand D - -NewCommand D - -set B2 [AddObject D] -set F2 [AddFunction D $B2 Box] -BoxDX D $B2 190 -BoxDY D $B2 290 -BoxDZ D $B2 390 - -InitLogBook D -AddDriver D Box Attach Cyl -ComputeFun D $F2 - -tinspector -update diff --git a/tests/tools/dfbrowser/A3 b/tests/tools/dfbrowser/A3 deleted file mode 100644 index 8e83cd5b23..0000000000 --- a/tests/tools/dfbrowser/A3 +++ /dev/null @@ -1,2 +0,0 @@ -pload INSPECTOR -tinspector -plugins dfbrowser -open $env(CSF_OCCTDataPath)/step/screw.step -select 0:1:1:1 diff --git a/tests/tools/dfbrowser/A4 b/tests/tools/dfbrowser/A4 deleted file mode 100644 index a761268241..0000000000 --- a/tests/tools/dfbrowser/A4 +++ /dev/null @@ -1,150 +0,0 @@ -pload DCAF INSPECTOR TOPTEST - -# Create the first document and set UndoLimit -NewDocument Doc1 BinOcaf -UndoLimit Doc1 100 - -# Add an attribute to a data framework -set aSetAttr1 100 -set aLabel 0:2 -SetInteger Doc1 ${aLabel} ${aSetAttr1} - - -# Create the second document -set test_name "OCC26961" -set test_int 123 -set test_real 123.456e-7 -set test_int_arr {10 20} -set test_real_arr {1.1 3.14 5.4e18} -set test_extstr_arr {"sample string 1" "string 2"} -set test_bool_arr {0 1} -set test_ref_arr {"0:1:2:3:2" "0:1:2:3:1"} -set test_byte_arr {15 25} -set test_map {1 5 2 10} -set test_map_sorted {1 2 5 10} -set test_named_ints {i1 1 i2 2} -set test_named_reals {r1 1.1 r2 2.2} -set test_named_strings {s1 string1 s2 string2 s3 string3_string_extended s4 string4_double_extended s5 string5} -set test_named_bytes {b1 65 b2 66} -set test_ref "0:1:1" -set test_guid "00000000-0000-0000-2222-000000000000" -set test_comment "Sample document containing various attributes" -set test_string "Sample string" -set test_expr "2*pi*r" -set test_var1 "0:1:2:3:2" -set test_var2 "0:1:2:3:1" -set test_point "111 222 333" -set test_axisPos "10 10 30" -set test_axisDir "11 22 33" -set test_plane "15 25 35" -set test_boxXYZ "10 20 30" -set test_boxDX 100 -set test_boxDY 200 -set test_boxDZ 300 -set test_geom_t "cir" -set test_failure 1 -set test_driver "G" -set test_driver_id "2a96b604-ec8b-11d0-bee7-080009dc3333" -set test_transp 0.5 -set test_color AQUAMARINE4 -set test_material 22 -set test_positionX 100 -set test_positionY 200 -set test_positionZ 300 - -puts "Creating document" -NewDocument D BinOcaf - -# Simple values -SetInteger D 0:1:1 $test_int -SetReal D 0:1:1 $test_real -SetName D 0:1:1 $test_name -SetComment D 0:1:1 $test_comment -SetAsciiString D 0:1:1 $test_string - -# TagSource -SetTagger D 0:1:2 - -# Reference -SetReference D 0:1:3 $test_ref - -# Directory -#NewDirectory D 0:1:2:1 - -# UAttribute -#SetUAttribute D 0:1:2:2 $test_guid - -# Variable -SetVariable D $test_var2 0 mm -SetVariable D $test_var1 1 "" - -# Relation -SetRelation D 0:1:2:3 "2*pi*r" $test_var1 $test_var2 - -# TreeNode -SetNode D 0:1:2:4 - -# Arrays -eval SetIntArray D 0:1:1 1 1 2 $test_int_arr -eval SetRealArray D 0:1:1 1 1 3 $test_real_arr -eval SetExtStringArray D 0:1:1 1 1 2 $test_extstr_arr -eval SetRefArray D 0:1:1 1 2 $test_ref_arr -eval SetByteArray D 0:1:1 1 1 2 $test_byte_arr - -# Lists -eval SetIntegerList D 0:1:1 $test_int_arr -eval SetRealList D 0:1:1 $test_real_arr -eval SetExtStringList D 0:1:1 $test_extstr_arr -eval SetBooleanList D 0:1:1 $test_bool_arr -eval SetReferenceList D 0:1:1 $test_ref_arr - -# IntPackedMap -eval SetIntPackedMap D 0:1:1 1 $test_map - -# NamedData -eval SetNDataIntegers D 0:1:4 2 $test_named_ints -eval SetNDataReals D 0:1:4 2 $test_named_reals -eval SetNDataStrings D 0:1:4 5 $test_named_strings -eval SetNDataBytes D 0:1:4 2 $test_named_bytes -eval SetNDataIntArrays D 0:1:4 ia 2 $test_int_arr -eval SetNDataRealArrays D 0:1:4 ra 3 $test_real_arr - -# NamedShape -eval box Box $test_boxXYZ $test_boxDX $test_boxDY $test_boxDZ -SetShape D 0:1:6 Box - -# Point -eval point Point $test_point -SetPoint D 0:1:5:1 Point - -# Axis -eval line Axis $test_axisPos $test_axisDir -SetAxis D 0:1:5:2 Axis - -# Plane -eval plane Plane $test_plane -SetPlane D 0:1:5:3 Plane - -# Geometry -SetGeometry D 0:1:6 $test_geom_t - -# Constraint -SetConstraint D 0:1:1 equal 0:1:6 - -# PatternStd -SetPattern D 0:1:1 5 0:1:6 - -# Function -SetFunction D 0:1:1 $test_guid $test_failure - -# AISPresentation -AISInitViewer D -AISSet D 0:1:1 $test_driver -AISTransparency D 0:1:1 $test_transp -AISColor D 0:1:1 $test_color -AISMaterial D 0:1:1 $test_material - -# Position -SetPosition D 0:1:1 $test_positionX $test_positionY $test_positionZ - -tinspector -plugins dfbrowser diff --git a/tests/tools/dfbrowser/A5 b/tests/tools/dfbrowser/A5 deleted file mode 100644 index 6fdadd115b..0000000000 --- a/tests/tools/dfbrowser/A5 +++ /dev/null @@ -1,78 +0,0 @@ -pload TOPTEST -pload VISUALIZATION -pload XDE -pload QAcommands -pload DCAF - -set Test "TNaming_Builder test" -set IsDone 1 -set TestError "" - -puts "Creating document" -NewDocument D MDTV-Standard -set TestLab 0:1 - -#################### PRIMITIVE EVOLUTION #################### -box b 100 200 300 - -explode b E -if {[catch {BuildNamedShape D $TestLab:1 PRIMITIVE b}] == 1} { - set IsDone 0 - set TestError "$TestError # Can't build solid as primitive" -} -if {[catch {BuildNamedShape D [set TestLab]:1:1 PRIMITIVE b_1}] == 1} { - set IsDone 0 - set TestError "$TestError # Can't build edge as alone primitive" -} -if {[catch {BuildNamedShape D [set TestLab]:1:1 PRIMITIVE b_1 b_2 b_3}] == 1} { - set IsDone 0 - set TestError "$TestError # Can't build several edges as primitive over the old one" -} -if {[catch {BuildNamedShape D [set TestLab]:1:2 PRIMITIVE b_4 b_5 b_6}] == 1} { - set IsDone 0 - set TestError "$TestError # Can't build several edges as primitive" -} - - -#################### GENERATED EVOLUTION #################### -box b2 200 300 400 -explode b2 F -if {[catch {BuildNamedShape D $TestLab:2 GENERATED b b2}] == 1} { - set IsDone 0 - set TestError "$TestError # Can't build solid as generation" -} -if {[catch {BuildNamedShape D [set TestLab]:2:1 GENERATED b_1 b2_1}] == 1} { - set IsDone 0 - set TestError "$TestError # Can't build face as alone generation" -} -if {[catch {BuildNamedShape D [set TestLab]:2:2 GENERATED b_2 b2_2 b_2 b2_3 b_3 b2_4}] == 1} { - set IsDone 0 - set TestError "$TestError # Can't build face as generation n:m" -} -if {[catch {BuildNamedShape D [set TestLab]:2:1 GENERATED b_3 b2_1 b_3 b2_3 b_4 b2_4}] == 1} { - set IsDone 0 - set TestError "$TestError # Can't build face as generation n:m to the exists named shape" -} - -#################### MODIFY EVOLUTION #################### -box b3 300 400 500 -explode b3 F -if {[catch {BuildNamedShape D $TestLab:3 MODIFY b2 b3}] == 1} { - set IsDone 0 - set TestError "$TestError # Can't build solid as modification" -} -if {[catch {BuildNamedShape D [set TestLab]:3:1 MODIFY b2_1 b3_1}] == 1} { - set IsDone 0 - set TestError "$TestError # Can't build face as alone modification" -} -if {[catch {BuildNamedShape D [set TestLab]:3:2 MODIFY b2_5 b3_2 b2_2 b3_3 b2_3 b3_4}] == 1} { - set IsDone 0 - set TestError "$TestError # Can't build face as modification n:m" -} -if {[catch {BuildNamedShape D [set TestLab]:3:1 MODIFY b2_3 b3_1 b_3 b3_3 b2_4 b3_4}] == 1} { - set IsDone 0 - set TestError "$TestError # Can't build face as modification n:m to the exists named shape" -} - -pload INSPECTOR -tinspector -select 0:1:3:2 TNaming_NamedShape diff --git a/tests/tools/dfbrowser/A6 b/tests/tools/dfbrowser/A6 deleted file mode 100644 index 7395f50e98..0000000000 --- a/tests/tools/dfbrowser/A6 +++ /dev/null @@ -1,76 +0,0 @@ -pload DCAF - -chrono qat start -# Create a new document and set UndoLimit -NewDocument D BinOcaf - -#NewDocument D -cpulimit 300 -UndoLimit D 100 - -# Open a transaction -NewCommand D - -puts "caf005-I3" -set QA_DUP 0 - -# Add an attribute to a data framework -set aLabel_Root 0:2 -set aName_Root Label_1 -Label D ${aLabel_Root} -SetName D ${aLabel_Root} ${aName_Root} - -set aName1 Label_1_1 -###set aChild1 [NewChild D ${aLabel_Root}] -set aChild1 0:2:1 -Label D ${aChild1} -SetName D ${aChild1} ${aName1} - -set aName2 Label_1_2 -###set aChild2 [NewChild D ${aLabel_Root}] -set aChild2 0:2:2 -Label D ${aChild2} -SetName D ${aChild2} ${aName2} - -set aName3 Label_1_1_1 -###set aChild3 [NewChild D ${aLabel_Root}] -set aChild3 0:2:3 -Label D ${aChild3} -SetName D ${aChild3} ${aName3} - -set aName4 Label_1_1_2 -###set aChild4 [NewChild D ${aLabel_Root}] -set aChild4 0:2:4 -Label D ${aChild4} -SetName D ${aChild4} ${aName4} - -set aName5 Label_1_1_3 -###set aChild5 [NewChild D ${aLabel_Root}] -set aChild5 0:2:5 -Label D ${aChild5} -SetName D ${aChild5} ${aName5} - -set aName6 Label_1_2_1 -###set aChild6 [NewChild D ${aLabel_Root}] -set aChild6 0:2:6 -Label D ${aChild6} -SetName D ${aChild6} ${aName6} - -set aName7 Label_1_2_2 -###set aChild7 [NewChild D ${aLabel_Root}] -set aChild7 0:2:7 -Label D ${aChild7} -SetName D ${aChild7} ${aName7} - -SetNode D ${aLabel_Root} -AppendNode D ${aLabel_Root} ${aChild1} -AppendNode D ${aLabel_Root} ${aChild2} -AppendNode D ${aChild1} ${aChild3} -AppendNode D ${aChild1} ${aChild4} -AppendNode D ${aChild1} ${aChild5} -AppendNode D ${aChild2} ${aChild6} -AppendNode D ${aChild2} ${aChild7} - -pload INSPECTOR - -tinspector -plugins dfbrowser -select 0:2:6 TDataStd_TreeNode diff --git a/tests/tools/dfbrowser/A7 b/tests/tools/dfbrowser/A7 deleted file mode 100644 index 1e835f2e63..0000000000 --- a/tests/tools/dfbrowser/A7 +++ /dev/null @@ -1,6 +0,0 @@ -puts "========" -puts "0029743: Samples - Inspector tool - crash by selecting TNaming_UsedShapes tree item" -puts "========" - -pload INSPECTOR -tinspector -plugins dfbrowser -open [locate_data_file bug29743.cbf] -select 0 TNaming_UsedShapes diff --git a/tests/tools/dfbrowser/A8 b/tests/tools/dfbrowser/A8 deleted file mode 100644 index c6c2e6d93f..0000000000 --- a/tests/tools/dfbrowser/A8 +++ /dev/null @@ -1,7 +0,0 @@ -puts "========" -puts "0029733: TInspector can't open several cbf files" -puts "========" - -pload INSPECTOR -tinspector -plugins dfbrowser -open [locate_data_file bug29743.cbf] -tinspector -open [locate_data_file bug29733.cbf] diff --git a/tests/tools/dfbrowser/A9 b/tests/tools/dfbrowser/A9 deleted file mode 100644 index 701be36d29..0000000000 --- a/tests/tools/dfbrowser/A9 +++ /dev/null @@ -1,12 +0,0 @@ -puts "========" -puts "0029841: Test cases from tools/dfbrowser periodically hang on Windows platform" -puts "========" - -pload INSPECTOR - -tinspector -plugins dfbrowser - -for { set i 1 } { ${i} <= 10 } { incr i } { - tinspector -open [locate_data_file bug29743.cbf] -select 0 TNaming_UsedShapes - tinspector -open [locate_data_file bug29733.cbf] -select 0 TNaming_UsedShapes -} diff --git a/tests/tools/end b/tests/tools/end deleted file mode 100644 index 57901e2abe..0000000000 --- a/tests/tools/end +++ /dev/null @@ -1,2 +0,0 @@ -# to end a test script -puts "TEST COMPLETED" diff --git a/tests/tools/grids.list b/tests/tools/grids.list deleted file mode 100644 index c8ade14958..0000000000 --- a/tests/tools/grids.list +++ /dev/null @@ -1,3 +0,0 @@ -001 dfbrowser -001 shapeview -001 vinspector diff --git a/tests/tools/parse.rules b/tests/tools/parse.rules deleted file mode 100644 index 396c2d9c2e..0000000000 --- a/tests/tools/parse.rules +++ /dev/null @@ -1,3 +0,0 @@ -SKIPPED /Draw_Failure: Could not open: TKToolsDraw/ OCCT built without Qt tools -FAILED /\bFaulty\b/ bad shape -OK /Relative error of mass computation/ message from vprops \ No newline at end of file diff --git a/tests/tools/shapeview/A1 b/tests/tools/shapeview/A1 deleted file mode 100644 index 5093256077..0000000000 --- a/tests/tools/shapeview/A1 +++ /dev/null @@ -1,11 +0,0 @@ -pload ALL INSPECTOR - -tinspector -plugins shapeview - -box b1 200 100 120 -tinspector -shape b1 - -box b2 100 200 220 100 120 100 -tinspector -shape b2 - -tinspector -activate shapeview -select b1 diff --git a/tests/tools/shapeview/A2 b/tests/tools/shapeview/A2 deleted file mode 100644 index 0e78f445b9..0000000000 --- a/tests/tools/shapeview/A2 +++ /dev/null @@ -1,5 +0,0 @@ -pload ALL INSPECTOR - -tinspector -plugins shapeview - -tinspector -open $env(CSF_OCCTDataPath)/occ/solid.brep shapeview diff --git a/tests/tools/vinspector/A1 b/tests/tools/vinspector/A1 deleted file mode 100644 index abc11f94f7..0000000000 --- a/tests/tools/vinspector/A1 +++ /dev/null @@ -1,18 +0,0 @@ -pload ALL INSPECTOR - -tinspector -plugins vinspector - -vinit - -box box_1 0 0 200 100 100 100 -vdisplay box_1 -vselmode box_1 1 1 -vselmode box_1 3 1 - -box box_2 180 120 200 150 150 150 -vdisplay box_2 - -vfit - -tinspector -update -select box_1 - diff --git a/tests/tools/vinspector/A2 b/tests/tools/vinspector/A2 deleted file mode 100644 index 54c60660ff..0000000000 --- a/tests/tools/vinspector/A2 +++ /dev/null @@ -1,9 +0,0 @@ -pload ALL INSPECTOR - -tinspector -plugins vinspector - -vinit - -tinspector -open $env(CSF_OCCTDataPath)/occ/solid.brep -vfit - diff --git a/tests/v3d/bugs/bug25760_2 b/tests/v3d/bugs/bug25760_2 deleted file mode 100644 index 39f34661fe..0000000000 --- a/tests/v3d/bugs/bug25760_2 +++ /dev/null @@ -1,118 +0,0 @@ -puts "============" -puts "CR25760: Visualization - precision factor added to ZNear, ZFar in method ZFitAll() of Graphic3d_Camera is not enough" -puts "============" -puts "" - -pload MODELING VISUALIZATION -vinit View1 w=409 h=409 -vclear - -vclear -vautozfit 0 - -proc test3d {dstart} { - - set proj1 { 0.47243081629544409 -0.39335870920278265 -0.78871924644244684} - set proj2 {-0.31828216872577886 0.17649241059446089 -0.93142197208020105} - - for {set i 1} {$i <= 3} {incr i} { - for {set r 1} {$r <= 3} {incr r} { - - set x [expr pow(100, $i)] - set y [expr pow( 70, $i)] - set z [expr pow( 50, $i)] - set dist [expr pow(100, $r)] - - vclear - vertex v0 $x $y $z - vertex v1 [expr "$x + ($dist * [lindex $proj1 0])"] [expr "$y + ($dist * [lindex $proj1 1])"] [expr "$z + ($dist * [lindex $proj1 2])"] - vertex v2 [expr "$x + ($dist * [lindex $proj2 0])"] [expr "$y + ($dist * [lindex $proj2 1])"] [expr "$z + ($dist * [lindex $proj2 2])"] - - for {set d [expr $dstart * {max ($x,$y,$z,$dist)}]} {$d <= 1e7} {set d [expr "abs ($d) * 1.2E5"]} { - for {set p 1} {$p <= 2} {incr p} { - set proj [set proj$p] - - vremove -all - vdisplay v0 - vdisplay v$p - vviewparams -eye [expr "$x - ($d * [lindex $proj 0])"] [expr "$y - ($d * [lindex $proj 1])"] [expr "$z - ($d * [lindex $proj 2])"] -at $x $y $z - vzfit - - vremove -all - vdisplay v0 - if { [checkcolor 204 204 1 1 0] != 1 } { - puts "Error: 3D projection test failed with the following parameters:" - vviewparams - vzrange - puts "" - puts "v1 x: $x" - puts "v1 y: $y" - puts "v1 z: $z" - puts "v2 x: [expr $x + ($dist * [lindex $proj 0])]" - puts "v2 y: [expr $y + ($dist * [lindex $proj 1])]" - puts "v2 z: [expr $z + ($dist * [lindex $proj 2])]" - puts "" - return 0 - } - - vremove -all - vdisplay v$p - if { [checkcolor 204 204 1 1 0] != 1 } { - puts "Error: 3D projection test failed with the following parameters:" - vviewparams - vzrange - puts "" - puts "v1 x: $x" - puts "v1 y: $y" - puts "v1 z: $z" - puts "v2 x: [expr $x + ($dist * [lindex $proj 0])]" - puts "v2 y: [expr $y + ($dist * [lindex $proj 1])]" - puts "v2 z: [expr $z + ($dist * [lindex $proj 2])]" - puts "" - return 0 - } - } - } - } - } - return 1 -} - -set tcl_precision 16 - -#################################################################### -# Test orthographic camera without frustum culling. # -# Test camera with scale 1E-8 to avoid jittering. # -#################################################################### -vcamera -ortho -vviewparams -scale 1e-8 -vrenderparams -frustumculling off -if { [test3d 1e-7] != 1 } { puts "Error: 3D projection test failed: camera is orthographic, view frustum culling is OFF" } - -#################################################################### -# Test orthographic camera with frustum culling. # -# Test camera with scale 1E-8 to avoid jittering. # -#################################################################### -vcamera -ortho -vviewparams -scale 1e-8 -vrenderparams -frustumculling on - -if { [test3d 1e-7] != 1 } { - puts "Error: 3D projection test failed: camera is orthographic, view frustum culling is ON" -} - -#################################################################### -# Test perspective camera without frustum culling. # -# Test camera with less starting distance 1.0 to avoid jittering. # -#################################################################### -vcamera -persp -vrenderparams -frustumculling off -if { [test3d 1.0] != 1 } { puts "Error: 3D projection test failed: camera is perspective, view frustum culling is OFF" } - -#################################################################### -# Test perspective camera with frustum culling. # -# Test camera with less starting distance 1.0 to avoid jittering. # -#################################################################### -vcamera -persp -vrenderparams -frustumculling on -if { [test3d 1.0] != 1 } { puts "Error: 3D projection test failed: camera is perspective, view frustum culling is ON" } diff --git a/tests/v3d/bugs/bug25853 b/tests/v3d/bugs/bug25853 deleted file mode 100644 index ad187c10ef..0000000000 --- a/tests/v3d/bugs/bug25853 +++ /dev/null @@ -1,50 +0,0 @@ -puts "==========" -puts "OCC25853: Edges disappear or reappear when displaying new edges" -puts "==========" -puts "" - -pload MODELING VISUALIZATION -vinit View1 w=1024 h=1024 -vsetdispmode View1 1 -vclear - -#vtop -set scale 0.086865724500890112 -set vpprojx 0.0 -set vpprojy 0.0 -set vpprojz 1.0 -set vpupx 0.0 -set vpupy 1.0 -set vpupz 0.0 -set vpatx 4995 -set vpaty 500 -set vpatz 0 -set vpeyex 4995 -set vpeyey 500 -set vpeyez 0.0001 -vviewparams -scale $scale -eye $vpeyex $vpeyey $vpeyez -at $vpatx $vpaty $vpatz -up $vpupx $vpupy $vpupz -proj $vpprojx $vpprojy $vpprojz - -set NB 1000 - -proc draw_lines {{distance 10.0}} { - # set colors to corner spheres - for {set i 0} {$i < $::NB} {incr i} { - set x [expr $i * $distance] - set ya 0.0 - set yb 1000.0 - set z 0.0 - vertex v1 $x $ya $z - vertex v2 $x $yb $z - edge e$i v1 v2 - vdisplay -update e$i - puts "$i: $x $ya $yb $z" - } -} - -puts "Start test lines" -draw_lines 10.0 - -checkcolor 804 483 1 0 0 -checkcolor 860 500 1 0 0 - -vdump $imagedir/${casename}.png diff --git a/tests/v3d/bugs/bug30434 b/tests/v3d/bugs/bug30434 deleted file mode 100644 index e1ebfa8441..0000000000 --- a/tests/v3d/bugs/bug30434 +++ /dev/null @@ -1,43 +0,0 @@ -puts "=============" -puts "0030434: Visualization, TKV3d - add 'NoUpdate' state of frustum culling optimization" -puts "=============" - -pload VISUALIZATION -vclear -vinit View1 - -set THE_NB_POINTS 10 -puts "Creating [expr $THE_NB_POINTS * $THE_NB_POINTS * $THE_NB_POINTS] points..." -for {set i 0} {$i < $THE_NB_POINTS} {incr i} { - for {set j 0} {$j < $THE_NB_POINTS} {incr j} { - for {set k 0} {$k < $THE_NB_POINTS} {incr k} { - vpoint p$i$j$k 3.*$i 3.*$j 3.*$k - } - } -} - -vcamera -ortho -vfront -vfit -vzoom 2 -vrenderparams -frustumculling on -vrenderparams -frustumculling noupdate -vfit -if { [vreadpixel 92 92 rgb name] == "YELLOW" } { puts "Error: point should be clipped earlier" } -vdump $::imagedir/${::casename}_ortho_culled.png -vrenderparams -frustumculling off -if { [vreadpixel 92 92 rgb name] != "YELLOW" } { puts "Error: point should NOT be clipped" } -vdump $::imagedir/${::casename}_ortho_all.png - -vcamera -persp -vaxo -vfit -vzoom 3 -vrenderparams -frustumculling on -vrenderparams -frustumculling noupdate -vfit -if { [vreadpixel 114 92 rgb name] == "YELLOW" } { puts "Error: point should be clipped earlier" } -vdump $::imagedir/${::casename}_persp_culled.png -vrenderparams -frustumculling off -if { [vreadpixel 114 92 rgb name] != "YELLOW" } { puts "Error: point should NOT be clipped" } -vdump $::imagedir/${::casename}_persp_all.png diff --git a/tests/v3d/bugs/bug30437_1 b/tests/v3d/bugs/bug30437_1 deleted file mode 100644 index 39e8aab967..0000000000 --- a/tests/v3d/bugs/bug30437_1 +++ /dev/null @@ -1,32 +0,0 @@ -puts "=============" -puts "0030437: Visualization, TKV3d - add Draw command to print rendering statistics" -puts "=============" - -pload MODELING VISUALIZATION -vclear -vinit View1 - -set THE_NB_POINTS 10 -puts "Creating [expr $THE_NB_POINTS * $THE_NB_POINTS * $THE_NB_POINTS] points..." -for {set i 0} {$i < $THE_NB_POINTS} {incr i} { - for {set j 0} {$j < $THE_NB_POINTS} {incr j} { - for {set k 0} {$k < $THE_NB_POINTS} {incr k} { - vpoint p$i$j$k 3.*$i 3.*$j 3.*$k - } - } -} - -vcamera -ortho -vfront -vfit -vzoom 2 -set aPointsNb_1 [vstatprofiler points] -if [expr $aPointsNb_1 != 160] { puts "Error: unexpected number of not culled points 1" } - -vcamera -persp -vaxo -vfit -vzoom 3 -set aPointsNb_2 [vstatprofiler points] -if [expr $aPointsNb_2 != 307] { puts "Error: unexpected number of not culled points 2" } -vdump $imagedir/${casename}.png diff --git a/tests/v3d/materials/pbr1 b/tests/v3d/materials/pbr1 deleted file mode 100644 index 384f1bead5..0000000000 --- a/tests/v3d/materials/pbr1 +++ /dev/null @@ -1,16 +0,0 @@ -# PBR requires OpenGL 3.0+ on macOS -pload VISUALIZATION -pload OPENGL -if { $::tcl_platform(os) == "Darwin" } { vcaps -core } - -source $env(CSF_OCCTSamplesPath)/tcl/materials.tcl -vlight -change 0 -intensity 5 -vrenderparams -shadingModel PBR -msaa 0 -vdump $imagedir/${casename}_default.png - -set aCubeMap [locate_data_file Circus_CubeMap_V.png] -vbackground -cubemap $aCubeMap -vdump $imagedir/${casename}_env.png - -vbackground -cubemap $aCubeMap -invertedz -vdump $imagedir/${casename}_env_iz.png diff --git a/tests/v3d/memory/bug172 b/tests/v3d/memory/bug172 deleted file mode 100644 index dacd99c8de..0000000000 --- a/tests/v3d/memory/bug172 +++ /dev/null @@ -1,25 +0,0 @@ -puts "========" -puts "OCC172" -puts "========" - -pload XDE VISUALIZATION QAcommands - -# disable VBO to avoid false memory leaks reported on NVIDIA graphics, see issue #29996 -pload OPENGL -vcaps -vbo 0 - -vinit View1 -restore [locate_data_file OCC162.brep] s -vdisplay s - -set listmem {} -set i_max 10 -for {set i 1} {${i} <= ${i_max}} {incr i} { - # select shape - OCC172 - # deselect shape - OCC172 - - lappend listmem [meminfo h] - checktrend $listmem 0 1 "Memory leak detected" -} diff --git a/tests/v3d/memory/bug26538 b/tests/v3d/memory/bug26538 deleted file mode 100644 index ea409df48f..0000000000 --- a/tests/v3d/memory/bug26538 +++ /dev/null @@ -1,26 +0,0 @@ -puts "============" -puts "OCC26538: Visualization - Infinite growth of maxtrix stack in OpenGl_Structure::Render" -puts "============" -puts "" - -pload MODELING VISUALIZATION -box b1 1 1 1 -box b2 1 1 1 - -vclear -vinit View1 -vdisplay b1 b2 -vsetlocation b2 10 10 10 -vfit - -set listmem {} -set aNbChecks 50 -for {set anIter 1} {$anIter <= $aNbChecks} {incr anIter} { - vfps 100 - lappend listmem [meminfo h] - #checktrend $listmem 0 1 "Memory leak detected" -} -puts $listmem - -checktrend $listmem 0 1 "Memory leak detected" -vdump ${imagedir}/${casename}.png diff --git a/tests/v3d/memory/bug29412 b/tests/v3d/memory/bug29412 deleted file mode 100644 index b82d855ab7..0000000000 --- a/tests/v3d/memory/bug29412 +++ /dev/null @@ -1,28 +0,0 @@ -puts "# ===================================================================" -puts "# 0029412: Huge Memory leak since I upgraded to OC 6.9.0" -puts "# ===================================================================" -puts "" - -pload VISUALIZATION QAcommands -pload OPENGL -vcaps -vsync 0 -vinit View1 -vglinfo - -OCC29412 100 ;# just to initialize - -meminfo -vmemgpu - -set heap_before [meminfo heap] -OCC29412 -set heap_after [meminfo heap] - -meminfo -vmemgpu - -# check that memory increase is moderate: can be up to 75 KiB on Debian; -# note that the leak in OCCT 6.9.0 - 7.0.0 was ~ 19 MiB -if { $heap_after - $heap_before > 100 * 1024 } { - puts "Error: memory leak of [expr ($heap_after - $heap_before) / 1024] KiB" -} diff --git a/tests/v3d/trsf/bug24623_3 b/tests/v3d/trsf/bug24623_3 deleted file mode 100644 index 46dd910329..0000000000 --- a/tests/v3d/trsf/bug24623_3 +++ /dev/null @@ -1,44 +0,0 @@ -puts "============" -puts "OCC24623_3: Visualization - improve selection mechanism" -puts "Tests memory leaks in creation of selection primitives for connected interactive objects:" -puts "checks that there is no 'dead links' in removing Select3D_BVHPrimitiveContent" -puts "============" -puts "" - -pload MODELING VISUALIZATION -psphere s 0.5 -tclean s -incmesh s 0.001 -trinfo s - -set aMemInit [meminfo h] -set aNb 1000 - -# display as copies -eval compound [lrepeat $aNb s] ss -explode ss -for {set i 1} {$i <= $aNb} {incr i} { vloadselection ss_${i}; vsetlocation -noupdate ss_${i} ${i} 0 0 } -vfit -set aMemSel1 [meminfo h] -vclear -set aMemClear1 [meminfo h] - -# display as connected instances of single presentation -vconnectto i_1 0 0 0 s -nodisplay -vloadselection i_1 -for {set i 2} {$i < $aNb} {incr i} { vconnectto i_${i} ${i} 0 0 i_1 -nodisplay; vloadselection i_${i} } -set aMemSel2 [meminfo h] -vclear -set aMemClear2 [meminfo h] - -puts "Initial memory : [expr $aMemInit / (1024 * 1024)] MiB" -puts "Compute selection (simple) : [expr $aMemSel1 / (1024 * 1024)] MiB" -puts "Clearing (simple) : [expr $aMemClear1 / (1024 * 1024)] MiB" -puts "Compute selection (connected): [expr $aMemSel2 / (1024 * 1024)] MiB" -puts "Clearing (connected) : [expr $aMemClear2 / (1024 * 1024)] MiB" - -set aRatio [expr $aMemClear2 / double($aMemClear1)] - -# check if the memory difference is greater than 10% -if {[expr $aRatio > 1.1]} { puts "Error : TEST FAILED" } -vdump $imagedir/${casename}.png diff --git a/tests/v3d/trsf/bug24623_4 b/tests/v3d/trsf/bug24623_4 deleted file mode 100644 index 997603f3ce..0000000000 --- a/tests/v3d/trsf/bug24623_4 +++ /dev/null @@ -1,37 +0,0 @@ -puts "============" -puts "OCC24623_4: Visualization - improve selection mechanism" -puts "Tests memory leaks in creation of selection primitives for connected interactive objects:" -puts "checks that there is no 'dead links' to reference interactives after its clearing" -puts "============" -puts "" - -pload MODELING VISUALIZATION -psphere s 0.5 -tclean s -incmesh s 0.001 -trinfo s -vinit -vclear - -set aMemInit [meminfo h] -set anIterNb 100 - -for {set anIterCount 0} {$anIterCount < $anIterNb} {incr anIterCount} { - set aNb 11 - - vconnectto i_1 0 0 0 s -nodisplay - vloadselection i_1 - for {set i 2} {$i < $aNb} {incr i} { vconnectto i_${i} ${i} 0 0 i_1 -nodisplay; vloadselection i_${i} } - vclear -} - -set aMemClear [meminfo h] - -puts "Initial memory : [expr $aMemInit / (1024 * 1024)] MiB" -puts "Clearing : [expr $aMemClear / (1024 * 1024)] MiB" - -set aRatio [expr $aMemClear / double($aMemInit)] - -# check if the memory difference is greater than 20% -if {[expr $aRatio > 1.2]} { puts "Error : TEST FAILED" } -vdump $imagedir/${casename}.png diff --git a/tests/v3d/trsf/bug25532 b/tests/v3d/trsf/bug25532 deleted file mode 100644 index 4f24614136..0000000000 --- a/tests/v3d/trsf/bug25532 +++ /dev/null @@ -1,50 +0,0 @@ -puts "============" -puts "OCC25532: Visualization - fix cross-references between AIS_ConnectedInteractive and connected presentation" -puts "============" -puts "" - -pload MODELING VISUALIZATION -pload OPENGL -psphere s 0.5 -tclean s -incmesh s 0.001 -trinfo s - -vclear -vinit View1 -vaxo -vcaps -vbo 0 -vsetdispmode 1 -vdefaults -absDefl 1.0 -vselprops -autoactivate 0 - -set aMemInit [meminfo h] -set aNb 1000 - -# display as copies -eval compound [lrepeat $aNb s] ss -explode ss -for {set i 1} {$i <= $aNb} {incr i} { vdisplay -noupdate ss_${i}; vsetlocation -noupdate ss_${i} ${i} 0 0 } -vfit -set aMemDisp1 [meminfo h] -vclear -set aMemClear1 [meminfo h] - -# display as connected instances of single presentation -vconnectto i_1 0 0 0 s -for {set i 2} {$i < $aNb} {incr i} { vconnectto i_${i} ${i} 0 0 i_1 } -set aMemDisp2 [meminfo h] -vclear -set aMemClear2 [meminfo h] - -puts "Initial memory: [expr $aMemInit / (1024 * 1024)] MiB" -puts "Displaying (simple): [expr $aMemDisp1 / (1024 * 1024)] MiB" -puts "Clearing (simple): [expr $aMemClear1 / (1024 * 1024)] MiB" -puts "Displaying (connected): [expr $aMemDisp2 / (1024 * 1024)] MiB" -puts "Clearing (connected): [expr $aMemClear2 / (1024 * 1024)] MiB" - -set aRatio [expr $aMemClear2 / double($aMemClear1)] - -# check if the memory difference is greater than 20% -if [expr $aRatio > 1.2] { puts "Error : TEST FAILED" } -vdump ${imagedir}/${casename}.png diff --git a/tests/vselect/bugs/bug27318 b/tests/vselect/bugs/bug27318 deleted file mode 100644 index ec682f0958..0000000000 --- a/tests/vselect/bugs/bug27318 +++ /dev/null @@ -1,34 +0,0 @@ -puts "TODO OCC27318 MacOS: Error : TEST FAILED" - -puts "========" -puts "OCC27318: Memory is not released in Select3D_SensitiveSet when destroying AIS_InteractiveContext without removing objects" -puts "========" -puts "" - -pload VISUALIZATION QAcommands - -# to measure initial memory correctly, open and close interactive context -# to load FreeImage -vinit -vclose -set aMemInit [meminfo h] -puts "Initial mem: [expr $aMemInit / (1024 * 1024)] MiB ([expr $aMemInit])" - -# create a box and display it in each interactive context. The context is -# the only instance that references to the box. Therefore, the box must be -# removed completely after each context's closing -for {set anIter 0} {$anIter < 300} {incr anIter} { - vinit - OCC27318 - vclose -} - -set aMemAfter [meminfo h] -puts "Memory after closing interactive context several times: [expr $aMemAfter / (1024 * 1024)] MiB ([expr $aMemAfter])" - -set aRatio [expr $aMemAfter / double($aMemInit)] - -# check if the memory difference is greater than 5% -if [expr $aRatio > 1.05] { - puts "Error : TEST FAILED" -} From 3eb891ec496520ed05ea35101af6d8497f4d4e87 Mon Sep 17 00:00:00 2001 From: akaftasev Date: Thu, 17 Nov 2022 10:25:36 +0300 Subject: [PATCH 429/639] 0033180: We had a problem calling the OCC library at the customer site, and the program crashed Added status for thrusection operations and changed throw constructions to set of the status and break the function. --- src/BRepFill/BRepFill_CompatibleWires.cxx | 69 ++++++++++----- src/BRepFill/BRepFill_CompatibleWires.hxx | 8 +- src/BRepFill/BRepFill_Generator.cxx | 55 +++++++++--- src/BRepFill/BRepFill_Generator.hxx | 8 ++ .../BRepFill_ThruSectionErrorStatus.hxx | 29 +++++++ src/BRepFill/FILES | 1 + .../BRepOffsetAPI_ThruSections.cxx | 54 ++++++++++-- .../BRepOffsetAPI_ThruSections.hxx | 7 ++ src/BRepTest/BRepTest_SweepCommands.cxx | 27 +++++- tests/bugs/modalg_6/bug26636 | 11 ++- tests/bugs/modalg_8/bug33180 | 83 +++++++++++++++++++ tests/thrusection/bugs/bug24997 | 3 +- 12 files changed, 308 insertions(+), 47 deletions(-) create mode 100644 src/BRepFill/BRepFill_ThruSectionErrorStatus.hxx create mode 100644 tests/bugs/modalg_8/bug33180 diff --git a/src/BRepFill/BRepFill_CompatibleWires.cxx b/src/BRepFill/BRepFill_CompatibleWires.cxx index ebb01adf79..bc80acbe44 100644 --- a/src/BRepFill/BRepFill_CompatibleWires.cxx +++ b/src/BRepFill/BRepFill_CompatibleWires.cxx @@ -656,7 +656,7 @@ static void BuildConnectedEdges(const TopoDS_Wire& aWire, //======================================================================= BRepFill_CompatibleWires::BRepFill_CompatibleWires() -:myIsDone(Standard_False) +:myStatus(BRepFill_ThruSectionErrorStatus_NotDone) { } @@ -682,7 +682,7 @@ void BRepFill_CompatibleWires::Init(const TopTools_SequenceOfShape& Sections) myInit = Sections; myWork = Sections; myPercent = 0.01; - myIsDone = Standard_False; + myStatus = BRepFill_ThruSectionErrorStatus_NotDone; myMap.Clear(); } @@ -707,7 +707,7 @@ void BRepFill_CompatibleWires::SetPercent(const Standard_Real Percent) Standard_Boolean BRepFill_CompatibleWires::IsDone() const { - return myIsDone; + return myStatus == BRepFill_ThruSectionErrorStatus_Done; } @@ -766,6 +766,7 @@ Standard_Boolean BRepFill_CompatibleWires::IsDegeneratedLastSection() const void BRepFill_CompatibleWires::Perform (const Standard_Boolean WithRotation) { + myStatus = BRepFill_ThruSectionErrorStatus_Done; // compute origin and orientation on wires to avoid twisted results // and update wires to have same number of edges @@ -838,7 +839,7 @@ void BRepFill_CompatibleWires::Perform (const Standard_Boolean WithRotation) allClosed = (allClosed && wClosed); allOpen = (allOpen && !wClosed); } - + if (allClosed) { // All sections are closed if (report) { @@ -849,24 +850,26 @@ void BRepFill_CompatibleWires::Perform (const Standard_Boolean WithRotation) // origin ComputeOrigin(Standard_False); } - myIsDone = Standard_True; } else if (allOpen) { // All sections are open // origin SearchOrigin(); + if (myStatus != BRepFill_ThruSectionErrorStatus_Done) + { + return; + } // same number of elements if (report) { SameNumberByACR(report); } - myIsDone = Standard_True; } else { // There are open and closed sections : // not processed - throw Standard_DomainError("Sections must be all closed or all open"); + myStatus = BRepFill_ThruSectionErrorStatus_NotSameTopology; + return; } - } @@ -906,7 +909,10 @@ void BRepFill_CompatibleWires:: //allClosed = (allClosed && myWork(i).Closed()); } if (!allClosed) - throw Standard_NoSuchObject("BRepFill_CompatibleWires::SameNumberByPolarMethod : the wires must be closed"); + { + myStatus = BRepFill_ThruSectionErrorStatus_NotSameTopology; + return; + } // sections ponctuelles, sections bouclantes ? if (myDegen1) ideb++; @@ -986,8 +992,11 @@ void BRepFill_CompatibleWires:: // sequence of vertices of the first wire SeqOfVertices(wire1,SeqV); - if (SeqV.Length()>NbMaxV) - throw Standard_NoSuchObject("BRepFill::SameNumberByPolarMethod failed"); + if (SeqV.Length() > NbMaxV) + { + myStatus = BRepFill_ThruSectionErrorStatus_Failed; + return; + } // loop on vertices of wire1 for (ii=1;ii<=SeqV.Length();ii++) { @@ -1062,7 +1071,10 @@ void BRepFill_CompatibleWires:: // sequence of vertices of the first wire SeqOfVertices(wire1,SeqV); if ( SeqV.Length()>NbMaxV || SeqV.Length()>SizeMap ) - throw Standard_NoSuchObject("BRepFill::SameNumberByPolarMethod failed"); + { + myStatus = BRepFill_ThruSectionErrorStatus_Failed; + return; + } // next wire @@ -1184,14 +1196,17 @@ void BRepFill_CompatibleWires:: } } //end of for(; itW.More(); itW.Next()) if (Esol.IsNull()) - throw Standard_ConstructionError("BRepFill :: profiles are inconsistent"); + { + myStatus = BRepFill_ThruSectionErrorStatus_ProfilesInconsistent; + return; + } MW.Add(Esol); TopTools_ListOfShape ConnectedEdges; BuildConnectedEdges( TopoDS::Wire(myWork(i)), Esol, V2, ConnectedEdges ); TopTools_ListIteratorOfListOfShape itCE(ConnectedEdges); - for(; anExp.More(), itCE.More(); anExp.Next(), itCE.Next()) + for(; anExp.More() && itCE.More(); anExp.Next(), itCE.Next()) { ECur = anExp.Current(); TopExp::Vertices(ECur,VF,VL,Standard_True); @@ -1264,8 +1279,10 @@ void BRepFill_CompatibleWires:: if (nbmaxnbEdges) nbmin = nbEdges; } - if (nbmin!=nbmax) { - throw Standard_NoSuchObject("BRepFill_CompatibleWires::SameNumberByPolarMethod failed"); + if (nbmin!=nbmax) + { + myStatus = BRepFill_ThruSectionErrorStatus_Failed; + return; } //Fill @@ -1487,7 +1504,10 @@ void BRepFill_CompatibleWires::SameNumberByACR(const Standard_Boolean report) if (nbmin>nbEdges(i)) nbmin = nbEdges(i); } if (nbmax!=nbmin) - throw Standard_NoSuchObject("BRepFill_CompatibleWires::SameNumberByACR failed"); + { + myStatus = BRepFill_ThruSectionErrorStatus_Failed; + return; + } } //======================================================================= @@ -1532,7 +1552,10 @@ void BRepFill_CompatibleWires::ComputeOrigin(const Standard_Boolean /*polar*/ ) } */ if (!allClosed) - throw Standard_NoSuchObject("BRepFill_CompatibleWires::ComputeOrigin : the wires must be closed"); + { + myStatus = BRepFill_ThruSectionErrorStatus_NotSameTopology; + return; + } /* // Max number of possible cuts @@ -1869,7 +1892,10 @@ void BRepFill_CompatibleWires::ComputeOrigin(const Standard_Boolean /*polar*/ ) gp_Pnt Pmini,P1,P2; SeqOfVertices(wire,SeqV); if (SeqV.Length()>NbMaxV) - throw Standard_NoSuchObject("BRepFill::ComputeOrigin failed"); + { + myStatus = BRepFill::ThruSectionsError_Failed; + return; + } if (!polar) { // choix du vertex le plus proche comme origine distmini = Precision::Infinite(); @@ -2094,7 +2120,10 @@ void BRepFill_CompatibleWires::SearchOrigin() allOpen = (allOpen && !myWork(i).Closed()); } if (!allOpen) - throw Standard_NoSuchObject("BRepFill_CompatibleWires::SearchOrigin : the wires must be open"); + { + myStatus = BRepFill_ThruSectionErrorStatus_NotSameTopology; + return; + } // init diff --git a/src/BRepFill/BRepFill_CompatibleWires.hxx b/src/BRepFill/BRepFill_CompatibleWires.hxx index ffcac2acc8..fa7bc0ca24 100644 --- a/src/BRepFill/BRepFill_CompatibleWires.hxx +++ b/src/BRepFill/BRepFill_CompatibleWires.hxx @@ -20,6 +20,7 @@ #include #include +#include #include #include #include @@ -49,6 +50,11 @@ public: Standard_EXPORT void Perform (const Standard_Boolean WithRotation = Standard_True); Standard_EXPORT Standard_Boolean IsDone() const; + + BRepFill_ThruSectionErrorStatus GetStatus() const + { + return myStatus; + } //! returns the generated sequence. Standard_EXPORT const TopTools_SequenceOfShape& Shape() const; @@ -101,7 +107,7 @@ private: Standard_Real myPercent; Standard_Boolean myDegen1; Standard_Boolean myDegen2; - Standard_Boolean myIsDone; + BRepFill_ThruSectionErrorStatus myStatus; TopTools_DataMapOfShapeListOfShape myMap; diff --git a/src/BRepFill/BRepFill_Generator.cxx b/src/BRepFill/BRepFill_Generator.cxx index 756a31bf03..553a0365a0 100644 --- a/src/BRepFill/BRepFill_Generator.cxx +++ b/src/BRepFill/BRepFill_Generator.cxx @@ -65,6 +65,7 @@ Standard_Integer DetectKPart(const TopoDS_Edge& Edge1, const TopoDS_Edge& Edge2) { // initializations + // !Note if IType set as -1 it means that occurs error with null 3d curve for the edge Standard_Integer IType = 0; // characteristics of the first edge @@ -89,7 +90,9 @@ Standard_Integer DetectKPart(const TopoDS_Edge& Edge1, else { curv1 = BRep_Tool::Curve(Edge1, loc, first1, last1); if (curv1.IsNull()) - throw Standard_NullObject("Null 3D curve in edge"); + { + return -1; + } curv1 = Handle(Geom_Curve)::DownCast(curv1->Transformed(loc.Transformation())); ff = first1; @@ -156,7 +159,9 @@ Standard_Integer DetectKPart(const TopoDS_Edge& Edge1, else { curv = BRep_Tool::Curve(Edge2, loc, first2, last2); if (curv.IsNull()) - throw Standard_NullObject("Null 3D curve in edge"); + { + return -1; + } curv = Handle(Geom_Curve)::DownCast(curv->Transformed(loc.Transformation())); ff = first2; @@ -312,12 +317,12 @@ Standard_Integer DetectKPart(const TopoDS_Edge& Edge1, //======================================================================= //function : CreateKPart -//purpose : +//purpose : Returns true if there is no errors occur //======================================================================= -void CreateKPart(const TopoDS_Edge& Edge1,const TopoDS_Edge& Edge2, - const Standard_Integer IType, - Handle(Geom_Surface)& Surf) +Standard_Boolean CreateKPart (const TopoDS_Edge& Edge1,const TopoDS_Edge& Edge2, + const Standard_Integer IType, + Handle(Geom_Surface)& Surf) { // find the dimension TopoDS_Vertex V1, V2; @@ -326,6 +331,8 @@ void CreateKPart(const TopoDS_Edge& Edge1,const TopoDS_Edge& Edge2, Standard_Real a1, b1, aa =0., bb =0.; TopoDS_Vertex v1f,v1l,v2f,v2l; + Standard_Boolean isDone = Standard_True; + // find characteristics of the first edge Handle(Geom_Curve) C1; Standard_Boolean degen1 = BRep_Tool::Degenerated(Edge1); @@ -336,7 +343,9 @@ void CreateKPart(const TopoDS_Edge& Edge1,const TopoDS_Edge& Edge2, else { C1 = BRep_Tool::Curve(Edge1, loc, a1, b1); if (C1.IsNull()) - throw Standard_NullObject("Null 3D curve in edge"); + { + return Standard_False; + } C1 = Handle(Geom_Curve)::DownCast(C1->Transformed(loc.Transformation())); aa = a1; bb = b1; @@ -361,7 +370,9 @@ void CreateKPart(const TopoDS_Edge& Edge1,const TopoDS_Edge& Edge2, else { C2 = BRep_Tool::Curve(Edge2, loc, a1, b1); if (C2.IsNull()) - throw Standard_NullObject("Null 3D curve in edge"); + { + return Standard_False; + } C2 = Handle(Geom_Curve)::DownCast(C2->Transformed(loc.Transformation())); if (Edge2.Orientation() == TopAbs_REVERSED) { C2->Reverse(); @@ -496,6 +507,7 @@ void CreateKPart(const TopoDS_Edge& Edge1,const TopoDS_Edge& Edge2, // IType incorrect } Surf = surface; + return isDone; } //======================================================================= @@ -528,7 +540,8 @@ static TopoDS_Edge CreateNewEdge(const TopoDS_Edge& theEdge, TopTools_DataMapOfS //======================================================================= BRepFill_Generator::BRepFill_Generator(): - myMutableInput (Standard_True) + myMutableInput (Standard_True), + myStatus (BRepFill_ThruSectionErrorStatus_NotDone) { } @@ -551,6 +564,8 @@ void BRepFill_Generator::AddWire(const TopoDS_Wire& Wire) void BRepFill_Generator::Perform() { + myStatus = BRepFill_ThruSectionErrorStatus_Done; + TopoDS_Shell Shell; TopoDS_Face Face; TopoDS_Shape S1, S2; @@ -679,6 +694,12 @@ void BRepFill_Generator::Perform() // processing of KPart Standard_Integer IType = DetectKPart(Edge1,Edge2); + if (IType == -1) + { + myStatus = BRepFill_ThruSectionErrorStatus_Null3DCurve; + return; + } + if (IType==0) { // no part cases TopLoc_Location L,L1,L2; @@ -694,7 +715,10 @@ void BRepFill_Generator::Perform() else { C1 = BRep_Tool::Curve(Edge1,L1,f1,l1); if (C1.IsNull()) - throw Standard_NullObject("Null 3D curve in edge"); + { + myStatus = BRepFill_ThruSectionErrorStatus_Null3DCurve; + return; + } } if (degen2) { Extremities(1) = BRep_Tool::Pnt(V2l); @@ -704,7 +728,10 @@ void BRepFill_Generator::Perform() else { C2 = BRep_Tool::Curve(Edge2,L2,f2,l2); if (C2.IsNull()) - throw Standard_NullObject("Null 3D curve in edge"); + { + myStatus = BRepFill_ThruSectionErrorStatus_Null3DCurve; + return; + } } // compute the location @@ -746,7 +773,11 @@ void BRepFill_Generator::Perform() } else { // particular case - CreateKPart(Edge1,Edge2,IType,Surf); + if (!CreateKPart(Edge1, Edge2, IType, Surf)) + { + myStatus = BRepFill_ThruSectionErrorStatus_Null3DCurve; + return; + } B.MakeFace(Face,Surf,Precision::Confusion()); } diff --git a/src/BRepFill/BRepFill_Generator.hxx b/src/BRepFill/BRepFill_Generator.hxx index 421040bd5a..65b31657a5 100644 --- a/src/BRepFill/BRepFill_Generator.hxx +++ b/src/BRepFill/BRepFill_Generator.hxx @@ -20,6 +20,7 @@ #include #include +#include #include #include #include @@ -68,6 +69,12 @@ public: //! Returns the current mutable input state Standard_EXPORT Standard_Boolean IsMutableInput() const; + //! Returns status of the operation + BRepFill_ThruSectionErrorStatus GetStatus() const + { + return myStatus; + } + protected: private: @@ -78,6 +85,7 @@ private: TopTools_DataMapOfShapeShape myOldNewShapes; BRepTools_ReShape myReshaper; Standard_Boolean myMutableInput; + BRepFill_ThruSectionErrorStatus myStatus; }; diff --git a/src/BRepFill/BRepFill_ThruSectionErrorStatus.hxx b/src/BRepFill/BRepFill_ThruSectionErrorStatus.hxx new file mode 100644 index 0000000000..4700b2a933 --- /dev/null +++ b/src/BRepFill/BRepFill_ThruSectionErrorStatus.hxx @@ -0,0 +1,29 @@ +// Copyright (c) 2022 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 _BRepFill_ThruSectionErrorStatus_HeaderFile +#define _BRepFill_ThruSectionErrorStatus_HeaderFile + +//! Errors that can occur at thrusection algorithm. +enum BRepFill_ThruSectionErrorStatus +{ + BRepFill_ThruSectionErrorStatus_Done, //!< Thrusection algorithm is done + BRepFill_ThruSectionErrorStatus_NotDone, //!< Thrusection algorithm is not done + BRepFill_ThruSectionErrorStatus_NotSameTopology, //!< All profiles have not same topology (they should be all closed or all opened) + BRepFill_ThruSectionErrorStatus_ProfilesInconsistent, //!< Profiles are inconsistent + BRepFill_ThruSectionErrorStatus_WrongUsage, //!< Wrong usage of punctual sections + BRepFill_ThruSectionErrorStatus_Null3DCurve, //!< Null 3D curve in edge + BRepFill_ThruSectionErrorStatus_Failed //!< Thrusection algorithm has failed +}; + +#endif // _BRepFill_ThruSectionErrorStatus_HeaderFile diff --git a/src/BRepFill/FILES b/src/BRepFill/FILES index 9289a69da4..655a1ff3c8 100644 --- a/src/BRepFill/FILES +++ b/src/BRepFill/FILES @@ -77,6 +77,7 @@ BRepFill_ShapeLaw.hxx BRepFill_ShapeLaw.lxx BRepFill_Sweep.cxx BRepFill_Sweep.hxx +BRepFill_ThruSectionErrorStatus.hxx BRepFill_TransitionStyle.hxx BRepFill_TrimEdgeTool.cxx BRepFill_TrimEdgeTool.hxx diff --git a/src/BRepOffsetAPI/BRepOffsetAPI_ThruSections.cxx b/src/BRepOffsetAPI/BRepOffsetAPI_ThruSections.cxx index c931227136..96c12766ac 100644 --- a/src/BRepOffsetAPI/BRepOffsetAPI_ThruSections.cxx +++ b/src/BRepOffsetAPI/BRepOffsetAPI_ThruSections.cxx @@ -262,6 +262,7 @@ BRepOffsetAPI_ThruSections::BRepOffsetAPI_ThruSections(const Standard_Boolean is myCritWeights[1] = .2; myCritWeights[2] = .4; myUseSmoothing = Standard_False; + myStatus = BRepFill_ThruSectionErrorStatus_NotDone; } @@ -286,7 +287,7 @@ void BRepOffsetAPI_ThruSections::Init(const Standard_Boolean isSolid, const Stan myCritWeights[1] = .2; myCritWeights[2] = .4; myUseSmoothing = Standard_False; - + myStatus = BRepFill_ThruSectionErrorStatus_NotDone; } @@ -343,6 +344,7 @@ void BRepOffsetAPI_ThruSections::CheckCompatibility(const Standard_Boolean check void BRepOffsetAPI_ThruSections::Build(const Message_ProgressRange& /*theRange*/) { + myStatus = BRepFill_ThruSectionErrorStatus_Done; myBFGenerator.Nullify(); //Check set of section for right configuration of punctual sections Standard_Integer i; @@ -356,7 +358,10 @@ void BRepOffsetAPI_ThruSections::Build(const Message_ProgressRange& /*theRange*/ wdeg = wdeg && (BRep_Tool::Degenerated(anEdge)); } if (wdeg) - throw Standard_Failure("Wrong usage of punctual sections"); + { + myStatus = BRepFill_ThruSectionErrorStatus_WrongUsage; + return; + } } if (myWires.Length() <= 2) { @@ -371,7 +376,8 @@ void BRepOffsetAPI_ThruSections::Build(const Message_ProgressRange& /*theRange*/ } if (wdeg) { - throw Standard_Failure("Wrong usage of punctual sections"); + myStatus = BRepFill_ThruSectionErrorStatus_WrongUsage; + return; } } @@ -447,6 +453,13 @@ void BRepOffsetAPI_ThruSections::Build(const Message_ProgressRange& /*theRange*/ } } } + else + { + myStatus = Georges.GetStatus(); + NotDone(); + return; + } + myWires = WorkingSections; } //if (myWCheck) else //no check @@ -498,6 +511,12 @@ void BRepOffsetAPI_ThruSections::Build(const Message_ProgressRange& /*theRange*/ NotDone(); return; } + + if (myStatus != BRepFill_ThruSectionErrorStatus_Done) + { + NotDone(); + return; + } // Encode the Regularities BRepLib::EncodeRegularity(myShape); } @@ -520,6 +539,12 @@ void BRepOffsetAPI_ThruSections::CreateRuled() myBFGenerator->AddWire(TopoDS::Wire(myWires(i))); } myBFGenerator->Perform(); + BRepFill_ThruSectionErrorStatus aStatus = myBFGenerator->GetStatus(); + if (aStatus != BRepFill_ThruSectionErrorStatus_Done) + { + myStatus = aStatus; + return; + } TopoDS_Shell shell = myBFGenerator->Shell(); if (myIsSolid) { @@ -739,6 +764,7 @@ void BRepOffsetAPI_ThruSections::CreateSmoothed() TS = TotalSurf(shapes,nbSects,nbEdges,w1Point,w2Point,vClosed); if(TS.IsNull()) { + myStatus = BRepFill_ThruSectionErrorStatus_Failed; return; } @@ -934,14 +960,12 @@ void BRepOffsetAPI_ThruSections::CreateSmoothed() else { myShape = MakeSolid(shell, newW1, newW2, myPres3d, myFirst, myLast); } - - Done(); } else { myShape = shell; - Done(); } + Done(); TopTools_DataMapOfShapeReal aVertexToleranceMap; TopExp_Explorer aTopExplorer(myShape,TopAbs_EDGE); @@ -1040,7 +1064,9 @@ static Handle(Geom_BSplineCurve) EdgeToBSpline (const TopoDS_Edge& theEdge) Standard_Real aFirst, aLast; Handle(Geom_Curve) aCurve = BRep_Tool::Curve (theEdge, aLoc, aFirst, aLast); if (aCurve.IsNull()) - throw Standard_NullObject("Null 3D curve in edge"); + { + return nullptr; + } // convert its part used by edge to bspline; note that if edge curve is bspline, // conversion made via trimmed curve is still needed -- it will copy it, segment @@ -1132,6 +1158,10 @@ Handle(Geom_BSplineSurface) BRepOffsetAPI_ThruSections:: // read the first edge to initialise CompBS; TopoDS_Edge aPrevEdge = TopoDS::Edge (shapes((j-1)*NbEdges+1)); Handle(Geom_BSplineCurve) curvBS = EdgeToBSpline (aPrevEdge); + if (curvBS.IsNull()) + { + return nullptr; + } // initialization GeomConvert_CompCurveToBSplineCurve CompBS(curvBS); @@ -1145,6 +1175,10 @@ Handle(Geom_BSplineSurface) BRepOffsetAPI_ThruSections:: aTolV = Max(aTolV, BRep_Tool::Tolerance(vl)); aTolV = Min(aTolV, 1.e-3); curvBS = EdgeToBSpline (aNextEdge); + if (curvBS.IsNull()) + { + return nullptr; + } // concatenation CompBS.Add(curvBS, aTolV, Standard_True, Standard_False, 1); @@ -1503,7 +1537,11 @@ void BRepOffsetAPI_ThruSections::CriteriumWeight(Standard_Real& W1, Standard_Rea void BRepOffsetAPI_ThruSections::SetCriteriumWeight(const Standard_Real W1, const Standard_Real W2, const Standard_Real W3) { - if (W1 < 0 || W2 < 0 || W3 < 0 ) throw Standard_DomainError(); + if (W1 < 0 || W2 < 0 || W3 < 0) + { + myStatus = BRepFill_ThruSectionErrorStatus_Failed; + return; + } myCritWeights[0] = W1; myCritWeights[1] = W2; myCritWeights[2] = W3; diff --git a/src/BRepOffsetAPI/BRepOffsetAPI_ThruSections.hxx b/src/BRepOffsetAPI/BRepOffsetAPI_ThruSections.hxx index a69dc022b4..066058eb4c 100644 --- a/src/BRepOffsetAPI/BRepOffsetAPI_ThruSections.hxx +++ b/src/BRepOffsetAPI/BRepOffsetAPI_ThruSections.hxx @@ -21,6 +21,7 @@ #include #include +#include #include #include #include @@ -163,6 +164,11 @@ public: //! Returns the current mutable input state Standard_EXPORT Standard_Boolean IsMutableInput() const; + //! Returns the status of thrusection operation + BRepFill_ThruSectionErrorStatus GetStatus() const + { + return myStatus; + } protected: @@ -206,6 +212,7 @@ private: Standard_Boolean myUseSmoothing; Standard_Boolean myMutableInput; NCollection_Handle myBFGenerator; + BRepFill_ThruSectionErrorStatus myStatus; }; diff --git a/src/BRepTest/BRepTest_SweepCommands.cxx b/src/BRepTest/BRepTest_SweepCommands.cxx index 100feb2644..e4cb347e72 100644 --- a/src/BRepTest/BRepTest_SweepCommands.cxx +++ b/src/BRepTest/BRepTest_SweepCommands.cxx @@ -443,7 +443,7 @@ Standard_Integer gener(Draw_Interpretor&, Standard_Integer n, const char** a) //purpose : //======================================================================= -Standard_Integer thrusections(Draw_Interpretor&, Standard_Integer n, const char** a) +Standard_Integer thrusections(Draw_Interpretor& di, Standard_Integer n, const char** a) { if (n < 6) return 1; @@ -525,7 +525,30 @@ Standard_Integer thrusections(Draw_Interpretor&, Standard_Integer n, const char* BRepTest_Objects::SetHistory(Generator->Wires(), *Generator); } else { - std::cout << "Algorithm is not done" << std::endl; + BRepFill_ThruSectionErrorStatus aStatus = Generator->GetStatus(); + switch (aStatus) + { + case BRepFill_ThruSectionErrorStatus_NotDone: + di << "Algorithm is not done\n"; + break; + case BRepFill_ThruSectionErrorStatus_NotSameTopology: + di << "The input profiles should be all closed or all opened\n"; + break; + case BRepFill_ThruSectionErrorStatus_ProfilesInconsistent: + di << "Profiles inconsistent\n"; + break; + case BRepFill_ThruSectionErrorStatus_WrongUsage: + di << "Wrong usage of punctual sections\n"; + break; + case BRepFill_ThruSectionErrorStatus_Null3DCurve: + di << "Some edges have null 3d curve"; + break; + case BRepFill_ThruSectionErrorStatus_Failed: + di << "Algorithm has failed\n"; + break; + default: + break; + } } return 0; diff --git a/tests/bugs/modalg_6/bug26636 b/tests/bugs/modalg_6/bug26636 index df079c47b1..7596947108 100644 --- a/tests/bugs/modalg_6/bug26636 +++ b/tests/bugs/modalg_6/bug26636 @@ -1,4 +1,6 @@ -puts "REQUIRED All: Standard_ConstructionError\\: BRepFill \\:\\: profiles are inconsistent" +puts "REQUIRED All: Profiles inconsistent" +puts "REQUIRED All: Error: Algorithm has failed" + puts "==========" puts "OCC26636" puts "==========" @@ -10,4 +12,9 @@ puts "" restore [locate_data_file bug26636_w1.brep] w1 restore [locate_data_file bug26636_w2.brep] w2 -catch {thrusections result 0 1 w1 w2} +thrusections result 0 1 w1 w2 + + +if {![isdraw result]} { + puts "Error: Algorithm has failed" +} diff --git a/tests/bugs/modalg_8/bug33180 b/tests/bugs/modalg_8/bug33180 new file mode 100644 index 0000000000..87b85dcd33 --- /dev/null +++ b/tests/bugs/modalg_8/bug33180 @@ -0,0 +1,83 @@ +puts "REQUIRED ALL: Algorithm has failed" + +puts "========================" +puts "0033180: We had a problem calling the OCC library at the customer site" +puts "========================" +puts "" + +ellipse e 1982.57313150102 4275.76510950417 9.86296194928099 0 1 0 0 0 1 0.114299999871658 0.114299999871477 +mkedge e e +wire w1 e + +polyline w2 1982.5731315010235 4275.7682845041272 9.9771213071771765 \ +1982.5787999289748 4275.7682845041272 9.9771213071771765 \ +1982.5900810211417 4275.7682845041272 9.9759982412286909 \ +1982.6011953705065 4275.7682845041272 9.9737631624170451 \ +1982.6120336335414 4275.7682845041272 9.9704380624719775 \ +1982.6224891918419 4275.7682845041272 9.9660556333490522 \ +1982.6324591844793 4275.7682845041272 9.9606590097376024 \ +1982.6418455284352 4275.7682845041272 9.9543012731500777 \ +1982.6505558889621 4275.7682845041272 9.9470449655481499 \ +1982.6585045688862 4275.7682845041272 9.9389614837595133 \ +1982.6656133812182 4275.7682845041272 9.9301303356119313 \ +1982.6718123787159 4275.7682845041272 9.9206384056039951 \ +1982.6770405929797 4275.7682845041272 9.9105790775247744 \ +1982.6770405929797 4275.7778095039830 9.9105790775247744 \ +1982.6811072223895 4275.7778095039830 9.9004550688692241 \ +1982.6841900604484 4275.7778095039830 9.8899894516893543 \ +1982.6862610309836 4275.7778095039830 9.8792775850721526 \ +1982.6873012512442 4275.7778095039830 9.8684170620866922 \ +1982.6873012512442 4275.7778095039830 9.8575068365760963 \ +1982.6862610309836 4275.7778095039830 9.8466463141866836 \ +1982.6841900604484 4275.7778095039830 9.8359344451852966 \ +1982.6811072223895 4275.7778095039830 9.8254688303896121 \ +1982.6770405929797 4275.7778095039830 9.8153448217340618 \ +1982.6770405929797 4275.7682845041272 9.8153448217340618 \ +1982.6718123787159 4275.7682845041272 9.8052854936548393 \ +1982.6656133812182 4275.7682845041272 9.7957935636469031 \ +1982.6585045688862 4275.7682845041272 9.7869624154993211 \ +1982.6505558889621 4275.7682845041272 9.7788789289423139 \ +1982.6418455284352 4275.7682845041272 9.7716226213403843 \ +1982.6324591844793 4275.7682845041272 9.7652648847528614 \ +1982.6224891918419 4275.7682845041272 9.7598682611414116 \ +1982.6120336335414 4275.7682845041272 9.7554858415552310 \ +1982.6011953705065 4275.7682845041272 9.7521607320734187 \ +1982.5900810211417 4275.7682845041272 9.7499256532617729 \ +1982.5787999289748 4275.7682845041272 9.7488025873132873 \ +1982.5674630730864 4275.7682845041272 9.7488025873132873 \ +1982.5561819809195 4275.7682845041272 9.7499256532617729 \ +1982.5450676315540 4275.7682845041272 9.7521607320734187 \ +1982.5342293685192 4275.7682845041272 9.7554858415552310 \ +1982.5237738102194 4275.7682845041272 9.7598682611414116 \ +1982.5138038175819 4275.7682845041272 9.7652648847528614 \ +1982.5044174736254 4275.7682845041272 9.7716226213403843 \ +1982.4957071130984 4275.7682845041272 9.7788789289423139 \ +1982.4877584331743 4275.7682845041272 9.7869624154993211 \ +1982.4806496208423 4275.7682845041272 9.7957935636469031 \ +1982.4744506233446 4275.7682845041272 9.8052854936548393 \ +1982.4692224090809 4275.7682845041272 9.8153448217340618 \ +1982.4692224090809 4275.7778095039830 9.8153448217340618 \ +1982.4651557796710 4275.7778095039830 9.8254688303896121 \ +1982.4620729416129 4275.7778095039830 9.8359344451852966 \ +1982.4600019710776 4275.7778095039830 9.8466463141866836 \ +1982.4589617508170 4275.7778095039830 9.8575068365760963 \ +1982.4589617508170 4275.7778095039830 9.8684170620866922 \ +1982.4600019710776 4275.7778095039830 9.8792775850721526 \ +1982.4620729416129 4275.7778095039830 9.8899894516893543 \ +1982.4651557796710 4275.7778095039830 9.9004550688692241 \ +1982.4692224090809 4275.7778095039830 9.9105790775247744 \ +1982.4692224090809 4275.7682845041272 9.9105790775247744 \ +1982.4744506233446 4275.7682845041272 9.9206384056039951 \ +1982.4806496208423 4275.7682845041272 9.9301303356119313 \ +1982.4877584331743 4275.7682845041272 9.9389614837595133 \ +1982.4957071130984 4275.7682845041272 9.9470449655481499 \ +1982.5044174736254 4275.7682845041272 9.9543012731500777 \ +1982.5138038175819 4275.7682845041272 9.9606590097376024 \ +1982.5237738102194 4275.7682845041272 9.9660556333490522 \ +1982.5342293685192 4275.7682845041272 9.9704380624719775 \ +1982.5450676315540 4275.7682845041272 9.9737631624170451 \ +1982.5561819809195 4275.7682845041272 9.9759982412286909 \ +1982.5674630730864 4275.7682845041272 9.9771213071771765 \ +1982.5731315010235 4275.7682845041272 9.9771213071771765 + +thrusections res 0 0 w1 w2 diff --git a/tests/thrusection/bugs/bug24997 b/tests/thrusection/bugs/bug24997 index e859880cc7..57d21acac7 100755 --- a/tests/thrusection/bugs/bug24997 +++ b/tests/thrusection/bugs/bug24997 @@ -1,5 +1,4 @@ -puts "TODO OCC24997 ALL: An exception was caught" -puts "TODO OCC24997 ALL: TEST INCOMPLETE" +puts "REQUIRED ALL: Error : The command cannot be built." puts "========" puts "0024997: S I G S E G V in BRepOffsetAPI_ThruSections" From 2f33e34038e1d6fdb373d362917af7a170e9425b Mon Sep 17 00:00:00 2001 From: ddzama Date: Thu, 24 Nov 2022 16:24:14 +0300 Subject: [PATCH 430/639] 0032934: Modelling Algorithms - BRepExtrema_DistShapeShape returns two solutions instead of one distmini of two edges returns two solution points instead one. Second unneeded solution point is the same as first. The problem was in fact that second edge has continuity C0. In this case additional extremas analysis performed in special procedure PERFORM_C0 And second point found in this procedure. Folowing code of BRepExtrema_DistanceSS::Perform (variant for Edge/Edge) we should this additional solution extremas set to be object of test TRI_SOLUTION before pushing into main list of solution. This solves the problem. Corresponding test and compound with edges has been created. Additionally, in the function PERFORM_C0 an obvious error has fixed. --- src/BRepExtrema/BRepExtrema_DistanceSS.cxx | 25 ++++++++++++++++++---- tests/bugs/modalg_7/bug32934 | 25 ++++++++++++++++++++++ 2 files changed, 46 insertions(+), 4 deletions(-) create mode 100644 tests/bugs/modalg_7/bug32934 diff --git a/src/BRepExtrema/BRepExtrema_DistanceSS.cxx b/src/BRepExtrema/BRepExtrema_DistanceSS.cxx index e81108b794..c287d05ba3 100644 --- a/src/BRepExtrema/BRepExtrema_DistanceSS.cxx +++ b/src/BRepExtrema/BRepExtrema_DistanceSS.cxx @@ -468,7 +468,14 @@ static void PERFORM_C0(const TopoDS_Edge& S1, const TopoDS_Edge& S2, if (fabs(Dstmin - sqrt(Ext.SquareDistance(ii))) < Eps) { Pt = Ext.Point(ii); - if (TRI_SOLUTION(SeqSol2, Pt)) + // Pt - point on the curve pCurvOther/Eother, but + // if iE == 0 -> Eother correspond to edge S2 + // and to edge S1 in the opposite case. + // Therefore we should search Pt through previous solution points on Other curve (edge): + // if iE == 0 - on edge S2, namely through SeqSol2, + // else - on edge S1, namely through SeqSol1. + const bool triSolutionResult = (iE == 0) ? TRI_SOLUTION(SeqSol2, Pt) : TRI_SOLUTION(SeqSol1, Pt); + if (triSolutionResult) { // Check if the parameter does not correspond to a vertex const Standard_Real t = Ext.Parameter(ii); @@ -869,9 +876,19 @@ void BRepExtrema_DistanceSS::Perform (const TopoDS_Edge& theS1, if (!seqSol1.IsEmpty() && !seqSol2.IsEmpty()) { - theSeqSolShape1.Append(seqSol1); - theSeqSolShape2.Append(seqSol2); - myModif = Standard_True; + BRepExtrema_SeqOfSolution::iterator anIt1 = seqSol1.begin(); + BRepExtrema_SeqOfSolution::iterator anIt2 = seqSol2.begin(); + for (; anIt1 != seqSol1.end() && anIt2 != seqSol2.end(); anIt1++, anIt2++) + { + gp_Pnt Pt1 = anIt1->Point(); + gp_Pnt Pt2 = anIt2->Point(); + if (TRI_SOLUTION(theSeqSolShape1, Pt1) || TRI_SOLUTION(theSeqSolShape2, Pt2)) + { + theSeqSolShape1.Append(*anIt1); + theSeqSolShape2.Append(*anIt2); + myModif = Standard_True; + } + } } } diff --git a/tests/bugs/modalg_7/bug32934 b/tests/bugs/modalg_7/bug32934 new file mode 100644 index 0000000000..461317494c --- /dev/null +++ b/tests/bugs/modalg_7/bug32934 @@ -0,0 +1,25 @@ +puts "========" +puts "OCC32934" +puts "========" +puts "" +############################################################################################### +# BRepExtrema_DistShapeShape BRepExtrema_DistShapeShape returns two solutions instead of one. +############################################################################################### + +pload ALL +restore [locate_data_file bug32934.brep] edges +explode edges E + +distmini di edges_1 edges_2 +if { ([isdraw di2]) } { + puts "Error : result of distmini is wrong" +} else { + checknbshapes di -vertex 1 -edge 0 +} + +distmini dii edges_2 edges_1 +if { ([isdraw dii2]) } { + puts "Error : result of distmini is wrong" +} else { + checknbshapes dii -vertex 1 -edge 0 +} From 03275c0be165da7abe8e0044d79c10a0038a8340 Mon Sep 17 00:00:00 2001 From: ddzama Date: Fri, 21 Oct 2022 16:28:30 +0300 Subject: [PATCH 431/639] 0022821: Crash with BRepFilletAPI_MakeFillet test bugs modalg_7 bug22821 failed on fillet shape with 5-th edge. Experimentally has been found that reducing of parameter ChFi3d_Builder::tolesp for this task solves the issue. So, as soluton it is proposed to link parameter toleps with parameter range of spine curve. So, production coefficient has been set to pass all tests and 2 teset was extended: tests/blend/complex/A6, tests/bugs/modalg_7/bug22821 first has been extended to test different scaling factors, second has been extended to make fillet on all edges from 12. Additionally: - fixed misusage of tolesp in contexts where tolerance of point in 3d is excepted; In some context usage of tol_esp is irrelevant, because its essentiality - tolerance of the parameter on the 3d curve. So, in such context it has been replaced with new parameter tol3d (with fix value 1.0e-4). Get rid of tolapp3d duplication constant - tol_3d - tolesp = 5.0e-5 * (umax - umin) - tolesp replaced by tolpoint2d/tolpoint3d in several classes. Blend_Walking BRepBlend_SurfRstLineBuilder BRepBlend_RstRstLineBuilder Blend_CSWalking Instead `tolesp` - `tolgui` is employed in contexts where tolerance of guide curve parameter is excepted. Instead `tolesp` - `tolpoint2d` or `tolpoint3d` is employed in contexts where tolerance of point in 2d or 3d space is excepted. - Replace tolesp with tolpoint2d/tolpoint3d in BBPP function argument. - Use tolapp3d instead tolesp in BonVoisin function, --- src/BRepBlend/BRepBlend_CSWalking.hxx | 4 +- src/BRepBlend/BRepBlend_RstRstLineBuilder.cxx | 78 ++++++------ src/BRepBlend/BRepBlend_RstRstLineBuilder.hxx | 6 +- .../BRepBlend_SurfRstLineBuilder.cxx | 89 +++++++------ .../BRepBlend_SurfRstLineBuilder.hxx | 7 +- src/BRepBlend/BRepBlend_Walking.hxx | 8 +- .../BRepFilletAPI_MakeFillet.cxx | 12 +- src/BRepTest/BRepTest_FeatureCommands.cxx | 3 +- src/BRepTest/BRepTest_FilletCommands.cxx | 8 +- src/Blend/Blend_CSWalking_1.gxx | 10 +- src/Blend/Blend_CSWalking_2.gxx | 20 +-- src/Blend/Blend_CSWalking_3.gxx | 2 +- src/Blend/Blend_CSWalking_4.gxx | 20 +-- src/Blend/Blend_Walking_1.gxx | 30 ++--- src/Blend/Blend_Walking_2.gxx | 15 +-- src/Blend/Blend_Walking_3.gxx | 14 +-- src/Blend/Blend_Walking_4.gxx | 40 +++--- src/ChFi3d/ChFi3d_Builder.cxx | 5 +- src/ChFi3d/ChFi3d_Builder.hxx | 4 + src/ChFi3d/ChFi3d_Builder_1.cxx | 4 +- src/ChFi3d/ChFi3d_Builder_2.cxx | 30 ++--- src/ChFi3d/ChFi3d_Builder_6.cxx | 56 ++++----- src/ChFi3d/ChFi3d_Builder_C1.cxx | 36 +++--- src/ChFi3d/ChFi3d_Builder_C2.cxx | 31 ++++- src/ChFi3d/ChFi3d_Builder_CnCrn.cxx | 10 +- src/ChFi3d/ChFi3d_Builder_SpKP.cxx | 2 +- src/ChFi3d/ChFi3d_ChBuilder.cxx | 32 ++--- src/ChFi3d/ChFi3d_ChBuilder_C3.cxx | 30 ++--- src/ChFi3d/ChFi3d_FilBuilder.cxx | 38 +++--- src/ChFi3d/ChFi3d_FilBuilder_C2.cxx | 32 ++--- src/ChFi3d/ChFi3d_FilBuilder_C3.cxx | 26 ++-- src/ChFiDS/ChFiDS_Spine.cxx | 11 ++ src/ChFiDS/ChFiDS_Spine.hxx | 3 + src/ChFiDS/ChFiDS_Spine.lxx | 9 ++ src/FilletSurf/FilletSurf_InternalBuilder.cxx | 12 +- src/QABugs/QABugs_11.cxx | 3 +- src/QABugs/QABugs_17.cxx | 3 +- src/ViewerTest/ViewerTest_FilletCommands.cxx | 3 +- tests/blend/complex/A6 | 17 ++- tests/bugs/modalg_7/bug22821 | 117 ++++++++++++++++-- 40 files changed, 524 insertions(+), 356 deletions(-) diff --git a/src/BRepBlend/BRepBlend_CSWalking.hxx b/src/BRepBlend/BRepBlend_CSWalking.hxx index 8cc3b0ccba..590d369ea7 100644 --- a/src/BRepBlend/BRepBlend_CSWalking.hxx +++ b/src/BRepBlend/BRepBlend_CSWalking.hxx @@ -51,7 +51,7 @@ public: Standard_EXPORT BRepBlend_CSWalking(const Handle(Adaptor3d_Curve)& Curv, const Handle(Adaptor3d_Surface)& Surf, const Handle(Adaptor3d_TopolTool)& Domain); - Standard_EXPORT void Perform (Blend_CSFunction& F, const Standard_Real Pdep, const Standard_Real Pmax, const Standard_Real MaxStep, const Standard_Real TolGuide, const math_Vector& Soldep, const Standard_Real Tolesp, const Standard_Real Fleche, const Standard_Boolean Appro = Standard_False); + Standard_EXPORT void Perform (Blend_CSFunction& F, const Standard_Real Pdep, const Standard_Real Pmax, const Standard_Real MaxStep, const Standard_Real Tol3d, const Standard_Real TolGuide, const math_Vector& Soldep, const Standard_Real Fleche, const Standard_Boolean Appro = Standard_False); Standard_EXPORT Standard_Boolean Complete (Blend_CSFunction& F, const Standard_Real Pmin); @@ -80,7 +80,7 @@ private: Handle(Adaptor3d_Surface) surf; Handle(Adaptor3d_Curve) curv; Handle(Adaptor3d_TopolTool) domain; - Standard_Real tolesp; + Standard_Real tolpoint3d; Standard_Real tolgui; Standard_Real pasmax; Standard_Real fleche; diff --git a/src/BRepBlend/BRepBlend_RstRstLineBuilder.cxx b/src/BRepBlend/BRepBlend_RstRstLineBuilder.cxx index 0183b24216..ecd711c761 100644 --- a/src/BRepBlend/BRepBlend_RstRstLineBuilder.cxx +++ b/src/BRepBlend/BRepBlend_RstRstLineBuilder.cxx @@ -173,7 +173,7 @@ BRepBlend_RstRstLineBuilder::BRepBlend_RstRstLineBuilder done(Standard_False), sol(1, 2), surf1(Surf1), domain1(Domain1), surf2(Surf2), domain2(Domain2), rst1(Rst1), rst2(Rst2), - tolesp(0.0), tolgui(0.0), pasmax(0.0), + tolpoint3d(0.0), tolgui(0.0), pasmax(0.0), fleche(0.0), param(0.0), rebrou(Standard_False), iscomplete(Standard_False), comptra(Standard_False), sens(0.0), decrochdeb(Blend_NoDecroch), decrochfin(Blend_NoDecroch) @@ -193,9 +193,9 @@ void BRepBlend_RstRstLineBuilder::Perform(Blend_RstRstFunction& Func, const Standard_Real Pdep, const Standard_Real Pmax, const Standard_Real MaxStep, + const Standard_Real Tol3d, const Standard_Real TolGuide, const math_Vector& ParDep, - const Standard_Real Tolesp, const Standard_Real Fleche, const Standard_Boolean Appro) { @@ -203,7 +203,7 @@ void BRepBlend_RstRstLineBuilder::Perform(Blend_RstRstFunction& Func, iscomplete = Standard_False; comptra = Standard_False; line = new BRepBlend_Line(); - tolesp = Abs(Tolesp); + tolpoint3d = Tol3d; tolgui = Abs(TolGuide); fleche = Abs(Fleche); rebrou = Standard_False; @@ -225,7 +225,7 @@ void BRepBlend_RstRstLineBuilder::Perform(Blend_RstRstFunction& Func, TopAbs_State siturst1, siturst2; Blend_DecrochStatus decroch; math_Vector tolerance(1, 2), infbound(1, 2), supbound(1, 2); - Func.GetTolerance(tolerance, tolesp); + Func.GetTolerance(tolerance, tolpoint3d); Func.GetBounds(infbound, supbound); math_FunctionSetRoot rsnld(Func, tolerance, 30); @@ -258,9 +258,9 @@ void BRepBlend_RstRstLineBuilder::Perform(Blend_RstRstFunction& Func, U = previousP.ParameterOnC1(); V = previousP.ParameterOnC2(); BRepBlend_Extremity ptf1 (previousP.PointOnC1(), - U, previousP.Parameter(),tolesp); + U, previousP.Parameter(),tolpoint3d); BRepBlend_Extremity ptf2 (previousP.PointOnC2(), - V, previousP.Parameter(),tolesp); + V, previousP.Parameter(),tolpoint3d); if (!previousP.IsTangencyPoint()) { ptf1.SetTangent(previousP.TangentOnC1()); ptf2.SetTangent(previousP.TangentOnC2()); @@ -291,7 +291,7 @@ Standard_Boolean BRepBlend_RstRstLineBuilder::PerformFirstSection const Standard_Real Pdep, const Standard_Real Pmax, const math_Vector& ParDep, - const Standard_Real Tolesp, + const Standard_Real Tol3d, const Standard_Real TolGuide, const Standard_Boolean RecRst1, const Standard_Boolean RecP1, @@ -304,7 +304,7 @@ Standard_Boolean BRepBlend_RstRstLineBuilder::PerformFirstSection iscomplete = Standard_False; comptra = Standard_False; line = new BRepBlend_Line(); - tolesp = Abs(Tolesp); + tolpoint3d = Tol3d; tolgui = Abs(TolGuide); rebrou = Standard_False; @@ -327,7 +327,7 @@ Standard_Boolean BRepBlend_RstRstLineBuilder::PerformFirstSection wp1 = wp2 = wrst1 = wrst2 = Pmax; param = Pdep; Func.Set(param); - Func.GetTolerance(tolerance, tolesp); + Func.GetTolerance(tolerance, tolpoint3d); Func.GetBounds(infbound, supbound); math_FunctionSetRoot rsnld(Func, tolerance, 30); @@ -573,7 +573,7 @@ void BRepBlend_RstRstLineBuilder::InternalPerform(Blend_RstRstFunction& Func, //IntSurf_Transition Tline, Tarc; - Func.GetTolerance(tolerance, tolesp); + Func.GetTolerance(tolerance, tolpoint3d); Func.GetBounds(infbound, supbound); math_FunctionSetRoot rsnld(Func, tolerance, 30); @@ -595,14 +595,14 @@ void BRepBlend_RstRstLineBuilder::InternalPerform(Blend_RstRstFunction& Func, if (rsnld.IsDone()) { rsnld.Root(sol); Blend_Point bp1; - if(BBPP(param, Func, sol, tolesp, bp1)){ + if(BBPP(param, Func, sol, tolpoint3d, bp1)){ Standard_Real dw = 1.e-10; Func.Set(param + dw); rsnld.Perform(Func, parinit, infbound, supbound); if (rsnld.IsDone()) { rsnld.Root(sol); Blend_Point bp2; - if(BBPP(param + dw, Func, sol, tolesp, bp2)){ + if(BBPP(param + dw, Func, sol, tolpoint3d, bp2)){ tracederiv(Func, bp1, bp2); } } @@ -854,7 +854,7 @@ void BRepBlend_RstRstLineBuilder::InternalPerform(Blend_RstRstFunction& Func, Arrive = Standard_True; Extrst1.SetValue(previousP.PointOnC1(), previousP.ParameterOnC1(), - previousP.Parameter(), tolesp); + previousP.Parameter(), tolpoint3d); MakeExtremity(Extrst2, Standard_False, rst2, sol(2), IsVtxrst2, Vtxrst2); // Show that end is on Bound. } @@ -873,10 +873,10 @@ void BRepBlend_RstRstLineBuilder::InternalPerform(Blend_RstRstFunction& Func, if (Abs(stepw) < tolgui) { Extrst1.SetValue(previousP.PointOnC1(), previousP.ParameterOnC1(), - previousP.Parameter(), tolesp); + previousP.Parameter(), tolpoint3d); Extrst2.SetValue(previousP.PointOnC2(), previousP.ParameterOnC2(), - previousP.Parameter(), tolesp); + previousP.Parameter(), tolpoint3d); Arrive = Standard_True; #ifdef OCCT_DEBUG if (line->NbPoints()>=2) { @@ -913,7 +913,7 @@ void BRepBlend_RstRstLineBuilder::InternalPerform(Blend_RstRstFunction& Func, Arrive = Standard_True; Extrst1.SetValue(previousP.PointOnC1(), previousP.ParameterOnC1(), - previousP.Parameter(), tolesp); + previousP.Parameter(), tolpoint3d); MakeExtremity(Extrst2, Standard_False, rst2, sol(2), IsVtxrst2, Vtxrst2); // Indicate that end is on Bound. } @@ -993,10 +993,10 @@ void BRepBlend_RstRstLineBuilder::InternalPerform(Blend_RstRstFunction& Func, #endif Extrst1.SetValue(previousP.PointOnC1(), previousP.ParameterOnC1(), - previousP.Parameter(), tolesp); + previousP.Parameter(), tolpoint3d); Extrst2.SetValue(previousP.PointOnC2(), previousP.ParameterOnC2(), - previousP.Parameter(), tolesp); + previousP.Parameter(), tolpoint3d); Arrive = Standard_True; } break; @@ -1029,7 +1029,7 @@ Standard_Boolean BRepBlend_RstRstLineBuilder::Recadre1(Blend_RstRstFunction& Handle(Adaptor3d_HVertex)& Vtx) { math_Vector toler(1, 3), infb(1, 3), supb(1, 3); - Finv.GetTolerance(toler, tolesp); + Finv.GetTolerance(toler, tolpoint3d); Finv.GetBounds(infb, supb); Solinv(1) = param; Solinv(2) = sol(2); @@ -1049,7 +1049,7 @@ Standard_Boolean BRepBlend_RstRstLineBuilder::Recadre1(Blend_RstRstFunction& // It is necessary to check if the function value meets the // second restriction - if (Finv.IsSolution(Solinv, tolesp)) { + if (Finv.IsSolution(Solinv, tolpoint3d)) { Standard_Real w = Solinv(2); if(w < rst2->FirstParameter() - toler(2)|| w > rst2->LastParameter() + toler(2)){ @@ -1079,7 +1079,7 @@ Standard_Boolean BRepBlend_RstRstLineBuilder::Recadre1(Blend_RstRstFunction& math_Vector infbound(1, 2), supbound(1, 2); math_Vector parinit(1, 2), tolerance(1, 2); - Func.GetTolerance(tolerance, tolesp); + Func.GetTolerance(tolerance, tolpoint3d); Func.GetBounds(infbound, supbound); math_FunctionSetRoot rsnld2(Func, tolerance, 30); @@ -1112,7 +1112,7 @@ Standard_Boolean BRepBlend_RstRstLineBuilder::Recadre2(Blend_RstRstFunction& Handle(Adaptor3d_HVertex)& Vtx) { math_Vector toler(1, 3), infb(1, 3), supb(1, 3); - Finv.GetTolerance(toler, tolesp); + Finv.GetTolerance(toler, tolpoint3d); Finv.GetBounds(infb, supb); Solinv(1) = param; Solinv(2) = sol(1); @@ -1130,7 +1130,7 @@ Standard_Boolean BRepBlend_RstRstLineBuilder::Recadre2(Blend_RstRstFunction& rsnld.Root(Solinv); // It is necessary to check the value of the function - if (Finv.IsSolution(Solinv, tolesp)) { + if (Finv.IsSolution(Solinv, tolpoint3d)) { Standard_Real w = Solinv(2); if(w < rst1->FirstParameter() - toler(2)|| w > rst1->LastParameter() + toler(2)){ @@ -1159,7 +1159,7 @@ Standard_Boolean BRepBlend_RstRstLineBuilder::Recadre2(Blend_RstRstFunction& math_Vector infbound(1, 2), supbound(1, 2); math_Vector parinit(1,2), tolerance(1,2); - Func.GetTolerance(tolerance, tolesp); + Func.GetTolerance(tolerance, tolpoint3d); Func.GetBounds(infbound, supbound); math_FunctionSetRoot rsnld2(Func, tolerance, 30); @@ -1199,7 +1199,7 @@ Standard_Boolean BRepBlend_RstRstLineBuilder::Recadre1(Blend_CurvPointFuncInv& FinvP.Set(thepoint); math_Vector toler(1,2), infb(1, 2), supb(1, 2); - FinvP.GetTolerance(toler, tolesp); + FinvP.GetTolerance(toler, tolpoint3d); FinvP.GetBounds(infb, supb); Solinv(1) = param; Solinv(2) = sol(2); @@ -1214,7 +1214,7 @@ Standard_Boolean BRepBlend_RstRstLineBuilder::Recadre1(Blend_CurvPointFuncInv& } rsnld.Root(Solinv); - if(FinvP.IsSolution(Solinv, tolesp)){ + if(FinvP.IsSolution(Solinv, tolpoint3d)){ gp_Pnt2d p2drst2 = rst2->Value(Solinv(2)); TopAbs_State situ = domain2->Classify(p2drst2, toler(2), 0); if ((situ != TopAbs_IN) && (situ != TopAbs_ON)) { @@ -1267,7 +1267,7 @@ Standard_Boolean BRepBlend_RstRstLineBuilder::Recadre2(Blend_CurvPointFuncInv& FinvP.Set(thepoint); math_Vector toler(1,2), infb(1, 2), supb(1, 2); - FinvP.GetTolerance(toler, tolesp); + FinvP.GetTolerance(toler, tolpoint3d); FinvP.GetBounds(infb, supb); Solinv(1) = param; Solinv(2) = sol(1); @@ -1282,7 +1282,7 @@ Standard_Boolean BRepBlend_RstRstLineBuilder::Recadre2(Blend_CurvPointFuncInv& } rsnld.Root(Solinv); - if(FinvP.IsSolution(Solinv, tolesp)){ + if(FinvP.IsSolution(Solinv, tolpoint3d)){ gp_Pnt2d p2drst1 = rst1->Value(Solinv(2)); TopAbs_State situ = domain1->Classify(p2drst1, toler(2), 0); if ((situ != TopAbs_IN) && (situ != TopAbs_ON)) { @@ -1378,7 +1378,7 @@ void BRepBlend_RstRstLineBuilder::MakeExtremity(BRepBlend_Extremity& if (OnFirst) { Extrem.SetValue(previousP.PointOnC1(), sol(1), - previousP.Parameter(), tolesp); + previousP.Parameter(), tolpoint3d); if (!previousP.IsTangencyPoint()) Extrem.SetTangent(previousP.TangentOnC1()); Iter = domain1; @@ -1386,7 +1386,7 @@ void BRepBlend_RstRstLineBuilder::MakeExtremity(BRepBlend_Extremity& else { Extrem.SetValue(previousP.PointOnC2(), sol(2), - previousP.Parameter(), tolesp); + previousP.Parameter(), tolpoint3d); if (!previousP.IsTangencyPoint()) Extrem.SetTangent(previousP.TangentOnC1()); Iter = domain2; @@ -1453,12 +1453,13 @@ Blend_Status BRepBlend_RstRstLineBuilder::CheckDeflectionOnRst1(const Blend_Poin Norme = Corde.SquareMagnitude(); if (!prevpointistangent) prevNorme = prevTg.SquareMagnitude(); - if (Norme <= tolesp * tolesp) { + const Standard_Real toler3d = 0.01 * tolpoint3d; + if (Norme <= toler3d * toler3d) { // it can be necessary to force the same point return Blend_SamePoints; } if(!prevpointistangent){ - if (prevNorme <= tolesp * tolesp) { + if (prevNorme <= toler3d * toler3d) { return Blend_SamePoints; } Cosi = sens * Corde * prevTg; @@ -1530,12 +1531,13 @@ Blend_Status BRepBlend_RstRstLineBuilder::CheckDeflectionOnRst2(const Blend_Poin Norme = Corde.SquareMagnitude(); if (!prevpointistangent) prevNorme = prevTg.SquareMagnitude(); - if (Norme <= tolesp * tolesp){ + const Standard_Real toler3d = 0.01 * tolpoint3d; + if (Norme <= toler3d * toler3d){ // it can be necessary to force the same point return Blend_SamePoints; } if (!prevpointistangent) { - if (prevNorme <= tolesp * tolesp) { + if (prevNorme <= toler3d * toler3d) { return Blend_SamePoints; } Cosi = sens * Corde * prevTg; @@ -1597,7 +1599,7 @@ Blend_Status BRepBlend_RstRstLineBuilder::TestArret(Blend_RstRstFunction& Func, IntSurf_TypeTrans trarst1 = IntSurf_Undecided, trarst2 = IntSurf_Undecided; Blend_Point curpoint; - if (Func.IsSolution(sol, tolesp)) { + if (Func.IsSolution(sol, tolpoint3d)) { Standard_Boolean curpointistangent = Func.IsTangencyPoint(); ptrst1 = Func.PointOnRst1(); ptrst2 = Func.PointOnRst2(); @@ -1644,7 +1646,7 @@ Blend_Status BRepBlend_RstRstLineBuilder::TestArret(Blend_RstRstFunction& Func, Standard_Real testra = tg2drst1.Dot(tg2drstref); TopAbs_Orientation Or = domain1->Orientation(rst1); - if (Abs(testra) > tolesp) { + if (Abs(testra) > tolpoint3d) { if (testra < 0.) { trarst1 = ConvOrToTra(TopAbs::Reverse(Or)); } @@ -1656,7 +1658,7 @@ Blend_Status BRepBlend_RstRstLineBuilder::TestArret(Blend_RstRstFunction& Func, testra = tg2drst2.Dot(tg2drstref); Or = domain2->Orientation(rst2); - if (Abs(testra) > tolesp) { + if (Abs(testra) > tolpoint3d) { if (testra < 0.) { trarst2 = ConvOrToTra(TopAbs::Reverse(Or)); } @@ -1705,7 +1707,7 @@ Standard_Boolean BRepBlend_RstRstLineBuilder::CheckInside(Blend_RstRstFunction& { // Standard_Boolean inside = Standard_True; math_Vector tolerance(1, 2); - Func.GetTolerance(tolerance, tolesp); + Func.GetTolerance(tolerance, tolpoint3d); //face pcurve 1. Standard_Real v = sol(1); diff --git a/src/BRepBlend/BRepBlend_RstRstLineBuilder.hxx b/src/BRepBlend/BRepBlend_RstRstLineBuilder.hxx index e5be492fcb..10b1a0702d 100644 --- a/src/BRepBlend/BRepBlend_RstRstLineBuilder.hxx +++ b/src/BRepBlend/BRepBlend_RstRstLineBuilder.hxx @@ -72,9 +72,9 @@ public: Standard_EXPORT BRepBlend_RstRstLineBuilder(const Handle(Adaptor3d_Surface)& Surf1, const Handle(Adaptor2d_Curve2d)& Rst1, const Handle(Adaptor3d_TopolTool)& Domain1, const Handle(Adaptor3d_Surface)& Surf2, const Handle(Adaptor2d_Curve2d)& Rst2, const Handle(Adaptor3d_TopolTool)& Domain2); - Standard_EXPORT void Perform (Blend_RstRstFunction& Func, Blend_SurfCurvFuncInv& Finv1, Blend_CurvPointFuncInv& FinvP1, Blend_SurfCurvFuncInv& Finv2, Blend_CurvPointFuncInv& FinvP2, const Standard_Real Pdep, const Standard_Real Pmax, const Standard_Real MaxStep, const Standard_Real TolGuide, const math_Vector& Soldep, const Standard_Real Tolesp, const Standard_Real Fleche, const Standard_Boolean Appro = Standard_False); + Standard_EXPORT void Perform (Blend_RstRstFunction& Func, Blend_SurfCurvFuncInv& Finv1, Blend_CurvPointFuncInv& FinvP1, Blend_SurfCurvFuncInv& Finv2, Blend_CurvPointFuncInv& FinvP2, const Standard_Real Pdep, const Standard_Real Pmax, const Standard_Real MaxStep, const Standard_Real Tol3d, const Standard_Real TolGuide, const math_Vector& Soldep, const Standard_Real Fleche, const Standard_Boolean Appro = Standard_False); - Standard_EXPORT Standard_Boolean PerformFirstSection (Blend_RstRstFunction& Func, Blend_SurfCurvFuncInv& Finv1, Blend_CurvPointFuncInv& FinvP1, Blend_SurfCurvFuncInv& Finv2, Blend_CurvPointFuncInv& FinvP2, const Standard_Real Pdep, const Standard_Real Pmax, const math_Vector& Soldep, const Standard_Real Tolesp, const Standard_Real TolGuide, const Standard_Boolean RecRst1, const Standard_Boolean RecP1, const Standard_Boolean RecRst2, const Standard_Boolean RecP2, Standard_Real& Psol, math_Vector& ParSol); + Standard_EXPORT Standard_Boolean PerformFirstSection (Blend_RstRstFunction& Func, Blend_SurfCurvFuncInv& Finv1, Blend_CurvPointFuncInv& FinvP1, Blend_SurfCurvFuncInv& Finv2, Blend_CurvPointFuncInv& FinvP2, const Standard_Real Pdep, const Standard_Real Pmax, const math_Vector& Soldep, const Standard_Real Tol3d, const Standard_Real TolGuide, const Standard_Boolean RecRst1, const Standard_Boolean RecP1, const Standard_Boolean RecRst2, const Standard_Boolean RecP2, Standard_Real& Psol, math_Vector& ParSol); Standard_EXPORT Standard_Boolean Complete (Blend_RstRstFunction& Func, Blend_SurfCurvFuncInv& Finv1, Blend_CurvPointFuncInv& FinvP1, Blend_SurfCurvFuncInv& Finv2, Blend_CurvPointFuncInv& FinvP2, const Standard_Real Pmin); @@ -134,7 +134,7 @@ private: Handle(Adaptor3d_TopolTool) domain2; Handle(Adaptor2d_Curve2d) rst1; Handle(Adaptor2d_Curve2d) rst2; - Standard_Real tolesp; + Standard_Real tolpoint3d; Standard_Real tolgui; Standard_Real pasmax; Standard_Real fleche; diff --git a/src/BRepBlend/BRepBlend_SurfRstLineBuilder.cxx b/src/BRepBlend/BRepBlend_SurfRstLineBuilder.cxx index 02d657bd34..8bba3178f0 100644 --- a/src/BRepBlend/BRepBlend_SurfRstLineBuilder.cxx +++ b/src/BRepBlend/BRepBlend_SurfRstLineBuilder.cxx @@ -210,7 +210,7 @@ BRepBlend_SurfRstLineBuilder::BRepBlend_SurfRstLineBuilder const Handle(Adaptor3d_TopolTool)& Domain2): done(Standard_False), sol(1, 3), surf1(Surf1), domain1(Domain1), surf2(Surf2), rst(Rst), - domain2(Domain2), tolesp(0.0), tolgui(0.0), + domain2(Domain2), tolpoint3d(0.0), tolpoint2d(0.0), tolgui(0.0), pasmax(0.0), fleche(0.0), param(0.0), rebrou(Standard_False), iscomplete(Standard_False), comptra(Standard_False), sens(0.0), @@ -230,9 +230,10 @@ void BRepBlend_SurfRstLineBuilder::Perform(Blend_SurfRstFunction& Func, const Standard_Real Pdep, const Standard_Real Pmax, const Standard_Real MaxStep, + const Standard_Real Tol3d, + const Standard_Real Tol2d, const Standard_Real TolGuide, const math_Vector& ParDep, - const Standard_Real Tolesp, const Standard_Real Fleche, const Standard_Boolean Appro) { @@ -240,7 +241,8 @@ void BRepBlend_SurfRstLineBuilder::Perform(Blend_SurfRstFunction& Func, iscomplete = Standard_False; comptra = Standard_False; line = new BRepBlend_Line(); - tolesp = Abs(Tolesp); + tolpoint3d = Tol3d; + tolpoint2d = Tol2d; tolgui = Abs(TolGuide); fleche = Abs(Fleche); rebrou = Standard_False; @@ -262,7 +264,7 @@ void BRepBlend_SurfRstLineBuilder::Perform(Blend_SurfRstFunction& Func, TopAbs_State siturst,situs; Standard_Boolean decroch; math_Vector tolerance(1,3),infbound(1,3),supbound(1,3); - Func.GetTolerance(tolerance,tolesp); + Func.GetTolerance(tolerance,tolpoint3d); Func.GetBounds(infbound,supbound); math_FunctionSetRoot rsnld(Func,tolerance,30); @@ -296,9 +298,9 @@ void BRepBlend_SurfRstLineBuilder::Perform(Blend_SurfRstFunction& Func, // W = previousP.ParameterOnC(); BRepBlend_Extremity ptf1(previousP.PointOnS(), - U,V,previousP.Parameter(),tolesp); + U,V,previousP.Parameter(),tolpoint3d); BRepBlend_Extremity ptf2(previousP.PointOnC(), - U,V,previousP.Parameter(),tolesp); + U,V,previousP.Parameter(),tolpoint3d); if (!previousP.IsTangencyPoint()) { ptf1.SetTangent(previousP.TangentOnS()); ptf2.SetTangent(previousP.TangentOnC()); @@ -327,7 +329,8 @@ Standard_Boolean BRepBlend_SurfRstLineBuilder::PerformFirstSection const Standard_Real Pdep, const Standard_Real Pmax, const math_Vector& ParDep, - const Standard_Real Tolesp, + const Standard_Real Tol3d, + const Standard_Real Tol2d, const Standard_Real TolGuide, const Standard_Boolean RecRst, const Standard_Boolean RecP, @@ -339,7 +342,8 @@ Standard_Boolean BRepBlend_SurfRstLineBuilder::PerformFirstSection iscomplete = Standard_False; comptra = Standard_False; line = new BRepBlend_Line(); - tolesp = Abs(Tolesp); + tolpoint3d = Tol3d; + tolpoint2d = Tol2d; tolgui = Abs(TolGuide); rebrou = Standard_False; @@ -362,7 +366,7 @@ Standard_Boolean BRepBlend_SurfRstLineBuilder::PerformFirstSection wp = wrst = ws = Pmax; param = Pdep; Func.Set(param); - Func.GetTolerance(tolerance,tolesp); + Func.GetTolerance(tolerance,tolpoint3d); Func.GetBounds(infbound,supbound); math_FunctionSetRoot rsnld(Func,tolerance,30); @@ -536,7 +540,7 @@ void BRepBlend_SurfRstLineBuilder::InternalPerform(Blend_SurfRstFunction& Func, //IntSurf_Transition Tline,Tarc; - Func.GetTolerance(tolerance,tolesp); + Func.GetTolerance(tolerance,tolpoint3d); Func.GetBounds(infbound,supbound); math_FunctionSetRoot rsnld(Func,tolerance,30); @@ -558,14 +562,14 @@ void BRepBlend_SurfRstLineBuilder::InternalPerform(Blend_SurfRstFunction& Func, if (rsnld.IsDone()) { rsnld.Root(sol); Blend_Point bp1; - if(BBPP(param,Func,sol,tolesp,bp1)){ + if(BBPP(param,Func,sol,tolpoint3d,bp1)){ Standard_Real dw = 1.e-10; Func.Set(param+dw); rsnld.Perform(Func,parinit,infbound,supbound); if (rsnld.IsDone()) { rsnld.Root(sol); Blend_Point bp2; - if(BBPP(param+dw,Func,sol,tolesp,bp2)){ + if(BBPP(param+dw,Func,sol,tolpoint3d,bp2)){ tracederiv(Func,bp1,bp2); } } @@ -746,7 +750,7 @@ void BRepBlend_SurfRstLineBuilder::InternalPerform(Blend_SurfRstFunction& Func, Arrive = Standard_True; Exts.SetValue(previousP.PointOnS(), sol(1),sol(2), - previousP.Parameter(),tolesp); + previousP.Parameter(),tolpoint3d); MakeExtremity(Extrst,Standard_False,rst,sol(3),IsVtxrst,Vtxrst); // Indicate end on Bound. } @@ -765,10 +769,10 @@ void BRepBlend_SurfRstLineBuilder::InternalPerform(Blend_SurfRstFunction& Func, if (Abs(stepw) < tolgui) { previousP.ParametersOnS(U,V); Exts.SetValue(previousP.PointOnS(),U,V, - previousP.Parameter(),tolesp); + previousP.Parameter(),tolpoint3d); Extrst.SetValue(previousP.PointOnC(), previousP.ParameterOnC(), - previousP.Parameter(),tolesp); + previousP.Parameter(),tolpoint3d); Arrive = Standard_True; if (line->NbPoints()>=2) { // Indicate that one stops during the processing @@ -804,7 +808,7 @@ void BRepBlend_SurfRstLineBuilder::InternalPerform(Blend_SurfRstFunction& Func, if (param == Bound) { Arrive = Standard_True; Exts.SetValue(previousP.PointOnS(),sol(1),sol(2), - previousP.Parameter(),tolesp); + previousP.Parameter(),tolpoint3d); MakeExtremity(Extrst,Standard_False,rst,sol(3),IsVtxrst,Vtxrst); // Indicate end on Bound. } @@ -850,7 +854,7 @@ void BRepBlend_SurfRstLineBuilder::InternalPerform(Blend_SurfRstFunction& Func, line->Prepend(previousP); } Exts.SetValue(previousP.PointOnS(),sol(1),sol(2), - previousP.Parameter(),tolesp); + previousP.Parameter(),tolpoint3d); MakeExtremity(Extrst,Standard_False,rst,sol(3),IsVtxrst,Vtxrst); Arrive = Standard_True; } @@ -883,10 +887,10 @@ void BRepBlend_SurfRstLineBuilder::InternalPerform(Blend_SurfRstFunction& Func, #endif previousP.ParametersOnS(U,V); Exts.SetValue(previousP.PointOnS(),U,V, - previousP.Parameter(),tolesp); + previousP.Parameter(),tolpoint3d); Extrst.SetValue(previousP.PointOnC(), previousP.ParameterOnC(), - previousP.Parameter(),tolesp); + previousP.Parameter(),tolpoint3d); Arrive = Standard_True; } break; @@ -941,7 +945,10 @@ Standard_Boolean BRepBlend_SurfRstLineBuilder::Recadre(Blend_SurfCurvFuncInv& FinvC.Set(Arc); math_Vector toler(1,3),infb(1,3),supb(1,3); - FinvC.GetTolerance(toler,tolesp); + // use reduced Tol argument value to pass testcase + // blend complex A6 with scale factor of model 0.1 (base scale = 1000) + // So, here we using 1.0e-5 rather than 1.0e-4 of tolerance of point in 3d + FinvC.GetTolerance(toler,0.1 * tolpoint3d); FinvC.GetBounds(infb,supb); Solinv(1) = param; Solinv(2) = sol(3); @@ -958,7 +965,7 @@ Standard_Boolean BRepBlend_SurfRstLineBuilder::Recadre(Blend_SurfCurvFuncInv& else { // It is necessary to check the value of the function rsnld.Root(Solinv); - recadre = FinvC.IsSolution(Solinv,tolesp); + recadre = FinvC.IsSolution(Solinv,tolpoint3d); } // In case of fail, it is checked if another arc @@ -981,7 +988,7 @@ Standard_Boolean BRepBlend_SurfRstLineBuilder::Recadre(Blend_SurfCurvFuncInv& Arc = domain1->Value(); FinvC.Set(Arc); - FinvC.GetTolerance(toler,tolesp); + FinvC.GetTolerance(toler,tolpoint3d); FinvC.GetBounds(infb,supb); Solinv(3) = pmin; @@ -997,7 +1004,7 @@ Standard_Boolean BRepBlend_SurfRstLineBuilder::Recadre(Blend_SurfCurvFuncInv& else { // It is necessary to check the value of the function aRsnld.Root(Solinv); - recadre = FinvC.IsSolution(Solinv,tolesp); + recadre = FinvC.IsSolution(Solinv,tolpoint3d); } } @@ -1041,7 +1048,7 @@ Standard_Boolean BRepBlend_SurfRstLineBuilder::Recadre(Blend_SurfRstFunction& Handle(Adaptor3d_HVertex)& Vtx) { math_Vector toler(1,4),infb(1,4),supb(1,4); - Finv.GetTolerance(toler,tolesp); + Finv.GetTolerance(toler,tolpoint3d); Finv.GetBounds(infb,supb); Solinv(1) = sol(3); Solinv(2) = param; @@ -1058,9 +1065,9 @@ Standard_Boolean BRepBlend_SurfRstLineBuilder::Recadre(Blend_SurfRstFunction& } rsnld.Root(Solinv); - if(Finv.IsSolution(Solinv,tolesp)){ + if(Finv.IsSolution(Solinv,tolpoint3d)){ gp_Pnt2d p2d(Solinv(3),Solinv(4)); - TopAbs_State situ = domain1->Classify(p2d,Min(toler(3),toler(4)),0); + TopAbs_State situ = domain1->Classify(p2d,tolpoint2d,0); if ((situ != TopAbs_IN) && (situ != TopAbs_ON)) { return Standard_False; } @@ -1086,7 +1093,7 @@ Standard_Boolean BRepBlend_SurfRstLineBuilder::Recadre(Blend_SurfRstFunction& math_Vector infbound(1,3),supbound(1,3); math_Vector parinit(1,3),tolerance(1,3); - Func.GetTolerance(tolerance,tolesp); + Func.GetTolerance(tolerance,tolpoint3d); Func.GetBounds(infbound,supbound); math_FunctionSetRoot rsnld2(Func,tolerance,30); @@ -1126,7 +1133,7 @@ Standard_Boolean BRepBlend_SurfRstLineBuilder::Recadre(Blend_SurfPointFuncInv& FinvP.Set(thepoint); math_Vector toler(1,3),infb(1,3),supb(1,3); - FinvP.GetTolerance(toler,tolesp); + FinvP.GetTolerance(toler,tolpoint3d); FinvP.GetBounds(infb,supb); Solinv(1) = param; Solinv(2) = sol(1); @@ -1142,9 +1149,9 @@ Standard_Boolean BRepBlend_SurfRstLineBuilder::Recadre(Blend_SurfPointFuncInv& } rsnld.Root(Solinv); - if(FinvP.IsSolution(Solinv,tolesp)){ + if(FinvP.IsSolution(Solinv,tolpoint3d)){ gp_Pnt2d p2d(Solinv(2),Solinv(3)); - TopAbs_State situ = domain1->Classify(p2d,Min(toler(2),toler(3)),0); + TopAbs_State situ = domain1->Classify(p2d,tolpoint2d,0); if ((situ != TopAbs_IN) && (situ != TopAbs_ON)) { return Standard_False; } @@ -1237,7 +1244,7 @@ void BRepBlend_SurfRstLineBuilder::MakeExtremity(BRepBlend_Extremity& if (OnFirst) { Extrem.SetValue(previousP.PointOnS(), sol(1),sol(2), - previousP.Parameter(),tolesp); + previousP.Parameter(),tolpoint3d); if (!previousP.IsTangencyPoint()) Extrem.SetTangent(previousP.TangentOnS()); Iter = domain1; @@ -1245,7 +1252,7 @@ void BRepBlend_SurfRstLineBuilder::MakeExtremity(BRepBlend_Extremity& else { Extrem.SetValue(previousP.PointOnC(), sol(3), - previousP.Parameter(),tolesp); + previousP.Parameter(),tolpoint3d); if (!previousP.IsTangencyPoint()) Extrem.SetTangent(previousP.TangentOnC()); Iter = domain2; @@ -1312,12 +1319,13 @@ Blend_Status BRepBlend_SurfRstLineBuilder::CheckDeflectionOnSurf(const Blend_Poi // if(!curpointistangent) curNorme = Tgsurf.SquareMagnitude(); if(!prevpointistangent) prevNorme = prevTg.SquareMagnitude(); - if (Norme <= tolesp*tolesp){ + const Standard_Real toler3d = 0.01 * tolpoint3d; + if (Norme <= toler3d * toler3d){ // it can be necessary to force same point return Blend_SamePoints; } if(!prevpointistangent){ - if(prevNorme <= tolesp*tolesp) { + if(prevNorme <= toler3d * toler3d) { return Blend_SamePoints; } Cosi = sens*Corde*prevTg; @@ -1388,12 +1396,13 @@ Blend_Status BRepBlend_SurfRstLineBuilder::CheckDeflectionOnRst(const Blend_Poin // if(!curpointistangent) curNorme = Tgsurf.SquareMagnitude(); if(!prevpointistangent) prevNorme = prevTg.SquareMagnitude(); - if (Norme <= tolesp*tolesp){ + const Standard_Real toler3d = 0.01 * tolpoint3d; + if (Norme <= toler3d * toler3d){ // it can be necessary to force same point return Blend_SamePoints; } if(!prevpointistangent){ - if(prevNorme <= tolesp*tolesp) { + if(prevNorme <= toler3d * toler3d) { return Blend_SamePoints; } Cosi = sens*Corde*prevTg; @@ -1455,7 +1464,7 @@ Blend_Status BRepBlend_SurfRstLineBuilder::TestArret(Blend_SurfRstFunction& Func IntSurf_TypeTrans tras = IntSurf_Undecided, trarst = IntSurf_Undecided; Blend_Point curpoint; - if (Func.IsSolution(sol,tolesp)) { + if (Func.IsSolution(sol,tolpoint3d)) { Standard_Boolean curpointistangent = Func.IsTangencyPoint(); pts = Func.PointOnS(); ptrst = Func.PointOnRst(); @@ -1499,7 +1508,7 @@ Blend_Status BRepBlend_SurfRstLineBuilder::TestArret(Blend_SurfRstFunction& Func Func.Decroch(sol,nors,tgsecs); nors.Normalize(); Standard_Real testra = tgsecs.Dot(nors.Crossed(tgs)); - if (Abs(testra) > tolesp) { + if (Abs(testra) > tolpoint3d) { if (testra < 0.) { tras = IntSurf_In; } @@ -1558,7 +1567,7 @@ Standard_Boolean BRepBlend_SurfRstLineBuilder::CheckInside(Blend_SurfRstFunction Standard_Boolean& Decroch) { math_Vector tolerance(1,3); - Func.GetTolerance(tolerance,tolesp); + Func.GetTolerance(tolerance,tolpoint3d); //face pcurve. Standard_Real w = sol(3); if(w < rst->FirstParameter() - tolerance(3)|| @@ -1573,7 +1582,7 @@ Standard_Boolean BRepBlend_SurfRstLineBuilder::CheckInside(Blend_SurfRstFunction //face surface gp_Pnt2d p2d(sol(1),sol(2)); - SituOnS = domain1->Classify(p2d,Min(tolerance(1),tolerance(2)),0); + SituOnS = domain1->Classify(p2d,tolpoint2d,0); //lost contact gp_Vec tgs,nors; diff --git a/src/BRepBlend/BRepBlend_SurfRstLineBuilder.hxx b/src/BRepBlend/BRepBlend_SurfRstLineBuilder.hxx index a5834f1c63..3bf2009501 100644 --- a/src/BRepBlend/BRepBlend_SurfRstLineBuilder.hxx +++ b/src/BRepBlend/BRepBlend_SurfRstLineBuilder.hxx @@ -71,9 +71,9 @@ public: Standard_EXPORT BRepBlend_SurfRstLineBuilder(const Handle(Adaptor3d_Surface)& Surf1, const Handle(Adaptor3d_TopolTool)& Domain1, const Handle(Adaptor3d_Surface)& Surf2, const Handle(Adaptor2d_Curve2d)& Rst, const Handle(Adaptor3d_TopolTool)& Domain2); - Standard_EXPORT void Perform (Blend_SurfRstFunction& Func, Blend_FuncInv& Finv, Blend_SurfPointFuncInv& FinvP, Blend_SurfCurvFuncInv& FinvC, const Standard_Real Pdep, const Standard_Real Pmax, const Standard_Real MaxStep, const Standard_Real TolGuide, const math_Vector& Soldep, const Standard_Real Tolesp, const Standard_Real Fleche, const Standard_Boolean Appro = Standard_False); + Standard_EXPORT void Perform (Blend_SurfRstFunction& Func, Blend_FuncInv& Finv, Blend_SurfPointFuncInv& FinvP, Blend_SurfCurvFuncInv& FinvC, const Standard_Real Pdep, const Standard_Real Pmax, const Standard_Real MaxStep, const Standard_Real Tol3d, const Standard_Real Tol2d, const Standard_Real TolGuide, const math_Vector& Soldep, const Standard_Real Fleche, const Standard_Boolean Appro = Standard_False); - Standard_EXPORT Standard_Boolean PerformFirstSection (Blend_SurfRstFunction& Func, Blend_FuncInv& Finv, Blend_SurfPointFuncInv& FinvP, Blend_SurfCurvFuncInv& FinvC, const Standard_Real Pdep, const Standard_Real Pmax, const math_Vector& Soldep, const Standard_Real Tolesp, const Standard_Real TolGuide, const Standard_Boolean RecRst, const Standard_Boolean RecP, const Standard_Boolean RecS, Standard_Real& Psol, math_Vector& ParSol); + Standard_EXPORT Standard_Boolean PerformFirstSection (Blend_SurfRstFunction& Func, Blend_FuncInv& Finv, Blend_SurfPointFuncInv& FinvP, Blend_SurfCurvFuncInv& FinvC, const Standard_Real Pdep, const Standard_Real Pmax, const math_Vector& Soldep, const Standard_Real Tol3d, const Standard_Real Tol2d, const Standard_Real TolGuide, const Standard_Boolean RecRst, const Standard_Boolean RecP, const Standard_Boolean RecS, Standard_Real& Psol, math_Vector& ParSol); Standard_EXPORT Standard_Boolean Complete (Blend_SurfRstFunction& Func, Blend_FuncInv& Finv, Blend_SurfPointFuncInv& FinvP, Blend_SurfCurvFuncInv& FinvC, const Standard_Real Pmin); @@ -128,7 +128,8 @@ private: Handle(Adaptor3d_Surface) surf2; Handle(Adaptor2d_Curve2d) rst; Handle(Adaptor3d_TopolTool) domain2; - Standard_Real tolesp; + Standard_Real tolpoint3d; + Standard_Real tolpoint2d; Standard_Real tolgui; Standard_Real pasmax; Standard_Real fleche; diff --git a/src/BRepBlend/BRepBlend_Walking.hxx b/src/BRepBlend/BRepBlend_Walking.hxx index 0f08fc6fe8..23d718ec91 100644 --- a/src/BRepBlend/BRepBlend_Walking.hxx +++ b/src/BRepBlend/BRepBlend_Walking.hxx @@ -58,11 +58,11 @@ public: //! To define singular points computed before walking. Standard_EXPORT void AddSingularPoint (const Blend_Point& P); - Standard_EXPORT void Perform (Blend_Function& F, Blend_FuncInv& FInv, const Standard_Real Pdep, const Standard_Real Pmax, const Standard_Real MaxStep, const Standard_Real TolGuide, const math_Vector& Soldep, const Standard_Real Tolesp, const Standard_Real Fleche, const Standard_Boolean Appro = Standard_False); + Standard_EXPORT void Perform (Blend_Function& F, Blend_FuncInv& FInv, const Standard_Real Pdep, const Standard_Real Pmax, const Standard_Real MaxStep, const Standard_Real Tol3d, const Standard_Real TolGuide, const math_Vector& Soldep, const Standard_Real Fleche, const Standard_Boolean Appro = Standard_False); - Standard_EXPORT Standard_Boolean PerformFirstSection (Blend_Function& F, const Standard_Real Pdep, math_Vector& ParDep, const Standard_Real Tolesp, const Standard_Real TolGuide, TopAbs_State& Pos1, TopAbs_State& Pos2); + Standard_EXPORT Standard_Boolean PerformFirstSection (Blend_Function& F, const Standard_Real Pdep, math_Vector& ParDep, const Standard_Real Tol3d, const Standard_Real TolGuide, TopAbs_State& Pos1, TopAbs_State& Pos2); - Standard_EXPORT Standard_Boolean PerformFirstSection (Blend_Function& F, Blend_FuncInv& FInv, const Standard_Real Pdep, const Standard_Real Pmax, const math_Vector& ParDep, const Standard_Real Tolesp, const Standard_Real TolGuide, const Standard_Boolean RecOnS1, const Standard_Boolean RecOnS2, Standard_Real& Psol, math_Vector& ParSol); + Standard_EXPORT Standard_Boolean PerformFirstSection (Blend_Function& F, Blend_FuncInv& FInv, const Standard_Real Pdep, const Standard_Real Pmax, const math_Vector& ParDep, const Standard_Real Tol3d, const Standard_Real TolGuide, const Standard_Boolean RecOnS1, const Standard_Boolean RecOnS2, Standard_Real& Psol, math_Vector& ParSol); Standard_EXPORT Standard_Boolean Continu (Blend_Function& F, Blend_FuncInv& FInv, const Standard_Real P); @@ -131,7 +131,7 @@ private: Standard_Boolean ToCorrectOnRst1; Standard_Boolean ToCorrectOnRst2; Standard_Real CorrectedParam; - Standard_Real tolesp; + Standard_Real tolpoint3d; Standard_Real tolgui; Standard_Real pasmax; Standard_Real fleche; diff --git a/src/BRepFilletAPI/BRepFilletAPI_MakeFillet.cxx b/src/BRepFilletAPI/BRepFilletAPI_MakeFillet.cxx index f1b3287e34..2d9127ebb5 100644 --- a/src/BRepFilletAPI/BRepFilletAPI_MakeFillet.cxx +++ b/src/BRepFilletAPI/BRepFilletAPI_MakeFillet.cxx @@ -44,13 +44,13 @@ BRepFilletAPI_MakeFillet::BRepFilletAPI_MakeFillet(const TopoDS_Shape& S, //======================================================================= void BRepFilletAPI_MakeFillet::SetParams(const Standard_Real Tang, - const Standard_Real Tesp, - const Standard_Real T2d, - const Standard_Real TApp3d, - const Standard_Real TolApp2d, - const Standard_Real Fleche) + const Standard_Real Tesp, + const Standard_Real T2d, + const Standard_Real TApp3d, + const Standard_Real TolApp2d, + const Standard_Real Fleche) { - myBuilder.SetParams(Tang,Tesp, T2d, TApp3d, TolApp2d, Fleche); + myBuilder.SetParams(Tang, Tesp, T2d, TApp3d, TolApp2d, Fleche); } //======================================================================= diff --git a/src/BRepTest/BRepTest_FeatureCommands.cxx b/src/BRepTest/BRepTest_FeatureCommands.cxx index 7b6a829dbc..07eab33dad 100644 --- a/src/BRepTest/BRepTest_FeatureCommands.cxx +++ b/src/BRepTest/BRepTest_FeatureCommands.cxx @@ -112,6 +112,7 @@ static Standard_Boolean pidef = Standard_False; static Standard_Boolean lfdef = Standard_False; static Standard_Boolean rfdef = Standard_False; +static Standard_Real tesp = 1.0e-4; static Standard_Real t3d = 1.e-4; static Standard_Real t2d = 1.e-5; static Standard_Real ta = 1.e-2; @@ -2361,7 +2362,7 @@ static Standard_Integer BOSS(Draw_Interpretor& theCommands, if (Rakk) delete Rakk; Rakk = new BRepFilletAPI_MakeFillet(V, FSh); - Rakk->SetParams(ta, t3d, t2d, t3d, t2d, fl); + Rakk->SetParams(ta, tesp, t2d, t3d, t2d, fl); Rakk->SetContinuity(blend_cont, tapp_angle); Standard_Real Rad; TopoDS_Shape S; diff --git a/src/BRepTest/BRepTest_FilletCommands.cxx b/src/BRepTest/BRepTest_FilletCommands.cxx index b4ef1ea156..08eae0641b 100644 --- a/src/BRepTest/BRepTest_FilletCommands.cxx +++ b/src/BRepTest/BRepTest_FilletCommands.cxx @@ -47,7 +47,7 @@ #include - +static Standard_Real tesp = 1.0e-4; static Standard_Real t3d = 1.e-4; static Standard_Real t2d = 1.e-5; static Standard_Real ta = 1.e-2; @@ -152,7 +152,7 @@ static Standard_Integer BLEND(Draw_Interpretor& di, Standard_Integer narg, const } } Rakk = new BRepFilletAPI_MakeFillet(V,FSh); - Rakk->SetParams(ta,t3d,t2d,t3d,t2d,fl); + Rakk->SetParams(ta, tesp, t2d, t3d, t2d, fl); Rakk->SetContinuity(blend_cont, tapp_angle); Standard_Real Rad; TopoDS_Edge E; @@ -254,7 +254,7 @@ static Standard_Integer MKEVOL(Draw_Interpretor& di, if (narg < 3) return 1; TopoDS_Shape V = DBRep::Get(a[2]); Rake = new BRepFilletAPI_MakeFillet(V); - Rake->SetParams(ta,t3d,t2d,t3d,t2d,fl); + Rake->SetParams(ta, tesp, t2d, t3d, t2d, fl); Rake->SetContinuity(blend_cont, tapp_angle); if (narg == 4) { ChFi3d_FilletShape FSh = ChFi3d_Rational; @@ -410,7 +410,7 @@ Standard_Integer boptopoblend(Draw_Interpretor& di, Standard_Integer narg, const const TopoDS_Shape& aSolid = Explo.Current(); BRepFilletAPI_MakeFillet Blender(aSolid); - Blender.SetParams(ta,t3d,t2d,t3d,t2d,fl); + Blender.SetParams(ta, tesp, t2d, t3d, t2d, fl); Blender.SetContinuity( blend_cont, tapp_angle ); TopExp_Explorer expsec( theSection, TopAbs_EDGE ); diff --git a/src/Blend/Blend_CSWalking_1.gxx b/src/Blend/Blend_CSWalking_1.gxx index e86ee57c04..7f3a4557a4 100644 --- a/src/Blend/Blend_CSWalking_1.gxx +++ b/src/Blend/Blend_CSWalking_1.gxx @@ -28,9 +28,9 @@ void Blend_CSWalking::Perform(Blend_CSFunction& Func, const Standard_Real Pdep, const Standard_Real Pmax, const Standard_Real MaxStep, + const Standard_Real Tol3d, const Standard_Real TolGuide, const math_Vector& ParDep, - const Standard_Real Tolesp, const Standard_Real Fleche, const Standard_Boolean Appro) { @@ -40,7 +40,7 @@ void Blend_CSWalking::Perform(Blend_CSFunction& Func, comptra = Standard_False; line = new TheLine (); Standard_Integer Nbvar = Func.NbVariables(); - tolesp = Abs(Tolesp); + tolpoint3d = Tol3d; tolgui = Abs(TolGuide); fleche = Abs(Fleche); rebrou = Standard_False; @@ -68,7 +68,7 @@ void Blend_CSWalking::Perform(Blend_CSFunction& Func, TopAbs_State situ; // math_Vector tolerance(1,3),infbound(1,3),supbound(1,3); math_Vector tolerance(1,Nbvar),infbound(1,Nbvar),supbound(1,Nbvar); - Func.GetTolerance(tolerance,tolesp); + Func.GetTolerance(tolerance,tolpoint3d); Func.GetBounds(infbound,supbound); math_FunctionSetRoot rsnld(Func,tolerance,30); @@ -115,8 +115,8 @@ void Blend_CSWalking::Perform(Blend_CSFunction& Func, Standard_Real U,V,W; previousP.ParametersOnS(U,V); W = previousP.ParameterOnC(); - TheExtremity P1(previousP.PointOnS(),U,V,previousP.Parameter(),tolesp); - TheExtremity P2(previousP.PointOnC(),W,previousP.Parameter(),tolesp); + TheExtremity P1(previousP.PointOnS(),U,V,previousP.Parameter(),tolpoint3d); + TheExtremity P2(previousP.PointOnC(),W,previousP.Parameter(),tolpoint3d); if (sens>0.) { line->SetStartPoints(P1,P2); } diff --git a/src/Blend/Blend_CSWalking_2.gxx b/src/Blend/Blend_CSWalking_2.gxx index fba4785d5c..beb678fff7 100644 --- a/src/Blend/Blend_CSWalking_2.gxx +++ b/src/Blend/Blend_CSWalking_2.gxx @@ -39,7 +39,7 @@ Blend_Status Blend_CSWalking::TestArret(Blend_CSFunction& Function, Blend_Status State1,State2; IntSurf_TypeTrans tras = IntSurf_Undecided; - if (Function.IsSolution(Sol,tolesp)) { + if (Function.IsSolution(Sol,tolpoint3d)) { pt1 = Function.PointOnS(); pt2 = Function.PointOnC(); @@ -176,15 +176,16 @@ Blend_Status Blend_CSWalking::CheckDeflectionOnSurf prevP = previousP.PointOnS(); prevTg = previousP.TangentOnS(); - tolu = TheSurfaceTool::UResolution(surf,tolesp); - tolv = TheSurfaceTool::VResolution(surf,tolesp); + tolu = TheSurfaceTool::UResolution(surf,tolpoint3d); + tolv = TheSurfaceTool::VResolution(surf,tolpoint3d); gp_Vec Corde(prevP,Psurf); Norme = Corde.SquareMagnitude(); prevNorme = prevTg.SquareMagnitude(); // JAG MODIF 25.04.94 - if (Norme <= tolesp*tolesp || prevNorme <= tolesp*tolesp) { // JAG MODIF 25.04.94 + const Standard_Real toler3d = tolpoint3d; + if (Norme <= toler3d * toler3d || prevNorme <= toler3d * toler3d) { // JAG MODIF 25.04.94 // il faudra peut etre forcer meme point JAG MODIF 25.04.94 return Blend_SamePoints; } @@ -275,19 +276,20 @@ Blend_Status Blend_CSWalking::CheckDeflectionOnCurv prevP = previousP.PointOnC(); prevTg = previousP.TangentOnC(); - tolu = TheCurveTool::Resolution(curv,tolesp); + tolu = TheCurveTool::Resolution(curv,tolpoint3d); gp_Vec Corde(prevP,Pcurv); Norme = Corde.SquareMagnitude(); prevNorme = prevTg.SquareMagnitude(); // JAG MODIF 25.04.94 + const Standard_Real toler3d = tolpoint3d; // if (Norme <= tolesp*tolesp || prevNorme <= tolesp*tolesp) { // JAG MODIF 25.04.94 - if (Norme <= tolesp*tolesp) { // le 95.01.10 + if (Norme <= toler3d * toler3d) { // le 95.01.10 // il faudra peut etre forcer meme point JAG MODIF 25.04.94 return Blend_SamePoints; } - else if (prevNorme > tolesp*tolesp) { + else if (prevNorme > toler3d * toler3d) { Cosi = sens*Corde*prevTg; if (Cosi <0.) { // angle 3d>pi/2. --> retour arriere return Blend_Backward; @@ -308,7 +310,7 @@ Blend_Status Blend_CSWalking::CheckDeflectionOnCurv // Voir s il faut faire le controle sur le signe de prevtg*Tgsurf - if (Tgcurv.Magnitude() <= tolesp) { + if (Tgcurv.Magnitude() <= tolpoint3d) { return Blend_SamePoints; // GROS BOBARD EN ATTENDANT } @@ -318,7 +320,7 @@ Blend_Status Blend_CSWalking::CheckDeflectionOnCurv return Blend_StepTooLarge; } - if (prevNorme > tolesp*tolesp) { + if (prevNorme > toler3d * toler3d) { // Estimation de la fleche courante /* diff --git a/src/Blend/Blend_CSWalking_3.gxx b/src/Blend/Blend_CSWalking_3.gxx index 77db2ccefa..6108a10111 100644 --- a/src/Blend/Blend_CSWalking_3.gxx +++ b/src/Blend/Blend_CSWalking_3.gxx @@ -205,7 +205,7 @@ void Blend_CSWalking::MakeExtremity(TheExtremity& Extrem, // Extrem.SetValue(previousP.PointOnS(),sol(1),sol(2),tolesp); previousP.ParametersOnS(U,V); - Extrem.SetValue(previousP.PointOnS(),U,V,previousP.Parameter(),tolesp); + Extrem.SetValue(previousP.PointOnS(),U,V,previousP.Parameter(),tolpoint3d); Iter = domain; diff --git a/src/Blend/Blend_CSWalking_4.gxx b/src/Blend/Blend_CSWalking_4.gxx index 1d693ff009..05873f2e58 100644 --- a/src/Blend/Blend_CSWalking_4.gxx +++ b/src/Blend/Blend_CSWalking_4.gxx @@ -40,7 +40,7 @@ void Blend_CSWalking::InternalPerform(Blend_CSFunction& Func, //IntSurf_Transition Tline,Tarc; - Func.GetTolerance(tolerance,tolesp); + Func.GetTolerance(tolerance,tolpoint3d); Func.GetBounds(infbound,supbound); math_FunctionSetRoot rsnld(Func,tolerance,30); @@ -146,9 +146,9 @@ void Blend_CSWalking::InternalPerform(Blend_CSFunction& Func, */ previousP.ParametersOnS(U,V); Exts.SetValue(previousP.PointOnS(),U,V, - previousP.Parameter(),tolesp); + previousP.Parameter(),tolpoint3d); Extc.SetValue(previousP.PointOnC(),previousP.ParameterOnC(), - previousP.Parameter(),tolesp); + previousP.Parameter(),tolpoint3d); // Indiquer que fin sur Bound. } else { @@ -171,9 +171,9 @@ void Blend_CSWalking::InternalPerform(Blend_CSFunction& Func, */ previousP.ParametersOnS(U,V); Exts.SetValue(previousP.PointOnS(),U,V, - previousP.Parameter(),tolesp); + previousP.Parameter(),tolpoint3d); Extc.SetValue(previousP.PointOnC(),previousP.ParameterOnC(), - previousP.Parameter(),tolesp); + previousP.Parameter(),tolpoint3d); Arrive = Standard_True; if (line->NbPoints()>=2) { // Indiquer qu on s arrete en cours de cheminement @@ -214,9 +214,9 @@ void Blend_CSWalking::InternalPerform(Blend_CSFunction& Func, */ previousP.ParametersOnS(U,V); Exts.SetValue(previousP.PointOnS(),U,V, - previousP.Parameter(),tolesp); + previousP.Parameter(),tolpoint3d); Extc.SetValue(previousP.PointOnC(),previousP.ParameterOnC(), - previousP.Parameter(),tolesp); + previousP.Parameter(),tolpoint3d); // Indiquer que fin sur Bound. } else { @@ -244,7 +244,7 @@ void Blend_CSWalking::InternalPerform(Blend_CSFunction& Func, MakeExtremity(Exts,Index,solrst(1),Isvtx,Vtx); // Extc.SetValue(previousP.PointOnC(),sol(3),tolesp); Extc.SetValue(previousP.PointOnC(),previousP.ParameterOnC(), - previousP.Parameter(),tolesp); + previousP.Parameter(),tolpoint3d); Arrive = Standard_True; } break; @@ -259,9 +259,9 @@ void Blend_CSWalking::InternalPerform(Blend_CSFunction& Func, */ previousP.ParametersOnS(U,V); Exts.SetValue(previousP.PointOnS(),U,V, - previousP.Parameter(),tolesp); + previousP.Parameter(),tolpoint3d); Extc.SetValue(previousP.PointOnC(),previousP.ParameterOnC(), - previousP.Parameter(),tolesp); + previousP.Parameter(),tolpoint3d); Arrive = Standard_True; } break; diff --git a/src/Blend/Blend_Walking_1.gxx b/src/Blend/Blend_Walking_1.gxx index d7f65c7689..01d4d154a5 100644 --- a/src/Blend/Blend_Walking_1.gxx +++ b/src/Blend/Blend_Walking_1.gxx @@ -62,9 +62,9 @@ void Blend_Walking::Perform(Blend_Function& Func, const Standard_Real Pdep, const Standard_Real Pmax, const Standard_Real MaxStep, + const Standard_Real Tol3d, const Standard_Real TolGuide, const math_Vector& ParDep, - const Standard_Real Tolesp, const Standard_Real Fleche, const Standard_Boolean Appro) { @@ -75,7 +75,7 @@ void Blend_Walking::Perform(Blend_Function& Func, Standard_Boolean doextremities = 1; if(line.IsNull()) line = new TheLine (); else {line->Clear();doextremities = 0;} - tolesp = Abs(Tolesp); + tolpoint3d = Tol3d; tolgui = Abs(TolGuide); fleche = Abs(Fleche); rebrou = Standard_False; @@ -96,7 +96,7 @@ void Blend_Walking::Perform(Blend_Function& Func, TopAbs_State situ1,situ2; math_Vector tolerance(1,4),infbound(1,4),supbound(1,4); - Func.GetTolerance(tolerance,tolesp); + Func.GetTolerance(tolerance,tolpoint3d); Func.GetBounds(infbound,supbound); math_FunctionSetRoot rsnld(Func,tolerance,30); @@ -143,9 +143,9 @@ void Blend_Walking::Perform(Blend_Function& Func, if(doextremities){ TheExtremity ptf1 (previousP.PointOnS1(), - sol(1),sol(2),tolesp); + sol(1),sol(2),tolpoint3d); TheExtremity ptf2 (previousP.PointOnS2(), - sol(3),sol(4),tolesp); + sol(3),sol(4),tolpoint3d); if (!previousP.IsTangencyPoint()) { ptf1.SetTangent(previousP.TangentOnS1()); ptf2.SetTangent(previousP.TangentOnS2()); @@ -168,7 +168,7 @@ void Blend_Walking::Perform(Blend_Function& Func, Standard_Boolean Blend_Walking::PerformFirstSection(Blend_Function& Func, const Standard_Real Pdep, math_Vector& ParDep, - const Standard_Real Tolesp, + const Standard_Real Tol3d, const Standard_Real TolGuide, TopAbs_State& Pos1, TopAbs_State& Pos2) @@ -176,7 +176,7 @@ Standard_Boolean Blend_Walking::PerformFirstSection(Blend_Function& Func, iscomplete = Standard_False; comptra = Standard_False; line = new TheLine (); - tolesp = Abs(Tolesp); + tolpoint3d = Tol3d; tolgui = Abs(TolGuide); Pos1 = Pos2 = TopAbs_UNKNOWN; @@ -185,7 +185,7 @@ Standard_Boolean Blend_Walking::PerformFirstSection(Blend_Function& Func, Func.Set(param); math_Vector tolerance(1, 4),infbound(1, 4),supbound(1, 4); - Func.GetTolerance(tolerance, tolesp); + Func.GetTolerance(tolerance, tolpoint3d); Func.GetBounds(infbound, supbound); math_FunctionSetRoot rsnld(Func, tolerance, 30); @@ -220,7 +220,7 @@ Standard_Boolean Blend_Walking::PerformFirstSection (Blend_Function& Func, const Standard_Real Pdep, const Standard_Real Pmax, const math_Vector& ParDep, - const Standard_Real Tolesp, + const Standard_Real Tol3d, const Standard_Real TolGuide, const Standard_Boolean RecOnS1, const Standard_Boolean RecOnS2, @@ -235,7 +235,7 @@ Standard_Boolean Blend_Walking::PerformFirstSection (Blend_Function& Func, Standard_Real w1, w2, extrapol; Standard_Boolean recad1, recad2; - tolesp = Abs(Tolesp); + tolpoint3d = Tol3d; tolgui = Abs(TolGuide); if (Pmax - Pdep >= 0.0) { @@ -262,7 +262,7 @@ Standard_Boolean Blend_Walking::PerformFirstSection (Blend_Function& Func, Standard_Real CorrectedU = 0., CorrectedV = 0.; gp_Pnt CorrectedPnt; - Func.GetTolerance(tolerance, tolesp); + Func.GetTolerance(tolerance, tolpoint3d); Func.GetBounds(infbound, supbound); math_FunctionSetRoot rsnld(Func, tolerance, 30); @@ -409,9 +409,9 @@ Standard_Boolean Blend_Walking::PerformFirstSection (Blend_Function& Func, #endif MakeExtremity(Ext1, Standard_True, Index1, solrst1(1), Isvtx1, Vtx1); if (ToCorrectOnRst1) - Ext2.SetValue(CorrectedPnt, CorrectedU, CorrectedV, tolesp); + Ext2.SetValue(CorrectedPnt, CorrectedU, CorrectedV, tolpoint3d); else - Ext2.SetValue(previousP.PointOnS2(), sol(3), sol(4), tolesp); + Ext2.SetValue(previousP.PointOnS2(), sol(3), sol(4), tolpoint3d); } break; @@ -424,9 +424,9 @@ Standard_Boolean Blend_Walking::PerformFirstSection (Blend_Function& Func, } #endif if (ToCorrectOnRst2) - Ext1.SetValue(CorrectedPnt, CorrectedU, CorrectedV, tolesp); + Ext1.SetValue(CorrectedPnt, CorrectedU, CorrectedV, tolpoint3d); else - Ext1.SetValue(previousP.PointOnS1(), sol(1), sol(2), tolesp); + Ext1.SetValue(previousP.PointOnS1(), sol(1), sol(2), tolpoint3d); MakeExtremity(Ext2, Standard_False, Index2, solrst2(1), Isvtx2, Vtx2); } break; diff --git a/src/Blend/Blend_Walking_2.gxx b/src/Blend/Blend_Walking_2.gxx index adb10bdde8..333cdd063c 100644 --- a/src/Blend/Blend_Walking_2.gxx +++ b/src/Blend/Blend_Walking_2.gxx @@ -41,7 +41,7 @@ Blend_Status Blend_Walking::TestArret(Blend_Function& Function, IntSurf_TypeTrans tras1,tras2; Blend_Point curpoint; Standard_Boolean loctwist1 = Standard_False, loctwist2 = Standard_False; - Standard_Real tolsolu = tolesp; + Standard_Real tolsolu = tolpoint3d; if ( !TestSolu) tolsolu *= 1000; //Ca doit toujours etre bon if (Function.IsSolution(sol,tolsolu)) { @@ -211,8 +211,8 @@ Blend_Status Blend_Walking::CheckDeflection if(!prevpointistangent){ prevTg = previousP.TangentOnS1(); } - tolu = TheSurfaceTool::UResolution(surf1,tolesp); - tolv = TheSurfaceTool::VResolution(surf1,tolesp); + tolu = TheSurfaceTool::UResolution(surf1,tolpoint3d); + tolv = TheSurfaceTool::VResolution(surf1,tolpoint3d); } else { Psurf = CurPoint.PointOnS2(); @@ -223,8 +223,8 @@ Blend_Status Blend_Walking::CheckDeflection if(!prevpointistangent){ prevTg = previousP.TangentOnS2(); } - tolu = TheSurfaceTool::UResolution(surf2,tolesp); - tolv = TheSurfaceTool::VResolution(surf2,tolesp); + tolu = TheSurfaceTool::UResolution(surf2,tolpoint3d); + tolv = TheSurfaceTool::VResolution(surf2,tolpoint3d); } gp_Vec Corde(prevP,Psurf); @@ -233,12 +233,13 @@ Blend_Status Blend_Walking::CheckDeflection if(!prevpointistangent) prevNorme = prevTg.SquareMagnitude(); - if (Norme <= tolesp*tolesp){ + const Standard_Real toler3d = 0.01 * tolpoint3d; + if (Norme <= toler3d * toler3d){ // il faudra peut etre forcer meme point return Blend_SamePoints; } if(!prevpointistangent){ - if(prevNorme <= tolesp*tolesp) { + if(prevNorme <= toler3d * toler3d) { return Blend_SamePoints; } Cosi = sens*Corde*prevTg; diff --git a/src/Blend/Blend_Walking_3.gxx b/src/Blend/Blend_Walking_3.gxx index 41b669a3f9..3dc6f746e3 100644 --- a/src/Blend/Blend_Walking_3.gxx +++ b/src/Blend/Blend_Walking_3.gxx @@ -125,7 +125,7 @@ Standard_Boolean Blend_Walking::Recadre(Blend_FuncInv& FuncInv, infb(2) -= Extrap; supb(2) += Extrap; - FuncInv.GetTolerance(toler,tolesp/10);//Il vaut mieux garder un peu de marge + FuncInv.GetTolerance(toler,0.1 * tolpoint3d);//Il vaut mieux garder un peu de marge math_FunctionSetRoot rsnld(FuncInv,toler,35); toler *= 10; // Mais on fait les tests correctements @@ -262,7 +262,7 @@ Standard_Boolean Blend_Walking::Recadre(Blend_FuncInv& FuncInv, else solrst(1) = pmin; } // On verifie le jalon - jalons_Trouve = (FuncInv.IsSolution(solrst,tolesp)); + jalons_Trouve = (FuncInv.IsSolution(solrst,tolpoint3d)); } if (!jalons_Trouve) { @@ -276,7 +276,7 @@ Standard_Boolean Blend_Walking::Recadre(Blend_FuncInv& FuncInv, } else { rsnld.Root(solrst); - recadre = FuncInv.IsSolution(solrst,tolesp); + recadre = FuncInv.IsSolution(solrst,tolpoint3d); } } @@ -310,7 +310,7 @@ Standard_Boolean Blend_Walking::Recadre(Blend_FuncInv& FuncInv, // Le probleme a resoudre FuncInv.Set(OnFirst,thecur); FuncInv.GetBounds(infb,supb); - FuncInv.GetTolerance(toler,tolesp/10);//Il vaut mieux garder un peu de marge + FuncInv.GetTolerance(toler,0.1 * tolpoint3d);//Il vaut mieux garder un peu de marge math_FunctionSetRoot aRsnld(FuncInv,toler,35); toler *= 10; // Mais on fait les tests correctements // Resolution... @@ -324,7 +324,7 @@ Standard_Boolean Blend_Walking::Recadre(Blend_FuncInv& FuncInv, } else { aRsnld.Root(solrst); - recadre = FuncInv.IsSolution(solrst,tolesp); + recadre = FuncInv.IsSolution(solrst,tolpoint3d); } } @@ -453,7 +453,7 @@ void Blend_Walking::MakeExtremity(TheExtremity& Extrem, if (OnFirst) { Extrem.SetValue(previousP.PointOnS1(), sol(1),sol(2), - previousP.Parameter(), tolesp); + previousP.Parameter(), tolpoint3d); if (!previousP.IsTangencyPoint()) Extrem.SetTangent(previousP.TangentOnS1()); Iter = recdomain1; @@ -461,7 +461,7 @@ void Blend_Walking::MakeExtremity(TheExtremity& Extrem, else { Extrem.SetValue(previousP.PointOnS2(), sol(3),sol(4), - previousP.Parameter(), tolesp); + previousP.Parameter(), tolpoint3d); if (!previousP.IsTangencyPoint()) Extrem.SetTangent(previousP.TangentOnS2()); Iter = recdomain2; diff --git a/src/Blend/Blend_Walking_4.gxx b/src/Blend/Blend_Walking_4.gxx index acd895f0ce..17655cc314 100644 --- a/src/Blend/Blend_Walking_4.gxx +++ b/src/Blend/Blend_Walking_4.gxx @@ -135,7 +135,7 @@ void Blend_Walking::InternalPerform(Blend_Function& Func, //IntSurf_Transition Tline,Tarc; - Func.GetTolerance(tolerance,tolesp); + Func.GetTolerance(tolerance,tolpoint3d); Func.GetBounds(infbound,supbound); math_FunctionSetRoot rsnld(Func,tolerance,30); @@ -173,10 +173,10 @@ void Blend_Walking::InternalPerform(Blend_Function& Func, if (Abs(stepw) < tolgui) { Ext1.SetValue(previousP.PointOnS1(), sol(1),sol(2), - previousP.Parameter(),tolesp); + previousP.Parameter(),tolpoint3d); Ext2.SetValue(previousP.PointOnS2(), sol(3),sol(4), - previousP.Parameter(),tolesp); + previousP.Parameter(),tolpoint3d); if (!previousP.IsTangencyPoint()) { Ext1.SetTangent(previousP.TangentOnS1()); Ext2.SetTangent(previousP.TangentOnS2()); @@ -227,7 +227,7 @@ void Blend_Walking::InternalPerform(Blend_Function& Func, if (recad1) { Standard_Real wtemp; wtemp = solrst1(2); - if ((param - wtemp)/sens>= -10*tolesp){ + if ((param - wtemp)/sens>= -10*tolgui){ w1 = solrst1(2); control = Standard_True; } @@ -253,7 +253,7 @@ void Blend_Walking::InternalPerform(Blend_Function& Func, if (recad2) { Standard_Real wtemp; wtemp = solrst2(2); - if ((param - wtemp)/sens>= -10*tolesp){ + if ((param - wtemp)/sens>= -10*tolgui){ w2 = solrst2(2); control = Standard_True; } @@ -505,10 +505,10 @@ void Blend_Walking::InternalPerform(Blend_Function& Func, Arrive = Standard_True; Ext1.SetValue(previousP.PointOnS1(), sol(1),sol(2), - previousP.Parameter(), tolesp); + previousP.Parameter(), tolpoint3d); Ext2.SetValue(previousP.PointOnS2(), sol(3),sol(4), - previousP.Parameter(), tolesp); + previousP.Parameter(), tolpoint3d); if (!previousP.IsTangencyPoint()) { Ext1.SetTangent(previousP.TangentOnS1()); Ext2.SetTangent(previousP.TangentOnS2()); @@ -533,10 +533,10 @@ void Blend_Walking::InternalPerform(Blend_Function& Func, if (Abs(stepw) < tolgui) { Ext1.SetValue(previousP.PointOnS1(), sol(1),sol(2), - previousP.Parameter(),tolesp); + previousP.Parameter(),tolpoint3d); Ext2.SetValue(previousP.PointOnS2(), sol(3),sol(4), - previousP.Parameter(),tolesp); + previousP.Parameter(),tolpoint3d); if (!previousP.IsTangencyPoint()) { Ext1.SetTangent(previousP.TangentOnS1()); Ext2.SetTangent(previousP.TangentOnS2()); @@ -584,10 +584,10 @@ void Blend_Walking::InternalPerform(Blend_Function& Func, Arrive = Standard_True; Ext1.SetValue(previousP.PointOnS1(), sol(1),sol(2), - previousP.Parameter(),tolesp); + previousP.Parameter(),tolpoint3d); Ext2.SetValue(previousP.PointOnS2(), sol(3),sol(4), - previousP.Parameter(),tolesp); + previousP.Parameter(),tolpoint3d); if (!previousP.IsTangencyPoint()) { Ext1.SetTangent(previousP.TangentOnS1()); Ext2.SetTangent(previousP.TangentOnS2()); @@ -627,15 +627,15 @@ void Blend_Walking::InternalPerform(Blend_Function& Func, MakeExtremity(Ext1,Standard_True,Index1, solrst1(1),Isvtx1,Vtx1); // On blinde le cas singulier ou un des recadrage a planter - if (previousP.PointOnS1().IsEqual(previousP.PointOnS2(), 2*tolesp)) { + if (previousP.PointOnS1().IsEqual(previousP.PointOnS2(), 2.0 * tolpoint3d)) { Ext2.SetValue(previousP.PointOnS1(), - sol(3),sol(4),tolesp); + sol(3),sol(4),tolpoint3d); if (Isvtx1) MakeSingularExtremity(Ext2, Standard_False, Vtx1); } else { Ext2.SetValue(previousP.PointOnS2(), sol(3),sol(4), - previousP.Parameter(),tolesp); + previousP.Parameter(),tolpoint3d); } Arrive = Standard_True; } @@ -661,15 +661,15 @@ void Blend_Walking::InternalPerform(Blend_Function& Func, #endif // On blinde le cas singulier ou un des recadrage a plante - if (previousP.PointOnS1().IsEqual(previousP.PointOnS2(), 2*tolesp)) { + if (previousP.PointOnS1().IsEqual(previousP.PointOnS2(), 2.0 * tolpoint3d)) { Ext1.SetValue(previousP.PointOnS2(), - sol(1),sol(2),tolesp); + sol(1),sol(2),tolpoint3d); if (Isvtx2) MakeSingularExtremity(Ext1, Standard_True, Vtx2); } else { Ext1.SetValue(previousP.PointOnS1(), sol(1),sol(2), - previousP.Parameter(),tolesp); + previousP.Parameter(),tolpoint3d); } MakeExtremity(Ext2,Standard_False,Index2, solrst2(1),Isvtx2,Vtx2); @@ -698,7 +698,7 @@ void Blend_Walking::InternalPerform(Blend_Function& Func, #endif if ( (Isvtx1 != Isvtx2) && - (previousP.PointOnS1().IsEqual(previousP.PointOnS2(), 2*tolesp)) ) { + (previousP.PointOnS1().IsEqual(previousP.PointOnS2(), 2.0 * tolpoint3d)) ) { // On blinde le cas singulier ou un seul recadrage // est reconnu comme vertex. if (Isvtx1) { @@ -727,10 +727,10 @@ void Blend_Walking::InternalPerform(Blend_Function& Func, #endif Ext1.SetValue(previousP.PointOnS1(), sol(1),sol(2), - previousP.Parameter(),tolesp); + previousP.Parameter(),tolpoint3d); Ext2.SetValue(previousP.PointOnS2(), sol(3),sol(4), - previousP.Parameter(),tolesp); + previousP.Parameter(),tolpoint3d); if (!previousP.IsTangencyPoint()) { Ext1.SetTangent(previousP.TangentOnS1()); Ext2.SetTangent(previousP.TangentOnS2()); diff --git a/src/ChFi3d/ChFi3d_Builder.cxx b/src/ChFi3d/ChFi3d_Builder.cxx index e56235f70d..54b793e277 100644 --- a/src/ChFi3d/ChFi3d_Builder.cxx +++ b/src/ChFi3d/ChFi3d_Builder.cxx @@ -198,7 +198,8 @@ void ChFi3d_Builder::Compute() ChFi3d_InitChron(cl_total); ChFi3d_InitChron(cl_extent); #endif - + UpdateTolesp(); + if (myListStripe.IsEmpty()) throw Standard_Failure("There are no suitable edges for chamfer or fillet"); @@ -335,7 +336,7 @@ void ChFi3d_Builder::Compute() } // 05/02/02 akm ^^^ Standard_Integer solidindex = st->SolidIndex(); - ChFi3d_FilDS(solidindex,st,DStr,myRegul,tolesp,tol2d); + ChFi3d_FilDS(solidindex,st,DStr,myRegul,tolapp3d,tol2d); if (!done) break; } diff --git a/src/ChFi3d/ChFi3d_Builder.hxx b/src/ChFi3d/ChFi3d_Builder.hxx index 2073173217..3a4ba8cb64 100644 --- a/src/ChFi3d/ChFi3d_Builder.hxx +++ b/src/ChFi3d/ChFi3d_Builder.hxx @@ -849,6 +849,10 @@ private: Handle(BRepAdaptor_Surface)& HS1, Handle(BRepAdaptor_Surface)& HS2) const; + //! Assign to tolesp parameter minimal value of spine's tolesp if it is less + //! than default initial value. + Standard_EXPORT void UpdateTolesp(); + TopoDS_Shape myShape; Standard_Real angular; diff --git a/src/ChFi3d/ChFi3d_Builder_1.cxx b/src/ChFi3d/ChFi3d_Builder_1.cxx index d8f9df9ce1..eca3b71ad8 100644 --- a/src/ChFi3d/ChFi3d_Builder_1.cxx +++ b/src/ChFi3d/ChFi3d_Builder_1.cxx @@ -325,7 +325,7 @@ ChFi3d_Builder::ChFi3d_Builder(const TopoDS_Shape& S, myEShMap.Fill(S,TopAbs_EDGE,TopAbs_SHELL); myVFMap.Fill(S,TopAbs_VERTEX,TopAbs_FACE); myVEMap.Fill(S,TopAbs_VERTEX,TopAbs_EDGE); - SetParams(Ta,1.e-4,1.e-5,1.e-4,1.e-5,1.e-3); + SetParams(Ta, 1.0e-4, 1.e-5, 1.e-4, 1.e-5, 1.e-3); SetContinuity(GeomAbs_C1, Ta); } @@ -336,7 +336,7 @@ ChFi3d_Builder::ChFi3d_Builder(const TopoDS_Shape& S, void ChFi3d_Builder::SetParams(const Standard_Real Tang, const Standard_Real Tesp, - const Standard_Real T2d, + const Standard_Real T2d, const Standard_Real TApp3d, const Standard_Real TolApp2d, const Standard_Real Fleche) diff --git a/src/ChFi3d/ChFi3d_Builder_2.cxx b/src/ChFi3d/ChFi3d_Builder_2.cxx index 04f981f39e..2d92b13d23 100644 --- a/src/ChFi3d/ChFi3d_Builder_2.cxx +++ b/src/ChFi3d/ChFi3d_Builder_2.cxx @@ -188,7 +188,7 @@ static Standard_Boolean BonVoisin(const gp_Pnt& Point, Standard_Real& XDep, Standard_Real& YDep, const ChFiDS_Map& EFMap, - const Standard_Real tolesp) + const Standard_Real tol3d) { Standard_Boolean bonvoisin = 1; Standard_Real winter, Uf, Ul; @@ -203,7 +203,7 @@ static Standard_Boolean BonVoisin(const gp_Pnt& Point, const TopoDS_Edge& ecur = TopoDS::Edge(Ex.Current()); if(!ecur.IsSame(cured)){ hc->Initialize(ecur); - Standard_Real tolc = hc->Resolution(tolesp); + Standard_Real tolc = hc->Resolution(tol3d); if(ChFi3d_InterPlaneEdge(plane,hc,winter,1,tolc)){ gp_Pnt np = hc->Value(winter); Standard_Real ndist = np.SquareDistance(papp); @@ -848,7 +848,7 @@ void ChFi3d_Builder::StartSol(const Handle(ChFiDS_Stripe)& Stripe, const BRepAdaptor_Curve& Ced = Spine->CurrentElementarySpine(iedge); gp_Pnt pnt = Ced.Value(woned); - if (Projection(PExt, pnt, els, w, tolesp) && + if (Projection(PExt, pnt, els, w, tolapp3d) && PerformFirstSection(Spine,HGuide,Choix,HS1,HS2, I1,I2,w,SolDep,Pos1,Pos2)) { P1.SetCoord(SolDep(1),SolDep(2)); @@ -894,7 +894,7 @@ void ChFi3d_Builder::StartSol(const Handle(ChFiDS_Stripe)& Stripe, // Extrema_LocateExtPC ext(pnt,els,w,1.e-8); // if(ext.IsDone()){ // w = ext.Point().Parameter(); - if (Projection(PExt, pnt, els, w, tolesp)) { + if (Projection(PExt, pnt, els, w, tolapp3d)) { PerformFirstSection(Spine,HGuide,Choix,HS1,HS2, I1,I2,w,SolDep,Pos1,Pos2); gp_Pnt P; @@ -909,11 +909,11 @@ void ChFi3d_Builder::StartSol(const Handle(ChFiDS_Stripe)& Stripe, NbChangement++) { if(Pos1 != TopAbs_IN){ bonvoisin = BonVoisin(P, HS1, f1, plane, cured, - SolDep(1),SolDep(2), myEFMap, tolesp); + SolDep(1),SolDep(2), myEFMap, tolapp3d); } if(Pos2 != TopAbs_IN && bonvoisin){ bonvoisin = BonVoisin(P, HS2, f2, plane, cured, - SolDep(3),SolDep(4), myEFMap, tolesp); + SolDep(3),SolDep(4), myEFMap, tolapp3d); } if(bonvoisin){ f1 = HS1->Face(); @@ -2712,7 +2712,7 @@ void ChFi3d_Builder::PerformSetOfKGen(Handle(ChFiDS_Stripe)& Stripe, pcprev1->D1(prevpar1,pdeb1,vdeb1); pcnext1->D1(nextpar1,pfin1,vfin1); Bon1 = ChFi3d_mkbound(S1,PC1,-1,pdeb1,vdeb1,1, - pfin1,vfin1,tolesp,2.e-4); + pfin1,vfin1,tolapp3d,2.e-4); } } else{ @@ -2731,11 +2731,11 @@ void ChFi3d_Builder::PerformSetOfKGen(Handle(ChFiDS_Stripe)& Stripe, pdeb1 = PC1->Value(pardeb1); pfin1 = PC1->Value(parfin1); Bon1 = ChFi3d_mkbound(S1,PC1,-1,pdeb1,Vdeb1,1, - pfin1,Vfin1,tolesp,2.e-4); + pfin1,Vfin1,tolapp3d,2.e-4); } } else{ - Bon1 = ChFi3d_mkbound(S1,PC1,tolesp,2.e-4); + Bon1 = ChFi3d_mkbound(S1,PC1,tolapp3d,2.e-4); } if(tw2){ if(!yaprevon2 || !yanexton2){ @@ -2770,7 +2770,7 @@ void ChFi3d_Builder::PerformSetOfKGen(Handle(ChFiDS_Stripe)& Stripe, pcprev2->D1(prevpar2,pdeb2,vdeb2); pcnext2->D1(nextpar2,pfin2,vfin2); Bon2 = ChFi3d_mkbound(S2,PC2,-1,pdeb2,vdeb2,1, - pfin2,vfin2,tolesp,2.e-4); + pfin2,vfin2,tolapp3d,2.e-4); } } else{ @@ -2789,11 +2789,11 @@ void ChFi3d_Builder::PerformSetOfKGen(Handle(ChFiDS_Stripe)& Stripe, pdeb2 = PC2->Value(pardeb2); pfin2 = PC2->Value(parfin2); Bon2 = ChFi3d_mkbound(S2,PC2,-1,pdeb2,Vdeb2,1, - pfin2,Vfin2,tolesp,2.e-4); + pfin2,Vfin2,tolapp3d,2.e-4); } } else{ - Bon2 = ChFi3d_mkbound(S2,PC2,tolesp,2.e-4); + Bon2 = ChFi3d_mkbound(S2,PC2,tolapp3d,2.e-4); } // The parameters of neighbor traces are updated, so // straight lines uv are pulled. @@ -2817,8 +2817,8 @@ void ChFi3d_Builder::PerformSetOfKGen(Handle(ChFiDS_Stripe)& Stripe, gp_Pnt2d pdebs2 = pcsprev2->Value(prevpar2); gp_Pnt2d pfins1 = pcsnext1->Value(nextpar1); gp_Pnt2d pfins2 = pcsnext2->Value(nextpar2); - Bdeb = ChFi3d_mkbound(sprev,pdebs1,pdebs2,tolesp,2.e-4); - Bfin = ChFi3d_mkbound(snext,pfins1,pfins2,tolesp,2.e-4); + Bdeb = ChFi3d_mkbound(sprev,pdebs1,pdebs2,tolapp3d,2.e-4); + Bfin = ChFi3d_mkbound(snext,pfins1,pfins2,tolapp3d,2.e-4); GeomFill_ConstrainedFilling fil(11,20); if(pointuon1) fil.Init(Bon2,Bfin,Bdeb,1); @@ -3046,7 +3046,7 @@ void ChFi3d_Builder::PerformSetOfSurf(Handle(ChFiDS_Stripe)& Stripe, ChFi3d_InitChron(ch); // init perf for ChFi3d_MakeExtremities #endif - if(!Simul) ChFi3d_MakeExtremities(Stripe,DStr,myEFMap,tolesp,tol2d); + if(!Simul) ChFi3d_MakeExtremities(Stripe,DStr,myEFMap,tolapp3d,tol2d); #ifdef OCCT_DEBUG ChFi3d_ResultChron(ch, t_makextremities); // result perf t_makextremities diff --git a/src/ChFi3d/ChFi3d_Builder_6.cxx b/src/ChFi3d/ChFi3d_Builder_6.cxx index f22c19b2b2..d943534185 100644 --- a/src/ChFi3d/ChFi3d_Builder_6.cxx +++ b/src/ChFi3d/ChFi3d_Builder_6.cxx @@ -416,7 +416,7 @@ Standard_Boolean ChFi3d_Builder::CompleteData const Standard_Boolean Gf2) { TopOpeBRepDS_DataStructure& DStr = myDS->ChangeDS(); - Data->ChangeSurf(DStr.AddSurface(TopOpeBRepDS_Surface(Surfcoin,tolesp))); + Data->ChangeSurf(DStr.AddSurface(TopOpeBRepDS_Surface(Surfcoin,tolapp3d))); #ifdef DRAW ChFi3d_SettraceDRAWFIL(Standard_True); if (ChFi3d_GettraceDRAWFIL()) { @@ -987,7 +987,7 @@ Standard_Boolean ChFi3d_Builder::ComputeData Standard_Real NewFirst = PFirst; if(RecP || RecS || RecRst){ if(!TheWalk.PerformFirstSection(Func,FInv,FInvP,FInvC,PFirst,Target,Soldep, - tolesp,TolGuide,RecRst,RecP,RecS, + tolapp3d,tolapp2d,TolGuide,RecRst,RecP,RecS, NewFirst,ParSol)){ #ifdef OCCT_DEBUG std::cout<<"ChFi3d_Builder::ComputeData : calculation fail first section"<Face(); // Path framing variables - Standard_Real TolGuide=tolguide, TolEsp = tolesp; + Standard_Real TolGuide=tolguide; Standard_Integer nbptmin = 4; BRepBlend_Walking TheWalk(S1,S2,I1,I2,HGuide); @@ -1559,7 +1559,7 @@ Standard_Boolean ChFi3d_Builder::ComputeData BP.ParametersOnS1(vec(1),vec(2)); BP.ParametersOnS2(vec(3),vec(4)); Func.Set(param); - if (Func.IsSolution(vec, tolesp)) { + if (Func.IsSolution(vec, tolapp3d)) { TheWalk.AddSingularPoint(BP); } } @@ -1574,7 +1574,7 @@ Standard_Boolean ChFi3d_Builder::ComputeData BP.ParametersOnS1(vec(1),vec(2)); BP.ParametersOnS2(vec(3),vec(4)); Func.Set(param); - if (Func.IsSolution(vec, tolesp)) { + if (Func.IsSolution(vec, tolapp3d)) { TheWalk.AddSingularPoint(BP); } } @@ -1587,7 +1587,7 @@ Standard_Boolean ChFi3d_Builder::ComputeData Standard_Real NewFirst = PFirst; if(RecOnS1 || RecOnS2){ if(!TheWalk.PerformFirstSection(Func,FInv,PFirst,Target,Soldep, - tolesp,TolGuide,RecOnS1,RecOnS2, + tolapp3d,TolGuide,RecOnS1,RecOnS2, NewFirst,ParSol)){ #ifdef OCCT_DEBUG std::cout<<"ChFi3d_Builder::ComputeData : calculation fail first section"< MS) TolGuide = MS/5; - if (5*TolEsp > MS) TolEsp = MS/5; } - TheWalk.Perform(Func,FInv,NewFirst,Target,MS,TolGuide, - ParSol,TolEsp,Fleche,Appro); + TheWalk.Perform(Func,FInv,NewFirst,Target,MS,tolapp3d,TolGuide, + ParSol,Fleche,Appro); if (!TheWalk.IsDone()) { #ifdef OCCT_DEBUG std::cout << "Path is not created" << std::endl; @@ -1776,7 +1775,7 @@ Standard_Boolean ChFi3d_Builder::ComputeData narc2 = Lin->StartPointOnSecond().NbPointOnRst(); if(narc1 != 0) { ChFi3d_FilCommonPoint(Lin->StartPointOnFirst(),Lin->TransitionOnS1(), - Standard_True, Data->ChangeVertexFirstOnS1(),tolesp); + Standard_True, Data->ChangeVertexFirstOnS1(), tolapp3d); debarc1 = Standard_True; if(!SearchFace(Spine,Data->VertexFirstOnS1(),F1,bif)){ //It is checked if there is not an obstacle. @@ -1794,7 +1793,7 @@ Standard_Boolean ChFi3d_Builder::ComputeData } if(narc2 != 0){ ChFi3d_FilCommonPoint(Lin->StartPointOnSecond(),Lin->TransitionOnS2(), - Standard_True, Data->ChangeVertexFirstOnS2(),tolesp); + Standard_True, Data->ChangeVertexFirstOnS2(),tolapp3d); debarc2 = Standard_True; if(!SearchFace(Spine,Data->VertexFirstOnS2(),F2,bif)){ //It is checked if it is not an obstacle. @@ -1831,7 +1830,7 @@ Standard_Boolean ChFi3d_Builder::ComputeData backwContinueFailed = Lin->StartPointOnFirst().ParameterOnGuide() > Target; else { ChFi3d_FilCommonPoint(Lin->StartPointOnFirst(),Lin->TransitionOnS1(), - Standard_True, Data->ChangeVertexFirstOnS1(),tolesp); + Standard_True, Data->ChangeVertexFirstOnS1(), tolapp3d); debarc1 = Standard_True; if(!SearchFace(Spine,Data->VertexFirstOnS1(),F1,bif)){ //It is checked if it is not an obstacle. @@ -1853,7 +1852,7 @@ Standard_Boolean ChFi3d_Builder::ComputeData backwContinueFailed = Lin->StartPointOnSecond().ParameterOnGuide() > Target; else { ChFi3d_FilCommonPoint(Lin->StartPointOnSecond(),Lin->TransitionOnS2(), - Standard_True, Data->ChangeVertexFirstOnS2(),tolesp); + Standard_True, Data->ChangeVertexFirstOnS2(), tolapp3d); debarc2 = Standard_True; if(!SearchFace(Spine,Data->VertexFirstOnS2(),F2,bif)){ //It is checked if it is not an obstacle. @@ -1889,7 +1888,7 @@ Standard_Boolean ChFi3d_Builder::ComputeData narc2 = Lin->EndPointOnSecond().NbPointOnRst(); if(narc1 != 0){ ChFi3d_FilCommonPoint(Lin->EndPointOnFirst(),Lin->TransitionOnS1(), - Standard_False, Data->ChangeVertexLastOnS1(),tolesp); + Standard_False, Data->ChangeVertexLastOnS1(), tolapp3d); finarc1 = Standard_True; if(!SearchFace(Spine,Data->VertexLastOnS1(),F1,bif)){ //It is checked if it is not an obstacle. @@ -1902,7 +1901,7 @@ Standard_Boolean ChFi3d_Builder::ComputeData } if(narc2 != 0){ ChFi3d_FilCommonPoint(Lin->EndPointOnSecond(),Lin->TransitionOnS2(), - Standard_False, Data->ChangeVertexLastOnS2(),tolesp); + Standard_False, Data->ChangeVertexLastOnS2(), tolapp3d); finarc2 = Standard_True; if(!SearchFace(Spine,Data->VertexLastOnS2(),F2,bif)){ //It is checked if it is not an obstacle. @@ -1934,7 +1933,7 @@ Standard_Boolean ChFi3d_Builder::ComputeData forwContinueFailed = Lin->EndPointOnFirst().ParameterOnGuide() < Target; else { ChFi3d_FilCommonPoint(Lin->EndPointOnFirst(),Lin->TransitionOnS1(), - Standard_False, Data->ChangeVertexLastOnS1(),tolesp); + Standard_False, Data->ChangeVertexLastOnS1(), tolapp3d); finarc1 = Standard_True; if(!SearchFace(Spine,Data->VertexLastOnS1(),F1,bif)){ //It is checked if it is not an obstacle. @@ -1951,7 +1950,7 @@ Standard_Boolean ChFi3d_Builder::ComputeData forwContinueFailed = Lin->EndPointOnSecond().ParameterOnGuide() < Target; else { ChFi3d_FilCommonPoint(Lin->EndPointOnSecond(),Lin->TransitionOnS2(), - Standard_False, Data->ChangeVertexLastOnS2(),tolesp); + Standard_False, Data->ChangeVertexLastOnS2(), tolapp3d); finarc2 = Standard_True; if(!SearchFace(Spine,Data->VertexLastOnS2(),F2,bif)){ //On regarde si ce n'est pas un obstacle. @@ -2125,7 +2124,7 @@ Standard_Boolean ChFi3d_Builder::SimulData TheWalk.Check2d(Standard_False); Standard_Real MS = MaxStep; - Standard_Real TolGuide=tolguide, TolEsp = tolesp; + Standard_Real TolGuide=tolguide; Standard_Integer Nbpnt = 0; Standard_Real SpFirst = HGuide->FirstParameter(); Standard_Real SpLast = HGuide->LastParameter(); @@ -2145,7 +2144,7 @@ Standard_Boolean ChFi3d_Builder::SimulData Standard_Real NewFirst = PFirst; if(RecOnS1 || RecOnS2){ if(!TheWalk.PerformFirstSection(Func,FInv,PFirst,Target,Soldep, - tolesp,TolGuide,RecOnS1,RecOnS2, + tolapp3d,TolGuide,RecOnS1,RecOnS2, NewFirst,ParSol)){ #ifdef OCCT_DEBUG std::cout<<"ChFi3d_Builder::SimulData : calculation fail first section"< MS) TolGuide = MS/5; - if (5*TolEsp > MS) TolEsp = MS/5; } - TheWalk.Perform(Func,FInv,NewFirst,Target,MS,TolGuide, - ParSol,TolEsp,Fleche,Appro); + TheWalk.Perform(Func,FInv,NewFirst,Target,MS,tolapp3d,TolGuide, + ParSol,Fleche,Appro); if (!TheWalk.IsDone()) { #ifdef OCCT_DEBUG diff --git a/src/ChFi3d/ChFi3d_Builder_C1.cxx b/src/ChFi3d/ChFi3d_Builder_C1.cxx index da727d1a35..edad09233a 100644 --- a/src/ChFi3d/ChFi3d_Builder_C1.cxx +++ b/src/ChFi3d/ChFi3d_Builder_C1.cxx @@ -725,7 +725,7 @@ void ChFi3d_Builder::PerformOneCorner(const Standard_Integer Index, ChFiDS_CommonPoint saveCPopArc = CPopArc; c3df = DStr.Curve(FiopArc.LineIndex()).Curve(); - inters = IntersUpdateOnSame (HGs,HBs,c3df,Fop,Fv,Arcprol,Vtx,isfirst,10*tolesp, // in + inters = IntersUpdateOnSame (HGs,HBs,c3df,Fop,Fv,Arcprol,Vtx,isfirst,10*tolapp3d, // in FiopArc,CPopArc,p2dbout,wop); // out Handle(BRepAdaptor_Curve2d) pced = new BRepAdaptor_Curve2d(); @@ -763,7 +763,7 @@ void ChFi3d_Builder::PerformOneCorner(const Standard_Integer Index, TopoDS_Edge edgecouture; Standard_Boolean couture,intcouture=Standard_False; - Standard_Real tolreached = tolesp; + Standard_Real tolreached = tolapp3d; Standard_Real par1 =0.,par2 =0.; Standard_Integer indpt = 0,Icurv1 = 0,Icurv2 = 0; Handle(Geom_TrimmedCurve) curv1,curv2; @@ -817,7 +817,7 @@ void ChFi3d_Builder::PerformOneCorner(const Standard_Integer Index, if (!ChFi3d_ComputeCurves(HGs,HBs,Pardeb,Parfin,Cc, Ps, - Pc,tolesp,tol2d,tolreached)) + Pc,tolapp3d,tol2d,tolreached)) throw Standard_Failure("OneCorner : echec calcul intersection"); Udeb = Cc->FirstParameter(); @@ -1238,7 +1238,7 @@ void ChFi3d_Builder::PerformOneCorner(const Standard_Integer Index, Handle(Geom2d_Curve) zob2dop, zob2dv; //Standard_Real tolreached; if (!ChFi3d_ComputeCurves(HBop,HBs,Pardeb,Parfin,zob3d,zob2dop, - zob2dv,tolesp,tol2d,tolreached)) + zob2dv,tolapp3d,tol2d,tolreached)) throw Standard_Failure("OneCorner : echec calcul intersection"); Udeb = zob3d->FirstParameter(); @@ -2143,7 +2143,7 @@ void ChFi3d_Builder::PerformIntersectionAtEnd(const Standard_Integer Index) const Handle(Geom_Curve)& c3df = DStr.Curve(Fi1.LineIndex()).Curve(); Standard_Real Ufi= Fi2.Parameter(isfirst); ChFiDS_FaceInterference& Fi = Fd->ChangeInterferenceOnS1(); - if (!IntersUpdateOnSame (HGs,HBs,c3df,F1,Face[0],Edge[0],Vtx,isfirst,10*tolesp, // in + if (!IntersUpdateOnSame (HGs,HBs,c3df,F1,Face[0],Edge[0],Vtx,isfirst,10*tolapp3d, // in Fi,CV1,pfac1,Ufi)) // out throw Standard_Failure("IntersectionAtEnd: pb intersection Face - Fi"); Fi1 = Fi; @@ -2155,14 +2155,14 @@ void ChFi3d_Builder::PerformIntersectionAtEnd(const Standard_Integer Index) paredge2 = proj.LowerDistanceParameter(); } // update stripe point - TopOpeBRepDS_Point tpoint (CV1.Point(),tolesp); + TopOpeBRepDS_Point tpoint (CV1.Point(),tolapp3d); indpoint1=DStr.AddPoint(tpoint); stripe->SetIndexPoint(indpoint1,isfirst,1); // reset arc of CV1 TopoDS_Vertex vert1,vert2; TopExp::Vertices(Edge[0],vert1,vert2); TopAbs_Orientation arcOri = Vtx.IsSame(vert1) ? TopAbs_FORWARD : TopAbs_REVERSED; - CV1.SetArc(tolesp,Edge[0],paredge2,arcOri); + CV1.SetArc(tolapp3d,Edge[0],paredge2,arcOri); } else { if (Hc1.IsNull()) { @@ -2389,7 +2389,7 @@ void ChFi3d_Builder::PerformIntersectionAtEnd(const Standard_Integer Index) const Handle(Geom_Curve)& c3df = DStr.Curve(Fi2.LineIndex()).Curve(); Standard_Real Ufi= Fi1.Parameter(isfirst); ChFiDS_FaceInterference& Fi = Fd->ChangeInterferenceOnS2(); - if (!IntersUpdateOnSame (HGs,HBs,c3df,F2,F,Edge[nb],Vtx,isfirst,10*tolesp, // in + if (!IntersUpdateOnSame (HGs,HBs,c3df,F2,F,Edge[nb],Vtx,isfirst,10*tolapp3d, // in Fi,CV2,pfac2,Ufi)) // out throw Standard_Failure("IntersectionAtEnd: pb intersection Face - Fi"); Fi2 = Fi; @@ -2403,14 +2403,14 @@ void ChFi3d_Builder::PerformIntersectionAtEnd(const Standard_Integer Index) paredge2 = proj.LowerDistanceParameter(); } // update stripe point - TopOpeBRepDS_Point tpoint (CV2.Point(),tolesp); + TopOpeBRepDS_Point tpoint (CV2.Point(),tolapp3d); indpoint2=DStr.AddPoint(tpoint); stripe->SetIndexPoint(indpoint2,isfirst,2); // reset arc of CV2 TopoDS_Vertex vert1,vert2; TopExp::Vertices(Edge[nbface],vert1,vert2); TopAbs_Orientation arcOri = Vtx.IsSame(vert1) ? TopAbs_FORWARD : TopAbs_REVERSED; - CV2.SetArc(tolesp,Edge[nbface],paredge2,arcOri); + CV2.SetArc(tolapp3d,Edge[nbface],paredge2,arcOri); } @@ -2483,7 +2483,7 @@ void ChFi3d_Builder::PerformIntersectionAtEnd(const Standard_Integer Index) ////////////////////////////////////////////////////////////////////// if (!ChFi3d_ComputeCurves(HGs,HBs,Pardeb,Parfin,Cc, - Ps,Pc,tolesp,tol2d,tolreached,nbface==1)) { + Ps,Pc,tolapp3d,tol2d,tolreached,nbface==1)) { PerformMoreThreeCorner (Index,1); return; } @@ -2799,7 +2799,7 @@ void ChFi3d_Builder::PerformIntersectionAtEnd(const Standard_Integer Index) Standard_Real aTolreached; ChFi3d_ComputePCurv(Cc,UV1,UV2,Ps, DStr.Surface(SDprev->Surf()).Surface(), - p1,p2,tolesp,aTolreached); + p1,p2,tolapp3d,aTolreached); TopOpeBRepDS_Curve& TCurv = DStr.ChangeCurve(indcurve[nb-1]); TCurv.Tolerance(Max(TCurv.Tolerance(),aTolreached)); @@ -2858,7 +2858,7 @@ void ChFi3d_Builder::PerformIntersectionAtEnd(const Standard_Integer Index) //box.Add(aSurf->Value(UV.X(), UV.Y())); ChFi3d_ComputeArete(CV1,UV1,CV2,UV2,aSurf, // in - C3d,Ps,p1,p2,tolesp,tol2d,aTolreached,0); // out except tolers + C3d,Ps,p1,p2,tolapp3d,tol2d,aTolreached,0); // out except tolers indpoint1 = indpoint2 = midIpoint; gp_Pnt point; @@ -2890,7 +2890,7 @@ void ChFi3d_Builder::PerformIntersectionAtEnd(const Standard_Integer Index) UV1.SetCoord(isUShrink ? 1 : 2, prevSDParam); UV2.SetCoord(isUShrink ? 1 : 2, prevSDParam); - ChFi3d_ComputePCurv(C3d,UV1,UV2,Pc,aSurf,p1,p2,tolesp,aTolreached); + ChFi3d_ComputePCurv(C3d,UV1,UV2,Pc,aSurf,p1,p2,tolapp3d,aTolreached); Crv.Tolerance(Max(Crv.Tolerance(),aTolreached)); Interfc= ChFi3d_FilCurveInDS (Icurv,IsurfPrev,Pc,TopAbs::Reverse(orcourbe)); @@ -3974,7 +3974,7 @@ void ChFi3d_Builder::IntersectMoreCorner(const Standard_Integer Index) Handle(Geom2dAdaptor_Curve) pcprol = new Geom2dAdaptor_Curve(gpcprol); Standard_Real partemp = BRep_Tool::Parameter(Vtx,Arcprol); inters = Update(HBs,pcprol,HGs,FiopArc,CPopArc,p2dbout, - isfirst,partemp,wop,10*tolesp); + isfirst,partemp,wop,10*tolapp3d); } Handle(BRepAdaptor_Curve2d) pced = new BRepAdaptor_Curve2d(); pced->Initialize(CPadArc.Arc(),Fv); @@ -3987,7 +3987,7 @@ void ChFi3d_Builder::IntersectMoreCorner(const Standard_Integer Index) TopoDS_Edge edgecouture; Standard_Boolean couture,intcouture=Standard_False; - Standard_Real tolreached = tolesp; + Standard_Real tolreached = tolapp3d; Standard_Real par1 = 0.,par2 = 0.; Standard_Integer indpt =0,Icurv1 =0,Icurv2 =0; Handle(Geom_TrimmedCurve) curv1,curv2; @@ -4039,7 +4039,7 @@ void ChFi3d_Builder::IntersectMoreCorner(const Standard_Integer Index) if (!ChFi3d_ComputeCurves(HGs,HBs,Pardeb,Parfin,Cc, Ps, - Pc,tolesp,tol2d,tolreached)) + Pc,tolapp3d,tol2d,tolreached)) throw Standard_Failure("OneCorner : failed calculation intersection"); Udeb = Cc->FirstParameter(); @@ -4311,7 +4311,7 @@ void ChFi3d_Builder::IntersectMoreCorner(const Standard_Integer Index) Handle(Geom2d_Curve) zob2dop, zob2dv; // Standard_Real tolreached; if (!ChFi3d_ComputeCurves(HBop,HBs,Pardeb,Parfin,zob3d,zob2dop, - zob2dv,tolesp,tol2d,tolreached)) + zob2dv,tolapp3d,tol2d,tolreached)) throw Standard_Failure("OneCorner : echec calcul intersection"); Udeb = zob3d->FirstParameter(); diff --git a/src/ChFi3d/ChFi3d_Builder_C2.cxx b/src/ChFi3d/ChFi3d_Builder_C2.cxx index 37a13afa21..3892b686bc 100644 --- a/src/ChFi3d/ChFi3d_Builder_C2.cxx +++ b/src/ChFi3d/ChFi3d_Builder_C2.cxx @@ -230,7 +230,7 @@ Standard_Boolean ChFi3d_Builder::PerformTwoCornerbyInter(const Standard_Integer } gp_Pnt psp1 = Hpivot->Value(parCP1); gp_Pnt psp2 = Hpivot->Value(parCP2); - Standard_Real sameparam = (psp1.Distance(psp2) < 10 * tolesp); + Standard_Real sameparam = (psp1.Distance(psp2) < 10.0 * tolapp3d); TopoDS_Face FF1 = TopoDS::Face(DStr.Shape(Fd1->Index(IFaArc1))); TopoDS_Face FF2 = TopoDS::Face(DStr.Shape(Fd2->Index(IFaArc2))); @@ -289,10 +289,10 @@ Standard_Boolean ChFi3d_Builder::PerformTwoCornerbyInter(const Standard_Integer Reduce(UIntPC1,UIntPC2,HS1,HS2); } - Standard_Real tolreached = tolesp; + Standard_Real tolreached = tolapp3d; if (IFaCo1 == 1 && !ChFi3d_ComputeCurves(HS1,HS2,Pardeb,Parfin,Gc, - PGc1,PGc2,tolesp,tol2d,tolreached)) { + PGc1,PGc2,tolapp3d,tol2d,tolreached)) { #ifdef OCCT_DEBUG std::cout<<"failed to calculate bevel error interSS"<ChangeSpine(); + const Standard_Real current_stripe_tolesp = Spine->GetTolesp(); + if (tolesp > current_stripe_tolesp) + { + tolesp = current_stripe_tolesp; + } + } +} diff --git a/src/ChFi3d/ChFi3d_Builder_CnCrn.cxx b/src/ChFi3d/ChFi3d_Builder_CnCrn.cxx index c58f6ec7a7..e974aca2fd 100644 --- a/src/ChFi3d/ChFi3d_Builder_CnCrn.cxx +++ b/src/ChFi3d/ChFi3d_Builder_CnCrn.cxx @@ -2053,7 +2053,7 @@ void ChFi3d_Builder::PerformMoreThreeCorner(const Standard_Integer Jndex, // Using constraint order > 0 very often causes unpredicable undulations of solution Standard_Integer degree = 3, nbcurvpnt = 10, nbiter = 1; Standard_Integer constr = 1; //G1 - GeomPlate_BuildPlateSurface PSurf(degree, nbcurvpnt, nbiter, tol2d, tolesp, angular); + GeomPlate_BuildPlateSurface PSurf(degree, nbcurvpnt, nbiter, tol2d, tolapp3d, angular); // calculation of curves on surface for each stripe for (ic=0;icInterferenceOnS1().PCurveOnFace(); Geom2dAdaptor_Curve ll1; diff --git a/src/ChFi3d/ChFi3d_ChBuilder.cxx b/src/ChFi3d/ChFi3d_ChBuilder.cxx index 078a647231..999cfae0c3 100644 --- a/src/ChFi3d/ChFi3d_ChBuilder.cxx +++ b/src/ChFi3d/ChFi3d_ChBuilder.cxx @@ -822,13 +822,13 @@ ChFi3d_ChBuilder::SimulSurf(Handle(ChFiDS_SurfData)& Data, Data->SetSimul(sec); Data->Set2dPoints(pf1,pl1,pf2,pl2); ChFi3d_FilCommonPoint(lin->StartPointOnFirst(),lin->TransitionOnS1(), - Standard_True, Data->ChangeVertexFirstOnS1(),tolesp); + Standard_True, Data->ChangeVertexFirstOnS1(),tolapp3d); ChFi3d_FilCommonPoint(lin->EndPointOnFirst(),lin->TransitionOnS1(), - Standard_False,Data->ChangeVertexLastOnS1(),tolesp); + Standard_False,Data->ChangeVertexLastOnS1(),tolapp3d); ChFi3d_FilCommonPoint(lin->StartPointOnSecond(),lin->TransitionOnS2(), - Standard_True, Data->ChangeVertexFirstOnS2(),tolesp); + Standard_True, Data->ChangeVertexFirstOnS2(),tolapp3d); ChFi3d_FilCommonPoint(lin->EndPointOnSecond(),lin->TransitionOnS2(), - Standard_False, Data->ChangeVertexLastOnS2(),tolesp); + Standard_False, Data->ChangeVertexLastOnS2(),tolapp3d); Standard_Boolean reverse = (!Forward || Inside); if(intf && reverse){ @@ -932,13 +932,13 @@ ChFi3d_ChBuilder::SimulSurf(Handle(ChFiDS_SurfData)& Data, Data->SetSimul(sec); Data->Set2dPoints(pf1,pl1,pf2,pl2); ChFi3d_FilCommonPoint(lin->StartPointOnFirst(),lin->TransitionOnS1(), - Standard_True, Data->ChangeVertexFirstOnS1(),tolesp); + Standard_True, Data->ChangeVertexFirstOnS1(),tolapp3d); ChFi3d_FilCommonPoint(lin->EndPointOnFirst(),lin->TransitionOnS1(), - Standard_False,Data->ChangeVertexLastOnS1(),tolesp); + Standard_False,Data->ChangeVertexLastOnS1(),tolapp3d); ChFi3d_FilCommonPoint(lin->StartPointOnSecond(),lin->TransitionOnS2(), - Standard_True, Data->ChangeVertexFirstOnS2(),tolesp); + Standard_True, Data->ChangeVertexFirstOnS2(),tolapp3d); ChFi3d_FilCommonPoint(lin->EndPointOnSecond(),lin->TransitionOnS2(), - Standard_False, Data->ChangeVertexLastOnS2(),tolesp); + Standard_False, Data->ChangeVertexLastOnS2(),tolapp3d); Standard_Boolean reverse = (!Forward || Inside); if(intf && reverse){ @@ -1017,13 +1017,13 @@ ChFi3d_ChBuilder::SimulSurf(Handle(ChFiDS_SurfData)& Data, Data->SetSimul(sec); Data->Set2dPoints(pf1,pl1,pf2,pl2); ChFi3d_FilCommonPoint(lin->StartPointOnFirst(),lin->TransitionOnS1(), - Standard_True, Data->ChangeVertexFirstOnS1(),tolesp); + Standard_True, Data->ChangeVertexFirstOnS1(),tolapp3d); ChFi3d_FilCommonPoint(lin->EndPointOnFirst(),lin->TransitionOnS1(), - Standard_False,Data->ChangeVertexLastOnS1(),tolesp); + Standard_False,Data->ChangeVertexLastOnS1(),tolapp3d); ChFi3d_FilCommonPoint(lin->StartPointOnSecond(),lin->TransitionOnS2(), - Standard_True, Data->ChangeVertexFirstOnS2(),tolesp); + Standard_True, Data->ChangeVertexFirstOnS2(),tolapp3d); ChFi3d_FilCommonPoint(lin->EndPointOnSecond(),lin->TransitionOnS2(), - Standard_False, Data->ChangeVertexLastOnS2(),tolesp); + Standard_False, Data->ChangeVertexLastOnS2(),tolapp3d); Standard_Boolean reverse = (!Forward || Inside); if(intf && reverse){ @@ -1175,7 +1175,7 @@ Standard_Boolean ChFi3d_ChBuilder::PerformFirstSection if (chsp.IsNull()) throw Standard_ConstructionError("PerformSurf : this is not the spine of a chamfer"); - Standard_Real TolGuide = HGuide->Resolution(tolesp) ; + Standard_Real TolGuide = HGuide->Resolution(tolapp3d); if (chsp->IsChamfer() == ChFiDS_Sym) { @@ -1244,7 +1244,7 @@ Standard_Boolean ChFi3d_ChBuilder::PerformFirstSection } return TheWalk.PerformFirstSection(*pFunc,Par,SolDep, - tolesp,TolGuide,Pos1,Pos2); + tolapp3d,TolGuide,Pos1,Pos2); } else if (chsp->IsChamfer() == ChFiDS_TwoDist) { Standard_Real dis1, dis2; @@ -1347,7 +1347,7 @@ Standard_Boolean ChFi3d_ChBuilder::PerformFirstSection } return TheWalk.PerformFirstSection(*pFunc,Par,SolDep, - tolesp,TolGuide,Pos1,Pos2); + tolapp3d,TolGuide,Pos1,Pos2); } else { //distance and angle Standard_Real dis1, angle; @@ -1415,7 +1415,7 @@ Standard_Boolean ChFi3d_ChBuilder::PerformFirstSection } return TheWalk.PerformFirstSection(Func,Par,SolDep, - tolesp,TolGuide,Pos1,Pos2); + tolapp3d,TolGuide,Pos1,Pos2); } //distance and angle } diff --git a/src/ChFi3d/ChFi3d_ChBuilder_C3.cxx b/src/ChFi3d/ChFi3d_ChBuilder_C3.cxx index 9bd677069d..e6952627f9 100644 --- a/src/ChFi3d/ChFi3d_ChBuilder_C3.cxx +++ b/src/ChFi3d/ChFi3d_ChBuilder_C3.cxx @@ -478,7 +478,7 @@ void ChFi3d_ChBuilder::PerformThreeCorner(const Standard_Integer Jndex) if (!ComputeIntersection(DStr,fdpiv,coin, p3d[fin],p2d[fin],p3d[deb],p2d[deb], gcpiv,pivpc1,pivpc2,deru,derv,ptbid, - tolesp,tol2d,tolrcoinpiv)) + tolapp3d,tol2d,tolrcoinpiv)) throw StdFail_NotDone("echec calcul intersection coin-pivot"); gp_Vec norpiv = deru.Crossed(derv); @@ -495,7 +495,7 @@ void ChFi3d_ChBuilder::PerformThreeCorner(const Standard_Integer Jndex) if (!ComputeIntersection(DStr,fddeb,coin, p3d[pivot],p2d1,p3d[fin],p2d2, gcdeb,debpc1,debpc2,deru,derv,ptbid, - tolesp,tol2d,tolrcoindeb)) + tolapp3d,tol2d,tolrcoindeb)) throw StdFail_NotDone("echec calcul intersection coin-deb"); Icf = DStr.AddCurve(TopOpeBRepDS_Curve(gcdeb,tolrcoindeb)); @@ -514,7 +514,7 @@ void ChFi3d_ChBuilder::PerformThreeCorner(const Standard_Integer Jndex) if (!ComputeIntersection(DStr,fdfin,coin, p3dface,p2d1,p3d[deb],p2d2, gcfin,finpc1,finpc2,deru,derv,ptbid, - tolesp,tol2d,tolrcoinfin)) + tolapp3d,tol2d,tolrcoinfin)) throw StdFail_NotDone("echec calcul intersection coin-face"); Icl = DStr.AddCurve(TopOpeBRepDS_Curve(gcfin,tolrcoinfin)); @@ -543,8 +543,8 @@ void ChFi3d_ChBuilder::PerformThreeCorner(const Standard_Integer Jndex) gaf->Initialize(face[pivot]); Standard_Real tolr; - ChFi3d_ProjectPCurv(gac,gaf,facepc1,tolesp,tolr); - ChFi3d_ProjectPCurv(gac,gas,facepc2,tolesp,tolr); + ChFi3d_ProjectPCurv(gac,gaf,facepc1,tolapp3d,tolr); + ChFi3d_ProjectPCurv(gac,gas,facepc2,tolapp3d,tolr); } } } @@ -616,18 +616,18 @@ void ChFi3d_ChBuilder::PerformThreeCorner(const Standard_Integer Jndex) // les bords de coin sont des lignes courbes qui suivent les // tangentes donnees Bfac = ChFi3d_mkbound(Fac,PCurveOnFace,sens[deb],p2d[pivot],Tgpiv, - sens[fin],p2d[3],Tg3,tolesp,2.e-4); + sens[fin],p2d[3],Tg3,tolapp3d,2.e-4); Bpiv = ChFi3d_mkbound(Surf,PCurveOnPiv,sens[deb],p2d[fin],vpfin, - sens[fin],p2d[deb],vpdeb,tolesp,2.e-4); + sens[fin],p2d[deb],vpdeb,tolapp3d,2.e-4); } else { // les bords de coin sont des segments // Bfac = ChFi3d_mkbound(Fac,PCurveOnFace,p2d[pivot], // p2d[3],tolesp,2.e-4); Bfac = ChFi3d_mkbound(Fac,PCurveOnFace,p2d[pivot], - p2d[3],tolesp,2.e-4); + p2d[3],tolapp3d,2.e-4); Bpiv = ChFi3d_mkbound(Surf,PCurveOnPiv,p2d[fin], - p2d[deb],tolesp,2.e-4); + p2d[deb],tolapp3d,2.e-4); } gp_Pnt2d pdeb1 = fddeb->Interference(jf[deb][pivot]).PCurveOnSurf()->Value(p[deb][pivot]); @@ -637,15 +637,15 @@ void ChFi3d_ChBuilder::PerformThreeCorner(const Standard_Integer Jndex) if (issmooth) { // il faut homogeneiser, mettre les bords "BoundWithSurf" - Bdeb = ChFi3d_mkbound(DStr.Surface(fddeb->Surf()).Surface(),pdeb1,pdeb2,tolesp,2.e-4); - Bfin = ChFi3d_mkbound(DStr.Surface(fdfin->Surf()).Surface(),pfin1,pfin2,tolesp,2.e-4); + Bdeb = ChFi3d_mkbound(DStr.Surface(fddeb->Surf()).Surface(),pdeb1,pdeb2,tolapp3d,2.e-4); + Bfin = ChFi3d_mkbound(DStr.Surface(fdfin->Surf()).Surface(),pfin1,pfin2,tolapp3d,2.e-4); } else { // ou les 4 bords de type "FreeBoundary" Bdeb = ChFi3d_mkbound(DStr.Surface(fddeb->Surf()).Surface(),pdeb1,pdeb2, - tolesp,2.e-4,Standard_True); + tolapp3d,2.e-4,Standard_True); Bfin = ChFi3d_mkbound(DStr.Surface(fdfin->Surf()).Surface(),pfin1,pfin2, - tolesp,2.e-4,Standard_True); + tolapp3d,2.e-4,Standard_True); } GeomFill_ConstrainedFilling fil(8,20); fil.Init(Bpiv,Bfin,Bfac,Bdeb); @@ -704,7 +704,7 @@ void ChFi3d_ChBuilder::PerformThreeCorner(const Standard_Integer Jndex) ChFi3d_ComputeArete(Pf1,pp1,Pf2,pp2, DStr.Surface(coin->Surf()).Surface(),C3d, corner->ChangeFirstPCurve(),P1deb,P2deb, - tolesp,tol2d,tolreached,0); + tolapp3d,tol2d,tolreached,0); TopOpeBRepDS_Curve Tcurv(C3d,tolreached); Icf = DStr.AddCurve(Tcurv); } @@ -733,7 +733,7 @@ void ChFi3d_ChBuilder::PerformThreeCorner(const Standard_Integer Jndex) ChFi3d_ComputeArete(Pl1,pp1,Pl2,pp2, DStr.Surface(coin->Surf()).Surface(),C3d, corner->ChangeLastPCurve(),P1fin,P2fin, - tolesp,tol2d,tolreached,0); + tolapp3d,tol2d,tolreached,0); TopOpeBRepDS_Curve Tcurv(C3d,tolreached); Icl = DStr.AddCurve(Tcurv); } diff --git a/src/ChFi3d/ChFi3d_FilBuilder.cxx b/src/ChFi3d/ChFi3d_FilBuilder.cxx index 65164af459..d893460fea 100644 --- a/src/ChFi3d/ChFi3d_FilBuilder.cxx +++ b/src/ChFi3d/ChFi3d_FilBuilder.cxx @@ -689,13 +689,13 @@ ChFi3d_FilBuilder::SimulSurf(Handle(ChFiDS_SurfData)& Data, Data->SetSimul(sec); Data->Set2dPoints(pf1,pl1,pf2,pl2); ChFi3d_FilCommonPoint(lin->StartPointOnFirst(),lin->TransitionOnS1(), - Standard_True, Data->ChangeVertexFirstOnS1(),tolesp); + Standard_True, Data->ChangeVertexFirstOnS1(),tolapp3d); ChFi3d_FilCommonPoint(lin->EndPointOnFirst(),lin->TransitionOnS1(), - Standard_False,Data->ChangeVertexLastOnS1(),tolesp); + Standard_False,Data->ChangeVertexLastOnS1(),tolapp3d); ChFi3d_FilCommonPoint(lin->StartPointOnSecond(),lin->TransitionOnS2(), - Standard_True, Data->ChangeVertexFirstOnS2(),tolesp); + Standard_True, Data->ChangeVertexFirstOnS2(),tolapp3d); ChFi3d_FilCommonPoint(lin->EndPointOnSecond(),lin->TransitionOnS2(), - Standard_False, Data->ChangeVertexLastOnS2(),tolesp); + Standard_False, Data->ChangeVertexLastOnS2(),tolapp3d); Standard_Boolean reverse = (!Forward || Inside); if(intf && reverse){ Standard_Boolean ok = Standard_False; @@ -857,13 +857,13 @@ void ChFi3d_FilBuilder::SimulSurf(Handle(ChFiDS_SurfData)& Data, // gp_Pnt2d pbid; Data->Set2dPoints(ppcf,ppcl,pf,pl); ChFi3d_FilCommonPoint(lin->StartPointOnFirst(),lin->TransitionOnS1(), - Standard_True, Data->ChangeVertexFirstOnS2(),tolesp); + Standard_True, Data->ChangeVertexFirstOnS2(),tolapp3d); ChFi3d_FilCommonPoint(lin->EndPointOnFirst(),lin->TransitionOnS1(), - Standard_False,Data->ChangeVertexLastOnS2(),tolesp); + Standard_False,Data->ChangeVertexLastOnS2(),tolapp3d); ChFi3d_FilCommonPoint(lin->StartPointOnSecond(),lin->TransitionOnS2(), - Standard_True, Data->ChangeVertexFirstOnS1(),tolesp); + Standard_True, Data->ChangeVertexFirstOnS1(),tolapp3d); ChFi3d_FilCommonPoint(lin->EndPointOnSecond(),lin->TransitionOnS2(), - Standard_False, Data->ChangeVertexLastOnS1(),tolesp); + Standard_False, Data->ChangeVertexLastOnS1(),tolapp3d); } //======================================================================= @@ -989,13 +989,13 @@ void ChFi3d_FilBuilder::SimulSurf(Handle(ChFiDS_SurfData)& Data, //gp_Pnt2d pbid; Data->Set2dPoints(pf,pl,ppcf,ppcl); ChFi3d_FilCommonPoint(lin->StartPointOnFirst(),lin->TransitionOnS1(), - Standard_True, Data->ChangeVertexFirstOnS1(),tolesp); + Standard_True, Data->ChangeVertexFirstOnS1(),tolapp3d); ChFi3d_FilCommonPoint(lin->EndPointOnFirst(),lin->TransitionOnS1(), - Standard_False,Data->ChangeVertexLastOnS1(),tolesp); + Standard_False,Data->ChangeVertexLastOnS1(),tolapp3d); ChFi3d_FilCommonPoint(lin->StartPointOnSecond(),lin->TransitionOnS2(), - Standard_True, Data->ChangeVertexFirstOnS2(),tolesp); + Standard_True, Data->ChangeVertexFirstOnS2(),tolapp3d); ChFi3d_FilCommonPoint(lin->EndPointOnSecond(),lin->TransitionOnS2(), - Standard_False, Data->ChangeVertexLastOnS2(),tolesp); + Standard_False, Data->ChangeVertexLastOnS2(),tolapp3d); } @@ -1153,13 +1153,13 @@ void ChFi3d_FilBuilder::SimulSurf(Handle(ChFiDS_SurfData)& Data, // Data->Set2dPoints(pf,pl,pbid,pbid); ChFi3d_FilCommonPoint(lin->StartPointOnFirst(),lin->TransitionOnS1(), - Standard_True, Data->ChangeVertexFirstOnS1(),tolesp); + Standard_True, Data->ChangeVertexFirstOnS1(),tolapp3d); ChFi3d_FilCommonPoint(lin->EndPointOnFirst(),lin->TransitionOnS1(), - Standard_False,Data->ChangeVertexLastOnS1(),tolesp); + Standard_False,Data->ChangeVertexLastOnS1(),tolapp3d); ChFi3d_FilCommonPoint(lin->StartPointOnSecond(),lin->TransitionOnS2(), - Standard_True, Data->ChangeVertexFirstOnS2(),tolesp); + Standard_True, Data->ChangeVertexFirstOnS2(),tolapp3d); ChFi3d_FilCommonPoint(lin->EndPointOnSecond(),lin->TransitionOnS2(), - Standard_False, Data->ChangeVertexLastOnS2(),tolesp); + Standard_False, Data->ChangeVertexLastOnS2(),tolapp3d); } @@ -1188,14 +1188,14 @@ Standard_Boolean ChFi3d_FilBuilder::PerformFirstSection { Handle(ChFiDS_FilSpine) fsp = Handle(ChFiDS_FilSpine)::DownCast(Spine); if(fsp.IsNull()) throw Standard_ConstructionError("PerformSurf : this is not the spine of a fillet"); - Standard_Real TolGuide = HGuide->Resolution(tolesp); + Standard_Real TolGuide = HGuide->Resolution(tolapp3d); if(fsp->IsConstant()){ BRepBlend_ConstRad Func(S1,S2,HGuide); Func.Set(fsp->Radius(),Choix); Func.Set(myShape); BRepBlend_Walking TheWalk(S1,S2,I1,I2,HGuide); return TheWalk.PerformFirstSection(Func,Par,SolDep, - tolesp,TolGuide,Pos1,Pos2); + tolapp3d,TolGuide,Pos1,Pos2); } else { BRepBlend_EvolRad Func(S1,S2,HGuide,fsp->Law(HGuide)); @@ -1203,7 +1203,7 @@ Standard_Boolean ChFi3d_FilBuilder::PerformFirstSection Func.Set(myShape); BRepBlend_Walking TheWalk(S1,S2,I1,I2,HGuide); return TheWalk.PerformFirstSection(Func,Par,SolDep, - tolesp,TolGuide,Pos1,Pos2); + tolapp3d,TolGuide,Pos1,Pos2); } } diff --git a/src/ChFi3d/ChFi3d_FilBuilder_C2.cxx b/src/ChFi3d/ChFi3d_FilBuilder_C2.cxx index b54b8f997b..942eed88e2 100644 --- a/src/ChFi3d/ChFi3d_FilBuilder_C2.cxx +++ b/src/ChFi3d/ChFi3d_FilBuilder_C2.cxx @@ -321,7 +321,7 @@ void ChFi3d_FilBuilder::PerformTwoCorner(const Standard_Integer Index) parCP2 = CP2.ParameterOnArc(); gp_Pnt tst1 = Hpivot->Value(parCP1); gp_Pnt tst2 = Hpivot->Value(parCP2); - sameparam = tst1.Distance(tst2) <= tolesp; + sameparam = tst1.Distance(tst2) <= tolapp3d; } Handle(BRepAdaptor_Surface) HFaCo = new BRepAdaptor_Surface(); Handle(BRepAdaptor_Surface) HFaPiv; @@ -477,18 +477,18 @@ void ChFi3d_FilBuilder::PerformTwoCorner(const Standard_Integer Index) #ifdef OCCT_DEBUG ChFi3d_InitChron(ch ); // init perf filling #endif - B1 = ChFi3d_mkbound(surf1,p2df1,p2da1,tolesp,2.e-4); - B2 = ChFi3d_mkbound(surf2,p2df2,p2da2,tolesp,2.e-4); + B1 = ChFi3d_mkbound(surf1,p2df1,p2da1,tolapp3d,2.e-4); + B2 = ChFi3d_mkbound(surf2,p2df2,p2da2,tolapp3d,2.e-4); Handle(Geom2d_Curve) PCurveOnFace; Bfac = ChFi3d_mkbound(HFaCo,PCurveOnFace,Sens1,p2dfac1,v2dfac1, - Sens2,p2dfac2,v2dfac2,tolesp,2.e-4); + Sens2,p2dfac2,v2dfac2,tolapp3d,2.e-4); GeomFill_ConstrainedFilling fil(8,20); if(sameparam) { fil.Init(Bfac,B2,B1,1); } else { Handle(Adaptor3d_Curve) HPivTrim = Hpivot->Trim(Min(parCP1,parCP2),Max(parCP1,parCP2),tolesp); - Bpiv = new GeomFill_SimpleBound(HPivTrim,tolesp,2.e-4); + Bpiv = new GeomFill_SimpleBound(HPivTrim,tolapp3d,2.e-4); fil.Init(Bfac,B2,Bpiv,B1,1); BRepAdaptor_Curve2d pcpivot; gp_Vec dArc,dcf; @@ -597,14 +597,14 @@ void ChFi3d_FilBuilder::PerformTwoCorner(const Standard_Integer Index) ChFi3d_ComputeArete(Pf1,pp1,Pf2,pp2, DStr.Surface(coin->Surf()).Surface(),C3d, corner->ChangeFirstPCurve(),P1deb,P2deb, - tolesp,tol2d,tolreached,0); + tolapp3d,tol2d,tolreached,0); Standard_Real par1 = sd1->Interference(IFaArc1).Parameter(isfirst1); pp1 = sd1->Interference(IFaCo1).PCurveOnSurf()->Value(par1); pp2 = sd1->Interference(IFaArc1).PCurveOnSurf()->Value(par1); Standard_Real tolr1; ChFi3d_ComputePCurv(C3d,pp1,pp2,st1->ChangePCurve(isfirst1), DStr.Surface(sd1->Surf()).Surface(), - P1deb,P2deb,tolesp,tolr1); + P1deb,P2deb,tolapp3d,tolr1); tolreached = Max(tolreached,tolr1); TopOpeBRepDS_Curve Tcurv1(C3d,tolreached); Icf = DStr.AddCurve(Tcurv1); @@ -624,14 +624,14 @@ void ChFi3d_FilBuilder::PerformTwoCorner(const Standard_Integer Index) ChFi3d_ComputeArete(Pl1,pp1,Pl2,pp2, DStr.Surface(coin->Surf()).Surface(),C3d, corner->ChangeLastPCurve(),P1fin,P2fin, - tolesp,tol2d,tolreached,0); + tolapp3d,tol2d,tolreached,0); Standard_Real par2 = sd2->Interference(IFaArc2).Parameter(isfirst2); pp1 = sd2->Interference(IFaCo2).PCurveOnSurf()->Value(par2); pp2 = sd2->Interference(IFaArc2).PCurveOnSurf()->Value(par2); Standard_Real tolr2; ChFi3d_ComputePCurv(C3d,pp1,pp2,st2->ChangePCurve(isfirst2), DStr.Surface(sd2->Surf()).Surface(), - P1deb,P2deb,tolesp,tolr2); + P1deb,P2deb,tolapp3d,tolr2); tolreached = Max(tolreached,tolr2); TopOpeBRepDS_Curve Tcurv2(C3d,tolreached); Icl = DStr.AddCurve(Tcurv2); @@ -732,7 +732,7 @@ void ChFi3d_FilBuilder::PerformTwoCorner(const Standard_Integer Index) Handle(Geom_Surface) surfsam = DStr.Surface(sdsam->Surf()).Surface(); Handle(GeomAdaptor_Surface) Hsurfsam = new GeomAdaptor_Surface(surfsam); Handle(Geom2d_Curve) pcsurfsam; - Bsam = ChFi3d_mkbound(Hsurfsam,pcsurfsam,ppopsam,ppcosam,tolesp,2.e-4); + Bsam = ChFi3d_mkbound(Hsurfsam,pcsurfsam,ppopsam,ppcosam,tolapp3d,2.e-4); Standard_Real upcopdif = sddif->Interference(ifaopdif).Parameter(isfirstdif); gp_Pnt2d ppopdif = sddif->Interference(ifaopdif).PCurveOnSurf()->Value(upcopdif); @@ -741,7 +741,7 @@ void ChFi3d_FilBuilder::PerformTwoCorner(const Standard_Integer Index) Handle(Geom_Surface) surfdif = DStr.Surface(sddif->Surf()).Surface(); Handle(GeomAdaptor_Surface) Hsurfdif = new GeomAdaptor_Surface(surfdif); Handle(Geom2d_Curve) pcsurfdif; - Bdif = ChFi3d_mkbound(Hsurfdif,pcsurfdif,ppcodif,ppopdif,tolesp,2.e-4); + Bdif = ChFi3d_mkbound(Hsurfdif,pcsurfdif,ppcodif,ppopdif,tolapp3d,2.e-4); gp_Pnt2d ppfacsam,ppfacdif; gp_Pnt PPfacsam,PPfacdif; gp_Vec VVfacsam,VVfacdif; @@ -773,7 +773,7 @@ void ChFi3d_FilBuilder::PerformTwoCorner(const Standard_Integer Index) Handle(Geom2d_Curve) pcFopsam = ChFi3d_BuildPCurve(HBRFopsam, ppfacsam,VVfacsam, ppfacdif,VVfacdif,1); - Bfac = ChFi3d_mkbound(HBRFopsam,pcFopsam,tolesp,2.e-4); + Bfac = ChFi3d_mkbound(HBRFopsam,pcFopsam,tolapp3d,2.e-4); GeomFill_ConstrainedFilling fil(8,20); fil.Init(Bsam,Bdif,Bfac,1); #if 0 @@ -827,10 +827,10 @@ void ChFi3d_FilBuilder::PerformTwoCorner(const Standard_Integer Index) ChFi3d_ComputeArete(Pf1,pp1,Pf2,pp2, DStr.Surface(coin->Surf()).Surface(),C3d, corner->ChangeFirstPCurve(),P1deb,P2deb, - tolesp,tol2d,tolreached,0); + tolapp3d,tol2d,tolreached,0); Standard_Real tolr1; Handle(GeomAdaptor_Curve) HC3d = new GeomAdaptor_Curve(C3d); - ChFi3d_SameParameter(HC3d,pcFopsam,HBRFopsam,tolesp,tolr1); + ChFi3d_SameParameter(HC3d,pcFopsam,HBRFopsam,tolapp3d,tolr1); tolreached = Max(tolreached,tolr1); TopOpeBRepDS_Curve Tcurv1(C3d,tolreached); Icf = DStr.AddCurve(Tcurv1); @@ -858,10 +858,10 @@ void ChFi3d_FilBuilder::PerformTwoCorner(const Standard_Integer Index) ChFi3d_ComputeArete(Pl1,pp1,Pl2,pp2, DStr.Surface(coin->Surf()).Surface(),C3d, corner->ChangeLastPCurve(),P1fin,P2fin, - tolesp,tol2d,tolreached,0); + tolapp3d,tol2d,tolreached,0); Standard_Real tolr2; HC3d->Load(C3d); - ChFi3d_SameParameter(HC3d,pcsurfdif,Hsurfdif,tolesp,tolr2); + ChFi3d_SameParameter(HC3d,pcsurfdif,Hsurfdif,tolapp3d,tolr2); tolreached = Max(tolreached,tolr2); TopOpeBRepDS_Curve Tcurv2(C3d,tolreached); Icl = DStr.AddCurve(Tcurv2); diff --git a/src/ChFi3d/ChFi3d_FilBuilder_C3.cxx b/src/ChFi3d/ChFi3d_FilBuilder_C3.cxx index 6403c2141e..e4cc374842 100644 --- a/src/ChFi3d/ChFi3d_FilBuilder_C3.cxx +++ b/src/ChFi3d/ChFi3d_FilBuilder_C3.cxx @@ -307,7 +307,7 @@ void ChFi3d_FilBuilder::PerformThreeCorner(const Standard_Integer Jndex) pivot = ii; deb = jj; fin = kk; } } - if(!c1toric)c1spheric=(Abs(qr[0]-qr[1])Resolution(tolesp); + Standard_Real TolGuide = cornerspine->Resolution(tolapp3d); Standard_Integer intf = 3, intl = 3; done = ComputeData(coin,cornerspine,NullSpine,lin,Fac,IFac,Surf,ISurf, @@ -573,7 +573,7 @@ void ChFi3d_FilBuilder::PerformThreeCorner(const Standard_Integer Jndex) func.Set(choix); func.Set(myShape); finv.Set(choix); - Standard_Real TolGuide = cornerspine->Resolution(tolesp); + Standard_Real TolGuide = cornerspine->Resolution(tolapp3d); Standard_Integer intf = 3, intl = 3; done = ComputeData(coin,cornerspine,NullSpine,lin,Fac,IFac,Surf,ISurf, func,finv,ffi,pasmax,locfleche,TolGuide,ffi,lla, @@ -607,7 +607,7 @@ void ChFi3d_FilBuilder::PerformThreeCorner(const Standard_Integer Jndex) Handle(Geom2d_Curve) PCurveOnFace; if(!c1pointu) Bfac = ChFi3d_mkbound(Fac,PCurveOnFace,sens[deb],pfac1,vfac1, - sens[fin],pfac2,vfac2,tolesp,2.e-4); + sens[fin],pfac2,vfac2,tolapp3d,2.e-4); Standard_Integer kkk; gp_Pnt ppbid; gp_Vec vp1,vp2; @@ -620,7 +620,7 @@ void ChFi3d_FilBuilder::PerformThreeCorner(const Standard_Integer Jndex) Handle(Geom2d_Curve) PCurveOnPiv; // Bpiv = ChFi3d_mkbound(Surf,PCurveOnPiv,sens[deb],psurf1,vp1, // sens[fin],psurf2,vp2,tolesp,2.e-4); - Bpiv = ChFi3d_mkbound(Surf,PCurveOnPiv,psurf1,psurf2,tolesp,2.e-4,0); + Bpiv = ChFi3d_mkbound(Surf,PCurveOnPiv,psurf1,psurf2,tolapp3d,2.e-4,0); Standard_Real pardeb2 = p[deb][pivot]; Standard_Real parfin2 = p[fin][pivot]; if(c1pointu){ @@ -642,8 +642,8 @@ void ChFi3d_FilBuilder::PerformThreeCorner(const Standard_Integer Jndex) DStr.Surface(CD[fin]->SetOfSurfData()-> Value(i[fin][pivot])->Surf()).Surface(); - Bdeb = ChFi3d_mkbound(sdeb,pdeb1,pdeb2,tolesp,2.e-4); - Bfin = ChFi3d_mkbound(sfin,pfin1,pfin2,tolesp,2.e-4); + Bdeb = ChFi3d_mkbound(sdeb,pdeb1,pdeb2,tolapp3d,2.e-4); + Bfin = ChFi3d_mkbound(sfin,pfin1,pfin2,tolapp3d,2.e-4); GeomFill_ConstrainedFilling fil(11,20); if(c1pointu) fil.Init(Bpiv,Bfin,Bdeb,1); @@ -712,7 +712,7 @@ void ChFi3d_FilBuilder::PerformThreeCorner(const Standard_Integer Jndex) ChFi3d_ComputeArete(Pf1,pp1,Pf2,pp2, DStr.Surface(coin->Surf()).Surface(),C3d, corner->ChangeFirstPCurve(),P1deb,P2deb, - tolesp,tol2d,tolreached,0); + tolapp3d,tol2d,tolreached,0); TopOpeBRepDS_Curve Tcurv1(C3d,tolreached); Icf = DStr.AddCurve(Tcurv1); regdeb.SetCurve(Icf); @@ -732,7 +732,7 @@ void ChFi3d_FilBuilder::PerformThreeCorner(const Standard_Integer Jndex) ChFi3d_ComputeArete(Pl1,pp1,Pl2,pp2, DStr.Surface(coin->Surf()).Surface(),C3d, corner->ChangeLastPCurve(),P1fin,P2fin, - tolesp,tol2d,tolreached,0); + tolapp3d,tol2d,tolreached,0); TopOpeBRepDS_Curve Tcurv2(C3d,tolreached); Icl = DStr.AddCurve(Tcurv2); regfin.SetCurve(Icl); @@ -770,7 +770,7 @@ void ChFi3d_FilBuilder::PerformThreeCorner(const Standard_Integer Jndex) Standard_Real tolrdeb; ChFi3d_ComputePCurv(crefdeb,pp1,pp2,CD[deb]->ChangePCurve(isfirst), DStr.Surface(fddeb->Surf()).Surface(), - P1deb,P2deb,tolesp,tolrdeb,rev); + P1deb,P2deb,tolapp3d,tolrdeb,rev); tcdeb.Tolerance(Max(tolrdeb,tcdeb.Tolerance())); if(rev) ChFi3d_EnlargeBox(DStr,CD[deb],fddeb,*pbf2,*pbf1,isfirst); else ChFi3d_EnlargeBox(DStr,CD[deb],fddeb,*pbf1,*pbf2,isfirst); @@ -800,7 +800,7 @@ void ChFi3d_FilBuilder::PerformThreeCorner(const Standard_Integer Jndex) Standard_Real tolrfin; ChFi3d_ComputePCurv(creffin,pp1,pp2,CD[fin]->ChangePCurve(isfirst), DStr.Surface(fdfin->Surf()).Surface(), - P1fin,P2fin,tolesp,tolrfin,rev); + P1fin,P2fin,tolapp3d,tolrfin,rev); tcfin.Tolerance(Max(tolrfin,tcfin.Tolerance())); if(rev) ChFi3d_EnlargeBox(DStr,CD[fin],fdfin,*pbl2,*pbl1,isfirst); else ChFi3d_EnlargeBox(DStr,CD[fin],fdfin,*pbl1,*pbl2,isfirst); @@ -823,7 +823,7 @@ void ChFi3d_FilBuilder::PerformThreeCorner(const Standard_Integer Jndex) Standard_Real tolr; ChFi3d_SameParameter(Ccoinpiv,C2dOnPiv,Spiv, fi.FirstParameter(),fi.LastParameter(), - tolesp,tolr); + tolapp3d,tolr); TCcoinpiv.Tolerance(Max(TCcoinpiv.Tolerance(),tolr)); CD[pivot]->ChangePCurve(isfirst) = C2dOnPiv; CD[pivot]->SetIndexPoint(If2,isfirst,isurf1); diff --git a/src/ChFiDS/ChFiDS_Spine.cxx b/src/ChFiDS/ChFiDS_Spine.cxx index b6c08471e5..30496915bb 100644 --- a/src/ChFiDS/ChFiDS_Spine.cxx +++ b/src/ChFiDS/ChFiDS_Spine.cxx @@ -558,6 +558,17 @@ void ChFiDS_Spine::Load() } indexofcurve =1; myCurve.Initialize(TopoDS::Edge(spine.Value(1))); + + // Here, we should update tolesp according to curve parameter range + // if tolesp candidate less than default initial value. + const Standard_Real umin = FirstParameter(); + const Standard_Real umax = LastParameter(); + + Standard_Real new_tolesp = 5.0e-5 * (umax - umin); + if (tolesp > new_tolesp) + { + tolesp = new_tolesp; + } } diff --git a/src/ChFiDS/ChFiDS_Spine.hxx b/src/ChFiDS/ChFiDS_Spine.hxx index ffc6be8785..07f4f8ddf5 100644 --- a/src/ChFiDS/ChFiDS_Spine.hxx +++ b/src/ChFiDS/ChFiDS_Spine.hxx @@ -244,6 +244,9 @@ public: //! Return the mode of chamfers used Standard_EXPORT ChFiDS_ChamfMode Mode() const; + //! Return tolesp parameter + Standard_EXPORT Standard_Real GetTolesp() const; + DEFINE_STANDARD_RTTIEXT(ChFiDS_Spine,Standard_Transient) diff --git a/src/ChFiDS/ChFiDS_Spine.lxx b/src/ChFiDS/ChFiDS_Spine.lxx index fef5d0db42..731532f0c4 100644 --- a/src/ChFiDS/ChFiDS_Spine.lxx +++ b/src/ChFiDS/ChFiDS_Spine.lxx @@ -214,3 +214,12 @@ inline ChFiDS_ChamfMode ChFiDS_Spine::Mode() const return myMode; } + +//======================================================================= +//function : GetTolesp +//purpose : +//======================================================================= +inline Standard_Real ChFiDS_Spine::GetTolesp() const +{ + return tolesp; +} diff --git a/src/FilletSurf/FilletSurf_InternalBuilder.cxx b/src/FilletSurf/FilletSurf_InternalBuilder.cxx index fb1c98ed0f..955d61eac7 100644 --- a/src/FilletSurf/FilletSurf_InternalBuilder.cxx +++ b/src/FilletSurf/FilletSurf_InternalBuilder.cxx @@ -345,19 +345,19 @@ Standard_Boolean if(!done) return Standard_False; if(lin->StartPointOnFirst().NbPointOnRst() !=0){ ChFi3d_FilCommonPoint(lin->StartPointOnFirst(),lin->TransitionOnS1(), - Standard_True, Data->ChangeVertexFirstOnS1(), tolesp); + Standard_True, Data->ChangeVertexFirstOnS1(), tolapp3d); } if(lin->EndPointOnFirst().NbPointOnRst() !=0){ ChFi3d_FilCommonPoint(lin->EndPointOnFirst(),lin->TransitionOnS1(), - Standard_False,Data->ChangeVertexLastOnS1(), tolesp); + Standard_False,Data->ChangeVertexLastOnS1(), tolapp3d); } if(lin->StartPointOnSecond().NbPointOnRst() !=0){ ChFi3d_FilCommonPoint(lin->StartPointOnSecond(),lin->TransitionOnS2(), - Standard_True, Data->ChangeVertexFirstOnS2(), tolesp); + Standard_True, Data->ChangeVertexFirstOnS2(), tolapp3d); } if(lin->EndPointOnSecond().NbPointOnRst() !=0){ ChFi3d_FilCommonPoint(lin->EndPointOnSecond(),lin->TransitionOnS2(), - Standard_False, Data->ChangeVertexLastOnS2(), tolesp); + Standard_False, Data->ChangeVertexLastOnS2(), tolapp3d); } done = CompleteData(Data,Func,lin,S1,S2,Or,0,0,0,0); if(!done) throw Standard_Failure("PerformSurf : Failed approximation!"); @@ -554,7 +554,7 @@ Standard_Real FilletSurf_InternalBuilder::FirstParameter() const Standard_Integer ind = 1; if(sp->IsPeriodic()) ind = sp->Index(p); Standard_Real ep; - if(ComputeEdgeParameter(sp,ind,p,ep,tolesp)) return ep; + if(ComputeEdgeParameter(sp,ind,p,ep,tolapp3d)) return ep; return 0.0; } //======================================================================= @@ -570,7 +570,7 @@ Standard_Real FilletSurf_InternalBuilder::LastParameter() const Standard_Integer ind = sp->NbEdges(); if(sp->IsPeriodic()) ind = sp->Index(p); Standard_Real ep; - if(ComputeEdgeParameter(sp,ind,p,ep,tolesp)) return ep; + if(ComputeEdgeParameter(sp,ind,p,ep,tolapp3d)) return ep; return 0.0; } diff --git a/src/QABugs/QABugs_11.cxx b/src/QABugs/QABugs_11.cxx index 81e94fb874..ac029f88e9 100644 --- a/src/QABugs/QABugs_11.cxx +++ b/src/QABugs/QABugs_11.cxx @@ -1864,6 +1864,7 @@ static Standard_Integer OCC1487 (Draw_Interpretor& di, Standard_Integer argc, co //======================================================================= TopoDS_Shape OCC1077_boolbl(BRepAlgoAPI_BooleanOperation& aBoolenaOperation,const Standard_Real aRadius) { + Standard_Real tesp = 1.e-4; Standard_Real t3d = 1.e-4; Standard_Real t2d = 1.e-5; Standard_Real ta = 1.e-2; @@ -1885,7 +1886,7 @@ TopoDS_Shape OCC1077_boolbl(BRepAlgoAPI_BooleanOperation& aBoolenaOperation,cons const TopoDS_Shape& cutsol = ex.Current(); BRepFilletAPI_MakeFillet fill(cutsol); - fill.SetParams(ta, t3d, t2d, t3d, t2d, fl); + fill.SetParams(ta, tesp, t2d, t3d, t2d, fl); fill.SetContinuity(blend_cont, tapp_angle); its = aBoolenaOperation.SectionEdges(); while (its.More()) diff --git a/src/QABugs/QABugs_17.cxx b/src/QABugs/QABugs_17.cxx index b02e62e50f..b46fc24e2a 100644 --- a/src/QABugs/QABugs_17.cxx +++ b/src/QABugs/QABugs_17.cxx @@ -577,6 +577,7 @@ static Standard_Integer OCC570 (Draw_Interpretor& di, Standard_Integer argc,cons #include +static Standard_Real tesp = 1.e-4; static Standard_Real t3d = 1.e-4; static Standard_Real t2d = 1.e-5; static Standard_Real ta = 1.e-2; @@ -606,7 +607,7 @@ static Standard_Integer MKEVOL(Draw_Interpretor& di, if (narg < 3) return 1; TopoDS_Shape V = DBRep::Get(a[2]); Rake = new BRepFilletAPI_MakeFillet(V); - Rake->SetParams(ta,t3d,t2d,t3d,t2d,fl); + Rake->SetParams(ta, tesp, t2d, t3d, t2d, fl); Rake->SetContinuity(blend_cont, tapp_angle); if (narg == 4) { ChFi3d_FilletShape FSh = ChFi3d_Rational; diff --git a/src/ViewerTest/ViewerTest_FilletCommands.cxx b/src/ViewerTest/ViewerTest_FilletCommands.cxx index 803b52c10c..2590c103c9 100644 --- a/src/ViewerTest/ViewerTest_FilletCommands.cxx +++ b/src/ViewerTest/ViewerTest_FilletCommands.cxx @@ -38,6 +38,7 @@ # include #endif +static Standard_Real tesp = 1.e-4; static Standard_Real t3d = 1.e-4; static Standard_Real t2d = 1.e-5; static Standard_Real ta = 1.e-2; @@ -87,7 +88,7 @@ static Standard_Integer VBLEND(Draw_Interpretor& di, Standard_Integer narg, cons } } Rakk = new BRepFilletAPI_MakeFillet(V,FSh); - Rakk->SetParams(ta,t3d,t2d,t3d,t2d,fl); + Rakk->SetParams(ta, tesp, t2d, t3d, t2d, fl); Rakk->SetContinuity(blend_cont, tapp_angle); Standard_Real Rad; TopoDS_Edge E; diff --git a/tests/blend/complex/A6 b/tests/blend/complex/A6 index 3bf7e3e57c..b4409e0220 100644 --- a/tests/blend/complex/A6 +++ b/tests/blend/complex/A6 @@ -4,9 +4,16 @@ ## Comment : from original bug PRO4536 ## ==================================== -restore [locate_data_file CCH_blendhdp.rle] s -tscale s 0 0 0 1000 -explode s e -blend result s 5 s_6 +restore [locate_data_file CCH_blendhdp.rle] s_auth +set radius 0.005 +set area 0.0355762 +foreach sc {0.1 1.0 10.0 100.0 1000.0} { + copy s_auth s + tscale s 0 0 0 $sc + explode s e + blend result s [expr $radius * $sc] s_6 -checkprops result -s 35576.2 + checkprops result -s [expr $area * $sc * $sc] + + unset s +} \ No newline at end of file diff --git a/tests/bugs/modalg_7/bug22821 b/tests/bugs/modalg_7/bug22821 index 70bb6eb83f..ba7ffed24e 100644 --- a/tests/bugs/modalg_7/bug22821 +++ b/tests/bugs/modalg_7/bug22821 @@ -1,5 +1,3 @@ -puts "TODO OCC22821 ALL: Error: Crash with BRepFilletAPI_MakeFillet" - puts "============" puts "OCC22821" puts "============" @@ -11,16 +9,115 @@ puts "" pload XDE stepread [locate_data_file bug22821_test.step] t * -renamevar t_1 t -checkshape t +renamevar t_1 m +checkshape m + +explode m E + +if {![catch {fillet res1 m 0.01 m_1}]} { + #puts "OK: Fillet on edge m_1 was processed correctly!" + checkshape res1 + checkprops res1 -s 0.220328 + checkview -display res1 -2d -path ${imagedir}/${test_image}.png +} else { + puts "Error: Crash with BRepFilletAPI_MakeFillet" +} + +if {![catch {fillet res2 m 0.01 m_2}]} { + #puts "OK: Fillet on edge m_2 was processed correctly!" + checkshape res2 + checkprops res2 -s 0.220328 + checkview -display res2 -2d -path ${imagedir}/${test_image}.png +} else { + puts "Error: Crash with BRepFilletAPI_MakeFillet" +} + +if {![catch {fillet res3 m 0.01 m_3}]} { + #puts "OK: Fillet on edge m_3 was processed correctly!" + checkshape res3 + checkprops res3 -s 0.220328 + checkview -display res3 -2d -path ${imagedir}/${test_image}.png +} else { + puts "Error: Crash with BRepFilletAPI_MakeFillet" +} + +if {![catch {fillet res4 m 0.01 m_4}]} { + #puts "OK: Fillet on edge m_4 was processed correctly!" + checkshape res4 + checkprops res4 -s 0.220328 + checkview -display res4 -2d -path ${imagedir}/${test_image}.png +} else { + puts "Error: Crash with BRepFilletAPI_MakeFillet" +} + +if {![catch {fillet res5 m 0.01 m_5}]} { + #puts "OK: Fillet on edge m_5 was processed correctly!" + checkshape res5 + checkprops res5 -s 0.218602 + checkview -display res5 -2d -path ${imagedir}/${test_image}.png +} else { + puts "Error: Crash with BRepFilletAPI_MakeFillet" +} -explode t E +if {![catch {fillet res6 m 0.01 m_6}]} { + #puts "OK: Fillet on edge m_6 was processed correctly!" + checkshape res6 + checkprops res6 -s 0.220328 + checkview -display res6 -2d -path ${imagedir}/${test_image}.png +} else { + puts "Error: Crash with BRepFilletAPI_MakeFillet" +} + +if {![catch {fillet res7 m 0.01 m_7}]} { + #puts "OK: Fillet on edge m_7 was processed correctly!" + checkshape res7 + checkprops res7 -s 0.218602 + checkview -display res7 -2d -path ${imagedir}/${test_image}.png +} else { + puts "Error: Crash with BRepFilletAPI_MakeFillet" +} + +if {![catch {fillet res8 m 0.01 m_8}]} { + #puts "OK: Fillet on edge m_8 was processed correctly!" + checkshape res8 + checkprops res8 -s 0.220328 + checkview -display res8 -2d -path ${imagedir}/${test_image}.png +} else { + puts "Error: Crash with BRepFilletAPI_MakeFillet" +} -if {![catch {fillet result t 0.01 t_1}]} { - #puts "OK: The incorrect input data were processed correctly!" - checkshape result - checkprops result -s 1.5708 - checkview -display result -2d -path ${imagedir}/${test_image}.png +if {![catch {fillet res9 m 0.01 m_9}]} { + #puts "OK: Fillet on edge m_9 was processed correctly!" + checkshape res9 + checkprops res9 -s 0.218602 + checkview -display res9 -2d -path ${imagedir}/${test_image}.png } else { puts "Error: Crash with BRepFilletAPI_MakeFillet" } + +if {![catch {fillet res10 m 0.01 m_10}]} { + #puts "OK: Fillet on edge m_10 was processed correctly!" + checkshape res10 + checkprops res10 -s 0.218602 + checkview -display res10 -2d -path ${imagedir}/${test_image}.png +} else { + puts "Error: Crash with BRepFilletAPI_MakeFillet" +} + +if {![catch {fillet res11 m 0.01 m_11}]} { + #puts "OK: Fillet on edge m_11 was processed correctly!" + checkshape res11 + checkprops res11 -s 0.220328 + checkview -display res11 -2d -path ${imagedir}/${test_image}.png +} else { + puts "Error: Crash with BRepFilletAPI_MakeFillet" +} + +if {![catch {fillet res12 m 0.01 m_12}]} { + #puts "OK: Fillet on edge m_12 was processed correctly!" + checkshape res12 + checkprops res12 -s 0.220328 + checkview -display res12 -2d -path ${imagedir}/${test_image}.png +} else { + puts "Error: Crash with BRepFilletAPI_MakeFillet" +} \ No newline at end of file From 1e96cf65fa8398a20fd93a2ebcfc52f7fd923c1f Mon Sep 17 00:00:00 2001 From: knosulko Date: Fri, 28 Oct 2022 16:38:45 +0300 Subject: [PATCH 432/639] 0033156: Modeling Algorithms - Planar face creation problem BRepLib_MakeFace::BRepLib_MakeFace: deleted degenerative edges from the input wire; add test tests\mkface\mkplane\bug33156. --- src/BRepLib/BRepLib.cxx | 3 +++ src/BRepLib/BRepLib_MakeFace.cxx | 33 +++++++++++++++++++++++++++++--- tests/mkface/mkplane/bug33156 | 10 ++++++++++ 3 files changed, 43 insertions(+), 3 deletions(-) create mode 100644 tests/mkface/mkplane/bug33156 diff --git a/src/BRepLib/BRepLib.cxx b/src/BRepLib/BRepLib.cxx index bac141645c..3eec408309 100644 --- a/src/BRepLib/BRepLib.cxx +++ b/src/BRepLib/BRepLib.cxx @@ -961,6 +961,9 @@ static void InternalSameParameter(const TopoDS_Shape& theSh, BRepTools_ReShape& TopExp_Explorer ex2; for(ex2.Init(curface,TopAbs_EDGE); ex2.More(); ex2.Next()){ const TopoDS_Edge& E = TopoDS::Edge(ex2.Current()); + if (BRep_Tool::Degenerated(E)) + continue; + TopoDS_Shape aNe = theReshaper.Value(E); Standard_Real aNewEtol = -1; GetEdgeTol(TopoDS::Edge(aNe), curface, aNewEtol); diff --git a/src/BRepLib/BRepLib_MakeFace.cxx b/src/BRepLib/BRepLib_MakeFace.cxx index fdbd362013..632372c33b 100644 --- a/src/BRepLib/BRepLib_MakeFace.cxx +++ b/src/BRepLib/BRepLib_MakeFace.cxx @@ -256,7 +256,7 @@ BRepLib_MakeFace::BRepLib_MakeFace(const TopoDS_Wire& W, myError = BRepLib_NotPlanar; return; } - + // build the face and add the wire BRep_Builder B; myError = BRepLib_FaceDone; @@ -264,13 +264,40 @@ BRepLib_MakeFace::BRepLib_MakeFace(const TopoDS_Wire& W, Standard_Real tol = Max(1.2*FS.ToleranceReached(), FS.Tolerance()); B.MakeFace(TopoDS::Face(myShape),FS.Surface(),FS.Location(),tol); - Add(W); + + TopoDS_Wire aW; + if (OnlyPlane) + { + // get rid of degenerative edges in the input wire + BRep_Builder aB; + aB.MakeWire (aW); + + TopoDS_Wire aWForw = W; + aWForw.Orientation (TopAbs_FORWARD); + TopoDS_Iterator anIter (aWForw); + for (; anIter.More(); anIter.Next()) + { + const TopoDS_Edge& aE = TopoDS::Edge (anIter.Value()); + + if (!BRep_Tool::Degenerated (aE)) + aB.Add (aW, aE); + } + + aW.Orientation (W.Orientation()); // return to original orient + aW.Closed (W.Closed()); + } + else + { + aW = W; + } + + Add (aW); // BRepLib::UpdateTolerances(myShape); // BRepLib::SameParameter(myShape, tol, Standard_True); // - if (BRep_Tool::IsClosed(W)) + if (BRep_Tool::IsClosed(aW)) CheckInside(); } diff --git a/tests/mkface/mkplane/bug33156 b/tests/mkface/mkplane/bug33156 new file mode 100644 index 0000000000..b13453f689 --- /dev/null +++ b/tests/mkface/mkplane/bug33156 @@ -0,0 +1,10 @@ +puts "=============" +puts "0033156: Modeling Algorithms - Planar face creation problem" +puts "=============" + +brestore [locate_data_file bug33156_face.brep] Face + +explode Face W +#Face_1 + +mkplane result Face_1 1 From 9b7f1aea2887d35c3f71e3edce7aca99cb524f54 Mon Sep 17 00:00:00 2001 From: oan Date: Mon, 21 Nov 2022 20:04:09 +0300 Subject: [PATCH 433/639] 0031865: Mesh - triangulation fails with large deflection values due to unhandled Standard_OutOfRange, BRepMesh_PairOfIndex::Append() Define minimum number of points for specific types of curves like it was done for circular edges. --- src/BRepMesh/BRepMesh_CurveTessellator.cxx | 16 ++++++++++++++-- tests/bugs/mesh/bug27845 | 2 +- tests/bugs/mesh/bug31449_1 | 2 +- tests/bugs/mesh/bug31449_3 | 2 +- tests/bugs/mesh/bug31865 | 20 ++++++++++++++++++++ tests/bugs/modalg_2/bug264_6 | 2 +- tests/bugs/modalg_2/bug264_7 | 2 +- tests/de_mesh/shape_write_stl/A8 | 2 +- tests/hlr/poly_hlr/A3 | 2 +- tests/hlr/poly_hlr/C13 | 2 +- tests/hlr/poly_hlr/C15 | 2 +- tests/hlr/poly_hlr/C20 | 2 +- tests/hlr/poly_hlr/C23 | 2 +- tests/hlr/poly_hlr/C24 | 2 +- tests/hlr/poly_hlr/C3 | 2 +- tests/hlr/poly_hlr/C6 | 2 +- tests/hlr/poly_hlr/C8 | 2 +- tests/hlr/poly_hlr/bug27979_2 | 2 +- 18 files changed, 50 insertions(+), 18 deletions(-) create mode 100644 tests/bugs/mesh/bug31865 diff --git a/src/BRepMesh/BRepMesh_CurveTessellator.cxx b/src/BRepMesh/BRepMesh_CurveTessellator.cxx index 3779a52425..c8e942ec3a 100644 --- a/src/BRepMesh/BRepMesh_CurveTessellator.cxx +++ b/src/BRepMesh/BRepMesh_CurveTessellator.cxx @@ -101,9 +101,21 @@ void BRepMesh_CurveTessellator::init() myEdgeSqTol = BRep_Tool::Tolerance (myEdge); myEdgeSqTol *= myEdgeSqTol; - const Standard_Integer aMinPntNb = Max(myMinPointsNb, - (myCurve.GetType() == GeomAbs_Circle) ? 4 : 2); //OCC287 + Standard_Integer aMinPntThreshold = 2; + switch (myCurve.GetType()) + { + case GeomAbs_Circle: + case GeomAbs_Ellipse: + case GeomAbs_Parabola: + case GeomAbs_Hyperbola: + aMinPntThreshold = 4; + break; + + default: + break; + } + const Standard_Integer aMinPntNb = Max (myMinPointsNb, aMinPntThreshold); //OCC287 myDiscretTool.Initialize (myCurve, myCurve.FirstParameter(), myCurve.LastParameter(), aPreciseAngDef, aPreciseLinDef, aMinPntNb, diff --git a/tests/bugs/mesh/bug27845 b/tests/bugs/mesh/bug27845 index 6287701923..c9a337f75b 100644 --- a/tests/bugs/mesh/bug27845 +++ b/tests/bugs/mesh/bug27845 @@ -14,7 +14,7 @@ vdisplay result vfit checkview -screenshot -3d -path ${imagedir}/${test_image}.png -checktrinfo result -tri 3828 -nod 4771 -defl 3.0544822246414993 -tol_abs_defl 1e-6 +checktrinfo result -tri 3834 -nod 4777 -defl 3.0544822246414993 -tol_abs_defl 1e-6 set log [tricheck result] if { [llength $log] != 0 } { diff --git a/tests/bugs/mesh/bug31449_1 b/tests/bugs/mesh/bug31449_1 index f117e4a33c..05032627a6 100644 --- a/tests/bugs/mesh/bug31449_1 +++ b/tests/bugs/mesh/bug31449_1 @@ -15,6 +15,6 @@ vfit vsetdispmode 1 XGetOneShape result Q -checktrinfo result -tri 9025 -nod 6562 +checktrinfo result -tri 9097 -nod 6634 checkview -screenshot -3d -path ${imagedir}/${test_image}.png diff --git a/tests/bugs/mesh/bug31449_3 b/tests/bugs/mesh/bug31449_3 index f77c0646c0..b7dc0cdc22 100644 --- a/tests/bugs/mesh/bug31449_3 +++ b/tests/bugs/mesh/bug31449_3 @@ -14,6 +14,6 @@ XGetOneShape result Q incmesh result 0.00039624 -a 20 -min 0.0001 -parallel -checktrinfo result -tri 7661 -nod 5810 +checktrinfo result -tri 7733 -nod 5882 checkview -display result -3d -path ${imagedir}/${test_image}.png diff --git a/tests/bugs/mesh/bug31865 b/tests/bugs/mesh/bug31865 new file mode 100644 index 0000000000..e9477fdc07 --- /dev/null +++ b/tests/bugs/mesh/bug31865 @@ -0,0 +1,20 @@ +puts "========" +puts "0031865: Mesh - triangulation fails with large deflection values due to unhandled Standard_OutOfRange, BRepMesh_PairOfIndex::Append()" +puts "========" +puts "" + +restore [locate_data_file bug31865.brep] result + +tclean result +incmesh result 0.2 + +vinit +vdefaults -autoTriang 0 +checkview -display result -3d -path ${imagedir}/${test_image}.png + +set log [tricheck result] +if { [llength $log] != 0 } { + puts "Error : Invalid mesh" +} else { + puts "Mesh is OK" +} diff --git a/tests/bugs/modalg_2/bug264_6 b/tests/bugs/modalg_2/bug264_6 index 5285e22da3..08f75e8aa3 100755 --- a/tests/bugs/modalg_2/bug264_6 +++ b/tests/bugs/modalg_2/bug264_6 @@ -15,6 +15,6 @@ vclear isos result 0 triangles result -checktrinfo result -tri 18 -nod 20 +checktrinfo result -tri 20 -nod 22 checkprops result -s 19.2399 checkview -display result -3d -path ${imagedir}/${test_image}.png diff --git a/tests/bugs/modalg_2/bug264_7 b/tests/bugs/modalg_2/bug264_7 index 9197a0b3da..1a03acd2e1 100755 --- a/tests/bugs/modalg_2/bug264_7 +++ b/tests/bugs/modalg_2/bug264_7 @@ -15,6 +15,6 @@ vclear isos result 0 triangles result -checktrinfo result -tri 91 -nod 93 +checktrinfo result -tri 103 -nod 105 checkprops result -s 150.283 checkview -display result -3d -path ${imagedir}/${test_image}.png diff --git a/tests/de_mesh/shape_write_stl/A8 b/tests/de_mesh/shape_write_stl/A8 index b7880923c9..16bf1a7661 100644 --- a/tests/de_mesh/shape_write_stl/A8 +++ b/tests/de_mesh/shape_write_stl/A8 @@ -9,7 +9,7 @@ writestl m $imagedir/${casename} readstl res $imagedir/${casename} file delete $imagedir/${casename} -checktrinfo res -tri 34 -nod 19 +checktrinfo res -tri 36 -nod 20 # Visual check checkview -display res -2d -path ${imagedir}/${test_image}.png diff --git a/tests/hlr/poly_hlr/A3 b/tests/hlr/poly_hlr/A3 index 804241eb90..df6a3bf924 100644 --- a/tests/hlr/poly_hlr/A3 +++ b/tests/hlr/poly_hlr/A3 @@ -4,7 +4,7 @@ puts "=====================================" puts "" set viewname "vbottom" -set length 8.40196 +set length 8.40188 restore [locate_data_file bug27341_hlrsave.brep] a COMPUTE_HLR $viewname $algotype diff --git a/tests/hlr/poly_hlr/C13 b/tests/hlr/poly_hlr/C13 index 6a502fbb74..69067419fd 100644 --- a/tests/hlr/poly_hlr/C13 +++ b/tests/hlr/poly_hlr/C13 @@ -1,5 +1,5 @@ set viewname "vright" -set length 9547.12 +set length 9546.37 testreadstep [locate_data_file bug27341_Assembly_ABS_1_CAD.stp] a COMPUTE_HLR $viewname $algotype diff --git a/tests/hlr/poly_hlr/C15 b/tests/hlr/poly_hlr/C15 index 804df0c48f..a90bd9554c 100644 --- a/tests/hlr/poly_hlr/C15 +++ b/tests/hlr/poly_hlr/C15 @@ -1,5 +1,5 @@ set viewname "vright" -set length 5101.26 +set length 5101.97 testreadstep [locate_data_file bug27341_Assembly_GMS_Kurz_CAD.stp] a COMPUTE_HLR $viewname $algotype diff --git a/tests/hlr/poly_hlr/C20 b/tests/hlr/poly_hlr/C20 index ae4a9db262..14bf820c30 100644 --- a/tests/hlr/poly_hlr/C20 +++ b/tests/hlr/poly_hlr/C20 @@ -1,5 +1,5 @@ set viewname "vright" -set length 1704.86 +set length 1705.48 testreadstep [locate_data_file bug27341_Drehkopf_HSK_Gewinde_R_CAD.stp] a COMPUTE_HLR $viewname $algotype diff --git a/tests/hlr/poly_hlr/C23 b/tests/hlr/poly_hlr/C23 index c1c2ed6118..7651d0d8fa 100644 --- a/tests/hlr/poly_hlr/C23 +++ b/tests/hlr/poly_hlr/C23 @@ -1,5 +1,5 @@ set viewname "vright" -set length 826.794 +set length 829.419 testreadstep [locate_data_file bug27341_KMM_Adapter_CAD.stp] a COMPUTE_HLR $viewname $algotype diff --git a/tests/hlr/poly_hlr/C24 b/tests/hlr/poly_hlr/C24 index 46a0173c34..0ea41a1855 100644 --- a/tests/hlr/poly_hlr/C24 +++ b/tests/hlr/poly_hlr/C24 @@ -1,5 +1,5 @@ set viewname "vright" -set length 217.803 +set length 239.091 testreadstep [locate_data_file bug27341_MZX_01_1_CAD.stp] a COMPUTE_HLR $viewname $algotype diff --git a/tests/hlr/poly_hlr/C3 b/tests/hlr/poly_hlr/C3 index b6806e8256..33f2568bd7 100644 --- a/tests/hlr/poly_hlr/C3 +++ b/tests/hlr/poly_hlr/C3 @@ -1,5 +1,5 @@ set viewname "vright" -set length 3057.35 +set length 3057.09 testreadstep [locate_data_file bug27341_570-DWLNL-40-08-L_131LANG_16VERSATZ_DIN.stp] a COMPUTE_HLR $viewname $algotype diff --git a/tests/hlr/poly_hlr/C6 b/tests/hlr/poly_hlr/C6 index e0ad37efcc..e3077f9d8e 100644 --- a/tests/hlr/poly_hlr/C6 +++ b/tests/hlr/poly_hlr/C6 @@ -1,5 +1,5 @@ set viewname "vright" -set length 2832.09 +set length 2832.15 testreadstep [locate_data_file bug27341_ABS_Grundhalter_CAD.stp] a COMPUTE_HLR $viewname $algotype diff --git a/tests/hlr/poly_hlr/C8 b/tests/hlr/poly_hlr/C8 index 0a1185bbfd..986c7614fe 100644 --- a/tests/hlr/poly_hlr/C8 +++ b/tests/hlr/poly_hlr/C8 @@ -1,5 +1,5 @@ set viewname "vright" -set length 1154.09 +set length 1154.43 testreadstep [locate_data_file bug27341_AWN_Adapter_CAD.stp] a COMPUTE_HLR $viewname $algotype diff --git a/tests/hlr/poly_hlr/bug27979_2 b/tests/hlr/poly_hlr/bug27979_2 index a5df15c581..48132c53ea 100644 --- a/tests/hlr/poly_hlr/bug27979_2 +++ b/tests/hlr/poly_hlr/bug27979_2 @@ -4,7 +4,7 @@ puts "========================================================================" puts "" set viewname "vtop" -set length 13.0106 +set length 13.0091 restore [locate_data_file bug27979_parsed.brep] a COMPUTE_HLR $viewname $algotype From 7eeb5d5fbf15cd589d8d5594e4644ee035bf7721 Mon Sep 17 00:00:00 2001 From: sshutina Date: Mon, 16 May 2022 12:11:15 +0300 Subject: [PATCH 434/639] 0032965: PMIVis - PMIVis_TOT_Vectorized text regressions Added the ability to draw a shaded shape in the required group. --- src/StdPrs/StdPrs_ShadedShape.cxx | 21 ++++++++++++--------- src/StdPrs/StdPrs_ShadedShape.hxx | 4 ++-- 2 files changed, 14 insertions(+), 11 deletions(-) diff --git a/src/StdPrs/StdPrs_ShadedShape.cxx b/src/StdPrs/StdPrs_ShadedShape.cxx index 248b11c87c..fe2f667dba 100644 --- a/src/StdPrs/StdPrs_ShadedShape.cxx +++ b/src/StdPrs/StdPrs_ShadedShape.cxx @@ -275,7 +275,8 @@ namespace const gp_Pnt2d& theUVOrigin, const gp_Pnt2d& theUVRepeat, const gp_Pnt2d& theUVScale, - const bool theIsClosed) + const bool theIsClosed, + const Handle(Graphic3d_Group)& theGroup = NULL) { Handle(Graphic3d_ArrayOfTriangles) aPArray = fillTriangles (theShape, theHasTexels, theUVOrigin, theUVRepeat, theUVScale); if (aPArray.IsNull()) @@ -283,7 +284,7 @@ namespace return Standard_False; } - Handle(Graphic3d_Group) aGroup = thePrs->NewGroup(); + Handle(Graphic3d_Group) aGroup = !theGroup.IsNull() ? theGroup : thePrs->NewGroup(); aGroup->SetClosed (theIsClosed); aGroup->SetGroupPrimitivesAspect (theDrawer->ShadingAspect()->Aspect()); aGroup->AddPrimitiveArray (aPArray); @@ -507,11 +508,12 @@ void StdPrs_ShadedShape::ExploreSolids (const TopoDS_Shape& theShape, void StdPrs_ShadedShape::Add (const Handle(Prs3d_Presentation)& thePrs, const TopoDS_Shape& theShape, const Handle(Prs3d_Drawer)& theDrawer, - const StdPrs_Volume theVolume) + const StdPrs_Volume theVolume, + const Handle(Graphic3d_Group)& theGroup) { gp_Pnt2d aDummy; StdPrs_ShadedShape::Add (thePrs, theShape, theDrawer, - Standard_False, aDummy, aDummy, aDummy, theVolume); + Standard_False, aDummy, aDummy, aDummy, theVolume, theGroup); } // ======================================================================= @@ -525,7 +527,8 @@ void StdPrs_ShadedShape::Add (const Handle (Prs3d_Presentation)& thePrs, const gp_Pnt2d& theUVOrigin, const gp_Pnt2d& theUVRepeat, const gp_Pnt2d& theUVScale, - const StdPrs_Volume theVolume) + const StdPrs_Volume theVolume, + const Handle(Graphic3d_Group)& theGroup) { if (theShape.IsNull()) { @@ -563,13 +566,13 @@ void StdPrs_ShadedShape::Add (const Handle (Prs3d_Presentation)& thePrs, if (aClosed.NbChildren() > 0) { shadeFromShape (aClosed, thePrs, theDrawer, - theHasTexels, theUVOrigin, theUVRepeat, theUVScale, true); + theHasTexels, theUVOrigin, theUVRepeat, theUVScale, true, theGroup); } if (anOpened.NbChildren() > 0) { shadeFromShape (anOpened, thePrs, theDrawer, - theHasTexels, theUVOrigin, theUVRepeat, theUVScale, false); + theHasTexels, theUVOrigin, theUVRepeat, theUVScale, false, theGroup); } } else @@ -577,14 +580,14 @@ void StdPrs_ShadedShape::Add (const Handle (Prs3d_Presentation)& thePrs, // if the shape type is not compound, composolid or solid, use autodetection back-facing filled shadeFromShape (theShape, thePrs, theDrawer, theHasTexels, theUVOrigin, theUVRepeat, theUVScale, - theVolume == StdPrs_Volume_Closed); + theVolume == StdPrs_Volume_Closed, theGroup); } if (theDrawer->FaceBoundaryDraw()) { if (Handle(Graphic3d_ArrayOfSegments) aBndSegments = fillFaceBoundaries (theShape, theDrawer->FaceBoundaryUpperContinuity())) { - Handle(Graphic3d_Group) aPrsGrp = thePrs->NewGroup(); + Handle(Graphic3d_Group) aPrsGrp = !theGroup.IsNull() ? theGroup : thePrs->NewGroup(); aPrsGrp->SetGroupPrimitivesAspect (theDrawer->FaceBoundaryAspect()->Aspect()); aPrsGrp->AddPrimitiveArray (aBndSegments); } diff --git a/src/StdPrs/StdPrs_ShadedShape.hxx b/src/StdPrs/StdPrs_ShadedShape.hxx index 18efa638b7..3752555269 100644 --- a/src/StdPrs/StdPrs_ShadedShape.hxx +++ b/src/StdPrs/StdPrs_ShadedShape.hxx @@ -36,13 +36,13 @@ public: //! @param theVolumeType defines the way how to interpret input shapes - as Closed volumes (to activate back-face //! culling and capping plane algorithms), as Open volumes (shells or solids with holes) //! or to perform Autodetection (would split input shape into two groups) - Standard_EXPORT static void Add (const Handle(Prs3d_Presentation)& thePresentation, const TopoDS_Shape& theShape, const Handle(Prs3d_Drawer)& theDrawer, const StdPrs_Volume theVolume = StdPrs_Volume_Autodetection); + Standard_EXPORT static void Add (const Handle(Prs3d_Presentation)& thePresentation, const TopoDS_Shape& theShape, const Handle(Prs3d_Drawer)& theDrawer, const StdPrs_Volume theVolume = StdPrs_Volume_Autodetection, const Handle(Graphic3d_Group)& theGroup = NULL); //! Shades with texture coordinates. //! @param theVolumeType defines the way how to interpret input shapes - as Closed volumes (to activate back-face //! culling and capping plane algorithms), as Open volumes (shells or solids with holes) //! or to perform Autodetection (would split input shape into two groups) - Standard_EXPORT static void Add (const Handle(Prs3d_Presentation)& thePresentation, const TopoDS_Shape& theShape, const Handle(Prs3d_Drawer)& theDrawer, const Standard_Boolean theHasTexels, const gp_Pnt2d& theUVOrigin, const gp_Pnt2d& theUVRepeat, const gp_Pnt2d& theUVScale, const StdPrs_Volume theVolume = StdPrs_Volume_Autodetection); + Standard_EXPORT static void Add (const Handle(Prs3d_Presentation)& thePresentation, const TopoDS_Shape& theShape, const Handle(Prs3d_Drawer)& theDrawer, const Standard_Boolean theHasTexels, const gp_Pnt2d& theUVOrigin, const gp_Pnt2d& theUVRepeat, const gp_Pnt2d& theUVScale, const StdPrs_Volume theVolume = StdPrs_Volume_Autodetection, const Handle(Graphic3d_Group)& theGroup = NULL); //! Searches closed and unclosed subshapes in shape structure and puts them //! into two compounds for separate processing of closed and unclosed sub-shapes From 62f554bc3f1543c6691fedb7cda751f7f9ec894b Mon Sep 17 00:00:00 2001 From: dpasukhi Date: Tue, 29 Nov 2022 09:36:58 +0000 Subject: [PATCH 435/639] 0033228: Data Exchange, DE Wrapper - Make the document argument of the method Read const handle Rewrite document argument for DE_Wrapper Read method --- src/DE/DE_Wrapper.cxx | 4 ++-- src/DE/DE_Wrapper.hxx | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/DE/DE_Wrapper.cxx b/src/DE/DE_Wrapper.cxx index c9f5b06517..59ce5cb0d6 100644 --- a/src/DE/DE_Wrapper.cxx +++ b/src/DE/DE_Wrapper.cxx @@ -81,7 +81,7 @@ Handle(DE_Wrapper) DE_Wrapper::GlobalWrapper() // purpose : //======================================================================= Standard_Boolean DE_Wrapper::Read(const TCollection_AsciiString& thePath, - Handle(TDocStd_Document)& theDocument, + const Handle(TDocStd_Document)& theDocument, Handle(XSControl_WorkSession)& theWS, const Message_ProgressRange& theProgress) { @@ -131,7 +131,7 @@ Standard_Boolean DE_Wrapper::Write(const TCollection_AsciiString& thePath, // purpose : //======================================================================= Standard_Boolean DE_Wrapper::Read(const TCollection_AsciiString& thePath, - Handle(TDocStd_Document)& theDocument, + const Handle(TDocStd_Document)& theDocument, const Message_ProgressRange& theProgress) { if (theDocument.IsNull()) diff --git a/src/DE/DE_Wrapper.hxx b/src/DE/DE_Wrapper.hxx index 030153a48d..b0e4471871 100644 --- a/src/DE/DE_Wrapper.hxx +++ b/src/DE/DE_Wrapper.hxx @@ -74,7 +74,7 @@ public: //! @param theProgress[in] progress indicator //! @return true if Read operation has ended correctly Standard_EXPORT Standard_Boolean Read(const TCollection_AsciiString& thePath, - Handle(TDocStd_Document)& theDocument, + const Handle(TDocStd_Document)& theDocument, Handle(XSControl_WorkSession)& theWS, const Message_ProgressRange& theProgress = Message_ProgressRange()); @@ -95,7 +95,7 @@ public: //! @param theProgress[in] progress indicator //! @return true if Read operation has ended correctly Standard_EXPORT Standard_Boolean Read(const TCollection_AsciiString& thePath, - Handle(TDocStd_Document)& theDocument, + const Handle(TDocStd_Document)& theDocument, const Message_ProgressRange& theProgress = Message_ProgressRange()); //! Writes a CAD file, according internal configuration From 6cc679d81cae13ac4af2a05125afaa0d9ee2feae Mon Sep 17 00:00:00 2001 From: dpasukhi Date: Tue, 29 Nov 2022 14:38:48 +0000 Subject: [PATCH 436/639] 0033230: Data Exchange, DE Wrapper - Update API to find CAD provider Moved FindProvider method to public section Made FindProvider as virtual to make it possible to overwrite. --- src/DE/DE_Wrapper.cxx | 20 ++++++++++---------- src/DE/DE_Wrapper.hxx | 20 ++++++++++---------- 2 files changed, 20 insertions(+), 20 deletions(-) diff --git a/src/DE/DE_Wrapper.cxx b/src/DE/DE_Wrapper.cxx index 59ce5cb0d6..33bbfc8f9d 100644 --- a/src/DE/DE_Wrapper.cxx +++ b/src/DE/DE_Wrapper.cxx @@ -94,7 +94,7 @@ Standard_Boolean DE_Wrapper::Read(const TCollection_AsciiString& thePath, return Read(thePath, theDocument, theProgress); } Handle(DE_Provider) aProvider; - if (!findProvider(thePath, Standard_True, aProvider)) + if (!FindProvider(thePath, Standard_True, aProvider)) { return Standard_False; } @@ -119,7 +119,7 @@ Standard_Boolean DE_Wrapper::Write(const TCollection_AsciiString& thePath, return Write(thePath, theDocument, theProgress); } Handle(DE_Provider) aProvider; - if (!findProvider(thePath, Standard_False, aProvider)) + if (!FindProvider(thePath, Standard_False, aProvider)) { return Standard_False; } @@ -139,7 +139,7 @@ Standard_Boolean DE_Wrapper::Read(const TCollection_AsciiString& thePath, return Standard_False; } Handle(DE_Provider) aProvider; - if (!findProvider(thePath, Standard_True, aProvider)) + if (!FindProvider(thePath, Standard_True, aProvider)) { return Standard_False; } @@ -159,7 +159,7 @@ Standard_Boolean DE_Wrapper::Write(const TCollection_AsciiString& thePath, return Standard_False; } Handle(DE_Provider) aProvider; - if (!findProvider(thePath, Standard_False, aProvider)) + if (!FindProvider(thePath, Standard_False, aProvider)) { return Standard_False; } @@ -180,7 +180,7 @@ Standard_Boolean DE_Wrapper::Read(const TCollection_AsciiString& thePath, return Read(thePath, theShape, theProgress); } Handle(DE_Provider) aProvider; - if (!findProvider(thePath, Standard_True, aProvider)) + if (!FindProvider(thePath, Standard_True, aProvider)) { return Standard_False; } @@ -201,7 +201,7 @@ Standard_Boolean DE_Wrapper::Write(const TCollection_AsciiString& thePath, return Write(thePath, theShape, theProgress); } Handle(DE_Provider) aProvider; - if (!findProvider(thePath, Standard_False, aProvider)) + if (!FindProvider(thePath, Standard_False, aProvider)) { return Standard_False; } @@ -218,7 +218,7 @@ Standard_Boolean DE_Wrapper::Read(const TCollection_AsciiString& thePath, { Handle(DE_Provider) aProvider; - if (!findProvider(thePath, Standard_True, aProvider)) + if (!FindProvider(thePath, Standard_True, aProvider)) { return Standard_False; } @@ -234,7 +234,7 @@ Standard_Boolean DE_Wrapper::Write(const TCollection_AsciiString& thePath, const Message_ProgressRange& theProgress) { Handle(DE_Provider) aProvider; - if (!findProvider(thePath, Standard_False, aProvider)) + if (!FindProvider(thePath, Standard_False, aProvider)) { return Standard_False; } @@ -482,10 +482,10 @@ Handle(DE_Wrapper) DE_Wrapper::Copy() const } //======================================================================= -// function : findProvider +// function : FindProvider // purpose : //======================================================================= -Standard_Boolean DE_Wrapper::findProvider(const TCollection_AsciiString& thePath, +Standard_Boolean DE_Wrapper::FindProvider(const TCollection_AsciiString& thePath, const Standard_Boolean theToImport, Handle(DE_Provider)& theProvider) const { diff --git a/src/DE/DE_Wrapper.hxx b/src/DE/DE_Wrapper.hxx index b0e4471871..de57c83051 100644 --- a/src/DE/DE_Wrapper.hxx +++ b/src/DE/DE_Wrapper.hxx @@ -211,6 +211,16 @@ public: Standard_EXPORT void ChangePriority(const TColStd_ListOfAsciiString& theVendorPriority, const Standard_Boolean theToDisable = Standard_False); + //! Find available provider from the configuration. + //! If there are several providers, choose the one with the highest priority. + //! @param[in] thePath path to the CAD file + //! @param[in] theToImport flag to finds for import. Standard_True-import, Standard_False-export + //! @param[out] theProvider created new provider + //! @return Standard_True if provider found and created + Standard_EXPORT virtual Standard_Boolean FindProvider(const TCollection_AsciiString& thePath, + const Standard_Boolean theToImport, + Handle(DE_Provider)& theProvider) const; + //! Gets format map, contains vendor map with nodes //! @return internal map of formats Standard_EXPORT const DE_ConfigurationFormatMap& Nodes() const; @@ -227,16 +237,6 @@ protected: //! @param[in] theResource resource to get priority void sort(const Handle(DE_ConfigurationContext)& theResource); - //! Find available provider from the configuration. - //! If there are several providers, choose the one with the highest priority. - //! @param[in] thePath path to the CAD file - //! @param[in] theToImport flag to finds for import. Standard_True-import, Standard_False-export - //! @param[out] theProvider created new provider - //! @return Standard_True if provider found and created - Standard_Boolean findProvider(const TCollection_AsciiString& thePath, - const Standard_Boolean theToImport, - Handle(DE_Provider)& theProvider) const; - public: DE_ConfigurationNode::DE_SectionGlobal GlobalParameters; //!< Internal parameters for the all translators From c07f4ee70d93cd8cf1b09e75940c2a5e96848464 Mon Sep 17 00:00:00 2001 From: dpasukhi Date: Tue, 29 Nov 2022 15:43:56 +0000 Subject: [PATCH 437/639] 0033232: Data Exchange, DE_Wrapper - Implement ability to change global session Add ability to set/get global session --- src/DE/DE_Wrapper.cxx | 22 ++++++++++++++++++++-- src/DE/DE_Wrapper.hxx | 9 +++++++-- 2 files changed, 27 insertions(+), 4 deletions(-) diff --git a/src/DE/DE_Wrapper.cxx b/src/DE/DE_Wrapper.cxx index 33bbfc8f9d..b22c5b7d80 100644 --- a/src/DE/DE_Wrapper.cxx +++ b/src/DE/DE_Wrapper.cxx @@ -34,6 +34,9 @@ namespace static const TCollection_AsciiString aScope ("global"); return aScope; } + + //! Global configuration of current DE Session + static Handle(DE_Wrapper) THE_GLOBAL_CONFIGURATION; } //======================================================================= @@ -72,8 +75,23 @@ DE_Wrapper::DE_Wrapper(const Handle(DE_Wrapper)& theWrapper) //======================================================================= Handle(DE_Wrapper) DE_Wrapper::GlobalWrapper() { - static const Handle(DE_Wrapper)& aConfiguration = new DE_Wrapper(); - return aConfiguration; + if (THE_GLOBAL_CONFIGURATION.IsNull()) + { + THE_GLOBAL_CONFIGURATION = new DE_Wrapper(); + } + return THE_GLOBAL_CONFIGURATION; +} + +//======================================================================= +// function : SetGlobalWrapper +// purpose : +//======================================================================= +void DE_Wrapper::SetGlobalWrapper(const Handle(DE_Wrapper)& theWrapper) +{ + if (!theWrapper.IsNull()) + { + THE_GLOBAL_CONFIGURATION = theWrapper; + } } //======================================================================= diff --git a/src/DE/DE_Wrapper.hxx b/src/DE/DE_Wrapper.hxx index de57c83051..98587aa7d5 100644 --- a/src/DE/DE_Wrapper.hxx +++ b/src/DE/DE_Wrapper.hxx @@ -61,10 +61,15 @@ public: //! @param[in] theWrapper object to copy Standard_EXPORT DE_Wrapper(const Handle(DE_Wrapper)& theWrapper); - //! Gets global configuration singleton + //! Gets global configuration singleton. + //! If wrapper is not set, create it by default as base class object. //! @return point to global configuration Standard_EXPORT static Handle(DE_Wrapper) GlobalWrapper(); + //! Sets global configuration singleton + //! @param[in] theWrapper object to set as global configuration + Standard_EXPORT static void SetGlobalWrapper(const Handle(DE_Wrapper)& theWrapper); + public: //! Reads a CAD file, according internal configuration @@ -227,7 +232,7 @@ public: //! Copies values of all fields //! @return new object with the same field values - Standard_EXPORT Handle(DE_Wrapper) Copy() const; + Standard_EXPORT virtual Handle(DE_Wrapper) Copy() const; protected: From 7ea3eff4f88640ca23e5b1a6dad82ab4fda4a8c6 Mon Sep 17 00:00:00 2001 From: stv Date: Thu, 24 Nov 2022 12:48:22 +0300 Subject: [PATCH 438/639] 0033218: Data Exchange - XCAFPrs_Texture not allow to use classes inherited from Image_Texture Type of field XCAFPrs_Texture::myImageSource was changed from Image_Texture to Handle(Image_Texture) --- src/XCAFDoc/XCAFDoc_VisMaterial.cxx | 10 +++++----- src/XCAFPrs/XCAFPrs_Texture.cxx | 16 ++++++++++------ src/XCAFPrs/XCAFPrs_Texture.hxx | 9 ++++----- 3 files changed, 19 insertions(+), 16 deletions(-) diff --git a/src/XCAFDoc/XCAFDoc_VisMaterial.cxx b/src/XCAFDoc/XCAFDoc_VisMaterial.cxx index 9e223b9f51..37dd94f403 100644 --- a/src/XCAFDoc/XCAFDoc_VisMaterial.cxx +++ b/src/XCAFDoc/XCAFDoc_VisMaterial.cxx @@ -294,23 +294,23 @@ void XCAFDoc_VisMaterial::FillAspect (const Handle(Graphic3d_Aspects)& theAspect Handle(Graphic3d_TextureSet) aTextureSet = new Graphic3d_TextureSet (aNbTexUnits); if (!aColorTexture.IsNull()) { - aTextureSet->SetValue (aTexIter++, new XCAFPrs_Texture (*aColorTexture, Graphic3d_TextureUnit_BaseColor)); + aTextureSet->SetValue (aTexIter++, new XCAFPrs_Texture (aColorTexture, Graphic3d_TextureUnit_BaseColor)); } if (!myPbrMat.EmissiveTexture.IsNull()) { - aTextureSet->SetValue (aTexIter++, new XCAFPrs_Texture (*myPbrMat.EmissiveTexture, Graphic3d_TextureUnit_Emissive)); + aTextureSet->SetValue (aTexIter++, new XCAFPrs_Texture (myPbrMat.EmissiveTexture, Graphic3d_TextureUnit_Emissive)); } if (!myPbrMat.OcclusionTexture.IsNull()) { - aTextureSet->SetValue (aTexIter++, new XCAFPrs_Texture (*myPbrMat.OcclusionTexture, Graphic3d_TextureUnit_Occlusion)); + aTextureSet->SetValue (aTexIter++, new XCAFPrs_Texture (myPbrMat.OcclusionTexture, Graphic3d_TextureUnit_Occlusion)); } if (!myPbrMat.NormalTexture.IsNull()) { - aTextureSet->SetValue (aTexIter++, new XCAFPrs_Texture (*myPbrMat.NormalTexture, Graphic3d_TextureUnit_Normal)); + aTextureSet->SetValue (aTexIter++, new XCAFPrs_Texture (myPbrMat.NormalTexture, Graphic3d_TextureUnit_Normal)); } if (!myPbrMat.MetallicRoughnessTexture.IsNull()) { - aTextureSet->SetValue (aTexIter++, new XCAFPrs_Texture (*myPbrMat.MetallicRoughnessTexture, Graphic3d_TextureUnit_MetallicRoughness)); + aTextureSet->SetValue (aTexIter++, new XCAFPrs_Texture (myPbrMat.MetallicRoughnessTexture, Graphic3d_TextureUnit_MetallicRoughness)); } theAspect->SetTextureSet (aTextureSet); diff --git a/src/XCAFPrs/XCAFPrs_Texture.cxx b/src/XCAFPrs/XCAFPrs_Texture.cxx index 178e28b7b1..f917c16f01 100644 --- a/src/XCAFPrs/XCAFPrs_Texture.cxx +++ b/src/XCAFPrs/XCAFPrs_Texture.cxx @@ -21,14 +21,14 @@ IMPLEMENT_STANDARD_RTTIEXT(XCAFPrs_Texture, Graphic3d_Texture2D) //function : XCAFPrs_Texture //purpose : //======================================================================= -XCAFPrs_Texture::XCAFPrs_Texture (const Image_Texture& theImageSource, +XCAFPrs_Texture::XCAFPrs_Texture (const Handle(Image_Texture)& theImageSource, const Graphic3d_TextureUnit theUnit) : Graphic3d_Texture2D (""), myImageSource (theImageSource) { - if (!myImageSource.TextureId().IsEmpty()) + if (!myImageSource.IsNull() && !myImageSource->TextureId().IsEmpty()) { - myTexId = myImageSource.TextureId(); + myTexId = myImageSource->TextureId(); } myParams->SetTextureUnit (theUnit); myIsColorMap = theUnit == Graphic3d_TextureUnit_BaseColor @@ -41,7 +41,7 @@ XCAFPrs_Texture::XCAFPrs_Texture (const Image_Texture& theImageSource, //======================================================================= Handle(Image_CompressedPixMap) XCAFPrs_Texture::GetCompressedImage (const Handle(Image_SupportedFormats)& theSupported) { - return myImageSource.ReadCompressedImage (theSupported); + return !myImageSource.IsNull() ? myImageSource->ReadCompressedImage (theSupported) : Handle(Image_CompressedPixMap)(); } //======================================================================= @@ -50,7 +50,11 @@ Handle(Image_CompressedPixMap) XCAFPrs_Texture::GetCompressedImage (const Handle //======================================================================= Handle(Image_PixMap) XCAFPrs_Texture::GetImage (const Handle(Image_SupportedFormats)& theSupported) { - Handle(Image_PixMap) anImage = myImageSource.ReadImage (theSupported); - convertToCompatible (theSupported, anImage); + Handle(Image_PixMap) anImage; + if (!myImageSource.IsNull()) + { + anImage = myImageSource->ReadImage(theSupported); + convertToCompatible(theSupported, anImage); + } return anImage; } diff --git a/src/XCAFPrs/XCAFPrs_Texture.hxx b/src/XCAFPrs/XCAFPrs_Texture.hxx index 8c86b52625..d0742d772d 100644 --- a/src/XCAFPrs/XCAFPrs_Texture.hxx +++ b/src/XCAFPrs/XCAFPrs_Texture.hxx @@ -27,8 +27,8 @@ class XCAFPrs_Texture : public Graphic3d_Texture2D public: //! Constructor. - Standard_EXPORT explicit XCAFPrs_Texture (const Image_Texture& theImageSource, - const Graphic3d_TextureUnit theUnit); + Standard_EXPORT XCAFPrs_Texture (const Handle(Image_Texture)& theImageSource, + const Graphic3d_TextureUnit theUnit); //! Image reader. Standard_EXPORT virtual Handle(Image_CompressedPixMap) GetCompressedImage (const Handle(Image_SupportedFormats)& theSupported) Standard_OVERRIDE; @@ -37,12 +37,11 @@ public: Standard_EXPORT virtual Handle(Image_PixMap) GetImage (const Handle(Image_SupportedFormats)& theSupported) Standard_OVERRIDE; //! Return image source. - const Image_Texture& GetImageSource() const { return myImageSource; } + const Handle(Image_Texture)& GetImageSource() const { return myImageSource; } protected: - Image_Texture myImageSource; - + Handle(Image_Texture) myImageSource; }; #endif // _XCAFPrs_Texture_HeaderFile From 2a8c5ad46cfef8114b13c3a33dcd88a81e522c1e Mon Sep 17 00:00:00 2001 From: dpasukhi Date: Fri, 2 Dec 2022 16:08:06 +0000 Subject: [PATCH 439/639] 0033250: Configuration - Missing Limits header file Added new include limits to fix build problem --- src/ViewerTest/ViewerTest_CmdParser.cxx | 1 + 1 file changed, 1 insertion(+) diff --git a/src/ViewerTest/ViewerTest_CmdParser.cxx b/src/ViewerTest/ViewerTest_CmdParser.cxx index 04cb7d4b1c..a8619da144 100644 --- a/src/ViewerTest/ViewerTest_CmdParser.cxx +++ b/src/ViewerTest/ViewerTest_CmdParser.cxx @@ -21,6 +21,7 @@ #include #include +#include namespace { From 768f3a4a19a649f05a3f678ea7229ee69d832bc1 Mon Sep 17 00:00:00 2001 From: dpasukhi Date: Tue, 29 Nov 2022 21:27:40 +0000 Subject: [PATCH 440/639] 0033235: Configuration - Solving the problem with static building of ExpToCasExe Added new dependency to ExpToCasExe - CSF_wsock32 (on Win only) --- src/ExpToCasExe/EXTERNLIB | 1 + 1 file changed, 1 insertion(+) diff --git a/src/ExpToCasExe/EXTERNLIB b/src/ExpToCasExe/EXTERNLIB index 9a5a7e59c4..9f6ca33640 100644 --- a/src/ExpToCasExe/EXTERNLIB +++ b/src/ExpToCasExe/EXTERNLIB @@ -1,2 +1,3 @@ TKernel TKExpress +CSF_wsock32 From 74cb5673a563eca1d90f7b3ff20993dfcce1078e Mon Sep 17 00:00:00 2001 From: nunomsil Date: Wed, 7 Dec 2022 14:45:36 +0000 Subject: [PATCH 441/639] 0031919: Modeling Algorithms - General Fuse raises exception on attempt to imprint a contour to a shell Exception no longer occurs in current version. However, fuzzyvalue should be set to 1 for the result of the operation to make sense (result of common is 1 wire). Test case added --- tests/bugs/modalg_8/bug31919 | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 tests/bugs/modalg_8/bug31919 diff --git a/tests/bugs/modalg_8/bug31919 b/tests/bugs/modalg_8/bug31919 new file mode 100644 index 0000000000..31d5c0ef6c --- /dev/null +++ b/tests/bugs/modalg_8/bug31919 @@ -0,0 +1,17 @@ +puts "=============================================================================================" +puts "0031919: Modeling Algorithms - General Fuse raises ex-ception on attempt to imprint a contour to a shell" +puts "=============================================================================================" +puts "" + +pload ALL +restore [locate_data_file bug31919_Body.brep] body +restore [locate_data_file bug31919_Contour.brep] contour +bclearobjects +bcleartools +baddobjects body +baddtools contour +bfuzzyvalue 1 +bfillds +bbop res 0 + +checknbshapes res -wire 1 From 669e0dfc17e55a4188d45f1bb810a6324a6bf432 Mon Sep 17 00:00:00 2001 From: dpasukhi Date: Fri, 2 Dec 2022 09:14:38 +0000 Subject: [PATCH 442/639] 0033246: Data Exchange, DE Wrapper - Checking license leads to performance problem ReWork UpdateLoad functionality: UpdateLoad calls only if provider is found. UpdateLoad calls only for chosen type of translation (read/write) Add new method to UpdateLoad all registered nodes. --- src/DE/DE_ConfigurationNode.cxx | 5 +++- src/DE/DE_ConfigurationNode.hxx | 7 +++-- src/DE/DE_Wrapper.cxx | 28 +++++++++++++++++-- src/DE/DE_Wrapper.hxx | 11 ++++++++ .../DEBRepCascade_ConfigurationNode.cxx | 5 +--- .../DEXCAFCascade_ConfigurationNode.cxx | 5 +--- .../IGESCAFControl_ConfigurationNode.cxx | 5 +--- src/RWGltf/RWGltf_ConfigurationNode.cxx | 5 +--- src/RWObj/RWObj_ConfigurationNode.cxx | 5 +--- src/RWPly/RWPly_ConfigurationNode.cxx | 5 +--- src/RWStl/RWStl_ConfigurationNode.cxx | 5 +--- .../STEPCAFControl_ConfigurationNode.cxx | 8 ++---- src/Vrml/Vrml_ConfigurationNode.cxx | 5 +--- 13 files changed, 56 insertions(+), 43 deletions(-) diff --git a/src/DE/DE_ConfigurationNode.cxx b/src/DE/DE_ConfigurationNode.cxx index 4ebd69e49b..2d978fc71a 100644 --- a/src/DE/DE_ConfigurationNode.cxx +++ b/src/DE/DE_ConfigurationNode.cxx @@ -88,8 +88,11 @@ bool DE_ConfigurationNode::Save(const TCollection_AsciiString& theResourcePath) // function : UpdateLoad // purpose : //======================================================================= -bool DE_ConfigurationNode::UpdateLoad() +bool DE_ConfigurationNode::UpdateLoad(const Standard_Boolean theToImport, + const Standard_Boolean theToKeep) { + (void)theToImport; + (void)theToKeep; return true; } diff --git a/src/DE/DE_ConfigurationNode.hxx b/src/DE/DE_ConfigurationNode.hxx index 3798dc3b35..0f48ac5e55 100644 --- a/src/DE/DE_ConfigurationNode.hxx +++ b/src/DE/DE_ConfigurationNode.hxx @@ -85,9 +85,12 @@ public: //! @return new object with the same field values Standard_EXPORT virtual Handle(DE_ConfigurationNode) Copy() const = 0; - //! Update loading status. Checking for the license. + //! Update loading status. Checking for the ability to read and write. + //! @param[in] theToImport flag to updates for import. Standard_True-import, Standard_False-export + //! @param[in] theToKeep flag to save update result //! @return Standard_True, if node can be used - Standard_EXPORT virtual bool UpdateLoad(); + Standard_EXPORT virtual bool UpdateLoad(const Standard_Boolean theToImport, + const Standard_Boolean theToKeep); public: diff --git a/src/DE/DE_Wrapper.cxx b/src/DE/DE_Wrapper.cxx index b22c5b7d80..091fde72d6 100644 --- a/src/DE/DE_Wrapper.cxx +++ b/src/DE/DE_Wrapper.cxx @@ -44,6 +44,7 @@ namespace // purpose : //======================================================================= DE_Wrapper::DE_Wrapper() + :myKeepUpdates(Standard_False) {} //======================================================================= @@ -67,6 +68,7 @@ DE_Wrapper::DE_Wrapper(const Handle(DE_Wrapper)& theWrapper) Bind(aVendorIter.Value()); } } + theWrapper->myKeepUpdates = myKeepUpdates; } //======================================================================= @@ -445,7 +447,6 @@ void DE_Wrapper::ChangePriority(const TCollection_AsciiString& theFormat, if (aVendorMap.FindFromKey(aVendorName, aNode)) { aNode->SetEnabled(Standard_True); - aNode->UpdateLoad(); aNewVendorMap.Add(aVendorName, aNode); } } @@ -532,7 +533,8 @@ Standard_Boolean DE_Wrapper::FindProvider(const TCollection_AsciiString& thePath ((theToImport && aNode->IsImportSupported()) || (!theToImport && aNode->IsExportSupported())) && (aNode->CheckExtension(anExtr) || - (theToImport && aNode->CheckContent(aBuffer)))) + (theToImport && aNode->CheckContent(aBuffer))) && + aNode->UpdateLoad(theToImport, myKeepUpdates)) { theProvider = aNode->BuildProvider(); aNode->GlobalParameters = GlobalParameters; @@ -544,6 +546,28 @@ Standard_Boolean DE_Wrapper::FindProvider(const TCollection_AsciiString& thePath return Standard_False; } +//======================================================================= +// function : UpdateLoad +// purpose : +//======================================================================= +Standard_EXPORT void DE_Wrapper::UpdateLoad(const Standard_Boolean theToForceUpdate) const +{ + for (DE_ConfigurationFormatMap::Iterator aFormatIter(myConfiguration); + aFormatIter.More(); aFormatIter.Next()) + { + for (DE_ConfigurationVendorMap::Iterator aVendorIter(aFormatIter.Value()); + aVendorIter.More(); aVendorIter.Next()) + { + const Handle(DE_ConfigurationNode)& aNode = aVendorIter.Value(); + aNode->UpdateLoad(Standard_True, Standard_True); + aNode->UpdateLoad(Standard_False, Standard_True); + if (!theToForceUpdate) + continue; + aNode->SetEnabled(aNode->IsExportSupported() || aNode->IsImportSupported()); + } + } +} + //======================================================================= // function : sort // purpose : diff --git a/src/DE/DE_Wrapper.hxx b/src/DE/DE_Wrapper.hxx index 98587aa7d5..eb5fedb91e 100644 --- a/src/DE/DE_Wrapper.hxx +++ b/src/DE/DE_Wrapper.hxx @@ -226,6 +226,16 @@ public: const Standard_Boolean theToImport, Handle(DE_Provider)& theProvider) const; + //! Updates all registered nodes, all changes will be saved in nodes + //! @param[in] theToForceUpdate flag that turns on/of nodes, according to updated ability to import/export + Standard_EXPORT void UpdateLoad(const Standard_Boolean theToForceUpdate = Standard_False) const; + + //! Gets flag that keeps changes on configuration nodes which are being updated, false by default + Standard_Boolean KeepUpdates() const { return myKeepUpdates; } + + //! Sets flag that keeps changes on configuration nodes which are being updated, false by default + void SetKeepUpdates(const Standard_Boolean theToKeepUpdates) { myKeepUpdates = theToKeepUpdates; } + //! Gets format map, contains vendor map with nodes //! @return internal map of formats Standard_EXPORT const DE_ConfigurationFormatMap& Nodes() const; @@ -248,6 +258,7 @@ public: private: + Standard_Boolean myKeepUpdates; //!< Flag that keeps changes on configuration nodes which are being updated DE_ConfigurationFormatMap myConfiguration; //!< Internal map of formats }; diff --git a/src/DEBRepCascade/DEBRepCascade_ConfigurationNode.cxx b/src/DEBRepCascade/DEBRepCascade_ConfigurationNode.cxx index 6a5234c1d3..ac23714a9e 100644 --- a/src/DEBRepCascade/DEBRepCascade_ConfigurationNode.cxx +++ b/src/DEBRepCascade/DEBRepCascade_ConfigurationNode.cxx @@ -34,9 +34,7 @@ namespace //======================================================================= DEBRepCascade_ConfigurationNode::DEBRepCascade_ConfigurationNode() : DE_ConfigurationNode() -{ - UpdateLoad(); -} +{} //======================================================================= // function : DEBRepCascade_ConfigurationNode @@ -46,7 +44,6 @@ DEBRepCascade_ConfigurationNode::DEBRepCascade_ConfigurationNode(const Handle(DE :DE_ConfigurationNode(theNode) { InternalParameters = theNode->InternalParameters; - UpdateLoad(); } //======================================================================= diff --git a/src/DEXCAFCascade/DEXCAFCascade_ConfigurationNode.cxx b/src/DEXCAFCascade/DEXCAFCascade_ConfigurationNode.cxx index e666a3c188..4f91e2d0ba 100644 --- a/src/DEXCAFCascade/DEXCAFCascade_ConfigurationNode.cxx +++ b/src/DEXCAFCascade/DEXCAFCascade_ConfigurationNode.cxx @@ -34,9 +34,7 @@ namespace //======================================================================= DEXCAFCascade_ConfigurationNode::DEXCAFCascade_ConfigurationNode() : DE_ConfigurationNode() -{ - UpdateLoad(); -} +{} //======================================================================= // function : DEXCAFCascade_ConfigurationNode @@ -46,7 +44,6 @@ DEXCAFCascade_ConfigurationNode::DEXCAFCascade_ConfigurationNode(const Handle(DE :DE_ConfigurationNode(theNode) { InternalParameters = theNode->InternalParameters; - UpdateLoad(); } //======================================================================= diff --git a/src/IGESCAFControl/IGESCAFControl_ConfigurationNode.cxx b/src/IGESCAFControl/IGESCAFControl_ConfigurationNode.cxx index 51956d9db6..68f5312c43 100644 --- a/src/IGESCAFControl/IGESCAFControl_ConfigurationNode.cxx +++ b/src/IGESCAFControl/IGESCAFControl_ConfigurationNode.cxx @@ -34,9 +34,7 @@ namespace //======================================================================= IGESCAFControl_ConfigurationNode::IGESCAFControl_ConfigurationNode() : DE_ConfigurationNode() -{ - UpdateLoad(); -} +{} //======================================================================= // function : IGESCAFControl_ConfigurationNode @@ -46,7 +44,6 @@ IGESCAFControl_ConfigurationNode::IGESCAFControl_ConfigurationNode(const Handle( :DE_ConfigurationNode(theNode) { InternalParameters = theNode->InternalParameters; - UpdateLoad(); } //======================================================================= diff --git a/src/RWGltf/RWGltf_ConfigurationNode.cxx b/src/RWGltf/RWGltf_ConfigurationNode.cxx index ad42b0c958..28ce153cbc 100644 --- a/src/RWGltf/RWGltf_ConfigurationNode.cxx +++ b/src/RWGltf/RWGltf_ConfigurationNode.cxx @@ -33,9 +33,7 @@ namespace //======================================================================= RWGltf_ConfigurationNode::RWGltf_ConfigurationNode() : DE_ConfigurationNode() -{ - UpdateLoad(); -} +{} //======================================================================= // function : RWGltf_ConfigurationNode @@ -45,7 +43,6 @@ RWGltf_ConfigurationNode::RWGltf_ConfigurationNode(const Handle(RWGltf_Configura :DE_ConfigurationNode(theNode) { InternalParameters = theNode->InternalParameters; - UpdateLoad(); } //======================================================================= diff --git a/src/RWObj/RWObj_ConfigurationNode.cxx b/src/RWObj/RWObj_ConfigurationNode.cxx index f860d800cf..94b6b1d4d8 100644 --- a/src/RWObj/RWObj_ConfigurationNode.cxx +++ b/src/RWObj/RWObj_ConfigurationNode.cxx @@ -33,9 +33,7 @@ namespace //======================================================================= RWObj_ConfigurationNode::RWObj_ConfigurationNode() : DE_ConfigurationNode() -{ - UpdateLoad(); -} +{} //======================================================================= // function : RWObj_ConfigurationNode @@ -45,7 +43,6 @@ RWObj_ConfigurationNode::RWObj_ConfigurationNode(const Handle(RWObj_Configuratio :DE_ConfigurationNode(theNode) { InternalParameters = theNode->InternalParameters; - UpdateLoad(); } //======================================================================= diff --git a/src/RWPly/RWPly_ConfigurationNode.cxx b/src/RWPly/RWPly_ConfigurationNode.cxx index ecd16f4bbb..fb978975f6 100644 --- a/src/RWPly/RWPly_ConfigurationNode.cxx +++ b/src/RWPly/RWPly_ConfigurationNode.cxx @@ -27,9 +27,7 @@ static const TCollection_AsciiString THE_CONFIGURATION_SCOPE = "provider"; //======================================================================= RWPly_ConfigurationNode::RWPly_ConfigurationNode() : DE_ConfigurationNode() -{ - UpdateLoad(); -} +{} //======================================================================= // function : RWPly_ConfigurationNode @@ -39,7 +37,6 @@ RWPly_ConfigurationNode::RWPly_ConfigurationNode(const Handle(RWPly_Configuratio :DE_ConfigurationNode(theNode) { InternalParameters = theNode->InternalParameters; - UpdateLoad(); } //======================================================================= diff --git a/src/RWStl/RWStl_ConfigurationNode.cxx b/src/RWStl/RWStl_ConfigurationNode.cxx index edc4c13aad..990f24c737 100644 --- a/src/RWStl/RWStl_ConfigurationNode.cxx +++ b/src/RWStl/RWStl_ConfigurationNode.cxx @@ -34,9 +34,7 @@ namespace //======================================================================= RWStl_ConfigurationNode::RWStl_ConfigurationNode() : DE_ConfigurationNode() -{ - UpdateLoad(); -} +{} //======================================================================= // function : STEPCAFControl_ConfigurationNode @@ -46,7 +44,6 @@ RWStl_ConfigurationNode::RWStl_ConfigurationNode(const Handle(RWStl_Configuratio :DE_ConfigurationNode(theNode) { InternalParameters = theNode->InternalParameters; - UpdateLoad(); } //======================================================================= diff --git a/src/STEPCAFControl/STEPCAFControl_ConfigurationNode.cxx b/src/STEPCAFControl/STEPCAFControl_ConfigurationNode.cxx index 5405ec67bd..588c18deba 100644 --- a/src/STEPCAFControl/STEPCAFControl_ConfigurationNode.cxx +++ b/src/STEPCAFControl/STEPCAFControl_ConfigurationNode.cxx @@ -34,9 +34,7 @@ namespace //======================================================================= STEPCAFControl_ConfigurationNode::STEPCAFControl_ConfigurationNode() : DE_ConfigurationNode() -{ - UpdateLoad(); -} +{} //======================================================================= // function : STEPCAFControl_ConfigurationNode @@ -45,9 +43,7 @@ STEPCAFControl_ConfigurationNode::STEPCAFControl_ConfigurationNode() : STEPCAFControl_ConfigurationNode::STEPCAFControl_ConfigurationNode(const Handle(STEPCAFControl_ConfigurationNode)& theNode) :DE_ConfigurationNode(theNode), InternalParameters(theNode->InternalParameters) -{ - UpdateLoad(); -} +{} //======================================================================= // function : Load diff --git a/src/Vrml/Vrml_ConfigurationNode.cxx b/src/Vrml/Vrml_ConfigurationNode.cxx index 97c729d6f9..6cb9de24b2 100644 --- a/src/Vrml/Vrml_ConfigurationNode.cxx +++ b/src/Vrml/Vrml_ConfigurationNode.cxx @@ -33,9 +33,7 @@ namespace //======================================================================= Vrml_ConfigurationNode::Vrml_ConfigurationNode() : DE_ConfigurationNode() -{ - UpdateLoad(); -} +{} //======================================================================= // function : STEPCAFControl_ConfigurationNode @@ -45,7 +43,6 @@ Vrml_ConfigurationNode::Vrml_ConfigurationNode(const Handle(Vrml_ConfigurationNo :DE_ConfigurationNode(theNode) { InternalParameters = theNode->InternalParameters; - UpdateLoad(); } //======================================================================= From 195a068c4fbc1a30fde53dabcd99ac38d280acfc Mon Sep 17 00:00:00 2001 From: ifv Date: Fri, 2 Dec 2022 11:47:37 +0300 Subject: [PATCH 443/639] 0030781: Sweep algorithm creates non-planar edges (orig. BOPAlgo_MakerVolume fails to build a solid) BRepFill/BRepFill_AdvancedEvolved.cxx - estimation of angular tolerance is added in method GetLids() tests/evolved/voluved/bug30781 - new test added --- src/BRepFill/BRepFill_AdvancedEvolved.cxx | 17 ++++++++++++++--- tests/evolved/voluved/bug30781 | 17 +++++++++++++++++ 2 files changed, 31 insertions(+), 3 deletions(-) create mode 100644 tests/evolved/voluved/bug30781 diff --git a/src/BRepFill/BRepFill_AdvancedEvolved.cxx b/src/BRepFill/BRepFill_AdvancedEvolved.cxx index 2d5cdd19f5..46c5574391 100644 --- a/src/BRepFill/BRepFill_AdvancedEvolved.cxx +++ b/src/BRepFill/BRepFill_AdvancedEvolved.cxx @@ -44,6 +44,8 @@ #include #include #include +#include +#include #ifdef BRepFill_AdvancedEvolved_DEBUG #include @@ -524,9 +526,14 @@ void BRepFill_AdvancedEvolved::GetLids() return; } + Standard_Real aTol = Max(aFS.Tolerance(), aFS.ToleranceReached()); + aTol += myFuzzyValue; + Bnd_Box aProfBox; + BRepBndLib::Add(myProfile, aProfBox); + Standard_Real aSqDiag = aProfBox.SquareExtent(); //Square of the default angular tolerance in //BOPAlgo_Tools::EdgesToWires(...) and BOPAlgo_Tools::WiresToFaces(...) methods - const Standard_Real aSqAnguarTol = 1.0e-16; + const Standard_Real aSqAnguarTol = aTol*aTol / aSqDiag; const gp_Dir &aNormal = aSurf->Position().Direction(); // Obtain free-edges from myPipeShell. All edges must be planar @@ -541,6 +548,7 @@ void BRepFill_AdvancedEvolved::GetLids() gp_Pnt aPtmp; gp_Vec aTan; + Standard_Real aDPMax = 0.; for (Standard_Integer i = 1; i <= aMapEF.Size(); i++) { TopTools_ListOfShape& aListF = aMapEF(i); @@ -564,6 +572,8 @@ void BRepFill_AdvancedEvolved::GetLids() continue; const Standard_Real aDP = aTan.XYZ().Dot(aNormal.XYZ()); + if (Abs(aDP) > aDPMax) + aDPMax = Abs(aDP); if (aDP*aDP>aSqModulus*aSqAnguarTol) { //Only planar edges are considered @@ -594,8 +604,9 @@ void BRepFill_AdvancedEvolved::GetLids() aBB.MakeCompound(aCompW); aBB.MakeCompound(aCompF); aBB.MakeCompound(myTopBottom); - BOPAlgo_Tools::EdgesToWires(aFreeEdges, aCompW, Standard_True); - BOPAlgo_Tools::WiresToFaces(aCompW, aCompF); + Standard_Real anAngTol = Sqrt(aSqAnguarTol); + BOPAlgo_Tools::EdgesToWires(aFreeEdges, aCompW, Standard_True, anAngTol); + BOPAlgo_Tools::WiresToFaces(aCompW, aCompF, anAngTol); { // Check orientation diff --git a/tests/evolved/voluved/bug30781 b/tests/evolved/voluved/bug30781 new file mode 100644 index 0000000000..d4eccfeec2 --- /dev/null +++ b/tests/evolved/voluved/bug30781 @@ -0,0 +1,17 @@ +puts "##################################################" +puts "0030781: Sweep algorithm creates non-planar edges (orig. BOPAlgo_MakerVolume fails to build a solid)" +puts "##################################################" + +binrestore [locate_data_file bug30781.bin] s +explode s +evolved result -s s_1 -p s_2 -solid -a -v -t 1.e-6 + +checkshape result +checknbshapes result -vertex 24 -edge 38 -wire 14 -face 14 +checkprops result -s 41330.7 + +smallview +don result +fit + +checkview -screenshot -2d -path ${imagedir}/${test_image}.png \ No newline at end of file From 961a306dc4468a3ce5ef1114cfa7389d126b3ca1 Mon Sep 17 00:00:00 2001 From: ifv Date: Tue, 6 Dec 2022 10:12:22 +0300 Subject: [PATCH 444/639] 0033244: Modeling Algorithms - Surface-surface intersection produces the double curves IntAna_QuadQuadGeo.cxx - estimation of angular tolerance is added for case cone-cone tests/lowalgos/intss/bug33244 - new test case added --- src/IntAna/IntAna_QuadQuadGeo.cxx | 121 ++++++++++++++++++++++++++---- tests/lowalgos/intss/bug33244 | 48 ++++++++++++ 2 files changed, 156 insertions(+), 13 deletions(-) create mode 100644 tests/lowalgos/intss/bug33244 diff --git a/src/IntAna/IntAna_QuadQuadGeo.cxx b/src/IntAna/IntAna_QuadQuadGeo.cxx index 3ab50bcd85..c3dcf2c767 100644 --- a/src/IntAna/IntAna_QuadQuadGeo.cxx +++ b/src/IntAna/IntAna_QuadQuadGeo.cxx @@ -50,11 +50,21 @@ #include #include #include +#include +#include +#include +#include + +#ifdef DEBUGLINES +#include +#endif static gp_Ax2 DirToAx2(const gp_Pnt& P,const gp_Dir& D); static void RefineDir(gp_Dir& aDir); +static + Standard_Real EstimDist(const gp_Cone& theCon1, const gp_Cone& theCon2); //======================================================================= //class : AxeOperator @@ -249,6 +259,72 @@ gp_Ax2 DirToAx2(const gp_Pnt& P,const gp_Dir& D) return(gp_Ax2(P,D,gp_Dir(gp_Vec(-y,x,0.0)))); } } + +//======================================================================= +//function : EstimDist +//purpose : returns a minimal distance from apex to any solution +//======================================================================= +Standard_Real EstimDist(const gp_Cone& theCon1, const gp_Cone& theCon2) +{ + //It is supposed that axes of cones are coplanar and + //distance between them > Precision::Confusion() + gp_Pnt aPA1 = theCon1.Apex(), aPA2 = theCon2.Apex(); + + gp_Pnt aP3 = aPA1.Translated(theCon1.Position().Direction()); + + gce_MakePln aMkPln(aPA1, aPA2, aP3); + if(!aMkPln.IsDone()) + return Precision::Infinite(); + + const gp_Pln& aPln = aMkPln.Value(); + + gp_Lin anAx1(aPA1, theCon1.Position().Direction()); + gp_Lin2d anAx12d = ProjLib::Project(aPln, anAx1); + gp_Lin2d Lines1[2]; + Standard_Real anAng1 = theCon1.SemiAngle(); + Lines1[0] = anAx12d.Rotated(anAx12d.Location(), anAng1); + Lines1[1] = anAx12d.Rotated(anAx12d.Location(), -anAng1); + // + gp_Lin anAx2(aPA2, theCon2.Position().Direction()); + gp_Lin2d anAx22d = ProjLib::Project(aPln, anAx2); + gp_Lin2d Lines2[2]; + Standard_Real anAng2 = theCon2.SemiAngle(); + Lines2[0] = anAx22d.Rotated(anAx22d.Location(), anAng2); + Lines2[1] = anAx22d.Rotated(anAx22d.Location(), -anAng2); + +#ifdef DEBUGLINES + Handle(Geom2d_Line) L10 = new Geom2d_Line(Lines1[0]); + Handle(Geom2d_Line) L11 = new Geom2d_Line(Lines1[1]); + Handle(Geom2d_Line) L20 = new Geom2d_Line(Lines2[0]); + Handle(Geom2d_Line) L21 = new Geom2d_Line(Lines2[1]); +#endif + + Standard_Real aMinDist[2] = { Precision::Infinite(), Precision::Infinite() }; + Standard_Integer i, j, k; + IntAna2d_AnaIntersection anInter; + for (i = 0; i < 2; ++i) + { + for (j = 0; j < 2; ++j) + { + anInter.Perform(Lines1[i], Lines2[j]); + if (anInter.IsDone()) + { + Standard_Integer aNbPoints = anInter.NbPoints(); + for (k = 1; k <= aNbPoints; ++k) + { + const IntAna2d_IntPoint& anIntP = anInter.Point(k); + Standard_Real aPar1 = Abs(anIntP.ParamOnFirst()); + aMinDist[0] = Min(aPar1, aMinDist[0]); + Standard_Real aPar2 = Abs(anIntP.ParamOnSecond()); + aMinDist[1] = Min(aPar2, aMinDist[1]); + } + } + } + } + + Standard_Real aDist = Max(aMinDist[0], aMinDist[1]); + return aDist; +} //======================================================================= //function : IntAna_QuadQuadGeo //purpose : Empty constructor @@ -1356,30 +1432,49 @@ IntAna_QuadQuadGeo::IntAna_QuadQuadGeo(const gp_Cylinder& Cyl, //======================================================================= void IntAna_QuadQuadGeo::Perform(const gp_Cone& Con1, const gp_Cone& Con2, - const Standard_Real Tol) + const Standard_Real Tol) { - done=Standard_True; + done = Standard_True; // Standard_Real tg1, tg2, aDA1A2, aTol2; gp_Pnt aPApex1, aPApex2; Standard_Real TOL_APEX_CONF = 1.e-10; - + // - tg1=Tan(Con1.SemiAngle()); - tg2=Tan(Con2.SemiAngle()); + tg1 = Tan(Con1.SemiAngle()); + tg2 = Tan(Con2.SemiAngle()); - if((tg1 * tg2) < 0.) { + if ((tg1 * tg2) < 0.) { tg2 = -tg2; } // - aTol2=Tol*Tol; - aPApex1=Con1.Apex(); - aPApex2=Con2.Apex(); - aDA1A2=aPApex1.SquareDistance(aPApex2); + aTol2 = Tol*Tol; + aPApex1 = Con1.Apex(); + aPApex2 = Con2.Apex(); + aDA1A2 = aPApex1.SquareDistance(aPApex2); // - AxeOperator A1A2(Con1.Axis(),Con2.Axis()); + AxeOperator A1A2(Con1.Axis(), Con2.Axis()); // + Standard_Real aTolAng = myEPSILON_ANGLE_CONE; + if ((Abs(tg1 - tg2) < Tol) && (A1A2.Parallel())) + { + Standard_Real DistA1A2 = A1A2.Distance(); + if (DistA1A2 > 100. * Tol) + { + Standard_Real aMinSolDist = EstimDist(Con1, Con2); + if (aMinSolDist < Epsilon(1.)) + { + aTolAng = Tol; + } + else + { + aTolAng = Max(myEPSILON_ANGLE_CONE, Tol / aMinSolDist); + aTolAng = Min(aTolAng, Tol); + } + } + } + // 1 if(A1A2.Same()) { //-- two circles @@ -1427,8 +1522,8 @@ IntAna_QuadQuadGeo::IntAna_QuadQuadGeo(const gp_Cylinder& Cyl, } } //-- fin A1A2.Same // 2 - else if((Abs(tg1-tg2) Date: Fri, 9 Dec 2022 19:32:00 +0300 Subject: [PATCH 445/639] 0033265: Modeling Algorithms - Boolean operation hangs on the attached shapes Added test case. --- tests/bugs/modalg_7/bug33265 | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 tests/bugs/modalg_7/bug33265 diff --git a/tests/bugs/modalg_7/bug33265 b/tests/bugs/modalg_7/bug33265 new file mode 100644 index 0000000000..b6d270df05 --- /dev/null +++ b/tests/bugs/modalg_7/bug33265 @@ -0,0 +1,16 @@ +puts "============" +puts "0033265: Modeling Algorithms - Boolean operation hangs on the attached shapes" +puts "============" +puts "" + +restore [locate_data_file bug33265.brep] hull +plane p 0 0.0001 0 0 1 0 +mkface f p -150 150 -150 150 +bop hull f +bopsection res + +checknbshapes res -vertex 16 -edge 16 +checkprops res -l 170.631 +checksection res -r 0 + +checkview -display res -2d -path ${imagedir}/${test_image}.png From 686926c0a95fc723a8f2452ad4dc25252c1b691e Mon Sep 17 00:00:00 2001 From: akaftasev Date: Fri, 9 Dec 2022 14:01:08 +0300 Subject: [PATCH 446/639] 0033247: Modeling Algorithm - BOP report small edges problem and produce empty result Build shifted pcurve for ellipse and circle cases. --- src/GeomInt/GeomInt_IntSS.hxx | 9 +++ src/GeomInt/GeomInt_IntSS_1.cxx | 116 +++++++++++++++++------------ src/IntTools/IntTools_FaceFace.cxx | 24 ++++-- tests/bugs/modalg_8/bug33247 | 13 ++++ 4 files changed, 107 insertions(+), 55 deletions(-) create mode 100644 tests/bugs/modalg_8/bug33247 diff --git a/src/GeomInt/GeomInt_IntSS.hxx b/src/GeomInt/GeomInt_IntSS.hxx index 943a59bf27..d961567e09 100644 --- a/src/GeomInt/GeomInt_IntSS.hxx +++ b/src/GeomInt/GeomInt_IntSS.hxx @@ -93,6 +93,15 @@ public: //! converts RLine to Geom(2d)_Curve. Standard_EXPORT static void TreatRLine (const Handle(IntPatch_RLine)& theRL, const Handle(GeomAdaptor_Surface)& theHS1, const Handle(GeomAdaptor_Surface)& theHS2, Handle(Geom_Curve)& theC3d, Handle(Geom2d_Curve)& theC2d1, Handle(Geom2d_Curve)& theC2d2, Standard_Real& theTolReached); + //! creates 2D-curve on given surface from given 3D-curve + Standard_EXPORT static void BuildPCurves (const Standard_Real theFirst, const Standard_Real theLast, + const Standard_Real theUmin, const Standard_Real theUmax, + const Standard_Real theVmin, const Standard_Real theVmax, + Standard_Real& theTol, + const Handle(Geom_Surface)& theSurface, + const Handle(Geom_Curve)& theCurve, + Handle(Geom2d_Curve)& theCurve2d); + //! creates 2D-curve on given surface from given 3D-curve Standard_EXPORT static void BuildPCurves (const Standard_Real f, const Standard_Real l, Standard_Real& Tol, const Handle(Geom_Surface)& S, const Handle(Geom_Curve)& C, Handle(Geom2d_Curve)& C2d); diff --git a/src/GeomInt/GeomInt_IntSS_1.cxx b/src/GeomInt/GeomInt_IntSS_1.cxx index d75c6cdc81..9672735301 100644 --- a/src/GeomInt/GeomInt_IntSS_1.cxx +++ b/src/GeomInt/GeomInt_IntSS_1.cxx @@ -1074,94 +1074,92 @@ void GeomInt_IntSS::TreatRLine(const Handle(IntPatch_RLine)& theRL, //function : BuildPCurves //purpose : //======================================================================= -void GeomInt_IntSS::BuildPCurves (Standard_Real f, - Standard_Real l, - Standard_Real& Tol, - const Handle (Geom_Surface)& S, - const Handle (Geom_Curve)& C, - Handle (Geom2d_Curve)& C2d) +void GeomInt_IntSS::BuildPCurves (const Standard_Real theFirst, const Standard_Real theLast, + const Standard_Real theUmin, const Standard_Real theUmax, + const Standard_Real theVmin, const Standard_Real theVmax, + Standard_Real& theTol, + const Handle(Geom_Surface)& theSurface, + const Handle(Geom_Curve)& theCurve, + Handle(Geom2d_Curve)& theCurve2d) { - if (!C2d.IsNull()) { + if (!theCurve2d.IsNull() || theSurface.IsNull()) { return; } // - Standard_Real umin,umax,vmin,vmax; - // - S->Bounds(umin, umax, vmin, vmax); // in class ProjLib_Function the range of parameters is shrank by 1.e-09 - if((l - f) > 2.e-09) { - C2d = GeomProjLib::Curve2d(C,f,l,S,umin,umax,vmin,vmax,Tol); - if (C2d.IsNull()) { + if ((theLast - theFirst) > 2.e-09) { + theCurve2d = GeomProjLib::Curve2d(theCurve, theFirst, theLast, theSurface, theUmin, theUmax, theVmin, theVmax, theTol); + if (theCurve2d.IsNull()) { // proj. a circle that goes through the pole on a sphere to the sphere - Tol += Precision::Confusion(); - C2d = GeomProjLib::Curve2d(C,f,l,S,Tol); + theTol += Precision::Confusion(); + theCurve2d = GeomProjLib::Curve2d(theCurve, theFirst, theLast, theSurface, theTol); } - const Handle(Standard_Type)& aType = C2d->DynamicType(); - if ( aType == STANDARD_TYPE(Geom2d_BSplineCurve)) - { + const Handle(Standard_Type)& aType = theCurve2d->DynamicType(); + if (aType == STANDARD_TYPE(Geom2d_BSplineCurve)) + { //Check first, last knots to avoid problems with trimming //First, last knots can differ from f, l because of numerical error //of projection and approximation //The same checking as in Geom2d_TrimmedCurve - if((C2d->FirstParameter() - f > Precision::PConfusion()) || - (l - C2d->LastParameter() > Precision::PConfusion())) + if ((theCurve2d->FirstParameter() - theFirst > Precision::PConfusion()) || + (theLast - theCurve2d->LastParameter() > Precision::PConfusion())) { - Handle(Geom2d_BSplineCurve) aBspl = Handle(Geom2d_BSplineCurve)::DownCast(C2d); + Handle(Geom2d_BSplineCurve) aBspl = Handle(Geom2d_BSplineCurve)::DownCast(theCurve2d); TColStd_Array1OfReal aKnots(1, aBspl->NbKnots()); aBspl->Knots(aKnots); - BSplCLib::Reparametrize(f, l, aKnots); + BSplCLib::Reparametrize(theFirst, theLast, aKnots); aBspl->SetKnots(aKnots); } } } else { - if((l - f) > Epsilon(Abs(f))) + if ((theLast - theFirst) > Epsilon(Abs(theFirst))) { //The domain of C2d is [Epsilon(Abs(f)), 2.e-09] //On this small range C2d can be considered as segment //of line. - Standard_Real aU=0., aV=0.; + Standard_Real aU = 0., aV = 0.; GeomAdaptor_Surface anAS; - anAS.Load(S); + anAS.Load(theSurface); Extrema_ExtPS anExtr; - const gp_Pnt aP3d1 = C->Value(f); - const gp_Pnt aP3d2 = C->Value(l); + const gp_Pnt aP3d1 = theCurve->Value(theFirst); + const gp_Pnt aP3d2 = theCurve->Value(theLast); anExtr.SetAlgo(Extrema_ExtAlgo_Grad); - anExtr.Initialize(anAS, umin, umax, vmin, vmax, - Precision::Confusion(), Precision::Confusion()); + anExtr.Initialize(anAS, theUmin, theUmax, theVmin, theVmax, + Precision::Confusion(), Precision::Confusion()); anExtr.Perform(aP3d1); - if(ParametersOfNearestPointOnSurface(anExtr, aU, aV)) + if (ParametersOfNearestPointOnSurface(anExtr, aU, aV)) { const gp_Pnt2d aP2d1(aU, aV); anExtr.Perform(aP3d2); - if(ParametersOfNearestPointOnSurface(anExtr, aU, aV)) + if (ParametersOfNearestPointOnSurface(anExtr, aU, aV)) { const gp_Pnt2d aP2d2(aU, aV); - if(aP2d1.Distance(aP2d2) > gp::Resolution()) + if (aP2d1.Distance(aP2d2) > gp::Resolution()) { - TColgp_Array1OfPnt2d poles(1,2); - TColStd_Array1OfReal knots(1,2); - TColStd_Array1OfInteger mults(1,2); + TColgp_Array1OfPnt2d poles(1, 2); + TColStd_Array1OfReal knots(1, 2); + TColStd_Array1OfInteger mults(1, 2); poles(1) = aP2d1; poles(2) = aP2d2; - knots(1) = f; - knots(2) = l; + knots(1) = theFirst; + knots(2) = theLast; mults(1) = mults(2) = 2; - C2d = new Geom2d_BSplineCurve(poles,knots,mults,1); + theCurve2d = new Geom2d_BSplineCurve(poles, knots, mults, 1); //Check same parameter in middle point .begin - const gp_Pnt PMid(C->Value(0.5*(f+l))); + const gp_Pnt PMid(theCurve->Value(0.5*(theFirst + theLast))); const gp_Pnt2d pmidcurve2d(0.5*(aP2d1.XY() + aP2d2.XY())); const gp_Pnt aPC(anAS.Value(pmidcurve2d.X(), pmidcurve2d.Y())); const Standard_Real aDist = PMid.Distance(aPC); - Tol = Max(aDist, Tol); + theTol = Max(aDist, theTol); //Check same parameter in middle point .end } } @@ -1169,27 +1167,51 @@ void GeomInt_IntSS::BuildPCurves (Standard_Real f, } } // - if (S->IsUPeriodic() && !C2d.IsNull()) { + if (theSurface->IsUPeriodic() && !theCurve2d.IsNull()) { // Recadre dans le domaine UV de la face Standard_Real aTm, U0, aEps, period, du, U0x; Standard_Boolean bAdjust; // aEps = Precision::PConfusion(); - period = S->UPeriod(); + period = theSurface->UPeriod(); // - aTm = .5*(f + l); - gp_Pnt2d pm = C2d->Value(aTm); + aTm = .5 * (theFirst + theLast); + gp_Pnt2d pm = theCurve2d->Value(aTm); U0 = pm.X(); // - bAdjust = - GeomInt::AdjustPeriodic(U0, umin, umax, period, U0x, du, aEps); + bAdjust = + GeomInt::AdjustPeriodic(U0, theUmin, theUmax, period, U0x, du, aEps); if (bAdjust) { gp_Vec2d T1(du, 0.); - C2d->Translate(T1); + theCurve2d->Translate(T1); } } } + + +//======================================================================= +//function : BuildPCurves +//purpose : +//======================================================================= +void GeomInt_IntSS::BuildPCurves (const Standard_Real f, + const Standard_Real l, + Standard_Real& Tol, + const Handle (Geom_Surface)& S, + const Handle (Geom_Curve)& C, + Handle (Geom2d_Curve)& C2d) +{ + if (!C2d.IsNull() || S.IsNull()) { + return; + } + // + Standard_Real umin,umax,vmin,vmax; + // + S->Bounds(umin, umax, vmin, vmax); + + BuildPCurves(f, l, umin, umax, vmin, vmax, Tol, S, C, C2d); +} + //======================================================================= //function : TrimILineOnSurfBoundaries //purpose : This function finds intersection points of given curves with diff --git a/src/IntTools/IntTools_FaceFace.cxx b/src/IntTools/IntTools_FaceFace.cxx index 27f20299b2..b95022f00b 100644 --- a/src/IntTools/IntTools_FaceFace.cxx +++ b/src/IntTools/IntTools_FaceFace.cxx @@ -990,15 +990,19 @@ void IntTools_FaceFace::MakeCurve(const Standard_Integer Index, if (typl == IntPatch_Circle || typl == IntPatch_Ellipse) {//// if(myApprox1) { Handle (Geom2d_Curve) C2d; - GeomInt_IntSS::BuildPCurves(fprm, lprm, Tolpc, - myHS1->Surface(), newc, C2d); + GeomInt_IntSS::BuildPCurves(fprm, lprm, + myHS1->FirstUParameter(), myHS1->LastUParameter(), + myHS1->FirstVParameter(), myHS1->LastVParameter(), + Tolpc, myHS1->Surface(), newc, C2d); aCurve.SetFirstCurve2d(C2d); } if(myApprox2) { Handle (Geom2d_Curve) C2d; - GeomInt_IntSS::BuildPCurves(fprm,lprm,Tolpc, - myHS2->Surface(),newc,C2d); + GeomInt_IntSS::BuildPCurves(fprm, lprm, + myHS2->FirstUParameter(), myHS2->LastUParameter(), + myHS2->FirstVParameter(), myHS2->LastVParameter(), + Tolpc, myHS2->Surface(), newc, C2d); aCurve.SetSecondCurve2d(C2d); } } @@ -1059,15 +1063,19 @@ void IntTools_FaceFace::MakeCurve(const Standard_Integer Index, if(myApprox1) { Handle (Geom2d_Curve) C2d; - GeomInt_IntSS::BuildPCurves(fprm, lprm, Tolpc, - myHS1->Surface(), newc, C2d); + GeomInt_IntSS::BuildPCurves(fprm, lprm, + myHS1->FirstUParameter(), myHS1->LastUParameter(), + myHS1->FirstVParameter(), myHS1->LastVParameter(), + Tolpc, myHS1->Surface(), newc, C2d); aCurve.SetFirstCurve2d(C2d); } if(myApprox2) { Handle (Geom2d_Curve) C2d; - GeomInt_IntSS::BuildPCurves(fprm, lprm, Tolpc, - myHS2->Surface(), newc, C2d); + GeomInt_IntSS::BuildPCurves(fprm, lprm, + myHS2->FirstUParameter(), myHS2->LastUParameter(), + myHS2->FirstVParameter(), myHS2->LastVParameter(), + Tolpc, myHS2->Surface(), newc, C2d); aCurve.SetSecondCurve2d(C2d); } }// end of if (typl == IntPatch_Circle || typl == IntPatch_Ellipse) diff --git a/tests/bugs/modalg_8/bug33247 b/tests/bugs/modalg_8/bug33247 new file mode 100644 index 0000000000..dd33c0e85d --- /dev/null +++ b/tests/bugs/modalg_8/bug33247 @@ -0,0 +1,13 @@ +puts "============" +puts "0033247: Modeling Algorithms - BOP report small edges problem and produce empty result" +puts "============" +puts "" + +restore [locate_data_file bug33247_object.brep] a +restore [locate_data_file bug33247_tool.brep] b +bcommon r a b + +checknbshapes r -vertex 98 -edge 131 -wire 35 -face 26 +checkprops r -s 157.39 + +checkview -display r -2d -path ${imagedir}/${test_image}.png From 42e4ae96aee432444f5ac4c3b5991a420fe1f0f9 Mon Sep 17 00:00:00 2001 From: msv Date: Tue, 27 Dec 2022 22:19:11 +0300 Subject: [PATCH 447/639] 0033304: Modeling Data - Floating point signal when converting a B-spline curve to analytical form Protect the static function ConicDefinition from calling sqrt with negative argument. --- src/GeomConvert/GeomConvert_CurveToAnaCurve.cxx | 6 ++++++ tests/bugs/moddata_3/bug33304 | 9 +++++++++ 2 files changed, 15 insertions(+) create mode 100644 tests/bugs/moddata_3/bug33304 diff --git a/src/GeomConvert/GeomConvert_CurveToAnaCurve.cxx b/src/GeomConvert/GeomConvert_CurveToAnaCurve.cxx index 8e135e1edb..3038e88dfa 100644 --- a/src/GeomConvert/GeomConvert_CurveToAnaCurve.cxx +++ b/src/GeomConvert/GeomConvert_CurveToAnaCurve.cxx @@ -429,6 +429,8 @@ static Standard_Boolean ConicDefinition term2 = -gdet/(cprim*pdet); if (IsEllip) { + if (term1 <= eps || term2 <= eps) + return Standard_False; Xax = cost; Yax = sint; Rmin = sqrt ( term1); @@ -439,12 +441,16 @@ static Standard_Boolean ConicDefinition } } else if (term1 <= eps){ + if (-term1 <= eps || term2 <= eps) + return Standard_False; Xax = -sint; Yax = cost; Rmin = sqrt (-term1); Rmax = sqrt (term2); } else { + if (term1 <= eps || -term2 <= eps) + return Standard_False; Xax = cost; Yax = sint; Rmin = sqrt (-term2); diff --git a/tests/bugs/moddata_3/bug33304 b/tests/bugs/moddata_3/bug33304 new file mode 100644 index 0000000000..ba6e514743 --- /dev/null +++ b/tests/bugs/moddata_3/bug33304 @@ -0,0 +1,9 @@ +puts "===========================================================" +puts "0033304: Modeling Data - Floating point signal when converting a B-spline curve to analytical form" +puts "===========================================================" + +puts "REQUIRED ALL: Conversion failed" + +binrestore [locate_data_file bug33304_bspl_curv.bbrep] a +mkcurve c a +tocanon r c From a011359b8a5cc065a3fbe58e5f51bf2f2f95e35c Mon Sep 17 00:00:00 2001 From: akaftasev Date: Thu, 22 Dec 2022 17:09:54 +0300 Subject: [PATCH 448/639] 0033227: Modeling Algorithm - BOPAlgo_BuilderSolid generates incomplete result Deleted outer loop for shells. Added additional check of edges orientation for RefineShell(). --- src/BOPAlgo/BOPAlgo_ShellSplitter.cxx | 290 ++++++++++++++------------ tests/bugs/modalg_8/bug33227 | 13 ++ 2 files changed, 171 insertions(+), 132 deletions(-) create mode 100644 tests/bugs/modalg_8/bug33227 diff --git a/src/BOPAlgo/BOPAlgo_ShellSplitter.cxx b/src/BOPAlgo/BOPAlgo_ShellSplitter.cxx index 107a86a4b5..3cec99060d 100644 --- a/src/BOPAlgo/BOPAlgo_ShellSplitter.cxx +++ b/src/BOPAlgo/BOPAlgo_ShellSplitter.cxx @@ -248,167 +248,178 @@ void BOPAlgo_ShellSplitter::SplitBlock(BOPTools_ConnexityBlock& aCB) // // Build the shells aItF.Initialize (aLFConnected); - for (i = 1; aItF.More() && !bAllFacesTaken; aItF.Next(), ++i) { + for (i = 1; aItF.More() && !bAllFacesTaken; aItF.Next(), ++i) + { const TopoDS_Shape& aFF = aItF.Value(); if (!AddedFacesMap.Add(aFF)) { continue; } // // make a new shell - TopoDS_Shell aShellStart; - aBB.MakeShell(aShellStart); - aBB.Add(aShellStart, aFF); - // - TopTools_ListOfShape aLShells; - aLShells.Append(aShellStart); + TopoDS_Shell aShell; + aBB.MakeShell(aShell); + aBB.Add(aShell, aFF); + + aMEFP.Clear(); + TopExp::MapShapesAndAncestors(aShell, TopAbs_EDGE, TopAbs_FACE, aMEFP); // - TopTools_ListIteratorOfListOfShape aItLShells(aLShells); - for (; aItLShells.More(); aItLShells.Next()) { - TopoDS_Shell& aShell = TopoDS::Shell(aItLShells.ChangeValue()); + // loop on faces added to Shell; + // add their neighbor faces to Shell and so on + aItS.Initialize(aShell); + for (; aItS.More(); aItS.Next()) { + const TopoDS_Face& aF = (*(TopoDS_Face*)(&aItS.Value())); + Standard_Boolean isBoundary = aBoundaryFaces.Contains (aF); // - aMEFP.Clear(); - TopExp::MapShapesAndAncestors(aShell, TopAbs_EDGE, TopAbs_FACE, aMEFP); - // - // loop on faces added to Shell; - // add their neighbor faces to Shell and so on - aItS.Initialize(aShell); - for (; aItS.More(); aItS.Next()) { - const TopoDS_Face& aF = (*(TopoDS_Face*)(&aItS.Value())); - Standard_Boolean isBoundary = aBoundaryFaces.Contains (aF); + // loop on edges of aF; find a good neighbor face of aF by aE + aExp.Init(aF, TopAbs_EDGE); + for (; aExp.More(); aExp.Next()) { + const TopoDS_Edge& aE = (*(TopoDS_Edge*)(&aExp.Current())); // - // loop on edges of aF; find a good neighbor face of aF by aE - aExp.Init(aF, TopAbs_EDGE); - for (; aExp.More(); aExp.Next()) { - const TopoDS_Edge& aE = (*(TopoDS_Edge*)(&aExp.Current())); - // - // proceed only free edges in this shell - if (aMEFP.Contains(aE)) { - const TopTools_ListOfShape& aLFP = aMEFP.FindFromKey(aE); - aNbFP = aLFP.Extent(); - if (aNbFP > 1) { - continue; - } - } - // avoid processing of internal edges - anOr = aE.Orientation(); - if (anOr == TopAbs_INTERNAL) { + // proceed only free edges in this shell + if (aMEFP.Contains(aE)) { + const TopTools_ListOfShape& aLFP = aMEFP.FindFromKey(aE); + aNbFP = aLFP.Extent(); + if (aNbFP > 1) { continue; } - // avoid processing of degenerated edges - if (BRep_Tool::Degenerated(aE)) { - continue; - } - // - // candidate faces list - const TopTools_ListOfShape& aLF = aEFMap.FindFromKey(aE); - aNbLF = aLF.Extent(); - if (!aNbLF) { + } + // avoid processing of internal edges + anOr = aE.Orientation(); + if (anOr == TopAbs_INTERNAL) { + continue; + } + // avoid processing of degenerated edges + if (BRep_Tool::Degenerated(aE)) { + continue; + } + // + // candidate faces list + const TopTools_ListOfShape& aLF = aEFMap.FindFromKey(aE); + aNbLF = aLF.Extent(); + if (!aNbLF) { + continue; + } + // + // prepare for selecting the next face + // take only not-processed faces as a candidates + BOPTools_ListOfCoupleOfShape aLCSOff; + // + Standard_Integer aNbWaysInside = 0; + TopoDS_Face aSelF; + TopTools_ListIteratorOfListOfShape aItLF(aLF); + for (; aItLF.More(); aItLF.Next()) { + const TopoDS_Face& aFL = (*(TopoDS_Face*)(&aItLF.Value())); + if (aF.IsSame(aFL) || AddedFacesMap.Contains(aFL)) { continue; } // - // prepare for selecting the next face - // take only not-processed faces as a candidates - BOPTools_ListOfCoupleOfShape aLCSOff; - // - Standard_Integer aNbWaysInside = 0; - TopoDS_Face aSelF; - TopTools_ListIteratorOfListOfShape aItLF(aLF); - for (; aItLF.More(); aItLF.Next()) { - const TopoDS_Face& aFL = (*(TopoDS_Face*)(&aItLF.Value())); - if (aF.IsSame(aFL) || AddedFacesMap.Contains(aFL)) { - continue; - } - // - // find current edge in the face - if (!BOPTools_AlgoTools::GetEdgeOff(aE, aFL, aEL)) { - continue; - } - // - if (isBoundary && !aBoundaryFaces.Contains (aFL)) - { - ++aNbWaysInside; - aSelF = aFL; - } - aCSOff.SetShape1(aEL); - aCSOff.SetShape2(aFL); - aLCSOff.Append(aCSOff); - }//for (; aItLF.More(); aItLF.Next()) { - // - aNbOff = aLCSOff.Extent(); - if (!aNbOff){ + // find current edge in the face + if (!BOPTools_AlgoTools::GetEdgeOff(aE, aFL, aEL)) { continue; } // - // among all the adjacent faces chose one with the minimal - // angle to the current one - if (!isBoundary || aNbWaysInside != 1) + if (isBoundary && !aBoundaryFaces.Contains (aFL)) { - if (aNbOff == 1) { - aSelF = (*(TopoDS_Face*)(&aLCSOff.First().Shape2())); - } - else if (aNbOff > 1) { - BOPTools_AlgoTools::GetFaceOff(aE, aF, aLCSOff, aSelF, aContext); - } + ++aNbWaysInside; + aSelF = aFL; } - // - if (!aSelF.IsNull() && AddedFacesMap.Add(aSelF)) { - aBB.Add(aShell, aSelF); - TopExp::MapShapesAndAncestors(aSelF, TopAbs_EDGE, TopAbs_FACE, aMEFP); - } - } // for (; aExp.More(); aExp.Next()) { - } // for (; aItS.More(); aItS.Next()) { - // - // split the shell on multi-connected edges - TopTools_ListOfShape aLShSp; - RefineShell(aShell, aMEFP, aLShSp); - // - // collect the not closed shells for further processing - TopTools_ListOfShape aLShNC; - // - TopTools_ListIteratorOfListOfShape aItLShSp(aLShSp); - for (; aItLShSp.More(); aItLShSp.Next()) { - TopoDS_Shell& aShSp = *((TopoDS_Shell*)&aItLShSp.Value()); + aCSOff.SetShape1(aEL); + aCSOff.SetShape2(aFL); + aLCSOff.Append(aCSOff); + }//for (; aItLF.More(); aItLF.Next()) { // - if (BRep_Tool::IsClosed(aShSp)) { - aShSp.Closed(Standard_True); - myLoops.Append(aShSp); + aNbOff = aLCSOff.Extent(); + if (!aNbOff){ + continue; } - else { - aLShNC.Append(aShSp); + // + // among all the adjacent faces chose one with the minimal + // angle to the current one + if (!isBoundary || aNbWaysInside != 1) + { + if (aNbOff == 1) { + aSelF = (*(TopoDS_Face*)(&aLCSOff.First().Shape2())); + } + else if (aNbOff > 1) { + BOPTools_AlgoTools::GetFaceOff(aE, aF, aLCSOff, aSelF, aContext); + } } - } - // - bAllFacesTaken = (AddedFacesMap.Extent() == aNbShapes); - if (bAllFacesTaken) { - break; - } + // + if (!aSelF.IsNull() && AddedFacesMap.Add(aSelF)) { + aBB.Add(aShell, aSelF); + TopExp::MapShapesAndAncestors(aSelF, TopAbs_EDGE, TopAbs_FACE, aMEFP); + } + } // for (; aExp.More(); aExp.Next()) { + } // for (; aItS.More(); aItS.Next()) { + // + // split the shell on multi-connected edges + TopTools_ListOfShape aLShSp; + RefineShell(aShell, aMEFP, aLShSp); + // + // collect the not closed shells for further processing + TopTools_ListOfShape aLShNC; + // + TopTools_ListIteratorOfListOfShape aItLShSp(aLShSp); + for (; aItLShSp.More(); aItLShSp.Next()) { + TopoDS_Shell& aShSp = *((TopoDS_Shell*)&aItLShSp.Value()); // - if (aLShSp.Extent() == 1) { - // not further processing of not closed shells is needed, - // as it will not bring any new results - continue; + if (BRep_Tool::IsClosed(aShSp)) { + aShSp.Closed(Standard_True); + myLoops.Append(aShSp); } - // - Standard_Integer aNbShNC = aLShNC.Extent(); - if (aNbShNC == 1) { - // try to complete the shell with other faces - aLShells.Append(aLShNC); + else { + aLShNC.Append(aShSp); } - else if (aNbShNC > 1) { - // remove th faces of not closed shells from the map of processed faces - // and try to rebuild the shells using all not processed faces, - // because faces of one shell might be needed for building the other - TopTools_ListIteratorOfListOfShape aItLShNC(aLShNC); - for (; aItLShNC.More(); aItLShNC.Next()) { - TopoDS_Iterator aItNC(aItLShNC.Value()); - for (; aItNC.More(); aItNC.Next()) { - AddedFacesMap.Remove(aItNC.Value()); - } - } + } + // + bAllFacesTaken = (AddedFacesMap.Extent() == aNbShapes); + if (bAllFacesTaken) { + break; + } + // + if (aLShSp.Extent() == 1) { + // not further processing of not closed shells is needed, + // as it will not bring any new results + continue; + } + // + + // remove th faces of not closed shells from the map of processed faces + // and try to rebuild the shells using all not processed faces, + // because faces of one shell might be needed for building the other + TopTools_ListIteratorOfListOfShape aItLShNC(aLShNC); + for (; aItLShNC.More(); aItLShNC.Next()) + { + TopoDS_Iterator aItNC(aItLShNC.Value()); + for (; aItNC.More(); aItNC.Next()) + { + AddedFacesMap.Remove(aItNC.Value()); } } } // for (; aItF.More(); aItF.Next()) { } + +//======================================================================= +//function : FindShape +//purpose : +//======================================================================= +TopoDS_Shape FindShape (const TopoDS_Shape& theShapeToFind, + const TopoDS_Shape& theShape) +{ + TopoDS_Shape aRes; + TopExp_Explorer anExp(theShape, theShapeToFind.ShapeType()); + for (; anExp.More(); anExp.Next()) + { + const TopoDS_Shape& aShape = anExp.Current(); + if (aShape.IsSame(theShapeToFind)) + { + aRes = aShape; + break; + } + } + return aRes; +} + //======================================================================= //function : RefineShell //purpose : @@ -434,6 +445,21 @@ void RefineShell(TopoDS_Shell& theShell, aMEStop.Add(aE); continue; } + + if (aLF.Extent() == 2) + { + const TopoDS_Face& aF1 = TopoDS::Face(aLF.First()); + const TopoDS_Face& aF2 = TopoDS::Face(aLF.Last()); + + TopoDS_Shape aE1 = FindShape(aE, aF1); + TopoDS_Shape aE2 = FindShape(aE, aF2); + + if (aE1.Orientation() == aE2.Orientation()) + { + aMEStop.Add(aE); + continue; + } + } // // check for internal edges - count faces, in which the edge // is internal, twice diff --git a/tests/bugs/modalg_8/bug33227 b/tests/bugs/modalg_8/bug33227 new file mode 100644 index 0000000000..0fe9b2040f --- /dev/null +++ b/tests/bugs/modalg_8/bug33227 @@ -0,0 +1,13 @@ +puts "============" +puts "0033227: Modeling Algorithm - BOPAlgo_BuilderSolid generates incomplete result" +puts "============" +puts "" + +restore [locate_data_file bug33227.brep] s +bopbsolid r s +compound r_2 r_3 res + +checknbshapes res -shell 6 -solid 2 +checkprops res -v 3.33117e+07 + +checkview -display res -2d -path ${imagedir}/${test_image}.png From 9f338a00a1fe0a42189680d42eb3691e021a36a5 Mon Sep 17 00:00:00 2001 From: akaftasev Date: Wed, 21 Dec 2022 22:11:49 +0300 Subject: [PATCH 449/639] 0033298: Modeling Algorithm - Offset operation gives wrong result Process only those images of the faces, if one if them has anInsideEdges/anInsideVertices and the other is not. --- src/BRepOffset/BRepOffset_MakeOffset_1.cxx | 72 ++++++++++++++++++++-- tests/offset/shape_type_i_c/WA1 | 8 +++ tests/offset/shape_type_i_c/WA2 | 8 +++ tests/offset/shape_type_i_c/XZ3 | 3 +- 4 files changed, 83 insertions(+), 8 deletions(-) create mode 100644 tests/offset/shape_type_i_c/WA1 create mode 100644 tests/offset/shape_type_i_c/WA2 diff --git a/src/BRepOffset/BRepOffset_MakeOffset_1.cxx b/src/BRepOffset/BRepOffset_MakeOffset_1.cxx index 04359001d2..758ed4a713 100644 --- a/src/BRepOffset/BRepOffset_MakeOffset_1.cxx +++ b/src/BRepOffset/BRepOffset_MakeOffset_1.cxx @@ -5225,7 +5225,6 @@ void BRepOffset_BuildOffsetFaces::FilterInvalidEdges (const BRepOffset_DataMapOf const TopTools_ListOfShape* pEOrigins = myOEOrigins.Seek (aE); if (!pEOrigins) { - theMEUseInRebuild.Add (aE); continue; } @@ -5393,6 +5392,29 @@ void BRepOffset_BuildOffsetFaces::FindFacesToRebuild() } } + +namespace +{ +//======================================================================= +//function : mapShapes +//purpose : Collect theVecShapes into theMap with setted theType +//======================================================================= + template + static void mapShapes (const Container& theVecShapes, + const TopAbs_ShapeEnum theType, + TopTools_MapOfShape& theMap) + { + for (const auto& aShape : theVecShapes) + { + for (TopExp_Explorer anExp(aShape, theType); anExp.More(); anExp.Next()) + { + theMap.Add(anExp.Current()); + } + } + } +} + + //======================================================================= //function : IntersectFaces //purpose : Intersection of the faces that should be rebuild to resolve all invalidities @@ -5715,7 +5737,10 @@ void BRepOffset_BuildOffsetFaces::IntersectFaces (TopTools_MapOfShape& theVertsT TopoDS_Compound aCBE; aBB.MakeCompound (aCBE); // - TopExp_Explorer aExp (aCBInv, TopAbs_EDGE); + // remember inside edges and vertices to further check + TopTools_MapOfShape anInsideEdges; + TopTools_MapOfShape anInsideVertices; + TopExp_Explorer aExp(aCBInv, TopAbs_EDGE); for (; aExp.More(); aExp.Next()) { const TopoDS_Shape& aE = aExp.Current(); @@ -5724,6 +5749,15 @@ void BRepOffset_BuildOffsetFaces::IntersectFaces (TopTools_MapOfShape& theVertsT if (aMEFence.Add (aE)) { aBB.Add (aCBE, aE); + if (!myEdgesToAvoid.Contains(aE) && myInvalidEdges.Contains(aE)) + { + anInsideEdges.Add(aE); + TopoDS_Iterator anIt(aE); + for (; anIt.More(); anIt.Next()) + { + anInsideVertices.Add(anIt.Value()); + } + } } } } @@ -5749,10 +5783,6 @@ void BRepOffset_BuildOffsetFaces::IntersectFaces (TopTools_MapOfShape& theVertsT TopExp::MapShapes (aCBELoc, TopAbs_EDGE, aME); aMECV = aME; TopExp::MapShapes (aCBELoc, TopAbs_VERTEX, aME); - // - // Using the map find chain of faces to be intersected; - // - // faces for intersection TopTools_IndexedMapOfShape aMFInt; // additional faces for intersection TopTools_IndexedMapOfShape aMFIntExt; @@ -5801,6 +5831,14 @@ void BRepOffset_BuildOffsetFaces::IntersectFaces (TopTools_MapOfShape& theVertsT if (pMFInter && !pInterFi) continue; + // create map of edges and vertices for aLFImi + TopTools_MapOfShape aMEVIm; + mapShapes(*aLFImi, TopAbs_EDGE, aMEVIm); + mapShapes(*aLFImi, TopAbs_VERTEX, aMEVIm); + + Standard_Boolean isIContainsE = aMEVIm.HasIntersection(anInsideEdges); + Standard_Boolean isIContainsV = aMEVIm.HasIntersection(anInsideVertices); + for (j = i + 1; j <= aNb; ++j) { const TopoDS_Face& aFj = TopoDS::Face (aMFInt (j)); @@ -5820,6 +5858,28 @@ void BRepOffset_BuildOffsetFaces::IntersectFaces (TopTools_MapOfShape& theVertsT if (!aLFEj) continue; + // create map of edges and vertices for aLFImi + aMEVIm.Clear(); + mapShapes(*aLFImj, TopAbs_EDGE, aMEVIm); + mapShapes(*aLFImj, TopAbs_VERTEX, aMEVIm); + // check images of both faces contain anInsideEdges and anInsideVertices + // not process if false and true + Standard_Boolean isJContainsE = aMEVIm.HasIntersection(anInsideEdges); + Standard_Boolean isJContainsV = aMEVIm.HasIntersection(anInsideVertices); + + // Check if one face is connected to inside edge then + // the other must be also connected + if ((isIContainsE && !isJContainsV) || + (isJContainsE && !isIContainsV)) + { + TopTools_ListOfShape aLVC; + // it is necessary to process the images if they already have + // common vertices + FindCommonParts(*aLFImi, *aLFImj, aLVC, TopAbs_VERTEX); + + if (aLVC.IsEmpty()) + continue; + } // // if there are some common edges between faces // we should use these edges and do not intersect again. diff --git a/tests/offset/shape_type_i_c/WA1 b/tests/offset/shape_type_i_c/WA1 new file mode 100644 index 0000000000..41532fb085 --- /dev/null +++ b/tests/offset/shape_type_i_c/WA1 @@ -0,0 +1,8 @@ +restore [locate_data_file bug33298.brep] s + +OFFSETSHAPE 35 {} $calcul $type + +checkprops result -v 1.20105e+08 + +checknbshapes result -shell 1 + diff --git a/tests/offset/shape_type_i_c/WA2 b/tests/offset/shape_type_i_c/WA2 new file mode 100644 index 0000000000..9026f1207e --- /dev/null +++ b/tests/offset/shape_type_i_c/WA2 @@ -0,0 +1,8 @@ +restore [locate_data_file bug33298_trimmed.brep] s + +OFFSETSHAPE 35 {} $calcul $type + +checkprops result -v 7.3756e+07 + +checknbshapes result -shell 1 + diff --git a/tests/offset/shape_type_i_c/XZ3 b/tests/offset/shape_type_i_c/XZ3 index 263dde8f44..33bbd3c833 100644 --- a/tests/offset/shape_type_i_c/XZ3 +++ b/tests/offset/shape_type_i_c/XZ3 @@ -1,8 +1,7 @@ puts "TODO CR27414 ALL: Error: number of wire entities in the result" puts "TODO CR27414 ALL: Error: number of face entities in the result" -puts "TODO CR27414 ALL: Error: operation with offset value 9 has failed" puts "TODO CR27414 ALL: Error: operation with offset value 10 has failed" -puts "TODO CR27414 ALL: Operations with following offset values have failed: 9 10" +puts "TODO CR27414 ALL: Operations with following offset values have failed: 10" puts "=============================================================================================" puts "0032333: Modeling Algorithms - Empty(wrong) result of offset operation in mode \"Complete\" join type \"Intersection\"" From ce4d2940746294b59a858b97c790f836b46e776e Mon Sep 17 00:00:00 2001 From: akaftasev Date: Wed, 4 Jan 2023 14:47:00 +0300 Subject: [PATCH 450/639] 0033306: Modeling Algorithm - Crash in TrimEdge() method Added condition to not cut the edges by closely located parameters --- src/BRepFill/BRepFill_CompatibleWires.cxx | 20 ++++++++++++++++++++ tests/bugs/modalg_8/bug33306 | 11 +++++++++++ 2 files changed, 31 insertions(+) create mode 100644 tests/bugs/modalg_8/bug33306 diff --git a/src/BRepFill/BRepFill_CompatibleWires.cxx b/src/BRepFill/BRepFill_CompatibleWires.cxx index bc80acbe44..0fbf3bd666 100644 --- a/src/BRepFill/BRepFill_CompatibleWires.cxx +++ b/src/BRepFill/BRepFill_CompatibleWires.cxx @@ -351,6 +351,10 @@ static void TrimEdge (const TopoDS_Edge& CurrentEdge, for (j=1; j<=ndec; j++) { // piece of edge m1 = (CutValues.Value(j)-t0)*(last-first)/(t1-t0)+first; + if (Abs(m0 - m1) < Precision::Confusion()) + { + return; + } TopoDS_Edge CutE = BRepLib_MakeEdge(C,V0,Vbid,m0,m1); CutE.Orientation(CurrentOrient); S.Append(CutE); @@ -358,6 +362,10 @@ static void TrimEdge (const TopoDS_Edge& CurrentEdge, V0 = TopExp::LastVertex(CutE); if (j==ndec) { // last piece + if (Abs(m0 - last) < Precision::Confusion()) + { + return; + } TopoDS_Edge LastE = BRepLib_MakeEdge(C,V0,Vl,m0,last); LastE.Orientation(CurrentOrient); S.Append(LastE); @@ -371,6 +379,10 @@ static void TrimEdge (const TopoDS_Edge& CurrentEdge, for (j=ndec; j>=1; j--) { // piece of edge m0 = (CutValues.Value(j)-t0)*(last-first)/(t1-t0)+first; + if (Abs(m0 - m1) < Precision::Confusion()) + { + return; + } TopoDS_Edge CutE = BRepLib_MakeEdge(C,Vbid,V1,m0,m1); CutE.Orientation(CurrentOrient); S.Append(CutE); @@ -378,6 +390,10 @@ static void TrimEdge (const TopoDS_Edge& CurrentEdge, V1 = TopExp::FirstVertex(CutE); if (j==1) { // last piece + if (Abs(first - m1) < Precision::Confusion()) + { + return; + } TopoDS_Edge LastE = BRepLib_MakeEdge(C,Vf,V1,first,m1); LastE.Orientation(CurrentOrient); S.Append(LastE); @@ -547,6 +563,10 @@ static Standard_Boolean EdgeIntersectOnWire (const gp_Pnt& P1, SR.Clear(); SR.Append(param); TrimEdge(E,SR,first,last,SO,SE); + if (SE.IsEmpty()) + { + return Standard_False; + } theEdgeNewEdges(E) = SE; TopoDS_Vertex VV1,VV2; TopExp::Vertices(TopoDS::Edge(SE.Value(1)),VV1,VV2); diff --git a/tests/bugs/modalg_8/bug33306 b/tests/bugs/modalg_8/bug33306 new file mode 100644 index 0000000000..5021d51d0b --- /dev/null +++ b/tests/bugs/modalg_8/bug33306 @@ -0,0 +1,11 @@ +puts "REQUIRED ALL: Algorithm has failed" + +puts "========================" +puts "0033306: Modeling Algorithm - Crash in TrimEdge() method" +puts "========================" +puts "" + +restore [locate_data_file bug33306_1.brep] w1 +restore [locate_data_file bug33306_2.brep] w2 + +thrusections res 0 0 w1 w2 From 1f469e3781cf48efc39bc7d520c0a2f765c1c87d Mon Sep 17 00:00:00 2001 From: rodrlyra Date: Thu, 12 Jan 2023 16:43:29 +0000 Subject: [PATCH 451/639] 0033305: Coding - BOPTools_PairSelector::Clear method uses "Clear" instead of "clear" on std::vector --- src/BOPTools/BOPTools_PairSelector.hxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/BOPTools/BOPTools_PairSelector.hxx b/src/BOPTools/BOPTools_PairSelector.hxx index 65d79712ee..fc0ab26d25 100644 --- a/src/BOPTools/BOPTools_PairSelector.hxx +++ b/src/BOPTools/BOPTools_PairSelector.hxx @@ -60,7 +60,7 @@ public: //! @name public interfaces //! Clears the indices void Clear() { - myPairs.Clear(); + myPairs.clear(); } //! Sorts the indices From 8b301eb865ea82b0a86bdb7c34f7d4ccf818b23f Mon Sep 17 00:00:00 2001 From: oan Date: Mon, 16 Jan 2023 16:19:06 +0300 Subject: [PATCH 452/639] 0033315: Mesh - BRepMesh_IncrementalMesh takes forever to finish (ends up with system memory, etc) Added test case --- tests/bugs/mesh/bug33315 | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 tests/bugs/mesh/bug33315 diff --git a/tests/bugs/mesh/bug33315 b/tests/bugs/mesh/bug33315 new file mode 100644 index 0000000000..2faa13cd2f --- /dev/null +++ b/tests/bugs/mesh/bug33315 @@ -0,0 +1,24 @@ +puts "========" +puts "0033315: Mesh - BRepMesh_IncrementalMesh takes forever to finish (ends up with system memory, etc)" +puts "========" +puts "" + +restore [locate_data_file bug33315.brep] result + +incmesh result 3.5 -a 20 +checktrinfo result -tri 1516 -nod 1118 + +vinit +vsetdispmode 1 +vdefaults -autoTriang 0 +vdisplay result +vfit + +checkview -screenshot -3d -path ${imagedir}/${test_image}.png + +set log [tricheck result] +if { [llength $log] != 0 } { + puts "Error : Invalid mesh" +} else { + puts "Mesh is OK" +} From 107b57a95529bd9818c2366c3bf533b25606680b Mon Sep 17 00:00:00 2001 From: akaftasev Date: Mon, 16 Jan 2023 14:05:53 +0300 Subject: [PATCH 453/639] 0033311: Modeling Algorithm - No results of thrusection algorithm Changed default value of myPercent --- src/BRepFill/BRepFill_CompatibleWires.cxx | 2 +- tests/bugs/modalg_8/bug33311 | 11 +++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) create mode 100644 tests/bugs/modalg_8/bug33311 diff --git a/src/BRepFill/BRepFill_CompatibleWires.cxx b/src/BRepFill/BRepFill_CompatibleWires.cxx index 0fbf3bd666..7474c7b346 100644 --- a/src/BRepFill/BRepFill_CompatibleWires.cxx +++ b/src/BRepFill/BRepFill_CompatibleWires.cxx @@ -701,7 +701,7 @@ void BRepFill_CompatibleWires::Init(const TopTools_SequenceOfShape& Sections) { myInit = Sections; myWork = Sections; - myPercent = 0.01; + myPercent = 0.1; myStatus = BRepFill_ThruSectionErrorStatus_NotDone; myMap.Clear(); diff --git a/tests/bugs/modalg_8/bug33311 b/tests/bugs/modalg_8/bug33311 new file mode 100644 index 0000000000..fbea75097f --- /dev/null +++ b/tests/bugs/modalg_8/bug33311 @@ -0,0 +1,11 @@ +puts "========================" +puts "0033311: Modeling Algorithm - No results of thrusection algorithm" +puts "========================" +puts "" + +restore [locate_data_file bug33311_1.brep] w1 +restore [locate_data_file bug33311_2.brep] w2 + +thrusections res 0 0 w1 w2 + +checkview -display res -2d -path ${imagedir}/${test_image}.png From fc72568ba93908db4e3d9d657a0c8d4b6afe5aa1 Mon Sep 17 00:00:00 2001 From: dorlov Date: Thu, 12 Jan 2023 11:39:07 +0000 Subject: [PATCH 454/639] 0033312: Data Exchange - NULL-dereference in StepToTopoDS_TranslateShell::Init() The condition "if" was changed to opposite --- src/StepToTopoDS/StepToTopoDS_TranslateShell.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/StepToTopoDS/StepToTopoDS_TranslateShell.cxx b/src/StepToTopoDS/StepToTopoDS_TranslateShell.cxx index b011d8adbf..95da76d86a 100644 --- a/src/StepToTopoDS/StepToTopoDS_TranslateShell.cxx +++ b/src/StepToTopoDS/StepToTopoDS_TranslateShell.cxx @@ -138,7 +138,7 @@ void StepToTopoDS_TranslateShell::Init(const Handle(StepVisual_TessellatedShell) { Handle(TransferBRep_ShapeBinder) aBinder = Handle(TransferBRep_ShapeBinder)::DownCast(aTP->Find(theTSh->TopologicalLink())); - if (aBinder.IsNull()) + if (!aBinder.IsNull()) { aSh = aBinder->Shell(); theHasGeom = Standard_True; From 3c7c705d776b15cf13c9416591bbede935446304 Mon Sep 17 00:00:00 2001 From: vro Date: Tue, 24 Jan 2023 09:48:33 +0000 Subject: [PATCH 455/639] 0033320: Data Exchange - Reading of a VRML file with a long line fails Implement rolling back input stream to split on possible logical parts by comma or space. --- src/VrmlData/VrmlData_Scene.cxx | 68 ++++++++++++++++++++++++--------- tests/de_mesh/vrml_read/A5 | 16 ++++++++ 2 files changed, 67 insertions(+), 17 deletions(-) create mode 100644 tests/de_mesh/vrml_read/A5 diff --git a/src/VrmlData/VrmlData_Scene.cxx b/src/VrmlData/VrmlData_Scene.cxx index ec8acc331c..1c851aab42 100644 --- a/src/VrmlData/VrmlData_Scene.cxx +++ b/src/VrmlData/VrmlData_Scene.cxx @@ -194,29 +194,63 @@ const Handle(VrmlData_WorldInfo)& VrmlData_Scene::WorldInfo() const //purpose : //======================================================================= -VrmlData_ErrorStatus VrmlData_Scene::readLine (VrmlData_InBuffer& theBuffer) +VrmlData_ErrorStatus VrmlData_Scene::readLine(VrmlData_InBuffer& theBuffer) { VrmlData_ErrorStatus aStatus = VrmlData_StatusOK; if (theBuffer.Input.eof()) - aStatus = VrmlData_EndOfFile; - else { - theBuffer.Input.getline (theBuffer.Line, sizeof(theBuffer.Line)); - theBuffer.LineCount++; - const int stat = theBuffer.Input.rdstate(); - if (stat & std::ios::badbit) { - aStatus = VrmlData_UnrecoverableError; - } - else if (stat & std::ios::failbit) { - if (stat & std::ios::eofbit) { - aStatus = VrmlData_EndOfFile; - } - else { - aStatus = VrmlData_GeneralError; + { + return VrmlData_EndOfFile; + } + // Read a line. + theBuffer.Input.getline(theBuffer.Line, sizeof(theBuffer.Line)); + + // Check the number of read symbols. + // If maximum number is read, process the array of symbols separately + // rolling back the array to the last comma or space symbol. + std::streamsize aNbChars = theBuffer.Input.gcount(); + if (theBuffer.Input.rdstate() & std::ios::failbit && + aNbChars == sizeof(theBuffer.Line) - 1) + { + // Clear the error. + // We will fix it here below. + theBuffer.Input.clear(); + size_t anInd = aNbChars - 1; + for (; anInd > 0; anInd--) + { + Standard_Character aChar = theBuffer.Line[anInd]; + if (aChar == ',' || aChar == ' ') + { + theBuffer.Line[anInd + 1] = '\0'; + break; } } - theBuffer.LinePtr = &theBuffer.Line[0]; - theBuffer.IsProcessed = Standard_False; + if (anInd == 0) // no possible to rolling back + { + return VrmlData_UnrecoverableError; + } + theBuffer.Input.seekg(-(aNbChars - anInd - 1), std::ios::cur); + } + + // Check the reading status. + theBuffer.LineCount++; + const int stat = theBuffer.Input.rdstate(); + if (stat & std::ios::badbit) + { + aStatus = VrmlData_UnrecoverableError; + } + else if (stat & std::ios::failbit) + { + if (stat & std::ios::eofbit) + { + aStatus = VrmlData_EndOfFile; + } + else + { + aStatus = VrmlData_GeneralError; + } } + theBuffer.LinePtr = &theBuffer.Line[0]; + theBuffer.IsProcessed = Standard_False; return aStatus; } diff --git a/tests/de_mesh/vrml_read/A5 b/tests/de_mesh/vrml_read/A5 new file mode 100644 index 0000000000..ec4c1d9124 --- /dev/null +++ b/tests/de_mesh/vrml_read/A5 @@ -0,0 +1,16 @@ +puts "============" +puts "0033320: Data Exchange - Reading of a VRML file with a long line fails" +puts "============" +puts "" + +set aFile [locate_data_file bug33320_wM_BugBlender_2.wrl] + +catch { Close D } + +ReadVrml D $aFile +vinit Driver1/View_${casename}/${casename} +XDisplay D -dispMode 1 +vfit +checkview -screenshot -3d -path ${imagedir}/${test_image}.png + +Close D From d22b135217f55bec86f9c21fc4bcf519cdcc9256 Mon Sep 17 00:00:00 2001 From: dpasukhi Date: Wed, 11 Jan 2023 11:29:08 +0000 Subject: [PATCH 456/639] 0033307: Data Exchange, Step Import - Crash after reading empty edge loop Fixed problem with empty edge list in the edge loop, mark as a fail entity in this case --- src/RWStepShape/RWStepShape_RWEdgeLoop.cxx | 5 +++++ tests/bugs/step/bug33307 | 11 +++++++++++ 2 files changed, 16 insertions(+) create mode 100644 tests/bugs/step/bug33307 diff --git a/src/RWStepShape/RWStepShape_RWEdgeLoop.cxx b/src/RWStepShape/RWStepShape_RWEdgeLoop.cxx index dd0097813b..f6cc79a34f 100644 --- a/src/RWStepShape/RWStepShape_RWEdgeLoop.cxx +++ b/src/RWStepShape/RWStepShape_RWEdgeLoop.cxx @@ -106,6 +106,11 @@ void RWStepShape_RWEdgeLoop::Check Standard_Boolean headToTail = Standard_True; //Standard_Boolean noIdentVtx = Standard_True; //szv#4:S4163:12Mar99 unused Standard_Integer nbEdg = ent->NbEdgeList(); + if (nbEdg == 0) + { + ach->AddFail("Edge loop contains empty edge list"); + return; + } Handle(StepShape_OrientedEdge) theOE = ent->EdgeListValue(1); Handle(StepShape_Vertex) theVxFrst = theOE->EdgeStart(); Handle(StepShape_Vertex) theVxLst = theOE->EdgeEnd(); diff --git a/tests/bugs/step/bug33307 b/tests/bugs/step/bug33307 new file mode 100644 index 0000000000..feeb6be869 --- /dev/null +++ b/tests/bugs/step/bug33307 @@ -0,0 +1,11 @@ +puts "===================================================" +puts "0033307: Data Exchange, Step Import - Crash after reading empty edge loop" +puts "===================================================" +puts "" + +pload XDE OCAF + +Close D -silent + +ReadStep D [locate_data_file "bug33307.stp"] +Close D From 53eae1a9356ff1451d259b6305c200291d18a395 Mon Sep 17 00:00:00 2001 From: mzernova Date: Mon, 27 Dec 2021 23:57:13 +0000 Subject: [PATCH 457/639] 0032570: Visualization, AIS_AnimationObject - define rotation around axis When using AIS_AnimationObject, linear interpolation is performed from one gp_Trsf transformation to another. But when an object rotates around a specific axis, the object moves not along a linear trajectory, but along a circle. Therefore, a separate class AIS_AnimationAxisRotation was created that allows to animate rotation around a specific axis. Test case tests/v3d/bugs/bug32570 was added. --- src/AIS/AIS_AnimationAxisRotation.cxx | 51 ++++++++++++ src/AIS/AIS_AnimationAxisRotation.hxx | 53 ++++++++++++ src/AIS/AIS_AnimationObject.cxx | 58 +------------ src/AIS/AIS_AnimationObject.hxx | 28 +++---- src/AIS/AIS_BaseAnimationObject.cxx | 88 ++++++++++++++++++++ src/AIS/AIS_BaseAnimationObject.hxx | 49 +++++++++++ src/AIS/FILES | 4 + src/ViewerTest/ViewerTest_ViewerCommands.cxx | 69 +++++++++++++-- tests/v3d/bugs/bug32570 | 28 +++++++ 9 files changed, 346 insertions(+), 82 deletions(-) create mode 100644 src/AIS/AIS_AnimationAxisRotation.cxx create mode 100644 src/AIS/AIS_AnimationAxisRotation.hxx create mode 100644 src/AIS/AIS_BaseAnimationObject.cxx create mode 100644 src/AIS/AIS_BaseAnimationObject.hxx create mode 100644 tests/v3d/bugs/bug32570 diff --git a/src/AIS/AIS_AnimationAxisRotation.cxx b/src/AIS/AIS_AnimationAxisRotation.cxx new file mode 100644 index 0000000000..a8345cc028 --- /dev/null +++ b/src/AIS/AIS_AnimationAxisRotation.cxx @@ -0,0 +1,51 @@ +// Copyright (c) 2023 OPEN CASCADE SAS +// +// This file is part of Open CASCADE Technology software library. +// +// This library is free software; you can redistribute it and/or modify it under +// the terms of the GNU Lesser General Public License version 2.1 as published +// by the Free Software Foundation, with special exception defined in the file +// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT +// distribution for complete text of the license and disclaimer of any warranty. +// +// Alternatively, this file may be used under the terms of Open CASCADE +// commercial license or contractual agreement. + +#include + +IMPLEMENT_STANDARD_RTTIEXT(AIS_AnimationAxisRotation, AIS_BaseAnimationObject) + +//============================================================================= +//function : Constructor +//purpose : +//============================================================================= +AIS_AnimationAxisRotation::AIS_AnimationAxisRotation (const TCollection_AsciiString& theAnimationName, + const Handle(AIS_InteractiveContext)& theContext, + const Handle(AIS_InteractiveObject)& theObject, + const gp_Ax1& theAxis, + const Standard_Real theAngleStart, + const Standard_Real theAngleEnd) +: AIS_BaseAnimationObject (theAnimationName, theContext, theObject), + myRotAxis (theAxis), + myAngleStart (theAngleStart), + myAngleEnd (theAngleEnd) +{ + // +} + +//============================================================================= +//function : update +//purpose : +//============================================================================= +void AIS_AnimationAxisRotation::update (const AIS_AnimationProgress& theProgress) +{ + if (myObject.IsNull()) + { + return; + } + + gp_Trsf aTrsf; + Standard_Real aCurrentAngle = (1.0 - theProgress.LocalNormalized) * myAngleStart + theProgress.LocalNormalized * myAngleEnd; + aTrsf.SetRotation (myRotAxis, aCurrentAngle); + updateTrsf (aTrsf); +} diff --git a/src/AIS/AIS_AnimationAxisRotation.hxx b/src/AIS/AIS_AnimationAxisRotation.hxx new file mode 100644 index 0000000000..599f3ac6f3 --- /dev/null +++ b/src/AIS/AIS_AnimationAxisRotation.hxx @@ -0,0 +1,53 @@ +// Copyright (c) 2023 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 _AIS_AnimationAxisRotation_HeaderFile +#define _AIS_AnimationAxisRotation_HeaderFile + +#include +#include + +//! Animation defining object transformation. +class AIS_AnimationAxisRotation : public AIS_BaseAnimationObject +{ + DEFINE_STANDARD_RTTIEXT(AIS_AnimationAxisRotation, AIS_BaseAnimationObject) +public: + + //! Constructor with initialization. + //! @param[in] theAnimationName animation identifier + //! @param[in] theContext interactive context where object have been displayed + //! @param[in] theObject object to apply rotation + //! @param[in] theAxis rotation axis + //! @param[in] theAngleStart rotation angle at the start of animation + //! @param[in] theAngleEnd rotation angle at the end of animation + Standard_EXPORT AIS_AnimationAxisRotation (const TCollection_AsciiString& theAnimationName, + const Handle(AIS_InteractiveContext)& theContext, + const Handle(AIS_InteractiveObject)& theObject, + const gp_Ax1& theAxis, + const Standard_Real theAngleStart, + const Standard_Real theAngleEnd); + +protected: + + //! Update the progress. + Standard_EXPORT virtual void update (const AIS_AnimationProgress& theProgress) Standard_OVERRIDE; + +private: + + gp_Ax1 myRotAxis; //!< rotation axis + Standard_Real myAngleStart; //!< start angle for rotation + Standard_Real myAngleEnd; //!< end angle for rotation + +}; + +#endif // _AIS_AnimationAxisRotation_HeaderFile diff --git a/src/AIS/AIS_AnimationObject.cxx b/src/AIS/AIS_AnimationObject.cxx index faff48f054..dbe6bd637b 100644 --- a/src/AIS/AIS_AnimationObject.cxx +++ b/src/AIS/AIS_AnimationObject.cxx @@ -14,10 +14,7 @@ #include -#include -#include - -IMPLEMENT_STANDARD_RTTIEXT(AIS_AnimationObject, AIS_Animation) +IMPLEMENT_STANDARD_RTTIEXT(AIS_AnimationObject, AIS_BaseAnimationObject) //============================================================================= //function : Constructor @@ -28,9 +25,7 @@ AIS_AnimationObject::AIS_AnimationObject (const TCollection_AsciiString& theAnim const Handle(AIS_InteractiveObject)& theObject, const gp_Trsf& theTrsfStart, const gp_Trsf& theTrsfEnd) -: AIS_Animation (theAnimationName), - myContext (theContext), - myObject (theObject), +: AIS_BaseAnimationObject (theAnimationName, theContext, theObject), myTrsfLerp (theTrsfStart, theTrsfEnd) { // @@ -49,52 +44,5 @@ void AIS_AnimationObject::update (const AIS_AnimationProgress& theProgress) gp_Trsf aTrsf; myTrsfLerp.Interpolate (theProgress.LocalNormalized, aTrsf); - if (!myContext.IsNull()) - { - myContext->SetLocation (myObject, aTrsf); - invalidateViewer(); - } - else - { - myObject->SetLocalTransformation (aTrsf); - } -} - -//============================================================================= -//function : invalidateViewer -//purpose : -//============================================================================= -void AIS_AnimationObject::invalidateViewer() -{ - if (myContext.IsNull()) - { - return; - } - - const Standard_Boolean isImmediate = myContext->CurrentViewer()->ZLayerSettings (myObject->ZLayer()).IsImmediate(); - if (!isImmediate) - { - myContext->CurrentViewer()->Invalidate(); - return; - } - - // Invalidate immediate view only if it is going out of z-fit range. - // This might be sub-optimal performing this for each animated objects in case of many animated objects. - for (V3d_ListOfView::Iterator aDefViewIter = myContext->CurrentViewer()->DefinedViewIterator(); - aDefViewIter.More(); aDefViewIter.Next()) - { - const Handle(V3d_View)& aView = aDefViewIter.Value(); - const Bnd_Box aMinMaxBox = aView->View()->MinMaxValues (Standard_False); - const Bnd_Box aGraphicBox = aView->View()->MinMaxValues (Standard_True); - Standard_Real aZNear = 0.0; - Standard_Real aZFar = 0.0; - if (aView->Camera()->ZFitAll (aDefViewIter.Value()->AutoZFitScaleFactor(), aMinMaxBox, aGraphicBox, aZNear, aZFar)) - { - if (aZNear < aView->Camera()->ZNear() - || aZFar > aView->Camera()->ZFar()) - { - aDefViewIter.Value()->Invalidate(); - } - } - } + updateTrsf (aTrsf); } diff --git a/src/AIS/AIS_AnimationObject.hxx b/src/AIS/AIS_AnimationObject.hxx index 5202c231e2..f3892896fc 100644 --- a/src/AIS/AIS_AnimationObject.hxx +++ b/src/AIS/AIS_AnimationObject.hxx @@ -15,24 +15,23 @@ #ifndef _AIS_AnimationObject_HeaderFile #define _AIS_AnimationObject_HeaderFile -#include -#include +#include #include //! Animation defining object transformation. -class AIS_AnimationObject : public AIS_Animation +class AIS_AnimationObject : public AIS_BaseAnimationObject { - DEFINE_STANDARD_RTTIEXT(AIS_AnimationObject, AIS_Animation) + DEFINE_STANDARD_RTTIEXT(AIS_AnimationObject, AIS_BaseAnimationObject) public: //! Constructor with initialization. //! Note that start/end transformations specify exactly local transformation of the object, //! not the transformation to be applied to existing local transformation. - //! @param theAnimationName animation identifier - //! @param theContext interactive context where object have been displayed - //! @param theObject object to apply local transformation - //! @param theTrsfStart local transformation at the start of animation (e.g. theObject->LocalTransformation()) - //! @param theTrsfEnd local transformation at the end of animation + //! @param[in] theAnimationName animation identifier + //! @param[in] theContext interactive context where object have been displayed + //! @param[in] theObject object to apply local transformation + //! @param[in] theTrsfStart local transformation at the start of animation (e.g. theObject->LocalTransformation()) + //! @param[in] theTrsfEnd local transformation at the end of animation Standard_EXPORT AIS_AnimationObject (const TCollection_AsciiString& theAnimationName, const Handle(AIS_InteractiveContext)& theContext, const Handle(AIS_InteractiveObject)& theObject, @@ -44,17 +43,10 @@ protected: //! Update the progress. Standard_EXPORT virtual void update (const AIS_AnimationProgress& theProgress) Standard_OVERRIDE; - //! Invalidate the viewer for proper update. - Standard_EXPORT void invalidateViewer(); +private: -protected: - - Handle(AIS_InteractiveContext) myContext; //!< context where object is displayed - Handle(AIS_InteractiveObject) myObject; //!< presentation object to set location - gp_TrsfNLerp myTrsfLerp; //!< interpolation tool + gp_TrsfNLerp myTrsfLerp; //!< interpolation tool }; -DEFINE_STANDARD_HANDLE(AIS_AnimationObject, AIS_Animation) - #endif // _AIS_AnimationObject_HeaderFile diff --git a/src/AIS/AIS_BaseAnimationObject.cxx b/src/AIS/AIS_BaseAnimationObject.cxx new file mode 100644 index 0000000000..d9c28e3c75 --- /dev/null +++ b/src/AIS/AIS_BaseAnimationObject.cxx @@ -0,0 +1,88 @@ +// Copyright (c) 2023 OPEN CASCADE SAS +// +// This file is part of Open CASCADE Technology software library. +// +// This library is free software; you can redistribute it and/or modify it under +// the terms of the GNU Lesser General Public License version 2.1 as published +// by the Free Software Foundation, with special exception defined in the file +// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT +// distribution for complete text of the license and disclaimer of any warranty. +// +// Alternatively, this file may be used under the terms of Open CASCADE +// commercial license or contractual agreement. + +#include + +#include + +IMPLEMENT_STANDARD_RTTIEXT(AIS_BaseAnimationObject, AIS_Animation) + +//============================================================================= +//function : Constructor +//purpose : +//============================================================================= +AIS_BaseAnimationObject::AIS_BaseAnimationObject (const TCollection_AsciiString& theAnimationName, + const Handle(AIS_InteractiveContext)& theContext, + const Handle(AIS_InteractiveObject)& theObject) +: AIS_Animation (theAnimationName), + myContext (theContext), + myObject (theObject) +{ + // +} + +//============================================================================= +//function : updateTrsf +//purpose : +//============================================================================= +void AIS_BaseAnimationObject::updateTrsf (const gp_Trsf& theTrsf) +{ + if (!myContext.IsNull()) + { + myContext->SetLocation (myObject, theTrsf); + invalidateViewer(); + } + else + { + myObject->SetLocalTransformation (theTrsf); + } +} + +//============================================================================= +//function : invalidateViewer +//purpose : +//============================================================================= +void AIS_BaseAnimationObject::invalidateViewer() +{ + if (myContext.IsNull()) + { + return; + } + + const Standard_Boolean isImmediate = myContext->CurrentViewer()->ZLayerSettings (myObject->ZLayer()).IsImmediate(); + if (!isImmediate) + { + myContext->CurrentViewer()->Invalidate(); + return; + } + + // Invalidate immediate view only if it is going out of z-fit range. + // This might be sub-optimal performing this for each animated objects in case of many animated objects. + for (V3d_ListOfView::Iterator aDefViewIter = myContext->CurrentViewer()->DefinedViewIterator(); + aDefViewIter.More(); aDefViewIter.Next()) + { + const Handle(V3d_View)& aView = aDefViewIter.Value(); + const Bnd_Box aMinMaxBox = aView->View()->MinMaxValues (Standard_False); + const Bnd_Box aGraphicBox = aView->View()->MinMaxValues (Standard_True); + Standard_Real aZNear = 0.0; + Standard_Real aZFar = 0.0; + if (aView->Camera()->ZFitAll (aDefViewIter.Value()->AutoZFitScaleFactor(), aMinMaxBox, aGraphicBox, aZNear, aZFar)) + { + if (aZNear < aView->Camera()->ZNear() + || aZFar > aView->Camera()->ZFar()) + { + aDefViewIter.Value()->Invalidate(); + } + } + } +} diff --git a/src/AIS/AIS_BaseAnimationObject.hxx b/src/AIS/AIS_BaseAnimationObject.hxx new file mode 100644 index 0000000000..8df788dc30 --- /dev/null +++ b/src/AIS/AIS_BaseAnimationObject.hxx @@ -0,0 +1,49 @@ +// Copyright (c) 2023 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 _AIS_BaseAnimationObject_HeaderFile +#define _AIS_BaseAnimationObject_HeaderFile + +#include +#include + +//! Animation defining object transformation. +class AIS_BaseAnimationObject : public AIS_Animation +{ + DEFINE_STANDARD_RTTIEXT(AIS_BaseAnimationObject, AIS_Animation) +protected: + + //! Constructor with initialization. + //! @param[in] theAnimationName animation identifier + //! @param[in] theContext interactive context where object have been displayed + //! @param[in] theObject object to apply local transformation + Standard_EXPORT AIS_BaseAnimationObject (const TCollection_AsciiString& theAnimationName, + const Handle(AIS_InteractiveContext)& theContext, + const Handle(AIS_InteractiveObject)& theObject); + + //! Update the transformation. + Standard_EXPORT void updateTrsf (const gp_Trsf& theTrsf); + +private: + + //! Invalidate the viewer for proper update. + Standard_EXPORT void invalidateViewer(); + +protected: + + Handle(AIS_InteractiveContext) myContext; //!< context where object is displayed + Handle(AIS_InteractiveObject) myObject; //!< presentation object to set location + +}; + +#endif // _AIS_BaseAnimationObject_HeaderFile diff --git a/src/AIS/FILES b/src/AIS/FILES index beaf64b459..980326d955 100644 --- a/src/AIS/FILES +++ b/src/AIS/FILES @@ -2,6 +2,8 @@ AIS.hxx AIS_Animation.cxx AIS_Animation.hxx AIS_AnimationTimer.hxx +AIS_AnimationAxisRotation.cxx +AIS_AnimationAxisRotation.hxx AIS_AnimationCamera.cxx AIS_AnimationCamera.hxx AIS_AnimationObject.cxx @@ -12,6 +14,8 @@ AIS_Axis.cxx AIS_Axis.hxx AIS_BadEdgeFilter.cxx AIS_BadEdgeFilter.hxx +AIS_BaseAnimationObject.cxx +AIS_BaseAnimationObject.hxx AIS_C0RegularityFilter.cxx AIS_C0RegularityFilter.hxx AIS_CameraFrustum.cxx diff --git a/src/ViewerTest/ViewerTest_ViewerCommands.cxx b/src/ViewerTest/ViewerTest_ViewerCommands.cxx index dd2389fa33..15ad3942b3 100644 --- a/src/ViewerTest/ViewerTest_ViewerCommands.cxx +++ b/src/ViewerTest/ViewerTest_ViewerCommands.cxx @@ -20,6 +20,7 @@ #include +#include #include #include #include @@ -7596,6 +7597,11 @@ static Standard_Integer VAnimation (Draw_Interpretor& theDI, gp_XYZ aLocPnts [2] = { aTrsfs[0].TranslationPart(), aTrsfs[1].TranslationPart() }; Standard_Real aScales [2] = { aTrsfs[0].ScaleFactor(), aTrsfs[1].ScaleFactor() }; Standard_Boolean isTrsfSet = Standard_False; + + gp_Ax1 anAxis; + Standard_Real anAngles[2] = { 0.0, 0.0 }; + Standard_Boolean isAxisRotationSet = Standard_False; + Standard_Integer aTrsfArgIter = anArgIter + 1; for (; aTrsfArgIter < theArgNb; ++aTrsfArgIter) { @@ -7643,13 +7649,45 @@ static Standard_Integer VAnimation (Draw_Interpretor& theDI, } aScales[anIndex] = aScaleStr.RealValue(); } + else if (aTrsfArg == "-axis") + { + isAxisRotationSet = Standard_True; + gp_XYZ anOrigin, aDirection; + if (aTrsfArgIter + 6 >= theArgNb + || !parseXYZ (theArgVec + aTrsfArgIter + 1, anOrigin) + || !parseXYZ (theArgVec + aTrsfArgIter + 4, aDirection)) + { + Message::SendFail() << "Syntax error at " << aTrsfArg; + return 1; + } + anAxis.SetLocation (anOrigin); + anAxis.SetDirection (aDirection); + aTrsfArgIter += 6; + } + else if (aTrsfArg.StartsWith ("-ang")) + { + isAxisRotationSet = Standard_True; + if (++aTrsfArgIter >= theArgNb) + { + Message::SendFail() << "Syntax error at " << aTrsfArg; + return 1; + } + + const TCollection_AsciiString anAngleStr (theArgVec[aTrsfArgIter]); + if (!anAngleStr.IsRealValue (Standard_True)) + { + Message::SendFail() << "Syntax error at " << aTrsfArg; + return 1; + } + anAngles[anIndex] = anAngleStr.RealValue(); + } else { anArgIter = aTrsfArgIter - 1; break; } } - if (!isTrsfSet) + if (!isTrsfSet && !isAxisRotationSet) { Message::SendFail() << "Syntax error at " << anArg; return 1; @@ -7658,15 +7696,23 @@ static Standard_Integer VAnimation (Draw_Interpretor& theDI, { anArgIter = theArgNb; } + Handle(AIS_BaseAnimationObject) anObjAnimation; + if (isTrsfSet) + { + aTrsfs[0].SetRotation (aRotQuats[0]); + aTrsfs[1].SetRotation (aRotQuats[1]); + aTrsfs[0].SetTranslationPart (aLocPnts[0]); + aTrsfs[1].SetTranslationPart (aLocPnts[1]); + aTrsfs[0].SetScaleFactor (aScales[0]); + aTrsfs[1].SetScaleFactor (aScales[1]); - aTrsfs[0].SetRotation (aRotQuats[0]); - aTrsfs[1].SetRotation (aRotQuats[1]); - aTrsfs[0].SetTranslationPart (aLocPnts[0]); - aTrsfs[1].SetTranslationPart (aLocPnts[1]); - aTrsfs[0].SetScaleFactor (aScales[0]); - aTrsfs[1].SetScaleFactor (aScales[1]); - - Handle(AIS_AnimationObject) anObjAnimation = new AIS_AnimationObject (anAnimation->Name(), aCtx, anObject, aTrsfs[0], aTrsfs[1]); + anObjAnimation = new AIS_AnimationObject (anAnimation->Name(), aCtx, anObject, aTrsfs[0], aTrsfs[1]); + } + else + { + anObjAnimation = new AIS_AnimationAxisRotation (anAnimation->Name(), aCtx, anObject, anAxis, + anAngles[0] * (M_PI / 180.0), anAngles[1] * (M_PI / 180.0)); + } replaceAnimation (aParentAnimation, anAnimation, anObjAnimation); } else if (anArg == "-viewtrsf" @@ -14394,6 +14440,11 @@ Object animation: -rotX object Orientations pair (quaternions) -scaleX object Scale factors pair (quaternions) + vanim name -object [-axis OX OY OZ DX DY DZ] [-ang1 A] [-ang2 A] + -axis rotation axis + -ang1 start rotation angle in degrees + -ang2 end rotation angle in degrees + Custom callback: vanim name -invoke "Command Arg1 Arg2 %Pts %LocalPts %Normalized ArgN" diff --git a/tests/v3d/bugs/bug32570 b/tests/v3d/bugs/bug32570 new file mode 100644 index 0000000000..7d529d4509 --- /dev/null +++ b/tests/v3d/bugs/bug32570 @@ -0,0 +1,28 @@ +puts "============" +puts "0032570: Visualization, AIS_AnimationObject - define rotation around axis" +puts "============" +puts "" + +pload MODELING VISUALIZATION +box b1 2 100 100 -preview +box b2 2 100 100 -preview + +vinit View1 +vdisplay b1 -dispMode 0 +vdisplay b2 -dispMode 1 + +vanimation anim -object b2 -axis 2 100 0 0 0 1 -angle1 0 -angle2 90 -duration 2 +#stop at the middle of the animation (45 degrees) +vanimation anim -play 1 0 +vanimation anim -stop +vfit +vdump ${imagedir}/${casename}.png +set loc1 [vlocation b2] + +vlocation b2 -reset -rotate 2 100 0 0 0 1 45 +set loc2 [vlocation b2] + +if {$loc1 != $loc2} { puts "Error: the location at the middle of animation is different from the location after rotating by 45 degrees" } + +puts "Put the following command to start interactive animation:" +puts " vanimation anim -play" From c772c6caa484d3d8737b8eee575531e2ac231878 Mon Sep 17 00:00:00 2001 From: dorlov Date: Thu, 19 Jan 2023 16:20:59 +0000 Subject: [PATCH 458/639] 0030828: Data Exchange - The commands getting shapes from XCAF document should be available in C++ Added two new overloaded methods XCAFDoc_ShapeTool::GetOneShape: one returns TopoDS_Shape from TDF_LabelSequence and the other from a sequence of all top-level shapes which are free --- src/XCAFDoc/XCAFDoc_ShapeTool.cxx | 41 ++++++++++++++++++++++++ src/XCAFDoc/XCAFDoc_ShapeTool.hxx | 9 ++++++ src/XDEDRAW/XDEDRAW_Shapes.cxx | 53 +++++++++++++++---------------- tests/bugs/xde/bug30828 | 16 ++++++++++ 4 files changed, 91 insertions(+), 28 deletions(-) create mode 100644 tests/bugs/xde/bug30828 diff --git a/src/XCAFDoc/XCAFDoc_ShapeTool.cxx b/src/XCAFDoc/XCAFDoc_ShapeTool.cxx index 85e3ecc0e3..67b7691d57 100644 --- a/src/XCAFDoc/XCAFDoc_ShapeTool.cxx +++ b/src/XCAFDoc/XCAFDoc_ShapeTool.cxx @@ -353,6 +353,47 @@ TopoDS_Shape XCAFDoc_ShapeTool::GetShape(const TDF_Label& L) return aShape; } +//======================================================================= +//function : GetShapes +//purpose : +//======================================================================= +TopoDS_Shape XCAFDoc_ShapeTool::GetOneShape(const TDF_LabelSequence& theLabels) +{ + TopoDS_Shape aShape; + if (theLabels.Length() == 1) + { + return GetShape(theLabels.Value(1)); + } + TopoDS_Compound aCompound; + BRep_Builder aBuilder; + aBuilder.MakeCompound(aCompound); + for (TDF_LabelSequence::Iterator anIt(theLabels); anIt.More(); anIt.Next()) + { + TopoDS_Shape aFreeShape; + if (!GetShape(anIt.Value(), aFreeShape)) + { + continue; + } + aBuilder.Add(aCompound, aFreeShape); + } + if (aCompound.NbChildren() > 0) + { + aShape = aCompound; + } + return aShape; +} + +//======================================================================= +//function : GetOneShape +//purpose : +//======================================================================= +TopoDS_Shape XCAFDoc_ShapeTool::GetOneShape() const +{ + TDF_LabelSequence aLabels; + GetFreeShapes(aLabels); + return GetOneShape(aLabels); +} + //======================================================================= //function : NewShape //purpose : diff --git a/src/XCAFDoc/XCAFDoc_ShapeTool.hxx b/src/XCAFDoc/XCAFDoc_ShapeTool.hxx index 100b0f6b10..752688afa6 100644 --- a/src/XCAFDoc/XCAFDoc_ShapeTool.hxx +++ b/src/XCAFDoc/XCAFDoc_ShapeTool.hxx @@ -196,6 +196,15 @@ public: //! For component, returns new shape with correct location //! Returns Null shape if label does not contain shape Standard_EXPORT static TopoDS_Shape GetShape (const TDF_Label& L); + + //! Gets shape from a sequence of shape's labels + //! @param[in] theLabels a sequence of labels to get shapes from + //! @return original shape in case of one label and a compound of shapes in case of more + Standard_EXPORT static TopoDS_Shape GetOneShape(const TDF_LabelSequence& theLabels); + + //! Gets shape from a sequence of all top-level shapes which are free + //! @return original shape in case of one label and a compound of shapes in case of more + Standard_EXPORT TopoDS_Shape GetOneShape() const; //! Creates new (empty) top-level shape. //! Initially it holds empty TopoDS_Compound diff --git a/src/XDEDRAW/XDEDRAW_Shapes.cxx b/src/XDEDRAW/XDEDRAW_Shapes.cxx index dc0edf0b5e..eeb7a8bb3e 100644 --- a/src/XDEDRAW/XDEDRAW_Shapes.cxx +++ b/src/XDEDRAW/XDEDRAW_Shapes.cxx @@ -509,40 +509,37 @@ static Standard_Integer getFreeShapes (Draw_Interpretor& di, Standard_Integer ar return 0; } -static Standard_Integer getOneShape (Draw_Interpretor& di, Standard_Integer argc, const char** argv) +//======================================================================= +//function : getOneShape +//purpose : +//======================================================================= +static Standard_Integer getOneShape (Draw_Interpretor& theDI, + Standard_Integer theNbArgs, + const char** theArgVec) { - if (argc!=3) { - di<<"Use: "<Main()); - STool->GetFreeShapes(Labels); - if ( Labels.Length() <=0 ) { - di << "Document " << argv[2] << " contain no shapes\n"; - return 0; - } - - if ( Labels.Length() ==1 ) { - TopoDS_Shape S = STool->GetShape ( Labels.Value(1) ); - DBRep::Set ( argv[1], S ); + Handle(TDocStd_Document) aDoc; + DDocStd::GetDocument(theArgVec[2], aDoc); + if ( aDoc.IsNull() ) + { + theDI << "Error: " << theArgVec[2] << " is not a document\n"; + return 1; } - else { - TopoDS_Compound C; - BRep_Builder B; - B.MakeCompound ( C ); - for ( Standard_Integer i = 1; i<= Labels.Length(); i++) { - TopoDS_Shape S = STool->GetShape ( Labels.Value(i) ); - B.Add ( C, S ); - } - DBRep::Set ( argv[1], C ); + + Handle(XCAFDoc_ShapeTool) aSTool = XCAFDoc_DocumentTool::ShapeTool(aDoc->Main()); + TopoDS_Shape aShape = aSTool->GetOneShape(); + if (aShape.IsNull()) + { + theDI << "Error: Document " << theArgVec[2] << " contain no shapes\n"; + return 1; } - di << argv[1]; + DBRep::Set (theArgVec[1], aShape); + theDI << theArgVec[1]; return 0; } diff --git a/tests/bugs/xde/bug30828 b/tests/bugs/xde/bug30828 new file mode 100644 index 0000000000..ea34f27561 --- /dev/null +++ b/tests/bugs/xde/bug30828 @@ -0,0 +1,16 @@ +puts "=======" +puts "0030828: Data Exchange - The commands getting shapes from XCAF document should be available in C++" +puts "=======" + +pload OCAF +XNewDoc D +box b1 10 10 10 +XAddShape D b1 1 +XGetOneShape b D +checknbshapes b -shape 34 +box b2 10 10 10 +ttranslate b2 20 0 0 +XAddShape D b2 1 +XGetOneShape c D +checknbshapes c -shape 69 -compound 1 +Close D -silent From b0afa94d10cabb2709524aaa29d4f490cf3faa58 Mon Sep 17 00:00:00 2001 From: mzernova Date: Tue, 22 Nov 2022 11:30:24 +0000 Subject: [PATCH 459/639] 0027848: Visualization - sensitivity of lines is too high Improved objects sorting by depth. The sensitivity calculation for the manipulator has been changed. Now the sensitivity of the elements of the manipulator depends on its size. Also fixed the problem of erroneous selection of unfilled circles (SelectMgr_Frustum::hasCircleOverlap() function). Test case vselect/bugs/bug27848 added. --- src/AIS/AIS_Manipulator.cxx | 102 +++++++++++---------- src/SelectMgr/SelectMgr_Frustum.lxx | 21 ++--- src/SelectMgr/SelectMgr_SortCriterion.hxx | 25 ++++- src/SelectMgr/SelectMgr_ViewerSelector.cxx | 2 +- tests/v3d/dimensions/bug24389 | 2 +- tests/v3d/manipulator/drag_in_2d_view | 4 +- tests/v3d/manipulator/dragg | 2 +- tests/v3d/manipulator/rotate | 10 +- tests/v3d/manipulator/translate | 2 +- tests/vselect/bugs/bug23012 | 2 +- tests/vselect/bugs/bug23539_2 | 2 +- tests/vselect/bugs/bug27848 | 23 +++++ tests/vselect/edge/A10 | 16 ++-- 13 files changed, 128 insertions(+), 85 deletions(-) create mode 100644 tests/vselect/bugs/bug27848 diff --git a/src/AIS/AIS_Manipulator.cxx b/src/AIS/AIS_Manipulator.cxx index a6f739bdb0..4cd43844b8 100644 --- a/src/AIS/AIS_Manipulator.cxx +++ b/src/AIS/AIS_Manipulator.cxx @@ -1116,18 +1116,23 @@ void AIS_Manipulator::ComputeSelection (const Handle(SelectMgr_Selection)& theSe const Standard_Integer theMode) { //Check mode - AIS_ManipulatorMode aMode = (AIS_ManipulatorMode) theMode; + const AIS_ManipulatorMode aMode = (AIS_ManipulatorMode) theMode; if (aMode == AIS_MM_None) { return; } Handle(SelectMgr_EntityOwner) anOwner; - if (aMode == AIS_MM_None) - { - anOwner = new SelectMgr_EntityOwner (this, 5); - } - if (aMode == AIS_MM_Translation || aMode == AIS_MM_None) + // Sensitivity calculation for manipulator parts allows to avoid + // overlapping of sensitive areas when size of manipulator is small. + // Sensitivity is calculated relative to the default size of the manipulator (100.0f). + const Standard_ShortReal aSensitivityCoef = myAxes[0].Size() / 100.0f; + const Standard_Integer aHighSensitivity = Max (Min (RealToInt (aSensitivityCoef * 15), 15), 3); // clamp sensitivity within range [3, 15] + const Standard_Integer aLowSensitivity = Max (Min (RealToInt (aSensitivityCoef * 10), 10), 2); // clamp sensitivity within range [2, 10] + + switch (aMode) + { + case AIS_MM_Translation: { for (Standard_Integer anIt = 0; anIt < 3; ++anIt) { @@ -1136,23 +1141,21 @@ void AIS_Manipulator::ComputeSelection (const Handle(SelectMgr_Selection)& theSe continue; } const Axis& anAxis = myAxes[anIt]; - if (aMode != AIS_MM_None) - { - anOwner = new AIS_ManipulatorOwner (this, anIt, AIS_MM_Translation, 9); - } + anOwner = new AIS_ManipulatorOwner(this, anIt, AIS_MM_Translation, 9); + // define sensitivity by line - Handle(Select3D_SensitiveSegment) aLine = new Select3D_SensitiveSegment (anOwner, gp::Origin(), anAxis.TranslatorTipPosition()); - aLine->SetSensitivityFactor (15); + Handle(Select3D_SensitiveSegment) aLine = new Select3D_SensitiveSegment(anOwner, gp::Origin(), anAxis.TranslatorTipPosition()); + aLine->SetSensitivityFactor (aHighSensitivity); theSelection->Add (aLine); // enlarge sensitivity by triangulation - Handle(Select3D_SensitivePrimitiveArray) aTri = new Select3D_SensitivePrimitiveArray (anOwner); + Handle(Select3D_SensitivePrimitiveArray) aTri = new Select3D_SensitivePrimitiveArray(anOwner); aTri->InitTriangulation (anAxis.TriangleArray()->Attributes(), anAxis.TriangleArray()->Indices(), TopLoc_Location()); theSelection->Add (aTri); } + break; } - - if (aMode == AIS_MM_Rotation || aMode == AIS_MM_None) + case AIS_MM_Rotation: { for (Standard_Integer anIt = 0; anIt < 3; ++anIt) { @@ -1161,22 +1164,20 @@ void AIS_Manipulator::ComputeSelection (const Handle(SelectMgr_Selection)& theSe continue; } const Axis& anAxis = myAxes[anIt]; - if (aMode != AIS_MM_None) - { - anOwner = new AIS_ManipulatorOwner (this, anIt, AIS_MM_Rotation, 9); - } + anOwner = new AIS_ManipulatorOwner(this, anIt, AIS_MM_Rotation, 9); + // define sensitivity by circle - const gp_Circ aGeomCircle (gp_Ax2 (gp::Origin(), anAxis.ReferenceAxis().Direction()), anAxis.RotatorDiskRadius()); - Handle(Select3D_SensitiveCircle) aCircle = new ManipSensCircle (anOwner, aGeomCircle); - aCircle->SetSensitivityFactor (15); - theSelection->Add (aCircle); + const gp_Circ aGeomCircle (gp_Ax2(gp::Origin(), anAxis.ReferenceAxis().Direction()), anAxis.RotatorDiskRadius()); + Handle(Select3D_SensitiveCircle) aCircle = new ManipSensCircle(anOwner, aGeomCircle); + aCircle->SetSensitivityFactor (aLowSensitivity); + theSelection->Add(aCircle); // enlarge sensitivity by triangulation - Handle(Select3D_SensitiveTriangulation) aTri = new ManipSensTriangulation (anOwner, myAxes[anIt].RotatorDisk().Triangulation(), anAxis.ReferenceAxis().Direction()); + Handle(Select3D_SensitiveTriangulation) aTri = new ManipSensTriangulation(anOwner, myAxes[anIt].RotatorDisk().Triangulation(), anAxis.ReferenceAxis().Direction()); theSelection->Add (aTri); } + break; } - - if (aMode == AIS_MM_Scaling || aMode == AIS_MM_None) + case AIS_MM_Scaling: { for (Standard_Integer anIt = 0; anIt < 3; ++anIt) { @@ -1184,21 +1185,19 @@ void AIS_Manipulator::ComputeSelection (const Handle(SelectMgr_Selection)& theSe { continue; } - if (aMode != AIS_MM_None) - { - anOwner = new AIS_ManipulatorOwner (this, anIt, AIS_MM_Scaling, 9); - } + anOwner = new AIS_ManipulatorOwner(this, anIt, AIS_MM_Scaling, 9); + // define sensitivity by point - Handle(Select3D_SensitivePoint) aPnt = new Select3D_SensitivePoint (anOwner, myAxes[anIt].ScalerCubePosition()); - aPnt->SetSensitivityFactor (15); + Handle(Select3D_SensitivePoint) aPnt = new Select3D_SensitivePoint(anOwner, myAxes[anIt].ScalerCubePosition()); + aPnt->SetSensitivityFactor (aHighSensitivity); theSelection->Add (aPnt); // enlarge sensitivity by triangulation - Handle(Select3D_SensitiveTriangulation) aTri = new Select3D_SensitiveTriangulation (anOwner, myAxes[anIt].ScalerCube().Triangulation(), TopLoc_Location(), Standard_True); + Handle(Select3D_SensitiveTriangulation) aTri = new Select3D_SensitiveTriangulation(anOwner, myAxes[anIt].ScalerCube().Triangulation(), TopLoc_Location(), Standard_True); theSelection->Add (aTri); } + break; } - - if (aMode == AIS_MM_TranslationPlane || aMode == AIS_MM_None) + case AIS_MM_TranslationPlane: { for (Standard_Integer anIt = 0; anIt < 3; ++anIt) { @@ -1206,28 +1205,33 @@ void AIS_Manipulator::ComputeSelection (const Handle(SelectMgr_Selection)& theSe { continue; } - if (aMode != AIS_MM_None) - { - anOwner = new AIS_ManipulatorOwner(this, anIt, AIS_MM_TranslationPlane, 9); - } + anOwner = new AIS_ManipulatorOwner(this, anIt, AIS_MM_TranslationPlane, 9); // define sensitivity by two crossed lines - gp_Pnt aP1, aP2; - aP1 = myAxes[((anIt + 1) % 3)].TranslatorTipPosition(); - aP2 = myAxes[((anIt + 2) % 3)].TranslatorTipPosition(); + Standard_Real aSensitivityOffset = ZoomPersistence() ? aHighSensitivity * (0.5 + M_SQRT2) : 0.0; + gp_Pnt aP1 = myAxes[((anIt + 1) % 3)].TranslatorTipPosition().Translated (myAxes[((anIt + 2) % 3)].ReferenceAxis().Direction().XYZ() * aSensitivityOffset); + gp_Pnt aP2 = myAxes[((anIt + 2) % 3)].TranslatorTipPosition().Translated (myAxes[((anIt + 1) % 3)].ReferenceAxis().Direction().XYZ() * aSensitivityOffset); gp_XYZ aMidP = (aP1.XYZ() + aP2.XYZ()) / 2.0; + gp_XYZ anOrig = aMidP.Normalized().Multiplied (aSensitivityOffset); Handle(Select3D_SensitiveSegment) aLine1 = new Select3D_SensitiveSegment(anOwner, aP1, aP2); - aLine1->SetSensitivityFactor(10); - theSelection->Add(aLine1); - Handle(Select3D_SensitiveSegment) aLine2 = new Select3D_SensitiveSegment(anOwner, gp::Origin(), aMidP); - aLine2->SetSensitivityFactor(10); - theSelection->Add(aLine2); + aLine1->SetSensitivityFactor(aLowSensitivity); + theSelection->Add (aLine1); + Handle(Select3D_SensitiveSegment) aLine2 = new Select3D_SensitiveSegment(anOwner, anOrig, aMidP); + aLine2->SetSensitivityFactor (aLowSensitivity); + theSelection->Add (aLine2); // enlarge sensitivity by triangulation - Handle(Select3D_SensitiveTriangulation) aTri = new Select3D_SensitiveTriangulation(anOwner, myAxes[anIt].DraggerSector().Triangulation(), TopLoc_Location(), Standard_True); - theSelection->Add(aTri); + Handle(Select3D_SensitiveTriangulation) aTri = new Select3D_SensitiveTriangulation(anOwner, myAxes[anIt].DraggerSector().Triangulation(), TopLoc_Location(), Standard_True); + theSelection->Add (aTri); } + break; + } + default: + { + anOwner = new SelectMgr_EntityOwner(this, 5); + break; + } } } diff --git a/src/SelectMgr/SelectMgr_Frustum.lxx b/src/SelectMgr/SelectMgr_Frustum.lxx index c01e50b6bf..882e74a37d 100644 --- a/src/SelectMgr/SelectMgr_Frustum.lxx +++ b/src/SelectMgr/SelectMgr_Frustum.lxx @@ -869,32 +869,27 @@ Standard_Boolean SelectMgr_Frustum::hasCircleOverlap (const Standard_Real the const gp_Pnt aCenterProject (aCoefA * aTCenter, aCoefB * aTCenter, aCoefC * aTCenter); - if (isDotInside (aCenterProject, aVertices)) - { - return true; - } - Standard_Boolean isInside = true; + const Standard_Boolean isCenterInside = isDotInside (aCenterProject, aVertices); + + Standard_Boolean isInside = false; for (Standard_Integer anIdx = aVertices.Lower(); anIdx <= aVertices.Upper(); anIdx++) { if (aVertices.Value (anIdx).Distance (aCenterProject) > theRadius) { - isInside = false; + isInside = true; break; } } if (theInside != NULL) { - *theInside = false; - } - - if (!theIsFilled && isInside) - { - return false; + *theInside = isInside && isCenterInside; } - return isInside; + return theIsFilled + ? !isInside || (isCenterInside && isInside) + : isInside && isCenterInside; } //======================================================================= diff --git a/src/SelectMgr/SelectMgr_SortCriterion.hxx b/src/SelectMgr/SelectMgr_SortCriterion.hxx index 6a0d9065d3..183965efc5 100644 --- a/src/SelectMgr/SelectMgr_SortCriterion.hxx +++ b/src/SelectMgr/SelectMgr_SortCriterion.hxx @@ -58,12 +58,33 @@ public: return ZLayerPosition > theOther.ZLayerPosition; } - // closest object is selected unless difference is within tolerance - if (Abs (Depth - theOther.Depth) > (Tolerance + theOther.Tolerance)) + // closest object is selected if their depths are not equal within tolerance + if (Abs (Depth - theOther.Depth) > Tolerance + theOther.Tolerance) { return Depth < theOther.Depth; } + Standard_Real aCos = 1.0; + if (Normal.Modulus() > 0 && theOther.Normal.Modulus() > 0) + { + gp_Dir aNormal (Normal.x(), Normal.y(), Normal.z()); + gp_Dir anOtherNormal (theOther.Normal.x(), theOther.Normal.y(), theOther.Normal.z()); + aCos = Abs (Cos (aNormal.Angle (anOtherNormal))); + } + + Standard_Real aDepth = Depth - Tolerance; + Standard_Real anOtherDepth = theOther.Depth - theOther.Tolerance; + // Comparison depths taking into account tolerances occurs when the surfaces are parallel + // or have the same sensitivity and the angle between them is less than 60 degrees. + if (Abs (aDepth - anOtherDepth) > Precision::Confusion()) + { + if ((aCos > 0.5 && Abs (Tolerance - theOther.Tolerance) < Precision::Confusion()) + || Abs (aCos - 1.0) < Precision::Confusion()) + { + return aDepth < anOtherDepth; + } + } + // if two objects have similar depth, select the one with higher priority if (Priority > theOther.Priority) { diff --git a/src/SelectMgr/SelectMgr_ViewerSelector.cxx b/src/SelectMgr/SelectMgr_ViewerSelector.cxx index 4ad9473157..5f86073410 100644 --- a/src/SelectMgr/SelectMgr_ViewerSelector.cxx +++ b/src/SelectMgr/SelectMgr_ViewerSelector.cxx @@ -284,9 +284,9 @@ void SelectMgr_ViewerSelector::checkOverlap (const Handle(Select3D_SensitiveEnti aCriterion.NbOwnerMatches = aPrevCriterion->NbOwnerMatches; if (theMgr.GetActiveSelectionType() != SelectMgr_SelectionType_Box) { + updatePoint3d (aCriterion, aPickResult, theEntity, theInversedTrsf, theMgr); if (aCriterion.IsCloserDepth (*aPrevCriterion)) { - updatePoint3d (aCriterion, aPickResult, theEntity, theInversedTrsf, theMgr); *aPrevCriterion = aCriterion; } } diff --git a/tests/v3d/dimensions/bug24389 b/tests/v3d/dimensions/bug24389 index 76ccda5ec0..666c1a57d3 100644 --- a/tests/v3d/dimensions/bug24389 +++ b/tests/v3d/dimensions/bug24389 @@ -176,7 +176,7 @@ check_picking $pick_coord $check_coord "diameter dimension (diam1)" check_cross_picking $pick_coord diam1 "diameter dimension (diam1)" # check sensitives "diam2" -set pick_coord { { 221 99 } { 285 99 } } +set pick_coord { { 222 99 } { 285 99 } } set check_coord { 239 99 } check_picking $pick_coord $check_coord "diameter dimension (diam2)" check_cross_picking $pick_coord diam2 "diameter dimension (diam2)" diff --git a/tests/v3d/manipulator/drag_in_2d_view b/tests/v3d/manipulator/drag_in_2d_view index 9eef222bb6..a648763549 100644 --- a/tests/v3d/manipulator/drag_in_2d_view +++ b/tests/v3d/manipulator/drag_in_2d_view @@ -15,8 +15,8 @@ vmanipulator m -attach b vdump $imagedir/${casename}_1.png -set mouse_pick {226 214} -set mouse_drag {306 265} +set mouse_pick {231 207} +set mouse_drag {311 258} # note: mouse events cannot be emulated here, so the original bug cannot be reproduced by this test case vmoveto {*}$mouse_pick diff --git a/tests/v3d/manipulator/dragg b/tests/v3d/manipulator/dragg index 7cb67c7f1e..db20f78729 100644 --- a/tests/v3d/manipulator/dragg +++ b/tests/v3d/manipulator/dragg @@ -61,7 +61,7 @@ vdump $anImage2 # ------------------------------------------- set mouse_pick {316 261} -set mouse_drag {279 286} +set mouse_drag {281 286} vmoveto {*}$mouse_pick vselect {*}$mouse_pick diff --git a/tests/v3d/manipulator/rotate b/tests/v3d/manipulator/rotate index 4b87f97fb6..0d2debeaa8 100644 --- a/tests/v3d/manipulator/rotate +++ b/tests/v3d/manipulator/rotate @@ -47,7 +47,7 @@ vmanipulator m -attach c1 -adjustPosition 1 -adjustSize 0 -enableModes 1 -size 4 vmanipulator m -followRotation 1 -set mouse_pick {200 092} +set mouse_pick {199 092} set mouse_drag {176 142} vmoveto {*}$mouse_pick @@ -65,8 +65,8 @@ vdump $anImage1 vmanipulator m -followRotation 1 -set mouse_pick {173 137} -set mouse_drag {233 144} +set mouse_pick {175 135} +set mouse_drag {232 144} vmoveto {*}$mouse_pick vselect {*}$mouse_pick @@ -113,7 +113,7 @@ vmanipulator m -followRotation 0 # test rotation around y axis (world reference frame) # --------------------------------------------------- -set mouse_pick {205 087} +set mouse_pick {205 088} set mouse_drag {232 127} vmoveto {*}$mouse_pick @@ -129,7 +129,7 @@ vdump $anImage4 # test rotation around z axis (world reference frame) # --------------------------------------------------- -set mouse_pick {228 141} +set mouse_pick {228 142} set mouse_drag {184 143} vmoveto {*}$mouse_pick diff --git a/tests/v3d/manipulator/translate b/tests/v3d/manipulator/translate index ddc0ec2563..69daa33716 100644 --- a/tests/v3d/manipulator/translate +++ b/tests/v3d/manipulator/translate @@ -144,7 +144,7 @@ vdump $anImage4 # ---------------------------------------------------- set mouse_pick {199 164} -set mouse_drag {246 177} +set mouse_drag {246 176} vmoveto {*}$mouse_pick vselect {*}$mouse_pick diff --git a/tests/vselect/bugs/bug23012 b/tests/vselect/bugs/bug23012 index de98fe644f..984c036aa0 100644 --- a/tests/vselect/bugs/bug23012 +++ b/tests/vselect/bugs/bug23012 @@ -11,7 +11,7 @@ set x1 210 set y1 184 set x2 207 -set y2 180 +set y2 182 stepread [locate_data_file OCC23012-Sample_3.stp] a * stepread [locate_data_file OCC23012-Sample_9.stp] b * diff --git a/tests/vselect/bugs/bug23539_2 b/tests/vselect/bugs/bug23539_2 index 05659b71b5..5577a18cae 100644 --- a/tests/vselect/bugs/bug23539_2 +++ b/tests/vselect/bugs/bug23539_2 @@ -16,7 +16,7 @@ vselect 300 200 300 60 400 60 407 150 -xor set NbSelected1 [vnbselected] if { ${NbSelected1} != 13 } { puts "Error : Polygonal shift selection doesn't work properly" } -vselect 350 120 -xor +vselect 350 121 -xor set NbSelected1 [vnbselected] if { ${NbSelected1} != 12 } { puts "Error : (case 2)" } diff --git a/tests/vselect/bugs/bug27848 b/tests/vselect/bugs/bug27848 new file mode 100644 index 0000000000..19e4d5a33a --- /dev/null +++ b/tests/vselect/bugs/bug27848 @@ -0,0 +1,23 @@ +puts "=============" +puts "0027848: Visualization - sensitivity of lines is too high" +puts "=============" + +pload VISUALIZATION + +vinit View1 +vclear + +box b 10 10 0.1 +vdisplay b -dispmode 1 + +vline l 0 0 0 10 10 0 +vdisplay l + +vpoint p 20 20 0 + +vtop +vfit + +vselect 100 305 + +if { [string match "*AIS_Line*" [vstate]] } { puts "Error: AIS_Shape should be detected" } diff --git a/tests/vselect/edge/A10 b/tests/vselect/edge/A10 index f42646f62d..2738b8c05c 100644 --- a/tests/vselect/edge/A10 +++ b/tests/vselect/edge/A10 @@ -39,28 +39,28 @@ if { ![check_highlighting 0 $coords] } { puts "ERROR: incorrect highlighting of edge 10" } -vselnext -if { ![check_highlighting 1 $coords] } { - puts "ERROR: incorrect highlighting of edge 2 after vselnext call" -} vselnext if { ![check_highlighting 2 $coords] } { puts "ERROR: incorrect highlighting of edge 1 after vselnext call" } vselnext +if { ![check_highlighting 1 $coords] } { + puts "ERROR: incorrect highlighting of edge 2 after vselnext call" +} +vselnext if { ![check_highlighting 0 $coords] } { puts "ERROR: incorrect highlighting of edge 10 after vselnext call" } -vselprev -if { ![check_highlighting 2 $coords] } { - puts "ERROR: incorrect highlighting of edge 1 after vselprev call" -} vselprev if { ![check_highlighting 1 $coords] } { puts "ERROR: incorrect highlighting of edge 2 after vselprev call" } vselprev +if { ![check_highlighting 2 $coords] } { + puts "ERROR: incorrect highlighting of edge 1 after vselprev call" +} +vselprev if { ![check_highlighting 0 $coords] } { puts "ERROR: incorrect highlighting of edge 10 after vselprev call" } From 47263fa6a30894e7175208183eaefb263057699d Mon Sep 17 00:00:00 2001 From: dpasukhi Date: Thu, 26 Jan 2023 15:24:07 +0000 Subject: [PATCH 460/639] 0033317: Data Exchange, Step Export - Ignoring color attached to the reference shape label Fixed problem with pure referencing. To export reference label to step we convert it to the assembly with one part. All attributes attached to the label should be moved to the new part. For working with it new map contains only pure reference labels, that converted to the part was implemented to the STEPCAFControl_Writer. Updated code style of the STEPCAFControl_Writer Improved ability to export labels from different documents Removed OCCT_Debug macros to print in Trace gravity --- src/STEPCAFControl/STEPCAFControl_Writer.cxx | 4514 +++++++++--------- src/STEPCAFControl/STEPCAFControl_Writer.hxx | 285 +- src/XCAFDoc/XCAFDoc_ColorTool.cxx | 8 +- src/XCAFDoc/XCAFDoc_ColorTool.hxx | 10 +- src/XCAFDoc/XCAFDoc_DimTolTool.cxx | 6 +- src/XCAFDoc/XCAFDoc_DimTolTool.hxx | 14 +- src/XCAFDoc/XCAFDoc_LayerTool.cxx | 16 +- src/XCAFDoc/XCAFDoc_LayerTool.hxx | 2 +- src/XCAFDoc/XCAFDoc_MaterialTool.cxx | 2 +- src/XCAFDoc/XCAFDoc_MaterialTool.hxx | 2 +- src/XCAFDoc/XCAFDoc_VisMaterialTool.cxx | 10 +- src/XCAFDoc/XCAFDoc_VisMaterialTool.hxx | 4 +- tests/bugs/step/bug33317 | 32 + 13 files changed, 2500 insertions(+), 2405 deletions(-) create mode 100644 tests/bugs/step/bug33317 diff --git a/src/STEPCAFControl/STEPCAFControl_Writer.cxx b/src/STEPCAFControl/STEPCAFControl_Writer.cxx index 521d043df4..b9c9a2bee7 100644 --- a/src/STEPCAFControl/STEPCAFControl_Writer.cxx +++ b/src/STEPCAFControl/STEPCAFControl_Writer.cxx @@ -28,7 +28,7 @@ #include #include #include -#include +#include #include #include #include @@ -216,57 +216,54 @@ #include #include -// added by skl 15.01.2004 for D> writing -//#include -//#include -// added by skl 12.02.2004 for writing materials //======================================================================= //function : GetLabelName //purpose : auxiliary function: take name of label and append it to str //======================================================================= -static Standard_Boolean GetLabelName (const TDF_Label &L, Handle(TCollection_HAsciiString) &str) +static Standard_Boolean GetLabelName(const TDF_Label& theL, + Handle(TCollection_HAsciiString)& theStr) { - Handle(TDataStd_Name) N; - if ( ! L.FindAttribute ( TDataStd_Name::GetID(), N ) ) return Standard_False; - TCollection_ExtendedString name = N->Get(); - if ( name.Length() <=0 ) return Standard_False; + Handle(TDataStd_Name) anAttrName; + if (!theL.FindAttribute(TDataStd_Name::GetID(), anAttrName)) + { + return Standard_False; + } + TCollection_ExtendedString aName = anAttrName->Get(); + if (aName.IsEmpty()) + return Standard_False; // set name, removing spaces around it - TCollection_AsciiString buf(name); - buf.LeftAdjust(); - buf.RightAdjust(); - str->AssignCat ( buf.ToCString() ); + TCollection_AsciiString aBuffer(aName); + aBuffer.LeftAdjust(); + aBuffer.RightAdjust(); + theStr->AssignCat(aBuffer.ToCString()); return Standard_True; } - //======================================================================= //function : STEPCAFControl_Writer //purpose : //======================================================================= - -STEPCAFControl_Writer::STEPCAFControl_Writer () : - myColorMode( Standard_True ), - myNameMode ( Standard_True ), - myLayerMode( Standard_True ), - myPropsMode( Standard_True ), - mySHUOMode ( Standard_True ), - myGDTMode ( Standard_True ), - myMatMode ( Standard_True ) +STEPCAFControl_Writer::STEPCAFControl_Writer() : + myColorMode(Standard_True), + myNameMode(Standard_True), + myLayerMode(Standard_True), + myPropsMode(Standard_True), + mySHUOMode(Standard_True), + myGDTMode(Standard_True), + myMatMode(Standard_True) { STEPCAFControl_Controller::Init(); - Handle(XSControl_WorkSession) WS = new XSControl_WorkSession; - Init ( WS ); + Handle(XSControl_WorkSession) aWS = new XSControl_WorkSession; + Init(aWS); } - //======================================================================= //function : STEPCAFControl_Writer //purpose : //======================================================================= - -STEPCAFControl_Writer::STEPCAFControl_Writer (const Handle(XSControl_WorkSession)& WS, - const Standard_Boolean scratch) : +STEPCAFControl_Writer::STEPCAFControl_Writer(const Handle(XSControl_WorkSession)& theWS, + const Standard_Boolean theScratch) : myColorMode(Standard_True), myNameMode(Standard_True), myLayerMode(Standard_True), @@ -276,35 +273,34 @@ STEPCAFControl_Writer::STEPCAFControl_Writer (const Handle(XSControl_WorkSession myMatMode(Standard_True) { STEPCAFControl_Controller::Init(); - Init ( WS, scratch ); + Init(theWS, theScratch); } - //======================================================================= //function : Init //purpose : //======================================================================= - -void STEPCAFControl_Writer::Init (const Handle(XSControl_WorkSession)& WS, - const Standard_Boolean scratch) +void STEPCAFControl_Writer::Init(const Handle(XSControl_WorkSession)& theWS, + const Standard_Boolean theScratch) { - WS->SelectNorm ( "STEP" ); - myWriter.SetWS (WS,scratch); + theWS->SelectNorm("STEP"); + myWriter.SetWS(theWS, theScratch); myFiles.Clear(); myLabEF.Clear(); myLabels.Clear(); + myPureRefLabels.Clear(); + myRootLabels.Clear(); myGDTPresentationDM = new StepVisual_DraughtingModel(); myGDTPrsCurveStyle = new StepVisual_HArray1OfPresentationStyleAssignment(1, 1); } - //======================================================================= //function : Write //purpose : //======================================================================= -IFSelect_ReturnStatus STEPCAFControl_Writer::Write (const Standard_CString theFileName) +IFSelect_ReturnStatus STEPCAFControl_Writer::Write(const Standard_CString theFileName) { - IFSelect_ReturnStatus aStatus = myWriter.Write (theFileName); + IFSelect_ReturnStatus aStatus = myWriter.Write(theFileName); if (aStatus != IFSelect_RetDone) { return aStatus; @@ -313,13 +309,13 @@ IFSelect_ReturnStatus STEPCAFControl_Writer::Write (const Standard_CString theFi // get directory name of the main file TCollection_AsciiString aDirPath; { - OSD_Path aMainFile (theFileName); - aMainFile.SetName (""); - aMainFile.SetExtension (""); - aMainFile.SystemName (aDirPath); + OSD_Path aMainFile(theFileName); + aMainFile.SetName(""); + aMainFile.SetExtension(""); + aMainFile.SystemName(aDirPath); } - for (NCollection_DataMap::Iterator anExtFileIter (myFiles); + for (NCollection_DataMap::Iterator anExtFileIter(myFiles); anExtFileIter.More(); anExtFileIter.Next()) { Handle(STEPCAFControl_ExternFile) anExtFile = anExtFileIter.Value(); @@ -329,17 +325,15 @@ IFSelect_ReturnStatus STEPCAFControl_Writer::Write (const Standard_CString theFi } // construct extern file name - TCollection_AsciiString aFileName = OSD_Path::AbsolutePath (aDirPath, anExtFile->GetName()->String()); + TCollection_AsciiString aFileName = OSD_Path::AbsolutePath(aDirPath, anExtFile->GetName()->String()); if (aFileName.Length() <= 0) { aFileName = anExtFile->GetName()->String(); } -#ifdef OCCT_DEBUG - std::cout << "Writing external file: " << aFileName << std::endl; -#endif - - const IFSelect_ReturnStatus anExtStatus = anExtFile->GetWS()->SendAll (aFileName.ToCString()); - anExtFile->SetWriteStatus (anExtStatus); + Message::SendTrace() << "Writing external file: " << aFileName << "\n"; + + const IFSelect_ReturnStatus anExtStatus = anExtFile->GetWS()->SendAll(aFileName.ToCString()); + anExtFile->SetWriteStatus(anExtStatus); if (anExtStatus != IFSelect_RetDone) { aStatus = anExtStatus; @@ -358,7 +352,7 @@ void STEPCAFControl_Writer::prepareUnit(const TDF_Label& theLabel, { Handle(XCAFDoc_LengthUnit) aLengthAttr; if (!theLabel.IsNull() && - theLabel.Root().FindAttribute(XCAFDoc_LengthUnit::GetID(), aLengthAttr)) + theLabel.Root().FindAttribute(XCAFDoc_LengthUnit::GetID(), aLengthAttr)) { theModel->SetLocalLengthUnit(aLengthAttr->GetUnitValue() * 1000); // convert to mm } @@ -373,7 +367,7 @@ void STEPCAFControl_Writer::prepareUnit(const TDF_Label& theLabel, //function : WriteStream //purpose : //======================================================================= -IFSelect_ReturnStatus STEPCAFControl_Writer::WriteStream (std::ostream& theStream) +IFSelect_ReturnStatus STEPCAFControl_Writer::WriteStream(std::ostream& theStream) { if (!myFiles.IsEmpty()) { @@ -381,185 +375,167 @@ IFSelect_ReturnStatus STEPCAFControl_Writer::WriteStream (std::ostream& theStrea return IFSelect_RetError; } - return myWriter.WriteStream (theStream); + return myWriter.WriteStream(theStream); } //======================================================================= //function : Transfer //purpose : //======================================================================= - -Standard_Boolean STEPCAFControl_Writer::Transfer(const Handle(TDocStd_Document) &doc, - const STEPControl_StepModelType mode, - const Standard_CString multi, +Standard_Boolean STEPCAFControl_Writer::Transfer(const Handle(TDocStd_Document)& theDoc, + const STEPControl_StepModelType theMode, + const Standard_CString theMulti, const Message_ProgressRange& theProgress) { - Handle(XCAFDoc_ShapeTool) STool = XCAFDoc_DocumentTool::ShapeTool( doc->Main() ); - if ( STool.IsNull() ) return Standard_False; + Handle(XCAFDoc_ShapeTool) aShTool = XCAFDoc_DocumentTool::ShapeTool(theDoc->Main()); + if (aShTool.IsNull()) + return Standard_False; - TDF_LabelSequence labels; - STool->GetFreeShapes ( labels ); - return Transfer(myWriter, labels, mode, multi, Standard_False, theProgress); + myRootLabels.Clear(); + myRootLabels.Add(theDoc->Main().Root()); + TDF_LabelSequence aLabels; + aShTool->GetFreeShapes(aLabels); + return transfer(myWriter, aLabels, theMode, theMulti, Standard_False, theProgress); } - //======================================================================= //function : Transfer //purpose : //======================================================================= - -Standard_Boolean STEPCAFControl_Writer::Transfer(const TDF_Label& L, - const STEPControl_StepModelType mode, - const Standard_CString multi, +Standard_Boolean STEPCAFControl_Writer::Transfer(const TDF_Label& theLabel, + const STEPControl_StepModelType theMode, + const Standard_CString theIsMulti, const Message_ProgressRange& theProgress) { - TDF_LabelSequence labels; - labels.Append ( L ); - return Transfer(myWriter, labels, mode, multi, Standard_False, theProgress); + if (theLabel.IsNull()) + { + return Standard_False; + } + TDF_LabelSequence aLabels; + aLabels.Append(theLabel); + myRootLabels.Clear(); + myRootLabels.Add(theLabel.Root()); + return transfer(myWriter, aLabels, theMode, theIsMulti, Standard_False, theProgress); } //======================================================================= //function : Transfer //purpose : //======================================================================= - -Standard_Boolean STEPCAFControl_Writer::Transfer(const TDF_LabelSequence& labels, - const STEPControl_StepModelType mode, - const Standard_CString multi, +Standard_Boolean STEPCAFControl_Writer::Transfer(const TDF_LabelSequence& theLabels, + const STEPControl_StepModelType theMode, + const Standard_CString theIsMulti, const Message_ProgressRange& theProgress) { - return Transfer(myWriter, labels, mode, multi, Standard_False, theProgress); + myRootLabels.Clear(); + for (TDF_LabelSequence::Iterator aLabelIter(theLabels); + aLabelIter.More(); aLabelIter.Next()) + { + const TDF_Label& aLabel = aLabelIter.Value(); + if (!aLabel.IsNull()) + { + myRootLabels.Add(aLabel.Root()); + } + } + return transfer(myWriter, theLabels, theMode, theIsMulti, Standard_False, theProgress); } //======================================================================= //function : Perform //purpose : //======================================================================= - -Standard_Boolean STEPCAFControl_Writer::Perform (const Handle(TDocStd_Document) &doc, - const Standard_CString filename, - const Message_ProgressRange& theProgress) +Standard_Boolean STEPCAFControl_Writer::Perform(const Handle(TDocStd_Document)& theDoc, + const Standard_CString theFileName, + const Message_ProgressRange& theProgress) { - if (!Transfer(doc, STEPControl_AsIs, 0L, theProgress)) return Standard_False; - return Write ( filename ) == IFSelect_RetDone; + if (!Transfer(theDoc, STEPControl_AsIs, 0L, theProgress)) + return Standard_False; + return Write(theFileName) == IFSelect_RetDone; } - //======================================================================= //function : Perform //purpose : //======================================================================= - -Standard_Boolean STEPCAFControl_Writer::Perform (const Handle(TDocStd_Document) &doc, - const TCollection_AsciiString &filename, - const Message_ProgressRange& theProgress) -{ - if ( ! Transfer ( doc, STEPControl_AsIs, 0L, theProgress ) ) return Standard_False; - return Write ( filename.ToCString() ) == IFSelect_RetDone; -} - - -//======================================================================= -//function : ExternFiles -//purpose : -//======================================================================= - -const NCollection_DataMap& STEPCAFControl_Writer::ExternFiles () const +Standard_Boolean STEPCAFControl_Writer::Perform(const Handle(TDocStd_Document)& theDoc, + const TCollection_AsciiString& theFileName, + const Message_ProgressRange& theProgress) { - return myFiles; + if (!Transfer(theDoc, STEPControl_AsIs, 0L, theProgress)) + return Standard_False; + return Write(theFileName.ToCString()) == IFSelect_RetDone; } - //======================================================================= //function : ExternFile //purpose : //======================================================================= - -Standard_Boolean STEPCAFControl_Writer::ExternFile (const TDF_Label &L, - Handle(STEPCAFControl_ExternFile) &ef) const +Standard_Boolean STEPCAFControl_Writer::ExternFile(const TDF_Label& theLabel, + Handle(STEPCAFControl_ExternFile)& theExtFile) const { - ef.Nullify(); - if ( ! myLabEF.IsBound ( L ) ) return Standard_False; - ef = myLabEF.Find ( L ); + theExtFile.Nullify(); + if (!myLabEF.IsBound(theLabel)) + return Standard_False; + theExtFile = myLabEF.Find(theLabel); return Standard_True; } - //======================================================================= //function : ExternFile //purpose : //======================================================================= - -Standard_Boolean STEPCAFControl_Writer::ExternFile (const Standard_CString name, - Handle(STEPCAFControl_ExternFile) &ef) const +Standard_Boolean STEPCAFControl_Writer::ExternFile(const Standard_CString theName, + Handle(STEPCAFControl_ExternFile)& theExtFile) const { - ef.Nullify(); - if ( ! myFiles.IsEmpty() || ! myFiles.IsBound ( name ) ) + theExtFile.Nullify(); + if (!myFiles.IsEmpty() || !myFiles.IsBound(theName)) return Standard_False; - ef = myFiles.Find( name ); + theExtFile = myFiles.Find(theName); return Standard_True; } - -//======================================================================= -//function : Writer -//purpose : -//======================================================================= - -STEPControl_Writer &STEPCAFControl_Writer::ChangeWriter () -{ - return myWriter; -} - - -//======================================================================= -//function : Writer -//purpose : -//======================================================================= - -const STEPControl_Writer &STEPCAFControl_Writer::Writer () const -{ - return myWriter; -} - - //======================================================================= //function : Transfer //purpose : //======================================================================= - -Standard_Boolean STEPCAFControl_Writer::Transfer (STEPControl_Writer &writer, - const TDF_LabelSequence &labels, - const STEPControl_StepModelType mode, - const Standard_CString multi, - const Standard_Boolean isExternFile, - const Message_ProgressRange& theProgress) +Standard_Boolean STEPCAFControl_Writer::transfer(STEPControl_Writer& theWriter, + const TDF_LabelSequence& theLabels, + const STEPControl_StepModelType theMode, + const Standard_CString theIsMulti, + const Standard_Boolean theIsExternFile, + const Message_ProgressRange& theProgress) { - if ( labels.Length() <=0 ) return Standard_False; + if (theLabels.IsEmpty()) + return Standard_False; - Handle(STEPCAFControl_ActorWrite) Actor = - Handle(STEPCAFControl_ActorWrite)::DownCast ( writer.WS()->NormAdaptor()->ActorWrite() ); + Handle(STEPCAFControl_ActorWrite) anActor = + Handle(STEPCAFControl_ActorWrite)::DownCast(theWriter.WS()->NormAdaptor()->ActorWrite()); - const Handle(StepData_StepModel) aModel = Handle(StepData_StepModel)::DownCast(writer.WS()->Model()); - prepareUnit(labels.First(), aModel); // set local length unit to the model + const Handle(StepData_StepModel) aModel = Handle(StepData_StepModel)::DownCast(theWriter.WS()->Model()); + prepareUnit(theLabels.First(), aModel); // set local length unit to the model // translate free top-level shapes of the DECAF document - Standard_Integer ap = Interface_Static::IVal ("write.step.schema"); - TDF_LabelSequence sublabels; - Message_ProgressScope aPS(theProgress, "Labels", labels.Length()); - for ( Standard_Integer i=1; i <= labels.Length() && aPS.More(); i++) + const Standard_Integer aStepSchema = Interface_Static::IVal("write.step.schema"); + TDF_LabelSequence aSubLabels; + Message_ProgressScope aPS(theProgress, "Labels", theLabels.Length()); + // Iterate on requested shapes + for (TDF_LabelSequence::Iterator aLabelIter(theLabels); + aLabelIter.More() && aPS.More(); aLabelIter.Next()) { Message_ProgressRange aRange = aPS.Next(); - TDF_Label L = labels.Value(i); - if ( myLabels.IsBound ( L ) ) continue; // already processed - - TopoDS_Shape shape = XCAFDoc_ShapeTool::GetShape ( L ); - if ( shape.IsNull() ) continue; + TDF_Label aCurL = aLabelIter.Value(); + if (myLabels.IsBound(aCurL)) + continue; // already processed + TopoDS_Shape aCurShape = XCAFDoc_ShapeTool::GetShape(aCurL); + if (aCurShape.IsNull()) + continue; + TopoDS_Shape aShapeForBind = aCurShape; // write shape either as a whole, or as multifile (with extern refs) - if ( ! multi ) { - Actor->SetStdMode ( Standard_False ); + if (!theIsMulti) + { + anActor->SetStdMode(Standard_False); - TDF_LabelSequence comp; + TDF_LabelSequence aCompLabels; //For case when only part of assembly structure should be written in the document //if specified label is component of the assembly then @@ -569,178 +545,180 @@ Standard_Boolean STEPCAFControl_Writer::Transfer (STEPControl_Writer &writer, //For that compound containing only specified component is binded to the label of the high-level assembly. //The such way full structure of high-level assembly was replaced on the assembly containing one component. //For case when free shape reference is (located root) also create an auxiliary assembly. - if ( XCAFDoc_ShapeTool::IsReference ( L ) ) + if (XCAFDoc_ShapeTool::IsReference(aCurL)) { TopoDS_Compound aComp; BRep_Builder aB; aB.MakeCompound(aComp); - aB.Add(aComp, shape); - shape = aComp; - comp.Append(L); - TDF_Label ref; - if ( XCAFDoc_ShapeTool::GetReferredShape ( L, ref ) ) + aB.Add(aComp, aCurShape); + aCurShape = aComp; + myPureRefLabels.Bind(aCurL, aComp); + aCompLabels.Append(aCurL); + TDF_Label aRefL; + if (XCAFDoc_ShapeTool::GetReferredShape(aCurL, aRefL)) { - if(XCAFDoc_ShapeTool::IsAssembly ( ref)) - XCAFDoc_ShapeTool::GetComponents ( ref, comp, Standard_True ); + if (XCAFDoc_ShapeTool::IsAssembly(aRefL)) + XCAFDoc_ShapeTool::GetComponents(aRefL, aCompLabels, Standard_True); } - if ( !XCAFDoc_ShapeTool::IsFree ( L ) ) - L = L.Father(); + if (!XCAFDoc_ShapeTool::IsFree(aCurL)) + aCurL = aCurL.Father(); } else { // fill sequence of (sub) shapes for which attributes should be written // and set actor to handle assemblies in a proper way - if(XCAFDoc_ShapeTool::IsAssembly ( L )) - XCAFDoc_ShapeTool::GetComponents ( L, comp, Standard_True ); + if (XCAFDoc_ShapeTool::IsAssembly(aCurL)) + XCAFDoc_ShapeTool::GetComponents(aCurL, aCompLabels, Standard_True); } - - for ( Standard_Integer k=1; k <= comp.Length(); k++ ) { - TDF_Label ref; - if ( ! XCAFDoc_ShapeTool::GetReferredShape ( comp(k), ref ) ) continue; - if ( ! myLabels.IsBound ( ref ) ) { - TopoDS_Shape refS = XCAFDoc_ShapeTool::GetShape ( ref ); - myLabels.Bind ( ref, refS ); - sublabels.Append ( ref ); - if ( XCAFDoc_ShapeTool::IsAssembly ( ref ) ) - Actor->RegisterAssembly ( refS ); + + for (TDF_LabelSequence::Iterator aCompIter(aCompLabels); aCompIter.More(); aCompIter.Next()) + { + const TDF_Label aCurSubShL = aCompIter.Value(); + if (myLabels.IsBound(aCurSubShL)) + { + continue; + } + const TopoDS_Shape aCurSh = XCAFDoc_ShapeTool::GetShape(aCurSubShL); + if (aCurSh.IsNull()) + { + continue; + } + myLabels.Bind(aCurSubShL, aCurSh); + aSubLabels.Append(aCurSubShL); + TDF_Label aRefL; + if (!XCAFDoc_ShapeTool::GetReferredShape(aCurSubShL, aRefL)) + { + continue; + } + if (!myLabels.IsBound(aRefL)) + { + TopoDS_Shape aRefSh = XCAFDoc_ShapeTool::GetShape(aRefL); + myLabels.Bind(aRefL, aRefSh); + aSubLabels.Append(aRefL); + if (XCAFDoc_ShapeTool::IsAssembly(aRefL)) + { + anActor->RegisterAssembly(aRefSh); + } } } - myLabels.Bind ( L, shape ); - sublabels.Append ( L ); + myLabels.Bind(aCurL, aShapeForBind); + aSubLabels.Append(aCurL); - if ( XCAFDoc_ShapeTool::IsAssembly ( L ) || XCAFDoc_ShapeTool::IsReference ( L ) ) - Actor->RegisterAssembly ( shape ); + if (XCAFDoc_ShapeTool::IsAssembly(aCurL) || XCAFDoc_ShapeTool::IsReference(aCurL)) + anActor->RegisterAssembly(aCurShape); - writer.Transfer(shape, mode, Standard_False, aRange); - Actor->SetStdMode ( Standard_True ); // restore default behaviour + theWriter.Transfer(aCurShape, theMode, Standard_False, aRange); + anActor->SetStdMode(Standard_True); // restore default behaviour } - else { + else + { // translate final solids - Message_ProgressScope aPS1 (aRange, NULL, 2); - TopoDS_Shape Sass = TransferExternFiles(L, mode, sublabels, multi, aPS1.Next()); + Message_ProgressScope aPS1(aRange, NULL, 2); + TopoDS_Shape aSass = transferExternFiles(aCurL, theMode, aSubLabels, theIsMulti, aPS1.Next()); if (aPS1.UserBreak()) return Standard_False; - // translate main assembly structure -/* - if ( ap == 3 ) { // if AP203, switch to AP214 - Interface_Static::SetCVal ("write.step.schema", "AP214DIS"); - Handle(StepData_StepModel) model = - Handle(StepData_StepModel)::DownCast ( writer.WS()->Model() ); - if ( model->HasHeaderEntity(STANDARD_TYPE(HeaderSection_FileSchema)) ) { - Handle(HeaderSection_FileSchema) fs = - Handle(HeaderSection_FileSchema)::DownCast ( model->HeaderEntity(STANDARD_TYPE(HeaderSection_FileSchema)) ); - Handle(TCollection_HAsciiString) str = fs->SchemaIdentifiersValue ( 1 ); - Handle(TCollection_HAsciiString) ap214 = new TCollection_HAsciiString ( "AUTOMOTIVE_DESIGN" ); - if ( str->Search ( ap214 ) <0 ) { - str->Clear(); - str->AssignCat ( ap214 ); - } - } - } -*/ - Standard_Integer assemblymode = Interface_Static::IVal ("write.step.assembly"); - Interface_Static::SetCVal ("write.step.assembly", "On"); - writer.Transfer ( Sass, STEPControl_AsIs, Standard_True, aPS1.Next()); - Interface_Static::SetIVal ("write.step.assembly", assemblymode); - Interface_Static::SetIVal ("write.step.schema", ap); + Standard_Integer assemblymode = Interface_Static::IVal("write.step.assembly"); + Interface_Static::SetCVal("write.step.assembly", "On"); + theWriter.Transfer(aSass, STEPControl_AsIs, Standard_True, aPS1.Next()); + Interface_Static::SetIVal("write.step.assembly", assemblymode); } } if (aPS.UserBreak()) return Standard_False; - writer.WS()->ComputeGraph(Standard_True );// added by skl 03.11.2003 since we use - // writer.Transfer() without compute graph + theWriter.WS()->ComputeGraph(Standard_True); // Setting to clear and regenerate graph // write names - if ( GetNameMode() ) - WriteNames ( writer.WS(), sublabels ); + if (GetNameMode()) + writeNames(theWriter.WS(), aSubLabels); - if ( !multi ) { + if (!theIsMulti) + { // write colors - if ( GetColorMode() ) - WriteColors ( writer.WS(), sublabels ); - + if (GetColorMode()) + writeColors(theWriter.WS(), aSubLabels); + // write layers - if ( GetLayerMode() ) - WriteLayers ( writer.WS(), sublabels ); + if (GetLayerMode()) + writeLayers(theWriter.WS(), aSubLabels); // write SHUO entities - if ( GetSHUOMode() && !isExternFile ) + if (GetSHUOMode() && !theIsExternFile) // do not store SHUO for extern reference for the moment - WriteSHUOs ( writer.WS(), sublabels ); - + writeSHUOs(theWriter.WS(), aSubLabels); + // write G&DTs - if(GetDimTolMode()) { - if (ap == 5) { - WriteDGTsAP242(writer.WS(), sublabels); + if (GetDimTolMode()) + { + if (aStepSchema == 5) + { + writeDGTsAP242(theWriter.WS(), aSubLabels); } - else { - WriteDGTs(writer.WS(), sublabels); + else + { + writeDGTs(theWriter.WS(), aSubLabels); } } // write Materials - if(GetMaterialMode()) - WriteMaterials(writer.WS(),sublabels); + if (GetMaterialMode()) + writeMaterials(theWriter.WS(), aSubLabels); // register all MDGPRs in model - MoniTool_DataMapIteratorOfDataMapOfShapeTransient anItr(myMapCompMDGPR); - for (; anItr.More(); anItr.Next()) - aModel->AddWithRefs( anItr.Value() ); + for (MoniTool_DataMapIteratorOfDataMapOfShapeTransient anItr(myMapCompMDGPR); + anItr.More(); anItr.Next()) + { + aModel->AddWithRefs(anItr.Value()); + } } - - if ( multi ) { // external refs - WriteExternRefs ( writer.WS(), sublabels ); + + if (theIsMulti) + { // external refs + writeExternRefs(theWriter.WS(), aSubLabels); } // write validation props -// if ( multi && ap ==3 ) { -// Interface_Static::SetCVal ("write.step.schema", "AP214DIS"); -// } - if ( GetPropsMode() ) - WriteValProps ( writer.WS(), sublabels, multi ); - - Interface_Static::SetIVal ("write.step.schema", ap); + if (GetPropsMode()) + writeValProps(theWriter.WS(), aSubLabels, theIsMulti); // refresh graph - writer.WS()->ComputeGraph ( Standard_True ); - - /* ================================ - * Write names for the sub-shapes - * ================================ */ + theWriter.WS()->ComputeGraph(Standard_True); + // Write names for the sub-shapes if (Interface_Static::IVal("write.stepcaf.subshapes.name") != 0) { - const Handle(XSControl_TransferWriter) &TW = this->ChangeWriter().WS()->TransferWriter(); - const Handle(Transfer_FinderProcess) &FP = TW->FinderProcess(); + const Handle(XSControl_TransferWriter)& TW = this->ChangeWriter().WS()->TransferWriter(); + const Handle(Transfer_FinderProcess)& aFP = TW->FinderProcess(); - for ( int i = 1; i <= sublabels.Length(); i++ ) + // Iterate on requested sub shapes + for (TDF_LabelSequence::Iterator aLabelIter(aSubLabels); + aLabelIter.More(); aLabelIter.Next()) { - TDF_Label L = sublabels.Value(i); + const TDF_Label& aCurL = aLabelIter.Value(); - for ( TDF_ChildIterator it(L, Standard_True); it.More(); it.Next() ) + for (TDF_ChildIterator aChildIter(aCurL, Standard_True); aChildIter.More(); aChildIter.Next()) { - TDF_Label SubL = it.Value(); + const TDF_Label& aSubL = aChildIter.Value(); // Access name recorded in OCAF TDataStd_Name attribute - Handle(TCollection_HAsciiString) hSubName = new TCollection_HAsciiString; - if ( !GetLabelName(SubL, hSubName) ) + Handle(TCollection_HAsciiString) aHSubName = new TCollection_HAsciiString; + if (!GetLabelName(aSubL, aHSubName)) continue; // Access topological data - TopoDS_Shape SubS = XCAFDoc_ShapeTool::GetShape(SubL); - if ( SubS.IsNull() ) + TopoDS_Shape aSubS = XCAFDoc_ShapeTool::GetShape(aSubL); + if (aSubS.IsNull()) continue; // Access the correspondent STEP Representation Item - Handle(StepRepr_RepresentationItem) RI; - Handle(TransferBRep_ShapeMapper) aShMapper = TransferBRep::ShapeMapper(FP, SubS); - if ( !FP->FindTypedTransient(aShMapper, STANDARD_TYPE(StepRepr_RepresentationItem), RI) ) + Handle(StepRepr_RepresentationItem) aRI; + Handle(TransferBRep_ShapeMapper) aShMapper = TransferBRep::ShapeMapper(aFP, aSubS); + if (!aFP->FindTypedTransient(aShMapper, STANDARD_TYPE(StepRepr_RepresentationItem), aRI)) continue; // Record the name - RI->SetName(hSubName); + aRI->SetName(aHSubName); } } } @@ -748,772 +726,770 @@ Standard_Boolean STEPCAFControl_Writer::Transfer (STEPControl_Writer &writer, return Standard_True; } - //======================================================================= -//function : TransferExternFiles +//function : transferExternFiles //purpose : //======================================================================= - -TopoDS_Shape STEPCAFControl_Writer::TransferExternFiles (const TDF_Label &L, - const STEPControl_StepModelType mode, - TDF_LabelSequence &labels, - const Standard_CString prefix, - const Message_ProgressRange& theProgress) +TopoDS_Shape STEPCAFControl_Writer::transferExternFiles(const TDF_Label& theLabel, + const STEPControl_StepModelType theMode, + TDF_LabelSequence& theLabels, + const Standard_CString thePrefix, + const Message_ProgressRange& theProgress) { // if label already translated, just return the shape - if ( myLabels.IsBound ( L ) ) { - return myLabels.Find ( L ); + if (myLabels.IsBound(theLabel)) + { + return myLabels.Find(theLabel); } - TopoDS_Compound C; - BRep_Builder B; - B.MakeCompound ( C ); - //labels.Append ( L ); + TopoDS_Compound aComp; + BRep_Builder aBuilder; + aBuilder.MakeCompound(aComp); // if not assembly, write to separate file - if ( ! XCAFDoc_ShapeTool::IsAssembly ( L ) && !XCAFDoc_ShapeTool::IsComponent ( L )) { - labels.Append ( L ); + if (!XCAFDoc_ShapeTool::IsAssembly(theLabel) && !XCAFDoc_ShapeTool::IsComponent(theLabel)) + { + theLabels.Append(theLabel); // prepare for transfer - Handle(XSControl_WorkSession) newWS = new XSControl_WorkSession; - newWS->SelectNorm ( "STEP" ); - STEPControl_Writer sw ( newWS, Standard_True ); - TDF_LabelSequence Lseq; - Lseq.Append ( L ); + Handle(XSControl_WorkSession) aNewWS = new XSControl_WorkSession; + aNewWS->SelectNorm("STEP"); + STEPControl_Writer aStepWriter(aNewWS, Standard_True); + TDF_LabelSequence aLabelSeq; + aLabelSeq.Append(theLabel); // construct the name for extern file - Handle(TCollection_HAsciiString) basename = new TCollection_HAsciiString; - if ( prefix && prefix[0] ) basename->AssignCat ( prefix ); - GetLabelName ( L, basename ); - Handle(TCollection_HAsciiString) name = new TCollection_HAsciiString ( basename ); - name->AssignCat ( ".stp" ); - if ( myFiles.IsBound( name->ToCString() ) ) { // avoid confusions - for ( Standard_Integer k=1; k < 32000; k++ ) { - name = new TCollection_HAsciiString ( basename ); - name->AssignCat ( "_" ); - name->AssignCat ( TCollection_AsciiString ( k ).ToCString() ); - name->AssignCat ( ".stp" ); - if ( ! myFiles.IsBound ( name->ToCString() ) ) break; + Handle(TCollection_HAsciiString) aBaseName = new TCollection_HAsciiString; + if (thePrefix && thePrefix[0]) aBaseName->AssignCat(thePrefix); + GetLabelName(theLabel, aBaseName); + Handle(TCollection_HAsciiString) aNewName = new TCollection_HAsciiString(aBaseName); + aNewName->AssignCat(".stp"); + if (myFiles.IsBound(aNewName->ToCString())) + { // avoid confusions + for (Standard_Integer k = 1; k < 32000; k++) + { + aNewName = new TCollection_HAsciiString(aBaseName); + aNewName->AssignCat("_"); + aNewName->AssignCat(TCollection_AsciiString(k).ToCString()); + aNewName->AssignCat(".stp"); + if (!myFiles.IsBound(aNewName->ToCString())) break; } } // translate and record extern file - Handle(STEPCAFControl_ExternFile) EF = new STEPCAFControl_ExternFile; - EF->SetWS ( newWS ); - EF->SetName ( name ); - EF->SetLabel ( L ); - Standard_Integer assemblymode = Interface_Static::IVal ("write.step.assembly"); - Interface_Static::SetCVal ("write.step.assembly", "Off"); - const Standard_CString multi = 0; - EF->SetTransferStatus ( Transfer ( sw, Lseq, mode, multi, Standard_True, theProgress) ); - Interface_Static::SetIVal ("write.step.assembly", assemblymode); - myLabEF.Bind ( L, EF ); - myFiles.Bind ( name->ToCString(), EF ); + Handle(STEPCAFControl_ExternFile) anExtFile = new STEPCAFControl_ExternFile; + anExtFile->SetWS(aNewWS); + anExtFile->SetName(aNewName); + anExtFile->SetLabel(theLabel); + Standard_Integer anAssemblymode = Interface_Static::IVal("write.step.assembly"); + Interface_Static::SetCVal("write.step.assembly", "Off"); + const Standard_CString anIsMulti = 0; + anExtFile->SetTransferStatus(transfer(aStepWriter, aLabelSeq, theMode, anIsMulti, Standard_True, theProgress)); + Interface_Static::SetIVal("write.step.assembly", anAssemblymode); + myLabEF.Bind(theLabel, anExtFile); + myFiles.Bind(aNewName->ToCString(), anExtFile); // return empty compound as replacement for the shape - myLabels.Bind ( L, C ); - return C; + myLabels.Bind(theLabel, aComp); + return aComp; } - TDF_LabelSequence comp; - TDF_Label aCurL = L; + TDF_LabelSequence aCompLabels; + TDF_Label aLabel = theLabel; //if specified shape is component then high-level assembly is considered //to get valid structure with location - if ( XCAFDoc_ShapeTool::IsComponent ( L ) ) + if (XCAFDoc_ShapeTool::IsComponent(theLabel)) { - comp.Append(L); - aCurL = L.Father(); + aCompLabels.Append(theLabel); + aLabel = theLabel.Father(); } // else iterate on components add create structure of empty compounds // representing the assembly - else if (XCAFDoc_ShapeTool::IsAssembly ( L )) - XCAFDoc_ShapeTool::GetComponents ( L, comp, Standard_False ); - - labels.Append ( aCurL ); - Message_ProgressScope aPS(theProgress, NULL, comp.Length()); - for ( Standard_Integer k=1; k <= comp.Length() && aPS.More(); k++ ) { - TDF_Label lab = comp(k); - TDF_Label ref; - if ( ! XCAFDoc_ShapeTool::GetReferredShape ( lab, ref ) ) continue; - TopoDS_Shape Scomp = TransferExternFiles(ref, mode, labels, prefix, aPS.Next()); - Scomp.Location ( XCAFDoc_ShapeTool::GetLocation ( lab ) ); - B.Add ( C, Scomp ); + else if (XCAFDoc_ShapeTool::IsAssembly(theLabel)) + XCAFDoc_ShapeTool::GetComponents(theLabel, aCompLabels, Standard_False); + + theLabels.Append(aLabel); + Message_ProgressScope aPS(theProgress, NULL, aCompLabels.Length()); + // Iterate on requested shapes + for (TDF_LabelSequence::Iterator aLabelIter(aCompLabels); + aLabelIter.More() && aPS.More(); aLabelIter.Next()) + { + const TDF_Label& aCurL = aLabelIter.Value(); + TDF_Label aRefL; + if (!XCAFDoc_ShapeTool::GetReferredShape(aCurL, aRefL)) + continue; + TopoDS_Shape aShComp = transferExternFiles(aRefL, theMode, theLabels, thePrefix, aPS.Next()); + aShComp.Location(XCAFDoc_ShapeTool::GetLocation(aCurL)); + aBuilder.Add(aComp, aShComp); } - myLabels.Bind ( aCurL, C ); - return C; + myLabels.Bind(aLabel, aComp); + return aComp; } - //======================================================================= -//function : WriteExternRefs +//function : writeExternRefs //purpose : //======================================================================= - -Standard_Boolean STEPCAFControl_Writer::WriteExternRefs (const Handle(XSControl_WorkSession) &WS, - const TDF_LabelSequence &labels) const +Standard_Boolean STEPCAFControl_Writer::writeExternRefs(const Handle(XSControl_WorkSession)& theWS, + const TDF_LabelSequence& theLabels) const { - if ( labels.Length() <=0 ) return Standard_False; + if (theLabels.IsEmpty()) + return Standard_False; - const Handle(XSControl_TransferWriter) &TW = WS->TransferWriter(); - const Handle(Transfer_FinderProcess) &FP = TW->FinderProcess(); - STEPConstruct_ExternRefs EFTool ( WS ); - Standard_Integer schema = Interface_Static::IVal("write.step.schema"); - for ( Standard_Integer k=1; k <= labels.Length(); k++ ) { - TDF_Label lab = labels(k); - if ( XCAFDoc_ShapeTool::IsAssembly ( lab ) ) continue; // skip assemblies + const Handle(XSControl_TransferWriter)& aTW = theWS->TransferWriter(); + const Handle(Transfer_FinderProcess)& aFP = aTW->FinderProcess(); + STEPConstruct_ExternRefs anEFTool(theWS); + Standard_Integer aStepSchema = Interface_Static::IVal("write.step.schema"); + // Iterate on requested shapes + for (TDF_LabelSequence::Iterator aLabelIter(theLabels); + aLabelIter.More(); aLabelIter.Next()) + { + const TDF_Label& aLab = aLabelIter.Value(); + if (XCAFDoc_ShapeTool::IsAssembly(aLab)) continue; // skip assemblies // get extern file - Handle(STEPCAFControl_ExternFile) EF; - if ( ! ExternFile ( lab, EF ) ) continue; // should never be + Handle(STEPCAFControl_ExternFile) anExtFile; + if (!ExternFile(aLab, anExtFile)) + continue; // should never be // find SDR - if ( ! myLabels.IsBound ( lab ) ) continue; // not recorded as translated, skip - TopoDS_Shape S = myLabels.Find ( lab ); - - Handle(StepShape_ShapeDefinitionRepresentation) SDR; - Handle(TransferBRep_ShapeMapper) mapper = TransferBRep::ShapeMapper ( FP, S ); - if ( ! FP->FindTypedTransient ( mapper, STANDARD_TYPE(StepShape_ShapeDefinitionRepresentation), SDR ) ) { -#ifdef OCCT_DEBUG - std::cout << "Warning: Cannot find SDR for " << S.TShape()->DynamicType()->Name() << std::endl; -#endif + if (!myLabels.IsBound(aLab)) + continue; // not recorded as translated, skip + TopoDS_Shape aShape = myLabels.Find(aLab); + + Handle(StepShape_ShapeDefinitionRepresentation) aSDR; + Handle(TransferBRep_ShapeMapper) mapper = TransferBRep::ShapeMapper(aFP, aShape); + if (!aFP->FindTypedTransient(mapper, STANDARD_TYPE(StepShape_ShapeDefinitionRepresentation), aSDR)) + { + Message::SendTrace() << "Warning: Cannot find SDR for " << aShape.TShape()->DynamicType()->Name() << "\n"; continue; } // add extern ref - const char* format = (schema == 3 ? "STEP AP203" : "STEP AP214"); + const char* aStepFormat = (aStepSchema == 3 ? "STEP AP203" : "STEP AP214"); // try to get PD from SDR - StepRepr_RepresentedDefinition RD = SDR->Definition(); - Handle(StepRepr_PropertyDefinition) aPropDef = RD.PropertyDefinition(); - if (aPropDef.IsNull()) { -#ifdef OCCT_DEBUG - std::cout << "Warning: STEPCAFControl_Writer::WriteExternRefs StepRepr_PropertyDefinition is null for " << S.TShape()->DynamicType()->Name() << std::endl; -#endif + StepRepr_RepresentedDefinition aRD = aSDR->Definition(); + Handle(StepRepr_PropertyDefinition) aPropDef = aRD.PropertyDefinition(); + if (aPropDef.IsNull()) + { + Message::SendTrace() << "Warning: STEPCAFControl_Writer::writeExternRefs StepRepr_PropertyDefinition is null for " << aShape.TShape()->DynamicType()->Name() << "\n"; continue; } - StepRepr_CharacterizedDefinition CharDef = aPropDef->Definition(); - Handle(StepBasic_ProductDefinition) PD = CharDef.ProductDefinition(); - if (PD.IsNull()) { -#ifdef OCCT_DEBUG - std::cout << "Warning: STEPCAFControl_Writer::WriteExternRefs StepBasic_ProductDefinition is null for " << S.TShape()->DynamicType()->Name() << std::endl; -#endif + StepRepr_CharacterizedDefinition aCharDef = aPropDef->Definition(); + Handle(StepBasic_ProductDefinition) aPD = aCharDef.ProductDefinition(); + if (aPD.IsNull()) + { + Message::SendTrace() << "Warning: STEPCAFControl_Writer::writeExternRefs StepBasic_ProductDefinition is null for " << aShape.TShape()->DynamicType()->Name() << "\n"; continue; } - EFTool.AddExternRef ( EF->GetName()->ToCString(), PD, format ); + anEFTool.AddExternRef(anExtFile->GetName()->ToCString(), aPD, aStepFormat); } - EFTool.WriteExternRefs(schema); + anEFTool.WriteExternRefs(aStepSchema); return Standard_True; } - //======================================================================= //function : FindEntities //purpose : auxiliary //======================================================================= -static Standard_Integer FindEntities (const Handle(Transfer_FinderProcess) &FP, - const TopoDS_Shape &S, - TopLoc_Location &L, - TColStd_SequenceOfTransient &seqRI) +static Standard_Integer FindEntities(const Handle(Transfer_FinderProcess)& theFP, + const TopoDS_Shape& theShape, + TopLoc_Location& theLocation, + TColStd_SequenceOfTransient& theSeqRI) { - Handle(StepRepr_RepresentationItem) item = STEPConstruct::FindEntity ( FP, S, L ); + Handle(StepRepr_RepresentationItem) anItem = STEPConstruct::FindEntity(theFP, theShape, theLocation); - if ( ! item.IsNull() ) { - seqRI.Append ( item ); + if (!anItem.IsNull()) + { + theSeqRI.Append(anItem); return 1; } - + // may be S was splited during shape processing - Handle(TransferBRep_ShapeMapper) mapper = TransferBRep::ShapeMapper ( FP, S ); - Handle(Transfer_Binder) bnd = FP->Find ( mapper ); - if ( bnd.IsNull() ) return 0; - - Handle(Transfer_TransientListBinder) TransientListBinder = + Handle(TransferBRep_ShapeMapper) aMapper = TransferBRep::ShapeMapper(theFP, theShape); + Handle(Transfer_Binder) aBinder = theFP->Find(aMapper); + if (aBinder.IsNull()) + return 0; + + Handle(Transfer_TransientListBinder) aTransientListBinder = //Handle(Transfer_TransientListBinder)::DownCast( bnd->Next(Standard_True) ); - Handle(Transfer_TransientListBinder)::DownCast( bnd ); - Standard_Integer nres=0; - if ( TransientListBinder.IsNull() && S.ShapeType() == TopAbs_COMPOUND) + Handle(Transfer_TransientListBinder)::DownCast(aBinder); + Standard_Integer aResCount = 0; + if (aTransientListBinder.IsNull() && theShape.ShapeType() == TopAbs_COMPOUND) { - for ( TopoDS_Iterator it(S); it.More(); it.Next() ) { - Handle(StepRepr_RepresentationItem) aLocalItem = STEPConstruct::FindEntity ( FP, it.Value(), L ); - if (aLocalItem.IsNull() ) continue; - nres++; - seqRI.Append (aLocalItem); + for (TopoDS_Iterator anIter(theShape); anIter.More(); anIter.Next()) + { + Handle(StepRepr_RepresentationItem) aLocalItem = + STEPConstruct::FindEntity(theFP, anIter.Value(), theLocation); + if (aLocalItem.IsNull()) + continue; + aResCount++; + theSeqRI.Append(aLocalItem); } } - else if(!TransientListBinder.IsNull()) + else if (!aTransientListBinder.IsNull()) { - - const Standard_Integer nb = TransientListBinder->NbTransients(); - for (Standard_Integer i=1; i<=nb; i++) { - Handle(Standard_Transient) t = TransientListBinder->Transient(i); - item = Handle(StepRepr_RepresentationItem)::DownCast(t); - if ( item.IsNull() ) continue; - nres++; - seqRI.Append ( item ); - } - } -/* works but is obsolete: another approach - if (i<=nb) { - TopoDS_Shape comp = TransferBRep::ShapeResult(bnd); - if ( ! comp.IsNull() && comp.ShapeType() < S.ShapeType() ) { - for ( TopoDS_Iterator it(comp); it.More(); it.Next() ) { - MakeSTEPStyles(Styles, it.Value(), settings, STEPstyle, - Map, ( hasOwn ? &style : 0 ) ); - } + const Standard_Integer aNbTransient = aTransientListBinder->NbTransients(); + for (Standard_Integer anInd = 1; anInd <= aNbTransient; anInd++) + { + Handle(Standard_Transient) anEntity = aTransientListBinder->Transient(anInd); + anItem = Handle(StepRepr_RepresentationItem)::DownCast(anEntity); + if (anItem.IsNull()) + continue; + aResCount++; + theSeqRI.Append(anItem); } } -*/ - return nres; + return aResCount; } - //======================================================================= //function : getStyledItem //purpose : auxiliary //======================================================================= -static Standard_Boolean getStyledItem(const TopoDS_Shape& S, - const Handle(XCAFDoc_ShapeTool)& STool, - const STEPConstruct_Styles &Styles, - Handle(StepVisual_StyledItem) &resSelItem, - const MoniTool_DataMapOfShapeTransient& myMapCompMDGPR) +static Standard_Boolean getStyledItem(const TopoDS_Shape& theShape, + const Handle(XCAFDoc_ShapeTool)& theShapeTool, + const STEPConstruct_Styles& theStyles, + Handle(StepVisual_StyledItem)& theResSelItem, + const MoniTool_DataMapOfShapeTransient& theMapCompMDGPR) { - TDF_Label aTopShL = STool->FindShape(S, Standard_False); - TopoDS_Shape aTopLevSh = STool->GetShape( aTopShL ); - Standard_Boolean found = Standard_False; - if ( !aTopLevSh.IsNull() && myMapCompMDGPR.IsBound( aTopLevSh ) ) { - Handle(StepVisual_PresentationRepresentation) aMDGPR = - Handle(StepVisual_PresentationRepresentation)::DownCast( myMapCompMDGPR.Find( aTopLevSh ) ); - Handle(StepRepr_HArray1OfRepresentationItem) anSelItmHArr = aMDGPR->Items(); - // search for PSA of Monifold solid - if ( !anSelItmHArr.IsNull() ) - { - TColStd_SequenceOfTransient aNewseqRI; - Standard_Boolean isFilled = Standard_False; - for (Standard_Integer si = 1; si <= anSelItmHArr->Length() && !found; si++) { - Handle(StepVisual_StyledItem) aSelItm = - Handle(StepVisual_StyledItem)::DownCast(anSelItmHArr->Value(si)); - - if ( aSelItm.IsNull() ) - continue; + const TDF_Label aTopShL = theShapeTool->FindShape(theShape, Standard_False); + TopoDS_Shape aTopLevSh = theShapeTool->GetShape(aTopShL); + Standard_Boolean anIsFound = Standard_False; + if (aTopLevSh.IsNull() || !theMapCompMDGPR.IsBound(aTopLevSh)) + { + return Standard_False; + } + Handle(StepVisual_PresentationRepresentation) aMDGPR = + Handle(StepVisual_PresentationRepresentation)::DownCast(theMapCompMDGPR.Find(aTopLevSh)); + Handle(StepRepr_HArray1OfRepresentationItem) anSelItmHArr = aMDGPR->Items(); + if (anSelItmHArr.IsNull()) + { + return Standard_False; + } + // Search for PSA of Manifold solid + TColStd_SequenceOfTransient aNewSeqRI; + Standard_Boolean isFilled = Standard_False; + for (StepRepr_HArray1OfRepresentationItem::Iterator anIter(anSelItmHArr->Array1()); + anIter.More() && !anIsFound; anIter.Next()) + { + const Handle(StepVisual_StyledItem)& aSelItm = + Handle(StepVisual_StyledItem)::DownCast(anIter.Value()); - // check that it is a stiled item for monifold solid brep - if (!isFilled) - { - TopLoc_Location Loc; - FindEntities(Styles.FinderProcess(), aTopLevSh, Loc, aNewseqRI); - isFilled = Standard_True; - } - if ( aNewseqRI.Length() > 0 ) + if (aSelItm.IsNull()) + { + continue; + } + // Check that it is a styled item for manifold solid brep + if (!isFilled) + { + TopLoc_Location aLoc; + FindEntities(theStyles.FinderProcess(), aTopLevSh, aLoc, aNewSeqRI); + isFilled = Standard_True; + } + if (!aNewSeqRI.IsEmpty()) + { + const Handle(StepRepr_RepresentationItem)& anItem = aSelItm->Item(); + Standard_Boolean isSameMonSolBR = Standard_False; + for (TColStd_SequenceOfTransient::Iterator aIterRI(aNewSeqRI); + aIterRI.More(); aIterRI.Next()) + { + if (!anItem.IsNull() && anItem == aIterRI.Value()) { - - const Handle(StepRepr_RepresentationItem)& anItem = aSelItm->Item(); - Standard_Boolean isSameMonSolBR = Standard_False; - for (Standard_Integer mi = 1; mi <= aNewseqRI.Length(); mi++) { - if ( !anItem.IsNull() && anItem == aNewseqRI.Value( mi ) ) { - isSameMonSolBR = Standard_True; - break; - } - } - if (!isSameMonSolBR) - continue; - } - - - for (Standard_Integer jsi = 1; jsi <= aSelItm->NbStyles() && !found; jsi++) { - const Handle(StepVisual_PresentationStyleAssignment)& aFatherPSA = aSelItm->StylesValue(jsi); - // check for PSA for top-level (not Presentation style by context for NAUO) - if (aFatherPSA.IsNull() || aFatherPSA->IsKind(STANDARD_TYPE(StepVisual_PresentationStyleByContext))) - continue; - resSelItem = aSelItm; - found = Standard_True; + isSameMonSolBR = Standard_True; + break; } } + if (!isSameMonSolBR) + continue; + } + for (StepVisual_HArray1OfPresentationStyleAssignment::Iterator aStyleIter(aSelItm->Styles()->Array1()); + aStyleIter.More() && !anIsFound; aStyleIter.Next()) + { + const Handle(StepVisual_PresentationStyleAssignment)& aFatherPSA = aStyleIter.Value(); + // check for PSA for top-level (not Presentation style by context for NAUO) + if (aFatherPSA.IsNull() || aFatherPSA->IsKind(STANDARD_TYPE(StepVisual_PresentationStyleByContext))) + continue; + theResSelItem = aSelItm; + anIsFound = Standard_True; } } - return found; + return anIsFound; } - //======================================================================= //function : setDefaultInstanceColor //purpose : auxiliary //======================================================================= -static Standard_Boolean setDefaultInstanceColor (const Handle(StepVisual_StyledItem) &aSelItm, - Handle(StepVisual_PresentationStyleAssignment)& PSA) +static Standard_Boolean setDefaultInstanceColor(const Handle(StepVisual_StyledItem)& theStyleItem, + Handle(StepVisual_PresentationStyleAssignment)& thePSA) { - Standard_Boolean found = Standard_False; - for (Standard_Integer jsi = 1; jsi <= aSelItm->NbStyles() && !found; jsi++) { - Handle(StepVisual_PresentationStyleAssignment) aFatherPSA = aSelItm->StylesValue(jsi); - // check for PSA for top-level (not Presentation style by context for NAUO) - if (aFatherPSA.IsNull() || aFatherPSA->IsKind(STANDARD_TYPE(StepVisual_PresentationStyleByContext))) - return Standard_False; - - // get style select from father PSA - if (aFatherPSA->NbStyles() > 0) { - Handle(StepVisual_HArray1OfPresentationStyleSelect) aFatherStyles = - new StepVisual_HArray1OfPresentationStyleSelect(1, aFatherPSA->NbStyles()); - for (Standard_Integer k = 1; k <= aFatherPSA->NbStyles(); k++) { - StepVisual_PresentationStyleSelect PSS; - StepVisual_PresentationStyleSelect olDPSS = aFatherPSA->StylesValue(k); - if (!olDPSS.PointStyle().IsNull()) - PSS.SetValue (olDPSS.PointStyle()); - else if (!olDPSS.CurveStyle().IsNull()) - PSS.SetValue (olDPSS.CurveStyle()); - else if (!olDPSS.SurfaceStyleUsage().IsNull()) - PSS.SetValue (olDPSS.SurfaceStyleUsage()); - else { - found = Standard_False; - break; + Standard_Boolean anIsFound = Standard_False; + for (StepVisual_HArray1OfPresentationStyleAssignment::Iterator aStyleIter(theStyleItem->Styles()->Array1()); + aStyleIter.More() && !anIsFound; aStyleIter.Next()) + { + const Handle(StepVisual_PresentationStyleAssignment)& aFatherPSA = aStyleIter.Value(); + // check for PSA for top-level (not Presentation style by context for NAUO) + if (aFatherPSA.IsNull() || aFatherPSA->IsKind(STANDARD_TYPE(StepVisual_PresentationStyleByContext))) + return Standard_False; + + // get style select from father PSA + if (aFatherPSA->NbStyles() > 0) + { + Handle(StepVisual_HArray1OfPresentationStyleSelect) aFatherStyles = + new StepVisual_HArray1OfPresentationStyleSelect(1, aFatherPSA->NbStyles()); + Standard_Integer aSettingInd = 1; + for (StepVisual_HArray1OfPresentationStyleSelect::Iterator aFatherStyleIter(aFatherPSA->Styles()->Array1()); + aFatherStyleIter.More(); aFatherStyleIter.Next()) + { + StepVisual_PresentationStyleSelect aPSS; + StepVisual_PresentationStyleSelect anOlDPSS = aFatherStyleIter.Value(); + if (!anOlDPSS.PointStyle().IsNull()) + aPSS.SetValue(anOlDPSS.PointStyle()); + else if (!anOlDPSS.CurveStyle().IsNull()) + aPSS.SetValue(anOlDPSS.CurveStyle()); + else if (!anOlDPSS.SurfaceStyleUsage().IsNull()) + aPSS.SetValue(anOlDPSS.SurfaceStyleUsage()); + else + { + anIsFound = Standard_False; + break; + } + aFatherStyles->SetValue(aSettingInd++, anOlDPSS); + anIsFound = Standard_True; + } + // init PSA of NAUO + if (anIsFound) + { + thePSA->Init(aFatherStyles); } - //aFatherStyles->SetValue( k, PSS ); - aFatherStyles->SetValue( k, olDPSS ); - found = Standard_True; - } - // init PSA of NAUO - if (found) { - PSA->Init( aFatherStyles ); } } - - } - return found; + return anIsFound; } - //======================================================================= //function : MakeSTEPStyles //purpose : auxiliary //======================================================================= -static void MakeSTEPStyles (STEPConstruct_Styles &Styles, - const TopoDS_Shape &S, - const XCAFPrs_IndexedDataMapOfShapeStyle &settings, - Handle(StepVisual_StyledItem) &override, - TopTools_MapOfShape &Map, - const MoniTool_DataMapOfShapeTransient& myMapCompMDGPR, - STEPConstruct_DataMapOfAsciiStringTransient &DPDCs, - STEPConstruct_DataMapOfPointTransient &ColRGBs, - const Handle(XCAFDoc_ColorTool)& CTool, - const XCAFPrs_Style *inherit = 0, - const Standard_Boolean isComponent = Standard_False) +static void MakeSTEPStyles(STEPConstruct_Styles& theStyles, + const TopoDS_Shape& theShape, + const XCAFPrs_IndexedDataMapOfShapeStyle& theSettings, + Handle(StepVisual_StyledItem)& theOverride, + TopTools_MapOfShape& theMap, + const MoniTool_DataMapOfShapeTransient& theMapCompMDGPR, + STEPConstruct_DataMapOfAsciiStringTransient& theDPDCs, + STEPConstruct_DataMapOfPointTransient& theColRGBs, + const Handle(XCAFDoc_ShapeTool)& theShTool, + const XCAFPrs_Style* theInherit = 0, + const Standard_Boolean theIsComponent = Standard_False) { // skip already processed shapes - if ( ! Map.Add ( S ) ) return; + if (!theMap.Add(theShape)) + return; // check if shape has its own style (r inherits from ancestor) - XCAFPrs_Style style; - if ( inherit ) style = *inherit; - if ( settings.Contains(S) ) { - XCAFPrs_Style own = settings.FindFromKey(S); - if ( !own.IsVisible() ) style.SetVisibility ( Standard_False ); - if ( own.IsSetColorCurv() ) style.SetColorCurv ( own.GetColorCurv() ); - if ( own.IsSetColorSurf() ) style.SetColorSurf ( own.GetColorSurfRGBA() ); + XCAFPrs_Style aStyle; + if (theInherit) aStyle = *theInherit; + if (theSettings.Contains(theShape)) + { + XCAFPrs_Style anOwnStyle = theSettings.FindFromKey(theShape); + if (!anOwnStyle.IsVisible()) + aStyle.SetVisibility(Standard_False); + if (anOwnStyle.IsSetColorCurv()) + aStyle.SetColorCurv(anOwnStyle.GetColorCurv()); + if (anOwnStyle.IsSetColorSurf()) + aStyle.SetColorSurf(anOwnStyle.GetColorSurfRGBA()); } // translate colors to STEP - Handle(StepVisual_Colour) surfColor, curvColor; - Standard_Real RenderTransp = 0.0; - if ( style.IsSetColorSurf() ) { - Quantity_ColorRGBA sCol = style.GetColorSurfRGBA(); - RenderTransp = 1.0 - sCol.Alpha(); - surfColor = Styles.EncodeColor(sCol.GetRGB(),DPDCs,ColRGBs); + Handle(StepVisual_Colour) aSurfColor, aCurvColor; + Standard_Real aRenderTransp = 0.0; + if (aStyle.IsSetColorSurf()) + { + Quantity_ColorRGBA aSurfCol = aStyle.GetColorSurfRGBA(); + aRenderTransp = 1.0 - aSurfCol.Alpha(); + aSurfColor = theStyles.EncodeColor(aSurfCol.GetRGB(), theDPDCs, theColRGBs); } - if ( style.IsSetColorCurv() ) - curvColor = Styles.EncodeColor(style.GetColorCurv(),DPDCs,ColRGBs); - - Standard_Boolean hasOwn = ( ! surfColor.IsNull() || - ! curvColor.IsNull() || - ! style.IsVisible() ); + if (aStyle.IsSetColorCurv()) + aCurvColor = theStyles.EncodeColor(aStyle.GetColorCurv(), theDPDCs, theColRGBs); + + Standard_Boolean aHasOwn = (!aSurfColor.IsNull() || + !aCurvColor.IsNull() || + !aStyle.IsVisible()); // find target item and assign style to it - Handle(StepVisual_StyledItem) STEPstyle = override; - if ( hasOwn ) { - if ( S.ShapeType() != TopAbs_COMPOUND || isComponent ) { // skip compounds, let subshapes inherit its colors - TopLoc_Location L; - TColStd_SequenceOfTransient seqRI; - Standard_Integer nb = FindEntities ( Styles.FinderProcess(), S, L, seqRI ); -#ifdef OCCT_DEBUG - if ( nb <=0 ) std::cout << "Warning: Cannot find RI for " << S.TShape()->DynamicType()->Name() << std::endl; -#endif + Handle(StepVisual_StyledItem) aSTEPstyle = theOverride; + if (aHasOwn) + { + if (theShape.ShapeType() != TopAbs_COMPOUND || theIsComponent) + { // skip compounds, let subshapes inherit its colors + TopLoc_Location aLocation; + TColStd_SequenceOfTransient aSeqRI; + Standard_Integer aNbEntities = FindEntities(theStyles.FinderProcess(), theShape, aLocation, aSeqRI); + if (aNbEntities <= 0) + Message::SendTrace() << "Warning: Cannot find RI for " << theShape.TShape()->DynamicType()->Name() << "\n"; //Get overridden style gka 10.06.03 - if ( isComponent && nb) - getStyledItem(S, CTool->ShapeTool(), Styles, override,myMapCompMDGPR); - - - for ( Standard_Integer i=1; i <= nb; i++ ) { - Handle(StepRepr_RepresentationItem) item = - Handle(StepRepr_RepresentationItem)::DownCast(seqRI(i)); - Handle(StepVisual_PresentationStyleAssignment) PSA; - if ( style.IsVisible() || !surfColor.IsNull() || !curvColor.IsNull() ) { - PSA = Styles.MakeColorPSA ( item, surfColor, curvColor, surfColor, RenderTransp, isComponent ); + if (theIsComponent && aNbEntities > 0) + getStyledItem(theShape, theShTool, theStyles, theOverride, theMapCompMDGPR); + + for (TColStd_SequenceOfTransient::Iterator anEntIter(aSeqRI); + anEntIter.More(); anEntIter.Next()) + { + const Handle(StepRepr_RepresentationItem)& anItem = + Handle(StepRepr_RepresentationItem)::DownCast(anEntIter.Value()); + Handle(StepVisual_PresentationStyleAssignment) aPSA; + if (aStyle.IsVisible() || !aSurfColor.IsNull() || !aCurvColor.IsNull()) + { + aPSA = theStyles.MakeColorPSA(anItem, aSurfColor, aCurvColor, aSurfColor, aRenderTransp, theIsComponent); } - else { + else + { // default white color - surfColor = Styles.EncodeColor(Quantity_Color(Quantity_NOC_WHITE),DPDCs,ColRGBs); - PSA = Styles.MakeColorPSA ( item, surfColor, curvColor, surfColor, 0.0, isComponent ); - if ( isComponent ) - setDefaultInstanceColor( override, PSA); - + aSurfColor = theStyles.EncodeColor(Quantity_Color(Quantity_NOC_WHITE), theDPDCs, theColRGBs); + aPSA = theStyles.MakeColorPSA(anItem, aSurfColor, aCurvColor, aSurfColor, 0.0, theIsComponent); + if (theIsComponent) + setDefaultInstanceColor(theOverride, aPSA); + } // end of component case - - STEPstyle = Styles.AddStyle ( item, PSA, override ); - hasOwn = Standard_False; + + aSTEPstyle = theStyles.AddStyle(anItem, aPSA, theOverride); + aHasOwn = Standard_False; } } } // iterate on subshapes (except vertices :) - if ( S.ShapeType() == TopAbs_EDGE ) return; - if ( !isComponent ) // PTV 10.02.2003 - for ( TopoDS_Iterator it(S); it.More(); it.Next() ) { - MakeSTEPStyles ( Styles, it.Value(), settings, STEPstyle, - Map, myMapCompMDGPR, DPDCs, ColRGBs, CTool, - ( hasOwn ? &style : 0 ) ); - } -} - -/* -static Standard_Boolean getFatherColor (const TDF_Label& L, - const Handle(XCAFDoc_ColorTool)& CTool, - XCAFPrs_Style& style) -{ - Standard_Boolean done = Standard_False; - TopoDS_Shape aSh = CTool->ShapeTool()->GetShape( L ); - TDF_Label aFL = CTool->ShapeTool()->FindShape( aSh ); - if (aFL.IsNull() || aFL == L) - return done; - Quantity_Color C; - if ( CTool->GetColor ( aFL, XCAFDoc_ColorGen, C ) ) { - style.SetColorCurv ( C ); - style.SetColorSurf ( C ); - done = Standard_True; - } - if ( CTool->GetColor ( aFL, XCAFDoc_ColorSurf, C ) ) { - style.SetColorSurf ( C ); - done = Standard_True; + if (theShape.ShapeType() == TopAbs_EDGE) + return; + if (theIsComponent) + { + return; } - if ( CTool->GetColor ( aFL, XCAFDoc_ColorCurv, C ) ) { - style.SetColorCurv ( C ); - done = Standard_True; + for (TopoDS_Iterator anIter(theShape); anIter.More(); anIter.Next()) + { + MakeSTEPStyles(theStyles, anIter.Value(), theSettings, aSTEPstyle, + theMap, theMapCompMDGPR, theDPDCs, theColRGBs, theShTool, + (aHasOwn ? &aStyle : 0)); } - - return done; } -*/ - //======================================================================= -//function : WriteColors -//purpose : +//function : writeColors +//purpose : //======================================================================= - -Standard_Boolean STEPCAFControl_Writer::WriteColors (const Handle(XSControl_WorkSession) &WS, - const TDF_LabelSequence &labels) +Standard_Boolean STEPCAFControl_Writer::writeColors(const Handle(XSControl_WorkSession)& theWS, + const TDF_LabelSequence& theLabels) { - if ( labels.Length() <=0 ) return Standard_False; - - // Iterate on shapes in the document - Handle(XCAFDoc_ColorTool) CTool = XCAFDoc_DocumentTool::ColorTool( labels(1) ); - Handle(XCAFDoc_VisMaterialTool) aMatTool = XCAFDoc_DocumentTool::VisMaterialTool( labels(1) ); - if ( CTool.IsNull() ) return Standard_False; + if (theLabels.IsEmpty()) + return Standard_False; - STEPConstruct_Styles Styles ( WS ); + STEPConstruct_Styles Styles(theWS); STEPConstruct_DataMapOfAsciiStringTransient DPDCs; STEPConstruct_DataMapOfPointTransient ColRGBs; - for ( Standard_Integer i=1; i <= labels.Length(); i++ ) { - TDF_Label L = labels.Value(i); - - Handle(XCAFDoc_ShapeTool) aSTool = XCAFDoc_DocumentTool::ShapeTool( labels(1) ); + // Iterate on requested shapes + for (TDF_LabelSequence::Iterator aLabelIter(theLabels); + aLabelIter.More(); aLabelIter.Next()) + { + const TDF_Label aLabel = aLabelIter.Value(); + // Iterate on shapes in the document + Handle(XCAFDoc_ShapeTool) aSTool = XCAFDoc_DocumentTool::ShapeTool(aLabel); // Skip assemblies: colors assigned to assemblies and their instances // are not supported (it is not clear how to encode that in STEP) - if ( XCAFDoc_ShapeTool::IsAssembly ( L ) ) { -#ifdef OCCT_DEBUG - std::cout << "Warning: Cannot write color for Assembly" << std::endl; - std::cout << "Info: Check for colors assigned to components in assembly" << std::endl; -#endif + if (XCAFDoc_ShapeTool::IsAssembly(aLabel)) + { + Message::SendTrace() << "Warning: Cannot write color for Assembly" << "\n"; + Message::SendTrace() << "Info: Check for colors assigned to components in assembly" << "\n"; // PTV 22.01.2003 Write color for instances. TDF_LabelSequence compLabels; - if ( aSTool.IsNull() ) - continue; - if (!aSTool->GetComponents(L, compLabels)) + if (!aSTool->GetComponents(aLabel, compLabels)) continue; - WriteColors(WS, compLabels); + writeColors(theWS, compLabels); continue; } Styles.ClearStyles(); // get a target shape and try to find corresponding context // (all the colors set under that label will be put into that context) - TopoDS_Shape S; - if ( ! XCAFDoc_ShapeTool::GetShape ( L, S ) ) continue; - Standard_Boolean isComponent = aSTool->IsComponent( L ); - TopoDS_Shape aTopSh = S; - Handle(StepRepr_RepresentationContext) Context = Styles.FindContext ( S ); - if ( isComponent ) { - TDF_Label aTopShL = aSTool->FindShape(S, Standard_False); + TopoDS_Shape aShape; + if (!XCAFDoc_ShapeTool::GetShape(aLabel, aShape)) + continue; + Standard_Boolean anIsComponent = aSTool->IsComponent(aLabel) || myPureRefLabels.IsBound(aLabel); + TopoDS_Shape aTopSh = aShape; + Handle(StepRepr_RepresentationContext) aContext = Styles.FindContext(aShape); + if (anIsComponent) + { + TDF_Label aTopShL = aSTool->FindShape(aShape, Standard_False); if (aTopShL.IsNull()) continue; - aTopSh = aSTool->GetShape( aTopShL ); - Context = Styles.FindContext ( aTopSh ); + aTopSh = aSTool->GetShape(aTopShL); + aContext = Styles.FindContext(aTopSh); } - if ( Context.IsNull() ) - continue; - + if (aContext.IsNull()) + continue; + // collect settings set on that label - XCAFPrs_IndexedDataMapOfShapeStyle settings; - TDF_LabelSequence seq; - seq.Append ( L ); - XCAFDoc_ShapeTool::GetSubShapes ( L, seq ); - Standard_Boolean isVisible = Standard_True; - for ( Standard_Integer j = 1; j <= seq.Length(); j++ ) { - TDF_Label lab = seq.Value(j); - XCAFPrs_Style style; - Quantity_ColorRGBA C; - if ( lab == L ) { + XCAFPrs_IndexedDataMapOfShapeStyle aSettings; + TDF_LabelSequence aSeq; + aSeq.Append(aLabel); + XCAFDoc_ShapeTool::GetSubShapes(aLabel, aSeq); + Standard_Boolean anIsVisible = Standard_True; + for (TDF_LabelSequence::Iterator aSeqIter(aSeq); + aSeqIter.More(); aSeqIter.Next()) + { + const TDF_Label& aSeqValue = aSeqIter.Value(); + XCAFPrs_Style aStyle; + Quantity_ColorRGBA aColor; + if (aSeqValue == aLabel) + { // check for invisible status of object on label - if ( !CTool->IsVisible( lab ) ) { - isVisible = Standard_False; - style.SetVisibility( Standard_False ); + if (!XCAFDoc_ColorTool::IsVisible(aSeqValue)) + { + anIsVisible = Standard_False; + aStyle.SetVisibility(Standard_False); } } - if ( CTool->GetColor ( lab, XCAFDoc_ColorGen, C ) ) { - style.SetColorCurv ( C.GetRGB() ); - style.SetColorSurf ( C ); + if (XCAFDoc_ColorTool::GetColor(aSeqValue, XCAFDoc_ColorGen, aColor)) + { + aStyle.SetColorCurv(aColor.GetRGB()); + aStyle.SetColorSurf(aColor); } - if ( CTool->GetColor ( lab, XCAFDoc_ColorSurf, C ) ) - style.SetColorSurf ( C ); - if ( CTool->GetColor ( lab, XCAFDoc_ColorCurv, C ) ) - style.SetColorCurv ( C.GetRGB() ); - if (!style.IsSetColorSurf()) + if (XCAFDoc_ColorTool::GetColor(aSeqValue, XCAFDoc_ColorSurf, aColor)) + aStyle.SetColorSurf(aColor); + if (XCAFDoc_ColorTool::GetColor(aSeqValue, XCAFDoc_ColorCurv, aColor)) + aStyle.SetColorCurv(aColor.GetRGB()); + if (!aStyle.IsSetColorSurf()) { - Handle(XCAFDoc_VisMaterial) aVisMat = aMatTool->GetShapeMaterial (lab); - if (!aVisMat.IsNull() - && !aVisMat->IsEmpty()) + Handle(XCAFDoc_VisMaterial) aVisMat = XCAFDoc_VisMaterialTool::GetShapeMaterial(aSeqValue); + if (!aVisMat.IsNull() && !aVisMat->IsEmpty()) { // only color can be stored in STEP - style.SetColorSurf (aVisMat->BaseColor()); + aStyle.SetColorSurf(aVisMat->BaseColor()); } } - - // commented, cause we are need to take reference from -// if ( isComponent && lab == L && !isVisible) -// if ( !style.IsSetColorSurf() && !style.IsSetColorCurv() ) { -// getFatherColor ( L, CTool, style); -// } - if ( ! style.IsSetColorCurv() && ! style.IsSetColorSurf() && isVisible ) continue; - - TopoDS_Shape sub = XCAFDoc_ShapeTool::GetShape ( lab ); - XCAFPrs_Style* aMapStyle = settings.ChangeSeek (sub); + if (!aStyle.IsSetColorCurv() && !aStyle.IsSetColorSurf() && anIsVisible) continue; + + TopoDS_Shape aSub = XCAFDoc_ShapeTool::GetShape(aSeqValue); + XCAFPrs_Style* aMapStyle = aSettings.ChangeSeek(aSub); if (aMapStyle == NULL) - settings.Add ( sub, style ); + aSettings.Add(aSub, aStyle); else - *aMapStyle = style; + *aMapStyle = aStyle; } - - if ( settings.Extent() <=0 ) continue; + + if (aSettings.Extent() <= 0) + continue; // iterate on subshapes and create STEP styles - Handle(StepVisual_StyledItem) override; - TopTools_MapOfShape Map; - - MakeSTEPStyles(Styles,S,settings,override,Map,myMapCompMDGPR,DPDCs,ColRGBs,CTool,0,isComponent); - + Handle(StepVisual_StyledItem) anOverride; + TopTools_MapOfShape aMap; + + MakeSTEPStyles(Styles, aShape, aSettings, anOverride, + aMap, myMapCompMDGPR, DPDCs, ColRGBs, aSTool, 0, anIsComponent); + // create MDGPR and record it in model Handle(StepVisual_MechanicalDesignGeometricPresentationRepresentation) aMDGPR; - if (!isComponent) { - if ( myMapCompMDGPR.IsBound( aTopSh )) { -#ifdef OCCT_DEBUG - std::cerr << "Error: Current Top-Level shape have MDGPR already " << std::endl; -#endif + if (!anIsComponent) + { + if (myMapCompMDGPR.IsBound(aTopSh)) + { + Message::SendTrace() << "Error: Current Top-Level shape have MDGPR already " << "\n"; } - Styles.CreateMDGPR ( Context, aMDGPR ); + Styles.CreateMDGPR(aContext, aMDGPR); if (!aMDGPR.IsNull()) - myMapCompMDGPR.Bind( aTopSh, aMDGPR ); + myMapCompMDGPR.Bind(aTopSh, aMDGPR); } - else { + else + { // create SDR and add to model. - const Handle(XSControl_TransferWriter) &TW = WS->TransferWriter(); - const Handle(Transfer_FinderProcess) &FP = TW->FinderProcess(); - Handle(TransferBRep_ShapeMapper) mapper = TransferBRep::ShapeMapper ( FP, S ); - Handle(StepShape_ContextDependentShapeRepresentation) CDSR; - if ( FP->FindTypedTransient(mapper, - STANDARD_TYPE(StepShape_ContextDependentShapeRepresentation), - CDSR) ) { + const Handle(XSControl_TransferWriter)& aTW = theWS->TransferWriter(); + const Handle(Transfer_FinderProcess)& aFP = aTW->FinderProcess(); + Handle(TransferBRep_ShapeMapper) aMapper = TransferBRep::ShapeMapper(aFP, aShape); + Handle(StepShape_ContextDependentShapeRepresentation) aCDSR; + if (aFP->FindTypedTransient(aMapper, + STANDARD_TYPE(StepShape_ContextDependentShapeRepresentation), + aCDSR)) + { // create SDR for NAUO - Handle(StepRepr_ProductDefinitionShape) nullPDS; // important to be NULL - Styles.CreateNAUOSRD( Context, CDSR, nullPDS ); - + Handle(StepRepr_ProductDefinitionShape) aNullPDS; // important to be NULL + Styles.CreateNAUOSRD(aContext, aCDSR, aNullPDS); + // search for MDGPR of the component top-level shape - if ( myMapCompMDGPR.IsBound( aTopSh )) { - aMDGPR = Handle(StepVisual_MechanicalDesignGeometricPresentationRepresentation)::DownCast( myMapCompMDGPR.Find( aTopSh ) ); - } else { + if (myMapCompMDGPR.IsBound(aTopSh)) + { + aMDGPR = Handle(StepVisual_MechanicalDesignGeometricPresentationRepresentation)::DownCast(myMapCompMDGPR.Find(aTopSh)); + } + else + { aMDGPR = new StepVisual_MechanicalDesignGeometricPresentationRepresentation; - Handle(TCollection_HAsciiString) ReprName = new TCollection_HAsciiString ( "" ); - aMDGPR->SetName( ReprName ); - aMDGPR->SetContextOfItems( Context ); - myMapCompMDGPR.Bind ( aTopSh, aMDGPR ); + Handle(TCollection_HAsciiString) aReprName = new TCollection_HAsciiString(""); + aMDGPR->SetName(aReprName); + aMDGPR->SetContextOfItems(aContext); + myMapCompMDGPR.Bind(aTopSh, aMDGPR); } - Handle(StepRepr_HArray1OfRepresentationItem) oldItems = aMDGPR->Items(); + Handle(StepRepr_HArray1OfRepresentationItem) anOldItems = aMDGPR->Items(); Standard_Integer oldLengthlen = 0; - if (!oldItems.IsNull()) - oldLengthlen = oldItems->Length(); - const Standard_Integer nbIt = oldLengthlen + Styles.NbStyles(); - if(!nbIt) + if (!anOldItems.IsNull()) + oldLengthlen = anOldItems->Length(); + const Standard_Integer aNbIt = oldLengthlen + Styles.NbStyles(); + if (!aNbIt) continue; - Handle(StepRepr_HArray1OfRepresentationItem) newItems = - new StepRepr_HArray1OfRepresentationItem(1, nbIt); - Standard_Integer si; - Standard_Integer el = 1; - for ( si=1; si <= oldLengthlen; si++ ) - newItems->SetValue( el++, oldItems->Value( si ) ); - for ( si=1; si <= Styles.NbStyles(); si++ ) { - newItems->SetValue( el++, Styles.Style(si)); + Handle(StepRepr_HArray1OfRepresentationItem) aNewItems = + new StepRepr_HArray1OfRepresentationItem(1, aNbIt); + Standard_Integer anElemInd = 1; + for (Standard_Integer aStyleInd = 1; aStyleInd <= oldLengthlen; aStyleInd++) + { + aNewItems->SetValue(anElemInd++, anOldItems->Value(aStyleInd)); + } + for (Standard_Integer aStyleInd = 1; aStyleInd <= Styles.NbStyles(); aStyleInd++) + { + aNewItems->SetValue(anElemInd++, Styles.Style(aStyleInd)); } - - if (newItems->Length() > 0) - aMDGPR->SetItems( newItems ); + + if (aNewItems->Length() > 0) + aMDGPR->SetItems(aNewItems); } //end of work with CDSR } - if ( !isVisible ) { - // create invisibility item and refer for styledItem - Handle(StepVisual_Invisibility) Invsblt = new StepVisual_Invisibility(); - Handle(StepVisual_HArray1OfInvisibleItem) HInvsblItm = - new StepVisual_HArray1OfInvisibleItem (1,Styles.NbStyles()); + if (!anIsVisible) + { + // create invisibility item and refer for styledItem + Handle(StepVisual_Invisibility) anInvisibility = new StepVisual_Invisibility(); + Handle(StepVisual_HArray1OfInvisibleItem) anInvisibilitySeq = + new StepVisual_HArray1OfInvisibleItem(1, Styles.NbStyles()); // put all style item into the harray - for ( Standard_Integer si=1; si <= Styles.NbStyles(); si++ ) { - Handle(StepRepr_RepresentationItem) styledItm = Styles.Style(si); + for (Standard_Integer aStyleInd = 1; aStyleInd <= Styles.NbStyles(); aStyleInd++) + { + Handle(StepRepr_RepresentationItem) aStyledItm = Styles.Style(aStyleInd); StepVisual_InvisibleItem anInvItem; - anInvItem.SetValue( styledItm ); - HInvsblItm->SetValue( si, anInvItem ); + anInvItem.SetValue(aStyledItm); + anInvisibilitySeq->SetValue(aStyleInd, anInvItem); } // set the invisibility of items - Invsblt->Init( HInvsblItm ); - WS->Model()->AddWithRefs( Invsblt ); + anInvisibility->Init(anInvisibilitySeq); + theWS->Model()->AddWithRefs(anInvisibility); } } - return Standard_True; } - //======================================================================= -//function : WriteNames +//function : writeNames //purpose : //======================================================================= - -Standard_Boolean STEPCAFControl_Writer::WriteNames (const Handle(XSControl_WorkSession) &WS, - const TDF_LabelSequence &labels) const +Standard_Boolean STEPCAFControl_Writer::writeNames(const Handle(XSControl_WorkSession)& theWS, + const TDF_LabelSequence& theLabels) const { - if ( labels.Length() <=0 ) return Standard_False; + if (theLabels.IsEmpty()) + return Standard_False; // get working data - const Handle(XSControl_TransferWriter) &TW = WS->TransferWriter(); - const Handle(Transfer_FinderProcess) &FP = TW->FinderProcess(); + const Handle(XSControl_TransferWriter)& aTW = theWS->TransferWriter(); + const Handle(Transfer_FinderProcess)& aFP = aTW->FinderProcess(); // Iterate on requested shapes - for ( Standard_Integer i=1; i <= labels.Length(); i++ ) { - TDF_Label L = labels.Value(i); - + for (TDF_LabelSequence::Iterator aLabelIter(theLabels); + aLabelIter.More(); aLabelIter.Next()) + { + const TDF_Label& aLabel = aLabelIter.Value(); + // find target STEP entity for the current shape + if (!myLabels.IsBound(aLabel)) + continue; // not recorded as translated, skip // get name - Handle(TCollection_HAsciiString) hName = new TCollection_HAsciiString; - if (GetLabelName (L, hName)) + Handle(TCollection_HAsciiString) aHName = new TCollection_HAsciiString; + if (!GetLabelName(aLabel, aHName)) { - // find target STEP entity for the current shape - if ( ! myLabels.IsBound ( L ) ) continue; // not recorded as translated, skip - TopoDS_Shape S = myLabels.Find ( L ); - - Handle(StepShape_ShapeDefinitionRepresentation) SDR; - Handle(TransferBRep_ShapeMapper) mapper = TransferBRep::ShapeMapper ( FP, S ); - if ( ! FP->FindTypedTransient ( mapper, STANDARD_TYPE(StepShape_ShapeDefinitionRepresentation), SDR ) ) { -#ifdef OCCT_DEBUG - std::cout << "Warning: Cannot find SDR for " << S.TShape()->DynamicType()->Name() << std::endl; -#endif - continue; - } - - // set the name to the PRODUCT - Handle(StepRepr_PropertyDefinition) PropD = SDR->Definition().PropertyDefinition(); - if ( PropD.IsNull() ) continue; - Handle(StepBasic_ProductDefinition) PD = PropD->Definition().ProductDefinition(); - if ( PD.IsNull() ) continue; - Handle(StepBasic_Product) Prod = PD->Formation()->OfProduct(); - - Prod->SetId ( hName ); - Prod->SetName ( hName ); + continue; } - - // write names for components of assemblies - if ( XCAFDoc_ShapeTool::IsAssembly ( L ) ) { - TDF_LabelSequence seq; - XCAFDoc_ShapeTool::GetComponents ( L, seq ); - for (Standard_Integer k=1; k <= seq.Length(); k++) { - TDF_Label lab = seq(k); - - // get shape with correct location - TDF_Label Lref; - if ( ! XCAFDoc_ShapeTool::GetReferredShape ( lab, Lref ) || - ! myLabels.IsBound ( Lref ) ) continue; - TopoDS_Shape S = myLabels.Find ( Lref ); - S.Move ( XCAFDoc_ShapeTool::GetLocation ( lab ) ); - - hName = new TCollection_HAsciiString; - if ( ! GetLabelName (lab, hName) ) continue; - - // find the target CDSR corresponding to a shape - Handle(TransferBRep_ShapeMapper) mapper = TransferBRep::ShapeMapper ( FP, S ); - Handle(Transfer_Binder) binder = FP->Find ( mapper ); - Handle(StepShape_ContextDependentShapeRepresentation) CDSR; - if ( ! FP->FindTypedTransient (mapper,STANDARD_TYPE(StepShape_ContextDependentShapeRepresentation), CDSR) ) - continue; - Handle(StepRepr_ProductDefinitionShape) PDS = CDSR->RepresentedProductRelation(); - Handle(StepBasic_ProductDefinitionRelationship) NAUO = PDS->Definition().ProductDefinitionRelationship(); - if ( ! NAUO.IsNull() ) NAUO->SetName ( hName ); + const TopoDS_Shape& aShape = myLabels.Find(aLabel); + Handle(StepShape_ShapeDefinitionRepresentation) aSDR; + Handle(StepShape_ContextDependentShapeRepresentation) aCDSR; + Standard_Boolean isComponent = XCAFDoc_ShapeTool::IsComponent(aLabel) || myPureRefLabels.IsBound(aLabel); + Handle(TransferBRep_ShapeMapper) aMapper = TransferBRep::ShapeMapper(aFP, aShape); + if (isComponent && aFP->FindTypedTransient(aMapper, STANDARD_TYPE(StepShape_ContextDependentShapeRepresentation), aCDSR)) + { + Handle(StepRepr_ProductDefinitionShape) aPDS = aCDSR->RepresentedProductRelation(); + Handle(StepBasic_ProductDefinitionRelationship) aNAUO = aPDS->Definition().ProductDefinitionRelationship(); + if (!aNAUO.IsNull()) + aNAUO->SetName(aHName); + TopoDS_Shape anInternalAssembly; + if (myPureRefLabels.Find(aLabel, anInternalAssembly)) + { + Handle(TransferBRep_ShapeMapper) aMapperOfInternalShape = TransferBRep::ShapeMapper(aFP, anInternalAssembly); + aFP->FindTypedTransient(aMapperOfInternalShape, STANDARD_TYPE(StepShape_ShapeDefinitionRepresentation), aSDR); } } - } + if (!aSDR.IsNull() || + (aCDSR.IsNull() && aFP->FindTypedTransient(aMapper, STANDARD_TYPE(StepShape_ShapeDefinitionRepresentation), aSDR))) + { + // set the name to the PRODUCT + Handle(StepRepr_PropertyDefinition) aPropD = aSDR->Definition().PropertyDefinition(); + if (aPropD.IsNull()) + continue; + Handle(StepBasic_ProductDefinition) aPD = aPropD->Definition().ProductDefinition(); + if (aPD.IsNull()) + continue; + Handle(StepBasic_Product) aProd = aPD->Formation()->OfProduct(); + aProd->SetId(aHName); + aProd->SetName(aHName); + } + else + { + Message::SendTrace() << "Warning: Cannot find RI for " << aShape.TShape()->DynamicType()->Name() << "\n"; + continue; + } + } return Standard_True; } - //======================================================================= //function : WritePropsForLabel //purpose : //======================================================================= -static Standard_Boolean WritePropsForLabel(const Handle(XSControl_WorkSession) &WS, - const Handle(XCAFDoc_ShapeTool) &aSTool, - const STEPCAFControl_DataMapOfLabelShape &myLabels, - const TDF_Label &L, - const Standard_CString multi) +static Standard_Boolean WritePropsForLabel(const Handle(XSControl_WorkSession)& theWS, + const STEPCAFControl_DataMapOfLabelShape& theLabels, + const TDF_Label& theLabel, + const Standard_CString theIsMulti) { - if(L.IsNull()) return Standard_False; + if (theLabel.IsNull()) + return Standard_False; - STEPConstruct_ValidationProps Props ( WS ); + STEPConstruct_ValidationProps aProps(theWS); - TopoDS_Shape S = aSTool->GetShape(L); - if(S.IsNull()) return Standard_False; + TopoDS_Shape aShape = XCAFDoc_ShapeTool::GetShape(theLabel); + if (aShape.IsNull()) + return Standard_False; - if ( ! multi || XCAFDoc_ShapeTool::IsAssembly ( L ) ) { + if (!theIsMulti || XCAFDoc_ShapeTool::IsAssembly(theLabel)) + { // write area - Handle(XCAFDoc_Area) A; - L.FindAttribute ( XCAFDoc_Area::GetID(), A ); - if ( ! A.IsNull() ) { - Props.AddArea ( S, A->Get() ); + Handle(XCAFDoc_Area) anArea; + theLabel.FindAttribute(XCAFDoc_Area::GetID(), anArea); + if (!anArea.IsNull()) + { + aProps.AddArea(aShape, anArea->Get()); } // write volume - Handle(XCAFDoc_Volume) V; - L.FindAttribute ( XCAFDoc_Volume::GetID(), V ); - if ( ! V.IsNull() ) { - Props.AddVolume ( S, V->Get() ); + Handle(XCAFDoc_Volume) aVolume; + theLabel.FindAttribute(XCAFDoc_Volume::GetID(), aVolume); + if (!aVolume.IsNull()) + { + aProps.AddVolume(aShape, aVolume->Get()); } } // write centroid - Handle(XCAFDoc_Centroid) C; - L.FindAttribute ( XCAFDoc_Centroid::GetID(), C ); - if ( ! C.IsNull() ) { - Props.AddCentroid ( S, C->Get() ); + Handle(XCAFDoc_Centroid) aCentroid; + theLabel.FindAttribute(XCAFDoc_Centroid::GetID(), aCentroid); + if (!aCentroid.IsNull()) + { + aProps.AddCentroid(aShape, aCentroid->Get()); } - if( XCAFDoc_ShapeTool::IsCompound(L) || XCAFDoc_ShapeTool::IsAssembly(L) ) { - if(L.HasChild()) { - for(Standard_Integer ich=1; ich<=L.NbChildren(); ich++) { - WritePropsForLabel(WS,aSTool,myLabels,L.FindChild(ich),multi); + if (XCAFDoc_ShapeTool::IsCompound(theLabel) || XCAFDoc_ShapeTool::IsAssembly(theLabel)) + { + if (theLabel.HasChild()) + { + for (Standard_Integer aChildInd = 1; aChildInd <= theLabel.NbChildren(); aChildInd++) + { + WritePropsForLabel(theWS, theLabels, theLabel.FindChild(aChildInd), theIsMulti); } } } @@ -1521,677 +1497,674 @@ static Standard_Boolean WritePropsForLabel(const Handle(XSControl_WorkSession) & return Standard_True; } - //======================================================================= -//function : WriteValProps +//function : writeValProps //purpose : //======================================================================= - -Standard_Boolean STEPCAFControl_Writer::WriteValProps (const Handle(XSControl_WorkSession) &WS, - const TDF_LabelSequence &labels, - const Standard_CString multi) const +Standard_Boolean STEPCAFControl_Writer::writeValProps(const Handle(XSControl_WorkSession)& theWS, + const TDF_LabelSequence& theLabels, + const Standard_CString theIsMulti) const { - if ( labels.Length() <=0 ) return Standard_False; - - // get working data -// STEPConstruct_ValidationProps Props ( WS ); - Handle(XCAFDoc_ShapeTool) aSTool = XCAFDoc_DocumentTool::ShapeTool( labels(1) ); + if (theLabels.IsEmpty()) + return Standard_False; // Iterate on requested shapes - for ( Standard_Integer i=1; i <= labels.Length(); i++ ) { - TDF_Label L = labels.Value(i); - - WritePropsForLabel(WS,aSTool,myLabels,L,multi); -/* - // find target STEP entity for the current shape - if ( ! myLabels.IsBound ( L ) ) continue; // not recorded as translated, skip - TopoDS_Shape S = myLabels.Find ( L ); - - // write area and volume (except for components in multifile mode) - if ( ! multi || XCAFDoc_ShapeTool::IsAssembly ( L ) ) { - Handle(XCAFDoc_Area) A; - L.FindAttribute ( XCAFDoc_Area::GetID(), A ); - if ( ! A.IsNull() ) Props.AddArea ( S, A->Get() ); - - Handle(XCAFDoc_Volume) V; - L.FindAttribute ( XCAFDoc_Volume::GetID(), V ); - if ( ! V.IsNull() ) Props.AddVolume ( S, V->Get() ); - } + for (TDF_LabelSequence::Iterator aLabelIter(theLabels); + aLabelIter.More(); aLabelIter.Next()) + { + const TDF_Label& aLabel = aLabelIter.Value(); - // write centroid - Handle(XCAFDoc_Centroid) C; - L.FindAttribute ( XCAFDoc_Centroid::GetID(), C ); - if ( ! C.IsNull() ) Props.AddCentroid ( S, C->Get() ); - - // write centroid for components of assemblies - if ( XCAFDoc_ShapeTool::IsAssembly ( L ) ) { - TDF_LabelSequence seq; - XCAFDoc_ShapeTool::GetComponents ( L, seq ); - for (Standard_Integer k=1; k <= seq.Length(); k++) { - TDF_Label lab = seq(k); - - // get shape with correct location - TDF_Label Lref; - if ( ! XCAFDoc_ShapeTool::GetReferredShape ( lab, Lref ) || - ! myLabels.IsBound ( Lref ) ) continue; - TopLoc_Location Loc = XCAFDoc_ShapeTool::GetLocation ( lab ); - S = myLabels.Find ( Lref ); - S.Move ( Loc ); - - C.Nullify(); - lab.FindAttribute ( XCAFDoc_Centroid::GetID(), C ); - // if centroid is not assigned to an instance, - // use (shifted) centroid of original shape - gp_Pnt center; - if ( C.IsNull() ) { - Lref.FindAttribute ( XCAFDoc_Centroid::GetID(), C ); - if ( C.IsNull() ) continue; - center = C->Get().Transformed ( Loc.Transformation() ); - } - else center = C->Get(); - - Props.AddCentroid ( S, center, Standard_True ); - } - } -*/ + WritePropsForLabel(theWS, myLabels, aLabel, theIsMulti); } return Standard_True; } - //======================================================================= -//function : WriteLayers -//purpose : +//function : writeLayers +//purpose : //======================================================================= - -Standard_Boolean STEPCAFControl_Writer::WriteLayers (const Handle(XSControl_WorkSession) &WS, - const TDF_LabelSequence &labels ) const +Standard_Boolean STEPCAFControl_Writer::writeLayers(const Handle(XSControl_WorkSession)& theWS, + const TDF_LabelSequence& theLabels) const { - - if ( labels.Length() <=0 ) return Standard_False; + + if (theLabels.IsEmpty()) + return Standard_False; // get working data - const Handle(Interface_InterfaceModel) &Model = WS->Model(); - const Handle(XSControl_TransferWriter) &TW = WS->TransferWriter(); - const Handle(Transfer_FinderProcess) &FP = TW->FinderProcess(); - Handle(XCAFDoc_LayerTool) LTool = XCAFDoc_DocumentTool::LayerTool( labels(1) ); - if (LTool.IsNull() ) return Standard_False; - - TDF_LabelSequence LayerLS; - LTool->GetLayerLabels(LayerLS); - if ( LayerLS.Length() <=0 ) return Standard_False; - - // Iterate on requested layers and for each layer take set of shapes. - for ( Standard_Integer i=1; i <= LayerLS.Length(); i++ ) { - TDF_Label L = LayerLS.Value(i); - + const Handle(Interface_InterfaceModel)& aModel = theWS->Model(); + const Handle(XSControl_TransferWriter)& aTW = theWS->TransferWriter(); + const Handle(Transfer_FinderProcess)& aFP = aTW->FinderProcess(); + TDF_LabelSequence aGlobalLayerLS; + // Iterate on requested shapes collect Tools + for (TDF_LabelMap::Iterator aLabelIter(myRootLabels); + aLabelIter.More(); aLabelIter.Next()) + { + const TDF_Label& aLabel = aLabelIter.Value(); + Handle(XCAFDoc_LayerTool) aLTool = XCAFDoc_DocumentTool::LayerTool(aLabel); + TDF_LabelSequence aLayerLS; + aLTool->GetLayerLabels(aLayerLS); + aGlobalLayerLS.Append(aLayerLS); + } + for (TDF_LabelSequence::Iterator aLayerIter(aGlobalLayerLS); + aLayerIter.More(); aLayerIter.Next()) + { + const TDF_Label& aLayerL = aLayerIter.Value(); // get labels of shapes in that layer - TDF_LabelSequence ShapeLs; - LTool->GetShapesOfLayer(L, ShapeLs); - if ( ShapeLs.Length() <=0 ) continue; - + TDF_LabelSequence aShapeLabels; + XCAFDoc_LayerTool::GetShapesOfLayer(aLayerL, aShapeLabels); + if (aShapeLabels.IsEmpty()) + continue; + // name of layer: if not set, is considered as being empty - Handle(TCollection_HAsciiString) hName = new TCollection_HAsciiString; - GetLabelName ( L, hName ); + Handle(TCollection_HAsciiString) aHName = new TCollection_HAsciiString; + GetLabelName(aLayerL, aHName); // Find target STEP entity for each shape and add to StepVisual_PresentationLayerAssignment items. - TColStd_SequenceOfTransient seqRI; - for ( Standard_Integer j=1; j <= ShapeLs.Length(); j++) { - TDF_Label shLabel = ShapeLs.Value(j); - if ( shLabel.IsNull() ) continue; - + TColStd_SequenceOfTransient aSeqRI; + for (TDF_LabelSequence::Iterator aShapeIter(aShapeLabels); + aShapeIter.More(); aShapeIter.Next()) + { + const TDF_Label& aShLabel = aShapeIter.Value(); + if (aShLabel.IsNull()) + continue; + // there is no way to assign layer to instance in STEP - if ( XCAFDoc_ShapeTool::IsAssembly ( shLabel ) || - XCAFDoc_ShapeTool::IsReference ( shLabel ) ) + if (XCAFDoc_ShapeTool::IsAssembly(aShLabel) || + XCAFDoc_ShapeTool::IsReference(aShLabel)) + { continue; - + } // check that the shape is one of (uub)labels written during current transfer - Standard_Integer k = 1; - for ( ; k <= labels.Length(); k++ ) - if ( shLabel.IsDescendant ( labels(k) ) ) break; - if ( k > labels.Length() ) continue; + Standard_Boolean anIsWritten = Standard_False; + for (TDF_LabelSequence::Iterator aLabelIter(theLabels); + aLabelIter.More(); aLabelIter.Next()) + { + if (aShLabel.IsDescendant(aLabelIter.Value())) + { + anIsWritten = Standard_True; + break; + } + } + if (!anIsWritten) + { + continue; + } // get target STEP entity - TopoDS_Shape oneShape = XCAFDoc_ShapeTool::GetShape(shLabel); - - TopLoc_Location Loc; - Standard_Integer nb = - FindEntities ( FP, oneShape, Loc, seqRI ); - if ( nb <=0 ) - FP->Messenger()->SendInfo() << "Warning: Cannot find RI for " << oneShape.TShape()->DynamicType()->Name() << std::endl; + TopoDS_Shape anOneShape = XCAFDoc_ShapeTool::GetShape(aShLabel); + + TopLoc_Location aLoc; + Standard_Integer aNb = FindEntities(aFP, anOneShape, aLoc, aSeqRI); + if (aNb <= 0) + { + Message::SendTrace() << "Warning: Cannot find RI for " << anOneShape.TShape()->DynamicType()->Name() << "\n"; + } } - if ( seqRI.Length() <= 0 ) continue; + if (aSeqRI.IsEmpty()) + continue; // analyze visibility - Handle(StepVisual_PresentationLayerAssignment) StepLayerAs = new StepVisual_PresentationLayerAssignment; - Handle(TCollection_HAsciiString) descr; + Handle(StepVisual_PresentationLayerAssignment) aStepLayerAs = new StepVisual_PresentationLayerAssignment; + Handle(TCollection_HAsciiString) aDescr; Handle(TDataStd_UAttribute) aUAttr; Standard_Boolean isLinv = Standard_False; - if (L.FindAttribute(XCAFDoc::InvisibleGUID(), aUAttr)) { - descr = new TCollection_HAsciiString ("invisible"); -#ifdef OCCT_DEBUG - std::cout << "\tLayer \"" << hName->String().ToCString() << "\" is invisible"<String().ToCString() << "\" is invisible" << "\n"; isLinv = Standard_True; } - else descr = new TCollection_HAsciiString ("visible"); - + else + { + aDescr = new TCollection_HAsciiString("visible"); + } + // create layer entity - Handle(StepVisual_HArray1OfLayeredItem) HArrayOfLItem = - new StepVisual_HArray1OfLayeredItem ( 1, seqRI.Length() ); - for (Standard_Integer i1 = 1; i1<=seqRI.Length(); i1++) { - StepVisual_LayeredItem LI; - LI.SetValue ( seqRI.Value(i1) ); - HArrayOfLItem->SetValue( i1, LI ); + Standard_Integer anSetStyleInd = 1; + Handle(StepVisual_HArray1OfLayeredItem) aHArrayOfLItem = + new StepVisual_HArray1OfLayeredItem(1, aSeqRI.Length()); + for (TColStd_SequenceOfTransient::Iterator aRIIter(aSeqRI); + aRIIter.More(); aRIIter.Next()) + { + StepVisual_LayeredItem aLI; + aLI.SetValue(aRIIter.Value()); + aHArrayOfLItem->SetValue(anSetStyleInd++, aLI); } - StepLayerAs->Init(hName, descr, HArrayOfLItem); - Model->AddWithRefs( StepLayerAs ); + aStepLayerAs->Init(aHName, aDescr, aHArrayOfLItem); + aModel->AddWithRefs(aStepLayerAs); // PTV 23.01.2003 add the invisibility AFTER adding layer into the model. // add the invisibility for the layer - if (isLinv) { + if (isLinv) + { // Invisibility Item for containing invisible layers. - Handle(StepVisual_HArray1OfInvisibleItem) HInvsblItm = new StepVisual_HArray1OfInvisibleItem (1,1); - StepVisual_InvisibleItem InvIt; - InvIt.SetValue( StepLayerAs ); - HInvsblItm->SetValue( 1, InvIt); - - Handle(StepVisual_Invisibility) Invsblt = new StepVisual_Invisibility(); - Invsblt->Init( HInvsblItm ); - Model->AddWithRefs( Invsblt ); + Handle(StepVisual_HArray1OfInvisibleItem) aHInvsblItm = new StepVisual_HArray1OfInvisibleItem(1, 1); + StepVisual_InvisibleItem aInvIt; + aInvIt.SetValue(aStepLayerAs); + aHInvsblItm->SetValue(1, aInvIt); + + Handle(StepVisual_Invisibility) aInvsblt = new StepVisual_Invisibility(); + aInvsblt->Init(aHInvsblItm); + aModel->AddWithRefs(aInvsblt); } } return Standard_True; } - //======================================================================= //function : getSHUOstyle //purpose : auxiliary //======================================================================= -static Standard_Boolean getSHUOstyle(const TDF_Label& aSHUOlab, - const Handle(XCAFDoc_ColorTool)& CTool, - const Handle(XCAFDoc_VisMaterialTool)& theMatTool, - XCAFPrs_Style& SHUOstyle) +static Standard_Boolean getSHUOstyle(const TDF_Label& theSHUOlab, + XCAFPrs_Style& theSHUOstyle) { - Quantity_Color C; - if (!CTool->IsVisible( aSHUOlab ) ) - SHUOstyle.SetVisibility(Standard_False); - else { - if ( CTool->GetColor ( aSHUOlab, XCAFDoc_ColorGen, C ) ) { - SHUOstyle.SetColorCurv ( C ); - SHUOstyle.SetColorSurf ( C ); + Quantity_Color aColor; + if (!XCAFDoc_ColorTool::IsVisible(theSHUOlab)) + { + theSHUOstyle.SetVisibility(Standard_False); + } + else + { + if (XCAFDoc_ColorTool::GetColor(theSHUOlab, XCAFDoc_ColorGen, aColor)) + { + theSHUOstyle.SetColorCurv(aColor); + theSHUOstyle.SetColorSurf(aColor); } - if ( CTool->GetColor ( aSHUOlab, XCAFDoc_ColorSurf, C ) ) - SHUOstyle.SetColorSurf ( C ); - if ( CTool->GetColor ( aSHUOlab, XCAFDoc_ColorCurv, C ) ) - SHUOstyle.SetColorCurv ( C ); - if (!SHUOstyle.IsSetColorSurf()) + if (XCAFDoc_ColorTool::GetColor(theSHUOlab, XCAFDoc_ColorSurf, aColor)) + theSHUOstyle.SetColorSurf(aColor); + if (XCAFDoc_ColorTool::GetColor(theSHUOlab, XCAFDoc_ColorCurv, aColor)) + theSHUOstyle.SetColorCurv(aColor); + if (!theSHUOstyle.IsSetColorSurf()) { - Handle(XCAFDoc_VisMaterial) aVisMat = theMatTool->GetShapeMaterial (aSHUOlab); + Handle(XCAFDoc_VisMaterial) aVisMat = XCAFDoc_VisMaterialTool::GetShapeMaterial(theSHUOlab); if (!aVisMat.IsNull() - && !aVisMat->IsEmpty()) + && !aVisMat->IsEmpty()) { // only color can be stored in STEP - SHUOstyle.SetColorSurf (aVisMat->BaseColor()); + theSHUOstyle.SetColorSurf(aVisMat->BaseColor()); } } } - if ( !SHUOstyle.IsSetColorCurv() && - !SHUOstyle.IsSetColorSurf() && - SHUOstyle.IsVisible() ) + if (!theSHUOstyle.IsSetColorCurv() && + !theSHUOstyle.IsSetColorSurf() && + theSHUOstyle.IsVisible()) + { return Standard_False; + } return Standard_True; } - //======================================================================= //function : getProDefinitionOfNAUO //purpose : auxiliary //======================================================================= -static Standard_Boolean getProDefinitionOfNAUO(const Handle(XSControl_WorkSession)& WS, +static Standard_Boolean getProDefinitionOfNAUO(const Handle(XSControl_WorkSession)& theWS, const TopoDS_Shape& theShape, - Handle(StepBasic_ProductDefinition)& PD, - Handle(StepRepr_NextAssemblyUsageOccurrence)& NAUO, - Standard_Boolean IsRelating) + Handle(StepBasic_ProductDefinition)& thePD, + Handle(StepRepr_NextAssemblyUsageOccurrence)& theNAUO, + Standard_Boolean theIsRelating) { - if ( theShape.IsNull() ) + if (theShape.IsNull()) return Standard_False; // get CDSR - const Handle(XSControl_TransferWriter) &TW = WS->TransferWriter(); - const Handle(Transfer_FinderProcess) &FP = TW->FinderProcess(); - Handle(StepShape_ContextDependentShapeRepresentation) CDSR; - Handle(TransferBRep_ShapeMapper) mapper = TransferBRep::ShapeMapper ( FP, theShape ); - if (!FP->FindTypedTransient(mapper, - STANDARD_TYPE(StepShape_ContextDependentShapeRepresentation), - CDSR)) + const Handle(XSControl_TransferWriter)& aTW = theWS->TransferWriter(); + const Handle(Transfer_FinderProcess)& aFP = aTW->FinderProcess(); + Handle(StepShape_ContextDependentShapeRepresentation) aCDSR; + Handle(TransferBRep_ShapeMapper) aMapper = TransferBRep::ShapeMapper(aFP, theShape); + if (!aFP->FindTypedTransient(aMapper, + STANDARD_TYPE(StepShape_ContextDependentShapeRepresentation), + aCDSR)) + { return Standard_False; + } // get PDS of NAUO - Handle(StepRepr_ProductDefinitionShape) PDS = CDSR->RepresentedProductRelation(); - if (PDS.IsNull()) + Handle(StepRepr_ProductDefinitionShape) aPDS = aCDSR->RepresentedProductRelation(); + if (aPDS.IsNull()) return Standard_False; // get the NAUO entity - Interface_Graph aGraph = WS->HGraph()->Graph(); - Interface_EntityIterator subs = aGraph.Shareds(PDS); - for ( subs.Start(); subs.More(); subs.Next() ) { - if (!subs.Value()->IsKind(STANDARD_TYPE(StepRepr_NextAssemblyUsageOccurrence))) - continue; - NAUO = Handle(StepRepr_NextAssemblyUsageOccurrence)::DownCast(subs.Value()); - break; + Interface_Graph aGraph = theWS->HGraph()->Graph(); + for (Interface_EntityIterator aShareds = aGraph.Shareds(aPDS); aShareds.More(); aShareds.Next()) + { + theNAUO = Handle(StepRepr_NextAssemblyUsageOccurrence)::DownCast(aShareds.Value()); + if (!theNAUO.IsNull()) + { + break; + } } - if ( NAUO.IsNull() ) + if (theNAUO.IsNull()) return Standard_False; // get Relatinf or Related product definition - if ( !IsRelating ) - PD = NAUO->RelatedProductDefinition(); + if (!theIsRelating) + thePD = theNAUO->RelatedProductDefinition(); else - PD = NAUO->RelatingProductDefinition(); - if ( PD.IsNull() ) + thePD = theNAUO->RelatingProductDefinition(); + if (thePD.IsNull()) return Standard_False; return Standard_True; } - //======================================================================= //function : writeSHUO //purpose : auxiliary //======================================================================= -static Standard_Boolean writeSHUO (const Handle(XCAFDoc_GraphNode)& theSHUO, - const Handle(XCAFDoc_ShapeTool)& theSTool, - const Handle(XSControl_WorkSession)& WS, - Handle(StepRepr_SpecifiedHigherUsageOccurrence)& theTopSHUO, - TopoDS_Shape& NAUOShape, - Handle(StepBasic_ProductDefinition)& theRelatingPD, - Standard_Boolean& isDeepest) +static Standard_Boolean writeSHUO(const Handle(XCAFDoc_GraphNode)& theSHUO, + const Handle(XSControl_WorkSession)& theWS, + Handle(StepRepr_SpecifiedHigherUsageOccurrence)& theTopSHUO, + TopoDS_Shape& theNAUOShape, + Handle(StepBasic_ProductDefinition)& theRelatingPD, + Standard_Boolean& theIsDeepest) { // set the ProductDefinitionRelationship descriptin information as empty strings. - Handle(TCollection_HAsciiString) EmptyString = new TCollection_HAsciiString(""); - + Handle(TCollection_HAsciiString) anEmptyString = new TCollection_HAsciiString(""); + TDF_LabelSequence aNextUsageLabs; - theSTool->GetSHUONextUsage( theSHUO->Label(), aNextUsageLabs ); - Handle(XCAFDoc_GraphNode) NuSHUO; - if ( theTopSHUO.IsNull() ) { + XCAFDoc_ShapeTool::GetSHUONextUsage(theSHUO->Label(), aNextUsageLabs); + Handle(XCAFDoc_GraphNode) aNuSHUO; + if (theTopSHUO.IsNull()) + { // the top SHUO if (aNextUsageLabs.Length() < 1) return Standard_False; - theSTool->GetSHUO( aNextUsageLabs.Value(1), NuSHUO ); - if (NuSHUO.IsNull()) + XCAFDoc_ShapeTool::GetSHUO(aNextUsageLabs.Value(1), aNuSHUO); + if (aNuSHUO.IsNull()) return Standard_False; // get relating product definition - TopoDS_Shape aTopCompShape = theSTool->GetShape( theSHUO->Label().Father() ); - Handle(StepRepr_NextAssemblyUsageOccurrence) UUNAUO; - if (!getProDefinitionOfNAUO( WS, aTopCompShape, - theRelatingPD, UUNAUO, Standard_True )) + TopoDS_Shape aTopCompShape = XCAFDoc_ShapeTool::GetShape(theSHUO->Label().Father()); + Handle(StepRepr_NextAssemblyUsageOccurrence) aRelatingNAUO; + if (!getProDefinitionOfNAUO(theWS, aTopCompShape, + theRelatingPD, aRelatingNAUO, Standard_True)) + { return Standard_False; + } // get related product definition - TopoDS_Shape aNUShape = theSTool->GetShape( NuSHUO->Label().Father() ); + TopoDS_Shape aNUShape = XCAFDoc_ShapeTool::GetShape(aNuSHUO->Label().Father()); Handle(StepBasic_ProductDefinition) aRelatedPD; - Handle(StepRepr_NextAssemblyUsageOccurrence) NUNAUO; - if (!getProDefinitionOfNAUO( WS, aNUShape, - aRelatedPD, NUNAUO, Standard_False )) + Handle(StepRepr_NextAssemblyUsageOccurrence) aRelatedNAUO; + if (!getProDefinitionOfNAUO(theWS, aNUShape, + aRelatedPD, aRelatedNAUO, Standard_False)) + { return Standard_False; - + } + theTopSHUO = new StepRepr_SpecifiedHigherUsageOccurrence; // create deepest shuo EmptyString - theTopSHUO->Init(/*id*/EmptyString, /*name*/EmptyString, - /*no description*/Standard_False,/*description*/EmptyString, + theTopSHUO->Init(/*id*/anEmptyString, /*name*/anEmptyString, + /*no description*/Standard_False,/*description*/anEmptyString, theRelatingPD, aRelatedPD, - /*no ACURefDesignator*/Standard_False,/*ACURefDesignator*/EmptyString, - /*upper_usage*/UUNAUO, /*next_usage*/NUNAUO); + /*no ACURefDesignator*/Standard_False,/*ACURefDesignator*/anEmptyString, + /*upper_usage*/aRelatingNAUO, /*next_usage*/aRelatedNAUO); // write the other SHUO. - if(!writeSHUO( NuSHUO, theSTool, WS, theTopSHUO, NAUOShape, theRelatingPD, isDeepest )) { + if (!writeSHUO(aNuSHUO, theWS, theTopSHUO, theNAUOShape, theRelatingPD, theIsDeepest)) + { theTopSHUO.Nullify(); return Standard_False; } - + return Standard_True; } -// Handle(XCAFDoc_GraphNode) NuSHUO; - if ( aNextUsageLabs.Length() > 0) { + // Handle(XCAFDoc_GraphNode) NuSHUO; + if (aNextUsageLabs.Length() > 0) + { // store SHUO recursive -#ifdef OCCT_DEBUG - if ( aNextUsageLabs.Length() > 1 ) - std::cout << "Warning: store only one next_usage of current SHUO" << std::endl; -#endif - theSTool->GetSHUO( aNextUsageLabs.Value(1), NuSHUO ); + if (aNextUsageLabs.Length() > 1) + Message::SendTrace() << "Warning: store only one next_usage of current SHUO" << "\n"; + XCAFDoc_ShapeTool::GetSHUO(aNextUsageLabs.Value(1), aNuSHUO); Handle(StepRepr_SpecifiedHigherUsageOccurrence) aNUEntSHUO = new StepRepr_SpecifiedHigherUsageOccurrence; - if (!writeSHUO( NuSHUO, theSTool, WS, aNUEntSHUO, NAUOShape, theRelatingPD, isDeepest )) + if (!writeSHUO(aNuSHUO, theWS, aNUEntSHUO, theNAUOShape, theRelatingPD, theIsDeepest)) return Standard_False; - + // store the deepest SHUO to the dociment TopoDS_Shape aNUSh, aUUSh; - aNUSh = theSTool->GetShape( NuSHUO->Label().Father() ); - aUUSh = theSTool->GetShape( theSHUO->Label().Father() ); + aNUSh = XCAFDoc_ShapeTool::GetShape(aNuSHUO->Label().Father()); + aUUSh = XCAFDoc_ShapeTool::GetShape(theSHUO->Label().Father()); // get relating PD with upper_usage and related PD with next_usage Handle(StepBasic_ProductDefinition) nullPD;// no need to use,case have shared Handle(StepBasic_ProductDefinition) aRelatedPD; Handle(StepRepr_NextAssemblyUsageOccurrence) UUNAUO, NUNAUO; - if (!getProDefinitionOfNAUO( WS, aUUSh, nullPD, UUNAUO, Standard_True ) || - !getProDefinitionOfNAUO( WS, aNUSh, aRelatedPD, NUNAUO, Standard_False )) { -#ifdef OCCT_DEBUG - std::cout << "Warning: cannot get related or relating PD" << std::endl; -#endif + if (!getProDefinitionOfNAUO(theWS, aUUSh, nullPD, UUNAUO, Standard_True) || + !getProDefinitionOfNAUO(theWS, aNUSh, aRelatedPD, NUNAUO, Standard_False)) + { + Message::SendTrace() << "Warning: cannot get related or relating PD" << "\n"; return Standard_False; } - aNUEntSHUO->Init(/*id*/EmptyString, /*name*/EmptyString, - /*no description*/Standard_False,/*description*/EmptyString, + aNUEntSHUO->Init(/*id*/anEmptyString, /*name*/anEmptyString, + /*no description*/Standard_False,/*description*/anEmptyString, theRelatingPD, aRelatedPD, - /*no ACURefDesignator*/Standard_False,/*ACURefDesignator*/EmptyString, + /*no ACURefDesignator*/Standard_False,/*ACURefDesignator*/anEmptyString, /*upper_usage*/theTopSHUO, /*next_usage*/NUNAUO); - if ( isDeepest ) { - isDeepest = Standard_False; + if (theIsDeepest) + { + theIsDeepest = Standard_False; } - WS->Model()->AddWithRefs ( aNUEntSHUO ); + theWS->Model()->AddWithRefs(aNUEntSHUO); return Standard_True; } // end of recurse storing - - // get shape + + // get shape TDF_Label aShapeL = theSHUO->Label().Father(); - NAUOShape = theSTool->GetShape( aShapeL ); + theNAUOShape = XCAFDoc_ShapeTool::GetShape(aShapeL); // return to the deepest level from SHUO shape level // it is because SHUO is attribute on deep level and shape level. - isDeepest = Standard_True; + theIsDeepest = Standard_True; return Standard_True; } - //======================================================================= //function : createSHUOStyledItem //purpose : auxiliary //======================================================================= -static Standard_Boolean createSHUOStyledItem (const XCAFPrs_Style& style, - const Handle(StepRepr_ProductDefinitionShape)& PDS, - const Handle(XSControl_WorkSession) &WS, - const TopoDS_Shape& Sh, - const Handle(XCAFDoc_ShapeTool)& STool, - MoniTool_DataMapOfShapeTransient& myMapCompMDGPR) +static Standard_Boolean createSHUOStyledItem(const XCAFPrs_Style& theStyle, + const Handle(StepRepr_ProductDefinitionShape)& thePDS, + const Handle(XSControl_WorkSession)& theWS, + const TopoDS_Shape& theShape, + const Handle(XCAFDoc_ShapeTool)& theSTool, + MoniTool_DataMapOfShapeTransient& theMapCompMDGPR) { // create styled item for the indicated SHUO and store to the model - STEPConstruct_Styles Styles( WS ); + STEPConstruct_Styles aStyles(theWS); // translate colors to STEP - Handle(StepVisual_Colour) surfColor, curvColor; - Standard_Real RenderTransp = 0.0; - if ( style.IsSetColorSurf() ) { - Quantity_ColorRGBA sCol = style.GetColorSurfRGBA(); - RenderTransp = 1.0 - sCol.Alpha(); - surfColor = Styles.EncodeColor ( sCol.GetRGB() ); + Handle(StepVisual_Colour) aSurfColor, aCurvColor; + Standard_Real aRenderTransp = 0.0; + if (theStyle.IsSetColorSurf()) + { + Quantity_ColorRGBA aSurfCol = theStyle.GetColorSurfRGBA(); + aRenderTransp = 1.0 - aSurfCol.Alpha(); + aSurfColor = aStyles.EncodeColor(aSurfCol.GetRGB()); } - if ( style.IsSetColorCurv() ) - curvColor = Styles.EncodeColor ( style.GetColorCurv() ); + if (theStyle.IsSetColorCurv()) + aCurvColor = aStyles.EncodeColor(theStyle.GetColorCurv()); Standard_Boolean isComponent = Standard_True;// cause need to get PSBC - Handle(StepRepr_RepresentationItem) item; + Handle(StepRepr_RepresentationItem) anItem; // set default color for invisible SHUO. Standard_Boolean isSetDefaultColor = Standard_False; - if (surfColor.IsNull() && curvColor.IsNull() && !style.IsVisible() ) { - surfColor = Styles.EncodeColor ( Quantity_Color(Quantity_NOC_WHITE) ); + if (aSurfColor.IsNull() && aCurvColor.IsNull() && !theStyle.IsVisible()) + { + aSurfColor = aStyles.EncodeColor(Quantity_Color(Quantity_NOC_WHITE)); isSetDefaultColor = Standard_True; } - Handle(StepVisual_PresentationStyleAssignment) PSA = - Styles.MakeColorPSA ( item, surfColor, curvColor, surfColor, RenderTransp, isComponent ); - Handle(StepVisual_StyledItem) override; //null styled item - + Handle(StepVisual_PresentationStyleAssignment) aPSA = + aStyles.MakeColorPSA(anItem, aSurfColor, aCurvColor, aSurfColor, aRenderTransp, isComponent); + Handle(StepVisual_StyledItem) anOverride; //null styled item + // find the repr item of the shape - const Handle(XSControl_TransferWriter) &TW = WS->TransferWriter(); - const Handle(Transfer_FinderProcess) &FP = TW->FinderProcess(); - Handle(TransferBRep_ShapeMapper) mapper = TransferBRep::ShapeMapper ( FP, Sh ); - Handle(StepShape_ContextDependentShapeRepresentation) CDSR; - FP->FindTypedTransient(mapper, - STANDARD_TYPE(StepShape_ContextDependentShapeRepresentation), - CDSR); - if ( CDSR.IsNull() ) + const Handle(XSControl_TransferWriter)& aTW = theWS->TransferWriter(); + const Handle(Transfer_FinderProcess)& aFP = aTW->FinderProcess(); + Handle(TransferBRep_ShapeMapper) aMapper = TransferBRep::ShapeMapper(aFP, theShape); + Handle(StepShape_ContextDependentShapeRepresentation) aCDSR; + aFP->FindTypedTransient(aMapper, + STANDARD_TYPE(StepShape_ContextDependentShapeRepresentation), + aCDSR); + if (aCDSR.IsNull()) return Standard_False; // find context - Handle(StepRepr_RepresentationContext) Context = Styles.FindContext( Sh ); - TopoDS_Shape aTopSh = Sh; - if (Context.IsNull()) { - TDF_Label aTopShL = STool->FindShape(Sh, Standard_False); + Handle(StepRepr_RepresentationContext) aContext = aStyles.FindContext(theShape); + TopoDS_Shape aTopSh = theShape; + if (aContext.IsNull()) + { + TDF_Label aTopShL = theSTool->FindShape(theShape, Standard_False); if (aTopShL.IsNull()) return Standard_False; - aTopSh = STool->GetShape( aTopShL ); - Context = Styles.FindContext ( aTopSh ); + aTopSh = XCAFDoc_ShapeTool::GetShape(aTopShL); + aContext = aStyles.FindContext(aTopSh); } - if (Context.IsNull()) + if (aContext.IsNull()) return Standard_False; // get representation item of the shape - TopLoc_Location L; - TColStd_SequenceOfTransient seqRI; - FindEntities ( FP, Sh, L, seqRI ); -#ifdef OCCT_DEBUG - if ( seqRI.Length() <=0 ) - std::cout << "Warning: Cannot find RI for " << Sh.TShape()->DynamicType()->Name() << std::endl; -#endif - item = Handle(StepRepr_RepresentationItem)::DownCast(seqRI(1)); + TopLoc_Location aLocation; + TColStd_SequenceOfTransient aSeqRI; + FindEntities(aFP, theShape, aLocation, aSeqRI); + if (aSeqRI.Length() <= 0) + Message::SendTrace() << "Warning: Cannot find RI for " << theShape.TShape()->DynamicType()->Name() << "\n"; + anItem = Handle(StepRepr_RepresentationItem)::DownCast(aSeqRI(1)); //get overridden styled item - getStyledItem(Sh,STool, Styles, override,myMapCompMDGPR); - + getStyledItem(theShape, theSTool, aStyles, anOverride, theMapCompMDGPR); + // get STEP STYLED ITEM - Handle(StepVisual_StyledItem) STEPstyle = Styles.AddStyle ( item, PSA, override ); + Handle(StepVisual_StyledItem) aSTEPstyle = aStyles.AddStyle(anItem, aPSA, anOverride); // create SR, SDR and all necessary references between them and ST, PDS, PSBC, GRC - Styles.CreateNAUOSRD( Context, CDSR, PDS ); - + aStyles.CreateNAUOSRD(aContext, aCDSR, thePDS); + // add step styled item of SHUO to the model // do it by additing styled item to the MDGPR - if ( !aTopSh.IsNull() && !myMapCompMDGPR.IsBound( aTopSh ) ) { + if (!aTopSh.IsNull() && !theMapCompMDGPR.IsBound(aTopSh)) + { // create MDGPR and record it in model -#ifdef OCCT_DEBUG - std::cout << "Warning: " << __FILE__ << ": Create new MDGPR for SHUO instance" << std::endl; -#endif + Message::SendTrace() << "Warning: " << __FILE__ << ": Create new MDGPR for SHUO instance" << "\n"; Handle(StepVisual_MechanicalDesignGeometricPresentationRepresentation) aMDGPR; - Styles.CreateMDGPR ( Context, aMDGPR ); + aStyles.CreateMDGPR(aContext, aMDGPR); if (!aMDGPR.IsNull()) - myMapCompMDGPR.Bind( aTopSh, aMDGPR ); + theMapCompMDGPR.Bind(aTopSh, aMDGPR); } - else if ( !aTopSh.IsNull() && myMapCompMDGPR.IsBound( aTopSh ) ) { + else if (!aTopSh.IsNull() && theMapCompMDGPR.IsBound(aTopSh)) + { // get MDGPR of the top-level shape - Handle(StepVisual_PresentationRepresentation) aMDGPR = - Handle(StepVisual_PresentationRepresentation)::DownCast( myMapCompMDGPR.Find( aTopSh ) ); + Handle(StepVisual_PresentationRepresentation) aMDGPR = + Handle(StepVisual_PresentationRepresentation)::DownCast(theMapCompMDGPR.Find(aTopSh)); // get old styled items to not lose it - Handle(StepRepr_HArray1OfRepresentationItem) oldItems = aMDGPR->Items(); - Standard_Integer oldLengthlen = 0; - if (!oldItems.IsNull()) - oldLengthlen = oldItems->Length(); + Handle(StepRepr_HArray1OfRepresentationItem) anOldItems = aMDGPR->Items(); + Standard_Integer anOldLengthlen = 0; + if (!anOldItems.IsNull()) + anOldLengthlen = anOldItems->Length(); // create new array of styled items by an olds and new one - Handle(StepRepr_HArray1OfRepresentationItem) newItems = - new StepRepr_HArray1OfRepresentationItem(1, oldLengthlen + 1); - Standard_Integer si; - Standard_Integer el = 1; - for ( si=1; si <= oldLengthlen; si++ ) - newItems->SetValue( el++, oldItems->Value( si ) ); - newItems->SetValue (el++, STEPstyle); + Handle(StepRepr_HArray1OfRepresentationItem) aNewItems = + new StepRepr_HArray1OfRepresentationItem(1, anOldLengthlen + 1); + Standard_Integer aSetStyleInd = 1; + for (StepRepr_HArray1OfRepresentationItem::Iterator aStyleIter(anOldItems->Array1()); + aStyleIter.More(); aStyleIter.Next()) + { + aNewItems->SetValue(aSetStyleInd++, aStyleIter.Value()); + } + aNewItems->SetValue(aSetStyleInd++, aSTEPstyle); // init MDGPR be new array of styled items - if (newItems->Length() > 0) - aMDGPR->SetItems( newItems ); + if (aNewItems->Length() > 0) + aMDGPR->SetItems(aNewItems); } - else { - WS->Model()->AddWithRefs ( STEPstyle ); // add as root to the model, but it is not good -#ifdef OCCT_DEBUG - std::cout << "Warning: " << __FILE__ << ": adds styled item of SHUO as root, cause cannot find MDGPR" << std::endl; -#endif + else + { + theWS->Model()->AddWithRefs(aSTEPstyle); // add as root to the model, but it is not good + Message::SendTrace() << "Warning: " << __FILE__ << ": adds styled item of SHUO as root, cause cannot find MDGPR" << "\n"; } // create invisibility item for the styled item - if ( !style.IsVisible() ) { - if (isSetDefaultColor) { + if (!theStyle.IsVisible()) + { + if (isSetDefaultColor) + { // try to set default color from top-level shape - - setDefaultInstanceColor(override, PSA); + + setDefaultInstanceColor(anOverride, aPSA); } // create invisibility item and refer for styledItem - Handle(StepVisual_Invisibility) Invsblt = new StepVisual_Invisibility(); - Handle(StepVisual_HArray1OfInvisibleItem) HInvsblItm = - new StepVisual_HArray1OfInvisibleItem (1,1); + Handle(StepVisual_Invisibility) aInvsblt = new StepVisual_Invisibility(); + Handle(StepVisual_HArray1OfInvisibleItem) aHInvsblItm = + new StepVisual_HArray1OfInvisibleItem(1, 1); // put all style item into the harray StepVisual_InvisibleItem anInvItem; - anInvItem.SetValue( STEPstyle ); - HInvsblItm->SetValue( 1, anInvItem ); - Invsblt->Init( HInvsblItm ); - WS->Model()->AddWithRefs( Invsblt ); + anInvItem.SetValue(aSTEPstyle); + aHInvsblItm->SetValue(1, anInvItem); + aInvsblt->Init(aHInvsblItm); + theWS->Model()->AddWithRefs(aInvsblt); } - + return Standard_True; } - //======================================================================= -//function : WriteSHUOs -//purpose : +//function : writeSHUOs +//purpose : //======================================================================= - -Standard_Boolean STEPCAFControl_Writer::WriteSHUOs (const Handle(XSControl_WorkSession) &WS, - const TDF_LabelSequence &labels ) +Standard_Boolean STEPCAFControl_Writer::writeSHUOs(const Handle(XSControl_WorkSession)& theWS, + const TDF_LabelSequence& theLabels) { - if ( labels.Length() <=0 ) return Standard_False; - - // get working data - Handle(XCAFDoc_ColorTool) CTool = XCAFDoc_DocumentTool::ColorTool( labels(1) ); - Handle(XCAFDoc_VisMaterialTool) aMatTool = XCAFDoc_DocumentTool::VisMaterialTool( labels(1) ); - if (CTool.IsNull() ) + if (theLabels.IsEmpty()) return Standard_False; + // map of transferred SHUO TColStd_MapOfTransient aMapOfMainSHUO; // Iterate on requested shapes - for ( Standard_Integer i=1; i <= labels.Length(); i++ ) { - TDF_Label L = labels.Value(i); - if ( ! myLabels.IsBound ( L ) ) continue; // not recorded as translated, skip - if ( XCAFDoc_ShapeTool::IsAssembly ( L ) ) { - TDF_LabelSequence seq; - XCAFDoc_ShapeTool::GetComponents ( L, seq ); - // iterates on components of assembly - for (Standard_Integer k=1; k <= seq.Length(); k++) { - TDF_Label lab = seq(k); - TDF_AttributeSequence anAttrSeq; - CTool->ShapeTool()->GetAllComponentSHUO( lab, anAttrSeq ); - // work with SHUO - for (Standard_Integer j = 1; j <= anAttrSeq.Length(); j++) { - Handle(XCAFDoc_GraphNode) aSHUO = - Handle(XCAFDoc_GraphNode)::DownCast(anAttrSeq.Value( j )); - // take label of SHUO - TDF_Label aSHUOlab = aSHUO->Label(); - TDF_LabelSequence aUpLabels; - // check is it SHUO of upper_usage - CTool->ShapeTool()->GetSHUOUpperUsage( aSHUOlab, aUpLabels ); - if ( aUpLabels.Length() > 0 ) - continue; // transfer only main SHUO - if ( aMapOfMainSHUO.Contains( aSHUO ) ) - continue; // do not try to transfer SHUO twice - aMapOfMainSHUO.Add( aSHUO ); - // check if it is styled SHUO - XCAFPrs_Style SHUOstyle; - if ( !getSHUOstyle ( aSHUOlab, CTool, aMatTool, SHUOstyle ) ) { -#ifdef OCCT_DEBUG - std::cout << "Warning: " << __FILE__ << ": do not store SHUO without any style to the STEP model" << std::endl; -#endif - continue; - } - // write SHUO to the model amd then add structure type. - TopoDS_Shape NAUOShape; // shape of the deepest NAUO in the SHUO structure - Standard_Boolean isDeepest = Standard_False; - Handle(StepRepr_SpecifiedHigherUsageOccurrence) anEntOfSHUO; - Handle(StepBasic_ProductDefinition) aRelatingPD; - // create the top SHUO and all other. - writeSHUO( aSHUO, CTool->ShapeTool(), WS, anEntOfSHUO, NAUOShape, aRelatingPD, isDeepest ); - if ( anEntOfSHUO.IsNull() || NAUOShape.IsNull() ) { -#ifdef OCCT_DEBUG - std::cout << "Warning: " << __FILE__ << ": Cannot store SHUO" << std::endl; -#endif - continue; - } - // create new Product Definition Shape for TOP SHUO -#ifdef OCCT_DEBUG - std::cout << "Info: " << __FILE__ << ": Create NEW PDS for current SHUO " << std::endl; -#endif - Handle(StepRepr_ProductDefinitionShape) PDS = new StepRepr_ProductDefinitionShape; - Handle(TCollection_HAsciiString) aPDSname = new TCollection_HAsciiString("SHUO"); - Handle(TCollection_HAsciiString) descrStr = new TCollection_HAsciiString(""); - StepRepr_CharacterizedDefinition aCharDef; - aCharDef.SetValue( anEntOfSHUO ); - PDS->Init( aPDSname, Standard_False, descrStr, aCharDef ); - - // create styled item for SHUO and add to the model - createSHUOStyledItem ( SHUOstyle, PDS, WS, NAUOShape, CTool->ShapeTool(), myMapCompMDGPR ); - - } // end work with SHUO - } // end of an assembly components - } // end of IsAssembly case - // nothing to do if it is not assembly - continue; + for (TDF_LabelSequence::Iterator aLabelIter(theLabels); + aLabelIter.More(); aLabelIter.Next()) + { + const TDF_Label& aLabel = aLabelIter.Value(); + if (!myLabels.IsBound(aLabel)) + continue; // not recorded as translated, skip + if (!XCAFDoc_ShapeTool::IsAssembly(aLabel)) + { + continue; + } + TDF_LabelSequence aLabelSeq; + XCAFDoc_ShapeTool::GetComponents(aLabel, aLabelSeq); + // iterates on components of assembly + for (TDF_LabelSequence::Iterator aCompIter(aLabelSeq); + aCompIter.More(); aCompIter.Next()) + { + const TDF_Label& aCompL = aCompIter.Value(); + TDF_AttributeSequence anAttrSeq; + XCAFDoc_ShapeTool::GetAllComponentSHUO(aCompL, anAttrSeq); + // work with SHUO + for (TDF_AttributeSequence::Iterator anAttrIter(anAttrSeq); + anAttrIter.More(); anAttrIter.Next()) + { + Handle(XCAFDoc_GraphNode) aSHUO = + Handle(XCAFDoc_GraphNode)::DownCast(anAttrIter.Value()); + // take label of SHUO + TDF_Label aSHUOlab = aSHUO->Label(); + TDF_LabelSequence aUpLabels; + // check is it SHUO of upper_usage + XCAFDoc_ShapeTool::GetSHUOUpperUsage(aSHUOlab, aUpLabels); + if (aUpLabels.Length() > 0) + continue; // transfer only main SHUO + if (aMapOfMainSHUO.Contains(aSHUO)) + continue; // do not try to transfer SHUO twice + aMapOfMainSHUO.Add(aSHUO); + // check if it is styled SHUO + XCAFPrs_Style aSHUOstyle; + if (!getSHUOstyle(aSHUOlab, aSHUOstyle)) + { + Message::SendTrace() << "Warning: " << __FILE__ << ": do not store SHUO without any style to the STEP model" << "\n"; + continue; + } + // write SHUO to the model amd then add structure type. + TopoDS_Shape aNAUOShape; // shape of the deepest NAUO in the SHUO structure + Standard_Boolean isDeepest = Standard_False; + Handle(StepRepr_SpecifiedHigherUsageOccurrence) anEntOfSHUO; + Handle(StepBasic_ProductDefinition) aRelatingPD; + // create the top SHUO and all other. + writeSHUO(aSHUO, theWS, anEntOfSHUO, aNAUOShape, aRelatingPD, isDeepest); + if (anEntOfSHUO.IsNull() || aNAUOShape.IsNull()) + { + Message::SendTrace() << "Warning: " << __FILE__ << ": Cannot store SHUO" << "\n"; + continue; + } + // create new Product Definition Shape for TOP SHUO + Message::SendTrace() << "Info: " << __FILE__ << ": Create NEW PDS for current SHUO " << "\n"; + Handle(StepRepr_ProductDefinitionShape) aPDS = new StepRepr_ProductDefinitionShape; + Handle(TCollection_HAsciiString) aPDSname = new TCollection_HAsciiString("SHUO"); + Handle(TCollection_HAsciiString) aDescrStr = new TCollection_HAsciiString(""); + StepRepr_CharacterizedDefinition aCharDef; + aCharDef.SetValue(anEntOfSHUO); + aPDS->Init(aPDSname, Standard_False, aDescrStr, aCharDef); + + // create styled item for SHUO and add to the model + createSHUOStyledItem(aSHUOstyle, aPDS, theWS, aNAUOShape, XCAFDoc_DocumentTool::ShapeTool(aLabel), myMapCompMDGPR); + + } // end work with SHUO + } // end of an assembly components } // end of iterates on indicated labels return Standard_True; } - //======================================================================= //function : FindPDSforDGT //purpose : auxiliary: find PDS for AdvancedFace or EdgeCurve for creation // needed ShapeAspect in D> structure //======================================================================= -static Standard_Boolean FindPDSforDGT(const Interface_Graph &aGraph, - const Handle(Standard_Transient) &ent, - Handle(StepRepr_ProductDefinitionShape) &PDS, - Handle(StepRepr_RepresentationContext) &RC, - Handle(StepShape_AdvancedFace) &AF, - Handle(StepShape_EdgeCurve) &EC) +static Standard_Boolean FindPDSforDGT(const Interface_Graph& theGraph, + const Handle(Standard_Transient)& theEnt, + Handle(StepRepr_ProductDefinitionShape)& thePDS, + Handle(StepRepr_RepresentationContext)& theRC, + Handle(StepShape_AdvancedFace)& theAF, + Handle(StepShape_EdgeCurve)& theEC) { - if (ent.IsNull()) + if (theEnt.IsNull()) return Standard_False; - if( !ent->IsKind(STANDARD_TYPE(StepShape_EdgeCurve)) && - !ent->IsKind(STANDARD_TYPE(StepShape_AdvancedFace)) ) + if (!theEnt->IsKind(STANDARD_TYPE(StepShape_EdgeCurve)) && + !theEnt->IsKind(STANDARD_TYPE(StepShape_AdvancedFace))) + { return Standard_False; + } - AF = Handle(StepShape_AdvancedFace)::DownCast(ent); - if( AF.IsNull() ) { - EC = Handle(StepShape_EdgeCurve)::DownCast(ent); - Interface_EntityIterator subs = aGraph.Sharings(EC); - for(subs.Start(); subs.More() && AF.IsNull(); subs.Next()) { - Handle(StepShape_OrientedEdge) OE = Handle(StepShape_OrientedEdge)::DownCast(subs.Value()); - if(OE.IsNull()) continue; - Interface_EntityIterator subs1 = aGraph.Sharings(OE); - for(subs1.Start(); subs1.More() && AF.IsNull(); subs1.Next()) { - Handle(StepShape_EdgeLoop) EL = Handle(StepShape_EdgeLoop)::DownCast(subs1.Value()); - if(EL.IsNull()) continue; - Interface_EntityIterator subs2 = aGraph.Sharings(EL); - for(subs2.Start(); subs2.More() && AF.IsNull(); subs2.Next()) { - Handle(StepShape_FaceBound) FB = Handle(StepShape_FaceBound)::DownCast(subs2.Value()); - if(FB.IsNull()) continue; - Interface_EntityIterator subs3 = aGraph.Sharings(FB); - for(subs3.Start(); subs3.More() && AF.IsNull(); subs3.Next()) { - AF = Handle(StepShape_AdvancedFace)::DownCast(subs3.Value()); + theAF = Handle(StepShape_AdvancedFace)::DownCast(theEnt); + if (theAF.IsNull()) + { + theEC = Handle(StepShape_EdgeCurve)::DownCast(theEnt); + for (Interface_EntityIterator aSharingsIter = theGraph.Sharings(theEC); + aSharingsIter.More() && theAF.IsNull(); aSharingsIter.Next()) + { + Handle(StepShape_OrientedEdge) anOE = Handle(StepShape_OrientedEdge)::DownCast(aSharingsIter.Value()); + if (anOE.IsNull()) + continue; + for (Interface_EntityIterator aSubs1 = theGraph.Sharings(anOE); + aSubs1.More() && theAF.IsNull(); aSubs1.Next()) + { + Handle(StepShape_EdgeLoop) aEL = Handle(StepShape_EdgeLoop)::DownCast(aSubs1.Value()); + if (aEL.IsNull()) + continue; + for (Interface_EntityIterator aSubs2 = theGraph.Sharings(aEL); + aSubs2.More() && theAF.IsNull(); aSubs2.Next()) + { + Handle(StepShape_FaceBound) aFB = Handle(StepShape_FaceBound)::DownCast(aSubs2.Value()); + if (aFB.IsNull()) + continue; + for (Interface_EntityIterator aSubs3 = theGraph.Sharings(aFB); + aSubs3.More() && theAF.IsNull(); aSubs3.Next()) + { + theAF = Handle(StepShape_AdvancedFace)::DownCast(aSubs3.Value()); } } } } } - if(AF.IsNull()) return Standard_False; - - Interface_EntityIterator subs = aGraph.Sharings(AF); - for(subs.Start(); subs.More() && PDS.IsNull(); subs.Next()) { - Handle(StepShape_ConnectedFaceSet) CFS = - Handle(StepShape_ConnectedFaceSet)::DownCast(subs.Value()); - if(CFS.IsNull()) continue; - Interface_EntityIterator subs1 = aGraph.Sharings(CFS); - for(subs1.Start(); subs1.More() && PDS.IsNull(); subs1.Next()) { - Handle(StepRepr_RepresentationItem) RI = - Handle(StepRepr_RepresentationItem)::DownCast(subs1.Value()); - if(RI.IsNull()) continue; - Interface_EntityIterator subs2 = aGraph.Sharings(RI); - for(subs2.Start(); subs2.More() && PDS.IsNull(); subs2.Next()) { - Handle(StepShape_ShapeRepresentation) SR = - Handle(StepShape_ShapeRepresentation)::DownCast(subs2.Value()); - if(SR.IsNull()) continue; - RC = SR->ContextOfItems(); - Interface_EntityIterator subs3 = aGraph.Sharings(SR); - for(subs3.Start(); subs3.More() && PDS.IsNull(); subs3.Next()) { - Handle(StepShape_ShapeDefinitionRepresentation) SDR = - Handle(StepShape_ShapeDefinitionRepresentation)::DownCast(subs3.Value()); - if(SDR.IsNull()) continue; - Handle(StepRepr_PropertyDefinition) PropD = SDR->Definition().PropertyDefinition(); - if(PropD.IsNull()) continue; - PDS = Handle(StepRepr_ProductDefinitionShape)::DownCast(PropD); + if (theAF.IsNull()) + return Standard_False; + + for (Interface_EntityIterator aSharingsIter = theGraph.Sharings(theAF); + aSharingsIter.More() && thePDS.IsNull(); aSharingsIter.Next()) + { + Handle(StepShape_ConnectedFaceSet) aCFS = + Handle(StepShape_ConnectedFaceSet)::DownCast(aSharingsIter.Value()); + if (aCFS.IsNull()) + continue; + for (Interface_EntityIterator aSubs1 = theGraph.Sharings(aCFS); + aSubs1.More() && thePDS.IsNull(); aSubs1.Next()) + { + Handle(StepRepr_RepresentationItem) aRI = + Handle(StepRepr_RepresentationItem)::DownCast(aSubs1.Value()); + if (aRI.IsNull()) + continue; + for (Interface_EntityIterator aSubs2 = theGraph.Sharings(aRI); + aSubs2.More() && thePDS.IsNull(); aSubs2.Next()) + { + Handle(StepShape_ShapeRepresentation) aSR = + Handle(StepShape_ShapeRepresentation)::DownCast(aSubs2.Value()); + if (aSR.IsNull()) + continue; + theRC = aSR->ContextOfItems(); + for (Interface_EntityIterator aSubs3 = theGraph.Sharings(aSR); + aSubs3.More() && thePDS.IsNull(); aSubs3.Next()) + { + Handle(StepShape_ShapeDefinitionRepresentation) aSDR = + Handle(StepShape_ShapeDefinitionRepresentation)::DownCast(aSubs3.Value()); + if (aSDR.IsNull()) + continue; + Handle(StepRepr_PropertyDefinition) aPropD = aSDR->Definition().PropertyDefinition(); + if (aPropD.IsNull()) + continue; + thePDS = Handle(StepRepr_ProductDefinitionShape)::DownCast(aPropD); } } } } - return Standard_True; } @@ -2199,23 +2172,25 @@ static Standard_Boolean FindPDSforDGT(const Interface_Graph &aGraph, //function : FindPDS //purpose : auxiliary: find Product_definition_shape entity for given entity //======================================================================= -static Handle(StepRepr_ProductDefinitionShape) FindPDS(const Interface_Graph &theGraph, - const Handle(Standard_Transient) &theEnt, - Handle(StepRepr_RepresentationContext) &theRC) +static Handle(StepRepr_ProductDefinitionShape) FindPDS(const Interface_Graph& theGraph, + const Handle(Standard_Transient)& theEnt, + Handle(StepRepr_RepresentationContext)& theRC) { if (theEnt.IsNull()) return NULL; Handle(StepRepr_ProductDefinitionShape) aPDS; // try to find shape_representation in sharings - Interface_EntityIterator anIter = theGraph.Sharings(theEnt); - for (anIter.Start(); anIter.More() && aPDS.IsNull(); anIter.Next()) { + for (Interface_EntityIterator anIter = theGraph.Sharings(theEnt); + anIter.More() && aPDS.IsNull(); anIter.Next()) + { Handle(StepShape_ShapeRepresentation) aSR = Handle(StepShape_ShapeRepresentation)::DownCast(anIter.Value()); if (aSR.IsNull()) continue; theRC = aSR->ContextOfItems(); Interface_EntityIterator aSDRIt = theGraph.Sharings(aSR); - for (aSDRIt.Start(); aSDRIt.More() && aPDS.IsNull(); aSDRIt.Next()) { + for (aSDRIt.Start(); aSDRIt.More() && aPDS.IsNull(); aSDRIt.Next()) + { Handle(StepShape_ShapeDefinitionRepresentation) aSDR = Handle(StepShape_ShapeDefinitionRepresentation)::DownCast(aSDRIt.Value()); if (aSDR.IsNull()) continue; @@ -2227,17 +2202,17 @@ static Handle(StepRepr_ProductDefinitionShape) FindPDS(const Interface_Graph &th if (!aPDS.IsNull()) return aPDS; - anIter = theGraph.Sharings(theEnt); - for (anIter.Start(); anIter.More(); anIter.Next()) { + for (Interface_EntityIterator anIter = theGraph.Sharings(theEnt); + anIter.More(); anIter.Next()) + { if (anIter.Value()->IsKind(STANDARD_TYPE(StepShape_TopologicalRepresentationItem)) || - anIter.Value()->IsKind(STANDARD_TYPE(StepGeom_GeometricRepresentationItem))) + anIter.Value()->IsKind(STANDARD_TYPE(StepGeom_GeometricRepresentationItem))) { aPDS = FindPDS(theGraph, anIter.Value(), theRC); if (!aPDS.IsNull()) return aPDS; } } - return aPDS; } @@ -2246,30 +2221,42 @@ static Handle(StepRepr_ProductDefinitionShape) FindPDS(const Interface_Graph &th //purpose : auxiliary //======================================================================= static StepBasic_Unit GetUnit(const Handle(StepRepr_RepresentationContext)& theRC, - const Standard_Boolean isAngle = Standard_False) + const Standard_Boolean theIsAngle = Standard_False) { StepBasic_Unit aUnit; Handle(StepBasic_NamedUnit) aCurrentUnit; - if (isAngle) { + if (theIsAngle) + { Handle(StepGeom_GeometricRepresentationContextAndGlobalUnitAssignedContext) aCtx = Handle(StepGeom_GeometricRepresentationContextAndGlobalUnitAssignedContext)::DownCast(theRC); - if(!aCtx.IsNull()) { - for(Standard_Integer j = 1; j <= aCtx->NbUnits(); j++) { - if (aCtx->UnitsValue(j)->IsKind(STANDARD_TYPE(StepBasic_SiUnitAndPlaneAngleUnit)) || - aCtx->UnitsValue(j)->IsKind(STANDARD_TYPE(StepBasic_ConversionBasedUnitAndPlaneAngleUnit))) { - aCurrentUnit = aCtx->UnitsValue(j); + if (!aCtx.IsNull()) + { + for (StepBasic_HArray1OfNamedUnit::Iterator aUnitIter(aCtx->Units()->Array1()); + aUnitIter.More(); aUnitIter.Next()) + { + const Handle(StepBasic_NamedUnit)& aCurUnitValue = aUnitIter.Value(); + if (aCurUnitValue->IsKind(STANDARD_TYPE(StepBasic_SiUnitAndPlaneAngleUnit)) || + aCurUnitValue->IsKind(STANDARD_TYPE(StepBasic_ConversionBasedUnitAndPlaneAngleUnit))) + { + aCurrentUnit = aCurUnitValue; break; } } } - if (aCurrentUnit.IsNull()) { + if (aCurrentUnit.IsNull()) + { Handle(StepGeom_GeomRepContextAndGlobUnitAssCtxAndGlobUncertaintyAssCtx) aCtx1 = Handle(StepGeom_GeomRepContextAndGlobUnitAssCtxAndGlobUncertaintyAssCtx)::DownCast(theRC); - if(!aCtx1.IsNull()) { - for(Standard_Integer j = 1; j <= aCtx1->NbUnits(); j++) { - if (aCtx1->UnitsValue(j)->IsKind(STANDARD_TYPE(StepBasic_SiUnitAndPlaneAngleUnit)) || - aCtx1->UnitsValue(j)->IsKind(STANDARD_TYPE(StepBasic_ConversionBasedUnitAndPlaneAngleUnit))) { - aCurrentUnit = aCtx1->UnitsValue(j); + if (!aCtx1.IsNull()) + { + for (StepBasic_HArray1OfNamedUnit::Iterator aUnitIter(aCtx1->Units()->Array1()); + aUnitIter.More(); aUnitIter.Next()) + { + const Handle(StepBasic_NamedUnit)& aCurUnitValue = aUnitIter.Value(); + if (aCurUnitValue->IsKind(STANDARD_TYPE(StepBasic_SiUnitAndPlaneAngleUnit)) || + aCurUnitValue->IsKind(STANDARD_TYPE(StepBasic_ConversionBasedUnitAndPlaneAngleUnit))) + { + aCurrentUnit = aCurUnitValue; break; } } @@ -2278,26 +2265,38 @@ static StepBasic_Unit GetUnit(const Handle(StepRepr_RepresentationContext)& theR if (aCurrentUnit.IsNull()) aCurrentUnit = new StepBasic_SiUnitAndPlaneAngleUnit; } - else { + else + { Handle(StepGeom_GeometricRepresentationContextAndGlobalUnitAssignedContext) aCtx = Handle(StepGeom_GeometricRepresentationContextAndGlobalUnitAssignedContext)::DownCast(theRC); - if(!aCtx.IsNull()) { - for(Standard_Integer j = 1; j <= aCtx->NbUnits(); j++) { - if (aCtx->UnitsValue(j)->IsKind(STANDARD_TYPE(StepBasic_SiUnitAndLengthUnit)) || - aCtx->UnitsValue(j)->IsKind(STANDARD_TYPE(StepBasic_ConversionBasedUnitAndLengthUnit))) { - aCurrentUnit = aCtx->UnitsValue(j); + if (!aCtx.IsNull()) + { + for (StepBasic_HArray1OfNamedUnit::Iterator aUnitIter(aCtx->Units()->Array1()); + aUnitIter.More(); aUnitIter.Next()) + { + const Handle(StepBasic_NamedUnit)& aCurUnitValue = aUnitIter.Value(); + if (aCurUnitValue->IsKind(STANDARD_TYPE(StepBasic_SiUnitAndLengthUnit)) || + aCurUnitValue->IsKind(STANDARD_TYPE(StepBasic_ConversionBasedUnitAndLengthUnit))) + { + aCurrentUnit = aCurUnitValue; break; } } } - if (aCurrentUnit.IsNull()) { + if (aCurrentUnit.IsNull()) + { Handle(StepGeom_GeomRepContextAndGlobUnitAssCtxAndGlobUncertaintyAssCtx) aCtx1 = Handle(StepGeom_GeomRepContextAndGlobUnitAssCtxAndGlobUncertaintyAssCtx)::DownCast(theRC); - if(!aCtx1.IsNull()) { - for(Standard_Integer j = 1; j <= aCtx1->NbUnits(); j++) { - if (aCtx1->UnitsValue(j)->IsKind(STANDARD_TYPE(StepBasic_SiUnitAndLengthUnit)) || - aCtx1->UnitsValue(j)->IsKind(STANDARD_TYPE(StepBasic_ConversionBasedUnitAndLengthUnit))) { - aCurrentUnit = aCtx1->UnitsValue(j); + if (!aCtx1.IsNull()) + { + for (StepBasic_HArray1OfNamedUnit::Iterator aUnitIter(aCtx1->Units()->Array1()); + aUnitIter.More(); aUnitIter.Next()) + { + const Handle(StepBasic_NamedUnit)& aCurUnitValue = aUnitIter.Value(); + if (aCurUnitValue->IsKind(STANDARD_TYPE(StepBasic_SiUnitAndLengthUnit)) || + aCurUnitValue->IsKind(STANDARD_TYPE(StepBasic_ConversionBasedUnitAndLengthUnit))) + { + aCurrentUnit = aCurUnitValue; break; } } @@ -2319,8 +2318,8 @@ static Handle(StepRepr_ReprItemAndMeasureWithUnit) CreateDimValue(const Standard const StepBasic_Unit theUnit, const Handle(TCollection_HAsciiString)& theName, const Standard_CString theMeasureName, - const Standard_Boolean isAngle, - const Standard_Boolean isQualified = Standard_False, + const Standard_Boolean theIsAngle, + const Standard_Boolean theIsQualified = Standard_False, const Handle(StepShape_QualifiedRepresentationItem)& theQRI = NULL) { Handle(StepRepr_RepresentationItem) aReprItem = new StepRepr_RepresentationItem(); @@ -2330,33 +2329,39 @@ static Handle(StepRepr_ReprItemAndMeasureWithUnit) CreateDimValue(const Standard aValueMember->SetName(theMeasureName); aValueMember->SetReal(theValue); aMWU->Init(aValueMember, theUnit); - if (isQualified) { - if (isAngle) { + if (theIsQualified) + { + if (theIsAngle) + { // Angle & with qualifiers - Handle(StepRepr_ReprItemAndPlaneAngleMeasureWithUnitAndQRI) anItem = + Handle(StepRepr_ReprItemAndPlaneAngleMeasureWithUnitAndQRI) anItem = new StepRepr_ReprItemAndPlaneAngleMeasureWithUnitAndQRI(); anItem->Init(aMWU, aReprItem, theQRI); return anItem; } - else { + else + { // Length & with qualifiers - Handle(StepRepr_ReprItemAndLengthMeasureWithUnitAndQRI) anItem = + Handle(StepRepr_ReprItemAndLengthMeasureWithUnitAndQRI) anItem = new StepRepr_ReprItemAndLengthMeasureWithUnitAndQRI(); anItem->Init(aMWU, aReprItem, theQRI); return anItem; } } - else { - if (isAngle) { + else + { + if (theIsAngle) + { // Angle & without qualifiers - Handle(StepRepr_ReprItemAndPlaneAngleMeasureWithUnit) anItem = + Handle(StepRepr_ReprItemAndPlaneAngleMeasureWithUnit) anItem = new StepRepr_ReprItemAndPlaneAngleMeasureWithUnit(); anItem->Init(aMWU, aReprItem); return anItem; } - else { + else + { // Length & without qualifiers - Handle(StepRepr_ReprItemAndLengthMeasureWithUnit) anItem = + Handle(StepRepr_ReprItemAndLengthMeasureWithUnit) anItem = new StepRepr_ReprItemAndLengthMeasureWithUnit(); anItem->Init(aMWU, aReprItem); return anItem; @@ -2365,30 +2370,30 @@ static Handle(StepRepr_ReprItemAndMeasureWithUnit) CreateDimValue(const Standard } //======================================================================= -//function : WriteShapeAspect +//function : writeShapeAspect //purpose : auxiliary (write Shape_Aspect entity for given shape) //======================================================================= - -Handle(StepRepr_ShapeAspect) STEPCAFControl_Writer::WriteShapeAspect (const Handle(XSControl_WorkSession) &WS, - const TDF_Label theLabel, - const TopoDS_Shape theShape, - Handle(StepRepr_RepresentationContext)& theRC, - Handle(StepAP242_GeometricItemSpecificUsage)& theGISU) +Handle(StepRepr_ShapeAspect) STEPCAFControl_Writer::writeShapeAspect(const Handle(XSControl_WorkSession)& theWS, + const TDF_Label theLabel, + const TopoDS_Shape theShape, + Handle(StepRepr_RepresentationContext)& theRC, + Handle(StepAP242_GeometricItemSpecificUsage)& theGISU) { // Get working data - const Handle(Interface_InterfaceModel) &Model = WS->Model(); - const Handle(XSControl_TransferWriter) &TW = WS->TransferWriter(); - const Handle(Transfer_FinderProcess) &FP = TW->FinderProcess(); - const Handle(Interface_HGraph) aHGraph = WS->HGraph(); + const Handle(Interface_InterfaceModel)& aModel = theWS->Model(); + const Handle(XSControl_TransferWriter)& aTW = theWS->TransferWriter(); + const Handle(Transfer_FinderProcess)& aFP = aTW->FinderProcess(); + const Handle(Interface_HGraph) aHGraph = theWS->HGraph(); if (aHGraph.IsNull()) return NULL; Interface_Graph aGraph = aHGraph->Graph(); TopLoc_Location aLoc; TColStd_SequenceOfTransient aSeqRI; - FindEntities( FP, theShape, aLoc, aSeqRI ); - if ( aSeqRI.Length() <= 0 ) { - FP->Messenger()->SendInfo() << "Warning: Cannot find RI for "<DynamicType()->Name()<DynamicType()->Name() << "\n"; return NULL; } @@ -2396,14 +2401,15 @@ Handle(StepRepr_ShapeAspect) STEPCAFControl_Writer::WriteShapeAspect (const Hand Handle(StepRepr_RepresentationContext) aRC; Handle(Standard_Transient) anEnt = aSeqRI.Value(1); aPDS = FindPDS(aGraph, anEnt, aRC); - if(aPDS.IsNull()) + if (aPDS.IsNull()) return NULL; theRC = aRC; // Shape_Aspect Handle(TCollection_HAsciiString) aName = new TCollection_HAsciiString(); Handle(TDataStd_Name) aNameAttr; - if (theLabel.FindAttribute(TDataStd_Name::GetID(), aNameAttr)) { + if (theLabel.FindAttribute(TDataStd_Name::GetID(), aNameAttr)) + { aName = new TCollection_HAsciiString(TCollection_AsciiString(aNameAttr->Get())); Standard_Integer aFirstSpace = aName->Search(" "); if (aFirstSpace != -1) @@ -2422,10 +2428,11 @@ Handle(StepRepr_ShapeAspect) STEPCAFControl_Writer::WriteShapeAspect (const Hand Handle(StepRepr_HArray1OfRepresentationItem) anReprItems = new StepRepr_HArray1OfRepresentationItem(1, 1); Handle(StepRepr_RepresentationItem) anIdentifiedItem = Handle(StepRepr_RepresentationItem)::DownCast(anEnt); anReprItems->SetValue(1, anIdentifiedItem); - Interface_EntityIterator subs = aGraph.Sharings(aPDS); Handle(StepShape_ShapeDefinitionRepresentation) aSDR; - for (subs.Start(); subs.More() && aSDR.IsNull(); subs.Next()) { - Handle(Standard_Transient) anEntity = subs.Value(); + for (Interface_EntityIterator aSharingIter = aGraph.Sharings(aPDS); + aSharingIter.More() && aSDR.IsNull(); aSharingIter.Next()) + { + Handle(Standard_Transient) anEntity = aSharingIter.Value(); aSDR = Handle(StepShape_ShapeDefinitionRepresentation)::DownCast(anEntity); } if (aSDR.IsNull()) @@ -2433,21 +2440,21 @@ Handle(StepRepr_ShapeAspect) STEPCAFControl_Writer::WriteShapeAspect (const Hand // Set entities to model aGISU->Init(aName, aDescription, aDefinition, aSDR->UsedRepresentation(), anReprItems); - Model->AddWithRefs(aSA); - Model->AddWithRefs(aGISU); + aModel->AddWithRefs(aSA); + aModel->AddWithRefs(aGISU); theGISU = aGISU; return aSA; } //======================================================================= -//function : WritePresentation +//function : writePresentation //purpose : auxiliary (write annotation plane and presentation) //====================================================================== -void STEPCAFControl_Writer::WritePresentation(const Handle(XSControl_WorkSession)& WS, +void STEPCAFControl_Writer::writePresentation(const Handle(XSControl_WorkSession)& theWS, const TopoDS_Shape& thePresentation, const Handle(TCollection_HAsciiString)& thePrsName, - const Standard_Boolean hasSemantic, - const Standard_Boolean hasPlane, + const Standard_Boolean theHasSemantic, + const Standard_Boolean theHasPlane, const gp_Ax2& theAnnotationPlane, const gp_Pnt& theTextPosition, const Handle(Standard_Transient) theDimension) @@ -2455,7 +2462,7 @@ void STEPCAFControl_Writer::WritePresentation(const Handle(XSControl_WorkSession if (thePresentation.IsNull()) return; // Get working data - const Handle(Interface_InterfaceModel) &aModel = WS->Model(); + const Handle(Interface_InterfaceModel)& aModel = theWS->Model(); // Presentation Handle(StepVisual_TessellatedGeometricSet) aGeomSet = STEPCAFControl_GDTProperty::GetTessellation(thePresentation); @@ -2474,7 +2481,7 @@ void STEPCAFControl_Writer::WritePresentation(const Handle(XSControl_WorkSession StepAP242_ItemIdentifiedRepresentationUsageDefinition aDimension; aDimension.SetValue(theDimension); Handle(TCollection_HAsciiString) aDMIAName; - if (hasSemantic) + if (theHasSemantic) aDMIAName = new TCollection_HAsciiString("PMI representation to presentation link"); else aDMIAName = new TCollection_HAsciiString(); @@ -2483,7 +2490,7 @@ void STEPCAFControl_Writer::WritePresentation(const Handle(XSControl_WorkSession aDMIA->Init(aDMIAName, new TCollection_HAsciiString(), aDimension, myGDTPresentationDM, aDCsForDMIA); aModel->AddWithRefs(aDMIA); - if (!hasPlane) + if (!theHasPlane) return; // Annotation plane @@ -2524,22 +2531,22 @@ void STEPCAFControl_Writer::WritePresentation(const Handle(XSControl_WorkSession } //======================================================================= -//function : WriteDatumAP242 -//purpose : auxiliary (write Datum entity for given shape or write all -// necessary entities and link them to already written datum +//function : writeDatumAP242 +//purpose : auxiliary (write Datum entity for given shape or write all +// necessary entities and link them to already written datum // in case of multiple features association) //======================================================================= -Handle(StepDimTol_Datum) STEPCAFControl_Writer::WriteDatumAP242(const Handle(XSControl_WorkSession)& WS, +Handle(StepDimTol_Datum) STEPCAFControl_Writer::writeDatumAP242(const Handle(XSControl_WorkSession)& theWS, const TDF_LabelSequence& theShapeL, const TDF_Label& theDatumL, - const Standard_Boolean isFirstDTarget, + const Standard_Boolean theIsFirstDTarget, const Handle(StepDimTol_Datum) theWrittenDatum) { // Get working data - const Handle(Interface_InterfaceModel) &Model = WS->Model(); - const Handle(XSControl_TransferWriter) &TW = WS->TransferWriter(); - const Handle(Transfer_FinderProcess) &FP = TW->FinderProcess(); - const Handle(Interface_HGraph) aHGraph = WS->HGraph(); + const Handle(Interface_InterfaceModel)& aModel = theWS->Model(); + const Handle(XSControl_TransferWriter)& aTW = theWS->TransferWriter(); + const Handle(Transfer_FinderProcess)& aFP = aTW->FinderProcess(); + const Handle(Interface_HGraph) aHGraph = theWS->HGraph(); if (aHGraph.IsNull()) return NULL; Interface_Graph aGraph = aHGraph->Graph(); @@ -2551,16 +2558,18 @@ Handle(StepDimTol_Datum) STEPCAFControl_Writer::WriteDatumAP242(const Handle(XSC Handle(StepAP242_GeometricItemSpecificUsage) aGISU; Standard_Integer aSANum = 0, aGISUNum = 0; // Link with datum feature - for (Standard_Integer i = 1; i <= theShapeL.Length(); i++) { + for (TDF_LabelSequence::Iterator aLabelIter(theShapeL); + aLabelIter.More(); aLabelIter.Next()) + { Handle(Standard_Transient) anEnt; - TopoDS_Shape aShape; TopLoc_Location aLoc; TColStd_SequenceOfTransient aSeqRI; - aShape = XCAFDoc_ShapeTool::GetShape(theShapeL.Value(i)); - FindEntities(FP, aShape, aLoc, aSeqRI); - if (aSeqRI.Length() <= 0) { - FP->Messenger()->SendInfo() << "Warning: Cannot find RI for " << aShape.TShape()->DynamicType()->Name() << std::endl; + TopoDS_Shape aShape = XCAFDoc_ShapeTool::GetShape(aLabelIter.Value()); + FindEntities(aFP, aShape, aLoc, aSeqRI); + if (aSeqRI.Length() <= 0) + { + Message::SendTrace() << "Warning: Cannot find RI for " << aShape.TShape()->DynamicType()->Name() << "\n"; continue; } anEnt = aSeqRI.Value(1); @@ -2568,108 +2577,118 @@ Handle(StepDimTol_Datum) STEPCAFControl_Writer::WriteDatumAP242(const Handle(XSC if (aPDS.IsNull()) continue; - Handle(StepRepr_ShapeAspect) aCurrentSA = WriteShapeAspect(WS, theDatumL, aShape, aRC, aGISU); + Handle(StepRepr_ShapeAspect) aCurrentSA = writeShapeAspect(theWS, theDatumL, aShape, aRC, aGISU); if (aCurrentSA.IsNull()) continue; aSASeq.Append(aCurrentSA); - aSANum = Model->Number(aCurrentSA); - aGISUNum = Model->Number(aGISU); + aSANum = aModel->Number(aCurrentSA); + aGISUNum = aModel->Number(aGISU); } - if (aPDS.IsNull()) { + if (aPDS.IsNull()) + { // Workaround for datums without shape aPDS = myGDTCommonPDS; Interface_EntityIterator aSDRIt = aGraph.Sharings(aPDS); Handle(StepShape_ShapeDefinitionRepresentation) aSDR; for (aSDRIt.Start(); aSDRIt.More() && aSDR.IsNull(); aSDRIt.Next()) aSDR = Handle(StepShape_ShapeDefinitionRepresentation)::DownCast(aSDRIt.Value()); - if (!aSDR.IsNull()) { + if (!aSDR.IsNull()) + { Handle(StepRepr_Representation) aRepr = aSDR->UsedRepresentation(); if (!aRepr.IsNull()) aRC = aRepr->ContextOfItems(); } } - // Find if datum has datum targets and get common datum attributes Handle(XCAFDoc_Datum) aDatumAttr; - if (!theDatumL.FindAttribute(XCAFDoc_Datum::GetID(), aDatumAttr)) + if (!theDatumL.FindAttribute(XCAFDoc_Datum::GetID(), aDatumAttr)) return NULL; Handle(XCAFDimTolObjects_DatumObject) anObject = aDatumAttr->GetObject(); if (anObject.IsNull()) return NULL; Standard_Boolean isSimpleDatum = !anObject->IsDatumTarget(); Handle(TCollection_HAsciiString) anIdentifier = anObject->GetName(); - Handle(TCollection_HAsciiString) aTargetId = (anObject->GetDatumTargetNumber() == 0 ? - new TCollection_HAsciiString() : new TCollection_HAsciiString(anObject->GetDatumTargetNumber())); + Handle(TCollection_HAsciiString) aTargetId = (anObject->GetDatumTargetNumber() == 0 ? + new TCollection_HAsciiString() : new TCollection_HAsciiString(anObject->GetDatumTargetNumber())); // If datum type is area, but there is no area in object, write as simple datum if (anObject->GetDatumTargetType() == XCAFDimTolObjects_DatumTargetType_Area && - anObject->GetDatumTarget().IsNull()) + anObject->GetDatumTarget().IsNull()) isSimpleDatum = Standard_True; // Simple datum - if (isSimpleDatum) { - if (aSASeq.Length() == 0) { + if (isSimpleDatum) + { + if (aSASeq.Length() == 0) + { // Create empty datum with name and presentation only Handle(StepDimTol_DatumFeature) aDF = new StepDimTol_DatumFeature(); aDF->Init(new TCollection_HAsciiString(), new TCollection_HAsciiString(), aPDS, StepData_LTrue); aSA = aDF; - Model->AddWithRefs(aDF); + aModel->AddWithRefs(aDF); } - else if (aSASeq.Length() == 1) { + else if (aSASeq.Length() == 1) + { Handle(StepDimTol_DatumFeature) aDF = new StepDimTol_DatumFeature(); aDF->Init(new TCollection_HAsciiString(), new TCollection_HAsciiString(), aPDS, StepData_LTrue); - Model->ReplaceEntity(aSANum, aDF); + aModel->ReplaceEntity(aSANum, aDF); aSA = aDF; StepAP242_ItemIdentifiedRepresentationUsageDefinition aDefinition; aDefinition.SetValue(aDF); aGISU->SetDefinition(aDefinition); - Model->ReplaceEntity(aGISUNum, aGISU); + aModel->ReplaceEntity(aGISUNum, aGISU); } - else if (aSASeq.Length() > 1) { + else if (aSASeq.Length() > 1) + { Handle(StepRepr_CompShAspAndDatumFeatAndShAsp) aDF = new StepRepr_CompShAspAndDatumFeatAndShAsp(); aDF->Init(new TCollection_HAsciiString(), new TCollection_HAsciiString(), aPDS, StepData_LTrue); - for (Standard_Integer i = 1; i <= aSASeq.Length(); i++) { + for (Standard_Integer i = 1; i <= aSASeq.Length(); i++) + { Handle(StepRepr_ShapeAspectRelationship) aSAR = new StepRepr_ShapeAspectRelationship(); aSAR->Init(new TCollection_HAsciiString(), Standard_False, new TCollection_HAsciiString(), aDF, aSASeq.Value(i)); - Model->AddWithRefs(aSAR); + aModel->AddWithRefs(aSAR); } aSA = aDF; - Model->AddWithRefs(aDF); + aModel->AddWithRefs(aDF); } } // Datum with datum targets - else { + else + { XCAFDimTolObjects_DatumTargetType aDatumType = anObject->GetDatumTargetType(); Handle(StepDimTol_DatumTarget) aDatumTarget; // Note: the given way to write such datum type may be incorrect (too little information) - if (aDatumType == XCAFDimTolObjects_DatumTargetType_Area) { + if (aDatumType == XCAFDimTolObjects_DatumTargetType_Area) + { TopoDS_Shape aDTShape = anObject->GetDatumTarget(); Handle(StepAP242_GeometricItemSpecificUsage) anAreaGISU; - Handle(StepRepr_ShapeAspect) anAreaSA = WriteShapeAspect(WS, theDatumL, aDTShape, aRC, anAreaGISU); - aSANum = Model->Number(anAreaSA); - aGISUNum = Model->Number(anAreaGISU); + Handle(StepRepr_ShapeAspect) anAreaSA = writeShapeAspect(theWS, theDatumL, aDTShape, aRC, anAreaGISU); + aSANum = aModel->Number(anAreaSA); + aGISUNum = aModel->Number(anAreaGISU); Handle(StepDimTol_DatumTarget) aDT = new StepDimTol_DatumTarget(); aDT->Init(new TCollection_HAsciiString(), new TCollection_HAsciiString("area"), anAreaSA->OfShape(), - StepData_LTrue, aTargetId); - Model->ReplaceEntity(aSANum, aDT); + StepData_LTrue, aTargetId); + aModel->ReplaceEntity(aSANum, aDT); StepAP242_ItemIdentifiedRepresentationUsageDefinition aDefinition; aDefinition.SetValue(aDT); anAreaGISU->SetDefinition(aDefinition); - Model->ReplaceEntity(aGISUNum, anAreaGISU); + aModel->ReplaceEntity(aGISUNum, anAreaGISU); } - else { + else + { Handle(StepDimTol_PlacedDatumTargetFeature) aPDTF = new StepDimTol_PlacedDatumTargetFeature(); aPDTF->Init(new TCollection_HAsciiString(), STEPCAFControl_GDTProperty::GetDatumTargetName(aDatumType), - aPDS, StepData_LTrue, aTargetId); - Model->AddWithRefs(aPDTF); + aPDS, StepData_LTrue, aTargetId); + aModel->AddWithRefs(aPDTF); aDatumTarget = aPDTF; // Datum targets Handle(StepRepr_PropertyDefinition) aPD = new StepRepr_PropertyDefinition(); StepRepr_CharacterizedDefinition aCDefinition; aCDefinition.SetValue(aPDTF); aPD->Init(new TCollection_HAsciiString(), Standard_False, NULL, aCDefinition); - if (anObject->HasDatumTargetParams()) { + if (anObject->HasDatumTargetParams()) + { // write all parameters of datum target Handle(StepShape_ShapeRepresentationWithParameters) aSRWP = new StepShape_ShapeRepresentationWithParameters(); // Common for all datum targets @@ -2680,33 +2699,38 @@ Handle(StepDimTol_Datum) STEPCAFControl_Writer::WriteDatumAP242(const Handle(XSC anA2P3D->SetName(new TCollection_HAsciiString("orientation")); Handle(StepRepr_HArray1OfRepresentationItem) anItems; // Process each datum target type - if (aDatumType == XCAFDimTolObjects_DatumTargetType_Point) { + if (aDatumType == XCAFDimTolObjects_DatumTargetType_Point) + { anItems = new StepRepr_HArray1OfRepresentationItem(1, 1); } - else { + else + { Handle(TCollection_HAsciiString) aTargetValueName; - if (aDatumType == XCAFDimTolObjects_DatumTargetType_Line) { + if (aDatumType == XCAFDimTolObjects_DatumTargetType_Line) + { anItems = new StepRepr_HArray1OfRepresentationItem(1, 2); aTargetValueName = new TCollection_HAsciiString("target length"); } - else if (aDatumType == XCAFDimTolObjects_DatumTargetType_Rectangle) { + else if (aDatumType == XCAFDimTolObjects_DatumTargetType_Rectangle) + { anItems = new StepRepr_HArray1OfRepresentationItem(1, 3); aTargetValueName = new TCollection_HAsciiString("target length"); // Additional value Handle(StepRepr_ReprItemAndMeasureWithUnit) aTargetValue = CreateDimValue(anObject->GetDatumTargetWidth(), - aUnit, new TCollection_HAsciiString("target width"), "POSITIVE_LENGTH_MEASURE", Standard_False); + aUnit, new TCollection_HAsciiString("target width"), "POSITIVE_LENGTH_MEASURE", Standard_False); anItems->SetValue(2, aTargetValue); - Model->AddWithRefs(aTargetValue); + aModel->AddWithRefs(aTargetValue); } - else if (aDatumType == XCAFDimTolObjects_DatumTargetType_Circle) { + else if (aDatumType == XCAFDimTolObjects_DatumTargetType_Circle) + { anItems = new StepRepr_HArray1OfRepresentationItem(1, 2); aTargetValueName = new TCollection_HAsciiString("target diameter"); } // Value Handle(StepRepr_ReprItemAndMeasureWithUnit) aTargetValue = CreateDimValue(anObject->GetDatumTargetLength(), - aUnit, aTargetValueName, "POSITIVE_LENGTH_MEASURE", Standard_False); + aUnit, aTargetValueName, "POSITIVE_LENGTH_MEASURE", Standard_False); anItems->SetValue(1, aTargetValue); - Model->AddWithRefs(aTargetValue); + aModel->AddWithRefs(aTargetValue); } anItems->SetValue(anItems->Length(), anA2P3D); aSRWP->Init(new TCollection_HAsciiString(), anItems, aRC); @@ -2715,71 +2739,76 @@ Handle(StepDimTol_Datum) STEPCAFControl_Writer::WriteDatumAP242(const Handle(XSC StepRepr_RepresentedDefinition aRDefinition; aRDefinition.SetValue(aPD); aSDR->Init(aRDefinition, aSRWP); - Model->AddWithRefs(aPD); - Model->AddWithRefs(aSRWP); - Model->AddWithRefs(aSDR); + aModel->AddWithRefs(aPD); + aModel->AddWithRefs(aSRWP); + aModel->AddWithRefs(aSDR); } } // Link datum target to datum feature // if aSASeq.Length() == 0 nothing to do - if (aSASeq.Length() == 1) { + if (aSASeq.Length() == 1) + { Handle(StepRepr_FeatureForDatumTargetRelationship) aFFDTR = new StepRepr_FeatureForDatumTargetRelationship(); aFFDTR->Init(new TCollection_HAsciiString(), Standard_False, NULL, aSASeq.Value(1), aDatumTarget); - Model->AddWithRefs(aFFDTR); + aModel->AddWithRefs(aFFDTR); } - else if (aSASeq.Length() > 1) { + else if (aSASeq.Length() > 1) + { Handle(StepRepr_CompositeShapeAspect) aCompSA = new StepRepr_CompositeShapeAspect(); aCompSA->Init(new TCollection_HAsciiString(), new TCollection_HAsciiString(), aPDS, aSASeq.Value(1)->ProductDefinitional()); - for (Standard_Integer i = 1; i <= aSASeq.Length(); i++) { + for (Standard_Integer i = 1; i <= aSASeq.Length(); i++) + { Handle(StepRepr_ShapeAspectRelationship) aSAR = new StepRepr_ShapeAspectRelationship(); aSAR->Init(new TCollection_HAsciiString(), Standard_False, new TCollection_HAsciiString(), aCompSA, aSASeq.Value(i)); - Model->AddWithRefs(aSAR); + aModel->AddWithRefs(aSAR); } Handle(StepRepr_FeatureForDatumTargetRelationship) aFFDTR = new StepRepr_FeatureForDatumTargetRelationship(); aFFDTR->Init(new TCollection_HAsciiString(), Standard_False, NULL, aCompSA, aDatumTarget); - Model->AddWithRefs(aFFDTR); + aModel->AddWithRefs(aFFDTR); } aSA = aDatumTarget; } // Datum Handle(StepDimTol_Datum) aDatum = theWrittenDatum; - if (isFirstDTarget) { + if (theIsFirstDTarget) + { aDatum = new StepDimTol_Datum(); aDatum->Init(new TCollection_HAsciiString(), new TCollection_HAsciiString(), aPDS, StepData_LFalse, anIdentifier); - Model->AddWithRefs(aDatum); + aModel->AddWithRefs(aDatum); } // Shape_Aspect_Relationship - if (!aSA.IsNull()) { + if (!aSA.IsNull()) + { Handle(StepRepr_ShapeAspectRelationship) aSAR = new StepRepr_ShapeAspectRelationship(); aSAR->Init(new TCollection_HAsciiString(), Standard_False, NULL, aSA, aDatum); - Model->AddWithRefs(aSAR); + aModel->AddWithRefs(aSAR); } //Annotation plane and Presentation - WritePresentation(WS, anObject->GetPresentation(), anObject->GetPresentationName(), Standard_True, anObject->HasPlane(), - anObject->GetPlane(), anObject->GetPointTextAttach(), aSA); + writePresentation(theWS, anObject->GetPresentation(), anObject->GetPresentationName(), Standard_True, anObject->HasPlane(), + anObject->GetPlane(), anObject->GetPointTextAttach(), aSA); return aDatum; } //======================================================================= //function : WriteDimValues -//purpose : auxiliary (write all data for given dimension: values, +//purpose : auxiliary (write all data for given dimension: values, // qualifiers, modifiers, orientation and tolerance class) //====================================================================== -static void WriteDimValues(const Handle(XSControl_WorkSession) &WS, +static void WriteDimValues(const Handle(XSControl_WorkSession)& theWS, const Handle(XCAFDimTolObjects_DimensionObject) theObject, const Handle(StepRepr_RepresentationContext) theRC, const StepShape_DimensionalCharacteristic theDimension) { // Get working data - const Handle(Interface_InterfaceModel) &aModel = WS->Model(); + const Handle(Interface_InterfaceModel)& aModel = theWS->Model(); XCAFDimTolObjects_DimensionModifiersSequence aModifiers = theObject->GetModifiers(); Handle(Standard_Transient) aDim = theDimension.Value(); Standard_Boolean isAngle = aDim->IsKind(STANDARD_TYPE(StepShape_AngularLocation)) || - aDim->IsKind(STANDARD_TYPE(StepShape_AngularSize)); + aDim->IsKind(STANDARD_TYPE(StepShape_AngularSize)); // Unit StepBasic_Unit aUnit = GetUnit(theRC, isAngle); @@ -2811,11 +2840,13 @@ static void WriteDimValues(const Handle(XSControl_WorkSession) &WS, if (aLeftNbDigits > 0 || aRightNbDigits > 0) aNbQualifiers++; // With qualifiers - if (aNbQualifiers > 0) { + if (aNbQualifiers > 0) + { Handle(StepShape_QualifiedRepresentationItem) aQRI = new StepShape_QualifiedRepresentationItem(); Handle(StepShape_HArray1OfValueQualifier) aQualifiers = new StepShape_HArray1OfValueQualifier(1, aNbQualifiers); // Type qualifier - if (theObject->HasQualifier() && !isAngle) { + if (theObject->HasQualifier() && !isAngle) + { StepShape_ValueQualifier anItem; Handle(StepShape_TypeQualifier) aType = new StepShape_TypeQualifier(); XCAFDimTolObjects_DimensionQualifier aQualifier = theObject->GetQualifier(); @@ -2825,7 +2856,8 @@ static void WriteDimValues(const Handle(XSControl_WorkSession) &WS, aQualifiers->SetValue(1, anItem); } // Number of decimal places - if (aLeftNbDigits > 0 || aRightNbDigits > 0) { + if (aLeftNbDigits > 0 || aRightNbDigits > 0) + { StepShape_ValueQualifier anItem; Handle(StepShape_ValueFormatTypeQualifier) aType = new StepShape_ValueFormatTypeQualifier(); Handle(TCollection_HAsciiString) aFormatType = new TCollection_HAsciiString("NR2 "); @@ -2839,25 +2871,31 @@ static void WriteDimValues(const Handle(XSControl_WorkSession) &WS, } // Set qualifiers aQRI->SetQualifiers(aQualifiers); - Handle(StepRepr_ReprItemAndMeasureWithUnit) anItem = CreateDimValue(aNominal, aUnit, - new TCollection_HAsciiString("nominal value"), aMeasureName, isAngle, Standard_True, aQRI); + Handle(StepRepr_ReprItemAndMeasureWithUnit) anItem = + CreateDimValue(aNominal, aUnit, + new TCollection_HAsciiString("nominal value"), aMeasureName, isAngle, Standard_True, aQRI); aValues->SetValue(aValIt, anItem); aValIt++; } // Without qualifiers - else { - Handle(StepRepr_ReprItemAndMeasureWithUnit) anItem = CreateDimValue(aNominal, aUnit, - new TCollection_HAsciiString("nominal value"), aMeasureName, isAngle); + else + { + Handle(StepRepr_ReprItemAndMeasureWithUnit) anItem = + CreateDimValue(aNominal, aUnit, + new TCollection_HAsciiString("nominal value"), aMeasureName, isAngle); aValues->SetValue(aValIt, anItem); aValIt++; } // Ranges - if (theObject->IsDimWithRange()) { - Handle(StepRepr_ReprItemAndMeasureWithUnit) aLowerItem = CreateDimValue(theObject->GetLowerBound(), aUnit, - new TCollection_HAsciiString("lower limit"), aMeasureName, isAngle); - Handle(StepRepr_ReprItemAndMeasureWithUnit) anUpperItem = CreateDimValue(theObject->GetUpperBound(), aUnit, - new TCollection_HAsciiString("upper limit"), aMeasureName, isAngle); + if (theObject->IsDimWithRange()) + { + Handle(StepRepr_ReprItemAndMeasureWithUnit) aLowerItem = + CreateDimValue(theObject->GetLowerBound(), aUnit, + new TCollection_HAsciiString("lower limit"), aMeasureName, isAngle); + Handle(StepRepr_ReprItemAndMeasureWithUnit) anUpperItem = + CreateDimValue(theObject->GetUpperBound(), aUnit, + new TCollection_HAsciiString("upper limit"), aMeasureName, isAngle); aValues->SetValue(aValIt, aLowerItem); aValIt++; aValues->SetValue(aValIt, anUpperItem); @@ -2865,13 +2903,15 @@ static void WriteDimValues(const Handle(XSControl_WorkSession) &WS, } // Modifiers - if (aModifiers.Length() > 0) { + if (aModifiers.Length() > 0) + { Handle(StepRepr_CompoundRepresentationItem) aCompoundRI = new StepRepr_CompoundRepresentationItem(); - Handle (StepRepr_HArray1OfRepresentationItem) aModifItems = + Handle(StepRepr_HArray1OfRepresentationItem) aModifItems = new StepRepr_HArray1OfRepresentationItem(1, aModifiers.Length()); - for (Standard_Integer i = 1; i <= aModifiers.Length(); i++) { + for (Standard_Integer i = 1; i <= aModifiers.Length(); i++) + { XCAFDimTolObjects_DimensionModif aModif = aModifiers.Value(i); - Handle(StepRepr_DescriptiveRepresentationItem) aModifItem = + Handle(StepRepr_DescriptiveRepresentationItem) aModifItem = new StepRepr_DescriptiveRepresentationItem(); aModifItem->Init(new TCollection_HAsciiString(), STEPCAFControl_GDTProperty::GetDimModifierName(aModif)); aModel->AddWithRefs(aModifItem); @@ -2883,7 +2923,8 @@ static void WriteDimValues(const Handle(XSControl_WorkSession) &WS, } // Orientation - if (theObject->GetType() == XCAFDimTolObjects_DimensionType_Location_Oriented) { + if (theObject->GetType() == XCAFDimTolObjects_DimensionType_Location_Oriented) + { Handle(StepGeom_Axis2Placement3d) anOrientation = new StepGeom_Axis2Placement3d(); gp_Dir aDir; theObject->GetDirection(aDir); @@ -2901,8 +2942,10 @@ static void WriteDimValues(const Handle(XSControl_WorkSession) &WS, } // Descriptions - if (theObject->HasDescriptions()) { - for (Standard_Integer i = 0; i < theObject->NbDescriptions(); i++) { + if (theObject->HasDescriptions()) + { + for (Standard_Integer i = 0; i < theObject->NbDescriptions(); i++) + { Handle(StepRepr_DescriptiveRepresentationItem) aDRI = new StepRepr_DescriptiveRepresentationItem(); aDRI->Init(theObject->GetDescriptionName(i), theObject->GetDescription(i)); aValues->SetValue(aValIt, aDRI); @@ -2911,7 +2954,9 @@ static void WriteDimValues(const Handle(XSControl_WorkSession) &WS, } for (Standard_Integer i = 1; i <= aValues->Length(); i++) + { aModel->AddWithRefs(aValues->Value(i)); + } // Create resulting Shape_Dimension_Representation Handle(StepShape_ShapeDimensionRepresentation) aSDR = new StepShape_ShapeDimensionRepresentation(); @@ -2922,12 +2967,13 @@ static void WriteDimValues(const Handle(XSControl_WorkSession) &WS, aModel->AddWithRefs(aDCR); // Plus_Minus_Tolerance - if (theObject->IsDimWithPlusMinusTolerance()) { + if (theObject->IsDimWithPlusMinusTolerance()) + { Handle(TCollection_HAsciiString) aDummyName = new TCollection_HAsciiString(aMeasureName); aDummyName = aDummyName->SubString(9, aDummyName->Length()); //delete "POSITIVE_" aMeasureName = aDummyName->ToCString(); Standard_Real aLowerTolValue = -theObject->GetLowerTolValue(), - anUpperTolValue = theObject->GetUpperTolValue(); + anUpperTolValue = theObject->GetUpperTolValue(); // Upper Handle(StepBasic_MeasureWithUnit) anUpperMWU = new StepBasic_MeasureWithUnit(); Handle(StepBasic_MeasureValueMember) anUpperValue = new StepBasic_MeasureValueMember(); @@ -2953,7 +2999,8 @@ static void WriteDimValues(const Handle(XSControl_WorkSession) &WS, aModel->AddWithRefs(aPlusMinusTol); } // Tolerance class - if (theObject->IsDimWithClassOfTolerance()) { + if (theObject->IsDimWithClassOfTolerance()) + { Standard_Boolean isHole; XCAFDimTolObjects_DimensionFormVariance aFormVariance; XCAFDimTolObjects_DimensionGrade aGrade; @@ -2973,16 +3020,17 @@ static void WriteDimValues(const Handle(XSControl_WorkSession) &WS, //function : WriteDerivedGeometry //purpose : auxiliary (write connection point for dimensions) //====================================================================== -static void WriteDerivedGeometry (const Handle(XSControl_WorkSession) &WS, - const Handle(XCAFDimTolObjects_DimensionObject)& theObject, - const Handle(StepRepr_ConstructiveGeometryRepresentation) theRepr, - Handle(StepRepr_ShapeAspect)& theFirstSA, - Handle(StepRepr_ShapeAspect)& theSecondSA, - NCollection_Vector& thePnts) +static void WriteDerivedGeometry(const Handle(XSControl_WorkSession)& theWS, + const Handle(XCAFDimTolObjects_DimensionObject)& theObject, + const Handle(StepRepr_ConstructiveGeometryRepresentation) theRepr, + Handle(StepRepr_ShapeAspect)& theFirstSA, + Handle(StepRepr_ShapeAspect)& theSecondSA, + NCollection_Vector& thePnts) { - const Handle(Interface_InterfaceModel) &aModel = WS->Model(); + const Handle(Interface_InterfaceModel)& aModel = theWS->Model(); // First point - if (theObject->HasPoint()) { + if (theObject->HasPoint()) + { GeomToStep_MakeCartesianPoint aPointMaker(theObject->GetPoint()); Handle(StepGeom_CartesianPoint) aPoint = aPointMaker.Value(); thePnts.Append(aPoint); @@ -3000,9 +3048,10 @@ static void WriteDerivedGeometry (const Handle(XSControl_WorkSession) &WS, aModel->AddWithRefs(aGISU); aModel->AddWithRefs(aSADR); } - + // Second point (for locations) - if (theObject->HasPoint2()) { + if (theObject->HasPoint2()) + { GeomToStep_MakeCartesianPoint aPointMaker(theObject->GetPoint2()); Handle(StepGeom_CartesianPoint) aPoint = aPointMaker.Value(); thePnts.Append(aPoint); @@ -3027,20 +3076,20 @@ static void WriteDerivedGeometry (const Handle(XSControl_WorkSession) &WS, //purpose : auxiliary (write Write datum system for given // geometric_tolerance) //====================================================================== -static Handle(StepDimTol_HArray1OfDatumSystemOrReference) WriteDatumSystem(const Handle(XSControl_WorkSession) &WS, +static Handle(StepDimTol_HArray1OfDatumSystemOrReference) WriteDatumSystem(const Handle(XSControl_WorkSession)& theWS, const TDF_Label theGeomTolL, const TDF_LabelSequence theDatumSeq, const STEPConstruct_DataMapOfAsciiStringTransient theDatumMap, const Handle(StepRepr_RepresentationContext)& theRC) { // Get working data - const Handle(Interface_InterfaceModel) &Model = WS->Model(); - const Handle(Interface_HGraph) aHGraph = WS->HGraph(); + const Handle(Interface_InterfaceModel)& aModel = theWS->Model(); + const Handle(Interface_HGraph) aHGraph = theWS->HGraph(); if (aHGraph.IsNull()) return NULL; Interface_Graph aGraph = aHGraph->Graph(); Handle(XCAFDoc_GeomTolerance) aGTAttr; - if (!theGeomTolL.FindAttribute(XCAFDoc_GeomTolerance::GetID(), aGTAttr)) + if (!theGeomTolL.FindAttribute(XCAFDoc_GeomTolerance::GetID(), aGTAttr)) return NULL; Handle(XCAFDimTolObjects_GeomToleranceObject) anObject = aGTAttr->GetObject(); if (anObject.IsNull()) @@ -3051,9 +3100,12 @@ static Handle(StepDimTol_HArray1OfDatumSystemOrReference) WriteDatumSystem(const XCAFDimTolObjects_DatumObjectSequence aDatums; Standard_Integer aMaxDatumNum = 0; - for (Standard_Integer i = 1; i <= theDatumSeq.Length(); i++) { + + for (TDF_LabelSequence::Iterator aDatumIter(theDatumSeq); + aDatumIter.More(); aDatumIter.Next()) + { Handle(XCAFDoc_Datum) aDatumAttr; - if (!theDatumSeq.Value(i).FindAttribute(XCAFDoc_Datum::GetID(), aDatumAttr)) + if (!aDatumIter.Value().FindAttribute(XCAFDoc_Datum::GetID(), aDatumAttr)) continue; Handle(XCAFDimTolObjects_DatumObject) aDatumObj = aDatumAttr->GetObject(); if (aDatumObj.IsNull()) @@ -3068,27 +3120,32 @@ static Handle(StepDimTol_HArray1OfDatumSystemOrReference) WriteDatumSystem(const new StepDimTol_HArray1OfDatumReferenceCompartment(1, aMaxDatumNum); // Auxiliary datum to initialize attributes in Datum_System Handle(StepDimTol_Datum) aFirstDatum; - Standard_Integer aConstituentsNum = 0; - for (Standard_Integer i = 1; i <= aMaxDatumNum; i++) { + for (Standard_Integer aConstituentsNum = 1; + aConstituentsNum <= aMaxDatumNum; aConstituentsNum++) + { // Collect datums with i-th position XCAFDimTolObjects_DatumObjectSequence aDatumSeqPos; - for (Standard_Integer j = 1; j <= aDatums.Length(); j++) - if (aDatums.Value(j)->GetPosition() == i) - aDatumSeqPos.Append(aDatums.Value(j)); + for (XCAFDimTolObjects_DatumObjectSequence::Iterator aDatumIter(aDatums); + aDatumIter.More(); aDatumIter.Next()) + { + if (aDatumIter.Value()->GetPosition() == aConstituentsNum) + { + aDatumSeqPos.Append(aDatumIter.Value()); + } + } if (aDatumSeqPos.Length() < 1) continue; - - aConstituentsNum++; // Initialize Datum_Reference_Compartment StepDimTol_DatumOrCommonDatum aDatumRef; Handle(StepDimTol_DatumReferenceCompartment) aCompartment = new StepDimTol_DatumReferenceCompartment(); Handle(StepDimTol_HArray1OfDatumReferenceModifier) aModifiers; - if (aDatumSeqPos.Length() == 1) { + if (aDatumSeqPos.Length() == 1) + { // Datum entity Handle(Standard_Transient) aFDValue; if (theDatumMap.Find(aDatumSeqPos.Value(1)->GetName()->String(), aFDValue) && !aFDValue.IsNull()) - aFirstDatum = Handle(StepDimTol_Datum)::DownCast (aFDValue); + aFirstDatum = Handle(StepDimTol_Datum)::DownCast(aFDValue); aDatumRef.SetValue(aFirstDatum); // Modifiers XCAFDimTolObjects_DatumModifiersSequence aSimpleModifiers = aDatumSeqPos.Value(1)->GetModifiers(); @@ -3097,81 +3154,101 @@ static Handle(StepDimTol_HArray1OfDatumSystemOrReference) WriteDatumSystem(const aDatumSeqPos.Value(1)->GetModifierWithValue(aModifWithVal, aValue); aModifiers = STEPCAFControl_GDTProperty::GetDatumRefModifiers(aSimpleModifiers, aModifWithVal, aValue, aUnit); // Add Datum_Reference_Modifier_With_Value - if (!aModifiers.IsNull()) { - Handle(StepDimTol_DatumReferenceModifierWithValue) aDRMWV = + if (!aModifiers.IsNull()) + { + Handle(StepDimTol_DatumReferenceModifierWithValue) aDRMWV = aModifiers->Value(aModifiers->Length()).DatumReferenceModifierWithValue(); - if (!aDRMWV.IsNull()) { - Model->AddWithRefs(aDRMWV); + if (!aDRMWV.IsNull()) + { + aModel->AddWithRefs(aDRMWV); } } } - else { - Handle(StepDimTol_HArray1OfDatumReferenceElement) aCommonDatumList = new StepDimTol_HArray1OfDatumReferenceElement(1, aDatumSeqPos.Length()); - for (Standard_Integer j = 1; j <= aDatumSeqPos.Length(); j++) { + else + { + Standard_Integer aSetInd = 1; + Handle(StepDimTol_HArray1OfDatumReferenceElement) aCommonDatumList = + new StepDimTol_HArray1OfDatumReferenceElement(1, aDatumSeqPos.Length()); + for (XCAFDimTolObjects_DatumObjectSequence::Iterator aDatumIter(aDatumSeqPos); + aDatumIter.More(); aDatumIter.Next()) + { // Datum entity + const Handle(XCAFDimTolObjects_DatumObject)& aDatumObj = aDatumIter.Value(); Handle(StepDimTol_Datum) aDatum; Handle(Standard_Transient) aDValue; - if (theDatumMap.Find(aDatumSeqPos.Value(j)->GetName()->String(), aDValue)) - aDatum = Handle(StepDimTol_Datum)::DownCast (aDValue); + if (theDatumMap.Find(aDatumObj->GetName()->String(), aDValue)) + aDatum = Handle(StepDimTol_Datum)::DownCast(aDValue); StepDimTol_DatumOrCommonDatum anElemDatumRef; anElemDatumRef.SetValue(aDatum); if (aFirstDatum.IsNull()) aFirstDatum = aDatum; // Modifiers - XCAFDimTolObjects_DatumModifiersSequence aSimpleModifiers = aDatumSeqPos.Value(j)->GetModifiers(); + XCAFDimTolObjects_DatumModifiersSequence aSimpleModifiers = aDatumObj->GetModifiers(); XCAFDimTolObjects_DatumModifWithValue aModifWithVal; Standard_Real aValue = 0; - aDatumSeqPos.Value(j)->GetModifierWithValue(aModifWithVal, aValue); + aDatumObj->GetModifierWithValue(aModifWithVal, aValue); Handle(StepDimTol_HArray1OfDatumReferenceModifier) anElemModifiers = STEPCAFControl_GDTProperty::GetDatumRefModifiers(aSimpleModifiers, aModifWithVal, aValue, aUnit); // Add Datum_Reference_Modifier_With_Value - if (!anElemModifiers.IsNull()) { - Handle(StepDimTol_DatumReferenceModifierWithValue) aDRMWV = + if (!anElemModifiers.IsNull()) + { + Handle(StepDimTol_DatumReferenceModifierWithValue) aDRMWV = anElemModifiers->Value(anElemModifiers->Length()).DatumReferenceModifierWithValue(); - if (!aDRMWV.IsNull()) { - Model->AddWithRefs(aDRMWV); + if (!aDRMWV.IsNull()) + { + aModel->AddWithRefs(aDRMWV); } } // Datum_Reference_Element Handle(StepDimTol_DatumReferenceElement) anElement = new StepDimTol_DatumReferenceElement(); anElement->Init(new TCollection_HAsciiString(), new TCollection_HAsciiString(), aDatum->OfShape(), - aDatum->ProductDefinitional(), anElemDatumRef, !anElemModifiers.IsNull(), anElemModifiers); - Model->AddWithRefs(anElement); - aCommonDatumList->SetValue(j, anElement); + aDatum->ProductDefinitional(), anElemDatumRef, !anElemModifiers.IsNull(), anElemModifiers); + aModel->AddWithRefs(anElement); + aCommonDatumList->SetValue(aSetInd++, anElement); } aDatumRef.SetValue(aCommonDatumList); } aCompartment->Init(new TCollection_HAsciiString(), new TCollection_HAsciiString(), aFirstDatum->OfShape(), - aFirstDatum->ProductDefinitional(), aDatumRef, !aModifiers.IsNull(), aModifiers); - Model->AddWithRefs(aCompartment); + aFirstDatum->ProductDefinitional(), aDatumRef, !aModifiers.IsNull(), aModifiers); + aModel->AddWithRefs(aCompartment); aConstituents->SetValue(aConstituentsNum, aCompartment); } // Remove null elements from aConstituents Standard_Integer aNbConstituents = 0; - for (Standard_Integer i = 1; i <= aConstituents->Length(); i++) - if (!aConstituents->Value(i).IsNull()) + for (StepDimTol_HArray1OfDatumReferenceCompartment::Iterator aConstituentIter(aConstituents->Array1()); + aConstituentIter.More(); aConstituentIter.Next()) + { + if (!aConstituentIter.Value().IsNull()) + { aNbConstituents++; + } + } Handle(StepDimTol_HArray1OfDatumReferenceCompartment) aResConstituents = new StepDimTol_HArray1OfDatumReferenceCompartment(1, aNbConstituents); Standard_Integer aConstituentsIt = 0; - for (Standard_Integer i = 1; i <= aConstituents->Length(); i++) - if (!aConstituents->Value(i).IsNull()) { + for (StepDimTol_HArray1OfDatumReferenceCompartment::Iterator aConstituentIter(aConstituents->Array1()); + aConstituentIter.More(); aConstituentIter.Next()) + { + if (!aConstituentIter.Value().IsNull()) + { aConstituentsIt++; - aResConstituents->SetValue(aConstituentsIt, aConstituents->Value(i)); + aResConstituents->SetValue(aConstituentsIt, aConstituentIter.Value()); } + } Handle(StepDimTol_HArray1OfDatumSystemOrReference) aDatumSystem; Handle(StepDimTol_DatumSystem) aDS = new StepDimTol_DatumSystem(); aDS->Init(new TCollection_HAsciiString(), new TCollection_HAsciiString(), aFirstDatum->OfShape(), - aFirstDatum->ProductDefinitional(), aResConstituents); - Model->AddWithRefs(aDS); + aFirstDatum->ProductDefinitional(), aResConstituents); + aModel->AddWithRefs(aDS); StepDimTol_DatumSystemOrReference anArrayValue; anArrayValue.SetValue(aDS); aDatumSystem = new StepDimTol_HArray1OfDatumSystemOrReference(1, 1); aDatumSystem->SetValue(1, anArrayValue); // Axis - if (anObject->HasAxis()) { + if (anObject->HasAxis()) + { GeomToStep_MakeAxis2Placement3d anAxisMaker(anObject->GetAxis()); Handle(StepGeom_Axis2Placement3d) anAxis = anAxisMaker.Value(); anAxis->SetName(new TCollection_HAsciiString("orientation")); @@ -3181,46 +3258,48 @@ static Handle(StepDimTol_HArray1OfDatumSystemOrReference) WriteDatumSystem(const Handle(StepRepr_HArray1OfRepresentationItem) anReprItems = new StepRepr_HArray1OfRepresentationItem(1, 1); Handle(StepRepr_RepresentationItem) anIdentifiedItem = anAxis; anReprItems->SetValue(1, anIdentifiedItem); - Interface_EntityIterator subs = aGraph.Sharings(aFirstDatum->OfShape()); Handle(StepShape_ShapeDefinitionRepresentation) aSDR; - for (subs.Start(); subs.More() && aSDR.IsNull(); subs.Next()) { - Handle(Standard_Transient) anEntity = subs.Value(); - aSDR = Handle(StepShape_ShapeDefinitionRepresentation)::DownCast(anEntity); + for (Interface_EntityIterator aSharingsIter = aGraph.Sharings(aFirstDatum->OfShape()); + aSharingsIter.More() && aSDR.IsNull(); aSharingsIter.Next()) + { + aSDR = Handle(StepShape_ShapeDefinitionRepresentation)::DownCast(aSharingsIter.Value()); } if (aSDR.IsNull()) return aDatumSystem; - + aGISU->Init(new TCollection_HAsciiString(), new TCollection_HAsciiString(), - aDefinition, aSDR->UsedRepresentation(), anReprItems); - Model->AddWithRefs(anAxis); - Model->AddWithRefs(aGISU); + aDefinition, aSDR->UsedRepresentation(), anReprItems); + aModel->AddWithRefs(anAxis); + aModel->AddWithRefs(aGISU); } return aDatumSystem; } //======================================================================= -//function : WriteToleranceZone +//function : writeToleranceZone //purpose : auxiliary (write tolerace zones) //======================================================================= -void STEPCAFControl_Writer::WriteToleranceZone (const Handle(XSControl_WorkSession) &WS, - const Handle(XCAFDimTolObjects_GeomToleranceObject)& theObject, - const Handle(StepDimTol_GeometricTolerance)& theEntity, - const Handle(StepRepr_RepresentationContext)& theRC) +void STEPCAFControl_Writer::writeToleranceZone(const Handle(XSControl_WorkSession)& theWS, + const Handle(XCAFDimTolObjects_GeomToleranceObject)& theObject, + const Handle(StepDimTol_GeometricTolerance)& theEntity, + const Handle(StepRepr_RepresentationContext)& theRC) { // Get working data - const Handle(Interface_InterfaceModel) &Model = WS->Model(); + const Handle(Interface_InterfaceModel)& aModel = theWS->Model(); if (theEntity.IsNull() || theObject.IsNull()) return; // Return if there is no tolerance zones if (theObject->GetTypeOfValue() == XCAFDimTolObjects_GeomToleranceTypeValue_None && theObject->GetZoneModifier() != XCAFDimTolObjects_GeomToleranceZoneModif_Runout) + { return; + } // Create Tolerance_Zone Handle(StepDimTol_ToleranceZoneForm) aForm = new StepDimTol_ToleranceZoneForm(); - Model->AddWithRefs(aForm); + aModel->AddWithRefs(aForm); aForm->Init(STEPCAFControl_GDTProperty::GetTolValueType(theObject->GetTypeOfValue())); Handle(StepDimTol_HArray1OfToleranceZoneTarget) aZoneTargetArray = new StepDimTol_HArray1OfToleranceZoneTarget(1, 1); StepDimTol_ToleranceZoneTarget aTarget; @@ -3228,9 +3307,9 @@ void STEPCAFControl_Writer::WriteToleranceZone (const Handle(XSControl_WorkSessi aZoneTargetArray->SetValue(1, aTarget); Handle(StepDimTol_ToleranceZone) aZone = new StepDimTol_ToleranceZone(); aZone->Init(new TCollection_HAsciiString(), new TCollection_HAsciiString(), - theEntity->TolerancedShapeAspect().ShapeAspect()->OfShape(), StepData_LFalse, - aZoneTargetArray, aForm); - Model->AddWithRefs(aZone); + theEntity->TolerancedShapeAspect().ShapeAspect()->OfShape(), StepData_LFalse, + aZoneTargetArray, aForm); + aModel->AddWithRefs(aZone); // Runout_Tolerance_Zone Handle(StepBasic_PlaneAngleMeasureWithUnit) aPAMWU = new StepBasic_PlaneAngleMeasureWithUnit(); @@ -3242,26 +3321,26 @@ void STEPCAFControl_Writer::WriteToleranceZone (const Handle(XSControl_WorkSessi anOrientation->Init(aPAMWU); Handle(StepDimTol_RunoutZoneDefinition) aDefinition = new StepDimTol_RunoutZoneDefinition(); aDefinition->Init(aZone, NULL, anOrientation); - Model->AddWithRefs(aDefinition); - Model->AddWithRefs(anOrientation); - Model->AddWithRefs(aPAMWU); + aModel->AddWithRefs(aDefinition); + aModel->AddWithRefs(anOrientation); + aModel->AddWithRefs(aPAMWU); } //======================================================================= -//function : WriteGeomTolerance +//function : writeGeomTolerance //purpose : auxiliary (write Geometric_Tolerance entity for given shapes, // label and datum system) //====================================================================== -void STEPCAFControl_Writer::WriteGeomTolerance (const Handle(XSControl_WorkSession) &WS, - const TDF_LabelSequence& theShapeSeqL, - const TDF_Label& theGeomTolL, - const Handle(StepDimTol_HArray1OfDatumSystemOrReference)& theDatumSystem, - const Handle(StepRepr_RepresentationContext)& theRC) +void STEPCAFControl_Writer::writeGeomTolerance(const Handle(XSControl_WorkSession)& theWS, + const TDF_LabelSequence& theShapeSeqL, + const TDF_Label& theGeomTolL, + const Handle(StepDimTol_HArray1OfDatumSystemOrReference)& theDatumSystem, + const Handle(StepRepr_RepresentationContext)& theRC) { // Get working data - const Handle(Interface_InterfaceModel) &Model = WS->Model(); + const Handle(Interface_InterfaceModel)& aModel = theWS->Model(); Handle(XCAFDoc_GeomTolerance) aGTAttr; - if (!theGeomTolL.FindAttribute(XCAFDoc_GeomTolerance::GetID(), aGTAttr)) + if (!theGeomTolL.FindAttribute(XCAFDoc_GeomTolerance::GetID(), aGTAttr)) return; Handle(XCAFDimTolObjects_GeomToleranceObject) anObject = aGTAttr->GetObject(); if (anObject.IsNull()) @@ -3274,32 +3353,37 @@ void STEPCAFControl_Writer::WriteGeomTolerance (const Handle(XSControl_WorkSessi aValueMember->SetName("LENGTH_MEASURE"); aValueMember->SetReal(anObject->GetValue()); aLMWU->Init(aValueMember, aUnit); - Model->AddWithRefs(aLMWU); + aModel->AddWithRefs(aLMWU); // Geometric_Tolerance target Handle(StepRepr_ShapeAspect) aMainSA; Handle(StepRepr_RepresentationContext) dummyRC; Handle(StepAP242_GeometricItemSpecificUsage) dummyGISU; - if (theShapeSeqL.Length() == 1) { + if (theShapeSeqL.Length() == 1) + { TopoDS_Shape aShape = XCAFDoc_ShapeTool::GetShape(theShapeSeqL.Value(1)); - aMainSA = WriteShapeAspect(WS, theGeomTolL, aShape, dummyRC, dummyGISU); - Model->AddWithRefs(aMainSA); + aMainSA = writeShapeAspect(theWS, theGeomTolL, aShape, dummyRC, dummyGISU); + aModel->AddWithRefs(aMainSA); } - else { + else + { Handle(StepRepr_CompositeShapeAspect) aCSA; - for (Standard_Integer i = 1; i <= theShapeSeqL.Length(); i++) { - TopoDS_Shape aShape = XCAFDoc_ShapeTool::GetShape(theShapeSeqL.Value(i)); - Handle(StepRepr_ShapeAspect) aSA = WriteShapeAspect(WS, theGeomTolL, aShape, dummyRC, dummyGISU); + for (TDF_LabelSequence::Iterator aShIter(theShapeSeqL); + aShIter.More(); aShIter.Next()) + { + TopoDS_Shape aShape = XCAFDoc_ShapeTool::GetShape(aShIter.Value()); + Handle(StepRepr_ShapeAspect) aSA = writeShapeAspect(theWS, theGeomTolL, aShape, dummyRC, dummyGISU); if (aSA.IsNull()) continue; - if (aCSA.IsNull()) { + if (aCSA.IsNull()) + { aCSA = new StepRepr_CompositeShapeAspect(); aCSA->Init(aSA->Name(), aSA->Description(), aSA->OfShape(), aSA->ProductDefinitional()); - Model->AddWithRefs(aCSA); + aModel->AddWithRefs(aCSA); } Handle(StepRepr_ShapeAspectRelationship) aSAR = new StepRepr_ShapeAspectRelationship(); aSAR->Init(new TCollection_HAsciiString(), Standard_False, NULL, aCSA, aSA); - Model->AddWithRefs(aSAR); + aModel->AddWithRefs(aSAR); } aMainSA = aCSA; } @@ -3307,8 +3391,8 @@ void STEPCAFControl_Writer::WriteGeomTolerance (const Handle(XSControl_WorkSessi aGTTarget.SetValue(aMainSA); Standard_Boolean isWithModif = Standard_False, - isWithDatRef = Standard_False, - isWithMaxTol = Standard_False; + isWithDatRef = Standard_False, + isWithMaxTol = Standard_False; // Modifiers // Simple modifiers XCAFDimTolObjects_GeomToleranceModifiersSequence aModifiers = anObject->GetModifiers(); @@ -3316,39 +3400,50 @@ void STEPCAFControl_Writer::WriteGeomTolerance (const Handle(XSControl_WorkSessi Handle(StepBasic_LengthMeasureWithUnit) aMaxLMWU; Standard_Integer aModifNb = aModifiers.Length(); if (anObject->GetMaterialRequirementModifier() != XCAFDimTolObjects_GeomToleranceMatReqModif_None) - aModifNb++; + aModifNb++; for (Standard_Integer i = 1; i <= aModifiers.Length(); i++) + { if (aModifiers.Value(i) == XCAFDimTolObjects_GeomToleranceModif_All_Around || aModifiers.Value(i) == XCAFDimTolObjects_GeomToleranceModif_All_Over) - aModifNb--; - if (aModifNb > 0) { + { + aModifNb--; + } + } + if (aModifNb > 0) + { isWithModif = Standard_True; aModifArray = new StepDimTol_HArray1OfGeometricToleranceModifier(1, aModifNb); Standard_Integer k = 1; - for (Standard_Integer i = 1; i <= aModifiers.Length(); i++) { + for (Standard_Integer i = 1; i <= aModifiers.Length(); i++) + { if (aModifiers.Value(i) == XCAFDimTolObjects_GeomToleranceModif_All_Around || - aModifiers.Value(i) == XCAFDimTolObjects_GeomToleranceModif_All_Over) + aModifiers.Value(i) == XCAFDimTolObjects_GeomToleranceModif_All_Over) + { continue; - StepDimTol_GeometricToleranceModifier aModif = + } + StepDimTol_GeometricToleranceModifier aModif = STEPCAFControl_GDTProperty::GetGeomToleranceModifier(aModifiers.Value(i)); aModifArray->SetValue(k, aModif); k++; } - if (anObject->GetMaterialRequirementModifier() == XCAFDimTolObjects_GeomToleranceMatReqModif_L) { + if (anObject->GetMaterialRequirementModifier() == XCAFDimTolObjects_GeomToleranceMatReqModif_L) + { aModifArray->SetValue(aModifNb, StepDimTol_GTMLeastMaterialRequirement); } - else if (anObject->GetMaterialRequirementModifier() == XCAFDimTolObjects_GeomToleranceMatReqModif_M) { + else if (anObject->GetMaterialRequirementModifier() == XCAFDimTolObjects_GeomToleranceMatReqModif_M) + { aModifArray->SetValue(aModifNb, StepDimTol_GTMMaximumMaterialRequirement); } // Modifier with value - if (anObject->GetMaxValueModifier() != 0) { + if (anObject->GetMaxValueModifier() != 0) + { isWithMaxTol = Standard_True; aMaxLMWU = new StepBasic_LengthMeasureWithUnit(); Handle(StepBasic_MeasureValueMember) aModifierValueMember = new StepBasic_MeasureValueMember(); aModifierValueMember->SetName("LENGTH_MEASURE"); aModifierValueMember->SetReal(anObject->GetMaxValueModifier()); aMaxLMWU->Init(aModifierValueMember, aUnit); - Model->AddWithRefs(aMaxLMWU); + aModel->AddWithRefs(aMaxLMWU); } } @@ -3357,29 +3452,33 @@ void STEPCAFControl_Writer::WriteGeomTolerance (const Handle(XSControl_WorkSessi // Collect all attributes Handle(TCollection_HAsciiString) aName = new TCollection_HAsciiString(), - aDescription = new TCollection_HAsciiString(); - Handle(StepDimTol_GeometricToleranceWithDatumReference) aGTWDR = + aDescription = new TCollection_HAsciiString(); + Handle(StepDimTol_GeometricToleranceWithDatumReference) aGTWDR = new StepDimTol_GeometricToleranceWithDatumReference(); aGTWDR->SetDatumSystem(theDatumSystem); - Handle(StepDimTol_GeometricToleranceWithModifiers) aGTWM = + Handle(StepDimTol_GeometricToleranceWithModifiers) aGTWM = new StepDimTol_GeometricToleranceWithModifiers(); aGTWM->SetModifiers(aModifArray); - StepDimTol_GeometricToleranceType aType = + StepDimTol_GeometricToleranceType aType = STEPCAFControl_GDTProperty::GetGeomToleranceType(anObject->GetType()); // Init and write necessary subtype of Geometric_Tolerance entity Handle(StepDimTol_GeometricTolerance) aGeomTol; - if (isWithModif) { - if (isWithMaxTol) { - if (isWithDatRef) { - // Geometric_Tolerance & Geometric_Tolerance_With_Datum_Reference & - //Geometric_Tolerance_With_Maximum_Tolerance & Geometric_Tolerance_With_Modifiers + if (isWithModif) + { + if (isWithMaxTol) + { + if (isWithDatRef) + { + // Geometric_Tolerance & Geometric_Tolerance_With_Datum_Reference & + // Geometric_Tolerance_With_Maximum_Tolerance & Geometric_Tolerance_With_Modifiers Handle(StepDimTol_GeoTolAndGeoTolWthDatRefAndGeoTolWthMaxTol) aResult = new StepDimTol_GeoTolAndGeoTolWthDatRefAndGeoTolWthMaxTol(); aResult->Init(aName, aDescription, aLMWU, aGTTarget, aGTWDR, aGTWM, aMaxLMWU, aType); aGeomTol = aResult; } - else { + else + { // Geometric_Tolerance & Geometric_Tolerance_With_Maximum_Tolerance & Geometric_Tolerance_With_Modifiers Handle(StepDimTol_GeoTolAndGeoTolWthMaxTol) aResult = new StepDimTol_GeoTolAndGeoTolWthMaxTol(); @@ -3387,15 +3486,18 @@ void STEPCAFControl_Writer::WriteGeomTolerance (const Handle(XSControl_WorkSessi aGeomTol = aResult; } } - else { - if (isWithDatRef) { + else + { + if (isWithDatRef) + { // Geometric_Tolerance & Geometric_Tolerance_With_Datum_Reference & Geometric_Tolerance_With_Modifiers Handle(StepDimTol_GeoTolAndGeoTolWthDatRefAndGeoTolWthMod) aResult = new StepDimTol_GeoTolAndGeoTolWthDatRefAndGeoTolWthMod(); aResult->Init(aName, aDescription, aLMWU, aGTTarget, aGTWDR, aGTWM, aType); aGeomTol = aResult; } - else { + else + { // Geometric_Tolerance & Geometric_Tolerance_With_Modifiers Handle(StepDimTol_GeoTolAndGeoTolWthMod) aResult = new StepDimTol_GeoTolAndGeoTolWthMod(); @@ -3404,359 +3506,401 @@ void STEPCAFControl_Writer::WriteGeomTolerance (const Handle(XSControl_WorkSessi } } } - else { - if (isWithDatRef) { + else + { + if (isWithDatRef) + { // Geometric_Tolerance & Geometric_Tolerance_With_Datum_Reference Handle(StepDimTol_GeoTolAndGeoTolWthDatRef) aResult = - new StepDimTol_GeoTolAndGeoTolWthDatRef(); - aResult->Init(aName, aDescription, aLMWU, aGTTarget, aGTWDR, aType); - aGeomTol = aResult; + new StepDimTol_GeoTolAndGeoTolWthDatRef(); + aResult->Init(aName, aDescription, aLMWU, aGTTarget, aGTWDR, aType); + aGeomTol = aResult; } - else { + else + { // Geometric_Tolerance - Handle(StepDimTol_GeometricTolerance) aResult = + Handle(StepDimTol_GeometricTolerance) aResult = STEPCAFControl_GDTProperty::GetGeomTolerance(anObject->GetType()); - if (!aResult.IsNull()) { + if (!aResult.IsNull()) + { aResult->Init(aName, aDescription, aLMWU, aGTTarget); aGeomTol = aResult; } } } - Model->AddWithRefs(aGeomTol); - WriteToleranceZone(WS, anObject, aGeomTol, theRC); + aModel->AddWithRefs(aGeomTol); + writeToleranceZone(theWS, anObject, aGeomTol, theRC); //Annotation plane and Presentation - WritePresentation(WS, anObject->GetPresentation(), anObject->GetPresentationName(), Standard_True, anObject->HasPlane(), - anObject->GetPlane(), anObject->GetPointTextAttach(), aGeomTol); + writePresentation(theWS, anObject->GetPresentation(), anObject->GetPresentationName(), Standard_True, anObject->HasPlane(), + anObject->GetPlane(), anObject->GetPointTextAttach(), aGeomTol); } //======================================================================= -//function : WriteDGTs -//purpose : +//function : writeDGTs +//purpose : //======================================================================= -Standard_Boolean STEPCAFControl_Writer::WriteDGTs (const Handle(XSControl_WorkSession) &WS, - const TDF_LabelSequence &labels ) const +Standard_Boolean STEPCAFControl_Writer::writeDGTs(const Handle(XSControl_WorkSession)& theWS, + const TDF_LabelSequence& theLabels) const { - - if ( labels.Length() <=0 ) return Standard_False; - + + if (theLabels.IsEmpty()) + return Standard_False; + // get working data - const Handle(Interface_InterfaceModel) &Model = WS->Model(); - const Handle(XSControl_TransferWriter) &TW = WS->TransferWriter(); - const Handle(Transfer_FinderProcess) &FP = TW->FinderProcess(); + const Handle(Interface_InterfaceModel)& aModel = theWS->Model(); + const Handle(XSControl_TransferWriter)& aTW = theWS->TransferWriter(); + const Handle(Transfer_FinderProcess)& aFP = aTW->FinderProcess(); - const Handle(Interface_HGraph) aHGraph = WS->HGraph(); - if(aHGraph.IsNull()) + const Handle(Interface_HGraph) aHGraph = theWS->HGraph(); + if (aHGraph.IsNull()) return Standard_False; Interface_Graph aGraph = aHGraph->Graph(); - Handle(XCAFDoc_DimTolTool) DGTTool = XCAFDoc_DocumentTool::DimTolTool( labels(1) ); - if(DGTTool.IsNull() ) return Standard_False; + STEPConstruct_DataMapOfAsciiStringTransient aDatumMap; - TDF_LabelSequence DGTLabels; + TDF_LabelSequence aDGTLabels; + // Iterate on requested shapes collect Tools + for (TDF_LabelMap::Iterator aLabelIter(myRootLabels); + aLabelIter.More(); aLabelIter.Next()) + { + const TDF_Label& aLabel = aLabelIter.Value(); + Handle(XCAFDoc_DimTolTool) aDGTTool = XCAFDoc_DocumentTool::DimTolTool(aLabel); + TDF_LabelSequence aDGTLS; + aDGTTool->GetDatumLabels(aDGTLS); + aDGTLabels.Append(aDGTLS); + } - STEPConstruct_DataMapOfAsciiStringTransient DatumMap; + if (aDGTLabels.IsEmpty()) + return Standard_False; - // write Datums - DGTLabels.Clear(); - DGTTool->GetDatumLabels(DGTLabels); - if(DGTLabels.Length()<=0) return Standard_False; - Standard_Integer i; - for(i=1; i<=DGTLabels.Length(); i++) { - TDF_Label DatumL = DGTLabels.Value(i); - TDF_LabelSequence ShapeL; + for (TDF_LabelSequence::Iterator aDGTIter(aDGTLabels); + aDGTIter.More(); aDGTIter.Next()) + { + const TDF_Label& aDatumL = aDGTIter.Value(); + TDF_LabelSequence aShapeL; TDF_LabelSequence aNullSeq; - if(!DGTTool->GetRefShapeLabel(DatumL,ShapeL,aNullSeq)) continue; + if (!XCAFDoc_DimTolTool::GetRefShapeLabel(aDatumL, aShapeL, aNullSeq)) continue; // find target shape - TopoDS_Shape aShape = XCAFDoc_ShapeTool::GetShape(ShapeL.Value(1)); - TopLoc_Location Loc; - TColStd_SequenceOfTransient seqRI; - FindEntities( FP, aShape, Loc, seqRI ); - if ( seqRI.Length() <= 0 ) { - FP->Messenger()->SendInfo() << "Warning: Cannot find RI for "<DynamicType()->Name()<DynamicType()->Name() << "\n"; continue; } - Handle(StepRepr_ProductDefinitionShape) PDS; - Handle(StepRepr_RepresentationContext) RC; - Handle(Standard_Transient) ent = seqRI.Value(1); - Handle(StepShape_AdvancedFace) AF; - Handle(StepShape_EdgeCurve) EC; - FindPDSforDGT(aGraph,ent,PDS,RC,AF,EC); - if(PDS.IsNull()) continue; - //std::cout<<"Model->Number(PDS)="<Number(PDS)<GetName(); - Handle(TCollection_HAsciiString) anIdentification = DatumAttr->GetIdentification(); - Handle(TCollection_HAsciiString) aDescription = DatumAttr->GetDescription(); + Handle(StepRepr_ProductDefinitionShape) aPDS; + Handle(StepRepr_RepresentationContext) aRC; + Handle(Standard_Transient) anEnt = aSeqRI.Value(1); + Handle(StepShape_AdvancedFace) anAF; + Handle(StepShape_EdgeCurve) anEC; + FindPDSforDGT(aGraph, anEnt, aPDS, aRC, anAF, anEC); + if (aPDS.IsNull()) + continue; + Handle(XCAFDoc_Datum) aDatumAttr; + if (!aDatumL.FindAttribute(XCAFDoc_Datum::GetID(), aDatumAttr)) + continue; + Handle(TCollection_HAsciiString) aName = aDatumAttr->GetName(); + Handle(TCollection_HAsciiString) anIdentification = aDatumAttr->GetIdentification(); + Handle(TCollection_HAsciiString) aDescription = aDatumAttr->GetDescription(); if (aDescription.IsNull()) { aDescription = new TCollection_HAsciiString(); } - Handle(StepDimTol_DatumFeature) DF = new StepDimTol_DatumFeature; + Handle(StepDimTol_DatumFeature) aDF = new StepDimTol_DatumFeature; Handle(StepDimTol_Datum) aDatum = new StepDimTol_Datum; - DF->Init(aName, new TCollection_HAsciiString, PDS, StepData_LTrue); - Model->AddWithRefs(DF); - aDatum->Init(aName, new TCollection_HAsciiString, PDS, StepData_LFalse, anIdentification); - Model->AddWithRefs(aDatum); - Handle(StepRepr_ShapeAspectRelationship) SAR = new StepRepr_ShapeAspectRelationship; - SAR->SetName(aName); - SAR->SetRelatingShapeAspect(DF); - SAR->SetRelatedShapeAspect(aDatum); - Model->AddWithRefs(SAR); + aDF->Init(aName, new TCollection_HAsciiString, aPDS, StepData_LTrue); + aModel->AddWithRefs(aDF); + aDatum->Init(aName, new TCollection_HAsciiString, aPDS, StepData_LFalse, anIdentification); + aModel->AddWithRefs(aDatum); + Handle(StepRepr_ShapeAspectRelationship) aSAR = new StepRepr_ShapeAspectRelationship; + aSAR->SetName(aName); + aSAR->SetRelatingShapeAspect(aDF); + aSAR->SetRelatedShapeAspect(aDatum); + aModel->AddWithRefs(aSAR); // write chain for DatumFeature - StepRepr_CharacterizedDefinition CD; - CD.SetValue(DF); - Handle(StepRepr_PropertyDefinition) PropD = new StepRepr_PropertyDefinition; - PropD->Init(aName,Standard_True,aDescription,CD); - Model->AddWithRefs(PropD); - StepRepr_RepresentedDefinition RD; - RD.SetValue(PropD); - Handle(StepShape_ShapeRepresentation) SR = new StepShape_ShapeRepresentation; - Handle(StepRepr_HArray1OfRepresentationItem) HARI = - new StepRepr_HArray1OfRepresentationItem(1,1); - HARI->SetValue(1,AF); - SR->Init(aName,HARI,RC); - Handle(StepShape_ShapeDefinitionRepresentation) SDR = new StepShape_ShapeDefinitionRepresentation; - SDR->Init(RD,SR); - Model->AddWithRefs(SDR); - // write chain for Datum - StepRepr_CharacterizedDefinition CD1; - CD1.SetValue(aDatum); - Handle(StepRepr_PropertyDefinition) PropD1 = new StepRepr_PropertyDefinition; - PropD1->Init(aName,Standard_True,aDescription,CD1); - Model->AddWithRefs(PropD1); - StepRepr_RepresentedDefinition RD1; - RD1.SetValue(PropD1); - Handle(StepShape_ShapeRepresentation) SR1 = new StepShape_ShapeRepresentation; - Handle(StepRepr_HArray1OfRepresentationItem) HARI1 = - new StepRepr_HArray1OfRepresentationItem(1,1); - HARI1->SetValue(1,AF->FaceGeometry()); - SR1->Init(aName,HARI1,RC); - Model->AddWithRefs(SR1); - Handle(StepShape_ShapeDefinitionRepresentation) SDR1 = new StepShape_ShapeDefinitionRepresentation; - SDR1->Init(RD1,SR1); - Model->AddWithRefs(SDR1); + StepRepr_CharacterizedDefinition aCD; + aCD.SetValue(aDF); + Handle(StepRepr_PropertyDefinition) aPropD = new StepRepr_PropertyDefinition; + aPropD->Init(aName, Standard_True, aDescription, aCD); + aModel->AddWithRefs(aPropD); + StepRepr_RepresentedDefinition aRD; + aRD.SetValue(aPropD); + Handle(StepShape_ShapeRepresentation) aSR = new StepShape_ShapeRepresentation; + Handle(StepRepr_HArray1OfRepresentationItem) aHARI = + new StepRepr_HArray1OfRepresentationItem(1, 1); + aHARI->SetValue(1, anAF); + aSR->Init(aName, aHARI, aRC); + Handle(StepShape_ShapeDefinitionRepresentation) aSDR = new StepShape_ShapeDefinitionRepresentation; + aSDR->Init(aRD, aSR); + aModel->AddWithRefs(aSDR); + // write chain for Datum + StepRepr_CharacterizedDefinition aCD1; + aCD1.SetValue(aDatum); + Handle(StepRepr_PropertyDefinition) aPropD1 = new StepRepr_PropertyDefinition; + aPropD1->Init(aName, Standard_True, aDescription, aCD1); + aModel->AddWithRefs(aPropD1); + StepRepr_RepresentedDefinition aRD1; + aRD1.SetValue(aPropD1); + Handle(StepShape_ShapeRepresentation) aSR1 = new StepShape_ShapeRepresentation; + Handle(StepRepr_HArray1OfRepresentationItem) aHARI1 = + new StepRepr_HArray1OfRepresentationItem(1, 1); + aHARI1->SetValue(1, anAF->FaceGeometry()); + aSR1->Init(aName, aHARI1, aRC); + aModel->AddWithRefs(aSR1); + Handle(StepShape_ShapeDefinitionRepresentation) aSDR1 = new StepShape_ShapeDefinitionRepresentation; + aSDR1->Init(aRD1, aSR1); + aModel->AddWithRefs(aSDR1); // add created Datum into Map - TCollection_AsciiString stmp(aName->ToCString()); - stmp.AssignCat(aDescription->ToCString()); - stmp.AssignCat(anIdentification->ToCString()); - DatumMap.Bind(stmp,aDatum); + TCollection_AsciiString aStmp(aName->ToCString()); + aStmp.AssignCat(aDescription->ToCString()); + aStmp.AssignCat(anIdentification->ToCString()); + aDatumMap.Bind(aStmp, aDatum); } // write Tolerances and Dimensions - DGTLabels.Clear(); - DGTTool->GetDimTolLabels(DGTLabels); - if(DGTLabels.Length()<=0) return Standard_False; - for(i=1; i<=DGTLabels.Length(); i++) { - TDF_Label DimTolL = DGTLabels.Value(i); - TDF_LabelSequence ShapeL; + aDGTLabels.Clear(); + // Iterate on requested shapes collect Tools + for (TDF_LabelMap::Iterator aLabelIter(myRootLabels); + aLabelIter.More(); aLabelIter.Next()) + { + const TDF_Label& aLabel = aLabelIter.Value(); + Handle(XCAFDoc_DimTolTool) aDGTTool = XCAFDoc_DocumentTool::DimTolTool(aLabel); + TDF_LabelSequence aaDGTLS; + aDGTTool->GetDimTolLabels(aDGTLabels); + aDGTLabels.Append(aaDGTLS); + } + + if (aDGTLabels.IsEmpty()) + return Standard_False; + for (TDF_LabelSequence::Iterator aDGTIter(aDGTLabels); + aDGTIter.More(); aDGTIter.Next()) + { + const TDF_Label& aDimTolL = aDGTIter.Value(); + TDF_LabelSequence aShapeL; TDF_LabelSequence aNullSeq; - if(!DGTTool->GetRefShapeLabel(DimTolL,ShapeL,aNullSeq)) continue; + if (!XCAFDoc_DimTolTool::GetRefShapeLabel(aDimTolL, aShapeL, aNullSeq)) + continue; // find target shape - TopoDS_Shape aShape = XCAFDoc_ShapeTool::GetShape(ShapeL.Value(1)); - TopLoc_Location Loc; + TopoDS_Shape aShape = XCAFDoc_ShapeTool::GetShape(aShapeL.Value(1)); + TopLoc_Location aLoc; TColStd_SequenceOfTransient seqRI; - FindEntities( FP, aShape, Loc, seqRI ); - if ( seqRI.Length() <= 0 ) { - FP->Messenger()->SendInfo() << "Warning: Cannot find RI for "<DynamicType()->Name()<DynamicType()->Name() << "\n"; continue; } - Handle(StepRepr_ProductDefinitionShape) PDS; - Handle(StepRepr_RepresentationContext) RC; - Handle(Standard_Transient) ent = seqRI.Value(1); - Handle(StepShape_AdvancedFace) AF; - Handle(StepShape_EdgeCurve) EC; - FindPDSforDGT(aGraph,ent,PDS,RC,AF,EC); - if(PDS.IsNull()) continue; - //std::cout<<"Model->Number(PDS)="<Number(PDS)<GetKind(); - Handle(TColStd_HArray1OfReal) aVal = DimTolAttr->GetVal(); - Handle(TCollection_HAsciiString) aName = DimTolAttr->GetName(); - Handle(TCollection_HAsciiString) aDescription = DimTolAttr->GetDescription(); + Handle(StepRepr_ProductDefinitionShape) aPDS; + Handle(StepRepr_RepresentationContext) aRC; + Handle(Standard_Transient) anEnt = seqRI.Value(1); + Handle(StepShape_AdvancedFace) anAF; + Handle(StepShape_EdgeCurve) anEC; + FindPDSforDGT(aGraph, anEnt, aPDS, aRC, anAF, anEC); + if (aPDS.IsNull()) + continue; + + Handle(XCAFDoc_DimTol) aDimTolAttr; + if (!aDimTolL.FindAttribute(XCAFDoc_DimTol::GetID(), aDimTolAttr)) + continue; + Standard_Integer aKind = aDimTolAttr->GetKind(); + Handle(TColStd_HArray1OfReal) aVal = aDimTolAttr->GetVal(); + Handle(TCollection_HAsciiString) aName = aDimTolAttr->GetName(); + Handle(TCollection_HAsciiString) aDescription = aDimTolAttr->GetDescription(); // common part of writing D> entities - StepRepr_CharacterizedDefinition CD; - Handle(StepRepr_ShapeAspect) SA = new StepRepr_ShapeAspect; - SA->Init(aName, new TCollection_HAsciiString, PDS, StepData_LTrue); - Model->AddWithRefs(SA); - CD.SetValue(SA); - Handle(StepRepr_PropertyDefinition) PropD = new StepRepr_PropertyDefinition; - PropD->Init(aName,Standard_True,aDescription,CD); - Model->AddWithRefs(PropD); - StepRepr_RepresentedDefinition RD; - RD.SetValue(PropD); - Handle(StepShape_ShapeRepresentation) SR = new StepShape_ShapeRepresentation; - Handle(StepRepr_HArray1OfRepresentationItem) HARI = - new StepRepr_HArray1OfRepresentationItem(1,1); - if(kind<20) - HARI->SetValue(1,EC); + StepRepr_CharacterizedDefinition aCD; + Handle(StepRepr_ShapeAspect) aSA = new StepRepr_ShapeAspect; + aSA->Init(aName, new TCollection_HAsciiString, aPDS, StepData_LTrue); + aModel->AddWithRefs(aSA); + aCD.SetValue(aSA); + Handle(StepRepr_PropertyDefinition) aPropD = new StepRepr_PropertyDefinition; + aPropD->Init(aName, Standard_True, aDescription, aCD); + aModel->AddWithRefs(aPropD); + StepRepr_RepresentedDefinition aRD; + aRD.SetValue(aPropD); + Handle(StepShape_ShapeRepresentation) aSR = new StepShape_ShapeRepresentation; + Handle(StepRepr_HArray1OfRepresentationItem) aHARI = + new StepRepr_HArray1OfRepresentationItem(1, 1); + if (aKind < 20) + aHARI->SetValue(1, anEC); else - HARI->SetValue(1,AF); - SR->Init(aName,HARI,RC); - Handle(StepShape_ShapeDefinitionRepresentation) SDR = new StepShape_ShapeDefinitionRepresentation; - SDR->Init(RD,SR); - Model->AddWithRefs(SDR); + aHARI->SetValue(1, anAF); + aSR->Init(aName, aHARI, aRC); + Handle(StepShape_ShapeDefinitionRepresentation) aSDR = new StepShape_ShapeDefinitionRepresentation; + aSDR->Init(aRD, aSR); + aModel->AddWithRefs(aSDR); // define aUnit for creation LengthMeasureWithUnit (common for all) StepBasic_Unit aUnit; - aUnit = GetUnit(RC); + aUnit = GetUnit(aRC); // specific part of writing D> entities - if(kind<20) { //dimension - Handle(StepShape_DimensionalSize) DimSize = new StepShape_DimensionalSize; - DimSize->Init(SA,aDescription); - Model->AddWithRefs(DimSize); - if(aVal->Length()>1) { + if (aKind < 20) + { //dimension + Handle(StepShape_DimensionalSize) aDimSize = new StepShape_DimensionalSize; + aDimSize->Init(aSA, aDescription); + aModel->AddWithRefs(aDimSize); + if (aVal->Length() > 1) + { // create MeasureWithUnits - Handle(StepBasic_MeasureValueMember) MVM1 = new StepBasic_MeasureValueMember; - MVM1->SetName("POSITIVE_LENGTH_MEASURE"); - MVM1->SetReal(aVal->Value(1)); - Handle(StepBasic_MeasureWithUnit) MWU1 = new StepBasic_MeasureWithUnit; - MWU1->Init(MVM1,aUnit); - Handle(StepBasic_MeasureValueMember) MVM2 = new StepBasic_MeasureValueMember; - MVM2->SetName("POSITIVE_LENGTH_MEASURE"); - MVM2->SetReal(aVal->Value(2)); - Handle(StepBasic_MeasureWithUnit) MWU2 = new StepBasic_MeasureWithUnit; - MWU2->Init(MVM2,aUnit); - Handle(StepRepr_RepresentationItem) RI1 = new StepRepr_RepresentationItem; - RI1->Init(new TCollection_HAsciiString("lower limit")); - Handle(StepRepr_RepresentationItem) RI2 = new StepRepr_RepresentationItem; - RI2->Init(new TCollection_HAsciiString("upper limit")); - Handle(StepRepr_ReprItemAndLengthMeasureWithUnit) RILMU1 = + Handle(StepBasic_MeasureValueMember) aMVM1 = new StepBasic_MeasureValueMember; + aMVM1->SetName("POSITIVE_LENGTH_MEASURE"); + aMVM1->SetReal(aVal->Value(1)); + Handle(StepBasic_MeasureWithUnit) aMWU1 = new StepBasic_MeasureWithUnit; + aMWU1->Init(aMVM1, aUnit); + Handle(StepBasic_MeasureValueMember) aMVM2 = new StepBasic_MeasureValueMember; + aMVM2->SetName("POSITIVE_LENGTH_MEASURE"); + aMVM2->SetReal(aVal->Value(2)); + Handle(StepBasic_MeasureWithUnit) aMWU2 = new StepBasic_MeasureWithUnit; + aMWU2->Init(aMVM2, aUnit); + Handle(StepRepr_RepresentationItem) aRI1 = new StepRepr_RepresentationItem; + aRI1->Init(new TCollection_HAsciiString("lower limit")); + Handle(StepRepr_RepresentationItem) aRI2 = new StepRepr_RepresentationItem; + aRI2->Init(new TCollection_HAsciiString("upper limit")); + Handle(StepRepr_ReprItemAndLengthMeasureWithUnit) aRILMU1 = new StepRepr_ReprItemAndLengthMeasureWithUnit; - RILMU1->Init(MWU1,RI1); - Handle(StepRepr_ReprItemAndLengthMeasureWithUnit) RILMU2 = + aRILMU1->Init(aMWU1, aRI1); + Handle(StepRepr_ReprItemAndLengthMeasureWithUnit) aRILMU2 = new StepRepr_ReprItemAndLengthMeasureWithUnit; - RILMU2->Init(MWU2,RI2); - Model->AddWithRefs(RILMU1); - Model->AddWithRefs(RILMU2); - //Handle(StepRepr_CompoundItemDefinitionMember) CIDM = - // new StepRepr_CompoundItemDefinitionMember; - //Handle(TColStd_HArray1OfTransient) ArrTr = new TColStd_HArray1OfTransient(1,2); - //ArrTr->SetValue(1,RILMU1); - //ArrTr->SetValue(2,RILMU2); - //CIDM->SetArrTransient(ArrTr); - //CIDM->SetName("SET_REPRESENTATION_ITEM"); - //StepRepr_CompoundItemDefinition CID; - //CID.SetValue(CIDM); - Handle(StepRepr_HArray1OfRepresentationItem) HARIVR = - new StepRepr_HArray1OfRepresentationItem(1,2); - HARIVR->SetValue(1,RILMU1); - HARIVR->SetValue(2,RILMU2); - Handle(StepRepr_ValueRange) VR = new StepRepr_ValueRange; + aRILMU2->Init(aMWU2, aRI2); + aModel->AddWithRefs(aRILMU1); + aModel->AddWithRefs(aRILMU2); + Handle(StepRepr_HArray1OfRepresentationItem) aHARIVR = + new StepRepr_HArray1OfRepresentationItem(1, 2); + aHARIVR->SetValue(1, aRILMU1); + aHARIVR->SetValue(2, aRILMU2); + Handle(StepRepr_ValueRange) aVR = new StepRepr_ValueRange; //VR->Init(aName,CID); - VR->Init(aName,HARIVR); - Model->AddEntity(VR); - Handle(StepShape_ShapeDimensionRepresentation) SDimR = + aVR->Init(aName, aHARIVR); + aModel->AddEntity(aVR); + Handle(StepShape_ShapeDimensionRepresentation) aSDimR = new StepShape_ShapeDimensionRepresentation; - Handle(StepRepr_HArray1OfRepresentationItem) aHARI = - new StepRepr_HArray1OfRepresentationItem(1,1); - aHARI->SetValue(1,VR); - SDimR->Init(aName,aHARI,RC); - Model->AddWithRefs(SDimR); - Handle(StepShape_DimensionalCharacteristicRepresentation) DimCharR = + Handle(StepRepr_HArray1OfRepresentationItem) aHARI1 = + new StepRepr_HArray1OfRepresentationItem(1, 1); + aHARI1->SetValue(1, aVR); + aSDimR->Init(aName, aHARI1, aRC); + aModel->AddWithRefs(aSDimR); + Handle(StepShape_DimensionalCharacteristicRepresentation) aDimCharR = new StepShape_DimensionalCharacteristicRepresentation; - StepShape_DimensionalCharacteristic DimChar; - DimChar.SetValue(DimSize); - DimCharR->Init(DimChar,SDimR); - Model->AddEntity(DimCharR); + StepShape_DimensionalCharacteristic aDimChar; + aDimChar.SetValue(aDimSize); + aDimCharR->Init(aDimChar, aSDimR); + aModel->AddEntity(aDimCharR); } } - else if(kind<50) { //tolerance - if(kind<35) { // tolerance with datum system - TDF_LabelSequence DatumLabels; - DGTTool->GetDatumOfTolerLabels(DimTolL,DatumLabels); - Standard_Integer NbDR = DatumLabels.Length(); - Handle(StepDimTol_HArray1OfDatumReference) HADR = new StepDimTol_HArray1OfDatumReference(1,NbDR); - for(Standard_Integer j=1; j<=NbDR; j++) { - Handle(XCAFDoc_Datum) DatumAttr; - TDF_Label DatumL = DatumLabels.Value(j); - if(!DatumL.FindAttribute(XCAFDoc_Datum::GetID(),DatumAttr)) continue; - Handle(TCollection_HAsciiString) aNameD = DatumAttr->GetName(); - Handle(TCollection_HAsciiString) aDescriptionD = DatumAttr->GetDescription(); - Handle(TCollection_HAsciiString) anIdentificationD = DatumAttr->GetIdentification(); - TCollection_AsciiString stmp(aNameD->ToCString()); - stmp.AssignCat(aDescriptionD->ToCString()); - stmp.AssignCat(anIdentificationD->ToCString()); - if(DatumMap.IsBound(stmp)) { - Handle(StepDimTol_Datum) aDatum = - Handle(StepDimTol_Datum)::DownCast(DatumMap.Find(stmp)); - Handle(StepDimTol_DatumReference) DR = new StepDimTol_DatumReference; - DR->Init(j,aDatum); - Model->AddWithRefs(DR); - HADR->SetValue(j,DR); + else if (aKind < 50) + { //tolerance + if (aKind < 35) + { // tolerance with datum system + TDF_LabelSequence aDatumLabels; + XCAFDoc_DimTolTool::GetDatumOfTolerLabels(aDimTolL, aDatumLabels); + Standard_Integer aSetDatumInd = 1; + Handle(StepDimTol_HArray1OfDatumReference) aHADR = + new StepDimTol_HArray1OfDatumReference(1, aDatumLabels.Length()); + for (TDF_LabelSequence::Iterator aDatumIter(aDatumLabels); + aDatumIter.More(); aDatumIter.Next(), aSetDatumInd++) + { + Handle(XCAFDoc_Datum) aDatumAttr; + const TDF_Label& aDatumL = aDatumIter.Value(); + if (!aDatumL.FindAttribute(XCAFDoc_Datum::GetID(), aDatumAttr)) + continue; + Handle(TCollection_HAsciiString) aNameD = aDatumAttr->GetName(); + Handle(TCollection_HAsciiString) aDescriptionD = aDatumAttr->GetDescription(); + Handle(TCollection_HAsciiString) anIdentificationD = aDatumAttr->GetIdentification(); + TCollection_AsciiString aStmp(aNameD->ToCString()); + aStmp.AssignCat(aDescriptionD->ToCString()); + aStmp.AssignCat(anIdentificationD->ToCString()); + if (aDatumMap.IsBound(aStmp)) + { + Handle(StepDimTol_Datum) aDatum = + Handle(StepDimTol_Datum)::DownCast(aDatumMap.Find(aStmp)); + Handle(StepDimTol_DatumReference) aDR = new StepDimTol_DatumReference; + aDR->Init(aSetDatumInd, aDatum); + aModel->AddWithRefs(aDR); + aHADR->SetValue(aSetDatumInd, aDR); } } // create LengthMeasureWithUnit - Handle(StepBasic_MeasureValueMember) MVM = new StepBasic_MeasureValueMember; - MVM->SetName("LENGTH_MEASURE"); - MVM->SetReal(aVal->Value(1)); - Handle(StepBasic_LengthMeasureWithUnit) LMWU = new StepBasic_LengthMeasureWithUnit; - LMWU->Init(MVM,aUnit); + Handle(StepBasic_MeasureValueMember) aMVM = new StepBasic_MeasureValueMember; + aMVM->SetName("LENGTH_MEASURE"); + aMVM->SetReal(aVal->Value(1)); + Handle(StepBasic_LengthMeasureWithUnit) aLMWU = new StepBasic_LengthMeasureWithUnit; + aLMWU->Init(aMVM, aUnit); // create tolerance by it's type - if(kind<24) { - Handle(StepDimTol_GeometricToleranceWithDatumReference) GTWDR = + if (aKind < 24) + { + Handle(StepDimTol_GeometricToleranceWithDatumReference) aGTWDR = new StepDimTol_GeometricToleranceWithDatumReference; - GTWDR->SetDatumSystem(HADR); - Handle(StepDimTol_ModifiedGeometricTolerance) MGT = + aGTWDR->SetDatumSystem(aHADR); + Handle(StepDimTol_ModifiedGeometricTolerance) aMGT = new StepDimTol_ModifiedGeometricTolerance; - if(kind==21) MGT->SetModifier(StepDimTol_MaximumMaterialCondition); - else if(kind==22) MGT->SetModifier(StepDimTol_LeastMaterialCondition); - else if(kind==23) MGT->SetModifier(StepDimTol_RegardlessOfFeatureSize); - Handle(StepDimTol_GeoTolAndGeoTolWthDatRefAndModGeoTolAndPosTol) GTComplex = + if (aKind == 21) + aMGT->SetModifier(StepDimTol_MaximumMaterialCondition); + else if (aKind == 22) + aMGT->SetModifier(StepDimTol_LeastMaterialCondition); + else if (aKind == 23) + aMGT->SetModifier(StepDimTol_RegardlessOfFeatureSize); + Handle(StepDimTol_GeoTolAndGeoTolWthDatRefAndModGeoTolAndPosTol) aGTComplex = new StepDimTol_GeoTolAndGeoTolWthDatRefAndModGeoTolAndPosTol; - GTComplex->Init(aName,aDescription,LMWU,SA,GTWDR,MGT); - Model->AddWithRefs(GTComplex); + aGTComplex->Init(aName, aDescription, aLMWU, aSA, aGTWDR, aMGT); + aModel->AddWithRefs(aGTComplex); } - else if(kind==24) { + else if (aKind == 24) + { Handle(StepDimTol_AngularityTolerance) aToler = new StepDimTol_AngularityTolerance; - aToler->Init(aName,aDescription,LMWU,SA,HADR); - Model->AddWithRefs(aToler); + aToler->Init(aName, aDescription, aLMWU, aSA, aHADR); + aModel->AddWithRefs(aToler); } - else if(kind==25) { + else if (aKind == 25) + { Handle(StepDimTol_CircularRunoutTolerance) aToler = new StepDimTol_CircularRunoutTolerance; - aToler->Init(aName,aDescription,LMWU,SA,HADR); - Model->AddWithRefs(aToler); + aToler->Init(aName, aDescription, aLMWU, aSA, aHADR); + aModel->AddWithRefs(aToler); } - else if(kind==26) { + else if (aKind == 26) + { Handle(StepDimTol_CoaxialityTolerance) aToler = new StepDimTol_CoaxialityTolerance; - aToler->Init(aName,aDescription,LMWU,SA,HADR); - Model->AddWithRefs(aToler); + aToler->Init(aName, aDescription, aLMWU, aSA, aHADR); + aModel->AddWithRefs(aToler); } - else if(kind==27) { + else if (aKind == 27) + { Handle(StepDimTol_ConcentricityTolerance) aToler = new StepDimTol_ConcentricityTolerance; - aToler->Init(aName,aDescription,LMWU,SA,HADR); - Model->AddWithRefs(aToler); + aToler->Init(aName, aDescription, aLMWU, aSA, aHADR); + aModel->AddWithRefs(aToler); } - else if(kind==28) { + else if (aKind == 28) + { Handle(StepDimTol_ParallelismTolerance) aToler = new StepDimTol_ParallelismTolerance; - aToler->Init(aName,aDescription,LMWU,SA,HADR); - Model->AddWithRefs(aToler); + aToler->Init(aName, aDescription, aLMWU, aSA, aHADR); + aModel->AddWithRefs(aToler); } - else if(kind==29) { + else if (aKind == 29) + { Handle(StepDimTol_PerpendicularityTolerance) aToler = new StepDimTol_PerpendicularityTolerance; - aToler->Init(aName,aDescription,LMWU,SA,HADR); - Model->AddWithRefs(aToler); + aToler->Init(aName, aDescription, aLMWU, aSA, aHADR); + aModel->AddWithRefs(aToler); } - else if(kind==30) { + else if (aKind == 30) + { Handle(StepDimTol_SymmetryTolerance) aToler = new StepDimTol_SymmetryTolerance; - aToler->Init(aName,aDescription,LMWU,SA,HADR); - Model->AddWithRefs(aToler); + aToler->Init(aName, aDescription, aLMWU, aSA, aHADR); + aModel->AddWithRefs(aToler); } - else if(kind==31) { + else if (aKind == 31) + { Handle(StepDimTol_TotalRunoutTolerance) aToler = new StepDimTol_TotalRunoutTolerance; - aToler->Init(aName,aDescription,LMWU,SA,HADR); - Model->AddWithRefs(aToler); + aToler->Init(aName, aDescription, aLMWU, aSA, aHADR); + aModel->AddWithRefs(aToler); } } } @@ -3766,48 +3910,56 @@ Standard_Boolean STEPCAFControl_Writer::WriteDGTs (const Handle(XSControl_WorkSe } //======================================================================= -//function : WriteDGTsAP242 -//purpose : +//function : writeDGTsAP242 +//purpose : //======================================================================= - -Standard_Boolean STEPCAFControl_Writer::WriteDGTsAP242 (const Handle(XSControl_WorkSession) &WS, - const TDF_LabelSequence &labels ) +Standard_Boolean STEPCAFControl_Writer::writeDGTsAP242(const Handle(XSControl_WorkSession)& theWS, + const TDF_LabelSequence& theLabels) { + (void)theLabels; // Get working data - const Handle(Interface_InterfaceModel) &aModel = WS->Model(); + const Handle(Interface_InterfaceModel)& aModel = theWS->Model(); - const Handle(Interface_HGraph) aHGraph = WS->HGraph(); - if(aHGraph.IsNull()) + const Handle(Interface_HGraph) aHGraph = theWS->HGraph(); + if (aHGraph.IsNull()) return Standard_False; Interface_Graph aGraph = aHGraph->Graph(); - Handle(XCAFDoc_DimTolTool) DGTTool = XCAFDoc_DocumentTool::DimTolTool(labels(1)); - if(DGTTool.IsNull()) - return Standard_False; // Common entities for presentation - STEPConstruct_Styles aStyles (WS); + STEPConstruct_Styles aStyles(theWS); Handle(StepVisual_Colour) aCurvColor = aStyles.EncodeColor(Quantity_NOC_WHITE); Handle(StepRepr_RepresentationItem) anItem = NULL; myGDTPrsCurveStyle->SetValue(1, aStyles.MakeColorPSA(anItem, aCurvColor, aCurvColor, aCurvColor, 0.0)); - Interface_EntityIterator aModelIter = aModel->Entities(); - for (; aModelIter.More() && myGDTCommonPDS.IsNull(); aModelIter.Next()) + for (Interface_EntityIterator aModelIter = aModel->Entities(); + aModelIter.More() && myGDTCommonPDS.IsNull(); aModelIter.Next()) + { myGDTCommonPDS = Handle(StepRepr_ProductDefinitionShape)::DownCast(aModelIter.Value()); + } - TDF_LabelSequence aDGTLabels; STEPConstruct_DataMapOfAsciiStringTransient aDatumMap; Handle(StepRepr_RepresentationContext) aRC; - //------------- // - // write Datums // - //--------------// - DGTTool->GetDatumLabels(aDGTLabels); + TDF_LabelSequence aDGTLabels; + // Iterate on requested shapes collect Tools + for (TDF_LabelMap::Iterator aLabelIter(myRootLabels); + aLabelIter.More(); aLabelIter.Next()) + { + const TDF_Label& aLabel = aLabelIter.Value(); + Handle(XCAFDoc_DimTolTool) aDGTTool = XCAFDoc_DocumentTool::DimTolTool(aLabel); + TDF_LabelSequence aaDGTLS; + aDGTTool->GetDatumLabels(aDGTLabels); + aDGTLabels.Append(aaDGTLS); + } + // Find all shapes with datums TColStd_MapOfAsciiString aNameIdMap; - for(Standard_Integer i = 1; i <= aDGTLabels.Length(); i++) { - TDF_Label aDatumL = aDGTLabels.Value(i); + for (TDF_LabelSequence::Iterator aDGTIter(aDGTLabels); + aDGTIter.More(); aDGTIter.Next()) + { + const TDF_Label& aDatumL = aDGTIter.Value(); TDF_LabelSequence aShapeL, aNullSeq; - DGTTool->GetRefShapeLabel(aDatumL, aShapeL, aNullSeq); + XCAFDoc_DimTolTool::GetRefShapeLabel(aDatumL, aShapeL, aNullSeq); Handle(XCAFDoc_Datum) aDatumAttr; aDatumL.FindAttribute(XCAFDoc_Datum::GetID(), aDatumAttr); Handle(XCAFDimTolObjects_DatumObject) anObject = aDatumAttr->GetObject(); @@ -3817,17 +3969,24 @@ Standard_Boolean STEPCAFControl_Writer::WriteDGTsAP242 (const Handle(XSControl_W continue; Handle(Standard_Transient) aWrittenDatum; Standard_Boolean isFirstDT = !aDatumMap.Find(aDatumName, aWrittenDatum); - Handle(StepDimTol_Datum) aDatum = WriteDatumAP242(WS, aShapeL, aDatumL, isFirstDT, - Handle(StepDimTol_Datum)::DownCast (aWrittenDatum)); + Handle(StepDimTol_Datum) aDatum = writeDatumAP242(theWS, aShapeL, aDatumL, isFirstDT, + Handle(StepDimTol_Datum)::DownCast(aWrittenDatum)); // Add created Datum into Map aDatumMap.Bind(aDatumName, aDatum); } - //----------------- // - // write Dimensions // - //------------------// + // write Dimensions aDGTLabels.Clear(); - DGTTool->GetDimensionLabels(aDGTLabels); + for (TDF_LabelMap::Iterator aLabelIter(myRootLabels); + aLabelIter.More(); aLabelIter.Next()) + { + const TDF_Label& aLabel = aLabelIter.Value(); + Handle(XCAFDoc_DimTolTool) aDGTTool = XCAFDoc_DocumentTool::DimTolTool(aLabel); + TDF_LabelSequence aaDGTLS; + aDGTTool->GetDimensionLabels(aDGTLabels); + aDGTLabels.Append(aaDGTLS); + } + // Auxiliary entities for derived geometry Handle(StepRepr_ConstructiveGeometryRepresentation) aCGRepr = new StepRepr_ConstructiveGeometryRepresentation(); @@ -3836,11 +3995,13 @@ Standard_Boolean STEPCAFControl_Writer::WriteDGTsAP242 (const Handle(XSControl_W NCollection_Vector aConnectionPnts; Handle(StepRepr_RepresentationContext) dummyRC; Handle(StepAP242_GeometricItemSpecificUsage) dummyGISU; - for (Standard_Integer i = 1; i <= aDGTLabels.Length(); i++) { - TDF_Label aDimensionL = aDGTLabels.Value(i); + for (TDF_LabelSequence::Iterator aDGTIter(aDGTLabels); + aDGTIter.More(); aDGTIter.Next()) + { + const TDF_Label& aDimensionL = aDGTIter.Value(); TDF_LabelSequence aFirstShapeL, aSecondShapeL; Handle(XCAFDoc_Dimension) aDimAttr; - if (!aDimensionL.FindAttribute(XCAFDoc_Dimension::GetID(),aDimAttr)) + if (!aDimensionL.FindAttribute(XCAFDoc_Dimension::GetID(), aDimAttr)) continue; Handle(XCAFDimTolObjects_DimensionObject) anObject = aDimAttr->GetObject(); if (anObject.IsNull()) @@ -3850,29 +4011,33 @@ Standard_Boolean STEPCAFControl_Writer::WriteDGTsAP242 (const Handle(XSControl_W Handle(StepRepr_ShapeAspect) aSA = new StepRepr_ShapeAspect(); aSA->Init(new TCollection_HAsciiString(), new TCollection_HAsciiString(), myGDTCommonPDS, StepData_LTrue); aModel->AddWithRefs(aSA); - WritePresentation(WS, anObject->GetPresentation(), anObject->GetPresentationName(), anObject->HasPlane(), - Standard_False, anObject->GetPlane(), anObject->GetPointTextAttach(), aSA); + writePresentation(theWS, anObject->GetPresentation(), anObject->GetPresentationName(), anObject->HasPlane(), + Standard_False, anObject->GetPlane(), anObject->GetPointTextAttach(), aSA); } - if (!DGTTool->GetRefShapeLabel(aDimensionL, aFirstShapeL, aSecondShapeL)) + if (!XCAFDoc_DimTolTool::GetRefShapeLabel(aDimensionL, aFirstShapeL, aSecondShapeL)) continue; // Write links with shapes Handle(StepRepr_ShapeAspect) aFirstSA, aSecondSA; - if (aFirstShapeL.Length() == 1) { + if (aFirstShapeL.Length() == 1) + { TopoDS_Shape aShape = XCAFDoc_ShapeTool::GetShape(aFirstShapeL.Value(1)); - aFirstSA = WriteShapeAspect(WS, aDimensionL, aShape, dummyRC, dummyGISU); + aFirstSA = writeShapeAspect(theWS, aDimensionL, aShape, dummyRC, dummyGISU); if (aRC.IsNull() && !dummyRC.IsNull()) aRC = dummyRC; } - else if (aFirstShapeL.Length() > 1) { + else if (aFirstShapeL.Length() > 1) + { Handle(StepRepr_CompositeShapeAspect) aCSA; - for (Standard_Integer shIt = 1; shIt <= aFirstShapeL.Length(); shIt++) { + for (Standard_Integer shIt = 1; shIt <= aFirstShapeL.Length(); shIt++) + { TopoDS_Shape aShape = XCAFDoc_ShapeTool::GetShape(aFirstShapeL.Value(shIt)); - Handle(StepRepr_ShapeAspect) aSA = WriteShapeAspect(WS, aDimensionL, aShape, dummyRC, dummyGISU); + Handle(StepRepr_ShapeAspect) aSA = writeShapeAspect(theWS, aDimensionL, aShape, dummyRC, dummyGISU); if (aSA.IsNull()) continue; - if (aCSA.IsNull()) { + if (aCSA.IsNull()) + { aCSA = new StepRepr_CompositeShapeAspect(); aCSA->Init(aSA->Name(), aSA->Description(), aSA->OfShape(), aSA->ProductDefinitional()); aModel->AddWithRefs(aCSA); @@ -3885,23 +4050,27 @@ Standard_Boolean STEPCAFControl_Writer::WriteDGTsAP242 (const Handle(XSControl_W } aFirstSA = aCSA; } - if (aSecondShapeL.Length() == 1) { + if (aSecondShapeL.Length() == 1) + { TopoDS_Shape aShape = XCAFDoc_ShapeTool::GetShape(aSecondShapeL.Value(1)); - aSecondSA = WriteShapeAspect(WS, aDimensionL, aShape, dummyRC, dummyGISU); + aSecondSA = writeShapeAspect(theWS, aDimensionL, aShape, dummyRC, dummyGISU); if (aRC.IsNull() && !dummyRC.IsNull()) aRC = dummyRC; } - else if (aSecondShapeL.Length() > 1) { + else if (aSecondShapeL.Length() > 1) + { Handle(StepRepr_CompositeShapeAspect) aCSA; - for (Standard_Integer shIt = 1; shIt <= aSecondShapeL.Length(); shIt++) { + for (Standard_Integer shIt = 1; shIt <= aSecondShapeL.Length(); shIt++) + { TopoDS_Shape aShape = XCAFDoc_ShapeTool::GetShape(aSecondShapeL.Value(shIt)); - Handle(StepRepr_ShapeAspect) aSA = WriteShapeAspect(WS, aDimensionL, aShape, dummyRC, dummyGISU); + Handle(StepRepr_ShapeAspect) aSA = writeShapeAspect(theWS, aDimensionL, aShape, dummyRC, dummyGISU); if (aCSA.IsNull() && !aSA.IsNull()) { aCSA = new StepRepr_CompositeShapeAspect(); } aCSA->Init(aSA->Name(), aSA->Description(), aSA->OfShape(), aSA->ProductDefinitional()); - if (!aSA.IsNull()) { + if (!aSA.IsNull()) + { Handle(StepRepr_ShapeAspectRelationship) aSAR = new StepRepr_ShapeAspectRelationship(); aSAR->Init(new TCollection_HAsciiString(), Standard_False, new TCollection_HAsciiString(), aCSA, aSA); aModel->AddWithRefs(aSAR); @@ -3914,32 +4083,36 @@ Standard_Boolean STEPCAFControl_Writer::WriteDGTsAP242 (const Handle(XSControl_W if (anObject->GetType() == XCAFDimTolObjects_DimensionType_DimensionPresentation) { - WritePresentation(WS, anObject->GetPresentation(), anObject->GetPresentationName(), anObject->HasPlane(), - Standard_False, anObject->GetPlane(), anObject->GetPointTextAttach(), aFirstSA); + writePresentation(theWS, anObject->GetPresentation(), anObject->GetPresentationName(), anObject->HasPlane(), + Standard_False, anObject->GetPlane(), anObject->GetPointTextAttach(), aFirstSA); continue; } // Write dimensions StepShape_DimensionalCharacteristic aDimension; if (anObject->HasPoint() || anObject->HasPoint2()) - WriteDerivedGeometry(WS, anObject, aCGRepr, aFirstSA, aSecondSA, aConnectionPnts); + WriteDerivedGeometry(theWS, anObject, aCGRepr, aFirstSA, aSecondSA, aConnectionPnts); XCAFDimTolObjects_DimensionType aDimType = anObject->GetType(); - if (STEPCAFControl_GDTProperty::IsDimensionalLocation(aDimType)) { + if (STEPCAFControl_GDTProperty::IsDimensionalLocation(aDimType)) + { // Dimensional_Location Handle(StepShape_DimensionalLocation) aDim = new StepShape_DimensionalLocation(); aDim->Init(STEPCAFControl_GDTProperty::GetDimTypeName(aDimType), Standard_False, NULL, aFirstSA, aSecondSA); aDimension.SetValue(aDim); } - else if (aDimType == XCAFDimTolObjects_DimensionType_Location_Angular) { + else if (aDimType == XCAFDimTolObjects_DimensionType_Location_Angular) + { // Angular_Location Handle(StepShape_AngularLocation) aDim = new StepShape_AngularLocation(); StepShape_AngleRelator aRelator = StepShape_Equal; - if (anObject->HasQualifier()) { + if (anObject->HasQualifier()) + { XCAFDimTolObjects_AngularQualifier aQualifier = anObject->GetAngularQualifier(); - switch (aQualifier) { - case XCAFDimTolObjects_AngularQualifier_Small : aRelator = StepShape_Small; + switch (aQualifier) + { + case XCAFDimTolObjects_AngularQualifier_Small: aRelator = StepShape_Small; break; - case XCAFDimTolObjects_AngularQualifier_Large : aRelator = StepShape_Large; + case XCAFDimTolObjects_AngularQualifier_Large: aRelator = StepShape_Large; break; default: aRelator = StepShape_Equal; } @@ -3947,26 +4120,31 @@ Standard_Boolean STEPCAFControl_Writer::WriteDGTsAP242 (const Handle(XSControl_W aDim->Init(new TCollection_HAsciiString(), Standard_False, NULL, aFirstSA, aSecondSA, aRelator); aDimension.SetValue(aDim); } - else if (aDimType == XCAFDimTolObjects_DimensionType_Location_WithPath) { + else if (aDimType == XCAFDimTolObjects_DimensionType_Location_WithPath) + { // Dimensional_Location_With_Path Handle(StepShape_DimensionalLocationWithPath) aDim = new StepShape_DimensionalLocationWithPath(); - Handle(StepRepr_ShapeAspect) aPathSA = WriteShapeAspect(WS, aDimensionL, anObject->GetPath(), dummyRC, dummyGISU); + Handle(StepRepr_ShapeAspect) aPathSA = writeShapeAspect(theWS, aDimensionL, anObject->GetPath(), dummyRC, dummyGISU); aDim->Init(new TCollection_HAsciiString(), Standard_False, NULL, aFirstSA, aSecondSA, aPathSA); aDimension.SetValue(aDim); } - else if (STEPCAFControl_GDTProperty::IsDimensionalSize(aDimType)) { + else if (STEPCAFControl_GDTProperty::IsDimensionalSize(aDimType)) + { // Dimensional_Size Handle(StepShape_DimensionalSize) aDim = new StepShape_DimensionalSize(); aDim->Init(aFirstSA, STEPCAFControl_GDTProperty::GetDimTypeName(aDimType)); aDimension.SetValue(aDim); } - else if (aDimType == XCAFDimTolObjects_DimensionType_Size_Angular) { + else if (aDimType == XCAFDimTolObjects_DimensionType_Size_Angular) + { // Angular_Size Handle(StepShape_AngularSize) aDim = new StepShape_AngularSize(); StepShape_AngleRelator aRelator = StepShape_Equal; - if (anObject->HasQualifier()) { + if (anObject->HasQualifier()) + { XCAFDimTolObjects_AngularQualifier aQualifier = anObject->GetAngularQualifier(); - switch (aQualifier) { + switch (aQualifier) + { case XCAFDimTolObjects_AngularQualifier_Small: aRelator = StepShape_Small; break; case XCAFDimTolObjects_AngularQualifier_Large: aRelator = StepShape_Large; @@ -3977,22 +4155,24 @@ Standard_Boolean STEPCAFControl_Writer::WriteDGTsAP242 (const Handle(XSControl_W aDim->Init(aFirstSA, new TCollection_HAsciiString(), aRelator); aDimension.SetValue(aDim); } - else if (aDimType == XCAFDimTolObjects_DimensionType_Size_WithPath) { + else if (aDimType == XCAFDimTolObjects_DimensionType_Size_WithPath) + { // Dimensional_Size_With_Path Handle(StepShape_DimensionalSizeWithPath) aDim = new StepShape_DimensionalSizeWithPath(); - Handle(StepRepr_ShapeAspect) aPathSA = WriteShapeAspect(WS, aDimensionL, anObject->GetPath(), dummyRC, dummyGISU); + Handle(StepRepr_ShapeAspect) aPathSA = writeShapeAspect(theWS, aDimensionL, anObject->GetPath(), dummyRC, dummyGISU); aDim->Init(aFirstSA, new TCollection_HAsciiString(), aPathSA); aDimension.SetValue(aDim); } // Write values - WriteDimValues(WS, anObject, aRC, aDimension); + WriteDimValues(theWS, anObject, aRC, aDimension); //Annotation plane and Presentation - WritePresentation(WS, anObject->GetPresentation(), anObject->GetPresentationName(), Standard_True, anObject->HasPlane(), - anObject->GetPlane(), anObject->GetPointTextAttach(), aDimension.Value()); + writePresentation(theWS, anObject->GetPresentation(), anObject->GetPresentationName(), Standard_True, anObject->HasPlane(), + anObject->GetPlane(), anObject->GetPointTextAttach(), aDimension.Value()); } // Write Derived geometry - if (aConnectionPnts.Length() > 0) { + if (aConnectionPnts.Length() > 0) + { Handle(StepRepr_HArray1OfRepresentationItem) anItems = new StepRepr_HArray1OfRepresentationItem(1, aConnectionPnts.Length()); for (Standard_Integer i = 0; i < aConnectionPnts.Length(); i++) anItems->SetValue(i + 1, aConnectionPnts(i)); @@ -4001,22 +4181,30 @@ Standard_Boolean STEPCAFControl_Writer::WriteDGTsAP242 (const Handle(XSControl_W aModel->AddWithRefs(aCGReprRel); } - //----------------------------// - // write Geometric Tolerances // - //----------------------------// + // write Geometric Tolerances aDGTLabels.Clear(); - DGTTool->GetGeomToleranceLabels(aDGTLabels); - for (Standard_Integer i = 1; i <= aDGTLabels.Length(); i++) { - TDF_Label aGeomTolL = aDGTLabels.Value(i); + for (TDF_LabelMap::Iterator aLabelIter(myRootLabels); + aLabelIter.More(); aLabelIter.Next()) + { + const TDF_Label& aLabel = aLabelIter.Value(); + Handle(XCAFDoc_DimTolTool) aDGTTool = XCAFDoc_DocumentTool::DimTolTool(aLabel); + TDF_LabelSequence aaDGTLS; + aDGTTool->GetGeomToleranceLabels(aDGTLabels); + aDGTLabels.Append(aaDGTLS); + } + for (TDF_LabelSequence::Iterator aDGTIter(aDGTLabels); + aDGTIter.More(); aDGTIter.Next()) + { + const TDF_Label aGeomTolL = aDGTIter.Value(); TDF_LabelSequence aFirstShapeL, aNullSeqL; - if (!DGTTool->GetRefShapeLabel(aGeomTolL, aFirstShapeL, aNullSeqL)) + if (!XCAFDoc_DimTolTool::GetRefShapeLabel(aGeomTolL, aFirstShapeL, aNullSeqL)) continue; TDF_LabelSequence aDatumSeq; - DGTTool->GetDatumWithObjectOfTolerLabels(aGeomTolL, aDatumSeq); + XCAFDoc_DimTolTool::GetDatumWithObjectOfTolerLabels(aGeomTolL, aDatumSeq); Handle(StepDimTol_HArray1OfDatumSystemOrReference) aDatumSystem; if (aDatumSeq.Length() > 0) - aDatumSystem = WriteDatumSystem(WS, aGeomTolL, aDatumSeq, aDatumMap, aRC); - WriteGeomTolerance(WS, aFirstShapeL, aGeomTolL, aDatumSystem, aRC); + aDatumSystem = WriteDatumSystem(theWS, aGeomTolL, aDatumSeq, aDatumMap, aRC); + writeGeomTolerance(theWS, aFirstShapeL, aGeomTolL, aDatumSystem, aRC); } // Write Draughting model for Annotation Planes @@ -4025,7 +4213,8 @@ Standard_Boolean STEPCAFControl_Writer::WriteDGTsAP242 (const Handle(XSControl_W Handle(StepRepr_HArray1OfRepresentationItem) aItems = new StepRepr_HArray1OfRepresentationItem(1, myGDTAnnotations.Length()); - for (Standard_Integer i = 1; i <= aItems->Length(); i++) { + for (Standard_Integer i = 1; i <= aItems->Length(); i++) + { aItems->SetValue(i, myGDTAnnotations.Value(i - 1)); } myGDTPresentationDM->Init(new TCollection_HAsciiString(), aItems, aRC); @@ -4036,335 +4225,202 @@ Standard_Boolean STEPCAFControl_Writer::WriteDGTsAP242 (const Handle(XSControl_W //======================================================================= //function : FindPDSforRI -//purpose : auxiliary: +//purpose : auxiliary: //======================================================================= -static Standard_Boolean FindPDSforRI(const Interface_Graph &aGraph, - const Handle(Standard_Transient) &ent, - Handle(StepRepr_ProductDefinitionShape) &PDS, - Handle(StepRepr_RepresentationContext) &RC) +static Standard_Boolean FindPDSforRI(const Interface_Graph& theGraph, + const Handle(Standard_Transient)& theEnt, + Handle(StepRepr_ProductDefinitionShape)& thePDS, + Handle(StepRepr_RepresentationContext)& theRC) { - if(ent.IsNull() || !ent->IsKind(STANDARD_TYPE(StepRepr_RepresentationItem))) + if (theEnt.IsNull() || !theEnt->IsKind(STANDARD_TYPE(StepRepr_RepresentationItem))) return Standard_False; - Interface_EntityIterator subs = aGraph.Sharings(ent); - for(subs.Start(); subs.More() && PDS.IsNull(); subs.Next()) { - Handle(StepShape_ShapeRepresentation) SR = - Handle(StepShape_ShapeRepresentation)::DownCast(subs.Value()); - if(SR.IsNull()) continue; - RC = SR->ContextOfItems(); - Interface_EntityIterator subs1 = aGraph.Sharings(SR); - for(subs1.Start(); subs1.More() && PDS.IsNull(); subs1.Next()) { - Handle(StepShape_ShapeDefinitionRepresentation) SDR = - Handle(StepShape_ShapeDefinitionRepresentation)::DownCast(subs1.Value()); - if(SDR.IsNull()) continue; - Handle(StepRepr_PropertyDefinition) PropD = SDR->Definition().PropertyDefinition(); - if(PropD.IsNull()) continue; - PDS = Handle(StepRepr_ProductDefinitionShape)::DownCast(PropD); + for (Interface_EntityIterator aSharingIter = theGraph.Sharings(theEnt); + aSharingIter.More() && thePDS.IsNull(); aSharingIter.Next()) + { + Handle(StepShape_ShapeRepresentation) aSR = + Handle(StepShape_ShapeRepresentation)::DownCast(aSharingIter.Value()); + if (aSR.IsNull()) + continue; + theRC = aSR->ContextOfItems(); + for (Interface_EntityIterator aSubs1 = theGraph.Sharings(aSR); + aSubs1.More() && thePDS.IsNull(); aSubs1.Next()) + { + Handle(StepShape_ShapeDefinitionRepresentation) aSDR = + Handle(StepShape_ShapeDefinitionRepresentation)::DownCast(aSubs1.Value()); + if (aSDR.IsNull()) + continue; + Handle(StepRepr_PropertyDefinition) aPropD = aSDR->Definition().PropertyDefinition(); + if (aPropD.IsNull()) + continue; + thePDS = Handle(StepRepr_ProductDefinitionShape)::DownCast(aPropD); } } return Standard_True; } - //======================================================================= -//function : WriteMaterials -//purpose : +//function : writeMaterials +//purpose : //======================================================================= - -Standard_Boolean STEPCAFControl_Writer::WriteMaterials (const Handle(XSControl_WorkSession) &WS, - const TDF_LabelSequence &labels ) const +Standard_Boolean STEPCAFControl_Writer::writeMaterials(const Handle(XSControl_WorkSession)& theWS, + const TDF_LabelSequence& theLabels) const { - - if ( labels.Length() <=0 ) return Standard_False; + + if (theLabels.IsEmpty()) + return Standard_False; // get working data - const Handle(Interface_InterfaceModel) &Model = WS->Model(); - const Handle(XSControl_TransferWriter) &TW = WS->TransferWriter(); - const Handle(Transfer_FinderProcess) &FP = TW->FinderProcess(); + const Handle(Interface_InterfaceModel)& aModel = theWS->Model(); + const Handle(XSControl_TransferWriter)& aTW = theWS->TransferWriter(); + const Handle(Transfer_FinderProcess)& aFP = aTW->FinderProcess(); - const Handle(Interface_HGraph) aHGraph = WS->HGraph(); - if(aHGraph.IsNull()) + const Handle(Interface_HGraph) aHGraph = theWS->HGraph(); + if (aHGraph.IsNull()) return Standard_False; - Interface_Graph aGraph = WS->HGraph()->Graph(); - Handle(XCAFDoc_ShapeTool) ShTool = XCAFDoc_DocumentTool::ShapeTool( labels(1) ); - if(ShTool.IsNull() ) return Standard_False; - Handle(XCAFDoc_MaterialTool) MatTool = XCAFDoc_DocumentTool::MaterialTool( labels(1) ); - if(MatTool.IsNull() ) return Standard_False; - - STEPConstruct_DataMapOfAsciiStringTransient MapDRI,MapMRI; - TDF_LabelSequence TopLabels; - ShTool->GetShapes(TopLabels); - for(Standard_Integer i=1; i<=TopLabels.Length(); i++) { - TDF_Label ShL = TopLabels.Value(i); - Handle(TDataStd_TreeNode) Node; - if( ShL.FindAttribute(XCAFDoc::MaterialRefGUID(),Node) && Node->HasFather() ) { - // find PDS for current shape - TopoDS_Shape aShape = XCAFDoc_ShapeTool::GetShape(ShL); - TopLoc_Location Loc; - TColStd_SequenceOfTransient seqRI; - FindEntities( FP, aShape, Loc, seqRI ); - if(seqRI.Length()<=0) continue; - Handle(StepRepr_ProductDefinitionShape) PDS; - Handle(StepRepr_RepresentationContext) RC; - Handle(Standard_Transient) ent = seqRI.Value(1); - FindPDSforRI(aGraph,ent,PDS,RC); - if(PDS.IsNull()) continue; - Handle(StepBasic_ProductDefinition) aProdDef = - PDS->Definition().ProductDefinition(); - if(aProdDef.IsNull()) + Interface_Graph aGraph = theWS->HGraph()->Graph(); + + STEPConstruct_DataMapOfAsciiStringTransient aMapDRI, aMapMRI; + TDF_LabelSequence aTopLabels; + // Iterate on requested shapes collect Tools + for (TDF_LabelMap::Iterator aLabelIter(myRootLabels); + aLabelIter.More(); aLabelIter.Next()) + { + const TDF_Label& aLabel = aLabelIter.Value(); + Handle(XCAFDoc_ShapeTool) aShTool = XCAFDoc_DocumentTool::ShapeTool(aLabel); + TDF_LabelSequence aTopInterLabels; + aShTool->GetShapes(aTopInterLabels); + aTopLabels.Append(aTopInterLabels); + } + for (TDF_LabelSequence::Iterator aTopLIter(aTopLabels); + aTopLIter.More(); aTopLIter.Next()) + { + const TDF_Label& aShL = aTopLIter.Value(); + Handle(TDataStd_TreeNode) aNode; + if (!aShL.FindAttribute(XCAFDoc::MaterialRefGUID(), aNode) || !aNode->HasFather()) + { + continue; + } + // find PDS for current shape + TopoDS_Shape aShape = XCAFDoc_ShapeTool::GetShape(aShL); + TopLoc_Location aLocation; + TColStd_SequenceOfTransient aSeqRI; + FindEntities(aFP, aShape, aLocation, aSeqRI); + if (aSeqRI.Length() <= 0) continue; + Handle(StepRepr_ProductDefinitionShape) aPDS; + Handle(StepRepr_RepresentationContext) aRC; + Handle(Standard_Transient) anEnt = aSeqRI.Value(1); + FindPDSforRI(aGraph, anEnt, aPDS, aRC); + if (aPDS.IsNull()) + continue; + Handle(StepBasic_ProductDefinition) aProdDef = + aPDS->Definition().ProductDefinition(); + if (aProdDef.IsNull()) + continue; + // write material entities + TDF_Label aMatL = aNode->Father()->Label(); + Handle(TCollection_HAsciiString) aName; + Handle(TCollection_HAsciiString) aDescription; + Standard_Real aDensity; + Handle(TCollection_HAsciiString) aDensName; + Handle(TCollection_HAsciiString) aDensValType; + Handle(StepRepr_Representation) aRepDRI; + Handle(StepRepr_Representation) aRepMRI; + if (XCAFDoc_MaterialTool::GetMaterial(aMatL, aName, aDescription, aDensity, aDensName, aDensValType)) + { + if (aName->Length() == 0) continue; - // write material entities - TDF_Label MatL = Node->Father()->Label(); - Handle(TCollection_HAsciiString) aName; - Handle(TCollection_HAsciiString) aDescription; - Standard_Real aDensity; - Handle(TCollection_HAsciiString) aDensName; - Handle(TCollection_HAsciiString) aDensValType; - Handle(StepRepr_Representation) RepDRI; - Handle(StepRepr_Representation) RepMRI; - if(MatTool->GetMaterial(MatL,aName,aDescription,aDensity,aDensName,aDensValType)) { - if(aName->Length()==0) continue; - TCollection_AsciiString aKey(aName->ToCString()); - if(MapDRI.IsBound(aKey)) { - RepDRI = Handle(StepRepr_Representation)::DownCast(MapDRI.Find(aKey)); - if(MapMRI.IsBound(aKey)) { - RepMRI = Handle(StepRepr_Representation)::DownCast(MapMRI.Find(aKey)); - } - } - else { - // write DRI - Handle(StepRepr_DescriptiveRepresentationItem) DRI = new StepRepr_DescriptiveRepresentationItem; - DRI->Init(aName,aDescription); - Handle(StepRepr_HArray1OfRepresentationItem) HARI = new StepRepr_HArray1OfRepresentationItem(1,1); - HARI->SetValue(1,DRI); - RepDRI = new StepRepr_Representation(); - RepDRI->Init(new TCollection_HAsciiString("material name"),HARI,RC); - Model->AddWithRefs(RepDRI); - // write MRI - if( aDensity > 0 ) { - // mass - Handle(StepBasic_SiUnitAndMassUnit) SMU = new StepBasic_SiUnitAndMassUnit; - SMU->SetName(StepBasic_sunGram); - Handle(StepBasic_DerivedUnitElement) DUE1 = new StepBasic_DerivedUnitElement; - DUE1->Init(SMU,3.0); - // length - Handle(StepBasic_SiUnitAndLengthUnit) SLU = new StepBasic_SiUnitAndLengthUnit; - SLU->Init(Standard_True,StepBasic_spCenti,StepBasic_sunMetre); - Handle(StepBasic_DerivedUnitElement) DUE2 = new StepBasic_DerivedUnitElement; - DUE2->Init(SLU,2.0); - // other - Handle(StepBasic_HArray1OfDerivedUnitElement) HADUE = new StepBasic_HArray1OfDerivedUnitElement(1,2); - HADUE->SetValue(1,DUE1); - HADUE->SetValue(2,DUE2); - Handle(StepBasic_DerivedUnit) DU = new StepBasic_DerivedUnit; - DU->Init(HADUE); - Model->AddWithRefs(DU); - StepBasic_Unit aUnit; - aUnit.SetValue(DU); - Handle(StepBasic_MeasureValueMember) MVM = new StepBasic_MeasureValueMember; - MVM->SetName(aDensValType->ToCString()); - MVM->SetReal(aDensity); - Handle(StepRepr_MeasureRepresentationItem) MRI = new StepRepr_MeasureRepresentationItem; - MRI->Init(aDensName,MVM,aUnit); - HARI = new StepRepr_HArray1OfRepresentationItem(1,1); - HARI->SetValue(1,MRI); - RepMRI = new StepRepr_Representation(); - RepMRI->Init(new TCollection_HAsciiString("density"),HARI,RC); - Model->AddWithRefs(RepMRI); - } - //WriteNewMaterial(Model,aName,aDescription,aDensity,aDensName,aDensValType,RC,RepDRI,RepMRI); - MapDRI.Bind(aKey,RepDRI); - if ( !RepMRI.IsNull() ) MapMRI.Bind (aKey, RepMRI); + TCollection_AsciiString aKey(aName->ToCString()); + if (aMapDRI.IsBound(aKey)) + { + aRepDRI = Handle(StepRepr_Representation)::DownCast(aMapDRI.Find(aKey)); + if (aMapMRI.IsBound(aKey)) + { + aRepMRI = Handle(StepRepr_Representation)::DownCast(aMapMRI.Find(aKey)); } } - - if( !RepDRI.IsNull() ) + else { - StepRepr_CharacterizedDefinition CD1; - CD1.SetValue(aProdDef); - Handle(StepRepr_PropertyDefinition) PropD1 = new StepRepr_PropertyDefinition; - PropD1->Init(new TCollection_HAsciiString("material property"),Standard_True, - new TCollection_HAsciiString("material name"),CD1); - Model->AddWithRefs(PropD1); - StepRepr_RepresentedDefinition RD1; - RD1.SetValue(PropD1); - Handle(StepRepr_PropertyDefinitionRepresentation) PDR1 = - new StepRepr_PropertyDefinitionRepresentation; - PDR1->Init(RD1,RepDRI); - Model->AddWithRefs(PDR1); - - if( !RepMRI.IsNull() ) + // write DRI + Handle(StepRepr_DescriptiveRepresentationItem) aDRI = new StepRepr_DescriptiveRepresentationItem; + aDRI->Init(aName, aDescription); + Handle(StepRepr_HArray1OfRepresentationItem) aHARI = new StepRepr_HArray1OfRepresentationItem(1, 1); + aHARI->SetValue(1, aDRI); + aRepDRI = new StepRepr_Representation(); + aRepDRI->Init(new TCollection_HAsciiString("material name"), aHARI, aRC); + aModel->AddWithRefs(aRepDRI); + // write MRI + if (aDensity > 0) { - StepRepr_CharacterizedDefinition CD2; - CD2.SetValue (aProdDef); - Handle (StepRepr_PropertyDefinition) PropD2 = new StepRepr_PropertyDefinition; - PropD2->Init (new TCollection_HAsciiString ("material property"), Standard_True, - new TCollection_HAsciiString ("density"), CD2); - Model->AddWithRefs (PropD2); - StepRepr_RepresentedDefinition RD2; - RD2.SetValue (PropD2); - Handle (StepRepr_PropertyDefinitionRepresentation) PDR2 = - new StepRepr_PropertyDefinitionRepresentation; - PDR2->Init (RD2, RepMRI); - Model->AddWithRefs (PDR2); + // mass + Handle(StepBasic_SiUnitAndMassUnit) aSMU = new StepBasic_SiUnitAndMassUnit; + aSMU->SetName(StepBasic_sunGram); + Handle(StepBasic_DerivedUnitElement) aDUE1 = new StepBasic_DerivedUnitElement; + aDUE1->Init(aSMU, 3.0); + // length + Handle(StepBasic_SiUnitAndLengthUnit) aSLU = new StepBasic_SiUnitAndLengthUnit; + aSLU->Init(Standard_True, StepBasic_spCenti, StepBasic_sunMetre); + Handle(StepBasic_DerivedUnitElement) aDUE2 = new StepBasic_DerivedUnitElement; + aDUE2->Init(aSLU, 2.0); + // other + Handle(StepBasic_HArray1OfDerivedUnitElement) aHADUE = new StepBasic_HArray1OfDerivedUnitElement(1, 2); + aHADUE->SetValue(1, aDUE1); + aHADUE->SetValue(2, aDUE2); + Handle(StepBasic_DerivedUnit) aDU = new StepBasic_DerivedUnit; + aDU->Init(aHADUE); + aModel->AddWithRefs(aDU); + StepBasic_Unit aUnit; + aUnit.SetValue(aDU); + Handle(StepBasic_MeasureValueMember) aMVM = new StepBasic_MeasureValueMember; + aMVM->SetName(aDensValType->ToCString()); + aMVM->SetReal(aDensity); + Handle(StepRepr_MeasureRepresentationItem) aMRI = new StepRepr_MeasureRepresentationItem; + aMRI->Init(aDensName, aMVM, aUnit); + aHARI = new StepRepr_HArray1OfRepresentationItem(1, 1); + aHARI->SetValue(1, aMRI); + aRepMRI = new StepRepr_Representation(); + aRepMRI->Init(new TCollection_HAsciiString("density"), aHARI, aRC); + aModel->AddWithRefs(aRepMRI); } + //WriteNewMaterial(Model,aName,aDescription,aDensity,aDensName,aDensValType,RC,RepDRI,RepMRI); + aMapDRI.Bind(aKey, aRepDRI); + if (!aRepMRI.IsNull()) + aMapMRI.Bind(aKey, aRepMRI); + } + } + + if (!aRepDRI.IsNull()) + { + StepRepr_CharacterizedDefinition aCD1; + aCD1.SetValue(aProdDef); + Handle(StepRepr_PropertyDefinition) aPropD1 = new StepRepr_PropertyDefinition; + aPropD1->Init(new TCollection_HAsciiString("material property"), Standard_True, + new TCollection_HAsciiString("material name"), aCD1); + aModel->AddWithRefs(aPropD1); + StepRepr_RepresentedDefinition aRD1; + aRD1.SetValue(aPropD1); + Handle(StepRepr_PropertyDefinitionRepresentation) aPDR1 = + new StepRepr_PropertyDefinitionRepresentation; + aPDR1->Init(aRD1, aRepDRI); + aModel->AddWithRefs(aPDR1); + + if (!aRepMRI.IsNull()) + { + StepRepr_CharacterizedDefinition aCD2; + aCD2.SetValue(aProdDef); + Handle(StepRepr_PropertyDefinition) aPropD2 = new StepRepr_PropertyDefinition; + aPropD2->Init(new TCollection_HAsciiString("material property"), Standard_True, + new TCollection_HAsciiString("density"), aCD2); + aModel->AddWithRefs(aPropD2); + StepRepr_RepresentedDefinition aRD2; + aRD2.SetValue(aPropD2); + Handle(StepRepr_PropertyDefinitionRepresentation) aPDR2 = + new StepRepr_PropertyDefinitionRepresentation; + aPDR2->Init(aRD2, aRepMRI); + aModel->AddWithRefs(aPDR2); } } } return Standard_True; } - - -//======================================================================= -//function : SetColorMode -//purpose : -//======================================================================= - -void STEPCAFControl_Writer::SetColorMode (const Standard_Boolean colormode) -{ - myColorMode = colormode; -} - - -//======================================================================= -//function : GetColorMode -//purpose : -//======================================================================= - -Standard_Boolean STEPCAFControl_Writer::GetColorMode () const -{ - return myColorMode; -} - - -//======================================================================= -//function : SetNameMode -//purpose : -//======================================================================= - -void STEPCAFControl_Writer::SetNameMode (const Standard_Boolean namemode) -{ - myNameMode = namemode; -} - - -//======================================================================= -//function : GetNameMode -//purpose : -//======================================================================= - -Standard_Boolean STEPCAFControl_Writer::GetNameMode () const -{ - return myNameMode; -} - - -//======================================================================= -//function : SetLayerMode -//purpose : -//======================================================================= - -void STEPCAFControl_Writer::SetLayerMode (const Standard_Boolean layermode) -{ - myLayerMode = layermode; -} - - -//======================================================================= -//function : GetLayerMode -//purpose : -//======================================================================= - -Standard_Boolean STEPCAFControl_Writer::GetLayerMode () const -{ - return myLayerMode; -} - - -//======================================================================= -//function : SetPropsMode -//purpose : -//======================================================================= - -void STEPCAFControl_Writer::SetPropsMode (const Standard_Boolean propsmode) -{ - myPropsMode = propsmode; -} - - -//======================================================================= -//function : GetPropsMode -//purpose : -//======================================================================= - -Standard_Boolean STEPCAFControl_Writer::GetPropsMode () const -{ - return myPropsMode; -} - - -//======================================================================= -//function : SetSHUOMode -//purpose : -//======================================================================= - -void STEPCAFControl_Writer::SetSHUOMode (const Standard_Boolean mode) -{ - mySHUOMode = mode; -} - - -//======================================================================= -//function : GetSHUOMode -//purpose : -//======================================================================= - -Standard_Boolean STEPCAFControl_Writer::GetSHUOMode () const -{ - return mySHUOMode; -} - - -//======================================================================= -//function : SetDimTolMode -//purpose : -//======================================================================= - -void STEPCAFControl_Writer::SetDimTolMode(const Standard_Boolean dimtolmode) -{ - myGDTMode = dimtolmode; -} - - -//======================================================================= -//function : GetDimTolMode -//purpose : -//======================================================================= - -Standard_Boolean STEPCAFControl_Writer::GetDimTolMode() const -{ - return myGDTMode; -} - - -//======================================================================= -//function : SetMaterialMode -//purpose : -//======================================================================= - -void STEPCAFControl_Writer::SetMaterialMode(const Standard_Boolean matmode) -{ - myMatMode = matmode; -} - - -//======================================================================= -//function : GetMaterialMode -//purpose : -//======================================================================= - -Standard_Boolean STEPCAFControl_Writer::GetMaterialMode() const -{ - return myMatMode; -} diff --git a/src/STEPCAFControl/STEPCAFControl_Writer.hxx b/src/STEPCAFControl/STEPCAFControl_Writer.hxx index ca7f4b5340..c38d32a2f4 100644 --- a/src/STEPCAFControl/STEPCAFControl_Writer.hxx +++ b/src/STEPCAFControl/STEPCAFControl_Writer.hxx @@ -31,6 +31,7 @@ #include #include #include +#include #include class XSControl_WorkSession; @@ -44,219 +45,234 @@ class TopoDS_Shape; //! colors and part names //! //! Also supports multifile writing -class STEPCAFControl_Writer +class STEPCAFControl_Writer { + DEFINE_STANDARD_ALLOC public: - DEFINE_STANDARD_ALLOC - - //! Creates a writer with an empty //! STEP model and sets ColorMode, LayerMode, NameMode and //! PropsMode to Standard_True. Standard_EXPORT STEPCAFControl_Writer(); - + //! Creates a reader tool and attaches it to an already existing Session //! Clears the session if it was not yet set for STEP //! Clears the internal data structures - Standard_EXPORT STEPCAFControl_Writer(const Handle(XSControl_WorkSession)& WS, const Standard_Boolean scratch = Standard_True); - + Standard_EXPORT STEPCAFControl_Writer(const Handle(XSControl_WorkSession)& theWS, + const Standard_Boolean theScratch = Standard_True); + //! Clears the internal data structures and attaches to a new session //! Clears the session if it was not yet set for STEP - Standard_EXPORT void Init (const Handle(XSControl_WorkSession)& WS, const Standard_Boolean scratch = Standard_True); - + Standard_EXPORT void Init(const Handle(XSControl_WorkSession)& theWS, + const Standard_Boolean theScratch = Standard_True); + //! Writes all the produced models into file //! In case of multimodel with extern references, //! filename will be a name of root file, all other files //! have names of corresponding parts //! Provided for use like single-file writer - Standard_EXPORT IFSelect_ReturnStatus Write (const Standard_CString theFileName); + Standard_EXPORT IFSelect_ReturnStatus Write(const Standard_CString theFileName); //! Writes all the produced models into the stream. //! Provided for use like single-file writer - Standard_EXPORT IFSelect_ReturnStatus WriteStream (std::ostream& theStream); - + Standard_EXPORT IFSelect_ReturnStatus WriteStream(std::ostream& theStream); + //! Transfers a document (or single label) to a STEP model //! The mode of translation of shape is AsIs //! If multi is not null pointer, it switches to multifile //! mode (with external refs), and string pointed by //! gives prefix for names of extern files (can be empty string) //! Returns True if translation is OK - Standard_EXPORT Standard_Boolean Transfer (const Handle(TDocStd_Document)& doc, - const STEPControl_StepModelType mode = STEPControl_AsIs, - const Standard_CString multi = 0, - const Message_ProgressRange& theProgress = Message_ProgressRange()); - + Standard_EXPORT Standard_Boolean Transfer(const Handle(TDocStd_Document)& theDoc, + const STEPControl_StepModelType theMode = STEPControl_AsIs, + const Standard_CString theIsMulti = 0, + const Message_ProgressRange& theProgress = Message_ProgressRange()); + //! Method to transfer part of the document specified by label - Standard_EXPORT Standard_Boolean Transfer (const TDF_Label& L, - const STEPControl_StepModelType mode = STEPControl_AsIs, - const Standard_CString multi = 0, - const Message_ProgressRange& theProgress = Message_ProgressRange()); + Standard_EXPORT Standard_Boolean Transfer(const TDF_Label& theLabel, + const STEPControl_StepModelType theMode = STEPControl_AsIs, + const Standard_CString theIsMulti = 0, + const Message_ProgressRange& theProgress = Message_ProgressRange()); //! Mehod to writing sequence of root assemblies or part of the file specified by use by one label - Standard_EXPORT Standard_Boolean Transfer (const TDF_LabelSequence& L, - const STEPControl_StepModelType mode = STEPControl_AsIs, - const Standard_CString multi = 0, - const Message_ProgressRange& theProgress = Message_ProgressRange()); - - Standard_EXPORT Standard_Boolean Perform (const Handle(TDocStd_Document)& doc, - const TCollection_AsciiString& filename, + Standard_EXPORT Standard_Boolean Transfer(const TDF_LabelSequence& theLabelSeq, + const STEPControl_StepModelType theMode = STEPControl_AsIs, + const Standard_CString theIsMulti = 0, const Message_ProgressRange& theProgress = Message_ProgressRange()); - + + Standard_EXPORT Standard_Boolean Perform(const Handle(TDocStd_Document)& theDoc, + const TCollection_AsciiString& theFileName, + const Message_ProgressRange& theProgress = Message_ProgressRange()); + //! Transfers a document and writes it to a STEP file //! Returns True if translation is OK - Standard_EXPORT Standard_Boolean Perform (const Handle(TDocStd_Document)& doc, - const Standard_CString filename, - const Message_ProgressRange& theProgress = Message_ProgressRange()); - + Standard_EXPORT Standard_Boolean Perform(const Handle(TDocStd_Document)& theDoc, + const Standard_CString theFileName, + const Message_ProgressRange& theProgress = Message_ProgressRange()); + //! Returns data on external files //! Returns Null handle if no external files are read - Standard_EXPORT const NCollection_DataMap& ExternFiles() const; - + const NCollection_DataMap& ExternFiles() const { return myFiles; }; + //! Returns data on external file by its original label //! Returns False if no external file with given name is read - Standard_EXPORT Standard_Boolean ExternFile (const TDF_Label& L, Handle(STEPCAFControl_ExternFile)& ef) const; - + Standard_EXPORT Standard_Boolean ExternFile(const TDF_Label& theLabel, + Handle(STEPCAFControl_ExternFile)& theExtFile) const; + //! Returns data on external file by its name //! Returns False if no external file with given name is read - Standard_EXPORT Standard_Boolean ExternFile (const Standard_CString name, Handle(STEPCAFControl_ExternFile)& ef) const; - + Standard_EXPORT Standard_Boolean ExternFile(const Standard_CString theName, + Handle(STEPCAFControl_ExternFile)& theExtFile) const; + //! Returns basic reader for root file - Standard_EXPORT STEPControl_Writer& ChangeWriter(); - + STEPControl_Writer& ChangeWriter() { return myWriter; } + //! Returns basic reader as const - Standard_EXPORT const STEPControl_Writer& Writer() const; - + const STEPControl_Writer& Writer() const { return myWriter; } + //! Set ColorMode for indicate write Colors or not. - Standard_EXPORT void SetColorMode (const Standard_Boolean colormode); - - Standard_EXPORT Standard_Boolean GetColorMode() const; - + void SetColorMode(const Standard_Boolean theColorMode) { myColorMode = theColorMode; } + + Standard_Boolean GetColorMode() const { return myColorMode; } + //! Set NameMode for indicate write Name or not. - Standard_EXPORT void SetNameMode (const Standard_Boolean namemode); - - Standard_EXPORT Standard_Boolean GetNameMode() const; - + void SetNameMode(const Standard_Boolean theNameMode) { myNameMode = theNameMode; } + + Standard_Boolean GetNameMode() const { return myNameMode; } + //! Set LayerMode for indicate write Layers or not. - Standard_EXPORT void SetLayerMode (const Standard_Boolean layermode); - - Standard_EXPORT Standard_Boolean GetLayerMode() const; - + void SetLayerMode(const Standard_Boolean theLayerMode) { myLayerMode = theLayerMode; } + + Standard_Boolean GetLayerMode() const { return myLayerMode; } + //! PropsMode for indicate write Validation properties or not. - Standard_EXPORT void SetPropsMode (const Standard_Boolean propsmode); - - Standard_EXPORT Standard_Boolean GetPropsMode() const; - + void SetPropsMode(const Standard_Boolean thePropsMode) { myPropsMode = thePropsMode; } + + Standard_Boolean GetPropsMode() const { return myPropsMode; } + //! Set SHUO mode for indicate write SHUO or not. - Standard_EXPORT void SetSHUOMode (const Standard_Boolean shuomode); - - Standard_EXPORT Standard_Boolean GetSHUOMode() const; - + void SetSHUOMode(const Standard_Boolean theSHUOMode) { mySHUOMode = theSHUOMode; } + + Standard_Boolean GetSHUOMode() const { return mySHUOMode; } + //! Set dimtolmode for indicate write D>s or not. - Standard_EXPORT void SetDimTolMode (const Standard_Boolean dimtolmode); - - Standard_EXPORT Standard_Boolean GetDimTolMode() const; - + void SetDimTolMode(const Standard_Boolean theDimTolMode) { myGDTMode = theDimTolMode; }; + + Standard_Boolean GetDimTolMode() const { return myGDTMode; } + //! Set dimtolmode for indicate write D>s or not. - Standard_EXPORT void SetMaterialMode (const Standard_Boolean matmode); - - Standard_EXPORT Standard_Boolean GetMaterialMode() const; + void SetMaterialMode(const Standard_Boolean theMaterialMode) { myMatMode = theMaterialMode; } + + Standard_Boolean GetMaterialMode() const { return myMatMode; } protected: - + //! Transfers labels to a STEP model //! Returns True if translation is OK - //! isExternFile setting from TransferExternFiles method - Standard_EXPORT Standard_Boolean Transfer (STEPControl_Writer& wr, - const TDF_LabelSequence& labels, - const STEPControl_StepModelType mode = STEPControl_AsIs, - const Standard_CString multi = 0, - const Standard_Boolean isExternFile = Standard_False, - const Message_ProgressRange& theProgress = Message_ProgressRange()) ; - + //! isExternFile setting from transferExternFiles method + Standard_Boolean transfer(STEPControl_Writer& theWriter, + const TDF_LabelSequence& theLabels, + const STEPControl_StepModelType theMode = STEPControl_AsIs, + const Standard_CString theIsMulti = 0, + const Standard_Boolean isExternFile = Standard_False, + const Message_ProgressRange& theProgress = Message_ProgressRange()); + //! Parses assembly structure of label L, writes all the simple //! shapes each to its own file named by name of its label plus //! prefix //! Returns shape representing that assembly structure //! in the form of nested empty compounds (and a sequence of //! labels which are newly written nodes of this assembly) - Standard_EXPORT TopoDS_Shape TransferExternFiles (const TDF_Label& L, - const STEPControl_StepModelType mode, - TDF_LabelSequence& Lseq, - const Standard_CString prefix = "", - const Message_ProgressRange& theProgress = Message_ProgressRange()); - + TopoDS_Shape transferExternFiles(const TDF_Label& theLabel, + const STEPControl_StepModelType theMode, + TDF_LabelSequence& theLabelSeq, + const Standard_CString thePrefix = "", + const Message_ProgressRange& theProgress = Message_ProgressRange()); + //! Write external references to STEP - Standard_EXPORT Standard_Boolean WriteExternRefs (const Handle(XSControl_WorkSession)& WS, const TDF_LabelSequence& labels) const; - + Standard_Boolean writeExternRefs(const Handle(XSControl_WorkSession)& theWS, + const TDF_LabelSequence& theLabels) const; + //! Write colors assigned to specified labels, to STEP model - Standard_EXPORT Standard_Boolean WriteColors (const Handle(XSControl_WorkSession)& WS, const TDF_LabelSequence& labels); - + Standard_Boolean writeColors(const Handle(XSControl_WorkSession)& theWS, + const TDF_LabelSequence& theLabels); + //! Write names assigned to specified labels, to STEP model - Standard_EXPORT Standard_Boolean WriteNames (const Handle(XSControl_WorkSession)& WS, const TDF_LabelSequence& labels) const; - + Standard_Boolean writeNames(const Handle(XSControl_WorkSession)& theWS, + const TDF_LabelSequence& theLabels) const; + //! Write D>s assigned to specified labels, to STEP model - Standard_EXPORT Standard_Boolean WriteDGTs (const Handle(XSControl_WorkSession)& WS, const TDF_LabelSequence& labels) const; - - //! Write D>s assigned to specified labels, to STEP model, according AP242 - Standard_EXPORT Standard_Boolean WriteDGTsAP242 (const Handle(XSControl_WorkSession)& WS, const TDF_LabelSequence& labels); + Standard_Boolean writeDGTs(const Handle(XSControl_WorkSession)& theWS, + const TDF_LabelSequence& theLabels) const; + + //! Write D>s assigned to specified labels, to STEP model, according AP242 + Standard_Boolean writeDGTsAP242(const Handle(XSControl_WorkSession)& theWS, + const TDF_LabelSequence& theLabels); //! Write materials assigned to specified labels, to STEP model - Standard_EXPORT Standard_Boolean WriteMaterials (const Handle(XSControl_WorkSession)& WS, const TDF_LabelSequence& labels) const; - + Standard_Boolean writeMaterials(const Handle(XSControl_WorkSession)& theWS, + const TDF_LabelSequence& theLabels) const; + //! Write validation properties assigned to specified labels, //! to STEP model - Standard_EXPORT Standard_Boolean WriteValProps (const Handle(XSControl_WorkSession)& WS, const TDF_LabelSequence& labels, const Standard_CString multi) const; - + Standard_Boolean writeValProps(const Handle(XSControl_WorkSession)& theWS, + const TDF_LabelSequence& theLabels, + const Standard_CString theIsMulti) const; + //! Write layers assigned to specified labels, to STEP model - Standard_EXPORT Standard_Boolean WriteLayers (const Handle(XSControl_WorkSession)& WS, const TDF_LabelSequence& labels) const; - + Standard_Boolean writeLayers(const Handle(XSControl_WorkSession)& theWS, + const TDF_LabelSequence& theLabels) const; + //! Write SHUO assigned to specified component, to STEP model - Standard_EXPORT Standard_Boolean WriteSHUOs (const Handle(XSControl_WorkSession)& WS, const TDF_LabelSequence& labels); + Standard_Boolean writeSHUOs(const Handle(XSControl_WorkSession)& theWS, + const TDF_LabelSequence& theLabels); //! Finds length units located in root of label //! If it exists, initializes local length unit from it //! Else initializes according to Cascade length unit - Standard_EXPORT void prepareUnit(const TDF_Label& theLabel, - const Handle(StepData_StepModel)& theModel); + void prepareUnit(const TDF_Label& theLabel, + const Handle(StepData_StepModel)& theModel); -private: + Handle(StepRepr_ShapeAspect) writeShapeAspect(const Handle(XSControl_WorkSession)& theWS, + const TDF_Label theLabel, + const TopoDS_Shape theShape, + Handle(StepRepr_RepresentationContext)& theRC, + Handle(StepAP242_GeometricItemSpecificUsage)& theGISU); - Standard_EXPORT Handle(StepRepr_ShapeAspect) WriteShapeAspect(const Handle(XSControl_WorkSession) &WS, - const TDF_Label theLabel, const TopoDS_Shape theShape, Handle(StepRepr_RepresentationContext)& theRC, - Handle(StepAP242_GeometricItemSpecificUsage)& theGISU); - - Standard_EXPORT void WritePresentation(const Handle(XSControl_WorkSession)& WS, - const TopoDS_Shape& thePresentation, - const Handle(TCollection_HAsciiString)& thePrsName, - const Standard_Boolean hasSemantic, - const Standard_Boolean hasPlane, - const gp_Ax2& theAnnotationPlane, - const gp_Pnt& theTextPosition, - const Handle(Standard_Transient) theDimension); - - Standard_EXPORT Handle(StepDimTol_Datum) WriteDatumAP242(const Handle(XSControl_WorkSession)& WS, - const TDF_LabelSequence& theShapeL, - const TDF_Label& theDatumL, - const Standard_Boolean isFirstDTarget, - const Handle(StepDimTol_Datum) theWrittenDatum); - - Standard_EXPORT void WriteToleranceZone(const Handle(XSControl_WorkSession) &WS, const Handle(XCAFDimTolObjects_GeomToleranceObject)& theObject, - const Handle(StepDimTol_GeometricTolerance)& theEntity, const Handle(StepRepr_RepresentationContext)& theRC); - - Standard_EXPORT void WriteGeomTolerance(const Handle(XSControl_WorkSession)& WS, - const TDF_LabelSequence& theShapeSeqL, - const TDF_Label& theGeomTolL, - const Handle(StepDimTol_HArray1OfDatumSystemOrReference)& theDatumSystem, - const Handle(StepRepr_RepresentationContext)& theRC); + void writePresentation(const Handle(XSControl_WorkSession)& theWS, + const TopoDS_Shape& thePresentation, + const Handle(TCollection_HAsciiString)& thePrsName, + const Standard_Boolean theHasSemantic, + const Standard_Boolean theHasPlane, + const gp_Ax2& theAnnotationPlane, + const gp_Pnt& theTextPosition, + const Handle(Standard_Transient) theDimension); -private: + Handle(StepDimTol_Datum) writeDatumAP242(const Handle(XSControl_WorkSession)& theWS, + const TDF_LabelSequence& theShapeL, + const TDF_Label& theDatumL, + const Standard_Boolean isFirstDTarget, + const Handle(StepDimTol_Datum) theWrittenDatum); + void writeToleranceZone(const Handle(XSControl_WorkSession)& theWS, + const Handle(XCAFDimTolObjects_GeomToleranceObject)& theObject, + const Handle(StepDimTol_GeometricTolerance)& theEntity, + const Handle(StepRepr_RepresentationContext)& theRC); + + void writeGeomTolerance(const Handle(XSControl_WorkSession)& theWS, + const TDF_LabelSequence& theShapeSeqL, + const TDF_Label& theGeomTolL, + const Handle(StepDimTol_HArray1OfDatumSystemOrReference)& theDatumSystem, + const Handle(StepRepr_RepresentationContext)& theRC); + +private: STEPControl_Writer myWriter; NCollection_DataMap myFiles; + TDF_LabelMap myRootLabels; STEPCAFControl_DataMapOfLabelShape myLabels; STEPCAFControl_DataMapOfLabelExternFile myLabEF; + STEPCAFControl_DataMapOfLabelShape myPureRefLabels; Standard_Boolean myColorMode; Standard_Boolean myNameMode; Standard_Boolean myLayerMode; @@ -272,7 +288,4 @@ private: }; - - - #endif // _STEPCAFControl_Writer_HeaderFile diff --git a/src/XCAFDoc/XCAFDoc_ColorTool.cxx b/src/XCAFDoc/XCAFDoc_ColorTool.cxx index 42e924c171..7cd379f129 100644 --- a/src/XCAFDoc/XCAFDoc_ColorTool.cxx +++ b/src/XCAFDoc/XCAFDoc_ColorTool.cxx @@ -89,7 +89,7 @@ Standard_Boolean XCAFDoc_ColorTool::IsColor (const TDF_Label& lab) const //======================================================================= Standard_Boolean XCAFDoc_ColorTool::GetColor (const TDF_Label& lab, - Quantity_Color& col) const + Quantity_Color& col) { Quantity_ColorRGBA aCol; Standard_Boolean isDone = GetColor(lab, aCol); @@ -104,10 +104,8 @@ Standard_Boolean XCAFDoc_ColorTool::GetColor (const TDF_Label& lab, //======================================================================= Standard_Boolean XCAFDoc_ColorTool::GetColor(const TDF_Label& lab, - Quantity_ColorRGBA& col) const + Quantity_ColorRGBA& col) { - if (lab.Father() != Label()) return Standard_False; - Handle(XCAFDoc_Color) ColorAttribute; if (!lab.FindAttribute(XCAFDoc_Color::GetID(), ColorAttribute)) return Standard_False; @@ -514,7 +512,7 @@ XCAFDoc_ColorTool::XCAFDoc_ColorTool() //purpose : //======================================================================= -Standard_Boolean XCAFDoc_ColorTool::IsVisible (const TDF_Label& L) const +Standard_Boolean XCAFDoc_ColorTool::IsVisible (const TDF_Label& L) { Handle(TDataStd_UAttribute) aUAttr; return (!L.FindAttribute(XCAFDoc::InvisibleGUID(), aUAttr)); diff --git a/src/XCAFDoc/XCAFDoc_ColorTool.hxx b/src/XCAFDoc/XCAFDoc_ColorTool.hxx index b5222d912d..13270cec93 100644 --- a/src/XCAFDoc/XCAFDoc_ColorTool.hxx +++ b/src/XCAFDoc/XCAFDoc_ColorTool.hxx @@ -72,12 +72,12 @@ public: //! Returns color defined by label lab //! Returns False if the label is not in colortable //! or does not define a color - Standard_EXPORT Standard_Boolean GetColor (const TDF_Label& lab, Quantity_Color& col) const; + Standard_EXPORT static Standard_Boolean GetColor (const TDF_Label& lab, Quantity_Color& col); //! Returns color defined by label lab //! Returns False if the label is not in colortable //! or does not define a color - Standard_EXPORT Standard_Boolean GetColor(const TDF_Label& lab, Quantity_ColorRGBA& col) const; + Standard_EXPORT static Standard_Boolean GetColor(const TDF_Label& lab, Quantity_ColorRGBA& col); //! Finds a color definition in a colortable and returns //! its label if found @@ -150,11 +150,11 @@ public: //! Returns color assigned to as //! Returns False if no such color is assigned - Standard_EXPORT Standard_Boolean GetColor (const TDF_Label& L, const XCAFDoc_ColorType type, Quantity_Color& color); + Standard_EXPORT static Standard_Boolean GetColor (const TDF_Label& L, const XCAFDoc_ColorType type, Quantity_Color& color); //! Returns color assigned to as //! Returns False if no such color is assigned - Standard_EXPORT Standard_Boolean GetColor(const TDF_Label& L, const XCAFDoc_ColorType type, Quantity_ColorRGBA& color); + Standard_EXPORT static Standard_Boolean GetColor(const TDF_Label& L, const XCAFDoc_ColorType type, Quantity_ColorRGBA& color); //! Sets a link with GUID defined by (see //! XCAFDoc::ColorRefGUID()) from label to color @@ -198,7 +198,7 @@ public: Standard_EXPORT Standard_Boolean GetColor(const TopoDS_Shape& S, const XCAFDoc_ColorType type, Quantity_ColorRGBA& color); //! Return TRUE if object on this label is visible, FALSE if invisible. - Standard_EXPORT Standard_Boolean IsVisible (const TDF_Label& L) const; + Standard_EXPORT static Standard_Boolean IsVisible (const TDF_Label& L); //! Set the visibility of object on label. Do nothing if there no any object. //! Set UAttribute with corresponding GUID. diff --git a/src/XCAFDoc/XCAFDoc_DimTolTool.cxx b/src/XCAFDoc/XCAFDoc_DimTolTool.cxx index 3d54642338..b396f408dd 100644 --- a/src/XCAFDoc/XCAFDoc_DimTolTool.cxx +++ b/src/XCAFDoc/XCAFDoc_DimTolTool.cxx @@ -503,7 +503,7 @@ TDF_Label XCAFDoc_DimTolTool::SetDimTol(const TDF_Label& L, Standard_Boolean XCAFDoc_DimTolTool::GetRefShapeLabel(const TDF_Label& theL, TDF_LabelSequence& theShapeLFirst, - TDF_LabelSequence& theShapeLSecond) const + TDF_LabelSequence& theShapeLSecond) { theShapeLFirst.Clear(); theShapeLSecond.Clear(); @@ -855,7 +855,7 @@ Standard_Boolean XCAFDoc_DimTolTool::GetDatum(const TDF_Label& theDatumL, //======================================================================= Standard_Boolean XCAFDoc_DimTolTool::GetDatumOfTolerLabels(const TDF_Label& theDimTolL, - TDF_LabelSequence& theDatums) const + TDF_LabelSequence& theDatums) { Handle(XCAFDoc_GraphNode) aNode; if( !theDimTolL.FindAttribute(XCAFDoc::DatumTolRefGUID(),aNode) ) @@ -874,7 +874,7 @@ Standard_Boolean XCAFDoc_DimTolTool::GetDatumOfTolerLabels(const TDF_Label& theD //======================================================================= Standard_Boolean XCAFDoc_DimTolTool::GetDatumWithObjectOfTolerLabels(const TDF_Label& theDimTolL, - TDF_LabelSequence& theDatums) const + TDF_LabelSequence& theDatums) { Handle(XCAFDoc_GraphNode) aNode; if( !theDimTolL.FindAttribute(XCAFDoc::DatumTolRefGUID(),aNode) ) diff --git a/src/XCAFDoc/XCAFDoc_DimTolTool.hxx b/src/XCAFDoc/XCAFDoc_DimTolTool.hxx index 1282719f1c..78380f0853 100644 --- a/src/XCAFDoc/XCAFDoc_DimTolTool.hxx +++ b/src/XCAFDoc/XCAFDoc_DimTolTool.hxx @@ -155,9 +155,9 @@ public: //! Gets all shape labels referred by theL label of the GD&T table. //! Returns False if there are no shape labels added to the sequences. - Standard_EXPORT Standard_Boolean GetRefShapeLabel (const TDF_Label& theL, - TDF_LabelSequence& theShapeLFirst, - TDF_LabelSequence& theShapeLSecond) const; + Standard_EXPORT static Standard_Boolean GetRefShapeLabel (const TDF_Label& theL, + TDF_LabelSequence& theShapeLFirst, + TDF_LabelSequence& theShapeLSecond); //! Returns dimension tolerance assigned to theDimTolL label. //! Returns False if no such dimension tolerance is assigned. @@ -215,12 +215,12 @@ public: Handle(TCollection_HAsciiString)& theIdentification) const; //! Returns all Datum labels defined for theDimTolL label. - Standard_EXPORT Standard_Boolean GetDatumOfTolerLabels (const TDF_Label& theDimTolL, - TDF_LabelSequence& theDatums) const; + Standard_EXPORT static Standard_Boolean GetDatumOfTolerLabels (const TDF_Label& theDimTolL, + TDF_LabelSequence& theDatums); //! Returns all Datum labels with XCAFDimTolObjects_DatumObject defined for label theDimTolL. - Standard_EXPORT Standard_Boolean GetDatumWithObjectOfTolerLabels (const TDF_Label& theDimTolL, - TDF_LabelSequence& theDatums) const; + Standard_EXPORT static Standard_Boolean GetDatumWithObjectOfTolerLabels (const TDF_Label& theDimTolL, + TDF_LabelSequence& theDatums); //! Returns all GeomToleranses labels defined for theDatumL label. Standard_EXPORT Standard_Boolean GetTolerOfDatumLabels (const TDF_Label& theDatumL, diff --git a/src/XCAFDoc/XCAFDoc_LayerTool.cxx b/src/XCAFDoc/XCAFDoc_LayerTool.cxx index 42917fe4e9..52b781c546 100644 --- a/src/XCAFDoc/XCAFDoc_LayerTool.cxx +++ b/src/XCAFDoc/XCAFDoc_LayerTool.cxx @@ -416,20 +416,20 @@ Handle(TColStd_HSequenceOfExtendedString) XCAFDoc_LayerTool::GetLayers(const TDF //function : GetShapesOfLayer //purpose : //======================================================================= - -void XCAFDoc_LayerTool::GetShapesOfLayer(const TDF_Label& layerL, - TDF_LabelSequence& ShLabels) const +void XCAFDoc_LayerTool::GetShapesOfLayer(const TDF_Label& theLayerL, + TDF_LabelSequence& theShLabels) { - ShLabels.Clear(); + theShLabels.Clear(); Handle(XCAFDoc_GraphNode) aGNode; - if ( layerL.FindAttribute( XCAFDoc::LayerRefGUID(), aGNode) ) { - for (Standard_Integer i = 1; i <= aGNode->NbChildren(); i++) { - ShLabels.Append( aGNode->GetChild(i)->Label() ); + if (theLayerL.FindAttribute(XCAFDoc::LayerRefGUID(), aGNode)) + { + for (Standard_Integer aChildInd = 1; aChildInd <= aGNode->NbChildren(); aChildInd++) + { + theShLabels.Append(aGNode->GetChild(aChildInd)->Label()); } } } - //======================================================================= //function : IsVisible //purpose : diff --git a/src/XCAFDoc/XCAFDoc_LayerTool.hxx b/src/XCAFDoc/XCAFDoc_LayerTool.hxx index 386cf9c204..086465a7df 100644 --- a/src/XCAFDoc/XCAFDoc_LayerTool.hxx +++ b/src/XCAFDoc/XCAFDoc_LayerTool.hxx @@ -135,7 +135,7 @@ public: Standard_EXPORT Handle(TColStd_HSequenceOfExtendedString) GetLayers (const TDF_Label& L); //! Return sequanese of shape labels that assigned with layers to . - Standard_EXPORT void GetShapesOfLayer (const TDF_Label& layerL, TDF_LabelSequence& ShLabels) const; + Standard_EXPORT static void GetShapesOfLayer (const TDF_Label& theLayerL, TDF_LabelSequence& theShLabels); //! Return TRUE if layer is visible, FALSE if invisible. Standard_EXPORT Standard_Boolean IsVisible (const TDF_Label& layerL) const; diff --git a/src/XCAFDoc/XCAFDoc_MaterialTool.cxx b/src/XCAFDoc/XCAFDoc_MaterialTool.cxx index 2950189d86..74e8693bc2 100644 --- a/src/XCAFDoc/XCAFDoc_MaterialTool.cxx +++ b/src/XCAFDoc/XCAFDoc_MaterialTool.cxx @@ -184,7 +184,7 @@ Standard_Boolean XCAFDoc_MaterialTool::GetMaterial(const TDF_Label& MatL, Handle(TCollection_HAsciiString)& aDescription, Standard_Real& aDensity, Handle(TCollection_HAsciiString)& aDensName, - Handle(TCollection_HAsciiString)& aDensValType) const + Handle(TCollection_HAsciiString)& aDensValType) { Handle(XCAFDoc_Material) MatAttr; if(!MatL.FindAttribute(XCAFDoc_Material::GetID(),MatAttr)) { diff --git a/src/XCAFDoc/XCAFDoc_MaterialTool.hxx b/src/XCAFDoc/XCAFDoc_MaterialTool.hxx index d9e12b9aff..069b3fc5ca 100644 --- a/src/XCAFDoc/XCAFDoc_MaterialTool.hxx +++ b/src/XCAFDoc/XCAFDoc_MaterialTool.hxx @@ -76,7 +76,7 @@ public: //! Returns Material assigned to //! Returns False if no such Material is assigned - Standard_EXPORT Standard_Boolean GetMaterial (const TDF_Label& MatL, Handle(TCollection_HAsciiString)& aName, Handle(TCollection_HAsciiString)& aDescription, Standard_Real& aDensity, Handle(TCollection_HAsciiString)& aDensName, Handle(TCollection_HAsciiString)& aDensValType) const; + Standard_EXPORT static Standard_Boolean GetMaterial (const TDF_Label& MatL, Handle(TCollection_HAsciiString)& aName, Handle(TCollection_HAsciiString)& aDescription, Standard_Real& aDensity, Handle(TCollection_HAsciiString)& aDensName, Handle(TCollection_HAsciiString)& aDensValType); //! Find referred material and return density from it //! if no material --> return 0 diff --git a/src/XCAFDoc/XCAFDoc_VisMaterialTool.cxx b/src/XCAFDoc/XCAFDoc_VisMaterialTool.cxx index 4bfc4c6cc0..af6e9b9113 100644 --- a/src/XCAFDoc/XCAFDoc_VisMaterialTool.cxx +++ b/src/XCAFDoc/XCAFDoc_VisMaterialTool.cxx @@ -79,13 +79,10 @@ const Handle(XCAFDoc_ShapeTool)& XCAFDoc_VisMaterialTool::ShapeTool() //function : GetMaterial //purpose : //======================================================================= -Handle(XCAFDoc_VisMaterial) XCAFDoc_VisMaterialTool::GetMaterial (const TDF_Label& theMatLabel) const +Handle(XCAFDoc_VisMaterial) XCAFDoc_VisMaterialTool::GetMaterial(const TDF_Label& theMatLabel) { Handle(XCAFDoc_VisMaterial) aMatAttrib; - if (theMatLabel.Father() == Label()) - { - theMatLabel.FindAttribute (XCAFDoc_VisMaterial::GetID(), aMatAttrib); - } + theMatLabel.FindAttribute(XCAFDoc_VisMaterial::GetID(), aMatAttrib); return aMatAttrib; } @@ -214,8 +211,7 @@ Standard_Boolean XCAFDoc_VisMaterialTool::GetShapeMaterial (const TDF_Label& the Handle(XCAFDoc_VisMaterial) XCAFDoc_VisMaterialTool::GetShapeMaterial (const TDF_Label& theShapeLabel) { TDF_Label aMatLabel; - return Label().HasChild() // do not waste time on shape attributes if materials map is empty - && GetShapeMaterial (theShapeLabel, aMatLabel) + return GetShapeMaterial (theShapeLabel, aMatLabel) ? GetMaterial (aMatLabel) : Handle(XCAFDoc_VisMaterial)(); } diff --git a/src/XCAFDoc/XCAFDoc_VisMaterialTool.hxx b/src/XCAFDoc/XCAFDoc_VisMaterialTool.hxx index e99196851e..6f76a94c04 100644 --- a/src/XCAFDoc/XCAFDoc_VisMaterialTool.hxx +++ b/src/XCAFDoc/XCAFDoc_VisMaterialTool.hxx @@ -56,7 +56,7 @@ public: Standard_Boolean IsMaterial (const TDF_Label& theLabel) const { return !GetMaterial (theLabel).IsNull(); } //! Returns Material defined by specified Label, or NULL if the label is not in Material Table. - Standard_EXPORT Handle(XCAFDoc_VisMaterial) GetMaterial (const TDF_Label& theMatLabel) const; + Standard_EXPORT static Handle(XCAFDoc_VisMaterial) GetMaterial (const TDF_Label& theMatLabel); //! Adds Material definition to a Material Table and returns its Label. Standard_EXPORT TDF_Label AddMaterial (const Handle(XCAFDoc_VisMaterial)& theMat, @@ -88,7 +88,7 @@ public: Standard_EXPORT static Standard_Boolean GetShapeMaterial (const TDF_Label& theShapeLabel, TDF_Label& theMaterialLabel); //! Returns material assigned to the shape label. - Standard_EXPORT Handle(XCAFDoc_VisMaterial) GetShapeMaterial (const TDF_Label& theShapeLabel); + Standard_EXPORT static Handle(XCAFDoc_VisMaterial) GetShapeMaterial (const TDF_Label& theShapeLabel); //! Sets a link with GUID XCAFDoc::VisMaterialRefGUID() from shape label to material label. //! @param theShape [in] shape diff --git a/tests/bugs/step/bug33317 b/tests/bugs/step/bug33317 new file mode 100644 index 0000000000..0500681d8c --- /dev/null +++ b/tests/bugs/step/bug33317 @@ -0,0 +1,32 @@ +puts "========================" +puts "0033317: Data Exchange, Step Export - Ignoring color attached to the reference shape label" +puts "========================" + +pload OCAF + +Close D -silent +Close D1 -silent + +set TempFilename ${imagedir}/${casename}_temp.stp + +# Open document +XOpen [locate_data_file bug33317_solids_7_7_0.xml] D + +# Get colors +set colors_old [XGetShapeColor D 0:1:1:1 generic] + +# Write to STEP +WriteStep D ${TempFilename} + +# Read and check +ReadStep D1 ${TempFilename} + +set colors_new [XGetShapeColor D1 0:1:1:1:1 generic] +if { [string equal ${colors_new} ${colors_old}] == -1 } { + puts "ERROR: OCC33317 is reproduced while STEP export." +} + +# Clear temp file +file delete -force $TempFilename +Close D +Close D1 From 44be123039169a45d652850f8a4b70579f5ca535 Mon Sep 17 00:00:00 2001 From: akaftasev Date: Mon, 6 Feb 2023 14:15:35 +0300 Subject: [PATCH 461/639] 0030055: BRepOffset_MakeOffset throws "TopoDS_Vertex hasn't gp_Pnt" in intersection mode Diagnostic of mixed connectivity of faces along common edge is added. If algorithm finds such pair of faces, it stops working with special error code. --- src/BRepOffset/BRepOffset_Analyse.cxx | 166 +++++++++++++++++++++- src/BRepOffset/BRepOffset_Error.hxx | 3 +- src/BRepOffset/BRepOffset_MakeOffset.cxx | 43 ++++++ src/BRepTest/BRepTest_FeatureCommands.cxx | 15 +- src/ChFiDS/ChFiDS_TypeOfConcavity.hxx | 3 +- tests/bugs/modalg_2/bug5805_3 | 4 +- tests/bugs/modalg_2/bug5805_4 | 6 +- tests/bugs/modalg_2/bug5805_5 | 5 + tests/bugs/modalg_3/bug5805_6 | 5 + tests/offset/bugs/bug26288 | 1 + tests/offset/bugs/bug27913 | 15 +- tests/offset/bugs/bug30055 | 13 ++ tests/offset/bugs/bug5806 | 17 ++- tests/offset/shape/A2 | 4 +- tests/offset/shape/A3 | 4 +- tests/perf/modalg/bug26443_1 | 4 + 16 files changed, 279 insertions(+), 29 deletions(-) create mode 100644 tests/offset/bugs/bug30055 diff --git a/src/BRepOffset/BRepOffset_Analyse.cxx b/src/BRepOffset/BRepOffset_Analyse.cxx index facfbed344..cd8e269b04 100644 --- a/src/BRepOffset/BRepOffset_Analyse.cxx +++ b/src/BRepOffset/BRepOffset_Analyse.cxx @@ -41,6 +41,7 @@ #include #include #include +#include static void CorrectOrientationOfTangent(gp_Vec& TangVec, const TopoDS_Vertex& aVertex, @@ -50,6 +51,12 @@ static void CorrectOrientationOfTangent(gp_Vec& TangVec, if (aVertex.IsSame(Vlast)) TangVec.Reverse(); } + +static Standard_Boolean CheckMixedContinuity (const TopoDS_Edge& theEdge, + const TopoDS_Face& theFace1, + const TopoDS_Face& theFace2, + const Standard_Real theAngTol); + //======================================================================= //function : BRepOffset_Analyse //purpose : @@ -105,15 +112,168 @@ static void EdgeAnalyse(const TopoDS_Edge& E, } else { - if (ChFi3d::IsTangentFaces(E, F1, F2)) //weak condition - ConnectType = ChFiDS_Tangential; + Standard_Boolean isTwoSplines = (aSurfType1 == GeomAbs_BSplineSurface || aSurfType1 == GeomAbs_BezierSurface) && + (aSurfType2 == GeomAbs_BSplineSurface || aSurfType2 == GeomAbs_BezierSurface); + Standard_Boolean isMixedConcavity = Standard_False; + if (isTwoSplines) + { + Standard_Real anAngTol = 0.1; + isMixedConcavity = CheckMixedContinuity(E, F1, F2, anAngTol); + } + + if (!isMixedConcavity) + { + if (ChFi3d::IsTangentFaces(E, F1, F2)) //weak condition + { + ConnectType = ChFiDS_Tangential; + } + else + { + ConnectType = ChFi3d::DefineConnectType(E, F1, F2, SinTol, Standard_False); + } + } else - ConnectType = ChFi3d::DefineConnectType(E, F1, F2, SinTol, Standard_False); + { + ConnectType = ChFiDS_Mixed; + } } I.Type(ConnectType); LI.Append(I); } +//======================================================================= +//function : CheckMixedConcavity +//purpose : +//======================================================================= +Standard_Boolean CheckMixedContinuity (const TopoDS_Edge& theEdge, + const TopoDS_Face& theFace1, + const TopoDS_Face& theFace2, + const Standard_Real theAngTol) +{ + Standard_Boolean aMixedCont = Standard_False; + GeomAbs_Shape aCurrOrder = BRep_Tool::Continuity(theEdge, theFace1, theFace2); + if (aCurrOrder > GeomAbs_C0) + { + //Method BRep_Tool::Continuity(...) always returns minimal continuity between faces + //so, if aCurrOrder > C0 it means that faces are tangent along whole edge. + return aMixedCont; + } + //But we caqnnot trust result, if it is C0. because this value set by default. + Standard_Real TolC0 = Max(0.001, 1.5*BRep_Tool::Tolerance(theEdge)); + + Standard_Real aFirst; + Standard_Real aLast; + + Handle(Geom2d_Curve) aC2d1, aC2d2; + + if (!theFace1.IsSame(theFace2) && + BRep_Tool::IsClosed(theEdge, theFace1) && + BRep_Tool::IsClosed(theEdge, theFace2)) + { + //Find the edge in the face 1: this edge will have correct orientation + TopoDS_Edge anEdgeInFace1; + TopoDS_Face aFace1 = theFace1; + aFace1.Orientation(TopAbs_FORWARD); + TopExp_Explorer anExplo(aFace1, TopAbs_EDGE); + for (; anExplo.More(); anExplo.Next()) + { + const TopoDS_Edge& anEdge = TopoDS::Edge(anExplo.Current()); + if (anEdge.IsSame(theEdge)) + { + anEdgeInFace1 = anEdge; + break; + } + } + if (anEdgeInFace1.IsNull()) + { + return aMixedCont; + } + + aC2d1 = BRep_Tool::CurveOnSurface(anEdgeInFace1, aFace1, aFirst, aLast); + TopoDS_Face aFace2 = theFace2; + aFace2.Orientation(TopAbs_FORWARD); + anEdgeInFace1.Reverse(); + aC2d2 = BRep_Tool::CurveOnSurface(anEdgeInFace1, aFace2, aFirst, aLast); + } + else + { + // Obtaining of pcurves of edge on two faces. + aC2d1 = BRep_Tool::CurveOnSurface(theEdge, theFace1, aFirst, aLast); + //For the case of seam edge + TopoDS_Edge EE = theEdge; + if (theFace1.IsSame(theFace2)) + { + EE.Reverse(); + } + aC2d2 = BRep_Tool::CurveOnSurface(EE, theFace2, aFirst, aLast); + } + + if (aC2d1.IsNull() || aC2d2.IsNull()) + { + return aMixedCont; + } + + // Obtaining of two surfaces from adjacent faces. + Handle(Geom_Surface) aSurf1 = BRep_Tool::Surface(theFace1); + Handle(Geom_Surface) aSurf2 = BRep_Tool::Surface(theFace2); + + if (aSurf1.IsNull() || aSurf2.IsNull()) + { + return aMixedCont; + } + + Standard_Integer aNbSamples = 23; + + // Computation of the continuity. + Standard_Real aPar; + Standard_Real aDelta = (aLast - aFirst) / (aNbSamples - 1); + Standard_Integer i, istart = 1; + Standard_Boolean isG1 = Standard_False; + + for (i = 1, aPar = aFirst; i <= aNbSamples; i++, aPar += aDelta) + { + if (i == aNbSamples) aPar = aLast; + + LocalAnalysis_SurfaceContinuity aCont(aC2d1, aC2d2, aPar, + aSurf1, aSurf2, GeomAbs_G1, 0.001, TolC0, theAngTol, theAngTol, theAngTol); + if (aCont.IsDone()) + { + istart = i + 1; + isG1 = aCont.IsG1(); + break; + } + } + + if (istart > aNbSamples / 2) + { + return aMixedCont; + } + + for (i = istart, aPar = aFirst; i <= aNbSamples; i++, aPar += aDelta) + { + if (i == aNbSamples) aPar = aLast; + + LocalAnalysis_SurfaceContinuity aCont(aC2d1, aC2d2, aPar, + aSurf1, aSurf2, GeomAbs_G1, 0.001, TolC0, theAngTol, theAngTol, theAngTol); + if (!aCont.IsDone()) + { + continue; + } + + if (aCont.IsG1() == isG1) + { + continue; + } + else + { + aMixedCont = Standard_True; + break; + } + } + + return aMixedCont; + +} //======================================================================= //function : BuildAncestors diff --git a/src/BRepOffset/BRepOffset_Error.hxx b/src/BRepOffset/BRepOffset_Error.hxx index e5dda91fdb..517a8eb93d 100644 --- a/src/BRepOffset/BRepOffset_Error.hxx +++ b/src/BRepOffset/BRepOffset_Error.hxx @@ -29,7 +29,8 @@ enum BRepOffset_Error BRepOffset_CannotTrimEdges, //!< exception while trim edges BRepOffset_CannotFuseVertices, //!< exception while fuse vertices BRepOffset_CannotExtentEdge, //!< exception while extent edges - BRepOffset_UserBreak //!< user break + BRepOffset_UserBreak, //!< user break + BRepOffset_MixedConnectivity //!< Different connectivity of faces along edge: partially C0 and tangent }; #endif // _BRepOffset_Error_HeaderFile diff --git a/src/BRepOffset/BRepOffset_MakeOffset.cxx b/src/BRepOffset/BRepOffset_MakeOffset.cxx index 5d4d00d3db..c499d748dd 100644 --- a/src/BRepOffset/BRepOffset_MakeOffset.cxx +++ b/src/BRepOffset/BRepOffset_MakeOffset.cxx @@ -910,6 +910,19 @@ void BRepOffset_MakeOffset::MakeOffsetShape(const Message_ProgressRange& theRang myAnalyse.SetFaceOffsetMap (myFaceOffset); } myAnalyse.Perform(myFaceComp,TolAngle, aPS.Next(aSteps(PIOperation_Analyse))); + TopExp_Explorer anEExp(myFaceComp, TopAbs_EDGE); + for (; anEExp.More(); anEExp.Next()) + { + const TopoDS_Edge& anE = TopoDS::Edge(anEExp.Current()); + const BRepOffset_ListOfInterval& aLI = myAnalyse.Type(anE); + if (aLI.IsEmpty()) + continue; + if (aLI.Last().Type() == ChFiDS_Mixed) + { + myError = BRepOffset_MixedConnectivity; + return; + } + } if (!aPS.More()) { myError = BRepOffset_UserBreak; @@ -2960,6 +2973,36 @@ void BRepOffset_MakeOffset::MakeMissingWalls (const Message_ProgressRange& theRa TopExp::Vertices(anEdge, V1, V2); Standard_Real aF, aL; const Handle(Geom_Curve) aC = BRep_Tool::Curve(anEdge, aF, aL); + if (V3.IsNull() && V4.IsNull()) + { + // Initially offset edge is created without vertices. + // Then edge is trimmed by intersection line between + // two adjacent extended offset faces and get vertices. + // When intersection lines are invalid for any reason, + // (one of reson is mixed connectivity of faces) + // algoritm of cutting offset edge by intersection line + // can fail and offset edge cannot get vertices. + // Follwing workaround is only to avoid exeption if V3 and V4 are Null + // Vertex points are invalid. + Standard_Real anOEF, anOEL; + TopAbs_Orientation anOEOri = OE.Orientation(); + OE.Orientation(TopAbs_FORWARD); + Handle(Geom_Curve) anOEC = BRep_Tool::Curve(OE, anOEF, anOEL); + BRep_Builder aBB; + gp_Pnt aP1 = anOEC->Value(aF); + gp_Pnt aP2 = anOEC->Value(aL); + TopoDS_Vertex anOEV1, anOEV2; + Standard_Real aTol = Max(BRep_Tool::Tolerance(V1), BRep_Tool::Tolerance(V2)); + aBB.MakeVertex(anOEV1, aP1, aTol); + anOEV1.Orientation(TopAbs_FORWARD); + aBB.MakeVertex(anOEV2, aP2, aTol); + anOEV2.Orientation(TopAbs_REVERSED); + aBB.Add(OE, anOEV1); + aBB.Add(OE, anOEV2); + aBB.Range(OE, aF, aL); + OE.Orientation(anOEOri); + TopExp::Vertices(OE, V4, V3); + } if (!aC.IsNull() && (!aC->IsClosed() && !aC->IsPeriodic())) { diff --git a/src/BRepTest/BRepTest_FeatureCommands.cxx b/src/BRepTest/BRepTest_FeatureCommands.cxx index 07eab33dad..102791e97b 100644 --- a/src/BRepTest/BRepTest_FeatureCommands.cxx +++ b/src/BRepTest/BRepTest_FeatureCommands.cxx @@ -415,6 +415,11 @@ static void reportOffsetState(Draw_Interpretor& theCommands, theCommands << "ERROR. Can not extent edge."; break; } + case BRepOffset_MixedConnectivity: + { + theCommands << "ERROR. Mixed connectivity of faces."; + break; + } default: { theCommands << "ERROR. offsetperform operation not done."; @@ -974,7 +979,10 @@ Standard_Integer thickshell(Draw_Interpretor& theCommands, const BRepOffset_Error aRetCode = B.Error(); reportOffsetState(theCommands, aRetCode); - DBRep::Set(a[1], B.Shape()); + if (!B.Shape().IsNull()) + { + DBRep::Set(a[1], B.Shape()); + } return 0; } @@ -1109,7 +1117,10 @@ Standard_Integer offsetshape(Draw_Interpretor& theCommands, const BRepOffset_Error aRetCode = B.Error(); reportOffsetState(theCommands, aRetCode); - DBRep::Set(a[1], B.Shape()); + if (!B.Shape().IsNull()) + { + DBRep::Set(a[1], B.Shape()); + } return 0; } diff --git a/src/ChFiDS/ChFiDS_TypeOfConcavity.hxx b/src/ChFiDS/ChFiDS_TypeOfConcavity.hxx index 8c18553432..e072a4b165 100644 --- a/src/ChFiDS/ChFiDS_TypeOfConcavity.hxx +++ b/src/ChFiDS/ChFiDS_TypeOfConcavity.hxx @@ -24,7 +24,8 @@ ChFiDS_Concave, ChFiDS_Convex, ChFiDS_Tangential, ChFiDS_FreeBound, -ChFiDS_Other +ChFiDS_Other, +ChFiDS_Mixed }; #endif // _ChFiDS_TypeOfConcavity_HeaderFile diff --git a/tests/bugs/modalg_2/bug5805_3 b/tests/bugs/modalg_2/bug5805_3 index c45f552f00..5a613ded24 100755 --- a/tests/bugs/modalg_2/bug5805_3 +++ b/tests/bugs/modalg_2/bug5805_3 @@ -1,4 +1,4 @@ -puts "TODO OCC26556 ALL: ERROR. offsetperform operation not done." +puts "TODO OCC26556 ALL: ERROR. Mixed connectivity of faces." puts "============" puts "OCC5805" @@ -20,6 +20,7 @@ if { [catch { offsetshape result a -1 a_6 } catch_result] } { puts "Faulty ${BugNumber} : offsetshape is wrong" } +if { [isdraw result] } { checkmaxtol result -min_tol 1. checkprops result -s 1185.03 @@ -27,3 +28,4 @@ checkshape result checknbshapes result -vertex 10 -edge 15 -wire 7 -face 7 -shell 1 -solid 1 -compsolid 0 -compound 0 -shape 41 checkview -display result -2d -path ${imagedir}/${test_image}.png +} diff --git a/tests/bugs/modalg_2/bug5805_4 b/tests/bugs/modalg_2/bug5805_4 index f883082a2c..ae3b827801 100755 --- a/tests/bugs/modalg_2/bug5805_4 +++ b/tests/bugs/modalg_2/bug5805_4 @@ -1,6 +1,4 @@ -puts "TODO OCC25925 ALL: ERROR. offsetperform operation not done." -puts "TODO OCC25925 ALL: Tcl Exception:" -puts "TODO OCC25925 ALL: TEST INCOMPLETE" +puts "TODO OCC25925 ALL: ERROR. Mixed connectivity of faces." puts "============" puts "OCC5805" @@ -25,6 +23,7 @@ if { [catch { offsetperform result } catch_result] } { puts "Faulty ${BugNumber} : offsetshape is wrong" } +if { [isdraw result] } { checkmaxtol result -min_tol 1. checkprops result -s 1185.03 @@ -32,3 +31,4 @@ checkshape result checknbshapes result -vertex 10 -edge 15 -wire 7 -face 7 -shell 1 -solid 1 -compsolid 0 -compound 0 -shape 41 checkview -display result -2d -path ${imagedir}/${test_image}.png +} diff --git a/tests/bugs/modalg_2/bug5805_5 b/tests/bugs/modalg_2/bug5805_5 index db1e0666c2..f72c337893 100755 --- a/tests/bugs/modalg_2/bug5805_5 +++ b/tests/bugs/modalg_2/bug5805_5 @@ -1,3 +1,5 @@ +puts "TODO OCC25925 ALL: ERROR. Mixed connectivity of faces." + puts "============" puts "OCC5805" puts "============" @@ -21,6 +23,7 @@ if { [catch { offsetperform result } catch_result] } { puts "Faulty ${BugNumber} : offsetshape is wrong" } +if { [isdraw result] } { checkmaxtol result -min_tol 1. checkprops result -s 876.584 @@ -28,3 +31,5 @@ checkshape result checknbshapes result -vertex 10 -edge 15 -wire 7 -face 7 -shell 1 -solid 1 -compsolid 0 -compound 0 -shape 41 checkview -display result -2d -path ${imagedir}/${test_image}.png +} + \ No newline at end of file diff --git a/tests/bugs/modalg_3/bug5805_6 b/tests/bugs/modalg_3/bug5805_6 index 544b5381a0..79224e970f 100755 --- a/tests/bugs/modalg_3/bug5805_6 +++ b/tests/bugs/modalg_3/bug5805_6 @@ -1,3 +1,5 @@ +puts "TODO OCC25925 ALL: ERROR. Mixed connectivity of faces." + puts "============" puts "OCC5805" puts "============" @@ -16,9 +18,12 @@ if { [catch { offsetshape result a -1 } catch_result] } { puts "Faulty ${BugNumber} : offsetshape is wrong" } +if { [isdraw result] } { checkmaxtol result -min_tol 1. checkprops result -s 876.584 checkshape result checknbshapes result -vertex 10 -edge 15 -wire 7 -face 7 -shell 1 -solid 1 -compsolid 0 -compound 0 -shape 41 checkview -display result -2d -path ${imagedir}/${test_image}.png +} + \ No newline at end of file diff --git a/tests/offset/bugs/bug26288 b/tests/offset/bugs/bug26288 index 94cf6d31e8..f30e48c1ba 100644 --- a/tests/offset/bugs/bug26288 +++ b/tests/offset/bugs/bug26288 @@ -1,4 +1,5 @@ puts "TODO OCC26030 ALL: Error : The offset cannot be built" +puts "TODO OCC26030 ALL: ERROR. Mixed connectivity of faces." puts "========" puts "OCC26288" diff --git a/tests/offset/bugs/bug27913 b/tests/offset/bugs/bug27913 index aca74b528f..cf558179c1 100644 --- a/tests/offset/bugs/bug27913 +++ b/tests/offset/bugs/bug27913 @@ -1,6 +1,5 @@ -puts "TODO OCC26577 All: Error : is WRONG because number of EDGE entities in shape" -puts "TODO OCC26577 All: Error : is WRONG because number of SHELL entities in shape" - +puts "TODO OCC26577 All: ERROR. Mixed connectivity of faces." +puts "TODO OCC26577 All: Error : The offset cannot be built." puts "==============================================================" puts "0027913: Sharing between edges was lost after offset operation" @@ -12,9 +11,11 @@ offsetparameter 1e-7 p i offsetload s 10 offsetperform result -unifysamedom result_unif result +if { [isdraw result] } { + unifysamedom result_unif result -checkshape result -checkview -display result_unif -2d -path ${imagedir}/${test_image}.png + checkshape result + checkview -display result_unif -2d -path ${imagedir}/${test_image}.png -checknbshapes result -ref [lrange [nbshapes s] 8 19] \ No newline at end of file + checknbshapes result -ref [lrange [nbshapes s] 8 19] +} diff --git a/tests/offset/bugs/bug30055 b/tests/offset/bugs/bug30055 new file mode 100644 index 0000000000..ecba24c463 --- /dev/null +++ b/tests/offset/bugs/bug30055 @@ -0,0 +1,13 @@ +puts "REQUIRED All: ERROR. Mixed connectivity of faces." +puts "REQUIRED All: Error : The offset cannot be built." +puts "============" +puts "0030055: BRepOffset_MakeOffset throws TopoDS_Vertex hasn't gp_Pnt in intersection mode" +puts "============" + +restore [locate_data_file bug30055.brep] a + +thickshell result a 1 i + +if { [isdraw result] } { + puts "ERROR - result must not be buit" +} diff --git a/tests/offset/bugs/bug5806 b/tests/offset/bugs/bug5806 index 197a76f0dc..f530ae2c88 100644 --- a/tests/offset/bugs/bug5806 +++ b/tests/offset/bugs/bug5806 @@ -1,4 +1,6 @@ -puts "TODO OCC25925 ALL: ERROR. offsetperform operation not done." +puts "TODO OCC25925 ALL: ERROR. Mixed connectivity of faces." +puts "TODO OCC25925 ALL: Error : The offset cannot be built." + puts "============" puts "OCC5806" puts "============" @@ -28,11 +30,12 @@ explode resthru f if { [catch { offsetshape result resthru -0.5 resthru_6 resthru_7 } catch_result] } { puts "Faulty ${BugNumber} : offsetshape is wrong" } +if { [isdraw result] } { + checkmaxtol result -min_tol 1. -checkmaxtol result -min_tol 1. - -checkprops result -s 1116.06 -checkshape result + checkprops result -s 1116.06 + checkshape result -checknbshapes result -vertex 10 -edge 15 -wire 7 -face 7 -shell 1 -solid 1 -compsolid 0 -compound 0 -shape 41 -checkview -display result -2d -path ${imagedir}/${test_image}.png + checknbshapes result -vertex 10 -edge 15 -wire 7 -face 7 -shell 1 -solid 1 -compsolid 0 - compound 0 -shape 41 + checkview -display result -2d -path ${imagedir}/${test_image}.png +} diff --git a/tests/offset/shape/A2 b/tests/offset/shape/A2 index 383b150dec..2e37ae358a 100644 --- a/tests/offset/shape/A2 +++ b/tests/offset/shape/A2 @@ -1,7 +1,7 @@ puts "TODO OCC23190 ALL: ERROR. C0 continuity of input data." puts "TODO OCC23190 ALL: Error: The command cannot be built" -puts "TODO OCC23190 ALL: result is not a topological shape!!!" -puts "TODO OCC23068 ALL: TEST INCOMPLETE" +puts "TODO OCC23068 ALL: Error : The offset cannot be built." + # Original bug : hkg60144/pro15325 # Date : 17Juillet98 diff --git a/tests/offset/shape/A3 b/tests/offset/shape/A3 index 45d232dc12..4203f0afe1 100644 --- a/tests/offset/shape/A3 +++ b/tests/offset/shape/A3 @@ -1,7 +1,7 @@ puts "TODO OCC23190 ALL: ERROR. C0 continuity of input data." puts "TODO OCC23190 ALL: Error: The command cannot be built" -puts "TODO OCC23190 ALL: result is not a topological shape!!!" -puts "TODO OCC23068 ALL: TEST INCOMPLETE" +puts "TODO OCC23068 ALL: Error : The offset cannot be built." + # Original bug : cts21271 # Date : 11Sept98 diff --git a/tests/perf/modalg/bug26443_1 b/tests/perf/modalg/bug26443_1 index 66b34a3365..dae8547576 100644 --- a/tests/perf/modalg/bug26443_1 +++ b/tests/perf/modalg/bug26443_1 @@ -1,3 +1,5 @@ +puts "TODO OCC25925 ALL: ERROR. Mixed connectivity of faces." + puts "========" puts "OCC26443" puts "========" @@ -15,6 +17,8 @@ offsetshape r a -2 dchrono h stop counter offsetshape fit +if { [isdraw r] } { checkshape r checknbshapes r -ref [lrange [nbshapes a] 8 19] checkview -screenshot -2d -path ${imagedir}/${test_image}.png +} From 6d140acb14258f249b76aadbd26a24302d81805a Mon Sep 17 00:00:00 2001 From: akaftasev Date: Mon, 6 Feb 2023 14:17:10 +0300 Subject: [PATCH 462/639] 0030292: Modeling Algorithms - BRepBndLib should avoid using Poly_Polygon3D when called with useTriangulation set to false BRepBndLib.cxx : treatment of useTriangulation is modified according to specified behavior of algorithm BRepTest_CurveCommands.cxx : creation edge from polygon3d is added in Draw command mkedge. --- src/BRepBndLib/BRepBndLib.cxx | 10 +++- src/BRepTest/BRepTest_CurveCommands.cxx | 13 +++-- tests/lowalgos/bnd/bug30292 | 68 +++++++++++++++++++++++++ 3 files changed, 87 insertions(+), 4 deletions(-) create mode 100644 tests/lowalgos/bnd/bug30292 diff --git a/src/BRepBndLib/BRepBndLib.cxx b/src/BRepBndLib/BRepBndLib.cxx index e8e3a98708..f3ab8ed860 100644 --- a/src/BRepBndLib/BRepBndLib.cxx +++ b/src/BRepBndLib/BRepBndLib.cxx @@ -127,6 +127,14 @@ void BRepBndLib::Add(const TopoDS_Shape& S, Bnd_Box& B, Standard_Boolean useTria for (ex.Init(S,TopAbs_EDGE,TopAbs_FACE); ex.More(); ex.Next()) { const TopoDS_Edge& E = TopoDS::Edge(ex.Current()); + + if (!useTriangulation && BRep_Tool::IsGeometric(E)) + { + BC.Initialize(E); + BndLib_Add3dCurve::Add(BC, BRep_Tool::Tolerance(E), B); + continue; + } + Handle(Poly_Polygon3D) P3d = BRep_Tool::Polygon3D(E, l); if (!P3d.IsNull() && P3d->NbNodes() > 0) { @@ -143,7 +151,7 @@ void BRepBndLib::Add(const TopoDS_Shape& S, Bnd_Box& B, Standard_Boolean useTria else { BRep_Tool::PolygonOnTriangulation(E, Poly, T, l); - if (useTriangulation && !Poly.IsNull() && !T.IsNull() && T->NbNodes() > 0) + if (!Poly.IsNull() && !T.IsNull() && T->NbNodes() > 0) { const TColStd_Array1OfInteger& Indices = Poly->Nodes(); nbNodes = Indices.Length(); diff --git a/src/BRepTest/BRepTest_CurveCommands.cxx b/src/BRepTest/BRepTest_CurveCommands.cxx index b0f58d031e..4bd39be3b7 100644 --- a/src/BRepTest/BRepTest_CurveCommands.cxx +++ b/src/BRepTest/BRepTest_CurveCommands.cxx @@ -281,9 +281,11 @@ static Standard_Integer mkedge(Draw_Interpretor& di, Standard_Integer n, const c Handle(Geom_Curve) C = DrawTrSurf::GetCurve(a[2]); Handle(Geom2d_Curve) C2d = DrawTrSurf::GetCurve2d(a[2]); - if (C.IsNull() && C2d.IsNull()) { + Handle(Poly_Polygon3D) P3d = DrawTrSurf::GetPolygon3D(a[2]); + + if (C.IsNull() && C2d.IsNull() && P3d.IsNull()) { //std::cout << a[2] << " is not a curve" << std::endl; - di << a[2] << " is not a curve\n"; + di << a[2] << " is not a curve or polygon 3d\n"; return 1; } @@ -291,7 +293,12 @@ static Standard_Integer mkedge(Draw_Interpretor& di, Standard_Integer n, const c if (n == 3) { if (!C.IsNull()) edge = BRepBuilderAPI_MakeEdge(C); - else edge = BRepBuilderAPI_MakeEdge2d(C2d); + else if (!C2d.IsNull()) edge = BRepBuilderAPI_MakeEdge2d(C2d); + else + { + BRep_Builder aBB; + aBB.MakeEdge(edge, P3d); + } } else { Handle(Geom_Surface) S; diff --git a/tests/lowalgos/bnd/bug30292 b/tests/lowalgos/bnd/bug30292 new file mode 100644 index 0000000000..4bc136f9eb --- /dev/null +++ b/tests/lowalgos/bnd/bug30292 @@ -0,0 +1,68 @@ +puts "========" +puts "0030292: Modeling Algorithms - BRepBndLib should avoid using Poly_Polygon3D when called with useTriangulation set to false" +puts "========" +puts "" + +## geometric edge without any discrete representations + +circle c 0 0 0 1 +mkedge e c +set res1 [bounding e] +set res2 [bounding e -noTriangulation] +if {$res1 != $res2} { + puts "Error: bounding boxes are different for geometric edge" +} + +## geometric edge with polygon 3d + +incmesh e 0.1 +set res1_ref "-1.1000000999999999 -1.0927089740980542 -0.10000010000000001 1.1000000999999999 1.092708974098054 0.10000010000000001" +set res2_ref "-1.0000001000000001 -1.0000001000000001 -9.9999999999999995e-08 1.0000001000000001 1.0000001000000001 9.9999999999999995e-08" +unset res1 +set res1 [bounding e] +foreach dd $res1 { + if ![regexp $dd $res1_ref] { + puts "Error: bounding box is wrong" + } +} +unset res2 +set res2 [bounding e -noTriangulation] +foreach dd $res2 { + if ![regexp $dd $res2_ref] { + puts "Error: bounding box is wrong" + } +} + +## geometric edge with polygon on triangulation + +pcylinder cyl 1 1 +incmesh cyl 0.1 +explode cyl e +renamevar cyl_3 e +unset res1 +set res1 [bounding e] +foreach dd $res1 { + if ![regexp $dd $res1_ref] { + puts "Error: bounding box is wrong" + } +} +unset res2 +set res2 [bounding e -noTriangulation] +foreach dd $res2 { + if ![regexp $dd $res2_ref] { + puts "Error: bounding box is wrong" + } +} + +## not geometric edge with polygon 3d + +polygon3d pol3d 5 1 0 0 0 1 0 -1 0 0 0 -1 0 1 0 0 +mkedge e pol3d +unset res1 +set res1 [bounding e] +unset res2 +set res2 [bounding e -noTriangulation] +if {$res1 != $res2} { + puts "Error: bounding boxes are different for not geometric edge" +} + From 86e352849dc7598209cb6a1254faa9c946a38977 Mon Sep 17 00:00:00 2001 From: akaftasev Date: Thu, 9 Feb 2023 18:36:01 +0300 Subject: [PATCH 463/639] 0033263: Modeling Algorithms - BRepFilletAPI_MakeFillet doesn't work for current parameters Do not calculate edge state if there are more than 4 G1 connections for currect vertex. --- src/ChFi3d/ChFi3d_Builder_1.cxx | 7 +++++-- tests/bugs/modalg_8/bug33113 | 18 ++++++++++++++++++ 2 files changed, 23 insertions(+), 2 deletions(-) create mode 100644 tests/bugs/modalg_8/bug33113 diff --git a/src/ChFi3d/ChFi3d_Builder_1.cxx b/src/ChFi3d/ChFi3d_Builder_1.cxx index eca3b71ad8..3355704b5b 100644 --- a/src/ChFi3d/ChFi3d_Builder_1.cxx +++ b/src/ChFi3d/ChFi3d_Builder_1.cxx @@ -692,7 +692,6 @@ void ChFi3d_Builder::PerformExtremity (const Handle(ChFiDS_Spine)& Spine) else{ sst = Spine->LastStatus(); iedge = Spine->NbEdges(); - E[0] = Spine->Edges(iedge); V = Spine->LastVertex(); } //Before all it is checked if the tangency is not dead. @@ -703,6 +702,7 @@ void ChFi3d_Builder::PerformExtremity (const Handle(ChFiDS_Spine)& Spine) } if(sst == ChFiDS_BreakPoint){ + Standard_Integer aLocNbG1Connections = 0; TopTools_ListIteratorOfListOfShape It;//,Jt; Standard_Boolean sommetpourri = Standard_False; TopTools_IndexedMapOfOrientedShape EdgesOfV; @@ -720,7 +720,10 @@ void ChFi3d_Builder::PerformExtremity (const Handle(ChFiDS_Spine)& Spine) if (!F2.IsNull() && ChFi3d::IsTangentFaces(anEdge, F1, F2, GeomAbs_G2)) //smooth edge { if (!F1.IsSame(F2)) + { NbG1Connections++; + aLocNbG1Connections++; + } continue; } @@ -759,7 +762,7 @@ void ChFi3d_Builder::PerformExtremity (const Handle(ChFiDS_Spine)& Spine) if (EdgesOfV.Extent() != 3) sommetpourri = Standard_True; - if(!sommetpourri){ + if(!sommetpourri && aLocNbG1Connections < 4){ sst = ChFi3d_EdgeState(E,myEFMap); } if(ii==1)Spine->SetFirstStatus(sst); diff --git a/tests/bugs/modalg_8/bug33113 b/tests/bugs/modalg_8/bug33113 new file mode 100644 index 0000000000..26d80a1b82 --- /dev/null +++ b/tests/bugs/modalg_8/bug33113 @@ -0,0 +1,18 @@ +puts "================================" +puts "OCC33113: Modeling Algorithms - BRepFilletAPI_MakeFillet::Build SIGSEGV" +puts "================================" + +restore [locate_data_file bug33113.brep] sh + +explode sh e +copy sh_4 e + +explode sh So +copy sh_1 s + +fillet res s 0.1 e + +checkshape res + +checkview -display res -3d -path ${imagedir}/${test_image}.png + From a846d363267c2035aed94c989070b450c110db31 Mon Sep 17 00:00:00 2001 From: akaftasev Date: Mon, 6 Mar 2023 23:16:01 +0300 Subject: [PATCH 464/639] 0033264: Modeling Algorithms - Result of section operation is incomplete Test case added. --- tests/bugs/modalg_7/bug33264 | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 tests/bugs/modalg_7/bug33264 diff --git a/tests/bugs/modalg_7/bug33264 b/tests/bugs/modalg_7/bug33264 new file mode 100644 index 0000000000..90868a48a0 --- /dev/null +++ b/tests/bugs/modalg_7/bug33264 @@ -0,0 +1,15 @@ +puts "============" +puts "0033264: Modeling Algorithms - Result of section operation is incomplete" +puts "============" +puts "" + +restore [locate_data_file bug33264_1.brep] srf1 +restore [locate_data_file bug33264_2.brep] srf2 + +bsection res srf1 srf2 + +checknbshapes res -vertex 44 -edge 43 +checkprops res -l 51.3377 +checksection res + +checkview -display res -2d -path ${imagedir}/${test_image}.png From 1dd4b902c0b69a5b0cd7ec80f00bbff765d558fd Mon Sep 17 00:00:00 2001 From: dpasukhi Date: Mon, 28 Nov 2022 12:58:04 +0000 Subject: [PATCH 465/639] 0033092: Data Exchange, Documentation - Implementation of DE_Wrapper documentation Implement new user-guide documentation for DE Wrapper --- dox/FILES_HTML.txt | 1 + dox/FILES_PDF.txt | 1 + dox/user_guides/de_wrapper/de_wrapper.md | 413 +++++++++++++++++++++++ dox/user_guides/user_guides.md | 1 + 4 files changed, 416 insertions(+) create mode 100644 dox/user_guides/de_wrapper/de_wrapper.md diff --git a/dox/FILES_HTML.txt b/dox/FILES_HTML.txt index 487bef712a..fbfcb40d4c 100644 --- a/dox/FILES_HTML.txt +++ b/dox/FILES_HTML.txt @@ -45,6 +45,7 @@ user_guides/visualization/visualization.md user_guides/iges/iges.md user_guides/step/step.md user_guides/xde/xde.md +user_guides/de_wrapper/de_wrapper.md user_guides/ocaf/ocaf.md user_guides/draw_test_harness/draw_test_harness.md user_guides/inspector/inspector.md diff --git a/dox/FILES_PDF.txt b/dox/FILES_PDF.txt index 75e3674f9e..e67ee8482f 100644 --- a/dox/FILES_PDF.txt +++ b/dox/FILES_PDF.txt @@ -20,6 +20,7 @@ user_guides/vis/vis.md user_guides/iges/iges.md user_guides/step/step.md user_guides/xde/xde.md +user_guides/de_wrapper/de_wrapper.md user_guides/inspector/inspector.md user_guides/draw_test_harness/draw_test_harness.md diff --git a/dox/user_guides/de_wrapper/de_wrapper.md b/dox/user_guides/de_wrapper/de_wrapper.md new file mode 100644 index 0000000000..8bbbb10a25 --- /dev/null +++ b/dox/user_guides/de_wrapper/de_wrapper.md @@ -0,0 +1,413 @@ +Data Exchange Wrapper (DE_Wrapper) {#occt_user_guides__de_wrapper} +============================ + +@tableofcontents + +@section occt_de_wrapper_1 Introduction + +This guide explains how to use the **Data Exchange Wrapper** (DE Wrapper). +It provides basic directions on setup, usage and file creation via DE_Wrapper. + +The Data Exchange Wrapper (DE Wrapper) module allows reading and writing supported CAD formats to shape objects or special XDE documents, setting up the transfer process for all CAD files. + +It is also possible to add support for new CAD formats by prototyping existing tools. + +The DE Wrapper component requires @ref occt_user_guides__xde "XDE" toolkit for operation. + +This guide mainly explains how to convert CAD files to Open CASCADE Technology (OCCT) shapes and vice versa. +This guide principally deals with the following OCCT classes: + * The Provider class, which loads CAD files and translates their contents to OCCT shapes or XDE documents, or translates OCCT shapes or XDE documents to CAD entities and then writes those entities to a CAD file. + * The Configuration class, which contains all information for the transfer process, such as the units, tolerance, and all internal information for the OCC readers or writers. + * The wrapper class, which contains all loaded configuration objects with own CAD format, reads or writes CAD files in the format derived from file extension or contents and saves or loads configuration settings for loaded configuration objects. + +@section occt_de_wrapper_2 Supported CAD formats + +| CAD format | Extensions | RW support | Thread Safety | Presentation | Package | +| :--------- | :--------- | :--------- | :----------- | :----------- | :------ | +| STEP | .stp, .step .stepz | RW | No | BRep, Mesh | STEPCAFControl | +| XCAF | .xbf | RW | Yes | BRep, Mesh | DEXCAFCascade | +| BREP | .brep | RW | Yes | BRep, Mesh | DEBRepCascade | +| IGES | .igs, .iges | RW | No | BRep | IGESCAFControl | +| OBJ | .obj | RW | Yes | Mesh | RWObj | +| STL | .stl | RW | Yes | Mesh | RWStl | +| PLY | .ply | W | Yes | Mesh | RWPly | +| GLTF | .glTF .glb | RW | Yes | Mesh | RWGltf | +| VRML | .wrl .vrml | RW | Yes | Mesh | Vrml | + +**Note** : + * The format names in the first column match the FormatName values used for configuration nodes. + * The VendorName for all listed CAD formats is "OCC". + +@section occt_de_wrapper_3 DE Session Configuration + +Any providers can have their own read/write parameters. The transfer process is set up using DE configuration nodes, which hold all relevant parameters. There are two ways to change the parameter values: directly from code or by an external resource file/string. +The session is a global or static DE_Wrapper object that stores registered DE configuration nodes and wraps DE commands to work with them. It has some configuration parameters of its own and also keeps track of loaded nodes and specilal global parameters. + +@subsection occt_de_wrapper_3_1 Getting a DE session. Code sample + +Working with a DE session requires a DE_Wrapper object to be loaded or created first. + +Getting the global DE_Wrapping object: +~~~~{.cpp} +Handle(DE_Wrapper) aSession = DE_Wrapper::GlobalWrapper(); +~~~~ +Creating a local DE_Wrapper: +~~~~{.cpp} +Handle(DE_Wrapper) aSession = new DE_Wrapper(); +~~~~ +It is recommended to create a local one-time copy to work with the session, if no global changes are intended. +~~~~{.cpp} +Handle(DE_Wrapper) aOneTimeSession = aSession->Copy(); +~~~~ +@subsection occt_de_wrapper_3_2 Configuration resource + +Configuration resource is an external file or string of the following format: +~~~~{.cpp} +global.priority.STEP : OCC DTK +global.general.length.unit : 1 +provider.STEP.OCC.read.precision.val : 0.0001 +~~~~ + +@subsubsection occt_de_wrapper_3_2_1 Configuration resource: graph of scopes + * **global.** is a scope of global parameters + * **priority.** is a scope of priority to use vendors with their providers. + * **general.** is a scope of global configuration parameter values + * "..." is an internal configuration with any internal scopes + * ". : " is a separator of key-value + * __...__ parameter value, can't contain new line symbols. + * **provider.** is a scope of configuration providers + * **STEP.** is a scope of CAD format to configure + * **OCC.** is a scope of a vendor or provider + * "..." is an internal configuration with any internal scopes + * ". : " is a separator of key-value + * "..." parameter value, can't contain new line symbols. + +@subsubsection occt_de_wrapper_3_2_2 Loading configuration resources. Configuring DE Session + +The resource should be loaded after the registration of all providers that should be configured. The resource only impacts registered parameters. To configure a new registered provider it is necessary to load the resource again. Parameters not present in the resource will remain unchanged. + +There are two ways to check what parameters are available: +* C++: Open ConfigureNode file and check the InternalParameter field. Each parameter will be described with a comment. To check the global parameters, use the DE_Wrapper class public methods. +* Resource: Register all available Nodes to the session, then save the configuration and view all existing parameters. + +There are two options for loading a resource: recursive and global parameters only. Recursive is the default option to configure all global parameters (units, priority, enable status) and all registered providers. Non-recursive configures only global parameters and ignores all provider settings. This option is the best for updating provider priority. + +@subsubsection occt_de_wrapper_3_2_3 Loading configuration resources. Code sample + +Configuring using a resource string: +~~~~{.cpp} + Handle(DE_Wrapper) aSession = DE_Wrapper::GlobalWrapper(); + TCollection_AsciiString aString = + "global.priority.STEP : OCC DTK\n" + "global.general.length.unit : 1\n" + "provider.STEP.OCC.read.precision.val : 0.\n"; + Standard_Boolean aIsRecursive = Standard_True; + if (!aSession->Load(aString, aIsRecursive)) + { + Message::SendFail() << "Error: configuration is incorrect"; + } +~~~~ +Configuring using a resource file: +~~~~{.cpp} + Handle(DE_Wrapper) aSession = DE_Wrapper::GlobalWrapper(); + TCollection_AsciiString aPathToFile = ""; + Standard_Boolean aIsRecursive = Standard_True; + if (!aSession->Load(aPathToFile, aIsRecursive)) + { + Message::SendFail() << "Error: configuration is incorrect"; + } +~~~~ +@subsubsection occt_de_wrapper_3_2_4 Loading configuration resources. DRAW sample + +Configuring using a resource string: +~~~~{.cpp} +set conf " +global.priority.STEP : OCC +global.general.length.unit : 1 +provider.STEP.OCC.read.iges.bspline.continuity : 1 +provider.STEP.OCC.read.precision.mode : 0 +provider.STEP.OCC.read.precision.val : 0.0001 +" +LoadConfiguration ${conf} -recursive on +~~~~ + +Configuring using a resource file: +~~~~{.cpp} +set pathToFile "" +LoadConfiguration ${pathToFile} -recursive on +~~~~ + +@subsubsection occt_de_wrapper_3_2_5 Saving configuration resources. Dump of configuration DE Session + +Saving the configuration of a DE Session involves dumping all parameters of registered providers. +If a parameter did not change during the session, its value remains as default. + +There are two ways to save a resource: recursive and global parameters only. Recursive is the way to dump all registered provider information. Non-recursive dumps only global parameters, for example, save priority of vendors or the length unit. + +It is possible to filter what vendors or providers to save by providing the correct name of the vendor or provider. + +@subsubsection occt_de_wrapper_3_2_6 Saving configuration resources. Code sample + +Dump to resource string. If the vendors list is empty, saves all vendors. If the providers list is empty, saves all providers of valid vendors. +~~~~{.cpp} + Handle(DE_Wrapper) aSession = DE_Wrapper::GlobalWrapper(); + TColStd_ListOfAsciiString aFormats; + TColStd_ListOfAsciiString aVendors; + aFormats.Appends("STEP"); + aVendors.Appends("OCC"); + Standard_Boolean aIsRecursive = Standard_True; + TCollection_AsciiString aConf = aSession->aConf->Save(aIsRecursive, aFormats, aVendors); +~~~~ +Configure using a resource file. If the vendors list is empty, saves all vendors. If the providers list is empty, saves all providers of valid vendors. +~~~~{.cpp} + Handle(DE_Wrapper) aSession = DE_Wrapper::GlobalWrapper(); + TCollection_AsciiString aPathToFile = ""; + TColStd_ListOfAsciiString aFormats; + TColStd_ListOfAsciiString aVendors; + aFormats.Appends("STEP"); + aVendors.Appends("OCC"); + Standard_Boolean aIsRecursive = Standard_True; + if (!aSession->Save(aPathToFile, aIsRecursive, aFormats,aVendors)) + { + Message::SendFail() << "Error: configuration is not saved"; + } +~~~~ +@subsubsection occt_de_wrapper_3_2_7 Saving configuration resources. DRAW sample + +Dump configuration to string. If no list of vendors is passed or it is empty, all vendors are saved. If no providers list is passed or it is empty, all providers of valid vendors are saved. +~~~~{.cpp} +set vendors "OCC" +set format "STEP" +set dump_conf [DumpConfiguration -recursive on -format ${format} -vendor ${vendors}] +~~~~ + +Dump configuration to file. If no vendors list are set as an argument or it is empty, saves all vendors. If no providers list as argument or it is empty, saves all providers of valid vendors: +~~~~{.cpp} +set vendors "OCC" +set format "STEP" +set pathToFile "" +DumpConfiguration -path ${pathToFile} -recursive on -format ${format} -vendor ${vendors} +~~~~ + +@subsection occt_de_wrapper_3_3 Registering providers + +To transfer a CAD file using DE Wrapper, it is necessary to register a CAD provider. +The provider contains internal and global parameters that have default values in the creation stage. +All registered providers are set to the map with information about its vendor and kept as smart handles. Therefore, it is possible to change the values via handle from external code. + +@subsubsection occt_de_wrapper_3_3_1 Registering providers. Code sample + +It is nesessary to register only one ConfigurationNode for all needed formats. +~~~~{.cpp} +Handle(DE_Wrapper) aSession = DE_Wrapper::GlobalWrapper(); +Handle(DE_ConfigurationNode) aNode = new STEPCAFControl_ConfigurationNode(); +aSession->Bind(aNode); +~~~~ +@subsubsection occt_de_wrapper_3_3_2 Registering providers. DRAW Sample + +Use DRAW with all providers registered by the following command: +~~~~{.cpp} +pload XDE +~~~~ + +@subsubsection occt_de_wrapper_3_3_3 Realtime initialization. Code sample + +It is possible to change a paramater from code using a smart pointer. + +~~~~{.cpp} +// global variable +static Handle(STEPCAFControl_ConfigurationNode) THE_STEP_NODE; + +static Handle(DE_ConfigurationNode) RegisterStepNode() +{ + Handle(DE_Wrapper) aSession = DE_Wrapper::GlobalWrapper(); + if (!THE_STEP_NODE.IsNull()) + { + return THE_STEP_NODE; + } + + THE_STEP_NODE = new STEPCAFControl_ConfigurationNode(); + aSession->Bind(THE_STEP_NODE); + return THE_STEP_NODE; +} + +// Change parameter value +THE_STEP_NODE->InternalParameters.ReadRelationship = false; +THE_STEP_NODE->InternalParameters.ReadName = false; +THE_STEP_NODE->InternalParameters.ReadProps = false; +~~~~ + +@subsection occt_de_wrapper_3_4 Priority of Vendors + +DE session is able to work with several vendors with the same supported CAD format. To choose the preffered vendor for each format, use a special priority list. + +If the high priority vendor's provider is not supported, a transfer operation is needed (write/read), then the next vendor will be chosen. + +@subsubsection occt_de_wrapper_3_4_1 Priority of Vendors. Code sample + +~~~~{.cpp} + Handle(DE_Wrapper) aSession = DE_Wrapper::GlobalWrapper(); + TCollection_AsciiString aFormat = "STEP"; + TColStd_ListOfAsciiString aVendors; + aVendors.Appends("OCC"); // high priority + aVendors.Appends("DTK"); + // Flag to disable not choosen vendors, in this case configuration is possible + // otherwise, lower their priority and continue to check ability to transfer + Standard_Boolean aToDisable = Standard_True; + aSession->ChangePriority(aFormat, aVendors, aToDisable); +~~~~ + +@subsubsection occt_de_wrapper_3_4_2 Priority of Vendors. DRAW Sample + +It is recommended to disable recursion and update only global parameters. +~~~~{.cpp} +set conf " +global.priority.STEP : OCC DTK +" +LoadConfiguration ${conf} -recursive off +~~~~ + +@section occt_de_wrapper_4 Transfer of CAD files + +To transfer from a CAD file to OCC or from OCC to a CAD file, it is necessary to use a configured DE_Wrapper object. It can be local, one-time or global. Global configuration of DE_Wrapper propagates to all nodes via transfer. There are two options for transferring: using OCC shape or XCAF document. It is possible to work only with real path to/from the file. Streaming is not supported (yet). + +The format of input/output file is automatically determined by its extension or contents. + +@subsection occt_de_wrapper_4_1 Transfer of CAD files. Code samples + +Reading STEP file to Shape. +~~~~{.cpp} + Handle(DE_Wrapper) aSession = DE_Wrapper::GlobalWrapper(); + TCollection_AsciiString aPathToFile = "example.stp"; + TopoDS_Shape aShRes; + if (!aSession->Read(aPathToFile, aShRes)) + { + Message::SendFail() << "Error: Can't read file"; + } +~~~~ + +Writing Shape to STEP file. +~~~~{.cpp} + Handle(DE_Wrapper) aSession = DE_Wrapper::GlobalWrapper(); + TCollection_AsciiString aPathToFile = "example.stp"; + TopoDS_Shape aShFrom = ...; + if (!aSession->Write(aPathToFile, aShRes)) + { + Message::SendFail() << "Error: Can't write file"; + } +~~~~ + +Reading STEP file into XCAF document. +~~~~{.cpp} + Handle(DE_Wrapper) aSession = DE_Wrapper::GlobalWrapper(); + TCollection_AsciiString aPathToFile = "example.stp"; + Handle(TDocStd_Document) aDoc = ...; + if (!aSession->Read(aPathToFile, aDoc)) + { + Message::SendFail() << "Error: Can't read file"; + } +~~~~ + +Writing XCAF document into STEP. +~~~~{.cpp} + Handle(DE_Wrapper) aSession = DE_Wrapper::GlobalWrapper(); + TCollection_AsciiString aPathToFile = "example.stp"; + Handle(TDocStd_Document) aDoc = ...; + if (!aSession->Write(aPathToFile, aDoc)) + { + Message::SendFail() << "Error: Can't write file"; + } +~~~~ + +@subsection occt_de_wrapper_4_2 Transfer of CAD files. DRAW samples + +Reading a STEP file into a Shape. +~~~~{.cpp} +set fileName "sample.stp" +readfile shape ${fileName} +~~~~ + +Writing a Shape into STEP. +~~~~{.cpp} +set fileName "sample.stp" +writefile shape ${fileName} +~~~~ + +Reading STEP into XCAF document. +~~~~{.cpp} +set fileName "sample.stp" +ReadFile D ${fileName} +~~~~ + +Writing XCAF document into STEP. +~~~~{.cpp} +set fileName "sample.stp" +WriteFile D ${fileName} +~~~~ + +@subsection occt_de_wrapper_4_3 Transfer using DE Provider. Code sample + +It is possible to read and write CAD files directly from a special provider. + +~~~~{.cpp} +// Creating or getting node +Handle(STEPCAFControl_ConfigurationNode) aNode = new STEPCAFControl_ConfigurationNode(); +// Creationg an one-time provider +Handle(DE_Provider) aProvider = aNode->BuildProvider(); +// Setting configuration with all parameters +aProvider->SetNode(aNode); +if (!aProvider->Read(...)) +{ + Message::SendFail() << "Error: Can't read STEP file"; +} +if (!aProvider->Write(...)) +{ + Message::SendFail() << "Error: Can't write STEP file"; +} +~~~~ + +@subsection occt_de_wrapper_4_4 Temporary configuration via transfer + +It is possible to change the configuration of only one transfer operation. To avoid changing parameters in a session, one-time clone of the session can be created and used for transfer. This way is recommended for use in multithreaded mode. + +@subsubsection occt_de_wrapper_4_4_1 Temporary configuration via transfer. Code sample + +Code sample to configure via transfer. +~~~~{.cpp} + Handle(DE_Wrapper) aSession = DE_Wrapper::GlobalWrapper()->Copy(); + TCollection_AsciiString aString = + "global.priority.STEP : OCC DTK\n" + "global.general.length.unit : 1\n" + "provider.STEP.OCC.read.precision.val : 0.\n"; + if (!aSession->Load(aString, aIsRecursive)) + { + Message::SendFail() << "Error: configuration is incorrect"; + } + TCollection_AsciiString aPathToFile = "example.stp"; + TopoDS_Shape aShRes; + if (!aSession->Read(aPathToFile, aShRes)) + { + Message::SendFail() << "Error: Can't read file"; + } +~~~~ + +@subsubsection occt_de_wrapper_4_4_2 Temporary configuration via transfer. DRAW sample + +Code sample to configure via transfer within DRAW command. +~~~~{.cpp} +set fileName "sample.stp" +readfile S5 $filename -conf "global.general.length.unit : 1000 " +~~~~ + +Code sample to configure via transfer as variable. +~~~~{.cpp} +set fileName "sample.stp" +set conf " +global.priority.STEP : OCC +global.general.length.unit : 1 +provider.STEP.OCC.read.iges.bspline.continuity : 1 +provider.STEP.OCC.read.precision.mode : 0 +provider.STEP.OCC.read.precision.val : 0.0001 +" +readfile S5 $filename -conf ${conf} +~~~~ diff --git a/dox/user_guides/user_guides.md b/dox/user_guides/user_guides.md index bf8192f0b7..76223a876d 100644 --- a/dox/user_guides/user_guides.md +++ b/dox/user_guides/user_guides.md @@ -13,6 +13,7 @@ OCCT User Guides are organized by OCCT modules: * @subpage occt_user_guides__iges "IGES Translator" * @subpage occt_user_guides__step "STEP Translator" * @subpage occt_user_guides__xde "Extended Data Exchange (XDE)" +* @subpage occt_user_guides__de_wrapper "Data Exchange Wrapper (DE Wrapper)" * @subpage occt_user_guides__ocaf "Open CASCADE Application Framework (OCAF)" * @subpage occt_user_guides__test_harness "DRAW Test Harness" * @subpage occt_user_guides__inspector "Inspector" From 2ef94c994e1240fa9abb05d4dd4abb636d470e6c Mon Sep 17 00:00:00 2001 From: akaftasev Date: Fri, 3 Mar 2023 18:43:40 +0300 Subject: [PATCH 466/639] 0033340: Modeling Algorithm - Improve memory management performance in the `PaveFiller` Changed NCollection_BaseAllocator to NCollection_IncAllocator in BOPAlgo_PaveFiller::MakeBlocks() --- src/BOPAlgo/BOPAlgo_PaveFiller_6.cxx | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/BOPAlgo/BOPAlgo_PaveFiller_6.cxx b/src/BOPAlgo/BOPAlgo_PaveFiller_6.cxx index a4e454665d..68fc9e9e97 100644 --- a/src/BOPAlgo/BOPAlgo_PaveFiller_6.cxx +++ b/src/BOPAlgo/BOPAlgo_PaveFiller_6.cxx @@ -62,6 +62,7 @@ #include #include #include +#include #include #include #include @@ -578,14 +579,12 @@ void BOPAlgo_PaveFiller::MakeBlocks(const Message_ProgressRange& theRange) Standard_Integer i, nF1, nF2, aNbC, aNbP, j; Standard_Integer nV1, nV2; Standard_Real aT1, aT2; - Handle(NCollection_BaseAllocator) aAllocator; + Handle(NCollection_BaseAllocator) aAllocator = new NCollection_IncAllocator; BOPDS_ListIteratorOfListOfPaveBlock aItLPB; TopoDS_Edge aES; Handle(BOPDS_PaveBlock) aPBOut; // //-----------------------------------------------------scope f - aAllocator= - NCollection_BaseAllocator::CommonBaseAllocator(); // TColStd_ListOfInteger aLSE(aAllocator), aLBV(aAllocator); TColStd_MapOfInteger aMVOnIn(100, aAllocator), aMVCommon(100, aAllocator), From 6b9e0dc3f8f966f52d200d694c9bb42a2672f050 Mon Sep 17 00:00:00 2001 From: anv Date: Thu, 16 Mar 2023 21:21:40 +0000 Subject: [PATCH 467/639] 0033345: Coding - Memory allocation operators got inaccessible Macros was moved back to public. --- src/STEPCAFControl/STEPCAFControl_Writer.hxx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/STEPCAFControl/STEPCAFControl_Writer.hxx b/src/STEPCAFControl/STEPCAFControl_Writer.hxx index c38d32a2f4..0a6438de7a 100644 --- a/src/STEPCAFControl/STEPCAFControl_Writer.hxx +++ b/src/STEPCAFControl/STEPCAFControl_Writer.hxx @@ -47,7 +47,9 @@ class TopoDS_Shape; //! Also supports multifile writing class STEPCAFControl_Writer { +public: DEFINE_STANDARD_ALLOC + public: //! Creates a writer with an empty From efe960751c1c6abf077870b477aa15e8676c4d71 Mon Sep 17 00:00:00 2001 From: dpasukhi Date: Mon, 20 Feb 2023 12:45:48 +0000 Subject: [PATCH 468/639] 0033331: Data Exchange, Step Import - Unsupported Representation Items Fixed problem with iteration on Null RI --- src/STEPCAFControl/STEPCAFControl_Reader.cxx | 13 ++++++++++--- tests/bugs/step/bug33331 | 14 ++++++++++++++ 2 files changed, 24 insertions(+), 3 deletions(-) create mode 100644 tests/bugs/step/bug33331 diff --git a/src/STEPCAFControl/STEPCAFControl_Reader.cxx b/src/STEPCAFControl/STEPCAFControl_Reader.cxx index a211ebbb94..cae2a1bf28 100644 --- a/src/STEPCAFControl/STEPCAFControl_Reader.cxx +++ b/src/STEPCAFControl/STEPCAFControl_Reader.cxx @@ -4692,9 +4692,16 @@ void collectRepresentationItems(const Interface_Graph& theGraph, const Handle(StepShape_ShapeRepresentation)& theRepresentation, NCollection_Sequence& theItems) { - Handle(StepRepr_HArray1OfRepresentationItem) aReprItems = theRepresentation->Items(); - for (Standard_Integer itemIt = aReprItems->Lower(); itemIt <= aReprItems->Upper(); itemIt++) - theItems.Append(aReprItems->Value(itemIt)); + for (StepRepr_HArray1OfRepresentationItem::Iterator anIter(theRepresentation->Items()->Array1()); + anIter.More(); anIter.Next()) + { + const Handle(StepRepr_RepresentationItem)& anReprItem = anIter.Value(); + if (anReprItem.IsNull()) + { + continue; + } + theItems.Append(anReprItem); + } Interface_EntityIterator entIt = theGraph.TypedSharings(theRepresentation, STANDARD_TYPE(StepRepr_RepresentationRelationship)); for (entIt.Start(); entIt.More(); entIt.Next()) diff --git a/tests/bugs/step/bug33331 b/tests/bugs/step/bug33331 new file mode 100644 index 0000000000..73cc77d328 --- /dev/null +++ b/tests/bugs/step/bug33331 @@ -0,0 +1,14 @@ +puts "====================================" +puts "0033331: Data Exchange, Step Import - Unsupported Representation Items" +puts "====================================" +puts "" + +pload DCAF +catch {Close D} + +param "read.stepcaf.subshapes.name" 1 + +ReadStep D [locate_data_file bug33331.stp] + +param "read.stepcaf.subshapes.name" 0 +Close D From 5e432742803ba35d6c2fae0df3fdd21152fd41bc Mon Sep 17 00:00:00 2001 From: dpasukhi Date: Thu, 9 Mar 2023 16:24:11 +0000 Subject: [PATCH 469/639] 0033337: DRAW - Can't load plugins on Linux OS WSL 2 have windows FileSystem and as a result we have \r symbols before \n For this cases we can just remove \r\n (\n is a last symbol) for the node value. --- src/Resource/Resource_Manager.cxx | 8 ++++++++ tests/bugs/demo/bug23671 | 3 --- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/src/Resource/Resource_Manager.cxx b/src/Resource/Resource_Manager.cxx index 01b8ab443f..e773d624d6 100644 --- a/src/Resource/Resource_Manager.cxx +++ b/src/Resource/Resource_Manager.cxx @@ -225,6 +225,14 @@ static Resource_KindOfLine WhatKindOfLine(OSD_File& aFile, aToken2.Clear(); else { Line.Remove(1,Pos-1); + const Standard_Integer aLineLength = Line.Length(); + if (aLineLength >= 2) + { + if (Line.Value(aLineLength - 1) == '\r') + { + Line.Remove(aLineLength - 1); + } + } Line.Remove(Line.Length()); aToken2 = Line; } diff --git a/tests/bugs/demo/bug23671 b/tests/bugs/demo/bug23671 index b6dd7dd3f3..165f954f01 100755 --- a/tests/bugs/demo/bug23671 +++ b/tests/bugs/demo/bug23671 @@ -1,6 +1,3 @@ -puts "TODO CR23671 Linux: Error" -puts "TODO CR23671 Linux: Draw_Failure: Could not open" - puts "============" puts "CR23671" puts "============" From c51df6bfd2c494667fc8df59100e6180e819ec1c Mon Sep 17 00:00:00 2001 From: dpasukhi Date: Thu, 9 Mar 2023 17:08:39 +0000 Subject: [PATCH 470/639] 0033327: Data Exchange, IGES Import - SubfigureDef can't read string Fixed problem with texted types Added checking for null string for subfigure via XCAF transferring --- src/IGESCAFControl/IGESCAFControl_Reader.cxx | 3 +- src/IGESData/IGESData_ParamReader.cxx | 61 +++++++++++++------- src/IGESData/IGESData_ParamReader.hxx | 2 +- tests/bugs/iges/bug33327 | 16 +++++ 4 files changed, 60 insertions(+), 22 deletions(-) create mode 100644 tests/bugs/iges/bug33327 diff --git a/src/IGESCAFControl/IGESCAFControl_Reader.cxx b/src/IGESCAFControl/IGESCAFControl_Reader.cxx index 40ae06eb63..86b083fe83 100644 --- a/src/IGESCAFControl/IGESCAFControl_Reader.cxx +++ b/src/IGESCAFControl/IGESCAFControl_Reader.cxx @@ -322,7 +322,8 @@ Standard_Boolean IGESCAFControl_Reader::Transfer (const Handle(TDocStd_Document) //Checks that current entity is a subfigure Handle(IGESBasic_SubfigureDef) aSubfigure = Handle(IGESBasic_SubfigureDef)::DownCast (ent); - if (GetNameMode() && !aSubfigure.IsNull() && STool->Search (S, L, Standard_True, Standard_True)) + if (GetNameMode() && !aSubfigure.IsNull() && !aSubfigure->Name().IsNull() && + STool->Search(S, L, Standard_True, Standard_True)) { //In this case we attach subfigure name to the label, instead of default "COMPOUND" Handle(TCollection_HAsciiString) aName = aSubfigure->Name(); diff --git a/src/IGESData/IGESData_ParamReader.cxx b/src/IGESData/IGESData_ParamReader.cxx index 84e675ba35..6e15ca77f5 100644 --- a/src/IGESData/IGESData_ParamReader.cxx +++ b/src/IGESData/IGESData_ParamReader.cxx @@ -633,34 +633,55 @@ Standard_Boolean IGESData_ParamReader::ReadXYZ //======================================================================= //function : ReadText -//purpose : +//purpose : //======================================================================= - -Standard_Boolean IGESData_ParamReader::ReadText - (const IGESData_ParamCursor& PC, const Message_Msg& amsg, - Handle(TCollection_HAsciiString)& val) +Standard_Boolean IGESData_ParamReader::ReadText(const IGESData_ParamCursor& thePC, + const Message_Msg& theMsg, + Handle(TCollection_HAsciiString)& theVal) { - if (!PrepareRead(PC,Standard_False)) return Standard_False; - const Interface_FileParameter& FP = theparams->Value(theindex+thebase); - if (FP.ParamType() != Interface_ParamText) { - if (FP.ParamType() == Interface_ParamVoid) { - val = new TCollection_HAsciiString(""); + if (!PrepareRead(thePC, Standard_False)) + { + return Standard_False; + } + const Interface_FileParameter& aFP = theparams->Value(theindex + thebase); + if (aFP.ParamType() != Interface_ParamText) + { + theVal = new TCollection_HAsciiString(""); + if (aFP.ParamType() == Interface_ParamVoid) + { return Standard_True; } - SendFail (amsg); + SendFail(theMsg); return Standard_False; } - Handle(TCollection_HAsciiString) tval = new TCollection_HAsciiString (FP.CValue()); - Standard_Integer lnt = tval->Length(); - Standard_Integer lnh = tval->Location(1,'H',1,lnt); - if (lnh <= 1 || lnh >= lnt) { - SendFail (amsg); + const Handle(TCollection_HAsciiString) aBaseValue = new TCollection_HAsciiString(aFP.CValue()); + const Standard_Integer aBaseLength = aBaseValue->Length(); + const Standard_Integer aSymbolLocation = aBaseValue->Location(1, 'H', 1, aBaseLength); + if (aSymbolLocation <= 1 || aSymbolLocation > aBaseLength) + { + theVal = new TCollection_HAsciiString(""); + SendFail(theMsg); return Standard_False; - } else { - Standard_Integer hol = atoi (tval->SubString(1,lnh-1)->ToCString()); - if (hol != (lnt-lnh)) SendWarning (amsg); } - val = new TCollection_HAsciiString(tval->SubString(lnh+1,lnt)->ToCString()); + const TCollection_AsciiString aSpecialSubString = aBaseValue->String().SubString(1, aSymbolLocation - 1); + if (!aSpecialSubString.IsIntegerValue()) + { + theVal = new TCollection_HAsciiString(""); + SendFail(theMsg); + return Standard_False; + } + Standard_Integer aResLength = aSpecialSubString.IntegerValue(); + if (aResLength != (aBaseLength - aSymbolLocation)) + { + SendWarning(theMsg); + aResLength = aBaseLength - aSymbolLocation; + } + TCollection_AsciiString aResString; + if (aResLength > 0) + { + aResString = aBaseValue->String().SubString(aSymbolLocation + 1, aBaseLength); + } + theVal = new TCollection_HAsciiString(aResString); return Standard_True; } diff --git a/src/IGESData/IGESData_ParamReader.hxx b/src/IGESData/IGESData_ParamReader.hxx index de5f6fa951..70988b2f25 100644 --- a/src/IGESData/IGESData_ParamReader.hxx +++ b/src/IGESData/IGESData_ParamReader.hxx @@ -200,7 +200,7 @@ public: //! For Message Standard_EXPORT Standard_Boolean ReadXYZ (const IGESData_ParamCursor& PC, const Standard_CString mess, gp_XYZ& val); - Standard_EXPORT Standard_Boolean ReadText (const IGESData_ParamCursor& PC, const Message_Msg& amsg, Handle(TCollection_HAsciiString)& val); + Standard_EXPORT Standard_Boolean ReadText (const IGESData_ParamCursor& thePC, const Message_Msg& theMsg, Handle(TCollection_HAsciiString)& theVal); //! Reads a Text value from parameter "num", as a String from //! Collection, that is, Hollerith text without leading "nnnH" diff --git a/tests/bugs/iges/bug33327 b/tests/bugs/iges/bug33327 new file mode 100644 index 0000000000..5a17a77bf4 --- /dev/null +++ b/tests/bugs/iges/bug33327 @@ -0,0 +1,16 @@ +puts "============" +puts "0033327: Data Exchange, IGES Import - SubfigureDef can't read string" +puts "============" + +pload DCAF + +Close D -silent + +ReadIges D [locate_data_file "bug33327.igs"] +vclear +vinit View1 +XDisplay -dispMode 1 D +vfit +vdump "$imagedir/${casename}_src.png" + +Close D From c479c4f6d89ed7c5e33dd35a5e110f13776b7cab Mon Sep 17 00:00:00 2001 From: dorlov Date: Fri, 13 Jan 2023 13:25:17 +0000 Subject: [PATCH 471/639] 0023638: Data Exchange - Reading IGES file produced invalid shape Removed double healing of Iges group entities Added ShapeBuild_ReShape member to the IGESData_IGESModel class, shapes which are registered in ShapeBuild_ReShape class does not process to healing --- src/IGESData/IGESData_IGESModel.cxx | 3 + src/IGESData/IGESData_IGESModel.hxx | 9 +- src/IGESToBRep/IGESToBRep_Actor.cxx | 11 +- src/ShapeFix/ShapeFix_Shape.cxx | 8 +- src/XSAlgo/XSAlgo_AlgoContainer.cxx | 160 ++++++++++++++++------------ src/XSAlgo/XSAlgo_AlgoContainer.hxx | 50 +++++++-- tests/bugs/iges/bug23638 | 4 +- 7 files changed, 153 insertions(+), 92 deletions(-) diff --git a/src/IGESData/IGESData_IGESModel.cxx b/src/IGESData/IGESData_IGESModel.cxx index 091495345f..c58873a852 100644 --- a/src/IGESData/IGESData_IGESModel.cxx +++ b/src/IGESData/IGESData_IGESModel.cxx @@ -23,6 +23,7 @@ #include #include #include +#include #include #include #include @@ -47,6 +48,7 @@ void IGESData_VerifyDate IGESData_IGESModel::IGESData_IGESModel () { thestart = new TColStd_HSequenceOfHAsciiString(); + myReShape = new ShapeBuild_ReShape(); // thecheckstx = new Interface_Check; // thechecksem = new Interface_Check; } @@ -62,6 +64,7 @@ void IGESData_IGESModel::ClearHeader () IGESData_GlobalSection newheader; // Un peu brutal, certes theheader = newheader; thestart = new TColStd_HSequenceOfHAsciiString(); + myReShape = new ShapeBuild_ReShape(); } diff --git a/src/IGESData/IGESData_IGESModel.hxx b/src/IGESData/IGESData_IGESModel.hxx index 1e30288963..128b99eb1e 100644 --- a/src/IGESData/IGESData_IGESModel.hxx +++ b/src/IGESData/IGESData_IGESModel.hxx @@ -22,10 +22,10 @@ class IGESData_IGESEntity; class Interface_Check; +class ShapeBuild_ReShape; class Standard_Transient; class TCollection_HAsciiString; - class IGESData_IGESModel; DEFINE_STANDARD_HANDLE(IGESData_IGESModel, Interface_InterfaceModel) @@ -151,8 +151,11 @@ public: //! i.e. a string "Dnn" with nn = directory entry number (2*N-1) Standard_EXPORT Handle(TCollection_HAsciiString) StringLabel (const Handle(Standard_Transient)& ent) const Standard_OVERRIDE; + //! Gets ReShape used to store a model's shapes changes + const Handle(ShapeBuild_ReShape)& ReShape() const { return myReShape; } - + //! Sets ReShape used to store a history of changes of the model's shapes + void SetReShape(const Handle(ShapeBuild_ReShape)& theReShape) { myReShape = theReShape; } DEFINE_STANDARD_RTTIEXT(IGESData_IGESModel,Interface_InterfaceModel) @@ -166,7 +169,7 @@ private: Handle(TColStd_HSequenceOfHAsciiString) thestart; IGESData_GlobalSection theheader; - + Handle(ShapeBuild_ReShape) myReShape; }; diff --git a/src/IGESToBRep/IGESToBRep_Actor.cxx b/src/IGESToBRep/IGESToBRep_Actor.cxx index dc21b09686..0304ddec5b 100644 --- a/src/IGESToBRep/IGESToBRep_Actor.cxx +++ b/src/IGESToBRep/IGESToBRep_Actor.cxx @@ -131,8 +131,6 @@ static void TrimTolerances (const TopoDS_Shape& shape, } } - - //======================================================================= //function : Transfer //purpose : @@ -196,10 +194,11 @@ Handle(Transfer_Binder) IGESToBRep_Actor::Transfer // fixing shape Handle(Standard_Transient) info; - shape = XSAlgo::AlgoContainer()->ProcessShape( shape, theeps, CAS.GetMaxTol(), - "read.iges.resource.name", - "read.iges.sequence", info, - aPS.Next()); + shape = XSAlgo::AlgoContainer()->ProcessShape(shape, theeps, CAS.GetMaxTol(), + "read.iges.resource.name", + "read.iges.sequence", + info, mymodel->ReShape(), + aPS.Next()); XSAlgo::AlgoContainer()->MergeTransferInfo(TP, info, nbTPitems); } diff --git a/src/ShapeFix/ShapeFix_Shape.cxx b/src/ShapeFix/ShapeFix_Shape.cxx index fc0c89de99..1e45f0b469 100644 --- a/src/ShapeFix/ShapeFix_Shape.cxx +++ b/src/ShapeFix/ShapeFix_Shape.cxx @@ -112,18 +112,20 @@ Standard_Boolean ShapeFix_Shape::Perform(const Message_ProgressRange& theProgres TopLoc_Location nullLoc,L; L = myShape.Location(); TopoDS_Shape aShapeNullLoc = myShape; + const Standard_Boolean aIsRecorded = Context()->IsNewShape(myShape); aShapeNullLoc.Location(nullLoc); - if(myMapFixingShape.Contains(aShapeNullLoc)) { + if(aIsRecorded || myMapFixingShape.Contains(aShapeNullLoc)) + { myShape.Location(L, Standard_False); myResult = Context()->Apply(myShape); status = Standard_True; return status; } - else myMapFixingShape.Add(aShapeNullLoc); + myMapFixingShape.Add(aShapeNullLoc); //--------------------------------------- myShape.Location(L, Standard_False); TopoDS_Shape S = Context()->Apply(myShape); - if ( NeedFix ( myFixVertexPositionMode ) ) + if (NeedFix(myFixVertexPositionMode)) ShapeFix::FixVertexPosition(S,Precision(),Context()); st = S.ShapeType(); diff --git a/src/XSAlgo/XSAlgo_AlgoContainer.cxx b/src/XSAlgo/XSAlgo_AlgoContainer.cxx index 6f3ccb3bcb..5b9cd8b79c 100644 --- a/src/XSAlgo/XSAlgo_AlgoContainer.cxx +++ b/src/XSAlgo/XSAlgo_AlgoContainer.cxx @@ -82,103 +82,131 @@ void XSAlgo_AlgoContainer::PrepareForTransfer() const //======================================================================= //function : ProcessShape -//purpose : +//purpose : //======================================================================= - -TopoDS_Shape XSAlgo_AlgoContainer::ProcessShape (const TopoDS_Shape& shape, - const Standard_Real Prec, - const Standard_Real maxTol, - const Standard_CString prscfile, - const Standard_CString pseq, - Handle(Standard_Transient)& info, - const Message_ProgressRange& theProgress, - const Standard_Boolean NonManifold) const +TopoDS_Shape XSAlgo_AlgoContainer::ProcessShape(const TopoDS_Shape& theShape, + const Standard_Real thePrec, + const Standard_Real theMaxTol, + const Standard_CString thePrscfile, + const Standard_CString thePseq, + Handle(Standard_Transient)& theInfo, + const Handle(ShapeBuild_ReShape)& theReShape, + const Message_ProgressRange& theProgress, + const Standard_Boolean theNonManifold) const { - if ( shape.IsNull() ) return shape; - - Handle(ShapeProcess_ShapeContext) context = Handle(ShapeProcess_ShapeContext)::DownCast(info); - if ( context.IsNull() ) + if (theShape.IsNull()) { - Standard_CString rscfile = Interface_Static::CVal(prscfile); - if (rscfile != nullptr && strlen (rscfile) == 0) + return theShape; + } + + Handle(ShapeProcess_ShapeContext) aContext = Handle(ShapeProcess_ShapeContext)::DownCast(theInfo); + if (aContext.IsNull()) + { + Standard_CString aRscfile = Interface_Static::CVal(thePrscfile); + if (aRscfile != nullptr && strlen(aRscfile) == 0) { - context = new ShapeProcess_ShapeContext(shape, nullptr); - Interface_Static::FillMap(context->ResourceManager()->GetMap()); + aContext = new ShapeProcess_ShapeContext(theShape, nullptr); + Interface_Static::FillMap(aContext->ResourceManager()->GetMap()); } else { - if (!rscfile) - rscfile = prscfile; - context = new ShapeProcess_ShapeContext(shape, rscfile); + if (!aRscfile) + aRscfile = thePrscfile; + aContext = new ShapeProcess_ShapeContext(theShape, aRscfile); } - context->SetDetalisation(TopAbs_EDGE); + aContext->SetDetalisation(TopAbs_EDGE); } - context->SetNonManifold(NonManifold); - info = context; - - Standard_CString seq = Interface_Static::CVal ( pseq ); - if ( ! seq ) seq = pseq; - + aContext->SetNonManifold(theNonManifold); + theInfo = aContext; + + Standard_CString aSeq = Interface_Static::CVal(thePseq); + if (!aSeq) aSeq = thePseq; + // if resource file is not loaded or does not define .exec.op, // do default fixes - Handle(Resource_Manager) rsc = context->ResourceManager(); - TCollection_AsciiString str ( seq ); - str += ".exec.op"; - if ( ! rsc->Find ( str.ToCString() ) ) { + Handle(Resource_Manager) aRsc = aContext->ResourceManager(); + TCollection_AsciiString aStr(aSeq); + aStr += ".exec.op"; + if (!aRsc->Find(aStr.ToCString())) + { #ifdef OCCT_DEBUG { - static Standard_Integer time = 0; - if ( ! time ) - std::cout << "Warning: XSAlgo_AlgoContainer::ProcessShape(): Sequence " << str.ToCString() << - " is not defined in " << prscfile << " resource; do default processing" << std::endl; - time++; + static Standard_Integer aTime = 0; + if (!aTime) + std::cout << "Warning: XSAlgo_AlgoContainer::ProcessShape(): Sequence " << aStr.ToCString() << + " is not defined in " << thePrscfile << " resource; do default processing" << std::endl; + aTime++; } #endif // if reading, do default ShapeFix - if ( ! strncmp ( pseq, "read.", 5 ) ) { + if (!strncmp(thePseq, "read.", 5)) + { try { OCC_CATCH_SIGNALS - Handle(ShapeExtend_MsgRegistrator) msg = new ShapeExtend_MsgRegistrator; - Handle(ShapeFix_Shape) sfs = ShapeAlgo::AlgoContainer()->ToolContainer()->FixShape(); - sfs->Init ( shape ); - sfs->SetMsgRegistrator ( msg ); - sfs->SetPrecision ( Prec ); - sfs->SetMaxTolerance ( maxTol ); - sfs->FixFaceTool()->FixWireTool()->FixSameParameterMode() = Standard_False; - sfs->FixSolidTool()->CreateOpenSolidMode() = Standard_False; - sfs->Perform(theProgress); - - TopoDS_Shape S = sfs->Shape(); - if ( ! S.IsNull() && S != shape ) { - context->RecordModification ( sfs->Context(), msg ); - context->SetResult ( S ); - } + Handle(ShapeExtend_MsgRegistrator) aMsg = new ShapeExtend_MsgRegistrator; + Handle(ShapeFix_Shape) aSfs = ShapeAlgo::AlgoContainer()->ToolContainer()->FixShape(); + aSfs->Init(theShape); + aSfs->SetMsgRegistrator(aMsg); + aSfs->SetPrecision(thePrec); + aSfs->SetMaxTolerance(theMaxTol); + aSfs->FixFaceTool()->FixWireTool()->FixSameParameterMode() = Standard_False; + aSfs->FixSolidTool()->CreateOpenSolidMode() = Standard_False; + aSfs->SetContext(theReShape); + aSfs->Perform(theProgress); + + TopoDS_Shape aShape = aSfs->Shape(); + if (!aShape.IsNull() && aShape != theShape) + { + aContext->RecordModification(aSfs->Context(), aMsg); + aContext->SetResult(aShape); + } } - catch (Standard_Failure const& anException) { + catch (Standard_Failure const& anException) + { #ifdef OCCT_DEBUG - std::cout << "Error: XSAlgo_AlgoContainer::ProcessShape(): Exception in ShapeFix::Shape" << std::endl; + std::cout << "Error: XSAlgo_AlgoContainer::ProcessShape(): Exception in ShapeFix::Shape" << std::endl; anException.Print(std::cout); std::cout << std::endl; #endif - (void)anException; + (void)anException; } - return context->Result(); + return aContext->Result(); } // for writing, define default sequence of DirectFaces - else if ( ! strncmp ( pseq, "write.", 6 ) ) { - rsc->SetResource ( str.ToCString(), "DirectFaces" ); + else if (!strncmp(thePseq, "write.", 6)) + { + aRsc->SetResource(aStr.ToCString(), "DirectFaces"); } } - + // Define runtime tolerances and do Shape Processing - rsc->SetResource ( "Runtime.Tolerance", Prec ); - rsc->SetResource ( "Runtime.MaxTolerance", maxTol ); + aRsc->SetResource("Runtime.Tolerance", thePrec); + aRsc->SetResource("Runtime.MaxTolerance", theMaxTol); - if ( !ShapeProcess::Perform(context, seq, theProgress) ) - return shape; // return original shape + if (!ShapeProcess::Perform(aContext, aSeq, theProgress)) + return theShape; // return original shape - return context->Result(); + return aContext->Result(); } - + +//======================================================================= +//function : ProcessShape +//purpose : +//======================================================================= +TopoDS_Shape XSAlgo_AlgoContainer::ProcessShape(const TopoDS_Shape& theShape, + const Standard_Real thePrec, + const Standard_Real theMaxTol, + const Standard_CString thePrscfile, + const Standard_CString thePseq, + Handle(Standard_Transient)& theInfo, + const Message_ProgressRange& theProgress, + const Standard_Boolean theNonManifold) const +{ + Handle(ShapeBuild_ReShape) aReShape = new ShapeBuild_ReShape(); + return ProcessShape(theShape, thePrec, theMaxTol, thePrscfile, + thePseq, theInfo, aReShape, theProgress, + theNonManifold); +} + //======================================================================= //function : PerformFixShape //purpose : diff --git a/src/XSAlgo/XSAlgo_AlgoContainer.hxx b/src/XSAlgo/XSAlgo_AlgoContainer.hxx index 513fe54f91..122051e42b 100644 --- a/src/XSAlgo/XSAlgo_AlgoContainer.hxx +++ b/src/XSAlgo/XSAlgo_AlgoContainer.hxx @@ -23,6 +23,7 @@ #include #include +class ShapeBuild_ReShape; class XSAlgo_ToolContainer; class TopoDS_Shape; class TopoDS_Edge; @@ -30,7 +31,6 @@ class TopoDS_Face; class Transfer_TransientProcess; class Transfer_FinderProcess; - class XSAlgo_AlgoContainer; DEFINE_STANDARD_HANDLE(XSAlgo_AlgoContainer, Standard_Transient) @@ -55,16 +55,44 @@ public: Standard_EXPORT virtual void PrepareForTransfer() const; //! Does shape processing with specified tolerances - //! and returns resulting shape and associated information - //! in the form of Transient. - //! This information should be later transmitted to - //! MergeTransferInfo in order to be recorded in the - //! translation map - Standard_EXPORT virtual TopoDS_Shape ProcessShape ( - const TopoDS_Shape& shape, const Standard_Real Prec, const Standard_Real MaxTol, - const Standard_CString rscfile, const Standard_CString seq, Handle(Standard_Transient)& info, - const Message_ProgressRange& theProgress = Message_ProgressRange(), - const Standard_Boolean NonManifold = Standard_False) const; + //! @param[in] theShape shape to process + //! @param[in] thePrec basic precision and tolerance + //! @param[in] theMaxTol maximum allowed tolerance + //! @param[in] thePrscfile name of the resource file + //! @param[in] thePseq name of the sequence of operators defined in the resource file for Shape Processing + //! @param[out] theInfo information to be recorded in the translation map + //! @param[in] theProgress progress indicator + //! @param[in] theNonManifold flag to proceed with non-manifold topology + //! @return the processed shape + Standard_EXPORT virtual TopoDS_Shape ProcessShape (const TopoDS_Shape& theShape, + const Standard_Real thePrec, + const Standard_Real theMaxTol, + const Standard_CString thePrscfile, + const Standard_CString thePseq, + Handle(Standard_Transient)& theInfo, + const Message_ProgressRange& theProgress = Message_ProgressRange(), + const Standard_Boolean theNonManifold = Standard_False) const; + + //! Does shape processing with specified tolerances + //! @param[in] theShape shape to process + //! @param[in] thePrec basic precision and tolerance + //! @param[in] theMaxTol maximum allowed tolerance + //! @param[in] thePrscfile name of the resource file + //! @param[in] thePseq name of the sequence of operators defined in the resource file for Shape Processing + //! @param[out] theInfo information to be recorded in the translation map + //! @param[in] theReShape tool to record the modifications of input shape + //! @param[in] theProgress progress indicator + //! @param[in] theNonManifold flag to proceed with non-manifold topology + //! @return the processed shape + Standard_EXPORT virtual TopoDS_Shape ProcessShape(const TopoDS_Shape& theShape, + const Standard_Real thePrec, + const Standard_Real theMaxTol, + const Standard_CString thePrscfile, + const Standard_CString thePseq, + Handle(Standard_Transient)& theInfo, + const Handle(ShapeBuild_ReShape)& theReShape, + const Message_ProgressRange& theProgress = Message_ProgressRange(), + const Standard_Boolean theNonManifold = Standard_False) const; //! Checks quality of pcurve of the edge on the given face, //! and corrects it if necessary. diff --git a/tests/bugs/iges/bug23638 b/tests/bugs/iges/bug23638 index b43be2433e..ba614b387c 100755 --- a/tests/bugs/iges/bug23638 +++ b/tests/bugs/iges/bug23638 @@ -1,4 +1,4 @@ -puts "TODO OCC23638 ALL: Faulty shapes in variables faulty_1 to faulty_" +puts "TODO OCC23638 ALL: Faulty shapes in variables faulty_1 to faulty_1" puts "============" puts "CR23638" @@ -8,8 +8,6 @@ puts "" # Reading IGES file produced invalid shape ####################################################################### -param read.surfacecurve.mode -3 - igesread [locate_data_file bug23638_cadbad.igs] result * checkshape result From f9998f03ad9e7fdf6c2706cda5c224146cfc7980 Mon Sep 17 00:00:00 2001 From: mzernova Date: Tue, 7 Feb 2023 02:17:58 +0000 Subject: [PATCH 472/639] 0031777: Visualization - improve SelectMgr_EntityOwner to process selection scheme The selection scheme has been propagated to Owner object interface, and the AIS_Selection::Select() method has been replaced to unify the logic. --- src/AIS/AIS_InteractiveContext.cxx | 39 +++++-- src/AIS/AIS_InteractiveContext.hxx | 3 + src/AIS/AIS_Selection.cxx | 135 +++++++++--------------- src/AIS/AIS_Selection.hxx | 25 +++-- src/SelectMgr/SelectMgr_EntityOwner.cxx | 45 ++++++++ src/SelectMgr/SelectMgr_EntityOwner.hxx | 7 ++ 6 files changed, 158 insertions(+), 96 deletions(-) diff --git a/src/AIS/AIS_InteractiveContext.cxx b/src/AIS/AIS_InteractiveContext.cxx index 04d50baf78..866259af85 100644 --- a/src/AIS/AIS_InteractiveContext.cxx +++ b/src/AIS/AIS_InteractiveContext.cxx @@ -3228,6 +3228,30 @@ void AIS_InteractiveContext::ClearSelected (const Standard_Boolean theToUpdateVi } } +//======================================================================= +//function : isDetected +//purpose : +//======================================================================= +Standard_Boolean AIS_InteractiveContext::isDetected (const Handle(AIS_InteractiveObject)& theObject) +{ + for (Standard_Integer aDetIter = myDetectedSeq.Lower(); aDetIter <= myDetectedSeq.Upper(); aDetIter++) + { + Handle(SelectMgr_EntityOwner) aPicked = MainSelector()->Picked(myDetectedSeq(aDetIter)); + Handle(AIS_InteractiveObject) anObj; + if (!aPicked.IsNull()) + { + anObj = Handle(AIS_InteractiveObject)::DownCast(aPicked->Selectable()); + } + + if (!anObj.IsNull() + && anObj == theObject) + { + return Standard_True; + } + } + return Standard_False; +} + //======================================================================= //function : SetSelected //purpose : Sets the whole object as selected and highlights it with selection color @@ -3288,7 +3312,8 @@ void AIS_InteractiveContext::SetSelected (const Handle(AIS_InteractiveObject)& t } // added to avoid untimely viewer update... - mySelection->ClearAndSelect (anOwner); + const Handle(AIS_InteractiveObject) anObj = Handle(AIS_InteractiveObject)::DownCast (anOwner->Selectable()); + mySelection->ClearAndSelect (anOwner, myFilters, isDetected (anObj)); if (myAutoHilight) { @@ -3350,7 +3375,7 @@ void AIS_InteractiveContext::SetSelected (const Handle(SelectMgr_EntityOwner)& t unhighlightSelected(); } - mySelection->ClearAndSelect (theOwner); + mySelection->ClearAndSelect (theOwner, myFilters, isDetected (anObject)); if (myAutoHilight) { Handle(Prs3d_Drawer) aCustomStyle; @@ -3401,16 +3426,17 @@ void AIS_InteractiveContext::AddOrRemoveSelected (const Handle(SelectMgr_EntityO return; } - if (!myFilters->IsOk(theOwner) && !theOwner->IsSelected()) + if (!myFilters->IsOk (theOwner) && !theOwner->IsSelected()) { return; } - mySelection->Select (theOwner); + AIS_SelectionScheme aSelScheme = theOwner->IsSelected() ? AIS_SelectionScheme_Remove : AIS_SelectionScheme_Add; + const Handle(AIS_InteractiveObject) anObj = Handle(AIS_InteractiveObject)::DownCast (theOwner->Selectable()); + mySelection->Select (theOwner, myFilters, aSelScheme, isDetected (anObj)); if (myAutoHilight) { - const Handle(AIS_InteractiveObject) anObj = Handle(AIS_InteractiveObject)::DownCast (theOwner->Selectable()); Handle(AIS_GlobalStatus)* aStatusPtr = myObjects.ChangeSeek (anObj); if (!aStatusPtr) { @@ -3469,7 +3495,8 @@ Standard_Boolean AIS_InteractiveContext::SetSelectedState (const Handle(SelectMg } else { - const AIS_SelectStatus aSelStatus = mySelection->Select (theEntity); + const Handle(AIS_InteractiveObject) anObj = Handle(AIS_InteractiveObject)::DownCast(theEntity->Selectable()); + const AIS_SelectStatus aSelStatus = mySelection->Select (theEntity, myFilters, AIS_SelectionScheme_Remove, isDetected (anObj)); theEntity->SetSelected (false); return aSelStatus == AIS_SS_Removed; } diff --git a/src/AIS/AIS_InteractiveContext.hxx b/src/AIS/AIS_InteractiveContext.hxx index 36c0cb174b..64c30eb89d 100644 --- a/src/AIS/AIS_InteractiveContext.hxx +++ b/src/AIS/AIS_InteractiveContext.hxx @@ -1302,6 +1302,9 @@ protected: //! @name internal methods Standard_EXPORT AIS_StatusOfDetection moveTo (const Handle(V3d_View)& theView, const Standard_Boolean theToRedrawOnUpdate); + //! Returns True if the object is detected. + Standard_EXPORT Standard_Boolean isDetected (const Handle(AIS_InteractiveObject)& theObject); + //! Helper function to unhighlight all entity owners currently highlighted with seleciton color. Standard_EXPORT void unselectOwners (const Handle(AIS_InteractiveObject)& theObject); diff --git a/src/AIS/AIS_Selection.cxx b/src/AIS/AIS_Selection.cxx index 2b55208576..b0acb5ffa1 100644 --- a/src/AIS/AIS_Selection.cxx +++ b/src/AIS/AIS_Selection.cxx @@ -55,24 +55,38 @@ void AIS_Selection::Clear() //function : Select //purpose : //======================================================================= -AIS_SelectStatus AIS_Selection::Select (const Handle(SelectMgr_EntityOwner)& theObject) +AIS_SelectStatus AIS_Selection::Select (const Handle(SelectMgr_EntityOwner)& theOwner, + const Handle(SelectMgr_Filter)& theFilter, + const AIS_SelectionScheme theSelScheme, + const Standard_Boolean theIsDetected) { - if (theObject.IsNull() - || !theObject->HasSelectable()) + if (theOwner.IsNull() + || !theOwner->HasSelectable()) { return AIS_SS_NotDone; } - if (!myResultMap.IsBound (theObject)) + const Standard_Boolean isDetected = theIsDetected + && (theFilter.IsNull() || theFilter->IsOk (theOwner)); + + const Standard_Boolean wasSelected = theOwner->IsSelected(); + const Standard_Boolean toSelect = theOwner->Select (theSelScheme, isDetected); + + if (toSelect && !wasSelected) { AIS_NListOfEntityOwner::Iterator aListIter; - myresult.Append (theObject, aListIter); - myResultMap.Bind (theObject, aListIter); - theObject->SetSelected (Standard_True); + myresult.Append (theOwner, aListIter); + myResultMap.Bind (theOwner, aListIter); + theOwner->SetSelected (Standard_True); return AIS_SS_Added; } - AIS_NListOfEntityOwner::Iterator aListIter = myResultMap.Find (theObject); + if (!toSelect && !wasSelected) + { + return AIS_SS_NotDone; + } + + AIS_NListOfEntityOwner::Iterator aListIter = myResultMap.Find (theOwner); if (myIterator == aListIter) { if (myIterator.More()) @@ -88,14 +102,14 @@ AIS_SelectStatus AIS_Selection::Select (const Handle(SelectMgr_EntityOwner)& the // In the mode of advanced mesh selection only one owner is created for all selection modes. // It is necessary to check the current detected entity // and remove the owner from map only if the detected entity is the same as previous selected (IsForcedHilight call) - if (theObject->IsForcedHilight()) + if (theOwner->IsForcedHilight()) { return AIS_SS_Added; } myresult.Remove (aListIter); - myResultMap.UnBind (theObject); - theObject->SetSelected (Standard_False); + myResultMap.UnBind (theOwner); + theOwner->SetSelected (Standard_False); // update list iterator for next object in list if any if (aListIter.More()) @@ -142,87 +156,40 @@ void AIS_Selection::SelectOwners (const AIS_NArray1OfEntityOwner& thePickedOwner const Standard_Boolean theToAllowSelOverlap, const Handle(SelectMgr_Filter)& theFilter) { - (void )theToAllowSelOverlap; - switch (theSelScheme) - { - case AIS_SelectionScheme_UNKNOWN: - { - return; - } - case AIS_SelectionScheme_ReplaceExtra: - { - // If picked owners is equivalent to the selected then just clear selected - // Else go to AIS_SelectionScheme_Replace - if (thePickedOwners.Size() == myresult.Size()) - { - Standard_Boolean isTheSame = Standard_True; - for (AIS_NArray1OfEntityOwner::Iterator aSelIter (thePickedOwners); aSelIter.More(); aSelIter.Next()) - { - if (!myResultMap.IsBound (aSelIter.Value())) - { - isTheSame = Standard_False; - break; - } - } - if (isTheSame) - { - Clear(); - return; - } - } - } - Standard_FALLTHROUGH - case AIS_SelectionScheme_Replace: - { - Clear(); - for (AIS_NArray1OfEntityOwner::Iterator aSelIter (thePickedOwners); aSelIter.More(); aSelIter.Next()) - { - appendOwner (aSelIter.Value(), theFilter); - } + (void)theToAllowSelOverlap; - return; - } - case AIS_SelectionScheme_Add: - { - for (AIS_NArray1OfEntityOwner::Iterator aSelIter (thePickedOwners); aSelIter.More(); aSelIter.Next()) - { - appendOwner (aSelIter.Value(), theFilter); - } - return; - } - case AIS_SelectionScheme_Remove: - { - for (AIS_NArray1OfEntityOwner::Iterator aSelIter (thePickedOwners); aSelIter.More(); aSelIter.Next()) - { - if (myResultMap.IsBound (aSelIter.Value())) - { - Select (aSelIter.Value()); - } - } - return; - } - case AIS_SelectionScheme_XOR: + if (theSelScheme == AIS_SelectionScheme_ReplaceExtra + && thePickedOwners.Size() == myresult.Size()) + { + // If picked owners is equivalent to the selected then just clear selected. + Standard_Boolean isTheSame = Standard_True; + for (AIS_NArray1OfEntityOwner::Iterator aPickedIter (thePickedOwners); aPickedIter.More(); aPickedIter.Next()) { - for (AIS_NArray1OfEntityOwner::Iterator aSelIter (thePickedOwners); aSelIter.More(); aSelIter.Next()) + if (!myResultMap.IsBound (aPickedIter.Value())) { - const Handle(SelectMgr_EntityOwner)& anOwner = aSelIter.Value(); - if (anOwner.IsNull() - || !anOwner->HasSelectable() - || !theFilter->IsOk (anOwner)) - { - continue; - } - - Select (anOwner); + isTheSame = Standard_False; + break; } - return; } - case AIS_SelectionScheme_Clear: + if (isTheSame) { - Clear(); - return; + Clear(); + return; } } + + if (theSelScheme == AIS_SelectionScheme_Replace + || theSelScheme == AIS_SelectionScheme_ReplaceExtra + || theSelScheme == AIS_SelectionScheme_Clear) + { + Clear(); + } + + for (AIS_NArray1OfEntityOwner::Iterator aPickedIter (thePickedOwners); aPickedIter.More(); aPickedIter.Next()) + { + const Handle(SelectMgr_EntityOwner)& anOwner = aPickedIter.Value(); + Select (anOwner, theFilter, theSelScheme, true); + } } //======================================================================= diff --git a/src/AIS/AIS_Selection.hxx b/src/AIS/AIS_Selection.hxx index ce18b38ff7..f95a94422d 100644 --- a/src/AIS/AIS_Selection.hxx +++ b/src/AIS/AIS_Selection.hxx @@ -34,23 +34,36 @@ public: //! creates a new selection. Standard_EXPORT AIS_Selection(); - + //! removes all the object of the selection. Standard_EXPORT virtual void Clear(); - + //! if the object is not yet in the selection, it will be added. //! if the object is already in the selection, it will be removed. - Standard_EXPORT virtual AIS_SelectStatus Select (const Handle(SelectMgr_EntityOwner)& theObject); - + //! @param[in] theOwner element to change selection state + //! @param[in] theFilter context filter + //! @param[in] theSelScheme selection scheme + //! @param[in] theIsDetected flag of object detection + //! @return result of selection + Standard_EXPORT virtual AIS_SelectStatus Select (const Handle(SelectMgr_EntityOwner)& theOwner, + const Handle(SelectMgr_Filter)& theFilter, + const AIS_SelectionScheme theSelScheme, + const Standard_Boolean theIsDetected); + //! the object is always add int the selection. //! faster when the number of objects selected is great. Standard_EXPORT virtual AIS_SelectStatus AddSelect (const Handle(SelectMgr_EntityOwner)& theObject); //! clears the selection and adds the object in the selection. - virtual void ClearAndSelect (const Handle(SelectMgr_EntityOwner)& theObject) + //! @param[in] theObject element to change selection state + //! @param[in] theFilter context filter + //! @param[in] theIsDetected flag of object detection + virtual void ClearAndSelect (const Handle(SelectMgr_EntityOwner)& theObject, + const Handle(SelectMgr_Filter)& theFilter, + const Standard_Boolean theIsDetected) { Clear(); - Select (theObject); + Select (theObject, theFilter, AIS_SelectionScheme_Add, theIsDetected); } //! checks if the object is in the selection. diff --git a/src/SelectMgr/SelectMgr_EntityOwner.cxx b/src/SelectMgr/SelectMgr_EntityOwner.cxx index 357684c0c8..8f1077a293 100644 --- a/src/SelectMgr/SelectMgr_EntityOwner.cxx +++ b/src/SelectMgr/SelectMgr_EntityOwner.cxx @@ -83,6 +83,51 @@ void SelectMgr_EntityOwner::HilightWithColor (const Handle(PrsMgr_PresentationMa } } +// ======================================================================= +// function : Select +// purpose : +// ======================================================================= +Standard_Boolean SelectMgr_EntityOwner::Select (const AIS_SelectionScheme theSelScheme, + const Standard_Boolean theIsDetected) const +{ + switch (theSelScheme) + { + case AIS_SelectionScheme_UNKNOWN: + { + return myIsSelected; + } + case AIS_SelectionScheme_Replace: + { + return theIsDetected; + } + case AIS_SelectionScheme_Add: + { + return !myIsSelected || theIsDetected || IsForcedHilight(); + } + case AIS_SelectionScheme_Remove: + { + return myIsSelected && !theIsDetected; + } + case AIS_SelectionScheme_XOR: + { + if (theIsDetected) + { + return !myIsSelected && !IsForcedHilight(); + } + return myIsSelected; + } + case AIS_SelectionScheme_Clear: + { + return Standard_False; + } + case AIS_SelectionScheme_ReplaceExtra: + { + return theIsDetected; + } + } + return Standard_False; +} + // ======================================================================= // function : DumpJson // purpose : diff --git a/src/SelectMgr/SelectMgr_EntityOwner.hxx b/src/SelectMgr/SelectMgr_EntityOwner.hxx index f2cebbbdc2..2454db8dcf 100644 --- a/src/SelectMgr/SelectMgr_EntityOwner.hxx +++ b/src/SelectMgr/SelectMgr_EntityOwner.hxx @@ -17,6 +17,7 @@ #ifndef _SelectMgr_EntityOwner_HeaderFile #define _SelectMgr_EntityOwner_HeaderFile +#include #include #include #include @@ -139,6 +140,12 @@ public: //! @param theIsSelected [in] shows if owner is selected. void SetSelected (const Standard_Boolean theIsSelected) { myIsSelected = theIsSelected; } + //! If the object needs to be selected, it returns true. + //! @param[in] theSelScheme selection scheme + //! @param[in] theIsDetected flag of object detection + Standard_EXPORT Standard_Boolean Select (const AIS_SelectionScheme theSelScheme, + const Standard_Boolean theIsDetected) const; + //! Returns selection state. Standard_DEPRECATED ("Deprecated method - IsSelected() should be used instead") Standard_Integer State() const { return myIsSelected ? 1 : 0; } From 359edc7d8ab1372cf9188a494f7970a30e933d67 Mon Sep 17 00:00:00 2001 From: msmediasofts <127210398+msmediasofts@users.noreply.github.com> Date: Tue, 28 Mar 2023 11:25:14 +0200 Subject: [PATCH 473/639] 0033366: Documentation - Add description of BRepAlgoAPI_Algo::Shape() Added description of BRepAlgoAPI_Algo::Shape() --- src/BRepAlgoAPI/BRepAlgoAPI_Algo.hxx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/BRepAlgoAPI/BRepAlgoAPI_Algo.hxx b/src/BRepAlgoAPI/BRepAlgoAPI_Algo.hxx index 5702b68b0f..eab8184f96 100644 --- a/src/BRepAlgoAPI/BRepAlgoAPI_Algo.hxx +++ b/src/BRepAlgoAPI/BRepAlgoAPI_Algo.hxx @@ -34,6 +34,8 @@ public: DEFINE_STANDARD_ALLOC + //! Returns a shape built by the shape construction algorithm. + //! Does not check if the shape is built. Standard_EXPORT virtual const TopoDS_Shape& Shape() Standard_OVERRIDE; // Provide access to methods of protected base class BOPAlgo_Options From e4f00dbb7e72cc187215666ad949c54526ece6f0 Mon Sep 17 00:00:00 2001 From: dpasukhi Date: Wed, 10 May 2023 19:26:55 +0100 Subject: [PATCH 474/639] 0033377: Data Exchange - STEPCAFControl_Reader crash in OCC 7.7.0 Added checking for null object for STEPCAFControl_Reader::SettleShapeData --- src/STEPCAFControl/STEPCAFControl_Reader.cxx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/STEPCAFControl/STEPCAFControl_Reader.cxx b/src/STEPCAFControl/STEPCAFControl_Reader.cxx index cae2a1bf28..7395804d8f 100644 --- a/src/STEPCAFControl/STEPCAFControl_Reader.cxx +++ b/src/STEPCAFControl/STEPCAFControl_Reader.cxx @@ -4657,6 +4657,8 @@ TDF_Label STEPCAFControl_Reader::SettleShapeData(const Handle(StepRepr_Represent const Handle(Transfer_TransientProcess)& TP) const { TDF_Label aResult = theLab; + if (theItem.IsNull()) + return aResult; Handle(TCollection_HAsciiString) hName = theItem->Name(); if (hName.IsNull() || hName->IsEmpty()) From 5d8b1a4076398556095c71c093ca517cde77d4d8 Mon Sep 17 00:00:00 2001 From: dpasukhi Date: Wed, 22 Mar 2023 18:22:44 +0000 Subject: [PATCH 475/639] 0033350: Data Exchange, Step Import - Improving parsing performance Improved performance of parser by disable checking for eof (20% parsing time) Changed step parser's record to keep last one to fast insert into end. --- src/StepFile/StepFile_ReadData.cxx | 114 ++++++++++++++++------------- src/StepFile/lex.step.cxx | 7 ++ src/StepFile/step.lex | 8 ++ 3 files changed, 77 insertions(+), 52 deletions(-) diff --git a/src/StepFile/StepFile_ReadData.cxx b/src/StepFile/StepFile_ReadData.cxx index 98054dc128..fe88768263 100644 --- a/src/StepFile/StepFile_ReadData.cxx +++ b/src/StepFile/StepFile_ReadData.cxx @@ -35,20 +35,21 @@ class StepFile_ReadData::CharactersPage { public: - CharactersPage(const Standard_Integer theMaxCar) :myNext(NULL), myUsed(0) + CharactersPage(const Standard_Integer theMaxCar) :myNext(nullptr), myUsed(0) { myCharacters = new char[theMaxCar]; } ~CharactersPage() { - if (myCharacters != NULL) + if (myCharacters != nullptr) { delete[] myCharacters; - myCharacters = NULL; + myCharacters = nullptr; } } + DEFINE_STANDARD_ALLOC public: CharactersPage* myNext; //!< Chaining of character pages @@ -64,7 +65,7 @@ class StepFile_ReadData::Argument { public: - Argument() :myNext(NULL), myValue(NULL), myType(Interface_ParamSub) {} + Argument() :myNext(nullptr), myValue(nullptr), myType(Interface_ParamSub) {} ~Argument() {} @@ -83,7 +84,7 @@ class StepFile_ReadData::ArgumentsPage { public: - ArgumentsPage(Standard_Integer theMaxArg) :myNext(NULL), myUsed(0) + ArgumentsPage(Standard_Integer theMaxArg) :myNext(nullptr), myUsed(0) { myArgs = new Argument[theMaxArg]; } @@ -91,7 +92,7 @@ class StepFile_ReadData::ArgumentsPage { ~ArgumentsPage() { delete[] myArgs; - myArgs = NULL; + myArgs = nullptr; } public: @@ -109,7 +110,7 @@ class StepFile_ReadData::Record { public: - Record() :myNext(NULL), myFirst(NULL), myIdent(NULL), myType(NULL) {} + Record() :myNext(nullptr), myFirst(nullptr), myLast(nullptr), myIdent(nullptr), myType(nullptr) {} ~Record() {} @@ -117,6 +118,7 @@ class StepFile_ReadData::Record { Record* myNext; //!< Next record in the list Argument* myFirst; //!< First argument in the record + Argument* myLast; //!< Last argument in the record char* myIdent; //!< Record identifier (Example: "#12345") or scope-end char* myType; //!< Type of the record }; @@ -129,14 +131,14 @@ class StepFile_ReadData::Scope { public: - Scope() :myPrevious(NULL), myRecord(NULL) {} + Scope() :myPrevious(nullptr), myRecord(nullptr) {} ~Scope() { - if (myRecord != NULL) + if (myRecord != nullptr) { delete[] myRecord; - myRecord = NULL; + myRecord = nullptr; } } @@ -151,20 +153,20 @@ class StepFile_ReadData::RecordsPage public: - RecordsPage(const Standard_Integer theMaxRec) :myNext(NULL), myUsed(0) + RecordsPage(const Standard_Integer theMaxRec) :myNext(nullptr), myUsed(0) { myRecords = new Record[theMaxRec]; } ~RecordsPage() { - if (myRecords != NULL) + if (myRecords != nullptr) { delete[] myRecords; - myRecords = NULL; + myRecords = nullptr; } } - + DEFINE_STANDARD_ALLOC public: RecordsPage* myNext; //!< Chaining of records pages @@ -177,7 +179,7 @@ class StepFile_ReadData::ErrorsPage public: - ErrorsPage(Standard_CString theError) :myNext(NULL), myError(theError) + ErrorsPage(Standard_CString theError) :myNext(nullptr), myError(theError) {} //! Returns point to the next ErrorsPage @@ -189,6 +191,7 @@ class StepFile_ReadData::ErrorsPage //! Returns an error message Standard_CString ErrorMessage() const { return myError.ToCString(); } + DEFINE_STANDARD_ALLOC private: ErrorsPage* myNext; //!< Chaining of records pages @@ -203,9 +206,9 @@ class StepFile_ReadData::ErrorsPage StepFile_ReadData::StepFile_ReadData() :myMaxChar(50000), myMaxRec(5000), myMaxArg(10000), myModePrint(0), myNbRec(0), myNbHead(0), myNbPar(0), myYaRec(0), - myNumSub(0), myErrorArg(Standard_False), myResText(NULL), myCurrType(TextValue::SubList), - mySubArg(NULL), myTypeArg(Interface_ParamSub), myCurrArg(NULL), myFirstRec(NULL), - myCurRec(NULL), myLastRec(NULL), myCurScope(NULL), myFirstError(NULL), myCurError(NULL) + myNumSub(0), myErrorArg(Standard_False), myResText(nullptr), myCurrType(TextValue::SubList), + mySubArg(nullptr), myTypeArg(Interface_ParamSub), myCurrArg(nullptr), myFirstRec(nullptr), + myCurRec(nullptr), myLastRec(nullptr), myCurScope(nullptr), myFirstError(nullptr), myCurError(nullptr) { myOneCharPage = new CharactersPage(myMaxChar); myOneArgPage = new ArgumentsPage(myMaxArg); @@ -266,7 +269,7 @@ void StepFile_ReadData::RecordNewEntity() SetTypeArg(Interface_ParamSub); mySubArg = myCurRec->myIdent; myCurRec = myCurRec->myNext; - myLastRec->myNext = NULL; + myLastRec->myNext = nullptr; } //======================================================================= @@ -278,8 +281,9 @@ void StepFile_ReadData::RecordIdent() { myCurRec = CreateNewRecord(); GetResultText(&myCurRec->myIdent); - myCurRec->myNext = NULL; - myCurRec->myFirst = NULL; + myCurRec->myNext = nullptr; + myCurRec->myFirst = nullptr; + myCurRec->myLast = nullptr; myYaRec = 1; } @@ -294,8 +298,9 @@ void StepFile_ReadData::RecordType() { myCurRec = CreateNewRecord(); myCurRec->myIdent = TextValue::IdZero; - myCurRec->myNext = NULL; - myCurRec->myFirst = NULL; + myCurRec->myNext = nullptr; + myCurRec->myFirst = nullptr; + myCurRec->myLast = nullptr; } GetResultText(&myCurRec->myType); myYaRec = myNumSub = 0; @@ -329,7 +334,8 @@ void StepFile_ReadData::RecordListStart() aSubRec->myType = myCurrType; myCurrType = TextValue::SubList; aSubRec->myNext = myCurRec; - aSubRec->myFirst = NULL; + aSubRec->myFirst = nullptr; + aSubRec->myLast = nullptr; myCurRec = aSubRec; } myErrorArg = Standard_False; // Reset error arguments mode @@ -364,18 +370,23 @@ void StepFile_ReadData::CreateNewArg() if (myTypeArg == Interface_ParamMisc) myErrorArg = Standard_True; - if (myCurRec->myFirst == NULL) + if (myCurRec->myFirst == nullptr) { myCurRec->myFirst = aNewArg; + myCurRec->myLast = aNewArg; + } + else if (myCurRec->myLast == nullptr) + { + myCurRec->myFirst->myNext = aNewArg; + myCurRec->myLast = aNewArg; } else { - Argument* aNextArg = myCurRec->myFirst; - while (aNextArg->myNext != NULL) - aNextArg = aNextArg->myNext; + Argument* aNextArg = myCurRec->myLast; aNextArg->myNext = aNewArg; + myCurRec->myLast = aNewArg; } - aNewArg->myNext = NULL; + aNewArg->myNext = nullptr; } //======================================================================= @@ -395,10 +406,7 @@ void StepFile_ReadData::CreateErrorArg() return; } - Argument* aCurrArg = myCurRec->myFirst; - while (aCurrArg->myNext != NULL) - aCurrArg = aCurrArg->myNext; - + Argument* aCurrArg = myCurRec->myLast; GetResultText(&aCurrArg->myValue); } @@ -418,7 +426,8 @@ void StepFile_ReadData::AddNewScope() aRecord = CreateNewRecord(); aRecord->myIdent = TextValue::Scope; aRecord->myType = TextValue::Nil; - aRecord->myFirst = NULL; + aRecord->myFirst = nullptr; + aRecord->myLast = nullptr; AddNewRecord(aRecord); } @@ -431,12 +440,13 @@ void StepFile_ReadData::FinalOfScope() { Scope* anOldScope; Record* aRecord; - if (myCurScope == NULL) return; + if (myCurScope == nullptr) return; aRecord = CreateNewRecord(); aRecord->myIdent = TextValue::Scope; aRecord->myType = TextValue::Nil; - aRecord->myFirst = NULL; + aRecord->myFirst = nullptr; + aRecord->myLast = nullptr; if (mySubArg[0] == '$') { @@ -468,18 +478,18 @@ void StepFile_ReadData::ClearRecorder(const Standard_Integer theMode) { if (theMode & 1) { - while (myOneRecPage != NULL) + while (myOneRecPage != nullptr) { RecordsPage* aNewPage = myOneRecPage->myNext; delete myOneRecPage; myOneRecPage = aNewPage; } - while (myOneArgPage != NULL) { + while (myOneArgPage != nullptr) { ArgumentsPage* aNewPage = myOneArgPage->myNext; delete myOneArgPage; myOneArgPage = aNewPage; } - while (myFirstError != NULL) + while (myFirstError != nullptr) { ErrorsPage* aNewErrorPage = myFirstError->NextErrorPage(); delete myFirstError; @@ -488,7 +498,7 @@ void StepFile_ReadData::ClearRecorder(const Standard_Integer theMode) } if (theMode & 2) { - while (myOneCharPage != NULL) + while (myOneCharPage != nullptr) { CharactersPage* aNewPage = myOneCharPage->myNext; delete myOneCharPage; @@ -504,7 +514,7 @@ void StepFile_ReadData::ClearRecorder(const Standard_Integer theMode) Standard_Boolean StepFile_ReadData::GetArgDescription(Interface_ParamType* theType, char** theValue) { - if (myCurrArg == NULL) + if (myCurrArg == nullptr) return Standard_False; *theType = myCurrArg->myType; *theValue = myCurrArg->myValue; @@ -536,11 +546,11 @@ Standard_Boolean StepFile_ReadData::GetRecordDescription(char** theIdent, char** theType, int* theNbArg) { - if (myCurRec == NULL) + if (myCurRec == nullptr) return Standard_False; *theIdent = myCurRec->myIdent; *theType = myCurRec->myType; - *theNbArg = (myCurRec->myFirst != NULL); + *theNbArg = (myCurRec->myFirst != nullptr); myCurrArg = myCurRec->myFirst; return Standard_True; } @@ -641,7 +651,7 @@ Standard_Integer StepFile_ReadData::GetNbRecord() const //======================================================================= void StepFile_ReadData::AddError(Standard_CString theErrorMessage) { - if (myFirstError == NULL) + if (myFirstError == nullptr) { myFirstError = new ErrorsPage(theErrorMessage); myCurError = myFirstError; @@ -659,16 +669,16 @@ void StepFile_ReadData::AddError(Standard_CString theErrorMessage) //======================================================================= Standard_Boolean StepFile_ReadData::ErrorHandle(const Handle(Interface_Check)& theCheck) const { - if (myFirstError != NULL) + if (myFirstError != nullptr) { ErrorsPage* aCurrent = myFirstError; - while (aCurrent != NULL) + while (aCurrent != nullptr) { theCheck->AddFail(aCurrent->ErrorMessage(), "Undefined Parsing"); aCurrent = aCurrent->NextErrorPage(); } } - return myFirstError == NULL; + return myFirstError == nullptr; } //======================================================================= @@ -677,7 +687,7 @@ Standard_Boolean StepFile_ReadData::ErrorHandle(const Handle(Interface_Check)& t //======================================================================= Standard_CString StepFile_ReadData::GetLastError() const { - return myCurError != NULL ? myCurError->ErrorMessage() : NULL; + return myCurError != nullptr ? myCurError->ErrorMessage() : nullptr; } //======================================================================= @@ -714,8 +724,8 @@ void StepFile_ReadData::GetResultText(char** theText) void StepFile_ReadData::AddNewRecord(Record* theNewRecord) { myNbRec++; - if (myFirstRec == NULL) myFirstRec = theNewRecord; - if (myLastRec != NULL) myLastRec->myNext = theNewRecord; + if (myFirstRec == nullptr) myFirstRec = theNewRecord; + if (myLastRec != nullptr) myLastRec->myNext = theNewRecord; myLastRec = theNewRecord; } @@ -750,13 +760,13 @@ void StepFile_ReadData::PrintRecord(Record* theRecord) int aNumArg = 0; int aNumLen = 0; int anArgLen = 0; - if (theRecord == NULL) { Printf("Non defini\n"); return; } + if (theRecord == nullptr) { Printf("Not defined\n"); return; } Printf("Ident : %s Type : %s Nb.Arg.s : %s\n", theRecord->myIdent, theRecord->myType, (theRecord->myFirst ? theRecord->myFirst->myValue : "")); if (myModePrint < 2) return; myCurrArg = theRecord->myFirst; - while (myCurrArg != NULL) + while (myCurrArg != nullptr) { aNumArg++; anArgLen = (int)strlen(myCurrArg->myValue) + 18; diff --git a/src/StepFile/lex.step.cxx b/src/StepFile/lex.step.cxx index 24d51f0a0a..b87ec7705e 100644 --- a/src/StepFile/lex.step.cxx +++ b/src/StepFile/lex.step.cxx @@ -642,9 +642,11 @@ goto find_rule; \ 8bit don't fail on 8-bit input characters warn warn about inconsistencies nodefault don't create default echo-all rule + noinput disables the generation of code for reading input from standard input noyywrap don't use yywrap() function yyclass define name of the scanner class */ +#define YY_NO_INPUT 1 #include #include "stdio.h" @@ -655,6 +657,11 @@ goto find_rule; \ #endif #define YY_DECL int step::scanner::lex (step::parser::semantic_type* /*yylval*/) +// Disable checking for eof +#ifdef YY_INTERACTIVE +#undef YY_INTERACTIVE +#endif + typedef step::parser::token token; /* skl 31.01.2002 for OCC133(OCC96,97) - uncorrect diff --git a/src/StepFile/step.lex b/src/StepFile/step.lex index 1f77493f45..a2a401da51 100644 --- a/src/StepFile/step.lex +++ b/src/StepFile/step.lex @@ -18,12 +18,14 @@ 8bit don't fail on 8-bit input characters warn warn about inconsistencies nodefault don't create default echo-all rule + noinput disables the generation of code for reading input from standard input noyywrap don't use yywrap() function yyclass define name of the scanner class */ %option c++ %option 8bit warn nodefault %option noyywrap +%option noinput %option yyclass="step::scanner" %top{ @@ -46,6 +48,12 @@ #endif #define YY_DECL int step::scanner::lex (step::parser::semantic_type* /*yylval*/) +// Disable checking for eof +#ifdef YY_INTERACTIVE +#undef YY_INTERACTIVE +#endif +#define YY_INTERACTIVE 0 + typedef step::parser::token token; /* skl 31.01.2002 for OCC133(OCC96,97) - uncorrect From c3f6267d24753f12a9526ce78ca013383b06dfe1 Mon Sep 17 00:00:00 2001 From: dpasukhi Date: Tue, 16 May 2023 13:48:11 +0100 Subject: [PATCH 476/639] 0033382: Configuration - Installation issue for debug mode for static build Updated install command to handle BUILD_SHARED_LIBS configuration --- adm/cmake/occt_toolkit.cmake | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/adm/cmake/occt_toolkit.cmake b/adm/cmake/occt_toolkit.cmake index 132890bc84..61f195f82f 100644 --- a/adm/cmake/occt_toolkit.cmake +++ b/adm/cmake/occt_toolkit.cmake @@ -284,9 +284,15 @@ else() else() set (aReleasePdbConf) endif() - install (FILES ${CMAKE_BINARY_DIR}/${OS_WITH_BIT}/${COMPILER}/bin\${OCCT_INSTALL_BIN_LETTER}/${PROJECT_NAME}.pdb + if (BUILD_SHARED_LIBS) + install (FILES ${CMAKE_BINARY_DIR}/${OS_WITH_BIT}/${COMPILER}/bin\${OCCT_INSTALL_BIN_LETTER}/${PROJECT_NAME}.pdb CONFIGURATIONS Debug ${aReleasePdbConf} RelWithDebInfo DESTINATION "${INSTALL_DIR_BIN}\${OCCT_INSTALL_BIN_LETTER}") + else() + install (FILES ${CMAKE_BINARY_DIR}/${OS_WITH_BIT}/${COMPILER}/lib\${OCCT_INSTALL_BIN_LETTER}/${PROJECT_NAME}.pdb + CONFIGURATIONS Debug ${aReleasePdbConf} RelWithDebInfo + DESTINATION "${INSTALL_DIR_LIB}\${OCCT_INSTALL_BIN_LETTER}") + endif() endif() if (BUILD_SHARED_LIBS AND NOT "${BUILD_SHARED_LIBRARY_NAME_POSTFIX}" STREQUAL "") From bcfc5f0d5a9ea038d6e3bf93517e87d8f47a9b48 Mon Sep 17 00:00:00 2001 From: anv Date: Fri, 28 Apr 2023 04:26:11 +0100 Subject: [PATCH 477/639] 0033369: Modeling Algorithms - BRepBuilderAPI_Transform makes invalid shape after transformation Added check to avoid setting parametric boundaries to infinity. --- src/BRepTools/BRepTools_TrsfModification.cxx | 4 ++-- tests/bugs/modalg_7/bug33369 | 11 +++++++++++ 2 files changed, 13 insertions(+), 2 deletions(-) create mode 100644 tests/bugs/modalg_7/bug33369 diff --git a/src/BRepTools/BRepTools_TrsfModification.cxx b/src/BRepTools/BRepTools_TrsfModification.cxx index 238afe6970..c8252f6caf 100644 --- a/src/BRepTools/BRepTools_TrsfModification.cxx +++ b/src/BRepTools/BRepTools_TrsfModification.cxx @@ -394,11 +394,11 @@ Standard_Boolean BRepTools_TrsfModification::NewCurve2d if(l - lc > Precision::PConfusion()) l = lc; if(Abs(l - f) < Precision::PConfusion()) { - if(Abs(f - fc) < Precision::PConfusion()) + if(Abs(f - fc) < Precision::PConfusion() && !Precision::IsInfinite(lc)) { l = lc; } - else + else if (!Precision::IsInfinite(fc)) { f = fc; } diff --git a/tests/bugs/modalg_7/bug33369 b/tests/bugs/modalg_7/bug33369 new file mode 100644 index 0000000000..ab98074f81 --- /dev/null +++ b/tests/bugs/modalg_7/bug33369 @@ -0,0 +1,11 @@ +puts "=======================================================" +puts "0033369: OCCT:Modeling Algorithms - BRepBuilderAPI_Transform makes invalid shape after transformation" +puts "=======================================================" +puts "" + +restore [locate_data_file bug33369.brep] f + +ttranslate f 1 1 1 -copy + +checkshape f + From e3841f9ffed781cb9518c90526ac4e095b411748 Mon Sep 17 00:00:00 2001 From: ichesnok Date: Thu, 23 Mar 2023 20:06:06 +0000 Subject: [PATCH 478/639] 0033318: Data Exchange - Modifying the BRep flag after exporting the shape Fixed condition for setting 'checked' flag --- src/BinTools/BinTools_ShapeSet.cxx | 3 +-- src/TopTools/TopTools_ShapeSet.cxx | 2 +- tests/bugs/moddata_3/bug33318 | 27 +++++++++++++++++++++++++++ 3 files changed, 29 insertions(+), 3 deletions(-) create mode 100644 tests/bugs/moddata_3/bug33318 diff --git a/src/BinTools/BinTools_ShapeSet.cxx b/src/BinTools/BinTools_ShapeSet.cxx index 0460882c7e..9f2cde22fe 100644 --- a/src/BinTools/BinTools_ShapeSet.cxx +++ b/src/BinTools/BinTools_ShapeSet.cxx @@ -479,8 +479,7 @@ void BinTools_ShapeSet::ReadFlagsAndSubs(TopoDS_Shape& S, const TopAbs_ShapeEnum S.Free(aFree); S.Modified(aMod); - if (FormatNb() != BinTools_FormatVersion_VERSION_2 && - FormatNb() != BinTools_FormatVersion_VERSION_3) + if (FormatNb() == BinTools_FormatVersion_VERSION_1) { aChecked = false; // force check at reading } diff --git a/src/TopTools/TopTools_ShapeSet.cxx b/src/TopTools/TopTools_ShapeSet.cxx index ba63755e9e..d37542d54c 100644 --- a/src/TopTools/TopTools_ShapeSet.cxx +++ b/src/TopTools/TopTools_ShapeSet.cxx @@ -702,7 +702,7 @@ void TopTools_ShapeSet::Read(Standard_IStream& IS, const Message_ProgressRange& S.Free (buffer[0] == '1'); S.Modified (buffer[1] == '1'); - const bool isChecked = myFormatNb == TopTools_FormatVersion_VERSION_2 + const bool isChecked = myFormatNb >= TopTools_FormatVersion_VERSION_2 && buffer[2] == '1'; S.Checked (isChecked); diff --git a/tests/bugs/moddata_3/bug33318 b/tests/bugs/moddata_3/bug33318 new file mode 100644 index 0000000000..534473f3f8 --- /dev/null +++ b/tests/bugs/moddata_3/bug33318 @@ -0,0 +1,27 @@ +puts "===========================================================" +puts "0033318: Data Exchange - Modifying the BRep flag after exporting the shape" +puts "===========================================================" + +pload XDE + +set filepath [locate_data_file bug28620.brep] +set f1 [open $filepath "r"] +set string1 [read $f1] +close $f1 + +set conf {provider.BREP.OCC.write.binary : 0} + +set aTmpFile ${imagedir}/tmpfile1.brep +readfile sh1 $filepath +writefile sh1 $aTmpFile -conf $conf + +set f2 [open $aTmpFile "r"] +set string2 [read $f2] +close $f2 + +set newstr [string trim $string2] +if { [string first $newstr [string trim $string1]] == -1 } { + puts "Error: strings is not equal" +} + +file delete -force $aTmpFile From 945e309564e500dc32642fe3e9fd51a812d5baa7 Mon Sep 17 00:00:00 2001 From: ichesnok Date: Mon, 27 Mar 2023 09:37:44 +0100 Subject: [PATCH 479/639] 0030066: Data Exchange - Fail to load VRML from ArcGIS Fixed VrmlData_Scene::readHeader method --- src/VrmlData/VrmlData_Scene.cxx | 21 ++++++++++++++++----- tests/bugs/stlvrml/bug30066 | 6 ++++++ 2 files changed, 22 insertions(+), 5 deletions(-) create mode 100644 tests/bugs/stlvrml/bug30066 diff --git a/src/VrmlData/VrmlData_Scene.cxx b/src/VrmlData/VrmlData_Scene.cxx index 1c851aab42..a263c23bbd 100644 --- a/src/VrmlData/VrmlData_Scene.cxx +++ b/src/VrmlData/VrmlData_Scene.cxx @@ -314,12 +314,23 @@ VrmlData_ErrorStatus VrmlData_Scene::ReadLine (VrmlData_InBuffer& theBuffer) VrmlData_ErrorStatus VrmlData_Scene::readHeader (VrmlData_InBuffer& theBuffer) { - VrmlData_ErrorStatus aStat = readLine (theBuffer); - if (aStat == VrmlData_StatusOK && - !VRMLDATA_LCOMPARE(theBuffer.LinePtr, "#VRML V2.0")) - aStat = VrmlData_NotVrmlFile; - else + VrmlData_ErrorStatus aStat = readLine(theBuffer); + if (aStat != VrmlData_StatusOK) + { + return VrmlData_NotVrmlFile; + } + TCollection_AsciiString aHeader(theBuffer.LinePtr); + // The max possible header size is 25 (with spaces) + // 4 (max BOM size) + 11 (search string) + 9 (max size for encoding) + if (aHeader.Length() <= 25 && + aHeader.Search("#VRML V2.0") != -1) + { aStat = readLine(theBuffer); + } + else + { + aStat = VrmlData_NotVrmlFile; + } return aStat; } diff --git a/tests/bugs/stlvrml/bug30066 b/tests/bugs/stlvrml/bug30066 new file mode 100644 index 0000000000..95aac17ed3 --- /dev/null +++ b/tests/bugs/stlvrml/bug30066 @@ -0,0 +1,6 @@ +puts "========" +puts "0030066: Data Exchange - Fail to load VRML from ArcGIS" +puts "========" +puts "" + +loadvrml sh [locate_data_file bug30066.wrl] \ No newline at end of file From c36205a05ef6ebd33b14cb0def5f88d6d4c35d6c Mon Sep 17 00:00:00 2001 From: dpasukhi Date: Mon, 15 May 2023 08:11:45 +0100 Subject: [PATCH 480/639] 0033378: Configuration - Moving ExpToCas into separate module Moved ExpToCasExe and its DLL to new module - DETools Created new module - DETools to keep tools to DE Changed definition of main of ExpToCasExe to not const parameter FlexLexer.h moved to general location into TKernel --- CMakeLists.txt | 6 - adm/MODULES | 3 +- adm/cmake/occt_toolkit.cmake | 20 +- adm/cmake/vardescr.cmake | 1 + adm/scripts/android_build.bat | 2 + adm/scripts/android_custom.bat.template | 1 + adm/scripts/cmake_custom.bat.template | 1 + adm/scripts/cmake_custom.sh.template | 1 + adm/scripts/cmake_gen.bat | 2 + adm/scripts/cmake_gen.sh | 2 + adm/scripts/ios_build.sh | 2 + adm/scripts/ios_custom.sh.template | 1 + adm/scripts/macos_build.sh | 2 + adm/scripts/macos_custom.sh.template | 1 + adm/scripts/mingw_build.bat | 2 + adm/scripts/mingw_custom.bat.template | 1 + adm/scripts/wasm_build.bat | 2 + adm/scripts/wasm_build.sh | 3 + adm/scripts/wasm_custom.bat.template | 1 + adm/scripts/wasm_custom.sh.template | 1 + src/ExpToCasExe/ExpToCasExe.cxx | 2 +- src/FlexLexer/FILES | 1 + src/{ExpToCasExe => FlexLexer}/FlexLexer.h | 0 src/OS/DataExchange.tcl | 3 +- src/StepFile/FILES | 1 - src/StepFile/FlexLexer.h | 220 --------------------- src/TKernel/PACKAGES | 1 + 27 files changed, 42 insertions(+), 241 deletions(-) create mode 100644 src/FlexLexer/FILES rename src/{ExpToCasExe => FlexLexer}/FlexLexer.h (100%) delete mode 100644 src/StepFile/FlexLexer.h diff --git a/CMakeLists.txt b/CMakeLists.txt index fd17283f77..1bacca1a48 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -820,12 +820,6 @@ else() OCCT_CHECK_AND_UNSET ("3RDPARTY_DOT_EXECUTABLE") endif() -# ExpToCasExe -if (EMSCRIPTEN) - list (REMOVE_ITEM BUILD_TOOLKITS TKExpress) - list (REMOVE_ITEM BUILD_TOOLKITS ExpToCasExe) -endif() - # bison if (BUILD_YACCLEX) OCCT_INCLUDE_CMAKE_FILE ("adm/cmake/bison") diff --git a/adm/MODULES b/adm/MODULES index f471f8dc8d..235c30595d 100644 --- a/adm/MODULES +++ b/adm/MODULES @@ -3,5 +3,6 @@ ModelingData TKG2d TKG3d TKGeomBase TKBRep ModelingAlgorithms TKGeomAlgo TKTopAlgo TKPrim TKBO TKBool TKHLR TKFillet TKOffset TKFeat TKMesh TKXMesh TKShHealing Visualization TKService TKV3d TKOpenGl TKOpenGles TKMeshVS TKIVtk TKD3DHost ApplicationFramework TKCDF TKLCAF TKCAF TKBinL TKXmlL TKBin TKXml TKStdL TKStd TKTObj TKBinTObj TKXmlTObj TKVCAF -DataExchange TKXDE TKXSBase TKSTEPBase TKSTEPAttr TKSTEP209 TKSTEP TKIGES TKXCAF TKXDEIGES TKXDESTEP TKSTL TKVRML TKXmlXCAF TKBinXCAF TKRWMesh TKXDECascade TKExpress ExpToCasExe +DataExchange TKXDE TKXSBase TKSTEPBase TKSTEPAttr TKSTEP209 TKSTEP TKIGES TKXCAF TKXDEIGES TKXDESTEP TKSTL TKVRML TKXmlXCAF TKBinXCAF TKRWMesh TKXDECascade Draw TKDraw TKTopTest TKOpenGlTest TKOpenGlesTest TKD3DHostTest TKViewerTest TKXSDRAW TKDCAF TKXDEDRAW TKTObjDRAW TKQADraw TKIVtkDraw DRAWEXE +DETools TKExpress ExpToCasExe diff --git a/adm/cmake/occt_toolkit.cmake b/adm/cmake/occt_toolkit.cmake index 61f195f82f..c9399159f1 100644 --- a/adm/cmake/occt_toolkit.cmake +++ b/adm/cmake/occt_toolkit.cmake @@ -70,6 +70,16 @@ foreach (OCCT_PACKAGE ${USED_PACKAGES}) OCCT_ORIGIN_AND_PATCHED_FILES ("${RELATIVE_SOURCES_DIR}/${OCCT_PACKAGE}" "*[.]lex" SOURCE_FILES_FLEX) list (LENGTH SOURCE_FILES_FLEX SOURCE_FILES_FLEX_LEN) + # remove old general version of FlexLexer + if (EXISTS ${CMAKE_SOURCE_DIR}/${RELATIVE_SOURCES_DIR}/FlexLexer/FlexLexer.h) + message (STATUS "Info: remove old FLEX header file: ${CMAKE_SOURCE_DIR}/${RELATIVE_SOURCES_DIR}/FlexLexer/FlexLexer.h") + file(REMOVE ${CMAKE_SOURCE_DIR}/${RELATIVE_SOURCES_DIR}/FlexLexer/FlexLexer.h) + endif() + # install copy of FlexLexer.h locally to allow further building without flex + if (FLEX_INCLUDE_DIR AND EXISTS "${FLEX_INCLUDE_DIR}/FlexLexer.h") + configure_file("${FLEX_INCLUDE_DIR}/FlexLexer.h" "${CMAKE_SOURCE_DIR}/${RELATIVE_SOURCES_DIR}/FlexLexer/FlexLexer.h" @ONLY NEWLINE_STYLE LF) + endif() + # bison files OCCT_ORIGIN_AND_PATCHED_FILES ("${RELATIVE_SOURCES_DIR}/${OCCT_PACKAGE}" "*[.]yacc" SOURCE_FILES_BISON) list (LENGTH SOURCE_FILES_BISON SOURCE_FILES_BISON_LEN) @@ -107,21 +117,11 @@ foreach (OCCT_PACKAGE ${USED_PACKAGES}) endif() endforeach() - if (EXISTS ${FLEX_BISON_TARGET_DIR}/FlexLexer.h) - message (STATUS "Info: remove old FLEX header file: ${FLEX_BISON_TARGET_DIR}/FlexLexer.h") - file(REMOVE ${FLEX_BISON_TARGET_DIR}/FlexLexer.h) - endif() - file (STRINGS "${CURRENT_FLEX_FILE}" FILE_FLEX_CONTENT) foreach (FILE_FLEX_CONTENT_LINE ${FILE_FLEX_CONTENT}) string (REGEX MATCH "%option c\\+\\+" CXX_FLEX_LANGUAGE_FOUND ${FILE_FLEX_CONTENT_LINE}) if (CXX_FLEX_LANGUAGE_FOUND) set (FLEX_OUTPUT_FILE_EXT "cxx") - - # install copy of FlexLexer.h locally to allow further building without flex - if (FLEX_INCLUDE_DIR AND EXISTS "${FLEX_INCLUDE_DIR}/FlexLexer.h") - configure_file("${FLEX_INCLUDE_DIR}/FlexLexer.h" "${FLEX_BISON_TARGET_DIR}/FlexLexer.h" @ONLY NEWLINE_STYLE LF) - endif() endif() endforeach() set (BISON_OUTPUT_FILE ${CURRENT_BISON_FILE_NAME}.tab.${BISON_OUTPUT_FILE_EXT}) diff --git a/adm/cmake/vardescr.cmake b/adm/cmake/vardescr.cmake index 8212a0308b..1d7631b7dd 100644 --- a/adm/cmake/vardescr.cmake +++ b/adm/cmake/vardescr.cmake @@ -116,6 +116,7 @@ endmacro() BUILD_MODULE_MESSAGE (BUILD_MODULE_ApplicationFramework "ApplicationFramework") BUILD_MODULE_MESSAGE (BUILD_MODULE_DataExchange "DataExchange") +BUILD_MODULE_MESSAGE (BUILD_MODULE_DETools "DETools") BUILD_MODULE_MESSAGE (BUILD_MODULE_Draw "Draw") BUILD_MODULE_MESSAGE (BUILD_MODULE_FoundationClasses "FoundationClasses") BUILD_MODULE_MESSAGE (BUILD_MODULE_ModelingAlgorithms "ModelingAlgorithms") diff --git a/adm/scripts/android_build.bat b/adm/scripts/android_build.bat index ce1aa67bd2..247d23cde7 100644 --- a/adm/scripts/android_build.bat +++ b/adm/scripts/android_build.bat @@ -33,6 +33,7 @@ set "BUILD_ModelingAlgorithms=ON" set "BUILD_Visualization=ON" set "BUILD_ApplicationFramework=ON" set "BUILD_DataExchange=ON" +set "BUILD_DETools=OFF" rem Optional 3rd-party libraries to enable set "USE_FREETYPE=ON" @@ -166,6 +167,7 @@ if ["%toCMake%"] == ["1"] ( -D BUILD_MODULE_Visualization:BOOL="%BUILD_Visualization%" ^ -D BUILD_MODULE_ApplicationFramework:BOOL="%BUILD_ApplicationFramework%" ^ -D BUILD_MODULE_DataExchange:BOOL="%BUILD_DataExchange%" ^ + -D BUILD_MODULE_DETools:BOOL="OFF" ^ -D BUILD_MODULE_Draw:BOOL="OFF" ^ -D BUILD_DOC_Overview:BOOL="OFF" ^ -D USE_FREETYPE:BOOL="%USE_FREETYPE%" ^ diff --git a/adm/scripts/android_custom.bat.template b/adm/scripts/android_custom.bat.template index 45881c6d40..9c1bd7beab 100644 --- a/adm/scripts/android_custom.bat.template +++ b/adm/scripts/android_custom.bat.template @@ -27,6 +27,7 @@ rem set "BUILD_ModelingAlgorithms=ON" rem set "BUILD_Visualization=ON" rem set "BUILD_ApplicationFramework=ON" rem set "BUILD_DataExchange=ON" +rem set "BUILD_MODULE_DETools=OFF" rem Optional 3rd-party libraries to enable rem set "USE_RAPIDJSON=ON" diff --git a/adm/scripts/cmake_custom.bat.template b/adm/scripts/cmake_custom.bat.template index eabc8290b0..f2bbe81343 100644 --- a/adm/scripts/cmake_custom.bat.template +++ b/adm/scripts/cmake_custom.bat.template @@ -33,6 +33,7 @@ rem set BUILD_PATCH= rem set BUILD_MODULE_ApplicationFramework=ON rem set BUILD_MODULE_DataExchange=ON +rem set BUILD_MODULE_DETools=OFF rem set BUILD_MODULE_Draw=ON rem set BUILD_MODULE_ModelingAlgorithms=ON rem set BUILD_MODULE_ModelingData=ON diff --git a/adm/scripts/cmake_custom.sh.template b/adm/scripts/cmake_custom.sh.template index 6ed63c7f13..e6e265df4d 100644 --- a/adm/scripts/cmake_custom.sh.template +++ b/adm/scripts/cmake_custom.sh.template @@ -26,6 +26,7 @@ FREETYPE_DIR="$OCCT3RDPARTY/freetype-2.7.1" #BUILD_MODULE_ApplicationFramework=ON #BUILD_MODULE_DataExchange=ON +#BUILD_MODULE_DETools=OFF #BUILD_MODULE_Draw=ON #BUILD_MODULE_ModelingAlgorithms=ON #BUILD_MODULE_ModelingData=ON diff --git a/adm/scripts/cmake_gen.bat b/adm/scripts/cmake_gen.bat index f60e47b129..80f9600c62 100644 --- a/adm/scripts/cmake_gen.bat +++ b/adm/scripts/cmake_gen.bat @@ -28,6 +28,7 @@ set BUILD_FORCE_RelWithDebInfo=OFF set BUILD_MODULE_ApplicationFramework=ON set BUILD_MODULE_DataExchange=ON +set BUILD_MODULE_DETools=OFF set BUILD_MODULE_Draw=ON set BUILD_MODULE_ModelingAlgorithms=ON set BUILD_MODULE_ModelingData=ON @@ -62,6 +63,7 @@ cmake -G "%arch_compile%" ^ -D BUILD_LIBRARY_TYPE:STRING=%BUILD_LIBRARY_TYPE% ^ -D BUILD_MODULE_ApplicationFramework:BOOL=%BUILD_MODULE_ApplicationFramework% ^ -D BUILD_MODULE_DataExchange:BOOL=%BUILD_MODULE_DataExchange% ^ + -D BUILD_MODULE_DETools:BOOL=%BUILD_MODULE_DETools% ^ -D BUILD_MODULE_Draw:BOOL=%BUILD_MODULE_Draw% ^ -D BUILD_MODULE_FoundationClasses:BOOL=ON ^ -D BUILD_MODULE_ModelingAlgorithms:BOOL=%BUILD_MODULE_ModelingAlgorithms% ^ diff --git a/adm/scripts/cmake_gen.sh b/adm/scripts/cmake_gen.sh index 9c088715d2..feef7a07db 100755 --- a/adm/scripts/cmake_gen.sh +++ b/adm/scripts/cmake_gen.sh @@ -31,6 +31,7 @@ BUILD_ENABLE_FPE_SIGNAL_HANDLER=ON BUILD_MODULE_ApplicationFramework=ON BUILD_MODULE_DataExchange=ON +BUILD_MODULE_DETools=OFF BUILD_MODULE_Draw=ON BUILD_MODULE_ModelingAlgorithms=ON BUILD_MODULE_ModelingData=ON @@ -63,6 +64,7 @@ cmake -G "Unix Makefiles" \ -D BUILD_LIBRARY_TYPE:STRING=$BUILD_LIBRARY_TYPE \ -D BUILD_MODULE_ApplicationFramework:BOOL=$BUILD_MODULE_ApplicationFramework \ -D BUILD_MODULE_DataExchange:BOOL=$BUILD_MODULE_DataExchange \ + -D BUILD_MODULE_DETools:BOOL=$BUILD_MODULE_DETools \ -D BUILD_MODULE_Draw:BOOL=$BUILD_MODULE_Draw \ -D BUILD_MODULE_FoundationClasses:BOOL=ON \ -D BUILD_MODULE_ModelingAlgorithms:BOOL=$BUILD_MODULE_ModelingAlgorithms \ diff --git a/adm/scripts/ios_build.sh b/adm/scripts/ios_build.sh index ff222519a2..b9ada581b5 100755 --- a/adm/scripts/ios_build.sh +++ b/adm/scripts/ios_build.sh @@ -34,6 +34,7 @@ export BUILD_ModelingAlgorithms=ON export BUILD_Visualization=ON export BUILD_ApplicationFramework=ON export BUILD_DataExchange=ON +export BUILD_DETools=OFF export USE_FREETYPE=ON export USE_FREEIMAGE=OFF @@ -148,6 +149,7 @@ function buildArch { -D BUILD_MODULE_Visualization:BOOL="${BUILD_Visualization}" \ -D BUILD_MODULE_ApplicationFramework:BOOL="${BUILD_ApplicationFramework}" \ -D BUILD_MODULE_DataExchange:BOOL="${BUILD_DataExchange}" \ + -D BUILD_MODULE_DETools:BOOL="${BUILD_DETools}" \ -D BUILD_MODULE_Draw:BOOL="OFF" \ -D BUILD_DOC_Overview:BOOL="OFF" \ "$aCasSrc" 2>&1 | tee -a "$aLogFile" diff --git a/adm/scripts/ios_custom.sh.template b/adm/scripts/ios_custom.sh.template index c54624ebf6..4d4d13b485 100644 --- a/adm/scripts/ios_custom.sh.template +++ b/adm/scripts/ios_custom.sh.template @@ -20,6 +20,7 @@ export aDraco="$aSrcRoot/../3rdparty/draco-1.4.1-ios" #export BUILD_Visualization=ON #export BUILD_ApplicationFramework=ON #export BUILD_DataExchange=ON +#export BUILD_DETools=OFF #export USE_RAPIDJSON=ON #export USE_DRACO=ON diff --git a/adm/scripts/macos_build.sh b/adm/scripts/macos_build.sh index b44fb1bec5..4cdaa8bddc 100755 --- a/adm/scripts/macos_build.sh +++ b/adm/scripts/macos_build.sh @@ -34,6 +34,7 @@ export BUILD_ModelingAlgorithms=ON export BUILD_Visualization=ON export BUILD_ApplicationFramework=ON export BUILD_DataExchange=ON +export BUILD_DETools=OFF export BUILD_Draw=ON export USE_FREETYPE=ON @@ -145,6 +146,7 @@ function buildArch { -D BUILD_MODULE_Visualization:BOOL="${BUILD_Visualization}" \ -D BUILD_MODULE_ApplicationFramework:BOOL="${BUILD_ApplicationFramework}" \ -D BUILD_MODULE_DataExchange:BOOL="${BUILD_DataExchange}" \ + -D BUILD_MODULE_DETools:BOOL="${BUILD_DETools}" \ -D BUILD_MODULE_Draw:BOOL="${BUILD_Draw}" \ -D BUILD_DOC_Overview:BOOL="OFF" \ "$aCasSrc" 2>&1 | tee -a "$aLogFile" diff --git a/adm/scripts/macos_custom.sh.template b/adm/scripts/macos_custom.sh.template index 740c24f640..637277aa91 100644 --- a/adm/scripts/macos_custom.sh.template +++ b/adm/scripts/macos_custom.sh.template @@ -19,6 +19,7 @@ export aDraco="$aSrcRoot/../3rdparty/draco-1.4.1-macos" #export BUILD_Visualization=ON #export BUILD_ApplicationFramework=ON #export BUILD_DataExchange=ON +#export BUILD_DETools=OFF #export BUILD_Draw=ON #export USE_RAPIDJSON=ON diff --git a/adm/scripts/mingw_build.bat b/adm/scripts/mingw_build.bat index d66d339e5e..27e33625fa 100644 --- a/adm/scripts/mingw_build.bat +++ b/adm/scripts/mingw_build.bat @@ -32,6 +32,7 @@ set "BUILD_ModelingAlgorithms=ON" set "BUILD_Visualization=ON" set "BUILD_ApplicationFramework=ON" set "BUILD_DataExchange=ON" +set "BUILD_DETools=OFF" set "BUILD_Draw=ON" rem Optional 3rd-party libraries to enable @@ -155,6 +156,7 @@ if ["%toCMake%"] == ["1"] ( -D BUILD_MODULE_Visualization:BOOL="%BUILD_Visualization%" ^ -D BUILD_MODULE_ApplicationFramework:BOOL="%BUILD_ApplicationFramework%" ^ -D BUILD_MODULE_DataExchange:BOOL="%BUILD_DataExchange%" ^ + -D BUILD_MODULE_DETools:BOOL="%BUILD_DETools%" ^ -D BUILD_MODULE_Draw:BOOL="%BUILD_Draw%" ^ -D 3RDPARTY_TCL_DIR:PATH="%aTclTk%" ^ -D 3RDPARTY_TCL_INCLUDE_DIR:FILEPATH="%aTclTk%/include" ^ diff --git a/adm/scripts/mingw_custom.bat.template b/adm/scripts/mingw_custom.bat.template index 0a7f6c6750..67a5f5471f 100644 --- a/adm/scripts/mingw_custom.bat.template +++ b/adm/scripts/mingw_custom.bat.template @@ -22,6 +22,7 @@ rem set "BUILD_ModelingAlgorithms=ON" rem set "BUILD_Visualization=ON" rem set "BUILD_ApplicationFramework=ON" rem set "BUILD_DataExchange=ON" +rem set "BUILD_DETools=OFF" rem set "BUILD_Draw=ON" rem set "USE_RAPIDJSON=ON" diff --git a/adm/scripts/wasm_build.bat b/adm/scripts/wasm_build.bat index 4ef9a61f73..7495b8079b 100644 --- a/adm/scripts/wasm_build.bat +++ b/adm/scripts/wasm_build.bat @@ -32,6 +32,7 @@ set "BUILD_ModelingAlgorithms=ON" set "BUILD_Visualization=ON" set "BUILD_ApplicationFramework=ON" set "BUILD_DataExchange=ON" +set "BUILD_DETools=OFF" set "BUILD_Draw=OFF" rem Optional 3rd-party libraries to enable @@ -175,6 +176,7 @@ if ["%toCMake%"] == ["1"] ( -D BUILD_MODULE_Visualization:BOOL="%BUILD_Visualization%" ^ -D BUILD_MODULE_ApplicationFramework:BOOL="%BUILD_ApplicationFramework%" ^ -D BUILD_MODULE_DataExchange:BOOL="%BUILD_DataExchange%" ^ + -D BUILD_MODULE_DETools:BOOL="%BUILD_DETools%" ^ -D BUILD_MODULE_Draw:BOOL="%BUILD_Draw%" ^ -D BUILD_DOC_Overview:BOOL="OFF" ^ -D USE_FREETYPE:BOOL="%USE_FREETYPE%" ^ diff --git a/adm/scripts/wasm_build.sh b/adm/scripts/wasm_build.sh index b02a3080c1..b4f123da7e 100755 --- a/adm/scripts/wasm_build.sh +++ b/adm/scripts/wasm_build.sh @@ -20,6 +20,7 @@ export BUILD_ModelingAlgorithms=ON export BUILD_Visualization=ON export BUILD_ApplicationFramework=ON export BUILD_DataExchange=ON +export BUILD_DETools=OFF if [ -f "${aScriptDir}/wasm_custom.sh" ] ; then . "${aScriptDir}/wasm_custom.sh" @@ -74,6 +75,7 @@ echo cmake -G "Unix Makefiles" -DCMAKE_TOOLCHAIN_FILE:FILEPATH="${aToolchain}" \ -DBUILD_MODULE_Visualization:BOOL="${BUILD_Visualization}" \ -DBUILD_MODULE_ApplicationFramework:BOOL="${BUILD_ApplicationFramework}" \ -DBUILD_MODULE_DataExchange:BOOL="${BUILD_DataExchange}" \ +-DBUILD_MODULE_DETools:BOOL="${BUILD_DETools}" \ -DBUILD_MODULE_Draw:BOOL="OFF" \ -DBUILD_DOC_Overview:BOOL="OFF" "${aSrcRoot}" @@ -92,6 +94,7 @@ cmake -G "Unix Makefiles" -DCMAKE_TOOLCHAIN_FILE:FILEPATH="${aToolchain}" \ -DBUILD_MODULE_Visualization:BOOL="${BUILD_Visualization}" \ -DBUILD_MODULE_ApplicationFramework:BOOL="${BUILD_ApplicationFramework}" \ -DBUILD_MODULE_DataExchange:BOOL="${BUILD_DataExchange}" \ +-DBUILD_MODULE_DETools:BOOL="${BUILD_DETools}" \ -DBUILD_MODULE_Draw:BOOL="OFF" \ -DBUILD_DOC_Overview:BOOL="OFF" "${aSrcRoot}" diff --git a/adm/scripts/wasm_custom.bat.template b/adm/scripts/wasm_custom.bat.template index 0c52467a6a..91907c7738 100644 --- a/adm/scripts/wasm_custom.bat.template +++ b/adm/scripts/wasm_custom.bat.template @@ -23,6 +23,7 @@ rem set "BUILD_ModelingAlgorithms=ON" rem set "BUILD_Visualization=ON" rem set "BUILD_ApplicationFramework=ON" rem set "BUILD_DataExchange=ON" +rem set "BUILD_DETools=OFF" rem set "USE_RAPIDJSON=ON" rem set "USE_DRACO=ON" diff --git a/adm/scripts/wasm_custom.sh.template b/adm/scripts/wasm_custom.sh.template index 29157c92c7..dd3d6c7fe3 100644 --- a/adm/scripts/wasm_custom.sh.template +++ b/adm/scripts/wasm_custom.sh.template @@ -14,3 +14,4 @@ export EMSDK_ROOT="$aSrcRoot/../emsdk" #export BUILD_Visualization=ON #export BUILD_ApplicationFramework=ON #export BUILD_DataExchange=ON +#export BUILD_DETools=OFF diff --git a/src/ExpToCasExe/ExpToCasExe.cxx b/src/ExpToCasExe/ExpToCasExe.cxx index c0b25eeab1..1f0ce0ae56 100644 --- a/src/ExpToCasExe/ExpToCasExe.cxx +++ b/src/ExpToCasExe/ExpToCasExe.cxx @@ -281,7 +281,7 @@ static Standard_Boolean LoadList (const char *theFileName, // function : main // purpose : //======================================================================= -Standard_Integer main (const Standard_Integer argc, const char* argv[]) +int main (int argc, char* argv[]) { if (argc < 2) { diff --git a/src/FlexLexer/FILES b/src/FlexLexer/FILES new file mode 100644 index 0000000000..254a004963 --- /dev/null +++ b/src/FlexLexer/FILES @@ -0,0 +1 @@ +FlexLexer.h diff --git a/src/ExpToCasExe/FlexLexer.h b/src/FlexLexer/FlexLexer.h similarity index 100% rename from src/ExpToCasExe/FlexLexer.h rename to src/FlexLexer/FlexLexer.h diff --git a/src/OS/DataExchange.tcl b/src/OS/DataExchange.tcl index cbb12e7d56..3f3b5badc7 100644 --- a/src/OS/DataExchange.tcl +++ b/src/OS/DataExchange.tcl @@ -18,7 +18,7 @@ proc DataExchange:toolkits { } { return [list TKXSBase TKSTEPBase TKSTEPAttr TKSTEP209 TKSTEP TKIGES \ TKXCAF TKXDEIGES TKXDESTEP \ TKXDE TKXDECascade \ - TKSTL TKVRML TKXmlXCAF TKBinXCAF TKRWMesh TKExpress] + TKSTL TKVRML TKXmlXCAF TKBinXCAF TKRWMesh] } ;# @@ -29,7 +29,6 @@ proc DataExchange:ressources { } { [list both r XSMessage {} ] \ [list both r SHMessage {} ] \ [list both r XSTEPResource {} ] \ - [list both x ExpToCasExe {} ] \ ] } ;# diff --git a/src/StepFile/FILES b/src/StepFile/FILES index 733a836129..5c8fa85a09 100755 --- a/src/StepFile/FILES +++ b/src/StepFile/FILES @@ -7,4 +7,3 @@ StepFile_Read.cxx StepFile_Read.hxx step.lex step.yacc -FlexLexer.h diff --git a/src/StepFile/FlexLexer.h b/src/StepFile/FlexLexer.h deleted file mode 100644 index c4dad2b142..0000000000 --- a/src/StepFile/FlexLexer.h +++ /dev/null @@ -1,220 +0,0 @@ -// -*-C++-*- -// FlexLexer.h -- define interfaces for lexical analyzer classes generated -// by flex - -// Copyright (c) 1993 The Regents of the University of California. -// All rights reserved. -// -// This code is derived from software contributed to Berkeley by -// Kent Williams and Tom Epperly. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions -// are met: - -// 1. Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// 2. Redistributions in binary form must reproduce the above copyright -// notice, this list of conditions and the following disclaimer in the -// documentation and/or other materials provided with the distribution. - -// Neither the name of the University nor the names of its contributors -// may be used to endorse or promote products derived from this software -// without specific prior written permission. - -// THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR -// IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED -// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -// PURPOSE. - -// This file defines FlexLexer, an abstract class which specifies the -// external interface provided to flex C++ lexer objects, and yyFlexLexer, -// which defines a particular lexer class. -// -// If you want to create multiple lexer classes, you use the -P flag -// to rename each yyFlexLexer to some other xxFlexLexer. You then -// include in your other sources once per lexer class: -// -// #undef yyFlexLexer -// #define yyFlexLexer xxFlexLexer -// #include -// -// #undef yyFlexLexer -// #define yyFlexLexer zzFlexLexer -// #include -// ... - -#ifndef __FLEX_LEXER_H -// Never included before - need to define base class. -#define __FLEX_LEXER_H - -#include - -extern "C++" { - -struct yy_buffer_state; -typedef int yy_state_type; - -class FlexLexer -{ -public: - virtual ~FlexLexer() { } - - const char* YYText() const { return yytext; } - int YYLeng() const { return yyleng; } - - virtual void - yy_switch_to_buffer( yy_buffer_state* new_buffer ) = 0; - virtual yy_buffer_state* yy_create_buffer( std::istream* s, int size ) = 0; - virtual yy_buffer_state* yy_create_buffer( std::istream& s, int size ) = 0; - virtual void yy_delete_buffer( yy_buffer_state* b ) = 0; - virtual void yyrestart( std::istream* s ) = 0; - virtual void yyrestart( std::istream& s ) = 0; - - virtual int yylex() = 0; - - // Call yylex with new input/output sources. - int yylex( std::istream& new_in, std::ostream& new_out ) - { - switch_streams( new_in, new_out ); - return yylex(); - } - - int yylex( std::istream* new_in, std::ostream* new_out = 0) - { - switch_streams( new_in, new_out ); - return yylex(); - } - - // Switch to new input/output streams. A nil stream pointer - // indicates "keep the current one". - virtual void switch_streams( std::istream* new_in, - std::ostream* new_out ) = 0; - virtual void switch_streams( std::istream& new_in, - std::ostream& new_out ) = 0; - - int lineno() const { return yylineno; } - - int debug() const { return yy_flex_debug; } - void set_debug( int flag ) { yy_flex_debug = flag; } - -protected: - char* yytext; - int yyleng; - int yylineno; // only maintained if you use %option yylineno - int yy_flex_debug; // only has effect with -d or "%option debug" -}; - -} -#endif // FLEXLEXER_H - -#if defined(yyFlexLexer) || ! defined(yyFlexLexerOnce) -// Either this is the first time through (yyFlexLexerOnce not defined), -// or this is a repeated include to define a different flavor of -// yyFlexLexer, as discussed in the flex manual. -# define yyFlexLexerOnce - -extern "C++" { - -class yyFlexLexer : public FlexLexer { -public: - // arg_yyin and arg_yyout default to the cin and cout, but we - // only make that assignment when initializing in yylex(). - yyFlexLexer( std::istream& arg_yyin, std::ostream& arg_yyout ); - yyFlexLexer( std::istream* arg_yyin = 0, std::ostream* arg_yyout = 0 ); -private: - void ctor_common(); - -public: - - virtual ~yyFlexLexer(); - - void yy_switch_to_buffer( yy_buffer_state* new_buffer ); - yy_buffer_state* yy_create_buffer( std::istream* s, int size ); - yy_buffer_state* yy_create_buffer( std::istream& s, int size ); - void yy_delete_buffer( yy_buffer_state* b ); - void yyrestart( std::istream* s ); - void yyrestart( std::istream& s ); - - void yypush_buffer_state( yy_buffer_state* new_buffer ); - void yypop_buffer_state(); - - virtual int yylex(); - virtual void switch_streams( std::istream& new_in, std::ostream& new_out ); - virtual void switch_streams( std::istream* new_in = 0, std::ostream* new_out = 0 ); - virtual int yywrap(); - -protected: - virtual int LexerInput( char* buf, int max_size ); - virtual void LexerOutput( const char* buf, int size ); - virtual void LexerError( const char* msg ); - - void yyunput( int c, char* buf_ptr ); - int yyinput(); - - void yy_load_buffer_state(); - void yy_init_buffer( yy_buffer_state* b, std::istream& s ); - void yy_flush_buffer( yy_buffer_state* b ); - - int yy_start_stack_ptr; - int yy_start_stack_depth; - int* yy_start_stack; - - void yy_push_state( int new_state ); - void yy_pop_state(); - int yy_top_state(); - - yy_state_type yy_get_previous_state(); - yy_state_type yy_try_NUL_trans( yy_state_type current_state ); - int yy_get_next_buffer(); - - std::istream yyin; // input source for default LexerInput - std::ostream yyout; // output sink for default LexerOutput - - // yy_hold_char holds the character lost when yytext is formed. - char yy_hold_char; - - // Number of characters read into yy_ch_buf. - int yy_n_chars; - - // Points to current character in buffer. - char* yy_c_buf_p; - - int yy_init; // whether we need to initialize - int yy_start; // start state number - - // Flag which is used to allow yywrap()'s to do buffer switches - // instead of setting up a fresh yyin. A bit of a hack ... - int yy_did_buffer_switch_on_eof; - - - size_t yy_buffer_stack_top; /**< index of top of stack. */ - size_t yy_buffer_stack_max; /**< capacity of stack. */ - yy_buffer_state ** yy_buffer_stack; /**< Stack as an array. */ - void yyensure_buffer_stack(void); - - // The following are not always needed, but may be depending - // on use of certain flex features (like REJECT or yymore()). - - yy_state_type yy_last_accepting_state; - char* yy_last_accepting_cpos; - - yy_state_type* yy_state_buf; - yy_state_type* yy_state_ptr; - - char* yy_full_match; - int* yy_full_state; - int yy_full_lp; - - int yy_lp; - int yy_looking_for_trail_begin; - - int yy_more_flag; - int yy_more_len; - int yy_more_offset; - int yy_prev_more_offset; -}; - -} - -#endif // yyFlexLexer || ! yyFlexLexerOnce diff --git a/src/TKernel/PACKAGES b/src/TKernel/PACKAGES index a10bf8d75d..ee92fa32b7 100755 --- a/src/TKernel/PACKAGES +++ b/src/TKernel/PACKAGES @@ -14,3 +14,4 @@ UnitsAPI UnitsMethods NCollection Message +FlexLexer From c28dd7f1cf857ddcead7ea470365ae13e5afeb0b Mon Sep 17 00:00:00 2001 From: akaftasev Date: Wed, 12 Apr 2023 14:05:50 +0100 Subject: [PATCH 481/639] 0033361: Modeling Algorithm - Fuse operation generates incomplete result Added additional check of Face-Face intersection to avoid missing section edges because of sequence of Face-Face interference processing --- src/BOPAlgo/BOPAlgo_PaveFiller_6.cxx | 35 ++++-- tests/bugs/modalg_8/bug33361 | 156 +++++++++++++++++++++++++++ 2 files changed, 185 insertions(+), 6 deletions(-) create mode 100644 tests/bugs/modalg_8/bug33361 diff --git a/src/BOPAlgo/BOPAlgo_PaveFiller_6.cxx b/src/BOPAlgo/BOPAlgo_PaveFiller_6.cxx index 68fc9e9e97..0a89813227 100644 --- a/src/BOPAlgo/BOPAlgo_PaveFiller_6.cxx +++ b/src/BOPAlgo/BOPAlgo_PaveFiller_6.cxx @@ -606,13 +606,23 @@ void BOPAlgo_PaveFiller::MakeBlocks(const Message_ProgressRange& theRange) // Map of PaveBlocks with the faces to which it has to be added BOPAlgo_DataMapOfPaveBlockListOfInteger aPBFacesMap; // - for (i=0; i aFFToRecheck; + // aNbFF may be increased while processing this loop, because it is necessary to recheck + // some of Face-Face intersections to avoid missing section edges + // aNbFF will be increased to the number of potentially problematic Face-Face intersections + const Standard_Integer aNbFFPrev = aNbFF; + for (i = 0; i < aNbFF; ++i, aPS.Next()) + { if (UserBreak(aPS)) { return; } + // after passing through all of Face-Face intersections it is necessary to return + // to potentially problematic Face-Face intersections and process them one more time + const Standard_Integer aCurInd = i < aNbFFPrev ? i : aFFToRecheck[i - aNbFFPrev]; // - BOPDS_InterfFF& aFF=aFFs(i); + BOPDS_InterfFF& aFF=aFFs(aCurInd); aFF.Indices(nF1, nF2); // BOPDS_VectorOfPoint& aVP=aFF.ChangePoints(); @@ -735,6 +745,9 @@ void BOPAlgo_PaveFiller::MakeBlocks(const Message_ProgressRange& theRange) } } + // Added additional check of Face-Face intersection to avoid missing section edges + // because of sequence of Face-Face interference processing + Standard_Boolean isToRecheck = aNbC > 0 && i < aNbFFPrev; // // 3. Make section edges for (j=0; jUpdate(aLPB, Standard_False); // + if (aLPB.Extent() != 0) + { + isToRecheck = false; + } + aItLPB.Initialize(aLPB); for (; aItLPB.More(); aItLPB.Next()) { Handle(BOPDS_PaveBlock)& aPB=aItLPB.ChangeValue(); @@ -849,7 +867,7 @@ void BOPAlgo_PaveFiller::MakeBlocks(const Message_ProgressRange& theRange) if (aMPBAdd.Add(aPBOut)) { // Add edge for processing as the section edge - PreparePostTreatFF(i, j, aPBOut, aMSCPB, aMVI, aLPBC); + PreparePostTreatFF(aCurInd, j, aPBOut, aMSCPB, aMVI, aLPBC); } } continue; @@ -868,7 +886,7 @@ void BOPAlgo_PaveFiller::MakeBlocks(const Message_ProgressRange& theRange) // // Keep info for post treatment BOPDS_CoupleOfPaveBlocks aCPB; - aCPB.SetIndexInterf(i); + aCPB.SetIndexInterf(aCurInd); aCPB.SetIndex(j); aCPB.SetPaveBlock1(aPB); // @@ -880,12 +898,17 @@ void BOPAlgo_PaveFiller::MakeBlocks(const Message_ProgressRange& theRange) aMVTol.UnBind(nV2); // Add existing pave blocks for post treatment - ProcessExistingPaveBlocks (i, j, nF1, nF2, aES, aMPBOnIn, aPBTree, + ProcessExistingPaveBlocks (aCurInd, j, nF1, nF2, aES, aMPBOnIn, aPBTree, aMSCPB, aMVI, aLPBC, aPBFacesMap, aMPBAdd); } // aLPBC.RemoveFirst(); }//for (j=0; j Date: Sat, 6 May 2023 22:56:45 +0000 Subject: [PATCH 482/639] 0033375: Coding - Static Analyzing processing. Performance Performance update applied: - moving to const reference as much as possible Result of CLANG_TIDY (static analyzing filter: perform*) --- src/AIS/AIS_C0RegularityFilter.cxx | 2 +- src/AIS/AIS_InteractiveContext.cxx | 6 ++-- src/AdvApp2Var/AdvApp2Var_SysBase.cxx | 2 +- src/Approx/Approx_CurveOnSurface.cxx | 4 +-- src/Approx/Approx_CurveOnSurface.hxx | 4 +-- src/BOPAlgo/BOPAlgo_BuilderSolid.cxx | 2 +- src/BOPTest/BOPTest_BOPCommands.cxx | 6 ++-- src/BOPTools/BOPTools_AlgoTools3D.cxx | 2 +- src/BOPTools/BOPTools_AlgoTools_2.cxx | 2 +- src/BRepAlgo/BRepAlgo.cxx | 4 +-- src/BRepAlgo/BRepAlgo_Loop.cxx | 2 +- src/BRepBndLib/BRepBndLib.cxx | 4 +-- src/BRepBuilderAPI/BRepBuilderAPI_Collect.cxx | 4 +-- .../BRepBuilderAPI_MakeShapeOnMesh.cxx | 2 +- src/BRepBuilderAPI/BRepBuilderAPI_Sewing.cxx | 12 +++---- src/BRepCheck/BRepCheck_Face.cxx | 2 +- src/BRepClass/BRepClass_Intersector.cxx | 1 - src/BRepClass3d/BRepClass3d_SClassifier.cxx | 4 +-- .../BRepExtrema_DistShapeShape.cxx | 4 +-- src/BRepFeat/BRepFeat.cxx | 2 +- src/BRepFeat/BRepFeat_Form.cxx | 2 +- src/BRepFeat/BRepFeat_MakeDPrism.cxx | 26 +++++++------- src/BRepFeat/BRepFeat_MakePrism.cxx | 18 +++++----- src/BRepFeat/BRepFeat_MakeRevol.cxx | 6 ++-- src/BRepFill/BRepFill.cxx | 4 +-- src/BRepFill/BRepFill_CompatibleWires.cxx | 4 +-- src/BRepFill/BRepFill_Evolved.cxx | 4 +-- src/BRepFill/BRepFill_Filling.cxx | 2 +- src/BRepFill/BRepFill_MultiLine.cxx | 2 +- src/BRepFill/BRepFill_OffsetWire.cxx | 2 +- src/BRepFill/BRepFill_Pipe.cxx | 4 +-- src/BRepFill/BRepFill_PipeShell.cxx | 4 +-- src/BRepFill/BRepFill_Sweep.cxx | 2 +- src/BRepFill/BRepFill_TrimEdgeTool.cxx | 8 ++--- src/BRepFill/BRepFill_TrimShellCorner.cxx | 2 +- src/BRepLib/BRepLib.cxx | 6 ++-- src/BRepLib/BRepLib_PointCloudShape.cxx | 2 +- src/BRepMAT2d/BRepMAT2d_Explorer.cxx | 2 +- src/BRepMesh/BRepMesh_Delaun.cxx | 2 +- src/BRepMesh/BRepMesh_Delaun.hxx | 2 +- src/BRepOffset/BRepOffset_Inter2d.cxx | 8 ++--- src/BRepOffset/BRepOffset_MakeOffset.cxx | 2 +- src/BRepOffset/BRepOffset_Offset.cxx | 4 +-- src/BRepOffset/BRepOffset_Tool.cxx | 2 +- .../BRepOffsetAPI_DraftAngle.cxx | 8 ++--- .../BRepOffsetAPI_ThruSections.cxx | 2 +- src/BRepProj/BRepProj_Projection.cxx | 2 +- src/BRepTest/BRepTest_CurveCommands.cxx | 2 +- src/BRepToIGES/BRepToIGES_BRWire.cxx | 2 +- src/BRepToIGESBRep/BRepToIGESBRep_Entity.cxx | 10 +++--- src/BRepTools/BRepTools.cxx | 2 +- src/BRepTools/BRepTools.hxx | 2 +- src/BRepTools/BRepTools_Quilt.cxx | 2 +- src/BRepTools/BRepTools_ReShape.cxx | 4 +-- src/BiTgte/BiTgte_Blend.cxx | 6 ++-- src/Bisector/Bisector_Inter.cxx | 4 +-- src/CDM/CDM_Document.cxx | 6 ++-- src/ChFi2d/ChFi2d_Builder_0.cxx | 2 +- src/ChFi2d/ChFi2d_FilletAlgo.cxx | 2 +- src/ChFi3d/ChFi3d.cxx | 4 +-- src/ChFi3d/ChFi3d_Builder.cxx | 1 - src/ChFi3d/ChFi3d_Builder_1.cxx | 4 +-- src/ChFi3d/ChFi3d_Builder_6.cxx | 6 ++-- src/ChFi3d/ChFi3d_Builder_CnCrn.cxx | 4 +-- src/ChFi3d/ChFi3d_Builder_SpKP.cxx | 2 +- src/DBRep/DBRep.cxx | 6 ++-- src/DDF/DDF_DataCommands.cxx | 6 ++-- src/DDataStd/DDataStd_BasicCommands.cxx | 14 ++++---- src/DDocStd/DDocStd_ShapeSchemaCommands.cxx | 2 +- src/DE/DE_Wrapper.cxx | 2 +- src/DNaming/DNaming.cxx | 5 ++- .../DNaming_BooleanOperationDriver.cxx | 8 ++--- src/DNaming/DNaming_ModelingCommands.cxx | 2 +- src/DNaming/DNaming_SelectionCommands.cxx | 2 +- src/DNaming/DNaming_ToolsCommands.cxx | 2 +- src/Draft/Draft_Modification_1.cxx | 2 +- src/Draw/Draw_PloadCommands.cxx | 4 +-- src/Geom2dGcc/Geom2dGcc_Circ2d2TanOn.cxx | 12 +++---- src/Geom2dGcc/Geom2dGcc_Circ2d2TanRad.cxx | 6 ++-- src/Geom2dGcc/Geom2dGcc_Circ2d3Tan.cxx | 12 +++---- src/Geom2dGcc/Geom2dGcc_Circ2dTanCen.cxx | 2 +- src/Geom2dGcc/Geom2dGcc_Circ2dTanOnRad.cxx | 6 ++-- src/Geom2dGcc/Geom2dGcc_Lin2d2Tan.cxx | 12 +++---- src/Geom2dGcc/Geom2dGcc_Lin2dTanObl.cxx | 4 +-- src/GeomConvert/GeomConvert_SurfToAnaSurf.cxx | 2 +- src/GeomConvert/GeomConvert_SurfToAnaSurf.hxx | 2 +- src/GeomFill/GeomFill_Pipe.cxx | 4 +-- src/GeomLib/GeomLib.cxx | 6 ++-- src/GeomLib/GeomLib.hxx | 6 ++-- ...omToStep_MakeRectangularTrimmedSurface.cxx | 2 +- src/GeometryTest/GeometryTest_APICommands.cxx | 4 +-- .../GeometryTest_ConstraintCommands.cxx | 4 +-- src/Graphic3d/Graphic3d_CView.cxx | 2 +- src/Graphic3d/Graphic3d_CubeMapOrder.cxx | 6 ++-- src/Graphic3d/Graphic3d_CubeMapOrder.hxx | 6 ++-- src/Graphic3d/Graphic3d_CubeMapPacked.cxx | 4 +-- src/Graphic3d/Graphic3d_CubeMapPacked.hxx | 4 +-- src/Graphic3d/Graphic3d_StructureManager.cxx | 3 +- src/Graphic3d/Graphic3d_Vertex.cxx | 4 ++- src/IFGraph/IFGraph_Articulations.cxx | 2 +- src/IFGraph/IFGraph_ConnectedComponants.cxx | 2 +- src/IFSelect/IFSelect_BasicDumper.cxx | 4 +-- src/IFSelect/IFSelect_CheckCounter.cxx | 2 +- src/IFSelect/IFSelect_ModelCopier.cxx | 8 ++--- src/IFSelect/IFSelect_SelectExtract.cxx | 3 +- src/IFSelect/IFSelect_SelectRootComps.cxx | 2 +- src/IFSelect/IFSelect_SelectRoots.cxx | 4 +-- src/IFSelect/IFSelect_SelectSignature.cxx | 2 +- src/IFSelect/IFSelect_Selection.cxx | 2 +- src/IFSelect/IFSelect_SignatureList.cxx | 2 +- src/IFSelect/IFSelect_TransformStandard.cxx | 4 +-- src/IFSelect/IFSelect_WorkSession.cxx | 10 +++--- .../IGESCAFControl_Provider.cxx | 2 +- .../IGESCAFControl_Provider.hxx | 2 +- src/IGESCAFControl/IGESCAFControl_Reader.cxx | 2 +- src/IGESCAFControl/IGESCAFControl_Writer.cxx | 6 ++-- src/IGESControl/IGESControl_Reader.cxx | 8 ++--- src/IGESData/IGESData_GeneralModule.cxx | 2 +- src/IGESData/IGESData_IGESModel.cxx | 2 +- src/IGESDraw/IGESDraw_ToolViewsVisible.cxx | 4 +-- .../IGESDraw_ToolViewsVisibleWithAttr.cxx | 4 +-- src/IGESSelect/IGESSelect.cxx | 2 +- src/IGESSelect/IGESSelect_Dumper.cxx | 6 ++-- src/IGESToBRep/IGESToBRep_Reader.cxx | 2 +- src/IGESToBRep/IGESToBRep_TopoSurface.cxx | 2 +- src/IntPatch/IntPatch_ImpPrmIntersection.cxx | 2 +- src/IntTools/IntTools_Context.cxx | 4 +-- src/IntTools/IntTools_Tools.cxx | 6 ++-- src/Interface/Interface_Graph.cxx | 6 ++-- src/Interface/Interface_GraphContent.cxx | 2 +- src/Interface/Interface_InterfaceModel.cxx | 5 +-- src/Interface/Interface_MSG.cxx | 2 +- src/Interface/Interface_ShareTool.cxx | 2 +- src/LocOpe/LocOpe_SplitDrafts.cxx | 2 +- src/LocOpe/LocOpe_SplitShape.cxx | 2 +- src/LocOpe/LocOpe_Spliter.cxx | 2 +- src/MAT2d/MAT2d_Mat2d.cxx | 2 +- src/MeshTest/MeshTest.cxx | 2 +- src/MeshVS/MeshVS_Mesh.cxx | 2 +- src/Message/Message_PrinterToReport.cxx | 2 +- src/Message/Message_PrinterToReport.hxx | 2 +- src/Message/Message_Report.cxx | 2 +- src/MoniTool/MoniTool_AttrList.cxx | 4 +-- src/MoniTool/MoniTool_TypedValue.cxx | 2 +- src/OpenGl/OpenGl_Text.cxx | 2 +- src/PCDM/PCDM_ReadWriter.cxx | 4 +-- src/PrsDim/PrsDim.cxx | 4 +-- src/PrsDim/PrsDim_PerpendicularRelation.cxx | 1 - src/PrsDim/PrsDim_TangentRelation.cxx | 1 - src/PrsMgr/PrsMgr_PresentableObject.cxx | 2 +- src/QABugs/QABugs_1.cxx | 2 +- src/QABugs/QABugs_10.cxx | 6 ++-- src/QABugs/QABugs_11.cxx | 18 +++++----- src/QABugs/QABugs_16.cxx | 2 +- src/QABugs/QABugs_17.cxx | 4 +-- src/QABugs/QABugs_19.cxx | 4 +-- src/QABugs/QABugs_20.cxx | 2 +- src/QABugs/QABugs_3.cxx | 4 +-- src/QABugs/QABugs_PresentableObject.cxx | 2 +- src/QADNaming/QADNaming_ToolsCommands.cxx | 2 +- src/RWGltf/RWGltf_Provider.cxx | 2 +- ...eCurveWithKnotsAndRationalBSplineCurve.cxx | 2 +- ...faceWithKnotsAndRationalBSplineSurface.cxx | 2 +- .../STEPCAFControl_GDTProperty.cxx | 4 +-- .../STEPCAFControl_GDTProperty.hxx | 4 +-- .../STEPCAFControl_Provider.cxx | 2 +- .../STEPCAFControl_Provider.hxx | 2 +- src/STEPCAFControl/STEPCAFControl_Reader.cxx | 34 +++++++++---------- src/STEPCAFControl/STEPCAFControl_Writer.cxx | 34 +++++++++---------- src/STEPCAFControl/STEPCAFControl_Writer.hxx | 6 ++-- src/STEPConstruct/STEPConstruct_Assembly.cxx | 4 +-- .../STEPConstruct_ExternRefs.cxx | 6 ++-- src/STEPControl/STEPControl_ActorRead.cxx | 16 ++++----- src/STEPControl/STEPControl_ActorWrite.cxx | 12 +++---- src/STEPSelections/STEPSelections_Counter.cxx | 2 +- src/SWDRAW/SWDRAW.cxx | 2 +- .../SelectMgr_SelectableObjectSet.cxx | 4 +-- .../SelectMgr_SelectingVolumeManager.cxx | 2 +- .../SelectMgr_SelectingVolumeManager.hxx | 2 +- src/SelectMgr/SelectMgr_ViewerSelector.cxx | 1 - .../ShapeAnalysis_FreeBoundsProperties.cxx | 7 ++-- src/ShapeAnalysis/ShapeAnalysis_Shell.cxx | 8 ++--- .../ShapeAnalysis_TransferParametersProj.cxx | 4 +-- src/ShapeBuild/ShapeBuild_Edge.cxx | 4 +-- src/ShapeBuild/ShapeBuild_ReShape.cxx | 14 ++++---- .../ShapeConstruct_ProjectCurveOnSurface.cxx | 2 +- src/ShapeExtend/ShapeExtend_Explorer.cxx | 4 +-- src/ShapeFix/ShapeFix.cxx | 4 +-- src/ShapeFix/ShapeFix_ComposeShell.cxx | 20 +++++------ src/ShapeFix/ShapeFix_Face.cxx | 6 ++-- src/ShapeFix/ShapeFix_IntersectionTool.cxx | 2 +- src/ShapeFix/ShapeFix_Shell.cxx | 22 ++++++------ src/ShapeFix/ShapeFix_Solid.cxx | 10 +++--- src/ShapeFix/ShapeFix_Wire.cxx | 4 +-- .../ShapeProcess_ShapeContext.cxx | 8 ++--- ...apeUpgrade_ConvertSurfaceToBezierBasis.cxx | 2 +- .../ShapeUpgrade_RemoveInternalWires.cxx | 6 ++-- .../ShapeUpgrade_RemoveLocations.cxx | 6 ++-- .../ShapeUpgrade_SplitSurfaceContinuity.cxx | 2 +- .../ShapeUpgrade_UnifySameDomain.cxx | 8 ++--- src/ShapeUpgrade/ShapeUpgrade_WireDivide.cxx | 4 +-- .../StdLPersistent_Dependency.cxx | 2 +- src/StdPersistent/StdPersistent_Naming.cxx | 2 +- src/StdPrs/StdPrs_Curve.cxx | 2 +- src/StepAP209/StepAP209_Construct.cxx | 2 +- src/StepData/StepData_StepModel.cxx | 2 +- src/StepData/StepData_StepWriter.cxx | 4 +-- ...inematics_MechanismStateRepresentation.cxx | 2 +- ...inematics_MechanismStateRepresentation.hxx | 2 +- ...pRepr_ReprItemAndMeasureWithUnitAndQRI.cxx | 2 +- ...pRepr_ReprItemAndMeasureWithUnitAndQRI.hxx | 2 +- src/StepToTopoDS/StepToTopoDS_Builder.cxx | 2 +- src/StepToTopoDS/StepToTopoDS_NMTool.cxx | 6 ++-- .../StepToTopoDS_TranslateEdge.cxx | 2 +- src/TDF/TDF_CopyLabel.cxx | 4 +-- src/TDF/TDF_Data.cxx | 2 +- src/TDF/TDF_Tool.cxx | 6 ++-- src/TDocStd/TDocStd_Application.cxx | 4 +-- src/TNaming/TNaming_Name.cxx | 4 +-- src/TObj/TObj_Assistant.cxx | 2 +- src/TObj/TObj_Assistant.hxx | 2 +- src/TopOpeBRep/TopOpeBRep_DSFiller.cxx | 4 +-- src/TopOpeBRep/TopOpeBRep_EdgesFiller.cxx | 4 +-- .../TopOpeBRep_FFTransitionTool.cxx | 4 +-- src/TopOpeBRep/TopOpeBRep_FacesFiller_1.cxx | 2 +- src/TopOpeBRep/TopOpeBRep_LineInter.cxx | 4 +-- .../TopOpeBRep_ShapeIntersector.cxx | 2 +- src/TopOpeBRep/TopOpeBRep_kpart.cxx | 4 +-- src/TopOpeBRep/TopOpeBRep_vpr.cxx | 8 ++--- .../TopOpeBRepBuild_Builder1.cxx | 10 +++--- .../TopOpeBRepBuild_Builder1_1.cxx | 2 +- .../TopOpeBRepBuild_CorrectFace2d.cxx | 4 +-- .../TopOpeBRepBuild_GridFF.cxx | 2 +- .../TopOpeBRepBuild_GridSS.cxx | 4 +-- src/TopOpeBRepBuild/TopOpeBRepBuild_Merge.cxx | 8 ++--- src/TopOpeBRepBuild/TopOpeBRepBuild_Tools.cxx | 10 +++--- .../TopOpeBRepBuild_makesolids.cxx | 2 +- src/TopOpeBRepDS/TopOpeBRepDS_BuildTool.cxx | 14 ++++---- .../TopOpeBRepDS_ProcessFaceInterferences.cxx | 2 +- src/TopOpeBRepTool/TopOpeBRepTool_TOOL.cxx | 2 +- src/TopoDS/TopoDS_Iterator.hxx | 2 +- .../TopoDSToStep_WireframeBuilder.cxx | 6 ++-- src/Transfer/Transfer_Finder.cxx | 4 +-- src/Transfer/Transfer_TransferInput.cxx | 2 +- src/Transfer/Transfer_TransferOutput.cxx | 4 +-- src/TransferBRep/TransferBRep.cxx | 14 ++++---- src/Units/Units_UnitSentence.cxx | 7 ++-- src/ViewerTest/ViewerTest.cxx | 12 +++---- src/ViewerTest/ViewerTest_ObjectCommands.cxx | 12 +++---- src/ViewerTest/ViewerTest_OpenGlCommands.cxx | 2 +- src/ViewerTest/ViewerTest_ViewerCommands.cxx | 10 +++--- src/VrmlData/VrmlData_Scene.cxx | 2 +- src/XCAFDoc/XCAFDoc_ClippingPlaneTool.cxx | 6 ++-- src/XCAFDoc/XCAFDoc_ClippingPlaneTool.hxx | 6 ++-- src/XCAFDoc/XCAFDoc_ShapeTool.cxx | 14 ++++---- src/XDEDRAW/XDEDRAW_Common.cxx | 8 ++--- src/XDEDRAW/XDEDRAW_Shapes.cxx | 2 +- src/XSAlgo/XSAlgo_AlgoContainer.cxx | 2 +- src/XSControl/XSControl_ConnectedShapes.cxx | 2 +- src/XSControl/XSControl_FuncShape.cxx | 2 +- src/XSControl/XSControl_Reader.cxx | 3 +- src/XSControl/XSControl_TransferReader.cxx | 6 ++-- src/XSControl/XSControl_Utils.cxx | 2 +- src/XSDRAWIGES/XSDRAWIGES.cxx | 2 +- src/math/math_FunctionSetRoot.cxx | 4 +-- 265 files changed, 603 insertions(+), 611 deletions(-) mode change 100755 => 100644 src/BRepMesh/BRepMesh_Delaun.hxx diff --git a/src/AIS/AIS_C0RegularityFilter.cxx b/src/AIS/AIS_C0RegularityFilter.cxx index 8becc91faa..f0e74c0fe7 100644 --- a/src/AIS/AIS_C0RegularityFilter.cxx +++ b/src/AIS/AIS_C0RegularityFilter.cxx @@ -56,7 +56,7 @@ AIS_C0RegularityFilter::AIS_C0RegularityFilter(const TopoDS_Shape& aShape) } } if (Ok) { - TopoDS_Shape curEdge = SubShapes.FindKey( i ); + const TopoDS_Shape& curEdge = SubShapes.FindKey( i ); myMapOfEdges.Add(curEdge); } } diff --git a/src/AIS/AIS_InteractiveContext.cxx b/src/AIS/AIS_InteractiveContext.cxx index 866259af85..13344563e9 100644 --- a/src/AIS/AIS_InteractiveContext.cxx +++ b/src/AIS/AIS_InteractiveContext.cxx @@ -945,7 +945,7 @@ void AIS_InteractiveContext::Redisplay (const AIS_KindOfInteractive theKOI, Standard_Boolean isRedisplayed = Standard_False; for (AIS_DataMapIteratorOfDataMapOfIOStatus anObjIter (myObjects); anObjIter.More(); anObjIter.Next()) { - Handle(AIS_InteractiveObject) anObj = anObjIter.Key(); + const Handle(AIS_InteractiveObject)& anObj = anObjIter.Key(); if (anObj->Type() != theKOI) { continue; @@ -1155,7 +1155,7 @@ void AIS_InteractiveContext::SetDisplayMode(const Standard_Integer theMode, continue; } - Handle(AIS_GlobalStatus) aStatus = anObjIter.Value(); + const Handle(AIS_GlobalStatus)& aStatus = anObjIter.Value(); aStatus->SetDisplayMode (theMode); if (anObj->DisplayStatus() == PrsMgr_DisplayStatus_Displayed) @@ -2251,7 +2251,7 @@ Bnd_Box AIS_InteractiveContext::BoundingBoxOfSelection (const Handle(V3d_View)& for (AIS_MapIteratorOfMapOfObjectOwners anIter (anObjectOwnerMap); anIter.More(); anIter.Next()) { - const Handle(SelectMgr_SelectableObject) anObject = anIter.Key(); + const Handle(SelectMgr_SelectableObject)& anObject = anIter.Key(); Bnd_Box aTmpBox = anObject->BndBoxOfSelected (anIter.ChangeValue()); aBndSelected.Add (aTmpBox); } diff --git a/src/AdvApp2Var/AdvApp2Var_SysBase.cxx b/src/AdvApp2Var/AdvApp2Var_SysBase.cxx index 7f32dcb631..ae1bf729c5 100644 --- a/src/AdvApp2Var/AdvApp2Var_SysBase.cxx +++ b/src/AdvApp2Var/AdvApp2Var_SysBase.cxx @@ -1789,7 +1789,7 @@ int maoverf_(integer *nbentr, /* Loop. The upper limit is the integer value of the logarithm of base 2 */ /* of NBENTR/NLONGR. */ - i__1 = (integer) (log((real) (*nbentr) / (float)63.) / log((float)2.)) + i__1 = (integer) (std::log((real) (*nbentr) / (float)63.) / std::log((float)2.)) ; for (ibid = 1; ibid <= i__1; ++ibid) { diff --git a/src/Approx/Approx_CurveOnSurface.cxx b/src/Approx/Approx_CurveOnSurface.cxx index 1899d0eb82..4a616a2a1e 100644 --- a/src/Approx/Approx_CurveOnSurface.cxx +++ b/src/Approx/Approx_CurveOnSurface.cxx @@ -556,7 +556,7 @@ void Approx_CurveOnSurface::Perform(const Standard_Integer theMaxSegments, //function : isIsoLine //purpose : //============================================================================= -Standard_Boolean Approx_CurveOnSurface::isIsoLine(const Handle(Adaptor2d_Curve2d) theC2D, +Standard_Boolean Approx_CurveOnSurface::isIsoLine(const Handle(Adaptor2d_Curve2d)& theC2D, Standard_Boolean& theIsU, Standard_Real& theParam, Standard_Boolean& theIsForward) const @@ -638,7 +638,7 @@ Standard_Boolean Approx_CurveOnSurface::isIsoLine(const Handle(Adaptor2d_Curve2d //function : buildC3dOnIsoLine //purpose : //============================================================================= -Standard_Boolean Approx_CurveOnSurface::buildC3dOnIsoLine(const Handle(Adaptor2d_Curve2d) theC2D, +Standard_Boolean Approx_CurveOnSurface::buildC3dOnIsoLine(const Handle(Adaptor2d_Curve2d)& theC2D, const Standard_Boolean theIsU, const Standard_Real theParam, const Standard_Boolean theIsForward) diff --git a/src/Approx/Approx_CurveOnSurface.hxx b/src/Approx/Approx_CurveOnSurface.hxx index 55f376e5c8..c3541e357d 100644 --- a/src/Approx/Approx_CurveOnSurface.hxx +++ b/src/Approx/Approx_CurveOnSurface.hxx @@ -85,7 +85,7 @@ protected: //! @param theParam Line parameter. //! @param theIsForward Flag indicating forward parameterization on a isoline. //! @return Standard_True when 2d curve is a line and Standard_False otherwise. - Standard_Boolean isIsoLine(const Handle(Adaptor2d_Curve2d) theC2D, + Standard_Boolean isIsoLine(const Handle(Adaptor2d_Curve2d)& theC2D, Standard_Boolean& theIsU, Standard_Real& theParam, Standard_Boolean& theIsForward) const; @@ -97,7 +97,7 @@ protected: //! @param theParam Line parameter. //! @param theIsForward Flag indicating forward parameterization on a isoline. //! @return Standard_True when 3d curve is built and Standard_False otherwise. - Standard_Boolean buildC3dOnIsoLine(const Handle(Adaptor2d_Curve2d) theC2D, + Standard_Boolean buildC3dOnIsoLine(const Handle(Adaptor2d_Curve2d)& theC2D, const Standard_Boolean theIsU, const Standard_Real theParam, const Standard_Boolean theIsForward); diff --git a/src/BOPAlgo/BOPAlgo_BuilderSolid.cxx b/src/BOPAlgo/BOPAlgo_BuilderSolid.cxx index 05db2286c5..9049bfbceb 100644 --- a/src/BOPAlgo/BOPAlgo_BuilderSolid.cxx +++ b/src/BOPAlgo/BOPAlgo_BuilderSolid.cxx @@ -733,7 +733,7 @@ void MakeInternalShells(const TopTools_IndexedMapOfShape& theMF, // aNbF = theMF.Extent(); for (i = 1; i <= aNbF; ++i) { - TopoDS_Shape aF = theMF(i); + const TopoDS_Shape& aF = theMF(i); TopExp::MapShapesAndAncestors(aF, TopAbs_EDGE, TopAbs_FACE, aMEF); diff --git a/src/BOPTest/BOPTest_BOPCommands.cxx b/src/BOPTest/BOPTest_BOPCommands.cxx index f22b0c2a3f..7ea2cdb65a 100644 --- a/src/BOPTest/BOPTest_BOPCommands.cxx +++ b/src/BOPTest/BOPTest_BOPCommands.cxx @@ -667,7 +667,7 @@ Standard_Integer bopcurves (Draw_Interpretor& di, for (Standard_Integer i=1; i<=aNbCurves; i++) { const IntTools_Curve& anIC=aSCs(i); - Handle (Geom_Curve) aC3D = anIC.Curve(); + const Handle (Geom_Curve)& aC3D = anIC.Curve(); if (aC3D.IsNull()) { di << " has Null 3d curve# " << i << "\n"; @@ -682,8 +682,8 @@ Standard_Integer bopcurves (Draw_Interpretor& di, DrawTrSurf::Set(nameC, aC3D); di << nameC << " "; // - Handle(Geom2d_Curve) aPC1 = anIC.FirstCurve2d(); - Handle(Geom2d_Curve) aPC2 = anIC.SecondCurve2d(); + const Handle(Geom2d_Curve)& aPC1 = anIC.FirstCurve2d(); + const Handle(Geom2d_Curve)& aPC2 = anIC.SecondCurve2d(); // if (!aPC1.IsNull() || !aPC2.IsNull()) { di << "("; diff --git a/src/BOPTools/BOPTools_AlgoTools3D.cxx b/src/BOPTools/BOPTools_AlgoTools3D.cxx index c620cbd701..9b6ecce589 100644 --- a/src/BOPTools/BOPTools_AlgoTools3D.cxx +++ b/src/BOPTools/BOPTools_AlgoTools3D.cxx @@ -736,7 +736,7 @@ void Add(const TopoDS_Shape& aS, return; } // - TopoDS_Shape aSx = aS; + const TopoDS_Shape& aSx = aS; // anIndex=myShapes.FindIndex(aSx); if (!anIndex) { diff --git a/src/BOPTools/BOPTools_AlgoTools_2.cxx b/src/BOPTools/BOPTools_AlgoTools_2.cxx index f066189c52..96034feede 100644 --- a/src/BOPTools/BOPTools_AlgoTools_2.cxx +++ b/src/BOPTools/BOPTools_AlgoTools_2.cxx @@ -112,7 +112,7 @@ void BOPTools_AlgoTools::MakeSectEdge(const IntTools_Curve& aIC, const Standard_Real aP2, TopoDS_Edge& aNewEdge) { - Handle(Geom_Curve) aC=aIC.Curve (); + const Handle(Geom_Curve)& aC=aIC.Curve (); BRepBuilderAPI_MakeEdge aMakeEdge(aC, aV1, aV2, aP1, aP2); diff --git a/src/BRepAlgo/BRepAlgo.cxx b/src/BRepAlgo/BRepAlgo.cxx index f7a1c0ea36..1fc8dc0a2a 100644 --- a/src/BRepAlgo/BRepAlgo.cxx +++ b/src/BRepAlgo/BRepAlgo.cxx @@ -383,7 +383,7 @@ TopoDS_Edge BRepAlgo::ConcatenateWireC0(const TopoDS_Wire& aWire) BRepTools_WireExplorer wexp(theWire); for (; wexp.More(); wexp.Next()) { - TopoDS_Edge anEdge = wexp.Current(); + const TopoDS_Edge& anEdge = wexp.Current(); Standard_Real fpar, lpar; Handle(Geom_Curve) aCurve = BRep_Tool::Curve(anEdge, fpar, lpar); @@ -392,7 +392,7 @@ TopoDS_Edge BRepAlgo::ConcatenateWireC0(const TopoDS_Wire& aWire) GeomAdaptor_Curve aGACurve(aCurve); GeomAbs_CurveType aType = aGACurve.GetType(); - Handle(Geom_Curve) aBasisCurve = aGACurve.Curve(); + const Handle(Geom_Curve)& aBasisCurve = aGACurve.Curve(); Standard_Boolean isFwd = (wexp.Orientation() != TopAbs_REVERSED); if (aBasisCurve->IsPeriodic()) { diff --git a/src/BRepAlgo/BRepAlgo_Loop.cxx b/src/BRepAlgo/BRepAlgo_Loop.cxx index ba6b1e6052..828e9f091e 100644 --- a/src/BRepAlgo/BRepAlgo_Loop.cxx +++ b/src/BRepAlgo/BRepAlgo_Loop.cxx @@ -284,7 +284,7 @@ static void RemovePendingEdges(TopTools_IndexedDataMapOfShapeListOfShape& MVE) //purpose : //======================================================================= -static Standard_Boolean SamePnt2d(TopoDS_Vertex V, +static Standard_Boolean SamePnt2d(const TopoDS_Vertex& V, TopoDS_Edge& E1, TopoDS_Edge& E2, TopoDS_Face& F) diff --git a/src/BRepBndLib/BRepBndLib.cxx b/src/BRepBndLib/BRepBndLib.cxx index f3ab8ed860..db239c4217 100644 --- a/src/BRepBndLib/BRepBndLib.cxx +++ b/src/BRepBndLib/BRepBndLib.cxx @@ -47,7 +47,7 @@ // static Standard_Boolean CanUseEdges(const Adaptor3d_Surface& BS); // -static void FindExactUVBounds(const TopoDS_Face F, +static void FindExactUVBounds(const TopoDS_Face& F, Standard_Real& umin, Standard_Real& umax, Standard_Real& vmin, Standard_Real& vmax, const Standard_Real Tol, @@ -460,7 +460,7 @@ Standard_Boolean CanUseEdges(const Adaptor3d_Surface& BS) //function : FindExactUVBounds //purpose : //======================================================================= -void FindExactUVBounds(const TopoDS_Face FF, +void FindExactUVBounds(const TopoDS_Face& FF, Standard_Real& umin, Standard_Real& umax, Standard_Real& vmin, Standard_Real& vmax, const Standard_Real Tol, diff --git a/src/BRepBuilderAPI/BRepBuilderAPI_Collect.cxx b/src/BRepBuilderAPI/BRepBuilderAPI_Collect.cxx index 2f54913e2c..c179841760 100644 --- a/src/BRepBuilderAPI/BRepBuilderAPI_Collect.cxx +++ b/src/BRepBuilderAPI/BRepBuilderAPI_Collect.cxx @@ -58,7 +58,7 @@ static void BuildBack (const TopTools_DataMapOfShapeListOfShape& M1, //======================================================================= static void Replace ( TopTools_ListOfShape& L, - const TopoDS_Shape Old, + const TopoDS_Shape& Old, const TopTools_ListOfShape& New) { //----------------------------------- @@ -150,7 +150,7 @@ static void Update ( TopTools_DataMapOfShapeListOfShape& Mod, if (!LIG.IsEmpty()) { if (ModBack.IsBound(S)) { // Generation de modif => generation du shape initial - TopoDS_Shape IS = ModBack(S); + const TopoDS_Shape& IS = ModBack(S); StoreImage (Gen,IS,GenBack,LIG); } else { diff --git a/src/BRepBuilderAPI/BRepBuilderAPI_MakeShapeOnMesh.cxx b/src/BRepBuilderAPI/BRepBuilderAPI_MakeShapeOnMesh.cxx index 5d74c71856..8f919bfa6e 100644 --- a/src/BRepBuilderAPI/BRepBuilderAPI_MakeShapeOnMesh.cxx +++ b/src/BRepBuilderAPI/BRepBuilderAPI_MakeShapeOnMesh.cxx @@ -237,7 +237,7 @@ void BRepBuilderAPI_MakeShapeOnMesh::Build(const Message_ProgressRange& theRange gp_Pln aPln(myMesh->Node(anIdx[0]), aNorm); BRepBuilderAPI_MakeFace aFaceMaker(aPln, aWire); - const TopoDS_Face aFace = aFaceMaker.Face(); + const TopoDS_Face& aFace = aFaceMaker.Face(); aBB.Add(aResult, aFace); } diff --git a/src/BRepBuilderAPI/BRepBuilderAPI_Sewing.cxx b/src/BRepBuilderAPI/BRepBuilderAPI_Sewing.cxx index 65bb5ab958..5054222ff0 100644 --- a/src/BRepBuilderAPI/BRepBuilderAPI_Sewing.cxx +++ b/src/BRepBuilderAPI/BRepBuilderAPI_Sewing.cxx @@ -374,7 +374,7 @@ TopoDS_Edge BRepBuilderAPI_Sewing::SameParameterEdge(const TopoDS_Shape& edge, for (Standard_Integer i = 1; i <= seqEdges.Length(); i++) { // Retrieve candidate section - TopoDS_Shape oedge2 = seqEdges(i); + const TopoDS_Shape& oedge2 = seqEdges(i); if (mySewing) { @@ -1393,7 +1393,7 @@ void BRepBuilderAPI_Sewing::AnalysisNearestEdges(const TopTools_SequenceOfShape& // (they have other nearest edges belonging to the work face) for(Standard_Integer k = 1; k<= seqNotCandidate.Length(); k++) { Standard_Integer index1 = seqNotCandidate.Value(k); - TopoDS_Shape edge = sequenceSec.Value(index1); + const TopoDS_Shape& edge = sequenceSec.Value(index1); TopTools_SequenceOfShape tmpSeq; tmpSeq.Append(edge); for(Standard_Integer kk = 1; kk <= seqIndCandidate.Length();kk++) @@ -2928,7 +2928,7 @@ void BRepBuilderAPI_Sewing::VerticesAssembling(const Message_ProgressRange& theP for (i = 1; i <= myBoundFaces.Extent(); i++) { TopoDS_Shape bound = myBoundFaces.FindKey(i); for (TopoDS_Iterator itv(bound,Standard_False); itv.More(); itv.Next()) { - TopoDS_Shape node = itv.Value(); + const TopoDS_Shape& node = itv.Value(); if (myNodeSections.IsBound(node)) myNodeSections(node).Append(bound); else { @@ -2991,7 +2991,7 @@ static void replaceNMVertices(const TopoDS_Edge& theEdge, theReShape->Replace(aSeqNMVert.Value(i),theV2); continue; } - TopoDS_Shape aV = aSeqNMVert.Value(i); + const TopoDS_Shape& aV = aSeqNMVert.Value(i); Standard_Integer j =1; for( ; j <= aEdParams.Length();j++) { Standard_Real apar2 = aEdParams.Value(j); @@ -3508,7 +3508,7 @@ Standard_Boolean BRepBuilderAPI_Sewing::MergedNearestEdges(const TopoDS_Shape& e TopTools_MapOfShape mapEdges; mapEdges.Add(edge); for (Standard_Integer i = 1; i <= mapVert1.Extent(); i++) { - TopoDS_Shape node1 = mapVert1.FindKey(i); + const TopoDS_Shape& node1 = mapVert1.FindKey(i); if (!myNodeSections.IsBound(node1)) continue; TopTools_ListIteratorOfListOfShape ilsec(myNodeSections(node1)); for (; ilsec.More(); ilsec.Next()) { @@ -4453,7 +4453,7 @@ void BRepBuilderAPI_Sewing::CreateCuttingNodes(const TopTools_IndexedMapOfShape& if (jdist < 0.0) { // Bind new cutting node (end vertex only) seqDist.SetValue(indexMin,disProj); - TopoDS_Shape cvertex = seqVert.Value(indexMin); + const TopoDS_Shape& cvertex = seqVert.Value(indexMin); NodeCuttingVertex.Add(node,cvertex); } else { diff --git a/src/BRepCheck/BRepCheck_Face.cxx b/src/BRepCheck/BRepCheck_Face.cxx index f128ec6d4d..b05003f42f 100644 --- a/src/BRepCheck/BRepCheck_Face.cxx +++ b/src/BRepCheck/BRepCheck_Face.cxx @@ -625,7 +625,7 @@ static Standard_Boolean Intersect(const TopoDS_Wire& wir1, MapW1.Add( exp1.Current() ); for (exp2.Init( wir2, TopAbs_VERTEX ); exp2.More(); exp2.Next()) { - TopoDS_Shape V = exp2.Current(); + const TopoDS_Shape& V = exp2.Current(); if (MapW1.Contains( V )) CommonVertices.Append( V ); } diff --git a/src/BRepClass/BRepClass_Intersector.cxx b/src/BRepClass/BRepClass_Intersector.cxx index b0665864e1..1d843ef771 100644 --- a/src/BRepClass/BRepClass_Intersector.cxx +++ b/src/BRepClass/BRepClass_Intersector.cxx @@ -248,7 +248,6 @@ void CheckSkip(Geom2dInt_GInter& theInter, { return; } - const TopoDS_Edge anEl = theE.NextEdge(); // the next edge if (!(BRep_Tool::Tolerance(aVl) > theMaxTol) || theE.NextEdge().IsNull()) { return; diff --git a/src/BRepClass3d/BRepClass3d_SClassifier.cxx b/src/BRepClass3d/BRepClass3d_SClassifier.cxx index 1cbf729b23..ae44086e0a 100644 --- a/src/BRepClass3d/BRepClass3d_SClassifier.cxx +++ b/src/BRepClass3d/BRepClass3d_SClassifier.cxx @@ -46,7 +46,7 @@ static //gets transition of line passing through/near the edge of faces , . is // a parameter on the edge where the minimum distance between and was found -static Standard_Integer GetTransi(const TopoDS_Face& f1, const TopoDS_Face& f2, const TopoDS_Edge e, +static Standard_Integer GetTransi(const TopoDS_Face& f1, const TopoDS_Face& f2, const TopoDS_Edge& e, Standard_Real param, const gp_Lin& L, IntCurveSurface_TransitionOnCurve& trans); static Standard_Boolean GetNormalOnFaceBound(const TopoDS_Edge& E, const TopoDS_Face& F, Standard_Real param, gp_Dir& OutDir); @@ -607,7 +607,7 @@ static Standard_Boolean GetNormalOnFaceBound(const TopoDS_Edge& E, //======================================================================= static Standard_Integer GetTransi(const TopoDS_Face& f1, const TopoDS_Face& f2, - const TopoDS_Edge e, + const TopoDS_Edge& e, const Standard_Real param, const gp_Lin& L, IntCurveSurface_TransitionOnCurve& trans) diff --git a/src/BRepExtrema/BRepExtrema_DistShapeShape.cxx b/src/BRepExtrema/BRepExtrema_DistShapeShape.cxx index fdf1594598..c77cd09de5 100644 --- a/src/BRepExtrema/BRepExtrema_DistShapeShape.cxx +++ b/src/BRepExtrema/BRepExtrema_DistShapeShape.cxx @@ -65,8 +65,8 @@ namespace } } - inline Standard_Real DistanceInitiale(const TopoDS_Vertex V1, - const TopoDS_Vertex V2) + inline Standard_Real DistanceInitiale(const TopoDS_Vertex& V1, + const TopoDS_Vertex& V2) { return (BRep_Tool::Pnt(V1).Distance(BRep_Tool::Pnt(V2))); } diff --git a/src/BRepFeat/BRepFeat.cxx b/src/BRepFeat/BRepFeat.cxx index 725050a01f..010de828ac 100644 --- a/src/BRepFeat/BRepFeat.cxx +++ b/src/BRepFeat/BRepFeat.cxx @@ -312,7 +312,7 @@ void BRepFeat::ParametricMinMax(const TopoDS_Shape& S, //======================================================================= static Standard_Boolean IsIn (BRepTopAdaptor_FClass2d& FC, - Geom2dAdaptor_Curve AC) + const Geom2dAdaptor_Curve& AC) { Standard_Real Def = 100*Precision::Confusion(); GCPnts_QuasiUniformDeflection QU(AC,Def); diff --git a/src/BRepFeat/BRepFeat_Form.cxx b/src/BRepFeat/BRepFeat_Form.cxx index 19f1de65c1..4ea9ea05a5 100644 --- a/src/BRepFeat/BRepFeat_Form.cxx +++ b/src/BRepFeat/BRepFeat_Form.cxx @@ -489,7 +489,7 @@ static void Descendants(const TopoDS_Shape&, #endif theGlue.Perform(); if (theGlue.IsDone()) { - TopoDS_Shape shshs = theGlue.ResultingShape(); + const TopoDS_Shape& shshs = theGlue.ResultingShape(); // if (BRepOffsetAPI::IsTopologicallyValid(shshs)) { if (BRepAlgo::IsValid(shshs)) { UpdateDescendants(theGlue); diff --git a/src/BRepFeat/BRepFeat_MakeDPrism.cxx b/src/BRepFeat/BRepFeat_MakeDPrism.cxx index 7f01a42ba8..5060d327cc 100644 --- a/src/BRepFeat/BRepFeat_MakeDPrism.cxx +++ b/src/BRepFeat/BRepFeat_MakeDPrism.cxx @@ -66,7 +66,7 @@ static Standard_Real HeightMax(const TopoDS_Shape& theSbase, const TopoDS_Shape& theSFrom, const TopoDS_Shape& theSUntil); -static Standard_Integer SensOfPrism(const Handle(Geom_Curve) C, +static Standard_Integer SensOfPrism(const Handle(Geom_Curve)& C, const TopoDS_Shape& Until); static Handle(Geom_Curve) TestCurve(const TopoDS_Face&); @@ -212,13 +212,13 @@ void BRepFeat_MakeDPrism::Perform(const Standard_Real Height) // myPbase.Orientation(TopAbs_FORWARD); LocOpe_DPrism theDPrism(myPbase,theheight,myAngle); - TopoDS_Shape VraiDPrism = theDPrism.Shape(); + const TopoDS_Shape& VraiDPrism = theDPrism.Shape(); MajMap(myPbase,theDPrism,myMap,myFShape,myLShape); myGShape = VraiDPrism; GeneratedShapeValid(); - TopoDS_Shape Base = theDPrism.FirstShape(); + const TopoDS_Shape& Base = theDPrism.FirstShape(); TopExp_Explorer exp(Base, TopAbs_FACE); TopoDS_Face theBase = TopoDS::Face(exp.Current()); exp.Next(); @@ -295,12 +295,12 @@ void BRepFeat_MakeDPrism::Perform(const TopoDS_Shape& Until) Standard_Real Height = sens*HeightMax(mySbase, mySkface, mySFrom, mySUntil); LocOpe_DPrism theDPrism(myPbase,Height,myAngle); - TopoDS_Shape VraiDPrism = theDPrism.Shape(); + const TopoDS_Shape& VraiDPrism = theDPrism.Shape(); if(!Trf) { MajMap(myPbase,theDPrism,myMap,myFShape,myLShape); myGShape = VraiDPrism; GeneratedShapeValid(); - TopoDS_Shape Base = theDPrism.FirstShape(); + const TopoDS_Shape& Base = theDPrism.FirstShape(); exp.Init(Base, TopAbs_FACE); TopoDS_Face theBase = TopoDS::Face(exp.Current()); exp.Next(); @@ -350,7 +350,7 @@ void BRepFeat_MakeDPrism::Perform(const TopoDS_Shape& Until) UpdateDescendants(trP, trP.Shape(), Standard_False); TopExp_Explorer ex(trP.Shape(), TopAbs_SOLID); - TopoDS_Shape Cutsh = ex.Current(); + const TopoDS_Shape& Cutsh = ex.Current(); if(myFuse == 1) { BRepAlgoAPI_Fuse f(mySbase, Cutsh); myShape = f.Shape(); @@ -446,7 +446,7 @@ void BRepFeat_MakeDPrism::Perform(const TopoDS_Shape& From, Standard_Real Height = sens*HeightMax(mySbase, myPbase, mySFrom, mySUntil); LocOpe_DPrism theDPrism(myPbase, Height, Height, myAngle); - TopoDS_Shape VraiDPrism = theDPrism.Shape(); + const TopoDS_Shape& VraiDPrism = theDPrism.Shape(); if(!Trff) { @@ -575,7 +575,7 @@ void BRepFeat_MakeDPrism::PerformUntilEnd() // myPbase.Orientation(TopAbs_FORWARD); LocOpe_DPrism theDPrism(myPbase, Height, myAngle); - TopoDS_Shape VraiDPrism = theDPrism.Shape(); + const TopoDS_Shape& VraiDPrism = theDPrism.Shape(); MajMap(myPbase,theDPrism,myMap,myFShape,myLShape); @@ -624,7 +624,7 @@ void BRepFeat_MakeDPrism::PerformFromEnd(const TopoDS_Shape& Until) sens*HeightMax(mySbase, mySkface, mySFrom, mySUntil); LocOpe_DPrism theDPrism(myPbase, Height, Height, myAngle); - TopoDS_Shape VraiDPrism = theDPrism.Shape(); + const TopoDS_Shape& VraiDPrism = theDPrism.Shape(); if(VraiDPrism.IsNull()) { NotDone(); myStatusError = BRepFeat_NullRealTool; @@ -762,7 +762,7 @@ void BRepFeat_MakeDPrism::PerformThruAll() Standard_Real Height = HeightMax(mySbase, mySkface, mySFrom, mySUntil); LocOpe_DPrism theDPrism(myPbase, Height, Height, myAngle); - TopoDS_Shape VraiDPrism = theDPrism.Shape(); + const TopoDS_Shape& VraiDPrism = theDPrism.Shape(); MajMap(myPbase,theDPrism,myMap,myFShape,myLShape); myGShape = VraiDPrism; @@ -819,13 +819,13 @@ void BRepFeat_MakeDPrism::PerformUntilHeight(const TopoDS_Shape& Until, Standard_Integer sens = SensOfPrism(C, mySUntil); LocOpe_DPrism theDPrism(myPbase,sens*Height,myAngle); - TopoDS_Shape VraiDPrism = theDPrism.Shape(); + const TopoDS_Shape& VraiDPrism = theDPrism.Shape(); if(!Trf) { // case face finished MajMap(myPbase,theDPrism,myMap,myFShape,myLShape); myGShape = VraiDPrism; GeneratedShapeValid(); - TopoDS_Shape Base = theDPrism.FirstShape(); + const TopoDS_Shape& Base = theDPrism.FirstShape(); exp.Init(Base, TopAbs_FACE); TopoDS_Face theBase = TopoDS::Face(exp.Current()); exp.Next(); @@ -1074,7 +1074,7 @@ static Standard_Real HeightMax(const TopoDS_Shape& theSbase, // shape initial //function : SensOfPrism //purpose : determine the direction of prism generation //======================================================================= -Standard_Integer SensOfPrism(const Handle(Geom_Curve) C, +Standard_Integer SensOfPrism(const Handle(Geom_Curve)& C, const TopoDS_Shape& Until) { LocOpe_CSIntersector ASI1(Until); diff --git a/src/BRepFeat/BRepFeat_MakePrism.cxx b/src/BRepFeat/BRepFeat_MakePrism.cxx index daa4a39a7f..27eade49fd 100644 --- a/src/BRepFeat/BRepFeat_MakePrism.cxx +++ b/src/BRepFeat/BRepFeat_MakePrism.cxx @@ -68,7 +68,7 @@ static Standard_Real HeightMax(const TopoDS_Shape& theSbase, const TopoDS_Shape& theSFrom, const TopoDS_Shape& theSUntil); -static Standard_Integer SensOfPrism(const Handle(Geom_Curve) C, +static Standard_Integer SensOfPrism(const Handle(Geom_Curve)& C, const TopoDS_Shape& Until); static Handle(Geom_Curve) TestCurve(const TopoDS_Shape&, @@ -215,7 +215,7 @@ void BRepFeat_MakePrism::Perform(const Standard_Real Length) //construction of prism of height Length LocOpe_Prism thePrism(myPbase,V); - TopoDS_Shape VraiPrism = thePrism.Shape(); + const TopoDS_Shape& VraiPrism = thePrism.Shape(); // management of descendants MajMap(myPbase,thePrism,myMap,myFShape,myLShape); @@ -325,7 +325,7 @@ void BRepFeat_MakePrism::Perform(const TopoDS_Shape& Until) // construction of long prism LocOpe_Prism thePrism(myPbase,V); - TopoDS_Shape VraiPrism = thePrism.Shape(); + const TopoDS_Shape& VraiPrism = thePrism.Shape(); // in case of support of face Until if(!Trf) { @@ -366,7 +366,7 @@ void BRepFeat_MakePrism::Perform(const TopoDS_Shape& Until) UpdateDescendants(trP, trP.Shape(), Standard_False); // TopExp_Explorer ex(trP.Shape(), TopAbs_SOLID); - TopoDS_Shape Cutsh = ex.Current(); + const TopoDS_Shape& Cutsh = ex.Current(); if (myFuse == 1 && !myJustFeat) { BRepAlgoAPI_Fuse f(mySbase, Cutsh); myShape = f.Shape(); @@ -591,7 +591,7 @@ void BRepFeat_MakePrism::PerformUntilEnd() gp_Vec V(2*Height*myDir); LocOpe_Prism thePrism(myPbase,V); - TopoDS_Shape VraiPrism = thePrism.Shape(); + const TopoDS_Shape& VraiPrism = thePrism.Shape(); MajMap(myPbase,thePrism,myMap,myFShape,myLShape); @@ -651,7 +651,7 @@ void BRepFeat_MakePrism::PerformFromEnd(const TopoDS_Shape& Until) gp_Vec Vtra(-3*Height*sens/2.*myDir); gp_Vec Vect(3*sens*Height*myDir); LocOpe_Prism thePrism(myPbase,Vect,Vtra); - TopoDS_Shape VraiPrism = thePrism.Shape(); + const TopoDS_Shape& VraiPrism = thePrism.Shape(); if(!Trf) { // case face until MajMap(myPbase,thePrism,myMap,myFShape,myLShape); @@ -775,7 +775,7 @@ void BRepFeat_MakePrism::PerformThruAll() gp_Vec V(3*Height*myDir); gp_Vec Vtra(-3*Height/2.*myDir); LocOpe_Prism thePrism(myPbase,V,Vtra); - TopoDS_Shape VraiPrism = thePrism.Shape(); + const TopoDS_Shape& VraiPrism = thePrism.Shape(); MajMap(myPbase,thePrism,myMap,myFShape,myLShape); myGShape = VraiPrism; @@ -830,7 +830,7 @@ void BRepFeat_MakePrism::PerformUntilHeight(const TopoDS_Shape& Until, Standard_Integer sens = SensOfPrism(C, mySUntil); gp_Vec V(sens*Length*myDir); LocOpe_Prism thePrism(myPbase,V); - TopoDS_Shape VraiPrism = thePrism.Shape(); + const TopoDS_Shape& VraiPrism = thePrism.Shape(); if(!Trf) { MajMap(myPbase,thePrism,myMap,myFShape,myLShape); @@ -978,7 +978,7 @@ static Standard_Real HeightMax(const TopoDS_Shape& theSbase, //function : SensOfPrism //purpose : Direction of the prism depending on the shape Until //======================================================================= -Standard_Integer SensOfPrism(const Handle(Geom_Curve) C, +Standard_Integer SensOfPrism(const Handle(Geom_Curve)& C, const TopoDS_Shape& Until) { LocOpe_CSIntersector ASI1(Until); diff --git a/src/BRepFeat/BRepFeat_MakeRevol.cxx b/src/BRepFeat/BRepFeat_MakeRevol.cxx index 69eeee218d..df0c980513 100644 --- a/src/BRepFeat/BRepFeat_MakeRevol.cxx +++ b/src/BRepFeat/BRepFeat_MakeRevol.cxx @@ -353,7 +353,7 @@ void BRepFeat_MakeRevol::Perform(const TopoDS_Shape& Until) myGShape = VraiRevol; GeneratedShapeValid(); - TopoDS_Shape Base = theRevol.FirstShape(); + const TopoDS_Shape& Base = theRevol.FirstShape(); exp.Init(Base, TopAbs_FACE); TopoDS_Face theBase = TopoDS::Face(exp.Current()); exp.Next(); @@ -633,7 +633,7 @@ void BRepFeat_MakeRevol::PerformUntilAngle(const TopoDS_Shape& Until, myGShape = VraiRevol; GeneratedShapeValid(); - TopoDS_Shape Base = theRevol.FirstShape(); + const TopoDS_Shape& Base = theRevol.FirstShape(); exp.Init(Base, TopAbs_FACE); TopoDS_Face theBase = TopoDS::Face(exp.Current()); exp.Next(); @@ -732,7 +732,7 @@ static void VerifGluedFaces(const TopoDS_Face& theSkface, TopTools_DataMapOfShapeShape& theMap) { Standard_Boolean GluedFaces = Standard_True; - TopoDS_Shape VraiRevol = theRevol.Shape(); + const TopoDS_Shape& VraiRevol = theRevol.Shape(); TColGeom_SequenceOfCurve scur; theRevol.Curves(theCurves); diff --git a/src/BRepFill/BRepFill.cxx b/src/BRepFill/BRepFill.cxx index 38fd29fa4f..33533e16bc 100644 --- a/src/BRepFill/BRepFill.cxx +++ b/src/BRepFill/BRepFill.cxx @@ -986,8 +986,8 @@ TopoDS_Wire BRepFill::InsertACR(const TopoDS_Wire& wire, } } - TopoDS_Edge E = anExp.Current(); - TopoDS_Vertex V = anExp.CurrentVertex(); + const TopoDS_Edge& E = anExp.Current(); + const TopoDS_Vertex& V = anExp.CurrentVertex(); if (ndec==0 || BRep_Tool::Degenerated(E)) { // copy the edge diff --git a/src/BRepFill/BRepFill_CompatibleWires.cxx b/src/BRepFill/BRepFill_CompatibleWires.cxx index 7474c7b346..1133af2f79 100644 --- a/src/BRepFill/BRepFill_CompatibleWires.cxx +++ b/src/BRepFill/BRepFill_CompatibleWires.cxx @@ -128,7 +128,7 @@ static void AddNewEdge(const TopoDS_Shape& theEdge, const TopTools_SequenceOfShape& NewEdges = theEdgeNewEdges(theEdge); for (Standard_Integer i = 1; i <= NewEdges.Length(); i++) { - TopoDS_Shape anEdge = NewEdges(i); + const TopoDS_Shape& anEdge = NewEdges(i); AddNewEdge(anEdge, theEdgeNewEdges, ListNewEdges); } } @@ -1309,7 +1309,7 @@ void BRepFill_CompatibleWires:: TopTools_DataMapIteratorOfDataMapOfShapeListOfShape itmap(myMap); for (; itmap.More(); itmap.Next()) { - TopoDS_Shape anEdge = itmap.Key(); + const TopoDS_Shape& anEdge = itmap.Key(); TopTools_ListOfShape ListOfNewEdges; //for each edge of find all newest edges diff --git a/src/BRepFill/BRepFill_Evolved.cxx b/src/BRepFill/BRepFill_Evolved.cxx index 6655ffb441..e3a2c72a97 100644 --- a/src/BRepFill/BRepFill_Evolved.cxx +++ b/src/BRepFill/BRepFill_Evolved.cxx @@ -711,7 +711,7 @@ void BRepFill_Evolved::ElementaryPerform (const TopoDS_Face& Sp, for (WireExp.Init(TopoDS::Wire(FaceExp.Current())); WireExp.More(); WireExp.Next()) { - TopoDS_Edge CurrentEdge = WireExp.Current(); + const TopoDS_Edge& CurrentEdge = WireExp.Current(); TopoDS_Vertex VFirst,VLast; EdgeVertices(CurrentEdge,VFirst,VLast); @@ -2139,7 +2139,7 @@ void BRepFill_Evolved::MakeSolid() B.MakeCompound(Res); for (; exp.More(); exp.Next()) { - TopoDS_Shape Sh = exp.Current(); + const TopoDS_Shape& Sh = exp.Current(); B.MakeSolid(Sol); B.Add(Sol,Sh); BRepClass3d_SolidClassifier SC(Sol); diff --git a/src/BRepFill/BRepFill_Filling.cxx b/src/BRepFill/BRepFill_Filling.cxx index 89f77932a1..6266e1ba32 100644 --- a/src/BRepFill/BRepFill_Filling.cxx +++ b/src/BRepFill/BRepFill_Filling.cxx @@ -59,7 +59,7 @@ #include #include -static gp_Vec MakeFinVec( const TopoDS_Wire aWire, const TopoDS_Vertex aVertex ) +static gp_Vec MakeFinVec( const TopoDS_Wire& aWire, const TopoDS_Vertex& aVertex ) { TopoDS_Vertex Vfirst, Vlast, Origin; BRepTools_WireExplorer Explo( aWire ); diff --git a/src/BRepFill/BRepFill_MultiLine.cxx b/src/BRepFill/BRepFill_MultiLine.cxx index 9f27aa77ab..4b4714dad8 100644 --- a/src/BRepFill/BRepFill_MultiLine.cxx +++ b/src/BRepFill/BRepFill_MultiLine.cxx @@ -655,7 +655,7 @@ static gp_Pnt2d ValueOnFace(const Standard_Real U, } #endif - Geom2dAdaptor_Curve Cu1 = TheV; + const Geom2dAdaptor_Curve& Cu1 = TheV; Geom2dAdaptor_Curve Cu2( Line); Standard_Real TolConf = 0.; diff --git a/src/BRepFill/BRepFill_OffsetWire.cxx b/src/BRepFill/BRepFill_OffsetWire.cxx index 0c7cb2b840..6db9e9df4d 100644 --- a/src/BRepFill/BRepFill_OffsetWire.cxx +++ b/src/BRepFill/BRepFill_OffsetWire.cxx @@ -570,7 +570,7 @@ void BRepFill_OffsetWire::Perform (const Standard_Real Offset, TopoDS_Iterator itws( myWorkSpine ); for (; itws.More(); itws.Next()) { - TopoDS_Shape aWire = itws.Value(); + const TopoDS_Shape& aWire = itws.Value(); aSubst.Build( aWire ); if (aSubst.IsCopied(aWire)) { diff --git a/src/BRepFill/BRepFill_Pipe.cxx b/src/BRepFill/BRepFill_Pipe.cxx index 8fe76d21b8..46e2b34d4c 100644 --- a/src/BRepFill/BRepFill_Pipe.cxx +++ b/src/BRepFill/BRepFill_Pipe.cxx @@ -746,7 +746,7 @@ TopoDS_Shape BRepFill_Pipe::MakeShape(const TopoDS_Shape& S, TopExp_Explorer Explo(result, TopAbs_FACE); for (; Explo.More(); Explo.Next()) { - TopoDS_Shape aFace = Explo.Current(); + const TopoDS_Shape& aFace = Explo.Current(); RebuildTopOrBottomFace(aFace.Reversed(), Standard_True); //top face was reversed } ///// @@ -987,7 +987,7 @@ void BRepFill_Pipe::RebuildTopOrBottomFace(const TopoDS_Shape& aFace, TopoDS_Iterator itw(aWire); for (; itw.More(); itw.Next()) { - TopoDS_Shape anEdge = itw.Value(); + const TopoDS_Shape& anEdge = itw.Value(); for (ii = myCurIndexOfSectionEdge; ii <= mySections->ColLength(); ii++) { TopoDS_Shape aVisoEdge = mySections->Value(ii, IndexOfSection); diff --git a/src/BRepFill/BRepFill_PipeShell.cxx b/src/BRepFill/BRepFill_PipeShell.cxx index e0405b02c2..d924ff4f47 100644 --- a/src/BRepFill/BRepFill_PipeShell.cxx +++ b/src/BRepFill/BRepFill_PipeShell.cxx @@ -1116,7 +1116,7 @@ void BRepFill_PipeShell::Generated(const TopoDS_Shape& theShape, for (; Explo.More(); Explo.Next()) { const TopoDS_Edge& anEdge = TopoDS::Edge(Explo.Current()); - TopTools_ListOfShape aNewEdges = Georges.GeneratedShapes(anEdge); + const TopTools_ListOfShape& aNewEdges = Georges.GeneratedShapes(anEdge); myEdgeNewEdges.Bind(anEdge, aNewEdges); } } @@ -1168,7 +1168,7 @@ void BRepFill_PipeShell::Place(const BRepFill_Section& Sec, Sec.Vertex(), Sec.WithContact(), Sec.WithCorrection()); - TopoDS_Wire TmpWire = Sec.Wire(); + const TopoDS_Wire& TmpWire = Sec.Wire(); aTrsf = Place.Transformation(); //Transform the copy W = TopoDS::Wire(BRepBuilderAPI_Transform(TmpWire, aTrsf, Standard_True)); diff --git a/src/BRepFill/BRepFill_Sweep.cxx b/src/BRepFill/BRepFill_Sweep.cxx index e6a1e238b8..f275ec69b1 100644 --- a/src/BRepFill/BRepFill_Sweep.cxx +++ b/src/BRepFill/BRepFill_Sweep.cxx @@ -798,7 +798,7 @@ static TopoDS_Edge BuildEdge(Handle(Geom_Curve)& C3d, const Handle(IntTools_Context) aNullCtx; if (BOPTools_AlgoTools::IsMicroEdge(E, aNullCtx)) { - TopoDS_Vertex aV = VF; + const TopoDS_Vertex& aV = VF; B.UpdateVertex(aV, P1.Distance(P2)); B.MakeEdge(E); B.UpdateEdge(E, C2d, S, TopLoc_Location(), Tol); diff --git a/src/BRepFill/BRepFill_TrimEdgeTool.cxx b/src/BRepFill/BRepFill_TrimEdgeTool.cxx index e6ae701b4c..0cd9a0949d 100644 --- a/src/BRepFill/BRepFill_TrimEdgeTool.cxx +++ b/src/BRepFill/BRepFill_TrimEdgeTool.cxx @@ -180,8 +180,8 @@ static void EvalParameters(const Geom2dAdaptor_Curve& Bis, Standard_Real Tol = Precision::Confusion(); // Standard_Real TolC = 1.e-9; - Geom2dAdaptor_Curve CBis(Bis); - Geom2dAdaptor_Curve CAC (AC); + const Geom2dAdaptor_Curve& CBis(Bis); + const Geom2dAdaptor_Curve& CAC (AC); //Intersector = Geom2dInt_GInter(CBis, CAC, TolC, Tol); Intersector = Geom2dInt_GInter(CAC, CBis, Tol, Tol); @@ -245,8 +245,8 @@ static void EvalParametersBis(const Geom2dAdaptor_Curve& Bis, Geom2dInt_GInter Intersector; Standard_Real TolC = Tol; - Geom2dAdaptor_Curve CBis(Bis); - Geom2dAdaptor_Curve CAC (AC); + const Geom2dAdaptor_Curve& CBis(Bis); + const Geom2dAdaptor_Curve& CAC (AC); Intersector = Geom2dInt_GInter(CAC, CBis, TolC, Tol); diff --git a/src/BRepFill/BRepFill_TrimShellCorner.cxx b/src/BRepFill/BRepFill_TrimShellCorner.cxx index ddbf218fd4..f3265aa1ab 100644 --- a/src/BRepFill/BRepFill_TrimShellCorner.cxx +++ b/src/BRepFill/BRepFill_TrimShellCorner.cxx @@ -571,7 +571,7 @@ BRepFill_TrimShellCorner::MakeFacesNonSec(const Standard_Integer aIt.Initialize(aLP); for ( ; aIt.More(); aIt.Next()) { const BOPDS_Pave& aPave = aIt.Value(); - TopoDS_Shape aV = theDS->Shape(aPave.Index()); + const TopoDS_Shape& aV = theDS->Shape(aPave.Index()); if(aV.IsSame(alonevertices.First())) { if(!bfound1) { diff --git a/src/BRepLib/BRepLib.cxx b/src/BRepLib/BRepLib.cxx index 3eec408309..2466e5dab3 100644 --- a/src/BRepLib/BRepLib.cxx +++ b/src/BRepLib/BRepLib.cxx @@ -288,8 +288,8 @@ static Standard_Integer evaluateMaxSegment(const Standard_Integer aMaxSegment, { if (aMaxSegment != 0) return aMaxSegment; - Handle(Adaptor3d_Surface) aSurf = aCurveOnSurface.GetSurface(); - Handle(Adaptor2d_Curve2d) aCurv2d = aCurveOnSurface.GetCurve(); + const Handle(Adaptor3d_Surface)& aSurf = aCurveOnSurface.GetSurface(); + const Handle(Adaptor2d_Curve2d)& aCurv2d = aCurveOnSurface.GetCurve(); Standard_Real aNbSKnots = 0, aNbC2dKnots = 0; @@ -1188,7 +1188,7 @@ static void GetCurve3d(const TopoDS_Edge& theEdge, Handle(Geom_Curve)& theC3d, S //function : UpdateVTol //purpose : //======================================================================= -void UpdateVTol(const TopoDS_Vertex theV1, const TopoDS_Vertex& theV2, Standard_Real theTol) +void UpdateVTol(const TopoDS_Vertex& theV1, const TopoDS_Vertex& theV2, Standard_Real theTol) { BRep_Builder aB; if (!theV1.IsNull()) diff --git a/src/BRepLib/BRepLib_PointCloudShape.cxx b/src/BRepLib/BRepLib_PointCloudShape.cxx index 0dcb94a095..68b62d6d82 100644 --- a/src/BRepLib/BRepLib_PointCloudShape.cxx +++ b/src/BRepLib/BRepLib_PointCloudShape.cxx @@ -205,7 +205,7 @@ Standard_Boolean BRepLib_PointCloudShape::addDensityPoints (const TopoDS_Shape& BRepTools::UVBounds (aFace, anUMin, anUMax, aVMin, aVMax); BRepTopAdaptor_FClass2d aClassifier (aFace, Precision::Confusion()); - TopLoc_Location aLoc = theFace.Location(); + const TopLoc_Location& aLoc = theFace.Location(); const gp_Trsf& aTrsf = aLoc.Transformation(); TopLoc_Location aLoc1; Handle(Geom_Surface) aSurf = BRep_Tool::Surface (aFace, aLoc1); diff --git a/src/BRepMAT2d/BRepMAT2d_Explorer.cxx b/src/BRepMAT2d/BRepMAT2d_Explorer.cxx index 32ba12c3be..c6ad6c6e60 100644 --- a/src/BRepMAT2d/BRepMAT2d_Explorer.cxx +++ b/src/BRepMAT2d/BRepMAT2d_Explorer.cxx @@ -163,7 +163,7 @@ void BRepMAT2d_Explorer::Add(const TopoDS_Wire& Spine, // Treatment of the next edges: for (; anExp.More(); anExp.Next()) { - TopoDS_Edge anEdge = anExp.Current(); + const TopoDS_Edge& anEdge = anExp.Current(); anOldNewE.Add(anEdge, anEdge); C2d = BRep_Tool::CurveOnSurface (anEdge, aFace, UFirst, ULast); diff --git a/src/BRepMesh/BRepMesh_Delaun.cxx b/src/BRepMesh/BRepMesh_Delaun.cxx index 0aa1eeb2ba..307bf59bd1 100644 --- a/src/BRepMesh/BRepMesh_Delaun.cxx +++ b/src/BRepMesh/BRepMesh_Delaun.cxx @@ -1103,7 +1103,7 @@ Standard_Integer BRepMesh_Delaun::findNextPolygonLink( const gp_Vec2d& theRefLinkDir, const IMeshData::SequenceOfBndB2d& theBoxes, const IMeshData::SequenceOfInteger& thePolygon, - const Handle(IMeshData::MapOfInteger) theSkipped, + const Handle(IMeshData::MapOfInteger)& theSkipped, const Standard_Boolean& isSkipLeprous, IMeshData::MapOfInteger& theLeprousLinks, IMeshData::MapOfInteger& theDeadLinks, diff --git a/src/BRepMesh/BRepMesh_Delaun.hxx b/src/BRepMesh/BRepMesh_Delaun.hxx old mode 100755 new mode 100644 index fb575548b2..810659092c --- a/src/BRepMesh/BRepMesh_Delaun.hxx +++ b/src/BRepMesh/BRepMesh_Delaun.hxx @@ -214,7 +214,7 @@ private: const gp_Vec2d& theRefLinkDir, const IMeshData::SequenceOfBndB2d& theBoxes, const IMeshData::SequenceOfInteger& thePolygon, - const Handle(IMeshData::MapOfInteger) theSkipped, + const Handle(IMeshData::MapOfInteger)& theSkipped, const Standard_Boolean& isSkipLeprous, IMeshData::MapOfInteger& theLeprousLinks, IMeshData::MapOfInteger& theDeadLinks, diff --git a/src/BRepOffset/BRepOffset_Inter2d.cxx b/src/BRepOffset/BRepOffset_Inter2d.cxx index 1249748124..8b35e9301f 100644 --- a/src/BRepOffset/BRepOffset_Inter2d.cxx +++ b/src/BRepOffset/BRepOffset_Inter2d.cxx @@ -966,8 +966,8 @@ static void RefEdgeInter(const TopoDS_Face& F, static Standard_Integer evaluateMaxSegment(const Adaptor3d_CurveOnSurface& aCurveOnSurface) { - Handle(Adaptor3d_Surface) aSurf = aCurveOnSurface.GetSurface(); - Handle(Adaptor2d_Curve2d) aCurv2d = aCurveOnSurface.GetCurve(); + const Handle(Adaptor3d_Surface)& aSurf = aCurveOnSurface.GetSurface(); + const Handle(Adaptor2d_Curve2d)& aCurv2d = aCurveOnSurface.GetCurve(); Standard_Real aNbSKnots = 0, aNbC2dKnots = 0; @@ -1513,7 +1513,7 @@ Standard_Boolean BRepOffset_Inter2d::ExtentEdge(const TopoDS_Edge& E,TopoDS_Edge //purpose : //======================================================================= -static Standard_Boolean UpdateVertex(TopoDS_Vertex V, +static Standard_Boolean UpdateVertex(const TopoDS_Vertex& V, TopoDS_Edge& OE, TopoDS_Edge& NE, Standard_Real TolConf) @@ -1960,7 +1960,7 @@ void BRepOffset_Inter2d::ConnexIntByIntInVert TopExp_Explorer Exp1, Exp2; Standard_Boolean bCoincide; // intersect edges generated from vertex with the edges of the face - TopoDS_Shape NE3 = Build(Vref); + const TopoDS_Shape& NE3 = Build(Vref); // for (Exp2.Init(NE3, TopAbs_EDGE); Exp2.More(); Exp2.Next()) { const TopoDS_Edge& aE3 = *(TopoDS_Edge*)&Exp2.Current(); diff --git a/src/BRepOffset/BRepOffset_MakeOffset.cxx b/src/BRepOffset/BRepOffset_MakeOffset.cxx index c499d748dd..5eccbe11f5 100644 --- a/src/BRepOffset/BRepOffset_MakeOffset.cxx +++ b/src/BRepOffset/BRepOffset_MakeOffset.cxx @@ -544,7 +544,7 @@ static void FillContours(const TopoDS_Shape& aShape, TopoDS_Wire aWire = TopoDS::Wire(itf.Value()); for (Wexp.Init(aWire, aFace); Wexp.More(); Wexp.Next()) { - TopoDS_Edge anEdge = Wexp.Current(); + const TopoDS_Edge& anEdge = Wexp.Current(); if (BRep_Tool::Degenerated(anEdge)) continue; const BRepOffset_ListOfInterval& Lint = Analyser.Type(anEdge); diff --git a/src/BRepOffset/BRepOffset_Offset.cxx b/src/BRepOffset/BRepOffset_Offset.cxx index b1ecb8c476..bd37bcab0b 100644 --- a/src/BRepOffset/BRepOffset_Offset.cxx +++ b/src/BRepOffset/BRepOffset_Offset.cxx @@ -181,10 +181,10 @@ static void UpdateEdge (const TopoDS_Edge& E, //purpose : Particular case of Curve On Surface. //======================================================================= -static void ComputeCurve3d(TopoDS_Edge Edge, +static void ComputeCurve3d(const TopoDS_Edge& Edge, const Handle(Geom2d_Curve)& Curve, const Handle(Geom_Surface)& Surf, - const TopLoc_Location Loc, + const TopLoc_Location& Loc, Standard_Real Tol) { // try to find the particular case diff --git a/src/BRepOffset/BRepOffset_Tool.cxx b/src/BRepOffset/BRepOffset_Tool.cxx index a7a1930e24..55c7cd3597 100644 --- a/src/BRepOffset/BRepOffset_Tool.cxx +++ b/src/BRepOffset/BRepOffset_Tool.cxx @@ -3963,7 +3963,7 @@ TopoDS_Shape BRepOffset_Tool::Deboucle3D(const TopoDS_Shape& S, //======================================================================= static Standard_Boolean IsInOut (BRepTopAdaptor_FClass2d& FC, - Geom2dAdaptor_Curve AC, + const Geom2dAdaptor_Curve& AC, const TopAbs_State& S ) { Standard_Real Def = 100*Precision::Confusion(); diff --git a/src/BRepOffsetAPI/BRepOffsetAPI_DraftAngle.cxx b/src/BRepOffsetAPI/BRepOffsetAPI_DraftAngle.cxx index 051cf89694..c70c95569c 100644 --- a/src/BRepOffsetAPI/BRepOffsetAPI_DraftAngle.cxx +++ b/src/BRepOffsetAPI/BRepOffsetAPI_DraftAngle.cxx @@ -384,7 +384,7 @@ void BRepOffsetAPI_DraftAngle::CorrectWires() wit.Initialize( CurFace ); for (; wit.More(); wit.Next()) { - TopoDS_Shape aWire = wit.Value(); + const TopoDS_Shape& aWire = wit.Value(); if (! aWire.IsSame( CurWire )) { TColgp_SequenceOfPnt pts; @@ -806,8 +806,8 @@ void BRepOffsetAPI_DraftAngle::CorrectWires() TopTools_DataMapIteratorOfDataMapOfShapeShape itve (VEmap); for (; itve.More (); itve.Next ()) { - TopoDS_Shape V = itve.Key (); - TopoDS_Shape E = itve.Value (); + const TopoDS_Shape& V = itve.Key (); + const TopoDS_Shape& E = itve.Value (); TopoDS_Shape W; for (i = 1; i <= Eseq.Length (); i++) { @@ -915,7 +915,7 @@ void BRepOffsetAPI_DraftAngle::CorrectWires() eit.Initialize (aWire, Standard_False); for (; eit.More (); eit.Next ()) { - TopoDS_Shape anEdge = eit.Value (); + const TopoDS_Shape& anEdge = eit.Value (); BB.Add (CurWire, anEdge); } if (aSub.IsCopied (CurFace)) diff --git a/src/BRepOffsetAPI/BRepOffsetAPI_ThruSections.cxx b/src/BRepOffsetAPI/BRepOffsetAPI_ThruSections.cxx index 96c12766ac..f58c934ddd 100644 --- a/src/BRepOffsetAPI/BRepOffsetAPI_ThruSections.cxx +++ b/src/BRepOffsetAPI/BRepOffsetAPI_ThruSections.cxx @@ -417,7 +417,7 @@ void BRepOffsetAPI_ThruSections::Build(const Message_ProgressRange& /*theRange*/ Standard_Integer aSign = 1; TopoDS_Vertex Vfirst, Vlast; TopExp::Vertices(anEdge, Vfirst, Vlast); - TopTools_ListOfShape aNewEdges = Georges.GeneratedShapes(anEdge); + const TopTools_ListOfShape& aNewEdges = Georges.GeneratedShapes(anEdge); TColStd_ListOfInteger IList; aWorkingSection = TopoDS::Wire(WorkingSections(ii)); Standard_Integer NbNewEdges = aNewEdges.Extent(); diff --git a/src/BRepProj/BRepProj_Projection.cxx b/src/BRepProj/BRepProj_Projection.cxx index d0a3a64bb7..d4f1b51601 100644 --- a/src/BRepProj/BRepProj_Projection.cxx +++ b/src/BRepProj/BRepProj_Projection.cxx @@ -184,7 +184,7 @@ BRepProj_Projection::BRepProj_Projection(const TopoDS_Shape& Wire, // Note: it is necessary to create copy of wire to avoid adding new pcurves into it Handle(BRepTools_TrsfModification) Trsf = new BRepTools_TrsfModification(T); BRepTools_Modifier Modif (Wire, Trsf); - TopoDS_Shape WireBase = Modif.ModifiedShape(Wire); + const TopoDS_Shape& WireBase = Modif.ModifiedShape(Wire); // Creation of a cylindrical surface BRepSweep_Prism CylSurf (WireBase, Vsup, Standard_False); diff --git a/src/BRepTest/BRepTest_CurveCommands.cxx b/src/BRepTest/BRepTest_CurveCommands.cxx index 4bd39be3b7..11a49f95c0 100644 --- a/src/BRepTest/BRepTest_CurveCommands.cxx +++ b/src/BRepTest/BRepTest_CurveCommands.cxx @@ -1837,7 +1837,7 @@ static Standard_Integer arclinconvert (Draw_Interpretor& /*dout*/, Standard_Inte std::cout<<"Error: failed to find a face for the wire "<DynamicType(); Handle(Standard_Type) Type2 = Bis2->DynamicType(); diff --git a/src/CDM/CDM_Document.cxx b/src/CDM/CDM_Document.cxx index 9efef91453..c4abc6d988 100644 --- a/src/CDM/CDM_Document.cxx +++ b/src/CDM/CDM_Document.cxx @@ -620,7 +620,7 @@ TCollection_ExtendedString CDM_Document::Folder() const { void CDM_Document::SetRequestedFolder(const TCollection_ExtendedString& aFolder) { - TCollection_ExtendedString f(aFolder); + const TCollection_ExtendedString& f = aFolder; if(f.Length() != 0) { myRequestedFolderIsDefined=Standard_True; myRequestedFolder=aFolder; @@ -975,8 +975,8 @@ void CDM_Document::RemoveFromReference(const Standard_Integer aReferenceIdentifi //purpose : //======================================================================= -TCollection_ExtendedString GetResource (const TCollection_ExtendedString aFormat, - const TCollection_ExtendedString anItem) +TCollection_ExtendedString GetResource (const TCollection_ExtendedString& aFormat, + const TCollection_ExtendedString& anItem) { TCollection_ExtendedString theResource; theResource+= aFormat; diff --git a/src/ChFi2d/ChFi2d_Builder_0.cxx b/src/ChFi2d/ChFi2d_Builder_0.cxx index 5d12686ec6..7ca33424ce 100644 --- a/src/ChFi2d/ChFi2d_Builder_0.cxx +++ b/src/ChFi2d/ChFi2d_Builder_0.cxx @@ -681,7 +681,7 @@ gp_Pnt ComputePoint(const TopoDS_Vertex& V,const TopoDS_Edge& E, p = BRep_Tool::Pnt(v2); } - GeomAdaptor_Curve cc = c.Curve(); + const GeomAdaptor_Curve& cc = c.Curve(); if (p.Distance(c.Value(first)) <= Precision::Confusion()) { GCPnts_AbscissaPoint computePoint(cc, D, first); Param = computePoint.Parameter(); diff --git a/src/ChFi2d/ChFi2d_FilletAlgo.cxx b/src/ChFi2d/ChFi2d_FilletAlgo.cxx index f93ed7c1d1..f5ae1e87a8 100644 --- a/src/ChFi2d/ChFi2d_FilletAlgo.cxx +++ b/src/ChFi2d/ChFi2d_FilletAlgo.cxx @@ -180,7 +180,7 @@ static Standard_Boolean IsRadiusIntersected(const Handle(Geom2d_Curve)& theCurve if (gp_Vec2d(aPoint, theStart).IsOpposite(gp_Vec2d(aPoint, theEnd), Precision::Angular())) return Standard_True; } - Handle(Geom2d_Curve) aCurve = theCurve; + const Handle(Geom2d_Curve)& aCurve = theCurve; for(a = anInter.NbSegments(); a > 0; a--) { //anInter.Segment(a, aCurve); //not implemented (bug in OCC) diff --git a/src/ChFi3d/ChFi3d.cxx b/src/ChFi3d/ChFi3d.cxx index 82d87ebd62..702b83b1de 100644 --- a/src/ChFi3d/ChFi3d.cxx +++ b/src/ChFi3d/ChFi3d.cxx @@ -274,8 +274,8 @@ Standard_Integer ChFi3d::ConcaveSide(const BRepAdaptor_Surface& S1, Standard_Real par = 0.691254*first + 0.308746*last; gp_Pnt pt, pt1, pt2; gp_Vec tgE, tgE1, tgE2, ns1, ns2, dint1, dint2; - TopoDS_Face F1 = S1.Face(); - TopoDS_Face F2 = S2.Face(); + const TopoDS_Face& F1 = S1.Face(); + const TopoDS_Face& F2 = S2.Face(); //F1.Orientation(TopAbs_FORWARD); //F2.Orientation(TopAbs_FORWARD); diff --git a/src/ChFi3d/ChFi3d_Builder.cxx b/src/ChFi3d/ChFi3d_Builder.cxx index 54b793e277..f418482696 100644 --- a/src/ChFi3d/ChFi3d_Builder.cxx +++ b/src/ChFi3d/ChFi3d_Builder.cxx @@ -426,7 +426,6 @@ void ChFi3d_Builder::Compute() if (letype == TopAbs_SHELL){ TopExp_Explorer expsh2(its.Value(),TopAbs_SHELL); const TopoDS_Shape& cursh = expsh2.Current(); - TopoDS_Shape tt = cursh; B1.Add(myShapeResult,cursh); its.Next(); } diff --git a/src/ChFi3d/ChFi3d_Builder_1.cxx b/src/ChFi3d/ChFi3d_Builder_1.cxx index 3355704b5b..7da5da1359 100644 --- a/src/ChFi3d/ChFi3d_Builder_1.cxx +++ b/src/ChFi3d/ChFi3d_Builder_1.cxx @@ -151,8 +151,8 @@ static TopoDS_Edge MakeOffsetEdge(const TopoDS_Edge& theEdge, { TopoDS_Edge OffsetEdge; - TopoDS_Face F1 = S1.Face(); - TopoDS_Face F2 = S2.Face(); + const TopoDS_Face& F1 = S1.Face(); + const TopoDS_Face& F2 = S2.Face(); Handle(Geom_Surface) GS1 = BRep_Tool::Surface(F1); Handle(Geom_Surface) TrGS1 = new Geom_RectangularTrimmedSurface(GS1, diff --git a/src/ChFi3d/ChFi3d_Builder_6.cxx b/src/ChFi3d/ChFi3d_Builder_6.cxx index d943534185..38129ffcf8 100644 --- a/src/ChFi3d/ChFi3d_Builder_6.cxx +++ b/src/ChFi3d/ChFi3d_Builder_6.cxx @@ -242,7 +242,7 @@ static Standard_Boolean IsObst(const ChFiDS_CommonPoint& CP, // //======================================================================= -static void CompParam(Geom2dAdaptor_Curve Carc, +static void CompParam(const Geom2dAdaptor_Curve& Carc, Handle(Geom2d_Curve) Ctg, Standard_Real& parc, Standard_Real& ptg, @@ -330,8 +330,8 @@ static void CompParam(Geom2dAdaptor_Curve Carc, static Standard_Boolean CompBlendPoint(const TopoDS_Vertex& V, const TopoDS_Edge& E, const Standard_Real W, - const TopoDS_Face F1, - const TopoDS_Face F2, + const TopoDS_Face& F1, + const TopoDS_Face& F2, Blend_Point& BP) { gp_Pnt2d P1, P2; diff --git a/src/ChFi3d/ChFi3d_Builder_CnCrn.cxx b/src/ChFi3d/ChFi3d_Builder_CnCrn.cxx index e974aca2fd..5ad82754b8 100644 --- a/src/ChFi3d/ChFi3d_Builder_CnCrn.cxx +++ b/src/ChFi3d/ChFi3d_Builder_CnCrn.cxx @@ -484,8 +484,8 @@ static void CalculDroite(const gp_Pnt2d & p2d1, //purpose : calcule a batten between curves 2d curv2d1 and curv2d2 at points p2d1 and p2d2 //======================================================================= -static void CalculBatten (const Handle (GeomAdaptor_Surface) ASurf, - const TopoDS_Face Face , +static void CalculBatten (const Handle (GeomAdaptor_Surface)& ASurf, + const TopoDS_Face& Face , const Standard_Real xdir, const Standard_Real ydir, const gp_Pnt2d & p2d1, diff --git a/src/ChFi3d/ChFi3d_Builder_SpKP.cxx b/src/ChFi3d/ChFi3d_Builder_SpKP.cxx index f17b400060..f7df34a0a5 100644 --- a/src/ChFi3d/ChFi3d_Builder_SpKP.cxx +++ b/src/ChFi3d/ChFi3d_Builder_SpKP.cxx @@ -539,7 +539,7 @@ static void FillSD (TopOpeBRepDS_DataStructure& DStr, const Standard_Boolean isFirst, const Standard_Integer ons, const Standard_Real pitol, - const TopoDS_Vertex bout) + const TopoDS_Vertex& bout) { Standard_Integer opp = 3 - ons; diff --git a/src/DBRep/DBRep.cxx b/src/DBRep/DBRep.cxx index 9fc4e74a2d..2dba7ae0d7 100644 --- a/src/DBRep/DBRep.cxx +++ b/src/DBRep/DBRep.cxx @@ -1134,17 +1134,17 @@ static Standard_Integer setFlags(Draw_Interpretor& , setProp(Sh, a, n); for (ex.Init (Sh,TopAbs_VERTEX); ex.More(); ex.Next()) { - TopoDS_Shape S = ex.Current(); + const TopoDS_Shape& S = ex.Current(); setProp(S, a, n); } for (ex.Init (Sh,TopAbs_EDGE); ex.More(); ex.Next()) { - TopoDS_Shape S = ex.Current(); + const TopoDS_Shape& S = ex.Current(); setProp(S, a, n); } for (ex.Init (Sh,TopAbs_FACE); ex.More(); ex.Next()) { - TopoDS_Shape S = ex.Current(); + const TopoDS_Shape& S = ex.Current(); setProp(S, a, n); } diff --git a/src/DDF/DDF_DataCommands.cxx b/src/DDF/DDF_DataCommands.cxx index d189c160ed..71a276d570 100644 --- a/src/DDF/DDF_DataCommands.cxx +++ b/src/DDF/DDF_DataCommands.cxx @@ -291,14 +291,14 @@ static Standard_Integer DDF_CheckAttrs (Draw_Interpretor& di,Standard_Integer n // std::cout<<"\tSource Attribute dynamic type = "<DynamicType()<Attributes(); //attMap for (TDF_MapIteratorOfAttributeMap attMItr(attMap);attMItr.More(); attMItr.Next()) { - Handle(TDF_Attribute) sAtt = attMItr.Key(); + const Handle(TDF_Attribute)& sAtt = attMItr.Key(); // std::cout<<"\t\tSource references attribute dynamic type = "<DynamicType()<References(ds2); // std::cout<<"\t\t\tTARGET attribute dynamic type = "<DynamicType()<Attributes(); //attMap for (TDF_MapIteratorOfAttributeMap attMItr2(attMap2);attMItr2.More(); attMItr2.Next()) { - Handle(TDF_Attribute) tAtt = attMItr2.Key(); + const Handle(TDF_Attribute)& tAtt = attMItr2.Key(); // std::cout<<"\t\t\t\tTarget reference attribute dynamic type = "<DynamicType()<IsInstance(sAtt->DynamicType())) if(tAtt == sAtt) { @@ -350,7 +350,7 @@ static Standard_Integer DDF_CheckLabel (Draw_Interpretor& di,Standard_Integer n di<<"\tSource Attribute dynamic type = " << itr.Value()->DynamicType()->Name() << "\n"; const TDF_AttributeMap& attMap = ds1->Attributes(); //attMap for (TDF_MapIteratorOfAttributeMap attMItr(attMap);attMItr.More(); attMItr.Next()) { - Handle(TDF_Attribute) sAtt = attMItr.Key(); + const Handle(TDF_Attribute)& sAtt = attMItr.Key(); TCollection_AsciiString entry; TDF_Tool::Entry(sAtt->Label(), entry); //std::cout<<"\t\tReferences attribute dynamic type = "<DynamicType()<<",\tLabel = "<GetIntegersContainer(); TColStd_DataMapIteratorOfDataMapOfStringInteger itr(aMap); for (; itr.More(); itr.Next()){ - TCollection_ExtendedString aKey(itr.Key()); + const TCollection_ExtendedString& aKey(itr.Key()); Standard_Integer aValue = itr.Value(); di << "Key = " << aKey << " Value = " << aValue << "\n"; } @@ -3500,7 +3500,7 @@ static Standard_Integer DDataStd_GetNDReals (Draw_Interpretor& di, const TDataStd_DataMapOfStringReal& aMap = anAtt->GetRealsContainer(); TDataStd_DataMapIteratorOfDataMapOfStringReal itr(aMap); for (; itr.More(); itr.Next()){ - TCollection_ExtendedString aKey(itr.Key()); + const TCollection_ExtendedString& aKey(itr.Key()); Standard_Real aValue = itr.Value(); di << "Key = " << aKey << " Value = " << aValue << "\n"; } @@ -3757,7 +3757,7 @@ static Standard_Integer DDataStd_GetNDBytes (Draw_Interpretor& di, TDataStd_DataMapIteratorOfDataMapOfStringByte itr(aMap); for (; itr.More(); itr.Next()) { - TCollection_ExtendedString aKey(itr.Key()); + const TCollection_ExtendedString& aKey(itr.Key()); Standard_Byte aValue = itr.Value(); std::cout << "Key = " << aKey << " Value = " <GetArraysOfIntegersContainer(); TDataStd_DataMapIteratorOfDataMapOfStringHArray1OfInteger itr(aMap); for (; itr.More(); itr.Next()){ - TCollection_ExtendedString aKey(itr.Key()); + const TCollection_ExtendedString& aKey(itr.Key()); std::cout << "Key = " << aKey<< std::endl; - Handle(TColStd_HArray1OfInteger) anArrValue = itr.Value(); + const Handle(TColStd_HArray1OfInteger)& anArrValue = itr.Value(); if(!anArrValue.IsNull()) { Standard_Integer lower = anArrValue->Lower(); Standard_Integer upper = anArrValue->Upper(); @@ -4025,9 +4025,9 @@ static Standard_Integer DDataStd_GetNDRealArrays (Draw_Interpretor& di, const TDataStd_DataMapOfStringHArray1OfReal& aMap = anAtt->GetArraysOfRealsContainer(); TDataStd_DataMapIteratorOfDataMapOfStringHArray1OfReal itr(aMap); for (; itr.More(); itr.Next()){ - TCollection_ExtendedString aKey(itr.Key()); + const TCollection_ExtendedString& aKey(itr.Key()); std::cout << "Key = " << aKey << std::endl; - Handle(TColStd_HArray1OfReal) anArrValue = itr.Value(); + const Handle(TColStd_HArray1OfReal)& anArrValue = itr.Value(); if(!anArrValue.IsNull()) { Standard_Integer lower = anArrValue->Lower(); Standard_Integer upper = anArrValue->Upper(); diff --git a/src/DDocStd/DDocStd_ShapeSchemaCommands.cxx b/src/DDocStd/DDocStd_ShapeSchemaCommands.cxx index 543130f153..c83b67542b 100644 --- a/src/DDocStd/DDocStd_ShapeSchemaCommands.cxx +++ b/src/DDocStd/DDocStd_ShapeSchemaCommands.cxx @@ -155,7 +155,7 @@ static Standard_Integer DDocStd_fsdwrite(Draw_Interpretor& theDI, StdObjMgt_TransientPersistentMap aMap; for (Standard_Integer i = 1; i <= aShapes.Length(); ++i) { - TopoDS_Shape aShape = aShapes.Value(i); + const TopoDS_Shape& aShape = aShapes.Value(i); Handle(ShapePersistent_TopoDS::HShape) aPShape = ShapePersistent_TopoDS::Translate(aShape, aMap, ShapePersistent_WithTriangle); diff --git a/src/DE/DE_Wrapper.cxx b/src/DE/DE_Wrapper.cxx index 091fde72d6..45bac0b135 100644 --- a/src/DE/DE_Wrapper.cxx +++ b/src/DE/DE_Wrapper.cxx @@ -457,7 +457,7 @@ void DE_Wrapper::ChangePriority(const TCollection_AsciiString& theFormat, const TCollection_AsciiString& aVendorName = aVendorIter.Key(); if (!theVendorPriority.Contains(aVendorName)) { - Handle(DE_ConfigurationNode) aNode = aVendorIter.Value(); + const Handle(DE_ConfigurationNode)& aNode = aVendorIter.Value(); if (theToDisable) { aNode->SetEnabled(Standard_False); diff --git a/src/DNaming/DNaming.cxx b/src/DNaming/DNaming.cxx index b6a9dce174..94bf946184 100644 --- a/src/DNaming/DNaming.cxx +++ b/src/DNaming/DNaming.cxx @@ -263,13 +263,13 @@ static void LoadC0Edges(const TopoDS_Shape& S, TopExp_Explorer anEx(S,TopAbs_EDGE); // mpv: new explorer iterator because we need keep edges order for(;anEx.More();anEx.Next()) { Standard_Boolean aC0 = Standard_False; - TopoDS_Shape anEdge1 = anEx.Current(); + const TopoDS_Shape& anEdge1 = anEx.Current(); if (edgeNaborFaces.IsBound(anEdge1)) { const TopTools_ListOfShape& aList1 = edgeNaborFaces.Find(anEdge1); if (aList1.Extent()<2) continue; // mpv (06.09.2002): these edges already was loaded TopTools_DataMapIteratorOfDataMapOfShapeListOfShape itr(edgeNaborFaces); for (; itr.More(); itr.Next()) { - TopoDS_Shape anEdge2 = itr.Key(); + const TopoDS_Shape& anEdge2 = itr.Key(); if(anEdgesToDelete.Contains(anEdge2)) continue; if (anEdge1.IsSame(anEdge2)) continue; const TopTools_ListOfShape& aList2 = itr.Value(); @@ -875,7 +875,6 @@ Standard_Boolean DNaming::ComputeSweepDir (const TopoDS_Shape& theShape, gp_Ax1& theAxis) { // Find surface - TopLoc_Location aLocation = theShape.Location(); Handle(Geom_Plane) aPlane; if (theShape.ShapeType() == TopAbs_FACE) { diff --git a/src/DNaming/DNaming_BooleanOperationDriver.cxx b/src/DNaming/DNaming_BooleanOperationDriver.cxx index b5722518f2..c90581d583 100644 --- a/src/DNaming/DNaming_BooleanOperationDriver.cxx +++ b/src/DNaming/DNaming_BooleanOperationDriver.cxx @@ -451,7 +451,7 @@ void FindSPErrorEdges(const TopoDS_Shape& theShape, TopExp_Explorer anExpE(theShape, TopAbs_EDGE); for(; anExpE.More(); anExpE.Next()) { - Handle(BRepCheck_Result) aResult = theAnalyzer.Result(anExpE.Current()); + const Handle(BRepCheck_Result)& aResult = theAnalyzer.Result(anExpE.Current()); if(aResult.IsNull() || theMap.Contains(anExpE.Current())) continue; @@ -474,7 +474,7 @@ void FindSPErrorEdges(const TopoDS_Shape& theShape, } } else if(theShape.ShapeType() == TopAbs_EDGE) { - Handle(BRepCheck_Result) aResult = theAnalyzer.Result(theShape); + const Handle(BRepCheck_Result)& aResult = theAnalyzer.Result(theShape); itl.Initialize(aResult->Status()); for(; itl.More(); itl.Next()) { @@ -503,7 +503,7 @@ Standard_Boolean FindOtherErrors(const TopoDS_Shape& theShape, if(FindOtherErrors(anIt.Value(), theAnalyzer, theMap)) return Standard_True; } - Handle(BRepCheck_Result) aResult = theAnalyzer.Result(theShape); + const Handle(BRepCheck_Result)& aResult = theAnalyzer.Result(theShape); if (!aResult.IsNull()) { @@ -518,7 +518,7 @@ Standard_Boolean FindOtherErrors(const TopoDS_Shape& theShape, TopExp_Explorer anExpE(anExpF.Current(), TopAbs_EDGE); for(; anExpE.More(); anExpE.Next()) { - Handle(BRepCheck_Result) aResultE = theAnalyzer.Result(anExpE.Current()); + const Handle(BRepCheck_Result)& aResultE = theAnalyzer.Result(anExpE.Current()); if(aResultE.IsNull()) continue; diff --git a/src/DNaming/DNaming_ModelingCommands.cxx b/src/DNaming/DNaming_ModelingCommands.cxx index b7f6b081c0..eed3de3f02 100644 --- a/src/DNaming/DNaming_ModelingCommands.cxx +++ b/src/DNaming/DNaming_ModelingCommands.cxx @@ -1672,7 +1672,7 @@ static Standard_Boolean MakeSelection (const Handle(TDataStd_UAttribute)& Obj, if(aNode.IsNull()) aNode = TDataStd_TreeNode::Set(Obj->Label()); aNode->Remove(); - Handle(TDataStd_UAttribute) aContainer = ContextObj; + const Handle(TDataStd_UAttribute)& aContainer = ContextObj; if(aContainer->Label().FindAttribute(TDataStd_TreeNode::GetDefaultTreeID(), RNode)) RNode->Append(aNode); TDataStd_Name::Set(Obj->Label(), "Auxiliary_Object"); diff --git a/src/DNaming/DNaming_SelectionCommands.cxx b/src/DNaming/DNaming_SelectionCommands.cxx index 288d827501..269ab68d72 100644 --- a/src/DNaming/DNaming_SelectionCommands.cxx +++ b/src/DNaming/DNaming_SelectionCommands.cxx @@ -150,7 +150,7 @@ Standard_Boolean FillValidMap(const TDF_Label& theLabel, TDF_LabelMap& theValidM #endif TDF_Tool::OutReferences(aLabel,anExtMap); for (TDF_MapIteratorOfAttributeMap attMItr(anExtMap);attMItr.More(); attMItr.Next()) { - Handle(TDF_Attribute) att = attMItr.Key(); + const Handle(TDF_Attribute)& att = attMItr.Key(); #ifdef OCCT_DEBUG_SELN TDF_Tool::Entry(att->Label(), entr1); std::cout<<"## References attribute dynamic type = "<DynamicType()<<" at Label = "<Value( aCurve->FirstParameter() ); GeomAPI_ProjectPointOnSurf projector( Pnt, S1, Precision::Confusion() ); Standard_Real U, V; diff --git a/src/Draw/Draw_PloadCommands.cxx b/src/Draw/Draw_PloadCommands.cxx index a4dfc746d8..eebf8d5e77 100644 --- a/src/Draw/Draw_PloadCommands.cxx +++ b/src/Draw/Draw_PloadCommands.cxx @@ -115,7 +115,7 @@ static void resolveKeys (Draw_MapOfAsciiString& theMap, for (Standard_Integer j = 1; j <= aMapExtent; ++j) { TCollection_AsciiString aValue; - const TCollection_AsciiString aResource = theMap.FindKey (j); + const TCollection_AsciiString& aResource = theMap.FindKey (j); if (theResMgr->Find (aResource, aValue)) { #ifdef OCCT_DEBUG @@ -204,7 +204,7 @@ static Standard_Integer Pload (Draw_Interpretor& theDI, const Standard_Integer aMapExtent = aMap.Extent(); for (Standard_Integer aResIter = 1; aResIter <= aMapExtent; ++aResIter) { - const TCollection_AsciiString aResource = aMap.FindKey (aResIter); + const TCollection_AsciiString& aResource = aMap.FindKey (aResIter); #ifdef OCCT_DEBUG std::cout << "aResource = " << aResource << std::endl; #endif diff --git a/src/Geom2dGcc/Geom2dGcc_Circ2d2TanOn.cxx b/src/Geom2dGcc/Geom2dGcc_Circ2d2TanOn.cxx index de5dc5f3a7..47f25feea0 100644 --- a/src/Geom2dGcc/Geom2dGcc_Circ2d2TanOn.cxx +++ b/src/Geom2dGcc/Geom2dGcc_Circ2d2TanOn.cxx @@ -60,9 +60,9 @@ Geom2dGcc_Circ2d2TanOn:: GeomAbs_CurveType Type1 = C1.GetType(); GeomAbs_CurveType Type2 = C2.GetType(); GeomAbs_CurveType Type3 = OnCurve.GetType(); - Handle(Geom2d_Curve) CC1 = C1.Curve(); - Handle(Geom2d_Curve) CC2 = C2.Curve(); - Handle(Geom2d_Curve) Con = OnCurve.Curve(); + const Handle(Geom2d_Curve)& CC1 = C1.Curve(); + const Handle(Geom2d_Curve)& CC2 = C2.Curve(); + const Handle(Geom2d_Curve)& Con = OnCurve.Curve(); //============================================================================= // Appel a GccAna. + @@ -392,8 +392,8 @@ Geom2dGcc_Circ2d2TanOn:: Geom2dAdaptor_Curve C1 = Qualified1.Qualified(); GeomAbs_CurveType Type1 = C1.GetType(); GeomAbs_CurveType Type3 = OnCurve.GetType(); - Handle(Geom2d_Curve) CC1 = C1.Curve(); - Handle(Geom2d_Curve) Con = OnCurve.Curve(); + const Handle(Geom2d_Curve)& CC1 = C1.Curve(); + const Handle(Geom2d_Curve)& Con = OnCurve.Curve(); //============================================================================= // Appel a GccAna. + @@ -581,7 +581,7 @@ Geom2dGcc_Circ2d2TanOn:: parcen3(1,8) { GeomAbs_CurveType Type3 = OnCurve.GetType(); - Handle(Geom2d_Curve) Con = OnCurve.Curve(); + const Handle(Geom2d_Curve)& Con = OnCurve.Curve(); //============================================================================= // Appel a GccAna. + diff --git a/src/Geom2dGcc/Geom2dGcc_Circ2d2TanRad.cxx b/src/Geom2dGcc/Geom2dGcc_Circ2d2TanRad.cxx index 55336cd687..961914a5a1 100644 --- a/src/Geom2dGcc/Geom2dGcc_Circ2d2TanRad.cxx +++ b/src/Geom2dGcc/Geom2dGcc_Circ2d2TanRad.cxx @@ -70,8 +70,8 @@ Geom2dGcc_Circ2d2TanRad:: else { Geom2dAdaptor_Curve C1 = Qualified1.Qualified(); Geom2dAdaptor_Curve C2 = Qualified2.Qualified(); - Handle(Geom2d_Curve) CC1 = C1.Curve(); - Handle(Geom2d_Curve) CC2 = C2.Curve(); + const Handle(Geom2d_Curve)& CC1 = C1.Curve(); + const Handle(Geom2d_Curve)& CC2 = C2.Curve(); GeomAbs_CurveType Type1 = C1.GetType(); GeomAbs_CurveType Type2 = C2.GetType(); @@ -276,7 +276,7 @@ Geom2dGcc_Circ2d2TanRad:: if (Radius < 0.) { throw Standard_NegativeValue(); } else { Geom2dAdaptor_Curve C1 = Qualified1.Qualified(); - Handle(Geom2d_Curve) CC1 = C1.Curve(); + const Handle(Geom2d_Curve)& CC1 = C1.Curve(); GeomAbs_CurveType Type1 = C1.GetType(); //============================================================================= diff --git a/src/Geom2dGcc/Geom2dGcc_Circ2d3Tan.cxx b/src/Geom2dGcc/Geom2dGcc_Circ2d3Tan.cxx index 666a977b0c..fc407c1a91 100644 --- a/src/Geom2dGcc/Geom2dGcc_Circ2d3Tan.cxx +++ b/src/Geom2dGcc/Geom2dGcc_Circ2d3Tan.cxx @@ -58,9 +58,9 @@ Geom2dGcc_Circ2d3Tan:: Geom2dAdaptor_Curve C1 = Qualified1.Qualified(); Geom2dAdaptor_Curve C2 = Qualified2.Qualified(); Geom2dAdaptor_Curve C3 = Qualified3.Qualified(); - Handle(Geom2d_Curve) CC1 = C1.Curve(); - Handle(Geom2d_Curve) CC2 = C2.Curve(); - Handle(Geom2d_Curve) CC3 = C3.Curve(); + const Handle(Geom2d_Curve)& CC1 = C1.Curve(); + const Handle(Geom2d_Curve)& CC2 = C2.Curve(); + const Handle(Geom2d_Curve)& CC3 = C3.Curve(); GeomAbs_CurveType Type1 = C1.GetType(); GeomAbs_CurveType Type2 = C2.GetType(); GeomAbs_CurveType Type3 = C3.GetType(); @@ -266,8 +266,8 @@ Geom2dGcc_Circ2d3Tan:: { Geom2dAdaptor_Curve C1 = Qualified1.Qualified(); Geom2dAdaptor_Curve C2 = Qualified2.Qualified(); - Handle(Geom2d_Curve) CC1 = C1.Curve(); - Handle(Geom2d_Curve) CC2 = C2.Curve(); + const Handle(Geom2d_Curve)& CC1 = C1.Curve(); + const Handle(Geom2d_Curve)& CC2 = C2.Curve(); GeomAbs_CurveType Type1 = C1.GetType(); GeomAbs_CurveType Type2 = C2.GetType(); @@ -383,7 +383,7 @@ Geom2dGcc_Circ2d3Tan:: pararg3(1,16) { Geom2dAdaptor_Curve C1 = Qualified1.Qualified(); - Handle(Geom2d_Curve) CC1 = C1.Curve(); + const Handle(Geom2d_Curve)& CC1 = C1.Curve(); GeomAbs_CurveType Type1 = C1.GetType(); //============================================================================= diff --git a/src/Geom2dGcc/Geom2dGcc_Circ2dTanCen.cxx b/src/Geom2dGcc/Geom2dGcc_Circ2dTanCen.cxx index 5995429e38..613cd6e8bd 100644 --- a/src/Geom2dGcc/Geom2dGcc_Circ2dTanCen.cxx +++ b/src/Geom2dGcc/Geom2dGcc_Circ2dTanCen.cxx @@ -42,7 +42,7 @@ Geom2dGcc_Circ2dTanCen:: pararg1(1,2) { Geom2dAdaptor_Curve C1 = Qualified1.Qualified(); - Handle(Geom2d_Curve) CC1 = C1.Curve(); + const Handle(Geom2d_Curve)& CC1 = C1.Curve(); GeomAbs_CurveType Type1 = C1.GetType(); //============================================================================= diff --git a/src/Geom2dGcc/Geom2dGcc_Circ2dTanOnRad.cxx b/src/Geom2dGcc/Geom2dGcc_Circ2dTanOnRad.cxx index a95e2bf171..9b5921f16b 100644 --- a/src/Geom2dGcc/Geom2dGcc_Circ2dTanOnRad.cxx +++ b/src/Geom2dGcc/Geom2dGcc_Circ2dTanOnRad.cxx @@ -53,8 +53,8 @@ Geom2dGcc_Circ2dTanOnRad:: Geom2dAdaptor_Curve C1 = Qualified1.Qualified(); GeomAbs_CurveType Type1 = C1.GetType(); GeomAbs_CurveType Type2 = OnCurve.GetType(); - Handle(Geom2d_Curve) CC1 = C1.Curve(); - Handle(Geom2d_Curve) Con = OnCurve.Curve(); + const Handle(Geom2d_Curve)& CC1 = C1.Curve(); + const Handle(Geom2d_Curve)& Con = OnCurve.Curve(); //============================================================================= // Appel a GccAna. + @@ -163,7 +163,7 @@ Geom2dGcc_Circ2dTanOnRad:: else { gp_Pnt2d point1(Point1->Pnt2d()); GeomAbs_CurveType Type2 = OnCurve.GetType(); - Handle(Geom2d_Curve) Con = OnCurve.Curve(); + const Handle(Geom2d_Curve)& Con = OnCurve.Curve(); //============================================================================= // Appel a GccAna. + diff --git a/src/Geom2dGcc/Geom2dGcc_Lin2d2Tan.cxx b/src/Geom2dGcc/Geom2dGcc_Lin2d2Tan.cxx index 14ad20d020..be6e855b75 100644 --- a/src/Geom2dGcc/Geom2dGcc_Lin2d2Tan.cxx +++ b/src/Geom2dGcc/Geom2dGcc_Lin2d2Tan.cxx @@ -46,8 +46,8 @@ Geom2dGcc_Lin2d2Tan:: { Geom2dAdaptor_Curve C1 = Qualified1.Qualified(); Geom2dAdaptor_Curve C2 = Qualified2.Qualified(); - Handle(Geom2d_Curve) CC1 = C1.Curve(); - Handle(Geom2d_Curve) CC2 = C2.Curve(); + const Handle(Geom2d_Curve)& CC1 = C1.Curve(); + const Handle(Geom2d_Curve)& CC2 = C2.Curve(); GeomAbs_CurveType Type1 = C1.GetType(); GeomAbs_CurveType Type2 = C2.GetType(); @@ -127,7 +127,7 @@ Geom2dGcc_Lin2d2Tan:: pararg2(1,2) { Geom2dAdaptor_Curve C1 = Qualified1.Qualified(); - Handle(Geom2d_Curve) CC1 = C1.Curve(); + const Handle(Geom2d_Curve)& CC1 = C1.Curve(); GeomAbs_CurveType Type1 = C1.GetType(); //============================================================================= @@ -196,8 +196,8 @@ Geom2dGcc_Lin2d2Tan:: { Geom2dAdaptor_Curve C1 = Qualified1.Qualified(); Geom2dAdaptor_Curve C2 = Qualified2.Qualified(); - Handle(Geom2d_Curve) CC1 = C1.Curve(); - Handle(Geom2d_Curve) CC2 = C2.Curve(); + const Handle(Geom2d_Curve)& CC1 = C1.Curve(); + const Handle(Geom2d_Curve)& CC2 = C2.Curve(); GeomAbs_CurveType Type1 = C1.GetType(); GeomAbs_CurveType Type2 = C2.GetType(); @@ -260,7 +260,7 @@ Geom2dGcc_Lin2d2Tan:: pararg2(1,2) { Geom2dAdaptor_Curve C1 = Qualified1.Qualified(); - Handle(Geom2d_Curve) CC1 = C1.Curve(); + const Handle(Geom2d_Curve)& CC1 = C1.Curve(); GeomAbs_CurveType Type1 = C1.GetType(); //============================================================================= diff --git a/src/Geom2dGcc/Geom2dGcc_Lin2dTanObl.cxx b/src/Geom2dGcc/Geom2dGcc_Lin2dTanObl.cxx index 560614e6c7..95a0937a6f 100644 --- a/src/Geom2dGcc/Geom2dGcc_Lin2dTanObl.cxx +++ b/src/Geom2dGcc/Geom2dGcc_Lin2dTanObl.cxx @@ -45,7 +45,7 @@ Geom2dGcc_Lin2dTanObl:: pararg2(1,2) { Geom2dAdaptor_Curve C1 = Qualified1.Qualified(); - Handle(Geom2d_Curve) CC1 = C1.Curve(); + const Handle(Geom2d_Curve)& CC1 = C1.Curve(); GeomAbs_CurveType Type1 = C1.GetType(); //============================================================================= @@ -111,7 +111,7 @@ Geom2dGcc_Lin2dTanObl:: pararg2(1,2) { Geom2dAdaptor_Curve C1 = Qualified1.Qualified(); - Handle(Geom2d_Curve) CC1 = C1.Curve(); + const Handle(Geom2d_Curve)& CC1 = C1.Curve(); GeomAbs_CurveType Type1 = C1.GetType(); //============================================================================= diff --git a/src/GeomConvert/GeomConvert_SurfToAnaSurf.cxx b/src/GeomConvert/GeomConvert_SurfToAnaSurf.cxx index 4a6a8c125a..28d052d8a0 100644 --- a/src/GeomConvert/GeomConvert_SurfToAnaSurf.cxx +++ b/src/GeomConvert/GeomConvert_SurfToAnaSurf.cxx @@ -558,7 +558,7 @@ Handle(Geom_Surface) GeomConvert_SurfToAnaSurf::TryTorusSphere(const Handle(Geom Standard_Real GeomConvert_SurfToAnaSurf::ComputeGap(const Handle(Geom_Surface)& theSurf, const Standard_Real theU1, const Standard_Real theU2, const Standard_Real theV1, const Standard_Real theV2, - const Handle(Geom_Surface) theNewSurf, const Standard_Real theTol) + const Handle(Geom_Surface)& theNewSurf, const Standard_Real theTol) { GeomAdaptor_Surface aGAS(theNewSurf); GeomAbs_SurfaceType aSType = aGAS.GetType(); diff --git a/src/GeomConvert/GeomConvert_SurfToAnaSurf.hxx b/src/GeomConvert/GeomConvert_SurfToAnaSurf.hxx index ee333f54aa..1ebfa63fd7 100644 --- a/src/GeomConvert/GeomConvert_SurfToAnaSurf.hxx +++ b/src/GeomConvert/GeomConvert_SurfToAnaSurf.hxx @@ -115,7 +115,7 @@ private: static Standard_Real ComputeGap(const Handle(Geom_Surface)& theSurf, const Standard_Real theU1, const Standard_Real theU2, const Standard_Real theV1, const Standard_Real theV2, - const Handle(Geom_Surface) theNewSurf, const Standard_Real theTol = RealLast()); + const Handle(Geom_Surface)& theNewSurf, const Standard_Real theTol = RealLast()); diff --git a/src/GeomFill/GeomFill_Pipe.cxx b/src/GeomFill/GeomFill_Pipe.cxx index 2f9c759747..8362ab2622 100644 --- a/src/GeomFill/GeomFill_Pipe.cxx +++ b/src/GeomFill/GeomFill_Pipe.cxx @@ -87,7 +87,7 @@ static Standard_Boolean CheckSense(const TColGeom_SequenceOfCurve& Seq1, Standard_Boolean no_sing = Standard_True; Seq2.Clear(); - Handle(Geom_Curve) C1 = Seq1.Value(1); + const Handle(Geom_Curve)& C1 = Seq1.Value(1); Standard_Real f = C1->FirstParameter(), l = C1->LastParameter(); Standard_Integer iP, NP = 21; TColgp_Array1OfPnt Tab(1,NP); @@ -125,7 +125,7 @@ static Standard_Boolean CheckSense(const TColGeom_SequenceOfCurve& Seq1, for (Standard_Integer iseq=2; iseq<=Seq1.Length(); iseq++) { // discretisation de C2 - Handle(Geom_Curve) C2 = Seq1.Value(iseq); + const Handle(Geom_Curve)& C2 = Seq1.Value(iseq); f = C2->FirstParameter(); l = C2->LastParameter(); u = f; diff --git a/src/GeomLib/GeomLib.cxx b/src/GeomLib/GeomLib.cxx index fcb2305344..d6d120129c 100644 --- a/src/GeomLib/GeomLib.cxx +++ b/src/GeomLib/GeomLib.cxx @@ -2816,7 +2816,7 @@ static Standard_Boolean CompareWeightPoles(const TColgp_Array1OfPnt& thePoles1, //function : isIsoLine //purpose : //============================================================================= -Standard_Boolean GeomLib::isIsoLine (const Handle(Adaptor2d_Curve2d) theC2D, +Standard_Boolean GeomLib::isIsoLine (const Handle(Adaptor2d_Curve2d)& theC2D, Standard_Boolean& theIsU, Standard_Real& theParam, Standard_Boolean& theIsForward) @@ -2896,8 +2896,8 @@ Standard_Boolean GeomLib::isIsoLine (const Handle(Adaptor2d_Curve2d) theC2D, //function : buildC3dOnIsoLine //purpose : //============================================================================= -Handle(Geom_Curve) GeomLib::buildC3dOnIsoLine (const Handle(Adaptor2d_Curve2d) theC2D, - const Handle(Adaptor3d_Surface) theSurf, +Handle(Geom_Curve) GeomLib::buildC3dOnIsoLine (const Handle(Adaptor2d_Curve2d)& theC2D, + const Handle(Adaptor3d_Surface)& theSurf, const Standard_Real theFirst, const Standard_Real theLast, const Standard_Real theTolerance, diff --git a/src/GeomLib/GeomLib.hxx b/src/GeomLib/GeomLib.hxx index 71e817bb90..a3a13fb96a 100644 --- a/src/GeomLib/GeomLib.hxx +++ b/src/GeomLib/GeomLib.hxx @@ -239,7 +239,7 @@ public: //! @param theParam Line parameter. //! @param theIsForward Flag indicating forward parameterization on a isoline. //! @return Standard_True when 2d curve is a line and Standard_False otherwise. - Standard_EXPORT static Standard_Boolean isIsoLine (const Handle(Adaptor2d_Curve2d) theC2D, + Standard_EXPORT static Standard_Boolean isIsoLine (const Handle(Adaptor2d_Curve2d)& theC2D, Standard_Boolean& theIsU, Standard_Real& theParam, Standard_Boolean& theIsForward); @@ -251,8 +251,8 @@ public: //! @param theParam Line parameter. //! @param theIsForward Flag indicating forward parameterization on a isoline. //! @return Standard_True when 3d curve is built and Standard_False otherwise. - Standard_EXPORT static Handle(Geom_Curve) buildC3dOnIsoLine (const Handle(Adaptor2d_Curve2d) theC2D, - const Handle(Adaptor3d_Surface) theSurf, + Standard_EXPORT static Handle(Geom_Curve) buildC3dOnIsoLine (const Handle(Adaptor2d_Curve2d)& theC2D, + const Handle(Adaptor3d_Surface)& theSurf, const Standard_Real theFirst, const Standard_Real theLast, const Standard_Real theTolerance, diff --git a/src/GeomToStep/GeomToStep_MakeRectangularTrimmedSurface.cxx b/src/GeomToStep/GeomToStep_MakeRectangularTrimmedSurface.cxx index 9d7bca0230..fa50eb6314 100644 --- a/src/GeomToStep/GeomToStep_MakeRectangularTrimmedSurface.cxx +++ b/src/GeomToStep/GeomToStep_MakeRectangularTrimmedSurface.cxx @@ -49,7 +49,7 @@ GeomToStep_MakeRectangularTrimmedSurface:: done = Standard_False; return; } - Handle(StepGeom_Surface) StepSurf = mkSurf.Value(); + const Handle(StepGeom_Surface)& StepSurf = mkSurf.Value(); Standard_Real U1,U2,V1,V2; RTSurf->Bounds(U1, U2, V1, V2); diff --git a/src/GeometryTest/GeometryTest_APICommands.cxx b/src/GeometryTest/GeometryTest_APICommands.cxx index 8e742ae691..0624ec4f59 100644 --- a/src/GeometryTest/GeometryTest_APICommands.cxx +++ b/src/GeometryTest/GeometryTest_APICommands.cxx @@ -363,7 +363,7 @@ static Standard_Integer surfapp(Draw_Interpretor& di, Standard_Integer n, const if (anApprox.IsDone()) { - Handle(Geom_BSplineSurface) S = anApprox.Surface(); + const Handle(Geom_BSplineSurface)& S = anApprox.Surface(); DrawTrSurf::Set(a[1], S); di << a[1]; } @@ -445,7 +445,7 @@ static Standard_Integer surfint(Draw_Interpretor& di, Standard_Integer n, const } if (anApprox.IsDone()) { - Handle(Geom_BSplineSurface) S = anApprox.Surface(); + const Handle(Geom_BSplineSurface)& S = anApprox.Surface(); DrawTrSurf::Set(a[1], S); di << a[1]; } diff --git a/src/GeometryTest/GeometryTest_ConstraintCommands.cxx b/src/GeometryTest/GeometryTest_ConstraintCommands.cxx index 4946ed3d8a..c73ca5adfb 100644 --- a/src/GeometryTest/GeometryTest_ConstraintCommands.cxx +++ b/src/GeometryTest/GeometryTest_ConstraintCommands.cxx @@ -543,7 +543,7 @@ static Standard_Integer interpol (Draw_Interpretor& di,Standard_Integer n, const 1.0e-5) ; anInterpolator.Perform() ; if (anInterpolator.IsDone()) { - Handle(Geom_BSplineCurve) C = + const Handle(Geom_BSplineCurve)& C = anInterpolator.Curve(); DrawTrSurf::Set(a[1], C); } @@ -560,7 +560,7 @@ static Standard_Integer interpol (Draw_Interpretor& di,Standard_Integer n, const 1.0e-5); a2dInterpolator.Perform() ; if (a2dInterpolator.IsDone()) { - Handle(Geom2d_BSplineCurve) C = a2dInterpolator.Curve() ; + const Handle(Geom2d_BSplineCurve)& C = a2dInterpolator.Curve() ; DrawTrSurf::Set(a[1], C); } } diff --git a/src/Graphic3d/Graphic3d_CView.cxx b/src/Graphic3d/Graphic3d_CView.cxx index 985692f00c..59e0ee75a9 100644 --- a/src/Graphic3d/Graphic3d_CView.cxx +++ b/src/Graphic3d/Graphic3d_CView.cxx @@ -349,7 +349,7 @@ void Graphic3d_CView::SetComputedMode (const Standard_Boolean theMode) for (Graphic3d_MapOfStructure::Iterator aDispStructIter (myStructsDisplayed); aDispStructIter.More(); aDispStructIter.Next()) { - Handle(Graphic3d_Structure) aStruct = aDispStructIter.Key(); + const Handle(Graphic3d_Structure)& aStruct = aDispStructIter.Key(); const Graphic3d_TypeOfAnswer anAnswer = acceptDisplay (aStruct->Visual()); if (anAnswer != Graphic3d_TOA_COMPUTE) { diff --git a/src/Graphic3d/Graphic3d_CubeMapOrder.cxx b/src/Graphic3d/Graphic3d_CubeMapOrder.cxx index 52c1c309f5..99fb33025c 100644 --- a/src/Graphic3d/Graphic3d_CubeMapOrder.cxx +++ b/src/Graphic3d/Graphic3d_CubeMapOrder.cxx @@ -54,7 +54,7 @@ Graphic3d_CubeMapOrder::Graphic3d_CubeMapOrder (unsigned char thePosXLocation, // function : Graphic3d_CubeMapOrder // purpose : // ======================================================================= -Graphic3d_CubeMapOrder::Graphic3d_CubeMapOrder (const Graphic3d_ValidatedCubeMapOrder theOrder) +Graphic3d_CubeMapOrder::Graphic3d_CubeMapOrder (const Graphic3d_ValidatedCubeMapOrder& theOrder) : myConvolution (theOrder.Order.myConvolution), myHasOverflows (theOrder.Order.myHasOverflows) @@ -135,7 +135,7 @@ Graphic3d_CubeMapOrder& Graphic3d_CubeMapOrder::SetDefault() // function : Permute // purpose : // ======================================================================= -Graphic3d_CubeMapOrder& Graphic3d_CubeMapOrder::Permute (Graphic3d_ValidatedCubeMapOrder thePermutation) +Graphic3d_CubeMapOrder& Graphic3d_CubeMapOrder::Permute (const Graphic3d_ValidatedCubeMapOrder& thePermutation) { for (unsigned char i = 0; i < 6; ++i) { @@ -149,7 +149,7 @@ Graphic3d_CubeMapOrder& Graphic3d_CubeMapOrder::Permute (Graphic3d_ValidatedCube // function : Permuted // purpose : // ======================================================================= -Graphic3d_CubeMapOrder Graphic3d_CubeMapOrder::Permuted (Graphic3d_ValidatedCubeMapOrder thePermutation) const +Graphic3d_CubeMapOrder Graphic3d_CubeMapOrder::Permuted (const Graphic3d_ValidatedCubeMapOrder& thePermutation) const { Graphic3d_CubeMapOrder anOrder = *this; anOrder.Permute (thePermutation); diff --git a/src/Graphic3d/Graphic3d_CubeMapOrder.hxx b/src/Graphic3d/Graphic3d_CubeMapOrder.hxx index cbdeafc10d..a5cdeb82e6 100644 --- a/src/Graphic3d/Graphic3d_CubeMapOrder.hxx +++ b/src/Graphic3d/Graphic3d_CubeMapOrder.hxx @@ -42,7 +42,7 @@ public: unsigned char theNegZLocation); //! Creates Graphic3d_CubeMapOrder using Graphic3d_ValidatedCubeMapOrder. - Standard_EXPORT Graphic3d_CubeMapOrder (const Graphic3d_ValidatedCubeMapOrder theOrder); + Standard_EXPORT Graphic3d_CubeMapOrder (const Graphic3d_ValidatedCubeMapOrder& theOrder); //! Alias of 'operator='. Standard_EXPORT Graphic3d_CubeMapOrder& Set (const Graphic3d_CubeMapOrder& theOrder); @@ -61,10 +61,10 @@ public: Standard_EXPORT Graphic3d_CubeMapOrder& SetDefault(); //! Applies another cubemap order as permutation for the current one. - Standard_EXPORT Graphic3d_CubeMapOrder& Permute (Graphic3d_ValidatedCubeMapOrder anOrder); + Standard_EXPORT Graphic3d_CubeMapOrder& Permute (const Graphic3d_ValidatedCubeMapOrder& anOrder); //! Returns permuted by other cubemap order copy of current one. - Standard_EXPORT Graphic3d_CubeMapOrder Permuted (Graphic3d_ValidatedCubeMapOrder anOrder) const; + Standard_EXPORT Graphic3d_CubeMapOrder Permuted (const Graphic3d_ValidatedCubeMapOrder& anOrder) const; //! Swaps values of two cubemap sides. Standard_EXPORT Graphic3d_CubeMapOrder& Swap (Graphic3d_CubeMapSide theFirstSide, diff --git a/src/Graphic3d/Graphic3d_CubeMapPacked.cxx b/src/Graphic3d/Graphic3d_CubeMapPacked.cxx index 2f9e180158..df8e6f71af 100644 --- a/src/Graphic3d/Graphic3d_CubeMapPacked.cxx +++ b/src/Graphic3d/Graphic3d_CubeMapPacked.cxx @@ -24,7 +24,7 @@ IMPLEMENT_STANDARD_RTTIEXT(Graphic3d_CubeMapPacked, Graphic3d_CubeMap) // purpose : // ======================================================================= Graphic3d_CubeMapPacked::Graphic3d_CubeMapPacked (const TCollection_AsciiString& theFilePath, - const Graphic3d_ValidatedCubeMapOrder theOrder) + const Graphic3d_ValidatedCubeMapOrder& theOrder) : Graphic3d_CubeMap (theFilePath), myOrder (theOrder), @@ -36,7 +36,7 @@ Graphic3d_CubeMapPacked::Graphic3d_CubeMapPacked (const TCollection_AsciiString& // purpose : // ======================================================================= Graphic3d_CubeMapPacked::Graphic3d_CubeMapPacked (const Handle(Image_PixMap)& theImage, - const Graphic3d_ValidatedCubeMapOrder theOrder) + const Graphic3d_ValidatedCubeMapOrder& theOrder) : Graphic3d_CubeMap (Handle(Image_PixMap)()), myOrder (theOrder), diff --git a/src/Graphic3d/Graphic3d_CubeMapPacked.hxx b/src/Graphic3d/Graphic3d_CubeMapPacked.hxx index 41a4f94d7e..ef7bbd50e5 100644 --- a/src/Graphic3d/Graphic3d_CubeMapPacked.hxx +++ b/src/Graphic3d/Graphic3d_CubeMapPacked.hxx @@ -29,13 +29,13 @@ public: //! @theFileName - path to the cubemap image //! @theOrder - array containing six different indexes of cubemap sides which maps tile grid to cubemap sides Standard_EXPORT Graphic3d_CubeMapPacked (const TCollection_AsciiString& theFileName, - const Graphic3d_ValidatedCubeMapOrder theOrder = Graphic3d_CubeMapOrder::Default()); + const Graphic3d_ValidatedCubeMapOrder& theOrder = Graphic3d_CubeMapOrder::Default()); //! Initialization to set cubemap directly by PixMap. //! @thePixMap - origin PixMap //! @theOrder - array containing six different indexes of cubemap sides which maps tile grid to cubemap sides Standard_EXPORT Graphic3d_CubeMapPacked (const Handle(Image_PixMap)& theImage, - const Graphic3d_ValidatedCubeMapOrder theOrder = Graphic3d_CubeMapOrder::Default()); + const Graphic3d_ValidatedCubeMapOrder& theOrder = Graphic3d_CubeMapOrder::Default()); //! Returns current cubemap side as compressed PixMap. Standard_EXPORT virtual Handle(Image_CompressedPixMap) CompressedValue (const Handle(Image_SupportedFormats)& theSupported) Standard_OVERRIDE; diff --git a/src/Graphic3d/Graphic3d_StructureManager.cxx b/src/Graphic3d/Graphic3d_StructureManager.cxx index a4e45a9b01..5abb44781f 100644 --- a/src/Graphic3d/Graphic3d_StructureManager.cxx +++ b/src/Graphic3d/Graphic3d_StructureManager.cxx @@ -137,7 +137,7 @@ Handle(Graphic3d_Structure) Graphic3d_StructureManager::Identification (const St Handle(Graphic3d_Structure) SGfound; for (; it.More() && notfound; it.Next()) { - Handle(Graphic3d_Structure) SG = it.Key(); + const Handle(Graphic3d_Structure)& SG = it.Key(); if ( SG->Identification () == AId) { notfound = Standard_False; SGfound = SG; @@ -165,7 +165,6 @@ void Graphic3d_StructureManager::RecomputeStructures() NCollection_Map aStructNetwork; for (Graphic3d_MapIteratorOfMapOfStructure anIter(myDisplayedStructure); anIter.More(); anIter.Next()) { - Handle(Graphic3d_Structure) aStructure = anIter.Key(); anIter.Key()->Network (anIter.Key().get(), Graphic3d_TOC_DESCENDANT, aStructNetwork); } diff --git a/src/Graphic3d/Graphic3d_Vertex.cxx b/src/Graphic3d/Graphic3d_Vertex.cxx index d3f9ed7480..38480ab1fc 100644 --- a/src/Graphic3d/Graphic3d_Vertex.cxx +++ b/src/Graphic3d/Graphic3d_Vertex.cxx @@ -18,9 +18,11 @@ #include #include +#include + Standard_ShortReal Graphic3d_Vertex::Distance(const Graphic3d_Vertex& AOther) const { - return sqrt( (X() - AOther.X()) * (X() - AOther.X()) + return std::sqrt( (X() - AOther.X()) * (X() - AOther.X()) + (Y() - AOther.Y()) * (Y() - AOther.Y()) + (Z() - AOther.Z()) * (Z() - AOther.Z()) ); } diff --git a/src/IFGraph/IFGraph_Articulations.cxx b/src/IFGraph/IFGraph_Articulations.cxx index f185c25b0f..06664da2e3 100644 --- a/src/IFGraph/IFGraph_Articulations.cxx +++ b/src/IFGraph/IFGraph_Articulations.cxx @@ -64,7 +64,7 @@ IFGraph_Articulations::IFGraph_Articulations for (Interface_EntityIterator iter = thegraph.Shareds(thegraph.Entity(num)); iter.More(); iter.Next()) { - Handle(Standard_Transient) ent = iter.Value(); + const Handle(Standard_Transient)& ent = iter.Value(); Standard_Integer nument = thegraph.EntityNumber(ent); if (!thegraph.IsPresent(num)) { thegraph.GetFromEntity(ent,Standard_False); diff --git a/src/IFGraph/IFGraph_ConnectedComponants.cxx b/src/IFGraph/IFGraph_ConnectedComponants.cxx index 519e3b2ff4..6b75fdf301 100644 --- a/src/IFGraph/IFGraph_ConnectedComponants.cxx +++ b/src/IFGraph/IFGraph_ConnectedComponants.cxx @@ -35,7 +35,7 @@ IFGraph_ConnectedComponants::IFGraph_ConnectedComponants Interface_EntityIterator loaded = Loaded(); Reset(); for (loaded.Start(); loaded.More(); loaded.Next()) { - Handle(Standard_Transient) ent = loaded.Value(); + const Handle(Standard_Transient)& ent = loaded.Value(); if (IsInPart(ent)) continue; IFGraph_AllConnected connect(Model(),ent); AddPart(); diff --git a/src/IFSelect/IFSelect_BasicDumper.cxx b/src/IFSelect/IFSelect_BasicDumper.cxx index 26a04db161..3a5af1f5d6 100644 --- a/src/IFSelect/IFSelect_BasicDumper.cxx +++ b/src/IFSelect/IFSelect_BasicDumper.cxx @@ -142,7 +142,7 @@ IFSelect_BasicDumper::IFSelect_BasicDumper () { } return Standard_True; } if (type.IsEqual("IFSelect_SelectTextType")) { - const TCollection_AsciiString exname = file.ParamValue(1); + const TCollection_AsciiString& exname = file.ParamValue(1); if (exname.Length() < FIRSTCHAR) return Standard_False; if (exname.Value(FIRSTCHAR) == 'e') {} else if (exname.Value(FIRSTCHAR) == 'c') {} @@ -168,7 +168,7 @@ IFSelect_BasicDumper::IFSelect_BasicDumper () { } if (type.IsEqual("IFSelect_TransformStandard")) { Standard_Boolean copyoption; - const TCollection_AsciiString copyname = file.ParamValue(1); + const TCollection_AsciiString& copyname = file.ParamValue(1); if (copyname.Length() < FIRSTCHAR) return Standard_False; if (copyname.Value(FIRSTCHAR) == 'c') copyoption = Standard_True; else if (copyname.Value(FIRSTCHAR) == 'o') copyoption = Standard_False; diff --git a/src/IFSelect/IFSelect_CheckCounter.cxx b/src/IFSelect/IFSelect_CheckCounter.cxx index 6c3802c4e5..bcec09dfaf 100644 --- a/src/IFSelect/IFSelect_CheckCounter.cxx +++ b/src/IFSelect/IFSelect_CheckCounter.cxx @@ -72,7 +72,7 @@ void IFSelect_CheckCounter::Analyse(const Interface_CheckIterator& list, for (list.Start(); list.More(); list.Next()) { num = list.Number(); Handle(Standard_Transient) ent; - const Handle(Interface_Check) check = list.Value(); + const Handle(Interface_Check)& check = list.Value(); ent = check->Entity(); if (ent.IsNull() && num > 0 && num <= nbe) ent = model->Value(num); nb = check->NbFails(); diff --git a/src/IFSelect/IFSelect_ModelCopier.cxx b/src/IFSelect/IFSelect_ModelCopier.cxx index 79ddb58d50..c98d4a1cc6 100644 --- a/src/IFSelect/IFSelect_ModelCopier.cxx +++ b/src/IFSelect/IFSelect_ModelCopier.cxx @@ -259,7 +259,7 @@ IFSelect_ModelCopier::IFSelect_ModelCopier () { } Interface_CheckIterator checks; checks.SetName ("X-STEP WorkSession : Send All"); Message::SendInfo() << "** WorkSession : Sending all data"<NewEmptyModel(); Interface_CopyTool TC (original, protocol); @@ -361,7 +361,7 @@ IFSelect_ModelCopier::IFSelect_ModelCopier () { } // et aussi : pas de Dispatch (envoi en bloc) applied.Nullify(); - Handle(Interface_InterfaceModel) original = G.Model(); + const Handle(Interface_InterfaceModel)& original = G.Model(); if (dispnum > 0) { newmod = original->NewEmptyModel(); TC.Clear(); @@ -441,7 +441,7 @@ IFSelect_ModelCopier::IFSelect_ModelCopier () { } (const Interface_Graph& G, const Handle(IFSelect_WorkLibrary)& WL, Interface_CopyTool& TC, Handle(Interface_InterfaceModel)& newmod) { - Handle(Interface_InterfaceModel) original = G.Model(); + const Handle(Interface_InterfaceModel)& original = G.Model(); // Interface_CopyTool TC(original,protocol); newmod = original->NewEmptyModel(); TC.Clear(); diff --git a/src/IFSelect/IFSelect_SelectExtract.cxx b/src/IFSelect/IFSelect_SelectExtract.cxx index 2985948be7..a7d945be1e 100644 --- a/src/IFSelect/IFSelect_SelectExtract.cxx +++ b/src/IFSelect/IFSelect_SelectExtract.cxx @@ -37,10 +37,9 @@ IFSelect_SelectExtract::IFSelect_SelectExtract () { Interface_EntityIterator iter; Interface_EntityIterator inputer = InputResult(G); // tient compte de tout - Handle(Interface_InterfaceModel) model = G.Model(); Standard_Integer rank = 0; for (inputer.Start(); inputer.More(); inputer.Next()) { - Handle(Standard_Transient) ent = inputer.Value(); + const Handle(Standard_Transient)& ent = inputer.Value(); rank ++; if (SortInGraph(rank,ent,G) == thesort) iter.GetOneItem(ent); } diff --git a/src/IFSelect/IFSelect_SelectRootComps.cxx b/src/IFSelect/IFSelect_SelectRootComps.cxx index 368a82bf0c..8b59c52a20 100644 --- a/src/IFSelect/IFSelect_SelectRootComps.cxx +++ b/src/IFSelect/IFSelect_SelectRootComps.cxx @@ -55,7 +55,7 @@ IFSelect_SelectRootComps::IFSelect_SelectRootComps () { } // A present, on retient, parmi les inputs, celles comptees une seule fois // (N.B.: on prend inp1, qui donne UNE entite par composant, simple ou cycle) for (inp1.Start(); inp1.More(); inp1.Next()) { - Handle(Standard_Transient) ent = inp1.Value(); + const Handle(Standard_Transient)& ent = inp1.Value(); if ((GC.NbTimes(ent) <= 1) == IsDirect()) iter.GetOneItem(ent); } return iter; diff --git a/src/IFSelect/IFSelect_SelectRoots.cxx b/src/IFSelect/IFSelect_SelectRoots.cxx index a60c4e6653..32e517b437 100644 --- a/src/IFSelect/IFSelect_SelectRoots.cxx +++ b/src/IFSelect/IFSelect_SelectRoots.cxx @@ -38,12 +38,12 @@ IFSelect_SelectRoots::IFSelect_SelectRoots () { } // On note dans le graphe : le cumul de chaque ensemble (Entite + Shared tous // niveaux). Les Roots initiales comptees une seule fois sont bonnes for (input.Start(); input.More(); input.Next()) { - Handle(Standard_Transient) ent = input.Value(); + const Handle(Standard_Transient)& ent = input.Value(); GC.GetFromEntity(ent); } // A present, on retient, parmi les inputs, celles comptees une seule fois for (input.Start(); input.More(); input.Next()) { - Handle(Standard_Transient) ent = input.Value(); + const Handle(Standard_Transient)& ent = input.Value(); if ((GC.NbTimes(ent) <= 1) == IsDirect()) iter.GetOneItem(ent); } return iter; diff --git a/src/IFSelect/IFSelect_SelectSignature.cxx b/src/IFSelect/IFSelect_SelectSignature.cxx index c19bc5d320..95fe170c89 100644 --- a/src/IFSelect/IFSelect_SelectSignature.cxx +++ b/src/IFSelect/IFSelect_SelectSignature.cxx @@ -98,7 +98,7 @@ static Standard_Integer multsign { Standard_Boolean res; Standard_CString txt; - Handle(Interface_InterfaceModel) model = G.Model(); + const Handle(Interface_InterfaceModel)& model = G.Model(); if (theexact <= 0) { if (!thematcher.IsNull()) return thematcher->Matches (ent,model,thesigntext, (theexact < 0)); txt = thecounter->ComputedSign(ent,G); diff --git a/src/IFSelect/IFSelect_Selection.cxx b/src/IFSelect/IFSelect_Selection.cxx index 0fcc5ef743..e777c9f371 100644 --- a/src/IFSelect/IFSelect_Selection.cxx +++ b/src/IFSelect/IFSelect_Selection.cxx @@ -46,7 +46,7 @@ Standard_Boolean IFSelect_Selection::HasUniqueResult () const // On peut utiliser le Graphe a present Interface_Graph GG(G); for (iter.Start(); iter.More(); iter.Next()) { - Handle(Standard_Transient) ent = iter.Value(); + const Handle(Standard_Transient)& ent = iter.Value(); GG.GetFromEntity(ent,Standard_True); // et voila } return Interface_GraphContent(GG); // EntityIterator specialise (meme taille) diff --git a/src/IFSelect/IFSelect_SignatureList.cxx b/src/IFSelect/IFSelect_SignatureList.cxx index a56ab4a48f..4075df788c 100644 --- a/src/IFSelect/IFSelect_SignatureList.cxx +++ b/src/IFSelect/IFSelect_SignatureList.cxx @@ -212,7 +212,7 @@ IFSelect_SignatureList::IFSelect_SignatureList nbtot += nbent; nbsign ++; if (nbent > maxent) maxent = nbent; - TCollection_AsciiString name = iter.Key(); + const TCollection_AsciiString& name = iter.Key(); // if (!name.IsIntegerValue()) continue; pas bien fiable Standard_Integer ic, nc = name.Length(); Standard_Boolean iaint = Standard_True; diff --git a/src/IFSelect/IFSelect_TransformStandard.cxx b/src/IFSelect/IFSelect_TransformStandard.cxx index ab4572d329..cc35ac2ecf 100644 --- a/src/IFSelect/IFSelect_TransformStandard.cxx +++ b/src/IFSelect/IFSelect_TransformStandard.cxx @@ -118,7 +118,7 @@ IFSelect_TransformStandard::IFSelect_TransformStandard () (const Interface_Graph& G, Interface_CopyTool& TC, Handle(Interface_InterfaceModel)& newmod) const { - Handle(Interface_InterfaceModel) original = G.Model(); + const Handle(Interface_InterfaceModel)& original = G.Model(); newmod = original->NewEmptyModel(); TC.Clear(); Standard_Integer nb = G.Size(); @@ -150,7 +150,7 @@ IFSelect_TransformStandard::IFSelect_TransformStandard () Standard_Boolean res = Standard_True; Standard_Boolean chg = Standard_False; Standard_Integer nb = NbModifiers(); - Handle(Interface_InterfaceModel) original = G.Model(); + const Handle(Interface_InterfaceModel)& original = G.Model(); for (Standard_Integer i = 1; i <= nb; i ++) { Handle(IFSelect_Modifier) unmod = Modifier(i); diff --git a/src/IFSelect/IFSelect_WorkSession.cxx b/src/IFSelect/IFSelect_WorkSession.cxx index 0de1d2a60f..27730d18e6 100644 --- a/src/IFSelect/IFSelect_WorkSession.cxx +++ b/src/IFSelect/IFSelect_WorkSession.cxx @@ -568,7 +568,7 @@ Standard_Boolean IFSelect_WorkSession::ComputeCheck BM.Init (Standard_False,Flag_Incorrect); Standard_Integer num, nb = CG.Size(); for (checklist.Start(); checklist.More(); checklist.Next()) { - const Handle(Interface_Check) chk = checklist.Value(); + const Handle(Interface_Check)& chk = checklist.Value(); if (!chk->HasFailed()) continue; num = checklist.Number(); if (num > 0 && num <= nb) BM.SetTrue (num,Flag_Incorrect); @@ -2707,7 +2707,7 @@ void IFSelect_WorkSession::QueryCheckList (const Interface_CheckIterator& chl) thecheckana = TCollection_AsciiString (nb+1,' '); for (chl.Start(); chl.More(); chl.Next()) { Standard_Integer num = chl.Number(); - const Handle(Interface_Check) ach = chl.Value(); + const Handle(Interface_Check)& ach = chl.Value(); if (ach->HasFailed()) thecheckana.SetValue(num,'2'); else if (ach->HasWarnings()) thecheckana.SetValue(num,'1'); } @@ -3038,7 +3038,7 @@ void IFSelect_WorkSession::DumpSelection IFSelect_SelectionIterator iter; sel->FillIterator(iter); for (; iter.More(); iter.Next()) { nb ++; - Handle(IFSelect_Selection) newsel = iter.Value(); + const Handle(IFSelect_Selection)& newsel = iter.Value(); sout<<" -- "<Label()<1 && mode != IFSelect_CountSummary); counter->Analyse (chks,myModel,Standard_True,failsonly); @@ -3722,7 +3722,7 @@ void IFSelect_WorkSession::ListEntities if (!titre && mode == 0) sout<<" Keys : R Root ? Unknown * Unloaded"<Number(ent); if (mode == 1) { // n0 id (root?) category validity tracetype diff --git a/src/IGESCAFControl/IGESCAFControl_Provider.cxx b/src/IGESCAFControl/IGESCAFControl_Provider.cxx index fa8084ace0..f5c82fd3e1 100644 --- a/src/IGESCAFControl/IGESCAFControl_Provider.cxx +++ b/src/IGESCAFControl/IGESCAFControl_Provider.cxx @@ -94,7 +94,7 @@ void IGESCAFControl_Provider::initStatic(const Handle(DE_ConfigurationNode)& the // function : setStatic // purpose : //======================================================================= -void IGESCAFControl_Provider::setStatic(const IGESCAFControl_ConfigurationNode::IGESCAFControl_InternalSection theParameter) +void IGESCAFControl_Provider::setStatic(const IGESCAFControl_ConfigurationNode::IGESCAFControl_InternalSection& theParameter) { Interface_Static::SetIVal("read.iges.bspline.continuity", theParameter.ReadBSplineContinuity); Interface_Static::SetIVal("read.precision.mode", theParameter.ReadPrecisionMode); diff --git a/src/IGESCAFControl/IGESCAFControl_Provider.hxx b/src/IGESCAFControl/IGESCAFControl_Provider.hxx index 101234a414..2dc29a3935 100644 --- a/src/IGESCAFControl/IGESCAFControl_Provider.hxx +++ b/src/IGESCAFControl/IGESCAFControl_Provider.hxx @@ -139,7 +139,7 @@ private: void initStatic(const Handle(DE_ConfigurationNode)& theNode); //! Initialize static variables - void setStatic(const IGESCAFControl_ConfigurationNode::IGESCAFControl_InternalSection theParameter); + void setStatic(const IGESCAFControl_ConfigurationNode::IGESCAFControl_InternalSection& theParameter); //! Reset used interface static variables void resetStatic(); diff --git a/src/IGESCAFControl/IGESCAFControl_Reader.cxx b/src/IGESCAFControl/IGESCAFControl_Reader.cxx index 86b083fe83..bf8cfba272 100644 --- a/src/IGESCAFControl/IGESCAFControl_Reader.cxx +++ b/src/IGESCAFControl/IGESCAFControl_Reader.cxx @@ -95,7 +95,7 @@ static void AddCompositeShape (const Handle(XCAFDoc_ShapeTool)& theSTool, TopTools_MapOfShape& theMap) { TopoDS_Shape aShape = theShape; - TopLoc_Location aLoc = theShape.Location(); + const TopLoc_Location& aLoc = theShape.Location(); if (!theConsiderLoc && !aLoc.IsIdentity()) aShape.Location( TopLoc_Location() ); if (!theMap.Add (aShape)) diff --git a/src/IGESCAFControl/IGESCAFControl_Writer.cxx b/src/IGESCAFControl/IGESCAFControl_Writer.cxx index 706a3e93d7..53059072c5 100644 --- a/src/IGESCAFControl/IGESCAFControl_Writer.cxx +++ b/src/IGESCAFControl/IGESCAFControl_Writer.cxx @@ -278,7 +278,7 @@ void IGESCAFControl_Writer::MakeColors (const TopoDS_Shape &S, // check if shape has its own style (or inherits from ancestor) XCAFPrs_Style style = inherit; if ( settings.Contains(S) ) { - XCAFPrs_Style own = settings.FindFromKey(S); + const XCAFPrs_Style& own = settings.FindFromKey(S); if ( own.IsSetColorCurv() ) style.SetColorCurv ( own.GetColorCurv() ); if ( own.IsSetColorSurf() ) style.SetColorSurf ( own.GetColorSurf() ); style.SetMaterial (own.Material()); @@ -397,7 +397,7 @@ static void AttachLayer (const Handle(Transfer_FinderProcess) &FP, if ( aSh.ShapeType() == TopAbs_COMPOUND ) { TopoDS_Iterator aShIt(aSh); for ( ; aShIt.More(); aShIt.Next() ) { - TopoDS_Shape newSh = aShIt.Value(); + const TopoDS_Shape& newSh = aShIt.Value(); Handle(TColStd_HSequenceOfExtendedString) shLayers = new TColStd_HSequenceOfExtendedString; if (! LTool->GetLayers( newSh, shLayers) || newSh.ShapeType() == TopAbs_COMPOUND ) AttachLayer(FP, LTool, newSh, localIntName); @@ -413,7 +413,7 @@ static void AttachLayer (const Handle(Transfer_FinderProcess) &FP, } for (Standard_Integer i = 1; i <= shseq.Length(); i++ ) { - TopoDS_Shape localShape = shseq.Value(i); + const TopoDS_Shape& localShape = shseq.Value(i); Handle(IGESData_IGESEntity) Igesent; Handle(TransferBRep_ShapeMapper) mapper = TransferBRep::ShapeMapper ( FP, localShape ); if ( FP->FindTypedTransient ( mapper, STANDARD_TYPE(IGESData_IGESEntity), Igesent ) ) { diff --git a/src/IGESControl/IGESControl_Reader.cxx b/src/IGESControl/IGESControl_Reader.cxx index d9346bb415..93eb955eaf 100644 --- a/src/IGESControl/IGESControl_Reader.cxx +++ b/src/IGESControl/IGESControl_Reader.cxx @@ -149,7 +149,7 @@ void IGESControl_Reader::PrintTransferInfo // Init for dicoCountResult for IFSelect_ResultCount if ( mode == IFSelect_ResultCount ) { char mess[300]; - const Handle(Transfer_Binder) aBinder = iterTrans.Value(); + const Handle(Transfer_Binder)& aBinder = iterTrans.Value(); sprintf(mess,"\t%s",aBinder->ResultTypeName()); if (aMapCountResult.IsBound(mess)) aMapCountResult.ChangeFind(mess)++; @@ -159,7 +159,7 @@ void IGESControl_Reader::PrintTransferInfo // Init for dicoCountMapping for IFSelect_Mapping else if ( mode == IFSelect_Mapping ) { char mess[300]; - const Handle(Transfer_Binder) aBinder = iterTrans.Value(); + const Handle(Transfer_Binder)& aBinder = iterTrans.Value(); DeclareAndCast(IGESData_IGESEntity,igesEnt,iterTrans.Starting()); sprintf(mess,"%d\t%d\t%s\t%s", igesEnt->TypeNumber(), igesEnt->FormNumber(), @@ -178,7 +178,7 @@ void IGESControl_Reader::PrintTransferInfo // Init the dicoCount dicoList and nbWarn ,nb Fail. for(checkIterator.Start(); checkIterator.More(); checkIterator.Next() ) { char mess[300]; - const Handle(Interface_Check) aCheck = checkIterator.Value(); + const Handle(Interface_Check)& aCheck = checkIterator.Value(); Handle(Standard_Transient) ent = model->Value(checkIterator.Number()); DeclareAndCast(IGESData_IGESEntity,igesEnt,ent); Standard_Integer type = igesEnt->TypeNumber(), form = igesEnt->FormNumber(); @@ -242,7 +242,7 @@ void IGESControl_Reader::PrintTransferInfo Message_Messenger::StreamBuffer aSender = TF->SendInfo(); aSender << aMapCountIter.Value() << aMapCountIter.Key() << std::endl; if (mode == IFSelect_ListByItem) { - Handle(TColStd_HSequenceOfInteger) entityList = aMapListIter.Value(); + const Handle(TColStd_HSequenceOfInteger)& entityList = aMapListIter.Value(); Standard_Integer length = entityList->Length(); Message_Msg msg3035("IGES_3035"); TF->Send(msg3035, Message_Info); diff --git a/src/IGESData/IGESData_GeneralModule.cxx b/src/IGESData/IGESData_GeneralModule.cxx index 6920274416..37158506e7 100644 --- a/src/IGESData/IGESData_GeneralModule.cxx +++ b/src/IGESData/IGESData_GeneralModule.cxx @@ -168,7 +168,7 @@ void IGESData_GeneralModule::FillSharedCase if (enfr->NbAssociativities() != 0) { for (Interface_EntityIterator iter = enfr->Associativities(); iter.More(); iter.Next()) { - Handle(Standard_Transient) anent = iter.Value(); + const Handle(Standard_Transient)& anent = iter.Value(); Handle(Standard_Transient) newent; if (TC.Search(anent,newent)) ento->AddAssociativity (GetCasted(IGESData_IGESEntity,newent)); diff --git a/src/IGESData/IGESData_IGESModel.cxx b/src/IGESData/IGESData_IGESModel.cxx index c58873a852..7f17a73e28 100644 --- a/src/IGESData/IGESData_IGESModel.cxx +++ b/src/IGESData/IGESData_IGESModel.cxx @@ -492,7 +492,7 @@ void IGESData_VerifyDate(const Handle(TCollection_HAsciiString)& str, if (str.IsNull()) { ach->SendFail(Msg57); return; } - Handle(TCollection_HAsciiString) stdvar = str; + const Handle(TCollection_HAsciiString)& stdvar = str; if (strcmp(mess,"Last Change Date")==0) Msg57.Arg(25); else diff --git a/src/IGESDraw/IGESDraw_ToolViewsVisible.cxx b/src/IGESDraw/IGESDraw_ToolViewsVisible.cxx index 3cf6d5a7c9..8480f21b94 100644 --- a/src/IGESDraw/IGESDraw_ToolViewsVisible.cxx +++ b/src/IGESDraw/IGESDraw_ToolViewsVisible.cxx @@ -200,7 +200,7 @@ void IGESDraw_ToolViewsVisible::OwnCheck { Standard_Integer res = 0; Standard_Integer nb = ent->NbDisplayedEntities(); - Handle(IGESData_ViewKindEntity) entcomp (ent); + const Handle(IGESData_ViewKindEntity)& entcomp = ent; for (Standard_Integer i = 1; i <= nb; i ++) { Handle(IGESData_IGESEntity) displayed = ent->DisplayedEntity(i); if (entcomp != displayed->View()) res ++; @@ -237,7 +237,7 @@ Standard_Boolean IGESDraw_ToolViewsVisible::OwnCorrect // Les entites affichees doivent referencer . Elles ont priorite. Standard_Boolean res = Standard_False; Standard_Integer nb = ent->NbDisplayedEntities(); - Handle(IGESData_ViewKindEntity) entcomp (ent); + const Handle(IGESData_ViewKindEntity)& entcomp = ent; for (Standard_Integer i = 1; i <= nb; i ++) { Handle(IGESData_IGESEntity) displayed = ent->DisplayedEntity(i); if (entcomp != displayed->View()) res = Standard_True; diff --git a/src/IGESDraw/IGESDraw_ToolViewsVisibleWithAttr.cxx b/src/IGESDraw/IGESDraw_ToolViewsVisibleWithAttr.cxx index ebfcfc813d..fdd813ca0c 100644 --- a/src/IGESDraw/IGESDraw_ToolViewsVisibleWithAttr.cxx +++ b/src/IGESDraw/IGESDraw_ToolViewsVisibleWithAttr.cxx @@ -309,7 +309,7 @@ void IGESDraw_ToolViewsVisibleWithAttr::OwnCheck if (ent->LineFontValue(i) != 0 && ent->IsFontDefinition(i)) ach->AddFail ("At least one Line Font Definition Mismatch (both Value and Entity"); } - Handle(IGESData_ViewKindEntity) entcomp (ent); + const Handle(IGESData_ViewKindEntity)& entcomp = ent; Standard_Integer res = 0; nb = ent->NbDisplayedEntities(); for (i = 1; i <= nb; i ++) { @@ -380,7 +380,7 @@ Standard_Boolean IGESDraw_ToolViewsVisibleWithAttr::OwnCorrect // Les entites affichees doivent referencer . Elles ont priorite. Standard_Boolean res = Standard_False; Standard_Integer nb = ent->NbDisplayedEntities(); - Handle(IGESData_ViewKindEntity) entcomp (ent); + const Handle(IGESData_ViewKindEntity)& entcomp = ent; for (Standard_Integer i = 1; i <= nb; i ++) { Handle(IGESData_IGESEntity) displayed = ent->DisplayedEntity(i); if (entcomp != displayed->View()) res = Standard_True; diff --git a/src/IGESSelect/IGESSelect.cxx b/src/IGESSelect/IGESSelect.cxx index fa1a76ba7c..7f1d782536 100644 --- a/src/IGESSelect/IGESSelect.cxx +++ b/src/IGESSelect/IGESSelect.cxx @@ -41,7 +41,7 @@ Standard_Integer IGESSelect::WhatIges (const Handle(IGESData_IGESEntity)& ent, const Interface_Graph& G, Handle(IGESData_IGESEntity)& /* sup */, Standard_Integer& /* index */) { - Handle(IGESData_IGESEntity) igesent = ent; + const Handle(IGESData_IGESEntity)& igesent = ent; if (igesent.IsNull()) return Standard_False; // Standard_Integer igt = igesent->TypeNumber(); DeclareAndCast(IGESData_IGESModel,model,G.Model()); diff --git a/src/IGESSelect/IGESSelect_Dumper.cxx b/src/IGESSelect/IGESSelect_Dumper.cxx index 8e8241fb19..3cbfd8d94f 100644 --- a/src/IGESSelect/IGESSelect_Dumper.cxx +++ b/src/IGESSelect/IGESSelect_Dumper.cxx @@ -156,7 +156,7 @@ IGESSelect_Dumper::IGESSelect_Dumper () { } if (type.IsEqual("IGESSelect_SelectIGESTypeForm")) { if (file.NbParams() < 2) return Standard_False; //Standard_Boolean exact; //szv#4:S4163:12Mar99 not needed - const TCollection_AsciiString exname = file.ParamValue(1); + const TCollection_AsciiString& exname = file.ParamValue(1); if (exname.Length() < 1) return Standard_False; if (exname.Value(1) == 'e') {} //szv#4:S4163:12Mar99 `exact = Standard_True` not needed else if (exname.Value(1) == 'c') {} //szv#4:S4163:12Mar99 `exact = Standard_False` not needed @@ -201,7 +201,7 @@ IGESSelect_Dumper::IGESSelect_Dumper () { } if (file.NbParams() < 2) return Standard_False; Handle(IGESSelect_FloatFormat) ff = new IGESSelect_FloatFormat; Standard_Boolean zerosup; - const TCollection_AsciiString zsup = file.ParamValue(1); + const TCollection_AsciiString& zsup = file.ParamValue(1); if (zsup.Length() < 1) return Standard_False; if (zsup.Value(1) == 'z') zerosup = Standard_True; else if (zsup.Value(1) == 'n') zerosup = Standard_False; @@ -269,7 +269,7 @@ IGESSelect_Dumper::IGESSelect_Dumper () { } if (type.IsEqual("IGESSelect_SplineToBSpline")) { if (file.NbParams() < 1) return Standard_False; Standard_Boolean tryc2; - const TCollection_AsciiString tc2 = file.ParamValue(1); + const TCollection_AsciiString& tc2 = file.ParamValue(1); if (tc2.Length() < 1) return Standard_False; if (tc2.Value(1) == 'T') tryc2 = Standard_True; else if (tc2.Value(1) == 'N') tryc2 = Standard_False; diff --git a/src/IGESToBRep/IGESToBRep_Reader.cxx b/src/IGESToBRep/IGESToBRep_Reader.cxx index 7dd8339741..e1f2a409db 100644 --- a/src/IGESToBRep/IGESToBRep_Reader.cxx +++ b/src/IGESToBRep/IGESToBRep_Reader.cxx @@ -157,7 +157,7 @@ Standard_Integer IGESToBRep_Reader::LoadFile (const Standard_CString filename) Interface_CheckTool cht (model,protocol); Interface_CheckIterator anIter = cht.CompleteCheckList(); for(anIter.Start(); anIter.More(); anIter.Next()) { - const Handle(Interface_Check) ach = anIter.Value(); + const Handle(Interface_Check)& ach = anIter.Value(); nbWarn += ach->NbWarnings(); nbFail += ach->NbFails(); } diff --git a/src/IGESToBRep/IGESToBRep_TopoSurface.cxx b/src/IGESToBRep/IGESToBRep_TopoSurface.cxx index 653b3ad1c7..6464712111 100644 --- a/src/IGESToBRep/IGESToBRep_TopoSurface.cxx +++ b/src/IGESToBRep/IGESToBRep_TopoSurface.cxx @@ -1590,7 +1590,7 @@ TopoDS_Shape IGESToBRep_TopoSurface::TransferPlaneParts(const Handle(IGESGeom_Pl return res; } - TopoDS_Face F = MF.Face(); + const TopoDS_Face& F = MF.Face(); GProp_GProps G; BRepGProp::SurfaceProperties(F,G); if (G.Mass() < 0) { diff --git a/src/IntPatch/IntPatch_ImpPrmIntersection.cxx b/src/IntPatch/IntPatch_ImpPrmIntersection.cxx index 6ecec53651..ef7c959e0a 100644 --- a/src/IntPatch/IntPatch_ImpPrmIntersection.cxx +++ b/src/IntPatch/IntPatch_ImpPrmIntersection.cxx @@ -1414,7 +1414,7 @@ void IntPatch_ImpPrmIntersection::Perform (const Handle(Adaptor3d_Surface)& Surf gp_Pnt ptpoly; IntSurf_PntOn2S p2s; Handle(IntSurf_LineOn2S) Thelin = new IntSurf_LineOn2S (); - Handle(Adaptor2d_Curve2d) arcsegm = thesegm.Curve(); + const Handle(Adaptor2d_Curve2d)& arcsegm = thesegm.Curve(); Standard_Integer nbsample = 100; if (!reversed) { diff --git a/src/IntTools/IntTools_Context.cxx b/src/IntTools/IntTools_Context.cxx index 286bac96fc..6c4deb2777 100644 --- a/src/IntTools/IntTools_Context.cxx +++ b/src/IntTools/IntTools_Context.cxx @@ -736,7 +736,7 @@ Standard_Boolean IntTools_Context::IsValidBlockForFace aTInterm=IntTools_Tools::IntermediatePoint(aT1, aT2); - Handle(Geom_Curve) aC3D=aC.Curve(); + const Handle(Geom_Curve)& aC3D=aC.Curve(); // point 3D aC3D->D0(aTInterm, aPInterm); // @@ -821,7 +821,7 @@ Standard_Boolean IntTools_Context::IsVertexOnLine aPv=BRep_Tool::Pnt(aV); - Handle(Geom_Curve) aC3D=aC.Curve(); + const Handle(Geom_Curve)& aC3D=aC.Curve(); aTolSum=aTolV+aTolC; diff --git a/src/IntTools/IntTools_Tools.cxx b/src/IntTools/IntTools_Tools.cxx index 3c72ec9906..6575cea309 100644 --- a/src/IntTools/IntTools_Tools.cxx +++ b/src/IntTools/IntTools_Tools.cxx @@ -201,12 +201,12 @@ static Standard_Integer IntTools_Tools::SplitCurve(const IntTools_Curve& IC, IntTools_SequenceOfCurves& aCvs) { - Handle (Geom_Curve) aC3D =IC.Curve(); + const Handle (Geom_Curve)& aC3D =IC.Curve(); if(aC3D.IsNull()) return 0; // - Handle (Geom2d_Curve) aC2D1=IC.FirstCurve2d(); - Handle (Geom2d_Curve) aC2D2=IC.SecondCurve2d(); + const Handle (Geom2d_Curve)& aC2D1=IC.FirstCurve2d(); + const Handle (Geom2d_Curve)& aC2D2=IC.SecondCurve2d(); Standard_Boolean bIsClosed; bIsClosed=IntTools_Tools::IsClosed(aC3D); diff --git a/src/Interface/Interface_Graph.cxx b/src/Interface/Interface_Graph.cxx index 7d6412474e..bc7a982418 100644 --- a/src/Interface/Interface_Graph.cxx +++ b/src/Interface/Interface_Graph.cxx @@ -158,7 +158,7 @@ void Interface_Graph::Evaluate() // Mise en forme : liste d entiers for (iter.Start(); iter.More(); iter.Next()) { // num = 0 -> on sort du Model de depart, le noter "Error" et passer - Handle(Standard_Transient) entshare = iter.Value(); + const Handle(Standard_Transient)& entshare = iter.Value(); if(entshare == ent) continue; @@ -349,7 +349,7 @@ void Interface_Graph::GetFromIter if(thestats.IsNull()) return; for (iter.Start(); iter.More(); iter.Next()) { - Handle(Standard_Transient) ent = iter.Value(); + const Handle(Standard_Transient)& ent = iter.Value(); Standard_Integer num = EntityNumber(ent); if (!num) continue; @@ -368,7 +368,7 @@ void Interface_Graph::GetFromIter if(thestats.IsNull()) return; for (iter.Start(); iter.More(); iter.Next()) { - Handle(Standard_Transient) ent = iter.Value(); + const Handle(Standard_Transient)& ent = iter.Value(); Standard_Integer num = EntityNumber(ent); if (!num) continue; diff --git a/src/Interface/Interface_GraphContent.cxx b/src/Interface/Interface_GraphContent.cxx index c0a16a91b0..e7fa227ea0 100644 --- a/src/Interface/Interface_GraphContent.cxx +++ b/src/Interface/Interface_GraphContent.cxx @@ -34,7 +34,7 @@ Interface_GraphContent::Interface_GraphContent () { } Standard_Integer nb = list.NbEntities(); if (nb == 0) return; // Liste redefinie a VIDE for( ; list.More(); list.Next()) { - Handle(Standard_Transient) curent = list.Value(); + const Handle(Standard_Transient)& curent = list.Value(); if (agraph.IsPresent(agraph.EntityNumber(curent))) GetOneItem (curent); } diff --git a/src/Interface/Interface_InterfaceModel.cxx b/src/Interface/Interface_InterfaceModel.cxx index 184743ce32..7c1331345f 100644 --- a/src/Interface/Interface_InterfaceModel.cxx +++ b/src/Interface/Interface_InterfaceModel.cxx @@ -498,7 +498,7 @@ void Interface_InterfaceModel::FillSemanticChecks for (checks.Start(); checks.More(); checks.Next()) nb ++; therepch.ReSize (therepch.Extent() + nb + 2); for (checks.Start(); checks.More(); checks.Next()) { - const Handle(Interface_Check) ach = checks.Value(); + const Handle(Interface_Check)& ach = checks.Value(); Standard_Integer num = checks.Number(); // global check : ok si MEME MODELE if (num == 0) thechecksem->GetMessages(ach); @@ -756,7 +756,8 @@ void Interface_InterfaceModel::GetFromTransfer { theentities.Clear(); theentities.ReSize (aniter.NbEntities()); for (aniter.Start(); aniter.More(); aniter.Next()) { - Handle(Standard_Transient) ent = aniter.Value(); AddEntity(ent); + const Handle(Standard_Transient)& ent = aniter.Value(); + AddEntity(ent); } } diff --git a/src/Interface/Interface_MSG.cxx b/src/Interface/Interface_MSG.cxx index 55398cf2b1..bbd0229490 100644 --- a/src/Interface/Interface_MSG.cxx +++ b/src/Interface/Interface_MSG.cxx @@ -158,7 +158,7 @@ Standard_Integer Interface_MSG::Read (Standard_IStream& S) for (; iter.More(); iter.Next()) { if (!iter.Key().StartsWith(rootkey)) continue; S<<"@"<ToCString()<<"\n"; diff --git a/src/Interface/Interface_ShareTool.cxx b/src/Interface/Interface_ShareTool.cxx index 730420954d..1720dc19f7 100644 --- a/src/Interface/Interface_ShareTool.cxx +++ b/src/Interface/Interface_ShareTool.cxx @@ -202,7 +202,7 @@ void Interface_ShareTool::Print (const Interface_EntityIterator& iter, Standard { S << " Nb.Entities : " << iter.NbEntities() << " : "; for (iter.Start(); iter.More(); iter.Next()) { - Handle(Standard_Transient) ent = iter.Value(); + const Handle(Standard_Transient)& ent = iter.Value(); S << " n0/id:"; Model()->Print (ent, S); } diff --git a/src/LocOpe/LocOpe_SplitDrafts.cxx b/src/LocOpe/LocOpe_SplitDrafts.cxx index 5ad7158714..edce77fcf6 100644 --- a/src/LocOpe/LocOpe_SplitDrafts.cxx +++ b/src/LocOpe/LocOpe_SplitDrafts.cxx @@ -1644,7 +1644,7 @@ static TopoDS_Edge NewEdge(const TopoDS_Edge& edg, Standard_Boolean rev = Standard_False; TopoDS_Vertex Vf = V1; TopoDS_Vertex Vl = V2; - Handle(Geom_Curve) Cimg = i2s.Line(i); + const Handle(Geom_Curve)& Cimg = i2s.Line(i); Handle(Geom2d_Curve) Cimg2d; if (AppS1) { Cimg2d = i2s.LineOnS1(i); diff --git a/src/LocOpe/LocOpe_SplitShape.cxx b/src/LocOpe/LocOpe_SplitShape.cxx index 00535b0078..6922896185 100644 --- a/src/LocOpe/LocOpe_SplitShape.cxx +++ b/src/LocOpe/LocOpe_SplitShape.cxx @@ -457,7 +457,7 @@ Standard_Boolean LocOpe_SplitShape::Add(const TopTools_ListOfShape& Lwires, else { //we have to choose the direction - TopoDS_Edge aStartEdge = wexp.Current(); + const TopoDS_Edge& aStartEdge = wexp.Current(); TopTools_ListOfShape Ldirs; Ldirs.Append(aStartEdge); Ldirs.Append(NextSectionWire); diff --git a/src/LocOpe/LocOpe_Spliter.cxx b/src/LocOpe/LocOpe_Spliter.cxx index 5dbadd8c40..5f282ddf65 100644 --- a/src/LocOpe/LocOpe_Spliter.cxx +++ b/src/LocOpe/LocOpe_Spliter.cxx @@ -471,7 +471,7 @@ void LocOpe_Spliter::Perform(const Handle(LocOpe_WiresOnShape)& PW) } } if (itms.More()) { - TopoDS_Shape fac = itms.Key(); + const TopoDS_Shape& fac = itms.Key(); for (exp.Init(fac,TopAbs_EDGE); exp.More(); exp.Next()) { if (!Mapebord.Add(exp.Current())) { Mapebord.Remove(exp.Current()); diff --git a/src/MAT2d/MAT2d_Mat2d.cxx b/src/MAT2d/MAT2d_Mat2d.cxx index 4e3d54c176..2e2a31055b 100644 --- a/src/MAT2d/MAT2d_Mat2d.cxx +++ b/src/MAT2d/MAT2d_Mat2d.cxx @@ -1727,7 +1727,7 @@ MAT2d_Mat2d::~MAT2d_Mat2d() MAT_DataMapIteratorOfDataMapOfIntegerBisector itmap(bisectormap); for (; itmap.More(); itmap.Next()) { - Handle(MAT_Bisector) aBisector = itmap.Value(); + const Handle(MAT_Bisector)& aBisector = itmap.Value(); aBisector->FirstEdge(NULL); aBisector->SecondEdge(NULL); } diff --git a/src/MeshTest/MeshTest.cxx b/src/MeshTest/MeshTest.cxx index 4c165a8822..02f2997487 100644 --- a/src/MeshTest/MeshTest.cxx +++ b/src/MeshTest/MeshTest.cxx @@ -474,7 +474,7 @@ static Standard_Integer MemLeakTest(Draw_Interpretor&, Standard_Integer /*nbarg* w.Close(); TopoDS_Wire wireShape( w.Wire()); BRepBuilderAPI_MakeFace faceBuilder(wireShape); - TopoDS_Face f( faceBuilder.Face()); + const TopoDS_Face& f = faceBuilder.Face(); BRepMesh_IncrementalMesh im(f,1); BRepTools::Clean(f); } diff --git a/src/MeshVS/MeshVS_Mesh.cxx b/src/MeshVS/MeshVS_Mesh.cxx index dba34e57f8..4da739d9aa 100644 --- a/src/MeshVS/MeshVS_Mesh.cxx +++ b/src/MeshVS/MeshVS_Mesh.cxx @@ -146,7 +146,7 @@ Standard_Boolean MeshVS_Mesh::AcceptDisplayMode (const Standard_Integer theMode) for (MeshVS_SequenceOfPrsBuilder::Iterator aBuilderIter (myBuilders); aBuilderIter.More(); aBuilderIter.Next()) { - Handle(MeshVS_PrsBuilder) aBuilder = aBuilderIter.Value(); + const Handle(MeshVS_PrsBuilder)& aBuilder = aBuilderIter.Value(); if (!aBuilder.IsNull() && aBuilder->TestFlags (theMode)) { diff --git a/src/Message/Message_PrinterToReport.cxx b/src/Message/Message_PrinterToReport.cxx index 0bbd84062f..2888a55bd9 100644 --- a/src/Message/Message_PrinterToReport.cxx +++ b/src/Message/Message_PrinterToReport.cxx @@ -112,7 +112,7 @@ void Message_PrinterToReport::send (const TCollection_AsciiString& theString, //function : sendMetricAlert //purpose : //======================================================================= -void Message_PrinterToReport::sendMetricAlert (const TCollection_AsciiString theValue, +void Message_PrinterToReport::sendMetricAlert (const TCollection_AsciiString& theValue, const Message_Gravity theGravity) const { Message_AlertExtended::AddAlert (Report(), new Message_AttributeMeter (theValue), theGravity); diff --git a/src/Message/Message_PrinterToReport.hxx b/src/Message/Message_PrinterToReport.hxx index e82cfe1565..eb05a60638 100644 --- a/src/Message/Message_PrinterToReport.hxx +++ b/src/Message/Message_PrinterToReport.hxx @@ -61,7 +61,7 @@ protected: const Message_Gravity theGravity) const Standard_OVERRIDE; //! Send an alert with metrics active in the current report - Standard_EXPORT void sendMetricAlert (const TCollection_AsciiString theValue, + Standard_EXPORT void sendMetricAlert (const TCollection_AsciiString& theValue, const Message_Gravity theGravity) const; private: diff --git a/src/Message/Message_Report.cxx b/src/Message/Message_Report.cxx index b63bd7137f..9f606f7448 100644 --- a/src/Message/Message_Report.cxx +++ b/src/Message/Message_Report.cxx @@ -148,7 +148,7 @@ void Message_Report::ActivateInMessenger (const Standard_Boolean toActivate, Message_SequenceOfPrinters aPrintersToRemove; for (Message_SequenceOfPrinters::Iterator anIterator (aMessenger->Printers()); anIterator.More(); anIterator.Next()) { - const Handle(Message_Printer) aPrinter = anIterator.Value(); + const Handle(Message_Printer)& aPrinter = anIterator.Value(); if (aPrinter->IsKind(STANDARD_TYPE (Message_PrinterToReport)) && Handle(Message_PrinterToReport)::DownCast (aPrinter)->Report() == this) aPrintersToRemove.Append (aPrinter); diff --git a/src/MoniTool/MoniTool_AttrList.cxx b/src/MoniTool/MoniTool_AttrList.cxx index e5deb74a74..b7533c8f8b 100644 --- a/src/MoniTool/MoniTool_AttrList.cxx +++ b/src/MoniTool/MoniTool_AttrList.cxx @@ -169,10 +169,10 @@ MoniTool_AttrList::MoniTool_AttrList () { } NCollection_DataMap::Iterator iter(list); for (; iter.More(); iter.Next()) { - TCollection_AsciiString name = iter.Key(); + const TCollection_AsciiString& name = iter.Key(); if (!name.StartsWith(fromname)) continue; - Handle(Standard_Transient) atr = iter.Value(); + const Handle(Standard_Transient)& atr = iter.Value(); Handle(Standard_Transient) newatr = atr; // Copy ? according type diff --git a/src/MoniTool/MoniTool_TypedValue.cxx b/src/MoniTool/MoniTool_TypedValue.cxx index 244f821d83..f6e7b7534f 100644 --- a/src/MoniTool/MoniTool_TypedValue.cxx +++ b/src/MoniTool/MoniTool_TypedValue.cxx @@ -192,7 +192,7 @@ static Standard_Boolean StaticPath(const Handle(TCollection_HAsciiString)& val) def.AssignCat(" , alpha: "); NCollection_DataMap::Iterator listadd(theeadds); for (; listadd.More(); listadd.Next()) { - TCollection_AsciiString aName = listadd.Key(); + const TCollection_AsciiString& aName = listadd.Key(); Standard_CString enva = aName.ToCString(); if (enva[0] == '?') continue; Sprintf(mess,":%d ",listadd.Value()); diff --git a/src/OpenGl/OpenGl_Text.cxx b/src/OpenGl/OpenGl_Text.cxx index 023485e76a..0431d51df9 100644 --- a/src/OpenGl/OpenGl_Text.cxx +++ b/src/OpenGl/OpenGl_Text.cxx @@ -312,7 +312,7 @@ void OpenGl_Text::StringSize (const Handle(OpenGl_Context)& theCtx, } theWidth = Max (theWidth, aWidth); - Handle(OpenGl_Context) aCtx = theCtx; + const Handle(OpenGl_Context)& aCtx = theCtx; aFont.Nullify(); aCtx->ReleaseResource (aFontKey, Standard_True); } diff --git a/src/PCDM/PCDM_ReadWriter.cxx b/src/PCDM/PCDM_ReadWriter.cxx index a0a7b44e22..436185e37b 100644 --- a/src/PCDM/PCDM_ReadWriter.cxx +++ b/src/PCDM/PCDM_ReadWriter.cxx @@ -201,7 +201,7 @@ static TCollection_ExtendedString TryXmlDriverType // of the DocumentElement, the XML format cannot be defined if (aParser.parse (theFileName.ToCString())) { - LDOM_Element anElement = aParser.GetElement(); + const LDOM_Element& anElement = aParser.GetElement(); if (anElement.getTagName().equals (LDOMString(aDocumentElementName))) theFormat = anElement.getAttribute ("format"); } @@ -226,7 +226,7 @@ static TCollection_ExtendedString TryXmlDriverType (Standard_IStream& theIStream // of the DocumentElement, the XML format cannot be defined if (aParser.parse (theIStream, Standard_True)) { - LDOM_Element anElement = aParser.GetElement(); + const LDOM_Element& anElement = aParser.GetElement(); if (anElement.getTagName().equals (LDOMString(aDocumentElementName))) theFormat = anElement.getAttribute ("format"); } diff --git a/src/PrsDim/PrsDim.cxx b/src/PrsDim/PrsDim.cxx index b103684ade..ece9e75d19 100644 --- a/src/PrsDim/PrsDim.cxx +++ b/src/PrsDim/PrsDim.cxx @@ -895,7 +895,7 @@ Standard_Boolean PrsDim::InitAngleBetweenPlanarFaces (const TopoDS_Face& theFirs } // Get intersect line. - Handle(Geom_Curve) anIntersectCurve = aPlaneIntersector.Line (1); + const Handle(Geom_Curve)& anIntersectCurve = aPlaneIntersector.Line (1); Handle(Geom_Line) anIntersectLine = Handle(Geom_Line)::DownCast (anIntersectCurve); @@ -982,8 +982,6 @@ Standard_Boolean PrsDim::InitAngleBetweenCurvilinearFaces (const TopoDS_Face& th } // Get intersect line. - Handle(Geom_Curve) anIntersectCurve = aSurfaceIntersector.Line (1); - Handle(Geom_Line) aFirstLine, aSecondLine; Standard_Real aFirstU = 0.0; Standard_Real aFirstV = 0.0; diff --git a/src/PrsDim/PrsDim_PerpendicularRelation.cxx b/src/PrsDim/PrsDim_PerpendicularRelation.cxx index 0161b5d4e9..46426c1e11 100644 --- a/src/PrsDim/PrsDim_PerpendicularRelation.cxx +++ b/src/PrsDim/PrsDim_PerpendicularRelation.cxx @@ -218,7 +218,6 @@ void PrsDim_PerpendicularRelation::ComputeTwoEdgesPerpendicular(const Handle(Prs // current face BRepBuilderAPI_MakeFace makeface (myPlane->Pln()); - TopoDS_Face face (makeface.Face()); BRepAdaptor_Surface adp (makeface.Face()); // 2d lines => projection of 3d on current plane diff --git a/src/PrsDim/PrsDim_TangentRelation.cxx b/src/PrsDim/PrsDim_TangentRelation.cxx index 756ee39b45..037e0f5a5e 100644 --- a/src/PrsDim/PrsDim_TangentRelation.cxx +++ b/src/PrsDim/PrsDim_TangentRelation.cxx @@ -217,7 +217,6 @@ void PrsDim_TangentRelation::ComputeTwoEdgesTangent(const Handle(Prs3d_Presentat aPresentation->SetInfiniteState(isInfinite1 || isInfinite2); // current face BRepBuilderAPI_MakeFace makeface(myPlane->Pln()); - TopoDS_Face face(makeface.Face()); BRepAdaptor_Surface adp(makeface.Face()); Standard_Integer typArg(0); diff --git a/src/PrsMgr/PrsMgr_PresentableObject.cxx b/src/PrsMgr/PrsMgr_PresentableObject.cxx index 3cb38867de..b723891b86 100644 --- a/src/PrsMgr/PrsMgr_PresentableObject.cxx +++ b/src/PrsMgr/PrsMgr_PresentableObject.cxx @@ -346,7 +346,7 @@ void PrsMgr_PresentableObject::SetTransformPersistence (const Handle(Graphic3d_T //======================================================================= void PrsMgr_PresentableObject::AddChild (const Handle(PrsMgr_PresentableObject)& theObject) { - Handle(PrsMgr_PresentableObject) aHandleGuard = theObject; + const Handle(PrsMgr_PresentableObject)& aHandleGuard = theObject; if (theObject->myParent != NULL) { theObject->myParent->RemoveChild (aHandleGuard); diff --git a/src/QABugs/QABugs_1.cxx b/src/QABugs/QABugs_1.cxx index 01b5566821..de3d1d74f8 100644 --- a/src/QABugs/QABugs_1.cxx +++ b/src/QABugs/QABugs_1.cxx @@ -243,7 +243,7 @@ static Standard_Integer OCC10bug (Draw_Interpretor& di, Standard_Integer argc, c } // Construction du Geom_Plane GC_MakePlane MkPlane(A,B,C); - Handle(Geom_Plane) theGeomPlane=MkPlane.Value(); + const Handle(Geom_Plane)& theGeomPlane=MkPlane.Value(); // on le display & bind theAISPlaneTri= new AIS_PlaneTrihedron(theGeomPlane ); diff --git a/src/QABugs/QABugs_10.cxx b/src/QABugs/QABugs_10.cxx index 524ef59741..ddb79f56b2 100644 --- a/src/QABugs/QABugs_10.cxx +++ b/src/QABugs/QABugs_10.cxx @@ -391,7 +391,7 @@ static Standard_Integer OCC712 (Draw_Interpretor& di, Standard_Integer argc, con // performTriangulation //======================================================================= -Standard_Integer performTriangulation (TopoDS_Shape aShape, Draw_Interpretor& di) +Standard_Integer performTriangulation (const TopoDS_Shape& aShape, Draw_Interpretor& di) { int failed=0, total=0; TopExp_Explorer ExpFace; @@ -681,7 +681,7 @@ static Standard_Integer OCC825 (Draw_Interpretor& di,Standard_Integer argc, cons Handle(Geom_BezierSurface) BezSurf = new Geom_BezierSurface(poles); Handle(Geom_BSplineSurface) BSpSurf = GeomConvert::SurfaceToBSplineSurface(BezSurf); BRepBuilderAPI_MakeFace faceMaker(BSpSurf, Precision::Confusion()); - TopoDS_Face face = faceMaker.Face(); + const TopoDS_Face& face = faceMaker.Face(); gp_Pnt pnt(0, size, 0); BRepPrimAPI_MakeHalfSpace *hSpace = new BRepPrimAPI_MakeHalfSpace(face,pnt); @@ -893,7 +893,7 @@ static Standard_Integer OCC827 (Draw_Interpretor& di,Standard_Integer argc, cons // performBlend //======================================================================= -int performBlend (TopoDS_Shape aShape, Standard_Real rad, TopoDS_Shape& bShape, Draw_Interpretor& di) +int performBlend (const TopoDS_Shape& aShape, Standard_Real rad, TopoDS_Shape& bShape, Draw_Interpretor& di) { Standard_Integer status = 0; TopoDS_Shape newShape; diff --git a/src/QABugs/QABugs_11.cxx b/src/QABugs/QABugs_11.cxx index ac029f88e9..cd4131b984 100644 --- a/src/QABugs/QABugs_11.cxx +++ b/src/QABugs/QABugs_11.cxx @@ -440,7 +440,7 @@ Standard_Integer OCC157(Draw_Interpretor& di, Handle(Geom_Surface) aSurf = FS.Surface(); BRepBuilderAPI_MakeFace aMakeFace(aSurf,aWire,Standard_True); if(aMakeFace.IsDone()) { - TopoDS_Face aFace = aMakeFace.Face(); + const TopoDS_Face& aFace = aMakeFace.Face(); DBRep::Set(a[1],aFace); } } @@ -569,7 +569,7 @@ static Standard_Integer OCC297 (Draw_Interpretor& di,Standard_Integer /*argc*/, BRepBuilderAPI_MakeWire wire_(edg1_, edg2_, edg3_, edg4_); BRepBuilderAPI_MakeFace face_(wire_); - TopoDS_Face sh_ = face_.Face(); + const TopoDS_Face& sh_ = face_.Face(); int up = 1; @@ -585,7 +585,7 @@ static Standard_Integer OCC297 (Draw_Interpretor& di,Standard_Integer /*argc*/, myAISContext->Display(AISPoint, Standard_True); BRepPrimAPI_MakeHalfSpace half_(sh_, g_pnt); - TopoDS_Solid sol1_ = half_.Solid(); + const TopoDS_Solid& sol1_ = half_.Solid(); DBRep::Set("Face", sol1_); @@ -1551,8 +1551,8 @@ static Standard_Integer OCC909 (Draw_Interpretor& di, Standard_Integer argc, con TopExp_Explorer TE(awire, TopAbs_VERTEX); if ( TE.More()) { BRepTools_WireExplorer WE; - for ( WE.Init(awire,aface); WE.More(); WE.Next()) { - TopoDS_Edge E = WE.Current(); + for ( WE.Init(awire,aface); WE.More(); WE.Next()) + { count++; } } @@ -3885,9 +3885,9 @@ int TestCopyPaste(const Handle(TDocStd_Document)& doc) return 0; } -int TestOpenSave(TCollection_ExtendedString aFile1, - TCollection_ExtendedString aFile2, - TCollection_ExtendedString aFile3) +int TestOpenSave(const TCollection_ExtendedString& aFile1, + const TCollection_ExtendedString& aFile2, + const TCollection_ExtendedString& aFile3) { // Std Handle(TDocStd_Document) doc_std, doc_std_open; @@ -4498,7 +4498,7 @@ static Standard_Integer OCC20627 (Draw_Interpretor& di, Standard_Integer argc, c w.Close(); TopoDS_Wire wireShape( w.Wire()); BRepBuilderAPI_MakeFace faceBuilder(wireShape); - TopoDS_Face f( faceBuilder.Face()); + const TopoDS_Face& f( faceBuilder.Face()); BRepMesh_IncrementalMesh im(f,1); BRepTools::Clean(f); } diff --git a/src/QABugs/QABugs_16.cxx b/src/QABugs/QABugs_16.cxx index 492e2e1436..14dc5f2002 100644 --- a/src/QABugs/QABugs_16.cxx +++ b/src/QABugs/QABugs_16.cxx @@ -320,7 +320,7 @@ static Standard_Integer OCC218bug (Draw_Interpretor& di, Standard_Integer argc, } // Construction du Geom_Plane GC_MakePlane MkPlane(A,B,C); - Handle(Geom_Plane) theGeomPlane=MkPlane.Value(); + const Handle(Geom_Plane)& theGeomPlane=MkPlane.Value(); // on le display & bind theAISPlaneTri= new AIS_PlaneTrihedron(theGeomPlane ); diff --git a/src/QABugs/QABugs_17.cxx b/src/QABugs/QABugs_17.cxx index b46fc24e2a..8960b3c3ec 100644 --- a/src/QABugs/QABugs_17.cxx +++ b/src/QABugs/QABugs_17.cxx @@ -725,7 +725,7 @@ static Standard_Integer OCC606 ( Draw_Interpretor& di, Standard_Integer n, const if (!result_surf1.IsNull()) { BRepBuilderAPI_MakeFace b_face1(result_surf1, Precision::Confusion()); - TopoDS_Face bsp_face1 = b_face1.Face(); + const TopoDS_Face& bsp_face1 = b_face1.Face(); DBRep::Set(a[1],bsp_face1); } } @@ -1053,7 +1053,7 @@ static Standard_Integer OCCN1 (Draw_Interpretor& di, Standard_Integer argc, cons TopoDS_Wire twire = wire.Wire(); BRepBuilderAPI_MakeFace face(twire); - TopoDS_Face tface = face.Face(); + const TopoDS_Face& tface = face.Face(); ////////Handle(AIS_Shape) face_ais = new AIS_Shape( tface ); ////////aContext->Display(face_ais); diff --git a/src/QABugs/QABugs_19.cxx b/src/QABugs/QABugs_19.cxx index 2e0e7fbf1c..c6f3d91c0e 100644 --- a/src/QABugs/QABugs_19.cxx +++ b/src/QABugs/QABugs_19.cxx @@ -96,7 +96,7 @@ static Standard_Integer OCC230 (Draw_Interpretor& di, Standard_Integer argc, con } GCE2d_MakeSegment MakeSegment(P1,P2); - Handle(Geom2d_TrimmedCurve) TrimmedCurve = MakeSegment.Value(); + const Handle(Geom2d_TrimmedCurve)& TrimmedCurve = MakeSegment.Value(); DrawTrSurf::Set(argv[1], TrimmedCurve); return 0; } @@ -1014,7 +1014,7 @@ static Standard_Integer OCC11758 (Draw_Interpretor& di, Standard_Integer n, cons QCOMPARE ( Abs( ea.RealValue() - 0.1 * i ) < 1e-10 , Standard_True ); // TCollection_ExtendedString (const TCollection_ExtendedString& astring) - const TCollection_ExtendedString f(e); + const TCollection_ExtendedString& f(e); //assert( f.Length() == e.Length()); //assert( f == e ); QCOMPARE ( f.Length() , e.Length() ); diff --git a/src/QABugs/QABugs_20.cxx b/src/QABugs/QABugs_20.cxx index b055b1a57d..b5e84f0ed2 100644 --- a/src/QABugs/QABugs_20.cxx +++ b/src/QABugs/QABugs_20.cxx @@ -1992,7 +1992,7 @@ static Standard_Integer OCC26270(Draw_Interpretor& theDI, if (!aRes.IsNull()) { BRepBuilderAPI_MakeFace b_face1(aRes, Precision::Confusion()); - TopoDS_Face bsp_face1 = b_face1.Face(); + const TopoDS_Face& bsp_face1 = b_face1.Face(); DBRep::Set(theArgVal[2], bsp_face1); } } diff --git a/src/QABugs/QABugs_3.cxx b/src/QABugs/QABugs_3.cxx index 4475f851a3..39f3f54185 100644 --- a/src/QABugs/QABugs_3.cxx +++ b/src/QABugs/QABugs_3.cxx @@ -348,7 +348,7 @@ static Standard_Integer BUC60811(Draw_Interpretor& di, Standard_Integer argc, co Handle(Geom_OffsetSurface) offsurf; offsurf = new Geom_OffsetSurface(BZ1, -100); BRepBuilderAPI_MakeFace bzf2( offsurf, Precision::Confusion() ); - TopoDS_Face F2= bzf2.Face(); + const TopoDS_Face& F2= bzf2.Face(); Handle(AIS_Shape) ais22 = new AIS_Shape(F2); aContext->Display (ais22, Standard_False); DBRep::Set("F2",F2); @@ -1223,7 +1223,7 @@ static Standard_Integer BUC60951_(Draw_Interpretor& di, Standard_Integer argc, c shell.Closed (BRep_Tool::IsClosed (shell)); BRepPrimAPI_MakeHalfSpace half(shell, gp_Pnt(0, 0, 20)); - TopoDS_Solid sol = half.Solid(); + const TopoDS_Solid& sol = half.Solid(); gp_Ax2 anAx2(gp_Pnt(-800.0, 0.0, 0), gp_Dir(0, 0, -1)); BRepPrimAPI_MakeCylinder cyl(anAx2, 50, 300); TopoDS_Shape sh = cyl.Shape(); diff --git a/src/QABugs/QABugs_PresentableObject.cxx b/src/QABugs/QABugs_PresentableObject.cxx index 37717fd8dc..fedd0bb242 100644 --- a/src/QABugs/QABugs_PresentableObject.cxx +++ b/src/QABugs/QABugs_PresentableObject.cxx @@ -30,7 +30,7 @@ void QABugs_PresentableObject::Compute(const Handle(PrsMgr_PresentationManager)& const Handle(Prs3d_Presentation)& thePrs, const Standard_Integer theMode) { - Handle(Graphic3d_Structure) aStructure (thePrs); + const Handle(Graphic3d_Structure)& aStructure = thePrs; Handle(Graphic3d_Group) aGroup = aStructure->NewGroup(); Handle(Prs3d_ShadingAspect) anAspect = myDrawer->ShadingAspect(); Graphic3d_MaterialAspect aMat = anAspect->Aspect()->FrontMaterial(); diff --git a/src/QADNaming/QADNaming_ToolsCommands.cxx b/src/QADNaming/QADNaming_ToolsCommands.cxx index aed84fb665..72f344b9b5 100644 --- a/src/QADNaming/QADNaming_ToolsCommands.cxx +++ b/src/QADNaming/QADNaming_ToolsCommands.cxx @@ -125,7 +125,7 @@ static Standard_Integer QADNaming_TCopyShape (Draw_Interpretor& di, DNaming_DataMapIteratorOfDataMapOfShapeOfName itrn(aDMapOfShapeOfName); for(;itrn.More();itrn.Next()) { - TCollection_AsciiString name = itrn.Value(); + const TCollection_AsciiString& name = itrn.Value(); const TopoDS_Shape Result = TR.Copied(itrn.Key()); DBRep::Set(name.ToCString(), Result); di.AppendElement(name.ToCString()); diff --git a/src/RWGltf/RWGltf_Provider.cxx b/src/RWGltf/RWGltf_Provider.cxx index f8a9436c7e..1331011aeb 100644 --- a/src/RWGltf/RWGltf_Provider.cxx +++ b/src/RWGltf/RWGltf_Provider.cxx @@ -26,7 +26,7 @@ namespace // function : SetReaderParameters // purpose : //======================================================================= - static void SetReaderParameters(RWGltf_CafReader& theReader, const Handle(RWGltf_ConfigurationNode) theNode) + static void SetReaderParameters(RWGltf_CafReader& theReader, const Handle(RWGltf_ConfigurationNode)& theNode) { theReader.SetDoublePrecision(!theNode->InternalParameters.ReadSinglePrecision); theReader.SetSystemLengthUnit(theNode->GlobalParameters.LengthUnit / 1000); diff --git a/src/RWStepGeom/RWStepGeom_RWBSplineCurveWithKnotsAndRationalBSplineCurve.cxx b/src/RWStepGeom/RWStepGeom_RWBSplineCurveWithKnotsAndRationalBSplineCurve.cxx index 416b9c86a9..981ce97936 100644 --- a/src/RWStepGeom/RWStepGeom_RWBSplineCurveWithKnotsAndRationalBSplineCurve.cxx +++ b/src/RWStepGeom/RWStepGeom_RWBSplineCurveWithKnotsAndRationalBSplineCurve.cxx @@ -333,7 +333,7 @@ void RWStepGeom_RWBSplineCurveWithKnotsAndRationalBSplineCurve::Check const Interface_ShareTool& aShto, Handle(Interface_Check)& ach) const { - Handle(StepGeom_BSplineCurveWithKnotsAndRationalBSplineCurve) aRationalBSC = ent; + const Handle(StepGeom_BSplineCurveWithKnotsAndRationalBSplineCurve)& aRationalBSC = ent; Handle(StepGeom_BSplineCurveWithKnots) aBSCWK = aRationalBSC->BSplineCurveWithKnots(); RWStepGeom_RWBSplineCurveWithKnots t1; diff --git a/src/RWStepGeom/RWStepGeom_RWBSplineSurfaceWithKnotsAndRationalBSplineSurface.cxx b/src/RWStepGeom/RWStepGeom_RWBSplineSurfaceWithKnotsAndRationalBSplineSurface.cxx index 1e106df80a..1a517949b7 100644 --- a/src/RWStepGeom/RWStepGeom_RWBSplineSurfaceWithKnotsAndRationalBSplineSurface.cxx +++ b/src/RWStepGeom/RWStepGeom_RWBSplineSurfaceWithKnotsAndRationalBSplineSurface.cxx @@ -432,7 +432,7 @@ void RWStepGeom_RWBSplineSurfaceWithKnotsAndRationalBSplineSurface::Check const Interface_ShareTool& aShto, Handle(Interface_Check)& ach) const { - Handle(StepGeom_BSplineSurfaceWithKnotsAndRationalBSplineSurface) aRationalBSS = ent; + const Handle(StepGeom_BSplineSurfaceWithKnotsAndRationalBSplineSurface)& aRationalBSS = ent; Handle(StepGeom_BSplineSurfaceWithKnots) aBSSWK = aRationalBSS->BSplineSurfaceWithKnots(); RWStepGeom_RWBSplineSurfaceWithKnots t1; diff --git a/src/STEPCAFControl/STEPCAFControl_GDTProperty.cxx b/src/STEPCAFControl/STEPCAFControl_GDTProperty.cxx index 86da09c35a..3117ca72b6 100644 --- a/src/STEPCAFControl/STEPCAFControl_GDTProperty.cxx +++ b/src/STEPCAFControl/STEPCAFControl_GDTProperty.cxx @@ -1166,7 +1166,7 @@ Handle(StepDimTol_HArray1OfDatumReferenceModifier) STEPCAFControl_GDTProperty:: GetDatumRefModifiers(const XCAFDimTolObjects_DatumModifiersSequence& theModifiers, const XCAFDimTolObjects_DatumModifWithValue& theModifWithVal, const Standard_Real theValue, - const StepBasic_Unit theUnit) + const StepBasic_Unit& theUnit) { if ((theModifiers.Length() == 0) && (theModifWithVal == XCAFDimTolObjects_DatumModifWithValue_None)) return NULL; @@ -1307,7 +1307,7 @@ Handle(TCollection_HAsciiString) STEPCAFControl_GDTProperty::GetTolValueType(con //function : GetTessellation //purpose : //======================================================================= -Handle(StepVisual_TessellatedGeometricSet) STEPCAFControl_GDTProperty::GetTessellation(const TopoDS_Shape theShape) +Handle(StepVisual_TessellatedGeometricSet) STEPCAFControl_GDTProperty::GetTessellation(const TopoDS_Shape& theShape) { // Build coordinate list and curves NCollection_Handle aCurves = new StepVisual_VectorOfHSequenceOfInteger; diff --git a/src/STEPCAFControl/STEPCAFControl_GDTProperty.hxx b/src/STEPCAFControl/STEPCAFControl_GDTProperty.hxx index 03631c61ca..c685b39edc 100644 --- a/src/STEPCAFControl/STEPCAFControl_GDTProperty.hxx +++ b/src/STEPCAFControl/STEPCAFControl_GDTProperty.hxx @@ -99,9 +99,9 @@ public: Standard_EXPORT static Handle(StepDimTol_HArray1OfDatumReferenceModifier) GetDatumRefModifiers(const XCAFDimTolObjects_DatumModifiersSequence& theModifiers, const XCAFDimTolObjects_DatumModifWithValue& theModifWithVal, const Standard_Real theValue, - const StepBasic_Unit theUnit); + const StepBasic_Unit& theUnit); - Standard_EXPORT static Handle(StepVisual_TessellatedGeometricSet) GetTessellation(const TopoDS_Shape theShape); + Standard_EXPORT static Handle(StepVisual_TessellatedGeometricSet) GetTessellation(const TopoDS_Shape& theShape); }; diff --git a/src/STEPCAFControl/STEPCAFControl_Provider.cxx b/src/STEPCAFControl/STEPCAFControl_Provider.cxx index c7078c397b..6eb2db9feb 100644 --- a/src/STEPCAFControl/STEPCAFControl_Provider.cxx +++ b/src/STEPCAFControl/STEPCAFControl_Provider.cxx @@ -99,7 +99,7 @@ void STEPCAFControl_Provider::initStatic(const Handle(DE_ConfigurationNode)& the // function : setStatic // purpose : //======================================================================= -void STEPCAFControl_Provider::setStatic(const STEPCAFControl_ConfigurationNode::STEPCAFControl_InternalSection theParameter) +void STEPCAFControl_Provider::setStatic(const STEPCAFControl_ConfigurationNode::STEPCAFControl_InternalSection& theParameter) { Interface_Static::SetIVal("read.iges.bspline.continuity", theParameter.ReadBSplineContinuity); Interface_Static::SetIVal("read.precision.mode", theParameter.ReadPrecisionMode); diff --git a/src/STEPCAFControl/STEPCAFControl_Provider.hxx b/src/STEPCAFControl/STEPCAFControl_Provider.hxx index fb468efafa..d7774028b1 100644 --- a/src/STEPCAFControl/STEPCAFControl_Provider.hxx +++ b/src/STEPCAFControl/STEPCAFControl_Provider.hxx @@ -139,7 +139,7 @@ public: void initStatic(const Handle(DE_ConfigurationNode)& theNode); //! Initialize static variables - void setStatic(const STEPCAFControl_ConfigurationNode::STEPCAFControl_InternalSection theParameter); + void setStatic(const STEPCAFControl_ConfigurationNode::STEPCAFControl_InternalSection& theParameter); //! Reset used interface static variables void resetStatic(); diff --git a/src/STEPCAFControl/STEPCAFControl_Reader.cxx b/src/STEPCAFControl/STEPCAFControl_Reader.cxx index 7395804d8f..1460a6a8d0 100644 --- a/src/STEPCAFControl/STEPCAFControl_Reader.cxx +++ b/src/STEPCAFControl/STEPCAFControl_Reader.cxx @@ -781,7 +781,7 @@ TDF_Label STEPCAFControl_Reader::AddShape(const TopoDS_Shape &S, // check whether it has associated external ref TColStd_SequenceOfHAsciiString SHAS; if (ShapePDMap.IsBound(S) && PDFileMap.IsBound(ShapePDMap.Find(S))) { - Handle(STEPCAFControl_ExternFile) EF = PDFileMap.Find(ShapePDMap.Find(S)); + const Handle(STEPCAFControl_ExternFile)& EF = PDFileMap.Find(ShapePDMap.Find(S)); if (!EF.IsNull()) { // (store information on extern refs in the document) SHAS.Append(EF->GetName()); @@ -1231,7 +1231,7 @@ static Standard_Boolean IsOverriden(const Interface_Graph& theGraph, return Standard_True; } // for root style returns true only if it is overridden by other root style - auto anItem = anOverRidingStyle->ItemAP242 ().Value (); + const Handle(Standard_Transient)& anItem = anOverRidingStyle->ItemAP242().Value(); if(!anItem.IsNull() && anItem->IsKind(STANDARD_TYPE(StepShape_ShapeRepresentation))) { return Standard_True; @@ -1315,7 +1315,7 @@ static TDF_Label GetLabelFromPD(const Handle(StepBasic_ProductDefinition) &PD, { TDF_Label L; if (PDFileMap.IsBound(PD)) { - Handle(STEPCAFControl_ExternFile) EF = PDFileMap.Find(PD); + const Handle(STEPCAFControl_ExternFile)& EF = PDFileMap.Find(PD); if (!EF.IsNull()) { L = EF->GetLabel(); if (!L.IsNull()) return L; @@ -1348,7 +1348,7 @@ TDF_Label STEPCAFControl_Reader::FindInstance(const Handle(StepRepr_NextAssembly TDF_Label L; // get shape resulting from CDSR (in fact, only location is interesting) - Handle(Transfer_TransientProcess) TP = Tool.TransientProcess(); + const Handle(Transfer_TransientProcess)& TP = Tool.TransientProcess(); Handle(Transfer_Binder) binder = TP->Find(NAUO); if (binder.IsNull() || !binder->HasResult()) { #ifdef OCCT_DEBUG @@ -1468,7 +1468,7 @@ static TDF_Label GetLabelFromPD(const Handle(StepBasic_ProductDefinition) &PD, { TDF_Label L; if (PDFileMap.IsBound(PD)) { - Handle(STEPCAFControl_ExternFile) EF = PDFileMap.Find(PD); + const Handle(STEPCAFControl_ExternFile)& EF = PDFileMap.Find(PD); if (!EF.IsNull()) { L = EF->GetLabel(); if (!L.IsNull()) return L; @@ -2093,7 +2093,7 @@ Standard_Boolean readPMIPresentation(const Handle(Standard_Transient)& thePresen //function : readAnnotationPlane //purpose : read annotation plane //======================================================================= -Standard_Boolean readAnnotationPlane(const Handle(StepVisual_AnnotationPlane) theAnnotationPlane, +Standard_Boolean readAnnotationPlane(const Handle(StepVisual_AnnotationPlane)& theAnnotationPlane, gp_Ax2& thePlane) { if (theAnnotationPlane.IsNull()) @@ -2239,7 +2239,7 @@ void readAnnotation(const Handle(XSControl_TransferReader)& theTR, //purpose : read connection points for given dimension //======================================================================= void readConnectionPoints(const Handle(XSControl_TransferReader)& theTR, - const Handle(Standard_Transient) theGDT, + const Handle(Standard_Transient)& theGDT, const Handle(XCAFDimTolObjects_DimensionObject)& theDimObject) { if (theGDT.IsNull() || theDimObject.IsNull()) @@ -2252,7 +2252,7 @@ void readConnectionPoints(const Handle(XSControl_TransferReader)& theTR, Handle(StepShape_ShapeDimensionRepresentation) aSDR = NULL; for (Interface_EntityIterator anIt = aGraph.Sharings(theGDT); aSDR.IsNull() && anIt.More(); anIt.Next()) { - Handle(Standard_Transient) anEnt = anIt.Value(); + const Handle(Standard_Transient)& anEnt = anIt.Value(); Handle(StepShape_DimensionalCharacteristicRepresentation) aDCR = Handle(StepShape_DimensionalCharacteristicRepresentation)::DownCast(anEnt); if (!aDCR.IsNull()) @@ -2355,7 +2355,7 @@ static Standard_Boolean ReadDatums(const Handle(XCAFDoc_ShapeTool) &STool, const Interface_Graph &graph, const Handle(Transfer_TransientProcess) &TP, const TDF_Label TolerL, - const Handle(StepDimTol_GeometricToleranceWithDatumReference) GTWDR) + const Handle(StepDimTol_GeometricToleranceWithDatumReference)& GTWDR) { if (GTWDR.IsNull()) return Standard_False; Handle(StepDimTol_HArray1OfDatumReference) HADR = GTWDR->DatumSystem(); @@ -2772,14 +2772,14 @@ Standard_Boolean STEPCAFControl_Reader::readDatumsAP242(const Handle(Standard_Tr Interface_EntityIterator anIter = aGraph.Shareds(theEnt); for (anIter.Start(); anIter.More(); anIter.Next()) { - Handle(Standard_Transient) anAtr = anIter.Value(); + const Handle(Standard_Transient)& anAtr = anIter.Value(); if (anAtr->IsKind(STANDARD_TYPE(StepDimTol_DatumSystem))) { Standard_Integer aPositionCounter = 0;//position on frame Handle(StepDimTol_DatumSystem) aDS = Handle(StepDimTol_DatumSystem)::DownCast(anAtr); Interface_EntityIterator anIterDS = aGraph.Sharings(aDS); for (anIterDS.Start(); anIterDS.More(); anIterDS.Next()) { - Handle(Standard_Transient) anAtrDS = anIterDS.Value(); + const Handle(Standard_Transient)& anAtrDS = anIterDS.Value(); if (anAtrDS->IsKind(STANDARD_TYPE(StepAP242_GeometricItemSpecificUsage))) { //get axis @@ -2957,7 +2957,7 @@ TDF_Label STEPCAFControl_Reader::createGDTObjectInXCAF(const Handle(Standard_Tra // Collect all Shape_Aspect entities Interface_EntityIterator anIter = aGraph.Shareds(theEnt); for (anIter.Start(); anIter.More(); anIter.Next()) { - Handle(Standard_Transient) anAtr = anIter.Value(); + const Handle(Standard_Transient)& anAtr = anIter.Value(); NCollection_Sequence aSAs; if (anAtr->IsKind(STANDARD_TYPE(StepRepr_ProductDefinitionShape))) { @@ -2965,14 +2965,14 @@ TDF_Label STEPCAFControl_Reader::createGDTObjectInXCAF(const Handle(Standard_Tra Interface_EntityIterator anIterSDR = aGraph.Sharings(anAtr); for (anIterSDR.Start(); anIterSDR.More(); anIterSDR.Next()) { - Handle(Standard_Transient) anAtrSDR = anIterSDR.Value(); + const Handle(Standard_Transient)& anAtrSDR = anIterSDR.Value(); if (anAtrSDR->IsKind(STANDARD_TYPE(StepShape_ShapeDefinitionRepresentation))) { isAllOver = Standard_True; Interface_EntityIterator anIterABSR = aGraph.Shareds(anAtrSDR); for (anIterABSR.Start(); anIterABSR.More(); anIterABSR.Next()) { - Handle(Standard_Transient) anAtrABSR = anIterABSR.Value(); + const Handle(Standard_Transient)& anAtrABSR = anIterABSR.Value(); if (anAtrABSR->IsKind(STANDARD_TYPE(StepShape_AdvancedBrepShapeRepresentation))) { aSeqRI1.Append(anAtrABSR); @@ -4416,7 +4416,7 @@ Standard_Boolean STEPCAFControl_Reader::ReadMaterials(const Handle(XSControl_Wor void collectViewShapes(const Handle(XSControl_WorkSession)& theWS, const Handle(TDocStd_Document)& theDoc, - const Handle(StepRepr_Representation) theRepr, + const Handle(StepRepr_Representation)& theRepr, TDF_LabelSequence& theShapes) { Handle(XSControl_TransferReader) aTR = theWS->TransferReader(); @@ -4451,7 +4451,7 @@ void collectViewShapes(const Handle(XSControl_WorkSession)& theWS, //======================================================================= Handle(TCollection_HAsciiString) buildClippingPlanes(const Handle(StepGeom_GeometricRepresentationItem)& theClippingCameraModel, TDF_LabelSequence& theClippingPlanes, - const Handle(XCAFDoc_ClippingPlaneTool) theTool) + const Handle(XCAFDoc_ClippingPlaneTool)& theTool) { Handle(TCollection_HAsciiString) anExpression = new TCollection_HAsciiString(); NCollection_Sequence aPlanes; @@ -4790,7 +4790,7 @@ void STEPCAFControl_Reader::ExpandSubShapes(const Handle(XCAFDoc_ShapeTool)& Sha // topological containers to expand for (Standard_Integer i = 1; i <= aReprItems.Length(); ++i) { - Handle(StepRepr_RepresentationItem) aTRepr = aReprItems.Value(i); + const Handle(StepRepr_RepresentationItem)& aTRepr = aReprItems.Value(i); if (aTRepr->IsKind(STANDARD_TYPE(StepShape_ManifoldSolidBrep))) aMSBSeq.Append(aTRepr); else if (aTRepr->IsKind(STANDARD_TYPE(StepShape_ShellBasedSurfaceModel))) diff --git a/src/STEPCAFControl/STEPCAFControl_Writer.cxx b/src/STEPCAFControl/STEPCAFControl_Writer.cxx index b9c9a2bee7..7dd761e5f5 100644 --- a/src/STEPCAFControl/STEPCAFControl_Writer.cxx +++ b/src/STEPCAFControl/STEPCAFControl_Writer.cxx @@ -318,7 +318,7 @@ IFSelect_ReturnStatus STEPCAFControl_Writer::Write(const Standard_CString theFil for (NCollection_DataMap::Iterator anExtFileIter(myFiles); anExtFileIter.More(); anExtFileIter.Next()) { - Handle(STEPCAFControl_ExternFile) anExtFile = anExtFileIter.Value(); + const Handle(STEPCAFControl_ExternFile)& anExtFile = anExtFileIter.Value(); if (anExtFile->GetWriteStatus() != IFSelect_RetVoid) { continue; @@ -1040,7 +1040,7 @@ static Standard_Boolean setDefaultInstanceColor(const Handle(StepVisual_StyledIt aFatherStyleIter.More(); aFatherStyleIter.Next()) { StepVisual_PresentationStyleSelect aPSS; - StepVisual_PresentationStyleSelect anOlDPSS = aFatherStyleIter.Value(); + const StepVisual_PresentationStyleSelect& anOlDPSS = aFatherStyleIter.Value(); if (!anOlDPSS.PointStyle().IsNull()) aPSS.SetValue(anOlDPSS.PointStyle()); else if (!anOlDPSS.CurveStyle().IsNull()) @@ -1090,7 +1090,7 @@ static void MakeSTEPStyles(STEPConstruct_Styles& theStyles, if (theInherit) aStyle = *theInherit; if (theSettings.Contains(theShape)) { - XCAFPrs_Style anOwnStyle = theSettings.FindFromKey(theShape); + const XCAFPrs_Style& anOwnStyle = theSettings.FindFromKey(theShape); if (!anOwnStyle.IsVisible()) aStyle.SetVisibility(Standard_False); if (anOwnStyle.IsSetColorCurv()) @@ -2315,7 +2315,7 @@ static StepBasic_Unit GetUnit(const Handle(StepRepr_RepresentationContext)& theR //purpose : auxiliary //====================================================================== static Handle(StepRepr_ReprItemAndMeasureWithUnit) CreateDimValue(const Standard_Real theValue, - const StepBasic_Unit theUnit, + const StepBasic_Unit& theUnit, const Handle(TCollection_HAsciiString)& theName, const Standard_CString theMeasureName, const Standard_Boolean theIsAngle, @@ -2375,7 +2375,7 @@ static Handle(StepRepr_ReprItemAndMeasureWithUnit) CreateDimValue(const Standard //======================================================================= Handle(StepRepr_ShapeAspect) STEPCAFControl_Writer::writeShapeAspect(const Handle(XSControl_WorkSession)& theWS, const TDF_Label theLabel, - const TopoDS_Shape theShape, + const TopoDS_Shape& theShape, Handle(StepRepr_RepresentationContext)& theRC, Handle(StepAP242_GeometricItemSpecificUsage)& theGISU) { @@ -2432,7 +2432,7 @@ Handle(StepRepr_ShapeAspect) STEPCAFControl_Writer::writeShapeAspect(const Handl for (Interface_EntityIterator aSharingIter = aGraph.Sharings(aPDS); aSharingIter.More() && aSDR.IsNull(); aSharingIter.Next()) { - Handle(Standard_Transient) anEntity = aSharingIter.Value(); + const Handle(Standard_Transient)& anEntity = aSharingIter.Value(); aSDR = Handle(StepShape_ShapeDefinitionRepresentation)::DownCast(anEntity); } if (aSDR.IsNull()) @@ -2457,7 +2457,7 @@ void STEPCAFControl_Writer::writePresentation(const Handle(XSControl_WorkSession const Standard_Boolean theHasPlane, const gp_Ax2& theAnnotationPlane, const gp_Pnt& theTextPosition, - const Handle(Standard_Transient) theDimension) + const Handle(Standard_Transient)& theDimension) { if (thePresentation.IsNull()) return; @@ -2509,7 +2509,7 @@ void STEPCAFControl_Writer::writePresentation(const Handle(XSControl_WorkSession // Plane Handle(StepGeom_Plane) aPlane = new StepGeom_Plane(); GeomToStep_MakeAxis2Placement3d anAxisMaker(theAnnotationPlane); - Handle(StepGeom_Axis2Placement3d) anAxis = anAxisMaker.Value(); + const Handle(StepGeom_Axis2Placement3d)& anAxis = anAxisMaker.Value(); // Set text position to plane origin Handle(StepGeom_CartesianPoint) aTextPos = new StepGeom_CartesianPoint(); Handle(TColStd_HArray1OfReal) aCoords = new TColStd_HArray1OfReal(1, 3); @@ -2540,7 +2540,7 @@ Handle(StepDimTol_Datum) STEPCAFControl_Writer::writeDatumAP242(const Handle(XSC const TDF_LabelSequence& theShapeL, const TDF_Label& theDatumL, const Standard_Boolean theIsFirstDTarget, - const Handle(StepDimTol_Datum) theWrittenDatum) + const Handle(StepDimTol_Datum)& theWrittenDatum) { // Get working data const Handle(Interface_InterfaceModel)& aModel = theWS->Model(); @@ -2799,14 +2799,14 @@ Handle(StepDimTol_Datum) STEPCAFControl_Writer::writeDatumAP242(const Handle(XSC // qualifiers, modifiers, orientation and tolerance class) //====================================================================== static void WriteDimValues(const Handle(XSControl_WorkSession)& theWS, - const Handle(XCAFDimTolObjects_DimensionObject) theObject, - const Handle(StepRepr_RepresentationContext) theRC, - const StepShape_DimensionalCharacteristic theDimension) + const Handle(XCAFDimTolObjects_DimensionObject)& theObject, + const Handle(StepRepr_RepresentationContext)& theRC, + const StepShape_DimensionalCharacteristic& theDimension) { // Get working data const Handle(Interface_InterfaceModel)& aModel = theWS->Model(); XCAFDimTolObjects_DimensionModifiersSequence aModifiers = theObject->GetModifiers(); - Handle(Standard_Transient) aDim = theDimension.Value(); + const Handle(Standard_Transient)& aDim = theDimension.Value(); Standard_Boolean isAngle = aDim->IsKind(STANDARD_TYPE(StepShape_AngularLocation)) || aDim->IsKind(STANDARD_TYPE(StepShape_AngularSize)); @@ -2929,7 +2929,7 @@ static void WriteDimValues(const Handle(XSControl_WorkSession)& theWS, gp_Dir aDir; theObject->GetDirection(aDir); GeomToStep_MakeCartesianPoint MkPoint(gp_Pnt(0, 0, 0)); - Handle(StepGeom_CartesianPoint) aLoc = MkPoint.Value(); + const Handle(StepGeom_CartesianPoint)& aLoc = MkPoint.Value(); Handle(StepGeom_Direction) anAxis = new StepGeom_Direction(); Handle(TColStd_HArray1OfReal) aCoords = new TColStd_HArray1OfReal(1, 3); aCoords->SetValue(1, aDir.X()); @@ -3022,7 +3022,7 @@ static void WriteDimValues(const Handle(XSControl_WorkSession)& theWS, //====================================================================== static void WriteDerivedGeometry(const Handle(XSControl_WorkSession)& theWS, const Handle(XCAFDimTolObjects_DimensionObject)& theObject, - const Handle(StepRepr_ConstructiveGeometryRepresentation) theRepr, + const Handle(StepRepr_ConstructiveGeometryRepresentation)& theRepr, Handle(StepRepr_ShapeAspect)& theFirstSA, Handle(StepRepr_ShapeAspect)& theSecondSA, NCollection_Vector& thePnts) @@ -3078,8 +3078,8 @@ static void WriteDerivedGeometry(const Handle(XSControl_WorkSession)& theWS, //====================================================================== static Handle(StepDimTol_HArray1OfDatumSystemOrReference) WriteDatumSystem(const Handle(XSControl_WorkSession)& theWS, const TDF_Label theGeomTolL, - const TDF_LabelSequence theDatumSeq, - const STEPConstruct_DataMapOfAsciiStringTransient theDatumMap, + const TDF_LabelSequence& theDatumSeq, + const STEPConstruct_DataMapOfAsciiStringTransient& theDatumMap, const Handle(StepRepr_RepresentationContext)& theRC) { // Get working data diff --git a/src/STEPCAFControl/STEPCAFControl_Writer.hxx b/src/STEPCAFControl/STEPCAFControl_Writer.hxx index 0a6438de7a..f35dafd28b 100644 --- a/src/STEPCAFControl/STEPCAFControl_Writer.hxx +++ b/src/STEPCAFControl/STEPCAFControl_Writer.hxx @@ -237,7 +237,7 @@ protected: Handle(StepRepr_ShapeAspect) writeShapeAspect(const Handle(XSControl_WorkSession)& theWS, const TDF_Label theLabel, - const TopoDS_Shape theShape, + const TopoDS_Shape& theShape, Handle(StepRepr_RepresentationContext)& theRC, Handle(StepAP242_GeometricItemSpecificUsage)& theGISU); @@ -248,13 +248,13 @@ protected: const Standard_Boolean theHasPlane, const gp_Ax2& theAnnotationPlane, const gp_Pnt& theTextPosition, - const Handle(Standard_Transient) theDimension); + const Handle(Standard_Transient)& theDimension); Handle(StepDimTol_Datum) writeDatumAP242(const Handle(XSControl_WorkSession)& theWS, const TDF_LabelSequence& theShapeL, const TDF_Label& theDatumL, const Standard_Boolean isFirstDTarget, - const Handle(StepDimTol_Datum) theWrittenDatum); + const Handle(StepDimTol_Datum)& theWrittenDatum); void writeToleranceZone(const Handle(XSControl_WorkSession)& theWS, const Handle(XCAFDimTolObjects_GeomToleranceObject)& theObject, diff --git a/src/STEPConstruct/STEPConstruct_Assembly.cxx b/src/STEPConstruct/STEPConstruct_Assembly.cxx index b6e180155e..3fe626dabc 100644 --- a/src/STEPConstruct/STEPConstruct_Assembly.cxx +++ b/src/STEPConstruct/STEPConstruct_Assembly.cxx @@ -195,7 +195,7 @@ Standard_Boolean STEPConstruct_Assembly::CheckSRRReversesNAUO(const Interface_Gr Handle(Standard_Type) tSDR = STANDARD_TYPE(StepShape_ShapeDefinitionRepresentation); Interface_EntityIterator anIter = theGraph.Sharings(rep1); for (; anIter.More() && pd1.IsNull(); anIter.Next()) { - Handle(Standard_Transient) enti = anIter.Value(); + const Handle(Standard_Transient)& enti = anIter.Value(); if (enti->DynamicType() == tSDR) { Handle(StepShape_ShapeDefinitionRepresentation) SDR = Handle(StepShape_ShapeDefinitionRepresentation)::DownCast(enti); @@ -206,7 +206,7 @@ Standard_Boolean STEPConstruct_Assembly::CheckSRRReversesNAUO(const Interface_Gr anIter = theGraph.Sharings(rep2); for (; anIter.More() && pd2.IsNull(); anIter.Next()) { - Handle(Standard_Transient) enti = anIter.Value(); + const Handle(Standard_Transient)& enti = anIter.Value(); if (enti->DynamicType() == tSDR) { Handle(StepShape_ShapeDefinitionRepresentation) SDR = Handle(StepShape_ShapeDefinitionRepresentation)::DownCast(enti); diff --git a/src/STEPConstruct/STEPConstruct_ExternRefs.cxx b/src/STEPConstruct/STEPConstruct_ExternRefs.cxx index c8624171d4..66f63ad566 100644 --- a/src/STEPConstruct/STEPConstruct_ExternRefs.cxx +++ b/src/STEPConstruct/STEPConstruct_ExternRefs.cxx @@ -229,7 +229,7 @@ Standard_Boolean STEPConstruct_ExternRefs::LoadExternRefs () // for each DocumentFile, find associated with it data: Interface_EntityIterator subs = Graph().Sharings(DocFile); for (subs.Start(); subs.More(); subs.Next()) { - Handle(Standard_Transient) sub = subs.Value(); + const Handle(Standard_Transient)& sub = subs.Value(); // FORMAT - ??????? // @@ -659,7 +659,7 @@ Standard_Integer STEPConstruct_ExternRefs::AddExternRef (const Standard_CString // Handle(Standard_Transient) sub = subs.Value(); Interface_EntityIterator subs = Graph().Sharings(PD); for (subs.Start(); subs.More(); subs.Next()) { - Handle(Standard_Transient) sub = subs.Value(); + const Handle(Standard_Transient)& sub = subs.Value(); if (!sub->IsKind(STANDARD_TYPE(StepRepr_ProductDefinitionShape))) continue; Handle(StepRepr_ProductDefinitionShape) ProdDefSh = Handle(StepRepr_ProductDefinitionShape)::DownCast ( sub ); @@ -682,7 +682,7 @@ Standard_Integer STEPConstruct_ExternRefs::AddExternRef (const Standard_CString // Interface_EntityIterator subs2 = Graph().Sharings(ProdDef); Interface_EntityIterator subs2 = Graph().Sharings(PD); for (subs2.Start(); subs2.More(); subs2.Next()) { - Handle(Standard_Transient) sub2 = subs2.Value(); + const Handle(Standard_Transient)& sub2 = subs2.Value(); if (sub2->IsKind(STANDARD_TYPE(StepRepr_NextAssemblyUsageOccurrence))) { Handle(StepRepr_NextAssemblyUsageOccurrence) NAUO = diff --git a/src/STEPControl/STEPControl_ActorRead.cxx b/src/STEPControl/STEPControl_ActorRead.cxx index 2abe2e3a73..a3f81219fb 100644 --- a/src/STEPControl/STEPControl_ActorRead.cxx +++ b/src/STEPControl/STEPControl_ActorRead.cxx @@ -589,7 +589,7 @@ static void getSDR(const Handle(StepRepr_ProductDefinitionShape)& PDS, TopoDS_Iterator it(Result1); for ( ; it.More(); it.Next() ) { - TopoDS_Shape aSubShape = it.Value(); + const TopoDS_Shape& aSubShape = it.Value(); B.Add(Cund, aSubShape); } } @@ -639,7 +639,7 @@ static void getSDR(const Handle(StepRepr_ProductDefinitionShape)& PDS, TopoDS_Iterator it(Result1); for ( ; it.More(); it.Next() ) { - TopoDS_Shape aSubShape = it.Value(); + const TopoDS_Shape& aSubShape = it.Value(); B.Add(Cund, aSubShape); } } @@ -657,7 +657,7 @@ static void getSDR(const Handle(StepRepr_ProductDefinitionShape)& PDS, Interface_EntityIterator subs1 = graph.Sharings(rep); Handle(Standard_Type) tSRR = STANDARD_TYPE(StepRepr_ShapeRepresentationRelationship); for (subs1.Start(); subs1.More(); subs1.Next()) { - Handle(Standard_Transient) anitem = subs1.Value(); + const Handle(Standard_Transient)& anitem = subs1.Value(); if( !anitem->IsKind(STANDARD_TYPE(StepRepr_RepresentationRelationship))) continue; if (anitem->DynamicType() == tSRR) @@ -991,7 +991,7 @@ Handle(TransferBRep_ShapeBinder) STEPControl_ActorRead::TransferEntity( // Put not suspected open Shells as they are (updated 23.11.2010) TopExp_Explorer allShellsExp(comp, TopAbs_SHELL); for ( ; allShellsExp.More(); allShellsExp.Next() ) { - TopoDS_Shape aCurrentShell = allShellsExp.Current(); + const TopoDS_Shape& aCurrentShell = allShellsExp.Current(); if ( !myNMTool.IsPureNMShell(aCurrentShell) && !shellClosingsMap.Contains(aCurrentShell) ) brepBuilder.Add(compWithClosings, aCurrentShell); } @@ -1005,7 +1005,7 @@ Handle(TransferBRep_ShapeBinder) STEPControl_ActorRead::TransferEntity( TopExp_Explorer exp(comp, TopAbs_SHELL); for (; exp.More(); exp.Next()) { - TopoDS_Shape aSubShape = exp.Current(); + const TopoDS_Shape& aSubShape = exp.Current(); if (aSubShape.ShapeType() == TopAbs_SHELL && aSubShape.Closed()) { TopoDS_Solid nextSolid; brepBuilder.MakeSolid(nextSolid); @@ -1348,7 +1348,7 @@ Handle(TransferBRep_ShapeBinder) STEPControl_ActorRead::OldWay for (subs.Start(); subs.More() && PS.More(); subs.Next()) { Message_ProgressRange aRange = PS.Next(); - Handle(Standard_Transient) anitem = subs.Value(); + const Handle(Standard_Transient)& anitem = subs.Value(); if ( anitem->DynamicType() != tCDSR && anitem->DynamicType() != tSRR ) continue; // DeclareAndCast(StepShape_ContextDependentShapeRepresentation,anitem,subs.Value()); // if (anitem.IsNull()) continue; @@ -2026,12 +2026,12 @@ void STEPControl_ActorRead::computeIDEASClosings(const TopoDS_Compound& comp, TopExp_Explorer shellExpA(comp, TopAbs_SHELL); for ( ; shellExpA.More(); shellExpA.Next() ) { - TopoDS_Shape shellA = shellExpA.Current(); + const TopoDS_Shape& shellA = shellExpA.Current(); TopExp_Explorer shellExpB(comp, TopAbs_SHELL); TopTools_ListOfShape closingShells; for ( ; shellExpB.More(); shellExpB.Next() ) { - TopoDS_Shape shellB = shellExpB.Current(); + const TopoDS_Shape& shellB = shellExpB.Current(); if ( shellA.IsSame(shellB) ) continue; // Check whether ShellB is non-manifold and adjacent to ShellA. diff --git a/src/STEPControl/STEPControl_ActorWrite.cxx b/src/STEPControl/STEPControl_ActorWrite.cxx index 3caee36941..e7e576ba64 100644 --- a/src/STEPControl/STEPControl_ActorWrite.cxx +++ b/src/STEPControl/STEPControl_ActorWrite.cxx @@ -228,7 +228,7 @@ static Standard_Boolean IsManifoldShape(const TopoDS_Shape& theShape) { TopoDS_Iterator anIt(theShape); for ( ; anIt.More(); anIt.Next() ) { - TopoDS_Shape aDirectChild = anIt.Value(); + const TopoDS_Shape& aDirectChild = anIt.Value(); if (aDirectChild.ShapeType() != TopAbs_COMPOUND) aBrepBuilder.Add(aDirectShapes, aDirectChild); } @@ -791,7 +791,7 @@ Handle(Transfer_Binder) STEPControl_ActorWrite::TransferShape // Transfer Solids to closed Shells. Prepare RepItemSeq & NonManifoldGroup for ( TopoDS_Iterator iter(aNMCompound); iter.More(); iter.Next() ) { - TopoDS_Shape aSubShape = iter.Value(); + const TopoDS_Shape& aSubShape = iter.Value(); if (aSubShape.ShapeType() == TopAbs_SOLID) { for ( TopoDS_Iterator aSubIter(aSubShape); aSubIter.More(); aSubIter.Next() ) { TopoDS_Shell aSubShell = TopoDS::Shell( aSubIter.Value() ); @@ -1191,7 +1191,7 @@ Handle(Transfer_Binder) STEPControl_ActorWrite::TransferShape aGCSet->SetName(empty); // iterates on compound with vertices and traces each vertex for ( anExp.ReInit() ; anExp.More(); anExp.Next() ) { - TopoDS_Shape aVertex = anExp.Current(); + const TopoDS_Shape& aVertex = anExp.Current(); if ( aVertex.ShapeType() != TopAbs_VERTEX ) continue; curNb++; @@ -1483,7 +1483,7 @@ Handle(Transfer_Binder) STEPControl_ActorWrite::TransferCompound #endif for (TopoDS_Iterator iter(theShape); iter.More(); iter.Next()) { - TopoDS_Shape aSubShape = iter.Value(); + const TopoDS_Shape& aSubShape = iter.Value(); if (aSubShape.ShapeType() != TopAbs_VERTEX || !isSeparateVertices) { // Store non-manifold topology as shells (ssv; 10.11.2010) @@ -1597,7 +1597,7 @@ Handle(Transfer_Binder) STEPControl_ActorWrite::TransferSubShape gp_Trsf aLoc; Standard_Boolean isShapeLocated = Standard_False; if ( GroupMode() >0) { - TopLoc_Location shloc = shape.Location(); + const TopLoc_Location& shloc = shape.Location(); isShapeLocated = !shloc.IsIdentity(); aLoc = shloc.Transformation(); TopLoc_Location shident; @@ -1643,7 +1643,7 @@ Handle(Transfer_Binder) STEPControl_ActorWrite::TransferSubShape // make location for assembly placement GeomToStep_MakeAxis2Placement3d mkax (aLoc); - Handle(StepGeom_Axis2Placement3d) AxLoc = mkax.Value(); + const Handle(StepGeom_Axis2Placement3d)& AxLoc = mkax.Value(); AX1 = AxLoc; // create assembly structures (CDSR, NAUO etc.) diff --git a/src/STEPSelections/STEPSelections_Counter.cxx b/src/STEPSelections/STEPSelections_Counter.cxx index 9fe036fb75..1ad2668a85 100644 --- a/src/STEPSelections/STEPSelections_Counter.cxx +++ b/src/STEPSelections/STEPSelections_Counter.cxx @@ -137,7 +137,7 @@ void STEPSelections_Counter::Count(const Interface_Graph& graph, Standard_Integer nbElem = gs->NbElements(); for (Standard_Integer i = 1; i <= nbElem ; i++) { StepShape_GeometricSetSelect aGSS = gs->ElementsValue(i); - Handle(Standard_Transient) ent = aGSS.Value(); + const Handle(Standard_Transient)& ent = aGSS.Value(); Handle(StepGeom_CompositeCurve) ccurve = Handle(StepGeom_CompositeCurve)::DownCast(ent); if(!ccurve.IsNull()) { myNbWires++; diff --git a/src/SWDRAW/SWDRAW.cxx b/src/SWDRAW/SWDRAW.cxx index f60bc0e90e..0b7878dc1b 100644 --- a/src/SWDRAW/SWDRAW.cxx +++ b/src/SWDRAW/SWDRAW.cxx @@ -94,7 +94,7 @@ static Standard_Integer LocDump (Draw_Interpretor& di, Standard_Integer argc, co return 1; } - TopLoc_Location L = a.Location(); + const TopLoc_Location& L = a.Location(); di << "Location of shape " << argv[1] << ":\n"; di << "Results in:\n"; gp_Trsf T = L.Transformation(); diff --git a/src/SelectMgr/SelectMgr_SelectableObjectSet.cxx b/src/SelectMgr/SelectMgr_SelectableObjectSet.cxx index 8739f8c289..89fb16e790 100644 --- a/src/SelectMgr/SelectMgr_SelectableObjectSet.cxx +++ b/src/SelectMgr/SelectMgr_SelectableObjectSet.cxx @@ -88,7 +88,7 @@ namespace } private: - BVHBuilderAdaptorRegular& operator=(BVHBuilderAdaptorRegular) { return *this; } + BVHBuilderAdaptorRegular& operator=(const BVHBuilderAdaptorRegular&) { return *this; } private: ObjectsMap& myObjects; @@ -223,7 +223,7 @@ namespace } private: - BVHBuilderAdaptorPersistent& operator=(BVHBuilderAdaptorPersistent) { return *this; } + BVHBuilderAdaptorPersistent& operator=(const BVHBuilderAdaptorPersistent&) { return *this; } private: ObjectsMap& myObjects; diff --git a/src/SelectMgr/SelectMgr_SelectingVolumeManager.cxx b/src/SelectMgr/SelectMgr_SelectingVolumeManager.cxx index df3159d98f..d33ea30427 100644 --- a/src/SelectMgr/SelectMgr_SelectingVolumeManager.cxx +++ b/src/SelectMgr/SelectMgr_SelectingVolumeManager.cxx @@ -98,7 +98,7 @@ const Handle(Graphic3d_Camera)& SelectMgr_SelectingVolumeManager::Camera() const // function : SetCamera // purpose : //======================================================================= -void SelectMgr_SelectingVolumeManager::SetCamera (const Handle(Graphic3d_Camera) theCamera) +void SelectMgr_SelectingVolumeManager::SetCamera (const Handle(Graphic3d_Camera)& theCamera) { Standard_ASSERT_RAISE(!myActiveSelectingVolume.IsNull(), "SelectMgr_SelectingVolumeManager::SetCamera() should be called after initialization of selection volume "); diff --git a/src/SelectMgr/SelectMgr_SelectingVolumeManager.hxx b/src/SelectMgr/SelectMgr_SelectingVolumeManager.hxx index 708e7a885f..aed25cd94a 100644 --- a/src/SelectMgr/SelectMgr_SelectingVolumeManager.hxx +++ b/src/SelectMgr/SelectMgr_SelectingVolumeManager.hxx @@ -89,7 +89,7 @@ public: //! Updates camera projection and orientation matrices in all selecting volumes //! Note: this method should be called after selection volume building //! else exception will be thrown - Standard_EXPORT void SetCamera (const Handle(Graphic3d_Camera) theCamera); + Standard_EXPORT void SetCamera (const Handle(Graphic3d_Camera)& theCamera); //! Updates viewport in all selecting volumes //! Note: this method should be called after selection volume building diff --git a/src/SelectMgr/SelectMgr_ViewerSelector.cxx b/src/SelectMgr/SelectMgr_ViewerSelector.cxx index 5f86073410..4370d4cee0 100644 --- a/src/SelectMgr/SelectMgr_ViewerSelector.cxx +++ b/src/SelectMgr/SelectMgr_ViewerSelector.cxx @@ -1044,7 +1044,6 @@ void SelectMgr_ViewerSelector::MoveSelectableObject (const Handle(SelectMgr_Sele //======================================================================= void SelectMgr_ViewerSelector::RemoveSelectableObject (const Handle(SelectMgr_SelectableObject)& theObject) { - Handle(SelectMgr_SelectableObject) anObj = theObject; if (myMapOfObjectSensitives.UnBind (theObject)) { RemovePicked (theObject); diff --git a/src/ShapeAnalysis/ShapeAnalysis_FreeBoundsProperties.cxx b/src/ShapeAnalysis/ShapeAnalysis_FreeBoundsProperties.cxx index c176ed0d1c..8ffc86183f 100644 --- a/src/ShapeAnalysis/ShapeAnalysis_FreeBoundsProperties.cxx +++ b/src/ShapeAnalysis/ShapeAnalysis_FreeBoundsProperties.cxx @@ -39,7 +39,7 @@ #define NbControl 23 -static void ContourProperties(TopoDS_Wire wire, +static void ContourProperties(const TopoDS_Wire& wire, Standard_Real& countourArea, Standard_Real& countourLength) { @@ -49,8 +49,9 @@ static void ContourProperties(TopoDS_Wire wire, gp_XYZ prev, cont; for (BRepTools_WireExplorer exp(wire); exp.More(); exp.Next()) { - TopoDS_Edge Edge = exp.Current(); nbe++; - + const TopoDS_Edge& Edge = exp.Current(); + nbe++; + Standard_Real First, Last; Handle(Geom_Curve) c3d; ShapeAnalysis_Edge sae; diff --git a/src/ShapeAnalysis/ShapeAnalysis_Shell.cxx b/src/ShapeAnalysis/ShapeAnalysis_Shell.cxx index 344be5a6e1..2c5916df51 100644 --- a/src/ShapeAnalysis/ShapeAnalysis_Shell.cxx +++ b/src/ShapeAnalysis/ShapeAnalysis_Shell.cxx @@ -56,7 +56,7 @@ void ShapeAnalysis_Shell::Clear() if (shape.ShapeType() == TopAbs_SHELL) myShells.Add (shape); //szv#4:S4163:12Mar99 i = else { for (TopExp_Explorer exs (shape,TopAbs_SHELL); exs.More(); exs.Next()) { - TopoDS_Shape sh = exs.Current(); + const TopoDS_Shape& sh = exs.Current(); myShells.Add (sh); //szv#4:S4163:12Mar99 i = } } @@ -120,7 +120,7 @@ Standard_Boolean ShapeAnalysis_Shell::CheckOrientedShells(const TopoDS_Shape& sh TopTools_IndexedMapOfShape dirs, revs, ints; for (TopExp_Explorer exs(shape,TopAbs_SHELL); exs.More(); exs.Next()) { - TopoDS_Shape sh = exs.Current(); + const TopoDS_Shape& sh = exs.Current(); //szv#4:S4163:12Mar99 optimized if (CheckEdges (sh,myBad,dirs,revs,ints)) if (myShells.Add (sh)) res = Standard_True; @@ -134,7 +134,7 @@ Standard_Boolean ShapeAnalysis_Shell::CheckOrientedShells(const TopoDS_Shape& sh Standard_Integer nb = dirs.Extent(); Standard_Integer i; // svv Jan11 2000 : porting on DEC for (i = 1; i <= nb; i ++) { - TopoDS_Shape sh = dirs.FindKey (i); + const TopoDS_Shape& sh = dirs.FindKey (i); if (!myBad.Contains(sh)) { if (!revs.Contains(sh)) { if(checkinternaledges) { @@ -154,7 +154,7 @@ Standard_Boolean ShapeAnalysis_Shell::CheckOrientedShells(const TopoDS_Shape& sh nb = revs.Extent(); for (i = 1; i <= nb; i ++) { - TopoDS_Shape sh = revs.FindKey (i); + const TopoDS_Shape& sh = revs.FindKey (i); if (!myBad.Contains(sh)) { if (!dirs.Contains(sh)) { if(checkinternaledges) { diff --git a/src/ShapeAnalysis/ShapeAnalysis_TransferParametersProj.cxx b/src/ShapeAnalysis/ShapeAnalysis_TransferParametersProj.cxx index 326c062a1e..e655fd5b0f 100644 --- a/src/ShapeAnalysis/ShapeAnalysis_TransferParametersProj.cxx +++ b/src/ShapeAnalysis/ShapeAnalysis_TransferParametersProj.cxx @@ -231,7 +231,7 @@ Standard_Real ShapeAnalysis_TransferParametersProj::Perform(const Standard_Real //function : CorrectParameter //purpose : auxiliary //======================================================================= -static Standard_Real CorrectParameter(const Handle(Geom2d_Curve) crv, +static Standard_Real CorrectParameter(const Handle(Geom2d_Curve)& crv, const Standard_Real param) { if(crv->IsKind(STANDARD_TYPE(Geom2d_TrimmedCurve))) { @@ -580,7 +580,7 @@ TopoDS_Vertex ShapeAnalysis_TransferParametersProj::CopyNMVertex (const TopoDS_V //update tolerance Standard_Boolean needUpdate = Standard_False; gp_Pnt aPV = (*((Handle(BRep_TVertex)*)&anewV.TShape()))->Pnt(); - TopLoc_Location toLoc = toedge.Location(); + const TopLoc_Location& toLoc = toedge.Location(); BRep_ListIteratorOfListOfCurveRepresentation toitcr ((*((Handle(BRep_TEdge)*)&toedge.TShape()))->ChangeCurves()); diff --git a/src/ShapeBuild/ShapeBuild_Edge.cxx b/src/ShapeBuild/ShapeBuild_Edge.cxx index 34b2d5ff52..b731950da0 100644 --- a/src/ShapeBuild/ShapeBuild_Edge.cxx +++ b/src/ShapeBuild/ShapeBuild_Edge.cxx @@ -288,8 +288,8 @@ void ShapeBuild_Edge::SetRange3d (const TopoDS_Edge& edge, void ShapeBuild_Edge::CopyPCurves (const TopoDS_Edge& toedge, const TopoDS_Edge& fromedge) const { - TopLoc_Location fromLoc = fromedge.Location(); - TopLoc_Location toLoc = toedge.Location(); + const TopLoc_Location& fromLoc = fromedge.Location(); + const TopLoc_Location& toLoc = toedge.Location(); for (BRep_ListIteratorOfListOfCurveRepresentation fromitcr ((*((Handle(BRep_TEdge)*)&fromedge.TShape()))->ChangeCurves()); fromitcr.More(); fromitcr.Next()) { Handle(BRep_GCurve) fromGC = Handle(BRep_GCurve)::DownCast(fromitcr.Value()); diff --git a/src/ShapeBuild/ShapeBuild_ReShape.cxx b/src/ShapeBuild/ShapeBuild_ReShape.cxx index 89b9d69223..1745e74488 100644 --- a/src/ShapeBuild/ShapeBuild_ReShape.cxx +++ b/src/ShapeBuild/ShapeBuild_ReShape.cxx @@ -59,7 +59,7 @@ TopoDS_Shape ShapeBuild_ReShape::Apply (const TopoDS_Shape& shape, TopoDS_Compound C; B.MakeCompound (C); for (TopoDS_Iterator it (shape); it.More(); it.Next()) { - TopoDS_Shape sh = it.Value(); + const TopoDS_Shape& sh = it.Value(); Standard_Integer stat = Status (sh,newsh,Standard_False); if (stat != 0) modif = 1; if (stat >= 0) B.Add (C,newsh); @@ -75,7 +75,7 @@ TopoDS_Shape ShapeBuild_ReShape::Apply (const TopoDS_Shape& shape, TopoDS_Solid S; B.MakeSolid (S); for (TopoDS_Iterator it (shape); it.More(); it.Next()) { - TopoDS_Shape sh = it.Value(); + const TopoDS_Shape& sh = it.Value(); newsh = Apply (sh,until,buildmode); if (newsh.IsNull()) { modif = -1; @@ -83,7 +83,7 @@ TopoDS_Shape ShapeBuild_ReShape::Apply (const TopoDS_Shape& shape, else if (newsh.ShapeType() != TopAbs_SHELL) { Standard_Integer nbsub = 0; for (TopExp_Explorer exh(newsh,TopAbs_SHELL); exh.More(); exh.Next()) { - TopoDS_Shape onesh = exh.Current (); + const TopoDS_Shape& onesh = exh.Current (); B.Add (S,onesh); nbsub ++; } @@ -110,7 +110,7 @@ TopoDS_Shape ShapeBuild_ReShape::Apply (const TopoDS_Shape& shape, TopoDS_Shell S; B.MakeShell (S); for (TopoDS_Iterator it (shape); it.More(); it.Next()) { - TopoDS_Shape sh = it.Value(); + const TopoDS_Shape& sh = it.Value(); newsh = Apply (sh,until,buildmode); if (newsh.IsNull()) { modif = -1; @@ -118,7 +118,7 @@ TopoDS_Shape ShapeBuild_ReShape::Apply (const TopoDS_Shape& shape, else if (newsh.ShapeType() != TopAbs_FACE) { Standard_Integer nbsub = 0; for (TopExp_Explorer exf(newsh,TopAbs_FACE); exf.More(); exf.Next()) { - TopoDS_Shape onesh = exf.Current (); + const TopoDS_Shape& onesh = exf.Current (); B.Add (S,onesh); nbsub ++; } @@ -189,7 +189,7 @@ TopoDS_Shape ShapeBuild_ReShape::Apply (const TopoDS_Shape& shape, // apply recorded modifications to subshapes for ( TopoDS_Iterator it(shape,Standard_False); it.More(); it.Next() ) { - TopoDS_Shape sh = it.Value(); + const TopoDS_Shape& sh = it.Value(); newsh = Apply ( sh, until ); if ( newsh != sh ) { if ( ShapeExtend::DecodeStatus ( myStatus, ShapeExtend_DONE4 ) ) @@ -207,7 +207,7 @@ TopoDS_Shape ShapeBuild_ReShape::Apply (const TopoDS_Shape& shape, } Standard_Integer nitems = 0; for ( TopoDS_Iterator subit(newsh); subit.More(); subit.Next(), nitems++ ) { - TopoDS_Shape subsh = subit.Value(); + const TopoDS_Shape& subsh = subit.Value(); if ( subsh.ShapeType() == sh.ShapeType() ) B.Add ( result, subsh ); else locStatus |= ShapeExtend::EncodeStatus ( ShapeExtend_FAIL1 ); } diff --git a/src/ShapeConstruct/ShapeConstruct_ProjectCurveOnSurface.cxx b/src/ShapeConstruct/ShapeConstruct_ProjectCurveOnSurface.cxx index d37d601ac7..db1e6bedd5 100644 --- a/src/ShapeConstruct/ShapeConstruct_ProjectCurveOnSurface.cxx +++ b/src/ShapeConstruct/ShapeConstruct_ProjectCurveOnSurface.cxx @@ -1513,7 +1513,7 @@ Handle(Geom2d_Curve) ShapeConstruct_ProjectCurveOnSurface::ApproximatePCurve(con } GeomAPI_PointsToBSpline appr(points3d, params->Array1(), 1, 10, GeomAbs_C1, theTolerance2d); - Handle(Geom_BSplineCurve) crv3d = appr.Curve(); + const Handle(Geom_BSplineCurve)& crv3d = appr.Curve(); Standard_Integer NbPoles = crv3d->NbPoles(); TColgp_Array1OfPnt poles3d (1, NbPoles); TColgp_Array1OfPnt2d poles2d (1, NbPoles); diff --git a/src/ShapeExtend/ShapeExtend_Explorer.cxx b/src/ShapeExtend/ShapeExtend_Explorer.cxx index 97a99eed4b..ab5b8d0749 100644 --- a/src/ShapeExtend/ShapeExtend_Explorer.cxx +++ b/src/ShapeExtend/ShapeExtend_Explorer.cxx @@ -56,7 +56,7 @@ static void FillList (const Handle(TopTools_HSequenceOfShape)& list, const TopoDS_Shape& comp, const Standard_Boolean expcomp) { for (TopoDS_Iterator it (comp); it.More(); it.Next()) { - TopoDS_Shape sub = it.Value(); + const TopoDS_Shape& sub = it.Value(); if (sub.ShapeType() != TopAbs_COMPOUND) list->Append (sub); else if (!expcomp) list->Append (sub); else FillList (list,sub,expcomp); @@ -118,7 +118,7 @@ TopAbs_ShapeEnum ShapeExtend_Explorer::ShapeType (const TopoDS_Shape& shape, if (!compound || res != TopAbs_COMPOUND) return res; res = TopAbs_SHAPE; for (TopoDS_Iterator iter(shape); iter.More(); iter.Next()) { - TopoDS_Shape sh = iter.Value(); + const TopoDS_Shape& sh = iter.Value(); if (sh.IsNull()) continue; TopAbs_ShapeEnum typ = sh.ShapeType(); if (typ == TopAbs_COMPOUND) typ = ShapeType (sh,compound); diff --git a/src/ShapeFix/ShapeFix.cxx b/src/ShapeFix/ShapeFix.cxx index 6f710fac39..cd16f3251a 100644 --- a/src/ShapeFix/ShapeFix.cxx +++ b/src/ShapeFix/ShapeFix.cxx @@ -356,7 +356,7 @@ static Standard_Real getNearPoint(const TColgp_SequenceOfPnt& aSeq1, //purpose : auxiliary for FixVertexPosition //======================================================================= static Standard_Boolean getNearestEdges(TopTools_ListOfShape& theLEdges, - const TopoDS_Vertex theVert, + const TopoDS_Vertex& theVert, TopTools_SequenceOfShape& theSuitEdges, TopTools_SequenceOfShape& theRejectEdges, const Standard_Real theTolerance, @@ -505,7 +505,7 @@ Standard_Boolean ShapeFix::FixVertexPosition(TopoDS_Shape& theshape, Standard_Integer nV =1; TopoDS_Iterator aExp3(aExp1.Current()); for( ; aExp3.More(); aExp3.Next(),nV++) { - TopoDS_Shape aVert = aExp3.Value(); + const TopoDS_Shape& aVert = aExp3.Value(); if(nV ==1) aVert1 = aVert; else if(aVert1.IsSame(aVert)) diff --git a/src/ShapeFix/ShapeFix_ComposeShell.cxx b/src/ShapeFix/ShapeFix_ComposeShell.cxx index af2f722c34..2e5e826560 100644 --- a/src/ShapeFix/ShapeFix_ComposeShell.cxx +++ b/src/ShapeFix/ShapeFix_ComposeShell.cxx @@ -721,7 +721,7 @@ Standard_Integer ShapeFix_ComposeShell::ComputeCode (const Handle(ShapeExtend_Wi // After applying context to (seam) edge, distribute its indices on new edges, // according to their parameters on that edge static void DistributeSplitPoints (const Handle(ShapeExtend_WireData) &sbwd, - const TopoDS_Face myFace, + const TopoDS_Face& myFace, const Standard_Integer index, const Standard_Integer nsplit, TColStd_SequenceOfInteger& indexes, @@ -785,7 +785,7 @@ static void DefinePatch (ShapeFix_WireSegment &wire, const Standard_Integer code //function : GetGridResolution //purpose : auxiliary //======================================================================= -static Standard_Real GetGridResolution(const Handle(TColStd_HArray1OfReal) SplitValues, +static Standard_Real GetGridResolution(const Handle(TColStd_HArray1OfReal)& SplitValues, const Standard_Integer cutIndex) { Standard_Integer nb = SplitValues->Length(); @@ -1869,7 +1869,7 @@ void ShapeFix_ComposeShell::BreakWires (ShapeFix_SequenceOfWireSegment &seqw) ShapeFix_WireSegment wire = seqw(i); if(wire.IsVertex()) continue; - Handle(ShapeExtend_WireData) sbwd = wire.WireData(); + const Handle(ShapeExtend_WireData)& sbwd = wire.WireData(); // find first vertex for split Standard_Integer j; // svv #1 @@ -1933,7 +1933,7 @@ void ShapeFix_ComposeShell::BreakWires (ShapeFix_SequenceOfWireSegment &seqw) // -1 - short in 3d but not in 2d (to be checked after algo and atteching to // another wire if alone) static Standard_Integer IsShortSegment (const ShapeFix_WireSegment &seg, - const TopoDS_Face myFace, + const TopoDS_Face& myFace, const Handle(Geom_Surface)& myGrid, const TopLoc_Location &myLoc, const Standard_Real UResolution, @@ -1948,7 +1948,7 @@ static Standard_Integer IsShortSegment (const ShapeFix_WireSegment &seg, Standard_Integer code = 1; ShapeAnalysis_Edge sae; - Handle(ShapeExtend_WireData) sbwd = seg.WireData(); + const Handle(ShapeExtend_WireData)& sbwd = seg.WireData(); for ( Standard_Integer i=1; i <= sbwd->NbEdges(); i++ ) { TopoDS_Edge edge = sbwd->Edge ( i ); if ( ! Vf.IsSame ( sae.LastVertex ( edge ) ) ) return 0; @@ -2065,7 +2065,7 @@ void ShapeFix_ComposeShell::CollectWires (ShapeFix_SequenceOfWireSegment &wires, // find next segment to connect (or first if sbwd is NULL) for ( i = 1; i <= seqw.Length(); i++ ) { - ShapeFix_WireSegment seg = seqw.Value(i); + const ShapeFix_WireSegment& seg = seqw.Value(i); if(seg.IsVertex()) continue; TopAbs_Orientation anOr = seg.Orientation(); @@ -2101,7 +2101,7 @@ void ShapeFix_ComposeShell::CollectWires (ShapeFix_SequenceOfWireSegment &wires, // distance 2 // short auto // angle ->> PI 1 - Handle(ShapeExtend_WireData) wire = seg.WireData(); + const Handle(ShapeExtend_WireData)& wire = seg.WireData(); for ( Standard_Integer j=0; j <2; j++ ) { if ( ! endV.IsSame ( j ? seg.LastVertex() : seg.FirstVertex() ) ) continue; @@ -2341,7 +2341,7 @@ static gp_Pnt2d GetMiddlePoint (const ShapeFix_WireSegment& wire, Bnd_Box2d box; ShapeAnalysis_Edge sae; ShapeAnalysis_Curve sac; - Handle(ShapeExtend_WireData) wd = wire.WireData(); + const Handle(ShapeExtend_WireData)& wd = wire.WireData(); for(Standard_Integer i = 1; i <= wd->NbEdges(); i++) { TopoDS_Edge E = wd->Edge (i); Standard_Real cf,cl; @@ -2374,7 +2374,7 @@ void ShapeFix_ComposeShell::MakeFacesOnPatch (TopTools_SequenceOfShape &faces, if ( loops.Length() == 1 ) { TopoDS_Face newFace; B.MakeFace ( newFace, surf, myLoc, ::Precision::Confusion() ); - TopoDS_Shape aSH = loops.Value(1); + const TopoDS_Shape& aSH = loops.Value(1); if( aSH.ShapeType() != TopAbs_WIRE) return; TopoDS_Wire wire = TopoDS::Wire ( loops.Value(1) ); @@ -2804,7 +2804,7 @@ void ShapeFix_ComposeShell::DispatchWires (TopTools_SequenceOfShape &faces, loops.Append(wires(i).GetVertex()); } else { - Handle(ShapeExtend_WireData) aWD = aSeg.WireData(); + const Handle(ShapeExtend_WireData)& aWD = aSeg.WireData(); if(!aWD.IsNull()) loops.Append ( aWD->Wire() ); } diff --git a/src/ShapeFix/ShapeFix_Face.cxx b/src/ShapeFix/ShapeFix_Face.cxx index 15016761eb..b1dc19303b 100644 --- a/src/ShapeFix/ShapeFix_Face.cxx +++ b/src/ShapeFix/ShapeFix_Face.cxx @@ -691,7 +691,7 @@ Standard_Boolean ShapeFix_Face::Perform() TopoDS_Shape aCurW = aItW.Value(); while(aMapReorderedWires.IsBound(aCurW)) { - TopoDS_Shape aFixW = aMapReorderedWires.Find(aCurW); + const TopoDS_Shape& aFixW = aMapReorderedWires.Find(aCurW); Context()->Replace(aCurW, aFixW); aCurW = aFixW; } @@ -715,7 +715,7 @@ Standard_Boolean ShapeFix_Face::Perform() // Shift all pcurves of edges in the given wire on the given face // to vector -static void Shift2dWire(const TopoDS_Wire w, const TopoDS_Face f, +static void Shift2dWire(const TopoDS_Wire& w, const TopoDS_Face& f, const gp_Vec2d vec, const Handle(ShapeAnalysis_Surface)& mySurf, Standard_Boolean recompute3d = Standard_False) @@ -1418,7 +1418,7 @@ Standard_Boolean ShapeFix_Face::FixOrientation(TopTools_DataMapOfShapeListOfShap if(nb < nbAll) { for( i =1; i <= nbAll;i++) { - TopoDS_Shape aS2 = allSubShapes.Value(i); + const TopoDS_Shape& aS2 = allSubShapes.Value(i); if(aS2.ShapeType() != TopAbs_WIRE || (aS2.Orientation() != TopAbs_FORWARD && aS2.Orientation() != TopAbs_REVERSED)) B.Add ( S,aS2); diff --git a/src/ShapeFix/ShapeFix_IntersectionTool.cxx b/src/ShapeFix/ShapeFix_IntersectionTool.cxx index b98d4bb2c5..daa53f2adc 100644 --- a/src/ShapeFix/ShapeFix_IntersectionTool.cxx +++ b/src/ShapeFix/ShapeFix_IntersectionTool.cxx @@ -1974,7 +1974,7 @@ Standard_Boolean ShapeFix_IntersectionTool::FixIntersectingWires B.Add(newface,wire); } for(i=1 ; i<=SeqNMShapes.Length(); i++) { - TopoDS_Shape aNMS = SeqNMShapes.Value(i); + const TopoDS_Shape& aNMS = SeqNMShapes.Value(i); B.Add(newface,aNMS); } newface.Orientation(ori); diff --git a/src/ShapeFix/ShapeFix_Shell.cxx b/src/ShapeFix/ShapeFix_Shell.cxx index fe2ba6e754..6eb989fad8 100644 --- a/src/ShapeFix/ShapeFix_Shell.cxx +++ b/src/ShapeFix/ShapeFix_Shell.cxx @@ -339,7 +339,7 @@ static Standard_Boolean AddMultiConexityFaces(TopTools_SequenceOfShape& Lface, TopTools_SequenceOfShape AddShapes; for(Standard_Integer i1 = 1 ; i1<=Lface.Length();i1++ ) { - TopoDS_Shape aShape = Lface.Value(i1); + const TopoDS_Shape& aShape = Lface.Value(i1); Standard_Integer aNbMultEdges =0; @@ -347,7 +347,7 @@ static Standard_Boolean AddMultiConexityFaces(TopTools_SequenceOfShape& Lface, for(TopoDS_Iterator aItWires(aShape,Standard_False); aItWires.More(); aItWires.Next()) { Standard_Integer aNbEdges =0; for(TopoDS_Iterator aItEdges(aItWires.Value(),Standard_False); aItEdges.More(); aItEdges.Next(),aNbEdges++) { - TopoDS_Shape edge = aItEdges.Value(); + const TopoDS_Shape& edge = aItEdges.Value(); if(!aMapMultiConnectEdges.Contains(edge)) continue; aNbMultEdges++; } @@ -367,7 +367,7 @@ static Standard_Boolean AddMultiConexityFaces(TopTools_SequenceOfShape& Lface, TopTools_DataMapOfShapeShape aTmpFaceShell; if(GetShells(llPosibleShells,aMap,aTmpShells,aTmpFaceShell,aTmp)) { for(Standard_Integer kk =1; kk <= aTmpShells.Length(); kk++) { - TopoDS_Shape aSh = aTmpShells.Value(kk); + const TopoDS_Shape& aSh = aTmpShells.Value(kk); TopTools_MapOfShape mapEdges; if(GetFreeEdges(aSh,mapEdges)) { Standard_Integer nbedge =0; @@ -386,7 +386,7 @@ static Standard_Boolean AddMultiConexityFaces(TopTools_SequenceOfShape& Lface, for(Standard_Integer k1 =1; k1 <= AddShapes.Length(); k1++) { TopTools_DataMapOfShapeInteger MapOtherShells; TopTools_MapOfShape dire,reve; - TopoDS_Shape aSh = AddShapes.Value(k1); + const TopoDS_Shape& aSh = AddShapes.Value(k1); TopTools_MapOfShape mapEdges; if(!GetFreeEdges(aSh,mapEdges)) continue; TopTools_ListOfShape lfaces; @@ -573,7 +573,7 @@ static void GlueClosedCandidate(TopTools_SequenceOfShape& OpenShells, Standard_Boolean isReversed = Standard_False; Standard_Integer nbedge =0; TopTools_MapOfShape mapEdges2; - TopoDS_Shape aShell2 = OpenShells.Value(j); + const TopoDS_Shape& aShell2 = OpenShells.Value(j); if(!GetFreeEdges(aShell2,mapEdges2)) continue; for(TopTools_MapIteratorOfMapOfShape aIte2( mapEdges2);aIte2.More() && isAddShell;aIte2.Next()) { TopoDS_Edge edge2 = TopoDS::Edge(aIte2.Key()); @@ -675,13 +675,13 @@ static void CreateNonManifoldShells(TopTools_SequenceOfShape& SeqShells, { TopTools_IndexedDataMapOfShapeListOfShape aMap; for(Standard_Integer i =1 ; i <= SeqShells.Length(); i++) { - TopoDS_Shape aShell = SeqShells.Value(i); + const TopoDS_Shape& aShell = SeqShells.Value(i); TopTools_IndexedMapOfShape medeg; TopExp::MapShapes(aShell,TopAbs_EDGE,medeg); for(TopTools_MapIteratorOfMapOfShape mit(aMapMultiConnectEdges); mit.More(); mit.Next()) { //for(TopExp_Explorer aExp(aShell,TopAbs_EDGE); aExp.More(); aExp.Next(),nbe++) { //TopoDS_Shape ae = aExp.Current(); - TopoDS_Shape ae =mit.Key(); + const TopoDS_Shape& ae =mit.Key(); //if( aMapMultiConnectEdges.Contains(aExp.Current())) { if(medeg.Contains(ae)) { if(aMap.Contains(ae)) @@ -714,7 +714,7 @@ static void CreateNonManifoldShells(TopTools_SequenceOfShape& SeqShells, else if(ismerged) { TopoDS_Shape arshell = aMapShells.FindFromKey(alit.Value()); while(aMapShells.Contains(arshell)){ - TopoDS_Shape ss = aMapShells.FindFromKey(arshell); + const TopoDS_Shape& ss = aMapShells.FindFromKey(arshell); if(ss.IsSame(arshell)) break; arshell = ss; } @@ -729,7 +729,7 @@ static void CreateNonManifoldShells(TopTools_SequenceOfShape& SeqShells, else { TopoDS_Shape arshell = aMapShells.FindFromKey(alit.Value()); while(aMapShells.Contains(arshell)) { - TopoDS_Shape ss = aMapShells.FindFromKey(arshell); + const TopoDS_Shape& ss = aMapShells.FindFromKey(arshell); if(ss.IsSame(arshell)) break; arshell = ss; } @@ -749,7 +749,7 @@ static void CreateNonManifoldShells(TopTools_SequenceOfShape& SeqShells, } if(mapmerge.Extent() >1 || ismerged) { for(TopTools_MapIteratorOfMapOfShape alit1(mapmerge); alit1.More();alit1.Next()) { - TopoDS_Shape oldShell = alit1.Key(); + const TopoDS_Shape& oldShell = alit1.Key(); //while(aMapShells.Contains(oldShell)) { // TopoDS_Shape ss = aMapShells.FindFromKey(oldShell); // if(ss.IsSame(oldShell)) break; @@ -764,7 +764,7 @@ static void CreateNonManifoldShells(TopTools_SequenceOfShape& SeqShells, if(aMapShells.Contains(SeqShells.Value(nn))) { TopoDS_Shape aNewShell = aMapShells.FindFromKey(SeqShells.Value(nn)); while(aMapShells.Contains(aNewShell)) { - TopoDS_Shape ss = aMapShells.FindFromKey(aNewShell); + const TopoDS_Shape& ss = aMapShells.FindFromKey(aNewShell); if(ss.IsSame(aNewShell)) break; aNewShell = ss; } diff --git a/src/ShapeFix/ShapeFix_Solid.cxx b/src/ShapeFix/ShapeFix_Solid.cxx index 7a553995b5..3536144802 100644 --- a/src/ShapeFix/ShapeFix_Solid.cxx +++ b/src/ShapeFix/ShapeFix_Solid.cxx @@ -167,7 +167,7 @@ static void CollectSolids(const TopTools_SequenceOfShape& aSeqShells , if(!st) continue; for ( Standard_Integer j = 1; j <= aSeqShells.Length(); j++ ) { if(i==j) continue; - TopoDS_Shape aShell2 = aSeqShells.Value(j); + const TopoDS_Shape& aShell2 = aSeqShells.Value(j); if(!BRep_Tool::IsClosed(aShell2)) continue; if(aMapHoles.Contains(aShell2)) continue; if(aMapShellHoles.IsBound(aShell2)) { @@ -245,7 +245,7 @@ static void CollectSolids(const TopTools_SequenceOfShape& aSeqShells , //purpose : //======================================================================= -static Standard_Boolean CreateSolids(const TopoDS_Shape theShape,TopTools_IndexedMapOfShape& aMapSolids) +static Standard_Boolean CreateSolids(const TopoDS_Shape& theShape,TopTools_IndexedMapOfShape& aMapSolids) { TopTools_SequenceOfShape aSeqShells; Standard_Boolean isDone = Standard_False; @@ -432,8 +432,8 @@ Standard_Boolean ShapeFix_Solid::Perform(const Message_ProgressRange& theProgres if(aExp.More()) { TopoDS_Shell aShtmp = TopoDS::Shell(aExp.Current()); ShapeAnalysis_FreeBounds sfb(aShtmp); - TopoDS_Compound aC1 = sfb.GetClosedWires(); - TopoDS_Compound aC2 = sfb.GetOpenWires(); + const TopoDS_Compound& aC1 = sfb.GetClosedWires(); + const TopoDS_Compound& aC2 = sfb.GetOpenWires(); Standard_Integer numedge =0; TopExp_Explorer aExp1(aC1,TopAbs_EDGE); for( ; aExp1.More(); aExp1.Next()) @@ -474,7 +474,7 @@ Standard_Boolean ShapeFix_Solid::Perform(const Message_ProgressRange& theProgres if(CreateSolids(aResShape,aMapSolids)) { SendWarning (Message_Msg ("FixAdvSolid.FixOrientation.MSG20"));// Orientation of shell was corrected.. if(aMapSolids.Extent() ==1) { - TopoDS_Shape aResSol = aMapSolids.FindKey(1); + const TopoDS_Shape& aResSol = aMapSolids.FindKey(1); if(aResShape.ShapeType() == TopAbs_SHELL && myCreateOpenSolidMode) { TopoDS_Solid solid; BRep_Builder B; diff --git a/src/ShapeFix/ShapeFix_Wire.cxx b/src/ShapeFix/ShapeFix_Wire.cxx index f03fd76f01..fd99e29005 100644 --- a/src/ShapeFix/ShapeFix_Wire.cxx +++ b/src/ShapeFix/ShapeFix_Wire.cxx @@ -3306,8 +3306,8 @@ static void CopyReversePcurves(const TopoDS_Edge& toedge, const TopoDS_Edge& fromedge, const Standard_Boolean reverse) { - TopLoc_Location fromLoc = fromedge.Location(); - TopLoc_Location toLoc = toedge.Location(); + const TopLoc_Location& fromLoc = fromedge.Location(); + const TopLoc_Location& toLoc = toedge.Location(); for (BRep_ListIteratorOfListOfCurveRepresentation fromitcr ((*((Handle(BRep_TEdge)*)&fromedge.TShape()))->ChangeCurves()); fromitcr.More(); fromitcr.Next()) { Handle(BRep_GCurve) fromGC = Handle(BRep_GCurve)::DownCast(fromitcr.Value()); diff --git a/src/ShapeProcess/ShapeProcess_ShapeContext.cxx b/src/ShapeProcess/ShapeProcess_ShapeContext.cxx index e24d82e595..7cf4ab7661 100644 --- a/src/ShapeProcess/ShapeProcess_ShapeContext.cxx +++ b/src/ShapeProcess/ShapeProcess_ShapeContext.cxx @@ -177,7 +177,7 @@ static void RecModif (const TopoDS_Shape &S, { TopoDS_Shape r = S; //gka -modification to keep history for shape with location (OCC21617) - TopLoc_Location aShLoc = S.Location(); + const TopLoc_Location& aShLoc = S.Location(); TopLoc_Location aNullLoc; r.Location(aNullLoc); @@ -204,9 +204,9 @@ static void RecModif (const TopoDS_Shape &S, Standard_Boolean modif = Standard_False; BRep_Builder B; for ( TopoDS_Iterator it(r,Standard_False); it.More(); it.Next() ) { - TopoDS_Shape sh = it.Value(); + const TopoDS_Shape& sh = it.Value(); if ( repl.IsBound(sh) ) { - TopoDS_Shape newsh = repl.Find(sh); + const TopoDS_Shape& newsh = repl.Find(sh); if ( ! newsh.IsNull() ) B.Add ( result, newsh ); modif = Standard_True; } @@ -366,7 +366,7 @@ static void ExplodeModifier (const TopoDS_Shape &S, TopTools_DataMapOfShapeShape &map, const TopAbs_ShapeEnum until) { - TopoDS_Shape res = repl.ModifiedShape ( S ); + const TopoDS_Shape& res = repl.ModifiedShape ( S ); if ( res != S ) { diff --git a/src/ShapeUpgrade/ShapeUpgrade_ConvertSurfaceToBezierBasis.cxx b/src/ShapeUpgrade/ShapeUpgrade_ConvertSurfaceToBezierBasis.cxx index ff0c54fe2b..070f06b70a 100644 --- a/src/ShapeUpgrade/ShapeUpgrade_ConvertSurfaceToBezierBasis.cxx +++ b/src/ShapeUpgrade/ShapeUpgrade_ConvertSurfaceToBezierBasis.cxx @@ -406,7 +406,7 @@ void ShapeUpgrade_ConvertSurfaceToBezierBasis::Compute(const Standard_Boolean Se //purpose : //======================================================================= -static Handle(Geom_Surface) GetSegment(const Handle(Geom_Surface) surf, +static Handle(Geom_Surface) GetSegment(const Handle(Geom_Surface)& surf, const Standard_Real U1, const Standard_Real U2, const Standard_Real V1, diff --git a/src/ShapeUpgrade/ShapeUpgrade_RemoveInternalWires.cxx b/src/ShapeUpgrade/ShapeUpgrade_RemoveInternalWires.cxx index 1b000c1366..4b3e52bb39 100644 --- a/src/ShapeUpgrade/ShapeUpgrade_RemoveInternalWires.cxx +++ b/src/ShapeUpgrade/ShapeUpgrade_RemoveInternalWires.cxx @@ -113,7 +113,7 @@ ShapeUpgrade_RemoveInternalWires::ShapeUpgrade_RemoveInternalWires(const TopoDS_ TopTools_IndexedDataMapOfShapeListOfShape aWireFaces; Standard_Integer i =1, nb = theSeqShapes.Length(); for( ; i <= nb; i++) { - TopoDS_Shape aS = theSeqShapes.Value(i); + const TopoDS_Shape& aS = theSeqShapes.Value(i); if(aS.ShapeType() == TopAbs_FACE) removeSmallWire(aS,TopoDS_Wire()); else if(aS.ShapeType() == TopAbs_WIRE) { @@ -163,7 +163,7 @@ void ShapeUpgrade_RemoveInternalWires::removeSmallWire (const TopoDS_Shape& theF TopoDS_Iterator aIte(aW,Standard_False); for( ; aIte.More(); aIte.Next()) { - TopoDS_Shape aE = aIte.Value(); + const TopoDS_Shape& aE = aIte.Value(); if(myRemoveEdges.IsBound(aE)) myRemoveEdges.ChangeFind(aE).Append(aF); else { @@ -193,7 +193,7 @@ void ShapeUpgrade_RemoveInternalWires::removeSmallFaces () //collecting all faces containing edges from removed wire for( ; aIte.More(); aIte.Next()) { - TopoDS_Shape aEdge = aIte.Value(); + const TopoDS_Shape& aEdge = aIte.Value(); if(!myEdgeFaces.Contains(aEdge)) { myStatus |= ShapeExtend::EncodeStatus (ShapeExtend_FAIL2); continue; diff --git a/src/ShapeUpgrade/ShapeUpgrade_RemoveLocations.cxx b/src/ShapeUpgrade/ShapeUpgrade_RemoveLocations.cxx index caba9bfb61..d422ed9e46 100644 --- a/src/ShapeUpgrade/ShapeUpgrade_RemoveLocations.cxx +++ b/src/ShapeUpgrade/ShapeUpgrade_RemoveLocations.cxx @@ -52,7 +52,7 @@ ShapeUpgrade_RemoveLocations::ShapeUpgrade_RemoveLocations() Standard_Boolean ShapeUpgrade_RemoveLocations::Remove(const TopoDS_Shape& theShape) { - TopoDS_Shape aShape = theShape; + const TopoDS_Shape& aShape = theShape; myShape = aShape; TopAbs_ShapeEnum shtype = theShape.ShapeType(); Standard_Boolean isRemoveLoc = ((shtype != TopAbs_COMPOUND && myLevelRemoving == TopAbs_SHAPE) || @@ -179,7 +179,7 @@ Standard_Boolean ShapeUpgrade_RemoveLocations::MakeNewShape(const TopoDS_Shape& aNewShape= myMapNewShapes.Find(aShape); aNewShape.Orientation(theShape.Orientation()); if(!theRemoveLoc && !theShape.Location().IsIdentity()) { - TopLoc_Location aL = theShape.Location(); + const TopLoc_Location& aL = theShape.Location(); aNewShape.Location(aL); } if(shtype != TopAbs_EDGE) { @@ -256,7 +256,7 @@ Standard_Boolean ShapeUpgrade_RemoveLocations::MakeNewShape(const TopoDS_Shape& aNewShape.Orientation(TopAbs_FORWARD); TopoDS_Iterator aIt(aShape,Standard_False,isRemoveLoc); for( ; aIt.More(); aIt.Next()) { - TopoDS_Shape subshape = aIt.Value(); + const TopoDS_Shape& subshape = aIt.Value(); TopoDS_Shape anewsubshape; Standard_Boolean isDoneSubShape = MakeNewShape(subshape,anAncShape,anewsubshape,isRemoveLoc); isDone = (isDone || isDoneSubShape); diff --git a/src/ShapeUpgrade/ShapeUpgrade_SplitSurfaceContinuity.cxx b/src/ShapeUpgrade/ShapeUpgrade_SplitSurfaceContinuity.cxx index eb252bddc0..494d5b2db1 100644 --- a/src/ShapeUpgrade/ShapeUpgrade_SplitSurfaceContinuity.cxx +++ b/src/ShapeUpgrade/ShapeUpgrade_SplitSurfaceContinuity.cxx @@ -138,7 +138,7 @@ ShapeUpgrade_SplitSurfaceContinuity::ShapeUpgrade_SplitSurfaceContinuity() myStatus |= ShapeExtend::EncodeStatus ( ShapeExtend_DONE2 ); if ( spc.Status ( ShapeExtend_DONE3 ) ) { myStatus |= ShapeExtend::EncodeStatus ( ShapeExtend_DONE3 ); - Handle(Geom_Curve) aNewBascurve = spc.GetCurve(); + const Handle(Geom_Curve)& aNewBascurve = spc.GetCurve(); Surface->SetBasisCurve(aNewBascurve); } return; diff --git a/src/ShapeUpgrade/ShapeUpgrade_UnifySameDomain.cxx b/src/ShapeUpgrade/ShapeUpgrade_UnifySameDomain.cxx index 7d603b2dae..022fdc7915 100644 --- a/src/ShapeUpgrade/ShapeUpgrade_UnifySameDomain.cxx +++ b/src/ShapeUpgrade/ShapeUpgrade_UnifySameDomain.cxx @@ -1154,7 +1154,7 @@ static void AddPCurves(const TopTools_SequenceOfShape& theFaces, // seams and equal edges are dropped // Returns true if one of original edges dropped static Standard_Boolean AddOrdinaryEdges(TopTools_SequenceOfShape& edges, - const TopoDS_Shape aShape, + const TopoDS_Shape& aShape, Standard_Integer& anIndex, TopTools_SequenceOfShape& theRemovedEdges) { @@ -1162,7 +1162,7 @@ static Standard_Boolean AddOrdinaryEdges(TopTools_SequenceOfShape& edges, TopTools_IndexedMapOfShape aNewEdges; //add edges without seams for(TopExp_Explorer exp(aShape,TopAbs_EDGE); exp.More(); exp.Next()) { - TopoDS_Shape edge = exp.Current(); + const TopoDS_Shape& edge = exp.Current(); if(aNewEdges.Contains(edge)) { aNewEdges.RemoveKey(edge); @@ -2496,7 +2496,7 @@ Standard_Boolean ShapeUpgrade_UnifySameDomain::MergeEdges(TopTools_SequenceOfSha // fill in the map V-E for (TopoDS_Iterator it(anEdge.Oriented(TopAbs_FORWARD)); it.More(); it.Next()) { - TopoDS_Shape aV = it.Value(); + const TopoDS_Shape& aV = it.Value(); if (aV.Orientation() == TopAbs_FORWARD || aV.Orientation() == TopAbs_REVERSED) { if (!aMapVE.Contains(aV)) @@ -3072,7 +3072,7 @@ void ShapeUpgrade_UnifySameDomain::IntUnifyFaces(const TopoDS_Shape& theInpShape Standard_Boolean hasConnectAnotherFaces = Standard_False; TopExp_Explorer ex(faces(i), TopAbs_EDGE); for (; ex.More() && !hasConnectAnotherFaces; ex.Next()) { - TopoDS_Shape aE = ex.Current(); + const TopoDS_Shape& aE = ex.Current(); const TopTools_ListOfShape& aLF = aMapEF.FindFromKey(aE); if (aLF.Extent() > 1) { for (it.Init(aLF); it.More() && !hasConnectAnotherFaces; it.Next()) { diff --git a/src/ShapeUpgrade/ShapeUpgrade_WireDivide.cxx b/src/ShapeUpgrade/ShapeUpgrade_WireDivide.cxx index 0bd2850378..63600eaee9 100644 --- a/src/ShapeUpgrade/ShapeUpgrade_WireDivide.cxx +++ b/src/ShapeUpgrade/ShapeUpgrade_WireDivide.cxx @@ -167,8 +167,8 @@ void ShapeUpgrade_WireDivide::SetSurface(const Handle(Geom_Surface)& S, //purpose : //======================================================================= -static void CorrectSplitValues(const Handle(TColStd_HSequenceOfReal) orig3d, - const Handle(TColStd_HSequenceOfReal) orig2d, +static void CorrectSplitValues(const Handle(TColStd_HSequenceOfReal)& orig3d, + const Handle(TColStd_HSequenceOfReal)& orig2d, Handle(TColStd_HSequenceOfReal) new2d, Handle(TColStd_HSequenceOfReal) new3d) { diff --git a/src/StdLPersistent/StdLPersistent_Dependency.cxx b/src/StdLPersistent/StdLPersistent_Dependency.cxx index 57a75d7486..29d03a8d97 100644 --- a/src/StdLPersistent/StdLPersistent_Dependency.cxx +++ b/src/StdLPersistent/StdLPersistent_Dependency.cxx @@ -39,7 +39,7 @@ void StdLPersistent_Dependency::instance::Import StdLPersistent_HArray1OfPersistent::Iterator anIter (*myVariables->Array()); for (; anIter.More(); anIter.Next()) { - const Handle(StdObjMgt_Persistent) aPersistent = anIter.Value(); + const Handle(StdObjMgt_Persistent)& aPersistent = anIter.Value(); if (aPersistent) theAttribute->GetVariables().Append (aPersistent->GetAttribute()); } diff --git a/src/StdPersistent/StdPersistent_Naming.cxx b/src/StdPersistent/StdPersistent_Naming.cxx index ecaa4128aa..0daf4f0c73 100644 --- a/src/StdPersistent/StdPersistent_Naming.cxx +++ b/src/StdPersistent/StdPersistent_Naming.cxx @@ -85,7 +85,7 @@ void StdPersistent_Naming::Name::Import StdLPersistent_HArray1OfPersistent::Iterator anIter (*myArgs->Array()); for (; anIter.More(); anIter.Next()) { - Handle(StdObjMgt_Persistent) aPersistent = anIter.Value(); + const Handle(StdObjMgt_Persistent)& aPersistent = anIter.Value(); if (aPersistent) { Handle(TDF_Attribute) anArg = aPersistent->GetAttribute(); diff --git a/src/StdPrs/StdPrs_Curve.cxx b/src/StdPrs/StdPrs_Curve.cxx index cde1d4ec4d..7f68142ba4 100644 --- a/src/StdPrs/StdPrs_Curve.cxx +++ b/src/StdPrs/StdPrs_Curve.cxx @@ -84,7 +84,7 @@ static void FindLimits(const Adaptor3d_Curve& aCurve, // purpose: //================================================================== static void DrawCurve (const Adaptor3d_Curve& aCurve, - const Handle(Graphic3d_Group) aGroup, + const Handle(Graphic3d_Group)& aGroup, const Standard_Integer NbP, const Standard_Real U1, const Standard_Real U2, diff --git a/src/StepAP209/StepAP209_Construct.cxx b/src/StepAP209/StepAP209_Construct.cxx index c189307ce5..e00718b1d3 100644 --- a/src/StepAP209/StepAP209_Construct.cxx +++ b/src/StepAP209/StepAP209_Construct.cxx @@ -597,7 +597,7 @@ Handle(StepFEA_HSequenceOfElementRepresentation) StepAP209_Construct::GetFeaElem aSequence = new StepFEA_HSequenceOfElementRepresentation; for (; anIter.More(); anIter.Next()) { - Handle(Standard_Transient) anEntity = anIter.Value(); + const Handle(Standard_Transient)& anEntity = anIter.Value(); if(anEntity->IsKind(theType)) { Handle(StepFEA_ElementRepresentation) anElement = Handle(StepFEA_ElementRepresentation)::DownCast(anEntity); diff --git a/src/StepData/StepData_StepModel.cxx b/src/StepData/StepData_StepModel.cxx index 5d86f07835..f8941148af 100644 --- a/src/StepData/StepData_StepModel.cxx +++ b/src/StepData/StepData_StepModel.cxx @@ -113,7 +113,7 @@ void StepData_StepModel::VerifyCheck(Handle(Interface_Check)& ach) const Interface_ShareTool sh(me,aHP); Handle(Interface_GeneralModule) module; Standard_Integer CN; for (Interface_EntityIterator iter = Header(); iter.More(); iter.Next()) { - Handle(Standard_Transient) head = iter.Value(); + const Handle(Standard_Transient)& head = iter.Value(); if (!lib.Select(head,module,CN)) continue; module->CheckCase(CN,head,sh,ach); } diff --git a/src/StepData/StepData_StepWriter.cxx b/src/StepData/StepData_StepWriter.cxx index ee04642aa8..b276ebf44d 100644 --- a/src/StepData/StepData_StepWriter.cxx +++ b/src/StepData/StepData_StepWriter.cxx @@ -172,7 +172,7 @@ void StepData_StepWriter::SendModel(const Handle(StepData_Protocol)& protocol, Interface_EntityIterator header = themodel->Header(); thenum = 0; for (header.Start(); header.More(); header.Next()) { - Handle(Standard_Transient) anent = header.Value(); + const Handle(Standard_Transient)& anent = header.Value(); // Write Entity via Lib (similaire a SendEntity) Handle(StepData_ReadWriteModule) module; Standard_Integer CN; @@ -681,7 +681,7 @@ void StepData_StepWriter::SendList(const StepData_FieldList& list, for (i = 1; i <= nb; i ++) { Handle(StepData_PDescr) pde; if (!descr.IsNull()) pde = descr->Field(i); - const StepData_Field fild = list.Field(i); + const StepData_Field& fild = list.Field(i); SendField (fild,pde); } // end entity ? diff --git a/src/StepKinematics/StepKinematics_MechanismStateRepresentation.cxx b/src/StepKinematics/StepKinematics_MechanismStateRepresentation.cxx index 7dca9ea9f7..b5570da5f4 100644 --- a/src/StepKinematics/StepKinematics_MechanismStateRepresentation.cxx +++ b/src/StepKinematics/StepKinematics_MechanismStateRepresentation.cxx @@ -24,7 +24,7 @@ StepKinematics_MechanismStateRepresentation::StepKinematics_MechanismStateRepres void StepKinematics_MechanismStateRepresentation::Init(const Handle(TCollection_HAsciiString)& theName, const Handle(StepRepr_HArray1OfRepresentationItem)& theItems, const Handle(StepRepr_RepresentationContext)& theContextOfItems, - const Handle(StepKinematics_MechanismRepresentation) theMechanism) + const Handle(StepKinematics_MechanismRepresentation)& theMechanism) { StepRepr_Representation::Init(theName, theItems, theContextOfItems); myRepresentedMechanism = theMechanism; diff --git a/src/StepKinematics/StepKinematics_MechanismStateRepresentation.hxx b/src/StepKinematics/StepKinematics_MechanismStateRepresentation.hxx index 82ee1ca25c..7e26f9c189 100644 --- a/src/StepKinematics/StepKinematics_MechanismStateRepresentation.hxx +++ b/src/StepKinematics/StepKinematics_MechanismStateRepresentation.hxx @@ -34,7 +34,7 @@ public: //! Returns a MechanismStateRepresentation Standard_EXPORT StepKinematics_MechanismStateRepresentation(); - Standard_EXPORT void Init(const Handle(TCollection_HAsciiString)& theName, const Handle(StepRepr_HArray1OfRepresentationItem)& theItems, const Handle(StepRepr_RepresentationContext)& theContextOfItems, const Handle(StepKinematics_MechanismRepresentation) theMechanism); + Standard_EXPORT void Init(const Handle(TCollection_HAsciiString)& theName, const Handle(StepRepr_HArray1OfRepresentationItem)& theItems, const Handle(StepRepr_RepresentationContext)& theContextOfItems, const Handle(StepKinematics_MechanismRepresentation)& theMechanism); Standard_EXPORT void SetMechanism(const Handle(StepKinematics_MechanismRepresentation)& theMechanism); diff --git a/src/StepRepr/StepRepr_ReprItemAndMeasureWithUnitAndQRI.cxx b/src/StepRepr/StepRepr_ReprItemAndMeasureWithUnitAndQRI.cxx index b03f5f3575..66ae92690a 100644 --- a/src/StepRepr/StepRepr_ReprItemAndMeasureWithUnitAndQRI.cxx +++ b/src/StepRepr/StepRepr_ReprItemAndMeasureWithUnitAndQRI.cxx @@ -27,7 +27,7 @@ IMPLEMENT_STANDARD_RTTIEXT(StepRepr_ReprItemAndMeasureWithUnitAndQRI,StepRepr_Re void StepRepr_ReprItemAndMeasureWithUnitAndQRI::Init (const Handle(StepBasic_MeasureWithUnit)& aMWU, const Handle(StepRepr_RepresentationItem)& aRI, - const Handle(StepShape_QualifiedRepresentationItem) aQRI) + const Handle(StepShape_QualifiedRepresentationItem)& aQRI) { StepRepr_ReprItemAndMeasureWithUnit::Init(aMWU, aRI); myQualifiedRepresentationItem = aQRI; diff --git a/src/StepRepr/StepRepr_ReprItemAndMeasureWithUnitAndQRI.hxx b/src/StepRepr/StepRepr_ReprItemAndMeasureWithUnitAndQRI.hxx index 961a8165dd..c8108ac603 100644 --- a/src/StepRepr/StepRepr_ReprItemAndMeasureWithUnitAndQRI.hxx +++ b/src/StepRepr/StepRepr_ReprItemAndMeasureWithUnitAndQRI.hxx @@ -35,7 +35,7 @@ public: Standard_EXPORT StepRepr_ReprItemAndMeasureWithUnitAndQRI(); - Standard_EXPORT void Init (const Handle(StepBasic_MeasureWithUnit)& aMWU, const Handle(StepRepr_RepresentationItem)& aRI, const Handle(StepShape_QualifiedRepresentationItem) aQRI); + Standard_EXPORT void Init (const Handle(StepBasic_MeasureWithUnit)& aMWU, const Handle(StepRepr_RepresentationItem)& aRI, const Handle(StepShape_QualifiedRepresentationItem)& aQRI); Standard_EXPORT void SetQualifiedRepresentationItem (const Handle(StepShape_QualifiedRepresentationItem)& aQRI); diff --git a/src/StepToTopoDS/StepToTopoDS_Builder.cxx b/src/StepToTopoDS/StepToTopoDS_Builder.cxx index b502766c3b..1f431520a9 100644 --- a/src/StepToTopoDS/StepToTopoDS_Builder.cxx +++ b/src/StepToTopoDS/StepToTopoDS_Builder.cxx @@ -673,7 +673,7 @@ void StepToTopoDS_Builder::Init { Message_ProgressRange aRange = aPS.Next(); StepShape_GeometricSetSelect aGSS = GCS->ElementsValue(i); - Handle(Standard_Transient) ent = aGSS.Value(); + const Handle(Standard_Transient)& ent = aGSS.Value(); TopoDS_Shape res = TransferBRep::ShapeResult ( TP, ent ); if ( ! res.IsNull() ) { // already translated diff --git a/src/StepToTopoDS/StepToTopoDS_NMTool.cxx b/src/StepToTopoDS/StepToTopoDS_NMTool.cxx index 8db5198325..143d995ea1 100644 --- a/src/StepToTopoDS/StepToTopoDS_NMTool.cxx +++ b/src/StepToTopoDS/StepToTopoDS_NMTool.cxx @@ -184,7 +184,7 @@ Standard_Boolean StepToTopoDS_NMTool::IsPureNMShell(const TopoDS_Shape& Shell) { Standard_Boolean result = Standard_True; TopExp_Explorer edgeExp(Shell, TopAbs_EDGE); for ( ; edgeExp.More(); edgeExp.Next() ) { - TopoDS_Shape currentEdge = edgeExp.Current(); + const TopoDS_Shape& currentEdge = edgeExp.Current(); if ( !this->isEdgeRegisteredAsNM(currentEdge) ) { result = Standard_False; break; @@ -223,10 +223,10 @@ Standard_Boolean StepToTopoDS_NMTool::isAdjacentShell(const TopoDS_Shape& ShellA TopExp_Explorer edgeExpA(ShellA, TopAbs_EDGE); for ( ; edgeExpA.More(); edgeExpA.Next() ) { - TopoDS_Shape currentEdgeA = edgeExpA.Current(); + const TopoDS_Shape& currentEdgeA = edgeExpA.Current(); TopExp_Explorer edgeExpB(ShellB, TopAbs_EDGE); for ( ; edgeExpB.More(); edgeExpB.Next() ) { - TopoDS_Shape currentEdgeB = edgeExpB.Current(); + const TopoDS_Shape& currentEdgeB = edgeExpB.Current(); if ( currentEdgeA.IsSame(currentEdgeB) ) return Standard_True; } diff --git a/src/StepToTopoDS/StepToTopoDS_TranslateEdge.cxx b/src/StepToTopoDS/StepToTopoDS_TranslateEdge.cxx index 3b0e2fca74..a005fc8aca 100644 --- a/src/StepToTopoDS/StepToTopoDS_TranslateEdge.cxx +++ b/src/StepToTopoDS/StepToTopoDS_TranslateEdge.cxx @@ -136,7 +136,7 @@ static void DecodeMakeEdgeError(const BRepLib_MakeEdge& ME, // ============================================================================ static Handle(Geom_Curve) MakeCurve - (const Handle(StepGeom_Curve)& C1, const Handle(Transfer_TransientProcess) TP) + (const Handle(StepGeom_Curve)& C1, const Handle(Transfer_TransientProcess)& TP) { Handle(Geom_Curve) C2 = Handle(Geom_Curve)::DownCast (TP->FindTransient(C1)); if (!C2.IsNull()) return C2; diff --git a/src/TDF/TDF_CopyLabel.cxx b/src/TDF/TDF_CopyLabel.cxx index e2c701774c..e4d07e86e8 100644 --- a/src/TDF/TDF_CopyLabel.cxx +++ b/src/TDF/TDF_CopyLabel.cxx @@ -80,7 +80,7 @@ void TDF_CopyLabel::ExternalReferences(const TDF_Label& aRefLabel, const TDF_Lab // TDF_Tool::Entry(itr.Value()->Label(), entr1); //d // std::cout<<"\tSource Attribute dynamic type = "<DynamicType()<<" Label = "<Label(), entr1); // std::cout<<"\t\tReferences attribute dynamic type = "<DynamicType()<<" Label = "<SetRelocation(att, att); #ifdef OCCT_DEBUG PrintEntry(att->Label(), Standard_True); diff --git a/src/TDF/TDF_Data.cxx b/src/TDF/TDF_Data.cxx index 50e85d0fc2..afbd2dae75 100644 --- a/src/TDF/TDF_Data.cxx +++ b/src/TDF/TDF_Data.cxx @@ -243,7 +243,7 @@ Standard_Integer TDF_Data::CommitTransaction if (aPtrCurrentAtt->mySavedTransaction >= aPtrCurrentAtt->myTransaction) { - const Handle(TDF_Attribute) currentAtt = aPtrCurrentAtt; + const Handle(TDF_Attribute)& currentAtt = aPtrCurrentAtt; // Collision with a not forgotten version. if (backupAtt.IsNull()) { TDF_Data_DeltaCreation diff --git a/src/TDF/TDF_Tool.cxx b/src/TDF/TDF_Tool.cxx index ca2228f9be..954b540d95 100644 --- a/src/TDF/TDF_Tool.cxx +++ b/src/TDF/TDF_Tool.cxx @@ -172,7 +172,7 @@ static Standard_Boolean TDF_Tool_DescendantRef attMItr.More(); attMItr.Next()) { // CLE // const Handle(TDF_Attribute)& att = attMItr.Key(); - Handle(TDF_Attribute) att = attMItr.Key(); + const Handle(TDF_Attribute)& att = attMItr.Key(); if (!att.IsNull() && !att->Label().IsNull()) { // ENDCLE @@ -242,7 +242,7 @@ static void TDF_Tool_OutReferers(const TDF_Label& aRefLabel, attMItr.More(); attMItr.Next()) { // CLE // const Handle(TDF_Attribute)& att = attMItr.Key(); - Handle(TDF_Attribute) att = attMItr.Key(); + const Handle(TDF_Attribute)& att = attMItr.Key(); // ENDCLE if (aFilterForReferences.IsKept(att) && !att->Label().IsNull() && @@ -316,7 +316,7 @@ static void TDF_Tool_OutReferences(const TDF_Label& aRefLabel, itr.Value()->References(ds); const TDF_AttributeMap& attMap = ds->Attributes(); for (TDF_MapIteratorOfAttributeMap attMItr(attMap);attMItr.More();attMItr.Next()) { - Handle(TDF_Attribute) att = attMItr.Key(); + const Handle(TDF_Attribute)& att = attMItr.Key(); if (aFilterForReferences.IsKept(att) && !att->Label().IsNull() && !att->Label().IsDescendant(aRefLabel)) diff --git a/src/TDocStd/TDocStd_Application.cxx b/src/TDocStd/TDocStd_Application.cxx index 7157746eb8..751ea1f826 100644 --- a/src/TDocStd/TDocStd_Application.cxx +++ b/src/TDocStd/TDocStd_Application.cxx @@ -119,7 +119,7 @@ void TDocStd_Application::ReadingFormats(TColStd_SequenceOfAsciiString &theForma NCollection_IndexedDataMap::Iterator anIter(myReaders); for (; anIter.More(); anIter.Next()) { - Handle(PCDM_RetrievalDriver) aDriver = anIter.Value(); + const Handle(PCDM_RetrievalDriver)& aDriver = anIter.Value(); if (aDriver.IsNull() == Standard_False) { theFormats.Append(anIter.Key()); } @@ -138,7 +138,7 @@ void TDocStd_Application::WritingFormats(TColStd_SequenceOfAsciiString &theForma NCollection_IndexedDataMap::Iterator anIter(myWriters); for (; anIter.More(); anIter.Next()) { - Handle(PCDM_StorageDriver) aDriver = anIter.Value(); + const Handle(PCDM_StorageDriver)& aDriver = anIter.Value(); if (aDriver.IsNull() == Standard_False) { theFormats.Append(anIter.Key()); } diff --git a/src/TNaming/TNaming_Name.cxx b/src/TNaming/TNaming_Name.cxx index 7238eda6a2..1f30b327f3 100644 --- a/src/TNaming/TNaming_Name.cxx +++ b/src/TNaming/TNaming_Name.cxx @@ -376,7 +376,7 @@ static TopoDS_Shape MakeShape (const TopTools_IndexedMapOfShape& MS) //purpose : Tries to make shape with given type from the given shape //======================================================================= -static TopoDS_Shape ShapeWithType(const TopoDS_Shape theShape, +static TopoDS_Shape ShapeWithType(const TopoDS_Shape& theShape, const TopAbs_ShapeEnum theType ) { if (theShape.IsNull() || theType == TopAbs_SHAPE) return theShape; Standard_Integer aType = theShape.ShapeType(); @@ -1351,7 +1351,7 @@ static Standard_Boolean FilterByNeighbourgs (const TDF_Label& L, //---------------------------------------- // First argument: collection has to be filtered. //---------------------------------------- - Handle(TNaming_NamedShape) Cand = Args.First(); //collection of candidates + const Handle(TNaming_NamedShape)& Cand = Args.First(); //collection of candidates #ifdef OCCT_DEBUG_FNB Standard_Integer i = 1; diff --git a/src/TObj/TObj_Assistant.cxx b/src/TObj/TObj_Assistant.cxx index 4783d45a46..d4ad4136b6 100644 --- a/src/TObj/TObj_Assistant.cxx +++ b/src/TObj/TObj_Assistant.cxx @@ -96,7 +96,7 @@ Handle(TObj_Model) TObj_Assistant::FindModel //purpose : //======================================================================= -void TObj_Assistant::BindModel (const Handle(TObj_Model) theModel) +void TObj_Assistant::BindModel (const Handle(TObj_Model)& theModel) { getModels().Append(theModel); } diff --git a/src/TObj/TObj_Assistant.hxx b/src/TObj/TObj_Assistant.hxx index f9ac21778f..702cc1c4dd 100644 --- a/src/TObj/TObj_Assistant.hxx +++ b/src/TObj/TObj_Assistant.hxx @@ -45,7 +45,7 @@ public: //! Binds model to the map static Standard_EXPORT void - BindModel (const Handle(TObj_Model) theModel); + BindModel (const Handle(TObj_Model)& theModel); //! Clears all records from the model map static Standard_EXPORT void diff --git a/src/TopOpeBRep/TopOpeBRep_DSFiller.cxx b/src/TopOpeBRep/TopOpeBRep_DSFiller.cxx index 9952806b43..e4b9c58c24 100644 --- a/src/TopOpeBRep/TopOpeBRep_DSFiller.cxx +++ b/src/TopOpeBRep/TopOpeBRep_DSFiller.cxx @@ -739,8 +739,8 @@ void TopOpeBRep_DSFiller::InsertIntersection2d if ( ! ClearShapeSameDomain(aS1, aS2, HDS) ) return; - TopoDS_Shape S1 = aS1; - TopoDS_Shape S2 = aS2; + const TopoDS_Shape& S1 = aS1; + const TopoDS_Shape& S2 = aS2; TopOpeBRepDS_DataStructure& BDS1 = HDS->ChangeDS(); BDS1.AddShape(S1,1); BDS1.AddShape(S2,2); diff --git a/src/TopOpeBRep/TopOpeBRep_EdgesFiller.cxx b/src/TopOpeBRep/TopOpeBRep_EdgesFiller.cxx index 6b665f4720..f975368fae 100644 --- a/src/TopOpeBRep/TopOpeBRep_EdgesFiller.cxx +++ b/src/TopOpeBRep/TopOpeBRep_EdgesFiller.cxx @@ -249,7 +249,7 @@ void TopOpeBRep_EdgesFiller::Insert(const TopoDS_Shape& E1,const TopoDS_Shape& E SetShapeTransition(P2D,T1,T2); if (isvertex1) { - const TopoDS_Shape V = V1; + const TopoDS_Shape& V = V1; Standard_Integer Vindex = myPDS->AddShape(V,1); TopOpeBRepDS_Config SSC = P2D.EdgesConfig(); EVI = StoreVI(P2D,T1,E2index,Vindex,Standard_True,SSC,par1,1); @@ -257,7 +257,7 @@ void TopOpeBRep_EdgesFiller::Insert(const TopoDS_Shape& E1,const TopoDS_Shape& E } if (isvertex2) { - const TopoDS_Shape V = V2; + const TopoDS_Shape& V = V2; Standard_Integer Vindex = myPDS->AddShape(V,2); TopOpeBRepDS_Config SSC = P2D.EdgesConfig(); EVI = StoreVI(P2D,T1,E2index,Vindex,Standard_False,SSC,par1,1); diff --git a/src/TopOpeBRep/TopOpeBRep_FFTransitionTool.cxx b/src/TopOpeBRep/TopOpeBRep_FFTransitionTool.cxx index 0f30fdde7d..bdea09c0e4 100644 --- a/src/TopOpeBRep/TopOpeBRep_FFTransitionTool.cxx +++ b/src/TopOpeBRep/TopOpeBRep_FFTransitionTool.cxx @@ -123,9 +123,9 @@ TopOpeBRepDS_Transition TopOpeBRep_FFTransitionTool::ProcessLineTransition // P.IsOnDomS1() and P.IsOnDomS2() are both false Standard_Integer nbv = LI.NbVPoint(); - TopOpeBRep_VPointInter P1 = LI.VPoint(1); + const TopOpeBRep_VPointInter& P1 = LI.VPoint(1); Standard_Real par1 = P1.ParameterOnLine(); - TopOpeBRep_VPointInter Pn = LI.VPoint(nbv); + const TopOpeBRep_VPointInter& Pn = LI.VPoint(nbv); Standard_Real parn = Pn.ParameterOnLine(); Standard_Real par = P.ParameterOnLine(); diff --git a/src/TopOpeBRep/TopOpeBRep_FacesFiller_1.cxx b/src/TopOpeBRep/TopOpeBRep_FacesFiller_1.cxx index d29dc21e2d..5d82c1632b 100644 --- a/src/TopOpeBRep/TopOpeBRep_FacesFiller_1.cxx +++ b/src/TopOpeBRep/TopOpeBRep_FacesFiller_1.cxx @@ -116,7 +116,7 @@ Standard_EXPORT void FUN_VPIndex(TopOpeBRep_FacesFiller& FF, Standard_Boolean& EPIfound, Handle(TopOpeBRepDS_Interference)& IEPI, // out Standard_Boolean& CPIfound, Handle(TopOpeBRepDS_Interference)& ICPI, // out const Standard_Integer mkVP); -Standard_EXPORT Standard_Boolean FUN_newtransEdge(const Handle(TopOpeBRepDS_HDataStructure) HDS, +Standard_EXPORT Standard_Boolean FUN_newtransEdge(const Handle(TopOpeBRepDS_HDataStructure)& HDS, const TopOpeBRep_FacesFiller& FF, const TopOpeBRep_LineInter& L, const Standard_Boolean& Lonrest, diff --git a/src/TopOpeBRep/TopOpeBRep_LineInter.cxx b/src/TopOpeBRep/TopOpeBRep_LineInter.cxx index 7f6768cdaa..d9791d08e0 100644 --- a/src/TopOpeBRep/TopOpeBRep_LineInter.cxx +++ b/src/TopOpeBRep/TopOpeBRep_LineInter.cxx @@ -55,8 +55,8 @@ extern Standard_Boolean TopOpeBRep_GettraceCONIC(); //----------------------------------------------------------------------- static void FUN_ALINETOWLINE (const Handle(IntPatch_ALine)& AL, - const Handle(BRepAdaptor_Surface) surf1, - const Handle(BRepAdaptor_Surface) surf2, + const Handle(BRepAdaptor_Surface)& surf1, + const Handle(BRepAdaptor_Surface)& surf2, IntPatch_SequenceOfLine& theLines) { Standard_Integer nbpointsmax = 200; diff --git a/src/TopOpeBRep/TopOpeBRep_ShapeIntersector.cxx b/src/TopOpeBRep/TopOpeBRep_ShapeIntersector.cxx index 845b2deaa0..7268d4ccd6 100644 --- a/src/TopOpeBRep/TopOpeBRep_ShapeIntersector.cxx +++ b/src/TopOpeBRep/TopOpeBRep_ShapeIntersector.cxx @@ -1265,7 +1265,7 @@ static TopoDS_Solid GetNewSolid(const TopoDS_Shape& S, TopoDS_Face& F) TopoDS_Wire w = mkw.Wire(); BRepLib_MakeFace mkf( w ); - TopoDS_Face infFace = mkf.Face(); + const TopoDS_Face& infFace = mkf.Face(); TopoDS_Shell newShell; TopoDS_Solid newSolid; diff --git a/src/TopOpeBRep/TopOpeBRep_kpart.cxx b/src/TopOpeBRep/TopOpeBRep_kpart.cxx index e1971bc8ea..f5f27eb87c 100644 --- a/src/TopOpeBRep/TopOpeBRep_kpart.cxx +++ b/src/TopOpeBRep/TopOpeBRep_kpart.cxx @@ -161,7 +161,7 @@ Standard_Boolean FUNBREP_topowalki_new Standard_Boolean keep = Standard_True; if (LITdefinie) { - Handle(TopOpeBRepDS_Interference) I = DSCIL.Last(); + const Handle(TopOpeBRepDS_Interference)& I = DSCIL.Last(); TopOpeBRepDS_Transition LIT = I->Transition(); Standard_Boolean LITonsort = M_FORWARD( LIT.Orientation(TopAbs_OUT) ); Standard_Boolean LprecIsEntrant = !LITonsort; @@ -470,7 +470,7 @@ Standard_Boolean FUNBREP_topogline_new // we have to parametrize the found interference (parameter PIfound) // and next interference (parline) - Handle(TopOpeBRepDS_Interference) Ifound = DSCIL.First(); + const Handle(TopOpeBRepDS_Interference)& Ifound = DSCIL.First(); Standard_Real PIfound = TopOpeBRepDS_InterferenceTool::Parameter(Ifound); FUNBREP_Periodize(L,Ifound,PIfound,parline); TopOpeBRepDS_InterferenceTool::Parameter(Ifound,PIfound); diff --git a/src/TopOpeBRep/TopOpeBRep_vpr.cxx b/src/TopOpeBRep/TopOpeBRep_vpr.cxx index 1e5338e88a..14f1519c68 100644 --- a/src/TopOpeBRep/TopOpeBRep_vpr.cxx +++ b/src/TopOpeBRep/TopOpeBRep_vpr.cxx @@ -351,7 +351,7 @@ static Standard_Boolean FUN_LineRestF //----------------------------------------------------------------------- Standard_EXPORT Standard_Boolean FUN_newtransEdge -(const Handle(TopOpeBRepDS_HDataStructure) HDS, +(const Handle(TopOpeBRepDS_HDataStructure)& HDS, const TopOpeBRep_FacesFiller& FF, const TopOpeBRep_LineInter& L, const Standard_Boolean& Lonrest, @@ -363,7 +363,7 @@ Standard_EXPORT Standard_Boolean FUN_newtransEdge { T.Before(TopAbs_UNKNOWN); T.After(TopAbs_UNKNOWN); const TopoDS_Face& OOface = FF.Face(OOShapeIndex); - TopoDS_Face FIE = OOface; + const TopoDS_Face& FIE = OOface; { TopAbs_Orientation oFIE = FIE.Orientation(); if (oFIE == TopAbs_INTERNAL || oFIE == TopAbs_EXTERNAL) { @@ -454,7 +454,7 @@ Standard_EXPORT Standard_Boolean FUN_newtransEdge } // FUN_newtransEdge //----------------------------------------------------------------------- -static void FUN_ScanInterfList(const TopOpeBRepDS_Point& PDS, const Handle(TopOpeBRepDS_HDataStructure) HDS, +static void FUN_ScanInterfList(const TopOpeBRepDS_Point& PDS, const Handle(TopOpeBRepDS_HDataStructure)& HDS, const TopOpeBRepDS_ListOfInterference& loI, TopOpeBRepDS_ListOfInterference& loIfound) //----------------------------------------------------------------------- { @@ -512,7 +512,7 @@ static Standard_Boolean FUN_sameGsameS(const TopOpeBRepDS_ListOfInterference& lo // geometry , and support TopOpeBRepDS_PointIterator PI(loI); for (; PI.More(); PI.Next()) { - Handle(TopOpeBRepDS_Interference) EPI = PI.Value(); + const Handle(TopOpeBRepDS_Interference)& EPI = PI.Value(); Standard_Integer GEPI = EPI->Geometry(); Standard_Integer SEPI = EPI->Support(); if (GEPI == G && SEPI == S) loIfound.Append(EPI); } diff --git a/src/TopOpeBRepBuild/TopOpeBRepBuild_Builder1.cxx b/src/TopOpeBRepBuild/TopOpeBRepBuild_Builder1.cxx index 8369bcfb0c..20d732fbd2 100644 --- a/src/TopOpeBRepBuild/TopOpeBRepBuild_Builder1.cxx +++ b/src/TopOpeBRepBuild/TopOpeBRepBuild_Builder1.cxx @@ -265,7 +265,7 @@ void TopOpeBRepBuild_Builder1::GFillShellSFS (const TopoDS_Shape& SH, TopOpeBRepTool_ShapeExplorer exFace; - TopoDS_Shape SH1 = SH;// SH1.Orientation(TopAbs_FORWARD); + const TopoDS_Shape& SH1 = SH;// SH1.Orientation(TopAbs_FORWARD); //1) process firstly same domain faces and non-interference faces for (exFace.Init(SH1,TopAbs_FACE); exFace.More(); exFace.Next()) { @@ -289,7 +289,7 @@ void TopOpeBRepBuild_Builder1::GFillShellSFS (const TopoDS_Shape& SH, //2 Process all other faces for (exFace.Init(SH1,TopAbs_FACE); exFace.More(); exFace.Next()) { - TopoDS_Shape FOR = exFace.Current(); + const TopoDS_Shape& FOR = exFace.Current(); if(!myDataStructure -> HasShape(FOR) || myDataStructure->HasSameDomain(FOR)) @@ -421,7 +421,7 @@ void TopOpeBRepBuild_Builder1::GFillWireNotSameDomWES(const TopoDS_Shape& W, TopAbs_State TB1,TB2; G1.StatesON(TB1,TB2); Standard_Boolean RevOri1 = G1.IsToReverse1(); - TopoDS_Shape WW = W; //WW.Orientation(TopAbs_FORWARD); + const TopoDS_Shape& WW = W; //WW.Orientation(TopAbs_FORWARD); TopOpeBRepTool_ShapeExplorer exEdge(WW,TopAbs_EDGE); for (; exEdge.More(); exEdge.Next()) { @@ -518,7 +518,7 @@ void TopOpeBRepBuild_Builder1::GFillFaceSameDomSFS(const TopoDS_Shape& FOR, if(myDataStructure -> DS().AncestorRank(FOR) != 1) return; - TopOpeBRepBuild_GTopo G1 = Gin; + const TopOpeBRepBuild_GTopo& G1 = Gin; TopAbs_State TB1,TB2; G1.StatesON(TB1,TB2); @@ -696,7 +696,7 @@ void TopOpeBRepBuild_Builder1::GFillWireSameDomWES(const TopoDS_Shape& W, { TopAbs_State TB1,TB2; G1.StatesON(TB1,TB2); - TopoDS_Shape WW = W; //WW.Orientation(TopAbs_FORWARD); + const TopoDS_Shape& WW = W; //WW.Orientation(TopAbs_FORWARD); Standard_Integer iref = myDataStructure -> DS().AncestorRank(W); diff --git a/src/TopOpeBRepBuild/TopOpeBRepBuild_Builder1_1.cxx b/src/TopOpeBRepBuild/TopOpeBRepBuild_Builder1_1.cxx index 498fe590b0..7ec0ae15a6 100644 --- a/src/TopOpeBRepBuild/TopOpeBRepBuild_Builder1_1.cxx +++ b/src/TopOpeBRepBuild/TopOpeBRepBuild_Builder1_1.cxx @@ -488,7 +488,7 @@ void DumpMapOfShapeWithState (const Standard_Integer iP, ////// aSplFacesState in order to propagate the state for faces. nE=anEdgesToRestMap.Extent(); for (k=1; k<=nE; k++) { - const TopoDS_Shape anEdge=anEdgesToRestMap(k); + const TopoDS_Shape& anEdge=anEdgesToRestMap(k); if (aMapOfShapeWithState.Contains (anEdge)) { const TopOpeBRepDS_ShapeWithState& aSWS=aMapOfShapeWithState.FindFromKey(anEdge); TopAbs_State aState=aSWS.State(); diff --git a/src/TopOpeBRepBuild/TopOpeBRepBuild_CorrectFace2d.cxx b/src/TopOpeBRepBuild/TopOpeBRepBuild_CorrectFace2d.cxx index 9c1054aa0f..fb4954f3ef 100644 --- a/src/TopOpeBRepBuild/TopOpeBRepBuild_CorrectFace2d.cxx +++ b/src/TopOpeBRepBuild/TopOpeBRepBuild_CorrectFace2d.cxx @@ -260,7 +260,7 @@ TopOpeBRepBuild_CorrectFace2d::TopOpeBRepBuild_CorrectFace2d() anEdgeExists=0; aWExp.Init(aWire, TopAbs_EDGE); for (; aWExp.More(); aWExp.Next()) { - TopoDS_Shape anEdge=aWExp.Current(); + const TopoDS_Shape& anEdge=aWExp.Current(); if (myCopyAvoidMap.Contains(anEdge)) { anEdgeExists=1; break; @@ -346,7 +346,7 @@ TopOpeBRepBuild_CorrectFace2d::TopOpeBRepBuild_CorrectFace2d() aWExp.Init(myCurrentWire, TopAbs_EDGE); for (; aWExp.More(); aWExp.Next(), aNbEdges++) { - TopoDS_Shape anEdge=aWExp.Current(); + const TopoDS_Shape& anEdge=aWExp.Current(); if (aCopyAvoidMap.Contains(anEdge)) anAvoidMap.Add(anEdge); } diff --git a/src/TopOpeBRepBuild/TopOpeBRepBuild_GridFF.cxx b/src/TopOpeBRepBuild/TopOpeBRepBuild_GridFF.cxx index 2baa392faf..7112add40f 100644 --- a/src/TopOpeBRepBuild/TopOpeBRepBuild_GridFF.cxx +++ b/src/TopOpeBRepBuild/TopOpeBRepBuild_GridFF.cxx @@ -637,7 +637,7 @@ static Standard_Boolean FUN_validF1edge(const TopoDS_Shape& F) if(tSPS) debfille(iE); #endif - TopOpeBRepBuild_GTopo GME = G1; + const TopOpeBRepBuild_GTopo& GME = G1; GMergeEdgeWES(EOR,GME,WES); TopOpeBRepBuild_GTopo GSE = G1; diff --git a/src/TopOpeBRepBuild/TopOpeBRepBuild_GridSS.cxx b/src/TopOpeBRepBuild/TopOpeBRepBuild_GridSS.cxx index d6183fadc5..59250b94fb 100644 --- a/src/TopOpeBRepBuild/TopOpeBRepBuild_GridSS.cxx +++ b/src/TopOpeBRepBuild/TopOpeBRepBuild_GridSS.cxx @@ -79,7 +79,7 @@ Standard_EXPORT void TopOpeBRepDS_SetThePCurve //(const TopoDS_Face& fF,const TopoDS_Edge& E,Standard_Real& splitpar); //--------------------------------------------- -static Standard_Integer FUN_getG(const gp_Pnt& P,const TopOpeBRepDS_ListOfInterference& LI,const Handle(TopOpeBRepDS_HDataStructure) HDS,Standard_Integer& iEinterf) +static Standard_Integer FUN_getG(const gp_Pnt& P,const TopOpeBRepDS_ListOfInterference& LI,const Handle(TopOpeBRepDS_HDataStructure)& HDS,Standard_Integer& iEinterf) //--------------------------------------------- { TopOpeBRepDS_ListIteratorOfListOfInterference ILI(LI); @@ -119,7 +119,7 @@ static Standard_Integer FUN_getG(const gp_Pnt& P,const TopOpeBRepDS_ListOfInterf #define DECREASEPERIOD (-1) static Standard_Boolean FUN_EPIforEvisoONperiodicF -(const TopoDS_Edge& E,const TopoDS_Face& F,const TopOpeBRepDS_ListOfInterference& EPIlist,const Handle(TopOpeBRepDS_HDataStructure) HDS,TopOpeBRepDS_ListOfInterference& loCPI) +(const TopoDS_Edge& E,const TopoDS_Face& F,const TopOpeBRepDS_ListOfInterference& EPIlist,const Handle(TopOpeBRepDS_HDataStructure)& HDS,TopOpeBRepDS_ListOfInterference& loCPI) { Standard_Real parone=-1.e7; TopOpeBRepTool_CORRISO CORRISO(F); CORRISO.Init(F); diff --git a/src/TopOpeBRepBuild/TopOpeBRepBuild_Merge.cxx b/src/TopOpeBRepBuild/TopOpeBRepBuild_Merge.cxx index 07a1771604..4c353a2dfa 100644 --- a/src/TopOpeBRepBuild/TopOpeBRepBuild_Merge.cxx +++ b/src/TopOpeBRepBuild/TopOpeBRepBuild_Merge.cxx @@ -144,7 +144,7 @@ static void CorrectUnclosedWire(TopoDS_Shape& aWire) for(i = 1; i <= nbVer; i++) { const TopTools_ListOfShape& Elist = VElists.FindFromIndex(i); if(Elist.Extent() == 1) { - TopoDS_Shape anEdge = Elist.First(); + const TopoDS_Shape& anEdge = Elist.First(); // std::cout << "Remove redundant edge" << std::endl; BB.Remove(aWire, anEdge); } @@ -345,7 +345,7 @@ void TopOpeBRepBuild_Builder::MakeSolids(TopOpeBRepBuild_SolidBuilder& SOBU,TopT else { myBuildTool.MakeShell(newShell); for (SOBU.InitFace(); SOBU.MoreFace(); SOBU.NextFace()) { - TopoDS_Shape F = SOBU.Face(); + const TopoDS_Shape& F = SOBU.Face(); myBuildTool.AddShellFace(newShell,F); } } @@ -369,7 +369,7 @@ void TopOpeBRepBuild_Builder::MakeShells(TopOpeBRepBuild_SolidBuilder& SOBU,TopT else { myBuildTool.MakeShell(newShell); for (SOBU.InitFace(); SOBU.MoreFace(); SOBU.NextFace()) { - TopoDS_Shape F = SOBU.Face(); + const TopoDS_Shape& F = SOBU.Face(); myBuildTool.AddShellFace(newShell,F); } } @@ -413,7 +413,7 @@ void TopOpeBRepBuild_Builder::MakeFaces(const TopoDS_Shape& aFace,TopOpeBRepBuil else { myBuildTool.MakeWire(newWire); for(FABU.InitEdge(); FABU.MoreEdge(); FABU.NextEdge()) { - TopoDS_Shape E = FABU.Edge(); + const TopoDS_Shape& E = FABU.Edge(); if (hns) myBuildTool.UpdateSurface(E,aFace,newFace); myBuildTool.AddWireEdge(newWire,E); } diff --git a/src/TopOpeBRepBuild/TopOpeBRepBuild_Tools.cxx b/src/TopOpeBRepBuild/TopOpeBRepBuild_Tools.cxx index 30bda5260c..99266bb619 100644 --- a/src/TopOpeBRepBuild/TopOpeBRepBuild_Tools.cxx +++ b/src/TopOpeBRepBuild/TopOpeBRepBuild_Tools.cxx @@ -400,8 +400,8 @@ const Standard_Real PAR_T = 0.43213918; const TopoDS_Edge& anEdgeObj, gp_Vec& aNormal) { - TopoDS_Edge aEd=anEdgeObj; - TopoDS_Face aFS=aFObj; + const TopoDS_Edge& aEd=anEdgeObj; + const TopoDS_Face& aFS=aFObj; Standard_Real f2 = 0., l2 = 0., tolpc = 0., f = 0., l = 0., par = 0.; Handle(Geom2d_Curve) C2D=FC2D_CurveOnSurface(aEd,aFS,f2,l2,tolpc, Standard_True); @@ -551,7 +551,7 @@ Standard_Boolean TopOpeBRepBuild_Tools::GetTangentToEdgeEdge (const TopoDS_Face& Standard_Boolean TopOpeBRepBuild_Tools::GetTangentToEdge (const TopoDS_Edge& anEdgeObj, gp_Vec& aTangent) { - TopoDS_Edge aEd=anEdgeObj; + const TopoDS_Edge& aEd=anEdgeObj; Standard_Real f = 0., l = 0., par = 0.; @@ -662,8 +662,8 @@ void TopOpeBRepBuild_Tools::UpdateEdgeOnPeriodicalFace(const TopoDS_Edge& aEdgeT Standard_Boolean DiffOriented = Standard_False; BRep_Builder BB; TopoDS_Edge newE = aEdgeToUpdate; //newE.Orientation(TopAbs_FORWARD); - TopoDS_Face fFace = fromFace; //fFace.Orientation(TopAbs_FORWARD); - TopoDS_Face tFace = toFace; //tFace.Orientation(TopAbs_FORWARD); + const TopoDS_Face& fFace = fromFace; //fFace.Orientation(TopAbs_FORWARD); + const TopoDS_Face& tFace = toFace; //tFace.Orientation(TopAbs_FORWARD); Standard_Real fc = 0., lc = 0.; Handle(Geom2d_Curve) cc = BRep_Tool::CurveOnSurface(newE, tFace, fc, lc); diff --git a/src/TopOpeBRepBuild/TopOpeBRepBuild_makesolids.cxx b/src/TopOpeBRepBuild/TopOpeBRepBuild_makesolids.cxx index 02c3dc6622..12f64e5151 100644 --- a/src/TopOpeBRepBuild/TopOpeBRepBuild_makesolids.cxx +++ b/src/TopOpeBRepBuild/TopOpeBRepBuild_makesolids.cxx @@ -79,7 +79,7 @@ void TopOpeBRepBuild_Builder::GSOBUMakeSolids myBuildTool.MakeShell(newShell); nfa = SOBU.InitFace(); for (; SOBU.MoreFace(); SOBU.NextFace()) { - TopoDS_Shape F = SOBU.Face(); + const TopoDS_Shape& F = SOBU.Face(); myBuildTool.AddShellFace(newShell,F); } } diff --git a/src/TopOpeBRepDS/TopOpeBRepDS_BuildTool.cxx b/src/TopOpeBRepDS/TopOpeBRepDS_BuildTool.cxx index 9675131b9d..eb015b0908 100644 --- a/src/TopOpeBRepDS/TopOpeBRepDS_BuildTool.cxx +++ b/src/TopOpeBRepDS/TopOpeBRepDS_BuildTool.cxx @@ -250,7 +250,7 @@ void TopOpeBRepDS_BuildTool::MakeEdge // Creation d'une arete avec PCurve connectee a la BDS Curve // JYL 22-09-94 - Handle(TopOpeBRepDS_Interference) I = C.GetSCI1(); + const Handle(TopOpeBRepDS_Interference)& I = C.GetSCI1(); Handle(TopOpeBRepDS_SurfaceCurveInterference) SCI; SCI=Handle(TopOpeBRepDS_SurfaceCurveInterference)::DownCast(I); Standard_Integer iS = SCI->Support(); @@ -569,8 +569,8 @@ void TopOpeBRepDS_BuildTool::ApproxCurves //purpose : //======================================================================= Standard_Boolean FUN_getUV -(const Handle(Geom_Surface) surf, - const Handle(Geom_Curve) C3D, +(const Handle(Geom_Surface)& surf, + const Handle(Geom_Curve)& C3D, const Standard_Real par3d, Standard_Real& u0, Standard_Real& v0) @@ -609,7 +609,7 @@ Standard_Boolean FUN_reversePC } Standard_Boolean FUN_makeUisoLineOnSphe (const TopoDS_Face& F, // with geometry the spherical surface - const Handle(Geom_Curve) C3D, + const Handle(Geom_Curve)& C3D, Handle(Geom2d_Curve) PCnew, const Standard_Real tol3d) { @@ -743,13 +743,13 @@ void TopOpeBRepDS_BuildTool::PutPCurves { TopoDS_Face& F1 = *((TopoDS_Face*)(void*)&(TopoDS::Face(newC.Shape1()))); - Handle(Geom2d_Curve) PC1 = newC.Curve1(); + const Handle(Geom2d_Curve)& PC1 = newC.Curve1(); if (!PC1.IsNull() && comppc1) { PCurve(F1,E,PC1); } TopoDS_Face& F2 = *((TopoDS_Face*)(void*)&(TopoDS::Face(newC.Shape2()))); - Handle(Geom2d_Curve) PC2 = newC.Curve2(); + const Handle(Geom2d_Curve)& PC2 = newC.Curve2(); if (!PC2.IsNull() && comppc2) { PCurve(F2,E,PC2); } @@ -1191,7 +1191,7 @@ void TopOpeBRepDS_BuildTool::PCurve(TopoDS_Shape& F, TopoDS_Face FF = TopoDS::Face(F); TopoDS_Edge EE = TopoDS::Edge(E); - Handle(Geom2d_Curve) PCT = PC; + const Handle(Geom2d_Curve)& PCT = PC; Standard_Real CDSmin,CDSmax; Standard_Boolean rangedef = CDS.Range(CDSmin,CDSmax); diff --git a/src/TopOpeBRepDS/TopOpeBRepDS_ProcessFaceInterferences.cxx b/src/TopOpeBRepDS/TopOpeBRepDS_ProcessFaceInterferences.cxx index 7c76e98149..c4011210c7 100644 --- a/src/TopOpeBRepDS/TopOpeBRepDS_ProcessFaceInterferences.cxx +++ b/src/TopOpeBRepDS/TopOpeBRepDS_ProcessFaceInterferences.cxx @@ -291,7 +291,7 @@ Standard_EXPORT void FUN_resolveFUNKNOWN // to determine transition relatively solid rather then face // if possible (see pb. in CFE002 C2, when SIX==13) Standard_Integer rankFS = BDS.AncestorRank(S1); - TopoDS_Shape aSRef = BDS.Shape(rankFS); + const TopoDS_Shape& aSRef = BDS.Shape(rankFS); TopExp_Explorer ex(aSRef,TopAbs_SOLID); if (ex.More()) { pClass = pClassif; diff --git a/src/TopOpeBRepTool/TopOpeBRepTool_TOOL.cxx b/src/TopOpeBRepTool/TopOpeBRepTool_TOOL.cxx index d87c9d7a85..b21735f179 100644 --- a/src/TopOpeBRepTool/TopOpeBRepTool_TOOL.cxx +++ b/src/TopOpeBRepTool/TopOpeBRepTool_TOOL.cxx @@ -333,7 +333,7 @@ Standard_Integer TopOpeBRepTool_TOOL::OnBoundary(const Standard_Real par, const -static void FUN_tool_sortVonE(TopTools_ListOfShape& lov, const TopoDS_Edge E) +static void FUN_tool_sortVonE(TopTools_ListOfShape& lov, const TopoDS_Edge& E) { TopTools_DataMapOfIntegerShape mapiv;// mapiv.Find(iV) = V TColStd_IndexedMapOfReal mappar; // mappar.FindIndex(parV) = iV diff --git a/src/TopoDS/TopoDS_Iterator.hxx b/src/TopoDS/TopoDS_Iterator.hxx index b1ab7c4929..65aa4faf93 100644 --- a/src/TopoDS/TopoDS_Iterator.hxx +++ b/src/TopoDS/TopoDS_Iterator.hxx @@ -35,7 +35,7 @@ public: DEFINE_STANDARD_ALLOC //! Creates an empty Iterator. - TopoDS_Iterator() {} + TopoDS_Iterator() : myOrientation(TopAbs_FORWARD) {} //! Creates an Iterator on sub-shapes. //! Note: diff --git a/src/TopoDSToStep/TopoDSToStep_WireframeBuilder.cxx b/src/TopoDSToStep/TopoDSToStep_WireframeBuilder.cxx index 673e55459a..e21537d1d1 100644 --- a/src/TopoDSToStep/TopoDSToStep_WireframeBuilder.cxx +++ b/src/TopoDSToStep/TopoDSToStep_WireframeBuilder.cxx @@ -109,8 +109,8 @@ const Handle(TColStd_HSequenceOfTransient)& TopoDSToStep_WireframeBuilder::Value #define Nbpt 23 static Handle(StepGeom_TrimmedCurve) MakeTrimmedCurve (const Handle(StepGeom_Curve) &C, - const Handle(StepGeom_CartesianPoint) P1, - const Handle(StepGeom_CartesianPoint) P2, + const Handle(StepGeom_CartesianPoint)& P1, + const Handle(StepGeom_CartesianPoint)& P2, Standard_Real trim1, Standard_Real trim2, Standard_Boolean sense) @@ -209,7 +209,7 @@ Standard_Boolean TopoDSToStep_WireframeBuilder:: { return Standard_False; } - Handle(StepGeom_Curve) aPMSC = aGTSMC.Value(); + const Handle(StepGeom_Curve)& aPMSC = aGTSMC.Value(); // trim the curve Standard_Real aTrim1 = aCA.FirstParameter(); diff --git a/src/Transfer/Transfer_Finder.cxx b/src/Transfer/Transfer_Finder.cxx index b23b49de1b..1fba56d936 100644 --- a/src/Transfer/Transfer_Finder.cxx +++ b/src/Transfer/Transfer_Finder.cxx @@ -179,9 +179,9 @@ NCollection_DataMap& Transf NCollection_DataMap::Iterator iter(list); for (; iter.More(); iter.Next()) { - TCollection_AsciiString name = iter.Key(); + const TCollection_AsciiString& name = iter.Key(); if (!name.StartsWith(fromname)) continue; - Handle(Standard_Transient) atr = iter.Value(); + const Handle(Standard_Transient)& atr = iter.Value(); Handle(Standard_Transient) newatr = atr; // Copy ? according type diff --git a/src/Transfer/Transfer_TransferInput.cxx b/src/Transfer/Transfer_TransferInput.cxx index 05232fed00..6024faef97 100644 --- a/src/Transfer/Transfer_TransferInput.cxx +++ b/src/Transfer/Transfer_TransferInput.cxx @@ -37,7 +37,7 @@ Transfer_TransferInput::Transfer_TransferInput () { } { Interface_EntityIterator iter; for (list.Start(); list.More(); list.Next()) { - Handle(Transfer_Binder) binder = list.Value(); + const Handle(Transfer_Binder)& binder = list.Value(); if (binder.IsNull()) continue; if (binder->IsKind(STANDARD_TYPE(Transfer_VoidBinder))) continue; diff --git a/src/Transfer/Transfer_TransferOutput.cxx b/src/Transfer/Transfer_TransferOutput.cxx index 1bd7d194c1..f62c60b13a 100644 --- a/src/Transfer/Transfer_TransferOutput.cxx +++ b/src/Transfer/Transfer_TransferOutput.cxx @@ -93,7 +93,7 @@ void Transfer_TransferOutput::TransferRoots (const Handle(Interface_Protocol)& p Interface_EntityIterator list = tool.RootEntities(); Message_ProgressScope aPS(theProgress, NULL, list.NbEntities()); for (list.Start(); list.More() && aPS.More(); list.Next()) { - Handle(Standard_Transient) ent = list.Value(); + const Handle(Standard_Transient)& ent = list.Value(); // Standard_Integer scope = 0; // if (thescope) scope = theproc->NewScope (ent); if (theproc->Transfer (ent, aPS.Next())) theproc->SetRoot(ent); @@ -110,7 +110,7 @@ void Transfer_TransferOutput::TransferRoots (const Interface_Graph& G, Interface_EntityIterator list = tool.RootEntities(); Message_ProgressScope aPS(theProgress, NULL, list.NbEntities()); for (list.Start(); list.More() && aPS.More(); list.Next()) { - Handle(Standard_Transient) ent = list.Value(); + const Handle(Standard_Transient)& ent = list.Value(); // Standard_Integer scope = 0; // if (thescope) scope = theproc->NewScope (ent); if (theproc->Transfer (ent, aPS.Next())) theproc->SetRoot(ent); diff --git a/src/TransferBRep/TransferBRep.cxx b/src/TransferBRep/TransferBRep.cxx index b3830b1182..070a1ed855 100644 --- a/src/TransferBRep/TransferBRep.cxx +++ b/src/TransferBRep/TransferBRep.cxx @@ -109,7 +109,7 @@ static void ShapeAppend (roots ? TP->RootResult() : TP->CompleteResult()); for (list.Start(); list.More(); list.Next()) { - Handle(Transfer_Binder) binder = list.Value(); + const Handle(Transfer_Binder)& binder = list.Value(); ShapeAppend (binder,shapes); } return shapes; @@ -320,7 +320,7 @@ Interface_CheckIterator TransferBRep::BRepCheck nchl.SetModel(model); for (chl.Start(); chl.More(); chl.Next()) { Standard_Integer num = 0; - Handle(Interface_Check) ach = chl.Value(); + const Handle(Interface_Check)& ach = chl.Value(); if (ach->NbFails() + ach->NbWarnings() == 0) continue; DeclareAndCast(Transfer_Finder,starting,ach->Entity()); Handle(Standard_Transient) ent; @@ -339,7 +339,7 @@ Interface_CheckIterator TransferBRep::BRepCheck { Handle(TColStd_HSequenceOfTransient) ls = new TColStd_HSequenceOfTransient(); for (chl.Start(); chl.More(); chl.Next()) { - const Handle(Interface_Check) ach = chl.Value(); + const Handle(Interface_Check)& ach = chl.Value(); if (ach->NbFails() + ach->NbWarnings() == 0) continue; Handle(Standard_Transient) ent = ach->Entity(); if (ent.IsNull()) continue; @@ -358,7 +358,7 @@ Interface_CheckIterator TransferBRep::BRepCheck { Handle(TopTools_HSequenceOfShape) ls = new TopTools_HSequenceOfShape(); for (chl.Start(); chl.More(); chl.Next()) { - const Handle(Interface_Check) ach = chl.Value(); + const Handle(Interface_Check)& ach = chl.Value(); if (ach->NbFails() + ach->NbWarnings() == 0) continue; Handle(Standard_Transient) ent = ach->Entity(); if (ent.IsNull()) continue; @@ -385,13 +385,13 @@ Interface_CheckIterator TransferBRep::BRepCheck Interface_CheckIterator nchl; for (chl.Start(); chl.More(); chl.Next()) { - const Handle(Interface_Check) ach = chl.Value(); + const Handle(Interface_Check)& ach = chl.Value(); if (ach->NbFails() + ach->NbWarnings() == 0) continue; Handle(Standard_Transient) ent = ach->Entity(); if (ent.IsNull()) continue; if (S.IsNull()) { if (ent == obj) { - Handle(Interface_Check) bch(ach); bch->SetEntity(ent); + const Handle(Interface_Check)& bch(ach); bch->SetEntity(ent); nchl.Add (bch,0); } } else { @@ -403,7 +403,7 @@ Interface_CheckIterator TransferBRep::BRepCheck if (!sbs.IsNull()) sh = sbs->Result(); if (!smp.IsNull()) sh = smp->Value(); if (sh == S) { - Handle(Interface_Check) bch(ach); bch->SetEntity(ent); + const Handle(Interface_Check)& bch(ach); bch->SetEntity(ent); nchl.Add (bch,0); } } diff --git a/src/Units/Units_UnitSentence.cxx b/src/Units/Units_UnitSentence.cxx index f8465da8e9..bfcba500c7 100644 --- a/src/Units/Units_UnitSentence.cxx +++ b/src/Units/Units_UnitSentence.cxx @@ -186,10 +186,9 @@ void Units_UnitSentence::SetUnits Handle(Units_Unit) unit; TCollection_AsciiString symbol; - Handle(Units_QuantitiesSequence) quantitiessequence = aquantitiessequence; - - for(index=1; index<=quantitiessequence->Length(); index++) { - quantity = quantitiessequence->Value(index); + for(index=1; index<=aquantitiessequence->Length(); index++) + { + quantity = aquantitiessequence->Value(index); unitssequence=quantity->Sequence(); for(jindex=1; jindex<=unitssequence->Length(); jindex++) { unit = unitssequence->Value(jindex); diff --git a/src/ViewerTest/ViewerTest.cxx b/src/ViewerTest/ViewerTest.cxx index 0d9fe25ead..9fb0cfea5a 100644 --- a/src/ViewerTest/ViewerTest.cxx +++ b/src/ViewerTest/ViewerTest.cxx @@ -696,7 +696,7 @@ void ViewerTest::Clear() NCollection_Sequence aListRemoved; for (ViewerTest_DoubleMapIteratorOfDoubleMapOfInteractiveAndName anObjIter (GetMapOfAIS()); anObjIter.More(); anObjIter.Next()) { - const Handle(AIS_InteractiveObject) anObj = anObjIter.Key1(); + const Handle(AIS_InteractiveObject)& anObj = anObjIter.Key1(); if (anObj->GetContext() != TheAISContext()) { continue; @@ -3363,7 +3363,7 @@ static Standard_Integer VAspects (Draw_Interpretor& theDI, // redisplay all objects in context for (ViewTest_PrsIter aPrsIter (aNames); aPrsIter.More(); aPrsIter.Next()) { - Handle(AIS_InteractiveObject) aPrs = aPrsIter.Current(); + const Handle(AIS_InteractiveObject)& aPrs = aPrsIter.Current(); if (!aPrs.IsNull()) { aCtx->Redisplay (aPrs, Standard_False); @@ -3612,7 +3612,7 @@ static int VDonly2 (Draw_Interpretor& , continue; } - if (Handle(AIS_InteractiveObject) aShape = anIter.Key1()) + if (const Handle(AIS_InteractiveObject)& aShape = anIter.Key1()) { aCtx->Erase (aShape, Standard_False); } @@ -3884,7 +3884,7 @@ int VErase (Draw_Interpretor& theDI, for (ViewerTest_DoubleMapIteratorOfDoubleMapOfInteractiveAndName anIter (GetMapOfAIS()); anIter.More(); anIter.Next()) { - const Handle(AIS_InteractiveObject) anIO = anIter.Key1(); + const Handle(AIS_InteractiveObject)& anIO = anIter.Key1(); if (!anIO.IsNull() && aCtx->IsSelected (anIO)) { @@ -3907,7 +3907,7 @@ int VErase (Draw_Interpretor& theDI, for (ViewerTest_DoubleMapIteratorOfDoubleMapOfInteractiveAndName anIter (GetMapOfAIS()); anIter.More(); anIter.Next()) { - Handle(AIS_InteractiveObject) anIO = anIter.Key1(); + const Handle(AIS_InteractiveObject)& anIO = anIter.Key1(); if (!anIO.IsNull()) { if (toEraseInView) @@ -4156,7 +4156,7 @@ int VBounding (Draw_Interpretor& theDI, for (ViewerTest_DoubleMapIteratorOfDoubleMapOfInteractiveAndName anIter (GetMapOfAIS()); anIter.More(); anIter.Next()) { - Handle(AIS_InteractiveObject) anIO = anIter.Key1(); + const Handle(AIS_InteractiveObject)& anIO = anIter.Key1(); aHighlightedMode = checkMode (aCtx, anIO, aMode); if (aHighlightedMode != -1) { diff --git a/src/ViewerTest/ViewerTest_ObjectCommands.cxx b/src/ViewerTest/ViewerTest_ObjectCommands.cxx index 69481addee..a28963a606 100644 --- a/src/ViewerTest/ViewerTest_ObjectCommands.cxx +++ b/src/ViewerTest/ViewerTest_ObjectCommands.cxx @@ -1310,7 +1310,7 @@ static Standard_Integer VPlaneBuilder (Draw_Interpretor& /*di*/, // Construction of AIS_Plane GC_MakePlane MkPlane (A,B,C); - Handle(Geom_Plane) aGeomPlane = MkPlane.Value(); + const Handle(Geom_Plane)& aGeomPlane = MkPlane.Value(); Handle(AIS_Plane) anAISPlane = new AIS_Plane (aGeomPlane); GetMapOfAIS().Bind (anAISPlane, aName); if (argc == 6) @@ -1494,7 +1494,7 @@ static Standard_Integer VPlaneBuilder (Draw_Interpretor& /*di*/, gp_Pnt aBa = BRep_Tool::Pnt(aVBa); gp_Pnt aBb = BRep_Tool::Pnt(aVBb); GC_MakePlane MkPlane (A, aBa, aBb); - Handle(Geom_Plane) aGeomPlane = MkPlane.Value(); + const Handle(Geom_Plane)& aGeomPlane = MkPlane.Value(); Handle(AIS_Plane) anAISPlane = new AIS_Plane (aGeomPlane); GetMapOfAIS().Bind (anAISPlane, aName); TheAISContext()->Display (anAISPlane, Standard_True); @@ -1521,7 +1521,7 @@ static Standard_Integer VPlaneBuilder (Draw_Interpretor& /*di*/, gp_Pnt B = BRep_Tool::Pnt(TopoDS::Vertex(aShapeB)); gp_Pnt C = BRep_Tool::Pnt(TopoDS::Vertex(aShapeC)); GC_MakePlane MkPlane(A, B, C); - Handle(Geom_Plane) aGeomPlane = MkPlane.Value(); + const Handle(Geom_Plane)& aGeomPlane = MkPlane.Value(); Handle(AIS_Plane) anAISPlane = new AIS_Plane (aGeomPlane); GetMapOfAIS().Bind (anAISPlane, aName); TheAISContext()->Display (anAISPlane, Standard_True); @@ -1565,7 +1565,7 @@ static Standard_Integer VPlaneBuilder (Draw_Interpretor& /*di*/, gp_Pnt Aa = BRep_Tool::Pnt(aVAa); gp_Pnt Ab = BRep_Tool::Pnt(aVAb); GC_MakePlane MkPlane (B,Aa,Ab); - Handle(Geom_Plane) aGeomPlane = MkPlane.Value(); + const Handle(Geom_Plane)& aGeomPlane = MkPlane.Value(); Handle(AIS_Plane) anAISPlane = new AIS_Plane (aGeomPlane); GetMapOfAIS().Bind (anAISPlane ,aName); TheAISContext()->Display (anAISPlane, Standard_True); @@ -3345,7 +3345,7 @@ class MyPArrayObject : public AIS_InteractiveObject virtual void ComputeSelection (const Handle(SelectMgr_Selection)& theSel, const Standard_Integer theMode) Standard_OVERRIDE; - bool CheckInputCommand (const TCollection_AsciiString theCommand, + bool CheckInputCommand (const TCollection_AsciiString& theCommand, const Handle(TColStd_HArray1OfAsciiString)& theArgsArray, Standard_Integer &theArgIndex, Standard_Integer theArgCount, @@ -3655,7 +3655,7 @@ void MyPArrayObject::ComputeSelection (const Handle(SelectMgr_Selection)& theSel } } -bool MyPArrayObject::CheckInputCommand (const TCollection_AsciiString theCommand, +bool MyPArrayObject::CheckInputCommand (const TCollection_AsciiString& theCommand, const Handle(TColStd_HArray1OfAsciiString)& theArgsArray, Standard_Integer &theArgIndex, Standard_Integer theArgCount, diff --git a/src/ViewerTest/ViewerTest_OpenGlCommands.cxx b/src/ViewerTest/ViewerTest_OpenGlCommands.cxx index 1e4b15f9d0..52fe660b72 100644 --- a/src/ViewerTest/ViewerTest_OpenGlCommands.cxx +++ b/src/ViewerTest/ViewerTest_OpenGlCommands.cxx @@ -747,7 +747,7 @@ static Standard_Integer VListMaterials (Draw_Interpretor& theDI, for (NCollection_Sequence::Iterator aMatIter (aMatList); aMatIter.More(); aMatIter.Next(), ++aMatIndex) { Graphic3d_MaterialAspect aMat (aMatIter.Value()); - const TCollection_AsciiString aMatName = aMat.StringName(); + const TCollection_AsciiString& aMatName = aMat.StringName(); const Graphic3d_Vec3 anAmbient = (Graphic3d_Vec3 )aMat.AmbientColor(); const Graphic3d_Vec3 aDiffuse = (Graphic3d_Vec3 )aMat.DiffuseColor(); const Graphic3d_Vec3 aSpecular = (Graphic3d_Vec3 )aMat.SpecularColor(); diff --git a/src/ViewerTest/ViewerTest_ViewerCommands.cxx b/src/ViewerTest/ViewerTest_ViewerCommands.cxx index 15ad3942b3..79f59ac43f 100644 --- a/src/ViewerTest/ViewerTest_ViewerCommands.cxx +++ b/src/ViewerTest/ViewerTest_ViewerCommands.cxx @@ -1470,7 +1470,7 @@ static TCollection_AsciiString FindViewIdByWindowHandle (Aspect_Drawable theWind void ActivateView (const TCollection_AsciiString& theViewName, Standard_Boolean theToUpdate = Standard_True) { - if (const Handle(V3d_View) aView = ViewerTest_myViews.Find1(theViewName)) + if (const Handle(V3d_View)& aView = ViewerTest_myViews.Find1(theViewName)) { ViewerTest::ActivateView (aView, theToUpdate); } @@ -1483,7 +1483,7 @@ void ActivateView (const TCollection_AsciiString& theViewName, void ViewerTest::ActivateView (const Handle(V3d_View)& theView, Standard_Boolean theToUpdate) { - Handle(V3d_View) aView = theView; + const Handle(V3d_View)& aView = theView; const TCollection_AsciiString* aViewName = ViewerTest_myViews.Seek2 (aView); if (aViewName == nullptr) { @@ -1538,7 +1538,7 @@ void ViewerTest::RemoveView (const Handle(V3d_View)& theView, return; } - const TCollection_AsciiString aViewName = ViewerTest_myViews.Find2 (theView); + const TCollection_AsciiString& aViewName = ViewerTest_myViews.Find2 (theView); RemoveView (aViewName, theToRemoveContext); } @@ -7147,7 +7147,7 @@ static Standard_Integer V2DMode (Draw_Interpretor&, Standard_Integer theArgsNb, && anArgCase == "-name") { ViewerTest_Names aViewNames (theArgVec[++anArgIt]); - TCollection_AsciiString aViewName = aViewNames.GetViewName(); + const TCollection_AsciiString& aViewName = aViewNames.GetViewName(); if (!ViewerTest_myViews.IsBound1 (aViewName)) { Message::SendFail() << "Syntax error: unknown view '" << theArgVec[anArgIt - 1] << "'"; @@ -8842,7 +8842,7 @@ static int VClipPlane (Draw_Interpretor& theDi, Standard_Integer theArgsNb, cons else if (!toOverrideGlobal && ViewerTest_myViews.IsBound1 (anEntityName)) { - Handle(V3d_View) aView = ViewerTest_myViews.Find1 (anEntityName); + const Handle(V3d_View)& aView = ViewerTest_myViews.Find1 (anEntityName); if (toSet) { aView->AddClipPlane (aClipPlane); diff --git a/src/VrmlData/VrmlData_Scene.cxx b/src/VrmlData/VrmlData_Scene.cxx index a263c23bbd..44562e3438 100644 --- a/src/VrmlData/VrmlData_Scene.cxx +++ b/src/VrmlData/VrmlData_Scene.cxx @@ -228,7 +228,7 @@ VrmlData_ErrorStatus VrmlData_Scene::readLine(VrmlData_InBuffer& theBuffer) { return VrmlData_UnrecoverableError; } - theBuffer.Input.seekg(-(aNbChars - anInd - 1), std::ios::cur); + theBuffer.Input.seekg(-static_cast((aNbChars - anInd - 1)), std::ios::cur); } // Check the reading status. diff --git a/src/XCAFDoc/XCAFDoc_ClippingPlaneTool.cxx b/src/XCAFDoc/XCAFDoc_ClippingPlaneTool.cxx index e0a23ed09f..9aa2b20c8b 100644 --- a/src/XCAFDoc/XCAFDoc_ClippingPlaneTool.cxx +++ b/src/XCAFDoc/XCAFDoc_ClippingPlaneTool.cxx @@ -100,7 +100,7 @@ Standard_Boolean XCAFDoc_ClippingPlaneTool::GetClippingPlane(const TDF_Label& th //purpose : //======================================================================= -TDF_Label XCAFDoc_ClippingPlaneTool::AddClippingPlane(const gp_Pln& thePlane, const TCollection_ExtendedString theName) const +TDF_Label XCAFDoc_ClippingPlaneTool::AddClippingPlane(const gp_Pln& thePlane, const TCollection_ExtendedString& theName) const { TDF_Label aLabel; TDF_LabelSequence aClippingPlanes; @@ -149,7 +149,7 @@ TDF_Label XCAFDoc_ClippingPlaneTool::AddClippingPlane(const gp_Pln& thePlane, co //purpose : //======================================================================= -TDF_Label XCAFDoc_ClippingPlaneTool::AddClippingPlane(const gp_Pln& thePlane, const TCollection_ExtendedString theName, const Standard_Boolean theCapping) const +TDF_Label XCAFDoc_ClippingPlaneTool::AddClippingPlane(const gp_Pln& thePlane, const TCollection_ExtendedString& theName, const Standard_Boolean theCapping) const { TDF_Label aLabel = AddClippingPlane(thePlane, theName); Standard_Integer aCappingVal = (theCapping) ? 1 : 0; @@ -206,7 +206,7 @@ void XCAFDoc_ClippingPlaneTool::GetClippingPlanes(TDF_LabelSequence& theLabels) //======================================================================= void XCAFDoc_ClippingPlaneTool::UpdateClippingPlane(const TDF_Label& theLabel, - const gp_Pln& thePlane, const TCollection_ExtendedString theName) const + const gp_Pln& thePlane, const TCollection_ExtendedString& theName) const { if (theLabel.Father() != Label()) return; diff --git a/src/XCAFDoc/XCAFDoc_ClippingPlaneTool.hxx b/src/XCAFDoc/XCAFDoc_ClippingPlaneTool.hxx index 980fec6346..f4f37ac850 100644 --- a/src/XCAFDoc/XCAFDoc_ClippingPlaneTool.hxx +++ b/src/XCAFDoc/XCAFDoc_ClippingPlaneTool.hxx @@ -60,7 +60,7 @@ public: //! Adds a clipping plane definition to a ClippingPlane table and returns //! its label (returns existing label if the same clipping plane //! is already defined) - Standard_EXPORT TDF_Label AddClippingPlane(const gp_Pln& thePlane, const TCollection_ExtendedString theName, const Standard_Boolean theCapping) const; + Standard_EXPORT TDF_Label AddClippingPlane(const gp_Pln& thePlane, const TCollection_ExtendedString& theName, const Standard_Boolean theCapping) const; //! Adds a clipping plane definition to a ClippingPlane table and returns //! its label (returns existing label if the same clipping plane @@ -70,7 +70,7 @@ public: //! Adds a clipping plane definition to a ClippingPlane table and returns //! its label (returns existing label if the same clipping plane //! is already defined) - Standard_EXPORT TDF_Label AddClippingPlane(const gp_Pln& thePlane, const TCollection_ExtendedString theName) const; + Standard_EXPORT TDF_Label AddClippingPlane(const gp_Pln& thePlane, const TCollection_ExtendedString& theName) const; //! Adds a clipping plane definition to a ClippingPlane table and returns //! its label (returns existing label if the same clipping plane @@ -87,7 +87,7 @@ public: //! Sets new value of plane and name to the given clipping plane label //! or do nothing, if the given label is not a clipping plane label - Standard_EXPORT void UpdateClippingPlane(const TDF_Label& theLabelL, const gp_Pln& thePlane, const TCollection_ExtendedString theName) const; + Standard_EXPORT void UpdateClippingPlane(const TDF_Label& theLabelL, const gp_Pln& thePlane, const TCollection_ExtendedString& theName) const; //! Set new value of capping for given clipping plane label Standard_EXPORT void SetCapping(const TDF_Label& theClippingPlaneL, const Standard_Boolean theCapping); diff --git a/src/XCAFDoc/XCAFDoc_ShapeTool.cxx b/src/XCAFDoc/XCAFDoc_ShapeTool.cxx index 67b7691d57..78f66ed244 100644 --- a/src/XCAFDoc/XCAFDoc_ShapeTool.cxx +++ b/src/XCAFDoc/XCAFDoc_ShapeTool.cxx @@ -598,7 +598,7 @@ static Standard_Boolean prepareAssembly (const TopoDS_Shape& theShape, for (; Iterator.More(); Iterator.Next()) aSubShapeSeq.Append(Iterator.Value()); for (Standard_Integer i = 1; i <= aSubShapeSeq.Length(); i++) { - TopoDS_Shape Scomp = aSubShapeSeq.Value(i); + const TopoDS_Shape& Scomp = aSubShapeSeq.Value(i); TopoDS_Shape aNewScomp; B.Remove(theOUTShape, Scomp); prepareAssembly( Scomp, aNewScomp ); @@ -1199,7 +1199,7 @@ Standard_Boolean XCAFDoc_ShapeTool::AddSubShape(const TDF_Label &shapeL, TDF_LabelSequence aShapeLSeq; for (TopoDS_Iterator it(GetShape(shapeL)); it.More() && !isDefined; it.Next()) { - TopoDS_Shape aShape = it.Value(); + const TopoDS_Shape& aShape = it.Value(); if (sub.IsSame(aShape.Located(TopLoc_Location()))) { isDefined = Standard_True; @@ -1463,7 +1463,7 @@ void XCAFDoc_ShapeTool::SetExternRefs(const TDF_Label& L, TDataStd_UAttribute::Set(ShapeLabel,XCAFDoc::ExternRefGUID()); for(Standard_Integer i=1; i<=SHAS.Length(); i++) { TDF_Label tmplbl = ShapeLabel.FindChild(i,Standard_True); - Handle(TCollection_HAsciiString) str = SHAS(i); + const Handle(TCollection_HAsciiString)& str = SHAS(i); TCollection_ExtendedString extstr(str->String()); TDataStd_Name::Set(tmplbl,extstr); } @@ -1483,7 +1483,7 @@ TDF_Label XCAFDoc_ShapeTool::SetExternRefs(const TColStd_SequenceOfHAsciiString& TDataStd_UAttribute::Set(ShapeLabel,XCAFDoc::ExternRefGUID()); for(Standard_Integer i=1; i<=SHAS.Length(); i++) { TDF_Label tmplbl = ShapeLabel.FindChild(i,Standard_True); - Handle(TCollection_HAsciiString) str = SHAS(i); + const Handle(TCollection_HAsciiString)& str = SHAS(i); TCollection_ExtendedString extstr(str->String()); TDataStd_Name::Set(tmplbl,extstr); } @@ -2253,7 +2253,7 @@ void XCAFDoc_ShapeTool::DumpJson (Standard_OStream& theOStream, Standard_Integer for (XCAFDoc_DataMapOfShapeLabel::Iterator aShapeLabelIt (myShapeLabels); aShapeLabelIt.More(); aShapeLabelIt.Next()) { - const TopoDS_Shape aShape = aShapeLabelIt.Key(); + const TopoDS_Shape& aShape = aShapeLabelIt.Key(); OCCT_DUMP_FIELD_VALUE_POINTER (theOStream, &aShape) TCollection_AsciiString aShapeLabel; @@ -2263,7 +2263,7 @@ void XCAFDoc_ShapeTool::DumpJson (Standard_OStream& theOStream, Standard_Integer for (XCAFDoc_DataMapOfShapeLabel::Iterator aSubShapeIt (mySubShapes); aSubShapeIt.More(); aSubShapeIt.Next()) { - const TopoDS_Shape aSubShape = aSubShapeIt.Key(); + const TopoDS_Shape& aSubShape = aSubShapeIt.Key(); OCCT_DUMP_FIELD_VALUE_POINTER (theOStream, &aSubShape) TCollection_AsciiString aSubShapeLabel; @@ -2273,7 +2273,7 @@ void XCAFDoc_ShapeTool::DumpJson (Standard_OStream& theOStream, Standard_Integer for (XCAFDoc_DataMapOfShapeLabel::Iterator aSimpleShapeIt (mySimpleShapes); aSimpleShapeIt.More(); aSimpleShapeIt.Next()) { - const TopoDS_Shape aSimpleShape = aSimpleShapeIt.Key(); + const TopoDS_Shape& aSimpleShape = aSimpleShapeIt.Key(); OCCT_DUMP_FIELD_VALUE_POINTER (theOStream, &aSimpleShape) TCollection_AsciiString aSimpleShapeLabel; diff --git a/src/XDEDRAW/XDEDRAW_Common.cxx b/src/XDEDRAW/XDEDRAW_Common.cxx index 509e2b7793..751cb5ca92 100644 --- a/src/XDEDRAW/XDEDRAW_Common.cxx +++ b/src/XDEDRAW/XDEDRAW_Common.cxx @@ -92,7 +92,7 @@ static Standard_Boolean ClearDicWS() return Standard_True; } -static void AddWS(TCollection_AsciiString filename, +static void AddWS(const TCollection_AsciiString& filename, const Handle(XSControl_WorkSession)& WS) { WS->SetVars(new XSDRAW_Vars); // support of DRAW variables @@ -111,14 +111,14 @@ static Standard_Boolean FillDicWS(NCollection_DataMap::Iterator DicEFIt(dicFile); for (; DicEFIt.More(); DicEFIt.Next()) { - TCollection_AsciiString filename = DicEFIt.Key(); + const TCollection_AsciiString& filename = DicEFIt.Key(); EF = DicEFIt.Value(); AddWS(filename, EF->GetWS()); } return Standard_True; } -static Standard_Boolean SetCurrentWS(TCollection_AsciiString filename) +static Standard_Boolean SetCurrentWS(const TCollection_AsciiString& filename) { if (!thedictws.IsBound(filename)) return Standard_False; Handle(XSControl_WorkSession) CurrentWS = @@ -161,7 +161,7 @@ static Standard_Integer GetDicWSList(Draw_Interpretor& di, Standard_Integer /*ar Standard_Integer num = 0; for (; DicIt.More(); DicIt.Next(), num++) { - TCollection_AsciiString strng(DicIt.Key()); + const TCollection_AsciiString& strng(DicIt.Key()); if (num) di << "\n"; di << "\"" << strng.ToCString() << "\""; } diff --git a/src/XDEDRAW/XDEDRAW_Shapes.cxx b/src/XDEDRAW/XDEDRAW_Shapes.cxx index eeb7a8bb3e..827a6ddcff 100644 --- a/src/XDEDRAW/XDEDRAW_Shapes.cxx +++ b/src/XDEDRAW/XDEDRAW_Shapes.cxx @@ -836,7 +836,7 @@ static Standard_Integer getAllStyledComponents (Draw_Interpretor& di, Standard_I BRep_Builder B; B.MakeCompound(aShape); for (Standard_Integer jj = 1; jj <= aShapes.Length(); jj++) { - TopoDS_Shape aCurShape = aShapes.Value(jj); + const TopoDS_Shape& aCurShape = aShapes.Value(jj); B.Add( aShape, aCurShape ); } DBRep::Set ( argv[2], aShape ); diff --git a/src/XSAlgo/XSAlgo_AlgoContainer.cxx b/src/XSAlgo/XSAlgo_AlgoContainer.cxx index 5b9cd8b79c..332a392be5 100644 --- a/src/XSAlgo/XSAlgo_AlgoContainer.cxx +++ b/src/XSAlgo/XSAlgo_AlgoContainer.cxx @@ -284,7 +284,7 @@ TopoDS_Shape XSAlgo_AlgoContainer::PerformFixShape(const TopoDS_Shape& S, // Purpose : for CheckPCurve // ============================================================================ -static TopoDS_Edge MakeEdgeOnCurve(const TopoDS_Edge edge) +static TopoDS_Edge MakeEdgeOnCurve(const TopoDS_Edge& edge) { TopoDS_Edge result; //BRep_Builder B; // B not used - see below (skl) diff --git a/src/XSControl/XSControl_ConnectedShapes.cxx b/src/XSControl/XSControl_ConnectedShapes.cxx index 1abd723766..233aea0a6c 100644 --- a/src/XSControl/XSControl_ConnectedShapes.cxx +++ b/src/XSControl/XSControl_ConnectedShapes.cxx @@ -78,7 +78,7 @@ XSControl_ConnectedShapes::XSControl_ConnectedShapes () if (sh.IsNull()) continue; if (sh.ShapeType() != type) continue; for (TopExp_Explorer vsh(sh,TopAbs_VERTEX); vsh.More(); vsh.Next()) { - TopoDS_Shape avtx = vsh.Current(); + const TopoDS_Shape& avtx = vsh.Current(); if (vtx.Contains(avtx)) { li->Append (TP->Mapped(i)); break; // break de ce for interieur, entite suivante diff --git a/src/XSControl/XSControl_FuncShape.cxx b/src/XSControl/XSControl_FuncShape.cxx index d161a2c064..f2e84fb20c 100644 --- a/src/XSControl/XSControl_FuncShape.cxx +++ b/src/XSControl/XSControl_FuncShape.cxx @@ -423,7 +423,7 @@ static IFSelect_ReturnStatus XSControl_fromshape sout<EntityFromShapeResult(subsh,submodrec); if (subent.IsNull()) { diff --git a/src/XSControl/XSControl_Reader.cxx b/src/XSControl/XSControl_Reader.cxx index 02107b2176..f93878ae4e 100644 --- a/src/XSControl/XSControl_Reader.cxx +++ b/src/XSControl/XSControl_Reader.cxx @@ -468,8 +468,7 @@ void XSControl_Reader::GetStatsTransfer (const Handle(TColStd_HSequenceOfTransie nbMapped = nbWithFail = nbWithResult = 0; for (itrp.Start(); itrp.More(); itrp.Next()) { - Handle(Transfer_Binder) binder = itrp.Value(); - Handle(Standard_Transient) ent = itrp.Starting(); + const Handle(Transfer_Binder)& binder = itrp.Value(); nbMapped++; if (binder.IsNull()) nbWithFail++; else diff --git a/src/XSControl/XSControl_TransferReader.cxx b/src/XSControl/XSControl_TransferReader.cxx index d1f73102bb..ba6c8761d5 100644 --- a/src/XSControl/XSControl_TransferReader.cxx +++ b/src/XSControl/XSControl_TransferReader.cxx @@ -808,7 +808,7 @@ Standard_Integer XSControl_TransferReader::TransferOne // seule difference entre TransferRoots et TransferOne Standard_Integer res = 0; - Handle(Standard_Transient) obj = ent; + const Handle(Standard_Transient)& obj = ent; TP.Transfer (obj, theProgress); if (theProgress.UserBreak()) return res; @@ -1197,8 +1197,8 @@ void XSControl_TransferReader::PrintStatsOnList(const Handle(Transfer_TransientP for (itrp.Start(); itrp.More(); itrp.Next()) { nbi ++; - Handle(Transfer_Binder) binder = itrp.Value(); - Handle(Standard_Transient) ent = itrp.Starting(); + const Handle(Transfer_Binder)& binder = itrp.Value(); + const Handle(Standard_Transient)& ent = itrp.Starting(); if (binder.IsNull()) { nbnr ++; if (notrec) counter->Add(ent,"(not recorded)"); diff --git a/src/XSControl/XSControl_Utils.cxx b/src/XSControl/XSControl_Utils.cxx index 2df8058d79..304ec8110d 100644 --- a/src/XSControl/XSControl_Utils.cxx +++ b/src/XSControl/XSControl_Utils.cxx @@ -353,7 +353,7 @@ static const Standard_ExtString voidext = { 0 }; if (!compound || res != TopAbs_COMPOUND) return res; res = TopAbs_SHAPE; for (TopoDS_Iterator iter(shape); iter.More(); iter.Next()) { - TopoDS_Shape sh = iter.Value(); + const TopoDS_Shape& sh = iter.Value(); if (sh.IsNull()) continue; TopAbs_ShapeEnum typ = sh.ShapeType(); if (typ == TopAbs_COMPOUND) typ = ShapeType (sh,compound); diff --git a/src/XSDRAWIGES/XSDRAWIGES.cxx b/src/XSDRAWIGES/XSDRAWIGES.cxx index 980be1f738..195159619f 100644 --- a/src/XSDRAWIGES/XSDRAWIGES.cxx +++ b/src/XSDRAWIGES/XSDRAWIGES.cxx @@ -552,7 +552,7 @@ static Standard_Integer XSDRAWIGES_tplosttrim (Draw_Interpretor& di, Standard_In return 0; } for (itrp.Start(); itrp.More(); itrp.Next()) { - Handle(Standard_Transient) ent = itrp.Starting(); + const Handle(Standard_Transient)& ent = itrp.Starting(); Handle(TColStd_HSequenceOfTransient) super = WS->Sharings (ent); if (!super.IsNull()) { Standard_Integer nb = super->Length(); diff --git a/src/math/math_FunctionSetRoot.cxx b/src/math/math_FunctionSetRoot.cxx index 51801a4313..52d127cc1c 100644 --- a/src/math/math_FunctionSetRoot.cxx +++ b/src/math/math_FunctionSetRoot.cxx @@ -211,8 +211,8 @@ static Standard_Boolean MinimizeDirection(const math_Vector& P0, tol1d /= 3; //JR/Hp : - math_Vector PP0 = P0 ; - math_Vector PP1 = P1 ; + const math_Vector& PP0 = P0 ; + const math_Vector& PP1 = P1 ; Delta = PP1 - PP0; // Delta = P1 - P0; invnorme = Delta.Norm(); From 92e0a76a50d532f2a96713ba0ce4d313a78a0d1f Mon Sep 17 00:00:00 2001 From: dpasukhi Date: Wed, 17 May 2023 19:45:06 +0000 Subject: [PATCH 483/639] 0033379: Coding - Processing Clang-15 warnings Fixed warning generated by Clang++-15 --- src/AdvApp2Var/AdvApp2Var_SysBase.cxx | 5 ++--- src/BOPAlgo/BOPAlgo_WireSplitter_1.cxx | 2 -- src/BRepAlgo/BRepAlgo_FaceRestrictor.cxx | 7 +------ src/BRepFill/BRepFill_CompatibleWires.cxx | 9 +------- src/BRepFill/BRepFill_Evolved.cxx | 2 -- src/BRepMesh/delabella.cpp | 10 --------- src/BRepTools/BRepTools_ShapeSet.cxx | 4 ++-- src/BRepTopAdaptor/BRepTopAdaptor_Tool.cxx | 7 +------ src/ChFi3d/ChFi3d_Builder_CnCrn.cxx | 21 ++++++++----------- src/DDataStd/DDataStd_BasicCommands.cxx | 4 +--- src/Draw/Draw_VariableCommands.cxx | 2 -- src/Express/Express_Select.cxx | 2 -- src/Geom2dGcc/Geom2dGcc_FunctionTanCirCu.cxx | 2 -- .../GeomliteTest_SurfaceCommands.cxx | 2 -- src/Graphic3d/Graphic3d_PBRMaterial.cxx | 2 -- src/Graphic3d/Graphic3d_ShaderObject.cxx | 2 -- src/IGESData/IGESData_ParamReader.cxx | 3 +-- src/IGESFile/IGESFile_Read.cxx | 3 --- src/IntPatch/IntPatch_PrmPrmIntersection.cxx | 7 ------- src/IntStart/IntStart_SearchInside.gxx | 5 ----- src/Interface/Interface_CheckIterator.cxx | 3 +-- src/Poly/Poly_MakeLoops.cxx | 5 +---- src/Prs3d/Prs3d_Arrow.cxx | 4 ---- src/QABugs/QABugs_11.cxx | 2 -- src/RWGltf/RWGltf_CafWriter.cxx | 6 ++++-- src/RWMesh/RWMesh_CafReader.cxx | 3 +-- src/SWDRAW/SWDRAW_ShapeFix.cxx | 5 ++--- src/ShapeFix/ShapeFix.cxx | 17 +++++++++++---- src/ShapeFix/ShapeFix_Face.cxx | 7 ++----- src/ShapeFix/ShapeFix_Shell.cxx | 2 -- .../TopOpeBRepBuild_FaceBuilder.cxx | 4 ++-- src/TopOpeBRepBuild/TopOpeBRepBuild_Grid.cxx | 2 -- .../TopOpeBRepBuild_GridEE.cxx | 5 ++--- src/TopOpeBRepBuild/TopOpeBRepBuild_Merge.cxx | 8 +------ .../TopOpeBRepBuild_WireEdgeClassifier.cxx | 3 +-- .../TopOpeBRepBuild_WireEdgeSet.cxx | 10 +++++++-- .../TopOpeBRepBuild_makefaces.cxx | 16 ++++++-------- src/TopOpeBRepDS/TopOpeBRepDS_samdom.cxx | 2 -- src/XSControl/XSControl_TransferReader.cxx | 3 +-- .../XmlMDataStd_ExpressionDriver.cxx | 4 ---- src/Xw/Xw_Window.cxx | 3 +-- src/math/math_TrigonometricFunctionRoots.cxx | 2 -- 42 files changed, 64 insertions(+), 153 deletions(-) diff --git a/src/AdvApp2Var/AdvApp2Var_SysBase.cxx b/src/AdvApp2Var/AdvApp2Var_SysBase.cxx index ae1bf729c5..d8efb71e7f 100644 --- a/src/AdvApp2Var/AdvApp2Var_SysBase.cxx +++ b/src/AdvApp2Var/AdvApp2Var_SysBase.cxx @@ -911,10 +911,9 @@ int macrmsg_(const char *,//crout, /* Parameter adjustments */ ct -= ct_len; (void )ct; // unused + (void )xt; // unused + (void )it; // unused - --xt; - --it; - /* Function Body */ mamdlng_(cln, 3L); diff --git a/src/BOPAlgo/BOPAlgo_WireSplitter_1.cxx b/src/BOPAlgo/BOPAlgo_WireSplitter_1.cxx index 6225ae596a..a766da5104 100644 --- a/src/BOPAlgo/BOPAlgo_WireSplitter_1.cxx +++ b/src/BOPAlgo/BOPAlgo_WireSplitter_1.cxx @@ -512,7 +512,6 @@ void Path (const GeomAdaptor_Surface& aGAS, Standard_Integer aNbWaysInside = 0; BOPAlgo_EdgeInfo *pOnlyWayIn = NULL; - Standard_Integer aCurIndexE = 0; anIt.Initialize(aLEInfo); for (; anIt.More(); anIt.Next()) { BOPAlgo_EdgeInfo& anEI=anIt.ChangeValue(); @@ -521,7 +520,6 @@ void Path (const GeomAdaptor_Surface& aGAS, anIsNotPassed=!anEI.Passed(); // if (anIsOut && anIsNotPassed) { - aCurIndexE++; // // Is there one way to go out of the vertex // we have to use it only. diff --git a/src/BRepAlgo/BRepAlgo_FaceRestrictor.cxx b/src/BRepAlgo/BRepAlgo_FaceRestrictor.cxx index 644bdaf491..5ed2ab2e70 100644 --- a/src/BRepAlgo/BRepAlgo_FaceRestrictor.cxx +++ b/src/BRepAlgo/BRepAlgo_FaceRestrictor.cxx @@ -401,12 +401,9 @@ void BRepAlgo_FaceRestrictor::PerformWithCorrection() //--------------------------------------------------------- // Classification of wires ones compared to the others. //--------------------------------------------------------- - Standard_Integer j,i = 1; - for (it.Initialize(wires) ; it.More(); it.Next()) { TopoDS_Wire& W1 = TopoDS::Wire(it.Value()); - TopTools_ListIteratorOfListOfShape it2(wires); - j = 1; + TopTools_ListIteratorOfListOfShape it2(wires); if (IsClosed(W1)) { TopoDS_Shape aLocalShape = myFace.EmptyCopied(); @@ -422,10 +419,8 @@ void BRepAlgo_FaceRestrictor::PerformWithCorrection() Store (W2,W1,keyIsIn,keyContains); } it2.Next(); - j++; } } - i++; } TopTools_ListOfShape WireExt; diff --git a/src/BRepFill/BRepFill_CompatibleWires.cxx b/src/BRepFill/BRepFill_CompatibleWires.cxx index 1133af2f79..623979cb06 100644 --- a/src/BRepFill/BRepFill_CompatibleWires.cxx +++ b/src/BRepFill/BRepFill_CompatibleWires.cxx @@ -140,10 +140,9 @@ static void SeqOfVertices (const TopoDS_Wire& W, TopTools_SequenceOfShape& S) { S.Clear(); - Standard_Integer jj, cpt = 0; + Standard_Integer jj; TopExp_Explorer PE; for (PE.Init(W,TopAbs_VERTEX); PE.More(); PE.Next()) { - cpt++; Standard_Boolean trouve=Standard_False; for (jj=1;jj<=S.Length() && (!trouve);jj++) { if (S.Value(jj).IsSame(PE.Current())) trouve = Standard_True; @@ -819,7 +818,6 @@ void BRepFill_CompatibleWires::Perform (const Standard_Boolean WithRotation) report = (nbmax != nbmin || contS >= GeomAbs_C1 ); // initialization of the map - Standard_Integer nbE = 0; TopTools_ListOfShape Empty; for (i=1; i<=nbSects; i++) { TopoDS_Wire W = TopoDS::Wire(myWork(i)); @@ -827,7 +825,6 @@ void BRepFill_CompatibleWires::Perform (const Standard_Boolean WithRotation) TopoDS_Edge E = TopoDS::Edge(anExp.Current()); myMap.Bind(E,Empty); myMap(E).Append(E); - nbE++; } } @@ -1474,15 +1471,11 @@ void BRepFill_CompatibleWires::SameNumberByACR(const Standard_Boolean report) TopTools_DataMapIteratorOfDataMapOfShapeListOfShape itmap; //TopTools_ListIteratorOfListOfShape itlist; TopoDS_Edge Ancestor; - Standard_Integer nbedge, nblist=0; Standard_Boolean found = Standard_False; for (itmap.Initialize(myMap);itmap.More()&&(!found);itmap.Next()) { - nblist++; TopTools_ListIteratorOfListOfShape itlist(itmap.Value()); - nbedge = 0; while (itlist.More()&&(!found)) { - nbedge++; TopoDS_Edge ECur = TopoDS::Edge(itlist.Value()); if (Ecur.IsSame(ECur)) { diff --git a/src/BRepFill/BRepFill_Evolved.cxx b/src/BRepFill/BRepFill_Evolved.cxx index e3a2c72a97..76f7c96aa2 100644 --- a/src/BRepFill/BRepFill_Evolved.cxx +++ b/src/BRepFill/BRepFill_Evolved.cxx @@ -770,9 +770,7 @@ void BRepFill_Evolved::ElementaryPerform (const TopoDS_Face& Sp, TopTools_DataMapOfShapeSequenceOfShape MapSeqVer; BRepFill_DataMapOfShapeSequenceOfPnt MapSeqPar; - Standard_Integer vv = 0; for(ProfExp.Init(myProfile); ProfExp.More(); ProfExp.Next()) { - vv++; //----------------------------------------------- // Return two faces separated by the bissectrice. //----------------------------------------------- diff --git a/src/BRepMesh/delabella.cpp b/src/BRepMesh/delabella.cpp index c4b6f9cfb4..f24673fe71 100644 --- a/src/BRepMesh/delabella.cpp +++ b/src/BRepMesh/delabella.cpp @@ -635,9 +635,6 @@ struct CDelaBella : IDelaBella // 2. DELETE VISIBLE FACES & ADD NEW ONES // (we also build silhouette (vertex loop) between visible & invisible faces) - int del = 0; - int add = 0; - // push first visible face onto stack (of visible faces) Face* stack = _f; _f->next = _f; // old trick to use list pointers as 'on-stack' markers @@ -656,7 +653,6 @@ struct CDelaBella : IDelaBella // delete visible face _f->Free(&cache); - del++; // check all 3 neighbors for (int e = 0; e < 3; e++) @@ -667,7 +663,6 @@ struct CDelaBella : IDelaBella if (n->dot(*_q) <= 0) // if neighbor is not visible we have slihouette edge { // build face - add++; // ab: given face adjacency [index][], // it provides [][2] vertex indices on shared edge (CCW order) @@ -724,11 +719,6 @@ struct CDelaBella : IDelaBella } } - // if add #endif diff --git a/src/BRepTopAdaptor/BRepTopAdaptor_Tool.cxx b/src/BRepTopAdaptor/BRepTopAdaptor_Tool.cxx index 1fbdc1509b..fc497bf513 100644 --- a/src/BRepTopAdaptor/BRepTopAdaptor_Tool.cxx +++ b/src/BRepTopAdaptor/BRepTopAdaptor_Tool.cxx @@ -95,10 +95,5 @@ void BRepTopAdaptor_Tool::SetTopolTool(const Handle(BRepTopAdaptor_TopolTool)& T myTopolTool=TT; } -void BRepTopAdaptor_Tool::Destroy() { - int i; - i=0; - i++; - -} +void BRepTopAdaptor_Tool::Destroy() {} diff --git a/src/ChFi3d/ChFi3d_Builder_CnCrn.cxx b/src/ChFi3d/ChFi3d_Builder_CnCrn.cxx index 5ad82754b8..bc85cab557 100644 --- a/src/ChFi3d/ChFi3d_Builder_CnCrn.cxx +++ b/src/ChFi3d/ChFi3d_Builder_CnCrn.cxx @@ -145,9 +145,9 @@ static void Indices ( const Standard_Integer n, Standard_Integer & icmoins) { if (ic== (n-1)) icplus=0; - else icplus=ic+1; - if (ic==0) icmoins=n-1; - else icmoins=ic-1; + else icplus=ic+1; + if (ic==0) icmoins=n-1; + else icmoins=ic-1; } //======================================================================= @@ -525,7 +525,7 @@ static void CalculBatten (const Handle (GeomAdaptor_Surface)& ASurf, else if (contraint2) anglebig=Abs(ang2)>1.2; if (isplane && (Abs(ang1)>M_PI/2 || Abs(ang2)>M_PI/2)) - isplane=Standard_False; + isplane=Standard_False; if (anglebig && !isplane) { CalculDroite(p2d1,xdir,ydir,pcurve); } @@ -1063,7 +1063,7 @@ void ChFi3d_Builder::PerformMoreThreeCorner(const Standard_Integer Jndex, Standard_Integer jfp = 0,ii; Standard_Integer ic,icplus,icmoins,icplus2, sense,index = 0,indice,isurf1,isurf2; - Standard_Integer cbplus=0, n3d=0,IVtx = 0,nb; + Standard_Integer n3d=0,IVtx = 0,nb; Standard_Boolean sameside,trouve,isfirst; Standard_Real pardeb ,parfin,xdir,ydir; Standard_Real tolapp=1.e-4,maxapp = 0.,maxapp1 = 0.,avedev; @@ -1369,17 +1369,17 @@ void ChFi3d_Builder::PerformMoreThreeCorner(const Standard_Integer Jndex, if (cp1.IsOnArc()){ ChFi3d_cherche_vertex(Arc,cp1.Arc(),Vcom,trouve); if (trouve) angedg=Abs(ChFi3d_AngleEdge(Vcom,Arc,cp1.Arc())); - if (!cp1.Arc().IsSame(Arc) && Abs(angedg-M_PI)<0.01){ + if (!cp1.Arc().IsSame(Arc) && Abs(angedg-M_PI)<0.01){ Evive.SetValue(ic,cp1.Arc()); ChFi3d_edge_common_faces(myEFMap(cp1.Arc()),F1,F2); - if (!Fvive.Value(ic,icplus).IsSame(F1) && !Fvive.Value(ic,icplus).IsSame(F2)) { + if (!Fvive.Value(ic,icplus).IsSame(F1) && !Fvive.Value(ic,icplus).IsSame(F2)) { if (Fvive.Value(ic,icmoins).IsSame(F2)) { Fvive.SetValue(ic,icplus,F1); Fvive.SetValue(icplus,ic,F1); numfa.SetValue(ic,icplus,DStr.AddShape(F1)); numfa.SetValue(icplus,ic,DStr.AddShape(F1)); - } - else { + } + else { Fvive.SetValue(ic,icplus,F2); Fvive.SetValue(icplus,ic,F2); numfa.SetValue(ic,icplus,DStr.AddShape(F2)); @@ -1579,7 +1579,6 @@ void ChFi3d_Builder::PerformMoreThreeCorner(const Standard_Integer Jndex, Indices(nedge,ic,icplus,icmoins); Indices(nedge,icplus,icplus2,ic); if (!oksea.Value(ic)) { - cbplus++; if (sharp.Value(ic)) { if (!samedge.Value(ic)){ para=BRep_Tool::Parameter(V1,TopoDS::Edge(Evive.Value(ic))); @@ -1682,7 +1681,6 @@ void ChFi3d_Builder::PerformMoreThreeCorner(const Standard_Integer Jndex, if (oksea.Value(icmoins)) { oksea.SetValue(icmoins,Standard_False); inters=Standard_False; - cbplus++; } if (sens.Value(ic)==1) { para=p.Value(ic,icmoins) + ec; @@ -1698,7 +1696,6 @@ void ChFi3d_Builder::PerformMoreThreeCorner(const Standard_Integer Jndex, if(oksea.Value(ic)) { oksea.SetValue(ic,Standard_False); inters=Standard_False; - cbplus++; } if (nconges!=1) { Standard_Real parold,parnew; diff --git a/src/DDataStd/DDataStd_BasicCommands.cxx b/src/DDataStd/DDataStd_BasicCommands.cxx index dc3a70927f..44d5e01bbd 100644 --- a/src/DDataStd/DDataStd_BasicCommands.cxx +++ b/src/DDataStd/DDataStd_BasicCommands.cxx @@ -702,15 +702,13 @@ static Standard_Integer DDataStd_SetIntArrayTest (Draw_Interpretor& di, TDF_Label label; DDF::AddLabel(DF, arg[2], label); Standard_Boolean isDelta = Draw::Atoi(arg[3]) != 0; - Standard_Integer From = Draw::Atoi(arg[4]), To = Draw::Atoi( arg[5] ), j; + Standard_Integer From = Draw::Atoi(arg[4]), To = Draw::Atoi( arg[5] ); di << "Array of Standard_Integer with bounds from = " << From << " to = " << To << "\n"; Handle(TDataStd_IntegerArray) A = TDataStd_IntegerArray::Set(label, From, To, isDelta); - j = 6; Standard_Integer k = 100; for(Standard_Integer i = From; i<=To; i++) { A->SetValue(i, ++k); - j++; } return 0; diff --git a/src/Draw/Draw_VariableCommands.cxx b/src/Draw/Draw_VariableCommands.cxx index 473b212887..4756691641 100644 --- a/src/Draw/Draw_VariableCommands.cxx +++ b/src/Draw/Draw_VariableCommands.cxx @@ -958,7 +958,6 @@ static Standard_Real ParseValue (char*& theName) // replace , and first and last () by space if (argc > 1) { - Standard_Integer i = 2; while (*p != '(') { ++p; } *p = ' '; ++p; @@ -971,7 +970,6 @@ static Standard_Real ParseValue (char*& theName) { *p = ' '; ++p; - ++i; } else { diff --git a/src/Express/Express_Select.cxx b/src/Express/Express_Select.cxx index bcfa50e761..6665abeaca 100644 --- a/src/Express/Express_Select.cxx +++ b/src/Express/Express_Select.cxx @@ -130,7 +130,6 @@ Standard_Boolean Express_Select::GenerateClass() const if (!aSeqMember->IsEmpty()) anOS << "class StepData_SelectMember;\n"; - Standard_Integer jj = 1; for (Standard_Integer i = 1; i <= myItems->Length(); i++) { Handle(Express_Item) anItem = myItems->Value (i); @@ -144,7 +143,6 @@ Standard_Boolean Express_Select::GenerateClass() const } } anOS << "class " << anItem->CPPName() << ";\n"; - jj++; } anOS << "\n"; diff --git a/src/Geom2dGcc/Geom2dGcc_FunctionTanCirCu.cxx b/src/Geom2dGcc/Geom2dGcc_FunctionTanCirCu.cxx index 48ff699727..e5d3e6ffe7 100644 --- a/src/Geom2dGcc/Geom2dGcc_FunctionTanCirCu.cxx +++ b/src/Geom2dGcc/Geom2dGcc_FunctionTanCirCu.cxx @@ -60,13 +60,11 @@ Geom2dGcc_FunctionTanCirCu(const gp_Circ2d& Circ , Standard_Real aLast = Geom2dGcc_CurveTool::LastParameter(Curve); Standard_Real aStep = (aLast - aFirst)/aNbSamp; Standard_Real anX = aFirst + aStep/2.; - Standard_Integer aNbP = 0; gp_XY aLoc(0., 0.); while (anX <= aLast) { aLoc += (Geom2dGcc_CurveTool::Value(Curve, anX)).XY(); anX += aStep; - aNbP++; } myWeight = Max((aLoc - TheCirc.Location().XY()).SquareModulus(), TheCirc.Radius()); // Modified by Sergey KHROMOV - Thu Apr 5 09:51:25 2001 End diff --git a/src/GeomliteTest/GeomliteTest_SurfaceCommands.cxx b/src/GeomliteTest/GeomliteTest_SurfaceCommands.cxx index 37bf62d118..bdbed3277d 100644 --- a/src/GeomliteTest/GeomliteTest_SurfaceCommands.cxx +++ b/src/GeomliteTest/GeomliteTest_SurfaceCommands.cxx @@ -1550,7 +1550,6 @@ static Standard_Integer compBsplSur (Draw_Interpretor& , Standard_Integer n, con Standard_Integer nbP = 100; Standard_Real aStepU = (aUmax - aUmin)/nbP; Standard_Real aStepV = (aVmax - aVmin)/nbP; - Standard_Integer nbErr =0; Standard_Integer i =1; for( ; i <= nbP +1; i++) { @@ -1564,7 +1563,6 @@ static Standard_Integer compBsplSur (Draw_Interpretor& , Standard_Integer n, con Standard_Real aDist = aP1.SquareDistance(aP2); if(aDist > Precision::SquareConfusion()) { - nbErr++; Standard_Real aD = sqrt(aDist); std::cout<<"Surfaces differ for U,V,Dist: "<SizeX() - 1); Graphic3d_Vec3 aView = lutGenView (aCosV); - unsigned int aCount = 0; Graphic3d_Vec2 aResult = Graphic3d_Vec2 (0.f); for (unsigned int i = 0; i < theNbIntegralSamples; ++i) { @@ -225,7 +224,6 @@ void Graphic3d_PBRMaterial::GenerateEnvLUT (const Handle(Image_PixMap)& theLUT, Graphic3d_Vec3 aLight = lutGenReflect (aView, aHalf); if (aLight.z() >= 0.f) { - ++aCount; Standard_ShortReal aCosVH = aView.Dot (aHalf); Standard_ShortReal aGeometryFactor = lutGenGeometryFactor (aLight.z(), aCosV, diff --git a/src/Graphic3d/Graphic3d_ShaderObject.cxx b/src/Graphic3d/Graphic3d_ShaderObject.cxx index 0733255907..10d109fbe8 100755 --- a/src/Graphic3d/Graphic3d_ShaderObject.cxx +++ b/src/Graphic3d/Graphic3d_ShaderObject.cxx @@ -121,12 +121,10 @@ Handle(Graphic3d_ShaderObject) Graphic3d_ShaderObject::CreateFromSource (TCollec { const ShaderVariable& aVar = aVarListIter.Value(); Standard_Integer aStageLower = IntegerLast(), aStageUpper = IntegerFirst(); - Standard_Integer aNbStages = 0; for (Standard_Integer aStageIter = Graphic3d_TOS_VERTEX; aStageIter <= (Standard_Integer )Graphic3d_TOS_COMPUTE; aStageIter = aStageIter << 1) { if ((aVar.Stages & aStageIter) != 0) { - ++aNbStages; aStageLower = Min (aStageLower, aStageIter); aStageUpper = Max (aStageUpper, aStageIter); } diff --git a/src/IGESData/IGESData_ParamReader.cxx b/src/IGESData/IGESData_ParamReader.cxx index 6e15ca77f5..8ba224c715 100644 --- a/src/IGESData/IGESData_ParamReader.cxx +++ b/src/IGESData/IGESData_ParamReader.cxx @@ -1088,13 +1088,12 @@ Standard_Boolean IGESData_ParamReader::ReadEnts Standard_Integer indmax = index+thenbitem*thetermsz-1; val = new IGESData_HArray1OfIGESEntity (index , indmax); Standard_Integer ind = index; - Standard_Integer nbneg = 0, nbnul = 0; + Standard_Integer nbnul = 0; Standard_Integer i; // svv Jan11 2000 : porting on DEC for (i = FirstRead(); i > 0; i = NextRead()) { Standard_Integer nval; if (!ReadingEntityNumber(i,nval)) nval = 0; //return Standard_False; - if (nval < 0) nbneg ++; if (nval > 0) { DeclareAndCast(IGESData_IGESEntity,anent,IR->BoundEntity(nval)); if (anent.IsNull()) nbnul ++; diff --git a/src/IGESFile/IGESFile_Read.cxx b/src/IGESFile/IGESFile_Read.cxx index 700363cd6d..154e6154bc 100644 --- a/src/IGESFile/IGESFile_Read.cxx +++ b/src/IGESFile/IGESFile_Read.cxx @@ -227,12 +227,9 @@ Standard_Integer IGESFile_Read char *res1, *res2, *nom, *num; char* parval; int *v; int typarg; int nbparam; - - Standard_Integer nn=0; int ns; //szv#4:S4163:12Mar99 i unused while ( (ns = iges_lirpart(&v,&res1,&res2,&nom,&num,&nbparam)) != 0) { - nn++; recupnp = 0; recupne = (ns+1)/2; // numero entite // if(recupne > IR->NbEntities()) { diff --git a/src/IntPatch/IntPatch_PrmPrmIntersection.cxx b/src/IntPatch/IntPatch_PrmPrmIntersection.cxx index a3ba76ddb4..9d5df4fca0 100644 --- a/src/IntPatch/IntPatch_PrmPrmIntersection.cxx +++ b/src/IntPatch/IntPatch_PrmPrmIntersection.cxx @@ -3287,7 +3287,6 @@ void IntPatch_PrmPrmIntersection::PointDepart(Handle(IntSurf_LineOn2S)& LineOn2S M2.ResetAnd(); // int newind=0; - long unsigned Compt=0; int ok=0; int indicepointtraite = 0; Standard_Integer k,nu,nv; @@ -3330,22 +3329,18 @@ void IntPatch_PrmPrmIntersection::PointDepart(Handle(IntSurf_LineOn2S)& LineOn2S // Standard_Integer nu1=-1,nu2=-1; Standard_Integer nv1=0, nv2=0; - int nbsur1 = 0; for(nu=0;nu1<0 && nu=0) { - int nbsur2 = 0; for(nu=0;nu2<0 && nuFirstUParameter()+nu2*du2, S2->FirstVParameter()+nv2*dv2); LineOn2S->Add(POn2S); - Compt++; } else { //-- aucun point du triangle n a ete trouve assez proche @@ -3438,7 +3432,6 @@ void IntPatch_PrmPrmIntersection::PointDepart(Handle(IntSurf_LineOn2S)& LineOn2S IntSurf_PntOn2S POn2S; POn2S.SetValue(P,U1_3,V1_3,U2_3,V2_3); LineOn2S->Add(POn2S); - Compt++; } } } diff --git a/src/IntStart/IntStart_SearchInside.gxx b/src/IntStart/IntStart_SearchInside.gxx index 53a2225cd0..17380e79ae 100644 --- a/src/IntStart/IntStart_SearchInside.gxx +++ b/src/IntStart/IntStart_SearchInside.gxx @@ -87,9 +87,6 @@ void IntStart_SearchInside::Perform (TheFunction& Func, math_FunctionSetRoot Rsnld(Func,toler); - Standard_Integer REJET_OK=0; - Standard_Integer REJET_KO=0; - //-- lbr le 15 mai 97 umin+=du*0.01; vmin+=dv*0.01; @@ -142,7 +139,6 @@ void IntStart_SearchInside::Perform (TheFunction& Func, Standard_Real rvalf = Valf(1); Standard_Real DistPP = Pextrm1.SquareDistance(Pextrm2); if(rvalf*rvalf > 3.0*DistPP) { - REJET_OK++; nepastester=Standard_True; } } @@ -172,7 +168,6 @@ void IntStart_SearchInside::Perform (TheFunction& Func, if(nepastester==Standard_False) { - REJET_KO++; Rsnld.Perform(Func,UVap,Binf,Bsup); if (Rsnld.IsDone()) { if (Abs(Func.Root()) <= Tol) { diff --git a/src/Interface/Interface_CheckIterator.cxx b/src/Interface/Interface_CheckIterator.cxx index 645be1169c..110509bec9 100644 --- a/src/Interface/Interface_CheckIterator.cxx +++ b/src/Interface/Interface_CheckIterator.cxx @@ -523,7 +523,7 @@ void Interface_CheckIterator::Print(Standard_OStream& S, Standard_CString mesnum0 = ":"; Standard_CString mesnum1 = " (original):"; Standard_CString mesnum2 = " (computed):"; */ - Standard_Integer i, nbch = 0, nb = thelist->Length();//,j; svv #2 + Standard_Integer i, nb = thelist->Length();//,j; svv #2 Standard_Boolean yamod = !model.IsNull(); for (i = 1; i <= nb; i ++) { const Handle(Interface_Check) ach = thelist->Value(i); @@ -557,7 +557,6 @@ void Interface_CheckIterator::Print(Standard_OStream& S, else S <<" Type:"<DynamicType()->Name()<Print (S, (failsonly ? 1 : 3)); } // if (nbch > 0) S<<" ---- Checks : "< 1) diff --git a/src/Prs3d/Prs3d_Arrow.cxx b/src/Prs3d/Prs3d_Arrow.cxx index d3afd3a1b1..5a3d7a1c45 100644 --- a/src/Prs3d/Prs3d_Arrow.cxx +++ b/src/Prs3d/Prs3d_Arrow.cxx @@ -91,22 +91,18 @@ Handle(Graphic3d_ArrayOfSegments) Prs3d_Arrow::DrawSegments (const gp_Pnt& theLo Standard_Integer aNbVertices = theNbSegments + 1; Standard_Integer aFirstContourVertex = 2; - Standard_Integer anEdgeCount = 0; for (Standard_Integer aVertIter = aFirstContourVertex; aVertIter <= aNbVertices; ++aVertIter) { aSegments->AddEdge (1); aSegments->AddEdge (aVertIter); - ++anEdgeCount; } aSegments->AddEdge (aNbVertices); aSegments->AddEdge (aFirstContourVertex); - ++anEdgeCount; for (Standard_Integer aVertIter = aFirstContourVertex; aVertIter <= aNbVertices - 1; ++aVertIter) { aSegments->AddEdge (aVertIter); aSegments->AddEdge (aVertIter + 1); - ++anEdgeCount; } return aSegments; } diff --git a/src/QABugs/QABugs_11.cxx b/src/QABugs/QABugs_11.cxx index cd4131b984..56fd7ad067 100644 --- a/src/QABugs/QABugs_11.cxx +++ b/src/QABugs/QABugs_11.cxx @@ -212,14 +212,12 @@ static int BUC60610(Draw_Interpretor& di, Standard_Integer argc, const char ** a IR.TransferRoots(); TopoDS_Shape aTopShape = IR.OneShape(); TopExp_Explorer ex(aTopShape, TopAbs_EDGE); - Standard_Integer i=0; for( ; ex.More(); ex.Next()){ const TopoDS_Edge &E = TopoDS::Edge(ex.Current()); BRepAdaptor_Curve aCurve(E); GCPnts_UniformDeflection plin(aCurve, 0.1); di << "Num points = " << plin.NbPoints() << "\n"; if(argc > 2) { - i++; Sprintf(Ch,"%s_%i",argv[2],1); DBRep::Set(Ch,E); } diff --git a/src/RWGltf/RWGltf_CafWriter.cxx b/src/RWGltf/RWGltf_CafWriter.cxx index e6bcdbefc0..24b0e35b3f 100644 --- a/src/RWGltf/RWGltf_CafWriter.cxx +++ b/src/RWGltf/RWGltf_CafWriter.cxx @@ -735,7 +735,9 @@ bool RWGltf_CafWriter::writeBinData (const Handle(TDocStd_Document)& theDocument aBuffView->ByteOffset = aBinFile->tellp(); aWrittenFaces.Clear (false); aWrittenPrimData.Clear (false); +#ifdef HAVE_DRACO size_t aMeshIndex = 0; +#endif for (ShapeToGltfFaceMap::Iterator aBinDataIter (myBinDataMap); aBinDataIter.More() && aPSentryBin.More(); aBinDataIter.Next()) { const Handle(RWGltf_GltfFaceList)& aGltfFaceList = aBinDataIter.Value(); @@ -745,8 +747,8 @@ bool RWGltf_CafWriter::writeBinData (const Handle(TDocStd_Document)& theDocument } std::shared_ptr aMeshPtr; +#ifdef HAVE_DRACO ++aMeshIndex; - #ifdef HAVE_DRACO if (myDracoParameters.DracoCompression) { if (aMeshIndex <= aMeshes.size()) @@ -759,7 +761,7 @@ bool RWGltf_CafWriter::writeBinData (const Handle(TDocStd_Document)& theDocument aMeshPtr = aMeshes.back(); } } - #endif +#endif for (RWGltf_GltfFaceList::Iterator aGltfFaceIter (*aGltfFaceList); aGltfFaceIter.More() && aPSentryBin.More(); aGltfFaceIter.Next()) { diff --git a/src/RWMesh/RWMesh_CafReader.cxx b/src/RWMesh/RWMesh_CafReader.cxx index 9efd9e66dc..4164e4496f 100644 --- a/src/RWMesh/RWMesh_CafReader.cxx +++ b/src/RWMesh/RWMesh_CafReader.cxx @@ -125,7 +125,7 @@ Standard_Boolean RWMesh_CafReader::perform (const TCollection_AsciiString& theFi } TopLoc_Location aDummyLoc; - Standard_Integer aNbNodes = 0, aNbElems = 0, aNbFaces = 0; + Standard_Integer aNbNodes = 0, aNbElems = 0; for (TopTools_SequenceOfShape::Iterator aRootIter (myRootShapes); aRootIter.More(); aRootIter.Next()) { for (TopExp_Explorer aFaceIter (aRootIter.Value(), TopAbs_FACE); aFaceIter.More(); aFaceIter.Next()) @@ -133,7 +133,6 @@ Standard_Boolean RWMesh_CafReader::perform (const TCollection_AsciiString& theFi const TopoDS_Face& aFace = TopoDS::Face (aFaceIter.Current()); if (const Handle(Poly_Triangulation)& aPolyTri = BRep_Tool::Triangulation (aFace, aDummyLoc)) { - ++aNbFaces; aNbNodes += aPolyTri->NbNodes(); aNbElems += aPolyTri->NbTriangles(); } diff --git a/src/SWDRAW/SWDRAW_ShapeFix.cxx b/src/SWDRAW/SWDRAW_ShapeFix.cxx index b52761a1c2..42a64837ed 100644 --- a/src/SWDRAW/SWDRAW_ShapeFix.cxx +++ b/src/SWDRAW/SWDRAW_ShapeFix.cxx @@ -362,10 +362,9 @@ static Standard_Integer reface (Draw_Interpretor& di, Standard_Integer argc, con TopoDS_Face face; ShapeBuild_ReShape resh; - Standard_Integer nbf = 0, nbfc = 0; + Standard_Integer nbfc = 0; for (TopExp_Explorer EF (Shape,TopAbs_FACE); EF.More(); EF.Next()) { TopoDS_Face F = TopoDS::Face (EF.Current()); face = F; - nbf ++; Standard_Boolean newface = Standard_False; // on va voir si ShapeTool_Face trouve qqchose a redire //:sw ShapeTool_Wire STW; @@ -803,7 +802,7 @@ static Standard_Integer connectedges(Draw_Interpretor& di, Standard_Integer n, c Standard_Integer ind = aMapEdges.FindIndex(aExp1.Current()); di< 0); @@ -110,7 +111,9 @@ Standard_Boolean ShapeFix::SameParameter(const TopoDS_Shape& shape, TopoDS_Edge E; while ( ex.More() && aPS.More() ) { +#ifdef OCCT_DEBUG numedge ++; +#endif int ierr = 0; TopLoc_Location loc; E = TopoDS::Edge (ex.Current()); @@ -140,7 +143,13 @@ Standard_Boolean ShapeFix::SameParameter(const TopoDS_Shape& shape, sfe->FixSameParameter (E); // K2-SEP97 } - if (!BRep_Tool::SameParameter (E)) { ierr = 1; nbfail ++; } + if (!BRep_Tool::SameParameter (E)) + { + ierr = 1; +#ifdef OCCT_DEBUG + nbfail ++; +#endif + } if (ierr) { @@ -575,7 +584,7 @@ Standard_Boolean ShapeFix::FixVertexPosition(TopoDS_Shape& theshape, //Standard_Real dd1 = (acenter - p1.XYZ()).Modulus(); //Standard_Real dd2 = (acenter - p2.XYZ()).Modulus(); - if(isFirst) { + if(isFirst) { if( k>2) { acenter += p1.XYZ(); acenter /= 2.0; diff --git a/src/ShapeFix/ShapeFix_Face.cxx b/src/ShapeFix/ShapeFix_Face.cxx index b1dc19303b..24ccb07998 100644 --- a/src/ShapeFix/ShapeFix_Face.cxx +++ b/src/ShapeFix/ShapeFix_Face.cxx @@ -1168,7 +1168,6 @@ Standard_Boolean ShapeFix_Face::FixOrientation(TopTools_DataMapOfShapeListOfShap MW.Clear(); SI.Clear(); MapIntWires.Clear(); - Standard_Integer NbOuts=0; Standard_Integer i; NCollection_Array1 aWireBoxes(1, nb); @@ -1195,8 +1194,8 @@ Standard_Boolean ShapeFix_Face::FixOrientation(TopTools_DataMapOfShapeListOfShap //avoiding problems with segment in Bnd_Box gac.Load(cw); } - else - gac.Load(cw,cf,cl); + else + gac.Load(cw,cf,cl); BndLib_Add2dCurve::Add(gac,::Precision::Confusion(),aBox); } @@ -1345,7 +1344,6 @@ Standard_Boolean ShapeFix_Face::FixOrientation(TopTools_DataMapOfShapeListOfShap else { MW.Bind(aw,IntWires); if(sta==TopAbs_OUT) { - NbOuts++; if(staout==TopAbs_IN ) { // wire is OUT but InfinitePoint is IN => need to reverse ShapeExtend_WireData sewd (aw); @@ -1375,7 +1373,6 @@ Standard_Boolean ShapeFix_Face::FixOrientation(TopTools_DataMapOfShapeListOfShap Standard_Integer tmpi = SI.Find(aw); if(tmpi>1) { if(!MapIntWires.Contains(aw)) { - NbOuts++; const TopTools_ListOfShape& IW = MW.Find(aw); if(tmpi==3) { // wire is OUT but InfinitePoint is IN => need to reverse diff --git a/src/ShapeFix/ShapeFix_Shell.cxx b/src/ShapeFix/ShapeFix_Shell.cxx index 6eb989fad8..25adf00afe 100644 --- a/src/ShapeFix/ShapeFix_Shell.cxx +++ b/src/ShapeFix/ShapeFix_Shell.cxx @@ -571,7 +571,6 @@ static void GlueClosedCandidate(TopTools_SequenceOfShape& OpenShells, for(Standard_Integer j = i+1 ; j <= OpenShells.Length();j++ ) { Standard_Boolean isAddShell = Standard_True; Standard_Boolean isReversed = Standard_False; - Standard_Integer nbedge =0; TopTools_MapOfShape mapEdges2; const TopoDS_Shape& aShell2 = OpenShells.Value(j); if(!GetFreeEdges(aShell2,mapEdges2)) continue; @@ -586,7 +585,6 @@ static void GlueClosedCandidate(TopTools_SequenceOfShape& OpenShells, if((edge2.Orientation() == TopAbs_FORWARD && dire.Contains(edge2)) || (edge2.Orientation() == TopAbs_REVERSED && reve.Contains(edge2))) isReversed = Standard_True; - nbedge++; } if(!isAddShell) continue; diff --git a/src/TopOpeBRepBuild/TopOpeBRepBuild_FaceBuilder.cxx b/src/TopOpeBRepBuild/TopOpeBRepBuild_FaceBuilder.cxx index 2cf6c55221..0c6e9518e7 100644 --- a/src/TopOpeBRepBuild/TopOpeBRepBuild_FaceBuilder.cxx +++ b/src/TopOpeBRepBuild/TopOpeBRepBuild_FaceBuilder.cxx @@ -240,17 +240,17 @@ void TopOpeBRepBuild_FaceBuilder::DetectUnclosedWire(TopTools_IndexedDataMapOfSh TopTools_IndexedDataMapOfShapeShape mapVon1EdgeDRAW,mapVVsameGDRAW; Standard_Boolean trc = TopOpeBRepBuild_GettracePURGE(); if (trc) std::cout< closed"<= I1 && i <= I2 ) { Lou.Append(EL); - nadd++; } } } diff --git a/src/TopOpeBRepBuild/TopOpeBRepBuild_GridEE.cxx b/src/TopOpeBRepBuild/TopOpeBRepBuild_GridEE.cxx index ef438227d6..d1f6ca0f99 100644 --- a/src/TopOpeBRepBuild/TopOpeBRepBuild_GridEE.cxx +++ b/src/TopOpeBRepBuild/TopOpeBRepBuild_GridEE.cxx @@ -503,9 +503,8 @@ void TopOpeBRepBuild_Builder::GFillPointTopologyPVS(const TopoDS_Shape& E, if (kp3) l2dFEcur.First()->Transition().Orientation(TopAbs_IN); - TopOpeBRepDS_PointIterator itCur(LICur); Standard_Integer iICur=0; + TopOpeBRepDS_PointIterator itCur(LICur); while ( itCur.More() ) { - iICur++; const Handle(TopOpeBRepDS_Interference)& I1=itCur.Value(); const TopOpeBRepDS_Transition& T1=I1->Transition(); T1.Orientation(TopAbs_IN); @@ -548,7 +547,7 @@ void TopOpeBRepBuild_Builder::GFillPointTopologyPVS(const TopoDS_Shape& E, } } // split 2d else { // split 3d - keepinterf1 = (ST1 == TopOpeBRepDS_FACE); // (iICur == 1); + keepinterf1 = (ST1 == TopOpeBRepDS_FACE); } } if ( keepinterf1 ) { diff --git a/src/TopOpeBRepBuild/TopOpeBRepBuild_Merge.cxx b/src/TopOpeBRepBuild/TopOpeBRepBuild_Merge.cxx index 4c353a2dfa..383f3bbcfe 100644 --- a/src/TopOpeBRepBuild/TopOpeBRepBuild_Merge.cxx +++ b/src/TopOpeBRepBuild/TopOpeBRepBuild_Merge.cxx @@ -124,12 +124,9 @@ static void CorrectUnclosedWire(TopoDS_Shape& aWire) // std::cout << "-------CorrectUnclosedWire" << std::endl; BRep_Builder BB; TopoDS_Iterator tdi(aWire, Standard_False, Standard_False); - Standard_Integer nbe = 0; for(; tdi.More(); tdi.Next()) { - nbe++; const TopoDS_Shape& ed = tdi.Value(); Standard_Integer nbv = ed.NbChildren(); -// std::cout << "Edge " << nbe << " : " << nbv << std::endl; if(nbv <= 1) { // std::cout << "Remove bad edge" << std::endl; BB.Remove(aWire, ed); @@ -455,10 +452,7 @@ void TopOpeBRepBuild_Builder::MakeEdges(const TopoDS_Shape& anEdge,TopOpeBRepBui Standard_Integer iE; Standard_Boolean tSPS = GtraceSPS(anEdge,iE); Standard_Integer ne = 0; #endif - - Standard_Integer nvertex = 0; - for (TopOpeBRepTool_ShapeExplorer ex(anEdge,TopAbs_VERTEX); ex.More(); ex.Next()) nvertex++; - + TopoDS_Shape newEdge; for (EDBU.InitEdge(); EDBU.MoreEdge(); EDBU.NextEdge()) { diff --git a/src/TopOpeBRepBuild/TopOpeBRepBuild_WireEdgeClassifier.cxx b/src/TopOpeBRepBuild/TopOpeBRepBuild_WireEdgeClassifier.cxx index 411d3c2066..04622c1065 100644 --- a/src/TopOpeBRepBuild/TopOpeBRepBuild_WireEdgeClassifier.cxx +++ b/src/TopOpeBRepBuild/TopOpeBRepBuild_WireEdgeClassifier.cxx @@ -225,7 +225,7 @@ TopAbs_State TopOpeBRepBuild_WireEdgeClassifier::CompareShapes TopTools_IndexedMapOfShape mapv1; mapv1.Add(vf1); mapv1.Add(vl1); ResetShape(e1); - Standard_Integer iE = 0; Standard_Boolean indy = Standard_False; + Standard_Boolean indy = Standard_False; TopExp_Explorer Ex; for(Ex.Init(B2,TopAbs_EDGE); Ex.More(); Ex.Next()) { // for(TopExp_Explorer Ex(B2,TopAbs_EDGE); Ex.More(); Ex.Next()) { @@ -248,7 +248,6 @@ TopAbs_State TopOpeBRepBuild_WireEdgeClassifier::CompareShapes if (indy) {state = TopAbs_UNKNOWN; break;} CompareElement(E); state = State(); - iE++; } // ex(B2,EDGE) if (state != TopAbs_UNKNOWN) { break; diff --git a/src/TopOpeBRepBuild/TopOpeBRepBuild_WireEdgeSet.cxx b/src/TopOpeBRepBuild/TopOpeBRepBuild_WireEdgeSet.cxx index a3e98020d0..b4796f2668 100644 --- a/src/TopOpeBRepBuild/TopOpeBRepBuild_WireEdgeSet.cxx +++ b/src/TopOpeBRepBuild/TopOpeBRepBuild_WireEdgeSet.cxx @@ -221,10 +221,13 @@ const TopTools_ListOfShape & TopOpeBRepBuild_WireEdgeSet::MakeNeighboursList(con // edge list made of connected shapes to Earg through Varg myCurrentShapeNeighbours.Clear(); - +#ifdef DRAW Standard_Integer iapp = 0; +#endif for (TopTools_ListIteratorOfListOfShape it(l); it.More(); it.Next()) { +#ifdef DRAW iapp++; +#endif const TopoDS_Shape& curn = it.Value(); // current neighbour Standard_Boolean k = VertexConnectsEdgesClosing(V,E,curn); if (k) { @@ -272,10 +275,13 @@ const TopTools_ListOfShape & TopOpeBRepBuild_WireEdgeSet::MakeNeighboursList(con if (Eori == TopAbs_REVERSED) d1E.Reverse(); TopTools_ListIteratorOfListOfShape lclo(myCurrentShapeNeighbours); +#ifdef DRAW Standard_Integer rang = 0; +#endif while (lclo.More()) { +#ifdef DRAW rang++; - +#endif if ( ! IsClosed(lclo.Value()) ) { lclo.Next(); continue; diff --git a/src/TopOpeBRepBuild/TopOpeBRepBuild_makefaces.cxx b/src/TopOpeBRepBuild/TopOpeBRepBuild_makefaces.cxx index 4d58febb9d..c3b749d4c8 100644 --- a/src/TopOpeBRepBuild/TopOpeBRepBuild_makefaces.cxx +++ b/src/TopOpeBRepBuild/TopOpeBRepBuild_makefaces.cxx @@ -137,9 +137,9 @@ void TopOpeBRepBuild_Builder::GWESMakeFaces Standard_Integer rankVsameG = BDS.AncestorRank(VsameG); Standard_Boolean otherRef = (rankVsameG != 0 && rankV != 1); - if (otherRef) + if (otherRef) BDS.FillShapesSameDomain(VsameG,V); - else + else BDS.FillShapesSameDomain(V,VsameG); hsdm = myDataStructure->HasSameDomain(V); @@ -355,8 +355,6 @@ void TopOpeBRepBuild_Builder::GFABUMakeFaces(const TopoDS_Shape& FF,TopOpeBRepBu for (; FABU.MoreWire(); FABU.NextWire()) { Standard_Integer ne = 0; - Standard_Integer neFORWARD = 0; - Standard_Integer neREVERSED = 0; Standard_Integer neINTERNAL = 0; Standard_Integer neEXTERNAL = 0; @@ -387,8 +385,6 @@ void TopOpeBRepBuild_Builder::GFABUMakeFaces(const TopoDS_Shape& FF,TopOpeBRepBu TopAbs_Orientation oE = newEdge.Orientation(); if (oE == TopAbs_INTERNAL) neINTERNAL++; else if (oE == TopAbs_EXTERNAL) neEXTERNAL++; - else if (oE == TopAbs_FORWARD) neFORWARD++; - else if (oE == TopAbs_REVERSED) neREVERSED++; Standard_Boolean hasPC = FC2D_HasCurveOnSurface(newEdge,newFace); // jyl980402+ if (!hasPC) // jyl980402+ @@ -480,8 +476,8 @@ void TopOpeBRepBuild_Builder::GFABUMakeFaces(const TopoDS_Shape& FF,TopOpeBRepBu if(chkORI == 1) { TopAbs_Orientation ori = FUN_ReOrientIntExtEdge(E2,O2,E1); - if(ori == TopAbs_FORWARD) { E1.Orientation(TopAbs_FORWARD); neFORWARD++; } - if(ori == TopAbs_REVERSED){ E1.Orientation(TopAbs_REVERSED); neREVERSED++; } + if(ori == TopAbs_FORWARD) { E1.Orientation(TopAbs_FORWARD); } + if(ori == TopAbs_REVERSED){ E1.Orientation(TopAbs_REVERSED); } if(ori == TopAbs_REVERSED || ori == TopAbs_FORWARD) { if(O1 == TopAbs_INTERNAL) neINTERNAL--; @@ -491,8 +487,8 @@ void TopOpeBRepBuild_Builder::GFABUMakeFaces(const TopoDS_Shape& FF,TopOpeBRepBu if(chkORI == 2) { TopAbs_Orientation ori = FUN_ReOrientIntExtEdge(E1,O1,E2); - if(ori == TopAbs_FORWARD) { E2.Orientation(TopAbs_FORWARD); neFORWARD++; } - if(ori == TopAbs_REVERSED){ E2.Orientation(TopAbs_REVERSED); neREVERSED++; } + if(ori == TopAbs_FORWARD) { E2.Orientation(TopAbs_FORWARD); } + if(ori == TopAbs_REVERSED){ E2.Orientation(TopAbs_REVERSED); } if(ori == TopAbs_REVERSED || ori == TopAbs_FORWARD) { if(O2 == TopAbs_INTERNAL) neINTERNAL--; diff --git a/src/TopOpeBRepDS/TopOpeBRepDS_samdom.cxx b/src/TopOpeBRepDS/TopOpeBRepDS_samdom.cxx index df6c77a351..4b67c0932b 100644 --- a/src/TopOpeBRepDS/TopOpeBRepDS_samdom.cxx +++ b/src/TopOpeBRepDS/TopOpeBRepDS_samdom.cxx @@ -214,12 +214,10 @@ Standard_EXPORT void FDSSDM_copylist(const TopTools_ListOfShape& Lin,const Stand // copie des elements [i1..i2] de Lin dans Lou. 1er element de Lin = index 1 { TopTools_ListIteratorOfListOfShape it(Lin); - Standard_Integer nadd = 0; for ( Standard_Integer i = 1; it.More(); it.Next(),i++ ) { const TopoDS_Shape& EL = it.Value(); if ( i >= I1 && i <= I2 ) { Lou.Append(EL); - nadd++; } } } // copylist diff --git a/src/XSControl/XSControl_TransferReader.cxx b/src/XSControl/XSControl_TransferReader.cxx index ba6c8761d5..4d55b92b6e 100644 --- a/src/XSControl/XSControl_TransferReader.cxx +++ b/src/XSControl/XSControl_TransferReader.cxx @@ -1176,7 +1176,7 @@ void XSControl_TransferReader::PrintStatsOnList(const Handle(Transfer_TransientP if (what >= 1 && what <= 3) { Standard_Integer stat; - Standard_Integer nbv = 0, nbw = 0, nbf = 0, nbr = 0, nbrw = 0, nbrf = 0, nbnr = 0, nbi = 0; + Standard_Integer nbw = 0, nbf = 0, nbr = 0, nbrw = 0, nbrf = 0, nbnr = 0, nbi = 0; Transfer_IteratorOfProcessForTransient itrp(Standard_True); if (what == 1) itrp = TP->RootResult(Standard_True); if (what == 2) itrp = TP->CompleteResult(Standard_True); @@ -1214,7 +1214,6 @@ void XSControl_TransferReader::PrintStatsOnList(const Handle(Transfer_TransientP stat = BinderStatus(binder,mess); // 0 Binder Null. 1 void 2 Warning seul 3 Fail seul // 11 Resultat OK. 12 Resultat+Warning. 13 Resultat+Fail - if (stat == 0 || stat == 1) nbv ++; if (stat == 2) nbw ++; if (stat == 3) nbf ++; if (stat == 11) nbr ++; diff --git a/src/XmlMDataStd/XmlMDataStd_ExpressionDriver.cxx b/src/XmlMDataStd/XmlMDataStd_ExpressionDriver.cxx index fc55ecaf49..c551b43f53 100644 --- a/src/XmlMDataStd/XmlMDataStd_ExpressionDriver.cxx +++ b/src/XmlMDataStd/XmlMDataStd_ExpressionDriver.cxx @@ -85,7 +85,6 @@ Standard_Boolean XmlMDataStd_ExpressionDriver::Paste myMessageDriver->Send (aMsgString, Message_Fail); return Standard_False; } - Standard_Integer i = 1; while (aNb > 0) { Handle(TDF_Attribute) aV; @@ -100,7 +99,6 @@ Standard_Boolean XmlMDataStd_ExpressionDriver::Paste // next variable if (!XmlObjMgt::GetInteger(aVs, aNb)) aNb = 0; - i++; } } @@ -132,10 +130,8 @@ void XmlMDataStd_ExpressionDriver::Paste { TCollection_AsciiString aGsStr; TDF_ListIteratorOfAttributeList it; - Standard_Integer index = 0; for (it.Initialize(aC->GetVariables()); it.More(); it.Next()) { - index++; TV = it.Value(); if (!TV.IsNull()) { diff --git a/src/Xw/Xw_Window.cxx b/src/Xw/Xw_Window.cxx index 548767a4fe..3ac4ace52a 100644 --- a/src/Xw/Xw_Window.cxx +++ b/src/Xw/Xw_Window.cxx @@ -67,11 +67,10 @@ Xw_Window::Xw_Window (const Handle(Aspect_DisplayConnection)& theXDisplay, int aScreen = DefaultScreen(aDisp); Window aParent = RootWindow (aDisp, aScreen); - unsigned long aMask = 0; XSetWindowAttributes aWinAttr; memset (&aWinAttr, 0, sizeof(aWinAttr)); aWinAttr.event_mask = ExposureMask | StructureNotifyMask; - aMask |= CWEventMask; + if (aVisInfo != NULL) { aWinAttr.colormap = XCreateColormap(aDisp, aParent, aVisInfo->visual, AllocNone); diff --git a/src/math/math_TrigonometricFunctionRoots.cxx b/src/math/math_TrigonometricFunctionRoots.cxx index 692fa3153c..093d5703b0 100644 --- a/src/math/math_TrigonometricFunctionRoots.cxx +++ b/src/math/math_TrigonometricFunctionRoots.cxx @@ -334,7 +334,6 @@ void math_TrigonometricFunctionRoots::Perform(const Standard_Real A, ko(4) = 4.0*B+2.0*D; ko(5) = A+C+E; Standard_Boolean bko; - Standard_Integer nbko=0; do { bko=Standard_False; math_DirectPolynomialRoots Resol4(ko(1), ko(2), ko(3), ko(4), ko(5)); @@ -374,7 +373,6 @@ void math_TrigonometricFunctionRoots::Perform(const Standard_Real A, //-- std::cout<<" Val Double ("<Eps) { bko=Standard_True; - nbko++; #ifdef OCCT_DEBUG //if(nbko==1) { // std::cout<<"Pb ds math_TrigonometricFunctionRoots CC=" From 8748042259f22d72b3b076bc5433a54ca42734e4 Mon Sep 17 00:00:00 2001 From: akaftasev Date: Mon, 22 May 2023 12:00:32 +0100 Subject: [PATCH 484/639] 0033390: Coding - Debug version of OCCT does not compile Deleted code for OCCT_DEBUG was returned and added under macros OCCT_DEBUG --- src/Poly/Poly_MakeLoops.cxx | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/Poly/Poly_MakeLoops.cxx b/src/Poly/Poly_MakeLoops.cxx index 72450641c6..8bf6c3e282 100644 --- a/src/Poly/Poly_MakeLoops.cxx +++ b/src/Poly/Poly_MakeLoops.cxx @@ -154,6 +154,7 @@ Standard_Integer Poly_MakeLoops::Perform() #ifdef OCCT_DEBUG if (doDebug) showBoundaryBreaks(); + Standard_Integer aNbLoopsOnPass2 = 0; #endif Standard_Integer aResult = 0; @@ -191,6 +192,10 @@ Standard_Integer Poly_MakeLoops::Perform() if (aStartNumber <= aContour.Extent()) { // there is a closed loop in the contour +#ifdef OCCT_DEBUG + if (aPassNum == 1) + aNbLoopsOnPass2++; +#endif acceptContour (aContour, aStartNumber); } if (aStartNumber > 1) @@ -219,8 +224,8 @@ Standard_Integer Poly_MakeLoops::Perform() } } #ifdef OCCT_DEBUG - if (doDebug && nbLoopsOnPass2) - std::cout << "MakeLoops: " << nbLoopsOnPass2 + if (doDebug && aNbLoopsOnPass2) + std::cout << "MakeLoops: " << aNbLoopsOnPass2 << " contours accepted on the second pass" << std::endl; #endif From 54ed243582970aebb8f69954311d4d94b6fc2c7e Mon Sep 17 00:00:00 2001 From: dpasukhi Date: Fri, 19 May 2023 21:04:43 +0100 Subject: [PATCH 485/639] 0033372: Visualization - Compilation of git master fails against vtk 9.2.6 Fixed compilation on vtk 9.2.6. Resolved name collisions with X11 headers --- src/IVtkDraw/IVtkDraw_Interactor.cxx | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/IVtkDraw/IVtkDraw_Interactor.cxx b/src/IVtkDraw/IVtkDraw_Interactor.cxx index 08e5fe3dde..06626bb315 100644 --- a/src/IVtkDraw/IVtkDraw_Interactor.cxx +++ b/src/IVtkDraw/IVtkDraw_Interactor.cxx @@ -27,6 +27,15 @@ #undef AllValues #endif +// Resolve name collisions with X11 headers +#ifdef Status +#undef Status +#endif + +#ifdef Success +#undef Success +#endif + #include #include #endif From 6aa053ae000b372ebd524d7c530bc18169f2cdc5 Mon Sep 17 00:00:00 2001 From: dpasukhi Date: Mon, 22 May 2023 12:53:10 +0100 Subject: [PATCH 486/639] 0033391: Coding - Clearing old definition way for strcasecmp Removed artifacts for strcasecmp definitions --- src/BRepTest/BRepTest_FeatureCommands.cxx | 1 - src/BRepTest/BRepTest_SurfaceCommands.cxx | 4 ---- src/BRepTools/BRepTools_ShapeSet.cxx | 10 ---------- src/GeometryTest/GeometryTest_SurfaceCommands.cxx | 1 - src/GeomliteTest/GeomliteTest_ModificationCommands.cxx | 1 - src/ViewerTest/ViewerTest_FilletCommands.cxx | 1 - 6 files changed, 18 deletions(-) diff --git a/src/BRepTest/BRepTest_FeatureCommands.cxx b/src/BRepTest/BRepTest_FeatureCommands.cxx index 102791e97b..c5e7aaab6c 100644 --- a/src/BRepTest/BRepTest_FeatureCommands.cxx +++ b/src/BRepTest/BRepTest_FeatureCommands.cxx @@ -57,7 +57,6 @@ #include #ifdef _WIN32 -//#define strcasecmp _stricmp Already defined Standard_IMPORT Draw_Viewer dout; #endif diff --git a/src/BRepTest/BRepTest_SurfaceCommands.cxx b/src/BRepTest/BRepTest_SurfaceCommands.cxx index 1ef3fd00da..52cc4f72e1 100644 --- a/src/BRepTest/BRepTest_SurfaceCommands.cxx +++ b/src/BRepTest/BRepTest_SurfaceCommands.cxx @@ -43,10 +43,6 @@ #include #include -#ifdef _WIN32 -//#define strcasecmp strcmp Already defined -#endif - //----------------------------------------------------------------------- // suppressarg : suppress a[d],modifie na-- //----------------------------------------------------------------------- diff --git a/src/BRepTools/BRepTools_ShapeSet.cxx b/src/BRepTools/BRepTools_ShapeSet.cxx index 2251c4d9cb..42fbe98fe2 100644 --- a/src/BRepTools/BRepTools_ShapeSet.cxx +++ b/src/BRepTools/BRepTools_ShapeSet.cxx @@ -14,8 +14,6 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -// Modified: Portage NT 7-5-97 DPF (strcasecmp) - #include #include #include @@ -45,14 +43,6 @@ #include #include -#ifdef MacOS -#define strcasecmp(p,q) strcmp(p,q) -#elif _WIN32 -#define strcasecmp strcmp -#elif AIX -#include -#endif - // Modified: 02 Nov 2000: BUC60769. JMB, PTV. In order to be able to read BRep // files that came from a platform different from where CasCade // is run, we need the following modifications. diff --git a/src/GeometryTest/GeometryTest_SurfaceCommands.cxx b/src/GeometryTest/GeometryTest_SurfaceCommands.cxx index b2809ce6fd..80431ddd74 100644 --- a/src/GeometryTest/GeometryTest_SurfaceCommands.cxx +++ b/src/GeometryTest/GeometryTest_SurfaceCommands.cxx @@ -48,7 +48,6 @@ #ifdef _MSC_VER #include -//#define strcasecmp strcmp Already defined #endif #ifdef _WIN32 diff --git a/src/GeomliteTest/GeomliteTest_ModificationCommands.cxx b/src/GeomliteTest/GeomliteTest_ModificationCommands.cxx index 0523f1e93d..32d4ac3a76 100644 --- a/src/GeomliteTest/GeomliteTest_ModificationCommands.cxx +++ b/src/GeomliteTest/GeomliteTest_ModificationCommands.cxx @@ -34,7 +34,6 @@ #ifdef _MSC_VER #include -//#define strcasecmp strcmp Already defined #endif diff --git a/src/ViewerTest/ViewerTest_FilletCommands.cxx b/src/ViewerTest/ViewerTest_FilletCommands.cxx index 2590c103c9..03249ddc25 100644 --- a/src/ViewerTest/ViewerTest_FilletCommands.cxx +++ b/src/ViewerTest/ViewerTest_FilletCommands.cxx @@ -34,7 +34,6 @@ #include #ifdef _WIN32 -//#define strcasecmp strcmp Already defined in Standard # include #endif From b47b7e69f7936aef76be71ff69f722675a5476b6 Mon Sep 17 00:00:00 2001 From: mzernova Date: Fri, 19 Nov 2021 07:11:21 +0000 Subject: [PATCH 487/639] 0031956: Visualization - provide Image_AlienPixMap::Save() writing into a memory buffer instead of a file Added two new Image_AlienPixMap::Save() overloads, taking std::ostream or memory buffer arguments. --- src/Image/Image_AlienPixMap.cxx | 708 ++++++++++++++++++++++++-------- src/Image/Image_AlienPixMap.hxx | 57 ++- src/QABugs/QABugs_1.cxx | 117 +++++- tests/v3d/bugs/bug31956 | 41 ++ 4 files changed, 738 insertions(+), 185 deletions(-) create mode 100644 tests/v3d/bugs/bug31956 diff --git a/src/Image/Image_AlienPixMap.cxx b/src/Image/Image_AlienPixMap.cxx index 99b84acebd..f869e8fc16 100644 --- a/src/Image/Image_AlienPixMap.cxx +++ b/src/Image/Image_AlienPixMap.cxx @@ -135,6 +135,10 @@ namespace Image_FreeImageStream (std::istream& theStream) : myIStream (&theStream), myOStream (NULL), myInitPos (theStream.tellg()) {} + //! Construct wrapper over output stream. + Image_FreeImageStream (std::ostream& theStream) + : myIStream (NULL), myOStream (&theStream), myInitPos (theStream.tellp()) {} + //! Get io object. FreeImageIO GetFiIO() const { @@ -143,12 +147,15 @@ namespace if (myIStream != NULL) { anIo.read_proc = readProc; - anIo.seek_proc = seekProc; - anIo.tell_proc = tellProc; + anIo.seek_proc = seekProcIn; + anIo.tell_proc = tellProcIn; } if (myOStream != NULL) { anIo.write_proc = writeProc; + // seek and tell are also used for saving in some formats (.tif for example) + anIo.seek_proc = seekProcOut; + anIo.tell_proc = tellProcOut; } return anIo; } @@ -183,7 +190,7 @@ namespace } //! Simulate fseek(). - static int DLL_CALLCONV seekProc (fi_handle theHandle, long theOffset, int theOrigin) + static int DLL_CALLCONV seekProcIn (fi_handle theHandle, long theOffset, int theOrigin) { Image_FreeImageStream* aThis = (Image_FreeImageStream* )theHandle; if (aThis->myIStream == NULL) @@ -216,13 +223,53 @@ namespace return isSeekDone ? 0 : -1; } + static int DLL_CALLCONV seekProcOut (fi_handle theHandle, long theOffset, int theOrigin) + { + Image_FreeImageStream* aThis = (Image_FreeImageStream* )theHandle; + if (aThis->myOStream == NULL) + { + return -1; + } + + bool isSeekDone = false; + switch (theOrigin) + { + case SEEK_SET: + if (aThis->myOStream->seekp ((std::streamoff )aThis->myInitPos + theOffset, std::ios::beg)) + { + isSeekDone = true; + } + break; + case SEEK_CUR: + if (aThis->myOStream->seekp (theOffset, std::ios::cur)) + { + isSeekDone = true; + } + break; + case SEEK_END: + if (aThis->myOStream->seekp (theOffset, std::ios::end)) + { + isSeekDone = true; + } + break; + } + return isSeekDone ? 0 : -1; + } + //! Simulate ftell(). - static long DLL_CALLCONV tellProc (fi_handle theHandle) + static long DLL_CALLCONV tellProcIn (fi_handle theHandle) { Image_FreeImageStream* aThis = (Image_FreeImageStream* )theHandle; const long aPos = aThis->myIStream != NULL ? (long )(aThis->myIStream->tellg() - aThis->myInitPos) : 0; return aPos; } + + static long DLL_CALLCONV tellProcOut (fi_handle theHandle) + { + Image_FreeImageStream* aThis = (Image_FreeImageStream* )theHandle; + const long aPos = aThis->myOStream != NULL ? (long )(aThis->myOStream->tellp() - aThis->myInitPos) : 0; + return aPos; + } private: std::istream* myIStream; std::ostream* myOStream; @@ -238,6 +285,37 @@ namespace return aGuid; } + //! Returns GUID of image format from file name + static GUID getFileFormatFromName (const TCollection_AsciiString& theFileName) + { + TCollection_AsciiString aFileNameLower = theFileName; + aFileNameLower.LowerCase(); + GUID aFileFormat = getNullGuid(); + if (aFileNameLower.EndsWith (".bmp")) + { + aFileFormat = GUID_ContainerFormatBmp; + } + else if (aFileNameLower.EndsWith (".png")) + { + aFileFormat = GUID_ContainerFormatPng; + } + else if (aFileNameLower.EndsWith (".jpg") + || aFileNameLower.EndsWith (".jpeg")) + { + aFileFormat = GUID_ContainerFormatJpeg; + } + else if (aFileNameLower.EndsWith (".tiff") + || aFileNameLower.EndsWith (".tif")) + { + aFileFormat = GUID_ContainerFormatTiff; + } + else if (aFileNameLower.EndsWith (".gif")) + { + aFileFormat = GUID_ContainerFormatGif; + } + return aFileFormat; + } + //! Sentry over IUnknown pointer. template class Image_ComPtr { @@ -346,7 +424,11 @@ namespace // purpose : // ======================================================================= Image_AlienPixMap::Image_AlienPixMap() +#ifdef HAVE_WINCODEC +: myPalette (NULL) +#else : myLibImage (NULL) +#endif { SetTopDown (false); } @@ -505,6 +587,12 @@ void Image_AlienPixMap::Clear() FreeImage_Unload (myLibImage); myLibImage = NULL; } +#elif defined(HAVE_WINCODEC) + if (myPalette != NULL) + { + myPalette->Release(); + myPalette = NULL; + } #elif defined(__EMSCRIPTEN__) if (myLibImage != NULL) { @@ -535,7 +623,7 @@ bool Image_AlienPixMap::IsTopDownDefault() // ======================================================================= #ifdef HAVE_FREEIMAGE bool Image_AlienPixMap::Load (const Standard_Byte* theData, - Standard_Size theLength, + const Standard_Size theLength, const TCollection_AsciiString& theImagePath) { Clear(); @@ -705,7 +793,7 @@ bool Image_AlienPixMap::Load (std::istream& theStream, #elif defined(HAVE_WINCODEC) bool Image_AlienPixMap::Load (const Standard_Byte* theData, - Standard_Size theLength, + const Standard_Size theLength, const TCollection_AsciiString& theFileName) { Clear(); @@ -751,7 +839,7 @@ bool Image_AlienPixMap::Load (const Standard_Byte* theData, || aFrameCount < 1 || aWicDecoder->GetFrame (0, &aWicFrameDecode.ChangePtr()) != S_OK || aWicFrameDecode->GetSize (&aFrameSizeX, &aFrameSizeY) != S_OK - || aWicFrameDecode->GetPixelFormat (&aWicPixelFormat)) + || aWicFrameDecode->GetPixelFormat (&aWicPixelFormat) != S_OK) { Message::SendFail ("Error: cannot get WIC Image Frame"); return false; @@ -768,7 +856,6 @@ bool Image_AlienPixMap::Load (const Standard_Byte* theData, Message::SendFail ("Error: cannot convert WIC Image Frame to RGB format"); return false; } - aWicFrameDecode.Nullify(); } if (!Image_PixMap::InitTrash (aPixelFormat, aFrameSizeX, aFrameSizeY)) @@ -777,17 +864,37 @@ bool Image_AlienPixMap::Load (const Standard_Byte* theData, return false; } + TCollection_AsciiString aFileNameLower = theFileName; + aFileNameLower.LowerCase(); + if (aFileNameLower.EndsWith (".gif") + && (aWicImgFactory->CreatePalette (&myPalette) != S_OK + || aWicFrameDecode->CopyPalette (myPalette) != S_OK)) + { + Message::SendFail ("Error: cannot get palette for GIF image"); + return false; + } + IWICBitmapSource* aWicSrc = aWicFrameDecode.get(); if(!aWicConvertedFrame.IsNull()) { aWicSrc = aWicConvertedFrame.get(); } + + IWICBitmapFlipRotator* aRotator; + bool isTopDown = true; + if (aWicImgFactory->CreateBitmapFlipRotator (&aRotator) == S_OK + && aRotator->Initialize (aWicSrc, WICBitmapTransformFlipVertical) == S_OK) + { + isTopDown = false; + aWicSrc = aRotator; + } + if (aWicSrc->CopyPixels (NULL, (UINT )SizeRowBytes(), (UINT )SizeBytes(), ChangeData()) != S_OK) { Message::SendFail ("Error: cannot copy pixels from WIC Image"); return false; } - SetTopDown (true); + SetTopDown (isTopDown); return true; } bool Image_AlienPixMap::Load (std::istream& theStream, @@ -824,7 +931,7 @@ bool Image_AlienPixMap::Load (std::istream& , return false; } bool Image_AlienPixMap::Load (const Standard_Byte* theData, - Standard_Size theLength, + const Standard_Size theLength, const TCollection_AsciiString& theImagePath) { Clear(); @@ -857,7 +964,7 @@ bool Image_AlienPixMap::Load (std::istream& , return false; } bool Image_AlienPixMap::Load (const Standard_Byte* , - Standard_Size , + const Standard_Size , const TCollection_AsciiString& ) { Clear(); @@ -907,11 +1014,52 @@ bool Image_AlienPixMap::savePPM (const TCollection_AsciiString& theFileName) con return true; } +// ======================================================================= +// function : convertData +// purpose : +// ======================================================================= +#ifdef HAVE_WINCODEC +static bool convertData (const Image_AlienPixMap& theSrcPixMapData, + const WICPixelFormatGUID& theFormat, + IWICImagingFactory& theWicImgFactory, + Image_PixMapData& theDstPixMapData) +{ + const UINT aSizeRowBytes = (UINT)theSrcPixMapData.SizeRowBytes(); + const UINT aSizeBytes = (UINT)theSrcPixMapData.SizeBytes(); + + Image_ComPtr anSrcImg; + Image_ComPtr aWicFormatConverter; + HRESULT anHResult = theWicImgFactory.CreateBitmapFromMemory ((UINT)theSrcPixMapData.SizeX(), (UINT)theSrcPixMapData.SizeY(), + convertToWicFormat (theSrcPixMapData.Format()), + aSizeRowBytes, aSizeBytes, + (BYTE*)theSrcPixMapData.Data(), &anSrcImg.ChangePtr()); + if (anHResult != S_OK + || theWicImgFactory.CreateFormatConverter (&aWicFormatConverter.ChangePtr()) != S_OK + || aWicFormatConverter->Initialize (anSrcImg.get(), theFormat, WICBitmapDitherTypeNone, theSrcPixMapData.GetPalette(), 0.0f, WICBitmapPaletteTypeCustom) != S_OK) + { + Message::SendFail ("Error: cannot convert WIC Image Frame to required format"); + return false; + } + + theDstPixMapData.Init (Image_PixMap::DefaultAllocator(), 1, theSrcPixMapData.SizeXYZ(), aSizeRowBytes, NULL); + + if (aWicFormatConverter->CopyPixels (NULL, aSizeRowBytes, aSizeBytes, theDstPixMapData.ChangeData()) != S_OK) + { + Message::SendFail ("Error: cannot copy pixels from WIC Image"); + return false; + } + + return true; +} +#endif + // ======================================================================= // function : Save // purpose : // ======================================================================= -bool Image_AlienPixMap::Save (const TCollection_AsciiString& theFileName) +bool Image_AlienPixMap::Save (Standard_Byte* theBuffer, + const Standard_Size theLength, + const TCollection_AsciiString& theFileName) { #ifdef HAVE_FREEIMAGE if (myLibImage == NULL) @@ -939,129 +1087,39 @@ bool Image_AlienPixMap::Save (const TCollection_AsciiString& theFileName) SetTopDown (false); } - // FreeImage doesn't provide flexible format conversion API - // so we should perform multiple conversions in some cases! - FIBITMAP* anImageToDump = myLibImage; - switch (anImageFormat) - { - case FIF_PNG: - case FIF_BMP: - { - if (Format() == Image_Format_BGR32 - || Format() == Image_Format_RGB32) - { - // stupid FreeImage treats reserved byte as alpha if some bytes not set to 0xFF - for (Standard_Size aRow = 0; aRow < SizeY(); ++aRow) - { - for (Standard_Size aCol = 0; aCol < SizeX(); ++aCol) - { - myData.ChangeValue (aRow, aCol)[3] = 0xFF; - } - } - } - else if (FreeImage_GetImageType (myLibImage) != FIT_BITMAP) - { - anImageToDump = FreeImage_ConvertToType (myLibImage, FIT_BITMAP); - } - break; - } - case FIF_GIF: - { - FIBITMAP* aTmpBitmap = myLibImage; - if (FreeImage_GetImageType (myLibImage) != FIT_BITMAP) - { - aTmpBitmap = FreeImage_ConvertToType (myLibImage, FIT_BITMAP); - if (aTmpBitmap == NULL) - { - return false; - } - } - - if (FreeImage_GetBPP (aTmpBitmap) != 24) - { - FIBITMAP* aTmpBitmap24 = FreeImage_ConvertTo24Bits (aTmpBitmap); - if (aTmpBitmap != myLibImage) - { - FreeImage_Unload (aTmpBitmap); - } - if (aTmpBitmap24 == NULL) - { - return false; - } - aTmpBitmap = aTmpBitmap24; - } - - // need conversion to image with palette (requires 24bit bitmap) - anImageToDump = FreeImage_ColorQuantize (aTmpBitmap, FIQ_NNQUANT); - if (aTmpBitmap != myLibImage) - { - FreeImage_Unload (aTmpBitmap); - } - break; - } - case FIF_HDR: - case FIF_EXR: - { - if (Format() == Image_Format_Gray - || Format() == Image_Format_Alpha) - { - anImageToDump = FreeImage_ConvertToType (myLibImage, FIT_FLOAT); - } - else if (Format() == Image_Format_RGBA - || Format() == Image_Format_BGRA) - { - anImageToDump = FreeImage_ConvertToType (myLibImage, FIT_RGBAF); - } - else - { - FREE_IMAGE_TYPE aImgTypeFI = FreeImage_GetImageType (myLibImage); - if (aImgTypeFI != FIT_RGBF - && aImgTypeFI != FIT_RGBAF - && aImgTypeFI != FIT_FLOAT) - { - anImageToDump = FreeImage_ConvertToType (myLibImage, FIT_RGBF); - } - } - break; - } - default: - { - if (FreeImage_GetImageType (myLibImage) != FIT_BITMAP) - { - anImageToDump = FreeImage_ConvertToType (myLibImage, FIT_BITMAP); - if (anImageToDump == NULL) - { - return false; - } - } - - if (FreeImage_GetBPP (anImageToDump) != 24) - { - FIBITMAP* aTmpBitmap24 = FreeImage_ConvertTo24Bits (anImageToDump); - if (anImageToDump != myLibImage) - { - FreeImage_Unload (anImageToDump); - } - if (aTmpBitmap24 == NULL) - { - return false; - } - anImageToDump = aTmpBitmap24; - } - break; - } - } + FIBITMAP* anImageToDump = getImageToDump (anImageFormat); if (anImageToDump == NULL) { return false; } + bool isSaved = false; + if (theBuffer != NULL) + { + // a memory buffer wrapped by FreeImage is read only (images can be loaded but not be saved) + // so we call FreeImage_OpenMemory() with default arguments and just memcpy in requsted buffer. + FIMEMORY* aFiMem = FreeImage_OpenMemory(); + isSaved = (FreeImage_SaveToMemory (anImageFormat, anImageToDump, aFiMem) != FALSE); + BYTE* aData = NULL; + DWORD aSize; + FreeImage_AcquireMemory (aFiMem, &aData, &aSize); + if (aSize > theLength) + { + Message::SendFail ("Error: memory buffer too small for storing image"); + return false; + } + memcpy (theBuffer, aData, aSize); + FreeImage_CloseMemory (aFiMem); + } + else + { #ifdef _WIN32 - bool isSaved = (FreeImage_SaveU (anImageFormat, anImageToDump, aFileNameW.ToWideString()) != FALSE); + isSaved = (FreeImage_SaveU (anImageFormat, anImageToDump, aFileNameW.ToWideString ()) != FALSE); #else - bool isSaved = (FreeImage_Save (anImageFormat, anImageToDump, theFileName.ToCString()) != FALSE); + isSaved = (FreeImage_Save (anImageFormat, anImageToDump, theFileName.ToCString ()) != FALSE); #endif + } if (anImageToDump != myLibImage) { FreeImage_Unload (anImageToDump); @@ -1072,34 +1130,191 @@ bool Image_AlienPixMap::Save (const TCollection_AsciiString& theFileName) TCollection_AsciiString aFileNameLower = theFileName; aFileNameLower.LowerCase(); - GUID aFileFormat = getNullGuid(); if (aFileNameLower.EndsWith (".ppm")) { return savePPM (theFileName); } - else if (aFileNameLower.EndsWith (".bmp")) + + GUID aFileFormat = getFileFormatFromName (theFileName); + if (aFileFormat == getNullGuid()) + { + Message::SendFail ("Error: unsupported image format"); + return false; + } + + Image_ComPtr aWicImgFactory; + CoInitializeEx (NULL, COINIT_MULTITHREADED); + if (CoCreateInstance (CLSID_WICImagingFactory, NULL, CLSCTX_INPROC_SERVER, IID_PPV_ARGS(&aWicImgFactory.ChangePtr())) != S_OK) + { + Message::SendFail ("Error: cannot initialize WIC Imaging Factory"); + return false; + } + + WICPixelFormatGUID aWicPixelFormat = convertToWicFormat (myImgFormat); + if (aWicPixelFormat == getNullGuid()) + { + Message::SendFail ("Error: unsupported pixel format"); + return false; + } + + Image_PixMapData* aPixMapData = &myData; + Image_PixMapData aConvertedData; + if (aFileFormat == GUID_ContainerFormatGif) + { + aWicPixelFormat = GUID_WICPixelFormat8bppIndexed; + convertData (*this, aWicPixelFormat, *aWicImgFactory, aConvertedData); + aPixMapData = &aConvertedData; + } + + Image_ComPtr aWicStream; + Image_ComPtr aWicEncoder; + const TCollection_ExtendedString aFileNameW (theFileName); + if (theBuffer != NULL) + { + if (aWicImgFactory->CreateStream (&aWicStream.ChangePtr()) != S_OK + || aWicStream->InitializeFromMemory (theBuffer,(DWORD )theLength) != S_OK) + { + Message::SendFail ("Error: cannot create WIC Memory Stream"); + return false; + } + } + else + { + if (aWicImgFactory->CreateStream (&aWicStream.ChangePtr()) != S_OK + || aWicStream->InitializeFromFilename (aFileNameW.ToWideString(), GENERIC_WRITE) != S_OK) + { + Message::SendFail ("Error: cannot create WIC File Stream"); + return false; + } + } + if (aWicImgFactory->CreateEncoder (aFileFormat, NULL, &aWicEncoder.ChangePtr()) != S_OK + || aWicEncoder->Initialize (aWicStream.get(), WICBitmapEncoderNoCache) != S_OK) + { + Message::SendFail ("Error: cannot create WIC Encoder"); + return false; + } + + WICPixelFormatGUID aWicPixelFormatRes = aWicPixelFormat; + Image_ComPtr aWicFrameEncode; + if (aWicEncoder->CreateNewFrame (&aWicFrameEncode.ChangePtr(), NULL) != S_OK + || aWicFrameEncode->Initialize (NULL) != S_OK + || aWicFrameEncode->SetSize ((UINT )SizeX(), (UINT )SizeY()) != S_OK + || aWicFrameEncode->SetPixelFormat (&aWicPixelFormatRes) != S_OK) + { + Message::SendFail ("Error: cannot create WIC Frame"); + return false; + } + + if (aFileFormat == GUID_ContainerFormatGif + && (myPalette == NULL + || aWicFrameEncode->SetPalette (myPalette) != S_OK)) + { + Message::SendFail ("Error: cannot set palette"); + return false; + } + + if (aWicPixelFormatRes != aWicPixelFormat) + { + Message::SendFail ("Error: pixel format is unsupported by image format"); + return false; + } + + if (IsTopDown()) + { + if (aWicFrameEncode->WritePixels ((UINT )SizeY(), (UINT )SizeRowBytes(), (UINT )SizeBytes(), (BYTE* )aPixMapData->Data()) != S_OK) + { + Message::SendFail ("Error: cannot write pixels to WIC Frame"); + return false; + } + } + else + { + for (Standard_Size aRow = 0; aRow < SizeY(); ++aRow) + { + if (aWicFrameEncode->WritePixels (1, (UINT )SizeRowBytes(), (UINT )SizeRowBytes(), (BYTE* )aPixMapData->Row (aRow)) != S_OK) + { + Message::SendFail ("Error: cannot write pixels to WIC Frame"); + return false; + } + } + } + if (aWicFrameEncode->Commit() != S_OK + || aWicEncoder->Commit() != S_OK) + { + Message::SendFail ("Error: cannot commit data to WIC Frame"); + return false; + } + if (aWicStream->Commit (STGC_DEFAULT) != S_OK) { - aFileFormat = GUID_ContainerFormatBmp; + //Message::Send ("Error: cannot commit data to WIC File Stream", Message_Fail); + //return false; } - else if (aFileNameLower.EndsWith (".png")) + return true; +#else + if (theBuffer != NULL) { - aFileFormat = GUID_ContainerFormatPng; + Message::SendFail ("Error: no image library available"); + return false; } - else if (aFileNameLower.EndsWith (".jpg") - || aFileNameLower.EndsWith (".jpeg")) + const Standard_Integer aLen = theFileName.Length(); + if ((aLen >= 4) && (theFileName.Value (aLen - 3) == '.') + && strcasecmp( theFileName.ToCString() + aLen - 3, "ppm") == 0 ) { - aFileFormat = GUID_ContainerFormatJpeg; + return savePPM (theFileName); } - else if (aFileNameLower.EndsWith (".tiff") - || aFileNameLower.EndsWith (".tif")) + Message::SendTrace ("Image_PixMap, no image library available! Image saved in PPM format"); + return savePPM (theFileName); +#endif +} + +bool Image_AlienPixMap::Save (std::ostream& theStream, const TCollection_AsciiString& theExtension) +{ +#ifdef HAVE_FREEIMAGE + if (myLibImage == NULL) { - aFileFormat = GUID_ContainerFormatTiff; + return false; } - else if (aFileNameLower.EndsWith (".gif")) + +#ifdef _WIN32 + const TCollection_ExtendedString anExtW (theExtension.ToCString(), Standard_True); + FREE_IMAGE_FORMAT anImageFormat = FreeImage_GetFIFFromFilenameU (anExtW.ToWideString()); +#else + FREE_IMAGE_FORMAT anImageFormat = FreeImage_GetFIFFromFilename (theExtension.ToCString()); +#endif + if (anImageFormat == FIF_UNKNOWN) { - aFileFormat = GUID_ContainerFormatGif; +#ifdef OCCT_DEBUG + std::cerr << "Image_PixMap, image format doesn't supported!\n"; +#endif + return false; } + if (IsTopDown()) + { + FreeImage_FlipVertical (myLibImage); + SetTopDown (false); + } + + FIBITMAP* anImageToDump = getImageToDump (anImageFormat); + + if (anImageToDump == NULL) + { + return false; + } + + bool isSaved = false; + Image_FreeImageStream aStream (theStream); + FreeImageIO anIO = aStream.GetFiIO(); + + isSaved = (FreeImage_SaveToHandle(anImageFormat, anImageToDump, &anIO, &aStream) != FALSE); + + if (anImageToDump != myLibImage) + { + FreeImage_Unload (anImageToDump); + } + return isSaved; +#elif defined(HAVE_WINCODEC) + GUID aFileFormat = getFileFormatFromName (theExtension); if (aFileFormat == getNullGuid()) { Message::SendFail ("Error: unsupported image format"); @@ -1114,26 +1329,35 @@ bool Image_AlienPixMap::Save (const TCollection_AsciiString& theFileName) return false; } - Image_ComPtr aWicFileStream; - Image_ComPtr aWicEncoder; - const TCollection_ExtendedString aFileNameW (theFileName); - if (aWicImgFactory->CreateStream (&aWicFileStream.ChangePtr()) != S_OK - || aWicFileStream->InitializeFromFilename (aFileNameW.ToWideString(), GENERIC_WRITE) != S_OK) + WICPixelFormatGUID aWicPixelFormat = convertToWicFormat (myImgFormat); + if (aWicPixelFormat == getNullGuid()) { - Message::SendFail ("Error: cannot create WIC File Stream"); + Message::SendFail ("Error: unsupported pixel format"); return false; } - if (aWicImgFactory->CreateEncoder (aFileFormat, NULL, &aWicEncoder.ChangePtr()) != S_OK - || aWicEncoder->Initialize (aWicFileStream.get(), WICBitmapEncoderNoCache) != S_OK) + + Image_PixMapData* aPixMapData = &myData; + Image_PixMapData aConvertedData; + if (aFileFormat == GUID_ContainerFormatGif) { - Message::SendFail ("Error: cannot create WIC Encoder"); + aWicPixelFormat = GUID_WICPixelFormat8bppIndexed; + convertData (*this, aWicPixelFormat, *aWicImgFactory, aConvertedData); + aPixMapData = &aConvertedData; + } + + Image_ComPtr aStream; + Image_ComPtr aWicEncoder; + + if (CreateStreamOnHGlobal (NULL, Standard_True, &aStream.ChangePtr()) != S_OK) + { + Message::SendFail ("Error: cannot create Stream on global"); return false; } - const WICPixelFormatGUID aWicPixelFormat = convertToWicFormat (myImgFormat); - if (aWicPixelFormat == getNullGuid()) + if (aWicImgFactory->CreateEncoder (aFileFormat, NULL, &aWicEncoder.ChangePtr()) != S_OK + || aWicEncoder->Initialize (aStream.get(), WICBitmapEncoderNoCache) != S_OK) { - Message::SendFail ("Error: unsupported pixel format"); + Message::SendFail ("Error: cannot create WIC Encoder"); return false; } @@ -1148,6 +1372,14 @@ bool Image_AlienPixMap::Save (const TCollection_AsciiString& theFileName) return false; } + if (aFileFormat == GUID_ContainerFormatGif + && (myPalette == NULL + || aWicFrameEncode->SetPalette (myPalette) != S_OK)) + { + Message::SendFail ("Error: cannot set palette"); + return false; + } + if (aWicPixelFormatRes != aWicPixelFormat) { Message::SendFail ("Error: pixel format is unsupported by image format"); @@ -1156,7 +1388,7 @@ bool Image_AlienPixMap::Save (const TCollection_AsciiString& theFileName) if (IsTopDown()) { - if (aWicFrameEncode->WritePixels ((UINT )SizeY(), (UINT )SizeRowBytes(), (UINT )SizeBytes(), (BYTE* )Data()) != S_OK) + if (aWicFrameEncode->WritePixels ((UINT )SizeY(), (UINT )SizeRowBytes(), (UINT )SizeBytes(), (BYTE* )aPixMapData->Data()) != S_OK) { Message::SendFail ("Error: cannot write pixels to WIC Frame"); return false; @@ -1166,35 +1398,60 @@ bool Image_AlienPixMap::Save (const TCollection_AsciiString& theFileName) { for (Standard_Size aRow = 0; aRow < SizeY(); ++aRow) { - if (aWicFrameEncode->WritePixels (1, (UINT )SizeRowBytes(), (UINT )SizeRowBytes(), (BYTE* )Row (aRow)) != S_OK) + if (aWicFrameEncode->WritePixels (1, (UINT )SizeRowBytes(), (UINT )SizeRowBytes(), (BYTE* )aPixMapData->Row (aRow)) != S_OK) { Message::SendFail ("Error: cannot write pixels to WIC Frame"); return false; } } } - if (aWicFrameEncode->Commit() != S_OK || aWicEncoder->Commit() != S_OK) { Message::SendFail ("Error: cannot commit data to WIC Frame"); return false; } - if (aWicFileStream->Commit (STGC_DEFAULT) != S_OK) + if (aStream->Commit (STGC_DEFAULT) != S_OK) { - //Message::Send ("Error: cannot commit data to WIC File Stream", Message_Fail); + //Message::Send ("Error: cannot commit data to Stream", Message_Fail); //return false; } - return true; -#else - const Standard_Integer aLen = theFileName.Length(); - if ((aLen >= 4) && (theFileName.Value (aLen - 3) == '.') - && strcasecmp( theFileName.ToCString() + aLen - 3, "ppm") == 0 ) + + // WIC doesn't have the way to encode image directly in std::ostream + // so we use a workaround to transfer data from IStream to std::ostream + STATSTG aStat; + if (aStream->Stat (&aStat, STATFLAG_NONAME) != S_OK) { - return savePPM (theFileName); + Message::SendFail ("Error: cannot get stat from stream"); + return false; } - Message::SendTrace ("Image_PixMap, no image library available! Image saved in PPM format"); - return savePPM (theFileName); + HGLOBAL aMem; + if (GetHGlobalFromStream (aStream.get(), &aMem) != S_OK) + { + Message::SendFail ("Error: cannot get global from stream"); + return false; + } + + LPVOID aData = GlobalLock (aMem); + if (aData == NULL) + { + Message::SendFail ("Error: cannot lock global"); + return false; + } + if (!theStream.write ((const char* )aData, aStat.cbSize.QuadPart)) + { + Message::SendFail ("Error: cannot write data to ostream"); + return false; + } + if (GlobalUnlock (aMem) == 0 && GetLastError() != NO_ERROR) + { + Message::SendFail ("Error: cannot unlock global"); + return false; + } + return true; +#else + Message::SendFail ("Error: no image library available"); + return false; #endif } @@ -1211,3 +1468,126 @@ bool Image_AlienPixMap::AdjustGamma (const Standard_Real theGammaCorr) return false; #endif } + +#ifdef HAVE_FREEIMAGE +// ======================================================================= +// function : GetImageToDump +// purpose : +// ======================================================================= +FIBITMAP* Image_AlienPixMap::getImageToDump (const Standard_Integer theFormat) +{ + FIBITMAP* anImageToDump = myLibImage; + // FreeImage doesn't provide flexible format conversion API + // so we should perform multiple conversions in some cases! + switch (theFormat) + { + case FIF_PNG: + case FIF_BMP: + { + if (Format() == Image_Format_BGR32 + || Format() == Image_Format_RGB32) + { + // stupid FreeImage treats reserved byte as alpha if some bytes not set to 0xFF + for (Standard_Size aRow = 0; aRow < SizeY(); ++aRow) + { + for (Standard_Size aCol = 0; aCol < SizeX(); ++aCol) + { + myData.ChangeValue (aRow, aCol)[3] = 0xFF; + } + } + } + else if (FreeImage_GetImageType (myLibImage) != FIT_BITMAP) + { + anImageToDump = FreeImage_ConvertToType (myLibImage, FIT_BITMAP); + } + break; + } + case FIF_GIF: + { + FIBITMAP* aTmpBitmap = myLibImage; + if (FreeImage_GetImageType (myLibImage) != FIT_BITMAP) + { + aTmpBitmap = FreeImage_ConvertToType (myLibImage, FIT_BITMAP); + if (aTmpBitmap == NULL) + { + return NULL; + } + } + + if (FreeImage_GetBPP (aTmpBitmap) != 24) + { + FIBITMAP* aTmpBitmap24 = FreeImage_ConvertTo24Bits (aTmpBitmap); + if (aTmpBitmap != myLibImage) + { + FreeImage_Unload (aTmpBitmap); + } + if (aTmpBitmap24 == NULL) + { + return NULL; + } + aTmpBitmap = aTmpBitmap24; + } + + // need conversion to image with palette (requires 24bit bitmap) + anImageToDump = FreeImage_ColorQuantize (aTmpBitmap, FIQ_NNQUANT); + if (aTmpBitmap != myLibImage) + { + FreeImage_Unload (aTmpBitmap); + } + break; + } + case FIF_HDR: + case FIF_EXR: + { + if (Format() == Image_Format_Gray + || Format() == Image_Format_Alpha) + { + anImageToDump = FreeImage_ConvertToType (myLibImage, FIT_FLOAT); + } + else if (Format() == Image_Format_RGBA + || Format() == Image_Format_BGRA) + { + anImageToDump = FreeImage_ConvertToType (myLibImage, FIT_RGBAF); + } + else + { + FREE_IMAGE_TYPE aImgTypeFI = FreeImage_GetImageType (myLibImage); + if (aImgTypeFI != FIT_RGBF + && aImgTypeFI != FIT_RGBAF + && aImgTypeFI != FIT_FLOAT) + { + anImageToDump = FreeImage_ConvertToType (myLibImage, FIT_RGBF); + } + } + break; + } + default: + { + if (FreeImage_GetImageType (myLibImage) != FIT_BITMAP) + { + anImageToDump = FreeImage_ConvertToType (myLibImage, FIT_BITMAP); + if (anImageToDump == NULL) + { + return NULL; + } + } + + if (FreeImage_GetBPP (anImageToDump) != 24) + { + FIBITMAP* aTmpBitmap24 = FreeImage_ConvertTo24Bits (anImageToDump); + if (anImageToDump != myLibImage) + { + FreeImage_Unload (anImageToDump); + } + if (aTmpBitmap24 == NULL) + { + return NULL; + } + anImageToDump = aTmpBitmap24; + } + break; + } + } + return anImageToDump; +} +#endif diff --git a/src/Image/Image_AlienPixMap.hxx b/src/Image/Image_AlienPixMap.hxx index 9c61d08ef7..dc986796f6 100644 --- a/src/Image/Image_AlienPixMap.hxx +++ b/src/Image/Image_AlienPixMap.hxx @@ -19,6 +19,7 @@ #include class TCollection_AsciiString; +struct IWICPalette; struct FIBITMAP; //! Image class that support file reading/writing operations using auxiliary image library. @@ -57,21 +58,41 @@ public: const TCollection_AsciiString& theFileName); //! Read image data from memory buffer. - //! @param theData memory pointer to read from; - //! when NULL, function will attempt to open theFileName file - //! @param theLength memory buffer length - //! @param theFileName optional file name + //! @param[in] theData memory pointer to read from; + //! when NULL, function will attempt to open theFileName file + //! @param[in] theLength memory buffer length + //! @param[in] theFileName optional file name Standard_EXPORT bool Load (const Standard_Byte* theData, - Standard_Size theLength, + const Standard_Size theLength, const TCollection_AsciiString& theFileName); - //! Write image data to file using file extension to determine compression format. - Standard_EXPORT bool Save (const TCollection_AsciiString& theFileName); + //! Write image data to file. + //! @param[in] theFileName file name to save + bool Save (const TCollection_AsciiString& theFileName) + { + return Save (NULL, 0, theFileName); + } + + //! Write image data to stream. + //! @param[out] theStream stream where to write + //! @param[in] theExtension image format + Standard_EXPORT bool Save (std::ostream& theStream, + const TCollection_AsciiString& theExtension); + + //! Write image data to file or memory buffer using file extension to determine format. + //! @param[out] theBuffer buffer pointer where to write + //! when NULL, function write image data to theFileName file + //! @param[in] theLength memory buffer length + //! @param[in] theFileName file name to save; + //! when theBuffer isn't NULL used only to determine format + Standard_EXPORT bool Save (Standard_Byte* theBuffer, + const Standard_Size theLength, + const TCollection_AsciiString& theFileName); //! Initialize image plane with required dimensions. - //! thePixelFormat - if specified pixel format doesn't supported by image library - //! than nearest supported will be used instead! - //! theSizeRowBytes - may be ignored by this class and required alignment will be used instead! + //! @param[in] thePixelFormat if specified pixel format doesn't supported by image library + //! than nearest supported will be used instead! + //! @param[in] theSizeRowBytes may be ignored by this class and required alignment will be used instead! Standard_EXPORT virtual bool InitTrash (Image_Format thePixelFormat, const Standard_Size theSizeX, const Standard_Size theSizeY, @@ -84,12 +105,13 @@ public: Standard_EXPORT virtual void Clear() Standard_OVERRIDE; //! Performs gamma correction on image. - //! theGamma - gamma value to use; a value of 1.0 leaves the image alone + //! @param[in] theGamma - gamma value to use; a value of 1.0 leaves the image alone Standard_EXPORT bool AdjustGamma (const Standard_Real theGammaCorr); -private: - - FIBITMAP* myLibImage; +#if !defined(HAVE_FREEIMAGE) && defined(_WIN32) + //! Returns image palette. + IWICPalette* GetPalette() const { return myPalette; } +#endif private: @@ -108,6 +130,13 @@ private: //! Built-in PPM export Standard_EXPORT bool savePPM (const TCollection_AsciiString& theFileName) const; + FIBITMAP* getImageToDump (const Standard_Integer theFormat); + +private: + + FIBITMAP* myLibImage; + IWICPalette* myPalette; + }; DEFINE_STANDARD_HANDLE(Image_AlienPixMap, Image_PixMap) diff --git a/src/QABugs/QABugs_1.cxx b/src/QABugs/QABugs_1.cxx index de3d1d74f8..a7a78896ee 100644 --- a/src/QABugs/QABugs_1.cxx +++ b/src/QABugs/QABugs_1.cxx @@ -387,11 +387,11 @@ static Standard_Integer OCC361bug (Draw_Interpretor& di, Standard_Integer nb, co //function : OCC30182 //purpose : Testing different interfaces of Image_AlienPixMap::Load() //======================================================================= -static Standard_Integer OCC30182 (Draw_Interpretor& , Standard_Integer theNbArgs, const char** theArgVec) +static Standard_Integer OCC30182 (Draw_Interpretor& di, Standard_Integer theNbArgs, const char** theArgVec) { if (ViewerTest::CurrentView().IsNull()) { - std::cout << "Error: no active view\n"; + di << "Error: no active view\n"; return 1; } @@ -430,13 +430,13 @@ static Standard_Integer OCC30182 (Draw_Interpretor& , Standard_Integer theNbArgs } else { - std::cout << "Syntax error at '" << anArg << "'\n"; + di << "Syntax error at '" << anArg << "'\n"; return 1; } } if (anImgPath.IsEmpty()) { - std::cout << "Syntax error: wrong number of arguments\n"; + di << "Syntax error: wrong number of arguments\n"; return 1; } @@ -454,7 +454,7 @@ static Standard_Integer OCC30182 (Draw_Interpretor& , Standard_Integer theNbArgs std::shared_ptr aFile = aFileSystem->OpenIStream (anImgPath, std::ios::in | std::ios::binary); if (aFile.get() == NULL) { - std::cout << "Syntax error: image file '" << anImgPath << "' cannot be found\n"; + di << "Syntax error: image file '" << anImgPath << "' cannot be found\n"; return 1; } if (anOffset != 0) @@ -469,13 +469,13 @@ static Standard_Integer OCC30182 (Draw_Interpretor& , Standard_Integer theNbArgs aFile->seekg (anOffset); if (aLen <= 0) { - std::cout << "Syntax error: wrong offset\n"; + di << "Syntax error: wrong offset\n"; return 1; } NCollection_Array1 aBuff (1, aLen); if (!aFile->read ((char* )&aBuff.ChangeFirst(), aBuff.Size())) { - std::cout << "Error: unable to read file\n"; + di << "Error: unable to read file\n"; return 1; } if (!anImage->Load (&aBuff.ChangeFirst(), aBuff.Size(), anImgPath)) @@ -510,6 +510,107 @@ static Standard_Integer OCC30182 (Draw_Interpretor& , Standard_Integer theNbArgs return 0; } +//======================================================================= +//function : OCC31956 +//purpose : Testing Image_AlienPixMap::Save() overload for saving into a memory buffer or stream +//======================================================================= +static Standard_Integer OCC31956 (Draw_Interpretor& di, Standard_Integer theNbArgs, const char** theArgVec) +{ + if (ViewerTest::CurrentView().IsNull()) + { + di << "Error: no active view\n"; + return 1; + } + if (theNbArgs != 3 && theNbArgs != 5) + { + di << "Syntax error: wrong number of arguments\n"; + return 1; + } + + bool useStream = false; + TCollection_AsciiString aTempImgPath; + if (theNbArgs == 5) + { + TCollection_AsciiString anArg (theArgVec[3]); + anArg.LowerCase(); + if (anArg == "-stream") + { + useStream = true; + aTempImgPath = theArgVec[4]; + } + else + { + di << "Syntax error at '" << anArg << "'\n"; + return 1; + } + } + + TCollection_AsciiString aPrsName, anImgPath; + aPrsName = theArgVec[1]; + anImgPath = theArgVec[2]; + Handle(Image_AlienPixMap) anImage = new Image_AlienPixMap(); + const Handle(OSD_FileSystem)& aFileSystem = OSD_FileSystem::DefaultFileSystem(); + opencascade::std::shared_ptr aFile = aFileSystem->OpenIStream (anImgPath, std::ios::in | std::ios::binary); + if (aFile.get() == NULL) + { + di << "Syntax error: image file '" << anImgPath << "' cannot be found\n"; + return 1; + } + + aFile->seekg (0, std::ios::end); + Standard_Integer aLen = (Standard_Integer )aFile->tellg(); + aFile->seekg (0); + if (!anImage->Load (*aFile, anImgPath)) + { + return 0; + } + + Handle(Image_AlienPixMap) aControlImg = new Image_AlienPixMap(); + if (useStream) + { + opencascade::std::shared_ptr aTempFile = aFileSystem->OpenOStream (aTempImgPath, std::ios::out | std::ios::binary); + if (aTempFile.get() == NULL) + { + di << "Error: image file '" << aTempImgPath << "' cannot be open\n"; + return 0; + } + if (!anImage->Save (*aTempFile, aTempImgPath)) + { + di << "Error: failed saving file using stream '" << aTempImgPath << "'\n"; + return 0; + } + aTempFile.reset(); + aControlImg->Load (aTempImgPath); + } + else + { + NCollection_Array1 aBuff (1, aLen + 2048); + if (!anImage->Save (&aBuff.ChangeFirst(), aBuff.Size(), anImgPath)) + { + di << "Error: failed saving file using buffer'" << anImgPath << "'\n"; + return 0; + } + aControlImg->Load (&aBuff.ChangeFirst(), aBuff.Size(), anImgPath); + } + + TopoDS_Shape aShape = BRepPrimAPI_MakeBox (100.0 * aControlImg->Ratio(), 100.0, 1.0).Shape(); + Handle(AIS_Shape) aPrs = new AIS_Shape (aShape); + aPrs->SetDisplayMode (AIS_Shaded); + aPrs->Attributes()->SetupOwnShadingAspect(); + const Handle(Graphic3d_AspectFillArea3d)& anAspect = aPrs->Attributes()->ShadingAspect()->Aspect(); + anAspect->SetShadingModel (Graphic3d_TOSM_UNLIT); + anAspect->SetTextureMapOn (true); + anAspect->SetTextureMap (new Graphic3d_Texture2D(aControlImg)); + if (aControlImg->IsTopDown()) + { + anAspect->TextureMap()->GetParams()->SetTranslation (Graphic3d_Vec2 (0.0f, -1.0f)); + anAspect->TextureMap()->GetParams()->SetScale (Graphic3d_Vec2 (1.0f, -1.0f)); + } + + ViewerTest::Display (aPrsName, aPrs, true, true); + return 0; +} + void QABugs::Commands_1(Draw_Interpretor& theCommands) { const char *group = "QABugs"; @@ -527,5 +628,7 @@ void QABugs::Commands_1(Draw_Interpretor& theCommands) { theCommands.Add ("OCC30182", "OCC30182 name image [-offset Start] [-fileName] [-stream] [-memory]\n" "Decodes image either by passing file name, file stream or memory stream", __FILE__, OCC30182, group); + theCommands.Add ("OCC31956", "OCC31956 name image [-stream tempImage]\n" + "Loads image and saves it into memory buffer or stream then loads it back", __FILE__, OCC31956, group); return; } diff --git a/tests/v3d/bugs/bug31956 b/tests/v3d/bugs/bug31956 new file mode 100644 index 0000000000..1d5eb1af83 --- /dev/null +++ b/tests/v3d/bugs/bug31956 @@ -0,0 +1,41 @@ +puts "============" +puts "0031956: Visualization - provide Image_AlienPixMap::Save() writing into a memory buffer instead of a file" +puts "============" +puts "" + +set anImg1 [locate_data_file chataignier.gif] +set anImg2 [locate_data_file hatch_1.png] + +pload VISUALIZATION QAcommands +vclear +vinit View1 +vtop + +OCC30182 t $anImg1 -fileName; vfit +vdump $imagedir/${casename}_1.png + +OCC30182 t $anImg2 -fileName; vfit +vdump $imagedir/${casename}_2.png + +vclear + +OCC31956 t $anImg1; vfit +vdump $imagedir/${casename}_test_1.png + +OCC31956 t $anImg2; vfit +vdump $imagedir/${casename}_test_2.png + +vclear + +OCC31956 t $anImg1 -stream $imagedir/${casename}_temp_1.gif; vfit +vdump $imagedir/${casename}_test_1s.png + +OCC31956 t $anImg2 -stream $imagedir/${casename}_temp_2.png; vfit +vdump $imagedir/${casename}_test_2s.png + +if { [diffimage $imagedir/${casename}_test_1.png $imagedir/${casename}_1.png -toleranceOfColor 0.1] != 0 } { puts "Error difference in 1st image" } +if { [diffimage $imagedir/${casename}_test_2.png $imagedir/${casename}_2.png -toleranceOfColor 0.1] != 0 } { puts "Error difference in 2nd image" } + +if { [diffimage $imagedir/${casename}_test_1s.png $imagedir/${casename}_1.png -toleranceOfColor 0.1] != 0 } { puts "Error difference in 1st image (using stream)" } +if { [diffimage $imagedir/${casename}_test_2s.png $imagedir/${casename}_2.png -toleranceOfColor 0.1] != 0 } { puts "Error difference in 2nd image (using stream)" } + From afccc8d0199cddbaaa917324e9391e712e1e59cf Mon Sep 17 00:00:00 2001 From: dkulikov Date: Thu, 22 Jun 2023 16:54:21 +0100 Subject: [PATCH 488/639] 0033414: Modeling Algorithms - Access violation during executing BRepAlgoAPI_Section::Build() Crush occurred due to the fields IntTools_SurfaceRangeLocalizeData::myUParams, IntTools_SurfaceRangeLocalizeData::myVParams and IntTools_SurfaceRangeLocalizeData::myGridPoints not being checked for NULL in some cases. Missing checks are added. --- src/IntTools/IntTools_SurfaceRangeLocalizeData.cxx | 6 +++--- tests/bugs/modalg_8/bug33414 | 10 ++++++++++ 2 files changed, 13 insertions(+), 3 deletions(-) create mode 100644 tests/bugs/modalg_8/bug33414 diff --git a/src/IntTools/IntTools_SurfaceRangeLocalizeData.cxx b/src/IntTools/IntTools_SurfaceRangeLocalizeData.cxx index 4e13d4ad4c..23c0a05e4a 100644 --- a/src/IntTools/IntTools_SurfaceRangeLocalizeData.cxx +++ b/src/IntTools/IntTools_SurfaceRangeLocalizeData.cxx @@ -224,7 +224,7 @@ const gp_Pnt &IntTools_SurfaceRangeLocalizeData::GetPointInFrame Standard_Integer aFrmUInd = theUIndex + myUIndMin - 1; Standard_Integer aFrmVInd = theVIndex + myVIndMin - 1; - if (aFrmUInd > myUIndMax || aFrmVInd > myVIndMax) + if (myGridPoints.IsNull() || aFrmUInd > myUIndMax || aFrmVInd > myVIndMax) return gp::Origin(); return myGridPoints->Value(aFrmUInd, aFrmVInd); @@ -235,7 +235,7 @@ Standard_Real IntTools_SurfaceRangeLocalizeData::GetUParamInFrame { Standard_Integer aFrmInd = theIndex + myUIndMin - 1; - if (aFrmInd > myUIndMax) + if (myUParams.IsNull() || aFrmInd > myUIndMax) return Precision::Infinite(); return myUParams->Value(aFrmInd); @@ -246,7 +246,7 @@ Standard_Real IntTools_SurfaceRangeLocalizeData::GetVParamInFrame { Standard_Integer aFrmInd = theIndex + myVIndMin - 1; - if (aFrmInd > myVIndMax) + if (myVParams.IsNull() || aFrmInd > myVIndMax) return Precision::Infinite(); return myVParams->Value(aFrmInd); diff --git a/tests/bugs/modalg_8/bug33414 b/tests/bugs/modalg_8/bug33414 new file mode 100644 index 0000000000..89db2191fd --- /dev/null +++ b/tests/bugs/modalg_8/bug33414 @@ -0,0 +1,10 @@ +puts "========================" +puts "0033414: Modeling Algorithms - Access violation during executing BRepAlgoAPI_Section::Build()" +puts "========================" + +set filepath1 [locate_data_file "CR33414_1.brep"] +set filepath2 [locate_data_file "CR33414_2.brep"] +restore ${filepath1} shape1 +restore ${filepath2} shape2 +bsection res shape1 shape2 +# If bsection didn't cause a crash - everything is OK. \ No newline at end of file From a958a3377e5c68608555dc6b356a6f68c95c7cab Mon Sep 17 00:00:00 2001 From: btokarev Date: Mon, 19 Jun 2023 15:41:36 +0100 Subject: [PATCH 489/639] 33343: Documentation, Overview - Incorrect doxygen syntax Removed inclusions of empathized *text* from the titles Text empathizers re-implemented Reverted to no empathize style --- dox/contribution/coding_rules.md | 8 ++++---- dox/user_guides/draw_test_harness/draw_test_harness.md | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/dox/contribution/coding_rules.md b/dox/contribution/coding_rules.md index c8f9a37ea9..70e151f020 100644 --- a/dox/contribution/coding_rules.md +++ b/dox/contribution/coding_rules.md @@ -725,7 +725,7 @@ Another possible problem is the order of initialization of global variables defi Avoid explicit usage of basic types (*int*, *float*, *double*, etc.), use Open CASCADE Technology types from package *Standard: Standard_Integer, Standard_Real, Standard_ShortReal, Standard_Boolean, Standard_CString* and others or a specific *typedef* instead. -### Use *sizeof()* to calculate sizes [MANDATORY] +### Use sizeof() to calculate sizes [MANDATORY] Do not assume sizes of types. Use *sizeof()* instead to calculate sizes. @@ -738,7 +738,7 @@ It is recommended to follow this rule for any plain text files for consistency a The rules listed in this chapter are important for stability of the programs that use Open CASCADE Technology libraries. -### Use *OSD::SetSignal()* to catch exceptions +### Use OSD::SetSignal() to catch exceptions When using Open CASCADE Technology in an application, call *OSD::SetSignal()* function when the application is initialized. @@ -787,7 +787,7 @@ See the following example: In C++ use *new* and *delete* operators instead of *malloc()* and *free()*. Try not to mix different memory allocation techniques. -### Match *new* and *delete* [MANDATORY] +### Match new and delete [MANDATORY] Use the same form of new and delete. @@ -812,7 +812,7 @@ Standard_Integer aTmpVar2 = 0; // OK Uninitialized variables might be kept only within performance-sensitive code blocks and only when their initialization is guaranteed by subsequent code. -### Do not hide global *new* +### Do not hide global new Avoid hiding the global *new* operator. diff --git a/dox/user_guides/draw_test_harness/draw_test_harness.md b/dox/user_guides/draw_test_harness/draw_test_harness.md index c25975a4db..faf18d81f4 100644 --- a/dox/user_guides/draw_test_harness/draw_test_harness.md +++ b/dox/user_guides/draw_test_harness/draw_test_harness.md @@ -780,7 +780,7 @@ restore theBox @subsubsection occt_draw_3_3_1 set -#### In *DrawTrSurf* package: +#### In DrawTrSurf package: ~~~~{.php} void Set(Standard_CString& Name,const gp_Pnt& G) ; @@ -797,7 +797,7 @@ void Set(Standard_CString& Name, const Handle(Poly_Polygon2D)& P) ; ~~~~ -#### In *DBRep* package: +#### In DBRep package: ~~~~{.php} void Set(const Standard_CString Name, @@ -822,13 +822,13 @@ DBRep::Set(char*,B); @subsubsection occt_draw_3_3_2 get -#### In *DrawTrSurf* package: +#### In DrawTrSurf package: ~~~~{.php} Handle_Geom_Geometry Get(Standard_CString& Name) ; ~~~~ -#### In *DBRep* package: +#### In DBRep package: ~~~~{.php} TopoDS_Shape Get(Standard_CString& Name, From 1dad5844500f8c6999fe9a336e691ba7bdcc769f Mon Sep 17 00:00:00 2001 From: dkulikov Date: Tue, 4 Jul 2023 10:29:13 +0100 Subject: [PATCH 490/639] 0033419: Tests - Updating test case data Filenames in bug33414 are updated. --- tests/bugs/modalg_8/bug33414 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/bugs/modalg_8/bug33414 b/tests/bugs/modalg_8/bug33414 index 89db2191fd..cc5792195d 100644 --- a/tests/bugs/modalg_8/bug33414 +++ b/tests/bugs/modalg_8/bug33414 @@ -2,8 +2,8 @@ puts "========================" puts "0033414: Modeling Algorithms - Access violation during executing BRepAlgoAPI_Section::Build()" puts "========================" -set filepath1 [locate_data_file "CR33414_1.brep"] -set filepath2 [locate_data_file "CR33414_2.brep"] +set filepath1 [locate_data_file "bug33414_1.brep"] +set filepath2 [locate_data_file "bug33414_2.brep"] restore ${filepath1} shape1 restore ${filepath2} shape2 bsection res shape1 shape2 From 342132316488a6e7cf28fc1980b86e2a2cf9f970 Mon Sep 17 00:00:00 2001 From: sshutina Date: Mon, 17 Jul 2023 23:14:55 +0100 Subject: [PATCH 491/639] 0032879: Visualization, AIS_ViewController - define separate gesture mappings for dragging Fixed problem of usage of objects dragging during zoom and pan Added new draw command to change gesture for muse buttons Added test --- src/AIS/AIS_ViewController.cxx | 19 +++-- src/ViewerTest/ViewerTest_ViewerCommands.cxx | 75 ++++++++++++++++++++ tests/v3d/manipulator/drag_pan_zoom | 43 +++++++++++ 3 files changed, 132 insertions(+), 5 deletions(-) create mode 100644 tests/v3d/manipulator/drag_pan_zoom diff --git a/src/AIS/AIS_ViewController.cxx b/src/AIS/AIS_ViewController.cxx index 12ad1ef617..a19519456d 100644 --- a/src/AIS/AIS_ViewController.cxx +++ b/src/AIS/AIS_ViewController.cxx @@ -1047,11 +1047,13 @@ bool AIS_ViewController::UpdateMousePosition (const Graphic3d_Vec2i& thePoint, : 0.0; if (double (Abs (aDelta.x())) > aZoomTol) { - if (UpdateZoom (Aspect_ScrollDelta (aDelta.x()))) - { - toUpdateView = true; - } + UpdateZoom (Aspect_ScrollDelta (aDelta.x())); + + myUI.Dragging.ToMove = true; + myUI.Dragging.PointTo = thePoint; + myMouseProgressPoint = thePoint; + toUpdateView = true; } break; } @@ -1075,7 +1077,6 @@ bool AIS_ViewController::UpdateMousePosition (const Graphic3d_Vec2i& thePoint, } aDelta.y() = -aDelta.y(); - myMouseProgressPoint = thePoint; if (myUI.Panning.ToPan) { myUI.Panning.Delta += aDelta; @@ -1085,6 +1086,12 @@ bool AIS_ViewController::UpdateMousePosition (const Graphic3d_Vec2i& thePoint, myUI.Panning.ToPan = true; myUI.Panning.Delta = aDelta; } + + myUI.Dragging.ToMove = true; + myUI.Dragging.PointTo = thePoint; + + myMouseProgressPoint = thePoint; + toUpdateView = true; } break; @@ -3053,6 +3060,8 @@ void AIS_ViewController::handleDynamicHighlight (const Handle(AIS_InteractiveCon OnObjectDragged (theCtx, theView, AIS_DragAction_Update); myGL.OrbitRotation.ToRotate = false; myGL.ViewRotation .ToRotate = false; + myGL.Panning .ToPan = false; + myGL.ZoomActions.Clear(); } } } diff --git a/src/ViewerTest/ViewerTest_ViewerCommands.cxx b/src/ViewerTest/ViewerTest_ViewerCommands.cxx index 79f59ac43f..83a3fbabc7 100644 --- a/src/ViewerTest/ViewerTest_ViewerCommands.cxx +++ b/src/ViewerTest/ViewerTest_ViewerCommands.cxx @@ -13910,6 +13910,73 @@ static int VSelBvhBuild (Draw_Interpretor& /*theDI*/, Standard_Integer theNbArgs return 0; } +//======================================================================= +//function : VChangeMouseGesture +//purpose : +//======================================================================= +static int VChangeMouseGesture (Draw_Interpretor&, + Standard_Integer theArgsNb, + const char** theArgVec) +{ + Handle(V3d_View) aView = ViewerTest::CurrentView(); + if (aView.IsNull()) + { + Message::SendFail ("Error: no active viewer"); + return 1; + } + + NCollection_DoubleMap aGestureMap; + { + aGestureMap.Bind ("none", AIS_MouseGesture_NONE); + aGestureMap.Bind ("selectrectangle", AIS_MouseGesture_SelectRectangle); + aGestureMap.Bind ("selectlasso", AIS_MouseGesture_SelectLasso); + aGestureMap.Bind ("zoom", AIS_MouseGesture_Zoom); + aGestureMap.Bind ("zoomwindow", AIS_MouseGesture_ZoomWindow); + aGestureMap.Bind ("pan", AIS_MouseGesture_Pan); + aGestureMap.Bind ("rotateorbit", AIS_MouseGesture_RotateOrbit); + aGestureMap.Bind ("rotateview", AIS_MouseGesture_RotateView); + aGestureMap.Bind ("drag", AIS_MouseGesture_Drag); + } + NCollection_DoubleMap aMouseButtonMap; + { + aMouseButtonMap.Bind ("none", (Standard_UInteger )Aspect_VKeyMouse_NONE); + aMouseButtonMap.Bind ("left", (Standard_UInteger )Aspect_VKeyMouse_LeftButton); + aMouseButtonMap.Bind ("middle", (Standard_UInteger )Aspect_VKeyMouse_MiddleButton); + aMouseButtonMap.Bind ("right", (Standard_UInteger )Aspect_VKeyMouse_RightButton); + } + + Standard_UInteger aButton = (Standard_UInteger )Aspect_VKeyMouse_LeftButton; + AIS_MouseGesture aGesture = AIS_MouseGesture_RotateOrbit; + for (Standard_Integer anArgIter = 1; anArgIter < theArgsNb; ++anArgIter) + { + Standard_CString anArg = theArgVec[anArgIter]; + TCollection_AsciiString anArgCase (anArg); + anArgCase.LowerCase(); + if (anArgCase == "-button") + { + TCollection_AsciiString aButtonStr = theArgVec[++anArgIter]; + aButtonStr.LowerCase(); + aButton = aMouseButtonMap.Find1 (aButtonStr); + } + else if (anArgCase == "-gesture") + { + TCollection_AsciiString aGestureStr = theArgVec[++anArgIter]; + aGestureStr.LowerCase(); + aGesture = aGestureMap.Find1 (aGestureStr); + } + else + { + Message::SendFail() << "Error: unknown argument '" << anArg << "'"; + return 1; + } + } + + Handle(ViewerTest_EventManager) aViewMgr = ViewerTest::CurrentEventManager(); + aViewMgr->ChangeMouseGestureMap().Bind (aButton, aGesture); + + return 0; +} + //======================================================================= //function : ViewerTest_ExitProc //purpose : @@ -14927,4 +14994,12 @@ Turns on/off prebuilding of BVH within background thread(s). -nbThreads number of threads, 1 by default; if < 1 then used (NbLogicalProcessors - 1); -wait waits for building all of BVH. )" /* [vselbvhbuild] */); + + addCmd ("vchangemousegesture", VChangeMouseGesture, /* [vchangemousegesture] */ R"( +vchangemousegesture -button {none|left|middle|right}=left + -gesture {none|selectRectangle|selectLasso|zoom|zoomWindow|pan|rotateOrbit|rotateView|drag}=rotateOrbit +Changes the gesture for the mouse button. + -button the mouse button; + -gesture the new gesture for the button. +)" /* [vchangemousegesture] */); } diff --git a/tests/v3d/manipulator/drag_pan_zoom b/tests/v3d/manipulator/drag_pan_zoom new file mode 100644 index 0000000000..36caca9b74 --- /dev/null +++ b/tests/v3d/manipulator/drag_pan_zoom @@ -0,0 +1,43 @@ +puts "==============================================" +puts "0032879: Visualization - Separate pan/zoom and move the object behavior in AIS_ViewController" +puts "==============================================" +puts "" + +pload MODELING VISUALIZATION + +vinit View1 +pcylinder c1 5 10 +vdisplay c1 +vsetdispmode 1 +vmanipulator m -attach c1 -adjustPosition 1 -adjustSize 0 -enableModes 1 -size 40 +vfit + +# note: mouse events cannot be emulated here, so the original bug cannot be reproduced by this test case + +# pan for the left mouse button +vchangemousegesture -button left -gesture pan + +set mouse_pick {204 194} +set mouse_drag {369 35} + +vmoveto {*}$mouse_pick +vselect {*}$mouse_pick +vmanipulator m -startTransform {*}$mouse_pick +vmanipulator m -transform {*}$mouse_drag +vmanipulator m -stopTransform +vselect 0 0 +vdump $imagedir/${casename}_pan.png + +# zoom for the left mouse button +vchangemousegesture -button left -gesture zoom + +set mouse_pick {206 32} +set mouse_drag {365 330} + +vmoveto {*}$mouse_pick +vselect {*}$mouse_pick +vmanipulator m -startTransform {*}$mouse_pick +vmanipulator m -transform {*}$mouse_drag +vmanipulator m -stopTransform +vselect 0 0 +vdump $imagedir/${casename}_zoom.png From 2a0420be1dd0f61e90275ce239881facee517418 Mon Sep 17 00:00:00 2001 From: ichesnok Date: Thu, 23 Mar 2023 09:54:10 +0000 Subject: [PATCH 492/639] 0032681: Data Exchange - Missed dimension after STEP export Changed level of detalisation (TopAbs_EDGE -> TopAbs_VERTEX by default) --- src/IGESControl/IGESControl_ActorWrite.cxx | 2 +- src/IGESControl/IGESControl_Writer.cxx | 2 +- src/IGESToBRep/IGESToBRep_Actor.cxx | 2 +- src/IGESToBRep/IGESToBRep_Reader.cxx | 2 +- src/XSAlgo/XSAlgo_AlgoContainer.cxx | 10 ++++---- src/XSAlgo/XSAlgo_AlgoContainer.hxx | 11 +++++---- tests/bugs/step/bug32681 | 27 ++++++++++++++++++++++ 7 files changed, 44 insertions(+), 12 deletions(-) create mode 100644 tests/bugs/step/bug32681 diff --git a/src/IGESControl/IGESControl_ActorWrite.cxx b/src/IGESControl/IGESControl_ActorWrite.cxx index 98a187746a..de6ca78fcb 100644 --- a/src/IGESControl/IGESControl_ActorWrite.cxx +++ b/src/IGESControl/IGESControl_ActorWrite.cxx @@ -73,7 +73,7 @@ Handle(Transfer_Binder) IGESControl_ActorWrite::Transfer shape = XSAlgo::AlgoContainer()->ProcessShape( shape, Tol, maxTol, "write.iges.resource.name", "write.iges.sequence", info, - theProgress ); + theProgress, false, TopAbs_EDGE); // modified by NIZHNY-EAP Tue Aug 29 11:17:01 2000 ___END___ BRepToIGES_BREntity BR0; BR0.SetModel(modl); BR0.SetTransferProcess(FP); diff --git a/src/IGESControl/IGESControl_Writer.cxx b/src/IGESControl/IGESControl_Writer.cxx index b22ec97e11..f1608adede 100644 --- a/src/IGESControl/IGESControl_Writer.cxx +++ b/src/IGESControl/IGESControl_Writer.cxx @@ -92,7 +92,7 @@ Standard_Boolean IGESControl_Writer::AddShape (const TopoDS_Shape& theShape, TopoDS_Shape Shape = XSAlgo::AlgoContainer()->ProcessShape( theShape, Tol, maxTol, "write.iges.resource.name", "write.iges.sequence", info, - aPS.Next()); + aPS.Next(), false, TopAbs_EDGE); if (!aPS.More()) return Standard_False; diff --git a/src/IGESToBRep/IGESToBRep_Actor.cxx b/src/IGESToBRep/IGESToBRep_Actor.cxx index 0304ddec5b..12638809c5 100644 --- a/src/IGESToBRep/IGESToBRep_Actor.cxx +++ b/src/IGESToBRep/IGESToBRep_Actor.cxx @@ -198,7 +198,7 @@ Handle(Transfer_Binder) IGESToBRep_Actor::Transfer "read.iges.resource.name", "read.iges.sequence", info, mymodel->ReShape(), - aPS.Next()); + aPS.Next(), false, TopAbs_EDGE); XSAlgo::AlgoContainer()->MergeTransferInfo(TP, info, nbTPitems); } diff --git a/src/IGESToBRep/IGESToBRep_Reader.cxx b/src/IGESToBRep/IGESToBRep_Reader.cxx index e1f2a409db..0230ca403f 100644 --- a/src/IGESToBRep/IGESToBRep_Reader.cxx +++ b/src/IGESToBRep/IGESToBRep_Reader.cxx @@ -552,7 +552,7 @@ Standard_Boolean IGESToBRep_Reader::Transfer(const Standard_Integer num, shape = XSAlgo::AlgoContainer()->ProcessShape( shape, eps*CAS.GetUnitFactor(), CAS.GetMaxTol(), "read.iges.resource.name", "read.iges.sequence", info, - aPS.Next() ); + aPS.Next(), false, TopAbs_EDGE); if (aPS.UserBreak()) return Standard_False; diff --git a/src/XSAlgo/XSAlgo_AlgoContainer.cxx b/src/XSAlgo/XSAlgo_AlgoContainer.cxx index 332a392be5..9f639cbd68 100644 --- a/src/XSAlgo/XSAlgo_AlgoContainer.cxx +++ b/src/XSAlgo/XSAlgo_AlgoContainer.cxx @@ -92,7 +92,8 @@ TopoDS_Shape XSAlgo_AlgoContainer::ProcessShape(const TopoDS_Shape& theShape, Handle(Standard_Transient)& theInfo, const Handle(ShapeBuild_ReShape)& theReShape, const Message_ProgressRange& theProgress, - const Standard_Boolean theNonManifold) const + const Standard_Boolean theNonManifold, + const TopAbs_ShapeEnum theDetalisationLevel) const { if (theShape.IsNull()) { @@ -114,7 +115,7 @@ TopoDS_Shape XSAlgo_AlgoContainer::ProcessShape(const TopoDS_Shape& theShape, aRscfile = thePrscfile; aContext = new ShapeProcess_ShapeContext(theShape, aRscfile); } - aContext->SetDetalisation(TopAbs_EDGE); + aContext->SetDetalisation(theDetalisationLevel); } aContext->SetNonManifold(theNonManifold); theInfo = aContext; @@ -199,12 +200,13 @@ TopoDS_Shape XSAlgo_AlgoContainer::ProcessShape(const TopoDS_Shape& theShape, const Standard_CString thePseq, Handle(Standard_Transient)& theInfo, const Message_ProgressRange& theProgress, - const Standard_Boolean theNonManifold) const + const Standard_Boolean theNonManifold, + const TopAbs_ShapeEnum theDetalisationLevel) const { Handle(ShapeBuild_ReShape) aReShape = new ShapeBuild_ReShape(); return ProcessShape(theShape, thePrec, theMaxTol, thePrscfile, thePseq, theInfo, aReShape, theProgress, - theNonManifold); + theNonManifold, theDetalisationLevel); } //======================================================================= diff --git a/src/XSAlgo/XSAlgo_AlgoContainer.hxx b/src/XSAlgo/XSAlgo_AlgoContainer.hxx index 122051e42b..c4f33071c0 100644 --- a/src/XSAlgo/XSAlgo_AlgoContainer.hxx +++ b/src/XSAlgo/XSAlgo_AlgoContainer.hxx @@ -19,9 +19,10 @@ #include #include -#include -#include #include +#include +#include +#include class ShapeBuild_ReShape; class XSAlgo_ToolContainer; @@ -71,7 +72,8 @@ public: const Standard_CString thePseq, Handle(Standard_Transient)& theInfo, const Message_ProgressRange& theProgress = Message_ProgressRange(), - const Standard_Boolean theNonManifold = Standard_False) const; + const Standard_Boolean theNonManifold = Standard_False, + const TopAbs_ShapeEnum theDetalisationLevel = TopAbs_VERTEX) const; //! Does shape processing with specified tolerances //! @param[in] theShape shape to process @@ -92,7 +94,8 @@ public: Handle(Standard_Transient)& theInfo, const Handle(ShapeBuild_ReShape)& theReShape, const Message_ProgressRange& theProgress = Message_ProgressRange(), - const Standard_Boolean theNonManifold = Standard_False) const; + const Standard_Boolean theNonManifold = Standard_False, + const TopAbs_ShapeEnum theDetalisationLevel = TopAbs_VERTEX) const; //! Checks quality of pcurve of the edge on the given face, //! and corrects it if necessary. diff --git a/tests/bugs/step/bug32681 b/tests/bugs/step/bug32681 new file mode 100644 index 0000000000..2f3e7a8bd4 --- /dev/null +++ b/tests/bugs/step/bug32681 @@ -0,0 +1,27 @@ +puts "==================================" +puts "0032681: Data Exchange - Missed dimension after STEP export" +puts "Check adding of dimension" +puts "==================================" + +pload DCAF + +ReadStep D [locate_data_file bug32681.stp] +XGetOneShape s D +explode s V +XAddSubShape D s_1 0:1:1:1 +XAddSubShape D s_84 0:1:1:1 +XAddDimension D 0:1:1:1:57 0:1:1:1:58 +param write.step.schema 5 +param write.surfacecurve.mode 0 +set tmpFile ${imagedir}/tmpFile.stp +WriteStep D $tmpFile +Close D +ReadStep D1 $tmpFile +set str [XDumpDGTs D1 all] +if {[string first "0:1:1:1:57" $str] == -1 || [string first "0:1:1:1:58" $str] == -1} { + puts "Error: don't find subshape" +} +Close D1 +file delete $tmpFile +param write.step.schema 4 +param write.surfacecurve.mode 1 From 5e53920228c224f910b41a799716e2417b4c4de4 Mon Sep 17 00:00:00 2001 From: akaftasev Date: Wed, 2 Aug 2023 12:36:55 +0100 Subject: [PATCH 493/639] 0026578: Modeling Algorithm - Exceptions in offset operation with intersection Added test cases --- tests/bugs/modalg_8/bug26578_1 | 14 ++++++++++++++ tests/bugs/modalg_8/bug26578_2 | 12 ++++++++++++ tests/bugs/modalg_8/bug26578_3 | 14 ++++++++++++++ tests/bugs/modalg_8/bug26578_4 | 14 ++++++++++++++ tests/bugs/modalg_8/bug26578_5 | 14 ++++++++++++++ tests/bugs/modalg_8/bug26578_6 | 14 ++++++++++++++ 6 files changed, 82 insertions(+) create mode 100644 tests/bugs/modalg_8/bug26578_1 create mode 100644 tests/bugs/modalg_8/bug26578_2 create mode 100644 tests/bugs/modalg_8/bug26578_3 create mode 100644 tests/bugs/modalg_8/bug26578_4 create mode 100644 tests/bugs/modalg_8/bug26578_5 create mode 100644 tests/bugs/modalg_8/bug26578_6 diff --git a/tests/bugs/modalg_8/bug26578_1 b/tests/bugs/modalg_8/bug26578_1 new file mode 100644 index 0000000000..4e7a202fb1 --- /dev/null +++ b/tests/bugs/modalg_8/bug26578_1 @@ -0,0 +1,14 @@ +puts "================================" +puts "0026578: Modeling Algorithm - Exceptions in offset operation with intersection" +puts "================================" +puts "" + +restore [locate_data_file bug26578_plate1.brep] s + +offsetparameter 1e-7 p i +offsetload s 100 +offsetperform r + +checkshape r +checknbshapes r -vertex 22 -edge 32 -wire 11 -face 11 +checkview -display r -2d -path ${imagedir}/${test_image}.png diff --git a/tests/bugs/modalg_8/bug26578_2 b/tests/bugs/modalg_8/bug26578_2 new file mode 100644 index 0000000000..6bd85764eb --- /dev/null +++ b/tests/bugs/modalg_8/bug26578_2 @@ -0,0 +1,12 @@ +puts "REQUIRED ALL: ERROR. Can not trim edges." + +puts "================================" +puts "0026578: Modeling Algorithm - Exceptions in offset operation with intersection" +puts "================================" +puts "" + +restore [locate_data_file bug26578_plate2.brep] s + +offsetparameter 1e-7 p i +offsetload s -30 +offsetperform r diff --git a/tests/bugs/modalg_8/bug26578_3 b/tests/bugs/modalg_8/bug26578_3 new file mode 100644 index 0000000000..905310c778 --- /dev/null +++ b/tests/bugs/modalg_8/bug26578_3 @@ -0,0 +1,14 @@ +puts "================================" +puts "0026578: Modeling Algorithm - Exceptions in offset operation with intersection" +puts "================================" +puts "" + +restore [locate_data_file bug26578_plate3.brep] s + +offsetparameter 1e-7 p i +offsetload s 4 +offsetperform r + +checkshape r +checknbshapes r -vertex 25 -edge 36 -wire 12 -face 12 +checkview -display r -2d -path ${imagedir}/${test_image}.png diff --git a/tests/bugs/modalg_8/bug26578_4 b/tests/bugs/modalg_8/bug26578_4 new file mode 100644 index 0000000000..84c178805e --- /dev/null +++ b/tests/bugs/modalg_8/bug26578_4 @@ -0,0 +1,14 @@ +puts "================================" +puts "0026578: Modeling Algorithm - Exceptions in offset operation with intersection" +puts "================================" +puts "" + +restore [locate_data_file bug26578_plate4.brep] s + +offsetparameter 1e-7 p i +offsetload s 2 +offsetperform r + +checkshape r +checknbshapes r -vertex 22 -edge 31 -wire 10 -face 10 +checkview -display r -2d -path ${imagedir}/${test_image}.png diff --git a/tests/bugs/modalg_8/bug26578_5 b/tests/bugs/modalg_8/bug26578_5 new file mode 100644 index 0000000000..d6f60f4deb --- /dev/null +++ b/tests/bugs/modalg_8/bug26578_5 @@ -0,0 +1,14 @@ +puts "================================" +puts "0026578: Modeling Algorithm - Exceptions in offset operation with intersection" +puts "================================" +puts "" + +restore [locate_data_file bug26578_plate5.brep] s + +offsetparameter 1e-7 p i +offsetload s 2 +offsetperform r + +checkshape r +checknbshapes r -vertex 39 -edge 57 -wire 19 -face 19 +checkview -display r -2d -path ${imagedir}/${test_image}.png diff --git a/tests/bugs/modalg_8/bug26578_6 b/tests/bugs/modalg_8/bug26578_6 new file mode 100644 index 0000000000..e7698f22a3 --- /dev/null +++ b/tests/bugs/modalg_8/bug26578_6 @@ -0,0 +1,14 @@ +puts "================================" +puts "0026578: Modeling Algorithm - Exceptions in offset operation with intersection" +puts "================================" +puts "" + +restore [locate_data_file bug26578_plate7.brep] s + +offsetparameter 1e-7 p i +offsetload s 60 +offsetperform r + +checkshape r +checknbshapes r -vertex 15 -edge 21 -wire 7 -face 7 +checkview -display r -2d -path ${imagedir}/${test_image}.png From 96d1fe2b05d29224ed594733845e38f0926a5c50 Mon Sep 17 00:00:00 2001 From: akaftasev Date: Tue, 1 Aug 2023 15:05:10 +0100 Subject: [PATCH 494/639] 0033398: Modeling Algorithms - ShapeUpgrade_UnifySameDomain throws exception on specific STEP model Added additional checking in static method FindCoordBounds to avoid processing null pcurves --- .../ShapeUpgrade_UnifySameDomain.cxx | 38 +++++++++++++------ tests/bugs/heal/bug33398 | 10 +++++ 2 files changed, 36 insertions(+), 12 deletions(-) create mode 100644 tests/bugs/heal/bug33398 diff --git a/src/ShapeUpgrade/ShapeUpgrade_UnifySameDomain.cxx b/src/ShapeUpgrade/ShapeUpgrade_UnifySameDomain.cxx index 022fdc7915..23d27e2bef 100644 --- a/src/ShapeUpgrade/ShapeUpgrade_UnifySameDomain.cxx +++ b/src/ShapeUpgrade/ShapeUpgrade_UnifySameDomain.cxx @@ -340,16 +340,22 @@ static Standard_Real ComputeMinEdgeSize(const TopTools_SequenceOfShape& theEdges return MinSize; } -static void FindCoordBounds(const TopTools_SequenceOfShape& theFaces, - const TopoDS_Face& theRefFace, - const TopTools_IndexedDataMapOfShapeListOfShape& theMapEF, - const TopTools_MapOfShape& theEdgesMap, - const Standard_Integer theIndCoord, - const Standard_Real thePeriod, - Standard_Real& theMinCoord, - Standard_Real& theMaxCoord, - Standard_Integer& theNumberOfIntervals, - Standard_Integer& theIndFaceMax) +//======================================================================= +//function : FindCoordBounds +//purpose : Searching for origin of U in 2d space +// Returns Standard_False if could not find curve on surface +// Returns Standard_True if succeed +//======================================================================= +static Standard_Boolean FindCoordBounds(const TopTools_SequenceOfShape& theFaces, + const TopoDS_Face& theRefFace, + const TopTools_IndexedDataMapOfShapeListOfShape& theMapEF, + const TopTools_MapOfShape& theEdgesMap, + const Standard_Integer theIndCoord, + const Standard_Real thePeriod, + Standard_Real& theMinCoord, + Standard_Real& theMaxCoord, + Standard_Integer& theNumberOfIntervals, + Standard_Integer& theIndFaceMax) { NCollection_Sequence> aPairSeq; @@ -372,6 +378,10 @@ static void FindCoordBounds(const TopTools_SequenceOfShape& theFaces, continue; Standard_Real fpar, lpar; Handle(Geom2d_Curve) aPCurve = BRep_Tool::CurveOnSurface(anEdge, theRefFace, fpar, lpar); + if (aPCurve.IsNull()) + { + return Standard_False; + } UpdateBoundaries (aPCurve, fpar, lpar, theIndCoord, aMinCoord, aMaxCoord); } @@ -436,6 +446,7 @@ static void FindCoordBounds(const TopTools_SequenceOfShape& theFaces, theMinCoord = aPairSeq(1).first; theMaxCoord = aPairSeq(1).second; + return Standard_True; } static void RelocatePCurvesToNewUorigin(const TopTools_SequenceOfShape& theEdges, @@ -3297,8 +3308,11 @@ void ShapeUpgrade_UnifySameDomain::IntUnifyFaces(const TopoDS_Shape& theInpShape //so that all the faces are in [origin, origin + Uperiod] Standard_Real aMinCoord, aMaxCoord; //Umin, Umax; Standard_Integer aNumberOfIntervals, i_face_max; - FindCoordBounds (faces, F_RefFace, aMapEF, edgesMap, ii+1, aPeriods[ii], - aMinCoord, aMaxCoord, aNumberOfIntervals, i_face_max); + if (!FindCoordBounds(faces, F_RefFace, aMapEF, edgesMap, ii + 1, aPeriods[ii], + aMinCoord, aMaxCoord, aNumberOfIntervals, i_face_max)) + { + break; + } if (aMaxCoord - aMinCoord > aPeriods[ii] - 1.e-5) anIsSeamFound[ii] = Standard_True; diff --git a/tests/bugs/heal/bug33398 b/tests/bugs/heal/bug33398 new file mode 100644 index 0000000000..099597bb9d --- /dev/null +++ b/tests/bugs/heal/bug33398 @@ -0,0 +1,10 @@ +puts "=========================================" +puts "0033398: Modeling Algorithms - ShapeUpgrade_UnifySameDomain fails on specific STEP model" +puts "=========================================" +puts "" + +testreadstep [locate_data_file bug33398.step] s +unifysamedom result s + +checknbshapes result -vertex 506 -edge 908 -wire 394 -face 382 -shell 4 -solid 4 +checkview -display result -2d -path ${imagedir}/${test_image}.png From b32425859a1f7dfabf6daf8fa13a869925e316a3 Mon Sep 17 00:00:00 2001 From: akaftasev Date: Tue, 1 Aug 2023 14:00:20 +0100 Subject: [PATCH 495/639] 0031217: Modeling Algorithms - Exception is raised in GeomFill_SectionPlacement when parallel path and SectionAxis Added protection from crashes when IsParallel --- src/GeomFill/GeomFill_SectionPlacement.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/GeomFill/GeomFill_SectionPlacement.cxx b/src/GeomFill/GeomFill_SectionPlacement.cxx index 8d39b1c3cd..46da47a39f 100644 --- a/src/GeomFill/GeomFill_SectionPlacement.cxx +++ b/src/GeomFill/GeomFill_SectionPlacement.cxx @@ -609,7 +609,7 @@ void GeomFill_SectionPlacement::Perform(const Handle(Adaptor3d_Curve)& Path, myAdpSection.LastParameter(), Path->Resolution(Tol/100), myAdpSection.Resolution(Tol/100)); - if (Ext.IsDone()) { + if (Ext.IsDone() && !Ext.IsParallel()) { Extrema_POnCurv P1, P2; for (ii=1; ii<=Ext.NbExt(); ii++) { distaux = sqrt (Ext.SquareDistance(ii)); From eb2be8bb465268c4a5fa29a115a30bf3c740f481 Mon Sep 17 00:00:00 2001 From: akaftasev Date: Tue, 1 Aug 2023 13:10:47 +0100 Subject: [PATCH 496/639] 0033421: Modeling Algorithms - ShapeUpgrade_UnifySameDomain throws exception In method ShapeUpgrade_UnifySameDomain::IntUnifyFaces() the searched edge is finally checked that it is not empty before accessing it. --- .../ShapeUpgrade_UnifySameDomain.cxx | 4 ++++ tests/bugs/heal/bug33421 | 19 +++++++++++++++++++ 2 files changed, 23 insertions(+) create mode 100644 tests/bugs/heal/bug33421 diff --git a/src/ShapeUpgrade/ShapeUpgrade_UnifySameDomain.cxx b/src/ShapeUpgrade/ShapeUpgrade_UnifySameDomain.cxx index 23d27e2bef..e17fefa111 100644 --- a/src/ShapeUpgrade/ShapeUpgrade_UnifySameDomain.cxx +++ b/src/ShapeUpgrade/ShapeUpgrade_UnifySameDomain.cxx @@ -3617,6 +3617,10 @@ void ShapeUpgrade_UnifySameDomain::IntUnifyFaces(const TopoDS_Shape& theInpShape ReconstructMissedSeam (RemovedEdges, F_RefFace, CurEdge, CurVertex, CurPoint, Uperiod, Vperiod, NextEdge, NextPoint); + if (NextEdge.IsNull()) + { + return; + } } else return; diff --git a/tests/bugs/heal/bug33421 b/tests/bugs/heal/bug33421 new file mode 100644 index 0000000000..fcfebd225e --- /dev/null +++ b/tests/bugs/heal/bug33421 @@ -0,0 +1,19 @@ +puts "TODO CR33439 ALL: Error : is WRONG because number of EDGE entities in shape" +puts "TODO CR33439 ALL: Error : is WRONG because number of WIRE entities in shape" +puts "TODO CR33439 ALL: Error : is WRONG because number of FACE entities in shape" + +puts "=========================================" +puts "0033421: Modeling Algorithms - ShapeUpgrade_UnifySameDomain fails" +puts "=========================================" +puts "" + +pcylinder c1 10 10 +copy c1 c2 +tmirror c2 0 0 10 0 0 1 +bop c1 c2 +bopfuse c3 + +unifysamedom result c3 + +checknbshapes result -t -solid 1 -shell 1 -face 3 -wire 3 -edge 3 -vertex 3 +checkview -display result -2d -path ${imagedir}/${test_image}.png From f3a66dd7c09180cbed88b2fabb35fa573f1d6bf0 Mon Sep 17 00:00:00 2001 From: oan Date: Thu, 27 Jul 2023 16:18:59 +0100 Subject: [PATCH 497/639] 0033436: Data Exchange, DE_Wrapper - DEXCAFCascade_ConfigurationNode::BuildProvider() not initialize provider Pass pointer to DEXCAFCascade_ConfigurationNode to DEXCAFCascade_Provider; Remove forcible manual reset of Provider's node in DE_Wrapper::FindProvider() to verify that all specializations of configuration node work properly without necessity of workarounds. --- src/DE/DE_Wrapper.cxx | 1 - src/DEXCAFCascade/DEXCAFCascade_ConfigurationNode.cxx | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/src/DE/DE_Wrapper.cxx b/src/DE/DE_Wrapper.cxx index 45bac0b135..16281c2e28 100644 --- a/src/DE/DE_Wrapper.cxx +++ b/src/DE/DE_Wrapper.cxx @@ -538,7 +538,6 @@ Standard_Boolean DE_Wrapper::FindProvider(const TCollection_AsciiString& thePath { theProvider = aNode->BuildProvider(); aNode->GlobalParameters = GlobalParameters; - theProvider->SetNode(aNode); return Standard_True; } } diff --git a/src/DEXCAFCascade/DEXCAFCascade_ConfigurationNode.cxx b/src/DEXCAFCascade/DEXCAFCascade_ConfigurationNode.cxx index 4f91e2d0ba..ce56b1151a 100644 --- a/src/DEXCAFCascade/DEXCAFCascade_ConfigurationNode.cxx +++ b/src/DEXCAFCascade/DEXCAFCascade_ConfigurationNode.cxx @@ -125,7 +125,7 @@ Handle(DE_ConfigurationNode) DEXCAFCascade_ConfigurationNode::Copy() const //======================================================================= Handle(DE_Provider) DEXCAFCascade_ConfigurationNode::BuildProvider() { - return new DEXCAFCascade_Provider(); + return new DEXCAFCascade_Provider (this); } //======================================================================= From ae1683705ef5c9a7e767c5c873e7d725b04d262f Mon Sep 17 00:00:00 2001 From: akaftasev Date: Tue, 4 Jul 2023 14:23:22 +0100 Subject: [PATCH 498/639] 0033420: Modeling Algorithm - Missing inner part after offset operation Added condition to not remove face image, consisting only of invalid edges for artifactically invalid face. This face image should be connected with other image faces minimum through the edge. --- src/BRepOffset/BRepOffset_MakeOffset_1.cxx | 54 +++++++++++++++++++++- tests/offset/shape_type_i_c/AA1 | 7 +++ tests/offset/shape_type_i_c/ZC6 | 2 + tests/offset/shape_type_i_c/ZS1 | 2 +- 4 files changed, 62 insertions(+), 3 deletions(-) create mode 100644 tests/offset/shape_type_i_c/AA1 diff --git a/src/BRepOffset/BRepOffset_MakeOffset_1.cxx b/src/BRepOffset/BRepOffset_MakeOffset_1.cxx index 758ed4a713..216f095f73 100644 --- a/src/BRepOffset/BRepOffset_MakeOffset_1.cxx +++ b/src/BRepOffset/BRepOffset_MakeOffset_1.cxx @@ -1177,6 +1177,45 @@ void BRepOffset_BuildOffsetFaces::IntersectTrimmedEdges (const Message_ProgressR UpdateIntersectedEdges (aLA, aGFE); } +namespace +{ + //======================================================================= + //function : CheckConnectionsOfFace + //purpose : Checks number of connections for theFace with theLF + // Returns true if number of connections more than 1 + //======================================================================= + static Standard_Boolean checkConnectionsOfFace(const TopoDS_Shape& theFace, + const TopTools_ListOfShape& theLF) + { + TopTools_IndexedMapOfShape aShapeVert; + for (TopTools_ListOfShape::Iterator aFImIterator(theLF); aFImIterator.More(); aFImIterator.Next()) + { + const TopoDS_Shape& aShape = aFImIterator.Value(); + if (aShape.IsSame(theFace)) + { + continue; + } + TopExp::MapShapes(aShape, TopAbs_VERTEX, aShapeVert); + } + Standard_Integer aNbConnections = 0; + TopTools_IndexedMapOfShape aFaceVertices; + TopExp::MapShapes(theFace, TopAbs_VERTEX, aFaceVertices); + for (TopTools_IndexedMapOfShape::Iterator aVertIter(aFaceVertices); aVertIter.More(); aVertIter.Next()) + { + const TopoDS_Shape& aVert = aVertIter.Value(); + if (aShapeVert.Contains(aVert)) + { + ++aNbConnections; + } + if (aNbConnections > 1) + { + return Standard_True; + } + } + return Standard_False; + } +} + //======================================================================= //function : BuildSplitsOfFaces //purpose : Building the splits of offset faces and @@ -1268,6 +1307,10 @@ void BRepOffset_BuildOffsetFaces::BuildSplitsOfFaces (const Message_ProgressRang for (TopTools_ListIteratorOfListOfShape aItLFIm (aLFImages1); aItLFIm.More();) { Standard_Boolean bAllInv = Standard_True; + // Additional check for artificial case + // if current image face consist only of edges from aMapEInv and aMENInv + // then recheck current face for the futher processing + Standard_Boolean aToReCheckFace = bArtificialCase; const TopoDS_Shape& aFIm = aItLFIm.Value(); TopExp_Explorer aExpE (aFIm, TopAbs_EDGE); for (; aExpE.More(); aExpE.Next()) @@ -1278,12 +1321,19 @@ void BRepOffset_BuildOffsetFaces::BuildSplitsOfFaces (const Message_ProgressRang bAllInv = Standard_False; if (!aMENInv.Contains (aE)) { + aToReCheckFace = Standard_False; break; } } } - // - if (!aExpE.More()) + // if current image face is to recheck then check number of connections for this face + // with other image faces for current face + if (!aExpE.More() && aToReCheckFace) + { + aToReCheckFace = checkConnectionsOfFace(aFIm, aLFImages1); + } + // do not delete image face from futher processing if aToReCheckFace is true + if (!aExpE.More() && !aToReCheckFace) { if (bAllInv) { diff --git a/tests/offset/shape_type_i_c/AA1 b/tests/offset/shape_type_i_c/AA1 new file mode 100644 index 0000000000..bbce4b8bc0 --- /dev/null +++ b/tests/offset/shape_type_i_c/AA1 @@ -0,0 +1,7 @@ +restore [locate_data_file bug33420.brep] s + +OFFSETSHAPE 35 {} $calcul $type + +checkprops result -v 4.04602e+07 + +checknbshapes result -face 43 -shell 1 diff --git a/tests/offset/shape_type_i_c/ZC6 b/tests/offset/shape_type_i_c/ZC6 index 7ac9472b19..7aeea5e921 100644 --- a/tests/offset/shape_type_i_c/ZC6 +++ b/tests/offset/shape_type_i_c/ZC6 @@ -1,3 +1,5 @@ +puts "TODO OCC27414 ALL: Error : The area of result shape is" + restore [locate_data_file bug26917_M2_trim33.brep] s OFFSETSHAPE 8 {} $calcul $type diff --git a/tests/offset/shape_type_i_c/ZS1 b/tests/offset/shape_type_i_c/ZS1 index bb9a044df6..3f409e5c7c 100644 --- a/tests/offset/shape_type_i_c/ZS1 +++ b/tests/offset/shape_type_i_c/ZS1 @@ -7,4 +7,4 @@ offsetperform result checkprops result -s 6.21471e+06 -v 8.95633e+08 unifysamedom result_unif result -checknbshapes result_unif -wire 140 -face 138 -shell 1 -solid 1 +checknbshapes result_unif -wire 142 -face 140 -shell 1 -solid 1 From 73914537d144061eedcb71caf7aae47e606b3a1d Mon Sep 17 00:00:00 2001 From: akaftasev Date: Mon, 7 Aug 2023 09:58:01 +0100 Subject: [PATCH 499/639] 0033445: Coding - Changing binary XOR in boolean expression Changed binary XOR to the ternary operator. --- src/ChFi2d/ChFi2d_FilletAlgo.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ChFi2d/ChFi2d_FilletAlgo.cxx b/src/ChFi2d/ChFi2d_FilletAlgo.cxx index f5ae1e87a8..8ef57b9b3f 100644 --- a/src/ChFi2d/ChFi2d_FilletAlgo.cxx +++ b/src/ChFi2d/ChFi2d_FilletAlgo.cxx @@ -597,7 +597,7 @@ TopoDS_Edge ChFi2d_FilletAlgo::Result(const gp_Pnt& thePoint, TopoDS_Edge& theEd gp_Vec aCircleDir; aCircle->D1(aParam1, aPoint1, aCircleDir); - if ((aCircleDir.Angle(aDir) > M_PI / 2.0) ^ aIsOut) + if ((aCircleDir.Angle(aDir) > M_PI / 2.0) ? !aIsOut : aIsOut) aStart = aNearest->getParam(); else anEnd = aNearest->getParam(); @@ -619,7 +619,7 @@ TopoDS_Edge ChFi2d_FilletAlgo::Result(const gp_Pnt& thePoint, TopoDS_Edge& theEd aCircle->D1(aParam2, aPoint2, aCircleDir); - if ((aCircleDir.Angle(aDir) > M_PI / 2.0) ^ (!aIsOut)) + if ((aCircleDir.Angle(aDir) > M_PI / 2.0) ? aIsOut : !aIsOut) aStart = aNearest->getParam2(); else anEnd = aNearest->getParam2(); From 0e97c80e6ab0422fdb1d0ba7c0fcd8d691d62494 Mon Sep 17 00:00:00 2001 From: akaftasev Date: Tue, 8 Aug 2023 12:52:12 +0100 Subject: [PATCH 500/639] 0033446: Modeling Alghorithms - Creating offset with one of the degenerated edge leads to crash Added condition to prevent out of range error --- src/BRepOffsetAPI/BRepOffsetAPI_ThruSections.cxx | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/BRepOffsetAPI/BRepOffsetAPI_ThruSections.cxx b/src/BRepOffsetAPI/BRepOffsetAPI_ThruSections.cxx index f58c934ddd..fcbdd4ba76 100644 --- a/src/BRepOffsetAPI/BRepOffsetAPI_ThruSections.cxx +++ b/src/BRepOffsetAPI/BRepOffsetAPI_ThruSections.cxx @@ -1292,6 +1292,10 @@ BRepOffsetAPI_ThruSections::Generated(const TopoDS_Shape& S) for (; itl.More(); itl.Next()) { Standard_Integer IndOfFace = itl.Value(); + if (AllFaces.Size() < IndOfFace) + { + continue; + } myGenerated.Append(AllFaces(IndOfFace)); } @@ -1302,6 +1306,10 @@ BRepOffsetAPI_ThruSections::Generated(const TopoDS_Shape& S) { Standard_Integer IndOfFace = itl.Value(); IndOfFace += (i-1)*myNbEdgesInSection; + if (AllFaces.Size() < IndOfFace) + { + continue; + } myGenerated.Append(AllFaces(IndOfFace)); } } From 0e6977d668df62ecdd7e26f63b00556d03ba7b5e Mon Sep 17 00:00:00 2001 From: akaftasev Date: Tue, 29 Aug 2023 13:18:39 +0100 Subject: [PATCH 501/639] 0033449: Modeling Algorithm - Crash in BRepTools_GTrsfModification::NewTriangulation() method Changed iteration limits from theTriangulation->NbTriangles() to theTriangulation->NbNodes() Provided modification of the normals only with rotation (gp_GTrsf::Form() == gp_Other leads to crash) --- src/BRepTools/BRepTools_GTrsfModification.cxx | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/BRepTools/BRepTools_GTrsfModification.cxx b/src/BRepTools/BRepTools_GTrsfModification.cxx index 7f2d9731d6..89001ee10c 100644 --- a/src/BRepTools/BRepTools_GTrsfModification.cxx +++ b/src/BRepTools/BRepTools_GTrsfModification.cxx @@ -308,10 +308,15 @@ Standard_Boolean BRepTools_GTrsfModification::NewTriangulation(const TopoDS_Face // modify normals if (theTriangulation->HasNormals()) { - for (Standard_Integer anInd = 1; anInd <= theTriangulation->NbTriangles(); ++anInd) + for (Standard_Integer anInd = 1; anInd <= theTriangulation->NbNodes(); ++anInd) { gp_Dir aNormal = theTriangulation->Normal(anInd); - aNormal.Transform(aGTrsf.Trsf()); + gp_Mat aMat = aGTrsf.VectorialPart(); + aMat.SetDiagonal(1., 1., 1.); + gp_Trsf aTrsf; + aTrsf.SetForm(gp_Rotation); + (gp_Mat&)aTrsf.HVectorialPart() = aMat; + aNormal.Transform(aTrsf); theTriangulation->SetNormal(anInd, aNormal); } } From e7bcf415c3170d827cbec564a3a19da8512e5c29 Mon Sep 17 00:00:00 2001 From: akaftasev Date: Thu, 31 Aug 2023 12:42:05 +0100 Subject: [PATCH 502/639] 0033450: Modeling algorithm - HLR algorightm stucks Selecting the middle point between XInf and XSup leads situation, where X values almost does not change. To prevent this situation, select shifted point instead of middle. --- src/Contap/Contap_Contour.cxx | 7 +++++-- tests/hlr/exact_hlr/bug33450 | 5 +++++ 2 files changed, 10 insertions(+), 2 deletions(-) create mode 100644 tests/hlr/exact_hlr/bug33450 diff --git a/src/Contap/Contap_Contour.cxx b/src/Contap/Contap_Contour.cxx index 90a00e7779..16d2d58625 100644 --- a/src/Contap/Contap_Contour.cxx +++ b/src/Contap/Contap_Contour.cxx @@ -1236,8 +1236,11 @@ void ComputeInternalPoints // std::cout << "Changement de signe detecte" << std::endl; solution = Standard_False; while (!solution) { - X(1) = (XInf(1) + XSup(1)) /2.; - X(2) = (XInf(2) + XSup(2)) /2.; + // Selecting the middle point between XInf and XSup leads situation, where X values almost do not change. + // To prevent this situation, select shifted point instead of middle. + const Standard_Real aCoef = 2. / 3.; + X(1) = XInf(1) + aCoef * (XSup(1) - XInf(1)); + X(2) = XInf(2) + aCoef * (XSup(2) - XInf(2)); rsnld.Perform(SFunc,X,infb,supb); if (!rsnld.IsDone()) { diff --git a/tests/hlr/exact_hlr/bug33450 b/tests/hlr/exact_hlr/bug33450 new file mode 100644 index 0000000000..efe6ca5de0 --- /dev/null +++ b/tests/hlr/exact_hlr/bug33450 @@ -0,0 +1,5 @@ +set viewname "vfront" +set length 63.8689 + +restore [locate_data_file bug33450.brep] a +COMPUTE_HLR $viewname $algotype From a948803521af51d7667062b3e96c634b755498ea Mon Sep 17 00:00:00 2001 From: ichesnok Date: Thu, 31 Aug 2023 15:56:33 +0100 Subject: [PATCH 503/639] 0033183: Data Exchange - Lose texture after saving XBF file Texture reading and writing changed in VisMaterial drivers --- .../BinMXCAFDoc_VisMaterialDriver.cxx | 63 ++++++++++++++++--- .../XmlMXCAFDoc_VisMaterialDriver.cxx | 59 ++++++++++++++--- tests/bugs/xde/bug33183_1 | 37 +++++++++++ tests/bugs/xde/bug33183_2 | 37 +++++++++++ tests/bugs/xde/bug33183_3 | 42 +++++++++++++ 5 files changed, 222 insertions(+), 16 deletions(-) create mode 100644 tests/bugs/xde/bug33183_1 create mode 100644 tests/bugs/xde/bug33183_2 create mode 100644 tests/bugs/xde/bug33183_3 diff --git a/src/BinMXCAFDoc/BinMXCAFDoc_VisMaterialDriver.cxx b/src/BinMXCAFDoc/BinMXCAFDoc_VisMaterialDriver.cxx index b6f8031978..f7f183ebab 100644 --- a/src/BinMXCAFDoc/BinMXCAFDoc_VisMaterialDriver.cxx +++ b/src/BinMXCAFDoc/BinMXCAFDoc_VisMaterialDriver.cxx @@ -126,23 +126,68 @@ static void readColor (const BinObjMgt_Persistent& theSource, static void writeTexture (BinObjMgt_Persistent& theTarget, const Handle(Image_Texture)& theImage) { - theTarget.PutAsciiString (!theImage.IsNull() - && !theImage->FilePath().IsEmpty() - && theImage->FileOffset() == -1 - ? theImage->FilePath() - : ""); + if (theImage.IsNull()) + { + theTarget.PutAsciiString(""); + return; + } + if (theImage->DataBuffer().IsNull()) + { + theTarget.PutAsciiString(theImage->FilePath()); + theTarget.PutBoolean(false); + if (theImage->FileOffset() == -1 || theImage->FileLength() == -1) + { + theTarget.PutBoolean(true); + return; + } + theTarget.PutBoolean(false); + theTarget.PutInteger(static_cast(theImage->FileOffset())); + theTarget.PutInteger(static_cast(theImage->FileLength())); + return; + } + theTarget.PutAsciiString(theImage->TextureId()); + theTarget.PutBoolean(true); + theTarget.PutInteger(static_cast(theImage->DataBuffer()->Size())); + theTarget.PutByteArray((Standard_Byte*)theImage->DataBuffer()->Data(), + static_cast(theImage->DataBuffer()->Size())); } //! Decode texture path. static void readTexture (const BinObjMgt_Persistent& theSource, Handle(Image_Texture)& theTexture) { - TCollection_AsciiString aPath; - theSource.GetAsciiString (aPath); - if (!aPath.IsEmpty()) + TCollection_AsciiString aStr; + theSource.GetAsciiString(aStr); + if (aStr.IsEmpty()) { - theTexture = new Image_Texture (aPath); + return; + } + Standard_Boolean anUseBuffer; + if (!theSource.GetBoolean(anUseBuffer).IsOK()) + { + theTexture = new Image_Texture(aStr); + return; + } + Standard_Integer anOffset = -1, aLength = -1; + if (!anUseBuffer) + { + Standard_Boolean isOnlyFilePath; + theSource.GetBoolean(isOnlyFilePath); + if (isOnlyFilePath) + { + theTexture = new Image_Texture(aStr); + return; + } + theSource.GetInteger(anOffset); + theSource.GetInteger(aLength); + theTexture = new Image_Texture(aStr, anOffset, aLength); + return; } + theSource.GetInteger(aLength); + Handle(NCollection_Buffer) aBuff = + new NCollection_Buffer(NCollection_BaseAllocator::CommonBaseAllocator(), aLength); + theSource.GetByteArray(aBuff->ChangeData(), aLength); + theTexture = new Image_Texture(aBuff, aStr); } //======================================================================= diff --git a/src/XmlMXCAFDoc/XmlMXCAFDoc_VisMaterialDriver.cxx b/src/XmlMXCAFDoc/XmlMXCAFDoc_VisMaterialDriver.cxx index 257620e455..4a8bd4c623 100644 --- a/src/XmlMXCAFDoc/XmlMXCAFDoc_VisMaterialDriver.cxx +++ b/src/XmlMXCAFDoc/XmlMXCAFDoc_VisMaterialDriver.cxx @@ -13,9 +13,11 @@ #include +#include #include #include #include +#include #include IMPLEMENT_STANDARD_RTTIEXT(XmlMXCAFDoc_VisMaterialDriver, XmlMDF_ADriver) @@ -42,6 +44,10 @@ IMPLEMENT_DOMSTRING(EmissiveColor, "emissive_color") IMPLEMENT_DOMSTRING(Shininess, "shininess") IMPLEMENT_DOMSTRING(Transparency, "transparency") IMPLEMENT_DOMSTRING(DiffuseTexture, "diffuse_texture") +IMPLEMENT_DOMSTRING(FilePath, "file_path") +IMPLEMENT_DOMSTRING(TextureId, "texture_id") +IMPLEMENT_DOMSTRING(Offset, "offset") +IMPLEMENT_DOMSTRING(Length, "length") //! Encode alpha mode into character. static const char* alphaModeToString (Graphic3d_AlphaMode theMode) @@ -202,11 +208,26 @@ static void writeTexture (XmlObjMgt_Persistent& theTarget, const XmlObjMgt_DOMString& theName, const Handle(Image_Texture)& theImage) { - if (!theImage.IsNull() - && !theImage->FilePath().IsEmpty() - && theImage->FileOffset() == -1) + if (theImage.IsNull()) { - theTarget.Element().setAttribute (theName, theImage->FilePath().ToCString()); + return; + } + XmlObjMgt_Document aDoc(theTarget.Element().getOwnerDocument()); + XmlObjMgt_Element aCurTarget = aDoc.createElement(theName); + theTarget.Element().appendChild(aCurTarget); + if (theImage->DataBuffer().IsNull()) + { + aCurTarget.setAttribute(::FilePath(), theImage->FilePath().ToCString()); + if (theImage->FileOffset() == -1 || theImage->FileLength() == -1) + { + return; + } + aCurTarget.setAttribute(::Offset(), static_cast(theImage->FileOffset())); + aCurTarget.setAttribute(::Length(), static_cast(theImage->FileLength())); + } + else + { + Message::SendWarning() << "Warning: XmlMXCAFDoc_VisMaterialDriver : Can't write a texture to buffer."; } } @@ -215,10 +236,34 @@ static void readTexture (const XmlObjMgt_Element& theElement, const XmlObjMgt_DOMString& theName, Handle(Image_Texture)& theImage) { - TCollection_AsciiString aPath (theElement.getAttribute (theName).GetString()); - if (!aPath.IsEmpty()) + TCollection_AsciiString aStr(theElement.getAttribute(theName).GetString()); + if (!aStr.IsEmpty()) + { + theImage = new Image_Texture(aStr); + return; + } + LDOM_Element anElement = theElement.GetChildByTagName(theName); + if (anElement.isNull()) + { + return; + } + TCollection_AsciiString aFilePath(anElement.getAttribute(::FilePath()).GetString()); + TCollection_AsciiString anId(anElement.getAttribute(::TextureId()).GetString()); + Standard_Integer anOffset = -1, aLength = -1; + if (!aFilePath.IsEmpty()) + { + anElement.getAttribute(::Offset()).GetInteger(anOffset); + anElement.getAttribute(::Length()).GetInteger(aLength); + if (anOffset == -1 || aLength == -1) + { + theImage = new Image_Texture(aFilePath); + return; + } + theImage = new Image_Texture(aFilePath, anOffset, aLength); + } + else if (!anId.IsEmpty()) { - theImage = new Image_Texture (aPath); + Message::SendWarning() << "Warning: XmlMXCAFDoc_VisMaterialDriver : Can't write a texture to buffer."; } } diff --git a/tests/bugs/xde/bug33183_1 b/tests/bugs/xde/bug33183_1 new file mode 100644 index 0000000000..580fba0cd3 --- /dev/null +++ b/tests/bugs/xde/bug33183_1 @@ -0,0 +1,37 @@ +puts "========" +puts "0033183: Data Exchange - Lose texture after saving XBF file" +puts "Checking saving of textures for the previous version" +puts "========" + +pload OCAF + +Close D -silent +XOpen [locate_data_file bug33183.xbf] D + +set ref { +Label: 0:1:10:3 +Name: boat1 +AlphaMode: BlendAuto +AlphaCutOff: 0.5 +IsDoubleSided: Auto +Common.Ambient: 0.21404114365577698 0.21404114365577698 0.21404114365577698 +Common.Diffuse: 0.21404114365577698 0.21404114365577698 0.21404114365577698 +Common.DiffuseTexture: texture://C:/Work/Projects/OpenCASCADE/testfiles/ship_boat.jpg +Common.Specular: 0 0 0 +Common.Emissive: 0 0 0 +Common.Shininess: 0.0099999997764825821 +Common.Transparency: 0 +} + +set data [XGetVisMaterial D 0:1:10:3] + +for {set i 1} {$i <= 12} {incr i} { + set data_str [lindex $data $i-1] + set ref_str [lindex $ref $i-1] + if { $data_str != $ref_str } { + puts "Error: Data is not equal" + break + } +} + +Close D diff --git a/tests/bugs/xde/bug33183_2 b/tests/bugs/xde/bug33183_2 new file mode 100644 index 0000000000..cce5530b3d --- /dev/null +++ b/tests/bugs/xde/bug33183_2 @@ -0,0 +1,37 @@ +puts "========" +puts "0033183: Data Exchange - Lose texture after saving XBF file" +puts "Checking saving of textures for the previous version" +puts "========" + +pload OCAF + +Close D -silent +XOpen [locate_data_file bug33183.xml] D + +set ref { +Label: 0:1:10:3 +Name: boat1 +AlphaMode: BlendAuto +AlphaCutOff: 0.5 +IsDoubleSided: Auto +Common.Ambient: 0.21404099464416504 0.21404099464416504 0.21404099464416504 +Common.Diffuse: 0.21404099464416504 0.21404099464416504 0.21404099464416504 +Common.DiffuseTexture: texture://C:/Work/Projects/OpenCASCADE/testfiles/ship_boat.jpg +Common.Specular: 0 0 0 +Common.Emissive: 0 0 0 +Common.Shininess: 0.0099999997764825821 +Common.Transparency: 0 +} + +set data [XGetVisMaterial D 0:1:10:3] + +for {set i 1} {$i <= 12} {incr i} { + set data_str [lindex $data $i-1] + set ref_str [lindex $ref $i-1] + if { $data_str != $ref_str } { + puts "Error: Data is not equal" + break + } +} + +Close D diff --git a/tests/bugs/xde/bug33183_3 b/tests/bugs/xde/bug33183_3 new file mode 100644 index 0000000000..3e806d5fe7 --- /dev/null +++ b/tests/bugs/xde/bug33183_3 @@ -0,0 +1,42 @@ +puts "========" +puts "0033183: Data Exchange - Lose texture after saving XBF file" +puts "Checking saving of textures for the previous version" +puts "========" + +pload OCAF + +Close D -silent +ReadGltf D [locate_data_file bug31706_launchvehicle.glb] + +set ref_1 [XGetVisMaterial D 0:1:10:1] +set ref_2 [XGetVisMaterial D 0:1:10:7] + +set aTmpFile ${imagedir}/result.xbf +XSave D $aTmpFile +Close D +XOpen $aTmpFile D + +set cur_1 [XGetVisMaterial D 0:1:10:1] +set cur_2 [XGetVisMaterial D 0:1:10:7] + +for {set i 1} {$i <= 12} {incr i} { + set ref_1_str [lindex $ref_1 $i-1] + set ref_2_str [lindex $ref_2 $i-1] + set cur_1_str [lindex $cur_1 $i-1] + set cur_2_str [lindex $cur_2 $i-1] + if { $ref_1_str != $cur_1_str || + $ref_2_str != $cur_2_str} { + puts "Error: Data is not equal" + break + } +} + +vinit View1 +XDisplay -dispMode 1 D +vfit +if { [vreadpixel 50 300 rgb name] != "WHITE" || [vreadpixel 120 250 rgb name] != "LEMONCHIFFON1" } { + puts "Error: color not match" +} + +Close D +file delete -force $aTmpFile From 28b505b27baa09dfba68242534a89a55960b19ac Mon Sep 17 00:00:00 2001 From: ichesnok Date: Tue, 28 Mar 2023 13:29:44 +0100 Subject: [PATCH 504/639] 0033351: Data Exchange, Step - Improvement for thread safety of the STEP translator Local StepData_Factors object usage for each session Static variables isolated --- .../GeomToStep_MakeAxis1Placement.cxx | 15 +- .../GeomToStep_MakeAxis1Placement.hxx | 14 +- .../GeomToStep_MakeAxis1Placement_gen.pxx | 2 +- .../GeomToStep_MakeAxis2Placement2d.cxx | 11 +- .../GeomToStep_MakeAxis2Placement2d.hxx | 8 +- .../GeomToStep_MakeAxis2Placement3d.cxx | 38 +- .../GeomToStep_MakeAxis2Placement3d.hxx | 16 +- .../GeomToStep_MakeBSplineCurveWithKnots.cxx | 15 +- .../GeomToStep_MakeBSplineCurveWithKnots.hxx | 9 +- ...eCurveWithKnotsAndRationalBSplineCurve.cxx | 6 +- ...eCurveWithKnotsAndRationalBSplineCurve.hxx | 8 +- ...veWithKnotsAndRationalBSplineCurve_gen.pxx | 2 +- ...omToStep_MakeBSplineCurveWithKnots_gen.pxx | 2 +- ...GeomToStep_MakeBSplineSurfaceWithKnots.cxx | 10 +- ...GeomToStep_MakeBSplineSurfaceWithKnots.hxx | 4 +- ...faceWithKnotsAndRationalBSplineSurface.cxx | 6 +- ...faceWithKnotsAndRationalBSplineSurface.hxx | 5 +- .../GeomToStep_MakeBoundedCurve.cxx | 21 +- .../GeomToStep_MakeBoundedCurve.hxx | 8 +- .../GeomToStep_MakeBoundedSurface.cxx | 14 +- .../GeomToStep_MakeBoundedSurface.hxx | 5 +- .../GeomToStep_MakeCartesianPoint.cxx | 18 +- .../GeomToStep_MakeCartesianPoint.hxx | 10 +- src/GeomToStep/GeomToStep_MakeCircle.cxx | 13 +- src/GeomToStep/GeomToStep_MakeCircle.hxx | 11 +- src/GeomToStep/GeomToStep_MakeCircle_gen.pxx | 4 +- src/GeomToStep/GeomToStep_MakeConic.cxx | 23 +- src/GeomToStep/GeomToStep_MakeConic.hxx | 7 +- .../GeomToStep_MakeConicalSurface.cxx | 8 +- .../GeomToStep_MakeConicalSurface.hxx | 4 +- src/GeomToStep/GeomToStep_MakeCurve.cxx | 31 +- src/GeomToStep/GeomToStep_MakeCurve.hxx | 7 +- .../GeomToStep_MakeCylindricalSurface.cxx | 10 +- .../GeomToStep_MakeCylindricalSurface.hxx | 4 +- .../GeomToStep_MakeElementarySurface.cxx | 14 +- .../GeomToStep_MakeElementarySurface.hxx | 5 +- src/GeomToStep/GeomToStep_MakeEllipse.cxx | 13 +- src/GeomToStep/GeomToStep_MakeEllipse.hxx | 11 +- src/GeomToStep/GeomToStep_MakeEllipse_gen.pxx | 4 +- src/GeomToStep/GeomToStep_MakeHyperbola.cxx | 14 +- src/GeomToStep/GeomToStep_MakeHyperbola.hxx | 6 +- src/GeomToStep/GeomToStep_MakeLine.cxx | 13 +- src/GeomToStep/GeomToStep_MakeLine.hxx | 13 +- src/GeomToStep/GeomToStep_MakeLine_gen.pxx | 4 +- src/GeomToStep/GeomToStep_MakeParabola.cxx | 14 +- src/GeomToStep/GeomToStep_MakeParabola.hxx | 7 +- src/GeomToStep/GeomToStep_MakePlane.cxx | 10 +- src/GeomToStep/GeomToStep_MakePlane.hxx | 7 +- src/GeomToStep/GeomToStep_MakePolyline.cxx | 7 +- src/GeomToStep/GeomToStep_MakePolyline.hxx | 8 +- .../GeomToStep_MakePolyline_gen.pxx | 2 +- ...omToStep_MakeRectangularTrimmedSurface.cxx | 10 +- ...omToStep_MakeRectangularTrimmedSurface.hxx | 5 +- .../GeomToStep_MakeSphericalSurface.cxx | 10 +- .../GeomToStep_MakeSphericalSurface.hxx | 5 +- src/GeomToStep/GeomToStep_MakeSurface.cxx | 15 +- src/GeomToStep/GeomToStep_MakeSurface.hxx | 5 +- ...eomToStep_MakeSurfaceOfLinearExtrusion.cxx | 9 +- ...eomToStep_MakeSurfaceOfLinearExtrusion.hxx | 5 +- .../GeomToStep_MakeSurfaceOfRevolution.cxx | 9 +- .../GeomToStep_MakeSurfaceOfRevolution.hxx | 5 +- .../GeomToStep_MakeSweptSurface.cxx | 8 +- .../GeomToStep_MakeSweptSurface.hxx | 5 +- .../GeomToStep_MakeToroidalSurface.cxx | 10 +- .../GeomToStep_MakeToroidalSurface.hxx | 5 +- src/GeomToStep/GeomToStep_MakeVector.cxx | 22 +- src/GeomToStep/GeomToStep_MakeVector.hxx | 14 +- .../STEPCAFControl_Controller.cxx | 10 +- src/STEPCAFControl/STEPCAFControl_Reader.cxx | 190 +++++---- src/STEPCAFControl/STEPCAFControl_Reader.hxx | 34 +- src/STEPCAFControl/STEPCAFControl_Writer.cxx | 70 ++-- src/STEPCAFControl/STEPCAFControl_Writer.hxx | 17 +- .../STEPConstruct_ContextTool.cxx | 11 +- .../STEPConstruct_ContextTool.hxx | 5 +- .../STEPConstruct_UnitContext.cxx | 17 +- .../STEPConstruct_UnitContext.hxx | 10 +- .../STEPConstruct_ValidationProps.cxx | 16 +- .../STEPConstruct_ValidationProps.hxx | 11 +- src/STEPControl/STEPControl_ActorRead.cxx | 164 ++++---- src/STEPControl/STEPControl_ActorRead.hxx | 32 +- src/STEPControl/STEPControl_ActorWrite.cxx | 57 +-- src/STEPControl/STEPControl_ActorWrite.hxx | 4 + src/STEPControl/STEPControl_Controller.cxx | 3 + src/STEPEdit/STEPEdit.cxx | 3 + src/STEPEdit/STEPEdit_EditContext.cxx | 4 + .../STEPSelections_SelectGSCurves.cxx | 4 + .../STEPSelections_SelectInstances.cxx | 18 +- src/StepData/FILES | 4 +- ...GlobalFactors.cxx => StepData_Factors.cxx} | 30 +- ...GlobalFactors.hxx => StepData_Factors.hxx} | 31 +- src/StepData/StepData_StepModel.cxx | 7 +- src/StepData/StepData_StepModel.hxx | 4 +- src/StepSelect/StepSelect_StepType.cxx | 3 + src/StepToGeom/StepToGeom.cxx | 361 ++++++++++-------- src/StepToGeom/StepToGeom.hxx | 130 ++++--- src/StepToTopoDS/StepToTopoDS_Builder.cxx | 63 +-- src/StepToTopoDS/StepToTopoDS_Builder.hxx | 17 +- .../StepToTopoDS_MakeTransformed.cxx | 18 +- .../StepToTopoDS_MakeTransformed.hxx | 9 +- .../StepToTopoDS_TranslateCompositeCurve.cxx | 27 +- .../StepToTopoDS_TranslateCompositeCurve.hxx | 20 +- ...pToTopoDS_TranslateCurveBoundedSurface.cxx | 13 +- ...pToTopoDS_TranslateCurveBoundedSurface.hxx | 8 +- .../StepToTopoDS_TranslateEdge.cxx | 41 +- .../StepToTopoDS_TranslateEdge.hxx | 25 +- .../StepToTopoDS_TranslateEdgeLoop.cxx | 29 +- .../StepToTopoDS_TranslateEdgeLoop.hxx | 18 +- .../StepToTopoDS_TranslateFace.cxx | 46 ++- .../StepToTopoDS_TranslateFace.hxx | 23 +- .../StepToTopoDS_TranslatePolyLoop.cxx | 19 +- .../StepToTopoDS_TranslatePolyLoop.hxx | 13 +- .../StepToTopoDS_TranslateShell.cxx | 7 +- .../StepToTopoDS_TranslateShell.hxx | 2 + .../StepToTopoDS_TranslateSolid.cxx | 4 +- .../StepToTopoDS_TranslateSolid.hxx | 1 + .../StepToTopoDS_TranslateVertex.cxx | 11 +- .../StepToTopoDS_TranslateVertex.hxx | 11 +- .../StepToTopoDS_TranslateVertexLoop.cxx | 11 +- .../StepToTopoDS_TranslateVertexLoop.hxx | 11 +- src/TopoDSToStep/TopoDSToStep_Builder.cxx | 9 +- src/TopoDSToStep/TopoDSToStep_Builder.hxx | 3 + .../TopoDSToStep_MakeBrepWithVoids.cxx | 4 +- .../TopoDSToStep_MakeBrepWithVoids.hxx | 1 + .../TopoDSToStep_MakeFacetedBrep.cxx | 7 +- .../TopoDSToStep_MakeFacetedBrep.hxx | 3 + ...ToStep_MakeFacetedBrepAndBrepWithVoids.cxx | 4 +- ...ToStep_MakeFacetedBrepAndBrepWithVoids.hxx | 1 + .../TopoDSToStep_MakeGeometricCurveSet.cxx | 6 +- .../TopoDSToStep_MakeGeometricCurveSet.hxx | 4 +- .../TopoDSToStep_MakeManifoldSolidBrep.cxx | 10 +- .../TopoDSToStep_MakeManifoldSolidBrep.hxx | 3 + ...opoDSToStep_MakeShellBasedSurfaceModel.cxx | 10 +- ...opoDSToStep_MakeShellBasedSurfaceModel.hxx | 3 + .../TopoDSToStep_MakeStepEdge.cxx | 19 +- .../TopoDSToStep_MakeStepEdge.hxx | 11 +- .../TopoDSToStep_MakeStepFace.cxx | 28 +- .../TopoDSToStep_MakeStepFace.hxx | 11 +- .../TopoDSToStep_MakeStepVertex.cxx | 11 +- .../TopoDSToStep_MakeStepVertex.hxx | 10 +- .../TopoDSToStep_MakeStepWire.cxx | 15 +- .../TopoDSToStep_MakeStepWire.hxx | 10 +- .../TopoDSToStep_WireframeBuilder.cxx | 56 +-- .../TopoDSToStep_WireframeBuilder.hxx | 25 +- src/XSDRAWSTEP/XSDRAWSTEP.cxx | 4 +- 144 files changed, 1647 insertions(+), 981 deletions(-) rename src/StepData/{StepData_GlobalFactors.cxx => StepData_Factors.cxx} (78%) rename src/StepData/{StepData_GlobalFactors.hxx => StepData_Factors.hxx} (75%) diff --git a/src/GeomToStep/GeomToStep_MakeAxis1Placement.cxx b/src/GeomToStep/GeomToStep_MakeAxis1Placement.cxx index b248f2ae77..f1e47dd219 100644 --- a/src/GeomToStep/GeomToStep_MakeAxis1Placement.cxx +++ b/src/GeomToStep/GeomToStep_MakeAxis1Placement.cxx @@ -23,6 +23,7 @@ #include #include #include +#include #include #include #include @@ -31,7 +32,9 @@ //============================================================================= // Creation d' un axis1_placement de prostep a partir d' un Ax1 de gp //============================================================================= -GeomToStep_MakeAxis1Placement::GeomToStep_MakeAxis1Placement( const gp_Ax1& A) +GeomToStep_MakeAxis1Placement::GeomToStep_MakeAxis1Placement +( const gp_Ax1& A, + const StepData_Factors& theLocalFactors) { #include "GeomToStep_MakeAxis1Placement_gen.pxx" } @@ -39,7 +42,9 @@ GeomToStep_MakeAxis1Placement::GeomToStep_MakeAxis1Placement( const gp_Ax1& A) // Creation d' un axis1_placement de prostep a partir d' un Ax2d de gp //============================================================================= -GeomToStep_MakeAxis1Placement::GeomToStep_MakeAxis1Placement( const gp_Ax2d& A) +GeomToStep_MakeAxis1Placement::GeomToStep_MakeAxis1Placement +( const gp_Ax2d& A, + const StepData_Factors& theLocalFactors) { #include "GeomToStep_MakeAxis1Placement_gen.pxx" } @@ -50,7 +55,8 @@ GeomToStep_MakeAxis1Placement::GeomToStep_MakeAxis1Placement( const gp_Ax2d& A) //============================================================================= GeomToStep_MakeAxis1Placement::GeomToStep_MakeAxis1Placement - ( const Handle(Geom_Axis1Placement)& Axis1) +( const Handle(Geom_Axis1Placement)& Axis1, + const StepData_Factors& theLocalFactors) { gp_Ax1 A; A = Axis1->Ax1(); @@ -63,7 +69,8 @@ GeomToStep_MakeAxis1Placement::GeomToStep_MakeAxis1Placement //============================================================================= GeomToStep_MakeAxis1Placement::GeomToStep_MakeAxis1Placement - ( const Handle(Geom2d_AxisPlacement)& Axis1) +( const Handle(Geom2d_AxisPlacement)& Axis1, + const StepData_Factors& theLocalFactors) { gp_Ax2d A; A = Axis1->Ax2d(); diff --git a/src/GeomToStep/GeomToStep_MakeAxis1Placement.hxx b/src/GeomToStep/GeomToStep_MakeAxis1Placement.hxx index 08ecc30f3a..4e3baad9da 100644 --- a/src/GeomToStep/GeomToStep_MakeAxis1Placement.hxx +++ b/src/GeomToStep/GeomToStep_MakeAxis1Placement.hxx @@ -22,6 +22,8 @@ #include #include + +class StepData_Factors; class StepGeom_Axis1Placement; class gp_Ax1; class gp_Ax2d; @@ -40,13 +42,17 @@ public: DEFINE_STANDARD_ALLOC - Standard_EXPORT GeomToStep_MakeAxis1Placement(const gp_Ax1& A); + Standard_EXPORT GeomToStep_MakeAxis1Placement(const gp_Ax1& A, + const StepData_Factors& theLocalFactors); - Standard_EXPORT GeomToStep_MakeAxis1Placement(const gp_Ax2d& A); + Standard_EXPORT GeomToStep_MakeAxis1Placement(const gp_Ax2d& A, + const StepData_Factors& theLocalFactors); - Standard_EXPORT GeomToStep_MakeAxis1Placement(const Handle(Geom_Axis1Placement)& A); + Standard_EXPORT GeomToStep_MakeAxis1Placement(const Handle(Geom_Axis1Placement)& A, + const StepData_Factors& theLocalFactors); - Standard_EXPORT GeomToStep_MakeAxis1Placement(const Handle(Geom2d_AxisPlacement)& A); + Standard_EXPORT GeomToStep_MakeAxis1Placement(const Handle(Geom2d_AxisPlacement)& A, + const StepData_Factors& theLocalFactors); Standard_EXPORT const Handle(StepGeom_Axis1Placement)& Value() const; diff --git a/src/GeomToStep/GeomToStep_MakeAxis1Placement_gen.pxx b/src/GeomToStep/GeomToStep_MakeAxis1Placement_gen.pxx index 1d4ea5fb01..746f44d51a 100644 --- a/src/GeomToStep/GeomToStep_MakeAxis1Placement_gen.pxx +++ b/src/GeomToStep/GeomToStep_MakeAxis1Placement_gen.pxx @@ -18,7 +18,7 @@ Handle(StepGeom_Axis1Placement) Axe = new StepGeom_Axis1Placement; Handle(StepGeom_CartesianPoint) P; Handle(StepGeom_Direction) D; - GeomToStep_MakeCartesianPoint MkPoint(A.Location()); + GeomToStep_MakeCartesianPoint MkPoint(A.Location(), theLocalFactors.LengthFactor()); GeomToStep_MakeDirection MkDir(A.Direction()); P = MkPoint.Value(); diff --git a/src/GeomToStep/GeomToStep_MakeAxis2Placement2d.cxx b/src/GeomToStep/GeomToStep_MakeAxis2Placement2d.cxx index f988c9fdef..4d4b0338f0 100644 --- a/src/GeomToStep/GeomToStep_MakeAxis2Placement2d.cxx +++ b/src/GeomToStep/GeomToStep_MakeAxis2Placement2d.cxx @@ -21,6 +21,7 @@ #include #include #include +#include #include #include #include @@ -30,13 +31,14 @@ // Creation d' un axis2_placement_2d de prostep a partir d' un Ax2 de gp //============================================================================= GeomToStep_MakeAxis2Placement2d::GeomToStep_MakeAxis2Placement2d -( const gp_Ax2& A) +( const gp_Ax2& A, + const StepData_Factors& theLocalFactors) { Handle(StepGeom_Axis2Placement2d) Axe; Handle(StepGeom_CartesianPoint) P; Handle(StepGeom_Direction) D; - GeomToStep_MakeCartesianPoint MkPoint(A.Location()); + GeomToStep_MakeCartesianPoint MkPoint(A.Location(), theLocalFactors.LengthFactor()); GeomToStep_MakeDirection MkDir(A.Direction()); P = MkPoint.Value(); @@ -56,13 +58,14 @@ GeomToStep_MakeAxis2Placement2d::GeomToStep_MakeAxis2Placement2d //============================================================================= GeomToStep_MakeAxis2Placement2d::GeomToStep_MakeAxis2Placement2d -( const gp_Ax22d& A) +( const gp_Ax22d& A, + const StepData_Factors& theLocalFactors) { Handle(StepGeom_Axis2Placement2d) Axe; Handle(StepGeom_CartesianPoint) P; Handle(StepGeom_Direction) D1; - GeomToStep_MakeCartesianPoint MkPoint(A.Location()); + GeomToStep_MakeCartesianPoint MkPoint(A.Location(), theLocalFactors.LengthFactor()); GeomToStep_MakeDirection MkDir(A.XDirection()); P = MkPoint.Value(); diff --git a/src/GeomToStep/GeomToStep_MakeAxis2Placement2d.hxx b/src/GeomToStep/GeomToStep_MakeAxis2Placement2d.hxx index 13e7a9f37a..e2ceb4c5d3 100644 --- a/src/GeomToStep/GeomToStep_MakeAxis2Placement2d.hxx +++ b/src/GeomToStep/GeomToStep_MakeAxis2Placement2d.hxx @@ -22,6 +22,8 @@ #include #include + +class StepData_Factors; class StepGeom_Axis2Placement2d; class gp_Ax2; class gp_Ax22d; @@ -38,9 +40,11 @@ public: DEFINE_STANDARD_ALLOC - Standard_EXPORT GeomToStep_MakeAxis2Placement2d(const gp_Ax2& A); + Standard_EXPORT GeomToStep_MakeAxis2Placement2d(const gp_Ax2& A, + const StepData_Factors& theLocalFactors); - Standard_EXPORT GeomToStep_MakeAxis2Placement2d(const gp_Ax22d& A); + Standard_EXPORT GeomToStep_MakeAxis2Placement2d(const gp_Ax22d& A, + const StepData_Factors& theLocalFactors); Standard_EXPORT const Handle(StepGeom_Axis2Placement2d)& Value() const; diff --git a/src/GeomToStep/GeomToStep_MakeAxis2Placement3d.cxx b/src/GeomToStep/GeomToStep_MakeAxis2Placement3d.cxx index f0675809a5..a4d6dd5592 100644 --- a/src/GeomToStep/GeomToStep_MakeAxis2Placement3d.cxx +++ b/src/GeomToStep/GeomToStep_MakeAxis2Placement3d.cxx @@ -22,19 +22,20 @@ #include #include #include +#include #include #include #include #include static Handle(StepGeom_Axis2Placement3d) MakeAxis2Placement3d - (const gp_Pnt& O, const gp_Dir& D, const gp_Dir& X, const Standard_CString nom) + (const gp_Pnt& O, const gp_Dir& D, const gp_Dir& X, const Standard_CString nom, Standard_Real aFactor) { Handle(StepGeom_Axis2Placement3d) Axe; Handle(StepGeom_CartesianPoint) P; Handle(StepGeom_Direction) D1, D2; - GeomToStep_MakeCartesianPoint MkPoint(O); + GeomToStep_MakeCartesianPoint MkPoint(O, aFactor); GeomToStep_MakeDirection MkDir1(D); GeomToStep_MakeDirection MkDir2(X); @@ -55,13 +56,14 @@ static Handle(StepGeom_Axis2Placement3d) MakeAxis2Placement3d // Creation d' un axis2_placement_3d a l origine //============================================================================= -GeomToStep_MakeAxis2Placement3d::GeomToStep_MakeAxis2Placement3d ( ) +GeomToStep_MakeAxis2Placement3d::GeomToStep_MakeAxis2Placement3d ( + const StepData_Factors& theLocalFactors) { gp_Ax2 A (gp_Pnt(0.,0.,0.), gp_Dir (0.,0.,1.), gp_Dir (1.,0.,0.)); // le reste inchange Handle(StepGeom_Axis2Placement3d) Axe = MakeAxis2Placement3d - (A.Location(), A.Direction(), A.XDirection(), ""); + (A.Location(), A.Direction(), A.XDirection(), "", theLocalFactors.LengthFactor()); theAxis2Placement3d = Axe; done = Standard_True; } @@ -70,11 +72,12 @@ GeomToStep_MakeAxis2Placement3d::GeomToStep_MakeAxis2Placement3d ( ) // Creation d' un axis2_placement_3d de prostep a partir d' un Ax2 de gp //============================================================================= -GeomToStep_MakeAxis2Placement3d::GeomToStep_MakeAxis2Placement3d( const gp_Ax2& - A) +GeomToStep_MakeAxis2Placement3d::GeomToStep_MakeAxis2Placement3d( + const gp_Ax2& A, + const StepData_Factors& theLocalFactors) { Handle(StepGeom_Axis2Placement3d) Axe = MakeAxis2Placement3d - (A.Location(), A.Direction(), A.XDirection(), ""); + (A.Location(), A.Direction(), A.XDirection(), "", theLocalFactors.LengthFactor()); theAxis2Placement3d = Axe; done = Standard_True; } @@ -83,11 +86,12 @@ GeomToStep_MakeAxis2Placement3d::GeomToStep_MakeAxis2Placement3d( const gp_Ax2& // Creation d' un axis2_placement_3d de prostep a partir d' un Ax3 de gp //============================================================================= -GeomToStep_MakeAxis2Placement3d::GeomToStep_MakeAxis2Placement3d -( const gp_Ax3& A) +GeomToStep_MakeAxis2Placement3d::GeomToStep_MakeAxis2Placement3d( + const gp_Ax3& A, + const StepData_Factors& theLocalFactors) { Handle(StepGeom_Axis2Placement3d) Axe = MakeAxis2Placement3d - (A.Location(), A.Direction(), A.XDirection(), ""); + (A.Location(), A.Direction(), A.XDirection(), "", theLocalFactors.LengthFactor()); theAxis2Placement3d = Axe; done = Standard_True; } @@ -96,15 +100,16 @@ GeomToStep_MakeAxis2Placement3d::GeomToStep_MakeAxis2Placement3d // Creation d' un axis2_placement_3d de prostep a partir d' un Trsf de gp //============================================================================= -GeomToStep_MakeAxis2Placement3d::GeomToStep_MakeAxis2Placement3d - ( const gp_Trsf& T) +GeomToStep_MakeAxis2Placement3d::GeomToStep_MakeAxis2Placement3d( + const gp_Trsf& T, + const StepData_Factors& theLocalFactors) { gp_Ax2 A (gp_Pnt(0.,0.,0.), gp_Dir (0.,0.,1.), gp_Dir (1.,0.,0.)); A.Transform (T); // le reste inchange Handle(StepGeom_Axis2Placement3d) Axe = MakeAxis2Placement3d - (A.Location(), A.Direction(), A.XDirection(), ""); + (A.Location(), A.Direction(), A.XDirection(), "", theLocalFactors.LengthFactor()); theAxis2Placement3d = Axe; done = Standard_True; } @@ -114,14 +119,15 @@ GeomToStep_MakeAxis2Placement3d::GeomToStep_MakeAxis2Placement3d // de Geom //============================================================================= -GeomToStep_MakeAxis2Placement3d::GeomToStep_MakeAxis2Placement3d - ( const Handle(Geom_Axis2Placement)& Axis2) +GeomToStep_MakeAxis2Placement3d::GeomToStep_MakeAxis2Placement3d( + const Handle(Geom_Axis2Placement)& Axis2, + const StepData_Factors& theLocalFactors) { gp_Ax2 A; A = Axis2->Ax2(); Handle(StepGeom_Axis2Placement3d) Axe = MakeAxis2Placement3d - (A.Location(), A.Direction(), A.XDirection(), ""); + (A.Location(), A.Direction(), A.XDirection(), "", theLocalFactors.LengthFactor()); theAxis2Placement3d = Axe; done = Standard_True; } diff --git a/src/GeomToStep/GeomToStep_MakeAxis2Placement3d.hxx b/src/GeomToStep/GeomToStep_MakeAxis2Placement3d.hxx index 89c0c3b1de..b11e822129 100644 --- a/src/GeomToStep/GeomToStep_MakeAxis2Placement3d.hxx +++ b/src/GeomToStep/GeomToStep_MakeAxis2Placement3d.hxx @@ -22,6 +22,8 @@ #include #include +#include +class StepData_Factors; class StepGeom_Axis2Placement3d; class gp_Ax2; class gp_Ax3; @@ -40,15 +42,19 @@ public: DEFINE_STANDARD_ALLOC - Standard_EXPORT GeomToStep_MakeAxis2Placement3d(); + Standard_EXPORT GeomToStep_MakeAxis2Placement3d(const StepData_Factors& theLocalFactors); - Standard_EXPORT GeomToStep_MakeAxis2Placement3d(const gp_Ax2& A); + Standard_EXPORT GeomToStep_MakeAxis2Placement3d(const gp_Ax2& A, + const StepData_Factors& theLocalFactors); - Standard_EXPORT GeomToStep_MakeAxis2Placement3d(const gp_Ax3& A); + Standard_EXPORT GeomToStep_MakeAxis2Placement3d(const gp_Ax3& A, + const StepData_Factors& theLocalFactors); - Standard_EXPORT GeomToStep_MakeAxis2Placement3d(const gp_Trsf& T); + Standard_EXPORT GeomToStep_MakeAxis2Placement3d(const gp_Trsf& T, + const StepData_Factors& theLocalFactors); - Standard_EXPORT GeomToStep_MakeAxis2Placement3d(const Handle(Geom_Axis2Placement)& A); + Standard_EXPORT GeomToStep_MakeAxis2Placement3d(const Handle(Geom_Axis2Placement)& A, + const StepData_Factors& theLocalFactors); Standard_EXPORT const Handle(StepGeom_Axis2Placement3d)& Value() const; diff --git a/src/GeomToStep/GeomToStep_MakeBSplineCurveWithKnots.cxx b/src/GeomToStep/GeomToStep_MakeBSplineCurveWithKnots.cxx index 37973471c9..4cd0b56b73 100644 --- a/src/GeomToStep/GeomToStep_MakeBSplineCurveWithKnots.cxx +++ b/src/GeomToStep/GeomToStep_MakeBSplineCurveWithKnots.cxx @@ -21,6 +21,7 @@ #include #include #include +#include #include #include #include @@ -35,10 +36,9 @@ // Creation d' une bspline_curve_with_knots de // prostep a partir d' une BSplineCurve de Geom //============================================================================= -GeomToStep_MakeBSplineCurveWithKnots:: - GeomToStep_MakeBSplineCurveWithKnots( const - Handle(Geom_BSplineCurve)& BS ) - +GeomToStep_MakeBSplineCurveWithKnots::GeomToStep_MakeBSplineCurveWithKnots +( const Handle(Geom_BSplineCurve)& BS, + const StepData_Factors& theLocalFactors) { #define Array1OfPnt_gen TColgp_Array1OfPnt #include "GeomToStep_MakeBSplineCurveWithKnots_gen.pxx" @@ -49,10 +49,9 @@ GeomToStep_MakeBSplineCurveWithKnots:: // prostep a partir d' une BSplineCurve de Geom2d //============================================================================= -GeomToStep_MakeBSplineCurveWithKnots:: - GeomToStep_MakeBSplineCurveWithKnots( const - Handle(Geom2d_BSplineCurve)& BS ) - +GeomToStep_MakeBSplineCurveWithKnots::GeomToStep_MakeBSplineCurveWithKnots +( const Handle(Geom2d_BSplineCurve)& BS, + const StepData_Factors& theLocalFactors) { #define Array1OfPnt_gen TColgp_Array1OfPnt2d #include "GeomToStep_MakeBSplineCurveWithKnots_gen.pxx" diff --git a/src/GeomToStep/GeomToStep_MakeBSplineCurveWithKnots.hxx b/src/GeomToStep/GeomToStep_MakeBSplineCurveWithKnots.hxx index 3d56eb9046..ea7f140874 100644 --- a/src/GeomToStep/GeomToStep_MakeBSplineCurveWithKnots.hxx +++ b/src/GeomToStep/GeomToStep_MakeBSplineCurveWithKnots.hxx @@ -22,9 +22,10 @@ #include #include -class StepGeom_BSplineCurveWithKnots; class Geom_BSplineCurve; class Geom2d_BSplineCurve; +class StepData_Factors; +class StepGeom_BSplineCurveWithKnots; //! This class implements the mapping between classes @@ -39,9 +40,11 @@ public: DEFINE_STANDARD_ALLOC - Standard_EXPORT GeomToStep_MakeBSplineCurveWithKnots(const Handle(Geom_BSplineCurve)& Bsplin); + Standard_EXPORT GeomToStep_MakeBSplineCurveWithKnots(const Handle(Geom_BSplineCurve)& Bsplin, + const StepData_Factors& theLocalFactors); - Standard_EXPORT GeomToStep_MakeBSplineCurveWithKnots(const Handle(Geom2d_BSplineCurve)& Bsplin); + Standard_EXPORT GeomToStep_MakeBSplineCurveWithKnots(const Handle(Geom2d_BSplineCurve)& Bsplin, + const StepData_Factors& theLocalFactors); Standard_EXPORT const Handle(StepGeom_BSplineCurveWithKnots)& Value() const; diff --git a/src/GeomToStep/GeomToStep_MakeBSplineCurveWithKnotsAndRationalBSplineCurve.cxx b/src/GeomToStep/GeomToStep_MakeBSplineCurveWithKnotsAndRationalBSplineCurve.cxx index c04d867bbd..5e21b57c1e 100644 --- a/src/GeomToStep/GeomToStep_MakeBSplineCurveWithKnotsAndRationalBSplineCurve.cxx +++ b/src/GeomToStep/GeomToStep_MakeBSplineCurveWithKnotsAndRationalBSplineCurve.cxx @@ -21,6 +21,7 @@ #include #include #include +#include #include #include #include @@ -37,8 +38,7 @@ //============================================================================= GeomToStep_MakeBSplineCurveWithKnotsAndRationalBSplineCurve:: GeomToStep_MakeBSplineCurveWithKnotsAndRationalBSplineCurve( const - Handle(Geom_BSplineCurve)& BS ) - + Handle(Geom_BSplineCurve)& BS, const StepData_Factors& theLocalFactors) { #define Array1OfPnt_gen TColgp_Array1OfPnt #include "GeomToStep_MakeBSplineCurveWithKnotsAndRationalBSplineCurve_gen.pxx" @@ -51,7 +51,7 @@ GeomToStep_MakeBSplineCurveWithKnotsAndRationalBSplineCurve:: GeomToStep_MakeBSplineCurveWithKnotsAndRationalBSplineCurve:: GeomToStep_MakeBSplineCurveWithKnotsAndRationalBSplineCurve( const - Handle(Geom2d_BSplineCurve)& BS ) + Handle(Geom2d_BSplineCurve)& BS, const StepData_Factors& theLocalFactors) { #define Array1OfPnt_gen TColgp_Array1OfPnt2d diff --git a/src/GeomToStep/GeomToStep_MakeBSplineCurveWithKnotsAndRationalBSplineCurve.hxx b/src/GeomToStep/GeomToStep_MakeBSplineCurveWithKnotsAndRationalBSplineCurve.hxx index c427afd6fe..9adf01acae 100644 --- a/src/GeomToStep/GeomToStep_MakeBSplineCurveWithKnotsAndRationalBSplineCurve.hxx +++ b/src/GeomToStep/GeomToStep_MakeBSplineCurveWithKnotsAndRationalBSplineCurve.hxx @@ -22,6 +22,8 @@ #include #include + +class StepData_Factors; class StepGeom_BSplineCurveWithKnotsAndRationalBSplineCurve; class Geom_BSplineCurve; class Geom2d_BSplineCurve; @@ -39,9 +41,11 @@ public: DEFINE_STANDARD_ALLOC - Standard_EXPORT GeomToStep_MakeBSplineCurveWithKnotsAndRationalBSplineCurve(const Handle(Geom_BSplineCurve)& Bsplin); + Standard_EXPORT GeomToStep_MakeBSplineCurveWithKnotsAndRationalBSplineCurve(const Handle(Geom_BSplineCurve)& Bsplin, + const StepData_Factors& theLocalFactors); - Standard_EXPORT GeomToStep_MakeBSplineCurveWithKnotsAndRationalBSplineCurve(const Handle(Geom2d_BSplineCurve)& Bsplin); + Standard_EXPORT GeomToStep_MakeBSplineCurveWithKnotsAndRationalBSplineCurve(const Handle(Geom2d_BSplineCurve)& Bsplin, + const StepData_Factors& theLocalFactors); Standard_EXPORT const Handle(StepGeom_BSplineCurveWithKnotsAndRationalBSplineCurve)& Value() const; diff --git a/src/GeomToStep/GeomToStep_MakeBSplineCurveWithKnotsAndRationalBSplineCurve_gen.pxx b/src/GeomToStep/GeomToStep_MakeBSplineCurveWithKnotsAndRationalBSplineCurve_gen.pxx index 17dcf29123..58c323919f 100644 --- a/src/GeomToStep/GeomToStep_MakeBSplineCurveWithKnotsAndRationalBSplineCurve_gen.pxx +++ b/src/GeomToStep/GeomToStep_MakeBSplineCurveWithKnotsAndRationalBSplineCurve_gen.pxx @@ -33,7 +33,7 @@ Handle(StepGeom_BSplineCurveWithKnotsAndRationalBSplineCurve) BSWK; BS->Poles(P); Listpoints = new StepGeom_HArray1OfCartesianPoint(1,N); for ( i=P.Lower(); i<=P.Upper(); i++) { - GeomToStep_MakeCartesianPoint MkPoint(P.Value(i)); + GeomToStep_MakeCartesianPoint MkPoint(P.Value(i), theLocalFactors.LengthFactor()); Pt = MkPoint.Value(); Listpoints->SetValue(i, Pt); } diff --git a/src/GeomToStep/GeomToStep_MakeBSplineCurveWithKnots_gen.pxx b/src/GeomToStep/GeomToStep_MakeBSplineCurveWithKnots_gen.pxx index b57ce7b5cf..1849b61419 100644 --- a/src/GeomToStep/GeomToStep_MakeBSplineCurveWithKnots_gen.pxx +++ b/src/GeomToStep/GeomToStep_MakeBSplineCurveWithKnots_gen.pxx @@ -33,7 +33,7 @@ Handle(StepGeom_BSplineCurveWithKnots) BSWK; BS->Poles(P); Listpoints = new StepGeom_HArray1OfCartesianPoint(1,N); for ( i=P.Lower(); i<=P.Upper(); i++) { - GeomToStep_MakeCartesianPoint MkPoint(P.Value(i)); + GeomToStep_MakeCartesianPoint MkPoint(P.Value(i), theLocalFactors.LengthFactor()); Pt = MkPoint.Value(); Listpoints->SetValue(i, Pt); } diff --git a/src/GeomToStep/GeomToStep_MakeBSplineSurfaceWithKnots.cxx b/src/GeomToStep/GeomToStep_MakeBSplineSurfaceWithKnots.cxx index 02cdc589a3..5d1b9bc5cf 100644 --- a/src/GeomToStep/GeomToStep_MakeBSplineSurfaceWithKnots.cxx +++ b/src/GeomToStep/GeomToStep_MakeBSplineSurfaceWithKnots.cxx @@ -20,6 +20,7 @@ #include #include #include +#include #include #include #include @@ -34,10 +35,9 @@ // Creation d' une bspline_Surface_with_knots_and_rational_bspline_Surface de // prostep a partir d' une BSplineSurface de Geom //============================================================================= -GeomToStep_MakeBSplineSurfaceWithKnots:: - GeomToStep_MakeBSplineSurfaceWithKnots( const - Handle(Geom_BSplineSurface)& BS ) - +GeomToStep_MakeBSplineSurfaceWithKnots::GeomToStep_MakeBSplineSurfaceWithKnots +( const Handle(Geom_BSplineSurface)& BS, + const StepData_Factors& theLocalFactors) { Handle(StepGeom_BSplineSurfaceWithKnots) BSWK; Standard_Integer aUDegree, aVDegree, NU, NV, i, j, NUknots, NVknots, itampon; @@ -62,7 +62,7 @@ GeomToStep_MakeBSplineSurfaceWithKnots:: aControlPointsList = new StepGeom_HArray2OfCartesianPoint(1,NU,1,NV); for ( i=P.LowerRow(); i<=P.UpperRow(); i++) { for ( j=P.LowerCol(); j<=P.UpperCol(); j++) { - GeomToStep_MakeCartesianPoint MkPoint(P.Value(i,j)); + GeomToStep_MakeCartesianPoint MkPoint(P.Value(i,j), theLocalFactors.LengthFactor()); Pt = MkPoint.Value(); aControlPointsList->SetValue(i, j, Pt); } diff --git a/src/GeomToStep/GeomToStep_MakeBSplineSurfaceWithKnots.hxx b/src/GeomToStep/GeomToStep_MakeBSplineSurfaceWithKnots.hxx index 3fe4b7895e..1fe271e450 100644 --- a/src/GeomToStep/GeomToStep_MakeBSplineSurfaceWithKnots.hxx +++ b/src/GeomToStep/GeomToStep_MakeBSplineSurfaceWithKnots.hxx @@ -22,6 +22,7 @@ #include #include +class StepData_Factors; class StepGeom_BSplineSurfaceWithKnots; class Geom_BSplineSurface; @@ -38,7 +39,8 @@ public: DEFINE_STANDARD_ALLOC - Standard_EXPORT GeomToStep_MakeBSplineSurfaceWithKnots(const Handle(Geom_BSplineSurface)& Bsplin); + Standard_EXPORT GeomToStep_MakeBSplineSurfaceWithKnots(const Handle(Geom_BSplineSurface)& Bsplin, + const StepData_Factors& theLocalFactors); Standard_EXPORT const Handle(StepGeom_BSplineSurfaceWithKnots)& Value() const; diff --git a/src/GeomToStep/GeomToStep_MakeBSplineSurfaceWithKnotsAndRationalBSplineSurface.cxx b/src/GeomToStep/GeomToStep_MakeBSplineSurfaceWithKnotsAndRationalBSplineSurface.cxx index 1e302f7aa2..9099993ba7 100644 --- a/src/GeomToStep/GeomToStep_MakeBSplineSurfaceWithKnotsAndRationalBSplineSurface.cxx +++ b/src/GeomToStep/GeomToStep_MakeBSplineSurfaceWithKnotsAndRationalBSplineSurface.cxx @@ -21,6 +21,7 @@ #include #include #include +#include #include #include #include @@ -37,8 +38,7 @@ //============================================================================= GeomToStep_MakeBSplineSurfaceWithKnotsAndRationalBSplineSurface:: GeomToStep_MakeBSplineSurfaceWithKnotsAndRationalBSplineSurface( const - Handle(Geom_BSplineSurface)& BS ) - + Handle(Geom_BSplineSurface)& BS, const StepData_Factors& theLocalFactors) { Handle(StepGeom_BSplineSurfaceWithKnotsAndRationalBSplineSurface) BSWK; Standard_Integer aUDegree, aVDegree, NU, NV, i, j, NUknots, NVknots, itampon; @@ -63,7 +63,7 @@ GeomToStep_MakeBSplineSurfaceWithKnotsAndRationalBSplineSurface:: aControlPointsList = new StepGeom_HArray2OfCartesianPoint(1,NU,1,NV); for ( i=P.LowerRow(); i<=P.UpperRow(); i++) { for ( j=P.LowerCol(); j<=P.UpperCol(); j++) { - GeomToStep_MakeCartesianPoint MkPoint(P.Value(i,j)); + GeomToStep_MakeCartesianPoint MkPoint(P.Value(i,j), theLocalFactors.LengthFactor()); Pt = MkPoint.Value(); aControlPointsList->SetValue(i, j, Pt); } diff --git a/src/GeomToStep/GeomToStep_MakeBSplineSurfaceWithKnotsAndRationalBSplineSurface.hxx b/src/GeomToStep/GeomToStep_MakeBSplineSurfaceWithKnotsAndRationalBSplineSurface.hxx index e049fbdab2..ca714b11ae 100644 --- a/src/GeomToStep/GeomToStep_MakeBSplineSurfaceWithKnotsAndRationalBSplineSurface.hxx +++ b/src/GeomToStep/GeomToStep_MakeBSplineSurfaceWithKnotsAndRationalBSplineSurface.hxx @@ -22,6 +22,8 @@ #include #include + +class StepData_Factors; class StepGeom_BSplineSurfaceWithKnotsAndRationalBSplineSurface; class Geom_BSplineSurface; @@ -38,7 +40,8 @@ public: DEFINE_STANDARD_ALLOC - Standard_EXPORT GeomToStep_MakeBSplineSurfaceWithKnotsAndRationalBSplineSurface(const Handle(Geom_BSplineSurface)& Bsplin); + Standard_EXPORT GeomToStep_MakeBSplineSurfaceWithKnotsAndRationalBSplineSurface(const Handle(Geom_BSplineSurface)& Bsplin, + const StepData_Factors& theLocalFactors); Standard_EXPORT const Handle(StepGeom_BSplineSurfaceWithKnotsAndRationalBSplineSurface)& Value() const; diff --git a/src/GeomToStep/GeomToStep_MakeBoundedCurve.cxx b/src/GeomToStep/GeomToStep_MakeBoundedCurve.cxx index 95f49b50a4..9e13d91f4a 100644 --- a/src/GeomToStep/GeomToStep_MakeBoundedCurve.cxx +++ b/src/GeomToStep/GeomToStep_MakeBoundedCurve.cxx @@ -27,6 +27,7 @@ #include #include #include +#include #include #include #include @@ -34,7 +35,8 @@ //============================================================================= // Creation d' une BoundedCurve de prostep a partir d' une BoundedCurve de Geom //============================================================================= -GeomToStep_MakeBoundedCurve::GeomToStep_MakeBoundedCurve ( const Handle(Geom_BoundedCurve)& C) +GeomToStep_MakeBoundedCurve::GeomToStep_MakeBoundedCurve ( const Handle(Geom_BoundedCurve)& C, + const StepData_Factors& theLocalFactors) { done = Standard_True; @@ -48,11 +50,11 @@ GeomToStep_MakeBoundedCurve::GeomToStep_MakeBoundedCurve ( const Handle(Geom_Bou Bspli = newBspli; } if ( Bspli->IsRational() ) { - GeomToStep_MakeBSplineCurveWithKnotsAndRationalBSplineCurve MkRatBSplineC(Bspli); + GeomToStep_MakeBSplineCurveWithKnotsAndRationalBSplineCurve MkRatBSplineC(Bspli, theLocalFactors); theBoundedCurve = MkRatBSplineC.Value(); } else { - GeomToStep_MakeBSplineCurveWithKnots MkBSplineC(Bspli); + GeomToStep_MakeBSplineCurveWithKnots MkBSplineC(Bspli, theLocalFactors); theBoundedCurve = MkBSplineC.Value(); } } @@ -60,11 +62,11 @@ GeomToStep_MakeBoundedCurve::GeomToStep_MakeBoundedCurve ( const Handle(Geom_Bou Handle(Geom_BezierCurve) Cur = Handle(Geom_BezierCurve)::DownCast(C); Handle(Geom_BSplineCurve) Bspli = GeomConvert::CurveToBSplineCurve(Cur); if ( Bspli->IsRational() ) { - GeomToStep_MakeBSplineCurveWithKnotsAndRationalBSplineCurve MkRatBSplineC(Bspli); + GeomToStep_MakeBSplineCurveWithKnotsAndRationalBSplineCurve MkRatBSplineC(Bspli, theLocalFactors); theBoundedCurve = MkRatBSplineC.Value(); } else { - GeomToStep_MakeBSplineCurveWithKnots MkBSplineC(Bspli); + GeomToStep_MakeBSplineCurveWithKnots MkBSplineC(Bspli, theLocalFactors); theBoundedCurve = MkBSplineC.Value(); } } @@ -81,7 +83,8 @@ GeomToStep_MakeBoundedCurve::GeomToStep_MakeBoundedCurve ( const Handle(Geom_Bou // Geom2d //============================================================================= -GeomToStep_MakeBoundedCurve::GeomToStep_MakeBoundedCurve ( const Handle(Geom2d_BoundedCurve)& C) +GeomToStep_MakeBoundedCurve::GeomToStep_MakeBoundedCurve ( const Handle(Geom2d_BoundedCurve)& C, + const StepData_Factors& theLocalFactors) { done = Standard_True; if (C->IsKind(STANDARD_TYPE(Geom2d_BSplineCurve))) @@ -96,11 +99,11 @@ GeomToStep_MakeBoundedCurve::GeomToStep_MakeBoundedCurve ( const Handle(Geom2d_B Bspli = newBspli; } if ( Bspli->IsRational() ) { - GeomToStep_MakeBSplineCurveWithKnotsAndRationalBSplineCurve MkRatBSplineC(Bspli); + GeomToStep_MakeBSplineCurveWithKnotsAndRationalBSplineCurve MkRatBSplineC(Bspli, theLocalFactors); theBoundedCurve = MkRatBSplineC.Value(); } else { - GeomToStep_MakeBSplineCurveWithKnots MkBSplineC(Bspli); + GeomToStep_MakeBSplineCurveWithKnots MkBSplineC(Bspli, theLocalFactors); theBoundedCurve = MkBSplineC.Value(); } } @@ -108,7 +111,7 @@ GeomToStep_MakeBoundedCurve::GeomToStep_MakeBoundedCurve ( const Handle(Geom2d_B Handle(Geom2d_BezierCurve) Cur = Handle(Geom2d_BezierCurve)::DownCast(C); Handle(Geom2d_BSplineCurve) Bspli = Geom2dConvert::CurveToBSplineCurve(Cur); - GeomToStep_MakeBSplineCurveWithKnots MkBSplineC(Bspli); + GeomToStep_MakeBSplineCurveWithKnots MkBSplineC(Bspli, theLocalFactors); theBoundedCurve = MkBSplineC.Value(); } else diff --git a/src/GeomToStep/GeomToStep_MakeBoundedCurve.hxx b/src/GeomToStep/GeomToStep_MakeBoundedCurve.hxx index d712a46948..26c0df9327 100644 --- a/src/GeomToStep/GeomToStep_MakeBoundedCurve.hxx +++ b/src/GeomToStep/GeomToStep_MakeBoundedCurve.hxx @@ -22,6 +22,8 @@ #include #include + +class StepData_Factors; class StepGeom_BoundedCurve; class Geom_BoundedCurve; class Geom2d_BoundedCurve; @@ -39,9 +41,11 @@ public: DEFINE_STANDARD_ALLOC - Standard_EXPORT GeomToStep_MakeBoundedCurve(const Handle(Geom_BoundedCurve)& C); + Standard_EXPORT GeomToStep_MakeBoundedCurve(const Handle(Geom_BoundedCurve)& C, + const StepData_Factors& theLocalFactors); - Standard_EXPORT GeomToStep_MakeBoundedCurve(const Handle(Geom2d_BoundedCurve)& C); + Standard_EXPORT GeomToStep_MakeBoundedCurve(const Handle(Geom2d_BoundedCurve)& C, + const StepData_Factors& theLocalFactors); Standard_EXPORT const Handle(StepGeom_BoundedCurve)& Value() const; diff --git a/src/GeomToStep/GeomToStep_MakeBoundedSurface.cxx b/src/GeomToStep/GeomToStep_MakeBoundedSurface.cxx index 006b8d0f0e..046c9e182d 100644 --- a/src/GeomToStep/GeomToStep_MakeBoundedSurface.cxx +++ b/src/GeomToStep/GeomToStep_MakeBoundedSurface.cxx @@ -25,6 +25,7 @@ #include #include #include +#include #include #include #include @@ -35,7 +36,8 @@ // de Geom //============================================================================= GeomToStep_MakeBoundedSurface::GeomToStep_MakeBoundedSurface - ( const Handle(Geom_BoundedSurface)& S) + ( const Handle(Geom_BoundedSurface)& S, + const StepData_Factors& theLocalFactors) { done = Standard_True; if (S->IsKind(STANDARD_TYPE(Geom_BSplineSurface))) { @@ -50,11 +52,11 @@ GeomToStep_MakeBoundedSurface::GeomToStep_MakeBoundedSurface } if ( BS->IsURational() || BS->IsVRational() ) { GeomToStep_MakeBSplineSurfaceWithKnotsAndRationalBSplineSurface - MkRatBSplineS(BS); + MkRatBSplineS(BS, theLocalFactors); theBoundedSurface = MkRatBSplineS.Value(); } else { - GeomToStep_MakeBSplineSurfaceWithKnots MkBSplineS(BS); + GeomToStep_MakeBSplineSurfaceWithKnots MkBSplineS(BS, theLocalFactors); theBoundedSurface = MkBSplineS.Value(); } } @@ -64,18 +66,18 @@ GeomToStep_MakeBoundedSurface::GeomToStep_MakeBoundedSurface GeomConvert::SurfaceToBSplineSurface(Sur); if ( BS->IsURational() || BS->IsVRational() ) { GeomToStep_MakeBSplineSurfaceWithKnotsAndRationalBSplineSurface - MkRatBSplineS(BS); + MkRatBSplineS(BS, theLocalFactors); theBoundedSurface = MkRatBSplineS.Value(); } else { - GeomToStep_MakeBSplineSurfaceWithKnots MkBSplineS(BS); + GeomToStep_MakeBSplineSurfaceWithKnots MkBSplineS(BS, theLocalFactors); theBoundedSurface = MkBSplineS.Value(); } } else if (S->IsKind(STANDARD_TYPE(Geom_RectangularTrimmedSurface))) { Handle(Geom_RectangularTrimmedSurface) Sur = Handle(Geom_RectangularTrimmedSurface)::DownCast(S); - GeomToStep_MakeRectangularTrimmedSurface MkRTSurf(Sur); + GeomToStep_MakeRectangularTrimmedSurface MkRTSurf(Sur, theLocalFactors); theBoundedSurface = MkRTSurf.Value(); } else diff --git a/src/GeomToStep/GeomToStep_MakeBoundedSurface.hxx b/src/GeomToStep/GeomToStep_MakeBoundedSurface.hxx index 6d299d7e76..17df588b2f 100644 --- a/src/GeomToStep/GeomToStep_MakeBoundedSurface.hxx +++ b/src/GeomToStep/GeomToStep_MakeBoundedSurface.hxx @@ -22,6 +22,8 @@ #include #include + +class StepData_Factors; class StepGeom_BoundedSurface; class Geom_BoundedSurface; @@ -38,7 +40,8 @@ public: DEFINE_STANDARD_ALLOC - Standard_EXPORT GeomToStep_MakeBoundedSurface(const Handle(Geom_BoundedSurface)& C); + Standard_EXPORT GeomToStep_MakeBoundedSurface(const Handle(Geom_BoundedSurface)& C, + const StepData_Factors& theLocalFactors); Standard_EXPORT const Handle(StepGeom_BoundedSurface)& Value() const; diff --git a/src/GeomToStep/GeomToStep_MakeCartesianPoint.cxx b/src/GeomToStep/GeomToStep_MakeCartesianPoint.cxx index 10f3f949c6..0fcf08253b 100644 --- a/src/GeomToStep/GeomToStep_MakeCartesianPoint.cxx +++ b/src/GeomToStep/GeomToStep_MakeCartesianPoint.cxx @@ -21,7 +21,7 @@ #include #include #include -#include +#include #include #include #include @@ -29,7 +29,8 @@ //============================================================================= // Creation d' un cartesian_point de prostep a partir d' un point3d de gp //============================================================================= -GeomToStep_MakeCartesianPoint::GeomToStep_MakeCartesianPoint( const gp_Pnt& P) +GeomToStep_MakeCartesianPoint::GeomToStep_MakeCartesianPoint( const gp_Pnt& P, + const Standard_Real aFactor) { Handle(StepGeom_CartesianPoint) Pstep = new StepGeom_CartesianPoint; // Handle(TColStd_HArray1OfReal) Acoord = new TColStd_HArray1OfReal(1,3); @@ -42,8 +43,7 @@ GeomToStep_MakeCartesianPoint::GeomToStep_MakeCartesianPoint( const gp_Pnt& P) // Pstep->SetCoordinates(Acoord); Handle(TCollection_HAsciiString) name = new TCollection_HAsciiString(""); // Pstep->SetName(name); - Standard_Real fact = StepData_GlobalFactors::Intance().LengthFactor(); - Pstep->Init3D (name,X/fact,Y/fact,Z/fact); + Pstep->Init3D (name,X/aFactor,Y/aFactor,Z/aFactor); theCartesianPoint = Pstep; done = Standard_True; } @@ -51,8 +51,10 @@ GeomToStep_MakeCartesianPoint::GeomToStep_MakeCartesianPoint( const gp_Pnt& P) // Creation d' un cartesian_point de prostep a partir d' un point 2d de gp //============================================================================= -GeomToStep_MakeCartesianPoint::GeomToStep_MakeCartesianPoint( const gp_Pnt2d& P) +GeomToStep_MakeCartesianPoint::GeomToStep_MakeCartesianPoint( const gp_Pnt2d& P, + const Standard_Real aFactor) { + (void)aFactor; Handle(StepGeom_CartesianPoint) Pstep = new StepGeom_CartesianPoint; // Handle(TColStd_HArray1OfReal) Acoord = new TColStd_HArray1OfReal(1,2); Standard_Real X, Y; @@ -73,7 +75,8 @@ GeomToStep_MakeCartesianPoint::GeomToStep_MakeCartesianPoint( const gp_Pnt2d& P) //============================================================================= GeomToStep_MakeCartesianPoint:: - GeomToStep_MakeCartesianPoint( const Handle(Geom_CartesianPoint)& P) + GeomToStep_MakeCartesianPoint( const Handle(Geom_CartesianPoint)& P, + const Standard_Real aFactor) { Handle(StepGeom_CartesianPoint) Pstep = new StepGeom_CartesianPoint; @@ -87,8 +90,7 @@ GeomToStep_MakeCartesianPoint:: // Pstep->SetCoordinates(Acoord); Handle(TCollection_HAsciiString) name = new TCollection_HAsciiString(""); // Pstep->SetName(name); - Standard_Real fact = StepData_GlobalFactors::Intance().LengthFactor(); - Pstep->Init3D (name,X/fact,Y/fact,Z/fact); + Pstep->Init3D (name,X/aFactor,Y/aFactor,Z/aFactor); theCartesianPoint = Pstep; done = Standard_True; } diff --git a/src/GeomToStep/GeomToStep_MakeCartesianPoint.hxx b/src/GeomToStep/GeomToStep_MakeCartesianPoint.hxx index a7387e0fc7..c476a81ac1 100644 --- a/src/GeomToStep/GeomToStep_MakeCartesianPoint.hxx +++ b/src/GeomToStep/GeomToStep_MakeCartesianPoint.hxx @@ -27,6 +27,7 @@ class gp_Pnt; class gp_Pnt2d; class Geom_CartesianPoint; class Geom2d_CartesianPoint; +class StepData_StepModel; //! This class implements the mapping between classes @@ -40,11 +41,14 @@ public: DEFINE_STANDARD_ALLOC - Standard_EXPORT GeomToStep_MakeCartesianPoint(const gp_Pnt& P); + Standard_EXPORT GeomToStep_MakeCartesianPoint(const gp_Pnt& P, + const Standard_Real aFactor); - Standard_EXPORT GeomToStep_MakeCartesianPoint(const gp_Pnt2d& P); + Standard_EXPORT GeomToStep_MakeCartesianPoint(const gp_Pnt2d& P, + const Standard_Real aFactor); - Standard_EXPORT GeomToStep_MakeCartesianPoint(const Handle(Geom_CartesianPoint)& P); + Standard_EXPORT GeomToStep_MakeCartesianPoint(const Handle(Geom_CartesianPoint)& P, + const Standard_Real aFactor); Standard_EXPORT GeomToStep_MakeCartesianPoint(const Handle(Geom2d_CartesianPoint)& P); diff --git a/src/GeomToStep/GeomToStep_MakeCircle.cxx b/src/GeomToStep/GeomToStep_MakeCircle.cxx index d76adaf3a2..c26e5a3d6d 100644 --- a/src/GeomToStep/GeomToStep_MakeCircle.cxx +++ b/src/GeomToStep/GeomToStep_MakeCircle.cxx @@ -23,7 +23,7 @@ #include #include #include -#include +#include #include #include #include @@ -32,7 +32,8 @@ //============================================================================= // Creation d' un cercle de prostep a partir d' un cercle 3d de gp //============================================================================= -GeomToStep_MakeCircle::GeomToStep_MakeCircle( const gp_Circ& C) +GeomToStep_MakeCircle::GeomToStep_MakeCircle( const gp_Circ& C, + const StepData_Factors& theLocalFactors) { #include "GeomToStep_MakeCircle_gen.pxx" } @@ -43,7 +44,8 @@ GeomToStep_MakeCircle::GeomToStep_MakeCircle( const gp_Circ& C) // Geom //============================================================================= -GeomToStep_MakeCircle::GeomToStep_MakeCircle( const Handle(Geom_Circle)& Cer) +GeomToStep_MakeCircle::GeomToStep_MakeCircle( const Handle(Geom_Circle)& Cer, + const StepData_Factors& theLocalFactors) { gp_Circ C; C = Cer->Circ(); @@ -56,7 +58,8 @@ GeomToStep_MakeCircle::GeomToStep_MakeCircle( const Handle(Geom_Circle)& Cer) // Geom2d //============================================================================= -GeomToStep_MakeCircle::GeomToStep_MakeCircle( const Handle(Geom2d_Circle)& Cer) +GeomToStep_MakeCircle::GeomToStep_MakeCircle( const Handle(Geom2d_Circle)& Cer, + const StepData_Factors& theLocalFactors) { gp_Circ2d C2d; C2d = Cer->Circ2d(); @@ -66,7 +69,7 @@ GeomToStep_MakeCircle::GeomToStep_MakeCircle( const Handle(Geom2d_Circle)& Cer) Handle(StepGeom_Axis2Placement2d) Ax2Step; Standard_Real Rayon; - GeomToStep_MakeAxis2Placement2d MkAxis2(C2d.Position()); + GeomToStep_MakeAxis2Placement2d MkAxis2(C2d.Position(), theLocalFactors); Ax2Step = MkAxis2.Value(); Rayon = C2d.Radius(); Ax2.SetValue(Ax2Step); diff --git a/src/GeomToStep/GeomToStep_MakeCircle.hxx b/src/GeomToStep/GeomToStep_MakeCircle.hxx index 38890848d3..abd6360f2b 100644 --- a/src/GeomToStep/GeomToStep_MakeCircle.hxx +++ b/src/GeomToStep/GeomToStep_MakeCircle.hxx @@ -22,6 +22,8 @@ #include #include + +class StepData_Factors; class StepGeom_Circle; class gp_Circ; class Geom_Circle; @@ -39,11 +41,14 @@ public: DEFINE_STANDARD_ALLOC - Standard_EXPORT GeomToStep_MakeCircle(const gp_Circ& C); + Standard_EXPORT GeomToStep_MakeCircle(const gp_Circ& C, + const StepData_Factors& theLocalFactors); - Standard_EXPORT GeomToStep_MakeCircle(const Handle(Geom_Circle)& C); + Standard_EXPORT GeomToStep_MakeCircle(const Handle(Geom_Circle)& C, + const StepData_Factors& theLocalFactors); - Standard_EXPORT GeomToStep_MakeCircle(const Handle(Geom2d_Circle)& C); + Standard_EXPORT GeomToStep_MakeCircle(const Handle(Geom2d_Circle)& C, + const StepData_Factors& theLocalFactors); Standard_EXPORT const Handle(StepGeom_Circle)& Value() const; diff --git a/src/GeomToStep/GeomToStep_MakeCircle_gen.pxx b/src/GeomToStep/GeomToStep_MakeCircle_gen.pxx index 5c22197f28..86a830508f 100644 --- a/src/GeomToStep/GeomToStep_MakeCircle_gen.pxx +++ b/src/GeomToStep/GeomToStep_MakeCircle_gen.pxx @@ -19,12 +19,12 @@ Handle(StepGeom_Circle) CStep = new StepGeom_Circle; Handle(StepGeom_Axis2Placement3d) Ax2Step; Standard_Real Rayon; - GeomToStep_MakeAxis2Placement3d MkAxis2(C.Position()); + GeomToStep_MakeAxis2Placement3d MkAxis2(C.Position(), theLocalFactors); Ax2Step = MkAxis2.Value(); Rayon = C.Radius(); Ax2.SetValue(Ax2Step); Handle(TCollection_HAsciiString) name = new TCollection_HAsciiString(""); - CStep->Init(name, Ax2, Rayon / StepData_GlobalFactors::Intance().LengthFactor()); + CStep->Init(name, Ax2, Rayon / theLocalFactors.LengthFactor()); theCircle = CStep; done = Standard_True; diff --git a/src/GeomToStep/GeomToStep_MakeConic.cxx b/src/GeomToStep/GeomToStep_MakeConic.cxx index 5db9c52b52..0d0eadd56c 100644 --- a/src/GeomToStep/GeomToStep_MakeConic.cxx +++ b/src/GeomToStep/GeomToStep_MakeConic.cxx @@ -31,6 +31,7 @@ #include #include #include +#include #include #include #include @@ -40,27 +41,28 @@ //============================================================================= // Creation d' une Conic de prostep a partir d' une Conic de Geom //============================================================================= -GeomToStep_MakeConic::GeomToStep_MakeConic ( const Handle(Geom_Conic)& C) +GeomToStep_MakeConic::GeomToStep_MakeConic ( const Handle(Geom_Conic)& C, + const StepData_Factors& theLocalFactors) { done = Standard_True; if (C->IsKind(STANDARD_TYPE(Geom_Circle))) { Handle(Geom_Circle) Cer = Handle(Geom_Circle)::DownCast(C); - GeomToStep_MakeCircle MkCircle(Cer); + GeomToStep_MakeCircle MkCircle(Cer, theLocalFactors); theConic = MkCircle.Value(); } else if (C->IsKind(STANDARD_TYPE(Geom_Ellipse))) { Handle(Geom_Ellipse) Ell = Handle(Geom_Ellipse)::DownCast(C); - GeomToStep_MakeEllipse MkEllipse(Ell); + GeomToStep_MakeEllipse MkEllipse(Ell, theLocalFactors); theConic = MkEllipse.Value(); } else if (C->IsKind(STANDARD_TYPE(Geom_Hyperbola))) { Handle(Geom_Hyperbola) Hyp = Handle(Geom_Hyperbola)::DownCast(C); - GeomToStep_MakeHyperbola MkHyperbola(Hyp); + GeomToStep_MakeHyperbola MkHyperbola(Hyp, theLocalFactors); theConic = MkHyperbola.Value(); } else if (C->IsKind(STANDARD_TYPE(Geom_Parabola))) { Handle(Geom_Parabola) Par = Handle(Geom_Parabola)::DownCast(C); - GeomToStep_MakeParabola MkParabola(Par); + GeomToStep_MakeParabola MkParabola(Par, theLocalFactors); theConic = MkParabola.Value(); } else { @@ -75,27 +77,28 @@ GeomToStep_MakeConic::GeomToStep_MakeConic ( const Handle(Geom_Conic)& C) // Creation d' une Conic2d de prostep a partir d' une Conic de Geom2d //============================================================================= -GeomToStep_MakeConic::GeomToStep_MakeConic ( const Handle(Geom2d_Conic)& C) +GeomToStep_MakeConic::GeomToStep_MakeConic ( const Handle(Geom2d_Conic)& C, + const StepData_Factors& theLocalFactors) { done = Standard_True; if (C->IsKind(STANDARD_TYPE(Geom2d_Circle))) { Handle(Geom2d_Circle) Cer = Handle(Geom2d_Circle)::DownCast(C); - GeomToStep_MakeCircle MkCircle(Cer); + GeomToStep_MakeCircle MkCircle(Cer, theLocalFactors); theConic = MkCircle.Value(); } else if (C->IsKind(STANDARD_TYPE(Geom2d_Ellipse))) { Handle(Geom2d_Ellipse) Ell = Handle(Geom2d_Ellipse)::DownCast(C); - GeomToStep_MakeEllipse MkEllipse(Ell); + GeomToStep_MakeEllipse MkEllipse(Ell, theLocalFactors); theConic = MkEllipse.Value(); } else if (C->IsKind(STANDARD_TYPE(Geom2d_Hyperbola))) { Handle(Geom2d_Hyperbola) Hyp = Handle(Geom2d_Hyperbola)::DownCast(C); - GeomToStep_MakeHyperbola MkHyperbola(Hyp); + GeomToStep_MakeHyperbola MkHyperbola(Hyp, theLocalFactors); theConic = MkHyperbola.Value(); } else if (C->IsKind(STANDARD_TYPE(Geom2d_Parabola))) { Handle(Geom2d_Parabola) Par = Handle(Geom2d_Parabola)::DownCast(C); - GeomToStep_MakeParabola MkParabola(Par); + GeomToStep_MakeParabola MkParabola(Par, theLocalFactors); theConic = MkParabola.Value(); } else { diff --git a/src/GeomToStep/GeomToStep_MakeConic.hxx b/src/GeomToStep/GeomToStep_MakeConic.hxx index b2ff81ab0b..dfdaa13e78 100644 --- a/src/GeomToStep/GeomToStep_MakeConic.hxx +++ b/src/GeomToStep/GeomToStep_MakeConic.hxx @@ -25,6 +25,7 @@ class StepGeom_Conic; class Geom_Conic; class Geom2d_Conic; +class StepData_Factors; //! This class implements the mapping between classes @@ -38,9 +39,11 @@ public: DEFINE_STANDARD_ALLOC - Standard_EXPORT GeomToStep_MakeConic(const Handle(Geom_Conic)& C); + Standard_EXPORT GeomToStep_MakeConic(const Handle(Geom_Conic)& C, + const StepData_Factors& theLocalFactors); - Standard_EXPORT GeomToStep_MakeConic(const Handle(Geom2d_Conic)& C); + Standard_EXPORT GeomToStep_MakeConic(const Handle(Geom2d_Conic)& C, + const StepData_Factors& theLocalFactors); Standard_EXPORT const Handle(StepGeom_Conic)& Value() const; diff --git a/src/GeomToStep/GeomToStep_MakeConicalSurface.cxx b/src/GeomToStep/GeomToStep_MakeConicalSurface.cxx index a8c42bffaf..bbe4df31ac 100644 --- a/src/GeomToStep/GeomToStep_MakeConicalSurface.cxx +++ b/src/GeomToStep/GeomToStep_MakeConicalSurface.cxx @@ -20,7 +20,7 @@ #include #include #include -#include +#include #include #include #include @@ -30,14 +30,14 @@ // de Geom //============================================================================= GeomToStep_MakeConicalSurface::GeomToStep_MakeConicalSurface - ( const Handle(Geom_ConicalSurface)& CS ) + ( const Handle(Geom_ConicalSurface)& CS, const StepData_Factors& theLocalFactors) { Handle(StepGeom_ConicalSurface) CSstep = new StepGeom_ConicalSurface; Handle(StepGeom_Axis2Placement3d) aPosition; Standard_Real aRadius, aSemiAngle; - GeomToStep_MakeAxis2Placement3d MkAxis(CS->Position()); + GeomToStep_MakeAxis2Placement3d MkAxis(CS->Position(), theLocalFactors); aPosition = MkAxis.Value(); aRadius = CS->RefRadius(); aSemiAngle = CS->SemiAngle(); @@ -46,7 +46,7 @@ GeomToStep_MakeConicalSurface::GeomToStep_MakeConicalSurface } Handle(TCollection_HAsciiString) name = new TCollection_HAsciiString(""); - CSstep->Init(name, aPosition, aRadius / StepData_GlobalFactors::Intance().LengthFactor(), aSemiAngle); + CSstep->Init(name, aPosition, aRadius / theLocalFactors.LengthFactor(), aSemiAngle); theConicalSurface = CSstep; done = Standard_True; } diff --git a/src/GeomToStep/GeomToStep_MakeConicalSurface.hxx b/src/GeomToStep/GeomToStep_MakeConicalSurface.hxx index b8c8839c43..31479c494a 100644 --- a/src/GeomToStep/GeomToStep_MakeConicalSurface.hxx +++ b/src/GeomToStep/GeomToStep_MakeConicalSurface.hxx @@ -24,6 +24,7 @@ #include class StepGeom_ConicalSurface; class Geom_ConicalSurface; +class StepData_Factors; //! This class implements the mapping between class @@ -37,7 +38,8 @@ public: DEFINE_STANDARD_ALLOC - Standard_EXPORT GeomToStep_MakeConicalSurface(const Handle(Geom_ConicalSurface)& CSurf); + Standard_EXPORT GeomToStep_MakeConicalSurface(const Handle(Geom_ConicalSurface)& CSurf, + const StepData_Factors& theLocalFactors); Standard_EXPORT const Handle(StepGeom_ConicalSurface)& Value() const; diff --git a/src/GeomToStep/GeomToStep_MakeCurve.cxx b/src/GeomToStep/GeomToStep_MakeCurve.cxx index 6dfee4c044..a552e28a57 100644 --- a/src/GeomToStep/GeomToStep_MakeCurve.cxx +++ b/src/GeomToStep/GeomToStep_MakeCurve.cxx @@ -37,6 +37,7 @@ #include #include #include +#include #include #include #include @@ -47,17 +48,18 @@ //============================================================================= // Creation d' une Curve de prostep a partir d' une Curve de Geom //============================================================================= -GeomToStep_MakeCurve::GeomToStep_MakeCurve ( const Handle(Geom_Curve)& C) +GeomToStep_MakeCurve::GeomToStep_MakeCurve ( const Handle(Geom_Curve)& C, + const StepData_Factors& theLocalFactors) { done = Standard_True; if (C->IsKind(STANDARD_TYPE(Geom_Line))) { Handle(Geom_Line) L = Handle(Geom_Line)::DownCast(C); - GeomToStep_MakeLine MkLine(L); + GeomToStep_MakeLine MkLine(L, theLocalFactors); theCurve = MkLine.Value(); } else if (C->IsKind(STANDARD_TYPE(Geom_Conic))) { Handle(Geom_Conic) L = Handle(Geom_Conic)::DownCast(C); - GeomToStep_MakeConic MkConic(L); + GeomToStep_MakeConic MkConic(L, theLocalFactors); theCurve = MkConic.Value(); } else if (C->IsKind(STANDARD_TYPE(Geom_TrimmedCurve))) { @@ -82,12 +84,12 @@ GeomToStep_MakeCurve::GeomToStep_MakeCurve ( const Handle(Geom_Curve)& C) std::cout<<"BasisCurve Type : "<DynamicType()->Name()<IsKind(STANDARD_TYPE(Geom_BoundedCurve))) { Handle(Geom_BoundedCurve) L = Handle(Geom_BoundedCurve)::DownCast(C); - GeomToStep_MakeBoundedCurve MkBoundedC(L); + GeomToStep_MakeBoundedCurve MkBoundedC(L, theLocalFactors); theCurve = MkBoundedC.Value(); } else @@ -98,12 +100,13 @@ GeomToStep_MakeCurve::GeomToStep_MakeCurve ( const Handle(Geom_Curve)& C) // Creation d'une Curve de prostep a partir d' une Curve de Geom2d //============================================================================= -GeomToStep_MakeCurve::GeomToStep_MakeCurve ( const Handle(Geom2d_Curve)& C) +GeomToStep_MakeCurve::GeomToStep_MakeCurve ( const Handle(Geom2d_Curve)& C, + const StepData_Factors& theLocalFactors) { done = Standard_True; if (C->IsKind(STANDARD_TYPE(Geom2d_Line))) { Handle(Geom2d_Line) L = Handle(Geom2d_Line)::DownCast(C); - GeomToStep_MakeLine MkLine(L); + GeomToStep_MakeLine MkLine(L, theLocalFactors); theCurve = MkLine.Value(); } else if (C->IsKind(STANDARD_TYPE(Geom2d_Conic))) { @@ -124,12 +127,12 @@ GeomToStep_MakeCurve::GeomToStep_MakeCurve ( const Handle(Geom2d_Curve)& C) Handle(Geom2d_BSplineCurve) aBSplineCurve2d = Geom2dConvert::CurveToBSplineCurve(theC2d); const Handle(Geom2d_BoundedCurve)& aBC2d = aBSplineCurve2d; // to avoid ambiguity - GeomToStep_MakeBoundedCurve MkBoundedC(aBC2d); + GeomToStep_MakeBoundedCurve MkBoundedC(aBC2d, theLocalFactors); theCurve = MkBoundedC.Value(); } else { Handle(Geom2d_Conic) L = Handle(Geom2d_Conic)::DownCast(C); - GeomToStep_MakeConic MkConic(L); + GeomToStep_MakeConic MkConic(L, theLocalFactors); theCurve = MkConic.Value(); } } @@ -143,28 +146,28 @@ GeomToStep_MakeCurve::GeomToStep_MakeCurve ( const Handle(Geom2d_Curve)& C) Handle(Geom2d_BSplineCurve) aBSplineCurve2d = Geom2dConvert::CurveToBSplineCurve(theE2d); const Handle(Geom2d_BoundedCurve)& aBC2d = aBSplineCurve2d; // to avoid ambiguity - GeomToStep_MakeBoundedCurve MkBoundedC(aBC2d); + GeomToStep_MakeBoundedCurve MkBoundedC(aBC2d, theLocalFactors); theCurve = MkBoundedC.Value(); } else { Handle(Geom2d_Conic) L = Handle(Geom2d_Conic)::DownCast(C); - GeomToStep_MakeConic MkConic(L); + GeomToStep_MakeConic MkConic(L, theLocalFactors); theCurve = MkConic.Value(); } } else { Handle(Geom2d_Conic) L = Handle(Geom2d_Conic)::DownCast(C); - GeomToStep_MakeConic MkConic(L); + GeomToStep_MakeConic MkConic(L, theLocalFactors); theCurve = MkConic.Value(); } } else if (C->IsKind(STANDARD_TYPE(Geom2d_BoundedCurve))) { Handle(Geom2d_BoundedCurve) L = Handle(Geom2d_BoundedCurve)::DownCast(C); - GeomToStep_MakeBoundedCurve MkBoundedC(L); + GeomToStep_MakeBoundedCurve MkBoundedC(L, theLocalFactors); theCurve = MkBoundedC.Value(); } else if (C->IsKind(STANDARD_TYPE(Geom2d_TrimmedCurve))) { - GeomToStep_MakeCurve aMaker = (Handle(Geom2d_TrimmedCurve)::DownCast(C)->BasisCurve()); + GeomToStep_MakeCurve aMaker(Handle(Geom2d_TrimmedCurve)::DownCast(C)->BasisCurve(), theLocalFactors); theCurve = aMaker.Value(); } else diff --git a/src/GeomToStep/GeomToStep_MakeCurve.hxx b/src/GeomToStep/GeomToStep_MakeCurve.hxx index a907c8fd68..325143b139 100644 --- a/src/GeomToStep/GeomToStep_MakeCurve.hxx +++ b/src/GeomToStep/GeomToStep_MakeCurve.hxx @@ -22,6 +22,7 @@ #include #include +class StepData_Factors; class StepGeom_Curve; class Geom_Curve; class Geom2d_Curve; @@ -38,9 +39,11 @@ public: DEFINE_STANDARD_ALLOC - Standard_EXPORT GeomToStep_MakeCurve(const Handle(Geom_Curve)& C); + Standard_EXPORT GeomToStep_MakeCurve(const Handle(Geom_Curve)& C, + const StepData_Factors& theLocalFactors); - Standard_EXPORT GeomToStep_MakeCurve(const Handle(Geom2d_Curve)& C); + Standard_EXPORT GeomToStep_MakeCurve(const Handle(Geom2d_Curve)& C, + const StepData_Factors& theLocalFactors); Standard_EXPORT const Handle(StepGeom_Curve)& Value() const; diff --git a/src/GeomToStep/GeomToStep_MakeCylindricalSurface.cxx b/src/GeomToStep/GeomToStep_MakeCylindricalSurface.cxx index 08c4fb0b88..d8fa66712b 100644 --- a/src/GeomToStep/GeomToStep_MakeCylindricalSurface.cxx +++ b/src/GeomToStep/GeomToStep_MakeCylindricalSurface.cxx @@ -19,7 +19,7 @@ #include #include #include -#include +#include #include #include #include @@ -29,19 +29,19 @@ // CylindricalSurface de Geom //============================================================================= GeomToStep_MakeCylindricalSurface::GeomToStep_MakeCylindricalSurface - ( const Handle(Geom_CylindricalSurface)& CS ) - + ( const Handle(Geom_CylindricalSurface)& CS, + const StepData_Factors& theLocalFactors) { Handle(StepGeom_CylindricalSurface) CSstep; Handle(StepGeom_Axis2Placement3d) aPosition; Standard_Real aRadius; - GeomToStep_MakeAxis2Placement3d MkAxis2(CS->Position()); + GeomToStep_MakeAxis2Placement3d MkAxis2(CS->Position(), theLocalFactors); aPosition = MkAxis2.Value(); aRadius = CS->Radius(); CSstep = new StepGeom_CylindricalSurface; Handle(TCollection_HAsciiString) name = new TCollection_HAsciiString(""); - CSstep->Init(name, aPosition, aRadius / StepData_GlobalFactors::Intance().LengthFactor()); + CSstep->Init(name, aPosition, aRadius / theLocalFactors.LengthFactor()); theCylindricalSurface = CSstep; done = Standard_True; } diff --git a/src/GeomToStep/GeomToStep_MakeCylindricalSurface.hxx b/src/GeomToStep/GeomToStep_MakeCylindricalSurface.hxx index 77d46e666d..6325002b5d 100644 --- a/src/GeomToStep/GeomToStep_MakeCylindricalSurface.hxx +++ b/src/GeomToStep/GeomToStep_MakeCylindricalSurface.hxx @@ -24,6 +24,7 @@ #include class StepGeom_CylindricalSurface; class Geom_CylindricalSurface; +class StepData_Factors; //! This class implements the mapping between class @@ -37,7 +38,8 @@ public: DEFINE_STANDARD_ALLOC - Standard_EXPORT GeomToStep_MakeCylindricalSurface(const Handle(Geom_CylindricalSurface)& CSurf); + Standard_EXPORT GeomToStep_MakeCylindricalSurface(const Handle(Geom_CylindricalSurface)& CSurf, + const StepData_Factors& theLocalFactors); Standard_EXPORT const Handle(StepGeom_CylindricalSurface)& Value() const; diff --git a/src/GeomToStep/GeomToStep_MakeElementarySurface.cxx b/src/GeomToStep/GeomToStep_MakeElementarySurface.cxx index bcfdfb9069..171cbb4ea7 100644 --- a/src/GeomToStep/GeomToStep_MakeElementarySurface.cxx +++ b/src/GeomToStep/GeomToStep_MakeElementarySurface.cxx @@ -28,6 +28,7 @@ #include #include #include +#include #include #include #include @@ -40,36 +41,37 @@ // ElementarySurface de Geom //============================================================================= GeomToStep_MakeElementarySurface::GeomToStep_MakeElementarySurface - ( const Handle(Geom_ElementarySurface)& S) + ( const Handle(Geom_ElementarySurface)& S, + const StepData_Factors& theLocalFactors) { done = Standard_True; if (S->IsKind(STANDARD_TYPE(Geom_CylindricalSurface))) { Handle(Geom_CylindricalSurface) Sur = Handle(Geom_CylindricalSurface)::DownCast(S); - GeomToStep_MakeCylindricalSurface MkCylindrical(Sur); + GeomToStep_MakeCylindricalSurface MkCylindrical(Sur, theLocalFactors); theElementarySurface = MkCylindrical.Value(); } else if (S->IsKind(STANDARD_TYPE(Geom_ConicalSurface))) { Handle(Geom_ConicalSurface) Sur = Handle(Geom_ConicalSurface)::DownCast(S); - GeomToStep_MakeConicalSurface MkConical(Sur); + GeomToStep_MakeConicalSurface MkConical(Sur, theLocalFactors); theElementarySurface = MkConical.Value(); } else if (S->IsKind(STANDARD_TYPE(Geom_SphericalSurface))) { Handle(Geom_SphericalSurface) Sur = Handle(Geom_SphericalSurface)::DownCast(S); - GeomToStep_MakeSphericalSurface MkSpherical(Sur); + GeomToStep_MakeSphericalSurface MkSpherical(Sur, theLocalFactors); theElementarySurface = MkSpherical.Value(); } else if (S->IsKind(STANDARD_TYPE(Geom_ToroidalSurface))) { Handle(Geom_ToroidalSurface) Sur = Handle(Geom_ToroidalSurface)::DownCast(S); - GeomToStep_MakeToroidalSurface MkToroidal(Sur); + GeomToStep_MakeToroidalSurface MkToroidal(Sur, theLocalFactors); theElementarySurface = MkToroidal.Value(); } else if (S->IsKind(STANDARD_TYPE(Geom_Plane))) { Handle(Geom_Plane) Sur = Handle(Geom_Plane)::DownCast(S); - GeomToStep_MakePlane MkPlane(Sur); + GeomToStep_MakePlane MkPlane(Sur, theLocalFactors); theElementarySurface = MkPlane.Value(); } else diff --git a/src/GeomToStep/GeomToStep_MakeElementarySurface.hxx b/src/GeomToStep/GeomToStep_MakeElementarySurface.hxx index 80f4a09c30..4ccdd301ed 100644 --- a/src/GeomToStep/GeomToStep_MakeElementarySurface.hxx +++ b/src/GeomToStep/GeomToStep_MakeElementarySurface.hxx @@ -22,6 +22,8 @@ #include #include + +class StepData_Factors; class StepGeom_ElementarySurface; class Geom_ElementarySurface; @@ -38,7 +40,8 @@ public: DEFINE_STANDARD_ALLOC - Standard_EXPORT GeomToStep_MakeElementarySurface(const Handle(Geom_ElementarySurface)& S); + Standard_EXPORT GeomToStep_MakeElementarySurface(const Handle(Geom_ElementarySurface)& S, + const StepData_Factors& theLocalFactors); Standard_EXPORT const Handle(StepGeom_ElementarySurface)& Value() const; diff --git a/src/GeomToStep/GeomToStep_MakeEllipse.cxx b/src/GeomToStep/GeomToStep_MakeEllipse.cxx index 34794facf8..50c2aaeca7 100644 --- a/src/GeomToStep/GeomToStep_MakeEllipse.cxx +++ b/src/GeomToStep/GeomToStep_MakeEllipse.cxx @@ -23,7 +23,7 @@ #include #include #include -#include +#include #include #include #include @@ -32,7 +32,8 @@ //============================================================================= // Creation d'une ellipse de prostep a partir d'une ellipse 3d de gp //============================================================================= -GeomToStep_MakeEllipse::GeomToStep_MakeEllipse( const gp_Elips& E) +GeomToStep_MakeEllipse::GeomToStep_MakeEllipse( const gp_Elips& E, + const StepData_Factors& theLocalFactors) { #include "GeomToStep_MakeEllipse_gen.pxx" } @@ -43,7 +44,8 @@ GeomToStep_MakeEllipse::GeomToStep_MakeEllipse( const gp_Elips& E) // Geom //============================================================================= -GeomToStep_MakeEllipse::GeomToStep_MakeEllipse( const Handle(Geom_Ellipse)& Cer) +GeomToStep_MakeEllipse::GeomToStep_MakeEllipse( const Handle(Geom_Ellipse)& Cer, + const StepData_Factors& theLocalFactors) { gp_Elips E; E = Cer->Elips(); @@ -56,7 +58,8 @@ GeomToStep_MakeEllipse::GeomToStep_MakeEllipse( const Handle(Geom_Ellipse)& Cer) // Geom2d //============================================================================= -GeomToStep_MakeEllipse::GeomToStep_MakeEllipse( const Handle(Geom2d_Ellipse)& Cer) +GeomToStep_MakeEllipse::GeomToStep_MakeEllipse( const Handle(Geom2d_Ellipse)& Cer, + const StepData_Factors& theLocalFactors) { gp_Elips2d E2d; E2d = Cer->Elips2d(); @@ -66,7 +69,7 @@ GeomToStep_MakeEllipse::GeomToStep_MakeEllipse( const Handle(Geom2d_Ellipse)& Ce Handle(StepGeom_Axis2Placement2d) Ax2Step; Standard_Real majorR, minorR; - GeomToStep_MakeAxis2Placement2d MkAxis2(E2d.Axis()); + GeomToStep_MakeAxis2Placement2d MkAxis2(E2d.Axis(), theLocalFactors); Ax2Step = MkAxis2.Value(); majorR = E2d.MajorRadius(); minorR = E2d.MinorRadius(); diff --git a/src/GeomToStep/GeomToStep_MakeEllipse.hxx b/src/GeomToStep/GeomToStep_MakeEllipse.hxx index 9fe86d8ce7..a9b4971eb9 100644 --- a/src/GeomToStep/GeomToStep_MakeEllipse.hxx +++ b/src/GeomToStep/GeomToStep_MakeEllipse.hxx @@ -22,6 +22,8 @@ #include #include + +class StepData_Factors; class StepGeom_Ellipse; class gp_Elips; class Geom_Ellipse; @@ -39,11 +41,14 @@ public: DEFINE_STANDARD_ALLOC - Standard_EXPORT GeomToStep_MakeEllipse(const gp_Elips& C); + Standard_EXPORT GeomToStep_MakeEllipse(const gp_Elips& C, + const StepData_Factors& theLocalFactors); - Standard_EXPORT GeomToStep_MakeEllipse(const Handle(Geom_Ellipse)& C); + Standard_EXPORT GeomToStep_MakeEllipse(const Handle(Geom_Ellipse)& C, + const StepData_Factors& theLocalFactors); - Standard_EXPORT GeomToStep_MakeEllipse(const Handle(Geom2d_Ellipse)& C); + Standard_EXPORT GeomToStep_MakeEllipse(const Handle(Geom2d_Ellipse)& C, + const StepData_Factors& theLocalFactors); Standard_EXPORT const Handle(StepGeom_Ellipse)& Value() const; diff --git a/src/GeomToStep/GeomToStep_MakeEllipse_gen.pxx b/src/GeomToStep/GeomToStep_MakeEllipse_gen.pxx index 38adf96e8a..70a402b902 100644 --- a/src/GeomToStep/GeomToStep_MakeEllipse_gen.pxx +++ b/src/GeomToStep/GeomToStep_MakeEllipse_gen.pxx @@ -19,13 +19,13 @@ Handle(StepGeom_Ellipse) EStep = new StepGeom_Ellipse; Handle(StepGeom_Axis2Placement3d) Ax2Step; Standard_Real majorR, minorR; - GeomToStep_MakeAxis2Placement3d MkAxis2(E.Position()); + GeomToStep_MakeAxis2Placement3d MkAxis2(E.Position(), theLocalFactors); Ax2Step = MkAxis2.Value(); majorR = E.MajorRadius(); minorR = E.MinorRadius(); Ax2.SetValue(Ax2Step); Handle(TCollection_HAsciiString) name = new TCollection_HAsciiString(""); - Standard_Real fact = StepData_GlobalFactors::Intance().LengthFactor(); + Standard_Real fact = theLocalFactors.LengthFactor(); EStep->Init(name, Ax2,majorR/fact,minorR/fact); theEllipse = EStep; done = Standard_True; diff --git a/src/GeomToStep/GeomToStep_MakeHyperbola.cxx b/src/GeomToStep/GeomToStep_MakeHyperbola.cxx index b0247d8a13..d6f1e00b75 100644 --- a/src/GeomToStep/GeomToStep_MakeHyperbola.cxx +++ b/src/GeomToStep/GeomToStep_MakeHyperbola.cxx @@ -20,7 +20,7 @@ #include #include #include -#include +#include #include #include #include @@ -30,7 +30,8 @@ // Creation d'une hyperbola de prostep a partir d'une hyperbola de // Geom2d //============================================================================= -GeomToStep_MakeHyperbola::GeomToStep_MakeHyperbola(const Handle(Geom2d_Hyperbola)& C) +GeomToStep_MakeHyperbola::GeomToStep_MakeHyperbola(const Handle(Geom2d_Hyperbola)& C, + const StepData_Factors& theLocalFactors) { gp_Hypr2d gpHyp; gpHyp = C->Hypr2d(); @@ -40,7 +41,7 @@ GeomToStep_MakeHyperbola::GeomToStep_MakeHyperbola(const Handle(Geom2d_Hyperbola Handle(StepGeom_Axis2Placement2d) Ax2Step; Standard_Real majorR, minorR; - GeomToStep_MakeAxis2Placement2d MkAxis2(gpHyp.Axis()); + GeomToStep_MakeAxis2Placement2d MkAxis2(gpHyp.Axis(), theLocalFactors); Ax2Step = MkAxis2.Value(); majorR = gpHyp.MajorRadius(); minorR = gpHyp.MinorRadius(); @@ -56,7 +57,8 @@ GeomToStep_MakeHyperbola::GeomToStep_MakeHyperbola(const Handle(Geom2d_Hyperbola // Geom //============================================================================= - GeomToStep_MakeHyperbola::GeomToStep_MakeHyperbola(const Handle(Geom_Hyperbola)& C) + GeomToStep_MakeHyperbola::GeomToStep_MakeHyperbola(const Handle(Geom_Hyperbola)& C, + const StepData_Factors& theLocalFactors) { gp_Hypr gpHyp; gpHyp = C->Hypr(); @@ -66,13 +68,13 @@ GeomToStep_MakeHyperbola::GeomToStep_MakeHyperbola(const Handle(Geom2d_Hyperbola Handle(StepGeom_Axis2Placement3d) Ax2Step; Standard_Real majorR, minorR; - GeomToStep_MakeAxis2Placement3d MkAxis2(gpHyp.Position()); + GeomToStep_MakeAxis2Placement3d MkAxis2(gpHyp.Position(), theLocalFactors); Ax2Step = MkAxis2.Value(); majorR = gpHyp.MajorRadius(); minorR = gpHyp.MinorRadius(); Ax2.SetValue(Ax2Step); Handle(TCollection_HAsciiString) name = new TCollection_HAsciiString(""); - Standard_Real fact = StepData_GlobalFactors::Intance().LengthFactor(); + Standard_Real fact = theLocalFactors.LengthFactor(); HStep->Init(name, Ax2,majorR/fact,minorR/fact); theHyperbola = HStep; done = Standard_True; diff --git a/src/GeomToStep/GeomToStep_MakeHyperbola.hxx b/src/GeomToStep/GeomToStep_MakeHyperbola.hxx index 74bc53766d..e42b4be8e4 100644 --- a/src/GeomToStep/GeomToStep_MakeHyperbola.hxx +++ b/src/GeomToStep/GeomToStep_MakeHyperbola.hxx @@ -37,9 +37,11 @@ public: DEFINE_STANDARD_ALLOC - Standard_EXPORT GeomToStep_MakeHyperbola(const Handle(Geom2d_Hyperbola)& C); + Standard_EXPORT GeomToStep_MakeHyperbola(const Handle(Geom2d_Hyperbola)& C, + const StepData_Factors& theLocalFactors); - Standard_EXPORT GeomToStep_MakeHyperbola(const Handle(Geom_Hyperbola)& C); + Standard_EXPORT GeomToStep_MakeHyperbola(const Handle(Geom_Hyperbola)& C, + const StepData_Factors& theLocalFactors); Standard_EXPORT const Handle(StepGeom_Hyperbola)& Value() const; diff --git a/src/GeomToStep/GeomToStep_MakeLine.cxx b/src/GeomToStep/GeomToStep_MakeLine.cxx index f480b372d2..aa47473ed8 100644 --- a/src/GeomToStep/GeomToStep_MakeLine.cxx +++ b/src/GeomToStep/GeomToStep_MakeLine.cxx @@ -25,6 +25,7 @@ #include #include #include +#include #include #include #include @@ -33,7 +34,8 @@ //============================================================================= // Creation d' une line de prostep a partir d' une Lin de gp //============================================================================= -GeomToStep_MakeLine::GeomToStep_MakeLine( const gp_Lin& L) +GeomToStep_MakeLine::GeomToStep_MakeLine( const gp_Lin& L, + const StepData_Factors& theLocalFactors) { #define Vec_gen gp_Vec #include "GeomToStep_MakeLine_gen.pxx" @@ -44,7 +46,8 @@ GeomToStep_MakeLine::GeomToStep_MakeLine( const gp_Lin& L) // Creation d' une line de prostep a partir d' une Lin2d de gp //============================================================================= -GeomToStep_MakeLine::GeomToStep_MakeLine( const gp_Lin2d& L) +GeomToStep_MakeLine::GeomToStep_MakeLine( const gp_Lin2d& L, + const StepData_Factors& theLocalFactors) { #define Vec_gen gp_Vec2d #include "GeomToStep_MakeLine_gen.pxx" @@ -55,7 +58,8 @@ GeomToStep_MakeLine::GeomToStep_MakeLine( const gp_Lin2d& L) // Creation d' une line de prostep a partir d' une Line de Geom //============================================================================= -GeomToStep_MakeLine::GeomToStep_MakeLine ( const Handle(Geom_Line)& Gline) +GeomToStep_MakeLine::GeomToStep_MakeLine ( const Handle(Geom_Line)& Gline, + const StepData_Factors& theLocalFactors) { gp_Lin L; L = Gline->Lin(); @@ -68,7 +72,8 @@ GeomToStep_MakeLine::GeomToStep_MakeLine ( const Handle(Geom_Line)& Gline) // Creation d' une line de prostep a partir d' une Line de Geom2d //============================================================================= -GeomToStep_MakeLine::GeomToStep_MakeLine ( const Handle(Geom2d_Line)& Gline) +GeomToStep_MakeLine::GeomToStep_MakeLine ( const Handle(Geom2d_Line)& Gline, + const StepData_Factors& theLocalFactors) { gp_Lin2d L; L = Gline->Lin2d(); diff --git a/src/GeomToStep/GeomToStep_MakeLine.hxx b/src/GeomToStep/GeomToStep_MakeLine.hxx index 4d22c04c62..d7e6991351 100644 --- a/src/GeomToStep/GeomToStep_MakeLine.hxx +++ b/src/GeomToStep/GeomToStep_MakeLine.hxx @@ -22,6 +22,7 @@ #include #include +class StepData_Factors; class StepGeom_Line; class gp_Lin; class gp_Lin2d; @@ -40,13 +41,17 @@ public: DEFINE_STANDARD_ALLOC - Standard_EXPORT GeomToStep_MakeLine(const gp_Lin& L); + Standard_EXPORT GeomToStep_MakeLine(const gp_Lin& L, + const StepData_Factors& theLocalFactors); - Standard_EXPORT GeomToStep_MakeLine(const gp_Lin2d& L); + Standard_EXPORT GeomToStep_MakeLine(const gp_Lin2d& L, + const StepData_Factors& theLocalFactors); - Standard_EXPORT GeomToStep_MakeLine(const Handle(Geom_Line)& C); + Standard_EXPORT GeomToStep_MakeLine(const Handle(Geom_Line)& C, + const StepData_Factors& theLocalFactors); - Standard_EXPORT GeomToStep_MakeLine(const Handle(Geom2d_Line)& C); + Standard_EXPORT GeomToStep_MakeLine(const Handle(Geom2d_Line)& C, + const StepData_Factors& theLocalFactors); Standard_EXPORT const Handle(StepGeom_Line)& Value() const; diff --git a/src/GeomToStep/GeomToStep_MakeLine_gen.pxx b/src/GeomToStep/GeomToStep_MakeLine_gen.pxx index ab592d3020..424b7d60af 100644 --- a/src/GeomToStep/GeomToStep_MakeLine_gen.pxx +++ b/src/GeomToStep/GeomToStep_MakeLine_gen.pxx @@ -18,8 +18,8 @@ Handle(StepGeom_Line) Lin = new StepGeom_Line; Handle(StepGeom_CartesianPoint) aPnt; Handle(StepGeom_Vector) aDir; - GeomToStep_MakeCartesianPoint MkPoint(L.Location()); - GeomToStep_MakeVector MkVector(Vec_gen(L.Direction())); + GeomToStep_MakeCartesianPoint MkPoint(L.Location(), theLocalFactors.LengthFactor()); + GeomToStep_MakeVector MkVector(Vec_gen(L.Direction()), theLocalFactors); aPnt = MkPoint.Value(); aDir = MkVector.Value(); Handle(TCollection_HAsciiString) name = new TCollection_HAsciiString(""); diff --git a/src/GeomToStep/GeomToStep_MakeParabola.cxx b/src/GeomToStep/GeomToStep_MakeParabola.cxx index 3650201603..38f5c90f6f 100644 --- a/src/GeomToStep/GeomToStep_MakeParabola.cxx +++ b/src/GeomToStep/GeomToStep_MakeParabola.cxx @@ -20,7 +20,7 @@ #include #include #include -#include +#include #include #include #include @@ -30,7 +30,8 @@ // Creation d'une Parabola de prostep a partir d'une Parabola de // Geom2d //============================================================================= -GeomToStep_MakeParabola::GeomToStep_MakeParabola(const Handle(Geom2d_Parabola)& C) +GeomToStep_MakeParabola::GeomToStep_MakeParabola(const Handle(Geom2d_Parabola)& C, + const StepData_Factors& theLocalFactors) { gp_Parab2d gpPar; gpPar = C->Parab2d(); @@ -40,7 +41,7 @@ GeomToStep_MakeParabola::GeomToStep_MakeParabola(const Handle(Geom2d_Parabola)& Handle(StepGeom_Axis2Placement2d) Ax2Step; Standard_Real focal; - GeomToStep_MakeAxis2Placement2d MkAxis2(gpPar.Axis()); + GeomToStep_MakeAxis2Placement2d MkAxis2(gpPar.Axis(), theLocalFactors); Ax2Step = MkAxis2.Value(); focal = gpPar.Focal(); Ax2.SetValue(Ax2Step); @@ -55,7 +56,8 @@ GeomToStep_MakeParabola::GeomToStep_MakeParabola(const Handle(Geom2d_Parabola)& // Geom //============================================================================= - GeomToStep_MakeParabola::GeomToStep_MakeParabola(const Handle(Geom_Parabola)& C) + GeomToStep_MakeParabola::GeomToStep_MakeParabola(const Handle(Geom_Parabola)& C, + const StepData_Factors& theLocalFactors) { gp_Parab gpPar; gpPar = C->Parab(); @@ -65,12 +67,12 @@ GeomToStep_MakeParabola::GeomToStep_MakeParabola(const Handle(Geom2d_Parabola)& Handle(StepGeom_Axis2Placement3d) Ax2Step; Standard_Real focal; - GeomToStep_MakeAxis2Placement3d MkAxis2(gpPar.Position()); + GeomToStep_MakeAxis2Placement3d MkAxis2(gpPar.Position(), theLocalFactors); Ax2Step = MkAxis2.Value(); focal = gpPar.Focal(); Ax2.SetValue(Ax2Step); Handle(TCollection_HAsciiString) name = new TCollection_HAsciiString(""); - PStep->Init(name, Ax2, focal / StepData_GlobalFactors::Intance().LengthFactor()); + PStep->Init(name, Ax2, focal / theLocalFactors.LengthFactor()); theParabola = PStep; done = Standard_True; } diff --git a/src/GeomToStep/GeomToStep_MakeParabola.hxx b/src/GeomToStep/GeomToStep_MakeParabola.hxx index d45e44adf8..78a39b51e4 100644 --- a/src/GeomToStep/GeomToStep_MakeParabola.hxx +++ b/src/GeomToStep/GeomToStep_MakeParabola.hxx @@ -25,6 +25,7 @@ class StepGeom_Parabola; class Geom2d_Parabola; class Geom_Parabola; +class StepData_Factors; //! This class implements the mapping between the class @@ -37,9 +38,11 @@ public: DEFINE_STANDARD_ALLOC - Standard_EXPORT GeomToStep_MakeParabola(const Handle(Geom2d_Parabola)& C); + Standard_EXPORT GeomToStep_MakeParabola(const Handle(Geom2d_Parabola)& C, + const StepData_Factors& theLocalFactors); - Standard_EXPORT GeomToStep_MakeParabola(const Handle(Geom_Parabola)& C); + Standard_EXPORT GeomToStep_MakeParabola(const Handle(Geom_Parabola)& C, + const StepData_Factors& theLocalFactors); Standard_EXPORT const Handle(StepGeom_Parabola)& Value() const; diff --git a/src/GeomToStep/GeomToStep_MakePlane.cxx b/src/GeomToStep/GeomToStep_MakePlane.cxx index 9f4aa34491..1017336fad 100644 --- a/src/GeomToStep/GeomToStep_MakePlane.cxx +++ b/src/GeomToStep/GeomToStep_MakePlane.cxx @@ -27,12 +27,13 @@ //============================================================================= // Creation d' un plane de prostep a partir d' un Pln de gp //============================================================================= -GeomToStep_MakePlane::GeomToStep_MakePlane( const gp_Pln& P) +GeomToStep_MakePlane::GeomToStep_MakePlane( const gp_Pln& P, + const StepData_Factors& theLocalFactors) { Handle(StepGeom_Plane) Plan = new StepGeom_Plane; Handle(StepGeom_Axis2Placement3d) aPosition; - GeomToStep_MakeAxis2Placement3d MkAxis2(P.Position()); + GeomToStep_MakeAxis2Placement3d MkAxis2(P.Position(), theLocalFactors); aPosition = MkAxis2.Value(); Plan->SetPosition(aPosition); Handle(TCollection_HAsciiString) name = new TCollection_HAsciiString(""); @@ -45,7 +46,8 @@ GeomToStep_MakePlane::GeomToStep_MakePlane( const gp_Pln& P) // Creation d' un plane de prostep a partir d' un Plane de Geom //============================================================================= -GeomToStep_MakePlane::GeomToStep_MakePlane( const Handle(Geom_Plane)& Gpln) +GeomToStep_MakePlane::GeomToStep_MakePlane( const Handle(Geom_Plane)& Gpln, + const StepData_Factors& theLocalFactors) { gp_Pln P; Handle(StepGeom_Plane) Plan = new StepGeom_Plane; @@ -53,7 +55,7 @@ GeomToStep_MakePlane::GeomToStep_MakePlane( const Handle(Geom_Plane)& Gpln) P = Gpln->Pln(); - GeomToStep_MakeAxis2Placement3d MkAxis2(P.Position()); + GeomToStep_MakeAxis2Placement3d MkAxis2(P.Position(), theLocalFactors); aPosition = MkAxis2.Value(); Plan->SetPosition(aPosition); Handle(TCollection_HAsciiString) name = new TCollection_HAsciiString(""); diff --git a/src/GeomToStep/GeomToStep_MakePlane.hxx b/src/GeomToStep/GeomToStep_MakePlane.hxx index ef42f84646..cc6a772371 100644 --- a/src/GeomToStep/GeomToStep_MakePlane.hxx +++ b/src/GeomToStep/GeomToStep_MakePlane.hxx @@ -22,6 +22,7 @@ #include #include +class StepData_Factors; class StepGeom_Plane; class gp_Pln; class Geom_Plane; @@ -38,9 +39,11 @@ public: DEFINE_STANDARD_ALLOC - Standard_EXPORT GeomToStep_MakePlane(const gp_Pln& P); + Standard_EXPORT GeomToStep_MakePlane(const gp_Pln& P, + const StepData_Factors& theLocalFactors); - Standard_EXPORT GeomToStep_MakePlane(const Handle(Geom_Plane)& P); + Standard_EXPORT GeomToStep_MakePlane(const Handle(Geom_Plane)& P, + const StepData_Factors& theLocalFactors); Standard_EXPORT const Handle(StepGeom_Plane)& Value() const; diff --git a/src/GeomToStep/GeomToStep_MakePolyline.cxx b/src/GeomToStep/GeomToStep_MakePolyline.cxx index 48afe4d030..81069a7e50 100644 --- a/src/GeomToStep/GeomToStep_MakePolyline.cxx +++ b/src/GeomToStep/GeomToStep_MakePolyline.cxx @@ -20,6 +20,7 @@ #include #include #include +#include #include #include #include @@ -28,7 +29,8 @@ //============================================================================= // Creation d' une polyline Step a partir d' une Array1OfPnt //============================================================================= -GeomToStep_MakePolyline::GeomToStep_MakePolyline( const TColgp_Array1OfPnt& P) +GeomToStep_MakePolyline::GeomToStep_MakePolyline( const TColgp_Array1OfPnt& P, + const StepData_Factors& theLocalFactors) { gp_Pnt P1; #include "GeomToStep_MakePolyline_gen.pxx" @@ -38,7 +40,8 @@ GeomToStep_MakePolyline::GeomToStep_MakePolyline( const TColgp_Array1OfPnt& P) // Creation d' une polyline Step a partir d' une Array1OfPnt2d //============================================================================= -GeomToStep_MakePolyline::GeomToStep_MakePolyline( const TColgp_Array1OfPnt2d& P) +GeomToStep_MakePolyline::GeomToStep_MakePolyline( const TColgp_Array1OfPnt2d& P, + const StepData_Factors& theLocalFactors) { gp_Pnt2d P1; #include "GeomToStep_MakePolyline_gen.pxx" diff --git a/src/GeomToStep/GeomToStep_MakePolyline.hxx b/src/GeomToStep/GeomToStep_MakePolyline.hxx index 594c75720b..80635bf719 100644 --- a/src/GeomToStep/GeomToStep_MakePolyline.hxx +++ b/src/GeomToStep/GeomToStep_MakePolyline.hxx @@ -24,6 +24,8 @@ #include #include #include + +class StepData_Factors; class StepGeom_Polyline; @@ -36,9 +38,11 @@ public: DEFINE_STANDARD_ALLOC - Standard_EXPORT GeomToStep_MakePolyline(const TColgp_Array1OfPnt& P); + Standard_EXPORT GeomToStep_MakePolyline(const TColgp_Array1OfPnt& P, + const StepData_Factors& theLocalFactors); - Standard_EXPORT GeomToStep_MakePolyline(const TColgp_Array1OfPnt2d& P); + Standard_EXPORT GeomToStep_MakePolyline(const TColgp_Array1OfPnt2d& P, + const StepData_Factors& theLocalFactors); Standard_EXPORT const Handle(StepGeom_Polyline)& Value() const; diff --git a/src/GeomToStep/GeomToStep_MakePolyline_gen.pxx b/src/GeomToStep/GeomToStep_MakePolyline_gen.pxx index 48b8d20205..4b7639ee95 100644 --- a/src/GeomToStep/GeomToStep_MakePolyline_gen.pxx +++ b/src/GeomToStep/GeomToStep_MakePolyline_gen.pxx @@ -22,7 +22,7 @@ Standard_Integer N, i; aPoints = new StepGeom_HArray1OfCartesianPoint(1,N); for (i=P.Lower(); i<=P.Upper(); i++) { P1 = P.Value(i); - GeomToStep_MakeCartesianPoint MkPoint(P1); + GeomToStep_MakeCartesianPoint MkPoint(P1, theLocalFactors.LengthFactor()); P2 = MkPoint.Value(); aPoints->SetValue(i,P2); } diff --git a/src/GeomToStep/GeomToStep_MakeRectangularTrimmedSurface.cxx b/src/GeomToStep/GeomToStep_MakeRectangularTrimmedSurface.cxx index fa50eb6314..9c9259f329 100644 --- a/src/GeomToStep/GeomToStep_MakeRectangularTrimmedSurface.cxx +++ b/src/GeomToStep/GeomToStep_MakeRectangularTrimmedSurface.cxx @@ -25,7 +25,7 @@ #include #include #include -#include +#include #include #include #include @@ -36,15 +36,15 @@ //============================================================================= GeomToStep_MakeRectangularTrimmedSurface:: GeomToStep_MakeRectangularTrimmedSurface( const - Handle(Geom_RectangularTrimmedSurface)& RTSurf ) - + Handle(Geom_RectangularTrimmedSurface)& RTSurf, + const StepData_Factors& theLocalFactors) { Handle(StepGeom_RectangularTrimmedSurface) StepRTS = new StepGeom_RectangularTrimmedSurface; Handle(TCollection_HAsciiString) aName = new TCollection_HAsciiString(""); - GeomToStep_MakeSurface mkSurf(RTSurf->BasisSurface()); + GeomToStep_MakeSurface mkSurf(RTSurf->BasisSurface(), theLocalFactors); if (!mkSurf.IsDone()) { done = Standard_False; return; @@ -61,7 +61,7 @@ GeomToStep_MakeRectangularTrimmedSurface:: Standard_Real AngleFact = 180./M_PI; Standard_Real uFact = 1.; Standard_Real vFact = 1.; - Standard_Real LengthFact = StepData_GlobalFactors::Intance().LengthFactor(); + Standard_Real LengthFact = theLocalFactors.LengthFactor(); Handle(Geom_Surface) theSurf = RTSurf->BasisSurface(); if (theSurf->IsKind(STANDARD_TYPE(Geom_CylindricalSurface))) { uFact = AngleFact; diff --git a/src/GeomToStep/GeomToStep_MakeRectangularTrimmedSurface.hxx b/src/GeomToStep/GeomToStep_MakeRectangularTrimmedSurface.hxx index 646023c5ca..68832c62d5 100644 --- a/src/GeomToStep/GeomToStep_MakeRectangularTrimmedSurface.hxx +++ b/src/GeomToStep/GeomToStep_MakeRectangularTrimmedSurface.hxx @@ -22,6 +22,8 @@ #include #include + +class StepData_Factors; class StepGeom_RectangularTrimmedSurface; class Geom_RectangularTrimmedSurface; @@ -38,7 +40,8 @@ public: DEFINE_STANDARD_ALLOC - Standard_EXPORT GeomToStep_MakeRectangularTrimmedSurface(const Handle(Geom_RectangularTrimmedSurface)& RTSurf); + Standard_EXPORT GeomToStep_MakeRectangularTrimmedSurface(const Handle(Geom_RectangularTrimmedSurface)& RTSurf, + const StepData_Factors& theLocalFactors); Standard_EXPORT const Handle(StepGeom_RectangularTrimmedSurface)& Value() const; diff --git a/src/GeomToStep/GeomToStep_MakeSphericalSurface.cxx b/src/GeomToStep/GeomToStep_MakeSphericalSurface.cxx index 404b5e4b39..73606ac5ed 100644 --- a/src/GeomToStep/GeomToStep_MakeSphericalSurface.cxx +++ b/src/GeomToStep/GeomToStep_MakeSphericalSurface.cxx @@ -19,29 +19,29 @@ #include #include #include +#include #include #include #include -#include //============================================================================= // Creation d' une conical_surface de prostep a partir d' une SphericalSurface // de Geom //============================================================================= GeomToStep_MakeSphericalSurface::GeomToStep_MakeSphericalSurface - ( const Handle(Geom_SphericalSurface)& S ) - + ( const Handle(Geom_SphericalSurface)& S, + const StepData_Factors& theLocalFactors) { Handle(StepGeom_SphericalSurface) Surf; Handle(StepGeom_Axis2Placement3d) aPosition; Standard_Real aRadius; - GeomToStep_MakeAxis2Placement3d MkAxis2(S->Position()); + GeomToStep_MakeAxis2Placement3d MkAxis2(S->Position(), theLocalFactors); aPosition = MkAxis2.Value(); aRadius = S->Radius(); Surf = new StepGeom_SphericalSurface; Handle(TCollection_HAsciiString) name = new TCollection_HAsciiString(""); - Surf->Init(name, aPosition, aRadius/ StepData_GlobalFactors::Intance().LengthFactor()); + Surf->Init(name, aPosition, aRadius/ theLocalFactors.LengthFactor()); theSphericalSurface = Surf; done = Standard_True; } diff --git a/src/GeomToStep/GeomToStep_MakeSphericalSurface.hxx b/src/GeomToStep/GeomToStep_MakeSphericalSurface.hxx index ed534d4b4a..9f1697e000 100644 --- a/src/GeomToStep/GeomToStep_MakeSphericalSurface.hxx +++ b/src/GeomToStep/GeomToStep_MakeSphericalSurface.hxx @@ -22,6 +22,8 @@ #include #include + +class StepData_Factors; class StepGeom_SphericalSurface; class Geom_SphericalSurface; @@ -37,7 +39,8 @@ public: DEFINE_STANDARD_ALLOC - Standard_EXPORT GeomToStep_MakeSphericalSurface(const Handle(Geom_SphericalSurface)& CSurf); + Standard_EXPORT GeomToStep_MakeSphericalSurface(const Handle(Geom_SphericalSurface)& CSurf, + const StepData_Factors& theLocalFactors); Standard_EXPORT const Handle(StepGeom_SphericalSurface)& Value() const; diff --git a/src/GeomToStep/GeomToStep_MakeSurface.cxx b/src/GeomToStep/GeomToStep_MakeSurface.cxx index 30477d77f6..63d9232508 100644 --- a/src/GeomToStep/GeomToStep_MakeSurface.cxx +++ b/src/GeomToStep/GeomToStep_MakeSurface.cxx @@ -26,47 +26,48 @@ #include #include #include +#include #include #include #include #include #include #include -#include //============================================================================= // Creation d' une Surface de prostep a partir d' une Surface de Geom //============================================================================= -GeomToStep_MakeSurface::GeomToStep_MakeSurface ( const Handle(Geom_Surface)& S) +GeomToStep_MakeSurface::GeomToStep_MakeSurface ( const Handle(Geom_Surface)& S, + const StepData_Factors& theLocalFactors) { done = Standard_True; if (S->IsKind(STANDARD_TYPE(Geom_BoundedSurface))) { Handle(Geom_BoundedSurface) S1 = Handle(Geom_BoundedSurface)::DownCast(S); - GeomToStep_MakeBoundedSurface MkBoundedS(S1); + GeomToStep_MakeBoundedSurface MkBoundedS(S1, theLocalFactors); theSurface = MkBoundedS.Value(); } else if (S->IsKind(STANDARD_TYPE(Geom_ElementarySurface))) { Handle(Geom_ElementarySurface) S1 = Handle(Geom_ElementarySurface)::DownCast(S); - GeomToStep_MakeElementarySurface MkElementaryS(S1); + GeomToStep_MakeElementarySurface MkElementaryS(S1, theLocalFactors); theSurface = MkElementaryS.Value(); } else if (S->IsKind(STANDARD_TYPE(Geom_SweptSurface))) { Handle(Geom_SweptSurface) S1 = Handle(Geom_SweptSurface)::DownCast(S); - GeomToStep_MakeSweptSurface MkSwept(S1); + GeomToStep_MakeSweptSurface MkSwept(S1, theLocalFactors); theSurface = MkSwept.Value(); } else if (S->IsKind(STANDARD_TYPE(Geom_OffsetSurface))) { Handle(Geom_OffsetSurface) S1 = Handle(Geom_OffsetSurface)::DownCast(S); - GeomToStep_MakeSurface MkBasis(S1->BasisSurface()); + GeomToStep_MakeSurface MkBasis(S1->BasisSurface(), theLocalFactors); done = MkBasis.IsDone(); if (!done) return; Handle(StepGeom_OffsetSurface) Surf = new StepGeom_OffsetSurface; Surf->Init (new TCollection_HAsciiString(""), - MkBasis.Value(),S1->Offset()/ StepData_GlobalFactors::Intance().LengthFactor(),StepData_LFalse); + MkBasis.Value(),S1->Offset()/ theLocalFactors.LengthFactor(),StepData_LFalse); theSurface = Surf; } else { diff --git a/src/GeomToStep/GeomToStep_MakeSurface.hxx b/src/GeomToStep/GeomToStep_MakeSurface.hxx index 52b36eee6d..7ff59b1858 100644 --- a/src/GeomToStep/GeomToStep_MakeSurface.hxx +++ b/src/GeomToStep/GeomToStep_MakeSurface.hxx @@ -22,6 +22,8 @@ #include #include + +class StepData_Factors; class StepGeom_Surface; class Geom_Surface; @@ -37,7 +39,8 @@ public: DEFINE_STANDARD_ALLOC - Standard_EXPORT GeomToStep_MakeSurface(const Handle(Geom_Surface)& C); + Standard_EXPORT GeomToStep_MakeSurface(const Handle(Geom_Surface)& C, + const StepData_Factors& theLocalFactors); Standard_EXPORT const Handle(StepGeom_Surface)& Value() const; diff --git a/src/GeomToStep/GeomToStep_MakeSurfaceOfLinearExtrusion.cxx b/src/GeomToStep/GeomToStep_MakeSurfaceOfLinearExtrusion.cxx index 2a33ec167b..f6fad7cdd7 100644 --- a/src/GeomToStep/GeomToStep_MakeSurfaceOfLinearExtrusion.cxx +++ b/src/GeomToStep/GeomToStep_MakeSurfaceOfLinearExtrusion.cxx @@ -21,6 +21,7 @@ #include #include #include +#include #include #include #include @@ -31,15 +32,15 @@ // SurfaceOfLinearExtrusion de Geom //============================================================================= GeomToStep_MakeSurfaceOfLinearExtrusion::GeomToStep_MakeSurfaceOfLinearExtrusion - ( const Handle(Geom_SurfaceOfLinearExtrusion)& S ) - + ( const Handle(Geom_SurfaceOfLinearExtrusion)& S, + const StepData_Factors& theLocalFactors) { Handle(StepGeom_SurfaceOfLinearExtrusion) Surf; Handle(StepGeom_Curve) aSweptCurve; Handle(StepGeom_Vector) aExtrusionAxis; - GeomToStep_MakeCurve MkCurve(S->BasisCurve()); - GeomToStep_MakeVector MkVector(gp_Vec(S->Direction())); + GeomToStep_MakeCurve MkCurve(S->BasisCurve(), theLocalFactors); + GeomToStep_MakeVector MkVector(gp_Vec(S->Direction()), theLocalFactors); aSweptCurve = MkCurve.Value(); aExtrusionAxis = MkVector.Value(); diff --git a/src/GeomToStep/GeomToStep_MakeSurfaceOfLinearExtrusion.hxx b/src/GeomToStep/GeomToStep_MakeSurfaceOfLinearExtrusion.hxx index c2a7c9e8f7..85774c5032 100644 --- a/src/GeomToStep/GeomToStep_MakeSurfaceOfLinearExtrusion.hxx +++ b/src/GeomToStep/GeomToStep_MakeSurfaceOfLinearExtrusion.hxx @@ -22,6 +22,8 @@ #include #include + +class StepData_Factors; class StepGeom_SurfaceOfLinearExtrusion; class Geom_SurfaceOfLinearExtrusion; @@ -37,7 +39,8 @@ public: DEFINE_STANDARD_ALLOC - Standard_EXPORT GeomToStep_MakeSurfaceOfLinearExtrusion(const Handle(Geom_SurfaceOfLinearExtrusion)& CSurf); + Standard_EXPORT GeomToStep_MakeSurfaceOfLinearExtrusion(const Handle(Geom_SurfaceOfLinearExtrusion)& CSurf, + const StepData_Factors& theLocalFactors); Standard_EXPORT const Handle(StepGeom_SurfaceOfLinearExtrusion)& Value() const; diff --git a/src/GeomToStep/GeomToStep_MakeSurfaceOfRevolution.cxx b/src/GeomToStep/GeomToStep_MakeSurfaceOfRevolution.cxx index 8f8bc1d59f..e8ab246328 100644 --- a/src/GeomToStep/GeomToStep_MakeSurfaceOfRevolution.cxx +++ b/src/GeomToStep/GeomToStep_MakeSurfaceOfRevolution.cxx @@ -20,6 +20,7 @@ #include #include #include +#include #include #include #include @@ -30,15 +31,15 @@ // SurfaceOfRevolution de Geom //============================================================================= GeomToStep_MakeSurfaceOfRevolution::GeomToStep_MakeSurfaceOfRevolution - ( const Handle(Geom_SurfaceOfRevolution)& S ) - + ( const Handle(Geom_SurfaceOfRevolution)& S, + const StepData_Factors& theLocalFactors) { Handle(StepGeom_SurfaceOfRevolution) Surf; Handle(StepGeom_Curve) aSweptCurve; Handle(StepGeom_Axis1Placement) aAxisPosition; - GeomToStep_MakeCurve MkSwept(S->BasisCurve()); - GeomToStep_MakeAxis1Placement MkAxis1(S->Axis()); + GeomToStep_MakeCurve MkSwept(S->BasisCurve(), theLocalFactors); + GeomToStep_MakeAxis1Placement MkAxis1(S->Axis(), theLocalFactors); aSweptCurve = MkSwept.Value(); aAxisPosition = MkAxis1.Value(); Surf = new StepGeom_SurfaceOfRevolution; diff --git a/src/GeomToStep/GeomToStep_MakeSurfaceOfRevolution.hxx b/src/GeomToStep/GeomToStep_MakeSurfaceOfRevolution.hxx index 4790ef0eb7..2caa134add 100644 --- a/src/GeomToStep/GeomToStep_MakeSurfaceOfRevolution.hxx +++ b/src/GeomToStep/GeomToStep_MakeSurfaceOfRevolution.hxx @@ -22,6 +22,8 @@ #include #include + +class StepData_Factors; class StepGeom_SurfaceOfRevolution; class Geom_SurfaceOfRevolution; @@ -37,7 +39,8 @@ public: DEFINE_STANDARD_ALLOC - Standard_EXPORT GeomToStep_MakeSurfaceOfRevolution(const Handle(Geom_SurfaceOfRevolution)& RevSurf); + Standard_EXPORT GeomToStep_MakeSurfaceOfRevolution(const Handle(Geom_SurfaceOfRevolution)& RevSurf, + const StepData_Factors& theLocalFactors); Standard_EXPORT const Handle(StepGeom_SurfaceOfRevolution)& Value() const; diff --git a/src/GeomToStep/GeomToStep_MakeSweptSurface.cxx b/src/GeomToStep/GeomToStep_MakeSweptSurface.cxx index 2020724305..f1fde84ce9 100644 --- a/src/GeomToStep/GeomToStep_MakeSweptSurface.cxx +++ b/src/GeomToStep/GeomToStep_MakeSweptSurface.cxx @@ -22,6 +22,7 @@ #include #include #include +#include #include #include #include @@ -32,19 +33,20 @@ // SweptSurface de Geom //============================================================================= GeomToStep_MakeSweptSurface::GeomToStep_MakeSweptSurface - ( const Handle(Geom_SweptSurface)& S) + ( const Handle(Geom_SweptSurface)& S, + const StepData_Factors& theLocalFactors) { done = Standard_True; if (S->IsKind(STANDARD_TYPE(Geom_SurfaceOfLinearExtrusion))) { Handle(Geom_SurfaceOfLinearExtrusion) Sur = Handle(Geom_SurfaceOfLinearExtrusion)::DownCast(S); - GeomToStep_MakeSurfaceOfLinearExtrusion MkLinear(Sur); + GeomToStep_MakeSurfaceOfLinearExtrusion MkLinear(Sur, theLocalFactors); theSweptSurface = MkLinear.Value(); } else if (S->IsKind(STANDARD_TYPE(Geom_SurfaceOfRevolution))) { Handle(Geom_SurfaceOfRevolution) Sur = Handle(Geom_SurfaceOfRevolution)::DownCast(S); - GeomToStep_MakeSurfaceOfRevolution MkRevol(Sur); + GeomToStep_MakeSurfaceOfRevolution MkRevol(Sur, theLocalFactors); theSweptSurface = MkRevol.Value(); } else diff --git a/src/GeomToStep/GeomToStep_MakeSweptSurface.hxx b/src/GeomToStep/GeomToStep_MakeSweptSurface.hxx index c00d636f18..4406e140f1 100644 --- a/src/GeomToStep/GeomToStep_MakeSweptSurface.hxx +++ b/src/GeomToStep/GeomToStep_MakeSweptSurface.hxx @@ -22,6 +22,8 @@ #include #include + +class StepData_Factors; class StepGeom_SweptSurface; class Geom_SweptSurface; @@ -38,7 +40,8 @@ public: DEFINE_STANDARD_ALLOC - Standard_EXPORT GeomToStep_MakeSweptSurface(const Handle(Geom_SweptSurface)& S); + Standard_EXPORT GeomToStep_MakeSweptSurface(const Handle(Geom_SweptSurface)& S, + const StepData_Factors& theLocalFactors); Standard_EXPORT const Handle(StepGeom_SweptSurface)& Value() const; diff --git a/src/GeomToStep/GeomToStep_MakeToroidalSurface.cxx b/src/GeomToStep/GeomToStep_MakeToroidalSurface.cxx index 08d6466e98..37754db1ee 100644 --- a/src/GeomToStep/GeomToStep_MakeToroidalSurface.cxx +++ b/src/GeomToStep/GeomToStep_MakeToroidalSurface.cxx @@ -19,29 +19,29 @@ #include #include #include +#include #include #include -#include //============================================================================= // Creation d' une toroidal_surface de prostep a partir d' une ToroidalSurface // de Geom //============================================================================= GeomToStep_MakeToroidalSurface::GeomToStep_MakeToroidalSurface - ( const Handle(Geom_ToroidalSurface)& S ) - + ( const Handle(Geom_ToroidalSurface)& S, + const StepData_Factors& theLocalFactors) { Handle(StepGeom_ToroidalSurface) Surf; Handle(StepGeom_Axis2Placement3d) aPosition; Standard_Real aMajorRadius, aMinorRadius; - GeomToStep_MakeAxis2Placement3d MkAxis2(S->Position()); + GeomToStep_MakeAxis2Placement3d MkAxis2(S->Position(), theLocalFactors); aPosition = MkAxis2.Value(); aMajorRadius = S->MajorRadius(); aMinorRadius = S->MinorRadius(); Surf = new StepGeom_ToroidalSurface; Handle(TCollection_HAsciiString) name = new TCollection_HAsciiString(""); - Standard_Real fact = StepData_GlobalFactors::Intance().LengthFactor(); + Standard_Real fact = theLocalFactors.LengthFactor(); Surf->Init(name, aPosition, aMajorRadius/fact, aMinorRadius/fact); theToroidalSurface = Surf; done = Standard_True; diff --git a/src/GeomToStep/GeomToStep_MakeToroidalSurface.hxx b/src/GeomToStep/GeomToStep_MakeToroidalSurface.hxx index ff77f4315e..386ec139ef 100644 --- a/src/GeomToStep/GeomToStep_MakeToroidalSurface.hxx +++ b/src/GeomToStep/GeomToStep_MakeToroidalSurface.hxx @@ -22,6 +22,8 @@ #include #include + +class StepData_Factors; class StepGeom_ToroidalSurface; class Geom_ToroidalSurface; @@ -37,7 +39,8 @@ public: DEFINE_STANDARD_ALLOC - Standard_EXPORT GeomToStep_MakeToroidalSurface(const Handle(Geom_ToroidalSurface)& TorSurf); + Standard_EXPORT GeomToStep_MakeToroidalSurface(const Handle(Geom_ToroidalSurface)& TorSurf, + const StepData_Factors& theLocalFactors); Standard_EXPORT const Handle(StepGeom_ToroidalSurface)& Value() const; diff --git a/src/GeomToStep/GeomToStep_MakeVector.cxx b/src/GeomToStep/GeomToStep_MakeVector.cxx index 85729b167e..db91850f65 100644 --- a/src/GeomToStep/GeomToStep_MakeVector.cxx +++ b/src/GeomToStep/GeomToStep_MakeVector.cxx @@ -24,25 +24,28 @@ #include #include #include -#include +#include #include #include //============================================================================= // Creation d' un vector de prostep a partir d' un Vec de gp //============================================================================= -GeomToStep_MakeVector::GeomToStep_MakeVector( const gp_Vec& V) +GeomToStep_MakeVector::GeomToStep_MakeVector( const gp_Vec& V, + const StepData_Factors& theLocalFactors) { gp_Dir D = gp_Dir(V); - Standard_Real lFactor = StepData_GlobalFactors::Intance().LengthFactor(); + Standard_Real lFactor = theLocalFactors.LengthFactor(); #include "GeomToStep_MakeVector_gen.pxx" } //============================================================================= // Creation d' un vector de prostep a partir d' un Vec2d de gp //============================================================================= -GeomToStep_MakeVector::GeomToStep_MakeVector( const gp_Vec2d& V) +GeomToStep_MakeVector::GeomToStep_MakeVector( const gp_Vec2d& V, + const StepData_Factors& theLocalFactors) { + (void)theLocalFactors; gp_Dir2d D = gp_Dir2d(V); Standard_Real lFactor = 1.; #include "GeomToStep_MakeVector_gen.pxx" @@ -52,13 +55,13 @@ GeomToStep_MakeVector::GeomToStep_MakeVector( const gp_Vec2d& V) // Creation d' un vector de prostep a partir d' un Vector de Geom //============================================================================= -GeomToStep_MakeVector::GeomToStep_MakeVector ( const Handle(Geom_Vector)& - GVector) +GeomToStep_MakeVector::GeomToStep_MakeVector ( const Handle(Geom_Vector)& GVector, + const StepData_Factors& theLocalFactors) { gp_Vec V; V = GVector->Vec(); gp_Dir D = gp_Dir(V); - Standard_Real lFactor = StepData_GlobalFactors::Intance().LengthFactor(); + Standard_Real lFactor = theLocalFactors.LengthFactor(); #include "GeomToStep_MakeVector_gen.pxx" } @@ -66,9 +69,10 @@ GeomToStep_MakeVector::GeomToStep_MakeVector ( const Handle(Geom_Vector)& // Creation d' un vector de prostep a partir d' un Vector de Geom2d //============================================================================= -GeomToStep_MakeVector::GeomToStep_MakeVector ( const Handle(Geom2d_Vector)& - GVector) +GeomToStep_MakeVector::GeomToStep_MakeVector ( const Handle(Geom2d_Vector)& GVector, + const StepData_Factors& theLocalFactors) { + (void)theLocalFactors; gp_Vec2d V; V = GVector->Vec2d(); gp_Dir2d D = gp_Dir2d(V); diff --git a/src/GeomToStep/GeomToStep_MakeVector.hxx b/src/GeomToStep/GeomToStep_MakeVector.hxx index 52f09ad3f2..286e0107cd 100644 --- a/src/GeomToStep/GeomToStep_MakeVector.hxx +++ b/src/GeomToStep/GeomToStep_MakeVector.hxx @@ -22,6 +22,8 @@ #include #include + +class StepData_Factors; class StepGeom_Vector; class gp_Vec; class gp_Vec2d; @@ -40,13 +42,17 @@ public: DEFINE_STANDARD_ALLOC - Standard_EXPORT GeomToStep_MakeVector(const gp_Vec& V); + Standard_EXPORT GeomToStep_MakeVector(const gp_Vec& V, + const StepData_Factors& theLocalFactors); - Standard_EXPORT GeomToStep_MakeVector(const gp_Vec2d& V); + Standard_EXPORT GeomToStep_MakeVector(const gp_Vec2d& V, + const StepData_Factors& theLocalFactors); - Standard_EXPORT GeomToStep_MakeVector(const Handle(Geom_Vector)& V); + Standard_EXPORT GeomToStep_MakeVector(const Handle(Geom_Vector)& V, + const StepData_Factors& theLocalFactors); - Standard_EXPORT GeomToStep_MakeVector(const Handle(Geom2d_Vector)& V); + Standard_EXPORT GeomToStep_MakeVector(const Handle(Geom2d_Vector)& V, + const StepData_Factors& theLocalFactors); Standard_EXPORT const Handle(StepGeom_Vector)& Value() const; diff --git a/src/STEPCAFControl/STEPCAFControl_Controller.cxx b/src/STEPCAFControl/STEPCAFControl_Controller.cxx index 1b5d41463a..094a1d014f 100644 --- a/src/STEPCAFControl/STEPCAFControl_Controller.cxx +++ b/src/STEPCAFControl/STEPCAFControl_Controller.cxx @@ -39,9 +39,13 @@ STEPCAFControl_Controller::STEPCAFControl_Controller () Standard_Boolean STEPCAFControl_Controller::Init () { - static Standard_Boolean inic = Standard_False; - if (inic) return Standard_True; - inic = Standard_True; + static Standard_Mutex theMutex; + { + Standard_Mutex::Sentry aSentry(theMutex); + static Standard_Boolean inic = Standard_False; + if (inic) return Standard_True; + inic = Standard_True; + } // self-registering Handle(STEPCAFControl_Controller) STEPCTL = new STEPCAFControl_Controller; // do XSAlgo::Init, cause it does not called before. diff --git a/src/STEPCAFControl/STEPCAFControl_Reader.cxx b/src/STEPCAFControl/STEPCAFControl_Reader.cxx index 1460a6a8d0..3b843cb506 100644 --- a/src/STEPCAFControl/STEPCAFControl_Reader.cxx +++ b/src/STEPCAFControl/STEPCAFControl_Reader.cxx @@ -40,7 +40,6 @@ #include #include #include -#include #include #include #include @@ -55,6 +54,7 @@ #include #include #include +#include #include #include #include @@ -499,7 +499,8 @@ static void FillShapesMap(const TopoDS_Shape &S, TopTools_MapOfShape &map) //purpose : //======================================================================= void STEPCAFControl_Reader::prepareUnits(const Handle(StepData_StepModel)& theModel, - const Handle(TDocStd_Document)& theDoc) const + const Handle(TDocStd_Document)& theDoc, + StepData_Factors& theLocalFactors) const { Standard_Real aScaleFactorMM = 1.; if (!XCAFDoc_DocumentTool::GetLengthUnit(theDoc, aScaleFactorMM, UnitsMethods_LengthUnit_Millimeter)) @@ -509,6 +510,7 @@ void STEPCAFControl_Reader::prepareUnits(const Handle(StepData_StepModel)& theMo // Sets length unit to the document XCAFDoc_DocumentTool::SetLengthUnit(theDoc, aScaleFactorMM, UnitsMethods_LengthUnit_Millimeter); } + theLocalFactors.SetCascadeUnit(aScaleFactorMM); theModel->SetLocalLengthUnit(aScaleFactorMM); } @@ -526,7 +528,8 @@ Standard_Boolean STEPCAFControl_Reader::Transfer (STEPControl_Reader &reader, { reader.ClearShapes(); Handle(StepData_StepModel) aModel = Handle(StepData_StepModel)::DownCast(reader.Model()); - prepareUnits(aModel, doc); + StepData_Factors aLocalFactors; + prepareUnits(aModel, doc, aLocalFactors); Standard_Integer i; // Read all shapes @@ -692,7 +695,7 @@ Standard_Boolean STEPCAFControl_Reader::Transfer (STEPControl_Reader &reader, // read colors if (GetColorMode()) - ReadColors(reader.WS(), doc); + ReadColors(reader.WS(), doc, aLocalFactors); // read names if (GetNameMode()) @@ -700,7 +703,7 @@ Standard_Boolean STEPCAFControl_Reader::Transfer (STEPControl_Reader &reader, // read validation props if (GetPropsMode()) - ReadValProps(reader.WS(), doc, PDFileMap); + ReadValProps(reader.WS(), doc, PDFileMap, aLocalFactors); // read layers if (GetLayerMode()) @@ -712,15 +715,15 @@ Standard_Boolean STEPCAFControl_Reader::Transfer (STEPControl_Reader &reader, // read GDT entities from STEP model if (GetGDTMode()) - ReadGDTs(reader.WS(), doc); + ReadGDTs(reader.WS(), doc, aLocalFactors); // read Material entities from STEP model if (GetMatMode()) - ReadMaterials(reader.WS(), doc, SeqPDS); + ReadMaterials(reader.WS(), doc, SeqPDS, aLocalFactors); // read View entities from STEP model if (GetViewMode()) - ReadViews(reader.WS(), doc); + ReadViews(reader.WS(), doc, aLocalFactors); // Expand resulting CAF structure for sub-shapes (optionally with their // names) if requested @@ -950,7 +953,8 @@ static void propagateColorToParts(const Handle(XCAFDoc_ShapeTool)& theSTool, static void SetAssemblyComponentStyle(const Handle(Transfer_TransientProcess) &theTP, const Handle(XCAFDoc_ColorTool)& theCTool, const STEPConstruct_Styles& theStyles, - const Handle(StepVisual_ContextDependentOverRidingStyledItem)& theStyle) + const Handle(StepVisual_ContextDependentOverRidingStyledItem)& theStyle, + const StepData_Factors& theLocalFactors) { if (theStyle.IsNull()) return; @@ -1004,8 +1008,8 @@ static void SetAssemblyComponentStyle(const Handle(Transfer_TransientProcess) &t if(!anAxp1.IsNull() && !anAxp2.IsNull()) { - Handle(Geom_Axis2Placement) anOrig = StepToGeom::MakeAxis2Placement (anAxp1); - Handle(Geom_Axis2Placement) aTarg = StepToGeom::MakeAxis2Placement (anAxp2); + Handle(Geom_Axis2Placement) anOrig = StepToGeom::MakeAxis2Placement (anAxp1, theLocalFactors); + Handle(Geom_Axis2Placement) aTarg = StepToGeom::MakeAxis2Placement (anAxp2, theLocalFactors); gp_Ax3 anAx3Orig(anOrig->Ax2()); gp_Ax3 anAx3Targ(aTarg->Ax2()); @@ -1056,17 +1060,18 @@ static void SetStyle(const Handle(XSControl_WorkSession) &theWS, const Handle(XCAFDoc_ShapeTool)& theSTool, const STEPConstruct_Styles& theStyles, const Handle(TColStd_HSequenceOfTransient)& theHSeqOfInvisStyle, - const Handle(StepVisual_StyledItem)& theStyle) + const Handle(StepVisual_StyledItem)& theStyle, + const StepData_Factors& theLocalFactors) { if (theStyle.IsNull()) return; const Handle(Transfer_TransientProcess) &aTP = theWS->TransferReader()->TransientProcess(); if (Handle(StepVisual_OverRidingStyledItem) anOverridingStyle = Handle(StepVisual_OverRidingStyledItem)::DownCast (theStyle)) { - SetStyle (theWS, theMap, theCTool, theSTool, theStyles, theHSeqOfInvisStyle, anOverridingStyle->OverRiddenStyle ()); + SetStyle (theWS, theMap, theCTool, theSTool, theStyles, theHSeqOfInvisStyle, anOverridingStyle->OverRiddenStyle (), theLocalFactors); if (Handle(StepVisual_ContextDependentOverRidingStyledItem) anAssemblyComponentStyle = Handle(StepVisual_ContextDependentOverRidingStyledItem)::DownCast (theStyle)) { - SetAssemblyComponentStyle (aTP, theCTool, theStyles,anAssemblyComponentStyle); + SetAssemblyComponentStyle (aTP, theCTool, theStyles,anAssemblyComponentStyle, theLocalFactors); return; } } @@ -1247,7 +1252,8 @@ static Standard_Boolean IsOverriden(const Interface_Graph& theGraph, //======================================================================= Standard_Boolean STEPCAFControl_Reader::ReadColors(const Handle(XSControl_WorkSession) &WS, - const Handle(TDocStd_Document)& Doc) const + const Handle(TDocStd_Document)& Doc, + const StepData_Factors& theLocalFactors) const { STEPConstruct_Styles Styles(WS); if (!Styles.LoadStyles()) { @@ -1278,7 +1284,7 @@ Standard_Boolean STEPCAFControl_Reader::ReadColors(const Handle(XSControl_WorkSe // check that style is overridden by other root style if (!IsOverriden (aGraph, Style, anIsRootStyle)) { - SetStyle (WS, myMap, CTool, STool, Styles, aHSeqOfInvisStyle, Style); + SetStyle (WS, myMap, CTool, STool, Styles, aHSeqOfInvisStyle, Style, theLocalFactors); } } @@ -1291,7 +1297,7 @@ Standard_Boolean STEPCAFControl_Reader::ReadColors(const Handle(XSControl_WorkSe // check that style is overridden if (!IsOverriden (aGraph, Style, anIsRootStyle)) { - SetStyle (WS, myMap, CTool, STool, Styles, aHSeqOfInvisStyle, Style); + SetStyle (WS, myMap, CTool, STool, Styles, aHSeqOfInvisStyle, Style, theLocalFactors); } } @@ -1490,7 +1496,8 @@ static TDF_Label GetLabelFromPD(const Handle(StepBasic_ProductDefinition) &PD, Standard_Boolean STEPCAFControl_Reader::ReadValProps(const Handle(XSControl_WorkSession) &WS, const Handle(TDocStd_Document)& Doc, - const STEPCAFControl_DataMapOfPDExternFile& PDFileMap) const + const STEPCAFControl_DataMapOfPDExternFile& PDFileMap, + const StepData_Factors& theLocalFactors) const { // get starting data const Handle(XSControl_TransferReader) &TR = WS->TransferReader(); @@ -1603,11 +1610,11 @@ Standard_Boolean STEPCAFControl_Reader::ReadValProps(const Handle(XSControl_Work Standard_Boolean isArea; Standard_Real val; gp_Pnt pos; - if (Props.GetPropReal(ent, val, isArea)) { + if (Props.GetPropReal(ent, val, isArea, theLocalFactors)) { if (isArea) XCAFDoc_Area::Set(L, val); else XCAFDoc_Volume::Set(L, val); } - else if (Props.GetPropPnt(ent, rep->ContextOfItems(), pos)) { + else if (Props.GetPropPnt(ent, rep->ContextOfItems(), pos, theLocalFactors)) { XCAFDoc_Centroid::Set(L, pos); } } @@ -1938,7 +1945,8 @@ Standard_Boolean readPMIPresentation(const Handle(Standard_Transient)& thePresen const Standard_Real theFact, TopoDS_Shape& thePresentation, Handle(TCollection_HAsciiString)& thePresentName, - Bnd_Box& theBox) + Bnd_Box& theBox, + const StepData_Factors& theLocalFactors) { if (thePresentEntity.IsNull()) return Standard_False; @@ -2014,7 +2022,7 @@ Standard_Boolean readPMIPresentation(const Handle(Standard_Transient)& thePresen { Handle(StepVisual_RepositionedTessellatedGeometricSet) aRTGS = Handle(StepVisual_RepositionedTessellatedGeometricSet)::DownCast(aTessSet); - Handle(Geom_Axis2Placement) aLocation = StepToGeom::MakeAxis2Placement(aRTGS->Location()); + Handle(Geom_Axis2Placement) aLocation = StepToGeom::MakeAxis2Placement(aRTGS->Location(), theLocalFactors); if (!aLocation.IsNull()) { const gp_Ax3 anAx3Orig = gp::XOY(); @@ -2094,7 +2102,8 @@ Standard_Boolean readPMIPresentation(const Handle(Standard_Transient)& thePresen //purpose : read annotation plane //======================================================================= Standard_Boolean readAnnotationPlane(const Handle(StepVisual_AnnotationPlane)& theAnnotationPlane, - gp_Ax2& thePlane) + gp_Ax2& thePlane, + const StepData_Factors& theLocalFactors) { if (theAnnotationPlane.IsNull()) return Standard_False; @@ -2114,7 +2123,7 @@ Standard_Boolean readAnnotationPlane(const Handle(StepVisual_AnnotationPlane)& t if (aA2P3D.IsNull()) return Standard_False; - Handle(Geom_Axis2Placement) anAxis = StepToGeom::MakeAxis2Placement(aA2P3D); + Handle(Geom_Axis2Placement) anAxis = StepToGeom::MakeAxis2Placement(aA2P3D, theLocalFactors); thePlane = anAxis->Ax2(); return Standard_True; } @@ -2126,7 +2135,8 @@ Standard_Boolean readAnnotationPlane(const Handle(StepVisual_AnnotationPlane)& t //======================================================================= void readAnnotation(const Handle(XSControl_TransferReader)& theTR, const Handle(Standard_Transient)& theGDT, - const Handle(Standard_Transient)& theDimObject) + const Handle(Standard_Transient)& theDimObject, + const StepData_Factors& theLocalFactors) { if (theGDT.IsNull() || theDimObject.IsNull()) return; @@ -2155,8 +2165,9 @@ void readAnnotation(const Handle(XSControl_TransferReader)& theTR, Handle(StepVisual_DraughtingModel)::DownCast(aDMIA->UsedRepresentation()); XSAlgo::AlgoContainer()->PrepareForTransfer(); STEPControl_ActorRead anActor; - anActor.PrepareUnits(aDModel, aTP); - Standard_Real aFact = StepData_GlobalFactors::Intance().LengthFactor(); + StepData_Factors aLocalFactors = theLocalFactors; + anActor.PrepareUnits(aDModel, aTP, aLocalFactors); + Standard_Real aFact = aLocalFactors.LengthFactor(); // retrieve AnnotationPlane Handle(StepRepr_RepresentationItem) aDMIAE = aDMIA->IdentifiedItemValue(1); @@ -2168,7 +2179,7 @@ void readAnnotation(const Handle(XSControl_TransferReader)& theTR, for (subs.Start(); subs.More() && anAnPlane.IsNull(); subs.Next()) { anAnPlane = Handle(StepVisual_AnnotationPlane)::DownCast(subs.Value()); } - Standard_Boolean isHasPlane = readAnnotationPlane(anAnPlane, aPlaneAxes); + Standard_Boolean isHasPlane = readAnnotationPlane(anAnPlane, aPlaneAxes, aLocalFactors); // set plane axes to XCAF if (isHasPlane) { @@ -2192,7 +2203,7 @@ void readAnnotation(const Handle(XSControl_TransferReader)& theTR, // Retrieve presentation Bnd_Box aBox; - if (!readPMIPresentation(aDMIAE, theTR, aFact, aResAnnotation, aPresentName, aBox)) + if (!readPMIPresentation(aDMIAE, theTR, aFact, aResAnnotation, aPresentName, aBox, aLocalFactors)) return; gp_Pnt aPtext(0., 0., 0.); // if Annotation plane location inside bounding box set it to text position @@ -2240,7 +2251,8 @@ void readAnnotation(const Handle(XSControl_TransferReader)& theTR, //======================================================================= void readConnectionPoints(const Handle(XSControl_TransferReader)& theTR, const Handle(Standard_Transient)& theGDT, - const Handle(XCAFDimTolObjects_DimensionObject)& theDimObject) + const Handle(XCAFDimTolObjects_DimensionObject)& theDimObject, + const StepData_Factors& theLocalFactors) { if (theGDT.IsNull() || theDimObject.IsNull()) return; @@ -2262,8 +2274,9 @@ void readConnectionPoints(const Handle(XSControl_TransferReader)& theTR, { XSAlgo::AlgoContainer()->PrepareForTransfer(); STEPControl_ActorRead anActor; - anActor.PrepareUnits(aSDR, aTP); - aFact = StepData_GlobalFactors::Intance().LengthFactor(); + StepData_Factors aLocalFactors = theLocalFactors; + anActor.PrepareUnits(aSDR, aTP, aLocalFactors); + aFact = aLocalFactors.LengthFactor(); } if (theGDT->IsKind(STANDARD_TYPE(StepShape_DimensionalSize))) { @@ -2518,7 +2531,8 @@ Standard_Boolean STEPCAFControl_Reader::setDatumToXCAF(const Handle(StepDimTol_D const XCAFDimTolObjects_DatumModifWithValue theXCAFModifWithVal, const Standard_Real theModifValue, const Handle(TDocStd_Document)& theDoc, - const Handle(XSControl_WorkSession)& theWS) + const Handle(XSControl_WorkSession)& theWS, + const StepData_Factors& theLocalFactors) { Handle(XCAFDoc_ShapeTool) aSTool = XCAFDoc_DocumentTool::ShapeTool(theDoc->Main()); Handle(XCAFDoc_DimTolTool) aDGTTool = XCAFDoc_DocumentTool::DimTolTool(theDoc->Main()); @@ -2539,7 +2553,7 @@ Standard_Boolean STEPCAFControl_Reader::setDatumToXCAF(const Handle(StepDimTol_D collectShapeAspect(aSAR->RelatingShapeAspect(), theWS, aSAs); Handle(StepDimTol_DatumFeature) aDF = Handle(StepDimTol_DatumFeature)::DownCast(aSAR->RelatingShapeAspect()); if (!aSAR->RelatingShapeAspect()->IsKind(STANDARD_TYPE(StepDimTol_DatumTarget))) - readAnnotation(aTR, aSAR->RelatingShapeAspect(), aDatObj); + readAnnotation(aTR, aSAR->RelatingShapeAspect(), aDatObj, theLocalFactors); } // Collect shape labels @@ -2673,8 +2687,9 @@ Standard_Boolean STEPCAFControl_Reader::setDatumToXCAF(const Handle(StepDimTol_D = Handle(StepGeom_Axis2Placement3d)::DownCast(aSRWP->ItemsValue(j)); XSAlgo::AlgoContainer()->PrepareForTransfer(); STEPControl_ActorRead anActor; - anActor.PrepareUnits(aSRWP, aTP); - Handle(Geom_Axis2Placement) anAxis = StepToGeom::MakeAxis2Placement(anAx); + StepData_Factors aLocalFactors = theLocalFactors; + anActor.PrepareUnits(aSRWP, aTP, aLocalFactors); + Handle(Geom_Axis2Placement) anAxis = StepToGeom::MakeAxis2Placement(anAx, aLocalFactors); aDatTargetObj->SetDatumTargetAxis(anAxis->Ax2()); } else if (aSRWP->ItemsValue(j)->IsKind(STANDARD_TYPE(StepRepr_ReprItemAndLengthMeasureWithUnit))) @@ -2689,7 +2704,7 @@ Standard_Boolean STEPCAFControl_Reader::setDatumToXCAF(const Handle(StepDimTol_D if (aNU.IsNull()) continue; STEPConstruct_UnitContext anUnitCtx; - anUnitCtx.ComputeFactors(aNU); + anUnitCtx.ComputeFactors(aNU, theLocalFactors); aVal = aVal * anUnitCtx.LengthFactor(); if (aM->Name()->String().IsEqual("target length") || aM->Name()->String().IsEqual("target diameter")) @@ -2719,7 +2734,7 @@ Standard_Boolean STEPCAFControl_Reader::setDatumToXCAF(const Handle(StepDimTol_D aDGTTool->SetDatumToGeomTol(aDatL, theGDTL); aDatTargetObj->IsDatumTarget(Standard_True); aDatTargetObj->SetDatumTargetNumber(aDT->TargetId()->IntegerValue()); - readAnnotation(aTR, aDT, aDatTargetObj); + readAnnotation(aTR, aDT, aDatTargetObj, theLocalFactors); aDat->SetObject(aDatTargetObj); isExistDatumTarget = Standard_True; } @@ -2748,7 +2763,7 @@ Standard_Boolean STEPCAFControl_Reader::setDatumToXCAF(const Handle(StepDimTol_D aDGTTool->SetDatumToGeomTol(aDatL, theGDTL); if (aDatObj->GetPresentation().IsNull()) { // Try find annotation connected to datum entity (not right case, according recommended practices) - readAnnotation(aTR, theDat, aDatObj); + readAnnotation(aTR, theDat, aDatObj, theLocalFactors); } aDat->SetObject(aDatObj); } @@ -2764,7 +2779,8 @@ Standard_Boolean STEPCAFControl_Reader::setDatumToXCAF(const Handle(StepDimTol_D Standard_Boolean STEPCAFControl_Reader::readDatumsAP242(const Handle(Standard_Transient)& theEnt, const TDF_Label theGDTL, const Handle(TDocStd_Document)& theDoc, - const Handle(XSControl_WorkSession)& theWS) + const Handle(XSControl_WorkSession)& theWS, + const StepData_Factors& theLocalFactors) { const Handle(XSControl_TransferReader) &aTR = theWS->TransferReader(); const Handle(Transfer_TransientProcess) &aTP = aTR->TransientProcess(); @@ -2845,7 +2861,7 @@ Standard_Boolean STEPCAFControl_Reader::readDatumsAP242(const Handle(Standard_Tr if (!(anUnit.CaseNum(anUnit.Value()) == 1)) continue; Handle(StepBasic_NamedUnit) NU = anUnit.NamedUnit(); STEPConstruct_UnitContext anUnitCtx; - anUnitCtx.ComputeFactors(NU); + anUnitCtx.ComputeFactors(NU, theLocalFactors); aModifValue = aVal * anUnitCtx.LengthFactor(); } } @@ -2857,7 +2873,7 @@ Standard_Boolean STEPCAFControl_Reader::readDatumsAP242(const Handle(Standard_Tr if (anIterDRC.Value()->IsKind(STANDARD_TYPE(StepDimTol_Datum))) { Handle(StepDimTol_Datum) aD = Handle(StepDimTol_Datum)::DownCast(anIterDRC.Value()); - setDatumToXCAF(aD, theGDTL, aPositionCounter, aXCAFModifiers, aXCAFModifWithVal, aModifValue, theDoc, theWS); + setDatumToXCAF(aD, theGDTL, aPositionCounter, aXCAFModifiers, aXCAFModifWithVal, aModifValue, theDoc, theWS, theLocalFactors); } else if (anIterDRC.Value()->IsKind(STANDARD_TYPE(StepDimTol_DatumReferenceElement))) { @@ -2882,7 +2898,7 @@ Standard_Boolean STEPCAFControl_Reader::readDatumsAP242(const Handle(Standard_Tr if (!(anUnit.CaseNum(anUnit.Value()) == 1)) continue; Handle(StepBasic_NamedUnit) NU = anUnit.NamedUnit(); STEPConstruct_UnitContext anUnitCtx; - anUnitCtx.ComputeFactors(NU); + anUnitCtx.ComputeFactors(NU, theLocalFactors); aModifValue = aVal * anUnitCtx.LengthFactor(); } } @@ -2892,7 +2908,7 @@ Standard_Boolean STEPCAFControl_Reader::readDatumsAP242(const Handle(Standard_Tr if (anIterDRE.Value()->IsKind(STANDARD_TYPE(StepDimTol_Datum))) { Handle(StepDimTol_Datum) aD = Handle(StepDimTol_Datum)::DownCast(anIterDRE.Value()); - setDatumToXCAF(aD, theGDTL, aPositionCounter, aXCAFModifiers, aXCAFModifWithVal, aModifValue, theDoc, theWS); + setDatumToXCAF(aD, theGDTL, aPositionCounter, aXCAFModifiers, aXCAFModifWithVal, aModifValue, theDoc, theWS, theLocalFactors); } } } @@ -2911,7 +2927,8 @@ Standard_Boolean STEPCAFControl_Reader::readDatumsAP242(const Handle(Standard_Tr //======================================================================= TDF_Label STEPCAFControl_Reader::createGDTObjectInXCAF(const Handle(Standard_Transient)& theEnt, const Handle(TDocStd_Document)& theDoc, - const Handle(XSControl_WorkSession)& theWS) + const Handle(XSControl_WorkSession)& theWS, + const StepData_Factors& theLocalFactors) { TDF_Label aGDTL; if (!theEnt->IsKind(STANDARD_TYPE(StepShape_DimensionalSize)) && @@ -3082,7 +3099,7 @@ TDF_Label STEPCAFControl_Reader::createGDTObjectInXCAF(const Handle(Standard_Tra if (!(anUnit.CaseNum(anUnit.Value()) == 1)) continue; Handle(StepBasic_NamedUnit) NU = anUnit.NamedUnit(); STEPConstruct_UnitContext anUnitCtx; - anUnitCtx.ComputeFactors(NU); + anUnitCtx.ComputeFactors(NU, theLocalFactors); dim1 = dim1 * anUnitCtx.LengthFactor(); } } @@ -3098,7 +3115,7 @@ TDF_Label STEPCAFControl_Reader::createGDTObjectInXCAF(const Handle(Standard_Tra if (!(anUnit.CaseNum(anUnit.Value()) == 1)) continue; Handle(StepBasic_NamedUnit) NU = anUnit.NamedUnit(); STEPConstruct_UnitContext anUnitCtx; - anUnitCtx.ComputeFactors(NU); + anUnitCtx.ComputeFactors(NU, theLocalFactors); dim2 = dim2 * anUnitCtx.LengthFactor(); } } @@ -3139,7 +3156,7 @@ TDF_Label STEPCAFControl_Reader::createGDTObjectInXCAF(const Handle(Standard_Tra if (!(anUnit.CaseNum(anUnit.Value()) == 1)) continue; Handle(StepBasic_NamedUnit) NU = anUnit.NamedUnit(); STEPConstruct_UnitContext anUnitCtx; - anUnitCtx.ComputeFactors(NU); + anUnitCtx.ComputeFactors(NU, theLocalFactors); dim = dim * anUnitCtx.LengthFactor(); //std::cout<<"GeometricTolerance: Magnitude = "<Main()); Handle(XCAFDoc_DimTolTool) aDGTTool = XCAFDoc_DocumentTool::DimTolTool(theDoc->Main()); @@ -3455,7 +3473,7 @@ static void setDimObjectToXCAF(const Handle(Standard_Transient)& theEnt, continue; Handle(StepBasic_NamedUnit) NU = anUnit.NamedUnit(); STEPConstruct_UnitContext anUnitCtx; - anUnitCtx.ComputeFactors(NU); + anUnitCtx.ComputeFactors(NU, theLocalFactors); if (aMWU->IsKind(STANDARD_TYPE(StepRepr_ReprItemAndLengthMeasureWithUnit))) { aVal = aVal * anUnitCtx.LengthFactor(); @@ -3482,7 +3500,7 @@ static void setDimObjectToXCAF(const Handle(Standard_Transient)& theEnt, continue; Handle(StepBasic_NamedUnit) NU = anUnit.NamedUnit(); STEPConstruct_UnitContext anUnitCtx; - anUnitCtx.ComputeFactors(NU); + anUnitCtx.ComputeFactors(NU, theLocalFactors); if (aMWU->IsKind(STANDARD_TYPE(StepRepr_ReprItemAndLengthMeasureWithUnitAndQRI))) { aVal = aVal * anUnitCtx.LengthFactor(); } @@ -3562,7 +3580,7 @@ static void setDimObjectToXCAF(const Handle(Standard_Transient)& theEnt, if (!(anUnit.CaseNum(anUnit.Value()) == 1)) continue; Handle(StepBasic_NamedUnit) NU = anUnit.NamedUnit(); STEPConstruct_UnitContext anUnitCtxUpperBound; - anUnitCtxUpperBound.ComputeFactors(NU); + anUnitCtxUpperBound.ComputeFactors(NU, theLocalFactors); if (aMWU->IsKind(STANDARD_TYPE(StepBasic_PlaneAngleMeasureWithUnit)) || aMWU->IsKind(STANDARD_TYPE(StepRepr_ReprItemAndPlaneAngleMeasureWithUnitAndQRI))) { @@ -3598,7 +3616,7 @@ static void setDimObjectToXCAF(const Handle(Standard_Transient)& theEnt, if (!(anUnit.CaseNum(anUnit.Value()) == 1)) continue; NU = anUnit.NamedUnit(); STEPConstruct_UnitContext anUnitCtxLowerBound; - anUnitCtxLowerBound.ComputeFactors(NU); + anUnitCtxLowerBound.ComputeFactors(NU, theLocalFactors); if (aMWU->IsKind(STANDARD_TYPE(StepBasic_PlaneAngleMeasureWithUnit)) || aMWU->IsKind(STANDARD_TYPE(StepRepr_ReprItemAndPlaneAngleMeasureWithUnitAndQRI))) { @@ -3808,8 +3826,8 @@ static void setDimObjectToXCAF(const Handle(Standard_Transient)& theEnt, if (aDimL.FindAttribute(XCAFDoc_Dimension::GetID(), aDim)) { - readAnnotation(aTR, theEnt, aDimObj); - readConnectionPoints(aTR, theEnt, aDimObj); + readAnnotation(aTR, theEnt, aDimObj, theLocalFactors); + readConnectionPoints(aTR, theEnt, aDimObj, theLocalFactors); aDim->SetObject(aDimObj); } } @@ -3930,7 +3948,8 @@ static Standard_Boolean getTolType(const Handle(Standard_Transient)& theEnt, static void setGeomTolObjectToXCAF(const Handle(Standard_Transient)& theEnt, const TDF_Label& theTolL, const Handle(TDocStd_Document)& theDoc, - const Handle(XSControl_WorkSession)& theWS) + const Handle(XSControl_WorkSession)& theWS, + const StepData_Factors& theLocalFactors) { Handle(XCAFDoc_ShapeTool) aSTool = XCAFDoc_DocumentTool::ShapeTool(theDoc->Main()); Handle(XCAFDoc_DimTolTool) aDGTTool = XCAFDoc_DocumentTool::DimTolTool(theDoc->Main()); @@ -3956,7 +3975,7 @@ static void setGeomTolObjectToXCAF(const Handle(Standard_Transient)& theEnt, if (!(anUnit.CaseNum(anUnit.Value()) == 1)) return; Handle(StepBasic_NamedUnit) NU = anUnit.NamedUnit(); STEPConstruct_UnitContext anUnitCtx; - anUnitCtx.ComputeFactors(NU); + anUnitCtx.ComputeFactors(NU, theLocalFactors); aVal = aVal * anUnitCtx.LengthFactor(); aTolObj->SetValue(aVal); } @@ -3981,7 +4000,7 @@ static void setGeomTolObjectToXCAF(const Handle(Standard_Transient)& theEnt, if (!(anUnit.CaseNum(anUnit.Value()) == 1)) return; Handle(StepBasic_NamedUnit) NU = anUnit.NamedUnit(); STEPConstruct_UnitContext anUnitCtx; - anUnitCtx.ComputeFactors(NU); + anUnitCtx.ComputeFactors(NU, theLocalFactors); aVal = aVal * anUnitCtx.LengthFactor(); aTolObj->SetValueOfZoneModifier(aVal); aTolObj->SetZoneModifier(XCAFDimTolObjects_GeomToleranceZoneModif_Projected); @@ -3999,7 +4018,7 @@ static void setGeomTolObjectToXCAF(const Handle(Standard_Transient)& theEnt, if (!(anUnit.CaseNum(anUnit.Value()) == 1)) continue; Handle(StepBasic_NamedUnit) NU = anUnit.NamedUnit(); STEPConstruct_UnitContext anUnitCtx; - anUnitCtx.ComputeFactors(NU); + anUnitCtx.ComputeFactors(NU, theLocalFactors); convertAngleValue(anUnitCtx, aVal); aTolObj->SetValueOfZoneModifier(aVal); aTolObj->SetZoneModifier(XCAFDimTolObjects_GeomToleranceZoneModif_Runout); @@ -4072,12 +4091,12 @@ static void setGeomTolObjectToXCAF(const Handle(Standard_Transient)& theEnt, { Handle(StepBasic_NamedUnit) NU = anUnit.NamedUnit(); STEPConstruct_UnitContext anUnitCtx; - anUnitCtx.ComputeFactors(NU); + anUnitCtx.ComputeFactors(NU, theLocalFactors); convertAngleValue(anUnitCtx, aVal); aTolObj->SetMaxValueModifier(aVal); } - readAnnotation(aTR, theEnt, aTolObj); + readAnnotation(aTR, theEnt, aTolObj, theLocalFactors); aGTol->SetObject(aTolObj); } @@ -4087,7 +4106,8 @@ static void setGeomTolObjectToXCAF(const Handle(Standard_Transient)& theEnt, //======================================================================= Standard_Boolean STEPCAFControl_Reader::ReadGDTs(const Handle(XSControl_WorkSession)& theWS, - const Handle(TDocStd_Document)& theDoc) + const Handle(TDocStd_Document)& theDoc, + const StepData_Factors& theLocalFactors) { const Handle(Interface_InterfaceModel) &aModel = theWS->Model(); const Interface_Graph& aGraph = theWS->Graph(); @@ -4107,13 +4127,13 @@ Standard_Boolean STEPCAFControl_Reader::ReadGDTs(const Handle(XSControl_WorkSess if (anEnt->IsKind(STANDARD_TYPE(StepShape_DimensionalSize)) || anEnt->IsKind(STANDARD_TYPE(StepShape_DimensionalLocation)) || anEnt->IsKind(STANDARD_TYPE(StepDimTol_GeometricTolerance))) { - TDF_Label aGDTL = createGDTObjectInXCAF(anEnt, theDoc, theWS); + TDF_Label aGDTL = createGDTObjectInXCAF(anEnt, theDoc, theWS, theLocalFactors); if (!aGDTL.IsNull()) { if (anEnt->IsKind(STANDARD_TYPE(StepDimTol_GeometricTolerance))) { - setGeomTolObjectToXCAF(anEnt, aGDTL, theDoc, theWS); + setGeomTolObjectToXCAF(anEnt, aGDTL, theDoc, theWS, theLocalFactors); } else { - setDimObjectToXCAF(anEnt, aGDTL, theDoc, theWS); + setDimObjectToXCAF(anEnt, aGDTL, theDoc, theWS, theLocalFactors); } } } @@ -4200,20 +4220,21 @@ Standard_Boolean STEPCAFControl_Reader::ReadGDTs(const Handle(XSControl_WorkSess // Calculate unit Standard_Real aFact = 1.0; + StepData_Factors aLocalFactors = theLocalFactors; if (!aDMIA.IsNull()) { XSAlgo::AlgoContainer()->PrepareForTransfer(); STEPControl_ActorRead anActor; Handle(Transfer_TransientProcess) aTP = aTR->TransientProcess(); - anActor.PrepareUnits(aDMIA->UsedRepresentation(), aTP); - aFact = StepData_GlobalFactors::Intance().LengthFactor(); + anActor.PrepareUnits(aDMIA->UsedRepresentation(), aTP, aLocalFactors); + aFact = aLocalFactors.LengthFactor(); } // Presentation TopoDS_Shape aPresentation; Handle(TCollection_HAsciiString) aPresentName; Bnd_Box aBox; - if (!readPMIPresentation(anEnt, aTR, aFact, aPresentation, aPresentName, aBox)) + if (!readPMIPresentation(anEnt, aTR, aFact, aPresentation, aPresentName, aBox, aLocalFactors)) continue; // Annotation plane Handle(StepVisual_AnnotationPlane) anAnPlane; @@ -4240,7 +4261,7 @@ Standard_Boolean STEPCAFControl_Reader::ReadGDTs(const Handle(XSControl_WorkSess aDGTTool->SetDimension(aShapesL, anEmptySeq2, aGDTL); gp_Ax2 aPlaneAxes; if (!anAnPlane.IsNull()) { - if (readAnnotationPlane(anAnPlane, aPlaneAxes)) + if (readAnnotationPlane(anAnPlane, aPlaneAxes, aLocalFactors)) aDimObj->SetPlane(aPlaneAxes); } aDimObj->SetPresentation(aPresentation, aPresentName); @@ -4298,7 +4319,8 @@ static Handle(StepShape_SolidModel) FindSolidForPDS(const Handle(StepRepr_Produc Standard_Boolean STEPCAFControl_Reader::ReadMaterials(const Handle(XSControl_WorkSession) &WS, const Handle(TDocStd_Document)& Doc, - const Handle(TColStd_HSequenceOfTransient)& SeqPDS) const + const Handle(TColStd_HSequenceOfTransient)& SeqPDS, + const StepData_Factors& theLocalFactors) const { const Handle(XSControl_TransferReader) &TR = WS->TransferReader(); const Handle(Transfer_TransientProcess) &TP = TR->TransientProcess(); @@ -4366,11 +4388,11 @@ Standard_Boolean STEPCAFControl_Reader::ReadMaterials(const Handle(XSControl_Wor NU->IsKind(STANDARD_TYPE(StepBasic_SiUnitAndLengthUnit))) { STEPConstruct_UnitContext anUnitCtx; - anUnitCtx.ComputeFactors(NU); + anUnitCtx.ComputeFactors(NU, theLocalFactors); aDensity = aDensity / (anUnitCtx.LengthFactor()*anUnitCtx.LengthFactor()*anUnitCtx.LengthFactor()); // transfer length value for Density from millimeter to santimeter // in order to result density has dimension gram/(sm*sm*sm) - const Standard_Real aCascadeUnit = StepData_GlobalFactors::Intance().CascadeUnit(); + const Standard_Real aCascadeUnit = theLocalFactors.CascadeUnit(); aDensity = aDensity*1000. / (aCascadeUnit * aCascadeUnit * aCascadeUnit); } if (NU->IsKind(STANDARD_TYPE(StepBasic_ConversionBasedUnitAndMassUnit))) { @@ -4451,7 +4473,8 @@ void collectViewShapes(const Handle(XSControl_WorkSession)& theWS, //======================================================================= Handle(TCollection_HAsciiString) buildClippingPlanes(const Handle(StepGeom_GeometricRepresentationItem)& theClippingCameraModel, TDF_LabelSequence& theClippingPlanes, - const Handle(XCAFDoc_ClippingPlaneTool)& theTool) + const Handle(XCAFDoc_ClippingPlaneTool)& theTool, + const StepData_Factors& theLocalFactors) { Handle(TCollection_HAsciiString) anExpression = new TCollection_HAsciiString(); NCollection_Sequence aPlanes; @@ -4470,7 +4493,7 @@ Handle(TCollection_HAsciiString) buildClippingPlanes(const Handle(StepGeom_Geome Handle(StepVisual_CameraModelD3MultiClippingUnion) aCameraModelUnion = aCameraModel->ShapeClipping()->Value(1).CameraModelD3MultiClippingUnion(); if (!aCameraModelUnion.IsNull()) - return buildClippingPlanes(aCameraModelUnion, theClippingPlanes, theTool); + return buildClippingPlanes(aCameraModelUnion, theClippingPlanes, theTool, theLocalFactors); } for (Standard_Integer i = 1; i <= aCameraModel->ShapeClipping()->Length(); i++) { aPlanes.Append(Handle(StepGeom_GeometricRepresentationItem)::DownCast(aCameraModel->ShapeClipping()->Value(i).Value())); @@ -4496,7 +4519,7 @@ Handle(TCollection_HAsciiString) buildClippingPlanes(const Handle(StepGeom_Geome for (Standard_Integer i = 1; i <= aPlanes.Length(); i++) { Handle(StepGeom_Plane) aPlaneEnt = Handle(StepGeom_Plane)::DownCast(aPlanes.Value(i)); if (!aPlaneEnt.IsNull()) { - Handle(Geom_Plane) aPlane = StepToGeom::MakePlane(aPlaneEnt); + Handle(Geom_Plane) aPlane = StepToGeom::MakePlane(aPlaneEnt, theLocalFactors); if (!aPlane.IsNull()) { TDF_Label aPlaneL = theTool->AddClippingPlane(aPlane->Pln(), aPlaneEnt->Name()); theClippingPlanes.Append(aPlaneL); @@ -4506,7 +4529,7 @@ Handle(TCollection_HAsciiString) buildClippingPlanes(const Handle(StepGeom_Geome } } else { - anExpression->AssignCat(buildClippingPlanes(aPlanes.Value(i), theClippingPlanes, theTool)); + anExpression->AssignCat(buildClippingPlanes(aPlanes.Value(i), theClippingPlanes, theTool, theLocalFactors)); } anExpression->AssignCat(anOperation); } @@ -4520,7 +4543,9 @@ Handle(TCollection_HAsciiString) buildClippingPlanes(const Handle(StepGeom_Geome //function : ReadViews //purpose : //======================================================================= -Standard_Boolean STEPCAFControl_Reader::ReadViews(const Handle(XSControl_WorkSession)& theWS, const Handle(TDocStd_Document)& theDoc) const +Standard_Boolean STEPCAFControl_Reader::ReadViews(const Handle(XSControl_WorkSession)& theWS, + const Handle(TDocStd_Document)& theDoc, + const StepData_Factors& theLocalFactors) const { const Handle(Interface_InterfaceModel) &aModel = theWS->Model(); Handle(XCAFDoc_ShapeTool) aSTool = XCAFDoc_DocumentTool::ShapeTool(theDoc->Main()); @@ -4551,15 +4576,16 @@ Standard_Boolean STEPCAFControl_Reader::ReadViews(const Handle(XSControl_WorkSes } aDModel = Handle(StepVisual_DraughtingModel)::DownCast(subs.Value()); } + StepData_Factors aLocalFactors = theLocalFactors; if (!aDModel.IsNull()) { XSAlgo::AlgoContainer()->PrepareForTransfer(); STEPControl_ActorRead anActor; - anActor.PrepareUnits(aDModel, aTP); + anActor.PrepareUnits(aDModel, aTP, aLocalFactors); } anObj->SetName(aCameraModel->Name()); - Handle(Geom_Axis2Placement) anAxis = StepToGeom::MakeAxis2Placement(aCameraModel->ViewReferenceSystem()); + Handle(Geom_Axis2Placement) anAxis = StepToGeom::MakeAxis2Placement(aCameraModel->ViewReferenceSystem(), aLocalFactors); anObj->SetViewDirection(anAxis->Direction()); anObj->SetUpDirection(anAxis->Direction() ^ anAxis->XDirection()); Handle(StepVisual_ViewVolume) aViewVolume = aCameraModel->PerspectiveOfVolume(); @@ -4569,7 +4595,7 @@ Standard_Boolean STEPCAFControl_Reader::ReadViews(const Handle(XSControl_WorkSes else if (aViewVolume->ProjectionType() == StepVisual_copParallel) aType = XCAFView_ProjectionType_Parallel; anObj->SetType(aType); - Handle(Geom_CartesianPoint) aPoint = StepToGeom::MakeCartesianPoint(aViewVolume->ProjectionPoint()); + Handle(Geom_CartesianPoint) aPoint = StepToGeom::MakeCartesianPoint(aViewVolume->ProjectionPoint(), aLocalFactors); anObj->SetProjectionPoint(aPoint->Pnt()); anObj->SetZoomFactor(aViewVolume->ViewPlaneDistance()); anObj->SetWindowHorizontalSize(aViewVolume->ViewWindow()->SizeInX()); @@ -4586,7 +4612,7 @@ Standard_Boolean STEPCAFControl_Reader::ReadViews(const Handle(XSControl_WorkSes if (!aClippingCameraModel.IsNull()) { Handle(TCollection_HAsciiString) aClippingExpression; Handle(XCAFDoc_ClippingPlaneTool) aClippingPlaneTool = XCAFDoc_DocumentTool::ClippingPlaneTool(theDoc->Main()); - aClippingExpression = buildClippingPlanes(aClippingCameraModel, aClippingPlanes, aClippingPlaneTool); + aClippingExpression = buildClippingPlanes(aClippingCameraModel, aClippingPlanes, aClippingPlaneTool, aLocalFactors); anObj->SetClippingExpression(aClippingExpression); } diff --git a/src/STEPCAFControl/STEPCAFControl_Reader.hxx b/src/STEPCAFControl/STEPCAFControl_Reader.hxx index 1b1ac0c55a..efebd48bfa 100644 --- a/src/STEPCAFControl/STEPCAFControl_Reader.hxx +++ b/src/STEPCAFControl/STEPCAFControl_Reader.hxx @@ -38,6 +38,7 @@ class StepShape_ConnectedFaceSet; class StepRepr_NextAssemblyUsageOccurrence; class STEPConstruct_Tool; class StepDimTol_Datum; +class StepData_Factors; //! Provides a tool to read STEP file and put it into @@ -212,7 +213,8 @@ protected: //! corresponding color assignments in the DECAF document Standard_EXPORT Standard_Boolean ReadColors (const Handle(XSControl_WorkSession)& WS, - const Handle(TDocStd_Document)& doc) const; + const Handle(TDocStd_Document)& doc, + const StepData_Factors& theLocalFactors) const; //! Reads names of parts defined in the STEP model and //! assigns them to corresponding labels in the DECAF document @@ -221,7 +223,10 @@ protected: //! Reads validation properties assigned to shapes in the STEP //! model and assigns them to corresponding labels in the DECAF //! document - Standard_EXPORT Standard_Boolean ReadValProps (const Handle(XSControl_WorkSession)& WS, const Handle(TDocStd_Document)& doc, const STEPCAFControl_DataMapOfPDExternFile& PDFileMap) const; + Standard_EXPORT Standard_Boolean ReadValProps (const Handle(XSControl_WorkSession)& WS, + const Handle(TDocStd_Document)& doc, + const STEPCAFControl_DataMapOfPDExternFile& PDFileMap, + const StepData_Factors& theLocalFactors) const; //! Reads layers of parts defined in the STEP model and //! set reference between shape and layers in the DECAF document @@ -233,14 +238,21 @@ protected: //! Reads D> for instances defined in the STEP model and //! set reference between shape instances from different assemblyes - Standard_EXPORT Standard_Boolean ReadGDTs (const Handle(XSControl_WorkSession)& WS, const Handle(TDocStd_Document)& doc); + Standard_EXPORT Standard_Boolean ReadGDTs (const Handle(XSControl_WorkSession)& WS, + const Handle(TDocStd_Document)& doc, + const StepData_Factors& theLocalFactors); //! Reads materials for instances defined in the STEP model and //! set reference between shape instances from different assemblyes - Standard_EXPORT Standard_Boolean ReadMaterials (const Handle(XSControl_WorkSession)& WS, const Handle(TDocStd_Document)& doc, const Handle(TColStd_HSequenceOfTransient)& SeqPDS) const; + Standard_EXPORT Standard_Boolean ReadMaterials (const Handle(XSControl_WorkSession)& WS, + const Handle(TDocStd_Document)& doc, + const Handle(TColStd_HSequenceOfTransient)& SeqPDS, + const StepData_Factors& theLocalFactors) const; //! Reads Views for instances defined in the STEP model - Standard_EXPORT Standard_Boolean ReadViews(const Handle(XSControl_WorkSession)& theWS, const Handle(TDocStd_Document)& theDoc) const; + Standard_EXPORT Standard_Boolean ReadViews(const Handle(XSControl_WorkSession)& theWS, + const Handle(TDocStd_Document)& theDoc, + const StepData_Factors& theLocalFactors) const; //! Populates the sub-Label of the passed TDF Label with shape //! data associated with the given STEP Representation Item, @@ -281,22 +293,26 @@ private: const XCAFDimTolObjects_DatumModifWithValue theXCAFModifWithVal, const Standard_Real theModifValue, const Handle(TDocStd_Document)& theDoc, - const Handle(XSControl_WorkSession)& theWS); + const Handle(XSControl_WorkSession)& theWS, + const StepData_Factors& theLocalFactors); //! Internal method. Read Datums, connected to GeomTolerance theGDTL. Standard_Boolean readDatumsAP242(const Handle(Standard_Transient)& theEnt, const TDF_Label theGDTL, const Handle(TDocStd_Document)& theDoc, - const Handle(XSControl_WorkSession)& theWS); + const Handle(XSControl_WorkSession)& theWS, + const StepData_Factors& theLocalFactors); //! Internal method. Read Dimension or GeomTolerance. TDF_Label createGDTObjectInXCAF(const Handle(Standard_Transient)& theEnt, const Handle(TDocStd_Document)& theDoc, - const Handle(XSControl_WorkSession)& theWS); + const Handle(XSControl_WorkSession)& theWS, + const StepData_Factors& theLocalFactors); //! Prepares units for transfer void prepareUnits(const Handle(StepData_StepModel)& theModel, - const Handle(TDocStd_Document)& theDoc) const; + const Handle(TDocStd_Document)& theDoc, + StepData_Factors& theLocalFactors) const; private: diff --git a/src/STEPCAFControl/STEPCAFControl_Writer.cxx b/src/STEPCAFControl/STEPCAFControl_Writer.cxx index 7dd761e5f5..9d188e07e2 100644 --- a/src/STEPCAFControl/STEPCAFControl_Writer.cxx +++ b/src/STEPCAFControl/STEPCAFControl_Writer.cxx @@ -56,6 +56,7 @@ #include #include #include +#include #include #include #include @@ -348,18 +349,21 @@ IFSelect_ReturnStatus STEPCAFControl_Writer::Write(const Standard_CString theFil //purpose : //======================================================================= void STEPCAFControl_Writer::prepareUnit(const TDF_Label& theLabel, - const Handle(StepData_StepModel)& theModel) + const Handle(StepData_StepModel)& theModel, + StepData_Factors& theLocalFactors) { Handle(XCAFDoc_LengthUnit) aLengthAttr; if (!theLabel.IsNull() && theLabel.Root().FindAttribute(XCAFDoc_LengthUnit::GetID(), aLengthAttr)) { theModel->SetLocalLengthUnit(aLengthAttr->GetUnitValue() * 1000); // convert to mm + theLocalFactors.SetCascadeUnit(aLengthAttr->GetUnitValue() * 1000); } else { XSAlgo::AlgoContainer()->PrepareForTransfer(); // update unit info theModel->SetLocalLengthUnit(UnitsMethods::GetCasCadeLengthUnit()); + theLocalFactors.SetCascadeUnit(UnitsMethods::GetCasCadeLengthUnit()); } } @@ -511,8 +515,9 @@ Standard_Boolean STEPCAFControl_Writer::transfer(STEPControl_Writer& theWriter, Handle(STEPCAFControl_ActorWrite) anActor = Handle(STEPCAFControl_ActorWrite)::DownCast(theWriter.WS()->NormAdaptor()->ActorWrite()); + StepData_Factors aLocalFactors; const Handle(StepData_StepModel) aModel = Handle(StepData_StepModel)::DownCast(theWriter.WS()->Model()); - prepareUnit(theLabels.First(), aModel); // set local length unit to the model + prepareUnit(theLabels.First(), aModel, aLocalFactors); // set local length unit to the model // translate free top-level shapes of the DECAF document const Standard_Integer aStepSchema = Interface_Static::IVal("write.step.schema"); TDF_LabelSequence aSubLabels; @@ -614,7 +619,7 @@ Standard_Boolean STEPCAFControl_Writer::transfer(STEPControl_Writer& theWriter, { // translate final solids Message_ProgressScope aPS1(aRange, NULL, 2); - TopoDS_Shape aSass = transferExternFiles(aCurL, theMode, aSubLabels, theIsMulti, aPS1.Next()); + TopoDS_Shape aSass = transferExternFiles(aCurL, theMode, aSubLabels, aLocalFactors, theIsMulti, aPS1.Next()); if (aPS1.UserBreak()) return Standard_False; @@ -653,7 +658,7 @@ Standard_Boolean STEPCAFControl_Writer::transfer(STEPControl_Writer& theWriter, { if (aStepSchema == 5) { - writeDGTsAP242(theWriter.WS(), aSubLabels); + writeDGTsAP242(theWriter.WS(), aSubLabels, aLocalFactors); } else { @@ -733,6 +738,7 @@ Standard_Boolean STEPCAFControl_Writer::transfer(STEPControl_Writer& theWriter, TopoDS_Shape STEPCAFControl_Writer::transferExternFiles(const TDF_Label& theLabel, const STEPControl_StepModelType theMode, TDF_LabelSequence& theLabels, + const StepData_Factors& theLocalFactors, const Standard_CString thePrefix, const Message_ProgressRange& theProgress) { @@ -815,7 +821,7 @@ TopoDS_Shape STEPCAFControl_Writer::transferExternFiles(const TDF_Label& theLabe TDF_Label aRefL; if (!XCAFDoc_ShapeTool::GetReferredShape(aCurL, aRefL)) continue; - TopoDS_Shape aShComp = transferExternFiles(aRefL, theMode, theLabels, thePrefix, aPS.Next()); + TopoDS_Shape aShComp = transferExternFiles(aRefL, theMode, theLabels, theLocalFactors, thePrefix, aPS.Next()); aShComp.Location(XCAFDoc_ShapeTool::GetLocation(aCurL)); aBuilder.Add(aComp, aShComp); } @@ -2457,7 +2463,8 @@ void STEPCAFControl_Writer::writePresentation(const Handle(XSControl_WorkSession const Standard_Boolean theHasPlane, const gp_Ax2& theAnnotationPlane, const gp_Pnt& theTextPosition, - const Handle(Standard_Transient)& theDimension) + const Handle(Standard_Transient)& theDimension, + const StepData_Factors& theLocalFactors) { if (thePresentation.IsNull()) return; @@ -2508,7 +2515,7 @@ void STEPCAFControl_Writer::writePresentation(const Handle(XSControl_WorkSession aPrsStyles->SetValue(1, aPrsStyle); // Plane Handle(StepGeom_Plane) aPlane = new StepGeom_Plane(); - GeomToStep_MakeAxis2Placement3d anAxisMaker(theAnnotationPlane); + GeomToStep_MakeAxis2Placement3d anAxisMaker(theAnnotationPlane, theLocalFactors); const Handle(StepGeom_Axis2Placement3d)& anAxis = anAxisMaker.Value(); // Set text position to plane origin Handle(StepGeom_CartesianPoint) aTextPos = new StepGeom_CartesianPoint(); @@ -2540,7 +2547,8 @@ Handle(StepDimTol_Datum) STEPCAFControl_Writer::writeDatumAP242(const Handle(XSC const TDF_LabelSequence& theShapeL, const TDF_Label& theDatumL, const Standard_Boolean theIsFirstDTarget, - const Handle(StepDimTol_Datum)& theWrittenDatum) + const Handle(StepDimTol_Datum)& theWrittenDatum, + const StepData_Factors& theLocalFactors) { // Get working data const Handle(Interface_InterfaceModel)& aModel = theWS->Model(); @@ -2694,7 +2702,7 @@ Handle(StepDimTol_Datum) STEPCAFControl_Writer::writeDatumAP242(const Handle(XSC // Common for all datum targets StepBasic_Unit aUnit = GetUnit(aRC); gp_Ax2 aDTAxis = anObject->GetDatumTargetAxis(); - GeomToStep_MakeAxis2Placement3d anAxisMaker(aDTAxis); + GeomToStep_MakeAxis2Placement3d anAxisMaker(aDTAxis, theLocalFactors); Handle(StepGeom_Axis2Placement3d) anA2P3D = anAxisMaker.Value(); anA2P3D->SetName(new TCollection_HAsciiString("orientation")); Handle(StepRepr_HArray1OfRepresentationItem) anItems; @@ -2788,7 +2796,7 @@ Handle(StepDimTol_Datum) STEPCAFControl_Writer::writeDatumAP242(const Handle(XSC //Annotation plane and Presentation writePresentation(theWS, anObject->GetPresentation(), anObject->GetPresentationName(), Standard_True, anObject->HasPlane(), - anObject->GetPlane(), anObject->GetPointTextAttach(), aSA); + anObject->GetPlane(), anObject->GetPointTextAttach(), aSA, theLocalFactors); return aDatum; } @@ -2801,7 +2809,8 @@ Handle(StepDimTol_Datum) STEPCAFControl_Writer::writeDatumAP242(const Handle(XSC static void WriteDimValues(const Handle(XSControl_WorkSession)& theWS, const Handle(XCAFDimTolObjects_DimensionObject)& theObject, const Handle(StepRepr_RepresentationContext)& theRC, - const StepShape_DimensionalCharacteristic& theDimension) + const StepShape_DimensionalCharacteristic& theDimension, + const StepData_Factors& theLocalFactors) { // Get working data const Handle(Interface_InterfaceModel)& aModel = theWS->Model(); @@ -2928,7 +2937,7 @@ static void WriteDimValues(const Handle(XSControl_WorkSession)& theWS, Handle(StepGeom_Axis2Placement3d) anOrientation = new StepGeom_Axis2Placement3d(); gp_Dir aDir; theObject->GetDirection(aDir); - GeomToStep_MakeCartesianPoint MkPoint(gp_Pnt(0, 0, 0)); + GeomToStep_MakeCartesianPoint MkPoint(gp_Pnt(0, 0, 0), theLocalFactors.LengthFactor()); const Handle(StepGeom_CartesianPoint)& aLoc = MkPoint.Value(); Handle(StepGeom_Direction) anAxis = new StepGeom_Direction(); Handle(TColStd_HArray1OfReal) aCoords = new TColStd_HArray1OfReal(1, 3); @@ -3025,13 +3034,14 @@ static void WriteDerivedGeometry(const Handle(XSControl_WorkSession)& theWS, const Handle(StepRepr_ConstructiveGeometryRepresentation)& theRepr, Handle(StepRepr_ShapeAspect)& theFirstSA, Handle(StepRepr_ShapeAspect)& theSecondSA, - NCollection_Vector& thePnts) + NCollection_Vector& thePnts, + const StepData_Factors& theLocalFactors) { const Handle(Interface_InterfaceModel)& aModel = theWS->Model(); // First point if (theObject->HasPoint()) { - GeomToStep_MakeCartesianPoint aPointMaker(theObject->GetPoint()); + GeomToStep_MakeCartesianPoint aPointMaker(theObject->GetPoint(), theLocalFactors.LengthFactor()); Handle(StepGeom_CartesianPoint) aPoint = aPointMaker.Value(); thePnts.Append(aPoint); Handle(StepRepr_DerivedShapeAspect) aDSA = new StepRepr_DerivedShapeAspect(); @@ -3052,7 +3062,7 @@ static void WriteDerivedGeometry(const Handle(XSControl_WorkSession)& theWS, // Second point (for locations) if (theObject->HasPoint2()) { - GeomToStep_MakeCartesianPoint aPointMaker(theObject->GetPoint2()); + GeomToStep_MakeCartesianPoint aPointMaker(theObject->GetPoint2(), theLocalFactors.LengthFactor()); Handle(StepGeom_CartesianPoint) aPoint = aPointMaker.Value(); thePnts.Append(aPoint); Handle(StepRepr_DerivedShapeAspect) aDSA = new StepRepr_DerivedShapeAspect(); @@ -3080,7 +3090,8 @@ static Handle(StepDimTol_HArray1OfDatumSystemOrReference) WriteDatumSystem(const const TDF_Label theGeomTolL, const TDF_LabelSequence& theDatumSeq, const STEPConstruct_DataMapOfAsciiStringTransient& theDatumMap, - const Handle(StepRepr_RepresentationContext)& theRC) + const Handle(StepRepr_RepresentationContext)& theRC, + const StepData_Factors& theLocalFactors) { // Get working data const Handle(Interface_InterfaceModel)& aModel = theWS->Model(); @@ -3249,7 +3260,7 @@ static Handle(StepDimTol_HArray1OfDatumSystemOrReference) WriteDatumSystem(const // Axis if (anObject->HasAxis()) { - GeomToStep_MakeAxis2Placement3d anAxisMaker(anObject->GetAxis()); + GeomToStep_MakeAxis2Placement3d anAxisMaker(anObject->GetAxis(), theLocalFactors); Handle(StepGeom_Axis2Placement3d) anAxis = anAxisMaker.Value(); anAxis->SetName(new TCollection_HAsciiString("orientation")); Handle(StepAP242_GeometricItemSpecificUsage) aGISU = new StepAP242_GeometricItemSpecificUsage(); @@ -3335,7 +3346,8 @@ void STEPCAFControl_Writer::writeGeomTolerance(const Handle(XSControl_WorkSessio const TDF_LabelSequence& theShapeSeqL, const TDF_Label& theGeomTolL, const Handle(StepDimTol_HArray1OfDatumSystemOrReference)& theDatumSystem, - const Handle(StepRepr_RepresentationContext)& theRC) + const Handle(StepRepr_RepresentationContext)& theRC, + const StepData_Factors& theLocalFactors) { // Get working data const Handle(Interface_InterfaceModel)& aModel = theWS->Model(); @@ -3532,7 +3544,7 @@ void STEPCAFControl_Writer::writeGeomTolerance(const Handle(XSControl_WorkSessio writeToleranceZone(theWS, anObject, aGeomTol, theRC); //Annotation plane and Presentation writePresentation(theWS, anObject->GetPresentation(), anObject->GetPresentationName(), Standard_True, anObject->HasPlane(), - anObject->GetPlane(), anObject->GetPointTextAttach(), aGeomTol); + anObject->GetPlane(), anObject->GetPointTextAttach(), aGeomTol, theLocalFactors); } //======================================================================= @@ -3914,7 +3926,8 @@ Standard_Boolean STEPCAFControl_Writer::writeDGTs(const Handle(XSControl_WorkSes //purpose : //======================================================================= Standard_Boolean STEPCAFControl_Writer::writeDGTsAP242(const Handle(XSControl_WorkSession)& theWS, - const TDF_LabelSequence& theLabels) + const TDF_LabelSequence& theLabels, + const StepData_Factors& theLocalFactors) { (void)theLabels; // Get working data @@ -3970,7 +3983,8 @@ Standard_Boolean STEPCAFControl_Writer::writeDGTsAP242(const Handle(XSControl_Wo Handle(Standard_Transient) aWrittenDatum; Standard_Boolean isFirstDT = !aDatumMap.Find(aDatumName, aWrittenDatum); Handle(StepDimTol_Datum) aDatum = writeDatumAP242(theWS, aShapeL, aDatumL, isFirstDT, - Handle(StepDimTol_Datum)::DownCast(aWrittenDatum)); + Handle(StepDimTol_Datum)::DownCast(aWrittenDatum), + theLocalFactors); // Add created Datum into Map aDatumMap.Bind(aDatumName, aDatum); } @@ -4012,7 +4026,7 @@ Standard_Boolean STEPCAFControl_Writer::writeDGTsAP242(const Handle(XSControl_Wo aSA->Init(new TCollection_HAsciiString(), new TCollection_HAsciiString(), myGDTCommonPDS, StepData_LTrue); aModel->AddWithRefs(aSA); writePresentation(theWS, anObject->GetPresentation(), anObject->GetPresentationName(), anObject->HasPlane(), - Standard_False, anObject->GetPlane(), anObject->GetPointTextAttach(), aSA); + Standard_False, anObject->GetPlane(), anObject->GetPointTextAttach(), aSA, theLocalFactors); } if (!XCAFDoc_DimTolTool::GetRefShapeLabel(aDimensionL, aFirstShapeL, aSecondShapeL)) @@ -4084,14 +4098,14 @@ Standard_Boolean STEPCAFControl_Writer::writeDGTsAP242(const Handle(XSControl_Wo if (anObject->GetType() == XCAFDimTolObjects_DimensionType_DimensionPresentation) { writePresentation(theWS, anObject->GetPresentation(), anObject->GetPresentationName(), anObject->HasPlane(), - Standard_False, anObject->GetPlane(), anObject->GetPointTextAttach(), aFirstSA); + Standard_False, anObject->GetPlane(), anObject->GetPointTextAttach(), aFirstSA, theLocalFactors); continue; } // Write dimensions StepShape_DimensionalCharacteristic aDimension; if (anObject->HasPoint() || anObject->HasPoint2()) - WriteDerivedGeometry(theWS, anObject, aCGRepr, aFirstSA, aSecondSA, aConnectionPnts); + WriteDerivedGeometry(theWS, anObject, aCGRepr, aFirstSA, aSecondSA, aConnectionPnts, theLocalFactors); XCAFDimTolObjects_DimensionType aDimType = anObject->GetType(); if (STEPCAFControl_GDTProperty::IsDimensionalLocation(aDimType)) { @@ -4165,10 +4179,10 @@ Standard_Boolean STEPCAFControl_Writer::writeDGTsAP242(const Handle(XSControl_Wo } // Write values - WriteDimValues(theWS, anObject, aRC, aDimension); + WriteDimValues(theWS, anObject, aRC, aDimension, theLocalFactors); //Annotation plane and Presentation writePresentation(theWS, anObject->GetPresentation(), anObject->GetPresentationName(), Standard_True, anObject->HasPlane(), - anObject->GetPlane(), anObject->GetPointTextAttach(), aDimension.Value()); + anObject->GetPlane(), anObject->GetPointTextAttach(), aDimension.Value(), theLocalFactors); } // Write Derived geometry if (aConnectionPnts.Length() > 0) @@ -4203,8 +4217,8 @@ Standard_Boolean STEPCAFControl_Writer::writeDGTsAP242(const Handle(XSControl_Wo XCAFDoc_DimTolTool::GetDatumWithObjectOfTolerLabels(aGeomTolL, aDatumSeq); Handle(StepDimTol_HArray1OfDatumSystemOrReference) aDatumSystem; if (aDatumSeq.Length() > 0) - aDatumSystem = WriteDatumSystem(theWS, aGeomTolL, aDatumSeq, aDatumMap, aRC); - writeGeomTolerance(theWS, aFirstShapeL, aGeomTolL, aDatumSystem, aRC); + aDatumSystem = WriteDatumSystem(theWS, aGeomTolL, aDatumSeq, aDatumMap, aRC, theLocalFactors); + writeGeomTolerance(theWS, aFirstShapeL, aGeomTolL, aDatumSystem, aRC, theLocalFactors); } // Write Draughting model for Annotation Planes diff --git a/src/STEPCAFControl/STEPCAFControl_Writer.hxx b/src/STEPCAFControl/STEPCAFControl_Writer.hxx index f35dafd28b..8261c03a0d 100644 --- a/src/STEPCAFControl/STEPCAFControl_Writer.hxx +++ b/src/STEPCAFControl/STEPCAFControl_Writer.hxx @@ -38,6 +38,7 @@ class XSControl_WorkSession; class TDocStd_Document; class STEPCAFControl_ExternFile; class TopoDS_Shape; +class StepData_Factors; //! Provides a tool to write DECAF document to the //! STEP file. Besides transfer of shapes (including @@ -188,6 +189,7 @@ protected: TopoDS_Shape transferExternFiles(const TDF_Label& theLabel, const STEPControl_StepModelType theMode, TDF_LabelSequence& theLabelSeq, + const StepData_Factors& theLocalFactors, const Standard_CString thePrefix = "", const Message_ProgressRange& theProgress = Message_ProgressRange()); @@ -209,7 +211,8 @@ protected: //! Write D>s assigned to specified labels, to STEP model, according AP242 Standard_Boolean writeDGTsAP242(const Handle(XSControl_WorkSession)& theWS, - const TDF_LabelSequence& theLabels); + const TDF_LabelSequence& theLabels, + const StepData_Factors& theLocalFactors); //! Write materials assigned to specified labels, to STEP model Standard_Boolean writeMaterials(const Handle(XSControl_WorkSession)& theWS, @@ -233,7 +236,8 @@ protected: //! If it exists, initializes local length unit from it //! Else initializes according to Cascade length unit void prepareUnit(const TDF_Label& theLabel, - const Handle(StepData_StepModel)& theModel); + const Handle(StepData_StepModel)& theModel, + StepData_Factors& theLocalFactors); Handle(StepRepr_ShapeAspect) writeShapeAspect(const Handle(XSControl_WorkSession)& theWS, const TDF_Label theLabel, @@ -248,13 +252,15 @@ protected: const Standard_Boolean theHasPlane, const gp_Ax2& theAnnotationPlane, const gp_Pnt& theTextPosition, - const Handle(Standard_Transient)& theDimension); + const Handle(Standard_Transient)& theDimension, + const StepData_Factors& theLocalFactors); Handle(StepDimTol_Datum) writeDatumAP242(const Handle(XSControl_WorkSession)& theWS, const TDF_LabelSequence& theShapeL, const TDF_Label& theDatumL, const Standard_Boolean isFirstDTarget, - const Handle(StepDimTol_Datum)& theWrittenDatum); + const Handle(StepDimTol_Datum)& theWrittenDatum, + const StepData_Factors& theLocalFactors); void writeToleranceZone(const Handle(XSControl_WorkSession)& theWS, const Handle(XCAFDimTolObjects_GeomToleranceObject)& theObject, @@ -265,7 +271,8 @@ protected: const TDF_LabelSequence& theShapeSeqL, const TDF_Label& theGeomTolL, const Handle(StepDimTol_HArray1OfDatumSystemOrReference)& theDatumSystem, - const Handle(StepRepr_RepresentationContext)& theRC); + const Handle(StepRepr_RepresentationContext)& theRC, + const StepData_Factors& theLocalFactors); private: diff --git a/src/STEPConstruct/STEPConstruct_ContextTool.cxx b/src/STEPConstruct/STEPConstruct_ContextTool.cxx index 873e91cf95..3f15bf466d 100644 --- a/src/STEPConstruct/STEPConstruct_ContextTool.cxx +++ b/src/STEPConstruct/STEPConstruct_ContextTool.cxx @@ -82,6 +82,15 @@ void STEPConstruct_ContextTool::SetModel (const Handle(StepData_StepModel)& aSte } } +//======================================================================= +//function : SetGlobalFactor +//purpose : +//======================================================================= +void STEPConstruct_ContextTool::SetGlobalFactor(const StepData_Factors& theGlobalFactor) +{ + myGlobalFactor = theGlobalFactor; +} + //======================================================================= //function : GetAPD //purpose : @@ -445,7 +454,7 @@ void STEPConstruct_ContextTool::SetSDR (const Handle(StepShape_ShapeDefinitionRe Handle(StepGeom_Axis2Placement3d) STEPConstruct_ContextTool::GetDefaultAxis () { if ( myAxis.IsNull() ) { - GeomToStep_MakeAxis2Placement3d mkax; + GeomToStep_MakeAxis2Placement3d mkax(myGlobalFactor); myAxis = mkax.Value(); } return myAxis; diff --git a/src/STEPConstruct/STEPConstruct_ContextTool.hxx b/src/STEPConstruct/STEPConstruct_ContextTool.hxx index 732a88aa11..112aecc260 100644 --- a/src/STEPConstruct/STEPConstruct_ContextTool.hxx +++ b/src/STEPConstruct/STEPConstruct_ContextTool.hxx @@ -23,6 +23,7 @@ #include #include +#include #include #include class StepBasic_ApplicationProtocolDefinition; @@ -54,6 +55,8 @@ public: //! Initialize ApplicationProtocolDefinition by the first //! entity of that type found in the model Standard_EXPORT void SetModel (const Handle(StepData_StepModel)& aStepModel); + + Standard_EXPORT void SetGlobalFactor(const StepData_Factors& theGlobalFactor); Standard_EXPORT Handle(StepBasic_ApplicationProtocolDefinition) GetAPD(); @@ -139,7 +142,7 @@ private: Handle(StepBasic_ApplicationProtocolDefinition) theAPD; STEPConstruct_AP203Context theAP203; Handle(StepGeom_Axis2Placement3d) myAxis; - + StepData_Factors myGlobalFactor; }; diff --git a/src/STEPConstruct/STEPConstruct_UnitContext.cxx b/src/STEPConstruct/STEPConstruct_UnitContext.cxx index 665e80292a..57a5fb485c 100644 --- a/src/STEPConstruct/STEPConstruct_UnitContext.cxx +++ b/src/STEPConstruct/STEPConstruct_UnitContext.cxx @@ -33,8 +33,8 @@ #include #include #include -#include #include +#include #include #include #include @@ -63,7 +63,8 @@ STEPConstruct_UnitContext::STEPConstruct_UnitContext() //purpose : //======================================================================= -void STEPConstruct_UnitContext::Init(const Standard_Real Tol3d) +void STEPConstruct_UnitContext::Init(const Standard_Real Tol3d, + const StepData_Factors& theLocalFactors) { done = Standard_True; @@ -155,7 +156,7 @@ void STEPConstruct_UnitContext::Init(const Standard_Real Tol3d) Handle(StepBasic_MeasureValueMember) mvs = new StepBasic_MeasureValueMember; mvs->SetName("LENGTH_MEASURE"); - mvs->SetReal ( Tol3d / StepData_GlobalFactors::Intance().LengthFactor() ); + mvs->SetReal ( Tol3d / theLocalFactors.LengthFactor() ); StepBasic_Unit Unit; Unit.SetValue ( lengthUnit ); theTol3d->Init(mvs, Unit, TolName, TolDesc); @@ -242,7 +243,8 @@ Standard_Boolean STEPConstruct_UnitContext::SiUnitNameFactor(const Handle(StepBa // Purpose : // ========================================================================== -Standard_Integer STEPConstruct_UnitContext::ComputeFactors(const Handle(StepRepr_GlobalUnitAssignedContext)& aContext) +Standard_Integer STEPConstruct_UnitContext::ComputeFactors(const Handle(StepRepr_GlobalUnitAssignedContext)& aContext, + const StepData_Factors& theLocalFactors) { Standard_Integer status = 0; @@ -268,7 +270,7 @@ Standard_Integer STEPConstruct_UnitContext::ComputeFactors(const Handle(StepRepr for (Standard_Integer i = 1; i <= nbU; i++) { Handle(StepBasic_NamedUnit) theNamedUnit = aContext->UnitsValue(i); - status = ComputeFactors(theNamedUnit); + status = ComputeFactors(theNamedUnit, theLocalFactors); #ifdef OCCT_DEBUG if(status == -1) std::cout << " -- STEPConstruct_UnitContext:ComputeFactor: Unit item no." << i << " is not recognized" << std::endl; @@ -278,7 +280,8 @@ Standard_Integer STEPConstruct_UnitContext::ComputeFactors(const Handle(StepRepr } -Standard_Integer STEPConstruct_UnitContext::ComputeFactors(const Handle(StepBasic_NamedUnit)& aUnit) +Standard_Integer STEPConstruct_UnitContext::ComputeFactors(const Handle(StepBasic_NamedUnit)& aUnit, + const StepData_Factors& theLocalFactors) { //:f3 abv 8 Apr 98: ProSTEP TR8 tr8_as_sd_sw: the case of unrecognized entity @@ -379,7 +382,7 @@ Standard_Integer STEPConstruct_UnitContext::ComputeFactors(const Handle(StepBasi return 0; } - const Standard_Real aCascadeUnit = StepData_GlobalFactors::Intance().CascadeUnit(); + const Standard_Real aCascadeUnit = theLocalFactors.CascadeUnit(); if (aUnit->IsKind(STANDARD_TYPE(StepBasic_ConversionBasedUnitAndLengthUnit))|| aUnit->IsKind(STANDARD_TYPE(StepBasic_SiUnitAndLengthUnit))) { #ifdef METER diff --git a/src/STEPConstruct/STEPConstruct_UnitContext.hxx b/src/STEPConstruct/STEPConstruct_UnitContext.hxx index a656e27a2a..40a1bd5e2e 100644 --- a/src/STEPConstruct/STEPConstruct_UnitContext.hxx +++ b/src/STEPConstruct/STEPConstruct_UnitContext.hxx @@ -24,6 +24,7 @@ #include #include #include +class StepData_Factors; class StepGeom_GeomRepContextAndGlobUnitAssCtxAndGlobUncertaintyAssCtx; class StepRepr_GlobalUnitAssignedContext; class StepBasic_NamedUnit; @@ -45,7 +46,8 @@ public: //! Creates new context (units are MM and radians, //! uncertainty equal to Tol3d) - Standard_EXPORT void Init (const Standard_Real Tol3d); + Standard_EXPORT void Init (const Standard_Real Tol3d, + const StepData_Factors& theLocalFactors); //! Returns True if Init was called successfully Standard_EXPORT Standard_Boolean IsDone() const; @@ -55,9 +57,11 @@ public: //! Computes the length, plane angle and solid angle conversion //! factor . Returns a status, 0 if OK - Standard_EXPORT Standard_Integer ComputeFactors (const Handle(StepRepr_GlobalUnitAssignedContext)& aContext); + Standard_EXPORT Standard_Integer ComputeFactors (const Handle(StepRepr_GlobalUnitAssignedContext)& aContext, + const StepData_Factors& theLocalFactors); - Standard_EXPORT Standard_Integer ComputeFactors (const Handle(StepBasic_NamedUnit)& aUnit); + Standard_EXPORT Standard_Integer ComputeFactors (const Handle(StepBasic_NamedUnit)& aUnit, + const StepData_Factors& theLocalFactors); //! Computes the uncertainty value (for length) Standard_EXPORT Standard_Integer ComputeTolerance (const Handle(StepRepr_GlobalUncertaintyAssignedContext)& aContext); diff --git a/src/STEPConstruct/STEPConstruct_ValidationProps.cxx b/src/STEPConstruct/STEPConstruct_ValidationProps.cxx index 4b100b3a2e..558b97dc63 100644 --- a/src/STEPConstruct/STEPConstruct_ValidationProps.cxx +++ b/src/STEPConstruct/STEPConstruct_ValidationProps.cxx @@ -29,6 +29,7 @@ #include #include #include +#include #include #include #include @@ -623,7 +624,9 @@ TopoDS_Shape STEPConstruct_ValidationProps::GetPropShape (const Handle(StepRepr_ //======================================================================= Standard_Boolean STEPConstruct_ValidationProps::GetPropReal (const Handle(StepRepr_RepresentationItem) &item, - Standard_Real &Val, Standard_Boolean &isArea) const + Standard_Real &Val, + Standard_Boolean &isArea, + const StepData_Factors& theLocalFactors) const { // decode volume & area if ( ! item->IsKind(STANDARD_TYPE(StepRepr_MeasureRepresentationItem)) ) @@ -644,7 +647,7 @@ Standard_Boolean STEPConstruct_ValidationProps::GetPropReal (const Handle(StepRe Standard_Real exp = DUE->Exponent(); Handle(StepBasic_NamedUnit) NU = DUE->Unit(); STEPConstruct_UnitContext unit; - unit.ComputeFactors(NU); + unit.ComputeFactors(NU, theLocalFactors); if(unit.LengthDone()) { Standard_Real lengthFactor = unit.LengthFactor(); scale *= pow(lengthFactor,exp); @@ -655,7 +658,7 @@ Standard_Boolean STEPConstruct_ValidationProps::GetPropReal (const Handle(StepRe Handle(StepBasic_NamedUnit) NU = Unit.NamedUnit(); if(!NU.IsNull()) { STEPConstruct_UnitContext unit; - unit.ComputeFactors(NU); + unit.ComputeFactors(NU, theLocalFactors); if(unit.AreaDone()) scale = unit.AreaFactor(); if(unit.VolumeDone()) @@ -682,8 +685,9 @@ Standard_Boolean STEPConstruct_ValidationProps::GetPropReal (const Handle(StepRe //======================================================================= Standard_Boolean STEPConstruct_ValidationProps::GetPropPnt (const Handle(StepRepr_RepresentationItem) &item, - const Handle(StepRepr_RepresentationContext) &Context, - gp_Pnt &Pnt) const + const Handle(StepRepr_RepresentationContext) &Context, + gp_Pnt &Pnt, + const StepData_Factors& theLocalFactors) const { // centroid if ( ! item->IsKind(STANDARD_TYPE(StepGeom_CartesianPoint)) ) @@ -713,7 +717,7 @@ Standard_Boolean STEPConstruct_ValidationProps::GetPropPnt (const Handle(StepRep } if ( ! theGUAC.IsNull() ) { STEPConstruct_UnitContext UnitTool; - UnitTool.ComputeFactors(theGUAC); + UnitTool.ComputeFactors(theGUAC, theLocalFactors); gp_Pnt zero(0,0,0); pos.Scale ( zero, UnitTool.LengthFactor() ); } diff --git a/src/STEPConstruct/STEPConstruct_ValidationProps.hxx b/src/STEPConstruct/STEPConstruct_ValidationProps.hxx index b25b35eb80..4a7bec3d51 100644 --- a/src/STEPConstruct/STEPConstruct_ValidationProps.hxx +++ b/src/STEPConstruct/STEPConstruct_ValidationProps.hxx @@ -26,6 +26,7 @@ #include #include class StepBasic_ProductDefinition; +class StepData_Factors; class XSControl_WorkSession; class TopoDS_Shape; class StepRepr_RepresentationItem; @@ -111,10 +112,16 @@ public: //! If Property is neither Area nor Volume, returns False //! Else returns True and isArea indicates whether property //! is area or volume - Standard_EXPORT Standard_Boolean GetPropReal (const Handle(StepRepr_RepresentationItem)& item, Standard_Real& Val, Standard_Boolean& isArea) const; + Standard_EXPORT Standard_Boolean GetPropReal (const Handle(StepRepr_RepresentationItem)& item, + Standard_Real& Val, + Standard_Boolean& isArea, + const StepData_Factors& theLocalFactors) const; //! Returns value of Centriod property (or False if it is not) - Standard_EXPORT Standard_Boolean GetPropPnt (const Handle(StepRepr_RepresentationItem)& item, const Handle(StepRepr_RepresentationContext)& Context, gp_Pnt& Pnt) const; + Standard_EXPORT Standard_Boolean GetPropPnt (const Handle(StepRepr_RepresentationItem)& item, + const Handle(StepRepr_RepresentationContext)& Context, + gp_Pnt& Pnt, + const StepData_Factors& theLocalFactors) const; //! Sets current assembly shape SDR (for FindCDSR calls) Standard_EXPORT void SetAssemblyShape (const TopoDS_Shape& shape); diff --git a/src/STEPControl/STEPControl_ActorRead.cxx b/src/STEPControl/STEPControl_ActorRead.cxx index a3f81219fb..fcdd8c7ab4 100644 --- a/src/STEPControl/STEPControl_ActorRead.cxx +++ b/src/STEPControl/STEPControl_ActorRead.cxx @@ -41,8 +41,8 @@ #include #include #include +#include #include -#include #include #include #include @@ -296,12 +296,15 @@ Handle(Transfer_Binder) STEPControl_ActorRead::Transfer const Message_ProgressRange& theProgress) { // [BEGIN] Get version of preprocessor (to detect I-Deas case) (ssv; 23.11.2010) + StepData_Factors aLocalFactors; Handle(StepData_StepModel) aStepModel = Handle(StepData_StepModel)::DownCast ( TP->Model() ); if (!aStepModel->IsInitializedUnit()) { XSAlgo::AlgoContainer()->PrepareForTransfer(); // update unit info aStepModel->SetLocalLengthUnit(UnitsMethods::GetCasCadeLengthUnit()); + aLocalFactors.SetCascadeUnit(UnitsMethods::GetCasCadeLengthUnit()); } + aLocalFactors.SetCascadeUnit(aStepModel->LocalLengthUnit()); Interface_EntityIterator anEntIt = aStepModel->Header(); for ( anEntIt.Start(); anEntIt.More(); anEntIt.Next() ) { DeclareAndCast( HeaderSection_FileName, aFileNameEntity, anEntIt.Value() ); @@ -323,7 +326,7 @@ Handle(Transfer_Binder) STEPControl_ActorRead::Transfer } // [END] Get version of preprocessor (to detect I-Deas case) (ssv; 23.11.2010) Standard_Boolean aTrsfUse = (Interface_Static::IVal("read.step.root.transformation") == 1); - return TransferShape(start, TP, Standard_True, aTrsfUse, theProgress); + return TransferShape(start, TP, aLocalFactors, Standard_True, aTrsfUse, theProgress); } @@ -492,6 +495,7 @@ static void getSDR(const Handle(StepRepr_ProductDefinitionShape)& PDS, Handle(TransferBRep_ShapeBinder) STEPControl_ActorRead::TransferEntity (const Handle(StepBasic_ProductDefinition)& PD, const Handle(Transfer_TransientProcess)& TP, + const StepData_Factors& theLocalFactors, const Standard_Boolean theUseTrsf, const Message_ProgressRange& theProgress) @@ -577,7 +581,7 @@ static void getSDR(const Handle(StepRepr_ProductDefinitionShape)& PDS, #endif Handle(Transfer_Binder) binder; Message_ProgressRange aRange = PS.Next(); - if (!TP->IsBound(NAUO)) binder = TransferEntity(NAUO,TP, aRange); + if (!TP->IsBound(NAUO)) binder = TransferEntity(NAUO, TP, theLocalFactors, aRange); else binder = TP->Find(NAUO); TopoDS_Shape theResult = TransferBRep::ShapeResult (binder); @@ -618,7 +622,7 @@ static void getSDR(const Handle(StepRepr_ProductDefinitionShape)& PDS, Standard_Boolean useTrsf = theUseTrsf && (i <= nbNotAspect); Handle(Transfer_Binder) binder = TP->Find(rep); if (binder.IsNull()) - binder = TransferEntity(rep, TP, isBound, useTrsf, aPS1.Next()); + binder = TransferEntity(rep, TP, theLocalFactors, isBound, useTrsf, aPS1.Next()); // if SDR is obtained from ShapeAspect and representation items have already been tramnslated, // this means that that ShapeAspect is used to refer to sub-shape of the main shape @@ -668,7 +672,7 @@ static void getSDR(const Handle(StepRepr_ProductDefinitionShape)& PDS, // SKL for bug 29068: parameter useTrsf is used because if root entity has connection with other // by ShapeRepresentationRelationship then result after such transferring need to transform also. // This case is from test "bugs modalg_7 bug30196" - binder = TransferEntity(SRR, TP, nbrep, useTrsf, aPS1.Next()); + binder = TransferEntity(SRR, TP, theLocalFactors, nbrep, useTrsf, aPS1.Next()); if (! binder.IsNull()) { theResult = TransferBRep::ShapeResult (binder); Result1 = theResult; @@ -680,7 +684,7 @@ static void getSDR(const Handle(StepRepr_ProductDefinitionShape)& PDS, { Handle(StepRepr_ConstructiveGeometryRepresentationRelationship) aCSRR = Handle(StepRepr_ConstructiveGeometryRepresentationRelationship)::DownCast(anitem); - binder = TransferEntity(aCSRR, TP); + binder = TransferEntity(aCSRR, TP, theLocalFactors); if (! binder.IsNull()) { Result1 = TransferBRep::ShapeResult (binder); @@ -715,6 +719,7 @@ static void getSDR(const Handle(StepRepr_ProductDefinitionShape)& PDS, Handle(TransferBRep_ShapeBinder) STEPControl_ActorRead::TransferEntity (const Handle(StepRepr_NextAssemblyUsageOccurrence)& NAUO, const Handle(Transfer_TransientProcess)& TP, + const StepData_Factors& theLocalFactors, const Message_ProgressRange& theProgress) { Handle(TransferBRep_ShapeBinder) shbinder; @@ -740,7 +745,7 @@ Handle(TransferBRep_ShapeBinder) STEPControl_ActorRead::TransferEntity Handle(StepRepr_Representation) rep = ( SRRReversed ? RR->Rep2() : RR->Rep1() ); if(rep.IsNull()) continue; - iatrsf = ComputeSRRWT ( RR, TP, Trsf ); + iatrsf = ComputeSRRWT ( RR, TP, Trsf, theLocalFactors); // find real ProductDefinition used rep Interface_EntityIterator subs3 = TP->Graph().Sharings(rep); for (subs3.Start(); subs3.More(); subs3.Next()) { @@ -776,7 +781,7 @@ Handle(TransferBRep_ShapeBinder) STEPControl_ActorRead::TransferEntity if(!PD.IsNull()) { binder = TP->Find(PD); - if (binder.IsNull()) binder = TransferEntity(PD, TP, Standard_False, aPS.Next()); + if (binder.IsNull()) binder = TransferEntity(PD, TP, theLocalFactors, Standard_False, aPS.Next()); theResult = TransferBRep::ShapeResult(binder); if (!theResult.IsNull()) { if (iatrsf) { @@ -790,7 +795,7 @@ Handle(TransferBRep_ShapeBinder) STEPControl_ActorRead::TransferEntity if ( theResult.IsNull() && !SRR.IsNull() ) { binder = TP->Find(SRR); if ( binder.IsNull() ) { - binder = TransferEntity(SRR, TP, 0, Standard_False, aPS.Next()); + binder = TransferEntity(SRR, TP, theLocalFactors, 0, Standard_False, aPS.Next()); theResult = TransferBRep::ShapeResult (binder); if (!theResult.IsNull()) shbinder = new TransferBRep_ShapeBinder (theResult); @@ -810,6 +815,7 @@ Handle(TransferBRep_ShapeBinder) STEPControl_ActorRead::TransferEntity Handle(TransferBRep_ShapeBinder) STEPControl_ActorRead::TransferEntity( const Handle(StepShape_ShapeRepresentation)& sr, const Handle(Transfer_TransientProcess)& TP, + const StepData_Factors& theLocalFactors, Standard_Boolean& isBound, const Standard_Boolean theUseTrsf, const Message_ProgressRange& theProgress) @@ -830,7 +836,8 @@ Handle(TransferBRep_ShapeBinder) STEPControl_ActorRead::TransferEntity( // Compute unit conversion factors and geometric Accuracy Handle(StepRepr_Representation) oldSRContext = mySRContext; //:S4136 - PrepareUnits(sr,TP); + StepData_Factors aLocalFactors = theLocalFactors; + PrepareUnits(sr, TP, aLocalFactors); BRep_Builder B; TopoDS_Compound comp; @@ -901,7 +908,7 @@ Handle(TransferBRep_ShapeBinder) STEPControl_ActorRead::TransferEntity( if (!subs3.More()) { Handle(StepGeom_Axis2Placement3d) aCS = Handle(StepGeom_Axis2Placement3d)::DownCast(anitem); - Handle(Geom_Axis2Placement) aTargAP = StepToGeom::MakeAxis2Placement(aCS); + Handle(Geom_Axis2Placement) aTargAP = StepToGeom::MakeAxis2Placement(aCS, aLocalFactors); if (!aTargAP.IsNull()) { const gp_Ax3 ax3Orig(gp_Pnt(0., 0., 0), gp_Vec(0., 0., 1.), gp_Vec(1., 0., 0.)); @@ -920,7 +927,7 @@ Handle(TransferBRep_ShapeBinder) STEPControl_ActorRead::TransferEntity( } Handle(Transfer_Binder) binder; if (!TP->IsBound(anitem)) { - binder = TransferShape(anitem, TP, isManifold, Standard_False, aRange); + binder = TransferShape(anitem, TP, aLocalFactors, isManifold, Standard_False, aRange); } else { isBound = Standard_True; @@ -1043,7 +1050,7 @@ Handle(TransferBRep_ShapeBinder) STEPControl_ActorRead::TransferEntity( shbinder = new TransferBRep_ShapeBinder(comp); } - PrepareUnits ( oldSRContext, TP ); //:S4136 + PrepareUnits ( oldSRContext, TP, aLocalFactors); //:S4136 TP->Bind(sr, shbinder); @@ -1062,6 +1069,7 @@ Handle(TransferBRep_ShapeBinder) STEPControl_ActorRead::TransferEntity( Handle(TransferBRep_ShapeBinder) STEPControl_ActorRead::TransferEntity (const Handle(StepShape_ContextDependentShapeRepresentation)& CDSR, const Handle(Transfer_TransientProcess)& TP, + const StepData_Factors& theLocalFactors, const Message_ProgressRange& theProgress) { Handle(TransferBRep_ShapeBinder) shbinder; @@ -1079,11 +1087,11 @@ Handle(TransferBRep_ShapeBinder) STEPControl_ActorRead::TransferEntity TopoDS_Shape theResult; gp_Trsf Trsf; - Standard_Boolean iatrsf = ComputeSRRWT ( SRR, TP, Trsf ); + Standard_Boolean iatrsf = ComputeSRRWT ( SRR, TP, Trsf, theLocalFactors); Handle(Transfer_Binder) binder; Standard_Boolean isBound = Standard_False; - if (!TP->IsBound(rep)) binder = TransferEntity(rep, TP, isBound, Standard_False, theProgress); + if (!TP->IsBound(rep)) binder = TransferEntity(rep, TP, theLocalFactors, isBound, Standard_False, theProgress); else binder = TP->Find(rep); theResult = TransferBRep::ShapeResult(binder); @@ -1107,6 +1115,7 @@ Handle(TransferBRep_ShapeBinder) STEPControl_ActorRead::TransferEntity Handle(TransferBRep_ShapeBinder) STEPControl_ActorRead::TransferEntity( const Handle(StepRepr_ShapeRepresentationRelationship)& und, const Handle(Transfer_TransientProcess)& TP, + const StepData_Factors& theLocalFactors, const Standard_Integer nbrep, const Standard_Boolean theUseTrsf, const Message_ProgressRange& theProgress) @@ -1126,7 +1135,7 @@ Handle(TransferBRep_ShapeBinder) STEPControl_ActorRead::TransferEntity( Standard_Integer nsh = 0; gp_Trsf Trsf; - Standard_Boolean iatrsf = ComputeSRRWT ( und, TP, Trsf ); + Standard_Boolean iatrsf = ComputeSRRWT(und, TP, Trsf, theLocalFactors); // Transfert : que faut-il prendre au juste ? Message_ProgressScope aPS(theProgress, NULL, 2); @@ -1141,7 +1150,7 @@ Handle(TransferBRep_ShapeBinder) STEPControl_ActorRead::TransferEntity( Handle(StepShape_ShapeRepresentation) anitem = Handle(StepShape_ShapeRepresentation)::DownCast(anitemt); Handle(Transfer_Binder) binder; Standard_Boolean isBound = Standard_False; - if (!TP->IsBound(anitem)) binder = TransferEntity(anitem, TP, isBound, theUseTrsf, aRange); + if (!TP->IsBound(anitem)) binder = TransferEntity(anitem, TP, theLocalFactors, isBound, theUseTrsf, aRange); else binder = TP->Find(anitem); TopoDS_Shape theResult = TransferBRep::ShapeResult (binder); if (!theResult.IsNull()) { @@ -1175,7 +1184,8 @@ Handle(TransferBRep_ShapeBinder) STEPControl_ActorRead::TransferEntity( Handle(TransferBRep_ShapeBinder) STEPControl_ActorRead::TransferEntity( const Handle(StepRepr_ConstructiveGeometryRepresentationRelationship)& theCGRR, - const Handle(Transfer_TransientProcess)& theTP) + const Handle(Transfer_TransientProcess)& theTP, + const StepData_Factors& theLocalFactors) { Handle(TransferBRep_ShapeBinder) shbinder; @@ -1183,6 +1193,7 @@ Handle(TransferBRep_ShapeBinder) STEPControl_ActorRead::TransferEntity( return shbinder; Standard_Boolean resetUnits = Standard_False; Handle(StepRepr_Representation) oldSRContext = mySRContext; + StepData_Factors aLocalFactors = theLocalFactors; TopoDS_Compound aComp; BRep_Builder aB; aB.MakeCompound(aComp); @@ -1194,7 +1205,7 @@ Handle(TransferBRep_ShapeBinder) STEPControl_ActorRead::TransferEntity( continue; if(mySRContext.IsNull() || aCRepr->ContextOfItems() != mySRContext->ContextOfItems()) { - PrepareUnits(aCRepr,theTP); + PrepareUnits(aCRepr,theTP, aLocalFactors); resetUnits = Standard_True; } Standard_Integer j =1; @@ -1207,7 +1218,7 @@ Handle(TransferBRep_ShapeBinder) STEPControl_ActorRead::TransferEntity( Handle(StepGeom_Axis2Placement3d)::DownCast(anItem); if( !aStepAxis.IsNull()) { - Handle(Geom_Axis2Placement) anAxis = StepToGeom::MakeAxis2Placement (aStepAxis); + Handle(Geom_Axis2Placement) anAxis = StepToGeom::MakeAxis2Placement (aStepAxis, aLocalFactors); if(anAxis.IsNull()) continue; Handle(Geom_Plane) aPlane = new Geom_Plane(gp_Ax3(anAxis->Ax2())); @@ -1223,7 +1234,7 @@ Handle(TransferBRep_ShapeBinder) STEPControl_ActorRead::TransferEntity( shbinder = new TransferBRep_ShapeBinder (aComp); mySRContext = oldSRContext; if(oldSRContext.IsNull() || resetUnits) - PrepareUnits(oldSRContext,theTP); + PrepareUnits(oldSRContext, theTP, aLocalFactors); theTP->Bind(theCGRR, shbinder); @@ -1382,6 +1393,7 @@ Handle(TransferBRep_ShapeBinder) STEPControl_ActorRead::OldWay Handle(TransferBRep_ShapeBinder) STEPControl_ActorRead::TransferEntity (const Handle(StepGeom_GeometricRepresentationItem)& start, const Handle(Transfer_TransientProcess)& TP, + const StepData_Factors& theLocalFactors, const Standard_Boolean isManifold, const Message_ProgressRange& theProgress) { @@ -1400,14 +1412,15 @@ Handle(TransferBRep_ShapeBinder) STEPControl_ActorRead::TransferEntity #endif //:S4136 + StepData_Factors aLocalFactors = theLocalFactors; Handle(StepRepr_Representation) oldSRContext = mySRContext; if ( mySRContext.IsNull() ) { // if no context, try to find it (ex: r0701_ug.stp #4790) Handle(StepRepr_Representation) context = FindContext ( start, TP ); if ( context.IsNull() ) { TP->AddWarning ( start, "Entity with no unit context; default units taken" ); - ResetUnits(); + ResetUnits(aLocalFactors); } - else PrepareUnits ( context, TP ); + else PrepareUnits ( context, TP, aLocalFactors); } myShapeBuilder.SetPrecision(myPrecision); myShapeBuilder.SetMaxTol(myMaxTol); @@ -1421,35 +1434,35 @@ Handle(TransferBRep_ShapeBinder) STEPControl_ActorRead::TransferEntity OCC_CATCH_SIGNALS Message_ProgressRange aRange = aPS.Next(); if (start->IsKind(STANDARD_TYPE(StepShape_FacetedBrep))) { - myShapeBuilder.Init(GetCasted(StepShape_FacetedBrep, start), TP, aRange); + myShapeBuilder.Init(GetCasted(StepShape_FacetedBrep, start), TP, aLocalFactors, aRange); found = Standard_True; } else if (start->IsKind(STANDARD_TYPE(StepShape_BrepWithVoids))) { - myShapeBuilder.Init(GetCasted(StepShape_BrepWithVoids, start), TP, aRange); + myShapeBuilder.Init(GetCasted(StepShape_BrepWithVoids, start), TP, aLocalFactors, aRange); found = Standard_True; } else if (start->IsKind(STANDARD_TYPE(StepShape_ManifoldSolidBrep))) { - myShapeBuilder.Init(GetCasted(StepShape_ManifoldSolidBrep, start), TP, aRange); + myShapeBuilder.Init(GetCasted(StepShape_ManifoldSolidBrep, start), TP, aLocalFactors, aRange); found = Standard_True; } else if (start->IsKind(STANDARD_TYPE(StepShape_ShellBasedSurfaceModel))) { - myShapeBuilder.Init(GetCasted(StepShape_ShellBasedSurfaceModel, start), TP, myNMTool, aRange); + myShapeBuilder.Init(GetCasted(StepShape_ShellBasedSurfaceModel, start), TP, myNMTool, aLocalFactors, aRange); found = Standard_True; } else if (start->IsKind(STANDARD_TYPE(StepShape_FacetedBrepAndBrepWithVoids))) { - myShapeBuilder.Init(GetCasted(StepShape_FacetedBrepAndBrepWithVoids, start), TP, aRange); + myShapeBuilder.Init(GetCasted(StepShape_FacetedBrepAndBrepWithVoids, start), TP, aLocalFactors, aRange); found = Standard_True; } else if (start->IsKind(STANDARD_TYPE(StepShape_GeometricSet))) { - myShapeBuilder.Init(GetCasted(StepShape_GeometricSet, start), TP, this, isManifold, aRange); + myShapeBuilder.Init(GetCasted(StepShape_GeometricSet, start), TP, aLocalFactors, this, isManifold, aRange); found = Standard_True; } else if (start->IsKind(STANDARD_TYPE(StepShape_EdgeBasedWireframeModel))) { - myShapeBuilder.Init(GetCasted(StepShape_EdgeBasedWireframeModel, start), TP); + myShapeBuilder.Init(GetCasted(StepShape_EdgeBasedWireframeModel, start), TP, aLocalFactors); found = Standard_True; } else if (start->IsKind(STANDARD_TYPE(StepShape_FaceBasedSurfaceModel))) { - myShapeBuilder.Init(GetCasted(StepShape_FaceBasedSurfaceModel, start), TP); + myShapeBuilder.Init(GetCasted(StepShape_FaceBasedSurfaceModel, start), TP, aLocalFactors); found = Standard_True; } // TODO: Normally, StepVisual_Tessellated* entities should be processed after @@ -1457,20 +1470,20 @@ Handle(TransferBRep_ShapeBinder) STEPControl_ActorRead::TransferEntity // Currently it is not guaranteed and might require changes in the processing order. else if (start->IsKind(STANDARD_TYPE(StepVisual_TessellatedSolid))) { - myShapeBuilder.Init(GetCasted(StepVisual_TessellatedSolid, start), TP, - aReadTessellatedWhenNoBRepOnly, aHasGeom, aRange); + myShapeBuilder.Init(GetCasted(StepVisual_TessellatedSolid, start), TP, + aReadTessellatedWhenNoBRepOnly, aHasGeom, aLocalFactors, aRange); found = Standard_True; } else if (start->IsKind(STANDARD_TYPE(StepVisual_TessellatedShell))) { myShapeBuilder.Init(GetCasted(StepVisual_TessellatedShell, start), TP, - aReadTessellatedWhenNoBRepOnly, aHasGeom, aRange); + aReadTessellatedWhenNoBRepOnly, aHasGeom, aLocalFactors, aRange); found = Standard_True; } else if (start->IsKind(STANDARD_TYPE(StepVisual_TessellatedFace))) { myShapeBuilder.Init(GetCasted(StepVisual_TessellatedFace, start), TP, - aReadTessellatedWhenNoBRepOnly, aHasGeom); + aReadTessellatedWhenNoBRepOnly, aHasGeom, aLocalFactors); found = Standard_True; } } @@ -1507,7 +1520,7 @@ Handle(TransferBRep_ShapeBinder) STEPControl_ActorRead::TransferEntity chrono.Show(); #endif if ( oldSRContext.IsNull() && ! mySRContext.IsNull() ) //:S4136 - PrepareUnits ( oldSRContext, TP ); + PrepareUnits ( oldSRContext, TP, aLocalFactors); TP->Bind(start, shbinder); return shbinder; } @@ -1521,6 +1534,7 @@ Handle(TransferBRep_ShapeBinder) STEPControl_ActorRead::TransferEntity Handle(TransferBRep_ShapeBinder) STEPControl_ActorRead::TransferEntity (const Handle(StepRepr_MappedItem)& mapit, const Handle(Transfer_TransientProcess)& TP, + const StepData_Factors& theLocalFactors, const Message_ProgressRange& theProgress) { Handle(TransferBRep_ShapeBinder) shbinder; @@ -1538,7 +1552,7 @@ Handle(TransferBRep_ShapeBinder) STEPControl_ActorRead::TransferEntity DownCast(mapit->MappingSource()->MappedRepresentation()); Standard_Boolean isBound = Standard_False; Handle(Transfer_Binder) binder = TP->Find(maprep); - if (binder.IsNull()) binder = TransferEntity(maprep,TP,isBound, Standard_False, theProgress); + if (binder.IsNull()) binder = TransferEntity(maprep, TP, theLocalFactors, isBound, Standard_False, theProgress); shbinder = Handle(TransferBRep_ShapeBinder)::DownCast(binder); if (shbinder.IsNull()) TP->AddWarning(mapit,"No Shape Produced"); else { @@ -1555,7 +1569,7 @@ Handle(TransferBRep_ShapeBinder) STEPControl_ActorRead::TransferEntity Handle(StepGeom_CartesianTransformationOperator3d) CartOp = Handle(StepGeom_CartesianTransformationOperator3d)::DownCast(mapit->MappingTarget()); if ( ! CartOp.IsNull() ) { - ok = StepToGeom::MakeTransformation3d (CartOp, Trsf); + ok = StepToGeom::MakeTransformation3d (CartOp, Trsf, theLocalFactors); } else { Handle(StepGeom_Axis2Placement3d) Origin = @@ -1565,7 +1579,7 @@ Handle(TransferBRep_ShapeBinder) STEPControl_ActorRead::TransferEntity if ( ! Origin.IsNull() && ! Target.IsNull() ) { ok = Standard_True; Handle(StepRepr_Representation) rep = mySRContext; // NOTE: copy of handle ! - ComputeTransformation ( Origin, Target, maprep, rep, TP, Trsf ); + ComputeTransformation ( Origin, Target, maprep, rep, TP, Trsf, theLocalFactors); ok = Standard_True; } } @@ -1587,6 +1601,7 @@ Handle(TransferBRep_ShapeBinder) STEPControl_ActorRead::TransferEntity Handle(TransferBRep_ShapeBinder) STEPControl_ActorRead::TransferEntity (const Handle(StepShape_FaceSurface)& fs, const Handle(Transfer_TransientProcess)& TP, + const StepData_Factors& theLocalFactors, const Message_ProgressRange& theProgress) { @@ -1606,15 +1621,16 @@ Handle(TransferBRep_ShapeBinder) STEPControl_ActorRead::TransferEntity // Non-manifold topology is not processed here (ssv; 15.11.2010) StepToTopoDS_NMTool dummyNMTool; - myTF.Init(fs, myTool, dummyNMTool); + myTF.Init(fs, myTool, dummyNMTool, theLocalFactors); Handle(StepRepr_Representation) oldSRContext = mySRContext; + StepData_Factors aLocalFactors = theLocalFactors; if (mySRContext.IsNull()) { // if no context, try to find it (ex: r0701_ug.stp #4790) Handle(StepRepr_Representation) context = FindContext(fs, TP); if (context.IsNull()) { TP->AddWarning(fs, "Entity with no unit context; default units taken"); - ResetUnits(); + ResetUnits(aLocalFactors); } - else PrepareUnits(context, TP); + else PrepareUnits(context, TP, aLocalFactors); } // Apply ShapeFix @@ -1637,7 +1653,7 @@ Handle(TransferBRep_ShapeBinder) STEPControl_ActorRead::TransferEntity if (oldSRContext.IsNull() && !mySRContext.IsNull()) //:S4136 - PrepareUnits(oldSRContext, TP); + PrepareUnits(oldSRContext, TP, aLocalFactors); TP->Bind(fs, sb); return sb; // TP->Find (start); } @@ -1657,6 +1673,7 @@ Handle(TransferBRep_ShapeBinder) STEPControl_ActorRead::TransferEntity Handle(Transfer_Binder) STEPControl_ActorRead::TransferShape( const Handle(Standard_Transient)& start, const Handle(Transfer_TransientProcess)& TP, + const StepData_Factors& theLocalFactors, const Standard_Boolean isManifold, const Standard_Boolean theUseTrsf, const Message_ProgressRange& theProgress) @@ -1685,14 +1702,14 @@ Handle(Transfer_Binder) STEPControl_ActorRead::TransferShape( else if (start->IsKind(STANDARD_TYPE(StepBasic_ProductDefinition))) { Handle(StepBasic_ProductDefinition) PD = Handle(StepBasic_ProductDefinition)::DownCast(start); - shbinder = TransferEntity(PD, TP, theUseTrsf, theProgress); + shbinder = TransferEntity(PD, TP, theLocalFactors, theUseTrsf, theProgress); } // NextAssemblyUsageOccurrence else if (start->IsKind(STANDARD_TYPE(StepRepr_NextAssemblyUsageOccurrence))) { Handle(StepRepr_NextAssemblyUsageOccurrence) NAUO = Handle(StepRepr_NextAssemblyUsageOccurrence)::DownCast(start); - shbinder = TransferEntity(NAUO, TP, theProgress); + shbinder = TransferEntity(NAUO, TP, theLocalFactors, theProgress); } //end skl @@ -1700,7 +1717,7 @@ Handle(Transfer_Binder) STEPControl_ActorRead::TransferShape( else if (start->IsKind(STANDARD_TYPE(StepShape_ShapeRepresentation))) { DeclareAndCast(StepShape_ShapeRepresentation,sr,start); Standard_Boolean isBound = Standard_False; - shbinder = TransferEntity(sr,TP,isBound, Standard_False, theProgress); + shbinder = TransferEntity(sr, TP, theLocalFactors, isBound, Standard_False, theProgress); } // -------------------------------------------------------------- @@ -1710,29 +1727,29 @@ Handle(Transfer_Binder) STEPControl_ActorRead::TransferShape( else if (start->IsKind(STANDARD_TYPE(StepShape_ContextDependentShapeRepresentation))) { DeclareAndCast(StepShape_ContextDependentShapeRepresentation,CDSR,start); - shbinder = TransferEntity(CDSR,TP, theProgress); + shbinder = TransferEntity(CDSR, TP, theLocalFactors, theProgress); } else if (start->IsKind (STANDARD_TYPE(StepRepr_ShapeRepresentationRelationship)) ) { // REPRESENTATION_RELATIONSHIP et la famille DeclareAndCast(StepRepr_ShapeRepresentationRelationship,und,start); - shbinder = TransferEntity(und,TP, 0, Standard_False, theProgress); + shbinder = TransferEntity(und, TP, theLocalFactors, 0, Standard_False, theProgress); } else if (start->IsKind (STANDARD_TYPE(StepGeom_GeometricRepresentationItem)) ) { // Here starts the entity to be treated : Shape Representation Subtype // It can be also other Root entities DeclareAndCast(StepGeom_GeometricRepresentationItem,git,start); - shbinder = TransferEntity(git, TP, isManifold, theProgress); + shbinder = TransferEntity(git, TP, theLocalFactors, isManifold, theProgress); } else if (start->IsKind(STANDARD_TYPE(StepRepr_MappedItem))) { DeclareAndCast(StepRepr_MappedItem,mapit,start); - shbinder= TransferEntity(mapit,TP, theProgress); + shbinder= TransferEntity(mapit, TP, theLocalFactors, theProgress); } else if (start->IsKind(STANDARD_TYPE(StepShape_FaceSurface))) { DeclareAndCast(StepShape_FaceSurface,fs,start); - shbinder = TransferEntity(fs,TP, theProgress); + shbinder = TransferEntity(fs, TP, theLocalFactors, theProgress); } // if (!shbinder.IsNull()) TP->Bind(start,binder); @@ -1745,13 +1762,14 @@ Handle(Transfer_Binder) STEPControl_ActorRead::TransferShape( // ============================================================================ void STEPControl_ActorRead::PrepareUnits(const Handle(StepRepr_Representation)& rep, - const Handle(Transfer_TransientProcess)& TP) + const Handle(Transfer_TransientProcess)& TP, + StepData_Factors& theLocalFactors) { mySRContext = rep; Standard_Integer stat1, stat2 = 0; // sera alimente par STEPControl_Unit if (rep.IsNull()) { - ResetUnits(); + ResetUnits(theLocalFactors); return; } @@ -1759,7 +1777,7 @@ void STEPControl_ActorRead::PrepareUnits(const Handle(StepRepr_Representation)& Handle(StepRepr_RepresentationContext) theRepCont = rep->ContextOfItems(); if (theRepCont.IsNull()) { TP->AddWarning(rep,"Bad RepresentationContext, default unit taken"); - ResetUnits(); + ResetUnits(theLocalFactors); return; } @@ -1794,13 +1812,12 @@ void STEPControl_ActorRead::PrepareUnits(const Handle(StepRepr_Representation)& // ---------------------------------------------------- // Decoding and Setting the Values // ---------------------------------------------------- - if (!theGUAC.IsNull()) { - stat1 = myUnit.ComputeFactors(theGUAC); + stat1 = myUnit.ComputeFactors(theGUAC, theLocalFactors); Standard_Integer anglemode = Interface_Static::IVal("step.angleunit.mode"); Standard_Real angleFactor = ( anglemode == 0 ? myUnit.PlaneAngleFactor() : anglemode == 1 ? 1. : M_PI/180. ); - StepData_GlobalFactors::Intance().InitializeFactors(myUnit.LengthFactor(), + theLocalFactors.InitializeFactors(myUnit.LengthFactor(), angleFactor, myUnit.SolidAngleFactor()); if (stat1 != 0) TP->AddWarning (theRepCont,myUnit.StatusMessage(stat1)); @@ -1833,9 +1850,9 @@ void STEPControl_ActorRead::PrepareUnits(const Handle(StepRepr_Representation)& //purpose : //======================================================================= -void STEPControl_ActorRead::ResetUnits () +void STEPControl_ActorRead::ResetUnits (StepData_Factors& theLocalFactors) { - StepData_GlobalFactors::Intance().InitializeFactors ( 1, 1, 1 ); + theLocalFactors.InitializeFactors ( 1, 1, 1 ); myPrecision = Interface_Static::RVal("read.precision.val"); myMaxTol = Max ( myPrecision, Interface_Static::RVal("read.maxprecision.val") ); } @@ -1851,7 +1868,8 @@ Standard_Boolean STEPControl_ActorRead::ComputeTransformation (const Handle(Step const Handle(StepRepr_Representation) &OrigContext, const Handle(StepRepr_Representation) &TargContext, const Handle(Transfer_TransientProcess) &TP, - gp_Trsf &Trsf) + gp_Trsf &Trsf, + const StepData_Factors& theLocalFactors) { Trsf = gp_Trsf(); // reinit if ( Origin.IsNull() || Target.IsNull() ) return Standard_False; @@ -1892,11 +1910,12 @@ Standard_Boolean STEPControl_ActorRead::ComputeTransformation (const Handle(Step // translate axis_placements taking units into account Handle(StepRepr_Representation) oldSRContext = mySRContext; - if ( OrigContext != oldSRContext ) PrepareUnits(OrigContext,TP); - Handle(Geom_Axis2Placement) theOrig = StepToGeom::MakeAxis2Placement (org); - if ( TargContext != OrigContext ) PrepareUnits(TargContext,TP); - Handle(Geom_Axis2Placement) theTarg = StepToGeom::MakeAxis2Placement (trg); - if ( oldSRContext != TargContext ) PrepareUnits(oldSRContext,TP); + StepData_Factors aLocalFactors = theLocalFactors; + if ( OrigContext != oldSRContext ) PrepareUnits(OrigContext, TP, aLocalFactors); + Handle(Geom_Axis2Placement) theOrig = StepToGeom::MakeAxis2Placement (org, aLocalFactors); + if ( TargContext != OrigContext ) PrepareUnits(TargContext, TP, aLocalFactors); + Handle(Geom_Axis2Placement) theTarg = StepToGeom::MakeAxis2Placement (trg, aLocalFactors); + if ( oldSRContext != TargContext ) PrepareUnits(oldSRContext, TP, aLocalFactors); gp_Ax3 ax3Orig(theOrig->Ax2()); gp_Ax3 ax3Targ(theTarg->Ax2()); @@ -1913,8 +1932,9 @@ Standard_Boolean STEPControl_ActorRead::ComputeTransformation (const Handle(Step //:j2 abv 22 Oct 98: auxiliary function: reading transformation from SRRWT Standard_Boolean STEPControl_ActorRead::ComputeSRRWT (const Handle(StepRepr_RepresentationRelationship) &SRR, - const Handle(Transfer_TransientProcess) &TP, - gp_Trsf &Trsf) + const Handle(Transfer_TransientProcess) &TP, + gp_Trsf &Trsf, + const StepData_Factors& theLocalFactors) { Trsf = gp_Trsf(); // init @@ -1922,16 +1942,16 @@ Standard_Boolean STEPControl_ActorRead::ComputeSRRWT (const Handle(StepRepr_Repr if ( srwt.IsNull() ) return Standard_False; StepRepr_Transformation SelectTrans = srwt->TransformationOperator(); - + StepData_Factors aLocalFactors = theLocalFactors; // cartesian transformation Handle(StepGeom_CartesianTransformationOperator3d) CartOp = Handle(StepGeom_CartesianTransformationOperator3d)::DownCast(SelectTrans.Value()); if ( ! CartOp.IsNull() ) { // reset units (by Rep2 - ?) Handle(StepRepr_Representation) oldSRContext = mySRContext; - if ( SRR->Rep2() != oldSRContext ) PrepareUnits(SRR->Rep2(),TP); - StepToGeom::MakeTransformation3d (CartOp, Trsf); - if ( SRR->Rep2() != oldSRContext ) PrepareUnits(oldSRContext,TP); + if ( SRR->Rep2() != oldSRContext ) PrepareUnits(SRR->Rep2(), TP, aLocalFactors); + StepToGeom::MakeTransformation3d (CartOp, Trsf, aLocalFactors); + if ( SRR->Rep2() != oldSRContext ) PrepareUnits(oldSRContext, TP, aLocalFactors); return Trsf.Form() != gp_Identity; } @@ -1945,7 +1965,7 @@ Standard_Boolean STEPControl_ActorRead::ComputeSRRWT (const Handle(StepRepr_Repr Handle(StepGeom_Axis2Placement3d) Ax2 = Handle(StepGeom_Axis2Placement3d)::DownCast(ItemDef->TransformItem2()); if ( Ax1.IsNull() || Ax2.IsNull() ) return Standard_False; - return ComputeTransformation ( Ax1, Ax2, SRR->Rep1(), SRR->Rep2(), TP, Trsf); + return ComputeTransformation ( Ax1, Ax2, SRR->Rep1(), SRR->Rep2(), TP, Trsf, aLocalFactors); } //======================================================================= diff --git a/src/STEPControl/STEPControl_ActorRead.hxx b/src/STEPControl/STEPControl_ActorRead.hxx index bdbf2d9433..7ca5e80516 100644 --- a/src/STEPControl/STEPControl_ActorRead.hxx +++ b/src/STEPControl/STEPControl_ActorRead.hxx @@ -46,6 +46,7 @@ class StepShape_FaceSurface; class TopoDS_Shell; class TopoDS_Compound; class StepRepr_ConstructiveGeometryRepresentationRelationship; +class StepData_Factors; class STEPControl_ActorRead; @@ -75,26 +76,38 @@ public: Standard_EXPORT Handle(Transfer_Binder) TransferShape ( const Handle(Standard_Transient)& start, const Handle(Transfer_TransientProcess)& TP, + const StepData_Factors& theLocalFactors, const Standard_Boolean isManifold = Standard_True, const Standard_Boolean theUseTrsf = Standard_False, const Message_ProgressRange& theProgress = Message_ProgressRange()); //! set units and tolerances context by given ShapeRepresentation - Standard_EXPORT void PrepareUnits (const Handle(StepRepr_Representation)& rep, const Handle(Transfer_TransientProcess)& TP); + Standard_EXPORT void PrepareUnits (const Handle(StepRepr_Representation)& rep, + const Handle(Transfer_TransientProcess)& TP, + StepData_Factors& theLocalFactors); //! reset units and tolerances context to default //! (mm, radians, read.precision.val, etc.) - Standard_EXPORT void ResetUnits(); + Standard_EXPORT void ResetUnits(StepData_Factors& theLocalFactors); //! Computes transformation defined by two axis placements (in MAPPED_ITEM //! or ITEM_DEFINED_TRANSFORMATION) taking into account their //! representation contexts (i.e. units, which may be different) //! Returns True if transformation is computed and is not an identity. - Standard_EXPORT Standard_Boolean ComputeTransformation (const Handle(StepGeom_Axis2Placement3d)& Origin, const Handle(StepGeom_Axis2Placement3d)& Target, const Handle(StepRepr_Representation)& OrigContext, const Handle(StepRepr_Representation)& TargContext, const Handle(Transfer_TransientProcess)& TP, gp_Trsf& Trsf); + Standard_EXPORT Standard_Boolean ComputeTransformation (const Handle(StepGeom_Axis2Placement3d)& Origin, + const Handle(StepGeom_Axis2Placement3d)& Target, + const Handle(StepRepr_Representation)& OrigContext, + const Handle(StepRepr_Representation)& TargContext, + const Handle(Transfer_TransientProcess)& TP, + gp_Trsf& Trsf, + const StepData_Factors& theLocalFactors); //! Computes transformation defined by given //! REPRESENTATION_RELATIONSHIP_WITH_TRANSFORMATION - Standard_EXPORT Standard_Boolean ComputeSRRWT (const Handle(StepRepr_RepresentationRelationship)& SRR, const Handle(Transfer_TransientProcess)& TP, gp_Trsf& Trsf); + Standard_EXPORT Standard_Boolean ComputeSRRWT (const Handle(StepRepr_RepresentationRelationship)& SRR, + const Handle(Transfer_TransientProcess)& TP, + gp_Trsf& Trsf, + const StepData_Factors& theLocalFactors); @@ -109,6 +122,7 @@ protected: Standard_EXPORT Handle(TransferBRep_ShapeBinder) TransferEntity ( const Handle(StepBasic_ProductDefinition)& PD, const Handle(Transfer_TransientProcess)& TP, + const StepData_Factors& theLocalFactors, const Standard_Boolean theUseTrsf = Standard_False, const Message_ProgressRange& theProgress = Message_ProgressRange()); @@ -116,6 +130,7 @@ protected: Standard_EXPORT Handle(TransferBRep_ShapeBinder) TransferEntity (const Handle(StepRepr_NextAssemblyUsageOccurrence)& NAUO, const Handle(Transfer_TransientProcess)& TP, + const StepData_Factors& theLocalFactors, const Message_ProgressRange& theProgress = Message_ProgressRange()); //! Transfers shape representation entity @@ -123,6 +138,7 @@ protected: Standard_EXPORT Handle(TransferBRep_ShapeBinder) TransferEntity ( const Handle(StepShape_ShapeRepresentation)& sr, const Handle(Transfer_TransientProcess)& TP, + const StepData_Factors& theLocalFactors, Standard_Boolean& isBound, const Standard_Boolean theUseTrsf = Standard_False, const Message_ProgressRange& theProgress = Message_ProgressRange()); @@ -131,6 +147,7 @@ protected: Standard_EXPORT Handle(TransferBRep_ShapeBinder) TransferEntity (const Handle(StepShape_ContextDependentShapeRepresentation)& CDSR, const Handle(Transfer_TransientProcess)& TP, + const StepData_Factors& theLocalFactors, const Message_ProgressRange& theProgress = Message_ProgressRange()); //! Transfers shape representation relationship entity @@ -138,6 +155,7 @@ protected: Standard_EXPORT Handle(TransferBRep_ShapeBinder) TransferEntity ( const Handle(StepRepr_ShapeRepresentationRelationship)& und, const Handle(Transfer_TransientProcess)& TP, + const StepData_Factors& theLocalFactors, const Standard_Integer nbrep = 0, const Standard_Boolean theUseTrsf = Standard_False, const Message_ProgressRange& theProgress = Message_ProgressRange()); @@ -146,6 +164,7 @@ protected: Standard_EXPORT Handle(TransferBRep_ShapeBinder) TransferEntity (const Handle(StepGeom_GeometricRepresentationItem)& git, const Handle(Transfer_TransientProcess)& TP, + const StepData_Factors& theLocalFactors, const Standard_Boolean isManifold, const Message_ProgressRange& theProgress); @@ -153,16 +172,19 @@ protected: Standard_EXPORT Handle(TransferBRep_ShapeBinder) TransferEntity (const Handle(StepRepr_MappedItem)& mapit, const Handle(Transfer_TransientProcess)& TP, + const StepData_Factors& theLocalFactors, const Message_ProgressRange& theProgress); //! Transfers FaceSurface entity Standard_EXPORT Handle(TransferBRep_ShapeBinder) TransferEntity (const Handle(StepShape_FaceSurface)& fs, const Handle(Transfer_TransientProcess)& TP, + const StepData_Factors& theLocalFactors, const Message_ProgressRange& theProgress); Handle(TransferBRep_ShapeBinder) TransferEntity( const Handle(StepRepr_ConstructiveGeometryRepresentationRelationship)& theCGRR, - const Handle(Transfer_TransientProcess)& theTP); + const Handle(Transfer_TransientProcess)& theTP, + const StepData_Factors& theLocalFactors); //! Translates file by old way when CDSR are roots . Acts only if "read.step.product_mode" is equal Off. Standard_EXPORT Handle(TransferBRep_ShapeBinder) OldWay diff --git a/src/STEPControl/STEPControl_ActorWrite.cxx b/src/STEPControl/STEPControl_ActorWrite.cxx index e7e576ba64..b96d0d8e42 100644 --- a/src/STEPControl/STEPControl_ActorWrite.cxx +++ b/src/STEPControl/STEPControl_ActorWrite.cxx @@ -40,7 +40,6 @@ #include #include #include -#include #include #include #include @@ -547,15 +546,15 @@ Handle(Transfer_Binder) STEPControl_ActorWrite::Transfer (const Handle(Transfer_ Standard_Real aLFactor = model->WriteLengthUnit(); aLFactor /= model->LocalLengthUnit(); Standard_Integer anglemode = Interface_Static::IVal("step.angleunit.mode"); - StepData_GlobalFactors::Intance().InitializeFactors (aLFactor, ( anglemode <= 1 ? 1. : M_PI/180. ), 1. ); - + StepData_Factors aLocalFactors; + aLocalFactors.InitializeFactors(aLFactor, (anglemode <= 1 ? 1. : M_PI / 180.), 1.); // create SDR STEPConstruct_Part SDRTool; SDRTool.MakeSDR ( 0, myContext.GetProductName(), myContext.GetAPD()->Application() ); Handle(StepShape_ShapeDefinitionRepresentation) sdr = SDRTool.SDRValue(); // transfer shape - Handle(Transfer_Binder) resbind = TransferShape (mapper,sdr,FP, 0L, Standard_True, theProgress); + Handle(Transfer_Binder) resbind = TransferShape (mapper,sdr, FP, aLocalFactors, 0L, Standard_True, theProgress); // Handle(StepShape_ShapeRepresentation) resultat; // FP->GetTypedTransient (resbind,STANDARD_TYPE(StepShape_ShapeRepresentation),resultat); @@ -665,12 +664,13 @@ static void UpdateMap (const TopoDS_Shape &shape, static Standard_Boolean transferVertex (const Handle(Transfer_FinderProcess)& FP, Handle(StepShape_HArray1OfGeometricSetSelect)& aGSS, const TopoDS_Shape& aShVrtx, - const Standard_Integer theNum) + const Standard_Integer theNum, + const StepData_Factors& theLocalFactors) { Standard_Boolean IsDone = Standard_False; MoniTool_DataMapOfShapeTransient aMap; TopoDSToStep_Tool aTool(aMap, Standard_True); - TopoDSToStep_MakeStepVertex aMkVrtx ( TopoDS::Vertex(aShVrtx), aTool, FP ); + TopoDSToStep_MakeStepVertex aMkVrtx ( TopoDS::Vertex(aShVrtx), aTool, FP, theLocalFactors ); if (!aMkVrtx.IsDone()) return IsDone; @@ -693,6 +693,7 @@ Handle(Transfer_Binder) STEPControl_ActorWrite::TransferShape (const Handle(Transfer_Finder)& start, const Handle(StepShape_ShapeDefinitionRepresentation)& SDR0, const Handle(Transfer_FinderProcess)& FP, + const StepData_Factors& theLocalFactors, const Handle(TopTools_HSequenceOfShape)& shapeGroup, const Standard_Boolean isManifold, const Message_ProgressRange& theProgress) @@ -724,7 +725,7 @@ Handle(Transfer_Binder) STEPControl_ActorWrite::TransferShape // MODE ASSEMBLY : if Compound, (sub-)assembly if ( IsAssembly(theShape) ) - return TransferCompound(start, SDR0, FP, theProgress); + return TransferCompound(start, SDR0, FP, theLocalFactors, theProgress); Message_ProgressScope aPSRoot(theProgress, NULL, 2); @@ -834,7 +835,7 @@ Handle(Transfer_Binder) STEPControl_ActorWrite::TransferShape Message_ProgressScope aPS (aPSRoot.Next(), NULL, aNMItemsNb); for (Standard_Integer i = 1; i <= aNMItemsNb && aPS.More(); i++) { Handle(TransferBRep_ShapeMapper) aMapper = TransferBRep::ShapeMapper( FP, RepItemSeq->Value(i) ); - TransferShape(aMapper, sdr, FP, NonManifoldGroup, Standard_False, aPS.Next()); + TransferShape(aMapper, sdr, FP, theLocalFactors, NonManifoldGroup, Standard_False, aPS.Next()); } // Nothing else needed for pure non-manifold topology, return @@ -937,7 +938,7 @@ Handle(Transfer_Binder) STEPControl_ActorWrite::TransferShape else if (theShape.ShapeType() == TopAbs_COMPSOLID) { FP->AddWarning(start,"NonManifold COMPSOLID was translated like a set of SOLIDs"); if ( GroupMode() > 0) - return TransferCompound(start, SDR0, FP, aPSRoot.Next()); + return TransferCompound(start, SDR0, FP, theLocalFactors, aPSRoot.Next()); else { TopExp_Explorer SolidExp; for (SolidExp.Init(theShape, TopAbs_SOLID); @@ -1028,7 +1029,7 @@ Handle(Transfer_Binder) STEPControl_ActorWrite::TransferShape for ( TopoDS_Iterator It ( aSolid ); It.More(); It.Next() ) if (It.Value().ShapeType() == TopAbs_SHELL) nbShells++; if ( nbShells >1 ) { - TopoDSToStep_MakeBrepWithVoids MkBRepWithVoids(aSolid,FP, aPS1.Next()); + TopoDSToStep_MakeBrepWithVoids MkBRepWithVoids(aSolid, FP, theLocalFactors, aPS1.Next()); MkBRepWithVoids.Tolerance() = Tol; if (MkBRepWithVoids.IsDone()) { @@ -1038,7 +1039,7 @@ Handle(Transfer_Binder) STEPControl_ActorWrite::TransferShape else nbShells = 1; //smth went wrong; let it will be just Manifold } if ( nbShells ==1 ) { - TopoDSToStep_MakeManifoldSolidBrep MkManifoldSolidBrep(aSolid,FP, aPS1.Next()); + TopoDSToStep_MakeManifoldSolidBrep MkManifoldSolidBrep(aSolid, FP, theLocalFactors, aPS1.Next()); MkManifoldSolidBrep.Tolerance() = Tol; if (MkManifoldSolidBrep.IsDone()) { @@ -1049,7 +1050,7 @@ Handle(Transfer_Binder) STEPControl_ActorWrite::TransferShape } else if (aShape.ShapeType() == TopAbs_SHELL) { TopoDS_Shell aShell = TopoDS::Shell(aShape); - TopoDSToStep_MakeManifoldSolidBrep MkManifoldSolidBrep(aShell,FP, aPS1.Next()); + TopoDSToStep_MakeManifoldSolidBrep MkManifoldSolidBrep(aShell, FP, theLocalFactors, aPS1.Next()); MkManifoldSolidBrep.Tolerance() = Tol; if (MkManifoldSolidBrep.IsDone()) { @@ -1063,7 +1064,7 @@ Handle(Transfer_Binder) STEPControl_ActorWrite::TransferShape { if (aShape.ShapeType() == TopAbs_SOLID) { TopoDS_Solid aSolid = TopoDS::Solid(aShape); - TopoDSToStep_MakeBrepWithVoids MkBRepWithVoids(aSolid,FP, aPS1.Next()); + TopoDSToStep_MakeBrepWithVoids MkBRepWithVoids(aSolid, FP, theLocalFactors, aPS1.Next()); MkBRepWithVoids.Tolerance() = Tol; if (MkBRepWithVoids.IsDone()) { @@ -1088,7 +1089,7 @@ Handle(Transfer_Binder) STEPControl_ActorWrite::TransferShape } if (aShape.ShapeType() == TopAbs_SOLID) { TopoDS_Solid aSolid = TopoDS::Solid(aShape); - TopoDSToStep_MakeFacetedBrep MkFacetedBrep(aSolid,FP, aPS1.Next()); + TopoDSToStep_MakeFacetedBrep MkFacetedBrep(aSolid, FP, theLocalFactors, aPS1.Next()); MkFacetedBrep.Tolerance() = Tol; if (MkFacetedBrep.IsDone()) { @@ -1114,7 +1115,7 @@ Handle(Transfer_Binder) STEPControl_ActorWrite::TransferShape if (aShape.ShapeType() == TopAbs_SOLID) { TopoDS_Solid aSolid = TopoDS::Solid(aShape); TopoDSToStep_MakeFacetedBrepAndBrepWithVoids - MkFacetedBrepAndBrepWithVoids(aSolid,FP, aPS1.Next()); + MkFacetedBrepAndBrepWithVoids(aSolid, FP, theLocalFactors, aPS1.Next()); MkFacetedBrepAndBrepWithVoids.Tolerance() = Tol; if (MkFacetedBrepAndBrepWithVoids.IsDone()) { @@ -1129,7 +1130,7 @@ Handle(Transfer_Binder) STEPControl_ActorWrite::TransferShape if (aShape.ShapeType() == TopAbs_SOLID) { TopoDS_Solid aSolid = TopoDS::Solid(aShape); TopoDSToStep_MakeShellBasedSurfaceModel - MkShellBasedSurfaceModel(aSolid, FP, aPS1.Next()); + MkShellBasedSurfaceModel(aSolid, FP, theLocalFactors, aPS1.Next()); MkShellBasedSurfaceModel.Tolerance() = Tol; if (MkShellBasedSurfaceModel.IsDone()) { @@ -1140,7 +1141,7 @@ Handle(Transfer_Binder) STEPControl_ActorWrite::TransferShape else if (aShape.ShapeType() == TopAbs_SHELL) { TopoDS_Shell aShell = TopoDS::Shell(aShape); // Non-manifold topology is stored via NMSSR containing series of SBSM (ssv; 13.11.2010) - TopoDSToStep_MakeShellBasedSurfaceModel MkShellBasedSurfaceModel(aShell, FP, aPS1.Next()); + TopoDSToStep_MakeShellBasedSurfaceModel MkShellBasedSurfaceModel(aShell, FP, theLocalFactors, aPS1.Next()); MkShellBasedSurfaceModel.Tolerance() = Tol; if (MkShellBasedSurfaceModel.IsDone()) { @@ -1151,7 +1152,7 @@ Handle(Transfer_Binder) STEPControl_ActorWrite::TransferShape else if (aShape.ShapeType() == TopAbs_FACE) { TopoDS_Face aFace = TopoDS::Face(aShape); TopoDSToStep_MakeShellBasedSurfaceModel - MkShellBasedSurfaceModel(aFace, FP, aPS1.Next()); + MkShellBasedSurfaceModel(aFace, FP, theLocalFactors, aPS1.Next()); MkShellBasedSurfaceModel.Tolerance() = Tol; if (MkShellBasedSurfaceModel.IsDone()) { @@ -1163,7 +1164,7 @@ Handle(Transfer_Binder) STEPControl_ActorWrite::TransferShape } case STEPControl_GeometricCurveSet: { - TopoDSToStep_MakeGeometricCurveSet MkGeometricCurveSet(aShape,FP); + TopoDSToStep_MakeGeometricCurveSet MkGeometricCurveSet(aShape, FP, theLocalFactors); MkGeometricCurveSet.Tolerance() = Tol; if (MkGeometricCurveSet.IsDone()) { item = MkGeometricCurveSet.Value(); @@ -1195,7 +1196,7 @@ Handle(Transfer_Binder) STEPControl_ActorWrite::TransferShape if ( aVertex.ShapeType() != TopAbs_VERTEX ) continue; curNb++; - transferVertex (FP, aGSS, aVertex, curNb); + transferVertex (FP, aGSS, aVertex, curNb, theLocalFactors); } // end of iteration on compound with vertices. aGCSet->SetElements(aGSS); item = aGCSet; @@ -1352,7 +1353,7 @@ Handle(Transfer_Binder) STEPControl_ActorWrite::TransferShape repr1->SetValue(2,items->Value(j)); ShapeRepr1->SetItems(repr1); STEPConstruct_UnitContext mk1; - mk1.Init(Tol); + mk1.Init(Tol, theLocalFactors); ShapeRepr1->SetContextOfItems(mk1.Value()); // la tolerance, voir au debut ShapeRepr1->SetName (new TCollection_HAsciiString("")); @@ -1389,7 +1390,7 @@ Handle(Transfer_Binder) STEPControl_ActorWrite::TransferShape Handle(StepShape_ShapeRepresentation) shapeTessRepr = new StepVisual_TessellatedShapeRepresentation; shapeTessRepr->SetItems(itemsTess); STEPConstruct_UnitContext mk1; - mk1.Init(Tol); + mk1.Init(Tol, theLocalFactors); shapeTessRepr->SetContextOfItems(mk1.Value()); shapeTessRepr->SetName(new TCollection_HAsciiString("")); @@ -1412,7 +1413,7 @@ Handle(Transfer_Binder) STEPControl_ActorWrite::TransferShape // init representation STEPConstruct_UnitContext mk; - mk.Init(Tol); + mk.Init(Tol, theLocalFactors); shapeRep->SetContextOfItems(mk.Value()); // la tolerance, voir au debut shapeRep->SetName (new TCollection_HAsciiString("")); @@ -1450,6 +1451,7 @@ Handle(Transfer_Binder) STEPControl_ActorWrite::TransferCompound (const Handle(Transfer_Finder)& start, const Handle(StepShape_ShapeDefinitionRepresentation)& SDR0, const Handle(Transfer_FinderProcess)& FP, + const StepData_Factors& theLocalFactors, const Message_ProgressRange& theProgress) { Handle(TransferBRep_ShapeMapper) mapper = Handle(TransferBRep_ShapeMapper)::DownCast(start); @@ -1535,7 +1537,7 @@ Handle(Transfer_Binder) STEPControl_ActorWrite::TransferCompound Handle(TransferBRep_ShapeMapper) subs = TransferBRep::ShapeMapper (FP,RepItemSeq->Value(i)); Handle(StepGeom_Axis2Placement3d) AX1; - Handle(Transfer_Binder) bnd = TransferSubShape(subs, SDR0, AX1, FP, NonManifoldGroup, isManifold, aPS.Next()); + Handle(Transfer_Binder) bnd = TransferSubShape(subs, SDR0, AX1, FP, theLocalFactors, NonManifoldGroup, isManifold, aPS.Next()); if (!AX1.IsNull()) ItemSeq->Append (AX1); // copy binders so as to have all roots in upper binder, but do not conflict @@ -1560,7 +1562,7 @@ Handle(Transfer_Binder) STEPControl_ActorWrite::TransferCompound shapeRep->SetItems(items); Standard_Real Tol = UsedTolerance (mytoler,theShape); STEPConstruct_UnitContext mk; - mk.Init(Tol); + mk.Init(Tol, theLocalFactors); shapeRep->SetContextOfItems(mk.Value()); // la tolerance, voir au debut shapeRep->SetName (new TCollection_HAsciiString("")); @@ -1580,6 +1582,7 @@ Handle(Transfer_Binder) STEPControl_ActorWrite::TransferSubShape const Handle(StepShape_ShapeDefinitionRepresentation)& SDR0, Handle(StepGeom_Axis2Placement3d)& AX1, const Handle(Transfer_FinderProcess)& FP, + const StepData_Factors& theLocalFactors, const Handle(TopTools_HSequenceOfShape)& shapeGroup, const Standard_Boolean isManifold, const Message_ProgressRange& theProgress) @@ -1626,7 +1629,7 @@ Handle(Transfer_Binder) STEPControl_ActorWrite::TransferSubShape Handle(Transfer_Binder) resprod = TransientResult(sdr); //KA - OCC7141(skl 10.11.2004) bool isJustTransferred = false; if ( ! iasdr || resbind.IsNull() ) { - Handle(Transfer_Binder) resbind1 = TransferShape(mapper, sdr, FP, shapeGroup, isManifold, theProgress); + Handle(Transfer_Binder) resbind1 = TransferShape(mapper, sdr, FP, theLocalFactors, shapeGroup, isManifold, theProgress); if (resbind1.IsNull() || sdr->UsedRepresentation().IsNull()) return Handle(Transfer_Binder)(); resbind = resbind1; @@ -1642,7 +1645,7 @@ Handle(Transfer_Binder) STEPControl_ActorWrite::TransferSubShape // sdr->SetUsedRepresentation(resultat); // to be used by MakeItem // make location for assembly placement - GeomToStep_MakeAxis2Placement3d mkax (aLoc); + GeomToStep_MakeAxis2Placement3d mkax (aLoc, theLocalFactors); const Handle(StepGeom_Axis2Placement3d)& AxLoc = mkax.Value(); AX1 = AxLoc; diff --git a/src/STEPControl/STEPControl_ActorWrite.hxx b/src/STEPControl/STEPControl_ActorWrite.hxx index d9d09b20d2..960abaadef 100644 --- a/src/STEPControl/STEPControl_ActorWrite.hxx +++ b/src/STEPControl/STEPControl_ActorWrite.hxx @@ -28,6 +28,7 @@ class Transfer_Finder; class Transfer_Binder; class Transfer_FinderProcess; +class StepData_Factors; class StepShape_ShapeDefinitionRepresentation; class StepGeom_Axis2Placement3d; class TopoDS_Shape; @@ -59,6 +60,7 @@ public: const Handle(StepShape_ShapeDefinitionRepresentation)& SDR, Handle(StepGeom_Axis2Placement3d)& AX1, const Handle(Transfer_FinderProcess)& FP, + const StepData_Factors& theLocalFactors, const Handle(TopTools_HSequenceOfShape)& shapeGroup = NULL, const Standard_Boolean isManifold = Standard_True, const Message_ProgressRange& theProgress = Message_ProgressRange()); @@ -67,6 +69,7 @@ public: (const Handle(Transfer_Finder)& start, const Handle(StepShape_ShapeDefinitionRepresentation)& SDR, const Handle(Transfer_FinderProcess)& FP, + const StepData_Factors& theLocalFactors, const Handle(TopTools_HSequenceOfShape)& shapeGroup = NULL, const Standard_Boolean isManifold = Standard_True, const Message_ProgressRange& theProgress = Message_ProgressRange()); @@ -75,6 +78,7 @@ public: (const Handle(Transfer_Finder)& start, const Handle(StepShape_ShapeDefinitionRepresentation)& SDR, const Handle(Transfer_FinderProcess)& FP, + const StepData_Factors& theLocalFactors, const Message_ProgressRange& theProgress = Message_ProgressRange()); Standard_EXPORT void SetMode (const STEPControl_StepModelType M); diff --git a/src/STEPControl/STEPControl_Controller.cxx b/src/STEPControl/STEPControl_Controller.cxx index bdb17f8f88..87737b0aaf 100644 --- a/src/STEPControl/STEPControl_Controller.cxx +++ b/src/STEPControl/STEPControl_Controller.cxx @@ -54,6 +54,8 @@ STEPControl_Controller::STEPControl_Controller () : XSControl_Controller ("STEP", "step") { static Standard_Boolean init = Standard_False; + static Standard_Mutex aMutex; + aMutex.Lock(); if (!init) { RWHeaderSection::Init(); RWStepAP214::Init(); @@ -318,6 +320,7 @@ STEPControl_Controller::STEPControl_Controller () init = Standard_True; } + aMutex.Unlock(); Handle(STEPControl_ActorWrite) ActWrite = new STEPControl_ActorWrite; ActWrite->SetGroupMode (Interface_Static::IVal("write.step.assembly")); diff --git a/src/STEPEdit/STEPEdit.cxx b/src/STEPEdit/STEPEdit.cxx index 6b55fecb83..eaeb887fd9 100644 --- a/src/STEPEdit/STEPEdit.cxx +++ b/src/STEPEdit/STEPEdit.cxx @@ -17,6 +17,7 @@ #include #include #include +#include #include #include #include @@ -43,6 +44,8 @@ Handle(StepData_StepModel) STEPEdit::NewModel () Handle(IFSelect_Signature) STEPEdit::SignType () { + static Standard_Mutex aMutex; + Standard_Mutex::Sentry aSentry(aMutex); static Handle(StepSelect_StepType) sty; if (!sty.IsNull()) return sty; sty = new StepSelect_StepType; diff --git a/src/STEPEdit/STEPEdit_EditContext.cxx b/src/STEPEdit/STEPEdit_EditContext.cxx index a91692226a..9f0816631f 100644 --- a/src/STEPEdit/STEPEdit_EditContext.cxx +++ b/src/STEPEdit/STEPEdit_EditContext.cxx @@ -85,6 +85,8 @@ Standard_Boolean STEPEdit_EditContext::Load if (modl.IsNull()) return Standard_False; STEPConstruct_ContextTool ctx (modl); + StepData_Factors aLocalFactors; + ctx.SetGlobalFactor(aLocalFactors); form->LoadValue (1, modl->StringLabel(ctx.GetAPD()) ); @@ -111,6 +113,8 @@ Standard_Boolean STEPEdit_EditContext::Apply if (modl.IsNull()) return Standard_False; STEPConstruct_ContextTool ctx (modl); + StepData_Factors aLocalFactors; + ctx.SetGlobalFactor(aLocalFactors); ctx.AddAPD(); // on ne sait jamais // ctx.AddPRPC(); diff --git a/src/STEPSelections/STEPSelections_SelectGSCurves.cxx b/src/STEPSelections/STEPSelections_SelectGSCurves.cxx index 024ddc4ea2..75f837ab2b 100644 --- a/src/STEPSelections/STEPSelections_SelectGSCurves.cxx +++ b/src/STEPSelections/STEPSelections_SelectGSCurves.cxx @@ -17,6 +17,7 @@ #include #include +#include #include #include #include @@ -45,10 +46,13 @@ Standard_Boolean STEPSelections_SelectGSCurves::Explore(const Standard_Integer / Standard_Boolean isInGeomSet = Standard_False; for (subs.Start(); subs.More()&&!isInGeomSet; subs.Next()) if(subs.Value()->IsKind(STANDARD_TYPE(StepShape_GeometricSet))){ + static Standard_Mutex aMutex; + aMutex.Lock(); if(flag) { explored.AddItem (subs.Value()); flag =0; } + aMutex.Unlock(); isInGeomSet = Standard_True; } if(isInGeomSet) { diff --git a/src/STEPSelections/STEPSelections_SelectInstances.cxx b/src/STEPSelections/STEPSelections_SelectInstances.cxx index 2ce4764542..b59ca6ea53 100644 --- a/src/STEPSelections/STEPSelections_SelectInstances.cxx +++ b/src/STEPSelections/STEPSelections_SelectInstances.cxx @@ -18,6 +18,7 @@ #include #include #include +#include #include #include #include @@ -137,15 +138,16 @@ static void AddInstances(const Handle(Standard_Transient)& start, Interface_EntityIterator STEPSelections_SelectInstances::RootResult(const Interface_Graph &G) const { + static Standard_Mutex aMutex; + Standard_Mutex::Sentry aSentry(aMutex); if(myGraph.IsNull()||(G.Model()!=myGraph->Graph().Model())) - { - - Interface_EntityIterator roots = G.RootEntities(); - myGraph = new Interface_HGraph(G); - myEntities.Destroy(); - for (roots.Start(); roots.More(); roots.Next()) - AddInstances(roots.Value(), G, myEntities); - } + { + Interface_EntityIterator roots = G.RootEntities(); + myGraph = new Interface_HGraph(G); + myEntities.Destroy(); + for (roots.Start(); roots.More(); roots.Next()) + AddInstances(roots.Value(), G, myEntities); + } if(HasInput()||HasAlternate()) { Interface_EntityIterator select = InputResult(G); diff --git a/src/StepData/FILES b/src/StepData/FILES index a80a6ee10f..65edda095b 100644 --- a/src/StepData/FILES +++ b/src/StepData/FILES @@ -13,6 +13,8 @@ StepData_EnumTool.cxx StepData_EnumTool.hxx StepData_ESDescr.cxx StepData_ESDescr.hxx +StepData_Factors.cxx +StepData_Factors.hxx StepData_Field.cxx StepData_Field.hxx StepData_FieldList.cxx @@ -31,8 +33,6 @@ StepData_FreeFormEntity.cxx StepData_FreeFormEntity.hxx StepData_GeneralModule.cxx StepData_GeneralModule.hxx -StepData_GlobalFactors.cxx -StepData_GlobalFactors.hxx StepData_GlobalNodeOfWriterLib.hxx StepData_GlobalNodeOfWriterLib_0.cxx StepData_HArray1OfField.hxx diff --git a/src/StepData/StepData_GlobalFactors.cxx b/src/StepData/StepData_Factors.cxx similarity index 78% rename from src/StepData/StepData_GlobalFactors.cxx rename to src/StepData/StepData_Factors.cxx index 37cff58775..5d81f03d8a 100644 --- a/src/StepData/StepData_GlobalFactors.cxx +++ b/src/StepData/StepData_Factors.cxx @@ -11,33 +11,23 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -#include +#include // ============================================================================ // Method : Consturctor // Purpose: // ============================================================================ -StepData_GlobalFactors::StepData_GlobalFactors() +StepData_Factors::StepData_Factors() :myLengthFactor(1.), myPlaneAngleFactor(1.), mySolidAngleFactor(1.), myFactRD(1.), myFactDR(1.), myCascadeUnit(1.) {} -// ============================================================================ -// Method : Intance -// Purpose: -// ============================================================================ -StepData_GlobalFactors& StepData_GlobalFactors::Intance() -{ - static StepData_GlobalFactors THE_FACTORS; - return THE_FACTORS; -} - // ============================================================================ // Method : InitializeFactors // Purpose: // ============================================================================ -void StepData_GlobalFactors::InitializeFactors( +void StepData_Factors::InitializeFactors( const Standard_Real theLengthFactor, const Standard_Real thePlaneAngleFactor, const Standard_Real theSolidAngleFactor) @@ -53,7 +43,7 @@ void StepData_GlobalFactors::InitializeFactors( // Method : LengthFactor // Purpose: // ============================================================================ -Standard_Real StepData_GlobalFactors::LengthFactor() +Standard_Real StepData_Factors::LengthFactor() const { return myLengthFactor; } @@ -62,7 +52,7 @@ Standard_Real StepData_GlobalFactors::LengthFactor() // Method : PlaneAngleFactor // Purpose: // ============================================================================ -Standard_Real StepData_GlobalFactors::PlaneAngleFactor() +Standard_Real StepData_Factors::PlaneAngleFactor() const { return myPlaneAngleFactor; } @@ -71,7 +61,7 @@ Standard_Real StepData_GlobalFactors::PlaneAngleFactor() // Method : SolidAngleFactor // Purpose: // ============================================================================ -Standard_Real StepData_GlobalFactors::SolidAngleFactor() +Standard_Real StepData_Factors::SolidAngleFactor() const { return mySolidAngleFactor; } @@ -80,7 +70,7 @@ Standard_Real StepData_GlobalFactors::SolidAngleFactor() // Method : FactorRadianDegree // Purpose: // ============================================================================ -Standard_Real StepData_GlobalFactors::FactorRadianDegree() +Standard_Real StepData_Factors::FactorRadianDegree() const { return myFactRD; } @@ -89,7 +79,7 @@ Standard_Real StepData_GlobalFactors::FactorRadianDegree() // Method : FactorDegreeRadian // Purpose: // ============================================================================ -Standard_Real StepData_GlobalFactors::FactorDegreeRadian() +Standard_Real StepData_Factors::FactorDegreeRadian() const { return myFactDR; } @@ -98,7 +88,7 @@ Standard_Real StepData_GlobalFactors::FactorDegreeRadian() // Method : SetCascadeUnit // Purpose: // ============================================================================ -void StepData_GlobalFactors::SetCascadeUnit(const Standard_Real theUnit) +void StepData_Factors::SetCascadeUnit(const Standard_Real theUnit) { myCascadeUnit = theUnit; } @@ -107,7 +97,7 @@ void StepData_GlobalFactors::SetCascadeUnit(const Standard_Real theUnit) // Method : CascadeUnit // Purpose: // ============================================================================ -Standard_Real StepData_GlobalFactors::CascadeUnit() +Standard_Real StepData_Factors::CascadeUnit() const { return myCascadeUnit; } diff --git a/src/StepData/StepData_GlobalFactors.hxx b/src/StepData/StepData_Factors.hxx similarity index 75% rename from src/StepData/StepData_GlobalFactors.hxx rename to src/StepData/StepData_Factors.hxx index fbad6079ce..e0be87b410 100644 --- a/src/StepData/StepData_GlobalFactors.hxx +++ b/src/StepData/StepData_Factors.hxx @@ -11,8 +11,8 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -#ifndef _StepData_GlobalFactors_HeaderFile -#define _StepData_GlobalFactors_HeaderFile +#ifndef _StepData_Factors_HeaderFile +#define _StepData_Factors_HeaderFile #include #include @@ -20,20 +20,15 @@ #include #include -//! Class for using global units variables -class StepData_GlobalFactors +//! Class for using units variables +class StepData_Factors { - -private: - - Standard_EXPORT StepData_GlobalFactors(); - public: DEFINE_STANDARD_ALLOC - //! Returns a global static object - Standard_EXPORT static StepData_GlobalFactors& Intance(); + //! Constructor + Standard_EXPORT StepData_Factors(); //! Initializes the 3 factors for the conversion of units Standard_EXPORT void InitializeFactors( @@ -45,27 +40,27 @@ public: Standard_EXPORT void SetCascadeUnit(const Standard_Real theUnit); //! Returns length unit for current transfer process (mm by default) - Standard_EXPORT Standard_Real CascadeUnit(); + Standard_EXPORT Standard_Real CascadeUnit() const; //! Returns transient length factor for scaling of shapes //! at one stage of transfer process - Standard_EXPORT Standard_Real LengthFactor(); + Standard_EXPORT Standard_Real LengthFactor() const; //! Returns transient plane angle factor for conversion of angles //! at one stage of transfer process - Standard_EXPORT Standard_Real PlaneAngleFactor(); + Standard_EXPORT Standard_Real PlaneAngleFactor() const; //! Returns transient solid angle factor for conversion of angles //! at one stage of transfer process - Standard_EXPORT Standard_Real SolidAngleFactor(); + Standard_EXPORT Standard_Real SolidAngleFactor() const; //! Returns transient factor radian degree for conversion of angles //! at one stage of transfer process - Standard_EXPORT Standard_Real FactorRadianDegree(); + Standard_EXPORT Standard_Real FactorRadianDegree() const; //! Returns transient factor degree radian for conversion of angles //! at one stage of transfer process - Standard_EXPORT Standard_Real FactorDegreeRadian(); + Standard_EXPORT Standard_Real FactorDegreeRadian() const; private: @@ -77,4 +72,4 @@ private: Standard_Real myCascadeUnit; }; -#endif // _StepData_GlobalFactors_HeaderFile +#endif // _StepData_Factors_HeaderFile diff --git a/src/StepData/StepData_StepModel.cxx b/src/StepData/StepData_StepModel.cxx index f8941148af..7a392dfce9 100644 --- a/src/StepData/StepData_StepModel.cxx +++ b/src/StepData/StepData_StepModel.cxx @@ -23,7 +23,6 @@ #include #include #include -#include #include #include #include @@ -216,7 +215,7 @@ Handle(TCollection_HAsciiString) StepData_StepModel::StringLabel //======================================================================= void StepData_StepModel::SetLocalLengthUnit(const Standard_Real theUnit) { - StepData_GlobalFactors::Intance().SetCascadeUnit(theUnit); + myLocalLengthUnit = theUnit; myReadUnitIsInitialized = Standard_True; } @@ -226,7 +225,7 @@ void StepData_StepModel::SetLocalLengthUnit(const Standard_Real theUnit) //======================================================================= Standard_Real StepData_StepModel::LocalLengthUnit() const { - return StepData_GlobalFactors::Intance().CascadeUnit(); + return myLocalLengthUnit; } //======================================================================= @@ -245,4 +244,4 @@ void StepData_StepModel::SetWriteLengthUnit(const Standard_Real theUnit) Standard_Real StepData_StepModel::WriteLengthUnit() const { return myWriteUnit; -} \ No newline at end of file +} diff --git a/src/StepData/StepData_StepModel.hxx b/src/StepData/StepData_StepModel.hxx index dce1d5beb0..8c1dc28ac5 100644 --- a/src/StepData/StepData_StepModel.hxx +++ b/src/StepData/StepData_StepModel.hxx @@ -21,6 +21,7 @@ #include #include #include +#include class Standard_Transient; class Interface_EntityIterator; @@ -135,8 +136,7 @@ private: Resource_FormatType mySourceCodePage; Standard_Boolean myReadUnitIsInitialized; Standard_Real myWriteUnit; - - + Standard_Real myLocalLengthUnit; }; diff --git a/src/StepSelect/StepSelect_StepType.cxx b/src/StepSelect/StepSelect_StepType.cxx index 69b5397606..d7fdae70c5 100644 --- a/src/StepSelect/StepSelect_StepType.cxx +++ b/src/StepSelect/StepSelect_StepType.cxx @@ -15,6 +15,7 @@ #include #include #include +#include #include #include #include @@ -49,6 +50,8 @@ static TCollection_AsciiString lastvalue; (const Handle(Standard_Transient)& ent, const Handle(Interface_InterfaceModel)& /*model*/) const { + static Standard_Mutex aMutex; + Standard_Mutex::Sentry aSentry(aMutex); lastvalue.Clear(); Handle(StepData_ReadWriteModule) module; Standard_Integer CN; diff --git a/src/StepToGeom/StepToGeom.cxx b/src/StepToGeom/StepToGeom.cxx index 1b365c150e..084531d8f0 100644 --- a/src/StepToGeom/StepToGeom.cxx +++ b/src/StepToGeom/StepToGeom.cxx @@ -127,7 +127,7 @@ #include #include -#include +#include #include #include #include @@ -138,9 +138,10 @@ // Creation d' un Ax1Placement de Geom a partir d' un axis1_placement de Step //============================================================================= -Handle(Geom_Axis1Placement) StepToGeom::MakeAxis1Placement (const Handle(StepGeom_Axis1Placement)& SA) +Handle(Geom_Axis1Placement) StepToGeom::MakeAxis1Placement (const Handle(StepGeom_Axis1Placement)& SA, + const StepData_Factors& theLocalFactors) { - Handle(Geom_CartesianPoint) P = MakeCartesianPoint (SA->Location()); + Handle(Geom_CartesianPoint) P = MakeCartesianPoint (SA->Location(), theLocalFactors); if (! P.IsNull()) { // sln 22.10.2001. CTS23496: If problems with creation of axis direction occur default direction is used @@ -160,9 +161,10 @@ Handle(Geom_Axis1Placement) StepToGeom::MakeAxis1Placement (const Handle(StepGeo // Creation d' un Axis2Placement de Geom a partir d' un axis2_placement_3d de Step //============================================================================= -Handle(Geom_Axis2Placement) StepToGeom::MakeAxis2Placement (const Handle(StepGeom_Axis2Placement3d)& SA) +Handle(Geom_Axis2Placement) StepToGeom::MakeAxis2Placement (const Handle(StepGeom_Axis2Placement3d)& SA, + const StepData_Factors& theLocalFactors) { - Handle(Geom_CartesianPoint) P = MakeCartesianPoint (SA->Location()); + Handle(Geom_CartesianPoint) P = MakeCartesianPoint (SA->Location(), theLocalFactors); if (! P.IsNull()) { const gp_Pnt Pgp = P->Pnt(); @@ -225,9 +227,10 @@ Handle(Geom_Axis2Placement) StepToGeom::MakeAxis2Placement(const Handle(StepGeom // Creation d' un AxisPlacement de Geom2d a partir d' un axis2_placement_3d de Step //============================================================================= -Handle(Geom2d_AxisPlacement) StepToGeom::MakeAxisPlacement (const Handle(StepGeom_Axis2Placement2d)& SA) +Handle(Geom2d_AxisPlacement) StepToGeom::MakeAxisPlacement (const Handle(StepGeom_Axis2Placement2d)& SA, + const StepData_Factors& theLocalFactors) { - Handle(Geom2d_CartesianPoint) P = MakeCartesianPoint2d (SA->Location()); + Handle(Geom2d_CartesianPoint) P = MakeCartesianPoint2d (SA->Location(), theLocalFactors); if (! P.IsNull()) { // sln 23.10.2001. CTS23496: If problems with creation of direction occur default direction is used @@ -247,19 +250,20 @@ Handle(Geom2d_AxisPlacement) StepToGeom::MakeAxisPlacement (const Handle(StepGeo // Creation d' une BoundedCurve de Geom a partir d' une BoundedCurve de Step //============================================================================= -Handle(Geom_BoundedCurve) StepToGeom::MakeBoundedCurve (const Handle(StepGeom_BoundedCurve)& SC) +Handle(Geom_BoundedCurve) StepToGeom::MakeBoundedCurve (const Handle(StepGeom_BoundedCurve)& SC, + const StepData_Factors& theLocalFactors) { if (SC->IsKind(STANDARD_TYPE(StepGeom_BSplineCurveWithKnotsAndRationalBSplineCurve))) { - return MakeBSplineCurve (Handle(StepGeom_BSplineCurveWithKnotsAndRationalBSplineCurve)::DownCast(SC)); + return MakeBSplineCurve (Handle(StepGeom_BSplineCurveWithKnotsAndRationalBSplineCurve)::DownCast(SC), theLocalFactors); } if (SC->IsKind(STANDARD_TYPE(StepGeom_BSplineCurveWithKnots))) { - return MakeBSplineCurve (Handle(StepGeom_BSplineCurveWithKnots)::DownCast(SC)); + return MakeBSplineCurve (Handle(StepGeom_BSplineCurveWithKnots)::DownCast(SC), theLocalFactors); } if (SC->IsKind(STANDARD_TYPE(StepGeom_TrimmedCurve))) { - return MakeTrimmedCurve (Handle(StepGeom_TrimmedCurve)::DownCast(SC)); + return MakeTrimmedCurve (Handle(StepGeom_TrimmedCurve)::DownCast(SC), theLocalFactors); } // STEP BezierCurve, UniformCurve and QuasiUniformCurve are transformed into @@ -286,7 +290,7 @@ Handle(Geom_BoundedCurve) StepToGeom::MakeBoundedCurve (const Handle(StepGeom_Bo BSPL->SetKnotMultiplicities(Kmult); BSPL->SetKnots(Knots); - return MakeBSplineCurve (BSPL); + return MakeBSplineCurve (BSPL, theLocalFactors); } if (SC->IsKind(STANDARD_TYPE(StepGeom_UniformCurve))) @@ -313,7 +317,7 @@ Handle(Geom_BoundedCurve) StepToGeom::MakeBoundedCurve (const Handle(StepGeom_Bo BSPL->SetKnotMultiplicities(Kmult); BSPL->SetKnots(Knots); - return MakeBSplineCurve (BSPL); + return MakeBSplineCurve (BSPL, theLocalFactors); } if (SC->IsKind(STANDARD_TYPE(StepGeom_QuasiUniformCurve))) @@ -343,7 +347,7 @@ Handle(Geom_BoundedCurve) StepToGeom::MakeBoundedCurve (const Handle(StepGeom_Bo BSPL->SetKnotMultiplicities(Kmult); BSPL->SetKnots(Knots); - return MakeBSplineCurve (BSPL); + return MakeBSplineCurve (BSPL, theLocalFactors); } if (SC->IsKind(STANDARD_TYPE(StepGeom_UniformCurveAndRationalBSplineCurve))) @@ -370,7 +374,7 @@ Handle(Geom_BoundedCurve) StepToGeom::MakeBoundedCurve (const Handle(StepGeom_Bo RUC->ClosedCurve(), RUC->SelfIntersect(), Kmult, Knots, StepGeom_ktUnspecified, RUC->WeightsData()); - return MakeBSplineCurve (RBSPL); + return MakeBSplineCurve (RBSPL, theLocalFactors); } if (SC->IsKind(STANDARD_TYPE(StepGeom_QuasiUniformCurveAndRationalBSplineCurve))) @@ -398,12 +402,12 @@ Handle(Geom_BoundedCurve) StepToGeom::MakeBoundedCurve (const Handle(StepGeom_Bo RQUC->ClosedCurve(), RQUC->SelfIntersect(), Kmult, Knots, StepGeom_ktUnspecified, RQUC->WeightsData()); - return MakeBSplineCurve (RBSPL); + return MakeBSplineCurve (RBSPL, theLocalFactors); } if (SC->IsKind(STANDARD_TYPE(StepGeom_Polyline))) { //:n6 abv 15 Feb 99 - return MakePolyline (Handle(StepGeom_Polyline)::DownCast (SC)); + return MakePolyline (Handle(StepGeom_Polyline)::DownCast (SC), theLocalFactors); } return 0; @@ -413,23 +417,24 @@ Handle(Geom_BoundedCurve) StepToGeom::MakeBoundedCurve (const Handle(StepGeom_Bo // Creation d' une BoundedCurve de Geom a partir d' une BoundedCurve de Step //============================================================================= -Handle(Geom2d_BoundedCurve) StepToGeom::MakeBoundedCurve2d (const Handle(StepGeom_BoundedCurve)& SC) +Handle(Geom2d_BoundedCurve) StepToGeom::MakeBoundedCurve2d (const Handle(StepGeom_BoundedCurve)& SC, + const StepData_Factors& theLocalFactors) { if (SC->IsKind(STANDARD_TYPE(StepGeom_BSplineCurveWithKnotsAndRationalBSplineCurve))) { - return MakeBSplineCurve2d (Handle(StepGeom_BSplineCurveWithKnotsAndRationalBSplineCurve)::DownCast(SC)); + return MakeBSplineCurve2d (Handle(StepGeom_BSplineCurveWithKnotsAndRationalBSplineCurve)::DownCast(SC), theLocalFactors); } if (SC->IsKind(STANDARD_TYPE(StepGeom_BSplineCurveWithKnots))) { - return MakeBSplineCurve2d (Handle(StepGeom_BSplineCurveWithKnots)::DownCast(SC)); + return MakeBSplineCurve2d (Handle(StepGeom_BSplineCurveWithKnots)::DownCast(SC), theLocalFactors); } if (SC->IsKind(STANDARD_TYPE(StepGeom_TrimmedCurve))) { - return MakeTrimmedCurve2d (Handle(StepGeom_TrimmedCurve)::DownCast(SC)); + return MakeTrimmedCurve2d (Handle(StepGeom_TrimmedCurve)::DownCast(SC), theLocalFactors); } if (SC->IsKind(STANDARD_TYPE(StepGeom_Polyline))) { //:n6 abv 15 Feb 99 - return MakePolyline2d (Handle(StepGeom_Polyline)::DownCast(SC)); + return MakePolyline2d (Handle(StepGeom_Polyline)::DownCast(SC), theLocalFactors); } return Handle(Geom2d_BoundedCurve)(); } @@ -438,19 +443,20 @@ Handle(Geom2d_BoundedCurve) StepToGeom::MakeBoundedCurve2d (const Handle(StepGeo // Creation d' une BoundedSurface de Geom a partir d' une BoundedSurface de Step //============================================================================= -Handle(Geom_BoundedSurface) StepToGeom::MakeBoundedSurface (const Handle(StepGeom_BoundedSurface)& SS) +Handle(Geom_BoundedSurface) StepToGeom::MakeBoundedSurface (const Handle(StepGeom_BoundedSurface)& SS, + const StepData_Factors& theLocalFactors) { if (SS->IsKind(STANDARD_TYPE(StepGeom_BSplineSurfaceWithKnotsAndRationalBSplineSurface))) { - return MakeBSplineSurface (Handle(StepGeom_BSplineSurfaceWithKnotsAndRationalBSplineSurface)::DownCast(SS)); + return MakeBSplineSurface (Handle(StepGeom_BSplineSurfaceWithKnotsAndRationalBSplineSurface)::DownCast(SS), theLocalFactors); } if (SS->IsKind(STANDARD_TYPE(StepGeom_BSplineSurfaceWithKnots))) { - return MakeBSplineSurface (Handle(StepGeom_BSplineSurfaceWithKnots)::DownCast(SS)); + return MakeBSplineSurface (Handle(StepGeom_BSplineSurfaceWithKnots)::DownCast(SS), theLocalFactors); } if (SS->IsKind(STANDARD_TYPE(StepGeom_RectangularTrimmedSurface))) { - return MakeRectangularTrimmedSurface (Handle(StepGeom_RectangularTrimmedSurface)::DownCast(SS)); + return MakeRectangularTrimmedSurface (Handle(StepGeom_RectangularTrimmedSurface)::DownCast(SS), theLocalFactors); } // STEP BezierSurface, UniformSurface and QuasiUniformSurface are transformed @@ -484,7 +490,7 @@ Handle(Geom_BoundedSurface) StepToGeom::MakeBoundedSurface (const Handle(StepGeo BSPL->SetUKnots(UKnots); BSPL->SetVKnots(VKnots); - return MakeBSplineSurface (BSPL); + return MakeBSplineSurface (BSPL, theLocalFactors); } if (SS->IsKind(STANDARD_TYPE(StepGeom_UniformSurface))) @@ -521,7 +527,7 @@ Handle(Geom_BoundedSurface) StepToGeom::MakeBoundedSurface (const Handle(StepGeo BSPL->SetVMultiplicities(VKmult); BSPL->SetVKnots(VKnots); - return MakeBSplineSurface (BSPL); + return MakeBSplineSurface (BSPL, theLocalFactors); } if (SS->IsKind(STANDARD_TYPE(StepGeom_QuasiUniformSurface))) @@ -563,7 +569,7 @@ Handle(Geom_BoundedSurface) StepToGeom::MakeBoundedSurface (const Handle(StepGeo BSPL->SetVMultiplicities(VKmult); BSPL->SetVKnots(VKnots); - return MakeBSplineSurface (BSPL); + return MakeBSplineSurface (BSPL, theLocalFactors); } if (SS->IsKind(STANDARD_TYPE(StepGeom_UniformSurfaceAndRationalBSplineSurface))) @@ -598,7 +604,7 @@ Handle(Geom_BoundedSurface) StepToGeom::MakeBoundedSurface (const Handle(StepGeo UKmult, VKmult, UKnots, VKnots, StepGeom_ktUnspecified, RUS->WeightsData()); - return MakeBSplineSurface (RBSPL); + return MakeBSplineSurface (RBSPL, theLocalFactors); } if (SS->IsKind(STANDARD_TYPE(StepGeom_QuasiUniformSurfaceAndRationalBSplineSurface))) @@ -635,7 +641,7 @@ Handle(Geom_BoundedSurface) StepToGeom::MakeBoundedSurface (const Handle(StepGeo RQUS->SurfaceForm(), RQUS->UClosed(), RQUS->VClosed(), RQUS->SelfIntersect(), UKmult, VKmult, UKnots, VKnots, StepGeom_ktUnspecified, RQUS->WeightsData()); - return MakeBSplineSurface (RBSPL); + return MakeBSplineSurface (RBSPL, theLocalFactors); } return 0; @@ -655,8 +661,9 @@ template Handle(TBSplineCurve) MakeBSplineCurveCommon ( const Handle(StepGeom_BSplineCurve)& theStepGeom_BSplineCurve, + const StepData_Factors& theLocalFactors, TGpPnt(TCartesianPoint::* thePntGetterFunction)() const, - Handle(TCartesianPoint) (*thePointMakerFunction)(const Handle(StepGeom_CartesianPoint)&) + Handle(TCartesianPoint) (*thePointMakerFunction)(const Handle(StepGeom_CartesianPoint)&, const StepData_Factors&) ) { Handle(StepGeom_BSplineCurveWithKnots) aBSplineCurveWithKnots; @@ -747,7 +754,7 @@ Handle(TBSplineCurve) MakeBSplineCurveCommon for (Standard_Integer i = 1 + aFirstMuultypisityDifference; i <= NbPoles - aLastMuultypisityDifference; ++i) { - Handle(TCartesianPoint) aPoint = (*thePointMakerFunction)(aControlPointsList->Value(i)); + Handle(TCartesianPoint) aPoint = (*thePointMakerFunction)(aControlPointsList->Value(i), theLocalFactors); if (!aPoint.IsNull()) { TCartesianPoint* pPoint = aPoint.get(); @@ -810,10 +817,11 @@ Handle(TBSplineCurve) MakeBSplineCurveCommon // Creation d' une BSplineCurve de Geom a partir d' une BSplineCurve de Step //============================================================================= -Handle(Geom_BSplineCurve) StepToGeom::MakeBSplineCurve (const Handle(StepGeom_BSplineCurve)& theStepGeom_BSplineCurve) +Handle(Geom_BSplineCurve) StepToGeom::MakeBSplineCurve (const Handle(StepGeom_BSplineCurve)& theStepGeom_BSplineCurve, + const StepData_Factors& theLocalFactors) { return MakeBSplineCurveCommon - (theStepGeom_BSplineCurve, &Geom_CartesianPoint::Pnt, &MakeCartesianPoint); + (theStepGeom_BSplineCurve, theLocalFactors, &Geom_CartesianPoint::Pnt, &MakeCartesianPoint); } //============================================================================= @@ -821,10 +829,11 @@ Handle(Geom_BSplineCurve) StepToGeom::MakeBSplineCurve (const Handle(StepGeom_BS // BSplineCurveWithKnotsAndRationalBSplineCurve de Step //============================================================================= -Handle(Geom2d_BSplineCurve) StepToGeom::MakeBSplineCurve2d (const Handle(StepGeom_BSplineCurve)& theStepGeom_BSplineCurve) +Handle(Geom2d_BSplineCurve) StepToGeom::MakeBSplineCurve2d (const Handle(StepGeom_BSplineCurve)& theStepGeom_BSplineCurve, + const StepData_Factors& theLocalFactors) { return MakeBSplineCurveCommon - (theStepGeom_BSplineCurve, &Geom2d_CartesianPoint::Pnt2d, &MakeCartesianPoint2d); + (theStepGeom_BSplineCurve, theLocalFactors, &Geom2d_CartesianPoint::Pnt2d, &MakeCartesianPoint2d); } //============================================================================= @@ -832,7 +841,8 @@ Handle(Geom2d_BSplineCurve) StepToGeom::MakeBSplineCurve2d (const Handle(StepGeo // BSplineSurface de Step //============================================================================= -Handle(Geom_BSplineSurface) StepToGeom::MakeBSplineSurface (const Handle(StepGeom_BSplineSurface)& SS) +Handle(Geom_BSplineSurface) StepToGeom::MakeBSplineSurface (const Handle(StepGeom_BSplineSurface)& SS, + const StepData_Factors& theLocalFactors) { Standard_Integer i, j; Handle(StepGeom_BSplineSurfaceWithKnots) BS; @@ -856,7 +866,7 @@ Handle(Geom_BSplineSurface) StepToGeom::MakeBSplineSurface (const Handle(StepGeo TColgp_Array2OfPnt Poles(1,NUPoles,1,NVPoles); for (i=1; i<=NUPoles; i++) { for (j=1; j<=NVPoles; j++) { - Handle(Geom_CartesianPoint) P = MakeCartesianPoint (aControlPointsList->Value(i,j)); + Handle(Geom_CartesianPoint) P = MakeCartesianPoint (aControlPointsList->Value(i,j), theLocalFactors); if (! P.IsNull()) Poles.SetValue(i,j,P->Pnt()); else @@ -995,11 +1005,12 @@ Handle(Geom_BSplineSurface) StepToGeom::MakeBSplineSurface (const Handle(StepGeo // Creation d' un CartesianPoint de Geom a partir d' un CartesianPoint de Step //============================================================================= -Handle(Geom_CartesianPoint) StepToGeom::MakeCartesianPoint (const Handle(StepGeom_CartesianPoint)& SP) +Handle(Geom_CartesianPoint) StepToGeom::MakeCartesianPoint (const Handle(StepGeom_CartesianPoint)& SP, + const StepData_Factors& theLocalFactors) { if (SP->NbCoordinates() == 3) { - const Standard_Real LF = StepData_GlobalFactors::Intance().LengthFactor(); + const Standard_Real LF = theLocalFactors.LengthFactor(); const Standard_Real X = SP->CoordinatesValue(1) * LF; const Standard_Real Y = SP->CoordinatesValue(2) * LF; const Standard_Real Z = SP->CoordinatesValue(3) * LF; @@ -1013,8 +1024,10 @@ Handle(Geom_CartesianPoint) StepToGeom::MakeCartesianPoint (const Handle(StepGeo // Step //============================================================================= -Handle(Geom2d_CartesianPoint) StepToGeom::MakeCartesianPoint2d (const Handle(StepGeom_CartesianPoint)& SP) +Handle(Geom2d_CartesianPoint) StepToGeom::MakeCartesianPoint2d (const Handle(StepGeom_CartesianPoint)& SP, + const StepData_Factors& theLocalFactors) { + (void)theLocalFactors; if (SP->NbCoordinates() == 2) { const Standard_Real X = SP->CoordinatesValue(1); @@ -1028,16 +1041,17 @@ Handle(Geom2d_CartesianPoint) StepToGeom::MakeCartesianPoint2d (const Handle(Ste // Creation d' un Circle de Geom a partir d' un Circle de Step //============================================================================= -Handle(Geom_Circle) StepToGeom::MakeCircle (const Handle(StepGeom_Circle)& SC) +Handle(Geom_Circle) StepToGeom::MakeCircle (const Handle(StepGeom_Circle)& SC, + const StepData_Factors& theLocalFactors) { const StepGeom_Axis2Placement AxisSelect = SC->Position(); if (AxisSelect.CaseNum(AxisSelect.Value()) == 2) { Handle(Geom_Axis2Placement) A = - MakeAxis2Placement (Handle(StepGeom_Axis2Placement3d)::DownCast(AxisSelect.Value())); + MakeAxis2Placement (Handle(StepGeom_Axis2Placement3d)::DownCast(AxisSelect.Value()), theLocalFactors); if (! A.IsNull()) { - return new Geom_Circle(A->Ax2(),SC->Radius() * StepData_GlobalFactors::Intance().LengthFactor()); + return new Geom_Circle(A->Ax2(), SC->Radius() * theLocalFactors.LengthFactor()); } } return 0; @@ -1047,12 +1061,13 @@ Handle(Geom_Circle) StepToGeom::MakeCircle (const Handle(StepGeom_Circle)& SC) // Creation d' un Circle de Geom2d a partir d' un Circle de Step //============================================================================= -Handle(Geom2d_Circle) StepToGeom::MakeCircle2d (const Handle(StepGeom_Circle)& SC) +Handle(Geom2d_Circle) StepToGeom::MakeCircle2d (const Handle(StepGeom_Circle)& SC, + const StepData_Factors& theLocalFactors) { const StepGeom_Axis2Placement AxisSelect = SC->Position(); if (AxisSelect.CaseNum(AxisSelect.Value()) == 1) { Handle(Geom2d_AxisPlacement) A1 = - MakeAxisPlacement (Handle(StepGeom_Axis2Placement2d)::DownCast(AxisSelect.Value())); + MakeAxisPlacement (Handle(StepGeom_Axis2Placement2d)::DownCast(AxisSelect.Value()), theLocalFactors); if (! A1.IsNull()) { return new Geom2d_Circle (A1->Ax2d(), SC->Radius()); @@ -1065,19 +1080,20 @@ Handle(Geom2d_Circle) StepToGeom::MakeCircle2d (const Handle(StepGeom_Circle)& S // Creation d' une Conic de Geom a partir d' une Conic de Step //============================================================================= -Handle(Geom_Conic) StepToGeom::MakeConic (const Handle(StepGeom_Conic)& SC) +Handle(Geom_Conic) StepToGeom::MakeConic (const Handle(StepGeom_Conic)& SC, + const StepData_Factors& theLocalFactors) { if (SC->IsKind(STANDARD_TYPE(StepGeom_Circle))) { - return MakeCircle (Handle(StepGeom_Circle)::DownCast(SC)); + return MakeCircle (Handle(StepGeom_Circle)::DownCast(SC), theLocalFactors); } if (SC->IsKind(STANDARD_TYPE(StepGeom_Ellipse))) { - return MakeEllipse (Handle(StepGeom_Ellipse)::DownCast(SC)); + return MakeEllipse (Handle(StepGeom_Ellipse)::DownCast(SC), theLocalFactors); } if (SC->IsKind(STANDARD_TYPE(StepGeom_Hyperbola))) { - return MakeHyperbola (Handle(StepGeom_Hyperbola)::DownCast(SC)); + return MakeHyperbola (Handle(StepGeom_Hyperbola)::DownCast(SC), theLocalFactors); } if (SC->IsKind(STANDARD_TYPE(StepGeom_Parabola))) { - return MakeParabola (Handle(StepGeom_Parabola)::DownCast(SC)); + return MakeParabola (Handle(StepGeom_Parabola)::DownCast(SC), theLocalFactors); } // Attention : Other conic shall be implemented ! return 0; @@ -1087,19 +1103,20 @@ Handle(Geom_Conic) StepToGeom::MakeConic (const Handle(StepGeom_Conic)& SC) // Creation d' une Conic de Geom2d a partir d' une Conic de Step //============================================================================= -Handle(Geom2d_Conic) StepToGeom::MakeConic2d (const Handle(StepGeom_Conic)& SC) +Handle(Geom2d_Conic) StepToGeom::MakeConic2d (const Handle(StepGeom_Conic)& SC, + const StepData_Factors& theLocalFactors) { if (SC->IsKind(STANDARD_TYPE(StepGeom_Circle))) { - return MakeCircle2d (Handle(StepGeom_Circle)::DownCast(SC)); + return MakeCircle2d (Handle(StepGeom_Circle)::DownCast(SC), theLocalFactors); } if (SC->IsKind(STANDARD_TYPE(StepGeom_Ellipse))) { - return MakeEllipse2d (Handle(StepGeom_Ellipse)::DownCast(SC)); + return MakeEllipse2d (Handle(StepGeom_Ellipse)::DownCast(SC), theLocalFactors); } if (SC->IsKind(STANDARD_TYPE(StepGeom_Hyperbola))) { - return MakeHyperbola2d (Handle(StepGeom_Hyperbola)::DownCast(SC)); + return MakeHyperbola2d (Handle(StepGeom_Hyperbola)::DownCast(SC), theLocalFactors); } if (SC->IsKind(STANDARD_TYPE(StepGeom_Parabola))) { - return MakeParabola2d (Handle(StepGeom_Parabola)::DownCast(SC)); + return MakeParabola2d (Handle(StepGeom_Parabola)::DownCast(SC), theLocalFactors); } // Attention : Other conic shall be implemented ! return Handle(Geom2d_Conic)(); @@ -1110,13 +1127,14 @@ Handle(Geom2d_Conic) StepToGeom::MakeConic2d (const Handle(StepGeom_Conic)& SC) // Step //============================================================================= -Handle(Geom_ConicalSurface) StepToGeom::MakeConicalSurface (const Handle(StepGeom_ConicalSurface)& SS) +Handle(Geom_ConicalSurface) StepToGeom::MakeConicalSurface (const Handle(StepGeom_ConicalSurface)& SS, + const StepData_Factors& theLocalFactors) { - Handle(Geom_Axis2Placement) A = MakeAxis2Placement (SS->Position()); + Handle(Geom_Axis2Placement) A = MakeAxis2Placement (SS->Position(), theLocalFactors); if (! A.IsNull()) { - const Standard_Real R = SS->Radius() * StepData_GlobalFactors::Intance().LengthFactor(); - const Standard_Real Ang = SS->SemiAngle() * StepData_GlobalFactors::Intance().PlaneAngleFactor(); + const Standard_Real R = SS->Radius() * theLocalFactors.LengthFactor(); + const Standard_Real Ang = SS->SemiAngle() * theLocalFactors.PlaneAngleFactor(); //#2(K3-3) rln 12/02/98 ProSTEP ct_turbine-A.stp entity #518, #3571 (gp::Resolution() is too little) return new Geom_ConicalSurface(A->Ax2(), Max(Ang, Precision::Angular()), R); } @@ -1127,22 +1145,23 @@ Handle(Geom_ConicalSurface) StepToGeom::MakeConicalSurface (const Handle(StepGeo // Creation d' une Curve de Geom a partir d' une Curve de Step //============================================================================= -Handle(Geom_Curve) StepToGeom::MakeCurve (const Handle(StepGeom_Curve)& SC) +Handle(Geom_Curve) StepToGeom::MakeCurve (const Handle(StepGeom_Curve)& SC, + const StepData_Factors& theLocalFactors) { if (SC.IsNull()){ return Handle(Geom_Curve)(); } if (SC->IsKind(STANDARD_TYPE(StepGeom_Line))) { - return MakeLine (Handle(StepGeom_Line)::DownCast(SC)); + return MakeLine (Handle(StepGeom_Line)::DownCast(SC), theLocalFactors); } if (SC->IsKind(STANDARD_TYPE(StepGeom_TrimmedCurve))) { - return MakeTrimmedCurve (Handle(StepGeom_TrimmedCurve)::DownCast(SC)); + return MakeTrimmedCurve (Handle(StepGeom_TrimmedCurve)::DownCast(SC), theLocalFactors); } if (SC->IsKind(STANDARD_TYPE(StepGeom_Conic))) { - return MakeConic (Handle(StepGeom_Conic)::DownCast(SC)); + return MakeConic (Handle(StepGeom_Conic)::DownCast(SC), theLocalFactors); } if (SC->IsKind(STANDARD_TYPE(StepGeom_BoundedCurve))) { - return MakeBoundedCurve (Handle(StepGeom_BoundedCurve)::DownCast(SC)); + return MakeBoundedCurve (Handle(StepGeom_BoundedCurve)::DownCast(SC), theLocalFactors); } if (SC->IsKind(STANDARD_TYPE(StepGeom_CurveReplica))) { //:n7 abv 16 Feb 99 const Handle(StepGeom_CurveReplica) CR = Handle(StepGeom_CurveReplica)::DownCast(SC); @@ -1152,11 +1171,11 @@ Handle(Geom_Curve) StepToGeom::MakeCurve (const Handle(StepGeom_Curve)& SC) // protect against cyclic references and wrong type of cartop if ( !T.IsNull() && PC != SC ) { - Handle(Geom_Curve) C1 = MakeCurve (PC); + Handle(Geom_Curve) C1 = MakeCurve (PC, theLocalFactors); if (! C1.IsNull()) { gp_Trsf T1; - if (MakeTransformation3d(T,T1)) + if (MakeTransformation3d(T, T1, theLocalFactors)) { C1->Transform ( T1 ); return C1; @@ -1168,7 +1187,7 @@ Handle(Geom_Curve) StepToGeom::MakeCurve (const Handle(StepGeom_Curve)& SC) const Handle(StepGeom_OffsetCurve3d) OC = Handle(StepGeom_OffsetCurve3d)::DownCast(SC); const Handle(StepGeom_Curve) BC = OC->BasisCurve(); if ( BC != SC ) { // protect against loop - Handle(Geom_Curve) C1 = MakeCurve (BC); + Handle(Geom_Curve) C1 = MakeCurve (BC, theLocalFactors); if (! C1.IsNull()) { Handle(Geom_Direction) RD = MakeDirection(OC->RefDirection()); @@ -1181,7 +1200,7 @@ Handle(Geom_Curve) StepToGeom::MakeCurve (const Handle(StepGeom_Curve)& SC) } else if (SC->IsKind(STANDARD_TYPE(StepGeom_SurfaceCurve))) { //:o5 abv 17 Feb 99 const Handle(StepGeom_SurfaceCurve) SurfC = Handle(StepGeom_SurfaceCurve)::DownCast(SC); - return MakeCurve (SurfC->Curve3d()); + return MakeCurve (SurfC->Curve3d(), theLocalFactors); } return 0; } @@ -1190,16 +1209,17 @@ Handle(Geom_Curve) StepToGeom::MakeCurve (const Handle(StepGeom_Curve)& SC) // Creation d' une Curve de Geom2d a partir d' une Curve de Step //============================================================================= -Handle(Geom2d_Curve) StepToGeom::MakeCurve2d (const Handle(StepGeom_Curve)& SC) +Handle(Geom2d_Curve) StepToGeom::MakeCurve2d (const Handle(StepGeom_Curve)& SC, + const StepData_Factors& theLocalFactors) { if (SC->IsKind(STANDARD_TYPE(StepGeom_Line))) { - return MakeLine2d (Handle(StepGeom_Line)::DownCast(SC)); + return MakeLine2d (Handle(StepGeom_Line)::DownCast(SC), theLocalFactors); } if (SC->IsKind(STANDARD_TYPE(StepGeom_Conic))) { - return MakeConic2d (Handle(StepGeom_Conic)::DownCast(SC)); + return MakeConic2d (Handle(StepGeom_Conic)::DownCast(SC), theLocalFactors); } if (SC->IsKind(STANDARD_TYPE(StepGeom_BoundedCurve))) { - return MakeBoundedCurve2d (Handle(StepGeom_BoundedCurve)::DownCast(SC)); + return MakeBoundedCurve2d (Handle(StepGeom_BoundedCurve)::DownCast(SC), theLocalFactors); } if (SC->IsKind(STANDARD_TYPE(StepGeom_CurveReplica))) { //:n7 abv 16 Feb 99 const Handle(StepGeom_CurveReplica) CR = Handle(StepGeom_CurveReplica)::DownCast(SC); @@ -1209,11 +1229,11 @@ Handle(Geom2d_Curve) StepToGeom::MakeCurve2d (const Handle(StepGeom_Curve)& SC) // protect against cyclic references and wrong type of cartop if ( !T.IsNull() && PC != SC ) { - Handle(Geom2d_Curve) C1 = MakeCurve2d (PC); + Handle(Geom2d_Curve) C1 = MakeCurve2d (PC, theLocalFactors); if (! C1.IsNull()) { gp_Trsf2d T1; - if (MakeTransformation2d(T,T1)) + if (MakeTransformation2d(T, T1, theLocalFactors)) { C1->Transform ( T1 ); return C1; @@ -1229,12 +1249,13 @@ Handle(Geom2d_Curve) StepToGeom::MakeCurve2d (const Handle(StepGeom_Curve)& SC) // CylindricalSurface de Step //============================================================================= -Handle(Geom_CylindricalSurface) StepToGeom::MakeCylindricalSurface (const Handle(StepGeom_CylindricalSurface)& SS) +Handle(Geom_CylindricalSurface) StepToGeom::MakeCylindricalSurface (const Handle(StepGeom_CylindricalSurface)& SS, + const StepData_Factors& theLocalFactors) { - Handle(Geom_Axis2Placement) A = MakeAxis2Placement(SS->Position()); + Handle(Geom_Axis2Placement) A = MakeAxis2Placement(SS->Position(), theLocalFactors); if (! A.IsNull()) { - return new Geom_CylindricalSurface(A->Ax2(), SS->Radius() * StepData_GlobalFactors::Intance().LengthFactor()); + return new Geom_CylindricalSurface(A->Ax2(), SS->Radius() * theLocalFactors.LengthFactor()); } return 0; } @@ -1288,22 +1309,23 @@ Handle(Geom2d_Direction) StepToGeom::MakeDirection2d (const Handle(StepGeom_Dire // ElementarySurface de Step //============================================================================= -Handle(Geom_ElementarySurface) StepToGeom::MakeElementarySurface (const Handle(StepGeom_ElementarySurface)& SS) +Handle(Geom_ElementarySurface) StepToGeom::MakeElementarySurface (const Handle(StepGeom_ElementarySurface)& SS, + const StepData_Factors& theLocalFactors) { if (SS->IsKind(STANDARD_TYPE(StepGeom_Plane))) { - return MakePlane (Handle(StepGeom_Plane)::DownCast(SS)); + return MakePlane (Handle(StepGeom_Plane)::DownCast(SS), theLocalFactors); } if (SS->IsKind(STANDARD_TYPE(StepGeom_CylindricalSurface))) { - return MakeCylindricalSurface (Handle(StepGeom_CylindricalSurface)::DownCast(SS)); + return MakeCylindricalSurface (Handle(StepGeom_CylindricalSurface)::DownCast(SS), theLocalFactors); } if (SS->IsKind(STANDARD_TYPE(StepGeom_ConicalSurface))) { - return MakeConicalSurface (Handle(StepGeom_ConicalSurface)::DownCast(SS)); + return MakeConicalSurface (Handle(StepGeom_ConicalSurface)::DownCast(SS), theLocalFactors); } if (SS->IsKind(STANDARD_TYPE(StepGeom_SphericalSurface))) { - return MakeSphericalSurface (Handle(StepGeom_SphericalSurface)::DownCast(SS)); + return MakeSphericalSurface (Handle(StepGeom_SphericalSurface)::DownCast(SS), theLocalFactors); } if (SS->IsKind(STANDARD_TYPE(StepGeom_ToroidalSurface))) { - return MakeToroidalSurface (Handle(StepGeom_ToroidalSurface)::DownCast(SS)); + return MakeToroidalSurface (Handle(StepGeom_ToroidalSurface)::DownCast(SS), theLocalFactors); } return 0; } @@ -1312,15 +1334,16 @@ Handle(Geom_ElementarySurface) StepToGeom::MakeElementarySurface (const Handle(S // Creation d' un Ellipse de Geom a partir d' un Ellipse de Step //============================================================================= -Handle(Geom_Ellipse) StepToGeom::MakeEllipse (const Handle(StepGeom_Ellipse)& SC) +Handle(Geom_Ellipse) StepToGeom::MakeEllipse (const Handle(StepGeom_Ellipse)& SC, + const StepData_Factors& theLocalFactors) { const StepGeom_Axis2Placement AxisSelect = SC->Position(); if (AxisSelect.CaseNum(AxisSelect.Value()) == 2) { - Handle(Geom_Axis2Placement) A1 = MakeAxis2Placement (Handle(StepGeom_Axis2Placement3d)::DownCast(AxisSelect.Value())); + Handle(Geom_Axis2Placement) A1 = MakeAxis2Placement (Handle(StepGeom_Axis2Placement3d)::DownCast(AxisSelect.Value()), theLocalFactors); if (! A1.IsNull()) { gp_Ax2 A( A1->Ax2() ); - const Standard_Real LF = StepData_GlobalFactors::Intance().LengthFactor(); + const Standard_Real LF = theLocalFactors.LengthFactor(); const Standard_Real majorR = SC->SemiAxis1() * LF; const Standard_Real minorR = SC->SemiAxis2() * LF; if ( majorR - minorR >= 0. ) { //:o9 abv 19 Feb 99 @@ -1340,11 +1363,12 @@ Handle(Geom_Ellipse) StepToGeom::MakeEllipse (const Handle(StepGeom_Ellipse)& SC // Creation d' un Ellipse de Geom2d a partir d' un Ellipse de Step //============================================================================= -Handle(Geom2d_Ellipse) StepToGeom::MakeEllipse2d (const Handle(StepGeom_Ellipse)& SC) +Handle(Geom2d_Ellipse) StepToGeom::MakeEllipse2d (const Handle(StepGeom_Ellipse)& SC, + const StepData_Factors& theLocalFactors) { const StepGeom_Axis2Placement AxisSelect = SC->Position(); if (AxisSelect.CaseNum(AxisSelect.Value()) == 1) { - Handle(Geom2d_AxisPlacement) A1 = MakeAxisPlacement (Handle(StepGeom_Axis2Placement2d)::DownCast(AxisSelect.Value())); + Handle(Geom2d_AxisPlacement) A1 = MakeAxisPlacement (Handle(StepGeom_Axis2Placement2d)::DownCast(AxisSelect.Value()), theLocalFactors); if (! A1.IsNull()) { gp_Ax22d A( A1->Ax2d() ); @@ -1367,16 +1391,17 @@ Handle(Geom2d_Ellipse) StepToGeom::MakeEllipse2d (const Handle(StepGeom_Ellipse) // Creation d' un Hyperbola de Geom a partir d' un Hyperbola de Step //============================================================================= -Handle(Geom_Hyperbola) StepToGeom::MakeHyperbola (const Handle(StepGeom_Hyperbola)& SC) +Handle(Geom_Hyperbola) StepToGeom::MakeHyperbola (const Handle(StepGeom_Hyperbola)& SC, + const StepData_Factors& theLocalFactors) { const StepGeom_Axis2Placement AxisSelect = SC->Position(); if (AxisSelect.CaseNum(AxisSelect.Value()) == 2) { - Handle(Geom_Axis2Placement) A1 = MakeAxis2Placement (Handle(StepGeom_Axis2Placement3d)::DownCast(AxisSelect.Value())); + Handle(Geom_Axis2Placement) A1 = MakeAxis2Placement (Handle(StepGeom_Axis2Placement3d)::DownCast(AxisSelect.Value()), theLocalFactors); if (! A1.IsNull()) { const gp_Ax2 A( A1->Ax2() ); - const Standard_Real LF = StepData_GlobalFactors::Intance().LengthFactor(); + const Standard_Real LF = theLocalFactors.LengthFactor(); return new Geom_Hyperbola(A, SC->SemiAxis() * LF, SC->SemiImagAxis() * LF); } } @@ -1387,12 +1412,13 @@ Handle(Geom_Hyperbola) StepToGeom::MakeHyperbola (const Handle(StepGeom_Hyperbol // Creation d' un Hyperbola de Geom2d a partir d' un Hyperbola de Step //============================================================================= -Handle(Geom2d_Hyperbola) StepToGeom::MakeHyperbola2d (const Handle(StepGeom_Hyperbola)& SC) +Handle(Geom2d_Hyperbola) StepToGeom::MakeHyperbola2d (const Handle(StepGeom_Hyperbola)& SC, + const StepData_Factors& theLocalFactors) { const StepGeom_Axis2Placement AxisSelect = SC->Position(); if (AxisSelect.CaseNum(AxisSelect.Value()) == 1) { - Handle(Geom2d_AxisPlacement) A1 = MakeAxisPlacement (Handle(StepGeom_Axis2Placement2d)::DownCast(AxisSelect.Value())); + Handle(Geom2d_AxisPlacement) A1 = MakeAxisPlacement (Handle(StepGeom_Axis2Placement2d)::DownCast(AxisSelect.Value()), theLocalFactors); if (! A1.IsNull()) { const gp_Ax22d A( A1->Ax2d() ); @@ -1406,13 +1432,14 @@ Handle(Geom2d_Hyperbola) StepToGeom::MakeHyperbola2d (const Handle(StepGeom_Hype // Creation d' une Line de Geom a partir d' une Line de Step //============================================================================= -Handle(Geom_Line) StepToGeom::MakeLine (const Handle(StepGeom_Line)& SC) +Handle(Geom_Line) StepToGeom::MakeLine (const Handle(StepGeom_Line)& SC, + const StepData_Factors& theLocalFactors) { - Handle(Geom_CartesianPoint) P = MakeCartesianPoint(SC->Pnt()); + Handle(Geom_CartesianPoint) P = MakeCartesianPoint(SC->Pnt(), theLocalFactors); if (! P.IsNull()) { // sln 22.10.2001. CTS23496: Line is not created if direction have not been successfully created - Handle(Geom_VectorWithMagnitude) D = MakeVectorWithMagnitude (SC->Dir()); + Handle(Geom_VectorWithMagnitude) D = MakeVectorWithMagnitude (SC->Dir(), theLocalFactors); if (! D.IsNull()) { if( D->Vec().SquareMagnitude() < Precision::Confusion() * Precision::Confusion()) @@ -1428,9 +1455,10 @@ Handle(Geom_Line) StepToGeom::MakeLine (const Handle(StepGeom_Line)& SC) // Creation d' une Line de Geom2d a partir d' une Line de Step //============================================================================= -Handle(Geom2d_Line) StepToGeom::MakeLine2d (const Handle(StepGeom_Line)& SC) +Handle(Geom2d_Line) StepToGeom::MakeLine2d (const Handle(StepGeom_Line)& SC, + const StepData_Factors& theLocalFactors) { - Handle(Geom2d_CartesianPoint) P = MakeCartesianPoint2d(SC->Pnt()); + Handle(Geom2d_CartesianPoint) P = MakeCartesianPoint2d(SC->Pnt(), theLocalFactors); if (! P.IsNull()) { // sln 23.10.2001. CTS23496: Line is not created if direction have not been successfully created @@ -1448,15 +1476,16 @@ Handle(Geom2d_Line) StepToGeom::MakeLine2d (const Handle(StepGeom_Line)& SC) // Creation d' un Parabola de Geom a partir d' un Parabola de Step //============================================================================= -Handle(Geom_Parabola) StepToGeom::MakeParabola (const Handle(StepGeom_Parabola)& SC) +Handle(Geom_Parabola) StepToGeom::MakeParabola (const Handle(StepGeom_Parabola)& SC, + const StepData_Factors& theLocalFactors) { const StepGeom_Axis2Placement AxisSelect = SC->Position(); if (AxisSelect.CaseNum(AxisSelect.Value()) == 2) { - Handle(Geom_Axis2Placement) A = MakeAxis2Placement (Handle(StepGeom_Axis2Placement3d)::DownCast(AxisSelect.Value())); + Handle(Geom_Axis2Placement) A = MakeAxis2Placement (Handle(StepGeom_Axis2Placement3d)::DownCast(AxisSelect.Value()), theLocalFactors); if (! A.IsNull()) { - return new Geom_Parabola(A->Ax2(), SC->FocalDist() * StepData_GlobalFactors::Intance().LengthFactor()); + return new Geom_Parabola(A->Ax2(), SC->FocalDist() * theLocalFactors.LengthFactor()); } } return 0; @@ -1466,11 +1495,12 @@ Handle(Geom_Parabola) StepToGeom::MakeParabola (const Handle(StepGeom_Parabola)& // Creation d' un Parabola de Geom2d a partir d' un Parabola de Step //============================================================================= -Handle(Geom2d_Parabola) StepToGeom::MakeParabola2d (const Handle(StepGeom_Parabola)& SC) +Handle(Geom2d_Parabola) StepToGeom::MakeParabola2d (const Handle(StepGeom_Parabola)& SC, + const StepData_Factors& theLocalFactors) { const StepGeom_Axis2Placement AxisSelect = SC->Position(); if (AxisSelect.CaseNum(AxisSelect.Value()) == 1) { - Handle(Geom2d_AxisPlacement) A1 = MakeAxisPlacement (Handle(StepGeom_Axis2Placement2d)::DownCast(AxisSelect.Value())); + Handle(Geom2d_AxisPlacement) A1 = MakeAxisPlacement (Handle(StepGeom_Axis2Placement2d)::DownCast(AxisSelect.Value()), theLocalFactors); if (! A1.IsNull()) { const gp_Ax22d A( A1->Ax2d() ); @@ -1484,9 +1514,10 @@ Handle(Geom2d_Parabola) StepToGeom::MakeParabola2d (const Handle(StepGeom_Parabo // Creation d' un Plane de Geom a partir d' un plane de Step //============================================================================= -Handle(Geom_Plane) StepToGeom::MakePlane (const Handle(StepGeom_Plane)& SP) +Handle(Geom_Plane) StepToGeom::MakePlane (const Handle(StepGeom_Plane)& SP, + const StepData_Factors& theLocalFactors) { - Handle(Geom_Axis2Placement) A = MakeAxis2Placement (SP->Position()); + Handle(Geom_Axis2Placement) A = MakeAxis2Placement (SP->Position(), theLocalFactors); if (! A.IsNull()) { return new Geom_Plane(A->Ax2()); @@ -1499,7 +1530,8 @@ Handle(Geom_Plane) StepToGeom::MakePlane (const Handle(StepGeom_Plane)& SP) //purpose : //======================================================================= -Handle(Geom_BSplineCurve) StepToGeom::MakePolyline (const Handle(StepGeom_Polyline)& SPL) +Handle(Geom_BSplineCurve) StepToGeom::MakePolyline (const Handle(StepGeom_Polyline)& SPL, + const StepData_Factors& theLocalFactors) { if (SPL.IsNull()) return Handle(Geom_BSplineCurve)(); @@ -1513,7 +1545,7 @@ Handle(Geom_BSplineCurve) StepToGeom::MakePolyline (const Handle(StepGeom_Polyli for ( Standard_Integer i=1; i <= nbp; i++ ) { - Handle(Geom_CartesianPoint) P = MakeCartesianPoint (SPL->PointsValue(i)); + Handle(Geom_CartesianPoint) P = MakeCartesianPoint (SPL->PointsValue(i), theLocalFactors); if (! P.IsNull()) Poles.SetValue ( i, P->Pnt() ); else @@ -1534,7 +1566,8 @@ Handle(Geom_BSplineCurve) StepToGeom::MakePolyline (const Handle(StepGeom_Polyli //purpose : //======================================================================= -Handle(Geom2d_BSplineCurve) StepToGeom::MakePolyline2d (const Handle(StepGeom_Polyline)& SPL) +Handle(Geom2d_BSplineCurve) StepToGeom::MakePolyline2d (const Handle(StepGeom_Polyline)& SPL, + const StepData_Factors& theLocalFactors) { if (SPL.IsNull()) return Handle(Geom2d_BSplineCurve)(); @@ -1548,7 +1581,7 @@ Handle(Geom2d_BSplineCurve) StepToGeom::MakePolyline2d (const Handle(StepGeom_Po for ( Standard_Integer i=1; i <= nbp; i++ ) { - Handle(Geom2d_CartesianPoint) P = MakeCartesianPoint2d (SPL->PointsValue(i)); + Handle(Geom2d_CartesianPoint) P = MakeCartesianPoint2d(SPL->PointsValue(i), theLocalFactors); if (! P.IsNull()) Poles.SetValue ( i, P->Pnt2d() ); else @@ -1569,9 +1602,11 @@ Handle(Geom2d_BSplineCurve) StepToGeom::MakePolyline2d (const Handle(StepGeom_Po // RectangularTrimmedSurface de Step //============================================================================= -Handle(Geom_RectangularTrimmedSurface) StepToGeom::MakeRectangularTrimmedSurface (const Handle(StepGeom_RectangularTrimmedSurface)& SS) +Handle(Geom_RectangularTrimmedSurface) + StepToGeom::MakeRectangularTrimmedSurface (const Handle(StepGeom_RectangularTrimmedSurface)& SS, + const StepData_Factors& theLocalFactors) { - Handle(Geom_Surface) theBasis = MakeSurface (SS->BasisSurface()); + Handle(Geom_Surface) theBasis = MakeSurface (SS->BasisSurface(), theLocalFactors); if (! theBasis.IsNull()) { // ----------------------------------------- @@ -1580,8 +1615,8 @@ Handle(Geom_RectangularTrimmedSurface) StepToGeom::MakeRectangularTrimmedSurface Standard_Real uFact = 1.; Standard_Real vFact = 1.; - const Standard_Real LengthFact = StepData_GlobalFactors::Intance().LengthFactor(); - const Standard_Real AngleFact = StepData_GlobalFactors::Intance().PlaneAngleFactor(); // abv 30.06.00 trj4_k1_geo-tc-214.stp #1477: PI/180.; + const Standard_Real LengthFact = theLocalFactors.LengthFactor(); + const Standard_Real AngleFact = theLocalFactors.PlaneAngleFactor(); // abv 30.06.00 trj4_k1_geo-tc-214.stp #1477: PI/180.; if (theBasis->IsKind(STANDARD_TYPE(Geom_SphericalSurface)) || theBasis->IsKind(STANDARD_TYPE(Geom_ToroidalSurface))) { @@ -1618,12 +1653,13 @@ Handle(Geom_RectangularTrimmedSurface) StepToGeom::MakeRectangularTrimmedSurface // SphericalSurface de Step //============================================================================= -Handle(Geom_SphericalSurface) StepToGeom::MakeSphericalSurface (const Handle(StepGeom_SphericalSurface)& SS) +Handle(Geom_SphericalSurface) StepToGeom::MakeSphericalSurface (const Handle(StepGeom_SphericalSurface)& SS, + const StepData_Factors& theLocalFactors) { - Handle(Geom_Axis2Placement) A = MakeAxis2Placement (SS->Position()); + Handle(Geom_Axis2Placement) A = MakeAxis2Placement (SS->Position(), theLocalFactors); if (! A.IsNull()) { - return new Geom_SphericalSurface(A->Ax2(), SS->Radius() * StepData_GlobalFactors::Intance().LengthFactor()); + return new Geom_SphericalSurface(A->Ax2(), SS->Radius() * theLocalFactors.LengthFactor()); } return 0; } @@ -1632,7 +1668,8 @@ Handle(Geom_SphericalSurface) StepToGeom::MakeSphericalSurface (const Handle(Ste // Creation d' une Surface de Geom a partir d' une Surface de Step //============================================================================= -Handle(Geom_Surface) StepToGeom::MakeSurface (const Handle(StepGeom_Surface)& SS) +Handle(Geom_Surface) StepToGeom::MakeSurface (const Handle(StepGeom_Surface)& SS, + const StepData_Factors& theLocalFactors) { // sln 01.10.2001 BUC61003. If entry shell is NULL do nothing if(SS.IsNull()) { @@ -1642,26 +1679,26 @@ Handle(Geom_Surface) StepToGeom::MakeSurface (const Handle(StepGeom_Surface)& SS try { OCC_CATCH_SIGNALS if (SS->IsKind(STANDARD_TYPE(StepGeom_BoundedSurface))) { - return MakeBoundedSurface (Handle(StepGeom_BoundedSurface)::DownCast(SS)); + return MakeBoundedSurface (Handle(StepGeom_BoundedSurface)::DownCast(SS), theLocalFactors); } if (SS->IsKind(STANDARD_TYPE(StepGeom_ElementarySurface))) { const Handle(StepGeom_ElementarySurface) S1 = Handle(StepGeom_ElementarySurface)::DownCast(SS); if(S1->Position().IsNull()) return Handle(Geom_Surface)(); - return MakeElementarySurface (S1); + return MakeElementarySurface (S1, theLocalFactors); } if (SS->IsKind(STANDARD_TYPE(StepGeom_SweptSurface))) { - return MakeSweptSurface (Handle(StepGeom_SweptSurface)::DownCast(SS)); + return MakeSweptSurface (Handle(StepGeom_SweptSurface)::DownCast(SS), theLocalFactors); } if (SS->IsKind(STANDARD_TYPE(StepGeom_OffsetSurface))) { //:d4 abv 12 Mar 98 const Handle(StepGeom_OffsetSurface) OS = Handle(StepGeom_OffsetSurface)::DownCast(SS); - Handle(Geom_Surface) aBasisSurface = MakeSurface (OS->BasisSurface()); + Handle(Geom_Surface) aBasisSurface = MakeSurface (OS->BasisSurface(), theLocalFactors); if (! aBasisSurface.IsNull()) { // sln 03.10.01. BUC61003. creation of offset surface is corrected - const Standard_Real anOffset = OS->Distance() * StepData_GlobalFactors::Intance().LengthFactor(); + const Standard_Real anOffset = OS->Distance() * theLocalFactors.LengthFactor(); if (aBasisSurface->Continuity() == GeomAbs_C0) { const BRepBuilderAPI_MakeFace aBFace(aBasisSurface, Precision::Confusion()); @@ -1686,11 +1723,11 @@ Handle(Geom_Surface) StepToGeom::MakeSurface (const Handle(StepGeom_Surface)& SS const Handle(StepGeom_CartesianTransformationOperator3d) T = SR->Transformation(); // protect against cyclic references and wrong type of cartop if ( !T.IsNull() && PS != SS ) { - Handle(Geom_Surface) S1 = MakeSurface (PS); + Handle(Geom_Surface) S1 = MakeSurface (PS, theLocalFactors); if (! S1.IsNull()) { gp_Trsf T1; - if (MakeTransformation3d(T,T1)) + if (MakeTransformation3d(T, T1, theLocalFactors)) { S1->Transform ( T1 ); return S1; @@ -1716,13 +1753,14 @@ Handle(Geom_Surface) StepToGeom::MakeSurface (const Handle(StepGeom_Surface)& SS // SurfaceOfLinearExtrusion de Step //============================================================================= -Handle(Geom_SurfaceOfLinearExtrusion) StepToGeom::MakeSurfaceOfLinearExtrusion (const Handle(StepGeom_SurfaceOfLinearExtrusion)& SS) +Handle(Geom_SurfaceOfLinearExtrusion) StepToGeom::MakeSurfaceOfLinearExtrusion (const Handle(StepGeom_SurfaceOfLinearExtrusion)& SS, + const StepData_Factors& theLocalFactors) { - Handle(Geom_Curve) C = MakeCurve (SS->SweptCurve()); + Handle(Geom_Curve) C = MakeCurve (SS->SweptCurve(), theLocalFactors); if (! C.IsNull()) { // sln 23.10.2001. CTS23496: Surface is not created if extrusion axis have not been successfully created - Handle(Geom_VectorWithMagnitude) V = MakeVectorWithMagnitude (SS->ExtrusionAxis()); + Handle(Geom_VectorWithMagnitude) V = MakeVectorWithMagnitude (SS->ExtrusionAxis(), theLocalFactors); if (! V.IsNull()) { const gp_Dir D(V->Vec()); @@ -1740,12 +1778,13 @@ Handle(Geom_SurfaceOfLinearExtrusion) StepToGeom::MakeSurfaceOfLinearExtrusion ( // SurfaceOfRevolution de Step //============================================================================= -Handle(Geom_SurfaceOfRevolution) StepToGeom::MakeSurfaceOfRevolution (const Handle(StepGeom_SurfaceOfRevolution)& SS) +Handle(Geom_SurfaceOfRevolution) StepToGeom::MakeSurfaceOfRevolution (const Handle(StepGeom_SurfaceOfRevolution)& SS, + const StepData_Factors& theLocalFactors) { - Handle(Geom_Curve) C = MakeCurve (SS->SweptCurve()); + Handle(Geom_Curve) C = MakeCurve (SS->SweptCurve(), theLocalFactors); if (! C.IsNull()) { - Handle(Geom_Axis1Placement) A1 = MakeAxis1Placement (SS->AxisPosition()); + Handle(Geom_Axis1Placement) A1 = MakeAxis1Placement (SS->AxisPosition(), theLocalFactors); if (! A1.IsNull()) { const gp_Ax1 A( A1->Ax1() ); @@ -1779,13 +1818,14 @@ Handle(Geom_SurfaceOfRevolution) StepToGeom::MakeSurfaceOfRevolution (const Hand // SweptSurface de Geom //============================================================================= -Handle(Geom_SweptSurface) StepToGeom::MakeSweptSurface (const Handle(StepGeom_SweptSurface)& SS) +Handle(Geom_SweptSurface) StepToGeom::MakeSweptSurface (const Handle(StepGeom_SweptSurface)& SS, + const StepData_Factors& theLocalFactors) { if (SS->IsKind(STANDARD_TYPE(StepGeom_SurfaceOfLinearExtrusion))) { - return MakeSurfaceOfLinearExtrusion (Handle(StepGeom_SurfaceOfLinearExtrusion)::DownCast(SS)); + return MakeSurfaceOfLinearExtrusion (Handle(StepGeom_SurfaceOfLinearExtrusion)::DownCast(SS), theLocalFactors); } if (SS->IsKind(STANDARD_TYPE(StepGeom_SurfaceOfRevolution))) { - return MakeSurfaceOfRevolution (Handle(StepGeom_SurfaceOfRevolution)::DownCast(SS)); + return MakeSurfaceOfRevolution (Handle(StepGeom_SurfaceOfRevolution)::DownCast(SS), theLocalFactors); } return Handle(Geom_SweptSurface)(); } @@ -1795,12 +1835,13 @@ Handle(Geom_SweptSurface) StepToGeom::MakeSweptSurface (const Handle(StepGeom_Sw // ToroidalSurface de Step //============================================================================= -Handle(Geom_ToroidalSurface) StepToGeom::MakeToroidalSurface (const Handle(StepGeom_ToroidalSurface)& SS) +Handle(Geom_ToroidalSurface) StepToGeom::MakeToroidalSurface (const Handle(StepGeom_ToroidalSurface)& SS, + const StepData_Factors& theLocalFactors) { - Handle(Geom_Axis2Placement) A = MakeAxis2Placement (SS->Position()); + Handle(Geom_Axis2Placement) A = MakeAxis2Placement (SS->Position(), theLocalFactors); if (! A.IsNull()) { - const Standard_Real LF = StepData_GlobalFactors::Intance().LengthFactor(); + const Standard_Real LF = theLocalFactors.LengthFactor(); return new Geom_ToroidalSurface(A->Ax2(), Abs(SS->MajorRadius() * LF), Abs(SS->MinorRadius() * LF)); } return 0; @@ -1810,10 +1851,12 @@ Handle(Geom_ToroidalSurface) StepToGeom::MakeToroidalSurface (const Handle(StepG //function : MakeTransformation2d //purpose : //======================================================================= -Standard_Boolean StepToGeom::MakeTransformation2d (const Handle(StepGeom_CartesianTransformationOperator2d)& SCTO, gp_Trsf2d& CT) +Standard_Boolean StepToGeom::MakeTransformation2d (const Handle(StepGeom_CartesianTransformationOperator2d)& SCTO, + gp_Trsf2d& CT, + const StepData_Factors& theLocalFactors) { // NB : on ne s interesse ici qu au deplacement rigide - Handle(Geom2d_CartesianPoint) CP = MakeCartesianPoint2d (SCTO->LocalOrigin()); + Handle(Geom2d_CartesianPoint) CP = MakeCartesianPoint2d (SCTO->LocalOrigin(), theLocalFactors); if (! CP.IsNull()) { gp_Dir2d D1(1.,0.); @@ -1838,9 +1881,11 @@ Standard_Boolean StepToGeom::MakeTransformation2d (const Handle(StepGeom_Cartesi //purpose : //======================================================================= -Standard_Boolean StepToGeom::MakeTransformation3d (const Handle(StepGeom_CartesianTransformationOperator3d)& SCTO, gp_Trsf& CT) +Standard_Boolean StepToGeom::MakeTransformation3d (const Handle(StepGeom_CartesianTransformationOperator3d)& SCTO, + gp_Trsf& CT, + const StepData_Factors& theLocalFactors) { - Handle(Geom_CartesianPoint) CP = MakeCartesianPoint (SCTO->LocalOrigin()); + Handle(Geom_CartesianPoint) CP = MakeCartesianPoint (SCTO->LocalOrigin(), theLocalFactors); if (! CP.IsNull()) { const gp_Pnt Pgp = CP->Pnt(); @@ -1896,7 +1941,8 @@ static Standard_Boolean ExtractParameter const Standard_Integer MasterRep, const Standard_Real Factor, const Standard_Real Shift, - Standard_Real & aParam) + Standard_Real & aParam, + const StepData_Factors& theLocalFactors) { Handle(StepGeom_CartesianPoint) aPoint; Standard_Integer i; @@ -1909,7 +1955,7 @@ static Standard_Boolean ExtractParameter } else if (MasterRep == 1 && theSel.CaseNumber() > 0) { aPoint = theSel.CartesianPoint(); - Handle(Geom_CartesianPoint) theGeomPnt = StepToGeom::MakeCartesianPoint (aPoint); + Handle(Geom_CartesianPoint) theGeomPnt = StepToGeom::MakeCartesianPoint (aPoint, theLocalFactors); gp_Pnt thegpPnt = theGeomPnt->Pnt(); //:S4136: use advanced algorithm @@ -1959,7 +2005,7 @@ static Standard_Boolean ExtractParameter StepGeom_TrimmingSelect theSel = TS->Value(i); if (theSel.CaseNumber() > 0) { aPoint = theSel.CartesianPoint(); - Handle(Geom_CartesianPoint) theGeomPnt = StepToGeom::MakeCartesianPoint (aPoint); + Handle(Geom_CartesianPoint) theGeomPnt = StepToGeom::MakeCartesianPoint (aPoint, theLocalFactors); gp_Pnt thegpPnt = theGeomPnt->Pnt(); // Project Point On Curve ShapeAnalysis_Curve sac; @@ -1983,10 +2029,11 @@ static Standard_Boolean ExtractParameter // Creation d' une Trimmed Curve de Geom a partir d' une Trimmed Curve de Step //============================================================================= -Handle(Geom_TrimmedCurve) StepToGeom::MakeTrimmedCurve (const Handle(StepGeom_TrimmedCurve)& SC) +Handle(Geom_TrimmedCurve) StepToGeom::MakeTrimmedCurve (const Handle(StepGeom_TrimmedCurve)& SC, + const StepData_Factors& theLocalFactors) { const Handle(StepGeom_Curve) theSTEPCurve = SC->BasisCurve(); - Handle(Geom_Curve) theCurve = MakeCurve (theSTEPCurve); + Handle(Geom_Curve) theCurve = MakeCurve (theSTEPCurve, theLocalFactors); if (theCurve.IsNull()) return Handle(Geom_TrimmedCurve)(); @@ -2030,12 +2077,12 @@ Handle(Geom_TrimmedCurve) StepToGeom::MakeTrimmedCurve (const Handle(StepGeom_Tr if (theSTEPCurve->IsKind(STANDARD_TYPE(StepGeom_Line))) { const Handle(StepGeom_Line) theLine = Handle(StepGeom_Line)::DownCast(theSTEPCurve); - fact = theLine->Dir()->Magnitude() * StepData_GlobalFactors::Intance().LengthFactor(); + fact = theLine->Dir()->Magnitude() * theLocalFactors.LengthFactor(); } else if (theSTEPCurve->IsKind(STANDARD_TYPE(StepGeom_Circle)) || theSTEPCurve->IsKind(STANDARD_TYPE(StepGeom_Ellipse))) { // if (trim1 > 2.1*M_PI || trim2 > 2.1*M_PI) fact = M_PI / 180.; - fact = StepData_GlobalFactors::Intance().PlaneAngleFactor(); + fact = theLocalFactors.PlaneAngleFactor(); //:p3 abv 23 Feb 99: shift on pi/2 on ellipse with R1 < R2 const Handle(StepGeom_Ellipse) ellipse = Handle(StepGeom_Ellipse)::DownCast(theSTEPCurve); if ( !ellipse.IsNull() && ellipse->SemiAxis1() - ellipse->SemiAxis2() < 0. ) @@ -2068,8 +2115,8 @@ Handle(Geom_TrimmedCurve) StepToGeom::MakeTrimmedCurve (const Handle(StepGeom_Tr Standard_Real trim1 = 0.; Standard_Real trim2 = 0.; Handle(StepGeom_CartesianPoint) TrimCP1, TrimCP2; - const Standard_Boolean FoundParam1 = ExtractParameter(theCurve, theTrimSel1, nbSel1, MasterRep, fact, shift, trim1); - const Standard_Boolean FoundParam2 = ExtractParameter(theCurve, theTrimSel2, nbSel2, MasterRep, fact, shift, trim2); + const Standard_Boolean FoundParam1 = ExtractParameter(theCurve, theTrimSel1, nbSel1, MasterRep, fact, shift, trim1, theLocalFactors); + const Standard_Boolean FoundParam2 = ExtractParameter(theCurve, theTrimSel2, nbSel2, MasterRep, fact, shift, trim2, theLocalFactors); if (FoundParam1 && FoundParam2) { const Standard_Real cf = theCurve->FirstParameter(); @@ -2114,10 +2161,11 @@ Handle(Geom_TrimmedCurve) StepToGeom::MakeTrimmedCurve (const Handle(StepGeom_Tr //============================================================================= // Shall be completed to treat trimming with points -Handle(Geom2d_BSplineCurve) StepToGeom::MakeTrimmedCurve2d (const Handle(StepGeom_TrimmedCurve)& SC) +Handle(Geom2d_BSplineCurve) StepToGeom::MakeTrimmedCurve2d (const Handle(StepGeom_TrimmedCurve)& SC, + const StepData_Factors& theLocalFactors) { const Handle(StepGeom_Curve) BasisCurve = SC->BasisCurve(); - Handle(Geom2d_Curve) theGeomBasis = MakeCurve2d (BasisCurve); + Handle(Geom2d_Curve) theGeomBasis = MakeCurve2d (BasisCurve, theLocalFactors); if (theGeomBasis.IsNull()) return Handle(Geom2d_BSplineCurve)(); @@ -2144,7 +2192,7 @@ Handle(Geom2d_BSplineCurve) StepToGeom::MakeTrimmedCurve2d (const Handle(StepGeo else if (BasisCurve->IsKind(STANDARD_TYPE(StepGeom_Circle)) || BasisCurve->IsKind(STANDARD_TYPE(StepGeom_Ellipse))) { // if (u1 > 2.1*M_PI || u2 > 2.1*M_PI) fact = M_PI / 180.; - fact = StepData_GlobalFactors::Intance().PlaneAngleFactor(); + fact = theLocalFactors.PlaneAngleFactor(); //:p3 abv 23 Feb 99: shift on pi/2 on ellipse with R1 < R2 const Handle(StepGeom_Ellipse) ellipse = Handle(StepGeom_Ellipse)::DownCast(BasisCurve); if ( !ellipse.IsNull() && ellipse->SemiAxis1() - ellipse->SemiAxis2() < 0. ) @@ -2171,13 +2219,14 @@ Handle(Geom2d_BSplineCurve) StepToGeom::MakeTrimmedCurve2d (const Handle(StepGeo // Creation d' un VectorWithMagnitude de Geom a partir d' un Vector de Step //============================================================================= -Handle(Geom_VectorWithMagnitude) StepToGeom::MakeVectorWithMagnitude (const Handle(StepGeom_Vector)& SV) +Handle(Geom_VectorWithMagnitude) StepToGeom::MakeVectorWithMagnitude (const Handle(StepGeom_Vector)& SV, + const StepData_Factors& theLocalFactors) { // sln 22.10.2001. CTS23496: Vector is not created if direction have not been successfully created Handle(Geom_Direction) D = MakeDirection (SV->Orientation()); if (! D.IsNull()) { - const gp_Vec V(D->Dir().XYZ() * SV->Magnitude() * StepData_GlobalFactors::Intance().LengthFactor()); + const gp_Vec V(D->Dir().XYZ() * SV->Magnitude() * theLocalFactors.LengthFactor()); return new Geom_VectorWithMagnitude(V); } return 0; diff --git a/src/StepToGeom/StepToGeom.hxx b/src/StepToGeom/StepToGeom.hxx index b708d25951..24c74d2595 100644 --- a/src/StepToGeom/StepToGeom.hxx +++ b/src/StepToGeom/StepToGeom.hxx @@ -67,6 +67,7 @@ class Geom2d_VectorWithMagnitude; class gp_Trsf; class gp_Trsf2d; +class StepData_Factors; class StepGeom_Axis1Placement; class StepGeom_Axis2Placement2d; class StepGeom_Axis2Placement3d; @@ -113,52 +114,95 @@ class StepToGeom { public: - Standard_EXPORT static Handle(Geom_Axis1Placement) MakeAxis1Placement (const Handle(StepGeom_Axis1Placement)& SA); - Standard_EXPORT static Handle(Geom_Axis2Placement) MakeAxis2Placement (const Handle(StepGeom_Axis2Placement3d)& SA); + Standard_EXPORT static Handle(Geom_Axis1Placement) MakeAxis1Placement (const Handle(StepGeom_Axis1Placement)& SA, + const StepData_Factors& theLocalFactors); + Standard_EXPORT static Handle(Geom_Axis2Placement) MakeAxis2Placement (const Handle(StepGeom_Axis2Placement3d)& SA, + const StepData_Factors& theLocalFactors); Standard_EXPORT static Handle(Geom_Axis2Placement) MakeAxis2Placement (const Handle(StepGeom_SuParameters)& SP); - Standard_EXPORT static Handle(Geom2d_AxisPlacement) MakeAxisPlacement (const Handle(StepGeom_Axis2Placement2d)& SA); - Standard_EXPORT static Handle(Geom_BoundedCurve) MakeBoundedCurve (const Handle(StepGeom_BoundedCurve)& SC); - Standard_EXPORT static Handle(Geom2d_BoundedCurve) MakeBoundedCurve2d (const Handle(StepGeom_BoundedCurve)& SC); - Standard_EXPORT static Handle(Geom_BoundedSurface) MakeBoundedSurface (const Handle(StepGeom_BoundedSurface)& SS); - Standard_EXPORT static Handle(Geom_BSplineCurve) MakeBSplineCurve (const Handle(StepGeom_BSplineCurve)& SC); - Standard_EXPORT static Handle(Geom2d_BSplineCurve) MakeBSplineCurve2d (const Handle(StepGeom_BSplineCurve)& SC); - Standard_EXPORT static Handle(Geom_BSplineSurface) MakeBSplineSurface (const Handle(StepGeom_BSplineSurface)& SS); - Standard_EXPORT static Handle(Geom_CartesianPoint) MakeCartesianPoint (const Handle(StepGeom_CartesianPoint)& SP); - Standard_EXPORT static Handle(Geom2d_CartesianPoint) MakeCartesianPoint2d (const Handle(StepGeom_CartesianPoint)& SP); - Standard_EXPORT static Handle(Geom_Circle) MakeCircle (const Handle(StepGeom_Circle)& SC); - Standard_EXPORT static Handle(Geom2d_Circle) MakeCircle2d (const Handle(StepGeom_Circle)& SC); - Standard_EXPORT static Handle(Geom_Conic) MakeConic (const Handle(StepGeom_Conic)& SC); - Standard_EXPORT static Handle(Geom2d_Conic) MakeConic2d (const Handle(StepGeom_Conic)& SC); - Standard_EXPORT static Handle(Geom_ConicalSurface) MakeConicalSurface (const Handle(StepGeom_ConicalSurface)& SS); - Standard_EXPORT static Handle(Geom_Curve) MakeCurve (const Handle(StepGeom_Curve)& SC); - Standard_EXPORT static Handle(Geom2d_Curve) MakeCurve2d (const Handle(StepGeom_Curve)& SC); - Standard_EXPORT static Handle(Geom_CylindricalSurface) MakeCylindricalSurface (const Handle(StepGeom_CylindricalSurface)& SS); + Standard_EXPORT static Handle(Geom2d_AxisPlacement) MakeAxisPlacement (const Handle(StepGeom_Axis2Placement2d)& SA, + const StepData_Factors& theLocalFactors); + Standard_EXPORT static Handle(Geom_BoundedCurve) MakeBoundedCurve (const Handle(StepGeom_BoundedCurve)& SC, + const StepData_Factors& theLocalFactors); + Standard_EXPORT static Handle(Geom2d_BoundedCurve) MakeBoundedCurve2d (const Handle(StepGeom_BoundedCurve)& SC, + const StepData_Factors& theLocalFactors); + Standard_EXPORT static Handle(Geom_BoundedSurface) MakeBoundedSurface (const Handle(StepGeom_BoundedSurface)& SS, + const StepData_Factors& theLocalFactors); + Standard_EXPORT static Handle(Geom_BSplineCurve) MakeBSplineCurve (const Handle(StepGeom_BSplineCurve)& SC, + const StepData_Factors& theLocalFactors); + Standard_EXPORT static Handle(Geom2d_BSplineCurve) MakeBSplineCurve2d (const Handle(StepGeom_BSplineCurve)& SC, + const StepData_Factors& theLocalFactors); + Standard_EXPORT static Handle(Geom_BSplineSurface) MakeBSplineSurface (const Handle(StepGeom_BSplineSurface)& SS, + const StepData_Factors& theLocalFactors); + Standard_EXPORT static Handle(Geom_CartesianPoint) MakeCartesianPoint (const Handle(StepGeom_CartesianPoint)& SP, + const StepData_Factors& theLocalFactors); + Standard_EXPORT static Handle(Geom2d_CartesianPoint) MakeCartesianPoint2d (const Handle(StepGeom_CartesianPoint)& SP, + const StepData_Factors& theLocalFactors); + Standard_EXPORT static Handle(Geom_Circle) MakeCircle (const Handle(StepGeom_Circle)& SC, + const StepData_Factors& theLocalFactors); + Standard_EXPORT static Handle(Geom2d_Circle) MakeCircle2d (const Handle(StepGeom_Circle)& SC, + const StepData_Factors& theLocalFactors); + Standard_EXPORT static Handle(Geom_Conic) MakeConic (const Handle(StepGeom_Conic)& SC, + const StepData_Factors& theLocalFactors); + Standard_EXPORT static Handle(Geom2d_Conic) MakeConic2d (const Handle(StepGeom_Conic)& SC, + const StepData_Factors& theLocalFactors); + Standard_EXPORT static Handle(Geom_ConicalSurface) MakeConicalSurface (const Handle(StepGeom_ConicalSurface)& SS, + const StepData_Factors& theLocalFactors); + Standard_EXPORT static Handle(Geom_Curve) MakeCurve (const Handle(StepGeom_Curve)& SC, + const StepData_Factors& theLocalFactors); + Standard_EXPORT static Handle(Geom2d_Curve) MakeCurve2d (const Handle(StepGeom_Curve)& SC, + const StepData_Factors& theLocalFactors); + Standard_EXPORT static Handle(Geom_CylindricalSurface) MakeCylindricalSurface (const Handle(StepGeom_CylindricalSurface)& SS, + const StepData_Factors& theLocalFactors); Standard_EXPORT static Handle(Geom_Direction) MakeDirection (const Handle(StepGeom_Direction)& SD); Standard_EXPORT static Handle(Geom2d_Direction) MakeDirection2d (const Handle(StepGeom_Direction)& SD); - Standard_EXPORT static Handle(Geom_ElementarySurface) MakeElementarySurface (const Handle(StepGeom_ElementarySurface)& SS); - Standard_EXPORT static Handle(Geom_Ellipse) MakeEllipse (const Handle(StepGeom_Ellipse)& SC); - Standard_EXPORT static Handle(Geom2d_Ellipse) MakeEllipse2d (const Handle(StepGeom_Ellipse)& SC); - Standard_EXPORT static Handle(Geom_Hyperbola) MakeHyperbola (const Handle(StepGeom_Hyperbola)& SC); - Standard_EXPORT static Handle(Geom2d_Hyperbola) MakeHyperbola2d (const Handle(StepGeom_Hyperbola)& SC); - Standard_EXPORT static Handle(Geom_Line) MakeLine (const Handle(StepGeom_Line)& SC); - Standard_EXPORT static Handle(Geom2d_Line) MakeLine2d (const Handle(StepGeom_Line)& SC); - Standard_EXPORT static Handle(Geom_Parabola) MakeParabola (const Handle(StepGeom_Parabola)& SC); - Standard_EXPORT static Handle(Geom2d_Parabola) MakeParabola2d (const Handle(StepGeom_Parabola)& SC); - Standard_EXPORT static Handle(Geom_Plane) MakePlane (const Handle(StepGeom_Plane)& SP); - Standard_EXPORT static Handle(Geom_BSplineCurve) MakePolyline (const Handle(StepGeom_Polyline)& SPL); - Standard_EXPORT static Handle(Geom2d_BSplineCurve) MakePolyline2d (const Handle(StepGeom_Polyline)& SPL); - Standard_EXPORT static Handle(Geom_RectangularTrimmedSurface) MakeRectangularTrimmedSurface (const Handle(StepGeom_RectangularTrimmedSurface)& SS); - Standard_EXPORT static Handle(Geom_SphericalSurface) MakeSphericalSurface (const Handle(StepGeom_SphericalSurface)& SS); - Standard_EXPORT static Handle(Geom_Surface) MakeSurface (const Handle(StepGeom_Surface)& SS); - Standard_EXPORT static Handle(Geom_SurfaceOfLinearExtrusion) MakeSurfaceOfLinearExtrusion (const Handle(StepGeom_SurfaceOfLinearExtrusion)& SS); - Standard_EXPORT static Handle(Geom_SurfaceOfRevolution) MakeSurfaceOfRevolution (const Handle(StepGeom_SurfaceOfRevolution)& SS); - Standard_EXPORT static Handle(Geom_SweptSurface) MakeSweptSurface (const Handle(StepGeom_SweptSurface)& SS); - Standard_EXPORT static Handle(Geom_ToroidalSurface) MakeToroidalSurface (const Handle(StepGeom_ToroidalSurface)& SS); - Standard_EXPORT static Standard_Boolean MakeTransformation2d (const Handle(StepGeom_CartesianTransformationOperator2d)& SCTO, gp_Trsf2d& CT); - Standard_EXPORT static Standard_Boolean MakeTransformation3d (const Handle(StepGeom_CartesianTransformationOperator3d)& SCTO, gp_Trsf& CT); - Standard_EXPORT static Handle(Geom_TrimmedCurve) MakeTrimmedCurve (const Handle(StepGeom_TrimmedCurve)& SC); - Standard_EXPORT static Handle(Geom2d_BSplineCurve) MakeTrimmedCurve2d (const Handle(StepGeom_TrimmedCurve)& SC); - Standard_EXPORT static Handle(Geom_VectorWithMagnitude) MakeVectorWithMagnitude (const Handle(StepGeom_Vector)& SV); + Standard_EXPORT static Handle(Geom_ElementarySurface) MakeElementarySurface (const Handle(StepGeom_ElementarySurface)& SS, + const StepData_Factors& theLocalFactors); + Standard_EXPORT static Handle(Geom_Ellipse) MakeEllipse (const Handle(StepGeom_Ellipse)& SC, + const StepData_Factors& theLocalFactors); + Standard_EXPORT static Handle(Geom2d_Ellipse) MakeEllipse2d (const Handle(StepGeom_Ellipse)& SC, + const StepData_Factors& theLocalFactors); + Standard_EXPORT static Handle(Geom_Hyperbola) MakeHyperbola (const Handle(StepGeom_Hyperbola)& SC, + const StepData_Factors& theLocalFactors); + Standard_EXPORT static Handle(Geom2d_Hyperbola) MakeHyperbola2d (const Handle(StepGeom_Hyperbola)& SC, + const StepData_Factors& theLocalFactors); + Standard_EXPORT static Handle(Geom_Line) MakeLine (const Handle(StepGeom_Line)& SC, + const StepData_Factors& theLocalFactors); + Standard_EXPORT static Handle(Geom2d_Line) MakeLine2d (const Handle(StepGeom_Line)& SC, + const StepData_Factors& theLocalFactors); + Standard_EXPORT static Handle(Geom_Parabola) MakeParabola (const Handle(StepGeom_Parabola)& SC, + const StepData_Factors& theLocalFactors); + Standard_EXPORT static Handle(Geom2d_Parabola) MakeParabola2d (const Handle(StepGeom_Parabola)& SC, + const StepData_Factors& theLocalFactors); + Standard_EXPORT static Handle(Geom_Plane) MakePlane (const Handle(StepGeom_Plane)& SP, + const StepData_Factors& theLocalFactors); + Standard_EXPORT static Handle(Geom_BSplineCurve) MakePolyline (const Handle(StepGeom_Polyline)& SPL, + const StepData_Factors& theLocalFactors); + Standard_EXPORT static Handle(Geom2d_BSplineCurve) MakePolyline2d (const Handle(StepGeom_Polyline)& SPL, + const StepData_Factors& theLocalFactors); + Standard_EXPORT static Handle(Geom_RectangularTrimmedSurface) MakeRectangularTrimmedSurface (const Handle(StepGeom_RectangularTrimmedSurface)& SS, + const StepData_Factors& theLocalFactors); + Standard_EXPORT static Handle(Geom_SphericalSurface) MakeSphericalSurface (const Handle(StepGeom_SphericalSurface)& SS, + const StepData_Factors& theLocalFactors); + Standard_EXPORT static Handle(Geom_Surface) MakeSurface (const Handle(StepGeom_Surface)& SS, + const StepData_Factors& theLocalFactors); + Standard_EXPORT static Handle(Geom_SurfaceOfLinearExtrusion) MakeSurfaceOfLinearExtrusion (const Handle(StepGeom_SurfaceOfLinearExtrusion)& SS, + const StepData_Factors& theLocalFactors); + Standard_EXPORT static Handle(Geom_SurfaceOfRevolution) MakeSurfaceOfRevolution (const Handle(StepGeom_SurfaceOfRevolution)& SS, + const StepData_Factors& theLocalFactors); + Standard_EXPORT static Handle(Geom_SweptSurface) MakeSweptSurface (const Handle(StepGeom_SweptSurface)& SS, + const StepData_Factors& theLocalFactors); + Standard_EXPORT static Handle(Geom_ToroidalSurface) MakeToroidalSurface (const Handle(StepGeom_ToroidalSurface)& SS, + const StepData_Factors& theLocalFactors); + Standard_EXPORT static Standard_Boolean MakeTransformation2d (const Handle(StepGeom_CartesianTransformationOperator2d)& SCTO, gp_Trsf2d& CT, + const StepData_Factors& theLocalFactors); + Standard_EXPORT static Standard_Boolean MakeTransformation3d (const Handle(StepGeom_CartesianTransformationOperator3d)& SCTO, gp_Trsf& CT, + const StepData_Factors& theLocalFactors); + Standard_EXPORT static Handle(Geom_TrimmedCurve) MakeTrimmedCurve (const Handle(StepGeom_TrimmedCurve)& SC, + const StepData_Factors& theLocalFactors); + Standard_EXPORT static Handle(Geom2d_BSplineCurve) MakeTrimmedCurve2d (const Handle(StepGeom_TrimmedCurve)& SC, + const StepData_Factors& theLocalFactors); + Standard_EXPORT static Handle(Geom_VectorWithMagnitude) MakeVectorWithMagnitude (const Handle(StepGeom_Vector)& SV, + const StepData_Factors& theLocalFactors); Standard_EXPORT static Handle(Geom2d_VectorWithMagnitude) MakeVectorWithMagnitude2d (const Handle(StepGeom_Vector)& SV); Standard_EXPORT static Handle(TColStd_HArray1OfReal) MakeYprRotation(const StepKinematics_SpatialRotation& SR, const Handle(StepRepr_GlobalUnitAssignedContext)& theCntxt); }; diff --git a/src/StepToTopoDS/StepToTopoDS_Builder.cxx b/src/StepToTopoDS/StepToTopoDS_Builder.cxx index 1f431520a9..82bbe14a98 100644 --- a/src/StepToTopoDS/StepToTopoDS_Builder.cxx +++ b/src/StepToTopoDS/StepToTopoDS_Builder.cxx @@ -38,6 +38,7 @@ #include #include #include +#include #include #include #include @@ -117,6 +118,7 @@ StepToTopoDS_Builder::StepToTopoDS_Builder() void StepToTopoDS_Builder::Init (const Handle(StepShape_ManifoldSolidBrep)& aManifoldSolid, const Handle(Transfer_TransientProcess)& TP, + const StepData_Factors& theLocalFactors, const Message_ProgressRange& theProgress) { Message_Messenger::StreamBuffer sout = TP->Messenger()->SendInfo(); @@ -137,7 +139,7 @@ void StepToTopoDS_Builder::Init myTranShell.SetMaxTol(MaxTol()); // Non-manifold topology is not referenced by ManifoldSolidBrep (ssv; 14.11.2010) StepToTopoDS_NMTool dummyNMTool; - myTranShell.Init(aShell, myTool, dummyNMTool, theProgress); + myTranShell.Init(aShell, myTool, dummyNMTool, theLocalFactors, theProgress); if (myTranShell.IsDone()) { TopoDS_Shape Sh = myTranShell.Value(); @@ -185,6 +187,7 @@ void StepToTopoDS_Builder::Init void StepToTopoDS_Builder::Init (const Handle(StepShape_BrepWithVoids)& aBRepWithVoids, const Handle(Transfer_TransientProcess)& TP, + const StepData_Factors& theLocalFactors, const Message_ProgressRange& theProgress) { Message_Messenger::StreamBuffer sout = TP->Messenger()->SendInfo(); @@ -214,7 +217,7 @@ void StepToTopoDS_Builder::Init aCShell = Handle(StepShape_ClosedShell)::DownCast(aBRepWithVoids->Outer()); // Non-manifold topology is not referenced by BrepWithVoids (ssv; 14.11.2010) StepToTopoDS_NMTool dummyNMTool; - myTranShell.Init(aCShell, myTool, dummyNMTool, PS.Next()); + myTranShell.Init(aCShell, myTool, dummyNMTool, theLocalFactors, PS.Next()); if (myTranShell.IsDone()) { Sh = myTranShell.Value(); @@ -238,7 +241,7 @@ void StepToTopoDS_Builder::Init for (Standard_Integer i=1; i<=Nb && PS.More(); i++) { aCShell = aBRepWithVoids->VoidsValue(i); - myTranShell.Init(aCShell, myTool, dummyNMTool, PS.Next()); + myTranShell.Init(aCShell, myTool, dummyNMTool, theLocalFactors, PS.Next()); if (myTranShell.IsDone()) { Sh = myTranShell.Value(); Sh.Closed(Standard_True); @@ -285,6 +288,7 @@ void StepToTopoDS_Builder::Init void StepToTopoDS_Builder::Init(const Handle(StepShape_FacetedBrep)& aFB, const Handle(Transfer_TransientProcess)& TP, + const StepData_Factors& theLocalFactors, const Message_ProgressRange& theProgress) { // Initialisation of the Tool @@ -305,7 +309,7 @@ void StepToTopoDS_Builder::Init(const Handle(StepShape_FacetedBrep)& aFB, myTranShell.SetMaxTol(MaxTol()); // Non-manifold topology is not referenced by FacetedBrep (ss; 14.11.2010) StepToTopoDS_NMTool dummyNMTool; - myTranShell.Init(aCShell, myTool, dummyNMTool, theProgress); + myTranShell.Init(aCShell, myTool, dummyNMTool, theLocalFactors, theProgress); if (myTranShell.IsDone()) { Sh = myTranShell.Value(); @@ -337,6 +341,7 @@ void StepToTopoDS_Builder::Init(const Handle(StepShape_FacetedBrep)& aFB, void StepToTopoDS_Builder::Init (const Handle(StepShape_FacetedBrepAndBrepWithVoids)& aFBABWV, const Handle(Transfer_TransientProcess)& TP, + const StepData_Factors& theLocalFactors, const Message_ProgressRange& theProgress) { // Initialisation of the Tool @@ -359,7 +364,7 @@ void StepToTopoDS_Builder::Init myTranShell.SetMaxTol(MaxTol()); // Non-manifold topology is not referenced by FacetedBrepAndBrepWithVoids (ss; 14.11.2010) StepToTopoDS_NMTool dummyNMTool; - myTranShell.Init(aCShell, myTool, dummyNMTool, aPSRoot.Next()); + myTranShell.Init(aCShell, myTool, dummyNMTool, theLocalFactors, aPSRoot.Next()); if (myTranShell.IsDone()) { Sh = myTranShell.Value(); @@ -374,7 +379,7 @@ void StepToTopoDS_Builder::Init Message_ProgressScope aPS (aPSRoot.Next(), NULL, Nb); for ( i=1; i<=Nb && aPS.More(); i++) { aCShell = aFBABWV->VoidsValue(i); - myTranShell.Init(aCShell, myTool, dummyNMTool, aPS.Next()); + myTranShell.Init(aCShell, myTool, dummyNMTool, theLocalFactors, aPS.Next()); if (myTranShell.IsDone()) { Sh = myTranShell.Value(); Sh.Closed(Standard_True); @@ -407,6 +412,7 @@ void StepToTopoDS_Builder::Init (const Handle(StepShape_ShellBasedSurfaceModel)& aSBSM, const Handle(Transfer_TransientProcess)& TP, StepToTopoDS_NMTool& NMTool, + const StepData_Factors& theLocalFactors, const Message_ProgressRange& theProgress) { Message_Messenger::StreamBuffer sout = TP->Messenger()->SendInfo(); @@ -442,7 +448,7 @@ void StepToTopoDS_Builder::Init aOpenShell = aShell.OpenShell(); aClosedShell = aShell.ClosedShell(); if (!aOpenShell.IsNull()) { - myTranShell.Init(aOpenShell, myTool, NMTool, aRange); + myTranShell.Init(aOpenShell, myTool, NMTool, theLocalFactors, aRange); if (myTranShell.IsDone()) { Shl = TopoDS::Shell(myTranShell.Value()); Shl.Closed(Standard_False); @@ -454,7 +460,7 @@ void StepToTopoDS_Builder::Init } } else if (!aClosedShell.IsNull()) { - myTranShell.Init(aClosedShell, myTool, NMTool, aRange); + myTranShell.Init(aClosedShell, myTool, NMTool, theLocalFactors, aRange); if (myTranShell.IsDone()) { Shl = TopoDS::Shell(myTranShell.Value()); Shl.Closed(Standard_True); @@ -500,7 +506,8 @@ void StepToTopoDS_Builder::Init // ============================================================================ void StepToTopoDS_Builder::Init (const Handle(StepShape_EdgeBasedWireframeModel)& aEBWM, - const Handle(Transfer_TransientProcess)& TP) + const Handle(Transfer_TransientProcess)& TP, + const StepData_Factors& theLocalFactors) { myResult.Nullify(); @@ -534,7 +541,7 @@ void StepToTopoDS_Builder::Init (const Handle(StepShape_EdgeBasedWireframeModel) } TopoDS_Wire W; for ( Standard_Integer j=1; j <= edges->Length(); j++ ) { - myTranEdge.Init (edges->Value(j), myTool, dummyNMTool); + myTranEdge.Init (edges->Value(j), myTool, dummyNMTool, theLocalFactors); if ( ! myTranEdge.IsDone() ) continue; TopoDS_Edge E = TopoDS::Edge(myTranEdge.Value()); if (E.IsNull()) continue; // NULL, on saute @@ -560,7 +567,8 @@ void StepToTopoDS_Builder::Init (const Handle(StepShape_EdgeBasedWireframeModel) // ============================================================================ void StepToTopoDS_Builder::Init (const Handle(StepShape_FaceBasedSurfaceModel)& aFBSM, - const Handle(Transfer_TransientProcess)& TP) + const Handle(Transfer_TransientProcess)& TP, + const StepData_Factors& theLocalFactors) { myResult.Nullify(); @@ -596,7 +604,7 @@ void StepToTopoDS_Builder::Init (const Handle(StepShape_FaceBasedSurfaceModel)& TopoDS_Shell S; for ( Standard_Integer j=1; j <= faces->Length(); j++ ) { Handle(StepShape_FaceSurface) fs = Handle(StepShape_FaceSurface)::DownCast ( faces->Value(j) ); - myTranFace.Init(fs, myTool, dummyNMTool); + myTranFace.Init(fs, myTool, dummyNMTool, theLocalFactors); if ( ! myTranFace.IsDone() ) continue; TopoDS_Face F = TopoDS::Face(myTranFace.Value()); if (F.IsNull()) continue; // NULL, on saute @@ -625,11 +633,12 @@ void StepToTopoDS_Builder::Init (const Handle(StepShape_FaceBasedSurfaceModel)& //:i6 abv 17 Sep 98: ProSTEP TR9 r0601-ct.stp: to be able read GS: GeometricCurveSet -> GeometricSet static TopoDS_Face TranslateBoundedSurf (const Handle(StepGeom_Surface) &surf, - const Standard_Real TolDegen) + const Standard_Real TolDegen, + const StepData_Factors& theLocalFactors) { TopoDS_Face res; - Handle(Geom_Surface) theSurf = StepToGeom::MakeSurface (surf); + Handle(Geom_Surface) theSurf = StepToGeom::MakeSurface (surf, theLocalFactors); if (theSurf.IsNull() || //:i6: protection !theSurf->IsKind(STANDARD_TYPE(Geom_BoundedSurface))) return res; @@ -655,6 +664,7 @@ static TopoDS_Face TranslateBoundedSurf (const Handle(StepGeom_Surface) &surf, void StepToTopoDS_Builder::Init (const Handle(StepShape_GeometricSet)& GCS, const Handle(Transfer_TransientProcess)& TP, + const StepData_Factors& theLocalFactors, const Handle(Transfer_ActorOfTransientProcess)& RA, const Standard_Boolean isManifold, const Message_ProgressRange& theProgress) @@ -697,7 +707,7 @@ void StepToTopoDS_Builder::Init StepToTopoDS_TranslateCompositeCurve TrCC; TrCC.SetPrecision(preci); TrCC.SetMaxTol(maxtol); - TrCC.Init(CC, TP); + TrCC.Init(CC, TP, theLocalFactors); if (TrCC.IsDone()) { if (TrCC.IsInfiniteSegment()) @@ -718,7 +728,7 @@ void StepToTopoDS_Builder::Init Handle(Geom_Curve) aGeomCrv; try { OCC_CATCH_SIGNALS - aGeomCrv = StepToGeom::MakeCurve(aCrv); + aGeomCrv = StepToGeom::MakeCurve(aCrv, theLocalFactors); } catch (Standard_Failure const& anException) { Message_Messenger::StreamBuffer sout = TP->Messenger()->SendInfo(); @@ -734,7 +744,7 @@ void StepToTopoDS_Builder::Init // try point else if ( ent->IsKind(STANDARD_TYPE(StepGeom_CartesianPoint)) ) { Handle(StepGeom_CartesianPoint) aPnt = Handle(StepGeom_CartesianPoint)::DownCast ( ent ); - Handle(Geom_CartesianPoint) thePnt = StepToGeom::MakeCartesianPoint (aPnt); + Handle(Geom_CartesianPoint) thePnt = StepToGeom::MakeCartesianPoint (aPnt, theLocalFactors); if (! thePnt.IsNull()) { BRepBuilderAPI_MakeVertex myMkVtx(thePnt->Pnt()); if ( myMkVtx.IsDone() ) res = myMkVtx.Vertex(); @@ -753,7 +763,7 @@ void StepToTopoDS_Builder::Init TrCBS.SetPrecision(preci); TrCBS.SetMaxTol(maxtol); - TrCBS.Init(CBS, TP); + TrCBS.Init(CBS, TP, theLocalFactors); if (TrCBS.IsDone()) res = TrCBS.Value(); } // try RectangularCompositeSurface @@ -767,13 +777,13 @@ void StepToTopoDS_Builder::Init for (Standard_Integer ii = 1; ii <= nbi; ii++) for (Standard_Integer j = 1; j <= nbj; j++) { Handle(StepGeom_SurfacePatch) patch = RCS->SegmentsValue(ii, j); - TopoDS_Face f = TranslateBoundedSurf(patch->ParentSurface(), preci); + TopoDS_Face f = TranslateBoundedSurf(patch->ParentSurface(), preci, theLocalFactors); if (!f.IsNull()) B.Add(C, f); } res = C; } // try other surfs - else res = TranslateBoundedSurf(aSurf, preci); + else res = TranslateBoundedSurf(aSurf, preci, theLocalFactors); } else if ( ent->IsKind(STANDARD_TYPE(StepGeom_GeometricRepresentationItem)) ) { @@ -784,7 +794,7 @@ void StepToTopoDS_Builder::Init Handle(STEPControl_ActorRead) anActor = Handle(STEPControl_ActorRead)::DownCast(RA); Handle(Transfer_Binder) binder; if( !anActor.IsNull()) - binder = anActor->TransferShape(GRI, TP, isManifold, Standard_False, aRange); + binder = anActor->TransferShape(GRI, TP, theLocalFactors, isManifold, Standard_False, aRange); if (!binder.IsNull()) { res = TransferBRep::ShapeResult(binder); @@ -813,6 +823,7 @@ void StepToTopoDS_Builder::Init(const Handle(StepVisual_TessellatedSolid)& theTS const Handle(Transfer_TransientProcess)& theTP, const Standard_Boolean theReadTessellatedWhenNoBRepOnly, Standard_Boolean& theHasGeom, + const StepData_Factors& theLocalFactors, const Message_ProgressRange& theProgress) { StepToTopoDS_TranslateSolid aTranSolid; @@ -825,7 +836,7 @@ void StepToTopoDS_Builder::Init(const Handle(StepVisual_TessellatedSolid)& theTS StepToTopoDS_NMTool dummyNMTool; aTranSolid.Init(theTSo, theTP, aTool, dummyNMTool, theReadTessellatedWhenNoBRepOnly, - theHasGeom, theProgress); + theHasGeom, theLocalFactors, theProgress); if (aTranSolid.IsDone()) { @@ -852,6 +863,7 @@ void StepToTopoDS_Builder::Init(const Handle(StepVisual_TessellatedShell)& theTS const Handle(Transfer_TransientProcess)& theTP, const Standard_Boolean theReadTessellatedWhenNoBRepOnly, Standard_Boolean& theHasGeom, + const StepData_Factors& theLocalFactors, const Message_ProgressRange& theProgress) { StepToTopoDS_TranslateShell aTranShell; @@ -864,7 +876,7 @@ void StepToTopoDS_Builder::Init(const Handle(StepVisual_TessellatedShell)& theTS StepToTopoDS_NMTool dummyNMTool; aTranShell.Init(theTSh, aTool, dummyNMTool, theReadTessellatedWhenNoBRepOnly, - theHasGeom, theProgress); + theHasGeom, theLocalFactors, theProgress); if (aTranShell.IsDone()) { @@ -890,7 +902,8 @@ void StepToTopoDS_Builder::Init(const Handle(StepVisual_TessellatedShell)& theTS void StepToTopoDS_Builder::Init(const Handle(StepVisual_TessellatedFace)& theTF, const Handle(Transfer_TransientProcess)& theTP, const Standard_Boolean theReadTessellatedWhenNoBRepOnly, - Standard_Boolean& theHasGeom) + Standard_Boolean& theHasGeom, + const StepData_Factors& theLocalFactors) { StepToTopoDS_TranslateFace aTranFace; aTranFace.SetPrecision(Precision()); @@ -901,7 +914,7 @@ void StepToTopoDS_Builder::Init(const Handle(StepVisual_TessellatedFace)& theTF, aTool.Init(aMap, theTP); StepToTopoDS_NMTool dummyNMTool; - aTranFace.Init(theTF, aTool, dummyNMTool, theReadTessellatedWhenNoBRepOnly, theHasGeom); + aTranFace.Init(theTF, aTool, dummyNMTool, theReadTessellatedWhenNoBRepOnly, theHasGeom, theLocalFactors); if (aTranFace.IsDone()) { diff --git a/src/StepToTopoDS/StepToTopoDS_Builder.hxx b/src/StepToTopoDS/StepToTopoDS_Builder.hxx index 759d1bc825..1388fc4779 100644 --- a/src/StepToTopoDS/StepToTopoDS_Builder.hxx +++ b/src/StepToTopoDS/StepToTopoDS_Builder.hxx @@ -54,33 +54,41 @@ public: Standard_EXPORT void Init (const Handle(StepShape_ManifoldSolidBrep)& S, const Handle(Transfer_TransientProcess)& TP, + const StepData_Factors& theLocalFactors, const Message_ProgressRange& theProgress = Message_ProgressRange()); Standard_EXPORT void Init (const Handle(StepShape_BrepWithVoids)& S, const Handle(Transfer_TransientProcess)& TP, + const StepData_Factors& theLocalFactors, const Message_ProgressRange& theProgress = Message_ProgressRange()); Standard_EXPORT void Init (const Handle(StepShape_FacetedBrep)& S, const Handle(Transfer_TransientProcess)& TP, + const StepData_Factors& theLocalFactors, const Message_ProgressRange& theProgress = Message_ProgressRange()); Standard_EXPORT void Init (const Handle(StepShape_FacetedBrepAndBrepWithVoids)& S, const Handle(Transfer_TransientProcess)& TP, + const StepData_Factors& theLocalFactors, const Message_ProgressRange& theProgress = Message_ProgressRange()); Standard_EXPORT void Init (const Handle(StepShape_ShellBasedSurfaceModel)& S, const Handle(Transfer_TransientProcess)& TP, StepToTopoDS_NMTool& NMTool, + const StepData_Factors& theLocalFactors, const Message_ProgressRange& theProgress = Message_ProgressRange()); Standard_EXPORT void Init (const Handle(StepShape_EdgeBasedWireframeModel)& S, - const Handle(Transfer_TransientProcess)& TP); + const Handle(Transfer_TransientProcess)& TP, + const StepData_Factors& theLocalFactors); Standard_EXPORT void Init (const Handle(StepShape_FaceBasedSurfaceModel)& S, - const Handle(Transfer_TransientProcess)& TP); + const Handle(Transfer_TransientProcess)& TP, + const StepData_Factors& theLocalFactors); Standard_EXPORT void Init (const Handle(StepShape_GeometricSet)& S, const Handle(Transfer_TransientProcess)& TP, + const StepData_Factors& theLocalFactors, const Handle(Transfer_ActorOfTransientProcess)& RA = NULL, const Standard_Boolean isManifold = Standard_False, const Message_ProgressRange& theProgress = Message_ProgressRange()); @@ -89,18 +97,21 @@ public: const Handle(Transfer_TransientProcess)& theTP, const Standard_Boolean theReadTessellatedWhenNoBRepOnly, Standard_Boolean& theHasGeom, + const StepData_Factors& theLocalFactors, const Message_ProgressRange& theProgress = Message_ProgressRange()); Standard_EXPORT void Init (const Handle(StepVisual_TessellatedShell)& theTSh, const Handle(Transfer_TransientProcess)& theTP, const Standard_Boolean theReadTessellatedWhenNoBRepOnly, Standard_Boolean& theHasGeom, + const StepData_Factors& theLocalFactors, const Message_ProgressRange& theProgress = Message_ProgressRange()); Standard_EXPORT void Init (const Handle(StepVisual_TessellatedFace)& theTF, const Handle(Transfer_TransientProcess)& theTP, const Standard_Boolean theReadTessellatedWhenNoBRepOnly, - Standard_Boolean& theHasGeom); + Standard_Boolean& theHasGeom, + const StepData_Factors& theLocalFactors); Standard_EXPORT const TopoDS_Shape& Value() const; diff --git a/src/StepToTopoDS/StepToTopoDS_MakeTransformed.cxx b/src/StepToTopoDS/StepToTopoDS_MakeTransformed.cxx index bd98590ef3..00c52ecb25 100644 --- a/src/StepToTopoDS/StepToTopoDS_MakeTransformed.cxx +++ b/src/StepToTopoDS/StepToTopoDS_MakeTransformed.cxx @@ -19,6 +19,7 @@ #include #include #include +#include #include #include #include @@ -48,16 +49,17 @@ StepToTopoDS_MakeTransformed::StepToTopoDS_MakeTransformed () Standard_Boolean StepToTopoDS_MakeTransformed::Compute (const Handle(StepGeom_Axis2Placement3d)& Origin, - const Handle(StepGeom_Axis2Placement3d)& Target) + const Handle(StepGeom_Axis2Placement3d)& Target, + const StepData_Factors& theLocalFactors) { theTrsf = gp_Trsf(); // reinit if (Origin.IsNull() || Target.IsNull()) return Standard_False; // sln 23.10.2001 : If the directions have not been created do nothing. - Handle(Geom_Axis2Placement) theOrig = StepToGeom::MakeAxis2Placement (Origin); + Handle(Geom_Axis2Placement) theOrig = StepToGeom::MakeAxis2Placement (Origin, theLocalFactors); if (theOrig.IsNull()) return Standard_False; - Handle(Geom_Axis2Placement) theTarg = StepToGeom::MakeAxis2Placement (Target); + Handle(Geom_Axis2Placement) theTarg = StepToGeom::MakeAxis2Placement (Target, theLocalFactors); if (theTarg.IsNull()) return Standard_False; @@ -75,9 +77,10 @@ Standard_Boolean StepToTopoDS_MakeTransformed::Compute //======================================================================= Standard_Boolean StepToTopoDS_MakeTransformed::Compute - (const Handle(StepGeom_CartesianTransformationOperator3d)& Operator) + (const Handle(StepGeom_CartesianTransformationOperator3d)& Operator, + const StepData_Factors& theLocalFactors) { - return StepToGeom::MakeTransformation3d (Operator, theTrsf); + return StepToGeom::MakeTransformation3d (Operator, theTrsf, theLocalFactors); } //======================================================================= @@ -112,6 +115,7 @@ Standard_Boolean StepToTopoDS_MakeTransformed::Transform TopoDS_Shape StepToTopoDS_MakeTransformed::TranslateMappedItem (const Handle(StepRepr_MappedItem)& mapit, const Handle(Transfer_TransientProcess)& TP, + const StepData_Factors& theLocalFactors, const Message_ProgressRange& theProgress) { TopoDS_Shape theResult; @@ -130,8 +134,8 @@ TopoDS_Shape StepToTopoDS_MakeTransformed::TranslateMappedItem Handle(StepGeom_CartesianTransformationOperator3d)::DownCast(mapit->MappingTarget()); Standard_Boolean ok = Standard_False; - if (!Origin.IsNull() && !Target.IsNull()) ok = Compute (Origin,Target); - else if (!CartOp.IsNull()) ok = Compute (CartOp); + if (!Origin.IsNull() && !Target.IsNull()) ok = Compute (Origin, Target, theLocalFactors); + else if (!CartOp.IsNull()) ok = Compute (CartOp, theLocalFactors); if (!ok) TP->AddWarning (mapit,"Mapped Item, case not recognized, location ignored"); diff --git a/src/StepToTopoDS/StepToTopoDS_MakeTransformed.hxx b/src/StepToTopoDS/StepToTopoDS_MakeTransformed.hxx index 6df7b9b814..5d70185dde 100644 --- a/src/StepToTopoDS/StepToTopoDS_MakeTransformed.hxx +++ b/src/StepToTopoDS/StepToTopoDS_MakeTransformed.hxx @@ -25,6 +25,7 @@ #include #include +class StepData_Factors; class StepGeom_Axis2Placement3d; class StepGeom_CartesianTransformationOperator3d; class TopoDS_Shape; @@ -44,10 +45,13 @@ public: //! Computes a transformation to pass from an Origin placement to //! a Target placement. Returns True when done //! If not done, the transformation will by Identity - Standard_EXPORT Standard_Boolean Compute (const Handle(StepGeom_Axis2Placement3d)& Origin, const Handle(StepGeom_Axis2Placement3d)& Target); + Standard_EXPORT Standard_Boolean Compute (const Handle(StepGeom_Axis2Placement3d)& Origin, + const Handle(StepGeom_Axis2Placement3d)& Target, + const StepData_Factors& theLocalFactors); //! Computes a transformation defined by an operator 3D - Standard_EXPORT Standard_Boolean Compute (const Handle(StepGeom_CartesianTransformationOperator3d)& Operator); + Standard_EXPORT Standard_Boolean Compute (const Handle(StepGeom_CartesianTransformationOperator3d)& Operator, + const StepData_Factors& theLocalFactors); //! Returns the computed transformation (Identity if not yet or //! if failed) @@ -69,6 +73,7 @@ public: //! transformed as an instance of this Shape Standard_EXPORT TopoDS_Shape TranslateMappedItem (const Handle(StepRepr_MappedItem)& mapit, const Handle(Transfer_TransientProcess)& TP, + const StepData_Factors& theLocalFactors, const Message_ProgressRange& theProgress = Message_ProgressRange()); diff --git a/src/StepToTopoDS/StepToTopoDS_TranslateCompositeCurve.cxx b/src/StepToTopoDS/StepToTopoDS_TranslateCompositeCurve.cxx index 6b7ff8382d..cf44ab9f5a 100644 --- a/src/StepToTopoDS/StepToTopoDS_TranslateCompositeCurve.cxx +++ b/src/StepToTopoDS/StepToTopoDS_TranslateCompositeCurve.cxx @@ -27,6 +27,7 @@ #include #include #include +#include #include #include #include @@ -56,10 +57,11 @@ StepToTopoDS_TranslateCompositeCurve::StepToTopoDS_TranslateCompositeCurve () //======================================================================= StepToTopoDS_TranslateCompositeCurve::StepToTopoDS_TranslateCompositeCurve ( - const Handle(StepGeom_CompositeCurve) &CC, - const Handle(Transfer_TransientProcess) &TP) + const Handle(StepGeom_CompositeCurve) &CC, + const Handle(Transfer_TransientProcess) &TP, + const StepData_Factors& theLocalFactors) { - Init ( CC, TP ); + Init ( CC, TP, theLocalFactors ); } //======================================================================= @@ -71,9 +73,10 @@ StepToTopoDS_TranslateCompositeCurve::StepToTopoDS_TranslateCompositeCurve ( const Handle(StepGeom_CompositeCurve) &CC, const Handle(Transfer_TransientProcess) &TP, const Handle(StepGeom_Surface) &S, - const Handle(Geom_Surface) &Surf) + const Handle(Geom_Surface) &Surf, + const StepData_Factors& theLocalFactors) { - Init ( CC, TP, S, Surf ); + Init ( CC, TP, S, Surf, theLocalFactors ); } //======================================================================= @@ -82,11 +85,12 @@ StepToTopoDS_TranslateCompositeCurve::StepToTopoDS_TranslateCompositeCurve ( //======================================================================= Standard_Boolean StepToTopoDS_TranslateCompositeCurve::Init (const Handle(StepGeom_CompositeCurve) &CC, - const Handle(Transfer_TransientProcess) &TP) + const Handle(Transfer_TransientProcess) &TP, + const StepData_Factors& theLocalFactors) { Handle(StepGeom_Surface) S; Handle(Geom_Surface) Surf; - return Init ( CC, TP, S, Surf ); + return Init ( CC, TP, S, Surf, theLocalFactors ); } //======================================================================= @@ -97,7 +101,8 @@ Standard_Boolean StepToTopoDS_TranslateCompositeCurve::Init (const Handle(StepGe Standard_Boolean StepToTopoDS_TranslateCompositeCurve::Init (const Handle(StepGeom_CompositeCurve) &CC, const Handle(Transfer_TransientProcess) &TP, const Handle(StepGeom_Surface) &S, - const Handle(Geom_Surface) &Surf) + const Handle(Geom_Surface) &Surf, + const StepData_Factors& theLocalFactors) { myWire.Nullify(); myInfiniteSegment = Standard_False; @@ -133,7 +138,7 @@ Standard_Boolean StepToTopoDS_TranslateCompositeCurve::Init (const Handle(StepGe continue; } Handle(StepGeom_CompositeCurve) cc = Handle(StepGeom_CompositeCurve)::DownCast ( crv ); - if ( ! Init ( cc, TP, S, Surf ) || myWire.IsNull() ) + if ( ! Init ( cc, TP, S, Surf, theLocalFactors ) || myWire.IsNull() ) continue; Standard_Integer nb = sbwd->NbEdges() + 1; for (TopoDS_Iterator it(myWire); it.More(); it.Next()) { @@ -181,7 +186,7 @@ Standard_Boolean StepToTopoDS_TranslateCompositeCurve::Init (const Handle(StepGe if ( ! crv.IsNull() ) { try { OCC_CATCH_SIGNALS - Handle(Geom_Curve) c3d = StepToGeom::MakeCurve (crv); + Handle(Geom_Curve) c3d = StepToGeom::MakeCurve (crv, theLocalFactors); if (! c3d.IsNull()) { BRepBuilderAPI_MakeEdge MkEdge ( c3d, c3d->FirstParameter(), c3d->LastParameter() ); if (MkEdge.IsDone()) @@ -209,7 +214,7 @@ Standard_Boolean StepToTopoDS_TranslateCompositeCurve::Init (const Handle(StepGe try { OCC_CATCH_SIGNALS StepToTopoDS_TranslateEdge TrE; - Handle(Geom2d_Curve) c2d = TrE.MakePCurve(pcurve, Surf); + Handle(Geom2d_Curve) c2d = TrE.MakePCurve(pcurve, Surf, theLocalFactors); if (!c2d.IsNull()) { if (edge.IsNull()) { BRepBuilderAPI_MakeEdge MkEdge(c2d, Surf, c2d->FirstParameter(), c2d->LastParameter()); diff --git a/src/StepToTopoDS/StepToTopoDS_TranslateCompositeCurve.hxx b/src/StepToTopoDS/StepToTopoDS_TranslateCompositeCurve.hxx index 74f25802f9..d940a2fe87 100644 --- a/src/StepToTopoDS/StepToTopoDS_TranslateCompositeCurve.hxx +++ b/src/StepToTopoDS/StepToTopoDS_TranslateCompositeCurve.hxx @@ -47,16 +47,28 @@ public: Standard_EXPORT StepToTopoDS_TranslateCompositeCurve(); //! Translates standalone composite_curve - Standard_EXPORT StepToTopoDS_TranslateCompositeCurve(const Handle(StepGeom_CompositeCurve)& CC, const Handle(Transfer_TransientProcess)& TP); + Standard_EXPORT StepToTopoDS_TranslateCompositeCurve(const Handle(StepGeom_CompositeCurve)& CC, + const Handle(Transfer_TransientProcess)& TP, + const StepData_Factors& theLocalFactors); //! Translates composite_curve lying on surface - Standard_EXPORT StepToTopoDS_TranslateCompositeCurve(const Handle(StepGeom_CompositeCurve)& CC, const Handle(Transfer_TransientProcess)& TP, const Handle(StepGeom_Surface)& S, const Handle(Geom_Surface)& Surf); + Standard_EXPORT StepToTopoDS_TranslateCompositeCurve(const Handle(StepGeom_CompositeCurve)& CC, + const Handle(Transfer_TransientProcess)& TP, + const Handle(StepGeom_Surface)& S, + const Handle(Geom_Surface)& Surf, + const StepData_Factors& theLocalFactors); //! Translates standalone composite_curve - Standard_EXPORT Standard_Boolean Init (const Handle(StepGeom_CompositeCurve)& CC, const Handle(Transfer_TransientProcess)& TP); + Standard_EXPORT Standard_Boolean Init (const Handle(StepGeom_CompositeCurve)& CC, + const Handle(Transfer_TransientProcess)& TP, + const StepData_Factors& theLocalFactors); //! Translates composite_curve lying on surface - Standard_EXPORT Standard_Boolean Init (const Handle(StepGeom_CompositeCurve)& CC, const Handle(Transfer_TransientProcess)& TP, const Handle(StepGeom_Surface)& S, const Handle(Geom_Surface)& Surf); + Standard_EXPORT Standard_Boolean Init (const Handle(StepGeom_CompositeCurve)& CC, + const Handle(Transfer_TransientProcess)& TP, + const Handle(StepGeom_Surface)& S, + const Handle(Geom_Surface)& Surf, + const StepData_Factors& theLocalFactors); //! Returns result of last translation or null wire if failed. Standard_EXPORT const TopoDS_Wire& Value() const; diff --git a/src/StepToTopoDS/StepToTopoDS_TranslateCurveBoundedSurface.cxx b/src/StepToTopoDS/StepToTopoDS_TranslateCurveBoundedSurface.cxx index 4849dda6ca..669410d5fa 100644 --- a/src/StepToTopoDS/StepToTopoDS_TranslateCurveBoundedSurface.cxx +++ b/src/StepToTopoDS/StepToTopoDS_TranslateCurveBoundedSurface.cxx @@ -23,6 +23,7 @@ #include #include #include +#include #include #include #include @@ -49,9 +50,10 @@ StepToTopoDS_TranslateCurveBoundedSurface::StepToTopoDS_TranslateCurveBoundedSur StepToTopoDS_TranslateCurveBoundedSurface::StepToTopoDS_TranslateCurveBoundedSurface ( const Handle(StepGeom_CurveBoundedSurface) &CBS, - const Handle(Transfer_TransientProcess) &TP) + const Handle(Transfer_TransientProcess) &TP, + const StepData_Factors& theLocalFactors) { - Init ( CBS, TP ); + Init ( CBS, TP, theLocalFactors ); } //======================================================================= @@ -61,14 +63,15 @@ StepToTopoDS_TranslateCurveBoundedSurface::StepToTopoDS_TranslateCurveBoundedSur Standard_Boolean StepToTopoDS_TranslateCurveBoundedSurface::Init ( const Handle(StepGeom_CurveBoundedSurface) &CBS, - const Handle(Transfer_TransientProcess) &TP) + const Handle(Transfer_TransientProcess) &TP, + const StepData_Factors& theLocalFactors) { myFace.Nullify(); if ( CBS.IsNull() ) return Standard_False; // translate basis surface Handle(StepGeom_Surface) S = CBS->BasisSurface(); - Handle(Geom_Surface) Surf = StepToGeom::MakeSurface (S); + Handle(Geom_Surface) Surf = StepToGeom::MakeSurface (S, theLocalFactors); if (Surf.IsNull()) { TP->AddFail ( CBS, "Basis surface not translated" ); @@ -105,7 +108,7 @@ Standard_Boolean StepToTopoDS_TranslateCurveBoundedSurface::Init ( for ( Standard_Integer i=1; i <= nb; i++ ) { Handle(StepGeom_CompositeCurve) cc = bnd->Value ( i ).BoundaryCurve(); if ( cc.IsNull() ) continue; - StepToTopoDS_TranslateCompositeCurve TrCC ( cc, TP, S, Surf ); + StepToTopoDS_TranslateCompositeCurve TrCC ( cc, TP, S, Surf, theLocalFactors ); if ( ! TrCC.IsDone() ) { TP->AddWarning ( CBS, "Boundary not translated" ); continue; diff --git a/src/StepToTopoDS/StepToTopoDS_TranslateCurveBoundedSurface.hxx b/src/StepToTopoDS/StepToTopoDS_TranslateCurveBoundedSurface.hxx index 28bf8a26e2..176177890c 100644 --- a/src/StepToTopoDS/StepToTopoDS_TranslateCurveBoundedSurface.hxx +++ b/src/StepToTopoDS/StepToTopoDS_TranslateCurveBoundedSurface.hxx @@ -39,10 +39,14 @@ public: Standard_EXPORT StepToTopoDS_TranslateCurveBoundedSurface(); //! Translate surface - Standard_EXPORT StepToTopoDS_TranslateCurveBoundedSurface(const Handle(StepGeom_CurveBoundedSurface)& CBS, const Handle(Transfer_TransientProcess)& TP); + Standard_EXPORT StepToTopoDS_TranslateCurveBoundedSurface(const Handle(StepGeom_CurveBoundedSurface)& CBS, + const Handle(Transfer_TransientProcess)& TP, + const StepData_Factors& theLocalFactors); //! Translate surface - Standard_EXPORT Standard_Boolean Init (const Handle(StepGeom_CurveBoundedSurface)& CBS, const Handle(Transfer_TransientProcess)& TP); + Standard_EXPORT Standard_Boolean Init (const Handle(StepGeom_CurveBoundedSurface)& CBS, + const Handle(Transfer_TransientProcess)& TP, + const StepData_Factors& theLocalFactors); //! Returns result of last translation or null wire if failed. Standard_EXPORT const TopoDS_Face& Value() const; diff --git a/src/StepToTopoDS/StepToTopoDS_TranslateEdge.cxx b/src/StepToTopoDS/StepToTopoDS_TranslateEdge.cxx index a005fc8aca..043e946b93 100644 --- a/src/StepToTopoDS/StepToTopoDS_TranslateEdge.cxx +++ b/src/StepToTopoDS/StepToTopoDS_TranslateEdge.cxx @@ -34,7 +34,7 @@ #include #include #include -#include +#include #include #include #include @@ -136,11 +136,12 @@ static void DecodeMakeEdgeError(const BRepLib_MakeEdge& ME, // ============================================================================ static Handle(Geom_Curve) MakeCurve - (const Handle(StepGeom_Curve)& C1, const Handle(Transfer_TransientProcess)& TP) + (const Handle(StepGeom_Curve)& C1, const Handle(Transfer_TransientProcess)& TP, + const StepData_Factors& theLocalFactors) { Handle(Geom_Curve) C2 = Handle(Geom_Curve)::DownCast (TP->FindTransient(C1)); if (!C2.IsNull()) return C2; - C2 = StepToGeom::MakeCurve (C1); + C2 = StepToGeom::MakeCurve (C1, theLocalFactors); if (! C2.IsNull()) TP->BindTransient (C1,C2); return C2; @@ -178,9 +179,10 @@ StepToTopoDS_TranslateEdge::StepToTopoDS_TranslateEdge() StepToTopoDS_TranslateEdge::StepToTopoDS_TranslateEdge(const Handle(StepShape_Edge)& E, StepToTopoDS_Tool& T, - StepToTopoDS_NMTool& NMTool) + StepToTopoDS_NMTool& NMTool, + const StepData_Factors& theLocalFactors) { - Init(E, T, NMTool); + Init(E, T, NMTool, theLocalFactors); } // ============================================================================ @@ -192,7 +194,8 @@ StepToTopoDS_TranslateEdge::StepToTopoDS_TranslateEdge(const Handle(StepShape_Ed void StepToTopoDS_TranslateEdge::Init(const Handle(StepShape_Edge)& aEdge, StepToTopoDS_Tool& aTool, - StepToTopoDS_NMTool& NMTool) + StepToTopoDS_NMTool& NMTool, + const StepData_Factors& theLocalFactors) { Handle(Transfer_TransientProcess) TP = aTool.TransientProcess(); @@ -277,8 +280,8 @@ void StepToTopoDS_TranslateEdge::Init(const Handle(StepShape_Edge)& aEdge, TopoDS_Vertex V1, V2; - StepToTopoDS_TranslateVertex myTranVertex1(Vstart, aTool, NMTool); - StepToTopoDS_TranslateVertex myTranVertex2(Vend, aTool, NMTool); + StepToTopoDS_TranslateVertex myTranVertex1(Vstart, aTool, NMTool, theLocalFactors); + StepToTopoDS_TranslateVertex myTranVertex2(Vend, aTool, NMTool, theLocalFactors); if (myTranVertex1.IsDone()) { V1 = TopoDS::Vertex(myTranVertex1.Value()); @@ -315,11 +318,11 @@ void StepToTopoDS_TranslateEdge::Init(const Handle(StepShape_Edge)& aEdge, Handle(StepGeom_SurfaceCurve) Sc = Handle(StepGeom_SurfaceCurve)::DownCast(C); Handle(StepGeom_Curve) C1 = Sc->Curve3d(); - MakeFromCurve3D (C1,EC,Vend,Precision(), E,V1,V2 , aTool); + MakeFromCurve3D (C1,EC,Vend,Precision(), E,V1,V2 , aTool, theLocalFactors); } else { // --- The Edge Geometry is a Single 3d Curve --- - MakeFromCurve3D (C,EC,Vend,Precision(), E,V1,V2 , aTool); + MakeFromCurve3D (C,EC,Vend,Precision(), E,V1,V2 , aTool, theLocalFactors); } // Force set flags SameRange and SameParameter to Standard_False if (done) { @@ -348,14 +351,14 @@ void StepToTopoDS_TranslateEdge::Init(const Handle(StepShape_Edge)& aEdge, // auxiliary function //:e6 abv 16 Apr 98: ProSTEP TR8, r0601_sy.stp, #14907 static void GetCartesianPoints ( const Handle(StepShape_EdgeCurve)& EC, - gp_Pnt &P1, gp_Pnt &P2) + gp_Pnt &P1, gp_Pnt &P2, const StepData_Factors& theLocalFactors) { for ( Standard_Integer i=1; i<=2; i++ ) { const Handle(StepShape_Vertex) V = ((i == 1) == EC->SameSense() ? EC->EdgeStart() : EC->EdgeEnd() ); const Handle(StepShape_VertexPoint) VP = Handle(StepShape_VertexPoint)::DownCast(V); if ( VP.IsNull() ) continue; const Handle(StepGeom_CartesianPoint) P = Handle(StepGeom_CartesianPoint)::DownCast(VP->VertexGeometry()); - Handle(Geom_CartesianPoint) CP = StepToGeom::MakeCartesianPoint (P); + Handle(Geom_CartesianPoint) CP = StepToGeom::MakeCartesianPoint (P, theLocalFactors); ( i==1 ? P1 : P2 ) = CP->Pnt(); } } @@ -370,10 +373,11 @@ void StepToTopoDS_TranslateEdge::MakeFromCurve3D const Handle(StepShape_Vertex)& Vend, const Standard_Real preci, TopoDS_Edge& E, TopoDS_Vertex& V1, TopoDS_Vertex& V2, - StepToTopoDS_Tool& aTool) + StepToTopoDS_Tool& aTool, + const StepData_Factors& theLocalFactors) { Handle(Transfer_TransientProcess) TP = aTool.TransientProcess(); - Handle(Geom_Curve) C1 = MakeCurve(C3D,TP); + Handle(Geom_Curve) C1 = MakeCurve(C3D,TP, theLocalFactors); if (C1.IsNull()) { TP->AddFail(C3D," Make Geom_Curve (3D) failed"); myError = StepToTopoDS_TranslateEdgeOther; @@ -390,7 +394,7 @@ void StepToTopoDS_TranslateEdge::MakeFromCurve3D //:e6 abv gp_Pnt pnt1 = pv1, pnt2 = pv2; - if ( V1.IsSame ( V2 ) ) GetCartesianPoints ( EC, pnt1, pnt2 ); + if ( V1.IsSame ( V2 ) ) GetCartesianPoints ( EC, pnt1, pnt2, theLocalFactors); ShapeAnalysis_Curve sac; temp1 = sac.Project (C1,pnt1,preci,pproj,U1,Standard_False); temp2 = sac.Project (C1,pnt2,preci,pproj,U2,Standard_False); @@ -474,7 +478,8 @@ void StepToTopoDS_TranslateEdge::MakeFromCurve3D // Purpose : Computes an individual pcurve (i.e. curve 2d) // ============================================================================ Handle(Geom2d_Curve) StepToTopoDS_TranslateEdge::MakePCurve - (const Handle(StepGeom_Pcurve)& PCU, const Handle(Geom_Surface)& ConvSurf) const + (const Handle(StepGeom_Pcurve)& PCU, const Handle(Geom_Surface)& ConvSurf, + const StepData_Factors& theLocalFactors) const { Handle(Geom2d_Curve) C2d; const Handle(StepRepr_DefinitionalRepresentation) DRI = PCU->ReferenceToCurve(); @@ -482,12 +487,12 @@ Handle(Geom2d_Curve) StepToTopoDS_TranslateEdge::MakePCurve const Handle(StepGeom_Curve) StepCurve = Handle(StepGeom_Curve)::DownCast(DRI->ItemsValue(1)); try { - C2d = StepToGeom::MakeCurve2d (StepCurve); + C2d = StepToGeom::MakeCurve2d (StepCurve, theLocalFactors); if (! C2d.IsNull()) { // -- if the surface is a RectangularTrimmedSurface, // -- send the BasisSurface. C2d = GeomConvert_Units::DegreeToRadian(C2d, ConvSurf, - StepData_GlobalFactors::Intance().LengthFactor(), StepData_GlobalFactors::Intance().FactorDegreeRadian()); + theLocalFactors.LengthFactor(), theLocalFactors.FactorDegreeRadian()); } } diff --git a/src/StepToTopoDS/StepToTopoDS_TranslateEdge.hxx b/src/StepToTopoDS/StepToTopoDS_TranslateEdge.hxx index fc2c2ace63..108e255e46 100644 --- a/src/StepToTopoDS/StepToTopoDS_TranslateEdge.hxx +++ b/src/StepToTopoDS/StepToTopoDS_TranslateEdge.hxx @@ -24,6 +24,7 @@ #include #include #include +class StepData_Factors; class StepShape_Edge; class StepToTopoDS_Tool; class StepToTopoDS_NMTool; @@ -47,15 +48,31 @@ public: Standard_EXPORT StepToTopoDS_TranslateEdge(); - Standard_EXPORT StepToTopoDS_TranslateEdge(const Handle(StepShape_Edge)& E, StepToTopoDS_Tool& T, StepToTopoDS_NMTool& NMTool); + Standard_EXPORT StepToTopoDS_TranslateEdge(const Handle(StepShape_Edge)& E, + StepToTopoDS_Tool& T, + StepToTopoDS_NMTool& NMTool, + const StepData_Factors& theLocalFactors); - Standard_EXPORT void Init (const Handle(StepShape_Edge)& E, StepToTopoDS_Tool& T, StepToTopoDS_NMTool& NMTool); + Standard_EXPORT void Init (const Handle(StepShape_Edge)& E, + StepToTopoDS_Tool& T, + StepToTopoDS_NMTool& NMTool, + const StepData_Factors& theLocalFactors); //! Warning! C3D is assumed to be a Curve 3D ... //! other cases to checked before calling this - Standard_EXPORT void MakeFromCurve3D (const Handle(StepGeom_Curve)& C3D, const Handle(StepShape_EdgeCurve)& EC, const Handle(StepShape_Vertex)& Vend, const Standard_Real preci, TopoDS_Edge& E, TopoDS_Vertex& V1, TopoDS_Vertex& V2, StepToTopoDS_Tool& T); + Standard_EXPORT void MakeFromCurve3D (const Handle(StepGeom_Curve)& C3D, + const Handle(StepShape_EdgeCurve)& EC, + const Handle(StepShape_Vertex)& Vend, + const Standard_Real preci, + TopoDS_Edge& E, + TopoDS_Vertex& V1, + TopoDS_Vertex& V2, + StepToTopoDS_Tool& T, + const StepData_Factors& theLocalFactors); - Standard_EXPORT Handle(Geom2d_Curve) MakePCurve (const Handle(StepGeom_Pcurve)& PCU, const Handle(Geom_Surface)& ConvSurf) const; + Standard_EXPORT Handle(Geom2d_Curve) MakePCurve (const Handle(StepGeom_Pcurve)& PCU, + const Handle(Geom_Surface)& ConvSurf, + const StepData_Factors& theLocalFactors) const; Standard_EXPORT const TopoDS_Shape& Value() const; diff --git a/src/StepToTopoDS/StepToTopoDS_TranslateEdgeLoop.cxx b/src/StepToTopoDS/StepToTopoDS_TranslateEdgeLoop.cxx index 156197a605..66c12dc895 100644 --- a/src/StepToTopoDS/StepToTopoDS_TranslateEdgeLoop.cxx +++ b/src/StepToTopoDS/StepToTopoDS_TranslateEdgeLoop.cxx @@ -43,6 +43,7 @@ #include #include #include +#include #include #include #include @@ -188,8 +189,9 @@ StepToTopoDS_TranslateEdgeLoop::StepToTopoDS_TranslateEdgeLoop(const Handle(Step const Handle(StepGeom_Surface)& StepSurf, const Standard_Boolean sameSense, StepToTopoDS_Tool& T, - StepToTopoDS_NMTool& NMTool) { - Init(FB, Face, GeomSurf, StepSurf, sameSense, T, NMTool); + StepToTopoDS_NMTool& NMTool, + const StepData_Factors& theLocalFactors) { + Init(FB, Face, GeomSurf, StepSurf, sameSense, T, NMTool, theLocalFactors); } // ============================================================================ @@ -203,7 +205,8 @@ void StepToTopoDS_TranslateEdgeLoop::Init(const Handle(StepShape_FaceBound)& Fac const Handle(StepGeom_Surface)& StepSurf, const Standard_Boolean sameSense, StepToTopoDS_Tool& aTool, - StepToTopoDS_NMTool& NMTool) { + StepToTopoDS_NMTool& NMTool, + const StepData_Factors& theLocalFactors) { done = Standard_True; Handle(StepShape_EdgeLoop) EL = Handle(StepShape_EdgeLoop)::DownCast(FaceBound->Bound()); @@ -304,7 +307,7 @@ void StepToTopoDS_TranslateEdgeLoop::Init(const Handle(StepShape_FaceBound)& Fac OCC_CATCH_SIGNALS C1 = Handle(Geom_Curve)::DownCast (TP->FindTransient(C)); if (C1.IsNull()) { - C1 = StepToGeom::MakeCurve (C); + C1 = StepToGeom::MakeCurve (C, theLocalFactors); if (! C1.IsNull()) TP->BindTransient (C, C1); else @@ -334,8 +337,8 @@ void StepToTopoDS_TranslateEdgeLoop::Init(const Handle(StepShape_FaceBound)& Fac Standard_Boolean istV = aTool.IsBound(Vstart); Standard_Boolean iseV = aTool.IsBound(Vend); TopoDS_Vertex V1, V2; - StepToTopoDS_TranslateVertex myTranVertex1(Vstart, aTool, NMTool); - StepToTopoDS_TranslateVertex myTranVertex2(Vend, aTool, NMTool); + StepToTopoDS_TranslateVertex myTranVertex1(Vstart, aTool, NMTool, theLocalFactors); + StepToTopoDS_TranslateVertex myTranVertex2(Vend, aTool, NMTool, theLocalFactors); if (myTranVertex1.IsDone()) { V1 = TopoDS::Vertex(myTranVertex1.Value()); @@ -385,8 +388,8 @@ void StepToTopoDS_TranslateEdgeLoop::Init(const Handle(StepShape_FaceBound)& Fac if ((Vs1 == Vs2) || (Vs1 == Vs22) || (Vs2 == Vs11) || (Vs22 == Vs11)) continue; - StepToTopoDS_TranslateVertex myTranVertex1 (Vs1, aTool, NMTool); - StepToTopoDS_TranslateVertex myTranVertex2 (Vs2, aTool, NMTool); + StepToTopoDS_TranslateVertex myTranVertex1 (Vs1, aTool, NMTool, theLocalFactors); + StepToTopoDS_TranslateVertex myTranVertex2 (Vs2, aTool, NMTool, theLocalFactors); TopoDS_Vertex V1, V2; if (myTranVertex1.IsDone()) @@ -443,7 +446,7 @@ void StepToTopoDS_TranslateEdgeLoop::Init(const Handle(StepShape_FaceBound)& Fac myTranEdge.SetPrecision(preci); myTranEdge.SetMaxTol(MaxTol()); - myTranEdge.Init(OrEdge1, aTool, NMTool); + myTranEdge.Init(OrEdge1, aTool, NMTool, theLocalFactors); if (myTranEdge.IsDone()) { @@ -474,7 +477,7 @@ void StepToTopoDS_TranslateEdgeLoop::Init(const Handle(StepShape_FaceBound)& Fac } else if (C->IsKind(STANDARD_TYPE(StepGeom_Pcurve))) { Handle(StepGeom_Pcurve) StepPCurve = Handle(StepGeom_Pcurve)::DownCast(C); - C2d = myTranEdge.MakePCurve(StepPCurve, ConvSurf); + C2d = myTranEdge.MakePCurve(StepPCurve, ConvSurf, theLocalFactors); // -- Statistics -- aTool.AddContinuity(C2d); } @@ -520,8 +523,8 @@ void StepToTopoDS_TranslateEdgeLoop::Init(const Handle(StepShape_FaceBound)& Fac StepPCurve2 = SurfCurve->AssociatedGeometryValue(2).Pcurve(); if (StepPCurve1.IsNull() || StepPCurve2.IsNull()) hasPcurve = Standard_False; //smh : BUC60810 else { - C2d1 = myTranEdge.MakePCurve(StepPCurve1, ConvSurf); - C2d2 = myTranEdge.MakePCurve(StepPCurve2, ConvSurf); + C2d1 = myTranEdge.MakePCurve(StepPCurve1, ConvSurf, theLocalFactors); + C2d2 = myTranEdge.MakePCurve(StepPCurve2, ConvSurf, theLocalFactors); hasPcurve = (!C2d1.IsNull() && !C2d2.IsNull()); } @@ -534,7 +537,7 @@ void StepToTopoDS_TranslateEdgeLoop::Init(const Handle(StepShape_FaceBound)& Fac else if (hasPcurve) { // GeometricTool : Pcurve a retourne StepPCurve while (lastpcurve > 0) { - C2d1 = myTranEdge.MakePCurve(StepPCurve, ConvSurf); + C2d1 = myTranEdge.MakePCurve(StepPCurve, ConvSurf, theLocalFactors); if (C2d1.IsNull()) { TP->AddWarning(EC, "Incorrect pcurve is not translated. Pcurve definition is not correct"); hasPcurve = Standard_False; diff --git a/src/StepToTopoDS/StepToTopoDS_TranslateEdgeLoop.hxx b/src/StepToTopoDS/StepToTopoDS_TranslateEdgeLoop.hxx index bcf0891b67..d20769cede 100644 --- a/src/StepToTopoDS/StepToTopoDS_TranslateEdgeLoop.hxx +++ b/src/StepToTopoDS/StepToTopoDS_TranslateEdgeLoop.hxx @@ -42,9 +42,23 @@ public: Standard_EXPORT StepToTopoDS_TranslateEdgeLoop(); - Standard_EXPORT StepToTopoDS_TranslateEdgeLoop(const Handle(StepShape_FaceBound)& FB, const TopoDS_Face& F, const Handle(Geom_Surface)& S, const Handle(StepGeom_Surface)& SS, const Standard_Boolean ss, StepToTopoDS_Tool& T, StepToTopoDS_NMTool& NMTool); + Standard_EXPORT StepToTopoDS_TranslateEdgeLoop(const Handle(StepShape_FaceBound)& FB, + const TopoDS_Face& F, + const Handle(Geom_Surface)& S, + const Handle(StepGeom_Surface)& SS, + const Standard_Boolean ss, + StepToTopoDS_Tool& T, + StepToTopoDS_NMTool& NMTool, + const StepData_Factors& theLocalFactors); - Standard_EXPORT void Init (const Handle(StepShape_FaceBound)& FB, const TopoDS_Face& F, const Handle(Geom_Surface)& S, const Handle(StepGeom_Surface)& SS, const Standard_Boolean ss, StepToTopoDS_Tool& T, StepToTopoDS_NMTool& NMTool); + Standard_EXPORT void Init (const Handle(StepShape_FaceBound)& FB, + const TopoDS_Face& F, + const Handle(Geom_Surface)& S, + const Handle(StepGeom_Surface)& SS, + const Standard_Boolean ss, + StepToTopoDS_Tool& T, + StepToTopoDS_NMTool& NMTool, + const StepData_Factors& theLocalFactors); Standard_EXPORT const TopoDS_Shape& Value() const; diff --git a/src/StepToTopoDS/StepToTopoDS_TranslateFace.cxx b/src/StepToTopoDS/StepToTopoDS_TranslateFace.cxx index 209eb69338..deb798e427 100644 --- a/src/StepToTopoDS/StepToTopoDS_TranslateFace.cxx +++ b/src/StepToTopoDS/StepToTopoDS_TranslateFace.cxx @@ -46,7 +46,7 @@ #include #include #include -#include +#include #include #include #include @@ -110,10 +110,12 @@ StepToTopoDS_TranslateFace::StepToTopoDS_TranslateFace() // Purpose : Constructor with a FaceSurface and a Tool // ============================================================================ -StepToTopoDS_TranslateFace::StepToTopoDS_TranslateFace -(const Handle(StepShape_FaceSurface)& FS, StepToTopoDS_Tool& T, StepToTopoDS_NMTool& NMTool) +StepToTopoDS_TranslateFace::StepToTopoDS_TranslateFace(const Handle(StepShape_FaceSurface)& FS, + StepToTopoDS_Tool& T, + StepToTopoDS_NMTool& NMTool, + const StepData_Factors& theLocalFactors) { - Init(FS, T, NMTool); + Init(FS, T, NMTool, theLocalFactors); } // ============================================================================ @@ -126,9 +128,10 @@ StepToTopoDS_TranslateFace::StepToTopoDS_TranslateFace(const Handle(StepVisual_T StepToTopoDS_Tool& theTool, StepToTopoDS_NMTool& theNMTool, const Standard_Boolean theReadTessellatedWhenNoBRepOnly, - Standard_Boolean& theHasGeom) + Standard_Boolean& theHasGeom, + const StepData_Factors& theLocalFactors) { - Init(theTF, theTool, theNMTool, theReadTessellatedWhenNoBRepOnly, theHasGeom); + Init(theTF, theTool, theNMTool, theReadTessellatedWhenNoBRepOnly, theHasGeom, theLocalFactors); } // ============================================================================ @@ -153,8 +156,10 @@ static inline Standard_Boolean isReversed(const Handle(StepGeom_Surface)& theSte // Purpose : Init with a FaceSurface and a Tool // ============================================================================ -void StepToTopoDS_TranslateFace::Init -(const Handle(StepShape_FaceSurface)& FS, StepToTopoDS_Tool& aTool, StepToTopoDS_NMTool& NMTool) +void StepToTopoDS_TranslateFace::Init(const Handle(StepShape_FaceSurface)& FS, + StepToTopoDS_Tool& aTool, + StepToTopoDS_NMTool& NMTool, + const StepData_Factors& theLocalFactors) { done = Standard_True; if (aTool.IsBound(FS)) { @@ -194,7 +199,7 @@ void StepToTopoDS_TranslateFace::Init if (StepSurf->IsKind(STANDARD_TYPE(StepGeom_OffsetSurface))) //:d4 abv 12 Mar 98 TP->AddWarning(StepSurf," Type OffsetSurface is out of scope of AP 214"); - Handle(Geom_Surface) GeomSurf = StepToGeom::MakeSurface (StepSurf); + Handle(Geom_Surface) GeomSurf = StepToGeom::MakeSurface (StepSurf, theLocalFactors); if (GeomSurf.IsNull()) { TP->AddFail(StepSurf," Surface has not been created"); @@ -296,7 +301,7 @@ void StepToTopoDS_TranslateFace::Init } myTranVL.SetPrecision(Precision());//gka myTranVL.SetMaxTol(MaxTol()); - myTranVL.Init(VL, aTool, NMTool); + myTranVL.Init(VL, aTool, NMTool, theLocalFactors); if (myTranVL.IsDone()) { B.Add(F, myTranVL.Value()); } @@ -315,7 +320,7 @@ void StepToTopoDS_TranslateFace::Init F.Orientation ( FS->SameSense() ? TopAbs_FORWARD : TopAbs_REVERSED); myTranPL.SetPrecision(Precision()); //gka myTranPL.SetMaxTol(MaxTol()); - myTranPL.Init(PL, aTool, GeomSurf, F); + myTranPL.Init(PL, aTool, GeomSurf, F, theLocalFactors); if (myTranPL.IsDone()) { TopoDS_Wire W = TopoDS::Wire(myTranPL.Value()); W.Orientation(FaceBound->Orientation() ? TopAbs_FORWARD : TopAbs_REVERSED); @@ -340,7 +345,7 @@ void StepToTopoDS_TranslateFace::Init TopoDS_Wire W; myTranEdgeLoop.SetPrecision(Precision()); //gka myTranEdgeLoop.SetMaxTol(MaxTol()); - myTranEdgeLoop.Init(FaceBound, F, GeomSurf, StepSurf, sameSense, aTool, NMTool); + myTranEdgeLoop.Init(FaceBound, F, GeomSurf, StepSurf, sameSense, aTool, NMTool, theLocalFactors); if (myTranEdgeLoop.IsDone()) { W = TopoDS::Wire(myTranEdgeLoop.Value()); @@ -411,7 +416,8 @@ void StepToTopoDS_TranslateFace::Init(const Handle(StepVisual_TessellatedFace)& StepToTopoDS_Tool& theTool, StepToTopoDS_NMTool& theNMTool, const Standard_Boolean theReadTessellatedWhenNoBRepOnly, - Standard_Boolean& theHasGeom) + Standard_Boolean& theHasGeom, + const StepData_Factors& theLocalFactors) { if (theTF.IsNull()) return; @@ -446,11 +452,11 @@ void StepToTopoDS_TranslateFace::Init(const Handle(StepVisual_TessellatedFace)& Handle(Poly_Triangulation) aMesh; if (DeclareAndCast(StepVisual_TriangulatedFace, aTriaF, theTF)) { - aMesh = createMesh(aTriaF); + aMesh = createMesh(aTriaF, theLocalFactors); } else if (DeclareAndCast(StepVisual_ComplexTriangulatedFace, aCompTriaF, theTF)) { - aMesh = createMesh(aCompTriaF); + aMesh = createMesh(aCompTriaF, theLocalFactors); } else { @@ -480,7 +486,8 @@ void StepToTopoDS_TranslateFace::Init(const Handle(StepVisual_TessellatedFace)& // ============================================================================ Handle(Poly_Triangulation) -StepToTopoDS_TranslateFace::createMesh(const Handle(StepVisual_TriangulatedFace)& theTF) const +StepToTopoDS_TranslateFace::createMesh(const Handle(StepVisual_TriangulatedFace)& theTF, + const StepData_Factors& theLocalFactors) const { Handle(StepVisual_CoordinatesList) aCoords = theTF->Coordinates(); Handle(TColgp_HArray1OfXYZ) aNodes = aCoords->Points(); @@ -489,7 +496,7 @@ StepToTopoDS_TranslateFace::createMesh(const Handle(StepVisual_TriangulatedFace) const Standard_Boolean aHasNormals = (theTF->NbNormals() > 0); Handle(Poly_Triangulation) aMesh = new Poly_Triangulation(theTF->NbPnindex(), theTF->NbTriangles(), aHasUVNodes, aHasNormals); - const Standard_Real aLF = StepData_GlobalFactors::Intance().LengthFactor(); + const Standard_Real aLF = theLocalFactors.LengthFactor(); for (Standard_Integer j = 1; j <= theTF->NbPnindex(); ++j) { const gp_XYZ& aPoint = aNodes->Value(theTF->PnindexValue(j)); @@ -536,7 +543,8 @@ StepToTopoDS_TranslateFace::createMesh(const Handle(StepVisual_TriangulatedFace) // ============================================================================ Handle(Poly_Triangulation) -StepToTopoDS_TranslateFace::createMesh(const Handle(StepVisual_ComplexTriangulatedFace)& theTF) const +StepToTopoDS_TranslateFace::createMesh(const Handle(StepVisual_ComplexTriangulatedFace)& theTF, + const StepData_Factors& theLocalFactors) const { Handle(StepVisual_CoordinatesList) aCoords = theTF->Coordinates(); Handle(TColgp_HArray1OfXYZ) aNodes = aCoords->Points(); @@ -576,7 +584,7 @@ StepToTopoDS_TranslateFace::createMesh(const Handle(StepVisual_ComplexTriangulat Handle(Poly_Triangulation) aMesh = new Poly_Triangulation(theTF->NbPnindex(), aNbTriaStrips + aNbTriaFans, aHasUVNodes, aHasNormals); - const Standard_Real aLF = StepData_GlobalFactors::Intance().LengthFactor(); + const Standard_Real aLF = theLocalFactors.LengthFactor(); for (Standard_Integer j = 1; j <= theTF->NbPnindex(); ++j) { const gp_XYZ& aPoint = aNodes->Value(theTF->PnindexValue(j)); diff --git a/src/StepToTopoDS/StepToTopoDS_TranslateFace.hxx b/src/StepToTopoDS/StepToTopoDS_TranslateFace.hxx index 2f85e417bd..1fc01453c2 100644 --- a/src/StepToTopoDS/StepToTopoDS_TranslateFace.hxx +++ b/src/StepToTopoDS/StepToTopoDS_TranslateFace.hxx @@ -25,6 +25,7 @@ #include #include class Poly_Triangulation; +class StepData_Factors; class StepShape_FaceSurface; class StepToTopoDS_Tool; class StepToTopoDS_NMTool; @@ -42,21 +43,29 @@ public: Standard_EXPORT StepToTopoDS_TranslateFace(); - Standard_EXPORT StepToTopoDS_TranslateFace(const Handle(StepShape_FaceSurface)& FS, StepToTopoDS_Tool& T, StepToTopoDS_NMTool& NMTool); + Standard_EXPORT StepToTopoDS_TranslateFace(const Handle(StepShape_FaceSurface)& FS, + StepToTopoDS_Tool& T, + StepToTopoDS_NMTool& NMTool, + const StepData_Factors& theLocalFactors); Standard_EXPORT StepToTopoDS_TranslateFace(const Handle(StepVisual_TessellatedFace)& theTF, StepToTopoDS_Tool& theTool, StepToTopoDS_NMTool& theNMTool, const Standard_Boolean theReadTessellatedWhenNoBRepOnly, - Standard_Boolean& theHasGeom); + Standard_Boolean& theHasGeom, + const StepData_Factors& theLocalFactors); - Standard_EXPORT void Init (const Handle(StepShape_FaceSurface)& FS, StepToTopoDS_Tool& T, StepToTopoDS_NMTool& NMTool); + Standard_EXPORT void Init (const Handle(StepShape_FaceSurface)& FS, + StepToTopoDS_Tool& T, + StepToTopoDS_NMTool& NMTool, + const StepData_Factors& theLocalFactors); Standard_EXPORT void Init (const Handle(StepVisual_TessellatedFace)& theTF, StepToTopoDS_Tool& theTool, StepToTopoDS_NMTool& theNMTool, const Standard_Boolean theReadTessellatedWhenNoBRepOnly, - Standard_Boolean& theHasGeom); + Standard_Boolean& theHasGeom, + const StepData_Factors& theLocalFactors); Standard_EXPORT const TopoDS_Shape& Value() const; @@ -73,8 +82,10 @@ protected: private: - Handle(Poly_Triangulation) createMesh(const Handle(StepVisual_TriangulatedFace)& theTF) const; - Handle(Poly_Triangulation) createMesh(const Handle(StepVisual_ComplexTriangulatedFace)& theTF) const; + Handle(Poly_Triangulation) createMesh(const Handle(StepVisual_TriangulatedFace)& theTF, + const StepData_Factors& theLocalFactors) const; + Handle(Poly_Triangulation) createMesh(const Handle(StepVisual_ComplexTriangulatedFace)& theTF, + const StepData_Factors& theLocalFactors) const; StepToTopoDS_TranslateFaceError myError; diff --git a/src/StepToTopoDS/StepToTopoDS_TranslatePolyLoop.cxx b/src/StepToTopoDS/StepToTopoDS_TranslatePolyLoop.cxx index 2db5e71008..cbff8bcc25 100644 --- a/src/StepToTopoDS/StepToTopoDS_TranslatePolyLoop.cxx +++ b/src/StepToTopoDS/StepToTopoDS_TranslatePolyLoop.cxx @@ -27,6 +27,7 @@ #include #include #include +#include #include #include #include @@ -55,9 +56,13 @@ StepToTopoDS_TranslatePolyLoop::StepToTopoDS_TranslatePolyLoop() // Purpose : // ============================================================================ -StepToTopoDS_TranslatePolyLoop::StepToTopoDS_TranslatePolyLoop(const Handle(StepShape_PolyLoop)& PL, StepToTopoDS_Tool& T, const Handle(Geom_Surface)& S, const TopoDS_Face& F) +StepToTopoDS_TranslatePolyLoop::StepToTopoDS_TranslatePolyLoop(const Handle(StepShape_PolyLoop)& PL, + StepToTopoDS_Tool& T, + const Handle(Geom_Surface)& S, + const TopoDS_Face& F, + const StepData_Factors& theLocalFactors) { - Init (PL, T, S, F); + Init (PL, T, S, F, theLocalFactors); } // ============================================================================ @@ -65,7 +70,11 @@ StepToTopoDS_TranslatePolyLoop::StepToTopoDS_TranslatePolyLoop(const Handle(Step // Purpose : // ============================================================================ -void StepToTopoDS_TranslatePolyLoop::Init(const Handle(StepShape_PolyLoop)& PL, StepToTopoDS_Tool& aTool, const Handle(Geom_Surface)& GeomSurf, const TopoDS_Face& TopoFace) +void StepToTopoDS_TranslatePolyLoop::Init(const Handle(StepShape_PolyLoop)& PL, + StepToTopoDS_Tool& aTool, + const Handle(Geom_Surface)& GeomSurf, + const TopoDS_Face& TopoFace, + const StepData_Factors& theLocalFactors) { if (!aTool.IsBound(PL)) { BRep_Builder B; @@ -96,7 +105,7 @@ void StepToTopoDS_TranslatePolyLoop::Init(const Handle(StepShape_PolyLoop)& PL, Nb++; Poly->SetValue(Nb, PL->PolygonValue(1)); P1 = Poly->Value(1); - GP1 = StepToGeom::MakeCartesianPoint (P1); + GP1 = StepToGeom::MakeCartesianPoint (P1, theLocalFactors); if (aTool.IsVertexBound(P1)) { V1 = aTool.FindVertex(P1); } @@ -109,7 +118,7 @@ void StepToTopoDS_TranslatePolyLoop::Init(const Handle(StepShape_PolyLoop)& PL, P2 = Poly->Value(i); if (P1 == P2) continue; // peut arriver (KK) CKY 9-DEC-1997 StepToTopoDS_PointPair PP(P1, P2); - GP2 = StepToGeom::MakeCartesianPoint (P2); + GP2 = StepToGeom::MakeCartesianPoint (P2, theLocalFactors); TopoDS_Shape aBoundEdge; Standard_Boolean isbound = aTool.IsEdgeBound(PP); if (!isbound) { diff --git a/src/StepToTopoDS/StepToTopoDS_TranslatePolyLoop.hxx b/src/StepToTopoDS/StepToTopoDS_TranslatePolyLoop.hxx index 779525c6ff..4e02ad30ad 100644 --- a/src/StepToTopoDS/StepToTopoDS_TranslatePolyLoop.hxx +++ b/src/StepToTopoDS/StepToTopoDS_TranslatePolyLoop.hxx @@ -24,6 +24,7 @@ #include #include #include +class StepData_Factors; class StepShape_PolyLoop; class StepToTopoDS_Tool; class Geom_Surface; @@ -40,9 +41,17 @@ public: Standard_EXPORT StepToTopoDS_TranslatePolyLoop(); - Standard_EXPORT StepToTopoDS_TranslatePolyLoop(const Handle(StepShape_PolyLoop)& PL, StepToTopoDS_Tool& T, const Handle(Geom_Surface)& S, const TopoDS_Face& F); + Standard_EXPORT StepToTopoDS_TranslatePolyLoop(const Handle(StepShape_PolyLoop)& PL, + StepToTopoDS_Tool& T, + const Handle(Geom_Surface)& S, + const TopoDS_Face& F, + const StepData_Factors& theLocalFactors); - Standard_EXPORT void Init (const Handle(StepShape_PolyLoop)& PL, StepToTopoDS_Tool& T, const Handle(Geom_Surface)& S, const TopoDS_Face& F); + Standard_EXPORT void Init (const Handle(StepShape_PolyLoop)& PL, + StepToTopoDS_Tool& T, + const Handle(Geom_Surface)& S, + const TopoDS_Face& F, + const StepData_Factors& theLocalFactors); Standard_EXPORT const TopoDS_Shape& Value() const; diff --git a/src/StepToTopoDS/StepToTopoDS_TranslateShell.cxx b/src/StepToTopoDS/StepToTopoDS_TranslateShell.cxx index 95da76d86a..2f94f536d3 100644 --- a/src/StepToTopoDS/StepToTopoDS_TranslateShell.cxx +++ b/src/StepToTopoDS/StepToTopoDS_TranslateShell.cxx @@ -19,6 +19,7 @@ #include #include #include +#include #include #include #include @@ -53,6 +54,7 @@ void StepToTopoDS_TranslateShell::Init (const Handle(StepShape_ConnectedFaceSet)& CFS, StepToTopoDS_Tool& aTool, StepToTopoDS_NMTool& NMTool, + const StepData_Factors& theLocalFactors, const Message_ProgressRange& theProgress) { //bug15697 @@ -84,7 +86,7 @@ void StepToTopoDS_TranslateShell::Init Handle(StepShape_FaceSurface) theFS = Handle(StepShape_FaceSurface)::DownCast(StepFace); if (!theFS.IsNull()) { - myTranFace.Init(theFS, aTool, NMTool); + myTranFace.Init(theFS, aTool, NMTool, theLocalFactors); if (myTranFace.IsDone()) { S = myTranFace.Value(); F = TopoDS::Face(S); @@ -121,6 +123,7 @@ void StepToTopoDS_TranslateShell::Init(const Handle(StepVisual_TessellatedShell) StepToTopoDS_NMTool& theNMTool, const Standard_Boolean theReadTessellatedWhenNoBRepOnly, Standard_Boolean& theHasGeom, + const StepData_Factors& theLocalFactors, const Message_ProgressRange& theProgress) { if (theTSh.IsNull()) @@ -167,7 +170,7 @@ void StepToTopoDS_TranslateShell::Init(const Handle(StepVisual_TessellatedShell) { Handle(StepVisual_TessellatedFace) aTFace = Handle(StepVisual_TessellatedFace)::DownCast(anItem); Standard_Boolean aHasFaceGeom = Standard_False; - aTranTF.Init(aTFace, theTool, theNMTool, theReadTessellatedWhenNoBRepOnly, aHasFaceGeom); + aTranTF.Init(aTFace, theTool, theNMTool, theReadTessellatedWhenNoBRepOnly, aHasFaceGeom, theLocalFactors); if (aTranTF.IsDone()) { if (aNewShell) diff --git a/src/StepToTopoDS/StepToTopoDS_TranslateShell.hxx b/src/StepToTopoDS/StepToTopoDS_TranslateShell.hxx index 53079fa18c..f77232b6a1 100644 --- a/src/StepToTopoDS/StepToTopoDS_TranslateShell.hxx +++ b/src/StepToTopoDS/StepToTopoDS_TranslateShell.hxx @@ -44,6 +44,7 @@ public: Standard_EXPORT void Init (const Handle(StepShape_ConnectedFaceSet)& CFS, StepToTopoDS_Tool& T, StepToTopoDS_NMTool& NMTool, + const StepData_Factors& theLocalFactors, const Message_ProgressRange& theProgress = Message_ProgressRange()); Standard_EXPORT void Init (const Handle(StepVisual_TessellatedShell)& theTSh, @@ -51,6 +52,7 @@ public: StepToTopoDS_NMTool& theNMTool, const Standard_Boolean theReadTessellatedWhenNoBRepOnly, Standard_Boolean& theHasGeom, + const StepData_Factors& theLocalFactors, const Message_ProgressRange& theProgress = Message_ProgressRange()); Standard_EXPORT const TopoDS_Shape& Value() const; diff --git a/src/StepToTopoDS/StepToTopoDS_TranslateSolid.cxx b/src/StepToTopoDS/StepToTopoDS_TranslateSolid.cxx index 1007cc42e4..6686fb8408 100644 --- a/src/StepToTopoDS/StepToTopoDS_TranslateSolid.cxx +++ b/src/StepToTopoDS/StepToTopoDS_TranslateSolid.cxx @@ -14,6 +14,7 @@ #include #include #include +#include #include #include #include @@ -50,6 +51,7 @@ void StepToTopoDS_TranslateSolid::Init(const Handle(StepVisual_TessellatedSolid) StepToTopoDS_NMTool& theNMTool, const Standard_Boolean theReadTessellatedWhenNoBRepOnly, Standard_Boolean& theHasGeom, + const StepData_Factors& theLocalFactors, const Message_ProgressRange& theProgress) { if (theTSo.IsNull()) @@ -95,7 +97,7 @@ void StepToTopoDS_TranslateSolid::Init(const Handle(StepVisual_TessellatedSolid) { Handle(StepVisual_TessellatedFace) aTFace = Handle(StepVisual_TessellatedFace)::DownCast(anItem); Standard_Boolean aHasFaceGeom = Standard_False; - aTranTF.Init(aTFace, theTool, theNMTool, theReadTessellatedWhenNoBRepOnly, aHasFaceGeom); + aTranTF.Init(aTFace, theTool, theNMTool, theReadTessellatedWhenNoBRepOnly, aHasFaceGeom, theLocalFactors); if (aTranTF.IsDone()) { if (aNewSolid) diff --git a/src/StepToTopoDS/StepToTopoDS_TranslateSolid.hxx b/src/StepToTopoDS/StepToTopoDS_TranslateSolid.hxx index 9720d7ec4b..e4f648d475 100644 --- a/src/StepToTopoDS/StepToTopoDS_TranslateSolid.hxx +++ b/src/StepToTopoDS/StepToTopoDS_TranslateSolid.hxx @@ -44,6 +44,7 @@ public: StepToTopoDS_NMTool& theNMTool, const Standard_Boolean theReadTessellatedWhenNoBRepOnly, Standard_Boolean& theHasGeom, + const StepData_Factors& theLocalFactors, const Message_ProgressRange& theProgress = Message_ProgressRange()); Standard_EXPORT const TopoDS_Shape& Value() const; diff --git a/src/StepToTopoDS/StepToTopoDS_TranslateVertex.cxx b/src/StepToTopoDS/StepToTopoDS_TranslateVertex.cxx index 7d8a79aff3..b9ae793360 100644 --- a/src/StepToTopoDS/StepToTopoDS_TranslateVertex.cxx +++ b/src/StepToTopoDS/StepToTopoDS_TranslateVertex.cxx @@ -20,6 +20,7 @@ #include #include #include +#include #include #include #include @@ -49,9 +50,10 @@ StepToTopoDS_TranslateVertex::StepToTopoDS_TranslateVertex() StepToTopoDS_TranslateVertex::StepToTopoDS_TranslateVertex(const Handle(StepShape_Vertex)& V, StepToTopoDS_Tool& T, - StepToTopoDS_NMTool& NMTool) + StepToTopoDS_NMTool& NMTool, + const StepData_Factors& theLocalFactors) { - Init(V, T, NMTool); + Init(V, T, NMTool, theLocalFactors); } // ============================================================================ @@ -61,7 +63,8 @@ StepToTopoDS_TranslateVertex::StepToTopoDS_TranslateVertex(const Handle(StepShap void StepToTopoDS_TranslateVertex::Init(const Handle(StepShape_Vertex)& aVertex, StepToTopoDS_Tool& aTool, - StepToTopoDS_NMTool& NMTool) + StepToTopoDS_NMTool& NMTool, + const StepData_Factors& theLocalFactors) { if (aVertex.IsNull()) { myError = StepToTopoDS_TranslateVertexOther; @@ -94,7 +97,7 @@ void StepToTopoDS_TranslateVertex::Init(const Handle(StepShape_Vertex)& aVertex, const Handle(StepShape_VertexPoint) VP = Handle(StepShape_VertexPoint)::DownCast(aVertex); const Handle(StepGeom_Point) P = VP->VertexGeometry(); const Handle(StepGeom_CartesianPoint) P1 = Handle(StepGeom_CartesianPoint)::DownCast(P); - Handle(Geom_CartesianPoint) P2 = StepToGeom::MakeCartesianPoint (P1); + Handle(Geom_CartesianPoint) P2 = StepToGeom::MakeCartesianPoint (P1, theLocalFactors); BRep_Builder B; TopoDS_Vertex V; B.MakeVertex(V, P2->Pnt(), Precision::Confusion()); //:S4136: preci diff --git a/src/StepToTopoDS/StepToTopoDS_TranslateVertex.hxx b/src/StepToTopoDS/StepToTopoDS_TranslateVertex.hxx index 46b16b6254..f14697c484 100644 --- a/src/StepToTopoDS/StepToTopoDS_TranslateVertex.hxx +++ b/src/StepToTopoDS/StepToTopoDS_TranslateVertex.hxx @@ -24,6 +24,7 @@ #include #include #include +class StepData_Factors; class StepShape_Vertex; class StepToTopoDS_Tool; class StepToTopoDS_NMTool; @@ -39,9 +40,15 @@ public: Standard_EXPORT StepToTopoDS_TranslateVertex(); - Standard_EXPORT StepToTopoDS_TranslateVertex(const Handle(StepShape_Vertex)& V, StepToTopoDS_Tool& T, StepToTopoDS_NMTool& NMTool); + Standard_EXPORT StepToTopoDS_TranslateVertex(const Handle(StepShape_Vertex)& V, + StepToTopoDS_Tool& T, + StepToTopoDS_NMTool& NMTool, + const StepData_Factors& theLocalFactors); - Standard_EXPORT void Init (const Handle(StepShape_Vertex)& V, StepToTopoDS_Tool& T, StepToTopoDS_NMTool& NMTool); + Standard_EXPORT void Init (const Handle(StepShape_Vertex)& V, + StepToTopoDS_Tool& T, + StepToTopoDS_NMTool& NMTool, + const StepData_Factors& theLocalFactors); Standard_EXPORT const TopoDS_Shape& Value() const; diff --git a/src/StepToTopoDS/StepToTopoDS_TranslateVertexLoop.cxx b/src/StepToTopoDS/StepToTopoDS_TranslateVertexLoop.cxx index d13eeea5d0..0a4a1f9a3d 100644 --- a/src/StepToTopoDS/StepToTopoDS_TranslateVertexLoop.cxx +++ b/src/StepToTopoDS/StepToTopoDS_TranslateVertexLoop.cxx @@ -18,6 +18,7 @@ #include #include +#include #include #include #include @@ -48,9 +49,10 @@ StepToTopoDS_TranslateVertexLoop::StepToTopoDS_TranslateVertexLoop() StepToTopoDS_TranslateVertexLoop::StepToTopoDS_TranslateVertexLoop(const Handle(StepShape_VertexLoop)& VL, StepToTopoDS_Tool& T, - StepToTopoDS_NMTool& NMTool) + StepToTopoDS_NMTool& NMTool, + const StepData_Factors& theLocalFactors) { - Init(VL, T, NMTool); + Init(VL, T, NMTool, theLocalFactors); } // ============================================================================ @@ -60,7 +62,8 @@ StepToTopoDS_TranslateVertexLoop::StepToTopoDS_TranslateVertexLoop(const Handle( void StepToTopoDS_TranslateVertexLoop::Init(const Handle(StepShape_VertexLoop)& VL, StepToTopoDS_Tool& aTool, - StepToTopoDS_NMTool& NMTool) + StepToTopoDS_NMTool& NMTool, + const StepData_Factors& theLocalFactors) { // A Vertex Loop shall be mapped onto a Vertex + Edge + Wire; if (!aTool.IsBound(VL)) { @@ -73,7 +76,7 @@ void StepToTopoDS_TranslateVertexLoop::Init(const Handle(StepShape_VertexLoop)& TopoDS_Edge E; TopoDS_Wire W; Vtx = VL->LoopVertex(); - StepToTopoDS_TranslateVertex myTranVtx(Vtx, aTool, NMTool); + StepToTopoDS_TranslateVertex myTranVtx(Vtx, aTool, NMTool, theLocalFactors); if (myTranVtx.IsDone()) { V1 = TopoDS::Vertex(myTranVtx.Value()); V2 = TopoDS::Vertex(myTranVtx.Value()); diff --git a/src/StepToTopoDS/StepToTopoDS_TranslateVertexLoop.hxx b/src/StepToTopoDS/StepToTopoDS_TranslateVertexLoop.hxx index d630c33b5a..cd17991dac 100644 --- a/src/StepToTopoDS/StepToTopoDS_TranslateVertexLoop.hxx +++ b/src/StepToTopoDS/StepToTopoDS_TranslateVertexLoop.hxx @@ -24,6 +24,7 @@ #include #include #include +class StepData_Factors; class StepShape_VertexLoop; class StepToTopoDS_Tool; class StepToTopoDS_NMTool; @@ -39,9 +40,15 @@ public: Standard_EXPORT StepToTopoDS_TranslateVertexLoop(); - Standard_EXPORT StepToTopoDS_TranslateVertexLoop(const Handle(StepShape_VertexLoop)& VL, StepToTopoDS_Tool& T, StepToTopoDS_NMTool& NMTool); + Standard_EXPORT StepToTopoDS_TranslateVertexLoop(const Handle(StepShape_VertexLoop)& VL, + StepToTopoDS_Tool& T, + StepToTopoDS_NMTool& NMTool, + const StepData_Factors& theLocalFactors); - Standard_EXPORT void Init (const Handle(StepShape_VertexLoop)& VL, StepToTopoDS_Tool& T, StepToTopoDS_NMTool& NMTool); + Standard_EXPORT void Init (const Handle(StepShape_VertexLoop)& VL, + StepToTopoDS_Tool& T, + StepToTopoDS_NMTool& NMTool, + const StepData_Factors& theLocalFactors); Standard_EXPORT const TopoDS_Shape& Value() const; diff --git a/src/TopoDSToStep/TopoDSToStep_Builder.cxx b/src/TopoDSToStep/TopoDSToStep_Builder.cxx index 9d189627e5..45fa6dbb4f 100644 --- a/src/TopoDSToStep/TopoDSToStep_Builder.cxx +++ b/src/TopoDSToStep/TopoDSToStep_Builder.cxx @@ -17,6 +17,7 @@ #include #include +#include #include #include #include @@ -54,10 +55,11 @@ TopoDSToStep_Builder::TopoDSToStep_Builder TopoDSToStep_Tool& aTool, const Handle(Transfer_FinderProcess)& FP, const Standard_Integer theTessellatedGeomParam, + const StepData_Factors& theLocalFactors, const Message_ProgressRange& theProgress) { done = Standard_False; - Init(aShape, aTool, FP, theTessellatedGeomParam, theProgress); + Init(aShape, aTool, FP, theTessellatedGeomParam, theLocalFactors, theProgress); } // ============================================================================ @@ -69,6 +71,7 @@ void TopoDSToStep_Builder::Init(const TopoDS_Shape& aShape, TopoDSToStep_Tool& myTool, const Handle(Transfer_FinderProcess)& FP, const Standard_Integer theTessellatedGeomParam, + const StepData_Factors& theLocalFactors, const Message_ProgressRange& theProgress) { @@ -121,7 +124,7 @@ void TopoDSToStep_Builder::Init(const TopoDS_Shape& aShape, { const TopoDS_Face Face = TopoDS::Face(anExp.Current()); - MkFace.Init(Face, myTool, FP); + MkFace.Init(Face, myTool, FP, theLocalFactors); if (MkFace.IsDone()) { FS = Handle(StepShape_FaceSurface)::DownCast(MkFace.Value()); @@ -190,7 +193,7 @@ void TopoDSToStep_Builder::Init(const TopoDS_Shape& aShape, Handle(StepShape_FaceSurface) FS; Handle(StepShape_TopologicalRepresentationItem) Fpms; - TopoDSToStep_MakeStepFace MkFace(Face, myTool, FP); + TopoDSToStep_MakeStepFace MkFace(Face, myTool, FP, theLocalFactors); TopoDSToStep_MakeTessellatedItem MkTessFace; diff --git a/src/TopoDSToStep/TopoDSToStep_Builder.hxx b/src/TopoDSToStep/TopoDSToStep_Builder.hxx index 07d61fa158..cd5123b166 100644 --- a/src/TopoDSToStep/TopoDSToStep_Builder.hxx +++ b/src/TopoDSToStep/TopoDSToStep_Builder.hxx @@ -25,6 +25,7 @@ #include #include +class StepData_Factors; class StepShape_TopologicalRepresentationItem; class StepVisual_TessellatedItem; class TopoDS_Shape; @@ -47,12 +48,14 @@ public: TopoDSToStep_Tool& T, const Handle(Transfer_FinderProcess)& FP, const Standard_Integer theTessellatedGeomParam, + const StepData_Factors& theLocalFactors, const Message_ProgressRange& theProgress = Message_ProgressRange()); Standard_EXPORT void Init (const TopoDS_Shape& S, TopoDSToStep_Tool& T, const Handle(Transfer_FinderProcess)& FP, const Standard_Integer theTessellatedGeomParam, + const StepData_Factors& theLocalFactors, const Message_ProgressRange& theProgress = Message_ProgressRange()); Standard_EXPORT TopoDSToStep_BuilderError Error() const; diff --git a/src/TopoDSToStep/TopoDSToStep_MakeBrepWithVoids.cxx b/src/TopoDSToStep/TopoDSToStep_MakeBrepWithVoids.cxx index fb12faef86..cb4ae8c235 100644 --- a/src/TopoDSToStep/TopoDSToStep_MakeBrepWithVoids.cxx +++ b/src/TopoDSToStep/TopoDSToStep_MakeBrepWithVoids.cxx @@ -20,6 +20,7 @@ #include #include #include +#include #include #include #include @@ -55,6 +56,7 @@ TopoDSToStep_MakeBrepWithVoids:: TopoDSToStep_MakeBrepWithVoids(const TopoDS_Solid& aSolid, const Handle(Transfer_FinderProcess)& FP, + const StepData_Factors& theLocalFactors, const Message_ProgressRange& theProgress) { done = Standard_False; @@ -98,7 +100,7 @@ TopoDSToStep_MakeBrepWithVoids:: //:d7 abv 16 Mar 98: try to treat 'open' shells as closed since flag // IsClosed() is often incorrect (taken from MakeManifoldSolid(Solid)) aTool.Init(aMap, Standard_False); - StepB.Init(CurrentShell, aTool, FP, aWriteTessGeom, aPS.Next()); + StepB.Init(CurrentShell, aTool, FP, aWriteTessGeom, theLocalFactors, aPS.Next()); TopoDSToStep::AddResult(FP, aTool); if (StepB.IsDone()) { diff --git a/src/TopoDSToStep/TopoDSToStep_MakeBrepWithVoids.hxx b/src/TopoDSToStep/TopoDSToStep_MakeBrepWithVoids.hxx index f448417e35..bd317c7409 100644 --- a/src/TopoDSToStep/TopoDSToStep_MakeBrepWithVoids.hxx +++ b/src/TopoDSToStep/TopoDSToStep_MakeBrepWithVoids.hxx @@ -44,6 +44,7 @@ public: Standard_EXPORT TopoDSToStep_MakeBrepWithVoids(const TopoDS_Solid& S, const Handle(Transfer_FinderProcess)& FP, + const StepData_Factors& theLocalFactors, const Message_ProgressRange& theProgress = Message_ProgressRange()); Standard_EXPORT const Handle(StepShape_BrepWithVoids)& Value() const; diff --git a/src/TopoDSToStep/TopoDSToStep_MakeFacetedBrep.cxx b/src/TopoDSToStep/TopoDSToStep_MakeFacetedBrep.cxx index 0315b45c45..a068be1546 100644 --- a/src/TopoDSToStep/TopoDSToStep_MakeFacetedBrep.cxx +++ b/src/TopoDSToStep/TopoDSToStep_MakeFacetedBrep.cxx @@ -19,6 +19,7 @@ #include #include #include +#include #include #include #include @@ -40,6 +41,7 @@ TopoDSToStep_MakeFacetedBrep:: TopoDSToStep_MakeFacetedBrep(const TopoDS_Shell& aShell, const Handle(Transfer_FinderProcess)& FP, + const StepData_Factors& theLocalFactors, const Message_ProgressRange& theProgress) { done = Standard_False; @@ -50,7 +52,7 @@ TopoDSToStep_MakeFacetedBrep:: const Standard_Integer aWriteTessGeom = Interface_Static::IVal("write.step.tessellated"); TopoDSToStep_Tool aTool(aMap, Standard_True); - TopoDSToStep_Builder StepB(aShell, aTool, FP, aWriteTessGeom, theProgress); + TopoDSToStep_Builder StepB(aShell, aTool, FP, aWriteTessGeom, theLocalFactors, theProgress); if (theProgress.UserBreak()) return; TopoDSToStep::AddResult ( FP, aTool ); @@ -89,6 +91,7 @@ TopoDSToStep_MakeFacetedBrep:: TopoDSToStep_MakeFacetedBrep:: TopoDSToStep_MakeFacetedBrep(const TopoDS_Solid& aSolid, const Handle(Transfer_FinderProcess)& FP, + const StepData_Factors& theLocalFactors, const Message_ProgressRange& theProgress) { done = Standard_False; @@ -104,7 +107,7 @@ TopoDSToStep_MakeFacetedBrep:: const Standard_Integer aWriteTessGeom = Interface_Static::IVal("write.step.tessellated"); TopoDSToStep_Tool aTool(aMap, Standard_True); - TopoDSToStep_Builder StepB(aOuterShell, aTool, FP, aWriteTessGeom, theProgress); + TopoDSToStep_Builder StepB(aOuterShell, aTool, FP, aWriteTessGeom, theLocalFactors, theProgress); if (theProgress.UserBreak()) return; TopoDSToStep::AddResult ( FP, aTool ); diff --git a/src/TopoDSToStep/TopoDSToStep_MakeFacetedBrep.hxx b/src/TopoDSToStep/TopoDSToStep_MakeFacetedBrep.hxx index be54dba226..2391b5a55e 100644 --- a/src/TopoDSToStep/TopoDSToStep_MakeFacetedBrep.hxx +++ b/src/TopoDSToStep/TopoDSToStep_MakeFacetedBrep.hxx @@ -24,6 +24,7 @@ #include #include +class StepData_Factors; class StepShape_FacetedBrep; class StepVisual_TessellatedItem; class TopoDS_Shell; @@ -45,10 +46,12 @@ public: Standard_EXPORT TopoDSToStep_MakeFacetedBrep(const TopoDS_Shell& S, const Handle(Transfer_FinderProcess)& FP, + const StepData_Factors& theLocalFactors, const Message_ProgressRange& theProgress = Message_ProgressRange()); Standard_EXPORT TopoDSToStep_MakeFacetedBrep(const TopoDS_Solid& S, const Handle(Transfer_FinderProcess)& FP, + const StepData_Factors& theLocalFactors, const Message_ProgressRange& theProgress = Message_ProgressRange()); Standard_EXPORT const Handle(StepShape_FacetedBrep)& Value() const; diff --git a/src/TopoDSToStep/TopoDSToStep_MakeFacetedBrepAndBrepWithVoids.cxx b/src/TopoDSToStep/TopoDSToStep_MakeFacetedBrepAndBrepWithVoids.cxx index 14b0305607..837fb8e732 100644 --- a/src/TopoDSToStep/TopoDSToStep_MakeFacetedBrepAndBrepWithVoids.cxx +++ b/src/TopoDSToStep/TopoDSToStep_MakeFacetedBrepAndBrepWithVoids.cxx @@ -19,6 +19,7 @@ #include #include #include +#include #include #include #include @@ -47,6 +48,7 @@ TopoDSToStep_MakeFacetedBrepAndBrepWithVoids:: TopoDSToStep_MakeFacetedBrepAndBrepWithVoids(const TopoDS_Solid& aSolid, const Handle(Transfer_FinderProcess)& FP, + const StepData_Factors& theLocalFactors, const Message_ProgressRange& theProgress) { done = Standard_False; @@ -80,7 +82,7 @@ TopoDSToStep_MakeFacetedBrepAndBrepWithVoids:: if (It.Value().Closed()) { aTool.Init(aMap, Standard_False); - StepB.Init(CurrentShell, aTool, FP, Standard_False, aRange); + StepB.Init(CurrentShell, aTool, FP, Standard_False, theLocalFactors, aRange); TopoDSToStep::AddResult(FP, aTool); if (StepB.IsDone()) { diff --git a/src/TopoDSToStep/TopoDSToStep_MakeFacetedBrepAndBrepWithVoids.hxx b/src/TopoDSToStep/TopoDSToStep_MakeFacetedBrepAndBrepWithVoids.hxx index 6360bc0dee..e4c67e1dfe 100644 --- a/src/TopoDSToStep/TopoDSToStep_MakeFacetedBrepAndBrepWithVoids.hxx +++ b/src/TopoDSToStep/TopoDSToStep_MakeFacetedBrepAndBrepWithVoids.hxx @@ -43,6 +43,7 @@ public: Standard_EXPORT TopoDSToStep_MakeFacetedBrepAndBrepWithVoids(const TopoDS_Solid& S, const Handle(Transfer_FinderProcess)& FP, + const StepData_Factors& theLocalFactors, const Message_ProgressRange& theProgress = Message_ProgressRange()); Standard_EXPORT const Handle(StepShape_FacetedBrepAndBrepWithVoids)& Value() const; diff --git a/src/TopoDSToStep/TopoDSToStep_MakeGeometricCurveSet.cxx b/src/TopoDSToStep/TopoDSToStep_MakeGeometricCurveSet.cxx index 9cde3288e5..dd4a7f5b6c 100644 --- a/src/TopoDSToStep/TopoDSToStep_MakeGeometricCurveSet.cxx +++ b/src/TopoDSToStep/TopoDSToStep_MakeGeometricCurveSet.cxx @@ -17,6 +17,7 @@ #include #include +#include #include #include #include @@ -32,13 +33,14 @@ //============================================================================= TopoDSToStep_MakeGeometricCurveSet::TopoDSToStep_MakeGeometricCurveSet( const TopoDS_Shape& aShape, - const Handle(Transfer_FinderProcess)& FP) + const Handle(Transfer_FinderProcess)& FP, + const StepData_Factors& theLocalFactors) { done = Standard_False; Handle(TColStd_HSequenceOfTransient) itemList; MoniTool_DataMapOfShapeTransient aMap; TopoDSToStep_Tool aTool (aMap, Standard_False); - TopoDSToStep_WireframeBuilder wirefB (aShape, aTool, FP); + TopoDSToStep_WireframeBuilder wirefB (aShape, aTool, theLocalFactors); TopoDSToStep::AddResult ( FP, aTool ); Handle(StepShape_GeometricCurveSet) aGCSet = diff --git a/src/TopoDSToStep/TopoDSToStep_MakeGeometricCurveSet.hxx b/src/TopoDSToStep/TopoDSToStep_MakeGeometricCurveSet.hxx index cb52372f9e..a204e82a45 100644 --- a/src/TopoDSToStep/TopoDSToStep_MakeGeometricCurveSet.hxx +++ b/src/TopoDSToStep/TopoDSToStep_MakeGeometricCurveSet.hxx @@ -37,7 +37,9 @@ public: DEFINE_STANDARD_ALLOC - Standard_EXPORT TopoDSToStep_MakeGeometricCurveSet(const TopoDS_Shape& SH, const Handle(Transfer_FinderProcess)& FP); + Standard_EXPORT TopoDSToStep_MakeGeometricCurveSet(const TopoDS_Shape& SH, + const Handle(Transfer_FinderProcess)& FP, + const StepData_Factors& theLocalFactors); Standard_EXPORT const Handle(StepShape_GeometricCurveSet)& Value() const; diff --git a/src/TopoDSToStep/TopoDSToStep_MakeManifoldSolidBrep.cxx b/src/TopoDSToStep/TopoDSToStep_MakeManifoldSolidBrep.cxx index b165a9e067..7a932e38a6 100644 --- a/src/TopoDSToStep/TopoDSToStep_MakeManifoldSolidBrep.cxx +++ b/src/TopoDSToStep/TopoDSToStep_MakeManifoldSolidBrep.cxx @@ -19,6 +19,7 @@ #include #include #include +#include #include #include #include @@ -38,6 +39,7 @@ static std::pair MakeManifoldSolidBrep(const TopoDS_Shell& aShell, const Handle(Transfer_FinderProcess)& FP, + const StepData_Factors& theLocalFactors, const Message_ProgressRange& theProgress) { Handle(StepShape_ManifoldSolidBrep) theManifoldSolidBrep; @@ -48,7 +50,7 @@ MakeManifoldSolidBrep(const TopoDS_Shell& aShell, const Standard_Integer aWriteTessGeom = Interface_Static::IVal("write.step.tessellated"); - TopoDSToStep_Builder StepB(aShell, aTool, FP, aWriteTessGeom, theProgress); + TopoDSToStep_Builder StepB(aShell, aTool, FP, aWriteTessGeom, theLocalFactors, theProgress); if (theProgress.UserBreak()) return std::make_pair(theManifoldSolidBrep, aTessItem); @@ -81,10 +83,11 @@ MakeManifoldSolidBrep(const TopoDS_Shell& aShell, TopoDSToStep_MakeManifoldSolidBrep:: TopoDSToStep_MakeManifoldSolidBrep(const TopoDS_Shell& aShell, const Handle(Transfer_FinderProcess)& FP, + const StepData_Factors& theLocalFactors, const Message_ProgressRange& theProgress) { std::pair - aResult = MakeManifoldSolidBrep(aShell, FP, theProgress); + aResult = MakeManifoldSolidBrep(aShell, FP, theLocalFactors, theProgress); done = !aResult.first.IsNull() || !aResult.second.IsNull(); if (done) { @@ -106,13 +109,14 @@ TopoDSToStep_MakeManifoldSolidBrep:: TopoDSToStep_MakeManifoldSolidBrep:: TopoDSToStep_MakeManifoldSolidBrep(const TopoDS_Solid& aSolid, const Handle(Transfer_FinderProcess)& FP, + const StepData_Factors& theLocalFactors, const Message_ProgressRange& theProgress) { TopoDS_Shell aOuterShell = BRepClass3d::OuterShell(aSolid); if (!aOuterShell.IsNull()) { std::pair - aResult = MakeManifoldSolidBrep(aOuterShell, FP, theProgress); + aResult = MakeManifoldSolidBrep(aOuterShell, FP, theLocalFactors, theProgress); done = !aResult.first.IsNull() || !aResult.second.IsNull(); if (done) { diff --git a/src/TopoDSToStep/TopoDSToStep_MakeManifoldSolidBrep.hxx b/src/TopoDSToStep/TopoDSToStep_MakeManifoldSolidBrep.hxx index cffd949e7f..9edb3c59b0 100644 --- a/src/TopoDSToStep/TopoDSToStep_MakeManifoldSolidBrep.hxx +++ b/src/TopoDSToStep/TopoDSToStep_MakeManifoldSolidBrep.hxx @@ -24,6 +24,7 @@ #include #include +class StepData_Factors; class StepShape_ManifoldSolidBrep; class StepVisual_TessellatedItem; class TopoDS_Shell; @@ -44,10 +45,12 @@ public: Standard_EXPORT TopoDSToStep_MakeManifoldSolidBrep(const TopoDS_Shell& S, const Handle(Transfer_FinderProcess)& FP, + const StepData_Factors& theLocalFactors, const Message_ProgressRange& theProgress = Message_ProgressRange()); Standard_EXPORT TopoDSToStep_MakeManifoldSolidBrep(const TopoDS_Solid& S, const Handle(Transfer_FinderProcess)& FP, + const StepData_Factors& theLocalFactors, const Message_ProgressRange& theProgress = Message_ProgressRange()); Standard_EXPORT const Handle(StepShape_ManifoldSolidBrep)& Value() const; diff --git a/src/TopoDSToStep/TopoDSToStep_MakeShellBasedSurfaceModel.cxx b/src/TopoDSToStep/TopoDSToStep_MakeShellBasedSurfaceModel.cxx index e266905abd..b0bbf78d5e 100644 --- a/src/TopoDSToStep/TopoDSToStep_MakeShellBasedSurfaceModel.cxx +++ b/src/TopoDSToStep/TopoDSToStep_MakeShellBasedSurfaceModel.cxx @@ -19,6 +19,7 @@ #include #include #include +#include #include #include #include @@ -51,6 +52,7 @@ TopoDSToStep_MakeShellBasedSurfaceModel:: TopoDSToStep_MakeShellBasedSurfaceModel(const TopoDS_Face& aFace, const Handle(Transfer_FinderProcess)& FP, + const StepData_Factors& theLocalFactors, const Message_ProgressRange& theProgress) { done = Standard_False; @@ -59,7 +61,7 @@ TopoDSToStep_MakeShellBasedSurfaceModel:: const Standard_Integer aWriteTessGeom = Interface_Static::IVal("write.step.tessellated"); TopoDSToStep_Tool aTool(aMap, Standard_False); - TopoDSToStep_Builder StepB(aFace, aTool, FP, aWriteTessGeom, theProgress); + TopoDSToStep_Builder StepB(aFace, aTool, FP, aWriteTessGeom, theLocalFactors, theProgress); if (theProgress.UserBreak()) return; @@ -106,6 +108,7 @@ TopoDSToStep_MakeShellBasedSurfaceModel:: TopoDSToStep_MakeShellBasedSurfaceModel:: TopoDSToStep_MakeShellBasedSurfaceModel(const TopoDS_Shell& aShell, const Handle(Transfer_FinderProcess)& FP, + const StepData_Factors& theLocalFactors, const Message_ProgressRange& theProgress) { done = Standard_False; @@ -118,7 +121,7 @@ TopoDSToStep_MakeShellBasedSurfaceModel:: const Standard_Integer aWriteTessGeom = Interface_Static::IVal("write.step.tessellated"); TopoDSToStep_Tool aTool(aMap, Standard_False); - TopoDSToStep_Builder StepB(aShell, aTool, FP, aWriteTessGeom, theProgress); + TopoDSToStep_Builder StepB(aShell, aTool, FP, aWriteTessGeom, theLocalFactors, theProgress); if (theProgress.UserBreak()) return; //TopoDSToStep::AddResult ( FP, aTool ); @@ -161,6 +164,7 @@ TopoDSToStep_MakeShellBasedSurfaceModel:: TopoDSToStep_MakeShellBasedSurfaceModel:: TopoDSToStep_MakeShellBasedSurfaceModel(const TopoDS_Solid& aSolid, const Handle(Transfer_FinderProcess)& FP, + const StepData_Factors& theLocalFactors, const Message_ProgressRange& theProgress) { done = Standard_False; @@ -187,7 +191,7 @@ TopoDSToStep_MakeShellBasedSurfaceModel:: aShell = TopoDS::Shell(It.Value()); TopoDSToStep_Tool aTool(aMap, Standard_False); - TopoDSToStep_Builder StepB(aShell, aTool, FP, aWriteTessGeom, aPS.Next()); + TopoDSToStep_Builder StepB(aShell, aTool, FP, aWriteTessGeom, theLocalFactors, aPS.Next()); TopoDSToStep::AddResult ( FP, aTool ); if (StepB.IsDone()) { diff --git a/src/TopoDSToStep/TopoDSToStep_MakeShellBasedSurfaceModel.hxx b/src/TopoDSToStep/TopoDSToStep_MakeShellBasedSurfaceModel.hxx index efbf85ee70..78971c5e76 100644 --- a/src/TopoDSToStep/TopoDSToStep_MakeShellBasedSurfaceModel.hxx +++ b/src/TopoDSToStep/TopoDSToStep_MakeShellBasedSurfaceModel.hxx @@ -45,14 +45,17 @@ public: Standard_EXPORT TopoDSToStep_MakeShellBasedSurfaceModel(const TopoDS_Face& F, const Handle(Transfer_FinderProcess)& FP, + const StepData_Factors& theLocalFactors, const Message_ProgressRange& theProgress = Message_ProgressRange()); Standard_EXPORT TopoDSToStep_MakeShellBasedSurfaceModel(const TopoDS_Shell& S, const Handle(Transfer_FinderProcess)& FP, + const StepData_Factors& theLocalFactors, const Message_ProgressRange& theProgress = Message_ProgressRange()); Standard_EXPORT TopoDSToStep_MakeShellBasedSurfaceModel(const TopoDS_Solid& S, const Handle(Transfer_FinderProcess)& FP, + const StepData_Factors& theLocalFactors, const Message_ProgressRange& theProgress = Message_ProgressRange()); Standard_EXPORT const Handle(StepShape_ShellBasedSurfaceModel)& Value() const; diff --git a/src/TopoDSToStep/TopoDSToStep_MakeStepEdge.cxx b/src/TopoDSToStep/TopoDSToStep_MakeStepEdge.cxx index edf9f1b5f7..d133dce90b 100644 --- a/src/TopoDSToStep/TopoDSToStep_MakeStepEdge.cxx +++ b/src/TopoDSToStep/TopoDSToStep_MakeStepEdge.cxx @@ -29,6 +29,7 @@ #include #include #include +#include #include #include #include @@ -65,10 +66,11 @@ TopoDSToStep_MakeStepEdge::TopoDSToStep_MakeStepEdge() TopoDSToStep_MakeStepEdge::TopoDSToStep_MakeStepEdge (const TopoDS_Edge& E, TopoDSToStep_Tool& T, - const Handle(Transfer_FinderProcess)& FP) + const Handle(Transfer_FinderProcess)& FP, + const StepData_Factors& theLocalFactors) { done = Standard_False; - Init(E, T, FP); + Init(E, T, FP, theLocalFactors); } // ---------------------------------------------------------------------------- @@ -78,7 +80,8 @@ TopoDSToStep_MakeStepEdge::TopoDSToStep_MakeStepEdge void TopoDSToStep_MakeStepEdge::Init(const TopoDS_Edge& aEdge, TopoDSToStep_Tool& aTool, - const Handle(Transfer_FinderProcess)& FP) + const Handle(Transfer_FinderProcess)& FP, + const StepData_Factors& theLocalFactors) { // ------------------------------------------------------------------ // The edge is given with its relative orientation (i.e. in the wire) @@ -152,7 +155,7 @@ void TopoDSToStep_MakeStepEdge::Init(const TopoDS_Edge& aEdge, TopoDSToStep_MakeStepVertex MkVertex; - MkVertex.Init(Vfirst, aTool, FP); + MkVertex.Init(Vfirst, aTool, FP, theLocalFactors); if (MkVertex.IsDone()) V1 = Handle(StepShape_Vertex)::DownCast(MkVertex.Value()); else { @@ -164,7 +167,7 @@ void TopoDSToStep_MakeStepEdge::Init(const TopoDS_Edge& aEdge, return; } - MkVertex.Init(Vlast, aTool, FP); + MkVertex.Init(Vlast, aTool, FP, theLocalFactors); if (MkVertex.IsDone()) V2 = Handle(StepShape_Vertex)::DownCast(MkVertex.Value()); else { @@ -245,7 +248,7 @@ void TopoDSToStep_MakeStepEdge::Init(const TopoDS_Edge& aEdge, } - GeomToStep_MakeCurve MkCurve(C); + GeomToStep_MakeCurve MkCurve(C, theLocalFactors); Gpms = MkCurve.Value(); } else { @@ -264,7 +267,7 @@ void TopoDSToStep_MakeStepEdge::Init(const TopoDS_Edge& aEdge, gp_Vec V = gp_Vec( CA.Value(U1), CA.Value(U2) ); Handle(Geom_Line) L = new Geom_Line(CA.Value(U1), gp_Dir(V)); - GeomToStep_MakeLine MkLine(L); + GeomToStep_MakeLine MkLine(L, theLocalFactors); Gpms = MkLine.Value(); } else { @@ -288,7 +291,7 @@ void TopoDSToStep_MakeStepEdge::Init(const TopoDS_Edge& aEdge, Mult.SetValue(Nbpt,2); Handle(Geom_Curve) Bs = new Geom_BSplineCurve(Points, Knots, Mult, 1); - GeomToStep_MakeCurve MkCurve(Bs); + GeomToStep_MakeCurve MkCurve(Bs, theLocalFactors); Gpms = MkCurve.Value(); } } diff --git a/src/TopoDSToStep/TopoDSToStep_MakeStepEdge.hxx b/src/TopoDSToStep/TopoDSToStep_MakeStepEdge.hxx index a9a30f25d7..5b8b2aadc3 100644 --- a/src/TopoDSToStep/TopoDSToStep_MakeStepEdge.hxx +++ b/src/TopoDSToStep/TopoDSToStep_MakeStepEdge.hxx @@ -23,6 +23,7 @@ #include #include +class StepData_Factors; class StepShape_TopologicalRepresentationItem; class TopoDS_Edge; class TopoDSToStep_Tool; @@ -41,9 +42,15 @@ public: Standard_EXPORT TopoDSToStep_MakeStepEdge(); - Standard_EXPORT TopoDSToStep_MakeStepEdge(const TopoDS_Edge& E, TopoDSToStep_Tool& T, const Handle(Transfer_FinderProcess)& FP); + Standard_EXPORT TopoDSToStep_MakeStepEdge(const TopoDS_Edge& E, + TopoDSToStep_Tool& T, + const Handle(Transfer_FinderProcess)& FP, + const StepData_Factors& theLocalFactors); - Standard_EXPORT void Init (const TopoDS_Edge& E, TopoDSToStep_Tool& T, const Handle(Transfer_FinderProcess)& FP); + Standard_EXPORT void Init (const TopoDS_Edge& E, + TopoDSToStep_Tool& T, + const Handle(Transfer_FinderProcess)& FP, + const StepData_Factors& theLocalFactors); Standard_EXPORT const Handle(StepShape_TopologicalRepresentationItem)& Value() const; diff --git a/src/TopoDSToStep/TopoDSToStep_MakeStepFace.cxx b/src/TopoDSToStep/TopoDSToStep_MakeStepFace.cxx index 00c4c5475d..a85b26016d 100644 --- a/src/TopoDSToStep/TopoDSToStep_MakeStepFace.cxx +++ b/src/TopoDSToStep/TopoDSToStep_MakeStepFace.cxx @@ -47,7 +47,7 @@ #include #include #include -#include +#include #include #include #include @@ -87,10 +87,11 @@ TopoDSToStep_MakeStepFace::TopoDSToStep_MakeStepFace() TopoDSToStep_MakeStepFace::TopoDSToStep_MakeStepFace (const TopoDS_Face& F, TopoDSToStep_Tool& T, - const Handle(Transfer_FinderProcess)& FP) + const Handle(Transfer_FinderProcess)& FP, + const StepData_Factors& theLocalFactors) { done = Standard_False; - Init(F, T, FP); + Init(F, T, FP, theLocalFactors); } // ---------------------------------------------------------------------------- @@ -98,9 +99,10 @@ TopoDSToStep_MakeStepFace::TopoDSToStep_MakeStepFace // Purpose : // ---------------------------------------------------------------------------- -void TopoDSToStep_MakeStepFace::Init(const TopoDS_Face& aFace, - TopoDSToStep_Tool& aTool, - const Handle(Transfer_FinderProcess)& FP) +void TopoDSToStep_MakeStepFace::Init(const TopoDS_Face& aFace, + TopoDSToStep_Tool& aTool, + const Handle(Transfer_FinderProcess)& FP, + const StepData_Factors& theLocalFactors) { // -------------------------------------------------------------- // the face is given with its relative orientation (in the Shell) @@ -205,7 +207,7 @@ void TopoDSToStep_MakeStepFace::Init(const TopoDS_Face& aFace, //Standard_Boolean ReverseSurfaceOrientation = Standard_False; //szv#4:S4163:12Mar99 unused aTool.SetSurfaceReversed(Standard_False); - GeomToStep_MakeSurface MkSurface(Su); + GeomToStep_MakeSurface MkSurface(Su, theLocalFactors); Handle(StepGeom_Surface) Spms = MkSurface.Value(); //%pdn 30 Nov 98: TestRally 9 issue on r1001_ec.stp: @@ -257,12 +259,12 @@ void TopoDSToStep_MakeStepFace::Init(const TopoDS_Face& aFace, if (aSurfaceIsOffset) { anOffsetSu->SetBasisSurface(Rev); - GeomToStep_MakeSurface MkRev(anOffsetSu); + GeomToStep_MakeSurface MkRev(anOffsetSu, theLocalFactors); Spms = MkRev.Value(); } else { - GeomToStep_MakeSurface MkRev(Rev); + GeomToStep_MakeSurface MkRev(Rev, theLocalFactors); Spms = MkRev.Value(); } } @@ -292,7 +294,7 @@ void TopoDSToStep_MakeStepFace::Init(const TopoDS_Face& aFace, //const TopoDS_Wire ForwardWire = TopoDS::Wire(ssh); //MkWire.Init(ForwardWire, aTool, FP); - MkWire.Init(CurrentWire, aTool, FP); + MkWire.Init(CurrentWire, aTool, FP, theLocalFactors); if (MkWire.IsDone()) Loop = Handle(StepShape_Loop)::DownCast(MkWire.Value()); else { #ifdef OCCT_DEBUG @@ -402,15 +404,15 @@ void TopoDSToStep_MakeStepFace::Init(const TopoDS_Face& aFace, Handle(Geom_RectangularTrimmedSurface) alocalRTS = Handle(Geom_RectangularTrimmedSurface)::DownCast(Su); C2dMapped = GeomConvert_Units::RadianToDegree(C2d, alocalRTS->BasisSurface(), - StepData_GlobalFactors::Intance().LengthFactor(), StepData_GlobalFactors::Intance().FactorRadianDegree()); + theLocalFactors.LengthFactor(), theLocalFactors.FactorRadianDegree()); } else { C2dMapped = GeomConvert_Units::RadianToDegree(C2d, Su, - StepData_GlobalFactors::Intance().LengthFactor(), StepData_GlobalFactors::Intance().FactorRadianDegree()); + theLocalFactors.LengthFactor(), theLocalFactors.FactorRadianDegree()); } // // C2dMapped = C2d; // cky : en remplacement de ce qui precede - GeomToStep_MakeCurve MkCurve(C2dMapped); + GeomToStep_MakeCurve MkCurve(C2dMapped, theLocalFactors); // -------------------- // Translate the Pcurve diff --git a/src/TopoDSToStep/TopoDSToStep_MakeStepFace.hxx b/src/TopoDSToStep/TopoDSToStep_MakeStepFace.hxx index a0612f329b..9a3a8c9e17 100644 --- a/src/TopoDSToStep/TopoDSToStep_MakeStepFace.hxx +++ b/src/TopoDSToStep/TopoDSToStep_MakeStepFace.hxx @@ -23,6 +23,7 @@ #include #include +class StepData_Factors; class StepShape_TopologicalRepresentationItem; class TopoDS_Face; class TopoDSToStep_Tool; @@ -41,9 +42,15 @@ public: Standard_EXPORT TopoDSToStep_MakeStepFace(); - Standard_EXPORT TopoDSToStep_MakeStepFace(const TopoDS_Face& F, TopoDSToStep_Tool& T, const Handle(Transfer_FinderProcess)& FP); + Standard_EXPORT TopoDSToStep_MakeStepFace(const TopoDS_Face& F, + TopoDSToStep_Tool& T, + const Handle(Transfer_FinderProcess)& FP, + const StepData_Factors& theLocalFactors); - Standard_EXPORT void Init (const TopoDS_Face& F, TopoDSToStep_Tool& T, const Handle(Transfer_FinderProcess)& FP); + Standard_EXPORT void Init (const TopoDS_Face& F, + TopoDSToStep_Tool& T, + const Handle(Transfer_FinderProcess)& FP, + const StepData_Factors& theLocalFactors); Standard_EXPORT const Handle(StepShape_TopologicalRepresentationItem)& Value() const; diff --git a/src/TopoDSToStep/TopoDSToStep_MakeStepVertex.cxx b/src/TopoDSToStep/TopoDSToStep_MakeStepVertex.cxx index 0acd883c3a..95fb9561de 100644 --- a/src/TopoDSToStep/TopoDSToStep_MakeStepVertex.cxx +++ b/src/TopoDSToStep/TopoDSToStep_MakeStepVertex.cxx @@ -20,6 +20,7 @@ #include #include #include +#include #include #include #include @@ -42,10 +43,11 @@ TopoDSToStep_MakeStepVertex::TopoDSToStep_MakeStepVertex() TopoDSToStep_MakeStepVertex::TopoDSToStep_MakeStepVertex (const TopoDS_Vertex& V, TopoDSToStep_Tool& T, - const Handle(Transfer_FinderProcess)& FP) + const Handle(Transfer_FinderProcess)& FP, + const StepData_Factors& theLocalFactors) { done = Standard_False; - Init(V, T, FP); + Init(V, T, FP, theLocalFactors); } // ---------------------------------------------------------------------------- @@ -55,7 +57,8 @@ TopoDSToStep_MakeStepVertex::TopoDSToStep_MakeStepVertex void TopoDSToStep_MakeStepVertex::Init(const TopoDS_Vertex& aVertex, TopoDSToStep_Tool& aTool, - const Handle(Transfer_FinderProcess)& FP) + const Handle(Transfer_FinderProcess)& FP, + const StepData_Factors& theLocalFactors) { aTool.SetCurrentVertex(aVertex); @@ -85,7 +88,7 @@ void TopoDSToStep_MakeStepVertex::Init(const TopoDS_Vertex& aVertex, gp_Pnt P; P = BRep_Tool::Pnt(aVertex); - GeomToStep_MakeCartesianPoint MkPoint(P); + GeomToStep_MakeCartesianPoint MkPoint(P, theLocalFactors.LengthFactor()); Handle(StepGeom_CartesianPoint) Gpms = MkPoint.Value(); Handle(StepShape_VertexPoint) Vpms = new StepShape_VertexPoint(); diff --git a/src/TopoDSToStep/TopoDSToStep_MakeStepVertex.hxx b/src/TopoDSToStep/TopoDSToStep_MakeStepVertex.hxx index 1105da6309..08152b0f87 100644 --- a/src/TopoDSToStep/TopoDSToStep_MakeStepVertex.hxx +++ b/src/TopoDSToStep/TopoDSToStep_MakeStepVertex.hxx @@ -41,9 +41,15 @@ public: Standard_EXPORT TopoDSToStep_MakeStepVertex(); - Standard_EXPORT TopoDSToStep_MakeStepVertex(const TopoDS_Vertex& V, TopoDSToStep_Tool& T, const Handle(Transfer_FinderProcess)& FP); + Standard_EXPORT TopoDSToStep_MakeStepVertex(const TopoDS_Vertex& V, + TopoDSToStep_Tool& T, + const Handle(Transfer_FinderProcess)& FP, + const StepData_Factors& theLocalFactors); - Standard_EXPORT void Init (const TopoDS_Vertex& V, TopoDSToStep_Tool& T, const Handle(Transfer_FinderProcess)& FP); + Standard_EXPORT void Init (const TopoDS_Vertex& V, + TopoDSToStep_Tool& T, + const Handle(Transfer_FinderProcess)& FP, + const StepData_Factors& theLocalFactors); Standard_EXPORT const Handle(StepShape_TopologicalRepresentationItem)& Value() const; diff --git a/src/TopoDSToStep/TopoDSToStep_MakeStepWire.cxx b/src/TopoDSToStep/TopoDSToStep_MakeStepWire.cxx index 252fc3a0e4..20a000c175 100644 --- a/src/TopoDSToStep/TopoDSToStep_MakeStepWire.cxx +++ b/src/TopoDSToStep/TopoDSToStep_MakeStepWire.cxx @@ -23,6 +23,7 @@ #include #include #include +#include #include #include #include @@ -54,10 +55,11 @@ TopoDSToStep_MakeStepWire::TopoDSToStep_MakeStepWire() TopoDSToStep_MakeStepWire::TopoDSToStep_MakeStepWire (const TopoDS_Wire& W, TopoDSToStep_Tool& T, - const Handle(Transfer_FinderProcess)& FP) + const Handle(Transfer_FinderProcess)& FP, + const StepData_Factors& theLocalFactors) { done = Standard_False; - Init(W, T, FP); + Init(W, T, FP, theLocalFactors); } @@ -68,7 +70,8 @@ TopoDSToStep_MakeStepWire::TopoDSToStep_MakeStepWire void TopoDSToStep_MakeStepWire::Init (const TopoDS_Wire& aWire, TopoDSToStep_Tool& aTool, - const Handle(Transfer_FinderProcess)& FP) + const Handle(Transfer_FinderProcess)& FP, + const StepData_Factors& theLocalFactors) { // ---------------------------------------------------------------- // The Wire is given in its relative orientation (i.e. in the face) @@ -118,7 +121,7 @@ void TopoDSToStep_MakeStepWire::Init (const TopoDS_Wire& aWire, TopExp::Vertices (CurrentEdge, TopoDSVertex2, TopoDSVertex1); } - MkVertex.Init (TopoDSVertex1, aTool, FP); + MkVertex.Init (TopoDSVertex1, aTool, FP, theLocalFactors); if (MkVertex.IsDone()) { VertexPoint = Handle(StepShape_VertexPoint)::DownCast (MkVertex.Value()); @@ -221,7 +224,7 @@ void TopoDSToStep_MakeStepWire::Init (const TopoDS_Wire& aWire, // make vertex_loop ShapeAnalysis_Edge sae; TopoDS_Vertex V = sae.FirstVertex (anExtWire2->Edge (1)); - TopoDSToStep_MakeStepVertex mkV (V, aTool, FP); + TopoDSToStep_MakeStepVertex mkV (V, aTool, FP, theLocalFactors); Handle(StepShape_VertexLoop) vloop = new StepShape_VertexLoop; Handle(TCollection_HAsciiString) name = new TCollection_HAsciiString (""); vloop->Init (name, Handle(StepShape_Vertex)::DownCast (mkV.Value())); @@ -250,7 +253,7 @@ void TopoDSToStep_MakeStepWire::Init (const TopoDS_Wire& aWire, } else { - MkEdge.Init (anEdge, aTool, FP); + MkEdge.Init (anEdge, aTool, FP, theLocalFactors); if (MkEdge.IsDone()) { OrientedEdge = new StepShape_OrientedEdge(); diff --git a/src/TopoDSToStep/TopoDSToStep_MakeStepWire.hxx b/src/TopoDSToStep/TopoDSToStep_MakeStepWire.hxx index 1f33cbaee7..2a59599b00 100644 --- a/src/TopoDSToStep/TopoDSToStep_MakeStepWire.hxx +++ b/src/TopoDSToStep/TopoDSToStep_MakeStepWire.hxx @@ -41,9 +41,15 @@ public: Standard_EXPORT TopoDSToStep_MakeStepWire(); - Standard_EXPORT TopoDSToStep_MakeStepWire(const TopoDS_Wire& W, TopoDSToStep_Tool& T, const Handle(Transfer_FinderProcess)& FP); + Standard_EXPORT TopoDSToStep_MakeStepWire(const TopoDS_Wire& W, + TopoDSToStep_Tool& T, + const Handle(Transfer_FinderProcess)& FP, + const StepData_Factors& theLocalFactors); - Standard_EXPORT void Init (const TopoDS_Wire& W, TopoDSToStep_Tool& T, const Handle(Transfer_FinderProcess)& FP); + Standard_EXPORT void Init (const TopoDS_Wire& W, + TopoDSToStep_Tool& T, + const Handle(Transfer_FinderProcess)& FP, + const StepData_Factors& theLocalFactors); Standard_EXPORT const Handle(StepShape_TopologicalRepresentationItem)& Value() const; diff --git a/src/TopoDSToStep/TopoDSToStep_WireframeBuilder.cxx b/src/TopoDSToStep/TopoDSToStep_WireframeBuilder.cxx index e21537d1d1..18741dcc9f 100644 --- a/src/TopoDSToStep/TopoDSToStep_WireframeBuilder.cxx +++ b/src/TopoDSToStep/TopoDSToStep_WireframeBuilder.cxx @@ -35,6 +35,7 @@ #include #include #include +#include #include #include #include @@ -66,18 +67,22 @@ TopoDSToStep_WireframeBuilder::TopoDSToStep_WireframeBuilder() // Purpose : // ============================================================================ - TopoDSToStep_WireframeBuilder::TopoDSToStep_WireframeBuilder(const TopoDS_Shape& aShape, TopoDSToStep_Tool& aTool, const Handle(Transfer_FinderProcess)& FP) + TopoDSToStep_WireframeBuilder::TopoDSToStep_WireframeBuilder(const TopoDS_Shape& aShape, + TopoDSToStep_Tool& aTool, + const StepData_Factors& theLocalFactors) { done = Standard_False; - Init(aShape, aTool, FP); + Init(aShape, aTool, theLocalFactors); } -void TopoDSToStep_WireframeBuilder::Init(const TopoDS_Shape& aShape, TopoDSToStep_Tool& /* T */, const Handle(Transfer_FinderProcess)& /* FP */) +void TopoDSToStep_WireframeBuilder::Init(const TopoDS_Shape& aShape, + TopoDSToStep_Tool& /* T */, + const StepData_Factors& theLocalFactors) { Handle(TColStd_HSequenceOfTransient) itemList = new TColStd_HSequenceOfTransient(); MoniTool_DataMapOfShapeTransient aPmsMap; - done = GetTrimmedCurveFromShape(aShape, aPmsMap, itemList); + done = GetTrimmedCurveFromShape(aShape, aPmsMap, itemList, theLocalFactors); myResult = itemList; } @@ -141,7 +146,8 @@ Standard_Boolean TopoDSToStep_WireframeBuilder:: GetTrimmedCurveFromEdge(const TopoDS_Edge& theEdge, const TopoDS_Face& theFace, MoniTool_DataMapOfShapeTransient& theMap, - Handle(TColStd_HSequenceOfTransient)& theCurveList) const + Handle(TColStd_HSequenceOfTransient)& theCurveList, + const StepData_Factors& theLocalFactors) const { if (theEdge.Orientation() == TopAbs_INTERNAL || theEdge.Orientation() == TopAbs_EXTERNAL ) @@ -183,14 +189,14 @@ Standard_Boolean TopoDSToStep_WireframeBuilder:: { aVFirst = aVertex; // 1.point for trimming - GeomToStep_MakeCartesianPoint aGTSMCP(aGpP); + GeomToStep_MakeCartesianPoint aGTSMCP(aGpP, theLocalFactors.LengthFactor()); aSGCP1 = aGTSMCP.Value(); } if (aVertex.Orientation() == TopAbs_REVERSED) { aVLast = aVertex; // 2.point for trimming - GeomToStep_MakeCartesianPoint aGTSMCP(aGpP); + GeomToStep_MakeCartesianPoint aGTSMCP(aGpP, theLocalFactors.LengthFactor()); aSGCP2 = aGTSMCP.Value(); } } @@ -204,7 +210,7 @@ Standard_Boolean TopoDSToStep_WireframeBuilder:: { aC = Handle(Geom_TrimmedCurve)::DownCast(aC)->BasisCurve(); } - GeomToStep_MakeCurve aGTSMC(aC); + GeomToStep_MakeCurve aGTSMC(aC, theLocalFactors); if (!aGTSMC.IsDone()) { return Standard_False; @@ -217,7 +223,7 @@ Standard_Boolean TopoDSToStep_WireframeBuilder:: if (aVFirst.IsNull() && aVLast.IsNull() && Precision::IsInfinite(aFirst) && Precision::IsInfinite(aLast)) { - GeomToStep_MakeCurve aCurveMaker(aC); + GeomToStep_MakeCurve aCurveMaker(aC, theLocalFactors); if (aCurveMaker.IsDone()) { aSGC = aCurveMaker.Value(); @@ -228,12 +234,12 @@ Standard_Boolean TopoDSToStep_WireframeBuilder:: } if (aVFirst.IsNull()) { - GeomToStep_MakeCartesianPoint aGTSMCP(aCA.Value(aFirst)); + GeomToStep_MakeCartesianPoint aGTSMCP(aCA.Value(aFirst), theLocalFactors.LengthFactor()); aSGCP1 = aGTSMCP.Value(); } if (aVLast.IsNull()) { - GeomToStep_MakeCartesianPoint aGTSMCP(aCA.Value(aLast)); + GeomToStep_MakeCartesianPoint aGTSMCP(aCA.Value(aLast), theLocalFactors.LengthFactor()); aSGCP2 = aGTSMCP.Value(); } @@ -276,7 +282,7 @@ Standard_Boolean TopoDSToStep_WireframeBuilder:: if (aLength >= Precision::Confusion()) { Handle(Geom_Line) aL = new Geom_Line(aPnt1, gp_Dir(aV)); - GeomToStep_MakeLine aGTSML(aL); + GeomToStep_MakeLine aGTSML(aL, theLocalFactors); aSGC = aGTSML.Value(); aSGC = MakeTrimmedCurve(aGTSML.Value(), aSGCP1, aSGCP2, 0, aLength, Standard_True); } @@ -304,7 +310,7 @@ Standard_Boolean TopoDSToStep_WireframeBuilder:: aMult.SetValue(1, 2); aMult.SetValue(Nbpt, 2); Handle(Geom_Curve) aBSCurve = new Geom_BSplineCurve(aPoints, aKnots, aMult, 1); - GeomToStep_MakeCurve aGTSMC(aBSCurve); + GeomToStep_MakeCurve aGTSMC(aBSCurve, theLocalFactors); aSGC = aGTSMC.Value(); } } @@ -322,8 +328,9 @@ Standard_Boolean TopoDSToStep_WireframeBuilder:: Standard_Boolean TopoDSToStep_WireframeBuilder:: GetTrimmedCurveFromFace(const TopoDS_Face& aFace, - MoniTool_DataMapOfShapeTransient& aMap, - Handle(TColStd_HSequenceOfTransient)& aCurveList) const + MoniTool_DataMapOfShapeTransient& aMap, + Handle(TColStd_HSequenceOfTransient)& aCurveList, + const StepData_Factors& theLocalFactors) const { TopoDS_Shape curShape; TopoDS_Edge curEdge; @@ -333,15 +340,16 @@ Standard_Boolean TopoDSToStep_WireframeBuilder:: for (exp.Init(aFace,TopAbs_EDGE); exp.More(); exp.Next()){ curShape = exp.Current(); curEdge = TopoDS::Edge(curShape); - if (GetTrimmedCurveFromEdge(curEdge, aFace, aMap, aCurveList)) result = Standard_True; + if (GetTrimmedCurveFromEdge(curEdge, aFace, aMap, aCurveList, theLocalFactors)) result = Standard_True; } return result; } Standard_Boolean TopoDSToStep_WireframeBuilder:: GetTrimmedCurveFromShape(const TopoDS_Shape& aShape, - MoniTool_DataMapOfShapeTransient& aMap, - Handle(TColStd_HSequenceOfTransient)& aCurveList) const + MoniTool_DataMapOfShapeTransient& aMap, + Handle(TColStd_HSequenceOfTransient)& aCurveList, + const StepData_Factors& theLocalFactors) const { TopoDS_Iterator It; Standard_Boolean result = Standard_False; //szv#4:S4163:12Mar99 `done` hid one from this, initialisation needed @@ -351,7 +359,7 @@ Standard_Boolean TopoDSToStep_WireframeBuilder:: case TopAbs_EDGE : { const TopoDS_Edge& curEdge = TopoDS::Edge(aShape); TopoDS_Face nulFace; - result = GetTrimmedCurveFromEdge(curEdge, nulFace, aMap, aCurveList); + result = GetTrimmedCurveFromEdge(curEdge, nulFace, aMap, aCurveList, theLocalFactors); break; } case TopAbs_WIRE : { @@ -363,13 +371,13 @@ Standard_Boolean TopoDSToStep_WireframeBuilder:: for (exp.Init(aShape,TopAbs_EDGE); exp.More(); exp.Next()){ curShape = exp.Current(); curEdge = TopoDS::Edge(curShape); - if (GetTrimmedCurveFromEdge(curEdge, nulFace, aMap, aCurveList)) result = Standard_True; + if (GetTrimmedCurveFromEdge(curEdge, nulFace, aMap, aCurveList, theLocalFactors)) result = Standard_True; } break; } case TopAbs_FACE : { const TopoDS_Face& curFace = TopoDS::Face(aShape); - result = GetTrimmedCurveFromFace(curFace, aMap, aCurveList); + result = GetTrimmedCurveFromFace(curFace, aMap, aCurveList, theLocalFactors); break; } case TopAbs_SHELL : { @@ -377,7 +385,7 @@ Standard_Boolean TopoDSToStep_WireframeBuilder:: It.Initialize(Sh); for (;It.More();It.Next()) { TopoDS_Face curFace = TopoDS::Face(It.Value()); - if (GetTrimmedCurveFromFace(curFace, aMap, aCurveList)) result = Standard_True; + if (GetTrimmedCurveFromFace(curFace, aMap, aCurveList, theLocalFactors)) result = Standard_True; #ifdef OCCT_DEBUG if(!result) { std::cout << "ERROR extracting trimmedCurve from Face" << std::endl; @@ -391,7 +399,7 @@ Standard_Boolean TopoDSToStep_WireframeBuilder:: It.Initialize(aShape); for (;It.More();It.Next()) { if (It.Value().ShapeType() == TopAbs_SHELL) { - if (GetTrimmedCurveFromShape(It.Value(), aMap, aCurveList)) result = Standard_True; + if (GetTrimmedCurveFromShape(It.Value(), aMap, aCurveList, theLocalFactors)) result = Standard_True; } } break; @@ -408,7 +416,7 @@ Standard_Boolean TopoDSToStep_WireframeBuilder:: result = GetTrimmedCurveFromFace(TopoDS::Face(It.Value()), aMap, aCurveList); break; } */ - if (GetTrimmedCurveFromShape(It.Value(), aMap, aCurveList)) result = Standard_True; + if (GetTrimmedCurveFromShape(It.Value(), aMap, aCurveList, theLocalFactors)) result = Standard_True; } break; } diff --git a/src/TopoDSToStep/TopoDSToStep_WireframeBuilder.hxx b/src/TopoDSToStep/TopoDSToStep_WireframeBuilder.hxx index 8f3f0dbbc5..16936a2ae1 100644 --- a/src/TopoDSToStep/TopoDSToStep_WireframeBuilder.hxx +++ b/src/TopoDSToStep/TopoDSToStep_WireframeBuilder.hxx @@ -25,6 +25,7 @@ #include #include #include +class StepData_Factors; class TopoDS_Shape; class TopoDSToStep_Tool; class Transfer_FinderProcess; @@ -43,9 +44,13 @@ public: Standard_EXPORT TopoDSToStep_WireframeBuilder(); - Standard_EXPORT TopoDSToStep_WireframeBuilder(const TopoDS_Shape& S, TopoDSToStep_Tool& T, const Handle(Transfer_FinderProcess)& FP); + Standard_EXPORT TopoDSToStep_WireframeBuilder(const TopoDS_Shape& S, + TopoDSToStep_Tool& T, + const StepData_Factors& theLocalFactors); - Standard_EXPORT void Init (const TopoDS_Shape& S, TopoDSToStep_Tool& T, const Handle(Transfer_FinderProcess)& FP); + Standard_EXPORT void Init (const TopoDS_Shape& S, + TopoDSToStep_Tool& T, + const StepData_Factors& theLocalFactors); Standard_EXPORT TopoDSToStep_BuilderError Error() const; @@ -53,15 +58,25 @@ public: //! Extraction of Trimmed Curves from TopoDS_Edge for the //! Creation of a GeometricallyBoundedWireframeRepresentation - Standard_EXPORT Standard_Boolean GetTrimmedCurveFromEdge (const TopoDS_Edge& E, const TopoDS_Face& F, MoniTool_DataMapOfShapeTransient& M, Handle(TColStd_HSequenceOfTransient)& L) const; + Standard_EXPORT Standard_Boolean GetTrimmedCurveFromEdge (const TopoDS_Edge& E, + const TopoDS_Face& F, + MoniTool_DataMapOfShapeTransient& M, + Handle(TColStd_HSequenceOfTransient)& L, + const StepData_Factors& theLocalFactors) const; //! Extraction of Trimmed Curves from TopoDS_Face for the //! Creation of a GeometricallyBoundedWireframeRepresentation - Standard_EXPORT Standard_Boolean GetTrimmedCurveFromFace (const TopoDS_Face& F, MoniTool_DataMapOfShapeTransient& M, Handle(TColStd_HSequenceOfTransient)& L) const; + Standard_EXPORT Standard_Boolean GetTrimmedCurveFromFace (const TopoDS_Face& F, + MoniTool_DataMapOfShapeTransient& M, + Handle(TColStd_HSequenceOfTransient)& L, + const StepData_Factors& theLocalFactors) const; //! Extraction of Trimmed Curves from any TopoDS_Shape for the //! Creation of a GeometricallyBoundedWireframeRepresentation - Standard_EXPORT Standard_Boolean GetTrimmedCurveFromShape (const TopoDS_Shape& S, MoniTool_DataMapOfShapeTransient& M, Handle(TColStd_HSequenceOfTransient)& L) const; + Standard_EXPORT Standard_Boolean GetTrimmedCurveFromShape (const TopoDS_Shape& S, + MoniTool_DataMapOfShapeTransient& M, + Handle(TColStd_HSequenceOfTransient)& L, + const StepData_Factors& theLocalFactors) const; diff --git a/src/XSDRAWSTEP/XSDRAWSTEP.cxx b/src/XSDRAWSTEP/XSDRAWSTEP.cxx index 7ceff7987b..d03c769784 100644 --- a/src/XSDRAWSTEP/XSDRAWSTEP.cxx +++ b/src/XSDRAWSTEP/XSDRAWSTEP.cxx @@ -30,6 +30,7 @@ #include #include #include +#include #include #include #include @@ -332,7 +333,8 @@ static Standard_Integer steptrans (Draw_Interpretor& di, Standard_Integer argc, if (n2 > 0) ax2 = Handle(StepGeom_Axis2Placement3d)::DownCast (XSDRAW::Entity(n2)); StepToTopoDS_MakeTransformed mktrans; - if (mktrans.Compute (ax1,ax2)) { + StepData_Factors aLocalFactors; + if (mktrans.Compute (ax1,ax2, aLocalFactors)) { TopLoc_Location loc (mktrans.Transformation()); shape.Move (loc); // mktrans.Transform (shape); From 06f2625c35e9a8897ad4989835fab40da23529b5 Mon Sep 17 00:00:00 2001 From: ichesnok Date: Mon, 24 Jul 2023 09:43:30 +0100 Subject: [PATCH 505/639] 0033426: Data Exchange, VRML - Impossible to import VRML V1 VrmlData_ShapeNode creating (for vrml v1 case) was added --- src/VrmlData/VrmlData_Group.cxx | 111 ++++++++++++++++- src/VrmlData/VrmlData_Material.cxx | 193 ++++++++++++++++++++--------- src/VrmlData/VrmlData_Material.hxx | 15 +++ src/VrmlData/VrmlData_Scene.cxx | 6 +- tests/bugs/stlvrml/bug33426 | 7 ++ 5 files changed, 270 insertions(+), 62 deletions(-) create mode 100644 tests/bugs/stlvrml/bug33426 diff --git a/src/VrmlData/VrmlData_Group.cxx b/src/VrmlData/VrmlData_Group.cxx index 3af1d8c706..27b10e54c2 100644 --- a/src/VrmlData/VrmlData_Group.cxx +++ b/src/VrmlData/VrmlData_Group.cxx @@ -13,11 +13,16 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. +#include +#include #include +#include +#include #include #include #include #include +#include #include #include #include @@ -206,8 +211,8 @@ VrmlData_ErrorStatus VrmlData_Group::Read (VrmlData_InBuffer& theBuffer) TCollection_AsciiString aDummy; aStatus = Scene().ReadWord (theBuffer, aDummy); } - else if (VRMLDATA_LCOMPARE (theBuffer.LinePtr, "Separator") || - VRMLDATA_LCOMPARE (theBuffer.LinePtr, "Switch")) { + else if (VRMLDATA_LCOMPARE (theBuffer.LinePtr, "Switch")) + { Standard_Boolean isBracketed (Standard_False); // Read the opening bracket for the list of children if (!OK(aStatus, VrmlData_Scene::ReadLine(theBuffer))) @@ -238,7 +243,99 @@ VrmlData_ErrorStatus VrmlData_Group::Read (VrmlData_InBuffer& theBuffer) break; } } - else if (VRMLDATA_LCOMPARE (theBuffer.LinePtr, "ShapeHints")) { + else if (VRMLDATA_LCOMPARE(theBuffer.LinePtr, "TransformSeparator") || + VRMLDATA_LCOMPARE(theBuffer.LinePtr, "Separator")) + { + Handle(VrmlData_Group) aGroupNode = new VrmlData_Group(Scene(), ""); + Standard_Boolean isBracketed(Standard_False); + // Read the opening bracket for the list of children + if (!OK(aStatus, VrmlData_Scene::ReadLine(theBuffer))) + break; + + if (theBuffer.LinePtr[0] == '{') { + theBuffer.LinePtr++; + if (!OK(aStatus, VrmlData_Scene::ReadLine(theBuffer))) + break; + isBracketed = Standard_True; + } + + // Read the child nodes + Handle(VrmlData_Node) aChildNode; + while (OK(aStatus, VrmlData_Scene::ReadLine(theBuffer))) { + // read the end-of-list bracket + if (isBracketed && theBuffer.LinePtr[0] == '}') { + theBuffer.LinePtr++; + break; + } + // otherwise read a node + if (!OK(aStatus, ReadNode(theBuffer, aChildNode))) + break; + + aGroupNode->AddNode(aChildNode); + if (isBracketed == Standard_False) + break; + } + + Handle(VrmlData_Coordinate) aCoord; + Handle(VrmlData_IndexedFaceSet) anIndFaceSet; + Handle(VrmlData_IndexedLineSet) anIndLineSet; + Handle(VrmlData_Appearance) anAppearance; + for (VrmlData_ListOfNode::Iterator anIt = aGroupNode->NodeIterator(); anIt.More(); anIt.Next()) + { + Handle(VrmlData_Node) aNode = anIt.Value(); + if (aNode.IsNull()) + continue; + + if (anIt.Value()->IsKind(STANDARD_TYPE(VrmlData_Coordinate))) + { + aCoord = Handle(VrmlData_Coordinate)::DownCast(anIt.Value()); + } + else if (anIt.Value()->IsKind(STANDARD_TYPE(VrmlData_IndexedFaceSet))) + { + anIndFaceSet = Handle(VrmlData_IndexedFaceSet)::DownCast(anIt.Value()); + if (!aCoord.IsNull()) + { + anIndFaceSet->SetCoordinates(aCoord); + } + } + else if (anIt.Value()->IsKind(STANDARD_TYPE(VrmlData_IndexedLineSet))) + { + anIndLineSet = Handle(VrmlData_IndexedLineSet)::DownCast(anIt.Value()); + if (!aCoord.IsNull()) + { + anIndLineSet->SetCoordinates(aCoord); + } + } + else if (anIt.Value()->IsKind(STANDARD_TYPE(VrmlData_Material))) + { + Handle(VrmlData_Material) aMaterial = Handle(VrmlData_Material)::DownCast(anIt.Value()); + anAppearance = new VrmlData_Appearance(); + anAppearance->SetMaterial(aMaterial); + } + } + + if (!aCoord.IsNull()) + { + Handle(VrmlData_ShapeNode) aShapeNode = new VrmlData_ShapeNode(Scene(), ""); + if (!anIndFaceSet.IsNull()) + { + aShapeNode->SetGeometry(anIndFaceSet); + } + else if (!anIndLineSet.IsNull()) + { + aShapeNode->SetGeometry(anIndLineSet); + } + if (!anAppearance.IsNull()) + { + aShapeNode->SetAppearance(anAppearance); + } + aGroupNode->AddNode(aShapeNode); + } + + AddNode(aGroupNode); + } + else if (VRMLDATA_LCOMPARE (theBuffer.LinePtr, "ShapeHints") || + VRMLDATA_LCOMPARE (theBuffer.LinePtr, "DirectionalLight")) { // Skip this tag if (!OK(aStatus, VrmlData_Scene::ReadLine(theBuffer))) break; @@ -305,6 +402,14 @@ VrmlData_ErrorStatus VrmlData_Group::Read (VrmlData_InBuffer& theBuffer) aStatus = VrmlData_VrmlFormatError; break; } + else if (VRMLDATA_LCOMPARE(theBuffer.LinePtr, "DEF")) + { + TCollection_AsciiString aWord; + if (OK(aStatus, VrmlData_Scene::ReadWord(theBuffer, aWord))) + { + setName(aWord.ToCString()); + } + } else if (VRMLDATA_LCOMPARE (theBuffer.LinePtr, "url")) { NCollection_List lstURL; if (OK(aStatus, ReadMultiString (theBuffer, lstURL))) { diff --git a/src/VrmlData/VrmlData_Material.cxx b/src/VrmlData/VrmlData_Material.cxx index 7361efc9a5..c3644f56fd 100644 --- a/src/VrmlData/VrmlData_Material.cxx +++ b/src/VrmlData/VrmlData_Material.cxx @@ -26,6 +26,109 @@ IMPLEMENT_STANDARD_RTTIEXT(VrmlData_Material,VrmlData_Node) #pragma warning (disable:4996) #endif +namespace +{ + static const Standard_Real THE_MAT_PREC = 0.001 * Precision::Confusion(); + + //======================================================================= + //function : isValidValue + //purpose : + //======================================================================= + static bool isValidValue(Standard_Real theVal) + { + return theVal >= -THE_MAT_PREC && theVal <= 1.0 + THE_MAT_PREC; + } + + //======================================================================= + //function : isValidColor + //purpose : + //======================================================================= + static bool isValidColor(const gp_XYZ & theVec3) + { + return isValidValue(theVec3.X()) && isValidValue(theVec3.Y()) && isValidValue(theVec3.Z()); + } + + //======================================================================= + //function : parseColor + //purpose : + //======================================================================= + static bool parseColor(VrmlData_ErrorStatus & theStatus, + VrmlData_InBuffer & theBuffer, + gp_XYZ & theColor, + const VrmlData_Scene & theScene) + { + if (!VrmlData_Node::OK(theStatus, VrmlData_Scene::ReadLine(theBuffer))) + { + return false; + } + + bool isArray = *theBuffer.LinePtr == '['; + if (isArray) + { + ++theBuffer.LinePtr; + } + theStatus = theScene.ReadXYZ(theBuffer, theColor, Standard_False, Standard_False); + if (isArray) + { + if (VrmlData_Node::OK(theStatus, VrmlData_Scene::ReadLine(theBuffer)) + && *theBuffer.LinePtr == ']') + { + ++theBuffer.LinePtr; + } + else + { + theStatus = VrmlData_VrmlFormatError; + } + } + if (!isValidColor(theColor)) + { + theStatus = VrmlData_IrrelevantNumber; + return false; + } + return true; + } + + //======================================================================= + //function : parseScalar + //purpose : + //======================================================================= + static bool parseScalar(VrmlData_ErrorStatus & theStatus, + VrmlData_InBuffer & theBuffer, + Standard_Real & theValue, + const VrmlData_Scene & theScene) + { + if (!VrmlData_Node::OK(theStatus, VrmlData_Scene::ReadLine(theBuffer))) + { + return false; + } + + bool isArray = *theBuffer.LinePtr == '['; + if (isArray) + { + ++theBuffer.LinePtr; + } + + theStatus = theScene.ReadReal(theBuffer, theValue, Standard_False, Standard_False); + if (isArray) + { + if (VrmlData_Node::OK(theStatus, VrmlData_Scene::ReadLine(theBuffer)) + && *theBuffer.LinePtr == ']') + { + ++theBuffer.LinePtr; + } + else + { + theStatus = VrmlData_VrmlFormatError; + } + } + if (!isValidValue(theValue)) + { + theStatus = VrmlData_IrrelevantNumber; + return false; + } + return true; + } +} //======================================================================= //function : VrmlData_Material() @@ -36,6 +139,7 @@ VrmlData_Material::VrmlData_Material () : myAmbientIntensity (0.2), myShininess (0.2), myTransparency (0.), + myAmbientColor(0., 0., 0., Quantity_TOC_RGB), myDiffuseColor (0.8, 0.8, 0.8, Quantity_TOC_sRGB), myEmissiveColor (Quantity_NOC_BLACK), mySpecularColor (Quantity_NOC_BLACK) @@ -55,6 +159,7 @@ VrmlData_Material::VrmlData_Material (const VrmlData_Scene& theScene, myAmbientIntensity (theAmbientIntens < 0. ? 0.2 : theAmbientIntens), myShininess (theShininess < 0. ? 0.2 : theShininess), myTransparency (theTransparency < 0 ? 0. : theTransparency), + myAmbientColor (0., 0., 0., Quantity_TOC_RGB), myDiffuseColor (0.8, 0.8, 0.8, Quantity_TOC_sRGB), myEmissiveColor (Quantity_NOC_BLACK), mySpecularColor (Quantity_NOC_BLACK) @@ -79,6 +184,7 @@ Handle(VrmlData_Node) VrmlData_Material::Clone aResult->SetAmbientIntensity (myAmbientIntensity); aResult->SetShininess (myShininess); aResult->SetTransparency (myTransparency); + aResult->SetAmbientColor (myAmbientColor); aResult->SetDiffuseColor (myDiffuseColor); aResult->SetEmissiveColor (myEmissiveColor); aResult->SetSpecularColor (mySpecularColor); @@ -93,66 +199,37 @@ Handle(VrmlData_Node) VrmlData_Material::Clone VrmlData_ErrorStatus VrmlData_Material::Read (VrmlData_InBuffer& theBuffer) { VrmlData_ErrorStatus aStatus; - const Standard_Real aConf = 0.001 * Precision::Confusion(); Standard_Real anIntensity[3] = { 0.2, 0.2, 0. }; - gp_XYZ aColor[3] = { + gp_XYZ aColor[4] = { + gp_XYZ (0.0, 0.0, 0.0), gp_XYZ (0.8, 0.8, 0.8), gp_XYZ (0.0, 0.0, 0.0), gp_XYZ (0.0, 0.0, 0.0) }; while (OK(aStatus, VrmlData_Scene::ReadLine(theBuffer))) { - if (VRMLDATA_LCOMPARE (theBuffer.LinePtr, "ambientIntensity")) { - if (OK(aStatus, Scene().ReadReal (theBuffer, anIntensity[0], - Standard_False, Standard_False))) - if (anIntensity[0] < -aConf || anIntensity[0] > 1.+aConf) { - aStatus = VrmlData_IrrelevantNumber; - break; - } - } else if (VRMLDATA_LCOMPARE (theBuffer.LinePtr, "shininess")) { - if (OK(aStatus, Scene().ReadReal (theBuffer, anIntensity[1], - Standard_False, Standard_False))) - if (anIntensity[1] < -aConf || anIntensity[1] > 1.+aConf) { - aStatus = VrmlData_IrrelevantNumber; - break; - } - } else if (VRMLDATA_LCOMPARE (theBuffer.LinePtr, "transparency")) { - if (OK(aStatus, Scene().ReadReal (theBuffer, anIntensity[2], - Standard_False, Standard_False))) - if (anIntensity[2] < -aConf || anIntensity[2] > 1.+aConf) { - aStatus = VrmlData_IrrelevantNumber; - break; - } - } else if (VRMLDATA_LCOMPARE (theBuffer.LinePtr, "diffuseColor")) { - if (OK(aStatus, Scene().ReadXYZ (theBuffer, aColor[0], - Standard_False, Standard_False))) - if (aColor[0].X() < -aConf || aColor[0].X() > 1.+aConf || - aColor[0].Y() < -aConf || aColor[0].Y() > 1.+aConf || - aColor[0].Z() < -aConf || aColor[0].Z() > 1.+aConf) - { - aStatus = VrmlData_IrrelevantNumber; - break; - } - } else if (VRMLDATA_LCOMPARE (theBuffer.LinePtr, "emissiveColor")) { - if (OK(aStatus, Scene().ReadXYZ (theBuffer, aColor[1], - Standard_False, Standard_False))) - if (aColor[1].X() < -aConf || aColor[1].X() > 1.+aConf || - aColor[1].Y() < -aConf || aColor[1].Y() > 1.+aConf || - aColor[1].Z() < -aConf || aColor[1].Z() > 1.+aConf) - { - aStatus = VrmlData_IrrelevantNumber; - break; - } - } else if (VRMLDATA_LCOMPARE (theBuffer.LinePtr, "specularColor")) { - if (OK(aStatus, Scene().ReadXYZ (theBuffer, aColor[2], - Standard_False, Standard_False))) - if (aColor[2].X() < -aConf || aColor[2].X() > 1.+aConf || - aColor[2].Y() < -aConf || aColor[2].Y() > 1.+aConf || - aColor[2].Z() < -aConf || aColor[2].Z() > 1.+aConf) - { - aStatus = VrmlData_IrrelevantNumber; - break; - } - } else + if (VRMLDATA_LCOMPARE (theBuffer.LinePtr, "ambientIntensity")) + { + parseScalar(aStatus, theBuffer, anIntensity[0], Scene()); + } + else if (VRMLDATA_LCOMPARE (theBuffer.LinePtr, "shininess")) { + parseScalar(aStatus, theBuffer, anIntensity[1], Scene()); + } + else if (VRMLDATA_LCOMPARE (theBuffer.LinePtr, "transparency")) { + parseScalar(aStatus, theBuffer, anIntensity[2], Scene()); + } + else if (VRMLDATA_LCOMPARE(theBuffer.LinePtr, "ambientColor")) { + parseColor(aStatus, theBuffer, aColor[0], Scene()); + } + else if (VRMLDATA_LCOMPARE (theBuffer.LinePtr, "diffuseColor")) { + parseColor(aStatus, theBuffer, aColor[1], Scene()); + } + else if (VRMLDATA_LCOMPARE (theBuffer.LinePtr, "emissiveColor")) { + parseColor(aStatus, theBuffer, aColor[2], Scene()); + } + else if (VRMLDATA_LCOMPARE (theBuffer.LinePtr, "specularColor")) { + parseColor(aStatus, theBuffer, aColor[3], Scene()); + } + else break; if (!OK(aStatus)) @@ -168,11 +245,13 @@ VrmlData_ErrorStatus VrmlData_Material::Read (VrmlData_InBuffer& theBuffer) myAmbientIntensity = anIntensity[0]; myShininess = anIntensity[1]; myTransparency = anIntensity[2]; - myDiffuseColor.SetValues (aColor[0].X(), aColor[0].Y(), aColor[0].Z(), + myAmbientColor.SetValues (aColor[0].X(), aColor[0].Y(), aColor[0].Z(), + Quantity_TOC_sRGB); + myDiffuseColor.SetValues (aColor[1].X(), aColor[1].Y(), aColor[1].Z(), Quantity_TOC_sRGB); - myEmissiveColor.SetValues (aColor[1].X(), aColor[1].Y(), aColor[1].Z(), + myEmissiveColor.SetValues (aColor[2].X(), aColor[2].Y(), aColor[2].Z(), Quantity_TOC_sRGB); - mySpecularColor.SetValues (aColor[2].X(), aColor[2].Y(), aColor[2].Z(), + mySpecularColor.SetValues (aColor[3].X(), aColor[3].Y(), aColor[3].Z(), Quantity_TOC_sRGB); } return aStatus; diff --git a/src/VrmlData/VrmlData_Material.hxx b/src/VrmlData/VrmlData_Material.hxx index a2002e860c..15044a67c5 100644 --- a/src/VrmlData/VrmlData_Material.hxx +++ b/src/VrmlData/VrmlData_Material.hxx @@ -60,6 +60,12 @@ class VrmlData_Material : public VrmlData_Node inline Standard_Real Transparency () const { return myTransparency; } + /** + * Query the Ambient color + */ + inline const Quantity_Color& + AmbientColor () const { return myAmbientColor; } + /** * Query the Diffuse color */ @@ -97,6 +103,14 @@ class VrmlData_Material : public VrmlData_Node inline void SetTransparency (const Standard_Real theTransparency) { myTransparency = theTransparency; } + /** + * Query the Ambient color + */ + inline void SetAmbientColor (const Quantity_Color& theColor) + { + myAmbientColor = theColor; + } + /** * Query the Diffuse color */ @@ -150,6 +164,7 @@ class VrmlData_Material : public VrmlData_Node Standard_Real myAmbientIntensity; Standard_Real myShininess; Standard_Real myTransparency; + Quantity_Color myAmbientColor; Quantity_Color myDiffuseColor; Quantity_Color myEmissiveColor; Quantity_Color mySpecularColor; diff --git a/src/VrmlData/VrmlData_Scene.cxx b/src/VrmlData/VrmlData_Scene.cxx index 44562e3438..538a35c76e 100644 --- a/src/VrmlData/VrmlData_Scene.cxx +++ b/src/VrmlData/VrmlData_Scene.cxx @@ -13,7 +13,6 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -#include #include #include #include @@ -46,6 +45,8 @@ #pragma warning (disable:4996) #endif +#define VRMLDATA_LCOMPARE_SKIP(aa, bb) (strncmp (aa, bb, sizeof(bb)-1) == 0) + static void dumpNode (Standard_OStream& theStream, const Handle(VrmlData_Node)& theNode, const TCollection_AsciiString& theIndent); @@ -508,7 +509,8 @@ VrmlData_ErrorStatus VrmlData_Scene::createNode // create the new node if (VRMLDATA_LCOMPARE(theBuffer.LinePtr, "Appearance")) aNode = new VrmlData_Appearance (* this, strName); - else if (VRMLDATA_LCOMPARE(theBuffer.LinePtr, "Shape")) + else if (!VRMLDATA_LCOMPARE_SKIP(theBuffer.LinePtr, "ShapeHints") + && VRMLDATA_LCOMPARE(theBuffer.LinePtr, "Shape")) aNode = new VrmlData_ShapeNode (* this, strName); else if (VRMLDATA_LCOMPARE(theBuffer.LinePtr, "Box")) aNode = new VrmlData_Box (* this, strName); diff --git a/tests/bugs/stlvrml/bug33426 b/tests/bugs/stlvrml/bug33426 new file mode 100644 index 0000000000..14fcd2cbc7 --- /dev/null +++ b/tests/bugs/stlvrml/bug33426 @@ -0,0 +1,7 @@ +puts "========" +puts "0033426: Data Exchange, VRML - Impossible to import VRML V1" +puts "========" +puts "" + +loadvrml sh [locate_data_file bug33426.vrml] +checknbshapes sh -vertex 0 -edge 6 -wire 6 -face 1 -shell 0 -solid 0 -compsolid 0 -compound 5 -shape 18 From 2b5ee7c79135738bc0583d5ad1add210138ef4f1 Mon Sep 17 00:00:00 2001 From: anv Date: Fri, 15 Sep 2023 06:15:34 +0100 Subject: [PATCH 506/639] 0033484: Data Exchange, Step Import - Pretessellated geometry is translated incompletely Added proper translation for TessellatedCurveSet and ComplexTriangulatedSurfaceSet. --- ...Visual_RWComplexTriangulatedSurfaceSet.cxx | 35 ++- .../STEPCAFControl_GDTProperty.cxx | 8 +- src/STEPCAFControl/STEPCAFControl_Reader.cxx | 248 ++++++++++++++---- src/STEPCAFControl/STEPCAFControl_Writer.cxx | 4 + ...epVisual_ComplexTriangulatedSurfaceSet.cxx | 16 +- ...epVisual_ComplexTriangulatedSurfaceSet.hxx | 18 +- tests/bugs/step/bug31685_1 | 4 +- tests/gdt/presentation/C2 | 16 ++ tests/gdt/presentation/end | 38 ++- 9 files changed, 290 insertions(+), 97 deletions(-) create mode 100644 tests/gdt/presentation/C2 diff --git a/src/RWStepVisual/RWStepVisual_RWComplexTriangulatedSurfaceSet.cxx b/src/RWStepVisual/RWStepVisual_RWComplexTriangulatedSurfaceSet.cxx index e8a80734b9..0bd832d90a 100644 --- a/src/RWStepVisual/RWStepVisual_RWComplexTriangulatedSurfaceSet.cxx +++ b/src/RWStepVisual/RWStepVisual_RWComplexTriangulatedSurfaceSet.cxx @@ -27,6 +27,7 @@ #include #include #include +#include //======================================================================= //function : RWStepVisual_RWComplexTriangulatedSurfaceSet @@ -106,15 +107,16 @@ void RWStepVisual_RWComplexTriangulatedSurfaceSet::ReadStep( } } - Handle(TColStd_HArray2OfInteger) aTriangleStrips; + Handle(TColStd_HArray1OfTransient) aTriangleStrips; Standard_Integer sub6 = 0; if (theData->ReadSubList(theNum, 6, "triangle_strips", theCheck, sub6)) { Standard_Integer nb0 = theData->NbParams(sub6); - Standard_Integer nbj0 = theData->NbParams(theData->ParamNumber(sub6,1)); - aTriangleStrips = new TColStd_HArray2OfInteger(1, nb0, 1, nbj0); + aTriangleStrips = new TColStd_HArray1OfTransient(1, nb0); for (Standard_Integer i0 = 1; i0 <= nb0; i0++) { + Standard_Integer nbj0 = theData->NbParams(theData->ParamNumber(sub6, i0)); + Handle(TColStd_HArray1OfInteger) aSingleTriangleStrip = new TColStd_HArray1OfInteger(1, nbj0); Standard_Integer subj6 = 0; if ( theData->ReadSubList (sub6, i0, "sub-part(triangle_strips)", theCheck, subj6) ) { Standard_Integer num4 = subj6; @@ -122,21 +124,23 @@ void RWStepVisual_RWComplexTriangulatedSurfaceSet::ReadStep( { Standard_Integer anIt0; theData->ReadInteger(num4, j0, "integer", theCheck, anIt0); - aTriangleStrips->SetValue(i0,j0, anIt0); + aSingleTriangleStrip->SetValue(j0, anIt0); } + aTriangleStrips->SetValue(i0, aSingleTriangleStrip); } } } - Handle(TColStd_HArray2OfInteger) aTriangleFans; + Handle(TColStd_HArray1OfTransient) aTriangleFans; Standard_Integer sub7 = 0; if (theData->ReadSubList(theNum, 7, "triangle_fans", theCheck, sub7)) { Standard_Integer nb0 = theData->NbParams(sub7); - Standard_Integer nbj0 = theData->NbParams(theData->ParamNumber(sub7,1)); - aTriangleFans = new TColStd_HArray2OfInteger(1, nb0, 1, nbj0); + aTriangleFans = new TColStd_HArray1OfTransient(1, nb0); for (Standard_Integer i0 = 1; i0 <= nb0; i0++) { + Standard_Integer nbj0 = theData->NbParams(theData->ParamNumber(sub7, i0)); + Handle(TColStd_HArray1OfInteger) aSingleTriangleFan = new TColStd_HArray1OfInteger(1, nbj0); Standard_Integer subj7 = 0; if ( theData->ReadSubList (sub7, i0, "sub-part(triangle_fans)", theCheck, subj7) ) { Standard_Integer num4 = subj7; @@ -144,8 +148,9 @@ void RWStepVisual_RWComplexTriangulatedSurfaceSet::ReadStep( { Standard_Integer anIt0; theData->ReadInteger(num4, j0, "integer", theCheck, anIt0); - aTriangleFans->SetValue(i0,j0, anIt0); + aSingleTriangleFan->SetValue(j0, anIt0); } + aTriangleFans->SetValue(i0, aSingleTriangleFan); } } } @@ -199,13 +204,14 @@ void RWStepVisual_RWComplexTriangulatedSurfaceSet::WriteStep( theSW.CloseSub(); theSW.OpenSub(); - for (Standard_Integer i5 = 1; i5 <= theEnt->TriangleStrips()->RowLength(); i5++) + for (Standard_Integer i5 = 1; i5 <= theEnt->NbTriangleStrips(); i5++) { theSW.NewLine(Standard_False); theSW.OpenSub(); - for (Standard_Integer j5 = 1; j5 <= theEnt->TriangleStrips()->ColLength(); j5++) + Handle(TColStd_HArray1OfInteger) aTriangleStrip = Handle(TColStd_HArray1OfInteger)::DownCast(theEnt->TriangleStrips()->Value(i5)); + for (Standard_Integer j5 = 1; j5 <= aTriangleStrip->Length(); j5++) { - Standard_Integer Var0 = theEnt->TriangleStrips()->Value(i5,j5); + Standard_Integer Var0 = aTriangleStrip->Value(j5); theSW.Send(Var0); } theSW.CloseSub(); @@ -213,13 +219,14 @@ void RWStepVisual_RWComplexTriangulatedSurfaceSet::WriteStep( theSW.CloseSub(); theSW.OpenSub(); - for (Standard_Integer i6 = 1; i6 <= theEnt->TriangleFans()->RowLength(); i6++) + for (Standard_Integer i6 = 1; i6 <= theEnt->NbTriangleFans(); i6++) { theSW.NewLine(Standard_False); theSW.OpenSub(); - for (Standard_Integer j6 = 1; j6 <= theEnt->TriangleFans()->ColLength(); j6++) + Handle(TColStd_HArray1OfInteger) aTriangleFan = Handle(TColStd_HArray1OfInteger)::DownCast(theEnt->TriangleFans()->Value(i6)); + for (Standard_Integer j6 = 1; j6 <= aTriangleFan->Length(); j6++) { - Standard_Integer Var0 = theEnt->TriangleFans()->Value(i6,j6); + Standard_Integer Var0 = aTriangleFan->Value(j6); theSW.Send(Var0); } theSW.CloseSub(); diff --git a/src/STEPCAFControl/STEPCAFControl_GDTProperty.cxx b/src/STEPCAFControl/STEPCAFControl_GDTProperty.cxx index 3117ca72b6..ba81e4bd98 100644 --- a/src/STEPCAFControl/STEPCAFControl_GDTProperty.cxx +++ b/src/STEPCAFControl/STEPCAFControl_GDTProperty.cxx @@ -1309,6 +1309,7 @@ Handle(TCollection_HAsciiString) STEPCAFControl_GDTProperty::GetTolValueType(con //======================================================================= Handle(StepVisual_TessellatedGeometricSet) STEPCAFControl_GDTProperty::GetTessellation(const TopoDS_Shape& theShape) { + Handle(StepVisual_TessellatedGeometricSet) aGeomSet; // Build coordinate list and curves NCollection_Handle aCurves = new StepVisual_VectorOfHSequenceOfInteger; NCollection_Vector aCoords; @@ -1342,6 +1343,11 @@ Handle(StepVisual_TessellatedGeometricSet) STEPCAFControl_GDTProperty::GetTessel aCurves->Append(aCurve); } + if (!aCoords.Length()) + { + return aGeomSet; + } + Handle(TColgp_HArray1OfXYZ) aPoints = new TColgp_HArray1OfXYZ(1, aCoords.Length()); for (Standard_Integer i = 1; i <= aPoints->Length(); i++) { aPoints->SetValue(i, aCoords.Value(i - 1)); @@ -1353,7 +1359,7 @@ Handle(StepVisual_TessellatedGeometricSet) STEPCAFControl_GDTProperty::GetTessel aCurveSet->Init(new TCollection_HAsciiString(), aCoordList, aCurves); NCollection_Handle aTessItems = new StepVisual_Array1OfTessellatedItem(1, 1); aTessItems->SetValue(1, aCurveSet); - Handle(StepVisual_TessellatedGeometricSet) aGeomSet = new StepVisual_TessellatedGeometricSet(); + aGeomSet = new StepVisual_TessellatedGeometricSet(); aGeomSet->Init(new TCollection_HAsciiString(), aTessItems); return aGeomSet; } diff --git a/src/STEPCAFControl/STEPCAFControl_Reader.cxx b/src/STEPCAFControl/STEPCAFControl_Reader.cxx index 3b843cb506..d9c48b2693 100644 --- a/src/STEPCAFControl/STEPCAFControl_Reader.cxx +++ b/src/STEPCAFControl/STEPCAFControl_Reader.cxx @@ -219,6 +219,7 @@ #include #include #include +#include #include #include #include @@ -1935,28 +1936,145 @@ static Standard_Boolean GetMassConversionFactor(Handle(StepBasic_NamedUnit)& NU, return Standard_True; } +// ============================================================================ +// Method : createMesh +// Purpose : creates a Poly_Triangulation from ComplexTriangulatedSurfaceSet +// ============================================================================ + +Handle(Poly_Triangulation) createMesh(const Handle(StepVisual_ComplexTriangulatedSurfaceSet)& theTriangulatedSufaceSet, + const Standard_Real theFact) +{ + Handle(StepVisual_CoordinatesList) aCoords = theTriangulatedSufaceSet->Coordinates(); + Handle(TColgp_HArray1OfXYZ) aNodes = aCoords->Points(); + Handle(TColStd_HArray1OfTransient) aTriaStrips = theTriangulatedSufaceSet->TriangleStrips(); + Handle(TColStd_HArray1OfTransient) aTriaFans = theTriangulatedSufaceSet->TriangleFans(); + const Standard_Boolean aHasUVNodes = Standard_False; + const Standard_Integer aNbNormals = theTriangulatedSufaceSet->NbNormals(); + // Number of pairs (Point, Normal). It is possible for one point to have multiple normals. This is + // useful when the underlying surface is not C1 continuous. + const Standard_Integer aNbPairs = aNbNormals > 1 ? theTriangulatedSufaceSet->NbPnindex() : aNodes->Length(); + const Standard_Boolean aHasNormals = aNbNormals > 0; + + // Counting number of triangles in the triangle strips list. + // A triangle strip is a list of 3 or more points defining a set of connected triangles. + Standard_Integer aNbTriaStrips = 0; + for (Standard_Integer i = 1; i <= theTriangulatedSufaceSet->NbTriangleStrips(); ++i) + { + Handle(TColStd_HArray1OfInteger) aTriangleStrip = Handle(TColStd_HArray1OfInteger)::DownCast(aTriaStrips->Value(i)); + aNbTriaStrips += aTriangleStrip->Length() - 2; + } + + // Counting number of triangles in the triangle fans list. + // A triangle fan is a set of 3 or more points defining a set of connected triangles sharing a common vertex. + Standard_Integer aNbTriaFans = 0; + for (Standard_Integer i = 1; i <= theTriangulatedSufaceSet->NbTriangleFans(); ++i) + { + Handle(TColStd_HArray1OfInteger) aTriangleFan = Handle(TColStd_HArray1OfInteger)::DownCast(aTriaFans->Value(i)); + aNbTriaFans += aTriangleFan->Length() - 2; + } + + Handle(Poly_Triangulation) aMesh = new Poly_Triangulation(aNbPairs, aNbTriaStrips + aNbTriaFans, aHasUVNodes, aHasNormals); + + for (Standard_Integer j = 1; j <= aNbPairs; ++j) + { + const gp_XYZ& aPoint = aNodes->Value(aNbNormals > 1 ? theTriangulatedSufaceSet->PnindexValue(j) : j); + aMesh->SetNode(j, theFact * aPoint); + } + + // Creating triangles from triangle strips. Processing is split in two parts to + // path through nodes in the same direction. + Standard_Integer k = 1; + for (Standard_Integer i = 1; i <= theTriangulatedSufaceSet->NbTriangleStrips(); ++i) + { + Handle(TColStd_HArray1OfInteger) aTriangleStrip = Handle(TColStd_HArray1OfInteger)::DownCast(aTriaStrips->Value(i)); + for (Standard_Integer j = 3; j <= aTriangleStrip->Length(); j += 2) + { + if (aTriangleStrip->Value(j) != aTriangleStrip->Value(j - 2) && + aTriangleStrip->Value(j) != aTriangleStrip->Value(j - 1)) + { + aMesh->SetTriangle(k++, Poly_Triangle(aTriangleStrip->Value(j - 2), + aTriangleStrip->Value(j), + aTriangleStrip->Value(j - 1))); + } + } + for (Standard_Integer j = 4; j <= aTriangleStrip->Length(); j += 2) + { + if (aTriangleStrip->Value(j) != aTriangleStrip->Value(j - 2) && + aTriangleStrip->Value(j) != aTriangleStrip->Value(j - 1)) + { + aMesh->SetTriangle(k++, Poly_Triangle(aTriangleStrip->Value(j - 2), + aTriangleStrip->Value(j - 1), + aTriangleStrip->Value(j))); + } + } + } + + // Creating triangles from triangle strips. + for (Standard_Integer i = 1; i <= theTriangulatedSufaceSet->NbTriangleFans(); ++i) + { + Handle(TColStd_HArray1OfInteger) aTriangleFan = Handle(TColStd_HArray1OfInteger)::DownCast(aTriaFans->Value(i)); + for (Standard_Integer j = 3; j <= aTriangleFan->Length(); ++j) + { + aMesh->SetTriangle(k++, Poly_Triangle(aTriangleFan->Value(1), + aTriangleFan->Value(j - 1), + aTriangleFan->Value(j))); + } + } + + if (aHasNormals) + { + Handle(TColStd_HArray2OfReal) aNormals = theTriangulatedSufaceSet->Normals(); + gp_XYZ aNorm; + if (theTriangulatedSufaceSet->NbNormals() == 1) + { + aNorm.SetX(aNormals->Value(1, 1)); + aNorm.SetY(aNormals->Value(1, 2)); + aNorm.SetZ(aNormals->Value(1, 3)); + for (Standard_Integer i = 1; i <= aNbPairs; ++i) + { + aMesh->SetNormal(i, aNorm); + } + } + else + { + for (Standard_Integer i = 1; i <= aNbPairs; ++i) + { + aNorm.SetX(aNormals->Value(i, 1)); + aNorm.SetY(aNormals->Value(i, 2)); + aNorm.SetZ(aNormals->Value(i, 3)); + aMesh->SetNormal(i, aNorm); + } + } + } + + return aMesh; +} + //======================================================================= //function : readPMIPresentation //purpose : read polyline or tessellated presentation for // (Annotation_Curve_Occurrence or Draughting_Callout) //======================================================================= Standard_Boolean readPMIPresentation(const Handle(Standard_Transient)& thePresentEntity, - const Handle(XSControl_TransferReader)& theTR, - const Standard_Real theFact, - TopoDS_Shape& thePresentation, - Handle(TCollection_HAsciiString)& thePresentName, - Bnd_Box& theBox, - const StepData_Factors& theLocalFactors) + const Handle(XSControl_TransferReader)& theTR, + const Standard_Real theFact, + TopoDS_Shape& thePresentation, + Handle(TCollection_HAsciiString)& thePresentName, + Bnd_Box& theBox, + const StepData_Factors& theLocalFactors) { if (thePresentEntity.IsNull()) + { return Standard_False; + } Handle(Transfer_TransientProcess) aTP = theTR->TransientProcess(); Handle(StepVisual_AnnotationOccurrence) anAO; NCollection_Vector anAnnotations; if (thePresentEntity->IsKind(STANDARD_TYPE(StepVisual_AnnotationOccurrence))) { anAO = Handle(StepVisual_AnnotationOccurrence)::DownCast(thePresentEntity); - if (!anAO.IsNull()) { + if (!anAO.IsNull()) + { thePresentName = anAO->Name(); anAnnotations.Append(anAO); } @@ -1981,17 +2099,17 @@ Standard_Boolean readPMIPresentation(const Handle(Standard_Transient)& thePresen } if (!anAnnotations.Length()) + { return Standard_False; - + } BRep_Builder aB; TopoDS_Compound aResAnnotation; aB.MakeCompound(aResAnnotation); - Standard_Integer i = 0; Bnd_Box aBox; - Standard_Integer nbShapes = 0; - for (; i < anAnnotations.Length(); i++) + Standard_Integer aNbShapes = 0; + for (Standard_Integer i = 0; i < anAnnotations.Length(); i++) { Handle(StepVisual_StyledItem) anItem = anAnnotations(i); anAO = Handle(StepVisual_AnnotationOccurrence)::DownCast(anItem); @@ -2002,19 +2120,19 @@ Standard_Boolean readPMIPresentation(const Handle(Standard_Transient)& thePresen anAnnotationShape = STEPConstruct::FindShape(aTP, aCurveItem); if (anAnnotationShape.IsNull()) { - Handle(Transfer_Binder) binder = theTR->Actor()->Transfer(aCurveItem, aTP); - if (!binder.IsNull() && binder->HasResult()) { - anAnnotationShape = TransferBRep::ShapeResult(aTP, binder); + Handle(Transfer_Binder) aBinder = theTR->Actor()->Transfer(aCurveItem, aTP); + if (!aBinder.IsNull() && aBinder->HasResult()) { + anAnnotationShape = TransferBRep::ShapeResult(aTP, aBinder); } } } //case of tessellated entities else { - Handle(StepRepr_RepresentationItem) aTessItem = anItem->Item(); - if (aTessItem.IsNull()) + Handle(StepRepr_RepresentationItem) aRepresentationItem = anItem->Item(); + if (aRepresentationItem.IsNull()) continue; - Handle(StepVisual_TessellatedGeometricSet) aTessSet = Handle(StepVisual_TessellatedGeometricSet)::DownCast(aTessItem); + Handle(StepVisual_TessellatedGeometricSet) aTessSet = Handle(StepVisual_TessellatedGeometricSet)::DownCast(aRepresentationItem); if (aTessSet.IsNull()) continue; gp_Trsf aTransf; @@ -2037,55 +2155,75 @@ Standard_Boolean readPMIPresentation(const Handle(Standard_Transient)& thePresen } } NCollection_Handle aListItems = aTessSet->Items(); - Standard_Integer nb = aListItems.IsNull() ? 0 : aListItems->Length(); - Handle(StepVisual_TessellatedCurveSet) aTessCurve; - for (Standard_Integer n = 1; n <= nb && aTessCurve.IsNull(); n++) - { - aTessCurve = Handle(StepVisual_TessellatedCurveSet)::DownCast(aListItems->Value(n)); - } - if (aTessCurve.IsNull()) - continue; - Handle(StepVisual_CoordinatesList) aCoordList = aTessCurve->CoordList(); - if (aCoordList.IsNull()) - continue; - Handle(TColgp_HArray1OfXYZ) aPoints = aCoordList->Points(); - - if (aPoints.IsNull() || aPoints->Length() == 0) - continue; - NCollection_Handle aCurves = aTessCurve->Curves(); - Standard_Integer aNbC = (aCurves.IsNull() ? 0 : aCurves->Length()); + Standard_Integer aNbItems = aListItems.IsNull() ? 0 : aListItems->Length(); TopoDS_Compound aComp; aB.MakeCompound(aComp); - - Standard_Integer k = 0; - for (; k < aNbC; k++) + for (Standard_Integer j = 1; j <= aNbItems; j++) { - Handle(TColStd_HSequenceOfInteger) anIndexes = aCurves->Value(k); - TopoDS_Wire aCurW; - aB.MakeWire(aCurW); - - for (Standard_Integer n = 1; n < anIndexes->Length(); n++) + Handle(StepVisual_TessellatedItem) aTessItem = aListItems->Value(j); + if (aTessItem.IsNull()) + { + continue; + } + if (aTessItem->IsKind(STANDARD_TYPE(StepVisual_TessellatedCurveSet))) { - Standard_Integer ind = anIndexes->Value(n); - Standard_Integer indnext = anIndexes->Value(n + 1); - if (ind > aPoints->Length() || indnext > aPoints->Length()) + Handle(StepVisual_TessellatedCurveSet) aTessCurve = Handle(StepVisual_TessellatedCurveSet)::DownCast(aTessItem); + Handle(StepVisual_CoordinatesList) aCoordList = aTessCurve->CoordList(); + if (aCoordList.IsNull()) + { + continue; + } + + Handle(TColgp_HArray1OfXYZ) aPoints = aCoordList->Points(); + if (aPoints.IsNull() || aPoints->Length() == 0) + { continue; - gp_Pnt aP1(aPoints->Value(ind) * theFact); - gp_Pnt aP2(aPoints->Value(indnext) * theFact); - BRepBuilderAPI_MakeEdge aMaker(aP1, aP2); - if (aMaker.IsDone()) + } + + NCollection_Handle aCurves = aTessCurve->Curves(); + Standard_Integer aNbCurves = (aCurves.IsNull() ? 0 : aCurves->Length()); + for (Standard_Integer k = 0; k < aNbCurves; k++) { - TopoDS_Edge aCurE = aMaker.Edge(); - aB.Add(aCurW, aCurE); + Handle(TColStd_HSequenceOfInteger) anIndexes = aCurves->Value(k); + TopoDS_Wire aCurW; + aB.MakeWire(aCurW); + for (Standard_Integer n = 1; n < anIndexes->Length(); n++) + { + Standard_Integer anIndex = anIndexes->Value(n); + Standard_Integer aNextIndex = anIndexes->Value(n + 1); + if (anIndex > aPoints->Length() || aNextIndex > aPoints->Length()) + { + continue; + } + gp_Pnt aP1(aPoints->Value(anIndex) * theFact); + gp_Pnt aP2(aPoints->Value(aNextIndex) * theFact); + BRepBuilderAPI_MakeEdge aMaker(aP1, aP2); + if (aMaker.IsDone()) + { + TopoDS_Edge aCurE = aMaker.Edge(); + aB.Add(aCurW, aCurE); + } + } + aB.Add(aComp, aCurW); } } - aB.Add(aComp, aCurW); + else if (aTessItem->IsKind(STANDARD_TYPE(StepVisual_ComplexTriangulatedSurfaceSet))) + { + Handle(StepVisual_ComplexTriangulatedSurfaceSet) aTessSurfSet = Handle(StepVisual_ComplexTriangulatedSurfaceSet)::DownCast(aTessItem); + Handle(Poly_Triangulation) aSurfSetMesh = createMesh(aTessSurfSet, theFact); + TopoDS_Face aFace; + aB.MakeFace(aFace, aSurfSetMesh); + aB.Add(aComp, aFace); + } + } + if (!aComp.IsNull()) + { + anAnnotationShape = aComp.Moved(aTransf); } - anAnnotationShape = aComp.Moved(aTransf); } if (!anAnnotationShape.IsNull()) { - nbShapes++; + aNbShapes++; aB.Add(aResAnnotation, anAnnotationShape); if (i == anAnnotations.Length() - 1) BRepBndLib::AddClose(anAnnotationShape, aBox); @@ -2094,7 +2232,7 @@ Standard_Boolean readPMIPresentation(const Handle(Standard_Transient)& thePresen thePresentation = aResAnnotation; theBox = aBox; - return (nbShapes > 0); + return (aNbShapes > 0); } //======================================================================= diff --git a/src/STEPCAFControl/STEPCAFControl_Writer.cxx b/src/STEPCAFControl/STEPCAFControl_Writer.cxx index 9d188e07e2..519f46e1b6 100644 --- a/src/STEPCAFControl/STEPCAFControl_Writer.cxx +++ b/src/STEPCAFControl/STEPCAFControl_Writer.cxx @@ -2473,6 +2473,10 @@ void STEPCAFControl_Writer::writePresentation(const Handle(XSControl_WorkSession // Presentation Handle(StepVisual_TessellatedGeometricSet) aGeomSet = STEPCAFControl_GDTProperty::GetTessellation(thePresentation); + if (aGeomSet.IsNull()) + { + return; + } Handle(StepVisual_TessellatedAnnotationOccurrence) aTAO = new StepVisual_TessellatedAnnotationOccurrence(); aTAO->Init(new TCollection_HAsciiString(), myGDTPrsCurveStyle, aGeomSet); StepVisual_DraughtingCalloutElement aDCElement; diff --git a/src/StepVisual/StepVisual_ComplexTriangulatedSurfaceSet.cxx b/src/StepVisual/StepVisual_ComplexTriangulatedSurfaceSet.cxx index ba3fd57bba..7b3ca3eac0 100644 --- a/src/StepVisual/StepVisual_ComplexTriangulatedSurfaceSet.cxx +++ b/src/StepVisual/StepVisual_ComplexTriangulatedSurfaceSet.cxx @@ -37,8 +37,8 @@ void StepVisual_ComplexTriangulatedSurfaceSet::Init (const Handle(TCollection_HA const Standard_Integer theTessellatedSurfaceSet_Pnmax, const Handle(TColStd_HArray2OfReal)& theTessellatedSurfaceSet_Normals, const Handle(TColStd_HArray1OfInteger)& thePnindex, - const Handle(TColStd_HArray2OfInteger)& theTriangleStrips, - const Handle(TColStd_HArray2OfInteger)& theTriangleFans) + const Handle(TColStd_HArray1OfTransient)& theTriangleStrips, + const Handle(TColStd_HArray1OfTransient)& theTriangleFans) { StepVisual_TessellatedSurfaceSet::Init(theRepresentationItem_Name, theTessellatedSurfaceSet_Coordinates, @@ -103,7 +103,7 @@ Standard_Integer StepVisual_ComplexTriangulatedSurfaceSet::PnindexValue(const St //purpose : //======================================================================= -Handle(TColStd_HArray2OfInteger) StepVisual_ComplexTriangulatedSurfaceSet::TriangleStrips () const +Handle(TColStd_HArray1OfTransient) StepVisual_ComplexTriangulatedSurfaceSet::TriangleStrips () const { return myTriangleStrips; } @@ -113,7 +113,7 @@ Handle(TColStd_HArray2OfInteger) StepVisual_ComplexTriangulatedSurfaceSet::Trian //purpose : //======================================================================= -void StepVisual_ComplexTriangulatedSurfaceSet::SetTriangleStrips(const Handle(TColStd_HArray2OfInteger)& theTriangleStrips) +void StepVisual_ComplexTriangulatedSurfaceSet::SetTriangleStrips(const Handle(TColStd_HArray1OfTransient)& theTriangleStrips) { myTriangleStrips = theTriangleStrips; } @@ -129,7 +129,7 @@ Standard_Integer StepVisual_ComplexTriangulatedSurfaceSet::NbTriangleStrips() co { return 0; } - return myTriangleStrips->ColLength(); + return myTriangleStrips->Length(); } //======================================================================= @@ -137,7 +137,7 @@ Standard_Integer StepVisual_ComplexTriangulatedSurfaceSet::NbTriangleStrips() co //purpose : //======================================================================= -Handle(TColStd_HArray2OfInteger) StepVisual_ComplexTriangulatedSurfaceSet::TriangleFans () const +Handle(TColStd_HArray1OfTransient) StepVisual_ComplexTriangulatedSurfaceSet::TriangleFans () const { return myTriangleFans; } @@ -147,7 +147,7 @@ Handle(TColStd_HArray2OfInteger) StepVisual_ComplexTriangulatedSurfaceSet::Trian //purpose : //======================================================================= -void StepVisual_ComplexTriangulatedSurfaceSet::SetTriangleFans(const Handle(TColStd_HArray2OfInteger)& theTriangleFans) +void StepVisual_ComplexTriangulatedSurfaceSet::SetTriangleFans(const Handle(TColStd_HArray1OfTransient)& theTriangleFans) { myTriangleFans = theTriangleFans; } @@ -163,5 +163,5 @@ Standard_Integer StepVisual_ComplexTriangulatedSurfaceSet::NbTriangleFans() cons { return 0; } - return myTriangleFans->ColLength(); + return myTriangleFans->Length(); } diff --git a/src/StepVisual/StepVisual_ComplexTriangulatedSurfaceSet.hxx b/src/StepVisual/StepVisual_ComplexTriangulatedSurfaceSet.hxx index c8672e25d9..8d840f4518 100644 --- a/src/StepVisual/StepVisual_ComplexTriangulatedSurfaceSet.hxx +++ b/src/StepVisual/StepVisual_ComplexTriangulatedSurfaceSet.hxx @@ -22,7 +22,7 @@ #include #include -#include +#include DEFINE_STANDARD_HANDLE(StepVisual_ComplexTriangulatedSurfaceSet, StepVisual_TessellatedSurfaceSet) @@ -41,8 +41,8 @@ public : const Standard_Integer theTessellatedSurfaceSet_Pnmax, const Handle(TColStd_HArray2OfReal)& theTessellatedSurfaceSet_Normals, const Handle(TColStd_HArray1OfInteger)& thePnindex, - const Handle(TColStd_HArray2OfInteger)& theTriangleStrips, - const Handle(TColStd_HArray2OfInteger)& theTriangleFans); + const Handle(TColStd_HArray1OfTransient)& theTriangleStrips, + const Handle(TColStd_HArray1OfTransient)& theTriangleFans); //! Returns field Pnindex Standard_EXPORT Handle(TColStd_HArray1OfInteger) Pnindex() const; @@ -57,19 +57,19 @@ public : Standard_EXPORT Standard_Integer PnindexValue(const Standard_Integer theNum) const; //! Returns field TriangleStrips - Standard_EXPORT Handle(TColStd_HArray2OfInteger) TriangleStrips() const; + Standard_EXPORT Handle(TColStd_HArray1OfTransient) TriangleStrips() const; //! Sets field TriangleStrips - Standard_EXPORT void SetTriangleStrips (const Handle(TColStd_HArray2OfInteger)& theTriangleStrips); + Standard_EXPORT void SetTriangleStrips (const Handle(TColStd_HArray1OfTransient)& theTriangleStrips); //! Returns number of TriangleStrips Standard_EXPORT Standard_Integer NbTriangleStrips() const; //! Returns field TriangleFans - Standard_EXPORT Handle(TColStd_HArray2OfInteger) TriangleFans() const; + Standard_EXPORT Handle(TColStd_HArray1OfTransient) TriangleFans() const; //! Sets field TriangleFans - Standard_EXPORT void SetTriangleFans (const Handle(TColStd_HArray2OfInteger)& theTriangleFans); + Standard_EXPORT void SetTriangleFans (const Handle(TColStd_HArray1OfTransient)& theTriangleFans); //! Returns number of TriangleFans Standard_EXPORT Standard_Integer NbTriangleFans() const; @@ -79,8 +79,8 @@ public : private: Handle(TColStd_HArray1OfInteger) myPnindex; - Handle(TColStd_HArray2OfInteger) myTriangleStrips; - Handle(TColStd_HArray2OfInteger) myTriangleFans; + Handle(TColStd_HArray1OfTransient) myTriangleStrips; + Handle(TColStd_HArray1OfTransient) myTriangleFans; }; diff --git a/tests/bugs/step/bug31685_1 b/tests/bugs/step/bug31685_1 index 0b789b5804..58734ecb7f 100644 --- a/tests/bugs/step/bug31685_1 +++ b/tests/bugs/step/bug31685_1 @@ -14,12 +14,12 @@ checkshape res f set dump [XDumpNbDGTs D f] set info " - NbOfDimensions : 14 + NbOfDimensions : 15 NbOfDimensionalSize : 7 NbOfDimensionalLocation: 0 NbOfAngular : 0 NbOfWithPath : 0 - NbOfCommonLabels : 0 + NbOfCommonLabels : 1 NbOfTolerances : 22 NbOfGTWithModifiers : 4 NbOfGTWithMaxTolerance : 0 diff --git a/tests/gdt/presentation/C2 b/tests/gdt/presentation/C2 new file mode 100644 index 0000000000..8f2c84f6c1 --- /dev/null +++ b/tests/gdt/presentation/C2 @@ -0,0 +1,16 @@ +# !!!! This file is generated automatically, do not edit manually! See end script +puts "TODO CR11111 ALL: Error on writing file" + +set filename bug33484.stp + +set ref_data { +Centre of mass: 9.0027001005108751 9.2917129312715954 -5.5470782136393613 +Mass: 8176.9848537285679 + +} + +set ref_data_write { +Centre of mass: 9.4672345259051625 8.9728431848515342 -5.6865065278091702 +Mass: 8083.3051701204768 + +} diff --git a/tests/gdt/presentation/end b/tests/gdt/presentation/end index a379baf306..1c39df5578 100644 --- a/tests/gdt/presentation/end +++ b/tests/gdt/presentation/end @@ -108,39 +108,61 @@ if { $dump_file == 1 } { puts $fd_stream "set ref_data \{" puts $fd_stream $result puts $fd_stream "\}" + if (![string equal $xst $xst2]) { + puts $fd_stream "" + puts $fd_stream "set ref_data_write \{" + puts $fd_stream $result2 + puts $fd_stream "\}" + } } close $fd_stream } elseif { $mist != 1 } { puts "========================== Comparison with reference data ========" puts "" # Comparison of reference data with obtained result + # Variable ref_data is used to check values on the first read. + # If after writing and reading file again values differ, variable + # ref_data_write should be used for the new reference data. In + # case if it is not set, ref_data will be used to check the result again. set x_Ref 0; set y_Ref 0; set z_Ref 0; + set x_Ref_write 0; set y_Ref_write 0; set z_Ref_write 0; set mass_Ref 0; + set mass_Ref_write 0; regexp {Centre of mass+: +([-0-9.+eE]+) +([-0-9.+eE]+) +([-0-9.+eE]+)} $ref_data full x_Ref y_Ref z_Ref regexp {Mass+: +([-0-9.+eE]+)} $ref_data full mass_Ref - if {[expr abs($x_Ref - $x_First)] > 1e-4 || [expr abs($x_Ref - $x_Second)] > 1e-4} { + if { [info exists ref_data_write] } { + regexp {Centre of mass+: +([-0-9.+eE]+) +([-0-9.+eE]+) +([-0-9.+eE]+)} $ref_data_write full x_Ref_write y_Ref_write z_Ref_write + regexp {Mass+: +([-0-9.+eE]+)} $ref_data_write full mass_Ref_write + } else { + set x_Ref_write $x_Ref; + set y_Ref_write $y_Ref; + set z_Ref_write $z_Ref; + set mass_Ref_write $mass_Ref; + } + + if {[expr abs($x_Ref - $x_First)] > 1e-4 || [expr abs($x_Ref_write - $x_Second)] > 1e-4} { incr ref_Compare - append err_compare_ref " Reference data - $x_Ref\n" + append err_compare_ref " Reference data - $x_Ref_write ($x_Ref)\n" append err_compare_ref " Current data - $x_Second ($x_First)\n" append err_compare_ref "--------------------------------------------------------------------\n" } - if {[expr abs($y_Ref - $y_First)] > 1e-4 || [expr abs($y_Ref - $y_Second)] > 1e-4} { + if {[expr abs($y_Ref - $y_First)] > 1e-4 || [expr abs($y_Ref_write - $y_Second)] > 1e-4} { incr ref_Compare - append err_compare_ref " Reference data - $y_Ref\n" + append err_compare_ref " Reference data - $y_Ref_write ($y_Ref)\n" append err_compare_ref " Current data - $y_Second ($y_First)\n" append err_compare_ref "--------------------------------------------------------------------\n" } - if {[expr abs($z_Ref - $z_First)] > 1e-4 || [expr abs($z_Ref - $z_Second)] > 1e-4} { + if {[expr abs($z_Ref - $z_First)] > 1e-4 || [expr abs($z_Ref_write - $z_Second)] > 1e-4} { incr ref_Compare - append err_compare_ref " Reference data - $z_Ref\n" + append err_compare_ref " Reference data - $z_Ref_write ($z_Ref)\n" append err_compare_ref " Current data - $z_Second ($z_First)\n" append err_compare_ref "--------------------------------------------------------------------\n" } - if {[expr abs($mass_Ref - $mass_First)] > 1e-4 || [expr abs($mass_Ref - $mass_Second)] > 1e-4} { + if {[expr abs($mass_Ref - $mass_First)] > 1e-4 || [expr abs($mass_Ref_write - $mass_Second)] > 1e-4} { incr ref_Compare - append err_compare_ref " Reference data - $mass_Ref\n" + append err_compare_ref " Reference data - $mass_Ref_write ($mass_Ref)\n" append err_compare_ref " Current data - $mass_Second ($mass_First)\n" append err_compare_ref "--------------------------------------------------------------------\n" } From 4ce99d96979c80b37bc2d972fb380be019d4ef2c Mon Sep 17 00:00:00 2001 From: ika Date: Thu, 7 Sep 2023 15:02:05 +0100 Subject: [PATCH 507/639] 0033470: Application Framework - TDataStd_NamedData HasSmth() methods return true for empty containers. Add checks for empty containers. --- src/TDataStd/TDataStd_NamedData.cxx | 58 +++++++++++++++++++++++++++++ src/TDataStd/TDataStd_NamedData.hxx | 12 +++--- 2 files changed, 64 insertions(+), 6 deletions(-) diff --git a/src/TDataStd/TDataStd_NamedData.cxx b/src/TDataStd/TDataStd_NamedData.cxx index 92340a44ad..1e38c06707 100644 --- a/src/TDataStd/TDataStd_NamedData.cxx +++ b/src/TDataStd/TDataStd_NamedData.cxx @@ -86,6 +86,15 @@ void TDataStd_NamedData::clear() //Category: Integers +//======================================================================= +//function : HasIntegers +//purpose : Returns true if at least one named integer value is kept in the attribute. +//======================================================================= +Standard_Boolean TDataStd_NamedData::HasIntegers() const +{ + return !myIntegers.IsNull() && !myIntegers->Map().IsEmpty(); +} + //======================================================================= //function : HasInteger //purpose : Returns true if the attribute contains this named integer. @@ -186,6 +195,15 @@ void TDataStd_NamedData::ChangeIntegers(const TColStd_DataMapOfStringInteger& th //Category: Reals // ===== +//======================================================================= +//function : HasReals +//purpose : Returns true if at least one named real value is kept in the attribute. +//======================================================================= +Standard_Boolean TDataStd_NamedData::HasReals() const +{ + return !myReals.IsNull() && !myReals->Map().IsEmpty(); +} + //======================================================================= //function : HasReal //purpose : Returns true if the attribute contains this named real. @@ -283,6 +301,16 @@ void TDataStd_NamedData::ChangeReals(const TDataStd_DataMapOfStringReal& theReal //Category: Strings // ======= + +//======================================================================= +//function : HasStrings +//purpose : Returns true if there are some named strings in the attribute. +//======================================================================= +Standard_Boolean TDataStd_NamedData::HasStrings() const +{ + return !myStrings.IsNull() && !myStrings->Map().IsEmpty(); +} + //======================================================================= //function : HasString //purpose : Returns true if the attribute contains this named string. @@ -383,6 +411,16 @@ void TDataStd_NamedData::ChangeStrings(const TDataStd_DataMapOfStringString& the //Category: Bytes // ===== + +//======================================================================= +//function : HasBytes +//purpose : Returns true if there are some named bytes in the attribute. +//======================================================================= +Standard_Boolean TDataStd_NamedData::HasBytes() const +{ + return !myBytes.IsNull() && !myBytes->Map().IsEmpty(); +} + //======================================================================= //function : HasByte //purpose : Returns true if the attribute contains this named byte. @@ -482,6 +520,16 @@ void TDataStd_NamedData::ChangeBytes(const TDataStd_DataMapOfStringByte& theByte //Category: Arrays of integers // ================== + +//======================================================================= +//function : HasArrayOfIntegers +//purpose : Returns true if there are some named arrays of integer values in the attribute. +//======================================================================= +Standard_Boolean TDataStd_NamedData::HasArraysOfIntegers() const +{ + return !myArraysOfIntegers.IsNull() && !myArraysOfIntegers->Map().IsEmpty(); +} + //======================================================================= //function : HasArrayOfIntegers //purpose : Returns true if the attribute contains this named array @@ -569,6 +617,16 @@ void TDataStd_NamedData::ChangeArraysOfIntegers //Category: Arrays of reals // =============== + +//======================================================================= +//function : HasArrayOfReals +//purpose : Returns true if there are some named arrays of real values in the attribute. +//======================================================================= +Standard_Boolean TDataStd_NamedData::HasArraysOfReals() const +{ + return !myArraysOfReals.IsNull() && !myArraysOfReals->Map().IsEmpty(); +} + //======================================================================= //function : HasArrayOfReals //purpose : Returns true if the attribute contains this named array of diff --git a/src/TDataStd/TDataStd_NamedData.hxx b/src/TDataStd/TDataStd_NamedData.hxx index e147aea23f..f374893dd9 100644 --- a/src/TDataStd/TDataStd_NamedData.hxx +++ b/src/TDataStd/TDataStd_NamedData.hxx @@ -52,7 +52,7 @@ public: Standard_EXPORT TDataStd_NamedData(); //! Returns true if at least one named integer value is kept in the attribute. - Standard_Boolean HasIntegers() const { return !myIntegers.IsNull(); } + Standard_EXPORT Standard_Boolean HasIntegers() const; //! Returns true if the attribute contains specified by Name //! integer value. @@ -74,7 +74,7 @@ public: Standard_EXPORT void ChangeIntegers (const TColStd_DataMapOfStringInteger& theIntegers); //! Returns true if at least one named real value is kept in the attribute. - Standard_Boolean HasReals() const { return !myReals.IsNull(); } + Standard_EXPORT Standard_Boolean HasReals() const; //! Returns true if the attribute contains a real specified by Name. Standard_EXPORT Standard_Boolean HasReal (const TCollection_ExtendedString& theName) const; @@ -95,7 +95,7 @@ public: Standard_EXPORT void ChangeReals (const TDataStd_DataMapOfStringReal& theReals); //! Returns true if there are some named strings in the attribute. - Standard_Boolean HasStrings() const { return !myStrings.IsNull(); } + Standard_EXPORT Standard_Boolean HasStrings() const; //! Returns true if the attribute contains this named string. Standard_EXPORT Standard_Boolean HasString (const TCollection_ExtendedString& theName) const; @@ -116,7 +116,7 @@ public: Standard_EXPORT void ChangeStrings (const TDataStd_DataMapOfStringString& theStrings); //! Returns true if there are some named bytes in the attribute. - Standard_Boolean HasBytes() const { return !myBytes.IsNull(); } + Standard_EXPORT Standard_Boolean HasBytes() const; //! Returns true if the attribute contains this named byte. Standard_EXPORT Standard_Boolean HasByte (const TCollection_ExtendedString& theName) const; @@ -137,7 +137,7 @@ public: Standard_EXPORT void ChangeBytes (const TDataStd_DataMapOfStringByte& theBytes); //! Returns true if there are some named arrays of integer values in the attribute. - Standard_Boolean HasArraysOfIntegers() const { return !myArraysOfIntegers.IsNull(); } + Standard_EXPORT Standard_Boolean HasArraysOfIntegers() const; //! Returns true if the attribute contains this named array of integer values. Standard_EXPORT Standard_Boolean HasArrayOfIntegers (const TCollection_ExtendedString& theName) const; @@ -164,7 +164,7 @@ public: Standard_EXPORT void ChangeArraysOfIntegers (const TDataStd_DataMapOfStringHArray1OfInteger& theArraysOfIntegers); //! Returns true if there are some named arrays of real values in the attribute. - Standard_Boolean HasArraysOfReals() const { return !myArraysOfReals.IsNull(); } + Standard_EXPORT Standard_Boolean HasArraysOfReals() const; //! Returns true if the attribute contains this named array of real values. Standard_EXPORT Standard_Boolean HasArrayOfReals (const TCollection_ExtendedString& theName) const; From 38581280d00c854dcc91e8d8284aeae08a289142 Mon Sep 17 00:00:00 2001 From: ika Date: Thu, 21 Sep 2023 14:01:59 +0100 Subject: [PATCH 508/639] 0033486: Data Exchange - Mistake in processing of the oriented dimensions Remove using the array member's number instead of array member. --- src/STEPCAFControl/STEPCAFControl_Reader.cxx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/STEPCAFControl/STEPCAFControl_Reader.cxx b/src/STEPCAFControl/STEPCAFControl_Reader.cxx index d9c48b2693..e9e6ac69c2 100644 --- a/src/STEPCAFControl/STEPCAFControl_Reader.cxx +++ b/src/STEPCAFControl/STEPCAFControl_Reader.cxx @@ -3940,14 +3940,15 @@ static void setDimObjectToXCAF(const Handle(Standard_Transient)& theEnt, //for Oriented Dimensional Location Handle(TColStd_HArray1OfReal) aDirArr = anAP->RefDirection()->DirectionRatios(); gp_Dir aDir; + Standard_Integer aDirLower = aDirArr->Lower(); if (!aDirArr.IsNull() && aDirArr->Length() > 2) { - aDir.SetCoord(aDirArr->Lower(), aDirArr->Lower() + 1, aDirArr->Lower() + 2); + aDir.SetCoord(aDirArr->Value(aDirLower), aDirArr->Value(aDirLower + 1), aDirArr->Value(aDirLower + 2)); aDimObj->SetDirection(aDir); } else if (aDirArr->Length() > 1) { - aDir.SetCoord(aDirArr->Lower(), aDirArr->Lower() + 1, 0); + aDir.SetCoord(aDirArr->Value(aDirLower), aDirArr->Value(aDirLower + 1), 0); aDimObj->SetDirection(aDir); } } From 58390c4eb1d6f455db61db004e69738e55452716 Mon Sep 17 00:00:00 2001 From: dorlov Date: Mon, 21 Nov 2022 18:13:43 +0000 Subject: [PATCH 509/639] 0032666: Data Exchange - Cannot write STEP file from an XCAF document containing only triangulations in the faces Added support of reading and writing of the triangulated_surface_set. Prevented creation of tesselated geometry under the schemas different from AP242DIS. test step_read corrected, switched parameter write.step.schema to AP242DIS in begin and back to AP214CD at the end --- src/RWStepAP214/RWStepAP214_GeneralModule.cxx | 12 + .../RWStepAP214_ReadWriteModule.cxx | 19 + src/RWStepVisual/FILES | 2 + .../RWStepVisual_RWTriangulatedSurfaceSet.cxx | 195 ++++++ .../RWStepVisual_RWTriangulatedSurfaceSet.hxx | 48 ++ src/STEPControl/STEPControl_ActorRead.cxx | 7 + src/StepAP214/StepAP214_Protocol.cxx | 4 +- src/StepToTopoDS/StepToTopoDS_Builder.cxx | 485 +++++++------ src/StepToTopoDS/StepToTopoDS_Builder.hxx | 22 +- .../StepToTopoDS_TranslateFace.cxx | 646 +++++++++++++----- .../StepToTopoDS_TranslateFace.hxx | 37 +- src/StepVisual/FILES | 2 + .../StepVisual_TriangulatedFace.cxx | 3 +- .../StepVisual_TriangulatedFace.hxx | 2 +- .../StepVisual_TriangulatedSurfaceSet.cxx | 78 +++ .../StepVisual_TriangulatedSurfaceSet.hxx | 70 ++ src/TopoDSToStep/TopoDSToStep_Builder.cxx | 24 +- ...opoDSToStep_MakeShellBasedSurfaceModel.cxx | 31 +- .../TopoDSToStep_MakeTessellatedItem.cxx | 157 +++-- .../TopoDSToStep_MakeTessellatedItem.hxx | 20 +- tests/de_mesh/step_read/begin | 2 + tests/de_mesh/step_read/end | 1 + tests/de_mesh/step_write/D1 | 8 + tests/de_mesh/step_write/D2 | 8 + tests/de_mesh/step_write/begin | 2 + tests/de_mesh/step_write/end | 2 +- 26 files changed, 1341 insertions(+), 546 deletions(-) create mode 100644 src/RWStepVisual/RWStepVisual_RWTriangulatedSurfaceSet.cxx create mode 100644 src/RWStepVisual/RWStepVisual_RWTriangulatedSurfaceSet.hxx create mode 100644 src/StepVisual/StepVisual_TriangulatedSurfaceSet.cxx create mode 100644 src/StepVisual/StepVisual_TriangulatedSurfaceSet.hxx create mode 100644 tests/de_mesh/step_write/D1 create mode 100644 tests/de_mesh/step_write/D2 diff --git a/src/RWStepAP214/RWStepAP214_GeneralModule.cxx b/src/RWStepAP214/RWStepAP214_GeneralModule.cxx index 722c5cb7b0..052f2c164b 100644 --- a/src/RWStepAP214/RWStepAP214_GeneralModule.cxx +++ b/src/RWStepAP214/RWStepAP214_GeneralModule.cxx @@ -1372,6 +1372,7 @@ IMPLEMENT_STANDARD_RTTIEXT(RWStepAP214_GeneralModule,StepData_GeneralModule) #include #include #include +#include #include #include @@ -1388,6 +1389,7 @@ IMPLEMENT_STANDARD_RTTIEXT(RWStepAP214_GeneralModule,StepData_GeneralModule) #include #include #include +#include static Standard_Integer catsh,catdr,catstr,catdsc,cataux; @@ -5867,6 +5869,13 @@ void RWStepAP214_GeneralModule::FillSharedCase(const Standard_Integer CN, aTool.Share(anEnt, iter); } break; + case 819: + { + DeclareAndCast(StepVisual_TriangulatedSurfaceSet, anEnt, ent); + RWStepVisual_RWTriangulatedSurfaceSet aTool; + aTool.Share(anEnt, iter); + } + break; default : break; } } @@ -8173,6 +8182,9 @@ Standard_Boolean RWStepAP214_GeneralModule::NewVoid case 818: ent = new StepVisual_CubicBezierTriangulatedFace; break; + case 819: + ent = new StepVisual_TriangulatedSurfaceSet; + break; default: return Standard_False; diff --git a/src/RWStepAP214/RWStepAP214_ReadWriteModule.cxx b/src/RWStepAP214/RWStepAP214_ReadWriteModule.cxx index a12fe181ae..884be2300d 100644 --- a/src/RWStepAP214/RWStepAP214_ReadWriteModule.cxx +++ b/src/RWStepAP214/RWStepAP214_ReadWriteModule.cxx @@ -455,6 +455,7 @@ IMPLEMENT_STANDARD_RTTIEXT(RWStepAP214_ReadWriteModule,StepData_ReadWriteModule) #include #include #include +#include #include #include @@ -471,6 +472,7 @@ IMPLEMENT_STANDARD_RTTIEXT(RWStepAP214_ReadWriteModule,StepData_ReadWriteModule) #include #include #include +#include #include #include @@ -2349,6 +2351,7 @@ static TCollection_AsciiString Reco_ComplexTriangulatedFace("COMPLEX_TRIANGULATE static TCollection_AsciiString Reco_ComplexTriangulatedSurfaceSet("COMPLEX_TRIANGULATED_SURFACE_SET"); static TCollection_AsciiString Reco_CubicBezierTessellatedEdge("CUBIC_BEZIER_TESSELLATED_EDGE"); static TCollection_AsciiString Reco_CubicBezierTriangulatedFace("CUBIC_BEZIER_TRIANGULATED_FACE"); +static TCollection_AsciiString Reco_TriangulatedSurfaceSet("TRIANGULATED_SURFACE_SET"); // -- Definition of the libraries -- @@ -3105,6 +3108,7 @@ RWStepAP214_ReadWriteModule::RWStepAP214_ReadWriteModule () typenums.Bind(Reco_ComplexTriangulatedSurfaceSet, 816); typenums.Bind(Reco_CubicBezierTessellatedEdge, 817); typenums.Bind(Reco_CubicBezierTriangulatedFace, 818); + typenums.Bind(Reco_TriangulatedSurfaceSet, 819); // SHORT NAMES @@ -5092,6 +5096,7 @@ const TCollection_AsciiString& RWStepAP214_ReadWriteModule::StepType case 816: return Reco_ComplexTriangulatedSurfaceSet; case 817: return Reco_CubicBezierTessellatedEdge; case 818: return Reco_CubicBezierTriangulatedFace; + case 819: return Reco_TriangulatedSurfaceSet; default : return PasReco; } } @@ -10694,6 +10699,13 @@ void RWStepAP214_ReadWriteModule::ReadStep(const Standard_Integer CN, aTool.ReadStep(data, num, ach, anEnt); } break; + case 819: + { + DeclareAndCast(StepVisual_TriangulatedSurfaceSet, anEnt, ent); + RWStepVisual_RWTriangulatedSurfaceSet aTool; + aTool.ReadStep(data, num, ach, anEnt); + } + break; default: ach->AddFail("Type Mismatch when reading - Entity"); } @@ -16238,6 +16250,13 @@ void RWStepAP214_ReadWriteModule::WriteStep(const Standard_Integer CN, aTool.WriteStep(SW, anEnt); } break; + case 819: + { + DeclareAndCast(StepVisual_TriangulatedSurfaceSet, anEnt, ent); + RWStepVisual_RWTriangulatedSurfaceSet aTool; + aTool.WriteStep(SW, anEnt); + } + break; default: return; } diff --git a/src/RWStepVisual/FILES b/src/RWStepVisual/FILES index c1c2ee0ab6..e80c78bcdf 100644 --- a/src/RWStepVisual/FILES +++ b/src/RWStepVisual/FILES @@ -190,3 +190,5 @@ RWStepVisual_RWTessellatedWire.cxx RWStepVisual_RWTessellatedWire.hxx RWStepVisual_RWTriangulatedFace.cxx RWStepVisual_RWTriangulatedFace.hxx +RWStepVisual_RWTriangulatedSurfaceSet.cxx +RWStepVisual_RWTriangulatedSurfaceSet.hxx diff --git a/src/RWStepVisual/RWStepVisual_RWTriangulatedSurfaceSet.cxx b/src/RWStepVisual/RWStepVisual_RWTriangulatedSurfaceSet.cxx new file mode 100644 index 0000000000..bf02f6e907 --- /dev/null +++ b/src/RWStepVisual/RWStepVisual_RWTriangulatedSurfaceSet.cxx @@ -0,0 +1,195 @@ +// Copyright (c) Open CASCADE 2023 +// +// This file is part of Open CASCADE Technology software library. +// +// This library is free software; you can redistribute it and/or modify it under +// the terms of the GNU Lesser General Public License version 2.1 as published +// by the Free Software Foundation, with special exception defined in the file +// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT +// distribution for complete text of the license and disclaimer of any warranty. +// +// Alternatively, this file may be used under the terms of Open CASCADE +// commercial license or contractual agreement. + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +//======================================================================= +//function : RWStepVisual_RWTriangulatedSurfaceSet +//purpose : +//======================================================================= +RWStepVisual_RWTriangulatedSurfaceSet::RWStepVisual_RWTriangulatedSurfaceSet() +{ +} + +//======================================================================= +//function : ReadStep +//purpose : +//======================================================================= +void RWStepVisual_RWTriangulatedSurfaceSet::ReadStep(const Handle(StepData_StepReaderData)& theData, + const Standard_Integer theNum, + Handle(Interface_Check)& theCheck, + const Handle(StepVisual_TriangulatedSurfaceSet)& theEnt) const +{ + // Check number of parameters + if (!theData->CheckNbParams(theNum, 6, theCheck, "triangulated_surface_set")) + { + return; + } + + // Inherited fields of RepresentationItem + Handle(TCollection_HAsciiString) aRepresentationItem_Name; + theData->ReadString(theNum, 1, "representation_item.name", theCheck, aRepresentationItem_Name); + + // Inherited fields of TessellatedSurfaceSet + Handle(StepVisual_CoordinatesList) aTessellatedSurfaceSet_Coordinates; + theData->ReadEntity(theNum, 2, "tessellated_surface_set.coordinates", theCheck, + STANDARD_TYPE(StepVisual_CoordinatesList), aTessellatedSurfaceSet_Coordinates); + + Standard_Integer aTessellatedSurfaceSet_Pnmax; + theData->ReadInteger(theNum, 3, "tessellated_surface_set.pnmax", theCheck, aTessellatedSurfaceSet_Pnmax); + + Handle(TColStd_HArray2OfReal) aTessellatedSurfaceSet_Normals; + Standard_Integer aNormSub4 = 0; + if (theData->ReadSubList(theNum, 4, "tessellated_surface_set.normals", theCheck, aNormSub4)) + { + const Standard_Integer aNormNb = theData->NbParams(aNormSub4); + const Standard_Integer anAxesNb = theData->NbParams(theData->ParamNumber(aNormSub4, 1)); + aTessellatedSurfaceSet_Normals = new TColStd_HArray2OfReal(1, aNormNb, 1, anAxesNb); + for (Standard_Integer aNormIndex = 1; aNormIndex <= aNormNb; aNormIndex++) + { + Standard_Integer anAxesSub4 = 0; + if (theData->ReadSubList(aNormSub4, aNormIndex, + "sub-part(tessellated_surface_set.normals)", + theCheck, anAxesSub4)) + { + const Standard_Integer anAxisNum4 = anAxesSub4; + for (Standard_Integer anAxisIndex = 1; anAxisIndex <= anAxesNb; anAxisIndex++) + { + Standard_Real aValue; + theData->ReadReal(anAxisNum4, anAxisIndex, "real", theCheck, aValue); + aTessellatedSurfaceSet_Normals->SetValue(aNormIndex, anAxisIndex, aValue); + } + } + } + } + + // Own fields of TriangulatedSurfaceSet + Handle(TColStd_HArray1OfInteger) aPnindex; + Standard_Integer aPnSub5 = 0; + if (theData->ReadSubList(theNum, 5, "pnindex", theCheck, aPnSub5)) + { + const Standard_Integer aPnNb = theData->NbParams(aPnSub5); + aPnindex = new TColStd_HArray1OfInteger(1, aPnNb); + const Standard_Integer aPnNum2 = aPnSub5; + for (Standard_Integer aPnIndex = 1; aPnIndex <= aPnNb; aPnIndex++) + { + Standard_Integer aValue; + theData->ReadInteger(aPnNum2, aPnIndex, "integer", theCheck, aValue); + aPnindex->SetValue(aPnIndex, aValue); + } + } + + Handle(TColStd_HArray2OfInteger) aTriangles; + Standard_Integer aTrSub6 = 0; + if (theData->ReadSubList(theNum, 6, "triangles", theCheck, aTrSub6)) + { + const Standard_Integer aTriaNb = theData->NbParams(aTrSub6); + const Standard_Integer anAxesNb = theData->NbParams(theData->ParamNumber(aTrSub6, 1)); + aTriangles = new TColStd_HArray2OfInteger(1, aTriaNb, 1, anAxesNb); + for (Standard_Integer aTriaIndex = 1; aTriaIndex <= aTriaNb; aTriaIndex++) + { + Standard_Integer anAxesSubj6 = 0; + if (theData->ReadSubList(aTrSub6, aTriaIndex, "sub-part(triangles)", theCheck, anAxesSubj6)) + { + const Standard_Integer anAxisNum4 = anAxesSubj6; + for (Standard_Integer anAxisIndex = 1; anAxisIndex <= anAxesNb; anAxisIndex++) + { + Standard_Integer aValue; + theData->ReadInteger(anAxisNum4, anAxisIndex, "integer", theCheck, aValue); + aTriangles->SetValue(aTriaIndex, anAxisIndex, aValue); + } + } + } + } + + // Initialize entity + theEnt->Init(aRepresentationItem_Name, aTessellatedSurfaceSet_Coordinates, + aTessellatedSurfaceSet_Pnmax, aTessellatedSurfaceSet_Normals, aPnindex, aTriangles); +} + +//======================================================================= +//function : WriteStep +//purpose : +//======================================================================= +void RWStepVisual_RWTriangulatedSurfaceSet::WriteStep(StepData_StepWriter& theSW, + const Handle(StepVisual_TriangulatedSurfaceSet)& theEnt) const +{ + // Own fields of RepresentationItem + theSW.Send(theEnt->Name()); + + // Own fields of TessellatedSurfaceSet + theSW.Send(theEnt->Coordinates()); + theSW.Send(theEnt->Pnmax()); + + theSW.OpenSub(); + for (Standard_Integer aNormIndex = 1; aNormIndex <= theEnt->Normals()->NbRows(); aNormIndex++) + { + theSW.NewLine(Standard_False); + theSW.OpenSub(); + for (Standard_Integer anAxisIndex = 1; anAxisIndex <= theEnt->Normals()->NbColumns(); anAxisIndex++) + { + const Standard_Real aValue = theEnt->Normals()->Value(aNormIndex, anAxisIndex); + theSW.Send(aValue); + } + theSW.CloseSub(); + } + theSW.CloseSub(); + + // Own fields of TriangulatedSurfaceSet + theSW.OpenSub(); + TColStd_HArray1OfInteger::Iterator aPnIndexIt(theEnt->Pnindex()->Array1()); + for (; aPnIndexIt.More(); aPnIndexIt.Next()) + { + const Standard_Integer aValue = aPnIndexIt.Value(); + theSW.Send(aValue); + } + theSW.CloseSub(); + + theSW.OpenSub(); + for (Standard_Integer aTriaIndex = 1; aTriaIndex <= theEnt->Triangles()->NbRows(); aTriaIndex++) + { + theSW.NewLine(Standard_False); + theSW.OpenSub(); + for (Standard_Integer anAxisIndex = 1; anAxisIndex <= theEnt->Triangles()->NbColumns(); anAxisIndex++) + { + const Standard_Integer aValue = theEnt->Triangles()->Value(aTriaIndex, anAxisIndex); + theSW.Send(aValue); + } + theSW.CloseSub(); + } + theSW.CloseSub(); +} + +//======================================================================= +//function : Share +//purpose : +//======================================================================= +void RWStepVisual_RWTriangulatedSurfaceSet::Share(const Handle(StepVisual_TriangulatedSurfaceSet)&theEnt, + Interface_EntityIterator& theIter) const +{ + // Inherited fields of TessellatedSurfaceSet + theIter.AddItem(theEnt->StepVisual_TessellatedSurfaceSet::Coordinates()); +} diff --git a/src/RWStepVisual/RWStepVisual_RWTriangulatedSurfaceSet.hxx b/src/RWStepVisual/RWStepVisual_RWTriangulatedSurfaceSet.hxx new file mode 100644 index 0000000000..38fafbc49b --- /dev/null +++ b/src/RWStepVisual/RWStepVisual_RWTriangulatedSurfaceSet.hxx @@ -0,0 +1,48 @@ +// Copyright (c) Open CASCADE 2023 +// +// 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 _RWStepVisual_RWTriangulatedSurfaceSet_HeaderFile_ +#define _RWStepVisual_RWTriangulatedSurfaceSet_HeaderFile_ + +#include +#include +#include + +class StepData_StepReaderData; +class Interface_Check; +class StepData_StepWriter; +class Interface_EntityIterator; +class StepVisual_TriangulatedSurfaceSet; + +//! Read & Write tool for TriangulatedSurfaceSet +class RWStepVisual_RWTriangulatedSurfaceSet +{ +public: + DEFINE_STANDARD_ALLOC + + //! default constructor + Standard_EXPORT RWStepVisual_RWTriangulatedSurfaceSet(); + + Standard_EXPORT void ReadStep(const Handle(StepData_StepReaderData)& theData, + const Standard_Integer theNum, + Handle(Interface_Check)& theCheck, + const Handle(StepVisual_TriangulatedSurfaceSet)& theEnt) const; + + Standard_EXPORT void WriteStep(StepData_StepWriter& theSW, + const Handle(StepVisual_TriangulatedSurfaceSet)& theEnt) const; + + Standard_EXPORT void Share(const Handle(StepVisual_TriangulatedSurfaceSet)& theEnt, + Interface_EntityIterator& theIter) const; +}; + +#endif // _RWStepVisual_RWTriangulatedSurfaceSet_HeaderFile_ diff --git a/src/STEPControl/STEPControl_ActorRead.cxx b/src/STEPControl/STEPControl_ActorRead.cxx index fcdd8c7ab4..952054f702 100644 --- a/src/STEPControl/STEPControl_ActorRead.cxx +++ b/src/STEPControl/STEPControl_ActorRead.cxx @@ -89,6 +89,7 @@ #include #include #include +#include #include #include #include @@ -256,6 +257,7 @@ Standard_Boolean STEPControl_ActorRead::Recognize if (start->IsKind(STANDARD_TYPE(StepShape_EdgeBasedWireframeModel))) return Standard_True; if (start->IsKind(STANDARD_TYPE(StepShape_FaceBasedSurfaceModel))) return Standard_True; if (aCanReadTessGeom && start->IsKind(STANDARD_TYPE(StepVisual_TessellatedFace))) return Standard_True; + if (aCanReadTessGeom && start->IsKind(STANDARD_TYPE(StepVisual_TessellatedSurfaceSet))) return Standard_True; if (aCanReadTessGeom && start->IsKind(STANDARD_TYPE(StepVisual_TessellatedShell))) return Standard_True; if (aCanReadTessGeom && start->IsKind(STANDARD_TYPE(StepVisual_TessellatedSolid))) return Standard_True; if (aCanReadTessGeom && start->IsKind(STANDARD_TYPE(StepVisual_TessellatedShapeRepresentation))) return Standard_True; @@ -1486,6 +1488,11 @@ Handle(TransferBRep_ShapeBinder) STEPControl_ActorRead::TransferEntity aReadTessellatedWhenNoBRepOnly, aHasGeom, aLocalFactors); found = Standard_True; } + else if (start->IsKind(STANDARD_TYPE(StepVisual_TessellatedSurfaceSet))) + { + myShapeBuilder.Init(GetCasted(StepVisual_TessellatedSurfaceSet, start), TP, aLocalFactors, aHasGeom); + found = Standard_True; + } } catch(Standard_Failure const&) { TP->AddFail(start,"Exception is raised. Entity was not translated."); diff --git a/src/StepAP214/StepAP214_Protocol.cxx b/src/StepAP214/StepAP214_Protocol.cxx index 827ef454eb..16643aa178 100644 --- a/src/StepAP214/StepAP214_Protocol.cxx +++ b/src/StepAP214/StepAP214_Protocol.cxx @@ -748,9 +748,10 @@ static Standard_CString schemaAP242DIS = "AP242_MANAGED_MODEL_BASED_3D_ENGINEERI #include #include #include +#include static int THE_StepAP214_Protocol_init = 0; -static Interface_DataMapOfTransientInteger types(803); +static Interface_DataMapOfTransientInteger types(819); //======================================================================= //function : StepAP214_Protocol @@ -1558,6 +1559,7 @@ StepAP214_Protocol::StepAP214_Protocol () types.Bind(STANDARD_TYPE(StepVisual_ComplexTriangulatedSurfaceSet), 816); types.Bind(STANDARD_TYPE(StepVisual_CubicBezierTessellatedEdge), 817); types.Bind(STANDARD_TYPE(StepVisual_CubicBezierTriangulatedFace), 818); + types.Bind(STANDARD_TYPE(StepVisual_TriangulatedSurfaceSet), 819); } diff --git a/src/StepToTopoDS/StepToTopoDS_Builder.cxx b/src/StepToTopoDS/StepToTopoDS_Builder.cxx index 82bbe14a98..9d1db3d618 100644 --- a/src/StepToTopoDS/StepToTopoDS_Builder.cxx +++ b/src/StepToTopoDS/StepToTopoDS_Builder.cxx @@ -66,6 +66,7 @@ #include #include #include +#include #include #include #include @@ -100,10 +101,9 @@ static void ResetPreci (const TopoDS_Shape& S, Standard_Real maxtol) } // ============================================================================ -// Method : StepToTopoDS_Builder::StepToTopoDS_Builder +// Method : StepToTopoDS_Builder // Purpose : Empty constructor // ============================================================================ - StepToTopoDS_Builder::StepToTopoDS_Builder() : myError(StepToTopoDS_BuilderOther) { @@ -114,293 +114,257 @@ StepToTopoDS_Builder::StepToTopoDS_Builder() // Method : Init // Purpose : Init with a ManifoldSolidBrep // ============================================================================ - -void StepToTopoDS_Builder::Init -(const Handle(StepShape_ManifoldSolidBrep)& aManifoldSolid, - const Handle(Transfer_TransientProcess)& TP, - const StepData_Factors& theLocalFactors, - const Message_ProgressRange& theProgress) +void StepToTopoDS_Builder::Init(const Handle(StepShape_ManifoldSolidBrep)& theManifoldSolid, + const Handle(Transfer_TransientProcess)& theTP, + const StepData_Factors& theLocalFactors, + const Message_ProgressRange& theProgress) { - Message_Messenger::StreamBuffer sout = TP->Messenger()->SendInfo(); + Message_Messenger::StreamBuffer sout = theTP->Messenger()->SendInfo(); // Initialisation of the Tool - StepToTopoDS_Tool myTool; + StepToTopoDS_Tool aTool; StepToTopoDS_DataMapOfTRI aMap; - myTool.Init(aMap, TP); + aTool.Init(aMap, theTP); // Start Mapping - - Handle(StepShape_ConnectedFaceSet) aShell; - aShell = aManifoldSolid->Outer(); + const Handle(StepShape_ConnectedFaceSet) aShell = theManifoldSolid->Outer(); StepToTopoDS_TranslateShell myTranShell; myTranShell.SetPrecision(Precision()); myTranShell.SetMaxTol(MaxTol()); - // Non-manifold topology is not referenced by ManifoldSolidBrep (ssv; 14.11.2010) - StepToTopoDS_NMTool dummyNMTool; - myTranShell.Init(aShell, myTool, dummyNMTool, theLocalFactors, theProgress); - - if (myTranShell.IsDone()) { - TopoDS_Shape Sh = myTranShell.Value(); - Sh.Closed(Standard_True); - //BRepLib::SameParameter(Sh); - TopoDS_Solid S; - BRep_Builder B; - B.MakeSolid(S); - B.Add(S,Sh); - myResult = S; - myError = StepToTopoDS_BuilderDone; - done = Standard_True; - // Get Statistics : - - if ( TP->TraceLevel() > 2 ) - { - sout << "Geometric Statistics : " << std::endl; - sout << " Surface Continuity : - C0 : " << myTool.C0Surf() << std::endl; - sout << " - C1 : " << myTool.C1Surf() << std::endl; - sout << " - C2 : " << myTool.C2Surf() << std::endl; - sout << " Curve Continuity : - C0 : " << myTool.C0Cur3() << std::endl; - sout << " - C1 : " << myTool.C1Cur3() << std::endl; - sout << " - C2 : " << myTool.C2Cur3() << std::endl; - sout << " PCurve Continuity : - C0 : " << myTool.C0Cur2() << std::endl; - sout << " - C1 : " << myTool.C1Cur2() << std::endl; - sout << " - C2 : " << myTool.C2Cur2() << std::endl; - } - -//:S4136 ShapeFix::SameParameter (S,Standard_False); - ResetPreci (S, MaxTol()); + StepToTopoDS_NMTool dummyNMTool; + myTranShell.Init(aShell, aTool, dummyNMTool, theLocalFactors, theProgress); + if (!myTranShell.IsDone()) + { + theTP->AddWarning(aShell, " OuterShell from ManifoldSolidBrep not mapped to TopoDS"); + myError = StepToTopoDS_BuilderOther; + done = Standard_False; + return; } - else { - TP->AddWarning(aShell," OuterShell from ManifoldSolidBrep not mapped to TopoDS"); - myError = StepToTopoDS_BuilderOther; - done = Standard_False; + TopoDS_Shape aShape = myTranShell.Value(); + aShape.Closed(Standard_True); + TopoDS_Solid aSolid; + BRep_Builder aBuilder; + aBuilder.MakeSolid(aSolid); + aBuilder.Add(aSolid, aShape); + myResult = aSolid; + myError = StepToTopoDS_BuilderDone; + done = Standard_True; + + // Get Statistics : + if (theTP->TraceLevel() > 2) + { + sout << "Geometric Statistics : " << std::endl; + sout << " Surface Continuity : - C0 : " << aTool.C0Surf() << std::endl; + sout << " - C1 : " << aTool.C1Surf() << std::endl; + sout << " - C2 : " << aTool.C2Surf() << std::endl; + sout << " Curve Continuity : - C0 : " << aTool.C0Cur3() << std::endl; + sout << " - C1 : " << aTool.C1Cur3() << std::endl; + sout << " - C2 : " << aTool.C2Cur3() << std::endl; + sout << " PCurve Continuity : - C0 : " << aTool.C0Cur2() << std::endl; + sout << " - C1 : " << aTool.C1Cur2() << std::endl; + sout << " - C2 : " << aTool.C2Cur2() << std::endl; } + + ResetPreci (aSolid, MaxTol()); } // ============================================================================ // Method : Init // Purpose : Init with a BrepWithVoids // ============================================================================ - -void StepToTopoDS_Builder::Init -(const Handle(StepShape_BrepWithVoids)& aBRepWithVoids, - const Handle(Transfer_TransientProcess)& TP, - const StepData_Factors& theLocalFactors, - const Message_ProgressRange& theProgress) +void StepToTopoDS_Builder::Init(const Handle(StepShape_BrepWithVoids)& theBRepWithVoids, + const Handle(Transfer_TransientProcess)& theTP, + const StepData_Factors& theLocalFactors, + const Message_ProgressRange& theProgress) { - Message_Messenger::StreamBuffer sout = TP->Messenger()->SendInfo(); + Message_Messenger::StreamBuffer sout = theTP->Messenger()->SendInfo(); // Initialisation of the Tool - StepToTopoDS_Tool myTool; + StepToTopoDS_Tool aTool; StepToTopoDS_DataMapOfTRI aMap; - myTool.Init(aMap, TP); + aTool.Init(aMap, theTP); // Start Mapping - - Standard_Integer Nb = aBRepWithVoids->NbVoids(); - Handle(StepShape_ClosedShell) aCShell; - TopoDS_Solid S; - TopoDS_Shape Sh; - BRep_Builder B; - B.MakeSolid(S); + TopoDS_Solid aSolid; + BRep_Builder aBuilder; + aBuilder.MakeSolid(aSolid); - Message_ProgressScope PS (theProgress, "Shell", Nb+1); + Message_ProgressScope aPS (theProgress, "Shell", theBRepWithVoids->NbVoids() + 1); - StepToTopoDS_TranslateShell myTranShell; + StepToTopoDS_TranslateShell aTranShell; - myTranShell.SetPrecision(Precision());//gka - myTranShell.SetMaxTol(MaxTol()); + aTranShell.SetPrecision(Precision());//gka + aTranShell.SetMaxTol(MaxTol()); // OuterBound - aCShell = Handle(StepShape_ClosedShell)::DownCast(aBRepWithVoids->Outer()); + Handle(StepShape_ClosedShell) aCShell = Handle(StepShape_ClosedShell)::DownCast(theBRepWithVoids->Outer()); // Non-manifold topology is not referenced by BrepWithVoids (ssv; 14.11.2010) - StepToTopoDS_NMTool dummyNMTool; - myTranShell.Init(aCShell, myTool, dummyNMTool, theLocalFactors, PS.Next()); - - if (myTranShell.IsDone()) { - Sh = myTranShell.Value(); - Sh.Closed(Standard_True); - //BRepLib::SameParameter(Sh); - B.MakeSolid(S); - B.Add(S,Sh); - myResult = S; - myError = StepToTopoDS_BuilderDone; - done = Standard_True; - } - else { - TP->AddWarning(aCShell," OuterShell from BrepWithVoids not mapped to TopoDS"); - myError = StepToTopoDS_BuilderOther; - done = Standard_False; + StepToTopoDS_NMTool aDummyNMTool; + aTranShell.Init(aCShell, aTool, aDummyNMTool, theLocalFactors, aPS.Next()); + if (!aTranShell.IsDone()) + { + theTP->AddWarning( aCShell, " OuterShell from BrepWithVoids not mapped to TopoDS" ); + myError = StepToTopoDS_BuilderOther; + done = Standard_False; return; } + TopoDS_Shape aShape = aTranShell.Value(); + aShape.Closed(Standard_True); + aBuilder.MakeSolid(aSolid); + aBuilder.Add(aSolid, aShape); + myResult = aSolid; + myError = StepToTopoDS_BuilderDone; + done = Standard_True; // Voids - - for (Standard_Integer i=1; i<=Nb && PS.More(); i++) { - - aCShell = aBRepWithVoids->VoidsValue(i); - myTranShell.Init(aCShell, myTool, dummyNMTool, theLocalFactors, PS.Next()); - if (myTranShell.IsDone()) { - Sh = myTranShell.Value(); - Sh.Closed(Standard_True); + for (StepShape_HArray1OfOrientedClosedShell::Iterator anIt(theBRepWithVoids->Voids()->Array1()); + anIt.More() && aPS.More(); anIt.Next()) + { + Handle(StepShape_OrientedClosedShell) anOCShell = anIt.Value(); + aTranShell.Init(anOCShell, aTool, aDummyNMTool, theLocalFactors, aPS.Next()); + if (aTranShell.IsDone()) + { + aShape = aTranShell.Value(); + aShape.Closed(Standard_True); //:e0 abv 25 Mar 98: void should be an OrientedShell - Handle(StepShape_OrientedClosedShell) aOCShell = aBRepWithVoids->VoidsValue(i); - if ( ! aOCShell.IsNull() && ! aOCShell->Orientation() ) Sh.Reverse(); - - //BRepLib::SameParameter(Sh); - B.Add(S,Sh); + if (!anOCShell.IsNull() && ! anOCShell->Orientation()) + aShape.Reverse(); + + aBuilder.Add(aSolid, aShape); } - else { - TP->AddWarning - (aCShell," A Void from BrepWithVoids not mapped to TopoDS"); + else + { + theTP->AddWarning (anOCShell, " A Void from BrepWithVoids not mapped to TopoDS"); } } - myResult = S; - + myResult = aSolid; // Get Statistics : - - if ( TP->TraceLevel() > 2 ) + if (theTP->TraceLevel() > 2) { sout << "Geometric Statistics : " << std::endl; - sout << " Surface Continuity : - C0 : " << myTool.C0Surf() << std::endl; - sout << " - C1 : " << myTool.C1Surf() << std::endl; - sout << " - C2 : " << myTool.C2Surf() << std::endl; - sout << " Curve Continuity : - C0 : " << myTool.C0Cur3() << std::endl; - sout << " - C1 : " << myTool.C1Cur3() << std::endl; - sout << " - C2 : " << myTool.C2Cur3() << std::endl; - sout << " PCurve Continuity : - C0 : " << myTool.C0Cur2() << std::endl; - sout << " - C1 : " << myTool.C1Cur2() << std::endl; - sout << " - C2 : " << myTool.C2Cur2() << std::endl; + sout << " Surface Continuity : - C0 : " << aTool.C0Surf() << std::endl; + sout << " - C1 : " << aTool.C1Surf() << std::endl; + sout << " - C2 : " << aTool.C2Surf() << std::endl; + sout << " Curve Continuity : - C0 : " << aTool.C0Cur3() << std::endl; + sout << " - C1 : " << aTool.C1Cur3() << std::endl; + sout << " - C2 : " << aTool.C2Cur3() << std::endl; + sout << " PCurve Continuity : - C0 : " << aTool.C0Cur2() << std::endl; + sout << " - C1 : " << aTool.C1Cur2() << std::endl; + sout << " - C2 : " << aTool.C2Cur2() << std::endl; } -//:S4136 ShapeFix::SameParameter (S,Standard_False); - ResetPreci (S, MaxTol()); + ResetPreci (aSolid, MaxTol()); } // ============================================================================ // Method : Init // Purpose : Init with a FacetedBrep // ============================================================================ - -void StepToTopoDS_Builder::Init(const Handle(StepShape_FacetedBrep)& aFB, - const Handle(Transfer_TransientProcess)& TP, +void StepToTopoDS_Builder::Init(const Handle(StepShape_FacetedBrep)& theFB, + const Handle(Transfer_TransientProcess)& theTP, const StepData_Factors& theLocalFactors, const Message_ProgressRange& theProgress) { // Initialisation of the Tool - - StepToTopoDS_Tool myTool; + StepToTopoDS_Tool aTool; StepToTopoDS_DataMapOfTRI aMap; - myTool.Init(aMap, TP); + aTool.Init(aMap, theTP); // Start Mapping + const Handle(StepShape_ClosedShell) aCShell = Handle(StepShape_ClosedShell)::DownCast(theFB->Outer()); - Handle(StepShape_ClosedShell) aCShell; - aCShell = Handle(StepShape_ClosedShell)::DownCast(aFB->Outer()); - TopoDS_Shape Sh; - - StepToTopoDS_TranslateShell myTranShell; - myTranShell.SetPrecision(Precision()); //gka - myTranShell.SetMaxTol(MaxTol()); + StepToTopoDS_TranslateShell aTranShell; + aTranShell.SetPrecision(Precision()); //gka + aTranShell.SetMaxTol(MaxTol()); // Non-manifold topology is not referenced by FacetedBrep (ss; 14.11.2010) - StepToTopoDS_NMTool dummyNMTool; - myTranShell.Init(aCShell, myTool, dummyNMTool, theLocalFactors, theProgress); - - if (myTranShell.IsDone()) { - Sh = myTranShell.Value(); - Sh.Closed(Standard_True); - //BRepLib::SameParameter(Sh); - myTool.ClearEdgeMap(); - myTool.ClearVertexMap(); - TopoDS_Solid S; - BRep_Builder B; - B.MakeSolid(S); - B.Add(S,Sh); - myResult = S; - myError = StepToTopoDS_BuilderDone; - done = Standard_True; - } - else { - TP->AddWarning - (aCShell," OuterShell from FacetedBrep not mapped to TopoDS"); - myError = StepToTopoDS_BuilderOther; - done = Standard_True; + StepToTopoDS_NMTool aDummyNMTool; + aTranShell.Init(aCShell, aTool, aDummyNMTool, theLocalFactors, theProgress); + if (!aTranShell.IsDone()) + { + theTP->AddWarning(aCShell, " OuterShell from FacetedBrep not mapped to TopoDS"); + myError = StepToTopoDS_BuilderOther; + done = Standard_False; + return; } + TopoDS_Shape aShape = aTranShell.Value(); + aShape.Closed(Standard_True); + aTool.ClearEdgeMap(); + aTool.ClearVertexMap(); + TopoDS_Solid aSolid; + BRep_Builder aBuilder; + aBuilder.MakeSolid(aSolid); + aBuilder.Add(aSolid, aShape); + myResult = aSolid; + myError = StepToTopoDS_BuilderDone; + done = Standard_True; } // ============================================================================ // Method : Init // Purpose : Init with a FacetedBrepAndBrepWithVoids // ============================================================================ - -void StepToTopoDS_Builder::Init -(const Handle(StepShape_FacetedBrepAndBrepWithVoids)& aFBABWV, - const Handle(Transfer_TransientProcess)& TP, - const StepData_Factors& theLocalFactors, - const Message_ProgressRange& theProgress) -{ +void StepToTopoDS_Builder::Init(const Handle(StepShape_FacetedBrepAndBrepWithVoids)& theFBABWV, + const Handle(Transfer_TransientProcess)& theTP, + const StepData_Factors& theLocalFactors, + const Message_ProgressRange& theProgress){ // Initialisation of the Tool - - StepToTopoDS_Tool myTool; + StepToTopoDS_Tool aTool; StepToTopoDS_DataMapOfTRI aMap; - myTool.Init(aMap, TP); + aTool.Init(aMap, theTP); // Start Mapping - - Handle(StepShape_ClosedShell) aCShell; - aCShell = Handle(StepShape_ClosedShell)::DownCast(aFBABWV->Outer()); - TopoDS_Shape Sh; + Handle(StepShape_ClosedShell) aCShell = Handle(StepShape_ClosedShell)::DownCast(theFBABWV->Outer()); Message_ProgressScope aPSRoot(theProgress, NULL, 2); - StepToTopoDS_TranslateShell myTranShell; - myTranShell.SetPrecision(Precision()); //gka - myTranShell.SetMaxTol(MaxTol()); + StepToTopoDS_TranslateShell aTranShell; + aTranShell.SetPrecision(Precision()); //gka + aTranShell.SetMaxTol(MaxTol()); // Non-manifold topology is not referenced by FacetedBrepAndBrepWithVoids (ss; 14.11.2010) - StepToTopoDS_NMTool dummyNMTool; - myTranShell.Init(aCShell, myTool, dummyNMTool, theLocalFactors, aPSRoot.Next()); - - if (myTranShell.IsDone()) { - Sh = myTranShell.Value(); - Sh.Closed(Standard_True); - //BRepLib::SameParameter(Sh); - TopoDS_Solid S; - BRep_Builder B; - B.MakeSolid(S); - B.Add(S,Sh); - Standard_Integer Nb, i; - Nb = aFBABWV->NbVoids(); - Message_ProgressScope aPS (aPSRoot.Next(), NULL, Nb); - for ( i=1; i<=Nb && aPS.More(); i++) { - aCShell = aFBABWV->VoidsValue(i); - myTranShell.Init(aCShell, myTool, dummyNMTool, theLocalFactors, aPS.Next()); - if (myTranShell.IsDone()) { - Sh = myTranShell.Value(); - Sh.Closed(Standard_True); - //BRepLib::SameParameter(Sh); - B.Add(S, Sh); - } - else { - TP->AddWarning - (aCShell," A Void from FacetedBrepAndBrepWithVoids not mapped to TopoDS"); - } - } - myResult = S; - myError = StepToTopoDS_BuilderDone; - done = Standard_True; - } - else { - TP->AddWarning - (aCShell," OuterShell from FacetedBrepAndBrepWithVoids not mapped to TopoDS"); - done = Standard_False; + StepToTopoDS_NMTool aDummyNMTool; + aTranShell.Init(aCShell, aTool, aDummyNMTool, theLocalFactors, aPSRoot.Next()); + if (!aTranShell.IsDone()) + { + theTP->AddWarning + (aCShell, " OuterShell from FacetedBrepAndBrepWithVoids not mapped to TopoDS"); + done = Standard_False; myError = StepToTopoDS_BuilderOther; + return; + } + TopoDS_Shape aShape = aTranShell.Value(); + aShape.Closed(Standard_True); + TopoDS_Solid aSolid; + BRep_Builder aBuilder; + aBuilder.MakeSolid(aSolid); + aBuilder.Add(aSolid, aShape); + Message_ProgressScope aPS (aPSRoot.Next(), NULL, theFBABWV->NbVoids()); + for (StepShape_HArray1OfOrientedClosedShell::Iterator anIt(theFBABWV->Voids()->Array1()); + anIt.More() && aPS.More(); anIt.Next()) + { + Handle(StepShape_OrientedClosedShell) anOCShell = anIt.Value(); + aTranShell.Init(anOCShell, aTool, aDummyNMTool, theLocalFactors, aPS.Next()); + if (aTranShell.IsDone()) + { + aShape = aTranShell.Value(); + aShape.Closed(Standard_True); + aBuilder.Add(aSolid, aShape); + } + else + { + theTP->AddWarning + (anOCShell, " A Void from FacetedBrepAndBrepWithVoids not mapped to TopoDS"); + } } + myResult = aSolid; + myError = StepToTopoDS_BuilderDone; + done = Standard_True; } // ============================================================================ @@ -815,10 +779,9 @@ void StepToTopoDS_Builder::Init // ***end DTH Apr/6 // ============================================================================ -// Method : StepToTopoDS_Builder::Init +// Method : Init // Purpose : Builds a TopoDS_Solid from StepVisual_TessellatedSolid // ============================================================================ - void StepToTopoDS_Builder::Init(const Handle(StepVisual_TessellatedSolid)& theTSo, const Handle(Transfer_TransientProcess)& theTP, const Standard_Boolean theReadTessellatedWhenNoBRepOnly, @@ -834,31 +797,27 @@ void StepToTopoDS_Builder::Init(const Handle(StepVisual_TessellatedSolid)& theTS StepToTopoDS_DataMapOfTRI aMap; aTool.Init(aMap, theTP); - StepToTopoDS_NMTool dummyNMTool; - aTranSolid.Init(theTSo, theTP, aTool, dummyNMTool, theReadTessellatedWhenNoBRepOnly, + StepToTopoDS_NMTool aDummyNMTool; + aTranSolid.Init(theTSo, theTP, aTool, aDummyNMTool, theReadTessellatedWhenNoBRepOnly, theHasGeom, theLocalFactors, theProgress); - if (aTranSolid.IsDone()) - { - TopoDS_Shape aS = aTranSolid.Value(); - TransferBRep::SetShapeResult(theTP, theTSo, aS); - myResult = TopoDS::Solid(aS); - myError = StepToTopoDS_BuilderDone; - done = Standard_True; - } - else + if (!aTranSolid.IsDone()) { theTP->AddWarning(theTSo, " TessellatedSolid not mapped to TopoDS"); myError = StepToTopoDS_BuilderOther; - done = Standard_True; + done = Standard_False; + return; } + TopoDS_Shape aS = aTranSolid.Value(); + myResult = TopoDS::Solid(aS); + myError = StepToTopoDS_BuilderDone; + done = Standard_True; } // ============================================================================ -// Method : StepToTopoDS_Builder::Init +// Method : Init // Purpose : Builds a TopoDS_Shell from StepVisual_TessellatedShell // ============================================================================ - void StepToTopoDS_Builder::Init(const Handle(StepVisual_TessellatedShell)& theTSh, const Handle(Transfer_TransientProcess)& theTP, const Standard_Boolean theReadTessellatedWhenNoBRepOnly, @@ -874,31 +833,27 @@ void StepToTopoDS_Builder::Init(const Handle(StepVisual_TessellatedShell)& theTS StepToTopoDS_DataMapOfTRI aMap; aTool.Init(aMap, theTP); - StepToTopoDS_NMTool dummyNMTool; - aTranShell.Init(theTSh, aTool, dummyNMTool, theReadTessellatedWhenNoBRepOnly, + StepToTopoDS_NMTool aDummyNMTool; + aTranShell.Init(theTSh, aTool, aDummyNMTool, theReadTessellatedWhenNoBRepOnly, theHasGeom, theLocalFactors, theProgress); - if (aTranShell.IsDone()) - { - TopoDS_Shape aS = aTranShell.Value(); - TransferBRep::SetShapeResult(theTP, theTSh, aS); - myResult = TopoDS::Shell(aS); - myError = StepToTopoDS_BuilderDone; - done = Standard_True; - } - else + if (!aTranShell.IsDone()) { theTP->AddWarning(theTSh, " TessellatedShell not mapped to TopoDS"); myError = StepToTopoDS_BuilderOther; - done = Standard_True; + done = Standard_False; + return; } + TopoDS_Shape aS = aTranShell.Value(); + myResult = TopoDS::Shell(aS); + myError = StepToTopoDS_BuilderDone; + done = Standard_True; } // ============================================================================ -// Method : StepToTopoDS_Builder::Init +// Method : Init // Purpose : Builds a TopoDS_Face from StepVisual_TessellatedFace // ============================================================================ - void StepToTopoDS_Builder::Init(const Handle(StepVisual_TessellatedFace)& theTF, const Handle(Transfer_TransientProcess)& theTP, const Standard_Boolean theReadTessellatedWhenNoBRepOnly, @@ -913,23 +868,53 @@ void StepToTopoDS_Builder::Init(const Handle(StepVisual_TessellatedFace)& theTF, StepToTopoDS_DataMapOfTRI aMap; aTool.Init(aMap, theTP); - StepToTopoDS_NMTool dummyNMTool; - aTranFace.Init(theTF, aTool, dummyNMTool, theReadTessellatedWhenNoBRepOnly, theHasGeom, theLocalFactors); - - if (aTranFace.IsDone()) + StepToTopoDS_NMTool aDummyNMTool; + aTranFace.Init(theTF, aTool, aDummyNMTool, theReadTessellatedWhenNoBRepOnly, theHasGeom, theLocalFactors); + if (!aTranFace.IsDone()) { - TopoDS_Shape aS = aTranFace.Value(); - TransferBRep::SetShapeResult(theTP, theTF, aS); - myResult = TopoDS::Face(aS); - myError = StepToTopoDS_BuilderDone; - done = Standard_True; + theTP->AddWarning(theTF, " TessellatedFace not mapped to TopoDS"); + myError = StepToTopoDS_BuilderOther; + done = Standard_False; + return; } - else + TopoDS_Shape aS = aTranFace.Value(); + myResult = TopoDS::Face(aS); + myError = StepToTopoDS_BuilderDone; + done = Standard_True; +} + +// ============================================================================ +// Method : Init +// Purpose : Builds a TopoDS_Face from StepVisual_TessellatedSurfaceSet +// ============================================================================ +void StepToTopoDS_Builder::Init(const Handle(StepVisual_TessellatedSurfaceSet)& theTSS, + const Handle(Transfer_TransientProcess)& theTP, + const StepData_Factors& theLocalFactors, + Standard_Boolean& theHasGeom) +{ + StepToTopoDS_TranslateFace aTranFace; + aTranFace.SetPrecision(Precision()); + aTranFace.SetMaxTol(MaxTol()); + + StepToTopoDS_Tool aTool; + StepToTopoDS_DataMapOfTRI aMap; + aTool.Init(aMap, theTP); + + StepToTopoDS_NMTool aDummyNMTool; + aTranFace.Init(theTSS, aTool, aDummyNMTool, theLocalFactors); + theHasGeom = Standard_False; + + if ( !aTranFace.IsDone() ) { - theTP->AddWarning(theTF, " TessellatedFace not mapped to TopoDS"); + theTP->AddWarning(theTSS, " TessellatedSurfaceSet not mapped to TopoDS"); myError = StepToTopoDS_BuilderOther; - done = Standard_True; + done = Standard_False; + return; } + TopoDS_Shape aS = aTranFace.Value(); + myResult = TopoDS::Face(aS); + myError = StepToTopoDS_BuilderDone; + done = Standard_True; } // ============================================================================ diff --git a/src/StepToTopoDS/StepToTopoDS_Builder.hxx b/src/StepToTopoDS/StepToTopoDS_Builder.hxx index 1388fc4779..4453fb377c 100644 --- a/src/StepToTopoDS/StepToTopoDS_Builder.hxx +++ b/src/StepToTopoDS/StepToTopoDS_Builder.hxx @@ -39,6 +39,7 @@ class StepShape_FaceBasedSurfaceModel; class StepVisual_TessellatedFace; class StepVisual_TessellatedShell; class StepVisual_TessellatedSolid; +class StepVisual_TessellatedSurfaceSet; class Transfer_ActorOfTransientProcess; @@ -52,23 +53,23 @@ public: Standard_EXPORT StepToTopoDS_Builder(); - Standard_EXPORT void Init (const Handle(StepShape_ManifoldSolidBrep)& S, - const Handle(Transfer_TransientProcess)& TP, + Standard_EXPORT void Init (const Handle(StepShape_ManifoldSolidBrep)& theManifoldSolid, + const Handle(Transfer_TransientProcess)& theTP, const StepData_Factors& theLocalFactors, const Message_ProgressRange& theProgress = Message_ProgressRange()); - Standard_EXPORT void Init (const Handle(StepShape_BrepWithVoids)& S, - const Handle(Transfer_TransientProcess)& TP, + Standard_EXPORT void Init (const Handle(StepShape_BrepWithVoids)& theBRepWithVoids, + const Handle(Transfer_TransientProcess)& theTP, const StepData_Factors& theLocalFactors, const Message_ProgressRange& theProgress = Message_ProgressRange()); - Standard_EXPORT void Init (const Handle(StepShape_FacetedBrep)& S, - const Handle(Transfer_TransientProcess)& TP, + Standard_EXPORT void Init (const Handle(StepShape_FacetedBrep)& theFB, + const Handle(Transfer_TransientProcess)& theTP, const StepData_Factors& theLocalFactors, const Message_ProgressRange& theProgress = Message_ProgressRange()); - Standard_EXPORT void Init (const Handle(StepShape_FacetedBrepAndBrepWithVoids)& S, - const Handle(Transfer_TransientProcess)& TP, + Standard_EXPORT void Init (const Handle(StepShape_FacetedBrepAndBrepWithVoids)& theFBABWV, + const Handle(Transfer_TransientProcess)& theTP, const StepData_Factors& theLocalFactors, const Message_ProgressRange& theProgress = Message_ProgressRange()); @@ -112,6 +113,11 @@ public: const Standard_Boolean theReadTessellatedWhenNoBRepOnly, Standard_Boolean& theHasGeom, const StepData_Factors& theLocalFactors); + + Standard_EXPORT void Init (const Handle(StepVisual_TessellatedSurfaceSet)& theTSS, + const Handle(Transfer_TransientProcess)& theTP, + const StepData_Factors& theLocalFactors, + Standard_Boolean& theHasGeom); Standard_EXPORT const TopoDS_Shape& Value() const; diff --git a/src/StepToTopoDS/StepToTopoDS_TranslateFace.cxx b/src/StepToTopoDS/StepToTopoDS_TranslateFace.cxx index deb798e427..c6e70f83cd 100644 --- a/src/StepToTopoDS/StepToTopoDS_TranslateFace.cxx +++ b/src/StepToTopoDS/StepToTopoDS_TranslateFace.cxx @@ -84,6 +84,8 @@ #include #include #include +#include +#include //#3 rln 16/02/98 //#include @@ -95,8 +97,425 @@ //:d4 // To proceed with I-DEAS-like STP (ssv; 15.11.2010) //#define DEBUG + +namespace { + // ============================================================================ + // Method : SetNodes + // Purpose : Set nodes to the triangulation from an array + // ============================================================================ + static void SetNodes(const Handle(Poly_Triangulation)& theMesh, + Handle(TColgp_HArray1OfXYZ)& theNodes, + Handle(TColStd_HArray1OfInteger)& thePnindices, + const Standard_Real theLengthFactor) + { + //const Standard_Real aLF = StepData_GlobalFactors::Intance().LengthFactor(); + for (Standard_Integer aPnIndex = 1; aPnIndex <= theMesh->NbNodes(); ++aPnIndex) + { + const gp_XYZ& aPoint = theNodes->Value(thePnindices->Value(aPnIndex)); + theMesh->SetNode(aPnIndex, theLengthFactor * aPoint); + } + } + + // ============================================================================ + // Method : SetNormals + // Purpose : Set normals to the triangulation from an array + // ============================================================================ + static void SetNormals(const Handle(Poly_Triangulation)& theMesh, + const Handle(TColStd_HArray2OfReal)& theNormals, + const Standard_Integer theNormNum, + const Standard_Integer theNumPnindex) + { + if (theNormals->RowLength() != 3) + { + return; + } + gp_XYZ aNorm; + if (theNormNum == 1) + { + aNorm.SetX(theNormals->Value(1, 1)); + aNorm.SetY(theNormals->Value(1, 2)); + aNorm.SetZ(theNormals->Value(1, 3)); + for (Standard_Integer aPnIndex = 1; aPnIndex <= theNumPnindex; ++aPnIndex) + { + theMesh->SetNormal(aPnIndex, aNorm); + } + } + else if (theNumPnindex == theNormNum) + { + for (Standard_Integer aNormIndex = 1; aNormIndex <= theNormNum; ++aNormIndex) + { + aNorm.SetX(theNormals->Value(aNormIndex, 1)); + aNorm.SetY(theNormals->Value(aNormIndex, 2)); + aNorm.SetZ(theNormals->Value(aNormIndex, 3)); + theMesh->SetNormal(aNormIndex, aNorm); + } + } + } + + // ============================================================================ + // Method : SetTriangles + // Purpose : Set triangles to the triangulation from an array + // ============================================================================ + static void SetTriangles(const Handle(Poly_Triangulation)& theMesh, + const Handle(TColStd_HArray2OfInteger) theTriangles, + const Standard_Integer theTrianStripsNum, + const Handle(TColStd_HArray2OfInteger)& theTrianStrips, + const Standard_Integer theTrianFansNum, + const Handle(TColStd_HArray2OfInteger)& theTrianFans) + { + if (theTrianStripsNum == 0 && theTrianFansNum == 0) + { + for (Standard_Integer aTrianIndex = 1; aTrianIndex <= theMesh->NbTriangles(); ++aTrianIndex) + { + theMesh->SetTriangle(aTrianIndex, + Poly_Triangle(theTriangles->Value(aTrianIndex, 1), + theTriangles->Value(aTrianIndex, 2), + theTriangles->Value(aTrianIndex, 3))); + } + } + else + { + Standard_Integer aTriangleIndex = 1; + for (Standard_Integer aTrianStripIndex = 1; aTrianStripIndex <= theTrianStripsNum; ++aTrianStripIndex) + { + for (Standard_Integer anUCIndex = 3; anUCIndex <= theTrianStrips->UpperCol(); anUCIndex += 2) + { + if (theTrianStrips->Value(aTrianStripIndex, anUCIndex) != theTrianStrips->Value(aTrianStripIndex, anUCIndex - 2) && + theTrianStrips->Value(aTrianStripIndex, anUCIndex) != theTrianStrips->Value(aTrianStripIndex, anUCIndex - 1)) + { + theMesh->SetTriangle(aTriangleIndex++, + Poly_Triangle(theTrianStrips->Value(aTrianStripIndex, anUCIndex - 2), + theTrianStrips->Value(aTrianStripIndex, anUCIndex), + theTrianStrips->Value(aTrianStripIndex, anUCIndex - 1))); + } + } + for (Standard_Integer anUCIndex = 4; anUCIndex <= theTrianStrips->UpperCol(); anUCIndex += 2) + { + if (theTrianStrips->Value(aTrianStripIndex, anUCIndex) != theTrianStrips->Value(aTrianStripIndex, anUCIndex - 2) + && theTrianStrips->Value(aTrianStripIndex, anUCIndex) != theTrianStrips->Value(aTrianStripIndex, anUCIndex - 1)) + { + theMesh->SetTriangle(aTriangleIndex++, + Poly_Triangle(theTrianStrips->Value(aTrianStripIndex, anUCIndex - 2), + theTrianStrips->Value(aTrianStripIndex, anUCIndex - 1), + theTrianStrips->Value(aTrianStripIndex, anUCIndex))); + } + } + } + for (Standard_Integer aTrianFanIndex = 1; aTrianFanIndex <= theTrianFansNum; ++aTrianFanIndex) + { + for (Standard_Integer anUCIndex = 3; anUCIndex <= theTrianFans->UpperCol(); ++anUCIndex) + { + if (theTrianFans->Value(aTrianFanIndex, anUCIndex) != theTrianFans->Value(aTrianFanIndex, anUCIndex - 2) + && theTrianFans->Value(aTrianFanIndex, anUCIndex - 1) != theTrianFans->Value(aTrianFanIndex, anUCIndex - 2)) + { + theMesh->SetTriangle(aTriangleIndex++, + Poly_Triangle(theTrianStrips->Value(aTrianFanIndex, anUCIndex - 2), + theTrianStrips->Value(aTrianFanIndex, anUCIndex - 1), + theTrianStrips->Value(aTrianFanIndex, anUCIndex))); + } + } + } + } + } + + // ============================================================================ +// Method : SetTriangles +// Purpose : Set triangles to the triangulation from an array +// ============================================================================ + static void SetTriangles(const Handle(Poly_Triangulation)& theMesh, + const Handle(TColStd_HArray2OfInteger) theTriangles, + const Standard_Integer theTrianStripsNum, + const Handle(TColStd_HArray1OfTransient)& theTrianStrips, + const Standard_Integer theTrianFansNum, + const Handle(TColStd_HArray1OfTransient)& theTrianFans) + { + if (theTrianStripsNum == 0 && theTrianFansNum == 0) + { + for (Standard_Integer aTrianIndex = 1; aTrianIndex <= theMesh->NbTriangles(); ++aTrianIndex) + { + theMesh->SetTriangle(aTrianIndex, Poly_Triangle(theTriangles->Value(aTrianIndex, 1), + theTriangles->Value(aTrianIndex, 2), + theTriangles->Value(aTrianIndex, 3))); + } + } + else + { + Standard_Integer aTriangleIndex = 1; + for (Standard_Integer aTrianStripIndex = 1; aTrianStripIndex <= theTrianStripsNum; ++aTrianStripIndex) + { + Handle(TColStd_HArray1OfInteger) aTriangleStrip = Handle(TColStd_HArray1OfInteger)::DownCast(theTrianStrips->Value(aTrianStripIndex)); + for (Standard_Integer anIndex = 3; anIndex <= aTriangleStrip->Length(); anIndex += 2) + { + if (aTriangleStrip->Value(anIndex) != aTriangleStrip->Value(anIndex - 2) && + aTriangleStrip->Value(anIndex) != aTriangleStrip->Value(anIndex - 1)) + { + theMesh->SetTriangle(aTriangleIndex++, Poly_Triangle(aTriangleStrip->Value(anIndex - 2), + aTriangleStrip->Value(anIndex), + aTriangleStrip->Value(anIndex - 1))); + } + } + for (Standard_Integer anIndex = 4; anIndex <= aTriangleStrip->Length(); anIndex += 2) + { + if (aTriangleStrip->Value(anIndex) != aTriangleStrip->Value(anIndex - 2) && + aTriangleStrip->Value(anIndex) != aTriangleStrip->Value(anIndex - 1)) + { + theMesh->SetTriangle(aTriangleIndex++, Poly_Triangle(aTriangleStrip->Value(anIndex - 2), + aTriangleStrip->Value(anIndex - 1), + aTriangleStrip->Value(anIndex))); + } + } + } + for (Standard_Integer aTrianFanIndex = 1; aTrianFanIndex <= theTrianFansNum; ++aTrianFanIndex) + { + Handle(TColStd_HArray1OfInteger) aTriangleFan = Handle(TColStd_HArray1OfInteger)::DownCast(theTrianFans->Value(aTrianFanIndex)); + for (Standard_Integer anIndex = 3; anIndex <= aTriangleFan->Length(); ++anIndex) + { + if (aTriangleFan->Value(anIndex) != aTriangleFan->Value(anIndex - 2) && + aTriangleFan->Value(anIndex - 1) != aTriangleFan->Value(anIndex - 2)) + { + theMesh->SetTriangle(aTriangleIndex++, Poly_Triangle(aTriangleFan->Value(anIndex - 2), + aTriangleFan->Value(anIndex - 1), + aTriangleFan->Value(anIndex))); + } + } + } + } + } + + // ============================================================================ + // Method : GetSimpleFaceElements + // Purpose : Get elements from simple face + // ============================================================================ + template + static void GetSimpleFaceElements(Type theFace, + Handle(TColgp_HArray1OfXYZ)& theNodes, + Handle(TColStd_HArray2OfReal)& theNormals, + Handle(TColStd_HArray2OfInteger)& theTriangles, + Standard_Integer& thePnIndNb, + Standard_Integer& theNormNb, + Standard_Integer& theTriNb, + Handle(TColStd_HArray1OfInteger)& thePnindices) + { + theNodes = theFace->Coordinates()->Points(); + theNormals = theFace->Normals(); + theTriangles = theFace->Triangles(); + thePnIndNb = theFace->NbPnindex(); + theNormNb = theFace->NbNormals(); + theTriNb = theFace->NbTriangles(); + thePnindices = new TColStd_HArray1OfInteger(1, thePnIndNb); + for (Standard_Integer anIndx = 1; anIndx <= thePnIndNb; ++anIndx) + { + thePnindices->SetValue(anIndx, theFace->PnindexValue(anIndx)); + } + } + + // ============================================================================ + // Method : GetComplexFaceElements + // Purpose : Get elements from complex face + // ============================================================================ + template + static void GetComplexFaceElements(Type theFace, + Handle(TColgp_HArray1OfXYZ)& theNodes, + Handle(TColStd_HArray2OfReal)& theNormals, + Handle(TColStd_HArray2OfInteger)& theTriangleStrips, + Handle(TColStd_HArray2OfInteger)& theTriangleFans, + Standard_Integer& thePnIndNb, + Standard_Integer& theNormNb, + Standard_Integer& theTriStripsNb, + Standard_Integer& theTriFansNb, + Handle(TColStd_HArray1OfInteger)& thePnindices) + { + theNodes = theFace->Coordinates()->Points(); + theNormals = theFace->Normals(); + theTriangleStrips = theFace->TriangleStrips(); + theTriangleFans = theFace->TriangleFans(); + thePnIndNb = theFace->NbPnindex(); + theNormNb = theFace->NbNormals(); + theTriStripsNb = theFace->NbTriangleStrips(); + theTriFansNb = theFace->NbTriangleFans(); + thePnindices = new TColStd_HArray1OfInteger(1, thePnIndNb); + for (Standard_Integer anIndx = 1; anIndx <= thePnIndNb; ++anIndx) + { + thePnindices->SetValue(anIndx, theFace->PnindexValue(anIndx)); + } + } + + // ============================================================================ +// Method : GetComplexFaceSetElements +// Purpose : Get elements from complex face // ============================================================================ -// Method : StepToTopoDS_TranslateFace::StepToTopoDS_TranslateFace + template + static void GetComplexFaceSetElements(Type theFace, + Handle(TColgp_HArray1OfXYZ)& theNodes, + Handle(TColStd_HArray2OfReal)& theNormals, + Handle(TColStd_HArray1OfTransient)& theTriangleStrips, + Handle(TColStd_HArray1OfTransient)& theTriangleFans, + Standard_Integer& thePnIndNb, + Standard_Integer& theNormNb, + Standard_Integer& theTriStripsNb, + Standard_Integer& theTriFansNb, + Handle(TColStd_HArray1OfInteger)& thePnindices) + { + theNodes = theFace->Coordinates()->Points(); + theNormals = theFace->Normals(); + theTriangleStrips = theFace->TriangleStrips(); + theTriangleFans = theFace->TriangleFans(); + thePnIndNb = theFace->NbPnindex(); + theNormNb = theFace->NbNormals(); + theTriStripsNb = theFace->NbTriangleStrips(); + theTriFansNb = theFace->NbTriangleFans(); + thePnindices = new TColStd_HArray1OfInteger(1, thePnIndNb); + for (Standard_Integer anIndx = 1; anIndx <= thePnIndNb; ++anIndx) + { + thePnindices->SetValue(anIndx, theFace->PnindexValue(anIndx)); + } + } + + // ============================================================================ + // Method : CreatePolyTriangulation + // Purpose : Create PolyTriangulation + // ============================================================================ + static Handle(Poly_Triangulation) CreatePolyTriangulation(const Handle(StepVisual_TessellatedItem)& theTI, + const StepData_Factors& theLocalFactors) + { + Handle(Poly_Triangulation) aMesh; + if (theTI.IsNull()) + { + return Handle(Poly_Triangulation)(); + } + + Handle(TColgp_HArray1OfXYZ) aNodes; + Handle(TColStd_HArray2OfReal) aNormals; + Handle(TColStd_HArray2OfInteger) aTriangles; + Standard_Integer aNumPnindex = 0; + Standard_Integer aNormNum = 0; + Standard_Integer aTrianNum = 0; + Handle(TColStd_HArray1OfInteger) aPnindices; + + Handle(TColStd_HArray2OfInteger) aTriaStrips; + Handle(TColStd_HArray2OfInteger) aTriaFans; + Standard_Integer aTrianStripsNum = 0; + Standard_Integer aTrianFansNum = 0; + + Handle(TColStd_HArray1OfTransient) aTriaStrips1; + Handle(TColStd_HArray1OfTransient) aTriaFans1; + + if (theTI->IsKind(STANDARD_TYPE(StepVisual_TriangulatedFace))) + { + Handle(StepVisual_TriangulatedFace) aTF = Handle(StepVisual_TriangulatedFace)::DownCast(theTI); + GetSimpleFaceElements(aTF, aNodes, aNormals, aTriangles, aNumPnindex, aNormNum, aTrianNum, aPnindices); + } + else if (theTI->IsKind(STANDARD_TYPE(StepVisual_TriangulatedSurfaceSet))) + { + Handle(StepVisual_TriangulatedSurfaceSet) aTSS = Handle(StepVisual_TriangulatedSurfaceSet)::DownCast(theTI); + GetSimpleFaceElements(aTSS, aNodes, aNormals, aTriangles, aNumPnindex, aNormNum, aTrianNum, aPnindices); + } + else if (theTI->IsKind(STANDARD_TYPE(StepVisual_ComplexTriangulatedFace))) + { + Handle(StepVisual_ComplexTriangulatedFace) aTF = Handle(StepVisual_ComplexTriangulatedFace)::DownCast(theTI); + GetComplexFaceElements(aTF, aNodes, aNormals, aTriaStrips, aTriaFans, aNumPnindex, aNormNum, aTrianStripsNum, aTrianFansNum, aPnindices); + } + else if (theTI->IsKind(STANDARD_TYPE(StepVisual_ComplexTriangulatedSurfaceSet))) + { + Handle(StepVisual_ComplexTriangulatedSurfaceSet) aTSS = Handle(StepVisual_ComplexTriangulatedSurfaceSet)::DownCast(theTI); + GetComplexFaceSetElements(aTSS, aNodes, aNormals, aTriaStrips1, aTriaFans1, aNumPnindex, aNormNum, aTrianStripsNum, aTrianFansNum, aPnindices); + } + else + { + return Handle(Poly_Triangulation)(); + } + + const Standard_Boolean aHasUVNodes = Standard_False; + const Standard_Boolean aHasNormals = (aNormNum > 0); + + if (aTrianStripsNum == 0 && aTrianFansNum == 0) + { + aMesh = new Poly_Triangulation(aNumPnindex, aTrianNum, aHasUVNodes, aHasNormals); + } + else + { + Standard_Integer aNbTriaStrips = 0; + Standard_Integer aNbTriaFans = 0; + if (aTriaStrips1.IsNull() && aTriaFans1.IsNull()) + { + for (Standard_Integer aTrianStripIndex = 1; aTrianStripIndex <= aTrianStripsNum; ++aTrianStripIndex) + { + for (Standard_Integer anUCIndex = 3; anUCIndex <= aTriaStrips->UpperCol(); anUCIndex += 2) + { + if (aTriaStrips->Value(aTrianStripIndex, anUCIndex) != aTriaStrips->Value(aTrianStripIndex, anUCIndex - 2) && + aTriaStrips->Value(aTrianStripIndex, anUCIndex) != aTriaStrips->Value(aTrianStripIndex, anUCIndex - 1)) + ++aNbTriaStrips; + } + for (Standard_Integer anUCIndex = 4; anUCIndex <= aTriaStrips->UpperCol(); anUCIndex += 2) + { + if (aTriaStrips->Value(aTrianStripIndex, anUCIndex) != aTriaStrips->Value(aTrianStripIndex, anUCIndex - 2) && + aTriaStrips->Value(aTrianStripIndex, anUCIndex) != aTriaStrips->Value(aTrianStripIndex, anUCIndex - 1)) + ++aNbTriaStrips; + } + } + + for (Standard_Integer aTrianFanIndex = 1; aTrianFanIndex <= aTrianFansNum; ++aTrianFanIndex) + { + Standard_Integer aFirst = aTriaStrips->Value(aTrianFanIndex, 1); + for (Standard_Integer anUCIndex = 3; anUCIndex <= aTriaStrips->UpperCol(); ++anUCIndex) + { + if (aTriaStrips->Value(aTrianFanIndex, anUCIndex) != aFirst && + aTriaStrips->Value(aTrianFanIndex, anUCIndex - 1) != aFirst) + ++aNbTriaFans; + } + } + } + else + { + for (Standard_Integer aTrianStripIndex = 1; aTrianStripIndex <= aTrianStripsNum; ++aTrianStripIndex) + { + Handle(TColStd_HArray1OfInteger) aTriangleStrip = Handle(TColStd_HArray1OfInteger)::DownCast(aTriaStrips1->Value(aTrianStripIndex)); + for (Standard_Integer anIndex = 3; anIndex <= aTriangleStrip->Length(); anIndex += 2) + { + if (aTriangleStrip->Value(anIndex) != aTriangleStrip->Value(anIndex - 2) && + aTriangleStrip->Value(anIndex) != aTriangleStrip->Value(anIndex - 1)) + ++aNbTriaStrips; + } + for (Standard_Integer anIndex = 4; anIndex <= aTriangleStrip->Length(); anIndex += 2) + { + if (aTriangleStrip->Value(anIndex) != aTriangleStrip->Value(anIndex - 2) && + aTriangleStrip->Value(anIndex) != aTriangleStrip->Value(anIndex - 1)) + ++aNbTriaStrips; + } + } + + for (Standard_Integer aTrianFanIndex = 1; aTrianFanIndex <= aTrianFansNum; ++aTrianFanIndex) + { + Handle(TColStd_HArray1OfInteger) aTriangleFan = Handle(TColStd_HArray1OfInteger)::DownCast(aTriaFans1->Value(aTrianFansNum)); + aNbTriaFans += aTriangleFan->Length() - 2; + } + } + + aMesh = new Poly_Triangulation(aNumPnindex, aNbTriaStrips + aNbTriaFans, aHasUVNodes, aHasNormals); + } + + SetNodes(aMesh, aNodes, aPnindices, theLocalFactors.LengthFactor()); + + if (aHasNormals) + { + SetNormals(aMesh, aNormals, aNormNum, aNumPnindex); + } + + if (aTriaStrips1.IsNull() && aTriaFans1.IsNull()) + { + SetTriangles(aMesh, aTriangles, aTrianStripsNum, aTriaStrips, aTrianFansNum, aTriaFans); + } + else + { + SetTriangles(aMesh, aTriangles, aTrianStripsNum, aTriaStrips1, aTrianFansNum, aTriaFans1); + } + + return aMesh; + } +} + +// ============================================================================ +// Method : StepToTopoDS_TranslateFace // Purpose : Empty Constructor // ============================================================================ StepToTopoDS_TranslateFace::StepToTopoDS_TranslateFace() @@ -106,10 +525,9 @@ StepToTopoDS_TranslateFace::StepToTopoDS_TranslateFace() } // ============================================================================ -// Method : StepToTopoDS_TranslateFace::StepToTopoDS_TranslateFace +// Method : StepToTopoDS_TranslateFace // Purpose : Constructor with a FaceSurface and a Tool // ============================================================================ - StepToTopoDS_TranslateFace::StepToTopoDS_TranslateFace(const Handle(StepShape_FaceSurface)& FS, StepToTopoDS_Tool& T, StepToTopoDS_NMTool& NMTool, @@ -119,11 +537,10 @@ StepToTopoDS_TranslateFace::StepToTopoDS_TranslateFace(const Handle(StepShape_Fa } // ============================================================================ -// Method : StepToTopoDS_TranslateFace::StepToTopoDS_TranslateFace +// Method : StepToTopoDS_TranslateFace // Purpose : Constructor with either TriangulatedFace or // ComplexTriangulatedFace and a Tool // ============================================================================ - StepToTopoDS_TranslateFace::StepToTopoDS_TranslateFace(const Handle(StepVisual_TessellatedFace)& theTF, StepToTopoDS_Tool& theTool, StepToTopoDS_NMTool& theNMTool, @@ -134,11 +551,23 @@ StepToTopoDS_TranslateFace::StepToTopoDS_TranslateFace(const Handle(StepVisual_T Init(theTF, theTool, theNMTool, theReadTessellatedWhenNoBRepOnly, theHasGeom, theLocalFactors); } +// ============================================================================ +// Method : StepToTopoDS_TranslateFace +// Purpose : Constructor with either TriangulatedSurfaceSet or +// ComplexTriangulatedSurfaceSet and a Tool +// ============================================================================ +StepToTopoDS_TranslateFace::StepToTopoDS_TranslateFace(const Handle(StepVisual_TessellatedSurfaceSet)& theTSS, + StepToTopoDS_Tool& theTool, + StepToTopoDS_NMTool& theNMTool, + const StepData_Factors& theLocalFactors) +{ + Init(theTSS, theTool, theNMTool, theLocalFactors); +} + // ============================================================================ // Method : Init // Purpose : Init with a FaceSurface and a Tool // ============================================================================ - static inline Standard_Boolean isReversed(const Handle(StepGeom_Surface)& theStepSurf) { Handle(StepGeom_ToroidalSurface) aStepTorSur; @@ -155,7 +584,6 @@ static inline Standard_Boolean isReversed(const Handle(StepGeom_Surface)& theSte // Method : Init // Purpose : Init with a FaceSurface and a Tool // ============================================================================ - void StepToTopoDS_TranslateFace::Init(const Handle(StepShape_FaceSurface)& FS, StepToTopoDS_Tool& aTool, StepToTopoDS_NMTool& NMTool, @@ -174,7 +602,6 @@ void StepToTopoDS_TranslateFace::Init(const Handle(StepShape_FaceSurface)& FS, // ---------------------------------------------- // Map the Face Geometry and create a TopoDS_Face // ---------------------------------------------- - Handle(StepGeom_Surface) StepSurf = FS->FaceGeometry(); // sln 01.10.2001 BUC61003. If corresponding entity was read with error StepSurface may be NULL. In this case we exit from function @@ -233,7 +660,6 @@ void StepToTopoDS_TranslateFace::Init(const Handle(StepShape_FaceSurface)& FS, // ---------------------------------- // Iterate on each FaceBounds (Wires) // ---------------------------------- - Handle(StepShape_FaceBound) FaceBound; Handle(StepShape_Loop) Loop; @@ -313,7 +739,6 @@ void StepToTopoDS_TranslateFace::Init(const Handle(StepShape_FaceSurface)& FS, // ---------------------- // The Loop is a PolyLoop // ---------------------- - else if (Loop->IsKind(STANDARD_TYPE(StepShape_PolyLoop))) { //:S4136 STF.Closed() = Standard_False; Handle(StepShape_PolyLoop) PL = Handle(StepShape_PolyLoop)::DownCast(Loop); @@ -334,7 +759,6 @@ void StepToTopoDS_TranslateFace::Init(const Handle(StepShape_FaceSurface)& FS, // ----------------------- // The Loop is an EdgeLoop // ----------------------- - else if (Loop->IsKind(STANDARD_TYPE(StepShape_EdgeLoop))) { //:S4136 if (STF.Closed()) { //:S4136 Handle(StepShape_EdgeLoop) EL = @@ -367,7 +791,6 @@ void StepToTopoDS_TranslateFace::Init(const Handle(StepShape_FaceSurface)& FS, // ----------------------------- // The Wire is added to the Face // ----------------------------- - B.Add(F, W); } else { @@ -411,7 +834,6 @@ void StepToTopoDS_TranslateFace::Init(const Handle(StepShape_FaceSurface)& FS, // Purpose : Init with either StepVisual_TriangulatedFace or // StepVisual_ComplexTriangulatedFace and a Tool // ============================================================================ - void StepToTopoDS_TranslateFace::Init(const Handle(StepVisual_TessellatedFace)& theTF, StepToTopoDS_Tool& theTool, StepToTopoDS_NMTool& theNMTool, @@ -481,175 +903,76 @@ void StepToTopoDS_TranslateFace::Init(const Handle(StepVisual_TessellatedFace)& } // ============================================================================ -// Method : createMesh -// Purpose : creates a Poly_Triangulation from TriangulatedFace +// Method : Init +// Purpose : Init with either StepVisual_TriangulatedSurfaceSet or +// StepVisual_ComplexTriangulatedSurfaceSet and a Tool // ============================================================================ - -Handle(Poly_Triangulation) -StepToTopoDS_TranslateFace::createMesh(const Handle(StepVisual_TriangulatedFace)& theTF, - const StepData_Factors& theLocalFactors) const +void StepToTopoDS_TranslateFace::Init(const Handle(StepVisual_TessellatedSurfaceSet)& theTSS, + StepToTopoDS_Tool& theTool, + StepToTopoDS_NMTool& theNMTool, + const StepData_Factors& theLocalFactors) { - Handle(StepVisual_CoordinatesList) aCoords = theTF->Coordinates(); - Handle(TColgp_HArray1OfXYZ) aNodes = aCoords->Points(); - Handle(TColStd_HArray2OfInteger) aTriangles = theTF->Triangles(); - const Standard_Boolean aHasUVNodes = Standard_False; - const Standard_Boolean aHasNormals = (theTF->NbNormals() > 0); - Handle(Poly_Triangulation) aMesh = new Poly_Triangulation(theTF->NbPnindex(), theTF->NbTriangles(), aHasUVNodes, aHasNormals); - - const Standard_Real aLF = theLocalFactors.LengthFactor(); - for (Standard_Integer j = 1; j <= theTF->NbPnindex(); ++j) + if (theTSS.IsNull()) + return; + + Handle(Transfer_TransientProcess) aTP = theTool.TransientProcess(); + BRep_Builder aB; + TopoDS_Face aF; + aB.MakeFace(aF); + + Handle(Poly_Triangulation) aMesh; + if (DeclareAndCast(StepVisual_TriangulatedSurfaceSet, aTriaSS, theTSS)) { - const gp_XYZ& aPoint = aNodes->Value(theTF->PnindexValue(j)); - aMesh->SetNode(j, aPoint * aLF); + aMesh = createMesh(aTriaSS, theLocalFactors); } - - for (Standard_Integer k = 1; k <= theTF->NbTriangles(); ++k) + else if (DeclareAndCast(StepVisual_ComplexTriangulatedSurfaceSet, aCompTriaSS, theTSS)) { - aMesh->SetTriangle(k, Poly_Triangle(aTriangles->Value(k, 1), aTriangles->Value(k, 2), aTriangles->Value(k, 3))); + aMesh = createComplexMesh(aCompTriaSS, theLocalFactors); } - - if (aHasNormals) + else { - Handle(TColStd_HArray2OfReal) aNormals = theTF->Normals(); - gp_XYZ aNorm; - if (theTF->NbNormals() == 1) - { - aNorm.SetX(aNormals->Value(1, 1)); - aNorm.SetY(aNormals->Value(1, 2)); - aNorm.SetZ(aNormals->Value(1, 3)); - for (Standard_Integer i = 1; i <= theTF->NbPnindex(); ++i) - { - aMesh->SetNormal(i, aNorm); - } - } - else - { - for (Standard_Integer i = 1; i <= theTF->NbNormals(); ++i) - { - aNorm.SetX(aNormals->Value(i, 1)); - aNorm.SetY(aNormals->Value(i, 2)); - aNorm.SetZ(aNormals->Value(i, 3)); - aMesh->SetNormal(i, aNorm); - } - } + aTP->AddWarning(theTSS, " Triangulated or ComplexTriangulated entity is supported only."); + return; + } + if (aMesh.IsNull()) + { + aTP->AddWarning(theTSS, " Poly triangulation is not set to TopoDS face."); + return; } + aB.UpdateFace(aF, aMesh); + if (theNMTool.IsActive()) + theNMTool.Bind(theTSS, aF); - return aMesh; + myResult = aF; + myError = StepToTopoDS_TranslateFaceDone; + done = Standard_True; } // ============================================================================ // Method : createMesh -// Purpose : creates a Poly_Triangulation from ComplexTriangulatedFace +// Purpose : creates a Poly_Triangulation from TriangulatedFace or TriangulatedSurfaceSet // ============================================================================ - -Handle(Poly_Triangulation) -StepToTopoDS_TranslateFace::createMesh(const Handle(StepVisual_ComplexTriangulatedFace)& theTF, - const StepData_Factors& theLocalFactors) const +Handle(Poly_Triangulation) + StepToTopoDS_TranslateFace::createMesh(const Handle(StepVisual_TessellatedItem)& theTI, + const StepData_Factors& theLocalFactors) const { - Handle(StepVisual_CoordinatesList) aCoords = theTF->Coordinates(); - Handle(TColgp_HArray1OfXYZ) aNodes = aCoords->Points(); - Handle(TColStd_HArray2OfInteger) aTriaStrips = theTF->TriangleStrips(); - Handle(TColStd_HArray2OfInteger) aTriaFans = theTF->TriangleFans(); - const Standard_Boolean aHasUVNodes = Standard_False; - const Standard_Boolean aHasNormals = (theTF->NbNormals() > 0); - - Standard_Integer aNbTriaStrips = 0; - for (Standard_Integer i = 1; i <= theTF->NbTriangleStrips(); ++i) - { - for (Standard_Integer j = 3; j <= aTriaStrips->UpperCol(); j += 2) - { - if (aTriaStrips->Value(i, j) != aTriaStrips->Value(i, j - 2) && - aTriaStrips->Value(i, j) != aTriaStrips->Value(i, j - 1)) - ++aNbTriaStrips; - } - for (Standard_Integer j = 4; j <= aTriaStrips->UpperCol(); j += 2) - { - if (aTriaStrips->Value(i, j) != aTriaStrips->Value(i, j - 2) && - aTriaStrips->Value(i, j) != aTriaStrips->Value(i, j - 1)) - ++aNbTriaStrips; - } - } - - Standard_Integer aNbTriaFans = 0; - for (Standard_Integer i = 1; i <= theTF->NbTriangleFans(); ++i) - { - Standard_Integer v1 = aTriaStrips->Value(i, 1); - for (Standard_Integer j = 3; j <= aTriaStrips->UpperCol(); ++j) - { - if (aTriaStrips->Value(i, j) != v1 && aTriaStrips->Value(i, j - 1) != v1) - ++aNbTriaFans; - } - } - - Handle(Poly_Triangulation) aMesh = new Poly_Triangulation(theTF->NbPnindex(), - aNbTriaStrips + aNbTriaFans, aHasUVNodes, aHasNormals); - - const Standard_Real aLF = theLocalFactors.LengthFactor(); - for (Standard_Integer j = 1; j <= theTF->NbPnindex(); ++j) - { - const gp_XYZ& aPoint = aNodes->Value(theTF->PnindexValue(j)); - aMesh->SetNode(j, aLF * aPoint); - } - - Standard_Integer k = 1; - for (Standard_Integer i = 1; i <= theTF->NbTriangleStrips(); ++i) - { - for (Standard_Integer j = 3; j <= aTriaStrips->UpperCol(); j += 2) - { - if (aTriaStrips->Value(i, j) != aTriaStrips->Value(i, j - 2) && - aTriaStrips->Value(i, j) != aTriaStrips->Value(i, j - 1)) - { - aMesh->SetTriangle(k++, Poly_Triangle(aTriaStrips->Value(i, j - 2), - aTriaStrips->Value(i, j), - aTriaStrips->Value(i, j - 1))); - } - } - for (Standard_Integer j = 4; j <= aTriaStrips->UpperCol(); j += 2) - { - if (aTriaStrips->Value(i, j) != aTriaStrips->Value(i, j - 2) && - aTriaStrips->Value(i, j) != aTriaStrips->Value(i, j - 1)) - { - aMesh->SetTriangle(k++, Poly_Triangle(aTriaStrips->Value(i, j - 2), - aTriaStrips->Value(i, j - 1), - aTriaStrips->Value(i, j))); - } - } - } - - if (aHasNormals) - { - Handle(TColStd_HArray2OfReal) aNormals = theTF->Normals(); - gp_XYZ aNorm; - if (theTF->NbNormals() == 1) - { - aNorm.SetX(aNormals->Value(1, 1)); - aNorm.SetY(aNormals->Value(1, 2)); - aNorm.SetZ(aNormals->Value(1, 3)); - for (Standard_Integer i = 1; i <= theTF->NbPnindex(); ++i) - { - aMesh->SetNormal(i, aNorm); - } - } - else - { - for (Standard_Integer i = 1; i <= theTF->NbNormals(); ++i) - { - aNorm.SetX(aNormals->Value(i, 1)); - aNorm.SetY(aNormals->Value(i, 2)); - aNorm.SetZ(aNormals->Value(i, 3)); - aMesh->SetNormal(i, aNorm); - } - } - } - - return aMesh; + return CreatePolyTriangulation(theTI, theLocalFactors); } +// ============================================================================ +// Method : createComplexMesh +// Purpose : creates a Poly_Triangulation from ComplexTriangulatedFace or ComplexTriangulatedSurfaceSet +// ============================================================================ +Handle(Poly_Triangulation) + StepToTopoDS_TranslateFace::createComplexMesh(const Handle(StepVisual_TessellatedItem)& theTI, + const StepData_Factors& theLocalFactors) const +{ + return CreatePolyTriangulation(theTI, theLocalFactors);} + // ============================================================================ // Method : Value // Purpose : Return the mapped Shape // ============================================================================ - const TopoDS_Shape& StepToTopoDS_TranslateFace::Value() const { StdFail_NotDone_Raise_if (!done, "StepToTopoDS_TranslateFace::Value() - no result"); @@ -660,7 +983,6 @@ const TopoDS_Shape& StepToTopoDS_TranslateFace::Value() const // Method : Error // Purpose : Return the TranslateFace error // ============================================================================ - StepToTopoDS_TranslateFaceError StepToTopoDS_TranslateFace::Error() const { return myError; diff --git a/src/StepToTopoDS/StepToTopoDS_TranslateFace.hxx b/src/StepToTopoDS/StepToTopoDS_TranslateFace.hxx index 1fc01453c2..8955a89804 100644 --- a/src/StepToTopoDS/StepToTopoDS_TranslateFace.hxx +++ b/src/StepToTopoDS/StepToTopoDS_TranslateFace.hxx @@ -29,10 +29,11 @@ class StepData_Factors; class StepShape_FaceSurface; class StepToTopoDS_Tool; class StepToTopoDS_NMTool; +class StepVisual_ComplexTriangulatedFace; class StepVisual_TessellatedFace; +class StepVisual_TessellatedItem; +class StepVisual_TessellatedSurfaceSet; class StepVisual_TriangulatedFace; -class StepVisual_ComplexTriangulatedFace; - class StepToTopoDS_TranslateFace : public StepToTopoDS_Root { @@ -54,6 +55,11 @@ public: const Standard_Boolean theReadTessellatedWhenNoBRepOnly, Standard_Boolean& theHasGeom, const StepData_Factors& theLocalFactors); + + Standard_EXPORT StepToTopoDS_TranslateFace(const Handle(StepVisual_TessellatedSurfaceSet)& theTSS, + StepToTopoDS_Tool& theTool, + StepToTopoDS_NMTool& theNMTool, + const StepData_Factors& theLocalFactors); Standard_EXPORT void Init (const Handle(StepShape_FaceSurface)& FS, StepToTopoDS_Tool& T, @@ -66,28 +72,22 @@ public: const Standard_Boolean theReadTessellatedWhenNoBRepOnly, Standard_Boolean& theHasGeom, const StepData_Factors& theLocalFactors); + + Standard_EXPORT void Init(const Handle(StepVisual_TessellatedSurfaceSet)& theTSS, + StepToTopoDS_Tool& theTool, + StepToTopoDS_NMTool& theNMTool, + const StepData_Factors& theLocalFactors); Standard_EXPORT const TopoDS_Shape& Value() const; Standard_EXPORT StepToTopoDS_TranslateFaceError Error() const; - - - -protected: - - - - - private: - Handle(Poly_Triangulation) createMesh(const Handle(StepVisual_TriangulatedFace)& theTF, - const StepData_Factors& theLocalFactors) const; - Handle(Poly_Triangulation) createMesh(const Handle(StepVisual_ComplexTriangulatedFace)& theTF, + Handle(Poly_Triangulation) createMesh(const Handle(StepVisual_TessellatedItem)& theTI, const StepData_Factors& theLocalFactors) const; - - + Handle(Poly_Triangulation) createComplexMesh(const Handle(StepVisual_TessellatedItem)& theTI, + const StepData_Factors& theLocalFactors) const; StepToTopoDS_TranslateFaceError myError; TopoDS_Shape myResult; @@ -95,9 +95,4 @@ private: }; - - - - - #endif // _StepToTopoDS_TranslateFace_HeaderFile diff --git a/src/StepVisual/FILES b/src/StepVisual/FILES index ab69d5c5b3..b51fd1456d 100644 --- a/src/StepVisual/FILES +++ b/src/StepVisual/FILES @@ -308,3 +308,5 @@ StepVisual_TessellatedWire.cxx StepVisual_TessellatedWire.hxx StepVisual_TriangulatedFace.cxx StepVisual_TriangulatedFace.hxx +StepVisual_TriangulatedSurfaceSet.cxx +StepVisual_TriangulatedSurfaceSet.hxx diff --git a/src/StepVisual/StepVisual_TriangulatedFace.cxx b/src/StepVisual/StepVisual_TriangulatedFace.cxx index eb1a2b9f14..654b59c665 100644 --- a/src/StepVisual/StepVisual_TriangulatedFace.cxx +++ b/src/StepVisual/StepVisual_TriangulatedFace.cxx @@ -23,7 +23,8 @@ IMPLEMENT_STANDARD_RTTIEXT(StepVisual_TriangulatedFace, StepVisual_TessellatedFa //purpose : //======================================================================= -StepVisual_TriangulatedFace::StepVisual_TriangulatedFace () +StepVisual_TriangulatedFace::StepVisual_TriangulatedFace() + : StepVisual_TessellatedFace() { } diff --git a/src/StepVisual/StepVisual_TriangulatedFace.hxx b/src/StepVisual/StepVisual_TriangulatedFace.hxx index 151e8a5343..b91e5c74f2 100644 --- a/src/StepVisual/StepVisual_TriangulatedFace.hxx +++ b/src/StepVisual/StepVisual_TriangulatedFace.hxx @@ -32,7 +32,7 @@ class StepVisual_TriangulatedFace : public StepVisual_TessellatedFace public : - //! default constructor + //! Default constructor Standard_EXPORT StepVisual_TriangulatedFace(); //! Initialize all fields (own and inherited) diff --git a/src/StepVisual/StepVisual_TriangulatedSurfaceSet.cxx b/src/StepVisual/StepVisual_TriangulatedSurfaceSet.cxx new file mode 100644 index 0000000000..59f0ef4e6a --- /dev/null +++ b/src/StepVisual/StepVisual_TriangulatedSurfaceSet.cxx @@ -0,0 +1,78 @@ +// Copyright (c) Open CASCADE 2023 +// +// This file is part of Open CASCADE Technology software library. +// +// This library is free software; you can redistribute it and/or modify it under +// the terms of the GNU Lesser General Public License version 2.1 as published +// by the Free Software Foundation, with special exception defined in the file +// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT +// distribution for complete text of the license and disclaimer of any warranty. +// +// Alternatively, this file may be used under the terms of Open CASCADE +// commercial license or contractual agreement. + +#include + +IMPLEMENT_STANDARD_RTTIEXT(StepVisual_TriangulatedSurfaceSet, StepVisual_TessellatedSurfaceSet) + +//======================================================================= +//function : StepVisual_TriangulatedSurfaceSet +//purpose : +//======================================================================= +StepVisual_TriangulatedSurfaceSet::StepVisual_TriangulatedSurfaceSet() +{ +} + +//======================================================================= +//function : Init +//purpose : +//======================================================================= +void StepVisual_TriangulatedSurfaceSet::Init(const Handle(TCollection_HAsciiString)& theRepresentationItemName, + const Handle(StepVisual_CoordinatesList)& theTessellatedSurfaceSetCoordinates, + const Standard_Integer theTessellatedSurfaceSetPnmax, + const Handle(TColStd_HArray2OfReal)& theTessellatedSurfaceSetNormals, + const Handle(TColStd_HArray1OfInteger)& thePnindex, + const Handle(TColStd_HArray2OfInteger)& theTriangles) +{ + StepVisual_TessellatedSurfaceSet::Init(theRepresentationItemName, + theTessellatedSurfaceSetCoordinates, + theTessellatedSurfaceSetPnmax, + theTessellatedSurfaceSetNormals); + myPnindex = thePnindex; + myTriangles = theTriangles; +} + +//======================================================================= +//function : NbPnindex +//purpose : +//======================================================================= +Standard_Integer StepVisual_TriangulatedSurfaceSet::NbPnindex() const +{ + if (myPnindex.IsNull()) + { + return 0; + } + return myPnindex->Length(); +} + +//======================================================================= +//function : PnindexValue +//purpose : +//======================================================================= +Standard_Integer StepVisual_TriangulatedSurfaceSet::PnindexValue(const Standard_Integer theNum) const +{ + return myPnindex->Value(theNum); +} + +//======================================================================= +//function : NbTriangles +//purpose : +//======================================================================= +Standard_Integer StepVisual_TriangulatedSurfaceSet::NbTriangles() const +{ + if (myTriangles.IsNull()) + { + return 0; + } + return myTriangles->ColLength(); +} diff --git a/src/StepVisual/StepVisual_TriangulatedSurfaceSet.hxx b/src/StepVisual/StepVisual_TriangulatedSurfaceSet.hxx new file mode 100644 index 0000000000..266ce14644 --- /dev/null +++ b/src/StepVisual/StepVisual_TriangulatedSurfaceSet.hxx @@ -0,0 +1,70 @@ +// Copyright (c) Open CASCADE 2023 +// +// 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 _StepVisual_TriangulatedSurfaceSet_HeaderFile_ +#define _StepVisual_TriangulatedSurfaceSet_HeaderFile_ + +#include +#include + +#include +#include + +//! Representation of STEP entity TriangulatedSurfaceSet +class StepVisual_TriangulatedSurfaceSet : public StepVisual_TessellatedSurfaceSet +{ +public: + //! default constructor + Standard_EXPORT StepVisual_TriangulatedSurfaceSet(); + + //! Initialize all fields (own and inherited) + Standard_EXPORT void Init(const Handle(TCollection_HAsciiString)& theRepresentationItemName, + const Handle(StepVisual_CoordinatesList)& theTessellatedFaceCoordinates, + const Standard_Integer theTessellatedFacePnmax, + const Handle(TColStd_HArray2OfReal)& theTessellatedFaceNormals, + const Handle(TColStd_HArray1OfInteger)& thePnindex, + const Handle(TColStd_HArray2OfInteger)& theTriangles); + + //! Returns field Pnindex + const Handle(TColStd_HArray1OfInteger) Pnindex() const { return myPnindex; } + + //! Sets field Pnindex + void SetPnindex(const Handle(TColStd_HArray1OfInteger)& thePnindex) { myPnindex = thePnindex; } + + //! Returns number of Pnindex + Standard_EXPORT Standard_Integer NbPnindex() const; + + //! Returns value of Pnindex by its num + Standard_EXPORT Standard_Integer PnindexValue(const Standard_Integer theNum) const; + + //! Returns field Triangles + const Handle(TColStd_HArray2OfInteger) Triangles() const { return myTriangles; } + + //! Sets field Triangles + void SetTriangles(const Handle(TColStd_HArray2OfInteger)& theTriangles) + { + myTriangles = theTriangles; + } + + //! Returns number of Triangles + Standard_EXPORT Standard_Integer NbTriangles() const; + + DEFINE_STANDARD_RTTIEXT(StepVisual_TriangulatedSurfaceSet, StepVisual_TessellatedSurfaceSet) + +private: + + Handle(TColStd_HArray1OfInteger) myPnindex; + Handle(TColStd_HArray2OfInteger) myTriangles; +}; + +#endif // _StepVisual_TriangulatedSurfaceSet_HeaderFile_ diff --git a/src/TopoDSToStep/TopoDSToStep_Builder.cxx b/src/TopoDSToStep/TopoDSToStep_Builder.cxx index 45fa6dbb4f..c75e23aa31 100644 --- a/src/TopoDSToStep/TopoDSToStep_Builder.cxx +++ b/src/TopoDSToStep/TopoDSToStep_Builder.cxx @@ -36,7 +36,7 @@ #include // ============================================================================ -// Method : TopoDSToStep_Builder::TopoDSToStep_Builder +// Method : TopoDSToStep_Builder // Purpose : // ============================================================================ TopoDSToStep_Builder::TopoDSToStep_Builder() @@ -46,10 +46,9 @@ TopoDSToStep_Builder::TopoDSToStep_Builder() } // ============================================================================ -// Method : TopoDSToStep_Builder::TopoDSToStep_Builder +// Method : TopoDSToStep_Builder // Purpose : // ============================================================================ - TopoDSToStep_Builder::TopoDSToStep_Builder (const TopoDS_Shape& aShape, TopoDSToStep_Tool& aTool, @@ -63,10 +62,9 @@ TopoDSToStep_Builder::TopoDSToStep_Builder } // ============================================================================ -// Method : TopoDSToStep_Builder::Init +// Method : Init // Purpose : // ============================================================================ - void TopoDSToStep_Builder::Init(const TopoDS_Shape& aShape, TopoDSToStep_Tool& myTool, const Handle(Transfer_FinderProcess)& FP, @@ -108,8 +106,6 @@ void TopoDSToStep_Builder::Init(const TopoDS_Shape& aShape, // Il reste ici et la du code relatif a "en Faceted on combine differemment" // -> reste encore du menage a faire - - TopExp_Explorer anExp; TopoDSToStep_MakeStepFace MkFace; @@ -182,7 +178,6 @@ void TopoDSToStep_Builder::Init(const TopoDS_Shape& aShape, done = Standard_True; } } - break; } @@ -199,7 +194,9 @@ void TopoDSToStep_Builder::Init(const TopoDS_Shape& aShape, if (theTessellatedGeomParam == 1 || (theTessellatedGeomParam == 2 && !MkFace.IsDone())) { Message_ProgressScope aPS(theProgress, NULL, 1); - MkTessFace.Init(Face, myTool, FP, aPS.Next()); + // fourth parameter is true in order to create a tessellated_surface_set entity + // or put false to create a triangulated_face instead + MkTessFace.Init(Face, myTool, FP, Standard_True, aPS.Next()); } if (MkFace.IsDone() || MkTessFace.IsDone()) { @@ -229,10 +226,9 @@ void TopoDSToStep_Builder::Init(const TopoDS_Shape& aShape, } // ============================================================================ -// Method : TopoDSToStep_Builder::Value +// Method : Value // Purpose : Returns TopologicalRepresentationItem as the result // ============================================================================ - const Handle(StepShape_TopologicalRepresentationItem)& TopoDSToStep_Builder::Value() const { @@ -241,10 +237,9 @@ TopoDSToStep_Builder::Value() const } // ============================================================================ -// Method : TopoDSToStep_Builder::TessellatedValue +// Method : TessellatedValue // Purpose : Returns TopologicalRepresentationItem as the optional result // ============================================================================ - const Handle(StepVisual_TessellatedItem)& TopoDSToStep_Builder::TessellatedValue() const { @@ -253,10 +248,9 @@ TopoDSToStep_Builder::TessellatedValue() const } // ============================================================================ -// Method : TopoDSToStep_Builder::Error +// Method : Error // Purpose : Returns builder error if the process is not done // ============================================================================ - TopoDSToStep_BuilderError TopoDSToStep_Builder::Error() const { return myError; diff --git a/src/TopoDSToStep/TopoDSToStep_MakeShellBasedSurfaceModel.cxx b/src/TopoDSToStep/TopoDSToStep_MakeShellBasedSurfaceModel.cxx index b0bbf78d5e..1987fc52a6 100644 --- a/src/TopoDSToStep/TopoDSToStep_MakeShellBasedSurfaceModel.cxx +++ b/src/TopoDSToStep/TopoDSToStep_MakeShellBasedSurfaceModel.cxx @@ -58,7 +58,15 @@ TopoDSToStep_MakeShellBasedSurfaceModel:: done = Standard_False; MoniTool_DataMapOfShapeTransient aMap; - const Standard_Integer aWriteTessGeom = Interface_Static::IVal("write.step.tessellated"); + Standard_Integer aWriteTessGeom = Interface_Static::IVal("write.step.tessellated"); + const Standard_Integer aWriteTessSchema = Interface_Static::IVal("write.step.schema"); + if (aWriteTessSchema != 5) + { + aWriteTessGeom = 0; + Handle(TransferBRep_ShapeMapper) anErrShape = + new TransferBRep_ShapeMapper(aFace); + FP->AddWarning(anErrShape, " Tessellation can not be exported into not AP242"); + } TopoDSToStep_Tool aTool(aMap, Standard_False); TopoDSToStep_Builder StepB(aFace, aTool, FP, aWriteTessGeom, theLocalFactors, theProgress); @@ -104,7 +112,6 @@ TopoDSToStep_MakeShellBasedSurfaceModel:: //============================================================================= // Create a ShellBasedSurfaceModel of StepShape from a Shell of TopoDS //============================================================================= - TopoDSToStep_MakeShellBasedSurfaceModel:: TopoDSToStep_MakeShellBasedSurfaceModel(const TopoDS_Shell& aShell, const Handle(Transfer_FinderProcess)& FP, @@ -118,7 +125,15 @@ TopoDSToStep_MakeShellBasedSurfaceModel:: Handle(StepShape_ClosedShell) aClosedShell; MoniTool_DataMapOfShapeTransient aMap; - const Standard_Integer aWriteTessGeom = Interface_Static::IVal("write.step.tessellated"); + Standard_Integer aWriteTessGeom = Interface_Static::IVal("write.step.tessellated"); + const Standard_Integer aWriteTessSchema = Interface_Static::IVal("write.step.schema"); + if (aWriteTessSchema != 5) + { + aWriteTessGeom = 0; + Handle(TransferBRep_ShapeMapper) anErrShape = + new TransferBRep_ShapeMapper(aShell); + FP->AddWarning(anErrShape, " Tessellation can not be exported into not AP242"); + } TopoDSToStep_Tool aTool(aMap, Standard_False); TopoDSToStep_Builder StepB(aShell, aTool, FP, aWriteTessGeom, theLocalFactors, theProgress); @@ -178,7 +193,15 @@ TopoDSToStep_MakeShellBasedSurfaceModel:: TColStd_SequenceOfTransient S; TColStd_SequenceOfTransient aTessShells; - const Standard_Integer aWriteTessGeom = Interface_Static::IVal("write.step.tessellated"); + Standard_Integer aWriteTessGeom = Interface_Static::IVal("write.step.tessellated"); + const Standard_Integer aWriteTessSchema = Interface_Static::IVal("write.step.schema"); + if (aWriteTessSchema != 5) + { + aWriteTessGeom = 0; + Handle(TransferBRep_ShapeMapper) anErrShape = + new TransferBRep_ShapeMapper(aShell); + FP->AddWarning(anErrShape, " Tessellation can not be exported into not AP242"); + } Standard_Integer nbshapes = 0; for (It.Initialize(aSolid); It.More(); It.Next()) diff --git a/src/TopoDSToStep/TopoDSToStep_MakeTessellatedItem.cxx b/src/TopoDSToStep/TopoDSToStep_MakeTessellatedItem.cxx index 07efb29c47..8cf4319f16 100644 --- a/src/TopoDSToStep/TopoDSToStep_MakeTessellatedItem.cxx +++ b/src/TopoDSToStep/TopoDSToStep_MakeTessellatedItem.cxx @@ -19,6 +19,7 @@ #include #include #include +#include #include #include #include @@ -29,28 +30,75 @@ #include //============================================================================= -// +// Method : InitTriangulation +// Purpose : Get parameters from a TriangulatedFace or TriangulatedSurfaceSet +// Poly_Triangulation //============================================================================= +static void InitTriangulation(const Handle(Poly_Triangulation)& theMesh, + const Handle(TCollection_HAsciiString)& theName, + Handle(StepVisual_CoordinatesList)& theCoordinates, + Handle(TColgp_HArray1OfXYZ)& thePoints, + Handle(TColStd_HArray2OfReal)& theNormals, + Handle(TColStd_HArray1OfInteger)& theIndices, + Handle(TColStd_HArray2OfInteger)& theTrias) +{ + for (Standard_Integer aNodeIndex = 1; aNodeIndex <= theMesh->NbNodes(); ++aNodeIndex) + { + thePoints->SetValue(aNodeIndex, theMesh->Node(aNodeIndex).XYZ()); + } + theCoordinates->Init(theName, thePoints); + if (!theMesh->HasNormals()) + { + Poly::ComputeNormals(theMesh); + } + for (Standard_Integer aNodeIndex = 1; aNodeIndex <= theMesh->NbNodes(); ++aNodeIndex) + { + gp_Dir aNorm = theMesh->Normal(aNodeIndex); + theNormals->SetValue(aNodeIndex, 1, aNorm.X()); + theNormals->SetValue(aNodeIndex, 2, aNorm.Y()); + theNormals->SetValue(aNodeIndex, 3, aNorm.Z()); + } + for (Standard_Integer aNodeIndex = 1; aNodeIndex <= theMesh->NbNodes(); ++aNodeIndex) + { + theIndices->SetValue(aNodeIndex, aNodeIndex); + } + for (Standard_Integer aTriangleIndex = 1; aTriangleIndex <= theMesh->NbTriangles(); ++aTriangleIndex) + { + const Poly_Triangle& aT = theMesh->Triangle(aTriangleIndex); + theTrias->SetValue(aTriangleIndex, 1, aT.Value(1)); + theTrias->SetValue(aTriangleIndex, 2, aT.Value(2)); + theTrias->SetValue(aTriangleIndex, 3, aT.Value(3)); + } +} +//============================================================================= +// function: TopoDSToStep_MakeTessellatedItem +// purpose : +//============================================================================= TopoDSToStep_MakeTessellatedItem::TopoDSToStep_MakeTessellatedItem() : TopoDSToStep_Root() { } +//============================================================================= +// function: TopoDSToStep_MakeTessellatedItem +// purpose : +//============================================================================= TopoDSToStep_MakeTessellatedItem:: TopoDSToStep_MakeTessellatedItem(const TopoDS_Face& theFace, TopoDSToStep_Tool& theTool, const Handle(Transfer_FinderProcess)& theFP, + const Standard_Boolean theToPreferSurfaceSet, const Message_ProgressRange& theProgress) : TopoDSToStep_Root() { - Init(theFace, theTool, theFP, theProgress); + Init(theFace, theTool, theFP, theToPreferSurfaceSet, theProgress); } //============================================================================= -// +// function: TopoDSToStep_MakeTessellatedItem +// purpose : //============================================================================= - TopoDSToStep_MakeTessellatedItem:: TopoDSToStep_MakeTessellatedItem(const TopoDS_Shell& theShell, TopoDSToStep_Tool& theTool, @@ -62,83 +110,65 @@ TopoDSToStep_MakeTessellatedItem(const TopoDS_Shell& theShell, } //============================================================================= -// Create a TriangulatedFace of StepVisual from a Face of TopoDS +// Method : Init +// Purpose : Create a TriangulatedFace or TriangulatedSurfaceSet of StepVisual +// from a Face of TopoDS //============================================================================= - void TopoDSToStep_MakeTessellatedItem::Init(const TopoDS_Face& theFace, TopoDSToStep_Tool& theTool, const Handle(Transfer_FinderProcess)& theFP, + const Standard_Boolean theToPreferSurfaceSet, const Message_ProgressRange& theProgress) { done = Standard_False; - if (theProgress.UserBreak()) return; - TopLoc_Location aLoc; const Handle(Poly_Triangulation)& aMesh = BRep_Tool::Triangulation(theFace, aLoc); - if (!aMesh.IsNull()) + if (aMesh.IsNull()) + { + Handle(TransferBRep_ShapeMapper) anErrShape = + new TransferBRep_ShapeMapper(theFace); + theFP->AddWarning(anErrShape, " Face not mapped to TessellatedItem"); + return; + } + Handle(TCollection_HAsciiString) aName = new TCollection_HAsciiString(""); + Handle(StepVisual_CoordinatesList) aCoordinates = new StepVisual_CoordinatesList(); + Handle(TColgp_HArray1OfXYZ) aPoints = new TColgp_HArray1OfXYZ(1, aMesh->NbNodes()); + Handle(TColStd_HArray2OfReal) aNormals = new TColStd_HArray2OfReal(1, aMesh->NbNodes(), 1, 3); + Handle(TColStd_HArray1OfInteger) anIndices = new TColStd_HArray1OfInteger(1, aMesh->NbNodes()); + Handle(TColStd_HArray2OfInteger) aTrias = new TColStd_HArray2OfInteger(1, aMesh->NbTriangles(), 1, 3); + InitTriangulation(aMesh, aName, aCoordinates, aPoints, aNormals, anIndices, aTrias); + + const Standard_Boolean aHasGeomLink = theTool.IsBound(theFace); + StepVisual_FaceOrSurface aGeomLink; + if (aHasGeomLink) { + Handle(StepShape_TopologicalRepresentationItem) aTopoItem = theTool.Find(theFace); + aGeomLink.SetValue(aTopoItem); Handle(StepVisual_TriangulatedFace) aTriaFace = new StepVisual_TriangulatedFace(); - Handle(TCollection_HAsciiString) aName = new TCollection_HAsciiString(""); - Handle(StepVisual_CoordinatesList) aCoordinates = new StepVisual_CoordinatesList(); - Handle(TColgp_HArray1OfXYZ) aPoints = new TColgp_HArray1OfXYZ(1, aMesh->NbNodes()); - for (Standard_Integer i = 1; i <= aMesh->NbNodes(); ++i) - { - aPoints->SetValue(i, aMesh->Node(i).XYZ()); - } - aCoordinates->Init(aName, aPoints); - Handle(TColStd_HArray2OfReal) aNormals = new TColStd_HArray2OfReal(1, aMesh->NbNodes(), 1, 3); - if (!aMesh->HasNormals()) - { - Poly::ComputeNormals(aMesh); - } - for (Standard_Integer i = 1; i <= aMesh->NbNodes(); ++i) - { - gp_Dir aNorm = aMesh->Normal(i); - aNormals->SetValue(i, 1, aNorm.X()); - aNormals->SetValue(i, 2, aNorm.Y()); - aNormals->SetValue(i, 3, aNorm.Z()); - } - const Standard_Boolean aHasGeomLink = theTool.IsBound(theFace); - StepVisual_FaceOrSurface aGeomLink; - if (aHasGeomLink) - { - Handle(StepShape_TopologicalRepresentationItem) aTopoItem = theTool.Find(theFace); - aGeomLink.SetValue(aTopoItem); - } - Handle(TColStd_HArray1OfInteger) anIndices = new TColStd_HArray1OfInteger(1, aMesh->NbNodes()); - for (Standard_Integer i = 1; i <= aMesh->NbNodes(); ++i) - { - anIndices->SetValue(i, i); - } - Handle(TColStd_HArray2OfInteger) aTrias = new TColStd_HArray2OfInteger(1, aMesh->NbTriangles(), 1, 3); - for (Standard_Integer i = 1; i <= aMesh->NbTriangles(); ++i) - { - const Poly_Triangle& aT = aMesh->Triangle(i); - aTrias->SetValue(i, 1, aT.Value(1)); - aTrias->SetValue(i, 2, aT.Value(2)); - aTrias->SetValue(i, 3, aT.Value(3)); - } aTriaFace->Init(aName, aCoordinates, aMesh->NbNodes(), aNormals, aHasGeomLink, aGeomLink, anIndices, aTrias); theTessellatedItem = aTriaFace; - - done = Standard_True; } - else + else if (theToPreferSurfaceSet) { - done = Standard_False; - Handle(TransferBRep_ShapeMapper) anErrShape = - new TransferBRep_ShapeMapper(theFace); - theFP->AddWarning(anErrShape, " Face not mapped to TessellatedItem"); + Handle(StepVisual_TriangulatedSurfaceSet) aTriaSurfaceSet = new StepVisual_TriangulatedSurfaceSet(); + aTriaSurfaceSet->Init(aName, aCoordinates, aMesh->NbNodes(), aNormals, anIndices, aTrias); + theTessellatedItem = aTriaSurfaceSet; } - + else + { + Handle(StepVisual_TriangulatedFace) aTriaFace = new StepVisual_TriangulatedFace(); + aTriaFace->Init(aName, aCoordinates, aMesh->NbNodes(), aNormals, aHasGeomLink, aGeomLink, anIndices, aTrias); + theTessellatedItem = aTriaFace; + } + done = Standard_True; } //============================================================================= -// Create a TesselatedShell of StepVisual from a Shell of TopoDS +// Method : Init +// Purpose : Create a TesselatedShell of StepVisual from a Shell of TopoDS //============================================================================= - void TopoDSToStep_MakeTessellatedItem::Init(const TopoDS_Shell& theShell, TopoDSToStep_Tool& theTool, const Handle(Transfer_FinderProcess)& theFP, @@ -160,7 +190,7 @@ void TopoDSToStep_MakeTessellatedItem::Init(const TopoDS_Shell& theShell, for (anExp.Init(theShell, TopAbs_FACE); anExp.More() && aPS.More(); anExp.Next(), aPS.Next()) { const TopoDS_Face aFace = TopoDS::Face(anExp.Current()); - TopoDSToStep_MakeTessellatedItem aMakeFace(aFace, theTool, theFP, aPS.Next()); + TopoDSToStep_MakeTessellatedItem aMakeFace(aFace, theTool, theFP, Standard_False, aPS.Next()); if (aMakeFace.IsDone()) { aTessFaces.Append(Handle(StepVisual_TessellatedStructuredItem)::DownCast(aMakeFace.Value())); @@ -177,9 +207,9 @@ void TopoDSToStep_MakeTessellatedItem::Init(const TopoDS_Shell& theShell, Handle(StepVisual_HArray1OfTessellatedStructuredItem) anItems = new StepVisual_HArray1OfTessellatedStructuredItem(1, aTessFaces.Size()); - for (Standard_Integer i = aTessFaces.Lower(); i <= aTessFaces.Upper(); ++i) + for (Standard_Integer anIndx = aTessFaces.Lower(); anIndx <= aTessFaces.Upper(); ++anIndx) { - anItems->SetValue(i, aTessFaces.Value(i)); + anItems->SetValue(anIndx, aTessFaces.Value(anIndx)); } Handle(StepShape_ConnectedFaceSet) aFaceSet; @@ -198,10 +228,9 @@ void TopoDSToStep_MakeTessellatedItem::Init(const TopoDS_Shell& theShell, } // ============================================================================ -// Method : TopoDSToStep_MakeTessellatedItem::Value +// Method : Value // Purpose : Returns TessellatedItem as the result // ============================================================================ - const Handle(StepVisual_TessellatedItem) & TopoDSToStep_MakeTessellatedItem::Value() const { diff --git a/src/TopoDSToStep/TopoDSToStep_MakeTessellatedItem.hxx b/src/TopoDSToStep/TopoDSToStep_MakeTessellatedItem.hxx index 41a2cb8b2d..8656cdf558 100644 --- a/src/TopoDSToStep/TopoDSToStep_MakeTessellatedItem.hxx +++ b/src/TopoDSToStep/TopoDSToStep_MakeTessellatedItem.hxx @@ -40,6 +40,7 @@ public: Standard_EXPORT TopoDSToStep_MakeTessellatedItem(const TopoDS_Face& theFace, TopoDSToStep_Tool& theTool, const Handle(Transfer_FinderProcess)& theFP, + const Standard_Boolean theToPreferSurfaceSet, const Message_ProgressRange& theProgress = Message_ProgressRange()); Standard_EXPORT TopoDSToStep_MakeTessellatedItem(const TopoDS_Shell& theShell, @@ -50,6 +51,7 @@ public: Standard_EXPORT void Init(const TopoDS_Face& theFace, TopoDSToStep_Tool& theTool, const Handle(Transfer_FinderProcess)& theFP, + const Standard_Boolean theToPreferSurfaceSet, const Message_ProgressRange& theProgress = Message_ProgressRange()); Standard_EXPORT void Init(const TopoDS_Shell& theShell, @@ -59,28 +61,10 @@ public: Standard_EXPORT const Handle(StepVisual_TessellatedItem)& Value() const; - - - -protected: - - - - - private: - - Handle(StepVisual_TessellatedItem) theTessellatedItem; - }; - - - - - - #endif // _TopoDSToStep_MakeTessellatedItem_HeaderFile diff --git a/tests/de_mesh/step_read/begin b/tests/de_mesh/step_read/begin index 07d984e683..3e8a24792d 100644 --- a/tests/de_mesh/step_read/begin +++ b/tests/de_mesh/step_read/begin @@ -1,5 +1,7 @@ pload XDE OCAF MODELING # enable reading/writing tessellated STEP geometry +param write.step.schema AP242DIS param read.step.tessellated On param write.step.tessellated On +newmodel diff --git a/tests/de_mesh/step_read/end b/tests/de_mesh/step_read/end index fd5f18a17d..c3cd6e0c41 100644 --- a/tests/de_mesh/step_read/end +++ b/tests/de_mesh/step_read/end @@ -16,5 +16,6 @@ vdump ${imagedir}/${casename}.png Close D -silent unset S +param write.step.schema AP214CD param read.step.tessellated Off param write.step.tessellated Off diff --git a/tests/de_mesh/step_write/D1 b/tests/de_mesh/step_write/D1 new file mode 100644 index 0000000000..095589c413 --- /dev/null +++ b/tests/de_mesh/step_write/D1 @@ -0,0 +1,8 @@ +# load from mesh (XBF) format + +XOpen [locate_data_file "bug32666.xbf"] D1 +XGetOneShape S D1 + +set nb_faces 3 +set nb_nodes 428 +set nb_triangles 372 diff --git a/tests/de_mesh/step_write/D2 b/tests/de_mesh/step_write/D2 new file mode 100644 index 0000000000..102f062906 --- /dev/null +++ b/tests/de_mesh/step_write/D2 @@ -0,0 +1,8 @@ +# load from mesh (STEP) format +ReadStep D1 [locate_data_file "bug30024_tessell.stp"] +XGetOneShape S D1 +newmodel + +set nb_faces 131 +set nb_nodes 2216 +set nb_triangles 2118 diff --git a/tests/de_mesh/step_write/begin b/tests/de_mesh/step_write/begin index 07d984e683..3e8a24792d 100644 --- a/tests/de_mesh/step_write/begin +++ b/tests/de_mesh/step_write/begin @@ -1,5 +1,7 @@ pload XDE OCAF MODELING # enable reading/writing tessellated STEP geometry +param write.step.schema AP242DIS param read.step.tessellated On param write.step.tessellated On +newmodel diff --git a/tests/de_mesh/step_write/end b/tests/de_mesh/step_write/end index 3a5f84ddcf..d57a37aa14 100644 --- a/tests/de_mesh/step_write/end +++ b/tests/de_mesh/step_write/end @@ -1,4 +1,3 @@ - # save the initial shape to STEP stepwrite a S "${imagedir}/${casename}.stp" @@ -29,5 +28,6 @@ unset S unset S1 # restore reading/writing tessellated STEP geometry default parameters +param write.step.schema AP214CD param read.step.tessellated On param write.step.tessellated OnNoBRep From f0c6e6fc8d1862414826b07cb485d950a45e7efb Mon Sep 17 00:00:00 2001 From: akaftasev Date: Wed, 25 Oct 2023 12:32:49 +0100 Subject: [PATCH 510/639] 0033515: Modeling Algorithm - BRepExtrema_DistShapeShape poduces wrong result Changed redundant square operation --- src/Extrema/Extrema_GenExtCC.gxx | 2 +- src/Extrema/Extrema_GlobOptFuncCC.cxx | 4 ++-- tests/bugs/modalg_8/bug33515 | 14 ++++++++++++++ tests/lowalgos/extcc/bug32882 | 2 +- tests/perf/modalg/bug32539_1 | 1 + tests/perf/modalg/bug32539_2 | 1 + 6 files changed, 20 insertions(+), 4 deletions(-) create mode 100644 tests/bugs/modalg_8/bug33515 diff --git a/src/Extrema/Extrema_GenExtCC.gxx b/src/Extrema/Extrema_GenExtCC.gxx index 33826fc5c8..8c48e74fe3 100644 --- a/src/Extrema/Extrema_GenExtCC.gxx +++ b/src/Extrema/Extrema_GenExtCC.gxx @@ -627,7 +627,7 @@ void Extrema_GenExtCC::Perform() { Standard_Real aDist1 = ProjPOnC(C1.Value(aT1[iT]), anExtPC2); Standard_Real aDist2 = ProjPOnC(C2.Value(aT2[iT]), anExtPC1); - isParallel = (Abs(Min(aDist1, aDist2) - aF) < Precision::Confusion()); + isParallel = (Abs(Min(aDist1, aDist2) - aF * aF) < Precision::Confusion()); } } diff --git a/src/Extrema/Extrema_GlobOptFuncCC.cxx b/src/Extrema/Extrema_GlobOptFuncCC.cxx index 93b5fd60b0..a3db239f84 100644 --- a/src/Extrema/Extrema_GlobOptFuncCC.cxx +++ b/src/Extrema/Extrema_GlobOptFuncCC.cxx @@ -43,7 +43,7 @@ static Standard_Boolean _Value(const Adaptor3d_Curve& C1, return Standard_False; } - F = C2.Value(v).SquareDistance(C1.Value(u)); + F = C2.Value(v).Distance(C1.Value(u)); return Standard_True; } @@ -64,7 +64,7 @@ static Standard_Boolean _Value(const Adaptor2d_Curve2d& C1, return Standard_False; } - F = C2.Value(v).SquareDistance(C1.Value(u)); + F = C2.Value(v).Distance(C1.Value(u)); return Standard_True; } diff --git a/tests/bugs/modalg_8/bug33515 b/tests/bugs/modalg_8/bug33515 new file mode 100644 index 0000000000..de54420d44 --- /dev/null +++ b/tests/bugs/modalg_8/bug33515 @@ -0,0 +1,14 @@ +puts "================================" +puts " 0033515: Modeling Algorithm - BRepExtrema_DistShapeShape poduces wrong result" +puts "================================" + +restore [locate_data_file bug33515_w1.brep] w1 +restore [locate_data_file bug33515_w2.brep] w2 + +distmini d w1 w2 +set dist [dval d_val] +if { $dist < 3.e-10 } { + puts "OK: Extrema is valid" +} else { + puts "Error: Extrema distance is too big" +} diff --git a/tests/lowalgos/extcc/bug32882 b/tests/lowalgos/extcc/bug32882 index 9e91bbedf6..5e5b1c1b36 100644 --- a/tests/lowalgos/extcc/bug32882 +++ b/tests/lowalgos/extcc/bug32882 @@ -24,7 +24,7 @@ if { [llength $info] != 3 } { # Check result checklength ext_1 -l 2.929642751e-14 -eps .01 checklength ext_2 -l 3.480934286e-14 -eps .01 -checklength ext_3 -l 3.177643716e-14 -eps .01 +checklength ext_3 -l 2.929642751054232-14 -eps .01 # Run extrema c3/c2 set info [extrema c3 c2] diff --git a/tests/perf/modalg/bug32539_1 b/tests/perf/modalg/bug32539_1 index 6c7a4333c3..3f83381f65 100644 --- a/tests/perf/modalg/bug32539_1 +++ b/tests/perf/modalg/bug32539_1 @@ -5,6 +5,7 @@ puts "" # prepare pload XDE OCAF +cpulimit 1000 XOpen [locate_data_file bug32539_1.xbf] XB XGetShape s1 XB 0:1:1:2 XGetShape s2 XB 0:1:1:4 diff --git a/tests/perf/modalg/bug32539_2 b/tests/perf/modalg/bug32539_2 index 6d9edaf06d..5d7bbc27e1 100644 --- a/tests/perf/modalg/bug32539_2 +++ b/tests/perf/modalg/bug32539_2 @@ -8,6 +8,7 @@ restore [locate_data_file 5000-12.brep] s1 restore [locate_data_file BPLSEITLI.brep] s2 # multi-thread +cpulimit 1000 dchrono p reset; dchrono p start; set pres [distmini res s1 s2 -parallel] dchrono p stop; From 588ee924e4772389438621106d37144abb694b14 Mon Sep 17 00:00:00 2001 From: ichesnok Date: Mon, 25 Sep 2023 11:04:05 +0100 Subject: [PATCH 511/639] 0033491: Data Exchange, Step Import - Incorrect import of ComplexTriangulatedFace Reading and writing of triangle_strips and triangle_fans has been corrected in RWStepVisual_RWComplexTriangulatedFace.cxx file. And corresponding corrections have been added to other files. --- ...RWStepVisual_RWComplexTriangulatedFace.cxx | 36 ++-- ...isual_RWTessellatedShapeRepresentation.cxx | 10 +- .../StepToTopoDS_TranslateFace.cxx | 202 +++--------------- .../StepToTopoDS_TranslateFace.hxx | 3 +- .../StepVisual_ComplexTriangulatedFace.cxx | 16 +- .../StepVisual_ComplexTriangulatedFace.hxx | 18 +- tests/de_mesh/step_read/A2 | 2 +- 7 files changed, 73 insertions(+), 214 deletions(-) diff --git a/src/RWStepVisual/RWStepVisual_RWComplexTriangulatedFace.cxx b/src/RWStepVisual/RWStepVisual_RWComplexTriangulatedFace.cxx index 266d02d91a..7ae9ded12a 100644 --- a/src/RWStepVisual/RWStepVisual_RWComplexTriangulatedFace.cxx +++ b/src/RWStepVisual/RWStepVisual_RWComplexTriangulatedFace.cxx @@ -27,7 +27,7 @@ #include #include #include -#include +#include //======================================================================= //function : RWStepVisual_RWComplexTriangulatedFace @@ -118,15 +118,16 @@ void RWStepVisual_RWComplexTriangulatedFace::ReadStep (const Handle(StepData_Ste } } - Handle(TColStd_HArray2OfInteger) aTriangleStrips; + Handle(TColStd_HArray1OfTransient) aTriangleStrips; Standard_Integer sub7 = 0; if (theData->ReadSubList(theNum, 7, "triangle_strips", theCheck, sub7)) { Standard_Integer nb0 = theData->NbParams(sub7); - Standard_Integer nbj0 = theData->NbParams(theData->ParamNumber(sub7,1)); - aTriangleStrips = new TColStd_HArray2OfInteger(1, nb0, 1, nbj0); + aTriangleStrips = new TColStd_HArray1OfTransient(1, nb0); for (Standard_Integer i0 = 1; i0 <= nb0; i0++) { + Standard_Integer nbj0 = theData->NbParams(theData->ParamNumber(sub7, i0)); + Handle(TColStd_HArray1OfInteger) aSingleTriangleStrip = new TColStd_HArray1OfInteger(1, nbj0); Standard_Integer subj7 = 0; if ( theData->ReadSubList (sub7, i0, "sub-part(triangle_strips)", theCheck, subj7) ) { Standard_Integer num4 = subj7; @@ -134,21 +135,23 @@ void RWStepVisual_RWComplexTriangulatedFace::ReadStep (const Handle(StepData_Ste { Standard_Integer anIt0; theData->ReadInteger(num4, j0, "integer", theCheck, anIt0); - aTriangleStrips->SetValue(i0,j0, anIt0); + aSingleTriangleStrip->SetValue(j0, anIt0); } + aTriangleStrips->SetValue(i0, aSingleTriangleStrip); } } } - Handle(TColStd_HArray2OfInteger) aTriangleFans; + Handle(TColStd_HArray1OfTransient) aTriangleFans; Standard_Integer sub8 = 0; if (theData->ReadSubList(theNum, 8, "triangle_fans", theCheck, sub8)) { Standard_Integer nb0 = theData->NbParams(sub8); - Standard_Integer nbj0 = theData->NbParams(theData->ParamNumber(sub8,1)); - aTriangleFans = new TColStd_HArray2OfInteger(1, nb0, 1, nbj0); + aTriangleFans = new TColStd_HArray1OfTransient(1, nb0); for (Standard_Integer i0 = 1; i0 <= nb0; i0++) { + Standard_Integer nbj0 = theData->NbParams(theData->ParamNumber(sub8, i0)); + Handle(TColStd_HArray1OfInteger) aSingleTriangleFan = new TColStd_HArray1OfInteger(1, nbj0); Standard_Integer subj8 = 0; if ( theData->ReadSubList (sub8, i0, "sub-part(triangle_fans)", theCheck, subj8) ) { Standard_Integer num4 = subj8; @@ -156,8 +159,9 @@ void RWStepVisual_RWComplexTriangulatedFace::ReadStep (const Handle(StepData_Ste { Standard_Integer anIt0; theData->ReadInteger(num4, j0, "integer", theCheck, anIt0); - aTriangleFans->SetValue(i0,j0, anIt0); + aSingleTriangleFan->SetValue(j0, anIt0); } + aTriangleFans->SetValue(i0, aSingleTriangleFan); } } } @@ -219,13 +223,14 @@ void RWStepVisual_RWComplexTriangulatedFace::WriteStep (StepData_StepWriter& the theSW.CloseSub(); theSW.OpenSub(); - for (Standard_Integer i6 = 1; i6 <= theEnt->TriangleStrips()->RowLength(); i6++) + for (Standard_Integer i6 = 1; i6 <= theEnt->NbTriangleStrips(); i6++) { theSW.NewLine(Standard_False); theSW.OpenSub(); - for (Standard_Integer j6 = 1; j6 <= theEnt->TriangleStrips()->ColLength(); j6++) + Handle(TColStd_HArray1OfInteger) aTriangleStrip = Handle(TColStd_HArray1OfInteger)::DownCast(theEnt->TriangleStrips()->Value(i6)); + for (Standard_Integer j6 = 1; j6 <= aTriangleStrip->Length(); j6++) { - Standard_Integer Var0 = theEnt->TriangleStrips()->Value(i6,j6); + Standard_Integer Var0 = aTriangleStrip->Value(j6); theSW.Send(Var0); } theSW.CloseSub(); @@ -233,13 +238,14 @@ void RWStepVisual_RWComplexTriangulatedFace::WriteStep (StepData_StepWriter& the theSW.CloseSub(); theSW.OpenSub(); - for (Standard_Integer i7 = 1; i7 <= theEnt->TriangleFans()->RowLength(); i7++) + for (Standard_Integer i7 = 1; i7 <= theEnt->NbTriangleFans(); i7++) { theSW.NewLine(Standard_False); theSW.OpenSub(); - for (Standard_Integer j7 = 1; j7 <= theEnt->TriangleFans()->ColLength(); j7++) + Handle(TColStd_HArray1OfInteger) aTriangleFan = Handle(TColStd_HArray1OfInteger)::DownCast(theEnt->TriangleFans()->Value(i7)); + for (Standard_Integer j7 = 1; j7 <= aTriangleFan->Length(); j7++) { - Standard_Integer Var0 = theEnt->TriangleFans()->Value(i7,j7); + Standard_Integer Var0 = aTriangleFan->Value(j7); theSW.Send(Var0); } theSW.CloseSub(); diff --git a/src/RWStepVisual/RWStepVisual_RWTessellatedShapeRepresentation.cxx b/src/RWStepVisual/RWStepVisual_RWTessellatedShapeRepresentation.cxx index 3bae89fde1..f38aecf2bb 100644 --- a/src/RWStepVisual/RWStepVisual_RWTessellatedShapeRepresentation.cxx +++ b/src/RWStepVisual/RWStepVisual_RWTessellatedShapeRepresentation.cxx @@ -114,11 +114,13 @@ Interface_EntityIterator& theIter) const { // Inherited fields of Representation - - for (Standard_Integer i1 = 1; i1 <= theEnt->StepRepr_Representation::Items()->Length(); i1++) + if (!theEnt->StepRepr_Representation::Items().IsNull()) { - Handle(StepRepr_RepresentationItem) Var0 = theEnt->StepRepr_Representation::Items()->Value(i1); - theIter.AddItem(Var0); + for (Standard_Integer i1 = 1; i1 <= theEnt->StepRepr_Representation::Items()->Length(); i1++) + { + Handle(StepRepr_RepresentationItem) Var0 = theEnt->StepRepr_Representation::Items()->Value(i1); + theIter.AddItem(Var0); + } } theIter.AddItem(theEnt->StepRepr_Representation::ContextOfItems()); diff --git a/src/StepToTopoDS/StepToTopoDS_TranslateFace.cxx b/src/StepToTopoDS/StepToTopoDS_TranslateFace.cxx index c6e70f83cd..4c0462a2c6 100644 --- a/src/StepToTopoDS/StepToTopoDS_TranslateFace.cxx +++ b/src/StepToTopoDS/StepToTopoDS_TranslateFace.cxx @@ -108,7 +108,6 @@ namespace { Handle(TColStd_HArray1OfInteger)& thePnindices, const Standard_Real theLengthFactor) { - //const Standard_Real aLF = StepData_GlobalFactors::Intance().LengthFactor(); for (Standard_Integer aPnIndex = 1; aPnIndex <= theMesh->NbNodes(); ++aPnIndex) { const gp_XYZ& aPoint = theNodes->Value(thePnindices->Value(aPnIndex)); @@ -152,72 +151,6 @@ namespace { } } - // ============================================================================ - // Method : SetTriangles - // Purpose : Set triangles to the triangulation from an array - // ============================================================================ - static void SetTriangles(const Handle(Poly_Triangulation)& theMesh, - const Handle(TColStd_HArray2OfInteger) theTriangles, - const Standard_Integer theTrianStripsNum, - const Handle(TColStd_HArray2OfInteger)& theTrianStrips, - const Standard_Integer theTrianFansNum, - const Handle(TColStd_HArray2OfInteger)& theTrianFans) - { - if (theTrianStripsNum == 0 && theTrianFansNum == 0) - { - for (Standard_Integer aTrianIndex = 1; aTrianIndex <= theMesh->NbTriangles(); ++aTrianIndex) - { - theMesh->SetTriangle(aTrianIndex, - Poly_Triangle(theTriangles->Value(aTrianIndex, 1), - theTriangles->Value(aTrianIndex, 2), - theTriangles->Value(aTrianIndex, 3))); - } - } - else - { - Standard_Integer aTriangleIndex = 1; - for (Standard_Integer aTrianStripIndex = 1; aTrianStripIndex <= theTrianStripsNum; ++aTrianStripIndex) - { - for (Standard_Integer anUCIndex = 3; anUCIndex <= theTrianStrips->UpperCol(); anUCIndex += 2) - { - if (theTrianStrips->Value(aTrianStripIndex, anUCIndex) != theTrianStrips->Value(aTrianStripIndex, anUCIndex - 2) && - theTrianStrips->Value(aTrianStripIndex, anUCIndex) != theTrianStrips->Value(aTrianStripIndex, anUCIndex - 1)) - { - theMesh->SetTriangle(aTriangleIndex++, - Poly_Triangle(theTrianStrips->Value(aTrianStripIndex, anUCIndex - 2), - theTrianStrips->Value(aTrianStripIndex, anUCIndex), - theTrianStrips->Value(aTrianStripIndex, anUCIndex - 1))); - } - } - for (Standard_Integer anUCIndex = 4; anUCIndex <= theTrianStrips->UpperCol(); anUCIndex += 2) - { - if (theTrianStrips->Value(aTrianStripIndex, anUCIndex) != theTrianStrips->Value(aTrianStripIndex, anUCIndex - 2) - && theTrianStrips->Value(aTrianStripIndex, anUCIndex) != theTrianStrips->Value(aTrianStripIndex, anUCIndex - 1)) - { - theMesh->SetTriangle(aTriangleIndex++, - Poly_Triangle(theTrianStrips->Value(aTrianStripIndex, anUCIndex - 2), - theTrianStrips->Value(aTrianStripIndex, anUCIndex - 1), - theTrianStrips->Value(aTrianStripIndex, anUCIndex))); - } - } - } - for (Standard_Integer aTrianFanIndex = 1; aTrianFanIndex <= theTrianFansNum; ++aTrianFanIndex) - { - for (Standard_Integer anUCIndex = 3; anUCIndex <= theTrianFans->UpperCol(); ++anUCIndex) - { - if (theTrianFans->Value(aTrianFanIndex, anUCIndex) != theTrianFans->Value(aTrianFanIndex, anUCIndex - 2) - && theTrianFans->Value(aTrianFanIndex, anUCIndex - 1) != theTrianFans->Value(aTrianFanIndex, anUCIndex - 2)) - { - theMesh->SetTriangle(aTriangleIndex++, - Poly_Triangle(theTrianStrips->Value(aTrianFanIndex, anUCIndex - 2), - theTrianStrips->Value(aTrianFanIndex, anUCIndex - 1), - theTrianStrips->Value(aTrianFanIndex, anUCIndex))); - } - } - } - } - } - // ============================================================================ // Method : SetTriangles // Purpose : Set triangles to the triangulation from an array @@ -273,9 +206,9 @@ namespace { if (aTriangleFan->Value(anIndex) != aTriangleFan->Value(anIndex - 2) && aTriangleFan->Value(anIndex - 1) != aTriangleFan->Value(anIndex - 2)) { - theMesh->SetTriangle(aTriangleIndex++, Poly_Triangle(aTriangleFan->Value(anIndex - 2), - aTriangleFan->Value(anIndex - 1), - aTriangleFan->Value(anIndex))); + theMesh->SetTriangle(aTriangleIndex++, Poly_Triangle(aTriangleFan->Value(1), + aTriangleFan->Value(anIndex), + aTriangleFan->Value(anIndex - 1))); } } } @@ -317,8 +250,8 @@ namespace { static void GetComplexFaceElements(Type theFace, Handle(TColgp_HArray1OfXYZ)& theNodes, Handle(TColStd_HArray2OfReal)& theNormals, - Handle(TColStd_HArray2OfInteger)& theTriangleStrips, - Handle(TColStd_HArray2OfInteger)& theTriangleFans, + Handle(TColStd_HArray1OfTransient)& theTriangleStrips, + Handle(TColStd_HArray1OfTransient)& theTriangleFans, Standard_Integer& thePnIndNb, Standard_Integer& theNormNb, Standard_Integer& theTriStripsNb, @@ -340,37 +273,6 @@ namespace { } } - // ============================================================================ -// Method : GetComplexFaceSetElements -// Purpose : Get elements from complex face -// ============================================================================ - template - static void GetComplexFaceSetElements(Type theFace, - Handle(TColgp_HArray1OfXYZ)& theNodes, - Handle(TColStd_HArray2OfReal)& theNormals, - Handle(TColStd_HArray1OfTransient)& theTriangleStrips, - Handle(TColStd_HArray1OfTransient)& theTriangleFans, - Standard_Integer& thePnIndNb, - Standard_Integer& theNormNb, - Standard_Integer& theTriStripsNb, - Standard_Integer& theTriFansNb, - Handle(TColStd_HArray1OfInteger)& thePnindices) - { - theNodes = theFace->Coordinates()->Points(); - theNormals = theFace->Normals(); - theTriangleStrips = theFace->TriangleStrips(); - theTriangleFans = theFace->TriangleFans(); - thePnIndNb = theFace->NbPnindex(); - theNormNb = theFace->NbNormals(); - theTriStripsNb = theFace->NbTriangleStrips(); - theTriFansNb = theFace->NbTriangleFans(); - thePnindices = new TColStd_HArray1OfInteger(1, thePnIndNb); - for (Standard_Integer anIndx = 1; anIndx <= thePnIndNb; ++anIndx) - { - thePnindices->SetValue(anIndx, theFace->PnindexValue(anIndx)); - } - } - // ============================================================================ // Method : CreatePolyTriangulation // Purpose : Create PolyTriangulation @@ -392,14 +294,11 @@ namespace { Standard_Integer aTrianNum = 0; Handle(TColStd_HArray1OfInteger) aPnindices; - Handle(TColStd_HArray2OfInteger) aTriaStrips; - Handle(TColStd_HArray2OfInteger) aTriaFans; + Handle(TColStd_HArray1OfTransient) aTriaStrips; + Handle(TColStd_HArray1OfTransient) aTriaFans; Standard_Integer aTrianStripsNum = 0; Standard_Integer aTrianFansNum = 0; - Handle(TColStd_HArray1OfTransient) aTriaStrips1; - Handle(TColStd_HArray1OfTransient) aTriaFans1; - if (theTI->IsKind(STANDARD_TYPE(StepVisual_TriangulatedFace))) { Handle(StepVisual_TriangulatedFace) aTF = Handle(StepVisual_TriangulatedFace)::DownCast(theTI); @@ -418,7 +317,7 @@ namespace { else if (theTI->IsKind(STANDARD_TYPE(StepVisual_ComplexTriangulatedSurfaceSet))) { Handle(StepVisual_ComplexTriangulatedSurfaceSet) aTSS = Handle(StepVisual_ComplexTriangulatedSurfaceSet)::DownCast(theTI); - GetComplexFaceSetElements(aTSS, aNodes, aNormals, aTriaStrips1, aTriaFans1, aNumPnindex, aNormNum, aTrianStripsNum, aTrianFansNum, aPnindices); + GetComplexFaceElements(aTSS, aNodes, aNormals, aTriaStrips, aTriaFans, aNumPnindex, aNormNum, aTrianStripsNum, aTrianFansNum, aPnindices); } else { @@ -436,59 +335,28 @@ namespace { { Standard_Integer aNbTriaStrips = 0; Standard_Integer aNbTriaFans = 0; - if (aTriaStrips1.IsNull() && aTriaFans1.IsNull()) + + for (Standard_Integer aTrianStripIndex = 1; aTrianStripIndex <= aTrianStripsNum; ++aTrianStripIndex) { - for (Standard_Integer aTrianStripIndex = 1; aTrianStripIndex <= aTrianStripsNum; ++aTrianStripIndex) + Handle(TColStd_HArray1OfInteger) aTriangleStrip = Handle(TColStd_HArray1OfInteger)::DownCast(aTriaStrips->Value(aTrianStripIndex)); + for (Standard_Integer anIndex = 3; anIndex <= aTriangleStrip->Length(); anIndex += 2) { - for (Standard_Integer anUCIndex = 3; anUCIndex <= aTriaStrips->UpperCol(); anUCIndex += 2) - { - if (aTriaStrips->Value(aTrianStripIndex, anUCIndex) != aTriaStrips->Value(aTrianStripIndex, anUCIndex - 2) && - aTriaStrips->Value(aTrianStripIndex, anUCIndex) != aTriaStrips->Value(aTrianStripIndex, anUCIndex - 1)) - ++aNbTriaStrips; - } - for (Standard_Integer anUCIndex = 4; anUCIndex <= aTriaStrips->UpperCol(); anUCIndex += 2) - { - if (aTriaStrips->Value(aTrianStripIndex, anUCIndex) != aTriaStrips->Value(aTrianStripIndex, anUCIndex - 2) && - aTriaStrips->Value(aTrianStripIndex, anUCIndex) != aTriaStrips->Value(aTrianStripIndex, anUCIndex - 1)) - ++aNbTriaStrips; - } + if (aTriangleStrip->Value(anIndex) != aTriangleStrip->Value(anIndex - 2) && + aTriangleStrip->Value(anIndex) != aTriangleStrip->Value(anIndex - 1)) + ++aNbTriaStrips; } - - for (Standard_Integer aTrianFanIndex = 1; aTrianFanIndex <= aTrianFansNum; ++aTrianFanIndex) + for (Standard_Integer anIndex = 4; anIndex <= aTriangleStrip->Length(); anIndex += 2) { - Standard_Integer aFirst = aTriaStrips->Value(aTrianFanIndex, 1); - for (Standard_Integer anUCIndex = 3; anUCIndex <= aTriaStrips->UpperCol(); ++anUCIndex) - { - if (aTriaStrips->Value(aTrianFanIndex, anUCIndex) != aFirst && - aTriaStrips->Value(aTrianFanIndex, anUCIndex - 1) != aFirst) - ++aNbTriaFans; - } + if (aTriangleStrip->Value(anIndex) != aTriangleStrip->Value(anIndex - 2) && + aTriangleStrip->Value(anIndex) != aTriangleStrip->Value(anIndex - 1)) + ++aNbTriaStrips; } } - else - { - for (Standard_Integer aTrianStripIndex = 1; aTrianStripIndex <= aTrianStripsNum; ++aTrianStripIndex) - { - Handle(TColStd_HArray1OfInteger) aTriangleStrip = Handle(TColStd_HArray1OfInteger)::DownCast(aTriaStrips1->Value(aTrianStripIndex)); - for (Standard_Integer anIndex = 3; anIndex <= aTriangleStrip->Length(); anIndex += 2) - { - if (aTriangleStrip->Value(anIndex) != aTriangleStrip->Value(anIndex - 2) && - aTriangleStrip->Value(anIndex) != aTriangleStrip->Value(anIndex - 1)) - ++aNbTriaStrips; - } - for (Standard_Integer anIndex = 4; anIndex <= aTriangleStrip->Length(); anIndex += 2) - { - if (aTriangleStrip->Value(anIndex) != aTriangleStrip->Value(anIndex - 2) && - aTriangleStrip->Value(anIndex) != aTriangleStrip->Value(anIndex - 1)) - ++aNbTriaStrips; - } - } - for (Standard_Integer aTrianFanIndex = 1; aTrianFanIndex <= aTrianFansNum; ++aTrianFanIndex) - { - Handle(TColStd_HArray1OfInteger) aTriangleFan = Handle(TColStd_HArray1OfInteger)::DownCast(aTriaFans1->Value(aTrianFansNum)); - aNbTriaFans += aTriangleFan->Length() - 2; - } + for (Standard_Integer aTrianFanIndex = 1; aTrianFanIndex <= aTrianFansNum; ++aTrianFanIndex) + { + Handle(TColStd_HArray1OfInteger) aTriangleFan = Handle(TColStd_HArray1OfInteger)::DownCast(aTriaFans->Value(aTrianFanIndex)); + aNbTriaFans += aTriangleFan->Length() - 2; } aMesh = new Poly_Triangulation(aNumPnindex, aNbTriaStrips + aNbTriaFans, aHasUVNodes, aHasNormals); @@ -501,14 +369,7 @@ namespace { SetNormals(aMesh, aNormals, aNormNum, aNumPnindex); } - if (aTriaStrips1.IsNull() && aTriaFans1.IsNull()) - { - SetTriangles(aMesh, aTriangles, aTrianStripsNum, aTriaStrips, aTrianFansNum, aTriaFans); - } - else - { - SetTriangles(aMesh, aTriangles, aTrianStripsNum, aTriaStrips1, aTrianFansNum, aTriaFans1); - } + SetTriangles(aMesh, aTriangles, aTrianStripsNum, aTriaStrips, aTrianFansNum, aTriaFans); return aMesh; } @@ -927,7 +788,7 @@ void StepToTopoDS_TranslateFace::Init(const Handle(StepVisual_TessellatedSurface } else if (DeclareAndCast(StepVisual_ComplexTriangulatedSurfaceSet, aCompTriaSS, theTSS)) { - aMesh = createComplexMesh(aCompTriaSS, theLocalFactors); + aMesh = createMesh(aCompTriaSS, theLocalFactors); } else { @@ -950,7 +811,8 @@ void StepToTopoDS_TranslateFace::Init(const Handle(StepVisual_TessellatedSurface // ============================================================================ // Method : createMesh -// Purpose : creates a Poly_Triangulation from TriangulatedFace or TriangulatedSurfaceSet +// Purpose : creates a Poly_Triangulation from simple/complex +// TriangulatedFace or TriangulatedSurfaceSet // ============================================================================ Handle(Poly_Triangulation) StepToTopoDS_TranslateFace::createMesh(const Handle(StepVisual_TessellatedItem)& theTI, @@ -959,16 +821,6 @@ Handle(Poly_Triangulation) return CreatePolyTriangulation(theTI, theLocalFactors); } -// ============================================================================ -// Method : createComplexMesh -// Purpose : creates a Poly_Triangulation from ComplexTriangulatedFace or ComplexTriangulatedSurfaceSet -// ============================================================================ -Handle(Poly_Triangulation) - StepToTopoDS_TranslateFace::createComplexMesh(const Handle(StepVisual_TessellatedItem)& theTI, - const StepData_Factors& theLocalFactors) const -{ - return CreatePolyTriangulation(theTI, theLocalFactors);} - // ============================================================================ // Method : Value // Purpose : Return the mapped Shape diff --git a/src/StepToTopoDS/StepToTopoDS_TranslateFace.hxx b/src/StepToTopoDS/StepToTopoDS_TranslateFace.hxx index 8955a89804..865e189ba2 100644 --- a/src/StepToTopoDS/StepToTopoDS_TranslateFace.hxx +++ b/src/StepToTopoDS/StepToTopoDS_TranslateFace.hxx @@ -86,8 +86,7 @@ private: Handle(Poly_Triangulation) createMesh(const Handle(StepVisual_TessellatedItem)& theTI, const StepData_Factors& theLocalFactors) const; - Handle(Poly_Triangulation) createComplexMesh(const Handle(StepVisual_TessellatedItem)& theTI, - const StepData_Factors& theLocalFactors) const; + StepToTopoDS_TranslateFaceError myError; TopoDS_Shape myResult; diff --git a/src/StepVisual/StepVisual_ComplexTriangulatedFace.cxx b/src/StepVisual/StepVisual_ComplexTriangulatedFace.cxx index 741603f545..57e573641c 100644 --- a/src/StepVisual/StepVisual_ComplexTriangulatedFace.cxx +++ b/src/StepVisual/StepVisual_ComplexTriangulatedFace.cxx @@ -39,8 +39,8 @@ void StepVisual_ComplexTriangulatedFace::Init (const Handle(TCollection_HAsciiSt const Standard_Boolean theHasTessellatedFace_GeometricLink, const StepVisual_FaceOrSurface& theTessellatedFace_GeometricLink, const Handle(TColStd_HArray1OfInteger)& thePnindex, - const Handle(TColStd_HArray2OfInteger)& theTriangleStrips, - const Handle(TColStd_HArray2OfInteger)& theTriangleFans) + const Handle(TColStd_HArray1OfTransient)& theTriangleStrips, + const Handle(TColStd_HArray1OfTransient)& theTriangleFans) { StepVisual_TessellatedFace::Init(theRepresentationItem_Name, theTessellatedFace_Coordinates, @@ -107,7 +107,7 @@ Standard_Integer StepVisual_ComplexTriangulatedFace::PnindexValue(const Standard //purpose : //======================================================================= -Handle(TColStd_HArray2OfInteger) StepVisual_ComplexTriangulatedFace::TriangleStrips () const +Handle(TColStd_HArray1OfTransient) StepVisual_ComplexTriangulatedFace::TriangleStrips () const { return myTriangleStrips; } @@ -117,7 +117,7 @@ Handle(TColStd_HArray2OfInteger) StepVisual_ComplexTriangulatedFace::TriangleStr //purpose : //======================================================================= -void StepVisual_ComplexTriangulatedFace::SetTriangleStrips(const Handle(TColStd_HArray2OfInteger)& theTriangleStrips) +void StepVisual_ComplexTriangulatedFace::SetTriangleStrips(const Handle(TColStd_HArray1OfTransient)& theTriangleStrips) { myTriangleStrips = theTriangleStrips; } @@ -133,7 +133,7 @@ Standard_Integer StepVisual_ComplexTriangulatedFace::NbTriangleStrips() const { return 0; } - return myTriangleStrips->ColLength(); + return myTriangleStrips->Length(); } //======================================================================= @@ -141,7 +141,7 @@ Standard_Integer StepVisual_ComplexTriangulatedFace::NbTriangleStrips() const //purpose : //======================================================================= -Handle(TColStd_HArray2OfInteger) StepVisual_ComplexTriangulatedFace::TriangleFans () const +Handle(TColStd_HArray1OfTransient) StepVisual_ComplexTriangulatedFace::TriangleFans () const { return myTriangleFans; } @@ -151,7 +151,7 @@ Handle(TColStd_HArray2OfInteger) StepVisual_ComplexTriangulatedFace::TriangleFan //purpose : //======================================================================= -void StepVisual_ComplexTriangulatedFace::SetTriangleFans(const Handle(TColStd_HArray2OfInteger)& theTriangleFans) +void StepVisual_ComplexTriangulatedFace::SetTriangleFans(const Handle(TColStd_HArray1OfTransient)& theTriangleFans) { myTriangleFans = theTriangleFans; } @@ -167,5 +167,5 @@ Standard_Integer StepVisual_ComplexTriangulatedFace::NbTriangleFans() const { return 0; } - return myTriangleFans->ColLength(); + return myTriangleFans->Length(); } diff --git a/src/StepVisual/StepVisual_ComplexTriangulatedFace.hxx b/src/StepVisual/StepVisual_ComplexTriangulatedFace.hxx index b89b6a5b34..d345e197d9 100644 --- a/src/StepVisual/StepVisual_ComplexTriangulatedFace.hxx +++ b/src/StepVisual/StepVisual_ComplexTriangulatedFace.hxx @@ -22,7 +22,7 @@ #include #include -#include +#include DEFINE_STANDARD_HANDLE(StepVisual_ComplexTriangulatedFace, StepVisual_TessellatedFace) @@ -43,8 +43,8 @@ public : const Standard_Boolean theHasTessellatedFace_GeometricLink, const StepVisual_FaceOrSurface& theTessellatedFace_GeometricLink, const Handle(TColStd_HArray1OfInteger)& thePnindex, - const Handle(TColStd_HArray2OfInteger)& theTriangleStrips, - const Handle(TColStd_HArray2OfInteger)& theTriangleFans); + const Handle(TColStd_HArray1OfTransient)& theTriangleStrips, + const Handle(TColStd_HArray1OfTransient)& theTriangleFans); //! Returns field Pnindex Standard_EXPORT Handle(TColStd_HArray1OfInteger) Pnindex() const; @@ -59,19 +59,19 @@ public : Standard_EXPORT Standard_Integer PnindexValue(const Standard_Integer theNum) const; //! Returns field TriangleStrips - Standard_EXPORT Handle(TColStd_HArray2OfInteger) TriangleStrips() const; + Standard_EXPORT Handle(TColStd_HArray1OfTransient) TriangleStrips() const; //! Sets field TriangleStrips - Standard_EXPORT void SetTriangleStrips (const Handle(TColStd_HArray2OfInteger)& theTriangleStrips); + Standard_EXPORT void SetTriangleStrips (const Handle(TColStd_HArray1OfTransient)& theTriangleStrips); //! Returns number of TriangleStrips Standard_EXPORT Standard_Integer NbTriangleStrips() const; //! Returns field TriangleFans - Standard_EXPORT Handle(TColStd_HArray2OfInteger) TriangleFans() const; + Standard_EXPORT Handle(TColStd_HArray1OfTransient) TriangleFans() const; //! Sets field TriangleFans - Standard_EXPORT void SetTriangleFans (const Handle(TColStd_HArray2OfInteger)& theTriangleFans); + Standard_EXPORT void SetTriangleFans (const Handle(TColStd_HArray1OfTransient)& theTriangleFans); //! Returns number of TriangleFans Standard_EXPORT Standard_Integer NbTriangleFans() const; @@ -81,8 +81,8 @@ public : private: Handle(TColStd_HArray1OfInteger) myPnindex; - Handle(TColStd_HArray2OfInteger) myTriangleStrips; - Handle(TColStd_HArray2OfInteger) myTriangleFans; + Handle(TColStd_HArray1OfTransient) myTriangleStrips; + Handle(TColStd_HArray1OfTransient) myTriangleFans; }; diff --git a/tests/de_mesh/step_read/A2 b/tests/de_mesh/step_read/A2 index 33aaba4759..d2f9f3f6b7 100644 --- a/tests/de_mesh/step_read/A2 +++ b/tests/de_mesh/step_read/A2 @@ -9,4 +9,4 @@ XGetOneShape S D set nb_faces 273 set nb_nodes 3788 -set nb_triangles 2893 +set nb_triangles 3377 From 6dbfade69200b6029b8e375cee8f829293fc185a Mon Sep 17 00:00:00 2001 From: rodrlyra Date: Fri, 3 Nov 2023 15:25:49 +0000 Subject: [PATCH 512/639] 0033521: Visualization - possibility to redefine rotation persistence in Graphic3d_TransformPers Added virtual function to Graphic3d_TransformPers that allows overriding rotation persistence behavior on application level. --- src/Graphic3d/Graphic3d_TransformPers.hxx | 43 ++++++++++++++++------- 1 file changed, 31 insertions(+), 12 deletions(-) diff --git a/src/Graphic3d/Graphic3d_TransformPers.hxx b/src/Graphic3d/Graphic3d_TransformPers.hxx index e0db73b4e8..f9d9b60940 100644 --- a/src/Graphic3d/Graphic3d_TransformPers.hxx +++ b/src/Graphic3d/Graphic3d_TransformPers.hxx @@ -241,6 +241,24 @@ public: return Abs(aViewDim.Y()) / Standard_Real(aVPSizeY); } + //! Create orientation matrix based on camera and view dimensions. + //! Default implementation locks rotation by nullifying rotation component. + //! Camera and view dimensions are not used, by default. + //! @param theCamera [in] camera definition + //! @param theViewportWidth [in] the width of viewport + //! @param theViewportHeight [in] the height of viewport + virtual NCollection_Mat3 persistentRotationMatrix (const Handle(Graphic3d_Camera)& theCamera, + const Standard_Integer theViewportWidth, + const Standard_Integer theViewportHeight) const + { + (void )theCamera; + (void )theViewportWidth; + (void )theViewportHeight; + + NCollection_Mat3 aRotMat; + return aRotMat; + } + //! Apply transformation to bounding box of presentation. //! @param theCamera [in] camera definition //! @param theProjection [in] the projection transformation matrix. @@ -467,18 +485,19 @@ void Graphic3d_TransformPers::Apply (const Handle(Graphic3d_Camera)& theCamera, if ((myMode & Graphic3d_TMF_RotatePers) != 0) { - // lock rotation by nullifying rotation component - aWorldView.SetValue (0, 0, 1.0); - aWorldView.SetValue (1, 0, 0.0); - aWorldView.SetValue (2, 0, 0.0); - - aWorldView.SetValue (0, 1, 0.0); - aWorldView.SetValue (1, 1, 1.0); - aWorldView.SetValue (2, 1, 0.0); - - aWorldView.SetValue (0, 2, 0.0); - aWorldView.SetValue (1, 2, 0.0); - aWorldView.SetValue (2, 2, 1.0); + NCollection_Mat3 aRotMat = persistentRotationMatrix (theCamera, theViewportWidth, theViewportHeight); + + aWorldView.SetValue (0, 0, aRotMat.GetColumn (0).x()); + aWorldView.SetValue (1, 0, aRotMat.GetColumn (0).y()); + aWorldView.SetValue (2, 0, aRotMat.GetColumn (0).z()); + + aWorldView.SetValue (0, 1, aRotMat.GetColumn (1).x()); + aWorldView.SetValue (1, 1, aRotMat.GetColumn (1).y()); + aWorldView.SetValue (2, 1, aRotMat.GetColumn (1).z()); + + aWorldView.SetValue (0, 2, aRotMat.GetColumn (2).x()); + aWorldView.SetValue (1, 2, aRotMat.GetColumn (2).y()); + aWorldView.SetValue (2, 2, aRotMat.GetColumn (2).z()); } if ((myMode & Graphic3d_TMF_ZoomPers) != 0) From 1103eb60af84b32f44af1b1fc4222f32e4575daf Mon Sep 17 00:00:00 2001 From: dpasukhi Date: Sat, 5 Aug 2023 17:53:19 +0100 Subject: [PATCH 513/639] 0033370: Foundation Classes - Moving into STL and Boost functionality NCollection containers update: - NCollection_Array1 - updated functionality - NCollection_Array2 - NCollection_Array1 as a wrapper for 2array - NCollection_Vector -> NCollection_DynamicArray was renamed and reworked. TCollection: - Use static empty string to avoid allocations on empty string NCollection allocators update: - NCollection_Allocator - allocator that used Standard::Allocate - NCollection_OccAllocator - allocator-wrapper that used OCC BaseAllocator objects - NCollection_IncAllocator - rework to increase performance Standard: - Rework functionality to use different allocation libs - Implement basic of new way to wrap allocations tools - Define 4 ways to allocation (defines in configure stage) Additional changes: - Hash function uses std::hash functionality - size_t as a hash value - New HashUtils with Murmur and FVN hash algo for x32 and x64 - Deprecated _0.cxx and .gxx DE classes reorganized - Create own utility for std memory - Update Standard_Transient to be more platform-independent Math TK changes: - math_Vector -> match_BaseVector<> - Buffer decreased to cash 32 elements instead of 512 --- .../ios/UIKitSample/UIKitSample/CafShapePrs.h | 3 +- src/AIS/AIS_ColoredShape.hxx | 3 +- src/AIS/AIS_ConnectedInteractive.cxx | 3 +- src/AIS/AIS_DataMapOfIOStatus.hxx | 5 +- src/AIS/AIS_ViewCube.hxx | 13 +- src/AdvApprox/AdvApprox_ApproxAFunction.hxx | 1 - src/AdvApprox/AdvApprox_SimpleApprox.hxx | 1 - src/AppCont/AppCont_ContMatrices_4.cxx | 3 +- src/AppCont/AppCont_LeastSquare.hxx | 2 +- src/Approx/Approx_ComputeLine.gxx | 8 +- src/ApproxInt/ApproxInt_KnotTools.hxx | 21 +- src/Aspect/Aspect_XRAction.hxx | 2 +- src/Aspect/Aspect_XRActionSet.hxx | 2 +- src/BOPAlgo/BOPAlgo_BuilderFace.cxx | 5 +- src/BOPAlgo/BOPAlgo_BuilderSolid.cxx | 4 +- src/BOPAlgo/BOPAlgo_Builder_2.cxx | 16 +- src/BOPAlgo/BOPAlgo_MakeConnected.hxx | 4 +- src/BOPAlgo/BOPAlgo_PaveFiller.hxx | 10 +- src/BOPAlgo/BOPAlgo_PaveFiller_1.cxx | 6 +- src/BOPAlgo/BOPAlgo_PaveFiller_2.cxx | 7 +- src/BOPAlgo/BOPAlgo_PaveFiller_3.cxx | 14 +- src/BOPAlgo/BOPAlgo_PaveFiller_4.cxx | 2 +- src/BOPAlgo/BOPAlgo_PaveFiller_5.cxx | 29 +- src/BOPAlgo/BOPAlgo_PaveFiller_6.cxx | 5 +- src/BOPAlgo/BOPAlgo_Tools.cxx | 10 +- src/BOPAlgo/BOPAlgo_Tools.hxx | 40 +- src/BOPDS/BOPDS_DS.cxx | 4 +- .../BOPDS_DataMapOfIntegerListOfPaveBlock.hxx | 2 +- .../BOPDS_DataMapOfPaveBlockCommonBlock.hxx | 3 +- .../BOPDS_DataMapOfPaveBlockListOfInteger.hxx | 3 +- ...OPDS_DataMapOfPaveBlockListOfPaveBlock.hxx | 3 +- ...IndexedDataMapOfPaveBlockListOfInteger.hxx | 3 +- ...dexedDataMapOfPaveBlockListOfPaveBlock.hxx | 3 +- src/BOPDS/BOPDS_IndexedMapOfPaveBlock.hxx | 3 +- src/BOPDS/BOPDS_ListOfPaveBlock.hxx | 4 +- src/BOPDS/BOPDS_MapOfCommonBlock.hxx | 3 +- src/BOPDS/BOPDS_MapOfPair.hxx | 3 +- src/BOPDS/BOPDS_MapOfPave.hxx | 3 +- src/BOPDS/BOPDS_MapOfPaveBlock.hxx | 3 +- src/BOPDS/BOPDS_Pair.hxx | 27 +- src/BOPDS/BOPDS_PairMapHasher.hxx | 53 - src/BOPDS/BOPDS_Pave.hxx | 14 + src/BOPDS/BOPDS_PaveMapHasher.hxx | 64 - src/BOPDS/BOPDS_PaveMapHasher.lxx | 35 - src/BOPDS/FILES | 3 - .../BOPTools_IndexedDataMapOfSetShape.hxx | 3 +- src/BOPTools/BOPTools_MapOfSet.hxx | 3 +- src/BOPTools/BOPTools_Parallel.hxx | 21 +- src/BOPTools/BOPTools_Set.cxx | 25 +- src/BOPTools/BOPTools_Set.hxx | 35 +- src/BOPTools/BOPTools_SetMapHasher.hxx | 64 - src/BOPTools/BOPTools_SetMapHasher.lxx | 35 - src/BOPTools/FILES | 2 - src/BRep/BRep_Builder.cxx | 8 +- src/BRep/BRep_Tool.cxx | 2 +- src/BRepAlgo/BRepAlgo_FaceRestrictor.cxx | 4 +- src/BRepAlgo/BRepAlgo_Loop.cxx | 6 +- .../BRepApprox_TheMultiLineOfApprox.hxx | 1 - src/BRepBlend/BRepBlend_AppFuncRoot.hxx | 1 - .../BRepBuilderAPI_MakeShapeOnMesh.cxx | 33 +- src/BRepCheck/BRepCheck_Face.cxx | 3 +- .../BRepCheck_IndexedDataMapOfShapeResult.hxx | 3 +- src/BRepCheck/BRepCheck_Shell.cxx | 4 +- src/BRepClass3d/BRepClass3d_MapOfInter.hxx | 1 - ...pFill_DataMapOfNodeDataMapOfShapeShape.hxx | 5 +- src/BRepFill/BRepFill_DataMapOfNodeShape.hxx | 5 +- ...Fill_DataMapOfOrientedShapeListOfShape.hxx | 5 +- src/BRepFill/BRepFill_Evolved.cxx | 2 +- ...dexedDataMapOfOrientedShapeListOfShape.hxx | 3 +- src/BRepFill/BRepFill_OffsetWire.cxx | 4 +- src/BRepFill/BRepFill_Sweep.cxx | 2 +- src/BRepGProp/BRepGProp_Gauss.hxx | 3 +- src/BRepGProp/BRepGProp_VinertGK.hxx | 1 - src/BRepLib/BRepLib.cxx | 31 +- src/BRepLib/BRepLib_FuseEdges.cxx | 2 +- src/BRepLib/BRepLib_MakeWire_1.cxx | 2 +- .../BRepMAT2d_DataMapOfBasicEltShape.hxx | 5 +- src/BRepMesh/BRepMesh_Edge.hxx | 28 +- src/BRepMesh/BRepMesh_OrientedEdge.hxx | 32 +- src/BRepMesh/BRepMesh_Triangle.hxx | 26 +- src/BRepMesh/BRepMesh_Vertex.hxx | 23 +- src/BRepMeshData/BRepMeshData_Curve.cxx | 4 +- src/BRepMeshData/BRepMeshData_Model.cxx | 8 +- src/BRepMeshData/BRepMeshData_PCurve.cxx | 6 +- src/BRepOffset/BRepOffset_MakeOffset.cxx | 10 +- src/BRepOffset/BRepOffset_SimpleOffset.hxx | 9 +- src/BRepOffset/BRepOffset_Tool.cxx | 2 +- .../BRepOffsetAPI_MakeOffset.cxx | 12 +- .../BRepOffsetAPI_MakeThickSolid.cxx | 2 +- .../BRepPrimAPI_MakeRevolution.hxx | 1 - src/BSplCLib/BSplCLib.cxx | 1 + src/BinMDF/BinMDF_TypeADriverMap.hxx | 5 +- src/BinMDF/BinMDF_TypeIdMap.hxx | 6 +- .../BinMNaming_NamedShapeDriver.cxx | 3 - src/BinObjMgt/BinObjMgt_Persistent.hxx | 1 - src/BinTObjDrivers/BinTObjDrivers.hxx | 1 - ...BinTObjDrivers_DocumentRetrievalDriver.hxx | 1 - .../BinTObjDrivers_DocumentStorageDriver.hxx | 1 - .../BinTObjDrivers_IntSparseArrayDriver.hxx | 1 - .../BinTObjDrivers_ModelDriver.hxx | 1 - .../BinTObjDrivers_ObjectDriver.hxx | 1 - .../BinTObjDrivers_ReferenceDriver.hxx | 1 - .../BinTObjDrivers_XYZDriver.hxx | 1 - src/BinTools/BinTools_ShapeReader.cxx | 11 +- src/BinTools/BinTools_ShapeReader.hxx | 5 +- src/BinTools/BinTools_ShapeSet.hxx | 6 +- src/BinTools/BinTools_ShapeSetBase.hxx | 6 - src/BinTools/BinTools_ShapeWriter.hxx | 2 +- src/Bnd/Bnd_BoundSortBox.hxx | 1 - src/BndLib/BndLib_AddSurface.cxx | 3 +- src/CDF/CDF_FWOSDriver.cxx | 2 - src/CDM/CDM_DocumentHasher.hxx | 26 - src/CDM/CDM_MapOfDocument.hxx | 6 +- src/CDM/CDM_MetaDataLookUpTable.hxx | 4 +- src/CDM/FILES | 1 - src/ChFi3d/ChFi3d_Builder.cxx | 6 +- src/ChFi3d/ChFi3d_Builder_2.cxx | 4 +- src/ChFi3d/ChFi3d_Builder_C1.cxx | 2 +- src/ChFi3d/ChFi3d_Builder_C2.cxx | 6 +- src/ChFi3d/ChFi3d_Builder_CnCrn.cxx | 4 +- src/ChFi3d/ChFi3d_ChBuilder.cxx | 2 +- src/ChFi3d/ChFi3d_FilBuilder.cxx | 2 +- src/ChFiDS/ChFiDS_FilSpine.cxx | 4 +- src/ChFiKPart/ChFiKPart_RstMap.hxx | 5 +- src/DBRep/DBRep_DrawableShape.cxx | 2 +- src/DBRep/DBRep_IsoBuilder.cxx | 3 - src/DBRep/DBRep_IsoBuilder.hxx | 3 +- src/DDF/DDF_Transaction.hxx | 1 + src/DDataStd/DDataStd_BasicCommands.cxx | 5 +- src/DE/DE_ConfigurationContext.hxx | 2 +- src/DE/DE_Wrapper.cxx | 1 - src/DE/DE_Wrapper.hxx | 4 +- src/DRAWEXE/DRAWEXE.cxx | 4 +- src/Draft/Draft_VertexInfo.cxx | 2 +- src/Draw/Draw_Drawable3D.cxx | 5 +- src/Draw/Draw_MapOfAsciiString.hxx | 2 +- src/DrawFairCurve/DrawFairCurve_Batten.hxx | 1 - .../DrawFairCurve_MinimalVariation.hxx | 1 - src/Expr/Expr_MapOfNamedUnknown.hxx | 3 +- .../Express_DataMapOfAsciiStringItem.hxx | 3 +- src/Express/Express_Entity.hxx | 2 +- src/Extrema/Extrema_FuncPSDist.hxx | 3 +- src/FEmTool/FEmTool_Assembly.cxx | 6 +- src/Font/Font_FontMgr.cxx | 16 +- src/Font/Font_FontMgr.hxx | 36 +- src/Font/Font_SystemFont.hxx | 29 +- src/Geom2dHatch/Geom2dHatch_Hatchings.hxx | 5 +- src/Geom2dHatch/Geom2dHatch_MapOfElements.hxx | 5 +- src/GeomFill/GeomFill_PolynomialConvertor.cxx | 1 + src/GeomInt/GeomInt_LineTool.cxx | 6 +- .../GeomInt_TheMultiLineOfWLApprox.hxx | 1 - src/Graphic3d/Graphic3d_CView.hxx | 1 - src/Graphic3d/Graphic3d_FrameStatsData.cxx | 55 + src/Graphic3d/Graphic3d_FrameStatsData.hxx | 9 + src/Graphic3d/Graphic3d_ShaderAttribute.hxx | 1 + src/HLRAlgo/HLRAlgo_PolyAlgo.cxx | 6 +- src/HLRAlgo/HLRAlgo_PolyShellData.cxx | 2 +- src/HLRBRep/HLRBRep_CurveTool.hxx | 1 - src/HLRBRep/HLRBRep_Data.cxx | 2 +- src/HLRBRep/HLRBRep_Data.hxx | 1 - src/HLRBRep/HLRBRep_EdgeFaceTool.hxx | 1 - src/HLRBRep/HLRBRep_EdgeIList.cxx | 4 +- src/HLRBRep/HLRBRep_Hider.cxx | 10 +- src/HLRBRep/HLRBRep_PolyAlgo.cxx | 4 +- .../HLRBRep_ThePolyhedronOfInterCSurf.hxx | 1 - src/IFSelect/IFSelect_IntParam.hxx | 1 + src/IMeshData/IMeshData_Types.hxx | 58 +- src/IVtk/IVtk_Types.hxx | 1 - src/IVtkDraw/IVtkDraw.cxx | 18 +- src/Image/Image_Texture.hxx | 55 +- .../IntPatch_ImpImpIntersection_4.gxx | 9 +- src/IntPatch/IntPatch_SpecialPoints.hxx | 4 +- src/IntPatch/IntPatch_WLineTool.cxx | 2 +- src/IntPolyh/FILES | 3 +- src/IntPolyh/IntPolyh_Couple.hxx | 27 +- src/IntPolyh/IntPolyh_CoupleMapHasher.hxx | 48 - src/IntPolyh/IntPolyh_Intersection.cxx | 3 +- src/IntPolyh/IntPolyh_MaillageAffinage.cxx | 3 +- src/IntPolyh/IntPolyh_SectionLine.hxx | 5 + src/IntTools/FILES | 3 - src/IntTools/IntTools_BeanFaceIntersector.cxx | 2 +- src/IntTools/IntTools_Context.cxx | 2 +- src/IntTools/IntTools_Context.hxx | 3 +- src/IntTools/IntTools_CurveRangeSample.hxx | 20 + .../IntTools_CurveRangeSampleMapHasher.hxx | 50 - ...taMapIteratorOfDataMapOfCurveSampleBox.hxx | 20 - .../IntTools_DataMapOfCurveSampleBox.hxx | 5 +- .../IntTools_DataMapOfSurfaceSampleBox.hxx | 5 +- src/IntTools/IntTools_FaceFace.cxx | 2 +- src/IntTools/IntTools_MapOfCurveSample.hxx | 5 +- src/IntTools/IntTools_MapOfSurfaceSample.hxx | 5 +- src/IntTools/IntTools_SurfaceRangeSample.hxx | 4 + src/IntTools/IntTools_SurfaceRangeSample.lxx | 17 + .../IntTools_SurfaceRangeSampleMapHasher.hxx | 49 - src/IntWalk/IntWalk_VectorOfInteger.hxx | 4 +- src/IntWalk/IntWalk_VectorOfWalkingData.hxx | 4 +- src/Interface/FILES | 2 - .../Interface_DataMapOfTransientInteger.hxx | 5 +- .../Interface_IndexedMapOfAsciiString.hxx | 3 +- .../Interface_MapAsciiStringHasher.cxx | 38 - .../Interface_MapAsciiStringHasher.hxx | 66 - src/Interface/Interface_Static.cxx | 2 +- src/Interface/Interface_Static.hxx | 2 +- src/LocOpe/LocOpe_BuildShape.cxx | 2 +- src/LocOpe/LocOpe_Generator.cxx | 13 +- src/LocOpe/LocOpe_Pipe.cxx | 2 +- src/LocOpe/LocOpe_SplitDrafts.cxx | 4 +- src/LocOpe/LocOpe_SplitShape.cxx | 2 +- src/LocOpe/LocOpe_Spliter.cxx | 12 +- src/MAT/MAT_Arc.hxx | 1 - src/MAT/MAT_BasicElt.hxx | 1 - src/MAT/MAT_DataMapOfIntegerArc.hxx | 5 +- src/MAT/MAT_DataMapOfIntegerBasicElt.hxx | 5 +- src/MAT/MAT_DataMapOfIntegerBisector.hxx | 5 +- src/MAT/MAT_DataMapOfIntegerNode.hxx | 5 +- src/MAT/MAT_Node.hxx | 1 - src/MAT2d/FILES | 2 - src/MAT2d/MAT2d_BiInt.hxx | 15 +- src/MAT2d/MAT2d_DataMapOfBiIntInteger.hxx | 6 +- .../MAT2d_DataMapOfBiIntSequenceOfInteger.hxx | 5 +- src/MAT2d/MAT2d_DataMapOfIntegerBisec.hxx | 5 +- src/MAT2d/MAT2d_DataMapOfIntegerConnexion.hxx | 5 +- src/MAT2d/MAT2d_DataMapOfIntegerPnt2d.hxx | 5 +- ...2d_DataMapOfIntegerSequenceOfConnexion.hxx | 5 +- src/MAT2d/MAT2d_DataMapOfIntegerVec2d.hxx | 5 +- src/MAT2d/MAT2d_MapBiIntHasher.hxx | 66 - src/MAT2d/MAT2d_MapBiIntHasher.lxx | 38 - src/MeshVS/FILES | 2 - .../MeshVS_DataMapOfColorMapOfInteger.hxx | 6 +- ...VS_DataMapOfHArray1OfSequenceOfInteger.hxx | 5 +- .../MeshVS_DataMapOfIntegerAsciiString.hxx | 5 +- src/MeshVS/MeshVS_DataMapOfIntegerBoolean.hxx | 5 +- src/MeshVS/MeshVS_DataMapOfIntegerColor.hxx | 5 +- .../MeshVS_DataMapOfIntegerMaterial.hxx | 5 +- ...MeshVS_DataMapOfIntegerMeshEntityOwner.hxx | 5 +- src/MeshVS/MeshVS_DataMapOfIntegerOwner.hxx | 5 +- .../MeshVS_DataMapOfIntegerTwoColors.hxx | 5 +- src/MeshVS/MeshVS_DataMapOfIntegerVector.hxx | 5 +- .../MeshVS_DataMapOfTwoColorsMapOfInteger.hxx | 6 +- src/MeshVS/MeshVS_DataSource.hxx | 1 - src/MeshVS/MeshVS_DeformedDataSource.hxx | 1 - .../MeshVS_ElementalColorPrsBuilder.cxx | 2 +- src/MeshVS/MeshVS_MapOfTwoNodes.hxx | 6 +- src/MeshVS/MeshVS_SymmetricPairHasher.hxx | 20 +- src/MeshVS/MeshVS_TwoColors.cxx | 49 - src/MeshVS/MeshVS_TwoColors.hxx | 47 +- src/MeshVS/MeshVS_TwoColorsHasher.hxx | 25 - src/MeshVS/MeshVS_TwoNodes.hxx | 46 +- src/MeshVS/MeshVS_TwoNodesHasher.hxx | 25 - src/Message/Message_Attribute.hxx | 1 + src/Message/Message_AttributeMeter.cxx | 2 +- src/Message/Message_AttributeObject.hxx | 1 + src/Message/Message_PrinterOStream.hxx | 1 - src/Message/Message_PrinterToReport.hxx | 1 - src/Message/Message_ProgressScope.hxx | 2 +- src/MoniTool/FILES | 5 - src/MoniTool/MoniTool_DataMapOfTimer.hxx | 6 +- src/MoniTool/MoniTool_ElemHasher.cxx | 33 - src/MoniTool/MoniTool_ElemHasher.hxx | 76 - src/MoniTool/MoniTool_Element.cxx | 6 +- src/MoniTool/MoniTool_Element.hxx | 6 +- src/MoniTool/MoniTool_MTHasher.cxx | 14 - src/MoniTool/MoniTool_MTHasher.hxx | 70 - src/MoniTool/MoniTool_MTHasher.lxx | 37 - src/MoniTool/MoniTool_TransientElem.cxx | 5 +- src/NCollection/FILES | 21 +- src/NCollection/NCollection_AccAllocator.cxx | 6 +- src/NCollection/NCollection_AccAllocator.hxx | 21 +- .../NCollection_AlignedAllocator.hxx | 6 + src/NCollection/NCollection_Allocator.hxx | 151 ++ src/NCollection/NCollection_Array1.hxx | 631 ++++--- src/NCollection/NCollection_Array2.hxx | 517 +++--- src/NCollection/NCollection_BaseAllocator.cxx | 264 +-- src/NCollection/NCollection_BaseAllocator.hxx | 36 +- src/NCollection/NCollection_BaseMap.cxx | 44 +- src/NCollection/NCollection_BaseMap.hxx | 32 +- .../NCollection_BasePointerVector.cxx | 145 ++ .../NCollection_BasePointerVector.hxx | 107 ++ src/NCollection/NCollection_BaseVector.cxx | 149 -- src/NCollection/NCollection_BaseVector.hxx | 237 --- src/NCollection/NCollection_CellFilter.hxx | 51 +- src/NCollection/NCollection_DataMap.hxx | 284 ++- src/NCollection/NCollection_DefaultHasher.hxx | 131 +- src/NCollection/NCollection_DefineArray1.hxx | 47 - src/NCollection/NCollection_DefineArray2.hxx | 36 - src/NCollection/NCollection_DefineDataMap.hxx | 39 - .../NCollection_DefineDoubleMap.hxx | 31 - src/NCollection/NCollection_DefineHArray1.hxx | 14 +- src/NCollection/NCollection_DefineHArray2.hxx | 1 - .../NCollection_DefineHSequence.hxx | 1 - src/NCollection/NCollection_DefineHasher.hxx | 32 + .../NCollection_DefineIndexedDataMap.hxx | 41 - .../NCollection_DefineIndexedMap.hxx | 35 - src/NCollection/NCollection_DefineList.hxx | 32 - src/NCollection/NCollection_DefineMap.hxx | 47 - .../NCollection_DefineSequence.hxx | 31 - src/NCollection/NCollection_DefineVector.hxx | 44 - src/NCollection/NCollection_DoubleMap.hxx | 95 +- src/NCollection/NCollection_DynamicArray.hxx | 510 ++++++ src/NCollection/NCollection_EBTree.hxx | 2 +- src/NCollection/NCollection_HeapAllocator.hxx | 1 + src/NCollection/NCollection_IncAllocator.cxx | 541 ++---- src/NCollection/NCollection_IncAllocator.hxx | 137 +- .../NCollection_IndexedDataMap.hxx | 327 ++-- .../NCollection_IndexedIterator.hxx | 232 +++ src/NCollection/NCollection_IndexedMap.hxx | 205 ++- src/NCollection/NCollection_Iterator.hxx | 127 ++ src/NCollection/NCollection_List.hxx | 67 +- src/NCollection/NCollection_Map.hxx | 183 +- src/NCollection/NCollection_OccAllocator.hxx | 215 +++ src/NCollection/NCollection_Sequence.hxx | 62 +- .../NCollection_SparseArrayBase.hxx | 2 +- src/NCollection/NCollection_StdAllocator.hxx | 177 -- src/NCollection/NCollection_TListNode.hxx | 4 + src/NCollection/NCollection_UBTreeFiller.hxx | 4 +- src/NCollection/NCollection_Vector.hxx | 352 +--- .../NCollection_WinHeapAllocator.hxx | 3 + src/OSD/OSD.cxx | 2 + src/OSD/OSD_FileSystem.hxx | 1 + src/OSD/OSD_MemInfo.hxx | 1 - src/OSD/OSD_SharedLibrary.cxx | 2 + src/OSD/OSD_SharedLibrary.hxx | 1 - src/OSD/OSD_ThreadFunction.hxx | 1 - src/OpenGl/OpenGl_LayerList.hxx | 8 +- src/OpenGl/OpenGl_SceneGeometry.cxx | 4 +- src/OpenGl/OpenGl_SceneGeometry.hxx | 8 +- src/PCDM/PCDM_ReaderFilter.hxx | 1 + src/Plate/Plate_Plate.hxx | 1 - src/Plugin/Plugin_MapOfFunctions.hxx | 4 +- src/Poly/Poly_MakeLoops.cxx | 4 +- src/Poly/Poly_MakeLoops.hxx | 73 +- src/Poly/Poly_MergeNodesTool.cxx | 31 +- src/Poly/Poly_MergeNodesTool.hxx | 24 +- src/QABugs/QABugs_11.cxx | 1 + src/QABugs/QABugs_14.cxx | 1 - src/QABugs/QABugs_20.cxx | 2 +- src/QADNaming/QADNaming.hxx | 1 - src/QANCollection/QANCollection_Alloc.cxx | 18 +- .../QANCollection_DataMapOfRealPnt.hxx | 5 +- .../QANCollection_DoubleMapOfRealInteger.hxx | 6 +- src/QANCollection/QANCollection_Handle.cxx | 2 +- .../QANCollection_IndexedDataMapOfRealPnt.hxx | 3 +- src/QANCollection/QANCollection_Perf.cxx | 26 +- src/QANCollection/QANCollection_Test.cxx | 47 +- src/Quantity/FILES | 2 - src/Quantity/Quantity_Color.hxx | 16 + src/Quantity/Quantity_ColorHasher.hxx | 62 - src/Quantity/Quantity_ColorRGBA.hxx | 16 + src/Quantity/Quantity_ColorRGBAHasher.hxx | 48 - src/RWGltf/RWGltf_CafWriter.cxx | 2 +- src/RWGltf/RWGltf_CafWriter.hxx | 36 +- src/RWGltf/RWGltf_GltfJsonParser.hxx | 2 +- src/RWGltf/RWGltf_GltfMaterialMap.cxx | 4 +- src/RWGltf/RWGltf_GltfMaterialMap.hxx | 4 +- src/RWGltf/RWGltf_GltfSceneNodeMap.hxx | 14 +- src/RWMesh/RWMesh_MaterialMap.hxx | 5 +- src/RWObj/RWObj_ObjMaterialMap.hxx | 3 +- src/RWObj/RWObj_Reader.hxx | 10 +- ...source_DataMapOfAsciiStringAsciiString.hxx | 4 +- ...rce_DataMapOfAsciiStringExtendedString.hxx | 4 +- src/Resource/Resource_Manager.hxx | 1 - ...TEPCAFControl_DataMapOfLabelExternFile.hxx | 5 +- .../STEPCAFControl_DataMapOfLabelShape.hxx | 6 +- .../STEPCAFControl_DataMapOfPDExternFile.hxx | 5 +- .../STEPCAFControl_DataMapOfSDRExternFile.hxx | 5 +- src/STEPConstruct/FILES | 3 - ...onstruct_DataMapOfAsciiStringTransient.hxx | 4 +- .../STEPConstruct_DataMapOfPointTransient.hxx | 5 +- .../STEPConstruct_PointHasher.cxx | 29 - .../STEPConstruct_PointHasher.hxx | 68 - .../STEPConstruct_PointHasher.lxx | 31 - src/SelectMgr/SelectMgr_BVHThreadPool.hxx | 10 +- ...lectMgr_IndexedDataMapOfOwnerCriterion.hxx | 3 +- .../SelectMgr_SelectionImageFiller.hxx | 3 +- src/ShapeAnalysis/ShapeAnalysis.cxx | 7 +- ...hapeExtend_DataMapOfTransientListOfMsg.hxx | 5 +- src/ShapeFix/ShapeFix_EdgeConnect.cxx | 8 +- src/Standard/FILES | 18 +- src/Standard/Standard.cxx | 598 ++++--- src/Standard/Standard.hxx | 32 +- src/Standard/Standard_Address.hxx | 47 - src/Standard/Standard_CString.cxx | 37 - src/Standard/Standard_CString.hxx | 28 +- src/Standard/Standard_CStringHasher.hxx | 45 + src/Standard/Standard_ExtString.cxx | 34 - src/Standard/Standard_ExtString.hxx | 33 - src/Standard/Standard_GUID.cxx | 27 - src/Standard/Standard_GUID.hxx | 56 +- src/Standard/Standard_Handle.hxx | 19 +- src/Standard/Standard_HashUtils.hxx | 120 ++ src/Standard/Standard_HashUtils.lxx | 159 ++ src/Standard/Standard_Integer.hxx | 94 +- src/Standard/Standard_MMgrRaw.cxx | 75 - src/Standard/Standard_MMgrRaw.hxx | 49 - src/Standard/Standard_MMgrTBBalloc.cxx | 87 - src/Standard/Standard_MMgrTBBalloc.hxx | 50 - src/Standard/Standard_MemoryUtils.hxx | 62 + src/Standard/Standard_PrimitiveTypes.hxx | 2 - src/Standard/Standard_Real.cxx | 22 - src/Standard/Standard_Real.hxx | 39 +- src/Standard/Standard_ShortReal.cxx | 36 - src/Standard/Standard_ShortReal.hxx | 45 +- src/Standard/Standard_Size.hxx | 54 - src/Standard/Standard_ThreadId.hxx | 1 - src/Standard/Standard_Transient.cxx | 23 +- src/Standard/Standard_Transient.hxx | 43 +- src/Standard/Standard_Type.cxx | 58 +- src/Standard/Standard_Type.hxx | 13 +- src/Standard/Standard_math.cxx | 46 - src/Standard/Standard_math.hxx | 40 - src/Standard/Standard_values.h | 40 - .../StdObjMgt_MapOfInstantiators.hxx | 6 +- src/StdStorage/StdStorage_MapOfRoots.hxx | 4 +- src/StdStorage/StdStorage_MapOfTypes.hxx | 2 +- src/StepData/StepData_FreeFormEntity.cxx | 7 +- src/StepToTopoDS/FILES | 4 - .../StepToTopoDS_CartesianPointHasher.cxx | 42 - .../StepToTopoDS_CartesianPointHasher.hxx | 68 - src/StepToTopoDS/StepToTopoDS_DataMapOfRI.hxx | 5 +- .../StepToTopoDS_DataMapOfRINames.hxx | 4 +- .../StepToTopoDS_DataMapOfTRI.hxx | 5 +- .../StepToTopoDS_PointEdgeMap.hxx | 5 +- src/StepToTopoDS/StepToTopoDS_PointPair.cxx | 1 - src/StepToTopoDS/StepToTopoDS_PointPair.hxx | 34 +- .../StepToTopoDS_PointPairHasher.cxx | 44 - .../StepToTopoDS_PointPairHasher.hxx | 66 - .../StepToTopoDS_PointVertexMap.hxx | 5 +- src/Storage/Storage_MapOfCallBack.hxx | 4 +- src/Storage/Storage_MapOfPers.hxx | 4 +- src/Storage/Storage_PType.hxx | 2 +- src/Storage/Storage_Schema.cxx | 115 +- src/TColStd/FILES | 3 - .../TColStd_DataMapOfAsciiStringInteger.hxx | 4 +- .../TColStd_DataMapOfIntegerInteger.hxx | 5 +- .../TColStd_DataMapOfIntegerListOfInteger.hxx | 5 +- src/TColStd/TColStd_DataMapOfIntegerReal.hxx | 5 +- .../TColStd_DataMapOfIntegerTransient.hxx | 5 +- .../TColStd_DataMapOfStringInteger.hxx | 4 +- .../TColStd_DataMapOfTransientTransient.hxx | 5 +- .../TColStd_IndexedDataMapOfStringString.hxx | 2 +- ...Std_IndexedDataMapOfTransientTransient.hxx | 3 +- src/TColStd/TColStd_IndexedMapOfInteger.hxx | 3 +- src/TColStd/TColStd_IndexedMapOfReal.hxx | 3 +- src/TColStd/TColStd_IndexedMapOfTransient.hxx | 3 +- src/TColStd/TColStd_MapIntegerHasher.hxx | 24 - src/TColStd/TColStd_MapOfAsciiString.hxx | 4 +- src/TColStd/TColStd_MapOfInteger.hxx | 5 +- src/TColStd/TColStd_MapOfReal.hxx | 5 +- src/TColStd/TColStd_MapOfTransient.hxx | 5 +- src/TColStd/TColStd_MapRealHasher.hxx | 23 - src/TColStd/TColStd_MapTransientHasher.hxx | 24 - src/TColStd/TColStd_PackedMapOfInteger.cxx | 33 +- src/TColStd/TColStd_PackedMapOfInteger.hxx | 3 +- src/TColStd/TColStd_SequenceOfAddress.hxx | 1 - src/TCollection/TCollection_AsciiString.cxx | 385 ++-- src/TCollection/TCollection_AsciiString.hxx | 58 +- src/TCollection/TCollection_AsciiString.lxx | 29 +- .../TCollection_ExtendedString.cxx | 345 ++-- .../TCollection_ExtendedString.hxx | 81 +- src/TCollection/TCollection_HAsciiString.hxx | 5 + src/TCollection/TCollection_HAsciiString.lxx | 24 + .../TCollection_HExtendedString.hxx | 36 +- src/TDF/FILES | 1 - src/TDF/TDF_AttributeDataMap.hxx | 5 +- src/TDF/TDF_AttributeDoubleMap.hxx | 5 +- src/TDF/TDF_AttributeIndexedMap.hxx | 3 +- src/TDF/TDF_AttributeMap.hxx | 5 +- src/TDF/TDF_CopyTool.cxx | 1 + src/TDF/TDF_DerivedAttribute.cxx | 11 +- src/TDF/TDF_GUIDProgIDMap.hxx | 4 +- src/TDF/TDF_IDMap.hxx | 4 +- src/TDF/TDF_Label.hxx | 3 +- src/TDF/TDF_Label.lxx | 12 + src/TDF/TDF_LabelDataMap.hxx | 5 +- src/TDF/TDF_LabelDoubleMap.hxx | 6 +- src/TDF/TDF_LabelIndexedMap.hxx | 3 +- src/TDF/TDF_LabelIntegerMap.hxx | 5 +- src/TDF/TDF_LabelMap.hxx | 5 +- src/TDF/TDF_LabelMapHasher.hxx | 43 - src/TDataStd/TDataStd_DataMapOfStringByte.hxx | 4 +- ...ataStd_DataMapOfStringHArray1OfInteger.hxx | 4 +- .../TDataStd_DataMapOfStringHArray1OfReal.hxx | 4 +- src/TDataStd/TDataStd_DataMapOfStringReal.hxx | 4 +- .../TDataStd_DataMapOfStringString.hxx | 4 +- src/TDocStd/TDocStd_Document.hxx | 1 - src/TDocStd/TDocStd_LabelIDMapDataMap.hxx | 5 +- .../TFunction_DataMapOfGUIDDriver.hxx | 4 +- .../TFunction_DataMapOfLabelListOfLabel.hxx | 5 +- .../TFunction_DoubleMapOfIntegerLabel.hxx | 6 +- src/TNaming/FILES | 1 - src/TNaming/TNaming_Localizer.cxx | 4 +- src/TNaming/TNaming_MapOfNamedShape.hxx | 6 +- src/TNaming/TNaming_NamedShapeHasher.hxx | 26 - src/TObj/FILES | 1 - src/TObj/TObj_Application.hxx | 1 - src/TObj/TObj_Assistant.cxx | 1 - src/TObj/TObj_Assistant.hxx | 1 - src/TObj/TObj_Common.hxx | 50 - src/TObj/TObj_Container.hxx | 1 - src/TObj/TObj_Object.hxx | 3 +- src/TObj/TObj_ObjectIterator.hxx | 3 +- src/TObj/TObj_TIntSparseArray.hxx | 1 - src/TObj/TObj_TObject.hxx | 1 - src/TObj/TObj_TReference.hxx | 1 - src/TObj/TObj_TXYZ.hxx | 1 - src/TPrsStd/TPrsStd_DataMapOfGUIDDriver.hxx | 4 +- src/TopLoc/FILES | 1 - src/TopLoc/TopLoc_IndexedMapOfLocation.hxx | 3 +- src/TopLoc/TopLoc_Location.cxx | 40 +- src/TopLoc/TopLoc_Location.hxx | 24 +- src/TopLoc/TopLoc_Location.lxx | 45 + src/TopLoc/TopLoc_MapLocationHasher.hxx | 26 - src/TopLoc/TopLoc_MapOfLocation.hxx | 6 +- .../TopOpeBRepBuild_Area1dBuilder.cxx | 10 +- .../TopOpeBRepBuild_Area1dBuilder.hxx | 1 - .../TopOpeBRepBuild_Area2dBuilder.cxx | 10 +- .../TopOpeBRepBuild_Area3dBuilder.cxx | 10 +- .../TopOpeBRepBuild_AreaBuilder.cxx | 10 +- .../TopOpeBRepBuild_AreaBuilder.hxx | 1 - .../TopOpeBRepBuild_BuildEdges.cxx | 4 +- .../TopOpeBRepBuild_Builder.cxx | 2 +- .../TopOpeBRepBuild_Builder.hxx | 1 - .../TopOpeBRepBuild_Builder1.cxx | 4 +- .../TopOpeBRepBuild_Builder1.hxx | 2 +- .../TopOpeBRepBuild_CompositeClassifier.hxx | 1 - .../TopOpeBRepBuild_CorrectFace2d.hxx | 1 - src/TopOpeBRepBuild/TopOpeBRepBuild_End.cxx | 2 +- .../TopOpeBRepBuild_GridFF.cxx | 2 +- .../TopOpeBRepBuild_GridSS.cxx | 2 +- .../TopOpeBRepBuild_HBuilder.cxx | 4 +- .../TopOpeBRepBuild_Section.cxx | 2 +- .../TopOpeBRepBuild_ShellFaceSet.hxx | 1 - src/TopOpeBRepDS/TopOpeBRepDS_Check.cxx | 13 +- .../TopOpeBRepDS_DataMapOfCheckStatus.hxx | 5 +- ...pDS_DataMapOfIntegerListOfInterference.hxx | 5 +- ...ataMapOfInterferenceListOfInterference.hxx | 5 +- ...opOpeBRepDS_DataMapOfInterferenceShape.hxx | 5 +- .../TopOpeBRepDS_DoubleMapOfIntegerShape.hxx | 5 +- src/TopOpeBRepDS/TopOpeBRepDS_EIR.cxx | 4 +- src/TopOpeBRepDS/TopOpeBRepDS_EXPORT.cxx | 2 +- src/TopOpeBRepDS/TopOpeBRepDS_FIR.cxx | 6 +- src/TopOpeBRepDS/TopOpeBRepDS_MapOfCurve.hxx | 5 +- .../TopOpeBRepDS_MapOfIntegerShapeData.hxx | 5 +- src/TopOpeBRepDS/TopOpeBRepDS_MapOfPoint.hxx | 5 +- .../TopOpeBRepDS_MapOfSurface.hxx | 5 +- src/TopOpeBRepDS/TopOpeBRepDS_Marker.hxx | 1 - .../TopOpeBRepDS_ProcessEdgeInterferences.cxx | 10 +- .../TopOpeBRepDS_ProcessFaceInterferences.cxx | 4 +- .../TopOpeBRepDS_ProcessInterferencesTool.cxx | 6 +- ...OpeBRepTool_DataMapOfOrientedShapeC2DF.hxx | 5 +- .../TopOpeBRepTool_FuseEdges.cxx | 2 +- ...opOpeBRepTool_IndexedDataMapOfShapeBox.hxx | 3 +- ...OpeBRepTool_IndexedDataMapOfShapeBox2d.hxx | 3 +- src/TopTools/FILES | 3 - .../TopTools_DataMapOfIntegerListOfShape.hxx | 5 +- .../TopTools_DataMapOfIntegerShape.hxx | 5 +- ...TopTools_DataMapOfOrientedShapeInteger.hxx | 5 +- .../TopTools_DataMapOfOrientedShapeShape.hxx | 5 +- .../TopTools_IndexedDataMapOfShapeAddress.hxx | 1 - .../TopTools_IndexedMapOfOrientedShape.hxx | 3 +- src/TopTools/TopTools_MapOfOrientedShape.hxx | 5 +- .../TopTools_OrientedShapeMapHasher.hxx | 69 - .../TopTools_OrientedShapeMapHasher.lxx | 37 - src/TopTools/TopTools_ShapeMapHasher.hxx | 48 +- src/TopTools/TopTools_ShapeMapHasher.lxx | 37 - src/TopoDS/FILES | 8 - src/TopoDS/TopoDS_CompSolid.hxx | 40 +- src/TopoDS/TopoDS_CompSolid.lxx | 24 - src/TopoDS/TopoDS_Compound.hxx | 40 +- src/TopoDS/TopoDS_Compound.lxx | 24 - src/TopoDS/TopoDS_Edge.hxx | 40 +- src/TopoDS/TopoDS_Edge.lxx | 24 - src/TopoDS/TopoDS_Face.hxx | 40 +- src/TopoDS/TopoDS_Face.lxx | 24 - src/TopoDS/TopoDS_Shape.cxx | 12 - src/TopoDS/TopoDS_Shape.hxx | 24 +- src/TopoDS/TopoDS_Shell.hxx | 40 +- src/TopoDS/TopoDS_Shell.lxx | 24 - src/TopoDS/TopoDS_Solid.hxx | 40 +- src/TopoDS/TopoDS_Solid.lxx | 24 - src/TopoDS/TopoDS_Vertex.hxx | 40 +- src/TopoDS/TopoDS_Vertex.lxx | 24 - src/TopoDS/TopoDS_Wire.hxx | 40 +- src/TopoDS/TopoDS_Wire.lxx | 24 - src/Transfer/FILES | 5 - src/Transfer/Transfer_Actor.gxx | 69 - .../Transfer_ActorOfProcessForFinder_0.cxx | 127 +- .../Transfer_ActorOfProcessForTransient_0.cxx | 132 +- src/Transfer/Transfer_FindHasher.cxx | 34 - src/Transfer/Transfer_FindHasher.hxx | 50 +- src/Transfer/Transfer_Finder.cxx | 4 +- src/Transfer/Transfer_Finder.hxx | 6 +- src/Transfer/Transfer_Iterator.gxx | 73 - .../Transfer_IteratorOfProcessForFinder_0.cxx | 96 +- ...ansfer_IteratorOfProcessForTransient_0.cxx | 97 +- src/Transfer/Transfer_Mapper.gxx | 41 - src/Transfer/Transfer_ProcessForFinder_0.cxx | 1265 +++++++++++++- .../Transfer_ProcessForTransient_0.cxx | 1261 ++++++++++++- ...nsfer_TransferMapOfProcessForTransient.hxx | 3 +- src/Transfer/Transfer_TransferProcess.gxx | 1556 ----------------- src/Transfer/Transfer_TransientMapper.hxx | 1 - src/Transfer/Transfer_TransientMapper_0.cxx | 63 +- src/TransferBRep/FILES | 2 - .../TransferBRep_OrientedShapeMapper.hxx | 89 - .../TransferBRep_OrientedShapeMapper_0.cxx | 45 - .../TransferBRep_ShapeMapper_0.cxx | 61 +- src/V3d/V3d_View.cxx | 2 +- ...ewerTest_DoubleMapOfInteractiveAndName.hxx | 5 +- src/ViewerTest/ViewerTest_ViewerCommands.cxx | 96 +- src/VrmlData/VrmlData_Node.cxx | 9 - src/VrmlData/VrmlData_Node.hxx | 38 +- src/WNT/WNT_WClass.hxx | 2 +- ...FDimTolObjects_DataMapOfToleranceDatum.hxx | 3 +- src/XCAFDoc/XCAFDoc_AssemblyItemId.hxx | 34 +- src/XCAFDoc/XCAFDoc_DimTolTool.cxx | 4 +- src/XCAFDoc/XCAFDoc_DimTolTool.hxx | 5 +- src/XCAFPrs/XCAFPrs_AISObject.cxx | 4 +- src/XCAFPrs/XCAFPrs_DataMapOfStyleShape.hxx | 4 +- .../XCAFPrs_DataMapOfStyleTransient.hxx | 4 +- src/XCAFPrs/XCAFPrs_DocumentNode.hxx | 24 +- src/XCAFPrs/XCAFPrs_Style.hxx | 66 +- src/XDEDRAW/XDEDRAW.cxx | 2 +- src/XSDRAWSTLVRML/XSDRAWSTLVRML_CoordsMap.hxx | 5 +- .../XSDRAWSTLVRML_DataSource.hxx | 1 - .../XSDRAWSTLVRML_DataSource3D.hxx | 1 - .../XSDRAWSTLVRML_ElemNodesMap.hxx | 5 +- src/XmlMDF/XmlMDF_MapOfDriver.hxx | 4 +- src/XmlMDF/XmlMDF_TypeADriverMap.hxx | 5 +- src/XmlTObjDrivers/XmlTObjDrivers.hxx | 1 - ...XmlTObjDrivers_DocumentRetrievalDriver.hxx | 1 - .../XmlTObjDrivers_DocumentStorageDriver.hxx | 1 - .../XmlTObjDrivers_ObjectDriver.hxx | 1 - src/gp/gp_Pnt.hxx | 33 + src/math/FILES | 4 +- src/math/math_IntegerVector.cxx | 336 ---- src/math/math_IntegerVector.hxx | 224 +-- src/math/math_Matrix.cxx | 12 +- src/math/math_Matrix.hxx | 28 +- src/math/math_Matrix.lxx | 1 - src/math/math_Recipes.hxx | 7 +- src/math/math_Vector.cxx | 502 ------ src/math/math_Vector.hxx | 300 +--- src/math/math_VectorBase.hxx | 352 ++++ src/math/math_VectorBase.lxx | 524 ++++++ tests/bugs/caf/bug31546 | 6 +- tests/bugs/fclasses/bug7287_6 | 2 +- tests/bugs/xde/bug23570 | 2 +- tools/MessageModel/MessageModel_ItemRoot.cxx | 4 +- tools/View/View_Viewer.cxx | 1 - 649 files changed, 10668 insertions(+), 12001 deletions(-) delete mode 100644 src/BOPDS/BOPDS_PairMapHasher.hxx delete mode 100644 src/BOPDS/BOPDS_PaveMapHasher.hxx delete mode 100644 src/BOPDS/BOPDS_PaveMapHasher.lxx delete mode 100644 src/BOPTools/BOPTools_SetMapHasher.hxx delete mode 100644 src/BOPTools/BOPTools_SetMapHasher.lxx delete mode 100644 src/CDM/CDM_DocumentHasher.hxx delete mode 100644 src/IntPolyh/IntPolyh_CoupleMapHasher.hxx delete mode 100644 src/IntTools/IntTools_CurveRangeSampleMapHasher.hxx delete mode 100644 src/IntTools/IntTools_DataMapIteratorOfDataMapOfCurveSampleBox.hxx delete mode 100644 src/IntTools/IntTools_SurfaceRangeSampleMapHasher.hxx delete mode 100644 src/Interface/Interface_MapAsciiStringHasher.cxx delete mode 100644 src/Interface/Interface_MapAsciiStringHasher.hxx delete mode 100644 src/MAT2d/MAT2d_MapBiIntHasher.hxx delete mode 100644 src/MAT2d/MAT2d_MapBiIntHasher.lxx delete mode 100644 src/MeshVS/MeshVS_TwoColorsHasher.hxx delete mode 100644 src/MeshVS/MeshVS_TwoNodesHasher.hxx delete mode 100644 src/MoniTool/MoniTool_ElemHasher.cxx delete mode 100644 src/MoniTool/MoniTool_ElemHasher.hxx delete mode 100644 src/MoniTool/MoniTool_MTHasher.cxx delete mode 100644 src/MoniTool/MoniTool_MTHasher.hxx delete mode 100644 src/MoniTool/MoniTool_MTHasher.lxx create mode 100644 src/NCollection/NCollection_Allocator.hxx create mode 100644 src/NCollection/NCollection_BasePointerVector.cxx create mode 100644 src/NCollection/NCollection_BasePointerVector.hxx delete mode 100755 src/NCollection/NCollection_BaseVector.cxx delete mode 100755 src/NCollection/NCollection_BaseVector.hxx delete mode 100644 src/NCollection/NCollection_DefineArray1.hxx delete mode 100644 src/NCollection/NCollection_DefineArray2.hxx delete mode 100644 src/NCollection/NCollection_DefineDataMap.hxx delete mode 100644 src/NCollection/NCollection_DefineDoubleMap.hxx create mode 100644 src/NCollection/NCollection_DefineHasher.hxx delete mode 100644 src/NCollection/NCollection_DefineIndexedDataMap.hxx delete mode 100644 src/NCollection/NCollection_DefineIndexedMap.hxx delete mode 100644 src/NCollection/NCollection_DefineList.hxx delete mode 100644 src/NCollection/NCollection_DefineMap.hxx delete mode 100644 src/NCollection/NCollection_DefineSequence.hxx delete mode 100644 src/NCollection/NCollection_DefineVector.hxx create mode 100644 src/NCollection/NCollection_DynamicArray.hxx create mode 100644 src/NCollection/NCollection_IndexedIterator.hxx create mode 100644 src/NCollection/NCollection_Iterator.hxx create mode 100644 src/NCollection/NCollection_OccAllocator.hxx delete mode 100755 src/NCollection/NCollection_StdAllocator.hxx delete mode 100644 src/Quantity/Quantity_ColorHasher.hxx delete mode 100644 src/Quantity/Quantity_ColorRGBAHasher.hxx delete mode 100644 src/STEPConstruct/STEPConstruct_PointHasher.cxx delete mode 100644 src/STEPConstruct/STEPConstruct_PointHasher.hxx delete mode 100644 src/STEPConstruct/STEPConstruct_PointHasher.lxx delete mode 100644 src/Standard/Standard_Address.hxx create mode 100644 src/Standard/Standard_CStringHasher.hxx delete mode 100644 src/Standard/Standard_ExtString.cxx delete mode 100644 src/Standard/Standard_ExtString.hxx create mode 100644 src/Standard/Standard_HashUtils.hxx create mode 100644 src/Standard/Standard_HashUtils.lxx delete mode 100644 src/Standard/Standard_MMgrRaw.cxx delete mode 100644 src/Standard/Standard_MMgrRaw.hxx delete mode 100644 src/Standard/Standard_MMgrTBBalloc.cxx delete mode 100644 src/Standard/Standard_MMgrTBBalloc.hxx create mode 100644 src/Standard/Standard_MemoryUtils.hxx delete mode 100644 src/Standard/Standard_ShortReal.cxx delete mode 100644 src/Standard/Standard_Size.hxx delete mode 100644 src/Standard/Standard_math.cxx delete mode 100644 src/Standard/Standard_math.hxx delete mode 100644 src/Standard/Standard_values.h delete mode 100644 src/StepToTopoDS/StepToTopoDS_CartesianPointHasher.cxx delete mode 100644 src/StepToTopoDS/StepToTopoDS_CartesianPointHasher.hxx delete mode 100644 src/StepToTopoDS/StepToTopoDS_PointPairHasher.cxx delete mode 100644 src/StepToTopoDS/StepToTopoDS_PointPairHasher.hxx delete mode 100644 src/TColStd/TColStd_MapIntegerHasher.hxx delete mode 100644 src/TColStd/TColStd_MapRealHasher.hxx delete mode 100644 src/TColStd/TColStd_MapTransientHasher.hxx delete mode 100644 src/TDF/TDF_LabelMapHasher.hxx delete mode 100644 src/TNaming/TNaming_NamedShapeHasher.hxx delete mode 100644 src/TObj/TObj_Common.hxx delete mode 100644 src/TopLoc/TopLoc_MapLocationHasher.hxx delete mode 100644 src/TopTools/TopTools_OrientedShapeMapHasher.hxx delete mode 100644 src/TopTools/TopTools_OrientedShapeMapHasher.lxx delete mode 100644 src/TopTools/TopTools_ShapeMapHasher.lxx delete mode 100644 src/TopoDS/TopoDS_CompSolid.lxx delete mode 100644 src/TopoDS/TopoDS_Compound.lxx delete mode 100644 src/TopoDS/TopoDS_Edge.lxx delete mode 100644 src/TopoDS/TopoDS_Face.lxx delete mode 100644 src/TopoDS/TopoDS_Shell.lxx delete mode 100644 src/TopoDS/TopoDS_Solid.lxx delete mode 100644 src/TopoDS/TopoDS_Vertex.lxx delete mode 100644 src/TopoDS/TopoDS_Wire.lxx delete mode 100644 src/Transfer/Transfer_Actor.gxx delete mode 100644 src/Transfer/Transfer_FindHasher.cxx delete mode 100644 src/Transfer/Transfer_Iterator.gxx delete mode 100644 src/Transfer/Transfer_Mapper.gxx delete mode 100644 src/Transfer/Transfer_TransferProcess.gxx delete mode 100644 src/TransferBRep/TransferBRep_OrientedShapeMapper.hxx delete mode 100644 src/TransferBRep/TransferBRep_OrientedShapeMapper_0.cxx delete mode 100644 src/math/math_IntegerVector.cxx delete mode 100644 src/math/math_Vector.cxx create mode 100644 src/math/math_VectorBase.hxx create mode 100644 src/math/math_VectorBase.lxx diff --git a/samples/ios/UIKitSample/UIKitSample/CafShapePrs.h b/samples/ios/UIKitSample/UIKitSample/CafShapePrs.h index 3e83986ce3..1215533609 100644 --- a/samples/ios/UIKitSample/UIKitSample/CafShapePrs.h +++ b/samples/ios/UIKitSample/UIKitSample/CafShapePrs.h @@ -23,12 +23,11 @@ #define CafShapePrs_h #include -#include #include #include typedef NCollection_DataMap CafDataMapOfShapeColor; -typedef NCollection_DataMap MapOfPrsForShapes; +typedef NCollection_DataMap MapOfPrsForShapes; //! Interactive object for shape in DECAF document class CafShapePrs : public XCAFPrs_AISObject diff --git a/src/AIS/AIS_ColoredShape.hxx b/src/AIS/AIS_ColoredShape.hxx index 570b0c65e1..2eef2c6abe 100644 --- a/src/AIS/AIS_ColoredShape.hxx +++ b/src/AIS/AIS_ColoredShape.hxx @@ -21,7 +21,6 @@ #include #include #include -#include class StdSelect_BRepOwner; @@ -104,7 +103,7 @@ protected: //! @name override presentation computation protected: - typedef NCollection_IndexedDataMap DataMapOfDrawerCompd; + typedef NCollection_IndexedDataMap DataMapOfDrawerCompd; protected: diff --git a/src/AIS/AIS_ConnectedInteractive.cxx b/src/AIS/AIS_ConnectedInteractive.cxx index 64decc8336..b5ec89afcb 100644 --- a/src/AIS/AIS_ConnectedInteractive.cxx +++ b/src/AIS/AIS_ConnectedInteractive.cxx @@ -30,7 +30,6 @@ #include #include #include -#include IMPLEMENT_STANDARD_RTTIEXT(AIS_ConnectedInteractive,AIS_InteractiveObject) @@ -241,7 +240,7 @@ void AIS_ConnectedInteractive::computeSubShapeSelection (const Handle(SelectMgr_ const Standard_Integer theMode) { typedef NCollection_List SensitiveList; - typedef NCollection_DataMap + typedef NCollection_DataMap Shapes2EntitiesMap; if (!myReference->HasSelection (theMode)) diff --git a/src/AIS/AIS_DataMapOfIOStatus.hxx b/src/AIS/AIS_DataMapOfIOStatus.hxx index 6451e844c3..07f8b5c90f 100644 --- a/src/AIS/AIS_DataMapOfIOStatus.hxx +++ b/src/AIS/AIS_DataMapOfIOStatus.hxx @@ -19,11 +19,10 @@ #include #include -#include #include -typedef NCollection_DataMap AIS_DataMapOfIOStatus; -typedef NCollection_DataMap::Iterator AIS_DataMapIteratorOfDataMapOfIOStatus; +typedef NCollection_DataMap AIS_DataMapOfIOStatus; +typedef NCollection_DataMap::Iterator AIS_DataMapIteratorOfDataMapOfIOStatus; #endif diff --git a/src/AIS/AIS_ViewCube.hxx b/src/AIS/AIS_ViewCube.hxx index 32428cf04f..4244db55ab 100644 --- a/src/AIS/AIS_ViewCube.hxx +++ b/src/AIS/AIS_ViewCube.hxx @@ -640,18 +640,9 @@ protected: protected: - //! Trivial hasher to avoid ambiguity with enumeration type. - struct IntegerHasher - { - static Standard_Integer HashCode (Standard_Integer theValue, Standard_Integer theUpper) { return ::HashCode (theValue, theUpper); } - static Standard_Boolean IsEqual (Standard_Integer theA, Standard_Integer theB) { return theA == theB; } - }; - -protected: - - NCollection_DataMap + NCollection_DataMap myBoxSideLabels; //!< map with box side labels - NCollection_DataMap + NCollection_DataMap myAxesLabels; //!< map with axes labels Handle(Prs3d_ShadingAspect) myBoxEdgeAspect; //!< style for box edges Handle(Prs3d_ShadingAspect) myBoxCornerAspect; //!< style for box corner diff --git a/src/AdvApprox/AdvApprox_ApproxAFunction.hxx b/src/AdvApprox/AdvApprox_ApproxAFunction.hxx index 74f58b76ca..245cc01b09 100644 --- a/src/AdvApprox/AdvApprox_ApproxAFunction.hxx +++ b/src/AdvApprox/AdvApprox_ApproxAFunction.hxx @@ -30,7 +30,6 @@ #include #include #include -#include #include #include #include diff --git a/src/AdvApprox/AdvApprox_SimpleApprox.hxx b/src/AdvApprox/AdvApprox_SimpleApprox.hxx index 757db18ef7..fc014b203b 100644 --- a/src/AdvApprox/AdvApprox_SimpleApprox.hxx +++ b/src/AdvApprox/AdvApprox_SimpleApprox.hxx @@ -24,7 +24,6 @@ #include #include #include -#include #include #include #include diff --git a/src/AppCont/AppCont_ContMatrices_4.cxx b/src/AppCont/AppCont_ContMatrices_4.cxx index 7cc15f2dbc..0c5c3dab67 100644 --- a/src/AppCont/AppCont_ContMatrices_4.cxx +++ b/src/AppCont/AppCont_ContMatrices_4.cxx @@ -1238,7 +1238,7 @@ void VBernstein(const Standard_Integer classe, if (nbpoints > 24) throw Standard_DimensionError("VBernstein: nbpoints > 24"); // math_Matrix VB(classe, nbpoints); - Standard_Integer i, j, k = 0, Som; + Standard_Integer i, j, Som; // 300 = 1+2+ ... +24 points. Som = (Standard_Integer )( 300*((classe-1)*classe/2.-1) + classe * (nbpoints-1)*nbpoints/2.); @@ -1248,7 +1248,6 @@ void VBernstein(const Standard_Integer classe, for (j = 1; j <= nbpoints; j++) { M(i, j) = *tmpVB; tmpVB++; - k++; } } } diff --git a/src/AppCont/AppCont_LeastSquare.hxx b/src/AppCont/AppCont_LeastSquare.hxx index 51300f2903..67bdfb4830 100644 --- a/src/AppCont/AppCont_LeastSquare.hxx +++ b/src/AppCont/AppCont_LeastSquare.hxx @@ -22,7 +22,7 @@ #include #include #include - +#include struct PeriodicityInfo { diff --git a/src/Approx/Approx_ComputeLine.gxx b/src/Approx/Approx_ComputeLine.gxx index 6a6175823c..9e63eb95a9 100644 --- a/src/Approx/Approx_ComputeLine.gxx +++ b/src/Approx/Approx_ComputeLine.gxx @@ -13,7 +13,6 @@ // commercial license or contractual agreement. #include -#include Approx_ParLeastSquareOfMyGradient_hxx #include #include #include @@ -1392,7 +1391,7 @@ Standard_Boolean Approx_ComputeLine::ComputeCurve(const MultiLine& Line, Standard_Boolean Parallel; #endif Standard_Integer myfirstpt = firstpt, mylastpt = lastpt; - Standard_Integer nbp = lastpt-firstpt+1, Kopt = 0; + Standard_Integer nbp = lastpt-firstpt+1; math_Vector Para(firstpt, lastpt); Parameters(Line, firstpt, lastpt, Para); @@ -1427,11 +1426,6 @@ Standard_Boolean Approx_ComputeLine::ComputeCurve(const MultiLine& Line, Tangent1 = LineTool::Tangency(Line, myfirstpt, tabV1); Tangent2 = LineTool::Tangency(Line, mylastpt, tabV2); } - - if (Tangent1) Kopt++; - if (Tangent2) Kopt++; - - if (nbp == 2) { // S il n y a que 2 points, on verifie quand meme que les tangentes sont // alignees. diff --git a/src/ApproxInt/ApproxInt_KnotTools.hxx b/src/ApproxInt/ApproxInt_KnotTools.hxx index b54e81e219..b2bfa6c6b5 100644 --- a/src/ApproxInt/ApproxInt_KnotTools.hxx +++ b/src/ApproxInt/ApproxInt_KnotTools.hxx @@ -14,34 +14,21 @@ #ifndef _ApproxInt_KnotTools_HeaderFile #define _ApproxInt_KnotTools_HeaderFile -#ifndef _Standard_DefineAlloc_HeaderFile #include -#endif -#ifndef _Standard_Macro_HeaderFile #include -#endif - -#ifndef _Standard_Boolean_HeaderFile #include -#endif -#ifndef _Standard_Real_HeaderFile #include -#endif -#ifndef _Standard_Integer_HeaderFile #include -#endif - #include +#include +#include +#include #include #include #include +#include #include -class math_Vector; -template class NCollection_Sequence; -template class NCollection_List; -template class NCollection_Vector; - class IntPatch_WLine; // Corresponds for debug information output. diff --git a/src/Aspect/Aspect_XRAction.hxx b/src/Aspect/Aspect_XRAction.hxx index eb9437f05e..84b9299b3d 100644 --- a/src/Aspect/Aspect_XRAction.hxx +++ b/src/Aspect/Aspect_XRAction.hxx @@ -53,6 +53,6 @@ protected: }; //! Map of actions with action Id as a key. -typedef NCollection_IndexedDataMap Aspect_XRActionMap; +typedef NCollection_IndexedDataMap Aspect_XRActionMap; #endif // _Aspect_XRAction_HeaderFile diff --git a/src/Aspect/Aspect_XRActionSet.hxx b/src/Aspect/Aspect_XRActionSet.hxx index fa5c695dc0..9bbf8b9704 100644 --- a/src/Aspect/Aspect_XRActionSet.hxx +++ b/src/Aspect/Aspect_XRActionSet.hxx @@ -50,6 +50,6 @@ protected: Aspect_XRActionMap myActions; //!< map of actions }; -typedef NCollection_IndexedDataMap Aspect_XRActionSetMap; +typedef NCollection_IndexedDataMap Aspect_XRActionSetMap; #endif // _Aspect_XRActionSet_HeaderFile diff --git a/src/BOPAlgo/BOPAlgo_BuilderFace.cxx b/src/BOPAlgo/BOPAlgo_BuilderFace.cxx index 2154b04c30..59efc80e40 100644 --- a/src/BOPAlgo/BOPAlgo_BuilderFace.cxx +++ b/src/BOPAlgo/BOPAlgo_BuilderFace.cxx @@ -167,7 +167,7 @@ void BOPAlgo_BuilderFace::Perform(const Message_ProgressRange& theRange) void BOPAlgo_BuilderFace::PerformShapesToAvoid(const Message_ProgressRange& theRange) { Standard_Boolean bFound; - Standard_Integer i, iCnt, aNbV, aNbE; + Standard_Integer i, aNbV, aNbE; TopTools_IndexedDataMapOfShapeListOfShape aMVE; TopTools_ListIteratorOfListOfShape aIt; // @@ -175,14 +175,11 @@ void BOPAlgo_BuilderFace::PerformShapesToAvoid(const Message_ProgressRange& theR // Message_ProgressScope aPS(theRange, NULL, 1); // - iCnt=0; for(;;) { if (UserBreak(aPS)) { return; } - - ++iCnt; bFound=Standard_False; // // 1. MEF diff --git a/src/BOPAlgo/BOPAlgo_BuilderSolid.cxx b/src/BOPAlgo/BOPAlgo_BuilderSolid.cxx index 9049bfbceb..1f506a9c2a 100644 --- a/src/BOPAlgo/BOPAlgo_BuilderSolid.cxx +++ b/src/BOPAlgo/BOPAlgo_BuilderSolid.cxx @@ -142,7 +142,7 @@ void BOPAlgo_BuilderSolid::Perform(const Message_ProgressRange& theRange) void BOPAlgo_BuilderSolid::PerformShapesToAvoid(const Message_ProgressRange& theRange) { Standard_Boolean bFound; - Standard_Integer i, iCnt, aNbE, aNbF; + Standard_Integer i, aNbE, aNbF; TopAbs_Orientation aOrE; TopTools_IndexedDataMapOfShapeListOfShape aMEF; TopTools_ListIteratorOfListOfShape aIt; @@ -151,12 +151,10 @@ void BOPAlgo_BuilderSolid::PerformShapesToAvoid(const Message_ProgressRange& the // Message_ProgressScope aPS(theRange, NULL, 1); // - iCnt=0; for(;;) { if (UserBreak(aPS)) { return; } - ++iCnt; bFound=Standard_False; // // 1. MEF diff --git a/src/BOPAlgo/BOPAlgo_Builder_2.cxx b/src/BOPAlgo/BOPAlgo_Builder_2.cxx index f2ebfef171..219f5d9f9a 100644 --- a/src/BOPAlgo/BOPAlgo_Builder_2.cxx +++ b/src/BOPAlgo/BOPAlgo_Builder_2.cxx @@ -549,8 +549,7 @@ void BOPAlgo_Builder::BuildSplitFaces(const Message_ProgressRange& theRange) //======================================================================= typedef NCollection_IndexedDataMap BOPAlgo_IndexedDataMapOfSetListOfShape; + TopTools_ListOfShape> BOPAlgo_IndexedDataMapOfSetListOfShape; static void AddEdgeSet(const TopoDS_Shape& theS, BOPAlgo_IndexedDataMapOfSetListOfShape& theMap, @@ -619,8 +618,7 @@ void BOPAlgo_Builder::FillSameDomainFaces(const Message_ProgressRange& theRange) // Data map of set of edges with all faces having this set NCollection_IndexedDataMap anESetFaces(1, aAllocator); + TopTools_ListOfShape> anESetFaces(1, aAllocator); // Map of planar bounded faces. If such faces have the same Edge set // they are considered Same domain, without additional check. TopTools_MapOfShape aMFPlanar(1, aAllocator); @@ -700,7 +698,7 @@ void BOPAlgo_Builder::FillSameDomainFaces(const Message_ProgressRange& theRange) if (bCheckPlanar && aMFPlanar.Contains(aF2)) { // Consider planar bounded faces as Same Domain without additional check - BOPAlgo_Tools::FillMap(aF1, aF2, aDMSLS, aAllocator); + BOPAlgo_Tools::FillMap(aF1, aF2, aDMSLS, aAllocator); continue; } // Add pair for analysis @@ -736,14 +734,12 @@ void BOPAlgo_Builder::FillSameDomainFaces(const Message_ProgressRange& theRange) { BOPAlgo_PairOfShapeBoolean& aPSB = aVPSB(i); if (aPSB.Flag()) - BOPAlgo_Tools::FillMap - (aPSB.Shape1(), aPSB.Shape2(), aDMSLS, aAllocator); + BOPAlgo_Tools::FillMap(aPSB.Shape1(), aPSB.Shape2(), aDMSLS, aAllocator); } aVPSB.Clear(); // Make blocks of SD faces using the back and forth map - BOPAlgo_Tools::MakeBlocks - (aDMSLS, aMBlocks, aAllocator); + BOPAlgo_Tools::MakeBlocks(aDMSLS, aMBlocks, aAllocator); Message_ProgressScope aPS(aPSOuter.Next(3), "Filling same domain faces map", aMBlocks.Size()); // Fill same domain faces map @@ -1027,7 +1023,7 @@ TopoDS_Face BuildDraftFace(const TopoDS_Face& theFace, TopTools_ListIteratorOfListOfShape aItLEIm(*pLEIm); for (; aItLEIm.More(); aItLEIm.Next()) { - TopoDS_Edge& aSp = TopoDS::Edge(aItLEIm.Value()); + TopoDS_Edge& aSp = TopoDS::Edge(aItLEIm.ChangeValue()); // Check if the split has multi-connected vertices if (!bIsDegenerated && HasMultiConnected(aSp, aVerticesCounter)) diff --git a/src/BOPAlgo/BOPAlgo_MakeConnected.hxx b/src/BOPAlgo/BOPAlgo_MakeConnected.hxx index d00aa05df6..733b4c7057 100644 --- a/src/BOPAlgo/BOPAlgo_MakeConnected.hxx +++ b/src/BOPAlgo/BOPAlgo_MakeConnected.hxx @@ -27,7 +27,6 @@ #include -#include //! BOPAlgo_MakeConnected is the algorithm for making the touching //! shapes connected or glued, i.e. for making the coinciding geometries @@ -321,8 +320,7 @@ protected: //! @name Fields // Results NCollection_DataMap myMaterials; //!< Map of the materials associations + TopTools_ListOfShape> myMaterials; //!< Map of the materials associations //! for the border elements TopTools_DataMapOfShapeListOfShape myOrigins; //!< Map of origins //! (allows tracking the shape's ancestors) diff --git a/src/BOPAlgo/BOPAlgo_PaveFiller.hxx b/src/BOPAlgo/BOPAlgo_PaveFiller.hxx index cd2275d994..a2fb939abf 100644 --- a/src/BOPAlgo/BOPAlgo_PaveFiller.hxx +++ b/src/BOPAlgo/BOPAlgo_PaveFiller.hxx @@ -180,13 +180,11 @@ protected: typedef NCollection_DataMap BOPAlgo_DataMapOfPaveBlockBndBox; + Bnd_Box> BOPAlgo_DataMapOfPaveBlockBndBox; typedef NCollection_DataMap BOPAlgo_DataMapOfPaveBlockListOfInteger; + TColStd_ListOfInteger> BOPAlgo_DataMapOfPaveBlockListOfInteger; typedef NCollection_DataMap , - BOPDS_PairMapHasher> myDistances; //!< Map to store minimal distances between shapes + NCollection_List> + myDistances; //!< Map to store minimal distances between shapes //! which have no real intersections }; diff --git a/src/BOPAlgo/BOPAlgo_PaveFiller_1.cxx b/src/BOPAlgo/BOPAlgo_PaveFiller_1.cxx index 9435f46ec6..e1cb9cfb26 100644 --- a/src/BOPAlgo/BOPAlgo_PaveFiller_1.cxx +++ b/src/BOPAlgo/BOPAlgo_PaveFiller_1.cxx @@ -75,7 +75,7 @@ void BOPAlgo_PaveFiller::PerformVV(const Message_ProgressRange& theRange) // if (myDS->HasInterf(n1, n2)) { - BOPAlgo_Tools::FillMap(n1, n2, aMILI, aAllocator); + BOPAlgo_Tools::FillMap(n1, n2, aMILI, aAllocator); continue; } @@ -91,12 +91,12 @@ void BOPAlgo_PaveFiller::PerformVV(const Message_ProgressRange& theRange) iFlag = BOPTools_AlgoTools::ComputeVV(aV1, aV2, myFuzzyValue); if (!iFlag) { - BOPAlgo_Tools::FillMap(n1, n2, aMILI, aAllocator); + BOPAlgo_Tools::FillMap(n1, n2, aMILI, aAllocator); } } // // 2. Make blocks - BOPAlgo_Tools::MakeBlocks(aMILI, aMBlocks, aAllocator); + BOPAlgo_Tools::MakeBlocks(aMILI, aMBlocks, aAllocator); // // 3. Make vertices NCollection_List::Iterator aItB(aMBlocks); diff --git a/src/BOPAlgo/BOPAlgo_PaveFiller_2.cxx b/src/BOPAlgo/BOPAlgo_PaveFiller_2.cxx index eecb0ff9a3..3678bdf2fe 100644 --- a/src/BOPAlgo/BOPAlgo_PaveFiller_2.cxx +++ b/src/BOPAlgo/BOPAlgo_PaveFiller_2.cxx @@ -229,7 +229,7 @@ void BOPAlgo_PaveFiller::IntersectVE // for all vertices having the same SD vertex. // It will also be used as a Fence map to avoid repeated // intersection of the same SD vertex with edge - NCollection_DataMap aDMVSD; + NCollection_DataMap aDMVSD; // Message_ProgressScope aPSOuter(theRange, NULL, 10); for (i = 1; i <= aNbVE; ++i) { @@ -407,8 +407,7 @@ void BOPAlgo_PaveFiller::SplitPaveBlocks(const TColStd_MapOfInteger& theMEdges, BOPDS_MapOfPair aMPairs; // Map to treat the Common Blocks NCollection_IndexedDataMap aMCBNewPB; + BOPDS_ListOfPaveBlock> aMCBNewPB; // // Map of vertices to init the pave blocks for them TColStd_MapOfInteger aMVerticesToInitPB; @@ -507,7 +506,7 @@ void BOPAlgo_PaveFiller::SplitPaveBlocks(const TColStd_MapOfInteger& theMEdges, const BOPDS_ListOfPaveBlock& aLPBN = aMCBNewPB(i); // // For each group of pave blocks with the same vertices make new common block - NCollection_IndexedDataMap aMInds; + NCollection_IndexedDataMap aMInds; BOPDS_ListIteratorOfListOfPaveBlock aItLPB(aLPBN); for (; aItLPB.More(); aItLPB.Next()) { const Handle(BOPDS_PaveBlock)& aPB = aItLPB.Value(); diff --git a/src/BOPAlgo/BOPAlgo_PaveFiller_3.cxx b/src/BOPAlgo/BOPAlgo_PaveFiller_3.cxx index 0e36f380fb..7dd8b3ee41 100644 --- a/src/BOPAlgo/BOPAlgo_PaveFiller_3.cxx +++ b/src/BOPAlgo/BOPAlgo_PaveFiller_3.cxx @@ -526,7 +526,7 @@ void BOPAlgo_PaveFiller::PerformEE(const Message_ProgressRange& theRange) // 2 myDS->AddInterf(nE1, nE2); // - BOPAlgo_Tools::FillMap(aPB1, aPB2, aMPBLPB, aAllocator); + BOPAlgo_Tools::FillMap(aPB1, aPB2, aMPBLPB, aAllocator); }//case TopAbs_EDGE break; default: @@ -964,8 +964,7 @@ void BOPAlgo_PaveFiller::ForceInterfEE(const Message_ProgressRange& theRange) // Fill the connection map from bounding vertices to pave blocks // having those bounding vertices NCollection_IndexedDataMap aPBMap(1, anAlloc); + BOPDS_ListOfPaveBlock> aPBMap(1, anAlloc); // Fence map of pave blocks BOPDS_MapOfPaveBlock aMPBFence(1, anAlloc); @@ -1147,7 +1146,7 @@ void BOPAlgo_PaveFiller::ForceInterfEE(const Message_ProgressRange& theRange) aPBMap.Clear(); aMPBFence.Clear(); - anAlloc->Reset(); + anAlloc->Reset(false); Message_ProgressScope aPS(aPSOuter.Next(9), "Checking for coinciding edges", aNbPairs); for (Standard_Integer i = 0; i < aNbPairs; i++) @@ -1221,14 +1220,11 @@ void BOPAlgo_PaveFiller::ForceInterfEE(const Message_ProgressRange& theRange) const BOPDS_ListOfPaveBlock& aLPBCB = myDS->CommonBlock(aPB[j])->PaveBlocks(); BOPDS_ListIteratorOfListOfPaveBlock aItLPB(aLPBCB); for (; aItLPB.More(); aItLPB.Next()) - BOPAlgo_Tools::FillMap(aPB[j], aItLPB.Value(), aMPBLPB, anAlloc); + BOPAlgo_Tools::FillMap(aPB[j], aItLPB.Value(), aMPBLPB, anAlloc); } } - BOPAlgo_Tools::FillMap(aPB[0], aPB[1], aMPBLPB, anAlloc); + BOPAlgo_Tools::FillMap(aPB[0], aPB[1], aMPBLPB, anAlloc); } - // Create new common blocks of coinciding pairs. BOPAlgo_Tools::PerformCommonBlocks(aMPBLPB, anAlloc, myDS); } diff --git a/src/BOPAlgo/BOPAlgo_PaveFiller_4.cxx b/src/BOPAlgo/BOPAlgo_PaveFiller_4.cxx index e39b6276a1..22dcacc2cd 100644 --- a/src/BOPAlgo/BOPAlgo_PaveFiller_4.cxx +++ b/src/BOPAlgo/BOPAlgo_PaveFiller_4.cxx @@ -172,7 +172,7 @@ void BOPAlgo_PaveFiller::PerformVF(const Message_ProgressRange& theRange) // // Avoid repeated intersection of the same vertex with face in case // the group of vertices formed a single SD vertex - NCollection_DataMap aMVFPairs; + NCollection_DataMap aMVFPairs; for (; myIterator->More(); myIterator->Next()) { if (UserBreak(aPSOuter)) { diff --git a/src/BOPAlgo/BOPAlgo_PaveFiller_5.cxx b/src/BOPAlgo/BOPAlgo_PaveFiller_5.cxx index 0e4c6ed89f..4602355f31 100644 --- a/src/BOPAlgo/BOPAlgo_PaveFiller_5.cxx +++ b/src/BOPAlgo/BOPAlgo_PaveFiller_5.cxx @@ -573,30 +573,11 @@ Standard_Boolean BOPAlgo_PaveFiller::CheckFacePaves const TColStd_MapOfInteger& aMIFOn, const TColStd_MapOfInteger& aMIFIn) { - Standard_Boolean bRet; - Standard_Integer nV; - TColStd_MapIteratorOfMapOfInteger aIt; - // - bRet=Standard_False; - // - aIt.Initialize(aMIFOn); - for (; aIt.More(); aIt.Next()) { - nV=aIt.Value(); - if (nV==nVx) { - bRet=!bRet; - return bRet; - } - } - aIt.Initialize(aMIFIn); - for (; aIt.More(); aIt.Next()) { - nV=aIt.Value(); - if (nV==nVx) { - bRet=!bRet; - return bRet; - } + if (aMIFOn.Contains(nVx) || aMIFIn.Contains(nVx)) + { + return true; } - // - return bRet; + return false; } //======================================================================= // function: CheckFacePaves @@ -1073,7 +1054,7 @@ void BOPAlgo_PaveFiller::ForceInterfEF(const BOPDS_IndexedMapOfPaveBlock& theMPB aPSOuter.Next(0.7); aPBMap.Clear(); - anAlloc->Reset(); + anAlloc->Reset(false); Message_ProgressScope aPS(aPSOuter.Next(9), "Checking for edges coinciding with faces", aNbEFs); for (Standard_Integer i = 0; i < aNbEFs; i++) diff --git a/src/BOPAlgo/BOPAlgo_PaveFiller_6.cxx b/src/BOPAlgo/BOPAlgo_PaveFiller_6.cxx index 0a89813227..5fd7dc82fa 100644 --- a/src/BOPAlgo/BOPAlgo_PaveFiller_6.cxx +++ b/src/BOPAlgo/BOPAlgo_PaveFiller_6.cxx @@ -281,7 +281,7 @@ void BOPAlgo_PaveFiller::PerformFF(const Message_ProgressRange& theRange) // // Collect all pairs of Edge/Edge interferences to check if // some faces have to be moved to obtain more precise intersection - NCollection_DataMap aEEMap; + NCollection_DataMap aEEMap; const BOPDS_VectorOfInterfEE& aVEEs = myDS->InterfEE(); for (Standard_Integer iEE = 0; iEE < aVEEs.Size(); ++iEE) { @@ -1198,8 +1198,7 @@ void BOPAlgo_PaveFiller::PostTreatFF // Map to store the real tolerance of the common block // and avoid repeated computation of it NCollection_DataMap aMCBTol; + Standard_Real> aMCBTol; // Map to avoid creation of different pave blocks for // the same intersection edge NCollection_DataMap aMEPB; diff --git a/src/BOPAlgo/BOPAlgo_Tools.cxx b/src/BOPAlgo/BOPAlgo_Tools.cxx index 13151f8413..e39ab55efd 100644 --- a/src/BOPAlgo/BOPAlgo_Tools.cxx +++ b/src/BOPAlgo/BOPAlgo_Tools.cxx @@ -119,7 +119,7 @@ void BOPAlgo_Tools::PerformCommonBlocks(BOPDS_IndexedDataMapOfPaveBlockListOfPav } // Make Blocks of the pave blocks NCollection_List aMBlocks(aAllocator); - BOPAlgo_Tools::MakeBlocks(aMPBLPB, aMBlocks, aAllocator); + BOPAlgo_Tools::MakeBlocks(aMPBLPB, aMBlocks, aAllocator); // Use temporary allocator for the local fence map Handle(NCollection_IncAllocator) anAllocTmp = new NCollection_IncAllocator; @@ -132,7 +132,7 @@ void BOPAlgo_Tools::PerformCommonBlocks(BOPDS_IndexedDataMapOfPaveBlockListOfPav continue; // Reset the allocator - anAllocTmp->Reset(); + anAllocTmp->Reset(false); // New common block Handle(BOPDS_CommonBlock) aCB; // Faces of the common block @@ -1068,11 +1068,11 @@ void BOPAlgo_Tools::IntersectVertices(const TopTools_IndexedDataMapOfShapeReal& for (Standard_Integer iPair = 0; iPair < aNbPairs; ++iPair) { const BOPTools_BoxPairSelector::PairIDs& aPair = aPairs[iPair]; - BOPAlgo_Tools::FillMap (aPair.ID1, aPair.ID2, aMILI, anAlloc); + BOPAlgo_Tools::FillMap (aPair.ID1, aPair.ID2, aMILI, anAlloc); } - NCollection_List aBlocks (anAlloc); - BOPAlgo_Tools::MakeBlocks (aMILI, aBlocks, anAlloc); + NCollection_List aBlocks(anAlloc); + BOPAlgo_Tools::MakeBlocks (aMILI, aBlocks, anAlloc); NCollection_List::Iterator itLI (aBlocks); for (; itLI.More(); itLI.Next()) diff --git a/src/BOPAlgo/BOPAlgo_Tools.hxx b/src/BOPAlgo/BOPAlgo_Tools.hxx index ec6cce7908..465edc2731 100644 --- a/src/BOPAlgo/BOPAlgo_Tools.hxx +++ b/src/BOPAlgo/BOPAlgo_Tools.hxx @@ -42,31 +42,31 @@ class BOPAlgo_Tools { public: - //! Makes the chains of the connected elements from the given connexity map - template - static void MakeBlocks(const NCollection_IndexedDataMap, theTypeHasher>& theMILI, - NCollection_List>& theMBlocks, + //! Makes the chains of the connected elements from the given convexity map + template + static void MakeBlocks(const TheMap& theMILI, + TheList& theMBlocks, const Handle(NCollection_BaseAllocator)& theAllocator) { - NCollection_Map aMFence; + NCollection_Map aMFence; Standard_Integer i, aNb = theMILI.Extent(); for (i = 1; i <= aNb; ++i) { - const theType& n = theMILI.FindKey(i); + const typename TheMap::key_type& n = theMILI.FindKey(i); if (!aMFence.Add(n)) continue; // // Start the chain - NCollection_List& aChain = theMBlocks.Append(NCollection_List(theAllocator)); + typename TheList::value_type& aChain = theMBlocks.Append(typename TheList::value_type(theAllocator)); aChain.Append(n); // Look for connected elements - typename NCollection_List::Iterator aItLChain(aChain); + typename TheList::value_type::Iterator aItLChain(aChain); for (; aItLChain.More(); aItLChain.Next()) { - const theType& n1 = aItLChain.Value(); - const NCollection_List& aLI = theMILI.FindFromKey(n1); + const typename TheMap::key_type& n1 = aItLChain.Value(); + const typename TheList::value_type& aLI = theMILI.FindFromKey(n1); // Add connected elements into the chain - typename NCollection_List::Iterator aItLI(aLI); + typename TheList::value_type::Iterator aItLI(aLI); for (; aItLI.More(); aItLI.Next()) { - const theType& n2 = aItLI.Value(); + const typename TheMap::key_type& n2 = aItLI.Value(); if (aMFence.Add(n2)) { aChain.Append(n2); } @@ -76,21 +76,21 @@ public: } //! Fills the map with the connected entities - template - static void FillMap(const theType& n1, - const theType& n2, - NCollection_IndexedDataMap, theTypeHasher>& theMILI, + template + static void FillMap(const TheType& n1, + const TheType& n2, + TheMap& theMILI, const Handle(NCollection_BaseAllocator)& theAllocator) { - NCollection_List *pList1 = theMILI.ChangeSeek(n1); + typename TheMap::value_type *pList1 = theMILI.ChangeSeek(n1); if (!pList1) { - pList1 = &theMILI(theMILI.Add(n1, NCollection_List(theAllocator))); + pList1 = &theMILI(theMILI.Add(n1, NCollection_List(theAllocator))); } pList1->Append(n2); // - NCollection_List *pList2 = theMILI.ChangeSeek(n2); + typename TheMap::value_type*pList2 = theMILI.ChangeSeek(n2); if (!pList2) { - pList2 = &theMILI(theMILI.Add(n2, NCollection_List(theAllocator))); + pList2 = &theMILI(theMILI.Add(n2, typename TheMap::value_type(theAllocator))); } pList2->Append(n1); } diff --git a/src/BOPDS/BOPDS_DS.cxx b/src/BOPDS/BOPDS_DS.cxx index 9ad33e6fdd..d7d693df86 100644 --- a/src/BOPDS/BOPDS_DS.cxx +++ b/src/BOPDS/BOPDS_DS.cxx @@ -965,8 +965,8 @@ void BOPDS_DS::UpdateCommonBlock(const Handle(BOPDS_CommonBlock)& theCB, Standard_Integer nE, iRef, n1, n2; BOPDS_ListIteratorOfListOfPaveBlock aItPB, aItPBCB, aItPBN; BOPDS_ListOfPaveBlock aLPBN; - NCollection_DataMap aMPKLPB; - NCollection_DataMap::Iterator aItMPKLPB; + NCollection_DataMap aMPKLPB; + NCollection_DataMap::Iterator aItMPKLPB; Handle(BOPDS_PaveBlock) aPB; Handle(BOPDS_CommonBlock) aCBx; BOPDS_Pair aPK; diff --git a/src/BOPDS/BOPDS_DataMapOfIntegerListOfPaveBlock.hxx b/src/BOPDS/BOPDS_DataMapOfIntegerListOfPaveBlock.hxx index 6c8a35d70d..630928f1ed 100644 --- a/src/BOPDS/BOPDS_DataMapOfIntegerListOfPaveBlock.hxx +++ b/src/BOPDS/BOPDS_DataMapOfIntegerListOfPaveBlock.hxx @@ -18,6 +18,6 @@ #include #include -typedef NCollection_DataMap BOPDS_DataMapOfIntegerListOfPaveBlock; +typedef NCollection_DataMap BOPDS_DataMapOfIntegerListOfPaveBlock; #endif diff --git a/src/BOPDS/BOPDS_DataMapOfPaveBlockCommonBlock.hxx b/src/BOPDS/BOPDS_DataMapOfPaveBlockCommonBlock.hxx index 0694c8386d..f805274635 100644 --- a/src/BOPDS/BOPDS_DataMapOfPaveBlockCommonBlock.hxx +++ b/src/BOPDS/BOPDS_DataMapOfPaveBlockCommonBlock.hxx @@ -17,10 +17,9 @@ #define BOPDS_DataMapOfPaveBlockCommonBlock_HeaderFile #include -#include #include -typedef NCollection_DataMap BOPDS_DataMapOfPaveBlockCommonBlock; +typedef NCollection_DataMap BOPDS_DataMapOfPaveBlockCommonBlock; typedef BOPDS_DataMapOfPaveBlockCommonBlock::Iterator BOPDS_DataMapIteratorOfDataMapOfPaveBlockCommonBlock; #endif diff --git a/src/BOPDS/BOPDS_DataMapOfPaveBlockListOfInteger.hxx b/src/BOPDS/BOPDS_DataMapOfPaveBlockListOfInteger.hxx index 7fc61c0e08..96a2cdef8b 100644 --- a/src/BOPDS/BOPDS_DataMapOfPaveBlockListOfInteger.hxx +++ b/src/BOPDS/BOPDS_DataMapOfPaveBlockListOfInteger.hxx @@ -16,10 +16,9 @@ #define BOPDS_DataMapOfPaveBlockListOfInteger_HeaderFile #include -#include #include -typedef NCollection_DataMap BOPDS_DataMapOfPaveBlockListOfInteger; +typedef NCollection_DataMap BOPDS_DataMapOfPaveBlockListOfInteger; typedef BOPDS_DataMapOfPaveBlockListOfInteger::Iterator BOPDS_DataMapIteratorOfDataMapOfPaveBlockListOfInteger; #endif diff --git a/src/BOPDS/BOPDS_DataMapOfPaveBlockListOfPaveBlock.hxx b/src/BOPDS/BOPDS_DataMapOfPaveBlockListOfPaveBlock.hxx index fa2f68daec..0d04eb0f54 100644 --- a/src/BOPDS/BOPDS_DataMapOfPaveBlockListOfPaveBlock.hxx +++ b/src/BOPDS/BOPDS_DataMapOfPaveBlockListOfPaveBlock.hxx @@ -16,11 +16,10 @@ #define BOPDS_DataMapOfPaveBlockListOfPaveBlock_HeaderFile #include -#include #include #include -typedef NCollection_DataMap BOPDS_DataMapOfPaveBlockListOfPaveBlock; +typedef NCollection_DataMap BOPDS_DataMapOfPaveBlockListOfPaveBlock; typedef BOPDS_DataMapOfPaveBlockListOfPaveBlock::Iterator BOPDS_DataMapIteratorOfDataMapOfPaveBlockListOfPaveBlock; #endif diff --git a/src/BOPDS/BOPDS_IndexedDataMapOfPaveBlockListOfInteger.hxx b/src/BOPDS/BOPDS_IndexedDataMapOfPaveBlockListOfInteger.hxx index 2236e4d33c..a9bdbfe4cb 100644 --- a/src/BOPDS/BOPDS_IndexedDataMapOfPaveBlockListOfInteger.hxx +++ b/src/BOPDS/BOPDS_IndexedDataMapOfPaveBlockListOfInteger.hxx @@ -16,10 +16,9 @@ #define BOPDS_IndexedDataMapOfPaveBlockListOfInteger_HeaderFile #include -#include #include #include -typedef NCollection_IndexedDataMap BOPDS_IndexedDataMapOfPaveBlockListOfInteger; +typedef NCollection_IndexedDataMap BOPDS_IndexedDataMapOfPaveBlockListOfInteger; #endif diff --git a/src/BOPDS/BOPDS_IndexedDataMapOfPaveBlockListOfPaveBlock.hxx b/src/BOPDS/BOPDS_IndexedDataMapOfPaveBlockListOfPaveBlock.hxx index c8e0382c41..3ce09a5b22 100644 --- a/src/BOPDS/BOPDS_IndexedDataMapOfPaveBlockListOfPaveBlock.hxx +++ b/src/BOPDS/BOPDS_IndexedDataMapOfPaveBlockListOfPaveBlock.hxx @@ -16,10 +16,9 @@ #define BOPDS_IndexedDataMapOfPaveBlockListOfPaveBlock_HeaderFile #include -#include #include #include -typedef NCollection_IndexedDataMap BOPDS_IndexedDataMapOfPaveBlockListOfPaveBlock; +typedef NCollection_IndexedDataMap BOPDS_IndexedDataMapOfPaveBlockListOfPaveBlock; #endif diff --git a/src/BOPDS/BOPDS_IndexedMapOfPaveBlock.hxx b/src/BOPDS/BOPDS_IndexedMapOfPaveBlock.hxx index 8ed5f34858..7b990919bc 100644 --- a/src/BOPDS/BOPDS_IndexedMapOfPaveBlock.hxx +++ b/src/BOPDS/BOPDS_IndexedMapOfPaveBlock.hxx @@ -16,9 +16,8 @@ #define BOPDS_IndexedMapOfPaveBlock_HeaderFile #include -#include #include -typedef NCollection_IndexedMap BOPDS_IndexedMapOfPaveBlock; +typedef NCollection_IndexedMap BOPDS_IndexedMapOfPaveBlock; #endif diff --git a/src/BOPDS/BOPDS_ListOfPaveBlock.hxx b/src/BOPDS/BOPDS_ListOfPaveBlock.hxx index 8692313da8..501686356f 100644 --- a/src/BOPDS/BOPDS_ListOfPaveBlock.hxx +++ b/src/BOPDS/BOPDS_ListOfPaveBlock.hxx @@ -15,9 +15,11 @@ #ifndef BOPDS_ListOfPaveBlock_HeaderFile #define BOPDS_ListOfPaveBlock_HeaderFile -#include +#include +#include class BOPDS_PaveBlock; + typedef NCollection_List BOPDS_ListOfPaveBlock; typedef BOPDS_ListOfPaveBlock::Iterator BOPDS_ListIteratorOfListOfPaveBlock; diff --git a/src/BOPDS/BOPDS_MapOfCommonBlock.hxx b/src/BOPDS/BOPDS_MapOfCommonBlock.hxx index 6ab0203832..21dccc1cd5 100644 --- a/src/BOPDS/BOPDS_MapOfCommonBlock.hxx +++ b/src/BOPDS/BOPDS_MapOfCommonBlock.hxx @@ -16,10 +16,9 @@ #define BOPDS_MapOfCommonBlock_HeaderFile #include -#include #include -typedef NCollection_Map BOPDS_MapOfCommonBlock; +typedef NCollection_Map BOPDS_MapOfCommonBlock; typedef BOPDS_MapOfCommonBlock::Iterator BOPDS_MapIteratorOfMapOfCommonBlock; #endif diff --git a/src/BOPDS/BOPDS_MapOfPair.hxx b/src/BOPDS/BOPDS_MapOfPair.hxx index e9a9e73f23..ac97544045 100644 --- a/src/BOPDS/BOPDS_MapOfPair.hxx +++ b/src/BOPDS/BOPDS_MapOfPair.hxx @@ -16,10 +16,9 @@ #define BOPDS_MapOfPair_HeaderFile #include -#include #include -typedef NCollection_Map BOPDS_MapOfPair; +typedef NCollection_Map BOPDS_MapOfPair; typedef BOPDS_MapOfPair::Iterator BOPDS_MapIteratorOfMapOfPair; #endif diff --git a/src/BOPDS/BOPDS_MapOfPave.hxx b/src/BOPDS/BOPDS_MapOfPave.hxx index d445e38943..22f63dd62c 100644 --- a/src/BOPDS/BOPDS_MapOfPave.hxx +++ b/src/BOPDS/BOPDS_MapOfPave.hxx @@ -16,10 +16,9 @@ #define BOPDS_MapOfPave_HeaderFile #include -#include #include -typedef NCollection_Map BOPDS_MapOfPave; +typedef NCollection_Map BOPDS_MapOfPave; typedef BOPDS_MapOfPave::Iterator BOPDS_MapIteratorOfMapOfPave; #endif diff --git a/src/BOPDS/BOPDS_MapOfPaveBlock.hxx b/src/BOPDS/BOPDS_MapOfPaveBlock.hxx index 784e101104..fb75669f7a 100644 --- a/src/BOPDS/BOPDS_MapOfPaveBlock.hxx +++ b/src/BOPDS/BOPDS_MapOfPaveBlock.hxx @@ -16,10 +16,9 @@ #define BOPDS_MapOfPaveBlock_HeaderFile #include -#include #include -typedef NCollection_Map BOPDS_MapOfPaveBlock; +typedef NCollection_Map BOPDS_MapOfPaveBlock; typedef BOPDS_MapOfPaveBlock::Iterator BOPDS_MapIteratorOfMapOfPaveBlock; #endif diff --git a/src/BOPDS/BOPDS_Pair.hxx b/src/BOPDS/BOPDS_Pair.hxx index e26a7d3fd0..0fbd17002b 100644 --- a/src/BOPDS/BOPDS_Pair.hxx +++ b/src/BOPDS/BOPDS_Pair.hxx @@ -17,6 +17,7 @@ #include #include +#include //! The class is to provide the pair of indices of interfering shapes. @@ -62,12 +63,9 @@ class BOPDS_Pair { (myIndex1 == theOther.myIndex2 && myIndex2 == theOther.myIndex1); } - //! Computes a hash code for this pair, in the range [1, theUpperBound] - //! @param theUpperBound the upper bound of the range a computing hash code must be within - //! @return a computed hash code, in the range [1, theUpperBound] - Standard_Integer HashCode (const Standard_Integer theUpperBound) const + bool operator==(const BOPDS_Pair& theOther) const { - return ::HashCode(myIndex1 + myIndex2, theUpperBound); + return IsEqual(theOther); } protected: @@ -75,4 +73,23 @@ class BOPDS_Pair { Standard_Integer myIndex2; }; +namespace std +{ + template <> + struct hash + { + size_t operator()(const BOPDS_Pair& thePair) const noexcept + { + // Combine two int values into a single hash value. + int aCombination[2]; + thePair.Indices(aCombination[0], aCombination[1]); + if (aCombination[0] > aCombination[1]) + { + std::swap(aCombination[0], aCombination[1]); + } + return opencascade::hashBytes(aCombination, sizeof(aCombination)); + } + }; +} + #endif // _BOPDS_Pair \ No newline at end of file diff --git a/src/BOPDS/BOPDS_PairMapHasher.hxx b/src/BOPDS/BOPDS_PairMapHasher.hxx deleted file mode 100644 index 64d7ec7b6e..0000000000 --- a/src/BOPDS/BOPDS_PairMapHasher.hxx +++ /dev/null @@ -1,53 +0,0 @@ -// Created by: Eugeny MALTCHIKOV -// Copyright (c) 2017 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 _BOPDS_PairMapHasher_HeaderFile -#define _BOPDS_PairMapHasher_HeaderFile - -#include -#include - -#include -#include - -class BOPDS_Pair; - -class BOPDS_PairMapHasher -{ -public: - - DEFINE_STANDARD_ALLOC - - //! Computes a hash code for the given pair, in the range [1, theUpperBound] - //! @param thePair the pair which hash code is to be computed - //! @param theUpperBound the upper bound of the range a computing hash code must be within - //! @return a computed hash code, in the range [1, theUpperBound] - static Standard_Integer HashCode (const BOPDS_Pair& thePair, const Standard_Integer theUpperBound) - { - return thePair.HashCode (theUpperBound); - } - - static Standard_Boolean IsEqual(const BOPDS_Pair& thePair1, - const BOPDS_Pair& thePair2) - { - return thePair1.IsEqual(thePair2); - } - -protected: - -private: - -}; - -#endif // _BOPDS_PairMapHasher_HeaderFile diff --git a/src/BOPDS/BOPDS_Pave.hxx b/src/BOPDS/BOPDS_Pave.hxx index 8d5bcc069c..6a09d57bcc 100644 --- a/src/BOPDS/BOPDS_Pave.hxx +++ b/src/BOPDS/BOPDS_Pave.hxx @@ -103,6 +103,20 @@ private: }; +namespace std +{ + template <> + struct hash + { + size_t operator()(const BOPDS_Pave& thePave) const noexcept + { + size_t aCombination[2]; + aCombination[0] = opencascade::hash(thePave.Index()); + aCombination[1] = opencascade::hash(thePave.Parameter()); + return opencascade::hashBytes(aCombination, sizeof(aCombination)); + } + }; +} #include diff --git a/src/BOPDS/BOPDS_PaveMapHasher.hxx b/src/BOPDS/BOPDS_PaveMapHasher.hxx deleted file mode 100644 index e64a644a8b..0000000000 --- a/src/BOPDS/BOPDS_PaveMapHasher.hxx +++ /dev/null @@ -1,64 +0,0 @@ -// Created by: Eugeny MALTCHIKOV -// Copyright (c) 1999-2014 OPEN CASCADE SAS -// -// This file is part of Open CASCADE Technology software library. -// -// This library is free software; you can redistribute it and/or modify it under -// the terms of the GNU Lesser General Public License version 2.1 as published -// by the Free Software Foundation, with special exception defined in the file -// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT -// distribution for complete text of the license and disclaimer of any warranty. -// -// Alternatively, this file may be used under the terms of Open CASCADE -// commercial license or contractual agreement. - -#ifndef _BOPDS_PaveMapHasher_HeaderFile -#define _BOPDS_PaveMapHasher_HeaderFile - -#include -#include - -#include -class BOPDS_Pave; - - - -class BOPDS_PaveMapHasher -{ -public: - - DEFINE_STANDARD_ALLOC - - //! Computes a hash code for the given pave, in the range [1, theUpperBound] - //! @param thePave the pave which hash code is to be computed - //! @param theUpperBound the upper bound of the range a computing hash code must be within - //! @return a computed hash code, in the range [1, theUpperBound] - static Standard_Integer HashCode (const BOPDS_Pave& thePave, Standard_Integer theUpperBound); - - static Standard_Boolean IsEqual (const BOPDS_Pave& aPave1, const BOPDS_Pave& aPave2); - - - - -protected: - - - - - -private: - - - - - -}; - - -#include - - - - - -#endif // _BOPDS_PaveMapHasher_HeaderFile diff --git a/src/BOPDS/BOPDS_PaveMapHasher.lxx b/src/BOPDS/BOPDS_PaveMapHasher.lxx deleted file mode 100644 index a6fb0b44a8..0000000000 --- a/src/BOPDS/BOPDS_PaveMapHasher.lxx +++ /dev/null @@ -1,35 +0,0 @@ -// Created by: Eugeny MALTCHIKOV -// Copyright (c) 1999-2014 OPEN CASCADE SAS -// -// This file is part of Open CASCADE Technology software library. -// -// This library is free software; you can redistribute it and/or modify it under -// the terms of the GNU Lesser General Public License version 2.1 as published -// by the Free Software Foundation, with special exception defined in the file -// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT -// distribution for complete text of the license and disclaimer of any warranty. -// -// Alternatively, this file may be used under the terms of Open CASCADE -// commercial license or contractual agreement. - -#include - -//======================================================================= -// function : HashCode -// purpose : -//======================================================================= -inline Standard_Integer BOPDS_PaveMapHasher::HashCode (const BOPDS_Pave& thePave, const Standard_Integer theUpperBound) -{ - return ::HashCode (thePave.Index(), theUpperBound); -} - -//======================================================================= -//function :IsEqual -//purpose : -//======================================================================= -inline - Standard_Boolean BOPDS_PaveMapHasher::IsEqual(const BOPDS_Pave& aPave1, - const BOPDS_Pave& aPave2) -{ - return aPave1.IsEqual(aPave2); -} diff --git a/src/BOPDS/FILES b/src/BOPDS/FILES index d66100a521..f7ce702c13 100644 --- a/src/BOPDS/FILES +++ b/src/BOPDS/FILES @@ -35,8 +35,6 @@ BOPDS_Pave.hxx BOPDS_Pave.lxx BOPDS_PaveBlock.cxx BOPDS_PaveBlock.hxx -BOPDS_PaveMapHasher.hxx -BOPDS_PaveMapHasher.lxx BOPDS_PDS.hxx BOPDS_PIterator.hxx BOPDS_PIteratorSI.hxx @@ -67,7 +65,6 @@ BOPDS_VectorOfPave.hxx BOPDS_VectorOfPoint.hxx BOPDS_VectorOfShapeInfo.hxx BOPDS_Pair.hxx -BOPDS_PairMapHasher.hxx BOPDS_MapOfPair.hxx BOPDS_VectorOfPair.hxx BOPDS_VectorOfVectorOfPair.hxx diff --git a/src/BOPTools/BOPTools_IndexedDataMapOfSetShape.hxx b/src/BOPTools/BOPTools_IndexedDataMapOfSetShape.hxx index a2857d0744..5ad63044fa 100644 --- a/src/BOPTools/BOPTools_IndexedDataMapOfSetShape.hxx +++ b/src/BOPTools/BOPTools_IndexedDataMapOfSetShape.hxx @@ -16,10 +16,9 @@ #define BOPTools_IndexedDataMapOfSetShape_HeaderFile #include -#include #include #include -typedef NCollection_IndexedDataMap BOPTools_IndexedDataMapOfSetShape; +typedef NCollection_IndexedDataMap BOPTools_IndexedDataMapOfSetShape; #endif diff --git a/src/BOPTools/BOPTools_MapOfSet.hxx b/src/BOPTools/BOPTools_MapOfSet.hxx index bea5786138..0a9e80b0bc 100644 --- a/src/BOPTools/BOPTools_MapOfSet.hxx +++ b/src/BOPTools/BOPTools_MapOfSet.hxx @@ -16,11 +16,10 @@ #define BOPTools_MapOfSet_HeaderFile #include -#include #include -typedef NCollection_Map BOPTools_MapOfSet; +typedef NCollection_Map BOPTools_MapOfSet; typedef BOPTools_MapOfSet::Iterator BOPTools_MapIteratorOfMapOfSet; #endif diff --git a/src/BOPTools/BOPTools_Parallel.hxx b/src/BOPTools/BOPTools_Parallel.hxx index 2f34d7bc4e..de87a3a0a5 100644 --- a/src/BOPTools/BOPTools_Parallel.hxx +++ b/src/BOPTools/BOPTools_Parallel.hxx @@ -50,25 +50,6 @@ class BOPTools_Parallel template class ContextFunctor { - //! Auxiliary thread ID hasher. - struct Hasher - { - //! Computes a hash code for the given thread identifier, in the range [1, theUpperBound] - //! @param theThreadId the thread identifier which hash code is to be computed - //! @param theUpperBound the upper bound of the range a computing hash code must be within - //! @return a computed hash code, in the range [1, theUpperBound] - static Standard_Integer HashCode (const Standard_ThreadId theThreadId, const Standard_Integer theUpperBound) - { - return ::HashCode (theThreadId, theUpperBound); - } - - static Standard_Boolean IsEqual(const Standard_ThreadId theKey1, - const Standard_ThreadId theKey2) - { - return theKey1 == theKey2; - } - }; - public: //! Constructor @@ -116,7 +97,7 @@ class BOPTools_Parallel private: TypeSolverVector& mySolverVector; - mutable NCollection_DataMap, Hasher> myContextMap; + mutable NCollection_DataMap> myContextMap; mutable Standard_Mutex myMutex; }; diff --git a/src/BOPTools/BOPTools_Set.cxx b/src/BOPTools/BOPTools_Set.cxx index d6a146aef0..1c97deac1c 100644 --- a/src/BOPTools/BOPTools_Set.cxx +++ b/src/BOPTools/BOPTools_Set.cxx @@ -21,8 +21,8 @@ #include static - Standard_Integer NormalizedIds(const Standard_Integer aId, - const Standard_Integer aDiv); + size_t NormalizedIds(const size_t aId, + const Standard_Integer aDiv); //======================================================================= //function : @@ -127,15 +127,6 @@ const TopoDS_Shape& BOPTools_Set::Shape()const return myShape; } -//======================================================================= -// function : HashCode -// purpose : -//======================================================================= -Standard_Integer BOPTools_Set::HashCode (const Standard_Integer theUpperBound) const -{ - return ::HashCode (mySum, theUpperBound); -} - //======================================================================= //function : IsEqual //purpose : @@ -177,7 +168,7 @@ Standard_Boolean BOPTools_Set::IsEqual void BOPTools_Set::Add(const TopoDS_Shape& theS, const TopAbs_ShapeEnum theType) { - Standard_Integer aId, aIdN; + size_t aId, aIdN; TopAbs_Orientation aOr; TopExp_Explorer aExp; // @@ -223,7 +214,7 @@ void BOPTools_Set::Add(const TopoDS_Shape& theS, aIt.Initialize(myShapes); for (; aIt.More(); aIt.Next()) { const TopoDS_Shape& aSx=aIt.Value(); - aId=aSx.HashCode(myUpper); + aId = TopTools_ShapeMapHasher{}(aSx) % myUpper + 1; aIdN=NormalizedIds(aId, myNbShapes); mySum+=aIdN; } @@ -232,13 +223,13 @@ void BOPTools_Set::Add(const TopoDS_Shape& theS, // function: NormalizedIds // purpose : //======================================================================= -Standard_Integer NormalizedIds(const Standard_Integer aId, - const Standard_Integer aDiv) +size_t NormalizedIds(const size_t aId, + const Standard_Integer aDiv) { - Standard_Integer aMax, aTresh, aIdRet; + size_t aMax, aTresh, aIdRet; // aIdRet=aId; - aMax=::IntegerLast(); + aMax=SIZE_MAX; aTresh=aMax/aDiv; if (aId>aTresh) { aIdRet=aId%aTresh; diff --git a/src/BOPTools/BOPTools_Set.hxx b/src/BOPTools/BOPTools_Set.hxx index bd6ecd2939..67cb07d82d 100644 --- a/src/BOPTools/BOPTools_Set.hxx +++ b/src/BOPTools/BOPTools_Set.hxx @@ -55,11 +55,12 @@ BOPTools_Set& operator = (const BOPTools_Set& Other) Standard_EXPORT Standard_Boolean IsEqual (const BOPTools_Set& aOther) const; - //! Computes a hash code for this set, in the range [1, theUpperBound] - //! @param theUpperBound the upper bound of the range a computing hash code must be within - //! @return a computed hash code, in the range [1, theUpperBound] - Standard_EXPORT Standard_Integer HashCode (Standard_Integer theUpperBound) const; + bool operator==(const BOPTools_Set& theOther) const + { + return IsEqual(theOther); + } + size_t GetSum() const { return mySum; } protected: @@ -71,22 +72,20 @@ protected: TopTools_ListOfShape myShapes; TopoDS_Shape myShape; Standard_Integer myNbShapes; - Standard_Integer mySum; + size_t mySum; Standard_Integer myUpper; - - -private: - - - - - }; - - - - - +namespace std +{ + template <> + struct hash + { + size_t operator()(const BOPTools_Set& theSet) const noexcept + { + return theSet.GetSum(); + } + }; +} #endif // _BOPTools_Set_HeaderFile diff --git a/src/BOPTools/BOPTools_SetMapHasher.hxx b/src/BOPTools/BOPTools_SetMapHasher.hxx deleted file mode 100644 index 875f0b09ab..0000000000 --- a/src/BOPTools/BOPTools_SetMapHasher.hxx +++ /dev/null @@ -1,64 +0,0 @@ -// Created by: Peter KURNEV -// Copyright (c) 1999-2014 OPEN CASCADE SAS -// -// This file is part of Open CASCADE Technology software library. -// -// This library is free software; you can redistribute it and/or modify it under -// the terms of the GNU Lesser General Public License version 2.1 as published -// by the Free Software Foundation, with special exception defined in the file -// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT -// distribution for complete text of the license and disclaimer of any warranty. -// -// Alternatively, this file may be used under the terms of Open CASCADE -// commercial license or contractual agreement. - -#ifndef _BOPTools_SetMapHasher_HeaderFile -#define _BOPTools_SetMapHasher_HeaderFile - -#include -#include - -#include -class BOPTools_Set; - - - -class BOPTools_SetMapHasher -{ -public: - - DEFINE_STANDARD_ALLOC - - //! Computes a hash code for the given set, in the range [1, theUpperBound] - //! @param theSet the set which hash code is to be computed - //! @param theUpperBound the upper bound of the range a computing hash code must be within - //! @return a computed hash code, in the range [1, theUpperBound] - static Standard_Integer HashCode (const BOPTools_Set& theSet, Standard_Integer theUpperBound); - - static Standard_Boolean IsEqual (const BOPTools_Set& aSet1, const BOPTools_Set& aSet2); - - - - -protected: - - - - - -private: - - - - - -}; - - -#include - - - - - -#endif // _BOPTools_SetMapHasher_HeaderFile diff --git a/src/BOPTools/BOPTools_SetMapHasher.lxx b/src/BOPTools/BOPTools_SetMapHasher.lxx deleted file mode 100644 index 3cdd0c9b6f..0000000000 --- a/src/BOPTools/BOPTools_SetMapHasher.lxx +++ /dev/null @@ -1,35 +0,0 @@ -// Created by: Peter KURNEV -// Copyright (c) 1999-2014 OPEN CASCADE SAS -// -// This file is part of Open CASCADE Technology software library. -// -// This library is free software; you can redistribute it and/or modify it under -// the terms of the GNU Lesser General Public License version 2.1 as published -// by the Free Software Foundation, with special exception defined in the file -// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT -// distribution for complete text of the license and disclaimer of any warranty. -// -// Alternatively, this file may be used under the terms of Open CASCADE -// commercial license or contractual agreement. - -//#include - -//======================================================================= -// function : HashCode -// purpose : -//======================================================================= -inline Standard_Integer BOPTools_SetMapHasher::HashCode (const BOPTools_Set& theSet, - const Standard_Integer theUpperBound) -{ - return theSet.HashCode (theUpperBound); -} - -//======================================================================= -//function :IsEqual -//purpose : -//======================================================================= -inline Standard_Boolean BOPTools_SetMapHasher::IsEqual(const BOPTools_Set& theSS1, - const BOPTools_Set& theSS2) -{ - return theSS1.IsEqual(theSS2); -} diff --git a/src/BOPTools/FILES b/src/BOPTools/FILES index 26ade9a944..3e6777deae 100755 --- a/src/BOPTools/FILES +++ b/src/BOPTools/FILES @@ -19,5 +19,3 @@ BOPTools_PairSelector.hxx BOPTools_Parallel.hxx BOPTools_Set.cxx BOPTools_Set.hxx -BOPTools_SetMapHasher.hxx -BOPTools_SetMapHasher.lxx diff --git a/src/BRep/BRep_Builder.cxx b/src/BRep/BRep_Builder.cxx index ab78ac8e0b..d0759d6540 100644 --- a/src/BRep/BRep_Builder.cxx +++ b/src/BRep/BRep_Builder.cxx @@ -356,7 +356,7 @@ static void UpdateCurves(BRep_ListOfCurveRepresentation& lcr, } if (itcr.More()) { - Handle(BRep_CurveRepresentation)& cr = itcr.Value(); + Handle(BRep_CurveRepresentation) cr = itcr.Value(); cr->Continuity(C); } else { @@ -380,7 +380,7 @@ static void UpdatePoints(BRep_ListOfPointRepresentation& lpr, } if (itpr.More()) { - Handle(BRep_PointRepresentation)& pr = itpr.Value(); + Handle(BRep_PointRepresentation) pr = itpr.Value(); pr->Parameter(p); } else { @@ -404,7 +404,7 @@ static void UpdatePoints(BRep_ListOfPointRepresentation& lpr, } if (itpr.More()) { - Handle(BRep_PointRepresentation)& pr = itpr.Value(); + Handle(BRep_PointRepresentation) pr = itpr.Value(); pr->Parameter(p); } else { @@ -430,7 +430,7 @@ static void UpdatePoints(BRep_ListOfPointRepresentation& lpr, } if (itpr.More()) { - Handle(BRep_PointRepresentation)& pr = itpr.Value(); + Handle(BRep_PointRepresentation) pr = itpr.Value(); pr->Parameter(p1); // pr->Parameter(p2); // skv pr->Parameter2(p2); // skv diff --git a/src/BRep/BRep_Tool.cxx b/src/BRep/BRep_Tool.cxx index f4d4c59df4..57b95f7ef0 100644 --- a/src/BRep/BRep_Tool.cxx +++ b/src/BRep/BRep_Tool.cxx @@ -1053,7 +1053,7 @@ void BRep_Tool::SetUVPoints(const TopoDS_Edge& E, BRep_ListIteratorOfListOfCurveRepresentation itcr(TE->Curves()); while (itcr.More()) { - Handle(BRep_CurveRepresentation)& cr = itcr.Value(); + Handle(BRep_CurveRepresentation) cr = itcr.Value(); if (cr->IsCurveOnSurface(S,l)) { if (cr->IsCurveOnClosedSurface() && Eisreversed) { diff --git a/src/BRepAlgo/BRepAlgo_FaceRestrictor.cxx b/src/BRepAlgo/BRepAlgo_FaceRestrictor.cxx index 5ed2ab2e70..05c849b353 100644 --- a/src/BRepAlgo/BRepAlgo_FaceRestrictor.cxx +++ b/src/BRepAlgo/BRepAlgo_FaceRestrictor.cxx @@ -384,7 +384,7 @@ void BRepAlgo_FaceRestrictor::PerformWithCorrection() // Reorientation of all closed wires to the left. //--------------------------------------------------------- for (; it.More(); it.Next()) { - TopoDS_Wire& W = TopoDS::Wire(it.Value()); + TopoDS_Wire& W = TopoDS::Wire(it.ChangeValue()); TopoDS_Shape aLocalShape = myFace.EmptyCopied(); TopoDS_Face NF = TopoDS::Face(aLocalShape); // TopoDS_Face NF = TopoDS::Face(myFace.EmptyCopied()); @@ -402,7 +402,7 @@ void BRepAlgo_FaceRestrictor::PerformWithCorrection() // Classification of wires ones compared to the others. //--------------------------------------------------------- for (it.Initialize(wires) ; it.More(); it.Next()) { - TopoDS_Wire& W1 = TopoDS::Wire(it.Value()); + const TopoDS_Wire& W1 = TopoDS::Wire(it.Value()); TopTools_ListIteratorOfListOfShape it2(wires); if (IsClosed(W1)) { diff --git a/src/BRepAlgo/BRepAlgo_Loop.cxx b/src/BRepAlgo/BRepAlgo_Loop.cxx index 828e9f091e..259da53f1d 100644 --- a/src/BRepAlgo/BRepAlgo_Loop.cxx +++ b/src/BRepAlgo/BRepAlgo_Loop.cxx @@ -572,7 +572,7 @@ void BRepAlgo_Loop::Perform() if (pLCE) { for (itl1.Initialize(*pLCE); itl1.More(); itl1.Next()) { - TopoDS_Edge& E = TopoDS::Edge(itl1.Value()); + TopoDS_Edge& E = TopoDS::Edge(itl1.ChangeValue()); if (!Emap.Add(E)) continue; StoreInMVE(myFace,E,MVE,YaCouture,myVerticesForSubstitute, myTolConf); @@ -585,7 +585,7 @@ void BRepAlgo_Loop::Perform() // => call only once StoreInMVE which should double them TopTools_MapOfShape DejaVu; for (itl.Initialize(myConstEdges); itl.More(); itl.Next()) { - TopoDS_Edge& E = TopoDS::Edge(itl.Value()); + TopoDS_Edge& E = TopoDS::Edge(itl.ChangeValue()); if (DejaVu.Add(E)) StoreInMVE(myFace,E,MVE,YaCouture,myVerticesForSubstitute, myTolConf); } @@ -900,7 +900,7 @@ void BRepAlgo_Loop::WiresToFaces() // Standard_False); TopTools_ListIteratorOfListOfShape it(myNewWires); for (; it.More(); it.Next()) { - FR.Add(TopoDS::Wire(it.Value())); + FR.Add(TopoDS::Wire(it.ChangeValue())); } FR.Perform(); diff --git a/src/BRepApprox/BRepApprox_TheMultiLineOfApprox.hxx b/src/BRepApprox/BRepApprox_TheMultiLineOfApprox.hxx index a8d89f4fb3..1a6fce3bb3 100644 --- a/src/BRepApprox/BRepApprox_TheMultiLineOfApprox.hxx +++ b/src/BRepApprox/BRepApprox_TheMultiLineOfApprox.hxx @@ -21,7 +21,6 @@ #include #include -#include #include #include #include diff --git a/src/BRepBlend/BRepBlend_AppFuncRoot.hxx b/src/BRepBlend/BRepBlend_AppFuncRoot.hxx index ed1c6bd4eb..abefca5b62 100644 --- a/src/BRepBlend/BRepBlend_AppFuncRoot.hxx +++ b/src/BRepBlend/BRepBlend_AppFuncRoot.hxx @@ -20,7 +20,6 @@ #include #include -#include #include #include #include diff --git a/src/BRepBuilderAPI/BRepBuilderAPI_MakeShapeOnMesh.cxx b/src/BRepBuilderAPI/BRepBuilderAPI_MakeShapeOnMesh.cxx index 8f919bfa6e..6e0cb4d822 100644 --- a/src/BRepBuilderAPI/BRepBuilderAPI_MakeShapeOnMesh.cxx +++ b/src/BRepBuilderAPI/BRepBuilderAPI_MakeShapeOnMesh.cxx @@ -22,6 +22,7 @@ #include #include #include +#include namespace { @@ -47,32 +48,30 @@ namespace return Standard_False; } + bool operator==(const Edge& theOther) const + { + return theOther.Idx1 == Idx1 && theOther.Idx2 == Idx2; + } + //! First index. It is lower or equal than the second. Standard_Integer Idx1; //! Second index. Standard_Integer Idx2; }; +} - //! Hasher of Edge structure. - struct EdgeHasher +namespace std +{ + template <> + struct hash { - - //! Returns hash code for the given edge. - static Standard_Integer HashCode(const Edge& theEdge, - const Standard_Integer theUpperBound) + size_t operator()(const Edge& theEdge) const noexcept { - // Circle-based collisions. - return ::HashCode(theEdge.Idx1 * theEdge.Idx1 + theEdge.Idx2 * theEdge.Idx2, theUpperBound); + // Combine two int values into a single hash value. + int aCombination[2]{ theEdge.Idx1, theEdge.Idx2 }; + return opencascade::hashBytes(aCombination, sizeof(aCombination)); } - - //! Returns true if two edges are equal. - static Standard_Boolean IsEqual(const Edge& theEdge1, - const Edge& theEdge2) - { - return theEdge1.Idx1 == theEdge2.Idx1 && theEdge1.Idx2 == theEdge2.Idx2; - } - }; } @@ -115,7 +114,7 @@ void BRepBuilderAPI_MakeShapeOnMesh::Build(const Message_ProgressRange& theRange } // Build shared edges. - NCollection_IndexedDataMap anEdgeToTEgeMap; + NCollection_IndexedDataMap anEdgeToTEgeMap; for (Standard_Integer i = 1; i <= aNbTriangles; ++i) { aPS.Next(); diff --git a/src/BRepCheck/BRepCheck_Face.cxx b/src/BRepCheck/BRepCheck_Face.cxx index b05003f42f..5e6dbd836d 100644 --- a/src/BRepCheck/BRepCheck_Face.cxx +++ b/src/BRepCheck/BRepCheck_Face.cxx @@ -50,14 +50,13 @@ #include #include #include -#include #include IMPLEMENT_STANDARD_RTTIEXT(BRepCheck_Face,BRepCheck_Result) //#include //#include -typedef NCollection_DataMap DataMapOfShapeBox2d; +typedef NCollection_DataMap DataMapOfShapeBox2d; static Standard_Boolean Intersect(const TopoDS_Wire&, const TopoDS_Wire&, diff --git a/src/BRepCheck/BRepCheck_IndexedDataMapOfShapeResult.hxx b/src/BRepCheck/BRepCheck_IndexedDataMapOfShapeResult.hxx index 3d0183689f..8caadefa25 100644 --- a/src/BRepCheck/BRepCheck_IndexedDataMapOfShapeResult.hxx +++ b/src/BRepCheck/BRepCheck_IndexedDataMapOfShapeResult.hxx @@ -19,10 +19,9 @@ #include #include -#include #include -typedef NCollection_IndexedDataMap BRepCheck_IndexedDataMapOfShapeResult; +typedef NCollection_IndexedDataMap BRepCheck_IndexedDataMapOfShapeResult; #endif diff --git a/src/BRepCheck/BRepCheck_Shell.cxx b/src/BRepCheck/BRepCheck_Shell.cxx index d94e5226ad..1b9850abec 100644 --- a/src/BRepCheck/BRepCheck_Shell.cxx +++ b/src/BRepCheck/BRepCheck_Shell.cxx @@ -82,9 +82,9 @@ Standard_EXPORT Standard_Integer BRepCheck_Trace(const Standard_Integer phase) { return BRC_Trace; } -void PrintShape(const TopoDS_Shape& theShape, const Standard_Integer upper) { +void PrintShape(const TopoDS_Shape& theShape) { if (!theShape.IsNull()) { - Standard_Integer code = theShape.HashCode(upper); + size_t code = TopTools_ShapeMapHasher{}(theShape); std::cout << TopAbs::ShapeTypeToString (theShape.ShapeType()) << " : " << code << " " << TopAbs::ShapeOrientationToString(theShape.Orientation()) << std::endl; } diff --git a/src/BRepClass3d/BRepClass3d_MapOfInter.hxx b/src/BRepClass3d/BRepClass3d_MapOfInter.hxx index 26658ba4f6..43ae234236 100644 --- a/src/BRepClass3d/BRepClass3d_MapOfInter.hxx +++ b/src/BRepClass3d/BRepClass3d_MapOfInter.hxx @@ -18,7 +18,6 @@ #define BRepClass3d_MapOfInter_HeaderFile #include -#include #include #include diff --git a/src/BRepFill/BRepFill_DataMapOfNodeDataMapOfShapeShape.hxx b/src/BRepFill/BRepFill_DataMapOfNodeDataMapOfShapeShape.hxx index 1b6ce78b76..b6c63f82ba 100644 --- a/src/BRepFill/BRepFill_DataMapOfNodeDataMapOfShapeShape.hxx +++ b/src/BRepFill/BRepFill_DataMapOfNodeDataMapOfShapeShape.hxx @@ -19,11 +19,10 @@ #include #include -#include #include -typedef NCollection_DataMap BRepFill_DataMapOfNodeDataMapOfShapeShape; -typedef NCollection_DataMap::Iterator BRepFill_DataMapIteratorOfDataMapOfNodeDataMapOfShapeShape; +typedef NCollection_DataMap BRepFill_DataMapOfNodeDataMapOfShapeShape; +typedef NCollection_DataMap::Iterator BRepFill_DataMapIteratorOfDataMapOfNodeDataMapOfShapeShape; #endif diff --git a/src/BRepFill/BRepFill_DataMapOfNodeShape.hxx b/src/BRepFill/BRepFill_DataMapOfNodeShape.hxx index de9e30a89d..726165b769 100644 --- a/src/BRepFill/BRepFill_DataMapOfNodeShape.hxx +++ b/src/BRepFill/BRepFill_DataMapOfNodeShape.hxx @@ -19,11 +19,10 @@ #include #include -#include #include -typedef NCollection_DataMap BRepFill_DataMapOfNodeShape; -typedef NCollection_DataMap::Iterator BRepFill_DataMapIteratorOfDataMapOfNodeShape; +typedef NCollection_DataMap BRepFill_DataMapOfNodeShape; +typedef NCollection_DataMap::Iterator BRepFill_DataMapIteratorOfDataMapOfNodeShape; #endif diff --git a/src/BRepFill/BRepFill_DataMapOfOrientedShapeListOfShape.hxx b/src/BRepFill/BRepFill_DataMapOfOrientedShapeListOfShape.hxx index d5081a77f9..fc02ce704a 100644 --- a/src/BRepFill/BRepFill_DataMapOfOrientedShapeListOfShape.hxx +++ b/src/BRepFill/BRepFill_DataMapOfOrientedShapeListOfShape.hxx @@ -19,11 +19,10 @@ #include #include -#include #include -typedef NCollection_DataMap BRepFill_DataMapOfOrientedShapeListOfShape; -typedef NCollection_DataMap::Iterator BRepFill_DataMapIteratorOfDataMapOfOrientedShapeListOfShape; +typedef NCollection_DataMap BRepFill_DataMapOfOrientedShapeListOfShape; +typedef NCollection_DataMap::Iterator BRepFill_DataMapIteratorOfDataMapOfOrientedShapeListOfShape; #endif diff --git a/src/BRepFill/BRepFill_Evolved.cxx b/src/BRepFill/BRepFill_Evolved.cxx index 76f7c96aa2..43ec222fe2 100644 --- a/src/BRepFill/BRepFill_Evolved.cxx +++ b/src/BRepFill/BRepFill_Evolved.cxx @@ -1953,7 +1953,7 @@ void BRepFill_Evolved::Transfert( BRepFill_Evolved& Vevo, TopTools_ListIteratorOfListOfShape itl; for (itl.Initialize(GenShapes); itl.More(); itl.Next()) { - itl.Value().Move(LS); + itl.ChangeValue().Move(LS); } if (!myMap.IsBound(InitialSpine)) { diff --git a/src/BRepFill/BRepFill_IndexedDataMapOfOrientedShapeListOfShape.hxx b/src/BRepFill/BRepFill_IndexedDataMapOfOrientedShapeListOfShape.hxx index b1b46e3714..1c57f67b76 100644 --- a/src/BRepFill/BRepFill_IndexedDataMapOfOrientedShapeListOfShape.hxx +++ b/src/BRepFill/BRepFill_IndexedDataMapOfOrientedShapeListOfShape.hxx @@ -19,10 +19,9 @@ #include #include -#include #include -typedef NCollection_IndexedDataMap BRepFill_IndexedDataMapOfOrientedShapeListOfShape; +typedef NCollection_IndexedDataMap BRepFill_IndexedDataMapOfOrientedShapeListOfShape; #endif diff --git a/src/BRepFill/BRepFill_OffsetWire.cxx b/src/BRepFill/BRepFill_OffsetWire.cxx index 6db9e9df4d..befe34193c 100644 --- a/src/BRepFill/BRepFill_OffsetWire.cxx +++ b/src/BRepFill/BRepFill_OffsetWire.cxx @@ -1068,8 +1068,8 @@ void BRepFill_OffsetWire::PerformWithBiLo { const TopTools_ListOfShape& listSh = aSubst.Copy(itl.Value()); TopAbs_Orientation SaveOr = itl.Value().Orientation(); - itl.Value() = listSh.First(); - itl.Value().Orientation(SaveOr); + itl.ChangeValue() = listSh.First(); + itl.ChangeValue().Orientation(SaveOr); } } } diff --git a/src/BRepFill/BRepFill_Sweep.cxx b/src/BRepFill/BRepFill_Sweep.cxx index f275ec69b1..bcefa9df55 100644 --- a/src/BRepFill/BRepFill_Sweep.cxx +++ b/src/BRepFill/BRepFill_Sweep.cxx @@ -238,7 +238,7 @@ static Handle(Geom2d_Curve) Couture(const TopoDS_Edge& E, ((*((Handle(BRep_TEdge)*)&E.TShape()))->ChangeCurves()); while (itcr.More()) { - Handle(BRep_CurveRepresentation)& cr = itcr.Value(); + Handle(BRep_CurveRepresentation) cr = itcr.Value(); if (cr->IsCurveOnSurface(S,l)) { Handle(BRep_GCurve) GC (Handle(BRep_GCurve)::DownCast (cr)); if (GC->IsCurveOnClosedSurface() && Eisreversed) diff --git a/src/BRepGProp/BRepGProp_Gauss.hxx b/src/BRepGProp/BRepGProp_Gauss.hxx index 825b15f00e..aeff51845c 100644 --- a/src/BRepGProp/BRepGProp_Gauss.hxx +++ b/src/BRepGProp/BRepGProp_Gauss.hxx @@ -17,7 +17,8 @@ #include #include -class math_Vector; +template class math_VectorBase; +using math_Vector = math_VectorBase; //! Class performs computing of the global inertia properties //! of geometric object in 3D space by adaptive and non-adaptive diff --git a/src/BRepGProp/BRepGProp_VinertGK.hxx b/src/BRepGProp/BRepGProp_VinertGK.hxx index 1593ace13b..c37dae4a8e 100644 --- a/src/BRepGProp/BRepGProp_VinertGK.hxx +++ b/src/BRepGProp/BRepGProp_VinertGK.hxx @@ -20,7 +20,6 @@ #include #include -#include class BRepGProp_Face; class BRepGProp_Domain; class gp_Pln; diff --git a/src/BRepLib/BRepLib.cxx b/src/BRepLib/BRepLib.cxx index 2466e5dab3..e5f5e002cb 100644 --- a/src/BRepLib/BRepLib.cxx +++ b/src/BRepLib/BRepLib.cxx @@ -74,6 +74,7 @@ #include #include #include +#include #include @@ -2235,7 +2236,6 @@ static void EncodeRegularity(const TopoDS_Shape& theShape, TopTools_ListIteratorOfListOfShape It; TopExp_Explorer Ex; TopoDS_Face F1,F2; - Standard_Boolean found; for (Standard_Integer i = 1; i <= M.Extent(); i++){ TopoDS_Edge E = TopoDS::Edge(M.FindKey(i)); if (!theEdgesToEncode.IsEmpty()) @@ -2247,7 +2247,7 @@ static void EncodeRegularity(const TopoDS_Shape& theShape, continue; } - found = Standard_False; + Standard_Boolean found = Standard_False; F1.Nullify(); for (It.Initialize(M.FindFromIndex(i)); It.More() && !found; It.Next()){ if (F1.IsNull()) { F1 = TopoDS::Face(It.Value()); } @@ -2511,12 +2511,6 @@ namespace Node[1] = theNode2; } - //! Computes a hash code for the this link - Standard_Integer HashCode (const Standard_Integer theUpperBound) const - { - return ::HashCode (Node[0] + Node[1], theUpperBound); - } - //! Returns true if this link has the same nodes as the other. Standard_Boolean IsEqual (const Link& theOther) const { @@ -2530,12 +2524,23 @@ namespace return IsEqual (theOther); } }; +} - //! Computes a hash code for the given link - inline Standard_Integer HashCode (const Link& theLink, const Standard_Integer theUpperBound) +namespace std +{ + template <> + struct hash { - return theLink.HashCode (theUpperBound); - } + size_t operator()(const Link& theLink) const noexcept + { + int aCombination[2]{ theLink.Node[0], theLink.Node[1] }; + if (aCombination[0] > aCombination[1]) + { + std::swap(aCombination[0], aCombination[1]); + } + return opencascade::hashBytes(aCombination, sizeof(aCombination)); + } + }; } void BRepLib::UpdateDeflection (const TopoDS_Shape& theShape) @@ -2823,7 +2828,7 @@ void BRepLib::BoundingVertex(const NCollection_List& theLV, // of addition, thus sort the coordinates for stable result Standard_Integer i; NCollection_Array1 aPoints(0, aNb-1); - NCollection_List::Iterator aIt(theLV); + NCollection_List::Iterator aIt(theLV); for (i = 0; aIt.More(); aIt.Next(), ++i) { const TopoDS_Vertex& aVi = *((TopoDS_Vertex*)(&aIt.Value())); gp_Pnt aPi = BRep_Tool::Pnt(aVi); diff --git a/src/BRepLib/BRepLib_FuseEdges.cxx b/src/BRepLib/BRepLib_FuseEdges.cxx index a1b802143c..537c9c3181 100644 --- a/src/BRepLib/BRepLib_FuseEdges.cxx +++ b/src/BRepLib/BRepLib_FuseEdges.cxx @@ -1055,7 +1055,7 @@ Standard_Boolean BRepLib_FuseEdges::UpdatePCurve(const TopoDS_Edge& theOldEdge, iter.Next(); for (; iter.More(); iter.Next()) { - TopoDS_Edge& E = TopoDS::Edge(iter.Value()); + const TopoDS_Edge& E = TopoDS::Edge(iter.Value()); Standard_Real first, last; Handle(Geom2d_Curve) C = BRep_Tool::CurveOnSurface( E, Surf, loc, first, last ); Handle(Geom2d_BoundedCurve) BC = Handle(Geom2d_BoundedCurve)::DownCast(C); diff --git a/src/BRepLib/BRepLib_MakeWire_1.cxx b/src/BRepLib/BRepLib_MakeWire_1.cxx index 7e3f332ecb..e4ad89df93 100644 --- a/src/BRepLib/BRepLib_MakeWire_1.cxx +++ b/src/BRepLib/BRepLib_MakeWire_1.cxx @@ -379,7 +379,7 @@ void BRepLib_MakeWire::CreateNewListOfEdges(const TopTools_ListOfShape& theL, if (IsNewEdge) { TopoDS_Shape NewE = aCE.EmptyCopied(); - NCollection_List::Iterator it(aVList); + NCollection_List::Iterator it(aVList); for (; it.More(); it.Next()) aBB.Add(NewE, it.Value()); theNewEList.Append(TopoDS::Edge(NewE)); diff --git a/src/BRepMAT2d/BRepMAT2d_DataMapOfBasicEltShape.hxx b/src/BRepMAT2d/BRepMAT2d_DataMapOfBasicEltShape.hxx index 94cf836b59..0e2a8422b6 100644 --- a/src/BRepMAT2d/BRepMAT2d_DataMapOfBasicEltShape.hxx +++ b/src/BRepMAT2d/BRepMAT2d_DataMapOfBasicEltShape.hxx @@ -19,11 +19,10 @@ #include #include -#include #include -typedef NCollection_DataMap BRepMAT2d_DataMapOfBasicEltShape; -typedef NCollection_DataMap::Iterator BRepMAT2d_DataMapIteratorOfDataMapOfBasicEltShape; +typedef NCollection_DataMap BRepMAT2d_DataMapOfBasicEltShape; +typedef NCollection_DataMap::Iterator BRepMAT2d_DataMapIteratorOfDataMapOfBasicEltShape; #endif diff --git a/src/BRepMesh/BRepMesh_Edge.hxx b/src/BRepMesh/BRepMesh_Edge.hxx index f0c50b9bf5..c574123755 100644 --- a/src/BRepMesh/BRepMesh_Edge.hxx +++ b/src/BRepMesh/BRepMesh_Edge.hxx @@ -17,6 +17,7 @@ #include #include #include +#include //! Light weighted structure representing link of the mesh. class BRepMesh_Edge : public BRepMesh_OrientedEdge @@ -84,13 +85,28 @@ private: BRepMesh_DegreeOfFreedom myMovability; }; -//! Computes a hash code for the given edge, in the range [1, theUpperBound] -//! @param theEdge the edge which hash code is to be computed -//! @param theUpperBound the upper bound of the range a computing hash code must be within -//! @return a computed hash code, in the range [1, theUpperBound] -inline Standard_Integer HashCode (const BRepMesh_Edge& theEdge, const Standard_Integer theUpperBound) +namespace std { - return theEdge.HashCode (theUpperBound); + template <> + struct hash + { + size_t operator()(const BRepMesh_Edge& theEdge) const noexcept + { + union Combination + { + unsigned short Arr[2]; // Node can be represented as a short + uint32_t Hash; + + } aCombination; + aCombination.Arr[0] = static_cast(theEdge.FirstNode()); + aCombination.Arr[1] = static_cast(theEdge.LastNode()); + if (aCombination.Arr[0] > aCombination.Arr[1]) + { + std::swap(aCombination.Arr[0], aCombination.Arr[1]); + } + return static_cast(aCombination.Hash); + } + }; } #endif diff --git a/src/BRepMesh/BRepMesh_OrientedEdge.hxx b/src/BRepMesh/BRepMesh_OrientedEdge.hxx index 0cc32b0707..bbe306d487 100644 --- a/src/BRepMesh/BRepMesh_OrientedEdge.hxx +++ b/src/BRepMesh/BRepMesh_OrientedEdge.hxx @@ -15,6 +15,7 @@ #define _BRepMesh_OrientedEdge_HeaderFile #include +#include #include //! Light weighted structure representing simple link. @@ -52,14 +53,6 @@ public: return myLastNode; } - //! Computes a hash code for this oriented edge, in the range [1, theUpperBound] - //! @param theUpperBound the upper bound of the range a computing hash code must be within - //! @return a computed hash code, in the range [1, theUpperBound] - Standard_Integer HashCode (const Standard_Integer theUpperBound) const - { - return ::HashCode (myFirstNode + myLastNode, theUpperBound); - } - //! Checks this and other edge for equality. //! @param theOther edge to be checked against this one. //! @return TRUE if edges have the same orientation, FALSE if not. @@ -80,13 +73,24 @@ private: Standard_Integer myLastNode; }; -//! Computes a hash code for the given oriented edge, in the range [1, theUpperBound] -//! @param theOrientedEdge the oriented edge which hash code is to be computed -//! @param theUpperBound the upper bound of the range a computing hash code must be within -//! @return a computed hash code, in the range [1, theUpperBound] -inline Standard_Integer HashCode (const BRepMesh_OrientedEdge& theOrientedEdge, const Standard_Integer theUpperBound) +namespace std { - return theOrientedEdge.HashCode (theUpperBound); + template <> + struct hash + { + size_t operator()(const BRepMesh_OrientedEdge& theOrientedEdge) const noexcept + { + union Combination + { + unsigned short Arr[2]; // Node can be represented as a short + uint32_t Hash; + + } aCombination; + aCombination.Arr[0] = static_cast(theOrientedEdge.FirstNode()); + aCombination.Arr[1] = static_cast(theOrientedEdge.LastNode()); + return static_cast(aCombination.Hash); + } + }; } #endif diff --git a/src/BRepMesh/BRepMesh_Triangle.hxx b/src/BRepMesh/BRepMesh_Triangle.hxx index abc61fd367..fefdd456c5 100644 --- a/src/BRepMesh/BRepMesh_Triangle.hxx +++ b/src/BRepMesh/BRepMesh_Triangle.hxx @@ -19,6 +19,7 @@ #include #include +#include #include @@ -91,14 +92,6 @@ public: myMovability = theMovability; } - //! Computes a hash code for this triangle, in the range [1, theUpperBound] - //! @param theUpperBound the upper bound of the range a computing hash code must be within - //! @return a computed hash code, in the range [1, theUpperBound] - Standard_Integer HashCode (const Standard_Integer theUpperBound) const - { - return ::HashCode (myEdges[0] + myEdges[1] + myEdges[2], theUpperBound); - } - //! Checks for equality with another triangle. //! @param theOther triangle to be checked against this one. //! @return TRUE if equal, FALSE if not. @@ -142,13 +135,18 @@ public: BRepMesh_DegreeOfFreedom myMovability; }; -//! Computes a hash code for the given triangle, in the range [1, theUpperBound] -//! @param theTriangle the triangle which hash code is to be computed -//! @param theUpperBound the upper bound of the range a computing hash code must be within -//! @return a computed hash code, in the range [1, theUpperBound] -inline Standard_Integer HashCode (const BRepMesh_Triangle& theTriangle, const Standard_Integer theUpperBound) +namespace std { - return theTriangle.HashCode (theUpperBound); + template <> + struct hash + { + size_t operator()(const BRepMesh_Triangle& theTriangle) const noexcept + { + int aCombination[3] = { theTriangle.myEdges[0], theTriangle.myEdges[1], theTriangle.myEdges[2] }; + std::sort(aCombination, aCombination + 3); // Sort the numbers in ascending order + return opencascade::hashBytes(aCombination, sizeof(aCombination)); + } + }; } #endif diff --git a/src/BRepMesh/BRepMesh_Vertex.hxx b/src/BRepMesh/BRepMesh_Vertex.hxx index b991817a84..838dd3ebcd 100644 --- a/src/BRepMesh/BRepMesh_Vertex.hxx +++ b/src/BRepMesh/BRepMesh_Vertex.hxx @@ -102,14 +102,6 @@ public: { myMovability = theMovability; } - - //! Computes a hash code for this vertex, in the range [1, theUpperBound] - //! @param theUpperBound the upper bound of the range a computing hash code must be within - //! @return a computed hash code, in the range [1, theUpperBound] - Standard_Integer HashCode(const Standard_Integer theUpperBound) const - { - return ::HashCode(Floor(1e5 * myUV.X()) * Floor(1e5 * myUV.Y()), theUpperBound); - } //! Checks for equality with another vertex. //! @param theOther vertex to be checked against this one. @@ -138,13 +130,16 @@ private: BRepMesh_DegreeOfFreedom myMovability; }; -//! Computes a hash code for the given vertex, in the range [1, theUpperBound] -//! @param theVertex the vertex which hash code is to be computed -//! @param theUpperBound the upper bound of the range a computing hash code must be within -//! @return a computed hash code, in the range [1, theUpperBound] -inline Standard_Integer HashCode (const BRepMesh_Vertex& theVertex, const Standard_Integer theUpperBound) +namespace std { - return theVertex.HashCode (theUpperBound); + template <> + struct hash + { + size_t operator()(const BRepMesh_Vertex& theVertex) const noexcept + { + return std::hash{}((Floor(1e5 * theVertex.Coord().X()) * Floor(1e5 * theVertex.Coord().Y()))); + } + }; } #endif diff --git a/src/BRepMeshData/BRepMeshData_Curve.cxx b/src/BRepMeshData/BRepMeshData_Curve.cxx index a1daaf3af7..e11da7a380 100644 --- a/src/BRepMeshData/BRepMeshData_Curve.cxx +++ b/src/BRepMeshData/BRepMeshData_Curve.cxx @@ -24,8 +24,8 @@ IMPLEMENT_STANDARD_RTTIEXT(BRepMeshData_Curve, IMeshData_Curve) // Purpose : //======================================================================= BRepMeshData_Curve::BRepMeshData_Curve (const Handle (NCollection_IncAllocator)& theAllocator) -: myPoints (NCollection_StdAllocator(theAllocator)), - myParameters (NCollection_StdAllocator(theAllocator)) +: myPoints (NCollection_OccAllocator(theAllocator)), + myParameters (NCollection_OccAllocator(theAllocator)) { } diff --git a/src/BRepMeshData/BRepMeshData_Model.cxx b/src/BRepMeshData/BRepMeshData_Model.cxx index 1731c174e2..260cfbdc1f 100644 --- a/src/BRepMeshData/BRepMeshData_Model.cxx +++ b/src/BRepMeshData/BRepMeshData_Model.cxx @@ -32,7 +32,7 @@ BRepMeshData_Model::BRepMeshData_Model (const TopoDS_Shape& theShape) myDFaces (256, myAllocator), myDEdges (256, myAllocator) { - myAllocator->SetThreadSafe(); + myAllocator->SetThreadSafe(true); } //======================================================================= @@ -59,8 +59,7 @@ Standard_Integer BRepMeshData_Model::FacesNb () const const IMeshData::IFaceHandle& BRepMeshData_Model::AddFace (const TopoDS_Face& theFace) { IMeshData::IFaceHandle aFace (new (myAllocator) BRepMeshData_Face (theFace, myAllocator)); - myDFaces.Append (aFace); - return myDFaces (FacesNb () - 1); + return myDFaces.Append (aFace); } //======================================================================= @@ -88,8 +87,7 @@ Standard_Integer BRepMeshData_Model::EdgesNb () const const IMeshData::IEdgeHandle& BRepMeshData_Model::AddEdge (const TopoDS_Edge& theEdge) { IMeshData::IEdgeHandle aEdge (new (myAllocator) BRepMeshData_Edge (theEdge, myAllocator)); - myDEdges.Append (aEdge); - return myDEdges (EdgesNb () - 1); + return myDEdges.Append (aEdge); } //======================================================================= diff --git a/src/BRepMeshData/BRepMeshData_PCurve.cxx b/src/BRepMeshData/BRepMeshData_PCurve.cxx index cff9950e9a..a3d32bab14 100644 --- a/src/BRepMeshData/BRepMeshData_PCurve.cxx +++ b/src/BRepMeshData/BRepMeshData_PCurve.cxx @@ -29,9 +29,9 @@ BRepMeshData_PCurve::BRepMeshData_PCurve ( const TopAbs_Orientation theOrientation, const Handle (NCollection_IncAllocator)& theAllocator) : IMeshData_PCurve (theDFace, theOrientation), - myPoints2d (NCollection_StdAllocator(theAllocator)), - myParameters (NCollection_StdAllocator(theAllocator)), - myIndices (NCollection_StdAllocator(theAllocator)) + myPoints2d (NCollection_OccAllocator(theAllocator)), + myParameters (NCollection_OccAllocator(theAllocator)), + myIndices (NCollection_OccAllocator(theAllocator)) { } diff --git a/src/BRepOffset/BRepOffset_MakeOffset.cxx b/src/BRepOffset/BRepOffset_MakeOffset.cxx index 5eccbe11f5..df326ec655 100644 --- a/src/BRepOffset/BRepOffset_MakeOffset.cxx +++ b/src/BRepOffset/BRepOffset_MakeOffset.cxx @@ -4720,7 +4720,7 @@ Standard_Boolean BuildShellsCompleteInter(const TopTools_ListOfShape& theLF, const TopoDS_Shape& aFR = aItLR.Value(); // Reset the local allocator - anAllocLoc->Reset(); + anAllocLoc->Reset(false); // Find the last splits of the root face, including the ones // created during MakeVolume operation TopTools_ListOfShape aLFIm(anAllocLoc); @@ -4739,7 +4739,7 @@ Standard_Boolean BuildShellsCompleteInter(const TopTools_ListOfShape& theLF, } // Reset the local allocator - anAllocLoc->Reset(); + anAllocLoc->Reset(false); // It is necessary to rebuild the solids, avoiding internal faces // Map faces to solids TopTools_IndexedDataMapOfShapeListOfShape aDMFS(1, anAllocLoc); @@ -4787,7 +4787,7 @@ Standard_Boolean BuildShellsCompleteInter(const TopTools_ListOfShape& theLF, // aLF.Clear(); aDMFS.Clear(); - anAllocLoc->Reset(); + anAllocLoc->Reset(true); // the result is non-manifold - resolve it comparing normal // directions of the offset faces and original faces @@ -4896,7 +4896,7 @@ const TopTools_ListOfShape& BRepOffset_MakeOffset::Generated (const TopoDS_Shape // Useful only for faces without influence on others. TopTools_ListIteratorOfListOfShape it(myGenerated); for (; it.More(); it.Next()) - it.Value().Reverse(); + it.ChangeValue().Reverse(); } } break; @@ -4951,7 +4951,7 @@ const TopTools_ListOfShape& BRepOffset_MakeOffset::Modified (const TopoDS_Shape& // Useful only for faces without influence on others. TopTools_ListIteratorOfListOfShape it(myGenerated); for (; it.More(); it.Next()) - it.Value().Reverse(); + it.ChangeValue().Reverse(); } } } diff --git a/src/BRepOffset/BRepOffset_SimpleOffset.hxx b/src/BRepOffset/BRepOffset_SimpleOffset.hxx index a5c46ba99d..a533faecbd 100644 --- a/src/BRepOffset/BRepOffset_SimpleOffset.hxx +++ b/src/BRepOffset/BRepOffset_SimpleOffset.hxx @@ -17,13 +17,16 @@ #define _BRepOffset_SimpleOffset_HeaderFile #include -#include #include -#include +#include +#include #include +#include #include +#include +#include +#include #include -#include class BRepOffset_SimpleOffset; diff --git a/src/BRepOffset/BRepOffset_Tool.cxx b/src/BRepOffset/BRepOffset_Tool.cxx index 55c7cd3597..45ce024999 100644 --- a/src/BRepOffset/BRepOffset_Tool.cxx +++ b/src/BRepOffset/BRepOffset_Tool.cxx @@ -4016,7 +4016,7 @@ void BRepOffset_Tool::CorrectOrientation(const TopoDS_Shape& SI, // BRepTopAdaptor_FClass2d FC (TopoDS::Face(FI.Oriented(TopAbs_FORWARD)), // Precision::Confusion()); for (itE.Initialize(LOE); itE.More(); itE.Next()) { - TopoDS_Shape& OE = itE.Value(); + TopoDS_Shape& OE = itE.ChangeValue(); if (NewEdges.Contains(OE)) { Handle(Geom2d_Curve) CO2d = BRep_Tool::CurveOnSurface(TopoDS::Edge(OE),OF,f,l); diff --git a/src/BRepOffsetAPI/BRepOffsetAPI_MakeOffset.cxx b/src/BRepOffsetAPI/BRepOffsetAPI_MakeOffset.cxx index 806ae4aa71..9688969ada 100644 --- a/src/BRepOffsetAPI/BRepOffsetAPI_MakeOffset.cxx +++ b/src/BRepOffsetAPI/BRepOffsetAPI_MakeOffset.cxx @@ -235,7 +235,7 @@ static void BuildDomains(TopoDS_Face& myFace, //==================================================== TopTools_ListIteratorOfListOfShape itl(WorkWires); for (; itl.More(); itl.Next()) { - TopoDS_Wire& W = TopoDS::Wire(itl.Value()); + TopoDS_Wire& W = TopoDS::Wire(itl.ChangeValue()); if (W.Closed()){ FR.Add(W); continue; @@ -291,7 +291,7 @@ static void BuildDomains(TopoDS_Face& myFace, // for (TopTools_ListIteratorOfListOfShape itF(Faces); itF.More(); itF.Next()) { TopTools_ListIteratorOfListOfShape itF; for (itF.Initialize(Faces) ; itF.More(); itF.Next()) { - TopoDS_Face& F = TopoDS::Face(itF.Value()); + TopoDS_Face& F = TopoDS::Face(itF.ChangeValue()); BRepAdaptor_Surface S(F,0); Standard_Real Tol = BRep_Tool::Tolerance(F); @@ -299,7 +299,7 @@ static void BuildDomains(TopoDS_Face& myFace, TopTools_ListIteratorOfListOfShape itW(LOW); while (itW.More()) { - TopoDS_Wire& W = TopoDS::Wire(itW.Value()); + const TopoDS_Wire& W = TopoDS::Wire(itW.Value()); //======================================================= // Choice of a point on the wire. + projection on the face. //======================================================= @@ -409,7 +409,7 @@ void BRepOffsetAPI_MakeOffset::Perform(const Standard_Real Offset, for (itOW.Initialize(myLeft); itOW.More(); itOW.Next()) { - BRepFill_OffsetWire& Algo = itOW.Value(); + BRepFill_OffsetWire& Algo = itOW.ChangeValue(); Algo.Perform(Abs(Offset),Alt); if (Algo.IsDone() && !Algo.Shape().IsNull()) { @@ -432,7 +432,7 @@ void BRepOffsetAPI_MakeOffset::Perform(const Standard_Real Offset, for(itOW.Initialize(myRight); itOW.More(); itOW.Next()) { - BRepFill_OffsetWire& Algo = itOW.Value(); + BRepFill_OffsetWire& Algo = itOW.ChangeValue(); Algo.Perform(Offset,Alt); if (Algo.IsDone() && !Algo.Shape().IsNull()) @@ -494,7 +494,7 @@ const TopTools_ListOfShape& BRepOffsetAPI_MakeOffset::Generated Algos = &myRight; } for (itOW.Initialize(*Algos); itOW.More(); itOW.Next()) { - BRepFill_OffsetWire& OW = itOW.Value(); + BRepFill_OffsetWire& OW = itOW.ChangeValue(); TopTools_ListOfShape L; L = OW.GeneratedShapes(S.Oriented(TopAbs_FORWARD)); myGenerated.Append(L); diff --git a/src/BRepOffsetAPI/BRepOffsetAPI_MakeThickSolid.cxx b/src/BRepOffsetAPI/BRepOffsetAPI_MakeThickSolid.cxx index bf8547da4f..47bf68c960 100644 --- a/src/BRepOffsetAPI/BRepOffsetAPI_MakeThickSolid.cxx +++ b/src/BRepOffsetAPI/BRepOffsetAPI_MakeThickSolid.cxx @@ -109,7 +109,7 @@ const TopTools_ListOfShape& BRepOffsetAPI_MakeThickSolid::Modified (const TopoDS // Useful only for faces without influence on others. TopTools_ListIteratorOfListOfShape it(myGenerated); for (; it.More(); it.Next()) - it.Value().Reverse(); + it.ChangeValue().Reverse(); } } else if (myLastUsedAlgo == OffsetAlgo_SIMPLE) diff --git a/src/BRepPrimAPI/BRepPrimAPI_MakeRevolution.hxx b/src/BRepPrimAPI/BRepPrimAPI_MakeRevolution.hxx index 3a3f1c0293..9bb891f3a1 100644 --- a/src/BRepPrimAPI/BRepPrimAPI_MakeRevolution.hxx +++ b/src/BRepPrimAPI/BRepPrimAPI_MakeRevolution.hxx @@ -23,7 +23,6 @@ #include #include -#include class Geom_Curve; class gp_Ax2; diff --git a/src/BSplCLib/BSplCLib.cxx b/src/BSplCLib/BSplCLib.cxx index 6a2aa5f112..1414f5008b 100644 --- a/src/BSplCLib/BSplCLib.cxx +++ b/src/BSplCLib/BSplCLib.cxx @@ -35,6 +35,7 @@ #include #include #include +#include typedef gp_Pnt Pnt; typedef gp_Vec Vec; diff --git a/src/BinMDF/BinMDF_TypeADriverMap.hxx b/src/BinMDF/BinMDF_TypeADriverMap.hxx index 5475891c75..17ef5b19f0 100644 --- a/src/BinMDF/BinMDF_TypeADriverMap.hxx +++ b/src/BinMDF/BinMDF_TypeADriverMap.hxx @@ -18,11 +18,10 @@ #include #include -#include #include -typedef NCollection_DataMap BinMDF_TypeADriverMap; -typedef NCollection_DataMap::Iterator BinMDF_DataMapIteratorOfTypeADriverMap; +typedef NCollection_DataMap BinMDF_TypeADriverMap; +typedef NCollection_DataMap::Iterator BinMDF_DataMapIteratorOfTypeADriverMap; #endif diff --git a/src/BinMDF/BinMDF_TypeIdMap.hxx b/src/BinMDF/BinMDF_TypeIdMap.hxx index fac8d35e8d..4566c2092f 100644 --- a/src/BinMDF/BinMDF_TypeIdMap.hxx +++ b/src/BinMDF/BinMDF_TypeIdMap.hxx @@ -18,12 +18,10 @@ #include #include -#include -#include #include -typedef NCollection_DoubleMap BinMDF_TypeIdMap; -typedef NCollection_DoubleMap::Iterator BinMDF_DoubleMapIteratorOfTypeIdMap; +typedef NCollection_DoubleMap BinMDF_TypeIdMap; +typedef NCollection_DoubleMap::Iterator BinMDF_DoubleMapIteratorOfTypeIdMap; #endif diff --git a/src/BinMNaming/BinMNaming_NamedShapeDriver.cxx b/src/BinMNaming/BinMNaming_NamedShapeDriver.cxx index 1ee3e46d0b..a694a8341e 100644 --- a/src/BinMNaming/BinMNaming_NamedShapeDriver.cxx +++ b/src/BinMNaming/BinMNaming_NamedShapeDriver.cxx @@ -276,7 +276,6 @@ void BinMNaming_NamedShapeDriver::Paste (const Handle(TDF_Attribute)& theSource, if (myIsQuickPart) // enables direct writing of shapes to the stream aDirectStream = theTarget.GetOStream(); - Standard_Integer i = 1; for (TNaming_Iterator SIterator(aSAtt); SIterator.More(); SIterator.Next()) { const TopoDS_Shape& anOldShape = SIterator.OldShape(); const TopoDS_Shape& aNewShape = SIterator.NewShape(); @@ -296,8 +295,6 @@ void BinMNaming_NamedShapeDriver::Paste (const Handle(TDF_Attribute)& theSource, else TranslateTo (aNewShape, theTarget, static_cast(aShapeSet)); } - - i++; } } diff --git a/src/BinObjMgt/BinObjMgt_Persistent.hxx b/src/BinObjMgt/BinObjMgt_Persistent.hxx index 13331a1167..de21ea124f 100644 --- a/src/BinObjMgt/BinObjMgt_Persistent.hxx +++ b/src/BinObjMgt/BinObjMgt_Persistent.hxx @@ -32,7 +32,6 @@ #include #include #include -#include class TCollection_AsciiString; class TCollection_ExtendedString; class TDF_Label; diff --git a/src/BinTObjDrivers/BinTObjDrivers.hxx b/src/BinTObjDrivers/BinTObjDrivers.hxx index db1c7383f1..7fa8d9e78d 100644 --- a/src/BinTObjDrivers/BinTObjDrivers.hxx +++ b/src/BinTObjDrivers/BinTObjDrivers.hxx @@ -18,7 +18,6 @@ #ifndef BinTObjDrivers_HeaderFile #define BinTObjDrivers_HeaderFile -#include #include class BinMDF_ADriverTable; diff --git a/src/BinTObjDrivers/BinTObjDrivers_DocumentRetrievalDriver.hxx b/src/BinTObjDrivers/BinTObjDrivers_DocumentRetrievalDriver.hxx index ced6199898..278f4e5030 100644 --- a/src/BinTObjDrivers/BinTObjDrivers_DocumentRetrievalDriver.hxx +++ b/src/BinTObjDrivers/BinTObjDrivers_DocumentRetrievalDriver.hxx @@ -18,7 +18,6 @@ #ifndef BinTObjDrivers_DocumentRetrievalDriver_HeaderFile #define BinTObjDrivers_DocumentRetrievalDriver_HeaderFile -#include #include #include diff --git a/src/BinTObjDrivers/BinTObjDrivers_DocumentStorageDriver.hxx b/src/BinTObjDrivers/BinTObjDrivers_DocumentStorageDriver.hxx index 8627329665..3c9ad0bfa8 100644 --- a/src/BinTObjDrivers/BinTObjDrivers_DocumentStorageDriver.hxx +++ b/src/BinTObjDrivers/BinTObjDrivers_DocumentStorageDriver.hxx @@ -18,7 +18,6 @@ #ifndef BinTObjDrivers_DocumentStorageDriver_HeaderFile #define BinTObjDrivers_DocumentStorageDriver_HeaderFile -#include #include #include diff --git a/src/BinTObjDrivers/BinTObjDrivers_IntSparseArrayDriver.hxx b/src/BinTObjDrivers/BinTObjDrivers_IntSparseArrayDriver.hxx index 64805a4d02..5d7027b85e 100644 --- a/src/BinTObjDrivers/BinTObjDrivers_IntSparseArrayDriver.hxx +++ b/src/BinTObjDrivers/BinTObjDrivers_IntSparseArrayDriver.hxx @@ -18,7 +18,6 @@ #ifndef BinTObjDrivers_IntSparseArrayDriver_HeaderFile #define BinTObjDrivers_IntSparseArrayDriver_HeaderFile -#include #include class BinTObjDrivers_IntSparseArrayDriver : public BinMDF_ADriver diff --git a/src/BinTObjDrivers/BinTObjDrivers_ModelDriver.hxx b/src/BinTObjDrivers/BinTObjDrivers_ModelDriver.hxx index fcb0c7ca03..ade93ebb0b 100644 --- a/src/BinTObjDrivers/BinTObjDrivers_ModelDriver.hxx +++ b/src/BinTObjDrivers/BinTObjDrivers_ModelDriver.hxx @@ -18,7 +18,6 @@ #ifndef BinTObjDrivers_ModelDriver_HeaderFile #define BinTObjDrivers_ModelDriver_HeaderFile -#include #include class BinTObjDrivers_ModelDriver : public BinMDF_ADriver diff --git a/src/BinTObjDrivers/BinTObjDrivers_ObjectDriver.hxx b/src/BinTObjDrivers/BinTObjDrivers_ObjectDriver.hxx index 07341da005..769a975e70 100644 --- a/src/BinTObjDrivers/BinTObjDrivers_ObjectDriver.hxx +++ b/src/BinTObjDrivers/BinTObjDrivers_ObjectDriver.hxx @@ -19,7 +19,6 @@ #ifndef BinTObjDrivers_ObjectDriver_HeaderFile #define BinTObjDrivers_ObjectDriver_HeaderFile -#include #include class BinTObjDrivers_ObjectDriver : public BinMDF_ADriver diff --git a/src/BinTObjDrivers/BinTObjDrivers_ReferenceDriver.hxx b/src/BinTObjDrivers/BinTObjDrivers_ReferenceDriver.hxx index a9dec24dec..c5f78ee063 100644 --- a/src/BinTObjDrivers/BinTObjDrivers_ReferenceDriver.hxx +++ b/src/BinTObjDrivers/BinTObjDrivers_ReferenceDriver.hxx @@ -19,7 +19,6 @@ #ifndef BinTObjDrivers_ReferenceDriver_HeaderFile #define BinTObjDrivers_ReferenceDriver_HeaderFile -#include #include class BinTObjDrivers_ReferenceDriver : public BinMDF_ADriver diff --git a/src/BinTObjDrivers/BinTObjDrivers_XYZDriver.hxx b/src/BinTObjDrivers/BinTObjDrivers_XYZDriver.hxx index 6e3c315d51..448ea58675 100644 --- a/src/BinTObjDrivers/BinTObjDrivers_XYZDriver.hxx +++ b/src/BinTObjDrivers/BinTObjDrivers_XYZDriver.hxx @@ -19,7 +19,6 @@ #ifndef BinTObjDrivers_XYZDriver_HeaderFile #define BinTObjDrivers_XYZDriver_HeaderFile -#include #include class BinTObjDrivers_XYZDriver : public BinMDF_ADriver diff --git a/src/BinTools/BinTools_ShapeReader.cxx b/src/BinTools/BinTools_ShapeReader.cxx index 336590f90e..8b8ed4dc91 100644 --- a/src/BinTools/BinTools_ShapeReader.cxx +++ b/src/BinTools/BinTools_ShapeReader.cxx @@ -12,14 +12,15 @@ // commercial license or contractual agreement. #include -#include + +#include +#include +#include +#include #include #include #include -#include -#include -#include -#include +#include //======================================================================= //function : BinTools_ShapeReader diff --git a/src/BinTools/BinTools_ShapeReader.hxx b/src/BinTools/BinTools_ShapeReader.hxx index 190d8a9084..baa44fa447 100644 --- a/src/BinTools/BinTools_ShapeReader.hxx +++ b/src/BinTools/BinTools_ShapeReader.hxx @@ -17,11 +17,12 @@ #include #include #include +#include +#include -class TopLoc_Location; class Geom_Curve; -class Geom2d_Curve; class Geom_Surface; +class Geom2d_Curve; class Poly_Polygon3D; class Poly_PolygonOnTriangulation; class Poly_Triangulation; diff --git a/src/BinTools/BinTools_ShapeSet.hxx b/src/BinTools/BinTools_ShapeSet.hxx index 83add9525c..dff48a8eac 100644 --- a/src/BinTools/BinTools_ShapeSet.hxx +++ b/src/BinTools/BinTools_ShapeSet.hxx @@ -183,12 +183,12 @@ private: BinTools_SurfaceSet mySurfaces; BinTools_CurveSet myCurves; BinTools_Curve2dSet myCurves2d; - NCollection_IndexedMap myPolygons2D; - NCollection_IndexedMap myPolygons3D; + NCollection_IndexedMap myPolygons2D; + NCollection_IndexedMap myPolygons3D; NCollection_IndexedDataMap myTriangulations; //!< Contains a boolean flag with information //! to save normals for triangulation - NCollection_IndexedMap myNodes; + NCollection_IndexedMap myNodes; }; #endif // _BinTools_ShapeSet_HeaderFile diff --git a/src/BinTools/BinTools_ShapeSetBase.hxx b/src/BinTools/BinTools_ShapeSetBase.hxx index 9782195bba..24adf243b3 100644 --- a/src/BinTools/BinTools_ShapeSetBase.hxx +++ b/src/BinTools/BinTools_ShapeSetBase.hxx @@ -29,12 +29,6 @@ class gp_Pnt; //! Writes to the stream a gp_Pnt data Standard_OStream& operator << (Standard_OStream& OS, const gp_Pnt& P); -//! Computes a hash code for the given value of the uint64_t type, in range [1, theUpperBound] -inline Standard_Integer HashCode (const uint64_t theValue, const Standard_Integer theUpperBound) -{ - return IntegerHashCode(theValue, 0xffffffffffffffff, theUpperBound); -} - //! A base class for all readers/writers of TopoDS_Shape into/from stream. class BinTools_ShapeSetBase { diff --git a/src/BinTools/BinTools_ShapeWriter.hxx b/src/BinTools/BinTools_ShapeWriter.hxx index f9dc241fa0..0daddae4e6 100644 --- a/src/BinTools/BinTools_ShapeWriter.hxx +++ b/src/BinTools/BinTools_ShapeWriter.hxx @@ -16,7 +16,7 @@ #include #include -#include +#include #include class Geom_Curve; diff --git a/src/Bnd/Bnd_BoundSortBox.hxx b/src/Bnd/Bnd_BoundSortBox.hxx index b83e4f5663..6db19f130e 100644 --- a/src/Bnd/Bnd_BoundSortBox.hxx +++ b/src/Bnd/Bnd_BoundSortBox.hxx @@ -26,7 +26,6 @@ #include #include #include -#include class gp_Pln; diff --git a/src/BndLib/BndLib_AddSurface.cxx b/src/BndLib/BndLib_AddSurface.cxx index b1ba162eac..a5c2c05cfe 100644 --- a/src/BndLib/BndLib_AddSurface.cxx +++ b/src/BndLib/BndLib_AddSurface.cxx @@ -720,7 +720,8 @@ class SurfMaxMinCoord : public math_MultipleVarFunction myVMin(VMin), myVMax(VMax), myCoordIndx(CoordIndx), - mySign(Sign) + mySign(Sign), + myPenalty(0.) { math_Vector X(1,2); X(1) = UMin; diff --git a/src/CDF/CDF_FWOSDriver.cxx b/src/CDF/CDF_FWOSDriver.cxx index 2b28131c5d..3e5351d118 100644 --- a/src/CDF/CDF_FWOSDriver.cxx +++ b/src/CDF/CDF_FWOSDriver.cxx @@ -157,8 +157,6 @@ TCollection_ExtendedString CDF_FWOSDriver::Concatenate(const TCollection_Extende const TCollection_ExtendedString& aName) { TCollection_ExtendedString ff(aFolder); - ff = ""; - ff += aFolder; PutSlash(ff); ff+=aName; return ff; diff --git a/src/CDM/CDM_DocumentHasher.hxx b/src/CDM/CDM_DocumentHasher.hxx deleted file mode 100644 index bf0edcf76f..0000000000 --- a/src/CDM/CDM_DocumentHasher.hxx +++ /dev/null @@ -1,26 +0,0 @@ -// Created on: 1997-05-06 -// Created by: Jean-Louis Frenkel, Remi Lequette -// 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 CDM_DocumentHasher_HeaderFile -#define CDM_DocumentHasher_HeaderFile - -#include -#include - -typedef NCollection_DefaultHasher CDM_DocumentHasher; - - -#endif diff --git a/src/CDM/CDM_MapOfDocument.hxx b/src/CDM/CDM_MapOfDocument.hxx index 613ed2642d..d6fd8e4ab4 100644 --- a/src/CDM/CDM_MapOfDocument.hxx +++ b/src/CDM/CDM_MapOfDocument.hxx @@ -17,11 +17,11 @@ #ifndef CDM_MapOfDocument_HeaderFile #define CDM_MapOfDocument_HeaderFile -#include +#include #include -typedef NCollection_Map CDM_MapOfDocument; -typedef NCollection_Map::Iterator CDM_MapIteratorOfMapOfDocument; +typedef NCollection_Map CDM_MapOfDocument; +typedef NCollection_Map::Iterator CDM_MapIteratorOfMapOfDocument; #endif diff --git a/src/CDM/CDM_MetaDataLookUpTable.hxx b/src/CDM/CDM_MetaDataLookUpTable.hxx index b925bad765..2877b5852f 100644 --- a/src/CDM/CDM_MetaDataLookUpTable.hxx +++ b/src/CDM/CDM_MetaDataLookUpTable.hxx @@ -21,8 +21,8 @@ #include class CDM_MetaData; -typedef NCollection_DataMap CDM_MetaDataLookUpTable; -typedef NCollection_DataMap::Iterator CDM_DataMapIteratorOfMetaDataLookUpTable; +typedef NCollection_DataMap CDM_MetaDataLookUpTable; +typedef NCollection_DataMap::Iterator CDM_DataMapIteratorOfMetaDataLookUpTable; #endif diff --git a/src/CDM/FILES b/src/CDM/FILES index 769a0835b5..694470edb8 100644 --- a/src/CDM/FILES +++ b/src/CDM/FILES @@ -4,7 +4,6 @@ CDM_CanCloseStatus.hxx CDM_DataMapIteratorOfMetaDataLookUpTable.hxx CDM_Document.cxx CDM_Document.hxx -CDM_DocumentHasher.hxx CDM_DocumentPointer.hxx CDM_ListIteratorOfListOfDocument.hxx CDM_ListIteratorOfListOfReferences.hxx diff --git a/src/ChFi3d/ChFi3d_Builder.cxx b/src/ChFi3d/ChFi3d_Builder.cxx index f418482696..3159d94e5f 100644 --- a/src/ChFi3d/ChFi3d_Builder.cxx +++ b/src/ChFi3d/ChFi3d_Builder.cxx @@ -236,7 +236,7 @@ void ChFi3d_Builder::Compute() itel.Value()->Spine()->SetErrorStatus(ChFiDS_Ok); try { OCC_CATCH_SIGNALS - PerformSetOfSurf(itel.Value()); + PerformSetOfSurf(itel.ChangeValue()); } catch(Standard_Failure const& anException) { #ifdef OCCT_DEBUG @@ -412,7 +412,7 @@ void ChFi3d_Builder::Compute() } if (!hasresult) { B1.MakeCompound(TopoDS::Compound(myShapeResult)); - for(It.Reset(); It.More(); It.Next()){ + for(It = TColStd_MapIteratorOfMapOfInteger(MapIndSo); It.More(); It.Next()){ Standard_Integer indsol = It.Key(); const TopoDS_Shape& curshape = DStr.Shape(indsol); TopTools_ListIteratorOfListOfShape @@ -440,7 +440,7 @@ void ChFi3d_Builder::Compute() else { done=Standard_False; B1.MakeCompound(TopoDS::Compound(badShape)); - for(It.Reset(); It.More(); It.Next()){ + for(It = TColStd_MapIteratorOfMapOfInteger(MapIndSo); It.More(); It.Next()){ Standard_Integer indsol = It.Key(); const TopoDS_Shape& curshape = DStr.Shape(indsol); TopTools_ListIteratorOfListOfShape diff --git a/src/ChFi3d/ChFi3d_Builder_2.cxx b/src/ChFi3d/ChFi3d_Builder_2.cxx index 2d92b13d23..2f4764c9f0 100644 --- a/src/ChFi3d/ChFi3d_Builder_2.cxx +++ b/src/ChFi3d/ChFi3d_Builder_2.cxx @@ -2550,7 +2550,7 @@ void ChFi3d_Builder::PerformSetOfKPart(Handle(ChFiDS_Stripe)& Stripe, #ifdef OCCT_DEBUG if(ChFi3d_GettraceCHRON()) elspine.Start(); #endif - ChFi3d_PerformElSpine(ILES.Value(),Spine,myConti,tolesp); + ChFi3d_PerformElSpine(ILES.ChangeValue(),Spine,myConti,tolesp); #ifdef OCCT_DEBUG if(ChFi3d_GettraceCHRON()) { elspine.Stop(); } #endif @@ -2559,7 +2559,7 @@ void ChFi3d_Builder::PerformSetOfKPart(Handle(ChFiDS_Stripe)& Stripe, { ChFiDS_ListOfHElSpine& offsetll = Spine->ChangeOffsetElSpines(); for (ILES.Initialize(offsetll); ILES.More(); ILES.Next()) - ChFi3d_PerformElSpine(ILES.Value(),Spine,myConti,tolesp,Standard_True); + ChFi3d_PerformElSpine(ILES.ChangeValue(),Spine,myConti,tolesp,Standard_True); } Spine->SplitDone(Standard_True); } diff --git a/src/ChFi3d/ChFi3d_Builder_C1.cxx b/src/ChFi3d/ChFi3d_Builder_C1.cxx index edad09233a..b1d2cc32b7 100644 --- a/src/ChFi3d/ChFi3d_Builder_C1.cxx +++ b/src/ChFi3d/ChFi3d_Builder_C1.cxx @@ -3673,7 +3673,7 @@ Standard_Boolean ChFi3d_Builder::MoreSurfdata(const Standard_Integer Index) cons ChFiDS_ListIteratorOfListOfStripe It; It.Initialize(myVDataMap(Index)); - Handle(ChFiDS_Stripe)& stripe = It.Value(); + Handle(ChFiDS_Stripe)& stripe = It.ChangeValue(); ChFiDS_SequenceOfSurfData& SeqFil = stripe->ChangeSetOfSurfData()->ChangeSequence(); const TopoDS_Vertex& Vtx = myVDataMap.FindKey(Index); diff --git a/src/ChFi3d/ChFi3d_Builder_C2.cxx b/src/ChFi3d/ChFi3d_Builder_C2.cxx index 3892b686bc..be9864c9a3 100644 --- a/src/ChFi3d/ChFi3d_Builder_C2.cxx +++ b/src/ChFi3d/ChFi3d_Builder_C2.cxx @@ -119,7 +119,7 @@ Standard_Boolean ChFi3d_Builder::PerformTwoCornerbyInter(const Standard_Integer //---------- ChFiDS_ListIteratorOfListOfStripe It; It.Initialize(myVDataMap(Index)); - Handle(ChFiDS_Stripe)& Corner1 = It.Value(); + Handle(ChFiDS_Stripe)& Corner1 = It.ChangeValue(); Standard_Integer Sens1; Standard_Integer IFd1 = ChFi3d_IndexOfSurfData(Vtx,Corner1,Sens1); @@ -130,7 +130,7 @@ Standard_Boolean ChFi3d_Builder::PerformTwoCornerbyInter(const Standard_Integer //the second //---------- It.Next(); - Handle(ChFiDS_Stripe)& Corner2 = It.Value(); + Handle(ChFiDS_Stripe)& Corner2 = It.ChangeValue(); Standard_Integer Sens2; Standard_Integer IFd2; if(Corner2 == Corner1) { @@ -649,7 +649,7 @@ void ChFi3d_Builder::UpdateTolesp() // tolesp = Precision::Infinite(); for (itel.Initialize(myListStripe); itel.More(); itel.Next()) { - Handle(ChFiDS_Stripe)& curStripe = itel.Value(); + Handle(ChFiDS_Stripe)& curStripe = itel.ChangeValue(); Handle(ChFiDS_Spine)& Spine = curStripe->ChangeSpine(); const Standard_Real current_stripe_tolesp = Spine->GetTolesp(); if (tolesp > current_stripe_tolesp) diff --git a/src/ChFi3d/ChFi3d_Builder_CnCrn.cxx b/src/ChFi3d/ChFi3d_Builder_CnCrn.cxx index bc85cab557..8383bad9b6 100644 --- a/src/ChFi3d/ChFi3d_Builder_CnCrn.cxx +++ b/src/ChFi3d/ChFi3d_Builder_CnCrn.cxx @@ -843,7 +843,7 @@ static void RemoveSurfData (const ChFiDS_StripeMap & myVDataMap, CpOnEdge (It.Value(),i,isfirst,Eadj1,Eadj2,compoint); if (compoint) ind=i; } - if (ind>=2) RemoveSD(It.Value(),1,ind-1); + if (ind>=2) RemoveSD(It.ChangeValue(),1,ind-1); } else { ind=num; @@ -854,7 +854,7 @@ static void RemoveSurfData (const ChFiDS_StripeMap & myVDataMap, CpOnEdge (It.Value(),i,isfirst,Eadj1,Eadj2,compoint); if (compoint) ind=i; } - if (indIsPeriodic()) Itl.Value() = ComputeLaw(Els); + if (Els->IsPeriodic()) Itl.ChangeValue() = ComputeLaw(Els); else{ for (; It.More(); It.Next(), Itl.Next()) { Els = It.Value(); Standard_Real uf = Els->FirstParameter(); Standard_Real ul = Els->LastParameter(); if(uf <= W && W <= ul) { - Itl.Value() = ComputeLaw(Els); + Itl.ChangeValue() = ComputeLaw(Els); } } } diff --git a/src/ChFiKPart/ChFiKPart_RstMap.hxx b/src/ChFiKPart/ChFiKPart_RstMap.hxx index 094a46cf5c..db7e47c5f0 100644 --- a/src/ChFiKPart/ChFiKPart_RstMap.hxx +++ b/src/ChFiKPart/ChFiKPart_RstMap.hxx @@ -19,11 +19,10 @@ #include #include -#include #include -typedef NCollection_DataMap ChFiKPart_RstMap; -typedef NCollection_DataMap::Iterator ChFiKPart_DataMapIteratorOfRstMap; +typedef NCollection_DataMap ChFiKPart_RstMap; +typedef NCollection_DataMap::Iterator ChFiKPart_DataMapIteratorOfRstMap; #endif diff --git a/src/DBRep/DBRep_DrawableShape.cxx b/src/DBRep/DBRep_DrawableShape.cxx index 95308e8ee9..55efde50a7 100644 --- a/src/DBRep/DBRep_DrawableShape.cxx +++ b/src/DBRep/DBRep_DrawableShape.cxx @@ -853,7 +853,7 @@ void DBRep_DrawableShape::DisplayHiddenLines(Draw_Display& dis) if (recompute) myHidData.Remove(it); else { - it.Value().DrawOn(dis,myRg1,myRgN,myHid, + it.ChangeValue().DrawOn(dis,myRg1,myRgN,myHid, myConnCol,myIsosCol); if (dis.HasPicked()) { pickshape = it.Value().LastPick(); diff --git a/src/DBRep/DBRep_IsoBuilder.cxx b/src/DBRep/DBRep_IsoBuilder.cxx index 03e442b574..5912ca35c5 100644 --- a/src/DBRep/DBRep_IsoBuilder.cxx +++ b/src/DBRep/DBRep_IsoBuilder.cxx @@ -37,9 +37,6 @@ #include #include -#include -#include - // Providing consistency with intersection tolerance for the linear curves static Standard_Real IntersectorConfusion = Precision::PConfusion(); static Standard_Real IntersectorTangency = Precision::PConfusion(); diff --git a/src/DBRep/DBRep_IsoBuilder.hxx b/src/DBRep/DBRep_IsoBuilder.hxx index b9a2018d60..3bdc9b75e6 100644 --- a/src/DBRep/DBRep_IsoBuilder.hxx +++ b/src/DBRep/DBRep_IsoBuilder.hxx @@ -28,7 +28,6 @@ #include class TopoDS_Face; class DBRep_Face; -class TopTools_OrientedShapeMapHasher; //! Creation of isoparametric curves. class DBRep_IsoBuilder : public Geom2dHatch_Hatcher @@ -54,7 +53,7 @@ public: protected: typedef NCollection_IndexedDataMap - + DataMapOfEdgePCurve; //! Adds to the hatcher the 2D segments connecting the p-curves diff --git a/src/DDF/DDF_Transaction.hxx b/src/DDF/DDF_Transaction.hxx index 2e33afa2f2..ac86f34261 100644 --- a/src/DDF/DDF_Transaction.hxx +++ b/src/DDF/DDF_Transaction.hxx @@ -21,6 +21,7 @@ #include #include #include +#include class TDF_Data; class TDF_Delta; diff --git a/src/DDataStd/DDataStd_BasicCommands.cxx b/src/DDataStd/DDataStd_BasicCommands.cxx index 44d5e01bbd..d2f467ee17 100644 --- a/src/DDataStd/DDataStd_BasicCommands.cxx +++ b/src/DDataStd/DDataStd_BasicCommands.cxx @@ -208,7 +208,7 @@ static Standard_Integer DDataStd_GetInteger (Draw_Interpretor& di, if (Standard_GUID::CheckGUIDFormat(arg[3])) aGuid = Standard_GUID(arg[3]); } - if(Standard_GUID::IsEqual(aGuid, aNullGuid)) { + if(aGuid == aNullGuid) { isdrawname = Standard_True; aGuid = TDataStd_Integer::GetID(); } @@ -253,7 +253,7 @@ static Standard_Integer DDataStd_GetReal (Draw_Interpretor& di, if (Standard_GUID::CheckGUIDFormat(arg[3])) aGuid = Standard_GUID(arg[3]); } - if(Standard_GUID::IsEqual(aGuid, aNullGuid)) { + if(aGuid == aNullGuid) { isdrawname = Standard_True; aGuid = TDataStd_Real::GetID(); } @@ -1478,6 +1478,7 @@ static Standard_Integer DDataStd_GetUTFtoFile (Draw_Interpretor& di, n = aES.ToUTF8CString(aCstr); anOS.write( (char*)&aCstr[0], n); anOS.close(); + Standard::Free(aCstr); return 0; } di << "GetUTF : Data is not extracted to the specified file \n"; diff --git a/src/DE/DE_ConfigurationContext.hxx b/src/DE/DE_ConfigurationContext.hxx index d7abb18196..ad8ad8ac66 100644 --- a/src/DE/DE_ConfigurationContext.hxx +++ b/src/DE/DE_ConfigurationContext.hxx @@ -17,7 +17,7 @@ #include #include -typedef NCollection_DataMap DE_ResourceMap; +typedef NCollection_DataMap DE_ResourceMap; //! Provides convenient interface to resource file //! Allows loading of the resource file and getting attributes' diff --git a/src/DE/DE_Wrapper.cxx b/src/DE/DE_Wrapper.cxx index 16281c2e28..bd9c6c7cac 100644 --- a/src/DE/DE_Wrapper.cxx +++ b/src/DE/DE_Wrapper.cxx @@ -574,7 +574,6 @@ Standard_EXPORT void DE_Wrapper::UpdateLoad(const Standard_Boolean theToForceUpd void DE_Wrapper::sort(const Handle(DE_ConfigurationContext)& theResource) { const TCollection_AsciiString aScope(THE_CONFIGURATION_SCOPE() + '.' + "priority"); - NCollection_List aVendors; for (DE_ConfigurationFormatMap::Iterator aFormatIter(myConfiguration); aFormatIter.More(); aFormatIter.Next()) { diff --git a/src/DE/DE_Wrapper.hxx b/src/DE/DE_Wrapper.hxx index eb5fedb91e..02af4150d8 100644 --- a/src/DE/DE_Wrapper.hxx +++ b/src/DE/DE_Wrapper.hxx @@ -24,8 +24,8 @@ class TopoDS_Shape; class XSControl_WorkSession; class TDocStd_Document; -typedef NCollection_IndexedDataMap DE_ConfigurationVendorMap; -typedef NCollection_DataMap DE_ConfigurationFormatMap; +typedef NCollection_IndexedDataMap DE_ConfigurationVendorMap; +typedef NCollection_DataMap DE_ConfigurationFormatMap; //! The main class for working with CAD file exchange. //! Loads and Saves special CAD transfer property. diff --git a/src/DRAWEXE/DRAWEXE.cxx b/src/DRAWEXE/DRAWEXE.cxx index 401e47d09d..12c5dec943 100644 --- a/src/DRAWEXE/DRAWEXE.cxx +++ b/src/DRAWEXE/DRAWEXE.cxx @@ -167,7 +167,7 @@ static Standard_Integer Pload (Draw_Interpretor& theDI, Standard_Integer theNbArgs, const char** theArgVec) { - NCollection_IndexedMap aPlugins; + NCollection_IndexedMap aPlugins; for (Standard_Integer anArgIter = 1; anArgIter < theNbArgs; ++anArgIter) { TCollection_AsciiString anArg (theArgVec[anArgIter]); @@ -222,7 +222,7 @@ static Standard_Integer Pload (Draw_Interpretor& theDI, } } - for (NCollection_IndexedMap::Iterator aPluginIter (aPlugins); + for (NCollection_IndexedMap::Iterator aPluginIter (aPlugins); aPluginIter.More(); aPluginIter.Next()) { const TCollection_AsciiString& aPlugin = aPluginIter.Value(); diff --git a/src/Draft/Draft_VertexInfo.cxx b/src/Draft/Draft_VertexInfo.cxx index 87f2dac252..b63d48df07 100644 --- a/src/Draft/Draft_VertexInfo.cxx +++ b/src/Draft/Draft_VertexInfo.cxx @@ -98,7 +98,7 @@ Standard_Real& Draft_VertexInfo::ChangeParameter (const TopoDS_Edge& E) myItEd.Initialize(myEdges); for (; myItEd.More(); myItEd.Next(),itp.Next()) { if (myItEd.Value().IsSame(E)) { - return itp.Value(); + return itp.ChangeValue(); } } throw Standard_DomainError(); diff --git a/src/Draw/Draw_Drawable3D.cxx b/src/Draw/Draw_Drawable3D.cxx index cd6fe7e166..b25b18c32e 100644 --- a/src/Draw/Draw_Drawable3D.cxx +++ b/src/Draw/Draw_Drawable3D.cxx @@ -18,14 +18,15 @@ #include #include +#include #include IMPLEMENT_STANDARD_RTTIEXT(Draw_Drawable3D, Standard_Transient) //! Return the map of factory functions. -static NCollection_DataMap& getFactoryMap() +static NCollection_DataMap& getFactoryMap() { - static NCollection_DataMap myToolMap; + static NCollection_DataMap myToolMap; return myToolMap; } diff --git a/src/Draw/Draw_MapOfAsciiString.hxx b/src/Draw/Draw_MapOfAsciiString.hxx index 1e8504cbeb..5b89c76bdf 100644 --- a/src/Draw/Draw_MapOfAsciiString.hxx +++ b/src/Draw/Draw_MapOfAsciiString.hxx @@ -20,7 +20,7 @@ #include #include -typedef NCollection_IndexedMap Draw_MapOfAsciiString; +typedef NCollection_IndexedMap Draw_MapOfAsciiString; #endif diff --git a/src/DrawFairCurve/DrawFairCurve_Batten.hxx b/src/DrawFairCurve/DrawFairCurve_Batten.hxx index 47157efcdf..5acc95be61 100644 --- a/src/DrawFairCurve/DrawFairCurve_Batten.hxx +++ b/src/DrawFairCurve/DrawFairCurve_Batten.hxx @@ -19,7 +19,6 @@ #include -#include #include #include #include diff --git a/src/DrawFairCurve/DrawFairCurve_MinimalVariation.hxx b/src/DrawFairCurve/DrawFairCurve_MinimalVariation.hxx index 9a7ee32804..d922af6d35 100644 --- a/src/DrawFairCurve/DrawFairCurve_MinimalVariation.hxx +++ b/src/DrawFairCurve/DrawFairCurve_MinimalVariation.hxx @@ -20,7 +20,6 @@ #include #include -#include #include #include diff --git a/src/Expr/Expr_MapOfNamedUnknown.hxx b/src/Expr/Expr_MapOfNamedUnknown.hxx index 088e78d6b8..a66989d29f 100644 --- a/src/Expr/Expr_MapOfNamedUnknown.hxx +++ b/src/Expr/Expr_MapOfNamedUnknown.hxx @@ -18,10 +18,9 @@ #define Expr_MapOfNamedUnknown_HeaderFile #include -#include #include -typedef NCollection_IndexedMap Expr_MapOfNamedUnknown; +typedef NCollection_IndexedMap Expr_MapOfNamedUnknown; #endif diff --git a/src/Express/Express_DataMapOfAsciiStringItem.hxx b/src/Express/Express_DataMapOfAsciiStringItem.hxx index 8d2683f467..9a428d686f 100644 --- a/src/Express/Express_DataMapOfAsciiStringItem.hxx +++ b/src/Express/Express_DataMapOfAsciiStringItem.hxx @@ -18,7 +18,6 @@ #include #include -typedef NCollection_DataMap Express_DataMapOfAsciiStringItem; +typedef NCollection_DataMap Express_DataMapOfAsciiStringItem; #endif diff --git a/src/Express/Express_Entity.hxx b/src/Express/Express_Entity.hxx index 76e4043f23..48d8f21a5f 100644 --- a/src/Express/Express_Entity.hxx +++ b/src/Express/Express_Entity.hxx @@ -65,7 +65,7 @@ protected: private: - typedef NCollection_DataMap DataMapOfStringInteger; + typedef NCollection_DataMap DataMapOfStringInteger; //! Create HXX/CXX files from item Standard_EXPORT virtual Standard_Boolean GenerateClass() const Standard_OVERRIDE; diff --git a/src/Extrema/Extrema_FuncPSDist.hxx b/src/Extrema/Extrema_FuncPSDist.hxx index b29931ce62..e418ac060b 100644 --- a/src/Extrema/Extrema_FuncPSDist.hxx +++ b/src/Extrema/Extrema_FuncPSDist.hxx @@ -25,7 +25,8 @@ #include -class math_Vector; +template class math_VectorBase; +using math_Vector = math_VectorBase; //! Functional for search of extremum of the square Euclidean distance between point P and //! surface S, starting from approximate solution (u0, v0). diff --git a/src/FEmTool/FEmTool_Assembly.cxx b/src/FEmTool/FEmTool_Assembly.cxx index 699698212f..e862c27dea 100644 --- a/src/FEmTool/FEmTool_Assembly.cxx +++ b/src/FEmTool/FEmTool_Assembly.cxx @@ -541,7 +541,7 @@ void FEmTool_Assembly::AddConstraint(const Standard_Integer IndexofConstraint, for(i = Aux1->Upper() + 1; i <= Imax; i++) Coeff->SetValue(i, 0.); Iter.Initialize(L); for(i = 1; i < s1; Iter.Next(), i++); - Iter.Value() = Coeff; + Iter.ChangeValue() = Coeff; } else if(Imin > Aux1->Upper() && Imax >= Aux2->Lower()) { // merge new and first segment @@ -550,7 +550,7 @@ void FEmTool_Assembly::AddConstraint(const Standard_Integer IndexofConstraint, for(i = Aux2->Lower(); i <= Aux2->Upper(); i++) Coeff->SetValue(i, Aux2->Value(i)); Iter.Initialize(L); for(i = 1; i < s2; Iter.Next(), i++); - Iter.Value() = Coeff; + Iter.ChangeValue() = Coeff; } else if(Imin > Aux1->Upper() && Imax < Aux2->Lower()) { // inserting new between s1 and s2 @@ -568,7 +568,7 @@ void FEmTool_Assembly::AddConstraint(const Standard_Integer IndexofConstraint, for(i = Aux2->Lower(); i <= Aux2->Upper(); i++) Coeff->SetValue(i, Aux2->Value(i)); Iter.Initialize(L); for(i = 1; i < s1; Iter.Next(), i++); - Iter.Value() = Coeff; + Iter.ChangeValue() = Coeff; Iter.Next(); L.Remove(Iter); } diff --git a/src/Font/Font_FontMgr.cxx b/src/Font/Font_FontMgr.cxx index 4bceb727a0..0e1a3ecbcd 100644 --- a/src/Font/Font_FontMgr.cxx +++ b/src/Font/Font_FontMgr.cxx @@ -942,7 +942,7 @@ void Font_FontMgr::InitFontDataBase() void Font_FontMgr::GetAvailableFontsNames (TColStd_SequenceOfHAsciiString& theFontsNames) const { theFontsNames.Clear(); - for (NCollection_IndexedMap::Iterator aFontIter (myFontMap); + for (Font_FontMap::Iterator aFontIter (myFontMap); aFontIter.More(); aFontIter.Next()) { const Handle(Font_SystemFont)& aFont = aFontIter.Value(); @@ -1138,17 +1138,11 @@ Handle(Font_SystemFont) Font_FontMgr::Font_FontMap::Find (const TCollection_Asci { return FindKey (1); // return any font } - - TCollection_AsciiString aFontName (theFontName); - aFontName.LowerCase(); - for (IndexedMapNode* aNodeIter = (IndexedMapNode* )myData1[::HashCode (aFontName, NbBuckets())]; - aNodeIter != NULL; aNodeIter = (IndexedMapNode* )aNodeIter->Next()) + Handle(Font_SystemFont) aTmpFont = new Font_SystemFont(theFontName); + const int anInd = FindIndex(aTmpFont); + if (anInd > 0) { - const Handle(Font_SystemFont)& aKey = aNodeIter->Key1(); - if (aKey->FontKey().IsEqual (aFontName)) - { - return aKey; - } + return FindKey(anInd); } return Handle(Font_SystemFont)(); } diff --git a/src/Font/Font_FontMgr.hxx b/src/Font/Font_FontMgr.hxx index 137f1db1ce..410a6769b7 100644 --- a/src/Font/Font_FontMgr.hxx +++ b/src/Font/Font_FontMgr.hxx @@ -209,8 +209,22 @@ private: private: + struct FontHasher + { + size_t operator()(const Handle(Font_SystemFont)& theFont) const noexcept + { + return std::hash{}(theFont->FontKey()); + } + + bool operator()(const Handle(Font_SystemFont)& theFont1, + const Handle(Font_SystemFont)& theFont2) const + { + return theFont1->IsEqual(theFont2); + } + }; + //! Map storing registered fonts. - class Font_FontMap : public NCollection_IndexedMap + class Font_FontMap : public NCollection_IndexedMap { public: //! Empty constructor. @@ -220,26 +234,6 @@ private: //! @param theFontName [in] font family to find (or empty string if family name can be ignored) //! @return best match font or NULL if not found Handle(Font_SystemFont) Find (const TCollection_AsciiString& theFontName) const; - - public: - //! Computes a hash code for the system font, in the range [1, theUpperBound]. Based on Font Family, so that the - //! whole family with different aspects can be found within the same bucket of some map - //! @param theHExtendedString the handle referred to extended string which hash code is to be computed - //! @param theUpperBound the upper bound of the range a computing hash code must be within - //! @return a computed hash code, in the range [1, theUpperBound] - static Standard_Integer HashCode (const Handle (Font_SystemFont) & theSystemFont, - const Standard_Integer theUpperBound) - { - return ::HashCode (theSystemFont->FontKey(), theUpperBound); - } - - //! Matching two instances, for Map interface. - static bool IsEqual (const Handle(Font_SystemFont)& theFont1, - const Handle(Font_SystemFont)& theFont2) - { - return theFont1->IsEqual (theFont2); - } - }; //! Structure defining font alias. diff --git a/src/Font/Font_SystemFont.hxx b/src/Font/Font_SystemFont.hxx index ac3c6fca8b..0736553be3 100644 --- a/src/Font/Font_SystemFont.hxx +++ b/src/Font/Font_SystemFont.hxx @@ -18,6 +18,7 @@ #include #include +#include #include #include @@ -122,21 +123,10 @@ public: Standard_EXPORT TCollection_AsciiString ToString() const; public: - //! Computes a hash code for the system font, in the range [1, theUpperBound]. Based on Font Family, so that the whole - //! family with different aspects can be found within the same bucket of some map - //! @param theSystemFont the system font which hash code is to be computed - //! @param theUpperBound the upper bound of the range a computing hash code must be within - //! @return a computed hash code, in the range [1, theUpperBound] - static Standard_Integer HashCode (const Handle (Font_SystemFont) & theSystemFont, const Standard_Integer theUpperBound) - { - return ::HashCode (theSystemFont->FontKey(), theUpperBound); - } - //! Matching two instances, for Map interface. - static bool IsEqual (const Handle(Font_SystemFont)& theFont1, - const Handle(Font_SystemFont)& theFont2) + bool operator==(const Font_SystemFont& theFont) const { - return theFont1->IsEqual (theFont2); + return myFontKey.IsEqual(theFont.FontKey()); } private: @@ -149,6 +139,19 @@ private: }; +namespace std +{ + template<> + struct hash + { + size_t operator()(const Handle (Font_SystemFont)& theLink) const noexcept + { + if (theLink.IsNull()) return 0; + return std::hash{}(theLink->FontKey()); + } + }; +}; + DEFINE_STANDARD_HANDLE(Font_SystemFont, Standard_Transient) #endif // _Font_SystemFont_HeaderFile diff --git a/src/Geom2dHatch/Geom2dHatch_Hatchings.hxx b/src/Geom2dHatch/Geom2dHatch_Hatchings.hxx index 8718dd065d..ec9f02b975 100644 --- a/src/Geom2dHatch/Geom2dHatch_Hatchings.hxx +++ b/src/Geom2dHatch/Geom2dHatch_Hatchings.hxx @@ -19,11 +19,10 @@ #include #include -#include #include -typedef NCollection_DataMap Geom2dHatch_Hatchings; -typedef NCollection_DataMap::Iterator Geom2dHatch_DataMapIteratorOfHatchings; +typedef NCollection_DataMap Geom2dHatch_Hatchings; +typedef NCollection_DataMap::Iterator Geom2dHatch_DataMapIteratorOfHatchings; #endif diff --git a/src/Geom2dHatch/Geom2dHatch_MapOfElements.hxx b/src/Geom2dHatch/Geom2dHatch_MapOfElements.hxx index 8d9911077c..334b723194 100644 --- a/src/Geom2dHatch/Geom2dHatch_MapOfElements.hxx +++ b/src/Geom2dHatch/Geom2dHatch_MapOfElements.hxx @@ -18,11 +18,10 @@ #define Geom2dHatch_MapOfElements_HeaderFile #include -#include #include -typedef NCollection_DataMap Geom2dHatch_MapOfElements; -typedef NCollection_DataMap::Iterator Geom2dHatch_DataMapIteratorOfMapOfElements; +typedef NCollection_DataMap Geom2dHatch_MapOfElements; +typedef NCollection_DataMap::Iterator Geom2dHatch_DataMapIteratorOfMapOfElements; #endif diff --git a/src/GeomFill/GeomFill_PolynomialConvertor.cxx b/src/GeomFill/GeomFill_PolynomialConvertor.cxx index 8bbb524127..d0f85b8db7 100644 --- a/src/GeomFill/GeomFill_PolynomialConvertor.cxx +++ b/src/GeomFill/GeomFill_PolynomialConvertor.cxx @@ -25,6 +25,7 @@ #include #include #include +#include GeomFill_PolynomialConvertor::GeomFill_PolynomialConvertor(): Ordre(8), diff --git a/src/GeomInt/GeomInt_LineTool.cxx b/src/GeomInt/GeomInt_LineTool.cxx index f33fedb3f9..81b0c09598 100644 --- a/src/GeomInt/GeomInt_LineTool.cxx +++ b/src/GeomInt/GeomInt_LineTool.cxx @@ -26,7 +26,7 @@ #include #include #include -#include +#include #include #include @@ -418,7 +418,7 @@ Standard_Boolean GeomInt_LineTool:: typedef NCollection_List ListOfInteger; //have to use std::vector, not NCollection_Vector in order to use copy constructor of //ListOfInteger which will be created with specific allocator instance - typedef std::vector > ArrayOfListOfInteger; Standard_Boolean bIsPrevPointOnBoundary, bIsCurrentPointOnBoundary; @@ -445,7 +445,7 @@ Standard_Boolean GeomInt_LineTool:: } // Handle(NCollection_IncAllocator) anIncAlloc = new NCollection_IncAllocator(); - NCollection_StdAllocator anAlloc (anIncAlloc); + NCollection_OccAllocator anAlloc (anIncAlloc); const ListOfInteger aDummy (anIncAlloc); //empty list to be copy constructed from ArrayOfListOfInteger anArrayOfLines (aNbPnts + 1, aDummy, anAlloc); diff --git a/src/GeomInt/GeomInt_TheMultiLineOfWLApprox.hxx b/src/GeomInt/GeomInt_TheMultiLineOfWLApprox.hxx index 619598d096..f990f4ef4d 100644 --- a/src/GeomInt/GeomInt_TheMultiLineOfWLApprox.hxx +++ b/src/GeomInt/GeomInt_TheMultiLineOfWLApprox.hxx @@ -21,7 +21,6 @@ #include #include -#include #include #include #include diff --git a/src/Graphic3d/Graphic3d_CView.hxx b/src/Graphic3d/Graphic3d_CView.hxx index 143b50f4c4..5fe56d4467 100644 --- a/src/Graphic3d/Graphic3d_CView.hxx +++ b/src/Graphic3d/Graphic3d_CView.hxx @@ -36,7 +36,6 @@ #include #include #include -#include #include #include diff --git a/src/Graphic3d/Graphic3d_FrameStatsData.cxx b/src/Graphic3d/Graphic3d_FrameStatsData.cxx index 8c46a42aee..512d02bc89 100644 --- a/src/Graphic3d/Graphic3d_FrameStatsData.cxx +++ b/src/Graphic3d/Graphic3d_FrameStatsData.cxx @@ -30,12 +30,46 @@ Graphic3d_FrameStatsData::Graphic3d_FrameStatsData() Reset(); } +// ======================================================================= +// function : Graphic3d_FrameStatsData +// purpose : +// ======================================================================= +Graphic3d_FrameStatsData::Graphic3d_FrameStatsData(const Graphic3d_FrameStatsData& theOther) : + myCounters(theOther.myCounters), + myTimers(theOther.myTimers), + myTimersMin(theOther.myTimersMin), + myTimersMax(theOther.myTimersMax), + myFps(theOther.myFps), + myFpsCpu(theOther.myFpsCpu), + myFpsImmediate(theOther.myFpsImmediate), + myFpsCpuImmediate(theOther.myFpsCpuImmediate) +{} + +// ======================================================================= +// function : Graphic3d_FrameStatsData +// purpose : +// ======================================================================= +Graphic3d_FrameStatsData::Graphic3d_FrameStatsData(Graphic3d_FrameStatsData&& theOther) noexcept : + myCounters(std::move(theOther.myCounters)), + myTimers(std::move(theOther.myTimers)), + myTimersMin(std::move(theOther.myTimersMin)), + myTimersMax(std::move(theOther.myTimersMax)), + myFps(std::move(theOther.myFps)), + myFpsCpu(std::move(theOther.myFpsCpu)), + myFpsImmediate(std::move(theOther.myFpsImmediate)), + myFpsCpuImmediate(std::move(theOther.myFpsCpuImmediate)) +{} + // ======================================================================= // function : operator= // purpose : // ======================================================================= Graphic3d_FrameStatsData& Graphic3d_FrameStatsData::operator= (const Graphic3d_FrameStatsData& theOther) { + if (&theOther == this) + { + return *this; + } myFps = theOther.myFps; myFpsCpu = theOther.myFpsCpu; myFpsImmediate = theOther.myFpsImmediate; @@ -47,6 +81,27 @@ Graphic3d_FrameStatsData& Graphic3d_FrameStatsData::operator= (const Graphic3d_F return *this; } +// ======================================================================= +// function : operator= +// purpose : +// ======================================================================= +Graphic3d_FrameStatsData& Graphic3d_FrameStatsData::operator=(Graphic3d_FrameStatsData&& theOther) noexcept +{ + if (&theOther == this) + { + return *this; + } + myFps = std::move(theOther.myFps); + myFpsCpu = std::move(theOther.myFpsCpu); + myFpsImmediate = std::move(theOther.myFpsImmediate); + myFpsCpuImmediate = std::move(theOther.myFpsCpuImmediate); + myCounters = std::move(theOther.myCounters); + myTimers = std::move(theOther.myTimers); + myTimersMin = std::move(theOther.myTimersMin); + myTimersMax = std::move(theOther.myTimersMax); + return *this; +} + // ======================================================================= // function : Reset // purpose : diff --git a/src/Graphic3d/Graphic3d_FrameStatsData.hxx b/src/Graphic3d/Graphic3d_FrameStatsData.hxx index 27db098b66..2337037bb5 100644 --- a/src/Graphic3d/Graphic3d_FrameStatsData.hxx +++ b/src/Graphic3d/Graphic3d_FrameStatsData.hxx @@ -61,9 +61,18 @@ public: //! Empty constructor. Standard_EXPORT Graphic3d_FrameStatsData(); + //! Copy constructor. + Standard_EXPORT Graphic3d_FrameStatsData(const Graphic3d_FrameStatsData& theOther); + + //! Move constructor. + Standard_EXPORT Graphic3d_FrameStatsData(Graphic3d_FrameStatsData&& theOther) noexcept; + //! Assignment operator. Standard_EXPORT Graphic3d_FrameStatsData& operator= (const Graphic3d_FrameStatsData& theOther); + //! Assignment with move operator. + Standard_EXPORT Graphic3d_FrameStatsData& operator= (Graphic3d_FrameStatsData&& theOther) noexcept; + //! Reset data. Standard_EXPORT void Reset(); diff --git a/src/Graphic3d/Graphic3d_ShaderAttribute.hxx b/src/Graphic3d/Graphic3d_ShaderAttribute.hxx index 786458d360..5b2b8f3c09 100644 --- a/src/Graphic3d/Graphic3d_ShaderAttribute.hxx +++ b/src/Graphic3d/Graphic3d_ShaderAttribute.hxx @@ -17,6 +17,7 @@ #define _Graphic3d_ShaderAttribute_HeaderFile #include +#include #include //! Describes custom vertex shader attribute. diff --git a/src/HLRAlgo/HLRAlgo_PolyAlgo.cxx b/src/HLRAlgo/HLRAlgo_PolyAlgo.cxx index 31cd6e4dd7..09756abcd6 100644 --- a/src/HLRAlgo/HLRAlgo_PolyAlgo.cxx +++ b/src/HLRAlgo/HLRAlgo_PolyAlgo.cxx @@ -115,7 +115,7 @@ void HLRAlgo_PolyAlgo::Update () for (mySegListIt.Initialize (aPsd->Edges()); mySegListIt.More(); mySegListIt.Next()) { - HLRAlgo_BiPoint& BP = mySegListIt.Value(); + HLRAlgo_BiPoint& BP = mySegListIt.ChangeValue(); HLRAlgo_BiPoint::PointsT& aPoints = BP.Points(); HLRAlgo_BiPoint::IndicesT& theIndices = BP.Indices(); if (aPoints.PntP1.X() < aPoints.PntP2.X()) { xSegmnMin = aPoints.PntP1.X(); xSegmnMax = aPoints.PntP2.X(); } @@ -349,7 +349,7 @@ HLRAlgo_BiPoint::PointsT& HLRAlgo_PolyAlgo::Hide (HLRAlgo_EdgeStatus& theStatus, Standard_Boolean& theOutl, Standard_Boolean& theIntl) { - HLRAlgo_BiPoint& aBP = mySegListIt.Value(); + HLRAlgo_BiPoint& aBP = mySegListIt.ChangeValue(); HLRAlgo_BiPoint::PointsT& aPoints = aBP.Points(); HLRAlgo_BiPoint::IndicesT& anIndices = aBP.Indices(); theStatus = HLRAlgo_EdgeStatus (0.0, (Standard_ShortReal)myTriangle.TolParam, @@ -431,7 +431,7 @@ HLRAlgo_BiPoint::PointsT& HLRAlgo_PolyAlgo::Show ( Standard_Boolean& outl, Standard_Boolean& intl) { - HLRAlgo_BiPoint& BP = mySegListIt.Value(); + HLRAlgo_BiPoint& BP = mySegListIt.ChangeValue(); HLRAlgo_BiPoint::IndicesT& theIndices = BP.Indices(); HLRAlgo_BiPoint::PointsT& aPoints = BP.Points(); Index = theIndices.ShapeIndex; diff --git a/src/HLRAlgo/HLRAlgo_PolyShellData.cxx b/src/HLRAlgo/HLRAlgo_PolyShellData.cxx index 773cb84a22..b5d6ba2836 100644 --- a/src/HLRAlgo/HLRAlgo_PolyShellData.cxx +++ b/src/HLRAlgo/HLRAlgo_PolyShellData.cxx @@ -38,7 +38,7 @@ void HLRAlgo_PolyShellData::UpdateGlobalMinMax(HLRAlgo_PolyData::Box& theBox) HLRAlgo_ListIteratorOfListOfBPoint it; for (it.Initialize(mySegList); it.More(); it.Next()) { - HLRAlgo_BiPoint& BP = it.Value(); + HLRAlgo_BiPoint& BP = it.ChangeValue(); HLRAlgo_BiPoint::PointsT& aPoints = BP.Points(); if (aPoints.PntP1.X() < aPoints.PntP2.X()) { if (theBox.XMin > aPoints.PntP1.X()) theBox.XMin = aPoints.PntP1.X(); diff --git a/src/HLRBRep/HLRBRep_CurveTool.hxx b/src/HLRBRep/HLRBRep_CurveTool.hxx index 147b8659d8..170af95419 100644 --- a/src/HLRBRep/HLRBRep_CurveTool.hxx +++ b/src/HLRBRep/HLRBRep_CurveTool.hxx @@ -22,7 +22,6 @@ #include #include -#include #include #include #include diff --git a/src/HLRBRep/HLRBRep_Data.cxx b/src/HLRBRep/HLRBRep_Data.cxx index 2cebfec692..4507728bd2 100644 --- a/src/HLRBRep/HLRBRep_Data.cxx +++ b/src/HLRBRep/HLRBRep_Data.cxx @@ -1443,7 +1443,7 @@ HLRBRep_Data::HidingStartLevel (const Standard_Integer E, It.Initialize(IL); while(It.More() && Loop) { - HLRAlgo_Interference& Int = It.Value(); + const HLRAlgo_Interference& Int = It.Value(); Standard_Real p = Int.Intersection().Parameter(); if (p < param - tolpar) { switch (Int.Transition()) { diff --git a/src/HLRBRep/HLRBRep_Data.hxx b/src/HLRBRep/HLRBRep_Data.hxx index 121ec30824..e701d2f3f2 100644 --- a/src/HLRBRep/HLRBRep_Data.hxx +++ b/src/HLRBRep/HLRBRep_Data.hxx @@ -31,7 +31,6 @@ #include #include #include -#include #include #include #include diff --git a/src/HLRBRep/HLRBRep_EdgeFaceTool.hxx b/src/HLRBRep/HLRBRep_EdgeFaceTool.hxx index cd7feae0d1..5c0c34be02 100644 --- a/src/HLRBRep/HLRBRep_EdgeFaceTool.hxx +++ b/src/HLRBRep/HLRBRep_EdgeFaceTool.hxx @@ -20,7 +20,6 @@ #include #include -#include class gp_Dir; diff --git a/src/HLRBRep/HLRBRep_EdgeIList.cxx b/src/HLRBRep/HLRBRep_EdgeIList.cxx index b416ea7fe1..9a852e1707 100644 --- a/src/HLRBRep/HLRBRep_EdgeIList.cxx +++ b/src/HLRBRep/HLRBRep_EdgeIList.cxx @@ -116,8 +116,8 @@ ProcessComplex(HLRAlgo_InterferenceList& IL, IL.Remove(It2); } // get the cumulated results - It1.Value().Transition(transTool.Transition()); - It1.Value().BoundaryTransition(transTool.BoundaryTransition()); + It1.ChangeValue().Transition(transTool.Transition()); + It1.ChangeValue().BoundaryTransition(transTool.BoundaryTransition()); } } It1.Next(); diff --git a/src/HLRBRep/HLRBRep_Hider.cxx b/src/HLRBRep/HLRBRep_Hider.cxx index b97392a3f1..54ce4e0e9d 100644 --- a/src/HLRBRep/HLRBRep_Hider.cxx +++ b/src/HLRBRep/HLRBRep_Hider.cxx @@ -141,12 +141,12 @@ void HLRBRep_Hider::Hide(const Standard_Integer FI, Modif = Standard_False; HLRAlgo_ListIteratorOfInterferenceList ItSegHidden1(ILHidden); while(ItSegHidden1.More() && Modif==Standard_False) { - HLRAlgo_Interference& Int1 = ItSegHidden1.Value(); + HLRAlgo_Interference& Int1 = ItSegHidden1.ChangeValue(); Standard_Integer numseg1=Int1.Intersection().SegIndex(); if(numseg1!=0) { HLRAlgo_ListIteratorOfInterferenceList ItSegHidden2(ILHidden); while(ItSegHidden2.More() && Modif==Standard_False) { - HLRAlgo_Interference& Int2 = ItSegHidden2.Value(); + HLRAlgo_Interference& Int2 = ItSegHidden2.ChangeValue(); Standard_Integer numseg2=Int2.Intersection().SegIndex(); if(numseg1+numseg2 == 0) { //--printf("\nHidden Traitement du segment %d %d\n",numseg1,numseg2); fflush(stdout); @@ -216,7 +216,7 @@ void HLRBRep_Hider::Hide(const Standard_Integer FI, while(It.More()) { // process Intersections on the Face // ********************************* - HLRAlgo_Interference& Int = It.Value(); + HLRAlgo_Interference& Int = It.ChangeValue(); TopAbs_State stbef, staft; // read the 3d states Int.Boundary().State3D(stbef,staft); // ****************** @@ -401,7 +401,7 @@ void HLRBRep_Hider::Hide(const Standard_Integer FI, while(It.More()) { // suppress multi-inside Intersections // *********************************** - HLRAlgo_Interference& Int = It.Value(); + const HLRAlgo_Interference& Int = It.Value(); switch (Int.Transition()) { case TopAbs_FORWARD : @@ -585,7 +585,7 @@ void HLRBRep_Hider::Hide(const Standard_Integer FI, while(It.More()) { // suppress multi-inside Intersections // *********************************** - HLRAlgo_Interference& Int = It.Value(); + const HLRAlgo_Interference& Int = It.Value(); switch (Int.Transition()) { case TopAbs_FORWARD : diff --git a/src/HLRBRep/HLRBRep_PolyAlgo.cxx b/src/HLRBRep/HLRBRep_PolyAlgo.cxx index ebcc46fd3a..f7dc633b9d 100644 --- a/src/HLRBRep/HLRBRep_PolyAlgo.cxx +++ b/src/HLRBRep/HLRBRep_PolyAlgo.cxx @@ -2412,7 +2412,7 @@ void HLRBRep_PolyAlgo::CheckFrBackTriangles (HLRAlgo_ListOfBPoint& theList, { for (HLRAlgo_ListIteratorOfListOfBPoint aBPointIter (theList); aBPointIter.More(); aBPointIter.Next()) { - HLRAlgo_BiPoint& BP = aBPointIter.Value(); + HLRAlgo_BiPoint& BP = aBPointIter.ChangeValue(); HLRAlgo_BiPoint::IndicesT& theIndices = BP.Indices(); if (theIndices.FaceConex1 != 0) { @@ -3440,7 +3440,7 @@ TopoDS_Shape HLRBRep_PolyAlgo::OutLinedShape (const TopoDS_Shape& theShape) cons const HLRAlgo_ListOfBPoint& aList = aShell.Value (aShellIter)->Edges(); for (aBPntIter.Initialize (aList); aBPntIter.More(); aBPntIter.Next()) { - HLRAlgo_BiPoint& aBP = aBPntIter.Value(); + HLRAlgo_BiPoint& aBP = aBPntIter.ChangeValue(); if (aBP.IntLine()) { const HLRAlgo_BiPoint::IndicesT& aIndices = aBP.Indices(); diff --git a/src/HLRBRep/HLRBRep_ThePolyhedronOfInterCSurf.hxx b/src/HLRBRep/HLRBRep_ThePolyhedronOfInterCSurf.hxx index 3c43944fb7..6900c0c029 100644 --- a/src/HLRBRep/HLRBRep_ThePolyhedronOfInterCSurf.hxx +++ b/src/HLRBRep/HLRBRep_ThePolyhedronOfInterCSurf.hxx @@ -24,7 +24,6 @@ #include #include #include -#include #include class Standard_OutOfRange; class HLRBRep_SurfaceTool; diff --git a/src/IFSelect/IFSelect_IntParam.hxx b/src/IFSelect/IFSelect_IntParam.hxx index 4d48a064d9..0bd3d56c98 100644 --- a/src/IFSelect/IFSelect_IntParam.hxx +++ b/src/IFSelect/IFSelect_IntParam.hxx @@ -21,6 +21,7 @@ #include #include +#include #include class IFSelect_IntParam; diff --git a/src/IMeshData/IMeshData_Types.hxx b/src/IMeshData/IMeshData_Types.hxx index 5e82a2f12b..dfa716dab7 100644 --- a/src/IMeshData/IMeshData_Types.hxx +++ b/src/IMeshData/IMeshData_Types.hxx @@ -22,7 +22,7 @@ #include #include #include -#include +#include #include #include #include @@ -108,10 +108,10 @@ namespace IMeshData namespace Model { - typedef std::deque > SequenceOfPnt; - typedef std::deque > SequenceOfPnt2d; - typedef std::deque > SequenceOfReal; - typedef std::deque > SequenceOfInteger; + typedef std::deque > SequenceOfPnt; + typedef std::deque > SequenceOfPnt2d; + typedef std::deque > SequenceOfReal; + typedef std::deque > SequenceOfInteger; } // Lists @@ -125,40 +125,20 @@ namespace IMeshData typedef NCollection_CellFilter CircleCellFilter; typedef NCollection_CellFilter VertexCellFilter; - // Data Maps - template - struct WeakEqual - { - static Standard_Boolean IsEqual(const Type* theFirst, - const Type* theSecond) - { - return (theFirst == theSecond); - } - - //! Computes a hash code for the given pointer, in the range [1, theUpperBound] - //! @param thePointer the pointer which hash code is to be computed - //! @param theUpperBound the upper bound of the range a computing hash code must be within - //! @return a computed hash code, in the range [1, theUpperBound] - static Standard_Integer HashCode (const Type* const thePointer, Standard_Integer theUpperBound) - { - return ::HashCode (thePointer, theUpperBound); - } - }; - - typedef NCollection_Shared > DMapOfShapeInteger; - typedef NCollection_Shared > > DMapOfIFacePtrsListOfInteger; - typedef NCollection_Shared > > MapOfIEdgePtr; - typedef NCollection_Shared > > MapOfIFacePtr; - typedef NCollection_Shared > MapOfOrientedEdges; - typedef NCollection_Shared > MapOfReal; - typedef NCollection_Shared > > IDMapOfIFacePtrsListOfIPCurves; - typedef NCollection_Shared > > DMapOfIFacePtrsMapOfIEdgePtrs; - typedef NCollection_Shared > IDMapOfLink; - typedef NCollection_Shared > DMapOfIntegerListOfInteger; - typedef NCollection_Shared > MapOfIntegerInteger; - typedef NCollection_Shared > IMapOfReal; - - typedef NCollection_Shared > Array1OfInteger; + typedef NCollection_Shared > DMapOfShapeInteger; + typedef NCollection_Shared > DMapOfIFacePtrsListOfInteger; + typedef NCollection_Shared > MapOfIEdgePtr; + typedef NCollection_Shared > MapOfIFacePtr; + typedef NCollection_Shared > MapOfOrientedEdges; + typedef NCollection_Shared > MapOfReal; + typedef NCollection_Shared > IDMapOfIFacePtrsListOfIPCurves; + typedef NCollection_Shared > DMapOfIFacePtrsMapOfIEdgePtrs; + typedef NCollection_Shared > IDMapOfLink; + typedef NCollection_Shared > DMapOfIntegerListOfInteger; + typedef NCollection_Shared > MapOfIntegerInteger; + typedef NCollection_Shared > IMapOfReal; + + typedef NCollection_Shared > Array1OfInteger; } #endif diff --git a/src/IVtk/IVtk_Types.hxx b/src/IVtk/IVtk_Types.hxx index 5ae46834d9..b1e00f5300 100644 --- a/src/IVtk/IVtk_Types.hxx +++ b/src/IVtk/IVtk_Types.hxx @@ -18,7 +18,6 @@ #include #include -#include #include #include #include diff --git a/src/IVtkDraw/IVtkDraw.cxx b/src/IVtkDraw/IVtkDraw.cxx index a81e03b64b..aedfc709a3 100644 --- a/src/IVtkDraw/IVtkDraw.cxx +++ b/src/IVtkDraw/IVtkDraw.cxx @@ -94,9 +94,25 @@ //================================================================ // TYPE DEFINITIONS //================================================================ +namespace +{ + struct VtkPointerHasher + { + std::size_t operator()(const vtkSmartPointer& thePointer) const + { + return std::hash{}(thePointer.Get()); + } + + bool operator()(const vtkSmartPointer& thePointer1, + const vtkSmartPointer& thePointer2) const + { + return thePointer1 == thePointer2; + } + }; +} typedef NCollection_DoubleMap DoubleMapOfShapesAndNames; -typedef NCollection_DoubleMap, TCollection_AsciiString> DoubleMapOfActorsAndNames; +typedef NCollection_DoubleMap, TCollection_AsciiString, VtkPointerHasher> DoubleMapOfActorsAndNames; typedef IVtkDraw_HighlightAndSelectionPipeline PipelinePtr; diff --git a/src/Image/Image_Texture.hxx b/src/Image/Image_Texture.hxx index 57575a5283..3b3e985171 100644 --- a/src/Image/Image_Texture.hxx +++ b/src/Image/Image_Texture.hxx @@ -76,29 +76,6 @@ public: const TCollection_AsciiString& theFile); public: //! @name hasher interface - - //! Hash value, for Map interface. - static int HashCode (const Handle(Image_Texture)& theTexture, const int theUpper) - { - return !theTexture.IsNull() - ? TCollection_AsciiString::HashCode (theTexture->myTextureId, theUpper) - : 0; - } - - //! Matching two instances, for Map interface. - static Standard_Boolean IsEqual (const Handle(Image_Texture)& theTex1, - const Handle(Image_Texture)& theTex2) - { - if (theTex1.IsNull() != theTex2.IsNull()) - { - return Standard_False; - } - else if (theTex1.IsNull()) - { - return Standard_True; - } - return theTex1->myTextureId.IsEqual (theTex2->myTextureId); - } //! Dumps the content of me into the stream Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const; @@ -127,4 +104,36 @@ protected: }; +namespace std +{ + template<> + struct equal_to + { + bool operator()(const Handle(Image_Texture)& theTex1, + const Handle(Image_Texture)& theTex2) const + { + if (theTex1.IsNull() != theTex2.IsNull()) + { + return Standard_False; + } + else if (theTex1.IsNull()) + { + return Standard_True; + } + return theTex1->TextureId().IsEqual(theTex2->TextureId()); + } + }; + + template<> + struct hash + { + size_t operator()(const Handle(Image_Texture)& theTexture) const noexcept + { + return !theTexture.IsNull() + ? std::hash{}(theTexture->TextureId()) + : 0; + } + }; +} + #endif // _Image_Texture_HeaderFile diff --git a/src/IntPatch/IntPatch_ImpImpIntersection_4.gxx b/src/IntPatch/IntPatch_ImpImpIntersection_4.gxx index c956e6c6cf..369d6334e9 100644 --- a/src/IntPatch/IntPatch_ImpImpIntersection_4.gxx +++ b/src/IntPatch/IntPatch_ImpImpIntersection_4.gxx @@ -20,6 +20,7 @@ #include #include #include +#include //If Abs(a) <= aNulValue then it is considered that a = 0. static const Standard_Real aNulValue = 1.0e-11; @@ -3845,7 +3846,7 @@ IntPatch_ImpImpIntersection::IntStatus IntCyCy(const IntSurf_Quadric& theQuad1, Handle(NCollection_IncAllocator) anAlloc = new NCollection_IncAllocator; for (Standard_Integer aCID = 0; aCID < 2; aCID++) { - anAlloc->Reset(); + anAlloc->Reset(false); NCollection_List aListOfRng(anAlloc); aListOfRng.Append(anURange[aCID][0]); @@ -3860,7 +3861,7 @@ IntPatch_ImpImpIntersection::IntStatus IntCyCy(const IntSurf_Quadric& theQuad1, aListOfRng.Clear(); for (anITrRng.Init(aLstTemp); anITrRng.More(); anITrRng.Next()) { - Bnd_Range& aRng = anITrRng.Value(); + Bnd_Range& aRng = anITrRng.ChangeValue(); aRng.Split(aSplitArr[aSInd], aListOfRng, aPeriod); } } @@ -3868,7 +3869,7 @@ IntPatch_ImpImpIntersection::IntStatus IntCyCy(const IntSurf_Quadric& theQuad1, anITrRng.Init(aListOfRng); for (; anITrRng.More(); anITrRng.Next()) { - Bnd_Range& aCurrRange = anITrRng.Value(); + Bnd_Range& aCurrRange = anITrRng.ChangeValue(); Bnd_Range aBoundR; aBoundR.Add(aUSBou[aCID][0]); @@ -4300,7 +4301,7 @@ Standard_Boolean IntCyCo(const IntSurf_Quadric& Quad1, // aIt.Initialize(aLC); for (; aIt.More(); aIt.Next()) { - IntAna_Curve& curvsol=aIt.Value(); + IntAna_Curve& curvsol=aIt.ChangeValue(); // curvsol.Domain(first, last); firstp = !curvsol.IsFirstOpen(); diff --git a/src/IntPatch/IntPatch_SpecialPoints.hxx b/src/IntPatch/IntPatch_SpecialPoints.hxx index 485adf9e8f..eb7674aeb1 100644 --- a/src/IntPatch/IntPatch_SpecialPoints.hxx +++ b/src/IntPatch/IntPatch_SpecialPoints.hxx @@ -28,7 +28,9 @@ class gp_Vec; class gp_XYZ; class IntPatch_Point; class IntSurf_PntOn2S; -class math_Vector; + +template class math_VectorBase; +using math_Vector = math_VectorBase; class IntPatch_SpecialPoints { diff --git a/src/IntPatch/IntPatch_WLineTool.cxx b/src/IntPatch/IntPatch_WLineTool.cxx index 9132bf33e0..6530d7d4b3 100644 --- a/src/IntPatch/IntPatch_WLineTool.cxx +++ b/src/IntPatch/IntPatch_WLineTool.cxx @@ -1544,7 +1544,7 @@ void IntPatch_WLineTool::JoinWLines(IntPatch_SequenceOfLine& theSlin, } } - anAlloc->Reset(); + anAlloc->Reset(false); NCollection_List aListFC(anAlloc), aListLC(anAlloc); diff --git a/src/IntPolyh/FILES b/src/IntPolyh/FILES index d586b0593d..f1641e8151 100755 --- a/src/IntPolyh/FILES +++ b/src/IntPolyh/FILES @@ -7,7 +7,6 @@ IntPolyh_ArrayOfTangentZones.hxx IntPolyh_ArrayOfTriangles.hxx IntPolyh_Couple.cxx IntPolyh_Couple.hxx -IntPolyh_CoupleMapHasher.hxx IntPolyh_Edge.cxx IntPolyh_Edge.hxx IntPolyh_Intersection.cxx @@ -26,4 +25,4 @@ IntPolyh_StartPoint.hxx IntPolyh_Tools.cxx IntPolyh_Tools.hxx IntPolyh_Triangle.cxx -IntPolyh_Triangle.hxx \ No newline at end of file +IntPolyh_Triangle.hxx diff --git a/src/IntPolyh/IntPolyh_Couple.hxx b/src/IntPolyh/IntPolyh_Couple.hxx index 24770ef677..bb9480d993 100644 --- a/src/IntPolyh/IntPolyh_Couple.hxx +++ b/src/IntPolyh/IntPolyh_Couple.hxx @@ -23,6 +23,7 @@ #include #include +#include //! The class represents the couple of indices with additional //! characteristics such as analyzed flag and an angle.
    @@ -93,12 +94,10 @@ public: (myIndex1 == theOther.myIndex2 && myIndex2 == theOther.myIndex1); } - //! Computes a hash code for this couple, in the range [1, theUpperBound] - //! @param theUpperBound the upper bound of the range a computing hash code must be within - //! @return a computed hash code, in the range [1, theUpperBound] - Standard_Integer HashCode (const Standard_Integer theUpperBound) const + //! Returns true if the Couple is equal to + bool operator==(const IntPolyh_Couple& theOther) const { - return ::HashCode (myIndex1 + myIndex2, theUpperBound); + return IsEqual(theOther); } // Dump @@ -115,4 +114,22 @@ private: }; +namespace std +{ + template <> + struct hash + { + size_t operator()(const IntPolyh_Couple& theCouple) const noexcept + { + // Combine two int values into a single hash value. + int aCombination[2]{ theCouple.FirstValue(), theCouple.SecondValue() }; + if (aCombination[0] > aCombination[1]) + { + std::swap(aCombination[0], aCombination[1]); + } + return opencascade::hashBytes(aCombination, sizeof(aCombination)); + } + }; +} + #endif // _IntPolyh_Couple_HeaderFile diff --git a/src/IntPolyh/IntPolyh_CoupleMapHasher.hxx b/src/IntPolyh/IntPolyh_CoupleMapHasher.hxx deleted file mode 100644 index fa40687ed9..0000000000 --- a/src/IntPolyh/IntPolyh_CoupleMapHasher.hxx +++ /dev/null @@ -1,48 +0,0 @@ -// Created by: Eugeny MALTCHIKOV -// Copyright (c) 2017 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 _IntPolyh_CoupleMapHasher_HeaderFile -#define _IntPolyh_CoupleMapHasher_HeaderFile - -#include -#include - -class IntPolyh_Couple; - -class IntPolyh_CoupleMapHasher -{ -public: - - //! Computes a hash code for the given couple, in the range [1, theUpperBound] - //! @param theCouple the couple which hash code is to be computed - //! @param theUpperBound the upper bound of the range a computing hash code must be within - //! @return a computed hash code, in the range [1, theUpperBound] - static Standard_Integer HashCode (const IntPolyh_Couple& theCouple, const Standard_Integer theUpperBound) - { - return theCouple.HashCode (theUpperBound); - } - - static Standard_Boolean IsEqual(const IntPolyh_Couple& theCouple1, - const IntPolyh_Couple& theCouple2) - { - return theCouple1.IsEqual(theCouple2); - } - -protected: - -private: - -}; - -#endif // _IntPolyh_CoupleMapHasher_HeaderFile diff --git a/src/IntPolyh/IntPolyh_Intersection.cxx b/src/IntPolyh/IntPolyh_Intersection.cxx index 0c8b2d59cd..8e26bf0a80 100644 --- a/src/IntPolyh/IntPolyh_Intersection.cxx +++ b/src/IntPolyh/IntPolyh_Intersection.cxx @@ -20,7 +20,6 @@ #include #include -#include #include #include #include @@ -419,7 +418,7 @@ void IntPolyh_Intersection::MergeCouples(IntPolyh_ListOfCouples &anArrayFF, IntPolyh_ListOfCouples &anArrayRR) const { // Fence map to remove from the lists the duplicating elements. - NCollection_Map aFenceMap; + NCollection_Map aFenceMap; // IntPolyh_ListOfCouples* pLists[4] = {&anArrayFF, &anArrayFR, &anArrayRF, &anArrayRR}; for (Standard_Integer i = 0; i < 4; ++i) { diff --git a/src/IntPolyh/IntPolyh_MaillageAffinage.cxx b/src/IntPolyh/IntPolyh_MaillageAffinage.cxx index 1e2300416b..776921378f 100644 --- a/src/IntPolyh/IntPolyh_MaillageAffinage.cxx +++ b/src/IntPolyh/IntPolyh_MaillageAffinage.cxx @@ -47,8 +47,7 @@ typedef NCollection_Array1 IntPolyh_ArrayOfInteger; typedef NCollection_IndexedDataMap IntPolyh_IndexedDataMapOfIntegerListOfInteger; + TColStd_ListOfInteger> IntPolyh_IndexedDataMapOfIntegerListOfInteger; static Standard_Real MyTolerance=10.0e-7; diff --git a/src/IntPolyh/IntPolyh_SectionLine.hxx b/src/IntPolyh/IntPolyh_SectionLine.hxx index 6ceed6368e..c4f03c787c 100644 --- a/src/IntPolyh/IntPolyh_SectionLine.hxx +++ b/src/IntPolyh/IntPolyh_SectionLine.hxx @@ -36,6 +36,11 @@ public: Standard_EXPORT IntPolyh_SectionLine(); Standard_EXPORT IntPolyh_SectionLine(const Standard_Integer nn); + + IntPolyh_SectionLine(const IntPolyh_SectionLine& theOther) + { + Copy(theOther); + } Standard_EXPORT void Init (const Standard_Integer nn); diff --git a/src/IntTools/FILES b/src/IntTools/FILES index 0bd06c732f..abcaf104f5 100644 --- a/src/IntTools/FILES +++ b/src/IntTools/FILES @@ -17,8 +17,6 @@ IntTools_CurveRangeLocalizeData.cxx IntTools_CurveRangeLocalizeData.hxx IntTools_CurveRangeSample.cxx IntTools_CurveRangeSample.hxx -IntTools_CurveRangeSampleMapHasher.hxx -IntTools_DataMapIteratorOfDataMapOfCurveSampleBox.hxx IntTools_DataMapIteratorOfDataMapOfSurfaceSampleBox.hxx IntTools_DataMapOfCurveSampleBox.hxx IntTools_DataMapOfSurfaceSampleBox.hxx @@ -64,7 +62,6 @@ IntTools_SurfaceRangeLocalizeData.lxx IntTools_SurfaceRangeSample.cxx IntTools_SurfaceRangeSample.hxx IntTools_SurfaceRangeSample.lxx -IntTools_SurfaceRangeSampleMapHasher.hxx IntTools_Tools.cxx IntTools_Tools.hxx IntTools_TopolTool.cxx diff --git a/src/IntTools/IntTools_BeanFaceIntersector.cxx b/src/IntTools/IntTools_BeanFaceIntersector.cxx index b5095096eb..aa0318de99 100644 --- a/src/IntTools/IntTools_BeanFaceIntersector.cxx +++ b/src/IntTools/IntTools_BeanFaceIntersector.cxx @@ -2334,7 +2334,7 @@ static void MergeSolutions(const IntTools_ListOfCurveRangeSample& theListCurveRa IntTools_ListOfCurveRangeSample& theListCurveRangeSort, IntTools_ListOfSurfaceRangeSample& theListSurfaceRangeSort) { - NCollection_IndexedMap aMapToAvoid; + NCollection_IndexedMap aMapToAvoid; NCollection_DataMap aCurveIdMap; std::vector aCurveRangeVector; diff --git a/src/IntTools/IntTools_Context.cxx b/src/IntTools/IntTools_Context.cxx index 6c4deb2777..4116dc3436 100644 --- a/src/IntTools/IntTools_Context.cxx +++ b/src/IntTools/IntTools_Context.cxx @@ -125,7 +125,7 @@ IntTools_Context::~IntTools_Context() } mySClassMap.Clear(); - for (NCollection_DataMap::Iterator anIt (myProjPTMap); + for (NCollection_DataMap::Iterator anIt (myProjPTMap); anIt.More(); anIt.Next()) { GeomAPI_ProjectPointOnCurve* pProjPT = anIt.Value(); diff --git a/src/IntTools/IntTools_Context.hxx b/src/IntTools/IntTools_Context.hxx index eebffed2cb..a39b8299b5 100644 --- a/src/IntTools/IntTools_Context.hxx +++ b/src/IntTools/IntTools_Context.hxx @@ -26,7 +26,6 @@ #include #include #include -#include class IntTools_FClass2d; class TopoDS_Face; class GeomAPI_ProjectPointOnSurf; @@ -247,7 +246,7 @@ protected: NCollection_DataMap myProjPSMap; NCollection_DataMap myProjPCMap; NCollection_DataMap mySClassMap; - NCollection_DataMap myProjPTMap; + NCollection_DataMap myProjPTMap; NCollection_DataMap myHatcherMap; NCollection_DataMap myProjSDataMap; NCollection_DataMap myBndBoxDataMap; diff --git a/src/IntTools/IntTools_CurveRangeSample.hxx b/src/IntTools/IntTools_CurveRangeSample.hxx index 5375015feb..c3e0d0b116 100644 --- a/src/IntTools/IntTools_CurveRangeSample.hxx +++ b/src/IntTools/IntTools_CurveRangeSample.hxx @@ -21,6 +21,7 @@ #include #include +#include #include #include @@ -47,6 +48,11 @@ public: return ((myIndex == Other.myIndex) && (GetDepth() == Other.GetDepth())); } + bool operator==(const IntTools_CurveRangeSample& Other) const + { + return IsEqual(Other); + } + Standard_EXPORT IntTools_Range GetRange (const Standard_Real theFirst, const Standard_Real theLast, const Standard_Integer theNbSample) const; Standard_Integer GetRangeIndexDeeper (const Standard_Integer theNbSample) const @@ -60,4 +66,18 @@ private: }; +namespace std +{ + template <> + struct hash + { + size_t operator()(const IntTools_CurveRangeSample& theCurveRangeSample) const noexcept + { + // Combine two int values into a single hash value. + int aCombination[2]{ theCurveRangeSample.GetDepth(), theCurveRangeSample.GetRangeIndex() }; + return opencascade::hashBytes(aCombination, sizeof(aCombination)); + } + }; +} + #endif // _IntTools_CurveRangeSample_HeaderFile diff --git a/src/IntTools/IntTools_CurveRangeSampleMapHasher.hxx b/src/IntTools/IntTools_CurveRangeSampleMapHasher.hxx deleted file mode 100644 index 0a3ca3563f..0000000000 --- a/src/IntTools/IntTools_CurveRangeSampleMapHasher.hxx +++ /dev/null @@ -1,50 +0,0 @@ -// Created on: 2005-10-14 -// Created by: Mikhail KLOKOV -// Copyright (c) 2005-2014 OPEN CASCADE SAS -// -// This file is part of Open CASCADE Technology software library. -// -// This library is free software; you can redistribute it and/or modify it under -// the terms of the GNU Lesser General Public License version 2.1 as published -// by the Free Software Foundation, with special exception defined in the file -// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT -// distribution for complete text of the license and disclaimer of any warranty. -// -// Alternatively, this file may be used under the terms of Open CASCADE -// commercial license or contractual agreement. - -#ifndef _IntTools_CurveRangeSampleMapHasher_HeaderFile -#define _IntTools_CurveRangeSampleMapHasher_HeaderFile - -#include -#include -#include -#include - -//! class for range index management of curve -class IntTools_CurveRangeSampleMapHasher -{ -public: - - DEFINE_STANDARD_ALLOC - - //! Computes a hash code for the given key, in the range [1, theUpperBound] - //! @param theKey the key which hash code is to be computed - //! @param theUpperBound the upper bound of the range a computing hash code must be within - //! @return a computed hash code, in the range [1, theUpperBound] - static Standard_Integer HashCode (const IntTools_CurveRangeSample& theKey, const Standard_Integer theUpperBound) - { - return ::HashCode(theKey.GetDepth(), theUpperBound); - } - - //! Returns True when the two keys are the same. Two - //! same keys must have the same hashcode, the - //! contrary is not necessary. - static Standard_Boolean IsEqual (const IntTools_CurveRangeSample& S1, const IntTools_CurveRangeSample& S2) - { - return S1.IsEqual(S2); - } - -}; - -#endif // _IntTools_CurveRangeSampleMapHasher_HeaderFile diff --git a/src/IntTools/IntTools_DataMapIteratorOfDataMapOfCurveSampleBox.hxx b/src/IntTools/IntTools_DataMapIteratorOfDataMapOfCurveSampleBox.hxx deleted file mode 100644 index e8f1708929..0000000000 --- a/src/IntTools/IntTools_DataMapIteratorOfDataMapOfCurveSampleBox.hxx +++ /dev/null @@ -1,20 +0,0 @@ -// Copyright (c) 2015 OPEN CASCADE SAS -// -// This file is part of Open CASCADE Technology software library. -// -// This library is free software; you can redistribute it and/or modify it under -// the terms of the GNU Lesser General Public License version 2.1 as published -// by the Free Software Foundation, with special exception defined in the file -// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT -// distribution for complete text of the license and disclaimer of any warranty. -// -// Alternatively, this file may be used under the terms of Open CASCADE -// commercial license or contractual agreement. - - -#ifndef IntTools_DataMapIteratorOfDataMapOfCurveSampleBox_HeaderFile -#define IntTools_DataMapIteratorOfDataMapOfCurveSampleBox_HeaderFile - -#include - -#endif diff --git a/src/IntTools/IntTools_DataMapOfCurveSampleBox.hxx b/src/IntTools/IntTools_DataMapOfCurveSampleBox.hxx index b7a66ed193..ca789167ec 100644 --- a/src/IntTools/IntTools_DataMapOfCurveSampleBox.hxx +++ b/src/IntTools/IntTools_DataMapOfCurveSampleBox.hxx @@ -18,11 +18,10 @@ #include #include -#include #include -typedef NCollection_DataMap IntTools_DataMapOfCurveSampleBox; -typedef NCollection_DataMap::Iterator IntTools_DataMapIteratorOfDataMapOfCurveSampleBox; +typedef NCollection_DataMap IntTools_DataMapOfCurveSampleBox; +typedef NCollection_DataMap::Iterator IntTools_DataMapIteratorOfDataMapOfCurveSampleBox; #endif diff --git a/src/IntTools/IntTools_DataMapOfSurfaceSampleBox.hxx b/src/IntTools/IntTools_DataMapOfSurfaceSampleBox.hxx index d716633d60..c6f7c2a8d4 100644 --- a/src/IntTools/IntTools_DataMapOfSurfaceSampleBox.hxx +++ b/src/IntTools/IntTools_DataMapOfSurfaceSampleBox.hxx @@ -18,11 +18,10 @@ #include #include -#include #include -typedef NCollection_DataMap IntTools_DataMapOfSurfaceSampleBox; -typedef NCollection_DataMap::Iterator IntTools_DataMapIteratorOfDataMapOfSurfaceSampleBox; +typedef NCollection_DataMap IntTools_DataMapOfSurfaceSampleBox; +typedef NCollection_DataMap::Iterator IntTools_DataMapIteratorOfDataMapOfSurfaceSampleBox; #endif diff --git a/src/IntTools/IntTools_FaceFace.cxx b/src/IntTools/IntTools_FaceFace.cxx index b95022f00b..d2c99d7acb 100644 --- a/src/IntTools/IntTools_FaceFace.cxx +++ b/src/IntTools/IntTools_FaceFace.cxx @@ -391,7 +391,7 @@ void IntTools_FaceFace::Perform (const TopoDS_Face& aF1, aItP2S.Initialize(myListOfPnts); for (; aItP2S.More(); aItP2S.Next()) { - IntSurf_PntOn2S& aP2S=aItP2S.Value(); + IntSurf_PntOn2S& aP2S=aItP2S.ChangeValue(); aP2S.Parameters(aU1,aV1,aU2,aV2); aP2S.SetValue(aU2,aV2,aU1,aV1); } diff --git a/src/IntTools/IntTools_MapOfCurveSample.hxx b/src/IntTools/IntTools_MapOfCurveSample.hxx index 9377d9a900..434aab2df8 100644 --- a/src/IntTools/IntTools_MapOfCurveSample.hxx +++ b/src/IntTools/IntTools_MapOfCurveSample.hxx @@ -17,11 +17,10 @@ #define IntTools_MapOfCurveSample_HeaderFile #include -#include #include -typedef NCollection_Map IntTools_MapOfCurveSample; -typedef NCollection_Map::Iterator IntTools_MapIteratorOfMapOfCurveSample; +typedef NCollection_Map IntTools_MapOfCurveSample; +typedef NCollection_Map::Iterator IntTools_MapIteratorOfMapOfCurveSample; #endif diff --git a/src/IntTools/IntTools_MapOfSurfaceSample.hxx b/src/IntTools/IntTools_MapOfSurfaceSample.hxx index e7ffe2fbfc..8dd5178336 100644 --- a/src/IntTools/IntTools_MapOfSurfaceSample.hxx +++ b/src/IntTools/IntTools_MapOfSurfaceSample.hxx @@ -17,11 +17,10 @@ #define IntTools_MapOfSurfaceSample_HeaderFile #include -#include #include -typedef NCollection_Map IntTools_MapOfSurfaceSample; -typedef NCollection_Map::Iterator IntTools_MapIteratorOfMapOfSurfaceSample; +typedef NCollection_Map IntTools_MapOfSurfaceSample; +typedef NCollection_Map::Iterator IntTools_MapIteratorOfMapOfSurfaceSample; #endif diff --git a/src/IntTools/IntTools_SurfaceRangeSample.hxx b/src/IntTools/IntTools_SurfaceRangeSample.hxx index 15f86977ff..ce930e70f3 100644 --- a/src/IntTools/IntTools_SurfaceRangeSample.hxx +++ b/src/IntTools/IntTools_SurfaceRangeSample.hxx @@ -90,6 +90,10 @@ IntTools_SurfaceRangeSample& operator = (const IntTools_SurfaceRangeSample& Othe Standard_Integer GetRangeIndexVDeeper (const Standard_Integer theNbSampleV) const; + bool operator==(const IntTools_SurfaceRangeSample& theOther) const + { + return IsEqual(theOther); + } diff --git a/src/IntTools/IntTools_SurfaceRangeSample.lxx b/src/IntTools/IntTools_SurfaceRangeSample.lxx index b962fe7374..9bbec91d10 100644 --- a/src/IntTools/IntTools_SurfaceRangeSample.lxx +++ b/src/IntTools/IntTools_SurfaceRangeSample.lxx @@ -13,6 +13,8 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. +#include + inline void IntTools_SurfaceRangeSample::SetRanges(const IntTools_CurveRangeSample& theRangeU, const IntTools_CurveRangeSample& theRangeV) { @@ -138,3 +140,18 @@ inline Standard_Integer IntTools_SurfaceRangeSample::GetRangeIndexVDeeper(const { return myRangeV.GetRangeIndexDeeper(theNbSampleV); } + +namespace std +{ + template <> + struct hash + { + size_t operator()(const IntTools_SurfaceRangeSample& theSurfaceRangeSample) const noexcept + { + // Combine two int values into a single hash value. + size_t aCombination[2]{ std::hash{}(theSurfaceRangeSample.GetSampleRangeU()), + std::hash{}(theSurfaceRangeSample.GetSampleRangeV()) }; + return opencascade::hashBytes(aCombination, sizeof(aCombination)); + } + }; +} diff --git a/src/IntTools/IntTools_SurfaceRangeSampleMapHasher.hxx b/src/IntTools/IntTools_SurfaceRangeSampleMapHasher.hxx deleted file mode 100644 index ae8a35bfe9..0000000000 --- a/src/IntTools/IntTools_SurfaceRangeSampleMapHasher.hxx +++ /dev/null @@ -1,49 +0,0 @@ -// Created on: 2005-10-14 -// Created by: Mikhail KLOKOV -// Copyright (c) 2005-2014 OPEN CASCADE SAS -// -// This file is part of Open CASCADE Technology software library. -// -// This library is free software; you can redistribute it and/or modify it under -// the terms of the GNU Lesser General Public License version 2.1 as published -// by the Free Software Foundation, with special exception defined in the file -// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT -// distribution for complete text of the license and disclaimer of any warranty. -// -// Alternatively, this file may be used under the terms of Open CASCADE -// commercial license or contractual agreement. - -#ifndef _IntTools_SurfaceRangeSampleMapHasher_HeaderFile -#define _IntTools_SurfaceRangeSampleMapHasher_HeaderFile - -#include -#include -#include -#include - -class IntTools_SurfaceRangeSampleMapHasher -{ -public: - - DEFINE_STANDARD_ALLOC - - //! Computes a hash code for the given key, in the range [1, theUpperBound] - //! @param theKey the key which hash code is to be computed - //! @param theUpperBound the upper bound of the range a computing hash code must be within - //! @return a computed hash code, in the range [1, theUpperBound] - static Standard_Integer HashCode (const IntTools_SurfaceRangeSample& theKey, Standard_Integer theUpperBound) - { - return ::HashCode (theKey.GetIndexU() * theKey.GetIndexV(), theUpperBound); - } - - //! Returns True when the two keys are the same. Two - //! same keys must have the same hashcode, the - //! contrary is not necessary. - static Standard_Boolean IsEqual (const IntTools_SurfaceRangeSample& S1, const IntTools_SurfaceRangeSample& S2) - { - return S1.IsEqual(S2); - } - -}; - -#endif // _IntTools_SurfaceRangeSampleMapHasher_HeaderFile diff --git a/src/IntWalk/IntWalk_VectorOfInteger.hxx b/src/IntWalk/IntWalk_VectorOfInteger.hxx index 4de3a4dcdf..fc9a6a5289 100755 --- a/src/IntWalk/IntWalk_VectorOfInteger.hxx +++ b/src/IntWalk/IntWalk_VectorOfInteger.hxx @@ -17,11 +17,11 @@ #define IntWalk_VectorOfInteger_HeaderFile #include -#include +#include // Defines a dynamic vector of integer. -typedef std::vector > +typedef std::vector > IntWalk_VectorOfInteger; #endif diff --git a/src/IntWalk/IntWalk_VectorOfWalkingData.hxx b/src/IntWalk/IntWalk_VectorOfWalkingData.hxx index ec973df27e..bcb1a04dcb 100755 --- a/src/IntWalk/IntWalk_VectorOfWalkingData.hxx +++ b/src/IntWalk/IntWalk_VectorOfWalkingData.hxx @@ -17,7 +17,7 @@ #define IntWalk_VectorOfWalkingData_HeaderFile #include -#include +#include // Defines a dynamic vector of work data. @@ -28,7 +28,7 @@ struct IntWalk_WalkingData Standard_Integer etat; }; -typedef std::vector > +typedef std::vector > IntWalk_VectorOfWalkingData; #endif diff --git a/src/Interface/FILES b/src/Interface/FILES index ca32e3abdb..ac3bf215e2 100755 --- a/src/Interface/FILES +++ b/src/Interface/FILES @@ -66,8 +66,6 @@ Interface_JaggedArray.gxx Interface_LineBuffer.cxx Interface_LineBuffer.hxx Interface_Macros.hxx -Interface_MapAsciiStringHasher.cxx -Interface_MapAsciiStringHasher.hxx Interface_MSG.cxx Interface_MSG.hxx Interface_NodeOfGeneralLib.hxx diff --git a/src/Interface/Interface_DataMapOfTransientInteger.hxx b/src/Interface/Interface_DataMapOfTransientInteger.hxx index 3f543997bc..edf7f57fc8 100644 --- a/src/Interface/Interface_DataMapOfTransientInteger.hxx +++ b/src/Interface/Interface_DataMapOfTransientInteger.hxx @@ -19,11 +19,10 @@ #include #include -#include #include -typedef NCollection_DataMap Interface_DataMapOfTransientInteger; -typedef NCollection_DataMap::Iterator Interface_DataMapIteratorOfDataMapOfTransientInteger; +typedef NCollection_DataMap Interface_DataMapOfTransientInteger; +typedef NCollection_DataMap::Iterator Interface_DataMapIteratorOfDataMapOfTransientInteger; #endif diff --git a/src/Interface/Interface_IndexedMapOfAsciiString.hxx b/src/Interface/Interface_IndexedMapOfAsciiString.hxx index af8352569c..3b64b0cc13 100644 --- a/src/Interface/Interface_IndexedMapOfAsciiString.hxx +++ b/src/Interface/Interface_IndexedMapOfAsciiString.hxx @@ -18,10 +18,9 @@ #define Interface_IndexedMapOfAsciiString_HeaderFile #include -#include #include -typedef NCollection_IndexedMap Interface_IndexedMapOfAsciiString; +typedef NCollection_IndexedMap Interface_IndexedMapOfAsciiString; #endif diff --git a/src/Interface/Interface_MapAsciiStringHasher.cxx b/src/Interface/Interface_MapAsciiStringHasher.cxx deleted file mode 100644 index e7a24f319a..0000000000 --- a/src/Interface/Interface_MapAsciiStringHasher.cxx +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (c) 1999-2014 OPEN CASCADE SAS -// -// This file is part of Open CASCADE Technology software library. -// -// This library is free software; you can redistribute it and/or modify it under -// the terms of the GNU Lesser General Public License version 2.1 as published -// by the Free Software Foundation, with special exception defined in the file -// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT -// distribution for complete text of the license and disclaimer of any warranty. -// -// Alternatively, this file may be used under the terms of Open CASCADE -// commercial license or contractual agreement. - - -#include -#include - -//======================================================================= -// function : HashCode -// purpose : -//======================================================================= -Standard_Integer Interface_MapAsciiStringHasher::HashCode (const TCollection_AsciiString& theAsciiString, - const Standard_Integer theUpperBound) -{ - return ::HashCode (theAsciiString.ToCString(), theAsciiString.Length(), theUpperBound); -} - -//======================================================================= -//function : IsEqual -//purpose : -//======================================================================= - -Standard_Boolean Interface_MapAsciiStringHasher::IsEqual(const TCollection_AsciiString& K1, - const TCollection_AsciiString& K2) -{ - if(!K1.Length() || !K2.Length()) return Standard_False; - return K1.IsEqual(K2); -} diff --git a/src/Interface/Interface_MapAsciiStringHasher.hxx b/src/Interface/Interface_MapAsciiStringHasher.hxx deleted file mode 100644 index ee0d52e292..0000000000 --- a/src/Interface/Interface_MapAsciiStringHasher.hxx +++ /dev/null @@ -1,66 +0,0 @@ -// Created on: 2003-05-06 -// Created by: Galina KULIKOVA -// Copyright (c) 2003-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 _Interface_MapAsciiStringHasher_HeaderFile -#define _Interface_MapAsciiStringHasher_HeaderFile - -#include -#include -#include - -#include -class TCollection_AsciiString; - - - -class Interface_MapAsciiStringHasher -{ -public: - - DEFINE_STANDARD_ALLOC - - //! Computes a hash code for the given ASCII string, in the range [1, theUpperBound] - //! @param theAsciiString the ASCII string which hash code is to be computed - //! @param theUpperBound the upper bound of the range a computing hash code must be within - //! @return a computed hash code, in the range [1, theUpperBound] - Standard_EXPORT static Standard_Integer HashCode (const TCollection_AsciiString& theAsciiString, - Standard_Integer theUpperBound); - - Standard_EXPORT static Standard_Boolean IsEqual (const TCollection_AsciiString& K1, const TCollection_AsciiString& K2); - - - - -protected: - - - - - -private: - - - - - -}; - - - - - - - -#endif // _Interface_MapAsciiStringHasher_HeaderFile diff --git a/src/Interface/Interface_Static.cxx b/src/Interface/Interface_Static.cxx index afa597d56e..84082f7ae5 100644 --- a/src/Interface/Interface_Static.cxx +++ b/src/Interface/Interface_Static.cxx @@ -412,7 +412,7 @@ Handle(TColStd_HSequenceOfHAsciiString) Interface_Static::Items // function : FillMap // purpose : Fills given string-to-string map with all static data //======================================================================= -void Interface_Static::FillMap (NCollection_DataMap& theMap) +void Interface_Static::FillMap (NCollection_DataMap& theMap) { theMap.Clear(); diff --git a/src/Interface/Interface_Static.hxx b/src/Interface/Interface_Static.hxx index 7069c5f361..a6de9ce27a 100644 --- a/src/Interface/Interface_Static.hxx +++ b/src/Interface/Interface_Static.hxx @@ -246,7 +246,7 @@ public: Standard_EXPORT static void Standards(); //! Fills given string-to-string map with all static data - Standard_EXPORT static void FillMap(NCollection_DataMap& theMap); + Standard_EXPORT static void FillMap(NCollection_DataMap& theMap); DEFINE_STANDARD_RTTIEXT(Interface_Static,Interface_TypedValue) diff --git a/src/LocOpe/LocOpe_BuildShape.cxx b/src/LocOpe/LocOpe_BuildShape.cxx index 1d0baf9012..9e02f13b1a 100644 --- a/src/LocOpe/LocOpe_BuildShape.cxx +++ b/src/LocOpe/LocOpe_BuildShape.cxx @@ -243,7 +243,7 @@ void LocOpe_BuildShape::Perform(const TopTools_ListOfShape& L) imbSh.UnBind(itdm.Key()); } else { - for (itdm.Reset(); itdm.More(); itdm.Next()) { + for (itdm.Initialize(imbSh); itdm.More(); itdm.Next()) { TopoDS_Solid newSo; B.MakeSolid(newSo); B.Add(newSo,itdm.Key()); diff --git a/src/LocOpe/LocOpe_Generator.cxx b/src/LocOpe/LocOpe_Generator.cxx index b572dd1885..0c242f62eb 100644 --- a/src/LocOpe/LocOpe_Generator.cxx +++ b/src/LocOpe/LocOpe_Generator.cxx @@ -137,7 +137,6 @@ void LocOpe_Generator::Perform(const Handle(LocOpe_GeneratedShape)& G) TopTools_DataMapOfShapeListOfShape theFFMap; TopTools_MapOfShape toRemove; TopTools_MapIteratorOfMapOfShape itm; - TopTools_DataMapIteratorOfDataMapOfShapeListOfShape itf; // recherche des fusions de faces for (itm.Initialize(GEdg); itm.More(); itm.Next()) { @@ -158,7 +157,7 @@ void LocOpe_Generator::Perform(const Handle(LocOpe_GeneratedShape)& G) if (ToFuse(fac,facbis)) { // On recherche si une face a deja fusionne avec facbis Standard_Boolean facbisfound = Standard_False; - for (itf.Initialize(theFFMap); itf.More(); itf.Next()) { + for (TopTools_DataMapIteratorOfDataMapOfShapeListOfShape itf(theFFMap); itf.More(); itf.Next()) { if (itf.Key().IsSame(fac)) { continue; } @@ -204,8 +203,8 @@ void LocOpe_Generator::Perform(const Handle(LocOpe_GeneratedShape)& G) // a fusionner avec une meme face de base // TopTools_DataMapIteratorOfDataMapOfShapeListOfShape itf(theFFMap); - itf.Initialize(theFFMap); - for (; itf.More(); itf.Next()) { + for (TopTools_DataMapIteratorOfDataMapOfShapeListOfShape itf(theFFMap); itf.More(); itf.Next()) + { for (itl.Initialize(itf.Value()); itl.More(); itl.Next()) { for (exp.Init(itl.Value(),TopAbs_EDGE); exp.More(); exp.Next()) { const TopoDS_Edge& ed = TopoDS::Edge(exp.Current()); @@ -234,7 +233,8 @@ void LocOpe_Generator::Perform(const Handle(LocOpe_GeneratedShape)& G) TopTools_DataMapOfShapeShape DontFuse; TopAbs_Orientation orient,orface; - for (itf.Reset(); itf.More(); itf.Next()) { + for (TopTools_DataMapIteratorOfDataMapOfShapeListOfShape itf(theFFMap); itf.More(); itf.Next()) + { const TopoDS_Face& fac = TopoDS::Face(itf.Key()); for (exp.Init(fac,TopAbs_EDGE); exp.More(); exp.Next()) { const TopoDS_Edge& edg = TopoDS::Edge(exp.Current()); @@ -445,7 +445,8 @@ void LocOpe_Generator::Perform(const Handle(LocOpe_GeneratedShape)& G) TopTools_MapOfShape EdgAdded; // Fusion des faces, ou reconstruction - for (itf.Reset();itf.More(); itf.Next()) { + for (TopTools_DataMapIteratorOfDataMapOfShapeListOfShape itf(theFFMap);itf.More(); itf.Next()) + { const TopoDS_Face& fac = TopoDS::Face(itf.Key()); Standard_Boolean ModFace = Standard_False; TopTools_ListOfShape listofedg; diff --git a/src/LocOpe/LocOpe_Pipe.cxx b/src/LocOpe/LocOpe_Pipe.cxx index bd6def2638..9e1613cb00 100644 --- a/src/LocOpe/LocOpe_Pipe.cxx +++ b/src/LocOpe/LocOpe_Pipe.cxx @@ -109,7 +109,7 @@ LocOpe_Pipe::LocOpe_Pipe(const TopoDS_Wire& Spine, } while (MapFac.Extent() >= 2) { - itm.Reset(); + itm = TopTools_MapIteratorOfMapOfShape(MapFac); TopTools_ListOfShape FacFuse; TopoDS_Face FaceRef = TopoDS::Face(itm.Key()); FacFuse.Append(FaceRef); diff --git a/src/LocOpe/LocOpe_SplitDrafts.cxx b/src/LocOpe/LocOpe_SplitDrafts.cxx index edce77fcf6..cf0829b849 100644 --- a/src/LocOpe/LocOpe_SplitDrafts.cxx +++ b/src/LocOpe/LocOpe_SplitDrafts.cxx @@ -1401,7 +1401,7 @@ static void MakeFace(TopoDS_Face& F, // for (TopTools_ListIteratorOfListOfShape itl(ledg); TopTools_ListIteratorOfListOfShape itl(ledg) ; for ( ; itl.More(); itl.Next()) { - TopoDS_Edge& edg = TopoDS::Edge(itl.Value()); + const TopoDS_Edge& edg = TopoDS::Edge(itl.Value()); Handle(Geom2d_Curve) C2d = BRep_Tool::CurveOnSurface(edg,F,f,l); if (C2d.IsNull()) { BRep_Tool::Range(edg,f,l); @@ -1528,7 +1528,7 @@ static void MakeFace(TopoDS_Face& F, GProp_GProps GP; BRepGProp::SurfaceProperties(NewFace,GP); if (GP.Mass() < 0) { - itl.Value().Reverse(); + itl.ChangeValue().Reverse(); } } if (lwires.Extent() == 1) { diff --git a/src/LocOpe/LocOpe_SplitShape.cxx b/src/LocOpe/LocOpe_SplitShape.cxx index 6922896185..72ed0729f5 100644 --- a/src/LocOpe/LocOpe_SplitShape.cxx +++ b/src/LocOpe/LocOpe_SplitShape.cxx @@ -515,7 +515,7 @@ Standard_Boolean LocOpe_SplitShape::Add(const TopTools_ListOfShape& Lwires, const TopoDS_Wire& aHole = TopoDS::Wire(itl.Value()); for (itlNewF.Initialize(NewFaces); itlNewF.More(); itlNewF.Next()) { - TopoDS_Face& aNewFace = TopoDS::Face(itlNewF.Value()); + TopoDS_Face& aNewFace = TopoDS::Face(itlNewF.ChangeValue()); if (IsInside(aNewFace, aHole)) { BB.Add(aNewFace, aHole); diff --git a/src/LocOpe/LocOpe_Spliter.cxx b/src/LocOpe/LocOpe_Spliter.cxx index 5f282ddf65..ee5e5d8811 100644 --- a/src/LocOpe/LocOpe_Spliter.cxx +++ b/src/LocOpe/LocOpe_Spliter.cxx @@ -112,11 +112,11 @@ void LocOpe_Spliter::Perform(const Handle(LocOpe_WiresOnShape)& PW) } theSubs.Build(myShape); - TopTools_DataMapIteratorOfDataMapOfShapeListOfShape itdesc(myMap); if (theSubs.IsCopied(myShape)) { // on n`a fait que des substitutions de vertex. Donc chaque element // est remplace par lui meme ou par un seul element du meme type. - for (; itdesc.More(); itdesc.Next()) { + for (TopTools_DataMapIteratorOfDataMapOfShapeListOfShape itdesc(myMap); itdesc.More(); itdesc.Next()) + { if (theSubs.IsCopied(itdesc.Key())) { const TopTools_ListOfShape& lsub = theSubs.Copy(itdesc.Key()); #ifdef OCCT_DEBUG @@ -193,7 +193,8 @@ void LocOpe_Spliter::Perform(const Handle(LocOpe_WiresOnShape)& PW) // Mise a jour des descendants - for (itdesc.Reset(); itdesc.More(); itdesc.Next()) { + for (TopTools_DataMapIteratorOfDataMapOfShapeListOfShape itdesc(myMap); itdesc.More(); itdesc.Next()) + { const TopoDS_Shape& sori = itdesc.Key(); const TopoDS_Shape& scib = itdesc.Value().First(); myMap(sori) = theCFace.DescendantShapes(scib); @@ -294,7 +295,8 @@ void LocOpe_Spliter::Perform(const Handle(LocOpe_WiresOnShape)& PW) theSubs.Build(myRes); - for (itdesc.Reset(); itdesc.More(); itdesc.Next()) { + for (TopTools_DataMapIteratorOfDataMapOfShapeListOfShape itdesc(myMap); itdesc.More(); itdesc.Next()) + { TopTools_ListOfShape& ldesc = myMap(itdesc.Key()); TopTools_ListOfShape newdesc; for (itl.Initialize(ldesc); itl.More(); itl.Next()) { @@ -471,7 +473,7 @@ void LocOpe_Spliter::Perform(const Handle(LocOpe_WiresOnShape)& PW) } } if (itms.More()) { - const TopoDS_Shape& fac = itms.Key(); + TopoDS_Shape fac = itms.Key(); for (exp.Init(fac,TopAbs_EDGE); exp.More(); exp.Next()) { if (!Mapebord.Add(exp.Current())) { Mapebord.Remove(exp.Current()); diff --git a/src/MAT/MAT_Arc.hxx b/src/MAT/MAT_Arc.hxx index da7558aae1..8725fdfead 100644 --- a/src/MAT/MAT_Arc.hxx +++ b/src/MAT/MAT_Arc.hxx @@ -21,7 +21,6 @@ #include #include -#include #include #include class MAT_BasicElt; diff --git a/src/MAT/MAT_BasicElt.hxx b/src/MAT/MAT_BasicElt.hxx index 63372345c8..37d2980499 100644 --- a/src/MAT/MAT_BasicElt.hxx +++ b/src/MAT/MAT_BasicElt.hxx @@ -20,7 +20,6 @@ #include #include -#include #include #include class MAT_Arc; diff --git a/src/MAT/MAT_DataMapOfIntegerArc.hxx b/src/MAT/MAT_DataMapOfIntegerArc.hxx index b889ac3a5c..343429574e 100644 --- a/src/MAT/MAT_DataMapOfIntegerArc.hxx +++ b/src/MAT/MAT_DataMapOfIntegerArc.hxx @@ -19,11 +19,10 @@ #include #include -#include #include -typedef NCollection_DataMap MAT_DataMapOfIntegerArc; -typedef NCollection_DataMap::Iterator MAT_DataMapIteratorOfDataMapOfIntegerArc; +typedef NCollection_DataMap MAT_DataMapOfIntegerArc; +typedef NCollection_DataMap::Iterator MAT_DataMapIteratorOfDataMapOfIntegerArc; #endif diff --git a/src/MAT/MAT_DataMapOfIntegerBasicElt.hxx b/src/MAT/MAT_DataMapOfIntegerBasicElt.hxx index adc053a0a3..5b8143f847 100644 --- a/src/MAT/MAT_DataMapOfIntegerBasicElt.hxx +++ b/src/MAT/MAT_DataMapOfIntegerBasicElt.hxx @@ -19,11 +19,10 @@ #include #include -#include #include -typedef NCollection_DataMap MAT_DataMapOfIntegerBasicElt; -typedef NCollection_DataMap::Iterator MAT_DataMapIteratorOfDataMapOfIntegerBasicElt; +typedef NCollection_DataMap MAT_DataMapOfIntegerBasicElt; +typedef NCollection_DataMap::Iterator MAT_DataMapIteratorOfDataMapOfIntegerBasicElt; #endif diff --git a/src/MAT/MAT_DataMapOfIntegerBisector.hxx b/src/MAT/MAT_DataMapOfIntegerBisector.hxx index d4d990c439..b2f4dda8a9 100644 --- a/src/MAT/MAT_DataMapOfIntegerBisector.hxx +++ b/src/MAT/MAT_DataMapOfIntegerBisector.hxx @@ -19,11 +19,10 @@ #include #include -#include #include -typedef NCollection_DataMap MAT_DataMapOfIntegerBisector; -typedef NCollection_DataMap::Iterator MAT_DataMapIteratorOfDataMapOfIntegerBisector; +typedef NCollection_DataMap MAT_DataMapOfIntegerBisector; +typedef NCollection_DataMap::Iterator MAT_DataMapIteratorOfDataMapOfIntegerBisector; #endif diff --git a/src/MAT/MAT_DataMapOfIntegerNode.hxx b/src/MAT/MAT_DataMapOfIntegerNode.hxx index 5bfd7d8227..d11a4c14be 100644 --- a/src/MAT/MAT_DataMapOfIntegerNode.hxx +++ b/src/MAT/MAT_DataMapOfIntegerNode.hxx @@ -19,11 +19,10 @@ #include #include -#include #include -typedef NCollection_DataMap MAT_DataMapOfIntegerNode; -typedef NCollection_DataMap::Iterator MAT_DataMapIteratorOfDataMapOfIntegerNode; +typedef NCollection_DataMap MAT_DataMapOfIntegerNode; +typedef NCollection_DataMap::Iterator MAT_DataMapIteratorOfDataMapOfIntegerNode; #endif diff --git a/src/MAT/MAT_Node.hxx b/src/MAT/MAT_Node.hxx index 74527243ef..fc68f7096b 100644 --- a/src/MAT/MAT_Node.hxx +++ b/src/MAT/MAT_Node.hxx @@ -21,7 +21,6 @@ #include #include -#include #include #include #include diff --git a/src/MAT2d/FILES b/src/MAT2d/FILES index b342dfc4d9..531a6d12d8 100644 --- a/src/MAT2d/FILES +++ b/src/MAT2d/FILES @@ -21,8 +21,6 @@ MAT2d_DataMapOfIntegerConnexion.hxx MAT2d_DataMapOfIntegerPnt2d.hxx MAT2d_DataMapOfIntegerSequenceOfConnexion.hxx MAT2d_DataMapOfIntegerVec2d.hxx -MAT2d_MapBiIntHasher.hxx -MAT2d_MapBiIntHasher.lxx MAT2d_Mat2d.cxx MAT2d_Mat2d.hxx MAT2d_MiniPath.cxx diff --git a/src/MAT2d/MAT2d_BiInt.hxx b/src/MAT2d/MAT2d_BiInt.hxx index 9e8d45315e..5f16ec3dfa 100644 --- a/src/MAT2d/MAT2d_BiInt.hxx +++ b/src/MAT2d/MAT2d_BiInt.hxx @@ -22,7 +22,7 @@ #include #include - +#include //! BiInt is a set of two integers. class MAT2d_BiInt @@ -67,6 +67,19 @@ private: }; +namespace std +{ + template <> + struct hash + { + size_t operator()(const MAT2d_BiInt& theBiInt) const noexcept + { + // Combine two int values into a single hash value. + int aCombination[2]{ theBiInt.FirstIndex(), theBiInt.SecondIndex() }; + return opencascade::hashBytes(aCombination, sizeof(aCombination)); + } + }; +} diff --git a/src/MAT2d/MAT2d_DataMapOfBiIntInteger.hxx b/src/MAT2d/MAT2d_DataMapOfBiIntInteger.hxx index e67f52c6d0..30083e4ff9 100644 --- a/src/MAT2d/MAT2d_DataMapOfBiIntInteger.hxx +++ b/src/MAT2d/MAT2d_DataMapOfBiIntInteger.hxx @@ -18,11 +18,11 @@ #define MAT2d_DataMapOfBiIntInteger_HeaderFile #include -#include +#include #include -typedef NCollection_DataMap MAT2d_DataMapOfBiIntInteger; -typedef NCollection_DataMap::Iterator MAT2d_DataMapIteratorOfDataMapOfBiIntInteger; +typedef NCollection_DataMap MAT2d_DataMapOfBiIntInteger; +typedef NCollection_DataMap::Iterator MAT2d_DataMapIteratorOfDataMapOfBiIntInteger; #endif diff --git a/src/MAT2d/MAT2d_DataMapOfBiIntSequenceOfInteger.hxx b/src/MAT2d/MAT2d_DataMapOfBiIntSequenceOfInteger.hxx index a7307fa161..1a4e3f01a4 100644 --- a/src/MAT2d/MAT2d_DataMapOfBiIntSequenceOfInteger.hxx +++ b/src/MAT2d/MAT2d_DataMapOfBiIntSequenceOfInteger.hxx @@ -19,11 +19,10 @@ #include #include -#include #include -typedef NCollection_DataMap MAT2d_DataMapOfBiIntSequenceOfInteger; -typedef NCollection_DataMap::Iterator MAT2d_DataMapIteratorOfDataMapOfBiIntSequenceOfInteger; +typedef NCollection_DataMap MAT2d_DataMapOfBiIntSequenceOfInteger; +typedef NCollection_DataMap::Iterator MAT2d_DataMapIteratorOfDataMapOfBiIntSequenceOfInteger; #endif diff --git a/src/MAT2d/MAT2d_DataMapOfIntegerBisec.hxx b/src/MAT2d/MAT2d_DataMapOfIntegerBisec.hxx index 94df70c206..03ab156262 100644 --- a/src/MAT2d/MAT2d_DataMapOfIntegerBisec.hxx +++ b/src/MAT2d/MAT2d_DataMapOfIntegerBisec.hxx @@ -18,11 +18,10 @@ #define MAT2d_DataMapOfIntegerBisec_HeaderFile #include -#include #include -typedef NCollection_DataMap MAT2d_DataMapOfIntegerBisec; -typedef NCollection_DataMap::Iterator MAT2d_DataMapIteratorOfDataMapOfIntegerBisec; +typedef NCollection_DataMap MAT2d_DataMapOfIntegerBisec; +typedef NCollection_DataMap::Iterator MAT2d_DataMapIteratorOfDataMapOfIntegerBisec; #endif diff --git a/src/MAT2d/MAT2d_DataMapOfIntegerConnexion.hxx b/src/MAT2d/MAT2d_DataMapOfIntegerConnexion.hxx index c45622ab78..8924e2a332 100644 --- a/src/MAT2d/MAT2d_DataMapOfIntegerConnexion.hxx +++ b/src/MAT2d/MAT2d_DataMapOfIntegerConnexion.hxx @@ -19,11 +19,10 @@ #include #include -#include #include -typedef NCollection_DataMap MAT2d_DataMapOfIntegerConnexion; -typedef NCollection_DataMap::Iterator MAT2d_DataMapIteratorOfDataMapOfIntegerConnexion; +typedef NCollection_DataMap MAT2d_DataMapOfIntegerConnexion; +typedef NCollection_DataMap::Iterator MAT2d_DataMapIteratorOfDataMapOfIntegerConnexion; #endif diff --git a/src/MAT2d/MAT2d_DataMapOfIntegerPnt2d.hxx b/src/MAT2d/MAT2d_DataMapOfIntegerPnt2d.hxx index 69f0fe8b30..0ec2bab133 100644 --- a/src/MAT2d/MAT2d_DataMapOfIntegerPnt2d.hxx +++ b/src/MAT2d/MAT2d_DataMapOfIntegerPnt2d.hxx @@ -18,11 +18,10 @@ #define MAT2d_DataMapOfIntegerPnt2d_HeaderFile #include -#include #include -typedef NCollection_DataMap MAT2d_DataMapOfIntegerPnt2d; -typedef NCollection_DataMap::Iterator MAT2d_DataMapIteratorOfDataMapOfIntegerPnt2d; +typedef NCollection_DataMap MAT2d_DataMapOfIntegerPnt2d; +typedef NCollection_DataMap::Iterator MAT2d_DataMapIteratorOfDataMapOfIntegerPnt2d; #endif diff --git a/src/MAT2d/MAT2d_DataMapOfIntegerSequenceOfConnexion.hxx b/src/MAT2d/MAT2d_DataMapOfIntegerSequenceOfConnexion.hxx index 2da50d1d1f..6072e216a4 100644 --- a/src/MAT2d/MAT2d_DataMapOfIntegerSequenceOfConnexion.hxx +++ b/src/MAT2d/MAT2d_DataMapOfIntegerSequenceOfConnexion.hxx @@ -19,11 +19,10 @@ #include #include -#include #include -typedef NCollection_DataMap MAT2d_DataMapOfIntegerSequenceOfConnexion; -typedef NCollection_DataMap::Iterator MAT2d_DataMapIteratorOfDataMapOfIntegerSequenceOfConnexion; +typedef NCollection_DataMap MAT2d_DataMapOfIntegerSequenceOfConnexion; +typedef NCollection_DataMap::Iterator MAT2d_DataMapIteratorOfDataMapOfIntegerSequenceOfConnexion; #endif diff --git a/src/MAT2d/MAT2d_DataMapOfIntegerVec2d.hxx b/src/MAT2d/MAT2d_DataMapOfIntegerVec2d.hxx index 217b08bb69..f26bc01fe4 100644 --- a/src/MAT2d/MAT2d_DataMapOfIntegerVec2d.hxx +++ b/src/MAT2d/MAT2d_DataMapOfIntegerVec2d.hxx @@ -19,11 +19,10 @@ #include #include -#include #include -typedef NCollection_DataMap MAT2d_DataMapOfIntegerVec2d; -typedef NCollection_DataMap::Iterator MAT2d_DataMapIteratorOfDataMapOfIntegerVec2d; +typedef NCollection_DataMap MAT2d_DataMapOfIntegerVec2d; +typedef NCollection_DataMap::Iterator MAT2d_DataMapIteratorOfDataMapOfIntegerVec2d; #endif diff --git a/src/MAT2d/MAT2d_MapBiIntHasher.hxx b/src/MAT2d/MAT2d_MapBiIntHasher.hxx deleted file mode 100644 index 2678b33043..0000000000 --- a/src/MAT2d/MAT2d_MapBiIntHasher.hxx +++ /dev/null @@ -1,66 +0,0 @@ -// Created on: 1993-11-19 -// Created by: Yves FRICAUD -// Copyright (c) 1993-1999 Matra Datavision -// Copyright (c) 1999-2014 OPEN CASCADE SAS -// -// This file is part of Open CASCADE Technology software library. -// -// This library is free software; you can redistribute it and/or modify it under -// the terms of the GNU Lesser General Public License version 2.1 as published -// by the Free Software Foundation, with special exception defined in the file -// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT -// distribution for complete text of the license and disclaimer of any warranty. -// -// Alternatively, this file may be used under the terms of Open CASCADE -// commercial license or contractual agreement. - -#ifndef _MAT2d_MapBiIntHasher_HeaderFile -#define _MAT2d_MapBiIntHasher_HeaderFile - -#include -#include - -#include -class MAT2d_BiInt; - - - -class MAT2d_MapBiIntHasher -{ -public: - - DEFINE_STANDARD_ALLOC - - //! Computes a hash code for the given key, in the range [1, theUpperBound] - //! @param theKey the key which hash code is to be computed - //! @param theUpperBound the upper bound of the range a computing hash code must be within - //! @return a computed hash code, in the range [1, theUpperBound] - static Standard_Integer HashCode (const MAT2d_BiInt& theKey, const Standard_Integer theUpperBound); - - static Standard_Boolean IsEqual (const MAT2d_BiInt& Key1, const MAT2d_BiInt& Key2); - - - - -protected: - - - - - -private: - - - - - -}; - - -#include - - - - - -#endif // _MAT2d_MapBiIntHasher_HeaderFile diff --git a/src/MAT2d/MAT2d_MapBiIntHasher.lxx b/src/MAT2d/MAT2d_MapBiIntHasher.lxx deleted file mode 100644 index 1192c2a393..0000000000 --- a/src/MAT2d/MAT2d_MapBiIntHasher.lxx +++ /dev/null @@ -1,38 +0,0 @@ -// Created on: 1993-11-19 -// Created by: Yves FRICAUD -// Copyright (c) 1993-1999 Matra Datavision -// Copyright (c) 1999-2014 OPEN CASCADE SAS -// -// This file is part of Open CASCADE Technology software library. -// -// This library is free software; you can redistribute it and/or modify it under -// the terms of the GNU Lesser General Public License version 2.1 as published -// by the Free Software Foundation, with special exception defined in the file -// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT -// distribution for complete text of the license and disclaimer of any warranty. -// -// Alternatively, this file may be used under the terms of Open CASCADE -// commercial license or contractual agreement. - -#include -#include - -//======================================================================= -// function : HashCode -// purpose : -//======================================================================= -inline Standard_Integer MAT2d_MapBiIntHasher::HashCode (const MAT2d_BiInt& theKey, const Standard_Integer theUpperBound) -{ - return TColStd_MapIntegerHasher::HashCode (theKey.FirstIndex(), theUpperBound); -} - -//======================================================================= -//function : IsEqual -//purpose : -//======================================================================= -inline Standard_Boolean MAT2d_MapBiIntHasher::IsEqual -(const MAT2d_BiInt& Key1, - const MAT2d_BiInt& Key2) -{ - return (Key1 == Key2); -} diff --git a/src/MeshVS/FILES b/src/MeshVS/FILES index 594baa595b..ee58253915 100755 --- a/src/MeshVS/FILES +++ b/src/MeshVS/FILES @@ -77,8 +77,6 @@ MeshVS_Tool.cxx MeshVS_Tool.hxx MeshVS_TwoColors.cxx MeshVS_TwoColors.hxx -MeshVS_TwoColorsHasher.hxx MeshVS_TwoNodes.hxx -MeshVS_TwoNodesHasher.hxx MeshVS_VectorPrsBuilder.cxx MeshVS_VectorPrsBuilder.hxx diff --git a/src/MeshVS/MeshVS_DataMapOfColorMapOfInteger.hxx b/src/MeshVS/MeshVS_DataMapOfColorMapOfInteger.hxx index 6ae3a5ecd9..cdee765cfa 100644 --- a/src/MeshVS/MeshVS_DataMapOfColorMapOfInteger.hxx +++ b/src/MeshVS/MeshVS_DataMapOfColorMapOfInteger.hxx @@ -16,11 +16,11 @@ #ifndef MeshVS_DataMapOfColorMapOfInteger_HeaderFile #define MeshVS_DataMapOfColorMapOfInteger_HeaderFile -#include +#include #include #include -typedef NCollection_DataMap MeshVS_DataMapOfColorMapOfInteger; -typedef NCollection_DataMap::Iterator MeshVS_DataMapIteratorOfDataMapOfColorMapOfInteger; +typedef NCollection_DataMap MeshVS_DataMapOfColorMapOfInteger; +typedef NCollection_DataMap::Iterator MeshVS_DataMapIteratorOfDataMapOfColorMapOfInteger; #endif diff --git a/src/MeshVS/MeshVS_DataMapOfHArray1OfSequenceOfInteger.hxx b/src/MeshVS/MeshVS_DataMapOfHArray1OfSequenceOfInteger.hxx index 37bfd1d8e3..a82242d2f8 100644 --- a/src/MeshVS/MeshVS_DataMapOfHArray1OfSequenceOfInteger.hxx +++ b/src/MeshVS/MeshVS_DataMapOfHArray1OfSequenceOfInteger.hxx @@ -18,11 +18,10 @@ #include #include -#include #include -typedef NCollection_DataMap MeshVS_DataMapOfHArray1OfSequenceOfInteger; -typedef NCollection_DataMap::Iterator MeshVS_DataMapIteratorOfDataMapOfHArray1OfSequenceOfInteger; +typedef NCollection_DataMap MeshVS_DataMapOfHArray1OfSequenceOfInteger; +typedef NCollection_DataMap::Iterator MeshVS_DataMapIteratorOfDataMapOfHArray1OfSequenceOfInteger; #endif diff --git a/src/MeshVS/MeshVS_DataMapOfIntegerAsciiString.hxx b/src/MeshVS/MeshVS_DataMapOfIntegerAsciiString.hxx index 4bbe220953..24375e365b 100644 --- a/src/MeshVS/MeshVS_DataMapOfIntegerAsciiString.hxx +++ b/src/MeshVS/MeshVS_DataMapOfIntegerAsciiString.hxx @@ -18,11 +18,10 @@ #include #include -#include #include -typedef NCollection_DataMap MeshVS_DataMapOfIntegerAsciiString; -typedef NCollection_DataMap::Iterator MeshVS_DataMapIteratorOfDataMapOfIntegerAsciiString; +typedef NCollection_DataMap MeshVS_DataMapOfIntegerAsciiString; +typedef NCollection_DataMap::Iterator MeshVS_DataMapIteratorOfDataMapOfIntegerAsciiString; #endif diff --git a/src/MeshVS/MeshVS_DataMapOfIntegerBoolean.hxx b/src/MeshVS/MeshVS_DataMapOfIntegerBoolean.hxx index 8a7a4b7cbe..299aa3d163 100644 --- a/src/MeshVS/MeshVS_DataMapOfIntegerBoolean.hxx +++ b/src/MeshVS/MeshVS_DataMapOfIntegerBoolean.hxx @@ -17,11 +17,10 @@ #define MeshVS_DataMapOfIntegerBoolean_HeaderFile #include -#include #include -typedef NCollection_DataMap MeshVS_DataMapOfIntegerBoolean; -typedef NCollection_DataMap::Iterator MeshVS_DataMapIteratorOfDataMapOfIntegerBoolean; +typedef NCollection_DataMap MeshVS_DataMapOfIntegerBoolean; +typedef NCollection_DataMap::Iterator MeshVS_DataMapIteratorOfDataMapOfIntegerBoolean; #endif diff --git a/src/MeshVS/MeshVS_DataMapOfIntegerColor.hxx b/src/MeshVS/MeshVS_DataMapOfIntegerColor.hxx index 9e60b66694..c771b7c563 100644 --- a/src/MeshVS/MeshVS_DataMapOfIntegerColor.hxx +++ b/src/MeshVS/MeshVS_DataMapOfIntegerColor.hxx @@ -18,11 +18,10 @@ #include #include -#include #include -typedef NCollection_DataMap MeshVS_DataMapOfIntegerColor; -typedef NCollection_DataMap::Iterator MeshVS_DataMapIteratorOfDataMapOfIntegerColor; +typedef NCollection_DataMap MeshVS_DataMapOfIntegerColor; +typedef NCollection_DataMap::Iterator MeshVS_DataMapIteratorOfDataMapOfIntegerColor; #endif diff --git a/src/MeshVS/MeshVS_DataMapOfIntegerMaterial.hxx b/src/MeshVS/MeshVS_DataMapOfIntegerMaterial.hxx index 207d05441a..e5c73d25a5 100644 --- a/src/MeshVS/MeshVS_DataMapOfIntegerMaterial.hxx +++ b/src/MeshVS/MeshVS_DataMapOfIntegerMaterial.hxx @@ -18,11 +18,10 @@ #include #include -#include #include -typedef NCollection_DataMap MeshVS_DataMapOfIntegerMaterial; -typedef NCollection_DataMap::Iterator MeshVS_DataMapIteratorOfDataMapOfIntegerMaterial; +typedef NCollection_DataMap MeshVS_DataMapOfIntegerMaterial; +typedef NCollection_DataMap::Iterator MeshVS_DataMapIteratorOfDataMapOfIntegerMaterial; #endif diff --git a/src/MeshVS/MeshVS_DataMapOfIntegerMeshEntityOwner.hxx b/src/MeshVS/MeshVS_DataMapOfIntegerMeshEntityOwner.hxx index 000fe8ac0c..a48dce07ba 100644 --- a/src/MeshVS/MeshVS_DataMapOfIntegerMeshEntityOwner.hxx +++ b/src/MeshVS/MeshVS_DataMapOfIntegerMeshEntityOwner.hxx @@ -18,11 +18,10 @@ #include #include -#include #include -typedef NCollection_DataMap MeshVS_DataMapOfIntegerMeshEntityOwner; -typedef NCollection_DataMap::Iterator MeshVS_DataMapIteratorOfDataMapOfIntegerMeshEntityOwner; +typedef NCollection_DataMap MeshVS_DataMapOfIntegerMeshEntityOwner; +typedef NCollection_DataMap::Iterator MeshVS_DataMapIteratorOfDataMapOfIntegerMeshEntityOwner; #endif diff --git a/src/MeshVS/MeshVS_DataMapOfIntegerOwner.hxx b/src/MeshVS/MeshVS_DataMapOfIntegerOwner.hxx index a43a7a50d5..f344dd2633 100644 --- a/src/MeshVS/MeshVS_DataMapOfIntegerOwner.hxx +++ b/src/MeshVS/MeshVS_DataMapOfIntegerOwner.hxx @@ -18,11 +18,10 @@ #include #include -#include #include -typedef NCollection_DataMap MeshVS_DataMapOfIntegerOwner; -typedef NCollection_DataMap::Iterator MeshVS_DataMapIteratorOfDataMapOfIntegerOwner; +typedef NCollection_DataMap MeshVS_DataMapOfIntegerOwner; +typedef NCollection_DataMap::Iterator MeshVS_DataMapIteratorOfDataMapOfIntegerOwner; #endif diff --git a/src/MeshVS/MeshVS_DataMapOfIntegerTwoColors.hxx b/src/MeshVS/MeshVS_DataMapOfIntegerTwoColors.hxx index b634e8393d..bc5cdd318d 100644 --- a/src/MeshVS/MeshVS_DataMapOfIntegerTwoColors.hxx +++ b/src/MeshVS/MeshVS_DataMapOfIntegerTwoColors.hxx @@ -18,11 +18,10 @@ #include #include -#include #include -typedef NCollection_DataMap MeshVS_DataMapOfIntegerTwoColors; -typedef NCollection_DataMap::Iterator MeshVS_DataMapIteratorOfDataMapOfIntegerTwoColors; +typedef NCollection_DataMap MeshVS_DataMapOfIntegerTwoColors; +typedef NCollection_DataMap::Iterator MeshVS_DataMapIteratorOfDataMapOfIntegerTwoColors; #endif diff --git a/src/MeshVS/MeshVS_DataMapOfIntegerVector.hxx b/src/MeshVS/MeshVS_DataMapOfIntegerVector.hxx index 0478b4dc91..34bd103854 100644 --- a/src/MeshVS/MeshVS_DataMapOfIntegerVector.hxx +++ b/src/MeshVS/MeshVS_DataMapOfIntegerVector.hxx @@ -18,11 +18,10 @@ #include #include -#include #include -typedef NCollection_DataMap MeshVS_DataMapOfIntegerVector; -typedef NCollection_DataMap::Iterator MeshVS_DataMapIteratorOfDataMapOfIntegerVector; +typedef NCollection_DataMap MeshVS_DataMapOfIntegerVector; +typedef NCollection_DataMap::Iterator MeshVS_DataMapIteratorOfDataMapOfIntegerVector; #endif diff --git a/src/MeshVS/MeshVS_DataMapOfTwoColorsMapOfInteger.hxx b/src/MeshVS/MeshVS_DataMapOfTwoColorsMapOfInteger.hxx index 1f0a426f60..0206ce1dba 100644 --- a/src/MeshVS/MeshVS_DataMapOfTwoColorsMapOfInteger.hxx +++ b/src/MeshVS/MeshVS_DataMapOfTwoColorsMapOfInteger.hxx @@ -16,12 +16,12 @@ #ifndef MeshVS_DataMapOfTwoColorsMapOfInteger_HeaderFile #define MeshVS_DataMapOfTwoColorsMapOfInteger_HeaderFile +#include #include -#include #include -typedef NCollection_DataMap MeshVS_DataMapOfTwoColorsMapOfInteger; -typedef NCollection_DataMap::Iterator MeshVS_DataMapIteratorOfDataMapOfTwoColorsMapOfInteger; +typedef NCollection_DataMap MeshVS_DataMapOfTwoColorsMapOfInteger; +typedef NCollection_DataMap::Iterator MeshVS_DataMapIteratorOfDataMapOfTwoColorsMapOfInteger; #endif diff --git a/src/MeshVS/MeshVS_DataSource.hxx b/src/MeshVS/MeshVS_DataSource.hxx index 7e9828e5e3..8c877c639e 100644 --- a/src/MeshVS/MeshVS_DataSource.hxx +++ b/src/MeshVS/MeshVS_DataSource.hxx @@ -23,7 +23,6 @@ #include #include #include -#include #include #include #include diff --git a/src/MeshVS/MeshVS_DeformedDataSource.hxx b/src/MeshVS/MeshVS_DeformedDataSource.hxx index f0c04c93c2..0d7549d39d 100644 --- a/src/MeshVS/MeshVS_DeformedDataSource.hxx +++ b/src/MeshVS/MeshVS_DeformedDataSource.hxx @@ -25,7 +25,6 @@ #include #include #include -#include #include class gp_Vec; diff --git a/src/MeshVS/MeshVS_ElementalColorPrsBuilder.cxx b/src/MeshVS/MeshVS_ElementalColorPrsBuilder.cxx index 27cad1e550..b5aa0ed895 100644 --- a/src/MeshVS/MeshVS_ElementalColorPrsBuilder.cxx +++ b/src/MeshVS/MeshVS_ElementalColorPrsBuilder.cxx @@ -151,7 +151,7 @@ void MeshVS_ElementalColorPrsBuilder::Build ( const Handle(Prs3d_Presentation)& Standard_Boolean IsExist = Standard_False; for ( MeshVS_DataMapIteratorOfDataMapOfTwoColorsMapOfInteger anIterC2 ( aTwoColorsOfElements ); anIterC2.More() && !IsExist; anIterC2.Next () ) - if ( IsEqual ( anIterC2.Key(), anIterM2.Value() ) ) + if ( anIterC2.Key() == anIterM2.Value() ) { TColStd_MapOfInteger& aChangeValue = (TColStd_MapOfInteger&) anIterC2.Value(); aChangeValue.Add ( aMKey ); diff --git a/src/MeshVS/MeshVS_MapOfTwoNodes.hxx b/src/MeshVS/MeshVS_MapOfTwoNodes.hxx index c22e349bdf..e9a5b77090 100644 --- a/src/MeshVS/MeshVS_MapOfTwoNodes.hxx +++ b/src/MeshVS/MeshVS_MapOfTwoNodes.hxx @@ -16,11 +16,11 @@ #ifndef MeshVS_MapOfTwoNodes_HeaderFile #define MeshVS_MapOfTwoNodes_HeaderFile -#include +#include #include -typedef NCollection_Map MeshVS_MapOfTwoNodes; -typedef NCollection_Map::Iterator MeshVS_MapIteratorOfMapOfTwoNodes; +typedef NCollection_Map MeshVS_MapOfTwoNodes; +typedef NCollection_Map::Iterator MeshVS_MapIteratorOfMapOfTwoNodes; #endif diff --git a/src/MeshVS/MeshVS_SymmetricPairHasher.hxx b/src/MeshVS/MeshVS_SymmetricPairHasher.hxx index 3b3435b916..5058997a8b 100644 --- a/src/MeshVS/MeshVS_SymmetricPairHasher.hxx +++ b/src/MeshVS/MeshVS_SymmetricPairHasher.hxx @@ -15,25 +15,31 @@ #define _MeshVS_SymmetricPairHasher_HeaderFile #include +#include typedef std::pair MeshVS_NodePair; //! Provides symmetric hash methods pair of integers. struct MeshVS_SymmetricPairHasher { - //! Computes a hash code for the node pair, in the range [1, theUpperBound] + //! Computes a hash code for the node pair //! @param theNodePair the node pair which hash code is to be computed - //! @param theUpperBound the upper bound of the range a computing hash code must be within - //! @return a computed hash code, in the range [1, theUpperBound] - static Standard_Integer HashCode (const MeshVS_NodePair& theNodePair, const Standard_Integer theUpperBound) + //! @return a computed hash code + size_t operator()(const MeshVS_NodePair& theNodePair) const noexcept { - return ::HashCode(theNodePair.first + theNodePair.second, theUpperBound); + // Combine two int values into a single hash value. + int aCombination[2]{ theNodePair.first, theNodePair.second }; + if (aCombination[0] > aCombination[1]) + { + std::swap(aCombination[0], aCombination[1]); + } + return opencascade::hashBytes(aCombination, sizeof(aCombination)); } - static Standard_Boolean IsEqual (const MeshVS_NodePair& thePair1, const MeshVS_NodePair& thePair2) + bool operator()(const MeshVS_NodePair& thePair1, const MeshVS_NodePair& thePair2) const noexcept { return (thePair1.first == thePair2.first && thePair1.second == thePair2.second) - || (thePair1.first == thePair2.second && thePair1.second == thePair2.first); + || (thePair1.first == thePair2.second && thePair1.second == thePair2.first); } }; diff --git a/src/MeshVS/MeshVS_TwoColors.cxx b/src/MeshVS/MeshVS_TwoColors.cxx index ae37617848..ae80b15fd9 100644 --- a/src/MeshVS/MeshVS_TwoColors.cxx +++ b/src/MeshVS/MeshVS_TwoColors.cxx @@ -15,55 +15,6 @@ #include - -//================================================================ -// function : HashCode -// purpose : -//================================================================ -Standard_Integer HashCode (const MeshVS_TwoColors& theKey, const Standard_Integer theUpperBound) -{ -#define MESHPRS_HASH_BYTE(val) { \ - aHash += (val); \ - aHash += (aHash << 10); \ - aHash ^= (aHash >> 6); \ - } - unsigned int aHash = 0; - MESHPRS_HASH_BYTE (theKey.r1) - MESHPRS_HASH_BYTE (theKey.g1) - MESHPRS_HASH_BYTE (theKey.b1) - MESHPRS_HASH_BYTE (theKey.r2) - MESHPRS_HASH_BYTE (theKey.g2) - MESHPRS_HASH_BYTE (theKey.b2) - aHash += (aHash << 3); - aHash ^= (aHash >> 11); - aHash += (aHash << 15); - return HashCode(aHash, theUpperBound); -#undef MESHPRS_HASH_BYTE -} - -//================================================================ -// Function : IsEqual -// Purpose : -//================================================================ -Standard_Boolean IsEqual (const MeshVS_TwoColors& K1, - const MeshVS_TwoColors& K2) -{ - return (((K1.r1 * 256 + K1.g1) * 256 + K1.b1) == - ((K2.r1 * 256 + K2.g1) * 256 + K2.b1) && - ((K1.r2 * 256 + K1.g2) * 256 + K1.b2) == - ((K2.r2 * 256 + K2.g2) * 256 + K2.b2)); -} - -//================================================================ -// Function : operator == -// Purpose : -//================================================================ -Standard_Boolean operator== ( const MeshVS_TwoColors& K1, - const MeshVS_TwoColors& K2 ) -{ - return IsEqual ( K1, K2 ); -} - //================================================================ // Function : BindTwoColors // Purpose : diff --git a/src/MeshVS/MeshVS_TwoColors.hxx b/src/MeshVS/MeshVS_TwoColors.hxx index 8dfa4e067e..1ec5a0af0c 100644 --- a/src/MeshVS/MeshVS_TwoColors.hxx +++ b/src/MeshVS/MeshVS_TwoColors.hxx @@ -18,27 +18,50 @@ #include -typedef struct { +struct MeshVS_TwoColors +{ unsigned int r1 : 8; unsigned int g1 : 8; unsigned int b1 : 8; unsigned int r2 : 8; unsigned int g2 : 8; unsigned int b2 : 8; -} MeshVS_TwoColors; + bool operator==(const MeshVS_TwoColors& TwoColors) const + { + return (((r1 * 256 + g1) * 256 + b1) == + ((TwoColors.r1 * 256 + TwoColors.g1) * 256 + TwoColors.b1) && + ((r2 * 256 + g2) * 256 + b2) == + ((TwoColors.r2 * 256 + TwoColors.g2) * 256 + TwoColors.b2)); + } +}; -//! Computes a hash code for the key, in the range [1, theUpperBound] -//! @param theKey the key which hash code is to be computed -//! @param theUpperBound the upper bound of the range a computing hash code must be within -//! @return a computed hash code, in the range [1, theUpperBound] -Standard_EXPORT Standard_Integer HashCode (const MeshVS_TwoColors& theKey, Standard_Integer theUpperBound); +namespace std +{ + template<> + struct hash + { + size_t operator()(const MeshVS_TwoColors& TwoColors) const noexcept + { + unsigned int aHash = 0; + meshprsHashByte(aHash, TwoColors.r1); + meshprsHashByte(aHash, TwoColors.g1); + meshprsHashByte(aHash, TwoColors.b1); + meshprsHashByte(aHash, TwoColors.r2); + meshprsHashByte(aHash, TwoColors.g2); + meshprsHashByte(aHash, TwoColors.b2); + return std::hash{}(aHash); + } + private: + void meshprsHashByte(unsigned int& theHash, const unsigned int theValues) const noexcept + { + theHash += (theValues); + theHash += (theHash << 10); + theHash ^= (theHash >> 6); + } -Standard_EXPORT Standard_Boolean IsEqual (const MeshVS_TwoColors& K1, - const MeshVS_TwoColors& K2 ); - -Standard_EXPORT Standard_Boolean operator== ( const MeshVS_TwoColors& K1, - const MeshVS_TwoColors& K2 ); + }; +} Standard_EXPORT MeshVS_TwoColors BindTwoColors ( const Quantity_Color&, const Quantity_Color& ); Standard_EXPORT Quantity_Color ExtractColor ( MeshVS_TwoColors&, const Standard_Integer ); diff --git a/src/MeshVS/MeshVS_TwoColorsHasher.hxx b/src/MeshVS/MeshVS_TwoColorsHasher.hxx deleted file mode 100644 index 32f527e143..0000000000 --- a/src/MeshVS/MeshVS_TwoColorsHasher.hxx +++ /dev/null @@ -1,25 +0,0 @@ -// Created on: 2003-10-10 -// Created by: Alexander SOLOVYOV -// Copyright (c) 2003-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 MeshVS_TwoColorsHasher_HeaderFile -#define MeshVS_TwoColorsHasher_HeaderFile - -#include -#include - -typedef NCollection_DefaultHasher MeshVS_TwoColorsHasher; - - -#endif diff --git a/src/MeshVS/MeshVS_TwoNodes.hxx b/src/MeshVS/MeshVS_TwoNodes.hxx index d581d901f3..b838459ea3 100644 --- a/src/MeshVS/MeshVS_TwoNodes.hxx +++ b/src/MeshVS/MeshVS_TwoNodes.hxx @@ -14,12 +14,9 @@ #ifndef MeshVS_TwoNodes_HeaderFile #define MeshVS_TwoNodes_HeaderFile -#ifndef _Standard_HeaderFile #include -#endif -#ifndef _Standard_Macro_HeaderFile #include -#endif +#include //! Structure containing two IDs (of nodes) for using as a key in a map //! (as representation of a mesh link) @@ -30,29 +27,30 @@ struct MeshVS_TwoNodes MeshVS_TwoNodes (Standard_Integer aFirst=0, Standard_Integer aSecond=0) : First(aFirst), Second(aSecond) {} -}; -//! Computes a hash code for two nodes, in the range [1, theUpperBound] -//! @param theTwoNodes the object of structure containing two IDs which hash code is to be computed -//! @param theUpperBound the upper bound of the range a computing hash code must be within -//! @return a computed hash code, in the range [1, theUpperBound] -inline Standard_Integer HashCode (const MeshVS_TwoNodes& theTwoNodes, const Standard_Integer theUpperBound) -{ - // symmetrical with respect to theTwoNodes.First and theTwoNodes.Second - const Standard_Integer aKey = theTwoNodes.First + theTwoNodes.Second; - return HashCode (aKey, theUpperBound); -} - -//================================================================ -// Function : operator == -// Purpose : -//================================================================ + bool operator==(const MeshVS_TwoNodes& theTwoNode) const + { + return ((First == theTwoNode.First) && (Second == theTwoNode.Second)) || + ((First == theTwoNode.Second) && (Second == theTwoNode.First)); + } +}; -inline Standard_Boolean operator==( const MeshVS_TwoNodes& obj1, - const MeshVS_TwoNodes& obj2 ) +namespace std { - return ( ( obj1.First == obj2.First ) && ( obj1.Second == obj2.Second ) ) || - ( ( obj1.First == obj2.Second ) && ( obj1.Second == obj2.First ) ); + template<> + struct hash + { + size_t operator()(const MeshVS_TwoNodes& theTwoNodes) const noexcept + { + // Combine two int values into a single hash value. + int aCombination[2]{ theTwoNodes.First, theTwoNodes.Second }; + if (aCombination[0] > aCombination[1]) + { + std::swap(aCombination[0], aCombination[1]); + } + return opencascade::hashBytes(aCombination, sizeof(aCombination)); + } + }; } #endif diff --git a/src/MeshVS/MeshVS_TwoNodesHasher.hxx b/src/MeshVS/MeshVS_TwoNodesHasher.hxx deleted file mode 100644 index 3a92e5486c..0000000000 --- a/src/MeshVS/MeshVS_TwoNodesHasher.hxx +++ /dev/null @@ -1,25 +0,0 @@ -// Created on: 2003-10-10 -// Created by: Alexander SOLOVYOV -// Copyright (c) 2003-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 MeshVS_TwoNodesHasher_HeaderFile -#define MeshVS_TwoNodesHasher_HeaderFile - -#include -#include - -typedef NCollection_DefaultHasher MeshVS_TwoNodesHasher; - - -#endif diff --git a/src/Message/Message_Attribute.hxx b/src/Message/Message_Attribute.hxx index e1c2aaaf80..7433654763 100644 --- a/src/Message/Message_Attribute.hxx +++ b/src/Message/Message_Attribute.hxx @@ -15,6 +15,7 @@ #define _Message_Attribute_HeaderFile #include +#include #include DEFINE_STANDARD_HANDLE(Message_Attribute, Standard_Transient) diff --git a/src/Message/Message_AttributeMeter.cxx b/src/Message/Message_AttributeMeter.cxx index e50976c910..d6be5057ef 100644 --- a/src/Message/Message_AttributeMeter.cxx +++ b/src/Message/Message_AttributeMeter.cxx @@ -253,6 +253,6 @@ void Message_AttributeMeter::DumpJson (Standard_OStream& theOStream, anIterator.More(); anIterator.Next()) { OCCT_DUMP_VECTOR_CLASS (theOStream, Message::MetricToString (anIterator.Key()), - 2, anIterator.Value().first, anIterator.Value().second) + 2, anIterator.Value(), anIterator.Value()) } } diff --git a/src/Message/Message_AttributeObject.hxx b/src/Message/Message_AttributeObject.hxx index 86c94b6e41..dbb185be1c 100644 --- a/src/Message/Message_AttributeObject.hxx +++ b/src/Message/Message_AttributeObject.hxx @@ -15,6 +15,7 @@ #define _Message_AttributeObject_HeaderFile #include +#include //! Alert object storing a transient object diff --git a/src/Message/Message_PrinterOStream.hxx b/src/Message/Message_PrinterOStream.hxx index fe69d4ff86..2579d1e21d 100644 --- a/src/Message/Message_PrinterOStream.hxx +++ b/src/Message/Message_PrinterOStream.hxx @@ -18,7 +18,6 @@ #include #include -#include #include class Message_PrinterOStream; diff --git a/src/Message/Message_PrinterToReport.hxx b/src/Message/Message_PrinterToReport.hxx index eb05a60638..9722cfee83 100644 --- a/src/Message/Message_PrinterToReport.hxx +++ b/src/Message/Message_PrinterToReport.hxx @@ -15,7 +15,6 @@ #define _Message_PrinterToReport_HeaderFile #include -#include #include class Message_Report; diff --git a/src/Message/Message_ProgressScope.hxx b/src/Message/Message_ProgressScope.hxx index 1041f401d1..f1167bf0a6 100644 --- a/src/Message/Message_ProgressScope.hxx +++ b/src/Message/Message_ProgressScope.hxx @@ -271,7 +271,7 @@ public: //! @name Preparation methods if (!theName.IsEmpty()) { myIsOwnName = true; - myName = (char* )Standard::Allocate (Standard_Size(theName.Length()) + Standard_Size(1)); + myName = (char* )Standard::AllocateOptimal(Standard_Size(theName.Length()) + Standard_Size(1)); char* aName = (char* )myName; memcpy (aName, theName.ToCString(), theName.Length()); aName[theName.Length()] = '\0'; diff --git a/src/MoniTool/FILES b/src/MoniTool/FILES index 8e1579ecf9..c11833f9c0 100755 --- a/src/MoniTool/FILES +++ b/src/MoniTool/FILES @@ -10,16 +10,11 @@ MoniTool_DataMapOfShapeTransient.hxx MoniTool_DataMapOfTimer.hxx MoniTool_Element.cxx MoniTool_Element.hxx -MoniTool_ElemHasher.cxx -MoniTool_ElemHasher.hxx MoniTool_HSequenceOfElement.hxx MoniTool_IndexedDataMapOfShapeTransient.hxx MoniTool_IntVal.cxx MoniTool_IntVal.hxx MoniTool_Macros.hxx -MoniTool_MTHasher.cxx -MoniTool_MTHasher.hxx -MoniTool_MTHasher.lxx MoniTool_RealVal.cxx MoniTool_RealVal.hxx MoniTool_SequenceOfElement.hxx diff --git a/src/MoniTool/MoniTool_DataMapOfTimer.hxx b/src/MoniTool/MoniTool_DataMapOfTimer.hxx index 5d246c2b44..7c407a03ac 100644 --- a/src/MoniTool/MoniTool_DataMapOfTimer.hxx +++ b/src/MoniTool/MoniTool_DataMapOfTimer.hxx @@ -18,12 +18,12 @@ #define MoniTool_DataMapOfTimer_HeaderFile #include -#include +#include #include class MoniTool_Timer; -typedef NCollection_DataMap MoniTool_DataMapOfTimer; -typedef NCollection_DataMap::Iterator MoniTool_DataMapIteratorOfDataMapOfTimer; +typedef NCollection_DataMap MoniTool_DataMapOfTimer; +typedef NCollection_DataMap::Iterator MoniTool_DataMapIteratorOfDataMapOfTimer; #endif diff --git a/src/MoniTool/MoniTool_ElemHasher.cxx b/src/MoniTool/MoniTool_ElemHasher.cxx deleted file mode 100644 index fa203e6d76..0000000000 --- a/src/MoniTool/MoniTool_ElemHasher.cxx +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) 1999-2014 OPEN CASCADE SAS -// -// This file is part of Open CASCADE Technology software library. -// -// This library is free software; you can redistribute it and/or modify it under -// the terms of the GNU Lesser General Public License version 2.1 as published -// by the Free Software Foundation, with special exception defined in the file -// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT -// distribution for complete text of the license and disclaimer of any warranty. -// -// Alternatively, this file may be used under the terms of Open CASCADE -// commercial license or contractual agreement. - - -#include -#include - -//============================================================================ -// function : HashCode -// purpose : -//============================================================================ -Standard_Integer MoniTool_ElemHasher::HashCode (const Handle (MoniTool_Element) & theElement, - const Standard_Integer theUpperBound) -{ - return ::HashCode(theElement->GetHashCode() - 1, theUpperBound); -} - - Standard_Boolean MoniTool_ElemHasher::IsEqual - (const Handle(MoniTool_Element)& K1, const Handle(MoniTool_Element)& K2) -{ - if (K1.IsNull()) return Standard_False; - return K1->Equates(K2); -} diff --git a/src/MoniTool/MoniTool_ElemHasher.hxx b/src/MoniTool/MoniTool_ElemHasher.hxx deleted file mode 100644 index 694533ce77..0000000000 --- a/src/MoniTool/MoniTool_ElemHasher.hxx +++ /dev/null @@ -1,76 +0,0 @@ -// Created on: 1994-11-04 -// Created by: Christian CAILLET -// 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 _MoniTool_ElemHasher_HeaderFile -#define _MoniTool_ElemHasher_HeaderFile - -#include -#include -#include - -#include -class MoniTool_Element; - - -//! ElemHasher defines HashCode for Element, which is : ask a -//! Element its HashCode ! Because this is the Element itself -//! which brings the HashCode for its Key -//! -//! This class complies to the template given in TCollection by -//! MapHasher itself -class MoniTool_ElemHasher -{ -public: - - DEFINE_STANDARD_ALLOC - - //! Returns hash code for the given element, in the range [1, theUpperBound]. - //! Asks theElement its HashCode, then transforms it to be in the required range. - //! @param theElement the element which hash code is to be computed - //! @param theUpperBound the upper bound of the range a computing hash code must be within - //! @return a computed hash code, in the range [1, theUpperBound] - Standard_EXPORT static Standard_Integer HashCode (const Handle (MoniTool_Element) & theElement, - Standard_Integer theUpperBound); - - //! Returns True if two keys are the same. - //! The test does not work on the Elements themselves but by - //! calling their methods Equates - Standard_EXPORT static Standard_Boolean IsEqual (const Handle(MoniTool_Element)& K1, const Handle(MoniTool_Element)& K2); - - - - -protected: - - - - - -private: - - - - - -}; - - - - - - - -#endif // _MoniTool_ElemHasher_HeaderFile diff --git a/src/MoniTool/MoniTool_Element.cxx b/src/MoniTool/MoniTool_Element.cxx index 12f09f0a21..1f14ed09be 100644 --- a/src/MoniTool/MoniTool_Element.cxx +++ b/src/MoniTool/MoniTool_Element.cxx @@ -18,14 +18,14 @@ IMPLEMENT_STANDARD_RTTIEXT(MoniTool_Element,Standard_Transient) MoniTool_Element::MoniTool_Element() -: thecode(-1) +: thecode(0) { } -void MoniTool_Element::SetHashCode (const Standard_Integer code) +void MoniTool_Element::SetHashCode (const size_t code) { thecode = code; } - Standard_Integer MoniTool_Element::GetHashCode () const + size_t MoniTool_Element::GetHashCode () const { return thecode; } Handle(Standard_Type) MoniTool_Element::ValueType () const diff --git a/src/MoniTool/MoniTool_Element.hxx b/src/MoniTool/MoniTool_Element.hxx index d24b134c07..77d34402b8 100644 --- a/src/MoniTool/MoniTool_Element.hxx +++ b/src/MoniTool/MoniTool_Element.hxx @@ -45,7 +45,7 @@ public: //! Returns the HashCode which has been stored by SetHashCode //! (remark that HashCode could be deferred then be defined by //! sub-classes, the result is the same) - Standard_EXPORT Standard_Integer GetHashCode() const; + Standard_EXPORT size_t GetHashCode() const; //! Specific testof equality : to be defined by each sub-class, //! must be False if Elements have not the same true Type, else @@ -76,14 +76,14 @@ protected: //! Stores the HashCode which corresponds to the Value given to //! create the Mapper - Standard_EXPORT void SetHashCode (const Standard_Integer code); + Standard_EXPORT void SetHashCode (const size_t code); private: - Standard_Integer thecode; + size_t thecode; MoniTool_AttrList theattrib; diff --git a/src/MoniTool/MoniTool_MTHasher.cxx b/src/MoniTool/MoniTool_MTHasher.cxx deleted file mode 100644 index 104769eae8..0000000000 --- a/src/MoniTool/MoniTool_MTHasher.cxx +++ /dev/null @@ -1,14 +0,0 @@ -// Created on: 2001-12-19 -// Created by: Sergey KUUL -// Copyright (c) 2001-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. diff --git a/src/MoniTool/MoniTool_MTHasher.hxx b/src/MoniTool/MoniTool_MTHasher.hxx deleted file mode 100644 index b314702784..0000000000 --- a/src/MoniTool/MoniTool_MTHasher.hxx +++ /dev/null @@ -1,70 +0,0 @@ -// Created on: 2001-12-19 -// Created by: Sergey KUUL -// Copyright (c) 2001-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 _MoniTool_MTHasher_HeaderFile -#define _MoniTool_MTHasher_HeaderFile - -#include -#include -#include - -#include - - - -//! The auxiliary class provides hash code for mapping objects -class MoniTool_MTHasher -{ -public: - - DEFINE_STANDARD_ALLOC - - //! Returns hash code for the given string, in the range [1, theUpperBound] - //! @param theString the string which hash code is to be computed - //! @param theUpperBound the upper bound of the range a computing hash code must be within - //! @return a computed hash code, in the range [1, theUpperBound] - static Standard_Integer HashCode (Standard_CString theString, Standard_Integer theUpperBound); - - //! Returns True when the two CString are the same. Two - //! same strings must have the same hashcode, the - //! contrary is not necessary. - //! Default Str1 == Str2 - static Standard_Boolean IsEqual (const Standard_CString Str1, const Standard_CString Str2); - - - - -protected: - - - - - -private: - - - - - -}; - - -#include - - - - - -#endif // _MoniTool_MTHasher_HeaderFile diff --git a/src/MoniTool/MoniTool_MTHasher.lxx b/src/MoniTool/MoniTool_MTHasher.lxx deleted file mode 100644 index a39f1c6d9f..0000000000 --- a/src/MoniTool/MoniTool_MTHasher.lxx +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) 1999-2014 OPEN CASCADE SAS -// -// This file is part of Open CASCADE Technology software library. -// -// This library is free software; you can redistribute it and/or modify it under -// the terms of the GNU Lesser General Public License version 2.1 as published -// by the Free Software Foundation, with special exception defined in the file -// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT -// distribution for complete text of the license and disclaimer of any warranty. -// -// Alternatively, this file may be used under the terms of Open CASCADE -// commercial license or contractual agreement. - -#include - -//======================================================================= -// function : HashCode -// purpose : -//======================================================================= -inline Standard_Integer MoniTool_MTHasher::HashCode (const Standard_CString theString, - const Standard_Integer theUpperBound) -{ - return ::HashCode (theString, theUpperBound); -} - -//======================================================================= -//function : IsEqual -//purpose : -//======================================================================= - -inline Standard_Boolean MoniTool_MTHasher::IsEqual(const Standard_CString Str1, - const Standard_CString Str2) -{ - return ! strcmp(Str1,Str2); -} - - diff --git a/src/MoniTool/MoniTool_TransientElem.cxx b/src/MoniTool/MoniTool_TransientElem.cxx index 57da02ce08..20aeadee41 100644 --- a/src/MoniTool/MoniTool_TransientElem.cxx +++ b/src/MoniTool/MoniTool_TransientElem.cxx @@ -17,13 +17,12 @@ #include #include #include -#include IMPLEMENT_STANDARD_RTTIEXT(MoniTool_TransientElem,MoniTool_Element) MoniTool_TransientElem::MoniTool_TransientElem (const Handle(Standard_Transient)& akey) : theval (akey) -{ SetHashCode ( TColStd_MapTransientHasher::HashCode (akey, IntegerLast() ) ); } +{ SetHashCode ( std::hash{}(akey)); } const Handle(Standard_Transient)& MoniTool_TransientElem::Value () const @@ -37,7 +36,7 @@ MoniTool_TransientElem::MoniTool_TransientElem (const Handle(Standard_Transient) if (other->DynamicType() != DynamicType()) return Standard_False; Handle(MoniTool_TransientElem) another = Handle(MoniTool_TransientElem)::DownCast(other); // return (theval == another->Value()); - return TColStd_MapTransientHasher::IsEqual (theval,another->Value()); + return theval == another->Value(); } Handle(Standard_Type) MoniTool_TransientElem::ValueType () const diff --git a/src/NCollection/FILES b/src/NCollection/FILES index 6e92b94898..d93ebc08fb 100755 --- a/src/NCollection/FILES +++ b/src/NCollection/FILES @@ -3,6 +3,7 @@ NCollection_AccAllocator.hxx NCollection_AliasedArray.hxx NCollection_AlignedAllocator.cxx NCollection_AlignedAllocator.hxx +NCollection_Allocator.hxx NCollection_Array1.hxx NCollection_Array2.hxx NCollection_BaseAllocator.cxx @@ -11,29 +12,21 @@ NCollection_BaseList.cxx NCollection_BaseList.hxx NCollection_BaseMap.cxx NCollection_BaseMap.hxx +NCollection_BasePointerVector.cxx +NCollection_BasePointerVector.hxx NCollection_BaseSequence.cxx NCollection_BaseSequence.hxx -NCollection_BaseVector.cxx -NCollection_BaseVector.hxx NCollection_Buffer.hxx NCollection_CellFilter.hxx NCollection_DataMap.hxx NCollection_DefaultHasher.hxx NCollection_DefineAlloc.hxx -NCollection_DefineArray1.hxx -NCollection_DefineArray2.hxx -NCollection_DefineDataMap.hxx -NCollection_DefineDoubleMap.hxx NCollection_DefineHArray1.hxx NCollection_DefineHArray2.hxx +NCollection_DefineHasher.hxx NCollection_DefineHSequence.hxx -NCollection_DefineIndexedDataMap.hxx -NCollection_DefineIndexedMap.hxx -NCollection_DefineList.hxx -NCollection_DefineMap.hxx -NCollection_DefineSequence.hxx -NCollection_DefineVector.hxx NCollection_DoubleMap.hxx +NCollection_DynamicArray.hxx NCollection_EBTree.hxx NCollection_Haft.h NCollection_Handle.hxx @@ -45,7 +38,9 @@ NCollection_HSequence.hxx NCollection_IncAllocator.cxx NCollection_IncAllocator.hxx NCollection_IndexedDataMap.hxx +NCollection_IndexedIterator.hxx NCollection_IndexedMap.hxx +NCollection_Iterator.hxx NCollection_Lerp.hxx NCollection_List.hxx NCollection_ListNode.hxx @@ -53,12 +48,12 @@ NCollection_LocalArray.hxx NCollection_Map.hxx NCollection_Mat3.hxx NCollection_Mat4.hxx +NCollection_OccAllocator.hxx NCollection_Sequence.hxx NCollection_Shared.hxx NCollection_SparseArray.hxx NCollection_SparseArrayBase.cxx NCollection_SparseArrayBase.hxx -NCollection_StdAllocator.hxx NCollection_StlIterator.hxx NCollection_String.hxx NCollection_TListIterator.hxx diff --git a/src/NCollection/NCollection_AccAllocator.cxx b/src/NCollection/NCollection_AccAllocator.cxx index e7172ccff7..634223a958 100644 --- a/src/NCollection/NCollection_AccAllocator.cxx +++ b/src/NCollection/NCollection_AccAllocator.cxx @@ -127,8 +127,9 @@ void NCollection_AccAllocator::Free(void* theAddress) // If there are no more blocks, reallocate the block to the default size else { + const Standard_Size aRoundSize = (myBlockSize + 3) & ~0x3; Standard_Address aNewAddress = Standard::Reallocate(anAddress, - myBlockSize); + aRoundSize); if (aNewAddress == anAddress) { // Normally, the reallocation keeps the block at the same address @@ -196,7 +197,8 @@ NCollection_AccAllocator::findBlock(const Standard_Address theAddress, Key& theK NCollection_AccAllocator::Block* NCollection_AccAllocator::allocateNewBlock(const Standard_Size theSize) { - Standard_Address anAddress = Standard::Allocate(theSize); + const Standard_Size aRoundSize = (theSize + 3) & ~0x3; + Standard_Address anAddress = Standard::Allocate(aRoundSize); // we depend on the fact that Standard::Allocate always returns // a pointer aligned to a 4 byte boundary mypLastBlock = myBlocks.Bound(getKey(anAddress), diff --git a/src/NCollection/NCollection_AccAllocator.hxx b/src/NCollection/NCollection_AccAllocator.hxx index 239ba351c2..b9aff7b706 100644 --- a/src/NCollection/NCollection_AccAllocator.hxx +++ b/src/NCollection/NCollection_AccAllocator.hxx @@ -64,6 +64,12 @@ public: //! Allocate memory with given size Standard_EXPORT virtual void* Allocate (const size_t theSize) Standard_OVERRIDE; + //! Allocate memory with given size + void* AllocateOptimal(const size_t theSize) Standard_OVERRIDE + { + return Allocate(theSize); + } + //! Free a previously allocated memory; //! memory is returned to the OS when all allocations in some block are freed Standard_EXPORT virtual void Free (void* theAddress) Standard_OVERRIDE; @@ -108,17 +114,18 @@ protected: class Hasher { public: - //! Returns hash code for the given key, in the range [1, theUpperBound] + //! Returns hash code for the given key //! @param theKey the key which hash code is to be computed - //! @param theUpperBound the upper bound of the range a computing hash code must be within - //! @return a computed hash code, in the range [1, theUpperBound] - static Standard_Integer HashCode (const Key theKey, const Standard_Integer theUpperBound) + //! @return a computed hash code + size_t operator() (const Key theKey) const noexcept { - return ::HashCode (theKey.Value, theUpperBound); + return theKey.Value; } - static Standard_Boolean IsEqual(const Key theOne, const Key theTwo) - { return theOne.Value == theTwo.Value; } + bool operator() (const Key theKey1, const Key theKey2) const noexcept + { + return theKey1.Value == theKey2.Value; + } }; //! Descriptor of a block diff --git a/src/NCollection/NCollection_AlignedAllocator.hxx b/src/NCollection/NCollection_AlignedAllocator.hxx index 1e3187ffee..5ab553a638 100644 --- a/src/NCollection/NCollection_AlignedAllocator.hxx +++ b/src/NCollection/NCollection_AlignedAllocator.hxx @@ -32,6 +32,12 @@ public: //! Allocate memory with given size. Returns NULL on failure. Standard_EXPORT virtual void* Allocate (const size_t theSize) Standard_OVERRIDE; + //! Allocate memory with given size. Returns NULL on failure. + void* AllocateOptimal(const size_t theSize) Standard_OVERRIDE + { + return Allocate(theSize); + } + //! Free a previously allocated memory. Standard_EXPORT virtual void Free (void* thePtr) Standard_OVERRIDE; diff --git a/src/NCollection/NCollection_Allocator.hxx b/src/NCollection/NCollection_Allocator.hxx new file mode 100644 index 0000000000..5d116c47e1 --- /dev/null +++ b/src/NCollection/NCollection_Allocator.hxx @@ -0,0 +1,151 @@ +// Copyright (c) 2023 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 _NCollection_Allocator_HeaderFile +#define _NCollection_Allocator_HeaderFile + +#include +#include + +#include + +//! Implements allocator requirements as defined in ISO C++ Standard 2003, section 20.1.5. +/*! The allocator uses a standard OCCT mechanism for memory + allocation and deallocation. It can be used with standard + containers (std::vector, std::map, etc.) to take advantage of OCCT memory optimizations. + + Example of use: + \code + NCollection_Allocator anSAllocator(); + std::list> aList(anSAllocator); + TopoDS_Solid aSolid = BRepPrimAPI_MakeBox(10., 20., 30.); + aList.push_back(aSolid); + \endcode +*/ +template +class NCollection_Allocator +{ +public: + typedef ItemType value_type; + typedef value_type* pointer; + typedef const value_type* const_pointer; + typedef value_type& reference; + typedef const value_type& const_reference; + typedef size_t size_type; + typedef ptrdiff_t difference_type; + + template + struct rebind + { + typedef NCollection_Allocator other; + }; + + //! Constructor. + //! Creates an object using the default Open CASCADE allocation mechanism, i.e., which uses + //! Standard::Allocate() and Standard::Free() underneath. + NCollection_Allocator() noexcept + {} + + //! Constructor. + NCollection_Allocator(const Handle(NCollection_BaseAllocator)&) noexcept + {} + + //! Assignment operator + template + NCollection_Allocator& operator=(const NCollection_Allocator&) noexcept + { + return *this; + } + //! Constructor. + //! Creates an object using the default Open CASCADE allocation mechanism, i.e., which uses + //! Standard::Allocate() and Standard::Free() underneath. + template + NCollection_Allocator(const NCollection_Allocator&) noexcept + {} + + //! Returns an object address. + pointer address(reference theItem) const + { + return &theItem; + } + + //! Returns an object address. + const_pointer address(const_reference theItem) const + { + return &theItem; + } + + //! Allocates memory for theSize objects. + pointer allocate(const size_type theSize, const void* /*hint*/ = 0) const + { + return static_cast(Standard::AllocateOptimal(theSize * sizeof(ItemType))); + } + + //! Frees previously allocated memory. + void deallocate(pointer thePnt, const size_type) const + { + Standard::Free(static_cast(thePnt)); + } + + //! Reallocates memory for theSize objects. + pointer reallocate(pointer thePnt, const size_type theSize) const + { + return static_cast(Standard::Reallocate(thePnt, theSize * sizeof(ItemType))); + } + + //! Constructs an object. + //! Uses placement new operator and copy constructor to construct an object. + template + void construct(_Objty* _Ptr, _Types&&... _Args) + { + ::new ((void*)_Ptr) _Objty(std::forward<_Types>(_Args)...); + } + + //! Destroys the object. + //! Uses the object destructor. + void destroy(pointer thePnt) + { + (void)thePnt; thePnt->~value_type(); + } + + bool operator==(const NCollection_Allocator&) const + { + return true; + } + + template + bool operator==(const NCollection_Allocator&) const noexcept + { + return true; + } + + bool operator!=(const NCollection_Allocator&) const noexcept + { + return false; + } + + template + bool operator!=(const NCollection_Allocator&) const noexcept + { + return false; + } + +}; + +template +bool operator==(const NCollection_Allocator&, const NCollection_Allocator&) +{ + return true; +} + +#endif diff --git a/src/NCollection/NCollection_Array1.hxx b/src/NCollection/NCollection_Array1.hxx index 473f050b64..4dcabc29f5 100644 --- a/src/NCollection/NCollection_Array1.hxx +++ b/src/NCollection/NCollection_Array1.hxx @@ -1,6 +1,4 @@ -// Created on: 2002-04-15 -// Created by: Alexander Kartomin (akm) -// Copyright (c) 2002-2014 OPEN CASCADE SAS +// Copyright (c) 2002-2023 OPEN CASCADE SAS // // This file is part of Open CASCADE Technology software library. // @@ -18,10 +16,18 @@ #include #include +#include #include #include -#include +#include +#include +#include +#include + +#include +#include +#include //! The class NCollection_Array1 represents unidimensional arrays of fixed size known at run time. //! The range of the index is user defined. @@ -49,231 +55,218 @@ template class NCollection_Array1 { public: - //! STL-compliant typedef for value type - typedef TheItemType value_type; + //! Memory allocation + DEFINE_STANDARD_ALLOC; + DEFINE_NCOLLECTION_ALLOC; +public: + typedef NCollection_Allocator allocator_type; +public: + // Define various type aliases for convenience + using value_type = TheItemType; + using size_type = size_t; + using difference_type = size_t; + using pointer = TheItemType*; + using const_pointer = const TheItemType*; + using reference = TheItemType&; + using const_reference = const TheItemType&; + + using iterator = NCollection_IndexedIterator; + using const_iterator = NCollection_IndexedIterator; public: - //! Implementation of the Iterator interface. - class Iterator + + // Iterator class + class Iterator : public NCollection_Iterator { public: + using NCollection_Iterator::NCollection_Iterator; - //! Empty constructor - for later Init - Iterator (void) : - myPtrCur (NULL), - myPtrEnd (NULL) + const_reference Value() const { - // + return *NCollection_Iterator::ValueIter(); } - //! Constructor with initialization - Iterator (const NCollection_Array1& theArray, Standard_Boolean theToEnd = Standard_False) : - myPtrEnd (const_cast (&theArray.Last() + 1)) + reference ChangeValue() { - myPtrCur = theToEnd ? myPtrEnd : const_cast (&theArray.First()); + return *NCollection_Iterator::ChangeValueIter(); } + }; - //! Initialisation - void Init (const NCollection_Array1& theArray) - { - myPtrCur = const_cast (&theArray.First()); - myPtrEnd = const_cast (&theArray.Last() + 1); - } - - //! Check end - Standard_Boolean More (void) const - { return myPtrCur < myPtrEnd; } - - //! Increment operator - void Next (void) - { ++myPtrCur; } - - //! Decrement operator - void Previous() - { --myPtrCur; } - - //! Offset operator. - void Offset (ptrdiff_t theOffset) - { myPtrCur += theOffset; } - - //! Difference operator. - ptrdiff_t Differ (const Iterator& theOther) const - { return myPtrCur - theOther.myPtrCur; } - - //! Constant value access - const TheItemType& Value (void) const - { return *myPtrCur; } - - //! Variable value access - TheItemType& ChangeValue (void) const - { return *myPtrCur; } - - //! Performs comparison of two iterators - Standard_Boolean IsEqual (const Iterator& theOther) const - { return myPtrCur == theOther.myPtrCur; } - - private: - TheItemType* myPtrCur; //!< Pointer to the current element in the array - TheItemType* myPtrEnd; //!< Pointer to the past-the-end element in the array - }; // End of the nested class Iterator - - //! Shorthand for a regular iterator type. - typedef NCollection_StlIterator iterator; + const_iterator begin() const + { + return const_iterator(*this); + } - //! Shorthand for a constant iterator type. - typedef NCollection_StlIterator const_iterator; + iterator begin() + { + return iterator(*this); + } - //! Returns an iterator pointing to the first element in the array. - iterator begin() const { return Iterator (*this, false); } + const_iterator cbegin() const + { + return const_iterator(*this); + } - //! Returns an iterator referring to the past-the-end element in the array. - iterator end() const { return Iterator (*this, true); } - - //! Returns a const iterator pointing to the first element in the array. - const_iterator cbegin() const { return Iterator (*this, false); } + iterator end() + { + return iterator(mySize, *this); + } - //! Returns a const iterator referring to the past-the-end element in the array. - const_iterator cend() const { return Iterator (*this, true); } + const_iterator end() const + { + return const_iterator(mySize, *this); + } - public: - // ---------- PUBLIC METHODS ------------ + const_iterator cend() const + { + return const_iterator(mySize, *this); + } - //! Empty constructor; should be used with caution. - //! @sa methods Resize() and Move(). - NCollection_Array1() - : myLowerBound (1), - myUpperBound (0), - myDeletable (Standard_False), - myData (NULL) +public: + // Constructors + NCollection_Array1() : + myLowerBound(1), + mySize(0) + {} + + explicit NCollection_Array1(const Standard_Integer theLower, + const Standard_Integer theUpper) : + myLowerBound(theLower), + mySize(theUpper - theLower + 1) { - // + if (mySize == 0) + { + return; + } + myPointer = myAllocator.allocate(mySize); + myIsOwner = true; + construct(); } - //! Constructor - NCollection_Array1(const Standard_Integer theLower, - const Standard_Integer theUpper) : - myLowerBound (theLower), - myUpperBound (theUpper), - myDeletable (Standard_True) + explicit NCollection_Array1(const allocator_type& theAlloc, + const Standard_Integer theLower, + const Standard_Integer theUpper) : + myLowerBound(theLower), + mySize(theUpper - theLower + 1), + myPointer(nullptr), + myIsOwner(false), + allocator_type(theAlloc) { - Standard_RangeError_Raise_if (theUpper < theLower, "NCollection_Array1::Create"); - TheItemType* pBegin = new TheItemType[Length()]; - Standard_OutOfMemory_Raise_if (!pBegin, "NCollection_Array1 : Allocation failed"); + if (mySize == 0) + { + return; + } + myPointer = myAllocator.allocate(mySize); + myIsOwner = true; + construct(); + } - myData = pBegin - theLower; + explicit NCollection_Array1(const_reference theBegin, + const Standard_Integer theLower, + const Standard_Integer theUpper, + const bool theUseBuffer = true) : + myLowerBound(theLower), + mySize(theUpper - theLower + 1), + myPointer(theUseBuffer ? const_cast(&theBegin) : nullptr), + myIsOwner(!theUseBuffer) + { + if (!myIsOwner) + { + return; + } + myPointer = myAllocator.allocate(mySize); + myIsOwner = true; + construct(); } //! Copy constructor - NCollection_Array1 (const NCollection_Array1& theOther) : - myLowerBound (theOther.Lower()), - myUpperBound (theOther.Upper()), - myDeletable (Standard_True) + NCollection_Array1(const NCollection_Array1& theOther) : + myLowerBound(theOther.myLowerBound), + mySize(theOther.mySize) { - TheItemType* pBegin = new TheItemType[Length()]; - Standard_OutOfMemory_Raise_if (!pBegin, "NCollection_Array1 : Allocation failed"); - myData = pBegin - myLowerBound; - - Assign (theOther); + if (mySize == 0) + { + return; + } + myPointer = myAllocator.allocate(mySize); + myIsOwner = true; + copyConstruct(theOther.myPointer, mySize); } //! Move constructor - NCollection_Array1 (NCollection_Array1&& theOther) - : myLowerBound (theOther.myLowerBound), - myUpperBound (theOther.myUpperBound), - myDeletable (theOther.myDeletable), - myData (theOther.myData) - { - theOther.myDeletable = false; - } - - //! C array-based constructor. - //! - //! Makes this array to use the buffer pointed by theBegin - //! instead of allocating it dynamically. - //! Argument theBegin should be a reference to the first element - //! of the pre-allocated buffer (usually local C array buffer), - //! with size at least theUpper - theLower + 1 items. - //! - //! Warning: returning array object created using this constructor - //! from function by value will result in undefined behavior - //! if compiler performs return value optimization (this is likely - //! to be true for all modern compilers in release mode). - //! The same happens if array is copied using Move() function - //! or move constructor and target object's lifespan is longer - //! than that of the buffer. - NCollection_Array1 (const TheItemType& theBegin, - const Standard_Integer theLower, - const Standard_Integer theUpper) : - myLowerBound (theLower), - myUpperBound (theUpper), - myDeletable (Standard_False) - { - Standard_RangeError_Raise_if (theUpper < theLower, "NCollection_Array1::Create"); - #if (defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6))) - // gcc emits -Warray-bounds warning when NCollection_Array1 is initialized - // from local array with lower index 1 (so that (&theBegin - 1) points out of array bounds). - // NCollection_Array1 initializes myData with a shift to avoid this shift within per-element access. - // It is undesired changing this logic, and -Warray-bounds is not useful here. - #pragma GCC diagnostic push - #pragma GCC diagnostic ignored "-Warray-bounds" - #endif - myData = (TheItemType *) &theBegin - theLower; - #if (defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6))) - #pragma GCC diagnostic pop - #endif + NCollection_Array1(NCollection_Array1&& theOther) noexcept : + myLowerBound(theOther.myLowerBound), + mySize(theOther.mySize), + myPointer(theOther.myPointer), + myIsOwner(theOther.myIsOwner) + { + theOther.myIsOwner = false; + } + + virtual ~NCollection_Array1() + { + if (!myIsOwner) + { + return; + } + destroy(); + myAllocator.deallocate(myPointer, mySize); } //! Initialise the items with theValue - void Init (const TheItemType& theValue) + void Init(const_reference theValue) { - TheItemType *pCur = &myData[myLowerBound], *pEnd=&myData[myUpperBound]; - for(; pCur <= pEnd; pCur++) - *pCur = (TheItemType&) theValue; + for (size_t anIter = 0; anIter < mySize; anIter++) + { + myPointer[anIter] = theValue; + } } //! Size query - Standard_Integer Size (void) const - { return Length(); } + Standard_Integer Size() const + { + return Length(); + } + //! Length query (the same) - Standard_Integer Length (void) const - { return (myUpperBound-myLowerBound+1); } + Standard_Integer Length() const + { + return static_cast(mySize); + } //! Return TRUE if array has zero length. - Standard_Boolean IsEmpty() const { return myUpperBound < myLowerBound; } + Standard_Boolean IsEmpty() const + { + return mySize == 0; + } //! Lower bound - Standard_Integer Lower (void) const - { return myLowerBound; } - //! Upper bound - Standard_Integer Upper (void) const - { return myUpperBound; } - - //! myDeletable flag - Standard_Boolean IsDeletable (void) const - { return myDeletable; } + Standard_Integer Lower() const + { + return myLowerBound; + } - //! IsAllocated flag - for naming compatibility - Standard_Boolean IsAllocated (void) const - { return myDeletable; } + //! Upper bound + Standard_Integer Upper() const + { + return myLowerBound + static_cast(mySize) - 1; + } //! Copies data of theOther array to this. //! This array should be pre-allocated and have the same length as theOther; //! otherwise exception Standard_DimensionMismatch is thrown. - NCollection_Array1& Assign (const NCollection_Array1& theOther) + NCollection_Array1& Assign(const NCollection_Array1& theOther) { if (&theOther == this) - return *this; - - Standard_DimensionMismatch_Raise_if (Length() != theOther.Length(), "NCollection_Array1::operator="); - if (myData == NULL) { return *this; } - - TheItemType * pMyItem = &myData[myLowerBound]; - TheItemType * const pEndItem = &(theOther.myData)[theOther.myUpperBound]; - TheItemType * pItem = &(theOther.myData)[theOther.myLowerBound]; - while (pItem <= pEndItem) * pMyItem ++ = * pItem ++; + Standard_DimensionMismatch_Raise_if(mySize != theOther.mySize, "NCollection_Array1::operator="); + for (size_t anInd = 0; anInd < mySize; anInd++) + { + myPointer[anInd] = theOther.myPointer[anInd]; + } + // Current implementation disable changing bounds by assigning return *this; } @@ -281,98 +274,134 @@ public: //! This array will borrow all the data from theOther. //! The moved object will keep pointer to the memory buffer and //! range, but it will not free the buffer on destruction. - NCollection_Array1& Move (NCollection_Array1& theOther) + NCollection_Array1& Move(NCollection_Array1&& theOther) noexcept { if (&theOther == this) { return *this; } - - if (myDeletable) + if (myIsOwner) { - delete[] &myData[myLowerBound]; + destroy(); + myAllocator.deallocate(myPointer, mySize); } - myLowerBound = theOther.myLowerBound; - myUpperBound = theOther.myUpperBound; - myDeletable = theOther.myDeletable; - myData = theOther.myData; - - theOther.myDeletable = Standard_False; - + mySize = theOther.mySize; + myPointer = theOther.myPointer; + myIsOwner = theOther.myIsOwner; + theOther.myIsOwner = false; return *this; } + NCollection_Array1& Move(NCollection_Array1& theOther) + { + return Move(std::move(theOther)); + } + //! Assignment operator; @sa Assign() NCollection_Array1& operator= (const NCollection_Array1& theOther) - { - return Assign (theOther); + { + return Assign(theOther); } //! Move assignment operator; @sa Move() - NCollection_Array1& operator= (NCollection_Array1&& theOther) + NCollection_Array1& operator= (NCollection_Array1&& theOther) noexcept { - return Move (theOther); + return Move(std::forward(theOther)); } //! @return first element - const TheItemType& First() const + const_reference First() const { - return myData[myLowerBound]; + return myPointer[0]; } //! @return first element - TheItemType& ChangeFirst() + reference ChangeFirst() { - return myData[myLowerBound]; + return myPointer[0]; } //! @return last element - const TheItemType& Last() const + const_reference Last() const { - return myData[myUpperBound]; + return myPointer[mySize - 1]; } //! @return last element - TheItemType& ChangeLast() + reference ChangeLast() { - return myData[myUpperBound]; + return myPointer[mySize - 1]; } //! Constant value access - const TheItemType& Value (const Standard_Integer theIndex) const + const_reference Value(const Standard_Integer theIndex) const { - Standard_OutOfRange_Raise_if (theIndex < myLowerBound || theIndex > myUpperBound, "NCollection_Array1::Value"); - return myData[theIndex]; + const size_t aPos = theIndex - myLowerBound; + Standard_OutOfRange_Raise_if(aPos >= mySize, "NCollection_Array1::Value"); + return myPointer[aPos]; } //! operator() - alias to Value - const TheItemType& operator() (const Standard_Integer theIndex) const - { return Value (theIndex); } + const_reference operator() (const Standard_Integer theIndex) const + { + return Value(theIndex); + } //! operator[] - alias to Value - const TheItemType& operator[] (Standard_Integer theIndex) const { return Value (theIndex); } + const_reference operator[] (const Standard_Integer theIndex) const + { + return Value(theIndex); + } //! Variable value access - TheItemType& ChangeValue (const Standard_Integer theIndex) + reference ChangeValue(const Standard_Integer theIndex) { - Standard_OutOfRange_Raise_if (theIndex < myLowerBound || theIndex > myUpperBound, "NCollection_Array1::ChangeValue"); - return myData[theIndex]; + const size_t aPos = theIndex - myLowerBound; + Standard_OutOfRange_Raise_if(aPos >= mySize, "NCollection_Array1::ChangeValue"); + return myPointer[aPos]; } //! operator() - alias to ChangeValue - TheItemType& operator() (const Standard_Integer theIndex) - { return ChangeValue (theIndex); } + reference operator() (const Standard_Integer theIndex) + { + return ChangeValue(theIndex); + } //! operator[] - alias to ChangeValue - TheItemType& operator[] (Standard_Integer theIndex) { return ChangeValue (theIndex); } + reference operator[] (const Standard_Integer theIndex) + { + return ChangeValue(theIndex); + } + + //! Set value + void SetValue(const Standard_Integer theIndex, + const value_type& theItem) + { + const size_t aPos = theIndex - myLowerBound; + Standard_OutOfRange_Raise_if(aPos >= mySize, "NCollection_Array1::SetValue"); + myPointer[aPos] = theItem; + } //! Set value - void SetValue (const Standard_Integer theIndex, - const TheItemType& theItem) + void SetValue(const Standard_Integer theIndex, + value_type&& theItem) { - Standard_OutOfRange_Raise_if (theIndex < myLowerBound || theIndex > myUpperBound, "NCollection_Array1::SetValue"); - myData[theIndex] = theItem; + const size_t aPos = theIndex - myLowerBound; + Standard_OutOfRange_Raise_if(aPos >= mySize, "NCollection_Array1::SetValue"); + myPointer[aPos] = std::forward(theItem); + } + + //! Changes the lowest bound. Do not move data + void UpdateLowerBound(const Standard_Integer theLower) + { + myLowerBound = theLower; + } + + //! Changes the upper bound. Do not move data + void UpdateUpperBound(const Standard_Integer theUpper) + { + myLowerBound = myLowerBound - Upper() + theUpper; } //! Resizes the array to specified bounds. @@ -381,61 +410,157 @@ public: //! @param theLower new lower bound of array //! @param theUpper new upper bound of array //! @param theToCopyData flag to copy existing data into new array - void Resize (const Standard_Integer theLower, - const Standard_Integer theUpper, - const Standard_Boolean theToCopyData) + void Resize(const Standard_Integer theLower, + const Standard_Integer theUpper, + const Standard_Boolean theToCopyData) { - Standard_RangeError_Raise_if (theUpper < theLower, "NCollection_Array1::Resize"); - const Standard_Integer anOldLen = Length(); - const Standard_Integer aNewLen = theUpper - theLower + 1; - - TheItemType* aBeginOld = myData != NULL ? &myData[myLowerBound] : NULL; - myLowerBound = theLower; - myUpperBound = theUpper; - if (aNewLen == anOldLen) + Standard_RangeError_Raise_if(theUpper < theLower, "NCollection_Array1::Resize"); + const size_t aNewSize = static_cast(theUpper - theLower + 1); + const size_t anOldSize = mySize; + pointer aPrevContPnt = myPointer; + if (aNewSize == anOldSize) { - myData = aBeginOld - theLower; + myLowerBound = theLower; return; } + if (myIsOwner) + { + if (theToCopyData) + destroy(myPointer, aNewSize, mySize); + else + destroy(); + } + myLowerBound = theLower; + mySize = aNewSize; + if (theToCopyData) + { + const size_t aMinSize = std::min(aNewSize, anOldSize); + if (myIsOwner) + { + myPointer = myAllocator.reallocate(myPointer, aNewSize); + } + else + { + myPointer = myAllocator.allocate(aNewSize); + copyConstruct(aPrevContPnt, aMinSize); + } + construct(anOldSize, aNewSize); + } + else + { + if (myIsOwner) + myAllocator.deallocate(aPrevContPnt, mySize); + myPointer = myAllocator.allocate(aNewSize); + construct(); + } + myIsOwner = true; + } + + bool IsDeletable() const + { + return myIsOwner; + } + + friend iterator; + friend const_iterator; + +protected: + + const_reference at(const size_t theIndex) const + { + Standard_OutOfRange_Raise_if(theIndex >= mySize, "NCollection_Array1::at"); + return myPointer[theIndex]; + } + + reference at(const size_t theIndex) + { + Standard_OutOfRange_Raise_if(theIndex >= mySize, "NCollection_Array1::at"); + return myPointer[theIndex]; + } + +protected: + + template + typename std::enable_if::value, void>::type construct() + { + // Do nothing + } - if (!theToCopyData && myDeletable) + template + typename std::enable_if::value, void>::type construct() + { + for (size_t anInd = 0; anInd < mySize; anInd++) { - delete[] aBeginOld; + myAllocator.construct(myPointer + anInd); } - TheItemType* aBeginNew = new TheItemType[aNewLen]; - Standard_OutOfMemory_Raise_if (aBeginNew == NULL, "NCollection_Array1 : Allocation failed"); - myData = aBeginNew - theLower; - if (!theToCopyData) + } + + template + typename std::enable_if::value, void>::type construct(const size_t, + const size_t) + { + // Do nothing + } + + template + typename std::enable_if::value, void>::type construct(const size_t theFrom, + const size_t theTo) + { + for (size_t anInd = theFrom; anInd < theTo; anInd++) { - myDeletable = Standard_True; - return; + myAllocator.construct(myPointer + anInd); } + } - const Standard_Integer aLenCopy = Min (anOldLen, aNewLen); - for (Standard_Integer anIter = 0; anIter < aLenCopy; ++anIter) + template + typename std::enable_if::value, void>::type destroy() + { + // Do nothing + } + + template + typename std::enable_if::value, void>::type destroy() + { + for (size_t anInd = 0; anInd < mySize; anInd++) { - aBeginNew[anIter] = aBeginOld[anIter]; + myAllocator.destroy(myPointer + anInd); } - if (myDeletable) + } + + template + typename std::enable_if::value, void>::type destroy(pointer, + const size_t, + const size_t) + { + // Do nothing + } + + template + typename std::enable_if::value, void>::type destroy(pointer theWhat, + const size_t theFrom, + const size_t theTo) + { + for (size_t anInd = theFrom; anInd < theTo; anInd++) { - delete[] aBeginOld; + myAllocator.destroy(theWhat + anInd); } - myDeletable = Standard_True; } - //! Destructor - releases the memory - ~NCollection_Array1 (void) - { - if (myDeletable) - delete [] &(myData[myLowerBound]); + void copyConstruct(const pointer theFrom, + const size_t theCount) + { + for (size_t anInd = 0; anInd < theCount; anInd++) + { + myAllocator.construct(myPointer + anInd, theFrom[anInd]); + } } - protected: // ---------- PROTECTED FIELDS ----------- - Standard_Integer myLowerBound; - Standard_Integer myUpperBound; - Standard_Boolean myDeletable; //!< Flag showing who allocated the array - TheItemType* myData; //!< Pointer to '0'th array item + Standard_Integer myLowerBound; + size_t mySize; + pointer myPointer = nullptr; + bool myIsOwner = false; + allocator_type myAllocator; }; #endif diff --git a/src/NCollection/NCollection_Array2.hxx b/src/NCollection/NCollection_Array2.hxx index a06d435c74..3071eb93a4 100644 --- a/src/NCollection/NCollection_Array2.hxx +++ b/src/NCollection/NCollection_Array2.hxx @@ -18,14 +18,16 @@ #include #include +#include #include +#include #include // *********************************************** Template for Array2 class /** -* Purpose: The class Array2 represents bi-dimensional arrays -* of fixed size known at run time. +* Purpose: The class Array2 represents bi-dimensional arrays +* of fixed size known at run time. * The ranges of indices are user defined. * * Class allocates one 1D array storing full data (all Rows and Columns) @@ -34,268 +36,276 @@ * Warning: Programs clients of such class must be independent * of the range of the first element. Then, a C++ for * loop must be written like this -* +* * for (i = A.LowerRow(); i <= A.UpperRow(); i++) * for (j = A.LowerCol(); j <= A.UpperCol(); j++) -*/ +*/ template -class NCollection_Array2 +class NCollection_Array2 : public NCollection_Array1 { public: - //! STL-compliant typedef for value type - typedef TheItemType value_type; - + //! Memory allocation + DEFINE_STANDARD_ALLOC; + DEFINE_NCOLLECTION_ALLOC; public: - // **************** Implementation of the Iterator interface. - class Iterator + typedef NCollection_Allocator allocator_type; +public: + + // Define various type aliases for convenience + using value_type = typename NCollection_Array1::value_type; + using size_type = typename NCollection_Array1::size_type; + using difference_type = typename NCollection_Array1::difference_type; + using pointer = typename NCollection_Array1::pointer; + using const_pointer = typename NCollection_Array1::const_pointer; + using reference = typename NCollection_Array1::reference; + using const_reference = typename NCollection_Array1::const_reference; + + using iterator = typename NCollection_Array1::iterator; + using const_iterator = typename NCollection_Array1::const_iterator; + + static int BeginPosition(Standard_Integer theRowLower, + Standard_Integer /*theRowUpper*/, + Standard_Integer theColLower, + Standard_Integer theColUpper) { - public: - //! Empty constructor - for later Init - Iterator (void) : - myCurrent (0), - mySize (0), - myArray (NULL) {} - //! Constructor with initialisation - Iterator (const NCollection_Array2& theArray) : - myCurrent (0), - mySize (theArray.Length()), - myArray ((NCollection_Array2 *) &theArray) {} - //! Initialisation - void Init (const NCollection_Array2& theArray) - { - myCurrent = 0; - mySize = theArray.Length(); - myArray = (NCollection_Array2 *) &theArray; - } - //! Check end - Standard_Boolean More (void) const - { return (myCurrent < mySize); } - //! Make step - void Next (void) - { myCurrent++; } - //! Constant value access - const TheItemType& Value (void) const - { return myArray->myStart[myCurrent]; } - //! Variable value access - TheItemType& ChangeValue (void) const - { return myArray->myStart[myCurrent]; } - private: - Standard_Integer myCurrent; //!< Index of the current item - Standard_Integer mySize; //!< Total amount of items - NCollection_Array2* myArray; //!< Pointer to the array being iterated - }; // End of nested class Iterator - - public: + // Calculate the offset for the beginning position + return theColLower + (theRowLower * (theColUpper - theColLower + 1)); + } + + static int LastPosition(Standard_Integer theRowLower, + Standard_Integer theRowUpper, + Standard_Integer theColLower, + Standard_Integer theColUpper) + { + return ((theRowUpper - theRowLower + 1) * (theColUpper - theColLower + 1)) + theColLower + (theRowLower * (theColUpper - theColLower + 1)) - 1; + } + +public: // ---------- PUBLIC METHODS ------------ //! Empty constructor; should be used with caution. //! @sa methods Resize() and Move(). - NCollection_Array2() - : myLowerRow (1), - myUpperRow (0), - myLowerCol (1), - myUpperCol (0), - myData (NULL), - myStart (NULL), - myDeletable(false) - { - // - } + NCollection_Array2() : + NCollection_Array1(), + myLowerRow(1), + mySizeRow(0), + myLowerCol(1), + mySizeCol(0) + {} //! Constructor NCollection_Array2(const Standard_Integer theRowLower, const Standard_Integer theRowUpper, const Standard_Integer theColLower, const Standard_Integer theColUpper) : - myLowerRow (theRowLower), - myUpperRow (theRowUpper), - myLowerCol (theColLower), - myUpperCol (theColUpper), - myDeletable (Standard_True) - { Allocate(); } + NCollection_Array1(BeginPosition(theRowLower, theRowUpper, theColLower, theColUpper), + LastPosition(theRowLower, theRowUpper, theColLower, theColUpper)), + myLowerRow(theRowLower), + mySizeRow(theRowUpper - theRowLower + 1), + myLowerCol(theColLower), + mySizeCol(theColUpper - theColLower + 1) + {} + + //! Constructor + explicit NCollection_Array2(const allocator_type& theAlloc, + const Standard_Integer theRowLower, + const Standard_Integer theRowUpper, + const Standard_Integer theColLower, + const Standard_Integer theColUpper) : + NCollection_Array1(theAlloc, + BeginPosition(theRowLower, theRowUpper, theColLower, theColUpper), + LastPosition(theRowLower, theRowUpper, theColLower, theColUpper)), + myLowerRow(theRowLower), + mySizeRow(theRowUpper - theRowLower + 1), + myLowerCol(theColLower), + mySizeCol(theColUpper - theColLower + 1) + {} //! Copy constructor - NCollection_Array2 (const NCollection_Array2& theOther) : - myLowerRow (theOther.LowerRow()), - myUpperRow (theOther.UpperRow()), - myLowerCol (theOther.LowerCol()), - myUpperCol (theOther.UpperCol()), - myDeletable (Standard_True) - { - Allocate(); - *this = theOther; - } + NCollection_Array2(const NCollection_Array2& theOther) : + NCollection_Array1(theOther), + myLowerRow(theOther.LowerRow()), + mySizeRow(theOther.NbRows()), + myLowerCol(theOther.LowerCol()), + mySizeCol(theOther.NbColumns()) + {} //! Move constructor - NCollection_Array2 (NCollection_Array2&& theOther) - : myLowerRow (theOther.myLowerRow), - myUpperRow (theOther.myUpperRow), - myLowerCol (theOther.myLowerRow), - myUpperCol (theOther.myUpperCol), - myData (theOther.myData), - myStart (theOther.myStart), - myDeletable(theOther.myDeletable) - { - theOther.myStart = NULL; - theOther.myData = NULL; - theOther.myDeletable = false; - } + NCollection_Array2(NCollection_Array2&& theOther) noexcept: + NCollection_Array1(std::forward(theOther)), + myLowerRow(theOther.LowerRow()), + mySizeRow(theOther.NbRows()), + myLowerCol(theOther.LowerCol()), + mySizeCol(theOther.NbColumns()) + {} //! C array-based constructor - NCollection_Array2(const TheItemType& theBegin, - const Standard_Integer theRowLower, - const Standard_Integer theRowUpper, - const Standard_Integer theColLower, - const Standard_Integer theColUpper) : - myLowerRow (theRowLower), - myUpperRow (theRowUpper), - myLowerCol (theColLower), - myUpperCol (theColUpper), - myDeletable (Standard_False) - { - myStart = (TheItemType *) &theBegin; - Allocate(); - } + explicit NCollection_Array2(const TheItemType& theBegin, + const Standard_Integer theRowLower, + const Standard_Integer theRowUpper, + const Standard_Integer theColLower, + const Standard_Integer theColUpper) : + NCollection_Array1(theBegin, + BeginPosition(theRowLower, theRowUpper, theColLower, theColUpper), + LastPosition(theRowLower, theRowUpper, theColLower, theColUpper)), + myLowerRow(theRowLower), + mySizeRow(theRowUpper - theRowLower + 1), + myLowerCol(theColLower), + mySizeCol(theColUpper - theColLower + 1) + {} - //! Initialise the values - void Init (const TheItemType& theValue) + //! Size (number of items) + Standard_Integer Size() const { - TheItemType *pCur, *pEnd=myStart+Size(); - for(pCur = myStart; pCur(mySizeRow); + } //! Returns number of columns - Standard_Integer NbColumns() const { return myUpperCol - myLowerCol + 1; } + Standard_Integer NbColumns() const + { + return static_cast(mySizeCol); + } //! Returns length of the row, i.e. number of columns - Standard_Integer RowLength() const { return NbColumns(); } + Standard_Integer RowLength() const + { + return NbColumns(); + } //! Returns length of the column, i.e. number of rows - Standard_Integer ColLength() const { return NbRows(); } + Standard_Integer ColLength() const + { + return NbRows(); + } //! LowerRow - Standard_Integer LowerRow (void) const - { return myLowerRow; } + Standard_Integer LowerRow() const + { + return myLowerRow; + } //! UpperRow - Standard_Integer UpperRow (void) const - { return myUpperRow; } + Standard_Integer UpperRow() const + { + return myLowerRow + static_cast(mySizeRow) - 1; + } //! LowerCol - Standard_Integer LowerCol (void) const - { return myLowerCol; } + Standard_Integer LowerCol() const + { + return myLowerCol; + } //! UpperCol - Standard_Integer UpperCol (void) const - { return myUpperCol; } - - //! myDeletable flag - Standard_Boolean IsDeletable (void) const - { return myDeletable; } + Standard_Integer UpperCol() const + { + return myLowerCol + static_cast(mySizeCol) - 1; + } //! Assignment - NCollection_Array2& Assign (const NCollection_Array2& theOther) - { + NCollection_Array2& Assign(const NCollection_Array2& theOther) + { if (&theOther == this) + { return *this; - Standard_DimensionMismatch_Raise_if (Length() != theOther.Length(), "NCollection_Array2::operator="); - TheItemType * pMyItem = myStart; - TheItemType * pItem = theOther.myStart; - const Standard_Integer iSize = Length(); - for (Standard_Integer i=0; i < iSize; i++, pItem++, pMyItem++) - *pMyItem = *pItem; - return *this; + } + NCollection_Array1::Assign(theOther); + return *this; } + //! Move assignment. //! This array will borrow all the data from theOther. //! The moved object will be left uninitialized and should not be used anymore. - NCollection_Array2& Move (NCollection_Array2& theOther) + NCollection_Array2& Move(NCollection_Array2&& theOther) { if (&theOther == this) { return *this; } - - if (myDeletable) - { - delete[] myStart; - } - if (myData != NULL) - { - delete[] &(myData[myLowerRow]); - } - - myLowerRow = theOther.myLowerRow; - myUpperRow = theOther.myUpperRow; - myLowerCol = theOther.myLowerRow; - myUpperCol = theOther.myUpperCol; - myData = theOther.myData; - myStart = theOther.myStart; - myDeletable = theOther.myDeletable; - - theOther.myStart = NULL; - theOther.myData = NULL; - theOther.myDeletable = Standard_False; + NCollection_Array1::Move(theOther); + myLowerRow = theOther.myLowerRow; + mySizeRow = theOther.mySizeRow; + myLowerCol = theOther.myLowerCol; + mySizeCol = theOther.mySizeCol; return *this; } + //! Move assignment. + //! This array will borrow all the data from theOther. + //! The moved object will be left uninitialized and should not be used anymore. + NCollection_Array2& Move(NCollection_Array2& theOther) + { + return Move(std::move(theOther)); + } + //! Assignment operator NCollection_Array2& operator= (const NCollection_Array2& theOther) - { - return Assign (theOther); + { + return Assign(theOther); } //! Move assignment operator; @sa Move() NCollection_Array2& operator= (NCollection_Array2&& theOther) { - return Move (theOther); + return Move(std::forward(theOther)); } //! Constant value access - const TheItemType& Value (const Standard_Integer theRow, - const Standard_Integer theCol) const + const_reference Value(const Standard_Integer theRow, + const Standard_Integer theCol) const { - Standard_OutOfRange_Raise_if (theRow < myLowerRow || theRow > myUpperRow || - theCol < myLowerCol || theCol > myUpperCol, "NCollection_Array2::Value"); - return myData[theRow][theCol]; + const size_t aPos = (theRow - myLowerRow) * mySizeCol + (theCol - myLowerCol); + return NCollection_Array1::at(aPos); } //! operator() - alias to ChangeValue - const TheItemType& operator() (const Standard_Integer theRow, - const Standard_Integer theCol) const - { return Value (theRow,theCol); } + const_reference operator() (const Standard_Integer theRow, + const Standard_Integer theCol) const + { + const size_t aPos = (theRow - myLowerRow) * mySizeCol + (theCol - myLowerCol); + return NCollection_Array1::at(aPos); + } //! Variable value access - TheItemType& ChangeValue (const Standard_Integer theRow, - const Standard_Integer theCol) + reference ChangeValue(const Standard_Integer theRow, + const Standard_Integer theCol) { - Standard_OutOfRange_Raise_if (theRow < myLowerRow || theRow > myUpperRow || - theCol < myLowerCol || theCol > myUpperCol, "NCollection_Array2::ChangeValue"); - return myData[theRow][theCol]; + const size_t aPos = (theRow - myLowerRow) * mySizeCol + (theCol - myLowerCol); + return NCollection_Array1::at(aPos); } //! operator() - alias to ChangeValue - TheItemType& operator() (const Standard_Integer theRow, - const Standard_Integer theCol) - { return ChangeValue (theRow,theCol); } + reference operator() (const Standard_Integer theRow, + const Standard_Integer theCol) + { + return ChangeValue(theRow, theCol); + } + + //! SetValue + void SetValue(const Standard_Integer theRow, + const Standard_Integer theCol, + const TheItemType& theItem) + { + const size_t aPos = (theRow - myLowerRow) * mySizeCol + (theCol - myLowerCol); + NCollection_Array1::at(aPos) = theItem; + } //! SetValue - void SetValue (const Standard_Integer theRow, - const Standard_Integer theCol, - const TheItemType& theItem) + void SetValue(const Standard_Integer theRow, + const Standard_Integer theCol, + TheItemType&& theItem) { - Standard_OutOfRange_Raise_if (theRow < myLowerRow || theRow > myUpperRow || - theCol < myLowerCol || theCol > myUpperCol, "NCollection_Array2::SetValue"); - myData[theRow][theCol] = theItem; + const size_t aPos = (theRow - myLowerRow) * mySizeCol + (theCol - myLowerCol); + NCollection_Array1::at(aPos) = std::forward(theItem); } //! Resizes the array to specified bounds. @@ -306,131 +316,56 @@ public: //! @param theColLower new lower Column of array //! @param theColUpper new upper Column of array //! @param theToCopyData flag to copy existing data into new array - void Resize (Standard_Integer theRowLower, - Standard_Integer theRowUpper, - Standard_Integer theColLower, - Standard_Integer theColUpper, - Standard_Boolean theToCopyData) + void Resize(Standard_Integer theRowLower, + Standard_Integer theRowUpper, + Standard_Integer theColLower, + Standard_Integer theColUpper, + Standard_Boolean theToCopyData) { - Standard_RangeError_Raise_if (theRowUpper < theRowLower - || theColUpper < theColLower, "NCollection_Array2::Resize"); - const Standard_Integer anOldNbRows = NbRows(); - const Standard_Integer anOldNbCols = NbColumns(); - const Standard_Integer aLowerRowOld = myLowerRow; - const Standard_Integer aLowerColOld = myLowerCol; - const Standard_Integer aNewNbRows = theRowUpper - theRowLower + 1; - const Standard_Integer aNewNbCols = theColUpper - theColLower + 1; - - TheItemType* aStartOld = myStart; - TheItemType** aTableOld = myData != NULL ? myData + aLowerRowOld : NULL; + Standard_RangeError_Raise_if(theRowUpper < theRowLower || + theColUpper < theColLower, "NCollection_Array2::Resize"); myLowerRow = theRowLower; - myUpperRow = theRowUpper; myLowerCol = theColLower; - myUpperCol = theColUpper; - if (aNewNbRows == anOldNbRows - && aNewNbCols == anOldNbCols) - { - if (myLowerCol != aLowerColOld) - { - fillIndexTable (aTableOld); - } - myData = aTableOld - myLowerRow; - return; - } - - if (myDeletable - && !theToCopyData) - { - delete[] aStartOld; - } - delete[] aTableOld; - - const Standard_Boolean wasDeletable = myDeletable; - myDeletable = Standard_True; - Allocate(); if (!theToCopyData) { + NCollection_Array1::Resize(BeginPosition(theRowLower, theRowUpper, theColLower, theColUpper), + LastPosition(theRowLower, theRowUpper, theColLower, theColUpper), + false); + mySizeRow = theRowUpper - theRowLower + 1; + mySizeCol = theColUpper - theColLower + 1; return; } - - const Standard_Integer aNbRowsToCopy = Min (anOldNbRows, aNewNbRows); - const Standard_Integer aNbColsToCopy = Min (anOldNbCols, aNewNbCols); - for (Standard_Integer aRowIter = 0; aRowIter < aNbRowsToCopy; ++aRowIter) + NCollection_Array1 aTmpMovedCopy(std::move(*this)); + TheItemType* anOldPointer = &aTmpMovedCopy.ChangeFirst(); + NCollection_Array1::Resize(BeginPosition(theRowLower, theRowUpper, theColLower, theColUpper), + LastPosition(theRowLower, theRowUpper, theColLower, theColUpper), + false); + const size_t aNewNbRows = theRowUpper - theRowLower + 1; + const size_t aNewNbCols = theColUpper - theColLower + 1; + const size_t aNbRowsToCopy = std::min(mySizeRow, aNewNbRows); + const size_t aNbColsToCopy = std::min(mySizeCol, aNewNbCols); + mySizeRow = aNewNbRows; + mySizeCol = aNewNbCols; + size_t aOldInter = 0; + for (size_t aRowIter = 0; aRowIter < aNbRowsToCopy; ++aRowIter) { - for (Standard_Integer aColIter = 0; aColIter < aNbColsToCopy; ++aColIter) + for (size_t aColIter = 0; aColIter < aNbColsToCopy; ++aColIter) { - myStart[size_t(aRowIter) * size_t(aNewNbCols) + size_t(aColIter)] = aStartOld[size_t(aRowIter) * size_t(anOldNbCols) + size_t(aColIter)]; + NCollection_Array1::at(aRowIter * aNewNbCols + aColIter) = std::move(anOldPointer[aOldInter++]); } } - - if (wasDeletable) - { - delete[] aStartOld; - } } - //! Destructor - releases the memory - ~NCollection_Array2 (void) - { - if (myDeletable) delete [] myStart; - if (myData != NULL) - { - delete[] &(myData[myLowerRow]); - } - } - - private: - // ----------- PRIVATE METHODS ----------- - - //! Allocate memory for the array, set up indirection table - void Allocate (void) - { - const Standard_Integer aNbRows = NbRows(); - const Standard_Integer aNbCols = NbColumns(); - Standard_RangeError_Raise_if (aNbRows <= 0 || aNbCols <= 0, "NCollection_Array2::Allocate"); - if (myDeletable) - { - // allocation of the data in the array - myStart = new TheItemType[size_t(aNbRows) * size_t(aNbCols)]; - Standard_OutOfMemory_Raise_if (!myStart, "NCollection_Array2 : Allocation failed"); - } - // else myStart is set to the beginning of the given array - - TheItemType** pTable = new TheItemType* [aNbRows]; - Standard_OutOfMemory_Raise_if (!pTable, "NCollection_Array2 : Allocation failed"); - fillIndexTable (pTable); - } - - //! Fill index table for accessing array elements. - void fillIndexTable (TheItemType** theTable) - { - // Items of table point to the 0th items in the rows of the array - TheItemType* aRow = myStart - myLowerCol; - const Standard_Integer aNbRows = NbRows(); - const Standard_Size aNbCols = NbColumns(); - for (Standard_Integer aRowIter = 0; aRowIter < aNbRows; ++aRowIter) - { - theTable[aRowIter] = aRow; - aRow += aNbCols; - } - - // Set myData to the 0th row pointer of the table - myData = theTable - myLowerRow; - } - - protected: +protected: // ---------- PROTECTED FIELDS ----------- Standard_Integer myLowerRow; - Standard_Integer myUpperRow; + size_t mySizeRow; Standard_Integer myLowerCol; - Standard_Integer myUpperCol; - - TheItemType** myData; //!< Pointer to the row pointers table - TheItemType* myStart; //!< Pointer to the memory array - Standard_Boolean myDeletable; //!< Flag showing who allocated the array + size_t mySizeCol; // ----------- FRIEND CLASSES ------------ - friend class Iterator; + friend iterator; + friend const_iterator; }; diff --git a/src/NCollection/NCollection_BaseAllocator.cxx b/src/NCollection/NCollection_BaseAllocator.cxx index d536b0b7b8..d7f3be1781 100644 --- a/src/NCollection/NCollection_BaseAllocator.cxx +++ b/src/NCollection/NCollection_BaseAllocator.cxx @@ -1,6 +1,4 @@ -// Created on: 2002-04-12 -// Created by: Alexander KARTOMIN (akm) -// Copyright (c) 2002-2014 OPEN CASCADE SAS +/// Copyright (c) 2002-2023 OPEN CASCADE SAS // // This file is part of Open CASCADE Technology software library. // @@ -15,271 +13,43 @@ #include -#include -#include -#include -#include -#include -#include -#include - - IMPLEMENT_STANDARD_RTTIEXT(NCollection_BaseAllocator,Standard_Transient) //======================================================================= //function : Allocate //purpose : Standard allocation //======================================================================= +void* NCollection_BaseAllocator::Allocate(const size_t theSize) +{ + return Standard::Allocate(theSize); +} -void* NCollection_BaseAllocator::Allocate(const size_t size) -{ - return Standard::Allocate(size); +//======================================================================= +//function : AllocateOptimal +//purpose : Optimal allocation +//======================================================================= +void* NCollection_BaseAllocator::AllocateOptimal(const size_t theSize) +{ + return Standard::AllocateOptimal(theSize); } //======================================================================= //function : Free //purpose : Standard deallocation //======================================================================= - -void NCollection_BaseAllocator::Free(void *anAddress) -{ - if (anAddress) Standard::Free(anAddress); +void NCollection_BaseAllocator::Free(void* theAddress) +{ + Standard::Free(theAddress); } //======================================================================= //function : CommonBaseAllocator //purpose : Creates the only one BaseAllocator //======================================================================= - const Handle(NCollection_BaseAllocator)& NCollection_BaseAllocator::CommonBaseAllocator(void) { - static Handle(NCollection_BaseAllocator) pAllocator = + static Handle(NCollection_BaseAllocator) THE_SINGLETON_ALLOC = new NCollection_BaseAllocator; - return pAllocator; -} - -namespace -{ - // global variable to ensure that allocator will be created during loading the library - static Handle(NCollection_BaseAllocator) theAllocInit = NCollection_BaseAllocator::CommonBaseAllocator(); - - //! Structure for collecting statistics about blocks of one size - struct StorageInfo - { - Standard_Size roundSize; - int nbAlloc; - int nbFree; - StorageInfo() : roundSize(0), nbAlloc(0), nbFree(0) {} - StorageInfo(Standard_Size theSize) : roundSize(theSize), nbAlloc(0), nbFree(0) {} - }; - - //! Static data map (block_size -> StorageInfo) - static NCollection_DataMap& StorageMap() - { - static NCollection_IncAllocator TheAlloc; - static NCollection_DataMap TheMap (1, & TheAlloc); - return TheMap; - } - - //! Static data map (address -> AllocationID) - static NCollection_DataMap& StorageIDMap() - { - static NCollection_IncAllocator TheAlloc; - static NCollection_DataMap TheMap (1, & TheAlloc); - return TheMap; - } - - //! Static map (AllocationID) - static NCollection_Map& StorageIDSet() - { - static NCollection_IncAllocator TheAlloc; - static NCollection_Map TheMap (1, & TheAlloc); - return TheMap; - } - - // dummy function for break point - inline void place_for_break_point () {} - - //! Static value of the current allocation ID. It provides unique numbering of allocation events. - static Standard_Size CurrentID = 0; -} - -//======================================================================= -/** - * Exported value to set the block size for which it is required - * collecting alive allocation IDs. - * The method NCollection_BaseAllocator::PrintMemUsageStatistics - * dumps all alive IDs into the file alive.d in the current directory. - */ -//======================================================================= -Standard_EXPORT Standard_Size& StandardCallBack_CatchSize() -{ - static Standard_Size Value = 0; - return Value; -} - -//======================================================================= -/** - * Exported value to set the allocation ID for which it is required - * to set a breakpoint on the moment of allocation or freeing. - * See the method NCollection_BaseAllocator::StandardCallBack - * where the value StandardCallBack_CatchID() is compared to the current ID. - * There you can place a break point at the stub assignment statement "a =". - */ -//======================================================================= -Standard_EXPORT Standard_Size& StandardCallBack_CatchID() -{ - static Standard_Size Value = 0; - return Value; -} - -//======================================================================= -/** - * Exported function to reset the callback system to the initial state - */ -//======================================================================= -Standard_EXPORT void StandardCallBack_Reset() -{ - StorageMap().Clear(); - StorageIDMap().Clear(); - StorageIDSet().Clear(); - CurrentID = 0; - StandardCallBack_CatchSize() = 0; - StandardCallBack_CatchID() = 0; -} - -//======================================================================= -//function : StandardCallBack -//purpose : Callback function to register alloc/free calls -//======================================================================= - -void NCollection_BaseAllocator::StandardCallBack - (const Standard_Boolean theIsAlloc, - const Standard_Address theStorage, - const Standard_Size theRoundSize, - const Standard_Size /*theSize*/) -{ - static Standard_Mutex aMutex; - aMutex.Lock(); - // statistics by storage size - NCollection_DataMap& aStMap = StorageMap(); - if (!aStMap.IsBound(theRoundSize)) - { - StorageInfo aEmpty(theRoundSize); - aStMap.Bind(theRoundSize, aEmpty); - } - StorageInfo& aInfo = aStMap(theRoundSize); - if (theIsAlloc) - aInfo.nbAlloc++; - else - aInfo.nbFree++; - - if (theRoundSize == StandardCallBack_CatchSize()) - { - // statistics by alive objects - NCollection_DataMap& aStIDMap = StorageIDMap(); - NCollection_Map& aStIDSet = StorageIDSet(); - if (theIsAlloc) - { - aStIDMap.Bind(theStorage, ++CurrentID); - aStIDSet.Add(CurrentID); - if (CurrentID == StandardCallBack_CatchID()) - { - // Place for break point for allocation of investigated ID - place_for_break_point(); - } - } - else - { - if (aStIDMap.IsBound(theStorage)) - { - Standard_Size anID = aStIDMap(theStorage); - aStIDSet.Remove(anID); - if (anID == StandardCallBack_CatchID()) - { - // Place for break point for freeing of investigated ID - place_for_break_point(); - } - } - } - } - - aMutex.Unlock(); -} - -//======================================================================= -//function : PrintMemUsageStatistics -//purpose : Prints memory usage statistics cumulated by StandardCallBack -//======================================================================= - -void NCollection_BaseAllocator::PrintMemUsageStatistics() -{ - // sort by roundsize - NCollection_List aColl; - NCollection_List::Iterator itLst; - NCollection_DataMap::Iterator itMap(StorageMap()); - for (; itMap.More(); itMap.Next()) - { - for (itLst.Init(aColl); itLst.More(); itLst.Next()) - if (itMap.Value().roundSize < itLst.Value().roundSize) - break; - if (itLst.More()) - aColl.InsertBefore(itMap.Value(), itLst); - else - aColl.Append(itMap.Value()); - } - Standard_Size aTotAlloc = 0; - Standard_Size aTotLeft = 0; - - // print - std::ofstream aFileOut ("memstat.d", std::ios_base::trunc | std::ios_base::out); - if (!aFileOut.is_open()) - { - std::cout << "failure writing file memstat.d" << std::endl; - return; - } - aFileOut.imbue (std::locale ("C")); - - // header - aFileOut << std::setw(20) << "BlockSize" << ' ' - << std::setw(12) << "NbAllocated" << ' ' - << std::setw(12) << "NbLeft" << ' ' - << std::setw(20) << "Allocated" << ' ' - << std::setw(20) << "Left" << '\n'; - - // body - for (itLst.Init(aColl); itLst.More(); itLst.Next()) - { - const StorageInfo& aInfo = itLst.Value(); - Standard_Integer nbLeft = aInfo.nbAlloc - aInfo.nbFree; - Standard_Size aSizeAlloc = aInfo.nbAlloc * aInfo.roundSize; - Standard_Size aSizeLeft = nbLeft * aInfo.roundSize; - - aFileOut << std::setw(20) << aInfo.roundSize << ' ' - << std::setw(12) << aInfo.nbAlloc << ' ' - << std::setw(12) << nbLeft << ' ' - << std::setw(20) << aSizeAlloc << ' ' - << std::setw(20) << aSizeLeft << '\n'; - - aTotAlloc += aSizeAlloc; - aTotLeft += aSizeLeft; - } - - // footer - aFileOut << std::setw(20) << "Total:" << ' ' - << std::setw(12) << "" << ' ' - << std::setw(12) << "" << ' ' - << std::setw(20) << aTotAlloc << ' ' - << std::setw(20) << aTotLeft << '\n'; - - if (!StorageIDSet().IsEmpty()) - { - aFileOut << "Alive allocation numbers of size=" << StandardCallBack_CatchSize() << '\n'; - for (NCollection_Map::Iterator itMap1(StorageIDSet()); itMap1.More(); itMap1.Next()) - { - aFileOut << itMap1.Key() << '\n'; - } - } - aFileOut.close(); + return THE_SINGLETON_ALLOC; } diff --git a/src/NCollection/NCollection_BaseAllocator.hxx b/src/NCollection/NCollection_BaseAllocator.hxx index 7d6448e4d8..0bc0f40804 100644 --- a/src/NCollection/NCollection_BaseAllocator.hxx +++ b/src/NCollection/NCollection_BaseAllocator.hxx @@ -1,6 +1,6 @@ // Created on: 2002-04-12 // Created by: Alexander KARTOMIN (akm) -// Copyright (c) 2002-2014 OPEN CASCADE SAS +// Copyright (c) 2002-2023 OPEN CASCADE SAS // // This file is part of Open CASCADE Technology software library. // @@ -27,10 +27,8 @@ #ifndef NCollection_BaseAllocator_HeaderFile #define NCollection_BaseAllocator_HeaderFile +#include #include -#include -#include - /** * Purpose: Basic class for memory allocation wizards. @@ -43,14 +41,15 @@ * inaccessible. To create the BaseAllocator use the method * CommonBaseAllocator. * Note that this object is managed by Handle. -*/ +*/ class NCollection_BaseAllocator : public Standard_Transient { public: // ---------- PUBLIC METHODS ------------ - Standard_EXPORT virtual void* Allocate (const size_t size); - Standard_EXPORT virtual void Free (void * anAddress); - + Standard_EXPORT virtual void* Allocate (const size_t theSize); + Standard_EXPORT virtual void* AllocateOptimal(const size_t theSize); + Standard_EXPORT virtual void Free (void* theAddress); + //! CommonBaseAllocator //! This method is designed to have the only one BaseAllocator (to avoid //! useless copying of collections). However one can use operator new to @@ -58,29 +57,18 @@ class NCollection_BaseAllocator : public Standard_Transient Standard_EXPORT static const Handle(NCollection_BaseAllocator)& CommonBaseAllocator(void); - //! Callback function to register alloc/free calls - Standard_EXPORT static void StandardCallBack - (const Standard_Boolean theIsAlloc, - const Standard_Address theStorage, - const Standard_Size theRoundSize, - const Standard_Size theSize); - - //! Prints memory usage statistics cumulated by StandardCallBack - Standard_EXPORT static void PrintMemUsageStatistics(); - - protected: +protected: //! Constructor - prohibited - NCollection_BaseAllocator(void) {} + NCollection_BaseAllocator() {} - private: +private: //! Copy constructor - prohibited - NCollection_BaseAllocator(const NCollection_BaseAllocator&); + NCollection_BaseAllocator(const NCollection_BaseAllocator&) = delete; - public: +public: // ---------- CasCade RunTime Type Information DEFINE_STANDARD_RTTIEXT(NCollection_BaseAllocator,Standard_Transient) }; - DEFINE_STANDARD_HANDLE(NCollection_BaseAllocator,Standard_Transient) #endif diff --git a/src/NCollection/NCollection_BaseMap.cxx b/src/NCollection/NCollection_BaseMap.cxx index c18c219fcb..7f32f332b3 100644 --- a/src/NCollection/NCollection_BaseMap.cxx +++ b/src/NCollection/NCollection_BaseMap.cxx @@ -39,13 +39,11 @@ Standard_Boolean NCollection_BaseMap::BeginResize return Standard_False; } data1 = (NCollection_ListNode **) - myAllocator->Allocate((N+1)*sizeof(NCollection_ListNode *)); - memset(data1, 0, (N+1)*sizeof(NCollection_ListNode *)); + Standard::Allocate((N+1)*sizeof(NCollection_ListNode *)); if (isDouble) { data2 = (NCollection_ListNode **) - myAllocator->Allocate((N+1)*sizeof(NCollection_ListNode *)); - memset(data2, 0, (N+1)*sizeof(NCollection_ListNode *)); + Standard::Allocate((N+1)*sizeof(NCollection_ListNode *)); } else data2 = NULL; @@ -65,9 +63,9 @@ void NCollection_BaseMap::EndResize { (void )theNbBuckets; // obsolete parameter if (myData1) - myAllocator->Free(myData1); - if (myData2) - myAllocator->Free(myData2); + Standard::Free(myData1); + if (myData2 && isDouble) + Standard::Free(myData2); myNbBuckets = N; myData1 = data1; myData2 = data2; @@ -84,32 +82,34 @@ void NCollection_BaseMap::Destroy (NCollection_DelMapNode fDel, { if (!IsEmpty()) { - Standard_Integer i; - NCollection_ListNode** data = (NCollection_ListNode**) myData1; - NCollection_ListNode *p,*q; - for (i = 0; i <= NbBuckets(); i++) + const int aNbBuckets = NbBuckets(); + for (int anInd = 0; anInd <= aNbBuckets; anInd++) { - if (data[i]) + if (myData1[anInd]) { - p = data[i]; - while (p) + NCollection_ListNode* aCur = myData1[anInd]; + while (aCur) { - q = (NCollection_ListNode*)p->Next(); - fDel (p, myAllocator); - p = q; + NCollection_ListNode* aNext = aCur->Next(); + fDel (aCur, myAllocator); + aCur = aNext; } - data[i] = NULL; + myData1[anInd] = nullptr; } } + if (myData2) + { + memset(myData2, 0, (aNbBuckets + 1) * sizeof(NCollection_ListNode*)); + } } mySize = 0; if (doReleaseMemory) { - if (myData1) - myAllocator->Free(myData1); - if (isDouble && myData2) - myAllocator->Free(myData2); + if (myData1) + Standard::Free(myData1); + if (myData2) + Standard::Free(myData2); myData1 = myData2 = NULL; } } diff --git a/src/NCollection/NCollection_BaseMap.hxx b/src/NCollection/NCollection_BaseMap.hxx index 62b34536b2..2e6b7f4471 100644 --- a/src/NCollection/NCollection_BaseMap.hxx +++ b/src/NCollection/NCollection_BaseMap.hxx @@ -159,14 +159,28 @@ public: //! Constructor NCollection_BaseMap (const Standard_Integer NbBuckets, const Standard_Boolean single, - const Handle(NCollection_BaseAllocator)& theAllocator) - : myData1(NULL), + const Handle(NCollection_BaseAllocator)& theAllocator) : + myAllocator(theAllocator.IsNull() ? NCollection_BaseAllocator::CommonBaseAllocator() : theAllocator), + myData1(NULL), myData2(NULL), myNbBuckets(NbBuckets), mySize(0), isDouble(!single) + {} + + //! Move Constructor + NCollection_BaseMap(NCollection_BaseMap&& theOther) noexcept : + myAllocator(theOther.myAllocator), + myData1(theOther.myData1), + myData2(theOther.myData2), + myNbBuckets(theOther.myNbBuckets), + mySize(theOther.mySize), + isDouble(theOther.isDouble) { - myAllocator = (theAllocator.IsNull() ? NCollection_BaseAllocator::CommonBaseAllocator() : theAllocator); + theOther.myData1 = nullptr; + theOther.myData1 = nullptr; + theOther.mySize = 0; + theOther.myNbBuckets = 0; } //! Destructor @@ -212,9 +226,17 @@ public: std::swap (myData2, theOther.myData2); std::swap (myNbBuckets, theOther.myNbBuckets); std::swap (mySize, theOther.mySize); - //std::swap (isDouble, theOther.isDouble); } + //! Move operator + NCollection_BaseMap& operator=(NCollection_BaseMap&&) noexcept = delete; + + //! Copy Constructor + NCollection_BaseMap(const NCollection_BaseMap&) = delete; + + //! Assign operator + NCollection_BaseMap& operator=(const NCollection_BaseMap&) = delete; + protected: // --------- PROTECTED FIELDS ----------- Handle(NCollection_BaseAllocator) myAllocator; @@ -225,7 +247,7 @@ public: // ---------- PRIVATE FIELDS ------------ Standard_Integer myNbBuckets; Standard_Integer mySize; - Standard_Boolean isDouble; + const Standard_Boolean isDouble; // ---------- FRIEND CLASSES ------------ friend class Iterator; diff --git a/src/NCollection/NCollection_BasePointerVector.cxx b/src/NCollection/NCollection_BasePointerVector.cxx new file mode 100644 index 0000000000..55a3439448 --- /dev/null +++ b/src/NCollection/NCollection_BasePointerVector.cxx @@ -0,0 +1,145 @@ +// Copyright (c) 2023 OPEN CASCADE SAS +// +// This file is part of Open CASCADE Technology software library. +// +// This library is free software; you can redistribute it and/or modify it under +// the terms of the GNU Lesser General Public License version 2.1 as published +// by the Free Software Foundation, with special exception defined in the file +// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT +// distribution for complete text of the license and disclaimer of any warranty. +// +// Alternatively, this file may be used under the terms of Open CASCADE +// commercial license or contractual agreement. + +#include + +#include +#include + +//======================================================================= +//function : NCollection_BasePointerVector +//purpose : +//======================================================================= +NCollection_BasePointerVector::NCollection_BasePointerVector(const NCollection_BasePointerVector& theOther) : + mySize(theOther.mySize), + myCapacity(theOther.myCapacity) +{ + if (myCapacity > 0) + { + myArray = myAllocator.allocate(myCapacity); + memcpy(myArray, theOther.myArray, Size() * sizeof(void*)); + } +} + +//======================================================================= +//function : NCollection_BasePointerVector +//purpose : +//======================================================================= +NCollection_BasePointerVector::NCollection_BasePointerVector(NCollection_BasePointerVector&& theOther) noexcept : + mySize(std::move(theOther.mySize)), + myCapacity(std::move(theOther.myCapacity)), + myArray(std::move(theOther.myArray)) +{ + theOther.myCapacity = 0; + theOther.mySize = 0; + theOther.myArray = nullptr; +} + +//======================================================================= +//function : Append +//purpose : +//======================================================================= +void NCollection_BasePointerVector::Append (const void* thePnt) +{ + if (mySize == myCapacity) + { + if (myCapacity == 0) + { + myCapacity = 8; // the most optimal initial value + } + else + { + myCapacity <<= 1; + } + myArray = myAllocator.reallocate(myArray, myCapacity); + } + myArray[mySize++] = (void*)thePnt; +} + +//======================================================================= +//function : SetValue +//purpose : +//======================================================================= +void NCollection_BasePointerVector::SetValue (const size_t theInd, const void* thePnt) +{ + if (theInd >= myCapacity) + { + if (myCapacity == 0) + { + myCapacity = 8; // the most optimal initial value + } + while (myCapacity < theInd) + { + myCapacity <<= 1; + } + myArray = myAllocator.reallocate(myArray, myCapacity); + memset(myArray + mySize, 0, (theInd - mySize) * sizeof(void**)); + mySize = theInd; + } + myArray[theInd] = (void*)thePnt; +} + +//======================================================================= +//function : clear +//purpose : +//======================================================================= +void NCollection_BasePointerVector::clear() +{ + if (myCapacity > 0) + { + myAllocator.deallocate(myArray, myCapacity); + } + myArray = nullptr; + myCapacity = 0; +} + +//======================================================================= +//function : operator= +//purpose : +//======================================================================= +NCollection_BasePointerVector& NCollection_BasePointerVector::operator=(const NCollection_BasePointerVector& theOther) +{ + if (this == &theOther) + { + return *this; + } + mySize = theOther.mySize; + if (myCapacity < theOther.myCapacity) + { + clear(); + myCapacity = theOther.myCapacity; + myArray = myAllocator.allocate(myCapacity); + } + memcpy(myArray, theOther.myArray, mySize * sizeof(void*)); + return *this; +} + +//======================================================================= +//function : operator= +//purpose : +//======================================================================= +NCollection_BasePointerVector& NCollection_BasePointerVector::operator=(NCollection_BasePointerVector&& theOther) noexcept +{ + if (this == &theOther) + { + return *this; + } + clear(); + mySize = std::move(theOther.mySize); + myCapacity = std::move(theOther.myCapacity); + myArray = std::move(theOther.myArray); + theOther.myCapacity = 0; + theOther.mySize = 0; + theOther.myArray = nullptr; + return *this; +} \ No newline at end of file diff --git a/src/NCollection/NCollection_BasePointerVector.hxx b/src/NCollection/NCollection_BasePointerVector.hxx new file mode 100644 index 0000000000..866eb73e49 --- /dev/null +++ b/src/NCollection/NCollection_BasePointerVector.hxx @@ -0,0 +1,107 @@ +// Copyright (c) 2023 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 NCollection_BasePointerVector_HeaderFile +#define NCollection_BasePointerVector_HeaderFile + +#include + +#include +#include + +//! Simplified class for vector of pointers of void. +//! Offers basic functionality to scalable inserts, +//! resizes and erasing last. +//! +//! Control of processing values of pointers out-of-scope +//! and should be controlled externally. +//! Especially, copy operation should post-process elements of pointers to make deep copy. +class NCollection_BasePointerVector +{ +public: + //! Memory allocation + DEFINE_STANDARD_ALLOC + DEFINE_NCOLLECTION_ALLOC + +public: + + //! Default constructor + NCollection_BasePointerVector() {} + + //! Copy data from another vector + Standard_EXPORT NCollection_BasePointerVector(const NCollection_BasePointerVector& theOther); + + //! Move data from another vector + Standard_EXPORT NCollection_BasePointerVector(NCollection_BasePointerVector&& theOther) noexcept; + + //! Destroy container + ~NCollection_BasePointerVector() { clear(); } + + //! Checks for an empty status + bool IsEmpty() const { return mySize == 0; } + + //! Gets used size + size_t Size() const { return mySize; } + + //! Gets available capacity + size_t Capacity() const { return myCapacity; } + + //! Erases last element, decrements size. + void RemoveLast() { mySize--; } + + //! Resets the size + void Clear(const bool theReleaseMemory = false) + { + if (theReleaseMemory) + clear(); + mySize = 0; + } + +public: + + //! Gets array, can be null + void** GetArray() const { return myArray; } + + //! Gets value by index, no acess validation + void* Value (const size_t theInd) const { return myArray[theInd]; } + +public: + + //! Inserts new element at the end, increase size, + //! if capacity is not enough, call resize. + Standard_EXPORT void Append (const void* thePnt); + + //! Updates value of existed element, + //! If index more then size, increase size of container, + //! in this case capacity can be updated. + Standard_EXPORT void SetValue (const size_t theInd, const void* thePnt); + + //! Copy vector + Standard_EXPORT NCollection_BasePointerVector& operator= (const NCollection_BasePointerVector& theOther); + + //! Move vector + Standard_EXPORT NCollection_BasePointerVector& operator= (NCollection_BasePointerVector&& theOther) noexcept; + +private: + + //! Deallocate array + Standard_EXPORT void clear(); + +private: + size_t mySize = 0; //!< Used length of vector + size_t myCapacity = 0; //!< Allocated vector size + void** myArray = nullptr; //! Array of pointers + NCollection_Allocator myAllocator; +}; + +#endif diff --git a/src/NCollection/NCollection_BaseVector.cxx b/src/NCollection/NCollection_BaseVector.cxx deleted file mode 100755 index ba7f790021..0000000000 --- a/src/NCollection/NCollection_BaseVector.cxx +++ /dev/null @@ -1,149 +0,0 @@ -// Created on: 2002-04-24 -// Created by: Alexander GRIGORIEV -// Copyright (c) 2002-2013 OPEN CASCADE SAS -// -// This file is part of Open CASCADE Technology software library. -// -// This library is free software; you can redistribute it and/or modify it under -// the terms of the GNU Lesser General Public License version 2.1 as published -// by the Free Software Foundation, with special exception defined in the file -// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT -// distribution for complete text of the license and disclaimer of any warranty. -// -// Alternatively, this file may be used under the terms of Open CASCADE -// commercial license or contractual agreement. - -#include - -#include - -//======================================================================= -//function : initV -//purpose : Initialisation of iterator by a vector -//======================================================================= - -void NCollection_BaseVector::Iterator::initV (const NCollection_BaseVector& theVector, Standard_Boolean theToEnd) -{ - myVector = &theVector; - - if (theVector.myNBlocks == 0) - { - myCurIndex = 0; - myEndIndex = 0; - myICurBlock = 0; - myIEndBlock = 0; - } - else - { - myIEndBlock = theVector.myNBlocks - 1; - myEndIndex = theVector.myData[myIEndBlock].Length; - - myICurBlock = !theToEnd ? 0 : myIEndBlock; - myCurIndex = !theToEnd ? 0 : myEndIndex; - } -} - -//======================================================================= -//function : allocMemBlocks -//purpose : -//======================================================================= - -NCollection_BaseVector::MemBlock* NCollection_BaseVector - ::allocMemBlocks (const Standard_Integer theCapacity, - MemBlock* theSource, - const Standard_Integer theSourceSize) -{ - MemBlock* aData = (MemBlock* )myAllocator->Allocate (theCapacity * sizeof(MemBlock)); - - // copy content from source array - Standard_Integer aCapacity = 0; - if (theSource != NULL) - { - memcpy (aData, theSource, theSourceSize * sizeof(MemBlock)); - aCapacity = theSourceSize; - myAllocator->Free (theSource); - } - - // Nullify newly allocated blocks - if (aCapacity < theCapacity) - { - memset (&aData[aCapacity], 0, (theCapacity - aCapacity) * sizeof(MemBlock)); - } - return aData; -} - -//======================================================================= -//function : Clear -//purpose : -//======================================================================= - -void NCollection_BaseVector::Clear() -{ - if (myLength > 0) - { - for (Standard_Integer anItemIter = 0; anItemIter < myCapacity; ++anItemIter) - { - myInitBlocks (*this, myData[anItemIter], 0, 0); - } - myLength = 0; - myNBlocks = 0; - } -} - -//======================================================================= -//function : expandV -//purpose : returns the pointer where the new data item is supposed to be put -//======================================================================= - -void* NCollection_BaseVector::expandV (const Standard_Integer theIndex) -{ - const Standard_Integer aNewLength = theIndex + 1; - if (myNBlocks > 0) - { - // Take the last array in the vector of arrays - MemBlock& aLastBlock = myData[myNBlocks - 1]; - Standard_RangeError_Raise_if (theIndex < aLastBlock.FirstIndex, - "NColelction_BaseVector::expandV"); - Standard_Integer anIndLastBlock = theIndex - aLastBlock.FirstIndex; - // Is there still room for 1 item in the last array? - if (anIndLastBlock < aLastBlock.Size) - { - myLength = aNewLength; - aLastBlock.Length = anIndLastBlock + 1; - return aLastBlock.findV (anIndLastBlock, myItemSize); - } - myLength = aLastBlock.FirstIndex + aLastBlock.Size; - } - - // There is no room in the last array - // or the whole vector is not yet initialised. - // Initialise a new array, but before that check whether it is available within myCapacity. - const Standard_Integer nNewBlock = myNBlocks + 1 + (theIndex - myLength) / myIncrement; - if (myCapacity < nNewBlock) - { - // Reallocate the array myData - do myCapacity += GetCapacity(myIncrement); while (myCapacity <= nNewBlock); - - myData = allocMemBlocks (myCapacity, myData, myNBlocks); - } - if (myNBlocks > 0) - { - // Change length of old last block to myIncrement - MemBlock& aLastBlock = myData[myNBlocks - 1]; - aLastBlock.Length = myIncrement; - } - - // Initialise new blocks - MemBlock* aNewBlock = &myData[myNBlocks++]; - myInitBlocks (*this, *aNewBlock, myLength, myIncrement); - while (myNBlocks < nNewBlock) - { - aNewBlock->Length = myIncrement; - myLength += myIncrement; - aNewBlock = &myData[myNBlocks++]; - myInitBlocks (*this, *aNewBlock, myLength, myIncrement); - } - aNewBlock->Length = aNewLength - myLength; - myLength = aNewLength; - return aNewBlock->findV (theIndex - aNewBlock->FirstIndex, myItemSize); -} diff --git a/src/NCollection/NCollection_BaseVector.hxx b/src/NCollection/NCollection_BaseVector.hxx deleted file mode 100755 index 26a41c7d7f..0000000000 --- a/src/NCollection/NCollection_BaseVector.hxx +++ /dev/null @@ -1,237 +0,0 @@ -// Created on: 2002-04-24 -// Created by: Alexander GRIGORIEV -// Copyright (c) 2002-2013 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 NCollection_BaseVector_HeaderFile -#define NCollection_BaseVector_HeaderFile - -#include -#include -#include -#include - -// this value defines the number of blocks that are reserved -// when the capacity of vector is increased -inline Standard_Integer GetCapacity (const Standard_Integer theIncrement) -{ - return Max(theIncrement/8, 1); -} - -//! Class NCollection_BaseVector - base for NCollection_Vector template -class NCollection_BaseVector -{ -public: - //! Memory allocation - DEFINE_STANDARD_ALLOC - DEFINE_NCOLLECTION_ALLOC - -protected: - - // Auxiliary structure for memory blocks - struct MemBlock - { - - public: - - //! @param theIndex Item index in the block - //! @param theItemSize Element size in bytes - //! @return the address of specified item in this memory block - void* findV (const Standard_Integer theIndex, - const size_t theItemSize) const - { - return (char* )DataPtr + size_t(theIndex) * theItemSize; - } - - public: - - void* DataPtr; //!< block of elements - Standard_Integer FirstIndex; //!< index of the first element (among all memory blocks in collection) - Standard_Integer Length; - Standard_Integer Size; - - }; - - //! Base class for Iterator implementation - class Iterator - { - protected: - Iterator() - : myVector (nullptr), - myICurBlock (0), - myIEndBlock (0), - myCurIndex (0), - myEndIndex (0) {} - - Iterator (const NCollection_BaseVector& theVector, Standard_Boolean theToEnd = Standard_False) - { - initV (theVector, theToEnd); - } - - Standard_EXPORT void initV (const NCollection_BaseVector& theVector, Standard_Boolean theToEnd = Standard_False); - - Standard_Boolean moreV() const - { - return (myICurBlock < myIEndBlock || myCurIndex < myEndIndex); - } - - void nextV() - { - if (++myCurIndex >= myVector->myData[myICurBlock].Length - && myICurBlock < myIEndBlock) - { - ++myICurBlock; - myCurIndex = 0; - } - } - - void prevV() - { - if (--myCurIndex < 0 && myICurBlock > 0) - { - --myICurBlock; - myCurIndex = myVector->myData[myICurBlock].Length - 1; - } - } - - void offsetV (Standard_Integer theOffset) - { - const Standard_Integer anIndex = myCurIndex + myICurBlock * myVector->myIncrement + theOffset; - myICurBlock = anIndex / myVector->myIncrement; - myCurIndex = anIndex % myVector->myIncrement; - if (myICurBlock > myIEndBlock) - { - // make sure that iterator produced by Offset() - // is equal to the end() iterator - --myICurBlock; - myCurIndex += myVector->myIncrement; - } - } - - Standard_Integer differV (const Iterator& theOther) const - { - return (myCurIndex - theOther.myCurIndex) + (myICurBlock - theOther.myICurBlock) * myVector->myIncrement; - } - - const MemBlock* curBlockV() const - { - return &myVector->myData[myICurBlock]; - } - - protected: - const NCollection_BaseVector* myVector; //!< the Master vector - Standard_Integer myICurBlock; //!< # of the current block - Standard_Integer myIEndBlock; - Standard_Integer myCurIndex; //!< Index in the current block - Standard_Integer myEndIndex; - }; - -protected: //! @name Block initializer - - typedef void (*initMemBlocks_t) (NCollection_BaseVector& theVector, - MemBlock& theBlock, - const Standard_Integer theFirst, - const Standard_Integer theSize); - - //! Allocate memory for array of memory blocks. - //! @param theCapacity Number of memory blocks in array - //! @param theSource Original array of memory blocks, will be automatically deallocated - //! @param theSourceSize Number of memory blocks in original array - Standard_EXPORT MemBlock* allocMemBlocks (const Standard_Integer theCapacity, - MemBlock* theSource = NULL, - const Standard_Integer theSourceSize = 0); - -protected: //! @name protected methods - - //! Empty constructor - NCollection_BaseVector (const Handle(NCollection_BaseAllocator)& theAllocator, - initMemBlocks_t theInitBlocks, - const size_t theSize, - const Standard_Integer theInc) - : myItemSize (theSize), - myIncrement (theInc), - myLength (0), - myCapacity (GetCapacity (myIncrement)), - myNBlocks (0), - myInitBlocks (theInitBlocks) - { - myAllocator = (theAllocator.IsNull() ? NCollection_BaseAllocator::CommonBaseAllocator() : theAllocator); - myData = allocMemBlocks (myCapacity); - } - - //! Copy constructor - NCollection_BaseVector (const Handle(NCollection_BaseAllocator)& theAllocator, - initMemBlocks_t theInitBlocks, - const NCollection_BaseVector& theOther) - : myItemSize (theOther.myItemSize), - myIncrement (theOther.myIncrement), - myLength (theOther.myLength), - myCapacity (GetCapacity(myIncrement) + theOther.myLength / theOther.myIncrement), - myNBlocks (theOther.myLength == 0 ? 0 : 1 + (theOther.myLength - 1)/theOther.myIncrement), - myInitBlocks (theInitBlocks) - { - myAllocator = (theAllocator.IsNull() ? NCollection_BaseAllocator::CommonBaseAllocator() : theAllocator); - myData = allocMemBlocks (myCapacity); - } - - //! Destructor - virtual ~NCollection_BaseVector() {} - - //! @return pointer to memory where to put the new item - Standard_EXPORT void* expandV (const Standard_Integer theIndex); - - //! Locate the memory holding the desired value - inline void* findV (const Standard_Integer theIndex) const - { - Standard_OutOfRange_Raise_if (theIndex < 0 || theIndex >= myLength, - "NCollection_BaseVector::findV"); - const Standard_Integer aBlock = theIndex / myIncrement; - return myData[aBlock].findV (theIndex - aBlock * myIncrement, myItemSize); - } - -public: //! @name public API - - //! Empty the vector of its objects - Standard_EXPORT void Clear(); - // to set the size of increment dynamically - void SetIncrement(const Standard_Integer aIncrement) { - if (aIncrement > 0) { - if (!myIncrement) { - myIncrement=aIncrement; - } - } - } - - //! Returns attached allocator - const Handle(NCollection_BaseAllocator)& Allocator() const - { - return myAllocator; - } - -protected: //! @name Protected fields - - Handle(NCollection_BaseAllocator) myAllocator; - size_t myItemSize; - Standard_Integer myIncrement; - Standard_Integer myLength; - Standard_Integer myCapacity; - Standard_Integer myNBlocks; - MemBlock* myData; - initMemBlocks_t myInitBlocks; - -protected: - - friend class Iterator; -}; - -#endif // NCollection_BaseVector_HeaderFile diff --git a/src/NCollection/NCollection_CellFilter.hxx b/src/NCollection/NCollection_CellFilter.hxx index f57a94273a..1663456b03 100644 --- a/src/NCollection/NCollection_CellFilter.hxx +++ b/src/NCollection/NCollection_CellFilter.hxx @@ -18,9 +18,9 @@ #include #include +#include #include #include -#include //! Auxiliary enumeration serving as responce from method Inspect enum NCollection_CellFilter_Action @@ -112,8 +112,8 @@ enum NCollection_CellFilter_Action template class NCollection_CellFilter { public: - typedef TYPENAME Inspector::Target Target; - typedef TYPENAME Inspector::Point Point; + typedef typename Inspector::Target Target; + typedef typename Inspector::Point Point; public: @@ -317,40 +317,33 @@ protected: return Standard_True; } - //! Returns hash code for this cell, in the range [1, theUpperBound] - //! @param theUpperBound the upper bound of the range a computing hash code must be within - //! @return a computed hash code, in the range [1, theUpperBound] - Standard_Integer HashCode (const Standard_Integer theUpperBound) const + bool operator==(const Cell& theOther) const { - // number of bits per each dimension in the hash code - const std::size_t aDim = index.Size(); - const std::size_t aShiftBits = (BITS (Cell_IndexType) - 1) / aDim; - std::size_t aCode = 0; - - for (std::size_t i = 0; i < aDim; ++i) - { - aCode = (aCode << aShiftBits) ^ std::size_t(index[i]); - } - - return ::HashCode(aCode, theUpperBound); + return IsEqual(theOther); } public: NCollection_LocalArray index; ListNode *Objects; }; - - //! Returns hash code for the given cell, in the range [1, theUpperBound] - //! @param theCell the cell object which hash code is to be computed - //! @param theUpperBound the upper bound of the range a computing hash code must be within - //! @return a computed hash code, in the range [1, theUpperBound] - friend Standard_Integer HashCode (const Cell& theCell, const Standard_Integer theUpperBound) + + struct CellHasher { - return theCell.HashCode (theUpperBound); - } + size_t operator()(const Cell& theCell) const noexcept + { + // number of bits per each dimension in the hash code + const std::size_t aDim = theCell.index.Size(); + return opencascade::hashBytes(&theCell.index[0], static_cast(aDim * sizeof(Cell_IndexType))); + } - friend Standard_Boolean IsEqual (const Cell &aCell1, const Cell &aCell2) - { return aCell1.IsEqual(aCell2); } + bool operator()(const Cell& theCell1, + const Cell& theCell2) const noexcept + { + return theCell1 == theCell2; + } + }; + + typedef NCollection_Map CellMap; protected: @@ -498,7 +491,7 @@ protected: protected: Standard_Integer myDim; Handle(NCollection_BaseAllocator) myAllocator; - NCollection_Map myCells; + CellMap myCells; NCollection_Array1 myCellSize; }; diff --git a/src/NCollection/NCollection_DataMap.hxx b/src/NCollection/NCollection_DataMap.hxx index ba22e36d42..37463820a3 100644 --- a/src/NCollection/NCollection_DataMap.hxx +++ b/src/NCollection/NCollection_DataMap.hxx @@ -23,6 +23,9 @@ #include #include +#include + +#include /** * Purpose: The DataMap is a Map to store keys with associated @@ -65,6 +68,27 @@ public: NCollection_TListNode (theItem, theNext), myKey(theKey) {} + //! Constructor with 'Next' + DataMapNode (const TheKeyType& theKey, + TheItemType&& theItem, + NCollection_ListNode* theNext) : + NCollection_TListNode (std::forward(theItem), theNext), + myKey(theKey) + {} + //! Constructor with 'Next' + DataMapNode (TheKeyType&& theKey, + const TheItemType& theItem, + NCollection_ListNode* theNext) : + NCollection_TListNode (theItem, theNext), + myKey(std::forward(theKey)) + {} + //! Constructor with 'Next' + DataMapNode (TheKeyType&& theKey, + TheItemType&& theItem, + NCollection_ListNode* theNext) : + NCollection_TListNode (std::forward(theItem), theNext), + myKey(std::forward(theKey)) + {} //! Key const TheKeyType& Key (void) const @@ -151,7 +175,19 @@ public: //! Copy constructor NCollection_DataMap (const NCollection_DataMap& theOther) : NCollection_BaseMap (theOther.NbBuckets(), Standard_True, theOther.myAllocator) - { *this = theOther; } + { + const int anExt = theOther.Extent(); + if (anExt <= 0) + return; + ReSize(anExt - 1); + for (Iterator anIter(theOther); anIter.More(); anIter.Next()) + Bind(anIter.Key(), anIter.Value()); + } + + //! Move constructor + NCollection_DataMap(NCollection_DataMap&& theOther) noexcept : + NCollection_BaseMap(std::forward(theOther)) + {} //! Exchange the content of two maps without re-allocations. //! Notice that allocators will be swapped as well! @@ -185,6 +221,15 @@ public: return Assign (theOther); } + //! Move operator + NCollection_DataMap& operator= (NCollection_DataMap&& theOther) noexcept + { + if (this == &theOther) + return *this; + exchangeMapsData(theOther); + return *this; + } + //! ReSize void ReSize (const Standard_Integer N) { @@ -197,15 +242,14 @@ public: { DataMapNode** olddata = (DataMapNode**) myData1; DataMapNode *p, *q; - Standard_Integer i,k; - for (i = 0; i <= NbBuckets(); i++) + for (int i = 0; i <= NbBuckets(); i++) { if (olddata[i]) { p = olddata[i]; while (p) { - k = Hasher::HashCode(p->Key(),newBuck); + const size_t k = HashCode(p->Key(),newBuck); q = (DataMapNode*) p->Next(); p->Next() = newdata[k]; newdata[k] = p; @@ -220,49 +264,172 @@ public: //! Bind binds Item to Key in map. //! @param theKey key to add/update - //! @param theItem new item; overrides value previously bound to the key, if any + //! @param theItem new item; overrides value previously bound to the key //! @return Standard_True if Key was not bound already Standard_Boolean Bind (const TheKeyType& theKey, const TheItemType& theItem) { if (Resizable()) ReSize(Extent()); + size_t aHash; + DataMapNode* aNode; + if (lookup(theKey, aNode, aHash)) + { + aNode->ChangeValue() = theItem; + return Standard_False; + } DataMapNode** data = (DataMapNode**)myData1; - Standard_Integer k = Hasher::HashCode (theKey, NbBuckets()); - DataMapNode* p = data[k]; - while (p) + data[aHash] = new (this->myAllocator) DataMapNode (theKey, theItem, data[aHash]); + Increment(); + return Standard_True; + } + + //! Bind binds Item to Key in map. + //! @param theKey key to add/update + //! @param theItem new item; overrides value previously bound to the key + //! @return Standard_True if Key was not bound already + Standard_Boolean Bind (TheKeyType&& theKey, const TheItemType& theItem) + { + if (Resizable()) + ReSize(Extent()); + size_t aHash; + DataMapNode* aNode; + if (lookup(theKey, aNode, aHash)) { - if (Hasher::IsEqual(p->Key(), theKey)) - { - p->ChangeValue() = theItem; - return Standard_False; - } - p = (DataMapNode *) p->Next(); + aNode->ChangeValue() = theItem; + return Standard_False; + } + DataMapNode** data = (DataMapNode**)myData1; + data[aHash] = new (this->myAllocator) DataMapNode (std::forward(theKey), theItem, data[aHash]); + Increment(); + return Standard_True; + } + + //! Bind binds Item to Key in map. + //! @param theKey key to add/update + //! @param theItem new item; overrides value previously bound to the key + //! @return Standard_True if Key was not bound already + Standard_Boolean Bind (const TheKeyType& theKey, TheItemType&& theItem) + { + if (Resizable()) + ReSize(Extent()); + size_t aHash; + DataMapNode* aNode; + if (lookup(theKey, aNode, aHash)) + { + aNode->ChangeValue() = std::forward(theItem); + return Standard_False; + } + DataMapNode** data = (DataMapNode**)myData1; + data[aHash] = new (this->myAllocator) DataMapNode (theKey, std::forward(theItem), data[aHash]); + Increment(); + return Standard_True; + } + + //! Bind binds Item to Key in map. + //! @param theKey key to add/update + //! @param theItem new item; overrides value previously bound to the key + //! @return Standard_True if Key was not bound already + Standard_Boolean Bind (TheKeyType&& theKey, TheItemType&& theItem) + { + if (Resizable()) + ReSize(Extent()); + size_t aHash; + DataMapNode* aNode; + if (lookup(theKey, aNode, aHash)) + { + aNode->ChangeValue() = theItem; + return Standard_False; } - data[k] = new (this->myAllocator) DataMapNode (theKey, theItem, data[k]); + DataMapNode** data = (DataMapNode**)myData1; + data[aHash] = new (this->myAllocator) DataMapNode (std::forward(theKey), + std::forward(theItem), data[aHash]); Increment(); return Standard_True; } - //! Bound binds Item to Key in map. Returns modifiable Item + //! Bound binds Item to Key in map. + //! @param theKey key to add/update + //! @param theItem new item; overrides value previously bound to the key + //! @return pointer to modifiable Item TheItemType* Bound (const TheKeyType& theKey, const TheItemType& theItem) { if (Resizable()) ReSize(Extent()); + size_t aHash; + DataMapNode* aNode; + if (lookup(theKey, aNode, aHash)) + { + aNode->ChangeValue() = theItem; + return &aNode->ChangeValue(); + } DataMapNode** data = (DataMapNode**)myData1; - Standard_Integer k = Hasher::HashCode (theKey, NbBuckets()); - DataMapNode* p = data[k]; - while (p) + data[aHash] = new (this->myAllocator) DataMapNode (theKey, theItem, data[aHash]); + Increment(); + return &data[aHash]->ChangeValue(); + } + + //! Bound binds Item to Key in map. + //! @param theKey key to add/update + //! @param theItem new item; overrides value previously bound to the key + //! @return pointer to modifiable Item + TheItemType* Bound (TheKeyType&& theKey, const TheItemType& theItem) + { + if (Resizable()) + ReSize(Extent()); + size_t aHash; + DataMapNode* aNode; + if (lookup(theKey, aNode, aHash)) { - if (Hasher::IsEqual(p->Key(), theKey)) - { - p->ChangeValue() = theItem; - return &p->ChangeValue(); - } - p = (DataMapNode*)p->Next(); + aNode->ChangeValue() = theItem; + return &aNode->ChangeValue(); + } + DataMapNode** data = (DataMapNode**)myData1; + data[aHash] = new (this->myAllocator) DataMapNode (std::forward(theKey), theItem, data[aHash]); + Increment(); + return &data[aHash]->ChangeValue(); + } + + //! Bound binds Item to Key in map. + //! @param theKey key to add/update + //! @param theItem new item; overrides value previously bound to the key + //! @return pointer to modifiable Item + TheItemType* Bound (const TheKeyType& theKey, TheItemType&& theItem) + { + if (Resizable()) + ReSize(Extent()); + size_t aHash; + DataMapNode* aNode; + if (lookup(theKey, aNode, aHash)) + { + aNode->ChangeValue() = std::forward(theItem); + return &aNode->ChangeValue(); } - data[k] = new (this->myAllocator) DataMapNode (theKey, theItem, data[k]); + DataMapNode** data = (DataMapNode**)myData1; + data[aHash] = new (this->myAllocator) DataMapNode (theKey, std::forward(theItem), data[aHash]); + Increment(); + return &data[aHash]->ChangeValue(); + } + + //! Bound binds Item to Key in map. + //! @param theKey key to add/update + //! @param theItem new item; overrides value previously bound to the key + //! @return pointer to modifiable Item + TheItemType* Bound (TheKeyType&& theKey, TheItemType&& theItem) + { + if (Resizable()) + ReSize(Extent()); + size_t aHash; + DataMapNode* aNode; + if (lookup(theKey, aNode, aHash)) + { + aNode->ChangeValue() = std::forward(theItem); + return &aNode->ChangeValue(); + } + DataMapNode** data = (DataMapNode**)myData1; + data[aHash] = new (this->myAllocator) DataMapNode (std::forward(theKey), + std::forward(theItem), data[aHash]); Increment(); - return &data[k]->ChangeValue(); + return &data[aHash]->ChangeValue(); } //! IsBound @@ -278,12 +445,12 @@ public: if (IsEmpty()) return Standard_False; DataMapNode** data = (DataMapNode**) myData1; - Standard_Integer k = Hasher::HashCode(theKey,NbBuckets()); + const size_t k = HashCode(theKey,NbBuckets()); DataMapNode* p = data[k]; DataMapNode* q = NULL; while (p) { - if (Hasher::IsEqual(p->Key(), theKey)) + if (IsEqual(p->Key(), theKey)) { Decrement(); if (q) @@ -361,20 +528,20 @@ public: //! Clear data. If doReleaseMemory is false then the table of //! buckets is not released and will be reused. - void Clear(const Standard_Boolean doReleaseMemory = Standard_True) + void Clear(const Standard_Boolean doReleaseMemory = Standard_False) { Destroy (DataMapNode::delNode, doReleaseMemory); } //! Clear data and reset allocator void Clear (const Handle(NCollection_BaseAllocator)& theAllocator) { - Clear(); + Clear(theAllocator != this->myAllocator); this->myAllocator = ( ! theAllocator.IsNull() ? theAllocator : NCollection_BaseAllocator::CommonBaseAllocator() ); } //! Destructor virtual ~NCollection_DataMap (void) - { Clear(); } + { Clear(true); } //! Size Standard_Integer Size(void) const @@ -382,23 +549,60 @@ public: protected: - // ---------- PROTECTED METHODS ---------- - //! Lookup for particular key in map. Returns true if key is found and - //! thepNode points to binded node. Returns false if key is not found, - //! thehNode value is this case is not usable. - Standard_Boolean lookup(const TheKeyType& theKey,DataMapNode*& thepNode) const + + //! Lookup for particular key in map. + //! @param[in] theKey key to compute hash + //! @param[out] theNode the detected node with equal key. Can be null. + //! @return true if key is found + Standard_Boolean lookup(const TheKeyType& theKey,DataMapNode*& theNode) const { if (IsEmpty()) return Standard_False; // Not found - for (thepNode = (DataMapNode*)myData1[Hasher::HashCode(theKey, NbBuckets())]; - thepNode; thepNode = (DataMapNode*)thepNode->Next()) + for (theNode = (DataMapNode*)myData1[HashCode(theKey, NbBuckets())]; + theNode; theNode = (DataMapNode*)theNode->Next()) { - if (Hasher::IsEqual(thepNode->Key(), theKey)) + if (IsEqual(theNode->Key(), theKey)) return Standard_True; } return Standard_False; // Not found } + //! Lookup for particular key in map. + //! @param[in] theKey key to compute hash + //! @param[out] theNode the detected node with equal key. Can be null. + //! @param[out] theHash computed bounded hash code for current key. + //! @return true if key is found + Standard_Boolean lookup(const TheKeyType& theKey, DataMapNode*& theNode, size_t& theHash) const + { + theHash = HashCode(theKey, NbBuckets()); + if (IsEmpty()) + return Standard_False; // Not found + for (theNode = (DataMapNode*)myData1[theHash]; + theNode; theNode = (DataMapNode*)theNode->Next()) + { + if (IsEqual(theNode->Key(), theKey)) + { + return Standard_True; + } + } + return Standard_False; // Not found + } + + bool IsEqual(const TheKeyType& theKey1, + const TheKeyType& theKey2) const + { + return myHasher(theKey1, theKey2); + } + + size_t HashCode(const TheKeyType& theKey, + const int theUpperBound) const + { + return myHasher(theKey) % theUpperBound + 1; + } + +private: + + Hasher myHasher; }; #endif diff --git a/src/NCollection/NCollection_DefaultHasher.hxx b/src/NCollection/NCollection_DefaultHasher.hxx index 6cbbf90de0..4007ea2739 100644 --- a/src/NCollection/NCollection_DefaultHasher.hxx +++ b/src/NCollection/NCollection_DefaultHasher.hxx @@ -15,72 +15,95 @@ #ifndef NCollection_DefaultHasher_HeaderFile #define NCollection_DefaultHasher_HeaderFile -#include - -//======================================================================= -//function : HashCode_Proxy -//purpose : Function is required to call the global function HashCode. -//======================================================================= - -//! Returns hash code for the given key, in the range [1, theUpperBound] -//! @tparam TheKeyType the type of the given key -//! @param theKey the key which hash code is to be computed -//! @param theUpperBound the upper bound of the range a computing hash code must be within -//! @return a computed hash code, in the range [1, theUpperBound] -template -inline Standard_Integer HashCode_Proxy (const TheKeyType& theKey, const Standard_Integer theUpperBound) -{ - return HashCode (theKey, theUpperBound); -} - -//======================================================================= -//function : IsEqual -//purpose : Default implementation of IsEqual via operator == -//======================================================================= - -template -inline Standard_Boolean IsEqual (const TheKeyType& theKey1, - const TheKeyType& theKey2) -{ - return theKey1 == theKey2; -} - -//======================================================================= -//function : IsEqual_Proxy -//purpose : Function is required to call the global function IsEqual. -//======================================================================= - -template -inline Standard_Boolean IsEqual_Proxy (const TheKeyType& theKey1, - const TheKeyType& theKey2) -{ - return IsEqual (theKey1, theKey2); -} +#include +#include +#include /** * Purpose: The DefaultHasher is a Hasher that is used by - * default in NCollection maps. + * default in NCollection maps. * To compute the hash code of the key is used the * global function HashCode. * To compare two keys is used the global function * IsEqual. */ -template class NCollection_DefaultHasher { -public: - //! Returns hash code for the given key, in the range [1, theUpperBound] - //! @param theKey the key which hash code is to be computed - //! @param theUpperBound the upper bound of the range a computing hash code must be within - //! @return a computed hash code, in the range [1, theUpperBound] - static Standard_Integer HashCode (const TheKeyType& theKey, const Standard_Integer theUpperBound) +template +DEFINE_HASHER(NCollection_DefaultHasher, TheKeyType, std::hash, std::equal_to) + + +#define DEFINE_DEFAULT_HASHER_PURE(TheKeyType) \ +template <> struct NCollection_DefaultHasher \ +{ \ + size_t operator()(const TheKeyType theKey) const noexcept \ + { \ + return static_cast(theKey); \ + } \ + \ + bool operator() (const TheKeyType theK1, \ + const TheKeyType theK2) const noexcept \ + { \ + return theK1 == theK2; \ + } \ +}; + +/// Explicit specialization for bool. +DEFINE_DEFAULT_HASHER_PURE(bool) + +/// Explicit specialization for char. +DEFINE_DEFAULT_HASHER_PURE(char) + +/// Explicit specialization for signed char. +DEFINE_DEFAULT_HASHER_PURE(signed char) + +/// Explicit specialization for unsigned char. +DEFINE_DEFAULT_HASHER_PURE(unsigned char) + +/// Explicit specialization for wchar_t. +DEFINE_DEFAULT_HASHER_PURE(wchar_t) + +/// Explicit specialization for char16_t. +DEFINE_DEFAULT_HASHER_PURE(char16_t) + +/// Explicit specialization for char32_t. +DEFINE_DEFAULT_HASHER_PURE(char32_t) + +/// Explicit specialization for short. +DEFINE_DEFAULT_HASHER_PURE(short) + +/// Explicit specialization for int. +DEFINE_DEFAULT_HASHER_PURE(int) + +/// Explicit specialization for long. +DEFINE_DEFAULT_HASHER_PURE(long) + +/// Explicit specialization for long long. +DEFINE_DEFAULT_HASHER_PURE(long long) + +/// Explicit specialization for unsigned short. +DEFINE_DEFAULT_HASHER_PURE(unsigned short) + +/// Explicit specialization for unsigned int. +DEFINE_DEFAULT_HASHER_PURE(unsigned int) + +/// Explicit specialization for unsigned long. +DEFINE_DEFAULT_HASHER_PURE(unsigned long) + +/// Explicit specialization for unsigned long long. +DEFINE_DEFAULT_HASHER_PURE(unsigned long long) + +/// Explicit specialization for pointer. +template +struct NCollection_DefaultHasher +{ + size_t operator()(const TheKeyType* theKey) const noexcept { - return HashCode_Proxy (theKey, theUpperBound); + return static_cast(reinterpret_cast(theKey)); } - // - static Standard_Boolean IsEqual(const TheKeyType& theKey1, - const TheKeyType& theKey2) { - return IsEqual_Proxy(theKey1, theKey2); + bool operator() (const TheKeyType* theK1, const TheKeyType* theK2) const noexcept + { + return theK1 == theK2; } }; diff --git a/src/NCollection/NCollection_DefineArray1.hxx b/src/NCollection/NCollection_DefineArray1.hxx deleted file mode 100644 index 74636946c3..0000000000 --- a/src/NCollection/NCollection_DefineArray1.hxx +++ /dev/null @@ -1,47 +0,0 @@ -// Created on: 2002-04-15 -// Created by: Alexander Kartomin (akm) -// Copyright (c) 2002-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. - -// Automatically created from NCollection_Array1.hxx by GAWK -// Purpose: The class Array2 represents unidimensional arrays -// of fixed size known at run time. -// The range of the index is user defined. -// An array1 can be constructed with a "C array". -// This functionality is useful to call methods expecting -// an Array1. It allows to carry the bounds inside the arrays. -// Examples: Item tab[100]; // An example with a C array -// Array1OfItem ttab (tab[0],1,100); -// Array1OfItem tttab (ttab(10),10,20); // a slice of ttab -// If you want to reindex an array from 1 to Length do : -// Array1 tab1(tab(tab.Lower()),1,tab.Length()); -// Warning: Programs client of such a class must be independent -// of the range of the first element. Then, a C++ for -// loop must be written like this -// for (i = A.Lower(); i <= A.Upper(); i++) -// Changes: In comparison to TCollection the flag isAllocated was -// renamed into myDeletable (alike in the Array2). For naming -// compatibility the method IsAllocated remained in class along -// with IsDeletable. - -#ifndef NCollection_DefineArray1_HeaderFile -#define NCollection_DefineArray1_HeaderFile - -#include - -// *********************************************** Template for Array1 class - -#define DEFINE_ARRAY1(_ClassName_, _BaseCollection_, TheItemType) \ -typedef NCollection_Array1 _ClassName_; - -#endif diff --git a/src/NCollection/NCollection_DefineArray2.hxx b/src/NCollection/NCollection_DefineArray2.hxx deleted file mode 100644 index 00d32af4bd..0000000000 --- a/src/NCollection/NCollection_DefineArray2.hxx +++ /dev/null @@ -1,36 +0,0 @@ -// Created on: 2002-04-15 -// Created by: Alexander Kartomin (akm) -// Copyright (c) 2002-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. - -// Automatically created from NCollection_Array2.hxx by GAWK -// Purpose: The class Array2 represents bi-dimensional arrays -// of fixed size known at run time. -// The ranges of indices are user defined. -// Warning: Programs clients of such class must be independent -// of the range of the first element. Then, a C++ for -// loop must be written like this -// for (i = A.LowerRow(); i <= A.UpperRow(); i++) -// for (j = A.LowerCol(); j <= A.UpperCol(); j++) - -#ifndef NCollection_DefineArray2_HeaderFile -#define NCollection_DefineArray2_HeaderFile - -#include - -// *********************************************** Template for Array2 class - -#define DEFINE_ARRAY2(_ClassName_, _BaseCollection_, TheItemType) \ -typedef NCollection_Array2 _ClassName_; - -#endif diff --git a/src/NCollection/NCollection_DefineDataMap.hxx b/src/NCollection/NCollection_DefineDataMap.hxx deleted file mode 100644 index 4c90ecb86e..0000000000 --- a/src/NCollection/NCollection_DefineDataMap.hxx +++ /dev/null @@ -1,39 +0,0 @@ -// Created on: 2002-04-24 -// Created by: Alexander KARTOMIN (akm) -// Copyright (c) 2002-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. - -// Purpose: The DataMap is a Map to store keys with associated -// Items. See Map from NCollection for a discussion -// about the number of buckets. -// The DataMap can be seen as an extended array where -// the Keys are the indices. For this reason the -// operator () is defined on DataMap to fetch an Item -// from a Key. So the following syntax can be used : -// anItem = aMap(aKey); -// aMap(aKey) = anItem; -// This analogy has its limit. aMap(aKey) = anItem -// can be done only if aKey was previously bound to -// an item in the map. - -#ifndef NCollection_DefineDataMap_HeaderFile -#define NCollection_DefineDataMap_HeaderFile - -#include - -// *********************************************** Class DataMap ************* - -#define DEFINE_DATAMAP(_ClassName_, _BaseCollection_, TheKeyType, TheItemType) \ -typedef NCollection_DataMap _ClassName_; - -#endif diff --git a/src/NCollection/NCollection_DefineDoubleMap.hxx b/src/NCollection/NCollection_DefineDoubleMap.hxx deleted file mode 100644 index e6a1188a6e..0000000000 --- a/src/NCollection/NCollection_DefineDoubleMap.hxx +++ /dev/null @@ -1,31 +0,0 @@ -// Created on: 2002-04-24 -// Created by: Alexander KARTOMIN (akm) -// Copyright (c) 2002-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. - -// Purpose: The DoubleMap is used to bind pairs (Key1,Key2) -// and retrieve them in linear time. -// See Map from NCollection for a discussion about the number -// of buckets - -#ifndef NCollection_DefineDoubleMap_HeaderFile -#define NCollection_DefineDoubleMap_HeaderFile - -#include - -// *********************************************** Class DoubleMap ************ - -#define DEFINE_DOUBLEMAP(_ClassName_, _BaseCollection_, TheKey1Type, TheKey2Type) \ -typedef NCollection_DoubleMap _ClassName_; - -#endif diff --git a/src/NCollection/NCollection_DefineHArray1.hxx b/src/NCollection/NCollection_DefineHArray1.hxx index d1da5ee2f8..3ce18913dc 100644 --- a/src/NCollection/NCollection_DefineHArray1.hxx +++ b/src/NCollection/NCollection_DefineHArray1.hxx @@ -19,13 +19,12 @@ #define NCollection_DefineHArray1_HeaderFile #include -#include #include // Declaration of Array1 class managed by Handle #define DEFINE_HARRAY1(HClassName, _Array1Type_) \ -class HClassName : public _Array1Type_, public Standard_Transient { \ +class HClassName : public _Array1Type_, public Standard_Transient { \ public: \ DEFINE_STANDARD_ALLOC \ DEFINE_NCOLLECTION_ALLOC \ @@ -37,15 +36,18 @@ class HClassName : public _Array1Type_, public Standard_Transient { const Standard_Integer theUpper, \ const _Array1Type_::value_type& theValue) : \ _Array1Type_ (theLower,theUpper) { Init (theValue); } \ + explicit HClassName (const typename _Array1Type_::value_type& theBegin, \ + const Standard_Integer theLower, \ + const Standard_Integer theUpper, \ + const bool) : \ + _Array1Type_ (theBegin,theLower,theUpper) {} \ HClassName (const _Array1Type_& theOther) : _Array1Type_(theOther) {} \ const _Array1Type_& Array1 () const { return *this; } \ _Array1Type_& ChangeArray1 () { return *this; } \ - DEFINE_STANDARD_RTTI_INLINE(HClassName,Standard_Transient) \ + DEFINE_STANDARD_RTTI_INLINE(HClassName,Standard_Transient) \ }; \ DEFINE_STANDARD_HANDLE (HClassName, Standard_Transient) -#define IMPLEMENT_HARRAY1(HClassName) - - +#define IMPLEMENT_HARRAY1(HClassName) #endif diff --git a/src/NCollection/NCollection_DefineHArray2.hxx b/src/NCollection/NCollection_DefineHArray2.hxx index 1f35b90c0c..17123daaae 100644 --- a/src/NCollection/NCollection_DefineHArray2.hxx +++ b/src/NCollection/NCollection_DefineHArray2.hxx @@ -19,7 +19,6 @@ #define NCollection_DefineHArray2_HeaderFile #include -#include #include // Declaration of Array2 class managed by Handle diff --git a/src/NCollection/NCollection_DefineHSequence.hxx b/src/NCollection/NCollection_DefineHSequence.hxx index 9973d9b866..05aa83ed9d 100644 --- a/src/NCollection/NCollection_DefineHSequence.hxx +++ b/src/NCollection/NCollection_DefineHSequence.hxx @@ -19,7 +19,6 @@ #define NCollection_DefineHSequence_HeaderFile #include -#include #include // Declaration of Sequence class managed by Handle diff --git a/src/NCollection/NCollection_DefineHasher.hxx b/src/NCollection/NCollection_DefineHasher.hxx new file mode 100644 index 0000000000..23e518d163 --- /dev/null +++ b/src/NCollection/NCollection_DefineHasher.hxx @@ -0,0 +1,32 @@ +// Copyright (c) 2023 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 NCollection_DefineHasher_HeaderFile +#define NCollection_DefineHasher_HeaderFile + +#define DEFINE_HASHER(HasherName, TheKeyType, HashFunctor, EqualFunctor) \ +struct HasherName : protected HashFunctor, EqualFunctor \ +{ \ + size_t operator()(const TheKeyType& theKey) const noexcept \ + { \ + return HashFunctor::operator()(theKey); \ + } \ + \ + bool operator() (const TheKeyType& theK1, \ + const TheKeyType& theK2) const noexcept \ + { \ + return EqualFunctor::operator()(theK1, theK2); \ + } \ +}; + +#endif diff --git a/src/NCollection/NCollection_DefineIndexedDataMap.hxx b/src/NCollection/NCollection_DefineIndexedDataMap.hxx deleted file mode 100644 index aa75b384da..0000000000 --- a/src/NCollection/NCollection_DefineIndexedDataMap.hxx +++ /dev/null @@ -1,41 +0,0 @@ -// Created on: 2002-04-24 -// Created by: Alexander KARTOMIN (akm) -// Copyright (c) 2002-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. - -// Purpose: An indexed map is used to store keys and to bind -// an index to them. Each new key stored in the map -// gets an index. Index are incremented as keys are -// stored in the map. A key can be found by the index -// and an index by the key. No key but the last can -// be removed so the indices are in the range 1.. -// Extent. An Item is stored with each key. -// This class is similar to IndexedMap from -// NCollection with the Item as a new feature. Note -// the important difference on the operator (). In -// the IndexedMap this operator returns the Key. In -// the IndexedDataMap this operator returns the Item. -// See the class Map from NCollection for a -// discussion about the number of buckets. - -#ifndef NCollection_DefineIndexedDataMap_HeaderFile -#define NCollection_DefineIndexedDataMap_HeaderFile - -#include - -// *********************************************** Class IndexedDataMap ****** - -#define DEFINE_INDEXEDDATAMAP(_ClassName_, _BaseCollection_, TheKeyType, TheItemType) \ -typedef NCollection_IndexedDataMap _ClassName_; - -#endif diff --git a/src/NCollection/NCollection_DefineIndexedMap.hxx b/src/NCollection/NCollection_DefineIndexedMap.hxx deleted file mode 100644 index 77c40504ce..0000000000 --- a/src/NCollection/NCollection_DefineIndexedMap.hxx +++ /dev/null @@ -1,35 +0,0 @@ -// Created on: 2002-04-24 -// Created by: Alexander KARTOMIN (akm) -// Copyright (c) 2002-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. - -// Purpose: An indexed map is used to store keys and to bind -// an index to them. Each new key stored in the map -// gets an index. Index are incremented as keys are -// stored in the map. A key can be found by the index -// and an index by the key. No key but the last can -// be removed so the indices are in the range 1..Extent. -// See the class Map from NCollection for a -// discussion about the number of buckets. - -#ifndef NCollection_DefineIndexedMap_HeaderFile -#define NCollection_DefineIndexedMap_HeaderFile - -#include - -// *********************************************** Class IndexedMap *********** - -#define DEFINE_INDEXEDMAP(_ClassName_, _BaseCollection_, TheKeyType) \ -typedef NCollection_IndexedMap _ClassName_; - -#endif diff --git a/src/NCollection/NCollection_DefineList.hxx b/src/NCollection/NCollection_DefineList.hxx deleted file mode 100644 index ab6c28175b..0000000000 --- a/src/NCollection/NCollection_DefineList.hxx +++ /dev/null @@ -1,32 +0,0 @@ -// Created on: 2002-04-17 -// Created by: Alexander Kartomin (akm) -// Copyright (c) 2002-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. - -// Automatically created from NCollection_List.hxx by GAWK -// Purpose: Simple list to link items together keeping the first -// and the last one. -// Inherits BaseList, adding the data item to each node. - - -#ifndef NCollection_DefineList_HeaderFile -#define NCollection_DefineList_HeaderFile - -#include - -// **************************************** Template for List class ******** - -#define DEFINE_LIST(_ClassName_, _BaseCollection_, TheItemType) \ -typedef NCollection_List _ClassName_; - -#endif diff --git a/src/NCollection/NCollection_DefineMap.hxx b/src/NCollection/NCollection_DefineMap.hxx deleted file mode 100644 index d4ecbb5b1a..0000000000 --- a/src/NCollection/NCollection_DefineMap.hxx +++ /dev/null @@ -1,47 +0,0 @@ -// Created on: 2002-04-23 -// Created by: Alexander KARTOMIN (akm) -// Copyright (c) 2002-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. - -// Purpose: Single hashed Map. This Map is used to store and -// retrieve keys in linear time. -// The ::Iterator class can be used to explore the -// content of the map. It is not wise to iterate and -// modify a map in parallel. -// To compute the hashcode of the key the function -// ::HashCode must be defined in the global namespace -// To compare two keys the function ::IsEqual must be -// defined in the global namespace. -// The performance of a Map is conditioned by its -// number of buckets that should be kept greater to -// the number of keys. This map has an automatic -// management of the number of buckets. It is resized -// when the number of Keys becomes greater than the -// number of buckets. -// If you have a fair idea of the number of objects -// you can save on automatic resizing by giving a -// number of buckets at creation or using the ReSize -// method. This should be consider only for crucial -// optimisation issues. - -#ifndef NCollection_DefineMap_HeaderFile -#define NCollection_DefineMap_HeaderFile - -#include - -// *********************************************** Class Map ***************** - -#define DEFINE_MAP(_ClassName_, _BaseCollection_, TheKeyType) \ -typedef NCollection_Map _ClassName_; - -#endif diff --git a/src/NCollection/NCollection_DefineSequence.hxx b/src/NCollection/NCollection_DefineSequence.hxx deleted file mode 100644 index 3d7414e427..0000000000 --- a/src/NCollection/NCollection_DefineSequence.hxx +++ /dev/null @@ -1,31 +0,0 @@ -// Created on: 2002-03-28 -// Created by: Alexander GRIGORIEV -// Copyright (c) 2002-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. - -// Automatically created from NCollection_Sequence.hxx by GAWK -// Purpose: Definition of a sequence of elements indexed by -// an Integer in range of 1..n - - -#ifndef NCollection_DefineSequence_HeaderFile -#define NCollection_DefineSequence_HeaderFile - -#include - -// **************************************** Template for Sequence class ******** - -#define DEFINE_SEQUENCE(_ClassName_, _BaseCollection_, TheItemType) \ -typedef NCollection_Sequence _ClassName_; - -#endif diff --git a/src/NCollection/NCollection_DefineVector.hxx b/src/NCollection/NCollection_DefineVector.hxx deleted file mode 100644 index 7d8cafc57d..0000000000 --- a/src/NCollection/NCollection_DefineVector.hxx +++ /dev/null @@ -1,44 +0,0 @@ -// Created on: 2002-04-23 -// Created by: Alexander GRIGORIEV -// Copyright (c) 2002-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. - -// Automatically created from NCollection_Vector.hxx by GAWK - - -#ifndef NCollection_DefineVector_HeaderFile -#define NCollection_DefineVector_HeaderFile - -#include - -// Class NCollection_Vector (dynamic array of objects) -// This class is similar to NCollection_Array1 though the indices always start -// at 0 (in Array1 the first index must be specified) -// The Vector is always created with 0 length. It can be enlarged by two means: -// 1. Calling the method Append (val) - then "val" is added to the end of the -// vector (the vector length is incremented) -// 2. Calling the method SetValue (i, val) - if "i" is greater than or equal -// to the current length of the vector, the vector is enlarged to accomo- -// The methods Append and SetValue return a non-const reference to the copied -// object inside the vector. This reference is guaranteed to be valid until -// the vector is destroyed. It can be used to access the vector member directly -// or to pass its address to other data structures. -// The vector iterator remembers the length of the vector at the moment of the -// creation or initialisation of the iterator. Therefore the iteration begins -// at index 0 and stops at the index equal to (remembered_length-1). It is OK -// to enlarge the vector during the iteration. - -#define DEFINE_VECTOR(_ClassName_, _BaseCollection_, TheItemType) \ -typedef NCollection_Vector _ClassName_; - -#endif diff --git a/src/NCollection/NCollection_DoubleMap.hxx b/src/NCollection/NCollection_DoubleMap.hxx index 397d675be5..28404c47a0 100644 --- a/src/NCollection/NCollection_DoubleMap.hxx +++ b/src/NCollection/NCollection_DoubleMap.hxx @@ -157,8 +157,8 @@ public: { TheKey1Type aKey1 = anIter.Key1(); TheKey2Type aKey2 = anIter.Key2(); - Standard_Integer iK1 = Hasher1::HashCode (aKey1, NbBuckets()); - Standard_Integer iK2 = Hasher2::HashCode (aKey2, NbBuckets()); + const size_t iK1 = HashCode1 (aKey1, NbBuckets()); + const size_t iK2 = HashCode2 (aKey2, NbBuckets()); DoubleMapNode * pNode = new (this->myAllocator) DoubleMapNode (aKey1, aKey2, myData1[iK1], myData2[iK2]); @@ -187,16 +187,15 @@ public: if (myData1) { DoubleMapNode *p, *q; - Standard_Integer i, iK1, iK2; - for (i = 0; i <= NbBuckets(); i++) + for (int i = 0; i <= NbBuckets(); i++) { if (myData1[i]) { p = (DoubleMapNode *) myData1[i]; while (p) { - iK1 = Hasher1::HashCode (p->Key1(), newBuck); - iK2 = Hasher2::HashCode (p->Key2(), newBuck); + const size_t iK1 = HashCode1 (p->Key1(), newBuck); + const size_t iK2 = HashCode2 (p->Key2(), newBuck); q = (DoubleMapNode*) p->Next(); p->Next() = ppNewData1[iK1]; p->Next2() = (DoubleMapNode*)ppNewData2[iK2]; @@ -216,20 +215,20 @@ public: { if (Resizable()) ReSize(Extent()); - Standard_Integer iK1 = Hasher1::HashCode (theKey1, NbBuckets()); - Standard_Integer iK2 = Hasher2::HashCode (theKey2, NbBuckets()); + const size_t iK1 = HashCode1 (theKey1, NbBuckets()); + const size_t iK2 = HashCode2 (theKey2, NbBuckets()); DoubleMapNode * pNode; pNode = (DoubleMapNode *) myData1[iK1]; while (pNode) { - if (Hasher1::IsEqual (pNode->Key1(), theKey1)) + if (IsEqual1 (pNode->Key1(), theKey1)) throw Standard_MultiplyDefined("NCollection_DoubleMap:Bind"); pNode = (DoubleMapNode *) pNode->Next(); } pNode = (DoubleMapNode *) myData2[iK2]; while (pNode) { - if (Hasher2::IsEqual (pNode->Key2(), theKey2)) + if (IsEqual2 (pNode->Key2(), theKey2)) throw Standard_MultiplyDefined("NCollection_DoubleMap:Bind"); pNode = (DoubleMapNode *) pNode->Next(); } @@ -246,13 +245,13 @@ public: { if (IsEmpty()) return Standard_False; - Standard_Integer iK1 = Hasher1::HashCode (theKey1, NbBuckets()); - Standard_Integer iK2 = Hasher2::HashCode (theKey2, NbBuckets()); + const size_t iK1 = HashCode1 (theKey1, NbBuckets()); + const size_t iK2 = HashCode2 (theKey2, NbBuckets()); DoubleMapNode * pNode1, * pNode2; pNode1 = (DoubleMapNode *) myData1[iK1]; while (pNode1) { - if (Hasher1::IsEqual(pNode1->Key1(), theKey1)) + if (IsEqual1(pNode1->Key1(), theKey1)) break; pNode1 = (DoubleMapNode *) pNode1->Next(); } @@ -261,7 +260,7 @@ public: pNode2 = (DoubleMapNode *) myData2[iK2]; while (pNode2) { - if (Hasher2::IsEqual(pNode2->Key2(), theKey2)) + if (IsEqual2(pNode2->Key2(), theKey2)) break; pNode2 = (DoubleMapNode *) pNode2->Next(); } @@ -276,12 +275,12 @@ public: { if (IsEmpty()) return Standard_False; - Standard_Integer iK1 = Hasher1::HashCode (theKey1, NbBuckets()); + const size_t iK1 = HashCode1 (theKey1, NbBuckets()); DoubleMapNode * pNode1; pNode1 = (DoubleMapNode *) myData1[iK1]; while (pNode1) { - if (Hasher1::IsEqual(pNode1->Key1(), theKey1)) + if (IsEqual1(pNode1->Key1(), theKey1)) return Standard_True; pNode1 = (DoubleMapNode *) pNode1->Next(); } @@ -293,12 +292,12 @@ public: { if (IsEmpty()) return Standard_False; - Standard_Integer iK2 = Hasher2::HashCode (theKey2, NbBuckets()); + const size_t iK2 = HashCode2 (theKey2, NbBuckets()); DoubleMapNode * pNode2; pNode2 = (DoubleMapNode *) myData2[iK2]; while (pNode2) { - if (Hasher2::IsEqual(pNode2->Key2(), theKey2)) + if (IsEqual2(pNode2->Key2(), theKey2)) return Standard_True; pNode2 = (DoubleMapNode *) pNode2->Next2(); } @@ -310,20 +309,20 @@ public: { if (IsEmpty()) return Standard_False; - Standard_Integer iK1 = Hasher1::HashCode (theKey1, NbBuckets()); + const size_t iK1 = HashCode1 (theKey1, NbBuckets()); DoubleMapNode * p1, * p2, * q1, *q2; q1 = q2 = NULL; p1 = (DoubleMapNode *) myData1[iK1]; while (p1) { - if (Hasher1::IsEqual (p1->Key1(), theKey1)) + if (IsEqual1 (p1->Key1(), theKey1)) { // remove from the data1 if (q1) q1->Next() = p1->Next(); else myData1[iK1] = (DoubleMapNode*) p1->Next(); - Standard_Integer iK2 = Hasher2::HashCode (p1->Key2(), NbBuckets()); + const size_t iK2 = HashCode2 (p1->Key2(), NbBuckets()); p2 = (DoubleMapNode *) myData2[iK2]; while (p2) { @@ -355,20 +354,22 @@ public: { if (IsEmpty()) return Standard_False; - Standard_Integer iK2 = Hasher2::HashCode (theKey2, NbBuckets()); + const size_t iK2 = HashCode2 (theKey2, NbBuckets()); DoubleMapNode * p1, * p2, * q1, *q2; q1 = q2 = NULL; p2 = (DoubleMapNode *) myData2[iK2]; while (p2) { - if (Hasher2::IsEqual (p2->Key2(), theKey2)) + if (IsEqual2 (p2->Key2(), theKey2)) { // remove from the data2 if (q2) - q2->Next() = p2->Next(); + { + q2->Next2() = p2->Next2(); + } else myData2[iK2] = (DoubleMapNode*) p2->Next2(); - Standard_Integer iK1 = Hasher1::HashCode (p2->Key1(), NbBuckets()); + const size_t iK1 = HashCode1 (p2->Key1(), NbBuckets()); p1 = (DoubleMapNode *) myData1[iK1]; while (p1) { @@ -426,10 +427,10 @@ public: //! @return pointer to Key2 or NULL if Key1 is not found const TheKey2Type* Seek1 (const TheKey1Type& theKey1) const { - for (DoubleMapNode* aNode1 = !IsEmpty() ? (DoubleMapNode* )myData1[Hasher1::HashCode (theKey1, NbBuckets())] : NULL; + for (DoubleMapNode* aNode1 = !IsEmpty() ? (DoubleMapNode* )myData1[HashCode1 (theKey1, NbBuckets())] : NULL; aNode1 != NULL; aNode1 = (DoubleMapNode* )aNode1->Next()) { - if (Hasher1::IsEqual (aNode1->Key1(), theKey1)) + if (IsEqual1 (aNode1->Key1(), theKey1)) { return &aNode1->Key2(); } @@ -468,10 +469,10 @@ public: //! @return pointer to Key1 if Key2 has been found const TheKey1Type* Seek2 (const TheKey2Type& theKey2) const { - for (DoubleMapNode* aNode2 = !IsEmpty() ? (DoubleMapNode* )myData2[Hasher2::HashCode (theKey2, NbBuckets())] : NULL; + for (DoubleMapNode* aNode2 = !IsEmpty() ? (DoubleMapNode* )myData2[HashCode2 (theKey2, NbBuckets())] : NULL; aNode2 != NULL; aNode2 = (DoubleMapNode* )aNode2->Next2()) { - if (Hasher2::IsEqual (aNode2->Key2(), theKey2)) + if (IsEqual2 (aNode2->Key2(), theKey2)) { return &aNode2->Key1(); } @@ -481,24 +482,54 @@ public: //! Clear data. If doReleaseMemory is false then the table of //! buckets is not released and will be reused. - void Clear(const Standard_Boolean doReleaseMemory = Standard_True) + void Clear(const Standard_Boolean doReleaseMemory = Standard_False) { Destroy (DoubleMapNode::delNode, doReleaseMemory); } //! Clear data and reset allocator void Clear (const Handle(NCollection_BaseAllocator)& theAllocator) { - Clear(); + Clear(true); this->myAllocator = ( ! theAllocator.IsNull() ? theAllocator : NCollection_BaseAllocator::CommonBaseAllocator() ); } //! Destructor ~NCollection_DoubleMap (void) - { Clear(); } + { Clear(true); } //! Size Standard_Integer Size(void) const { return Extent(); } +protected: + + bool IsEqual1(const TheKey1Type& theKey1, + const TheKey1Type& theKey2) const + { + return myHasher1(theKey1, theKey2); + } + + size_t HashCode1(const TheKey1Type& theKey, + const int theUpperBound) const + { + return myHasher1(theKey) % theUpperBound + 1; + } + + bool IsEqual2(const TheKey2Type& theKey1, + const TheKey2Type& theKey2) const + { + return myHasher2(theKey1, theKey2); + } + + size_t HashCode2(const TheKey2Type& theKey, + const int theUpperBound) const + { + return myHasher2(theKey) % theUpperBound + 1; + } + +protected: + + Hasher1 myHasher1; + Hasher2 myHasher2; }; #endif diff --git a/src/NCollection/NCollection_DynamicArray.hxx b/src/NCollection/NCollection_DynamicArray.hxx new file mode 100644 index 0000000000..5c7ebc655b --- /dev/null +++ b/src/NCollection/NCollection_DynamicArray.hxx @@ -0,0 +1,510 @@ +// Copyright (c) 2002-2023 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 NCollection_DynamicArray_HeaderFile +#define NCollection_DynamicArray_HeaderFile + +#include "NCollection_Allocator.hxx" +#include "NCollection_BasePointerVector.hxx" +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include + +#include +#include + +//! Class NCollection_DynamicArray (dynamic array of objects) +//! +//! The array's indices always start at 0. +//! +//! The Vector is always created with 0 length. It can be enlarged by two means: +//! 1. Calling the method Append (val) - then "val" is added to the end of the +//! vector (the vector length is incremented) +//! 2. Calling the method SetValue (i, val) - if "i" is greater than or equal +//! to the current length of the vector, the vector is enlarged to accomo- +//! date this index +//! +//! The methods Append and SetValue return a non-const reference to the copied +//! object inside the vector. This reference is guaranteed to be valid until +//! the vector is destroyed. It can be used to access the vector member directly +//! or to pass its address to other data structures. +//! +//! The vector iterator remembers the length of the vector at the moment of the +//! creation or initialisation of the iterator. Therefore the iteration begins +//! at index 0 and stops at the index equal to (remembered_length-1). It is OK +//! to enlarge the vector during the iteration. +template +class NCollection_DynamicArray +{ +public: + //! Memory allocation + DEFINE_STANDARD_ALLOC; + DEFINE_NCOLLECTION_ALLOC; +public: + typedef NCollection_OccAllocator allocator_type; + typedef NCollection_BasePointerVector vector; +public: + + // Define various type aliases for convenience + using value_type = TheItemType; + using size_type = size_t; + using difference_type = size_t; + using pointer = TheItemType*; + using const_pointer = TheItemType&; + using reference = TheItemType&; + using const_reference = const TheItemType&; + +public: + + using iterator = NCollection_IndexedIterator; + using const_iterator = NCollection_IndexedIterator; + +public: + + // Iterator class + class Iterator : public NCollection_Iterator + { + public: + using NCollection_Iterator::NCollection_Iterator; + + const_reference Value() const + { + return *NCollection_Iterator::ValueIter(); + } + + reference ChangeValue() + { + return *NCollection_Iterator::ChangeValueIter(); + } + }; + + const_iterator begin() const + { + return const_iterator(*this); + } + + iterator begin() + { + return iterator(*this); + } + + const_iterator cbegin() const + { + return const_iterator(*this); + } + + iterator end() + { + return iterator(myUsedSize, *this); + } + + const_iterator end() const + { + return const_iterator(myUsedSize, *this); + } + + const_iterator cend() const + { + return const_iterator(myUsedSize, *this); + } + +public: //! @name public methods + + NCollection_DynamicArray(const Standard_Integer theIncrement = 256) : + myContainer(), + myAlloc(), + myInternalSize(theIncrement), + myUsedSize(0) + {} + + // Constructor taking an allocator + explicit NCollection_DynamicArray(const Standard_Integer theIncrement, + const Handle(NCollection_BaseAllocator)& theAllocator) : + myContainer(), + myAlloc(allocator_type(theAllocator)), + myInternalSize(theIncrement), + myUsedSize(0) + {} + + // Constructor taking an allocator + explicit NCollection_DynamicArray(const Standard_Integer theIncrement, + const allocator_type& theAllocator) : + myContainer(), + myAlloc(theAllocator), + myInternalSize(theIncrement), + myUsedSize(0) + {} + + //! Copy constructor + NCollection_DynamicArray(const NCollection_DynamicArray& theOther) : + myContainer(theOther.myContainer), + myAlloc(theOther.myAlloc), + myInternalSize(theOther.myInternalSize), + myUsedSize(theOther.myUsedSize) + { + copyDate(); + } + + NCollection_DynamicArray(NCollection_DynamicArray&& theOther) noexcept : + myContainer(std::move(theOther.myContainer)), + myAlloc(theOther.myAlloc), + myInternalSize(theOther.myInternalSize), + myUsedSize(theOther.myUsedSize) + { + theOther.myUsedSize = 0; + } + + ~NCollection_DynamicArray() + { + Clear(true); + } + + //! Total number of items + Standard_Integer Length() const + { + return static_cast(myUsedSize); + } + + //! Total number of items in the vector + Standard_Integer Size() const + { + return Length(); + } + + //! Method for consistency with other collections. + //! @return Lower bound (inclusive) for iteration. + Standard_Integer Lower() const + { + return 0; + } + + //! Method for consistency with other collections. + //! @return Upper bound (inclusive) for iteration. + Standard_Integer Upper() const + { + return Length() - 1; + } + + //! Empty query + Standard_Boolean IsEmpty() const + { + return myUsedSize == 0; + } + + //! Assignment to the collection of the same type + NCollection_DynamicArray& Assign(const NCollection_DynamicArray& theOther, + const bool theOwnAllocator = true) + { + if (&theOther == this) + { + return *this; + } + if (!theOwnAllocator) + { + Clear(myAlloc != theOther.myAlloc); + myAlloc = theOther.myAlloc; + } + else + { + Clear(false); + } + myContainer = theOther.myContainer; + myInternalSize = theOther.myInternalSize; + myUsedSize = theOther.myUsedSize; + copyDate(); + return *this; + } + + NCollection_DynamicArray& Assign(NCollection_DynamicArray&& theOther) + { + if (&theOther == this) + { + return *this; + } + Clear(true); + myContainer = std::move(theOther.myContainer); + myAlloc = theOther.myAlloc; + myInternalSize = theOther.myInternalSize; + myUsedSize = theOther.myUsedSize; + theOther.myUsedSize = 0; + return *this; + } + + //! Assignment operator + NCollection_DynamicArray& operator= (const NCollection_DynamicArray& theOther) + { + return Assign(theOther, false); + } + + //! Assignment operator + NCollection_DynamicArray& operator= (NCollection_DynamicArray&& theOther) + { + return Assign(std::forward(theOther)); + } + + //! Append + reference Append(const TheItemType& theValue) + { + if (myUsedSize >= availableSize()) + { + expandArray(); + } + pointer aPnt = &at(myUsedSize++); + myAlloc.construct(aPnt, theValue); + return *aPnt; + } + + //! Append + reference Append(TheItemType&& theValue) + { + if (myUsedSize >= availableSize()) + { + expandArray(); + } + pointer aPnt = &at(myUsedSize++); + myAlloc.construct(aPnt, std::forward(theValue)); + return *aPnt; + } + + void EraseLast() + { + if (myUsedSize == 0) + { + return; + } + TheItemType* aLastElem = &ChangeLast(); + myAlloc.destroy(aLastElem); + myUsedSize--; + } + + //! Appends an empty value and returns the reference to it + reference Appended() + { + if (myUsedSize >= availableSize()) + { + expandArray(); + } + pointer aPnt = &at(myUsedSize++); + myAlloc.construct(aPnt); + return *aPnt; + } + + //! Operator() - query the const value + const_reference operator() (const Standard_Integer theIndex) const + { + return Value(theIndex); + } + + //! Operator[] - query the const value + const_reference operator[] (const Standard_Integer theIndex) const + { + return Value(theIndex); + } + + //! Operator[] - query the const value + const_reference operator[] (const size_t theIndex) const + { + return at(theIndex); + } + + const_reference Value(const Standard_Integer theIndex) const + { + return at(static_cast(theIndex)); + } + + //! @return first element + const_reference First() const + { + return getArray()[0][0]; + } + + //! @return first element + reference ChangeFirst() + { + return getArray()[0][0]; + } + + //! @return last element + const_reference Last() const + { + return at(myUsedSize - 1); + } + + //! @return last element + reference ChangeLast() + { + return at(myUsedSize - 1); + } + + //! Operator() - query the value + reference operator() (const Standard_Integer theIndex) + { + return ChangeValue(theIndex); + } + + //! Operator[] - query the value + reference operator[] (const Standard_Integer theIndex) + { + return ChangeValue(theIndex); + } + + //! Operator[] - query the value + reference operator[] (const size_t theIndex) + { + return at(theIndex); + } + + reference ChangeValue(const Standard_Integer theIndex) + { + return at(static_cast(theIndex)); + } + + //! SetValue () - set or append a value + reference SetValue(const Standard_Integer theIndex, + const TheItemType& theValue) + { + const size_t aBlockInd = static_cast(theIndex / myInternalSize); + const size_t anIndex = static_cast(theIndex); + for (size_t aInd = myContainer.Size(); aInd <= aBlockInd; aInd++) + { + expandArray(); + } + if (myUsedSize <= anIndex) + { + for (; myUsedSize < anIndex; myUsedSize++) + { + pointer aPnt = &at(myUsedSize); + myAlloc.construct(aPnt); + } + myUsedSize++; + } + pointer aPnt = &at(anIndex); + myAlloc.construct(aPnt, theValue); + return *aPnt; + } + + //! SetValue () - set or append a value + reference SetValue(const Standard_Integer theIndex, + TheItemType&& theValue) + { + const size_t aBlockInd = static_cast(theIndex / myInternalSize); + const size_t anIndex = static_cast(theIndex); + for (size_t aInd = myContainer.Size(); aInd <= aBlockInd; aInd++) + { + expandArray(); + } + if (myUsedSize <= anIndex) + { + for (; myUsedSize < anIndex; myUsedSize++) + { + pointer aPnt = &at(myUsedSize); + myAlloc.construct(aPnt); + } + myUsedSize++; + } + pointer aPnt = &at(anIndex); + myAlloc.construct(aPnt, std::forward(theValue)); + return *aPnt; + } + + void Clear(const bool theReleaseMemory = false) + { + size_t aUsedSize = 0; + for (size_t aBlockInd = 0; aBlockInd < myContainer.Size(); aBlockInd++) + { + TheItemType* aCurStart = getArray()[aBlockInd]; + for (size_t anElemInd = 0; anElemInd < myInternalSize && aUsedSize < myUsedSize; anElemInd++, aUsedSize++) + { + aCurStart[anElemInd].~TheItemType(); + } + if (theReleaseMemory) + myAlloc.deallocate(aCurStart, myInternalSize); + } + if (theReleaseMemory) + myContainer.Clear(theReleaseMemory); + myUsedSize = 0; + } + + void SetIncrement(const Standard_Integer theIncrement) + { + if (myUsedSize != 0) + { + return; + } + myInternalSize = static_cast(theIncrement); + } + + friend iterator; + friend const_iterator; + +protected: + + size_t availableSize() const + { + return myContainer.Size() * myInternalSize; + } + + TheItemType* expandArray() + { + TheItemType* aNewBlock = myAlloc.allocate(myInternalSize); + myContainer.Append(aNewBlock); + return aNewBlock; + } + + reference at(const size_t theInd) + { + return getArray()[theInd / myInternalSize][theInd % myInternalSize]; + } + + const_reference at(const size_t theInd) const + { + return getArray()[theInd / myInternalSize][theInd % myInternalSize]; + } + + void copyDate() + { + size_t aUsedSize = 0; + for (size_t aBlockInd = 0; aBlockInd < myContainer.Size(); aBlockInd++) + { + TheItemType* aCurStart = getArray()[aBlockInd]; + TheItemType* aNewBlock = myAlloc.allocate(myInternalSize); + for (size_t anElemInd = 0; anElemInd < myInternalSize && aUsedSize < myUsedSize; anElemInd++, aUsedSize++) + { + pointer aPnt = &aNewBlock[anElemInd]; + myAlloc.construct(aPnt, aCurStart[anElemInd]); + } + getArray()[aBlockInd] = aNewBlock; + } + } + + //! Wrapper to extract array + TheItemType** getArray() const { return (TheItemType**) myContainer.GetArray(); } + +protected: + + vector myContainer; + allocator_type myAlloc; + size_t myInternalSize; + size_t myUsedSize; +}; + +#endif // NCollection_DynamicArray_HeaderFile diff --git a/src/NCollection/NCollection_EBTree.hxx b/src/NCollection/NCollection_EBTree.hxx index 5e10239a19..9b631d3cd0 100644 --- a/src/NCollection/NCollection_EBTree.hxx +++ b/src/NCollection/NCollection_EBTree.hxx @@ -38,7 +38,7 @@ template class NCollection_EBTree { public: typedef NCollection_UBTree UBTree; - typedef TYPENAME UBTree::TreeNode TreeNode; + typedef typename UBTree::TreeNode TreeNode; // ---------- PUBLIC METHODS ---------- /** diff --git a/src/NCollection/NCollection_HeapAllocator.hxx b/src/NCollection/NCollection_HeapAllocator.hxx index d18c726df9..947e772b22 100644 --- a/src/NCollection/NCollection_HeapAllocator.hxx +++ b/src/NCollection/NCollection_HeapAllocator.hxx @@ -28,6 +28,7 @@ class NCollection_HeapAllocator : public NCollection_BaseAllocator public: // ---------- PUBLIC METHODS ---------- Standard_EXPORT virtual void* Allocate (const Standard_Size theSize) Standard_OVERRIDE; + void* AllocateOptimal(const Standard_Size theSize) Standard_OVERRIDE { return Allocate(theSize); } Standard_EXPORT virtual void Free (void * anAddress) Standard_OVERRIDE; Standard_EXPORT static const Handle(NCollection_HeapAllocator)& diff --git a/src/NCollection/NCollection_IncAllocator.cxx b/src/NCollection/NCollection_IncAllocator.cxx index 35ce1f6248..c4d12ca98f 100644 --- a/src/NCollection/NCollection_IncAllocator.cxx +++ b/src/NCollection/NCollection_IncAllocator.cxx @@ -1,6 +1,4 @@ -// Created on: 2002-04-12 -// Created by: Alexander GRIGORIEV -// Copyright (c) 2002-2014 OPEN CASCADE SAS +// Copyright (c) 2002-2023 OPEN CASCADE SAS // // This file is part of Open CASCADE Technology software library. // @@ -14,445 +12,248 @@ // commercial license or contractual agreement. #include -#include -#include + #include #include -#include -#include -#include +#include -IMPLEMENT_STANDARD_RTTIEXT(NCollection_IncAllocator,NCollection_BaseAllocator) +IMPLEMENT_STANDARD_RTTIEXT(NCollection_IncAllocator, NCollection_BaseAllocator) namespace { - - inline size_t IMEM_SIZE (const size_t theSize) - { - return (theSize - 1) / sizeof(NCollection_IncAllocator::aligned_t) + 1; - } - - inline size_t IMEM_ALIGN (const void* theAddress) + // Bounds for checking block size level + static constexpr unsigned THE_SMALL_BOUND_BLOCK_SIZE = NCollection_IncAllocator::THE_DEFAULT_BLOCK_SIZE * 16; // 196 KB + static constexpr unsigned THE_MEDIUM_BOUND_BLOCK_SIZE = NCollection_IncAllocator::THE_DEFAULT_BLOCK_SIZE * 64; // 786 KB + static constexpr unsigned THE_LARGE_BOUND_BLOCK_SIZE = NCollection_IncAllocator::THE_DEFAULT_BLOCK_SIZE * 1024; // 12 MB + + //======================================================================= + //function : computeLevel + //purpose : + //======================================================================= + NCollection_IncAllocator::IBlockSizeLevel computeLevel(const unsigned int theSize) { - return sizeof(NCollection_IncAllocator::aligned_t) * IMEM_SIZE (size_t(theAddress)); + if (theSize < NCollection_IncAllocator::THE_DEFAULT_BLOCK_SIZE) + { + return NCollection_IncAllocator::IBlockSizeLevel::Min; + } + else if (theSize < THE_SMALL_BOUND_BLOCK_SIZE) + { + return NCollection_IncAllocator::IBlockSizeLevel::Small; + } + else if (theSize < THE_MEDIUM_BOUND_BLOCK_SIZE) + { + return NCollection_IncAllocator::IBlockSizeLevel::Medium; + } + else if (theSize < THE_LARGE_BOUND_BLOCK_SIZE) + { + return NCollection_IncAllocator::IBlockSizeLevel::Large; + } + else + { + return NCollection_IncAllocator::IBlockSizeLevel::Max; + } } - - #define IMEM_FREE(p_bl) (size_t(p_bl->p_end_block - p_bl->p_free_space)) - -#ifdef OCCT_DEBUG - // auxiliary dummy function used to get a place where break point can be set - inline void place_for_breakpoint() {} -#endif -} - -#define MaxLookup 16 - -static Standard_Boolean IS_DEBUG = Standard_False; - -//======================================================================= -/** - * Static data map (address -> AllocatorID) - */ -//======================================================================= -static NCollection_DataMap& StorageIDMap() -{ - static NCollection_DataMap TheMap; - return TheMap; -} - -//======================================================================= -/** - * Static map (AllocatorID) - */ -//======================================================================= -static NCollection_Map& StorageIDSet() -{ - static NCollection_Map TheMap; - return TheMap; -} - -//======================================================================= -//function : IncAllocator_SetDebugFlag -//purpose : Turn on/off debugging of memory allocation -//======================================================================= - -Standard_EXPORT void IncAllocator_SetDebugFlag(const Standard_Boolean theDebug) -{ - IS_DEBUG = theDebug; -} - -#ifdef OCCT_DEBUG - -//======================================================================= -/** - * Static value of the current allocation ID. It provides unique - * numbering of allocators. - */ -//======================================================================= -static Standard_Size CurrentID = 0; -static Standard_Size CATCH_ID = 0; - -//======================================================================= -//function : Debug_Create -//purpose : Store the allocator address in the internal maps -//======================================================================= - -static void Debug_Create(Standard_Address theAlloc) -{ - static Standard_Mutex aMutex; - aMutex.Lock(); - StorageIDMap().Bind(theAlloc, ++CurrentID); - StorageIDSet().Add(CurrentID); - if (CurrentID == CATCH_ID) - place_for_breakpoint(); - aMutex.Unlock(); } //======================================================================= -//function : Debug_Destroy -//purpose : Forget the allocator address from the internal maps +//function : NCollection_IncAllocator +//purpose : Constructor //======================================================================= - -static void Debug_Destroy(Standard_Address theAlloc) -{ - static Standard_Mutex aMutex; - aMutex.Lock(); - if (StorageIDMap().IsBound(theAlloc)) - { - Standard_Size anID = StorageIDMap()(theAlloc); - StorageIDSet().Remove(anID); - StorageIDMap().UnBind(theAlloc); - } - aMutex.Unlock(); -} - -#endif /* OCCT_DEBUG */ +NCollection_IncAllocator::NCollection_IncAllocator(const size_t theDefaultSize) : + myBlockSize(static_cast(theDefaultSize < THE_MINIMUM_BLOCK_SIZE ? THE_DEFAULT_BLOCK_SIZE : theDefaultSize)) +{} //======================================================================= -//function : IncAllocator_PrintAlive -//purpose : Outputs the alive numbers to the file inc_alive.d +//function : SetThreadSafe +//purpose : Constructor //======================================================================= - -Standard_EXPORT void IncAllocator_PrintAlive() +void NCollection_IncAllocator::SetThreadSafe (const bool theIsThreadSafe) { - if (StorageIDSet().IsEmpty()) + if(theIsThreadSafe) { - return; - } - - std::ofstream aFileOut ("inc_alive.d", std::ios_base::trunc | std::ios_base::out); - if (!aFileOut.is_open()) - { - std::cout << "failure writing file inc_alive.d" << std::endl; - return; + if (!myMutex) + { + myMutex = new Standard_Mutex; + } } - aFileOut.imbue (std::locale ("C")); - aFileOut << std::fixed << std::setprecision(1); - - aFileOut << "Alive IncAllocators (number, size in Kb)\n"; - Standard_Size aTotSize = 0; - Standard_Integer nbAlloc = 0; - for (NCollection_DataMap::Iterator itMap (StorageIDMap()); - itMap.More(); itMap.Next()) + else { - const NCollection_IncAllocator* anAlloc = static_cast(itMap.Key()); - Standard_Size anID = itMap.Value(); - Standard_Size aSize = anAlloc->GetMemSize(); - aTotSize += aSize; - nbAlloc++; - aFileOut << std::setw(20) << anID << ' ' - << std::setw(20) << (double(aSize) / 1024.0) - << '\n'; + delete myMutex; + myMutex = nullptr; } - aFileOut << "Total:\n" - << std::setw(20) << nbAlloc << ' ' - << std::setw(20) << (double(aTotSize) / 1024.0) - << '\n'; - aFileOut.close(); -} - -//======================================================================= -//function : NCollection_IncAllocator() -//purpose : Constructor -//======================================================================= - -NCollection_IncAllocator::NCollection_IncAllocator (size_t theBlockSize) -: myMutex (NULL) -{ -#ifdef ALLOC_TRACK_USAGE - printf ("\n..NCollection_IncAllocator: Created (%x)\n",this); -#endif -#ifdef OCCT_DEBUG - if (IS_DEBUG) - Debug_Create(this); -#endif - const size_t aDefault = DefaultBlockSize; - const size_t aSize = IMEM_SIZE(sizeof(IBlock)) + - IMEM_SIZE((theBlockSize > 2*sizeof(IBlock)) ? theBlockSize : aDefault); - IBlock * const aBlock = (IBlock *) malloc (aSize * sizeof(aligned_t)); - myFirstBlock = aBlock; - mySize = aSize - IMEM_SIZE(sizeof(IBlock)); - myMemSize = aSize * sizeof(aligned_t); - if (aBlock == NULL) - throw Standard_OutOfMemory("NCollection_IncAllocator: out of memory"); - aBlock -> p_free_space = (aligned_t *) IMEM_ALIGN (&aBlock[1]); - aBlock -> p_end_block = ((aligned_t *) aBlock) + aSize; - aBlock -> p_next = NULL; } //======================================================================= //function : ~NCollection_IncAllocator //purpose : Destructor //======================================================================= - -NCollection_IncAllocator::~NCollection_IncAllocator () +NCollection_IncAllocator::~NCollection_IncAllocator() { + clean(); delete myMutex; -#ifdef OCCT_DEBUG - if (IS_DEBUG) - Debug_Destroy(this); -#endif - Clean(); - free (myFirstBlock); } //======================================================================= -//function : SetThreadSafe -//purpose : +//function : AllocateOptimal +//purpose : allocate a memory //======================================================================= -void NCollection_IncAllocator::SetThreadSafe (bool theIsThreadSafe) +void* NCollection_IncAllocator::AllocateOptimal(const size_t theSize) { - if (myMutex == NULL - && theIsThreadSafe) + Standard_Mutex::Sentry aLock(myMutex); + // Allocating using general block + IBlock* aBlock = nullptr; + // Use allocated blocks + if (myAllocationHeap && myAllocationHeap->AvailableSize >= theSize) { - myMutex = new Standard_Mutex(); + aBlock = myAllocationHeap; } - else if (!theIsThreadSafe) + else // Allocate new general block { - delete myMutex; - myMutex = NULL; + if (++myBlockCount % 5 == 0) // increase count before checking + { + increaseBlockSize(); + } + if (myBlockSize < theSize) + { + myBlockSize = static_cast(theSize); + } + void* aBufferBlock = Standard::AllocateOptimal(myBlockSize + sizeof(IBlock)); + aBlock = new (aBufferBlock) IBlock(aBufferBlock, myBlockSize); + aBlock->NextBlock = myAllocationHeap; + aBlock->NextOrderedBlock = myOrderedBlocks; + myOrderedBlocks = aBlock; + myAllocationHeap = aBlock; } + void* aRes = aBlock->CurPointer; + aBlock->CurPointer += theSize; + aBlock->AvailableSize -= theSize; + if (aBlock->AvailableSize < 16) + { + myAllocationHeap = aBlock->NextBlock; + aBlock->NextBlock = myUsedHeap; + myUsedHeap = aBlock; + } + else + { + IBlock* aBlockIter = aBlock->NextBlock; + IBlock* aBlockToReplaceAfter = nullptr; + while (aBlockIter) // Search new sorted position + { + if (aBlockIter->AvailableSize > aBlock->AvailableSize) + { + aBlockToReplaceAfter = aBlockIter; + aBlockIter = aBlockIter->NextBlock; + continue; + } + break; + } + if (aBlockToReplaceAfter) // Update list order + { + IBlock* aNext = aBlockToReplaceAfter->NextBlock; + aBlockToReplaceAfter->NextBlock = aBlock; + myAllocationHeap = aBlock->NextBlock; + aBlock->NextBlock = aNext; + } + } + return aRes; } //======================================================================= //function : Allocate -//purpose : allocate a memory -//remark : returns NULL if allocation fails +//purpose : Allocate a memory //======================================================================= - -void * NCollection_IncAllocator::Allocate (const size_t aSize) +void* NCollection_IncAllocator::Allocate(const size_t theSize) { - aligned_t * aResult = NULL; - const size_t cSize = aSize ? IMEM_SIZE(aSize) : 0; - - Standard_Mutex::Sentry aLock (myMutex); - if (cSize > mySize) { - /* If the requested size exceeds normal allocation size, allocate - a separate block and place it as the head of the list */ - aResult = (aligned_t *) allocateNewBlock (cSize+1); - if (aResult) - myFirstBlock -> p_free_space = myFirstBlock -> p_end_block; - else - throw Standard_OutOfMemory("NCollection_IncAllocator: out of memory"); - } else - if (cSize <= IMEM_FREE(myFirstBlock)) { - /* If the requested size fits into the free space in the 1st block */ - aResult = myFirstBlock -> allocateInBlock (cSize); - } else { - /* Search for a block in the list with enough free space */ - int aMaxLookup = MaxLookup; /* limit the number of blocks to query */ - IBlock * aCurrentBlock = myFirstBlock -> p_next; - while (aCurrentBlock && aMaxLookup--) { - if (cSize <= IMEM_FREE(aCurrentBlock)) { - aResult = aCurrentBlock -> allocateInBlock (cSize); - break; - } - aCurrentBlock = aCurrentBlock -> p_next; - } - if (aResult == NULL) { - /* There is no available block with enough free space. Create a new - one and place it in the head of the list */ - aResult = (aligned_t *) allocateNewBlock (mySize); - if (aResult) - myFirstBlock -> p_free_space = aResult + cSize; - else - { - const size_t aDefault = IMEM_SIZE(DefaultBlockSize); - if (cSize > aDefault) - throw Standard_OutOfMemory("NCollection_IncAllocator: out of memory"); - else - { - aResult = (aligned_t *) allocateNewBlock (aDefault); - if (aResult) - myFirstBlock -> p_free_space = aResult + cSize; - else - throw Standard_OutOfMemory("NCollection_IncAllocator: out of memory"); - } - } - } - } - return aResult; + return AllocateOptimal(theSize); } //======================================================================= -//function : Reallocate +//function : clean //purpose : //======================================================================= - -void * NCollection_IncAllocator::Reallocate (void * theAddress, - const size_t oldSize, - const size_t newSize) +void NCollection_IncAllocator::clean() { -// Check that the dummy parameters are OK - if (theAddress == NULL || oldSize == 0) - return Allocate (newSize); - - const size_t cOldSize = IMEM_SIZE(oldSize); - const size_t cNewSize = newSize ? IMEM_SIZE(newSize) : 0; - aligned_t * anAddress = (aligned_t *) theAddress; - - Standard_Mutex::Sentry aLock (myMutex); -// We check only the LAST allocation to do the real extension/contraction - if (anAddress + cOldSize == myFirstBlock -> p_free_space) { - myFirstBlock -> p_free_space = anAddress; -// If the new size fits into the memory block => OK -// This also includes any case of contraction - if (cNewSize <= IMEM_FREE(myFirstBlock)) { - myFirstBlock -> p_free_space += cNewSize; - return anAddress; - } - } -// In case of contraction of non-terminating allocation, do nothing - else if (cOldSize >= cNewSize) - return anAddress; -// Extension of non-terminated allocation if there is enough room in the -// current memory block - if (cNewSize <= IMEM_FREE(myFirstBlock)) { - aligned_t * aResult = myFirstBlock -> allocateInBlock (cNewSize); - if (aResult) - for (unsigned i = 0; i < cOldSize; i++) - aResult[i] = anAddress[i]; - return aResult; - } - -// This is either of the cases: -// - extension of non-terminating allocation, or -// - extension of terminating allocation when the new size is too big -// In both cases create a new memory block, allocate memory and copy there -// the reallocated memory. - size_t cMaxSize = mySize > cNewSize ? mySize : cNewSize; - aligned_t * aResult = (aligned_t *) allocateNewBlock (cMaxSize); - if (aResult) { - myFirstBlock -> p_free_space = aResult + cNewSize; - for (unsigned i = 0; i < cOldSize; i++) - aResult[i] = anAddress[i]; - } - else + Standard_Mutex::Sentry aLock(myMutex); + IBlock* aHeapIter = myOrderedBlocks; + while (aHeapIter) { - throw Standard_OutOfMemory("NCollection_IncAllocator: out of memory"); + IBlock* aCur = aHeapIter; + aHeapIter = aHeapIter->NextOrderedBlock; + Standard::Free(aCur); } - return aResult; + myOrderedBlocks = nullptr; + myAllocationHeap = nullptr; + myUsedHeap = nullptr; + myBlockCount = 0; + myBlockSize = THE_DEFAULT_BLOCK_SIZE; } //======================================================================= -//function : Free -//purpose : -//======================================================================= - -void NCollection_IncAllocator::Free (void *) -{} - -//======================================================================= -//function : Clean +//function : increaseBlockSize //purpose : //======================================================================= - -void NCollection_IncAllocator::Clean () +void NCollection_IncAllocator::increaseBlockSize() { -#ifdef ALLOC_TRACK_USAGE - printf ("\n..NCollection_IncAllocator: Memory size to clean:%8.1f kB (%x)\n", - double(GetMemSize())/1024, this); -#endif - IBlock * aBlock = myFirstBlock; - if (aBlock) { - aBlock -> p_free_space = (aligned_t *) &aBlock[1]; - aBlock = aBlock -> p_next; - while (aBlock) { - IBlock * aNext = aBlock -> p_next; - free (aBlock); - aBlock = aNext; - } - myFirstBlock -> p_next = NULL; + switch (computeLevel(myBlockSize)) + { + case NCollection_IncAllocator::IBlockSizeLevel::Min: + myBlockSize *= 8; + break; + case NCollection_IncAllocator::IBlockSizeLevel::Small: + myBlockSize *= 4; + break; + case NCollection_IncAllocator::IBlockSizeLevel::Medium: + myBlockSize *= 2; + break; + case NCollection_IncAllocator::IBlockSizeLevel::Large: + myBlockSize = static_cast(std::lround(myBlockSize * 1.5)); + break; + case NCollection_IncAllocator::IBlockSizeLevel::Max: + break; } - myMemSize = 0; } //======================================================================= -//function : Reset +//function : resetBlock //purpose : //======================================================================= - -void NCollection_IncAllocator::Reset (const Standard_Boolean doReleaseMem) +void NCollection_IncAllocator::resetBlock(IBlock* theBlock) const { - Standard_Mutex::Sentry aLock (myMutex); - if (doReleaseMem) - Clean(); - else { - Standard_Integer aBlockCount(0); - IBlock * aBlock = myFirstBlock; - while (aBlock) - if (aBlockCount++ < MaxLookup) { - aBlock -> p_free_space = (aligned_t *) &aBlock[1]; - if (aBlockCount < MaxLookup) - aBlock = aBlock -> p_next; - else { - IBlock * aNext = aBlock -> p_next; - aBlock -> p_next = NULL; - aBlock = aNext; - } - } else { - IBlock * aNext = aBlock -> p_next; - myMemSize -= (aBlock -> p_end_block - (aligned_t *) aBlock) * sizeof (aligned_t); - free (aBlock); - aBlock = aNext; - } - } + theBlock->AvailableSize = theBlock->AvailableSize + (theBlock->CurPointer - (reinterpret_cast(theBlock) + sizeof(IBlock))); + theBlock->CurPointer = reinterpret_cast(theBlock) + sizeof(IBlock); } //======================================================================= -//function : GetMemSize -//purpose : diagnostic utility +//function : Reset +//purpose : //======================================================================= - -size_t NCollection_IncAllocator::GetMemSize () const +void NCollection_IncAllocator::Reset(const Standard_Boolean theReleaseMemory) { -// size_t aResult = 0; -// IBlock * aBlock = myFirstBlock; -// while (aBlock) { -// aResult += (aBlock -> p_end_block - (aligned_t *) aBlock); -// aBlock = aBlock -> p_next; -// } -// return aResult * sizeof (aligned_t); - return myMemSize; + if (theReleaseMemory) + { + clean(); + return; + } + Standard_Mutex::Sentry aLock(myMutex); + IBlock* aHeapIter = myOrderedBlocks; + while (aHeapIter) + { + IBlock* aCur = aHeapIter; + aHeapIter = aHeapIter->NextOrderedBlock; + aCur->NextBlock = aHeapIter; + resetBlock(aCur); // reset size and pointer + } + myAllocationHeap = myOrderedBlocks; + myUsedHeap = nullptr; } //======================================================================= -//function : allocateNewBlock +//function : IBlockSmall::IBlockSmall //purpose : //======================================================================= - -void * NCollection_IncAllocator::allocateNewBlock (const size_t cSize) -{ - aligned_t * aResult = 0L; - const size_t aSz = cSize + IMEM_SIZE(sizeof(IBlock)); - IBlock * aBlock = (IBlock *) malloc (aSz * sizeof(aligned_t)); - if (aBlock) { - aBlock -> p_end_block = ((aligned_t *)aBlock) + aSz; - aBlock -> p_next = myFirstBlock; - myFirstBlock = aBlock; - aResult = (aligned_t *) IMEM_ALIGN(&aBlock[1]); - myMemSize += aSz * sizeof(aligned_t); - } - return aResult; -} +NCollection_IncAllocator::IBlock::IBlock(void* thePointer, + const size_t theSize) : + CurPointer(static_cast(thePointer) + sizeof(IBlock)), + AvailableSize(theSize) +{} diff --git a/src/NCollection/NCollection_IncAllocator.hxx b/src/NCollection/NCollection_IncAllocator.hxx index 7dfe560af5..0993d552a6 100644 --- a/src/NCollection/NCollection_IncAllocator.hxx +++ b/src/NCollection/NCollection_IncAllocator.hxx @@ -1,6 +1,4 @@ -// Created on: 2002-04-12 -// Created by: Alexander GRIGORIEV -// Copyright (c) 2002-2014 OPEN CASCADE SAS +// Copyright (c) 2002-2023 OPEN CASCADE SAS // // This file is part of Open CASCADE Technology software library. // @@ -15,8 +13,12 @@ #ifndef NCollection_IncAllocator_HeaderFile #define NCollection_IncAllocator_HeaderFile - + #include +#include +#include + +#include class Standard_Mutex; @@ -46,11 +48,7 @@ class Standard_Mutex; */ class NCollection_IncAllocator : public NCollection_BaseAllocator { - public: - // The type defining the alignement of allocated objects - typedef void * aligned_t; - - // ---------- PUBLIC METHODS ---------- +public: //! Constructor. //! Note that this constructor does NOT setup mutex for using allocator concurrently from different threads, @@ -61,84 +59,97 @@ class NCollection_IncAllocator : public NCollection_BaseAllocator //! platform for the repeated operations (and thus multiple allocations) //! because Low Fragmentation Heap is not going to be used for these allocations, //! leading to memory fragmentation and eventual performance slow down. - Standard_EXPORT NCollection_IncAllocator (size_t theBlockSize = DefaultBlockSize); + Standard_EXPORT NCollection_IncAllocator (const size_t theBlockSize = THE_DEFAULT_BLOCK_SIZE); //! Setup mutex for thread-safe allocations. - Standard_EXPORT void SetThreadSafe (bool theIsThreadSafe = true); + Standard_EXPORT void SetThreadSafe (const bool theIsThreadSafe = true); //! Allocate memory with given size. Returns NULL on failure - Standard_EXPORT virtual void* Allocate (const size_t size) Standard_OVERRIDE; + Standard_EXPORT void* Allocate(const size_t size) Standard_OVERRIDE; - //! Free a previously allocated memory. Does nothing - Standard_EXPORT virtual void Free (void *anAddress) Standard_OVERRIDE; + //! Allocate memory with given size. Returns NULL on failure + Standard_EXPORT void* AllocateOptimal(const size_t size) Standard_OVERRIDE; - //! Diagnostic method, returns the total allocated size - Standard_EXPORT size_t GetMemSize () const; + //! Free a previously allocated memory. Does nothing + void Free(void*) Standard_OVERRIDE + { + // Do nothing + } //! Destructor (calls Clean() internally) - Standard_EXPORT ~NCollection_IncAllocator (); - - //! Reallocation: it is always allowed but is only efficient with the - //! last allocated item - Standard_EXPORT void * Reallocate (void * anAddress, - const size_t oldSize, - const size_t newSize); + Standard_EXPORT ~NCollection_IncAllocator(); //! Re-initialize the allocator so that the next Allocate call should //! start allocating in the very beginning as though the allocator is just //! constructed. Warning: make sure that all previously allocated data are //! no more used in your code! - //! @param doReleaseMem + //! @param theReleaseMemory //! True - release all previously allocated memory, False - preserve it //! for future allocations. - Standard_EXPORT void Reset (const Standard_Boolean - doReleaseMem=Standard_True); + Standard_EXPORT void Reset(const bool theReleaseMemory = false); + +private: + // Prohibited methods + NCollection_IncAllocator(const NCollection_IncAllocator&) = delete; + NCollection_IncAllocator& operator = (const NCollection_IncAllocator&) = delete; + +public: + + //! Forward list to keep multi-time allocated pointers. + //! On Reset operation objects will be reused. + struct IBlock + { + IBlock(void* thePointer, + const size_t theSize); + + char* CurPointer; + size_t AvailableSize; + IBlock* NextBlock = nullptr; //! Pointer to next sorted block + IBlock* NextOrderedBlock = nullptr; //! Pointer to next ordered block + }; + + //! Description ability to next growing size each 5-th new block + enum class IBlockSizeLevel : unsigned short + { + Min = 0, // x8 growing + Small, // x4 growing + Medium, // x2 growing + Large, // x1.5 growing + Max // no growing + }; - //! Default size for the memory blocks - 12KB - static const size_t DefaultBlockSize = 12300; +protected: - protected: - struct IBlock; + //! Increases size according current block size level + void increaseBlockSize(); + + //! Resets available size and CurPointer field + void resetBlock(IBlock* theBlock) const; //! Flush all previously allocated data. All pointers returned by //! Allocate() become invalid -- be very careful with this - Standard_EXPORT void Clean (); + void clean(); - //! Allocate a new block and return a pointer to it - //! ** only for internal usage ** - void * allocateNewBlock (const size_t cSize); +public: - private: - // Prohibited methods - NCollection_IncAllocator (const NCollection_IncAllocator&); - NCollection_IncAllocator& operator = (const NCollection_IncAllocator&); - - protected: - // ----- PROTECTED CLASS IBlock ------- - struct IBlock { - aligned_t * allocateInBlock (const size_t cSize) - { - aligned_t * aResult = p_free_space; - p_free_space += cSize; - return aResult; - } - aligned_t * p_free_space; - aligned_t * p_end_block; - struct IBlock * p_next; - }; - protected: - // --------- PROTECTED FIELDS --------- - Standard_Mutex* myMutex; - IBlock * myFirstBlock; - size_t mySize; - size_t myMemSize; - - public: -// Declaration of CASCADE RTTI - DEFINE_STANDARD_RTTIEXT(NCollection_IncAllocator,NCollection_BaseAllocator) + static constexpr size_t THE_DEFAULT_BLOCK_SIZE = 1024 * 12; + + static constexpr size_t THE_MINIMUM_BLOCK_SIZE = 1024 * 2; + +private: + unsigned int myBlockSize; //!< Block size to incremental allocations + unsigned int myBlockCount = 0; //!< Count of created blocks + Standard_Mutex* myMutex = nullptr; //!< Thread-safety mutex + IBlock* myAllocationHeap = nullptr; //!< Sorted list for allocations + IBlock* myUsedHeap = nullptr; //!< Sorted list for store empty blocks + IBlock* myOrderedBlocks = nullptr; //!< Ordered list for store growing size blocks + +public: + // Declaration of CASCADE RTTI + DEFINE_STANDARD_RTTIEXT(NCollection_IncAllocator, NCollection_BaseAllocator) }; // Definition of HANDLE object using Standard_DefineHandle.hxx -DEFINE_STANDARD_HANDLE (NCollection_IncAllocator, NCollection_BaseAllocator) +DEFINE_STANDARD_HANDLE(NCollection_IncAllocator, NCollection_BaseAllocator) #endif diff --git a/src/NCollection/NCollection_IndexedDataMap.hxx b/src/NCollection/NCollection_IndexedDataMap.hxx index c3a7f4b0dc..eb3052d629 100644 --- a/src/NCollection/NCollection_IndexedDataMap.hxx +++ b/src/NCollection/NCollection_IndexedDataMap.hxx @@ -24,6 +24,7 @@ #include #include +#include /** * Purpose: An indexed map is used to store keys and to bind @@ -54,6 +55,7 @@ public: typedef TheKeyType key_type; //! STL-compliant typedef for value type typedef TheItemType value_type; + typedef Hasher hasher; private: //! Adaptation of the TListNode to the INDEXEDDatamap @@ -68,8 +70,34 @@ private: : NCollection_TListNode(theItem,theNext1), myKey1 (theKey1), myIndex (theIndex) - { - } + {} + //! Constructor with 'Next' + IndexedDataMapNode (TheKeyType&& theKey1, + const Standard_Integer theIndex, + const TheItemType& theItem, + NCollection_ListNode* theNext1) + : NCollection_TListNode(theItem,theNext1), + myKey1 (std::forward(theKey1)), + myIndex (theIndex) + {} + //! Constructor with 'Next' + IndexedDataMapNode (const TheKeyType& theKey1, + const Standard_Integer theIndex, + TheItemType&& theItem, + NCollection_ListNode* theNext1) + : NCollection_TListNode(std::forward(theItem),theNext1), + myKey1 (theKey1), + myIndex (theIndex) + {} + //! Constructor with 'Next' + IndexedDataMapNode (TheKeyType&& theKey1, + const Standard_Integer theIndex, + TheItemType&& theItem, + NCollection_ListNode* theNext1) + : NCollection_TListNode(std::forward(theItem),theNext1), + myKey1 (std::forward(theKey1)), + myIndex (theIndex) + {} //! Key1 TheKeyType& Key1() { return myKey1; } //! Index @@ -165,18 +193,23 @@ private: // ---------- PUBLIC METHODS ------------ //! Empty constructor. - NCollection_IndexedDataMap() : NCollection_BaseMap (1, Standard_False, Handle(NCollection_BaseAllocator)()) {} + NCollection_IndexedDataMap() : NCollection_BaseMap (1, true, Handle(NCollection_BaseAllocator)()) {} //! Constructor explicit NCollection_IndexedDataMap (const Standard_Integer theNbBuckets, const Handle(NCollection_BaseAllocator)& theAllocator = 0L) - : NCollection_BaseMap (theNbBuckets, Standard_False, theAllocator) {} + : NCollection_BaseMap (theNbBuckets, true, theAllocator) {} //! Copy constructor NCollection_IndexedDataMap (const NCollection_IndexedDataMap& theOther) - : NCollection_BaseMap (theOther.NbBuckets(), Standard_False, theOther.myAllocator) + : NCollection_BaseMap (theOther.NbBuckets(), true, theOther.myAllocator) { *this = theOther; } + //! Move constructor + NCollection_IndexedDataMap(NCollection_IndexedDataMap&& theOther) noexcept : + NCollection_BaseMap(std::forward(theOther)) + {} + //! Exchange the content of two maps without re-allocations. //! Notice that allocators will be swapped as well! void Exchange (NCollection_IndexedDataMap& theOther) @@ -200,7 +233,7 @@ private: { const TheKeyType& aKey1 = theOther.FindKey (anIndexIter); const TheItemType& anItem = theOther.FindFromIndex(anIndexIter); - const Standard_Integer iK1 = Hasher::HashCode (aKey1, NbBuckets()); + const size_t iK1 = HashCode (aKey1, NbBuckets()); IndexedDataMapNode* pNode = new (this->myAllocator) IndexedDataMapNode (aKey1, anIndexIter, anItem, myData1[iK1]); myData1[iK1] = pNode; myData2[anIndexIter - 1] = pNode; @@ -216,6 +249,15 @@ private: return Assign (theOther); } + //! Move operator + NCollection_IndexedDataMap& operator= (NCollection_IndexedDataMap&& theOther) noexcept + { + if (this == &theOther) + return *this; + exchangeMapsData(theOther); + return *this; + } + //! ReSize void ReSize (const Standard_Integer N) { @@ -226,7 +268,6 @@ private: { if (myData1) { - memcpy (ppNewData2, myData2, sizeof(IndexedDataMapNode*) * Extent()); for (Standard_Integer aBucketIter = 0; aBucketIter <= NbBuckets(); ++aBucketIter) { if (myData1[aBucketIter]) @@ -234,7 +275,7 @@ private: IndexedDataMapNode* p = (IndexedDataMapNode *) myData1[aBucketIter]; while (p) { - const Standard_Integer iK1 = Hasher::HashCode (p->Key1(), newBuck); + const size_t iK1 = HashCode (p->Key1(), newBuck); IndexedDataMapNode* q = (IndexedDataMapNode* )p->Next(); p->Next() = ppNewData1[iK1]; ppNewData1[iK1] = p; @@ -243,7 +284,8 @@ private: } } } - EndResize (N, newBuck, ppNewData1, ppNewData2); + EndResize (N, newBuck, ppNewData1, (NCollection_ListNode**) + Standard::Reallocate(myData2, (newBuck + 1) * sizeof(NCollection_ListNode*))); } } @@ -257,40 +299,98 @@ private: { ReSize(Extent()); } + IndexedDataMapNode* aNode; + size_t aHash; + if (lookup(theKey1, aNode, aHash)) + { + return aNode->Index(); + } + const Standard_Integer aNewIndex = Increment(); + aNode = new (this->myAllocator) IndexedDataMapNode (theKey1, aNewIndex, theItem, myData1[aHash]); + myData1[aHash] = aNode; + myData2[aNewIndex - 1] = aNode; + return aNewIndex; + } - const Standard_Integer iK1 = Hasher::HashCode (theKey1, NbBuckets()); - IndexedDataMapNode* pNode = (IndexedDataMapNode* )myData1[iK1]; - while (pNode) + //! Returns the Index of already bound Key or appends new Key with specified Item value. + //! @param theKey1 Key to search (and to bind, if it was not bound already) + //! @param theItem Item value to set for newly bound Key; ignored if Key was already bound + //! @return index of Key + Standard_Integer Add (TheKeyType&& theKey1, const TheItemType& theItem) + { + if (Resizable()) { - if (Hasher::IsEqual (pNode->Key1(), theKey1)) - { - return pNode->Index(); - } - pNode = (IndexedDataMapNode *) pNode->Next(); + ReSize(Extent()); } + IndexedDataMapNode* aNode; + size_t aHash; + if (lookup(theKey1, aNode, aHash)) + { + return aNode->Index(); + } + const Standard_Integer aNewIndex = Increment(); + aNode = new (this->myAllocator) IndexedDataMapNode (std::forward(theKey1), aNewIndex, theItem, myData1[aHash]); + myData1[aHash] = aNode; + myData2[aNewIndex - 1] = aNode; + return aNewIndex; + } + //! Returns the Index of already bound Key or appends new Key with specified Item value. + //! @param theKey1 Key to search (and to bind, if it was not bound already) + //! @param theItem Item value to set for newly bound Key; ignored if Key was already bound + //! @return index of Key + Standard_Integer Add (const TheKeyType& theKey1, TheItemType&& theItem) + { + if (Resizable()) + { + ReSize(Extent()); + } + IndexedDataMapNode* aNode; + size_t aHash; + if (lookup(theKey1, aNode, aHash)) + { + return aNode->Index(); + } const Standard_Integer aNewIndex = Increment(); - pNode = new (this->myAllocator) IndexedDataMapNode (theKey1, aNewIndex, theItem, myData1[iK1]); - myData1[iK1] = pNode; - myData2[aNewIndex - 1] = pNode; + aNode = new (this->myAllocator) IndexedDataMapNode (theKey1, aNewIndex, std::forward(theItem), myData1[aHash]); + myData1[aHash] = aNode; + myData2[aNewIndex - 1] = aNode; + return aNewIndex; + } + + //! Returns the Index of already bound Key or appends new Key with specified Item value. + //! @param theKey1 Key to search (and to bind, if it was not bound already) + //! @param theItem Item value to set for newly bound Key; ignored if Key was already bound + //! @return index of Key + Standard_Integer Add (TheKeyType&& theKey1, TheItemType&& theItem) + { + if (Resizable()) + { + ReSize(Extent()); + } + IndexedDataMapNode* aNode; + size_t aHash; + if (lookup(theKey1, aNode, aHash)) + { + return aNode->Index(); + } + const Standard_Integer aNewIndex = Increment(); + aNode = new (this->myAllocator) IndexedDataMapNode (std::forward(theKey1), aNewIndex, + std::forward(theItem), myData1[aHash]); + myData1[aHash] = aNode; + myData2[aNewIndex - 1] = aNode; return aNewIndex; } //! Contains Standard_Boolean Contains (const TheKeyType& theKey1) const { - if (IsEmpty()) - return Standard_False; - Standard_Integer iK1 = Hasher::HashCode (theKey1, NbBuckets()); - IndexedDataMapNode * pNode1; - pNode1 = (IndexedDataMapNode *) myData1[iK1]; - while (pNode1) + IndexedDataMapNode* aNode; + if (lookup(theKey1, aNode)) { - if (Hasher::IsEqual(pNode1->Key1(), theKey1)) - return Standard_True; - pNode1 = (IndexedDataMapNode *) pNode1->Next(); + return true; } - return Standard_False; + return false; } //! Substitute @@ -303,44 +403,40 @@ private: "Index is out of range"); // check if theKey1 is not already in the map - const Standard_Integer iK1 = Hasher::HashCode (theKey1, NbBuckets()); - IndexedDataMapNode* p = (IndexedDataMapNode *) myData1[iK1]; - while (p) + size_t aHash; + IndexedDataMapNode* aNode; + if (lookup(theKey1, aNode, aHash)) { - if (Hasher::IsEqual (p->Key1(), theKey1)) + if (aNode->Index() != theIndex) { - if (p->Index() != theIndex) - { - throw Standard_DomainError ("NCollection_IndexedDataMap::Substitute : " - "Attempt to substitute existing key"); - } - p->Key1() = theKey1; - p->ChangeValue() = theItem; - return; + throw Standard_DomainError("NCollection_IndexedDataMap::Substitute : " + "Attempt to substitute existing key"); } - p = (IndexedDataMapNode *) p->Next(); + aNode->Key1() = theKey1; + aNode->ChangeValue() = theItem; + return; } // Find the node for the index I - p = (IndexedDataMapNode* )myData2[theIndex - 1]; + aNode = (IndexedDataMapNode* )myData2[theIndex - 1]; // remove the old key - const Standard_Integer iK = Hasher::HashCode (p->Key1(), NbBuckets()); + const size_t iK = HashCode (aNode->Key1(), NbBuckets()); IndexedDataMapNode * q = (IndexedDataMapNode *) myData1[iK]; - if (q == p) - myData1[iK] = (IndexedDataMapNode *) p->Next(); + if (q == aNode) + myData1[iK] = (IndexedDataMapNode *)aNode->Next(); else { - while (q->Next() != p) + while (q->Next() != aNode) q = (IndexedDataMapNode *) q->Next(); - q->Next() = p->Next(); + q->Next() = aNode->Next(); } // update the node - p->Key1() = theKey1; - p->ChangeValue() = theItem; - p->Next() = myData1[iK1]; - myData1[iK1] = p; + aNode->Key1() = theKey1; + aNode->ChangeValue() = theItem; + aNode->Next() = myData1[aHash]; + myData1[aHash] = aNode; } //! Swaps two elements with the given indices. @@ -373,7 +469,7 @@ private: myData2[aLastIndex - 1] = NULL; // remove the key - const Standard_Integer iK1 = Hasher::HashCode (p->Key1(), NbBuckets()); + const size_t iK1 = HashCode (p->Key1(), NbBuckets()); IndexedDataMapNode* q = (IndexedDataMapNode *) myData1[iK1]; if (q == p) myData1[iK1] = (IndexedDataMapNode *) p->Next(); @@ -444,15 +540,10 @@ private: //! FindIndex Standard_Integer FindIndex(const TheKeyType& theKey1) const { - if (IsEmpty()) return 0; - IndexedDataMapNode* pNode1 = (IndexedDataMapNode* )myData1[Hasher::HashCode(theKey1,NbBuckets())]; - while (pNode1) + IndexedDataMapNode* aNode; + if (lookup(theKey1, aNode)) { - if (Hasher::IsEqual (pNode1->Key1(), theKey1)) - { - return pNode1->Index(); - } - pNode1 = (IndexedDataMapNode*) pNode1->Next(); + return aNode->Index(); } return 0; } @@ -461,15 +552,10 @@ private: const TheItemType& FindFromKey(const TheKeyType& theKey1) const { Standard_NoSuchObject_Raise_if (IsEmpty(), "NCollection_IndexedDataMap::FindFromKey"); - - IndexedDataMapNode* pNode1 = (IndexedDataMapNode* )myData1[Hasher::HashCode(theKey1,NbBuckets())]; - while (pNode1) + IndexedDataMapNode* aNode; + if (lookup(theKey1, aNode)) { - if (Hasher::IsEqual (pNode1->Key1(), theKey1)) - { - return pNode1->Value(); - } - pNode1 = (IndexedDataMapNode*) pNode1->Next(); + return aNode->Value(); } throw Standard_NoSuchObject("NCollection_IndexedDataMap::FindFromKey"); } @@ -478,15 +564,10 @@ private: TheItemType& ChangeFromKey (const TheKeyType& theKey1) { Standard_NoSuchObject_Raise_if (IsEmpty(), "NCollection_IndexedDataMap::ChangeFromKey"); - - IndexedDataMapNode* pNode1 = (IndexedDataMapNode* )myData1[Hasher::HashCode(theKey1,NbBuckets())]; - while (pNode1) + IndexedDataMapNode* aNode; + if (lookup(theKey1, aNode)) { - if (Hasher::IsEqual (pNode1->Key1(), theKey1)) - { - return pNode1->ChangeValue(); - } - pNode1 = (IndexedDataMapNode*) pNode1->Next(); + return aNode->ChangeValue(); } throw Standard_NoSuchObject("NCollection_IndexedDataMap::ChangeFromKey"); } @@ -496,27 +577,18 @@ private: const TheItemType* Seek(const TheKeyType& theKey1) const { return const_cast< NCollection_IndexedDataMap * >( this )->ChangeSeek(theKey1); - //NCollection_IndexedDataMap *pMap=(NCollection_IndexedDataMap *)this; - //return pMap->ChangeSeek(theKey1); } //! ChangeSeek returns modifiable pointer to Item by Key. Returns //! NULL if Key was not found. TheItemType* ChangeSeek (const TheKeyType& theKey1) { - if (!IsEmpty()) + IndexedDataMapNode* aNode; + if (lookup(theKey1, aNode)) { - IndexedDataMapNode* pNode1 = (IndexedDataMapNode* )myData1[Hasher::HashCode(theKey1,NbBuckets())]; - while (pNode1) - { - if (Hasher::IsEqual (pNode1->Key1(), theKey1)) - { - return &pNode1->ChangeValue(); - } - pNode1 = (IndexedDataMapNode*) pNode1->Next(); - } + return &aNode->ChangeValue(); } - return 0L; + return nullptr; } //! Find value for key with copying. @@ -524,46 +596,91 @@ private: Standard_Boolean FindFromKey (const TheKeyType& theKey1, TheItemType& theValue) const { - if (IsEmpty()) - { - return Standard_False; - } - for (IndexedDataMapNode* aNode = (IndexedDataMapNode* )myData1[Hasher::HashCode (theKey1, NbBuckets())]; - aNode != NULL; aNode = (IndexedDataMapNode* )aNode->Next()) + IndexedDataMapNode* aNode; + if (lookup(theKey1, aNode)) { - if (Hasher::IsEqual (aNode->Key1(), theKey1)) - { theValue = aNode->Value(); return Standard_True; - } } return Standard_False; } //! Clear data. If doReleaseMemory is false then the table of //! buckets is not released and will be reused. - void Clear(const Standard_Boolean doReleaseMemory = Standard_True) + void Clear(const Standard_Boolean doReleaseMemory = Standard_False) { Destroy (IndexedDataMapNode::delNode, doReleaseMemory); } //! Clear data and reset allocator void Clear (const Handle(NCollection_BaseAllocator)& theAllocator) { - Clear(); + Clear(theAllocator != this->myAllocator); this->myAllocator = ( ! theAllocator.IsNull() ? theAllocator : NCollection_BaseAllocator::CommonBaseAllocator() ); } //! Destructor virtual ~NCollection_IndexedDataMap (void) - { Clear(); } + { Clear(true); } //! Size Standard_Integer Size(void) const { return Extent(); } - private: - // ----------- PRIVATE METHODS ----------- +protected: + + //! Lookup for particular key in map. + //! @param[in] theKey key to compute hash + //! @param[out] theNode the detected node with equal key. Can be null. + //! @param[out] theHash computed bounded hash code for current key. + //! @return true if key is found + Standard_Boolean lookup(const TheKeyType& theKey, IndexedDataMapNode*& theNode, size_t& theHash) const + { + theHash = HashCode(theKey, NbBuckets()); + if (IsEmpty()) + return Standard_False; // Not found + for (theNode = (IndexedDataMapNode*)myData1[theHash]; + theNode; theNode = (IndexedDataMapNode*)theNode->Next()) + { + if (IsEqual(theNode->Key1(), theKey)) + return Standard_True; + } + return Standard_False; // Not found + } + + //! Lookup for particular key in map. + //! @param[in] theKey key to compute hash + //! @param[out] theNode the detected node with equal key. Can be null. + //! @return true if key is found + Standard_Boolean lookup(const TheKeyType& theKey, IndexedDataMapNode*& theNode) const + { + if (IsEmpty()) + return Standard_False; // Not found + for (theNode = (IndexedDataMapNode*)myData1[HashCode(theKey, NbBuckets())]; + theNode; theNode = (IndexedDataMapNode*)theNode->Next()) + { + if (IsEqual(theNode->Key1(), theKey)) + { + return Standard_True; + } + } + return Standard_False; // Not found + } + + bool IsEqual(const TheKeyType& theKey1, + const TheKeyType& theKey2) const + { + return myHasher(theKey1, theKey2); + } + + size_t HashCode(const TheKeyType& theKey, + const int theUpperBound) const + { + return myHasher(theKey) % theUpperBound + 1; + } + +protected: + Hasher myHasher; }; #endif diff --git a/src/NCollection/NCollection_IndexedIterator.hxx b/src/NCollection/NCollection_IndexedIterator.hxx new file mode 100644 index 0000000000..fbc6bbd5a3 --- /dev/null +++ b/src/NCollection/NCollection_IndexedIterator.hxx @@ -0,0 +1,232 @@ +// Copyright (c) 2023 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 NCollection_IndexedIterator_HeaderFile +#define NCollection_IndexedIterator_HeaderFile + +#include +#include + +//! Helper class that allows to use NCollection iterators as STL iterators. +//! NCollection iterator can be extended to STL iterator of any category by +//! adding necessary methods: STL forward iterator requires IsEqual method, +//! STL bidirectional iterator requires Previous method, and STL random access +//! iterator requires Offset and Differ methods. See NCollection_Vector as +//! example of declaring custom STL iterators. +template +class NCollection_IndexedIterator +{ +public: + + // Since C++20 inheritance from std::iterator is deprecated, so define predefined types manually: + using iterator_category = Category; + using value_type = ItemType; + using difference_type = ptrdiff_t; + using pointer = typename std::conditional::type; + using reference = typename std::conditional::type; + + //! Default constructor + NCollection_IndexedIterator() : myIndex(0), myIndexedMap(nullptr) + {} + + //! Constructor from NCollection_Indexed*Map + NCollection_IndexedIterator(const BaseIndexedMap& theMap) : + myIndex(0), myIndexedMap((&const_cast(theMap))) + {} + + //! Constructor from NCollection_Indexed*Map + NCollection_IndexedIterator(const size_t theIndex, const BaseIndexedMap& theMap) : + myIndex(theIndex), myIndexedMap(&const_cast(theMap)) + {} + + //! Cast from non-const variant to const one + NCollection_IndexedIterator(const NCollection_IndexedIterator& theOther) : + myIndex(theOther.myIndex), myIndexedMap(theOther.myIndexedMap) + {} + + //! Assignment of non-const iterator to const one + NCollection_IndexedIterator& operator= (const NCollection_IndexedIterator& theOther) + { + myIndex = theOther.myIndex; + myIndexedMap = theOther.myIndexedMap; + return *this; + } + +protected: //! @name methods related to forward STL iterator + + // Note: Here we use SFINAE (Substitution failure is not an error) to choose + // an appropriate method based on template arguments (at instantiation time). + + template + typename std::enable_if::type Reference() const + { + return myIndexedMap->at(myIndex); + } + + template + typename std::enable_if::type Reference() const + { + return myIndexedMap->at(myIndex); + } + +public: //! @name methods related to forward STL iterator + + //! Test for equality + bool operator== (const NCollection_IndexedIterator& theOther) const + { + return myIndexedMap == theOther.myIndexedMap && + myIndex == theOther.myIndex; + } + + template + bool operator== (const NCollection_IndexedIterator& theOther) const + { + return myIndexedMap == theOther.myIndexedMap && + myIndex == theOther.myIndex; + } + + template + bool operator!= (const NCollection_IndexedIterator& theOther) const + { + return myIndexedMap != theOther.myIndexedMap || + myIndex != theOther.myIndex; + } + + //! Test for inequality + bool operator!= (const NCollection_IndexedIterator& theOther) const + { + return !(*this == theOther); + } + + //! Get reference to current item + typename NCollection_IndexedIterator::reference operator*() const + { + return Reference(); + } + + //! Dereferencing operator + typename NCollection_IndexedIterator::pointer operator->() const + { + return &Reference(); + } + + //! Prefix increment + NCollection_IndexedIterator& operator++() + { + myIndex++; + return *this; + } + + //! Postfix increment + NCollection_IndexedIterator operator++(int) + { + const NCollection_IndexedIterator theOld(*this); + ++(*this); + return theOld; + } + +public: //! @name methods related to bidirectional STL iterator + + //! Prefix decrement + NCollection_IndexedIterator& operator--() + { + Standard_STATIC_ASSERT((opencascade::std::is_same::value || + opencascade::std::is_same::value)); + myIndex--; + return *this; + } + + //! Postfix decrement + NCollection_IndexedIterator operator--(int) + { + NCollection_IndexedIterator theOld(*this); + --(*this); + return theOld; + } + +public: //! @name methods related to random access STL iterator + + //! Move forward + NCollection_IndexedIterator& operator+= (typename NCollection_IndexedIterator::difference_type theOffset) + { + Standard_STATIC_ASSERT((opencascade::std::is_same::value)); + myIndex += theOffset; + return *this; + } + + //! Addition + NCollection_IndexedIterator operator+ (typename NCollection_IndexedIterator::difference_type theOffset) const + { + NCollection_IndexedIterator aTemp(*this); + return aTemp += theOffset; + } + + //! Move backward + NCollection_IndexedIterator& operator-= (typename NCollection_IndexedIterator::difference_type theOffset) + { + return *this += -theOffset; + } + + //! Decrease + NCollection_IndexedIterator operator- (typename NCollection_IndexedIterator::difference_type theOffset) const + { + NCollection_IndexedIterator aTemp(*this); + return aTemp += -theOffset; + } + + //! Difference + typename NCollection_IndexedIterator::difference_type operator- (const NCollection_IndexedIterator& theOther) const + { + Standard_STATIC_ASSERT((opencascade::std::is_same::value)); + return myIndex - theOther.myIndex; + } + + //! Get item at offset from current + typename NCollection_IndexedIterator::reference operator[] (typename NCollection_IndexedIterator::difference_type theOffset) const + { + return *(*this + theOffset); + } + + //! Comparison + bool operator< (const NCollection_IndexedIterator& theOther) const + { + return (*this - theOther) < 0; + } + + //! Comparison + bool operator> (const NCollection_IndexedIterator& theOther) const + { + return theOther < *this; + } + + //! Comparison + bool operator<= (const NCollection_IndexedIterator& theOther) const + { + return !(theOther < *this); + } + + //! Comparison + bool operator>= (const NCollection_IndexedIterator& theOther) const + { + return !(*this < theOther); + } + + friend class NCollection_IndexedIterator; + +private: + //! NCollection iterator + size_t myIndex; + BaseIndexedMap* myIndexedMap; +}; + +#endif // NCollection_IndexedIterator_HeaderFile diff --git a/src/NCollection/NCollection_IndexedMap.hxx b/src/NCollection/NCollection_IndexedMap.hxx index 875068d83c..83d28baec3 100644 --- a/src/NCollection/NCollection_IndexedMap.hxx +++ b/src/NCollection/NCollection_IndexedMap.hxx @@ -55,8 +55,14 @@ protected: NCollection_ListNode* theNext1) : NCollection_TListNode (theKey1, theNext1), myIndex (theIndex) - { - } + {} + //! Constructor with 'Next' + IndexedMapNode (TheKeyType&& theKey1, + const Standard_Integer theIndex, + NCollection_ListNode* theNext1) + : NCollection_TListNode (std::forward(theKey1), theNext1), + myIndex (theIndex) + {} //! Key1 TheKeyType& Key1() { return this->ChangeValue(); } @@ -125,18 +131,23 @@ protected: // ---------- PUBLIC METHODS ------------ //! Empty constructor. - NCollection_IndexedMap() : NCollection_BaseMap (1, Standard_False, Handle(NCollection_BaseAllocator)()) {} + NCollection_IndexedMap() : NCollection_BaseMap (1, true, Handle(NCollection_BaseAllocator)()) {} //! Constructor explicit NCollection_IndexedMap (const Standard_Integer theNbBuckets, const Handle(NCollection_BaseAllocator)& theAllocator=0L) - : NCollection_BaseMap (theNbBuckets, Standard_False, theAllocator) {} + : NCollection_BaseMap (theNbBuckets, true, theAllocator) {} //! Copy constructor NCollection_IndexedMap (const NCollection_IndexedMap& theOther) - : NCollection_BaseMap (theOther.NbBuckets(), Standard_False, theOther.myAllocator) + : NCollection_BaseMap (theOther.NbBuckets(), true, theOther.myAllocator) { *this = theOther; } + //! Move constructor + NCollection_IndexedMap(NCollection_IndexedMap&& theOther) noexcept : + NCollection_BaseMap(std::forward(theOther)) + {} + //! Exchange the content of two maps without re-allocations. //! Notice that allocators will be swapped as well! void Exchange (NCollection_IndexedMap& theOther) @@ -159,7 +170,7 @@ protected: for (Standard_Integer anIndexIter = 1; anIndexIter <= anExt; ++anIndexIter) { const TheKeyType& aKey1 = theOther.FindKey (anIndexIter); - const Standard_Integer iK1 = Hasher::HashCode (aKey1, NbBuckets()); + const size_t iK1 = HashCode (aKey1, NbBuckets()); IndexedMapNode* pNode = new (this->myAllocator) IndexedMapNode (aKey1, anIndexIter, myData1[iK1]); myData1[iK1] = pNode; myData2[anIndexIter - 1] = pNode; @@ -175,6 +186,15 @@ protected: return Assign (theOther); } + //! Move operator + NCollection_IndexedMap& operator= (NCollection_IndexedMap&& theOther) noexcept + { + if (this == &theOther) + return *this; + exchangeMapsData(theOther); + return *this; + } + //! ReSize void ReSize (const Standard_Integer theExtent) { @@ -185,7 +205,6 @@ protected: { if (myData1) { - memcpy (ppNewData2, myData2, sizeof(IndexedMapNode*) * Extent()); for (Standard_Integer aBucketIter = 0; aBucketIter <= NbBuckets(); ++aBucketIter) { if (myData1[aBucketIter]) @@ -193,7 +212,7 @@ protected: IndexedMapNode* p = (IndexedMapNode* )myData1[aBucketIter]; while (p) { - const Standard_Integer iK1 = Hasher::HashCode (p->Key1(), newBuck); + const size_t iK1 = HashCode (p->Key1(), newBuck); IndexedMapNode* q = (IndexedMapNode* )p->Next(); p->Next() = ppNewData1[iK1]; ppNewData1[iK1] = p; @@ -202,7 +221,8 @@ protected: } } } - EndResize (theExtent, newBuck, ppNewData1, ppNewData2); + EndResize (theExtent, newBuck, ppNewData1, (NCollection_ListNode**) + Standard::Reallocate(myData2, (newBuck + 1) * sizeof(NCollection_ListNode*))); } } @@ -213,40 +233,45 @@ protected: { ReSize (Extent()); } - - Standard_Integer iK1 = Hasher::HashCode (theKey1, NbBuckets()); - IndexedMapNode* pNode = (IndexedMapNode* )myData1[iK1]; - while (pNode) + IndexedMapNode* aNode; + size_t aHash; + if (lookup(theKey1, aNode, aHash)) { - if (Hasher::IsEqual (pNode->Key1(), theKey1)) - { - return pNode->Index(); - } - pNode = (IndexedMapNode *) pNode->Next(); + return aNode->Index(); } + const Standard_Integer aNewIndex = Increment(); + aNode = new (this->myAllocator) IndexedMapNode (theKey1, aNewIndex, myData1[aHash]); + myData1[aHash] = aNode; + myData2[aNewIndex - 1] = aNode; + return aNewIndex; + } + //! Add + Standard_Integer Add (TheKeyType&& theKey1) + { + if (Resizable()) + { + ReSize(Extent()); + } + size_t aHash; + IndexedMapNode* aNode; + if (lookup(theKey1, aNode, aHash)) + { + return aNode->Index(); + } const Standard_Integer aNewIndex = Increment(); - pNode = new (this->myAllocator) IndexedMapNode (theKey1, aNewIndex, myData1[iK1]); - myData1[iK1] = pNode; - myData2[aNewIndex - 1] = pNode; + aNode = new (this->myAllocator) IndexedMapNode(std::forward(theKey1), + aNewIndex, myData1[aHash]); + myData1[aHash] = aNode; + myData2[aNewIndex - 1] = aNode; return aNewIndex; } //! Contains Standard_Boolean Contains (const TheKeyType& theKey1) const { - if (IsEmpty()) - return Standard_False; - Standard_Integer iK1 = Hasher::HashCode (theKey1, NbBuckets()); - IndexedMapNode * pNode1; - pNode1 = (IndexedMapNode *) myData1[iK1]; - while (pNode1) - { - if (Hasher::IsEqual(pNode1->Key1(), theKey1)) - return Standard_True; - pNode1 = (IndexedMapNode *) pNode1->Next(); - } - return Standard_False; + IndexedMapNode* p; + return lookup(theKey1, p); } //! Substitute @@ -258,42 +283,37 @@ protected: "Index is out of range"); // check if theKey1 is not already in the map - Standard_Integer iK1 = Hasher::HashCode (theKey1, NbBuckets()); - IndexedMapNode* p = (IndexedMapNode *) myData1[iK1]; - while (p) + IndexedMapNode* aNode; + size_t aHash; + if (lookup(theKey1, aNode, aHash)) { - if (Hasher::IsEqual (p->Key1(), theKey1)) + if (aNode->Index() != theIndex) { - if (p->Index() != theIndex) - { - throw Standard_DomainError ("NCollection_IndexedMap::Substitute : " - "Attempt to substitute existing key"); - } - p->Key1() = theKey1; - return; + throw Standard_DomainError ("NCollection_IndexedMap::Substitute : " + "Attempt to substitute existing key"); } - p = (IndexedMapNode *) p->Next(); + aNode->Key1() = theKey1; + return; } - // Find the node for the index I - p = (IndexedMapNode* )myData2[theIndex - 1]; + aNode = (IndexedMapNode* )myData2[theIndex - 1]; // remove the old key - Standard_Integer iK = Hasher::HashCode (p->Key1(), NbBuckets()); + const size_t iK = HashCode (aNode->Key1(), NbBuckets()); IndexedMapNode * q = (IndexedMapNode *) myData1[iK]; - if (q == p) - myData1[iK] = (IndexedMapNode *) p->Next(); + if (q == aNode) + myData1[iK] = (IndexedMapNode *) aNode->Next(); else { - while (q->Next() != p) + while (q->Next() != aNode) q = (IndexedMapNode *) q->Next(); - q->Next() = p->Next(); + q->Next() = aNode->Next(); } // update the node - p->Key1() = theKey1; - p->Next() = myData1[iK1]; - myData1[iK1] = p; + aNode->Key1() = theKey1; + aNode->Next() = myData1[aHash]; + myData1[aHash] = aNode; } //! Swaps two elements with the given indices. @@ -326,7 +346,7 @@ protected: myData2[aLastIndex - 1] = NULL; // remove the key - Standard_Integer iK1 = Hasher::HashCode (p->Key1(), NbBuckets()); + const size_t iK1 = HashCode (p->Key1(), NbBuckets()); IndexedMapNode* q = (IndexedMapNode *) myData1[iK1]; if (q == p) myData1[iK1] = (IndexedMapNode *) p->Next(); @@ -383,39 +403,90 @@ protected: //! FindIndex Standard_Integer FindIndex(const TheKeyType& theKey1) const { - if (IsEmpty()) return 0; - IndexedMapNode* pNode1 = (IndexedMapNode* )myData1[Hasher::HashCode(theKey1,NbBuckets())]; - while (pNode1) + IndexedMapNode* aNode; + if (lookup(theKey1, aNode)) { - if (Hasher::IsEqual (pNode1->Key1(), theKey1)) - { - return pNode1->Index(); - } - pNode1 = (IndexedMapNode*) pNode1->Next(); + return aNode->Index(); } return 0; } //! Clear data. If doReleaseMemory is false then the table of //! buckets is not released and will be reused. - void Clear(const Standard_Boolean doReleaseMemory = Standard_True) + void Clear(const Standard_Boolean doReleaseMemory = Standard_False) { Destroy (IndexedMapNode::delNode, doReleaseMemory); } //! Clear data and reset allocator void Clear (const Handle(NCollection_BaseAllocator)& theAllocator) { - Clear(); + Clear(theAllocator != this->myAllocator); this->myAllocator = ( ! theAllocator.IsNull() ? theAllocator : NCollection_BaseAllocator::CommonBaseAllocator() ); } //! Destructor virtual ~NCollection_IndexedMap (void) - { Clear(); } + { Clear(true); } //! Size Standard_Integer Size(void) const { return Extent(); } + +protected: + + //! Lookup for particular key in map. + //! @param[in] theKey key to compute hash + //! @param[out] theNode the detected node with equal key. Can be null. + //! @param[out] theHash computed bounded hash code for current key. + //! @return true if key is found + Standard_Boolean lookup(const TheKeyType& theKey, IndexedMapNode*& theNode, size_t& theHash) const + { + theHash = HashCode(theKey, NbBuckets()); + if (IsEmpty()) + return Standard_False; // Not found + for (theNode = (IndexedMapNode*)myData1[theHash]; + theNode; theNode = (IndexedMapNode*)theNode->Next()) + { + if (IsEqual(theNode->Key1(), theKey)) + return Standard_True; + } + return Standard_False; // Not found + } + + //! Lookup for particular key in map. + //! @param[in] theKey key to compute hash + //! @param[out] theNode the detected node with equal key. Can be null. + //! @return true if key is found + Standard_Boolean lookup(const TheKeyType& theKey, IndexedMapNode*& theNode) const + { + if (IsEmpty()) + return Standard_False; // Not found + for (theNode = (IndexedMapNode*)myData1[HashCode(theKey, NbBuckets())]; + theNode; theNode = (IndexedMapNode*)theNode->Next()) + { + if (IsEqual(theNode->Key1(), theKey)) + { + return Standard_True; + } + } + return Standard_False; // Not found + } + + bool IsEqual(const TheKeyType& theKey1, + const TheKeyType& theKey2) const + { + return myHasher(theKey1, theKey2); + } + + size_t HashCode(const TheKeyType& theKey, + const int theUpperBound) const + { + return myHasher(theKey) % theUpperBound + 1; + } + +protected: + + Hasher myHasher; }; #endif diff --git a/src/NCollection/NCollection_Iterator.hxx b/src/NCollection/NCollection_Iterator.hxx new file mode 100644 index 0000000000..ec4481ae40 --- /dev/null +++ b/src/NCollection/NCollection_Iterator.hxx @@ -0,0 +1,127 @@ +// Copyright (c) 2023 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 NCollection_Iterator_HeaderFile +#define NCollection_Iterator_HeaderFile + +#include +#include + +//! Helper class that allows to use NCollection iterators as STL iterators. +//! NCollection iterator can be extended to STL iterator of any category by +//! adding necessary methods: STL forward iterator requires IsEqual method, +//! STL bidirectional iterator requires Previous method, and STL random access +//! iterator requires Offset and Differ methods. See NCollection_Vector as +//! example of declaring custom STL iterators. +template +class NCollection_Iterator +{ +public: + + NCollection_Iterator() : myCur(typename Container::iterator()), myLast(typename Container::iterator()) {} + + NCollection_Iterator(const NCollection_Iterator& theOther) : myCur(theOther.myCur), myLast(theOther.myLast) {} + + NCollection_Iterator(const Container& theList) : myCur(const_cast(theList).begin()), myLast(const_cast(theList).end()) {} + + NCollection_Iterator(const Container& theList, const typename Container::iterator& theOther) + : myCur(theOther), myLast(const_cast(theList).end()) {} + + NCollection_Iterator(const Container& theList, typename Container::iterator&& theOther) + : myCur(theOther), myLast(const_cast(theList).end()) + {} + + ~NCollection_Iterator() {} + + void Init(Container& theList) + { + myCur = theList.begin(); + myLast = theList.end(); + } + + void Init(const Container& theList) + { + Init(const_cast(theList)); + } + + virtual bool More() const + { + return myCur != myLast; + } + + void Initialize(Container& theList) + { + Init(theList); + } + + void Initialize(const Container& theList) + { + Init(theList); + } + + const typename Container::iterator& ValueIter() const + { + return myCur; + } + + typename Container::iterator& ChangeValueIter() + { + return myCur; + } + + const typename Container::iterator& EndIter() const + { + return myLast; + } + + typename Container::iterator& ChangeEndIter() + { + return myLast; + } + + virtual void Next() + { + ++(myCur); + } + + bool operator==(const NCollection_Iterator& theOther) { return myLast == theOther.myLast && myCur == theOther.myCur; } + + bool operator!=(const NCollection_Iterator& theOther) { return myLast != theOther.myLast || myCur != theOther.myCur; } + + NCollection_Iterator& operator=(const NCollection_Iterator& theOther) + { + if (this != &theOther) + { + myLast = theOther.myLast; + myCur = theOther.myCur; + } + return *this; + } + + NCollection_Iterator& operator=(NCollection_Iterator&& theOther) + { + if (this != &theOther) + { + myLast = std::move(theOther.myLast); + myCur = std::move(theOther.myCur); + } + return *this; + } + +private: + typename Container::iterator myCur; + typename Container::iterator myLast; +}; + + +#endif // NCollection_Iterator_HeaderFile diff --git a/src/NCollection/NCollection_List.hxx b/src/NCollection/NCollection_List.hxx index 418d65eaae..ceb220b0b4 100644 --- a/src/NCollection/NCollection_List.hxx +++ b/src/NCollection/NCollection_List.hxx @@ -68,7 +68,14 @@ public: NCollection_List (const NCollection_List& theOther) : NCollection_BaseList(theOther.myAllocator) { - Assign (theOther); + appendList(theOther.PFirst()); + } + + //! Move constructor + NCollection_List(NCollection_List&& theOther) noexcept : + NCollection_BaseList(theOther.myAllocator) + { + this->operator=(std::forward(theOther)); } //! Size - Number of items @@ -92,6 +99,22 @@ public: return Assign (theOther); } + //! Move operator + NCollection_List& operator= (NCollection_List&& theOther) noexcept + { + if (this == &theOther) + { + return *this; + } + Clear(theOther.myAllocator); + myFirst = theOther.myFirst; + myLast = theOther.myLast; + myLength = theOther.myLength; + theOther.myFirst = theOther.myLast = nullptr; + theOther.myLength = 0; + return *this; + } + //! Clear this list void Clear (const Handle(NCollection_BaseAllocator)& theAllocator=0L) { @@ -136,6 +159,14 @@ public: return ((ListNode *) PLast())->ChangeValue(); } + //! Append one item at the end + TheItemType& Append (TheItemType&& theItem) + { + ListNode * pNew = new (this->myAllocator) ListNode(std::forward(theItem)); + PAppend(pNew); + return ((ListNode *) PLast())->ChangeValue(); + } + //! Append one item at the end and output iterator //! pointing at the appended item void Append (const TheItemType& theItem, Iterator& theIter) @@ -144,6 +175,14 @@ public: PAppend(pNew, theIter); } + //! Append one item at the end and output iterator + //! pointing at the appended item + void Append (TheItemType&& theItem, Iterator& theIter) + { + ListNode * pNew = new (this->myAllocator) ListNode(std::forward(theItem)); + PAppend(pNew, theIter); + } + //! Append another list at the end. //! After this operation, theOther list will be cleared. void Append (NCollection_List& theOther) @@ -172,6 +211,14 @@ public: return ((ListNode *) PFirst())->ChangeValue(); } + //! Prepend one item at the beginning + TheItemType& Prepend (TheItemType&& theItem) + { + ListNode * pNew = new (this->myAllocator) ListNode(std::forward(theItem)); + PPrepend(pNew); + return ((ListNode *) PFirst())->ChangeValue(); + } + //! Prepend another list at the beginning void Prepend (NCollection_List& theOther) { @@ -227,6 +274,15 @@ public: return pNew -> ChangeValue(); } + //! InsertBefore + TheItemType& InsertBefore (TheItemType&& theItem, + Iterator& theIter) + { + ListNode * pNew = new (this->myAllocator) ListNode(std::forward(theItem)); + PInsertBefore (pNew, theIter); + return pNew -> ChangeValue(); + } + //! InsertBefore void InsertBefore (NCollection_List& theOther, Iterator& theIter) @@ -257,6 +313,15 @@ public: return pNew -> ChangeValue(); } + //! InsertAfter + TheItemType& InsertAfter (TheItemType&& theItem, + Iterator& theIter) + { + ListNode * pNew = new (this->myAllocator) ListNode(std::forward(theItem)); + PInsertAfter (pNew, theIter); + return pNew -> ChangeValue(); + } + //! InsertAfter void InsertAfter (NCollection_List& theOther, Iterator& theIter) diff --git a/src/NCollection/NCollection_Map.hxx b/src/NCollection/NCollection_Map.hxx index 339f1da6a7..ca7f0135b3 100644 --- a/src/NCollection/NCollection_Map.hxx +++ b/src/NCollection/NCollection_Map.hxx @@ -22,6 +22,7 @@ #include #include +#include /** * Purpose: Single hashed Map. This Map is used to store and @@ -58,6 +59,7 @@ class NCollection_Map : public NCollection_BaseMap public: //! STL-compliant typedef for key type typedef TheKeyType key_type; + typedef Hasher hasher; public: //! Adaptation of the TListNode to the map notations @@ -68,6 +70,10 @@ public: MapNode (const TheKeyType& theKey, NCollection_ListNode* theNext) : NCollection_TListNode (theKey, theNext) {} + //! Constructor with 'Next' + MapNode (TheKeyType&& theKey, + NCollection_ListNode* theNext) : + NCollection_TListNode (std::forward(theKey), theNext) {} //! Key const TheKeyType& Key (void) { return this->Value(); } @@ -127,9 +133,21 @@ public: : NCollection_BaseMap (theNbBuckets, Standard_True, theAllocator) {} //! Copy constructor - NCollection_Map (const NCollection_Map& theOther) : - NCollection_BaseMap (theOther.NbBuckets(), Standard_True, theOther.myAllocator) - { *this = theOther; } + NCollection_Map(const NCollection_Map& theOther) : + NCollection_BaseMap(theOther.NbBuckets(), Standard_True, theOther.myAllocator) + { + const int anExt = theOther.Extent(); + if (anExt <= 0) + return; + ReSize(anExt - 1); + for (Iterator anIter(theOther); anIter.More(); anIter.Next()) + Add(anIter.Key()); + } + + //! Move constructor + NCollection_Map (NCollection_Map&& theOther) noexcept : + NCollection_BaseMap (std::forward(theOther)) + {} //! Exchange the content of two maps without re-allocations. //! Notice that allocators will be swapped as well! @@ -163,6 +181,15 @@ public: return Assign(theOther); } + //! Move operator + NCollection_Map& operator= (NCollection_Map&& theOther) noexcept + { + if (this == &theOther) + return *this; + exchangeMapsData(theOther); + return *this; + } + //! ReSize void ReSize (const Standard_Integer N) { @@ -175,15 +202,14 @@ public: { MapNode** olddata = (MapNode**) myData1; MapNode *p, *q; - Standard_Integer i,k; - for (i = 0; i <= NbBuckets(); i++) + for (int i = 0; i <= NbBuckets(); i++) { if (olddata[i]) { p = olddata[i]; while (p) { - k = Hasher::HashCode(p->Key(),newBuck); + const size_t k = HashCode(p->Key(),newBuck); q = (MapNode*) p->Next(); p->Next() = newdata[k]; newdata[k] = p; @@ -197,58 +223,80 @@ public: } //! Add - Standard_Boolean Add(const TheKeyType& K) + Standard_Boolean Add(const TheKeyType& theKey) { if (Resizable()) ReSize(Extent()); + MapNode* aNode; + size_t aHash; + if (lookup(theKey, aNode, aHash)) + { + return Standard_False; + } MapNode** data = (MapNode**)myData1; - Standard_Integer k = Hasher::HashCode(K,NbBuckets()); - MapNode* p = data[k]; - while (p) + data[aHash] = new (this->myAllocator) MapNode(theKey,data[aHash]); + Increment(); + return Standard_True; + } + + //! Add + Standard_Boolean Add(TheKeyType&& theKey) + { + if (Resizable()) + ReSize(Extent()); + MapNode* aNode; + size_t aHash; + if (lookup(theKey, aNode, aHash)) { - if (Hasher::IsEqual(p->Key(),K)) - return Standard_False; - p = (MapNode *) p->Next(); + return Standard_False; } - data[k] = new (this->myAllocator) MapNode(K,data[k]); + MapNode** data = (MapNode**)myData1; + data[aHash] = new (this->myAllocator) MapNode(std::forward(theKey),data[aHash]); Increment(); return Standard_True; } //! Added: add a new key if not yet in the map, and return //! reference to either newly added or previously existing object - const TheKeyType& Added(const TheKeyType& K) + const TheKeyType& Added(const TheKeyType& theKey) { if (Resizable()) ReSize(Extent()); - MapNode** data = (MapNode**)myData1; - Standard_Integer k = Hasher::HashCode(K,NbBuckets()); - MapNode* p = data[k]; - while (p) + MapNode* aNode; + size_t aHash; + if (lookup(theKey, aNode, aHash)) { - if (Hasher::IsEqual(p->Key(),K)) - return p->Key(); - p = (MapNode *) p->Next(); + return aNode->Key(); } - data[k] = new (this->myAllocator) MapNode(K,data[k]); + MapNode** data = (MapNode**)myData1; + data[aHash] = new (this->myAllocator) MapNode(theKey,data[aHash]); Increment(); - return data[k]->Key(); + return data[aHash]->Key(); } - //! Contains - Standard_Boolean Contains(const TheKeyType& K) const + //! Added: add a new key if not yet in the map, and return + //! reference to either newly added or previously existing object + const TheKeyType& Added(TheKeyType&& theKey) { - if (IsEmpty()) - return Standard_False; - MapNode** data = (MapNode**) myData1; - MapNode* p = data[Hasher::HashCode(K,NbBuckets())]; - while (p) + if (Resizable()) + ReSize(Extent()); + MapNode* aNode; + size_t aHash; + if (lookup(theKey, aNode, aHash)) { - if (Hasher::IsEqual(p->Key(),K)) - return Standard_True; - p = (MapNode *) p->Next(); + return aNode->Key(); } - return Standard_False; + MapNode** data = (MapNode**)myData1; + data[aHash] = new (this->myAllocator) MapNode(std::forward(theKey),data[aHash]); + Increment(); + return data[aHash]->Key(); + } + + //! Contains + Standard_Boolean Contains(const TheKeyType& theKey) const + { + MapNode* p; + return lookup(theKey, p); } //! Remove @@ -257,12 +305,12 @@ public: if (IsEmpty()) return Standard_False; MapNode** data = (MapNode**) myData1; - Standard_Integer k = Hasher::HashCode(K,NbBuckets()); + const size_t k = HashCode(K,NbBuckets()); MapNode* p = data[k]; MapNode* q = NULL; while (p) { - if (Hasher::IsEqual(p->Key(),K)) + if (IsEqual(p->Key(),K)) { Decrement(); if (q) @@ -281,20 +329,20 @@ public: //! Clear data. If doReleaseMemory is false then the table of //! buckets is not released and will be reused. - void Clear(const Standard_Boolean doReleaseMemory = Standard_True) + void Clear(const Standard_Boolean doReleaseMemory = Standard_False) { Destroy (MapNode::delNode, doReleaseMemory); } //! Clear data and reset allocator void Clear (const Handle(NCollection_BaseAllocator)& theAllocator) { - Clear(); + Clear(theAllocator != this->myAllocator); this->myAllocator = ( ! theAllocator.IsNull() ? theAllocator : NCollection_BaseAllocator::CommonBaseAllocator() ); } //! Destructor virtual ~NCollection_Map (void) - { Clear(); } + { Clear(true); } //! Size Standard_Integer Size(void) const @@ -590,7 +638,60 @@ public: return anOldExtent != Extent(); } - //!@} +protected: + + //! Lookup for particular key in map. + //! @param[in] theKey key to compute hash + //! @param[out] theNode the detected node with equal key. Can be null. + //! @param[out] theHash computed bounded hash code for current key. + //! @return true if key is found + Standard_Boolean lookup(const TheKeyType& theKey, MapNode*& theNode, size_t& theHash) const + { + theHash = HashCode(theKey, NbBuckets()); + if (IsEmpty()) + return Standard_False; // Not found + for (theNode = (MapNode*)myData1[theHash]; + theNode; theNode = (MapNode*)theNode->Next()) + { + if (IsEqual(theNode->Key(), theKey)) + return Standard_True; + } + return Standard_False; // Not found + } + + //! Lookup for particular key in map. + //! @param[in] theKey key to compute hash + //! @param[out] theNode the detected node with equal key. Can be null. + //! @return true if key is found + Standard_Boolean lookup(const TheKeyType& theKey, MapNode*& theNode) const + { + if (IsEmpty()) + return Standard_False; // Not found + for (theNode = (MapNode*)myData1[HashCode(theKey, NbBuckets())]; + theNode; theNode = (MapNode*)theNode->Next()) + { + if (IsEqual(theNode->Key(), theKey)) + { + return Standard_True; + } + } + return Standard_False; // Not found + } + + bool IsEqual(const TheKeyType& theKey1, + const TheKeyType& theKey2) const + { + return myHasher(theKey1, theKey2); + } + + size_t HashCode(const TheKeyType& theKey, + const int theUpperBound) const + { + return myHasher(theKey) % theUpperBound + 1; + } +protected: + + Hasher myHasher; }; #endif diff --git a/src/NCollection/NCollection_OccAllocator.hxx b/src/NCollection/NCollection_OccAllocator.hxx new file mode 100644 index 0000000000..3d5e674cc7 --- /dev/null +++ b/src/NCollection/NCollection_OccAllocator.hxx @@ -0,0 +1,215 @@ +// Copyright (c) 2023 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 _NCollection_OccAllocator_HeaderFile +#define _NCollection_OccAllocator_HeaderFile + +#include +#include + +#include + +//! Implements allocator requirements as defined in ISO C++ Standard 2003, section 20.1.5. +/*! The allocator uses a standard OCCT mechanism for memory + allocation and deallocation. It can be used with standard + containers (std::vector, std::map, etc.) to take advantage of OCCT memory optimizations. + + Example of use: + \code + NCollection_OccAllocator anSAllocator(); + std::list> aList(anSAllocator); + TopoDS_Solid aSolid = BRepPrimAPI_MakeBox(10., 20., 30.); + aList.push_back(aSolid); + \endcode +*/ +template +class NCollection_OccAllocator +{ +public: + + typedef ItemType value_type; + typedef value_type* pointer; + typedef const value_type* const_pointer; + typedef value_type& reference; + typedef const value_type& const_reference; + typedef size_t size_type; + typedef ptrdiff_t difference_type; + typedef std::false_type propagate_on_container_move_assignment; // std::false_type + + template + struct rebind + { + typedef NCollection_OccAllocator other; + }; + + //! Constructor. + //! Creates an object using the default Open CASCADE allocation mechanism, i.e., which uses + //! Standard::Allocate() and Standard::Free() underneath. + NCollection_OccAllocator() : + myAllocator(nullptr) + {} + + //! Constructor. + NCollection_OccAllocator(const Handle(NCollection_BaseAllocator)& theAlloc) : + myAllocator(theAlloc) + {} + + //! Constructor. + NCollection_OccAllocator(Handle(NCollection_BaseAllocator)&& theAlloc) : + myAllocator(theAlloc) + {} + + //! Constructor. + NCollection_OccAllocator(const NCollection_OccAllocator& theOther) : + myAllocator(theOther.myAllocator) + {} + + //! Constructor. + NCollection_OccAllocator(NCollection_OccAllocator&& theOther) noexcept : + myAllocator(theOther.myAllocator) + {} + + //! Assignment operator + NCollection_OccAllocator& operator=(const NCollection_OccAllocator& theOther) + { + myAllocator = theOther.myAllocator; + return *this; + } + + //! Assignment operator + NCollection_OccAllocator& operator=(NCollection_OccAllocator&& theOther) noexcept + { + myAllocator = theOther.myAllocator; + return *this; + } + + //! Assignment operator + template + NCollection_OccAllocator& operator=(const NCollection_OccAllocator& theOther) + { + myAllocator = theOther.myAllocator; + return *this; + } + + //! Constructor. + //! Creates an object using the default Open CASCADE allocation mechanism, i.e., which uses + //! Standard::Allocate() and Standard::Free() underneath. + template + NCollection_OccAllocator(const NCollection_OccAllocator& theOther) : + myAllocator(theOther.Allocator()) + {} + + void SetAllocator(const Handle(NCollection_BaseAllocator)& theAlloc) + { + myAllocator = theAlloc; + } + + const Handle(NCollection_BaseAllocator)& Allocator() const + { + return myAllocator; + } + + //! Allocates memory for theSize objects. + pointer allocate(size_type theSize, const void* = 0) + { + return static_cast (myAllocator.IsNull() ? + Standard::AllocateOptimal(theSize * sizeof(ItemType)) : + myAllocator->AllocateOptimal(theSize * sizeof(ItemType))); + } + + //! Template version of function Free(), nullifies the argument pointer + //! @param thePtr - previously allocated memory block to be freed + template + void deallocate(T* thePnt, size_type) + { + myAllocator.IsNull() ? + Standard::Free(thePnt) : + myAllocator->Free(thePnt); + } + + //! Frees previously allocated memory. + void deallocate(pointer thePnt, size_type) + { + myAllocator.IsNull() ? + Standard::Free(thePnt) : + myAllocator->Free(thePnt); + } + + //! Constructs an object. + //! Uses placement new operator and copy constructor to construct an object. + template + void construct(_Objty* _Ptr, _Types&&... _Args) + { + ::new ((void*)_Ptr) _Objty(std::forward<_Types>(_Args)...); + } + + //! Returns an object address. + pointer address(reference theItem) const + { + return &theItem; + } + + //! Returns an object address. + const_pointer address(const_reference theItem) const + { + return &theItem; + } + + //! Destroys the object. + //! Uses the object destructor. + template + void destroy(_Uty* _Ptr) + { + (void)_Ptr; _Ptr->~_Uty(); + } + + //! Estimate maximum array size + size_t max_size() const noexcept + { + return ((size_t)(-1) / sizeof(ItemType)); + } + + bool operator==(const NCollection_OccAllocator& theOther) const + { + return theOther.Allocator() == myAllocator; + } + + template + bool operator==(const NCollection_OccAllocator& theOther) const + { + return theOther.Allocator() == myAllocator; + } + + bool operator!=(const NCollection_OccAllocator& theOther) const + { + return theOther.Allocator() != myAllocator; + } + + template + bool operator!=(const NCollection_OccAllocator& theOther) const + { + return theOther.Allocator() != myAllocator; + } + +private: + + Handle(NCollection_BaseAllocator) myAllocator; +}; + +template +bool operator==(const NCollection_OccAllocator& theFirst, const NCollection_OccAllocator& theSecond) +{ + return theFirst.Allocator() == theSecond.Allocator(); +} + +#endif diff --git a/src/NCollection/NCollection_Sequence.hxx b/src/NCollection/NCollection_Sequence.hxx index 55ef23b88c..de95374fb6 100644 --- a/src/NCollection/NCollection_Sequence.hxx +++ b/src/NCollection/NCollection_Sequence.hxx @@ -21,6 +21,7 @@ #include #include +#include /** * Purpose: Definition of a sequence of elements indexed by @@ -42,6 +43,10 @@ public: Node (const TheItemType& theItem) : NCollection_SeqNode () { myValue = theItem; } + //! Constructor + Node (TheItemType&& theItem) : + NCollection_SeqNode () + { myValue = std::forward(theItem); } //! Constant value access const TheItemType& Value () const { return myValue; } //! Variable value access @@ -118,7 +123,14 @@ public: NCollection_Sequence (const NCollection_Sequence& theOther) : NCollection_BaseSequence(theOther.myAllocator) { - Assign (theOther); + appendSeq((const Node*)theOther.myFirstItem); + } + + //! Move constructor + NCollection_Sequence(NCollection_Sequence&& theOther) noexcept : + NCollection_BaseSequence(theOther.myAllocator) + { + this->operator=(std::forward(theOther)); } //! Number of items @@ -190,6 +202,28 @@ public: return Assign (theOther); } + //! Move operator + NCollection_Sequence& operator= (NCollection_Sequence&& theOther) noexcept + { + if (this == &theOther) + { + return *this; + } + Clear(theOther.myAllocator); + myFirstItem = theOther.myFirstItem; + myLastItem = theOther.myLastItem; + myCurrentItem = theOther.myCurrentItem; + myCurrentIndex = theOther.myCurrentIndex; + mySize = theOther.mySize; + + theOther.myFirstItem = nullptr; + theOther.myLastItem = nullptr; + theOther.myCurrentItem = nullptr; + theOther.myCurrentIndex = 0; + theOther.mySize = 0; + return *this; + } + //! Remove one item void Remove (Iterator& thePosition) { RemoveSeq (thePosition, delNode); } @@ -207,6 +241,10 @@ public: void Append (const TheItemType& theItem) { PAppend (new (this->myAllocator) Node (theItem)); } + //! Append one item + void Append (TheItemType&& theItem) + { PAppend (new (this->myAllocator) Node (std::forward(theItem))); } + //! Append another sequence (making it empty) void Append (NCollection_Sequence& theSeq) { @@ -230,6 +268,10 @@ public: void Prepend (const TheItemType& theItem) { PPrepend (new (this->myAllocator) Node (theItem)); } + //! Prepend one item + void Prepend (TheItemType&& theItem) + { PPrepend (new (this->myAllocator) Node (std::forward(theItem))); } + //! Prepend another sequence (making it empty) void Prepend (NCollection_Sequence& theSeq) { @@ -254,6 +296,11 @@ public: const TheItemType& theItem) { InsertAfter (theIndex-1, theItem); } + //! InsertBefore theIndex theItem + void InsertBefore (const Standard_Integer theIndex, + TheItemType&& theItem) + { InsertAfter (theIndex-1, theItem); } + //! InsertBefore theIndex another sequence (making it empty) void InsertBefore (const Standard_Integer theIndex, NCollection_Sequence& theSeq) @@ -264,6 +311,11 @@ public: const TheItemType& theItem) { PInsertAfter (thePosition, new (this->myAllocator) Node (theItem)); } + //! InsertAfter the position of iterator + void InsertAfter (Iterator& thePosition, + TheItemType&& theItem) + { PInsertAfter (thePosition, new (this->myAllocator) Node (theItem)); } + //! InsertAfter theIndex another sequence (making it empty) void InsertAfter (const Standard_Integer theIndex, NCollection_Sequence& theSeq) @@ -292,6 +344,14 @@ public: PInsertAfter (theIndex, new (this->myAllocator) Node (theItem)); } + //! InsertAfter theIndex theItem + void InsertAfter (const Standard_Integer theIndex, + TheItemType&& theItem) + { + Standard_OutOfRange_Raise_if (theIndex < 0 || theIndex > mySize, "NCollection_Sequence::InsertAfter"); + PInsertAfter (theIndex, new (this->myAllocator) Node (theItem)); + } + //! Split in two sequences void Split (const Standard_Integer theIndex, NCollection_Sequence& theSeq) { diff --git a/src/NCollection/NCollection_SparseArrayBase.hxx b/src/NCollection/NCollection_SparseArrayBase.hxx index ce5087d63b..b5308bfcbe 100644 --- a/src/NCollection/NCollection_SparseArrayBase.hxx +++ b/src/NCollection/NCollection_SparseArrayBase.hxx @@ -72,7 +72,7 @@ private: typedef unsigned char Cell; //!< type of items used to hold bits //! Number of bits in each cell - static Standard_Size BitsPerCell() { return sizeof(Cell) * 8/*BITSPERBYTE*/; } + static Standard_Size BitsPerCell() { return sizeof(Cell) * 8; } public: diff --git a/src/NCollection/NCollection_StdAllocator.hxx b/src/NCollection/NCollection_StdAllocator.hxx deleted file mode 100755 index 4aea7f21a5..0000000000 --- a/src/NCollection/NCollection_StdAllocator.hxx +++ /dev/null @@ -1,177 +0,0 @@ -// Author: Roman Lygin, 2012. -// This file is in the Public Domain and thus can freely be used for any purpose. -// The author disclaims any rights and liabilities. - -#ifndef _NCollection_StdAllocator_HeaderFile -#define _NCollection_StdAllocator_HeaderFile - -#include - -#if _MSC_VER - //Workaround for false "unreferenced parameter" warning in destroy(). - #pragma warning (push) - #pragma warning (disable: 4100) -#endif - -//! Implements allocator requirements as defined in ISO C++ Standard 2003, section 20.1.5. -/*! The allocator uses instance of the NCollection_BaseAllocator (sub)class for memory - allocation/deallocation. The allocator can be used with standard - containers (std::vector, std::map, etc) to take advantage of NCollection_IncAllocator - which implements memory region concept, and hence to increase performance in specific - cases. - - The underlying NCollection_BaseAllocator instance can be received using the Allocator() - method. - - Example of use: - \code - Handle(NCollection_IncAllocator) anIncAlloc = new NCollection_IncAllocator(); - NCollection_StdAllocator aSAlloc (anIncAlloc); - std::list > aL (aSAlloc); - TopoDS_Solid aSolid = BRepPrimAPI_MakeBox (10., 20., 30.); - aL.push_back (aSolid); - \endcode -*/ -template -class NCollection_StdAllocator { -public: - typedef T value_type; - typedef value_type* pointer; - typedef const value_type* const_pointer; - typedef value_type& reference; - typedef const value_type& const_reference; - typedef size_t size_type; - typedef ptrdiff_t difference_type; - template struct rebind { - typedef NCollection_StdAllocator other; - }; - - //! Constructor. - /*! Creates an object using default Open CASCADE allocation mechanism, i.e. which uses - Standard::Allocate() and Standard::Free() underneath. - */ - NCollection_StdAllocator() - { myAlloc = NCollection_BaseAllocator::CommonBaseAllocator(); } - - //! Constructor. - /*! Saves \a theAlloc as an underlying allocator instance.*/ - NCollection_StdAllocator( const Handle(NCollection_BaseAllocator)& theAlloc) - { myAlloc = theAlloc; } - - //! Copy constructor. - /*! Copies Allocator() from \a Y.*/ - template NCollection_StdAllocator( const NCollection_StdAllocator& Y) - { myAlloc = Y.Allocator(); } - - //! Assignment operator - template NCollection_StdAllocator& operator= (const NCollection_StdAllocator& Y) - { myAlloc = Y.Allocator(); return *this; } - - //! Returns an object address. - /*! Returns &x.*/ - pointer address( reference x ) const { return &x; } - - //! Returns an object address. - /*! Returns &x.*/ - const_pointer address( const_reference x ) const { return &x; } - - //! Allocates memory for \a n objects. - /*! Uses underlying allocator to allocate memory.*/ - pointer allocate( size_type n, const void* /*hint*/ = 0 ) - { return pointer( myAlloc->Allocate( n * sizeof( value_type ))); } - - //! Frees previously allocated memory. - /*! Uses underlying allocator to deallocate memory.*/ - void deallocate( pointer p, size_type ) { myAlloc->Free( p ); } - - //! Returns the largest value for which method allocate might succeed. - size_type max_size() const - { - size_type aMax = static_cast( -1 ) / sizeof( value_type ); - return aMax; - } - - //! Constructs an object. - /*! Uses placement new operator and copy constructor to construct an object.*/ - void construct( pointer p, const_reference val ) - { new( static_cast( p )) value_type( val ); } - - //! Destroys the object. - /*! Uses object destructor.*/ - void destroy( pointer p ) { p->~value_type(); } - - //! Returns an underlying NCollection_BaseAllocator instance. - /*! Returns an object specified in the constructor.*/ - const Handle(NCollection_BaseAllocator)& Allocator() const { return myAlloc; } - -protected: - Handle(NCollection_BaseAllocator) myAlloc; -}; - -#if _MSC_VER - #pragma warning (pop) -#endif - - -//! Implements specialization NCollection_StdAllocator. -/*! Specialization is of low value and should normally be avoided in favor of a typed specialization. - - Example of use: - \code - Handle(NCollection_IncAllocator) anIncAlloc = new NCollection_IncAllocator(); - NCollection_StdAllocator aVAlloc (anIncAlloc); - std::vector > aV3 (aVAlloc); - aV3.push_back (10.); - \endcode -*/ -template<> -class NCollection_StdAllocator { -public: - typedef void* pointer; - typedef const void* const_pointer; - typedef void value_type; - template struct rebind { - typedef NCollection_StdAllocator other; - }; - - //! Constructor. - /*! Creates an object using default Open CASCADE allocation mechanism, i.e. which uses - Standard::Allocate() and Standard::Free() underneath. - */ - NCollection_StdAllocator() - { myAlloc = NCollection_BaseAllocator::CommonBaseAllocator(); } - - //! Constructor. - /*! Saves \a theAlloc as an underlying allocator instance.*/ - NCollection_StdAllocator( const Handle(NCollection_BaseAllocator)& theAlloc) - { myAlloc = theAlloc; } - - //! Constructor. - /*! Copies Allocator() from \a X.*/ - NCollection_StdAllocator( const NCollection_StdAllocator& X) { myAlloc = X.myAlloc; } - - //! Returns an underlying NCollection_BaseAllocator instance. - /*! Returns an object specified in the constructor.*/ - const Handle(NCollection_BaseAllocator)& Allocator() const { return myAlloc; } - - //! Assignment operator - NCollection_StdAllocator& operator=(const NCollection_StdAllocator& X) - { - myAlloc = X.myAlloc; - return *this; - } - -protected: - Handle(NCollection_BaseAllocator) myAlloc; -}; - -template -inline bool operator==( const NCollection_StdAllocator& X, const NCollection_StdAllocator& Y) -{ return !!(X.Allocator() == Y.Allocator()); } - -template -inline bool operator!=( const NCollection_StdAllocator& X, const NCollection_StdAllocator& Y) -{ return !(X == Y); } - - -#endif diff --git a/src/NCollection/NCollection_TListNode.hxx b/src/NCollection/NCollection_TListNode.hxx index 2bbe687fa3..4a0ef6072a 100644 --- a/src/NCollection/NCollection_TListNode.hxx +++ b/src/NCollection/NCollection_TListNode.hxx @@ -17,6 +17,7 @@ #define NCollection_TListNode_HeaderFile #include +#include /** * Purpose: Abstract list node class. Used by BaseList @@ -30,6 +31,9 @@ template class NCollection_TListNode NCollection_TListNode (const TheItemType& theItem, NCollection_ListNode* theNext=NULL) : NCollection_ListNode (theNext), myValue(theItem) { } + NCollection_TListNode (TheItemType&& theItem, + NCollection_ListNode* theNext=NULL) : + NCollection_ListNode (theNext), myValue(std::forward(theItem)) { } //! Constant value access const TheItemType& Value () const { return myValue; } //! Variable value access diff --git a/src/NCollection/NCollection_UBTreeFiller.hxx b/src/NCollection/NCollection_UBTreeFiller.hxx index 04e7b39c15..d2ad00555e 100644 --- a/src/NCollection/NCollection_UBTreeFiller.hxx +++ b/src/NCollection/NCollection_UBTreeFiller.hxx @@ -48,7 +48,7 @@ template class NCollection_UBTreeFiller //! UBTree algorithm typedef NCollection_UBTree UBTree; - typedef TYPENAME UBTree::TreeNode UBTreeNode; + typedef typename UBTree::TreeNode UBTreeNode; // ---------- PUBLIC METHODS ---------- @@ -198,7 +198,7 @@ Standard_Integer NCollection_UBTreeFiller::CheckTree template Standard_Real NCollection_UBTreeFiller::checkNode - (const TYPENAME NCollection_UBTree::TreeNode& theNode, + (const typename NCollection_UBTree::TreeNode& theNode, const Standard_Integer theLength, Standard_Integer& theNumber) { diff --git a/src/NCollection/NCollection_Vector.hxx b/src/NCollection/NCollection_Vector.hxx index 6ef85c74ac..6386b03b52 100755 --- a/src/NCollection/NCollection_Vector.hxx +++ b/src/NCollection/NCollection_Vector.hxx @@ -16,12 +16,11 @@ #ifndef NCollection_Vector_HeaderFile #define NCollection_Vector_HeaderFile -#include -#include +#include //! Class NCollection_Vector (dynamic array of objects) //! -//! This class is similar to NCollection_Array1 though the indices always start +//! This class is similar to NCollection_Vector though the indices always start //! at 0 (in Array1 the first index must be specified) //! //! The Vector is always created with 0 length. It can be enlarged by two means: @@ -41,351 +40,6 @@ //! at index 0 and stops at the index equal to (remembered_length-1). It is OK //! to enlarge the vector during the iteration. template -class NCollection_Vector : public NCollection_BaseVector -{ -public: - //! STL-compliant typedef for value type - typedef TheItemType value_type; - -public: - - //! Nested class Iterator - class Iterator : public NCollection_BaseVector::Iterator - { - public: - - //! Empty constructor - for later Init - Iterator() {} - - //! Constructor with initialisation - Iterator (const NCollection_Vector& theVector, Standard_Boolean theToEnd = Standard_False) - : NCollection_BaseVector::Iterator (theVector, theToEnd) {} - - //! Initialisation - void Init (const NCollection_Vector& theVector) - { - initV (theVector); - } - - //! Check end - Standard_Boolean More() const - { - return moreV(); - } - - //! Increment operator. - void Next() - { - nextV(); - } - - //! Decrement operator. - void Previous() - { - prevV(); - } - - //! Offset operator. - void Offset (ptrdiff_t theOffset) - { - offsetV (static_cast(theOffset)); - } - - // Workaround for a bug (endless compilation) occurred in MS Visual Studio 2019 / Win32 / Release configuration - // with DISABLED Whole Program Optimization (as it is by default in OCCT). The problem is - // at the line std::stable_sort(aPairList.begin(), aPairList.end(), BRepExtrema_CheckPair_Comparator); - // of BRepExtrema_DistShapeShape.cxx source file. - // To enable Whole Program Optimization use command line keys: /GL for compiler and /LTCG for linker. - // Remove this workaround after the bug in VS2019 will be fixed (see OCCT bug #0031628). -#if defined (_MSC_VER) && (_MSC_VER >= 1920) && !defined (_WIN64) && !defined (_DEBUG) - __declspec(noinline) __declspec(deprecated("TODO remove this workaround for VS2019 compiler hanging bug")) -#endif - //! Difference operator. - ptrdiff_t Differ (const Iterator& theOther) const - { - return differV (theOther); - } - - //! Constant value access - const TheItemType& Value() const - { - return ((const TheItemType* )curBlockV()->DataPtr)[myCurIndex]; - } - - //! Variable value access - TheItemType& ChangeValue() const - { - return ((TheItemType* )curBlockV()->DataPtr)[myCurIndex]; - } - - //! Performs comparison of two iterators. - Standard_Boolean IsEqual (const Iterator& theOther) const - { - return myVector == theOther.myVector - && myCurIndex == theOther.myCurIndex - && myEndIndex == theOther.myEndIndex - && myICurBlock == theOther.myICurBlock - && myIEndBlock == theOther.myIEndBlock; - } - }; - - //! Shorthand for a regular iterator type. - typedef NCollection_StlIterator iterator; - - //! Shorthand for a constant iterator type. - typedef NCollection_StlIterator const_iterator; - - //! Returns an iterator pointing to the first element in the vector. - iterator begin() const { return Iterator (*this, false); } - - //! Returns an iterator referring to the past-the-end element in the vector. - iterator end() const { return Iterator (*this, true); } - - //! Returns a const iterator pointing to the first element in the vector. - const_iterator cbegin() const { return Iterator (*this, false); } - - //! Returns a const iterator referring to the past-the-end element in the vector. - const_iterator cend() const { return Iterator (*this, true); } - -public: //! @name public methods - - //! Constructor - explicit NCollection_Vector (const Standard_Integer theIncrement = 256, - const Handle(NCollection_BaseAllocator)& theAlloc = NULL) : - NCollection_BaseVector (theAlloc, initMemBlocks, sizeof(TheItemType), theIncrement) - {} - - //! Copy constructor - NCollection_Vector (const NCollection_Vector& theOther) : - NCollection_BaseVector (theOther.myAllocator, initMemBlocks, theOther) - { - copyData (theOther); - } - - //! Destructor - virtual ~NCollection_Vector() - { - for (Standard_Integer anItemIter = 0; anItemIter < myCapacity; ++anItemIter) - { - initMemBlocks (*this, myData[anItemIter], 0, 0); - } - this->myAllocator->Free (myData); - } - - //! Total number of items - Standard_Integer Length() const - { - return myLength; - } - - //! Total number of items in the vector - Standard_Integer Size() const - { - return myLength; - } - - //! Method for consistency with other collections. - //! @return Lower bound (inclusive) for iteration. - Standard_Integer Lower() const - { - return 0; - } - - //! Method for consistency with other collections. - //! @return Upper bound (inclusive) for iteration. - Standard_Integer Upper() const - { - return myLength - 1; - } - - //! Empty query - Standard_Boolean IsEmpty() const - { - return (myLength == 0); - } - - //! Assignment to the collection of the same type - inline void Assign (const NCollection_Vector& theOther, - const Standard_Boolean theOwnAllocator = Standard_True); - - //! Assignment operator - NCollection_Vector& operator= (const NCollection_Vector& theOther) - { - Assign (theOther, Standard_False); - return *this; - } - - //! Append - TheItemType& Append (const TheItemType& theValue) - { - TheItemType& anAppended = *(TheItemType* )expandV (myLength); - anAppended = theValue; - return anAppended; - } - - //! Appends an empty value and returns the reference to it - TheItemType& Appended () - { - TheItemType& anAppended = *(TheItemType* )expandV (myLength); - return anAppended; - } - - //! Operator() - query the const value - const TheItemType& operator() (const Standard_Integer theIndex) const - { - return Value (theIndex); - } - - //! Operator[] - query the const value - const TheItemType& operator[] (Standard_Integer theIndex) const { return Value (theIndex); } - - const TheItemType& Value (const Standard_Integer theIndex) const - { - return *(const TheItemType* )findV (theIndex); - } - - //! @return first element - const TheItemType& First() const - { - return *(const TheItemType* )findV (Lower()); - } - - //! @return first element - TheItemType& ChangeFirst() - { - return *(TheItemType* )findV (Lower()); - } - - //! @return last element - const TheItemType& Last() const - { - return *(const TheItemType* )findV (Upper()); - } - - //! @return last element - TheItemType& ChangeLast() - { - return *(TheItemType* )findV (Upper()); - } - - //! Operator() - query the value - TheItemType& operator() (const Standard_Integer theIndex) - { - return ChangeValue (theIndex); - } - - //! Operator[] - query the value - TheItemType& operator[] ( Standard_Integer theIndex) { return ChangeValue (theIndex); } - - TheItemType& ChangeValue (const Standard_Integer theIndex) - { - return *(TheItemType* )findV (theIndex); - } - - //! SetValue () - set or append a value - TheItemType& SetValue (const Standard_Integer theIndex, - const TheItemType& theValue) - { - Standard_OutOfRange_Raise_if (theIndex < 0, "NCollection_Vector::SetValue"); - TheItemType* const aVecValue = (TheItemType* )(theIndex < myLength ? findV (theIndex) : expandV (theIndex)); - *aVecValue = theValue; - return *aVecValue; - } - -private: //! @name private methods - - void copyData (const NCollection_Vector& theOther) - { - Standard_Integer iBlock = 0; - /*NCollection_Vector::*/Iterator anIter (theOther); - for (Standard_Integer aLength = 0; aLength < myLength; aLength += myIncrement) - { - MemBlock& aBlock = myData[iBlock]; - initMemBlocks (*this, aBlock, aLength, myIncrement); - Standard_Integer anItemIter = 0; - for (; anItemIter < myIncrement; ++anItemIter) - { - if (!anIter.More()) - { - break; - } - - ((TheItemType* )aBlock.DataPtr)[anItemIter] = anIter.Value(); - anIter.Next(); - } - aBlock.Length = anItemIter; - iBlock++; - } - } - - //! Method to initialize memory block content - static void initMemBlocks (NCollection_BaseVector& theVector, - NCollection_BaseVector::MemBlock& theBlock, - const Standard_Integer theFirst, - const Standard_Integer theSize) - { - NCollection_Vector& aSelf = static_cast (theVector); - Handle(NCollection_BaseAllocator)& anAllocator = aSelf.myAllocator; - - // release current content - if (theBlock.DataPtr != NULL) - { - for (Standard_Integer anItemIter = 0; anItemIter < theBlock.Size; ++anItemIter) - { - ((TheItemType* )theBlock.DataPtr)[anItemIter].~TheItemType(); - } - anAllocator->Free (theBlock.DataPtr); - theBlock.DataPtr = NULL; - } - - // allocate new content if requested - if (theSize > 0) - { - theBlock.DataPtr = anAllocator->Allocate (theSize * sizeof(TheItemType)); - for (Standard_Integer anItemIter = 0; anItemIter < theSize; ++anItemIter) - { - new (&((TheItemType* )theBlock.DataPtr)[anItemIter]) TheItemType; - } - } - theBlock.FirstIndex = theFirst; - theBlock.Size = theSize; - theBlock.Length = 0; - } - - friend class Iterator; - -}; - -//! Assignment to the collection of the same type -template inline -void NCollection_Vector::Assign (const NCollection_Vector& theOther, - const Standard_Boolean theOwnAllocator) -{ - if (this == &theOther) - { - return; - } - - // destroy current data using current allocator - for (Standard_Integer anItemIter = 0; anItemIter < myCapacity; ++anItemIter) - { - initMemBlocks (*this, myData[anItemIter], 0, 0); - } - this->myAllocator->Free (myData); - - // allocate memory blocks with new allocator - if (!theOwnAllocator) - { - this->myAllocator = theOther.myAllocator; - } - myIncrement = theOther.myIncrement; - myLength = theOther.myLength; - myNBlocks = (myLength == 0) ? 0 : (1 + (myLength - 1)/myIncrement); - myCapacity = GetCapacity (myIncrement) + myLength / myIncrement; - myData = allocMemBlocks (myCapacity); - - // copy data - copyData (theOther); -} +using NCollection_Vector = NCollection_DynamicArray; #endif // NCollection_Vector_HeaderFile diff --git a/src/NCollection/NCollection_WinHeapAllocator.hxx b/src/NCollection/NCollection_WinHeapAllocator.hxx index 3a10fd226e..ed76f281c3 100644 --- a/src/NCollection/NCollection_WinHeapAllocator.hxx +++ b/src/NCollection/NCollection_WinHeapAllocator.hxx @@ -44,6 +44,9 @@ public: //! Allocate memory Standard_EXPORT virtual void* Allocate (const Standard_Size theSize) Standard_OVERRIDE; + //! Allocate memory + void* AllocateOptimal(const Standard_Size theSize) Standard_OVERRIDE { return Allocate(theSize); } + //! Release memory Standard_EXPORT virtual void Free (void* theAddress) Standard_OVERRIDE; diff --git a/src/OSD/OSD.cxx b/src/OSD/OSD.cxx index c150fe7e87..a2fbb7d05b 100644 --- a/src/OSD/OSD.cxx +++ b/src/OSD/OSD.cxx @@ -14,6 +14,8 @@ #include +#include + //======================================================================= //function : RealToCString //purpose : diff --git a/src/OSD/OSD_FileSystem.hxx b/src/OSD/OSD_FileSystem.hxx index d88f91f74d..6bf4c38c56 100644 --- a/src/OSD/OSD_FileSystem.hxx +++ b/src/OSD/OSD_FileSystem.hxx @@ -16,6 +16,7 @@ #include #include +#include //! Base interface for a file stream provider. //! It is intended to be implemented for specific file protocol. diff --git a/src/OSD/OSD_MemInfo.hxx b/src/OSD/OSD_MemInfo.hxx index 6545ade300..ea2c4e48cb 100644 --- a/src/OSD/OSD_MemInfo.hxx +++ b/src/OSD/OSD_MemInfo.hxx @@ -16,7 +16,6 @@ #ifndef OSD_MemInfo_HeaderFile #define OSD_MemInfo_HeaderFile -#include #include //! This class provide information about memory utilized by current process. diff --git a/src/OSD/OSD_SharedLibrary.cxx b/src/OSD/OSD_SharedLibrary.cxx index b4adda843d..9748d00049 100644 --- a/src/OSD/OSD_SharedLibrary.cxx +++ b/src/OSD/OSD_SharedLibrary.cxx @@ -20,6 +20,8 @@ #include #include +#include + #ifdef __some_crappy_system__ /* * Values for 'mode' argument in dlopen(). diff --git a/src/OSD/OSD_SharedLibrary.hxx b/src/OSD/OSD_SharedLibrary.hxx index 212d25766b..eb5fd6c9b3 100644 --- a/src/OSD/OSD_SharedLibrary.hxx +++ b/src/OSD/OSD_SharedLibrary.hxx @@ -20,7 +20,6 @@ #include #include -#include #include #include #include diff --git a/src/OSD/OSD_ThreadFunction.hxx b/src/OSD/OSD_ThreadFunction.hxx index 9b30d160b2..e327183e73 100644 --- a/src/OSD/OSD_ThreadFunction.hxx +++ b/src/OSD/OSD_ThreadFunction.hxx @@ -16,7 +16,6 @@ #ifndef OSD_ThreadFunction_HeaderFile #define OSD_ThreadFunction_HeaderFile -#include //! Typedef for prototype of function to be used as main function of a thread. //! diff --git a/src/OpenGl/OpenGl_LayerList.hxx b/src/OpenGl/OpenGl_LayerList.hxx index db90dc0bf7..442364334d 100644 --- a/src/OpenGl/OpenGl_LayerList.hxx +++ b/src/OpenGl/OpenGl_LayerList.hxx @@ -134,6 +134,7 @@ protected: class OpenGl_LayerStack { public: + typedef NCollection_Array1::const_iterator const_iterator; typedef NCollection_Array1::iterator iterator; //! Reallocate internal buffer of the stack. @@ -148,7 +149,7 @@ protected: else { NCollection_Array1 aDummy; - myStackSpace.Move (aDummy); + myStackSpace.Move (std::move(aDummy)); myBackPtr = iterator(); } } @@ -164,11 +165,14 @@ protected: void Push (const OpenGl_Layer* theLayer) { (*myBackPtr++) = theLayer; } //! Returns iterator to the origin of the stack. - iterator Origin() const { return myStackSpace.IsEmpty() ? iterator() : myStackSpace.begin(); } + const_iterator Origin() const { return myStackSpace.IsEmpty() ? const_iterator() : myStackSpace.begin(); } //! Returns iterator to the back of the stack (after last item added). iterator Back() const { return myBackPtr; } + //! Returns iterator to the origin of the stack. + iterator Origin() { return myStackSpace.IsEmpty() ? iterator() : myStackSpace.begin(); } + //! Returns true if nothing has been pushed into the stack. Standard_Boolean IsEmpty() const { return Back() == Origin(); } diff --git a/src/OpenGl/OpenGl_SceneGeometry.cxx b/src/OpenGl/OpenGl_SceneGeometry.cxx index a8ceb444b2..9586e35e8a 100644 --- a/src/OpenGl/OpenGl_SceneGeometry.cxx +++ b/src/OpenGl/OpenGl_SceneGeometry.cxx @@ -156,12 +156,12 @@ void OpenGl_RaytraceGeometry::Clear() BVH_Geometry::BVH_Geometry::Clear(); std::vector > anEmptySources; + NCollection_OccAllocator > anEmptySources; Sources.swap (anEmptySources); std::vector > anEmptyMaterials; + NCollection_OccAllocator > anEmptyMaterials; Materials.swap (anEmptyMaterials); } diff --git a/src/OpenGl/OpenGl_SceneGeometry.hxx b/src/OpenGl/OpenGl_SceneGeometry.hxx index 05705962f5..35298bf60d 100644 --- a/src/OpenGl/OpenGl_SceneGeometry.hxx +++ b/src/OpenGl/OpenGl_SceneGeometry.hxx @@ -19,7 +19,7 @@ #include #include #include -#include +#include #include #include @@ -187,11 +187,11 @@ public: //! Array of properties of light sources. std::vector > Sources; + NCollection_OccAllocator > Sources; //! Array of 'front' material properties. std::vector > Materials; + NCollection_OccAllocator > Materials; //! Global ambient from all light sources. BVH_Vec4f Ambient; @@ -217,7 +217,7 @@ public: void ClearMaterials() { std::vector > anEmptyMaterials; + NCollection_OccAllocator > anEmptyMaterials; Materials.swap (anEmptyMaterials); diff --git a/src/PCDM/PCDM_ReaderFilter.hxx b/src/PCDM/PCDM_ReaderFilter.hxx index 38ee609ff4..fc64068e4c 100644 --- a/src/PCDM/PCDM_ReaderFilter.hxx +++ b/src/PCDM/PCDM_ReaderFilter.hxx @@ -17,6 +17,7 @@ #include #include #include +#include #include class PCDM_ReaderFilter; diff --git a/src/Plate/Plate_Plate.hxx b/src/Plate/Plate_Plate.hxx index 0a0594836c..dcee5a5012 100644 --- a/src/Plate/Plate_Plate.hxx +++ b/src/Plate/Plate_Plate.hxx @@ -22,7 +22,6 @@ #include #include -#include #include #include #include diff --git a/src/Plugin/Plugin_MapOfFunctions.hxx b/src/Plugin/Plugin_MapOfFunctions.hxx index b863b6197b..cd8b9ddaaa 100644 --- a/src/Plugin/Plugin_MapOfFunctions.hxx +++ b/src/Plugin/Plugin_MapOfFunctions.hxx @@ -21,8 +21,8 @@ #include #include -typedef NCollection_DataMap Plugin_MapOfFunctions; -typedef NCollection_DataMap::Iterator Plugin_DataMapIteratorOfMapOfFunctions; +typedef NCollection_DataMap Plugin_MapOfFunctions; +typedef NCollection_DataMap::Iterator Plugin_DataMapIteratorOfMapOfFunctions; #endif diff --git a/src/Poly/Poly_MakeLoops.cxx b/src/Poly/Poly_MakeLoops.cxx index 8bf6c3e282..471c73aefe 100644 --- a/src/Poly/Poly_MakeLoops.cxx +++ b/src/Poly/Poly_MakeLoops.cxx @@ -171,7 +171,7 @@ Standard_Integer Poly_MakeLoops::Perform() { Standard_Integer aIndexS = myStartIndices.Top(); - aTempAlloc->Reset(); + aTempAlloc->Reset(false); NCollection_IndexedMap aContour (100, aTempAlloc); Standard_Integer aStartNumber = findContour (aIndexS, aContour, aTempAlloc, aTempAlloc1); #ifdef OCCT_DEBUG @@ -264,7 +264,7 @@ Standard_Integer Poly_MakeLoops::findContour // collect the list of links from this node able to participate // in this contour - theTempAlloc1->Reset(); + theTempAlloc1->Reset(false); NCollection_List aLstIndS (theTempAlloc1); const ListOfLink& aLinks = myHelper->GetAdjacentLinks (aLastNode); Poly_MakeLoops::ListOfLink::Iterator itLinks (aLinks); diff --git a/src/Poly/Poly_MakeLoops.hxx b/src/Poly/Poly_MakeLoops.hxx index 25f6539cf9..337ae81927 100644 --- a/src/Poly/Poly_MakeLoops.hxx +++ b/src/Poly/Poly_MakeLoops.hxx @@ -21,6 +21,8 @@ #include #include #include +#include +#include /** @@ -70,6 +72,31 @@ public: { return node1 == 0 || node2 == 0; } + + bool operator==(const Link& theOther) const + { + return (theOther.node1 == node1 && theOther.node2 == node2) || + (theOther.node1 == node2 && theOther.node2 == node1); + } + }; + + struct Hasher + { + size_t operator()(const Poly_MakeLoops::Link& theLink) const noexcept + { + // Combine two int values into a single hash value. + int aCombination[2]{ theLink.node1, theLink.node2 }; + if (aCombination[0] > aCombination[1]) + { + std::swap(aCombination[0], aCombination[1]); + } + return opencascade::hashBytes(aCombination, sizeof(aCombination)); + } + + bool operator()(const Poly_MakeLoops::Link& theLink1, const Poly_MakeLoops::Link& theLink2) const noexcept + { + return theLink1 == theLink2; + } }; // Define the Loop as a list of links @@ -242,32 +269,13 @@ private: // FIELDS const Helper* myHelper; - Handle(NCollection_BaseAllocator) myAlloc; - NCollection_IndexedMap myMapLink; + Handle(NCollection_BaseAllocator) myAlloc; + NCollection_IndexedMap myMapLink; NCollection_Sequence myLoops; HeapOfInteger myStartIndices; TColStd_PackedMapOfInteger myHangIndices; }; -//! Computes a hash code for the given link, in the range [1, theUpperBound] -//! @param theLink the link which hash code is to be computed -//! @param theUpperBound the upper bound of the range a computing hash code must be within -//! @return a computed hash code, in the range [1, theUpperBound] -inline Standard_Integer HashCode (const Poly_MakeLoops::Link& theLink, const Standard_Integer theUpperBound) -{ - return HashCode (theLink.node1 + theLink.node2, theUpperBound); -} - -/** - * IsEqual method is needed for maps - */ -inline Standard_Boolean IsEqual(const Poly_MakeLoops::Link& theKey1, - const Poly_MakeLoops::Link& theKey2) -{ - return ((theKey1.node1 == theKey2.node1 && theKey1.node2 == theKey2.node2) || - (theKey1.node1 == theKey2.node2 && theKey1.node2 == theKey2.node1)); -} - /** * Implementation for 3D space */ @@ -357,4 +365,27 @@ private: Standard_Boolean myRightWay; }; + +namespace std +{ + template <> + struct hash + { + size_t operator()(const Poly_MakeLoops::Link& theLink) const noexcept + { + return Poly_MakeLoops::Hasher{}(theLink); + } + }; + + template<> + struct equal_to + { + bool operator()(const Poly_MakeLoops::Link& theLink1, + const Poly_MakeLoops::Link& theLink2) const noexcept + { + return theLink1 == theLink2; + } + }; +} + #endif diff --git a/src/Poly/Poly_MergeNodesTool.cxx b/src/Poly/Poly_MergeNodesTool.cxx index 40778ad17f..ce4423479b 100644 --- a/src/Poly/Poly_MergeNodesTool.cxx +++ b/src/Poly/Poly_MergeNodesTool.cxx @@ -14,6 +14,7 @@ #include #include +#include #include @@ -87,30 +88,38 @@ void Poly_MergeNodesTool::MergedNodesMap::SetMergeTolerance (double theTolerance // function : MergedNodesMap::hashCode // purpose : // ======================================================================= -inline int Poly_MergeNodesTool::MergedNodesMap::vec3iHashCode (const Poly_MergeNodesTool::MergedNodesMap::CellVec3i& theVec, - const int theUpper) +inline size_t Poly_MergeNodesTool::MergedNodesMap::vec3iHashCode (const Poly_MergeNodesTool::MergedNodesMap::CellVec3i& theVec, + const int theUpper) { // copied from NCollection_CellFilter - const uint64_t aShiftBits = (BITS(int64_t)-1) / 3; + constexpr uint64_t aShiftBits = (CHAR_BIT * sizeof(int64_t)-1) / 3; uint64_t aHashCode = 0; aHashCode = (aHashCode << aShiftBits) ^ theVec[0]; aHashCode = (aHashCode << aShiftBits) ^ theVec[1]; aHashCode = (aHashCode << aShiftBits) ^ theVec[2]; - return IntegerHashCode(aHashCode, 0x7fffffffffffffff, theUpper); + return aHashCode % theUpper + 1; } // ======================================================================= // function : MergedNodesMap::hashCode // purpose : // ======================================================================= -inline int Poly_MergeNodesTool::MergedNodesMap::hashCode (const NCollection_Vec3& thePos, - const NCollection_Vec3& theNorm, - const int theUpper) const +inline size_t Poly_MergeNodesTool::MergedNodesMap::hashCode (const NCollection_Vec3& thePos, + const NCollection_Vec3& theNorm, + const int theUpper) const { (void )theNorm; if (myInvTol <= 0.0f) { - return ::HashCode (::HashCodes ((Standard_CString )&thePos, sizeof(NCollection_Vec3)), theUpper); + // compute DJB2 hash of a string + const size_t aLength = sizeof(NCollection_Vec3); + unsigned int aHashCode = 0; + const Standard_Character* c = (Standard_CString )&thePos; + for (size_t i = 0; i < aLength; ++i, ++c) + { + aHashCode = ((aHashCode << 5) + aHashCode) ^ (*c); + } + return aHashCode % theUpper + 1; } const CellVec3i anIndex = vec3ToCell (thePos); @@ -190,7 +199,7 @@ inline bool Poly_MergeNodesTool::MergedNodesMap::Bind (int& theIndex, } DataMapNode** aData = (DataMapNode** )myData1; - const int aHash = hashCode (thePos, theNorm, NbBuckets()); + const size_t aHash = hashCode (thePos, theNorm, NbBuckets()); for (DataMapNode* aNodeIter = aData[aHash]; aNodeIter != NULL; aNodeIter = (DataMapNode* )aNodeIter->Next()) { @@ -214,7 +223,7 @@ inline bool Poly_MergeNodesTool::MergedNodesMap::Bind (int& theIndex, for (int aNeigIter = 0; aNeigIter < 26; ++aNeigIter) { const CellVec3i anIndex = anIndexCnt + THE_NEIGHBRS[aNeigIter]; - const int aHashEx = vec3iHashCode (anIndex, NbBuckets()); + const size_t aHashEx = vec3iHashCode (anIndex, NbBuckets()); for (DataMapNode* aNodeIter = aData[aHashEx]; aNodeIter != NULL; aNodeIter = (DataMapNode* )aNodeIter->Next()) { @@ -249,7 +258,7 @@ inline void Poly_MergeNodesTool::MergedNodesMap::ReSize (const int theSize) { for (DataMapNode* anOldNodeIter = anOldData[anOldBuckIter]; anOldNodeIter != NULL; ) { - const Standard_Integer aNewHash = hashCode (anOldNodeIter->Key(), aNbNewBuck); + const size_t aNewHash = hashCode (anOldNodeIter->Key(), aNbNewBuck); DataMapNode* aNextNode = (DataMapNode* )anOldNodeIter->Next(); anOldNodeIter->Next() = aNewData[aNewHash]; aNewData[aNewHash] = anOldNodeIter; diff --git a/src/Poly/Poly_MergeNodesTool.hxx b/src/Poly/Poly_MergeNodesTool.hxx index 20f1c83f53..4bc807a7e0 100644 --- a/src/Poly/Poly_MergeNodesTool.hxx +++ b/src/Poly/Poly_MergeNodesTool.hxx @@ -16,6 +16,7 @@ #include #include +#include //! Auxiliary tool for merging triangulation nodes for visualization purposes. //! Tool tries to merge all nodes within input triangulation, but split the ones on sharp corners at specified angle. @@ -280,16 +281,16 @@ private: } //! Hash code for integer vec3. - Standard_EXPORT static int vec3iHashCode (const Poly_MergeNodesTool::MergedNodesMap::CellVec3i& theVec, - const int theUpper); + Standard_EXPORT static size_t vec3iHashCode (const Poly_MergeNodesTool::MergedNodesMap::CellVec3i& theVec, + const int theUpper); //! Compute hash code. - Standard_EXPORT int hashCode (const NCollection_Vec3& thePos, - const NCollection_Vec3& theNorm, - const int theUpper) const; + Standard_EXPORT size_t hashCode (const NCollection_Vec3& thePos, + const NCollection_Vec3& theNorm, + const int theUpper) const; //! Compute hash code. - int hashCode (const Vec3AndNormal& theKey, const int theUpper) const + size_t hashCode (const Vec3AndNormal& theKey, const int theUpper) const { return hashCode (theKey.Pos, theKey.Norm, theUpper); } @@ -317,17 +318,12 @@ private: //! Hasher for merging equal elements (with pre-sorted indexes). struct MergedElemHasher { - static int HashCode (const NCollection_Vec4& theVec, const int theUpper) + size_t operator()(const NCollection_Vec4& theVec) const { - unsigned int aHashCode = 0; - aHashCode = aHashCode ^ ::HashCode (theVec[0], theUpper); - aHashCode = aHashCode ^ ::HashCode (theVec[1], theUpper); - aHashCode = aHashCode ^ ::HashCode (theVec[2], theUpper); - aHashCode = aHashCode ^ ::HashCode (theVec[3], theUpper); - return ((aHashCode & 0x7fffffff) % theUpper) + 1; + return opencascade::hashBytes(&theVec[0], 4 * sizeof(int)); } - static bool IsEqual (const NCollection_Vec4& theKey1, const NCollection_Vec4& theKey2) + bool operator()(const NCollection_Vec4& theKey1, const NCollection_Vec4& theKey2) const { return theKey1.IsEqual (theKey2); } diff --git a/src/QABugs/QABugs_11.cxx b/src/QABugs/QABugs_11.cxx index 56fd7ad067..7c95a8b9e0 100644 --- a/src/QABugs/QABugs_11.cxx +++ b/src/QABugs/QABugs_11.cxx @@ -1188,6 +1188,7 @@ static Standard_Integer OCC369(Draw_Interpretor& di, Standard_Integer argc, cons } #include +#include static Standard_Integer OCC524 (Draw_Interpretor& di, Standard_Integer argc, const char ** argv) { if(argc != 9){ diff --git a/src/QABugs/QABugs_14.cxx b/src/QABugs/QABugs_14.cxx index 2db1f5baf4..59efb0ec7d 100644 --- a/src/QABugs/QABugs_14.cxx +++ b/src/QABugs/QABugs_14.cxx @@ -845,7 +845,6 @@ static Standard_Integer OCC1919_set (Draw_Interpretor& di, Standard_Integer argc } #include #include -#include static Standard_Integer OCC1919_real (Draw_Interpretor& di, Standard_Integer argc, const char ** argv) { if (argc == 4) { diff --git a/src/QABugs/QABugs_20.cxx b/src/QABugs/QABugs_20.cxx index b5e84f0ed2..cd3769d074 100644 --- a/src/QABugs/QABugs_20.cxx +++ b/src/QABugs/QABugs_20.cxx @@ -2624,7 +2624,7 @@ static Standard_Integer OCC29289(Draw_Interpretor&, Standard_Integer , const cha Standard_Boolean IsSameGuid (const Standard_GUID& aGuidNull, const Standard_GUID& aGuid2) { Standard_Boolean isSame (Standard_False); - if(Standard_GUID::IsEqual(aGuidNull, aGuid2)) { + if(aGuidNull == aGuid2) { aGuid2.ShallowDump(std::cout); isSame = Standard_True; } else { diff --git a/src/QADNaming/QADNaming.hxx b/src/QADNaming/QADNaming.hxx index e814905c8f..81a20db898 100644 --- a/src/QADNaming/QADNaming.hxx +++ b/src/QADNaming/QADNaming.hxx @@ -24,7 +24,6 @@ #include #include #include -#include #include class TopoDS_Shape; class TDF_Data; diff --git a/src/QANCollection/QANCollection_Alloc.cxx b/src/QANCollection/QANCollection_Alloc.cxx index 13ab7f28b2..64bb06da0d 100644 --- a/src/QANCollection/QANCollection_Alloc.cxx +++ b/src/QANCollection/QANCollection_Alloc.cxx @@ -16,7 +16,7 @@ #include #include -#include +#include #include #include @@ -36,7 +36,7 @@ static Standard_Integer QANColStdAllocator1(Draw_Interpretor& di, Standard_Integ //type definitions typedef Handle(Standard_Transient) elem_type; - typedef NCollection_StdAllocator allocator_type; + typedef NCollection_OccAllocator allocator_type; Standard_STATIC_ASSERT (sizeof (allocator_type::value_type) == sizeof (elem_type)); Standard_STATIC_ASSERT (sizeof (allocator_type::pointer) == sizeof (void*)); Standard_STATIC_ASSERT (sizeof (allocator_type::const_pointer) == sizeof (void*)); @@ -71,8 +71,8 @@ static Standard_Integer QANColStdAllocator2(Draw_Interpretor& di, Standard_Integ { //typed allocator - NCollection_StdAllocator aSAlloc (anIncAlloc); - std::list > aL (aSAlloc); + NCollection_OccAllocator aSAlloc (anIncAlloc); + std::list > aL (aSAlloc); aL.push_back (2); if ( aL.size() == size_t (1) ) { di << "Test1 : OK\n"; @@ -81,8 +81,8 @@ static Standard_Integer QANColStdAllocator2(Draw_Interpretor& di, Standard_Integ } //type cast - NCollection_StdAllocator aCAlloc; - std::vector > aV (aCAlloc); + NCollection_OccAllocator aCAlloc; + std::vector > aV (aCAlloc); aV.push_back (1); if ( aV.size() == size_t (1) ) { di << "Test2 : OK\n"; @@ -91,8 +91,8 @@ static Standard_Integer QANColStdAllocator2(Draw_Interpretor& di, Standard_Integ } //using void-specialization allocator - NCollection_StdAllocator aVAlloc; - std::vector > aV2 (aVAlloc); + NCollection_OccAllocator aVAlloc; + std::vector > aV2 (aVAlloc); aV2.resize (10); aV2.push_back (-1); @@ -108,7 +108,7 @@ static Standard_Integer QANColStdAllocator2(Draw_Interpretor& di, Standard_Integ } else { di << "Test4 : Error\n"; } - NCollection_StdAllocator anIAlloc (anIncAlloc); + NCollection_OccAllocator anIAlloc (anIncAlloc); if ( aSAlloc == anIAlloc ) { di << "Test5 : OK\n"; } else { diff --git a/src/QANCollection/QANCollection_DataMapOfRealPnt.hxx b/src/QANCollection/QANCollection_DataMapOfRealPnt.hxx index d521cac8fd..b201176b41 100644 --- a/src/QANCollection/QANCollection_DataMapOfRealPnt.hxx +++ b/src/QANCollection/QANCollection_DataMapOfRealPnt.hxx @@ -17,11 +17,10 @@ #define QANCollection_DataMapOfRealPnt_HeaderFile #include -#include #include -typedef NCollection_DataMap QANCollection_DataMapOfRealPnt; -typedef NCollection_DataMap::Iterator QANCollection_DataMapIteratorOfDataMapOfRealPnt; +typedef NCollection_DataMap QANCollection_DataMapOfRealPnt; +typedef NCollection_DataMap::Iterator QANCollection_DataMapIteratorOfDataMapOfRealPnt; #endif diff --git a/src/QANCollection/QANCollection_DoubleMapOfRealInteger.hxx b/src/QANCollection/QANCollection_DoubleMapOfRealInteger.hxx index 23d8ab5f78..07736ee0d9 100644 --- a/src/QANCollection/QANCollection_DoubleMapOfRealInteger.hxx +++ b/src/QANCollection/QANCollection_DoubleMapOfRealInteger.hxx @@ -17,12 +17,10 @@ #define QANCollection_DoubleMapOfRealInteger_HeaderFile #include -#include -#include #include -typedef NCollection_DoubleMap QANCollection_DoubleMapOfRealInteger; -typedef NCollection_DoubleMap::Iterator QANCollection_DoubleMapIteratorOfDoubleMapOfRealInteger; +typedef NCollection_DoubleMap QANCollection_DoubleMapOfRealInteger; +typedef NCollection_DoubleMap::Iterator QANCollection_DoubleMapIteratorOfDoubleMapOfRealInteger; #endif diff --git a/src/QANCollection/QANCollection_Handle.cxx b/src/QANCollection/QANCollection_Handle.cxx index b77bea8f78..89c593e63d 100644 --- a/src/QANCollection/QANCollection_Handle.cxx +++ b/src/QANCollection/QANCollection_Handle.cxx @@ -16,7 +16,7 @@ #include #include -#include +#include #include #include #include diff --git a/src/QANCollection/QANCollection_IndexedDataMapOfRealPnt.hxx b/src/QANCollection/QANCollection_IndexedDataMapOfRealPnt.hxx index ce0500d9e1..33c03c6828 100644 --- a/src/QANCollection/QANCollection_IndexedDataMapOfRealPnt.hxx +++ b/src/QANCollection/QANCollection_IndexedDataMapOfRealPnt.hxx @@ -17,10 +17,9 @@ #define QANCollection_IndexedDataMapOfRealPnt_HeaderFile #include -#include #include -typedef NCollection_IndexedDataMap QANCollection_IndexedDataMapOfRealPnt; +typedef NCollection_IndexedDataMap QANCollection_IndexedDataMapOfRealPnt; #endif diff --git a/src/QANCollection/QANCollection_Perf.cxx b/src/QANCollection/QANCollection_Perf.cxx index 95b08578ad..4803ec82b1 100644 --- a/src/QANCollection/QANCollection_Perf.cxx +++ b/src/QANCollection/QANCollection_Perf.cxx @@ -46,38 +46,50 @@ // So must be defined ::HashCode and ::IsEqual too #include +#define DEFINE_ARRAY1(_ClassName_, _BaseCollection_, TheItemType) \ +typedef NCollection_Array1 _ClassName_; + ////////////////////////////////DEFINE_ARRAY1(QANCollection_Array1,QANCollection_BaseCol,ItemType) ////////////////////////////////DEFINE_HARRAY1(QANCollection_HArray1,QANCollection_Array1) DEFINE_ARRAY1(QANCollection_Array1Perf,QANCollection_BaseColPerf,ItemType) DEFINE_HARRAY1(QANCollection_HArray1Perf,QANCollection_Array1Perf) #include +#define DEFINE_ARRAY2(_ClassName_, _BaseCollection_, TheItemType) \ +typedef NCollection_Array2 _ClassName_; ////////////////////////////////DEFINE_ARRAY2(QANCollection_Array2,QANCollection_BaseCol,ItemType) ////////////////////////////////DEFINE_HARRAY2(QANCollection_HArray2,QANCollection_Array2) DEFINE_ARRAY2(QANCollection_Array2Perf,QANCollection_BaseColPerf,ItemType) DEFINE_HARRAY2(QANCollection_HArray2Perf,QANCollection_Array2Perf) - -#include -#include -#include -#include -#include ////////////////////////////////DEFINE_MAP(QANCollection_Map,QANCollection_Key1BaseCol,Key1Type) ////////////////////////////////DEFINE_DATAMAP(QANCollection_DataMap,QANCollection_BaseCol,Key1Type,ItemType) ////////////////////////////////DEFINE_DOUBLEMAP(QANCollection_DoubleMap,QANCollection_Key2BaseCol,Key1Type,Key2Type) ////////////////////////////////DEFINE_INDEXEDMAP(QANCollection_IndexedMap,QANCollection_Key1BaseCol,Key1Type) ////////////////////////////////DEFINE_INDEXEDDATAMAP(QANCollection_IDMap,QANCollection_BaseCol,Key1Type,ItemType) +#define DEFINE_DATAMAP(_ClassName_, _BaseCollection_, TheKeyType, TheItemType) \ +typedef NCollection_DataMap _ClassName_; +#define DEFINE_DOUBLEMAP(_ClassName_, _BaseCollection_, TheKey1Type, TheKey2Type) \ +typedef NCollection_DoubleMap _ClassName_; +#define DEFINE_INDEXEDDATAMAP(_ClassName_, _BaseCollection_, TheKeyType, TheItemType) \ +typedef NCollection_IndexedDataMap _ClassName_; +#define DEFINE_INDEXEDMAP(_ClassName_, _BaseCollection_, TheKeyType) \ +typedef NCollection_IndexedMap _ClassName_; +#define DEFINE_MAP(_ClassName_, _BaseCollection_, TheKeyType) \ +typedef NCollection_Map _ClassName_; DEFINE_MAP(QANCollection_MapPerf,QANCollection_Key1BaseColPerf,Key1Type) DEFINE_DATAMAP(QANCollection_DataMapPerf,QANCollection_BaseColPerf,Key1Type,ItemType) DEFINE_DOUBLEMAP(QANCollection_DoubleMapPerf,QANCollection_Key2BaseColPerf,Key1Type,Key2Type) DEFINE_INDEXEDMAP(QANCollection_IndexedMapPerf,QANCollection_Key1BaseColPerf,Key1Type) DEFINE_INDEXEDDATAMAP(QANCollection_IDMapPerf,QANCollection_BaseColPerf,Key1Type,ItemType) -#include ////////////////////////////////DEFINE_LIST(QANCollection_List,QANCollection_BaseCol,ItemType) +#define DEFINE_LIST(_ClassName_, _BaseCollection_, TheItemType) \ +typedef NCollection_List _ClassName_; DEFINE_LIST(QANCollection_ListPerf,QANCollection_BaseColPerf,ItemType) #include +#define DEFINE_SEQUENCE(_ClassName_, _BaseCollection_, TheItemType) \ +typedef NCollection_Sequence _ClassName_; ////////////////////////////////DEFINE_SEQUENCE(QANCollection_Sequence,QANCollection_BaseCol,ItemType) ////////////////////////////////DEFINE_HSEQUENCE(QANCollection_HSequence,QANCollection_Sequence) DEFINE_SEQUENCE(QANCollection_SequencePerf,QANCollection_BaseColPerf,ItemType) diff --git a/src/QANCollection/QANCollection_Test.cxx b/src/QANCollection/QANCollection_Test.cxx index b484cafb13..40cc1f261a 100644 --- a/src/QANCollection/QANCollection_Test.cxx +++ b/src/QANCollection/QANCollection_Test.cxx @@ -27,65 +27,68 @@ #include #include +#include #define ItemType gp_Pnt #define Key1Type Standard_Real #define Key2Type Standard_Integer #include +#define DEFINE_ARRAY1(_ClassName_, _BaseCollection_, TheItemType) \ +typedef NCollection_Array1 _ClassName_; ////////////////////////////////DEFINE_ARRAY1(QANCollection_Array1,QANCollection_BaseCol,ItemType) ////////////////////////////////DEFINE_HARRAY1(QANCollection_HArray1,QANCollection_Array1) DEFINE_ARRAY1(QANCollection_Array1Func,QANCollection_BaseColFunc,ItemType) DEFINE_HARRAY1(QANCollection_HArray1Func,QANCollection_Array1Func) #include +#define DEFINE_ARRAY2(_ClassName_, _BaseCollection_, TheItemType) \ +typedef NCollection_Array2 _ClassName_; ////////////////////////////////DEFINE_ARRAY2(QANCollection_Array2,QANCollection_BaseCol,ItemType) ////////////////////////////////DEFINE_HARRAY2(QANCollection_HArray2,QANCollection_Array2) DEFINE_ARRAY2(QANCollection_Array2Func,QANCollection_BaseColFunc,ItemType) DEFINE_HARRAY2(QANCollection_HArray2Func,QANCollection_Array2Func) -#include -#include -#include -#include -#include + ////////////////////////////////DEFINE_MAP(QANCollection_Map,QANCollection_Key1BaseCol,Key1Type) ////////////////////////////////DEFINE_DATAMAP(QANCollection_DataMap,QANCollection_BaseCol,Key1Type,ItemType) ////////////////////////////////DEFINE_DOUBLEMAP(QANCollection_DoubleMap,QANCollection_Key2BaseCol,Key1Type,Key2Type) ////////////////////////////////DEFINE_INDEXEDMAP(QANCollection_IndexedMap,QANCollection_Key1BaseCol,Key1Type) ////////////////////////////////DEFINE_INDEXEDDATAMAP(QANCollection_IDMap,QANCollection_BaseCol,Key1Type,ItemType) +#include +#include +#include +#define DEFINE_DATAMAP(_ClassName_, _BaseCollection_, TheKeyType, TheItemType) \ +typedef NCollection_DataMap _ClassName_; +#define DEFINE_DOUBLEMAP(_ClassName_, _BaseCollection_, TheKey1Type, TheKey2Type) \ +typedef NCollection_DoubleMap _ClassName_; +#define DEFINE_INDEXEDDATAMAP(_ClassName_, _BaseCollection_, TheKeyType, TheItemType) \ +typedef NCollection_IndexedDataMap _ClassName_; +#define DEFINE_INDEXEDMAP(_ClassName_, _BaseCollection_, TheKeyType) \ +typedef NCollection_IndexedMap _ClassName_; +#define DEFINE_MAP(_ClassName_, _BaseCollection_, TheKeyType) \ +typedef NCollection_Map _ClassName_; DEFINE_MAP(QANCollection_MapFunc,QANCollection_Key1BaseColFunc,Key1Type) DEFINE_DATAMAP(QANCollection_DataMapFunc,QANCollection_BaseColFunc,Key1Type,ItemType) DEFINE_DOUBLEMAP(QANCollection_DoubleMapFunc,QANCollection_Key2BaseColFunc,Key1Type,Key2Type) DEFINE_INDEXEDMAP(QANCollection_IndexedMapFunc,QANCollection_Key1BaseColFunc,Key1Type) DEFINE_INDEXEDDATAMAP(QANCollection_IDMapFunc,QANCollection_BaseColFunc,Key1Type,ItemType) -#include ////////////////////////////////DEFINE_LIST(QANCollection_List,QANCollection_BaseCol,ItemType) +#define DEFINE_LIST(_ClassName_, _BaseCollection_, TheItemType) \ +typedef NCollection_List _ClassName_; +DEFINE_LIST(QANCollection_ListPerf,QANCollection_BaseColPerf,ItemType) DEFINE_LIST(QANCollection_ListFunc,QANCollection_BaseColFunc,ItemType) #include +#include +#define DEFINE_SEQUENCE(_ClassName_, _BaseCollection_, TheItemType) \ +typedef NCollection_Sequence _ClassName_; ////////////////////////////////DEFINE_SEQUENCE(QANCollection_Sequence,QANCollection_BaseCol,ItemType) ////////////////////////////////DEFINE_HSEQUENCE(QANCollection_HSequence,QANCollection_Sequence) DEFINE_SEQUENCE(QANCollection_SequenceFunc,QANCollection_BaseColFunc,ItemType) DEFINE_HSEQUENCE(QANCollection_HSequenceFunc,QANCollection_SequenceFunc) -// HashCode and IsEquel must be defined for key types of maps - -//! Computes a hash code for the point, in the range [1, theUpperBound] -//! @param thePoint the point which hash code is to be computed -//! @param theUpperBound the upper bound of the range a computing hash code must be within -//! @return a computed hash code, in the range [1, theUpperBound] -Standard_Integer HashCode (const gp_Pnt& thePoint, int theUpperBound) -{ - return HashCode (thePoint.X(), theUpperBound); -} - -Standard_Boolean IsEqual(const gp_Pnt& theP1, const gp_Pnt& theP2) -{ - return theP1.IsEqual(theP2,gp::Resolution()); -} - ////////////////////////////////void printCollection (QANCollection_Key1BaseCol& aColl, template void printCollection (Coll& aColl, const char * str) diff --git a/src/Quantity/FILES b/src/Quantity/FILES index a566c8fe02..ff72f3eafc 100755 --- a/src/Quantity/FILES +++ b/src/Quantity/FILES @@ -2,10 +2,8 @@ Quantity_Array1OfColor.hxx Quantity_Color.cxx Quantity_Color.hxx Quantity_ColorTable.pxx -Quantity_ColorHasher.hxx Quantity_ColorRGBA.cxx Quantity_ColorRGBA.hxx -Quantity_ColorRGBAHasher.hxx Quantity_Date.cxx Quantity_Date.hxx Quantity_DateDefinitionError.hxx diff --git a/src/Quantity/Quantity_Color.hxx b/src/Quantity/Quantity_Color.hxx index 15451507b3..7cc6b58653 100644 --- a/src/Quantity/Quantity_Color.hxx +++ b/src/Quantity/Quantity_Color.hxx @@ -19,6 +19,7 @@ #include #include #include +#include #include #include @@ -379,4 +380,19 @@ private: }; +namespace std +{ + template <> + struct hash + { + std::size_t operator()(const Quantity_Color& theColor) const noexcept + { + unsigned char aByteArr[3] = { static_cast(255 * theColor.Red()), + static_cast(255 * theColor.Green()), + static_cast(255 * theColor.Blue()) }; + return opencascade::hashBytes(aByteArr, sizeof(aByteArr)); + } + }; +} + #endif // _Quantity_Color_HeaderFile diff --git a/src/Quantity/Quantity_ColorHasher.hxx b/src/Quantity/Quantity_ColorHasher.hxx deleted file mode 100644 index 87010e6b80..0000000000 --- a/src/Quantity/Quantity_ColorHasher.hxx +++ /dev/null @@ -1,62 +0,0 @@ -// Created on: 2016-12-13 -// Copyright (c) 2016 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 _Quantity_ColorHasher_HeaderFile -#define _Quantity_ColorHasher_HeaderFile - -#include - -//! Hasher of Quantity_Color. -struct Quantity_ColorHasher -{ - //! Returns hash code for the given RGB color, in the range [1, theUpperBound] - //! @param theColor the RGB color object which hash code is to be computed - //! @param theUpperBound the upper bound of the range a computing range must be within - //! @return a computed hash code, in the range [1, theUpperBound] - static Standard_Integer HashCode (const Quantity_Color& theColor, - const Standard_Integer theUpperBound) - { - Standard_Integer aRed = Standard_Integer (255 * theColor.Red()); - Standard_Integer aGreen = Standard_Integer (255 * theColor.Green()); - Standard_Integer aBlue = Standard_Integer (255 * theColor.Blue()); - - unsigned int aHash = 0; - - updateHash (aHash, aRed); - updateHash (aHash, aGreen); - updateHash (aHash, aBlue); - aHash += (aHash << 3); - aHash ^= (aHash >> 11); - aHash += (aHash << 15); - - return IntegerHashCode(aHash, 0x7fff, theUpperBound); - } - - //! Returns true if two colors are equal. - static Standard_Boolean IsEqual (const Quantity_Color& theColor1, - const Quantity_Color& theColor2) - { - return theColor1 == theColor2; - } - -protected: - static void updateHash (unsigned int& theHash, const Standard_Integer theValue) - { - theHash += theValue; - theHash += (theHash << 10); - theHash ^= (theHash >> 6); - } -}; - -#endif diff --git a/src/Quantity/Quantity_ColorRGBA.hxx b/src/Quantity/Quantity_ColorRGBA.hxx index ccdc6e6b37..85ad4a4951 100644 --- a/src/Quantity/Quantity_ColorRGBA.hxx +++ b/src/Quantity/Quantity_ColorRGBA.hxx @@ -173,4 +173,20 @@ private: }; +namespace std +{ + template <> + struct hash + { + std::size_t operator()(const Quantity_ColorRGBA& theColor) const noexcept + { + const Quantity_Color& anRGB = theColor.GetRGB(); + unsigned char aByteArr[4] = { static_cast(100 * theColor.Alpha()), + static_cast(255 * anRGB.Red()), + static_cast(255 * anRGB.Green()), + static_cast(255 * anRGB.Blue()) }; + return opencascade::hashBytes(aByteArr, sizeof(aByteArr)); + } + }; +} #endif // _Quantity_ColorRGBA_HeaderFile diff --git a/src/Quantity/Quantity_ColorRGBAHasher.hxx b/src/Quantity/Quantity_ColorRGBAHasher.hxx deleted file mode 100644 index c7c776c018..0000000000 --- a/src/Quantity/Quantity_ColorRGBAHasher.hxx +++ /dev/null @@ -1,48 +0,0 @@ -// Copyright (c) 2017 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 _Quantity_ColorRGBAHasher_HeaderFile -#define _Quantity_ColorRGBAHasher_HeaderFile - -#include -#include - -//! Hasher of Quantity_ColorRGBA. -struct Quantity_ColorRGBAHasher -{ - - //! Returns hash code for the given RGBA color, in the range [1, theUpperBound] - //! @param theColor the RGBA color object which hash code is to be computed - //! @param theUpperBound the upper bound of the range a computing hash code must be within - //! @return a computed hash code, in the range [1, theUpperBound] - static Standard_Integer HashCode (const Quantity_ColorRGBA& theColor, - const Standard_Integer theUpperBound) - { - const NCollection_Vec4& aColor = theColor; - uint32_t aColor32 = (uint32_t(aColor.a() * 255.0f) << 24) - + (uint32_t(aColor.b() * 255.0f) << 16) - + (uint32_t(aColor.g() * 255.0f) << 8) - + uint32_t(aColor.r() * 255.0f); - return ::HashCode(aColor32, theUpperBound); - } - - //! Returns true if two colors are equal. - static Standard_Boolean IsEqual (const Quantity_ColorRGBA& theColor1, - const Quantity_ColorRGBA& theColor2) - { - return theColor1 == theColor2; - } - -}; - -#endif // _Quantity_ColorRGBAHasher_HeaderFile diff --git a/src/RWGltf/RWGltf_CafWriter.cxx b/src/RWGltf/RWGltf_CafWriter.cxx index 24b0e35b3f..aa86708d39 100644 --- a/src/RWGltf/RWGltf_CafWriter.cxx +++ b/src/RWGltf/RWGltf_CafWriter.cxx @@ -626,7 +626,7 @@ bool RWGltf_CafWriter::writeBinData (const Handle(TDocStd_Document)& theDocument }; // dispatch faces - NCollection_DataMap aMergedFaces; + NCollection_DataMap aMergedFaces; for (XCAFPrs_DocumentExplorer aDocExplorer (theDocument, theRootLabels, XCAFPrs_DocumentExplorerFlags_OnlyLeafNodes); aDocExplorer.More() && aPSentryBin.More(); aDocExplorer.Next()) { diff --git a/src/RWGltf/RWGltf_CafWriter.hxx b/src/RWGltf/RWGltf_CafWriter.hxx index be5d05f637..b2cfa9ba91 100644 --- a/src/RWGltf/RWGltf_CafWriter.hxx +++ b/src/RWGltf/RWGltf_CafWriter.hxx @@ -357,25 +357,35 @@ protected: TopoDS_Shape Shape; XCAFPrs_Style Style; - RWGltf_StyledShape() {} - explicit RWGltf_StyledShape (const TopoDS_Shape& theShape) : Shape (theShape) {} - explicit RWGltf_StyledShape (const TopoDS_Shape& theShape, - const XCAFPrs_Style& theStyle) : Shape (theShape), Style (theStyle) {} - public: - //! Computes a hash code. - static Standard_Integer HashCode (const RWGltf_StyledShape& theShape, Standard_Integer theUpperBound) + RWGltf_StyledShape() + {} + explicit RWGltf_StyledShape(const TopoDS_Shape& theShape) : Shape(theShape) + {} + explicit RWGltf_StyledShape(const TopoDS_Shape& theShape, + const XCAFPrs_Style& theStyle) : Shape(theShape), Style(theStyle) + {} + bool operator==(const RWGltf_StyledShape& theStyledShape) const { - return theShape.Shape.HashCode (theUpperBound); + return Shape.IsSame(theStyledShape.Shape) + && Style.IsEqual(theStyledShape.Style); } - //! Equality comparison. - static Standard_Boolean IsEqual (const RWGltf_StyledShape& theS1, const RWGltf_StyledShape& theS2) + }; + + struct Hasher + { + size_t operator()(const RWGltf_StyledShape& theShape) const noexcept + { + return std::hash{}(theShape.Shape); + } + + bool operator()(const RWGltf_StyledShape& theShape1, + const RWGltf_StyledShape& theShape2) const noexcept { - return theS1.Shape.IsSame (theS2.Shape) - && theS1.Style.IsEqual(theS2.Style); + return theShape1 == theShape2; } }; - typedef NCollection_IndexedDataMap ShapeToGltfFaceMap; + typedef NCollection_IndexedDataMap ShapeToGltfFaceMap; protected: diff --git a/src/RWGltf/RWGltf_GltfJsonParser.hxx b/src/RWGltf/RWGltf_GltfJsonParser.hxx index 5cd3fd2e99..0d26a02717 100644 --- a/src/RWGltf/RWGltf_GltfJsonParser.hxx +++ b/src/RWGltf/RWGltf_GltfJsonParser.hxx @@ -399,7 +399,7 @@ protected: private: - NCollection_DataMap myChildren; + NCollection_DataMap myChildren; const RWGltf_JsonValue* myRoot; }; diff --git a/src/RWGltf/RWGltf_GltfMaterialMap.cxx b/src/RWGltf/RWGltf_GltfMaterialMap.cxx index d3c8cee6c7..e6361982e8 100644 --- a/src/RWGltf/RWGltf_GltfMaterialMap.cxx +++ b/src/RWGltf/RWGltf_GltfMaterialMap.cxx @@ -207,7 +207,7 @@ void RWGltf_GltfMaterialMap::FlushGlbBufferViews (RWGltf_GltfOStreamWriter* theW Standard_Integer& theBuffViewId) { #ifdef HAVE_RAPIDJSON - for (NCollection_IndexedDataMap::Iterator aBufViewIter (myImageMap); + for (NCollection_IndexedDataMap::Iterator aBufViewIter (myImageMap); aBufViewIter.More(); aBufViewIter.Next()) { RWGltf_GltfBufferView& aBuffView = aBufViewIter.ChangeValue(); @@ -241,7 +241,7 @@ void RWGltf_GltfMaterialMap::FlushGlbImages (RWGltf_GltfOStreamWriter* theWriter { #ifdef HAVE_RAPIDJSON bool isStarted = false; - for (NCollection_IndexedDataMap::Iterator aBufViewIter (myImageMap); + for (NCollection_IndexedDataMap::Iterator aBufViewIter (myImageMap); aBufViewIter.More(); aBufViewIter.Next()) { const Handle(Image_Texture)& aTexture = aBufViewIter.Key(); diff --git a/src/RWGltf/RWGltf_GltfMaterialMap.hxx b/src/RWGltf/RWGltf_GltfMaterialMap.hxx index 357d5586b7..fe86036d09 100644 --- a/src/RWGltf/RWGltf_GltfMaterialMap.hxx +++ b/src/RWGltf/RWGltf_GltfMaterialMap.hxx @@ -105,8 +105,8 @@ protected: protected: RWGltf_GltfOStreamWriter* myWriter; - NCollection_IndexedDataMap myImageMap; - NCollection_Map myTextureMap; + NCollection_IndexedDataMap myImageMap; + NCollection_Map myTextureMap; Standard_Integer myDefSamplerId; diff --git a/src/RWGltf/RWGltf_GltfSceneNodeMap.hxx b/src/RWGltf/RWGltf_GltfSceneNodeMap.hxx index c6743fe2b2..abb548be5b 100644 --- a/src/RWGltf/RWGltf_GltfSceneNodeMap.hxx +++ b/src/RWGltf/RWGltf_GltfSceneNodeMap.hxx @@ -18,7 +18,7 @@ #include //! Indexed map of scene nodes with custom search algorithm. -class RWGltf_GltfSceneNodeMap : public NCollection_IndexedMap +class RWGltf_GltfSceneNodeMap : public NCollection_IndexedMap { public: @@ -32,15 +32,9 @@ public: { return 0; } - - for (IndexedMapNode* aNode1Iter = (IndexedMapNode* )myData1[::HashCode (theNodeId, NbBuckets())]; aNode1Iter != NULL; aNode1Iter = (IndexedMapNode* )aNode1Iter->Next()) - { - if (::IsEqual (aNode1Iter->Key1().Id, theNodeId)) - { - return aNode1Iter->Index(); - } - } - return 0; + XCAFPrs_DocumentNode aDocNode; + aDocNode.Id = theNodeId; + return NCollection_IndexedMap::FindIndex(aDocNode); } }; diff --git a/src/RWMesh/RWMesh_MaterialMap.hxx b/src/RWMesh/RWMesh_MaterialMap.hxx index 13aea517b3..397cab564f 100644 --- a/src/RWMesh/RWMesh_MaterialMap.hxx +++ b/src/RWMesh/RWMesh_MaterialMap.hxx @@ -87,10 +87,9 @@ protected: TCollection_AsciiString myFileName; //!< output glTF file path TCollection_AsciiString myShortFileNameBase; //!< output glTF file name without extension TCollection_AsciiString myKeyPrefix; //!< prefix for generated keys - NCollection_DoubleMap + NCollection_DoubleMap myStyles; //!< map of processed styles - NCollection_Map + NCollection_Map myImageFailMap; //!< map of images failed to be copied XCAFPrs_Style myDefaultStyle; //!< default material definition to be used for nodes with only color defined Standard_Integer myNbMaterials; //!< number of registered materials diff --git a/src/RWObj/RWObj_ObjMaterialMap.hxx b/src/RWObj/RWObj_ObjMaterialMap.hxx index fd9df2e218..359a3403d0 100644 --- a/src/RWObj/RWObj_ObjMaterialMap.hxx +++ b/src/RWObj/RWObj_ObjMaterialMap.hxx @@ -14,6 +14,7 @@ #ifndef _RWObj_ObjMaterialMap_HeaderFiler #define _RWObj_ObjMaterialMap_HeaderFiler +#include #include //! Material MTL file writer for OBJ export. @@ -39,7 +40,7 @@ public: private: FILE* myFile; - NCollection_DataMap myImageMap; + NCollection_DataMap myImageMap; }; diff --git a/src/RWObj/RWObj_Reader.hxx b/src/RWObj/RWObj_Reader.hxx index 920cb73cd3..4b91d68bd2 100644 --- a/src/RWObj/RWObj_Reader.hxx +++ b/src/RWObj/RWObj_Reader.hxx @@ -29,6 +29,7 @@ #include #include #include +#include #include @@ -241,14 +242,13 @@ protected: //! Hasher for 3 ordered integers. struct ObjVec3iHasher { - static Standard_Integer HashCode (const Graphic3d_Vec3i& theKey, - const Standard_Integer theUpper) + std::size_t operator()(const Graphic3d_Vec3i& theKey) const noexcept { - return ::HashCode (::HashCodes ((Standard_CString )&theKey, sizeof(Graphic3d_Vec3i)), theUpper); + return opencascade::hashBytes(&theKey[0], 3 * sizeof(int)); } - static Standard_Boolean IsEqual (const Graphic3d_Vec3i& theKey1, - const Graphic3d_Vec3i& theKey2) + bool operator()(const Graphic3d_Vec3i& theKey1, + const Graphic3d_Vec3i& theKey2) const noexcept { return theKey1[0] == theKey2[0] && theKey1[1] == theKey2[1] diff --git a/src/Resource/Resource_DataMapOfAsciiStringAsciiString.hxx b/src/Resource/Resource_DataMapOfAsciiStringAsciiString.hxx index 9cd00eaebf..264c45b40a 100644 --- a/src/Resource/Resource_DataMapOfAsciiStringAsciiString.hxx +++ b/src/Resource/Resource_DataMapOfAsciiStringAsciiString.hxx @@ -20,8 +20,8 @@ #include #include -typedef NCollection_DataMap Resource_DataMapOfAsciiStringAsciiString; -typedef NCollection_DataMap::Iterator Resource_DataMapIteratorOfDataMapOfAsciiStringAsciiString; +typedef NCollection_DataMap Resource_DataMapOfAsciiStringAsciiString; +typedef NCollection_DataMap::Iterator Resource_DataMapIteratorOfDataMapOfAsciiStringAsciiString; #endif diff --git a/src/Resource/Resource_DataMapOfAsciiStringExtendedString.hxx b/src/Resource/Resource_DataMapOfAsciiStringExtendedString.hxx index 7b1e3b672d..7bcc2458d4 100644 --- a/src/Resource/Resource_DataMapOfAsciiStringExtendedString.hxx +++ b/src/Resource/Resource_DataMapOfAsciiStringExtendedString.hxx @@ -21,8 +21,8 @@ #include #include -typedef NCollection_DataMap Resource_DataMapOfAsciiStringExtendedString; -typedef NCollection_DataMap::Iterator Resource_DataMapIteratorOfDataMapOfAsciiStringExtendedString; +typedef NCollection_DataMap Resource_DataMapOfAsciiStringExtendedString; +typedef NCollection_DataMap::Iterator Resource_DataMapIteratorOfDataMapOfAsciiStringExtendedString; #endif diff --git a/src/Resource/Resource_Manager.hxx b/src/Resource/Resource_Manager.hxx index 64bf32abc3..0072a4c71f 100644 --- a/src/Resource/Resource_Manager.hxx +++ b/src/Resource/Resource_Manager.hxx @@ -28,7 +28,6 @@ #include #include #include -#include class Resource_Manager; diff --git a/src/STEPCAFControl/STEPCAFControl_DataMapOfLabelExternFile.hxx b/src/STEPCAFControl/STEPCAFControl_DataMapOfLabelExternFile.hxx index 42156faf4a..0173910716 100644 --- a/src/STEPCAFControl/STEPCAFControl_DataMapOfLabelExternFile.hxx +++ b/src/STEPCAFControl/STEPCAFControl_DataMapOfLabelExternFile.hxx @@ -18,11 +18,10 @@ #include #include -#include #include -typedef NCollection_DataMap STEPCAFControl_DataMapOfLabelExternFile; -typedef NCollection_DataMap::Iterator STEPCAFControl_DataMapIteratorOfDataMapOfLabelExternFile; +typedef NCollection_DataMap STEPCAFControl_DataMapOfLabelExternFile; +typedef NCollection_DataMap::Iterator STEPCAFControl_DataMapIteratorOfDataMapOfLabelExternFile; #endif diff --git a/src/STEPCAFControl/STEPCAFControl_DataMapOfLabelShape.hxx b/src/STEPCAFControl/STEPCAFControl_DataMapOfLabelShape.hxx index 22e1b2a81e..c84b8b9756 100644 --- a/src/STEPCAFControl/STEPCAFControl_DataMapOfLabelShape.hxx +++ b/src/STEPCAFControl/STEPCAFControl_DataMapOfLabelShape.hxx @@ -17,11 +17,11 @@ #define STEPCAFControl_DataMapOfLabelShape_HeaderFile #include -#include +#include #include -typedef NCollection_DataMap STEPCAFControl_DataMapOfLabelShape; -typedef NCollection_DataMap::Iterator STEPCAFControl_DataMapIteratorOfDataMapOfLabelShape; +typedef NCollection_DataMap STEPCAFControl_DataMapOfLabelShape; +typedef NCollection_DataMap::Iterator STEPCAFControl_DataMapIteratorOfDataMapOfLabelShape; #endif diff --git a/src/STEPCAFControl/STEPCAFControl_DataMapOfPDExternFile.hxx b/src/STEPCAFControl/STEPCAFControl_DataMapOfPDExternFile.hxx index c995f867b5..c7a275f156 100644 --- a/src/STEPCAFControl/STEPCAFControl_DataMapOfPDExternFile.hxx +++ b/src/STEPCAFControl/STEPCAFControl_DataMapOfPDExternFile.hxx @@ -18,11 +18,10 @@ #include #include -#include #include -typedef NCollection_DataMap STEPCAFControl_DataMapOfPDExternFile; -typedef NCollection_DataMap::Iterator STEPCAFControl_DataMapIteratorOfDataMapOfPDExternFile; +typedef NCollection_DataMap STEPCAFControl_DataMapOfPDExternFile; +typedef NCollection_DataMap::Iterator STEPCAFControl_DataMapIteratorOfDataMapOfPDExternFile; #endif diff --git a/src/STEPCAFControl/STEPCAFControl_DataMapOfSDRExternFile.hxx b/src/STEPCAFControl/STEPCAFControl_DataMapOfSDRExternFile.hxx index 0ebb2725e4..7b786b5ec0 100644 --- a/src/STEPCAFControl/STEPCAFControl_DataMapOfSDRExternFile.hxx +++ b/src/STEPCAFControl/STEPCAFControl_DataMapOfSDRExternFile.hxx @@ -18,11 +18,10 @@ #include #include -#include #include -typedef NCollection_DataMap STEPCAFControl_DataMapOfSDRExternFile; -typedef NCollection_DataMap::Iterator STEPCAFControl_DataMapIteratorOfDataMapOfSDRExternFile; +typedef NCollection_DataMap STEPCAFControl_DataMapOfSDRExternFile; +typedef NCollection_DataMap::Iterator STEPCAFControl_DataMapIteratorOfDataMapOfSDRExternFile; #endif diff --git a/src/STEPConstruct/FILES b/src/STEPConstruct/FILES index 95b83dc3f4..8395ba5ff6 100755 --- a/src/STEPConstruct/FILES +++ b/src/STEPConstruct/FILES @@ -14,9 +14,6 @@ STEPConstruct_ExternRefs.cxx STEPConstruct_ExternRefs.hxx STEPConstruct_Part.cxx STEPConstruct_Part.hxx -STEPConstruct_PointHasher.cxx -STEPConstruct_PointHasher.hxx -STEPConstruct_PointHasher.lxx STEPConstruct_Styles.cxx STEPConstruct_Styles.hxx STEPConstruct_Tool.cxx diff --git a/src/STEPConstruct/STEPConstruct_DataMapOfAsciiStringTransient.hxx b/src/STEPConstruct/STEPConstruct_DataMapOfAsciiStringTransient.hxx index d4b3fe232b..6cfa8739e3 100644 --- a/src/STEPConstruct/STEPConstruct_DataMapOfAsciiStringTransient.hxx +++ b/src/STEPConstruct/STEPConstruct_DataMapOfAsciiStringTransient.hxx @@ -21,8 +21,8 @@ #include #include -typedef NCollection_DataMap STEPConstruct_DataMapOfAsciiStringTransient; -typedef NCollection_DataMap::Iterator STEPConstruct_DataMapIteratorOfDataMapOfAsciiStringTransient; +typedef NCollection_DataMap STEPConstruct_DataMapOfAsciiStringTransient; +typedef NCollection_DataMap::Iterator STEPConstruct_DataMapIteratorOfDataMapOfAsciiStringTransient; #endif diff --git a/src/STEPConstruct/STEPConstruct_DataMapOfPointTransient.hxx b/src/STEPConstruct/STEPConstruct_DataMapOfPointTransient.hxx index 029bcb40b8..6a538693f5 100644 --- a/src/STEPConstruct/STEPConstruct_DataMapOfPointTransient.hxx +++ b/src/STEPConstruct/STEPConstruct_DataMapOfPointTransient.hxx @@ -19,11 +19,10 @@ #include #include -#include #include -typedef NCollection_DataMap STEPConstruct_DataMapOfPointTransient; -typedef NCollection_DataMap::Iterator STEPConstruct_DataMapIteratorOfDataMapOfPointTransient; +typedef NCollection_DataMap STEPConstruct_DataMapOfPointTransient; +typedef NCollection_DataMap::Iterator STEPConstruct_DataMapIteratorOfDataMapOfPointTransient; #endif diff --git a/src/STEPConstruct/STEPConstruct_PointHasher.cxx b/src/STEPConstruct/STEPConstruct_PointHasher.cxx deleted file mode 100644 index a01480f88b..0000000000 --- a/src/STEPConstruct/STEPConstruct_PointHasher.cxx +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) 1999-2014 OPEN CASCADE SAS -// -// This file is part of Open CASCADE Technology software library. -// -// This library is free software; you can redistribute it and/or modify it under -// the terms of the GNU Lesser General Public License version 2.1 as published -// by the Free Software Foundation, with special exception defined in the file -// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT -// distribution for complete text of the license and disclaimer of any warranty. -// -// Alternatively, this file may be used under the terms of Open CASCADE -// commercial license or contractual agreement. - - -#include -#include - -//======================================================================= -//function : IsEqual -//purpose : -//======================================================================= -Standard_Boolean STEPConstruct_PointHasher::IsEqual(const gp_Pnt& point1, - const gp_Pnt& point2) -{ - if(Abs(point1.X()-point2.X()) > Epsilon(point1.X())) return Standard_False; - if(Abs(point1.Y()-point2.Y()) > Epsilon(point1.Y())) return Standard_False; - if(Abs(point1.Z()-point2.Z()) > Epsilon(point1.Z())) return Standard_False; - return Standard_True; -} diff --git a/src/STEPConstruct/STEPConstruct_PointHasher.hxx b/src/STEPConstruct/STEPConstruct_PointHasher.hxx deleted file mode 100644 index 6713485624..0000000000 --- a/src/STEPConstruct/STEPConstruct_PointHasher.hxx +++ /dev/null @@ -1,68 +0,0 @@ -// Created on: 2003-01-15 -// Created by: data exchange team -// Copyright (c) 2003-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 _STEPConstruct_PointHasher_HeaderFile -#define _STEPConstruct_PointHasher_HeaderFile - -#include -#include - -#include -class gp_Pnt; - - - -class STEPConstruct_PointHasher -{ -public: - - DEFINE_STANDARD_ALLOC - - //! Computes a hash code for the point, in the range [1, theUpperBound] - //! @param thePoint the point which hash code is to be computed - //! @param theUpperBound the upper bound of the range a computing hash code must be within - //! @return a computed hash code, in the range [1, theUpperBound] - static Standard_Integer HashCode (const gp_Pnt& thePoint, const Standard_Integer theUpperBound); - - //! Returns True when the two keys are the same. Two - //! same keys must have the same hashcode, the - //! contrary is not necessary. - Standard_EXPORT static Standard_Boolean IsEqual (const gp_Pnt& Point1, const gp_Pnt& Point2); - - - - -protected: - - - - - -private: - - - - - -}; - - -#include - - - - - -#endif // _STEPConstruct_PointHasher_HeaderFile diff --git a/src/STEPConstruct/STEPConstruct_PointHasher.lxx b/src/STEPConstruct/STEPConstruct_PointHasher.lxx deleted file mode 100644 index 1e2e907af8..0000000000 --- a/src/STEPConstruct/STEPConstruct_PointHasher.lxx +++ /dev/null @@ -1,31 +0,0 @@ -// 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. - -//======================================================================= -// function : HashCode -// purpose : -//======================================================================= -inline Standard_Integer STEPConstruct_PointHasher::HashCode (const gp_Pnt& thePoint, - const Standard_Integer theUpperBound) -{ - union - { - Standard_Real R[3]; - Standard_Integer I[6]; - } U; - - thePoint.Coord (U.R[0], U.R[1], U.R[2]); - - return ::HashCode (U.I[0] / 23 + U.I[1] / 19 + U.I[2] / 17 + U.I[3] / 13 + U.I[4] / 11 + U.I[5] / 7, theUpperBound); - // return ::HashCode((U.I[0]>>4)+(U.I[1]>>3)+(U.I[2]>>2)+(U.I[3]>>1)+(U.I[4]>>4)+(U.I[5]>>3),theUpperBound); -} diff --git a/src/SelectMgr/SelectMgr_BVHThreadPool.hxx b/src/SelectMgr/SelectMgr_BVHThreadPool.hxx index 3dd7afd0ad..c96c1f8c60 100644 --- a/src/SelectMgr/SelectMgr_BVHThreadPool.hxx +++ b/src/SelectMgr/SelectMgr_BVHThreadPool.hxx @@ -45,9 +45,15 @@ public: myPool(nullptr), myMutex(), myToCatchFpe (Standard_False) - { + {} - } + + BVHThread(const BVHThread& theOther) + : OSD_Thread(theOther), + myPool(theOther.myPool), + myMutex(), + myToCatchFpe(theOther.myToCatchFpe) + {} //! Returns mutex used for BVH building Standard_Mutex& BVHMutex() diff --git a/src/SelectMgr/SelectMgr_IndexedDataMapOfOwnerCriterion.hxx b/src/SelectMgr/SelectMgr_IndexedDataMapOfOwnerCriterion.hxx index fbb8a344af..fbd8f99dd1 100644 --- a/src/SelectMgr/SelectMgr_IndexedDataMapOfOwnerCriterion.hxx +++ b/src/SelectMgr/SelectMgr_IndexedDataMapOfOwnerCriterion.hxx @@ -19,9 +19,8 @@ #include #include -#include #include -typedef NCollection_IndexedDataMap SelectMgr_IndexedDataMapOfOwnerCriterion; +typedef NCollection_IndexedDataMap SelectMgr_IndexedDataMapOfOwnerCriterion; #endif diff --git a/src/SelectMgr/SelectMgr_SelectionImageFiller.hxx b/src/SelectMgr/SelectMgr_SelectionImageFiller.hxx index 90a7277ec1..9fc46d2849 100644 --- a/src/SelectMgr/SelectMgr_SelectionImageFiller.hxx +++ b/src/SelectMgr/SelectMgr_SelectionImageFiller.hxx @@ -18,7 +18,6 @@ #include #include #include -#include class SelectMgr_ViewerSelector; @@ -76,7 +75,7 @@ protected: Image_PixMap* myImage; SelectMgr_ViewerSelector* myMainSel; math_BullardGenerator myBullardGenerator; - NCollection_Map myUniqueColors; + NCollection_Map myUniqueColors; }; #endif diff --git a/src/ShapeAnalysis/ShapeAnalysis.cxx b/src/ShapeAnalysis/ShapeAnalysis.cxx index 5517a17b35..2b88674808 100644 --- a/src/ShapeAnalysis/ShapeAnalysis.cxx +++ b/src/ShapeAnalysis/ShapeAnalysis.cxx @@ -111,12 +111,7 @@ Standard_Real ShapeAnalysis::AdjustToPeriod(const Standard_Real Val, template static inline void ReverseSeq (HSequence& Seq) { - Standard_Integer j=Seq.Length(); - for(Standard_Integer i=1; i=j) break; - Seq.Exchange(i,j); - j--; - } + Seq.Reverse(); } //======================================================================= //function : TotCross2D diff --git a/src/ShapeExtend/ShapeExtend_DataMapOfTransientListOfMsg.hxx b/src/ShapeExtend/ShapeExtend_DataMapOfTransientListOfMsg.hxx index cf6f27caff..5e3e2a29bf 100644 --- a/src/ShapeExtend/ShapeExtend_DataMapOfTransientListOfMsg.hxx +++ b/src/ShapeExtend/ShapeExtend_DataMapOfTransientListOfMsg.hxx @@ -19,11 +19,10 @@ #include #include -#include #include -typedef NCollection_DataMap ShapeExtend_DataMapOfTransientListOfMsg; -typedef NCollection_DataMap::Iterator ShapeExtend_DataMapIteratorOfDataMapOfTransientListOfMsg; +typedef NCollection_DataMap ShapeExtend_DataMapOfTransientListOfMsg; +typedef NCollection_DataMap::Iterator ShapeExtend_DataMapIteratorOfDataMapOfTransientListOfMsg; #endif diff --git a/src/ShapeFix/ShapeFix_EdgeConnect.cxx b/src/ShapeFix/ShapeFix_EdgeConnect.cxx index fbabd618b0..e2ff4a7033 100644 --- a/src/ShapeFix/ShapeFix_EdgeConnect.cxx +++ b/src/ShapeFix/ShapeFix_EdgeConnect.cxx @@ -165,9 +165,9 @@ void ShapeFix_EdgeConnect::Build () for ( theLIterator.Initialize( theList ); theLIterator.More(); theLIterator.Next() ) { - TopoDS_Vertex& theVertex = TopoDS::Vertex( theLIterator.Value() ); + const TopoDS_Vertex& theVertex = TopoDS::Vertex( theLIterator.Value() ); theLIterator.Next(); - TopoDS_Edge& theEdge = TopoDS::Edge( theLIterator.Value() ); + TopoDS_Edge& theEdge = TopoDS::Edge( theLIterator.ChangeValue() ); // Determine usage of curve bound points TopoDS_Vertex theStart, theEnd; @@ -240,9 +240,9 @@ void ShapeFix_EdgeConnect::Build () for ( theLIterator.Initialize( theList ); theLIterator.More(); theLIterator.Next() ) { - TopoDS_Vertex& theVertex = TopoDS::Vertex( theLIterator.Value() ); + const TopoDS_Vertex& theVertex = TopoDS::Vertex( theLIterator.Value() ); theLIterator.Next(); - TopoDS_Edge& theEdge = TopoDS::Edge( theLIterator.Value() ); + TopoDS_Edge& theEdge = TopoDS::Edge( theLIterator.ChangeValue() ); // Determine usage of old vertices TopoDS_Vertex theStart, theEnd; diff --git a/src/Standard/FILES b/src/Standard/FILES index e6e14a2f42..e3465f7568 100755 --- a/src/Standard/FILES +++ b/src/Standard/FILES @@ -1,7 +1,6 @@ Standard.cxx Standard.hxx Standard_AbortiveTransaction.hxx -Standard_Address.hxx Standard_ArrayStreamBuffer.hxx Standard_ArrayStreamBuffer.cxx Standard_Assert.hxx @@ -17,6 +16,7 @@ Standard_ConstructionError.hxx Standard_Copy.tcl Standard_CString.cxx Standard_CString.hxx +Standard_CStringHasher.hxx Standard_DefineAlloc.hxx Standard_DefineException.hxx Standard_DefineHandle.hxx @@ -29,8 +29,6 @@ Standard_Dump.hxx Standard_ErrorHandler.cxx Standard_ErrorHandler.hxx Standard_ExtCharacter.hxx -Standard_ExtString.cxx -Standard_ExtString.hxx Standard_Failure.cxx Standard_Failure.hxx Standard_WarningDisableFunctionCast.hxx @@ -38,6 +36,8 @@ Standard_GUID.cxx Standard_GUID.hxx Standard_Handle.hxx Standard_HandlerStatus.hxx +Standard_HashUtils.hxx +Standard_HashUtils.lxx Standard_ImmutableObject.hxx Standard_Integer.hxx Standard_IStream.hxx @@ -45,16 +45,11 @@ Standard_JmpBuf.hxx Standard_LicenseError.hxx Standard_LicenseNotFound.hxx Standard_Macro.hxx -Standard_math.cxx -Standard_math.hxx +Standard_MemoryUtils.hxx Standard_MMgrOpt.cxx Standard_MMgrOpt.hxx -Standard_MMgrRaw.cxx -Standard_MMgrRaw.hxx Standard_MMgrRoot.cxx Standard_MMgrRoot.hxx -Standard_MMgrTBBalloc.cxx -Standard_MMgrTBBalloc.hxx Standard_MultiplyDefined.hxx Standard_Mutex.cxx Standard_Mutex.hxx @@ -83,9 +78,7 @@ Standard_ReadBuffer.hxx Standard_ReadLineBuffer.hxx Standard_Real.cxx Standard_Real.hxx -Standard_ShortReal.cxx Standard_ShortReal.hxx -Standard_Size.hxx Standard_SStream.hxx Standard_StackTrace.cxx Standard_Std.hxx @@ -101,7 +94,6 @@ Standard_TypeDef.hxx Standard_TypeMismatch.hxx Standard_Underflow.hxx Standard_UUID.hxx -Standard_values.h Standard_Version.hxx Standard_WarningsDisable.hxx -Standard_WarningsRestore.hxx \ No newline at end of file +Standard_WarningsRestore.hxx diff --git a/src/Standard/Standard.cxx b/src/Standard/Standard.cxx index bc601165c6..49bafea57d 100644 --- a/src/Standard/Standard.cxx +++ b/src/Standard/Standard.cxx @@ -1,7 +1,4 @@ -// Created on: 2005-03-15 -// Created by: Peter KURNEV -// Copyright (c) 1998-1999 Matra Datavision -// Copyright (c) 1999-2014 OPEN CASCADE SAS +// Copyright (c) 1999-2023 OPEN CASCADE SAS // // This file is part of Open CASCADE Technology software library. // @@ -14,26 +11,70 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. - #include -#include -#include -#include -#include + +#include #include + #if(defined(_WIN32) || defined(__WIN32__)) - #include - #include - #include +#include +#include +#include #endif #if defined(_MSC_VER) || defined(__ANDROID__) || defined(__QNX__) - #include +#include #elif (defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 1)) && (defined(__i386) || defined(__x86_64))) - #include +#include +#else +extern "C" int posix_memalign(void** thePtr, size_t theAlign, size_t theSize); +#endif + +// Temp define, after it will be part of CMake +#define OCCT_MMGT_OPT_NATIVE + +namespace +{ + static Standard::AllocatorType& allocatorTypeInstance() + { + static Standard::AllocatorType aType = +#ifdef OCCT_MMGT_OPT_FLEXIBLE + Standard::AllocatorType::NATIVE; +#elif defined OCCT_MMGT_OPT_NATIVE + Standard::AllocatorType::NATIVE; +#elif defined OCCT_MMGT_OPT_TBB + Standard::AllocatorType::TBB; +#elif defined OCCT_MMGT_OPT_JEMALLOC + Standard::AllocatorType::JEMALLOC; +#endif + return aType; + } +} + +#ifdef OCCT_MMGT_OPT_JEMALLOC +#define JEMALLOC_NO_DEMANGLE +#include +#endif // OCCT_MMGT_OPT_JEMALLOC + +// Available macros definition +// - OCCT_MMGT_OPT_FLEXIBLE, modifiable in real time +// - OCCT_MMGT_OPT_TBB, using tbb::scalable_allocator +// - OCCT_MMGT_OPT_NATIVE, using native calloc, free +// - OCCT_MMGT_OPT_JEMALLOC, using external jecalloc, jefree +#ifdef OCCT_MMGT_OPT_FLEXIBLE +#include +#include + + // paralleling with Intel TBB +#ifdef HAVE_TBB +#pragma comment (lib, "tbbmalloc.lib") +#include #else - extern "C" int posix_memalign (void** thePtr, size_t theAlign, size_t theSize); +#define scalable_malloc malloc +#define scalable_calloc calloc +#define scalable_realloc realloc +#define scalable_free free #endif // There is no support for environment variables in UWP @@ -45,270 +86,437 @@ #ifndef OCCT_MMGT_OPT_DEFAULT #define OCCT_MMGT_OPT_DEFAULT 0 #endif - -//======================================================================= -//class : Standard_MMgrFactory -//purpose : Container for pointer to memory manager; -// used to construct appropriate memory manager according -// to environment settings, and to ensure destruction upon exit -//======================================================================= -class Standard_MMgrFactory +namespace { -public: - static Standard_MMgrRoot* GetMMgr(); - ~Standard_MMgrFactory(); + /** + * Implementation of raw OCC memory manager which uses standard C + * functions: malloc (or calloc), free and realloc + * without any optimization + */ + class Standard_MMgrRaw : public Standard_MMgrRoot + { + public: + //! Constructor; if theToClear is True, the memory will be nullified + //! upon allocation. + Standard_MMgrRaw(const Standard_Boolean theToClear = Standard_False) + { + myClear = theToClear; + } -private: - Standard_MMgrFactory(); - Standard_MMgrFactory (const Standard_MMgrFactory&); - Standard_MMgrFactory& operator= (const Standard_MMgrFactory&); + //! Allocate theSize bytes + Standard_Address Allocate(const Standard_Size theSize) override + { + // we use ?: operator instead of if() since it is faster :-) + Standard_Address aPtr = (myClear ? calloc(theSize, sizeof(char)) : + malloc(theSize)); + if (!aPtr) + throw Standard_OutOfMemory("Standard_MMgrRaw::Allocate(): malloc failed"); + return aPtr; + } -private: - Standard_MMgrRoot* myFMMgr; -}; + //! Reallocate thePtr to the size theSize. + //! The new pointer is returned. + Standard_Address Reallocate(Standard_Address thePtr, + const Standard_Size theSize) override + { + Standard_Address newStorage = (Standard_Address)realloc(thePtr, theSize); + if (!newStorage) + throw Standard_OutOfMemory("Standard_MMgrRaw::Reallocate(): realloc failed"); + // Note that it is not possible to ensure that additional memory + // allocated by realloc will be cleared (so as to satisfy myClear mode); + // in order to do that we would need using memset... + return newStorage; + } -//======================================================================= -//function : Standard_MMgrFactory -//purpose : Check environment variables and create appropriate memory manager -//======================================================================= + //! Free allocated memory. The pointer is nullified. + void Free(Standard_Address thePtr) override + { + free(thePtr); + } -Standard_MMgrFactory::Standard_MMgrFactory() -: myFMMgr (NULL) -{ -/*#if defined(_MSC_VER) && (_MSC_VER > 1400) - // Turn ON thread-safe C locale globally to avoid side effects by setlocale() calls between threads. - // After this call all following _configthreadlocale() will be ignored assuming - // Notice that this is MSVCRT feature - on POSIX systems xlocale API (uselocale instead of setlocale) - // should be used explicitly to ensure thread-safety! - - // This is not well documented call because _ENABLE_PER_THREAD_LOCALE_GLOBAL flag is defined but not implemented for some reason. - // -1 will set global locale flag to force _ENABLE_PER_THREAD_LOCALE_GLOBAL + _ENABLE_PER_THREAD_LOCALE_NEW behaviour - // although there NO way to turn it off again and following calls will have no effect (locale will be changed only for current thread). - _configthreadlocale (-1); -#endif*/ - - // Check basic assumption. - // If assertion happens, then OCCT should be corrected for compatibility with such CPU architecture. - Standard_STATIC_ASSERT(sizeof(Standard_Utf8Char) == 1); - Standard_STATIC_ASSERT(sizeof(short) == 2); - Standard_STATIC_ASSERT(sizeof(Standard_Utf16Char) == 2); - Standard_STATIC_ASSERT(sizeof(Standard_Utf32Char) == 4); + protected: + Standard_Boolean myClear; //! Option to nullify allocated memory + }; + + //! Implementation of OCC memory manager which uses Intel TBB + //! scalable allocator. + //! + //! On configurations where TBB is not available standard RTL functions + //! malloc() / free() are used. + class Standard_MMgrTBBalloc : public Standard_MMgrRoot + { + public: + //! Constructor; if theClear is True, the memory will be nullified + //! upon allocation. + Standard_MMgrTBBalloc(const Standard_Boolean theClear = Standard_False) + { + myClear = theClear; + } + + //! Allocate theSize bytes + Standard_Address Allocate(const Standard_Size theSize) override + { + // we use ?: operator instead of if() since it is faster :-) + Standard_Address aPtr = (myClear ? scalable_calloc(theSize, sizeof(char)) : + scalable_malloc(theSize)); + if (!aPtr) + throw Standard_OutOfMemory("Standard_MMgrTBBalloc::Allocate(): malloc failed"); + return aPtr; + } + + //! Reallocate thePtr to the size theSize. + //! The new pointer is returned. + Standard_Address Reallocate(Standard_Address thePtr, + const Standard_Size theSize) override + { + Standard_Address newStorage = (Standard_Address)scalable_realloc(thePtr, theSize); + if (!newStorage) + throw Standard_OutOfMemory("Standard_MMgrTBBalloc::Reallocate(): realloc failed"); + // Note that it is not possible to ensure that additional memory + // allocated by realloc will be cleared (so as to satisfy myClear mode); + // in order to do that we would need using memset... + return newStorage; + } + + //! Free allocated memory + void Free(Standard_Address thePtr) override + { + scalable_free(thePtr); + } + + protected: + Standard_Boolean myClear; //! Option to nullify allocated memory + }; + + //======================================================================= + //class : Standard_MMgrFactory + //purpose : Container for pointer to memory manager; + // used to construct appropriate memory manager according + // to environment settings, and to ensure destruction upon exit + //======================================================================= + class Standard_MMgrFactory + { + public: + static Standard_MMgrRoot* GetMMgr(); + ~Standard_MMgrFactory(); + + private: + Standard_MMgrFactory(); + Standard_MMgrFactory(const Standard_MMgrFactory&); + Standard_MMgrFactory& operator= (const Standard_MMgrFactory&); + + private: + Standard_MMgrRoot* myFMMgr; + }; + + //======================================================================= + //function : Standard_MMgrFactory + //purpose : Check environment variables and create appropriate memory manager + //======================================================================= + + Standard_MMgrFactory::Standard_MMgrFactory() + : myFMMgr(NULL) + { + /*#if defined(_MSC_VER) && (_MSC_VER > 1400) + // Turn ON thread-safe C locale globally to avoid side effects by setlocale() calls between threads. + // After this call all following _configthreadlocale() will be ignored assuming + // Notice that this is MSVCRT feature - on POSIX systems xlocale API (uselocale instead of setlocale) + // should be used explicitly to ensure thread-safety! + + // This is not well documented call because _ENABLE_PER_THREAD_LOCALE_GLOBAL flag is defined but not implemented for some reason. + // -1 will set global locale flag to force _ENABLE_PER_THREAD_LOCALE_GLOBAL + _ENABLE_PER_THREAD_LOCALE_NEW behaviour + // although there NO way to turn it off again and following calls will have no effect (locale will be changed only for current thread). + _configthreadlocale (-1); + #endif*/ + + // Check basic assumption. + // If assertion happens, then OCCT should be corrected for compatibility with such CPU architecture. + Standard_STATIC_ASSERT(sizeof(Standard_Utf8Char) == 1); + Standard_STATIC_ASSERT(sizeof(short) == 2); + Standard_STATIC_ASSERT(sizeof(Standard_Utf16Char) == 2); + Standard_STATIC_ASSERT(sizeof(Standard_Utf32Char) == 4); #ifdef _WIN32 - Standard_STATIC_ASSERT(sizeof(Standard_WideChar) == sizeof(Standard_Utf16Char)); + Standard_STATIC_ASSERT(sizeof(Standard_WideChar) == sizeof(Standard_Utf16Char)); #endif - char* aVar; - aVar = getenv ("MMGT_OPT"); - Standard_Integer anAllocId = (aVar ? atoi (aVar): OCCT_MMGT_OPT_DEFAULT); + char* aVar; + aVar = getenv("MMGT_OPT"); + Standard_Integer anAllocId = (aVar ? atoi(aVar) : OCCT_MMGT_OPT_DEFAULT); #if defined(HAVE_TBB) && defined(_M_IX86) - if (anAllocId == 2) - { - // CR25396: Check if SSE2 instructions are supported on 32-bit x86 processor on Windows platform, - // if not then use MMgrRaw instead of MMgrTBBalloc. - // It is to avoid runtime crash when running on a CPU - // that supports SSE but does not support SSE2 (some modifications of AMD Sempron). - static const DWORD _SSE2_FEATURE_BIT(0x04000000); - DWORD volatile dwFeature; - _asm + if (anAllocId == 2) { - push eax - push ebx - push ecx - push edx - - // get the CPU feature bits - mov eax, 1 - cpuid - mov dwFeature, edx - - pop edx - pop ecx - pop ebx - pop eax + // CR25396: Check if SSE2 instructions are supported on 32-bit x86 processor on Windows platform, + // if not then use MMgrRaw instead of MMgrTBBalloc. + // It is to avoid runtime crash when running on a CPU + // that supports SSE but does not support SSE2 (some modifications of AMD Sempron). + static const DWORD _SSE2_FEATURE_BIT(0x04000000); + DWORD volatile dwFeature; + _asm + { + push eax + push ebx + push ecx + push edx + + // get the CPU feature bits + mov eax, 1 + cpuid + mov dwFeature, edx + + pop edx + pop ecx + pop ebx + pop eax + } + if ((dwFeature & _SSE2_FEATURE_BIT) == 0) + anAllocId = 0; } - if ((dwFeature & _SSE2_FEATURE_BIT) == 0) - anAllocId = 0; - } #endif - aVar = getenv ("MMGT_CLEAR"); - Standard_Boolean toClear = (aVar ? (atoi (aVar) != 0) : Standard_True); + aVar = getenv("MMGT_CLEAR"); + Standard_Boolean toClear = (aVar ? (atoi(aVar) != 0) : Standard_True); - // on Windows (actual for XP and 2000) activate low fragmentation heap - // for CRT heap in order to get best performance. - // Environment variable MMGT_LFH can be used to switch off this action (if set to 0) + // on Windows (actual for XP and 2000) activate low fragmentation heap + // for CRT heap in order to get best performance. + // Environment variable MMGT_LFH can be used to switch off this action (if set to 0) #if defined(_MSC_VER) - aVar = getenv ("MMGT_LFH"); - if ( aVar == NULL || atoi (aVar) != 0 ) - { - ULONG aHeapInfo = 2; - HANDLE aCRTHeap = (HANDLE)_get_heap_handle(); - HeapSetInformation (aCRTHeap, HeapCompatibilityInformation, &aHeapInfo, sizeof(aHeapInfo)); - } + aVar = getenv("MMGT_LFH"); + if (aVar == NULL || atoi(aVar) != 0) + { + ULONG aHeapInfo = 2; + HANDLE aCRTHeap = (HANDLE)_get_heap_handle(); + HeapSetInformation(aCRTHeap, HeapCompatibilityInformation, &aHeapInfo, sizeof(aHeapInfo)); + } #endif - switch (anAllocId) - { - case 1: // OCCT optimized memory allocator + switch (anAllocId) { - aVar = getenv ("MMGT_MMAP"); - Standard_Boolean bMMap = (aVar ? (atoi (aVar) != 0) : Standard_True); - aVar = getenv ("MMGT_CELLSIZE"); - Standard_Integer aCellSize = (aVar ? atoi (aVar) : 200); - aVar = getenv ("MMGT_NBPAGES"); - Standard_Integer aNbPages = (aVar ? atoi (aVar) : 1000); - aVar = getenv ("MMGT_THRESHOLD"); - Standard_Integer aThreshold = (aVar ? atoi (aVar) : 40000); - myFMMgr = new Standard_MMgrOpt (toClear, bMMap, aCellSize, aNbPages, aThreshold); - break; + case 1: // OCCT optimized memory allocator + { + aVar = getenv("MMGT_MMAP"); + Standard_Boolean bMMap = (aVar ? (atoi(aVar) != 0) : Standard_True); + aVar = getenv("MMGT_CELLSIZE"); + Standard_Integer aCellSize = (aVar ? atoi(aVar) : 200); + aVar = getenv("MMGT_NBPAGES"); + Standard_Integer aNbPages = (aVar ? atoi(aVar) : 1000); + aVar = getenv("MMGT_THRESHOLD"); + Standard_Integer aThreshold = (aVar ? atoi(aVar) : 40000); + myFMMgr = new Standard_MMgrOpt(toClear, bMMap, aCellSize, aNbPages, aThreshold); + break; + } + case 2: // TBB memory allocator + myFMMgr = new Standard_MMgrTBBalloc(toClear); + break; + case 0: + default: // system default memory allocator + myFMMgr = new Standard_MMgrRaw(toClear); } - case 2: // TBB memory allocator - myFMMgr = new Standard_MMgrTBBalloc (toClear); - break; - case 0: - default: // system default memory allocator - myFMMgr = new Standard_MMgrRaw (toClear); + allocatorTypeInstance() = static_cast(anAllocId); + } + + //======================================================================= + //function : ~Standard_MMgrFactory + //purpose : + //======================================================================= + + Standard_MMgrFactory::~Standard_MMgrFactory() + { + if (myFMMgr) + myFMMgr->Purge(Standard_True); + } + + //======================================================================= + // function: GetMMgr + // + // This static function has a purpose to wrap static holder for memory + // manager instance. + // + // Wrapping holder inside a function is needed to ensure that it will + // be initialized not later than the first call to memory manager (that + // would be impossible to guarantee if holder was static variable on + // global or file scope, because memory manager may be called from + // constructors of other static objects). + // + // Note that at the same time we could not guarantee that the holder + // object is destroyed after last call to memory manager, since that + // last call may be from static Handle() object which has been initialized + // dynamically during program execution rather than in its constructor. + // + // Therefore holder currently does not call destructor of the memory manager + // but only its method Purge() with Standard_True. + // + // To free the memory completely, we probably could use compiler-specific + // pragmas (such as '#pragma fini' on SUN Solaris and '#pragma init_seg' on + // WNT MSVC++) to put destructing function in code segment that is called + // after destructors of other (even static) objects. However, this is not + // done by the moment since it is compiler-dependent and there is no guarantee + // that some other object calling memory manager is not placed also in that segment... + // + // Note that C runtime function atexit() could not help in this problem + // since its behaviour is the same as for destructors of static objects + // (see ISO 14882:1998 "Programming languages -- C++" 3.6.3) + // + // The correct approach to deal with the problem would be to have memory manager + // to properly control its memory allocation and caching free blocks so + // as to release all memory as soon as it is returned to it, and probably + // even delete itself if all memory it manages has been released and + // last call to method Purge() was with True. + // + // Note that one possible method to control memory allocations could + // be counting calls to Allocate() and Free()... + // + //======================================================================= + Standard_MMgrRoot* Standard_MMgrFactory::GetMMgr() + { + static Standard_MMgrFactory aFactory; + return aFactory.myFMMgr; } } +#endif // OCCT_MMGT_OPT_FLEXIBLE //======================================================================= -//function : ~Standard_MMgrFactory -//purpose : +//function : Allocate +//purpose : //======================================================================= - -Standard_MMgrFactory::~Standard_MMgrFactory() +Standard::AllocatorType Standard::GetAllocatorType() { - if ( myFMMgr ) - myFMMgr->Purge(Standard_True); + return allocatorTypeInstance(); } //======================================================================= -// function: GetMMgr -// -// This static function has a purpose to wrap static holder for memory -// manager instance. -// -// Wrapping holder inside a function is needed to ensure that it will -// be initialized not later than the first call to memory manager (that -// would be impossible to guarantee if holder was static variable on -// global or file scope, because memory manager may be called from -// constructors of other static objects). -// -// Note that at the same time we could not guarantee that the holder -// object is destroyed after last call to memory manager, since that -// last call may be from static Handle() object which has been initialized -// dynamically during program execution rather than in its constructor. -// -// Therefore holder currently does not call destructor of the memory manager -// but only its method Purge() with Standard_True. -// -// To free the memory completely, we probably could use compiler-specific -// pragmas (such as '#pragma fini' on SUN Solaris and '#pragma init_seg' on -// WNT MSVC++) to put destructing function in code segment that is called -// after destructors of other (even static) objects. However, this is not -// done by the moment since it is compiler-dependent and there is no guarantee -// that some other object calling memory manager is not placed also in that segment... -// -// Note that C runtime function atexit() could not help in this problem -// since its behaviour is the same as for destructors of static objects -// (see ISO 14882:1998 "Programming languages -- C++" 3.6.3) -// -// The correct approach to deal with the problem would be to have memory manager -// to properly control its memory allocation and caching free blocks so -// as to release all memory as soon as it is returned to it, and probably -// even delete itself if all memory it manages has been released and -// last call to method Purge() was with True. -// -// Note that one possible method to control memory allocations could -// be counting calls to Allocate() and Free()... -// +//function : Allocate +//purpose : //======================================================================= -Standard_MMgrRoot* Standard_MMgrFactory::GetMMgr() +Standard_Address Standard::Allocate(const Standard_Size theSize) { - static Standard_MMgrFactory aFactory; - return aFactory.myFMMgr; +#ifdef OCCT_MMGT_OPT_FLEXIBLE + return Standard_MMgrFactory::GetMMgr()->Allocate(theSize); +#elif defined OCCT_MMGT_OPT_NATIVE + Standard_Address aPtr = calloc(theSize, sizeof(char)); + if (!aPtr) + throw Standard_OutOfMemory("Standard_MMgrRaw::Allocate(): malloc failed"); + return aPtr; +#elif defined OCCT_MMGT_OPT_JEMALLOC + Standard_Address aPtr = je_calloc(theSize, sizeof(char)); + if (!aPtr) + throw Standard_OutOfMemory("Standard_MMgrRaw::Allocate(): malloc failed"); + return aPtr; +#endif // OCCT_MMGT_OPT_FLEXIBLE } //======================================================================= -//function : Allocate -//purpose : +//function : AllocateOptimal +//purpose : //======================================================================= - -Standard_Address Standard::Allocate(const Standard_Size size) +Standard_Address Standard::AllocateOptimal(const Standard_Size theSize) { - return Standard_MMgrFactory::GetMMgr()->Allocate(size); +#ifdef OCCT_MMGT_OPT_FLEXIBLE + return Standard_MMgrFactory::GetMMgr()->Allocate(theSize); +#elif defined OCCT_MMGT_OPT_NATIVE + return malloc(theSize); +#elif defined OCCT_MMGT_OPT_JEMALLOC + return je_malloc(theSize); +#endif } //======================================================================= //function : Free -//purpose : +//purpose : //======================================================================= - -void Standard::Free (Standard_Address theStorage) +void Standard::Free(Standard_Address theStorage) { +#ifdef OCCT_MMGT_OPT_FLEXIBLE Standard_MMgrFactory::GetMMgr()->Free(theStorage); +#elif defined OCCT_MMGT_OPT_NATIVE + free(theStorage); +#elif defined OCCT_MMGT_OPT_JEMALLOC + return je_free(theStorage); +#endif } //======================================================================= //function : Reallocate -//purpose : +//purpose : //======================================================================= - -Standard_Address Standard::Reallocate (Standard_Address theStorage, - const Standard_Size theSize) +Standard_Address Standard::Reallocate(Standard_Address theStorage, + const Standard_Size theSize) { - return Standard_MMgrFactory::GetMMgr()->Reallocate (theStorage, theSize); + // Note that it is not possible to ensure that additional memory + // allocated by realloc will be cleared (so as to satisfy myClear mode); + // in order to do that we would need using memset.. +#ifdef OCCT_MMGT_OPT_FLEXIBLE + return Standard_MMgrFactory::GetMMgr()->Reallocate(theStorage, theSize); +#elif defined OCCT_MMGT_OPT_NATIVE + Standard_Address aNewStorage = (Standard_Address)realloc(theStorage, theSize); + if (!aNewStorage) + throw Standard_OutOfMemory("Standard_MMgrRaw::Reallocate(): realloc failed"); + return aNewStorage; +#elif defined OCCT_MMGT_OPT_JEMALLOC + Standard_Address newStorage = (Standard_Address)je_realloc(theStorage, theSize); + if (!newStorage) + throw Standard_OutOfMemory("Standard_MMgrRaw::Reallocate(): realloc failed"); + return newStorage; +#endif } //======================================================================= //function : Purge -//purpose : +//purpose : //======================================================================= - Standard_Integer Standard::Purge() { +#ifdef OCCT_MMGT_OPT_FLEXIBLE return Standard_MMgrFactory::GetMMgr()->Purge(); +#else + return true; +#endif // OCCT_MMGT_OPT_FLEXIBLE } //======================================================================= //function : AllocateAligned //purpose : //======================================================================= - -Standard_Address Standard::AllocateAligned (const Standard_Size theSize, - const Standard_Size theAlign) +Standard_Address Standard::AllocateAligned(const Standard_Size theSize, + const Standard_Size theAlign) { +#if defined(OCCT_MMGT_OPT_FLEXIBLE) || defined(OCCT_MMGT_OPT_NATIVE) #if defined(_MSC_VER) - return _aligned_malloc (theSize, theAlign); + return _aligned_malloc(theSize, theAlign); #elif defined(__ANDROID__) || defined(__QNX__) - return memalign (theAlign, theSize); + return memalign(theAlign, theSize); #elif (defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 1)) && (defined(__i386) || defined(__x86_64))) - return _mm_malloc (theSize, theAlign); + return _mm_malloc(theSize, theAlign); #else void* aPtr; - if (posix_memalign (&aPtr, theAlign, theSize)) + if (posix_memalign(&aPtr, theAlign, theSize)) { return NULL; } return aPtr; #endif +#elif defined OCCT_MMGT_OPT_JEMALLOC + return je_aligned_alloc(theAlign, theSize); +#endif } //======================================================================= //function : FreeAligned //purpose : //======================================================================= - -void Standard::FreeAligned (Standard_Address thePtrAligned) +void Standard::FreeAligned(Standard_Address thePtrAligned) { +#if defined(OCCT_MMGT_OPT_FLEXIBLE) || defined(OCCT_MMGT_OPT_NATIVE) #if defined(_MSC_VER) - _aligned_free (thePtrAligned); + _aligned_free(thePtrAligned); #elif defined(__ANDROID__) || defined(__QNX__) - free (thePtrAligned); + free(thePtrAligned); #elif (defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 1)) && (defined(__i386) || defined(__x86_64))) - _mm_free (thePtrAligned); + _mm_free(thePtrAligned); #else - free (thePtrAligned); + free(thePtrAligned); +#endif +#elif defined OCCT_MMGT_OPT_JEMALLOC + return je_free(thePtrAligned); #endif } diff --git a/src/Standard/Standard.hxx b/src/Standard/Standard.hxx index 8d0fb3a1a6..c9671f68ff 100644 --- a/src/Standard/Standard.hxx +++ b/src/Standard/Standard.hxx @@ -18,11 +18,8 @@ #define _Standard_HeaderFile #include -#include -#include #include - //! The package Standard provides global memory allocator and other basic //! services used by other OCCT components. @@ -32,10 +29,25 @@ public: DEFINE_STANDARD_ALLOC + //! Enumiration of possible allocator types + enum class AllocatorType + { + NATIVE = 0, + OPT = 1, + TBB = 2, + JEMALLOC = 3 + }; + + //! Returns default allocator type + Standard_EXPORT static AllocatorType GetAllocatorType(); //! Allocates memory blocks - //! aSize - bytes to allocate - Standard_EXPORT static Standard_Address Allocate (const Standard_Size aSize); + //! theSize - bytes to allocate + Standard_EXPORT static Standard_Address Allocate (const Standard_Size theSize); + + //! Allocates memory blocks + //! theSize - bytes to allocate + Standard_EXPORT static Standard_Address AllocateOptimal (const Standard_Size theSize); //! Deallocates memory blocks //! @param thePtr - previously allocated memory block to be freed @@ -51,9 +63,9 @@ public: } //! Reallocates memory blocks - //! aStorage - previously allocated memory block - //! aNewSize - new size in bytes - Standard_EXPORT static Standard_Address Reallocate (const Standard_Address aStorage, const Standard_Size aNewSize); + //! theStorage - previously allocated memory block + //! theNewSize - new size in bytes + Standard_EXPORT static Standard_Address Reallocate (const Standard_Address theStorage, const Standard_Size theNewSize); //! Allocates aligned memory blocks. //! Should be used with CPU instructions which require specific alignment. @@ -104,8 +116,4 @@ public: }; -// include definition of handle to make it always visible -// (put at the and of the file due to cyclic dependency between headers) -#include - #endif // _Standard_HeaderFile diff --git a/src/Standard/Standard_Address.hxx b/src/Standard/Standard_Address.hxx deleted file mode 100644 index 2919d451e9..0000000000 --- a/src/Standard/Standard_Address.hxx +++ /dev/null @@ -1,47 +0,0 @@ -// Copyright (c) 1998-1999 Matra Datavision -// Copyright (c) 1999-2014 OPEN CASCADE SAS -// -// This file is part of Open CASCADE Technology software library. -// -// This library is free software; you can redistribute it and/or modify it under -// the terms of the GNU Lesser General Public License version 2.1 as published -// by the Free Software Foundation, with special exception defined in the file -// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT -// distribution for complete text of the license and disclaimer of any warranty. -// -// Alternatively, this file may be used under the terms of Open CASCADE -// commercial license or contractual agreement. - -#ifndef _Standard_Address_HeaderFile -#define _Standard_Address_HeaderFile - -#include - -//! Returns a hash code of the given memory pointer -//! @param thePointer the memory pointer which hash code it to be computed -//! @param theUpperBound the upper bound of the range a resulting hash code must be within -//! @return a value of a computed hash code, in range [1, UpperBound] -inline Standard_Integer HashCode (const void* const thePointer, const Standard_Integer theUpperBound) -{ - union - { - const void* L; - Standard_Integer I[2]; - } U; - - U.I[0] = 0; - U.I[1] = 0; - U.L = thePointer; - - return HashCode (U.I[0] ^ U.I[1], theUpperBound); -} - -//============================================================================ -// IsEqual : Returns Standard_True if two CString have the same value -//============================================================================ - -inline Standard_Boolean IsEqual(const Standard_Address One - ,const Standard_Address Two) -{ return One == Two; } - -#endif diff --git a/src/Standard/Standard_CString.cxx b/src/Standard/Standard_CString.cxx index f73d6b6940..c62acd7a53 100755 --- a/src/Standard/Standard_CString.cxx +++ b/src/Standard/Standard_CString.cxx @@ -24,36 +24,6 @@ #include #include -//============================================================================ -// function : HashCode -// purpose : -//============================================================================ -Standard_Integer HashCode (const Standard_CString theString, const Standard_Integer theUpperBound) -{ - const Standard_Integer aLength = static_cast (strlen (theString)); - - return HashCode (theString, aLength, theUpperBound); -} - -//============================================================================ -// function : HashCodes -// purpose : -//============================================================================ -Standard_Integer HashCodes (const Standard_CString theString, const Standard_Integer theLength) -{ - // compute DJB2 hash of a string - unsigned int hash = 0; - const Standard_Character* c = theString; - - for (Standard_Integer i = 0; i < theLength; ++i, ++c) - { - /* hash = hash * 33 ^ c */ - hash = ((hash << 5) + hash) ^ (*c); - } - - return static_cast(hash); -} - //====================================================================== // Locale-independent equivalents of C functions dealing with conversion // of string to real and vice-versa @@ -89,13 +59,6 @@ Standard_Integer HashCodes (const Standard_CString theString, const Standard_Int #define vfprintf_l(theFile, theLocale, theFormat, theArgPtr) vfprintf(theFile, theFormat, theArgPtr) #endif -/* -double Strtod (const char* theStr, char** theNextPtr) -{ - return strtod_l (theStr, theNextPtr, Standard_CLocaleSentry::GetCLocale()); -} -*/ - double Atof (const char* theStr) { return Strtod (theStr, NULL); diff --git a/src/Standard/Standard_CString.hxx b/src/Standard/Standard_CString.hxx index 4f5b353618..0b05b7899b 100644 --- a/src/Standard/Standard_CString.hxx +++ b/src/Standard/Standard_CString.hxx @@ -36,33 +36,7 @@ // C++ only definitions #ifdef __cplusplus -#include - -//! Returns bounded hash code for the null-terminated string, in the range [1, theUpperBound] -//! @param theString the null-terminated string which hash code is to be computed -//! @param theUpperBound the upper bound of the range a computing hash code must be within -//! @return a computed hash code, in the range [1, theUpperBound] -Standard_EXPORT Standard_Integer HashCode (Standard_CString theString, Standard_Integer theUpperBound); - -//! Returns 32-bit hash code for the first theLen characters in the string theStr. -//! The result is unbound (may be not only positive, but also negative) -//! @param theString the string which hash code is to be computed -//! @param theLength the length of the given string -//! @return a computed hash code of the given string -Standard_EXPORT Standard_Integer HashCodes (Standard_CString theString, Standard_Integer theLength); - -//! Returns bounded hash code for the first theLength characters in the string theString, in the range [1, theUpperBound] -//! @param theString the string which hash code is to be computed -//! @param theLength the length of the initial substring of the given string which hash code is to be computed -//! @param theUpperBound the upper bound of the range a computing hash code must be within -//! @return a computed hash code of the given string -inline Standard_Integer HashCode (const Standard_CString theString, - const Standard_Integer theLength, - const Standard_Integer theUpperBound) -{ -// return (Abs( HashCodes( Value , Len ) ) % Upper ) + 1 ; - return HashCode (HashCodes (theString, theLength), theUpperBound); -} +#include //! Returns Standard_True if two strings are equal inline Standard_Boolean IsEqual (const Standard_CString theOne, const Standard_CString theTwo) diff --git a/src/Standard/Standard_CStringHasher.hxx b/src/Standard/Standard_CStringHasher.hxx new file mode 100644 index 0000000000..893e8d36a1 --- /dev/null +++ b/src/Standard/Standard_CStringHasher.hxx @@ -0,0 +1,45 @@ +// Copyright (c) 2023 OPEN CASCADE SAS +// +// This file is part of Open CASCADE Technology software library. +// +// This library is free software; you can redistribute it and/or modify it under +// the terms of the GNU Lesser General Public License version 2.1 as published +// by the Free Software Foundation, with special exception defined in the file +// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT +// distribution for complete text of the license and disclaimer of any warranty. +// +// Alternatively, this file may be used under the terms of Open CASCADE +// commercial license or contractual agreement. + +#ifndef _Standard_CStringHasher_HeaderFile +#define _Standard_CStringHasher_HeaderFile + +#include +#include +#include + +#include + +class Standard_CStringHasher +{ +public: + + size_t operator()(const Standard_CString& theString) const noexcept + { + const int aLen = static_cast(strlen(theString)); + if (aLen < 4) + { + return opencascade::FNVHash::hash_combine(*theString, aLen); + } + return opencascade::hashBytes(theString, aLen); + } + + bool operator()(const Standard_CString& theString1, + const Standard_CString& theString2) const noexcept + { + return strcmp(theString1, theString2) == 0; + } + +}; + +#endif diff --git a/src/Standard/Standard_ExtString.cxx b/src/Standard/Standard_ExtString.cxx deleted file mode 100644 index 94ca59fea3..0000000000 --- a/src/Standard/Standard_ExtString.cxx +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) 1998-1999 Matra Datavision -// Copyright (c) 1999-2014 OPEN CASCADE SAS -// -// This file is part of Open CASCADE Technology software library. -// -// This library is free software; you can redistribute it and/or modify it under -// the terms of the GNU Lesser General Public License version 2.1 as published -// by the Free Software Foundation, with special exception defined in the file -// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT -// distribution for complete text of the license and disclaimer of any warranty. -// -// Alternatively, this file may be used under the terms of Open CASCADE -// commercial license or contractual agreement. - -#include -#include - -//============================================================================ -// function : HashCode -// purpose : -//============================================================================ -Standard_Integer HashCode (const Standard_ExtString theExtString, const Standard_Integer theUpperBound) -{ - // compute SDBM hash of an ext string - unsigned int hash = 0; - - for (const Standard_ExtCharacter* c = theExtString; *c; ++c) - { - /* hash = hash * 33 ^ c */ - hash = (*c) + (hash << 6) + (hash << 16) - hash; - } - - return HashCode (hash, theUpperBound); -} diff --git a/src/Standard/Standard_ExtString.hxx b/src/Standard/Standard_ExtString.hxx deleted file mode 100644 index 2953de8912..0000000000 --- a/src/Standard/Standard_ExtString.hxx +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) 1998-1999 Matra Datavision -// Copyright (c) 1999-2014 OPEN CASCADE SAS -// -// This file is part of Open CASCADE Technology software library. -// -// This library is free software; you can redistribute it and/or modify it under -// the terms of the GNU Lesser General Public License version 2.1 as published -// by the Free Software Foundation, with special exception defined in the file -// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT -// distribution for complete text of the license and disclaimer of any warranty. -// -// Alternatively, this file may be used under the terms of Open CASCADE -// commercial license or contractual agreement. - -//============================================================================ -//==== Title: Standard_ExtString.hxx -//==== -//==== Implementation: This is a primitive type implementadef with typedef -//==== typedef short* Standard_ExtString; -//============================================================================ - -#ifndef _Standard_ExtString_HeaderFile -#define _Standard_ExtString_HeaderFile - -#include - -//! Computes a hash code for the given wide character string, in the range [1, theUpperBound] -//! @param theExtString the wide character string which hash code is to be computed -//! @param theUpperBound the upper bound of the range a computing hash code must be within -//! @return a computed hash code, in the range [1, theUpperBound] -Standard_EXPORT Standard_Integer HashCode (Standard_ExtString theExtString, Standard_Integer theUpperBound); - -#endif diff --git a/src/Standard/Standard_GUID.cxx b/src/Standard/Standard_GUID.cxx index 6383445f88..1f158e83c2 100644 --- a/src/Standard/Standard_GUID.cxx +++ b/src/Standard/Standard_GUID.cxx @@ -387,30 +387,3 @@ void Standard_GUID::ShallowDump(Standard_OStream& aStream) const ToCString(sguid); aStream << sguid; } - -//============================================================================ -// function : HashCode -// purpose : -//============================================================================ -Standard_Integer Standard_GUID::HashCode (const Standard_GUID& theGuid, const Standard_Integer theUpperBound) -{ - return theGuid.Hash (theUpperBound); -} - -Standard_Integer Standard_GUID::Hash(const Standard_Integer Upper) const -{ - if (Upper < 1){ - throw Standard_RangeError("Standard_GUID::Hash: Try to apply HashCode method with negative or null argument."); - } - - char sguid[Standard_GUID_SIZE_ALLOC]; - ToCString(sguid); - - return ::HashCode(sguid,Upper); -} - -Standard_Boolean Standard_GUID::IsEqual(const Standard_GUID& aGuid1,const Standard_GUID& aGuid2) -{ - return (aGuid1 == aGuid2); -} - diff --git a/src/Standard/Standard_GUID.hxx b/src/Standard/Standard_GUID.hxx index 148e511161..2d5a6109f2 100644 --- a/src/Standard/Standard_GUID.hxx +++ b/src/Standard/Standard_GUID.hxx @@ -104,32 +104,12 @@ void operator = (const Standard_UUID& uid) //! Check the format of a GUID string. //! It checks the size, the position of the '-' and the correct size of fields. Standard_EXPORT static Standard_Boolean CheckGUIDFormat (const Standard_CString aGuid); - - //! Hash function for GUID. - Standard_EXPORT Standard_Integer Hash (const Standard_Integer Upper) const; - - //! Computes a hash code for the given GUID of the Standard_Integer type, in the range [1, theUpperBound] - //! @param theGUID the GUID which hash code is to be computed - //! @param theUpperBound the upper bound of the range a computing hash code must be within - //! @return a computed hash code, in the range [1, theUpperBound] - Standard_EXPORT static Standard_Integer HashCode (const Standard_GUID& theGUID, Standard_Integer theUpperBound); - - //! Returns True when the two GUID are the same. - Standard_EXPORT static Standard_Boolean IsEqual (const Standard_GUID& string1, const Standard_GUID& string2); - - - - -protected: - - - + template + friend struct std::hash; private: - - Standard_Integer my32b; Standard_ExtCharacter my16b1; Standard_ExtCharacter my16b2; @@ -140,12 +120,38 @@ private: Standard_Byte my8b4; Standard_Byte my8b5; Standard_Byte my8b6; - - }; - +namespace std +{ + template <> + struct hash + { + size_t operator()(const Standard_GUID& theGUID) const noexcept + { + struct GUID + { + Standard_Integer my32b; + Standard_ExtCharacter my16b1; + Standard_ExtCharacter my16b2; + Standard_ExtCharacter my16b3; + Standard_Byte my8b1; + Standard_Byte my8b2; + Standard_Byte my8b3; + Standard_Byte my8b4; + Standard_Byte my8b5; + Standard_Byte my8b6; + }; + GUID aGUID{ theGUID.my32b, theGUID.my16b1, + theGUID.my16b2, theGUID.my16b3, + theGUID.my8b1, theGUID.my8b2, + theGUID.my8b3, theGUID.my8b4, + theGUID.my8b5, theGUID.my8b6 }; + return opencascade::hashBytes(&aGUID, sizeof(GUID)); + } + }; +} diff --git a/src/Standard/Standard_Handle.hxx b/src/Standard/Standard_Handle.hxx index 6c212951b3..db2d94319a 100644 --- a/src/Standard/Standard_Handle.hxx +++ b/src/Standard/Standard_Handle.hxx @@ -14,7 +14,6 @@ #ifndef _Standard_Handle_HeaderFile #define _Standard_Handle_HeaderFile -#include #include #include #include @@ -399,14 +398,18 @@ namespace opencascade { //! Define Handle() macro #define Handle(Class) opencascade::handle -//! Computes a hash code for the standard handle, in the range [1, theUpperBound] -//! @param theHandle the handle which hash code is to be computed -//! @param theUpperBound the upper bound of the range a computing hash code must be within -//! @return a computed hash code, in the range [1, theUpperBound] -template -Standard_Integer HashCode (const Handle (TheTransientType) & theHandle, const Standard_Integer theUpperBound) +#include + +namespace std { - return ::HashCode (theHandle.get(), theUpperBound); + template + struct hash + { + size_t operator()(const Handle(TheTransientType)& theHandle) const noexcept + { + return static_cast(reinterpret_cast(theHandle.get())); + } + }; } //! For compatibility with previous versions of OCCT, define Handle_Class alias for opencascade::handle. diff --git a/src/Standard/Standard_HashUtils.hxx b/src/Standard/Standard_HashUtils.hxx new file mode 100644 index 0000000000..40b613fcab --- /dev/null +++ b/src/Standard/Standard_HashUtils.hxx @@ -0,0 +1,120 @@ +// Copyright (c) 2023 OPEN CASCADE SAS +// +// This file is part of Open CASCADE Technology software library. +// +// This library is free software; you can redistribute it and/or modify it under +// the terms of the GNU Lesser General Public License version 2.1 as published +// by the Free Software Foundation, with special exception defined in the file +// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT +// distribution for complete text of the license and disclaimer of any warranty. +// +// Alternatively, this file may be used under the terms of Open CASCADE +// commercial license or contractual agreement. + +#ifndef _Standard_HashUtils_HeaderFile +#define _Standard_HashUtils_HeaderFile + +#include + +#include +#include +#include +#include + +namespace opencascade +{ + //! Implementation of Murmur hash with autodetect of sizeof(size_t). + //! + //! The default value for the seed is optimal for general cases at a certain hash size. + namespace MurmurHash + { + uint32_t MurmurHash2A(const void* theKey, int theLen, uint32_t theSeed); + uint64_t MurmurHash64A(const void* theKey, int theLen, uint64_t theSeed); + + template + typename std::enable_if::type + hash_combine(const T1& theValue, const int theLen = sizeof(T1), const T theSeed = 0xA329F1D3A586ULL) + { + return MurmurHash::MurmurHash64A(&theValue, theLen, theSeed); + } + + template + typename std::enable_if::type + hash_combine(const T1& theValue, const int theLen = sizeof(T1), const T theSeed = 0xc70f6907U) + { + return static_cast(MurmurHash::MurmurHash2A(&theValue, theLen, theSeed)); + } + + template + constexpr typename std::enable_if::type optimalSeed() + { + return 0xA329F1D3A586ULL; + } + + template + constexpr typename std::enable_if::type optimalSeed() + { + return static_cast(0xc70f6907U); + } + }; + + //! Implementation of FNV-1a with autodetect of sizeof(size_t). + //! This function should work on unsigned char, otherwise it does not + //! correctly implement the FNV-1a algorithm. + //! The existing behaviour is retained for backwards compatibility. + //! + //! The default value for the seed is optimal for general cases at a certain hash size. + namespace FNVHash + { + uint32_t FNVHash1A(const void* theKey, int theLen, uint32_t theSeed); + uint64_t FNVHash64A(const void* theKey, int theLen, uint64_t theSeed); + + template + static typename std::enable_if::type + hash_combine(const T1& theValue, const int theLen = sizeof(T1), const T theSeed = 14695981039346656037ULL) + { + return FNVHash::FNVHash64A(&theValue, theLen, theSeed); + } + + template + static typename std::enable_if::type + hash_combine(const T1& theValue, const int theLen = sizeof(T1), const T theSeed = 2166136261U) + { + return static_cast(FNVHash::FNVHash1A(&theValue, theLen, theSeed)); + } + + template + constexpr typename std::enable_if::type optimalSeed() + { + return 14695981039346656037ULL; + } + + template + constexpr typename std::enable_if::type optimalSeed() + { + return static_cast(2166136261U); + } + }; + + template + T hash(const T1 theValue) noexcept + { + return opencascade::MurmurHash::hash_combine(theValue); + } + + template + T hashBytes(const T1* theKey, int theLen) + { + return opencascade::MurmurHash::hash_combine(*theKey, theLen); + } + + template + T hash_combine(const T1 theValue, const int theLen, const T theSeed) + { + return opencascade::MurmurHash::hash_combine(theValue, theLen, theSeed); + } +} + +#include + +#endif diff --git a/src/Standard/Standard_HashUtils.lxx b/src/Standard/Standard_HashUtils.lxx new file mode 100644 index 0000000000..49834986d2 --- /dev/null +++ b/src/Standard/Standard_HashUtils.lxx @@ -0,0 +1,159 @@ +// Copyright (c) 2023 OPEN CASCADE SAS +// +// This file is part of Open CASCADE Technology software library. +// +// This library is free software; you can redistribute it and/or modify it under +// the terms of the GNU Lesser General Public License version 2.1 as published +// by the Free Software Foundation, with special exception defined in the file +// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT +// distribution for complete text of the license and disclaimer of any warranty. +// +// Alternatively, this file may be used under the terms of Open CASCADE +// commercial license or contractual agreement. + +#include + +namespace opencascade +{ +namespace MurmurHash +{ +namespace MurmurHashUtils +{ + inline uint64_t shift_mix(uint64_t theV) + { + return theV ^ (theV >> 47); + } + + // Loads n bytes, where 1 <= n < 8. + inline uint64_t load_bytes(const char* thePnt, int theNb) + { + uint64_t aRes = 0; + --theNb; + do + aRes = (aRes << 8) + static_cast(thePnt[theNb]); + while (--theNb >= 0); + return aRes; + } + template + inline T unaligned_load(const char* thePnt) + { + T aRes; + memcpy(&aRes, thePnt, sizeof(aRes)); + return aRes; + } +} + +//======================================================================= +//function : MurmurHash64A +//purpose : +//======================================================================= +inline uint64_t MurmurHash64A(const void* theKey, int theLen, uint64_t theSeed) +{ + static constexpr uint64_t aMul = (((uint64_t)0xc6a4a793UL) << 32UL) + + (uint64_t)0x5bd1e995UL; + const char* const aBuf = static_cast(theKey); + + // Remove the bytes not divisible by the sizeof(uint64_t). This + // allows the main loop to process the data as 64-bit integers. + const uint64_t aLenAligned = theLen & ~(uint64_t)0x7; + const char* const anEnd = aBuf + aLenAligned; + uint64_t aHash = theSeed ^ (theLen * aMul); + for (const char* aPnt = aBuf; aPnt != anEnd; aPnt += 8) + { + const uint64_t aData = MurmurHashUtils::shift_mix(MurmurHashUtils::unaligned_load(aPnt) * aMul) * aMul; + aHash ^= aData; + aHash *= aMul; + } + if ((theLen & 0x7) != 0) + { + const uint64_t data = MurmurHashUtils::load_bytes(anEnd, theLen & 0x7); + aHash ^= data; + aHash *= aMul; + } + aHash = MurmurHashUtils::shift_mix(aHash) * aMul; + aHash = MurmurHashUtils::shift_mix(aHash); + return aHash; +} + +//======================================================================= +//function : MurmurHash2A +//purpose : +//======================================================================= +inline uint32_t MurmurHash2A(const void* theKey, int theLen, uint32_t theSeed) +{ + const uint32_t aMul = 0x5bd1e995; + uint32_t aHash = theSeed ^ theLen; + const char* aBuf = static_cast(theKey); + + // Mix 4 bytes at a time into the hash. + while (theLen >= 4) + { + uint32_t aKey = MurmurHashUtils::unaligned_load(aBuf); + aKey *= aMul; + aKey ^= aKey >> 24; + aKey *= aMul; + aHash *= aMul; + aHash ^= aKey; + aBuf += 4; + theLen -= 4; + } + + uint32_t aKey; + // Handle the last few bytes of the input array. + switch (theLen) + { + case 3: + aKey = static_cast(aBuf[2]); + aHash ^= aKey << 16; + Standard_FALLTHROUGH + case 2: + aKey = static_cast(aBuf[1]); + aHash ^= aKey << 8; + Standard_FALLTHROUGH + case 1: + aKey = static_cast(aBuf[0]); + aHash ^= aKey; + aHash *= aMul; + }; + + // Do a few final mixes of the hash. + aHash ^= aHash >> 13; + aHash *= aMul; + aHash ^= aHash >> 15; + return aHash; +} +} // MurmurHash + +namespace FNVHash +{ +//======================================================================= +//function : FNVHash1A +//purpose : +//======================================================================= +inline uint32_t FNVHash1A(const void* theKey, int theLen, uint32_t theSeed) +{ + const char* cptr = static_cast(theKey); + for (; theLen; --theLen) + { + theSeed ^= static_cast(*cptr++); + theSeed *= static_cast(16777619UL); + } + return theSeed; +} + +//======================================================================= +//function : FNVHash64A +//purpose : +//======================================================================= +inline uint64_t FNVHash64A(const void* theKey, int theLen, uint64_t theSeed) +{ + const char* cptr = static_cast(theKey); + for (; theLen; --theLen) + { + theSeed ^= static_cast(*cptr++); + theSeed *= static_cast(1099511628211ULL); + } + return theSeed; +} +} // FNVHash +} // opencascade diff --git a/src/Standard/Standard_Integer.hxx b/src/Standard/Standard_Integer.hxx index 9858ce7f41..d629b87c06 100755 --- a/src/Standard/Standard_Integer.hxx +++ b/src/Standard/Standard_Integer.hxx @@ -17,7 +17,8 @@ #include #include -#include + +#include // =============== // Inline methods @@ -78,102 +79,19 @@ inline Standard_Integer Square(const Standard_Integer Value) // ------------------------------------------------------------------ // IntegerFirst : Returns the minimum value of an integer // ------------------------------------------------------------------ -inline Standard_Integer IntegerFirst() +constexpr Standard_Integer IntegerFirst() { return INT_MIN; } // ------------------------------------------------------------------ // IntegerLast : Returns the maximum value of an integer // ------------------------------------------------------------------ -inline Standard_Integer IntegerLast() +constexpr Standard_Integer IntegerLast() { return INT_MAX; } // ------------------------------------------------------------------ // IntegerSize : Returns the size in digits of an integer // ------------------------------------------------------------------ -inline Standard_Integer IntegerSize() -{ return BITS(Standard_Integer); } - - -//! Computes a hash code for the given value of some integer type, in range [1, theUpperBound] -//! @tparam TheInteger the type of the integer which hash code is to be computed -//! @param theValue the value of the TheInteger type which hash code is to be computed -//! @param theMask the mask for the last bits of the value that are used in the computation of a hash code -//! @param theUpperBound the upper bound of the range a computing hash code must be within -//! @return a computed hash code, in range [1, theUpperBound] -template -typename opencascade::std::enable_if::value, Standard_Integer>::type -IntegerHashCode (const TheInteger theValue, - const typename opencascade::disable_deduction::type theMask, - const Standard_Integer theUpperBound) -{ - return static_cast ((theValue & theMask) % theUpperBound + 1); -} - -//! Computes a hash code for the given value of the Standard_Integer type, in range [1, theUpperBound] -//! @param theValue the value of the Standard_Integer type which hash code is to be computed -//! @param theUpperBound the upper bound of the range a computing hash code must be within -//! @return a computed hash code, in range [1, theUpperBound] -inline Standard_Integer HashCode (const Standard_Integer theValue, - const Standard_Integer theUpperBound) -{ - // return (Abs (theMe) % theUpper) + 1; - return IntegerHashCode(theValue, IntegerLast(), theUpperBound); -} - -// ------------------------------------------------------------------ -// IsEqual : Returns Standard_True if two integers are equal -// ------------------------------------------------------------------ -inline Standard_Boolean IsEqual (const Standard_Integer theOne, - const Standard_Integer theTwo) -{ - return theOne == theTwo; -} - -//! Computes a hash value for the given unsigned integer, in range [1, theUpperBound] -//! @param theValue the unsigned integer which hash code is to be computed -//! @param theUpperBound the upper bound of the range a computing hash code must be within -//! @return a hash value computed for the given unsigned integer, in range [1, theUpperBound] -inline Standard_Integer HashCode (const unsigned int theValue, const Standard_Integer theUpperBound) -{ - return ::HashCode (static_cast (theValue), theUpperBound); -} - -//! Computes a hash code for the given value of the "long long int" type, in range [1, theUpperBound] -//! @param theValue the value of the "long long int" type which hash code is to be computed -//! @param theUpperBound the upper bound of the range a computing hash code must be within -//! @return a computed hash code, in range [1, theUpperBound] -inline Standard_Integer HashCode (const long long int theValue, const Standard_Integer theUpperBound) -{ - return IntegerHashCode(theValue, 0x7fffffffffffffff, theUpperBound); -} - -#if (defined(_LP64) || defined(__LP64__) || defined(_WIN64)) || defined(__APPLE__) - -//! Computes a hash code for the given value of the Standard_Utf32Char type, in the range [1, theUpperBound] -//! @tparam TheUtf32Char the type of the given value (it is Standard_Utf32Char, -//! and must not be the same as "unsigned int", because the overload of the HashCode function -//! for "unsigned int" type is already presented in Standard_Integer.hxx) -//! @param theValue the value of the Standard_Utf32Char type which hash code is to be computed -//! @param theUpperBound the upper bound of the range a computing hash code must be within -//! @return a computed hash code, in the range [1, theUpperBound] -template -typename opencascade::std::enable_if::value - && opencascade::std::is_same::value, - Standard_Integer>::type -HashCode (const TheUtf32Char theValue, const Standard_Integer theUpperBound) -{ - return IntegerHashCode (theValue, IntegerLast(), theUpperBound); -} - -// ------------------------------------------------------------------ -// IsEqual : Returns Standard_True if two integers are equal -// ------------------------------------------------------------------ -inline Standard_Boolean IsEqual (const Standard_Utf32Char theOne, - const Standard_Utf32Char theTwo) -{ - return theOne == theTwo; -} - -#endif +constexpr Standard_Integer IntegerSize() +{ return CHAR_BIT * sizeof(Standard_Integer); } #endif diff --git a/src/Standard/Standard_MMgrRaw.cxx b/src/Standard/Standard_MMgrRaw.cxx deleted file mode 100644 index 83ec139446..0000000000 --- a/src/Standard/Standard_MMgrRaw.cxx +++ /dev/null @@ -1,75 +0,0 @@ -// Created on: 2005-03-15 -// Created by: Peter KURNEV -// Copyright (c) 2005-2014 OPEN CASCADE SAS -// -// This file is part of Open CASCADE Technology software library. -// -// This library is free software; you can redistribute it and/or modify it under -// the terms of the GNU Lesser General Public License version 2.1 as published -// by the Free Software Foundation, with special exception defined in the file -// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT -// distribution for complete text of the license and disclaimer of any warranty. -// -// Alternatively, this file may be used under the terms of Open CASCADE -// commercial license or contractual agreement. - -#include -#include - -//======================================================================= -//function : Standard_MMgrRaw -//purpose : -//======================================================================= - -Standard_MMgrRaw::Standard_MMgrRaw(const Standard_Boolean aClear) -{ - myClear = aClear; -} - -//======================================================================= -//function : Allocate -//purpose : -//======================================================================= - -Standard_Address Standard_MMgrRaw::Allocate(const Standard_Size aSize) -{ - // the size is rounded up to 4 since some OCC classes - // (e.g. TCollection_AsciiString) assume memory to be double word-aligned - const Standard_Size aRoundSize = (aSize + 3) & ~0x3; - // we use ?: operator instead of if() since it is faster :-) - Standard_Address aPtr = ( myClear ? calloc(aRoundSize, sizeof(char)) : - malloc(aRoundSize) ); - if ( ! aPtr ) - throw Standard_OutOfMemory("Standard_MMgrRaw::Allocate(): malloc failed"); - return aPtr; -} - -//======================================================================= -//function : Free -//purpose : -//======================================================================= - -void Standard_MMgrRaw::Free(Standard_Address theStorage) -{ - free(theStorage); -} - -//======================================================================= -//function : Reallocate -//purpose : -//======================================================================= - -Standard_Address Standard_MMgrRaw::Reallocate(Standard_Address theStorage, - const Standard_Size theSize) -{ - // the size is rounded up to 4 since some OCC classes - // (e.g. TCollection_AsciiString) assume memory to be double word-aligned - const Standard_Size aRoundSize = (theSize + 3) & ~0x3; - Standard_Address newStorage = (Standard_Address)realloc(theStorage, aRoundSize); - if ( ! newStorage ) - throw Standard_OutOfMemory("Standard_MMgrRaw::Reallocate(): realloc failed"); - // Note that it is not possible to ensure that additional memory - // allocated by realloc will be cleared (so as to satisfy myClear mode); - // in order to do that we would need using memset... - return newStorage; -} diff --git a/src/Standard/Standard_MMgrRaw.hxx b/src/Standard/Standard_MMgrRaw.hxx deleted file mode 100644 index f301372b2d..0000000000 --- a/src/Standard/Standard_MMgrRaw.hxx +++ /dev/null @@ -1,49 +0,0 @@ -// Created on: 2005-03-15 -// Created by: Peter KURNEV -// Copyright (c) 2005-2014 OPEN CASCADE SAS -// -// This file is part of Open CASCADE Technology software library. -// -// This library is free software; you can redistribute it and/or modify it under -// the terms of the GNU Lesser General Public License version 2.1 as published -// by the Free Software Foundation, with special exception defined in the file -// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT -// distribution for complete text of the license and disclaimer of any warranty. -// -// Alternatively, this file may be used under the terms of Open CASCADE -// commercial license or contractual agreement. - -#ifndef _Standard_MMgrRaw_HeaderFile -#define _Standard_MMgrRaw_HeaderFile - -#include - -/** -* Implementation of raw OCC memory manager which uses standard C -* functions: malloc (or calloc), free and realloc -* without any optimization -*/ - -class Standard_MMgrRaw : public Standard_MMgrRoot -{ - public: - //! Constructor; if aClear is True, the memory will be nullified - //! upon allocation. - Standard_EXPORT Standard_MMgrRaw(const Standard_Boolean aClear=Standard_False); - - //! Allocate aSize bytes - Standard_EXPORT virtual Standard_Address Allocate(const Standard_Size aSize); - - //! Reallocate aPtr to the size aSize. - //! The new pointer is returned. - Standard_EXPORT virtual Standard_Address Reallocate(Standard_Address thePtr, - const Standard_Size theSize); - - //! Free allocated memory. The pointer is nullified. - Standard_EXPORT virtual void Free (Standard_Address thePtr); - - protected: - Standard_Boolean myClear; //! Option to nullify allocated memory -}; - -#endif diff --git a/src/Standard/Standard_MMgrTBBalloc.cxx b/src/Standard/Standard_MMgrTBBalloc.cxx deleted file mode 100644 index 8c7a2df17a..0000000000 --- a/src/Standard/Standard_MMgrTBBalloc.cxx +++ /dev/null @@ -1,87 +0,0 @@ -// Created on: 2010-03-15 -// Created by: Sergey KUUL -// Copyright (c) 2010-2014 OPEN CASCADE SAS -// -// This file is part of Open CASCADE Technology software library. -// -// This library is free software; you can redistribute it and/or modify it under -// the terms of the GNU Lesser General Public License version 2.1 as published -// by the Free Software Foundation, with special exception defined in the file -// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT -// distribution for complete text of the license and disclaimer of any warranty. -// -// Alternatively, this file may be used under the terms of Open CASCADE -// commercial license or contractual agreement. - -#include -#include - -// paralleling with Intel TBB -#ifdef HAVE_TBB -#pragma comment (lib, "tbbmalloc.lib") -#include -using namespace tbb; -#else -#define scalable_malloc malloc -#define scalable_calloc calloc -#define scalable_realloc realloc -#define scalable_free free -#endif - -//======================================================================= -//function : Standard_MMgrTBBalloc -//purpose : -//======================================================================= - -Standard_MMgrTBBalloc::Standard_MMgrTBBalloc(const Standard_Boolean aClear) -{ - myClear = aClear; -} - -//======================================================================= -//function : Allocate -//purpose : -//======================================================================= - -Standard_Address Standard_MMgrTBBalloc::Allocate(const Standard_Size aSize) -{ - // the size is rounded up to 4 since some OCC classes - // (e.g. TCollection_AsciiString) assume memory to be double word-aligned - const Standard_Size aRoundSize = (aSize + 3) & ~0x3; - // we use ?: operator instead of if() since it is faster :-) - Standard_Address aPtr = ( myClear ? scalable_calloc(aRoundSize, sizeof(char)) : - scalable_malloc(aRoundSize) ); - if ( ! aPtr ) - throw Standard_OutOfMemory("Standard_MMgrTBBalloc::Allocate(): malloc failed"); - return aPtr; -} - -//======================================================================= -//function : Free -//purpose : -//======================================================================= - -void Standard_MMgrTBBalloc::Free (Standard_Address theStorage) -{ - scalable_free (theStorage); -} - -//======================================================================= -//function : Reallocate -//purpose : -//======================================================================= - -Standard_Address Standard_MMgrTBBalloc::Reallocate (Standard_Address theStorage, - const Standard_Size theSize) -{ - // the size is rounded up to 4 since some OCC classes - // (e.g. TCollection_AsciiString) assume memory to be double word-aligned - const Standard_Size aRoundSize = (theSize + 3) & ~0x3; - Standard_Address newStorage = (Standard_Address)scalable_realloc(theStorage, aRoundSize); - if ( ! newStorage ) - throw Standard_OutOfMemory("Standard_MMgrTBBalloc::Reallocate(): realloc failed"); - // Note that it is not possible to ensure that additional memory - // allocated by realloc will be cleared (so as to satisfy myClear mode); - // in order to do that we would need using memset... - return newStorage; -} diff --git a/src/Standard/Standard_MMgrTBBalloc.hxx b/src/Standard/Standard_MMgrTBBalloc.hxx deleted file mode 100644 index 3c6ce08546..0000000000 --- a/src/Standard/Standard_MMgrTBBalloc.hxx +++ /dev/null @@ -1,50 +0,0 @@ -// Created on: 2010-03-15 -// Created by: Sergey KUUL -// Copyright (c) 2010-2014 OPEN CASCADE SAS -// -// This file is part of Open CASCADE Technology software library. -// -// This library is free software; you can redistribute it and/or modify it under -// the terms of the GNU Lesser General Public License version 2.1 as published -// by the Free Software Foundation, with special exception defined in the file -// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT -// distribution for complete text of the license and disclaimer of any warranty. -// -// Alternatively, this file may be used under the terms of Open CASCADE -// commercial license or contractual agreement. - -#ifndef _Standard_MMgrTBBalloc_HeaderFile -#define _Standard_MMgrTBBalloc_HeaderFile - -#include - -//! -//! Implementation of OCC memory manager which uses Intel TBB -//! scalable allocator. -//! -//! On configurations where TBB is not available standard RTL functions -//! malloc() / free() are used. - -class Standard_MMgrTBBalloc : public Standard_MMgrRoot -{ - public: - //! Constructor; if aClear is True, the memory will be nullified - //! upon allocation. - Standard_EXPORT Standard_MMgrTBBalloc(const Standard_Boolean aClear=Standard_False); - - //! Allocate aSize bytes - Standard_EXPORT virtual Standard_Address Allocate(const Standard_Size aSize); - - //! Reallocate aPtr to the size aSize. - //! The new pointer is returned. - Standard_EXPORT virtual Standard_Address Reallocate (Standard_Address thePtr, - const Standard_Size theSize); - - //! Free allocated memory - Standard_EXPORT virtual void Free (Standard_Address thePtr); - - protected: - Standard_Boolean myClear; //! Option to nullify allocated memory -}; - -#endif diff --git a/src/Standard/Standard_MemoryUtils.hxx b/src/Standard/Standard_MemoryUtils.hxx new file mode 100644 index 0000000000..21a5622c41 --- /dev/null +++ b/src/Standard/Standard_MemoryUtils.hxx @@ -0,0 +1,62 @@ +// Copyright (c) 2023 OPEN CASCADE SAS +// +// This file is part of Open CASCADE Technology software library. +// +// This library is free software; you can redistribute it and/or modify it under +// the terms of the GNU Lesser General Public License version 2.1 as published +// by the Free Software Foundation, with special exception defined in the file +// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT +// distribution for complete text of the license and disclaimer of any warranty. +// +// Alternatively, this file may be used under the terms of Open CASCADE +// commercial license or contractual agreement. + +#ifndef _Standard_MemoryUtils_HeaderFile +#define _Standard_MemoryUtils_HeaderFile + +#include +#include + +#include + +namespace opencascade +{ + template< class T, class... Args > + std::shared_ptr make_shared(Args&&... theArgs) + { + return std::allocate_shared, Args...>(NCollection_Allocator(), + std::forward(theArgs)...); + } + + template< class T, class... Args > + std::shared_ptr make_oshared(const Handle(NCollection_BaseAllocator)& theAlloc, + Args&&... theArgs) + { + return std::allocate_shared, Args...>(NCollection_OccAllocator(theAlloc), + std::forward(theArgs)...); + } + + template< class T, class... Args > + std::shared_ptr make_oshared(const NCollection_OccAllocator& theAlloc, + Args&&... theArgs) + { + return std::allocate_shared, Args...>(theAlloc, + std::forward(theArgs)...); + } + + template< class T, class... Args > + std::shared_ptr make_oshared(NCollection_OccAllocator&& theAlloc, + Args&&... theArgs) + { + return std::allocate_shared, Args...>(std::forward(>theAlloc), + std::forward(theArgs)...); + } + + template + std::unique_ptr make_unique(Args&&... theArgs) + { + return std::unique_ptr(new T(std::forward(theArgs)...)); + } +} + +#endif diff --git a/src/Standard/Standard_PrimitiveTypes.hxx b/src/Standard/Standard_PrimitiveTypes.hxx index 96393da3b2..bef7be9099 100644 --- a/src/Standard/Standard_PrimitiveTypes.hxx +++ b/src/Standard/Standard_PrimitiveTypes.hxx @@ -26,7 +26,5 @@ #include #include #include -#include -#include #endif diff --git a/src/Standard/Standard_Real.cxx b/src/Standard/Standard_Real.cxx index f43762aeed..51721d48d7 100644 --- a/src/Standard/Standard_Real.cxx +++ b/src/Standard/Standard_Real.cxx @@ -20,28 +20,6 @@ static const Standard_Real ACosLimit = 1. + Epsilon(1.); -//============================================================================ -// function : HashCode -// purpose : -//============================================================================ -Standard_Integer HashCode (const Standard_Real theReal, const Standard_Integer theUpperBound) -{ - if (theUpperBound < 1) - { - throw Standard_RangeError ("Try to apply HashCode method with negative or null argument."); - } - union - { - Standard_Real R; - Standard_Integer I[2]; - } U; - - // U.R = Abs(me); // Treat me = -0.0 ADN 27/11/97 - U.R = theReal; - - return HashCode (U.I[0] ^ U.I[1], theUpperBound); -} - //------------------------------------------------------------------- // ACos : Returns the value of the arc cosine of a real //------------------------------------------------------------------- diff --git a/src/Standard/Standard_Real.hxx b/src/Standard/Standard_Real.hxx index 43a95d717d..f185568f51 100644 --- a/src/Standard/Standard_Real.hxx +++ b/src/Standard/Standard_Real.hxx @@ -16,9 +16,16 @@ #define _Standard_Real_HeaderFile #include +#include #include -#include -#include + +#ifdef _MSC_VER +#ifndef _USE_MATH_DEFINES +#define _USE_MATH_DEFINES +#endif +#include +#endif + #include // =============================================== @@ -31,12 +38,6 @@ // Methods implemented in Standard_Real.cxx // ================================== -//! Computes a hash code for the given real, in the range [1, theUpperBound] -//! @param theReal the real value which hash code is to be computed -//! @param theUpperBound the upper bound of the range a computing hash code must be within -//! @return a computed hash code, in the range [1, theUpperBound] -Standard_EXPORT Standard_Integer HashCode (Standard_Real theReal, Standard_Integer theUpperBound); - Standard_EXPORT Standard_Real ACos (const Standard_Real ); Standard_EXPORT Standard_Real ACosApprox (const Standard_Real ); Standard_EXPORT Standard_Real ASin (const Standard_Real ); @@ -56,7 +57,7 @@ Standard_EXPORT Standard_Real Sqrt (const Standard_Real ); //------------------------------------------------------------------- // RealSmall : Returns the smallest positive real //------------------------------------------------------------------- -inline Standard_Real RealSmall() +constexpr Standard_Real RealSmall() { return DBL_MIN; } //------------------------------------------------------------------- @@ -84,60 +85,60 @@ inline Standard_Boolean IsEqual (const Standard_Real Value1, //------------------------------------------------------------------- // RealDigit : Returns the number of digits of precision in a real //------------------------------------------------------------------- -inline Standard_Integer RealDigits() +constexpr Standard_Integer RealDigits() { return DBL_DIG; } //------------------------------------------------------------------- // RealEpsilon : Returns the minimum positive real such that // 1.0 + x is not equal to 1.0 //------------------------------------------------------------------- -inline Standard_Real RealEpsilon() +constexpr Standard_Real RealEpsilon() { return DBL_EPSILON; } //------------------------------------------------------------------- // RealFirst : Returns the minimum negative value of a real //------------------------------------------------------------------- -inline Standard_Real RealFirst() +constexpr Standard_Real RealFirst() { return -DBL_MAX; } //------------------------------------------------------------------- // RealFirst10Exp : Returns the minimum value of exponent(base 10) of // a real. //------------------------------------------------------------------- -inline Standard_Integer RealFirst10Exp() +constexpr Standard_Integer RealFirst10Exp() { return DBL_MIN_10_EXP; } //------------------------------------------------------------------- // RealLast : Returns the maximum value of a real //------------------------------------------------------------------- -inline Standard_Real RealLast() +constexpr Standard_Real RealLast() { return DBL_MAX; } //------------------------------------------------------------------- // RealLast10Exp : Returns the maximum value of exponent(base 10) of // a real. //------------------------------------------------------------------- -inline Standard_Integer RealLast10Exp() +constexpr Standard_Integer RealLast10Exp() { return DBL_MAX_10_EXP; } //------------------------------------------------------------------- // RealMantissa : Returns the size in bits of the matissa part of a // real. //------------------------------------------------------------------- -inline Standard_Integer RealMantissa() +constexpr Standard_Integer RealMantissa() { return DBL_MANT_DIG; } //------------------------------------------------------------------- // RealRadix : Returns the radix of exponent representation //------------------------------------------------------------------- -inline Standard_Integer RealRadix() +constexpr Standard_Integer RealRadix() { return FLT_RADIX; } //------------------------------------------------------------------- // RealSize : Returns the size in bits of an integer //------------------------------------------------------------------- -inline Standard_Integer RealSize() -{ return BITS(Standard_Real); } +constexpr Standard_Integer RealSize() +{ return CHAR_BIT * sizeof(Standard_Real); } diff --git a/src/Standard/Standard_ShortReal.cxx b/src/Standard/Standard_ShortReal.cxx deleted file mode 100644 index f3c123e13c..0000000000 --- a/src/Standard/Standard_ShortReal.cxx +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) 1998-1999 Matra Datavision -// Copyright (c) 1999-2014 OPEN CASCADE SAS -// -// This file is part of Open CASCADE Technology software library. -// -// This library is free software; you can redistribute it and/or modify it under -// the terms of the GNU Lesser General Public License version 2.1 as published -// by the Free Software Foundation, with special exception defined in the file -// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT -// distribution for complete text of the license and disclaimer of any warranty. -// -// Alternatively, this file may be used under the terms of Open CASCADE -// commercial license or contractual agreement. - -#include -#include - -//============================================================================ -// function : HashCode -// purpose : -//============================================================================ -Standard_Integer HashCode (const Standard_ShortReal theShortReal, const Standard_Integer theUpperBound) -{ - if (theUpperBound < 1) - { - throw Standard_RangeError ("Try to apply HashCode method with negative or null argument."); - } - union - { - Standard_ShortReal R; - Standard_Integer I; - } U; - U.R = theShortReal; - - return HashCode (U.I, theUpperBound); -} diff --git a/src/Standard/Standard_ShortReal.hxx b/src/Standard/Standard_ShortReal.hxx index 81d07405eb..34230ca469 100644 --- a/src/Standard/Standard_ShortReal.hxx +++ b/src/Standard/Standard_ShortReal.hxx @@ -16,9 +16,9 @@ #define _Standard_ShortReal_HeaderFile #include +#include #include -#include #include // *********************************** // @@ -31,7 +31,7 @@ //------------------------------------------------------------------- // ShortRealSmall : Returns the smallest positive ShortReal //------------------------------------------------------------------- -inline Standard_ShortReal ShortRealSmall() +constexpr Standard_ShortReal ShortRealSmall() { return FLT_MIN; } //------------------------------------------------------------------- @@ -47,14 +47,14 @@ inline Standard_ShortReal Abs(const Standard_ShortReal Value) //------------------------------------------------------------------- // ShortRealDigit : Returns the number of digits of precision in a ShortReal //------------------------------------------------------------------- -inline Standard_Integer ShortRealDigits() +constexpr Standard_Integer ShortRealDigits() { return FLT_DIG; } //------------------------------------------------------------------- // ShortRealEpsilon : Returns the minimum positive ShortReal such that // 1.0 + x is not equal to 1.0 //------------------------------------------------------------------- -inline Standard_ShortReal ShortRealEpsilon() +constexpr Standard_ShortReal ShortRealEpsilon() { return FLT_EPSILON; } //------------------------------------------------------------------- @@ -68,40 +68,40 @@ inline Standard_ShortReal ShortRealFirst() // ShortRealFirst10Exp : Returns the minimum value of exponent(base 10) of // a ShortReal. //------------------------------------------------------------------- -inline Standard_Integer ShortRealFirst10Exp() +constexpr Standard_Integer ShortRealFirst10Exp() { return FLT_MIN_10_EXP; } //------------------------------------------------------------------- // ShortRealLast : Returns the maximum value of a ShortReal //------------------------------------------------------------------- -inline Standard_ShortReal ShortRealLast() +constexpr Standard_ShortReal ShortRealLast() { return FLT_MAX; } //------------------------------------------------------------------- // ShortRealLast10Exp : Returns the maximum value of exponent(base 10) of // a ShortReal. //------------------------------------------------------------------- -inline Standard_Integer ShortRealLast10Exp() +constexpr Standard_Integer ShortRealLast10Exp() { return FLT_MAX_10_EXP; } //------------------------------------------------------------------- // ShortRealMantissa : Returns the size in bits of the matissa part of a // ShortReal. //------------------------------------------------------------------- -inline Standard_Integer ShortRealMantissa() +constexpr Standard_Integer ShortRealMantissa() { return FLT_MANT_DIG; } //------------------------------------------------------------------- // ShortRealRadix : Returns the radix of exponent representation //------------------------------------------------------------------- -inline Standard_Integer ShortRealRadix() +constexpr Standard_Integer ShortRealRadix() { return FLT_RADIX; } //------------------------------------------------------------------- // ShortRealSize : Returns the size in bits of an integer //------------------------------------------------------------------- -inline Standard_Integer ShortRealSize() -{ return BITS(Standard_ShortReal); } +constexpr Standard_Integer ShortRealSize() +{ return CHAR_BIT * sizeof(Standard_ShortReal); } //------------------------------------------------------------------- // Max : Returns the maximum value of two ShortReals @@ -129,29 +129,6 @@ inline Standard_ShortReal Min (const Standard_ShortReal Val1, } } -// =============================================== -// Methods from Standard_Entity class which are redefined: -// - Hascode -// - IsEqual -// =============================================== - -// ================================== -// Methods implemented in Standard_ShortReal.cxx -// ================================== - -//! Computes a hash code for the given short real, in the range [1, theUpperBound] -//! @param theShortReal the short real value which hash code is to be computed -//! @param theUpperBound the upper bound of the range a computing hash code must be within -//! @return a computed hash code, in the range [1, theUpperBound] -Standard_EXPORT Standard_Integer HashCode (Standard_ShortReal theShortReal, Standard_Integer theUpperBound); - -//------------------------------------------------------------------- -// IsEqual : Returns Standard_True if two ShortReals are equal -//------------------------------------------------------------------- -inline Standard_Boolean IsEqual (const Standard_ShortReal Value1, - const Standard_ShortReal Value2) -{ return Abs((Value1 - Value2)) < ShortRealSmall(); } - #endif diff --git a/src/Standard/Standard_Size.hxx b/src/Standard/Standard_Size.hxx deleted file mode 100644 index e8d8e8d4ef..0000000000 --- a/src/Standard/Standard_Size.hxx +++ /dev/null @@ -1,54 +0,0 @@ -// Created on: 2006-08-22 -// Created by: Alexander GRIGORIEV -// Copyright (c) 2006-2014 OPEN CASCADE SAS -// -// This file is part of Open CASCADE Technology software library. -// -// This library is free software; you can redistribute it and/or modify it under -// the terms of the GNU Lesser General Public License version 2.1 as published -// by the Free Software Foundation, with special exception defined in the file -// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT -// distribution for complete text of the license and disclaimer of any warranty. -// -// Alternatively, this file may be used under the terms of Open CASCADE -// commercial license or contractual agreement. - -#ifndef _Standard_Size_HeaderFile -#define _Standard_Size_HeaderFile - -#include - -// msv 26.05.2009: add HashCode and IsEqual functions - -//! Computes a hash code for the given value of the Standard_Size type, in the range [1, theUpperBound] -//! @tparam TheSize the type of the given value (it is Standard_Size, -//! and must not be the same as "unsigned int", because the overload of the HashCode function -//! for "unsigned int" type is already presented in Standard_Integer.hxx) -//! @param theValue the value of the Standard_Size type which hash code is to be computed -//! @param theUpperBound the upper bound of the range a computing hash code must be within -//! @return a computed hash code, in the range [1, theUpperBound] -template -typename opencascade::std::enable_if::value - && opencascade::std::is_same::value, - Standard_Integer>::type -HashCode (const TheSize theValue, const Standard_Integer theUpperBound) -{ - Standard_Size aKey = ~theValue + (theValue << 18); - aKey ^= (aKey >> 31); - aKey *= 21; - aKey ^= (aKey >> 11); - aKey += (aKey << 6); - aKey ^= (aKey >> 22); - return IntegerHashCode(aKey, IntegerLast(), theUpperBound); -} - -// ------------------------------------------------------------------ -// IsEqual : Returns Standard_True if two values are equal -// ------------------------------------------------------------------ -inline Standard_Boolean IsEqual(const Standard_Size One, - const Standard_Size Two) -{ - return One == Two; -} - -#endif diff --git a/src/Standard/Standard_ThreadId.hxx b/src/Standard/Standard_ThreadId.hxx index b4d06260ee..9cdd9a4765 100644 --- a/src/Standard/Standard_ThreadId.hxx +++ b/src/Standard/Standard_ThreadId.hxx @@ -16,7 +16,6 @@ #ifndef Standard_ThreadId_HeaderFile #define Standard_ThreadId_HeaderFile -#include // Platform-independent definition of the thread identifier type typedef Standard_Size Standard_ThreadId; diff --git a/src/Standard/Standard_Transient.cxx b/src/Standard/Standard_Transient.cxx index 09455a9278..fa71956bfa 100644 --- a/src/Standard/Standard_Transient.cxx +++ b/src/Standard/Standard_Transient.cxx @@ -1,5 +1,5 @@ // Copyright (c) 1998-1999 Matra Datavision -// Copyright (c) 1999-2014 OPEN CASCADE SAS +// Copyright (c) 1999-2023 OPEN CASCADE SAS // // This file is part of Open CASCADE Technology software library. // @@ -12,17 +12,12 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -#include #include -#include + +#include #include #include -void Standard_Transient::Delete() const -{ - delete this; -} - const Handle(Standard_Type)& Standard_Transient::get_type_descriptor () { return opencascade::type_instance::get(); @@ -71,15 +66,3 @@ Standard_Transient* Standard_Transient::This() const throw Standard_ProgramError("Attempt to create handle to object created in stack, not yet constructed, or destroyed"); return const_cast (this); } - -// Increment reference counter -void Standard_Transient::IncrementRefCounter() const -{ - Standard_Atomic_Increment (&myRefCount_); -} - -// Decrement reference counter -Standard_Integer Standard_Transient::DecrementRefCounter() const -{ - return Standard_Atomic_Decrement(&myRefCount_); -} diff --git a/src/Standard/Standard_Transient.hxx b/src/Standard/Standard_Transient.hxx index dd0f58dad1..024c631d27 100644 --- a/src/Standard/Standard_Transient.hxx +++ b/src/Standard/Standard_Transient.hxx @@ -1,5 +1,5 @@ // Copyright (c) 1998-1999 Matra Datavision -// Copyright (c) 1999-2014 OPEN CASCADE SAS +// Copyright (c) 1999-2023 OPEN CASCADE SAS // // This file is part of Open CASCADE Technology software library. // @@ -19,9 +19,12 @@ #include #include +#include + class Standard_Type; -namespace opencascade { +namespace opencascade +{ template class handle; } @@ -48,15 +51,12 @@ public: //! Destructor must be virtual virtual ~Standard_Transient() {} - //! Memory deallocator for transient classes - Standard_EXPORT virtual void Delete() const; - public: //!@name Support of run-time type information (RTTI) typedef void base_type; - static const char* get_type_name () { return "Standard_Transient"; } + static constexpr const char* get_type_name () { return "Standard_Transient"; } //! Returns type descriptor of Standard_Transient class Standard_EXPORT static const opencascade::handle& get_type_descriptor (); @@ -90,34 +90,35 @@ public: //!@name Reference counting, for use by handle<> //! Get the reference counter of this object - Standard_Integer GetRefCount() const { return myRefCount_; } + inline Standard_Integer GetRefCount() const noexcept { return myRefCount_; } //! Increments the reference counter of this object - Standard_EXPORT void IncrementRefCounter() const; + inline void IncrementRefCounter() noexcept + { + myRefCount_.operator++(); + } //! Decrements the reference counter of this object; //! returns the decremented value - Standard_EXPORT Standard_Integer DecrementRefCounter() const; + inline Standard_Integer DecrementRefCounter() noexcept + { + return myRefCount_.operator--(); + } + + //! Memory deallocator for transient classes + virtual void Delete() const + { + delete this; + } private: //! Reference counter. //! Note use of underscore, aimed to reduce probability //! of conflict with names of members of derived classes. - mutable volatile Standard_Integer myRefCount_; + std::atomic_int myRefCount_; }; - -//! Computes a hash code for the given transient object, in the range [1, theUpperBound] -//! @param theTransientObject the transient object which hash code is to be computed -//! @param theUpperBound the upper bound of the range a computing hash code must be within -//! @return a computed hash code, in the range [1, theUpperBound] -inline Standard_Integer HashCode (const Standard_Transient* const theTransientObject, - const Standard_Integer theUpperBound) -{ - return ::HashCode (static_cast (theTransientObject), theUpperBound); -} - //! Definition of Handle_Standard_Transient as typedef for compatibility typedef opencascade::handle Handle_Standard_Transient; diff --git a/src/Standard/Standard_Type.cxx b/src/Standard/Standard_Type.cxx index 546cbafa85..6321deab29 100644 --- a/src/Standard/Standard_Type.cxx +++ b/src/Standard/Standard_Type.cxx @@ -15,29 +15,20 @@ #include #include +#include -#include +#include IMPLEMENT_STANDARD_RTTIEXT(Standard_Type,Standard_Transient) //============================================================================ -namespace { -static Standard_CString copy_string (const char* theString) -{ - size_t aLength = strlen (theString); - char* aResult = static_cast (Standard::Allocate (aLength + 1)); - strncpy (aResult, theString, aLength + 1); //including null-character - return aResult; -} -} - -Standard_Type::Standard_Type (const char* theSystemName, +Standard_Type::Standard_Type (const std::type_info& theInfo, const char* theName, Standard_Size theSize, const Handle(Standard_Type)& theParent) : - mySystemName(copy_string (theSystemName)), - myName(copy_string (theName)), + myInfo(theInfo), + myName(theName), mySize(theSize), myParent(theParent) { @@ -70,25 +61,8 @@ void Standard_Type::Print (Standard_OStream& AStream) const //============================================================================ namespace { - // Value-based hasher for plain C string (char*) - struct CStringHasher - { - //! Computes a hash code of the given Standard_CString, in the range [1, theUpperBound] - //! @param theKey the key which hash code is to be computed - //! @param theUpperBound the upper bound of the range a computing hash code must be within - //! @return a computed hash code, in the range [1, theUpperBound] - static Standard_Integer HashCode (const Standard_CString& theKey, const Standard_Integer theUpperBound) - { - return ::HashCode (theKey, theUpperBound); - } - static bool IsEqual (const Standard_CString& theKey1, const Standard_CString& theKey2) - { - return ! strcmp (theKey1, theKey2); - } - }; - // Map of string to type - typedef NCollection_DataMap registry_type; + typedef std::unordered_map registry_type; // Registry is made static in the function to ensure that it gets // initialized by the time of first access @@ -102,7 +76,7 @@ namespace { Handle(Standard_Type) theType = STANDARD_TYPE(Standard_Transient); } -Standard_Type* Standard_Type::Register (const char* theSystemName, const char* theName, +Standard_Type* Standard_Type::Register (const std::type_info& theInfo, const char* theName, Standard_Size theSize, const Handle(Standard_Type)& theParent) { // Access to registry is protected by mutex; it should not happen often because @@ -113,17 +87,15 @@ Standard_Type* Standard_Type::Register (const char* theSystemName, const char* t // return existing descriptor if already in the registry registry_type& aRegistry = GetRegistry(); Standard_Type* aType = 0; - if (aRegistry.Find (theSystemName, aType)) - return aType; + auto anIter = aRegistry.find(theInfo); + if (anIter != aRegistry.end()) + return anIter->second; // else create a new descriptor - aType = new Standard_Type (theSystemName, theName, theSize, theParent); + aType = new Standard_Type (theInfo, theName, theSize, theParent); // then add it to registry and return (the reference to the handle stored in the registry) - aRegistry.Bind (aType->mySystemName, aType); - -// std::cout << "Registering " << theSystemName << ": " << aRegistry.Extent() << std::endl; - + aRegistry.emplace(theInfo, aType); return aType; } @@ -131,9 +103,5 @@ Standard_Type::~Standard_Type () { // remove descriptor from the registry registry_type& aRegistry = GetRegistry(); - Standard_ASSERT(aRegistry.UnBind (mySystemName), "Standard_Type::~Standard_Type() cannot find itself in registry",); - -// std::cout << "Unregistering " << mySystemName << ": " << aRegistry.Extent() << std::endl; - Standard::Free (mySystemName); - Standard::Free (myName); + Standard_ASSERT(aRegistry.erase(myInfo) > 0, "Standard_Type::~Standard_Type() cannot find itself in registry",); } diff --git a/src/Standard/Standard_Type.hxx b/src/Standard/Standard_Type.hxx index 65b6826a81..6608b757e9 100644 --- a/src/Standard/Standard_Type.hxx +++ b/src/Standard/Standard_Type.hxx @@ -21,6 +21,7 @@ #include #include +#include // Auxiliary tools to check at compile time that class declared as base in // DEFINE_STANDARD_RTTI* macro is actually a base class. @@ -146,7 +147,7 @@ class Standard_Type : public Standard_Transient public: //! Returns the system type name of the class (typeinfo.name) - Standard_CString SystemName() const { return mySystemName; } + Standard_CString SystemName() const { return myInfo.name(); } //! Returns the given name of the class type (get_type_name) Standard_CString Name() const { return myName; } @@ -181,14 +182,14 @@ public: //! Register a type; returns either new or existing descriptor. //! - //! @param theSystemName name of the class as returned by typeid(class).name() + //! @param theInfo object stores system name of the class //! @param theName name of the class to be stored in Name field //! @param theSize size of the class instance //! @param theParent base class in the Transient hierarchy //! //! Note that this function is intended for use by opencascade::type_instance only. Standard_EXPORT static - Standard_Type* Register (const char* theSystemName, const char* theName, + Standard_Type* Register (const std::type_info& theInfo, const char* theName, Standard_Size theSize, const Handle(Standard_Type)& theParent); //! Destructor removes the type from the registry @@ -200,11 +201,11 @@ public: private: //! Constructor is private - Standard_Type (const char* theSystemName, const char* theName, + Standard_Type (const std::type_info& theInfo, const char* theName, Standard_Size theSize, const Handle(Standard_Type)& theParent); private: - Standard_CString mySystemName; //!< System name of the class (typeinfo.name) + std::type_index myInfo; //!< Object to store system name of the class Standard_CString myName; //!< Given name of the class Standard_Size mySize; //!< Size of the class instance, in bytes Handle(Standard_Type) myParent; //!< Type descriptor of parent class @@ -252,7 +253,7 @@ namespace opencascade { // static variable inside function ensures that descriptors // are initialized in correct sequence static Handle(Standard_Type) anInstance = - Standard_Type::Register (typeid(T).name(), T::get_type_name(), sizeof(T), + Standard_Type::Register (typeid(T), T::get_type_name(), sizeof(T), type_instance::get()); return anInstance; } diff --git a/src/Standard/Standard_math.cxx b/src/Standard/Standard_math.cxx deleted file mode 100644 index c711d4a450..0000000000 --- a/src/Standard/Standard_math.cxx +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright (c) 1998-1999 Matra Datavision -// Copyright (c) 1999-2014 OPEN CASCADE SAS -// -// This file is part of Open CASCADE Technology software library. -// -// This library is free software; you can redistribute it and/or modify it under -// the terms of the GNU Lesser General Public License version 2.1 as published -// by the Free Software Foundation, with special exception defined in the file -// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT -// distribution for complete text of the license and disclaimer of any warranty. -// -// Alternatively, this file may be used under the terms of Open CASCADE -// commercial license or contractual agreement. - -#include - -// MSVC versions prior to 12 did not provided acosh, asinh, atanh functions in standard library -#if defined(_MSC_VER) && (_MSC_VER < 1800) - -Standard_EXPORT double __cdecl acosh( double X) -{ - double res; - res = log(X + sqrt(X * X - 1)); - return res; -}; -Standard_EXPORT double __cdecl asinh( double X) -{ - double res; -// Modified by Sergey KHROMOV - Mon Nov 11 16:27:11 2002 Begin -// Correction of the formula to avoid numerical problems. -// res = log(X + sqrt(X * X + 1)); - if (X > 0.) - res = log(X + sqrt(X * X + 1)); - else - res = -log(sqrt(X * X + 1) - X); -// Modified by Sergey KHROMOV - Mon Nov 11 16:27:13 2002 End - return res; -}; -Standard_EXPORT double __cdecl atanh( double X) -{ - double res; - res = log((1 + X) / (1 - X)) / 2; - return res; -}; - -#endif diff --git a/src/Standard/Standard_math.hxx b/src/Standard/Standard_math.hxx deleted file mode 100644 index a2eb9790a3..0000000000 --- a/src/Standard/Standard_math.hxx +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) 1991-1999 Matra Datavision -// Copyright (c) 1999-2014 OPEN CASCADE SAS -// -// This file is part of Open CASCADE Technology software library. -// -// This library is free software; you can redistribute it and/or modify it under -// the terms of the GNU Lesser General Public License version 2.1 as published -// by the Free Software Foundation, with special exception defined in the file -// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT -// distribution for complete text of the license and disclaimer of any warranty. -// -// Alternatively, this file may be used under the terms of Open CASCADE -// commercial license or contractual agreement. - -#ifndef Standard_math_HeaderFile -#define Standard_math_HeaderFile - -#ifndef _Standard_Macro_HeaderFile -#include -#endif - -#ifdef _MSC_VER - -#ifndef _USE_MATH_DEFINES -#define _USE_MATH_DEFINES -#endif - -#include - -// MSVC versions prior to 12 did not provided acosh, asinh, atanh functions in standard library -#if _MSC_VER < 1800 -Standard_EXPORT double __cdecl acosh ( double ); -Standard_EXPORT double __cdecl asinh ( double ); -Standard_EXPORT double __cdecl atanh ( double ); -#endif - -#endif /* _MSC_VER */ - - -#endif diff --git a/src/Standard/Standard_values.h b/src/Standard/Standard_values.h deleted file mode 100644 index 8d397dd84e..0000000000 --- a/src/Standard/Standard_values.h +++ /dev/null @@ -1,40 +0,0 @@ -/* - Copyright (c) 1991-1999 Matra Datavision - Copyright (c) 1999-2014 OPEN CASCADE SAS - - This file is part of Open CASCADE Technology software library. - - This library is free software; you can redistribute it and/or modify it under - the terms of the GNU Lesser General Public License version 2.1 as published - by the Free Software Foundation, with special exception defined in the file - OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT - distribution for complete text of the license and disclaimer of any warranty. - - Alternatively, this file may be used under the terms of Open CASCADE - commercial license or contractual agreement. -*/ - -#ifndef _Standard_values_HeaderFile -# define _Standard_values_HeaderFile - -#if defined(_MSC_VER) -# include -#else -# include -#endif - -#if defined (__hpux) || defined (HPUX) -# ifdef MAXINT -# undef MAXINT -# endif -#endif - -#ifndef BITSPERBYTE -# define BITSPERBYTE CHAR_BIT -#endif -#ifndef BITS -# define BITS(type) (BITSPERBYTE * sizeof(type)) -#endif - -#endif - diff --git a/src/StdObjMgt/StdObjMgt_MapOfInstantiators.hxx b/src/StdObjMgt/StdObjMgt_MapOfInstantiators.hxx index 87142c0003..619d5fd12f 100644 --- a/src/StdObjMgt/StdObjMgt_MapOfInstantiators.hxx +++ b/src/StdObjMgt/StdObjMgt_MapOfInstantiators.hxx @@ -21,16 +21,14 @@ class StdObjMgt_MapOfInstantiators : public NCollection_DataMap + StdObjMgt_Persistent::Instantiator> { public: template void Bind (const TCollection_AsciiString& theTypeName) { NCollection_DataMap + StdObjMgt_Persistent::Instantiator> ::Bind (theTypeName, Persistent::template Instantiate); } diff --git a/src/StdStorage/StdStorage_MapOfRoots.hxx b/src/StdStorage/StdStorage_MapOfRoots.hxx index 89401fd5a7..ccd8ec19d1 100644 --- a/src/StdStorage/StdStorage_MapOfRoots.hxx +++ b/src/StdStorage/StdStorage_MapOfRoots.hxx @@ -19,7 +19,7 @@ #include #include -typedef NCollection_IndexedDataMap StdStorage_MapOfRoots; -typedef NCollection_IndexedDataMap::Iterator StdStorage_DataMapIteratorOfMapOfRoots; +typedef NCollection_IndexedDataMap StdStorage_MapOfRoots; +typedef NCollection_IndexedDataMap::Iterator StdStorage_DataMapIteratorOfMapOfRoots; #endif // StdStorage_MapOfRoots_HeaderFile diff --git a/src/StdStorage/StdStorage_MapOfTypes.hxx b/src/StdStorage/StdStorage_MapOfTypes.hxx index b6acbe346b..d52a5e444d 100644 --- a/src/StdStorage/StdStorage_MapOfTypes.hxx +++ b/src/StdStorage/StdStorage_MapOfTypes.hxx @@ -21,7 +21,7 @@ #include #include -typedef NCollection_IndexedDataMap StdStorage_MapOfTypes; +typedef NCollection_IndexedDataMap StdStorage_MapOfTypes; #endif diff --git a/src/StepData/StepData_FreeFormEntity.cxx b/src/StepData/StepData_FreeFormEntity.cxx index 04acffa1b4..56c8395d02 100644 --- a/src/StepData/StepData_FreeFormEntity.cxx +++ b/src/StepData/StepData_FreeFormEntity.cxx @@ -86,14 +86,15 @@ void StepData_FreeFormEntity::SetStepType (const Standard_CString typenam) e1 = e1->Next(); } // d abord effacer les next en cours ... - NCollection_DataMap::Iterator iter(dic); - for (; iter.More(); iter.Next()) { + for (NCollection_DataMap::Iterator iter(dic); + iter.More(); iter.Next()) { e1 = GetCasted(StepData_FreeFormEntity,iter.Value()); if (!e1.IsNull()) e1->SetNext(e2); } // ... puis les remettre dans l ordre e1.Nullify(); - for (iter.Reset(); iter.More(); iter.Next()) { + for (NCollection_DataMap::Iterator iter(dic); + iter.More(); iter.Next()) { e2 = GetCasted(StepData_FreeFormEntity,iter.Value()); if (!e1.IsNull()) e1->SetNext(e2); e1 = e2; diff --git a/src/StepToTopoDS/FILES b/src/StepToTopoDS/FILES index 26c27041ad..5d6ef2b87e 100644 --- a/src/StepToTopoDS/FILES +++ b/src/StepToTopoDS/FILES @@ -3,8 +3,6 @@ StepToTopoDS.hxx StepToTopoDS_Builder.cxx StepToTopoDS_Builder.hxx StepToTopoDS_BuilderError.hxx -StepToTopoDS_CartesianPointHasher.cxx -StepToTopoDS_CartesianPointHasher.hxx StepToTopoDS_DataMapIteratorOfDataMapOfRI.hxx StepToTopoDS_DataMapIteratorOfDataMapOfRINames.hxx StepToTopoDS_DataMapIteratorOfDataMapOfTRI.hxx @@ -23,8 +21,6 @@ StepToTopoDS_NMTool.hxx StepToTopoDS_PointEdgeMap.hxx StepToTopoDS_PointPair.cxx StepToTopoDS_PointPair.hxx -StepToTopoDS_PointPairHasher.cxx -StepToTopoDS_PointPairHasher.hxx StepToTopoDS_PointVertexMap.hxx StepToTopoDS_Root.cxx StepToTopoDS_Root.hxx diff --git a/src/StepToTopoDS/StepToTopoDS_CartesianPointHasher.cxx b/src/StepToTopoDS/StepToTopoDS_CartesianPointHasher.cxx deleted file mode 100644 index 6deba8805d..0000000000 --- a/src/StepToTopoDS/StepToTopoDS_CartesianPointHasher.cxx +++ /dev/null @@ -1,42 +0,0 @@ -// Created on: 1993-08-30 -// Created by: Martine LANGLOIS -// Copyright (c) 1993-1999 Matra Datavision -// Copyright (c) 1999-2014 OPEN CASCADE SAS -// -// This file is part of Open CASCADE Technology software library. -// -// This library is free software; you can redistribute it and/or modify it under -// the terms of the GNU Lesser General Public License version 2.1 as published -// by the Free Software Foundation, with special exception defined in the file -// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT -// distribution for complete text of the license and disclaimer of any warranty. -// -// Alternatively, this file may be used under the terms of Open CASCADE -// commercial license or contractual agreement. - - -#include -#include - -//======================================================================= -// function : HashCode -// purpose : -//======================================================================= -Standard_Integer StepToTopoDS_CartesianPointHasher::HashCode (const Handle (StepGeom_CartesianPoint) - & theCartesianPoint, - const Standard_Integer theUpperBound) -{ - return ::HashCode (theCartesianPoint, theUpperBound); -} - -//======================================================================= -//function : IsEqual -//purpose : -//======================================================================= - -Standard_Boolean StepToTopoDS_CartesianPointHasher::IsEqual - (const Handle(StepGeom_CartesianPoint)& K1, - const Handle(StepGeom_CartesianPoint)& K2) -{ - return (K1 == K2); -} diff --git a/src/StepToTopoDS/StepToTopoDS_CartesianPointHasher.hxx b/src/StepToTopoDS/StepToTopoDS_CartesianPointHasher.hxx deleted file mode 100644 index 4c8a8bbc22..0000000000 --- a/src/StepToTopoDS/StepToTopoDS_CartesianPointHasher.hxx +++ /dev/null @@ -1,68 +0,0 @@ -// Created on: 1993-08-30 -// Created by: Martine LANGLOIS -// Copyright (c) 1993-1999 Matra Datavision -// Copyright (c) 1999-2014 OPEN CASCADE SAS -// -// This file is part of Open CASCADE Technology software library. -// -// This library is free software; you can redistribute it and/or modify it under -// the terms of the GNU Lesser General Public License version 2.1 as published -// by the Free Software Foundation, with special exception defined in the file -// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT -// distribution for complete text of the license and disclaimer of any warranty. -// -// Alternatively, this file may be used under the terms of Open CASCADE -// commercial license or contractual agreement. - -#ifndef _StepToTopoDS_CartesianPointHasher_HeaderFile -#define _StepToTopoDS_CartesianPointHasher_HeaderFile - -#include -#include -#include - -#include -class StepGeom_CartesianPoint; - - - -class StepToTopoDS_CartesianPointHasher -{ -public: - - DEFINE_STANDARD_ALLOC - - //! Computes a hash code for the cartesian point, in the range [1, theUpperBound] - //! @param theCartesianPoint the cartesian point which hash code is to be computed - //! @param theUpperBound the upper bound of the range a computing hash code must be within - //! @return a computed hash code, in the range [1, theUpperBound] - Standard_EXPORT static Standard_Integer HashCode (const Handle (StepGeom_CartesianPoint) & theCartesianPoint, - Standard_Integer theUpperBound); - - //! Returns True when the two CartesianPoint are the same - Standard_EXPORT static Standard_Boolean IsEqual (const Handle(StepGeom_CartesianPoint)& K1, const Handle(StepGeom_CartesianPoint)& K2); - - - - -protected: - - - - - -private: - - - - - -}; - - - - - - - -#endif // _StepToTopoDS_CartesianPointHasher_HeaderFile diff --git a/src/StepToTopoDS/StepToTopoDS_DataMapOfRI.hxx b/src/StepToTopoDS/StepToTopoDS_DataMapOfRI.hxx index 064fc50aa7..68837f6d99 100644 --- a/src/StepToTopoDS/StepToTopoDS_DataMapOfRI.hxx +++ b/src/StepToTopoDS/StepToTopoDS_DataMapOfRI.hxx @@ -19,11 +19,10 @@ #include #include -#include #include -typedef NCollection_DataMap StepToTopoDS_DataMapOfRI; -typedef NCollection_DataMap::Iterator StepToTopoDS_DataMapIteratorOfDataMapOfRI; +typedef NCollection_DataMap StepToTopoDS_DataMapOfRI; +typedef NCollection_DataMap::Iterator StepToTopoDS_DataMapIteratorOfDataMapOfRI; #endif diff --git a/src/StepToTopoDS/StepToTopoDS_DataMapOfRINames.hxx b/src/StepToTopoDS/StepToTopoDS_DataMapOfRINames.hxx index b9cf814562..3510dbfa0e 100644 --- a/src/StepToTopoDS/StepToTopoDS_DataMapOfRINames.hxx +++ b/src/StepToTopoDS/StepToTopoDS_DataMapOfRINames.hxx @@ -21,8 +21,8 @@ #include #include -typedef NCollection_DataMap StepToTopoDS_DataMapOfRINames; -typedef NCollection_DataMap::Iterator StepToTopoDS_DataMapIteratorOfDataMapOfRINames; +typedef NCollection_DataMap StepToTopoDS_DataMapOfRINames; +typedef NCollection_DataMap::Iterator StepToTopoDS_DataMapIteratorOfDataMapOfRINames; #endif diff --git a/src/StepToTopoDS/StepToTopoDS_DataMapOfTRI.hxx b/src/StepToTopoDS/StepToTopoDS_DataMapOfTRI.hxx index 5b001f4425..f473281b2e 100644 --- a/src/StepToTopoDS/StepToTopoDS_DataMapOfTRI.hxx +++ b/src/StepToTopoDS/StepToTopoDS_DataMapOfTRI.hxx @@ -19,11 +19,10 @@ #include #include -#include #include -typedef NCollection_DataMap StepToTopoDS_DataMapOfTRI; -typedef NCollection_DataMap::Iterator StepToTopoDS_DataMapIteratorOfDataMapOfTRI; +typedef NCollection_DataMap StepToTopoDS_DataMapOfTRI; +typedef NCollection_DataMap::Iterator StepToTopoDS_DataMapIteratorOfDataMapOfTRI; #endif diff --git a/src/StepToTopoDS/StepToTopoDS_PointEdgeMap.hxx b/src/StepToTopoDS/StepToTopoDS_PointEdgeMap.hxx index d5f1784166..1c32a82e1e 100644 --- a/src/StepToTopoDS/StepToTopoDS_PointEdgeMap.hxx +++ b/src/StepToTopoDS/StepToTopoDS_PointEdgeMap.hxx @@ -19,11 +19,10 @@ #include #include -#include #include -typedef NCollection_DataMap StepToTopoDS_PointEdgeMap; -typedef NCollection_DataMap::Iterator StepToTopoDS_DataMapIteratorOfPointEdgeMap; +typedef NCollection_DataMap StepToTopoDS_PointEdgeMap; +typedef NCollection_DataMap::Iterator StepToTopoDS_DataMapIteratorOfPointEdgeMap; #endif diff --git a/src/StepToTopoDS/StepToTopoDS_PointPair.cxx b/src/StepToTopoDS/StepToTopoDS_PointPair.cxx index add5804ed3..65cafd8617 100644 --- a/src/StepToTopoDS/StepToTopoDS_PointPair.cxx +++ b/src/StepToTopoDS/StepToTopoDS_PointPair.cxx @@ -17,7 +17,6 @@ #include #include -#include //======================================================================= //function : StepToTopoDS_PointPair diff --git a/src/StepToTopoDS/StepToTopoDS_PointPair.hxx b/src/StepToTopoDS/StepToTopoDS_PointPair.hxx index ecbbc0bd91..a4dbdcb118 100644 --- a/src/StepToTopoDS/StepToTopoDS_PointPair.hxx +++ b/src/StepToTopoDS/StepToTopoDS_PointPair.hxx @@ -23,7 +23,6 @@ class StepGeom_CartesianPoint; - //! Stores a pair of Points from step class StepToTopoDS_PointPair { @@ -34,9 +33,21 @@ public: Standard_EXPORT StepToTopoDS_PointPair(const Handle(StepGeom_CartesianPoint)& P1, const Handle(StepGeom_CartesianPoint)& P2); + const Handle(StepGeom_CartesianPoint)& GetPoint1() const + { + return myP1; + } -friend class StepToTopoDS_PointPairHasher; + const Handle(StepGeom_CartesianPoint)& GetPoint2() const + { + return myP2; + } + bool operator==(const StepToTopoDS_PointPair& thePointPair) const + { + return (((myP1 == thePointPair.myP1) && (myP2 == thePointPair.myP2)) || + ((myP1 == thePointPair.myP2) && (myP2 == thePointPair.myP1))); + } protected: @@ -54,6 +65,25 @@ private: }; +namespace std +{ + template <> + struct hash + { + size_t operator()(const StepToTopoDS_PointPair& thePointPair) const noexcept + { + // Combine two int values into a single hash value. + size_t aCombination[2]; + aCombination[0] = std::hash{}(thePointPair.GetPoint1()); + aCombination[1] = std::hash{}(thePointPair.GetPoint2()); + if (aCombination[0] > aCombination[1]) + { + std::swap(aCombination[0], aCombination[1]); + } + return opencascade::hashBytes(aCombination, sizeof(aCombination)); + } + }; +} diff --git a/src/StepToTopoDS/StepToTopoDS_PointPairHasher.cxx b/src/StepToTopoDS/StepToTopoDS_PointPairHasher.cxx deleted file mode 100644 index 22324ec390..0000000000 --- a/src/StepToTopoDS/StepToTopoDS_PointPairHasher.cxx +++ /dev/null @@ -1,44 +0,0 @@ -// Created on: 1993-08-06 -// Created by: Martine LANGLOIS -// Copyright (c) 1993-1999 Matra Datavision -// Copyright (c) 1999-2014 OPEN CASCADE SAS -// -// This file is part of Open CASCADE Technology software library. -// -// This library is free software; you can redistribute it and/or modify it under -// the terms of the GNU Lesser General Public License version 2.1 as published -// by the Free Software Foundation, with special exception defined in the file -// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT -// distribution for complete text of the license and disclaimer of any warranty. -// -// Alternatively, this file may be used under the terms of Open CASCADE -// commercial license or contractual agreement. - - -#include -#include -#include - -//======================================================================= -// function : HashCode -// purpose : -//======================================================================= -Standard_Integer StepToTopoDS_PointPairHasher::HashCode (const StepToTopoDS_PointPair& thePointPair, - const Standard_Integer theUpperBound) -{ - return ::HashCode (::HashCode (thePointPair.myP1, theUpperBound) + ::HashCode (thePointPair.myP2, theUpperBound), - theUpperBound); -} - -//======================================================================= -//function : IsEqual -//purpose : -//======================================================================= - -Standard_Boolean StepToTopoDS_PointPairHasher::IsEqual - (const StepToTopoDS_PointPair& P1, - const StepToTopoDS_PointPair& P2) -{ - return (((P1.myP1 == P2.myP1) && (P1.myP2 == P2.myP2)) || - ((P1.myP1 == P2.myP2) && (P1.myP2 == P2.myP1))); -} diff --git a/src/StepToTopoDS/StepToTopoDS_PointPairHasher.hxx b/src/StepToTopoDS/StepToTopoDS_PointPairHasher.hxx deleted file mode 100644 index efc515a772..0000000000 --- a/src/StepToTopoDS/StepToTopoDS_PointPairHasher.hxx +++ /dev/null @@ -1,66 +0,0 @@ -// Created on: 1993-08-06 -// Created by: Martine LANGLOIS -// Copyright (c) 1993-1999 Matra Datavision -// Copyright (c) 1999-2014 OPEN CASCADE SAS -// -// This file is part of Open CASCADE Technology software library. -// -// This library is free software; you can redistribute it and/or modify it under -// the terms of the GNU Lesser General Public License version 2.1 as published -// by the Free Software Foundation, with special exception defined in the file -// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT -// distribution for complete text of the license and disclaimer of any warranty. -// -// Alternatively, this file may be used under the terms of Open CASCADE -// commercial license or contractual agreement. - -#ifndef _StepToTopoDS_PointPairHasher_HeaderFile -#define _StepToTopoDS_PointPairHasher_HeaderFile - -#include -#include - -#include -class StepToTopoDS_PointPair; - - - -class StepToTopoDS_PointPairHasher -{ -public: - - DEFINE_STANDARD_ALLOC - - //! Computes a hash code for the point pair, in the range [1, theUpperBound] - //! @param thePointPair the point pair which hash code is to be computed - //! @param theUpperBound the upper bound of the range a computing hash code must be within - //! @return a computed hash code, in the range [1, theUpperBound] - Standard_EXPORT static Standard_Integer HashCode (const StepToTopoDS_PointPair& thePointPair, Standard_Integer theUpperBound); - - //! Returns True when the two PointPair are the same - Standard_EXPORT static Standard_Boolean IsEqual (const StepToTopoDS_PointPair& K1, const StepToTopoDS_PointPair& K2); - - - - -protected: - - - - - -private: - - - - - -}; - - - - - - - -#endif // _StepToTopoDS_PointPairHasher_HeaderFile diff --git a/src/StepToTopoDS/StepToTopoDS_PointVertexMap.hxx b/src/StepToTopoDS/StepToTopoDS_PointVertexMap.hxx index 75cba0c08c..024fb765da 100644 --- a/src/StepToTopoDS/StepToTopoDS_PointVertexMap.hxx +++ b/src/StepToTopoDS/StepToTopoDS_PointVertexMap.hxx @@ -19,11 +19,10 @@ #include #include -#include #include -typedef NCollection_DataMap StepToTopoDS_PointVertexMap; -typedef NCollection_DataMap::Iterator StepToTopoDS_DataMapIteratorOfPointVertexMap; +typedef NCollection_DataMap StepToTopoDS_PointVertexMap; +typedef NCollection_DataMap::Iterator StepToTopoDS_DataMapIteratorOfPointVertexMap; #endif diff --git a/src/Storage/Storage_MapOfCallBack.hxx b/src/Storage/Storage_MapOfCallBack.hxx index 079eba5f66..3d67aea007 100644 --- a/src/Storage/Storage_MapOfCallBack.hxx +++ b/src/Storage/Storage_MapOfCallBack.hxx @@ -21,8 +21,8 @@ #include #include -typedef NCollection_DataMap Storage_MapOfCallBack; -typedef NCollection_DataMap::Iterator Storage_DataMapIteratorOfMapOfCallBack; +typedef NCollection_DataMap Storage_MapOfCallBack; +typedef NCollection_DataMap::Iterator Storage_DataMapIteratorOfMapOfCallBack; #endif diff --git a/src/Storage/Storage_MapOfPers.hxx b/src/Storage/Storage_MapOfPers.hxx index cbde1b89a9..412561bb0b 100644 --- a/src/Storage/Storage_MapOfPers.hxx +++ b/src/Storage/Storage_MapOfPers.hxx @@ -21,8 +21,8 @@ #include #include -typedef NCollection_DataMap Storage_MapOfPers; -typedef NCollection_DataMap::Iterator Storage_DataMapIteratorOfMapOfPers; +typedef NCollection_DataMap Storage_MapOfPers; +typedef NCollection_DataMap::Iterator Storage_DataMapIteratorOfMapOfPers; #endif diff --git a/src/Storage/Storage_PType.hxx b/src/Storage/Storage_PType.hxx index 9a90b69cbf..ccf8b21127 100644 --- a/src/Storage/Storage_PType.hxx +++ b/src/Storage/Storage_PType.hxx @@ -21,7 +21,7 @@ #include #include -typedef NCollection_IndexedDataMap Storage_PType; +typedef NCollection_IndexedDataMap Storage_PType; #endif diff --git a/src/Storage/Storage_Schema.cxx b/src/Storage/Storage_Schema.cxx index bb617809b0..06fc5c0670 100644 --- a/src/Storage/Storage_Schema.cxx +++ b/src/Storage/Storage_Schema.cxx @@ -718,75 +718,80 @@ void Storage_Schema::Clear() const // containing migration types table: oldtype - newtype //======================================================================= Standard_Boolean Storage_Schema::CheckTypeMigration( - const TCollection_AsciiString& oldName, - TCollection_AsciiString& newName) + const TCollection_AsciiString& oldName, + TCollection_AsciiString& newName) { static Standard_Boolean isChecked(Standard_False); static DataMapOfAStringAString aDMap; Standard_Boolean aMigration(Standard_False); - - if(!isChecked) { + + if (!isChecked) + { isChecked = Standard_True; -// TCollection_AsciiString aFileName = getenv("CSF_MIGRATION_TYPES"); + // TCollection_AsciiString aFileName = getenv("CSF_MIGRATION_TYPES"); OSD_Environment csf(TCollection_AsciiString("CSF_MIGRATION_TYPES")); TCollection_AsciiString aFileName = csf.Value(); - if(aFileName.Length() > 0) { - OSD_Path aPath(aFileName,OSD_Default); - OSD_File aFile; - aFile.SetPath(aPath); - if(aFile.Exists()) { - OSD_Protection aProt(OSD_R,OSD_R,OSD_R,OSD_R); - aFile.Open(OSD_ReadOnly, aProt); - if(aFile.IsOpen() && aFile.IsReadable()) { - TCollection_AsciiString aLine; - Standard_Integer aNbReaded(0); - for (;;) { - aFile.ReadLine(aLine, 80, aNbReaded); - if(aFile.IsAtEnd() || !aNbReaded) { - aFile.Close(); - break; - } + OSD_File aFile; + OSD_Path aPath(aFileName, OSD_Default); + aFile.SetPath(aPath); + if (aFile.Exists()) + { + OSD_Protection aProt(OSD_R, OSD_R, OSD_R, OSD_R); + aFile.Open(OSD_ReadOnly, aProt); + if (aFile.IsOpen() && aFile.IsReadable()) + { + TCollection_AsciiString aLine; + Standard_Integer aNbReaded(0); + for (;;) + { + aFile.ReadLine(aLine, 80, aNbReaded); + if (aFile.IsAtEnd() || !aNbReaded) + { + aFile.Close(); + break; + } #ifdef OCCT_DEBUG - std::cout << "Storage_Sheme:: Line: = " << aLine <(strlen(theString))); memcpy (mystring, theString, mylength); - mystring[mylength] = '\0'; } @@ -79,36 +60,28 @@ TCollection_AsciiString::TCollection_AsciiString (const Standard_CString theStri // ---------------------------------------------------------------------------- TCollection_AsciiString::TCollection_AsciiString (const Standard_CString theString, const Standard_Integer theLen) -: mystring (NULL), - mylength (0) { if (theString == NULL) { throw Standard_NullObject ("TCollection_AsciiString(): NULL pointer passed to constructor"); } - - for (; mylength < theLen && theString[mylength] != '\0'; ++mylength) {} - mystring = Allocate (mylength + 1); + int aLength = 0; + for (; aLength < theLen && theString[aLength] != '\0'; ++aLength) {} + allocate (aLength); memcpy (mystring, theString, mylength); - mystring[mylength] = '\0'; } // ---------------------------------------------------------------------------- // Create an asciistring from a Standard_Character // ---------------------------------------------------------------------------- TCollection_AsciiString::TCollection_AsciiString(const Standard_Character aChar) - : mystring(0) { if ( aChar != '\0' ) { - mylength = 1; - mystring = Allocate(2); + allocate(1); mystring[0] = aChar; - mystring[1] = '\0'; } else { - mylength = 0; - mystring = Allocate(mylength+1); - mystring[mylength] = '\0'; + allocate(0); } } @@ -118,50 +91,59 @@ TCollection_AsciiString::TCollection_AsciiString(const Standard_Character aChar) TCollection_AsciiString::TCollection_AsciiString(const Standard_Integer length, const Standard_Character filler ) { - mystring = Allocate(length+1); - mylength = length; - for (int i = 0 ; i < length ; i++) mystring[i] = filler; - mystring[length] = '\0'; + allocate(length); + memset(mystring, filler, length); } // ---------------------------------------------------------------------------- // Create an AsciiString from an Integer // ---------------------------------------------------------------------------- TCollection_AsciiString::TCollection_AsciiString(const Standard_Integer aValue) - : mystring(0) { char t [13]; - mylength = Sprintf( t,"%d",aValue); - mystring = Allocate(mylength+1); + allocate(Sprintf(t, "%d", aValue)); memcpy (mystring, t, mylength); - mystring[mylength] = '\0'; } // ---------------------------------------------------------------------------- // Create an asciistring from a real // ---------------------------------------------------------------------------- TCollection_AsciiString::TCollection_AsciiString(const Standard_Real aValue) - : mystring(0) { char t [50]; - mylength = Sprintf( t,"%g",aValue); - mystring = Allocate(mylength+1); + allocate(Sprintf(t, "%g", aValue)); memcpy (mystring, t, mylength); - mystring[mylength] = '\0'; } // ---------------------------------------------------------------------------- // Create an asciistring from an asciistring // ---------------------------------------------------------------------------- TCollection_AsciiString::TCollection_AsciiString (const TCollection_AsciiString& theString) -: mystring (Allocate (theString.mylength + 1)), - mylength (theString.mylength) { + allocate(theString.mylength); if (mylength != 0) { memcpy (mystring, theString.mystring, mylength); } - mystring[mylength] = '\0'; +} + +//======================================================================= +//function : TCollection_AsciiString +//purpose : +//======================================================================= +TCollection_AsciiString::TCollection_AsciiString(TCollection_AsciiString&& theOther) Standard_Noexcept +{ + if (theOther.mystring == THE_DEFAULT_CHAR_STRING) + { + allocate(0); + } + else + { + mystring = theOther.mystring; + mylength = theOther.mylength; + } + theOther.mylength = 0; + theOther.mystring = THE_DEFAULT_CHAR_STRING; } // ---------------------------------------------------------------------------- @@ -169,16 +151,13 @@ TCollection_AsciiString::TCollection_AsciiString (const TCollection_AsciiString& // ---------------------------------------------------------------------------- TCollection_AsciiString::TCollection_AsciiString (const TCollection_AsciiString& theString, const Standard_Character theChar) -: mystring (NULL), - mylength (theString.mylength + 1) { - mystring = Allocate (mylength + 1); + allocate (theString.mylength + 1); if (theString.mylength != 0) { memcpy (mystring, theString.mystring, theString.mylength); } mystring[mylength - 1] = theChar; - mystring[mylength] = '\0'; } // ---------------------------------------------------------------------------- @@ -186,11 +165,9 @@ TCollection_AsciiString::TCollection_AsciiString (const TCollection_AsciiString& // ---------------------------------------------------------------------------- TCollection_AsciiString::TCollection_AsciiString (const TCollection_AsciiString& theString1, const Standard_CString theString2) -: mystring (0) { const Standard_Integer aStr2Len = Standard_Integer (theString2 ? strlen (theString2) : 0); - mylength = theString1.mylength + aStr2Len; - mystring = Allocate (mylength + 1); + allocate (theString1.mylength + aStr2Len); if (theString1.mylength != 0) { memcpy (mystring, theString1.mystring, theString1.mylength); @@ -199,7 +176,6 @@ TCollection_AsciiString::TCollection_AsciiString (const TCollection_AsciiString& { memcpy (mystring + theString1.mylength, theString2, aStr2Len); } - mystring[mylength] = '\0'; } // ---------------------------------------------------------------------------- @@ -207,10 +183,8 @@ TCollection_AsciiString::TCollection_AsciiString (const TCollection_AsciiString& // ---------------------------------------------------------------------------- TCollection_AsciiString::TCollection_AsciiString (const TCollection_AsciiString& theString1, const TCollection_AsciiString& theString2) -: mystring (0), - mylength (theString1.mylength + theString2.mylength) { - mystring = Allocate (mylength + 1); + allocate (theString1.mylength + theString2.mylength); if (theString1.mylength) { memcpy (mystring, theString1.mystring, theString1.mylength); @@ -219,30 +193,25 @@ TCollection_AsciiString::TCollection_AsciiString (const TCollection_AsciiString& { memcpy (mystring + theString1.mylength, theString2.mystring, theString2.mylength); } - mystring[mylength] = '\0'; } //--------------------------------------------------------------------------- // Create an asciistring from an ExtendedString //--------------------------------------------------------------------------- TCollection_AsciiString::TCollection_AsciiString(const TCollection_ExtendedString& astring, - const Standard_Character replaceNonAscii) -: mystring (0) + const Standard_Character replaceNonAscii) { if (replaceNonAscii) { - mylength = astring.Length(); - mystring = Allocate(mylength+1); + allocate(astring.Length()); for(int i = 0; i < mylength; i++) { Standard_ExtCharacter c = astring.Value(i+1); mystring[i] = ( IsAnAscii(c) ? ToCharacter(c) : replaceNonAscii ); } - mystring[mylength] = '\0'; } else { // create UTF-8 string - mylength = astring.LengthOfCString(); - mystring = Allocate(mylength+1); + allocate(astring.LengthOfCString()); astring.ToUTF8CString(mystring); } } @@ -251,16 +220,13 @@ TCollection_AsciiString::TCollection_AsciiString(const TCollection_ExtendedStrin // Create an TCollection_AsciiString from a Standard_WideChar //--------------------------------------------------------------------------- TCollection_AsciiString::TCollection_AsciiString (const Standard_WideChar* theStringUtf) -: mystring (NULL), - mylength (0) { + int aLength = 0; for (NCollection_UtfWideIter anIter (theStringUtf); *anIter != 0; ++anIter) { - mylength += anIter.AdvanceBytesUtf8(); + aLength += anIter.AdvanceBytesUtf8(); } - - mystring = Allocate (mylength + 1); - mystring[mylength] = '\0'; + allocate (aLength); NCollection_UtfWideIter anIterRead (theStringUtf); for (Standard_Utf8Char* anIterWrite = mystring; *anIterRead != 0; ++anIterRead) { @@ -294,10 +260,8 @@ void TCollection_AsciiString::AssignCat(const Standard_Real other) void TCollection_AsciiString::AssignCat(const Standard_Character other) { if (other != '\0') { - mystring = Reallocate (mystring, mylength + 2); - mystring[mylength] = other ; - mylength += 1; - mystring[mylength] = '\0'; + reallocate (mylength + 1); + mystring[mylength - 1] = other; } } @@ -314,10 +278,9 @@ void TCollection_AsciiString::AssignCat (const Standard_CString theOther) Standard_Integer anOtherLen = Standard_Integer (strlen (theOther)); if (anOtherLen != 0) { - const Standard_Integer aNewLen = mylength + anOtherLen; - mystring = Reallocate (mystring, aNewLen + 1); - memcpy (mystring + mylength, theOther, anOtherLen + 1); - mylength = aNewLen; + const Standard_Integer anOldLength = mylength; + reallocate (mylength + anOtherLen); + memcpy (mystring + anOldLength, theOther, anOtherLen + 1); } } @@ -328,10 +291,9 @@ void TCollection_AsciiString::AssignCat (const TCollection_AsciiString& theOther { if (theOther.mylength != 0) { - const Standard_Integer aNewLen = mylength + theOther.mylength; - mystring = Reallocate (mystring, aNewLen + 1); - memcpy (mystring + mylength, theOther.mystring, theOther.mylength + 1); - mylength = aNewLen; + const Standard_Integer anOldLength = mylength; + reallocate(mylength + theOther.mylength); + memcpy (mystring + anOldLength, theOther.mystring, theOther.mylength + 1); } } @@ -384,13 +346,7 @@ void TCollection_AsciiString::ChangeAll(const Standard_Character aChar, // ---------------------------------------------------------------------------- void TCollection_AsciiString::Clear() { - if ( mylength > 0 ) - { - Free (mystring); - mylength = 0; - mystring = Allocate(mylength+1); - mystring[mylength] = '\0'; - } + deallocate(); } // ---------------------------------------------------------------------------- @@ -398,14 +354,19 @@ void TCollection_AsciiString::Clear() // ---------------------------------------------------------------------------- void TCollection_AsciiString::Copy(const Standard_CString fromwhere) { - if (fromwhere) { - mylength = Standard_Integer( strlen( fromwhere )); - mystring = Reallocate (mystring, mylength + 1); - memcpy (mystring, fromwhere, mylength + 1); + if (fromwhere == mystring) + { + return; } - else { + if (fromwhere && fromwhere[0] != '\0') + { + reallocate (static_cast(strlen(fromwhere))); + memcpy (mystring, fromwhere, mylength); + } + else + { mylength = 0; - mystring[mylength] = '\0'; + mystring = THE_DEFAULT_CHAR_STRING; } } @@ -414,22 +375,51 @@ void TCollection_AsciiString::Copy(const Standard_CString fromwhere) // ---------------------------------------------------------------------------- void TCollection_AsciiString::Copy(const TCollection_AsciiString& fromwhere) { - if (fromwhere.mystring) { - mylength = fromwhere.mylength; - mystring = Reallocate (mystring, mylength + 1); - memcpy (mystring, fromwhere.mystring, mylength + 1); + if (&fromwhere == this) + { + return; } - else { + if (fromwhere.mystring && fromwhere.mylength > 0) + { + reallocate (fromwhere.mylength); + memcpy (mystring, fromwhere.mystring, mylength); + } + else if (mystring != THE_DEFAULT_CHAR_STRING) + { mylength = 0; mystring[mylength] = '\0'; } } +//======================================================================= +//function : Move +//purpose : +//======================================================================= +void TCollection_AsciiString::Move(TCollection_AsciiString&& theOther) +{ + if (&theOther == this) + { + return; + } + if (mystring != THE_DEFAULT_CHAR_STRING) + { + Standard::Free(mystring); + } + mystring = theOther.mystring; + mylength = theOther.mylength; + theOther.mystring = THE_DEFAULT_CHAR_STRING; + theOther.mylength = 0; +} + // ---------------------------------------------------------------------------- // Swap // ---------------------------------------------------------------------------- void TCollection_AsciiString::Swap (TCollection_AsciiString& theOther) { + if (&theOther == this) + { + return; + } std::swap (mystring, theOther.mystring); std::swap (mylength, theOther.mylength); } @@ -439,9 +429,7 @@ void TCollection_AsciiString::Swap (TCollection_AsciiString& theOther) // ---------------------------------------------------------------------------- TCollection_AsciiString::~TCollection_AsciiString() { - if (mystring) - Free (mystring); - mystring = 0L; + deallocate (); } // ---------------------------------------------------------------------------- @@ -493,14 +481,13 @@ void TCollection_AsciiString::Insert(const Standard_Integer where, if (where > mylength + 1 ) throw Standard_OutOfRange("TCollection_AsciiString::Insert : Parameter where is too big"); if (where < 1) throw Standard_OutOfRange("TCollection_AsciiString::Insert : Parameter where is too small"); - mystring = Reallocate (mystring, mylength + 2); - if (where != mylength +1) { - for (int i=mylength-1; i >= where-1; i--) + const int anOldLength = mylength; + reallocate (mylength + 1); + if (where != anOldLength +1) { + for (int i= anOldLength -1; i >= where-1; i--) mystring[i+1] = mystring[i]; } mystring[where-1] = what; - mylength++; - mystring[mylength] = '\0'; } // ---------------------------------------------------------------------------- @@ -511,19 +498,15 @@ void TCollection_AsciiString::Insert(const Standard_Integer where, { if (where <= mylength + 1 && where > 0) { if(what) { - Standard_Integer whatlength = Standard_Integer( strlen( what ) ); - Standard_Integer newlength = mylength + whatlength; - - mystring = Reallocate (mystring, newlength + 1); - if (where != mylength +1) { - for (int i=mylength-1; i >= where-1; i--) + const Standard_Integer whatlength = Standard_Integer( strlen( what ) ); + const int anOldLength = mylength; + reallocate (mylength + whatlength); + if (where != anOldLength +1) { + for (int i= anOldLength -1; i >= where-1; i--) mystring[i+whatlength] = mystring[i]; } for (int i=0; i < whatlength; i++) mystring[where-1+i] = what[i]; - - mylength = newlength; - mystring[mylength] = '\0'; } } else { @@ -540,21 +523,17 @@ void TCollection_AsciiString::Insert(const Standard_Integer where, { Standard_CString swhat = what.mystring; if (where <= mylength + 1) { - Standard_Integer whatlength = what.mylength; + const Standard_Integer whatlength = what.mylength; if(whatlength) { - Standard_Integer newlength = mylength + whatlength; - - mystring = Reallocate (mystring, newlength + 1); + const int anOldLength = mylength; + reallocate (mylength + whatlength); - if (where != mylength +1) { - for (int i=mylength-1; i >= where-1; i--) + if (where != anOldLength +1) { + for (int i= anOldLength -1; i >= where-1; i--) mystring[i+whatlength] = mystring[i]; } for (int i=0; i < whatlength; i++) mystring[where-1+i] = swhat[i]; - - mylength = newlength; - mystring[mylength] = '\0'; } } else { @@ -805,10 +784,9 @@ void TCollection_AsciiString::LeftJustify(const Standard_Integer Width, const Standard_Character Filler) { if (Width > mylength) { - mystring = Reallocate (mystring, Width + 1); - for (int i = mylength; i < Width ; i++) mystring[i] = Filler; - mylength = Width; - mystring[mylength] = '\0'; + const int anOldLength = mylength; + reallocate (Width); + for (int i = anOldLength; i < Width ; i++) mystring[i] = Filler; } else if (Width < 0) { throw Standard_NegativeValue(); @@ -910,10 +888,8 @@ void TCollection_AsciiString::Read(Standard_IStream& astream) astream.width( oldWidth ); // put to string - mylength = Standard_Integer( strlen( buffer )); - mystring = Reallocate (mystring, mylength + 1); + reallocate (Standard_Integer(strlen(buffer))); memcpy (mystring, buffer, mylength); - mystring[mylength] = '\0'; } @@ -962,7 +938,6 @@ void TCollection_AsciiString::RemoveAll(const Standard_Character what, } } mylength = c; - mystring[mylength] = '\0'; } // ---------------------------------------------------------------------------- @@ -975,7 +950,6 @@ void TCollection_AsciiString::RemoveAll(const Standard_Character what) for (int i=0; i < mylength; i++) if (mystring[i] != what) mystring[c++] = mystring[i]; mylength = c; - mystring[mylength] = '\0'; } // ---------------------------------------------------------------------------- @@ -1017,16 +991,13 @@ void TCollection_AsciiString::RightAdjust () void TCollection_AsciiString::RightJustify(const Standard_Integer Width, const Standard_Character Filler) { - Standard_Integer i ; - Standard_Integer k ; if (Width > mylength) { - mystring = Reallocate (mystring, Width + 1); - - for ( i = mylength-1, k = Width-1 ; i >= 0 ; i--, k--) + const int anOldLength = mylength; + reallocate (Width); + int i, k; + for ( i = anOldLength-1, k = Width-1 ; i >= 0 ; i--, k--) mystring[k] = mystring[i]; for(; k >= 0 ; k--) mystring[k] = Filler; - mylength = Width; - mystring[mylength] = '\0'; } else if (Width < 0) { throw Standard_NegativeValue(); @@ -1145,12 +1116,10 @@ void TCollection_AsciiString::SetValue(const Standard_Integer where, Standard_Integer size = Standard_Integer( what ? strlen( what ) : 0 ); size += (where - 1); if (size >= mylength) { - mystring = Reallocate (mystring, size + 1); - mylength = size; + reallocate (size); } for (int i = where-1; i < size; i++) mystring[i] = what[i-(where-1)]; - mystring[mylength] = '\0'; } else { throw Standard_OutOfRange("TCollection_AsciiString::SetValue : " @@ -1169,12 +1138,10 @@ void TCollection_AsciiString::SetValue(const Standard_Integer where, Standard_CString swhat = what.mystring; size += (where - 1); if (size >= mylength) { - mystring = Reallocate (mystring, size + 1); - mylength = size; + reallocate (size); } for (int i = where-1; i < size; i++) mystring[i] = swhat[i-(where-1)]; - mystring[mylength] = '\0'; } else { throw Standard_OutOfRange("TCollection_AsciiString::SetValue : " @@ -1182,21 +1149,6 @@ void TCollection_AsciiString::SetValue(const Standard_Integer where, } } -// ---------------------------------------------------------------------------- -// Split -// Private -// ---------------------------------------------------------------------------- -void TCollection_AsciiString::Split(const Standard_Integer where, - TCollection_AsciiString& res) -{ - if (where >= 0 && where <= mylength) { - res = &mystring[where] ; - Trunc(where); - return ; - } - throw Standard_OutOfRange("TCollection_AsciiString::Split index"); - return ; -} // ---------------------------------------------------------------------------- // Split @@ -1212,39 +1164,6 @@ TCollection_AsciiString TCollection_AsciiString::Split throw Standard_OutOfRange("TCollection_AsciiString::Split index"); } -// ---------------------------------------------------------------------------- -// SubString -// Private -// ---------------------------------------------------------------------------- -void TCollection_AsciiString::SubString(const Standard_Integer FromIndex, - const Standard_Integer ToIndex, - TCollection_AsciiString& res) const -{ - - if (ToIndex > mylength || FromIndex <= 0 || FromIndex > ToIndex ) - { - throw Standard_OutOfRange(); - } - - Standard_Integer newlength = ToIndex-FromIndex+1; - res.mystring =Reallocate (res.mystring, newlength + 1); - memcpy (res.mystring, mystring + FromIndex - 1, newlength); - res.mystring[newlength] = '\0'; - res.mylength = newlength; - return ; -} - -// ---------------------------------------------------------------------------- -// Token -// Private -// ---------------------------------------------------------------------------- -void TCollection_AsciiString::Token(const Standard_CString separators, - const Standard_Integer whichone, - TCollection_AsciiString& res)const -{ - res = Token( separators , whichone ) ; -} - // ---------------------------------------------------------------------------- // Token // ---------------------------------------------------------------------------- @@ -1344,3 +1263,65 @@ Standard_Character TCollection_AsciiString::Value } throw Standard_OutOfRange("TCollection_AsciiString::Value : parameter where"); } + +//======================================================================= +//function : allocate +//purpose : +//======================================================================= +void TCollection_AsciiString::allocate(const int theLength) +{ + mylength = theLength; + if (theLength == 0) + { + mystring = THE_DEFAULT_CHAR_STRING; + } + else + { + const Standard_Size aRoundSize = (theLength + 4) & ~0x3; + mystring = static_cast( + Standard::AllocateOptimal(aRoundSize)); + mystring[mylength] = '\0'; + } +} + +//======================================================================= +//function : reallocate +//purpose : +//======================================================================= +void TCollection_AsciiString::reallocate(const int theLength) +{ + if (theLength != 0) + { + if (mystring == THE_DEFAULT_CHAR_STRING) + { + const Standard_Size aRoundSize = (theLength + 4) & ~0x3; + mystring = static_cast( + Standard::AllocateOptimal(aRoundSize)); + } + else + { + mystring = static_cast( + Standard::Reallocate(mystring, theLength + 1)); + } + mystring[theLength] = '\0'; + } + if (mystring != THE_DEFAULT_CHAR_STRING) + { + mystring[theLength] = '\0'; + } + mylength = theLength; +} + +//======================================================================= +//function : deallocate +//purpose : +//======================================================================= +void TCollection_AsciiString::deallocate() +{ + if (mystring != THE_DEFAULT_CHAR_STRING) + { + Standard::Free(mystring); + } + mylength = 0; + mystring = THE_DEFAULT_CHAR_STRING; +} diff --git a/src/TCollection/TCollection_AsciiString.hxx b/src/TCollection/TCollection_AsciiString.hxx index 0e5d2ff82a..b017ef4857 100644 --- a/src/TCollection/TCollection_AsciiString.hxx +++ b/src/TCollection/TCollection_AsciiString.hxx @@ -75,13 +75,7 @@ public: Standard_EXPORT TCollection_AsciiString(const TCollection_AsciiString& astring); //! Move constructor - TCollection_AsciiString (TCollection_AsciiString&& theOther) Standard_Noexcept - : mystring (theOther.mystring), - mylength (theOther.mylength) - { - theOther.mystring = NULL; - theOther.mylength = 0; - } + Standard_EXPORT TCollection_AsciiString (TCollection_AsciiString&& theOther) Standard_Noexcept; //! Initializes a AsciiString with copy of another AsciiString //! concatenated with the message character. @@ -268,16 +262,26 @@ void operator = (const Standard_CString fromwhere) //! Used as operator = //! Example: aString = anotherString; Standard_EXPORT void Copy (const TCollection_AsciiString& fromwhere); -void operator = (const TCollection_AsciiString& fromwhere) -{ - Copy(fromwhere); -} - //! Exchange the data of two strings (without reallocating memory). - Standard_EXPORT void Swap (TCollection_AsciiString& theOther); + //! Copy assignment operator + TCollection_AsciiString& operator= (const TCollection_AsciiString& theOther) + { + Copy(theOther); + return *this; + } + + //! Moves string without reallocations + Standard_EXPORT void Move (TCollection_AsciiString&& theOther); //! Move assignment operator - TCollection_AsciiString& operator= (TCollection_AsciiString&& theOther) Standard_Noexcept { Swap (theOther); return *this; } + TCollection_AsciiString& operator= (TCollection_AsciiString&& theOther) noexcept + { + Move(std::forward(theOther)); + return *this; + } + + //! Exchange the data of two strings (without reallocating memory). + Standard_EXPORT void Swap (TCollection_AsciiString& theOther); //! Frees memory allocated by AsciiString. Standard_EXPORT ~TCollection_AsciiString(); @@ -670,12 +674,10 @@ friend Standard_EXPORT Standard_IStream& operator >> (Standard_IStream& astream, //! aString.Value(2) returns 'e' Standard_EXPORT Standard_Character Value (const Standard_Integer where) const; - //! Computes a hash code for the given ASCII string, in the range [1, theUpperBound]. + //! Computes a hash code for the given ASCII string //! Returns the same integer value as the hash function for TCollection_ExtendedString - //! @param theAsciiString the ASCII string which hash code is to be computed - //! @param theUpperBound the upper bound of the range a computing hash code must be within - //! @return a computed hash code, in the range [1, theUpperBound] - static Standard_Integer HashCode (const TCollection_AsciiString& theAsciiString, Standard_Integer theUpperBound); + //! @return a computed hash code + size_t HashCode() const; //! Returns True when the two strings are the same. //! (Just for HashCode for AsciiString) @@ -694,17 +696,19 @@ friend class TCollection_HAsciiString; private: - Standard_EXPORT void Split (const Standard_Integer where, TCollection_AsciiString& result); - - Standard_EXPORT void SubString (const Standard_Integer FromIndex, const Standard_Integer ToIndex, TCollection_AsciiString& result) const; - - Standard_EXPORT void Token (const Standard_CString separators, const Standard_Integer whichone, TCollection_AsciiString& result) const; + //! Internal wrapper to allocate on stack or heap + void allocate(const int theLength); -private: + //! Internal wrapper to reallocate on stack or heap + void reallocate(const int theLength); - Standard_PCharacter mystring; //!< NULL-terminated string - Standard_Integer mylength; //!< length in bytes (excluding terminating NULL symbol) + //! Internal wrapper to deallocate on stack + void deallocate(); + +private: + Standard_PCharacter mystring{}; //!< NULL-terminated string + Standard_Integer mylength{}; //!< length in bytes (excluding terminating NULL symbol) }; #include diff --git a/src/TCollection/TCollection_AsciiString.lxx b/src/TCollection/TCollection_AsciiString.lxx index 2eef2fd155..056e24382c 100644 --- a/src/TCollection/TCollection_AsciiString.lxx +++ b/src/TCollection/TCollection_AsciiString.lxx @@ -14,19 +14,23 @@ #include #include +#include +#include "TCollection_AsciiString.hxx" // definition global methods for using in NCollection -//! Computes a hash code for the given ASCII string, in the range [1, theUpperBound] -//! @param theAsciiString the ASCII string which hash code is to be computed -//! @param theUpperBound the upper bound of the range a computing hash code must be within -//! @return a computed hash code, in the range [1, theUpperBound] -inline Standard_Integer HashCode (const TCollection_AsciiString& theAsciiString, const Standard_Integer theUpperBound) +namespace std { - return TCollection_AsciiString::HashCode (theAsciiString, theUpperBound); + template <> + struct hash + { + size_t operator()(const TCollection_AsciiString& theString) const + { + return theString.HashCode(); + } + }; } - //------------------------------------------------------------------------ // IsEqual //------------------------------------------------------------------------ @@ -36,8 +40,6 @@ inline Standard_Boolean IsEqual(const TCollection_AsciiString& string1, return TCollection_AsciiString::IsEqual(string1,string2); } - - // ---------------------------------------------------------------------------- // ToCString // ---------------------------------------------------------------------------- @@ -83,10 +85,13 @@ inline TCollection_AsciiString TCollection_AsciiString::Cat(const Standard_Real // function : HashCode // purpose : //============================================================================ -inline Standard_Integer TCollection_AsciiString::HashCode (const TCollection_AsciiString& theAsciiString, - const Standard_Integer theUpperBound) +inline size_t TCollection_AsciiString::HashCode() const { - return ::HashCode (theAsciiString.ToCString(), theAsciiString.Length(), theUpperBound); + if (mylength < 4) + { + return opencascade::FNVHash::hash_combine(*mystring, mylength); + } + return opencascade::hashBytes(mystring, mylength); } diff --git a/src/TCollection/TCollection_ExtendedString.cxx b/src/TCollection/TCollection_ExtendedString.cxx index 2a83bab603..c87bedcdfd 100644 --- a/src/TCollection/TCollection_ExtendedString.cxx +++ b/src/TCollection/TCollection_ExtendedString.cxx @@ -23,20 +23,7 @@ namespace { - //! Allocate string buffer (automatically adding extra symbol for NULL-termination). - static Standard_ExtCharacter* allocateExtChars (const Standard_Size theLength) - { - return (Standard_ExtCharacter* )Standard::Allocate ((theLength + 1) * sizeof(Standard_ExtCharacter)); - } - - //! Re-allocate string buffer (automatically adding extra symbol for NULL-termination). - static Standard_ExtCharacter* reallocateExtChars (Standard_Address theAddr, - const Standard_Size theLength) - { - return (Standard_ExtCharacter* )Standard::Reallocate (theAddr, (theLength + 1) * sizeof(Standard_ExtCharacter)); - } - - static const Standard_ExtCharacter NULL_EXTSTRING[1] = {0}; + static Standard_ExtCharacter THE_DEFAULT_EXT_CHAR_STRING[1] = {0}; //! Returns the number of 16-bit code units in Unicode string template @@ -57,7 +44,12 @@ namespace Standard_Integer& theLength) { theLength = nbSymbols (theUtfString); - Standard_ExtCharacter* aString = allocateExtChars (theLength); + if (theLength == 0) + { + return THE_DEFAULT_EXT_CHAR_STRING; + } + const Standard_Size aRoundSize = (((theLength + 1) * sizeof(Standard_ExtCharacter)) + 3) & ~0x3; + Standard_ExtCharacter* aString = static_cast(Standard::AllocateOptimal(aRoundSize)); NCollection_UtfWideIter anIterRead (theUtfString); for (Standard_ExtCharacter* anIterWrite = aString; *anIterRead != 0; ++anIterRead) { @@ -73,7 +65,12 @@ namespace Standard_Integer& theLength) { for (theLength = 0; theUtfString[theLength] != 0; ++theLength) {} - Standard_ExtCharacter* aString = allocateExtChars (theLength); + if (theLength == 0) + { + return THE_DEFAULT_EXT_CHAR_STRING; + } + const Standard_Size aRoundSize = (((theLength + 1) * sizeof(Standard_ExtCharacter)) + 3) & ~0x3; + Standard_ExtCharacter* aString = static_cast(Standard::AllocateOptimal(aRoundSize)); const Standard_Integer aSize = theLength * sizeof(Standard_ExtCharacter); memcpy (aString, theUtfString, aSize); aString[theLength] = 0; @@ -86,10 +83,8 @@ namespace // Create an empty ExtendedString // ---------------------------------------------------------------------------- TCollection_ExtendedString::TCollection_ExtendedString() -: mystring (allocateExtChars (0)), - mylength (0) { - mystring[0] = 0; + allocate(0); } //---------------------------------------------------------------------------- @@ -97,9 +92,7 @@ TCollection_ExtendedString::TCollection_ExtendedString() //---------------------------------------------------------------------------- TCollection_ExtendedString::TCollection_ExtendedString (const Standard_CString theString, - const Standard_Boolean isMultiByte) -: mystring (NULL), - mylength (0) + const Standard_Boolean isMultiByte) { if (theString == NULL) { @@ -108,30 +101,28 @@ TCollection_ExtendedString::TCollection_ExtendedString if (isMultiByte) { - mylength = nbSymbols (theString); - mystring = allocateExtChars (mylength); + allocate(nbSymbols(theString)); mystring[mylength] = 0; if (ConvertToUnicode (theString)) { return; } + reallocate((int)strlen(theString)); + } + else + { + allocate((int)strlen(theString)); } - - mylength = (int)strlen(theString); - mystring = reallocateExtChars (mystring, mylength); for (int aCharIter = 0; aCharIter < mylength; ++aCharIter) { mystring[aCharIter] = ToExtCharacter (theString[aCharIter]); } - mystring[mylength] = 0; } //--------------------------------------------------------------------------- // Create an ExtendedString from an ExtString //-------------------------------------------------------------------------- TCollection_ExtendedString::TCollection_ExtendedString (const Standard_ExtString theString) -: mystring (NULL), - mylength (0) { if (theString == NULL) { @@ -139,18 +130,14 @@ TCollection_ExtendedString::TCollection_ExtendedString (const Standard_ExtString } for (mylength = 0; theString[mylength] != 0; ++mylength) {} - mystring = allocateExtChars (mylength); - const Standard_Integer aSizeBytes = mylength * sizeof(Standard_ExtCharacter); - memcpy (mystring, theString, aSizeBytes); - mystring[mylength] = 0; + allocate (mylength); + memcpy (mystring, theString, mylength * sizeof(Standard_ExtCharacter)); } // ---------------------------------------------------------------------------- // TCollection_ExtendedString // ---------------------------------------------------------------------------- TCollection_ExtendedString::TCollection_ExtendedString (const Standard_WideChar* theStringUtf) -: mystring (NULL), - mylength (0) { if (theStringUtf == NULL) { @@ -166,17 +153,14 @@ TCollection_ExtendedString::TCollection_ExtendedString (const Standard_WideChar* TCollection_ExtendedString::TCollection_ExtendedString (const Standard_Character aChar) { - if ( aChar != '\0' ) { - mylength = 1; - mystring = allocateExtChars (1); + if ( aChar != '\0' ) + { + allocate(1); mystring[0] = ToExtCharacter(aChar); - mystring[1] = 0; } - else { - // mystring = 0L; - mylength = 0; - mystring = allocateExtChars (0); - mystring[0] = 0; + else + { + allocate(0); } } @@ -186,10 +170,8 @@ TCollection_ExtendedString::TCollection_ExtendedString TCollection_ExtendedString::TCollection_ExtendedString (const Standard_ExtCharacter aChar) { - mylength = 1; - mystring = allocateExtChars (1); + allocate(1); mystring[0] = aChar; - mystring[1] = 0; } // ---------------------------------------------------------------------------- @@ -199,10 +181,8 @@ TCollection_ExtendedString::TCollection_ExtendedString (const Standard_Integer length, const Standard_ExtCharacter filler ) { - mystring = allocateExtChars (length); - mylength = length; + allocate(length); for (int i = 0 ; i < length ; i++) mystring[i] = filler; - mystring[mylength] = 0; } // ---------------------------------------------------------------------------- @@ -214,10 +194,8 @@ TCollection_ExtendedString::TCollection_ExtendedString union {int bid ; char t [13];} CHN ; Sprintf(&CHN.t[0],"%d",aValue); - mylength = (int)strlen(CHN.t); - mystring = allocateExtChars (mylength); + allocate((int)strlen(CHN.t)); for (int i = 0 ; i < mylength ; i++) mystring[i] = ToExtCharacter(CHN.t[i]); - mystring[mylength] = 0; } // ---------------------------------------------------------------------------- @@ -229,23 +207,37 @@ TCollection_ExtendedString::TCollection_ExtendedString union {int bid ; char t [50];} CHN ; Sprintf(&CHN.t[0],"%g",aValue); - mylength = (int)strlen( CHN.t ); - mystring = allocateExtChars (mylength); + allocate((int)strlen(CHN.t)); for (int i = 0 ; i < mylength ; i++) mystring[i] = ToExtCharacter(CHN.t[i]); - mystring[mylength] = 0; } //----------------------------------------------------------------------------- // create an extendedstring from an extendedstring // ---------------------------------------------------------------------------- TCollection_ExtendedString::TCollection_ExtendedString - (const TCollection_ExtendedString& astring) + (const TCollection_ExtendedString& theOther) { - const Standard_Integer aSizeBytes = astring.mylength * sizeof(Standard_ExtCharacter); - mylength = astring.mylength; - mystring = allocateExtChars (astring.mylength); - memcpy (mystring, astring.mystring, aSizeBytes); - mystring[mylength] = 0; + allocate(theOther.mylength); + memcpy(mystring, theOther.mystring, mylength * sizeof(Standard_ExtCharacter)); +} + +//======================================================================= +//function : TCollection_ExtendedString +//purpose : +//======================================================================= +TCollection_ExtendedString::TCollection_ExtendedString (TCollection_ExtendedString&& theOther) noexcept +{ + if (theOther.mystring == THE_DEFAULT_EXT_CHAR_STRING) + { + allocate(0); + } + else + { + mystring = theOther.mystring; + mylength = theOther.mylength; + } + theOther.mystring = THE_DEFAULT_EXT_CHAR_STRING; + theOther.mylength = 0; } //--------------------------------------------------------------------------- @@ -255,22 +247,17 @@ TCollection_ExtendedString::TCollection_ExtendedString (const TCollection_AsciiString& theString, const Standard_Boolean isMultiByte) { - mylength = nbSymbols (theString.ToCString()); - mystring = allocateExtChars (mylength); - mystring[mylength] = 0; + allocate(nbSymbols (theString.ToCString())); if (isMultiByte && ConvertToUnicode (theString.ToCString())) { return; } - - mylength = theString.Length(); - mystring = reallocateExtChars (mystring, mylength); + reallocate(theString.Length()); Standard_CString aCString = theString.ToCString(); for (Standard_Integer aCharIter = 0; aCharIter <= mylength; ++aCharIter) { mystring[aCharIter] = ToExtCharacter (aCString[aCharIter]); } - mystring[mylength] = 0; } // ---------------------------------------------------------------------------- @@ -284,19 +271,9 @@ void TCollection_ExtendedString::AssignCat (const TCollection_ExtendedString& th } const Standard_Integer anOtherLength = theOther.mylength; - const Standard_Integer aNewlength = mylength + anOtherLength; - if (mystring != NULL) - { - mystring = reallocateExtChars (mystring, aNewlength); - memcpy (mystring + mylength, theOther.mystring, anOtherLength * sizeof(Standard_ExtCharacter)); - } - else - { - mystring = allocateExtChars (aNewlength); - memcpy (mystring, theOther.mystring, anOtherLength * sizeof(Standard_ExtCharacter)); - } - mylength = aNewlength; - mystring[mylength] = 0; + const Standard_Integer anOldLength = mylength; + reallocate(mylength + anOtherLength); + memcpy (mystring + anOldLength, theOther.mystring, anOtherLength * sizeof(Standard_ExtCharacter)); } // ---------------------------------------------------------------------------- @@ -306,10 +283,8 @@ void TCollection_ExtendedString::AssignCat(const Standard_Utf16Char theChar) { if (theChar != '\0') { - mystring = reallocateExtChars(mystring, mylength + 1); - mystring[mylength] = theChar; - mylength += 1; - mystring[mylength] = '\0'; + reallocate(mylength + 1); + mystring[mylength - 1] = theChar; } } @@ -342,45 +317,55 @@ void TCollection_ExtendedString::ChangeAll(const Standard_ExtCharacter aChar, // ---------------------------------------------------------------------------- void TCollection_ExtendedString::Clear() { - if (mylength == 0) - { - return; - } - - Standard::Free (mystring); - mylength = 0; - mystring = allocateExtChars (mylength); - mystring[0] = 0; + deallocate(); } // ---------------------------------------------------------------------------- // Copy // ---------------------------------------------------------------------------- -void TCollection_ExtendedString::Copy (const TCollection_ExtendedString& fromwhere) +void TCollection_ExtendedString::Copy(const TCollection_ExtendedString& fromwhere) { - - if (fromwhere.mystring) { - const Standard_Integer newlength = fromwhere.mylength; - const Standard_Integer aSizeBytes = newlength * sizeof(Standard_ExtCharacter); - if (mystring != NULL) - { - mystring = reallocateExtChars (mystring, newlength); - } - else { - mystring = allocateExtChars (newlength); - } - mylength = newlength; - memcpy (mystring, fromwhere.mystring, aSizeBytes); + if (&fromwhere == this) + { + return; + } + if (fromwhere.mystring && fromwhere.mylength > 0) + { + reallocate (fromwhere.mylength); + memcpy (mystring, fromwhere.mystring, mylength * sizeof(Standard_ExtCharacter)); + } + else if (mystring != THE_DEFAULT_EXT_CHAR_STRING) + { + mylength = 0; mystring[mylength] = 0; } +} + +//======================================================================= +//function : Move +//purpose : +//======================================================================= +void TCollection_ExtendedString::Move(TCollection_ExtendedString&& theOther) +{ + if (&theOther == this) + { + return; + } + if (theOther.mystring == THE_DEFAULT_EXT_CHAR_STRING) + { + reallocate(0); + } else { - if (mystring != 0) + if (mystring != THE_DEFAULT_EXT_CHAR_STRING) { - mylength = 0; - mystring[0] = 0; + Standard::Free(mystring); } + mystring = theOther.mystring; + mylength = theOther.mylength; } + theOther.mystring = THE_DEFAULT_EXT_CHAR_STRING; + theOther.mylength = 0; } // ---------------------------------------------------------------------------- @@ -388,7 +373,11 @@ void TCollection_ExtendedString::Copy (const TCollection_ExtendedString& fromwhe // ---------------------------------------------------------------------------- void TCollection_ExtendedString::Swap (TCollection_ExtendedString& theOther) { - std::swap (mystring, theOther.mystring); + if (&theOther == this) + { + return; + } + std::swap(mystring, theOther.mystring); std::swap (mylength, theOther.mylength); } @@ -397,8 +386,7 @@ void TCollection_ExtendedString::Swap (TCollection_ExtendedString& theOther) // ---------------------------------------------------------------------------- TCollection_ExtendedString::~TCollection_ExtendedString() { - if (mystring) Standard::Free(mystring); - mystring = 0L; + deallocate (); } //---------------------------------------------------------------------------- @@ -413,21 +401,12 @@ void TCollection_ExtendedString::Insert(const Standard_Integer where, if (where < 0) throw Standard_OutOfRange("TCollection_ExtendedString::Insert : " "Parameter where is negative"); - - if (mystring != NULL) - { - mystring = reallocateExtChars (mystring, mylength + 1); - } - else { - mystring = allocateExtChars (mylength + 1); - } - if (where != mylength +1) { - for (int i=mylength-1; i >= where-1; i--) + reallocate(mylength + 1); + if (where != mylength) { + for (int i=mylength-2; i >= where-1; i--) mystring[i+1] = mystring[i]; } mystring[where-1] = what; - mylength++; - mystring[mylength] = 0; } // ---------------------------------------------------------------------------- @@ -440,23 +419,14 @@ void TCollection_ExtendedString::Insert(const Standard_Integer where, if (where <= mylength + 1) { Standard_Integer whatlength = what.mylength; if(whatlength) { - Standard_Integer newlength = mylength + whatlength; - - if (mystring) { - mystring = reallocateExtChars (mystring, newlength); - } - else { - mystring = allocateExtChars (newlength); - } - if (where != mylength +1) { - for (int i=mylength-1; i >= where-1; i--) + const int anOldLength = mylength; + reallocate(mylength + whatlength); + if (where != anOldLength +1) { + for (int i=anOldLength-1; i >= where-1; i--) mystring[i+whatlength] = mystring[i]; } for (int i=0; i < whatlength; i++) mystring[where-1+i] = swhat[i]; - - mylength = newlength; - mystring[mylength] = 0; } } else { @@ -728,17 +698,10 @@ void TCollection_ExtendedString::SetValue Standard_ExtString swhat = what.mystring; size += (where - 1); if (size >= mylength){ - if (mystring) { - mystring = reallocateExtChars (mystring, size); - } - else { - mystring = allocateExtChars (size); - } - mylength = size; + reallocate(size); } for (int i = where-1; i < size; i++) mystring[i] = swhat[i-(where-1)]; - mystring[mylength] = '\0'; } else throw Standard_OutOfRange("TCollection_ExtendedString::SetValue : " @@ -766,13 +729,17 @@ TCollection_ExtendedString TCollection_ExtendedString::Token (const Standard_ExtString separators, const Standard_Integer whichone) const { - TCollection_ExtendedString res; + if (mylength == 0) + { + return TCollection_ExtendedString(); + } + TCollection_ExtendedString res(mylength, 0); if (!separators) throw Standard_NullObject("TCollection_ExtendedString::Token : " "parameter 'separators'"); int i,j,k,l; - Standard_PExtCharacter buftmp = allocateExtChars (mylength); + Standard_PExtCharacter buftmp = res.mystring; Standard_ExtCharacter aSep; Standard_Boolean isSepFound = Standard_False, otherSepFound; @@ -823,13 +790,13 @@ TCollection_ExtendedString TCollection_ExtendedString::Token } } - if (i < whichone) { - buftmp[0] = 0; - Standard::Free(buftmp); + if (i < whichone) + { + res.mylength = 0; + res.mystring[0] = 0; } - else { - Standard::Free(res.mystring); - res.mystring = buftmp; + else + { for ( res.mylength=0; buftmp[res.mylength]; ++res.mylength ); res.mystring[res.mylength] = '\0'; } @@ -841,8 +808,7 @@ TCollection_ExtendedString TCollection_ExtendedString::Token // ---------------------------------------------------------------------------- Standard_ExtString TCollection_ExtendedString::ToExtString() const { - if(mystring) return mystring; - return NULL_EXTSTRING; + return mystring; } // ---------------------------------------------------------------------------- @@ -931,3 +897,64 @@ Standard_Integer TCollection_ExtendedString::ToUTF8CString(Standard_PCharacter& *anIterWrite = '\0'; return Standard_Integer(anIterWrite - theCString); } + +//======================================================================= +//function : allocate +//purpose : +//======================================================================= +void TCollection_ExtendedString::allocate(const int theLength) +{ + mylength = theLength; + if (theLength == 0) + { + mystring = THE_DEFAULT_EXT_CHAR_STRING; + } + else + { + const Standard_Size aRoundSize = (((theLength + 1) * sizeof(Standard_ExtCharacter)) + 3) & ~0x3; + mystring = static_cast( + Standard::AllocateOptimal(aRoundSize)); + mystring[mylength] = '\0'; + } +} + +//======================================================================= +//function : reallocate +//purpose : +//======================================================================= +void TCollection_ExtendedString::reallocate(const int theLength) +{ + if (theLength != 0) + { + if (mystring == THE_DEFAULT_EXT_CHAR_STRING) + { + const Standard_Size aRoundSize = (((theLength + 1) * sizeof(Standard_ExtCharacter)) + 3) & ~0x3; + mystring = static_cast(Standard::AllocateOptimal(aRoundSize)); + } + else + { + mystring = static_cast( + Standard::Reallocate(mystring, (theLength + 1) * sizeof(Standard_ExtCharacter))); + } + mystring[theLength] = 0; + } + if (mystring != THE_DEFAULT_EXT_CHAR_STRING) + { + mystring[theLength] = 0; + } + mylength = theLength; +} + +//======================================================================= +//function : deallocate +//purpose : +//======================================================================= +void TCollection_ExtendedString::deallocate() +{ + if (mystring != THE_DEFAULT_EXT_CHAR_STRING) + { + Standard::Free(mystring); + } + mylength = 0; + mystring = THE_DEFAULT_EXT_CHAR_STRING; +} diff --git a/src/TCollection/TCollection_ExtendedString.hxx b/src/TCollection/TCollection_ExtendedString.hxx index f71869ac6f..d23d2983ac 100644 --- a/src/TCollection/TCollection_ExtendedString.hxx +++ b/src/TCollection/TCollection_ExtendedString.hxx @@ -25,7 +25,6 @@ #include #include #include -#include #include #include #include @@ -99,13 +98,7 @@ public: Standard_EXPORT TCollection_ExtendedString(const TCollection_ExtendedString& astring); //! Move constructor - TCollection_ExtendedString (TCollection_ExtendedString&& theOther) Standard_Noexcept - : mystring (theOther.mystring), - mylength (theOther.mylength) - { - theOther.mystring = NULL; - theOther.mylength = 0; - } + Standard_EXPORT TCollection_ExtendedString (TCollection_ExtendedString&& theOther) Standard_Noexcept; //! Creation by converting an Ascii string to an extended //! string. The string is treated as having UTF-8 coding. @@ -145,16 +138,26 @@ TCollection_ExtendedString operator + (const TCollection_ExtendedString& other) //! Copy to . //! Used as operator = Standard_EXPORT void Copy (const TCollection_ExtendedString& fromwhere); -void operator = (const TCollection_ExtendedString& fromwhere) -{ - Copy(fromwhere); -} - //! Exchange the data of two strings (without reallocating memory). - Standard_EXPORT void Swap (TCollection_ExtendedString& theOther); + //! Copy assignment operator + TCollection_ExtendedString& operator= (const TCollection_ExtendedString& theOther) + { + Copy(theOther); + return *this; + } + + //! Moves string without reallocations + Standard_EXPORT void Move (TCollection_ExtendedString&& theOther); //! Move assignment operator - TCollection_ExtendedString& operator= (TCollection_ExtendedString&& theOther) Standard_Noexcept { Swap (theOther); return *this; } + TCollection_ExtendedString& operator= (TCollection_ExtendedString&& theOther) noexcept + { + Move(std::forward(theOther)); + return *this; + } + + //! Exchange the data of two strings (without reallocating memory). + Standard_EXPORT void Swap (TCollection_ExtendedString& theOther); //! Frees memory allocated by ExtendedString. Standard_EXPORT ~TCollection_ExtendedString(); @@ -331,16 +334,18 @@ friend Standard_EXPORT Standard_OStream& operator << (Standard_OStream& astream, //! the bounds of this extended string. Standard_EXPORT Standard_ExtCharacter Value (const Standard_Integer where) const; - //! Returns a hashed value for the extended string within the range 1 .. theUpper. + //! Returns a hashed value for the extended string. //! Note: if string is ASCII, the computed value is the same as the value computed with the HashCode function on a //! TCollection_AsciiString string composed with equivalent ASCII characters. - //! @param theString the extended string which hash code is to be computed - //! @param theUpperBound the upper bound of the range a computing hash code must be within - //! @return a computed hash code, in the range [1, theUpperBound] - static Standard_Integer HashCode (const TCollection_ExtendedString& theString, - const Standard_Integer theUpperBound) + //! @return a computed hash code + size_t HashCode () const { - return ::HashCode (theString.ToExtString(), theUpperBound); + const int aSize = mylength * sizeof(Standard_ExtCharacter); + if (mylength < 2) + { + return opencascade::FNVHash::hash_combine(*mystring, aSize); + } + return opencascade::hashBytes(mystring, aSize); } //! Returns true if the characters in this extended @@ -365,23 +370,33 @@ friend Standard_EXPORT Standard_OStream& operator << (Standard_OStream& astream, private: //! Returns true if the input CString was successfully converted to UTF8 coding. - Standard_EXPORT Standard_Boolean ConvertToUnicode (const Standard_CString astring); + Standard_Boolean ConvertToUnicode (const Standard_CString astring); -private: + //! Internal wrapper to allocate on stack or heap + void allocate(const int theLength); - Standard_PExtCharacter mystring; //!< NULL-terminated string - Standard_Integer mylength; //!< length in 16-bit code units (excluding terminating NULL symbol) + //! Internal wrapper to reallocate on stack or heap + void reallocate(const int theLength); + //! Internal wrapper to deallocate on stack + void deallocate(); + +private: + + Standard_PExtCharacter mystring{}; //!< NULL-terminated string + Standard_Integer mylength{}; //!< length in 16-bit code units (excluding terminating NULL symbol) }; -//! Computes a hash code for the given extended string, in the range [1, theUpperBound] -//! @param theExtendedString the extended string which hash code is to be computed -//! @param theUpperBound the upper bound of the range a computing hash code must be within -//! @return a computed hash code, in the range [1, theUpperBound] -inline Standard_Integer HashCode (const TCollection_ExtendedString& theExtendedString, - const Standard_Integer theUpperBound) +namespace std { - return TCollection_ExtendedString::HashCode (theExtendedString, theUpperBound); + template <> + struct hash + { + size_t operator()(const TCollection_ExtendedString& theString) const + { + return theString.HashCode(); + } + }; } #endif // _TCollection_ExtendedString_HeaderFile diff --git a/src/TCollection/TCollection_HAsciiString.hxx b/src/TCollection/TCollection_HAsciiString.hxx index 51ef876ef7..ed66eec3e6 100644 --- a/src/TCollection/TCollection_HAsciiString.hxx +++ b/src/TCollection/TCollection_HAsciiString.hxx @@ -66,6 +66,11 @@ public: //! Initializes a HAsciiString with a AsciiString. Standard_EXPORT TCollection_HAsciiString(const TCollection_AsciiString& aString); + + //! Initializes a HAsciiString with a AsciiString. + TCollection_HAsciiString(TCollection_AsciiString&& theString) noexcept : + myString(std::move(theString)) + {} //! Initializes a HAsciiString with a HAsciiString. Standard_EXPORT TCollection_HAsciiString(const Handle(TCollection_HAsciiString)& aString); diff --git a/src/TCollection/TCollection_HAsciiString.lxx b/src/TCollection/TCollection_HAsciiString.lxx index f097751cf4..e5a92d89ce 100644 --- a/src/TCollection/TCollection_HAsciiString.lxx +++ b/src/TCollection/TCollection_HAsciiString.lxx @@ -41,3 +41,27 @@ inline const TCollection_AsciiString& TCollection_HAsciiString::String() const // ---------------------------------------------------------------------------- inline Standard_CString TCollection_HAsciiString::ToCString() const { return myString.ToCString(); } + +namespace std +{ + template <> + struct hash + { + size_t operator()(const Handle(TCollection_HAsciiString)& theString) const + { + if (theString.IsNull()) return 0; + return std::hash{}(theString->String()); + } + }; + + template<> + struct equal_to + { + bool operator()(const Handle(TCollection_HAsciiString)& theString1, + const Handle(TCollection_HAsciiString)& theString2) const + { + return theString1 == theString2 || + (!theString1.IsNull() && !theString2.IsNull() && theString1->String() == theString2->String()); + } + }; +} diff --git a/src/TCollection/TCollection_HExtendedString.hxx b/src/TCollection/TCollection_HExtendedString.hxx index 6c5a7a3460..a1527b218a 100644 --- a/src/TCollection/TCollection_HExtendedString.hxx +++ b/src/TCollection/TCollection_HExtendedString.hxx @@ -64,8 +64,13 @@ public: //! and filled with . This is useful for buffers. Standard_EXPORT TCollection_HExtendedString(const Standard_Integer length, const Standard_ExtCharacter filler); - //! Initializes a HExtendedString with a HExtendedString. + //! Initializes a HExtendedString with a ExtendedString. Standard_EXPORT TCollection_HExtendedString(const TCollection_ExtendedString& aString); + + //! Initializes a HExtendedString with a ExtendedString. + TCollection_HExtendedString(TCollection_ExtendedString&& theString) noexcept : + myString(std::move(theString)) + {} //! Initializes a HExtendedString with an HAsciiString. Standard_EXPORT TCollection_HExtendedString(const Handle(TCollection_HAsciiString)& aString); @@ -218,10 +223,29 @@ private: }; - - - - - +namespace std +{ + template <> + struct hash + { + size_t operator()(const Handle(TCollection_HExtendedString)& theString) const + { + if (theString.IsNull()) return 0; + return std::hash{}(theString->String()); + } + }; + + template<> + struct equal_to + { + bool operator()(const Handle(TCollection_HExtendedString)& theString1, + const Handle(TCollection_HExtendedString)& theString2) const + { + return theString1 == theString2 || + (!theString1.IsNull() && !theString2.IsNull() && theString1->String() == theString2->String()); + + } + }; +} #endif // _TCollection_HExtendedString_HeaderFile diff --git a/src/TDF/FILES b/src/TDF/FILES index b6f97ecf00..61744e3479 100755 --- a/src/TDF/FILES +++ b/src/TDF/FILES @@ -82,7 +82,6 @@ TDF_LabelIndexedMap.hxx TDF_LabelIntegerMap.hxx TDF_LabelList.hxx TDF_LabelMap.hxx -TDF_LabelMapHasher.hxx TDF_LabelNode.cxx TDF_LabelNode.hxx TDF_LabelNodePtr.hxx diff --git a/src/TDF/TDF_AttributeDataMap.hxx b/src/TDF/TDF_AttributeDataMap.hxx index b679eea2e1..49630919b2 100644 --- a/src/TDF/TDF_AttributeDataMap.hxx +++ b/src/TDF/TDF_AttributeDataMap.hxx @@ -17,11 +17,10 @@ #define TDF_AttributeDataMap_HeaderFile #include -#include #include -typedef NCollection_DataMap TDF_AttributeDataMap; -typedef NCollection_DataMap::Iterator TDF_DataMapIteratorOfAttributeDataMap; +typedef NCollection_DataMap TDF_AttributeDataMap; +typedef NCollection_DataMap::Iterator TDF_DataMapIteratorOfAttributeDataMap; #endif diff --git a/src/TDF/TDF_AttributeDoubleMap.hxx b/src/TDF/TDF_AttributeDoubleMap.hxx index acbc467847..6338f07100 100644 --- a/src/TDF/TDF_AttributeDoubleMap.hxx +++ b/src/TDF/TDF_AttributeDoubleMap.hxx @@ -18,11 +18,10 @@ #include #include -#include #include -typedef NCollection_DoubleMap TDF_AttributeDoubleMap; -typedef NCollection_DoubleMap::Iterator TDF_DoubleMapIteratorOfAttributeDoubleMap; +typedef NCollection_DoubleMap TDF_AttributeDoubleMap; +typedef NCollection_DoubleMap::Iterator TDF_DoubleMapIteratorOfAttributeDoubleMap; #endif diff --git a/src/TDF/TDF_AttributeIndexedMap.hxx b/src/TDF/TDF_AttributeIndexedMap.hxx index 3f785b6dfb..4be5d176f4 100644 --- a/src/TDF/TDF_AttributeIndexedMap.hxx +++ b/src/TDF/TDF_AttributeIndexedMap.hxx @@ -16,11 +16,10 @@ #ifndef TDF_AttributeIndexedMap_HeaderFile #define TDF_AttributeIndexedMap_HeaderFile -#include #include class TDF_Attribute; -typedef NCollection_IndexedMap TDF_AttributeIndexedMap; +typedef NCollection_IndexedMap TDF_AttributeIndexedMap; #endif diff --git a/src/TDF/TDF_AttributeMap.hxx b/src/TDF/TDF_AttributeMap.hxx index 2046c845e7..b6c8d781b4 100644 --- a/src/TDF/TDF_AttributeMap.hxx +++ b/src/TDF/TDF_AttributeMap.hxx @@ -17,11 +17,10 @@ #define TDF_AttributeMap_HeaderFile #include -#include #include -typedef NCollection_Map TDF_AttributeMap; -typedef NCollection_Map::Iterator TDF_MapIteratorOfAttributeMap; +typedef NCollection_Map TDF_AttributeMap; +typedef NCollection_Map::Iterator TDF_MapIteratorOfAttributeMap; #endif diff --git a/src/TDF/TDF_CopyTool.cxx b/src/TDF/TDF_CopyTool.cxx index c355d3a97f..7ed56a2c10 100644 --- a/src/TDF/TDF_CopyTool.cxx +++ b/src/TDF/TDF_CopyTool.cxx @@ -28,6 +28,7 @@ #include #include #include +#include //======================================================================= //function : Copy diff --git a/src/TDF/TDF_DerivedAttribute.cxx b/src/TDF/TDF_DerivedAttribute.cxx index 1a852bcc5f..93deb07ea0 100644 --- a/src/TDF/TDF_DerivedAttribute.cxx +++ b/src/TDF/TDF_DerivedAttribute.cxx @@ -15,6 +15,7 @@ #include #include +#include #include namespace TDF_DerivedAttributeGlobals @@ -35,16 +36,16 @@ namespace TDF_DerivedAttributeGlobals return THE_CREATORS_LIST; } //! Global map of the string-type of derived attribute -> instance of such attribute - static NCollection_DataMap& Attributes() + static NCollection_DataMap& Attributes() { - static NCollection_DataMap THE_DERIVED; + static NCollection_DataMap THE_DERIVED; return THE_DERIVED; } //! Global map of the string-type of derived attribute -> type name to identify this attribute - static NCollection_DataMap& Types() + static NCollection_DataMap& Types() { - static NCollection_DataMap THE_DERIVED_TYPES; + static NCollection_DataMap THE_DERIVED_TYPES; return THE_DERIVED_TYPES; } @@ -154,7 +155,7 @@ void TDF_DerivedAttribute::Attributes (NCollection_List& { Standard_Mutex::Sentry aSentry (TDF_DerivedAttributeGlobals::Mutex()); Initialize(); - NCollection_DataMap::Iterator anAttrIter; + NCollection_DataMap::Iterator anAttrIter; for (anAttrIter.Initialize (TDF_DerivedAttributeGlobals::Attributes()); anAttrIter.More(); anAttrIter.Next()) { theList.Append (anAttrIter.Value()); diff --git a/src/TDF/TDF_GUIDProgIDMap.hxx b/src/TDF/TDF_GUIDProgIDMap.hxx index ebb4be6cee..ded17627dc 100644 --- a/src/TDF/TDF_GUIDProgIDMap.hxx +++ b/src/TDF/TDF_GUIDProgIDMap.hxx @@ -20,8 +20,8 @@ #include #include -typedef NCollection_DoubleMap TDF_GUIDProgIDMap; -typedef NCollection_DoubleMap::Iterator TDF_DoubleMapIteratorOfGUIDProgIDMap; +typedef NCollection_DoubleMap TDF_GUIDProgIDMap; +typedef NCollection_DoubleMap::Iterator TDF_DoubleMapIteratorOfGUIDProgIDMap; #endif diff --git a/src/TDF/TDF_IDMap.hxx b/src/TDF/TDF_IDMap.hxx index 51f3f2ad53..905210fa14 100644 --- a/src/TDF/TDF_IDMap.hxx +++ b/src/TDF/TDF_IDMap.hxx @@ -19,8 +19,8 @@ #include #include -typedef NCollection_Map TDF_IDMap; -typedef NCollection_Map::Iterator TDF_MapIteratorOfIDMap; +typedef NCollection_Map TDF_IDMap; +typedef NCollection_Map::Iterator TDF_MapIteratorOfIDMap; #endif diff --git a/src/TDF/TDF_Label.hxx b/src/TDF/TDF_Label.hxx index 0cadd9d69f..fc0a6d66e9 100644 --- a/src/TDF/TDF_Label.hxx +++ b/src/TDF/TDF_Label.hxx @@ -259,8 +259,9 @@ friend class TDF_ChildIterator; friend class TDF_Attribute; friend class TDF_AttributeIterator; friend class TDF_Data; -friend class TDF_LabelMapHasher; +template +friend struct std::hash; protected: diff --git a/src/TDF/TDF_Label.lxx b/src/TDF/TDF_Label.lxx index befb84940b..118ea23cb8 100644 --- a/src/TDF/TDF_Label.lxx +++ b/src/TDF/TDF_Label.lxx @@ -23,6 +23,18 @@ #include #include +namespace std +{ + template<> + struct hash + { + size_t operator()(const TDF_Label& theNode) const + { + return std::hash{}(theNode.myLabelNode); + } + }; +} + inline TDF_Label::TDF_Label() :myLabelNode(NULL) {} diff --git a/src/TDF/TDF_LabelDataMap.hxx b/src/TDF/TDF_LabelDataMap.hxx index d428d85b65..10462f131c 100644 --- a/src/TDF/TDF_LabelDataMap.hxx +++ b/src/TDF/TDF_LabelDataMap.hxx @@ -17,11 +17,10 @@ #define TDF_LabelDataMap_HeaderFile #include -#include #include -typedef NCollection_DataMap TDF_LabelDataMap; -typedef NCollection_DataMap::Iterator TDF_DataMapIteratorOfLabelDataMap; +typedef NCollection_DataMap TDF_LabelDataMap; +typedef NCollection_DataMap::Iterator TDF_DataMapIteratorOfLabelDataMap; #endif diff --git a/src/TDF/TDF_LabelDoubleMap.hxx b/src/TDF/TDF_LabelDoubleMap.hxx index 1c6213b3b7..eed89a6a1c 100644 --- a/src/TDF/TDF_LabelDoubleMap.hxx +++ b/src/TDF/TDF_LabelDoubleMap.hxx @@ -16,11 +16,11 @@ #ifndef TDF_LabelDoubleMap_HeaderFile #define TDF_LabelDoubleMap_HeaderFile -#include +#include #include -typedef NCollection_DoubleMap TDF_LabelDoubleMap; -typedef NCollection_DoubleMap::Iterator TDF_DoubleMapIteratorOfLabelDoubleMap; +typedef NCollection_DoubleMap TDF_LabelDoubleMap; +typedef NCollection_DoubleMap::Iterator TDF_DoubleMapIteratorOfLabelDoubleMap; #endif diff --git a/src/TDF/TDF_LabelIndexedMap.hxx b/src/TDF/TDF_LabelIndexedMap.hxx index 8aba7f2dff..53554bfc41 100644 --- a/src/TDF/TDF_LabelIndexedMap.hxx +++ b/src/TDF/TDF_LabelIndexedMap.hxx @@ -16,10 +16,9 @@ #ifndef TDF_LabelIndexedMap_HeaderFile #define TDF_LabelIndexedMap_HeaderFile -#include #include -typedef NCollection_IndexedMap TDF_LabelIndexedMap; +typedef NCollection_IndexedMap TDF_LabelIndexedMap; #endif diff --git a/src/TDF/TDF_LabelIntegerMap.hxx b/src/TDF/TDF_LabelIntegerMap.hxx index 2b16c742c7..a9f31c691c 100644 --- a/src/TDF/TDF_LabelIntegerMap.hxx +++ b/src/TDF/TDF_LabelIntegerMap.hxx @@ -18,11 +18,10 @@ #include #include -#include #include -typedef NCollection_DataMap TDF_LabelIntegerMap; -typedef NCollection_DataMap::Iterator TDF_DataMapIteratorOfLabelIntegerMap; +typedef NCollection_DataMap TDF_LabelIntegerMap; +typedef NCollection_DataMap::Iterator TDF_DataMapIteratorOfLabelIntegerMap; #endif diff --git a/src/TDF/TDF_LabelMap.hxx b/src/TDF/TDF_LabelMap.hxx index cf928d1285..aeb1ff73bb 100644 --- a/src/TDF/TDF_LabelMap.hxx +++ b/src/TDF/TDF_LabelMap.hxx @@ -17,11 +17,10 @@ #define TDF_LabelMap_HeaderFile #include -#include #include -typedef NCollection_Map TDF_LabelMap; -typedef NCollection_Map::Iterator TDF_MapIteratorOfLabelMap; +typedef NCollection_Map TDF_LabelMap; +typedef NCollection_Map::Iterator TDF_MapIteratorOfLabelMap; #endif diff --git a/src/TDF/TDF_LabelMapHasher.hxx b/src/TDF/TDF_LabelMapHasher.hxx deleted file mode 100644 index 9084d15c2f..0000000000 --- a/src/TDF/TDF_LabelMapHasher.hxx +++ /dev/null @@ -1,43 +0,0 @@ -// Created by: DAUTRY Philippe -// 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 _TDF_LabelMapHasher_HeaderFile -#define _TDF_LabelMapHasher_HeaderFile - -#include - -//! A label hasher for label maps. -class TDF_LabelMapHasher -{ -public: - //! Computes a hash code for the given label, in the range [1, theUpperBound] - //! @param theLabel the label which hash code is to be computed - //! @param theUpperBound the upper bound of the range a computing hash code must be within - //! @return a computed hash code, in the range [1, theUpperBound] - static Standard_Integer HashCode(const TDF_Label& theLabel, const Standard_Integer theUpperBound) - { - return ::HashCode(theLabel.myLabelNode, theUpperBound); - } - - //! Returns True when the two keys are the same. Two - //! same keys must have the same hashcode, the - //! contrary is not necessary. - static Standard_Boolean IsEqual(const TDF_Label& aLab1, const TDF_Label& aLab2) - { - return aLab1.IsEqual(aLab2); - } -}; - -#endif // _TDF_LabelMapHasher_HeaderFile diff --git a/src/TDataStd/TDataStd_DataMapOfStringByte.hxx b/src/TDataStd/TDataStd_DataMapOfStringByte.hxx index cca3c899b6..94575850f4 100644 --- a/src/TDataStd/TDataStd_DataMapOfStringByte.hxx +++ b/src/TDataStd/TDataStd_DataMapOfStringByte.hxx @@ -20,8 +20,8 @@ #include #include -typedef NCollection_DataMap TDataStd_DataMapOfStringByte; -typedef NCollection_DataMap::Iterator TDataStd_DataMapIteratorOfDataMapOfStringByte; +typedef NCollection_DataMap TDataStd_DataMapOfStringByte; +typedef NCollection_DataMap::Iterator TDataStd_DataMapIteratorOfDataMapOfStringByte; #endif diff --git a/src/TDataStd/TDataStd_DataMapOfStringHArray1OfInteger.hxx b/src/TDataStd/TDataStd_DataMapOfStringHArray1OfInteger.hxx index ece7a88275..522350d7f9 100644 --- a/src/TDataStd/TDataStd_DataMapOfStringHArray1OfInteger.hxx +++ b/src/TDataStd/TDataStd_DataMapOfStringHArray1OfInteger.hxx @@ -21,8 +21,8 @@ #include #include -typedef NCollection_DataMap TDataStd_DataMapOfStringHArray1OfInteger; -typedef NCollection_DataMap::Iterator TDataStd_DataMapIteratorOfDataMapOfStringHArray1OfInteger; +typedef NCollection_DataMap TDataStd_DataMapOfStringHArray1OfInteger; +typedef NCollection_DataMap::Iterator TDataStd_DataMapIteratorOfDataMapOfStringHArray1OfInteger; #endif diff --git a/src/TDataStd/TDataStd_DataMapOfStringHArray1OfReal.hxx b/src/TDataStd/TDataStd_DataMapOfStringHArray1OfReal.hxx index c6c702a5e1..d090a80383 100644 --- a/src/TDataStd/TDataStd_DataMapOfStringHArray1OfReal.hxx +++ b/src/TDataStd/TDataStd_DataMapOfStringHArray1OfReal.hxx @@ -21,8 +21,8 @@ #include #include -typedef NCollection_DataMap TDataStd_DataMapOfStringHArray1OfReal; -typedef NCollection_DataMap::Iterator TDataStd_DataMapIteratorOfDataMapOfStringHArray1OfReal; +typedef NCollection_DataMap TDataStd_DataMapOfStringHArray1OfReal; +typedef NCollection_DataMap::Iterator TDataStd_DataMapIteratorOfDataMapOfStringHArray1OfReal; #endif diff --git a/src/TDataStd/TDataStd_DataMapOfStringReal.hxx b/src/TDataStd/TDataStd_DataMapOfStringReal.hxx index 942e20040c..b6fccc40bc 100644 --- a/src/TDataStd/TDataStd_DataMapOfStringReal.hxx +++ b/src/TDataStd/TDataStd_DataMapOfStringReal.hxx @@ -20,8 +20,8 @@ #include #include -typedef NCollection_DataMap TDataStd_DataMapOfStringReal; -typedef NCollection_DataMap::Iterator TDataStd_DataMapIteratorOfDataMapOfStringReal; +typedef NCollection_DataMap TDataStd_DataMapOfStringReal; +typedef NCollection_DataMap::Iterator TDataStd_DataMapIteratorOfDataMapOfStringReal; #endif diff --git a/src/TDataStd/TDataStd_DataMapOfStringString.hxx b/src/TDataStd/TDataStd_DataMapOfStringString.hxx index 7738b8cc5f..64b79d3285 100644 --- a/src/TDataStd/TDataStd_DataMapOfStringString.hxx +++ b/src/TDataStd/TDataStd_DataMapOfStringString.hxx @@ -20,8 +20,8 @@ #include #include -typedef NCollection_DataMap TDataStd_DataMapOfStringString; -typedef NCollection_DataMap::Iterator TDataStd_DataMapIteratorOfDataMapOfStringString; +typedef NCollection_DataMap TDataStd_DataMapOfStringString; +typedef NCollection_DataMap::Iterator TDataStd_DataMapIteratorOfDataMapOfStringString; #endif diff --git a/src/TDocStd/TDocStd_Document.hxx b/src/TDocStd/TDocStd_Document.hxx index 4e0c752b31..3e025c7ebf 100644 --- a/src/TDocStd/TDocStd_Document.hxx +++ b/src/TDocStd/TDocStd_Document.hxx @@ -24,7 +24,6 @@ #include #include #include -#include #include class TDF_Data; class TDF_Delta; diff --git a/src/TDocStd/TDocStd_LabelIDMapDataMap.hxx b/src/TDocStd/TDocStd_LabelIDMapDataMap.hxx index 1d3029a7fc..bbfa7c6411 100644 --- a/src/TDocStd/TDocStd_LabelIDMapDataMap.hxx +++ b/src/TDocStd/TDocStd_LabelIDMapDataMap.hxx @@ -19,11 +19,10 @@ #include #include -#include #include -typedef NCollection_DataMap TDocStd_LabelIDMapDataMap; -typedef NCollection_DataMap::Iterator TDocStd_DataMapIteratorOfLabelIDMapDataMap; +typedef NCollection_DataMap TDocStd_LabelIDMapDataMap; +typedef NCollection_DataMap::Iterator TDocStd_DataMapIteratorOfLabelIDMapDataMap; #endif diff --git a/src/TFunction/TFunction_DataMapOfGUIDDriver.hxx b/src/TFunction/TFunction_DataMapOfGUIDDriver.hxx index 44b0da4e42..5ef65c958a 100644 --- a/src/TFunction/TFunction_DataMapOfGUIDDriver.hxx +++ b/src/TFunction/TFunction_DataMapOfGUIDDriver.hxx @@ -21,8 +21,8 @@ #include #include -typedef NCollection_DataMap TFunction_DataMapOfGUIDDriver; -typedef NCollection_DataMap::Iterator TFunction_DataMapIteratorOfDataMapOfGUIDDriver; +typedef NCollection_DataMap TFunction_DataMapOfGUIDDriver; +typedef NCollection_DataMap::Iterator TFunction_DataMapIteratorOfDataMapOfGUIDDriver; #endif diff --git a/src/TFunction/TFunction_DataMapOfLabelListOfLabel.hxx b/src/TFunction/TFunction_DataMapOfLabelListOfLabel.hxx index c542ad488d..3b5f6a921a 100644 --- a/src/TFunction/TFunction_DataMapOfLabelListOfLabel.hxx +++ b/src/TFunction/TFunction_DataMapOfLabelListOfLabel.hxx @@ -18,11 +18,10 @@ #define TFunction_DataMapOfLabelListOfLabel_HeaderFile #include -#include #include -typedef NCollection_DataMap TFunction_DataMapOfLabelListOfLabel; -typedef NCollection_DataMap::Iterator TFunction_DataMapIteratorOfDataMapOfLabelListOfLabel; +typedef NCollection_DataMap TFunction_DataMapOfLabelListOfLabel; +typedef NCollection_DataMap::Iterator TFunction_DataMapIteratorOfDataMapOfLabelListOfLabel; #endif diff --git a/src/TFunction/TFunction_DoubleMapOfIntegerLabel.hxx b/src/TFunction/TFunction_DoubleMapOfIntegerLabel.hxx index 6bc3969967..81b6748543 100644 --- a/src/TFunction/TFunction_DoubleMapOfIntegerLabel.hxx +++ b/src/TFunction/TFunction_DoubleMapOfIntegerLabel.hxx @@ -19,12 +19,10 @@ #include #include -#include -#include #include -typedef NCollection_DoubleMap TFunction_DoubleMapOfIntegerLabel; -typedef NCollection_DoubleMap::Iterator TFunction_DoubleMapIteratorOfDoubleMapOfIntegerLabel; +typedef NCollection_DoubleMap TFunction_DoubleMapOfIntegerLabel; +typedef NCollection_DoubleMap::Iterator TFunction_DoubleMapIteratorOfDoubleMapOfIntegerLabel; #endif diff --git a/src/TNaming/FILES b/src/TNaming/FILES index 36aa6d0e57..f81ec9c88c 100644 --- a/src/TNaming/FILES +++ b/src/TNaming/FILES @@ -33,7 +33,6 @@ TNaming_Name.hxx TNaming_NamedShape.cxx TNaming_NamedShape.hxx TNaming_NamedShape.lxx -TNaming_NamedShapeHasher.hxx TNaming_NameType.hxx TNaming_Naming.cxx TNaming_Naming.hxx diff --git a/src/TNaming/TNaming_Localizer.cxx b/src/TNaming/TNaming_Localizer.cxx index 5f789a0ead..d969d0ce3b 100644 --- a/src/TNaming/TNaming_Localizer.cxx +++ b/src/TNaming/TNaming_Localizer.cxx @@ -156,7 +156,7 @@ const TopTools_MapOfShape& TNaming_Localizer::SubShapes (const TopoDS_Shape& // Standard_Boolean Found = Standard_False; for (; itS.More(); itS.Next(),itSS.Next()) { if (In.IsSame(itS.Value())) { - TopTools_MapOfShape& SubShapes = itSS.Value(); + TopTools_MapOfShape& SubShapes = itSS.ChangeValue(); for (TopExp_Explorer exp(In,TS); exp.More(); exp.Next()) { const TopoDS_Shape& SS = exp.Current(); if (SubShapes.Contains(SS)) { @@ -201,7 +201,7 @@ const TopTools_IndexedDataMapOfShapeListOfShape& TNaming_Localizer::Ancestors //----------------------- // Ancetres existent. //----------------------- - TopTools_IndexedDataMapOfShapeListOfShape& Anc = itA.Value(); + TopTools_IndexedDataMapOfShapeListOfShape& Anc = itA.ChangeValue(); TopExp_Explorer exp(In,TS); #ifdef OCCT_DEBUG diff --git a/src/TNaming/TNaming_MapOfNamedShape.hxx b/src/TNaming/TNaming_MapOfNamedShape.hxx index 490512b3e9..5f7ce92dc8 100644 --- a/src/TNaming/TNaming_MapOfNamedShape.hxx +++ b/src/TNaming/TNaming_MapOfNamedShape.hxx @@ -17,11 +17,11 @@ #ifndef TNaming_MapOfNamedShape_HeaderFile #define TNaming_MapOfNamedShape_HeaderFile -#include +#include #include -typedef NCollection_Map TNaming_MapOfNamedShape; -typedef NCollection_Map::Iterator TNaming_MapIteratorOfMapOfNamedShape; +typedef NCollection_Map TNaming_MapOfNamedShape; +typedef NCollection_Map::Iterator TNaming_MapIteratorOfMapOfNamedShape; #endif diff --git a/src/TNaming/TNaming_NamedShapeHasher.hxx b/src/TNaming/TNaming_NamedShapeHasher.hxx deleted file mode 100644 index 1c2dcc68cb..0000000000 --- a/src/TNaming/TNaming_NamedShapeHasher.hxx +++ /dev/null @@ -1,26 +0,0 @@ -// Created on: 1997-03-17 -// Created by: Yves FRICAUD -// Copyright (c) 1997-1999 Matra Datavision -// Copyright (c) 1999-2014 OPEN CASCADE SAS -// -// This file is part of Open CASCADE Technology software library. -// -// This library is free software; you can redistribute it and/or modify it under -// the terms of the GNU Lesser General Public License version 2.1 as published -// by the Free Software Foundation, with special exception defined in the file -// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT -// distribution for complete text of the license and disclaimer of any warranty. -// -// Alternatively, this file may be used under the terms of Open CASCADE -// commercial license or contractual agreement. - -#ifndef TNaming_NamedShapeHasher_HeaderFile -#define TNaming_NamedShapeHasher_HeaderFile - -#include -#include - -typedef NCollection_DefaultHasher TNaming_NamedShapeHasher; - - -#endif diff --git a/src/TObj/FILES b/src/TObj/FILES index 7203231057..f6f9f643e6 100755 --- a/src/TObj/FILES +++ b/src/TObj/FILES @@ -5,7 +5,6 @@ TObj_Assistant.cxx TObj_Assistant.hxx TObj_CheckModel.cxx TObj_CheckModel.hxx -TObj_Common.hxx TObj_Container.hxx TObj_DeletingMode.hxx TObj_HiddenPartition.cxx diff --git a/src/TObj/TObj_Application.hxx b/src/TObj/TObj_Application.hxx index 933ee7e5a9..096ae58ea0 100644 --- a/src/TObj/TObj_Application.hxx +++ b/src/TObj/TObj_Application.hxx @@ -19,7 +19,6 @@ #define TObj_Application_HeaderFile #include -#include #include #include diff --git a/src/TObj/TObj_Assistant.cxx b/src/TObj/TObj_Assistant.cxx index d4ad4136b6..b8565a2c25 100644 --- a/src/TObj/TObj_Assistant.cxx +++ b/src/TObj/TObj_Assistant.cxx @@ -17,7 +17,6 @@ #include -#include #include #include #include diff --git a/src/TObj/TObj_Assistant.hxx b/src/TObj/TObj_Assistant.hxx index 702cc1c4dd..b26bb7772f 100644 --- a/src/TObj/TObj_Assistant.hxx +++ b/src/TObj/TObj_Assistant.hxx @@ -18,7 +18,6 @@ #ifndef TObj_Assistant_HeaderFile #define TObj_Assistant_HeaderFile -#include #include #include diff --git a/src/TObj/TObj_Common.hxx b/src/TObj/TObj_Common.hxx deleted file mode 100644 index 3f6a057758..0000000000 --- a/src/TObj/TObj_Common.hxx +++ /dev/null @@ -1,50 +0,0 @@ -// Created on: 2004-11-22 -// Created by: Pavel TELKOV -// Copyright (c) 2004-2014 OPEN CASCADE SAS -// -// This file is part of Open CASCADE Technology software library. -// -// This library is free software; you can redistribute it and/or modify it under -// the terms of the GNU Lesser General Public License version 2.1 as published -// by the Free Software Foundation, with special exception defined in the file -// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT -// distribution for complete text of the license and disclaimer of any warranty. -// -// Alternatively, this file may be used under the terms of Open CASCADE -// commercial license or contractual agreement. - -// The original implementation Copyright: (C) RINA S.p.A - -// Purpose: This header file collects basic definitions -// to be included in most of sources - -#ifndef TObj_Common_HeaderFile -#define TObj_Common_HeaderFile - -//! Basic CASCADE definitions -#include -#include - -//! Methods inline implementation for HExtendedString - -//! Computes a hash code for the given handle referred to extended string, in the range [1, theUpperBound] -//! @param theHExtendedString the handle referred to extended string which hash code is to be computed -//! @param theUpperBound the upper bound of the range a computing hash code must be within -//! @return a computed hash code, in the range [1, theUpperBound] -inline Standard_Integer HashCode (const Handle (TCollection_HExtendedString) & theHExtendedString, - const Standard_Integer theUpperBound) -{ - return TCollection_ExtendedString::HashCode (theHExtendedString->String(), theUpperBound); -} - -inline Standard_Boolean IsEqual (const Handle(TCollection_HExtendedString)& theStr1, - const Handle(TCollection_HExtendedString)& theStr2) -{ - return TCollection_ExtendedString::IsEqual(theStr1->String(),theStr2->String()); -} - -#endif - -#ifdef _MSC_VER -#pragma once -#endif diff --git a/src/TObj/TObj_Container.hxx b/src/TObj/TObj_Container.hxx index 6deb360d76..f87f293348 100644 --- a/src/TObj/TObj_Container.hxx +++ b/src/TObj/TObj_Container.hxx @@ -23,7 +23,6 @@ #include #include -#include #include typedef NCollection_DataMap TObj_DataMapOfNameLabel; diff --git a/src/TObj/TObj_Object.hxx b/src/TObj/TObj_Object.hxx index 9807246962..2a54499227 100644 --- a/src/TObj/TObj_Object.hxx +++ b/src/TObj/TObj_Object.hxx @@ -18,7 +18,6 @@ #ifndef TObj_Object_HeaderFile #define TObj_Object_HeaderFile -#include #include #include @@ -30,6 +29,8 @@ class TObj_Persistence; class TObj_ObjectIterator; class TObj_TNameContainer; class TCollection_HExtendedString; +class TCollection_HAsciiString; + #include #include #include diff --git a/src/TObj/TObj_ObjectIterator.hxx b/src/TObj/TObj_ObjectIterator.hxx index 129dfbfa2b..4cbdf7fb16 100644 --- a/src/TObj/TObj_ObjectIterator.hxx +++ b/src/TObj/TObj_ObjectIterator.hxx @@ -18,7 +18,8 @@ #ifndef TObj_ObjectIterator_HeaderFile #define TObj_ObjectIterator_HeaderFile -#include +#include +#include class TObj_Object; diff --git a/src/TObj/TObj_TIntSparseArray.hxx b/src/TObj/TObj_TIntSparseArray.hxx index 49d0017b38..f45c6d758b 100644 --- a/src/TObj/TObj_TIntSparseArray.hxx +++ b/src/TObj/TObj_TIntSparseArray.hxx @@ -18,7 +18,6 @@ #ifndef TObj_TIntSparseArray_HeaderFile #define TObj_TIntSparseArray_HeaderFile -#include #include #include diff --git a/src/TObj/TObj_TObject.hxx b/src/TObj/TObj_TObject.hxx index 0ce7c8c785..286f479007 100644 --- a/src/TObj/TObj_TObject.hxx +++ b/src/TObj/TObj_TObject.hxx @@ -18,7 +18,6 @@ #ifndef TObj_TObject_HeaderFile #define TObj_TObject_HeaderFile -#include #include #include diff --git a/src/TObj/TObj_TReference.hxx b/src/TObj/TObj_TReference.hxx index cd1c32e594..abdf0e8516 100644 --- a/src/TObj/TObj_TReference.hxx +++ b/src/TObj/TObj_TReference.hxx @@ -18,7 +18,6 @@ #ifndef TObj_TReference_HeaderFile #define TObj_TReference_HeaderFile -#include #include #include diff --git a/src/TObj/TObj_TXYZ.hxx b/src/TObj/TObj_TXYZ.hxx index 341b6913cc..234411808d 100644 --- a/src/TObj/TObj_TXYZ.hxx +++ b/src/TObj/TObj_TXYZ.hxx @@ -18,7 +18,6 @@ #ifndef TObj_TXYZ_HeaderFile #define TObj_TXYZ_HeaderFile -#include #include #include diff --git a/src/TPrsStd/TPrsStd_DataMapOfGUIDDriver.hxx b/src/TPrsStd/TPrsStd_DataMapOfGUIDDriver.hxx index faea7db1b5..13e4833fd5 100644 --- a/src/TPrsStd/TPrsStd_DataMapOfGUIDDriver.hxx +++ b/src/TPrsStd/TPrsStd_DataMapOfGUIDDriver.hxx @@ -21,8 +21,8 @@ #include #include -typedef NCollection_DataMap TPrsStd_DataMapOfGUIDDriver; -typedef NCollection_DataMap::Iterator TPrsStd_DataMapIteratorOfDataMapOfGUIDDriver; +typedef NCollection_DataMap TPrsStd_DataMapOfGUIDDriver; +typedef NCollection_DataMap::Iterator TPrsStd_DataMapIteratorOfDataMapOfGUIDDriver; #endif diff --git a/src/TopLoc/FILES b/src/TopLoc/FILES index febf3afb81..3df6b5b0af 100644 --- a/src/TopLoc/FILES +++ b/src/TopLoc/FILES @@ -7,7 +7,6 @@ TopLoc_Location.cxx TopLoc_Location.hxx TopLoc_Location.lxx TopLoc_MapIteratorOfMapOfLocation.hxx -TopLoc_MapLocationHasher.hxx TopLoc_MapOfLocation.hxx TopLoc_SListNodeOfItemLocation.cxx TopLoc_SListNodeOfItemLocation.hxx diff --git a/src/TopLoc/TopLoc_IndexedMapOfLocation.hxx b/src/TopLoc/TopLoc_IndexedMapOfLocation.hxx index 44c10c3239..b604ad0923 100644 --- a/src/TopLoc/TopLoc_IndexedMapOfLocation.hxx +++ b/src/TopLoc/TopLoc_IndexedMapOfLocation.hxx @@ -18,10 +18,9 @@ #define TopLoc_IndexedMapOfLocation_HeaderFile #include -#include #include -typedef NCollection_IndexedMap TopLoc_IndexedMapOfLocation; +typedef NCollection_IndexedMap TopLoc_IndexedMapOfLocation; #endif diff --git a/src/TopLoc/TopLoc_Location.cxx b/src/TopLoc/TopLoc_Location.cxx index 7949e4708c..29ec3bee28 100644 --- a/src/TopLoc/TopLoc_Location.cxx +++ b/src/TopLoc/TopLoc_Location.cxx @@ -23,8 +23,6 @@ #include #include -static const gp_Trsf TheIdentity; - //======================================================================= //function : TopLoc_Location //purpose : constructor Identity @@ -51,7 +49,7 @@ TopLoc_Location::TopLoc_Location (const Handle(TopLoc_Datum3D)& D) TopLoc_Location::TopLoc_Location(const gp_Trsf& T) { Handle(TopLoc_Datum3D) D = new TopLoc_Datum3D(T); - myItems.Construct(TopLoc_ItemLocation(D,1)); + myItems.Construct(TopLoc_ItemLocation(D, 1)); } //======================================================================= @@ -61,8 +59,9 @@ TopLoc_Location::TopLoc_Location(const gp_Trsf& T) const gp_Trsf& TopLoc_Location::Transformation() const { + static const gp_Trsf THE_IDENTITY_TRSF; if (IsIdentity()) - return TheIdentity; + return THE_IDENTITY_TRSF; else return myItems.Value().myTrsf; } @@ -166,39 +165,6 @@ TopLoc_Location TopLoc_Location::Powered (const Standard_Integer pwr) const else return Inverted().Powered(-pwr); } -//======================================================================= -// function : HashCode -// purpose : -//======================================================================= -Standard_Integer TopLoc_Location::HashCode (const Standard_Integer theUpperBound) const -{ - // the HashCode computed for a Location is the bitwise exclusive or - // of values computed for each element of the list - // to compute this value, the depth of the element is computed - // the depth is the position of the element in the list - // this depth is multiplied by 3 - // each element is an elementary Datum raised to a Power - // the Power is bitwise left shifted by depth - // this is added to the HashCode of the Datum - // this value is biwise rotated by depth - // the use of depth avoids getting the same result for two permutated lists. - - Standard_Integer depth = 0; - unsigned int h = 0; - TopLoc_SListOfItemLocation items = myItems; - while (items.More()) - { - depth += 3; - unsigned int i = ::HashCode (items.Value().myDatum, theUpperBound); - const Standard_Integer aClampedDepth = depth % 32; - unsigned int j = ((i + items.Value().myPower) << aClampedDepth); - j = j >> (32 - aClampedDepth) | j << aClampedDepth; - h ^= j; - items.Next (); - } - return ::HashCode (h, theUpperBound); -} - //======================================================================= //function : IsEqual //purpose : operator == diff --git a/src/TopLoc/TopLoc_Location.hxx b/src/TopLoc/TopLoc_Location.hxx index 7bab1f9630..8cb2c4a9d0 100644 --- a/src/TopLoc/TopLoc_Location.hxx +++ b/src/TopLoc/TopLoc_Location.hxx @@ -114,10 +114,9 @@ Standard_NODISCARD TopLoc_Location operator/ (const TopLoc_Location& Other) cons Standard_NODISCARD Standard_EXPORT TopLoc_Location Powered (const Standard_Integer pwr) const; //! Returns a hashed value for this local coordinate system. This value is used, with map tables, to store and - //! retrieve the object easily, and is in the range [1, theUpperBound]. - //! @param theUpperBound the upper bound of the range a computing hash code must be within - //! @return a computed hash code, in the range [1, theUpperBound] - Standard_EXPORT Standard_Integer HashCode (Standard_Integer theUpperBound) const; + //! retrieve the object easily + //! @return a computed hash code + size_t HashCode () const; //! Returns true if this location and the location Other //! have the same elementary data, i.e. contain the same @@ -172,23 +171,6 @@ private: }; - #include - -//! Computes a hash code for the given location, in the range [1, theUpperBound] -//! @param theLocation the location which hash code is to be computed -//! @param theUpperBound the upper bound of the range a computing hash code must be within -//! @return a computed hash code, in the range [1, theUpperBound] -inline Standard_Integer HashCode (const TopLoc_Location& theLocation, const Standard_Integer theUpperBound) -{ - return theLocation.HashCode (theUpperBound); -} - -inline void ShallowDump(const TopLoc_Location& me,Standard_OStream& S) { - me.ShallowDump(S); -} - - - #endif // _TopLoc_Location_HeaderFile diff --git a/src/TopLoc/TopLoc_Location.lxx b/src/TopLoc/TopLoc_Location.lxx index 894a8e96f4..f228dea024 100644 --- a/src/TopLoc/TopLoc_Location.lxx +++ b/src/TopLoc/TopLoc_Location.lxx @@ -15,6 +15,7 @@ // commercial license or contractual agreement. #include +#include #include //======================================================================= @@ -68,4 +69,48 @@ inline const Handle(TopLoc_Datum3D)& TopLoc_Location::FirstDatum()const return (*(TopLoc_Location*) &(myItems.Tail())); } +//======================================================================= +// function : HashCode +// purpose : +//======================================================================= +inline size_t TopLoc_Location::HashCode() const +{ + // Hashing base on IsEqual function + if (myItems.IsEmpty()) + { + return 0; + } + size_t aHash = opencascade::MurmurHash::optimalSeed(); + TopLoc_SListOfItemLocation items = myItems; + size_t aCombined[3]; + while (items.More()) + { + aCombined[0] = std::hash{}(items.Value().myDatum); + aCombined[1] = opencascade::hash(items.Value().myPower); + aCombined[2] = aHash; + aHash = opencascade::hashBytes(aCombined, sizeof(aCombined)); + items.Next(); + } + return aHash; +} +//======================================================================= +// function : ShallowDump +// purpose : +//======================================================================= +inline void ShallowDump(const TopLoc_Location& me, Standard_OStream& S) +{ + me.ShallowDump(S); +} + +namespace std +{ + template <> + struct hash + { + size_t operator()(const TopLoc_Location& theLocation) const + { + return theLocation.HashCode(); + } + }; +} diff --git a/src/TopLoc/TopLoc_MapLocationHasher.hxx b/src/TopLoc/TopLoc_MapLocationHasher.hxx deleted file mode 100644 index f751a675ed..0000000000 --- a/src/TopLoc/TopLoc_MapLocationHasher.hxx +++ /dev/null @@ -1,26 +0,0 @@ -// Created on: 1990-12-19 -// Created by: Christophe MARION -// Copyright (c) 1990-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 TopLoc_MapLocationHasher_HeaderFile -#define TopLoc_MapLocationHasher_HeaderFile - -#include -#include - -typedef NCollection_DefaultHasher TopLoc_MapLocationHasher; - - -#endif diff --git a/src/TopLoc/TopLoc_MapOfLocation.hxx b/src/TopLoc/TopLoc_MapOfLocation.hxx index 9d9873b8b0..38f4b9b7c7 100644 --- a/src/TopLoc/TopLoc_MapOfLocation.hxx +++ b/src/TopLoc/TopLoc_MapOfLocation.hxx @@ -17,11 +17,11 @@ #ifndef TopLoc_MapOfLocation_HeaderFile #define TopLoc_MapOfLocation_HeaderFile -#include +#include #include -typedef NCollection_Map TopLoc_MapOfLocation; -typedef NCollection_Map::Iterator TopLoc_MapIteratorOfMapOfLocation; +typedef NCollection_Map TopLoc_MapOfLocation; +typedef NCollection_Map::Iterator TopLoc_MapIteratorOfMapOfLocation; #endif diff --git a/src/TopOpeBRepBuild/TopOpeBRepBuild_Area1dBuilder.cxx b/src/TopOpeBRepBuild/TopOpeBRepBuild_Area1dBuilder.cxx index 6d04335a6e..56732fa7b3 100644 --- a/src/TopOpeBRepBuild/TopOpeBRepBuild_Area1dBuilder.cxx +++ b/src/TopOpeBRepBuild/TopOpeBRepBuild_Area1dBuilder.cxx @@ -118,7 +118,7 @@ void TopOpeBRepBuild_Area1dBuilder::InitAreaBuilder Loopinside = Standard_False; for (AreaIter.Initialize(myArea); AreaIter.More(); AreaIter.Next()) { - TopOpeBRepBuild_ListOfLoop& aArea = AreaIter.Value(); + const TopOpeBRepBuild_ListOfLoop& aArea = AreaIter.Value(); if ( aArea.IsEmpty() ) continue; state = CompareLoopWithListOfLoop(LC,L,aArea,TopOpeBRepBuild_BLOCK); if (state == TopAbs_UNKNOWN) Atomize(state,TopAbs_IN); @@ -127,7 +127,7 @@ void TopOpeBRepBuild_Area1dBuilder::InitAreaBuilder } // end of Area scan if ( Loopinside ) { - TopOpeBRepBuild_ListOfLoop& aArea = AreaIter.Value(); + TopOpeBRepBuild_ListOfLoop& aArea = AreaIter.ChangeValue(); ADD_Loop_TO_LISTOFLoop(L,aArea,(void*)("IN, to current area")); } else if ( ! Loopinside ) { @@ -150,7 +150,7 @@ void TopOpeBRepBuild_Area1dBuilder::InitAreaBuilder Loopinside = Standard_False; for (AreaIter.Initialize(myArea); AreaIter.More(); AreaIter.Next() ) { - TopOpeBRepBuild_ListOfLoop& aArea = AreaIter.Value(); + TopOpeBRepBuild_ListOfLoop& aArea = AreaIter.ChangeValue(); if ( aArea.IsEmpty() ) continue; state = CompareLoopWithListOfLoop(LC,L,aArea,TopOpeBRepBuild_ANYLOOP); if (state == TopAbs_UNKNOWN) Atomize(state,TopAbs_IN); @@ -159,7 +159,7 @@ void TopOpeBRepBuild_Area1dBuilder::InitAreaBuilder } // end of Area scan if ( Loopinside) { - TopOpeBRepBuild_ListOfLoop& aArea = AreaIter.Value(); + TopOpeBRepBuild_ListOfLoop& aArea = AreaIter.ChangeValue(); Standard_Boolean allShape = Standard_True; TopOpeBRepBuild_ListOfLoop removedLoops; LoopIter.Initialize(aArea); @@ -175,7 +175,7 @@ void TopOpeBRepBuild_Area1dBuilder::InitAreaBuilder allShape = allShape && curL->IsShape(); REM_Loop_FROM_LISTOFLoop - (LoopIter,AreaIter.Value(),(void*)("loop of cur. area, cur. area")); + (LoopIter,AreaIter.ChangeValue(),(void*)("loop of cur. area, cur. area")); } else { LoopIter.Next(); diff --git a/src/TopOpeBRepBuild/TopOpeBRepBuild_Area1dBuilder.hxx b/src/TopOpeBRepBuild/TopOpeBRepBuild_Area1dBuilder.hxx index ebdb57325b..ee701ef6e0 100644 --- a/src/TopOpeBRepBuild/TopOpeBRepBuild_Area1dBuilder.hxx +++ b/src/TopOpeBRepBuild/TopOpeBRepBuild_Area1dBuilder.hxx @@ -24,7 +24,6 @@ #include #include #include -#include class TopOpeBRepBuild_PaveSet; class TopOpeBRepBuild_PaveClassifier; class TopOpeBRepBuild_LoopSet; diff --git a/src/TopOpeBRepBuild/TopOpeBRepBuild_Area2dBuilder.cxx b/src/TopOpeBRepBuild/TopOpeBRepBuild_Area2dBuilder.cxx index 6cd9cef09e..f44a6fe831 100644 --- a/src/TopOpeBRepBuild/TopOpeBRepBuild_Area2dBuilder.cxx +++ b/src/TopOpeBRepBuild/TopOpeBRepBuild_Area2dBuilder.cxx @@ -85,7 +85,7 @@ void TopOpeBRepBuild_Area2dBuilder::InitAreaBuilder Loopinside = Standard_False; for (AreaIter.Initialize(myArea); AreaIter.More(); AreaIter.Next()) { - TopOpeBRepBuild_ListOfLoop& aArea = AreaIter.Value(); + TopOpeBRepBuild_ListOfLoop& aArea = AreaIter.ChangeValue(); if ( aArea.IsEmpty() ) continue; state = CompareLoopWithListOfLoop(LC,L,aArea,TopOpeBRepBuild_BLOCK ); if (state == TopAbs_UNKNOWN) Atomize(state,TopAbs_IN); @@ -94,7 +94,7 @@ void TopOpeBRepBuild_Area2dBuilder::InitAreaBuilder } // end of Area scan if ( Loopinside ) { - TopOpeBRepBuild_ListOfLoop& aArea = AreaIter.Value(); + TopOpeBRepBuild_ListOfLoop& aArea = AreaIter.ChangeValue(); ADD_Loop_TO_LISTOFLoop(L,aArea,(void*)("IN, to current area")); } else if ( ! Loopinside ) { @@ -117,7 +117,7 @@ void TopOpeBRepBuild_Area2dBuilder::InitAreaBuilder Loopinside = Standard_False; for (AreaIter.Initialize(myArea); AreaIter.More(); AreaIter.Next() ) { - TopOpeBRepBuild_ListOfLoop& aArea = AreaIter.Value(); + TopOpeBRepBuild_ListOfLoop& aArea = AreaIter.ChangeValue(); if ( aArea.IsEmpty() ) continue; state = CompareLoopWithListOfLoop(LC,L,aArea,TopOpeBRepBuild_ANYLOOP); if (state == TopAbs_UNKNOWN) Atomize(state,TopAbs_IN); @@ -126,7 +126,7 @@ void TopOpeBRepBuild_Area2dBuilder::InitAreaBuilder } // end of Area scan if ( Loopinside) { - TopOpeBRepBuild_ListOfLoop& aArea = AreaIter.Value(); + TopOpeBRepBuild_ListOfLoop& aArea = AreaIter.ChangeValue(); Standard_Boolean allShape = Standard_True; TopOpeBRepBuild_ListOfLoop removedLoops; LoopIter.Initialize(aArea); @@ -142,7 +142,7 @@ void TopOpeBRepBuild_Area2dBuilder::InitAreaBuilder allShape = allShape && curL->IsShape(); REM_Loop_FROM_LISTOFLoop - (LoopIter,AreaIter.Value(),(void*)("loop of cur. area, cur. area")); + (LoopIter,AreaIter.ChangeValue(),(void*)("loop of cur. area, cur. area")); } else { LoopIter.Next(); diff --git a/src/TopOpeBRepBuild/TopOpeBRepBuild_Area3dBuilder.cxx b/src/TopOpeBRepBuild/TopOpeBRepBuild_Area3dBuilder.cxx index 3d13659941..fbcd3bac78 100644 --- a/src/TopOpeBRepBuild/TopOpeBRepBuild_Area3dBuilder.cxx +++ b/src/TopOpeBRepBuild/TopOpeBRepBuild_Area3dBuilder.cxx @@ -80,7 +80,7 @@ void TopOpeBRepBuild_Area3dBuilder::InitAreaBuilder Loopinside = Standard_False; for (AreaIter.Initialize(myArea); AreaIter.More(); AreaIter.Next()) { - TopOpeBRepBuild_ListOfLoop& aArea = AreaIter.Value(); + TopOpeBRepBuild_ListOfLoop& aArea = AreaIter.ChangeValue(); if ( aArea.IsEmpty() ) continue; state = CompareLoopWithListOfLoop(LC,L,aArea,TopOpeBRepBuild_BLOCK ); if (state == TopAbs_UNKNOWN) Atomize(state,TopAbs_IN); @@ -89,7 +89,7 @@ void TopOpeBRepBuild_Area3dBuilder::InitAreaBuilder } // end of Area scan if ( Loopinside ) { - TopOpeBRepBuild_ListOfLoop& aArea = AreaIter.Value(); + TopOpeBRepBuild_ListOfLoop& aArea = AreaIter.ChangeValue(); ADD_Loop_TO_LISTOFLoop(L,aArea,(void*)("IN, to current area")); } else if ( ! Loopinside ) { @@ -112,7 +112,7 @@ void TopOpeBRepBuild_Area3dBuilder::InitAreaBuilder Loopinside = Standard_False; for (AreaIter.Initialize(myArea); AreaIter.More(); AreaIter.Next() ) { - TopOpeBRepBuild_ListOfLoop& aArea = AreaIter.Value(); + TopOpeBRepBuild_ListOfLoop& aArea = AreaIter.ChangeValue(); if ( aArea.IsEmpty() ) continue; state = CompareLoopWithListOfLoop(LC,L,aArea,TopOpeBRepBuild_ANYLOOP); if (state == TopAbs_UNKNOWN) Atomize(state,TopAbs_IN); @@ -121,7 +121,7 @@ void TopOpeBRepBuild_Area3dBuilder::InitAreaBuilder } // end of Area scan if ( Loopinside) { - TopOpeBRepBuild_ListOfLoop& aArea = AreaIter.Value(); + TopOpeBRepBuild_ListOfLoop& aArea = AreaIter.ChangeValue(); Standard_Boolean allShape = Standard_True; TopOpeBRepBuild_ListOfLoop removedLoops; LoopIter.Initialize(aArea); @@ -138,7 +138,7 @@ void TopOpeBRepBuild_Area3dBuilder::InitAreaBuilder allShape = allShape && curL->IsShape(); REM_Loop_FROM_LISTOFLoop - (LoopIter,AreaIter.Value(),(void*)("loop of cur. area, cur. area")); + (LoopIter,AreaIter.ChangeValue(),(void*)("loop of cur. area, cur. area")); } else { LoopIter.Next(); diff --git a/src/TopOpeBRepBuild/TopOpeBRepBuild_AreaBuilder.cxx b/src/TopOpeBRepBuild/TopOpeBRepBuild_AreaBuilder.cxx index ff352553c0..0340722828 100644 --- a/src/TopOpeBRepBuild/TopOpeBRepBuild_AreaBuilder.cxx +++ b/src/TopOpeBRepBuild/TopOpeBRepBuild_AreaBuilder.cxx @@ -154,7 +154,7 @@ void TopOpeBRepBuild_AreaBuilder::InitAreaBuilder Loopinside = Standard_False; for (AreaIter.Initialize(myArea); AreaIter.More(); AreaIter.Next()) { - TopOpeBRepBuild_ListOfLoop& aArea = AreaIter.Value(); + const TopOpeBRepBuild_ListOfLoop& aArea = AreaIter.Value(); if ( aArea.IsEmpty() ) continue; state = CompareLoopWithListOfLoop(LC,L,aArea,TopOpeBRepBuild_BLOCK ); if (state == TopAbs_UNKNOWN) Atomize(state,TopAbs_IN); @@ -163,7 +163,7 @@ void TopOpeBRepBuild_AreaBuilder::InitAreaBuilder } // end of Area scan if ( Loopinside ) { - TopOpeBRepBuild_ListOfLoop& aArea = AreaIter.Value(); + TopOpeBRepBuild_ListOfLoop& aArea = AreaIter.ChangeValue(); ADD_Loop_TO_LISTOFLoop(L,aArea,(void*)("IN, to current area")); } else if ( ! Loopinside ) { @@ -186,7 +186,7 @@ void TopOpeBRepBuild_AreaBuilder::InitAreaBuilder Loopinside = Standard_False; for (AreaIter.Initialize(myArea); AreaIter.More(); AreaIter.Next() ) { - TopOpeBRepBuild_ListOfLoop& aArea = AreaIter.Value(); + const TopOpeBRepBuild_ListOfLoop& aArea = AreaIter.Value(); if ( aArea.IsEmpty() ) continue; state = CompareLoopWithListOfLoop(LC,L,aArea,TopOpeBRepBuild_ANYLOOP); if (state == TopAbs_UNKNOWN) Atomize(state,TopAbs_IN); @@ -195,7 +195,7 @@ void TopOpeBRepBuild_AreaBuilder::InitAreaBuilder } // end of Area scan if ( Loopinside) { - TopOpeBRepBuild_ListOfLoop& aArea = AreaIter.Value(); + TopOpeBRepBuild_ListOfLoop& aArea = AreaIter.ChangeValue(); Standard_Boolean allShape = Standard_True; TopOpeBRepBuild_ListOfLoop removedLoops; LoopIter.Initialize(aArea); @@ -211,7 +211,7 @@ void TopOpeBRepBuild_AreaBuilder::InitAreaBuilder allShape = allShape && curL->IsShape(); REM_Loop_FROM_LISTOFLoop - (LoopIter,AreaIter.Value(),(void*)("loop of cur. area, cur. area")); + (LoopIter,AreaIter.ChangeValue(),(void*)("loop of cur. area, cur. area")); } else { LoopIter.Next(); diff --git a/src/TopOpeBRepBuild/TopOpeBRepBuild_AreaBuilder.hxx b/src/TopOpeBRepBuild/TopOpeBRepBuild_AreaBuilder.hxx index b57c66b30e..61f239f2de 100644 --- a/src/TopOpeBRepBuild/TopOpeBRepBuild_AreaBuilder.hxx +++ b/src/TopOpeBRepBuild/TopOpeBRepBuild_AreaBuilder.hxx @@ -28,7 +28,6 @@ #include #include #include -#include class TopOpeBRepBuild_LoopSet; class TopOpeBRepBuild_LoopClassifier; class TopOpeBRepBuild_Loop; diff --git a/src/TopOpeBRepBuild/TopOpeBRepBuild_BuildEdges.cxx b/src/TopOpeBRepBuild/TopOpeBRepBuild_BuildEdges.cxx index 5bdb161264..a0dbf89c82 100644 --- a/src/TopOpeBRepBuild/TopOpeBRepBuild_BuildEdges.cxx +++ b/src/TopOpeBRepBuild/TopOpeBRepBuild_BuildEdges.cxx @@ -71,7 +71,7 @@ void TopOpeBRepBuild_Builder::BuildEdges(const Standard_Integer iC,const Handle( TopTools_ListIteratorOfListOfShape It(EL); Standard_Integer inewC = -1; for (; It.More(); It.Next()) { - TopoDS_Edge& newEdge = TopoDS::Edge(It.Value()); + TopoDS_Edge& newEdge = TopoDS::Edge(It.ChangeValue()); myBuildTool.RecomputeCurves(curC,TopoDS::Edge(anEdge),newEdge,inewC,HDS); if (inewC != -1) ChangeNewEdges(inewC).Append(newEdge); } @@ -80,7 +80,7 @@ void TopOpeBRepBuild_Builder::BuildEdges(const Standard_Integer iC,const Handle( } else { for (It.Initialize(EL);It.More();It.Next()) { - TopoDS_Edge& newEdge = TopoDS::Edge(It.Value()); + TopoDS_Edge& newEdge = TopoDS::Edge(It.ChangeValue()); myBuildTool.UpdateEdge(anEdge,newEdge); } } diff --git a/src/TopOpeBRepBuild/TopOpeBRepBuild_Builder.cxx b/src/TopOpeBRepBuild/TopOpeBRepBuild_Builder.cxx index 4125bdbb15..5a8fa32eb4 100644 --- a/src/TopOpeBRepBuild/TopOpeBRepBuild_Builder.cxx +++ b/src/TopOpeBRepBuild/TopOpeBRepBuild_Builder.cxx @@ -669,7 +669,7 @@ Standard_Boolean TopOpeBRepBuild_Builder::IsShapeOf(const TopoDS_Shape& s,const Standard_Boolean TopOpeBRepBuild_Builder::Contains(const TopoDS_Shape& S,const TopTools_ListOfShape& L) { for (TopTools_ListIteratorOfListOfShape it(L); it.More(); it.Next() ) { - TopoDS_Shape& SL = it.Value(); + const TopoDS_Shape& SL = it.Value(); Standard_Boolean issame = SL.IsSame(S); if ( issame ) return Standard_True; } diff --git a/src/TopOpeBRepBuild/TopOpeBRepBuild_Builder.hxx b/src/TopOpeBRepBuild/TopOpeBRepBuild_Builder.hxx index 43e21a2228..5b0efdb379 100644 --- a/src/TopOpeBRepBuild/TopOpeBRepBuild_Builder.hxx +++ b/src/TopOpeBRepBuild/TopOpeBRepBuild_Builder.hxx @@ -46,7 +46,6 @@ #include #include #include -#include class TopOpeBRepDS_HDataStructure; class TopOpeBRepTool_ShapeExplorer; class TopOpeBRepBuild_ShapeSet; diff --git a/src/TopOpeBRepBuild/TopOpeBRepBuild_Builder1.cxx b/src/TopOpeBRepBuild/TopOpeBRepBuild_Builder1.cxx index 20d732fbd2..7e9ab79f5d 100644 --- a/src/TopOpeBRepBuild/TopOpeBRepBuild_Builder1.cxx +++ b/src/TopOpeBRepBuild/TopOpeBRepBuild_Builder1.cxx @@ -181,7 +181,7 @@ void TopOpeBRepBuild_Builder1::MergeKPart() TopTools_ListIteratorOfListOfShape its(Merged(myShape1,myState1)); for (; its.More(); its.Next()) { - CorrectResult2d(its.Value()); + CorrectResult2d(its.ChangeValue()); } } @@ -1369,7 +1369,7 @@ Standard_Integer TopOpeBRepBuild_Builder1::PerformPieceOn2D (const TopoDS_Shape& // we are looking for the same piece as aPieceObj among aPartOnTool TopTools_ListIteratorOfListOfShape anItTool(aPartOnTool); for (k=1; anItTool.More(); anItTool.Next(), k++) { - TopoDS_Shape& aPieceTool=anItTool.Value(); + TopoDS_Shape& aPieceTool=anItTool.ChangeValue(); aPieceTool.Orientation(anEdgeTool.Orientation()); Standard_Boolean aIsSameCnd, IsDegFlag; diff --git a/src/TopOpeBRepBuild/TopOpeBRepBuild_Builder1.hxx b/src/TopOpeBRepBuild/TopOpeBRepBuild_Builder1.hxx index 344f90aea5..48c8e310f4 100644 --- a/src/TopOpeBRepBuild/TopOpeBRepBuild_Builder1.hxx +++ b/src/TopOpeBRepBuild/TopOpeBRepBuild_Builder1.hxx @@ -132,7 +132,7 @@ private: TopoDS_Shape mySDFaceToFill; TopoDS_Shape myBaseFaceToFill; TopTools_IndexedDataMapOfShapeListOfShape myMapOfEdgeFaces; - NCollection_DataMap myMapOfEdgeWithFaceState; + NCollection_DataMap myMapOfEdgeWithFaceState; TopTools_IndexedMapOfShape myProcessedPartsOut2d; TopTools_IndexedMapOfShape myProcessedPartsON2d; TopTools_IndexedMapOfShape mySplitsONtoKeep; diff --git a/src/TopOpeBRepBuild/TopOpeBRepBuild_CompositeClassifier.hxx b/src/TopOpeBRepBuild/TopOpeBRepBuild_CompositeClassifier.hxx index cbf0d031c8..9ee30b050a 100644 --- a/src/TopOpeBRepBuild/TopOpeBRepBuild_CompositeClassifier.hxx +++ b/src/TopOpeBRepBuild/TopOpeBRepBuild_CompositeClassifier.hxx @@ -21,7 +21,6 @@ #include #include -#include #include #include class TopOpeBRepBuild_BlockBuilder; diff --git a/src/TopOpeBRepBuild/TopOpeBRepBuild_CorrectFace2d.hxx b/src/TopOpeBRepBuild/TopOpeBRepBuild_CorrectFace2d.hxx index 4f3534007e..214c934f40 100644 --- a/src/TopOpeBRepBuild/TopOpeBRepBuild_CorrectFace2d.hxx +++ b/src/TopOpeBRepBuild/TopOpeBRepBuild_CorrectFace2d.hxx @@ -25,7 +25,6 @@ #include #include #include -#include #include class TopoDS_Edge; class gp_Pnt2d; diff --git a/src/TopOpeBRepBuild/TopOpeBRepBuild_End.cxx b/src/TopOpeBRepBuild/TopOpeBRepBuild_End.cxx index 871ef9b261..4d85cce540 100644 --- a/src/TopOpeBRepBuild/TopOpeBRepBuild_End.cxx +++ b/src/TopOpeBRepBuild/TopOpeBRepBuild_End.cxx @@ -258,7 +258,7 @@ void TopOpeBRepBuild_Builder::End() // TopAbs_State state = myState1; TopTools_ListOfShape& ls = ChangeMerged(myShape1,myState1); for (TopTools_ListIteratorOfListOfShape itls(ls);itls.More();itls.Next()) { - TopoDS_Shape& SFE = itls.Value(); + TopoDS_Shape& SFE = itls.ChangeValue(); TopOpeBRepTool_FuseEdges FE(SFE); // avoid fusing old edges diff --git a/src/TopOpeBRepBuild/TopOpeBRepBuild_GridFF.cxx b/src/TopOpeBRepBuild/TopOpeBRepBuild_GridFF.cxx index 7112add40f..2e012b6ae6 100644 --- a/src/TopOpeBRepBuild/TopOpeBRepBuild_GridFF.cxx +++ b/src/TopOpeBRepBuild/TopOpeBRepBuild_GridFF.cxx @@ -474,7 +474,7 @@ static Standard_Boolean FUN_validF1edge(const TopoDS_Shape& F) // les faces construites (LOFS) prennent l'orientation originale de FF TopAbs_Orientation odsFF = myDataStructure->Shape(iFF).Orientation(); - for(TopTools_ListIteratorOfListOfShape itt(LOFS);itt.More();itt.Next()) itt.Value().Orientation(odsFF); + for(TopTools_ListIteratorOfListOfShape itt(LOFS);itt.More();itt.Next()) itt.ChangeValue().Orientation(odsFF); TopTools_ListIteratorOfListOfShape it1; for (it1.Initialize(LF1); it1.More(); it1.Next()) { diff --git a/src/TopOpeBRepBuild/TopOpeBRepBuild_GridSS.cxx b/src/TopOpeBRepBuild/TopOpeBRepBuild_GridSS.cxx index 59250b94fb..d95807c9d5 100644 --- a/src/TopOpeBRepBuild/TopOpeBRepBuild_GridSS.cxx +++ b/src/TopOpeBRepBuild/TopOpeBRepBuild_GridSS.cxx @@ -620,7 +620,7 @@ Standard_EXPORT void FUNBUILD_ORIENTLOFS(TopOpeBRepBuild_Builder& B, TopTools_ListOfShape& LOFS) { for (TopTools_ListIteratorOfListOfShape it(LOFS);it.More();it.Next()) { - TopoDS_Shape& f = it.Value(); + TopoDS_Shape& f = it.ChangeValue(); Standard_Boolean of1,of2; FUNBUILD_ANCESTORRANKGET(B,f,of1,of2); TopAbs_Orientation orif = f.Orientation(); Standard_Boolean r12 = B.Reverse(TB1,TB2); Standard_Boolean r21 = B.Reverse(TB2,TB1); diff --git a/src/TopOpeBRepBuild/TopOpeBRepBuild_HBuilder.cxx b/src/TopOpeBRepBuild/TopOpeBRepBuild_HBuilder.cxx index a5b37062a2..bb2c046bd8 100644 --- a/src/TopOpeBRepBuild/TopOpeBRepBuild_HBuilder.cxx +++ b/src/TopOpeBRepBuild/TopOpeBRepBuild_HBuilder.cxx @@ -353,13 +353,13 @@ void TopOpeBRepBuild_HBuilder::MakeEdgeAncestorMap() its.Initialize(los); if(re == 1) for(; its.More(); its.Next()) { - TopoDS_Shape& SecEdg = its.Value(); + const TopoDS_Shape& SecEdg = its.Value(); if(!mySectEdgeDSEdges1.IsBound(SecEdg)) mySectEdgeDSEdges1.Bind(SecEdg, ei); } else if(re == 2) for(; its.More(); its.Next()) { - TopoDS_Shape& SecEdg = its.Value(); + const TopoDS_Shape& SecEdg = its.Value(); if(!mySectEdgeDSEdges2.IsBound(SecEdg)) mySectEdgeDSEdges2.Bind(SecEdg,ei); } diff --git a/src/TopOpeBRepBuild/TopOpeBRepBuild_Section.cxx b/src/TopOpeBRepBuild/TopOpeBRepBuild_Section.cxx index 020074919f..f37edb72b2 100644 --- a/src/TopOpeBRepBuild/TopOpeBRepBuild_Section.cxx +++ b/src/TopOpeBRepBuild/TopOpeBRepBuild_Section.cxx @@ -506,7 +506,7 @@ void TopOpeBRepBuild_Builder::SplitSectionEdges() } TopTools_ListIteratorOfListOfShape itlon(lon); for(;itlon.More();itlon.Next()) { - TopoDS_Edge& eon = TopoDS::Edge(itlon.Value()); + TopoDS_Edge& eon = TopoDS::Edge(itlon.ChangeValue()); Standard_Real f,l; Standard_Boolean hasPC = FC2D_HasCurveOnSurface(eon,F); if (hasPC) continue; #ifdef OCCT_DEBUG diff --git a/src/TopOpeBRepBuild/TopOpeBRepBuild_ShellFaceSet.hxx b/src/TopOpeBRepBuild/TopOpeBRepBuild_ShellFaceSet.hxx index c4af95cdb6..00a7618fa4 100644 --- a/src/TopOpeBRepBuild/TopOpeBRepBuild_ShellFaceSet.hxx +++ b/src/TopOpeBRepBuild/TopOpeBRepBuild_ShellFaceSet.hxx @@ -22,7 +22,6 @@ #include #include -#include #include #include class TopoDS_Shape; diff --git a/src/TopOpeBRepDS/TopOpeBRepDS_Check.cxx b/src/TopOpeBRepDS/TopOpeBRepDS_Check.cxx index 0302e68634..1f48dcfef7 100644 --- a/src/TopOpeBRepDS/TopOpeBRepDS_Check.cxx +++ b/src/TopOpeBRepDS/TopOpeBRepDS_Check.cxx @@ -119,7 +119,7 @@ Standard_Boolean TopOpeBRepDS_Check::ChkIntgInterf it1.Initialize(LI); Standard_Boolean IsOK = Standard_True; while (it1.More() ) { - Handle(TopOpeBRepDS_Interference)& I1 = it1.Value(); + Handle(TopOpeBRepDS_Interference) I1 = it1.Value(); IsOK = IsOK && CheckDS(I1->Support(), I1->SupportType()); IsOK = IsOK && CheckDS(I1->Geometry(), I1->GeometryType()); it1.Next(); @@ -375,7 +375,7 @@ Standard_Boolean CheckEdgeParameter(const Handle(TopOpeBRepDS_HDataStructure)& m const TopOpeBRepDS_ListOfInterference& LI = DS.ShapeInterferences(i); it1.Initialize(LI); while (it1.More() ) { - Handle(TopOpeBRepDS_Interference)& I1 = it1.Value(); + Handle(TopOpeBRepDS_Interference) I1 = it1.Value(); Handle(TopOpeBRepDS_EdgeVertexInterference) EVI = Handle(TopOpeBRepDS_EdgeVertexInterference)::DownCast(I1); if(!EVI.IsNull()) { @@ -425,11 +425,11 @@ Standard_OStream& TopOpeBRepDS_Check::PrintIntg(Standard_OStream& OS) PrintMap(myMapPointStatus, "Point", OS); //display of the topology - TopOpeBRepDS_DataMapIteratorOfDataMapOfCheckStatus DMI(myMapShapeStatus); TopOpeBRepDS_DataMapOfCheckStatus MapVertex, MapEdge, MapWire, MapFace, MapSolid; Standard_Integer i; // different Map keep their index of myMapShapeStatus - for(DMI.Reset();DMI.More();DMI.Next()) { + for(TopOpeBRepDS_DataMapIteratorOfDataMapOfCheckStatus DMI(myMapShapeStatus); DMI.More();DMI.Next()) + { i = DMI.Key(); const TopoDS_Shape& S =myHDS->Shape(i); switch(S.ShapeType()) { @@ -485,12 +485,13 @@ Standard_OStream& TopOpeBRepDS_Check::PrintElts(TopOpeBRepDS_DataMapOfCheckStatu Standard_Boolean& b, Standard_OStream& OS) { - TopOpeBRepDS_DataMapIteratorOfDataMapOfCheckStatus DMI(MapStat); Standard_Boolean bb = !b; b = Standard_True; Standard_Integer i; TopOpeBRepDS_CheckStatus s; - for(DMI.Reset();DMI.More();DMI.Next()) { + for(TopOpeBRepDS_DataMapIteratorOfDataMapOfCheckStatus DMI(MapStat); + DMI.More();DMI.Next()) + { s = DMI.Value(); i = DMI.Key(); if(s == Stat) { diff --git a/src/TopOpeBRepDS/TopOpeBRepDS_DataMapOfCheckStatus.hxx b/src/TopOpeBRepDS/TopOpeBRepDS_DataMapOfCheckStatus.hxx index 49b58f388b..51cddc616e 100644 --- a/src/TopOpeBRepDS/TopOpeBRepDS_DataMapOfCheckStatus.hxx +++ b/src/TopOpeBRepDS/TopOpeBRepDS_DataMapOfCheckStatus.hxx @@ -19,11 +19,10 @@ #include #include -#include #include -typedef NCollection_DataMap TopOpeBRepDS_DataMapOfCheckStatus; -typedef NCollection_DataMap::Iterator TopOpeBRepDS_DataMapIteratorOfDataMapOfCheckStatus; +typedef NCollection_DataMap TopOpeBRepDS_DataMapOfCheckStatus; +typedef NCollection_DataMap::Iterator TopOpeBRepDS_DataMapIteratorOfDataMapOfCheckStatus; #endif diff --git a/src/TopOpeBRepDS/TopOpeBRepDS_DataMapOfIntegerListOfInterference.hxx b/src/TopOpeBRepDS/TopOpeBRepDS_DataMapOfIntegerListOfInterference.hxx index 227b4c8839..ca0af039ea 100644 --- a/src/TopOpeBRepDS/TopOpeBRepDS_DataMapOfIntegerListOfInterference.hxx +++ b/src/TopOpeBRepDS/TopOpeBRepDS_DataMapOfIntegerListOfInterference.hxx @@ -19,11 +19,10 @@ #include #include -#include #include -typedef NCollection_DataMap TopOpeBRepDS_DataMapOfIntegerListOfInterference; -typedef NCollection_DataMap::Iterator TopOpeBRepDS_DataMapIteratorOfDataMapOfIntegerListOfInterference; +typedef NCollection_DataMap TopOpeBRepDS_DataMapOfIntegerListOfInterference; +typedef NCollection_DataMap::Iterator TopOpeBRepDS_DataMapIteratorOfDataMapOfIntegerListOfInterference; #endif diff --git a/src/TopOpeBRepDS/TopOpeBRepDS_DataMapOfInterferenceListOfInterference.hxx b/src/TopOpeBRepDS/TopOpeBRepDS_DataMapOfInterferenceListOfInterference.hxx index 3a504ee62d..964e3cd543 100644 --- a/src/TopOpeBRepDS/TopOpeBRepDS_DataMapOfInterferenceListOfInterference.hxx +++ b/src/TopOpeBRepDS/TopOpeBRepDS_DataMapOfInterferenceListOfInterference.hxx @@ -18,11 +18,10 @@ #define TopOpeBRepDS_DataMapOfInterferenceListOfInterference_HeaderFile #include -#include #include -typedef NCollection_DataMap TopOpeBRepDS_DataMapOfInterferenceListOfInterference; -typedef NCollection_DataMap::Iterator TopOpeBRepDS_DataMapIteratorOfDataMapOfInterferenceListOfInterference; +typedef NCollection_DataMap TopOpeBRepDS_DataMapOfInterferenceListOfInterference; +typedef NCollection_DataMap::Iterator TopOpeBRepDS_DataMapIteratorOfDataMapOfInterferenceListOfInterference; #endif diff --git a/src/TopOpeBRepDS/TopOpeBRepDS_DataMapOfInterferenceShape.hxx b/src/TopOpeBRepDS/TopOpeBRepDS_DataMapOfInterferenceShape.hxx index 721ed280bd..0e958f9d0f 100644 --- a/src/TopOpeBRepDS/TopOpeBRepDS_DataMapOfInterferenceShape.hxx +++ b/src/TopOpeBRepDS/TopOpeBRepDS_DataMapOfInterferenceShape.hxx @@ -19,11 +19,10 @@ #include #include -#include #include -typedef NCollection_DataMap TopOpeBRepDS_DataMapOfInterferenceShape; -typedef NCollection_DataMap::Iterator TopOpeBRepDS_DataMapIteratorOfDataMapOfInterferenceShape; +typedef NCollection_DataMap TopOpeBRepDS_DataMapOfInterferenceShape; +typedef NCollection_DataMap::Iterator TopOpeBRepDS_DataMapIteratorOfDataMapOfInterferenceShape; #endif diff --git a/src/TopOpeBRepDS/TopOpeBRepDS_DoubleMapOfIntegerShape.hxx b/src/TopOpeBRepDS/TopOpeBRepDS_DoubleMapOfIntegerShape.hxx index 559a973f6f..e45bb55088 100644 --- a/src/TopOpeBRepDS/TopOpeBRepDS_DoubleMapOfIntegerShape.hxx +++ b/src/TopOpeBRepDS/TopOpeBRepDS_DoubleMapOfIntegerShape.hxx @@ -17,12 +17,11 @@ #ifndef TopOpeBRepDS_DoubleMapOfIntegerShape_HeaderFile #define TopOpeBRepDS_DoubleMapOfIntegerShape_HeaderFile -#include #include #include -typedef NCollection_DoubleMap TopOpeBRepDS_DoubleMapOfIntegerShape; -typedef NCollection_DoubleMap::Iterator TopOpeBRepDS_DoubleMapIteratorOfDoubleMapOfIntegerShape; +typedef NCollection_DoubleMap,TopTools_ShapeMapHasher> TopOpeBRepDS_DoubleMapOfIntegerShape; +typedef TopOpeBRepDS_DoubleMapOfIntegerShape::Iterator TopOpeBRepDS_DoubleMapIteratorOfDoubleMapOfIntegerShape; #endif diff --git a/src/TopOpeBRepDS/TopOpeBRepDS_EIR.cxx b/src/TopOpeBRepDS/TopOpeBRepDS_EIR.cxx index 278bd8723c..4e66fa56a8 100644 --- a/src/TopOpeBRepDS/TopOpeBRepDS_EIR.cxx +++ b/src/TopOpeBRepDS/TopOpeBRepDS_EIR.cxx @@ -54,7 +54,7 @@ static void FDS_reduceONFACEinterferences(TopOpeBRepDS_ListOfInterference& LI, TopOpeBRepDS_ListIteratorOfListOfInterference it1; // set hasONFACE = True if LI contains interfs with (ON,FACE) transition(s). Standard_Boolean hasONFACE = Standard_False; for (it1.Initialize(LI); it1.More(); it1.Next() ) { - Handle(TopOpeBRepDS_Interference)& I1 = it1.Value(); + Handle(TopOpeBRepDS_Interference)& I1 = it1.ChangeValue(); TopOpeBRepDS_Kind GT1,ST1; Standard_Integer G1,S1; FDS_data(I1,GT1,G1,ST1,S1); if ( GT1 == TopOpeBRepDS_POINT ) { hasONFACE = FUN_hasStateShape(I1->Transition(),TopAbs_ON,TopAbs_FACE); @@ -66,7 +66,7 @@ static void FDS_reduceONFACEinterferences(TopOpeBRepDS_ListOfInterference& LI, // LI has (ON,FACE) : remove all other interf (POINT,(not(ON,FACE))) it1.Initialize(LI); while( it1.More() ) { - Handle(TopOpeBRepDS_Interference)& I1 = it1.Value(); + Handle(TopOpeBRepDS_Interference)& I1 = it1.ChangeValue(); TopOpeBRepDS_Kind GT1,ST1; Standard_Integer G1,S1; FDS_data(I1,GT1,G1,ST1,S1); if ( GT1 == TopOpeBRepDS_POINT ) { hasONFACE = FUN_hasStateShape(I1->Transition(),TopAbs_ON,TopAbs_FACE); diff --git a/src/TopOpeBRepDS/TopOpeBRepDS_EXPORT.cxx b/src/TopOpeBRepDS/TopOpeBRepDS_EXPORT.cxx index cb67638f1c..c36ce2dc2c 100644 --- a/src/TopOpeBRepDS/TopOpeBRepDS_EXPORT.cxx +++ b/src/TopOpeBRepDS/TopOpeBRepDS_EXPORT.cxx @@ -1718,7 +1718,7 @@ Standard_EXPORT void FUN_ds_completeforSE8(const Handle(TopOpeBRepDS_HDataStruct if (redu2d) { // {I1d=(Tr(Esd),vG,Esd), I2d=(Tr(F),vG,E)} TopOpeBRepDS_ListIteratorOfListOfInterference it(l2dFE); TopOpeBRepDS_ListOfInterference al2dFE; while (it.More()) { - Handle(TopOpeBRepDS_Interference)& I2dFE = it.Value(); + Handle(TopOpeBRepDS_Interference)& I2dFE = it.ChangeValue(); TopOpeBRepDS_Transition newT2d; Standard_Boolean ok = FUN_ds_redu2d1d(BDS,ISE,I2dFE,l1dE, newT2d); if (!ok) {it.Next(); continue;} I2dFE->ChangeTransition() = newT2d; al2dFE.Append(I2dFE); diff --git a/src/TopOpeBRepDS/TopOpeBRepDS_FIR.cxx b/src/TopOpeBRepDS/TopOpeBRepDS_FIR.cxx index f3e7f76686..0e578f4959 100644 --- a/src/TopOpeBRepDS/TopOpeBRepDS_FIR.cxx +++ b/src/TopOpeBRepDS/TopOpeBRepDS_FIR.cxx @@ -39,7 +39,7 @@ Standard_Boolean FUN_isPonF(const TopOpeBRepDS_ListOfInterference& LIF,const gp_ TopOpeBRepDS_ListIteratorOfListOfInterference itF(LIF); for (;itF.More();itF.Next()) { - Handle(TopOpeBRepDS_Interference)& IF = itF.Value(); FDS_data(IF,GT1,G1,ST1,S1); + Handle(TopOpeBRepDS_Interference) IF = itF.Value(); FDS_data(IF,GT1,G1,ST1,S1); const TopoDS_Face& F = TopoDS::Face(BDS.Shape(S1)); TopAbs_Orientation oEinF; Standard_Boolean edonfa = FUN_tool_orientEinFFORWARD(E,F,oEinF ); if ( edonfa ) Pok = Standard_True; @@ -70,7 +70,7 @@ Standard_Boolean FUN_findPonF(const TopoDS_Edge& E,const TopOpeBRepDS_DataStruct for (;itI.More();itI.Next()) { Standard_Boolean pardef = Standard_False; - Handle(TopOpeBRepDS_Interference)& I = itI.Value(); FDS_data(I,GT1,G1,ST1,S1); + Handle(TopOpeBRepDS_Interference)& I = itI.ChangeValue(); FDS_data(I,GT1,G1,ST1,S1); Handle(TopOpeBRepDS_CurvePointInterference) CPI (Handle(TopOpeBRepDS_CurvePointInterference)::DownCast(I)); Handle(TopOpeBRepDS_ShapeShapeInterference) SSI (Handle(TopOpeBRepDS_ShapeShapeInterference)::DownCast(I)); if (!CPI.IsNull()) { @@ -216,7 +216,7 @@ void FUN_GmapS(TopOpeBRepDS_ListOfInterference& LI, const TopOpeBRepDS_DataStruc mosd.Clear(); TopOpeBRepDS_Kind GT1,ST1;Standard_Integer G1,S1; for (TopOpeBRepDS_ListIteratorOfListOfInterference it1(LI);it1.More();it1.Next()) { - Handle(TopOpeBRepDS_Interference)& I1=it1.Value(); FDS_data(I1,GT1,G1,ST1,S1); + Handle(TopOpeBRepDS_Interference)& I1=it1.ChangeValue(); FDS_data(I1,GT1,G1,ST1,S1); if ( GT1 != MDSke || ST1 != MDSkf ) continue; const TopoDS_Shape& SG1 = BDS.Shape(G1); TopOpeBRepDS_ShapeData thedata; diff --git a/src/TopOpeBRepDS/TopOpeBRepDS_MapOfCurve.hxx b/src/TopOpeBRepDS/TopOpeBRepDS_MapOfCurve.hxx index 1206864a9c..ad1799c73f 100644 --- a/src/TopOpeBRepDS/TopOpeBRepDS_MapOfCurve.hxx +++ b/src/TopOpeBRepDS/TopOpeBRepDS_MapOfCurve.hxx @@ -19,11 +19,10 @@ #include #include -#include #include -typedef NCollection_DataMap TopOpeBRepDS_MapOfCurve; -typedef NCollection_DataMap::Iterator TopOpeBRepDS_DataMapIteratorOfMapOfCurve; +typedef NCollection_DataMap TopOpeBRepDS_MapOfCurve; +typedef NCollection_DataMap::Iterator TopOpeBRepDS_DataMapIteratorOfMapOfCurve; #endif diff --git a/src/TopOpeBRepDS/TopOpeBRepDS_MapOfIntegerShapeData.hxx b/src/TopOpeBRepDS/TopOpeBRepDS_MapOfIntegerShapeData.hxx index 6dd5be6afd..92a4c038ae 100644 --- a/src/TopOpeBRepDS/TopOpeBRepDS_MapOfIntegerShapeData.hxx +++ b/src/TopOpeBRepDS/TopOpeBRepDS_MapOfIntegerShapeData.hxx @@ -18,11 +18,10 @@ #define TopOpeBRepDS_MapOfIntegerShapeData_HeaderFile #include -#include #include -typedef NCollection_DataMap TopOpeBRepDS_MapOfIntegerShapeData; -typedef NCollection_DataMap::Iterator TopOpeBRepDS_DataMapIteratorOfMapOfIntegerShapeData; +typedef NCollection_DataMap TopOpeBRepDS_MapOfIntegerShapeData; +typedef NCollection_DataMap::Iterator TopOpeBRepDS_DataMapIteratorOfMapOfIntegerShapeData; #endif diff --git a/src/TopOpeBRepDS/TopOpeBRepDS_MapOfPoint.hxx b/src/TopOpeBRepDS/TopOpeBRepDS_MapOfPoint.hxx index 939735ed4f..cf768bae5b 100644 --- a/src/TopOpeBRepDS/TopOpeBRepDS_MapOfPoint.hxx +++ b/src/TopOpeBRepDS/TopOpeBRepDS_MapOfPoint.hxx @@ -19,11 +19,10 @@ #include #include -#include #include -typedef NCollection_DataMap TopOpeBRepDS_MapOfPoint; -typedef NCollection_DataMap::Iterator TopOpeBRepDS_DataMapIteratorOfMapOfPoint; +typedef NCollection_DataMap TopOpeBRepDS_MapOfPoint; +typedef NCollection_DataMap::Iterator TopOpeBRepDS_DataMapIteratorOfMapOfPoint; #endif diff --git a/src/TopOpeBRepDS/TopOpeBRepDS_MapOfSurface.hxx b/src/TopOpeBRepDS/TopOpeBRepDS_MapOfSurface.hxx index aa7404a33d..a73c04045b 100644 --- a/src/TopOpeBRepDS/TopOpeBRepDS_MapOfSurface.hxx +++ b/src/TopOpeBRepDS/TopOpeBRepDS_MapOfSurface.hxx @@ -19,11 +19,10 @@ #include #include -#include #include -typedef NCollection_DataMap TopOpeBRepDS_MapOfSurface; -typedef NCollection_DataMap::Iterator TopOpeBRepDS_DataMapIteratorOfMapOfSurface; +typedef NCollection_DataMap TopOpeBRepDS_MapOfSurface; +typedef NCollection_DataMap::Iterator TopOpeBRepDS_DataMapIteratorOfMapOfSurface; #endif diff --git a/src/TopOpeBRepDS/TopOpeBRepDS_Marker.hxx b/src/TopOpeBRepDS/TopOpeBRepDS_Marker.hxx index e1b9ae3086..90a735722d 100644 --- a/src/TopOpeBRepDS/TopOpeBRepDS_Marker.hxx +++ b/src/TopOpeBRepDS/TopOpeBRepDS_Marker.hxx @@ -23,7 +23,6 @@ #include #include #include -#include class TopOpeBRepDS_Marker; diff --git a/src/TopOpeBRepDS/TopOpeBRepDS_ProcessEdgeInterferences.cxx b/src/TopOpeBRepDS/TopOpeBRepDS_ProcessEdgeInterferences.cxx index c217ab605d..5190c9f175 100644 --- a/src/TopOpeBRepDS/TopOpeBRepDS_ProcessEdgeInterferences.cxx +++ b/src/TopOpeBRepDS/TopOpeBRepDS_ProcessEdgeInterferences.cxx @@ -125,7 +125,7 @@ Standard_EXPORT Standard_Integer FUN_unkeepEinterferences TopOpeBRepDS_ListIteratorOfListOfInterference it1(LI); while (it1.More() ) { - Handle(TopOpeBRepDS_Interference)& I1 = it1.Value(); + Handle(TopOpeBRepDS_Interference)& I1 = it1.ChangeValue(); Standard_Boolean k1 = ::FUN_keepEinterference(BDS,I1,E); if ( !k1 ) { LI.Remove(it1); @@ -234,7 +234,7 @@ Standard_EXPORT void FUN_unkeepEsymetrictransitions it1.Initialize(LI); while (it1.More() ) { Standard_Boolean it1toremove = Standard_False; - Handle(TopOpeBRepDS_Interference)& I1 = it1.Value(); + Handle(TopOpeBRepDS_Interference)& I1 = it1.ChangeValue(); TopOpeBRepDS_Kind GT1,ST1; Standard_Integer G1,S1; FDS_data(I1,GT1,G1,ST1,S1); TopAbs_ShapeEnum tsb1,tsa1; Standard_Integer isb1,isa1; ::FDS_Tdata(I1,tsb1,isb1,tsa1,isa1); const TopOpeBRepDS_Transition T1 = I1->Transition(); @@ -304,7 +304,7 @@ Standard_EXPORT void FUN_orderFFsamedomain it1.Initialize(LI); while (it1.More() ) { - Handle(TopOpeBRepDS_Interference)& I1 = it1.Value(); + Handle(TopOpeBRepDS_Interference)& I1 = it1.ChangeValue(); TopOpeBRepDS_Kind GT1,ST1; Standard_Integer G1,S1; FDS_data(I1,GT1,G1,ST1,S1); TopAbs_ShapeEnum tsb1,tsa1; Standard_Integer isb1,isa1; FDS_Tdata(I1,tsb1,isb1,tsa1,isa1); // I1->Transition(); @@ -346,7 +346,7 @@ Standard_EXPORT void FUN_orderSTATETRANSonG it1.Initialize(LI); while (it1.More() ) { - Handle(TopOpeBRepDS_Interference)& I1 = it1.Value(); + Handle(TopOpeBRepDS_Interference)& I1 = it1.ChangeValue(); TopOpeBRepDS_Kind GT1,ST1; Standard_Integer G1,S1; TopAbs_ShapeEnum tsb1,tsa1; Standard_Integer isb1,isa1; FDS_Idata(I1,tsb1,isb1,tsa1,isa1,GT1,G1,ST1,S1); const TopOpeBRepDS_Transition& T1 = I1->Transition(); @@ -404,7 +404,7 @@ Standard_EXPORT void FUN_resolveEUNKNOWN // process interferences of LI with UNKNOWN transition for (it1.Initialize(LI); it1.More(); it1.Next() ) { - Handle(TopOpeBRepDS_Interference)& I1 = it1.Value(); + Handle(TopOpeBRepDS_Interference)& I1 = it1.ChangeValue(); const TopOpeBRepDS_Transition& T1 = I1->Transition(); Standard_Boolean isunk = T1.IsUnknown(); if (!isunk) continue; diff --git a/src/TopOpeBRepDS/TopOpeBRepDS_ProcessFaceInterferences.cxx b/src/TopOpeBRepDS/TopOpeBRepDS_ProcessFaceInterferences.cxx index c4011210c7..06f4565127 100644 --- a/src/TopOpeBRepDS/TopOpeBRepDS_ProcessFaceInterferences.cxx +++ b/src/TopOpeBRepDS/TopOpeBRepDS_ProcessFaceInterferences.cxx @@ -152,7 +152,7 @@ Standard_EXPORT void FUN_unkeepFdoubleGBoundinterferences it1.Initialize(LI); while (it1.More() ) { - Handle(TopOpeBRepDS_Interference)& I1 = it1.Value(); + Handle(TopOpeBRepDS_Interference)& I1 = it1.ChangeValue(); TopOpeBRepDS_Kind GT1,ST1; Standard_Integer G1,S1; const TopOpeBRepDS_Transition& T1 = I1->Transition(); Standard_Boolean isunk1 = T1.IsUnknown(); @@ -217,7 +217,7 @@ Standard_EXPORT void FUN_resolveFUNKNOWN // process interferences of LI with UNKNOWN transition for (it1.Initialize(LI); it1.More(); it1.Next() ) { - Handle(TopOpeBRepDS_Interference)& I1 = it1.Value(); + Handle(TopOpeBRepDS_Interference)& I1 = it1.ChangeValue(); const TopOpeBRepDS_Transition& T1 = I1->Transition(); Standard_Boolean isunk = T1.IsUnknown(); if (!isunk) continue; diff --git a/src/TopOpeBRepDS/TopOpeBRepDS_ProcessInterferencesTool.cxx b/src/TopOpeBRepDS/TopOpeBRepDS_ProcessInterferencesTool.cxx index 068670c4a9..b01351798b 100644 --- a/src/TopOpeBRepDS/TopOpeBRepDS_ProcessInterferencesTool.cxx +++ b/src/TopOpeBRepDS/TopOpeBRepDS_ProcessInterferencesTool.cxx @@ -329,7 +329,7 @@ Standard_EXPORT void FUN_reducedoublons // process interferences of LI with VERTEX geometry it1.Initialize(LI); while (it1.More() ) { - Handle(TopOpeBRepDS_Interference)& I1 = it1.Value(); + Handle(TopOpeBRepDS_Interference)& I1 = it1.ChangeValue(); const TopOpeBRepDS_Transition& T1 = I1->Transition(); TopOpeBRepDS_Kind GT1,ST1; Standard_Integer G1,S1; FDS_data(I1,GT1,G1,ST1,S1); TopAbs_ShapeEnum tsb1,tsa1; Standard_Integer isb1,isa1; @@ -403,7 +403,7 @@ Standard_EXPORT void FUN_unkeepUNKNOWN it1.Initialize(LI); while (it1.More() ) { - Handle(TopOpeBRepDS_Interference)& I1 = it1.Value(); + Handle(TopOpeBRepDS_Interference)& I1 = it1.ChangeValue(); const TopOpeBRepDS_Transition& T1 = I1->Transition(); Standard_Boolean isunk = T1.IsUnknown(); @@ -541,7 +541,7 @@ static Standard_Boolean FUN_find3dISEsameISF(const Handle(TopOpeBRepDS_Interfere TopAbs_ShapeEnum SB1,SA1; Standard_Integer IB1,IA1; FDS_Tdata(I1,SB1,IB1,SA1,IA1); while ( it2.More()){ - Handle(TopOpeBRepDS_Interference)& I2 = it2.Value(); + Handle(TopOpeBRepDS_Interference)& I2 = it2.ChangeValue(); TopAbs_Orientation O2 = I2->Transition().Orientation(TopAbs_IN); TopOpeBRepDS_Kind GT2,ST2; Standard_Integer G2,S2; FDS_data(I2,GT2,G2,ST2,S2); TopAbs_ShapeEnum SB2,SA2; Standard_Integer IB2,IA2; FDS_Tdata(I2,SB2,IB2,SA2,IA2); diff --git a/src/TopOpeBRepTool/TopOpeBRepTool_DataMapOfOrientedShapeC2DF.hxx b/src/TopOpeBRepTool/TopOpeBRepTool_DataMapOfOrientedShapeC2DF.hxx index 166bd70ebc..bda4096b0a 100644 --- a/src/TopOpeBRepTool/TopOpeBRepTool_DataMapOfOrientedShapeC2DF.hxx +++ b/src/TopOpeBRepTool/TopOpeBRepTool_DataMapOfOrientedShapeC2DF.hxx @@ -19,11 +19,10 @@ #include #include -#include #include -typedef NCollection_DataMap TopOpeBRepTool_DataMapOfOrientedShapeC2DF; -typedef NCollection_DataMap::Iterator TopOpeBRepTool_DataMapIteratorOfDataMapOfOrientedShapeC2DF; +typedef NCollection_DataMap TopOpeBRepTool_DataMapOfOrientedShapeC2DF; +typedef NCollection_DataMap::Iterator TopOpeBRepTool_DataMapIteratorOfDataMapOfOrientedShapeC2DF; #endif diff --git a/src/TopOpeBRepTool/TopOpeBRepTool_FuseEdges.cxx b/src/TopOpeBRepTool/TopOpeBRepTool_FuseEdges.cxx index 9b9b8a202d..fef60f4ae2 100644 --- a/src/TopOpeBRepTool/TopOpeBRepTool_FuseEdges.cxx +++ b/src/TopOpeBRepTool/TopOpeBRepTool_FuseEdges.cxx @@ -904,7 +904,7 @@ Standard_Boolean TopOpeBRepTool_FuseEdges::UpdatePCurve(const TopoDS_Edge& theOl iter.Next(); for (; iter.More(); iter.Next()) { - TopoDS_Edge& E = TopoDS::Edge(iter.Value()); + const TopoDS_Edge& E = TopoDS::Edge(iter.Value()); Standard_Real first, last; Handle(Geom2d_Curve) C = BRep_Tool::CurveOnSurface( E, Surf, loc, first, last ); Handle(Geom2d_BoundedCurve) BC = Handle(Geom2d_BoundedCurve)::DownCast(C); diff --git a/src/TopOpeBRepTool/TopOpeBRepTool_IndexedDataMapOfShapeBox.hxx b/src/TopOpeBRepTool/TopOpeBRepTool_IndexedDataMapOfShapeBox.hxx index bb6417f5b9..7570e991ad 100644 --- a/src/TopOpeBRepTool/TopOpeBRepTool_IndexedDataMapOfShapeBox.hxx +++ b/src/TopOpeBRepTool/TopOpeBRepTool_IndexedDataMapOfShapeBox.hxx @@ -19,10 +19,9 @@ #include #include -#include #include -typedef NCollection_IndexedDataMap TopOpeBRepTool_IndexedDataMapOfShapeBox; +typedef NCollection_IndexedDataMap TopOpeBRepTool_IndexedDataMapOfShapeBox; #endif diff --git a/src/TopOpeBRepTool/TopOpeBRepTool_IndexedDataMapOfShapeBox2d.hxx b/src/TopOpeBRepTool/TopOpeBRepTool_IndexedDataMapOfShapeBox2d.hxx index 1fc2e23f99..d03a486f8f 100644 --- a/src/TopOpeBRepTool/TopOpeBRepTool_IndexedDataMapOfShapeBox2d.hxx +++ b/src/TopOpeBRepTool/TopOpeBRepTool_IndexedDataMapOfShapeBox2d.hxx @@ -19,10 +19,9 @@ #include #include -#include #include -typedef NCollection_IndexedDataMap TopOpeBRepTool_IndexedDataMapOfShapeBox2d; +typedef NCollection_IndexedDataMap TopOpeBRepTool_IndexedDataMapOfShapeBox2d; #endif diff --git a/src/TopTools/FILES b/src/TopTools/FILES index 747e21c1fd..cc01db47cc 100644 --- a/src/TopTools/FILES +++ b/src/TopTools/FILES @@ -47,10 +47,7 @@ TopTools_MapOfOrientedShape.hxx TopTools_MapOfShape.hxx TopTools_MutexForShapeProvider.cxx TopTools_MutexForShapeProvider.hxx -TopTools_OrientedShapeMapHasher.hxx -TopTools_OrientedShapeMapHasher.lxx TopTools_SequenceOfShape.hxx TopTools_ShapeMapHasher.hxx -TopTools_ShapeMapHasher.lxx TopTools_ShapeSet.cxx TopTools_ShapeSet.hxx diff --git a/src/TopTools/TopTools_DataMapOfIntegerListOfShape.hxx b/src/TopTools/TopTools_DataMapOfIntegerListOfShape.hxx index 5813ef773f..4c57ef42db 100644 --- a/src/TopTools/TopTools_DataMapOfIntegerListOfShape.hxx +++ b/src/TopTools/TopTools_DataMapOfIntegerListOfShape.hxx @@ -19,11 +19,10 @@ #include #include -#include #include -typedef NCollection_DataMap TopTools_DataMapOfIntegerListOfShape; -typedef NCollection_DataMap::Iterator TopTools_DataMapIteratorOfDataMapOfIntegerListOfShape; +typedef NCollection_DataMap TopTools_DataMapOfIntegerListOfShape; +typedef NCollection_DataMap::Iterator TopTools_DataMapIteratorOfDataMapOfIntegerListOfShape; #endif diff --git a/src/TopTools/TopTools_DataMapOfIntegerShape.hxx b/src/TopTools/TopTools_DataMapOfIntegerShape.hxx index d6503c6df4..666312ac8f 100644 --- a/src/TopTools/TopTools_DataMapOfIntegerShape.hxx +++ b/src/TopTools/TopTools_DataMapOfIntegerShape.hxx @@ -19,11 +19,10 @@ #include #include -#include #include -typedef NCollection_DataMap TopTools_DataMapOfIntegerShape; -typedef NCollection_DataMap::Iterator TopTools_DataMapIteratorOfDataMapOfIntegerShape; +typedef NCollection_DataMap TopTools_DataMapOfIntegerShape; +typedef NCollection_DataMap::Iterator TopTools_DataMapIteratorOfDataMapOfIntegerShape; #endif diff --git a/src/TopTools/TopTools_DataMapOfOrientedShapeInteger.hxx b/src/TopTools/TopTools_DataMapOfOrientedShapeInteger.hxx index ff7325c207..0220b044f0 100644 --- a/src/TopTools/TopTools_DataMapOfOrientedShapeInteger.hxx +++ b/src/TopTools/TopTools_DataMapOfOrientedShapeInteger.hxx @@ -19,11 +19,10 @@ #include #include -#include #include -typedef NCollection_DataMap TopTools_DataMapOfOrientedShapeInteger; -typedef NCollection_DataMap::Iterator TopTools_DataMapIteratorOfDataMapOfOrientedShapeInteger; +typedef NCollection_DataMap TopTools_DataMapOfOrientedShapeInteger; +typedef NCollection_DataMap::Iterator TopTools_DataMapIteratorOfDataMapOfOrientedShapeInteger; #endif diff --git a/src/TopTools/TopTools_DataMapOfOrientedShapeShape.hxx b/src/TopTools/TopTools_DataMapOfOrientedShapeShape.hxx index 7ac0f777bd..dfd145d005 100644 --- a/src/TopTools/TopTools_DataMapOfOrientedShapeShape.hxx +++ b/src/TopTools/TopTools_DataMapOfOrientedShapeShape.hxx @@ -18,11 +18,10 @@ #define TopTools_DataMapOfOrientedShapeShape_HeaderFile #include -#include #include -typedef NCollection_DataMap TopTools_DataMapOfOrientedShapeShape; -typedef NCollection_DataMap::Iterator TopTools_DataMapIteratorOfDataMapOfOrientedShapeShape; +typedef NCollection_DataMap TopTools_DataMapOfOrientedShapeShape; +typedef NCollection_DataMap::Iterator TopTools_DataMapIteratorOfDataMapOfOrientedShapeShape; #endif diff --git a/src/TopTools/TopTools_IndexedDataMapOfShapeAddress.hxx b/src/TopTools/TopTools_IndexedDataMapOfShapeAddress.hxx index bbe20a935f..570a6b190b 100644 --- a/src/TopTools/TopTools_IndexedDataMapOfShapeAddress.hxx +++ b/src/TopTools/TopTools_IndexedDataMapOfShapeAddress.hxx @@ -18,7 +18,6 @@ #define TopTools_IndexedDataMapOfShapeAddress_HeaderFile #include -#include #include #include diff --git a/src/TopTools/TopTools_IndexedMapOfOrientedShape.hxx b/src/TopTools/TopTools_IndexedMapOfOrientedShape.hxx index bd5ea4c3e5..ff3974f35e 100644 --- a/src/TopTools/TopTools_IndexedMapOfOrientedShape.hxx +++ b/src/TopTools/TopTools_IndexedMapOfOrientedShape.hxx @@ -18,10 +18,9 @@ #define TopTools_IndexedMapOfOrientedShape_HeaderFile #include -#include #include -typedef NCollection_IndexedMap TopTools_IndexedMapOfOrientedShape; +typedef NCollection_IndexedMap TopTools_IndexedMapOfOrientedShape; #endif diff --git a/src/TopTools/TopTools_MapOfOrientedShape.hxx b/src/TopTools/TopTools_MapOfOrientedShape.hxx index 44071c9672..b8987c9f2e 100644 --- a/src/TopTools/TopTools_MapOfOrientedShape.hxx +++ b/src/TopTools/TopTools_MapOfOrientedShape.hxx @@ -18,11 +18,10 @@ #define TopTools_MapOfOrientedShape_HeaderFile #include -#include #include -typedef NCollection_Map TopTools_MapOfOrientedShape; -typedef NCollection_Map::Iterator TopTools_MapIteratorOfMapOfOrientedShape; +typedef NCollection_Map TopTools_MapOfOrientedShape; +typedef NCollection_Map::Iterator TopTools_MapIteratorOfMapOfOrientedShape; #endif diff --git a/src/TopTools/TopTools_OrientedShapeMapHasher.hxx b/src/TopTools/TopTools_OrientedShapeMapHasher.hxx deleted file mode 100644 index e4dfca99b2..0000000000 --- a/src/TopTools/TopTools_OrientedShapeMapHasher.hxx +++ /dev/null @@ -1,69 +0,0 @@ -// Created on: 1993-08-30 -// Created by: Modelistation -// Copyright (c) 1993-1999 Matra Datavision -// Copyright (c) 1999-2014 OPEN CASCADE SAS -// -// This file is part of Open CASCADE Technology software library. -// -// This library is free software; you can redistribute it and/or modify it under -// the terms of the GNU Lesser General Public License version 2.1 as published -// by the Free Software Foundation, with special exception defined in the file -// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT -// distribution for complete text of the license and disclaimer of any warranty. -// -// Alternatively, this file may be used under the terms of Open CASCADE -// commercial license or contractual agreement. - -#ifndef _TopTools_OrientedShapeMapHasher_HeaderFile -#define _TopTools_OrientedShapeMapHasher_HeaderFile - -#include -#include - -#include -class TopoDS_Shape; - - - -class TopTools_OrientedShapeMapHasher -{ -public: - - DEFINE_STANDARD_ALLOC - - //! Computes a hash code for the given shape, in the range [1, theUpperBound] - //! @param theShape the shape which hash code is to be computed - //! @param theUpperBound the upper bound of the range a computing hash code must be within - //! @return a computed hash code, in the range [1, theUpperBound] - static Standard_Integer HashCode (const TopoDS_Shape& theShape, const Standard_Integer theUpperBound); - - //! Returns True when the two keys are equal. Two same - //! keys must have the same hashcode, the contrary is - //! not necessary. - static Standard_Boolean IsEqual (const TopoDS_Shape& S1, const TopoDS_Shape& S2); - - - - -protected: - - - - - -private: - - - - - -}; - - -#include - - - - - -#endif // _TopTools_OrientedShapeMapHasher_HeaderFile diff --git a/src/TopTools/TopTools_OrientedShapeMapHasher.lxx b/src/TopTools/TopTools_OrientedShapeMapHasher.lxx deleted file mode 100644 index 6fb47100bd..0000000000 --- a/src/TopTools/TopTools_OrientedShapeMapHasher.lxx +++ /dev/null @@ -1,37 +0,0 @@ -// Created on: 1993-01-14 -// Created by: Remi LEQUETTE -// Copyright (c) 1993-1999 Matra Datavision -// Copyright (c) 1999-2014 OPEN CASCADE SAS -// -// This file is part of Open CASCADE Technology software library. -// -// This library is free software; you can redistribute it and/or modify it under -// the terms of the GNU Lesser General Public License version 2.1 as published -// by the Free Software Foundation, with special exception defined in the file -// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT -// distribution for complete text of the license and disclaimer of any warranty. -// -// Alternatively, this file may be used under the terms of Open CASCADE -// commercial license or contractual agreement. - -#include - -//======================================================================= -// function : HashCode -// purpose : -//======================================================================= -inline Standard_Integer TopTools_OrientedShapeMapHasher::HashCode (const TopoDS_Shape& theShape, - const Standard_Integer theUpperBound) -{ - return theShape.HashCode (theUpperBound); -} - -//======================================================================= -//function : IsEqual -//purpose : -//======================================================================= -inline Standard_Boolean TopTools_OrientedShapeMapHasher::IsEqual - (const TopoDS_Shape& S1, const TopoDS_Shape& S2) -{ - return S1.IsEqual(S2); -} diff --git a/src/TopTools/TopTools_ShapeMapHasher.hxx b/src/TopTools/TopTools_ShapeMapHasher.hxx index ba47758975..7899e32a31 100644 --- a/src/TopTools/TopTools_ShapeMapHasher.hxx +++ b/src/TopTools/TopTools_ShapeMapHasher.hxx @@ -17,52 +17,26 @@ #ifndef _TopTools_ShapeMapHasher_HeaderFile #define _TopTools_ShapeMapHasher_HeaderFile +#include #include #include -class TopoDS_Shape; - - //! Hash tool, used for generating maps of shapes in topology. -class TopTools_ShapeMapHasher +class TopTools_ShapeMapHasher { public: - DEFINE_STANDARD_ALLOC - - //! Computes a hash code for the given shape, in the range [1, theUpperBound] - //! @param theShape the shape which hash code is to be computed - //! @param theUpperBound the upper bound of the range a computing hash code must be within - //! @return a computed hash code, in the range [1, theUpperBound] - static Standard_Integer HashCode (const TopoDS_Shape& theShape, Standard_Integer theUpperBound); - - //! Returns True when the two keys are the same. Two - //! same keys must have the same hashcode, the - //! contrary is not necessary. - static Standard_Boolean IsEqual (const TopoDS_Shape& S1, const TopoDS_Shape& S2); - - - - -protected: - - - - - -private: - - - + DEFINE_STANDARD_ALLOC; + size_t operator()(const TopoDS_Shape& theShape) const noexcept + { + return std::hash{}(theShape); + } + bool operator()(const TopoDS_Shape& S1, const TopoDS_Shape& S2) const noexcept + { + return S1.IsSame(S2); + } }; - -#include - - - - - #endif // _TopTools_ShapeMapHasher_HeaderFile diff --git a/src/TopTools/TopTools_ShapeMapHasher.lxx b/src/TopTools/TopTools_ShapeMapHasher.lxx deleted file mode 100644 index a3789d085b..0000000000 --- a/src/TopTools/TopTools_ShapeMapHasher.lxx +++ /dev/null @@ -1,37 +0,0 @@ -// Created on: 1993-01-14 -// Created by: Remi LEQUETTE -// Copyright (c) 1993-1999 Matra Datavision -// Copyright (c) 1999-2014 OPEN CASCADE SAS -// -// This file is part of Open CASCADE Technology software library. -// -// This library is free software; you can redistribute it and/or modify it under -// the terms of the GNU Lesser General Public License version 2.1 as published -// by the Free Software Foundation, with special exception defined in the file -// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT -// distribution for complete text of the license and disclaimer of any warranty. -// -// Alternatively, this file may be used under the terms of Open CASCADE -// commercial license or contractual agreement. - -#include - -//======================================================================= -// function : HashCode -// purpose : -//======================================================================= -inline Standard_Integer TopTools_ShapeMapHasher::HashCode (const TopoDS_Shape& theShape, - const Standard_Integer theUpperBound) -{ - return theShape.HashCode (theUpperBound); -} - -//======================================================================= -//function : IsEqual -//purpose : -//======================================================================= -inline Standard_Boolean TopTools_ShapeMapHasher::IsEqual - (const TopoDS_Shape& S1, const TopoDS_Shape& S2) -{ - return S1.IsSame(S2); -} diff --git a/src/TopoDS/FILES b/src/TopoDS/FILES index 1fd91a9eea..cc0d9a6ae4 100644 --- a/src/TopoDS/FILES +++ b/src/TopoDS/FILES @@ -6,13 +6,9 @@ TopoDS_Builder.cxx TopoDS_Builder.hxx TopoDS_Builder.lxx TopoDS_Compound.hxx -TopoDS_Compound.lxx TopoDS_CompSolid.hxx -TopoDS_CompSolid.lxx TopoDS_Edge.hxx -TopoDS_Edge.lxx TopoDS_Face.hxx -TopoDS_Face.lxx TopoDS_FrozenShape.hxx TopoDS_HShape.cxx TopoDS_HShape.hxx @@ -25,9 +21,7 @@ TopoDS_LockedShape.hxx TopoDS_Shape.cxx TopoDS_Shape.hxx TopoDS_Shell.hxx -TopoDS_Shell.lxx TopoDS_Solid.hxx -TopoDS_Solid.lxx TopoDS_TCompound.cxx TopoDS_TCompound.hxx TopoDS_TCompound.lxx @@ -56,8 +50,6 @@ TopoDS_TWire.hxx TopoDS_TWire.lxx TopoDS_UnCompatibleShapes.hxx TopoDS_Vertex.hxx -TopoDS_Vertex.lxx TopoDS_Wire.hxx -TopoDS_Wire.lxx TopoDS_AlertWithShape.cxx TopoDS_AlertWithShape.hxx diff --git a/src/TopoDS/TopoDS_CompSolid.hxx b/src/TopoDS/TopoDS_CompSolid.hxx index e042fdaffb..92a7a728a0 100644 --- a/src/TopoDS/TopoDS_CompSolid.hxx +++ b/src/TopoDS/TopoDS_CompSolid.hxx @@ -17,12 +17,8 @@ #ifndef _TopoDS_CompSolid_HeaderFile #define _TopoDS_CompSolid_HeaderFile -#include -#include - #include - //! Describes a composite solid which //! - references an underlying composite solid with the //! potential to be given a location and an orientation @@ -38,32 +34,20 @@ public: DEFINE_STANDARD_ALLOC - //! Constructs an Undefined CompSolid. - TopoDS_CompSolid(); - - - - -protected: - - - - - -private: - - - - - + TopoDS_CompSolid() {} }; - -#include - - - - +namespace std +{ + template <> + struct hash + { + size_t operator()(const TopoDS_CompSolid& theShape) const + { + return std::hash{}(theShape); + } + }; +} #endif // _TopoDS_CompSolid_HeaderFile diff --git a/src/TopoDS/TopoDS_CompSolid.lxx b/src/TopoDS/TopoDS_CompSolid.lxx deleted file mode 100644 index e4d4a88483..0000000000 --- a/src/TopoDS/TopoDS_CompSolid.lxx +++ /dev/null @@ -1,24 +0,0 @@ -// Created on: 1991-04-16 -// Created by: Remi LEQUETTE -// Copyright (c) 1991-1999 Matra Datavision -// Copyright (c) 1999-2014 OPEN CASCADE SAS -// -// This file is part of Open CASCADE Technology software library. -// -// This library is free software; you can redistribute it and/or modify it under -// the terms of the GNU Lesser General Public License version 2.1 as published -// by the Free Software Foundation, with special exception defined in the file -// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT -// distribution for complete text of the license and disclaimer of any warranty. -// -// Alternatively, this file may be used under the terms of Open CASCADE -// commercial license or contractual agreement. - -//======================================================================= -//function : TopoDS_CompSolid -//purpose : -//======================================================================= - -inline TopoDS_CompSolid::TopoDS_CompSolid () -{ -} diff --git a/src/TopoDS/TopoDS_Compound.hxx b/src/TopoDS/TopoDS_Compound.hxx index 639ddd7311..3aa0148a36 100644 --- a/src/TopoDS/TopoDS_Compound.hxx +++ b/src/TopoDS/TopoDS_Compound.hxx @@ -17,12 +17,8 @@ #ifndef _TopoDS_Compound_HeaderFile #define _TopoDS_Compound_HeaderFile -#include -#include - #include - //! Describes a compound which //! - references an underlying compound with the //! potential to be given a location and an orientation @@ -38,32 +34,20 @@ public: DEFINE_STANDARD_ALLOC - //! Constructs an Undefined Compound. - TopoDS_Compound(); - - - - -protected: - - - - - -private: - - - - - + TopoDS_Compound() {} }; - -#include - - - - +namespace std +{ + template <> + struct hash + { + size_t operator()(const TopoDS_Compound& theShape) const + { + return std::hash{}(theShape); + } + }; +} #endif // _TopoDS_Compound_HeaderFile diff --git a/src/TopoDS/TopoDS_Compound.lxx b/src/TopoDS/TopoDS_Compound.lxx deleted file mode 100644 index 687ded5b5e..0000000000 --- a/src/TopoDS/TopoDS_Compound.lxx +++ /dev/null @@ -1,24 +0,0 @@ -// Created on: 1991-04-16 -// Created by: Remi LEQUETTE -// Copyright (c) 1991-1999 Matra Datavision -// Copyright (c) 1999-2014 OPEN CASCADE SAS -// -// This file is part of Open CASCADE Technology software library. -// -// This library is free software; you can redistribute it and/or modify it under -// the terms of the GNU Lesser General Public License version 2.1 as published -// by the Free Software Foundation, with special exception defined in the file -// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT -// distribution for complete text of the license and disclaimer of any warranty. -// -// Alternatively, this file may be used under the terms of Open CASCADE -// commercial license or contractual agreement. - -//======================================================================= -//function : TopoDS_Compound -//purpose : -//======================================================================= - -inline TopoDS_Compound::TopoDS_Compound () -{ -} diff --git a/src/TopoDS/TopoDS_Edge.hxx b/src/TopoDS/TopoDS_Edge.hxx index 934dbd141b..0454c01f4c 100644 --- a/src/TopoDS/TopoDS_Edge.hxx +++ b/src/TopoDS/TopoDS_Edge.hxx @@ -17,12 +17,8 @@ #ifndef _TopoDS_Edge_HeaderFile #define _TopoDS_Edge_HeaderFile -#include -#include - #include - //! Describes an edge which //! - references an underlying edge with the potential to //! be given a location and an orientation @@ -37,32 +33,20 @@ public: DEFINE_STANDARD_ALLOC - //! Undefined Edge. - TopoDS_Edge(); - - - - -protected: - - - - - -private: - - - - - + TopoDS_Edge() {} }; - -#include - - - - +namespace std +{ + template <> + struct hash + { + size_t operator()(const TopoDS_Edge& theShape) const + { + return std::hash{}(theShape); + } + }; +} #endif // _TopoDS_Edge_HeaderFile diff --git a/src/TopoDS/TopoDS_Edge.lxx b/src/TopoDS/TopoDS_Edge.lxx deleted file mode 100644 index 24530288db..0000000000 --- a/src/TopoDS/TopoDS_Edge.lxx +++ /dev/null @@ -1,24 +0,0 @@ -// Created on: 1991-04-16 -// Created by: Remi LEQUETTE -// Copyright (c) 1991-1999 Matra Datavision -// Copyright (c) 1999-2014 OPEN CASCADE SAS -// -// This file is part of Open CASCADE Technology software library. -// -// This library is free software; you can redistribute it and/or modify it under -// the terms of the GNU Lesser General Public License version 2.1 as published -// by the Free Software Foundation, with special exception defined in the file -// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT -// distribution for complete text of the license and disclaimer of any warranty. -// -// Alternatively, this file may be used under the terms of Open CASCADE -// commercial license or contractual agreement. - -//======================================================================= -//function : TopoDS_Edge -//purpose : Empty Constructor -//======================================================================= - -inline TopoDS_Edge::TopoDS_Edge () -{ -} diff --git a/src/TopoDS/TopoDS_Face.hxx b/src/TopoDS/TopoDS_Face.hxx index 6ed9083c53..127284c424 100644 --- a/src/TopoDS/TopoDS_Face.hxx +++ b/src/TopoDS/TopoDS_Face.hxx @@ -17,12 +17,8 @@ #ifndef _TopoDS_Face_HeaderFile #define _TopoDS_Face_HeaderFile -#include -#include - #include - //! Describes a face which //! - references an underlying face with the potential to //! be given a location and an orientation @@ -36,32 +32,20 @@ public: DEFINE_STANDARD_ALLOC - //! Undefined Face. - TopoDS_Face(); - - - - -protected: - - - - - -private: - - - - - + TopoDS_Face() {} }; - -#include - - - - +namespace std +{ + template <> + struct hash + { + size_t operator()(const TopoDS_Face& theShape) const + { + return std::hash{}(theShape); + } + }; +} #endif // _TopoDS_Face_HeaderFile diff --git a/src/TopoDS/TopoDS_Face.lxx b/src/TopoDS/TopoDS_Face.lxx deleted file mode 100644 index ed77a8eadb..0000000000 --- a/src/TopoDS/TopoDS_Face.lxx +++ /dev/null @@ -1,24 +0,0 @@ -// Created on: 1991-04-16 -// Created by: Remi LEQUETTE -// Copyright (c) 1991-1999 Matra Datavision -// Copyright (c) 1999-2014 OPEN CASCADE SAS -// -// This file is part of Open CASCADE Technology software library. -// -// This library is free software; you can redistribute it and/or modify it under -// the terms of the GNU Lesser General Public License version 2.1 as published -// by the Free Software Foundation, with special exception defined in the file -// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT -// distribution for complete text of the license and disclaimer of any warranty. -// -// Alternatively, this file may be used under the terms of Open CASCADE -// commercial license or contractual agreement. - -//======================================================================= -//function : TopoDS_Face -//purpose : -//======================================================================= - -inline TopoDS_Face::TopoDS_Face () -{ -} diff --git a/src/TopoDS/TopoDS_Shape.cxx b/src/TopoDS/TopoDS_Shape.cxx index c78121649b..deda205a8b 100644 --- a/src/TopoDS/TopoDS_Shape.cxx +++ b/src/TopoDS/TopoDS_Shape.cxx @@ -22,18 +22,6 @@ #include #include -//======================================================================= -// function : HashCode -// purpose : -//======================================================================= -Standard_Integer TopoDS_Shape::HashCode (const Standard_Integer theUpperBound) const -{ - // PKV - const Standard_Integer aHS = ::HashCode (myTShape.get(), theUpperBound); - const Standard_Integer aHL = myLocation.HashCode (theUpperBound); - return ::HashCode (aHS ^ aHL, theUpperBound); -} - //======================================================================= //function : DumpJson //purpose : diff --git a/src/TopoDS/TopoDS_Shape.hxx b/src/TopoDS/TopoDS_Shape.hxx index 12b5918cc7..4933134650 100644 --- a/src/TopoDS/TopoDS_Shape.hxx +++ b/src/TopoDS/TopoDS_Shape.hxx @@ -20,6 +20,7 @@ #include #include #include +#include // resolve name collisions with X11 headers #ifdef Convex @@ -279,12 +280,6 @@ public: Standard_Boolean IsNotEqual (const TopoDS_Shape& theOther) const { return !IsEqual (theOther); } Standard_Boolean operator != (const TopoDS_Shape& theOther) const { return IsNotEqual (theOther); } - //! Returns a hashed value denoting . This value is in the range [1, theUpperBound]. It is computed from the - //! TShape and the Location. The Orientation is not used. - //! @param theUpperBound the upper bound of the range a computing hash code must be within - //! @return a computed hash code, in the range [1, theUpperBound] - Standard_EXPORT Standard_Integer HashCode (Standard_Integer theUpperBound) const; - //! Replace by a new Shape with the same //! Orientation and Location and a new TShape with the //! same geometry and no sub-shapes. @@ -313,13 +308,18 @@ private: }; -//! Computes a hash code for the given shape, in the range [1, theUpperBound] -//! @param theShape the shape which hash code is to be computed -//! @param theUpperBound the upper bound of the range a computing hash code must be within -//! @return a computed hash code, in the range [1, theUpperBound] -inline Standard_Integer HashCode (const TopoDS_Shape& theShape, const Standard_Integer theUpperBound) +namespace std { - return theShape.HashCode (theUpperBound); + template <> + struct hash + { + size_t operator()(const TopoDS_Shape& theShape) const noexcept + { + const size_t aHL = std::hash{}(theShape.Location()); + return aHL == 0 ? opencascade::hash(theShape.TShape().get()) + : opencascade::MurmurHash::hash_combine(theShape.TShape().get(), sizeof(void*), aHL); + } + }; } #endif // _TopoDS_Shape_HeaderFile diff --git a/src/TopoDS/TopoDS_Shell.hxx b/src/TopoDS/TopoDS_Shell.hxx index a422f2c355..e6d443973f 100644 --- a/src/TopoDS/TopoDS_Shell.hxx +++ b/src/TopoDS/TopoDS_Shell.hxx @@ -17,12 +17,8 @@ #ifndef _TopoDS_Shell_HeaderFile #define _TopoDS_Shell_HeaderFile -#include -#include - #include - //! Describes a shell which //! - references an underlying shell with the potential to //! be given a location and an orientation @@ -36,32 +32,20 @@ public: DEFINE_STANDARD_ALLOC - //! Constructs an Undefined Shell. - TopoDS_Shell(); - - - - -protected: - - - - - -private: - - - - - + TopoDS_Shell() {} }; - -#include - - - - +namespace std +{ + template <> + struct hash + { + size_t operator()(const TopoDS_Shell& theShape) const + { + return std::hash{}(theShape); + } + }; +} #endif // _TopoDS_Shell_HeaderFile diff --git a/src/TopoDS/TopoDS_Shell.lxx b/src/TopoDS/TopoDS_Shell.lxx deleted file mode 100644 index f357a4567a..0000000000 --- a/src/TopoDS/TopoDS_Shell.lxx +++ /dev/null @@ -1,24 +0,0 @@ -// Created on: 1991-04-16 -// Created by: Remi LEQUETTE -// Copyright (c) 1991-1999 Matra Datavision -// Copyright (c) 1999-2014 OPEN CASCADE SAS -// -// This file is part of Open CASCADE Technology software library. -// -// This library is free software; you can redistribute it and/or modify it under -// the terms of the GNU Lesser General Public License version 2.1 as published -// by the Free Software Foundation, with special exception defined in the file -// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT -// distribution for complete text of the license and disclaimer of any warranty. -// -// Alternatively, this file may be used under the terms of Open CASCADE -// commercial license or contractual agreement. - -//======================================================================= -//function : TopoDS_Shell -//purpose : -//======================================================================= - -inline TopoDS_Shell::TopoDS_Shell () -{ -} diff --git a/src/TopoDS/TopoDS_Solid.hxx b/src/TopoDS/TopoDS_Solid.hxx index c21397c448..3ddc46bc2f 100644 --- a/src/TopoDS/TopoDS_Solid.hxx +++ b/src/TopoDS/TopoDS_Solid.hxx @@ -17,12 +17,8 @@ #ifndef _TopoDS_Solid_HeaderFile #define _TopoDS_Solid_HeaderFile -#include -#include - #include - //! Describes a solid shape which //! - references an underlying solid shape with the //! potential to be given a location and an orientation @@ -37,32 +33,20 @@ public: DEFINE_STANDARD_ALLOC - //! Constructs an Undefined Solid. - TopoDS_Solid(); - - - - -protected: - - - - - -private: - - - - - + TopoDS_Solid() {} }; - -#include - - - - +namespace std +{ + template <> + struct hash + { + size_t operator()(const TopoDS_Solid& theShape) const + { + return std::hash{}(theShape); + } + }; +} #endif // _TopoDS_Solid_HeaderFile diff --git a/src/TopoDS/TopoDS_Solid.lxx b/src/TopoDS/TopoDS_Solid.lxx deleted file mode 100644 index cf2e324999..0000000000 --- a/src/TopoDS/TopoDS_Solid.lxx +++ /dev/null @@ -1,24 +0,0 @@ -// Created on: 1991-04-16 -// Created by: Remi LEQUETTE -// Copyright (c) 1991-1999 Matra Datavision -// Copyright (c) 1999-2014 OPEN CASCADE SAS -// -// This file is part of Open CASCADE Technology software library. -// -// This library is free software; you can redistribute it and/or modify it under -// the terms of the GNU Lesser General Public License version 2.1 as published -// by the Free Software Foundation, with special exception defined in the file -// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT -// distribution for complete text of the license and disclaimer of any warranty. -// -// Alternatively, this file may be used under the terms of Open CASCADE -// commercial license or contractual agreement. - -//======================================================================= -//function : TopoDS_Solid -//purpose : -//======================================================================= - -inline TopoDS_Solid::TopoDS_Solid () -{ -} diff --git a/src/TopoDS/TopoDS_Vertex.hxx b/src/TopoDS/TopoDS_Vertex.hxx index fdc778db02..361990ec1a 100644 --- a/src/TopoDS/TopoDS_Vertex.hxx +++ b/src/TopoDS/TopoDS_Vertex.hxx @@ -17,12 +17,8 @@ #ifndef _TopoDS_Vertex_HeaderFile #define _TopoDS_Vertex_HeaderFile -#include -#include - #include - //! Describes a vertex which //! - references an underlying vertex with the potential //! to be given a location and an orientation @@ -37,32 +33,20 @@ public: DEFINE_STANDARD_ALLOC - //! Undefined Vertex. - TopoDS_Vertex(); - - - - -protected: - - - - - -private: - - - - - + TopoDS_Vertex() {} }; - -#include - - - - +namespace std +{ + template <> + struct hash + { + size_t operator()(const TopoDS_Vertex& theShape) const + { + return std::hash{}(theShape); + } + }; +} #endif // _TopoDS_Vertex_HeaderFile diff --git a/src/TopoDS/TopoDS_Vertex.lxx b/src/TopoDS/TopoDS_Vertex.lxx deleted file mode 100644 index b7c1ceeb11..0000000000 --- a/src/TopoDS/TopoDS_Vertex.lxx +++ /dev/null @@ -1,24 +0,0 @@ -// Created on: 1991-04-12 -// Created by: Remi LEQUETTE -// Copyright (c) 1991-1999 Matra Datavision -// Copyright (c) 1999-2014 OPEN CASCADE SAS -// -// This file is part of Open CASCADE Technology software library. -// -// This library is free software; you can redistribute it and/or modify it under -// the terms of the GNU Lesser General Public License version 2.1 as published -// by the Free Software Foundation, with special exception defined in the file -// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT -// distribution for complete text of the license and disclaimer of any warranty. -// -// Alternatively, this file may be used under the terms of Open CASCADE -// commercial license or contractual agreement. - -//======================================================================= -//function : TopoDS_Vertex -//purpose : -//======================================================================= - -inline TopoDS_Vertex::TopoDS_Vertex() -{ -} diff --git a/src/TopoDS/TopoDS_Wire.hxx b/src/TopoDS/TopoDS_Wire.hxx index 73c973822e..a2d2c3667a 100644 --- a/src/TopoDS/TopoDS_Wire.hxx +++ b/src/TopoDS/TopoDS_Wire.hxx @@ -17,12 +17,8 @@ #ifndef _TopoDS_Wire_HeaderFile #define _TopoDS_Wire_HeaderFile -#include -#include - #include - //! Describes a wire which //! - references an underlying wire with the potential to //! be given a location and an orientation @@ -36,32 +32,20 @@ public: DEFINE_STANDARD_ALLOC - //! Undefined Wire. - TopoDS_Wire(); - - - - -protected: - - - - - -private: - - - - - + TopoDS_Wire() {} }; - -#include - - - - +namespace std +{ + template <> + struct hash + { + size_t operator()(const TopoDS_Wire& theShape) const + { + return std::hash{}(theShape); + } + }; +} #endif // _TopoDS_Wire_HeaderFile diff --git a/src/TopoDS/TopoDS_Wire.lxx b/src/TopoDS/TopoDS_Wire.lxx deleted file mode 100644 index 485597d8dd..0000000000 --- a/src/TopoDS/TopoDS_Wire.lxx +++ /dev/null @@ -1,24 +0,0 @@ -// Created on: 1991-04-16 -// Created by: Remi LEQUETTE -// Copyright (c) 1991-1999 Matra Datavision -// Copyright (c) 1999-2014 OPEN CASCADE SAS -// -// This file is part of Open CASCADE Technology software library. -// -// This library is free software; you can redistribute it and/or modify it under -// the terms of the GNU Lesser General Public License version 2.1 as published -// by the Free Software Foundation, with special exception defined in the file -// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT -// distribution for complete text of the license and disclaimer of any warranty. -// -// Alternatively, this file may be used under the terms of Open CASCADE -// commercial license or contractual agreement. - -//======================================================================= -//function : TopoDS_Wire -//purpose : -//======================================================================= - -inline TopoDS_Wire::TopoDS_Wire () -{ -} diff --git a/src/Transfer/FILES b/src/Transfer/FILES index 2fff748cd3..8f8f66a948 100644 --- a/src/Transfer/FILES +++ b/src/Transfer/FILES @@ -1,4 +1,3 @@ -Transfer_Actor.gxx Transfer_ActorDispatch.cxx Transfer_ActorDispatch.hxx Transfer_ActorOfFinderProcess.cxx @@ -21,18 +20,15 @@ Transfer_Finder.cxx Transfer_Finder.hxx Transfer_FinderProcess.cxx Transfer_FinderProcess.hxx -Transfer_FindHasher.cxx Transfer_FindHasher.hxx Transfer_HSequenceOfBinder.hxx Transfer_HSequenceOfFinder.hxx -Transfer_Iterator.gxx Transfer_IteratorOfProcessForFinder.hxx Transfer_IteratorOfProcessForFinder_0.cxx Transfer_IteratorOfProcessForTransient.hxx Transfer_IteratorOfProcessForTransient_0.cxx Transfer_MapContainer.cxx Transfer_MapContainer.hxx -Transfer_Mapper.gxx Transfer_MultipleBinder.cxx Transfer_MultipleBinder.hxx Transfer_ProcessForFinder.hxx @@ -61,7 +57,6 @@ Transfer_TransferMapOfProcessForFinder.hxx Transfer_TransferMapOfProcessForTransient.hxx Transfer_TransferOutput.cxx Transfer_TransferOutput.hxx -Transfer_TransferProcess.gxx Transfer_TransientListBinder.cxx Transfer_TransientListBinder.hxx Transfer_TransientMapper.hxx diff --git a/src/Transfer/Transfer_Actor.gxx b/src/Transfer/Transfer_Actor.gxx deleted file mode 100644 index 8d08e7e9d0..0000000000 --- a/src/Transfer/Transfer_Actor.gxx +++ /dev/null @@ -1,69 +0,0 @@ -// Copyright (c) 1999-2014 OPEN CASCADE SAS -// -// This file is part of Open CASCADE Technology software library. -// -// This library is free software; you can redistribute it and/or modify it under -// the terms of the GNU Lesser General Public License version 2.1 as published -// by the Free Software Foundation, with special exception defined in the file -// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT -// distribution for complete text of the license and disclaimer of any warranty. -// -// Alternatively, this file may be used under the terms of Open CASCADE -// commercial license or contractual agreement. - -//#include - -// TheStart : Handle(Standard_Transient) ou (Transfer_Finder) - - - -Transfer_Actor::Transfer_Actor () { } - - - Standard_Boolean Transfer_Actor::Recognize (const TheStart& /*start*/) - { return Standard_True; } - - Handle(Transfer_Binder) Transfer_Actor::Transferring - (const TheStart& /*start*/, - const Handle(Transfer_TransferProcess)& /*TP*/, - const Message_ProgressRange& /*theProgress*/) - { return NullResult(); } - - - Handle(Transfer_SimpleBinderOfTransient) - Transfer_Actor::TransientResult - (const Handle(Standard_Transient)& res) const -{ - Handle(Transfer_SimpleBinderOfTransient) binder; - if (res.IsNull()) return binder; - binder = new Transfer_SimpleBinderOfTransient; - binder->SetResult (res); - return binder; -} - - - Handle(Transfer_Binder) Transfer_Actor::NullResult () const -{ - Handle(Transfer_Binder) binder; - return binder; -} - - - void Transfer_Actor::SetNext - (const Handle(Transfer_Actor)& next) -{ - if (thenext == next) return; - if (thenext.IsNull()) thenext = next; - else if (thenext->IsLast()) { next->SetNext(thenext); thenext = next; } - else thenext->SetNext(next); -} - - Handle(Transfer_Actor) Transfer_Actor::Next () const - { return thenext; } - - void Transfer_Actor::SetLast (const Standard_Boolean mode) - { thelast = mode; } - - - Standard_Boolean Transfer_Actor::IsLast () const - { return thelast; } diff --git a/src/Transfer/Transfer_ActorOfProcessForFinder_0.cxx b/src/Transfer/Transfer_ActorOfProcessForFinder_0.cxx index 74f6e4285d..e9140b1d80 100644 --- a/src/Transfer/Transfer_ActorOfProcessForFinder_0.cxx +++ b/src/Transfer/Transfer_ActorOfProcessForFinder_0.cxx @@ -16,35 +16,114 @@ #include +#include +#include +#include #include - #include -#include +#include #include #include -#include -#include #include -#include +#include #include -#include +#include + +//======================================================================= +// Function: Transfer_ActorOfProcessForFinder +// Purpose : +//======================================================================= +Transfer_ActorOfProcessForFinder::Transfer_ActorOfProcessForFinder() { } + +//======================================================================= +// Function: Recognize +// Purpose : +//======================================================================= +Standard_Boolean Transfer_ActorOfProcessForFinder::Recognize(const Handle(Transfer_Finder)& /*start*/) +{ + return Standard_True; +} + +//======================================================================= +// Function: Transferring +// Purpose : +//======================================================================= +Handle(Transfer_Binder) Transfer_ActorOfProcessForFinder::Transferring +(const Handle(Transfer_Finder)& /*start*/, + const Handle(Transfer_ProcessForFinder)& /*TP*/, + const Message_ProgressRange& /*theProgress*/) +{ + return NullResult(); +} + +//======================================================================= +// Function: TransientResult +// Purpose : +//======================================================================= +Handle(Transfer_SimpleBinderOfTransient) +Transfer_ActorOfProcessForFinder::TransientResult +(const Handle(Standard_Transient)& res) const +{ + Handle(Transfer_SimpleBinderOfTransient) binder; + if (res.IsNull()) return binder; + binder = new Transfer_SimpleBinderOfTransient; + binder->SetResult(res); + return binder; +} + +//======================================================================= +// Function: NullResult +// Purpose : +//======================================================================= +Handle(Transfer_Binder) Transfer_ActorOfProcessForFinder::NullResult() const +{ + Handle(Transfer_Binder) binder; + return binder; +} + +//======================================================================= +// Function: SetNext +// Purpose : +//======================================================================= +void Transfer_ActorOfProcessForFinder::SetNext +(const Handle(Transfer_ActorOfProcessForFinder)& next) +{ + if (thenext == next) + return; + if (thenext.IsNull()) + thenext = next; + else if (thenext->IsLast()) + { + next->SetNext(thenext); + thenext = next; + } + else + thenext->SetNext(next); +} + +//======================================================================= +// Function: Next +// Purpose : +//======================================================================= +Handle(Transfer_ActorOfProcessForFinder) Transfer_ActorOfProcessForFinder::Next() const +{ + return thenext; +} -#define TheStart Handle(Transfer_Finder) -#define TheStart_hxx -#define TheMapHasher Transfer_FindHasher -#define TheMapHasher_hxx -#define Handle_TheList Handle(Transfer_HSequenceOfFinder) -#define TheList Transfer_HSequenceOfFinder -#define TheList_hxx -#define Transfer_TransferMap Transfer_TransferMapOfProcessForFinder -#define Transfer_TransferMap_hxx -#define Transfer_Iterator Transfer_IteratorOfProcessForFinder -#define Transfer_Iterator_hxx -#define Transfer_Actor Transfer_ActorOfProcessForFinder -#define Transfer_Actor_hxx -#define Handle_Transfer_Actor Handle(Transfer_ActorOfProcessForFinder) -#define Transfer_TransferProcess Transfer_ProcessForFinder -#define Transfer_TransferProcess_hxx -#define Handle_Transfer_TransferProcess Handle(Transfer_ProcessForFinder) -#include +//======================================================================= +// Function: SetLast +// Purpose : +//======================================================================= +void Transfer_ActorOfProcessForFinder::SetLast(const Standard_Boolean mode) +{ + thelast = mode; +} +//======================================================================= +// Function: IsLast +// Purpose : +//======================================================================= +Standard_Boolean Transfer_ActorOfProcessForFinder::IsLast() const +{ + return thelast; +} diff --git a/src/Transfer/Transfer_ActorOfProcessForTransient_0.cxx b/src/Transfer/Transfer_ActorOfProcessForTransient_0.cxx index d69b1f1bfa..5c476b7a05 100644 --- a/src/Transfer/Transfer_ActorOfProcessForTransient_0.cxx +++ b/src/Transfer/Transfer_ActorOfProcessForTransient_0.cxx @@ -16,33 +16,117 @@ #include -#include - -#include #include #include -#include -#include -#include +#include +#include #include +#include +#include #include +#include + +//======================================================================= +// Function: Transfer_ActorOfProcessForTransient +// Purpose : +//======================================================================= +Transfer_ActorOfProcessForTransient::Transfer_ActorOfProcessForTransient() +{} + + +//======================================================================= +// Function: Recognize +// Purpose : +//======================================================================= +Standard_Boolean Transfer_ActorOfProcessForTransient::Recognize(const Handle(Standard_Transient)& /*start*/) +{ + return Standard_True; +} + +//======================================================================= +// Function: Transferring +// Purpose : +//======================================================================= +Handle(Transfer_Binder) Transfer_ActorOfProcessForTransient::Transferring +(const Handle(Standard_Transient)& /*start*/, + const Handle(Transfer_ProcessForTransient)& /*TP*/, + const Message_ProgressRange& /*theProgress*/) +{ + return NullResult(); +} + +//======================================================================= +// Function: TransientResult +// Purpose : +//======================================================================= +Handle(Transfer_SimpleBinderOfTransient) +Transfer_ActorOfProcessForTransient::TransientResult +(const Handle(Standard_Transient)& res) const +{ + Handle(Transfer_SimpleBinderOfTransient) binder; + if (res.IsNull()) return binder; + binder = new Transfer_SimpleBinderOfTransient; + binder->SetResult(res); + return binder; +} + +//======================================================================= +// Function: NullResult +// Purpose : +//======================================================================= +Handle(Transfer_Binder) Transfer_ActorOfProcessForTransient::NullResult() const +{ + Handle(Transfer_Binder) binder; + return binder; +} + +//======================================================================= +// Function: SetNext +// Purpose : +//======================================================================= +void Transfer_ActorOfProcessForTransient::SetNext +(const Handle(Transfer_ActorOfProcessForTransient)& next) +{ + if (thenext == next) + return; + if (thenext.IsNull()) + thenext = next; + else if (thenext->IsLast()) + { + next->SetNext(thenext); + thenext = next; + } + else + thenext->SetNext(next); +} + + +//======================================================================= +// Function: Next +// Purpose : +//======================================================================= +Handle(Transfer_ActorOfProcessForTransient) Transfer_ActorOfProcessForTransient::Next() const +{ + return thenext; +} + + +//======================================================================= +// Function: SetLast +// Purpose : +//======================================================================= +void Transfer_ActorOfProcessForTransient::SetLast(const Standard_Boolean mode) +{ + thelast = mode; +} + -#define TheStart Handle(Standard_Transient) -#define TheStart_hxx -#define TheMapHasher TColStd_MapTransientHasher -#define TheMapHasher_hxx -#define Handle_TheList Handle(TColStd_HSequenceOfTransient) -#define TheList TColStd_HSequenceOfTransient -#define TheList_hxx -#define Transfer_TransferMap Transfer_TransferMapOfProcessForTransient -#define Transfer_TransferMap_hxx -#define Transfer_Iterator Transfer_IteratorOfProcessForTransient -#define Transfer_Iterator_hxx -#define Transfer_Actor Transfer_ActorOfProcessForTransient -#define Transfer_Actor_hxx -#define Handle_Transfer_Actor Handle(Transfer_ActorOfProcessForTransient) -#define Transfer_TransferProcess Transfer_ProcessForTransient -#define Transfer_TransferProcess_hxx -#define Handle_Transfer_TransferProcess Handle(Transfer_ProcessForTransient) -#include +//======================================================================= +// Function: IsLast +// Purpose : +//======================================================================= +Standard_Boolean Transfer_ActorOfProcessForTransient::IsLast() const +{ + return thelast; +} diff --git a/src/Transfer/Transfer_FindHasher.cxx b/src/Transfer/Transfer_FindHasher.cxx deleted file mode 100644 index 1bcf614d3c..0000000000 --- a/src/Transfer/Transfer_FindHasher.cxx +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) 1999-2014 OPEN CASCADE SAS -// -// This file is part of Open CASCADE Technology software library. -// -// This library is free software; you can redistribute it and/or modify it under -// the terms of the GNU Lesser General Public License version 2.1 as published -// by the Free Software Foundation, with special exception defined in the file -// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT -// distribution for complete text of the license and disclaimer of any warranty. -// -// Alternatively, this file may be used under the terms of Open CASCADE -// commercial license or contractual agreement. - - -#include -#include - - -//============================================================================ -// function : HashCode -// purpose : -//============================================================================ -Standard_Integer Transfer_FindHasher::HashCode (const Handle (Transfer_Finder) & theFinder, - const Standard_Integer theUpperBound) -{ - return ::HashCode (theFinder->GetHashCode() - 1, theUpperBound); -} - - Standard_Boolean Transfer_FindHasher::IsEqual - (const Handle(Transfer_Finder)& K1, const Handle(Transfer_Finder)& K2) -{ - if (K1.IsNull()) return Standard_False; - return K1->Equates(K2); -} diff --git a/src/Transfer/Transfer_FindHasher.hxx b/src/Transfer/Transfer_FindHasher.hxx index f217c3180d..e210c1e9be 100644 --- a/src/Transfer/Transfer_FindHasher.hxx +++ b/src/Transfer/Transfer_FindHasher.hxx @@ -19,59 +19,33 @@ #include #include +#include #include -#include -class Transfer_Finder; - - //! FindHasher defines HashCode for Finder, which is : ask a //! Finder its HashCode ! Because this is the Finder itself which //! brings the HashCode for its Key //! //! This class complies to the template given in TCollection by //! MapHasher itself -class Transfer_FindHasher +class Transfer_FindHasher { public: - - DEFINE_STANDARD_ALLOC - - - //! Returns hash code for the given finder, in the range [1, theUpperBound]. - //! Asks the finder its hash code, then transforms it to be in the required range - //! @param theFinder the finder which hash code is to be computed - //! @param theUpperBound the upper bound of the range a computing hash code must be within - //! @return a computed hash code, in the range [1, theUpperBound] - Standard_EXPORT static Standard_Integer HashCode (const Handle (Transfer_Finder) & theFinder, - Standard_Integer theUpperBound); + size_t operator()(const Handle(Transfer_Finder)& theFinder) const + { + return theFinder->GetHashCode(); + } //! Returns True if two keys are the same. //! The test does not work on the Finders themselves but by //! calling their methods Equates - Standard_EXPORT static Standard_Boolean IsEqual (const Handle(Transfer_Finder)& K1, const Handle(Transfer_Finder)& K2); - - - - -protected: - - - - - -private: - - - - + bool operator() (const Handle(Transfer_Finder)& theK1, + const Handle(Transfer_Finder)& theK2) const + { + if (theK1.IsNull()) return false; + return theK1->Equates(theK2); + } }; - - - - - - #endif // _Transfer_FindHasher_HeaderFile diff --git a/src/Transfer/Transfer_Finder.cxx b/src/Transfer/Transfer_Finder.cxx index 1fba56d936..515da7c968 100644 --- a/src/Transfer/Transfer_Finder.cxx +++ b/src/Transfer/Transfer_Finder.cxx @@ -21,10 +21,10 @@ IMPLEMENT_STANDARD_RTTIEXT(Transfer_Finder,Standard_Transient) -void Transfer_Finder::SetHashCode (const Standard_Integer code) +void Transfer_Finder::SetHashCode (const size_t code) { thecode = code; } - Standard_Integer Transfer_Finder::GetHashCode () const + size_t Transfer_Finder::GetHashCode () const { return thecode; } Handle(Standard_Type) Transfer_Finder::ValueType () const diff --git a/src/Transfer/Transfer_Finder.hxx b/src/Transfer/Transfer_Finder.hxx index 5ced95799e..8fc07fade4 100644 --- a/src/Transfer/Transfer_Finder.hxx +++ b/src/Transfer/Transfer_Finder.hxx @@ -45,7 +45,7 @@ public: //! Returns the HashCode which has been stored by SetHashCode //! (remark that HashCode could be deferred then be defined by //! sub-classes, the result is the same) - Standard_EXPORT Standard_Integer GetHashCode() const; + Standard_EXPORT size_t GetHashCode() const; //! Specific testof equality : to be defined by each sub-class, //! must be False if Finders have not the same true Type, else @@ -151,14 +151,14 @@ protected: //! Stores the HashCode which corresponds to the Value given to //! create the Mapper - Standard_EXPORT void SetHashCode (const Standard_Integer code); + Standard_EXPORT void SetHashCode (const size_t code); private: - Standard_Integer thecode; + size_t thecode; NCollection_DataMap theattrib; diff --git a/src/Transfer/Transfer_Iterator.gxx b/src/Transfer/Transfer_Iterator.gxx deleted file mode 100644 index 04c8d1b1a2..0000000000 --- a/src/Transfer/Transfer_Iterator.gxx +++ /dev/null @@ -1,73 +0,0 @@ -// 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. - -// Transfer_Iterator.gxx -#include - - -// TheStart est suppose Handle(Standard_Transient) ou (Transfer_Finder) -// Il a servi a instancier TheList qui est une HSequence - - -Transfer_Iterator::Transfer_Iterator (const Standard_Boolean withstarts) - : Transfer_TransferIterator () -{ if (withstarts) thestarts = new TheList(); } - - - void Transfer_Iterator::Add - (const Handle(Transfer_Binder)& binder) -{ - if (!thestarts.IsNull()) throw Standard_NoSuchObject("Transfer_Iterator : Add, Starting Object required not provided"); - AddItem(binder); -} - - void Transfer_Iterator::Add - (const Handle(Transfer_Binder)& binder, const TheStart& start) -{ - AddItem(binder); - if (!thestarts.IsNull()) thestarts->Append(start); -} - - void Transfer_Iterator::Filter - (const Handle(TheList)& list, const Standard_Boolean keep) -{ - if (list.IsNull() || thestarts.IsNull()) return; - Standard_Integer i, j, nb = thestarts->Length(); - if (nb == 0) return; - Handle(Transfer_Binder) factice; - Transfer_TransferMap amap (nb); - for (i = 1; i <= nb; i ++) { - j = amap.Add (thestarts->Value(i),factice); - SelectItem (j,!keep); - } - -// Comparaison - nb = list->Length(); - for (i = 1; i <= nb; i ++) { - j = amap.FindIndex (list->Value(i)); - if (j > 0) SelectItem (j,keep); - } -} - - Standard_Boolean Transfer_Iterator::HasStarting () const - { return (!thestarts.IsNull()); } - - const TheStart& Transfer_Iterator::Starting () const -{ -// if (thecurr == 0 || thecurr > themaxi) throw Standard_NoSuchObject -// ("TransferIterator : Starting"); -// if (theselect->Value(thecurr) == 0) throw Standard_NoSuchObject -// ("TransferIterator : Starting"); - if (thestarts.IsNull()) throw Standard_NoSuchObject("TransferIterator : No Starting defined at all"); - return thestarts->Value(thecurr); -} diff --git a/src/Transfer/Transfer_IteratorOfProcessForFinder_0.cxx b/src/Transfer/Transfer_IteratorOfProcessForFinder_0.cxx index a985812876..24abf1ffcc 100644 --- a/src/Transfer/Transfer_IteratorOfProcessForFinder_0.cxx +++ b/src/Transfer/Transfer_IteratorOfProcessForFinder_0.cxx @@ -23,24 +23,80 @@ #include #include #include - - -#define TheStart Handle(Transfer_Finder) -#define TheStart_hxx -#define TheMapHasher Transfer_FindHasher -#define TheMapHasher_hxx -#define Handle_TheList Handle(Transfer_HSequenceOfFinder) -#define TheList Transfer_HSequenceOfFinder -#define TheList_hxx -#define Transfer_TransferMap Transfer_TransferMapOfProcessForFinder -#define Transfer_TransferMap_hxx -#define Transfer_Iterator Transfer_IteratorOfProcessForFinder -#define Transfer_Iterator_hxx -#define Transfer_Actor Transfer_ActorOfProcessForFinder -#define Transfer_Actor_hxx -#define Handle_Transfer_Actor Handle(Transfer_ActorOfProcessForFinder) -#define Transfer_TransferProcess Transfer_ProcessForFinder -#define Transfer_TransferProcess_hxx -#define Handle_Transfer_TransferProcess Handle(Transfer_ProcessForFinder) -#include + +//======================================================================= +// Function: Transfer_IteratorOfProcessForFinder +// Purpose : +//======================================================================= +Transfer_IteratorOfProcessForFinder::Transfer_IteratorOfProcessForFinder(const Standard_Boolean withstarts) + : Transfer_TransferIterator() +{ + if (withstarts) thestarts = new Transfer_HSequenceOfFinder(); +} + +//======================================================================= +// Function: Add +// Purpose : +//======================================================================= +void Transfer_IteratorOfProcessForFinder::Add +(const Handle(Transfer_Binder)& binder) +{ + if (!thestarts.IsNull()) throw Standard_NoSuchObject("Transfer_IteratorOfProcessForFinder : Add, Starting Object required not provided"); + AddItem(binder); +} + +//======================================================================= +// Function: Add +// Purpose : +//======================================================================= +void Transfer_IteratorOfProcessForFinder::Add +(const Handle(Transfer_Binder)& binder, const Handle(Transfer_Finder)& start) +{ + AddItem(binder); + if (!thestarts.IsNull()) thestarts->Append(start); +} + +//======================================================================= +// Function: Filter +// Purpose : +//======================================================================= +void Transfer_IteratorOfProcessForFinder::Filter +(const Handle(Transfer_HSequenceOfFinder)& list, const Standard_Boolean keep) +{ + if (list.IsNull() || thestarts.IsNull()) return; + Standard_Integer i, j, nb = thestarts->Length(); + if (nb == 0) return; + Handle(Transfer_Binder) factice; + Transfer_TransferMapOfProcessForFinder amap(nb); + for (i = 1; i <= nb; i++) { + j = amap.Add(thestarts->Value(i), factice); + SelectItem(j, !keep); + } + + // Comparison + nb = list->Length(); + for (i = 1; i <= nb; i++) { + j = amap.FindIndex(list->Value(i)); + if (j > 0) SelectItem(j, keep); + } +} + +//======================================================================= +// Function: HasStarting +// Purpose : +//======================================================================= +Standard_Boolean Transfer_IteratorOfProcessForFinder::HasStarting() const +{ + return (!thestarts.IsNull()); +} + +//======================================================================= +// Function: Starting +// Purpose : +//======================================================================= +const Handle(Transfer_Finder)& Transfer_IteratorOfProcessForFinder::Starting() const +{ + if (thestarts.IsNull()) throw Standard_NoSuchObject("TransferIterator : No Starting defined at all"); + return thestarts->Value(thecurr); +} diff --git a/src/Transfer/Transfer_IteratorOfProcessForTransient_0.cxx b/src/Transfer/Transfer_IteratorOfProcessForTransient_0.cxx index 49332227d9..67c4a5d25d 100644 --- a/src/Transfer/Transfer_IteratorOfProcessForTransient_0.cxx +++ b/src/Transfer/Transfer_IteratorOfProcessForTransient_0.cxx @@ -22,24 +22,81 @@ #include #include #include - - -#define TheStart Handle(Standard_Transient) -#define TheStart_hxx -#define TheMapHasher TColStd_MapTransientHasher -#define TheMapHasher_hxx -#define Handle_TheList Handle(TColStd_HSequenceOfTransient) -#define TheList TColStd_HSequenceOfTransient -#define TheList_hxx -#define Transfer_TransferMap Transfer_TransferMapOfProcessForTransient -#define Transfer_TransferMap_hxx -#define Transfer_Iterator Transfer_IteratorOfProcessForTransient -#define Transfer_Iterator_hxx -#define Transfer_Actor Transfer_ActorOfProcessForTransient -#define Transfer_Actor_hxx -#define Handle_Transfer_Actor Handle(Transfer_ActorOfProcessForTransient) -#define Transfer_TransferProcess Transfer_ProcessForTransient -#define Transfer_TransferProcess_hxx -#define Handle_Transfer_TransferProcess Handle(Transfer_ProcessForTransient) -#include +//======================================================================= +//function : Transfer_IteratorOfProcessForTransient +//purpose : +//======================================================================= +Transfer_IteratorOfProcessForTransient::Transfer_IteratorOfProcessForTransient(const Standard_Boolean withstarts) + : Transfer_TransferIterator() +{ + if (withstarts) thestarts = new TColStd_HSequenceOfTransient(); +} + +//======================================================================= +//function : Add +//purpose : +//======================================================================= +void Transfer_IteratorOfProcessForTransient::Add +(const Handle(Transfer_Binder)& binder) +{ + if (!thestarts.IsNull()) throw Standard_NoSuchObject("Transfer_IteratorOfProcessForTransient : Add, Starting Object required not provided"); + AddItem(binder); +} + +//======================================================================= +//function : Add +//purpose : +//======================================================================= +void Transfer_IteratorOfProcessForTransient::Add +(const Handle(Transfer_Binder)& binder, const Handle(Standard_Transient)& start) +{ + AddItem(binder); + if (!thestarts.IsNull()) thestarts->Append(start); +} + +//======================================================================= +//function : Filter +//purpose : +//======================================================================= +void Transfer_IteratorOfProcessForTransient::Filter +(const Handle(TColStd_HSequenceOfTransient)& list, const Standard_Boolean keep) +{ + if (list.IsNull() || thestarts.IsNull()) return; + Standard_Integer i, j, nb = thestarts->Length(); + if (nb == 0) return; + Handle(Transfer_Binder) factice; + Transfer_TransferMapOfProcessForTransient amap(nb); + for (i = 1; i <= nb; i++) + { + j = amap.Add(thestarts->Value(i), factice); + SelectItem(j, !keep); + } + + // Comparison + nb = list->Length(); + for (i = 1; i <= nb; i++) + { + j = amap.FindIndex(list->Value(i)); + if (j > 0) SelectItem(j, keep); + } +} + +//======================================================================= +//function : HasStarting +//purpose : +//======================================================================= +Standard_Boolean Transfer_IteratorOfProcessForTransient::HasStarting() const +{ + return (!thestarts.IsNull()); +} + +//======================================================================= +//function : Starting +//purpose : +//======================================================================= +const Handle(Standard_Transient)& Transfer_IteratorOfProcessForTransient::Starting() const +{ + if (thestarts.IsNull()) throw Standard_NoSuchObject("TransferIterator : No Starting defined at all"); + return thestarts->Value(thecurr); +} diff --git a/src/Transfer/Transfer_Mapper.gxx b/src/Transfer/Transfer_Mapper.gxx deleted file mode 100644 index f446f0eeb3..0000000000 --- a/src/Transfer/Transfer_Mapper.gxx +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (c) 1999-2014 OPEN CASCADE SAS -// -// This file is part of Open CASCADE Technology software library. -// -// This library is free software; you can redistribute it and/or modify it under -// the terms of the GNU Lesser General Public License version 2.1 as published -// by the Free Software Foundation, with special exception defined in the file -// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT -// distribution for complete text of the license and disclaimer of any warranty. -// -// Alternatively, this file may be used under the terms of Open CASCADE -// commercial license or contractual agreement. - -//#include -#include - - -Transfer_Mapper::Transfer_Mapper (const TheKey& akey) - : theval (akey) -{ SetHashCode ( TheHasher::HashCode (akey, IntegerLast() ) ); } - - - const TheKey& Transfer_Mapper::Value () const - { return theval; } - - Standard_Boolean Transfer_Mapper::Equates - (const Handle(Transfer_Finder)& other) const -{ - if (other.IsNull()) return Standard_False; - if (GetHashCode() != other->GetHashCode()) return Standard_False; - if (other->DynamicType() != DynamicType()) return Standard_False; - Handle(Transfer_Mapper) another = Handle(Transfer_Mapper)::DownCast(other); -// return (theval == another->Value()); - return TheHasher::IsEqual (theval,another->Value()); -} - - Handle(Standard_Type) Transfer_Mapper::ValueType () const - { return TheInfo::Type(theval); } - - Standard_CString Transfer_Mapper::ValueTypeName () const - { return TheInfo::TypeName(theval); } diff --git a/src/Transfer/Transfer_ProcessForFinder_0.cxx b/src/Transfer/Transfer_ProcessForFinder_0.cxx index 12e7a379c6..0cc4e32e88 100644 --- a/src/Transfer/Transfer_ProcessForFinder_0.cxx +++ b/src/Transfer/Transfer_ProcessForFinder_0.cxx @@ -16,38 +16,1245 @@ #include -#include - +#include +#include +#include +#include #include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include -#include -#include +#include +#include #include -#include #include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include + +//======================================================================= +//function : Transfer_ProcessForFinder +//purpose : +//======================================================================= +Transfer_ProcessForFinder::Transfer_ProcessForFinder(const Standard_Integer nb) + : themap(nb) +{ + theerrh = Standard_True; + therootm = Standard_False; + thelevel = 0; therootl = 0; + themessenger = Message::DefaultMessenger(); + thetrace = 0; + theindex = 0; +} + +//======================================================================= +//function : Transfer_ProcessForFinder +//purpose : +//======================================================================= +Transfer_ProcessForFinder::Transfer_ProcessForFinder(const Handle(Message_Messenger)& messenger, + const Standard_Integer nb) + : themap(nb) +{ + theerrh = Standard_True; + therootm = Standard_False; + thelevel = 0; therootl = 0; + SetMessenger(messenger); + thetrace = 1; + theindex = 0; +} + +//======================================================================= +//function : Clear +//purpose : +//======================================================================= +void Transfer_ProcessForFinder::Clear() +{ + thelevel = 0; therootl = 0; + theroots.Clear(); + themap.Clear(); + theindex = 0; thelastobj.Nullify(); thelastbnd.Nullify(); +} + +//======================================================================= +//function : Clean +//purpose : +//======================================================================= +void Transfer_ProcessForFinder::Clean() +{ + Standard_Integer i, nb = NbMapped(); + Standard_Integer j, unb = 0; + for (i = 1; i <= nb; i++) + { + if (themap(i).IsNull()) unb++; + } + if (unb == 0) return; + + // Redo the map -> offsets + TColStd_Array1OfInteger unbs(1, nb); unbs.Init(0); + Transfer_TransferMapOfProcessForFinder newmap(nb * 2); + for (i = 1; i <= nb; i++) + { + Handle(Transfer_Finder) ent = Mapped(i); + Handle(Transfer_Binder) bnd = MapItem(i); + if (bnd.IsNull()) continue; + j = newmap.Add(ent, bnd); + unbs.SetValue(i, j); + } + themap.Assign(newmap); + + // Update Root List + TColStd_IndexedMapOfInteger aNewRoots; + for (i = 1; i <= theroots.Extent(); i++) + { + j = theroots.FindKey(i); + Standard_Integer k = unbs.Value(j); + if (k) aNewRoots.Add(k); + } + theroots.Clear(); + theroots = aNewRoots; + + // The rest: cleaning + thelastobj.Nullify(); + thelastbnd.Nullify(); + theindex = 0; +} + +//======================================================================= +//function : Resize +//purpose : +//======================================================================= +void Transfer_ProcessForFinder::Resize(const Standard_Integer nb) +{ + if (nb > themap.NbBuckets()) themap.ReSize(nb); +} + +//======================================================================= +//function : SetActor +//purpose : +//======================================================================= +void Transfer_ProcessForFinder::SetActor(const Handle(Transfer_ActorOfProcessForFinder)& actor) +{ + if (theactor == actor) return; + if (theactor.IsNull()) theactor = actor; + else if (actor.IsNull()) theactor = actor; + else if (theactor->IsLast()) { actor->SetNext(theactor); theactor = actor; } + else theactor->SetNext(actor); +} + +//======================================================================= +//function : Actor +//purpose : +//======================================================================= +Handle(Transfer_ActorOfProcessForFinder) Transfer_ProcessForFinder::Actor() const +{ + return theactor; +} + +//======================================================================= +//function : Find +//purpose : +//======================================================================= +Handle(Transfer_Binder) Transfer_ProcessForFinder::Find(const Handle(Transfer_Finder)& start) const +{ + if (thelastobj == start) + { + if (theindex > 0) return thelastbnd; + } + Standard_Integer index = themap.FindIndex(start); + if (index > 0) + { + const Handle(Transfer_Binder)& binder = themap.FindFromIndex(index); + return binder; + } + return Handle(Transfer_Binder)(); +} + +//======================================================================= +//function : IsBound +//purpose : +//======================================================================= +Standard_Boolean Transfer_ProcessForFinder::IsBound(const Handle(Transfer_Finder)& start) const +{ + Handle(Transfer_Binder) binder = Find(start); + if (binder.IsNull()) return Standard_False; + return binder->HasResult(); +} + +//======================================================================= +//function : IsAlreadyUsed +//purpose : +//======================================================================= +Standard_Boolean Transfer_ProcessForFinder::IsAlreadyUsed(const Handle(Transfer_Finder)& start) const +{ + Handle(Transfer_Binder) binder = Find(start); + if (binder.IsNull()) + { + StartTrace(binder, start, thelevel, 4); + throw Transfer_TransferFailure("TransferProcess : IsAlreadyUsed, transfer not done cannot be used..."); + } + return (binder->Status() == Transfer_StatusUsed); +} + +//======================================================================= +//function : FindAndMask +//purpose : +//======================================================================= +Handle(Transfer_Binder) Transfer_ProcessForFinder::FindAndMask(const Handle(Transfer_Finder)& start) +{ + if (thelastobj == start) + { + if (theindex > 0) return thelastbnd; + } + thelastobj = start; + theindex = themap.FindIndex(start); + if (theindex > 0) thelastbnd = themap.FindFromIndex(theindex); + else thelastbnd.Nullify(); + return thelastbnd; +} + +//======================================================================= +//function : Bind +//purpose : +//======================================================================= +void Transfer_ProcessForFinder::Bind(const Handle(Transfer_Finder)& start, + const Handle(Transfer_Binder)& binder) +{ + if (binder.IsNull()) return; + Handle(Transfer_Binder) former = FindAndMask(start); + if (!former.IsNull()) + { + // We admit VoidBinder: then we resume our Check + if (former->DynamicType() == STANDARD_TYPE(Transfer_VoidBinder)) + { + binder->Merge(former); + themap(theindex) = binder; + } + else if (former->Status() == Transfer_StatusUsed) + { + StartTrace(former, start, thelevel, 4); + throw Transfer_TransferFailure("TransferProcess : Bind, already Bound"); + } + else + { + if (thetrace > 2) StartTrace(former, start, thelevel, 5); + binder->CCheck()->GetMessages(former->Check()); + } + } + if (theindex == 0 || thelastbnd.IsNull()) + { + if (theindex == 0) theindex = themap.Add(start, binder); + else themap(theindex) = binder; + thelastbnd = binder; + } + else + { + thelastbnd = binder; + themap(theindex) = binder; + } +} + +//======================================================================= +//function : Rebind +//purpose : +//======================================================================= +void Transfer_ProcessForFinder::Rebind(const Handle(Transfer_Finder)& start, + const Handle(Transfer_Binder)& binder) +{ + Bind(start, binder); +} + +//======================================================================= +//function : Unbind +//purpose : +//======================================================================= +Standard_Boolean Transfer_ProcessForFinder::Unbind(const Handle(Transfer_Finder)& start) +{ + Handle(Transfer_Binder) former = FindAndMask(start); + if (theindex == 0) return Standard_False; + if (former.IsNull()) return Standard_False; + if (former->DynamicType() == STANDARD_TYPE(Transfer_VoidBinder)) return Standard_True; + themap(theindex) = thelastbnd; + if (theroots.Contains(theindex)) + { + TColStd_IndexedMapOfInteger aNewRoots; + for (Standard_Integer i = 1; i <= theroots.Extent(); i++) + if (theindex != theroots.FindKey(i)) + aNewRoots.Add(theroots.FindKey(i)); + + theroots.Clear(); + theroots = aNewRoots; + } + + thelastobj.Nullify(); + thelastbnd.Nullify(); + theindex = 0; + return Standard_True; +} + +//======================================================================= +//function : FindElseBind +//purpose : +//======================================================================= +Handle(Transfer_Binder) Transfer_ProcessForFinder::FindElseBind(const Handle(Transfer_Finder)& start) +{ + Handle(Transfer_Binder) binder = FindAndMask(start); + if (!binder.IsNull()) return binder; + binder = new Transfer_VoidBinder; + Bind(start, binder); + return binder; +} + +//======================================================================= +//function : SetMessenger +//purpose : +//======================================================================= +void Transfer_ProcessForFinder::SetMessenger(const Handle(Message_Messenger)& messenger) +{ + if (messenger.IsNull()) + themessenger = Message::DefaultMessenger(); + else + themessenger = messenger; +} + +//======================================================================= +//function : Messenger +//purpose : +//======================================================================= +Handle(Message_Messenger) Transfer_ProcessForFinder::Messenger() const +{ + return themessenger; +} + +//======================================================================= +//function : SetTraceLevel +//purpose : +//======================================================================= +void Transfer_ProcessForFinder::SetTraceLevel(const Standard_Integer tracelev) +{ + thetrace = tracelev; +} + +//======================================================================= +//function : TraceLevel +//purpose : +//======================================================================= +Standard_Integer Transfer_ProcessForFinder::TraceLevel() const +{ + return thetrace; +} + +//======================================================================= +//function : SendFail +//purpose : +//======================================================================= +void Transfer_ProcessForFinder::SendFail(const Handle(Transfer_Finder)& start, + const Message_Msg& amsg) +{ + AddFail(start, amsg); +} + +//======================================================================= +//function : SendWarning +//purpose : +//======================================================================= +void Transfer_ProcessForFinder::SendWarning(const Handle(Transfer_Finder)& start, + const Message_Msg& amsg) +{ + AddWarning(start, amsg); +} + +//======================================================================= +//function : SendMsg +//purpose : +//======================================================================= +void Transfer_ProcessForFinder::SendMsg(const Handle(Transfer_Finder)& start, + const Message_Msg& amsg) +{ + Handle(Transfer_Binder) binder = FindAndMask(start); + if (binder.IsNull()) + { + binder = new Transfer_VoidBinder; + Bind(start, binder); + } + // Feeds the trace: Causing rule (user messages) + if (thetrace > 0) + { + StartTrace(binder, start, thelevel, 6); + Message_Messenger::StreamBuffer aSender = themessenger->SendInfo(); + aSender << amsg.Value(); + if (amsg.IsEdited() && thetrace > 2) + aSender << " [from: " << amsg.Original() << "]"; + aSender << std::endl; + } +} + +//======================================================================= +//function : AddFail +//purpose : +//======================================================================= +void Transfer_ProcessForFinder::AddFail(const Handle(Transfer_Finder)& start, + const Standard_CString mess, + const Standard_CString orig) +{ + Handle(Transfer_Binder) binder = FindAndMask(start); + if (binder.IsNull()) + { + binder = new Transfer_VoidBinder; + Bind(start, binder); + } + binder->AddFail(mess, orig); + if (thetrace > 0) + { + StartTrace(binder, start, thelevel, 1); + Message_Messenger::StreamBuffer aSender = themessenger->SendFail(); + aSender << " --> Fail : " << mess; + if (orig[0] != '\0' && thetrace > 2) aSender << " [from: " << orig << "]"; + aSender << std::endl; + } +} + +//======================================================================= +//function : AddError +//purpose : +//======================================================================= +void Transfer_ProcessForFinder::AddError(const Handle(Transfer_Finder)& start, + const Standard_CString mess, + const Standard_CString orig) +{ + AddFail(start, mess, orig); +} + +//======================================================================= +//function : AddFail +//purpose : +//======================================================================= +void Transfer_ProcessForFinder::AddFail(const Handle(Transfer_Finder)& start, + const Message_Msg& amsg) +{ + if (amsg.IsEdited()) AddFail(start, TCollection_AsciiString(amsg.Value()).ToCString(), + TCollection_AsciiString(amsg.Original()).ToCString()); + else AddFail(start, TCollection_AsciiString(amsg.Value()).ToCString()); +} + +//======================================================================= +//function : AddWarning +//purpose : +//======================================================================= +void Transfer_ProcessForFinder::AddWarning(const Handle(Transfer_Finder)& start, + const Standard_CString mess, + const Standard_CString orig) +{ + Handle(Transfer_Binder) binder = FindAndMask(start); + if (binder.IsNull()) + { + binder = new Transfer_VoidBinder; + Bind(start, binder); + } + binder->AddWarning(mess, orig); + if (thetrace > 1) + { + StartTrace(binder, start, thelevel, 2); + Message_Messenger::StreamBuffer aSender = themessenger->SendWarning(); + aSender << " --> Warning : " << mess; + if (orig[0] != '\0' && thetrace > 2) aSender << " [from: " << orig << "]"; + aSender << std::endl; + } +} + +//======================================================================= +//function : AddWarning +//purpose : +//======================================================================= +void Transfer_ProcessForFinder::AddWarning(const Handle(Transfer_Finder)& start, + const Message_Msg& amsg) +{ + if (amsg.IsEdited()) AddWarning(start, TCollection_AsciiString(amsg.Value()).ToCString(), + TCollection_AsciiString(amsg.Original()).ToCString()); + else AddWarning(start, TCollection_AsciiString(amsg.Value()).ToCString()); +} + +//======================================================================= +//function : Mend +//purpose : +//======================================================================= +void Transfer_ProcessForFinder::Mend(const Handle(Transfer_Finder)& start, + const Standard_CString pref) +{ + Handle(Transfer_Binder) binder = FindAndMask(start); + if (binder.IsNull()) return; // rien a faire ... + Handle(Interface_Check) ach = binder->CCheck(); + ach->Mend(pref); +} + +//======================================================================= +//function : Check +//purpose : +//======================================================================= +Handle(Interface_Check) Transfer_ProcessForFinder::Check(const Handle(Transfer_Finder)& start) const +{ + const Handle(Transfer_Binder)& binder = Find(start); + if (binder.IsNull()) + { + Handle(Interface_Check) check; + return check; + } + return binder->Check(); +} + +//======================================================================= +//function : BindTransient +//purpose : +//======================================================================= +void Transfer_ProcessForFinder::BindTransient(const Handle(Transfer_Finder)& start, + const Handle(Standard_Transient)& res) +{ + if (res.IsNull()) return; + Handle(Transfer_Binder) former = Find(start); + Handle(Transfer_SimpleBinderOfTransient) binder = + Handle(Transfer_SimpleBinderOfTransient)::DownCast(former); + // Binding sur place ? + if (!binder.IsNull()) + { + if (binder->Status() == Transfer_StatusVoid) { binder->SetResult(res); return; } + } + // Otherwise, redo + binder = new Transfer_SimpleBinderOfTransient; + binder->SetResult(res); + if (former.IsNull()) Bind(start, binder); + else Rebind(start, binder); +} + +//======================================================================= +//function : FindTransient +//purpose : +//======================================================================= +const Handle(Standard_Transient)& Transfer_ProcessForFinder::FindTransient +(const Handle(Transfer_Finder)& start) const +{ + static const Handle(Standard_Transient) aDummy; + Handle(Transfer_SimpleBinderOfTransient) binder = + Handle(Transfer_SimpleBinderOfTransient)::DownCast(Find(start)); + if (binder.IsNull()) return aDummy; + if (!binder->HasResult()) return aDummy; + return binder->Result(); +} + +//======================================================================= +//function : BindMultiple +//purpose : +//======================================================================= +void Transfer_ProcessForFinder::BindMultiple(const Handle(Transfer_Finder)& start) +{ + Handle(Transfer_Binder) binder = FindAndMask(start); + if (!binder.IsNull()) + { + if (!binder->IsKind(STANDARD_TYPE(Transfer_MultipleBinder))) + { + StartTrace(thelastbnd, start, thelevel, 4); + throw Transfer_TransferFailure("TransferProcess : BindMultiple"); + } + } + else Bind(start, new Transfer_MultipleBinder); +} + +//======================================================================= +//function : AddMultiple +//purpose : +//======================================================================= +void Transfer_ProcessForFinder::AddMultiple(const Handle(Transfer_Finder)& start, + const Handle(Standard_Transient)& res) +{ + Handle(Transfer_Binder) binder = FindAndMask(start); + Handle(Transfer_MultipleBinder) multr = + Handle(Transfer_MultipleBinder)::DownCast(binder); + if (multr.IsNull()) + { + StartTrace(binder, start, thelevel, 4); + if (binder.IsNull()) throw Transfer_TransferFailure("TransferProcess : AddMultiple, nothing bound"); + else throw Transfer_TransferFailure("TransferProcess : AddMultiple, Binder not a MultipleBinder"); + } + multr->AddResult(res); +} + +//======================================================================= +//function : FindTypedTransient +//purpose : +//======================================================================= +Standard_Boolean Transfer_ProcessForFinder::FindTypedTransient +(const Handle(Transfer_Finder)& start, const Handle(Standard_Type)& atype, + Handle(Standard_Transient)& val) const +{ + return GetTypedTransient(Find(start), atype, val); +} + +//======================================================================= +//function : GetTypedTransient +//purpose : +//======================================================================= +Standard_Boolean Transfer_ProcessForFinder::GetTypedTransient +(const Handle(Transfer_Binder)& binder, const Handle(Standard_Type)& atype, + Handle(Standard_Transient)& val) const +{ + return Transfer_SimpleBinderOfTransient::GetTypedResult(binder, atype, val); +} + +//======================================================================= +//function : NbMapped +//purpose : +//======================================================================= +Standard_Integer Transfer_ProcessForFinder::NbMapped() const +{ + return themap.Extent(); +} + +//======================================================================= +//function : Mapped +//purpose : +//======================================================================= +const Handle(Transfer_Finder)& Transfer_ProcessForFinder::Mapped(const Standard_Integer num) const +{ + return themap.FindKey(num); +} + +//======================================================================= +//function : MapIndex +//purpose : +//======================================================================= +Standard_Integer Transfer_ProcessForFinder::MapIndex(const Handle(Transfer_Finder)& start) const +{ + return themap.FindIndex(start); +} + +//======================================================================= +//function : MapItem +//purpose : +//======================================================================= +Handle(Transfer_Binder) Transfer_ProcessForFinder::MapItem(const Standard_Integer num) const +{ + Handle(Transfer_Binder) binder = themap.FindFromIndex(num); + return binder; +} + +//======================================================================= +//function : SetRoot +//purpose : +//======================================================================= +void Transfer_ProcessForFinder::SetRoot(const Handle(Transfer_Finder)& start) +{ + Standard_Integer index = MapIndex(start); + if (index == 0) + { + return; + } + theroots.Add(index); + if (thetrace > 2) StartTrace(MapItem(index), start, thelevel, 3); +} + +//======================================================================= +//function : SetRootManagement +//purpose : +//======================================================================= +void Transfer_ProcessForFinder::SetRootManagement(const Standard_Boolean stat) +{ + therootm = stat; +} + +//======================================================================= +//function : NbRoots +//purpose : +//======================================================================= +Standard_Integer Transfer_ProcessForFinder::NbRoots() const +{ + return theroots.Extent(); +} + +//======================================================================= +//function : Root +//purpose : +//======================================================================= +const Handle(Transfer_Finder)& Transfer_ProcessForFinder::Root(const Standard_Integer num) const +{ + Standard_Integer ind = 0; + if (num > 0 && num <= theroots.Extent()) ind = theroots.FindKey(num); + return themap.FindKey(ind); +} + +//======================================================================= +//function : RootItem +//purpose : +//======================================================================= +Handle(Transfer_Binder) Transfer_ProcessForFinder::RootItem(const Standard_Integer num) const +{ + Standard_Integer ind = 0; + if (num > 0 && num <= theroots.Extent()) ind = theroots.FindKey(num); + return themap.FindFromIndex(ind); +} + +//======================================================================= +//function : RootIndex +//purpose : +//======================================================================= +Standard_Integer Transfer_ProcessForFinder::RootIndex(const Handle(Transfer_Finder)& start) const +{ + Standard_Integer index = MapIndex(start); + if (index == 0) return 0; + return theroots.FindIndex(index); +} + +//======================================================================= +//function : NestingLevel +//purpose : +//======================================================================= +Standard_Integer Transfer_ProcessForFinder::NestingLevel() const +{ + return thelevel; +} + +//======================================================================= +//function : ResetNestingLevel +//purpose : +//======================================================================= +void Transfer_ProcessForFinder::ResetNestingLevel() +{ + thelevel = 0; +} + +//======================================================================= +//function : Recognize +//purpose : +//======================================================================= +Standard_Boolean Transfer_ProcessForFinder::Recognize(const Handle(Transfer_Finder)& start) const +{ + Handle(Transfer_ActorOfProcessForFinder) actor = theactor; + // We scan the Next until we have a Result + while (!actor.IsNull()) + { + if (actor->Recognize(start)) return Standard_True; + actor = actor->Next(); + } + return Standard_False; +} + +//======================================================================= +//function : Transferring +//purpose : +//======================================================================= +Handle(Transfer_Binder) Transfer_ProcessForFinder::Transferring(const Handle(Transfer_Finder)& start, + const Message_ProgressRange& theProgress) +{ + Handle(Transfer_Binder) former = FindAndMask(start); + // Transfer already done with Result? + + // We consider that this new Transfer request therefore corresponds to a + // additional use: note "AlreadyUsed", therefore non-modifiable result + if (!former.IsNull()) + { + if (former->HasResult()) + { + former->SetAlreadyUsed(); + return former; + } + // Initial State: perhaps already done... or infeasible! + Message_Messenger::StreamBuffer aSender = themessenger->SendInfo(); + Transfer_StatusExec statex = former->StatusExec(); + switch (statex) + { + case Transfer_StatusInitial: + break; + case Transfer_StatusDone: + aSender << " .. and Transfer done" << std::endl; + return former; + case Transfer_StatusRun: + former->SetStatusExec(Transfer_StatusLoop); + return former; + case Transfer_StatusError: + if (thetrace) + { + aSender << " *** Transfer in Error Status :" << std::endl; + StartTrace(former, start, thelevel, 0); + } + else StartTrace(former, start, thelevel, 4); + throw Transfer_TransferFailure("TransferProcess : Transfer in Error Status"); + case Transfer_StatusLoop: + if (thetrace) + { + aSender << " *** Transfer Head of Dead Loop :" << std::endl; + StartTrace(former, start, thelevel, 0); + } + else StartTrace(former, start, thelevel, 4); + throw Transfer_TransferDeadLoop("TransferProcess : Transfer at Head of a Dead Loop"); + } + former->SetStatusExec(Transfer_StatusRun); + } +#ifdef TRANSLOG + std::cout << " GO .." << std::endl; +#endif + + Handle(Transfer_Binder) binder; + Standard_Boolean newbind = Standard_False; + if (theerrh) + { + Message_Messenger::StreamBuffer aSender = themessenger->SendInfo(); + + // Transfer under protection for exceptions (for notification in fact + Standard_Integer oldlev = thelevel; + try + { + OCC_CATCH_SIGNALS + binder = TransferProduct(start, theProgress); + } + + // Exceptions to catch up on: they are not all the same + catch (Transfer_TransferDeadLoop const&) + { + if (binder.IsNull()) + { + aSender << " *** Dead Loop with no Result" << std::endl; + if (thetrace) StartTrace(binder, start, thelevel - 1, 0); + binder = new Transfer_VoidBinder; + Bind(start, binder); newbind = Standard_True; + } + else if (binder->StatusExec() == Transfer_StatusLoop) + { + if (thetrace) + { + aSender << " *** Dead Loop : Finding head of Loop :" << std::endl; + StartTrace(binder, start, thelevel - 1, 0); + } + else StartTrace(binder, start, thelevel - 1, 4); + throw Transfer_TransferFailure("TransferProcess : Head of Dead Loop"); + // In other words, we change the exception (we exit the loop) + } + else + { + if (thetrace) + { + aSender << " *** Dead Loop : Actor in Loop :" << std::endl; + StartTrace(binder, start, thelevel - 1, 0); + } + } + binder->AddFail("Transfer in dead Loop"); + thelevel = oldlev; + } + catch (Standard_Failure const& anException) + { + if (binder.IsNull()) + { + aSender << " *** Exception Raised with no Result" << std::endl; + binder = new Transfer_VoidBinder; + Bind(start, binder); newbind = Standard_True; + } + binder->AddFail("Transfer stopped by exception raising"); + if (thetrace) + { + aSender << " *** Raised : " << anException.GetMessageString() << std::endl; + StartTrace(binder, start, thelevel - 1, 4); + } + thelevel = oldlev; + } + } + + // Unprotected transfer (thus, dbx by hand in case of crash by Raise) + else binder = TransferProduct(start, theProgress); + + if (theProgress.UserBreak()) + return Handle(Transfer_Binder)(); + + // Conclusion: Note in the Map + + if (!newbind && !binder.IsNull()) + { + if (former.IsNull()) + { + // Maybe did Bind himself... check if not do it + if (!IsBound(start)) Bind(start, binder); + else + { + Rebind(start, binder); + } + } + else Rebind(start, binder); + } + else + { + if (!former.IsNull()) former->SetStatusExec(Transfer_StatusDone); //+ + return Handle(Transfer_Binder)(); + } + + // Manage Roots (if provided) + + if (therootl >= thelevel) + { + therootl = 0; + if (therootm && binder->Status() != Transfer_StatusVoid) + { + SetRoot(start); + } + } + return thelastbnd; +} + + +//======================================================================= +//function : TransferProduct +//purpose : +//======================================================================= +Handle(Transfer_Binder) Transfer_ProcessForFinder::TransferProduct +(const Handle(Transfer_Finder)& start, + const Message_ProgressRange& theProgress) +{ + thelevel++; // if decrements and == 0, root transfer + Handle(Transfer_Binder) binder; + Handle(Transfer_ActorOfProcessForFinder) actor = theactor; + + // We scan the Next until we have a Result + Message_ProgressScope aScope(theProgress, NULL, 1, true); + while (!actor.IsNull()) + { + if (actor->Recognize(start)) binder = actor->Transferring(start, this, aScope.Next()); + else binder.Nullify(); + if (!binder.IsNull()) break; + actor = actor->Next(); + } + if (aScope.UserBreak()) + return Handle(Transfer_Binder)(); + + if (binder.IsNull()) + { + if (thelevel > 0) thelevel--; + return binder; + } + // Root level management (.. take a closer look..) + if (therootl == 0 && binder->StatusExec() == Transfer_StatusDone) + therootl = thelevel - 1; + + if (thelevel > 0) thelevel--; + return binder; +} + +//======================================================================= +//function : Transfer +//purpose : +//======================================================================= +Standard_Boolean Transfer_ProcessForFinder::Transfer(const Handle(Transfer_Finder)& start, + const Message_ProgressRange& theProgress) +{ + Handle(Transfer_Binder) binder = Transferring(start, theProgress); + return (!binder.IsNull()); +} + +//======================================================================= +//function : SetErrorHandle +//purpose : +//======================================================================= +void Transfer_ProcessForFinder::SetErrorHandle(const Standard_Boolean err) +{ + theerrh = err; +} + +//======================================================================= +//function : ErrorHandle +//purpose : +//======================================================================= +Standard_Boolean Transfer_ProcessForFinder::ErrorHandle() const +{ + return theerrh; +} + +//======================================================================= +//function : StartTrace +//purpose : +//======================================================================= +void Transfer_ProcessForFinder::StartTrace(const Handle(Transfer_Binder)& binder, + const Handle(Transfer_Finder)& start, + const Standard_Integer level, + const Standard_Integer mode) const +{ + Message_Messenger::StreamBuffer aSender = themessenger->SendInfo(); + // ### Fail (Roots:50) -- Start start->DynamicType() + // ### Fail (Roots:50) -- Start id:#label.. Type:start->DynamicType() + if (thetrace > 3) + { // Internal to be switch when searching bug (trace >= 4) + if (mode == 1) aSender << " ### Fail"; + if (mode == 2) aSender << " ### Warning"; + if (mode == 3) aSender << " ### New Root n0 " << theroots.Extent(); + if (mode == 4) aSender << " ### Exception"; + if (mode == 5) aSender << " ### Substitution"; + if (mode == 6) aSender << " ### Information"; + if (level > 1) + aSender << " (nested)"; + if (mode >= 0 && mode != 3) + aSender << " at " << theroots.Extent() << " Roots"; + } + if (!start.IsNull()) PrintTrace(start, aSender); + + if (!binder.IsNull()) + { + Handle(Transfer_Binder) bnd = binder; + Standard_Boolean hasres = Standard_False; + while (!bnd.IsNull()) + { + if (bnd->Status() != Transfer_StatusVoid) + { + if (!hasres) + aSender << "\n --- Result Type : "; + else + aSender << " , "; + aSender << bnd->ResultTypeName(); + hasres = Standard_True; + } + bnd = bnd->NextResult(); + } + if (!hasres && mode > 2) + { + aSender << "\n --- No Result recorded"; + } + } + aSender << std::endl; +} + +//======================================================================= +//function : PrintTrace +//purpose : +//======================================================================= +void Transfer_ProcessForFinder::PrintTrace(const Handle(Transfer_Finder)& start, Standard_OStream& S) const +{ + if (!start.IsNull()) S << " Type:" << start->DynamicType()->Name(); +} + +//======================================================================= +//function : IsLooping +//purpose : +//======================================================================= +Standard_Boolean Transfer_ProcessForFinder::IsLooping +(const Standard_Integer alevel) const +{ + return alevel > NbMapped(); +} + +//======================================================================= +//function : RootResult +//purpose : +//======================================================================= +Transfer_IteratorOfProcessForFinder Transfer_ProcessForFinder::RootResult(const Standard_Boolean withstart) const +{ + Transfer_IteratorOfProcessForFinder iter(withstart); + Standard_Integer max = theroots.Extent(); + for (Standard_Integer j = 1; j <= max; j++) + { + Standard_Integer i = theroots.FindKey(j); + Handle(Transfer_Binder) binder = MapItem(i); + if (binder.IsNull()) continue; + if (withstart) iter.Add(binder, Mapped(i)); + else iter.Add(binder); + } + return iter; +} + +//======================================================================= +//function : CompleteResult +//purpose : +//======================================================================= +Transfer_IteratorOfProcessForFinder Transfer_ProcessForFinder::CompleteResult +(const Standard_Boolean withstart) const +{ + Transfer_IteratorOfProcessForFinder iter(withstart); + Standard_Integer max = NbMapped(); + for (Standard_Integer i = 1; i <= max; i++) + { + Handle(Transfer_Binder) binder = MapItem(i); + if (binder.IsNull()) continue; + if (withstart) iter.Add(binder, Mapped(i)); + else iter.Add(binder); + } + return iter; +} + +//======================================================================= +//function : AbnormalResult +//purpose : +//======================================================================= +Transfer_IteratorOfProcessForFinder Transfer_ProcessForFinder::AbnormalResult() const +{ + Transfer_IteratorOfProcessForFinder iter(Standard_True); + Standard_Integer max = NbMapped(); + for (Standard_Integer i = 1; i <= max; i++) + { + Handle(Transfer_Binder) binder = MapItem(i); + if (binder.IsNull()) continue; + Transfer_StatusExec statex = binder->StatusExec(); + if (statex != Transfer_StatusInitial && statex != Transfer_StatusDone) + iter.Add(binder, Mapped(i)); // we note the "not normal" cases + } + return iter; +} + +//======================================================================= +//function : CheckList +//purpose : +//======================================================================= +Interface_CheckIterator Transfer_ProcessForFinder::CheckList +(const Standard_Boolean erronly) const +{ + Interface_CheckIterator list; + Standard_Integer num, max = NbMapped(); + for (Standard_Integer i = 1; i <= max; i++) + { + Handle(Transfer_Binder) binder = MapItem(i); + if (binder.IsNull()) continue; + Transfer_StatusExec statex = binder->StatusExec(); + Handle(Interface_Check) check = binder->Check(); + if (statex != Transfer_StatusInitial && statex != Transfer_StatusDone && + !check->HasFailed()) + check->AddFail("Transfer in Abnormal Status (!= Initial or Done)"); + if (!check->HasFailed() && (erronly || check->NbWarnings() == 0)) continue; + const Handle(Transfer_Finder)& ent = Mapped(i); + num = CheckNum(ent); + if (num == 0) num = i; + check->SetEntity(ent); + list.Add(check, num); + } + return list; +} + +//======================================================================= +//function : ResultOne +//purpose : +//======================================================================= +Transfer_IteratorOfProcessForFinder Transfer_ProcessForFinder::ResultOne(const Handle(Transfer_Finder)& start, + const Standard_Integer level, + const Standard_Boolean withstart) const +{ + Transfer_IteratorOfProcessForFinder iter(withstart); + Standard_Integer max = NbMapped(); + Standard_Integer ind = MapIndex(start); + if (ind == 0) return iter; + Standard_Integer i1 = (level == 0 ? ind : 1); + Standard_Integer i2 = (level == 0 ? ind : max); + Handle(TColStd_HArray1OfInteger) map = new TColStd_HArray1OfInteger(i1, i2, 0); + + for (Standard_Integer i = i1; i <= i2; i++) + { + ind = map->Value(i); + if (ind == 0) continue; + Handle(Transfer_Binder) binder = MapItem(i); + if (binder.IsNull()) continue; + if (withstart) iter.Add(binder, Mapped(ind)); + else iter.Add(binder); + } + return iter; +} + +//======================================================================= +//function : CheckListOne +//purpose : +//======================================================================= +Interface_CheckIterator Transfer_ProcessForFinder::CheckListOne +(const Handle(Transfer_Finder)& start, const Standard_Integer level, + const Standard_Boolean erronly) const +{ + Interface_CheckIterator list; + Standard_Integer max = NbMapped(); + Standard_Integer num, ind = MapIndex(start); + if (ind == 0) return list; + Standard_Integer i1 = (level == 0 ? ind : 1); + Standard_Integer i2 = (level == 0 ? ind : max); + Handle(TColStd_HArray1OfInteger) map = new TColStd_HArray1OfInteger(i1, i2, 0); + + for (Standard_Integer i = i1; i <= i2; i++) + { + ind = map->Value(i); + if (ind == 0) continue; + Handle(Transfer_Binder) binder = MapItem(ind); + if (binder.IsNull()) continue; + Transfer_StatusExec statex = binder->StatusExec(); + Handle(Interface_Check) check = binder->Check(); + if (statex != Transfer_StatusInitial && statex != Transfer_StatusDone && + !check->HasFailed()) + check->AddFail("Transfer in Abnormal Status (!= Initial or Done)"); + if (!check->HasFailed() && (erronly || check->NbWarnings() == 0)) continue; + const Handle(Transfer_Finder)& ent = Mapped(ind); + num = CheckNum(ent); if (num == 0) num = ind; + check->SetEntity(ent); + list.Add(check, num); + } + return list; +} + +//======================================================================= +//function : IsCheckListEmpty +//purpose : +//======================================================================= +Standard_Boolean Transfer_ProcessForFinder::IsCheckListEmpty +(const Handle(Transfer_Finder)& start, const Standard_Integer level, + const Standard_Boolean erronly) const +{ + Standard_Integer max = NbMapped(); + Standard_Integer ind = MapIndex(start); + if (ind == 0) return Standard_False; + Standard_Integer i1 = (level == 0 ? ind : 1); + Standard_Integer i2 = (level == 0 ? ind : max); + Handle(TColStd_HArray1OfInteger) map = new TColStd_HArray1OfInteger(i1, i2, 0); + + for (Standard_Integer i = i1; i <= i2; i++) + { + ind = map->Value(i); + if (ind == 0) continue; + Handle(Transfer_Binder) binder = MapItem(ind); + if (binder.IsNull()) continue; + + Transfer_StatusExec statex = binder->StatusExec(); + Handle(Interface_Check) check = binder->Check(); + if (statex != Transfer_StatusInitial && statex != Transfer_StatusDone) + return Standard_False; + if (check->HasFailed() || (!erronly && check->NbWarnings() > 0)) return Standard_False; + } + return Standard_True; +} + +//======================================================================= +//function : RemoveResult +//purpose : +//======================================================================= +void Transfer_ProcessForFinder::RemoveResult(const Handle(Transfer_Finder)& start, + const Standard_Integer level, + const Standard_Boolean /*compute*/) +{ + Standard_Integer max = NbMapped(); + Standard_Integer ind = MapIndex(start); + if (ind == 0) return; + Standard_Integer i1 = (level == 0 ? ind : 1); + Standard_Integer i2 = (level == 0 ? ind : max); + Handle(TColStd_HArray1OfInteger) map = new TColStd_HArray1OfInteger(i1, i2, 0); -#define TheStart Handle(Transfer_Finder) -#define TheStart_hxx -#define TheMapHasher Transfer_FindHasher -#define TheMapHasher_hxx -#define Handle_TheList Handle(Transfer_HSequenceOfFinder) -#define TheList Transfer_HSequenceOfFinder -#define TheList_hxx -#define Transfer_TransferMap Transfer_TransferMapOfProcessForFinder -#define Transfer_TransferMap_hxx -#define Transfer_Iterator Transfer_IteratorOfProcessForFinder -#define Transfer_Iterator_hxx -#define Transfer_Actor Transfer_ActorOfProcessForFinder -#define Transfer_Actor_hxx -#define Handle_Transfer_Actor Handle(Transfer_ActorOfProcessForFinder) -#define Transfer_TransferProcess Transfer_ProcessForFinder -#define Transfer_TransferProcess_hxx -#define Handle_Transfer_TransferProcess Handle(Transfer_ProcessForFinder) -#include + Standard_Integer i; + for (i = i1; i <= i2; i++) + { + ind = map->Value(i); + if (ind == 0) continue; + Handle(Transfer_Binder) binder = MapItem(ind); + if (binder.IsNull()) continue; + } +} +//======================================================================= +//function : CheckNum +//purpose : +//======================================================================= +Standard_Integer Transfer_ProcessForFinder::CheckNum(const Handle(Transfer_Finder)&) const +{ + return 0; +} diff --git a/src/Transfer/Transfer_ProcessForTransient_0.cxx b/src/Transfer/Transfer_ProcessForTransient_0.cxx index 9b3049527d..4611b27642 100644 --- a/src/Transfer/Transfer_ProcessForTransient_0.cxx +++ b/src/Transfer/Transfer_ProcessForTransient_0.cxx @@ -16,36 +16,1245 @@ #include -#include - +#include +#include +#include +#include #include +#include +#include +#include +#include +#include +#include #include -#include +#include +#include +#include +#include +#include #include -#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include #include -#include -#include -#include -#include +#include +#include + +//======================================================================= +//function : Transfer_ProcessForTransient +//purpose : +//======================================================================= +Transfer_ProcessForTransient::Transfer_ProcessForTransient(const Standard_Integer nb) + : themap(nb) +{ + theerrh = Standard_True; + therootm = Standard_False; + thelevel = 0; therootl = 0; + themessenger = Message::DefaultMessenger(); + thetrace = 0; + theindex = 0; +} + +//======================================================================= +//function : Transfer_ProcessForTransient +//purpose : +//======================================================================= +Transfer_ProcessForTransient::Transfer_ProcessForTransient(const Handle(Message_Messenger)& messenger, + const Standard_Integer nb) + : themap(nb) +{ + theerrh = Standard_True; + therootm = Standard_False; + thelevel = 0; therootl = 0; + SetMessenger(messenger); + thetrace = 1; + theindex = 0; +} + +//======================================================================= +//function : Clear +//purpose : +//======================================================================= +void Transfer_ProcessForTransient::Clear() +{ + thelevel = 0; therootl = 0; + theroots.Clear(); + themap.Clear(); + theindex = 0; thelastobj.Nullify(); thelastbnd.Nullify(); +} + +//======================================================================= +//function : Clean +//purpose : +//======================================================================= +void Transfer_ProcessForTransient::Clean() +{ + Standard_Integer i, nb = NbMapped(); + Standard_Integer j, unb = 0; + for (i = 1; i <= nb; i++) + { + if (themap(i).IsNull()) unb++; + } + if (unb == 0) return; + + // Redo the map -> offsets + TColStd_Array1OfInteger unbs(1, nb); unbs.Init(0); + Transfer_TransferMapOfProcessForTransient newmap(nb * 2); + for (i = 1; i <= nb; i++) + { + Handle(Standard_Transient) ent = Mapped(i); + Handle(Transfer_Binder) bnd = MapItem(i); + if (bnd.IsNull()) continue; + j = newmap.Add(ent, bnd); + unbs.SetValue(i, j); + } + themap.Assign(newmap); + + // Update Root List + TColStd_IndexedMapOfInteger aNewRoots; + for (i = 1; i <= theroots.Extent(); i++) + { + j = theroots.FindKey(i); + Standard_Integer k = unbs.Value(j); + if (k) aNewRoots.Add(k); + } + theroots.Clear(); + theroots = aNewRoots; + + // The rest: cleaning + thelastobj.Nullify(); + thelastbnd.Nullify(); + theindex = 0; +} + +//======================================================================= +//function : Resize +//purpose : +//======================================================================= +void Transfer_ProcessForTransient::Resize(const Standard_Integer nb) +{ + if (nb > themap.NbBuckets()) themap.ReSize(nb); +} + +//======================================================================= +//function : SetActor +//purpose : +//======================================================================= +void Transfer_ProcessForTransient::SetActor(const Handle(Transfer_ActorOfProcessForTransient)& actor) +{ + if (theactor == actor) return; + if (theactor.IsNull()) theactor = actor; + else if (actor.IsNull()) theactor = actor; + else if (theactor->IsLast()) + { + actor->SetNext(theactor); theactor = actor; + } + else theactor->SetNext(actor); +} + +//======================================================================= +//function : Actor +//purpose : +//======================================================================= +Handle(Transfer_ActorOfProcessForTransient) Transfer_ProcessForTransient::Actor() const +{ + return theactor; +} + +//======================================================================= +//function : Find +//purpose : +//======================================================================= +Handle(Transfer_Binder) Transfer_ProcessForTransient::Find(const Handle(Standard_Transient)& start) const +{ + if (thelastobj == start) + { + if (theindex > 0) return thelastbnd; + } + Standard_Integer index = themap.FindIndex(start); + if (index > 0) + { + const Handle(Transfer_Binder)& binder = themap.FindFromIndex(index); + return binder; + } + return Handle(Transfer_Binder)(); +} + +//======================================================================= +//function : IsBound +//purpose : +//======================================================================= +Standard_Boolean Transfer_ProcessForTransient::IsBound(const Handle(Standard_Transient)& start) const +{ + Handle(Transfer_Binder) binder = Find(start); + if (binder.IsNull()) return Standard_False; + return binder->HasResult(); +} + +//======================================================================= +//function : IsAlreadyUsed +//purpose : +//======================================================================= +Standard_Boolean Transfer_ProcessForTransient::IsAlreadyUsed(const Handle(Standard_Transient)& start) const +{ + Handle(Transfer_Binder) binder = Find(start); + if (binder.IsNull()) + { + StartTrace(binder, start, thelevel, 4); + throw Transfer_TransferFailure("TransferProcess : IsAlreadyUsed, transfer not done cannot be used..."); + } + return (binder->Status() == Transfer_StatusUsed); +} + +//======================================================================= +//function : FindAndMask +//purpose : +//======================================================================= +Handle(Transfer_Binder) Transfer_ProcessForTransient::FindAndMask(const Handle(Standard_Transient)& start) +{ + if (thelastobj == start) + { + if (theindex > 0) return thelastbnd; + } + thelastobj = start; + theindex = themap.FindIndex(start); + if (theindex > 0) thelastbnd = themap.FindFromIndex(theindex); + else thelastbnd.Nullify(); + return thelastbnd; +} + +//======================================================================= +//function : Bind +//purpose : +//======================================================================= +void Transfer_ProcessForTransient::Bind(const Handle(Standard_Transient)& start, + const Handle(Transfer_Binder)& binder) +{ + if (binder.IsNull()) return; + Handle(Transfer_Binder) former = FindAndMask(start); + if (!former.IsNull()) + { + // We admit VoidBinder: then we resume our Check + if (former->DynamicType() == STANDARD_TYPE(Transfer_VoidBinder)) + { + binder->Merge(former); + themap(theindex) = binder; + } + else if (former->Status() == Transfer_StatusUsed) + { + StartTrace(former, start, thelevel, 4); + throw Transfer_TransferFailure("TransferProcess : Bind, already Bound"); + } + else + { + if (thetrace > 2) StartTrace(former, start, thelevel, 5); + binder->CCheck()->GetMessages(former->Check()); + } + } + if (theindex == 0 || thelastbnd.IsNull()) + { + if (theindex == 0) theindex = themap.Add(start, binder); + else themap(theindex) = binder; + thelastbnd = binder; + } + else + { + thelastbnd = binder; + themap(theindex) = binder; + } +} + +//======================================================================= +//function : Rebind +//purpose : +//======================================================================= +void Transfer_ProcessForTransient::Rebind(const Handle(Standard_Transient)& start, + const Handle(Transfer_Binder)& binder) +{ + Bind(start, binder); +} + +//======================================================================= +//function : Unbind +//purpose : +//======================================================================= +Standard_Boolean Transfer_ProcessForTransient::Unbind(const Handle(Standard_Transient)& start) +{ + Handle(Transfer_Binder) former = FindAndMask(start); + if (theindex == 0) return Standard_False; + if (former.IsNull()) return Standard_False; + if (former->DynamicType() == STANDARD_TYPE(Transfer_VoidBinder)) return Standard_True; + themap(theindex) = thelastbnd; + if (theroots.Contains(theindex)) + { + TColStd_IndexedMapOfInteger aNewRoots; + for (Standard_Integer i = 1; i <= theroots.Extent(); i++) + if (theindex != theroots.FindKey(i)) + aNewRoots.Add(theroots.FindKey(i)); + + theroots.Clear(); + theroots = aNewRoots; + } + + thelastobj.Nullify(); + thelastbnd.Nullify(); + theindex = 0; + return Standard_True; +} + +//======================================================================= +//function : FindElseBind +//purpose : +//======================================================================= +Handle(Transfer_Binder) Transfer_ProcessForTransient::FindElseBind(const Handle(Standard_Transient)& start) +{ + Handle(Transfer_Binder) binder = FindAndMask(start); + if (!binder.IsNull()) return binder; + binder = new Transfer_VoidBinder; + Bind(start, binder); + return binder; +} + +//======================================================================= +//function : SetMessenger +//purpose : +//======================================================================= +void Transfer_ProcessForTransient::SetMessenger(const Handle(Message_Messenger)& messenger) +{ + if (messenger.IsNull()) + themessenger = Message::DefaultMessenger(); + else + themessenger = messenger; +} + +//======================================================================= +//function : Messenger +//purpose : +//======================================================================= +Handle(Message_Messenger) Transfer_ProcessForTransient::Messenger() const +{ + return themessenger; +} + +//======================================================================= +//function : SetTraceLevel +//purpose : +//======================================================================= +void Transfer_ProcessForTransient::SetTraceLevel(const Standard_Integer tracelev) +{ + thetrace = tracelev; +} + +//======================================================================= +//function : TraceLevel +//purpose : +//======================================================================= +Standard_Integer Transfer_ProcessForTransient::TraceLevel() const +{ + return thetrace; +} + +//======================================================================= +//function : SendFail +//purpose : +//======================================================================= +void Transfer_ProcessForTransient::SendFail(const Handle(Standard_Transient)& start, + const Message_Msg& amsg) +{ + AddFail(start, amsg); +} + +//======================================================================= +//function : SendWarning +//purpose : +//======================================================================= +void Transfer_ProcessForTransient::SendWarning(const Handle(Standard_Transient)& start, + const Message_Msg& amsg) +{ + AddWarning(start, amsg); +} + +//======================================================================= +//function : SendMsg +//purpose : +//======================================================================= +void Transfer_ProcessForTransient::SendMsg(const Handle(Standard_Transient)& start, + const Message_Msg& amsg) +{ + Handle(Transfer_Binder) binder = FindAndMask(start); + if (binder.IsNull()) + { + binder = new Transfer_VoidBinder; + Bind(start, binder); + } + // Feeds the trace: Causing rule (user messages) + if (thetrace > 0) + { + StartTrace(binder, start, thelevel, 6); + Message_Messenger::StreamBuffer aSender = themessenger->SendInfo(); + aSender << amsg.Value(); + if (amsg.IsEdited() && thetrace > 2) + aSender << " [from: " << amsg.Original() << "]"; + aSender << std::endl; + } +} + +//======================================================================= +//function : AddFail +//purpose : +//======================================================================= +void Transfer_ProcessForTransient::AddFail(const Handle(Standard_Transient)& start, + const Standard_CString mess, + const Standard_CString orig) +{ + Handle(Transfer_Binder) binder = FindAndMask(start); + if (binder.IsNull()) + { + binder = new Transfer_VoidBinder; + Bind(start, binder); + } + binder->AddFail(mess, orig); + if (thetrace > 0) + { + StartTrace(binder, start, thelevel, 1); + Message_Messenger::StreamBuffer aSender = themessenger->SendFail(); + aSender << " --> Fail : " << mess; + if (orig[0] != '\0' && thetrace > 2) aSender << " [from: " << orig << "]"; + aSender << std::endl; + } +} + +//======================================================================= +//function : AddError +//purpose : +//======================================================================= +void Transfer_ProcessForTransient::AddError(const Handle(Standard_Transient)& start, + const Standard_CString mess, + const Standard_CString orig) +{ + AddFail(start, mess, orig); +} + +//======================================================================= +//function : AddFail +//purpose : +//======================================================================= +void Transfer_ProcessForTransient::AddFail(const Handle(Standard_Transient)& start, + const Message_Msg& amsg) +{ + if (amsg.IsEdited()) AddFail(start, TCollection_AsciiString(amsg.Value()).ToCString(), + TCollection_AsciiString(amsg.Original()).ToCString()); + else AddFail(start, TCollection_AsciiString(amsg.Value()).ToCString()); +} + +//======================================================================= +//function : AddWarning +//purpose : +//======================================================================= +void Transfer_ProcessForTransient::AddWarning(const Handle(Standard_Transient)& start, + const Standard_CString mess, + const Standard_CString orig) +{ + Handle(Transfer_Binder) binder = FindAndMask(start); + if (binder.IsNull()) + { + binder = new Transfer_VoidBinder; + Bind(start, binder); + } + binder->AddWarning(mess, orig); + if (thetrace > 1) + { + StartTrace(binder, start, thelevel, 2); + Message_Messenger::StreamBuffer aSender = themessenger->SendWarning(); + aSender << " --> Warning : " << mess; + if (orig[0] != '\0' && thetrace > 2) aSender << " [from: " << orig << "]"; + aSender << std::endl; + } +} + +//======================================================================= +//function : AddWarning +//purpose : +//======================================================================= +void Transfer_ProcessForTransient::AddWarning(const Handle(Standard_Transient)& start, + const Message_Msg& amsg) +{ + if (amsg.IsEdited()) AddWarning(start, TCollection_AsciiString(amsg.Value()).ToCString(), + TCollection_AsciiString(amsg.Original()).ToCString()); + else AddWarning(start, TCollection_AsciiString(amsg.Value()).ToCString()); +} + +//======================================================================= +//function : Mend +//purpose : +//======================================================================= +void Transfer_ProcessForTransient::Mend(const Handle(Standard_Transient)& start, + const Standard_CString pref) +{ + Handle(Transfer_Binder) binder = FindAndMask(start); + if (binder.IsNull()) return; + Handle(Interface_Check) ach = binder->CCheck(); + ach->Mend(pref); +} + +//======================================================================= +//function : Check +//purpose : +//======================================================================= +Handle(Interface_Check) Transfer_ProcessForTransient::Check(const Handle(Standard_Transient)& start) const +{ + const Handle(Transfer_Binder)& binder = Find(start); + if (binder.IsNull()) + { + Handle(Interface_Check) check; + return check; + } + return binder->Check(); +} + +//======================================================================= +//function : BindTransient +//purpose : +//======================================================================= +void Transfer_ProcessForTransient::BindTransient(const Handle(Standard_Transient)& start, + const Handle(Standard_Transient)& res) +{ + if (res.IsNull()) return; + Handle(Transfer_Binder) former = Find(start); + Handle(Transfer_SimpleBinderOfTransient) binder = + Handle(Transfer_SimpleBinderOfTransient)::DownCast(former); + if (!binder.IsNull()) + { + if (binder->Status() == Transfer_StatusVoid) + { + binder->SetResult(res); return; + } + } + binder = new Transfer_SimpleBinderOfTransient; + binder->SetResult(res); + if (former.IsNull()) Bind(start, binder); + else Rebind(start, binder); +} + +//======================================================================= +//function : FindTransient +//purpose : +//======================================================================= +const Handle(Standard_Transient)& Transfer_ProcessForTransient::FindTransient +(const Handle(Standard_Transient)& start) const +{ + static const Handle(Standard_Transient) aDummy; + Handle(Transfer_SimpleBinderOfTransient) binder = + Handle(Transfer_SimpleBinderOfTransient)::DownCast(Find(start)); + if (binder.IsNull()) return aDummy; + if (!binder->HasResult()) return aDummy; + return binder->Result(); +} + +//======================================================================= +//function : BindMultiple +//purpose : +//======================================================================= +void Transfer_ProcessForTransient::BindMultiple(const Handle(Standard_Transient)& start) +{ + Handle(Transfer_Binder) binder = FindAndMask(start); + if (!binder.IsNull()) + { + if (!binder->IsKind(STANDARD_TYPE(Transfer_MultipleBinder))) + { + StartTrace(thelastbnd, start, thelevel, 4); + throw Transfer_TransferFailure("TransferProcess : BindMultiple"); + } + } + else Bind(start, new Transfer_MultipleBinder); +} + +//======================================================================= +//function : AddMultiple +//purpose : +//======================================================================= +void Transfer_ProcessForTransient::AddMultiple(const Handle(Standard_Transient)& start, + const Handle(Standard_Transient)& res) +{ + Handle(Transfer_Binder) binder = FindAndMask(start); + Handle(Transfer_MultipleBinder) multr = + Handle(Transfer_MultipleBinder)::DownCast(binder); + if (multr.IsNull()) + { + StartTrace(binder, start, thelevel, 4); + if (binder.IsNull()) throw Transfer_TransferFailure("TransferProcess : AddMultiple, nothing bound"); + else throw Transfer_TransferFailure("TransferProcess : AddMultiple, Binder not a MultipleBinder"); + } + multr->AddResult(res); +} + +//======================================================================= +//function : FindTypedTransient +//purpose : +//======================================================================= +Standard_Boolean Transfer_ProcessForTransient::FindTypedTransient +(const Handle(Standard_Transient)& start, const Handle(Standard_Type)& atype, + Handle(Standard_Transient)& val) const +{ + return GetTypedTransient(Find(start), atype, val); +} + +//======================================================================= +//function : GetTypedTransient +//purpose : +//======================================================================= +Standard_Boolean Transfer_ProcessForTransient::GetTypedTransient +(const Handle(Transfer_Binder)& binder, const Handle(Standard_Type)& atype, + Handle(Standard_Transient)& val) const +{ + return Transfer_SimpleBinderOfTransient::GetTypedResult(binder, atype, val); +} + +//======================================================================= +//function : NbMapped +//purpose : +//======================================================================= +Standard_Integer Transfer_ProcessForTransient::NbMapped() const +{ + return themap.Extent(); +} + +//======================================================================= +//function : Mapped +//purpose : +//======================================================================= +const Handle(Standard_Transient)& Transfer_ProcessForTransient::Mapped(const Standard_Integer num) const +{ + return themap.FindKey(num); +} + +//======================================================================= +//function : MapIndex +//purpose : +//======================================================================= +Standard_Integer Transfer_ProcessForTransient::MapIndex(const Handle(Standard_Transient)& start) const +{ + return themap.FindIndex(start); +} + +//======================================================================= +//function : MapItem +//purpose : +//======================================================================= +Handle(Transfer_Binder) Transfer_ProcessForTransient::MapItem(const Standard_Integer num) const +{ + Handle(Transfer_Binder) binder = themap.FindFromIndex(num); + return binder; +} + +//======================================================================= +//function : SetRoot +//purpose : +//======================================================================= +void Transfer_ProcessForTransient::SetRoot(const Handle(Standard_Transient)& start) +{ + Standard_Integer index = MapIndex(start); + if (index == 0) + { + return; + } + + theroots.Add(index); + if (thetrace > 2) StartTrace(MapItem(index), start, thelevel, 3); +} + +//======================================================================= +//function : SetRootManagement +//purpose : +//======================================================================= +void Transfer_ProcessForTransient::SetRootManagement(const Standard_Boolean stat) +{ + therootm = stat; +} + +//======================================================================= +//function : NbRoots +//purpose : +//======================================================================= +Standard_Integer Transfer_ProcessForTransient::NbRoots() const +{ + return theroots.Extent(); +} + +//======================================================================= +//function : Root +//purpose : +//======================================================================= +const Handle(Standard_Transient)& Transfer_ProcessForTransient::Root(const Standard_Integer num) const +{ + Standard_Integer ind = 0; + if (num > 0 && num <= theroots.Extent()) ind = theroots.FindKey(num); + return themap.FindKey(ind); +} + +//======================================================================= +//function : RootItem +//purpose : +//======================================================================= +Handle(Transfer_Binder) Transfer_ProcessForTransient::RootItem(const Standard_Integer num) const +{ + Standard_Integer ind = 0; + if (num > 0 && num <= theroots.Extent()) ind = theroots.FindKey(num); + return themap.FindFromIndex(ind); +} + +//======================================================================= +//function : RootIndex +//purpose : +//======================================================================= +Standard_Integer Transfer_ProcessForTransient::RootIndex(const Handle(Standard_Transient)& start) const +{ + Standard_Integer index = MapIndex(start); + if (index == 0) return 0; + return theroots.FindIndex(index); +} + +//======================================================================= +//function : NestingLevel +//purpose : +//======================================================================= +Standard_Integer Transfer_ProcessForTransient::NestingLevel() const +{ + return thelevel; +} + +//======================================================================= +//function : ResetNestingLevel +//purpose : +//======================================================================= +void Transfer_ProcessForTransient::ResetNestingLevel() +{ + thelevel = 0; +} + +//======================================================================= +//function : Recognize +//purpose : +//======================================================================= +Standard_Boolean Transfer_ProcessForTransient::Recognize(const Handle(Standard_Transient)& start) const +{ + Handle(Transfer_ActorOfProcessForTransient) actor = theactor; + // We scan the Next until we have a Result + while (!actor.IsNull()) + { + if (actor->Recognize(start)) return Standard_True; + actor = actor->Next(); + } + return Standard_False; +} + +//======================================================================= +//function : Transferring +//purpose : +//======================================================================= +Handle(Transfer_Binder) Transfer_ProcessForTransient::Transferring(const Handle(Standard_Transient)& start, + const Message_ProgressRange& theProgress) +{ + Handle(Transfer_Binder) former = FindAndMask(start); + // We consider that this new Transfer request therefore corresponds to a + // additional use: note "AlreadyUsed", therefore non-modifiable result + if (!former.IsNull()) + { + if (former->HasResult()) + { + former->SetAlreadyUsed(); + return former; + } + + Message_Messenger::StreamBuffer aSender = themessenger->SendInfo(); + Transfer_StatusExec statex = former->StatusExec(); + switch (statex) + { + case Transfer_StatusInitial: + break; + case Transfer_StatusDone: + aSender << " .. and Transfer done" << std::endl; + return former; + case Transfer_StatusRun: + former->SetStatusExec(Transfer_StatusLoop); + return former; + case Transfer_StatusError: + if (thetrace) + { + aSender << " *** Transfer in Error Status :" << std::endl; + StartTrace(former, start, thelevel, 0); + } + else StartTrace(former, start, thelevel, 4); + throw Transfer_TransferFailure("TransferProcess : Transfer in Error Status"); + case Transfer_StatusLoop: + if (thetrace) + { + aSender << " *** Transfer Head of Dead Loop :" << std::endl; + StartTrace(former, start, thelevel, 0); + } + else StartTrace(former, start, thelevel, 4); + throw Transfer_TransferDeadLoop("TransferProcess : Transfer at Head of a Dead Loop"); + } + former->SetStatusExec(Transfer_StatusRun); + } + + Handle(Transfer_Binder) binder; + Standard_Boolean newbind = Standard_False; + if (theerrh) + { + Message_Messenger::StreamBuffer aSender = themessenger->SendInfo(); + + // Transfer under protection for exceptions (for notification in fact) + Standard_Integer oldlev = thelevel; + try + { + OCC_CATCH_SIGNALS + binder = TransferProduct(start, theProgress); + } + + // Exceptions to catch up on: they are not all the same + catch (Transfer_TransferDeadLoop const&) + { + if (binder.IsNull()) + { + aSender << " *** Dead Loop with no Result" << std::endl; + if (thetrace) StartTrace(binder, start, thelevel - 1, 0); + binder = new Transfer_VoidBinder; + Bind(start, binder); newbind = Standard_True; + } + else if (binder->StatusExec() == Transfer_StatusLoop) + { + if (thetrace) + { + aSender << " *** Dead Loop : Finding head of Loop :" << std::endl; + StartTrace(binder, start, thelevel - 1, 0); + } + else StartTrace(binder, start, thelevel - 1, 4); + throw Transfer_TransferFailure("TransferProcess : Head of Dead Loop"); + // In other words, we change the exception (we exit the loop) + } + else + { + if (thetrace) + { + aSender << " *** Dead Loop : Actor in Loop :" << std::endl; + StartTrace(binder, start, thelevel - 1, 0); + } + } + binder->AddFail("Transfer in dead Loop"); + thelevel = oldlev; + } + catch (Standard_Failure const& anException) + { + if (binder.IsNull()) + { + aSender << " *** Exception Raised with no Result" << std::endl; + binder = new Transfer_VoidBinder; + Bind(start, binder); newbind = Standard_True; + } + binder->AddFail("Transfer stopped by exception raising"); + if (thetrace) + { + aSender << " *** Raised : " << anException.GetMessageString() << std::endl; + StartTrace(binder, start, thelevel - 1, 4); + } + thelevel = oldlev; + } + } + + // Unprotected transfer (thus, dbx by hand in case of crash by Raise) + else binder = TransferProduct(start, theProgress); + + if (theProgress.UserBreak()) + return Handle(Transfer_Binder)(); + + if (!newbind && !binder.IsNull()) + { + if (former.IsNull()) + { + if (!IsBound(start)) Bind(start, binder); + else + { + Rebind(start, binder); + } + } + else Rebind(start, binder); + } + else + { + if (!former.IsNull()) former->SetStatusExec(Transfer_StatusDone); //+ + return Handle(Transfer_Binder)(); // Binder Null ... que faire d autre ? + } + + if (therootl >= thelevel) + { + therootl = 0; + if (therootm && binder->Status() != Transfer_StatusVoid) + { + SetRoot(start); + } + } + return thelastbnd; +} + + +//======================================================================= +//function : TransferProduct +//purpose : +//======================================================================= +Handle(Transfer_Binder) Transfer_ProcessForTransient::TransferProduct +(const Handle(Standard_Transient)& start, + const Message_ProgressRange& theProgress) +{ + thelevel++; + Handle(Transfer_Binder) binder; + Handle(Transfer_ActorOfProcessForTransient) actor = theactor; + + // We scan the Next until we have a Result + Message_ProgressScope aScope(theProgress, NULL, 1, true); + while (!actor.IsNull()) + { + if (actor->Recognize(start)) binder = actor->Transferring(start, this, aScope.Next()); + else binder.Nullify(); + if (!binder.IsNull()) break; + actor = actor->Next(); + } + if (aScope.UserBreak()) + return Handle(Transfer_Binder)(); + + if (binder.IsNull()) + { + if (thelevel > 0) thelevel--; + return binder; + } + if (therootl == 0 && binder->StatusExec() == Transfer_StatusDone) + therootl = thelevel - 1; + + if (thelevel > 0) thelevel--; + return binder; +} + +//======================================================================= +//function : Transfer +//purpose : +//======================================================================= +Standard_Boolean Transfer_ProcessForTransient::Transfer(const Handle(Standard_Transient)& start, + const Message_ProgressRange& theProgress) +{ + Handle(Transfer_Binder) binder = Transferring(start, theProgress); + return (!binder.IsNull()); +} + +//======================================================================= +//function : SetErrorHandle +//purpose : +//======================================================================= +void Transfer_ProcessForTransient::SetErrorHandle(const Standard_Boolean err) +{ + theerrh = err; +} + +//======================================================================= +//function : ErrorHandle +//purpose : +//======================================================================= +Standard_Boolean Transfer_ProcessForTransient::ErrorHandle() const +{ + return theerrh; +} + +//======================================================================= +//function : StartTrace +//purpose : +//======================================================================= +void Transfer_ProcessForTransient::StartTrace(const Handle(Transfer_Binder)& binder, + const Handle(Standard_Transient)& start, + const Standard_Integer level, + const Standard_Integer mode) const +{ + Message_Messenger::StreamBuffer aSender = themessenger->SendInfo(); + // ### Fail (Roots:50) -- Start start->DynamicType() + // ### Fail (Roots:50) -- Start id:#label.. Type:start->DynamicType() + if (thetrace > 3) + { // Internal to be switch when searching bug (trace >= 4) + if (mode == 1) aSender << " ### Fail"; + if (mode == 2) aSender << " ### Warning"; + if (mode == 3) aSender << " ### New Root n0 " << theroots.Extent(); + if (mode == 4) aSender << " ### Exception"; + if (mode == 5) aSender << " ### Substitution"; + if (mode == 6) aSender << " ### Information"; + if (level > 1) + aSender << " (nested)"; + if (mode >= 0 && mode != 3) + aSender << " at " << theroots.Extent() << " Roots"; + } + if (!start.IsNull()) PrintTrace(start, aSender); + + if (!binder.IsNull()) + { + Handle(Transfer_Binder) bnd = binder; + Standard_Boolean hasres = Standard_False; + while (!bnd.IsNull()) + { + if (bnd->Status() != Transfer_StatusVoid) + { + if (!hasres) + aSender << "\n --- Result Type : "; + else + aSender << " , "; + aSender << bnd->ResultTypeName(); + hasres = Standard_True; + } + bnd = bnd->NextResult(); + } + if (!hasres && mode > 2) + { + aSender << "\n --- No Result recorded"; + } + } + aSender << std::endl; +} + +//======================================================================= +//function : PrintTrace +//purpose : +//======================================================================= +void Transfer_ProcessForTransient::PrintTrace(const Handle(Standard_Transient)& start, Standard_OStream& S) const +{ + if (!start.IsNull()) S << " Type:" << start->DynamicType()->Name(); +} + +//======================================================================= +//function : IsLooping +//purpose : +//======================================================================= +Standard_Boolean Transfer_ProcessForTransient::IsLooping +(const Standard_Integer alevel) const +{ + return alevel > NbMapped(); +} + +//======================================================================= +//function : RootResult +//purpose : +//======================================================================= +Transfer_IteratorOfProcessForTransient Transfer_ProcessForTransient::RootResult(const Standard_Boolean withstart) const +{ + Transfer_IteratorOfProcessForTransient iter(withstart); + Standard_Integer max = theroots.Extent(); + for (Standard_Integer j = 1; j <= max; j++) + { + Standard_Integer i = theroots.FindKey(j); + Handle(Transfer_Binder) binder = MapItem(i); + if (binder.IsNull()) continue; + if (withstart) iter.Add(binder, Mapped(i)); + else iter.Add(binder); + } + return iter; +} + +//======================================================================= +//function : CompleteResult +//purpose : +//======================================================================= +Transfer_IteratorOfProcessForTransient Transfer_ProcessForTransient::CompleteResult +(const Standard_Boolean withstart) const +{ + Transfer_IteratorOfProcessForTransient iter(withstart); + Standard_Integer max = NbMapped(); + for (Standard_Integer i = 1; i <= max; i++) + { + Handle(Transfer_Binder) binder = MapItem(i); + if (binder.IsNull()) continue; + if (withstart) iter.Add(binder, Mapped(i)); + else iter.Add(binder); + } + return iter; +} + +//======================================================================= +//function : AbnormalResult +//purpose : +//======================================================================= +Transfer_IteratorOfProcessForTransient Transfer_ProcessForTransient::AbnormalResult() const +{ + Transfer_IteratorOfProcessForTransient iter(Standard_True); + Standard_Integer max = NbMapped(); + for (Standard_Integer i = 1; i <= max; i++) + { + Handle(Transfer_Binder) binder = MapItem(i); + if (binder.IsNull()) continue; + Transfer_StatusExec statex = binder->StatusExec(); + if (statex != Transfer_StatusInitial && statex != Transfer_StatusDone) + iter.Add(binder, Mapped(i)); + } + return iter; +} + +//======================================================================= +//function : CheckList +//purpose : +//======================================================================= +Interface_CheckIterator Transfer_ProcessForTransient::CheckList +(const Standard_Boolean erronly) const +{ + Interface_CheckIterator list; + Standard_Integer num, max = NbMapped(); + for (Standard_Integer i = 1; i <= max; i++) + { + Handle(Transfer_Binder) binder = MapItem(i); + if (binder.IsNull()) continue; + Transfer_StatusExec statex = binder->StatusExec(); + Handle(Interface_Check) check = binder->Check(); + if (statex != Transfer_StatusInitial && statex != Transfer_StatusDone && + !check->HasFailed()) + check->AddFail("Transfer in Abnormal Status (!= Initial or Done)"); + if (!check->HasFailed() && (erronly || check->NbWarnings() == 0)) continue; + const Handle(Standard_Transient)& ent = Mapped(i); + num = CheckNum(ent); + if (num == 0) num = i; + check->SetEntity(ent); + list.Add(check, num); + } + return list; +} + +//======================================================================= +//function : ResultOne +//purpose : +//======================================================================= +Transfer_IteratorOfProcessForTransient Transfer_ProcessForTransient::ResultOne(const Handle(Standard_Transient)& start, + const Standard_Integer level, + const Standard_Boolean withstart) const +{ + Transfer_IteratorOfProcessForTransient iter(withstart); + Standard_Integer max = NbMapped(); + Standard_Integer ind = MapIndex(start); + if (ind == 0) return iter; + Standard_Integer i1 = (level == 0 ? ind : 1); + Standard_Integer i2 = (level == 0 ? ind : max); + Handle(TColStd_HArray1OfInteger) map = new TColStd_HArray1OfInteger(i1, i2, 0); + + for (Standard_Integer i = i1; i <= i2; i++) + { + ind = map->Value(i); + if (ind == 0) continue; + Handle(Transfer_Binder) binder = MapItem(i); + if (binder.IsNull()) continue; + if (withstart) iter.Add(binder, Mapped(ind)); + else iter.Add(binder); + } + return iter; +} + +//======================================================================= +//function : CheckListOne +//purpose : +//======================================================================= +Interface_CheckIterator Transfer_ProcessForTransient::CheckListOne +(const Handle(Standard_Transient)& start, const Standard_Integer level, + const Standard_Boolean erronly) const +{ + Interface_CheckIterator list; + Standard_Integer max = NbMapped(); + Standard_Integer num, ind = MapIndex(start); + if (ind == 0) return list; + Standard_Integer i1 = (level == 0 ? ind : 1); + Standard_Integer i2 = (level == 0 ? ind : max); + Handle(TColStd_HArray1OfInteger) map = new TColStd_HArray1OfInteger(i1, i2, 0); + + for (Standard_Integer i = i1; i <= i2; i++) + { + ind = map->Value(i); + if (ind == 0) continue; + Handle(Transfer_Binder) binder = MapItem(ind); + if (binder.IsNull()) continue; + Transfer_StatusExec statex = binder->StatusExec(); + Handle(Interface_Check) check = binder->Check(); + if (statex != Transfer_StatusInitial && statex != Transfer_StatusDone && + !check->HasFailed()) + check->AddFail("Transfer in Abnormal Status (!= Initial or Done)"); + if (!check->HasFailed() && (erronly || check->NbWarnings() == 0)) continue; + const Handle(Standard_Transient)& ent = Mapped(ind); + num = CheckNum(ent); if (num == 0) num = ind; + check->SetEntity(ent); + list.Add(check, num); + } + return list; +} + +//======================================================================= +//function : IsCheckListEmpty +//purpose : +//======================================================================= +Standard_Boolean Transfer_ProcessForTransient::IsCheckListEmpty +(const Handle(Standard_Transient)& start, const Standard_Integer level, + const Standard_Boolean erronly) const +{ + Standard_Integer max = NbMapped(); + Standard_Integer ind = MapIndex(start); + if (ind == 0) return Standard_False; + Standard_Integer i1 = (level == 0 ? ind : 1); + Standard_Integer i2 = (level == 0 ? ind : max); + Handle(TColStd_HArray1OfInteger) map = new TColStd_HArray1OfInteger(i1, i2, 0); + + for (Standard_Integer i = i1; i <= i2; i++) + { + ind = map->Value(i); + if (ind == 0) continue; + Handle(Transfer_Binder) binder = MapItem(ind); + if (binder.IsNull()) continue; + + Transfer_StatusExec statex = binder->StatusExec(); + Handle(Interface_Check) check = binder->Check(); + if (statex != Transfer_StatusInitial && statex != Transfer_StatusDone) + return Standard_False; + if (check->HasFailed() || (!erronly && check->NbWarnings() > 0)) return Standard_False; + } + return Standard_True; +} + +//======================================================================= +//function : RemoveResult +//purpose : +//======================================================================= +void Transfer_ProcessForTransient::RemoveResult(const Handle(Standard_Transient)& start, + const Standard_Integer level, + const Standard_Boolean /*compute*/) +{ + //if (compute) ComputeScopes(); + Standard_Integer max = NbMapped(); + Standard_Integer ind = MapIndex(start); + if (ind == 0) return; + Standard_Integer i1 = (level == 0 ? ind : 1); + Standard_Integer i2 = (level == 0 ? ind : max); + Handle(TColStd_HArray1OfInteger) map = new TColStd_HArray1OfInteger(i1, i2, 0); + + Standard_Integer i; + for (i = i1; i <= i2; i++) + { + ind = map->Value(i); + if (ind == 0) continue; + Handle(Transfer_Binder) binder = MapItem(ind); + if (binder.IsNull()) continue; + } +} + +//======================================================================= +//function : CheckNum +//purpose : +//======================================================================= +Standard_Integer Transfer_ProcessForTransient::CheckNum(const Handle(Standard_Transient)&) const +{ + return 0; +} -#define TheStart Handle(Standard_Transient) -#define TheStart_hxx -#define TheMapHasher TColStd_MapTransientHasher -#define TheMapHasher_hxx -#define Handle_TheList Handle(TColStd_HSequenceOfTransient) -#define TheList TColStd_HSequenceOfTransient -#define TheList_hxx -#define Transfer_TransferMap Transfer_TransferMapOfProcessForTransient -#define Transfer_TransferMap_hxx -#define Transfer_Iterator Transfer_IteratorOfProcessForTransient -#define Transfer_Iterator_hxx -#define Transfer_Actor Transfer_ActorOfProcessForTransient -#define Transfer_Actor_hxx -#define Handle_Transfer_Actor Handle(Transfer_ActorOfProcessForTransient) -#define Transfer_TransferProcess Transfer_ProcessForTransient -#define Transfer_TransferProcess_hxx -#define Handle_Transfer_TransferProcess Handle(Transfer_ProcessForTransient) -#include diff --git a/src/Transfer/Transfer_TransferMapOfProcessForTransient.hxx b/src/Transfer/Transfer_TransferMapOfProcessForTransient.hxx index 94128b57cc..4d26530b60 100644 --- a/src/Transfer/Transfer_TransferMapOfProcessForTransient.hxx +++ b/src/Transfer/Transfer_TransferMapOfProcessForTransient.hxx @@ -18,9 +18,8 @@ #define _Transfer_TransferMapOfProcessForTransient_HeaderFile #include -#include #include -typedef NCollection_IndexedDataMap Transfer_TransferMapOfProcessForTransient; +typedef NCollection_IndexedDataMap Transfer_TransferMapOfProcessForTransient; #endif // _Transfer_TransferMapOfProcessForTransient_HeaderFile diff --git a/src/Transfer/Transfer_TransferProcess.gxx b/src/Transfer/Transfer_TransferProcess.gxx deleted file mode 100644 index 80ce908e43..0000000000 --- a/src/Transfer/Transfer_TransferProcess.gxx +++ /dev/null @@ -1,1556 +0,0 @@ -// 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. - -// DCE 21.01.99 S3767 Display original messages only -// if the level is greater than 2 - -//#include -// Class generique - -// TheStart est suppose Handle(Standard_Transient) ou (Transfer_Finder) -// Il doit offrir : "==" , .IsNull() , ->DynamicType() - -#include -#include - -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include - - -//#define TRANSLOG // debug - -static Handle(Standard_Transient) nultrans; // pour retour const&(Null) ... -static Handle(Transfer_Binder) nulbinder; - - -//======================================================================= -//function : Transfer_TransferProcess -//purpose : -//======================================================================= - -Transfer_TransferProcess::Transfer_TransferProcess (const Standard_Integer nb) - : themap (nb) -{ - theerrh = Standard_True; - therootm = Standard_False; - thelevel = 0; therootl = 0; - themessenger = Message::DefaultMessenger(); - thetrace = 0; -// theroots = new TColStd_HSequenceOfInteger (); - theindex = 0; -} - - -//======================================================================= -//function : Transfer_TransferProcess -//purpose : -//======================================================================= - -Transfer_TransferProcess::Transfer_TransferProcess(const Handle(Message_Messenger)& messenger, - const Standard_Integer nb) - : themap (nb) -{ - theerrh = Standard_True; - therootm = Standard_False; - thelevel = 0; therootl = 0; - SetMessenger (messenger); - thetrace = 1; -// theroots = new TColStd_HSequenceOfInteger (); - theindex = 0; -} - - void Transfer_TransferProcess::Clear () -{ - thelevel = 0; therootl = 0; - theroots.Clear(); - themap.Clear(); - theindex = 0; thelastobj.Nullify(); thelastbnd.Nullify(); -} - - void Transfer_TransferProcess::Clean () -{ - Standard_Integer i, nb = NbMapped(); - Standard_Integer j,unb = 0; - for (i = 1; i <= nb; i ++) { - if (themap(i).IsNull()) unb ++; - } - if (unb == 0) return; - -// Refaire la map -> decalages - TColStd_Array1OfInteger unbs (1,nb); unbs.Init(0); - Transfer_TransferMap newmap (nb*2); - for (i = 1; i <= nb; i ++) { - TheStart ent = Mapped(i); - Handle(Transfer_Binder) bnd = MapItem(i); - if (bnd.IsNull()) continue; - j = newmap.Add (ent,bnd); - unbs.SetValue (i,j); - } - themap.Assign (newmap); - - // Update La liste des racines - TColStd_IndexedMapOfInteger aNewRoots; - for( i=1; i<= theroots.Extent(); i++ ) { - j = theroots.FindKey(i); - Standard_Integer k = unbs.Value(j); - if ( k ) aNewRoots.Add ( k ); - } - theroots.Clear(); - theroots = aNewRoots; - -// Le reste : nettoyage - thelastobj.Nullify(); - thelastbnd.Nullify(); - theindex = 0; -} - - -//======================================================================= -//function : Resize -//purpose : -//======================================================================= - -void Transfer_TransferProcess::Resize (const Standard_Integer nb) -{ - if (nb > themap.NbBuckets()) themap.ReSize(nb); -} - - -//======================================================================= -//function : SetActor -//purpose : -//======================================================================= - -void Transfer_TransferProcess::SetActor(const Handle(Transfer_Actor)& actor) -{ - if (theactor == actor) return; - if (theactor.IsNull()) theactor = actor; - else if (actor.IsNull()) theactor = actor; // declenche RAZ - else if (theactor->IsLast()) { actor->SetNext(theactor); theactor = actor; } - else theactor->SetNext(actor); -} - - -//======================================================================= -//function : Actor -//purpose : -//======================================================================= - -Handle(Transfer_Actor) Transfer_TransferProcess::Actor () const -{ - return theactor; -} - - -// ######################################################################## -// .... MAPPING .... - -// ## ## ## Actions Generales sur Binders ## ## ## -// ## ## ## Consultations ## ## ## - - -// ## ## Find ## ## - -//======================================================================= -//function : Find -//purpose : -//======================================================================= - -Handle(Transfer_Binder) Transfer_TransferProcess::Find (const TheStart& start) const -// const Standard_Integer categ) const -{ - if (thelastobj == start) { - //if (theindex > 0) return thelastbnd->Search(categ); //skl - if (theindex > 0) return thelastbnd; //skl - } - Standard_Integer index = themap.FindIndex (start); - if (index > 0) { - const Handle(Transfer_Binder)& binder = themap.FindFromIndex(index); - //if (binder.IsNull()) //skl - return binder; - //return binder->Search(categ); //skl - } - return nulbinder; -} - -// ## ## IsBound ## ## - -//======================================================================= -//function : IsBound -//purpose : -//======================================================================= - -Standard_Boolean Transfer_TransferProcess::IsBound(const TheStart& start) const -// const Standard_Integer categ) const -{ - Handle(Transfer_Binder) binder = Find(start); //,categ); skl - if (binder.IsNull()) return Standard_False; - return binder->HasResult(); -} - -// ## ## IsAlreadyUsed ## ## - -//======================================================================= -//function : IsAlreadyUsed -//purpose : -//======================================================================= - -Standard_Boolean Transfer_TransferProcess::IsAlreadyUsed(const TheStart& start) const -// const Standard_Integer categ) const -{ - Handle(Transfer_Binder) binder = Find(start); //,categ); skl - if (binder.IsNull()) { - StartTrace (binder,start,thelevel,4); - throw Transfer_TransferFailure("TransferProcess : IsAlreadyUsed, transfer not done cannot be used..."); - } - return (binder->Status() == Transfer_StatusUsed); -} - - -// ## ## FindAndMask (private) ## ## - -//======================================================================= -//function : FindAndMask -//purpose : -//======================================================================= - -Handle(Transfer_Binder) Transfer_TransferProcess::FindAndMask(const TheStart& start) -// const Standard_Integer categ) -{ - if (thelastobj == start) { - if (theindex > 0) return thelastbnd; //skl ->Search(categ); - } - thelastobj = start; - theindex = themap.FindIndex (start); - if (theindex > 0) thelastbnd = themap.FindFromIndex(theindex); - else thelastbnd.Nullify(); - //if (thelastbnd.IsNull()) skl - return thelastbnd; - //return thelastbnd->Search(categ); //skl -} - - -// ## ## ## Modifications ## ## ## - - -//======================================================================= -//function : Bind -//purpose : -//======================================================================= - -void Transfer_TransferProcess::Bind (const TheStart& start, - const Handle(Transfer_Binder)& binder) -// const Standard_Integer categ) -{ - if (binder.IsNull()) return; - Handle(Transfer_Binder) former = FindAndMask(start);//,categ);skl - if (!former.IsNull()) { -// On admet VoidBinder : alors on reprend son Check - if (former->DynamicType() == STANDARD_TYPE(Transfer_VoidBinder)) { - binder->Merge(former); - //binder->SetCategory(categ); //skl - themap(theindex) = binder; // Substitution - } - else if (former->Status() == Transfer_StatusUsed) { - StartTrace (former,start,thelevel,4); - throw Transfer_TransferFailure("TransferProcess : Bind, already Bound"); - } - else { - if (thetrace > 2) StartTrace (former,start,thelevel,5); - binder->CCheck()->GetMessages (former->Check()); - } - } - //binder->SetCategory(categ); //skl - if (theindex == 0 || thelastbnd.IsNull()) { - if (theindex == 0) theindex = themap.Add(start,binder); // Nouveau - else themap(theindex) = binder; // idem en fait - thelastbnd = binder; - } - else { //skl - //binder->AddResult(thelastbnd); - thelastbnd = binder; - themap(theindex) = binder; - } -/*skl else if (thelastbnd->Category() == categ) { // Substitue cette categorie - binder->Next(Standard_False)->SetNext(thelastbnd->Next(Standard_True),Standard_True); - thelastbnd = binder; - themap(theindex) = binder; - } else { - thelastbnd->AddNext (binder,categ,Standard_True); - } */ -} - - -//======================================================================= -//function : Rebind -//purpose : -//======================================================================= - -void Transfer_TransferProcess::Rebind (const TheStart& start, - const Handle(Transfer_Binder)& binder) -// const Standard_Integer categ) -{ - Bind(start,binder); //,categ);skl - // entre les deux, les differences allaient s amenuisant - // au debut, on criait si pas encore Bound (idiot) - // ne restait plus comme difference que le test StatusUsed sur Rebind, - // tandis que Bind refusait des lors qu il y avait un resultat - // -> a present, Bind s aligne sur Rebind -} - - -//======================================================================= -//function : Unbind -//purpose : -//======================================================================= - -Standard_Boolean Transfer_TransferProcess::Unbind(const TheStart& start) -// const Standard_Integer categ) -{ - Handle(Transfer_Binder) former = FindAndMask(start);//,categ);skl - if (theindex == 0) return Standard_False; - if (former.IsNull()) return Standard_False; - if (former->DynamicType() == STANDARD_TYPE(Transfer_VoidBinder)) return Standard_True; - //const Interface_Check& ach = thelastbnd->Check(); - //Handle(Transfer_Binder) newbinder = thelastbnd->RemoveNext(categ);skl - //if (newbinder != thelastbnd)skl - themap(theindex) = thelastbnd;// = newbinder;skl - if(theroots.Contains(theindex)) { - TColStd_IndexedMapOfInteger aNewRoots; - for(Standard_Integer i = 1; i <= theroots.Extent(); i++) - if(theindex!= theroots.FindKey(i)) - aNewRoots.Add(theroots.FindKey(i)); - - theroots.Clear(); - theroots = aNewRoots; - } - - thelastobj.Nullify(); - thelastbnd.Nullify(); - theindex = 0; - return Standard_True; -} - - -//======================================================================= -//function : FindElseBind -//purpose : -//======================================================================= - -Handle(Transfer_Binder) Transfer_TransferProcess::FindElseBind(const TheStart& start) -// const Standard_Integer categ) -{ - Handle(Transfer_Binder) binder = FindAndMask (start);//,categ);skl - if (!binder.IsNull()) return binder; - binder = new Transfer_VoidBinder; - Bind(start,binder);//,categ);skl - return binder; -} - - -// ## ## ## Messages associes ## ## ## - -//======================================================================= -//function : SetMessenger -//purpose : -//======================================================================= - -void Transfer_TransferProcess::SetMessenger (const Handle(Message_Messenger)& messenger) -{ - if ( messenger.IsNull() ) - themessenger = Message::DefaultMessenger(); - else - themessenger = messenger; -} - -//======================================================================= -//function : Messenger -//purpose : -//======================================================================= - -Handle(Message_Messenger) Transfer_TransferProcess::Messenger () const -{ - return themessenger; -} - -//======================================================================= -//function : SetTraceLevel -//purpose : -//======================================================================= - -void Transfer_TransferProcess::SetTraceLevel (const Standard_Integer tracelev) -{ - thetrace = tracelev; -} - -//======================================================================= -//function : TraceLevel -//purpose : -//======================================================================= - -Standard_Integer Transfer_TransferProcess::TraceLevel () const -{ - return thetrace; -} - -//======================================================================= -//function : SendFail -//purpose : -//======================================================================= - -void Transfer_TransferProcess::SendFail(const TheStart& start, - const Message_Msg& amsg) -{ - AddFail(start,amsg); -} - - -//======================================================================= -//function : SendWarning -//purpose : -//======================================================================= - -void Transfer_TransferProcess::SendWarning(const TheStart& start, - const Message_Msg& amsg) -{ - AddWarning(start,amsg); -} - - -//======================================================================= -//function : SendMsg -//purpose : -//======================================================================= - -void Transfer_TransferProcess::SendMsg(const TheStart& start, - const Message_Msg& amsg) -{ - Handle(Transfer_Binder) binder = FindAndMask(start); - if (binder.IsNull()) { - binder = new Transfer_VoidBinder; - Bind (start,binder); - } - // Alimente la trace : Regle causant (user messages) - if (thetrace > 0) { - StartTrace (binder,start,thelevel,6); - Message_Messenger::StreamBuffer aSender = themessenger->SendInfo(); - aSender << amsg.Value(); - if (amsg.IsEdited()&&thetrace>2) - aSender << " [from: " << amsg.Original() << "]"; - aSender << std::endl; - } -} - - -//======================================================================= -//function : AddFail -//purpose : -//======================================================================= - -void Transfer_TransferProcess::AddFail(const TheStart& start, - const Standard_CString mess, - const Standard_CString orig) -{ - Handle(Transfer_Binder) binder = FindAndMask(start); - if (binder.IsNull()) { - binder = new Transfer_VoidBinder; - Bind (start,binder); - } - binder->AddFail (mess,orig); - if (thetrace > 0) { - StartTrace (binder,start,thelevel,1); - Message_Messenger::StreamBuffer aSender = themessenger->SendFail(); - aSender << " --> Fail : " << mess; - if (orig[0] != '\0'&&thetrace>2) aSender << " [from: " << orig << "]"; - aSender << std::endl; - } -} - - -//======================================================================= -//function : AddError -//purpose : -//======================================================================= - -void Transfer_TransferProcess::AddError(const TheStart& start, - const Standard_CString mess, - const Standard_CString orig) -{ - AddFail (start,mess,orig); -} - - -//======================================================================= -//function : AddFail -//purpose : -//======================================================================= - -void Transfer_TransferProcess::AddFail(const TheStart& start, - const Message_Msg& amsg) -{ - if (amsg.IsEdited()) AddFail (start,TCollection_AsciiString(amsg.Value()).ToCString(), - TCollection_AsciiString(amsg.Original()).ToCString()); - else AddFail (start,TCollection_AsciiString(amsg.Value()).ToCString()); -} - - -//======================================================================= -//function : AddWarning -//purpose : -//======================================================================= - -void Transfer_TransferProcess::AddWarning(const TheStart& start, - const Standard_CString mess, - const Standard_CString orig) -{ - Handle(Transfer_Binder) binder = FindAndMask(start); - if (binder.IsNull()) { - binder = new Transfer_VoidBinder; - Bind (start,binder); - } - binder->AddWarning(mess,orig); - if (thetrace > 1) { - StartTrace (binder,start,thelevel,2); - Message_Messenger::StreamBuffer aSender = themessenger->SendWarning(); - aSender << " --> Warning : " << mess; - if (orig[0] != '\0'&&thetrace>2) aSender << " [from: " << orig << "]"; - aSender << std::endl; - } -} - - -//======================================================================= -//function : AddWarning -//purpose : -//======================================================================= - -void Transfer_TransferProcess::AddWarning(const TheStart& start, - const Message_Msg& amsg) -{ - if (amsg.IsEdited()) AddWarning (start,TCollection_AsciiString(amsg.Value()).ToCString(), - TCollection_AsciiString(amsg.Original()).ToCString()); - else AddWarning (start,TCollection_AsciiString(amsg.Value()).ToCString()); -} - - -//======================================================================= -//function : Mend -//purpose : -//======================================================================= - -void Transfer_TransferProcess::Mend(const TheStart& start, - const Standard_CString pref) -{ - Handle(Transfer_Binder) binder = FindAndMask(start); - if (binder.IsNull()) return; // rien a faire ... - Handle(Interface_Check) ach = binder->CCheck(); - ach->Mend (pref); -} - - -//======================================================================= -//function : Check -//purpose : -//======================================================================= - -Handle(Interface_Check) Transfer_TransferProcess::Check(const TheStart& start) const -{ - const Handle(Transfer_Binder)& binder = Find(start); - if (binder.IsNull()) { - Handle(Interface_Check) check; - return check; - } - return binder->Check(); -} - -/*skl -void Transfer_TransferProcess::AddCaseName(const TheStart& start, - const Standard_CString casename) -{ - AddCaseValue (start, new TCollection_HAsciiString (casename)); -} - - -void Transfer_TransferProcess::AddCaseValue(const TheStart& start, - const Handle(Standard_Transient)& caseval) -{ - Handle(Transfer_Binder) binder = FindAndMask(start); - if (binder.IsNull()) { - binder = new Transfer_VoidBinder; - Bind (start,binder); - } - binder->AddCaseValue (caseval); -} - - -Handle(TColStd_HSequenceOfTransient) Transfer_TransferProcess::CaseList - (const TheStart& start) const -{ - Handle(TColStd_HSequenceOfTransient) list; - const Handle(Transfer_Binder)& binder = Find(start); - if (binder.IsNull()) return list; - return binder->CaseList(); -} - -Standard_Integer Transfer_TransferProcess::NextItemWithAttribute - (const Standard_CString name, const Standard_Integer num0) const -{ - Standard_Integer num, nb = NbMapped(); - for (num = num0+1; num <= nb; num ++) { - Handle(Transfer_Binder) bnd = MapItem (num); - if (bnd.IsNull()) continue; - if (!bnd->Attribute(name).IsNull()) return num; - } - return 0; -} - - -Interface_ParamType Transfer_TransferProcess::AttributeType - (const Standard_CString name) const -{ - Interface_ParamType aty, res = Interface_ParamVoid; - Standard_Integer num, nb = NbMapped(); - for (num = 1; num <= nb; num ++) { - Handle(Transfer_Binder) bnd = MapItem (num); - if (bnd.IsNull()) continue; - aty = bnd->AttributeType(name); - if (aty == Interface_ParamVoid) continue; - if (res == Interface_ParamVoid) res = aty; - else if (res != aty) return Interface_ParamMisc; - } - return res; -} - -Handle(Dico_DictionaryOfInteger) Transfer_TransferProcess::Attributes - (const Standard_CString rootname) const -{ - Handle(Dico_DictionaryOfInteger) list = new Dico_DictionaryOfInteger; - Standard_Integer num, nb = NbMapped(); - for (num = 1; num <= nb; num ++) { - Handle(Transfer_Binder) bnd = MapItem (num); - if (bnd.IsNull()) continue; - Handle(Dico_DictionaryOfTransient) atr = bnd->AttrList(); - if (atr.IsNull()) continue; - Dico_IteratorOfDictionaryOfTransient iatr(atr,rootname); - for (; iatr.More(); iatr.Next()) { - TCollection_AsciiString name = iatr.Name(); - Standard_Boolean deja; - Standard_Integer& nbval = list->NewItem (name.ToCString(),deja); - if (!deja) nbval = 0; - nbval ++; - } - - } - return list; -} -skl*/ - - -// ## ## ## Actions sur Types Privilegies ## ## ## -// ## ## ## (Transient) ## ## ## - -// Bind associe un objet a un objet resultat; or la Map associe un Objet a un -// Binder (qui designe son resultat) -// *Transient travaillent avec un SimpleBinderOfTransient -// si deja la, on considere son resultat -// sinon, on cree un Binder du bon type - - -//======================================================================= -//function : BindTransient -//purpose : -//======================================================================= - -void Transfer_TransferProcess::BindTransient(const TheStart& start, - const Handle(Standard_Transient)& res) -// const Standard_Integer categ) -{ - if (res.IsNull()) return; - Handle(Transfer_Binder) former = Find(start);//,categ);skl - Handle(Transfer_SimpleBinderOfTransient) binder = - Handle(Transfer_SimpleBinderOfTransient)::DownCast(former); -// Binding sur place ? - if (!binder.IsNull()) { - if (binder->Status() == Transfer_StatusVoid) { binder->SetResult(res); return; } - } -// Sinon, refaire - binder = new Transfer_SimpleBinderOfTransient; - binder->SetResult (res); - if (former.IsNull()) Bind(start,binder);//,categ);skl - else Rebind(start,binder);//,categ);skl -} - - -//======================================================================= -//function : FindTransient -//purpose : -//======================================================================= - -const Handle(Standard_Transient)& Transfer_TransferProcess::FindTransient - (const TheStart& start) const -{ - Handle(Transfer_SimpleBinderOfTransient) binder = - Handle(Transfer_SimpleBinderOfTransient)::DownCast(Find(start)); - if (binder.IsNull()) return nultrans; - if (!binder->HasResult()) return nultrans; - return binder->Result(); -} - - -// Binding Multiple : D abord le declarer par BindMultiple (si pas deja fait) -// Puis ajouter les termes par AddMultiple - -//======================================================================= -//function : BindMultiple -//purpose : -//======================================================================= - -void Transfer_TransferProcess::BindMultiple(const TheStart& start) -// const Standard_Integer categ) -{ - Handle(Transfer_Binder) binder = FindAndMask (start);//,categ);skl - if (!binder.IsNull()) { - if (!binder->IsKind(STANDARD_TYPE(Transfer_MultipleBinder))) { - StartTrace (thelastbnd,start,thelevel,4); - throw Transfer_TransferFailure("TransferProcess : BindMultiple"); - } - } - else Bind(start,new Transfer_MultipleBinder);//,categ);skl -} - - -//======================================================================= -//function : AddMultiple -//purpose : -//======================================================================= - -void Transfer_TransferProcess::AddMultiple(const TheStart& start, - const Handle(Standard_Transient)& res) -// const Standard_Integer categ) -{ - Handle(Transfer_Binder) binder = FindAndMask(start);//,categ);skl - Handle(Transfer_MultipleBinder) multr = - Handle(Transfer_MultipleBinder)::DownCast(binder); - if (multr.IsNull()) { - StartTrace (binder,start,thelevel,4); - if (binder.IsNull()) throw Transfer_TransferFailure("TransferProcess : AddMultiple, nothing bound"); - else throw Transfer_TransferFailure("TransferProcess : AddMultiple, Binder not a MultipleBinder"); - } - multr->AddResult(res); -} - - -//======================================================================= -//function : FindTypedTransient -//purpose : -//======================================================================= - -Standard_Boolean Transfer_TransferProcess::FindTypedTransient - (const TheStart& start, const Handle(Standard_Type)& atype, - Handle(Standard_Transient)& val) const -{ - return GetTypedTransient (Find(start),atype,val); -} - - -//======================================================================= -//function : GetTypedTransient -//purpose : -//======================================================================= - -Standard_Boolean Transfer_TransferProcess::GetTypedTransient - (const Handle(Transfer_Binder)& binder, const Handle(Standard_Type)& atype, - Handle(Standard_Transient)& val) const -{ - return Transfer_SimpleBinderOfTransient::GetTypedResult(binder,atype,val); -} - - -// ## ## ## ## ## Acces Atomique ## ## ## ## ## -// (ne gere pas le scope mais donne acces aux categories) - -//======================================================================= -//function : NbMapped -//purpose : -//======================================================================= - -Standard_Integer Transfer_TransferProcess::NbMapped () const -{ - return themap.Extent(); -} - - -//======================================================================= -//function : Mapped -//purpose : -//======================================================================= - -const TheStart& Transfer_TransferProcess::Mapped(const Standard_Integer num) const -{ - return themap.FindKey(num); -} - - -//======================================================================= -//function : MapIndex -//purpose : -//======================================================================= - -Standard_Integer Transfer_TransferProcess::MapIndex(const TheStart& start) const -{ - return themap.FindIndex(start); -} - - -//======================================================================= -//function : MapItem -//purpose : -//======================================================================= - -Handle(Transfer_Binder) Transfer_TransferProcess::MapItem(const Standard_Integer num) const -// const Standard_Integer categ) const -{ - Handle(Transfer_Binder) binder = themap.FindFromIndex(num); - //sklif (binder.IsNull()) - return binder; - //sklreturn binder->Search (categ); -} - - -// ######################################################################## -// .... ROOT MANAGEMENT .... - -//======================================================================= -//function : SetRoot -//purpose : -//======================================================================= - -void Transfer_TransferProcess::SetRoot (const TheStart& start) -{ - Standard_Integer index = MapIndex(start); - if (index == 0) { - //StartTrace (thelastbnd,start,thelevel,4); - //throw Transfer_TransferFailure("TransferProcess : SetRoot"); - return; - } - - theroots.Add(index); - if (thetrace > 2) StartTrace (MapItem(index),start,thelevel,3); -} - - -//======================================================================= -//function : SetRootManagement -//purpose : -//======================================================================= - -void Transfer_TransferProcess::SetRootManagement(const Standard_Boolean stat) -{ - therootm = stat; -} - - -//======================================================================= -//function : NbRoots -//purpose : -//======================================================================= - -Standard_Integer Transfer_TransferProcess::NbRoots () const -{ - return theroots.Extent(); -} - - -//======================================================================= -//function : Root -//purpose : -//======================================================================= - -const TheStart& Transfer_TransferProcess::Root(const Standard_Integer num) const -{ - Standard_Integer ind = 0; - if (num > 0 && num <= theroots.Extent()) ind = theroots.FindKey(num); - return themap.FindKey (ind); -} - - -//======================================================================= -//function : RootItem -//purpose : -//======================================================================= - -Handle(Transfer_Binder) Transfer_TransferProcess::RootItem(const Standard_Integer num) const -// const Standard_Integer categ) const -{ - Standard_Integer ind = 0; - if (num > 0 && num <= theroots.Extent()) ind = theroots.FindKey(num); - return themap.FindFromIndex(ind);//->Search(categ);skl -} - - -//======================================================================= -//function : RootIndex -//purpose : -//======================================================================= - -Standard_Integer Transfer_TransferProcess::RootIndex(const TheStart& start) const -{ - Standard_Integer index = MapIndex(start); - if (index == 0) return 0; - return theroots.FindIndex(index); -} - - -//======================================================================= -//function : NestingLevel -//purpose : -//======================================================================= - -Standard_Integer Transfer_TransferProcess::NestingLevel () const -{ - return thelevel; -} - - -//======================================================================= -//function : ResetNestingLevel -//purpose : -//======================================================================= - -void Transfer_TransferProcess::ResetNestingLevel () -{ - thelevel = 0; -} - - -// ######################################################################## -// .... SCOPE MANAGEMENT .... - - -//====================================================================== -//Purpose : gka TRJ9 for writing SDR for solid -// Check if binder has already been bound to the result binder. -//====================================================================== - -// static Standard_Boolean Contains(const Handle(Transfer_Binder)& resbinder, -// const Handle(Transfer_Binder)& addbinder) -// { -// Handle(Transfer_Binder) tmpbind = resbinder; -// for ( ; ! tmpbind.IsNull(); tmpbind = tmpbind->NextResult() ) -// if ( tmpbind == addbinder ) return Standard_True; -// return Standard_False; -// } - -// ######################################################################## -// .... AUTOMATISMES DE TRANSFERT .... - -// ## ## ## ## ## Fonctions de Base ## ## ## ## ## - - -//======================================================================= -//function : Recognize -//purpose : -//======================================================================= - -Standard_Boolean Transfer_TransferProcess::Recognize(const TheStart& start) const -{ - Handle(Transfer_Actor) actor = theactor; - // On balaie les Next jusqu a avoir un Resultat - while (!actor.IsNull()) { - if (actor->Recognize (start)) return Standard_True; - actor = actor->Next(); - } - return Standard_False; -} - - -//======================================================================= -//function : Transferring -//purpose : -//======================================================================= - -Handle(Transfer_Binder) Transfer_TransferProcess::Transferring(const TheStart& start, - const Message_ProgressRange& theProgress) -{ - // Map deja alimentee ? - Handle(Transfer_Binder) former = FindAndMask(start); - - // .... Transfert deja effectue avec Resultat ? .... - - // On considere que cette nouvelle demande de Transfert correspond donc a une - // utilisation en plus : noter "AlreadyUsed", donc resultat non modifiable - if (!former.IsNull()) { - if (former->HasResult()) { - former->SetAlreadyUsed(); - return former; - } - //} - - // .... Etat Initial : peut-etre deja fait ... ou infaisable ! - - Message_Messenger::StreamBuffer aSender = themessenger->SendInfo(); - //if (!former.IsNull()) { - Transfer_StatusExec statex = former->StatusExec(); - switch (statex) { - case Transfer_StatusInitial : // Transfert prepare a faire - break; - case Transfer_StatusDone : // Transfert deja fait -//#ifdef TRANSLOG - aSender << " .. and Transfer done" << std::endl; -//#endif -// if (former->HasResult()) former->SetAlreadyUsed(); - return former; - case Transfer_StatusRun : // ca y est, on boucle - former->SetStatusExec(Transfer_StatusLoop); - return former; - case Transfer_StatusError : // pas propre, ca ... - if (thetrace) { - aSender << " *** Transfer in Error Status :" << std::endl; - StartTrace (former, start, thelevel,0); -// (*themessenger->Out()) << flush; - } - else StartTrace (former, start,thelevel,4); - throw Transfer_TransferFailure("TransferProcess : Transfer in Error Status"); - case Transfer_StatusLoop : // la boucle est bouclee ... - if (thetrace) { - aSender << " *** Transfer Head of Dead Loop :" << std::endl; - StartTrace (former, start, thelevel,0); -// (*themessenger->Out()) << flush; - } - else StartTrace (former, start,thelevel,4); - throw Transfer_TransferDeadLoop("TransferProcess : Transfer at Head of a Dead Loop"); - } -#ifdef TRANSLOG - std::cout << "Transfer,level "<SetStatusExec(Transfer_StatusRun); - } -#ifdef TRANSLOG - std::cout << " GO .." << std::endl; -#endif - - Handle(Transfer_Binder) binder; - Standard_Boolean newbind = Standard_False; - if (theerrh) { - Message_Messenger::StreamBuffer aSender = themessenger->SendInfo(); - - // Transfert sous protection pour les exceptions (pour notification en fait) - Standard_Integer oldlev = thelevel; - try { - OCC_CATCH_SIGNALS - binder = TransferProduct(start, theProgress); - } - - // ... Exceptions a Rattraper : elles ne se ressemblent pas toutes ... ! - catch (Transfer_TransferDeadLoop const&) { - if (binder.IsNull()) { - aSender << " *** Dead Loop with no Result" << std::endl; - if (thetrace) StartTrace (binder, start, thelevel-1,0); - binder = new Transfer_VoidBinder; - Bind (start,binder); newbind = Standard_True; - } else if (binder->StatusExec() == Transfer_StatusLoop) { - if (thetrace) { - aSender << " *** Dead Loop : Finding head of Loop :" << std::endl; - StartTrace (binder, start, thelevel-1,0); - } - else StartTrace (binder, start,thelevel-1,4); - throw Transfer_TransferFailure("TransferProcess : Head of Dead Loop"); -// Autrement dit, on change d exception (on est sorti de la boucle) - } else { - if (thetrace) { - aSender << " *** Dead Loop : Actor in Loop :" << std::endl; - StartTrace (binder, start, thelevel-1,0); - } - } - binder->AddFail("Transfer in dead Loop"); - thelevel = oldlev; - } - catch (Standard_Failure const& anException) { - if (binder.IsNull()) { - aSender << " *** Exception Raised with no Result" << std::endl; - binder = new Transfer_VoidBinder; - Bind (start,binder); newbind = Standard_True; - } - binder->AddFail("Transfer stopped by exception raising"); - if (thetrace) { - aSender << " *** Raised : " << anException.GetMessageString() << std::endl; - StartTrace (binder, start, thelevel-1,4); - } - thelevel = oldlev; - } - } - -// Transfert non protege (ainsi, dbx a la main en cas de plantage par Raise) - else binder = TransferProduct(start, theProgress); - - if (theProgress.UserBreak()) - return Handle(Transfer_Binder)(); - -// .... Conclusion : Noter dans la Map .... - - if (!newbind && !binder.IsNull()) { - if (former.IsNull()) { -// Peut-etre a fait lui meme Bind ... verifier sinon le faire - if (!IsBound(start)) Bind(start,binder); // resultat = categorie 0 - else { // gka TRJ9 for writing SDR for solid -// Handle(Transfer_Binder) tmpbind = Find(start); -// if(!Contains(binder,tmpbind)) -// binder->AddResult(tmpbind); - Rebind(start,binder); // test_pattern.sat - } - } - else Rebind(start,binder); -// (du coup, vaut ) -#ifdef TRANSLOG - std::cout << " ... OK" << std::endl; -#endif - } - else { - //= by ABV: 5 Oct 97: nothing generated, but former can be in run state - drop it - //= ASK: may be set it to StatusInitial ? - if ( ! former.IsNull() ) former->SetStatusExec ( Transfer_StatusDone ); //+ - return nulbinder; // Binder Null ... que faire d autre ? - } - -// .... Gerer les Racines (si prevu) .... - - if (therootl >= thelevel) { - therootl = 0; - if (therootm && binder->Status() != Transfer_StatusVoid) { - SetRoot (start); - } - } - return thelastbnd; -} - -// ## ## TransferProduct : Action proprement dite ## ## - - Handle(Transfer_Binder) Transfer_TransferProcess::TransferProduct - (const TheStart& start, - const Message_ProgressRange& theProgress) -{ - thelevel ++; // si decremente et == 0, transfert racine - Handle(Transfer_Binder) binder; - Handle(Transfer_Actor) actor = theactor; - -// On balaie les Next jusqu a avoir un Resultat - Message_ProgressScope aScope (theProgress, NULL, 1, true); - while (!actor.IsNull()) { - if (actor->Recognize (start)) binder = actor->Transferring(start,this, aScope.Next()); - else binder.Nullify(); - if (!binder.IsNull()) break; - actor = actor->Next(); - } - if (aScope.UserBreak()) - return Handle(Transfer_Binder)(); - - if (binder.IsNull()) { -// if (thetrace) { -// aSender << "Transfer has produced no Result" < 0) thelevel --; - return binder; - } -// Gestion du niveau racine (.. a regarder de pres ..) - if (therootl == 0 && binder->StatusExec() == Transfer_StatusDone) - therootl = thelevel - 1; - - if (thelevel > 0) thelevel --; - return binder; -} - - -//======================================================================= -//function : Transfer -//purpose : -//======================================================================= - -Standard_Boolean Transfer_TransferProcess::Transfer(const TheStart& start, - const Message_ProgressRange& theProgress) -{ - Handle(Transfer_Binder) binder = Transferring(start, theProgress); - return (!binder.IsNull()); -} - - -// ######################################################################### -// .... Error Handling + Trace .... - -// trace : 1 pour Fail et Exception , 2 pour Root et Warning - - -//======================================================================= -//function : SetErrorHandle -//purpose : -//======================================================================= - -void Transfer_TransferProcess::SetErrorHandle(const Standard_Boolean err) -{ - theerrh = err; -} // traite par Transferring - - -//======================================================================= -//function : ErrorHandle -//purpose : -//======================================================================= - -Standard_Boolean Transfer_TransferProcess::ErrorHandle() const -{ - return theerrh; -} - -//======================================================================= -//function : StartTrace -//purpose : -//======================================================================= - -void Transfer_TransferProcess::StartTrace(const Handle(Transfer_Binder)& binder, - const TheStart& start, - const Standard_Integer level, - const Standard_Integer mode) const -{ - Message_Messenger::StreamBuffer aSender = themessenger->SendInfo(); - // ### Fail (Roots:50) -- Start start->DynamicType() - // ### Fail (Roots:50) -- Start id:#label.. Type:start->DynamicType() - if (thetrace > 3) { // Internal to be switch when searching bug (trace >= 4) - if (mode == 1) aSender << " ### Fail"; - if (mode == 2) aSender << " ### Warning"; - if (mode == 3) aSender << " ### New Root n0 " << theroots.Extent(); - if (mode == 4) aSender << " ### Exception"; - if (mode == 5) aSender << " ### Substitution"; - if (mode == 6) aSender << " ### Information"; - if (level > 1) - aSender << " (nested)"; // " at nesting Level:"<= 0 && mode != 3) - aSender << " at " << theroots.Extent() << " Roots"; - } - if (!start.IsNull()) PrintTrace (start,aSender); -//// sout << endl; - - if (!binder.IsNull()) { // old: if IsNull sout <Status() != Transfer_StatusVoid) { -// --- Result Type: binder->ResultType() --- Binder : binder->DynamicType(); - if (!hasres) - aSender << "\n --- Result Type : "; - else - aSender << " , "; - aSender << bnd->ResultTypeName(); -// CKY 9-JAN-1999: waiting for XSTEP Kernel message (not IGES_2075) -/* Message_Msg Msg2075("IGES_2075"); - Msg2075.AddString(bnd->ResultTypeName()); - Msg2075.TraceEver(); */ - hasres = Standard_True; - } - bnd = bnd->NextResult(); - } - if (!hasres && mode > 2) { - aSender << "\n --- No Result recorded"; -// CKY 9-JAN-1999 : waiting for XSTEP Kernel message -// (not IGES_2075, no reference to specifically TopoDS_Shape) -/* Message_Msg Msg2075("IGES_2075"); - Msg2075.AddString("No TopoDS_Shape"); - Msg2075.TraceEver(); */ - } -//old if (isused) sout << " -- (Already Used in another Transfer)"; - } - aSender << std::endl; -} - - -//======================================================================= -//function : PrintTrace -//purpose : -//======================================================================= - -void Transfer_TransferProcess::PrintTrace(const TheStart& start, Standard_OStream& S) const -{ - if (!start.IsNull()) S <<" Type:" << start->DynamicType()->Name(); -} - - -//======================================================================= -//function : IsLooping -//purpose : -//======================================================================= - -Standard_Boolean Transfer_TransferProcess::IsLooping - (const Standard_Integer alevel) const - { return alevel > NbMapped(); } - - - -// ######################################################################### -// .... RESULTATS .... - - -// ## ## RootResult : Les Racines ## ## - - -//======================================================================= -//function : RootResult -//purpose : -//======================================================================= - -Transfer_Iterator Transfer_TransferProcess::RootResult(const Standard_Boolean withstart) const -{ - Transfer_Iterator iter(withstart); - Standard_Integer max = theroots.Extent(); - for (Standard_Integer j = 1; j <= max; j ++) { - Standard_Integer i = theroots.FindKey(j); - Handle(Transfer_Binder) binder = MapItem(i); - if (binder.IsNull()) continue; - if (withstart) iter.Add (binder,Mapped(i)); - else iter.Add (binder); - } - return iter; -} - - -// ## ## CompleteResult : Tous les Resultats ## ## - -//======================================================================= -//function : CompleteResult -//purpose : -//======================================================================= - -Transfer_Iterator Transfer_TransferProcess::CompleteResult - (const Standard_Boolean withstart) const -{ - Transfer_Iterator iter(withstart); - Standard_Integer max = NbMapped(); - for (Standard_Integer i = 1; i <= max; i ++) { - Handle(Transfer_Binder) binder = MapItem(i); - if (binder.IsNull()) continue; - if (withstart) iter.Add (binder,Mapped(i)); - else iter.Add (binder); - } - return iter; -} - - -// ## ## AbnormalResult : Transferts a probleme ## ## -//======================================================================= -//function : AbnormalResult -//purpose : -//======================================================================= - -Transfer_Iterator Transfer_TransferProcess::AbnormalResult() const -{ - Transfer_Iterator iter(Standard_True); - Standard_Integer max = NbMapped(); - for (Standard_Integer i = 1; i <= max; i ++) { - Handle(Transfer_Binder) binder = MapItem(i); - if (binder.IsNull()) continue; - Transfer_StatusExec statex = binder->StatusExec(); - if (statex != Transfer_StatusInitial && statex != Transfer_StatusDone) - iter.Add (binder,Mapped(i)); // on note les cas "pas normaux" - } - return iter; -} - - -// ## ## ## CheckList : les messages ## ## ## -//======================================================================= -//function : CheckList -//purpose : -//======================================================================= - -Interface_CheckIterator Transfer_TransferProcess::CheckList - (const Standard_Boolean erronly) const -{ - Interface_CheckIterator list; - Standard_Integer num, max = NbMapped(); - for (Standard_Integer i = 1; i <= max; i ++) { - Handle(Transfer_Binder) binder = MapItem(i); - if (binder.IsNull()) continue; - Transfer_StatusExec statex = binder->StatusExec(); - Handle(Interface_Check) check = binder->Check(); - if (statex != Transfer_StatusInitial && statex != Transfer_StatusDone && - !check->HasFailed()) - check->AddFail("Transfer in Abnormal Status (!= Initial or Done)"); - if (!check->HasFailed() && (erronly || check->NbWarnings() == 0)) continue; - const TheStart& ent = Mapped(i); - num = CheckNum(ent); - if (num == 0) num = i; - check->SetEntity(ent); - list.Add(check,num); - } - return list; -} - - -// ######################################################################### -// .... RESULTATS PAR ENTITE .... - -//======================================================================= -//function : ResultOne -//purpose : -//======================================================================= - -Transfer_Iterator Transfer_TransferProcess::ResultOne(const TheStart& start, - const Standard_Integer level, - const Standard_Boolean withstart) const -{ - Transfer_Iterator iter(withstart); - Standard_Integer max = NbMapped(); - Standard_Integer ind = MapIndex (start); - if (ind == 0) return iter; - Standard_Integer i1 = (level == 0 ? ind : 1); - Standard_Integer i2 = (level == 0 ? ind : max); - Handle(TColStd_HArray1OfInteger) map = new TColStd_HArray1OfInteger (i1,i2,0); - //MarkScoped (ind,level,map); - - for (Standard_Integer i = i1; i <= i2; i ++) { - ind = map->Value(i); - if (ind == 0) continue; - Handle(Transfer_Binder) binder = MapItem(i); - if (binder.IsNull()) continue; - if (withstart) iter.Add (binder,Mapped(ind)); - else iter.Add (binder); - } - return iter; -} - - -//======================================================================= -//function : CheckListOne -//purpose : -//======================================================================= - -Interface_CheckIterator Transfer_TransferProcess::CheckListOne - (const TheStart& start,const Standard_Integer level, - const Standard_Boolean erronly) const -{ - Interface_CheckIterator list; - Standard_Integer max = NbMapped(); - Standard_Integer num, ind = MapIndex (start); - if (ind == 0) return list; - Standard_Integer i1 = (level == 0 ? ind : 1); - Standard_Integer i2 = (level == 0 ? ind : max); - Handle(TColStd_HArray1OfInteger) map = new TColStd_HArray1OfInteger (i1,i2,0); - //MarkScoped (ind,level,map); - - for (Standard_Integer i = i1; i <= i2; i ++) { - ind = map->Value(i); - if (ind == 0) continue; - Handle(Transfer_Binder) binder = MapItem(ind); - if (binder.IsNull()) continue; - Transfer_StatusExec statex = binder->StatusExec(); - Handle(Interface_Check) check = binder->Check(); - if (statex != Transfer_StatusInitial && statex != Transfer_StatusDone && - !check->HasFailed()) - check->AddFail("Transfer in Abnormal Status (!= Initial or Done)"); - if (!check->HasFailed() && (erronly || check->NbWarnings() == 0)) continue; - const TheStart& ent = Mapped(ind); - num = CheckNum(ent); if (num == 0) num = ind; - check->SetEntity(ent); - list.Add(check,num); - } - return list; -} - - -//======================================================================= -//function : IsCheckListEmpty -//purpose : -//======================================================================= - -Standard_Boolean Transfer_TransferProcess::IsCheckListEmpty - (const TheStart& start, const Standard_Integer level, - const Standard_Boolean erronly) const -{ - Standard_Integer max = NbMapped(); - Standard_Integer ind = MapIndex (start); - if (ind == 0) return Standard_False; - Standard_Integer i1 = (level == 0 ? ind : 1); - Standard_Integer i2 = (level == 0 ? ind : max); - Handle(TColStd_HArray1OfInteger) map = new TColStd_HArray1OfInteger (i1,i2,0); -// MarkScoped (ind,level,map); - - for (Standard_Integer i = i1; i <= i2; i ++) { - ind = map->Value(i); - if (ind == 0) continue; - Handle(Transfer_Binder) binder = MapItem(ind); - if (binder.IsNull()) continue; - - Transfer_StatusExec statex = binder->StatusExec(); - Handle(Interface_Check) check = binder->Check(); - if (statex != Transfer_StatusInitial && statex != Transfer_StatusDone) - return Standard_False; - if (check->HasFailed() || (!erronly && check->NbWarnings() > 0)) return Standard_False; - } - return Standard_True; -} - - -//======================================================================= -//function : RemoveResult -//purpose : -//======================================================================= - -void Transfer_TransferProcess::RemoveResult(const TheStart& start, - const Standard_Integer level, - const Standard_Boolean /*compute*/) -{ - //if (compute) ComputeScopes(); - Standard_Integer max = NbMapped(); - Standard_Integer ind = MapIndex (start); - if (ind == 0) return; - Standard_Integer i1 = (level == 0 ? ind : 1); - Standard_Integer i2 = (level == 0 ? ind : max); - Handle(TColStd_HArray1OfInteger) map = new TColStd_HArray1OfInteger (i1,i2,0); -// MarkScoped (ind,level,map); - - Standard_Integer i; // svv Jan11 2000 : porting on DEC - for (i = i1; i <= i2; i ++) { - ind = map->Value(i); - if (ind == 0) continue; - Handle(Transfer_Binder) binder = MapItem(ind); - if (binder.IsNull()) continue; -// Standard_Boolean cayest = binder->SetNbUserScopes (-1); -// if (cayest) themap(ind) = nulbinder; // RAZ ! - } - -//pdn commented for (i = NbRoots(); i > 0; i --) -// if (theroots.Value(i) == ind) theroots.Remove(i); -} - - -Standard_Integer Transfer_TransferProcess::CheckNum(const TheStart& ) const -{ - return 0; -} - diff --git a/src/Transfer/Transfer_TransientMapper.hxx b/src/Transfer/Transfer_TransientMapper.hxx index 0910523fc5..acd99d2b7a 100644 --- a/src/Transfer/Transfer_TransientMapper.hxx +++ b/src/Transfer/Transfer_TransientMapper.hxx @@ -21,7 +21,6 @@ #include #include -#include class Standard_Transient; class Transfer_DataInfo; class Transfer_Finder; diff --git a/src/Transfer/Transfer_TransientMapper_0.cxx b/src/Transfer/Transfer_TransientMapper_0.cxx index c323d31bd0..6b0f6436f8 100644 --- a/src/Transfer/Transfer_TransientMapper_0.cxx +++ b/src/Transfer/Transfer_TransientMapper_0.cxx @@ -17,28 +17,57 @@ #include #include - #include #include #include - - - - - - +//======================================================================= +//function : Transfer_TransientMapper +//purpose : +//======================================================================= +Transfer_TransientMapper::Transfer_TransientMapper(const Handle(Standard_Transient)& akey) + : theval(akey) +{ + SetHashCode(std::hash{}(akey)); +} +//======================================================================= +//function : Value +//purpose : +//======================================================================= +const Handle(Standard_Transient)& Transfer_TransientMapper::Value() const +{ + return theval; +} +//======================================================================= +//function : Equates +//purpose : +//======================================================================= +Standard_Boolean Transfer_TransientMapper::Equates +(const Handle(Transfer_Finder)& other) const +{ + if (other.IsNull()) return Standard_False; + if (GetHashCode() != other->GetHashCode()) return Standard_False; + if (other->DynamicType() != DynamicType()) return Standard_False; + Handle(Transfer_TransientMapper) another = Handle(Transfer_TransientMapper)::DownCast(other); + return theval == another->Value(); +} -#define TheKey Handle(Standard_Transient) -#define TheKey_hxx -#define TheHasher TColStd_MapTransientHasher -#define TheHasher_hxx -#define TheInfo Transfer_DataInfo -#define TheInfo_hxx -#define Transfer_Mapper Transfer_TransientMapper -#define Transfer_Mapper_hxx -#define Handle_Transfer_Mapper Handle(Transfer_TransientMapper) -#include +//======================================================================= +//function : ValueType +//purpose : +//======================================================================= +Handle(Standard_Type) Transfer_TransientMapper::ValueType() const +{ + return Transfer_DataInfo::Type(theval); +} +//======================================================================= +//function : ValueTypeName +//purpose : +//======================================================================= +Standard_CString Transfer_TransientMapper::ValueTypeName() const +{ + return Transfer_DataInfo::TypeName(theval); +} diff --git a/src/TransferBRep/FILES b/src/TransferBRep/FILES index 039db07c1d..9a470b5a4f 100644 --- a/src/TransferBRep/FILES +++ b/src/TransferBRep/FILES @@ -3,8 +3,6 @@ TransferBRep.hxx TransferBRep_BinderOfShape.cxx TransferBRep_BinderOfShape.hxx TransferBRep_HSequenceOfTransferResultInfo.hxx -TransferBRep_OrientedShapeMapper.hxx -TransferBRep_OrientedShapeMapper_0.cxx TransferBRep_Reader.cxx TransferBRep_Reader.hxx TransferBRep_SequenceOfTransferResultInfo.hxx diff --git a/src/TransferBRep/TransferBRep_OrientedShapeMapper.hxx b/src/TransferBRep/TransferBRep_OrientedShapeMapper.hxx deleted file mode 100644 index 03f5b220ad..0000000000 --- a/src/TransferBRep/TransferBRep_OrientedShapeMapper.hxx +++ /dev/null @@ -1,89 +0,0 @@ -// Created on: 1994-10-03 -// Created by: Christian CAILLET -// 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 _TransferBRep_OrientedShapeMapper_HeaderFile -#define _TransferBRep_OrientedShapeMapper_HeaderFile - -#include -#include - -#include -#include -#include -#include -#include -class TopoDS_Shape; -class TopTools_OrientedShapeMapHasher; -class TransferBRep_ShapeInfo; -class Transfer_Finder; - - -class TransferBRep_OrientedShapeMapper; -DEFINE_STANDARD_HANDLE(TransferBRep_OrientedShapeMapper, Transfer_Finder) - - -class TransferBRep_OrientedShapeMapper : public Transfer_Finder -{ - -public: - - - //! Creates a Mapper with a Value. This Value can then not be - //! changed. It is used by the Hasher to compute the HashCode, - //! which will then be stored for an immediate reading. - Standard_EXPORT TransferBRep_OrientedShapeMapper(const TopoDS_Shape& akey); - - //! Returns the contained value - Standard_EXPORT const TopoDS_Shape& Value() const; - - //! Specific testof equality : defined as False if has - //! not the same true Type, else contents are compared (by - //! C++ operator ==) - Standard_EXPORT Standard_Boolean Equates (const Handle(Transfer_Finder)& other) const Standard_OVERRIDE; - - //! Returns the Type of the Value. By default, returns the - //! DynamicType of , but can be redefined - Standard_EXPORT virtual Handle(Standard_Type) ValueType() const Standard_OVERRIDE; - - //! Returns the name of the Type of the Value. Default is name - //! of ValueType, unless it is for a non-handled object - Standard_EXPORT virtual Standard_CString ValueTypeName() const Standard_OVERRIDE; - - - - - DEFINE_STANDARD_RTTI_INLINE(TransferBRep_OrientedShapeMapper,Transfer_Finder) - -protected: - - - - -private: - - - TopoDS_Shape theval; - - -}; - - - - - - - -#endif // _TransferBRep_OrientedShapeMapper_HeaderFile diff --git a/src/TransferBRep/TransferBRep_OrientedShapeMapper_0.cxx b/src/TransferBRep/TransferBRep_OrientedShapeMapper_0.cxx deleted file mode 100644 index 84cb6c24d0..0000000000 --- a/src/TransferBRep/TransferBRep_OrientedShapeMapper_0.cxx +++ /dev/null @@ -1,45 +0,0 @@ -// Created on: 1994-10-03 -// Created by: Christian CAILLET -// Copyright (c) 1994-1999 Matra Datavision -// Copyright (c) 1999-2014 OPEN CASCADE SAS -// -// This file is part of Open CASCADE Technology software library. -// -// This library is free software; you can redistribute it and/or modify it under -// the terms of the GNU Lesser General Public License version 2.1 as published -// by the Free Software Foundation, with special exception defined in the file -// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT -// distribution for complete text of the license and disclaimer of any warranty. -// -// Alternatively, this file may be used under the terms of Open CASCADE -// commercial license or contractual agreement. - -#include - -#include - -#include -#include -#include -#include - - - - - - - - - - -#define TheKey TopoDS_Shape -#define TheKey_hxx -#define TheHasher TopTools_OrientedShapeMapHasher -#define TheHasher_hxx -#define TheInfo TransferBRep_ShapeInfo -#define TheInfo_hxx -#define Transfer_Mapper TransferBRep_OrientedShapeMapper -#define Transfer_Mapper_hxx -#define Handle_Transfer_Mapper Handle(TransferBRep_OrientedShapeMapper) -#include - diff --git a/src/TransferBRep/TransferBRep_ShapeMapper_0.cxx b/src/TransferBRep/TransferBRep_ShapeMapper_0.cxx index a7e4c00609..2174ee8fde 100644 --- a/src/TransferBRep/TransferBRep_ShapeMapper_0.cxx +++ b/src/TransferBRep/TransferBRep_ShapeMapper_0.cxx @@ -23,23 +23,52 @@ #include #include - +//======================================================================= +//function : TransferBRep_ShapeMapper +//purpose : +//======================================================================= +TransferBRep_ShapeMapper::TransferBRep_ShapeMapper(const TopoDS_Shape& akey) + : theval(akey) +{ + SetHashCode(TopTools_ShapeMapHasher{}(akey)); +} +//======================================================================= +//function : Value +//purpose : +//======================================================================= +const TopoDS_Shape& TransferBRep_ShapeMapper::Value() const +{ + return theval; +} +//======================================================================= +//function : Equates +//purpose : +//======================================================================= +Standard_Boolean TransferBRep_ShapeMapper::Equates(const Handle(Transfer_Finder)& other) const +{ + if (other.IsNull()) return Standard_False; + if (GetHashCode() != other->GetHashCode()) return Standard_False; + if (other->DynamicType() != DynamicType()) return Standard_False; + Handle(TransferBRep_ShapeMapper) another = Handle(TransferBRep_ShapeMapper)::DownCast(other); + return TopTools_ShapeMapHasher{}(theval, another->Value()); +} +//======================================================================= +//function : ValueType +//purpose : +//======================================================================= +Handle(Standard_Type) TransferBRep_ShapeMapper::ValueType() const +{ + return TransferBRep_ShapeInfo::Type(theval); +} - - - - -#define TheKey TopoDS_Shape -#define TheKey_hxx -#define TheHasher TopTools_ShapeMapHasher -#define TheHasher_hxx -#define TheInfo TransferBRep_ShapeInfo -#define TheInfo_hxx -#define Transfer_Mapper TransferBRep_ShapeMapper -#define Transfer_Mapper_hxx -#define Handle_Transfer_Mapper Handle(TransferBRep_ShapeMapper) -#include - +//======================================================================= +//function : ValueTypeName +//purpose : +//======================================================================= +Standard_CString TransferBRep_ShapeMapper::ValueTypeName() const +{ + return TransferBRep_ShapeInfo::TypeName(theval); +} diff --git a/src/V3d/V3d_View.cxx b/src/V3d/V3d_View.cxx index 8497cfc596..7658ea7984 100644 --- a/src/V3d/V3d_View.cxx +++ b/src/V3d/V3d_View.cxx @@ -3801,7 +3801,7 @@ void V3d_View::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth OCCT_DUMP_FIELD_VALUE_POINTER (theOStream, MyViewer) for (V3d_ListOfLight::Iterator anIterator (myActiveLights); anIterator.More(); anIterator.Next()) { - class Handle(Graphic3d_CLight)& anActiveLight = anIterator.Value(); + class Handle(Graphic3d_CLight)& anActiveLight = anIterator.ChangeValue(); OCCT_DUMP_FIELD_VALUE_POINTER (theOStream, anActiveLight) } OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &myDefaultViewAxis) diff --git a/src/ViewerTest/ViewerTest_DoubleMapOfInteractiveAndName.hxx b/src/ViewerTest/ViewerTest_DoubleMapOfInteractiveAndName.hxx index 44522f932b..d04acedc47 100644 --- a/src/ViewerTest/ViewerTest_DoubleMapOfInteractiveAndName.hxx +++ b/src/ViewerTest/ViewerTest_DoubleMapOfInteractiveAndName.hxx @@ -19,11 +19,10 @@ #include #include -#include #include class AIS_InteractiveObject; -typedef NCollection_DoubleMap ViewerTest_DoubleMapOfInteractiveAndName; -typedef NCollection_DoubleMap::Iterator ViewerTest_DoubleMapIteratorOfDoubleMapOfInteractiveAndName; +typedef NCollection_DoubleMap ViewerTest_DoubleMapOfInteractiveAndName; +typedef NCollection_DoubleMap::Iterator ViewerTest_DoubleMapIteratorOfDoubleMapOfInteractiveAndName; #endif diff --git a/src/ViewerTest/ViewerTest_ViewerCommands.cxx b/src/ViewerTest/ViewerTest_ViewerCommands.cxx index 83a3fbabc7..2124453e20 100644 --- a/src/ViewerTest/ViewerTest_ViewerCommands.cxx +++ b/src/ViewerTest/ViewerTest_ViewerCommands.cxx @@ -153,26 +153,33 @@ static TCollection_AsciiString getModuleCanvasId() } #endif -static Handle(ViewerTest_Window)& VT_GetWindow() +namespace { - static Handle(ViewerTest_Window) aWindow; - return aWindow; -} + static Handle(ViewerTest_Window)& VT_GetWindow() + { + static Handle(ViewerTest_Window) aWindow; + return aWindow; + } -static Handle(Aspect_DisplayConnection)& GetDisplayConnection() -{ - static Handle(Aspect_DisplayConnection) aDisplayConnection; - return aDisplayConnection; -} + static Handle(Aspect_DisplayConnection)& GetDisplayConnection() + { + static Handle(Aspect_DisplayConnection) aDisplayConnection; + return aDisplayConnection; + } -static void SetDisplayConnection (const Handle(Aspect_DisplayConnection)& theDisplayConnection) -{ - GetDisplayConnection() = theDisplayConnection; -} + using ViewerTest_ViewerCommandsViewMap = NCollection_DoubleMap ; + using ViewerTest_ViewerCommandsInteractiveContextMap = NCollection_DoubleMap ; + using ViewerTest_ViewerCommandsGraphicDriverMap = NCollection_DoubleMap ; -NCollection_DoubleMap ViewerTest_myViews; -static NCollection_DoubleMap ViewerTest_myContexts; -static NCollection_DoubleMap ViewerTest_myDrivers; + static void SetDisplayConnection(const Handle(Aspect_DisplayConnection)& theDisplayConnection) + { + GetDisplayConnection() = theDisplayConnection; + } + + static ViewerTest_ViewerCommandsViewMap ViewerTest_myViews; + static ViewerTest_ViewerCommandsInteractiveContextMap ViewerTest_myContexts; + static ViewerTest_ViewerCommandsGraphicDriverMap ViewerTest_myDrivers; +} static struct { @@ -184,10 +191,10 @@ static struct //! Sets the gradient filling for a background in a default viewer. void SetDefaultGradient() { - for (NCollection_DoubleMap::Iterator aCtxIter (ViewerTest_myContexts); + for (ViewerTest_ViewerCommandsInteractiveContextMap::Iterator aCtxIter (ViewerTest_myContexts); aCtxIter.More(); aCtxIter.Next()) { - const Handle (V3d_Viewer)& aViewer = aCtxIter.Value()->CurrentViewer(); + const Handle (V3d_Viewer)& aViewer = aCtxIter.Key2()->CurrentViewer(); aViewer->SetDefaultBgGradientColors (GradientColor1, GradientColor2, FillMethod); } } @@ -195,10 +202,10 @@ static struct //! Sets the color used for filling a background in a default viewer. void SetDefaultColor() { - for (NCollection_DoubleMap::Iterator aCtxIter (ViewerTest_myContexts); + for (ViewerTest_ViewerCommandsInteractiveContextMap::Iterator aCtxIter (ViewerTest_myContexts); aCtxIter.More(); aCtxIter.Next()) { - const Handle (V3d_Viewer)& aViewer = aCtxIter.Value()->CurrentViewer(); + const Handle (V3d_Viewer)& aViewer = aCtxIter.Key2()->CurrentViewer(); aViewer->SetDefaultBackgroundColor (FlatColor); } } @@ -404,10 +411,10 @@ Handle(AIS_InteractiveContext) FindContextByView (const Handle(V3d_View)& theVie { Handle(AIS_InteractiveContext) anAISContext; - for (NCollection_DoubleMap::Iterator + for (ViewerTest_ViewerCommandsInteractiveContextMap::Iterator anIter (ViewerTest_myContexts); anIter.More(); anIter.Next()) { - if (anIter.Value()->CurrentViewer() == theView->Viewer()) + if (anIter.Key2()->CurrentViewer() == theView->Viewer()) return anIter.Key2(); } return anAISContext; @@ -424,14 +431,14 @@ Standard_Boolean IsWindowOverlapped (const Standard_Integer thePxLeft, const Standard_Integer thePxBottom, TCollection_AsciiString& theViewId) { - for(NCollection_DoubleMap ::Iterator + for(ViewerTest_ViewerCommandsViewMap::Iterator anIter(ViewerTest_myViews); anIter.More(); anIter.Next()) { Standard_Integer aTop = 0, aLeft = 0, aRight = 0, aBottom = 0; - anIter.Value()->Window()->Position(aLeft, aTop, aRight, aBottom); + anIter.Key2()->Window()->Position(aLeft, aTop, aRight, aBottom); if ((thePxLeft >= aLeft && thePxLeft <= aRight && thePxTop >= aTop && thePxTop <= aBottom) || (thePxLeft >= aLeft && thePxLeft <= aRight && thePxBottom >= aTop && thePxBottom <= aBottom) || (thePxRight >= aLeft && thePxRight <= aRight && thePxTop >= aTop && thePxTop <= aBottom) || @@ -653,10 +660,10 @@ TCollection_AsciiString ViewerTest::ViewerInit (const ViewerTest_VinitParams& th // If it's the single view, we first look for empty context if (ViewerTest_myViews.IsEmpty() && !ViewerTest_myContexts.IsEmpty()) { - NCollection_DoubleMap ::Iterator + ViewerTest_ViewerCommandsInteractiveContextMap::Iterator anIter(ViewerTest_myContexts); if (anIter.More()) - ViewerTest::SetAISContext (anIter.Value()); + ViewerTest::SetAISContext (anIter.Key2()); a3DViewer = ViewerTest::GetAISContext()->CurrentViewer(); } else if (ViewerTest_myContexts.IsBound1(aViewNames.GetViewerName())) @@ -805,7 +812,7 @@ TCollection_AsciiString ViewerTest::ViewerInit (const ViewerTest_VinitParams& th //============================================================================== void ViewerTest::RedrawAllViews() { - NCollection_DoubleMap::Iterator aViewIt(ViewerTest_myViews); + ViewerTest_ViewerCommandsViewMap::Iterator aViewIt(ViewerTest_myViews); for (; aViewIt.More(); aViewIt.Next()) { const Handle(V3d_View)& aView = aViewIt.Key2(); @@ -1455,10 +1462,10 @@ static int VHLRType (Draw_Interpretor& , Standard_Integer argc, const char** arg #if defined(_WIN32) || defined(HAVE_XLIB) static TCollection_AsciiString FindViewIdByWindowHandle (Aspect_Drawable theWindowHandle) { - for (NCollection_DoubleMap::Iterator + for (ViewerTest_ViewerCommandsViewMap::Iterator anIter(ViewerTest_myViews); anIter.More(); anIter.Next()) { - Aspect_Drawable aWindowHandle = anIter.Value()->Window()->NativeHandle(); + Aspect_Drawable aWindowHandle = anIter.Key2()->Window()->NativeHandle(); if (aWindowHandle == theWindowHandle) return anIter.Key1(); } @@ -1572,12 +1579,12 @@ void ViewerTest::RemoveView (const TCollection_AsciiString& theViewName, const S { if (ViewerTest_myViews.Extent() > 1) { - for (NCollection_DoubleMap ::Iterator anIter (ViewerTest_myViews); + for (ViewerTest_ViewerCommandsViewMap::Iterator anIter (ViewerTest_myViews); anIter.More(); anIter.Next()) { if (anIter.Key1() != theViewName) { - ActivateView (anIter.Value(), true); + ActivateView (anIter.Key2(), true); break; } } @@ -1594,7 +1601,8 @@ void ViewerTest::RemoveView (const TCollection_AsciiString& theViewName, const S } } - // Delete view + // Delete view, name will be removed too + const TCollection_AsciiString aCopyString(theViewName); ViewerTest_myViews.UnBind1(theViewName); if (!aView->Window().IsNull()) { @@ -1616,11 +1624,11 @@ void ViewerTest::RemoveView (const TCollection_AsciiString& theViewName, const S { // Remove driver if there is no viewers that use it Standard_Boolean isRemoveDriver = Standard_True; - for(NCollection_DoubleMap::Iterator + for(ViewerTest_ViewerCommandsInteractiveContextMap::Iterator anIter(ViewerTest_myContexts); anIter.More(); anIter.Next()) { if (aCurrentContext != anIter.Key2() && - aCurrentContext->CurrentViewer()->Driver() == anIter.Value()->CurrentViewer()->Driver()) + aCurrentContext->CurrentViewer()->Driver() == anIter.Key2()->CurrentViewer()->Driver()) { isRemoveDriver = Standard_False; break; @@ -1639,7 +1647,7 @@ void ViewerTest::RemoveView (const TCollection_AsciiString& theViewName, const S ViewerTest_myContexts.UnBind2(aCurrentContext); } } - Message::SendInfo() << "3D View - " << theViewName << " was deleted.\n"; + Message::SendInfo() << "3D View - " << aCopyString << " was deleted.\n"; if (ViewerTest_EventManager::ToExitOnCloseView()) { Draw_Interprete ("exit"); @@ -1663,7 +1671,7 @@ static int VClose (Draw_Interpretor& /*theDi*/, if (anArg.IsEqual ("ALL") || anArg.IsEqual ("*")) { - for (NCollection_DoubleMap::Iterator anIter (ViewerTest_myViews); + for (ViewerTest_ViewerCommandsViewMap::Iterator anIter (ViewerTest_myViews); anIter.More(); anIter.Next()) { aViewList.Append (anIter.Key1()); @@ -1808,13 +1816,13 @@ static int VViewList (Draw_Interpretor& theDi, Standard_Integer theArgsNb, const theDi << theArgVec[0] <<":\n"; } - for (NCollection_DoubleMap ::Iterator aDriverIter (ViewerTest_myDrivers); + for (ViewerTest_ViewerCommandsGraphicDriverMap::Iterator aDriverIter (ViewerTest_myDrivers); aDriverIter.More(); aDriverIter.Next()) { if (isTreeView) theDi << aDriverIter.Key1() << ":\n"; - for (NCollection_DoubleMap ::Iterator + for (ViewerTest_ViewerCommandsInteractiveContextMap::Iterator aContextIter(ViewerTest_myContexts); aContextIter.More(); aContextIter.Next()) { if (aContextIter.Key1().Search(aDriverIter.Key1()) != -1) @@ -1825,7 +1833,7 @@ static int VViewList (Draw_Interpretor& theDi, Standard_Integer theArgsNb, const theDi << " " << aContextName.Split(aDriverIter.Key1().Length() + 1) << ":\n"; } - for (NCollection_DoubleMap ::Iterator aViewIter (ViewerTest_myViews); + for (ViewerTest_ViewerCommandsViewMap::Iterator aViewIter (ViewerTest_myViews); aViewIter.More(); aViewIter.Next()) { if (aViewIter.Key1().Search(aContextIter.Key1()) != -1) @@ -1833,7 +1841,7 @@ static int VViewList (Draw_Interpretor& theDi, Standard_Integer theArgsNb, const TCollection_AsciiString aViewName(aViewIter.Key1()); if (isTreeView) { - if (aViewIter.Value() == ViewerTest::CurrentView()) + if (aViewIter.Key2() == ViewerTest::CurrentView()) theDi << " " << aViewName.Split(aContextIter.Key1().Length() + 1) << "(*)\n"; else theDi << " " << aViewName.Split(aContextIter.Key1().Length() + 1) << "\n"; @@ -2370,7 +2378,7 @@ static void VProcessEvents (ClientData theDispX, int) { Display* aDispX = (Display* )theDispX; Handle(Aspect_DisplayConnection) aDispConn; - for (NCollection_DoubleMap::Iterator + for (ViewerTest_ViewerCommandsGraphicDriverMap::Iterator aDriverIter (ViewerTest_myDrivers); aDriverIter.More(); aDriverIter.Next()) { const Handle(Aspect_DisplayConnection)& aDispConnTmp = aDriverIter.Key2()->GetDisplayConnection(); @@ -8277,7 +8285,7 @@ namespace aPrs->RemoveClipPlane (aClipPlane); } - for (NCollection_DoubleMap::Iterator aViewIt(ViewerTest_myViews); + for (ViewerTest_ViewerCommandsViewMap::Iterator aViewIt(ViewerTest_myViews); aViewIt.More(); aViewIt.Next()) { const Handle(V3d_View)& aView = aViewIt.Key2(); @@ -12755,10 +12763,10 @@ static int VManipulator (Draw_Interpretor& theDi, } if (!aViewAffinity.IsNull()) { - for (NCollection_DoubleMap ::Iterator anIter (ViewerTest_myViews); + for (ViewerTest_ViewerCommandsViewMap::Iterator anIter (ViewerTest_myViews); anIter.More(); anIter.Next()) { - ViewerTest::GetAISContext()->SetViewAffinity (aManipulator, anIter.Value(), false); + ViewerTest::GetAISContext()->SetViewAffinity (aManipulator, anIter.Key2(), false); } ViewerTest::GetAISContext()->SetViewAffinity (aManipulator, aViewAffinity, true); } diff --git a/src/VrmlData/VrmlData_Node.cxx b/src/VrmlData/VrmlData_Node.cxx index d4a85824aa..31a48c2151 100644 --- a/src/VrmlData/VrmlData_Node.cxx +++ b/src/VrmlData/VrmlData_Node.cxx @@ -48,15 +48,6 @@ Standard_Boolean IsEqual (const Handle(VrmlData_Node)& theOne, return aResult; } -//======================================================================= -// function : HashCode -// purpose : Global method -//======================================================================= -Standard_Integer HashCode (const Handle (VrmlData_Node) & theNode, const Standard_Integer theUpperBound) -{ - return (theNode->Name () == NULL ? 1 : HashCode (theNode->Name (), theUpperBound)); -} - //======================================================================= //function : VrmlData_Node //purpose : diff --git a/src/VrmlData/VrmlData_Node.hxx b/src/VrmlData/VrmlData_Node.hxx index fed5337283..695633d04c 100644 --- a/src/VrmlData/VrmlData_Node.hxx +++ b/src/VrmlData/VrmlData_Node.hxx @@ -19,7 +19,8 @@ #include #include #include -#include +#include +#include #include #define VRMLDATA_LCOMPARE(aa, bb) \ @@ -198,13 +199,34 @@ class VrmlData_Node : public Standard_Transient // Definition of HANDLE object using Standard_DefineHandle.hxx DEFINE_STANDARD_HANDLE (VrmlData_Node, Standard_Transient) -//! Computes a hash code for the given VRML node, in the range [1, theUpperBound] -//! @param theNode the VRML node which hash code is to be computed -//! @param theUpperBound the upper bound of the range a computing hash code must be within -//! @return a computed hash code, in the range [1, theUpperBound] -Standard_EXPORT Standard_Integer HashCode (const Handle (VrmlData_Node) & theNode, Standard_Integer theUpperBound); -Standard_EXPORT Standard_Boolean IsEqual (const Handle(VrmlData_Node)& theOne, - const Handle(VrmlData_Node)& theTwo); +Standard_EXPORT Standard_Boolean IsEqual(const Handle(VrmlData_Node)& theOne, + const Handle(VrmlData_Node)& theTwo); + +namespace std +{ + template <> + struct hash + { + size_t operator()(const Handle(VrmlData_Node)& theNode) const + { + if (!theNode->Name()) + { + return 1; + } + return Standard_CStringHasher{}(theNode->Name()); + } + }; + + template<> + struct equal_to + { + bool operator()(const Handle(VrmlData_Node)& theNode1, + const Handle(VrmlData_Node)& theNode2) const noexcept + { + return IsEqual(theNode1, theNode2); + } + }; +} #endif diff --git a/src/WNT/WNT_WClass.hxx b/src/WNT/WNT_WClass.hxx index 55808add07..e7d1e4d6c8 100644 --- a/src/WNT/WNT_WClass.hxx +++ b/src/WNT/WNT_WClass.hxx @@ -22,9 +22,9 @@ #if defined(_WIN32) && !defined(OCCT_UWP) #include -#include #include #include +#include #include //! This class defines a Windows NT window class. diff --git a/src/XCAFDimTolObjects/XCAFDimTolObjects_DataMapOfToleranceDatum.hxx b/src/XCAFDimTolObjects/XCAFDimTolObjects_DataMapOfToleranceDatum.hxx index 0a8fe8a6d7..af71e9449d 100644 --- a/src/XCAFDimTolObjects/XCAFDimTolObjects_DataMapOfToleranceDatum.hxx +++ b/src/XCAFDimTolObjects/XCAFDimTolObjects_DataMapOfToleranceDatum.hxx @@ -19,8 +19,7 @@ #include #include #include -#include -typedef NCollection_DataMap XCAFDimTolObjects_DataMapOfToleranceDatum; +typedef NCollection_DataMap XCAFDimTolObjects_DataMapOfToleranceDatum; #endif \ No newline at end of file diff --git a/src/XCAFDoc/XCAFDoc_AssemblyItemId.hxx b/src/XCAFDoc/XCAFDoc_AssemblyItemId.hxx index 2d30806f02..ef3036ea60 100644 --- a/src/XCAFDoc/XCAFDoc_AssemblyItemId.hxx +++ b/src/XCAFDoc/XCAFDoc_AssemblyItemId.hxx @@ -80,25 +80,10 @@ public: //! Dumps the content of me into the stream Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const; - struct Hasher + bool operator==(const XCAFDoc_AssemblyItemId& theOther) const { - - //! Computes a hash code for the given value of the XCAFDoc_AssemblyItemId, in range [1, theUpperBound] - //! @param theAssemblyItemId the value of the XCAFDoc_AssemblyItemId type which hash code is to be computed - //! @param theUpperBound the upper bound of the range a computing hash code must be within - //! @return a computed hash code, in range [1, theUpperBound] - static Standard_Integer HashCode (const XCAFDoc_AssemblyItemId& theAssemblyItemId, - const Standard_Integer theUpperBound) - { - return ::HashCode (theAssemblyItemId.ToString(), theUpperBound); - } - - static int IsEqual(const XCAFDoc_AssemblyItemId& theItem1, - const XCAFDoc_AssemblyItemId& theItem2) - { - return theItem1.IsEqual(theItem2); - } - }; + return IsEqual(theOther); + } private: @@ -106,4 +91,17 @@ private: }; +namespace std +{ + + template<> + struct hash + { + size_t operator()(const XCAFDoc_AssemblyItemId& theAssemblyItemId) const + { + return std::hash{}(theAssemblyItemId.ToString()); + } + }; + +} #endif // _XCAFDoc_AssemblyItemId_HeaderFile diff --git a/src/XCAFDoc/XCAFDoc_DimTolTool.cxx b/src/XCAFDoc/XCAFDoc_DimTolTool.cxx index b396f408dd..4ad3778ed6 100644 --- a/src/XCAFDoc/XCAFDoc_DimTolTool.cxx +++ b/src/XCAFDoc/XCAFDoc_DimTolTool.cxx @@ -965,7 +965,7 @@ const Standard_GUID& XCAFDoc_DimTolTool::ID() const //purpose : //======================================================================= void XCAFDoc_DimTolTool::GetGDTPresentations(NCollection_IndexedDataMap& theGDTLabelToShape) const + TopoDS_Shape>& theGDTLabelToShape) const { TDF_LabelSequence aGDTs; GetDimensionLabels(aGDTs); @@ -1017,7 +1017,7 @@ void XCAFDoc_DimTolTool::GetGDTPresentations(NCollection_IndexedDataMap& theGDTLabelToPrs) +void XCAFDoc_DimTolTool::SetGDTPresentations(NCollection_IndexedDataMap& theGDTLabelToPrs) { for (Standard_Integer i = 1; i <= theGDTLabelToPrs.Extent(); i++) { diff --git a/src/XCAFDoc/XCAFDoc_DimTolTool.hxx b/src/XCAFDoc/XCAFDoc_DimTolTool.hxx index 78380f0853..ea4b34436f 100644 --- a/src/XCAFDoc/XCAFDoc_DimTolTool.hxx +++ b/src/XCAFDoc/XCAFDoc_DimTolTool.hxx @@ -26,7 +26,6 @@ #include #include #include -#include class XCAFDoc_ShapeTool; class TDF_Label; @@ -237,12 +236,12 @@ public: Standard_EXPORT void Lock(const TDF_Label& theViewL) const; //! fill the map GDT label -> shape presentation - Standard_EXPORT void GetGDTPresentations(NCollection_IndexedDataMap& theGDTLabelToShape) const; + Standard_EXPORT void GetGDTPresentations(NCollection_IndexedDataMap& theGDTLabelToShape) const; //! Set shape presentation for GDT labels according to given map (theGDTLabelToPrs) //! theGDTLabelToPrsName map is an additional argument, can be used to set presentation names. //! If label is not in the theGDTLabelToPrsName map, the presentation name will be empty - Standard_EXPORT void SetGDTPresentations(NCollection_IndexedDataMap& theGDTLabelToPrs); + Standard_EXPORT void SetGDTPresentations(NCollection_IndexedDataMap& theGDTLabelToPrs); //! Unlock the given GDT. Standard_EXPORT void Unlock(const TDF_Label& theViewL) const; diff --git a/src/XCAFPrs/XCAFPrs_AISObject.cxx b/src/XCAFPrs/XCAFPrs_AISObject.cxx index e890665988..1e05ac79f4 100644 --- a/src/XCAFPrs/XCAFPrs_AISObject.cxx +++ b/src/XCAFPrs/XCAFPrs_AISObject.cxx @@ -138,7 +138,7 @@ void XCAFPrs_AISObject::DispatchStyles (const Standard_Boolean theToSyncStyles) // collect sub-shapes with the same style into compounds BRep_Builder aBuilder; - NCollection_IndexedDataMap aStyleGroups; + NCollection_IndexedDataMap aStyleGroups; for (XCAFPrs_DataMapIteratorOfIndexedDataMapOfShapeStyle aStyledShapeIter (aSettings); aStyledShapeIter.More(); aStyledShapeIter.Next()) { @@ -160,7 +160,7 @@ void XCAFPrs_AISObject::DispatchStyles (const Standard_Boolean theToSyncStyles) aSettings.Clear(); // assign custom aspects - for (NCollection_IndexedDataMap::Iterator aStyleGroupIter (aStyleGroups); + for (NCollection_IndexedDataMap::Iterator aStyleGroupIter (aStyleGroups); aStyleGroupIter.More(); aStyleGroupIter.Next()) { const TopoDS_Compound& aComp = aStyleGroupIter.Value(); diff --git a/src/XCAFPrs/XCAFPrs_DataMapOfStyleShape.hxx b/src/XCAFPrs/XCAFPrs_DataMapOfStyleShape.hxx index 7576a7985a..ceecaa7b23 100644 --- a/src/XCAFPrs/XCAFPrs_DataMapOfStyleShape.hxx +++ b/src/XCAFPrs/XCAFPrs_DataMapOfStyleShape.hxx @@ -20,8 +20,8 @@ #include #include -typedef NCollection_DataMap XCAFPrs_DataMapOfStyleShape; -typedef NCollection_DataMap::Iterator XCAFPrs_DataMapIteratorOfDataMapOfStyleShape; +typedef NCollection_DataMap XCAFPrs_DataMapOfStyleShape; +typedef NCollection_DataMap::Iterator XCAFPrs_DataMapIteratorOfDataMapOfStyleShape; #endif diff --git a/src/XCAFPrs/XCAFPrs_DataMapOfStyleTransient.hxx b/src/XCAFPrs/XCAFPrs_DataMapOfStyleTransient.hxx index 6520c85f42..b901e619b0 100644 --- a/src/XCAFPrs/XCAFPrs_DataMapOfStyleTransient.hxx +++ b/src/XCAFPrs/XCAFPrs_DataMapOfStyleTransient.hxx @@ -20,8 +20,8 @@ #include #include -typedef NCollection_DataMap XCAFPrs_DataMapOfStyleTransient; -typedef NCollection_DataMap::Iterator XCAFPrs_DataMapIteratorOfDataMapOfStyleTransient; +typedef NCollection_DataMap XCAFPrs_DataMapOfStyleTransient; +typedef NCollection_DataMap::Iterator XCAFPrs_DataMapIteratorOfDataMapOfStyleTransient; #endif diff --git a/src/XCAFPrs/XCAFPrs_DocumentNode.hxx b/src/XCAFPrs/XCAFPrs_DocumentNode.hxx index 68bf1dfe15..b8789e031e 100644 --- a/src/XCAFPrs/XCAFPrs_DocumentNode.hxx +++ b/src/XCAFPrs/XCAFPrs_DocumentNode.hxx @@ -37,20 +37,22 @@ struct XCAFPrs_DocumentNode public: // Methods for hash map - //! Return hash code based on node string identifier. - static Standard_Integer HashCode (const XCAFPrs_DocumentNode& theNode, - const Standard_Integer theN) + bool operator==(const XCAFPrs_DocumentNode& theOther) const { - return ::HashCode (theNode.Id, theN); + return Id == theOther.Id; } +}; - //! Return TRUE if two document nodes has the same string identifier. - static Standard_Boolean IsEqual (const XCAFPrs_DocumentNode& theNode1, - const XCAFPrs_DocumentNode& theNode2) +namespace std +{ + template <> + struct hash { - return theNode1.Id == theNode2.Id; - } - -}; + size_t operator()(const XCAFPrs_DocumentNode& theDocumentNode) const + { + return std::hash{}(theDocumentNode.Id); + } + }; +} #endif // _XCAFPrs_DocumentNode_HeaderFile diff --git a/src/XCAFPrs/XCAFPrs_Style.hxx b/src/XCAFPrs/XCAFPrs_Style.hxx index 22c9664548..ac3f8e549e 100644 --- a/src/XCAFPrs/XCAFPrs_Style.hxx +++ b/src/XCAFPrs/XCAFPrs_Style.hxx @@ -19,8 +19,8 @@ #include #include #include -#include #include +#include //! Represents a set of styling settings applicable to a (sub)shape class XCAFPrs_Style @@ -130,38 +130,8 @@ public: return IsEqual (theOther); } - //! Computes a hash code for the given set of styling settings, in the range [1, theUpperBound] - //! @param theStyle the set of styling settings which hash code is to be computed - //! @param theUpperBound the upper bound of the range a computing hash code must be within - //! @return a computed hash code, in the range [1, theUpperBound] - static Standard_Integer HashCode (const XCAFPrs_Style& theStyle, const Standard_Integer theUpperBound) - { - if (!theStyle.myIsVisible) - { - return 1; - } - - Standard_Integer aHashCode = 0; - if (theStyle.myHasColorSurf) - { - aHashCode = aHashCode ^ Quantity_ColorRGBAHasher::HashCode (theStyle.myColorSurf, theUpperBound); - } - if (theStyle.myHasColorCurv) - { - aHashCode = aHashCode ^ Quantity_ColorHasher::HashCode (theStyle.myColorCurv, theUpperBound); - } - if (!theStyle.myMaterial.IsNull()) - { - aHashCode = aHashCode ^ ::HashCode (theStyle.myMaterial, theUpperBound); - } - return ::HashCode (aHashCode, theUpperBound); - } - - //! Returns True when the two keys are the same. - static Standard_Boolean IsEqual (const XCAFPrs_Style& theS1, const XCAFPrs_Style& theS2) - { - return theS1.IsEqual (theS2); - } + template + friend struct std::hash; //! Dumps the content of me into the stream Standard_EXPORT void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const; @@ -177,4 +147,34 @@ protected: }; +namespace std +{ + template <> + struct hash + { + size_t operator()(const XCAFPrs_Style& theStyle) const + { + if (!theStyle.myIsVisible) + { + return 1; + } + size_t aCombination[3]; + int aCount = 0; + if (theStyle.myHasColorSurf) + { + aCombination[aCount++] = std::hash{}(theStyle.myColorSurf); + } + if (theStyle.myHasColorCurv) + { + aCombination[aCount++] = std::hash{}(theStyle.myColorCurv); + } + if (!theStyle.myMaterial.IsNull()) + { + aCombination[aCount++] = std::hash{}(theStyle.myMaterial); + } + return aCount > 0 ? opencascade::hashBytes(aCombination, sizeof(size_t) * aCount) : 0; + } + }; +} + #endif // _XCAFPrs_Style_HeaderFile diff --git a/src/XDEDRAW/XDEDRAW.cxx b/src/XDEDRAW/XDEDRAW.cxx index 71561d359e..df4c0a2da9 100644 --- a/src/XDEDRAW/XDEDRAW.cxx +++ b/src/XDEDRAW/XDEDRAW.cxx @@ -944,7 +944,7 @@ class XDEDRAW_XDisplayTool } private: - NCollection_Map + NCollection_Map myNameMap; //!< names map to handle collisions Handle(TDocStd_Document) myDoc; //!< document TCollection_AsciiString myDocName; //!< document name diff --git a/src/XSDRAWSTLVRML/XSDRAWSTLVRML_CoordsMap.hxx b/src/XSDRAWSTLVRML/XSDRAWSTLVRML_CoordsMap.hxx index 05f130df44..509d05936f 100644 --- a/src/XSDRAWSTLVRML/XSDRAWSTLVRML_CoordsMap.hxx +++ b/src/XSDRAWSTLVRML/XSDRAWSTLVRML_CoordsMap.hxx @@ -17,11 +17,10 @@ #define XSDRAWSTLVRML_CoordsMap_HeaderFile #include -#include #include -typedef NCollection_DataMap XSDRAWSTLVRML_CoordsMap; -typedef NCollection_DataMap::Iterator XSDRAWSTLVRML_DataMapIteratorOfCoordsMap; +typedef NCollection_DataMap XSDRAWSTLVRML_CoordsMap; +typedef NCollection_DataMap::Iterator XSDRAWSTLVRML_DataMapIteratorOfCoordsMap; #endif diff --git a/src/XSDRAWSTLVRML/XSDRAWSTLVRML_DataSource.hxx b/src/XSDRAWSTLVRML/XSDRAWSTLVRML_DataSource.hxx index 656d0dce07..ca59eac486 100644 --- a/src/XSDRAWSTLVRML/XSDRAWSTLVRML_DataSource.hxx +++ b/src/XSDRAWSTLVRML/XSDRAWSTLVRML_DataSource.hxx @@ -24,7 +24,6 @@ #include #include #include -#include #include #include diff --git a/src/XSDRAWSTLVRML/XSDRAWSTLVRML_DataSource3D.hxx b/src/XSDRAWSTLVRML/XSDRAWSTLVRML_DataSource3D.hxx index 13b7b3877b..aac3345e67 100644 --- a/src/XSDRAWSTLVRML/XSDRAWSTLVRML_DataSource3D.hxx +++ b/src/XSDRAWSTLVRML/XSDRAWSTLVRML_DataSource3D.hxx @@ -27,7 +27,6 @@ #include #include #include -#include #include diff --git a/src/XSDRAWSTLVRML/XSDRAWSTLVRML_ElemNodesMap.hxx b/src/XSDRAWSTLVRML/XSDRAWSTLVRML_ElemNodesMap.hxx index c1f3c6e574..65445ec081 100644 --- a/src/XSDRAWSTLVRML/XSDRAWSTLVRML_ElemNodesMap.hxx +++ b/src/XSDRAWSTLVRML/XSDRAWSTLVRML_ElemNodesMap.hxx @@ -17,11 +17,10 @@ #define XSDRAWSTLVRML_ElemNodesMap_HeaderFile #include -#include #include -typedef NCollection_DataMap XSDRAWSTLVRML_ElemNodesMap; -typedef NCollection_DataMap::Iterator XSDRAWSTLVRML_DataMapIteratorOfElemNodesMap; +typedef NCollection_DataMap XSDRAWSTLVRML_ElemNodesMap; +typedef NCollection_DataMap::Iterator XSDRAWSTLVRML_DataMapIteratorOfElemNodesMap; #endif diff --git a/src/XmlMDF/XmlMDF_MapOfDriver.hxx b/src/XmlMDF/XmlMDF_MapOfDriver.hxx index de6ebd1ae2..a60f8ee14b 100644 --- a/src/XmlMDF/XmlMDF_MapOfDriver.hxx +++ b/src/XmlMDF/XmlMDF_MapOfDriver.hxx @@ -20,8 +20,8 @@ #include #include -typedef NCollection_DataMap XmlMDF_MapOfDriver; -typedef NCollection_DataMap::Iterator XmlMDF_DataMapIteratorOfMapOfDriver; +typedef NCollection_DataMap XmlMDF_MapOfDriver; +typedef NCollection_DataMap::Iterator XmlMDF_DataMapIteratorOfMapOfDriver; #endif diff --git a/src/XmlMDF/XmlMDF_TypeADriverMap.hxx b/src/XmlMDF/XmlMDF_TypeADriverMap.hxx index 028473053a..b4ddd1cb5e 100644 --- a/src/XmlMDF/XmlMDF_TypeADriverMap.hxx +++ b/src/XmlMDF/XmlMDF_TypeADriverMap.hxx @@ -18,11 +18,10 @@ #include #include -#include #include -typedef NCollection_DataMap XmlMDF_TypeADriverMap; -typedef NCollection_DataMap::Iterator XmlMDF_DataMapIteratorOfTypeADriverMap; +typedef NCollection_DataMap XmlMDF_TypeADriverMap; +typedef NCollection_DataMap::Iterator XmlMDF_DataMapIteratorOfTypeADriverMap; #endif diff --git a/src/XmlTObjDrivers/XmlTObjDrivers.hxx b/src/XmlTObjDrivers/XmlTObjDrivers.hxx index af3d4b060f..9f816b21f6 100644 --- a/src/XmlTObjDrivers/XmlTObjDrivers.hxx +++ b/src/XmlTObjDrivers/XmlTObjDrivers.hxx @@ -18,7 +18,6 @@ #ifndef XmlTObjDrivers_HeaderFile #define XmlTObjDrivers_HeaderFile -#include #include class XmlMDF_ADriverTable; diff --git a/src/XmlTObjDrivers/XmlTObjDrivers_DocumentRetrievalDriver.hxx b/src/XmlTObjDrivers/XmlTObjDrivers_DocumentRetrievalDriver.hxx index 43fb21757d..291b22da42 100644 --- a/src/XmlTObjDrivers/XmlTObjDrivers_DocumentRetrievalDriver.hxx +++ b/src/XmlTObjDrivers/XmlTObjDrivers_DocumentRetrievalDriver.hxx @@ -18,7 +18,6 @@ #ifndef XmlTObjDrivers_DocumentRetrievalDriver_HeaderFile #define XmlTObjDrivers_DocumentRetrievalDriver_HeaderFile -#include #include #include diff --git a/src/XmlTObjDrivers/XmlTObjDrivers_DocumentStorageDriver.hxx b/src/XmlTObjDrivers/XmlTObjDrivers_DocumentStorageDriver.hxx index 544bb4d4dc..39cea7bcf2 100644 --- a/src/XmlTObjDrivers/XmlTObjDrivers_DocumentStorageDriver.hxx +++ b/src/XmlTObjDrivers/XmlTObjDrivers_DocumentStorageDriver.hxx @@ -18,7 +18,6 @@ #ifndef XmlTObjDrivers_DocumentStorageDriver_HeaderFile #define XmlTObjDrivers_DocumentStorageDriver_HeaderFile -#include #include #include diff --git a/src/XmlTObjDrivers/XmlTObjDrivers_ObjectDriver.hxx b/src/XmlTObjDrivers/XmlTObjDrivers_ObjectDriver.hxx index 4a04cfb2a3..a2bced0c6c 100644 --- a/src/XmlTObjDrivers/XmlTObjDrivers_ObjectDriver.hxx +++ b/src/XmlTObjDrivers/XmlTObjDrivers_ObjectDriver.hxx @@ -19,7 +19,6 @@ #ifndef XmlTObjDrivers_ObjectDriver_HeaderFile #define XmlTObjDrivers_ObjectDriver_HeaderFile -#include #include class XmlTObjDrivers_ObjectDriver : public XmlMDF_ADriver diff --git a/src/gp/gp_Pnt.hxx b/src/gp/gp_Pnt.hxx index 09667d182d..f16c906e9e 100644 --- a/src/gp/gp_Pnt.hxx +++ b/src/gp/gp_Pnt.hxx @@ -214,6 +214,39 @@ private: }; +namespace std +{ + template <> + struct hash + { + size_t operator()(const gp_Pnt& thePnt) const noexcept + { + union + { + Standard_Real R[3]; + Standard_Integer I[6]; + } U; + + thePnt.Coord(U.R[0], U.R[1], U.R[2]); + + return std::hash{}(U.I[0] / 23 + U.I[1] / 19 + U.I[2] / 17 + U.I[3] / 13 + U.I[4] / 11 + U.I[5] / 7); + } + }; + + template<> + struct equal_to + { + bool operator()(const gp_Pnt& thePnt1, + const gp_Pnt& thePnt2) const noexcept + { + if (Abs(thePnt1.X() - thePnt2.X()) > Epsilon(thePnt2.X())) return false; + if (Abs(thePnt1.Y() - thePnt2.Y()) > Epsilon(thePnt2.Y())) return false; + if (Abs(thePnt1.Z() - thePnt2.Z()) > Epsilon(thePnt2.Z())) return false; + return true; + } + }; +} + #include #include #include diff --git a/src/math/FILES b/src/math/FILES index c371253135..d1c626a2ba 100755 --- a/src/math/FILES +++ b/src/math/FILES @@ -74,7 +74,6 @@ math_GlobOptMin.hxx math_Householder.cxx math_Householder.hxx math_Householder.lxx -math_IntegerVector.cxx math_IntegerVector.hxx math_Jacobi.cxx math_Jacobi.hxx @@ -122,5 +121,6 @@ math_Uzawa.cxx math_Uzawa.hxx math_Uzawa.lxx math_ValueAndWeight.hxx -math_Vector.cxx +math_VectorBase.hxx +math_VectorBase.lxx math_Vector.hxx diff --git a/src/math/math_IntegerVector.cxx b/src/math/math_IntegerVector.cxx deleted file mode 100644 index 60541a3e95..0000000000 --- a/src/math/math_IntegerVector.cxx +++ /dev/null @@ -1,336 +0,0 @@ -// Copyright (c) 1997-1999 Matra Datavision -// Copyright (c) 1999-2014 OPEN CASCADE SAS -// -// This file is part of Open CASCADE Technology software library. -// -// This library is free software; you can redistribute it and/or modify it under -// the terms of the GNU Lesser General Public License version 2.1 as published -// by the Free Software Foundation, with special exception defined in the file -// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT -// distribution for complete text of the license and disclaimer of any warranty. -// -// Alternatively, this file may be used under the terms of Open CASCADE -// commercial license or contractual agreement. - -#include - -#include -#include - -math_IntegerVector::math_IntegerVector(const Standard_Integer theFirst, const Standard_Integer theLast) -: myLocArray (theLast - theFirst + 1), - Array (myLocArray[0], theFirst, theLast) -{ - // -} - -math_IntegerVector::math_IntegerVector(const Standard_Integer theFirst, - const Standard_Integer theLast, - const Standard_Integer theInitialValue) -: myLocArray (theLast - theFirst + 1), - Array (myLocArray[0], theFirst, theLast) -{ - Array.Init(theInitialValue); -} - -math_IntegerVector::math_IntegerVector(const Standard_Integer* theTab, - const Standard_Integer theFirst, - const Standard_Integer theLast) -: Array (*theTab, theFirst, theLast) -{ - Standard_RangeError_Raise_if(theFirst > theLast, " "); -} - -void math_IntegerVector::Init(const Standard_Integer theInitialValue) -{ - Array.Init(theInitialValue); -} - -math_IntegerVector::math_IntegerVector (const math_IntegerVector& theOther) -: myLocArray (theOther.Length()), - Array (myLocArray[0], theOther.Lower(), theOther.Upper()) -{ - memcpy (&myLocArray[0], &theOther.Array.First(), sizeof(Standard_Integer) * theOther.Length()); -} - -void math_IntegerVector::SetFirst(const Standard_Integer theFirst) -{ - Array.Resize (theFirst, Array.Upper() - Array.Lower() + theFirst, Standard_False); -} - -Standard_Real math_IntegerVector::Norm() const -{ - Standard_Real Result = 0; - for(Standard_Integer Index = Lower(); Index <= Upper(); Index++) - { - Result = Result + Array(Index) * Array(Index); - } - return Sqrt(Result); -} - -Standard_Real math_IntegerVector::Norm2() const -{ - Standard_Real Result = 0; - for(Standard_Integer Index = Lower(); Index <= Upper(); Index++) - { - Result = Result + Array(Index) * Array(Index); - } - return Result; -} - -Standard_Integer math_IntegerVector::Max() const -{ - Standard_Integer I=0; - Standard_Real X = RealFirst(); - for(Standard_Integer Index = Lower(); Index <= Upper(); Index++) - { - if(Array(Index) > X) - { - X = Array(Index); - I = Index; - } - } - return I; -} - -Standard_Integer math_IntegerVector::Min() const -{ - Standard_Integer I=0; - Standard_Real X = RealLast(); - for(Standard_Integer Index = Lower(); Index <= Upper(); Index++) - { - if(Array(Index) < X) - { - X = Array(Index); - I = Index; - } - } - return I; -} - -void math_IntegerVector::Invert() -{ - Standard_Integer J; - Standard_Integer Temp; - - for(Standard_Integer Index = Lower(); Index <= Lower() + Length() / 2 ; Index++) - { - J = Upper() + Lower() - Index; - Temp = Array(Index); - Array(Index) = Array(J); - Array(J) = Temp; - } -} - -math_IntegerVector math_IntegerVector::Inverse() const -{ - math_IntegerVector Result = *this; - Result.Invert(); - return Result; -} - -void math_IntegerVector::Set(const Standard_Integer theI1, - const Standard_Integer theI2, - const math_IntegerVector &theV) -{ - Standard_DimensionError_Raise_if((theI1 < Lower()) || (theI2 > Upper()) || - (theI1 > theI2) || (theI2 - theI1 + 1 != theV.Length()), " "); - - Standard_Integer I = theV.Lower(); - for(Standard_Integer Index = theI1; Index <= theI2; Index++) - { - Array(Index) = theV.Array(I); - I++; - } -} - -void math_IntegerVector::Multiply(const Standard_Integer theRight) -{ - for(Standard_Integer Index = Lower(); Index <= Upper(); Index++) - { - Array(Index) = Array(Index) * theRight; - } -} - -void math_IntegerVector::Add(const math_IntegerVector& theRight) -{ - Standard_DimensionError_Raise_if(Length() != theRight.Length(), " "); - - Standard_Integer I = theRight.Lower(); - for(Standard_Integer Index = Lower(); Index <= Upper(); Index++) - { - Array(Index) = Array(Index) + theRight.Array(I); - I++; - } -} - -void math_IntegerVector::Subtract(const math_IntegerVector& theRight) -{ - Standard_DimensionError_Raise_if(Length() != theRight.Length(), " "); - Standard_Integer I = theRight.Lower(); - for(Standard_Integer Index = Lower(); Index <= Upper(); Index++) - { - Array(Index) = Array(Index) - theRight.Array(I); - I++; - } -} - -math_IntegerVector math_IntegerVector::Slice(const Standard_Integer theI1, - const Standard_Integer theI2) const -{ - Standard_DimensionError_Raise_if((theI1 < Lower()) || (theI1 > Upper()) || - (theI2 < Lower()) || (theI2 > Upper()), " "); - - if(theI2 >= theI1) - { - math_IntegerVector Result(theI1, theI2); - for(Standard_Integer Index = theI1; Index <= theI2; Index++) - { - Result.Array(Index) = Array(Index); - } - return Result; - } - else - { - math_IntegerVector Result(theI2, theI1); - for(Standard_Integer Index = theI1; Index >= theI2; Index--) - { - Result.Array(Index) = Array(Index); - } - return Result; - } -} - -Standard_Integer math_IntegerVector::Multiplied (const math_IntegerVector& theRight) const -{ - Standard_Integer Result = 0; - - Standard_DimensionError_Raise_if(Length() != theRight.Length(), " "); - - Standard_Integer I = theRight.Lower(); - for(Standard_Integer Index = 0; Index < Length(); Index++) - { - Result = Result + Array(Index) * theRight.Array(I); - I++; - } - return Result; -} - -math_IntegerVector math_IntegerVector::Multiplied (const Standard_Integer theRight)const -{ - math_IntegerVector Result(Lower(), Upper()); - - for(Standard_Integer Index = Lower(); Index <= Upper(); Index++) - { - Result.Array(Index) = Array(Index) * theRight; - } - return Result; -} - -math_IntegerVector math_IntegerVector::TMultiplied (const Standard_Integer theRight) const -{ - math_IntegerVector Result(Lower(), Upper()); - - for(Standard_Integer Index = Lower(); Index <= Upper(); Index++) - { - Result.Array(Index) = Array(Index) * theRight; - } - return Result; -} - -math_IntegerVector math_IntegerVector::Added (const math_IntegerVector& theRight) const -{ - Standard_DimensionError_Raise_if(Length() != theRight.Length(), " "); - - math_IntegerVector Result(Lower(), Upper()); - - Standard_Integer I = theRight.Lower(); - for(Standard_Integer Index = Lower(); Index <= Upper(); Index++) - { - Result.Array(Index) = Array(Index) + theRight.Array(I); - I++; - } - return Result; -} - -math_IntegerVector math_IntegerVector::Opposite() -{ - math_IntegerVector Result(Lower(), Upper()); - - for(Standard_Integer Index = Lower(); Index <= Upper(); Index++) - { - Result.Array(Index) = - Array(Index); - } - return Result; -} - -math_IntegerVector math_IntegerVector::Subtracted (const math_IntegerVector& theRight) const -{ - Standard_DimensionError_Raise_if(Length() != theRight.Length(), " "); - - math_IntegerVector Result(Lower(), Upper()); - - Standard_Integer I = theRight.Lower(); - for(Standard_Integer Index = Lower(); Index <= Upper(); Index++) - { - Result.Array(Index) = Array(Index) - theRight.Array(I); - I++; - } - return Result; -} - -void math_IntegerVector::Add (const math_IntegerVector& theLeft, const math_IntegerVector& theRight) -{ - Standard_DimensionError_Raise_if((Length() != theRight.Length()) || - (theRight.Length() != theLeft.Length()), " "); - - Standard_Integer I = theLeft.Lower(); - Standard_Integer J = theRight.Lower(); - for(Standard_Integer Index = Lower(); Index <= Upper(); Index++) - { - Array(Index) = theLeft.Array(I) + theRight.Array(J); - I++; - J++; - } -} - -void math_IntegerVector::Subtract (const math_IntegerVector& theLeft, - const math_IntegerVector& theRight) -{ - Standard_DimensionError_Raise_if((Length() != theRight.Length()) || - (theRight.Length() != theLeft.Length()), " "); - - Standard_Integer I = theLeft.Lower(); - Standard_Integer J = theRight.Lower(); - for(Standard_Integer Index = Lower(); Index <= Upper(); Index++) - { - Array(Index) = theLeft.Array(I) - theRight.Array(J); - I++; - J++; - } -} - -void math_IntegerVector::Multiply(const Standard_Integer theLeft, const math_IntegerVector& theRight) -{ - Standard_DimensionError_Raise_if((Length() != theRight.Length()), " "); - for(Standard_Integer I = Lower(); I <= Upper(); I++) - { - Array(I) = theLeft * theRight.Array(I); - } -} - -math_IntegerVector& math_IntegerVector::Initialized(const math_IntegerVector& theOther) -{ - Standard_DimensionError_Raise_if(Length() != theOther.Length(), " "); - memmove (&Array.ChangeFirst(), &theOther.Array.First(), sizeof(Standard_Integer) * Array.Length()); - return *this; -} - -void math_IntegerVector::Dump(Standard_OStream& theO) const -{ - theO << "math_IntegerVector of Range = " << Length() << "\n"; - for(Standard_Integer Index = Lower(); Index <= Upper(); Index++) - { - theO << "math_IntegerVector(" << Index << ") = " << Array(Index) << "\n"; - } -} diff --git a/src/math/math_IntegerVector.hxx b/src/math/math_IntegerVector.hxx index 3ff5d0f017..d7b3f2c37a 100644 --- a/src/math/math_IntegerVector.hxx +++ b/src/math/math_IntegerVector.hxx @@ -15,13 +15,7 @@ #ifndef _math_IntegerVector_HeaderFile #define _math_IntegerVector_HeaderFile -#include -#include - -// resolve name collisions with X11 headers -#ifdef Opposite - #undef Opposite -#endif +#include //! This class implements the real IntegerVector abstract data type. //! IntegerVectors can have an arbitrary range which must be define at @@ -52,221 +46,7 @@ //! V3 = V1; // --> will raise DimensionError; //! V1.Add(V3) // --> will raise DimensionError; //! @endcode -class math_IntegerVector -{ -public: - - DEFINE_STANDARD_ALLOC - - //! constructs an IntegerVector in the range [Lower..Upper] - Standard_EXPORT math_IntegerVector(const Standard_Integer theFirst, const Standard_Integer theLast); - - //! constructs an IntegerVector in the range [Lower..Upper] - //! with all the elements set to theInitialValue. - Standard_EXPORT math_IntegerVector(const Standard_Integer theFirst, const Standard_Integer theLast, const Standard_Integer theInitialValue); - - //! Initialize an IntegerVector with all the elements - //! set to theInitialValue. - Standard_EXPORT void Init(const Standard_Integer theInitialValue); - - //! constructs an IntegerVector in the range [Lower..Upper] - //! which share the "c array" theTab. - Standard_EXPORT math_IntegerVector(const Standard_Integer* theTab, const Standard_Integer theFirst, const Standard_Integer theLast); - - //! constructs a copy for initialization. - //! An exception is raised if the lengths of the IntegerVectors - //! are different. - Standard_EXPORT math_IntegerVector(const math_IntegerVector& theOther); - - //! returns the length of an IntegerVector - inline Standard_Integer Length() const - { - return Array.Length(); - } - - //! returns the value of the Lower index of an IntegerVector. - inline Standard_Integer Lower() const - { - return Array.Lower(); - } - - //! returns the value of the Upper index of an IntegerVector. - inline Standard_Integer Upper() const - { - return Array.Upper(); - } - - //! returns the value of the norm of an IntegerVector. - Standard_EXPORT Standard_Real Norm() const; - - //! returns the value of the square of the norm of an IntegerVector. - Standard_EXPORT Standard_Real Norm2() const; - - //! returns the value of the Index of the maximum element of an IntegerVector. - Standard_EXPORT Standard_Integer Max() const; - - //! returns the value of the Index of the minimum element of an IntegerVector. - Standard_EXPORT Standard_Integer Min() const; - - //! inverses an IntegerVector. - Standard_EXPORT void Invert(); - - //! returns the inverse IntegerVector of an IntegerVector. - Standard_EXPORT math_IntegerVector Inverse() const; - - //! sets an IntegerVector from "theI1" to "theI2" to the IntegerVector "theV"; - //! An exception is raised if "theI1" is less than "LowerIndex" or "theI2" is greater than "UpperIndex" or "theI1" is greater than "theI2". - //! An exception is raised if "theI2-theI1+1" is different from the Length of "theV". - Standard_EXPORT void Set(const Standard_Integer theI1, const Standard_Integer theI2, const math_IntegerVector& theV); - - //! slices the values of the IntegerVector between "theI1" and "theI2": - //! Example: [2, 1, 2, 3, 4, 5] becomes [2, 4, 3, 2, 1, 5] between 2 and 5. - //! An exception is raised if "theI1" is less than "LowerIndex" or "theI2" is greater than "UpperIndex". - Standard_EXPORT math_IntegerVector Slice(const Standard_Integer theI1, const Standard_Integer theI2) const; - - //! returns the product of an IntegerVector by an integer value. - Standard_EXPORT void Multiply(const Standard_Integer theRight); - - void operator *=(const Standard_Integer theRight) - { - Multiply(theRight); - } - - //! returns the product of an IntegerVector by an integer value. - Standard_NODISCARD Standard_EXPORT math_IntegerVector Multiplied(const Standard_Integer theRight) const; - - Standard_NODISCARD math_IntegerVector operator*(const Standard_Integer theRight) const - { - return Multiplied(theRight); - } - - //! returns the product of a vector and a real value. - Standard_NODISCARD Standard_EXPORT math_IntegerVector TMultiplied(const Standard_Integer theRight) const; - - friend inline math_IntegerVector operator* (const Standard_Integer theLeft, const math_IntegerVector& theRight) - { - return theRight.Multiplied(theLeft); - } - - //! adds the IntegerVector "theRight" to an IntegerVector. - //! An exception is raised if the IntegerVectors have not the same length. - //! An exception is raised if the lengths are not equal. - Standard_EXPORT void Add(const math_IntegerVector& theRight); - - void operator +=(const math_IntegerVector& theRight) - { - Add(theRight); - } - - //! adds the IntegerVector "theRight" to an IntegerVector. - //! An exception is raised if the IntegerVectors have not the same length. - //! An exception is raised if the lengths are not equal. - Standard_NODISCARD Standard_EXPORT math_IntegerVector Added(const math_IntegerVector& theRight) const; - - Standard_NODISCARD math_IntegerVector operator+(const math_IntegerVector& theRight) const - { - return Added(theRight); - } - - //! sets an IntegerVector to the sum of the IntegerVector - //! "theLeft" and the IntegerVector "theRight". - //! An exception is raised if the lengths are different. - Standard_EXPORT void Add(const math_IntegerVector& theLeft, const math_IntegerVector& theRight); - - //! sets an IntegerVector to the substraction of "theRight" from "theLeft". - //! An exception is raised if the IntegerVectors have not the same length. - Standard_EXPORT void Subtract(const math_IntegerVector& theLeft, const math_IntegerVector& theRight); - - //! accesses the value of index theNum of an IntegerVector. - const Standard_Integer& Value (const Standard_Integer theNum) const - { - return Array(theNum); - } - - //! accesses (in read or write mode) the value of index theNum of an IntegerVector. - inline Standard_Integer& Value (const Standard_Integer theNum) - { - return Array(theNum); - } - - const Standard_Integer& operator()(const Standard_Integer theNum) const - { - return Value(theNum); - } - - Standard_Integer& operator()(const Standard_Integer theNum) - { - return Value(theNum); - } - - //! Initialises an IntegerVector by copying "theOther". - //! An exception is raised if the Lengths are different. - Standard_EXPORT math_IntegerVector& Initialized(const math_IntegerVector& theOther); - - math_IntegerVector& operator=(const math_IntegerVector& theOther) - { - return Initialized(theOther); - } - - //! returns the inner product of 2 IntegerVectors. - //! An exception is raised if the lengths are not equal. - Standard_NODISCARD Standard_EXPORT Standard_Integer Multiplied(const math_IntegerVector& theRight) const; - - Standard_NODISCARD Standard_Integer operator*(const math_IntegerVector& theRight) const - { - return Multiplied(theRight); - } - - //! returns the opposite of an IntegerVector. - Standard_EXPORT math_IntegerVector Opposite(); - - math_IntegerVector operator-() - { - return Opposite(); - } - - //! returns the subtraction of "theRight" from "me". - //! An exception is raised if the IntegerVectors have not the same length. - Standard_EXPORT void Subtract(const math_IntegerVector& theRight); - - void operator-=(const math_IntegerVector& theRight) - { - Subtract(theRight); - } - - //! returns the subtraction of "theRight" from "me". - //! An exception is raised if the IntegerVectors have not the same length. - Standard_NODISCARD Standard_EXPORT math_IntegerVector Subtracted(const math_IntegerVector& theRight) const; - - Standard_NODISCARD math_IntegerVector operator-(const math_IntegerVector& theRight) const - { - return Subtracted(theRight); - } - - //! returns the multiplication of an integer by an IntegerVector. - Standard_EXPORT void Multiply(const Standard_Integer theLeft,const math_IntegerVector& theRight); - - //! Prints on the stream theO information on the current state of the object. - //! Is used to redefine the operator <<. - Standard_EXPORT void Dump(Standard_OStream& theO) const; - - friend inline Standard_OStream& operator<<(Standard_OStream& theO, const math_IntegerVector& theVec) - { - theVec.Dump(theO); - return theO; - } - -protected: - - //! is used internally to set the Lower value of the IntegerVector. - void SetFirst(const Standard_Integer theFirst); - -private: - - NCollection_LocalArray myLocArray; - NCollection_Array1 Array; - -}; +using math_IntegerVector = math_VectorBase; #endif diff --git a/src/math/math_Matrix.cxx b/src/math/math_Matrix.cxx index 5fa865e747..9d05df4251 100644 --- a/src/math/math_Matrix.cxx +++ b/src/math/math_Matrix.cxx @@ -12,9 +12,10 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. +#include #include -#include +#include #include #include #include @@ -644,6 +645,15 @@ math_Vector math_Matrix::Multiplied(const math_Vector& Right)const return Result; } +//================================================================ +// Function : operator* +// Purpose : +//================================================================ +math_VectorBase<> math_Matrix::operator* (const math_VectorBase<>& Right) const +{ + return Multiplied(Right); +} + math_Matrix& math_Matrix::Initialized(const math_Matrix& Other) { Standard_DimensionError_Raise_if ((RowNumber() != Other.RowNumber()) diff --git a/src/math/math_Matrix.hxx b/src/math/math_Matrix.hxx index 3373a44a46..d3d6feeba8 100644 --- a/src/math/math_Matrix.hxx +++ b/src/math/math_Matrix.hxx @@ -19,9 +19,9 @@ #include #include +#include #include -#include #include // resolve name collisions with X11 headers @@ -29,6 +29,8 @@ #undef Opposite #endif +template class math_VectorBase; + //! This class implements the real matrix abstract data type. //! Matrixes can have an arbitrary range which must be defined //! at the declaration and cannot be changed after this declaration @@ -74,6 +76,7 @@ public: DEFINE_STANDARD_ALLOC + friend class math_VectorBase<>; //! Constructs a non-initialized matrix of range [LowerRow..UpperRow, //! LowerCol..UpperCol] @@ -278,24 +281,24 @@ Standard_NODISCARD math_Matrix operator- (const math_Matrix& Right) const //! An exception is raised if the dimensions are different. //! An exception is raises if is inferior to the lower //! row of the matrix or is superior to the upper row. - Standard_EXPORT void SetRow (const Standard_Integer Row, const math_Vector& V); + Standard_EXPORT void SetRow (const Standard_Integer Row, const math_VectorBase<>& V); //! Sets the column of index Col of a matrix to the vector . //! An exception is raised if the dimensions are different. //! An exception is raises if is inferior to the lower //! column of the matrix or is superior to the upper //! column. - Standard_EXPORT void SetCol (const Standard_Integer Col, const math_Vector& V); + Standard_EXPORT void SetCol (const Standard_Integer Col, const math_VectorBase<>& V); //! Sets the diagonal of a matrix to the value . //! An exception is raised if the matrix is not square. Standard_EXPORT void SetDiag (const Standard_Real Value); //! Returns the row of index Row of a matrix. - Standard_EXPORT math_Vector Row (const Standard_Integer Row) const; + Standard_EXPORT math_VectorBase<> Row (const Standard_Integer Row) const; //! Returns the column of index of a matrix. - Standard_EXPORT math_Vector Col (const Standard_Integer Col) const; + Standard_EXPORT math_VectorBase<> Col (const Standard_Integer Col) const; //! Swaps the rows of index Row1 and Row2. //! An exception is raised if or is out of range. @@ -322,7 +325,7 @@ Standard_NODISCARD math_Matrix operator- (const math_Matrix& Right) const //! Computes a matrix as the product of 2 vectors. //! An exception is raised if the dimensions are different. //! = * . - Standard_EXPORT void Multiply (const math_Vector& Left, const math_Vector& Right); + Standard_EXPORT void Multiply (const math_VectorBase<>& Left, const math_VectorBase<>& Right); //! Computes a matrix as the product of 2 matrixes. //! An exception is raised if the dimensions are different. @@ -374,11 +377,8 @@ Standard_NODISCARD math_Matrix operator* (const math_Matrix& Right) const //! Returns the product of a matrix by a vector. //! An exception is raised if the dimensions are different. - Standard_NODISCARD Standard_EXPORT math_Vector Multiplied (const math_Vector& Right) const; -Standard_NODISCARD math_Vector operator* (const math_Vector& Right) const -{ - return Multiplied(Right); -} + Standard_NODISCARD Standard_EXPORT math_VectorBase<> Multiplied (const math_VectorBase<>& Right) const; + Standard_NODISCARD Standard_EXPORT math_VectorBase<> operator* (const math_VectorBase<>& Right) const; //! Returns the opposite of a matrix. //! An exception is raised if the dimensions are different. @@ -392,10 +392,6 @@ math_Matrix operator-() //! Is used to redefine the operator <<. Standard_EXPORT void Dump (Standard_OStream& o) const; - -friend class math_Vector; - - protected: @@ -409,7 +405,7 @@ protected: //! The new lower row of the matrix is set to //! and the new lower column of the matrix is set to the column //! of range . - void SetLower (const Standard_Integer LowerRow, const Standard_Integer LowerCol); + void SetLower (const Standard_Integer LowerRow, const Standard_Integer LowerCol); diff --git a/src/math/math_Matrix.lxx b/src/math/math_Matrix.lxx index e61b206eef..a5397716eb 100644 --- a/src/math/math_Matrix.lxx +++ b/src/math/math_Matrix.lxx @@ -15,7 +15,6 @@ // lpa le 29/10/91 #include -#include inline Standard_OStream& operator<<(Standard_OStream& o, const math_Matrix& mat) diff --git a/src/math/math_Recipes.hxx b/src/math/math_Recipes.hxx index 50a79acb97..8c6a100f03 100644 --- a/src/math/math_Recipes.hxx +++ b/src/math/math_Recipes.hxx @@ -17,8 +17,11 @@ #include -class math_IntegerVector; -class math_Vector; +#include + +template class math_VectorBase; +using math_IntegerVector = math_VectorBase; +using math_Vector = math_VectorBase; class math_Matrix; const Standard_Integer math_Status_UserAborted = -1; diff --git a/src/math/math_Vector.cxx b/src/math/math_Vector.cxx deleted file mode 100644 index b57bbe39d5..0000000000 --- a/src/math/math_Vector.cxx +++ /dev/null @@ -1,502 +0,0 @@ -// Copyright (c) 1997-1999 Matra Datavision -// Copyright (c) 1999-2014 OPEN CASCADE SAS -// -// This file is part of Open CASCADE Technology software library. -// -// This library is free software; you can redistribute it and/or modify it under -// the terms of the GNU Lesser General Public License version 2.1 as published -// by the Free Software Foundation, with special exception defined in the file -// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT -// distribution for complete text of the license and disclaimer of any warranty. -// -// Alternatively, this file may be used under the terms of Open CASCADE -// commercial license or contractual agreement. - -#include - -#include -#include - -#include -#include -#include -#include - -math_Vector::math_Vector(const Standard_Integer theLower, const Standard_Integer theUpper) -: myLocArray (theUpper - theLower + 1), - Array (myLocArray[0], theLower, theUpper) -{ - // -} - -math_Vector::math_Vector(const Standard_Integer theLower, - const Standard_Integer theUpper, - const Standard_Real theInitialValue) -: myLocArray (theUpper - theLower + 1), - Array (myLocArray[0], theLower, theUpper) -{ - Array.Init(theInitialValue); -} - -math_Vector::math_Vector(const Standard_Real* theTab, - const Standard_Integer theLower, - const Standard_Integer theUpper) -: Array (*theTab, theLower, theUpper) -{ - Standard_RangeError_Raise_if ((theLower > theUpper), "math_Vector() - invalid dimensions"); -} - -math_Vector::math_Vector (const gp_XY& theOther) -: myLocArray (2), - Array (myLocArray[0], 1,2) -{ - Array(1) = theOther.X(); - Array(2) = theOther.Y(); -} - -math_Vector::math_Vector (const gp_XYZ& theOther) -: myLocArray (3), - Array (myLocArray[0], 1, 3) -{ - Array(1) = theOther.X(); - Array(2) = theOther.Y(); - Array(3) = theOther.Z(); -} - -void math_Vector::Init(const Standard_Real theInitialValue) -{ - Array.Init(theInitialValue); -} - -math_Vector::math_Vector (const math_Vector& theOther) -: myLocArray (theOther.Length()), - Array (myLocArray[0], theOther.Lower(), theOther.Upper()) -{ - memcpy (&myLocArray[0], &theOther.Array.First(), sizeof(Standard_Real) * theOther.Length()); -} - -void math_Vector::SetLower(const Standard_Integer theLower) -{ - Array.Resize (theLower, Array.Upper() - Array.Lower() + theLower, Standard_False); -} - -Standard_Real math_Vector::Norm() const -{ - Standard_Real Result = 0; - - for(Standard_Integer Index = Lower(); Index <= Upper(); Index++) - { - Result = Result + Array(Index) * Array(Index); - } - return Sqrt(Result); -} - -Standard_Real math_Vector::Norm2() const -{ - Standard_Real Result = 0; - - for(Standard_Integer Index = Lower(); Index <= Upper(); Index++) - { - Result = Result + Array(Index) * Array(Index); - } - return Result; -} - -Standard_Integer math_Vector::Max() const -{ - Standard_Integer I=0; - Standard_Real X = RealFirst(); - - for(Standard_Integer Index = Lower(); Index <= Upper(); Index++) - { - if(Array(Index) > X) - { - X = Array(Index); - I = Index; - } - } - return I; -} - -Standard_Integer math_Vector::Min() const -{ - Standard_Integer I=0; - Standard_Real X = RealLast(); - - for(Standard_Integer Index = Lower(); Index <= Upper(); Index++) - { - if(Array(Index) < X) - { - X = Array(Index); - I = Index; - } - } - return I; -} - -void math_Vector::Set(const Standard_Integer theI1, - const Standard_Integer theI2, - const math_Vector &theV) -{ - Standard_RangeError_Raise_if ((theI1 < Lower()) || (theI2 > Upper()) - || (theI1 > theI2) || (theI2 - theI1 + 1 != theV.Length()), - "math_Vector::Set() - invalid indices"); - - Standard_Integer I = theV.Lower(); - for(Standard_Integer Index = theI1; Index <= theI2; Index++) - { - Array(Index) = theV.Array(I); - I++; - } -} - -void math_Vector::Normalize() -{ - Standard_Real Result = Norm(); - Standard_NullValue_Raise_if ((Result <= RealEpsilon()), - "math_Vector::Normalize() - vector has zero norm"); - for(Standard_Integer Index = Lower(); Index <= Upper(); Index++) - { - Array(Index) = Array(Index) / Result; - } -} - -math_Vector math_Vector::Normalized() const -{ - math_Vector Result = *this; - - Result.Normalize(); - return Result; -} - -void math_Vector::Invert() -{ - for(Standard_Integer Index = Lower(); Index <= (Lower() + Length()) >> 1 ; Index++) - { - Standard_Integer J = Upper() + Lower() - Index; - Standard_Real aTemp = Array(Index); - Array(Index) = Array(J); - Array(J) = aTemp; - } -} - -math_Vector math_Vector::Inverse() const -{ - math_Vector Result = *this; - Result.Invert(); - return Result; -} - -math_Vector math_Vector::Multiplied(const Standard_Real theRight) const -{ - math_Vector Result (Lower(), Upper()); - for(Standard_Integer Index = Lower(); Index <= Upper(); Index++) - { - Result.Array(Index) = Array(Index) * theRight; - } - return Result; -} - -math_Vector math_Vector::TMultiplied(const Standard_Real theRight) const -{ - math_Vector Result (Lower(), Upper()); - for(Standard_Integer Index = Lower(); Index <= Upper(); Index++) - { - Result.Array(Index) = Array(Index) * theRight; - } - return Result; -} - -void math_Vector::Multiply(const Standard_Real theRight) -{ - for(Standard_Integer Index = Lower(); Index <= Upper(); Index++) - { - Array(Index) = Array(Index) * theRight; - } -} - -void math_Vector::Divide(const Standard_Real theRight) -{ - Standard_DivideByZero_Raise_if (Abs(theRight) <= RealEpsilon(), - "math_Vector::Divide() - devisor is zero"); - - for(Standard_Integer Index = Lower(); Index <= Upper(); Index++) - { - Array(Index) = Array(Index) / theRight; - } -} - -math_Vector math_Vector::Divided (const Standard_Real theRight) const -{ - Standard_DivideByZero_Raise_if (Abs(theRight) <= RealEpsilon(), - "math_Vector::Divided() - devisor is zero"); - math_Vector temp = Multiplied(1./theRight); - return temp; -} - -void math_Vector::Add(const math_Vector& theRight) -{ - Standard_DimensionError_Raise_if (Length() != theRight.Length(), - "math_Vector::Add() - input vector has wrong dimensions"); - - Standard_Integer I = theRight.Lower(); - for(Standard_Integer Index = Lower(); Index <= Upper(); Index++) - { - Array(Index) = Array(Index) + theRight.Array(I); - I++; - } -} - -math_Vector math_Vector::Added(const math_Vector& theRight) const -{ - Standard_DimensionError_Raise_if (Length() != theRight.Length(), - "math_Vector::Added() - input vector has wrong dimensions"); - - math_Vector Result (Lower(), Upper()); - - Standard_Integer I = theRight.Lower(); - for(Standard_Integer Index = Lower(); Index <= Upper(); Index++) - { - Result.Array(Index) = Array(Index) + theRight.Array(I); - I++; - } - return Result; -} - -void math_Vector::Subtract(const math_Vector& theRight) -{ - Standard_DimensionError_Raise_if (Length() != theRight.Length(), - "math_Vector::Subtract() - input vector has wrong dimensions"); - - Standard_Integer I = theRight.Lower(); - for(Standard_Integer Index = Lower(); Index <= Upper(); Index++) - { - Array(Index) = Array(Index) - theRight.Array(I); - I++; - } -} - -math_Vector math_Vector::Subtracted (const math_Vector& theRight) const -{ - Standard_DimensionError_Raise_if (Length() != theRight.Length(), - "math_Vector::Subtracted() - input vector has wrong dimensions"); - - math_Vector Result(Lower(), Upper()); - - Standard_Integer I = theRight.Lower(); - for(Standard_Integer Index = Lower(); Index <= Upper(); Index++) - { - Result.Array(Index) = Array(Index) - theRight.Array(I); - I++; - } - return Result; -} - -math_Vector math_Vector::Slice(const Standard_Integer theI1, const Standard_Integer theI2) const -{ - Standard_RangeError_Raise_if ((theI1 < Lower()) || (theI1 > Upper()) || (theI2 < Lower()) || (theI2 > Upper()), - "math_Vector::Slice() - invalid indices"); - - if(theI2 >= theI1) - { - math_Vector Result(theI1, theI2); - for(Standard_Integer Index = theI1; Index <= theI2; Index++) - { - Result.Array(Index) = Array(Index); - } - return Result; - } - else - { - math_Vector Result(theI2, theI1); - for(Standard_Integer Index = theI1; Index >= theI2; Index--) - { - Result.Array(Index) = Array(Index); - } - return Result; - } -} - -void math_Vector::Add (const math_Vector& theLeft, const math_Vector& theRight) -{ - Standard_DimensionError_Raise_if ((Length() != theRight.Length()) || (theRight.Length() != theLeft.Length()), - "math_Vector::Add() - input vectors have wrong dimensions"); - - Standard_Integer I = theLeft.Lower(); - Standard_Integer J = theRight.Lower(); - for(Standard_Integer Index = Lower(); Index <= Upper(); Index++) - { - Array(Index) = theLeft.Array(I) + theRight.Array(J); - I++; - J++; - } -} - -void math_Vector::Subtract (const math_Vector& theLeft, const math_Vector& theRight) -{ - Standard_DimensionError_Raise_if ((Length() != theRight.Length()) || (theRight.Length() != theLeft.Length()), - "math_Vector::Subtract() - input vectors have wrong dimensions"); - - Standard_Integer I = theLeft.Lower(); - Standard_Integer J = theRight.Lower(); - for(Standard_Integer Index = Lower(); Index <= Upper(); Index++) - { - Array(Index) = theLeft.Array(I) - theRight.Array(J); - I++; - J++; - } -} - -void math_Vector::Multiply(const math_Matrix& theLeft, const math_Vector& theRight) -{ - Standard_DimensionError_Raise_if ((Length() != theLeft.RowNumber()) - || (theLeft.ColNumber() != theRight.Length()), - "math_Vector::Multiply() - input matrix and/or vector have wrong dimensions"); - - Standard_Integer Index = Lower(); - for(Standard_Integer I = theLeft.LowerRowIndex; I <= theLeft.UpperRowIndex; I++) - { - Array(Index) = 0.0; - Standard_Integer K = theRight.Lower(); - for(Standard_Integer J = theLeft.LowerColIndex; J <= theLeft.UpperColIndex; J++) - { - Array(Index) = Array(Index) + theLeft.Array(I, J) * theRight.Array(K); - K++; - } - Index++; - } -} - -void math_Vector::Multiply(const math_Vector& theLeft, const math_Matrix& theRight) -{ - Standard_DimensionError_Raise_if ((Length() != theRight.ColNumber()) - || (theLeft.Length() != theRight.RowNumber()), - "math_Vector::Multiply() - input matrix and/or vector have wrong dimensions"); - - Standard_Integer Index = Lower(); - for(Standard_Integer J = theRight.LowerColIndex; J <= theRight.UpperColIndex; J++) - { - Array(Index) = 0.0; - Standard_Integer K = theLeft.Lower(); - for(Standard_Integer I = theRight.LowerRowIndex; I <= theRight.UpperRowIndex; I++) - { - Array(Index) = Array(Index) + theLeft.Array(K) * theRight.Array(I, J); - K++; - } - Index++; - } -} - -void math_Vector::TMultiply(const math_Matrix& theTLeft, const math_Vector& theRight) -{ - Standard_DimensionError_Raise_if ((Length() != theTLeft.ColNumber()) - || (theTLeft.RowNumber() != theRight.Length()), - "math_Vector::TMultiply() - input matrix and/or vector have wrong dimensions"); - - Standard_Integer Index = Lower(); - for(Standard_Integer I = theTLeft.LowerColIndex; I <= theTLeft.UpperColIndex; I++) - { - Array(Index) = 0.0; - Standard_Integer K = theRight.Lower(); - for(Standard_Integer J = theTLeft.LowerRowIndex; J <= theTLeft.UpperRowIndex; J++) - { - Array(Index) = Array(Index) + theTLeft.Array(J, I) * theRight.Array(K); - K++; - } - Index++; - } -} - -void math_Vector::TMultiply(const math_Vector& theLeft, const math_Matrix& theTRight) -{ - Standard_DimensionError_Raise_if ((Length() != theTRight.RowNumber()) - || (theLeft.Length() != theTRight.ColNumber()), - "math_Vector::TMultiply() - input matrix and/or vector have wrong dimensions"); - - Standard_Integer Index = Lower(); - for(Standard_Integer J = theTRight.LowerRowIndex; J <= theTRight.UpperRowIndex; J++) - { - Array(Index) = 0.0; - Standard_Integer K = theLeft.Lower(); - for(Standard_Integer I = theTRight.LowerColIndex; - I <= theTRight.UpperColIndex; I++) - { - Array(Index) = Array(Index) + theLeft.Array(K) * theTRight.Array(J, I); - K++; - } - Index++; - } -} - -Standard_Real math_Vector::Multiplied(const math_Vector& theRight) const -{ - Standard_Real Result = 0; - - Standard_DimensionError_Raise_if (Length() != theRight.Length(), - "math_Vector::Multiplied() - input vector has wrong dimensions"); - - Standard_Integer I = theRight.Lower(); - for(Standard_Integer Index = Lower(); Index <= Upper(); Index++) - { - Result = Result + Array(Index) * theRight.Array(I); - I++; - } - return Result; -} - -math_Vector math_Vector::Opposite() -{ - math_Vector Result(Lower(), Upper()); - for(Standard_Integer Index = Lower(); Index <= Upper(); Index++) - { - Result.Array(Index) = - Array(Index); - } - return Result; -} - -math_Vector math_Vector::Multiplied(const math_Matrix& theRight)const -{ - Standard_DimensionError_Raise_if (Length() != theRight.RowNumber(), - "math_Vector::Multiplied() - input matrix has wrong dimensions"); - - math_Vector Result(theRight.LowerColIndex, theRight.UpperColIndex); - for(Standard_Integer J2 = theRight.LowerColIndex; J2 <= theRight.UpperColIndex; J2++) - { - Result.Array(J2) = 0.0; - Standard_Integer theI2 = theRight.LowerRowIndex; - for(Standard_Integer I = Lower(); I <= Upper(); I++) - { - Result.Array(J2) = Result.Array(J2) + Array(I) * theRight.Array(theI2, J2); - theI2++; - } - } - return Result; -} - -void math_Vector::Multiply(const Standard_Real theLeft, const math_Vector& theRight) -{ - Standard_DimensionError_Raise_if ((Length() != theRight.Length()), - "math_Vector::Multiply() - input vector has wrong dimensions"); - for(Standard_Integer I = Lower(); I <= Upper(); I++) - { - Array(I) = theLeft * theRight.Array(I); - } -} - -math_Vector& math_Vector::Initialized(const math_Vector& theOther) -{ - Standard_DimensionError_Raise_if (Length() != theOther.Length(), - "math_Vector::Initialized() - input vector has wrong dimensions"); - memmove (&Array.ChangeFirst(), &theOther.Array.First(), sizeof(Standard_Real) * Array.Length()); - return *this; -} - -void math_Vector::Dump(Standard_OStream& theO) const -{ - theO << "math_Vector of Length = " << Length() << "\n"; - for(Standard_Integer Index = Lower(); Index <= Upper(); Index++) - { - theO << "math_Vector(" << Index << ") = " << Array(Index) << "\n"; - } -} - diff --git a/src/math/math_Vector.hxx b/src/math/math_Vector.hxx index 15b86ccd34..7e19a1f2d4 100644 --- a/src/math/math_Vector.hxx +++ b/src/math/math_Vector.hxx @@ -15,17 +15,7 @@ #ifndef _math_Vector_HeaderFile #define _math_Vector_HeaderFile -#include -#include -#include -#include - -// resolve name collisions with X11 headers -#ifdef Opposite - #undef Opposite -#endif - -class math_Matrix; +#include //! This class implements the real vector abstract data type. //! Vectors can have an arbitrary range which must be defined at @@ -55,292 +45,6 @@ class math_Matrix; //! V3 = V1; // --> will raise DimensionError; //! V1.Add(V3) // --> will raise DimensionError; //! @endcode -class math_Vector -{ -public: - - DEFINE_STANDARD_ALLOC - - //! Constructs a non-initialized vector in the range [theLower..theUpper] - //! "theLower" and "theUpper" are the indexes of the lower and upper bounds of the constructed vector. - Standard_EXPORT math_Vector(const Standard_Integer theLower, const Standard_Integer theUpper); - - //! Constructs a vector in the range [theLower..theUpper] - //! whose values are all initialized with the value "theInitialValue" - Standard_EXPORT math_Vector(const Standard_Integer theLower, const Standard_Integer theUpper, const Standard_Real theInitialValue); - - //! Constructs a vector in the range [theLower..theUpper] - //! with the "c array" theTab. - Standard_EXPORT math_Vector(const Standard_Real* theTab, const Standard_Integer theLower, const Standard_Integer theUpper); - - //! Constructor for converting gp_XY to math_Vector - Standard_EXPORT math_Vector(const gp_XY& Other); - - //! Constructor for converting gp_XYZ to math_Vector - Standard_EXPORT math_Vector(const gp_XYZ& Other); - - //! Initialize all the elements of a vector with "theInitialValue". - Standard_EXPORT void Init(const Standard_Real theInitialValue); - - //! Constructs a copy for initialization. - //! An exception is raised if the lengths of the vectors are different. - Standard_EXPORT math_Vector(const math_Vector& theOther); - - //! Returns the length of a vector - inline Standard_Integer Length() const - { - return Array.Length(); - } - - //! Returns the value of the theLower index of a vector. - inline Standard_Integer Lower() const - { - return Array.Lower(); - } - - //! Returns the value of the theUpper index of a vector. - inline Standard_Integer Upper() const - { - return Array.Upper(); - } - - //! Returns the value or the square of the norm of this vector. - Standard_EXPORT Standard_Real Norm() const; - - //! Returns the value of the square of the norm of a vector. - Standard_EXPORT Standard_Real Norm2() const; - - //! Returns the value of the "Index" of the maximum element of a vector. - Standard_EXPORT Standard_Integer Max() const; - - //! Returns the value of the "Index" of the minimum element of a vector. - Standard_EXPORT Standard_Integer Min() const; - - //! Normalizes this vector (the norm of the result - //! is equal to 1.0) and assigns the result to this vector - //! Exceptions - //! Standard_NullValue if this vector is null (i.e. if its norm is - //! less than or equal to Standard_Real::RealEpsilon(). - Standard_EXPORT void Normalize(); - - //! Normalizes this vector (the norm of the result - //! is equal to 1.0) and creates a new vector - //! Exceptions - //! Standard_NullValue if this vector is null (i.e. if its norm is - //! less than or equal to Standard_Real::RealEpsilon(). - Standard_NODISCARD Standard_EXPORT math_Vector Normalized() const; - - //! Inverts this vector and assigns the result to this vector. - Standard_EXPORT void Invert(); - - //! Inverts this vector and creates a new vector. - Standard_EXPORT math_Vector Inverse() const; - - //! sets a vector from "theI1" to "theI2" to the vector "theV"; - //! An exception is raised if "theI1" is less than "LowerIndex" or "theI2" is greater than "UpperIndex" or "theI1" is greater than "theI2". - //! An exception is raised if "theI2-theI1+1" is different from the "Length" of "theV". - Standard_EXPORT void Set(const Standard_Integer theI1, const Standard_Integer theI2, const math_Vector& theV); - - //!Creates a new vector by inverting the values of this vector - //! between indexes "theI1" and "theI2". - //! If the values of this vector were (1., 2., 3., 4.,5., 6.), - //! by slicing it between indexes 2 and 5 the values - //! of the resulting vector are (1., 5., 4., 3., 2., 6.) - Standard_EXPORT math_Vector Slice(const Standard_Integer theI1, const Standard_Integer theI2) const; - - //! returns the product of a vector and a real value. - Standard_EXPORT void Multiply(const Standard_Real theRight); - - void operator *=(const Standard_Real theRight) - { - Multiply(theRight); - } - - //! returns the product of a vector and a real value. - Standard_NODISCARD Standard_EXPORT math_Vector Multiplied(const Standard_Real theRight) const; - - Standard_NODISCARD math_Vector operator*(const Standard_Real theRight) const - { - return Multiplied(theRight); - } - - //! returns the product of a vector and a real value. - Standard_NODISCARD Standard_EXPORT math_Vector TMultiplied(const Standard_Real theRight) const; - - friend inline math_Vector operator* (const Standard_Real theLeft, const math_Vector& theRight) - { - return theRight.Multiplied(theLeft); - } - - //! divides a vector by the value "theRight". - //! An exception is raised if "theRight" = 0. - Standard_EXPORT void Divide(const Standard_Real theRight); - - void operator /=(const Standard_Real theRight) - { - Divide(theRight); - } - - //! divides a vector by the value "theRight". - //! An exception is raised if "theRight" = 0. - Standard_NODISCARD Standard_EXPORT math_Vector Divided(const Standard_Real theRight) const; - - Standard_NODISCARD math_Vector operator/(const Standard_Real theRight) const - { - return Divided(theRight); - } - - //! adds the vector "theRight" to a vector. - //! An exception is raised if the vectors have not the same length. - //! Warning - //! In order to avoid time-consuming copying of vectors, it - //! is preferable to use operator += or the function Add whenever possible. - Standard_EXPORT void Add(const math_Vector& theRight); - - void operator +=(const math_Vector& theRight) - { - Add(theRight); - } - - //! adds the vector theRight to a vector. - //! An exception is raised if the vectors have not the same length. - //! An exception is raised if the lengths are not equal. - Standard_NODISCARD Standard_EXPORT math_Vector Added(const math_Vector& theRight) const; - - Standard_NODISCARD math_Vector operator+(const math_Vector& theRight) const - { - return Added(theRight); - } - - //! sets a vector to the product of the vector "theLeft" - //! with the matrix "theRight". - Standard_EXPORT void Multiply(const math_Vector& theLeft, const math_Matrix& theRight); - - //!sets a vector to the product of the matrix "theLeft" - //! with the vector "theRight". - Standard_EXPORT void Multiply(const math_Matrix& theLeft, const math_Vector& theRight); - - //! sets a vector to the product of the transpose - //! of the matrix "theTLeft" by the vector "theRight". - Standard_EXPORT void TMultiply(const math_Matrix& theTLeft, const math_Vector& theRight); - - //! sets a vector to the product of the vector - //! "theLeft" by the transpose of the matrix "theTRight". - Standard_EXPORT void TMultiply(const math_Vector& theLeft, const math_Matrix& theTRight); - - //! sets a vector to the sum of the vector "theLeft" - //! and the vector "theRight". - //! An exception is raised if the lengths are different. - Standard_EXPORT void Add(const math_Vector& theLeft, const math_Vector& theRight); - - //! sets a vector to the Subtraction of the - //! vector theRight from the vector theLeft. - //! An exception is raised if the vectors have not the same length. - //! Warning - //! In order to avoid time-consuming copying of vectors, it - //! is preferable to use operator -= or the function - //! Subtract whenever possible. - Standard_EXPORT void Subtract(const math_Vector& theLeft,const math_Vector& theRight); - - //! accesses the value of index "theNum" of a vector. - const Standard_Real& Value (const Standard_Integer theNum) const - { - return Array(theNum); - } - - //! accesses (in read or write mode) the value of index "theNum" of a vector. - inline Standard_Real& Value (const Standard_Integer theNum) - { - return Array(theNum); - } - - const Standard_Real& operator()(const Standard_Integer theNum) const - { - return Value(theNum); - } - - Standard_Real& operator()(const Standard_Integer theNum) - { - return Value(theNum); - } - - //! Initialises a vector by copying "theOther". - //! An exception is raised if the Lengths are different. - Standard_EXPORT math_Vector& Initialized(const math_Vector& theOther); - - math_Vector& operator=(const math_Vector& theOther) - { - return Initialized(theOther); - } - - //! returns the inner product of 2 vectors. - //! An exception is raised if the lengths are not equal. - Standard_NODISCARD Standard_EXPORT Standard_Real Multiplied(const math_Vector& theRight) const; - Standard_NODISCARD Standard_Real operator*(const math_Vector& theRight) const - { - return Multiplied(theRight); - } - - //! returns the product of a vector by a matrix. - Standard_NODISCARD Standard_EXPORT math_Vector Multiplied(const math_Matrix& theRight) const; - - Standard_NODISCARD math_Vector operator*(const math_Matrix& theRight) const - { - return Multiplied(theRight); - } - - //! returns the opposite of a vector. - Standard_EXPORT math_Vector Opposite(); - - math_Vector operator-() - { - return Opposite(); - } - - //! returns the subtraction of "theRight" from "me". - //! An exception is raised if the vectors have not the same length. - Standard_EXPORT void Subtract(const math_Vector& theRight); - - void operator-=(const math_Vector& theRight) - { - Subtract(theRight); - } - - //! returns the subtraction of "theRight" from "me". - //! An exception is raised if the vectors have not the same length. - Standard_NODISCARD Standard_EXPORT math_Vector Subtracted(const math_Vector& theRight) const; - - Standard_NODISCARD math_Vector operator-(const math_Vector& theRight) const - { - return Subtracted(theRight); - } - - //! returns the multiplication of a real by a vector. - //! "me" = "theLeft" * "theRight" - Standard_EXPORT void Multiply(const Standard_Real theLeft,const math_Vector& theRight); - - //! Prints information on the current state of the object. - //! Is used to redefine the operator <<. - Standard_EXPORT void Dump(Standard_OStream& theO) const; - - friend inline Standard_OStream& operator<<(Standard_OStream& theO, const math_Vector& theVec) - { - theVec.Dump(theO); - return theO; - } - - friend class math_Matrix; - -protected: - - //! Is used internally to set the "theLower" value of the vector. - void SetLower(const Standard_Integer theLower); - -private: - - NCollection_LocalArray myLocArray; - NCollection_Array1 Array; - -}; +using math_Vector = math_VectorBase; #endif diff --git a/src/math/math_VectorBase.hxx b/src/math/math_VectorBase.hxx new file mode 100644 index 0000000000..cdb20cab62 --- /dev/null +++ b/src/math/math_VectorBase.hxx @@ -0,0 +1,352 @@ +// Copyright (c) 1997-1999 Matra Datavision +// Copyright (c) 1999-2023 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 _math_VectorBase_HeaderFile +#define _math_VectorBase_HeaderFile + +#include +#include +#include + +// resolve name collisions with X11 headers +#ifdef Opposite +#undef Opposite +#endif + +#include + +#include + +//! This class implements the real vector abstract data type. +//! Vectors can have an arbitrary range which must be defined at +//! the declaration and cannot be changed after this declaration. +//! @code +//! math_VectorBase V1(-3, 5); // a vector with range [-3..5] +//! @endcode +//! +//! Vector are copied through assignment: +//! @code +//! math_VectorBase V2( 1, 9); +//! .... +//! V2 = V1; +//! V1(1) = 2.0; // the vector V2 will not be modified. +//! @endcode +//! +//! The Exception RangeError is raised when trying to access outside +//! the range of a vector : +//! @code +//! V1(11) = 0.0 // --> will raise RangeError; +//! @endcode +//! +//! The Exception DimensionError is raised when the dimensions of two +//! vectors are not compatible : +//! @code +//! math_VectorBase V3(1, 2); +//! V3 = V1; // --> will raise DimensionError; +//! V1.Add(V3) // --> will raise DimensionError; +//! @endcode +template +class math_VectorBase +{ + static const int THE_BUFFER_SIZE = 32; + +public: + //! Memory allocation + DEFINE_STANDARD_ALLOC; + DEFINE_NCOLLECTION_ALLOC; +public: + + //! Constructs a non-initialized vector in the range [theLower..theUpper] + //! "theLower" and "theUpper" are the indexes of the lower and upper bounds of the constructed vector. + inline math_VectorBase(const Standard_Integer theLower, const Standard_Integer theUpper); + + //! Constructs a vector in the range [theLower..theUpper] + //! whose values are all initialized with the value "theInitialValue" + inline math_VectorBase(const Standard_Integer theLower, const Standard_Integer theUpper, const TheItemType theInitialValue); + + //! Constructs a vector in the range [theLower..theUpper] + //! whose values are all initialized with the value "theInitialValue" + inline math_VectorBase(const TheItemType* theTab, const Standard_Integer theLower, const Standard_Integer theUpper); + + //! Constructor for converting gp_XY to math_VectorBase + inline math_VectorBase(const gp_XY& Other); + + //! Constructor for converting gp_XYZ to math_VectorBase + inline math_VectorBase(const gp_XYZ& Other); + + //! Initialize all the elements of a vector with "theInitialValue". + void Init(const TheItemType theInitialValue); + + //! Constructs a copy for initialization. + //! An exception is raised if the lengths of the vectors are different. + inline math_VectorBase(const math_VectorBase& theOther); + + //! Returns the length of a vector + inline Standard_Integer Length() const + { + return Array.Length(); + } + + //! Returns the lower index of the vector + inline Standard_Integer Lower() const + { + return Array.Lower(); + } + + //! Returns the upper index of the vector + inline Standard_Integer Upper() const + { + return Array.Upper(); + } + + //! Returns the value or the square of the norm of this vector. + inline Standard_Real Norm() const; + + //! Returns the value of the square of the norm of a vector. + inline Standard_Real Norm2() const; + + //! Returns the index of the maximum element of a vector. (first found) + inline Standard_Integer Max() const; + + //! Returns the index of the minimum element of a vector. (first found) + inline Standard_Integer Min() const; + + //! Normalizes this vector (the norm of the result + //! is equal to 1.0) and assigns the result to this vector + //! Exceptions + //! Standard_NullValue if this vector is null (i.e. if its norm is + //! less than or equal to Standard_Real::RealEpsilon(). + inline void Normalize(); + + //! Normalizes this vector (the norm of the result + //! is equal to 1.0) and creates a new vector + //! Exceptions + //! Standard_NullValue if this vector is null (i.e. if its norm is + //! less than or equal to Standard_Real::RealEpsilon(). + Standard_NODISCARD inline math_VectorBase Normalized() const; + + //! Inverts this vector and assigns the result to this vector. + inline void Invert(); + + //! Inverts this vector and creates a new vector. + inline math_VectorBase Inverse() const; + + //! sets a vector from "theI1" to "theI2" to the vector "theV"; + //! An exception is raised if "theI1" is less than "LowerIndex" or "theI2" is greater than "UpperIndex" or "theI1" is greater than "theI2". + //! An exception is raised if "theI2-theI1+1" is different from the "Length" of "theV". + inline void Set(const Standard_Integer theI1, const Standard_Integer theI2, const math_VectorBase& theV); + + //!Creates a new vector by inverting the values of this vector + //! between indexes "theI1" and "theI2". + //! If the values of this vector were (1., 2., 3., 4.,5., 6.), + //! by slicing it between indexes 2 and 5 the values + //! of the resulting vector are (1., 5., 4., 3., 2., 6.) + inline math_VectorBase Slice(const Standard_Integer theI1, const Standard_Integer theI2) const; + + //! Updates current vector by multiplying each element on current value. + inline void Multiply(const TheItemType theRight); + + void operator *=(const TheItemType theRight) + { + Multiply(theRight); + } + + //! returns the product of a vector and a real value. + Standard_NODISCARD inline math_VectorBase Multiplied(const TheItemType theRight) const; + + Standard_NODISCARD math_VectorBase operator*(const TheItemType theRight) const + { + return Multiplied(theRight); + } + + //! returns the product of a vector and a real value. + Standard_NODISCARD inline math_VectorBase TMultiplied(const TheItemType theRight) const; + + friend inline math_VectorBase operator* (const TheItemType theLeft, const math_VectorBase& theRight) + { + return theRight.Multiplied(theLeft); + } + + //! divides a vector by the value "theRight". + //! An exception is raised if "theRight" = 0. + inline void Divide(const TheItemType theRight); + + void operator /=(const TheItemType theRight) + { + Divide(theRight); + } + + //! Returns new vector as dividing current vector with the value "theRight". + //! An exception is raised if "theRight" = 0. + Standard_NODISCARD inline math_VectorBase Divided(const TheItemType theRight) const; + + Standard_NODISCARD math_VectorBase operator/(const TheItemType theRight) const + { + return Divided(theRight); + } + + //! adds the vector "theRight" to a vector. + //! An exception is raised if the vectors have not the same length. + //! Warning + //! In order to avoid time-consuming copying of vectors, it + //! is preferable to use operator += or the function Add whenever possible. + inline void Add(const math_VectorBase& theRight); + + void operator +=(const math_VectorBase& theRight) + { + Add(theRight); + } + + //! Returns new vector as adding curent vector with the value "theRight". + //! An exception is raised if the vectors have not the same length. + //! An exception is raised if the lengths are not equal. + Standard_NODISCARD inline math_VectorBase Added(const math_VectorBase& theRight) const; + + Standard_NODISCARD math_VectorBase operator+(const math_VectorBase& theRight) const + { + return Added(theRight); + } + + //! sets a vector to the product of the vector "theLeft" + //! with the matrix "theRight". + inline void Multiply(const math_VectorBase& theLeft, const math_Matrix& theRight); + + //!sets a vector to the product of the matrix "theLeft" + //! with the vector "theRight". + inline void Multiply(const math_Matrix& theLeft, const math_VectorBase& theRight); + + //! sets a vector to the product of the transpose + //! of the matrix "theTLeft" by the vector "theRight". + inline void TMultiply(const math_Matrix& theTLeft, const math_VectorBase& theRight); + + //! sets a vector to the product of the vector + //! "theLeft" by the transpose of the matrix "theTRight". + inline void TMultiply(const math_VectorBase& theLeft, const math_Matrix& theTRight); + + //! sets a vector to the sum of the vector "theLeft" + //! and the vector "theRight". + //! An exception is raised if the lengths are different. + inline void Add(const math_VectorBase& theLeft, const math_VectorBase& theRight); + + //! sets a vector to the Subtraction of the + //! vector theRight from the vector theLeft. + //! An exception is raised if the vectors have not the same length. + //! Warning + //! In order to avoid time-consuming copying of vectors, it + //! is preferable to use operator -= or the function + //! Subtract whenever possible. + inline void Subtract(const math_VectorBase& theLeft, const math_VectorBase& theRight); + + //! accesses the value of index "theNum" of a vector. + const TheItemType& Value(const Standard_Integer theNum) const + { + return Array(theNum); + } + + //! accesses (in read or write mode) the value of index "theNum" of a vector. + inline TheItemType& Value(const Standard_Integer theNum) + { + return Array(theNum); + } + + const TheItemType& operator()(const Standard_Integer theNum) const + { + return Value(theNum); + } + + TheItemType& operator()(const Standard_Integer theNum) + { + return Value(theNum); + } + + //! Initialises a vector by copying "theOther". + //! An exception is raised if the Lengths are different. + inline math_VectorBase& Initialized(const math_VectorBase& theOther); + + math_VectorBase& operator=(const math_VectorBase& theOther) + { + return Initialized(theOther); + } + + //! returns the inner product of 2 vectors. + //! An exception is raised if the lengths are not equal. + Standard_NODISCARD inline TheItemType Multiplied(const math_VectorBase& theRight) const; + Standard_NODISCARD inline TheItemType operator*(const math_VectorBase& theRight) const + { + return Multiplied(theRight); + } + + //! returns the product of a vector by a matrix. + Standard_NODISCARD inline math_VectorBase Multiplied(const math_Matrix& theRight) const; + + Standard_NODISCARD math_VectorBase operator*(const math_Matrix& theRight) const + { + return Multiplied(theRight); + } + + //! returns the opposite of a vector. + inline math_VectorBase Opposite(); + + math_VectorBase operator-() + { + return Opposite(); + } + + //! returns the subtraction of "theRight" from "me". + //! An exception is raised if the vectors have not the same length. + inline void Subtract(const math_VectorBase& theRight); + + void operator-=(const math_VectorBase& theRight) + { + Subtract(theRight); + } + + //! returns the subtraction of "theRight" from "me". + //! An exception is raised if the vectors have not the same length. + Standard_NODISCARD inline math_VectorBase Subtracted(const math_VectorBase& theRight) const; + + Standard_NODISCARD math_VectorBase operator-(const math_VectorBase& theRight) const + { + return Subtracted(theRight); + } + + //! returns the multiplication of a real by a vector. + //! "me" = "theLeft" * "theRight" + inline void Multiply(const TheItemType theLeft, const math_VectorBase& theRight); + + //! Prints information on the current state of the object. + //! Is used to redefine the operator <<. + inline void Dump(Standard_OStream& theO) const; + + friend inline Standard_OStream& operator<<(Standard_OStream& theO, const math_VectorBase& theVec) + { + theVec.Dump(theO); + return theO; + } + + friend class math_Matrix; + +protected: + + //! Is used internally to set the "theLower" value of the vector. + inline void SetLower(const Standard_Integer theLower); + +private: + std::array myBuffer; + NCollection_Array1 Array; +}; + +#include + +#endif diff --git a/src/math/math_VectorBase.lxx b/src/math/math_VectorBase.lxx new file mode 100644 index 0000000000..5d010f6aec --- /dev/null +++ b/src/math/math_VectorBase.lxx @@ -0,0 +1,524 @@ +// Copyright (c) 1997-1999 Matra Datavision +// Copyright (c) 1999-2023 OPEN CASCADE SAS +// +// This file is part of Open CASCADE Technology software library. +// +// This library is free software; you can redistribute it and/or modify it under +// the terms of the GNU Lesser General Public License version 2.1 as published +// by the Free Software Foundation, with special exception defined in the file +// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT +// distribution for complete text of the license and disclaimer of any warranty. +// +// Alternatively, this file may be used under the terms of Open CASCADE +// commercial license or contractual agreement. + +#include +#include +#include +#include + +#include + +template +math_VectorBase::math_VectorBase(const Standard_Integer theLower, + const Standard_Integer theUpper) : + Array(*myBuffer.data(), theLower, theUpper, (theUpper - theLower + 1 <= math_VectorBase::THE_BUFFER_SIZE)) +{} + +template +math_VectorBase::math_VectorBase(const Standard_Integer theLower, + const Standard_Integer theUpper, + const TheItemType theInitialValue) : + Array(*myBuffer.data(), theLower, theUpper, (theUpper - theLower + 1 <= math_VectorBase::THE_BUFFER_SIZE)) +{ + Array.Init(theInitialValue); +} + +template +math_VectorBase::math_VectorBase(const TheItemType* theTab, + const Standard_Integer theLower, + const Standard_Integer theUpper) : + Array(*theTab, theLower, theUpper) +{} + +template +math_VectorBase::math_VectorBase(const gp_XY& theOther) : + Array(*myBuffer.data(), 1, 2) +{ + Array(1) = static_cast(theOther.X()); + Array(2) = static_cast(theOther.Y()); +} + +template +math_VectorBase::math_VectorBase(const gp_XYZ& theOther) : + Array(*myBuffer.data(), 1, 3) +{ + Array(1) = static_cast(theOther.X()); + Array(2) = static_cast(theOther.Y()); + Array(3) = static_cast(theOther.Z()); +} + +template +void math_VectorBase::Init(const TheItemType theInitialValue) +{ + Array.Init(theInitialValue); +} + +template +math_VectorBase::math_VectorBase(const math_VectorBase& theOther) : + Array(theOther.Array) +{} + +template +void math_VectorBase::SetLower(const Standard_Integer theLower) +{ + Array.UpdateLowerBound(theLower); +} + +template +Standard_Real math_VectorBase::Norm() const +{ + Standard_Real Result = 0; + for (Standard_Integer Index = Lower(); Index <= Upper(); Index++) + { + Result = Result + Array(Index) * Array(Index); + } + return Sqrt(Result); +} + +template +Standard_Real math_VectorBase::Norm2() const +{ + Standard_Real Result = 0; + + for (Standard_Integer Index = Lower(); Index <= Upper(); Index++) + { + Result = Result + Array(Index) * Array(Index); + } + return Result; +} + +template +Standard_Integer math_VectorBase::Max() const +{ + Standard_Integer I = 0; + Standard_Real X = RealFirst(); + + for (Standard_Integer Index = Lower(); Index <= Upper(); Index++) + { + if (Array(Index) > X) + { + X = Array(Index); + I = Index; + } + } + return I; +} + +template +Standard_Integer math_VectorBase::Min() const +{ + Standard_Integer I = 0; + Standard_Real X = RealLast(); + + for (Standard_Integer Index = Lower(); Index <= Upper(); Index++) + { + if (Array(Index) < X) + { + X = Array(Index); + I = Index; + } + } + return I; +} + +template +void math_VectorBase::Set(const Standard_Integer theI1, + const Standard_Integer theI2, + const math_VectorBase& theV) +{ + Standard_RangeError_Raise_if((theI1 < Lower()) || (theI2 > Upper()) \ + || (theI1 > theI2) || (theI2 - theI1 + 1 != theV.Length()), \ + "math_VectorBase::Set() - invalid indices"); + Standard_Integer I = theV.Lower(); + for (Standard_Integer Index = theI1; Index <= theI2; Index++) + { + Array(Index) = theV.Array(I); + I++; + } +} + +template +void math_VectorBase::Normalize() +{ + Standard_Real Result = Norm(); + Standard_NullValue_Raise_if((Result <= RealEpsilon()), \ + "math_VectorBase::Normalize() - vector has zero norm"); + for (Standard_Integer Index = Lower(); Index <= Upper(); Index++) + { + Array(Index) = Array(Index) / Result; + } +} + +template +math_VectorBase math_VectorBase::Normalized() const +{ + math_VectorBase Result = *this; + Result.Normalize(); + return Result; +} + +template +void math_VectorBase::Invert() +{ + for (Standard_Integer Index = Lower(); Index <= (Lower() + Length()) >> 1; Index++) + { + Standard_Integer J = Upper() + Lower() - Index; + TheItemType aTemp = Array(Index); + Array(Index) = Array(J); + Array(J) = aTemp; + } +} + +template +math_VectorBase math_VectorBase::Inverse() const +{ + math_VectorBase Result = *this; + Result.Invert(); + return Result; +} + +template +math_VectorBase math_VectorBase::Multiplied(const TheItemType theRight) const +{ + math_VectorBase Result(Lower(), Upper()); + for (Standard_Integer Index = Lower(); Index <= Upper(); Index++) + { + Result.Array(Index) = Array(Index) * theRight; + } + return Result; +} + +template +math_VectorBase math_VectorBase::TMultiplied(const TheItemType theRight) const +{ + math_VectorBase Result(Lower(), Upper()); + for (Standard_Integer Index = Lower(); Index <= Upper(); Index++) + { + Result.Array(Index) = Array(Index) * theRight; + } + return Result; +} + +template +void math_VectorBase::Multiply(const TheItemType theRight) +{ + for (Standard_Integer Index = Lower(); Index <= Upper(); Index++) + { + Array(Index) = Array(Index) * theRight; + } +} + +template +void math_VectorBase::Divide(const TheItemType theRight) +{ + Standard_DivideByZero_Raise_if(Abs(theRight) <= RealEpsilon(), \ + "math_VectorBase::Divide() - devisor is zero"); + + for (Standard_Integer Index = Lower(); Index <= Upper(); Index++) + { + Array(Index) = Array(Index) / theRight; + } +} + +template +math_VectorBase math_VectorBase::Divided(const TheItemType theRight) const +{ + Standard_DivideByZero_Raise_if(Abs(theRight) <= RealEpsilon(), \ + "math_VectorBase::Divided() - devisor is zero"); + math_VectorBase temp = Multiplied(1. / theRight); + return temp; +} + +template +void math_VectorBase::Add(const math_VectorBase& theRight) +{ + Standard_DimensionError_Raise_if(Length() != theRight.Length(), \ + "math_VectorBase::Add() - input vector has wrong dimensions"); + + Standard_Integer I = theRight.Lower(); + for (Standard_Integer Index = Lower(); Index <= Upper(); Index++) + { + Array(Index) = Array(Index) + theRight.Array(I); + I++; + } +} + +template +math_VectorBase math_VectorBase::Added(const math_VectorBase& theRight) const +{ + Standard_DimensionError_Raise_if(Length() != theRight.Length(), \ + "math_VectorBase::Added() - input vector has wrong dimensions"); + + math_VectorBase Result(Lower(), Upper()); + + Standard_Integer I = theRight.Lower(); + for (Standard_Integer Index = Lower(); Index <= Upper(); Index++) + { + Result.Array(Index) = Array(Index) + theRight.Array(I); + I++; + } + return Result; +} + +template +void math_VectorBase::Subtract(const math_VectorBase& theRight) +{ + Standard_DimensionError_Raise_if(Length() != theRight.Length(), \ + "math_VectorBase::Subtract() - input vector has wrong dimensions"); + + Standard_Integer I = theRight.Lower(); + for (Standard_Integer Index = Lower(); Index <= Upper(); Index++) + { + Array(Index) = Array(Index) - theRight.Array(I); + I++; + } +} + +template +math_VectorBase math_VectorBase::Subtracted(const math_VectorBase& theRight) const +{ + Standard_DimensionError_Raise_if(Length() != theRight.Length(), \ + "math_VectorBase::Subtracted() - input vector has wrong dimensions"); + + math_VectorBase Result(Lower(), Upper()); + + Standard_Integer I = theRight.Lower(); + for (Standard_Integer Index = Lower(); Index <= Upper(); Index++) + { + Result.Array(Index) = Array(Index) - theRight.Array(I); + I++; + } + return Result; +} + +template +math_VectorBase math_VectorBase::Slice(const Standard_Integer theI1, const Standard_Integer theI2) const +{ + Standard_RangeError_Raise_if((theI1 < Lower()) || (theI1 > Upper()) || (theI2 < Lower()) || (theI2 > Upper()), \ + "math_VectorBase::Slice() - invalid indices"); + + if (theI2 >= theI1) + { + math_VectorBase Result(theI1, theI2); + for (Standard_Integer Index = theI1; Index <= theI2; Index++) + { + Result.Array(Index) = Array(Index); + } + return Result; + } + else + { + math_VectorBase Result(theI2, theI1); + for (Standard_Integer Index = theI1; Index >= theI2; Index--) + { + Result.Array(Index) = Array(Index); + } + return Result; + } +} + +template +void math_VectorBase::Add(const math_VectorBase& theLeft, const math_VectorBase& theRight) +{ + Standard_DimensionError_Raise_if((Length() != theRight.Length()) || (theRight.Length() != theLeft.Length()), \ + "math_VectorBase::Add() - input vectors have wrong dimensions"); + + Standard_Integer I = theLeft.Lower(); + Standard_Integer J = theRight.Lower(); + for (Standard_Integer Index = Lower(); Index <= Upper(); Index++) + { + Array(Index) = theLeft.Array(I) + theRight.Array(J); + I++; + J++; + } +} + +template +void math_VectorBase::Subtract(const math_VectorBase& theLeft, const math_VectorBase& theRight) +{ + Standard_DimensionError_Raise_if((Length() != theRight.Length()) || (theRight.Length() != theLeft.Length()), \ + "math_VectorBase::Subtract() - input vectors have wrong dimensions"); + + Standard_Integer I = theLeft.Lower(); + Standard_Integer J = theRight.Lower(); + for (Standard_Integer Index = Lower(); Index <= Upper(); Index++) + { + Array(Index) = theLeft.Array(I) - theRight.Array(J); + I++; + J++; + } +} + +template +void math_VectorBase::Multiply(const math_Matrix& theLeft, const math_VectorBase& theRight) +{ + Standard_DimensionError_Raise_if((Length() != theLeft.RowNumber()) \ + || (theLeft.ColNumber() != theRight.Length()), \ + "math_VectorBase::Multiply() - input matrix and /or vector have wrong dimensions"); + + Standard_Integer Index = Lower(); + for (Standard_Integer I = theLeft.LowerRowIndex; I <= theLeft.UpperRowIndex; I++) + { + Array(Index) = 0.0; + Standard_Integer K = theRight.Lower(); + for (Standard_Integer J = theLeft.LowerColIndex; J <= theLeft.UpperColIndex; J++) + { + Array(Index) = Array(Index) + theLeft.Array(I, J) * theRight.Array(K); + K++; + } + Index++; + } +} + +template +void math_VectorBase::Multiply(const math_VectorBase& theLeft, const math_Matrix& theRight) +{ + Standard_DimensionError_Raise_if((Length() != theRight.ColNumber()) \ + || (theLeft.Length() != theRight.RowNumber()), \ + "math_VectorBase::Multiply() - input matrix and /or vector have wrong dimensions"); + + Standard_Integer Index = Lower(); + for (Standard_Integer J = theRight.LowerColIndex; J <= theRight.UpperColIndex; J++) + { + Array(Index) = 0.0; + Standard_Integer K = theLeft.Lower(); + for (Standard_Integer I = theRight.LowerRowIndex; I <= theRight.UpperRowIndex; I++) + { + Array(Index) = Array(Index) + theLeft.Array(K) * theRight.Array(I, J); + K++; + } + Index++; + } +} + +template +void math_VectorBase::TMultiply(const math_Matrix& theTLeft, const math_VectorBase& theRight) +{ + Standard_DimensionError_Raise_if((Length() != theTLeft.ColNumber()) \ + || (theTLeft.RowNumber() != theRight.Length()), \ + "math_VectorBase::TMultiply() - input matrix and /or vector have wrong dimensions"); + + Standard_Integer Index = Lower(); + for (Standard_Integer I = theTLeft.LowerColIndex; I <= theTLeft.UpperColIndex; I++) + { + Array(Index) = 0.0; + Standard_Integer K = theRight.Lower(); + for (Standard_Integer J = theTLeft.LowerRowIndex; J <= theTLeft.UpperRowIndex; J++) + { + Array(Index) = Array(Index) + theTLeft.Array(J, I) * theRight.Array(K); + K++; + } + Index++; + } +} + +template +void math_VectorBase::TMultiply(const math_VectorBase& theLeft, const math_Matrix& theTRight) +{ + Standard_DimensionError_Raise_if((Length() != theTRight.RowNumber()) \ + || (theLeft.Length() != theTRight.ColNumber()), \ + "math_VectorBase::TMultiply() - input matrix and /or vector have wrong dimensions"); + + Standard_Integer Index = Lower(); + for (Standard_Integer J = theTRight.LowerRowIndex; J <= theTRight.UpperRowIndex; J++) + { + Array(Index) = 0.0; + Standard_Integer K = theLeft.Lower(); + for (Standard_Integer I = theTRight.LowerColIndex; + I <= theTRight.UpperColIndex; I++) + { + Array(Index) = Array(Index) + theLeft.Array(K) * theTRight.Array(J, I); + K++; + } + Index++; + } +} + +template +TheItemType math_VectorBase::Multiplied(const math_VectorBase& theRight) const +{ + Standard_Real Result = 0; + + Standard_DimensionError_Raise_if(Length() != theRight.Length(), \ + "math_VectorBase::Multiplied() - input vector has wrong dimensions"); + + Standard_Integer I = theRight.Lower(); + for (Standard_Integer Index = Lower(); Index <= Upper(); Index++) + { + Result = Result + Array(Index) * theRight.Array(I); + I++; + } + return Result; +} + +template +math_VectorBase math_VectorBase::Opposite() +{ + math_VectorBase Result(Lower(), Upper()); + for (Standard_Integer Index = Lower(); Index <= Upper(); Index++) + { + Result.Array(Index) = -Array(Index); + } + return Result; +} + +template +math_VectorBase math_VectorBase::Multiplied(const math_Matrix& theRight)const +{ + Standard_DimensionError_Raise_if(Length() != theRight.RowNumber(), \ + "math_VectorBase::Multiplied() - input matrix has wrong dimensions"); + + math_VectorBase Result(theRight.LowerColIndex, theRight.UpperColIndex); + for (Standard_Integer J2 = theRight.LowerColIndex; J2 <= theRight.UpperColIndex; J2++) + { + Result.Array(J2) = 0.0; + Standard_Integer theI2 = theRight.LowerRowIndex; + for (Standard_Integer I = Lower(); I <= Upper(); I++) + { + Result.Array(J2) = Result.Array(J2) + Array(I) * theRight.Array(theI2, J2); + theI2++; + } + } + return Result; +} + +template +void math_VectorBase::Multiply(const TheItemType theLeft, const math_VectorBase& theRight) +{ + Standard_DimensionError_Raise_if((Length() != theRight.Length()), \ + "math_VectorBase::Multiply() - input vector has wrong dimensions"); + for (Standard_Integer I = Lower(); I <= Upper(); I++) + { + Array(I) = theLeft * theRight.Array(I); + } +} + +template +math_VectorBase& math_VectorBase::Initialized(const math_VectorBase& theOther) +{ + Standard_DimensionError_Raise_if(Length() != theOther.Length(), \ + "math_VectorBase::Initialized() - input vector has wrong dimensions"); + memmove(&Array.ChangeFirst(), &theOther.Array.First(), sizeof(TheItemType) * Array.Length()); + return *this; +} + +template +void math_VectorBase::Dump(Standard_OStream& theO) const +{ + theO << "math_Vector of Length = " << Length() << "\n"; + for (Standard_Integer Index = Lower(); Index <= Upper(); Index++) + { + theO << "math_Vector(" << Index << ") = " << Array(Index) << "\n"; + } +} diff --git a/tests/bugs/caf/bug31546 b/tests/bugs/caf/bug31546 index bf12fa13eb..527efefeae 100644 --- a/tests/bugs/caf/bug31546 +++ b/tests/bugs/caf/bug31546 @@ -10,8 +10,10 @@ Close D # make the first open/close iteration before checking memory because some filled structures # are cleared on start of the next open (like mySections in DocumentRetrievalDriver) -Open $docname D -Close D +for {set i 1} {$i < 3} {incr i} { + Open $docname D + Close D +} puts "Executing Load / Close in cycle to see if allocated heap memory grows" set listmem {} diff --git a/tests/bugs/fclasses/bug7287_6 b/tests/bugs/fclasses/bug7287_6 index 25588729d3..67bfe29496 100755 --- a/tests/bugs/fclasses/bug7287_6 +++ b/tests/bugs/fclasses/bug7287_6 @@ -1,4 +1,4 @@ -puts "TODO ?CR33225 Linux: Checking trend failed: mean delta per step = 7408.0, sigma = 2737.917456754312, expected delta = 0" +puts "TODO ?CR33225 Linux: Checking trend failed: mean delta per step =" puts "TODO ?OCC7287 Linux: Tcl Exception: Memory leak detected" puts "TODO ?OCC7287 Linux: TEST INCOMPLETE" puts "TODO ?OCC7287 MacOS: Tcl Exception: Memory leak detected" diff --git a/tests/bugs/xde/bug23570 b/tests/bugs/xde/bug23570 index 30a302b9a4..b189eba234 100644 --- a/tests/bugs/xde/bug23570 +++ b/tests/bugs/xde/bug23570 @@ -8,7 +8,7 @@ puts "" set info [param write.surfacecurve.mode] -set result1 [regexp {\-\-\- Type : Enum \[in 0-1\] 0:Off 1:On , alpha: +(.*):0 +(.*):1 +\n\-\-\-} $info full alpha_0 alpha_1] +set result1 [regexp {\-\-\- Type : Enum \[in 0-1\] 0:Off 1:On , alpha: +(.*):[0-9] +(.*):[0-9] +\n\-\-\-} $info full alpha_0 alpha_1] if { ${result1} == 0 } { puts "Error: bad message or regexp" diff --git a/tools/MessageModel/MessageModel_ItemRoot.cxx b/tools/MessageModel/MessageModel_ItemRoot.cxx index 7f424e4c1b..96a2313b83 100644 --- a/tools/MessageModel/MessageModel_ItemRoot.cxx +++ b/tools/MessageModel/MessageModel_ItemRoot.cxx @@ -29,8 +29,8 @@ void MessageModel_ItemRoot::SetReport (const int theRowId, const Handle(Message_ if (aRowId == theRowId) break; } - aReportsIt.Value().myReport = theReport; - aReportsIt.Value().myDescription = theReportDescription; + aReportsIt.ChangeValue().myReport = theReport; + aReportsIt.ChangeValue().myDescription = theReportDescription; } // ======================================================================= diff --git a/tools/View/View_Viewer.cxx b/tools/View/View_Viewer.cxx index f2d8dac73c..5ba225ad8e 100644 --- a/tools/View/View_Viewer.cxx +++ b/tools/View/View_Viewer.cxx @@ -16,7 +16,6 @@ #include #include -#include // ======================================================================= // function : CreateView From ed85665b555cf7b095245766c9512b0c7b71f442 Mon Sep 17 00:00:00 2001 From: dpasukhi Date: Mon, 13 Nov 2023 21:46:25 +0000 Subject: [PATCH 514/639] 0033529: Data Exchange, Step - Move on IncAllocator functionality Update allocation mechanism for StepParser Decrease the table size for parsing --- src/StepFile/StepFile_ReadData.cxx | 191 +++------------ src/StepFile/StepFile_ReadData.hxx | 13 +- src/StepFile/lex.step.cxx | 372 +++++++++++++---------------- src/StepFile/step.lex | 24 +- src/StepFile/step.tab.cxx | 12 +- src/StepFile/step.yacc | 2 - 6 files changed, 220 insertions(+), 394 deletions(-) diff --git a/src/StepFile/StepFile_ReadData.cxx b/src/StepFile/StepFile_ReadData.cxx index fe88768263..91d0dd933c 100644 --- a/src/StepFile/StepFile_ReadData.cxx +++ b/src/StepFile/StepFile_ReadData.cxx @@ -31,38 +31,8 @@ namespace TextValue static char IdZero[] = "#0"; } -class StepFile_ReadData::CharactersPage { - -public: - - CharactersPage(const Standard_Integer theMaxCar) :myNext(nullptr), myUsed(0) - { - myCharacters = new char[theMaxCar]; - } - - ~CharactersPage() - { - if (myCharacters != nullptr) - { - delete[] myCharacters; - myCharacters = nullptr; - } - } - - DEFINE_STANDARD_ALLOC -public: - - CharactersPage* myNext; //!< Chaining of character pages - char* myCharacters; //!< Own characters page - int myUsed; //!< Counter employed characters -}; - -class StepFile_ReadData::Argument { - -public: - // Standard OCCT memory allocation stuff - DEFINE_STANDARD_ALLOC - +class StepFile_ReadData::Argument +{ public: Argument() :myNext(nullptr), myValue(nullptr), myType(Interface_ParamSub) {} @@ -76,38 +46,8 @@ class StepFile_ReadData::Argument { Interface_ParamType myType; //!< Type of the argument }; -class StepFile_ReadData::ArgumentsPage { - -public: - // Standard OCCT memory allocation stuff - DEFINE_STANDARD_ALLOC - -public: - - ArgumentsPage(Standard_Integer theMaxArg) :myNext(nullptr), myUsed(0) - { - myArgs = new Argument[theMaxArg]; - } - - ~ArgumentsPage() - { - delete[] myArgs; - myArgs = nullptr; - } - -public: - - ArgumentsPage* myNext; //!< Chaining of arguments pages - Argument* myArgs; //!< Own arguments page - int myUsed; //!< Counter employed arguments -}; - -class StepFile_ReadData::Record { - -public: - // Standard OCCT memory allocation stuff - DEFINE_STANDARD_ALLOC - +class StepFile_ReadData::Record +{ public: Record() :myNext(nullptr), myFirst(nullptr), myLast(nullptr), myIdent(nullptr), myType(nullptr) {} @@ -123,8 +63,8 @@ class StepFile_ReadData::Record { char* myType; //!< Type of the record }; -class StepFile_ReadData::Scope { - +class StepFile_ReadData::Scope +{ public: // Standard OCCT memory allocation stuff DEFINE_STANDARD_ALLOC @@ -137,7 +77,6 @@ class StepFile_ReadData::Scope { { if (myRecord != nullptr) { - delete[] myRecord; myRecord = nullptr; } } @@ -148,35 +87,8 @@ class StepFile_ReadData::Scope { Record* myRecord; //!< Record interrupted by the scope (to resume) }; -class StepFile_ReadData::RecordsPage -{ - -public: - - RecordsPage(const Standard_Integer theMaxRec) :myNext(nullptr), myUsed(0) - { - myRecords = new Record[theMaxRec]; - } - - ~RecordsPage() - { - if (myRecords != nullptr) - { - delete[] myRecords; - myRecords = nullptr; - } - } - DEFINE_STANDARD_ALLOC -public: - - RecordsPage* myNext; //!< Chaining of records pages - Record* myRecords; //!< Own records page - int myUsed; //!< Counter employed records -}; - class StepFile_ReadData::ErrorsPage { - public: ErrorsPage(Standard_CString theError) :myNext(nullptr), myError(theError) @@ -203,17 +115,13 @@ class StepFile_ReadData::ErrorsPage //purpose : //======================================================================= -StepFile_ReadData::StepFile_ReadData() - :myMaxChar(50000), myMaxRec(5000), myMaxArg(10000), myModePrint(0), - myNbRec(0), myNbHead(0), myNbPar(0), myYaRec(0), +StepFile_ReadData::StepFile_ReadData() : + myTextAlloc(), myOtherAlloc(), + myModePrint(0), myNbRec(0), myNbHead(0), myNbPar(0), myYaRec(0), myNumSub(0), myErrorArg(Standard_False), myResText(nullptr), myCurrType(TextValue::SubList), mySubArg(nullptr), myTypeArg(Interface_ParamSub), myCurrArg(nullptr), myFirstRec(nullptr), myCurRec(nullptr), myLastRec(nullptr), myCurScope(nullptr), myFirstError(nullptr), myCurError(nullptr) -{ - myOneCharPage = new CharactersPage(myMaxChar); - myOneArgPage = new ArgumentsPage(myMaxArg); - myOneRecPage = new RecordsPage(myMaxRec); -}; +{}; //======================================================================= //function : CreateNewText @@ -229,22 +137,11 @@ void StepFile_ReadData::CreateNewText(const char* theNewText, int theLenText) return; } // If error argument exists - prepare size to new text value and old result text - int aLength = (myErrorArg) ? theLenText + (int)strlen(myResText) : theLenText; - - if (myOneCharPage->myUsed > myMaxChar - aLength - 1) - { - int aSizeOfPage = myMaxChar + 1; - if (aLength >= myMaxChar) aSizeOfPage += (aLength + 1 - myMaxChar); - CharactersPage* aNewPage = new CharactersPage(aSizeOfPage); - aNewPage->myNext = myOneCharPage; - myOneCharPage = aNewPage; - myOneCharPage->myUsed = 0; - } + const int aLength = (myErrorArg) ? theLenText + (int)strlen(myResText) : theLenText; char* anOldResText = myResText; - myResText = myOneCharPage->myCharacters + myOneCharPage->myUsed; - myOneCharPage->myUsed += (aLength + 1); + myResText = static_cast(myTextAlloc.AllocateOptimal(aLength + 1)); // If error argument exists - append new text to old result text // Else create new result text @@ -350,17 +247,8 @@ void StepFile_ReadData::RecordListStart() void StepFile_ReadData::CreateNewArg() { - Argument* aNewArg; + Argument* aNewArg = static_cast(myOtherAlloc.AllocateOptimal(sizeof(Argument))); myNbPar++; - if (myOneArgPage->myUsed >= myMaxArg) - { - ArgumentsPage* aNewArgPage; - aNewArgPage = new ArgumentsPage(myMaxArg); - aNewArgPage->myNext = myOneArgPage; - myOneArgPage = aNewArgPage; - } - aNewArg = &myOneArgPage->myArgs[myOneArgPage->myUsed]; - myOneArgPage->myUsed++; aNewArg->myType = myTypeArg; if (myTypeArg == Interface_ParamSub) aNewArg->myValue = mySubArg; @@ -419,7 +307,7 @@ void StepFile_ReadData::AddNewScope() { Scope* aNewScope; Record* aRecord; - aNewScope = new Scope; + aNewScope = new(myOtherAlloc.AllocateOptimal(sizeof(Scope))) Scope; aNewScope->myRecord = myCurRec; aNewScope->myPrevious = myCurScope; myCurScope = aNewScope; @@ -466,7 +354,6 @@ void StepFile_ReadData::FinalOfScope() myYaRec = 1; anOldScope = myCurScope; myCurScope = anOldScope->myPrevious; - delete anOldScope; } //======================================================================= @@ -478,32 +365,19 @@ void StepFile_ReadData::ClearRecorder(const Standard_Integer theMode) { if (theMode & 1) { - while (myOneRecPage != nullptr) - { - RecordsPage* aNewPage = myOneRecPage->myNext; - delete myOneRecPage; - myOneRecPage = aNewPage; - } - while (myOneArgPage != nullptr) { - ArgumentsPage* aNewPage = myOneArgPage->myNext; - delete myOneArgPage; - myOneArgPage = aNewPage; - } - while (myFirstError != nullptr) - { - ErrorsPage* aNewErrorPage = myFirstError->NextErrorPage(); - delete myFirstError; - myFirstError = aNewErrorPage; - } + myCurrType = nullptr; + mySubArg = nullptr; + myCurrArg = nullptr; + myFirstRec = nullptr; + myCurRec = nullptr; + myLastRec = nullptr; + myCurScope = nullptr; + myOtherAlloc.Reset(true); } if (theMode & 2) { - while (myOneCharPage != nullptr) - { - CharactersPage* aNewPage = myOneCharPage->myNext; - delete myOneCharPage; - myOneCharPage = aNewPage; - } + myResText = nullptr; + myTextAlloc.Reset(true); } } @@ -653,12 +527,12 @@ void StepFile_ReadData::AddError(Standard_CString theErrorMessage) { if (myFirstError == nullptr) { - myFirstError = new ErrorsPage(theErrorMessage); + myFirstError = new(myOtherAlloc.AllocateOptimal(sizeof(ErrorsPage))) ErrorsPage(theErrorMessage); myCurError = myFirstError; } else { - myCurError->SetNextErrorPage(new ErrorsPage(theErrorMessage)); + myCurError->SetNextErrorPage(new(myOtherAlloc.AllocateOptimal(sizeof(ErrorsPage))) ErrorsPage(theErrorMessage)); myCurError = myCurError->NextErrorPage(); } } @@ -736,18 +610,7 @@ void StepFile_ReadData::AddNewRecord(Record* theNewRecord) StepFile_ReadData::Record* StepFile_ReadData::CreateNewRecord() { - Record* aNewRecord; - if (myOneRecPage->myUsed >= myMaxRec) - { - RecordsPage* aNewRecPage; - aNewRecPage = new RecordsPage(myMaxRec); - aNewRecPage->myNext = myOneRecPage; - myOneRecPage = aNewRecPage; - } - aNewRecord = &myOneRecPage->myRecords[myOneRecPage->myUsed]; - myOneRecPage->myUsed++; - - return aNewRecord; + return static_cast(myOtherAlloc.AllocateOptimal(sizeof(Record))); } //======================================================================= diff --git a/src/StepFile/StepFile_ReadData.hxx b/src/StepFile/StepFile_ReadData.hxx index 5d0b39c1b7..3f958b63f1 100644 --- a/src/StepFile/StepFile_ReadData.hxx +++ b/src/StepFile/StepFile_ReadData.hxx @@ -19,6 +19,7 @@ #include #include #include +#include #include @@ -113,12 +114,9 @@ public: private: - class CharactersPage; //!< List of characters pages, contains all text derived from Flex class Record; //!< List of records, contains all text processed by Bison class Argument; //!< List of arguments, contains all argument descriptions - class ArgumentsPage; //!< List of arguments pages, contains all text derived from Flex class Scope; //!< List of scopes pages, contains all records for external processing - class RecordsPage; //!< List of records pages, contains all records class ErrorsPage; //!< List of errors messages, contains all errors public: @@ -237,10 +235,8 @@ private: void PrintRecord(Record* theRecord); private: - - Standard_Integer myMaxChar; //!< Maximum number of characters in a characters page - Standard_Integer myMaxRec; //!< Maximum number of records in a records page - Standard_Integer myMaxArg; //!< Maximum number of arguments in a arguments page + NCollection_IncAllocator myTextAlloc; //!< Allocator for store text + NCollection_IncAllocator myOtherAlloc; //!< Allocator for internal tools Standard_Integer myModePrint; //!< Control print output (for call from yacc) Standard_Integer myNbRec; //!< Total number of data records read Standard_Integer myNbHead; //!< Number of records taken by the Header @@ -259,9 +255,6 @@ private: Scope* myCurScope; //!< Current node of the scopes list ErrorsPage* myFirstError; //!< First node of the errors pages list ErrorsPage* myCurError; //!< Current node of the errors pages list - RecordsPage* myOneRecPage; //!< Current node of the records pages list - CharactersPage* myOneCharPage; //!< Current node of the characters pages list - ArgumentsPage* myOneArgPage; //!< Current node of the arguments pages list }; #endif // _StepFile_ReadData_HeaderFile diff --git a/src/StepFile/lex.step.cxx b/src/StepFile/lex.step.cxx index b87ec7705e..8949b12366 100644 --- a/src/StepFile/lex.step.cxx +++ b/src/StepFile/lex.step.cxx @@ -353,7 +353,7 @@ struct yy_trans_info flex_int32_t yy_verify; flex_int32_t yy_nxt; }; -static const flex_int16_t yy_acclist[213] = +static const flex_int16_t yy_acclist[167] = { 0, 2, 2, 45, 42, 44, 10, 42, 44, 12, 42, 44, 13, 42, 44, 11, 42, 44, 42, 44, 42, @@ -362,44 +362,35 @@ static const flex_int16_t yy_acclist[213] = 42, 44, 42, 44, 37, 42, 44, 18, 40, 42, 44, 28, 42, 44, 27, 42, 44, 40, 42, 44, 40, 42, 44, 40, 42, 44, 40, 42, 44, 40, - 42, 44, 40, 42, 44, 40, 42, 44, 40, 42, - 44, 40, 42, 44, 40, 42, 44, 40, 42, 44, - 40, 42, 44, 14, 42, 44, 2, 44, 12, 44, - - 3, 44, 43, 44, 8, 44, 6, 12, 44, 7, - 44, 41, 17,16400, 19, 18, 19, 19, 19, 1, - 19, 22, 18, 19, 40, 40, 40, 22, 40, 40, - 40, 40, 40, 40, 40, 40, 40, 40, 14, 2, - 3, 3, 4, 8, 9, 21, 15, 8208, 40, 40, - 40, 40, 40, 40, 40, 40, 40, 40, 40, 8208, - 20, 20, 20, 40, 40, 40, 40, 40, 40, 40, - 40, 36, 40, 40, 40, 20, 20, 20, 40, 32, - 40, 40, 40, 40, 40, 40, 40, 40, 29, 38, - 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, - - 31, 40, 40, 30, 35, 39, 40, 39, 40, 33, - 34, 34 + 42, 44, 40, 42, 44, 14, 42, 44, 2, 44, + 12, 44, 3, 44, 43, 44, 8, 44, 6, 12, + 44, 7, 44, 41, 17,16400, 19, 18, 19, 19, + + 19, 1, 19, 22, 18, 19, 40, 40, 22, 40, + 40, 40, 40, 40, 14, 2, 3, 3, 4, 8, + 9, 21, 15, 8208, 40, 40, 40, 40, 40, 40, + 8208, 20, 20, 20, 40, 40, 40, 40, 40, 36, + 40, 20, 20, 20, 40, 32, 40, 40, 40, 40, + 29, 38, 40, 40, 40, 40, 40, 31, 40, 30, + 35, 39, 40, 33, 34, 34 } ; -static const flex_int16_t yy_accept[158] = +static const flex_int16_t yy_accept[125] = { 0, 1, 1, 1, 2, 3, 3, 3, 3, 3, 4, 6, 9, 12, 15, 18, 20, 22, 24, 27, 29, 32, 35, 37, 40, 43, 45, 48, 52, 55, 58, - 61, 64, 67, 70, 73, 76, 79, 82, 85, 88, - 91, 94, 97, 99, 101, 103, 105, 107, 110, 112, - 113, 113, 115, 115, 116, 118, 119, 120, 120, 121, - 123, 126, 127, 128, 129, 130, 131, 132, 133, 134, - 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, - 145, 145, 146, 147, 147, 149, 149, 149, 149, 150, - 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, - - 161, 161, 162, 163, 165, 166, 167, 167, 168, 169, - 170, 171, 171, 172, 173, 174, 175, 176, 176, 177, - 178, 180, 181, 181, 182, 183, 184, 185, 186, 187, - 188, 189, 190, 191, 191, 192, 193, 194, 195, 196, - 197, 198, 199, 199, 200, 201, 202, 203, 204, 205, - 205, 206, 208, 210, 212, 213, 213 + 61, 64, 67, 70, 73, 76, 79, 81, 83, 85, + 87, 89, 92, 94, 95, 95, 97, 97, 98, 100, + 101, 102, 102, 103, 105, 108, 109, 110, 111, 112, + 113, 114, 115, 116, 117, 118, 119, 120, 121, 121, + 122, 123, 123, 125, 125, 125, 125, 126, 127, 128, + 129, 130, 131, 132, 132, 133, 134, 136, 137, 137, + 138, 139, 139, 140, 141, 142, 142, 143, 144, 146, + + 147, 147, 148, 149, 150, 151, 152, 153, 153, 154, + 155, 156, 157, 157, 158, 159, 160, 161, 161, 162, + 164, 166, 167, 167 } ; static const YY_CHAR yy_ec[256] = @@ -413,11 +404,11 @@ static const YY_CHAR yy_ec[256] = 22, 1, 1, 1, 23, 24, 25, 26, 27, 24, 28, 29, 30, 28, 28, 28, 28, 31, 32, 33, 28, 34, 35, 36, 28, 28, 28, 28, 28, 28, - 1, 1, 1, 1, 28, 1, 37, 38, 39, 40, + 1, 1, 1, 1, 28, 1, 37, 24, 38, 39, - 41, 38, 38, 42, 43, 38, 38, 38, 38, 44, - 45, 46, 38, 47, 48, 49, 38, 38, 38, 38, - 38, 38, 1, 1, 1, 1, 1, 1, 1, 1, + 40, 24, 28, 41, 42, 28, 28, 28, 28, 43, + 44, 45, 28, 46, 47, 48, 28, 28, 28, 28, + 28, 28, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, @@ -434,177 +425,141 @@ static const YY_CHAR yy_ec[256] = 1, 1, 1, 1, 1 } ; -static const YY_CHAR yy_meta[51] = +static const YY_CHAR yy_meta[50] = { 0, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 3, 1, 1, 4, 1, 1, 1, 5, 1, 6, - 1, 1, 6, 6, 6, 6, 6, 6, 6, 6, - 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, - 7, 7, 7, 7, 7, 7, 7, 7, 7, 1 + 1, 1, 6, 6, 6, 6, 6, 7, 7, 7, + 7, 7, 7, 7, 7, 7, 6, 6, 6, 6, + 7, 7, 7, 7, 7, 7, 7, 7, 1 } ; -static const flex_int16_t yy_base[167] = +static const flex_int16_t yy_base[135] = { 0, - 0, 0, 48, 49, 310, 307, 50, 53, 306, 452, - 452, 452, 452, 452, 0, 45, 281, 452, 19, 452, - 452, 452, 37, 452, 40, 272, 55, 452, 452, 56, - 87, 88, 93, 94, 97, 0, 86, 87, 89, 87, - 89, 175, 0, 452, 107, 452, 0, 452, 136, 0, - 130, 142, 120, 140, 143, 148, 151, 204, 452, 154, - 174, 159, 0, 452, 162, 137, 165, 125, 169, 153, - 175, 152, 176, 161, 150, 0, 185, 194, 452, 0, - 211, 452, 452, 207, 452, 178, 211, 215, 219, 220, - 218, 227, 225, 228, 223, 249, 244, 238, 226, 452, - - 241, 128, 201, 232, 258, 115, 247, 273, 256, 262, - 258, 287, 298, 452, 300, 305, 107, 261, 107, 233, - 276, 452, 276, 309, 310, 316, 299, 307, 306, 319, - 304, 452, 452, 310, 330, 312, 341, 56, 347, 323, - 350, 45, 357, 355, 345, 452, 363, 38, 452, 368, - 452, 372, 0, 0, 0, 452, 396, 403, 410, 412, - 415, 416, 423, 430, 437, 444 + 0, 0, 47, 48, 255, 252, 49, 52, 253, 323, + 323, 323, 323, 323, 0, 0, 221, 323, 18, 323, + 323, 323, 36, 323, 39, 223, 46, 323, 323, 211, + 49, 40, 50, 52, 55, 148, 0, 323, 55, 323, + 0, 323, 89, 0, 183, 93, 50, 89, 90, 94, + 100, 139, 323, 104, 105, 138, 323, 101, 58, 110, + 118, 108, 90, 0, 66, 87, 323, 0, 148, 323, + 323, 136, 323, 110, 148, 152, 156, 157, 142, 160, + 61, 148, 323, 146, 91, 164, 165, 125, 158, 177, + 169, 186, 201, 323, 180, 165, 84, 190, 194, 323, + + 176, 198, 202, 206, 210, 323, 323, 194, 214, 213, + 217, 218, 228, 225, 323, 233, 323, 240, 323, 82, + 0, 0, 323, 265, 272, 279, 281, 83, 284, 287, + 294, 301, 308, 315 } ; -static const flex_int16_t yy_def[167] = +static const flex_int16_t yy_def[135] = { 0, - 156, 1, 157, 157, 158, 158, 159, 159, 156, 156, - 156, 156, 156, 156, 160, 156, 156, 156, 156, 156, - 156, 156, 156, 156, 161, 156, 156, 156, 156, 27, - 27, 27, 27, 27, 27, 162, 162, 162, 162, 162, - 162, 156, 163, 156, 164, 156, 165, 156, 156, 160, - 156, 156, 156, 156, 156, 161, 161, 161, 156, 156, - 27, 27, 162, 156, 27, 162, 27, 162, 27, 162, - 27, 162, 27, 162, 156, 163, 164, 164, 156, 165, - 156, 156, 156, 156, 156, 156, 156, 161, 27, 27, - 162, 27, 162, 27, 162, 27, 162, 27, 162, 156, - - 156, 156, 161, 27, 27, 162, 156, 27, 162, 27, - 162, 156, 27, 156, 162, 27, 162, 156, 156, 161, - 27, 156, 156, 27, 27, 27, 162, 162, 162, 27, - 162, 156, 156, 156, 27, 162, 27, 162, 27, 162, - 27, 162, 156, 27, 162, 156, 27, 162, 156, 156, - 156, 27, 162, 166, 166, 0, 156, 156, 156, 156, - 156, 156, 156, 156, 156, 156 + 123, 1, 124, 124, 125, 125, 126, 126, 123, 123, + 123, 123, 123, 123, 127, 128, 123, 123, 123, 123, + 123, 123, 123, 123, 129, 123, 130, 123, 123, 130, + 130, 130, 130, 130, 130, 123, 131, 123, 132, 123, + 133, 123, 123, 127, 128, 123, 123, 123, 123, 129, + 129, 129, 123, 123, 130, 130, 123, 130, 130, 130, + 130, 130, 123, 131, 132, 132, 123, 133, 123, 123, + 123, 123, 123, 123, 123, 129, 130, 130, 130, 130, + 130, 130, 123, 123, 123, 129, 130, 130, 123, 130, + 130, 123, 130, 123, 130, 123, 123, 129, 130, 123, + + 123, 130, 130, 130, 130, 123, 123, 123, 130, 130, + 130, 130, 123, 130, 123, 130, 123, 123, 123, 130, + 134, 134, 0, 123, 123, 123, 123, 123, 123, 123, + 123, 123, 123, 123 } ; -static const flex_int16_t yy_nxt[503] = +static const flex_int16_t yy_nxt[373] = { 0, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 10, 23, 24, 23, 25, 26, 27, 28, 29, 30, 30, 30, 31, 32, 30, 33, 34, - 30, 30, 30, 30, 35, 30, 36, 36, 36, 37, - 38, 39, 40, 36, 36, 36, 36, 41, 36, 42, - 44, 44, 48, 53, 54, 48, 55, 56, 154, 57, - 49, 45, 45, 49, 51, 149, 53, 51, 51, 51, - 51, 51, 60, 64, 61, 62, 146, 62, 62, 62, - 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, - 62, 63, 63, 63, 63, 63, 63, 63, 63, 63, - - 63, 63, 63, 63, 64, 64, 62, 62, 66, 65, - 64, 64, 62, 62, 64, 70, 62, 68, 67, 69, - 78, 72, 66, 66, 74, 79, 119, 132, 71, 70, - 68, 68, 73, 70, 72, 122, 83, 74, 81, 81, - 81, 72, 81, 84, 86, 74, 84, 119, 82, 51, - 93, 82, 51, 51, 51, 51, 51, 54, 86, 54, - 54, 52, 55, 85, 93, 56, 87, 57, 60, 87, - 57, 54, 91, 54, 88, 95, 64, 88, 62, 64, - 87, 62, 64, 97, 62, 91, 64, 99, 62, 95, - 92, 94, 64, 64, 62, 62, 97, 90, 156, 75, - - 89, 99, 98, 156, 93, 95, 96, 78, 84, 101, - 91, 84, 79, 81, 81, 81, 99, 81, 64, 97, - 120, 64, 101, 82, 75, 102, 82, 102, 100, 102, - 102, 102, 64, 102, 103, 102, 64, 64, 104, 62, - 106, 107, 105, 107, 64, 64, 62, 62, 111, 64, - 64, 121, 120, 110, 106, 64, 106, 62, 117, 109, - 112, 108, 111, 115, 114, 112, 64, 111, 113, 114, - 116, 117, 109, 118, 109, 64, 123, 62, 122, 64, - 127, 62, 128, 117, 131, 59, 118, 133, 130, 123, - 64, 129, 62, 64, 127, 121, 128, 124, 131, 125, - - 52, 133, 131, 112, 129, 156, 112, 114, 126, 44, - 134, 127, 44, 128, 112, 64, 112, 113, 114, 115, - 114, 129, 64, 134, 62, 132, 64, 64, 62, 62, - 136, 138, 140, 64, 137, 62, 64, 142, 62, 156, - 135, 143, 139, 136, 145, 138, 140, 64, 138, 62, - 142, 156, 141, 136, 143, 148, 140, 145, 64, 156, - 62, 146, 144, 156, 64, 142, 62, 64, 148, 62, - 149, 153, 64, 150, 62, 145, 150, 151, 156, 147, - 64, 152, 62, 154, 150, 153, 156, 150, 151, 64, - 156, 62, 148, 156, 156, 153, 43, 43, 43, 43, - - 43, 43, 43, 46, 46, 46, 46, 46, 46, 46, - 47, 47, 47, 47, 47, 47, 47, 50, 50, 58, - 58, 63, 63, 76, 156, 76, 156, 76, 76, 76, - 77, 156, 77, 77, 77, 77, 77, 80, 156, 156, - 80, 80, 80, 80, 155, 156, 155, 155, 155, 155, - 155, 9, 156, 156, 156, 156, 156, 156, 156, 156, - 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, - 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, - 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, - 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, - - 156, 156 + 30, 30, 30, 30, 35, 30, 30, 30, 31, 32, + 33, 34, 30, 30, 30, 30, 35, 30, 36, 38, + 38, 42, 47, 48, 42, 49, 50, 57, 51, 43, + 39, 39, 43, 54, 47, 55, 57, 57, 66, 57, + 59, 58, 57, 67, 74, 57, 60, 92, 57, 123, + 93, 94, 59, 79, 123, 58, 61, 74, 45, 60, + 62, 69, 69, 69, 72, 69, 79, 72, 61, 57, + + 66, 70, 62, 97, 70, 67, 48, 48, 48, 49, + 97, 50, 46, 51, 73, 75, 75, 54, 57, 51, + 76, 48, 54, 48, 55, 57, 76, 57, 75, 75, + 75, 77, 80, 76, 82, 57, 78, 72, 63, 76, + 72, 84, 57, 75, 77, 100, 80, 82, 78, 81, + 69, 69, 69, 84, 69, 57, 57, 83, 89, 57, + 70, 81, 85, 70, 85, 57, 85, 85, 85, 57, + 85, 86, 85, 57, 57, 87, 90, 57, 96, 88, + 95, 57, 57, 98, 99, 91, 57, 101, 90, 71, + 96, 107, 95, 88, 57, 105, 63, 57, 91, 101, + + 106, 102, 92, 103, 107, 92, 94, 57, 105, 98, + 108, 57, 104, 99, 102, 57, 103, 92, 57, 57, + 93, 94, 108, 57, 104, 113, 110, 57, 57, 109, + 57, 57, 111, 115, 57, 57, 53, 113, 117, 110, + 46, 109, 57, 112, 118, 111, 114, 118, 119, 116, + 57, 120, 123, 121, 38, 112, 118, 38, 114, 118, + 119, 116, 123, 123, 120, 37, 37, 37, 37, 37, + 37, 37, 40, 40, 40, 40, 40, 40, 40, 41, + 41, 41, 41, 41, 41, 41, 44, 44, 52, 52, + 52, 56, 56, 56, 64, 123, 64, 123, 64, 64, + + 64, 65, 123, 65, 65, 65, 65, 65, 68, 123, + 123, 68, 68, 68, 68, 122, 123, 122, 122, 122, + 122, 122, 9, 123, 123, 123, 123, 123, 123, 123, + 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, + 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, + 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, + 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, + 123, 123 } ; -static const flex_int16_t yy_chk[503] = +static const flex_int16_t yy_chk[373] = { 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 3, 4, 7, 19, 23, 8, 23, 25, 148, 25, - 7, 3, 4, 8, 16, 142, 19, 16, 16, 16, - 16, 16, 27, 30, 27, 30, 138, 27, 27, 27, - 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, - 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, - - 27, 27, 27, 27, 31, 32, 31, 32, 37, 31, - 33, 34, 33, 34, 35, 39, 35, 38, 32, 33, - 45, 40, 37, 31, 41, 45, 119, 117, 34, 39, - 38, 32, 35, 33, 40, 106, 51, 41, 49, 49, - 49, 34, 49, 52, 53, 35, 52, 102, 49, 51, - 68, 49, 51, 51, 51, 51, 51, 54, 53, 54, - 55, 52, 55, 52, 68, 56, 54, 56, 57, 55, - 57, 60, 66, 60, 56, 70, 62, 57, 62, 65, - 60, 65, 67, 72, 67, 66, 69, 74, 69, 70, - 67, 69, 71, 73, 71, 73, 72, 65, 77, 75, - - 61, 74, 73, 77, 67, 69, 71, 78, 84, 86, - 65, 84, 78, 81, 81, 81, 73, 81, 103, 71, - 103, 58, 86, 81, 42, 87, 81, 87, 84, 88, - 87, 88, 88, 89, 88, 89, 89, 90, 89, 90, - 91, 93, 90, 92, 92, 94, 92, 94, 95, 104, - 120, 104, 120, 94, 91, 98, 90, 98, 99, 93, - 97, 92, 95, 97, 97, 96, 96, 94, 96, 96, - 98, 99, 93, 101, 92, 105, 107, 105, 105, 110, - 109, 110, 109, 98, 111, 26, 101, 118, 110, 107, - 108, 109, 108, 121, 109, 121, 109, 108, 111, 108, - - 17, 118, 110, 112, 109, 9, 112, 112, 108, 6, - 123, 108, 5, 108, 113, 113, 115, 113, 113, 115, - 115, 108, 116, 123, 116, 116, 124, 125, 124, 125, - 127, 128, 129, 126, 125, 126, 130, 131, 130, 0, - 124, 134, 126, 127, 136, 128, 129, 135, 125, 135, - 131, 0, 130, 124, 134, 140, 126, 136, 137, 0, - 137, 137, 135, 0, 139, 130, 139, 141, 140, 141, - 141, 145, 144, 143, 144, 135, 143, 143, 0, 139, - 147, 144, 147, 147, 150, 145, 0, 150, 150, 152, - 0, 152, 139, 0, 0, 144, 157, 157, 157, 157, - - 157, 157, 157, 158, 158, 158, 158, 158, 158, 158, - 159, 159, 159, 159, 159, 159, 159, 160, 160, 161, - 161, 162, 162, 163, 0, 163, 0, 163, 163, 163, - 164, 0, 164, 164, 164, 164, 164, 165, 0, 0, - 165, 165, 165, 165, 166, 0, 166, 166, 166, 166, - 166, 156, 156, 156, 156, 156, 156, 156, 156, 156, - 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, - 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, - 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, - 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, - - 156, 156 + 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, + 4, 7, 19, 23, 8, 23, 25, 32, 25, 7, + 3, 4, 8, 27, 19, 27, 31, 33, 39, 34, + 32, 31, 35, 39, 47, 59, 33, 81, 81, 65, + 81, 81, 32, 59, 65, 31, 34, 47, 128, 33, + 35, 43, 43, 43, 46, 43, 59, 46, 34, 120, + + 66, 43, 35, 97, 43, 66, 48, 49, 48, 49, + 85, 50, 46, 50, 46, 48, 49, 51, 58, 51, + 50, 54, 55, 54, 55, 62, 51, 60, 48, 49, + 54, 55, 60, 50, 62, 61, 58, 72, 63, 51, + 72, 74, 88, 54, 55, 88, 60, 62, 58, 61, + 69, 69, 69, 74, 69, 56, 52, 72, 79, 79, + 69, 61, 75, 69, 75, 82, 76, 75, 76, 76, + 77, 76, 77, 77, 78, 77, 79, 80, 84, 78, + 82, 86, 87, 86, 87, 80, 91, 89, 79, 45, + 84, 96, 82, 78, 90, 91, 36, 95, 80, 89, + + 95, 90, 92, 90, 96, 92, 92, 98, 91, 98, + 101, 99, 90, 99, 90, 102, 90, 93, 93, 103, + 93, 93, 101, 104, 90, 108, 103, 105, 30, 102, + 110, 109, 104, 110, 111, 112, 26, 108, 112, 103, + 17, 102, 114, 105, 113, 104, 109, 113, 113, 111, + 116, 114, 9, 116, 6, 105, 118, 5, 109, 118, + 118, 111, 0, 0, 114, 124, 124, 124, 124, 124, + 124, 124, 125, 125, 125, 125, 125, 125, 125, 126, + 126, 126, 126, 126, 126, 126, 127, 127, 129, 129, + 129, 130, 130, 130, 131, 0, 131, 0, 131, 131, + + 131, 132, 0, 132, 132, 132, 132, 132, 133, 0, + 0, 133, 133, 133, 133, 134, 0, 134, 134, 134, + 134, 134, 123, 123, 123, 123, 123, 123, 123, 123, + 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, + 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, + 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, + 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, + 123, 123 } ; #define YY_TRAILING_MASK 0x2000 @@ -645,6 +600,9 @@ goto find_rule; \ noinput disables the generation of code for reading input from standard input noyywrap don't use yywrap() function yyclass define name of the scanner class + noyyalloc disables default allocation function + noyyfree disables default deallocation function + noyyrealloc disables default reallocation function */ #define YY_NO_INPUT 1 @@ -872,14 +830,14 @@ YY_DECL while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { yy_current_state = (int) yy_def[yy_current_state]; - if ( yy_current_state >= 157 ) + if ( yy_current_state >= 124 ) yy_c = yy_meta[yy_c]; } yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; *(yy_state_ptr)++ = yy_current_state; ++yy_cp; } - while ( yy_base[yy_current_state] != 452 ); + while ( yy_base[yy_current_state] != 323 ); yy_find_action: yy_current_state = *--(yy_state_ptr); @@ -1496,11 +1454,11 @@ int yyFlexLexer::yy_get_next_buffer() for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp ) { - YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 50); + YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 49); while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { yy_current_state = (int) yy_def[yy_current_state]; - if ( yy_current_state >= 157 ) + if ( yy_current_state >= 124 ) yy_c = yy_meta[yy_c]; } yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; @@ -1519,15 +1477,15 @@ int yyFlexLexer::yy_get_next_buffer() { int yy_is_jam; - YY_CHAR yy_c = 50; + YY_CHAR yy_c = 49; while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { yy_current_state = (int) yy_def[yy_current_state]; - if ( yy_current_state >= 157 ) + if ( yy_current_state >= 124 ) yy_c = yy_meta[yy_c]; } yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; - yy_is_jam = (yy_current_state == 156); + yy_is_jam = (yy_current_state == 123); if ( ! yy_is_jam ) *(yy_state_ptr)++ = yy_current_state; @@ -2018,30 +1976,24 @@ static int yy_flex_strlen (const char * s ) } #endif -void *yyalloc (yy_size_t size ) -{ - return malloc(size); -} +#define YYTABLES_NAME "yytables" + +#include -void *yyrealloc (void * ptr, yy_size_t size ) +void* yyalloc (size_t theNbBytes) { - - /* The cast to (char *) in the following accommodates both - * implementations that use char* generic pointers, and those - * that use void* generic pointers. It works with the latter - * because both ANSI C and C++ allow castless assignment from - * any pointer type to void*, and deal with argument conversions - * as though doing an assignment. - */ - return realloc(ptr, size); + return Standard::AllocateOptimal (theNbBytes); } -void yyfree (void * ptr ) +void* yyrealloc (void * thePnt, size_t theNbBytes) { - free( (char *) ptr ); /* see yyrealloc() for (char *) cast */ + return Standard::Reallocate (thePnt, theNbBytes); } -#define YYTABLES_NAME "yytables" +void yyfree (void* thePnt) +{ + Standard::Free (thePnt); +} step::scanner::scanner(StepFile_ReadData* theDataModel, std::istream* in, std::ostream* out) : stepFlexLexer(in, out), myDataModel(theDataModel) diff --git a/src/StepFile/step.lex b/src/StepFile/step.lex index a2a401da51..018d1884af 100644 --- a/src/StepFile/step.lex +++ b/src/StepFile/step.lex @@ -21,12 +21,18 @@ noinput disables the generation of code for reading input from standard input noyywrap don't use yywrap() function yyclass define name of the scanner class + noyyalloc disables default allocation function + noyyfree disables default deallocation function + noyyrealloc disables default reallocation function + case-insensitive enable case insensitive parsing(any ?i: and other case setting will be ignored) */ %option c++ %option 8bit warn nodefault %option noyywrap %option noinput %option yyclass="step::scanner" +%option noyyalloc noyyfree noyyrealloc +%option case-insensitive %top{ // This file is part of Open CASCADE Technology software library. @@ -52,7 +58,6 @@ #ifdef YY_INTERACTIVE #undef YY_INTERACTIVE #endif -#define YY_INTERACTIVE 0 typedef step::parser::token token; @@ -148,6 +153,23 @@ long string in files Henri.stp and 401.stp*/ %% +#include + +void* yyalloc (size_t theNbBytes) +{ + return Standard::AllocateOptimal (theNbBytes); +} + +void* yyrealloc (void * thePnt, size_t theNbBytes) +{ + return Standard::Reallocate (thePnt, theNbBytes); +} + +void yyfree (void* thePnt) +{ + Standard::Free (thePnt); +} + step::scanner::scanner(StepFile_ReadData* theDataModel, std::istream* in, std::ostream* out) : stepFlexLexer(in, out), myDataModel(theDataModel) { diff --git a/src/StepFile/step.tab.cxx b/src/StepFile/step.tab.cxx index 32a8fee759..7ce8463992 100644 --- a/src/StepFile/step.tab.cxx +++ b/src/StepFile/step.tab.cxx @@ -57,8 +57,6 @@ // disable MSVC warnings in bison code #ifdef _MSC_VER #pragma warning(disable:4065 4244 4131 4127 4702) -#define YYMALLOC malloc -#define YYFREE free #endif void StepFile_Interrupt (Standard_CString theErrorMessage, const Standard_Boolean theIsFail); @@ -1130,11 +1128,11 @@ namespace step { const unsigned char parser::yyrline_[] = { - 0, 98, 98, 99, 100, 101, 102, 103, 104, 105, - 105, 105, 108, 109, 111, 112, 114, 117, 118, 119, - 120, 121, 124, 127, 130, 135, 136, 138, 139, 141, - 142, 144, 145, 146, 147, 149, 150, 152, 153, 155, - 158, 161, 162, 164, 167, 169, 174, 177 + 0, 96, 96, 97, 98, 99, 100, 101, 102, 103, + 103, 103, 106, 107, 109, 110, 112, 115, 116, 117, + 118, 119, 122, 125, 128, 133, 134, 136, 137, 139, + 140, 142, 143, 144, 145, 147, 148, 150, 151, 153, + 156, 159, 160, 162, 165, 167, 172, 175 }; void diff --git a/src/StepFile/step.yacc b/src/StepFile/step.yacc index 6b6f72e3cb..aca5386a3b 100644 --- a/src/StepFile/step.yacc +++ b/src/StepFile/step.yacc @@ -57,8 +57,6 @@ namespace step { // disable MSVC warnings in bison code #ifdef _MSC_VER #pragma warning(disable:4065 4244 4131 4127 4702) -#define YYMALLOC malloc -#define YYFREE free #endif void StepFile_Interrupt (Standard_CString theErrorMessage, const Standard_Boolean theIsFail); } From 3aeea1e96edcafec9244e741eb48092bb05875c2 Mon Sep 17 00:00:00 2001 From: dpasukhi Date: Wed, 22 Nov 2023 11:49:24 +0000 Subject: [PATCH 515/639] 0033425: Configuration - Implement JeMalloc memory manager Integrated CMake procedure to choose MMGR Default MMGE is Native --- CMakeLists.txt | 12 +++ adm/cmake/jemalloc.cmake | 143 ++++++++++++++++++++++++++++ adm/templates/custom.build.bat.in | 1 + adm/templates/custom.build.sh.in | 1 + adm/templates/custom.install.bat.in | 1 + adm/templates/custom.install.sh.in | 1 + adm/templates/env.bat.in | 1 + adm/templates/env.build.sh.in | 4 + adm/templates/env.install.sh.in | 4 + src/Standard/Standard.cxx | 105 +++++++++++--------- src/TKernel/CMakeLists.txt | 11 +++ src/TKernel/EXTERNLIB | 1 + 12 files changed, 241 insertions(+), 44 deletions(-) create mode 100644 adm/cmake/jemalloc.cmake diff --git a/CMakeLists.txt b/CMakeLists.txt index 1bacca1a48..5ef2cb161b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -35,6 +35,10 @@ macro (OCCT_INCLUDE_CMAKE_FILE BEING_INCLUDED_FILE) endif() endmacro() +# set using memory manager option for TKernel +set (USE_MMGR_TYPE "NATIVE" CACHE STRING "Select using memory manager tool.") +set_property(CACHE USE_MMGR_TYPE PROPERTY STRINGS "NATIVE" "FLEXIBLE" "TBB" "JEMALLOC") + # include variable description OCCT_INCLUDE_CMAKE_FILE ("adm/cmake/vardescr") @@ -834,6 +838,14 @@ else() OCCT_CHECK_AND_UNSET ("3RDPARTY_FLEX_EXECUTABLE") endif() +# Jemalloc +if ("${USE_MMGR_TYPE}" STREQUAL "JEMALLOC") + OCCT_INCLUDE_CMAKE_FILE ("adm/cmake/jemalloc") +else() + OCCT_CHECK_AND_UNSET_GROUP ("3RDPARTY_JEMALLOC") + OCCT_CHECK_AND_UNSET ("INSTALL_JEMALLOC") +endif() + # qt for inspector and samples if (BUILD_Inspector OR BUILD_SAMPLES_QT) # check qt 3rdparty path diff --git a/adm/cmake/jemalloc.cmake b/adm/cmake/jemalloc.cmake new file mode 100644 index 0000000000..b37d5d2769 --- /dev/null +++ b/adm/cmake/jemalloc.cmake @@ -0,0 +1,143 @@ +# JeMalloc + +if (NOT DEFINED INSTALL_JEMALLOC) + set (INSTALL_JEMALLOC OFF CACHE BOOL "${INSTALL_INSTALL_JEMALLOC_DESCR}") +endif() + +# include occt macros. compiler_bitness, os_with_bit, compiler +OCCT_INCLUDE_CMAKE_FILE ("adm/cmake/occt_macros") + +# specify JEMALLOC folder in connection with 3RDPARTY_DIR +if (3RDPARTY_DIR AND EXISTS "${3RDPARTY_DIR}") + if (NOT 3RDPARTY_JEMALLOC_DIR OR NOT EXISTS "${3RDPARTY_JEMALLOC_DIR}") + FIND_PRODUCT_DIR ("${3RDPARTY_DIR}" jemalloc JEMALLOC_DIR_NAME) + if (JEMALLOC_DIR_NAME) + set (3RDPARTY_JEMALLOC_DIR "${3RDPARTY_DIR}/${JEMALLOC_DIR_NAME}" CACHE PATH "The directory containing JEMALLOC" FORCE) + set (3RDPARTY_JEMALLOC_DIR "${3RDPARTY_DIR}/${JEMALLOC_DIR_NAME}") + message(STATUS "Info: JEMALLOC detected in ${3RDPARTY_JEMALLOC_DIR}") + endif() + endif() + else() +endif() + +# define required JEMALLOC variables +if (NOT DEFINED 3RDPARTY_JEMALLOC_INCLUDE_DIR) + set (3RDPARTY_JEMALLOC_INCLUDE_DIR "" CACHE PATH "the path of headers directory") +endif() + +# check 3RDPARTY_${PRODUCT_NAME}_ paths for consistency with specified 3RDPARTY_${PRODUCT_NAME}_DIR +if (3RDPARTY_JEMALLOC_DIR AND EXISTS "${3RDPARTY_JEMALLOC_DIR}") + CHECK_PATH_FOR_CONSISTENCY (3RDPARTY_JEMALLOC_DIR 3RDPARTY_JEMALLOC_INCLUDE_DIR PATH "the path to JEMALLOC") + CHECK_PATH_FOR_CONSISTENCY (3RDPARTY_JEMALLOC_DIR 3RDPARTY_JEMALLOC_LIBRARY_DIR FILEPATH "The directory containing JEMALLOC libraries") +endif() + +# header +if (NOT 3RDPARTY_JEMALLOC_INCLUDE_DIR OR NOT EXISTS "${3RDPARTY_JEMALLOC_INCLUDE_DIR}") + set (HEADER_NAMES jemalloc.h) + + # set 3RDPARTY_JEMALLOC_INCLUDE_DIR as notfound, otherwise find_library can't assign a new value to 3RDPARTY_JEMALLOC_INCLUDE_DIR + set (3RDPARTY_JEMALLOC_INCLUDE_DIR "3RDPARTY_JEMALLOC_INCLUDE_DIR-NOTFOUND" CACHE FILEPATH "the path to header directory" FORCE) + + if (3RDPARTY_JEMALLOC_DIR AND EXISTS "${3RDPARTY_JEMALLOC_DIR}") + find_path (3RDPARTY_JEMALLOC_INCLUDE_DIR NAMES ${HEADER_NAMES} + PATHS ${3RDPARTY_JEMALLOC_DIR} + PATH_SUFFIXES include/jemalloc + CMAKE_FIND_ROOT_PATH_BOTH + NO_DEFAULT_PATH) + endif() +endif() + +if (3RDPARTY_JEMALLOC_INCLUDE_DIR AND EXISTS "${3RDPARTY_JEMALLOC_INCLUDE_DIR}") + list (APPEND 3RDPARTY_INCLUDE_DIRS "${3RDPARTY_JEMALLOC_INCLUDE_DIR}") +else() + list (APPEND 3RDPARTY_NOT_INCLUDED 3RDPARTY_JEMALLOC_INCLUDE_DIR) + set (3RDPARTY_JEMALLOC_INCLUDE_DIR "" CACHE FILEPATH "the path to jemalloc.h" FORCE) +endif() + +# Installing destination path +if (WIN32) + set (JEMALLOC_INSTALL_DESTINATION "${INSTALL_DIR}/${INSTALL_DIR_BIN}") +else() + set (JEMALLOC_INSTALL_DESTINATION "${INSTALL_DIR}/${INSTALL_DIR_LIB}") +endif() + +macro (JEMALLOC_LIB_SEARCH MMGR_LIB PREFIX) +if (NOT 3RDPARTY_JEMALLOC_LIBRARY_${PREFIX}_${MMGR_LIB}) + set (JEMALLOC_PATH_SUFFIXES "lib" "bin") + set (3RDPARTY_JEMALLOC_LIBRARY_${PREFIX}_${MMGR_LIB} "3RDPARTY_JEMALLOC_LIBRARY_${PREFIX}_${MMGR_LIB}-NOTFOUND") + if (3RDPARTY_JEMALLOC_DIR AND EXISTS "${3RDPARTY_JEMALLOC_DIR}") + find_library (3RDPARTY_JEMALLOC_LIBRARY_${PREFIX}_${MMGR_LIB} NAMES ${MMGR_LIB} + PATHS "${3RDPARTY_JEMALLOC_LIBRARY_DIR}" "${3RDPARTY_JEMALLOC_DIR}" + PATH_SUFFIXES ${JEMALLOC_PATH_SUFFIXES} + CMAKE_FIND_ROOT_PATH_BOTH + NO_DEFAULT_PATH) + else() + find_library (3RDPARTY_JEMALLOC_LIBRARY_${PREFIX}_${MMGR_LIB} NAMES ${MMGR_LIB} + PATH_SUFFIXES ${JEMALLOC_PATH_SUFFIXES} + CMAKE_FIND_ROOT_PATH_BOTH) + endif() + if (3RDPARTY_JEMALLOC_LIBRARY_${PREFIX}_${MMGR_LIB}) + get_filename_component (3RDPARTY_JEMALLOC_LIBRARY_DIR_${MMGR_LIB} "${3RDPARTY_JEMALLOC_LIBRARY_${PREFIX}_${MMGR_LIB}}" PATH) + set (3RDPARTY_JEMALLOC_LIBRARY_DIR_${MMGR_LIB} "${3RDPARTY_JEMALLOC_LIBRARY_DIR_${MMGR_LIB}}") + else() + set (3RDPARTY_JEMALLOC_LIBRARY_DIR_${MMGR_LIB} "") + endif() +endif() +if (3RDPARTY_JEMALLOC_LIBRARY_DIR_${MMGR_LIB}) + list (APPEND 3RDPARTY_LIBRARY_DIRS "${3RDPARTY_JEMALLOC_LIBRARY_DIR_${MMGR_LIB}}") + set (3RDPARTY_JEMALLOC_LIBRARY_DIR "${3RDPARTY_JEMALLOC_LIBRARY_DIR_${MMGR_LIB}}" CACHE PATH "The directory containing JEMALLOC libraries" FORCE) +else() + message("Cannot find ${MMGR_LIB} library in jemalloc 3rdparty") + list (APPEND 3RDPARTY_NO_LIBS 3RDPARTY_JEMALLOC_LIBRARY_DIR_${MMGR_LIB}) + set (3RDPARTY_JEMALLOC_LIBRARY_${PREFIX}_${MMGR_LIB} "") +endif() +set (JEMALLOC_IS_STATIC_LIB FALSE) +if (((${3RDPARTY_JEMALLOC_LIBRARY_${PREFIX}_${MMGR_LIB}} MATCHES "\.lib$")) OR ((${3RDPARTY_JEMALLOC_LIBRARY_${PREFIX}_${MMGR_LIB}} MATCHES "\.a$"))) + get_filename_component(STATIC_LIB_NAME ${3RDPARTY_JEMALLOC_LIBRARY_${PREFIX}_${MMGR_LIB}} NAME) + list(APPEND CSF_MMGR "${STATIC_LIB_NAME}") + set (JEMALLOC_IS_STATIC_LIB TRUE) +endif() +# install instructions +if (INSTALL_JEMALLOC AND NOT JEMALLOC_IS_STATIC_LIB) + OCCT_MAKE_OS_WITH_BITNESS() + OCCT_MAKE_COMPILER_SHORT_NAME() + get_filename_component(3RDPARTY_JEMALLOC_LIBRARY ${3RDPARTY_JEMALLOC_LIBRARY_${PREFIX}_${MMGR_LIB}} REALPATH) + if (SINGLE_GENERATOR) + install (FILES "${3RDPARTY_JEMALLOC_LIBRARY}" + DESTINATION "${INSTALL_DIR}/${INSTALL_DIR_LIB}") + else() + install (FILES "${3RDPARTY_JEMALLOC_LIBRARY}" + CONFIGURATIONS Debug + DESTINATION "${JEMALLOC_INSTALL_DESTINATION}d") + install (FILES "${3RDPARTY_JEMALLOC_LIBRARY}" + CONFIGURATIONS Release + DESTINATION "${JEMALLOC_INSTALL_DESTINATION}") + install (FILES "${3RDPARTY_JEMALLOC_LIBRARY}" + CONFIGURATIONS RelWithDebInfo + DESTINATION "${JEMALLOC_INSTALL_DESTINATION}i") + endif() + set (USED_3RDPARTY_JEMALLOC_DIR "") +elseif(NOT JEMALLOC_IS_STATIC_LIB) + # the library directory for using by the executable + set (USED_3RDPARTY_JEMALLOC_DIR ${3RDPARTY_JEMALLOC_LIBRARY_DIR_${MMGR_LIB}}) +endif() +unset(3RDPARTY_JEMALLOC_LIBRARY_DIR_${MMGR_LIB} CACHE) +unset(3RDPARTY_JEMALLOC_LIBRARY_${PREFIX}_${MMGR_LIB} CACHE) +endmacro() + +# Reset CSF variable +set (CSF_MMGR "") + +# find static jemalloc lib +SET(CMAKE_FIND_LIBRARY_SUFFIXES ".lib" ".a") +if (WIN32) + JEMALLOC_LIB_SEARCH ("jemalloc" "STATIC") +elseif(NOT WIN32) + JEMALLOC_LIB_SEARCH ("jemalloc_pic" "STATIC") + SET(CMAKE_FIND_LIBRARY_SUFFIXES "" "so") + JEMALLOC_LIB_SEARCH ("jemalloc.so.2" "SHARED") +endif() + +# find shared jemalloc lib +SET(CMAKE_FIND_LIBRARY_SUFFIXES ".dll" ".so") +JEMALLOC_LIB_SEARCH ("jemalloc" "SHARED") diff --git a/adm/templates/custom.build.bat.in b/adm/templates/custom.build.bat.in index 39ad45085b..b968dc854a 100644 --- a/adm/templates/custom.build.bat.in +++ b/adm/templates/custom.build.bat.in @@ -14,6 +14,7 @@ if /I "%VCVER%" == "@COMPILER@" ( set "TBB_DIR=@3RDPARTY_TBB_DLL_DIR@" set "VTK_DIR=@3RDPARTY_VTK_DLL_DIR@" set "FFMPEG_DIR=@3RDPARTY_FFMPEG_DLL_DIR@" + set "JEMALLOC_DIR=@3RDPARTY_JEMALLOC_LIBRARY_DIR@" set "OPENVR_DIR=@3RDPARTY_OPENVR_DLL_DIRS@" if not "@3RDPARTY_QT_DIR@" == "" ( diff --git a/adm/templates/custom.build.sh.in b/adm/templates/custom.build.sh.in index 1f3d2018be..bcf340164e 100644 --- a/adm/templates/custom.build.sh.in +++ b/adm/templates/custom.build.sh.in @@ -12,6 +12,7 @@ if [ "$1" == "@BIN_LETTER@" ]; then export TBB_DIR="@3RDPARTY_TBB_LIBRARY_DIR@" export VTK_DIR="@3RDPARTY_VTK_LIBRARY_DIR@" export FFMPEG_DIR="@3RDPARTY_FFMPEG_LIBRARY_DIR@" + export JEMALLOC_DIR="@3RDPARTY_JEMALLOC_LIBRARY_DIR@" if [ "x@3RDPARTY_QT_DIR" != "x" ]; then export QTDIR="@3RDPARTY_QT_DIR@" diff --git a/adm/templates/custom.install.bat.in b/adm/templates/custom.install.bat.in index 041152bdda..2f2af3a5ac 100644 --- a/adm/templates/custom.install.bat.in +++ b/adm/templates/custom.install.bat.in @@ -16,6 +16,7 @@ if /I "%VCVER%" == "@COMPILER@" ( set "TBB_DIR=@USED_3RDPARTY_TBB_DIR@" set "VTK_DIR=@USED_3RDPARTY_VTK_DIR@" set "FFMPEG_DIR=@USED_3RDPARTY_FFMPEG_DIR@" + set "JEMALLOC_DIR=@USED_3RDPARTY_JEMALLOC_DIR@" set "OPENVR_DIR=@USED_3RDPARTY_OPENVR_DIR@" if not "@USED_3RDPARTY_QT_DIR@" == "" ( diff --git a/adm/templates/custom.install.sh.in b/adm/templates/custom.install.sh.in index 79a4fa3a70..dc6552b342 100644 --- a/adm/templates/custom.install.sh.in +++ b/adm/templates/custom.install.sh.in @@ -12,6 +12,7 @@ if [ "$1" == "@BIN_LETTER@" ]; then export TBB_DIR="@USED_3RDPARTY_TBB_DIR@" export VTK_DIR="@USED_3RDPARTY_VTK_DIR@" export FFMPEG_DIR="@USED_3RDPARTY_FFMPEG_DIR@" + export JEMALLOC_DIR="@USED_3RDPARTY_JEMALLOC_DIR@" if [ "x@USED_3RDPARTY_QT_DIR@" != "x" ]; then export QTDIR="@USED_3RDPARTY_QT_DIR@" diff --git a/adm/templates/env.bat.in b/adm/templates/env.bat.in index 354a177cd1..24df954e68 100644 --- a/adm/templates/env.bat.in +++ b/adm/templates/env.bat.in @@ -154,6 +154,7 @@ if not ["%GLES2_DIR%"] == [""] set "PATH=%GLES2_DIR%;%PATH%" if not ["%TBB_DIR%"] == [""] set "PATH=%TBB_DIR%;%PATH%" if not ["%VTK_DIR%"] == [""] set "PATH=%VTK_DIR%;%PATH%" if not ["%FFMPEG_DIR%"] == [""] set "PATH=%FFMPEG_DIR%;%PATH%" +if not ["%JEMALLOC_DIR%"] == [""] set "PATH=%JEMALLOC_DIR%;%PATH%" if not ["%OPENVR_DIR%"] == [""] set "PATH=%OPENVR_DIR%;%PATH%" rem ----- Set path to 3rd party and OCCT libraries ----- diff --git a/adm/templates/env.build.sh.in b/adm/templates/env.build.sh.in index 7e11c6299e..3026d4c1f1 100644 --- a/adm/templates/env.build.sh.in +++ b/adm/templates/env.build.sh.in @@ -69,6 +69,10 @@ if [ "$FFMPEG_DIR" != "" ]; then THRDPARTY_PATH="${FFMPEG_DIR}:${THRDPARTY_PATH}" fi +if [ "$JEMALLOC_DIR" != "" ]; then + THRDPARTY_PATH="${JEMALLOC_DIR}:${THRDPARTY_PATH}" +fi + if [ "$QTDIR" != "" ]; then THRDPARTY_PATH="${QTDIR}/lib:${THRDPARTY_PATH}" fi diff --git a/adm/templates/env.install.sh.in b/adm/templates/env.install.sh.in index bdb2dec2fb..36254ff8cb 100644 --- a/adm/templates/env.install.sh.in +++ b/adm/templates/env.install.sh.in @@ -71,6 +71,10 @@ if [ "$FFMPEG_DIR" != "" ]; then THRDPARTY_PATH="${FFMPEG_DIR}:${THRDPARTY_PATH}" fi +if [ "$JEMALLOC_DIR" != "" ]; then + THRDPARTY_PATH="${JEMALLOC_DIR}:${THRDPARTY_PATH}" +fi + if [ "$QTDIR" != "" ]; then THRDPARTY_PATH="${QTDIR}/lib:${THRDPARTY_PATH}" fi diff --git a/src/Standard/Standard.cxx b/src/Standard/Standard.cxx index 49bafea57d..bb06de71fd 100644 --- a/src/Standard/Standard.cxx +++ b/src/Standard/Standard.cxx @@ -31,9 +31,6 @@ extern "C" int posix_memalign(void** thePtr, size_t theAlign, size_t theSize); #endif -// Temp define, after it will be part of CMake -#define OCCT_MMGT_OPT_NATIVE - namespace { static Standard::AllocatorType& allocatorTypeInstance() @@ -41,12 +38,12 @@ namespace static Standard::AllocatorType aType = #ifdef OCCT_MMGT_OPT_FLEXIBLE Standard::AllocatorType::NATIVE; -#elif defined OCCT_MMGT_OPT_NATIVE - Standard::AllocatorType::NATIVE; #elif defined OCCT_MMGT_OPT_TBB Standard::AllocatorType::TBB; #elif defined OCCT_MMGT_OPT_JEMALLOC Standard::AllocatorType::JEMALLOC; +#else + Standard::AllocatorType::NATIVE; #endif return aType; } @@ -54,29 +51,31 @@ namespace #ifdef OCCT_MMGT_OPT_JEMALLOC #define JEMALLOC_NO_DEMANGLE -#include +#include #endif // OCCT_MMGT_OPT_JEMALLOC -// Available macros definition -// - OCCT_MMGT_OPT_FLEXIBLE, modifiable in real time -// - OCCT_MMGT_OPT_TBB, using tbb::scalable_allocator -// - OCCT_MMGT_OPT_NATIVE, using native calloc, free -// - OCCT_MMGT_OPT_JEMALLOC, using external jecalloc, jefree -#ifdef OCCT_MMGT_OPT_FLEXIBLE -#include -#include - - // paralleling with Intel TBB +// paralleling with Intel TBB #ifdef HAVE_TBB -#pragma comment (lib, "tbbmalloc.lib") #include #else +#ifdef OCCT_MMGT_OPT_TBB +#undef OCCT_MMGT_OPT_TBB +#endif #define scalable_malloc malloc #define scalable_calloc calloc #define scalable_realloc realloc #define scalable_free free #endif +// Available macros definition +// - OCCT_MMGT_OPT_FLEXIBLE, modifiable in real time +// - OCCT_MMGT_OPT_TBB, using tbb::scalable_allocator +// - OCCT_MMGT_OPT_NATIVE, using native calloc, free +// - OCCT_MMGT_OPT_JEMALLOC, using external jecalloc, jefree +#ifdef OCCT_MMGT_OPT_FLEXIBLE +#include +#include + // There is no support for environment variables in UWP // OSD_Environment could not be used here because of cyclic dependency #ifdef OCCT_UWP @@ -119,13 +118,13 @@ namespace Standard_Address Reallocate(Standard_Address thePtr, const Standard_Size theSize) override { - Standard_Address newStorage = (Standard_Address)realloc(thePtr, theSize); - if (!newStorage) + Standard_Address aNewStorage = (Standard_Address)realloc(thePtr, theSize); + if (!aNewStorage) throw Standard_OutOfMemory("Standard_MMgrRaw::Reallocate(): realloc failed"); // Note that it is not possible to ensure that additional memory // allocated by realloc will be cleared (so as to satisfy myClear mode); // in order to do that we would need using memset... - return newStorage; + return aNewStorage; } //! Free allocated memory. The pointer is nullified. @@ -169,13 +168,13 @@ namespace Standard_Address Reallocate(Standard_Address thePtr, const Standard_Size theSize) override { - Standard_Address newStorage = (Standard_Address)scalable_realloc(thePtr, theSize); - if (!newStorage) + Standard_Address aNewStorage = (Standard_Address)scalable_realloc(thePtr, theSize); + if (!aNewStorage) throw Standard_OutOfMemory("Standard_MMgrTBBalloc::Reallocate(): realloc failed"); // Note that it is not possible to ensure that additional memory // allocated by realloc will be cleared (so as to satisfy myClear mode); // in order to do that we would need using memset... - return newStorage; + return aNewStorage; } //! Free allocated memory @@ -392,13 +391,18 @@ Standard_Address Standard::Allocate(const Standard_Size theSize) { #ifdef OCCT_MMGT_OPT_FLEXIBLE return Standard_MMgrFactory::GetMMgr()->Allocate(theSize); -#elif defined OCCT_MMGT_OPT_NATIVE - Standard_Address aPtr = calloc(theSize, sizeof(char)); +#elif defined OCCT_MMGT_OPT_JEMALLOC + Standard_Address aPtr = je_calloc(theSize, sizeof(char)); if (!aPtr) throw Standard_OutOfMemory("Standard_MMgrRaw::Allocate(): malloc failed"); return aPtr; -#elif defined OCCT_MMGT_OPT_JEMALLOC - Standard_Address aPtr = je_calloc(theSize, sizeof(char)); +#elif defined OCCT_MMGT_OPT_TBB + Standard_Address aPtr = scalable_calloc(theSize, sizeof(char)); + if (!aPtr) + throw Standard_OutOfMemory("Standard_MMgrRaw::Allocate(): malloc failed"); + return aPtr; +#else + Standard_Address aPtr = calloc(theSize, sizeof(char)); if (!aPtr) throw Standard_OutOfMemory("Standard_MMgrRaw::Allocate(): malloc failed"); return aPtr; @@ -413,10 +417,12 @@ Standard_Address Standard::AllocateOptimal(const Standard_Size theSize) { #ifdef OCCT_MMGT_OPT_FLEXIBLE return Standard_MMgrFactory::GetMMgr()->Allocate(theSize); -#elif defined OCCT_MMGT_OPT_NATIVE - return malloc(theSize); #elif defined OCCT_MMGT_OPT_JEMALLOC return je_malloc(theSize); +#elif defined OCCT_MMGT_OPT_TBB + return scalable_malloc(theSize); +#else + return malloc(theSize); #endif } @@ -428,10 +434,12 @@ void Standard::Free(Standard_Address theStorage) { #ifdef OCCT_MMGT_OPT_FLEXIBLE Standard_MMgrFactory::GetMMgr()->Free(theStorage); -#elif defined OCCT_MMGT_OPT_NATIVE - free(theStorage); #elif defined OCCT_MMGT_OPT_JEMALLOC - return je_free(theStorage); + je_free(theStorage); +#elif defined OCCT_MMGT_OPT_TBB + scalable_free(theStorage); +#else + free(theStorage); #endif } @@ -447,16 +455,21 @@ Standard_Address Standard::Reallocate(Standard_Address theStorage, // in order to do that we would need using memset.. #ifdef OCCT_MMGT_OPT_FLEXIBLE return Standard_MMgrFactory::GetMMgr()->Reallocate(theStorage, theSize); -#elif defined OCCT_MMGT_OPT_NATIVE - Standard_Address aNewStorage = (Standard_Address)realloc(theStorage, theSize); +#elif defined OCCT_MMGT_OPT_JEMALLOC + Standard_Address aNewStorage = (Standard_Address)je_realloc(theStorage, theSize); if (!aNewStorage) throw Standard_OutOfMemory("Standard_MMgrRaw::Reallocate(): realloc failed"); return aNewStorage; -#elif defined OCCT_MMGT_OPT_JEMALLOC - Standard_Address newStorage = (Standard_Address)je_realloc(theStorage, theSize); - if (!newStorage) +#elif defined OCCT_MMGT_OPT_TBB + Standard_Address aNewStorage = (Standard_Address)scalable_realloc(theStorage, theSize); + if (!aNewStorage) throw Standard_OutOfMemory("Standard_MMgrRaw::Reallocate(): realloc failed"); - return newStorage; + return aNewStorage; +#else + Standard_Address aNewStorage = (Standard_Address)realloc(theStorage, theSize); + if (!aNewStorage) + throw Standard_OutOfMemory("Standard_MMgrRaw::Reallocate(): realloc failed"); + return aNewStorage; #endif } @@ -480,7 +493,11 @@ Standard_Integer Standard::Purge() Standard_Address Standard::AllocateAligned(const Standard_Size theSize, const Standard_Size theAlign) { -#if defined(OCCT_MMGT_OPT_FLEXIBLE) || defined(OCCT_MMGT_OPT_NATIVE) +#ifdef OCCT_MMGT_OPT_JEMALLOC + return je_aligned_alloc(theAlign, theSize); +#elif defined OCCT_MMGT_OPT_TBB + return scalable_aligned_malloc(theSize, theAlign); +#else #if defined(_MSC_VER) return _aligned_malloc(theSize, theAlign); #elif defined(__ANDROID__) || defined(__QNX__) @@ -495,8 +512,6 @@ Standard_Address Standard::AllocateAligned(const Standard_Size theSize, } return aPtr; #endif -#elif defined OCCT_MMGT_OPT_JEMALLOC - return je_aligned_alloc(theAlign, theSize); #endif } @@ -506,7 +521,11 @@ Standard_Address Standard::AllocateAligned(const Standard_Size theSize, //======================================================================= void Standard::FreeAligned(Standard_Address thePtrAligned) { -#if defined(OCCT_MMGT_OPT_FLEXIBLE) || defined(OCCT_MMGT_OPT_NATIVE) +#ifdef OCCT_MMGT_OPT_JEMALLOC +return je_free(thePtrAligned); +#elif defined OCCT_MMGT_OPT_TBB + return scalable_aligned_free(thePtrAligned); +#else #if defined(_MSC_VER) _aligned_free(thePtrAligned); #elif defined(__ANDROID__) || defined(__QNX__) @@ -516,7 +535,5 @@ void Standard::FreeAligned(Standard_Address thePtrAligned) #else free(thePtrAligned); #endif -#elif defined OCCT_MMGT_OPT_JEMALLOC - return je_free(thePtrAligned); #endif } diff --git a/src/TKernel/CMakeLists.txt b/src/TKernel/CMakeLists.txt index aa2ddb052d..f3f74c09d8 100644 --- a/src/TKernel/CMakeLists.txt +++ b/src/TKernel/CMakeLists.txt @@ -1,3 +1,14 @@ project(TKernel) OCCT_INCLUDE_CMAKE_FILE (adm/cmake/occt_toolkit) + +# Set desired Memory Manager +if ("${USE_MMGR_TYPE}" STREQUAL "FLEXIBLE") + target_compile_definitions("TKernel" PRIVATE "OCCT_MMGT_OPT_FLEXIBLE") +elseif ("${USE_MMGR_TYPE}" STREQUAL "TBB") + target_compile_definitions("TKernel" PRIVATE "OCCT_MMGT_OPT_TBB") +elseif ("${USE_MMGR_TYPE}" STREQUAL "JEMALLOC") + target_compile_definitions("TKernel" PRIVATE "OCCT_MMGT_OPT_JEMALLOC") +else () + message (STATUS "Info: Used native memory manager") +endif() diff --git a/src/TKernel/EXTERNLIB b/src/TKernel/EXTERNLIB index 8911ab53c5..1c9d77f47f 100755 --- a/src/TKernel/EXTERNLIB +++ b/src/TKernel/EXTERNLIB @@ -7,3 +7,4 @@ CSF_dl CSF_wsock32 CSF_psapi CSF_androidlog +CSF_MMGR From bd651bbbd9e30fc5a73d32d11e0ea1a1821afd76 Mon Sep 17 00:00:00 2001 From: dpasukhi Date: Sun, 19 Nov 2023 11:09:33 +0000 Subject: [PATCH 516/639] 0033531: Configuration - Rework DataExchange ToolKits organization Integrated DE plugin functionality. Reworked DE components: - TKDESTEP: Handling STEP file format. - TKDEOBJ: Handling OBJ file format. - TKDEIGES: Handling IGES file format. - TKDEGLTF: Handling GLTF file format. - TKDEVRML: Handling VRML file format. - TKDEPLY: Handling PLY file format. - TKDESTL: Handling STL file format. Reworked DE DRAW components: TKXSDRAWSTEP: Container for DE command to work with STEP. TKXSDRAWOBJ: Container for DE command to work with OBJ. TKXSDRAWIGES: Container for DE command to work with IGES. TKXSDRAWGLTF: Container for DE command to work with GLTF. TKXSDRAWVRML: Container for DE command to work with VRML. TKXSDRAWPLY: Container for DE command to work with PLY. TKXSDRAWSTL: Container for DE command to work with STL. TKXSDRAW rework to be base DRAW plugin to keep DE session and utils. Updated documentation Updated samples --- adm/MODULES | 4 +- adm/UDLIST | 35 +- dox/contribution/tests/tests.md | 8 +- dox/user_guides/step/step.md | 2 +- samples/CSharp/OCCTProxy/OCCTProxy.cpp | 8 +- samples/CSharp/OCCTProxy_D3D/OCCTProxyD3D.cpp | 8 +- samples/glfw/adm/cmake/FindOpenCASCADE.cmake | 2 +- .../UIKitSample.xcodeproj/project.pbxproj | 37 +- .../jnisample/OcctJniActivity.java | 7 +- .../jniviewer/app/src/main/jni/CMakeLists.txt | 4 +- .../01_Geometry/adm/win/vc10/Geometry.vcxproj | 8 +- .../mfc/standard/02_Modeling/CMakeLists.txt | 2 +- .../02_Modeling/adm/win/vc10/Modeling.vcxproj | 8 +- .../adm/win/vc10/ImportExport.vcxproj | 8 +- samples/mfc/standard/mfcsample/CMakeLists.txt | 11 +- .../mfcsample/adm/win/vc10/mfcsample.vcxproj | 8 +- samples/qt/IESample/EXTERNLIB | 11 +- samples/qt/IESample/IESample.pro | 4 +- samples/qt/OCCTOverview/EXTERNLIB | 11 +- samples/qt/OCCTOverview/OCCTOverview.pro | 4 +- samples/qt/Tutorial/EXTERNLIB | 11 +- samples/qt/Tutorial/Tutorial.pro | 4 +- samples/webgl/CMakeLists.txt | 2 +- samples/xaml/CMakeLists.txt | 8 +- src/DE/DE_PluginHolder.hxx | 45 + src/DE/DE_Wrapper.cxx | 49 +- src/DE/DE_Wrapper.hxx | 14 +- src/DE/FILES | 1 + .../DEBRepCascade_ConfigurationNode.cxx | 4 + .../DEXCAFCascade_ConfigurationNode.cxx | 4 + src/DRAWEXE/DRAWEXE.cxx | 55 +- src/DRAWEXE/EXTERNLIB_STATIC | 27 +- src/DrawResources/DrawPlugin | 12 +- .../IGESCAFControl_ConfigurationNode.cxx | 4 + src/OS/DataExchange.tcl | 8 +- src/RWGltf/RWGltf_ConfigurationNode.cxx | 4 + src/RWObj/RWObj_ConfigurationNode.cxx | 4 + src/RWPly/RWPly_ConfigurationNode.cxx | 17 +- src/RWStl/RWStl_ConfigurationNode.cxx | 4 + .../STEPCAFControl_ConfigurationNode.cxx | 4 + src/{TKXDE => TKDE}/CMakeLists.txt | 2 +- src/{TKXDE => TKDE}/EXTERNLIB | 0 src/{TKIGES => TKDE}/FILES | 0 src/{TKXDE => TKDE}/PACKAGES | 0 .../CMakeLists.txt | 2 +- src/{TKXDECascade => TKDECascade}/EXTERNLIB | 2 +- src/{TKSTEP => TKDECascade}/FILES | 0 src/{TKXDECascade => TKDECascade}/PACKAGES | 0 src/{TKSTEP => TKDEGLTF}/CMakeLists.txt | 2 +- src/TKDEGLTF/EXTERNLIB | 13 + src/{TKSTEP209 => TKDEGLTF}/FILES | 0 src/TKDEGLTF/PACKAGES | 1 + src/TKDEIGES/CMakeLists.txt | 3 + src/{TKIGES => TKDEIGES}/EXTERNLIB | 12 +- src/{TKSTEPAttr => TKDEIGES}/FILES | 0 src/{TKIGES => TKDEIGES}/PACKAGES | 1 + src/{TKIGES => TKDEOBJ}/CMakeLists.txt | 2 +- src/TKDEOBJ/EXTERNLIB | 12 + src/{TKSTEPBase => TKDEOBJ}/FILES | 0 src/TKDEOBJ/PACKAGES | 1 + src/{TKVRML => TKDEPLY}/CMakeLists.txt | 2 +- src/TKDEPLY/EXTERNLIB | 12 + src/{TKSTL => TKDEPLY}/FILES | 0 src/TKDEPLY/PACKAGES | 1 + src/TKDESTEP/CMakeLists.txt | 3 + src/TKDESTEP/EXTERNLIB | 23 + src/{TKVRML => TKDESTEP}/FILES | 0 src/TKDESTEP/PACKAGES | 40 + src/{TKSTL => TKDESTL}/CMakeLists.txt | 2 +- src/{TKSTL => TKDESTL}/EXTERNLIB | 2 +- src/{TKXDE => TKDESTL}/FILES | 0 src/{TKSTL => TKDESTL}/PACKAGES | 0 src/TKDEVRML/CMakeLists.txt | 3 + src/{TKVRML => TKDEVRML}/EXTERNLIB | 2 +- src/{TKXDECascade => TKDEVRML}/FILES | 0 src/{TKVRML => TKDEVRML}/PACKAGES | 0 src/TKQADraw/EXTERNLIB | 8 +- src/TKRWMesh/EXTERNLIB | 2 +- src/TKRWMesh/PACKAGES | 3 - src/TKSTEP/EXTERNLIB | 13 - src/TKSTEP/PACKAGES | 15 - src/TKSTEP209/EXTERNLIB | 3 - src/TKSTEP209/PACKAGES | 4 - src/TKSTEPAttr/EXTERNLIB | 3 - src/TKSTEPAttr/PACKAGES | 6 - src/TKSTEPBase/CMakeLists.txt | 3 - src/TKSTEPBase/EXTERNLIB | 3 - src/TKSTEPBase/PACKAGES | 8 - src/TKXDECascade/CMakeLists.txt | 3 - src/TKXDEDRAW/EXTERNLIB | 18 +- src/TKXDEIGES/CMakeLists.txt | 3 - src/TKXDEIGES/EXTERNLIB | 11 - src/TKXDEIGES/PACKAGES | 1 - src/TKXDESTEP/CMakeLists.txt | 3 - src/TKXDESTEP/EXTERNLIB | 16 - src/TKXDESTEP/PACKAGES | 1 - src/TKXSBase/PACKAGES | 6 - src/TKXSDRAW/EXTERNLIB | 6 - src/TKXSDRAW/PACKAGES | 3 - src/{TKSTEP209 => TKXSDRAWDE}/CMakeLists.txt | 2 +- src/TKXSDRAWDE/EXTERNLIB | 23 + src/{TKXDEIGES => TKXSDRAWDE}/FILES | 0 src/TKXSDRAWDE/PACKAGES | 1 + src/TKXSDRAWGLTF/CMakeLists.txt | 3 + src/TKXSDRAWGLTF/EXTERNLIB | 21 + src/{TKXDESTEP => TKXSDRAWGLTF}/FILES | 0 src/TKXSDRAWGLTF/PACKAGES | 1 + src/TKXSDRAWIGES/CMakeLists.txt | 3 + src/TKXSDRAWIGES/EXTERNLIB | 21 + src/TKXSDRAWIGES/FILES | 2 + src/TKXSDRAWIGES/PACKAGES | 1 + src/TKXSDRAWOBJ/CMakeLists.txt | 3 + src/TKXSDRAWOBJ/EXTERNLIB | 21 + src/TKXSDRAWOBJ/FILES | 2 + src/TKXSDRAWOBJ/PACKAGES | 1 + src/TKXSDRAWPLY/CMakeLists.txt | 3 + src/TKXSDRAWPLY/EXTERNLIB | 21 + src/TKXSDRAWPLY/FILES | 2 + src/TKXSDRAWPLY/PACKAGES | 1 + src/TKXSDRAWSTEP/CMakeLists.txt | 3 + src/TKXSDRAWSTEP/EXTERNLIB | 22 + src/TKXSDRAWSTEP/FILES | 2 + src/TKXSDRAWSTEP/PACKAGES | 1 + src/TKXSDRAWSTL/CMakeLists.txt | 3 + src/TKXSDRAWSTL/EXTERNLIB | 21 + src/TKXSDRAWSTL/FILES | 2 + src/TKXSDRAWSTL/PACKAGES | 1 + src/TKXSDRAWVRML/CMakeLists.txt | 3 + src/TKXSDRAWVRML/EXTERNLIB | 21 + src/TKXSDRAWVRML/FILES | 2 + src/TKXSDRAWVRML/PACKAGES | 1 + src/Vrml/Vrml_ConfigurationNode.cxx | 4 + src/XDEDRAW/XDEDRAW.cxx | 19 - src/XDEDRAW/XDEDRAW.hxx | 6 +- src/XDEDRAW/XDEDRAW_Common.cxx | 1349 +-------- src/XDEDRAW/XDEDRAW_Common.hxx | 30 +- src/XSControl/XSControl_Functions.cxx | 2 +- src/XSControl/XSControl_WorkSession.hxx | 8 +- src/XSDRAW/XSDRAW.cxx | 128 +- src/XSDRAW/XSDRAW.hxx | 32 +- src/XSDRAWDE/FILES | 2 + src/XSDRAWDE/XSDRAWDE.cxx | 427 +++ .../XSDRAWDE.hxx} | 21 +- src/XSDRAWGLTF/FILES | 2 + src/XSDRAWGLTF/XSDRAWGLTF.cxx | 602 ++++ .../XSDRAWGLTF.hxx} | 26 +- src/XSDRAWIGES/XSDRAWIGES.cxx | 1231 +++++--- src/XSDRAWIGES/XSDRAWIGES.hxx | 45 +- src/XSDRAWOBJ/FILES | 2 + src/XSDRAWOBJ/XSDRAWOBJ.cxx | 405 +++ .../XSDRAWOBJ.hxx} | 21 +- src/XSDRAWPLY/FILES | 2 + src/XSDRAWPLY/XSDRAWPLY.cxx | 348 +++ .../XSDRAWPLY.hxx} | 25 +- src/XSDRAWSTEP/XSDRAWSTEP.cxx | 1072 ++++--- src/XSDRAWSTEP/XSDRAWSTEP.hxx | 41 +- src/XSDRAWSTL/FILES | 8 + src/XSDRAWSTL/XSDRAWSTL.cxx | 1322 +++++++++ src/XSDRAWSTL/XSDRAWSTL.hxx | 31 + .../XSDRAWSTL_DataSource.cxx} | 20 +- .../XSDRAWSTL_DataSource.hxx} | 16 +- .../XSDRAWSTL_DataSource3D.cxx} | 22 +- .../XSDRAWSTL_DataSource3D.hxx} | 16 +- .../XSDRAWSTL_DrawableMesh.cxx} | 10 +- .../XSDRAWSTL_DrawableMesh.hxx} | 16 +- src/XSDRAWSTLVRML/FILES | 12 - src/XSDRAWSTLVRML/XSDRAWSTLVRML.cxx | 2583 ----------------- .../XSDRAWSTLVRML_ElemNodesMap.hxx | 26 - src/XSDRAWVRML/FILES | 2 + src/XSDRAWVRML/XSDRAWVRML.cxx | 411 +++ src/XSDRAWVRML/XSDRAWVRML.hxx | 31 + tests/bugs/demo/bug14673_3 | 2 +- tests/bugs/demo/bug27905 | 2 +- tests/bugs/heal/bug23722 | 2 + tests/bugs/heal/bug24549 | 2 +- tests/bugs/heal/bug24983 | 2 + tests/bugs/heal/bug25013_1 | 2 + tests/bugs/heal/bug25013_2 | 2 + tests/bugs/heal/bug25823 | 2 + tests/bugs/heal/bug26280 | 2 + tests/bugs/heal/bug26671 | 2 + tests/bugs/heal/bug27078 | 2 + tests/bugs/heal/bug27894 | 2 + tests/bugs/heal/bug33028 | 2 + tests/bugs/heal/bug33398 | 2 + tests/bugs/mesh/bug28118 | 2 +- tests/bugs/mesh/bug29715 | 2 +- tests/bugs/modalg_4/bug8842_1 | 2 +- tests/bugs/modalg_4/bug8842_10 | 2 +- tests/bugs/modalg_4/bug8842_11 | 2 +- tests/bugs/modalg_4/bug8842_12 | 2 +- tests/bugs/modalg_4/bug8842_13 | 2 +- tests/bugs/modalg_4/bug8842_14 | 2 +- tests/bugs/modalg_4/bug8842_15 | 2 +- tests/bugs/modalg_4/bug8842_16 | 2 +- tests/bugs/modalg_4/bug8842_2 | 2 +- tests/bugs/modalg_4/bug8842_3 | 2 +- tests/bugs/modalg_4/bug8842_4 | 2 +- tests/bugs/modalg_4/bug8842_5 | 2 +- tests/bugs/modalg_4/bug8842_6 | 2 +- tests/bugs/modalg_4/bug8842_7 | 2 +- tests/bugs/modalg_4/bug8842_8 | 2 +- tests/bugs/modalg_4/bug8842_9 | 2 +- tests/bugs/modalg_5/bug25175 | 2 +- tests/bugs/modalg_5/bug25410 | 2 +- tests/bugs/modalg_7/bug30595_2 | 2 +- tests/bugs/modalg_7/bug30829 | 2 +- tests/bugs/modalg_8/bug33165 | 2 +- tests/bugs/moddata_2/bug22572 | 2 +- tests/bugs/stlvrml/begin | 2 +- tests/perf/fclasses/bug24947 | 2 +- tests/perf/heal/bug24596_1 | 2 +- tests/perf/heal/bug24596_2 | 2 +- tests/perf/moddata/bug25487_1 | 2 +- tests/perf/moddata/bug25487_2 | 2 +- tests/perf/moddata/bug27048_2 | 2 +- tests/v3d/bugs/bug23407_1 | 2 +- tests/v3d/mesh/begin | 2 +- tests/vselect/bugs/bug26566 | 2 +- tests/vselect/face/G2 | 2 +- tests/vselect/face/G3 | 2 +- tests/vselect/face/G4 | 2 +- tools/TKDFBrowser/EXTERNLIB | 2 +- 223 files changed, 6221 insertions(+), 5229 deletions(-) create mode 100644 src/DE/DE_PluginHolder.hxx rename src/{TKXDE => TKDE}/CMakeLists.txt (76%) rename src/{TKXDE => TKDE}/EXTERNLIB (100%) rename src/{TKIGES => TKDE}/FILES (100%) mode change 100755 => 100644 rename src/{TKXDE => TKDE}/PACKAGES (100%) rename src/{TKSTEPAttr => TKDECascade}/CMakeLists.txt (70%) rename src/{TKXDECascade => TKDECascade}/EXTERNLIB (95%) rename src/{TKSTEP => TKDECascade}/FILES (100%) mode change 100755 => 100644 rename src/{TKXDECascade => TKDECascade}/PACKAGES (100%) rename src/{TKSTEP => TKDEGLTF}/CMakeLists.txt (73%) create mode 100644 src/TKDEGLTF/EXTERNLIB rename src/{TKSTEP209 => TKDEGLTF}/FILES (100%) mode change 100755 => 100644 create mode 100644 src/TKDEGLTF/PACKAGES create mode 100644 src/TKDEIGES/CMakeLists.txt rename src/{TKIGES => TKDEIGES}/EXTERNLIB (80%) mode change 100755 => 100644 rename src/{TKSTEPAttr => TKDEIGES}/FILES (100%) mode change 100755 => 100644 rename src/{TKIGES => TKDEIGES}/PACKAGES (92%) mode change 100755 => 100644 rename src/{TKIGES => TKDEOBJ}/CMakeLists.txt (74%) create mode 100644 src/TKDEOBJ/EXTERNLIB rename src/{TKSTEPBase => TKDEOBJ}/FILES (100%) mode change 100755 => 100644 create mode 100644 src/TKDEOBJ/PACKAGES rename src/{TKVRML => TKDEPLY}/CMakeLists.txt (74%) create mode 100644 src/TKDEPLY/EXTERNLIB rename src/{TKSTL => TKDEPLY}/FILES (100%) mode change 100755 => 100644 create mode 100644 src/TKDEPLY/PACKAGES create mode 100644 src/TKDESTEP/CMakeLists.txt create mode 100644 src/TKDESTEP/EXTERNLIB rename src/{TKVRML => TKDESTEP}/FILES (100%) mode change 100755 => 100644 create mode 100644 src/TKDESTEP/PACKAGES rename src/{TKSTL => TKDESTL}/CMakeLists.txt (74%) rename src/{TKSTL => TKDESTL}/EXTERNLIB (90%) mode change 100755 => 100644 rename src/{TKXDE => TKDESTL}/FILES (100%) rename src/{TKSTL => TKDESTL}/PACKAGES (100%) mode change 100755 => 100644 create mode 100644 src/TKDEVRML/CMakeLists.txt rename src/{TKVRML => TKDEVRML}/EXTERNLIB (95%) mode change 100755 => 100644 rename src/{TKXDECascade => TKDEVRML}/FILES (100%) rename src/{TKVRML => TKDEVRML}/PACKAGES (100%) mode change 100755 => 100644 delete mode 100755 src/TKSTEP/EXTERNLIB delete mode 100755 src/TKSTEP/PACKAGES delete mode 100644 src/TKSTEP209/EXTERNLIB delete mode 100755 src/TKSTEP209/PACKAGES delete mode 100644 src/TKSTEPAttr/EXTERNLIB delete mode 100755 src/TKSTEPAttr/PACKAGES delete mode 100644 src/TKSTEPBase/CMakeLists.txt delete mode 100644 src/TKSTEPBase/EXTERNLIB delete mode 100755 src/TKSTEPBase/PACKAGES delete mode 100644 src/TKXDECascade/CMakeLists.txt delete mode 100644 src/TKXDEIGES/CMakeLists.txt delete mode 100755 src/TKXDEIGES/EXTERNLIB delete mode 100755 src/TKXDEIGES/PACKAGES delete mode 100644 src/TKXDESTEP/CMakeLists.txt delete mode 100755 src/TKXDESTEP/EXTERNLIB delete mode 100755 src/TKXDESTEP/PACKAGES rename src/{TKSTEP209 => TKXSDRAWDE}/CMakeLists.txt (71%) create mode 100644 src/TKXSDRAWDE/EXTERNLIB rename src/{TKXDEIGES => TKXSDRAWDE}/FILES (100%) mode change 100755 => 100644 create mode 100644 src/TKXSDRAWDE/PACKAGES create mode 100644 src/TKXSDRAWGLTF/CMakeLists.txt create mode 100644 src/TKXSDRAWGLTF/EXTERNLIB rename src/{TKXDESTEP => TKXSDRAWGLTF}/FILES (100%) mode change 100755 => 100644 create mode 100644 src/TKXSDRAWGLTF/PACKAGES create mode 100644 src/TKXSDRAWIGES/CMakeLists.txt create mode 100644 src/TKXSDRAWIGES/EXTERNLIB create mode 100644 src/TKXSDRAWIGES/FILES create mode 100644 src/TKXSDRAWIGES/PACKAGES create mode 100644 src/TKXSDRAWOBJ/CMakeLists.txt create mode 100644 src/TKXSDRAWOBJ/EXTERNLIB create mode 100644 src/TKXSDRAWOBJ/FILES create mode 100644 src/TKXSDRAWOBJ/PACKAGES create mode 100644 src/TKXSDRAWPLY/CMakeLists.txt create mode 100644 src/TKXSDRAWPLY/EXTERNLIB create mode 100644 src/TKXSDRAWPLY/FILES create mode 100644 src/TKXSDRAWPLY/PACKAGES create mode 100644 src/TKXSDRAWSTEP/CMakeLists.txt create mode 100644 src/TKXSDRAWSTEP/EXTERNLIB create mode 100644 src/TKXSDRAWSTEP/FILES create mode 100644 src/TKXSDRAWSTEP/PACKAGES create mode 100644 src/TKXSDRAWSTL/CMakeLists.txt create mode 100644 src/TKXSDRAWSTL/EXTERNLIB create mode 100644 src/TKXSDRAWSTL/FILES create mode 100644 src/TKXSDRAWSTL/PACKAGES create mode 100644 src/TKXSDRAWVRML/CMakeLists.txt create mode 100644 src/TKXSDRAWVRML/EXTERNLIB create mode 100644 src/TKXSDRAWVRML/FILES create mode 100644 src/TKXSDRAWVRML/PACKAGES create mode 100644 src/XSDRAWDE/FILES create mode 100644 src/XSDRAWDE/XSDRAWDE.cxx rename src/{XSDRAWSTLVRML/XSDRAWSTLVRML_DataMapIteratorOfCoordsMap.hxx => XSDRAWDE/XSDRAWDE.hxx} (60%) create mode 100644 src/XSDRAWGLTF/FILES create mode 100644 src/XSDRAWGLTF/XSDRAWGLTF.cxx rename src/{XSDRAWSTLVRML/XSDRAWSTLVRML.hxx => XSDRAWGLTF/XSDRAWGLTF.hxx} (58%) create mode 100644 src/XSDRAWOBJ/FILES create mode 100644 src/XSDRAWOBJ/XSDRAWOBJ.cxx rename src/{XSDRAWSTLVRML/XSDRAWSTLVRML_DataMapIteratorOfElemNodesMap.hxx => XSDRAWOBJ/XSDRAWOBJ.hxx} (59%) create mode 100644 src/XSDRAWPLY/FILES create mode 100644 src/XSDRAWPLY/XSDRAWPLY.cxx rename src/{XSDRAWSTLVRML/XSDRAWSTLVRML_CoordsMap.hxx => XSDRAWPLY/XSDRAWPLY.hxx} (54%) create mode 100644 src/XSDRAWSTL/FILES create mode 100644 src/XSDRAWSTL/XSDRAWSTL.cxx create mode 100644 src/XSDRAWSTL/XSDRAWSTL.hxx rename src/{XSDRAWSTLVRML/XSDRAWSTLVRML_DataSource.cxx => XSDRAWSTL/XSDRAWSTL_DataSource.cxx} (90%) rename src/{XSDRAWSTLVRML/XSDRAWSTLVRML_DataSource.hxx => XSDRAWSTL/XSDRAWSTL_DataSource.hxx} (88%) rename src/{XSDRAWSTLVRML/XSDRAWSTLVRML_DataSource3D.cxx => XSDRAWSTL/XSDRAWSTL_DataSource3D.cxx} (94%) rename src/{XSDRAWSTLVRML/XSDRAWSTLVRML_DataSource3D.hxx => XSDRAWSTL/XSDRAWSTL_DataSource3D.hxx} (90%) rename src/{XSDRAWSTLVRML/XSDRAWSTLVRML_DrawableMesh.cxx => XSDRAWSTL/XSDRAWSTL_DrawableMesh.cxx} (79%) rename src/{XSDRAWSTLVRML/XSDRAWSTLVRML_DrawableMesh.hxx => XSDRAWSTL/XSDRAWSTL_DrawableMesh.hxx} (70%) delete mode 100644 src/XSDRAWSTLVRML/FILES delete mode 100644 src/XSDRAWSTLVRML/XSDRAWSTLVRML.cxx delete mode 100644 src/XSDRAWSTLVRML/XSDRAWSTLVRML_ElemNodesMap.hxx create mode 100644 src/XSDRAWVRML/FILES create mode 100644 src/XSDRAWVRML/XSDRAWVRML.cxx create mode 100644 src/XSDRAWVRML/XSDRAWVRML.hxx diff --git a/adm/MODULES b/adm/MODULES index 235c30595d..480e742983 100644 --- a/adm/MODULES +++ b/adm/MODULES @@ -3,6 +3,6 @@ ModelingData TKG2d TKG3d TKGeomBase TKBRep ModelingAlgorithms TKGeomAlgo TKTopAlgo TKPrim TKBO TKBool TKHLR TKFillet TKOffset TKFeat TKMesh TKXMesh TKShHealing Visualization TKService TKV3d TKOpenGl TKOpenGles TKMeshVS TKIVtk TKD3DHost ApplicationFramework TKCDF TKLCAF TKCAF TKBinL TKXmlL TKBin TKXml TKStdL TKStd TKTObj TKBinTObj TKXmlTObj TKVCAF -DataExchange TKXDE TKXSBase TKSTEPBase TKSTEPAttr TKSTEP209 TKSTEP TKIGES TKXCAF TKXDEIGES TKXDESTEP TKSTL TKVRML TKXmlXCAF TKBinXCAF TKRWMesh TKXDECascade -Draw TKDraw TKTopTest TKOpenGlTest TKOpenGlesTest TKD3DHostTest TKViewerTest TKXSDRAW TKDCAF TKXDEDRAW TKTObjDRAW TKQADraw TKIVtkDraw DRAWEXE +DataExchange TKDE TKXSBase TKDESTEP TKDEIGES TKDESTL TKDEVRML TKDECascade TKDEOBJ TKDEGLTF TKDEPLY TKXCAF TKXmlXCAF TKBinXCAF TKRWMesh DETools TKExpress ExpToCasExe +Draw TKDraw TKTopTest TKOpenGlTest TKOpenGlesTest TKD3DHostTest TKViewerTest TKXSDRAW TKDCAF TKXDEDRAW TKTObjDRAW TKQADraw TKIVtkDraw DRAWEXE TKXSDRAWDE TKXSDRAWGLTF TKXSDRAWIGES TKXSDRAWOBJ TKXSDRAWPLY TKXSDRAWSTEP TKXSDRAWSTL TKXSDRAWVRML diff --git a/adm/UDLIST b/adm/UDLIST index 0fd9b49e53..14f425239d 100644 --- a/adm/UDLIST +++ b/adm/UDLIST @@ -376,18 +376,13 @@ r SHMessage r XSMessage r XSTEPResource t TKBinXCAF -t TKIGES -t TKSTEP -t TKSTEP209 -t TKSTEPAttr -t TKSTEPBase -t TKSTL -t TKVRML +t TKDESTL +t TKDEVRML t TKXCAF -t TKXDE -t TKXDECascade -t TKXDEIGES -t TKXDESTEP +t TKDE +t TKDECascade +t TKDEIGES +t TKDESTEP t TKXSBase t TKXmlXCAF n BOPTest @@ -419,7 +414,12 @@ n XDEDRAW n XSDRAW n XSDRAWIGES n XSDRAWSTEP -n XSDRAWSTLVRML +n XSDRAWSTL +n XSDRAWVRML +n XSDRAWDE +n XSDRAWGLTF +n XSDRAWOBJ +n XSDRAWPLY r DrawResources t TKDCAF t TKDraw @@ -431,6 +431,14 @@ t TKD3DHostTest t TKViewerTest t TKXDEDRAW t TKXSDRAW +t TKXSDRAWIGES +t TKXSDRAWSTEP +t TKXSDRAWSTL +t TKXSDRAWVRML +t TKXSDRAWDE +t TKXSDRAWGLTF +t TKXSDRAWOBJ +t TKXSDRAWPLY x DRAWEXE n QADraw n QANCollection @@ -456,6 +464,9 @@ t TKVCAF n XCAFView n XCAFNoteObjects t TKRWMesh +t TKDEGLTF +t TKDEOBJ +t TKDEPLY n RWGltf n RWMesh n RWObj diff --git a/dox/contribution/tests/tests.md b/dox/contribution/tests/tests.md index ef8dd4e711..05ef3d56f8 100644 --- a/dox/contribution/tests/tests.md +++ b/dox/contribution/tests/tests.md @@ -1089,10 +1089,10 @@ This group allows testing extended data exchange packages. | Draw | TKDraw, TKTopTest, TKViewerTest, TKXSDRAW, TKDCAF, TKXDEDRAW, TKTObjDRAW, TKQADraw, DRAWEXE, Problems of testing system | draw | | Shape Healing | TKShHealing | heal | | Mesh | TKMesh, TKXMesh | mesh | -| Data Exchange | TKIGES | iges | -| Data Exchange | TKSTEPBase, TKSTEPAttr, TKSTEP209, TKSTEP | step | -| Data Exchange | TKSTL, TKVRML | stlvrml | -| Data Exchange | TKXSBase, TKXCAF, TKXCAFSchema, TKXDEIGES, TKXDESTEP, TKXmlXCAF, TKBinXCAF | xde | +| Data Exchange | TKDEIGES | iges | +| Data Exchange | TKDESTEP | step | +| Data Exchange | TKDESTL, TKDEVRML | stlvrml | +| Data Exchange | TKXSBase, TKXCAF, TKXCAFSchema, TKXmlXCAF, TKBinXCAF | xde | | Foundation Classes | TKernel, TKMath | fclasses | | Modeling_algorithms | TKGeomAlgo, TKTopAlgo, TKPrim, TKBO, TKBool, TKHLR, TKFillet, TKOffset, TKFeat, TKXMesh | modalg | | Modeling Data | TKG2d, TKG3d, TKGeomBase, TKBRep | moddata | diff --git a/dox/user_guides/step/step.md b/dox/user_guides/step/step.md index f8f47da396..3c6b31a56b 100644 --- a/dox/user_guides/step/step.md +++ b/dox/user_guides/step/step.md @@ -1498,7 +1498,7 @@ It is necessary to call command *newmodel* to perform a new translation of the n @section occt_step_7 Reading from and writing to STEP -The *STEPCAFControl* package (TKXDESTEP toolkit) provides tools to read and write STEP files (see XDE User's Guide). +The *STEPCAFControl* package (TKDESTEP toolkit) provides tools to read and write STEP files (see XDE User's Guide). In addition to the translation of shapes implemented in basic translator, it provides the following: * STEP assemblies, read as OCCT compounds by basic translator, are translated to XDE assemblies; diff --git a/samples/CSharp/OCCTProxy/OCCTProxy.cpp b/samples/CSharp/OCCTProxy/OCCTProxy.cpp index d20a4f6b9b..52bda2ee32 100644 --- a/samples/CSharp/OCCTProxy/OCCTProxy.cpp +++ b/samples/CSharp/OCCTProxy/OCCTProxy.cpp @@ -43,10 +43,10 @@ #pragma comment(lib, "TKService.lib") #pragma comment(lib, "TKV3d.lib") #pragma comment(lib, "TKOpenGl.lib") -#pragma comment(lib, "TKIGES.lib") -#pragma comment(lib, "TKSTEP.lib") -#pragma comment(lib, "TKStl.lib") -#pragma comment(lib, "TKVrml.lib") +#pragma comment(lib, "TKDEIGES.lib") +#pragma comment(lib, "TKDESTEP.lib") +#pragma comment(lib, "TKDESTL.lib") +#pragma comment(lib, "TKDEVRML.lib") #pragma comment(lib, "TKLCAF.lib") //! Auxiliary tool for converting C# string into UTF-8 string. diff --git a/samples/CSharp/OCCTProxy_D3D/OCCTProxyD3D.cpp b/samples/CSharp/OCCTProxy_D3D/OCCTProxyD3D.cpp index 51bf0a56ba..7f79725147 100644 --- a/samples/CSharp/OCCTProxy_D3D/OCCTProxyD3D.cpp +++ b/samples/CSharp/OCCTProxy_D3D/OCCTProxyD3D.cpp @@ -51,10 +51,10 @@ #pragma comment(lib, "TKV3d.lib") #pragma comment(lib, "TKOpenGl.lib") #pragma comment(lib, "TKD3dHost.lib") -#pragma comment(lib, "TKIGES.lib") -#pragma comment(lib, "TKSTEP.lib") -#pragma comment(lib, "TKStl.lib") -#pragma comment(lib, "TKVrml.lib") +#pragma comment(lib, "TKDEIGES.lib") +#pragma comment(lib, "TKDESTEP.lib") +#pragma comment(lib, "TKDESTL.lib") +#pragma comment(lib, "TKDEVRML.lib") #pragma comment(lib, "TKLCAF.lib") #pragma comment(lib, "D3D9.lib") diff --git a/samples/glfw/adm/cmake/FindOpenCASCADE.cmake b/samples/glfw/adm/cmake/FindOpenCASCADE.cmake index f079c15425..839cc75192 100644 --- a/samples/glfw/adm/cmake/FindOpenCASCADE.cmake +++ b/samples/glfw/adm/cmake/FindOpenCASCADE.cmake @@ -63,7 +63,7 @@ set (OpenCASCADE_TKLIST ${OpenCASCADE_TKLIST} TKG2d TKG3d TKGeomBase TKBRep) # M set (OpenCASCADE_TKLIST ${OpenCASCADE_TKLIST} TKGeomAlgo TKTopAlgo TKPrim TKBO TKBool TKHLR TKFillet TKOffset TKFeat TKMesh TKXMesh TKShHealing) # ModelingAlgorithms set (OpenCASCADE_TKLIST ${OpenCASCADE_TKLIST} TKService TKV3d TKOpenGl TKMeshVS TKIVtk TKD3DHost) # Visualization set (OpenCASCADE_TKLIST ${OpenCASCADE_TKLIST} TKCDF TKLCAF TKCAF TKBinL TKXmlL TKBin TKXml TKStdL TKStd TKTObj TKBinTObj TKXmlTObj TKVCAF) # ApplicationFramework -set (OpenCASCADE_TKLIST ${OpenCASCADE_TKLIST} TKXSBase TKSTEPBase TKSTEPAttr TKSTEP209 TKSTEP TKIGES TKXCAF TKXDEIGES TKXDESTEP TKSTL TKVRML TKXmlXCAF TKBinXCAF TKRWMesh) # DataExchange +set (OpenCASCADE_TKLIST ${OpenCASCADE_TKLIST} TKXSBase TKXCAF TKDEIGES TKDESTEP TKDESTL TKDEVRML TKXmlXCAF TKBinXCAF TKRWMesh TKDEGLTF TKDEOBJ TKDEPLY) # DataExchange set (OpenCASCADE_TKLIST ${OpenCASCADE_TKLIST} TKDraw TKViewerTest) # Draw # validate location of OCCT libraries and headers diff --git a/samples/ios/UIKitSample/UIKitSample.xcodeproj/project.pbxproj b/samples/ios/UIKitSample/UIKitSample.xcodeproj/project.pbxproj index a83efb466a..78a9b18267 100644 --- a/samples/ios/UIKitSample/UIKitSample.xcodeproj/project.pbxproj +++ b/samples/ios/UIKitSample/UIKitSample.xcodeproj/project.pbxproj @@ -26,14 +26,10 @@ 0A7DEDFC1E2D29FF00267B9B /* libTKV3d.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 0A7DEDF71E2D29F800267B9B /* libTKV3d.a */; }; 0A7DEDFD1E2D29FF00267B9B /* libTKVCAF.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 0A7DEDF81E2D29FB00267B9B /* libTKVCAF.a */; }; 0A7DEE2B1E2D2AE000267B9B /* libTKService.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 0A7DEE0B1E2D2A9D00267B9B /* libTKService.a */; }; - 0A7DEE2E1E2D2AE000267B9B /* libTKSTEP.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 0A7DEE0E1E2D2AA800267B9B /* libTKSTEP.a */; }; - 0A7DEE301E2D2AE000267B9B /* libTKSTEPAttr.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 0A7DEE101E2D2AAE00267B9B /* libTKSTEPAttr.a */; }; - 0A7DEE311E2D2AE000267B9B /* libTKSTEPBase.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 0A7DEE111E2D2AB200267B9B /* libTKSTEPBase.a */; }; + 0A7DEE2E1E2D2AE000267B9B /* libTKDESTEP.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 0A7DEE0E1E2D2AA800267B9B /* libTKDESTEP.a */; }; 0A7DEE351E2D2AE000267B9B /* libTKXCAF.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 0A7DEE151E2D2AC000267B9B /* libTKXCAF.a */; }; - 0A7DEE371E2D2AE000267B9B /* libTKXDESTEP.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 0A7DEE171E2D2AC700267B9B /* libTKXDESTEP.a */; }; 0A7DEE3E1E2D2B8100267B9B /* libTKBO.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 0A7DEE021E2D2A7F00267B9B /* libTKBO.a */; }; 0A7DEE3F1E2D2BB000267B9B /* libTKOpenGles.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 0A7DEE091E2D2A9700267B9B /* libTKOpenGles.a */; }; - 0A7DEE401E2D2BEA00267B9B /* libTKSTEP209.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 0A7DEE0F1E2D2AAB00267B9B /* libTKSTEP209.a */; }; 0A7DEE411E2D2C1500267B9B /* libTKXSBase.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 0A7DEE1D1E2D2ADC00267B9B /* libTKXSBase.a */; }; 0AAE0DE61EAF816E00C1F65B /* screw.step in Resources */ = {isa = PBXBuildFile; fileRef = 0AAE0DE51EAF816D00C1F65B /* screw.step */; }; 0AE286641EB0D29B00A9D719 /* libz.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = 0AE286631EB0D29A00A9D719 /* libz.tbd */; }; @@ -79,7 +75,7 @@ 0A7DEE031E2D2A8200267B9B /* libTKBool.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libTKBool.a; path = ../occt/lib/libTKBool.a; sourceTree = ""; }; 0A7DEE041E2D2A8500267B9B /* libTKFeat.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libTKFeat.a; path = ../occt/lib/libTKFeat.a; sourceTree = ""; }; 0A7DEE051E2D2A8900267B9B /* libTKFillet.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libTKFillet.a; path = ../occt/lib/libTKFillet.a; sourceTree = ""; }; - 0A7DEE061E2D2A8C00267B9B /* libTKIGES.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libTKIGES.a; path = ../occt/lib/libTKIGES.a; sourceTree = ""; }; + 0A7DEE061E2D2A8C00267B9B /* libTKDEIGES.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libTKDEIGES.a; path = ../occt/lib/libTKDEIGES.a; sourceTree = ""; }; 0A7DEE071E2D2A8F00267B9B /* libTKMeshVS.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libTKMeshVS.a; path = ../occt/lib/libTKMeshVS.a; sourceTree = ""; }; 0A7DEE081E2D2A9300267B9B /* libTKOffset.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libTKOffset.a; path = ../occt/lib/libTKOffset.a; sourceTree = ""; }; 0A7DEE091E2D2A9700267B9B /* libTKOpenGles.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libTKOpenGles.a; path = ../occt/lib/libTKOpenGles.a; sourceTree = ""; }; @@ -87,16 +83,11 @@ 0A7DEE0B1E2D2A9D00267B9B /* libTKService.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libTKService.a; path = ../occt/lib/libTKService.a; sourceTree = ""; }; 0A7DEE0C1E2D2AA100267B9B /* libTKStd.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libTKStd.a; path = ../occt/lib/libTKStd.a; sourceTree = ""; }; 0A7DEE0D1E2D2AA400267B9B /* libTKStdL.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libTKStdL.a; path = ../occt/lib/libTKStdL.a; sourceTree = ""; }; - 0A7DEE0E1E2D2AA800267B9B /* libTKSTEP.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libTKSTEP.a; path = ../occt/lib/libTKSTEP.a; sourceTree = ""; }; - 0A7DEE0F1E2D2AAB00267B9B /* libTKSTEP209.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libTKSTEP209.a; path = ../occt/lib/libTKSTEP209.a; sourceTree = ""; }; - 0A7DEE101E2D2AAE00267B9B /* libTKSTEPAttr.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libTKSTEPAttr.a; path = ../occt/lib/libTKSTEPAttr.a; sourceTree = ""; }; - 0A7DEE111E2D2AB200267B9B /* libTKSTEPBase.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libTKSTEPBase.a; path = ../occt/lib/libTKSTEPBase.a; sourceTree = ""; }; - 0A7DEE121E2D2AB500267B9B /* libTKSTL.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libTKSTL.a; path = ../occt/lib/libTKSTL.a; sourceTree = ""; }; + 0A7DEE0E1E2D2AA800267B9B /* libTKDESTEP.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libTKDESTEP.a; path = ../occt/lib/libTKDESTEP.a; sourceTree = ""; }; + 0A7DEE121E2D2AB500267B9B /* libTKDESTL.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libTKDESTL.a; path = ../occt/lib/libTKDESTL.a; sourceTree = ""; }; 0A7DEE131E2D2AB900267B9B /* libTKTObj.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libTKTObj.a; path = ../occt/lib/libTKTObj.a; sourceTree = ""; }; - 0A7DEE141E2D2ABC00267B9B /* libTKVRML.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libTKVRML.a; path = ../occt/lib/libTKVRML.a; sourceTree = ""; }; + 0A7DEE141E2D2ABC00267B9B /* libTKDEVRML.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libTKDEVRML.a; path = ../occt/lib/libTKDEVRML.a; sourceTree = ""; }; 0A7DEE151E2D2AC000267B9B /* libTKXCAF.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libTKXCAF.a; path = ../occt/lib/libTKXCAF.a; sourceTree = ""; }; - 0A7DEE161E2D2AC300267B9B /* libTKXDEIGES.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libTKXDEIGES.a; path = ../occt/lib/libTKXDEIGES.a; sourceTree = ""; }; - 0A7DEE171E2D2AC700267B9B /* libTKXDESTEP.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libTKXDESTEP.a; path = ../occt/lib/libTKXDESTEP.a; sourceTree = ""; }; 0A7DEE181E2D2ACA00267B9B /* libTKXMesh.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libTKXMesh.a; path = ../occt/lib/libTKXMesh.a; sourceTree = ""; }; 0A7DEE191E2D2ACE00267B9B /* libTKXml.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libTKXml.a; path = ../occt/lib/libTKXml.a; sourceTree = ""; }; 0A7DEE1A1E2D2AD100267B9B /* libTKXmlL.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libTKXmlL.a; path = ../occt/lib/libTKXmlL.a; sourceTree = ""; }; @@ -134,13 +125,10 @@ files = ( 0AE286641EB0D29B00A9D719 /* libz.tbd in Frameworks */, 0A7DEE411E2D2C1500267B9B /* libTKXSBase.a in Frameworks */, - 0A7DEE401E2D2BEA00267B9B /* libTKSTEP209.a in Frameworks */, 0A7DEE3F1E2D2BB000267B9B /* libTKOpenGles.a in Frameworks */, 0A7DEE3E1E2D2B8100267B9B /* libTKBO.a in Frameworks */, 0A7DEE2B1E2D2AE000267B9B /* libTKService.a in Frameworks */, - 0A7DEE2E1E2D2AE000267B9B /* libTKSTEP.a in Frameworks */, - 0A7DEE301E2D2AE000267B9B /* libTKSTEPAttr.a in Frameworks */, - 0A7DEE311E2D2AE000267B9B /* libTKSTEPBase.a in Frameworks */, + 0A7DEE2E1E2D2AE000267B9B /* libTKDESTEP.a in Frameworks */, 0A7DEE351E2D2AE000267B9B /* libTKXCAF.a in Frameworks */, 0A7DEE371E2D2AE000267B9B /* libTKXDESTEP.a in Frameworks */, 0A7DEDE71E2D28E300267B9B /* libTKBRep.a in Frameworks */, @@ -231,7 +219,7 @@ 0A7DEE031E2D2A8200267B9B /* libTKBool.a */, 0A7DEE041E2D2A8500267B9B /* libTKFeat.a */, 0A7DEE051E2D2A8900267B9B /* libTKFillet.a */, - 0A7DEE061E2D2A8C00267B9B /* libTKIGES.a */, + 0A7DEE061E2D2A8C00267B9B /* libTKDEIGES.a */, 0A7DEE071E2D2A8F00267B9B /* libTKMeshVS.a */, 0A7DEE081E2D2A9300267B9B /* libTKOffset.a */, 0A7DEE091E2D2A9700267B9B /* libTKOpenGles.a */, @@ -239,16 +227,11 @@ 0A7DEE0B1E2D2A9D00267B9B /* libTKService.a */, 0A7DEE0C1E2D2AA100267B9B /* libTKStd.a */, 0A7DEE0D1E2D2AA400267B9B /* libTKStdL.a */, - 0A7DEE0E1E2D2AA800267B9B /* libTKSTEP.a */, - 0A7DEE0F1E2D2AAB00267B9B /* libTKSTEP209.a */, - 0A7DEE101E2D2AAE00267B9B /* libTKSTEPAttr.a */, - 0A7DEE111E2D2AB200267B9B /* libTKSTEPBase.a */, - 0A7DEE121E2D2AB500267B9B /* libTKSTL.a */, + 0A7DEE0E1E2D2AA800267B9B /* libTKDESTEP.a */, + 0A7DEE121E2D2AB500267B9B /* libTKDESTL.a */, 0A7DEE131E2D2AB900267B9B /* libTKTObj.a */, - 0A7DEE141E2D2ABC00267B9B /* libTKVRML.a */, + 0A7DEE141E2D2ABC00267B9B /* libTKDEVRML.a */, 0A7DEE151E2D2AC000267B9B /* libTKXCAF.a */, - 0A7DEE161E2D2AC300267B9B /* libTKXDEIGES.a */, - 0A7DEE171E2D2AC700267B9B /* libTKXDESTEP.a */, 0A7DEE181E2D2ACA00267B9B /* libTKXMesh.a */, 0A7DEE191E2D2ACE00267B9B /* libTKXml.a */, 0A7DEE1A1E2D2AD100267B9B /* libTKXmlL.a */, diff --git a/samples/java/jniviewer/app/src/main/java/com/opencascade/jnisample/OcctJniActivity.java b/samples/java/jniviewer/app/src/main/java/com/opencascade/jnisample/OcctJniActivity.java index b92c4ae98d..d75708abfa 100644 --- a/samples/java/jniviewer/app/src/main/java/com/opencascade/jnisample/OcctJniActivity.java +++ b/samples/java/jniviewer/app/src/main/java/com/opencascade/jnisample/OcctJniActivity.java @@ -138,11 +138,8 @@ public boolean loadNatives() || !loadLibVerbose ("TKFillet", aLoaded, aFailed) || !loadLibVerbose ("TKOffset", aLoaded, aFailed) || !loadLibVerbose ("TKXSBase", aLoaded, aFailed) - || !loadLibVerbose ("TKIGES", aLoaded, aFailed) - || !loadLibVerbose ("TKSTEPBase", aLoaded, aFailed) - || !loadLibVerbose ("TKSTEPAttr", aLoaded, aFailed) - || !loadLibVerbose ("TKSTEP209", aLoaded, aFailed) - || !loadLibVerbose ("TKSTEP", aLoaded, aFailed) + || !loadLibVerbose ("TKDEIGES", aLoaded, aFailed) + || !loadLibVerbose ("TKDESTEP", aLoaded, aFailed) // OCCT Visualization || !loadLibVerbose ("TKService", aLoaded, aFailed) || !loadLibVerbose ("TKHLR", aLoaded, aFailed) diff --git a/samples/java/jniviewer/app/src/main/jni/CMakeLists.txt b/samples/java/jniviewer/app/src/main/jni/CMakeLists.txt index e399de7601..4c854cfe90 100644 --- a/samples/java/jniviewer/app/src/main/jni/CMakeLists.txt +++ b/samples/java/jniviewer/app/src/main/jni/CMakeLists.txt @@ -8,8 +8,8 @@ set (anOcctLibs # exchange TKPrim TKBO TKBool TKFillet TKOffset TKXSBase - TKIGES - TKSTEPBase TKSTEPAttr TKSTEP209 TKSTEP + TKDEIGES + TKDESTEP # OCCT Visualization TKService TKHLR TKV3d TKOpenGles ) diff --git a/samples/mfc/standard/01_Geometry/adm/win/vc10/Geometry.vcxproj b/samples/mfc/standard/01_Geometry/adm/win/vc10/Geometry.vcxproj index 27247f0cff..57f44ff568 100644 --- a/samples/mfc/standard/01_Geometry/adm/win/vc10/Geometry.vcxproj +++ b/samples/mfc/standard/01_Geometry/adm/win/vc10/Geometry.vcxproj @@ -116,7 +116,7 @@ 0x0409
    - TKVCAF.lib;TKVrml.lib;TKStl.lib;TKBrep.lib;TKIGES.lib;TKShHealing.lib;TKStep.lib;TKXSBase.lib;TKBool.lib;TKCAF.lib;TKCDF.lib;TKernel.lib;TKFeat.lib;TKFillet.lib;TKG2d.lib;TKG3d.lib;TKGeomAlgo.lib;TKGeomBase.lib;TKHLR.lib;TKMath.lib;TKOffset.lib;TKPrim.lib;TKService.lib;TKTopAlgo.lib;TKV3d.lib;TKOpenGl.lib;mfcsample.lib;TKMesh.lib;%(AdditionalDependencies) + TKVCAF.lib;TKDEVRML.lib;TKDESTL.lib;TKBrep.lib;TKDEIGES.lib;TKShHealing.lib;TKDESTEP.lib;TKXSBase.lib;TKBool.lib;TKCAF.lib;TKCDF.lib;TKernel.lib;TKFeat.lib;TKFillet.lib;TKG2d.lib;TKG3d.lib;TKGeomAlgo.lib;TKGeomBase.lib;TKHLR.lib;TKMath.lib;TKOffset.lib;TKPrim.lib;TKService.lib;TKTopAlgo.lib;TKV3d.lib;TKOpenGl.lib;mfcsample.lib;TKMesh.lib;%(AdditionalDependencies) ../../../../win32\$(VCFMT)\bin/Geometry.exe true ..\..\..\..\win32\$(VCFMT)\lib;$(CSF_OCCTLibPath);%(AdditionalLibraryDirectories) @@ -159,7 +159,7 @@ 0x0409
    - TKVCAF.lib;TKVrml.lib;TKStl.lib;TKBrep.lib;TKIGES.lib;TKShHealing.lib;TKStep.lib;TKXSBase.lib;TKBool.lib;TKCAF.lib;TKCDF.lib;TKernel.lib;TKFeat.lib;TKFillet.lib;TKG2d.lib;TKG3d.lib;TKGeomAlgo.lib;TKGeomBase.lib;TKHLR.lib;TKMath.lib;TKOffset.lib;TKPrim.lib;TKService.lib;TKTopAlgo.lib;TKV3d.lib;TKOpenGl.lib;mfcsample.lib;TKMesh.lib;%(AdditionalDependencies) + TKVCAF.lib;TKDEVRML.lib;TKDESTL.lib;TKBrep.lib;TKDEIGES.lib;TKShHealing.lib;TKDESTEP.lib;TKXSBase.lib;TKBool.lib;TKCAF.lib;TKCDF.lib;TKernel.lib;TKFeat.lib;TKFillet.lib;TKG2d.lib;TKG3d.lib;TKGeomAlgo.lib;TKGeomBase.lib;TKHLR.lib;TKMath.lib;TKOffset.lib;TKPrim.lib;TKService.lib;TKTopAlgo.lib;TKV3d.lib;TKOpenGl.lib;mfcsample.lib;TKMesh.lib;%(AdditionalDependencies) ../../../../win64\$(VCFMT)\bin/Geometry.exe true ..\..\..\..\win64\$(VCFMT)\lib;$(CSF_OCCTLibPath);%(AdditionalLibraryDirectories) @@ -202,7 +202,7 @@ 0x0409 - TKVCAF.lib;TKVrml.lib;TKStl.lib;TKBrep.lib;TKIGES.lib;TKShHealing.lib;TKStep.lib;TKXSBase.lib;TKBool.lib;TKCAF.lib;TKCDF.lib;TKernel.lib;TKFeat.lib;TKFillet.lib;TKG2d.lib;TKG3d.lib;TKGeomAlgo.lib;TKGeomBase.lib;TKHLR.lib;TKMath.lib;TKOffset.lib;TKPrim.lib;TKService.lib;TKTopAlgo.lib;TKV3d.lib;TKOpenGl.lib;mfcsample.lib;TKMesh.lib;%(AdditionalDependencies) + TKVCAF.lib;TKDEVRML.lib;TKDESTL.lib;TKBrep.lib;TKDEIGES.lib;TKShHealing.lib;TKDESTEP.lib;TKXSBase.lib;TKBool.lib;TKCAF.lib;TKCDF.lib;TKernel.lib;TKFeat.lib;TKFillet.lib;TKG2d.lib;TKG3d.lib;TKGeomAlgo.lib;TKGeomBase.lib;TKHLR.lib;TKMath.lib;TKOffset.lib;TKPrim.lib;TKService.lib;TKTopAlgo.lib;TKV3d.lib;TKOpenGl.lib;mfcsample.lib;TKMesh.lib;%(AdditionalDependencies) ../../../../win32\$(VCFMT)\bind/Geometry.exe true ..\..\..\..\win32\$(VCFMT)\libd;$(CSF_OCCTLibPath);%(AdditionalLibraryDirectories) @@ -246,7 +246,7 @@ 0x0409 - TKVCAF.lib;TKVrml.lib;TKStl.lib;TKBrep.lib;TKIGES.lib;TKShHealing.lib;TKStep.lib;TKXSBase.lib;TKBool.lib;TKCAF.lib;TKCDF.lib;TKernel.lib;TKFeat.lib;TKFillet.lib;TKG2d.lib;TKG3d.lib;TKGeomAlgo.lib;TKGeomBase.lib;TKHLR.lib;TKMath.lib;TKOffset.lib;TKPrim.lib;TKService.lib;TKTopAlgo.lib;TKV3d.lib;TKOpenGl.lib;mfcsample.lib;TKMesh.lib;%(AdditionalDependencies) + TKVCAF.lib;TKDEVRML.lib;TKDESTL.lib;TKBrep.lib;TKDEIGES.lib;TKShHealing.lib;TKDESTEP.lib;TKXSBase.lib;TKBool.lib;TKCAF.lib;TKCDF.lib;TKernel.lib;TKFeat.lib;TKFillet.lib;TKG2d.lib;TKG3d.lib;TKGeomAlgo.lib;TKGeomBase.lib;TKHLR.lib;TKMath.lib;TKOffset.lib;TKPrim.lib;TKService.lib;TKTopAlgo.lib;TKV3d.lib;TKOpenGl.lib;mfcsample.lib;TKMesh.lib;%(AdditionalDependencies) ../../../..\win64\$(VCFMT)\bind/Geometry.exe true ..\..\..\..\win64\$(VCFMT)\libd;$(CSF_OCCTLibPath);%(AdditionalLibraryDirectories) diff --git a/samples/mfc/standard/02_Modeling/CMakeLists.txt b/samples/mfc/standard/02_Modeling/CMakeLists.txt index 29b562d013..2cc6bb78bf 100644 --- a/samples/mfc/standard/02_Modeling/CMakeLists.txt +++ b/samples/mfc/standard/02_Modeling/CMakeLists.txt @@ -61,4 +61,4 @@ include_directories (${CMAKE_BINARY_DIR}/inc ${Modeling_SRC_DIR} ${MFC_STANDARD_SAMPLES_DIR}/Common) -target_link_libraries (Modeling mfcsample TKSTEP209 TKSTEPAttr TKSTEPBase TKBO) +target_link_libraries (Modeling mfcsample TKDESTEP TKBO) diff --git a/samples/mfc/standard/02_Modeling/adm/win/vc10/Modeling.vcxproj b/samples/mfc/standard/02_Modeling/adm/win/vc10/Modeling.vcxproj index 869bea9491..d55e340800 100644 --- a/samples/mfc/standard/02_Modeling/adm/win/vc10/Modeling.vcxproj +++ b/samples/mfc/standard/02_Modeling/adm/win/vc10/Modeling.vcxproj @@ -115,7 +115,7 @@ 0x0409 - TKVCAF.lib;TKVrml.lib;TKStl.lib;TKBRep.lib;TKIGES.lib;TKShHealing.lib;TKSTEP.lib;TKSTEP209.lib;TKSTEPAttr.lib;TKSTEPBase.lib;TKXSBase.lib;TKBool.lib;TKCAF.lib;TKCDF.lib;TKernel.lib;TKFeat.lib;TKFillet.lib;TKG2d.lib;TKG3d.lib;TKGeomAlgo.lib;TKGeomBase.lib;TKHLR.lib;TKMath.lib;TKOffset.lib;TKPrim.lib;TKService.lib;TKTopAlgo.lib;TKV3d.lib;TKOpenGl.lib;mfcsample.lib;TKBO.lib;%(AdditionalDependencies) + TKVCAF.lib;TKDEVRML.lib;TKDESTL.lib;TKBRep.lib;TKDEIGES.lib;TKShHealing.lib;TKDESTEP.lib;TKXSBase.lib;TKBool.lib;TKCAF.lib;TKCDF.lib;TKernel.lib;TKFeat.lib;TKFillet.lib;TKG2d.lib;TKG3d.lib;TKGeomAlgo.lib;TKGeomBase.lib;TKHLR.lib;TKMath.lib;TKOffset.lib;TKPrim.lib;TKService.lib;TKTopAlgo.lib;TKV3d.lib;TKOpenGl.lib;mfcsample.lib;TKBO.lib;%(AdditionalDependencies) ../../../../win32\$(VCFMT)\bind/Modeling.exe true ..\..\..\..\win32\$(VCFMT)\libd;$(CSF_OCCTLibPath);%(AdditionalLibraryDirectories) @@ -157,7 +157,7 @@ 0x0409 - TKVCAF.lib;TKVrml.lib;TKStl.lib;TKBRep.lib;TKIGES.lib;TKShHealing.lib;TKSTEP.lib;TKSTEP209.lib;TKSTEPAttr.lib;TKSTEPBase.lib;TKXSBase.lib;TKBool.lib;TKCAF.lib;TKCDF.lib;TKernel.lib;TKFeat.lib;TKFillet.lib;TKG2d.lib;TKG3d.lib;TKGeomAlgo.lib;TKGeomBase.lib;TKHLR.lib;TKMath.lib;TKOffset.lib;TKPrim.lib;TKService.lib;TKTopAlgo.lib;TKV3d.lib;TKOpenGl.lib;mfcsample.lib;TKBO.lib;%(AdditionalDependencies) + TKVCAF.lib;TKDEVRML.lib;TKDESTL.lib;TKBRep.lib;TKDEIGES.lib;TKShHealing.lib;TKDESTEP.lib;TKXSBase.lib;TKBool.lib;TKCAF.lib;TKCDF.lib;TKernel.lib;TKFeat.lib;TKFillet.lib;TKG2d.lib;TKG3d.lib;TKGeomAlgo.lib;TKGeomBase.lib;TKHLR.lib;TKMath.lib;TKOffset.lib;TKPrim.lib;TKService.lib;TKTopAlgo.lib;TKV3d.lib;TKOpenGl.lib;mfcsample.lib;TKBO.lib;%(AdditionalDependencies) ../../../../win64\$(VCFMT)\bind/Modeling.exe true ..\..\..\..\win64\$(VCFMT)\libd;$(CSF_OCCTLibPath);%(AdditionalLibraryDirectories) @@ -200,7 +200,7 @@ 0x0409 - TKVCAF.lib;TKVrml.lib;TKStl.lib;TKBRep.lib;TKIGES.lib;TKShHealing.lib;TKSTEP.lib;TKSTEP209.lib;TKSTEPAttr.lib;TKSTEPBase.lib;TKXSBase.lib;TKBool.lib;TKCAF.lib;TKCDF.lib;TKernel.lib;TKFeat.lib;TKFillet.lib;TKG2d.lib;TKG3d.lib;TKGeomAlgo.lib;TKGeomBase.lib;TKHLR.lib;TKMath.lib;TKOffset.lib;TKPrim.lib;TKService.lib;TKTopAlgo.lib;TKV3d.lib;TKOpenGl.lib;mfcsample.lib;TKBO.lib;%(AdditionalDependencies) + TKVCAF.lib;TKDEVRML.lib;TKDESTL.lib;TKBRep.lib;TKDEIGES.lib;TKShHealing.lib;TKDESTEP.lib;TKXSBase.lib;TKBool.lib;TKCAF.lib;TKCDF.lib;TKernel.lib;TKFeat.lib;TKFillet.lib;TKG2d.lib;TKG3d.lib;TKGeomAlgo.lib;TKGeomBase.lib;TKHLR.lib;TKMath.lib;TKOffset.lib;TKPrim.lib;TKService.lib;TKTopAlgo.lib;TKV3d.lib;TKOpenGl.lib;mfcsample.lib;TKBO.lib;%(AdditionalDependencies) ../../../../win32\$(VCFMT)\bin/Modeling.exe true ..\..\..\..\win32\$(VCFMT)\lib;$(CSF_OCCTLibPath);%(AdditionalLibraryDirectories) @@ -242,7 +242,7 @@ 0x0409 - TKVCAF.lib;TKVrml.lib;TKStl.lib;TKBRep.lib;TKIGES.lib;TKShHealing.lib;TKSTEP.lib;TKSTEP209.lib;TKSTEPAttr.lib;TKSTEPBase.lib;TKXSBase.lib;TKBool.lib;TKCAF.lib;TKCDF.lib;TKernel.lib;TKFeat.lib;TKFillet.lib;TKG2d.lib;TKG3d.lib;TKGeomAlgo.lib;TKGeomBase.lib;TKHLR.lib;TKMath.lib;TKOffset.lib;TKPrim.lib;TKService.lib;TKTopAlgo.lib;TKV3d.lib;TKOpenGl.lib;mfcsample.lib;TKBO.lib;%(AdditionalDependencies) + TKVCAF.lib;TKDEVRML.lib;TKDESTL.lib;TKBRep.lib;TKDEIGES.lib;TKShHealing.lib;TKDESTEP.lib;TKXSBase.lib;TKBool.lib;TKCAF.lib;TKCDF.lib;TKernel.lib;TKFeat.lib;TKFillet.lib;TKG2d.lib;TKG3d.lib;TKGeomAlgo.lib;TKGeomBase.lib;TKHLR.lib;TKMath.lib;TKOffset.lib;TKPrim.lib;TKService.lib;TKTopAlgo.lib;TKV3d.lib;TKOpenGl.lib;mfcsample.lib;TKBO.lib;%(AdditionalDependencies) ../../../../win64\$(VCFMT)\bin/Modeling.exe true ..\..\..\..\win64\$(VCFMT)\lib;$(CSF_OCCTLibPath);%(AdditionalLibraryDirectories) diff --git a/samples/mfc/standard/03_ImportExport/adm/win/vc10/ImportExport.vcxproj b/samples/mfc/standard/03_ImportExport/adm/win/vc10/ImportExport.vcxproj index 44d11fe0a9..66f3d764af 100644 --- a/samples/mfc/standard/03_ImportExport/adm/win/vc10/ImportExport.vcxproj +++ b/samples/mfc/standard/03_ImportExport/adm/win/vc10/ImportExport.vcxproj @@ -116,7 +116,7 @@ 0x0409 - TKVCAF.lib;TKVrml.lib;TKStl.lib;TKBrep.lib;TKIGES.lib;TKShHealing.lib;TKStep.lib;TKXSBase.lib;TKBool.lib;TKCAF.lib;TKCDF.lib;TKernel.lib;TKFeat.lib;TKFillet.lib;TKG2d.lib;TKG3d.lib;TKGeomAlgo.lib;TKGeomBase.lib;TKHLR.lib;TKMath.lib;TKOffset.lib;TKPrim.lib;TKService.lib;TKTopAlgo.lib;TKV3d.lib;TKOpenGl.lib;TKLCAF.lib;mfcsample.lib;%(AdditionalDependencies) + TKVCAF.lib;TKDEVRML.lib;TKDESTL.lib;TKBrep.lib;TKDEIGES.lib;TKShHealing.lib;TKDESTEP.lib;TKXSBase.lib;TKBool.lib;TKCAF.lib;TKCDF.lib;TKernel.lib;TKFeat.lib;TKFillet.lib;TKG2d.lib;TKG3d.lib;TKGeomAlgo.lib;TKGeomBase.lib;TKHLR.lib;TKMath.lib;TKOffset.lib;TKPrim.lib;TKService.lib;TKTopAlgo.lib;TKV3d.lib;TKOpenGl.lib;TKLCAF.lib;mfcsample.lib;%(AdditionalDependencies) ../../../../win32\$(VCFMT)\bin/ImportExport.exe true ..\..\..\..\win32\$(VCFMT)\lib;$(CSF_OCCTLibPath);%(AdditionalLibraryDirectories) @@ -158,7 +158,7 @@ 0x0409 - TKVCAF.lib;TKVrml.lib;TKStl.lib;TKBrep.lib;TKIGES.lib;TKShHealing.lib;TKStep.lib;TKXSBase.lib;TKBool.lib;TKCAF.lib;TKCDF.lib;TKernel.lib;TKFeat.lib;TKFillet.lib;TKG2d.lib;TKG3d.lib;TKGeomAlgo.lib;TKGeomBase.lib;TKHLR.lib;TKMath.lib;TKOffset.lib;TKPrim.lib;TKService.lib;TKTopAlgo.lib;TKV3d.lib;TKOpenGl.lib;TKLCAF.lib;mfcsample.lib;%(AdditionalDependencies) + TKVCAF.lib;TKDEVRML.lib;TKDESTL.lib;TKBrep.lib;TKDEIGES.lib;TKShHealing.lib;TKDESTEP.lib;TKXSBase.lib;TKBool.lib;TKCAF.lib;TKCDF.lib;TKernel.lib;TKFeat.lib;TKFillet.lib;TKG2d.lib;TKG3d.lib;TKGeomAlgo.lib;TKGeomBase.lib;TKHLR.lib;TKMath.lib;TKOffset.lib;TKPrim.lib;TKService.lib;TKTopAlgo.lib;TKV3d.lib;TKOpenGl.lib;TKLCAF.lib;mfcsample.lib;%(AdditionalDependencies) ../../../../win64\$(VCFMT)\bin/ImportExport.exe true ..\..\..\..\win64\$(VCFMT)\lib;$(CSF_OCCTLibPath);%(AdditionalLibraryDirectories) @@ -199,7 +199,7 @@ 0x0409 - TKVCAF.lib;TKVrml.lib;TKStl.lib;TKBrep.lib;TKIGES.lib;TKShHealing.lib;TKStep.lib;TKXSBase.lib;TKBool.lib;TKCAF.lib;TKCDF.lib;TKernel.lib;TKFeat.lib;TKFillet.lib;TKG2d.lib;TKG3d.lib;TKGeomAlgo.lib;TKGeomBase.lib;TKHLR.lib;TKMath.lib;TKOffset.lib;TKPrim.lib;TKService.lib;TKTopAlgo.lib;TKV3d.lib;TKOpenGl.lib;TKLCAF.lib;mfcsample.lib;%(AdditionalDependencies) + TKVCAF.lib;TKDEVRML.lib;TKDESTL.lib;TKBrep.lib;TKDEIGES.lib;TKShHealing.lib;TKDESTEP.lib;TKXSBase.lib;TKBool.lib;TKCAF.lib;TKCDF.lib;TKernel.lib;TKFeat.lib;TKFillet.lib;TKG2d.lib;TKG3d.lib;TKGeomAlgo.lib;TKGeomBase.lib;TKHLR.lib;TKMath.lib;TKOffset.lib;TKPrim.lib;TKService.lib;TKTopAlgo.lib;TKV3d.lib;TKOpenGl.lib;TKLCAF.lib;mfcsample.lib;%(AdditionalDependencies) ../../../../win32\$(VCFMT)\bind/ImportExport.exe true ..\..\..\..\win32\$(VCFMT)\libd;$(CSF_OCCTLibPath);%(AdditionalLibraryDirectories) @@ -241,7 +241,7 @@ 0x0409 - TKVCAF.lib;TKVrml.lib;TKStl.lib;TKBrep.lib;TKIGES.lib;TKShHealing.lib;TKStep.lib;TKXSBase.lib;TKBool.lib;TKCAF.lib;TKCDF.lib;TKernel.lib;TKFeat.lib;TKFillet.lib;TKG2d.lib;TKG3d.lib;TKGeomAlgo.lib;TKGeomBase.lib;TKHLR.lib;TKMath.lib;TKOffset.lib;TKPrim.lib;TKService.lib;TKTopAlgo.lib;TKV3d.lib;TKOpenGl.lib;TKLCAF.lib;mfcsample.lib;%(AdditionalDependencies) + TKVCAF.lib;TKDEVRML.lib;TKDESTL.lib;TKBrep.lib;TKDEIGES.lib;TKShHealing.lib;TKDESTEP.lib;TKXSBase.lib;TKBool.lib;TKCAF.lib;TKCDF.lib;TKernel.lib;TKFeat.lib;TKFillet.lib;TKG2d.lib;TKG3d.lib;TKGeomAlgo.lib;TKGeomBase.lib;TKHLR.lib;TKMath.lib;TKOffset.lib;TKPrim.lib;TKService.lib;TKTopAlgo.lib;TKV3d.lib;TKOpenGl.lib;TKLCAF.lib;mfcsample.lib;%(AdditionalDependencies) ../../../../win64\$(VCFMT)\bind/ImportExport.exe true ..\..\..\..\win64\$(VCFMT)\libd;$(CSF_OCCTLibPath);%(AdditionalLibraryDirectories) diff --git a/samples/mfc/standard/mfcsample/CMakeLists.txt b/samples/mfc/standard/mfcsample/CMakeLists.txt index 55c6e49159..c49edb6788 100644 --- a/samples/mfc/standard/mfcsample/CMakeLists.txt +++ b/samples/mfc/standard/mfcsample/CMakeLists.txt @@ -158,15 +158,12 @@ include_directories( ${CMAKE_BINARY_DIR}/inc ${COMMON_RESOURCE2D_DIR}) # OCCT libraries for using -set (mfcsample_USED_LIBS TKVRML - TKSTL +set (mfcsample_USED_LIBS TKDEVRML + TKDESTL TKBRep - TKIGES + TKDEIGES TKShHealing - TKSTEP - TKSTEPBase - TKSTEP209 - TKSTEPAttr + TKDESTEP TKXSBase TKBool TKBO diff --git a/samples/mfc/standard/mfcsample/adm/win/vc10/mfcsample.vcxproj b/samples/mfc/standard/mfcsample/adm/win/vc10/mfcsample.vcxproj index 4394b3b834..9b75aed3fd 100644 --- a/samples/mfc/standard/mfcsample/adm/win/vc10/mfcsample.vcxproj +++ b/samples/mfc/standard/mfcsample/adm/win/vc10/mfcsample.vcxproj @@ -115,7 +115,7 @@ 0x0409 - TKVCAF.lib;TKVrml.lib;TKStl.lib;TKBrep.lib;TKIGES.lib;TKShHealing.lib;TKStep.lib;TKXSBase.lib;TKBool.lib;TKCAF.lib;TKCDF.lib;TKernel.lib;TKFeat.lib;TKFillet.lib;TKG2d.lib;TKG3d.lib;TKGeomAlgo.lib;TKGeomBase.lib;TKHLR.lib;TKMath.lib;TKOffset.lib;TKPrim.lib;TKService.lib;TKTopAlgo.lib;TKMesh.lib;TKV3d.lib;TKOpenGl.lib;TKLCAF.lib;%(AdditionalDependencies) + TKVCAF.lib;TKDEVRML.lib;TKDESTL.lib;TKBrep.lib;TKDEIGES.lib;TKShHealing.lib;TKDESTEP.lib;TKXSBase.lib;TKBool.lib;TKCAF.lib;TKCDF.lib;TKernel.lib;TKFeat.lib;TKFillet.lib;TKG2d.lib;TKG3d.lib;TKGeomAlgo.lib;TKGeomBase.lib;TKHLR.lib;TKMath.lib;TKOffset.lib;TKPrim.lib;TKService.lib;TKTopAlgo.lib;TKMesh.lib;TKV3d.lib;TKOpenGl.lib;TKLCAF.lib;%(AdditionalDependencies) ../../../../win32\$(VCFMT)\bind/mfcsample.dll true $(CSF_OCCTLibPath);%(AdditionalLibraryDirectories) @@ -158,7 +158,7 @@ 0x0409 - TKVCAF.lib;TKVrml.lib;TKStl.lib;TKBrep.lib;TKIGES.lib;TKShHealing.lib;TKStep.lib;TKXSBase.lib;TKBool.lib;TKCAF.lib;TKCDF.lib;TKernel.lib;TKFeat.lib;TKFillet.lib;TKG2d.lib;TKG3d.lib;TKGeomAlgo.lib;TKGeomBase.lib;TKHLR.lib;TKMath.lib;TKOffset.lib;TKPrim.lib;TKService.lib;TKTopAlgo.lib;TKMesh.lib;TKV3d.lib;TKOpenGl.lib;TKLCAF.lib;%(AdditionalDependencies) + TKVCAF.lib;TKDEVRML.lib;TKDESTL.lib;TKBrep.lib;TKDEIGES.lib;TKShHealing.lib;TKDESTEP.lib;TKXSBase.lib;TKBool.lib;TKCAF.lib;TKCDF.lib;TKernel.lib;TKFeat.lib;TKFillet.lib;TKG2d.lib;TKG3d.lib;TKGeomAlgo.lib;TKGeomBase.lib;TKHLR.lib;TKMath.lib;TKOffset.lib;TKPrim.lib;TKService.lib;TKTopAlgo.lib;TKMesh.lib;TKV3d.lib;TKOpenGl.lib;TKLCAF.lib;%(AdditionalDependencies) ../../../../win64\$(VCFMT)\bind/mfcsample.dll true $(CSF_OCCTLibPath);%(AdditionalLibraryDirectories) @@ -202,7 +202,7 @@ 0x0409 - TKVCAF.lib;TKVrml.lib;TKStl.lib;TKBrep.lib;TKIGES.lib;TKShHealing.lib;TKStep.lib;TKXSBase.lib;TKBool.lib;TKCAF.lib;TKCDF.lib;TKernel.lib;TKFeat.lib;TKFillet.lib;TKG2d.lib;TKG3d.lib;TKGeomAlgo.lib;TKGeomBase.lib;TKHLR.lib;TKMath.lib;TKOffset.lib;TKPrim.lib;TKService.lib;TKTopAlgo.lib;TKMesh.lib;TKV3d.lib;TKOpenGl.lib;TKLCAF.lib;%(AdditionalDependencies) + TKVCAF.lib;TKDEVRML.lib;TKDESTL.lib;TKBrep.lib;TKDEIGES.lib;TKShHealing.lib;TKDESTEP.lib;TKXSBase.lib;TKBool.lib;TKCAF.lib;TKCDF.lib;TKernel.lib;TKFeat.lib;TKFillet.lib;TKG2d.lib;TKG3d.lib;TKGeomAlgo.lib;TKGeomBase.lib;TKHLR.lib;TKMath.lib;TKOffset.lib;TKPrim.lib;TKService.lib;TKTopAlgo.lib;TKMesh.lib;TKV3d.lib;TKOpenGl.lib;TKLCAF.lib;%(AdditionalDependencies) ../../../../win32\$(VCFMT)\bin/mfcsample.dll true $(CSF_OCCTLibPath);%(AdditionalLibraryDirectories) @@ -246,7 +246,7 @@ $(IntDir)%(Filename).res - TKVCAF.lib;TKVrml.lib;TKStl.lib;TKBrep.lib;TKIGES.lib;TKShHealing.lib;TKStep.lib;TKXSBase.lib;TKBool.lib;TKCAF.lib;TKCDF.lib;TKernel.lib;TKFeat.lib;TKFillet.lib;TKG2d.lib;TKG3d.lib;TKGeomAlgo.lib;TKGeomBase.lib;TKHLR.lib;TKMath.lib;TKOffset.lib;TKPrim.lib;TKService.lib;TKTopAlgo.lib;TKMesh.lib;TKV3d.lib;TKOpenGl.lib;TKLCAF.lib;%(AdditionalDependencies) + TKVCAF.lib;TKDEVRML.lib;TKDESTL.lib;TKBrep.lib;TKDEIGES.lib;TKShHealing.lib;TKDESTEP.lib;TKXSBase.lib;TKBool.lib;TKCAF.lib;TKCDF.lib;TKernel.lib;TKFeat.lib;TKFillet.lib;TKG2d.lib;TKG3d.lib;TKGeomAlgo.lib;TKGeomBase.lib;TKHLR.lib;TKMath.lib;TKOffset.lib;TKPrim.lib;TKService.lib;TKTopAlgo.lib;TKMesh.lib;TKV3d.lib;TKOpenGl.lib;TKLCAF.lib;%(AdditionalDependencies) ../../../../win64\$(VCFMT)\bin/mfcsample.dll true $(CSF_OCCTLibPath);%(AdditionalLibraryDirectories) diff --git a/samples/qt/IESample/EXTERNLIB b/samples/qt/IESample/EXTERNLIB index 71631a4b6f..77612e08d9 100644 --- a/samples/qt/IESample/EXTERNLIB +++ b/samples/qt/IESample/EXTERNLIB @@ -8,7 +8,7 @@ TKG3d TKGeomAlgo TKGeomBase TKHLR -TKIGES +TKDEIGES TKernel TKMath TKMesh @@ -17,13 +17,10 @@ TKOpenGl TKPrim TKShHealing TKService -TKSTEP -TKSTEP209 -TKSTEPAttr -TKSTEPBase -TKSTL +TKDESTEP +TKDESTL TKTopAlgo TKV3d -TKVRML +TKDEVRML TKXSBase diff --git a/samples/qt/IESample/IESample.pro b/samples/qt/IESample/IESample.pro index 12f51c7069..1a0396d112 100755 --- a/samples/qt/IESample/IESample.pro +++ b/samples/qt/IESample/IESample.pro @@ -72,8 +72,8 @@ win32 { } LIBS += -lTKernel -lTKMath -lTKService -lTKV3d -lTKOpenGl \ - -lTKBRep -lTKIGES -lTKSTL -lTKVRML -lTKSTEP -lTKSTEPAttr -lTKSTEP209 \ - -lTKSTEPBase -lTKGeomBase -lTKGeomAlgo -lTKG3d -lTKG2d \ + -lTKBRep -lTKDEIGES -lTKDESTL -lTKDEVRML -lTKDESTEP \ + -lTKGeomBase -lTKGeomAlgo -lTKG3d -lTKG2d \ -lTKXSBase -lTKShHealing -lTKHLR -lTKTopAlgo -lTKMesh -lTKPrim \ -lTKCDF -lTKBool -lTKBO -lTKFillet -lTKOffset -lTKLCAF \ diff --git a/samples/qt/OCCTOverview/EXTERNLIB b/samples/qt/OCCTOverview/EXTERNLIB index 81f55c1328..8c5944480a 100644 --- a/samples/qt/OCCTOverview/EXTERNLIB +++ b/samples/qt/OCCTOverview/EXTERNLIB @@ -10,7 +10,7 @@ TKGeomAlgo TKGeomBase TKernel TKHLR -TKIGES +TKDEIGES TKMath TKMesh TKOffset @@ -18,14 +18,11 @@ TKOpenGl TKPrim TKService TKShHealing -TKSTEP -TKSTEP209 -TKSTEPAttr -TKSTEPBase -TKSTL +TKDESTEP +TKDESTL TKTopAlgo TKV3d -TKVRML +TKDEVRML TKXSBase TKLCAF TKCAF diff --git a/samples/qt/OCCTOverview/OCCTOverview.pro b/samples/qt/OCCTOverview/OCCTOverview.pro index eb420457da..79bf0ee3ed 100644 --- a/samples/qt/OCCTOverview/OCCTOverview.pro +++ b/samples/qt/OCCTOverview/OCCTOverview.pro @@ -75,8 +75,8 @@ win32 { } LIBS += -lTKernel -lTKMath -lTKService -lTKV3d -lTKOpenGl \ - -lTKBRep -lTKIGES -lTKSTL -lTKVRML -lTKSTEP -lTKSTEPAttr -lTKSTEP209 \ - -lTKSTEPBase -lTKGeomBase -lTKGeomAlgo -lTKG3d -lTKG2d \ + -lTKBRep -lTKDEIGES -lTKDESTL -lTKDEVRML -lTKDESTEP \ + -lTKGeomBase -lTKGeomAlgo -lTKG3d -lTKG2d \ -lTKXSBase -lTKShHealing -lTKHLR -lTKTopAlgo -lTKMesh -lTKPrim \ -lTKCDF -lTKBool -lTKBO -lTKFillet -lTKOffset -lTKLCAF -lTKCAF -lTKVCAF \ -lTKBin -lTKXml diff --git a/samples/qt/Tutorial/EXTERNLIB b/samples/qt/Tutorial/EXTERNLIB index 8beff5afee..ec996652e0 100644 --- a/samples/qt/Tutorial/EXTERNLIB +++ b/samples/qt/Tutorial/EXTERNLIB @@ -9,7 +9,7 @@ TKGeomAlgo TKGeomBase TKernel TKHLR -TKIGES +TKDEIGES TKMath TKMesh TKOffset @@ -17,13 +17,10 @@ TKOpenGl TKPrim TKService TKShHealing -TKSTEP -TKSTEP209 -TKSTEPAttr -TKSTEPBase -TKSTL +TKDESTEP +TKDESTL TKTopAlgo TKV3d -TKVRML +TKDEVRML TKXSBase diff --git a/samples/qt/Tutorial/Tutorial.pro b/samples/qt/Tutorial/Tutorial.pro index 3772f53100..336a9b352e 100755 --- a/samples/qt/Tutorial/Tutorial.pro +++ b/samples/qt/Tutorial/Tutorial.pro @@ -73,8 +73,8 @@ win32 { } LIBS += -lTKernel -lTKMath -lTKService -lTKV3d -lTKOpenGl \ - -lTKBRep -lTKIGES -lTKSTL -lTKVRML -lTKSTEP -lTKSTEPAttr -lTKSTEP209 \ - -lTKSTEPBase -lTKGeomBase -lTKGeomAlgo -lTKG3d -lTKG2d \ + -lTKBRep -lTKDEIGES -lTKDESTL -lTKDEVRML -lTKDESTEP \ + -lTKGeomBase -lTKGeomAlgo -lTKG3d -lTKG2d \ -lTKXSBase -lTKShHealing -lTKHLR -lTKTopAlgo -lTKMesh -lTKPrim \ -lTKCDF -lTKBool -lTKBO -lTKFillet -lTKOffset -lTKLCAF \ diff --git a/samples/webgl/CMakeLists.txt b/samples/webgl/CMakeLists.txt index 4991d154e4..c40372570d 100644 --- a/samples/webgl/CMakeLists.txt +++ b/samples/webgl/CMakeLists.txt @@ -59,7 +59,7 @@ else() set(OCCT_BIN_DIR) endif() -set(OpenCASCADE_LIBS TKRWMesh TKBinXCAF TKBin TKBinL TKOpenGles TKXCAF TKVCAF TKCAF TKV3d TKHLR TKMesh TKService TKShHealing TKPrim TKTopAlgo TKGeomAlgo TKBRep TKGeomBase TKG3d TKG2d TKMath TKLCAF TKCDF TKernel) +set(OpenCASCADE_LIBS TKRWMesh TKDEGLTF TKDEOBJ TKDEPLY TKBinXCAF TKBin TKBinL TKOpenGles TKXCAF TKVCAF TKCAF TKV3d TKHLR TKMesh TKService TKShHealing TKPrim TKTopAlgo TKGeomAlgo TKBRep TKGeomBase TKG3d TKG2d TKMath TKLCAF TKCDF TKernel) add_executable(${APP_TARGET} ${SOURCES}) target_link_libraries( diff --git a/samples/xaml/CMakeLists.txt b/samples/xaml/CMakeLists.txt index 4bc143bea0..8265aea978 100644 --- a/samples/xaml/CMakeLists.txt +++ b/samples/xaml/CMakeLists.txt @@ -102,11 +102,11 @@ set (uwp_USED_LIBS TKernel TKHLR TKOffset TKXMesh - TKIGES - TKSTEP + TKDEIGES + TKDESTEP TKXSBase - TKSTL - TKVRML + TKDESTL + TKDEVRML ) target_link_libraries (uwp ${uwp_USED_LIBS}) diff --git a/src/DE/DE_PluginHolder.hxx b/src/DE/DE_PluginHolder.hxx new file mode 100644 index 0000000000..57ed9f2302 --- /dev/null +++ b/src/DE/DE_PluginHolder.hxx @@ -0,0 +1,45 @@ +// Copyright (c) 2023 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 _DE_PluginHolder_HeaderFile +#define _DE_PluginHolder_HeaderFile + +#include + +//! Base class to work with DE_Wrapper global registration of components. +//! Control life-time of current configuration node. +//! In creating stage load into global configuration. +//! On destroying stage unload from global configuration. +//! Operation to load/unload are thread safety. +template +class DE_PluginHolder +{ +public: + DE_PluginHolder() + { + Standard_Mutex::Sentry aLock(DE_Wrapper::GlobalLoadMutex()); + myInternalConfiguration = new TheConfType; + DE_Wrapper::GlobalWrapper()->Bind(myInternalConfiguration); + } + + ~DE_PluginHolder() + { + Standard_Mutex::Sentry aLock(DE_Wrapper::GlobalLoadMutex()); + DE_Wrapper::GlobalWrapper()->UnBind(myInternalConfiguration); + } + +private: + Handle(TheConfType) myInternalConfiguration; //!< Wrapped object +}; + +#endif // _DE_PluginHolder_HeaderFile diff --git a/src/DE/DE_Wrapper.cxx b/src/DE/DE_Wrapper.cxx index bd9c6c7cac..7a9531d490 100644 --- a/src/DE/DE_Wrapper.cxx +++ b/src/DE/DE_Wrapper.cxx @@ -35,8 +35,11 @@ namespace return aScope; } - //! Global configuration of current DE Session - static Handle(DE_Wrapper) THE_GLOBAL_CONFIGURATION; + static Handle(DE_Wrapper)& THE_GLOBAL_CONFIGURATION() + { + static Handle(DE_Wrapper) aConf = new DE_Wrapper(); + return aConf; + } } //======================================================================= @@ -75,13 +78,9 @@ DE_Wrapper::DE_Wrapper(const Handle(DE_Wrapper)& theWrapper) // function : GlobalWrapper // purpose : //======================================================================= -Handle(DE_Wrapper) DE_Wrapper::GlobalWrapper() +const Handle(DE_Wrapper)& DE_Wrapper::GlobalWrapper() { - if (THE_GLOBAL_CONFIGURATION.IsNull()) - { - THE_GLOBAL_CONFIGURATION = new DE_Wrapper(); - } - return THE_GLOBAL_CONFIGURATION; + return THE_GLOBAL_CONFIGURATION(); } //======================================================================= @@ -92,10 +91,20 @@ void DE_Wrapper::SetGlobalWrapper(const Handle(DE_Wrapper)& theWrapper) { if (!theWrapper.IsNull()) { - THE_GLOBAL_CONFIGURATION = theWrapper; + THE_GLOBAL_CONFIGURATION() = theWrapper; } } +//======================================================================= +// function : GlobalLoadMutex +// purpose : +//======================================================================= +Standard_Mutex& DE_Wrapper::GlobalLoadMutex() +{ + static Standard_Mutex THE_GLOBAL_LOAD_MUTEX; + return THE_GLOBAL_LOAD_MUTEX; +} + //======================================================================= // function : Read // purpose : @@ -412,6 +421,28 @@ Standard_Boolean DE_Wrapper::Bind(const Handle(DE_ConfigurationNode)& theNode) return aVendorMap->Add(aVendorName, theNode) > 0; } +//======================================================================= +// function : UnBind +// purpose : +//======================================================================= +Standard_Boolean DE_Wrapper::UnBind(const Handle(DE_ConfigurationNode)& theNode) +{ + if (theNode.IsNull()) + { + return false; + } + const TCollection_AsciiString aFileFormat = theNode->GetFormat(); + const TCollection_AsciiString aVendorName = theNode->GetVendor(); + DE_ConfigurationVendorMap* aVendorMap = myConfiguration.ChangeSeek(aFileFormat); + if (aVendorMap == NULL) + { + return false; + } + const auto aPrevSize = aVendorMap->Size(); + aVendorMap->RemoveKey(aVendorName); + return aVendorMap->Size() != aPrevSize; +} + //======================================================================= // function : Find // purpose : diff --git a/src/DE/DE_Wrapper.hxx b/src/DE/DE_Wrapper.hxx index 02af4150d8..e88a1a79a7 100644 --- a/src/DE/DE_Wrapper.hxx +++ b/src/DE/DE_Wrapper.hxx @@ -14,10 +14,11 @@ #ifndef _DE_Wrapper_HeaderFile #define _DE_Wrapper_HeaderFile -#include #include -#include +#include #include +#include +#include #include class TopoDS_Shape; @@ -64,12 +65,14 @@ public: //! Gets global configuration singleton. //! If wrapper is not set, create it by default as base class object. //! @return point to global configuration - Standard_EXPORT static Handle(DE_Wrapper) GlobalWrapper(); + Standard_EXPORT static const Handle(DE_Wrapper)& GlobalWrapper(); //! Sets global configuration singleton //! @param[in] theWrapper object to set as global configuration Standard_EXPORT static void SetGlobalWrapper(const Handle(DE_Wrapper)& theWrapper); + Standard_EXPORT static Standard_Mutex& GlobalLoadMutex(); + public: //! Reads a CAD file, according internal configuration @@ -193,6 +196,11 @@ public: //! @return Standard_True if binded Standard_EXPORT Standard_Boolean Bind(const Handle(DE_ConfigurationNode)& theNode); + //! Removes node with the same type from the map + //! @param[in] theNode input node to remove the same + //! @return Standard_True if removed + Standard_EXPORT Standard_Boolean UnBind(const Handle(DE_ConfigurationNode)& theNode); + //! Finds a node associated with input format and vendor //! @param[in] theFormat input node CAD format //! @param[in] theVendor input node vendor name diff --git a/src/DE/FILES b/src/DE/FILES index 89267b6533..8c79177e58 100644 --- a/src/DE/FILES +++ b/src/DE/FILES @@ -2,6 +2,7 @@ DE_ConfigurationContext.cxx DE_ConfigurationContext.hxx DE_ConfigurationNode.cxx DE_ConfigurationNode.hxx +DE_PluginHolder.hxx DE_Provider.cxx DE_Provider.hxx DE_Wrapper.cxx diff --git a/src/DEBRepCascade/DEBRepCascade_ConfigurationNode.cxx b/src/DEBRepCascade/DEBRepCascade_ConfigurationNode.cxx index ac23714a9e..69f44dcd82 100644 --- a/src/DEBRepCascade/DEBRepCascade_ConfigurationNode.cxx +++ b/src/DEBRepCascade/DEBRepCascade_ConfigurationNode.cxx @@ -14,6 +14,7 @@ #include #include +#include #include #include @@ -26,6 +27,9 @@ namespace static const TCollection_AsciiString aScope = "provider"; return aScope; } + + // Wrapper to auto-load DE component + DE_PluginHolder THE_OCCT_BREP_COMPONENT_PLUGIN; } //======================================================================= diff --git a/src/DEXCAFCascade/DEXCAFCascade_ConfigurationNode.cxx b/src/DEXCAFCascade/DEXCAFCascade_ConfigurationNode.cxx index ce56b1151a..d0e5e2669d 100644 --- a/src/DEXCAFCascade/DEXCAFCascade_ConfigurationNode.cxx +++ b/src/DEXCAFCascade/DEXCAFCascade_ConfigurationNode.cxx @@ -14,6 +14,7 @@ #include #include +#include #include #include @@ -26,6 +27,9 @@ namespace static const TCollection_AsciiString aScope = "provider"; return aScope; } + + // Wrapper to auto-load DE component + DE_PluginHolder THE_OCCT_XCAF_COMPONENT_PLUGIN; } //======================================================================= diff --git a/src/DRAWEXE/DRAWEXE.cxx b/src/DRAWEXE/DRAWEXE.cxx index 12c5dec943..9f3db744c2 100644 --- a/src/DRAWEXE/DRAWEXE.cxx +++ b/src/DRAWEXE/DRAWEXE.cxx @@ -32,8 +32,15 @@ #endif #include #include - #include + #include #include + #include + #include + #include + #include + #include + #include + #include #endif Standard_IMPORT Standard_Boolean Draw_Interprete (const char* theCommand); @@ -200,6 +207,13 @@ static Standard_Integer Pload (Draw_Interpretor& theDI, else if (anArg == "DATAEXCHANGE") { aPlugins.Add ("XSDRAW"); + aPlugins.Add ("XSDRAWSTEP"); + aPlugins.Add ("XSDRAWIGES"); + aPlugins.Add ("XSDRAWGLTF"); + aPlugins.Add ("XSDRAWOBJ"); + aPlugins.Add ("XSDRAWPLY"); + aPlugins.Add ("XSDRAWVRML"); + aPlugins.Add ("XSDRAWSTL"); aPlugins.Add ("XDEDRAW"); aPlugins.Add ("AISV"); } @@ -215,6 +229,13 @@ static Standard_Integer Pload (Draw_Interpretor& theDI, aPlugins.Add ("XSDRAW"); aPlugins.Add ("XDEDRAW"); aPlugins.Add ("AISV"); + aPlugins.Add ("XSDRAWSTEP"); + aPlugins.Add ("XSDRAWIGES"); + aPlugins.Add ("XSDRAWGLTF"); + aPlugins.Add ("XSDRAWOBJ"); + aPlugins.Add ("XSDRAWPLY"); + aPlugins.Add ("XSDRAWVRML"); + aPlugins.Add ("XSDRAWSTL"); } else { @@ -254,14 +275,40 @@ static Standard_Integer Pload (Draw_Interpretor& theDI, #endif else if (aPlugin == "XSDRAW") { - XSDRAWSTLVRML::Factory (theDI); + XSDRAW::Factory (theDI); } else if (aPlugin == "XDEDRAW") { XDEDRAW::Factory (theDI); } - //else if (aPlugin == "TOBJ") { TObjDRAW::Factory (theDI); } - //else if (aPlugin == "QACOMMANDS") { QADraw::Factory (theDI); } + else if (aPlugin == "STEP") + { + XSDRAWSTEP::Factory (theDI); + } + else if (aPlugin == "IGES") + { + XSDRAWIGES::Factory (theDI); + } + else if (aPlugin == "PLY") + { + XSDRAWPLY::Factory (theDI); + } + else if (aPlugin == "GLTF") + { + XSDRAWGLTF::Factory (theDI); + } + else if (aPlugin == "VRML") + { + XSDRAWVRML::Factory (theDI); + } + else if (aPlugin == "STL") + { + XSDRAWSTL::Factory (theDI); + } + else if (aPlugin == "OBJ") + { + XSDRAWOBJ::Factory (theDI); + } else { theDI << "Error: unknown plugin '" << aPlugin << "'"; diff --git a/src/DRAWEXE/EXTERNLIB_STATIC b/src/DRAWEXE/EXTERNLIB_STATIC index ca4c8fa4ee..19aaa0a638 100644 --- a/src/DRAWEXE/EXTERNLIB_STATIC +++ b/src/DRAWEXE/EXTERNLIB_STATIC @@ -2,27 +2,32 @@ TKTopTest TKDCAF TKXSDRAW TKXDEDRAW +TKXSDRAWSTEP +TKXSDRAWIGES +TKXSDRAWGLTF +TKXSDRAWOBJ +TKXSDRAWPLY +TKXSDRAWVRML +TKXSDRAWSTL TKOpenGlTest TKOpenGlesTest TKViewerTest TKDraw TKMeshVS -TKXDECascade TKTObj TKBinTObj TKXmlTObj -TKXDESTEP -TKSTEP -TKSTEPAttr -TKSTEP209 -TKSTEPBase -TKXDEIGES -TKIGES TKXSBase -TKVRML -TKSTL TKRWMesh -TKXDE +TKDE +TKDESTEP +TKDEIGES +TKDEGLTF +TKDEOBJ +TKDEPLY +TKDEVRML +TKDESTL +TKDECascade TKBinXCAF TKXmlXCAF TKBin diff --git a/src/DrawResources/DrawPlugin b/src/DrawResources/DrawPlugin index b9938be7af..fa7acf1a04 100755 --- a/src/DrawResources/DrawPlugin +++ b/src/DrawResources/DrawPlugin @@ -33,10 +33,10 @@ DEFAULT : MODELING MODELING : TOPTEST VISUALIZATION : AISV OCAFKERNEL : DCAF -DATAEXCHANGEKERNEL : XSDRAW +DATAEXCHANGEKERNEL : XSDRAW, DE OCAF : VISUALIZATION, OCAFKERNEL DATAEXCHANGE : XDE, VISUALIZATION -XDE : DATAEXCHANGEKERNEL, XDEDRAW +XDE : DATAEXCHANGEKERNEL, XDEDRAW, STEP, IGES, GLTF, OBJ, PLY, STL, VRML ALL : MODELING, OCAFKERNEL, DATAEXCHANGE TOPTEST : TKTopTest @@ -54,3 +54,11 @@ DFBROWSER : TKDFBrowser QAcommands : TKQADraw VIS : TKIVtkDraw INSPECTOR : TKToolsDraw +DE : TKXSDRAWDE +STEP : TKXSDRAWSTEP +IGES : TKXSDRAWIGES +GLTF : TKXSDRAWGLTF +OBJ : TKXSDRAWOBJ +PLY : TKXSDRAWPLY +STL : TKXSDRAWSTL +VRML : TKXSDRAWVRML diff --git a/src/IGESCAFControl/IGESCAFControl_ConfigurationNode.cxx b/src/IGESCAFControl/IGESCAFControl_ConfigurationNode.cxx index 68f5312c43..dff11a3de1 100644 --- a/src/IGESCAFControl/IGESCAFControl_ConfigurationNode.cxx +++ b/src/IGESCAFControl/IGESCAFControl_ConfigurationNode.cxx @@ -14,6 +14,7 @@ #include #include +#include #include #include @@ -26,6 +27,9 @@ namespace static const TCollection_AsciiString aScope = "provider"; return aScope; } + + // Wrapper to auto-load DE component + DE_PluginHolder THE_OCCT_IGES_COMPONENT_PLUGIN; } //======================================================================= diff --git a/src/OS/DataExchange.tcl b/src/OS/DataExchange.tcl index 3f3b5badc7..e11aa5496a 100644 --- a/src/OS/DataExchange.tcl +++ b/src/OS/DataExchange.tcl @@ -15,10 +15,10 @@ ;# Liste des toolkits WOK sous forme de full path ;# proc DataExchange:toolkits { } { - return [list TKXSBase TKSTEPBase TKSTEPAttr TKSTEP209 TKSTEP TKIGES \ - TKXCAF TKXDEIGES TKXDESTEP \ - TKXDE TKXDECascade \ - TKSTL TKVRML TKXmlXCAF TKBinXCAF TKRWMesh] + return [list TKXSBase TKXCAF TKDEIGES TKDESTEP \ + TKDE TKDECascade TKDESTL TKDEVRML \ + TKXmlXCAF TKBinXCAF TKRWMesh \ + TKDEGLTF TKDEOBJ TKDEPLY] } ;# diff --git a/src/RWGltf/RWGltf_ConfigurationNode.cxx b/src/RWGltf/RWGltf_ConfigurationNode.cxx index 28ce153cbc..afdd542b77 100644 --- a/src/RWGltf/RWGltf_ConfigurationNode.cxx +++ b/src/RWGltf/RWGltf_ConfigurationNode.cxx @@ -14,6 +14,7 @@ #include #include +#include #include IMPLEMENT_STANDARD_RTTIEXT(RWGltf_ConfigurationNode, DE_ConfigurationNode) @@ -25,6 +26,9 @@ namespace static const TCollection_AsciiString aScope = "provider"; return aScope; } + + // Wrapper to auto-load DE component + DE_PluginHolder THE_OCCT_GLTF_COMPONENT_PLUGIN; } //======================================================================= diff --git a/src/RWObj/RWObj_ConfigurationNode.cxx b/src/RWObj/RWObj_ConfigurationNode.cxx index 94b6b1d4d8..0dd7d8f7e6 100644 --- a/src/RWObj/RWObj_ConfigurationNode.cxx +++ b/src/RWObj/RWObj_ConfigurationNode.cxx @@ -14,6 +14,7 @@ #include #include +#include #include IMPLEMENT_STANDARD_RTTIEXT(RWObj_ConfigurationNode, DE_ConfigurationNode) @@ -25,6 +26,9 @@ namespace static const TCollection_AsciiString aScope = "provider"; return aScope; } + + // Wrapper to auto-load DE component + DE_PluginHolder THE_OCCT_OBJ_COMPONENT_PLUGIN; } //======================================================================= diff --git a/src/RWPly/RWPly_ConfigurationNode.cxx b/src/RWPly/RWPly_ConfigurationNode.cxx index fb978975f6..d9983072a4 100644 --- a/src/RWPly/RWPly_ConfigurationNode.cxx +++ b/src/RWPly/RWPly_ConfigurationNode.cxx @@ -14,12 +14,23 @@ #include #include +#include #include #include IMPLEMENT_STANDARD_RTTIEXT(RWPly_ConfigurationNode, DE_ConfigurationNode) -static const TCollection_AsciiString THE_CONFIGURATION_SCOPE = "provider"; +namespace +{ + static const TCollection_AsciiString& THE_CONFIGURATION_SCOPE() + { + static const TCollection_AsciiString aScope = "provider"; + return aScope; + } + + // Wrapper to auto-load DE component + DE_PluginHolder THE_OCCT_PLY_COMPONENT_PLUGIN; +} //======================================================================= // function : RWPly_ConfigurationNode @@ -45,7 +56,7 @@ RWPly_ConfigurationNode::RWPly_ConfigurationNode(const Handle(RWPly_Configuratio //======================================================================= bool RWPly_ConfigurationNode::Load(const Handle(DE_ConfigurationContext)& theResource) { - TCollection_AsciiString aScope = THE_CONFIGURATION_SCOPE + "." + GetFormat() + "." + GetVendor(); + TCollection_AsciiString aScope = THE_CONFIGURATION_SCOPE() + "." + GetFormat() + "." + GetVendor(); InternalParameters.FileLengthUnit = theResource->RealVal("file.length.unit", InternalParameters.FileLengthUnit, aScope); InternalParameters.SystemCS = @@ -79,7 +90,7 @@ TCollection_AsciiString RWPly_ConfigurationNode::Save() const TCollection_AsciiString aResult; aResult += "!*****************************************************************************\n"; aResult = aResult + "!Configuration Node " + " Vendor: " + GetVendor() + " Format: " + GetFormat() + "\n"; - TCollection_AsciiString aScope = THE_CONFIGURATION_SCOPE + "." + GetFormat() + "." + GetVendor() + "."; + TCollection_AsciiString aScope = THE_CONFIGURATION_SCOPE() + "." + GetFormat() + "." + GetVendor() + "."; aResult += "!\n"; aResult += "!Common parameters:\n"; diff --git a/src/RWStl/RWStl_ConfigurationNode.cxx b/src/RWStl/RWStl_ConfigurationNode.cxx index 990f24c737..09f4173d5e 100644 --- a/src/RWStl/RWStl_ConfigurationNode.cxx +++ b/src/RWStl/RWStl_ConfigurationNode.cxx @@ -14,6 +14,7 @@ #include #include +#include #include #include @@ -26,6 +27,9 @@ namespace static const TCollection_AsciiString aScope = "provider"; return aScope; } + + // Wrapper to auto-load DE component + DE_PluginHolder THE_OCCT_STL_COMPONENT_PLUGIN; } //======================================================================= diff --git a/src/STEPCAFControl/STEPCAFControl_ConfigurationNode.cxx b/src/STEPCAFControl/STEPCAFControl_ConfigurationNode.cxx index 588c18deba..000077cb1e 100644 --- a/src/STEPCAFControl/STEPCAFControl_ConfigurationNode.cxx +++ b/src/STEPCAFControl/STEPCAFControl_ConfigurationNode.cxx @@ -14,6 +14,7 @@ #include #include +#include #include #include @@ -26,6 +27,9 @@ namespace static const TCollection_AsciiString aScope = "provider"; return aScope; } + + // Wrapper to auto-load DE component + DE_PluginHolder THE_OCCT_STEP_COMPONENT_PLUGIN; } //======================================================================= diff --git a/src/TKXDE/CMakeLists.txt b/src/TKDE/CMakeLists.txt similarity index 76% rename from src/TKXDE/CMakeLists.txt rename to src/TKDE/CMakeLists.txt index 40ac508025..d558e9f0b5 100644 --- a/src/TKXDE/CMakeLists.txt +++ b/src/TKDE/CMakeLists.txt @@ -1,3 +1,3 @@ -project(TKXDE) +project(TKDE) OCCT_INCLUDE_CMAKE_FILE (adm/cmake/occt_toolkit) diff --git a/src/TKXDE/EXTERNLIB b/src/TKDE/EXTERNLIB similarity index 100% rename from src/TKXDE/EXTERNLIB rename to src/TKDE/EXTERNLIB diff --git a/src/TKIGES/FILES b/src/TKDE/FILES old mode 100755 new mode 100644 similarity index 100% rename from src/TKIGES/FILES rename to src/TKDE/FILES diff --git a/src/TKXDE/PACKAGES b/src/TKDE/PACKAGES similarity index 100% rename from src/TKXDE/PACKAGES rename to src/TKDE/PACKAGES diff --git a/src/TKSTEPAttr/CMakeLists.txt b/src/TKDECascade/CMakeLists.txt similarity index 70% rename from src/TKSTEPAttr/CMakeLists.txt rename to src/TKDECascade/CMakeLists.txt index 59e2527fd2..2398b1ba9e 100644 --- a/src/TKSTEPAttr/CMakeLists.txt +++ b/src/TKDECascade/CMakeLists.txt @@ -1,3 +1,3 @@ -project(TKSTEPAttr) +project(TKDECascade) OCCT_INCLUDE_CMAKE_FILE (adm/cmake/occt_toolkit) diff --git a/src/TKXDECascade/EXTERNLIB b/src/TKDECascade/EXTERNLIB similarity index 95% rename from src/TKXDECascade/EXTERNLIB rename to src/TKDECascade/EXTERNLIB index f0c0f03911..6abe782fc5 100644 --- a/src/TKXDECascade/EXTERNLIB +++ b/src/TKDECascade/EXTERNLIB @@ -8,7 +8,7 @@ TKXml TKXmlL TKXmlTObj TKXmlXCAF -TKXDE +TKDE TKernel TKMath TKLCAF diff --git a/src/TKSTEP/FILES b/src/TKDECascade/FILES old mode 100755 new mode 100644 similarity index 100% rename from src/TKSTEP/FILES rename to src/TKDECascade/FILES diff --git a/src/TKXDECascade/PACKAGES b/src/TKDECascade/PACKAGES similarity index 100% rename from src/TKXDECascade/PACKAGES rename to src/TKDECascade/PACKAGES diff --git a/src/TKSTEP/CMakeLists.txt b/src/TKDEGLTF/CMakeLists.txt similarity index 73% rename from src/TKSTEP/CMakeLists.txt rename to src/TKDEGLTF/CMakeLists.txt index 2885f9b8e9..8b9c4468b0 100644 --- a/src/TKSTEP/CMakeLists.txt +++ b/src/TKDEGLTF/CMakeLists.txt @@ -1,3 +1,3 @@ -project(TKSTEP) +project(TKDEGLTF) OCCT_INCLUDE_CMAKE_FILE (adm/cmake/occt_toolkit) diff --git a/src/TKDEGLTF/EXTERNLIB b/src/TKDEGLTF/EXTERNLIB new file mode 100644 index 0000000000..0f9a0d8aae --- /dev/null +++ b/src/TKDEGLTF/EXTERNLIB @@ -0,0 +1,13 @@ +TKernel +TKMath +TKMesh +TKXCAF +TKLCAF +TKV3d +TKBRep +TKG3d +TKDE +TKService +TKRWMesh +CSF_RapidJSON +CSF_Draco diff --git a/src/TKSTEP209/FILES b/src/TKDEGLTF/FILES old mode 100755 new mode 100644 similarity index 100% rename from src/TKSTEP209/FILES rename to src/TKDEGLTF/FILES diff --git a/src/TKDEGLTF/PACKAGES b/src/TKDEGLTF/PACKAGES new file mode 100644 index 0000000000..7758e9e783 --- /dev/null +++ b/src/TKDEGLTF/PACKAGES @@ -0,0 +1 @@ +RWGltf diff --git a/src/TKDEIGES/CMakeLists.txt b/src/TKDEIGES/CMakeLists.txt new file mode 100644 index 0000000000..a7e09e50e4 --- /dev/null +++ b/src/TKDEIGES/CMakeLists.txt @@ -0,0 +1,3 @@ +project(TKDEIGES) + +OCCT_INCLUDE_CMAKE_FILE (adm/cmake/occt_toolkit) diff --git a/src/TKIGES/EXTERNLIB b/src/TKDEIGES/EXTERNLIB old mode 100755 new mode 100644 similarity index 80% rename from src/TKIGES/EXTERNLIB rename to src/TKDEIGES/EXTERNLIB index 56ddccab59..1a7b0ccf05 --- a/src/TKIGES/EXTERNLIB +++ b/src/TKDEIGES/EXTERNLIB @@ -1,12 +1,16 @@ TKBRep +TKDE TKernel TKMath TKTopAlgo TKShHealing -TKG2d -TKG3d +TKXSBase TKGeomBase TKGeomAlgo -TKPrim TKBool -TKXSBase +TKPrim +TKCDF +TKLCAF +TKG2d +TKG3d +TKXCAF diff --git a/src/TKSTEPAttr/FILES b/src/TKDEIGES/FILES old mode 100755 new mode 100644 similarity index 100% rename from src/TKSTEPAttr/FILES rename to src/TKDEIGES/FILES diff --git a/src/TKIGES/PACKAGES b/src/TKDEIGES/PACKAGES old mode 100755 new mode 100644 similarity index 92% rename from src/TKIGES/PACKAGES rename to src/TKDEIGES/PACKAGES index b121c19125..d697b0bc3b --- a/src/TKIGES/PACKAGES +++ b/src/TKDEIGES/PACKAGES @@ -1,3 +1,4 @@ +IGESCAFControl IGESData IGESFile IGESBasic diff --git a/src/TKIGES/CMakeLists.txt b/src/TKDEOBJ/CMakeLists.txt similarity index 74% rename from src/TKIGES/CMakeLists.txt rename to src/TKDEOBJ/CMakeLists.txt index 383e62f9f7..d4cf39f7a5 100644 --- a/src/TKIGES/CMakeLists.txt +++ b/src/TKDEOBJ/CMakeLists.txt @@ -1,3 +1,3 @@ -project(TKIGES) +project(TKDEOBJ) OCCT_INCLUDE_CMAKE_FILE (adm/cmake/occt_toolkit) diff --git a/src/TKDEOBJ/EXTERNLIB b/src/TKDEOBJ/EXTERNLIB new file mode 100644 index 0000000000..4145bc8c70 --- /dev/null +++ b/src/TKDEOBJ/EXTERNLIB @@ -0,0 +1,12 @@ +TKernel +TKMath +TKMesh +TKXCAF +TKLCAF +TKV3d +TKBRep +TKG3d +TKDE +TKService +TKRWMesh +CSF_RapidJSON diff --git a/src/TKSTEPBase/FILES b/src/TKDEOBJ/FILES old mode 100755 new mode 100644 similarity index 100% rename from src/TKSTEPBase/FILES rename to src/TKDEOBJ/FILES diff --git a/src/TKDEOBJ/PACKAGES b/src/TKDEOBJ/PACKAGES new file mode 100644 index 0000000000..d7824f29c4 --- /dev/null +++ b/src/TKDEOBJ/PACKAGES @@ -0,0 +1 @@ +RWObj diff --git a/src/TKVRML/CMakeLists.txt b/src/TKDEPLY/CMakeLists.txt similarity index 74% rename from src/TKVRML/CMakeLists.txt rename to src/TKDEPLY/CMakeLists.txt index 959447f182..6065cfaeb2 100644 --- a/src/TKVRML/CMakeLists.txt +++ b/src/TKDEPLY/CMakeLists.txt @@ -1,3 +1,3 @@ -project(TKVRML) +project(TKDEPLY) OCCT_INCLUDE_CMAKE_FILE (adm/cmake/occt_toolkit) diff --git a/src/TKDEPLY/EXTERNLIB b/src/TKDEPLY/EXTERNLIB new file mode 100644 index 0000000000..4145bc8c70 --- /dev/null +++ b/src/TKDEPLY/EXTERNLIB @@ -0,0 +1,12 @@ +TKernel +TKMath +TKMesh +TKXCAF +TKLCAF +TKV3d +TKBRep +TKG3d +TKDE +TKService +TKRWMesh +CSF_RapidJSON diff --git a/src/TKSTL/FILES b/src/TKDEPLY/FILES old mode 100755 new mode 100644 similarity index 100% rename from src/TKSTL/FILES rename to src/TKDEPLY/FILES diff --git a/src/TKDEPLY/PACKAGES b/src/TKDEPLY/PACKAGES new file mode 100644 index 0000000000..228128af6d --- /dev/null +++ b/src/TKDEPLY/PACKAGES @@ -0,0 +1 @@ +RWPly diff --git a/src/TKDESTEP/CMakeLists.txt b/src/TKDESTEP/CMakeLists.txt new file mode 100644 index 0000000000..fe235a7344 --- /dev/null +++ b/src/TKDESTEP/CMakeLists.txt @@ -0,0 +1,3 @@ +project(TKDESTEP) + +OCCT_INCLUDE_CMAKE_FILE (adm/cmake/occt_toolkit) diff --git a/src/TKDESTEP/EXTERNLIB b/src/TKDESTEP/EXTERNLIB new file mode 100644 index 0000000000..9b86ab5bb3 --- /dev/null +++ b/src/TKDESTEP/EXTERNLIB @@ -0,0 +1,23 @@ +TKDE +TKBRep +TKernel +TKMath +TKXSBase +TKTopAlgo +TKG2d +TKCAF +TKCDF +TKLCAF +TKG3d +TKXCAF +TKShHealing +TKernel +TKBRep +TKMath +TKG2d +TKShHealing +TKTopAlgo +TKG3d +TKGeomBase +TKGeomAlgo +TKXSBase diff --git a/src/TKVRML/FILES b/src/TKDESTEP/FILES old mode 100755 new mode 100644 similarity index 100% rename from src/TKVRML/FILES rename to src/TKDESTEP/FILES diff --git a/src/TKDESTEP/PACKAGES b/src/TKDESTEP/PACKAGES new file mode 100644 index 0000000000..58b4ee81ab --- /dev/null +++ b/src/TKDESTEP/PACKAGES @@ -0,0 +1,40 @@ +STEPCAFControl +StepAP214 +RWStepAP214 +StepAP203 +RWStepAP203 +STEPConstruct +STEPEdit +GeomToStep +StepToGeom +StepToTopoDS +TopoDSToStep +STEPControl +STEPSelections +StepAP209 +RWStepAP242 +StepAP242 +StepElement +StepFEA +RWStepElement +RWStepFEA +StepVisual +RWStepVisual +StepDimTol +RWStepDimTol +StepKinematics +RWStepKinematics +StepBasic +RWStepBasic +StepRepr +RWStepRepr +StepGeom +RWStepGeom +StepShape +RWStepShape +StepSelect +StepData +StepFile +RWHeaderSection +APIHeaderSection +HeaderSection \ No newline at end of file diff --git a/src/TKSTL/CMakeLists.txt b/src/TKDESTL/CMakeLists.txt similarity index 74% rename from src/TKSTL/CMakeLists.txt rename to src/TKDESTL/CMakeLists.txt index 2fe1c1706d..e4a6c1514e 100644 --- a/src/TKSTL/CMakeLists.txt +++ b/src/TKDESTL/CMakeLists.txt @@ -1,3 +1,3 @@ -project(TKSTL) +project(TKDESTL) OCCT_INCLUDE_CMAKE_FILE (adm/cmake/occt_toolkit) diff --git a/src/TKSTL/EXTERNLIB b/src/TKDESTL/EXTERNLIB old mode 100755 new mode 100644 similarity index 90% rename from src/TKSTL/EXTERNLIB rename to src/TKDESTL/EXTERNLIB index 8a5b1c21d1..74fdab3de7 --- a/src/TKSTL/EXTERNLIB +++ b/src/TKDESTL/EXTERNLIB @@ -1,4 +1,4 @@ -TKXDE +TKDE TKernel TKMath TKBRep diff --git a/src/TKXDE/FILES b/src/TKDESTL/FILES similarity index 100% rename from src/TKXDE/FILES rename to src/TKDESTL/FILES diff --git a/src/TKSTL/PACKAGES b/src/TKDESTL/PACKAGES old mode 100755 new mode 100644 similarity index 100% rename from src/TKSTL/PACKAGES rename to src/TKDESTL/PACKAGES diff --git a/src/TKDEVRML/CMakeLists.txt b/src/TKDEVRML/CMakeLists.txt new file mode 100644 index 0000000000..82e33cb4a7 --- /dev/null +++ b/src/TKDEVRML/CMakeLists.txt @@ -0,0 +1,3 @@ +project(TKDEVRML) + +OCCT_INCLUDE_CMAKE_FILE (adm/cmake/occt_toolkit) diff --git a/src/TKVRML/EXTERNLIB b/src/TKDEVRML/EXTERNLIB old mode 100755 new mode 100644 similarity index 95% rename from src/TKVRML/EXTERNLIB rename to src/TKDEVRML/EXTERNLIB index a996dc40ca..22fb272243 --- a/src/TKVRML/EXTERNLIB +++ b/src/TKDEVRML/EXTERNLIB @@ -1,5 +1,5 @@ TKBRep -TKXDE +TKDE TKTopAlgo TKMath TKGeomBase diff --git a/src/TKXDECascade/FILES b/src/TKDEVRML/FILES similarity index 100% rename from src/TKXDECascade/FILES rename to src/TKDEVRML/FILES diff --git a/src/TKVRML/PACKAGES b/src/TKDEVRML/PACKAGES old mode 100755 new mode 100644 similarity index 100% rename from src/TKVRML/PACKAGES rename to src/TKDEVRML/PACKAGES diff --git a/src/TKQADraw/EXTERNLIB b/src/TKQADraw/EXTERNLIB index 32d736b68b..0ee59238cb 100755 --- a/src/TKQADraw/EXTERNLIB +++ b/src/TKQADraw/EXTERNLIB @@ -23,16 +23,14 @@ TKOffset TKFeat TKCAF TKVCAF -TKIGES +TKDEIGES TKXSBase TKMesh TKXCAF TKBinXCAF -TKSTEP -TKSTEPBase -TKXDESTEP +TKDESTEP TKXSDRAW -TKSTL +TKDESTL TKXml TKTObj TKXmlL diff --git a/src/TKRWMesh/EXTERNLIB b/src/TKRWMesh/EXTERNLIB index 80c75df27f..25c3c63800 100644 --- a/src/TKRWMesh/EXTERNLIB +++ b/src/TKRWMesh/EXTERNLIB @@ -6,7 +6,7 @@ TKLCAF TKV3d TKBRep TKG3d -TKXDE +TKDE TKService CSF_RapidJSON CSF_Draco diff --git a/src/TKRWMesh/PACKAGES b/src/TKRWMesh/PACKAGES index 3b7d934623..9330e3e37b 100644 --- a/src/TKRWMesh/PACKAGES +++ b/src/TKRWMesh/PACKAGES @@ -1,4 +1 @@ -RWGltf RWMesh -RWObj -RWPly diff --git a/src/TKSTEP/EXTERNLIB b/src/TKSTEP/EXTERNLIB deleted file mode 100755 index 9423bb5afc..0000000000 --- a/src/TKSTEP/EXTERNLIB +++ /dev/null @@ -1,13 +0,0 @@ -TKernel -TKSTEPAttr -TKSTEP209 -TKSTEPBase -TKBRep -TKMath -TKG2d -TKShHealing -TKTopAlgo -TKG3d -TKGeomBase -TKGeomAlgo -TKXSBase diff --git a/src/TKSTEP/PACKAGES b/src/TKSTEP/PACKAGES deleted file mode 100755 index 70879153d1..0000000000 --- a/src/TKSTEP/PACKAGES +++ /dev/null @@ -1,15 +0,0 @@ -StepAP214 -RWStepAP214 -StepAP203 -RWStepAP203 -STEPConstruct -STEPEdit -GeomToStep -StepToGeom -StepToTopoDS -TopoDSToStep -STEPControl -STEPSelections -StepAP209 -RWStepAP242 -StepAP242 diff --git a/src/TKSTEP209/EXTERNLIB b/src/TKSTEP209/EXTERNLIB deleted file mode 100644 index 28cfbb0e10..0000000000 --- a/src/TKSTEP209/EXTERNLIB +++ /dev/null @@ -1,3 +0,0 @@ -TKernel -TKXSBase -TKSTEPBase diff --git a/src/TKSTEP209/PACKAGES b/src/TKSTEP209/PACKAGES deleted file mode 100755 index 0b6845347f..0000000000 --- a/src/TKSTEP209/PACKAGES +++ /dev/null @@ -1,4 +0,0 @@ -StepElement -StepFEA -RWStepElement -RWStepFEA diff --git a/src/TKSTEPAttr/EXTERNLIB b/src/TKSTEPAttr/EXTERNLIB deleted file mode 100644 index 28cfbb0e10..0000000000 --- a/src/TKSTEPAttr/EXTERNLIB +++ /dev/null @@ -1,3 +0,0 @@ -TKernel -TKXSBase -TKSTEPBase diff --git a/src/TKSTEPAttr/PACKAGES b/src/TKSTEPAttr/PACKAGES deleted file mode 100755 index b6bf50c60d..0000000000 --- a/src/TKSTEPAttr/PACKAGES +++ /dev/null @@ -1,6 +0,0 @@ -StepVisual -RWStepVisual -StepDimTol -RWStepDimTol -StepKinematics -RWStepKinematics diff --git a/src/TKSTEPBase/CMakeLists.txt b/src/TKSTEPBase/CMakeLists.txt deleted file mode 100644 index fda0c4623b..0000000000 --- a/src/TKSTEPBase/CMakeLists.txt +++ /dev/null @@ -1,3 +0,0 @@ -project(TKSTEPBase) - -OCCT_INCLUDE_CMAKE_FILE (adm/cmake/occt_toolkit) diff --git a/src/TKSTEPBase/EXTERNLIB b/src/TKSTEPBase/EXTERNLIB deleted file mode 100644 index fb75d58cee..0000000000 --- a/src/TKSTEPBase/EXTERNLIB +++ /dev/null @@ -1,3 +0,0 @@ -TKernel -TKXSBase -TKMath diff --git a/src/TKSTEPBase/PACKAGES b/src/TKSTEPBase/PACKAGES deleted file mode 100755 index 87033cfc73..0000000000 --- a/src/TKSTEPBase/PACKAGES +++ /dev/null @@ -1,8 +0,0 @@ -StepBasic -RWStepBasic -StepRepr -RWStepRepr -StepGeom -RWStepGeom -StepShape -RWStepShape diff --git a/src/TKXDECascade/CMakeLists.txt b/src/TKXDECascade/CMakeLists.txt deleted file mode 100644 index f6bed69dc5..0000000000 --- a/src/TKXDECascade/CMakeLists.txt +++ /dev/null @@ -1,3 +0,0 @@ -project(TKXDECascade) - -OCCT_INCLUDE_CMAKE_FILE (adm/cmake/occt_toolkit) diff --git a/src/TKXDEDRAW/EXTERNLIB b/src/TKXDEDRAW/EXTERNLIB index 8ee679cab2..40fafb07a6 100755 --- a/src/TKXDEDRAW/EXTERNLIB +++ b/src/TKXDEDRAW/EXTERNLIB @@ -1,9 +1,8 @@ -TKXDE +TKDE TKCDF TKBRep TKXCAF TKernel -TKIGES TKV3d TKMath TKService @@ -16,17 +15,18 @@ TKTopAlgo TKLCAF TKG3d TKRWMesh -TKSTEPBase -TKSTEP -TKSTL +TKDEOBJ +TKDEGLTF +TKDEPLY +TKDESTL TKMesh TKXSDRAW -TKXDECascade -TKXDEIGES -TKXDESTEP +TKDECascade +TKDEIGES +TKDESTEP TKDCAF TKViewerTest TKBinXCAF TKXmlXCAF -TKVRML +TKDEVRML diff --git a/src/TKXDEIGES/CMakeLists.txt b/src/TKXDEIGES/CMakeLists.txt deleted file mode 100644 index 1b18c66327..0000000000 --- a/src/TKXDEIGES/CMakeLists.txt +++ /dev/null @@ -1,3 +0,0 @@ -project(TKXDEIGES) - -OCCT_INCLUDE_CMAKE_FILE (adm/cmake/occt_toolkit) diff --git a/src/TKXDEIGES/EXTERNLIB b/src/TKXDEIGES/EXTERNLIB deleted file mode 100755 index d40184c29d..0000000000 --- a/src/TKXDEIGES/EXTERNLIB +++ /dev/null @@ -1,11 +0,0 @@ -TKBRep -TKXDE -TKernel -TKMath -TKXSBase -TKCDF -TKLCAF -TKG2d -TKG3d -TKXCAF -TKIGES diff --git a/src/TKXDEIGES/PACKAGES b/src/TKXDEIGES/PACKAGES deleted file mode 100755 index 1c6cd9565f..0000000000 --- a/src/TKXDEIGES/PACKAGES +++ /dev/null @@ -1 +0,0 @@ -IGESCAFControl diff --git a/src/TKXDESTEP/CMakeLists.txt b/src/TKXDESTEP/CMakeLists.txt deleted file mode 100644 index 29d0ca86d8..0000000000 --- a/src/TKXDESTEP/CMakeLists.txt +++ /dev/null @@ -1,3 +0,0 @@ -project(TKXDESTEP) - -OCCT_INCLUDE_CMAKE_FILE (adm/cmake/occt_toolkit) diff --git a/src/TKXDESTEP/EXTERNLIB b/src/TKXDESTEP/EXTERNLIB deleted file mode 100755 index 547cb01bb2..0000000000 --- a/src/TKXDESTEP/EXTERNLIB +++ /dev/null @@ -1,16 +0,0 @@ -TKXDE -TKBRep -TKSTEPAttr -TKernel -TKMath -TKXSBase -TKTopAlgo -TKG2d -TKCAF -TKSTEPBase -TKCDF -TKLCAF -TKG3d -TKXCAF -TKSTEP -TKShHealing diff --git a/src/TKXDESTEP/PACKAGES b/src/TKXDESTEP/PACKAGES deleted file mode 100755 index 508b92a242..0000000000 --- a/src/TKXDESTEP/PACKAGES +++ /dev/null @@ -1 +0,0 @@ -STEPCAFControl diff --git a/src/TKXSBase/PACKAGES b/src/TKXSBase/PACKAGES index f384afd8f1..5e726225c1 100755 --- a/src/TKXSBase/PACKAGES +++ b/src/TKXSBase/PACKAGES @@ -4,12 +4,6 @@ IFGraph IFSelect TransferBRep XSControl -StepData -StepFile -HeaderSection -RWHeaderSection -APIHeaderSection -StepSelect XSAlgo LibCtl MoniTool diff --git a/src/TKXSDRAW/EXTERNLIB b/src/TKXSDRAW/EXTERNLIB index 1947db4b4f..8b32e63548 100755 --- a/src/TKXSDRAW/EXTERNLIB +++ b/src/TKXSDRAW/EXTERNLIB @@ -8,17 +8,11 @@ TKMeshVS TKG3d TKViewerTest TKG2d -TKSTEPBase TKTopAlgo TKGeomBase TKGeomAlgo TKMesh TKDraw -TKSTEP -TKIGES -TKSTL -TKVRML TKLCAF TKDCAF TKXCAF -TKRWMesh diff --git a/src/TKXSDRAW/PACKAGES b/src/TKXSDRAW/PACKAGES index da48d7c48c..c06294d598 100755 --- a/src/TKXSDRAW/PACKAGES +++ b/src/TKXSDRAW/PACKAGES @@ -1,4 +1 @@ XSDRAW -XSDRAWIGES -XSDRAWSTEP -XSDRAWSTLVRML diff --git a/src/TKSTEP209/CMakeLists.txt b/src/TKXSDRAWDE/CMakeLists.txt similarity index 71% rename from src/TKSTEP209/CMakeLists.txt rename to src/TKXSDRAWDE/CMakeLists.txt index 78e09c5b81..f357436097 100644 --- a/src/TKSTEP209/CMakeLists.txt +++ b/src/TKXSDRAWDE/CMakeLists.txt @@ -1,3 +1,3 @@ -project(TKSTEP209) +project(TKXSDRAWDE) OCCT_INCLUDE_CMAKE_FILE (adm/cmake/occt_toolkit) diff --git a/src/TKXSDRAWDE/EXTERNLIB b/src/TKXSDRAWDE/EXTERNLIB new file mode 100644 index 0000000000..41bc48726b --- /dev/null +++ b/src/TKXSDRAWDE/EXTERNLIB @@ -0,0 +1,23 @@ +TKBRep +TKV3d +TKMath +TKernel +TKService +TKXSBase +TKMeshVS +TKG3d +TKViewerTest +TKG2d +TKTopAlgo +TKGeomBase +TKGeomAlgo +TKMesh +TKDraw +TKLCAF +TKDCAF +TKXCAF +TKRWMesh +TKXSBase +TKDECascade +TKDE +TKXSDRAW diff --git a/src/TKXDEIGES/FILES b/src/TKXSDRAWDE/FILES old mode 100755 new mode 100644 similarity index 100% rename from src/TKXDEIGES/FILES rename to src/TKXSDRAWDE/FILES diff --git a/src/TKXSDRAWDE/PACKAGES b/src/TKXSDRAWDE/PACKAGES new file mode 100644 index 0000000000..e7bb61be33 --- /dev/null +++ b/src/TKXSDRAWDE/PACKAGES @@ -0,0 +1 @@ +XSDRAWDE diff --git a/src/TKXSDRAWGLTF/CMakeLists.txt b/src/TKXSDRAWGLTF/CMakeLists.txt new file mode 100644 index 0000000000..e372ec36a9 --- /dev/null +++ b/src/TKXSDRAWGLTF/CMakeLists.txt @@ -0,0 +1,3 @@ +project(TKXSDRAWGLTF) + +OCCT_INCLUDE_CMAKE_FILE (adm/cmake/occt_toolkit) diff --git a/src/TKXSDRAWGLTF/EXTERNLIB b/src/TKXSDRAWGLTF/EXTERNLIB new file mode 100644 index 0000000000..35dfecf97c --- /dev/null +++ b/src/TKXSDRAWGLTF/EXTERNLIB @@ -0,0 +1,21 @@ +TKBRep +TKV3d +TKMath +TKernel +TKService +TKXSBase +TKMeshVS +TKG3d +TKViewerTest +TKG2d +TKTopAlgo +TKGeomBase +TKGeomAlgo +TKMesh +TKDraw +TKLCAF +TKDCAF +TKXCAF +TKRWMesh +TKDEGLTF +TKXSDRAW diff --git a/src/TKXDESTEP/FILES b/src/TKXSDRAWGLTF/FILES old mode 100755 new mode 100644 similarity index 100% rename from src/TKXDESTEP/FILES rename to src/TKXSDRAWGLTF/FILES diff --git a/src/TKXSDRAWGLTF/PACKAGES b/src/TKXSDRAWGLTF/PACKAGES new file mode 100644 index 0000000000..2d0b09ae11 --- /dev/null +++ b/src/TKXSDRAWGLTF/PACKAGES @@ -0,0 +1 @@ +XSDRAWGLTF diff --git a/src/TKXSDRAWIGES/CMakeLists.txt b/src/TKXSDRAWIGES/CMakeLists.txt new file mode 100644 index 0000000000..25283fb05b --- /dev/null +++ b/src/TKXSDRAWIGES/CMakeLists.txt @@ -0,0 +1,3 @@ +project(TKXSDRAWIGES) + +OCCT_INCLUDE_CMAKE_FILE (adm/cmake/occt_toolkit) diff --git a/src/TKXSDRAWIGES/EXTERNLIB b/src/TKXSDRAWIGES/EXTERNLIB new file mode 100644 index 0000000000..2051a8f40f --- /dev/null +++ b/src/TKXSDRAWIGES/EXTERNLIB @@ -0,0 +1,21 @@ +TKBRep +TKV3d +TKMath +TKernel +TKService +TKXSBase +TKMeshVS +TKG3d +TKViewerTest +TKG2d +TKTopAlgo +TKGeomBase +TKGeomAlgo +TKMesh +TKDraw +TKLCAF +TKDCAF +TKXCAF +TKXSBase +TKDEIGES +TKXSDRAW diff --git a/src/TKXSDRAWIGES/FILES b/src/TKXSDRAWIGES/FILES new file mode 100644 index 0000000000..ca4f0e567b --- /dev/null +++ b/src/TKXSDRAWIGES/FILES @@ -0,0 +1,2 @@ +EXTERNLIB +PACKAGES diff --git a/src/TKXSDRAWIGES/PACKAGES b/src/TKXSDRAWIGES/PACKAGES new file mode 100644 index 0000000000..bf6073a6f6 --- /dev/null +++ b/src/TKXSDRAWIGES/PACKAGES @@ -0,0 +1 @@ +XSDRAWIGES diff --git a/src/TKXSDRAWOBJ/CMakeLists.txt b/src/TKXSDRAWOBJ/CMakeLists.txt new file mode 100644 index 0000000000..39d98fdd11 --- /dev/null +++ b/src/TKXSDRAWOBJ/CMakeLists.txt @@ -0,0 +1,3 @@ +project(TKXSDRAWOBJ) + +OCCT_INCLUDE_CMAKE_FILE (adm/cmake/occt_toolkit) diff --git a/src/TKXSDRAWOBJ/EXTERNLIB b/src/TKXSDRAWOBJ/EXTERNLIB new file mode 100644 index 0000000000..af99e484fc --- /dev/null +++ b/src/TKXSDRAWOBJ/EXTERNLIB @@ -0,0 +1,21 @@ +TKBRep +TKV3d +TKMath +TKernel +TKService +TKXSBase +TKMeshVS +TKG3d +TKViewerTest +TKG2d +TKTopAlgo +TKGeomBase +TKGeomAlgo +TKMesh +TKDraw +TKLCAF +TKDCAF +TKXCAF +TKRWMesh +TKDEOBJ +TKXSDRAW diff --git a/src/TKXSDRAWOBJ/FILES b/src/TKXSDRAWOBJ/FILES new file mode 100644 index 0000000000..ca4f0e567b --- /dev/null +++ b/src/TKXSDRAWOBJ/FILES @@ -0,0 +1,2 @@ +EXTERNLIB +PACKAGES diff --git a/src/TKXSDRAWOBJ/PACKAGES b/src/TKXSDRAWOBJ/PACKAGES new file mode 100644 index 0000000000..2f48af3a9f --- /dev/null +++ b/src/TKXSDRAWOBJ/PACKAGES @@ -0,0 +1 @@ +XSDRAWOBJ diff --git a/src/TKXSDRAWPLY/CMakeLists.txt b/src/TKXSDRAWPLY/CMakeLists.txt new file mode 100644 index 0000000000..9b20129361 --- /dev/null +++ b/src/TKXSDRAWPLY/CMakeLists.txt @@ -0,0 +1,3 @@ +project(TKXSDRAWPLY) + +OCCT_INCLUDE_CMAKE_FILE (adm/cmake/occt_toolkit) diff --git a/src/TKXSDRAWPLY/EXTERNLIB b/src/TKXSDRAWPLY/EXTERNLIB new file mode 100644 index 0000000000..7f5611cb36 --- /dev/null +++ b/src/TKXSDRAWPLY/EXTERNLIB @@ -0,0 +1,21 @@ +TKBRep +TKV3d +TKMath +TKernel +TKService +TKXSBase +TKMeshVS +TKG3d +TKViewerTest +TKG2d +TKTopAlgo +TKGeomBase +TKGeomAlgo +TKMesh +TKDraw +TKLCAF +TKDCAF +TKXCAF +TKRWMesh +TKDEPLY +TKXSDRAW diff --git a/src/TKXSDRAWPLY/FILES b/src/TKXSDRAWPLY/FILES new file mode 100644 index 0000000000..ca4f0e567b --- /dev/null +++ b/src/TKXSDRAWPLY/FILES @@ -0,0 +1,2 @@ +EXTERNLIB +PACKAGES diff --git a/src/TKXSDRAWPLY/PACKAGES b/src/TKXSDRAWPLY/PACKAGES new file mode 100644 index 0000000000..e62ce608cf --- /dev/null +++ b/src/TKXSDRAWPLY/PACKAGES @@ -0,0 +1 @@ +XSDRAWPLY diff --git a/src/TKXSDRAWSTEP/CMakeLists.txt b/src/TKXSDRAWSTEP/CMakeLists.txt new file mode 100644 index 0000000000..5ecb56ef07 --- /dev/null +++ b/src/TKXSDRAWSTEP/CMakeLists.txt @@ -0,0 +1,3 @@ +project(TKXSDRAWSTEP) + +OCCT_INCLUDE_CMAKE_FILE (adm/cmake/occt_toolkit) diff --git a/src/TKXSDRAWSTEP/EXTERNLIB b/src/TKXSDRAWSTEP/EXTERNLIB new file mode 100644 index 0000000000..5cc664ff6c --- /dev/null +++ b/src/TKXSDRAWSTEP/EXTERNLIB @@ -0,0 +1,22 @@ +TKBRep +TKV3d +TKMath +TKernel +TKService +TKXSBase +TKMeshVS +TKG3d +TKViewerTest +TKG2d +TKTopAlgo +TKGeomBase +TKGeomAlgo +TKMesh +TKDraw +TKLCAF +TKDCAF +TKXCAF +TKRWMesh +TKXSBase +TKDESTEP +TKXSDRAW diff --git a/src/TKXSDRAWSTEP/FILES b/src/TKXSDRAWSTEP/FILES new file mode 100644 index 0000000000..ca4f0e567b --- /dev/null +++ b/src/TKXSDRAWSTEP/FILES @@ -0,0 +1,2 @@ +EXTERNLIB +PACKAGES diff --git a/src/TKXSDRAWSTEP/PACKAGES b/src/TKXSDRAWSTEP/PACKAGES new file mode 100644 index 0000000000..33b99297d1 --- /dev/null +++ b/src/TKXSDRAWSTEP/PACKAGES @@ -0,0 +1 @@ +XSDRAWSTEP diff --git a/src/TKXSDRAWSTL/CMakeLists.txt b/src/TKXSDRAWSTL/CMakeLists.txt new file mode 100644 index 0000000000..1a8b908936 --- /dev/null +++ b/src/TKXSDRAWSTL/CMakeLists.txt @@ -0,0 +1,3 @@ +project(TKXSDRAWSTL) + +OCCT_INCLUDE_CMAKE_FILE (adm/cmake/occt_toolkit) diff --git a/src/TKXSDRAWSTL/EXTERNLIB b/src/TKXSDRAWSTL/EXTERNLIB new file mode 100644 index 0000000000..45138ed058 --- /dev/null +++ b/src/TKXSDRAWSTL/EXTERNLIB @@ -0,0 +1,21 @@ +TKBRep +TKV3d +TKMath +TKernel +TKService +TKXSBase +TKMeshVS +TKG3d +TKViewerTest +TKG2d +TKTopAlgo +TKGeomBase +TKGeomAlgo +TKMesh +TKDraw +TKLCAF +TKDCAF +TKXCAF +TKRWMesh +TKDESTL +TKXSDRAW diff --git a/src/TKXSDRAWSTL/FILES b/src/TKXSDRAWSTL/FILES new file mode 100644 index 0000000000..ca4f0e567b --- /dev/null +++ b/src/TKXSDRAWSTL/FILES @@ -0,0 +1,2 @@ +EXTERNLIB +PACKAGES diff --git a/src/TKXSDRAWSTL/PACKAGES b/src/TKXSDRAWSTL/PACKAGES new file mode 100644 index 0000000000..c6c1f752ee --- /dev/null +++ b/src/TKXSDRAWSTL/PACKAGES @@ -0,0 +1 @@ +XSDRAWSTL diff --git a/src/TKXSDRAWVRML/CMakeLists.txt b/src/TKXSDRAWVRML/CMakeLists.txt new file mode 100644 index 0000000000..75fe4d8273 --- /dev/null +++ b/src/TKXSDRAWVRML/CMakeLists.txt @@ -0,0 +1,3 @@ +project(TKXSDRAWVRML) + +OCCT_INCLUDE_CMAKE_FILE (adm/cmake/occt_toolkit) diff --git a/src/TKXSDRAWVRML/EXTERNLIB b/src/TKXSDRAWVRML/EXTERNLIB new file mode 100644 index 0000000000..81bcd9f89d --- /dev/null +++ b/src/TKXSDRAWVRML/EXTERNLIB @@ -0,0 +1,21 @@ +TKBRep +TKV3d +TKMath +TKernel +TKService +TKXSBase +TKMeshVS +TKG3d +TKViewerTest +TKG2d +TKTopAlgo +TKGeomBase +TKGeomAlgo +TKMesh +TKDraw +TKLCAF +TKDCAF +TKXCAF +TKRWMesh +TKDEVRML +TKXSDRAW diff --git a/src/TKXSDRAWVRML/FILES b/src/TKXSDRAWVRML/FILES new file mode 100644 index 0000000000..ca4f0e567b --- /dev/null +++ b/src/TKXSDRAWVRML/FILES @@ -0,0 +1,2 @@ +EXTERNLIB +PACKAGES diff --git a/src/TKXSDRAWVRML/PACKAGES b/src/TKXSDRAWVRML/PACKAGES new file mode 100644 index 0000000000..d0fc037807 --- /dev/null +++ b/src/TKXSDRAWVRML/PACKAGES @@ -0,0 +1 @@ +XSDRAWVRML diff --git a/src/Vrml/Vrml_ConfigurationNode.cxx b/src/Vrml/Vrml_ConfigurationNode.cxx index 6cb9de24b2..0e50f82368 100644 --- a/src/Vrml/Vrml_ConfigurationNode.cxx +++ b/src/Vrml/Vrml_ConfigurationNode.cxx @@ -14,6 +14,7 @@ #include #include +#include #include IMPLEMENT_STANDARD_RTTIEXT(Vrml_ConfigurationNode, DE_ConfigurationNode) @@ -25,6 +26,9 @@ namespace static const TCollection_AsciiString aScope = "provider"; return aScope; } + + // Wrapper to auto-load DE component + DE_PluginHolder THE_OCCT_VRML_COMPONENT_PLUGIN; } //======================================================================= diff --git a/src/XDEDRAW/XDEDRAW.cxx b/src/XDEDRAW/XDEDRAW.cxx index df4c0a2da9..49d6c2685b 100644 --- a/src/XDEDRAW/XDEDRAW.cxx +++ b/src/XDEDRAW/XDEDRAW.cxx @@ -1848,32 +1848,13 @@ void XDEDRAW::Init(Draw_Interpretor& di) XDEDRAW_Views::InitCommands(di); XDEDRAW_Notes::InitCommands(di); XDEDRAW_Common::InitCommands ( di );//moved from EXE - - DE_Wrapper::GlobalWrapper()->Bind(new RWObj_ConfigurationNode()); - DE_Wrapper::GlobalWrapper()->Bind(new RWPly_ConfigurationNode()); - DE_Wrapper::GlobalWrapper()->Bind(new RWGltf_ConfigurationNode()); - DE_Wrapper::GlobalWrapper()->Bind(new IGESCAFControl_ConfigurationNode()); - DE_Wrapper::GlobalWrapper()->Bind(new STEPCAFControl_ConfigurationNode()); - DE_Wrapper::GlobalWrapper()->Bind(new Vrml_ConfigurationNode()); - DE_Wrapper::GlobalWrapper()->Bind(new DEXCAFCascade_ConfigurationNode()); - DE_Wrapper::GlobalWrapper()->Bind(new RWStl_ConfigurationNode()); - DE_Wrapper::GlobalWrapper()->Bind(new DEBRepCascade_ConfigurationNode()); } - //============================================================================== // XDEDRAW::Factory //============================================================================== void XDEDRAW::Factory(Draw_Interpretor& theDI) { - XSDRAWIGES::InitSelect(); - XSDRAWIGES::InitToBRep(theDI); - XSDRAWIGES::InitFromBRep(theDI); - - XSDRAWSTEP::InitCommands(theDI); - - XSDRAW::LoadDraw(theDI); - XDEDRAW::Init(theDI); #ifdef OCCT_DEBUG diff --git a/src/XDEDRAW/XDEDRAW.hxx b/src/XDEDRAW/XDEDRAW.hxx index e40d1de911..33584a2374 100644 --- a/src/XDEDRAW/XDEDRAW.hxx +++ b/src/XDEDRAW/XDEDRAW.hxx @@ -21,22 +21,18 @@ #include - //! Provides DRAW commands for work with DECAF data structures class XDEDRAW { -public: - DEFINE_STANDARD_ALLOC +public: - //! Provides common commands for work XDE //! Initializes all the functions Standard_EXPORT static void Init (Draw_Interpretor& di); //! Loads all Draw commands of TKXDEDRAW. Used for plugin. Standard_EXPORT static void Factory (Draw_Interpretor& theDI); - }; #endif // _XDEDRAW_HeaderFile diff --git a/src/XDEDRAW/XDEDRAW_Common.cxx b/src/XDEDRAW/XDEDRAW_Common.cxx index 751cb5ca92..d4f9e82d99 100644 --- a/src/XDEDRAW/XDEDRAW_Common.cxx +++ b/src/XDEDRAW/XDEDRAW_Common.cxx @@ -13,157 +13,75 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. +#include + +#include #include #include -#include -#include #include #include #include #include -#include -#include -#include -#include -#include #include #include -#include -#include -#include -#include -#include +#include #include #include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include +#include #include -#include #include -#include -#include -#include -#include -#include - -#include - -//============================================================ -// Support for several models in DRAW -//============================================================ -static NCollection_DataMap thedictws; - -//======================================================================= -//function : parseCoordinateSystem -//purpose : Parse RWMesh_CoordinateSystem enumeration. -//======================================================================= -static bool parseCoordinateSystem(const char* theArg, - RWMesh_CoordinateSystem& theSystem) -{ - TCollection_AsciiString aCSStr(theArg); - aCSStr.LowerCase(); - if (aCSStr == "zup") - { - theSystem = RWMesh_CoordinateSystem_Zup; - } - else if (aCSStr == "yup") - { - theSystem = RWMesh_CoordinateSystem_Yup; - } - else - { - return Standard_False; - } - return Standard_True; -} - -static Standard_Boolean ClearDicWS() -{ - thedictws.Clear(); - return Standard_True; -} - -static void AddWS(const TCollection_AsciiString& filename, - const Handle(XSControl_WorkSession)& WS) -{ - WS->SetVars(new XSDRAW_Vars); // support of DRAW variables - thedictws.Bind(filename, WS); -} - - -static Standard_Boolean FillDicWS(NCollection_DataMap& dicFile) -{ - ClearDicWS(); - if (dicFile.IsEmpty()) - { - return Standard_False; - } - Handle(STEPCAFControl_ExternFile) EF; - NCollection_DataMap::Iterator DicEFIt(dicFile); - for (; DicEFIt.More(); DicEFIt.Next()) - { - const TCollection_AsciiString& filename = DicEFIt.Key(); - EF = DicEFIt.Value(); - AddWS(filename, EF->GetWS()); - } - return Standard_True; -} - -static Standard_Boolean SetCurrentWS(const TCollection_AsciiString& filename) -{ - if (!thedictws.IsBound(filename)) return Standard_False; - Handle(XSControl_WorkSession) CurrentWS = - Handle(XSControl_WorkSession)::DownCast(thedictws.ChangeFind(filename)); - XSDRAW::Pilot()->SetSession(CurrentWS); - - return Standard_True; -} - +#include +#include //======================================================================= //function : SetCurWS //purpose : Set current file if many files are read //======================================================================= - -static Standard_Integer SetCurWS(Draw_Interpretor& di, Standard_Integer argc, const char** argv) +static Standard_Integer SetCurWS(Draw_Interpretor& theDI, + Standard_Integer theNbArgs, + const char** theArgVec) { - if (argc < 2) + if (theNbArgs < 2) + { + theDI << "Use: " << theArgVec[0] << " filename \n"; + return 1; + } + const TCollection_AsciiString aSessionName(theArgVec[1]); + Handle(XSControl_WorkSession) aSession; + const XSControl_WorkSessionMap& aWSList = XSDRAW::WorkSessionList(); + if (!aWSList.Find(aSessionName, aSession)) { - di << "Use: " << argv[0] << " filename \n"; + TCollection_AsciiString aWSs; + for (XSControl_WorkSessionMap::Iterator anIter(aWSList); + anIter.More(); anIter.Next()) + { + aWSs += "\""; + aWSs += anIter.Key(); + aWSs += "\"\n"; + } + theDI << "Error: Can't find active session. Active sessions list:\n" << aWSs; return 1; } - TCollection_AsciiString filename(argv[1]); - SetCurrentWS(filename); + XSDRAW::SetSession(aSession); return 0; } - //======================================================================= //function : GetDicWSList //purpose : List all files recorded after translation //======================================================================= - -static Standard_Integer GetDicWSList(Draw_Interpretor& di, Standard_Integer /*argc*/, const char** /*argv*/) +static Standard_Integer GetDicWSList(Draw_Interpretor& theDI, + Standard_Integer theNbArgs, + const char** theArgVec) { - NCollection_DataMap DictWS = thedictws; - if (DictWS.IsEmpty()) return 1; - NCollection_DataMap::Iterator DicIt(DictWS); - di << " The list of last translated files:\n"; - Standard_Integer num = 0; - for (; DicIt.More(); DicIt.Next(), num++) + (void)theNbArgs; + (void)theArgVec; + Message::SendInfo() << "Active sessions list:"; + TCollection_AsciiString aWSs; + for (XSControl_WorkSessionMap::Iterator anIter(XSDRAW::WorkSessionList()); + anIter.More(); anIter.Next()) { - const TCollection_AsciiString& strng(DicIt.Key()); - if (num) di << "\n"; - di << "\"" << strng.ToCString() << "\""; + theDI << "\"" << anIter.Key() << "\"\n"; } return 0; } @@ -172,11 +90,14 @@ static Standard_Integer GetDicWSList(Draw_Interpretor& di, Standard_Integer /*ar //function : GetCurWS //purpose : Return name of file which is current //======================================================================= - -static Standard_Integer GetCurWS(Draw_Interpretor& di, Standard_Integer /*argc*/, const char** /*argv*/) +static Standard_Integer GetCurWS(Draw_Interpretor& theDI, + Standard_Integer theNbArgs, + const char** theArgVec) { + (void)theNbArgs; + (void)theArgVec; Handle(XSControl_WorkSession) WS = XSDRAW::Session(); - di << "\"" << WS->LoadedFile() << "\""; + theDI << "\"" << WS->LoadedFile() << "\""; return 0; } @@ -184,512 +105,34 @@ static Standard_Integer GetCurWS(Draw_Interpretor& di, Standard_Integer /*argc*/ //function : FromShape //purpose : Apply fromshape command to all the loaded WSs //======================================================================= - -static Standard_Integer FromShape(Draw_Interpretor& di, Standard_Integer argc, const char** argv) +static Standard_Integer FromShape(Draw_Interpretor& theDI, + Standard_Integer theNbArgs, + const char** theArgVec) { - if (argc < 2) + if (theNbArgs < 2) { - di << argv[0] << " shape: search for shape origin among all last tranalated files\n"; + theDI << theArgVec[0] << " shape: search for shape origin among all last tranalated files\n"; return 0; } char command[256]; - Sprintf(command, "fromshape %.200s -1", argv[1]); - NCollection_DataMap DictWS = thedictws; - if (DictWS.IsEmpty()) return di.Eval(command); - - Handle(XSControl_WorkSession) WS = XSDRAW::Session(); - - NCollection_DataMap::Iterator DicIt(DictWS); - // di << "Searching for shape among all the loaded files:\n"; - Standard_Integer num = 0; - for (; DicIt.More(); DicIt.Next(), num++) - { - Handle(XSControl_WorkSession) CurrentWS = - Handle(XSControl_WorkSession)::DownCast(DicIt.Value()); - XSDRAW::Pilot()->SetSession(CurrentWS); - di.Eval(command); - } - - XSDRAW::Pilot()->SetSession(WS); - return 0; -} - -//======================================================================= -//function : ReadIges -//purpose : Read IGES to DECAF document -//======================================================================= - -static Standard_Integer ReadIges(Draw_Interpretor& di, Standard_Integer argc, const char** argv) -{ - if (argc < 3) - { - di << "Use: " << argv[0] << " Doc filename [mode]: read IGES file to a document\n"; - return 0; - } - - DeclareAndCast(IGESControl_Controller, ctl, XSDRAW::Controller()); - if (ctl.IsNull()) XSDRAW::SetNorm("IGES"); - - TCollection_AsciiString fnom, rnom; - Standard_Boolean modfic = XSDRAW::FileAndVar(argv[2], argv[1], "IGES", fnom, rnom); - if (modfic) di << " File IGES to read : " << fnom.ToCString() << "\n"; - else di << " Model taken from the session : " << fnom.ToCString() << "\n"; - // di<<" -- Names of variables BREP-DRAW prefixed by : "<Start(), "IGES import", modfic ? 2 : 1); - - IFSelect_ReturnStatus readstat = IFSelect_RetVoid; - if (modfic) - { - Message_ProgressScope aReadScope(aRootScope.Next(), "File reading", 1); - aReadScope.Show(); - readstat = reader.ReadFile(fnom.ToCString()); - } - else if (XSDRAW::Session()->NbStartingEntities() > 0) - { - readstat = IFSelect_RetDone; - } - if (readstat != IFSelect_RetDone) - { - if (modfic) - { - di << "Could not read file " << fnom.ToCString() << " , abandon\n"; - } - else - { - di << "No model loaded\n"; - } - return 1; - } - - Handle(TDocStd_Document) doc; - if (!DDocStd::GetDocument(argv[1], doc, Standard_False)) - { - Handle(TDocStd_Application) A = DDocStd::GetApplication(); - A->NewDocument("BinXCAF", doc); - TDataStd_Name::Set(doc->GetData()->Root(), argv[1]); - Handle(DDocStd_DrawDocument) DD = new DDocStd_DrawDocument(doc); - Draw::Set(argv[1], DD); - // di << "Document saved with name " << argv[1]; - } - if (!reader.Transfer(doc, aRootScope.Next())) - { - di << "Cannot read any relevant data from the IGES file\n"; - return 1; - } - - // Handle(DDocStd_DrawDocument) DD = new DDocStd_DrawDocument(doc); - // Draw::Set(argv[1],DD); - di << "Document saved with name " << argv[1]; - - return 0; -} - -//======================================================================= -//function : WriteIges -//purpose : Write DECAF document to IGES -//======================================================================= - -static Standard_Integer WriteIges(Draw_Interpretor& di, Standard_Integer argc, const char** argv) -{ - if (argc < 3) - { - di << "Use: " << argv[0] << " Doc filename [mode]: write document to IGES file\n"; - return 0; - } - - Handle(TDocStd_Document) Doc; - DDocStd::GetDocument(argv[1], Doc); - if (Doc.IsNull()) - { - di << argv[1] << " is not a document\n"; - return 1; - } - - XSDRAW::SetNorm("IGES"); - - TCollection_AsciiString fnom, rnom; - const Standard_Boolean modfic = XSDRAW::FileAndVar(argv[2], argv[1], "IGES", fnom, rnom); - - // IGESControl_Writer ICW (Interface_Static::CVal("write.iges.unit"), - // Interface_Static::IVal("write.iges.brep.mode")); - - Handle(Draw_ProgressIndicator) aProgress = new Draw_ProgressIndicator(di); - Message_ProgressScope aRootScope(aProgress->Start(), "IGES export", modfic ? 2 : 1); - - IGESCAFControl_Writer writer(XSDRAW::Session(), Standard_True); - if (argc == 4) - { - Standard_Boolean mode = Standard_True; - for (Standard_Integer i = 0; argv[3][i]; i++) - switch (argv[3][i]) - { - case '-': mode = Standard_False; break; - case '+': mode = Standard_True; break; - case 'c': writer.SetColorMode(mode); break; - case 'n': writer.SetNameMode(mode); break; - case 'l': writer.SetLayerMode(mode); break; - } - } - writer.Transfer(Doc, aRootScope.Next()); - - if (modfic) - { - Message_ProgressScope aWriteScope(aRootScope.Next(), "File writing", 1); - aWriteScope.Show(); - di << "Writing IGES model to file " << argv[2] << "\n"; - if (writer.Write(argv[2])) - { - di << " Write OK\n"; - } - else - { - di << " Write failed\n"; - } - } - else - { - di << "Document has been translated into the session"; - } - return 0; -} - -//======================================================================= -//function : ReadStep -//purpose : Read STEP file to DECAF document -//======================================================================= -static Standard_Integer ReadStep(Draw_Interpretor& di, Standard_Integer argc, const char** argv) -{ - DeclareAndCast(STEPControl_Controller, ctl, XSDRAW::Controller()); - if (ctl.IsNull()) - { - XSDRAW::SetNorm ("STEP"); - } - - Standard_CString aDocName = NULL; - TCollection_AsciiString aFilePath, aModeStr; - bool toTestStream = false; - for (Standard_Integer anArgIter = 1; anArgIter < argc; ++anArgIter) - { - TCollection_AsciiString anArgCase(argv[anArgIter]); - anArgCase.LowerCase(); - if (anArgCase == "-stream") - { - toTestStream = true; - } - else if (aDocName == NULL) - { - aDocName = argv[anArgIter]; - } - else if (aFilePath.IsEmpty()) - { - aFilePath = argv[anArgIter]; - } - else if (aModeStr.IsEmpty()) - { - aModeStr = argv[anArgIter]; - } - else - { - Message::SendFail() << "Syntax error at '" << argv[anArgIter] << "'"; - return 1; - } - } - - TCollection_AsciiString aFileName, anOldVarName; - Standard_Boolean isFileMode = XSDRAW::FileAndVar (aFilePath.ToCString(), aDocName, "STEP", aFileName, anOldVarName); - if (isFileMode) di << " File STEP to read : " << aFileName << "\n"; - else di << " Model taken from the session : " << aFileName << "\n"; - // di<<" -- Names of variables BREP-DRAW prefixed by : "<Start(), "STEP import", isFileMode ? 2 : 1); - - IFSelect_ReturnStatus aReadStat = IFSelect_RetVoid; - if (isFileMode) - { - Message_ProgressScope aReadScope (aRootScope.Next(), "File reading", 1); - aReadScope.Show(); - if (toTestStream) - { - std::ifstream aStream; - OSD_OpenStream (aStream, aFileName.ToCString(), std::ios::in | std::ios::binary); - TCollection_AsciiString aFolder, aFileNameShort; - OSD_Path::FolderAndFileFromPath (aFileName, aFolder, aFileNameShort); - aReadStat = aReader.ReadStream (aFileNameShort.ToCString(), aStream); - } - else - { - aReadStat = aReader.ReadFile (aFileName.ToCString()); - } - } - else if (XSDRAW::Session()->NbStartingEntities() > 0) - { - aReadStat = IFSelect_RetDone; - } - if (aReadStat != IFSelect_RetDone) - { - if (isFileMode) - { - di << "Could not read file " << aFileName << " , abandon\n"; - } - else - { - di << "No model loaded\n"; - } - return 1; - } - - Handle(TDocStd_Document) aDoc; - if (!DDocStd::GetDocument (aDocName, aDoc, Standard_False)) - { - Handle(TDocStd_Application) anApp = DDocStd::GetApplication(); - anApp->NewDocument("BinXCAF", aDoc); - TDataStd_Name::Set (aDoc->GetData()->Root(), aDocName); - Handle(DDocStd_DrawDocument) aDrawDoc = new DDocStd_DrawDocument (aDoc); - Draw::Set (aDocName, aDrawDoc); - // di << "Document saved with name " << aDocName; - } - if (!aReader.Transfer (aDoc, aRootScope.Next())) - { - di << "Cannot read any relevant data from the STEP file\n"; - return 1; - } - - Handle(DDocStd_DrawDocument) aDrawDoc = new DDocStd_DrawDocument (aDoc); - Draw::Set (aDocName, aDrawDoc); - di << "Document saved with name " << aDocName; - - NCollection_DataMap aDicFile = aReader.ExternFiles(); - FillDicWS (aDicFile); - AddWS (aFileName, XSDRAW::Session()); - return 0; -} - -//======================================================================= -//function : WriteStep -//purpose : Write DECAF document to STEP -//======================================================================= -static Standard_Integer WriteStep(Draw_Interpretor& di, Standard_Integer argc, const char** argv) -{ - DeclareAndCast(STEPControl_Controller,ctl,XSDRAW::Controller()); - if (ctl.IsNull()) - { - XSDRAW::SetNorm ("STEP"); - } - STEPCAFControl_Writer aWriter (XSDRAW::Session(), Standard_True); - - Handle(TDocStd_Document) aDoc; - TCollection_AsciiString aDocName, aFilePath; - STEPControl_StepModelType aMode = STEPControl_AsIs; - bool hasModeArg = false, toTestStream = false; - TCollection_AsciiString aMultiFilePrefix, aLabelName; - TDF_Label aLabel; - for (Standard_Integer anArgIter = 1; anArgIter < argc; ++anArgIter) - { - TCollection_AsciiString anArgCase (argv[anArgIter]); - anArgCase.LowerCase(); - if (anArgCase == "-stream") - { - toTestStream = true; - } - else if (aDocName.IsEmpty()) - { - Standard_CString aDocNameStr = argv[anArgIter]; - DDocStd::GetDocument (aDocNameStr, aDoc); - if (aDoc.IsNull()) - { - di << "Syntax error: '" << argv[anArgIter] << "' is not a document"; - return 1; - } - aDocName = aDocNameStr; - } - else if (aFilePath.IsEmpty()) - { - aFilePath = argv[anArgIter]; - } - else if (!hasModeArg) - { - hasModeArg = true; - switch (anArgCase.Value (1)) - { - case 'a': - case '0': aMode = STEPControl_AsIs; break; - case 'f': - case '1': aMode = STEPControl_FacetedBrep; break; - case 's': - case '2': aMode = STEPControl_ShellBasedSurfaceModel; break; - case 'm': - case '3': aMode = STEPControl_ManifoldSolidBrep; break; - case 'w': - case '4': aMode = STEPControl_GeometricCurveSet; break; - default: - { - di << "Syntax error: mode '" << argv[anArgIter] << "' is incorrect [give fsmw]"; - return 1; - } - } - Standard_Boolean wrmode = Standard_True; - for (Standard_Integer i = 1; i <= anArgCase.Length(); ++i) - { - switch (anArgCase.Value (i)) - { - case '-' : wrmode = Standard_False; break; - case '+' : wrmode = Standard_True; break; - case 'c' : aWriter.SetColorMode (wrmode); break; - case 'n' : aWriter.SetNameMode (wrmode); break; - case 'l' : aWriter.SetLayerMode (wrmode); break; - case 'v' : aWriter.SetPropsMode (wrmode); break; - } - } - } - else if (aMultiFilePrefix.IsEmpty() - && anArgCase.Search (":") == -1) - { - aMultiFilePrefix = argv[anArgIter]; - } - else if (aLabel.IsNull()) - { - if (!DDF::FindLabel (aDoc->Main().Data(), argv[anArgIter], aLabel) - || aLabel.IsNull()) - { - di << "Syntax error: No label for entry '" << argv[anArgIter] << "'"; - return 1; - } - aLabelName = argv[anArgIter]; - } - else - { - di << "Syntax error: unknown argument '" << argv[anArgIter] << "'"; - return 1; - } - } - if (aFilePath.IsEmpty()) - { - di << "Syntax error: wrong number of arguments"; - return 1; - } - - TCollection_AsciiString aFileName, anOldVarName; - const Standard_Boolean isFileMode = XSDRAW::FileAndVar (aFilePath.ToCString(), aDocName.ToCString(), "STEP", aFileName, anOldVarName); - - Handle(Draw_ProgressIndicator) aProgress = new Draw_ProgressIndicator (di); - Message_ProgressScope aRootScope (aProgress->Start(), "STEP export", isFileMode ? 2 : 1); - if (!aLabel.IsNull()) - { - di << "Translating label " << aLabelName << " of document " << aDocName << " to STEP\n"; - if (!aWriter.Transfer (aLabel, aMode, - !aMultiFilePrefix.IsEmpty() ? aMultiFilePrefix.ToCString() : NULL, - aRootScope.Next())) - { - di << "Error: the label of document cannot be translated or gives no result"; - return 1; - } - } - else - { - di << "Translating document " << aDocName << " to STEP\n"; - if (!aWriter.Transfer (aDoc, aMode, - !aMultiFilePrefix.IsEmpty() ? aMultiFilePrefix.ToCString() : NULL, - aRootScope.Next())) - { - di << "Error: The document cannot be translated or gives no result\n"; - } - } - - if (!isFileMode) - { - di << "Document has been translated into the session"; - return 0; - } - - Message_ProgressScope aWriteScope (aRootScope.Next(), "File writing", 1); - aWriteScope.Show(); - di << "Writing STEP file " << aFilePath << "\n"; - - IFSelect_ReturnStatus aStat = IFSelect_RetVoid; - if (toTestStream) - { - std::ofstream aStream; - OSD_OpenStream (aStream, aFilePath, std::ios::out | std::ios::binary); - aStat = aWriter.WriteStream (aStream); - aStream.close(); - if (!aStream.good() - && aStat == IFSelect_RetDone) - { - aStat = IFSelect_RetFail; - } - } - else - { - aStat = aWriter.Write (aFilePath.ToCString()); - } + Sprintf(command, "fromshape %.200s -1", theArgVec[1]); + const XSControl_WorkSessionMap& DictWS = XSDRAW::WorkSessionList(); + if (DictWS.IsEmpty()) + return theDI.Eval(command); - switch (aStat) + Handle(XSControl_WorkSession) aWS = XSDRAW::Session(); + for (XSControl_WorkSessionMap::Iterator DicIt(DictWS); + DicIt.More(); DicIt.Next()) { - case IFSelect_RetVoid: - { - di << "Error: no file written"; - break; - } - case IFSelect_RetDone: - { - di << "File " << aFilePath << " written\n"; - - NCollection_DataMap aDicFile = aWriter.ExternFiles(); - FillDicWS (aDicFile); - AddWS (aFilePath, XSDRAW::Session()); - break; - } - default: + Handle(XSControl_WorkSession) CurrentWS = Handle(XSControl_WorkSession)::DownCast(DicIt.Value()); + if (!CurrentWS.IsNull()) { - di << "Error on writing file"; - break; + XSDRAW::SetSession(CurrentWS); + theDI.Eval(command); } } + XSDRAW::SetSession(aWS); return 0; } @@ -697,43 +140,46 @@ static Standard_Integer WriteStep(Draw_Interpretor& di, Standard_Integer argc, c //function : Expand //purpose : //======================================================================= -static Standard_Integer Expand(Draw_Interpretor& di, Standard_Integer argc, const char** argv) +static Standard_Integer Expand(Draw_Interpretor& theDI, + Standard_Integer theNbArgs, + const char** theArgVec) { - if (argc < 3) + if (theNbArgs < 3) { - di << "Use: " << argv[0] << " Doc recurs(0/1) or Doc recurs(0/1) label1 label2 ... or Doc recurs(0/1 shape1 shape2 ...\n"; + theDI << "Use: " << theArgVec[0] + << " Doc recurs(0/1) or Doc recurs(0/1) label1 label2 ... or Doc recurs(0/1 shape1 shape2 ...\n"; return 1; } Handle(TDocStd_Document) Doc; - DDocStd::GetDocument(argv[1], Doc); + DDocStd::GetDocument(theArgVec[1], Doc); if (Doc.IsNull()) { - di << argv[1] << " is not a document\n"; return 1; + theDI << theArgVec[1] << " is not a document\n"; return 1; } Handle(XCAFDoc_ShapeTool) aShapeTool = XCAFDoc_DocumentTool::ShapeTool(Doc->Main()); Standard_Boolean recurs = Standard_False; - if (atoi(argv[2]) != 0) + if (atoi(theArgVec[2]) != 0) recurs = Standard_True; - if (argc == 3) + if (theNbArgs == 3) { if (!XCAFDoc_Editor::Expand(Doc->Main(), recurs)) { - di << "No suitable labels to expand\n"; + theDI << "No suitable labels to expand\n"; return 1; } } else { - for (Standard_Integer i = 3; i < argc; i++) + for (Standard_Integer i = 3; i < theNbArgs; i++) { TDF_Label aLabel; - TDF_Tool::Label(Doc->GetData(), argv[i], aLabel); + TDF_Tool::Label(Doc->GetData(), theArgVec[i], aLabel); if (aLabel.IsNull()) { TopoDS_Shape aShape; - aShape = DBRep::Get(argv[i]); + aShape = DBRep::Get(theArgVec[i]); aLabel = aShapeTool->FindShape(aShape); } @@ -741,13 +187,13 @@ static Standard_Integer Expand(Draw_Interpretor& di, Standard_Integer argc, cons { if (!XCAFDoc_Editor::Expand(Doc->Main(), aLabel, recurs)) { - di << "The shape is assembly or not compound\n"; + theDI << "The shape is assembly or not compound\n"; return 1; } } else { - di << argv[i] << " is not a shape\n"; return 1; + theDI << theArgVec[i] << " is not a shape\n"; return 1; } } } @@ -758,666 +204,91 @@ static Standard_Integer Expand(Draw_Interpretor& di, Standard_Integer argc, cons //function : Extract //purpose : //======================================================================= -static Standard_Integer Extract(Draw_Interpretor& di, - Standard_Integer argc, - const char** argv) +static Standard_Integer Extract(Draw_Interpretor& theDI, + Standard_Integer theNbArgs, + const char** theArgVec) { - if (argc < 4) + if (theNbArgs < 4) { - di << "Use: " << argv[0] << "dstDoc [dstAssmblSh] srcDoc srcLabel1 srcLabel2 ...\n"; + theDI << "Use: " << theArgVec[0] << "dstDoc [dstAssmblSh] srcDoc srcLabel1 srcLabel2 ...\n"; return 1; } Handle(TDocStd_Document) aSrcDoc, aDstDoc; - DDocStd::GetDocument(argv[1], aDstDoc); + DDocStd::GetDocument(theArgVec[1], aDstDoc); if (aDstDoc.IsNull()) { - di << "Error " << argv[1] << " is not a document\n"; + theDI << "Error " << theArgVec[1] << " is not a document\n"; return 1; } TDF_Label aDstLabel; Standard_Integer anArgInd = 3; - TDF_Tool::Label(aDstDoc->GetData(), argv[2], aDstLabel); + TDF_Tool::Label(aDstDoc->GetData(), theArgVec[2], aDstLabel); Handle(XCAFDoc_ShapeTool) aDstShapeTool = XCAFDoc_DocumentTool::ShapeTool(aDstDoc->Main()); if (aDstLabel.IsNull()) { aDstLabel = aDstShapeTool->Label(); anArgInd = 2; // to get Src Doc } - DDocStd::GetDocument(argv[anArgInd++], aSrcDoc); + DDocStd::GetDocument(theArgVec[anArgInd++], aSrcDoc); if (aSrcDoc.IsNull()) { - di << "Error " << argv[anArgInd] << " is not a document\n"; + theDI << "Error " << theArgVec[anArgInd] << " is not a document\n"; return 1; } TDF_LabelSequence aSrcShapes; - for (; anArgInd < argc; anArgInd++) + for (; anArgInd < theNbArgs; anArgInd++) { TDF_Label aSrcLabel; - TDF_Tool::Label(aSrcDoc->GetData(), argv[anArgInd], aSrcLabel); + TDF_Tool::Label(aSrcDoc->GetData(), theArgVec[anArgInd], aSrcLabel); if (aSrcLabel.IsNull()) { - di << "[" << argv[anArgInd] << "] is not valid Src label\n"; + theDI << "[" << theArgVec[anArgInd] << "] is not valid Src label\n"; return 1; } aSrcShapes.Append(aSrcLabel); } if (aSrcShapes.IsEmpty()) { - di << "Error: No Shapes to extract\n"; + theDI << "Error: No Shapes to extract\n"; return 1; } if (!XCAFDoc_Editor::Extract(aSrcShapes, aDstLabel)) { - di << "Error: Cannot extract labels\n"; + theDI << "Error: Cannot extract labels\n"; return 1; } return 0; } //======================================================================= -//function : ReadVrml +//function : InitCommands //purpose : //======================================================================= -static Standard_Integer ReadVrml(Draw_Interpretor& theDI, - Standard_Integer theArgc, - const char** theArgv) -{ - if(theArgc < 3) - { - theDI.PrintHelp(theArgv[0]); - return 1; - } - - Handle(TDocStd_Document) aDoc; - Standard_Real aFileUnitFactor = 1.0; - RWMesh_CoordinateSystem aFileCoordSys = RWMesh_CoordinateSystem_Yup, aSystemCoordSys = RWMesh_CoordinateSystem_Zup; - Standard_Boolean toUseExistingDoc = Standard_False; - Standard_Boolean toFillIncomplete = Standard_True; - Standard_CString aDocName = NULL; - TCollection_AsciiString aFilePath; - - for(Standard_Integer anArgIt = 1; anArgIt < theArgc; anArgIt++) - { - TCollection_AsciiString anArg(theArgv[anArgIt]); - anArg.LowerCase(); - if(anArgIt + 1 < theArgc && anArg == "-fileunit") - { - const TCollection_AsciiString aUnitStr(theArgv[++anArgIt]); - aFileUnitFactor = UnitsAPI::AnyToSI(1.0, aUnitStr.ToCString()); - if (aFileUnitFactor <= 0.0) - { - Message::SendFail() << "Error: wrong length unit '" << aUnitStr << "'"; - return 1; - } - } - else if (anArgIt + 1 < theArgc && anArg == "-filecoordsys") - { - if (!parseCoordinateSystem(theArgv[++anArgIt], aFileCoordSys)) - { - Message::SendFail() << "Error: unknown coordinate system '" << theArgv[anArgIt] << "'"; - return 1; - } - } - else if (anArgIt + 1 < theArgc && anArg == "-systemcoordsys") - { - if (!parseCoordinateSystem(theArgv[++anArgIt], aSystemCoordSys)) - { - Message::SendFail() << "Error: unknown coordinate system '" << theArgv[anArgIt] << "'"; - return 1; - } - } - else if (anArg == "-fillincomplete") - { - toFillIncomplete = true; - if (anArgIt + 1 < theArgc && Draw::ParseOnOff(theArgv[anArgIt + 1], toFillIncomplete)) - { - ++anArgIt; - } - } - else if (anArg == "-nocreatedoc") - { - toUseExistingDoc = true; - } - else if (aDocName == nullptr) - { - aDocName = theArgv[anArgIt]; - DDocStd::GetDocument(aDocName, aDoc, Standard_False); - } - else if(aFilePath.IsEmpty()) - { - aFilePath = theArgv[anArgIt]; - } - else - { - Message::SendFail() << "Syntax error at '" << theArgv[anArgIt] << "'"; - return 1; - } - } - - if (aFilePath.IsEmpty() || aDocName == nullptr) - { - Message::SendFail() << "Syntax error: wrong number of arguments"; - return 1; - } - - if (aDoc.IsNull()) - { - if(toUseExistingDoc) - { - Message::SendFail() << "Error: document with name " << aDocName << " does not exist"; - return 1; - } - Handle(TDocStd_Application) anApp = DDocStd::GetApplication(); - anApp->NewDocument("BinXCAF", aDoc); - } - else if (!toUseExistingDoc) - { - Message::SendFail() << "Error: document with name " << aDocName << " already exists\n"; - return 1; - } - - Standard_Real aScaleFactor = 1.; - if (!XCAFDoc_DocumentTool::GetLengthUnit(aDoc, aScaleFactor)) - { - XSAlgo::AlgoContainer()->PrepareForTransfer(); - aScaleFactor = UnitsMethods::GetCasCadeLengthUnit(); - } - - VrmlAPI_CafReader aVrmlReader; - aVrmlReader.SetDocument(aDoc); - aVrmlReader.SetFileLengthUnit(aFileUnitFactor); - aVrmlReader.SetSystemLengthUnit(aScaleFactor); - aVrmlReader.SetFileCoordinateSystem(aFileCoordSys); - aVrmlReader.SetSystemCoordinateSystem(aSystemCoordSys); - aVrmlReader.SetFillIncompleteDocument(toFillIncomplete); - - Handle(Draw_ProgressIndicator) aProgress = new Draw_ProgressIndicator(theDI, 1); - if (!aVrmlReader.Perform(aFilePath, aProgress->Start())) - { - if (aVrmlReader.ExtraStatus() != RWMesh_CafReaderStatusEx_Partial) - { - Message::SendFail() << "Error: file reading failed '" << aFilePath << "'"; - return 1; - } - Message::SendWarning() << - "Warning: file has been read paratially (due to unexpected EOF, syntax error, memory limit) " << aFilePath; - } - - TDataStd_Name::Set(aDoc->GetData()->Root(), aDocName); - Handle(DDocStd_DrawDocument) aDD = new DDocStd_DrawDocument(aDoc); - Draw::Set(aDocName, aDD); - - return 0; -} - -//======================================================================= -//function : WriteVrml -//purpose : Write DECAF document to Vrml -//======================================================================= - -static Standard_Integer WriteVrml(Draw_Interpretor& di, Standard_Integer argc, const char** argv) -{ - if (argc < 3) - { - di << "Use: " << argv[0] << " Doc filename: write document to Vrml file\n"; - return 0; - } - - Handle(TDocStd_Document) aDoc; - DDocStd::GetDocument(argv[1], aDoc); - if (aDoc.IsNull()) - { - di << argv[1] << " is not a document\n"; - return 1; - } - - if (argc < 3 || argc > 5) - { - di << "wrong number of parameters\n"; - return 0; - } - - VrmlAPI_Writer writer; - writer.SetRepresentation(VrmlAPI_ShadedRepresentation); - Standard_Real aScaleFactorM = 1.; - if (!XCAFDoc_DocumentTool::GetLengthUnit(aDoc, aScaleFactorM)) - { - XSAlgo::AlgoContainer()->PrepareForTransfer(); // update unit info - aScaleFactorM = UnitsMethods::GetCasCadeLengthUnit(UnitsMethods_LengthUnit_Meter); - } - if (!writer.WriteDoc(aDoc, argv[2], aScaleFactorM)) - { - di << "Error: File " << argv[2] << " was not written\n"; - } - - return 0; -} - -//======================================================================= -//function : DumpConfiguration -//purpose : -//======================================================================= -static Standard_Integer DumpConfiguration(Draw_Interpretor& theDI, - Standard_Integer theNbArgs, - const char** theArgVec) +void XDEDRAW_Common::InitCommands(Draw_Interpretor& theDI) { - Handle(DE_Wrapper) aConf = DE_Wrapper::GlobalWrapper(); - TCollection_AsciiString aPath; - Standard_Boolean aIsRecursive = Standard_True; - Standard_Boolean isHandleFormat = Standard_False; - Standard_Boolean isHandleVendors = Standard_False; - TColStd_ListOfAsciiString aFormats; - TColStd_ListOfAsciiString aVendors; - for (Standard_Integer anArgIter = 1; anArgIter < theNbArgs; ++anArgIter) - { - TCollection_AsciiString anArg(theArgVec[anArgIter]); - anArg.LowerCase(); - if ((anArg == "-path") && - (anArgIter + 1 < theNbArgs)) - { - ++anArgIter; - aPath = theArgVec[anArgIter]; - } - else if ((anArg == "-recursive") && - (anArgIter + 1 < theNbArgs) && - Draw::ParseOnOff(theArgVec[anArgIter + 1], aIsRecursive)) - { - ++anArgIter; - } - else if (anArg == "-format") - { - isHandleFormat = Standard_True; - isHandleVendors = Standard_False; - } - else if (anArg == "-vendor") - { - isHandleFormat = Standard_False; - isHandleVendors = Standard_True; - } - else if (isHandleFormat) - { - aFormats.Append(theArgVec[anArgIter]); - } - else if (isHandleVendors) - { - aVendors.Append(theArgVec[anArgIter]); - } - else if (!isHandleFormat && !isHandleVendors) - { - Message::SendFail() << "Syntax error at argument '" << theArgVec[anArgIter] << "'\n"; - return 1; - } - } - Standard_Boolean aStat = Standard_True; - if (!aPath.IsEmpty()) - { - aStat = aConf->Save(aPath, aIsRecursive, aFormats ,aVendors); - } - else - { - theDI << aConf->Save(aIsRecursive, aFormats, aVendors) << "\n"; - } - if (!aStat) - { - return 1; - } - return 0; -} - -//======================================================================= -//function : CompareConfiguration -//purpose : -//======================================================================= -static Standard_Integer CompareConfiguration(Draw_Interpretor& theDI, - Standard_Integer theNbArgs, - const char** theArgVec) -{ - if (theNbArgs > 5) - { - theDI.PrintHelp(theArgVec[0]); - return 1; - } - Handle(DE_ConfigurationContext) aResourceFirst = new DE_ConfigurationContext(); - if (!aResourceFirst->Load(theArgVec[1])) - { - Message::SendFail() << "Error: Can't load first configuration"; - return 1; - } - Handle(DE_ConfigurationContext) aResourceSecond = new DE_ConfigurationContext(); - if (!aResourceSecond->Load(theArgVec[2])) - { - Message::SendFail() << "Error: Can't load second configuration"; - return 1; - } - const DE_ResourceMap& aResourceMapFirst = aResourceFirst->GetInternalMap(); - const DE_ResourceMap& aResourceMapSecond = aResourceSecond->GetInternalMap(); - Standard_Integer anDiffers = 0; - for (DE_ResourceMap::Iterator anOrigIt(aResourceMapFirst); - anOrigIt.More(); anOrigIt.Next()) - { - const TCollection_AsciiString& anOrigValue = anOrigIt.Value(); - const TCollection_AsciiString& anOrigKey = anOrigIt.Key(); - TCollection_AsciiString aCompValue; - if (!aResourceMapSecond.Find(anOrigKey, aCompValue)) - { - Message::SendWarning() << "Second configuration don't have the next scope : " << anOrigKey; - anDiffers++; - } - if (!aCompValue.IsEqual(anOrigValue)) - { - Message::SendWarning() << "Configurations have differs value with the next scope :" << anOrigKey - << " First value : " << anOrigValue << " Second value : " << aCompValue; - anDiffers++; - } - } - TCollection_AsciiString aMessage; - if (aResourceMapFirst.Extent() != aResourceMapSecond.Extent() || anDiffers > 0) - { - Message::SendFail() << "Error: Configurations are not same : " << " Differs count : " << anDiffers << " Count of first's scopes : " << aResourceMapFirst.Extent() - << " Count of second's scopes : " << aResourceMapSecond.Extent(); - return 1; - } - return 0; -} - -//======================================================================= -//function : LoadConfiguration -//purpose : -//======================================================================= -static Standard_Integer LoadConfiguration(Draw_Interpretor& theDI, - Standard_Integer theNbArgs, - const char** theArgVec) -{ - if (theNbArgs > 4) - { - theDI.PrintHelp(theArgVec[0]); - return 1; - } - Handle(DE_Wrapper) aConf = DE_Wrapper::GlobalWrapper(); - TCollection_AsciiString aString = theArgVec[1]; - Standard_Boolean aIsRecursive = Standard_True; - if (theNbArgs == 4) - { - TCollection_AsciiString anArg = theArgVec[2]; - anArg.LowerCase(); - if (!(anArg == "-recursive") || - !Draw::ParseOnOff(theArgVec[3], aIsRecursive)) - { - Message::SendFail() << "Syntax error at argument '" << theArgVec[3] << "'"; - return 1; - } - } - if (!aConf->Load(aString, aIsRecursive)) - { - Message::SendFail() << "Error: configuration is incorrect"; - return 1; - } - return 0; -} - -//======================================================================= -//function : ReadFile -//purpose : -//======================================================================= -static Standard_Integer ReadFile(Draw_Interpretor& theDI, - Standard_Integer theNbArgs, - const char** theArgVec) -{ - if (theNbArgs > 6) - { - theDI.PrintHelp(theArgVec[0]); - return 1; - } - TCollection_AsciiString aDocShapeName; - TCollection_AsciiString aFilePath; - Handle(TDocStd_Document) aDoc; - Handle(TDocStd_Application) anApp = DDocStd::GetApplication(); - TCollection_AsciiString aConfString; - Standard_Boolean isNoDoc = (TCollection_AsciiString(theArgVec[0]) == "readfile"); - for (Standard_Integer anArgIter = 1; anArgIter < theNbArgs; ++anArgIter) - { - TCollection_AsciiString anArg(theArgVec[anArgIter]); - anArg.LowerCase(); - if ((anArg == "-conf") && - (anArgIter + 1 < theNbArgs)) - { - ++anArgIter; - aConfString = theArgVec[anArgIter]; - } - else if (aDocShapeName.IsEmpty()) - { - aDocShapeName = theArgVec[anArgIter]; - Standard_CString aNameVar = aDocShapeName.ToCString(); - if(!isNoDoc) - { - DDocStd::GetDocument(aNameVar, aDoc, Standard_False); - } - } - else if (aFilePath.IsEmpty()) - { - aFilePath = theArgVec[anArgIter]; - } - else - { - Message::SendFail() << "Syntax error at argument '" << theArgVec[anArgIter] << "'"; - return 1; - } - } - if (aDocShapeName.IsEmpty() || aFilePath.IsEmpty()) - { - Message::SendFail() << "Syntax error: wrong number of arguments"; - return 1; - } - if (aDoc.IsNull() && !isNoDoc) - { - anApp->NewDocument(TCollection_ExtendedString("BinXCAF"), aDoc); - Handle(DDocStd_DrawDocument) aDrawDoc = new DDocStd_DrawDocument(aDoc); - TDataStd_Name::Set(aDoc->GetData()->Root(), theArgVec[1]); - Draw::Set(theArgVec[1], aDrawDoc); - } - - Handle(DE_Wrapper) aConf = DE_Wrapper::GlobalWrapper()->Copy(); - Standard_Boolean aStat = Standard_True; - if (!aConfString.IsEmpty()) - { - aStat = aConf->Load(aConfString); - } - if (aStat) - { - TopoDS_Shape aShape; - aStat = isNoDoc ? aConf->Read(aFilePath, aShape) : aConf->Read(aFilePath, aDoc); - if(isNoDoc && aStat) - { - DBRep::Set(aDocShapeName.ToCString(), aShape); - } - } - if (!aStat) - { - return 1; - } - return 0; -} - -//======================================================================= -//function : WriteFile -//purpose : -//======================================================================= -static Standard_Integer WriteFile(Draw_Interpretor& theDI, - Standard_Integer theNbArgs, - const char** theArgVec) -{ - if (theNbArgs > 6) - { - theDI.PrintHelp(theArgVec[0]); - return 1; - } - TCollection_AsciiString aDocShapeName; - TCollection_AsciiString aFilePath; - Handle(TDocStd_Document) aDoc; - Handle(TDocStd_Application) anApp = DDocStd::GetApplication(); - TCollection_AsciiString aConfString; - Standard_Boolean isNoDoc = (TCollection_AsciiString(theArgVec[0]) == "writefile"); - for (Standard_Integer anArgIter = 1; anArgIter < theNbArgs; ++anArgIter) - { - TCollection_AsciiString anArg(theArgVec[anArgIter]); - anArg.LowerCase(); - if ((anArg == "-conf") && - (anArgIter + 1 < theNbArgs)) - { - ++anArgIter; - aConfString = theArgVec[anArgIter]; - } - else if (aDocShapeName.IsEmpty()) - { - aDocShapeName = theArgVec[anArgIter]; - Standard_CString aNameVar = aDocShapeName.ToCString(); - if (!isNoDoc) - { - DDocStd::GetDocument(aNameVar, aDoc, Standard_False); - } - } - else if (aFilePath.IsEmpty()) - { - aFilePath = theArgVec[anArgIter]; - } - else - { - Message::SendFail() << "Syntax error at argument '" << theArgVec[anArgIter] << "'"; - return 1; - } - } - if (aDocShapeName.IsEmpty() || aFilePath.IsEmpty()) - { - Message::SendFail() << "Syntax error: wrong number of arguments"; - return 1; - } - if (aDoc.IsNull() && !isNoDoc) - { - Message::SendFail() << "Error: incorrect document"; - } - Handle(DE_Wrapper) aConf = DE_Wrapper::GlobalWrapper()->Copy(); - Standard_Boolean aStat = Standard_True; - if (!aConfString.IsEmpty()) - { - aStat = aConf->Load(aConfString); - } - if (aStat) - { - if(isNoDoc) - { - TopoDS_Shape aShape = DBRep::Get(aDocShapeName); - if(aShape.IsNull()) - { - Message::SendFail() << "Error: incorrect shape"; - return 1; - } - aStat = aConf->Write(aFilePath, aShape); - } - else - { - aStat = aConf->Write(aFilePath, aDoc); - } - } - if (!aStat) - { - return 1; - } - return 0; -} - -void XDEDRAW_Common::InitCommands(Draw_Interpretor& di) -{ - static Standard_Boolean initactor = Standard_False; - if (initactor) + static Standard_Boolean aIsActivated = Standard_False; + if (aIsActivated) { return; } - initactor = Standard_True; - - Standard_CString g = "XDE translation commands"; - - di.Add("ReadIges", "Doc filename: Read IGES file to DECAF document", __FILE__, ReadIges, g); - di.Add("WriteIges", "Doc filename: Write DECAF document to IGES file", __FILE__, WriteIges, g); - di.Add("ReadStep", - "Doc filename [mode] [-stream]" - "\n\t\t: Read STEP file to a document." - "\n\t\t: -stream read using istream reading interface (testing)", - __FILE__, ReadStep, g); - di.Add("WriteStep" , - "Doc filename [mode=a [multifile_prefix] [label]] [-stream]" - "\n\t\t: Write DECAF document to STEP file" - "\n\t\t: mode can be: a or 0 : AsIs (default)" - "\n\t\t: f or 1 : FacettedBRep s or 2 : ShellBasedSurfaceModel" - "\n\t\t: m or 3 : ManifoldSolidBrep w or 4 : GeometricCurveSet/WireFrame" - "\n\t\t: multifile_prefix: triggers writing assembly components as separate files," - "\n\t\t: and defines common prefix for their names" - "\n\t\t: label tag of the sub-assembly label to save only that sub-assembly" - "\n\t\t: -stream read using ostream writing interface (testing)", - __FILE__, WriteStep, g); + aIsActivated = Standard_True; - di.Add("XFileList", "Print list of files that was transferred by the last transfer", __FILE__, GetDicWSList, g); - di.Add("XFileCur", ": returns name of file which is set as current", __FILE__, GetCurWS, g); - di.Add("XFileSet", "filename: Set the specified file to be the current one", __FILE__, SetCurWS, g); - di.Add("XFromShape", "shape: do fromshape command for all the files", __FILE__, FromShape, g); + Standard_CString aGroup = "XDE translation commands"; - di.Add("XExpand", "XExpand Doc recursively(0/1) or XExpand Doc recursively(0/1) label1 label2 ..." - "or XExpand Doc recursively(0/1) shape1 shape2 ...", __FILE__, Expand, g); - di.Add("XExtract", "XExtract dstDoc [dstAssmblSh] srcDoc srcLabel1 srcLabel2 ...\t" - "Extracts given srcLabel1 srcLabel2 ... from srcDoc into given Doc or assembly shape", - __FILE__, Extract, g); + theDI.Add("XFileList", "Print list of files that was transferred by the last transfer", __FILE__, GetDicWSList, aGroup); + theDI.Add("XFileCur", ": returns name of file which is set as current", __FILE__, GetCurWS, aGroup); + theDI.Add("XFileSet", "filename: Set the specified file to be the current one", __FILE__, SetCurWS, aGroup); + theDI.Add("XFromShape", "shape: do fromshape command for all the files", __FILE__, FromShape, aGroup); - di.Add("ReadVrml", - "ReadVrml docName filePath [-fileCoordSys {Zup|Yup}] [-fileUnit Unit]" - "\n\t\t: [-systemCoordSys {Zup|Yup}] [-noCreateDoc] [-fillIncomplete {ON|OFF}]" - "\n\t\t: Read Vrml file into XDE document." - "\n\t\t: -fileCoordSys coordinate system defined by Vrml file; Yup when not specified." - "\n\t\t: -fileUnit length unit of Vrml file content." - "\n\t\t: -systemCoordSys result coordinate system; Zup when not specified." - "\n\t\t: -noCreateDoc read into existing XDE document." - "\n\t\t: -fillIncomplete fill the document with partially retrieved data even if reader has failed with " - "error; true when not specified", - __FILE__, ReadVrml, g); - di.Add("WriteVrml", - "WriteVrml Doc filename [version VRML#1.0/VRML#2.0 (1/2): 2 by default] [representation shaded/wireframe/both (0/1/2): 0 by default]", - __FILE__, WriteVrml, g); + theDI.Add("XExpand", "XExpand Doc recursively(0/1) or XExpand Doc recursively(0/1) label1 label2 ..." + "or XExpand Doc recursively(0/1) shape1 shape2 ...", __FILE__, Expand, aGroup); + theDI.Add("XExtract", "XExtract dstDoc [dstAssmblSh] srcDoc srcLabel1 srcLabel2 ...\t" + "Extracts given srcLabel1 srcLabel2 ... from srcDoc into given Doc or assembly shape", + __FILE__, Extract, aGroup); - di.Add("DumpConfiguration", - "DumpConfiguration [-path ] [-recursive {on|off}] [-format fmt1 fmt2 ...] [-vendor vend1 vend2 ...]\n" - "\n\t\t: Dump special resource generated from global configuration." - "\n\t\t: '-path' - save resource configuration to the file" - "\n\t\t: '-recursive' - flag to generate a resource from providers. Default is On. Off disables other options" - "\n\t\t: '-format' - flag to generate a resource for choosen formats. If list is empty, generate it for all" - "\n\t\t: '-vendor' - flag to generate a resource for choosen vendors. If list is empty, generate it for all", - __FILE__, DumpConfiguration, g); - di.Add("LoadConfiguration", - "LoadConfiguration conf [-recursive {on|off}]\n" - "\n\t\t: 'conf' - path to the resouce file or string value in the special format" - "\n\t\t: '-recursive' - flag to generate a resource for all providers. Default is true" - "\n\t\t: Configure global configuration according special resource", - __FILE__, LoadConfiguration, g); - di.Add("CompareConfiguration", - "CompareConfiguration conf1 conf2\n" - "\n\t\t: 'conf1' - path to the first resouce file or string value in the special format" - "\n\t\t: 'conf2' - path to the second resouce file or string value in the special format" - "\n\t\t: Compare two configurations", - __FILE__, CompareConfiguration, g); - di.Add("ReadFile", - "ReadFile docName filePath [-conf ]\n" - "\n\t\t: Read CAD file to document with registered format's providers. Use global configuration by default.", - __FILE__, ReadFile, g); - di.Add("readfile", - "readfile shapeName filePath [-conf ]\n" - "\n\t\t: Read CAD file to shape with registered format's providers. Use global configuration by default.", - __FILE__, ReadFile, g); - di.Add("WriteFile", - "WriteFile docName filePath [-conf ]\n" - "\n\t\t: Write CAD file to document with registered format's providers. Use global configuration by default.", - __FILE__, WriteFile, g); - di.Add("writefile", - "writefile shapeName filePath [-conf ]\n" - "\n\t\t: Write CAD file to shape with registered format's providers. Use global configuration by default.", - __FILE__, WriteFile, g); + // Load XSDRAW session for pilot activation + XSDRAW::LoadDraw(theDI); } diff --git a/src/XDEDRAW/XDEDRAW_Common.hxx b/src/XDEDRAW/XDEDRAW_Common.hxx index d945f419ee..5193f683a8 100644 --- a/src/XDEDRAW/XDEDRAW_Common.hxx +++ b/src/XDEDRAW/XDEDRAW_Common.hxx @@ -21,38 +21,12 @@ #include - - class XDEDRAW_Common { -public: - DEFINE_STANDARD_ALLOC - - +public: + Standard_EXPORT static void InitCommands (Draw_Interpretor& theCommands); - - - - -protected: - - - - - -private: - - - - - }; - - - - - - #endif // _XDEDRAW_Common_HeaderFile diff --git a/src/XSControl/XSControl_Functions.cxx b/src/XSControl/XSControl_Functions.cxx index efe8bb8e3f..970529952c 100644 --- a/src/XSControl/XSControl_Functions.cxx +++ b/src/XSControl/XSControl_Functions.cxx @@ -93,7 +93,7 @@ static IFSelect_ReturnStatus XSControl_newmodel(const Handle(IFSelect_SessionPil if (!XSControl::Session(pilot)->NewModel().IsNull()) return IFSelect_RetDone; Message_Messenger::StreamBuffer sout = Message::SendInfo(); sout<<"No new Model produced"<; + //! This WorkSession completes the basic one, by adding : //! - use of Controller, with norm selection... //! - management of transfers (both ways) with auxiliary classes @@ -82,12 +84,12 @@ class XSControl_WorkSession : public IFSelect_WorkSession //! Returns the current Context List, Null if not defined //! The Context is given to the TransientProcess for TransferRead - const NCollection_DataMap & Context() const + const XSControl_WorkSessionMap& Context() const { return myContext; } //! Sets the current Context List, as a whole //! Sets it to the TransferReader - Standard_EXPORT void SetAllContext (const NCollection_DataMap& theContext); + Standard_EXPORT void SetAllContext (const XSControl_WorkSessionMap& theContext); //! Clears the whole current Context (nullifies it) Standard_EXPORT void ClearContext(); @@ -199,7 +201,7 @@ class XSControl_WorkSession : public IFSelect_WorkSession Handle(XSControl_Controller) myController; Handle(XSControl_TransferReader) myTransferReader; Handle(XSControl_TransferWriter) myTransferWriter; - NCollection_DataMap myContext; + XSControl_WorkSessionMap myContext; Handle(XSControl_Vars) myVars; }; diff --git a/src/XSDRAW/XSDRAW.cxx b/src/XSDRAW/XSDRAW.cxx index c4638e2427..79fe1e8d11 100644 --- a/src/XSDRAW/XSDRAW.cxx +++ b/src/XSDRAW/XSDRAW.cxx @@ -15,6 +15,7 @@ #include #include #include +#include #include #include #include @@ -30,6 +31,7 @@ #include #include #include +#include #include #include #include @@ -39,18 +41,51 @@ #include #include #include +#include +#include +#include #include #include -//#include -static int deja = 0, dejald = 0; -//unused variable -//static int okxset = 0; +namespace +{ + static int deja = 0, dejald = 0; -static NCollection_DataMap theolds; -static Handle(TColStd_HSequenceOfAsciiString) thenews; + static NCollection_DataMap theolds; + static Handle(TColStd_HSequenceOfAsciiString) thenews; -static Handle(IFSelect_SessionPilot) thepilot; // detient Session, Model + static Handle(IFSelect_SessionPilot) thepilot; // detient Session, Model + + //======================================================================= + //function : collectActiveWorkSessions + //purpose : + //======================================================================= + static void collectActiveWorkSessions(const Handle(XSControl_WorkSession)& theWS, + const TCollection_AsciiString& theName, + XSControl_WorkSessionMap& theMap, + const Standard_Boolean theIsFirst) + { + if (theIsFirst) + { + theMap.Clear(); + } + if (theWS.IsNull()) + { + return; + } + if (theMap.IsBound(theName)) + { + return; + } + theMap.Bind(theName, theWS); + for (XSControl_WorkSessionMap::Iterator anIter(theWS->Context()); + anIter.More(); anIter.Next()) + { + Handle(XSControl_WorkSession) aWS = Handle(XSControl_WorkSession)::DownCast(anIter.Value()); + collectActiveWorkSessions(aWS, anIter.Key(), theMap, Standard_False); + } + } +} static Standard_Integer XSTEPDRAWRUN (Draw_Interpretor& di, Standard_Integer argc, const char** argv) { @@ -104,6 +139,7 @@ static Standard_Integer XSTEPDRAWRUN (Draw_Interpretor& di, Standard_Integer arg IFSelect_Functions::Init(); XSControl_Functions::Init(); XSControl_FuncShape::Init(); + XSAlgo::Init(); // XSDRAW_Shape::Init(); passe a present par theCommands return Standard_True; } @@ -167,7 +203,10 @@ void XSDRAW::LoadDraw (Draw_Interpretor& theCommands) Handle(IFSelect_SessionPilot) XSDRAW::Pilot () { return thepilot; } - Handle(XSControl_WorkSession) XSDRAW::Session () + void XSDRAW::SetSession(const Handle(XSControl_WorkSession)& theSession) + { Pilot()->SetSession(theSession); } + + const Handle(XSControl_WorkSession) XSDRAW::Session () { return XSControl::Session(thepilot); } void XSDRAW::SetController (const Handle(XSControl_Controller)& control) @@ -289,16 +328,71 @@ void XSDRAW::LoadDraw (Draw_Interpretor& theCommands) (Handle(TopTools_HSequenceOfShape)& list, const Standard_CString name) { return XSControl_FuncShape::MoreShapes (XSDRAW::Session(),list,name); } +//======================================================================= +//function : GetLengthUnit +//purpose : +//======================================================================= +Standard_Real XSDRAW::GetLengthUnit(const Handle(TDocStd_Document)& theDoc) +{ + if (!theDoc.IsNull()) + { + Standard_Real aUnit = 1.; + if (XCAFDoc_DocumentTool::GetLengthUnit(theDoc, aUnit, + UnitsMethods_LengthUnit_Millimeter)) + { + return aUnit; + } + } + if (Interface_Static::IsPresent("xstep.cascade.unit")) + { + UnitsMethods::SetCasCadeLengthUnit(Interface_Static::IVal("xstep.cascade.unit")); + } + return UnitsMethods::GetCasCadeLengthUnit(); +} + +//======================================================================= +//function : WorkSessionList +//purpose : +//======================================================================= +XSControl_WorkSessionMap& XSDRAW::WorkSessionList() +{ + static std::shared_ptr THE_PREVIOUS_WORK_SESSIONS; + if (THE_PREVIOUS_WORK_SESSIONS == nullptr) + { + THE_PREVIOUS_WORK_SESSIONS = + std::make_shared(); + } + return *THE_PREVIOUS_WORK_SESSIONS; +} + +//======================================================================= +//function : CollectActiveWorkSessions +//purpose : +//======================================================================= +void XSDRAW::CollectActiveWorkSessions(const Handle(XSControl_WorkSession)& theWS, + const TCollection_AsciiString& theName, + XSControl_WorkSessionMap& theMap) +{ + collectActiveWorkSessions(theWS, theName, theMap, Standard_True); +} -// FONCTION POUR LE DEBUG +//======================================================================= +//function : CollectActiveWorkSessions +//purpose : +//======================================================================= +void XSDRAW::CollectActiveWorkSessions(const TCollection_AsciiString& theName) +{ + collectActiveWorkSessions(Session(), theName, WorkSessionList(), Standard_True); +} -Standard_Integer XSDRAW_WHAT (const Handle(Standard_Transient)& ent) +//======================================================================= +//function : Factory +//purpose : +//======================================================================= +void XSDRAW::Factory(Draw_Interpretor& theDI) { - if (ent.IsNull()) { std::cout<<"(Null Handle)"<DynamicType()->Name()<Print (ent, std::cout, 0); - std::cout<<" -- Recorded Type:"<TypeName (ent)<Number(ent); + XSDRAW::LoadDraw(theDI); } + +// Declare entry point PLUGINFACTORY +DPLUGIN(XSDRAW) diff --git a/src/XSDRAW/XSDRAW.hxx b/src/XSDRAW/XSDRAW.hxx index 70da6cbb7b..2a9a6da5a3 100644 --- a/src/XSDRAW/XSDRAW.hxx +++ b/src/XSDRAW/XSDRAW.hxx @@ -22,6 +22,7 @@ #include #include +#include #include class IFSelect_SessionPilot; class XSControl_WorkSession; @@ -33,6 +34,7 @@ class Transfer_TransientProcess; class Transfer_FinderProcess; class XSControl_TransferReader; class TCollection_AsciiString; +class TDocStd_Document; //! Basic package to work functions of X-STEP (IFSelect & Co) @@ -96,10 +98,14 @@ class XSDRAW //! Returns the SessionPilot (can be used for direct call) Standard_EXPORT static Handle(IFSelect_SessionPilot) Pilot(); + + //! Updates the WorkSession defined in AddDraw (through Pilot) + //! It is from XSControl, it brings functionalities for Transfers + Standard_EXPORT static void SetSession(const Handle(XSControl_WorkSession)& theSession); //! Returns the WorkSession defined in AddDraw (through Pilot) //! It is from XSControl, it brings functionalities for Transfers - Standard_EXPORT static Handle(XSControl_WorkSession) Session(); + Standard_EXPORT static const Handle(XSControl_WorkSession) Session(); //! Defines a Controller for the command "xinit" and applies it //! (i.e. calls its method Customise) @@ -202,6 +208,30 @@ class XSDRAW //! completed (Append without Clear) by the Shapes found //! Returns 0 if no Shape could be found Standard_EXPORT static Standard_Integer MoreShapes (Handle(TopTools_HSequenceOfShape)& list, const Standard_CString name); + + //! Extracts length unit from the static interface or document. + //! Document unit has the highest priority. + //! @return length unit in MM. 1.0 by default + Standard_EXPORT static Standard_Real GetLengthUnit(const Handle(TDocStd_Document)& theDoc = nullptr); + + //! Returns avaliable work sessions with their associated files. + Standard_EXPORT static XSControl_WorkSessionMap& WorkSessionList(); + + //! Binds session and name into map recursively. + //! Recursively means extract sub-sessions from main session. + //! @param[in] theWS the session object + //! @param[in] theName the session file name + //! @param[out] theMap collection to keep session info + Standard_EXPORT static void CollectActiveWorkSessions(const Handle(XSControl_WorkSession)& theWS, + const TCollection_AsciiString& theName, + XSControl_WorkSessionMap& theMap); + + //! Binds current session with input name. + //! @param[in] theName the session file name + Standard_EXPORT static void CollectActiveWorkSessions(const TCollection_AsciiString& theName); + + //! Loads all Draw commands of XSDRAW. Used for plugin. + Standard_EXPORT static void Factory(Draw_Interpretor& theDI); }; #endif // _XSDRAW_HeaderFile diff --git a/src/XSDRAWDE/FILES b/src/XSDRAWDE/FILES new file mode 100644 index 0000000000..9025c37bcb --- /dev/null +++ b/src/XSDRAWDE/FILES @@ -0,0 +1,2 @@ +XSDRAWDE.cxx +XSDRAWDE.hxx diff --git a/src/XSDRAWDE/XSDRAWDE.cxx b/src/XSDRAWDE/XSDRAWDE.cxx new file mode 100644 index 0000000000..b88b47f0fa --- /dev/null +++ b/src/XSDRAWDE/XSDRAWDE.cxx @@ -0,0 +1,427 @@ +// Copyright (c) 2023 OPEN CASCADE SAS +// +// This file is part of Open CASCADE Technology software library. +// +// This library is free software; you can redistribute it and/or modify it under +// the terms of the GNU Lesser General Public License version 2.1 as published +// by the Free Software Foundation, with special exception defined in the file +// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT +// distribution for complete text of the license and disclaimer of any warranty. +// +// Alternatively, this file may be used under the terms of Open CASCADE +// commercial license or contractual agreement. + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +//======================================================================= +//function : DumpConfiguration +//purpose : +//======================================================================= +static Standard_Integer DumpConfiguration(Draw_Interpretor& theDI, + Standard_Integer theNbArgs, + const char** theArgVec) +{ + Handle(DE_Wrapper) aConf = DE_Wrapper::GlobalWrapper(); + TCollection_AsciiString aPath; + Standard_Boolean aIsRecursive = Standard_True; + Standard_Boolean isHandleFormat = Standard_False; + Standard_Boolean isHandleVendors = Standard_False; + TColStd_ListOfAsciiString aFormats; + TColStd_ListOfAsciiString aVendors; + for (Standard_Integer anArgIter = 1; anArgIter < theNbArgs; ++anArgIter) + { + TCollection_AsciiString anArg(theArgVec[anArgIter]); + anArg.LowerCase(); + if ((anArg == "-path") && + (anArgIter + 1 < theNbArgs)) + { + ++anArgIter; + aPath = theArgVec[anArgIter]; + } + else if ((anArg == "-recursive") && + (anArgIter + 1 < theNbArgs) && + Draw::ParseOnOff(theArgVec[anArgIter + 1], aIsRecursive)) + { + ++anArgIter; + } + else if (anArg == "-format") + { + isHandleFormat = Standard_True; + isHandleVendors = Standard_False; + } + else if (anArg == "-vendor") + { + isHandleFormat = Standard_False; + isHandleVendors = Standard_True; + } + else if (isHandleFormat) + { + aFormats.Append(theArgVec[anArgIter]); + } + else if (isHandleVendors) + { + aVendors.Append(theArgVec[anArgIter]); + } + else if (!isHandleFormat && !isHandleVendors) + { + theDI << "Syntax error at argument '" << theArgVec[anArgIter] << "'\n"; + return 1; + } + } + Standard_Boolean aStat = Standard_True; + if (!aPath.IsEmpty()) + { + aStat = aConf->Save(aPath, aIsRecursive, aFormats, aVendors); + } + else + { + theDI << aConf->Save(aIsRecursive, aFormats, aVendors) << "\n"; + } + if (!aStat) + { + return 1; + } + return 0; +} + +//======================================================================= +//function : CompareConfiguration +//purpose : +//======================================================================= +static Standard_Integer CompareConfiguration(Draw_Interpretor& theDI, + Standard_Integer theNbArgs, + const char** theArgVec) +{ + if (theNbArgs > 5) + { + theDI.PrintHelp(theArgVec[0]); + return 1; + } + Handle(DE_ConfigurationContext) aResourceFirst = new DE_ConfigurationContext(); + if (!aResourceFirst->Load(theArgVec[1])) + { + theDI << "Error: Can't load first configuration\n"; + return 1; + } + Handle(DE_ConfigurationContext) aResourceSecond = new DE_ConfigurationContext(); + if (!aResourceSecond->Load(theArgVec[2])) + { + theDI << "Error: Can't load second configuration\n"; + return 1; + } + const DE_ResourceMap& aResourceMapFirst = aResourceFirst->GetInternalMap(); + const DE_ResourceMap& aResourceMapSecond = aResourceSecond->GetInternalMap(); + Standard_Integer anDiffers = 0; + for (DE_ResourceMap::Iterator anOrigIt(aResourceMapFirst); + anOrigIt.More(); anOrigIt.Next()) + { + const TCollection_AsciiString& anOrigValue = anOrigIt.Value(); + const TCollection_AsciiString& anOrigKey = anOrigIt.Key(); + TCollection_AsciiString aCompValue; + if (!aResourceMapSecond.Find(anOrigKey, aCompValue)) + { + Message::SendWarning() << "Second configuration don't have the next scope : " << anOrigKey; + anDiffers++; + } + if (!aCompValue.IsEqual(anOrigValue)) + { + Message::SendWarning() << "Configurations have differs value with the next scope :" << anOrigKey + << " First value : " << anOrigValue << " Second value : " << aCompValue; + anDiffers++; + } + } + TCollection_AsciiString aMessage; + if (aResourceMapFirst.Extent() != aResourceMapSecond.Extent() || anDiffers > 0) + { + theDI << "Error: Configurations are not same : " << " Differs count : " + << anDiffers << " Count of first's scopes : " << aResourceMapFirst.Extent() + << " Count of second's scopes : " << aResourceMapSecond.Extent() << "\n"; + return 1; + } + return 0; +} + +//======================================================================= +//function : LoadConfiguration +//purpose : +//======================================================================= +static Standard_Integer LoadConfiguration(Draw_Interpretor& theDI, + Standard_Integer theNbArgs, + const char** theArgVec) +{ + if (theNbArgs > 4) + { + theDI.PrintHelp(theArgVec[0]); + return 1; + } + Handle(DE_Wrapper) aConf = DE_Wrapper::GlobalWrapper(); + TCollection_AsciiString aString = theArgVec[1]; + Standard_Boolean aIsRecursive = Standard_True; + if (theNbArgs == 4) + { + TCollection_AsciiString anArg = theArgVec[2]; + anArg.LowerCase(); + if (!(anArg == "-recursive") || + !Draw::ParseOnOff(theArgVec[3], aIsRecursive)) + { + theDI << "Syntax error at argument '" << theArgVec[3] << "'\n"; + return 1; + } + } + if (!aConf->Load(aString, aIsRecursive)) + { + theDI << "Error: configuration is incorrect\n"; + return 1; + } + return 0; +} + +//======================================================================= +//function : ReadFile +//purpose : +//======================================================================= +static Standard_Integer ReadFile(Draw_Interpretor& theDI, + Standard_Integer theNbArgs, + const char** theArgVec) +{ + if (theNbArgs > 6) + { + theDI.PrintHelp(theArgVec[0]); + return 1; + } + TCollection_AsciiString aDocShapeName; + TCollection_AsciiString aFilePath; + Handle(TDocStd_Document) aDoc; + Handle(TDocStd_Application) anApp = DDocStd::GetApplication(); + TCollection_AsciiString aConfString; + Standard_Boolean isNoDoc = (TCollection_AsciiString(theArgVec[0]) == "readfile"); + for (Standard_Integer anArgIter = 1; anArgIter < theNbArgs; ++anArgIter) + { + TCollection_AsciiString anArg(theArgVec[anArgIter]); + anArg.LowerCase(); + if ((anArg == "-conf") && + (anArgIter + 1 < theNbArgs)) + { + ++anArgIter; + aConfString = theArgVec[anArgIter]; + } + else if (aDocShapeName.IsEmpty()) + { + aDocShapeName = theArgVec[anArgIter]; + Standard_CString aNameVar = aDocShapeName.ToCString(); + if (!isNoDoc) + { + DDocStd::GetDocument(aNameVar, aDoc, Standard_False); + } + } + else if (aFilePath.IsEmpty()) + { + aFilePath = theArgVec[anArgIter]; + } + else + { + theDI << "Syntax error at argument '" << theArgVec[anArgIter] << "'\n"; + return 1; + } + } + if (aDocShapeName.IsEmpty() || aFilePath.IsEmpty()) + { + theDI << "Syntax error: wrong number of arguments\n"; + return 1; + } + if (aDoc.IsNull() && !isNoDoc) + { + anApp->NewDocument(TCollection_ExtendedString("BinXCAF"), aDoc); + Handle(DDocStd_DrawDocument) aDrawDoc = new DDocStd_DrawDocument(aDoc); + TDataStd_Name::Set(aDoc->GetData()->Root(), theArgVec[1]); + Draw::Set(theArgVec[1], aDrawDoc); + } + + Handle(DE_Wrapper) aConf = DE_Wrapper::GlobalWrapper()->Copy(); + Standard_Boolean aStat = Standard_True; + if (!aConfString.IsEmpty()) + { + aStat = aConf->Load(aConfString); + } + if (aStat) + { + TopoDS_Shape aShape; + aStat = isNoDoc ? aConf->Read(aFilePath, aShape) : aConf->Read(aFilePath, aDoc); + if (isNoDoc && aStat) + { + DBRep::Set(aDocShapeName.ToCString(), aShape); + } + } + if (!aStat) + { + return 1; + } + return 0; +} + +//======================================================================= +//function : WriteFile +//purpose : +//======================================================================= +static Standard_Integer WriteFile(Draw_Interpretor& theDI, + Standard_Integer theNbArgs, + const char** theArgVec) +{ + if (theNbArgs > 6) + { + theDI.PrintHelp(theArgVec[0]); + return 1; + } + TCollection_AsciiString aDocShapeName; + TCollection_AsciiString aFilePath; + Handle(TDocStd_Document) aDoc; + TCollection_AsciiString aConfString; + Standard_Boolean isNoDoc = (TCollection_AsciiString(theArgVec[0]) == "writefile"); + for (Standard_Integer anArgIter = 1; anArgIter < theNbArgs; ++anArgIter) + { + TCollection_AsciiString anArg(theArgVec[anArgIter]); + anArg.LowerCase(); + if ((anArg == "-conf") && + (anArgIter + 1 < theNbArgs)) + { + ++anArgIter; + aConfString = theArgVec[anArgIter]; + } + else if (aDocShapeName.IsEmpty()) + { + aDocShapeName = theArgVec[anArgIter]; + Standard_CString aNameVar = aDocShapeName.ToCString(); + if (!isNoDoc) + { + DDocStd::GetDocument(aNameVar, aDoc, Standard_False); + } + } + else if (aFilePath.IsEmpty()) + { + aFilePath = theArgVec[anArgIter]; + } + else + { + theDI << "Syntax error at argument '" << theArgVec[anArgIter] << "'\n"; + return 1; + } + } + if (aDocShapeName.IsEmpty() || aFilePath.IsEmpty()) + { + theDI << "Syntax error: wrong number of arguments\n"; + return 1; + } + if (aDoc.IsNull() && !isNoDoc) + { + theDI << "Error: incorrect document\n"; + return 1; + } + Handle(DE_Wrapper) aConf = DE_Wrapper::GlobalWrapper()->Copy(); + Standard_Boolean aStat = Standard_True; + if (!aConfString.IsEmpty()) + { + aStat = aConf->Load(aConfString); + } + if (aStat) + { + if (isNoDoc) + { + TopoDS_Shape aShape = DBRep::Get(aDocShapeName); + if (aShape.IsNull()) + { + theDI << "Error: incorrect shape " << aDocShapeName << "\n"; + return 1; + } + aStat = aConf->Write(aFilePath, aShape); + } + else + { + aStat = aConf->Write(aFilePath, aDoc); + } + } + if (!aStat) + { + return 1; + } + return 0; +} + +//======================================================================= +//function : Factory +//purpose : +//======================================================================= +void XSDRAWDE::Factory(Draw_Interpretor& theDI) +{ + static Standard_Boolean aIsActivated = Standard_False; + if (aIsActivated) + { + return; + } + aIsActivated = Standard_True; + + Standard_CString aGroup = "XDE translation commands"; + theDI.Add("DumpConfiguration", + "DumpConfiguration [-path ] [-recursive {on|off}] [-format fmt1 fmt2 ...] [-vendor vend1 vend2 ...]\n" + "\n\t\t: Dump special resource generated from global configuration." + "\n\t\t: '-path' - save resource configuration to the file" + "\n\t\t: '-recursive' - flag to generate a resource from providers. Default is On. Off disables other options" + "\n\t\t: '-format' - flag to generate a resource for choosen formats. If list is empty, generate it for all" + "\n\t\t: '-vendor' - flag to generate a resource for choosen vendors. If list is empty, generate it for all", + __FILE__, DumpConfiguration, aGroup); + theDI.Add("LoadConfiguration", + "LoadConfiguration conf [-recursive {on|off}]\n" + "\n\t\t: 'conf' - path to the resouce file or string value in the special format" + "\n\t\t: '-recursive' - flag to generate a resource for all providers. Default is true" + "\n\t\t: Configure global configuration according special resource", + __FILE__, LoadConfiguration, aGroup); + theDI.Add("CompareConfiguration", + "CompareConfiguration conf1 conf2\n" + "\n\t\t: 'conf1' - path to the first resouce file or string value in the special format" + "\n\t\t: 'conf2' - path to the second resouce file or string value in the special format" + "\n\t\t: Compare two configurations", + __FILE__, CompareConfiguration, aGroup); + theDI.Add("ReadFile", + "ReadFile docName filePath [-conf ]\n" + "\n\t\t: Read CAD file to document with registered format's providers. Use global configuration by default.", + __FILE__, ReadFile, aGroup); + theDI.Add("readfile", + "readfile shapeName filePath [-conf ]\n" + "\n\t\t: Read CAD file to shape with registered format's providers. Use global configuration by default.", + __FILE__, ReadFile, aGroup); + theDI.Add("WriteFile", + "WriteFile docName filePath [-conf ]\n" + "\n\t\t: Write CAD file to document with registered format's providers. Use global configuration by default.", + __FILE__, WriteFile, aGroup); + theDI.Add("writefile", + "writefile shapeName filePath [-conf ]\n" + "\n\t\t: Write CAD file to shape with registered format's providers. Use global configuration by default.", + __FILE__, WriteFile, aGroup); + + // Load XSDRAW session for pilot activation + XSDRAW::LoadDraw(theDI); + + // Workaround to force load TKDECascade lib + DEBRepCascade_ConfigurationNode aTmpObj; + (void)aTmpObj; +} + +// Declare entry point PLUGINFACTORY +DPLUGIN(XSDRAWDE) diff --git a/src/XSDRAWSTLVRML/XSDRAWSTLVRML_DataMapIteratorOfCoordsMap.hxx b/src/XSDRAWDE/XSDRAWDE.hxx similarity index 60% rename from src/XSDRAWSTLVRML/XSDRAWSTLVRML_DataMapIteratorOfCoordsMap.hxx rename to src/XSDRAWDE/XSDRAWDE.hxx index 7637bfd853..d3c393ff77 100644 --- a/src/XSDRAWSTLVRML/XSDRAWSTLVRML_DataMapIteratorOfCoordsMap.hxx +++ b/src/XSDRAWDE/XSDRAWDE.hxx @@ -1,4 +1,4 @@ -// Copyright (c) 2015 OPEN CASCADE SAS +// Copyright (c) 2023 OPEN CASCADE SAS // // This file is part of Open CASCADE Technology software library. // @@ -11,10 +11,21 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. +#ifndef _XSDRAWDE_HeaderFile +#define _XSDRAWDE_HeaderFile -#ifndef XSDRAWSTLVRML_DataMapIteratorOfCoordsMap_HeaderFile -#define XSDRAWSTLVRML_DataMapIteratorOfCoordsMap_HeaderFile +#include +#include -#include +#include -#endif +class XSDRAWDE +{ + DEFINE_STANDARD_ALLOC +public: + + //! Loads all Draw commands of XSDRAWDE. Used for plugin. + Standard_EXPORT static void Factory(Draw_Interpretor& theDI); +}; + +#endif // _XSDRAWDE_HeaderFile diff --git a/src/XSDRAWGLTF/FILES b/src/XSDRAWGLTF/FILES new file mode 100644 index 0000000000..28bb8b0397 --- /dev/null +++ b/src/XSDRAWGLTF/FILES @@ -0,0 +1,2 @@ +XSDRAWGLTF.cxx +XSDRAWGLTF.hxx diff --git a/src/XSDRAWGLTF/XSDRAWGLTF.cxx b/src/XSDRAWGLTF/XSDRAWGLTF.cxx new file mode 100644 index 0000000000..6c7f9cc12f --- /dev/null +++ b/src/XSDRAWGLTF/XSDRAWGLTF.cxx @@ -0,0 +1,602 @@ +// Copyright (c) 2023 OPEN CASCADE SAS +// +// This file is part of Open CASCADE Technology software library. +// +// This library is free software; you can redistribute it and/or modify it under +// the terms of the GNU Lesser General Public License version 2.1 as published +// by the Free Software Foundation, with special exception defined in the file +// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT +// distribution for complete text of the license and disclaimer of any warranty. +// +// Alternatively, this file may be used under the terms of Open CASCADE +// commercial license or contractual agreement. + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +//============================================================================= +//function : parseNameFormat +//purpose : Parse RWMesh_NameFormat enumeration +//============================================================================= +static bool parseNameFormat(const char* theArg, + RWMesh_NameFormat& theFormat) +{ + TCollection_AsciiString aName(theArg); + aName.LowerCase(); + if (aName == "empty") + { + theFormat = RWMesh_NameFormat_Empty; + } + else if (aName == "product" + || aName == "prod") + { + theFormat = RWMesh_NameFormat_Product; + } + else if (aName == "instance" + || aName == "inst") + { + theFormat = RWMesh_NameFormat_Instance; + } + else if (aName == "instanceorproduct" + || aName == "instance||product" + || aName == "instance|product" + || aName == "instorprod" + || aName == "inst||prod" + || aName == "inst|prod") + { + theFormat = RWMesh_NameFormat_InstanceOrProduct; + } + else if (aName == "productorinstance" + || aName == "product||instance" + || aName == "product|instance" + || aName == "prodorinst" + || aName == "prod||inst" + || aName == "prod|inst") + { + theFormat = RWMesh_NameFormat_ProductOrInstance; + } + else if (aName == "productandinstance" + || aName == "prodandinst" + || aName == "product&instance" + || aName == "prod&inst") + { + theFormat = RWMesh_NameFormat_ProductAndInstance; + } + else if (aName == "productandinstanceandocaf" + || aName == "verbose" + || aName == "debug") + { + theFormat = RWMesh_NameFormat_ProductAndInstanceAndOcaf; + } + else + { + return false; + } + return true; +} + +//============================================================================= +//function : parseCoordinateSystem +//purpose : Parse RWMesh_CoordinateSystem enumeration +//============================================================================= +static bool parseCoordinateSystem(const char* theArg, + RWMesh_CoordinateSystem& theSystem) +{ + TCollection_AsciiString aCSStr(theArg); + aCSStr.LowerCase(); + if (aCSStr == "zup") + { + theSystem = RWMesh_CoordinateSystem_Zup; + } + else if (aCSStr == "yup") + { + theSystem = RWMesh_CoordinateSystem_Yup; + } + else + { + return Standard_False; + } + return Standard_True; +} + +//============================================================================= +//function : ReadGltf +//purpose : Reads glTF file +//============================================================================= +static Standard_Integer ReadGltf(Draw_Interpretor& theDI, + Standard_Integer theNbArgs, + const char** theArgVec) +{ + TCollection_AsciiString aDestName, aFilePath; + Standard_Boolean toUseExistingDoc = Standard_False; + Standard_Boolean toListExternalFiles = Standard_False; + Standard_Boolean isParallel = Standard_False; + Standard_Boolean isDoublePrec = Standard_False; + Standard_Boolean toSkipLateDataLoading = Standard_False; + Standard_Boolean toKeepLateData = Standard_True; + Standard_Boolean toPrintDebugInfo = Standard_False; + Standard_Boolean toLoadAllScenes = Standard_False; + Standard_Boolean toPrintAssetInfo = Standard_False; + Standard_Boolean isNoDoc = (TCollection_AsciiString(theArgVec[0]) == "readgltf"); + for (Standard_Integer anArgIter = 1; anArgIter < theNbArgs; ++anArgIter) + { + TCollection_AsciiString anArgCase(theArgVec[anArgIter]); + anArgCase.LowerCase(); + if (!isNoDoc + && (anArgCase == "-nocreate" + || anArgCase == "-nocreatedoc")) + { + toUseExistingDoc = Draw::ParseOnOffIterator(theNbArgs, theArgVec, anArgIter); + } + else if (anArgCase == "-parallel") + { + isParallel = Draw::ParseOnOffIterator(theNbArgs, theArgVec, anArgIter); + } + else if (anArgCase == "-doubleprec" + || anArgCase == "-doubleprecision" + || anArgCase == "-singleprec" + || anArgCase == "-singleprecision") + { + isDoublePrec = Draw::ParseOnOffIterator(theNbArgs, theArgVec, anArgIter); + if (anArgCase.StartsWith("-single")) + { + isDoublePrec = !isDoublePrec; + } + } + else if (anArgCase == "-skiplateloading") + { + toSkipLateDataLoading = Draw::ParseOnOffIterator(theNbArgs, theArgVec, anArgIter); + } + else if (anArgCase == "-keeplate") + { + toKeepLateData = Draw::ParseOnOffIterator(theNbArgs, theArgVec, anArgIter); + } + else if (anArgCase == "-allscenes") + { + toLoadAllScenes = Draw::ParseOnOffIterator(theNbArgs, theArgVec, anArgIter); + } + else if (anArgCase == "-toprintinfo" + || anArgCase == "-toprintdebuginfo") + { + toPrintDebugInfo = Draw::ParseOnOffIterator(theNbArgs, theArgVec, anArgIter); + } + else if (anArgCase == "-listexternalfiles" + || anArgCase == "-listexternals" + || anArgCase == "-listexternal" + || anArgCase == "-external" + || anArgCase == "-externalfiles") + { + toListExternalFiles = Draw::ParseOnOffIterator(theNbArgs, theArgVec, anArgIter); + } + else if (anArgCase == "-assetinfo" + || anArgCase == "-metadata") + { + toPrintAssetInfo = Draw::ParseOnOffIterator(theNbArgs, theArgVec, anArgIter); + } + else if (aDestName.IsEmpty()) + { + aDestName = theArgVec[anArgIter]; + } + else if (aFilePath.IsEmpty()) + { + aFilePath = theArgVec[anArgIter]; + } + else + { + Message::SendFail() << "Syntax error at '" << theArgVec[anArgIter] << "'"; + return 1; + } + } + if (aFilePath.IsEmpty() && !aDestName.IsEmpty()) + { + if (toListExternalFiles || toPrintAssetInfo) + { + std::swap(aFilePath, aDestName); + } + } + if (aFilePath.IsEmpty()) + { + Message::SendFail() << "Syntax error: wrong number of arguments"; + return 1; + } + + Handle(Draw_ProgressIndicator) aProgress = new Draw_ProgressIndicator(theDI, 1); + Handle(TDocStd_Document) aDoc; + if (!aDestName.IsEmpty() + && !isNoDoc) + { + Handle(TDocStd_Application) anApp = DDocStd::GetApplication(); + Standard_CString aNameVar = aDestName.ToCString(); + DDocStd::GetDocument(aNameVar, aDoc, Standard_False); + if (aDoc.IsNull()) + { + if (toUseExistingDoc) + { + Message::SendFail() << "Error: document with name " << aDestName << " does not exist"; + return 1; + } + anApp->NewDocument(TCollection_ExtendedString("BinXCAF"), aDoc); + } + else if (!toUseExistingDoc) + { + Message::SendFail() << "Error: document with name " << aDestName << " already exists"; + return 1; + } + } + + const Standard_Real aScaleFactorM = XSDRAW::GetLengthUnit(aDoc) / 1000; + + RWGltf_CafReader aReader; + aReader.SetSystemLengthUnit(aScaleFactorM); + aReader.SetSystemCoordinateSystem(RWMesh_CoordinateSystem_Zup); + aReader.SetDocument(aDoc); + aReader.SetParallel(isParallel); + aReader.SetDoublePrecision(isDoublePrec); + aReader.SetToSkipLateDataLoading(toSkipLateDataLoading); + aReader.SetToKeepLateData(toKeepLateData); + aReader.SetToPrintDebugMessages(toPrintDebugInfo); + aReader.SetLoadAllScenes(toLoadAllScenes); + if (aDestName.IsEmpty()) + { + aReader.ProbeHeader(aFilePath); + } + else + { + aReader.Perform(aFilePath, aProgress->Start()); + if (isNoDoc) + { + DBRep::Set(aDestName.ToCString(), aReader.SingleShape()); + } + else + { + Handle(DDocStd_DrawDocument) aDrawDoc = new DDocStd_DrawDocument(aDoc); + TDataStd_Name::Set(aDoc->GetData()->Root(), aDestName); + Draw::Set(aDestName.ToCString(), aDrawDoc); + } + } + + bool isFirstLine = true; + if (toPrintAssetInfo) + { + for (TColStd_IndexedDataMapOfStringString::Iterator aKeyIter(aReader.Metadata()); aKeyIter.More(); aKeyIter.Next()) + { + if (!isFirstLine) + { + theDI << "\n"; + } + isFirstLine = false; + theDI << aKeyIter.Key() << ": " << aKeyIter.Value(); + } + } + if (toListExternalFiles) + { + if (!isFirstLine) + { + theDI << "\n"; + } + for (NCollection_IndexedMap::Iterator aFileIter(aReader.ExternalFiles()); aFileIter.More(); aFileIter.Next()) + { + theDI << "\"" << aFileIter.Value() << "\" "; + } + } + return 0; +} + +//============================================================================= +//function : WriteGltf +//purpose : Writes glTF file +//============================================================================= +static Standard_Integer WriteGltf(Draw_Interpretor& theDI, + Standard_Integer theNbArgs, + const char** theArgVec) +{ + TCollection_AsciiString aGltfFilePath; + Handle(TDocStd_Document) aDoc; + Handle(TDocStd_Application) anApp = DDocStd::GetApplication(); + TColStd_IndexedDataMapOfStringString aFileInfo; + RWGltf_WriterTrsfFormat aTrsfFormat = RWGltf_WriterTrsfFormat_Compact; + RWMesh_CoordinateSystem aSystemCoordSys = RWMesh_CoordinateSystem_Zup; + bool toForceUVExport = false, toEmbedTexturesInGlb = true; + bool toMergeFaces = false, toSplitIndices16 = false; + bool isParallel = false; + RWMesh_NameFormat aNodeNameFormat = RWMesh_NameFormat_InstanceOrProduct; + RWMesh_NameFormat aMeshNameFormat = RWMesh_NameFormat_Product; + RWGltf_DracoParameters aDracoParameters; + for (Standard_Integer anArgIter = 1; anArgIter < theNbArgs; ++anArgIter) + { + TCollection_AsciiString anArgCase(theArgVec[anArgIter]); + anArgCase.LowerCase(); + if (anArgCase == "-comments" + && anArgIter + 1 < theNbArgs) + { + aFileInfo.Add("Comments", theArgVec[++anArgIter]); + } + else if (anArgCase == "-author" + && anArgIter + 1 < theNbArgs) + { + aFileInfo.Add("Author", theArgVec[++anArgIter]); + } + else if (anArgCase == "-forceuvexport" + || anArgCase == "-forceuv") + { + toForceUVExport = true; + if (anArgIter + 1 < theNbArgs + && Draw::ParseOnOff(theArgVec[anArgIter + 1], toForceUVExport)) + { + ++anArgIter; + } + } + else if (anArgCase == "-mergefaces") + { + toMergeFaces = true; + if (anArgIter + 1 < theNbArgs + && Draw::ParseOnOff(theArgVec[anArgIter + 1], toMergeFaces)) + { + ++anArgIter; + } + } + else if (anArgCase == "-splitindices16" + || anArgCase == "-splitindexes16" + || anArgCase == "-splitindices" + || anArgCase == "-splitindexes" + || anArgCase == "-splitind") + { + toSplitIndices16 = true; + if (anArgIter + 1 < theNbArgs + && Draw::ParseOnOff(theArgVec[anArgIter + 1], toSplitIndices16)) + { + ++anArgIter; + } + } + else if (anArgIter + 1 < theNbArgs + && (anArgCase == "-systemcoordinatesystem" + || anArgCase == "-systemcoordsystem" + || anArgCase == "-systemcoordsys" + || anArgCase == "-syscoordsys")) + { + if (!parseCoordinateSystem(theArgVec[++anArgIter], aSystemCoordSys)) + { + Message::SendFail() << "Syntax error: unknown coordinate system '" << theArgVec[anArgIter] << "'"; + return 1; + } + } + else if (anArgCase == "-trsfformat" + && anArgIter + 1 < theNbArgs) + { + TCollection_AsciiString aTrsfStr(theArgVec[++anArgIter]); + aTrsfStr.LowerCase(); + if (aTrsfStr == "compact") + { + aTrsfFormat = RWGltf_WriterTrsfFormat_Compact; + } + else if (aTrsfStr == "mat4") + { + aTrsfFormat = RWGltf_WriterTrsfFormat_Mat4; + } + else if (aTrsfStr == "trs") + { + aTrsfFormat = RWGltf_WriterTrsfFormat_TRS; + } + else + { + Message::SendFail() << "Syntax error at '" << anArgCase << "'"; + return 1; + } + } + else if (anArgCase == "-nodenameformat" + || anArgCase == "-nodename") + { + ++anArgIter; + if (anArgIter >= theNbArgs + || !parseNameFormat(theArgVec[anArgIter], aNodeNameFormat)) + { + Message::SendFail() << "Syntax error at '" << anArgCase << "'"; + return 1; + } + } + else if (anArgCase == "-meshnameformat" + || anArgCase == "-meshname") + { + ++anArgIter; + if (anArgIter >= theNbArgs + || !parseNameFormat(theArgVec[anArgIter], aMeshNameFormat)) + { + Message::SendFail() << "Syntax error at '" << anArgCase << "'"; + return 1; + } + } + else if (aDoc.IsNull()) + { + Standard_CString aNameVar = theArgVec[anArgIter]; + DDocStd::GetDocument(aNameVar, aDoc, false); + if (aDoc.IsNull()) + { + TopoDS_Shape aShape = DBRep::Get(aNameVar); + if (aShape.IsNull()) + { + Message::SendFail() << "Syntax error: '" << aNameVar << "' is not a shape nor document"; + return 1; + } + + anApp->NewDocument(TCollection_ExtendedString("BinXCAF"), aDoc); + Handle(XCAFDoc_ShapeTool) aShapeTool = XCAFDoc_DocumentTool::ShapeTool(aDoc->Main()); + // auto-naming doesn't generate meaningful instance names + //aShapeTool->SetAutoNaming (false); + aNodeNameFormat = RWMesh_NameFormat_Product; + aShapeTool->AddShape(aShape); + } + } + else if (aGltfFilePath.IsEmpty()) + { + aGltfFilePath = theArgVec[anArgIter]; + } + else if (anArgCase == "-texturesSeparate") + { + toEmbedTexturesInGlb = false; + } + else if (anArgCase == "-draco") + { + aDracoParameters.DracoCompression = Draw::ParseOnOffIterator(theNbArgs, theArgVec, anArgIter); + } + else if (anArgCase == "-compressionlevel" && (anArgIter + 1) < theNbArgs + && Draw::ParseInteger(theArgVec[anArgIter + 1], aDracoParameters.CompressionLevel)) + { + ++anArgIter; + } + else if (anArgCase == "-quantizepositionbits" && (anArgIter + 1) < theNbArgs + && Draw::ParseInteger(theArgVec[anArgIter + 1], aDracoParameters.QuantizePositionBits)) + { + ++anArgIter; + } + else if (anArgCase == "-quantizenormalbits" && (anArgIter + 1) < theNbArgs + && Draw::ParseInteger(theArgVec[anArgIter + 1], aDracoParameters.QuantizeNormalBits)) + { + ++anArgIter; + } + else if (anArgCase == "-quantizetexcoordbits" && (anArgIter + 1) < theNbArgs + && Draw::ParseInteger(theArgVec[anArgIter + 1], aDracoParameters.QuantizeTexcoordBits)) + { + ++anArgIter; + } + else if (anArgCase == "-quantizecolorbits" && (anArgIter + 1) < theNbArgs + && Draw::ParseInteger(theArgVec[anArgIter + 1], aDracoParameters.QuantizeColorBits)) + { + ++anArgIter; + } + else if (anArgCase == "-quantizegenericbits" && (anArgIter + 1) < theNbArgs + && Draw::ParseInteger(theArgVec[anArgIter + 1], aDracoParameters.QuantizeGenericBits)) + { + ++anArgIter; + } + else if (anArgCase == "-unifiedquantization") + { + aDracoParameters.UnifiedQuantization = Draw::ParseOnOffIterator(theNbArgs, theArgVec, anArgIter); + } + else if (anArgCase == "-parallel") + { + isParallel = Draw::ParseOnOffIterator(theNbArgs, theArgVec, anArgIter); + } + else + { + Message::SendFail() << "Syntax error at '" << theArgVec[anArgIter] << "'"; + return 1; + } + } + if (aGltfFilePath.IsEmpty()) + { + Message::SendFail() << "Syntax error: wrong number of arguments"; + return 1; + } + + Handle(Draw_ProgressIndicator) aProgress = new Draw_ProgressIndicator(theDI, 1); + + TCollection_AsciiString anExt = aGltfFilePath; + anExt.LowerCase(); + + const Standard_Real aScaleFactorM = XSDRAW::GetLengthUnit(aDoc) / 1000; + + RWGltf_CafWriter aWriter(aGltfFilePath, anExt.EndsWith(".glb")); + aWriter.SetTransformationFormat(aTrsfFormat); + aWriter.SetNodeNameFormat(aNodeNameFormat); + aWriter.SetMeshNameFormat(aMeshNameFormat); + aWriter.SetForcedUVExport(toForceUVExport); + aWriter.SetToEmbedTexturesInGlb(toEmbedTexturesInGlb); + aWriter.SetMergeFaces(toMergeFaces); + aWriter.SetSplitIndices16(toSplitIndices16); + aWriter.SetParallel(isParallel); + aWriter.SetCompressionParameters(aDracoParameters); + aWriter.ChangeCoordinateSystemConverter().SetInputLengthUnit(aScaleFactorM); + aWriter.ChangeCoordinateSystemConverter().SetInputCoordinateSystem(aSystemCoordSys); + aWriter.Perform(aDoc, aFileInfo, aProgress->Start()); + return 0; +} + +//======================================================================= +//function : Factory +//purpose : +//======================================================================= +void XSDRAWGLTF::Factory(Draw_Interpretor& theDI) +{ + static Standard_Boolean aIsActivated = Standard_False; + if (aIsActivated) + { + return; + } + aIsActivated = Standard_True; + + const char* aGroup = "XSTEP-STL/VRML"; // Step transfer file commands + theDI.Add("ReadGltf", + "ReadGltf Doc file [-parallel {on|off}] [-listExternalFiles] [-noCreateDoc] [-doublePrecision {on|off}] [-assetInfo]" + "\n\t\t: Read glTF file into XDE document." + "\n\t\t: -listExternalFiles do not read mesh and only list external files" + "\n\t\t: -noCreateDoc read into existing XDE document" + "\n\t\t: -doublePrecision store triangulation with double or single floating point" + "\n\t\t: precision (single by default)" + "\n\t\t: -skipLateLoading data loading is skipped and can be performed later" + "\n\t\t: (false by default)" + "\n\t\t: -keepLate data is loaded into itself with preservation of information" + "\n\t\t: about deferred storage to load/unload this data later." + "\n\t\t: -allScenes load all scenes defined in the document instead of default one (false by default)" + "\n\t\t: -toPrintDebugInfo print additional debug information during data reading" + "\n\t\t: -assetInfo print asset information", + __FILE__, ReadGltf, aGroup); + theDI.Add("readgltf", + "readgltf shape file" + "\n\t\t: Same as ReadGltf but reads glTF file into a shape instead of a document.", + __FILE__, ReadGltf, aGroup); + theDI.Add("WriteGltf", + "WriteGltf Doc file [-trsfFormat {compact|TRS|mat4}]=compact" + "\n\t\t: [-systemCoordSys {Zup|Yup}]=Zup" + "\n\t\t: [-comments Text] [-author Name]" + "\n\t\t: [-forceUVExport]=0 [-texturesSeparate]=0 [-mergeFaces]=0 [-splitIndices16]=0" + "\n\t\t: [-nodeNameFormat {empty|product|instance|instOrProd|prodOrInst|prodAndInst|verbose}]=instOrProd" + "\n\t\t: [-meshNameFormat {empty|product|instance|instOrProd|prodOrInst|prodAndInst|verbose}]=product" + "\n\t\t: [-draco]=0 [-compressionLevel {0-10}]=7 [-quantizePositionBits Value]=14 [-quantizeNormalBits Value]=10" + "\n\t\t: [-quantizeTexcoordBits Value]=12 [-quantizeColorBits Value]=8 [-quantizeGenericBits Value]=12" + "\n\t\t: [-unifiedQuantization]=0 [-parallel]=0" + "\n\t\t: Write XDE document into glTF file." + "\n\t\t: -trsfFormat preferred transformation format" + "\n\t\t: -systemCoordSys system coordinate system; Zup when not specified" + "\n\t\t: -mergeFaces merge Faces within the same Mesh" + "\n\t\t: -splitIndices16 split Faces to keep 16-bit indices when -mergeFaces is enabled" + "\n\t\t: -forceUVExport always export UV coordinates" + "\n\t\t: -texturesSeparate write textures to separate files" + "\n\t\t: -nodeNameFormat name format for Nodes" + "\n\t\t: -meshNameFormat name format for Meshes" + "\n\t\t: -draco use Draco compression 3D geometric meshes" + "\n\t\t: -compressionLevel draco compression level [0-10] (by default 7), a value of 0 will apply sequential encoding and preserve face order" + "\n\t\t: -quantizePositionBits quantization bits for position attribute when using Draco compression (by default 14)" + "\n\t\t: -quantizeNormalBits quantization bits for normal attribute when using Draco compression (by default 10)" + "\n\t\t: -quantizeTexcoordBits quantization bits for texture coordinate attribute when using Draco compression (by default 12)" + "\n\t\t: -quantizeColorBits quantization bits for color attribute when using Draco compression (by default 8)" + "\n\t\t: -quantizeGenericBits quantization bits for skinning attribute (joint indices and joint weights)" + "\n and custom attributes when using Draco compression (by default 12)" + "\n\t\t: -unifiedQuantization quantization is applied on each primitive separately if this option is false" + "\n\t\t: -parallel use multithreading for Draco compression", + __FILE__, WriteGltf, aGroup); + theDI.Add("writegltf", + "writegltf shape file", + __FILE__, WriteGltf, aGroup); + + // Load XSDRAW session for pilot activation + XSDRAW::LoadDraw(theDI); +} + +// Declare entry point PLUGINFACTORY +DPLUGIN(XSDRAWGLTF) diff --git a/src/XSDRAWSTLVRML/XSDRAWSTLVRML.hxx b/src/XSDRAWGLTF/XSDRAWGLTF.hxx similarity index 58% rename from src/XSDRAWSTLVRML/XSDRAWSTLVRML.hxx rename to src/XSDRAWGLTF/XSDRAWGLTF.hxx index f7fd4dd7cd..092c3add23 100644 --- a/src/XSDRAWSTLVRML/XSDRAWSTLVRML.hxx +++ b/src/XSDRAWGLTF/XSDRAWGLTF.hxx @@ -1,6 +1,4 @@ -// Created on: 2000-05-30 -// Created by: Sergey MOZOKHIN -// Copyright (c) 2000-2014 OPEN CASCADE SAS +// Copyright (c) 2023 OPEN CASCADE SAS // // This file is part of Open CASCADE Technology software library. // @@ -13,29 +11,21 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -#ifndef _XSDRAWSTLVRML_HeaderFile -#define _XSDRAWSTLVRML_HeaderFile +#ifndef _XSDRAWGLTF_HeaderFile +#define _XSDRAWGLTF_HeaderFile #include #include -#include #include - - -class XSDRAWSTLVRML +class XSDRAWGLTF { -public: - DEFINE_STANDARD_ALLOC +public: - //! Inits commands for writing to STL and VRML formats - Standard_EXPORT static void InitCommands (Draw_Interpretor& theCommands); - - //! Loads all Draw commands of TKXSDRAW. Used for plugin. - Standard_EXPORT static void Factory (Draw_Interpretor& theDI); - + //! Loads all Draw commands of XSDRAWGLTF. Used for plugin. + Standard_EXPORT static void Factory(Draw_Interpretor& theDI); }; -#endif // _XSDRAWSTLVRML_HeaderFile +#endif // _XSDRAWGLTF_HeaderFile diff --git a/src/XSDRAWIGES/XSDRAWIGES.cxx b/src/XSDRAWIGES/XSDRAWIGES.cxx index 195159619f..4b8263c4ba 100644 --- a/src/XSDRAWIGES/XSDRAWIGES.cxx +++ b/src/XSDRAWIGES/XSDRAWIGES.cxx @@ -1,4 +1,4 @@ -// Copyright (c) 1999-2014 OPEN CASCADE SAS +// Copyright (c) 2023 OPEN CASCADE SAS // // This file is part of Open CASCADE Technology software library. // @@ -11,16 +11,19 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -//gka 06.01.99 S3767 new function TPSTAT (first version) -//pdn 11.01.99 putting "return" statement for compilation on NT +#include #include #include -#include +#include +#include +#include +#include +#include #include #include -#include -#include +#include +#include #include #include #include @@ -29,78 +32,142 @@ #include #include #include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include #include #include #include -#include -#include +#include +#include #include +#include #include -#include -#include - -namespace { - - //======================================================================= +//======================================================================= //function : WriteShape //purpose : Creates a file Shape_'number' //======================================================================= -void WriteShape(const TopoDS_Shape& shape, const Standard_Integer number) +void WriteShape(const TopoDS_Shape& shape, + const Standard_Integer number) { char fname[110]; - sprintf(fname, "Shape_%d",number); - std::ofstream f(fname,std::ios::out | std::ios::binary); + sprintf(fname, "Shape_%d", number); + std::ofstream f(fname, std::ios::out | std::ios::binary); std::cout << "Output file name : " << fname << std::endl; f << "DBRep_DrawableShape\n"; - + BRepTools::Write(shape, f); f.close(); } -TCollection_AsciiString XSDRAW_CommandPart - (Standard_Integer argc, const char** argv, const Standard_Integer argf) +//======================================================================= +//function : XSDRAW_CommandPart +//purpose : +//======================================================================= +TCollection_AsciiString XSDRAW_CommandPart(Standard_Integer argc, + const char** argv, + const Standard_Integer argf) { TCollection_AsciiString res; - for (Standard_Integer i = argf; i < argc; i ++) { + for (Standard_Integer i = argf; i < argc; i++) + { if (i > argf) res.AssignCat(" "); - res.AssignCat (argv[i]); + res.AssignCat(argv[i]); } return res; } + +//======================================================================= +//function : GiveEntityNumber +//purpose : +//======================================================================= +static Standard_Integer GiveEntityNumber(const Handle(XSControl_WorkSession)& WS, + const Standard_CString name) +{ + Standard_Integer num = 0; + if (!name || name[0] == '\0') + { + char ligne[80]; ligne[0] = '\0'; + std::cin >> ligne; + // std::cin.clear(); std::cin.getline (ligne,79); + if (ligne[0] == '\0') return 0; + num = WS->NumberFromLabel(ligne); + } + else num = WS->NumberFromLabel(name); + return num; } -//-------------------------------------------------------------- -// Function : igesbrep -//-------------------------------------------------------------- -static Standard_Integer igesbrep (Draw_Interpretor& di, Standard_Integer argc, const char** argv) +//======================================================================= +//function : FileAndVar +//purpose : +//======================================================================= +Standard_Boolean FileAndVar(const Handle(XSControl_WorkSession)& session, + const Standard_CString file, + const Standard_CString var, + const Standard_CString def, + TCollection_AsciiString& resfile, + TCollection_AsciiString& resvar) { - DeclareAndCast(IGESControl_Controller,ctl,XSDRAW::Controller()); - if (ctl.IsNull()) XSDRAW::SetNorm("IGES"); + Standard_Boolean iafic = Standard_True; + resfile.Clear(); resvar.Clear(); + if (file) + if (file[0] == '\0' || + (file[0] == '.' && file[1] == '\0')) iafic = Standard_False; + if (!iafic) resfile.AssignCat(session->LoadedFile()); + else resfile.AssignCat(file); + + if (var && var[0] != '\0' && (var[0] != '.' || var[1] != '\0')) + resvar.AssignCat(var); + else if (resfile.Length() == 0) resvar.AssignCat(def); + else + { + Standard_Integer nomdeb, nomfin; + nomdeb = resfile.SearchFromEnd("/"); + if (nomdeb <= 0) nomdeb = resfile.SearchFromEnd("\\"); // pour NT + if (nomdeb < 0) nomdeb = 0; + nomfin = resfile.SearchFromEnd("."); + if (nomfin < nomdeb) nomfin = resfile.Length() + 1; + resvar = resfile.SubString(nomdeb + 1, nomfin - 1); + } + return iafic; +} + +//======================================================================= +//function : igesbrep +//purpose : +//======================================================================= +static Standard_Integer igesbrep(Draw_Interpretor& theDI, + Standard_Integer theNbArgs, + const char** theArgVec) +{ + Handle(XSControl_WorkSession) aWS = XSDRAW::Session(); + Handle(IGESControl_Controller) aCtl = + Handle(IGESControl_Controller)::DownCast(aWS->NormAdaptor()); + if (aCtl.IsNull()) + { + aWS->SelectNorm("IGES"); + } // Progress indicator - Handle(Draw_ProgressIndicator) progress = new Draw_ProgressIndicator ( di, 1 ); - Message_ProgressScope aPSRoot (progress->Start(), "Reading", 100); - - IGESControl_Reader Reader (XSDRAW::Session(),Standard_False); + Handle(Draw_ProgressIndicator) progress = new Draw_ProgressIndicator(theDI, 1); + Message_ProgressScope aPSRoot(progress->Start(), "Reading", 100); + + IGESControl_Reader Reader(XSDRAW::Session(), Standard_False); Standard_Boolean aFullMode = Standard_True; Reader.WS()->SetModeStat(aFullMode); - if (ctl.IsNull()) - ctl=Handle(IGESControl_Controller)::DownCast(XSDRAW::Controller()); - TCollection_AsciiString fnom,rnom; + TCollection_AsciiString fnom, rnom; - Standard_Boolean modfic = XSDRAW::FileAndVar - (argv[1],argv[2],"IGESBREP",fnom,rnom); - if (modfic) di<<" File IGES to read : "<Show(aPSRoot); - if (modfic) readstat = Reader.ReadFile (fnom.ToCString()); + if (modfic) readstat = Reader.ReadFile(fnom.ToCString()); else if (XSDRAW::Session()->NbStartingEntities() > 0) readstat = IFSelect_RetDone; aPSRoot.Next(20); // On average loading takes 20% if (aPSRoot.UserBreak()) return 1; - if (readstat != IFSelect_RetDone) { - if (modfic) di<<"Could not read file "< 3); + // Choice of treatment + Standard_Boolean fromtcl = (theNbArgs > 3); Standard_Integer modepri = 1, nent, nbs; if (fromtcl) modepri = 4; - while (modepri) { + while (modepri) + { //Roots for transfer are defined before setting mode ALL or OnlyVisible - gka //mode OnlyVisible does not work. // nent = Reader.NbRootsForTransfer(); - if (!fromtcl) { - std::cout<<"Mode (0 End, 1 Visible Roots, 2 All Roots, 3 Only One Entity, 4 Selection) :"<>str; - modepri = Draw::Atoi(str); + + // amv 26.09.2003 : this is used to avoid error of enter's simbol + char str[80]; + std::cin >> str; + modepri = Draw::Atoi(str); } - if (modepri == 0) { //fin - di << "Bye and good luck! \n"; + if (modepri == 0) + { //fin + theDI << "Bye and good luck! \n"; break; - } + } - else if (modepri <= 2) { // 1 : Visible Roots, 2 : All Roots - di << "All Geometry Transfer\n"; - di<<"spline_continuity (read) : "<ClearContext(); - XSDRAW::SetTransferProcess (thesession->TransferReader()->TransientProcess()); + else if (modepri <= 2) + { // 1 : Visible Roots, 2 : All Roots + theDI << "All Geometry Transfer\n"; + theDI << "spline_continuity (read) : " << Interface_Static::IVal("read.iges.bspline.continuity") << " (0 : no modif, 1 : C1, 2 : C2)\n"; + theDI << " To modify : command param read.iges.bspline.continuity\n"; + const Handle(XSControl_WorkSession)& thesession = Reader.WS(); + thesession->TransferReader()->Context().Clear(); aPSRoot.SetName("Translation"); progress->Show(aPSRoot); - - if (modepri == 1) Reader.SetReadVisible (Standard_True); + + if (modepri == 1) Reader.SetReadVisible(Standard_True); Reader.TransferRoots(aPSRoot.Next(80)); - + if (aPSRoot.UserBreak()) return 1; // result in only one shape for all the roots // or in one shape for one root. - di<<"Count of shapes produced : "< 1) { - std::cout << " pass(0) one shape for all (1)\n or one shape per root (2)\n + WriteBRep (one for all : 3) (one per root : 4) : " << std::flush; + if (Reader.NbShapes() > 1) + { + std::cout << " pass(0) one shape for all (1)\n or one shape per root (2)\n + WriteBRep (one for all : 3) (one per root : 4) : " << std::flush; answer = -1; //amv 26.09.2003 - char str_a[80]; - std::cin >> str_a; - answer = Draw::Atoi(str_a); + char str_a[80]; + std::cin >> str_a; + answer = Draw::Atoi(str_a); } - if ( answer == 0) continue; - if ( answer == 1 || answer == 3) { - TopoDS_Shape shape = Reader.OneShape(); - // save the shape - if (shape.IsNull()) { di<<"No Shape produced\n"; continue; } - char fname[110]; - Sprintf(fname, "%s", rnom.ToCString()); - di << "Saving shape in variable Draw : " << fname << "\n"; - if (answer == 3) WriteShape (shape,1); - try { - OCC_CATCH_SIGNALS - DBRep::Set(fname,shape); - } - catch(Standard_Failure const& anException) { - di << "** Exception : "; - di << anException.GetMessageString(); - di<<" ** Skip\n"; - di << "Saving shape in variable Draw : " << fname << "\n"; - WriteShape (shape,1); - } + if (answer == 0) continue; + if (answer == 1 || answer == 3) + { + TopoDS_Shape shape = Reader.OneShape(); + // save the shape + if (shape.IsNull()) { theDI << "No Shape produced\n"; continue; } + char fname[110]; + Sprintf(fname, "%s", rnom.ToCString()); + theDI << "Saving shape in variable Draw : " << fname << "\n"; + if (answer == 3) WriteShape(shape, 1); + try + { + OCC_CATCH_SIGNALS + DBRep::Set(fname, shape); + } + catch (Standard_Failure const& anException) + { + theDI << "** Exception : "; + theDI << anException.GetMessageString(); + theDI << " ** Skip\n"; + theDI << "Saving shape in variable Draw : " << fname << "\n"; + WriteShape(shape, 1); + } } - - else if (answer == 2 || answer == 4) { - Standard_Integer numshape = Reader.NbShapes(); - for (Standard_Integer inum = 1; inum <= numshape; inum++) { - // save all the shapes - TopoDS_Shape shape = Reader.Shape(inum); - if (shape.IsNull()) { di<<"No Shape produced\n"; continue; } - char fname[110]; - Sprintf(fname, "%s_%d", rnom.ToCString(),inum); - di << "Saving shape in variable Draw : " << fname << "\n"; - if (answer == 4) WriteShape (shape,inum); - try { - OCC_CATCH_SIGNALS - DBRep::Set(fname,shape); - } - catch(Standard_Failure const& anException) { - di << "** Exception : "; - di << anException.GetMessageString(); - di<<" ** Skip\n"; - } - } + + else if (answer == 2 || answer == 4) + { + Standard_Integer numshape = Reader.NbShapes(); + for (Standard_Integer inum = 1; inum <= numshape; inum++) + { + // save all the shapes + TopoDS_Shape shape = Reader.Shape(inum); + if (shape.IsNull()) { theDI << "No Shape produced\n"; continue; } + char fname[110]; + Sprintf(fname, "%s_%d", rnom.ToCString(), inum); + theDI << "Saving shape in variable Draw : " << fname << "\n"; + if (answer == 4) WriteShape(shape, inum); + try + { + OCC_CATCH_SIGNALS + DBRep::Set(fname, shape); + } + catch (Standard_Failure const& anException) + { + theDI << "** Exception : "; + theDI << anException.GetMessageString(); + theDI << " ** Skip\n"; + } + } } else return 0; } - else if (modepri == 3) { // One Entity - std::cout << "Only One Entity"< DRAW Shape: "< DRAW Shape: " << shname << "\n"; + theDI << "Now, " << nbs << " Shapes produced\n"; + TopoDS_Shape sh = Reader.Shape(nbs); + DBRep::Set(shname, sh); } } - else if (modepri == 4) { // Selection + else if (modepri == 4) + { // Selection Standard_Integer answer = 1; Handle(TColStd_HSequenceOfTransient) list; -// Selection, nommee ou via tcl. tcl : raccourcis admis -// * donne iges-visible + xst-transferrable-roots -// *r donne xst-model-roots (TOUTES racines) + // Selection, nommee ou via tcl. tcl : raccourcis admis + // * donne iges-visible + xst-transferrable-roots + // *r donne xst-model-roots (TOUTES racines) - if( fromtcl && argv[3][0]=='*' && argv[3][1]=='\0' ) { - di << "All Geometry Transfer\n"; - di<<"spline_continuity (read) : "<ClearContext(); - XSDRAW::SetTransferProcess (thesession->TransferReader()->TransientProcess()); + if (fromtcl && theArgVec[3][0] == '*' && theArgVec[3][1] == '\0') + { + theDI << "All Geometry Transfer\n"; + theDI << "spline_continuity (read) : " << Interface_Static::IVal("read.iges.bspline.continuity") << " (0 : no modif, 1 : C1, 2 : C2)\n"; + theDI << " To modify : command param read.iges.bspline.continuity\n"; + const Handle(XSControl_WorkSession)& thesession = Reader.WS(); + thesession->TransferReader()->Context().Clear(); aPSRoot.SetName("Translation"); progress->Show(aPSRoot); - - Reader.SetReadVisible (Standard_True); + + Reader.SetReadVisible(Standard_True); Reader.TransferRoots(aPSRoot.Next(80)); - + if (aPSRoot.UserBreak()) return 1; @@ -273,435 +354,645 @@ static Standard_Integer igesbrep (Draw_Interpretor& di, Standard_Integer argc, c // save the shape char fname[110]; Sprintf(fname, "%s", rnom.ToCString()); - di << "Saving shape in variable Draw : " << fname << "\n"; - try { + theDI << "Saving shape in variable Draw : " << fname << "\n"; + try + { OCC_CATCH_SIGNALS - DBRep::Set(fname,shape); + DBRep::Set(fname, shape); + } + catch (Standard_Failure const& anException) + { + theDI << "** Exception : "; + theDI << anException.GetMessageString(); + theDI << " ** Skip\n"; + theDI << "Saving shape in variable Draw : " << fname << "\n"; + WriteShape(shape, 1); } - catch(Standard_Failure const& anException) { - di << "** Exception : "; - di << anException.GetMessageString(); - di<<" ** Skip\n"; - di << "Saving shape in variable Draw : " << fname << "\n"; - WriteShape (shape,1); - } return 0; } - - if(fromtcl) { - modepri = 0; // d office, une seule passe - if (argv[3][0] == '*' && argv[3][1] == 'r' && argv[3][2] == '\0') { - di<<"All Roots : "; - list = XSDRAW::GetList ("xst-model-roots"); - } - else { - TCollection_AsciiString compart = XSDRAW_CommandPart (argc,argv,3); - di<<"List given by "<GiveList("xst-model-roots"); + } + else + { + TCollection_AsciiString compart = XSDRAW_CommandPart(theNbArgs, theArgVec, 3); + theDI << "List given by " << compart.ToCString() << " : "; + list = XSDRAW::Session()->GiveList(compart.ToCString()); + } + if (list.IsNull()) + { + theDI << "No list defined. Give a selection name or * for all visible transferrable roots\n"; continue; } } - else { - std::cout<<"Name of Selection :"<GiveList(""); + if (list.IsNull()) { std::cout << "No list defined" << std::endl; continue; } } Standard_Integer nbl = list->Length(); - di<<"Nb entities selected : "<>str_answer; - answer = Draw::Atoi(str_answer); - } - if (answer <= 0 || answer > 3) continue; - if (answer == 3) { - for (Standard_Integer ill = 1; ill <= nbl; ill ++) { - Handle(Standard_Transient) ent = list->Value(ill); - di<<" ";// model->Print(ent,di); - } - di<<"\n"; - } - if (answer == 1 || answer == 2) { - Standard_Integer nbt = 0; - Handle(XSControl_WorkSession) thesession = Reader.WS(); - - XSDRAW::SetTransferProcess (thesession->TransferReader()->TransientProcess()); + char str_answer[80]; + std::cin >> str_answer; + answer = Draw::Atoi(str_answer); + } + if (answer <= 0 || answer > 3) continue; + if (answer == 3) + { + for (Standard_Integer ill = 1; ill <= nbl; ill++) + { + Handle(Standard_Transient) ent = list->Value(ill); + theDI << " ";// model->Print(ent,theDI); + } + theDI << "\n"; + } + if (answer == 1 || answer == 2) + { + Standard_Integer nbt = 0; + Handle(XSControl_WorkSession) thesession = Reader.WS(); + aPSRoot.SetName("Translation"); progress->Show(aPSRoot); Message_ProgressScope aPS(aPSRoot.Next(80), "Root", nbl); for (Standard_Integer ill = 1; ill <= nbl && aPS.More(); ill++) { - nent = Reader.Model()->Number(list->Value(ill)); - if (nent == 0) continue; - if (!Reader.TransferOne(nent, aPS.Next())) - di<<"Transfer entity n0 "< DRAW Shape: "<Number(list->Value(ill)); + if (nent == 0) continue; + if (!Reader.TransferOne(nent, aPS.Next())) + theDI << "Transfer entity n0 " << nent << " : no result\n"; + else + { + nbs = Reader.NbShapes(); + char shname[30]; Sprintf(shname, "%s_%d", rnom.ToCString(), nbs); + theDI << "Transfer entity n0 " << nent << " OK -> DRAW Shape: " << shname << "\n"; + theDI << "Now, " << nbs << " Shapes produced\n"; + TopoDS_Shape sh = Reader.Shape(nbs); + DBRep::Set(shname, sh); nbt++; - } - } + } + } if (aPSRoot.UserBreak()) return 1; - di<<"Nb Shapes successfully produced : "<AddWithRefs(ent, protocol): ecriture de l`entite et eventuellement - // . de sa matrice de transformation - // . de ses sous-elements - - IGESControl_Writer ICW (Interface_Static::CVal("write.iges.unit"), - Interface_Static::IVal("write.iges.brep.mode")); - di<<"unit (write) : "<) : brepiges shape [+shape][ +shape] nomfic -// c a d tant qu il y a des + on ajoute ce qui suit - const char* nomfic = NULL; - Standard_Integer npris = 0; - - Handle(Draw_ProgressIndicator) progress = new Draw_ProgressIndicator ( di, 1 ); - Message_ProgressScope aPSRoot (progress->Start(), "Translating", 100); - progress->Show(aPSRoot); + Handle(XSControl_WorkSession) aWorkSession = XSDRAW::Session(); + aWorkSession->SelectNorm("IGES"); - Message_ProgressScope aPS(aPSRoot.Next(90), NULL, n); - for ( Standard_Integer i = 1; i < n && aPS.More(); i++) { - const char* nomvar = a[i]; - if (a[i][0] == '+') nomvar = &(a[i])[1]; - else if (i > 1) { nomfic = a[i]; break; } - TopoDS_Shape Shape = DBRep::Get(nomvar); - if (ICW.AddShape (Shape, aPS.Next())) npris ++; - else if (ICW.AddGeom (DrawTrSurf::GetCurve (nomvar)) ) npris ++; - else if (ICW.AddGeom (DrawTrSurf::GetSurface (nomvar)) ) npris ++; - } - ICW.ComputeModel(); - XSDRAW::SetModel(ICW.Model()); - XSDRAW::SetTransferProcess (ICW.TransferProcess()); - - if (aPSRoot.UserBreak()) + IGESControl_Writer anIgesWriter(Interface_Static::CVal("write.iges.unit"), + Interface_Static::IVal("write.iges.brep.mode")); + theDI << "unit (write) : " << Interface_Static::CVal("write.iges.unit") << "\n"; + theDI << "mode write : " << Interface_Static::CVal("write.iges.brep.mode") << "\n"; + theDI << " To modify : command param\n"; + + const char* aFileName = nullptr; + Standard_Integer aNumShapesProcessed = 0; + + Handle(Draw_ProgressIndicator) aProgress = new Draw_ProgressIndicator(theDI, 1); + Message_ProgressScope aRootProgress(aProgress->Start(), "Translating", 100); + aProgress->Show(aRootProgress); + + Message_ProgressScope aStepProgress(aRootProgress.Next(90), NULL, theNbArgs); + for (Standard_Integer i = 1; i < theNbArgs && aStepProgress.More(); i++) + { + const char* aVariableName = theArgVec[i]; + if (theArgVec[i][0] == '+') aVariableName = &(theArgVec[i])[1]; + else if (i > 1) { + aFileName = theArgVec[i]; break; + } + + TopoDS_Shape aShape = DBRep::Get(aVariableName); + if (anIgesWriter.AddShape(aShape, aStepProgress.Next())) aNumShapesProcessed++; + else if (anIgesWriter.AddGeom(DrawTrSurf::GetCurve(aVariableName))) aNumShapesProcessed++; + else if (anIgesWriter.AddGeom(DrawTrSurf::GetSurface(aVariableName))) aNumShapesProcessed++; + } + anIgesWriter.ComputeModel(); + + if (aRootProgress.UserBreak()) return 1; - aPSRoot.SetName("Writing"); - progress->Show(aPSRoot); - di<NbEntities()<<" Entities\n"; + aRootProgress.SetName("Writing"); + aProgress->Show(aRootProgress); + + theDI << aNumShapesProcessed << " Shapes written, giving " << anIgesWriter.Model()->NbEntities() << " Entities\n"; - if ( ! nomfic ) // delayed write + if (!aFileName) // delayed write { - di<<" Now, to write a file, command : writeall filename\n"; + theDI << " Now, to write a file, command : writeall filename\n"; return 0; } // write file - if (! ICW.Write(nomfic)) di<<" Error: could not write file " << nomfic; - else di<<" File " << nomfic << " written"; + if (!anIgesWriter.Write(aFileName)) + { + theDI << " Error: could not write file " << aFileName << "\n"; + return 1; + } + theDI << " File " << aFileName << " written\n"; + aWorkSession->SetModel(anIgesWriter.Model()); return 0; } -//-------------------------------------------------------------- -// Function : testwriteiges -// -//-------------------------------------------------------------- - -static Standard_Integer testwrite (Draw_Interpretor& di, Standard_Integer n, const char** a) +//======================================================================= +//function : testwrite +//purpose : +//======================================================================= +static Standard_Integer testwrite(Draw_Interpretor& theDI, + Standard_Integer theNbArgs, + const char** theArgVec) { - if (n != 3) - { - di << "ERROR in " << a[0] << "Wrong Number of Arguments.\n"; - di << " Usage : " << a[0] <<" file_name shape_name\n"; - return 1; - } + if (theNbArgs != 3) + { + theDI << "ERROR in " << theArgVec[0] << "Wrong Number of Arguments.\n"; + theDI << " Usage : " << theArgVec[0] << " file_name shape_name\n"; + return 1; + } IGESControl_Writer Writer; - Standard_CString filename = a[1]; - TopoDS_Shape shape = DBRep::Get(a[2]); + Standard_CString filename = theArgVec[1]; + TopoDS_Shape shape = DBRep::Get(theArgVec[2]); Standard_Boolean ok = Writer.AddShape(shape); - if(!ok){ - di<<"Shape not add\n"; + if (!ok) + { + theDI << "Shape not add\n"; return 1; } - - if(!(Writer.Write(filename))){ - di<<"Error on writing file\n"; + + if (!(Writer.Write(filename))) + { + theDI << "Error on writing file\n"; return 1; } - di<<"File Is Written\n"; + theDI << "File Is Written\n"; return 0; } -//-------------------------------------------------------------- -// Function : igesparam -// -//-------------------------------------------------------------- - -static Standard_Integer igesparam (Draw_Interpretor& di, Standard_Integer , const char** ) +//======================================================================= +//function : igesparam +//purpose : +//======================================================================= +static Standard_Integer igesparam(Draw_Interpretor& theDI, + Standard_Integer, + const char**) { -// liste des parametres - di<<"List of parameters which control IGES :\n"; - di<<" unit : write.iges.unit\n mode write : write.iges.brep.mode\n spline_continuity (read) : read.iges.bspline.continuity\nSee definition by defparam, read/edit value by param\n"; - di<<"unit (write) : "<TransferReader()->TransientProcess(); + TColStd_Array1OfAsciiString aTypeStrings(1, 3); + TColStd_Array1OfAsciiString aKindStrings(1, 3); + aTypeStrings.SetValue(1, "xst-type(CurveOnSurface)"); + aTypeStrings.SetValue(2, "xst-type(Boundary)"); + aTypeStrings.SetValue(3, "xst-type(Loop)"); + aKindStrings.SetValue(1, "IGESGeom_TrimmedSurface"); + aKindStrings.SetValue(2, "IGESGeom_BoundedSurface"); + aKindStrings.SetValue(3, "IGESSolid_Face"); + if (anTransientProcess.IsNull()) + { + theDI << "No Transfer Read\n"; + return 1; + } + Standard_Integer anNumFaces = 0, aTotalFaces = 0; + Transfer_IteratorOfProcessForTransient anIterator = anTransientProcess->AbnormalResult(); + Standard_Integer anIndex = 0; + if (theNbArgs > 1) + { + TCollection_AsciiString anArg(theArgVec[1]); + for (anIndex = 1; anIndex <= 3; anIndex++) + { + if (aKindStrings.Value(anIndex).Location(anArg, 1, aKindStrings.Value(anIndex).Length()) != 0) + { + break; + } + } + } -//-------------------------------------------------------------- -// Function : tplosttrim -// -//-------------------------------------------------------------- + if (anIndex == 4) + { + theDI << "Invalid argument\n"; + return 0; + } -static Standard_Integer XSDRAWIGES_tplosttrim (Draw_Interpretor& di, Standard_Integer n, const char** a) -{ - Handle(IFSelect_SessionPilot) pilot = XSDRAW::Pilot(); - -// Standard_Integer narg = pilot->NbWords(); - Standard_Integer narg = n; - - const Handle(Transfer_TransientProcess) &TP = XSControl::Session(pilot)->TransferReader()->TransientProcess(); - TColStd_Array1OfAsciiString strarg(1, 3); - TColStd_Array1OfAsciiString typarg(1, 3); - strarg.SetValue(1,"xst-type(CurveOnSurface)"); - strarg.SetValue(2,"xst-type(Boundary)"); - strarg.SetValue(3,"xst-type(Loop)"); - typarg.SetValue(1,"IGESGeom_TrimmedSurface"); - typarg.SetValue(2,"IGESGeom_BoundedSurface"); - typarg.SetValue(3,"IGESSolid_Face"); - if (TP.IsNull()) { di<<"No Transfer Read\n"; return 1; } - Standard_Integer nbFaces = 0, totFaces = 0 ; - Handle(IFSelect_WorkSession) WS = pilot->Session(); - Transfer_IteratorOfProcessForTransient itrp = TP->AbnormalResult(); - Standard_Integer k=0; - if(narg > 1) { -// TCollection_AsciiString Arg = pilot->Word(1); - TCollection_AsciiString Arg(a[1]); - for(k=1 ; k<=3;k++ ) { - if(typarg.Value(k).Location(Arg,1,typarg.Value(k).Length()) != 0) break; + for (Standard_Integer j = 1; j <= 3; j++) + { + TColStd_MapOfTransient aFaceMap; + + if (theNbArgs == 1) + { + anIndex = j; } - } - if( k == 4) {di<< "Invalid argument\n"; return 0; } - for(Standard_Integer j = 1 ; j <= 3; j++) { - TColStd_MapOfTransient aMap; - if(narg == 1) k=j; - Handle(TColStd_HSequenceOfTransient) list = IFSelect_Functions::GiveList(pilot->Session(),strarg.Value(k).ToCString()); - if (!list.IsNull()) itrp.Filter (list); - else { - di << "No untrimmed faces\n"; + Handle(TColStd_HSequenceOfTransient) aFaceList = aWorkSession->GiveList(aTypeStrings.Value(anIndex).ToCString()); + if (!aFaceList.IsNull()) + { + anIterator.Filter(aFaceList); + } + else + { + theDI << "No untrimmed faces\n"; return 0; } - for (itrp.Start(); itrp.More(); itrp.Next()) { - const Handle(Standard_Transient)& ent = itrp.Starting(); - Handle(TColStd_HSequenceOfTransient) super = WS->Sharings (ent); - if (!super.IsNull()) { - Standard_Integer nb = super->Length(); - if (nb > 0) { - for (Standard_Integer i = 1; i <= nb; i++) - if (super->Value(i)->IsKind (typarg.Value(k).ToCString())) { - if(aMap.Add(super->Value(i))) nbFaces++; - } - } + for (anIterator.Start(); anIterator.More(); anIterator.Next()) + { + Handle(Standard_Transient) anEntity = anIterator.Starting(); + Handle(TColStd_HSequenceOfTransient) aSharingEntities = aWorkSession->Sharings(anEntity); + if (!aSharingEntities.IsNull()) + { + Standard_Integer aNumSharingEntities = aSharingEntities->Length(); + if (aNumSharingEntities > 0) + { + for (Standard_Integer i = 1; i <= aNumSharingEntities; i++) + { + if (aSharingEntities->Value(i)->IsKind(aKindStrings.Value(anIndex).ToCString())) + { + if (aFaceMap.Add(aSharingEntities->Value(i))) + { + anNumFaces++; + } + } + } + } } } - if(nbFaces != 0) { - if( j == 1 ) di << "Number of untrimmed faces: \n"; - switch(k){ - case 1: - di << "Trimmed Surface: \n"; break; + if (anNumFaces != 0) + { + if (j == 1) + { + theDI << "Number of untrimmed faces: \n"; + } + switch (anIndex) + { + case 1: + theDI << "Trimmed Surface: \n"; + break; case 2: - di << "Bounded Surface: \n"; break; + theDI << "Bounded Surface: \n"; + break; case 3: - di << "Face: \n"; break; + theDI << "Face: \n"; + break; } - - TColStd_MapIteratorOfMapOfTransient itmap; + TColStd_MapIteratorOfMapOfTransient anMapIterator; Standard_SStream aTmpStream; - for(itmap.Initialize(aMap); itmap.More(); itmap.Next()) { - XSDRAW::Model()->Print (itmap.Key(), aTmpStream); + for (anMapIterator.Initialize(aFaceMap); anMapIterator.More(); anMapIterator.Next()) + { + aWorkSession->Model()->Print(anMapIterator.Key(), aTmpStream); aTmpStream << " "; } - di << aTmpStream.str().c_str(); - di << "\n"; - di << "\nNumber:"<< nbFaces << "\n"; - totFaces += nbFaces; + theDI << aTmpStream.str().c_str(); + theDI << "\n"; + theDI << "\nNumber:" << anNumFaces << "\n"; + aTotalFaces += anNumFaces; + } + if (theNbArgs > 1) + { + break; } - if(narg > 1) break; - nbFaces = 0; + anNumFaces = 0; + } + if (aTotalFaces == 0) + { + theDI << "No untrimmed faces\n"; + } + else + { + theDI << "Total number :" << aTotalFaces << "\n"; } - - if(totFaces == 0) di << "No untrimmed faces\n"; - else di << "Total number :" << totFaces << "\n"; return 0; } -//------------------------------------------------------------------- -//-------------------------------------------------------------- -// Function : TPSTAT -// -//-------------------------------------------------------------- -static Standard_Integer XSDRAWIGES_TPSTAT(Draw_Interpretor& di,Standard_Integer n, const char** a) + + +//======================================================================= +//function : XSDRAWIGES_TPSTAT +//purpose : +//======================================================================= +static Standard_Integer XSDRAWIGES_TPSTAT(Draw_Interpretor& theDI, + Standard_Integer theNbArgs, + const char** theArgVec) { - Handle(IFSelect_SessionPilot) pilot = XSDRAW::Pilot(); - Standard_Integer argc = n;//= pilot->NbWords(); - const Standard_CString arg1 = a[1];//pilot->Arg(1); - const Handle(Transfer_TransientProcess) &TP = XSControl::Session(pilot)->TransferReader()->TransientProcess(); - IGESControl_Reader read; //(XSControl::Session(pilot),Standard_False); -// **** tpent **** - Handle(Interface_InterfaceModel) model = TP->Model(); - if (model.IsNull()) {di<<"No Transfer Read\n"; return -1;} - Handle(XSControl_WorkSession) thesession = read.WS(); - thesession->SetMapReader(TP); - Standard_Integer mod1 = 0; - if (argc > 1) { - char a2 = arg1[1]; if (a2 == '\0') a2 = '!'; - switch (arg1[0]) { - case 'g' : read.PrintTransferInfo(IFSelect_FailAndWarn,IFSelect_GeneralInfo);break; - case 'c' : read.PrintTransferInfo(IFSelect_FailAndWarn,IFSelect_CountByItem); break; - case 'C' : read.PrintTransferInfo(IFSelect_FailAndWarn,IFSelect_ListByItem); break; - case 'r' : read.PrintTransferInfo(IFSelect_FailAndWarn,IFSelect_ResultCount);break; - case 's' : read.PrintTransferInfo(IFSelect_FailAndWarn,IFSelect_Mapping);break; - case '?' : mod1 = -1; break; - default : mod1 = -2; break; + Handle(XSControl_WorkSession) aWorkSession = XSDRAW::Session(); + const Standard_CString anArg1 = theArgVec[1]; + const Handle(Transfer_TransientProcess)& aTransientProcess = aWorkSession->TransferReader()->TransientProcess(); + IGESControl_Reader aReader; + Handle(Interface_InterfaceModel) aModel = aTransientProcess->Model(); + if (aModel.IsNull()) { theDI << "No Transfer Read\n"; return -1; } + Handle(XSControl_WorkSession) aSession = aReader.WS(); + aSession->SetMapReader(aTransientProcess); + Standard_Integer aMode = 0; + if (theNbArgs > 1) + { + char a2 = anArg1[1]; if (a2 == '\0') a2 = '!'; + switch (anArg1[0]) + { + case 'g': aReader.PrintTransferInfo(IFSelect_FailAndWarn, IFSelect_GeneralInfo); break; + case 'c': aReader.PrintTransferInfo(IFSelect_FailAndWarn, IFSelect_CountByItem); break; + case 'C': aReader.PrintTransferInfo(IFSelect_FailAndWarn, IFSelect_ListByItem); break; + case 'r': aReader.PrintTransferInfo(IFSelect_FailAndWarn, IFSelect_ResultCount); break; + case 's': aReader.PrintTransferInfo(IFSelect_FailAndWarn, IFSelect_Mapping); break; + case '?': aMode = -1; break; + default: aMode = -2; break; } } - if (mod1 < -1) di<<"Unknown Mode\n"; - if (mod1 < 0) { - di<<"Modes available :\n" - <<"g : general c : checks (count) C (list)\n" - <<"r : number of CasCade resulting shapes\n" - <<"s : mapping between IGES entities and CasCade shapes\n"; - if (mod1 < -1) return -1; + if (aMode < -1) theDI << "Unknown Mode\n"; + if (aMode < 0) + { + theDI << "Modes available :\n" + << "g : general c : checks (count) C (list)\n" + << "r : number of CasCade resulting shapes\n" + << "s : mapping between IGES entities and CasCade shapes\n"; + if (aMode < -1) return -1; return 0; } return 0; } -static Standard_Integer etest(Draw_Interpretor& di, Standard_Integer argc, const char** a) + +//======================================================================= +//function : etest +//purpose : +//======================================================================= +static Standard_Integer etest(Draw_Interpretor& theDI, + Standard_Integer theNbArgs, + const char** theArgVec) { - if(argc < 3) { - di<<"etest igesfile shape\n"; + if (theNbArgs < 3) + { + theDI << "etest igesfile shape\n"; return 0; } IGESControl_Reader aReader; - aReader.ReadFile(a[1]); + aReader.ReadFile(theArgVec[1]); aReader.SetReadVisible(Standard_True); aReader.TransferRoots(); TopoDS_Shape shape = aReader.OneShape(); - DBRep::Set(a[2],shape); + DBRep::Set(theArgVec[2], shape); return 0; } -extern "C" { -static void cleanpilot () +//======================================================================= +//function : ReadIges +//purpose : Read IGES to DECAF document +//======================================================================= +static Standard_Integer ReadIges(Draw_Interpretor& theDI, + Standard_Integer theNbArgs, + const char** theArgVec) { - XSDRAW::Session()->ClearData(1); -} -} + if (theNbArgs < 3) + { + theDI << "Use: " << theArgVec[0] << " Doc filename [mode]: read IGES file to a document\n"; + return 0; + } + DeclareAndCast(IGESControl_Controller, aController, XSDRAW::Controller()); + if (aController.IsNull()) XSDRAW::SetNorm("IGES"); -//-------------------------------------------------------------- -// Function : Init(s) -// -//-------------------------------------------------------------- + TCollection_AsciiString aFileName, aModelName; + Standard_Boolean isModified = XSDRAW::FileAndVar(theArgVec[2], theArgVec[1], "IGES", aFileName, aModelName); + if (isModified) theDI << " File IGES to read : " << aFileName.ToCString() << "\n"; + else theDI << " Model taken from the session : " << aModelName.ToCString() << "\n"; -void XSDRAWIGES::InitSelect () -{ - Handle(IGESSelect_Activator) igesact = new IGESSelect_Activator; - IGESControl_Controller::Init(); -// XSDRAW::SetNorm ("IGES"); trop tot - XSDRAW::SetController (XSControl_Controller::Recorded("iges")); - - atexit (cleanpilot); -} + IGESCAFControl_Reader aReader(XSDRAW::Session(), isModified); + Standard_Integer onlyVisible = Interface_Static::IVal("read.iges.onlyvisible"); + aReader.SetReadVisible(onlyVisible == 1); + + if (theNbArgs == 4) + { + Standard_Boolean mode = Standard_True; + for (Standard_Integer i = 0; theArgVec[3][i]; i++) + switch (theArgVec[3][i]) + { + case '-': mode = Standard_False; break; + case '+': mode = Standard_True; break; + case 'c': aReader.SetColorMode(mode); break; + case 'n': aReader.SetNameMode(mode); break; + case 'l': aReader.SetLayerMode(mode); break; + } + } + Handle(Draw_ProgressIndicator) aProgress = new Draw_ProgressIndicator(theDI); + Message_ProgressScope aRootScope(aProgress->Start(), "IGES import", isModified ? 2 : 1); + + IFSelect_ReturnStatus aReadStatus = IFSelect_RetVoid; + if (isModified) + { + Message_ProgressScope aReadScope(aRootScope.Next(), "File reading", 1); + aReadScope.Show(); + aReadStatus = aReader.ReadFile(aFileName.ToCString()); + } + else if (XSDRAW::Session()->NbStartingEntities() > 0) + { + aReadStatus = IFSelect_RetDone; + } + if (aReadStatus != IFSelect_RetDone) + { + if (isModified) + { + theDI << "Could not read file " << aFileName.ToCString() << " , abandon\n"; + } + else + { + theDI << "No model loaded\n"; + } + return 1; + } + + Handle(TDocStd_Document) aDocument; + if (!DDocStd::GetDocument(theArgVec[1], aDocument, Standard_False)) + { + Handle(TDocStd_Application) anApplication = DDocStd::GetApplication(); + anApplication->NewDocument("BinXCAF", aDocument); + TDataStd_Name::Set(aDocument->GetData()->Root(), theArgVec[1]); + Handle(DDocStd_DrawDocument) aDrawDocument = new DDocStd_DrawDocument(aDocument); + Draw::Set(theArgVec[1], aDrawDocument); + } + if (!aReader.Transfer(aDocument, aRootScope.Next())) + { + theDI << "Cannot read any relevant data from the IGES file\n"; + return 1; + } + theDI << "Document saved with name " << theArgVec[1]; + return 0; +} //======================================================================= -//function : InitToBRep -//purpose : +//function : WriteIges +//purpose : Write DECAF document to IGES //======================================================================= - -void XSDRAWIGES::InitToBRep (Draw_Interpretor& theCommands) +static Standard_Integer WriteIges(Draw_Interpretor& theDI, Standard_Integer theNbArgs, const char** theArgVec) { - const char* g = "DE: IGES"; - theCommands.Add("igesbrep", "igesbrep [file else already loaded model] [name DRAW]", __FILE__, igesbrep, g); - theCommands.Add("testreadiges", "testreadiges [file else already loaded model] [name DRAW]", __FILE__, testread, g); - theCommands.Add("igesread", "igesread [file else already loaded model] [name DRAW]", __FILE__, igesbrep, g); - theCommands.Add("igesparam", "igesparam ->list, + name ->one param, + name val->change", __FILE__, igesparam, g); - theCommands.Add("TPSTAT", " ", __FILE__, XSDRAWIGES_TPSTAT, g); - theCommands.Add("tplosttrim", "number of untrimmed faces during last transfer", __FILE__, XSDRAWIGES_tplosttrim, g); - theCommands.Add("etest", "test of eviewer", __FILE__, etest, g); + if (theNbArgs < 3) + { + theDI << "Use: " << theArgVec[0] << " Doc filename [mode]: write document to IGES file\n"; + return 0; + } -} + Handle(TDocStd_Document) aDocument; + DDocStd::GetDocument(theArgVec[1], aDocument); + if (aDocument.IsNull()) + { + theDI << theArgVec[1] << " is not a document\n"; + return 1; + } + XSDRAW::SetNorm("IGES"); + + TCollection_AsciiString aFileName, aModelName; + const Standard_Boolean isModified = XSDRAW::FileAndVar(theArgVec[2], theArgVec[1], "IGES", aFileName, aModelName); + + Handle(Draw_ProgressIndicator) aProgress = new Draw_ProgressIndicator(theDI); + Message_ProgressScope aRootScope(aProgress->Start(), "IGES export", isModified ? 2 : 1); + + IGESCAFControl_Writer aWriter(XSDRAW::Session(), Standard_True); + if (theNbArgs == 4) + { + Standard_Boolean mode = Standard_True; + for (Standard_Integer i = 0; theArgVec[3][i]; i++) + switch (theArgVec[3][i]) + { + case '-': mode = Standard_False; break; + case '+': mode = Standard_True; break; + case 'c': aWriter.SetColorMode(mode); break; + case 'n': aWriter.SetNameMode(mode); break; + case 'l': aWriter.SetLayerMode(mode); break; + } + } + aWriter.Transfer(aDocument, aRootScope.Next()); + + if (isModified) + { + Message_ProgressScope aWriteScope(aRootScope.Next(), "File writing", 1); + aWriteScope.Show(); + theDI << "Writing IGES model to file " << theArgVec[2] << "\n"; + if (aWriter.Write(aFileName.ToCString())) + { + theDI << " Write OK\n"; + } + else + { + theDI << " Write failed\n"; + } + } + else + { + theDI << "Document has been translated into the session"; + } + return 0; +} //======================================================================= -//function : InitFromBRep -//purpose : +//function : Factory +//purpose : //======================================================================= - -void XSDRAWIGES::InitFromBRep (Draw_Interpretor& theCommands) +void XSDRAWIGES::Factory(Draw_Interpretor& theDI) { - const char* g = "DE: IGES"; - theCommands.Add("brepiges", "brepiges sh1 [+sh2 [+sh3 ..]] filename.igs", __FILE__, brepiges, g); - theCommands.Add("testwriteiges", "testwriteiges filename.igs shape", __FILE__, testwrite, g); + static Standard_Boolean aIsActivated = Standard_False; + if (aIsActivated) + { + return; + } + aIsActivated = Standard_True; + + IGESControl_Controller::Init(); + + const char* aGroup = "DE: IGES"; + + theDI.Add("tplosttrim", "number of untrimmed faces during last transfer", __FILE__, XSDRAWIGES_tplosttrim, aGroup); + theDI.Add("igesbrep", "igesbrep [file else already loaded model] [name DRAW]", __FILE__, igesbrep, aGroup); + theDI.Add("testreadiges", "testreadiges [file else already loaded model] [name DRAW]", __FILE__, testread, aGroup); + theDI.Add("igesparam", "igesparam ->list, + name ->one param, + name val->change", __FILE__, igesparam, aGroup); + theDI.Add("TPSTAT", " ", __FILE__, XSDRAWIGES_TPSTAT, aGroup); + theDI.Add("etest", "test of eviewer", __FILE__, etest, aGroup); + + theDI.Add("ReadIges", "Doc filename: Read IGES file to DECAF document", __FILE__, ReadIges, aGroup); + theDI.Add("WriteIges", "Doc filename: Write DECAF document to IGES file", __FILE__, WriteIges, aGroup); + theDI.Add("igesread", "igesread [file else already loaded model] [name DRAW]", __FILE__, igesbrep, aGroup); + theDI.Add("igeswrite", "igesread [file else already loaded model] [name DRAW]", __FILE__, brepiges, aGroup); + theDI.Add("brepiges", "brepiges sh1 [+sh2 [+sh3 ..]] filename.igs", __FILE__, brepiges, aGroup); + theDI.Add("testwriteiges", "testwriteiges filename.igs shape", __FILE__, testwrite, aGroup); + + // Load XSDRAW session for pilot activation + XSDRAW::LoadDraw(theDI); } + +// Declare entry point PLUGINFACTORY +DPLUGIN(XSDRAWIGES) diff --git a/src/XSDRAWIGES/XSDRAWIGES.hxx b/src/XSDRAWIGES/XSDRAWIGES.hxx index e78351cdd1..19a0a447e2 100644 --- a/src/XSDRAWIGES/XSDRAWIGES.hxx +++ b/src/XSDRAWIGES/XSDRAWIGES.hxx @@ -1,7 +1,4 @@ -// Created on: 1995-03-15 -// Created by: Christian CAILLET -// Copyright (c) 1995-1999 Matra Datavision -// Copyright (c) 1999-2014 OPEN CASCADE SAS +// Copyright (c) 2023 OPEN CASCADE SAS // // This file is part of Open CASCADE Technology software library. // @@ -22,45 +19,13 @@ #include - -//! XSDRAW for IGES : commands IGESSelect, Controller, transfer -class XSDRAWIGES +class XSDRAWIGES { -public: - DEFINE_STANDARD_ALLOC +public: - - //! Inits IGESSelect commands, for DRAW - Standard_EXPORT static void InitSelect(); - - //! Inits IGESToBRep for DRAW - Standard_EXPORT static void InitToBRep (Draw_Interpretor& theCommands); - - //! Inits BRepToIGES for DRAW - Standard_EXPORT static void InitFromBRep (Draw_Interpretor& theCommands); - - - - -protected: - - - - - -private: - - - - - + //! Loads all Draw commands of XSDRAWIGES. Used for plugin. + Standard_EXPORT static void Factory(Draw_Interpretor& theDI); }; - - - - - - #endif // _XSDRAWIGES_HeaderFile diff --git a/src/XSDRAWOBJ/FILES b/src/XSDRAWOBJ/FILES new file mode 100644 index 0000000000..9659ffd3c3 --- /dev/null +++ b/src/XSDRAWOBJ/FILES @@ -0,0 +1,2 @@ +XSDRAWOBJ.cxx +XSDRAWOBJ.hxx diff --git a/src/XSDRAWOBJ/XSDRAWOBJ.cxx b/src/XSDRAWOBJ/XSDRAWOBJ.cxx new file mode 100644 index 0000000000..87d1795d73 --- /dev/null +++ b/src/XSDRAWOBJ/XSDRAWOBJ.cxx @@ -0,0 +1,405 @@ +// Copyright (c) 2023 OPEN CASCADE SAS +// +// This file is part of Open CASCADE Technology software library. +// +// This library is free software; you can redistribute it and/or modify it under +// the terms of the GNU Lesser General Public License version 2.1 as published +// by the Free Software Foundation, with special exception defined in the file +// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT +// distribution for complete text of the license and disclaimer of any warranty. +// +// Alternatively, this file may be used under the terms of Open CASCADE +// commercial license or contractual agreement. + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +//============================================================================= +//function : parseCoordinateSystem +//purpose : Parse RWMesh_CoordinateSystem enumeration +//============================================================================= +static bool parseCoordinateSystem(const char* theArg, + RWMesh_CoordinateSystem& theSystem) +{ + TCollection_AsciiString aCSStr(theArg); + aCSStr.LowerCase(); + if (aCSStr == "zup") + { + theSystem = RWMesh_CoordinateSystem_Zup; + } + else if (aCSStr == "yup") + { + theSystem = RWMesh_CoordinateSystem_Yup; + } + else + { + return Standard_False; + } + return Standard_True; +} + +//============================================================================= +//function : ReadObj +//purpose : Reads OBJ file +//============================================================================= +static Standard_Integer ReadObj (Draw_Interpretor& theDI, + Standard_Integer theNbArgs, + const char** theArgVec) +{ + TCollection_AsciiString aDestName, aFilePath; + Standard_Boolean toUseExistingDoc = Standard_False; + Standard_Real aFileUnitFactor = -1.0; + RWMesh_CoordinateSystem aResultCoordSys = RWMesh_CoordinateSystem_Zup, aFileCoordSys = RWMesh_CoordinateSystem_Yup; + Standard_Boolean toListExternalFiles = Standard_False, isSingleFace = Standard_False, isSinglePrecision = Standard_False; + Standard_Boolean isNoDoc = (TCollection_AsciiString(theArgVec[0]) == "readobj"); + for (Standard_Integer anArgIter = 1; anArgIter < theNbArgs; ++anArgIter) + { + TCollection_AsciiString anArgCase (theArgVec[anArgIter]); + anArgCase.LowerCase(); + if (anArgIter + 1 < theNbArgs + && (anArgCase == "-unit" + || anArgCase == "-units" + || anArgCase == "-fileunit" + || anArgCase == "-fileunits")) + { + const TCollection_AsciiString aUnitStr (theArgVec[++anArgIter]); + aFileUnitFactor = UnitsAPI::AnyToSI (1.0, aUnitStr.ToCString()); + if (aFileUnitFactor <= 0.0) + { + Message::SendFail() << "Syntax error: wrong length unit '" << aUnitStr << "'"; + return 1; + } + } + else if (anArgIter + 1 < theNbArgs + && (anArgCase == "-filecoordinatesystem" + || anArgCase == "-filecoordsystem" + || anArgCase == "-filecoordsys")) + { + if (!parseCoordinateSystem (theArgVec[++anArgIter], aFileCoordSys)) + { + Message::SendFail() << "Syntax error: unknown coordinate system '" << theArgVec[anArgIter] << "'"; + return 1; + } + } + else if (anArgIter + 1 < theNbArgs + && (anArgCase == "-resultcoordinatesystem" + || anArgCase == "-resultcoordsystem" + || anArgCase == "-resultcoordsys" + || anArgCase == "-rescoordsys")) + { + if (!parseCoordinateSystem (theArgVec[++anArgIter], aResultCoordSys)) + { + Message::SendFail() << "Syntax error: unknown coordinate system '" << theArgVec[anArgIter] << "'"; + return 1; + } + } + else if (anArgCase == "-singleprecision" + || anArgCase == "-singleprec") + { + isSinglePrecision = Standard_True; + if (anArgIter + 1 < theNbArgs + && Draw::ParseOnOff (theArgVec[anArgIter + 1], isSinglePrecision)) + { + ++anArgIter; + } + } + else if (isNoDoc + && (anArgCase == "-singleface" + || anArgCase == "-singletriangulation")) + { + isSingleFace = Standard_True; + } + else if (!isNoDoc + && (anArgCase == "-nocreate" + || anArgCase == "-nocreatedoc")) + { + toUseExistingDoc = Standard_True; + if (anArgIter + 1 < theNbArgs + && Draw::ParseOnOff (theArgVec[anArgIter + 1], toUseExistingDoc)) + { + ++anArgIter; + } + } + else if (anArgCase == "-listexternalfiles" + || anArgCase == "-listexternals" + || anArgCase == "-listexternal" + || anArgCase == "-external" + || anArgCase == "-externalfiles") + { + toListExternalFiles = Standard_True; + } + else if (aDestName.IsEmpty()) + { + aDestName = theArgVec[anArgIter]; + } + else if (aFilePath.IsEmpty()) + { + aFilePath = theArgVec[anArgIter]; + } + else + { + Message::SendFail() << "Syntax error at '" << theArgVec[anArgIter] << "'"; + return 1; + } + } + if (aFilePath.IsEmpty()) + { + Message::SendFail() << "Syntax error: wrong number of arguments"; + return 1; + } + + Handle(Draw_ProgressIndicator) aProgress = new Draw_ProgressIndicator (theDI, 1); + Handle(TDocStd_Document) aDoc; + if (!isNoDoc + && !toListExternalFiles) + { + Handle(TDocStd_Application) anApp = DDocStd::GetApplication(); + Standard_CString aNameVar = aDestName.ToCString(); + DDocStd::GetDocument (aNameVar, aDoc, Standard_False); + if (aDoc.IsNull()) + { + if (toUseExistingDoc) + { + Message::SendFail() << "Error: document with name " << aDestName << " does not exist"; + return 1; + } + anApp->NewDocument (TCollection_ExtendedString ("BinXCAF"), aDoc); + } + else if (!toUseExistingDoc) + { + Message::SendFail() << "Error: document with name " << aDestName << " already exists"; + return 1; + } + } + const Standard_Real aScaleFactorM = XSDRAW::GetLengthUnit() / 1000; + + RWObj_CafReader aReader; + aReader.SetSinglePrecision (isSinglePrecision); + aReader.SetSystemLengthUnit (aScaleFactorM); + aReader.SetSystemCoordinateSystem (aResultCoordSys); + aReader.SetFileLengthUnit (aFileUnitFactor); + aReader.SetFileCoordinateSystem (aFileCoordSys); + aReader.SetDocument (aDoc); + if (isSingleFace) + { + RWObj_TriangulationReader aSimpleReader; + aSimpleReader.SetSinglePrecision (isSinglePrecision); + aSimpleReader.SetCreateShapes (Standard_False); + aSimpleReader.SetTransformation (aReader.CoordinateSystemConverter()); + aSimpleReader.Read (aFilePath.ToCString(), aProgress->Start()); + + Handle(Poly_Triangulation) aTriangulation = aSimpleReader.GetTriangulation(); + TopoDS_Face aFace; + BRep_Builder aBuiler; + aBuiler.MakeFace (aFace); + aBuiler.UpdateFace (aFace, aTriangulation); + DBRep::Set (aDestName.ToCString(), aFace); + return 0; + } + + if (toListExternalFiles) + { + aReader.ProbeHeader (aFilePath); + for (NCollection_IndexedMap::Iterator aFileIter (aReader.ExternalFiles()); aFileIter.More(); aFileIter.Next()) + { + theDI << "\"" << aFileIter.Value() << "\" "; + } + } + else + { + aReader.Perform (aFilePath, aProgress->Start()); + if (isNoDoc) + { + DBRep::Set (aDestName.ToCString(), aReader.SingleShape()); + } + else + { + Handle(DDocStd_DrawDocument) aDrawDoc = new DDocStd_DrawDocument (aDoc); + TDataStd_Name::Set (aDoc->GetData()->Root(), aDestName); + Draw::Set (aDestName.ToCString(), aDrawDoc); + } + } + return 0; +} + +///============================================================================= +//function : WriteObj +//purpose : Writes OBJ file +//============================================================================= +static Standard_Integer WriteObj (Draw_Interpretor& theDI, + Standard_Integer theNbArgs, + const char** theArgVec) +{ + TCollection_AsciiString anObjFilePath; + Handle(TDocStd_Document) aDoc; + Handle(TDocStd_Application) anApp = DDocStd::GetApplication(); + TColStd_IndexedDataMapOfStringString aFileInfo; + Standard_Real aFileUnitFactor = -1.0; + RWMesh_CoordinateSystem aSystemCoordSys = RWMesh_CoordinateSystem_Zup, aFileCoordSys = RWMesh_CoordinateSystem_Yup; + for (Standard_Integer anArgIter = 1; anArgIter < theNbArgs; ++anArgIter) + { + TCollection_AsciiString anArgCase (theArgVec[anArgIter]); + anArgCase.LowerCase(); + if (anArgIter + 1 < theNbArgs + && (anArgCase == "-unit" + || anArgCase == "-units" + || anArgCase == "-fileunit" + || anArgCase == "-fileunits")) + { + const TCollection_AsciiString aUnitStr (theArgVec[++anArgIter]); + aFileUnitFactor = UnitsAPI::AnyToSI (1.0, aUnitStr.ToCString()); + if (aFileUnitFactor <= 0.0) + { + Message::SendFail() << "Syntax error: wrong length unit '" << aUnitStr << "'"; + return 1; + } + } + else if (anArgIter + 1 < theNbArgs + && (anArgCase == "-filecoordinatesystem" + || anArgCase == "-filecoordsystem" + || anArgCase == "-filecoordsys")) + { + if (!parseCoordinateSystem (theArgVec[++anArgIter], aFileCoordSys)) + { + Message::SendFail() << "Syntax error: unknown coordinate system '" << theArgVec[anArgIter] << "'"; + return 1; + } + } + else if (anArgIter + 1 < theNbArgs + && (anArgCase == "-systemcoordinatesystem" + || anArgCase == "-systemcoordsystem" + || anArgCase == "-systemcoordsys" + || anArgCase == "-syscoordsys")) + { + if (!parseCoordinateSystem (theArgVec[++anArgIter], aSystemCoordSys)) + { + Message::SendFail() << "Syntax error: unknown coordinate system '" << theArgVec[anArgIter] << "'"; + return 1; + } + } + else if (anArgCase == "-comments" + && anArgIter + 1 < theNbArgs) + { + aFileInfo.Add ("Comments", theArgVec[++anArgIter]); + } + else if (anArgCase == "-author" + && anArgIter + 1 < theNbArgs) + { + aFileInfo.Add ("Author", theArgVec[++anArgIter]); + } + else if (aDoc.IsNull()) + { + Standard_CString aNameVar = theArgVec[anArgIter]; + DDocStd::GetDocument (aNameVar, aDoc, false); + if (aDoc.IsNull()) + { + TopoDS_Shape aShape = DBRep::Get (aNameVar); + if (aShape.IsNull()) + { + Message::SendFail() << "Syntax error: '" << aNameVar << "' is not a shape nor document"; + return 1; + } + + anApp->NewDocument (TCollection_ExtendedString ("BinXCAF"), aDoc); + Handle(XCAFDoc_ShapeTool) aShapeTool = XCAFDoc_DocumentTool::ShapeTool (aDoc->Main()); + aShapeTool->AddShape (aShape); + } + } + else if (anObjFilePath.IsEmpty()) + { + anObjFilePath = theArgVec[anArgIter]; + } + else + { + Message::SendFail() << "Syntax error at '" << theArgVec[anArgIter] << "'"; + return 1; + } + } + if (anObjFilePath.IsEmpty()) + { + Message::SendFail() << "Syntax error: wrong number of arguments"; + return 1; + } + + Handle(Draw_ProgressIndicator) aProgress = new Draw_ProgressIndicator (theDI, 1); + + const Standard_Real aSystemUnitFactor = XSDRAW::GetLengthUnit() * 0.001; + RWObj_CafWriter aWriter (anObjFilePath); + aWriter.ChangeCoordinateSystemConverter().SetInputLengthUnit (aSystemUnitFactor); + aWriter.ChangeCoordinateSystemConverter().SetInputCoordinateSystem (aSystemCoordSys); + aWriter.ChangeCoordinateSystemConverter().SetOutputLengthUnit (aFileUnitFactor); + aWriter.ChangeCoordinateSystemConverter().SetOutputCoordinateSystem (aFileCoordSys); + aWriter.Perform (aDoc, aFileInfo, aProgress->Start()); + return 0; +} + +//======================================================================= +//function : Factory +//purpose : +//======================================================================= +void XSDRAWOBJ::Factory(Draw_Interpretor& theDI) +{ + static Standard_Boolean aIsActivated = Standard_False; + if (aIsActivated) + { + return; + } + aIsActivated = Standard_True; + + const char* aGroup = "XSTEP-STL/VRML"; // Step transfer file commands + theDI.Add("ReadObj", + "ReadObj Doc file [-fileCoordSys {Zup|Yup}] [-fileUnit Unit]" + "\n\t\t: [-resultCoordSys {Zup|Yup}] [-singlePrecision]" + "\n\t\t: [-listExternalFiles] [-noCreateDoc]" + "\n\t\t: Read OBJ file into XDE document." + "\n\t\t: -fileUnit length unit of OBJ file content;" + "\n\t\t: -fileCoordSys coordinate system defined by OBJ file; Yup when not specified." + "\n\t\t: -resultCoordSys result coordinate system; Zup when not specified." + "\n\t\t: -singlePrecision truncate vertex data to single precision during read; FALSE by default." + "\n\t\t: -listExternalFiles do not read mesh and only list external files." + "\n\t\t: -noCreateDoc read into existing XDE document.", + __FILE__, ReadObj, aGroup); + theDI.Add("readobj", + "readobj shape file [-fileCoordSys {Zup|Yup}] [-fileUnit Unit]" + "\n\t\t: [-resultCoordSys {Zup|Yup}] [-singlePrecision]" + "\n\t\t: [-singleFace]" + "\n\t\t: Same as ReadObj but reads OBJ file into a shape instead of a document." + "\n\t\t: -singleFace merge OBJ content into a single triangulation Face.", + __FILE__, ReadObj, aGroup); + theDI.Add("WriteObj", + "WriteObj Doc file [-fileCoordSys {Zup|Yup}] [-fileUnit Unit]" + "\n\t\t: [-systemCoordSys {Zup|Yup}]" + "\n\t\t: [-comments Text] [-author Name]" + "\n\t\t: Write XDE document into OBJ file." + "\n\t\t: -fileUnit length unit of OBJ file content;" + "\n\t\t: -fileCoordSys coordinate system defined by OBJ file; Yup when not specified." + "\n\t\t: -systemCoordSys system coordinate system; Zup when not specified.", + __FILE__, WriteObj, aGroup); + theDI.Add("writeobj", + "writeobj shape file", + __FILE__, WriteObj, aGroup); + + // Load XSDRAW session for pilot activation + XSDRAW::LoadDraw(theDI); +} + +// Declare entry point PLUGINFACTORY +DPLUGIN(XSDRAWOBJ) diff --git a/src/XSDRAWSTLVRML/XSDRAWSTLVRML_DataMapIteratorOfElemNodesMap.hxx b/src/XSDRAWOBJ/XSDRAWOBJ.hxx similarity index 59% rename from src/XSDRAWSTLVRML/XSDRAWSTLVRML_DataMapIteratorOfElemNodesMap.hxx rename to src/XSDRAWOBJ/XSDRAWOBJ.hxx index 3ca906cdd6..d935601004 100644 --- a/src/XSDRAWSTLVRML/XSDRAWSTLVRML_DataMapIteratorOfElemNodesMap.hxx +++ b/src/XSDRAWOBJ/XSDRAWOBJ.hxx @@ -1,4 +1,4 @@ -// Copyright (c) 2015 OPEN CASCADE SAS +// Copyright (c) 2023 OPEN CASCADE SAS // // This file is part of Open CASCADE Technology software library. // @@ -11,10 +11,21 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. +#ifndef _XSDRAWOBJ_HeaderFile +#define _XSDRAWOBJ_HeaderFile -#ifndef XSDRAWSTLVRML_DataMapIteratorOfElemNodesMap_HeaderFile -#define XSDRAWSTLVRML_DataMapIteratorOfElemNodesMap_HeaderFile +#include +#include -#include +#include -#endif +class XSDRAWOBJ +{ + DEFINE_STANDARD_ALLOC +public: + + //! Loads all Draw commands of XSDRAWOBJ. Used for plugin. + Standard_EXPORT static void Factory(Draw_Interpretor& theDI); +}; + +#endif // _XSDRAWOBJ_HeaderFile diff --git a/src/XSDRAWPLY/FILES b/src/XSDRAWPLY/FILES new file mode 100644 index 0000000000..3501638378 --- /dev/null +++ b/src/XSDRAWPLY/FILES @@ -0,0 +1,2 @@ +XSDRAWPLY.cxx +XSDRAWPLY.hxx diff --git a/src/XSDRAWPLY/XSDRAWPLY.cxx b/src/XSDRAWPLY/XSDRAWPLY.cxx new file mode 100644 index 0000000000..a16d9f1e2f --- /dev/null +++ b/src/XSDRAWPLY/XSDRAWPLY.cxx @@ -0,0 +1,348 @@ +// Copyright (c) 2023 OPEN CASCADE SAS +// +// This file is part of Open CASCADE Technology software library. +// +// This library is free software; you can redistribute it and/or modify it under +// the terms of the GNU Lesser General Public License version 2.1 as published +// by the Free Software Foundation, with special exception defined in the file +// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT +// distribution for complete text of the license and disclaimer of any warranty. +// +// Alternatively, this file may be used under the terms of Open CASCADE +// commercial license or contractual agreement. + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +//======================================================================= +//function : writeply +//purpose : write PLY file +//======================================================================= +static Standard_Integer WritePly (Draw_Interpretor& theDI, + Standard_Integer theNbArgs, + const char** theArgVec) +{ + Handle(TDocStd_Document) aDoc; + Handle(TDocStd_Application) anApp = DDocStd::GetApplication(); + TCollection_AsciiString aShapeName, aFileName; + + Standard_Real aDist = 0.0; + Standard_Real aDens = Precision::Infinite(); + Standard_Real aTol = Precision::Confusion(); + bool hasColors = true, hasNormals = true, hasTexCoords = false, hasPartId = true, hasFaceId = false; + bool isPntSet = false, isDensityPoints = false; + TColStd_IndexedDataMapOfStringString aFileInfo; + for (Standard_Integer anArgIter = 1; anArgIter < theNbArgs; ++anArgIter) + { + TCollection_AsciiString anArg (theArgVec[anArgIter]); + anArg.LowerCase(); + if (anArg == "-normal") + { + hasNormals = Draw::ParseOnOffIterator (theNbArgs, theArgVec, anArgIter); + } + else if (anArg == "-nonormal") + { + hasNormals = !Draw::ParseOnOffIterator (theNbArgs, theArgVec, anArgIter); + } + else if (anArg == "-color" + || anArg == "-nocolor" + || anArg == "-colors" + || anArg == "-nocolors") + { + hasColors = Draw::ParseOnOffNoIterator (theNbArgs, theArgVec, anArgIter); + } + else if (anArg == "-uv" + || anArg == "-nouv") + { + hasTexCoords = Draw::ParseOnOffNoIterator (theNbArgs, theArgVec, anArgIter); + } + else if (anArg == "-partid") + { + hasPartId = Draw::ParseOnOffNoIterator (theNbArgs, theArgVec, anArgIter); + hasFaceId = hasFaceId && !hasPartId; + } + else if (anArg == "-surfid" + || anArg == "-surfaceid" + || anArg == "-faceid") + { + hasFaceId = Draw::ParseOnOffNoIterator (theNbArgs, theArgVec, anArgIter); + hasPartId = hasPartId && !hasFaceId; + } + else if (anArg == "-pntset" + || anArg == "-pntcloud" + || anArg == "-pointset" + || anArg == "-pointcloud" + || anArg == "-cloud" + || anArg == "-points") + { + isPntSet = Draw::ParseOnOffIterator (theNbArgs, theArgVec, anArgIter); + } + else if ((anArg == "-dist" + || anArg == "-distance") + && anArgIter + 1 < theNbArgs + && Draw::ParseReal (theArgVec[anArgIter + 1], aDist)) + { + ++anArgIter; + isPntSet = true; + if (aDist < 0.0) + { + theDI << "Syntax error: -distance value should be >= 0.0"; + return 1; + } + aDist = Max (aDist, Precision::Confusion()); + } + else if ((anArg == "-dens" + || anArg == "-density") + && anArgIter + 1 < theNbArgs + && Draw::ParseReal (theArgVec[anArgIter + 1], aDens)) + { + ++anArgIter; + isDensityPoints = Standard_True; + isPntSet = true; + if (aDens <= 0.0) + { + theDI << "Syntax error: -density value should be > 0.0"; + return 1; + } + } + else if ((anArg == "-tol" + || anArg == "-tolerance") + && anArgIter + 1 < theNbArgs + && Draw::ParseReal (theArgVec[anArgIter + 1], aTol)) + { + ++anArgIter; + isPntSet = true; + if (aTol < Precision::Confusion()) + { + theDI << "Syntax error: -tol value should be >= " << Precision::Confusion(); + return 1; + } + } + else if (anArg == "-comments" + && anArgIter + 1 < theNbArgs) + { + aFileInfo.Add ("Comments", theArgVec[++anArgIter]); + } + else if (anArg == "-author" + && anArgIter + 1 < theNbArgs) + { + aFileInfo.Add ("Author", theArgVec[++anArgIter]); + } + else if (aDoc.IsNull()) + { + if (aShapeName.IsEmpty()) + { + aShapeName = theArgVec[anArgIter]; + } + + Standard_CString aNameVar = theArgVec[anArgIter]; + DDocStd::GetDocument (aNameVar, aDoc, false); + if (aDoc.IsNull()) + { + TopoDS_Shape aShape = DBRep::Get (aNameVar); + if (!aShape.IsNull()) + { + anApp->NewDocument (TCollection_ExtendedString ("BinXCAF"), aDoc); + Handle(XCAFDoc_ShapeTool) aShapeTool = XCAFDoc_DocumentTool::ShapeTool (aDoc->Main()); + aShapeTool->AddShape (aShape); + } + } + } + else if (aFileName.IsEmpty()) + { + aFileName = theArgVec[anArgIter]; + } + else + { + theDI << "Syntax error at '" << theArgVec[anArgIter] << "'"; + return 1; + } + } + if (aDoc.IsNull() + && !aShapeName.IsEmpty()) + { + theDI << "Syntax error: '" << aShapeName << "' is not a shape nor document"; + return 1; + } + else if (aDoc.IsNull() + || aFileName.IsEmpty()) + { + theDI << "Syntax error: wrong number of arguments"; + return 1; + } + + TDF_LabelSequence aRootLabels; + Handle(XCAFDoc_ShapeTool) aShapeTool = XCAFDoc_DocumentTool::ShapeTool (aDoc->Main()); + aShapeTool->GetFreeShapes (aRootLabels); + if (aRootLabels.IsEmpty()) + { + theDI << "Error: empty document"; + return 1; + } + + if (isPntSet) + { + class PointCloudPlyWriter : public BRepLib_PointCloudShape, public RWPly_PlyWriterContext + { + public: + PointCloudPlyWriter (Standard_Real theTol) + : BRepLib_PointCloudShape (TopoDS_Shape(), theTol) {} + + void AddFaceColor (const TopoDS_Shape& theFace, const Graphic3d_Vec4ub& theColor) + { myFaceColor.Bind (theFace, theColor); } + + protected: + virtual void addPoint (const gp_Pnt& thePoint, + const gp_Vec& theNorm, + const gp_Pnt2d& theUV, + const TopoDS_Shape& theFace) + { + Graphic3d_Vec4ub aColor; + myFaceColor.Find (theFace, aColor); + RWPly_PlyWriterContext::WriteVertex (thePoint, + Graphic3d_Vec3 ((float )theNorm.X(), (float )theNorm.Y(), (float )theNorm.Z()), + Graphic3d_Vec2 ((float )theUV.X(), (float )theUV.Y()), + aColor); + } + + private: + NCollection_DataMap myFaceColor; + }; + + PointCloudPlyWriter aPlyCtx (aTol); + aPlyCtx.SetNormals (hasNormals); + aPlyCtx.SetColors (hasColors); + aPlyCtx.SetTexCoords (hasTexCoords); + + TopoDS_Compound aComp; + BRep_Builder().MakeCompound (aComp); + for (XCAFPrs_DocumentExplorer aDocExplorer (aDoc, aRootLabels, XCAFPrs_DocumentExplorerFlags_OnlyLeafNodes); + aDocExplorer.More(); aDocExplorer.Next()) + { + const XCAFPrs_DocumentNode& aDocNode = aDocExplorer.Current(); + for (RWMesh_FaceIterator aFaceIter (aDocNode.RefLabel, aDocNode.Location, true, aDocNode.Style); aFaceIter.More(); aFaceIter.Next()) + { + BRep_Builder().Add (aComp, aFaceIter.Face()); + Graphic3d_Vec4ub aColorVec (255); + if (aFaceIter.HasFaceColor()) + { + Graphic3d_Vec4 aColorF = aFaceIter.FaceColor(); + aColorVec.SetValues ((unsigned char )int(aColorF.r() * 255.0f), + (unsigned char )int(aColorF.g() * 255.0f), + (unsigned char )int(aColorF.b() * 255.0f), + (unsigned char )int(aColorF.a() * 255.0f)); + } + aPlyCtx.AddFaceColor (aFaceIter.Face(), aColorVec); + } + } + aPlyCtx.SetShape (aComp); + + Standard_Integer aNbPoints = isDensityPoints + ? aPlyCtx.NbPointsByDensity (aDens) + : aPlyCtx.NbPointsByTriangulation(); + if (aNbPoints <= 0) + { + theDI << "Error: unable to generate points"; + return 0; + } + + if (!aPlyCtx.Open (aFileName) + || !aPlyCtx.WriteHeader (aNbPoints, 0, TColStd_IndexedDataMapOfStringString())) + { + theDI << "Error: unable to create file '" << aFileName << "'"; + return 0; + } + + Standard_Boolean isDone = isDensityPoints + ? aPlyCtx.GeneratePointsByDensity (aDens) + : aPlyCtx.GeneratePointsByTriangulation(); + if (!isDone) + { + theDI << "Error: Point cloud was not generated in file '" << aFileName << "'"; + } + else if (!aPlyCtx.Close()) + { + theDI << "Error: Point cloud file '" << aFileName << "' was not written"; + } + else + { + theDI << aNbPoints; + } + } + else + { + Handle(Draw_ProgressIndicator) aProgress = new Draw_ProgressIndicator (theDI, 1); + RWPly_CafWriter aPlyCtx (aFileName); + aPlyCtx.SetNormals (hasNormals); + aPlyCtx.SetColors (hasColors); + aPlyCtx.SetTexCoords (hasTexCoords); + aPlyCtx.SetPartId (hasPartId); + aPlyCtx.SetFaceId (hasFaceId); + aPlyCtx.Perform (aDoc, aFileInfo, aProgress->Start()); + } + return 0; +} + +//======================================================================= +//function : Factory +//purpose : +//======================================================================= +void XSDRAWPLY::Factory(Draw_Interpretor& theDI) +{ + static Standard_Boolean aIsActivated = Standard_False; + if (aIsActivated) + { + return; + } + aIsActivated = Standard_True; + + const char* aGroup = "XSTEP-STL/VRML"; // Step transfer file commands + //XSDRAW::LoadDraw(theCommands); + theDI.Add("WritePly", R"( +WritePly Doc file [-normals {0|1}]=1 [-colors {0|1}]=1 [-uv {0|1}]=0 [-partId {0|1}]=1 [-faceId {0|1}]=0 + [-pointCloud {0|1}]=0 [-distance Value]=0.0 [-density Value] [-tolerance Value] +Write document or triangulated shape into PLY file. + -normals write per-vertex normals + -colors write per-vertex colors + -uv write per-vertex UV coordinates + -partId write per-element part index (alternative to -faceId) + -faceId write per-element face index (alternative to -partId) + +Generate point cloud out of the shape and write it into PLY file. + -pointCloud write point cloud instead without triangulation indices + -distance sets distance from shape into the range [0, Value]; + -density sets density of points to generate randomly on surface; + -tolerance sets tolerance; default value is Precision::Confusion(); +)", __FILE__, WritePly, aGroup); + theDI.Add("writeply", + "writeply shape file", + __FILE__, WritePly, aGroup); + + // Load XSDRAW session for pilot activation + XSDRAW::LoadDraw(theDI); +} + +// Declare entry point PLUGINFACTORY +DPLUGIN(XSDRAWPLY) diff --git a/src/XSDRAWSTLVRML/XSDRAWSTLVRML_CoordsMap.hxx b/src/XSDRAWPLY/XSDRAWPLY.hxx similarity index 54% rename from src/XSDRAWSTLVRML/XSDRAWSTLVRML_CoordsMap.hxx rename to src/XSDRAWPLY/XSDRAWPLY.hxx index 509d05936f..0802003255 100644 --- a/src/XSDRAWSTLVRML/XSDRAWSTLVRML_CoordsMap.hxx +++ b/src/XSDRAWPLY/XSDRAWPLY.hxx @@ -1,6 +1,4 @@ -// Created on: 2000-05-30 -// Created by: Sergey MOZOKHIN -// Copyright (c) 2000-2014 OPEN CASCADE SAS +// Copyright (c) 2023 OPEN CASCADE SAS // // This file is part of Open CASCADE Technology software library. // @@ -13,14 +11,21 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -#ifndef XSDRAWSTLVRML_CoordsMap_HeaderFile -#define XSDRAWSTLVRML_CoordsMap_HeaderFile +#ifndef _XSDRAWPLY_HeaderFile +#define _XSDRAWPLY_HeaderFile -#include -#include +#include +#include -typedef NCollection_DataMap XSDRAWSTLVRML_CoordsMap; -typedef NCollection_DataMap::Iterator XSDRAWSTLVRML_DataMapIteratorOfCoordsMap; +#include +class XSDRAWPLY +{ + DEFINE_STANDARD_ALLOC +public: -#endif + //! Loads all Draw commands of XSDRAWPLY. Used for plugin. + Standard_EXPORT static void Factory(Draw_Interpretor& theDI); +}; + +#endif // _XSDRAWPLY_HeaderFile diff --git a/src/XSDRAWSTEP/XSDRAWSTEP.cxx b/src/XSDRAWSTEP/XSDRAWSTEP.cxx index d03c769784..d15e01ddd9 100644 --- a/src/XSDRAWSTEP/XSDRAWSTEP.cxx +++ b/src/XSDRAWSTEP/XSDRAWSTEP.cxx @@ -1,4 +1,4 @@ -// Copyright (c) 1999-2014 OPEN CASCADE SAS +// Copyright (c) 2023 OPEN CASCADE SAS // // This file is part of Open CASCADE Technology software library. // @@ -11,97 +11,73 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -//:k8 abv 6 Jan 98: using parameter "step.group" for writing assemblies/shapes +#include #include -#include +#include +#include +#include +#include #include +#include #include -#include #include #include #include -#include #include #include +#include +#include #include #include #include #include #include #include -#include #include #include #include #include #include -#include -#include -#include +#include +#include +#include +#include #include #include -#include #include #include -#include -#include - -#include -// Pour le transfert (write) -// Pour NewModel et Write : definition de produit (temporaire ...) -// steptrans -extern "C" { -static void cleanpilot () -{ - XSDRAW::Session()->ClearData(1); -} -} - -//======================================================================= -//function : Init -//purpose : -//======================================================================= - -void XSDRAWSTEP::Init () +namespace { - Handle(StepSelect_Activator) stepact = new StepSelect_Activator; - if (STEPControl_Controller::Init()) // XSDRAW::SetNorm("STEP AP-214"); trop tot - XSDRAW::SetController(XSControl_Controller::Recorded("STEP")); - - atexit (cleanpilot); + using ExternalFileMap = NCollection_DataMap; } -// ######## COMMANDE stepread : teste le Reader ######### //======================================================================= //function : stepread -//purpose : +//purpose : //======================================================================= - -static Standard_Integer stepread (Draw_Interpretor& di, Standard_Integer argc, const char** argv) +static Standard_Integer stepread(Draw_Interpretor& theDI, + Standard_Integer theNbArgs, + const char** theArgVec) { - if (argc < 3) { - di << "Use: stepread [file] [f or r (type of model full or reduced)]\n"; + if (theNbArgs < 3) + { + theDI << "Use: stepread [file] [f or r (type of model full or reduced)]\n"; return 1; } - // On admet le controller AP214 ou une variante - DeclareAndCast(STEPControl_Controller,ctl,XSDRAW::Controller()); - if (ctl.IsNull()) XSDRAW::SetNorm("STEP"); - // Progress indicator - Handle(Draw_ProgressIndicator) progress = new Draw_ProgressIndicator ( di, 1 ); - Message_ProgressScope aPSRoot (progress->Start(), "Reading", 100); - - STEPControl_Reader sr (XSDRAW::Session(),Standard_False); - TCollection_AsciiString fnom,rnom; - Standard_Boolean modfic = XSDRAW::FileAndVar - (argv[1],argv[2],"STEP",fnom,rnom); - if (modfic) di<<" File STEP to read : "<Start(), "Reading", 100); + + STEPControl_Reader sr(XSDRAW::Session(), Standard_False); + TCollection_AsciiString fnom, rnom; + Standard_Boolean modfic = XSDRAW::FileAndVar(theArgVec[1], theArgVec[2], "STEP", fnom, rnom); + if (modfic) theDI << " File STEP to read : " << fnom.ToCString() << "\n"; + else theDI << " Model taken from the session : " << fnom.ToCString() << "\n"; + theDI << " -- Names of variables BREP-DRAW prefixed by : " << rnom.ToCString() << "\n"; IFSelect_ReturnStatus readstat = IFSelect_RetVoid; aPSRoot.SetName("Loading"); @@ -110,344 +86,370 @@ static Standard_Integer stepread (Draw_Interpretor& di, Standard_Integer argc, c Standard_Boolean fromtcl = Standard_False; Standard_Boolean aFullMode = Standard_False; Standard_Integer k = 3; - if(argc > k ) + if (theNbArgs > k) { - if(argv[k][0] == 'f' || argv[3][0] == 'F') + if (theArgVec[k][0] == 'f' || theArgVec[3][0] == 'F') { aFullMode = Standard_True; k++; } - else if(argv[k][0] == 'r' || argv[3][0] == 'R') + else if (theArgVec[k][0] == 'r' || theArgVec[3][0] == 'R') { aFullMode = Standard_False; k++; } else fromtcl = Standard_True; - } - if(!fromtcl) - fromtcl = argc > k; - if(aFullMode) - std::cout<<"Full model for translation with additional info will be used \n"< k; + if (aFullMode) + std::cout << "Full model for translation with additional info will be used \n" << std::flush; else - std::cout<<"Reduced model for translation without additional info will be used \n"<SetModeStat(aFullMode); + std::cout << "Reduced model for translation without additional info will be used \n" << std::flush; + sr.WS()->SetModeStat(aFullMode); - if (modfic) readstat = sr.ReadFile (fnom.ToCString()); + if (modfic) readstat = sr.ReadFile(fnom.ToCString()); else if (XSDRAW::Session()->NbStartingEntities() > 0) readstat = IFSelect_RetDone; aPSRoot.Next(20); // On average loading takes 20% if (aPSRoot.UserBreak()) return 1; - if (readstat != IFSelect_RetDone) { - if (modfic) di<<"Could not read file "<PrepareForTransfer(); // update unit info - sr.SetSystemLengthUnit(UnitsMethods::GetCasCadeLengthUnit()); + sr.SetSystemLengthUnit(XSDRAW::GetLengthUnit()); // nom = "." -> fichier deja lu Standard_Integer i, num, nbs, modepri = 1; if (fromtcl) modepri = 4; - while (modepri) { + while (modepri) + { num = sr.NbRootsForTransfer(); - if (!fromtcl) { - di<<"NbRootsForTransfer="<Print (sr.RootForTransfer(i), aTmpStream); - di << aTmpStream.str().c_str(); - di<<" Type:"<DynamicType()->Name()<<"\n"; + sr.Model()->Print(sr.RootForTransfer(i), aTmpStream); + theDI << aTmpStream.str().c_str(); + theDI << " Type:" << sr.RootForTransfer(i)->DynamicType()->Name() << "\n"; } - std::cout<<"Mode (0 End, 1 root n0 1, 2 one root/n0, 3 one entity/n0, 4 Selection) : "<>modepri; + std::cout << "Mode (0 End, 1 root n0 1, 2 one root/n0, 3 one entity/n0, 4 Selection) : " << std::flush; + std::cin >> modepri; } - if (modepri == 0) { di<<"End Reading STEP\n"; return 0; } - if (modepri <= 2) { + if (modepri == 0) { theDI << "End Reading STEP\n"; return 0; } + if (modepri <= 2) + { num = 1; - if (modepri == 2) { - std::cout<<"Root N0 : "<>num; + if (modepri == 2) + { + std::cout << "Root N0 : " << std::flush; std::cin >> num; } aPSRoot.SetName("Translation"); progress->Show(aPSRoot); - if (!sr.TransferRoot (num, aPSRoot.Next(80))) - di<<"Transfer root n0 "< DRAW Shape: "< DRAW Shape: " << shname << "\n"; + theDI << "Now, " << nbs << " Shapes produced\n"; TopoDS_Shape sh = sr.Shape(nbs); - DBRep::Set (shname,sh); + DBRep::Set(shname, sh); } if (aPSRoot.UserBreak()) return 1; } - else if (modepri == 3) { - std::cout<<"Entity : "< DRAW Shape: "< DRAW Shape: " << shname << "\n"; + theDI << "Now, " << nbs << " Shapes produced\n"; TopoDS_Shape sh = sr.Shape(nbs); - DBRep::Set (shname,sh); + DBRep::Set(shname, sh); } } - else if (modepri == 4) { + else if (modepri == 4) + { // char snm[100]; Standard_Integer answer = 1; Handle(TColStd_HSequenceOfTransient) list; // Selection, nommee ou via tcl. tcl : raccourcis admis // * donne xst-transferrable-roots - if (fromtcl) { + if (fromtcl) + { modepri = 0; // d ioffice une seule passe - if (argv[k][0] == '*' && argv[k][1] == '\0') { - di<<"Transferrable Roots : "; - list = XSDRAW::GetList("xst-transferrable-roots"); + if (theArgVec[k][0] == '*' && theArgVec[k][1] == '\0') + { + theDI << "Transferrable Roots : "; + list = XSDRAW::Session()->GiveList("xst-transferrable-roots"); //list = new TColStd_HSequenceOfTransient; //for(Standard_Integer j=1; j<=num; j++) // list->Append(sr.RootForTransfer(j)); } - else { - di<<"List given by "< k+1) di<<" "< (k+1) ? argv[k+1] : 0 ) ); + else + { + theDI << "List given by " << theArgVec[k]; + if (theNbArgs > k + 1) theDI << " " << theArgVec[k + 1]; + theDI << " : "; + list = XSDRAW::Session()->GiveList(theArgVec[k], (theNbArgs > (k + 1) ? theArgVec[k + 1] : 0)); } - if (list.IsNull()) { di<<"No list defined. Give a selection name or * for all transferrable roots\n"; continue; } - } else { - std::cout<<"Name of Selection :"<GiveList(""); + if (list.IsNull()) { theDI << "No list defined\n"; continue; } } Standard_Integer ill, nbl = list->Length(); - di<<"Nb entities selected : "<Show(aPSRoot); Message_ProgressScope aPS(aPSRoot.Next(80), "Root", nbl); - for (ill = 1; ill <= nbl && aPS.More(); ill++) { + for (ill = 1; ill <= nbl && aPS.More(); ill++) + { num = sr.Model()->Number(list->Value(ill)); if (num == 0) continue; if (!sr.TransferOne(num, aPS.Next())) - di<<"Transfer entity n0 "< DRAW Shape: "< DRAW Shape: " << shname << "\n"; + theDI << "Now, " << nbs << " Shapes produced\n"; TopoDS_Shape sh = sr.Shape(nbs); - DBRep::Set (shname,sh); + DBRep::Set(shname, sh); } } if (aPSRoot.UserBreak()) return 1; } - else di<<"Unknown mode n0 "< 4) + if (theNbArgs < 3 || theNbArgs > 4) { - di << "ERROR in " << argv[0] << "Wrong Number of Arguments.\n"; - di << " Usage : " << argv[0] << " file_name shape_name [-stream]\n"; - di << " Option -stream forces usage of API accepting stream\n"; + theDI << "ERROR in " << theArgVec[0] << "Wrong Number of Arguments.\n"; + theDI << " Usage : " << theArgVec[0] << " file_name shape_name [-stream]\n"; + theDI << " Option -stream forces usage of API accepting stream\n"; return 1; } - Standard_Boolean useStream = (argc > 3 && ! strcasecmp (argv[3], "-stream")); + Standard_Boolean useStream = (theNbArgs > 3 && !strcasecmp(theArgVec[3], "-stream")); STEPControl_Reader Reader; - Standard_CString filename = argv[1]; + Standard_CString filename = theArgVec[1]; IFSelect_ReturnStatus readstat; if (useStream) { std::ifstream aStream; - OSD_OpenStream (aStream, filename, std::ios::in | std::ios::binary); + OSD_OpenStream(aStream, filename, std::ios::in | std::ios::binary); TCollection_AsciiString aFolder, aFileNameShort; - OSD_Path::FolderAndFileFromPath (filename, aFolder, aFileNameShort); - readstat = Reader.ReadStream (aFileNameShort.ToCString(), aStream); + OSD_Path::FolderAndFileFromPath(filename, aFolder, aFileNameShort); + readstat = Reader.ReadStream(aFileNameShort.ToCString(), aStream); } else { readstat = Reader.ReadFile(filename); } - di<<"Status from reading STEP file "<PrepareForTransfer(); // update unit info - Reader.SetSystemLengthUnit(UnitsMethods::GetCasCadeLengthUnit()); + Reader.SetSystemLengthUnit(XSDRAW::GetLengthUnit()); Reader.TransferRoots(); TopoDS_Shape shape = Reader.OneShape(); - DBRep::Set(argv[2],shape); - di<<"Count of shapes produced : "< 4) n2 = XSDRAW::GetEntityNumber(argv[4]); + n1 = XSDRAW::GetEntityNumber(theArgVec[3]); + if (theNbArgs > 4) n2 = XSDRAW::GetEntityNumber(theArgVec[4]); if (n1 > 0) ax1 = Handle(StepGeom_Axis2Placement3d)::DownCast - (XSDRAW::Entity(n1)); + (aWS->StartingEntity(n1)); if (n2 > 0) ax2 = Handle(StepGeom_Axis2Placement3d)::DownCast - (XSDRAW::Entity(n2)); + (aWS->StartingEntity(n2)); + StepData_Factors aFactors; StepToTopoDS_MakeTransformed mktrans; - StepData_Factors aLocalFactors; - if (mktrans.Compute (ax1,ax2, aLocalFactors)) { - TopLoc_Location loc (mktrans.Transformation()); - shape.Move (loc); -// mktrans.Transform (shape); - DBRep::Set (argv[2],shape); - di<<"Transformed Shape as "<NormAdaptor()); + if (aCtl.IsNull()) + { + aWS->SelectNorm("STEP"); + } + if (theNbArgs < 3) + { + theDI << "Error: Give mode[1-4] and Shape name + optional file. Mode possible\n"; + theDI << "f ou 1 : FacettedBRep s ou 2 : ShellBasedSurfaceModel\n" + << "m ou 3 : ManifoldSolidBrep w ou 4 : GeometricCurveSet/WireFrame\n"; + return 1; } - - if (argc < 3) { - di<<"Give mode[1-4] and Shape name + optional file. Mode possible\n"; - di<<"f ou 1 : FacettedBRep s ou 2 : ShellBasedSurfaceModel\n" - <<"m ou 3 : ManifoldSolidBrep w ou 4 : GeometricCurveSet/WireFrame\n"; - return 1; } - char modeshape = argv[1][0]; STEPControl_StepModelType mode; - switch (modeshape) { - case 'a' : - case '0' : mode = STEPControl_AsIs; break; - case 'f' : - case '1' : mode = STEPControl_FacetedBrep; break; - case 's' : - case '2' : mode = STEPControl_ShellBasedSurfaceModel; break; - case 'm' : - case '3' : mode = STEPControl_ManifoldSolidBrep; break; - case 'w' : - case '4' : mode = STEPControl_GeometricCurveSet; break; - default : di<<"1st arg = mode, incorrect [give fsmw]\n"; return 1; - } - - //:k8 abv 6 Jan 98: using parameter for writing mode (assemblies/shapes) - Handle(STEPControl_ActorWrite) ActWrite = - Handle(STEPControl_ActorWrite)::DownCast ( ctl->ActorWrite() ); - if ( ! ActWrite.IsNull() ) - ActWrite->SetGroupMode (Interface_Static::IVal("write.step.assembly")); - - TopoDS_Shape shape = DBRep::Get(argv[2]); - STEPControl_Writer sw (XSDRAW::Session(),Standard_False); + switch (theArgVec[1][0]) + { + case 'a': + case '0': mode = STEPControl_AsIs; break; + case 'f': + case '1': mode = STEPControl_FacetedBrep; break; + case 's': + case '2': mode = STEPControl_ShellBasedSurfaceModel; break; + case 'm': + case '3': mode = STEPControl_ManifoldSolidBrep; break; + case 'w': + case '4': mode = STEPControl_GeometricCurveSet; break; + default: theDI << "Error: 1st arg = mode, incorrect [give fsmw]\n"; return 1; + } + Handle(STEPControl_ActorWrite) ActWrite = + Handle(STEPControl_ActorWrite)::DownCast(aWS->NormAdaptor()->ActorWrite()); + if (!ActWrite.IsNull()) + ActWrite->SetGroupMode(Interface_Static::IVal("write.step.assembly")); + + TopoDS_Shape shape = DBRep::Get(theArgVec[2]); + STEPControl_Writer sw(aWS, Standard_False); Handle(Interface_InterfaceModel) stepmodel = sw.Model(); Standard_Integer nbavant = (stepmodel.IsNull() ? 0 : stepmodel->NbEntities()); - Handle(Draw_ProgressIndicator) progress = new Draw_ProgressIndicator ( di, 1 ); - Message_ProgressScope aPSRoot (progress->Start(), "Translating", 100); + Handle(Draw_ProgressIndicator) progress = new Draw_ProgressIndicator(theDI, 1); + Message_ProgressScope aPSRoot(progress->Start(), "Translating", 100); progress->Show(aPSRoot); - Standard_Integer stat = sw.Transfer (shape, mode, Standard_True, aPSRoot.Next(90)); + Standard_Integer stat = sw.Transfer(shape, mode, Standard_True, aPSRoot.Next(90)); if (stat == IFSelect_RetDone) { - di << "Translation: OK\n"; - } - else + theDI << "Translation: OK\n"; + } + else { - di << "Error: translation failed, status = " << stat << "\n"; + theDI << "Error: translation failed, status = " << stat << "\n"; } - if (aPSRoot.UserBreak()) return 1; aPSRoot.SetName("Writing"); progress->Show(aPSRoot); -// Que s est-il passe + // Que s est-il passe stepmodel = sw.Model(); Standard_Integer nbapres = (stepmodel.IsNull() ? 0 : stepmodel->NbEntities()); - if (nbavant > 0) di<<"Beware : Model not empty before transferring\n"; - if (nbapres <= nbavant) di<<"Beware : No data produced by this transfer\n"; - if (nbapres == 0) { di<<"No data to write\n"; return 0; } + if (nbavant > 0) theDI << "Beware : Model not empty before transferring\n"; + if (nbapres <= nbavant) theDI << "Beware : No data produced by this transfer\n"; + if (nbapres == 0) { theDI << "No data to write\n"; return 0; } - if (argc <= 3) { - di<<" Now, to write a file, command : writeall filename\n"; + if (theNbArgs <= 3) + { + theDI << " Now, to write a file, command : writeall filename\n"; return 0; } - - const char *nomfic = argv[3]; + const char* nomfic = theArgVec[3]; stat = sw.Write(nomfic); - switch (stat) { - case IFSelect_RetVoid : di<<"Error: No file written\n"; break; - case IFSelect_RetDone : di<<"File "<Session(); - const Interface_Graph& graph = WS->Graph(); - + Handle(XSControl_WorkSession) WS = XSDRAW::Session(); + const Interface_Graph& graph = WS->Graph(); + Handle(TColStd_HSequenceOfTransient) roots = WS->GiveList("xst-transferrable-roots", ""); STEPSelections_Counter cnt; - - for (Standard_Integer i =1 ; i <= roots->Length(); i++) { - cnt.Count(graph,roots->Value(i)); - } - - di<< "Instances of Faces \t: "<Length(); i++) + { + cnt.Count(graph, roots->Value(i)); + } + + theDI << "Instances of Faces \t: " << cnt.NbInstancesOfFaces() << "\n"; + theDI << "Instances of Shells\t: " << cnt.NbInstancesOfShells() << "\n"; + theDI << "Instances of Solids\t: " << cnt.NbInstancesOfSolids() << "\n"; + theDI << "Instances of Wires in GS\t: " << cnt.NbInstancesOfWires() << "\n"; + theDI << "Instances of Edges in GS\t: " << cnt.NbInstancesOfEdges() << "\n"; + + theDI << "Source Faces \t: " << cnt.NbSourceFaces() << "\n"; + theDI << "Source Shells\t: " << cnt.NbSourceShells() << "\n"; + theDI << "Source Solids\t: " << cnt.NbSourceSolids() << "\n"; + theDI << "Source Wires in GS\t: " << cnt.NbSourceWires() << "\n"; + theDI << "Source Edges in GS\t: " << cnt.NbSourceEdges() << "\n"; + return 1; } -static Standard_Integer dumpassembly - (Draw_Interpretor& /*di*/, Standard_Integer /*argc*/, const char** /*argv*/) +//======================================================================= +//function : dumpassembly +//purpose : +//======================================================================= +static Standard_Integer dumpassembly(Draw_Interpretor& /*theDI*/, + Standard_Integer /*theNbArgs*/, + const char** /*theArgVec*/) { - Handle(IFSelect_SessionPilot) pilot = XSDRAW::Pilot(); - Handle(IFSelect_WorkSession) WS = pilot->Session(); + Handle(XSControl_WorkSession) WS = XSDRAW::Session(); const Interface_Graph& graph = WS->Graph(); - + STEPSelections_AssemblyExplorer exp(graph); exp.Dump(std::cout); return 0; } -static Standard_Integer stepfileunits (Draw_Interpretor& di, Standard_Integer argc, const char** argv) +//======================================================================= +//function : stepfileunits +//purpose : +//======================================================================= +static Standard_Integer stepfileunits(Draw_Interpretor& theDI, + Standard_Integer theNbArgs, + const char** theArgVec) { - - if( argc < 2) + if (theNbArgs < 2) { - di << "Error: Invalid number of parameters. Should be: getfileunits name_file\n"; + theDI << "Error: Invalid number of parameters. Should be: getfileunits name_file\n"; return 1; } STEPControl_Reader aStepReader; - IFSelect_ReturnStatus readstat = IFSelect_RetVoid; - readstat = aStepReader.ReadFile (argv[1]); - - if (readstat != IFSelect_RetDone) { - - di<<"No model loaded\n"; + readstat = aStepReader.ReadFile(theArgVec[1]); + if (readstat != IFSelect_RetDone) + { + theDI << "No model loaded\n"; return 1; } TColStd_SequenceOfAsciiString anUnitLengthNames; TColStd_SequenceOfAsciiString anUnitAngleNames; TColStd_SequenceOfAsciiString anUnitSolidAngleNames; - aStepReader.FileUnits( anUnitLengthNames,anUnitAngleNames,anUnitSolidAngleNames); - - Standard_Integer i =1; - di<<"=====================================================\n"; - di<<"LENGTH Unit\n"; - for( ; i <= anUnitLengthNames.Length() ; i++) - di<Start(), "STEP import", isFileMode ? 2 : 1); + + IFSelect_ReturnStatus aReadStat = IFSelect_RetVoid; + + if (isFileMode) + { + Message_ProgressScope aReadScope(aRootScope.Next(), "File reading", 1); + aReadScope.Show(); + + if (toTestStream) + { + std::ifstream aStream; + OSD_OpenStream(aStream, aFileName.ToCString(), std::ios::in | std::ios::binary); + TCollection_AsciiString aFolder, aFileNameShort; + OSD_Path::FolderAndFileFromPath(aFileName, aFolder, aFileNameShort); + aReadStat = aReader.ReadStream(aFileNameShort.ToCString(), aStream); + } + else + { + aReadStat = aReader.ReadFile(aFileName.ToCString()); + } + } + else if (XSDRAW::Session()->NbStartingEntities() > 0) + { + aReadStat = IFSelect_RetDone; + } + + if (aReadStat != IFSelect_RetDone) + { + if (isFileMode) + { + theDI << "Could not read file " << aFileName << " , abandon\n"; + } + else + { + theDI << "No model loaded\n"; + } + return 1; + } + + Handle(TDocStd_Document) aDocument; + + if (!DDocStd::GetDocument(aDocumentName, aDocument, Standard_False)) + { + Handle(TDocStd_Application) anApp = DDocStd::GetApplication(); + anApp->NewDocument("BinXCAF", aDocument); + TDataStd_Name::Set(aDocument->GetData()->Root(), aDocumentName); + Handle(DDocStd_DrawDocument) aDrawDoc = new DDocStd_DrawDocument(aDocument); + Draw::Set(aDocumentName, aDrawDoc); + } + + if (!aReader.Transfer(aDocument, aRootScope.Next())) + { + theDI << "Cannot read any relevant data from the STEP file\n"; + return 1; + } + + Handle(DDocStd_DrawDocument) aDrawDoc = new DDocStd_DrawDocument(aDocument); + Draw::Set(aDocumentName, aDrawDoc); + + theDI << "Document saved with name " << aDocumentName; + + XSDRAW::CollectActiveWorkSessions(aFilePath); + for (ExternalFileMap::Iterator anIter(aReader.ExternFiles()); anIter.More(); anIter.Next()) + { + XSDRAW::CollectActiveWorkSessions(anIter.Value()->GetWS(), anIter.Key(), XSDRAW::WorkSessionList()); + } + return 0; } -// ######## COMMANDE stepwrite : teste le Writer ######### -void XSDRAWSTEP::InitCommands (Draw_Interpretor& theCommands) +//======================================================================= +//function : WriteStep +//purpose : Write DECAF document to STEP +//======================================================================= +static Standard_Integer WriteStep(Draw_Interpretor& theDI, + Standard_Integer theNbArgs, + const char** theArgVec) { - const char* g = "DE: STEP"; // Step transfer file commands - XSDRAWSTEP::Init(); - XSDRAW::LoadDraw(theCommands); - theCommands.Add("stepwrite" , "stepwrite mode[0-4 afsmw] shape", __FILE__, stepwrite, g); - theCommands.Add("testwritestep", "testwritestep filename.stp shape [-stream]", - __FILE__, testwrite, g); - theCommands.Add("stepread", "stepread [file] [f or r (type of model full or reduced)]",__FILE__, stepread, g); - theCommands.Add("testreadstep", "testreadstep file shape [-stream]",__FILE__, testreadstep, g); - theCommands.Add("steptrans", "steptrans shape stepax1 stepax2", __FILE__, steptrans, g); - theCommands.Add("countexpected","TEST", __FILE__, countexpected, g); - theCommands.Add("dumpassembly", "TEST", __FILE__, dumpassembly, g); - theCommands.Add("stepfileunits" , "stepfileunits name_file", __FILE__, stepfileunits, g); + DeclareAndCast(STEPControl_Controller, aController, XSDRAW::Controller()); + if (aController.IsNull()) + { + XSDRAW::SetNorm("STEP"); + } + + STEPCAFControl_Writer aWriter(XSDRAW::Session(), Standard_True); + + Handle(TDocStd_Document) aDocument; + TCollection_AsciiString aDocumentName, aFilePath; + STEPControl_StepModelType aMode = STEPControl_AsIs; + bool hasModeArg = false, toTestStream = false; + TCollection_AsciiString aMultiFilePrefix, aLabelName; + TDF_Label aLabel; + + for (Standard_Integer anArgIter = 1; anArgIter < theNbArgs; ++anArgIter) + { + TCollection_AsciiString anArgCase(theArgVec[anArgIter]); + anArgCase.LowerCase(); + + if (anArgCase == "-stream") + { + toTestStream = true; + } + else if (aDocumentName.IsEmpty()) + { + Standard_CString aDocNameStr = theArgVec[anArgIter]; + DDocStd::GetDocument(aDocNameStr, aDocument); + + if (aDocument.IsNull()) + { + theDI << "Syntax error: '" << theArgVec[anArgIter] << "' is not a document"; + return 1; + } + + aDocumentName = aDocNameStr; + } + else if (aFilePath.IsEmpty()) + { + aFilePath = theArgVec[anArgIter]; + } + else if (!hasModeArg) + { + hasModeArg = true; + + switch (anArgCase.Value(1)) + { + case 'a': + case '0': + aMode = STEPControl_AsIs; + break; + case 'f': + case '1': + aMode = STEPControl_FacetedBrep; + break; + case 's': + case '2': + aMode = STEPControl_ShellBasedSurfaceModel; + break; + case 'm': + case '3': + aMode = STEPControl_ManifoldSolidBrep; + break; + case 'w': + case '4': + aMode = STEPControl_GeometricCurveSet; + break; + default: + { + theDI << "Syntax error: mode '" << theArgVec[anArgIter] << "' is incorrect [give fsmw]"; + return 1; + } + } + + Standard_Boolean wrmode = Standard_True; + + for (Standard_Integer i = 1; i <= anArgCase.Length(); ++i) + { + switch (anArgCase.Value(i)) + { + case '-': + wrmode = Standard_False; + break; + case '+': + wrmode = Standard_True; + break; + case 'c': + aWriter.SetColorMode(wrmode); + break; + case 'n': + aWriter.SetNameMode(wrmode); + break; + case 'l': + aWriter.SetLayerMode(wrmode); + break; + case 'v': + aWriter.SetPropsMode(wrmode); + break; + } + } + } + else if (aMultiFilePrefix.IsEmpty() && anArgCase.Search(":") == -1) + { + aMultiFilePrefix = theArgVec[anArgIter]; + } + else if (aLabel.IsNull()) + { + if (!DDF::FindLabel(aDocument->Main().Data(), theArgVec[anArgIter], aLabel) || aLabel.IsNull()) + { + theDI << "Syntax error: No label for entry '" << theArgVec[anArgIter] << "'"; + return 1; + } + + aLabelName = theArgVec[anArgIter]; + } + else + { + theDI << "Syntax error: unknown argument '" << theArgVec[anArgIter] << "'"; + return 1; + } + } + + if (aFilePath.IsEmpty()) + { + theDI << "Syntax error: wrong number of arguments"; + return 1; + } + + TCollection_AsciiString aFileName, anOldVarName; + const Standard_Boolean isFileMode = XSDRAW::FileAndVar(aFilePath.ToCString(), aDocumentName.ToCString(), "STEP", aFileName, anOldVarName); + + Handle(Draw_ProgressIndicator) aProgress = new Draw_ProgressIndicator(theDI); + Message_ProgressScope aRootScope(aProgress->Start(), "STEP export", isFileMode ? 2 : 1); + + if (!aLabel.IsNull()) + { + theDI << "Translating label " << aLabelName << " of document " << aDocumentName << " to STEP\n"; + + if (!aWriter.Transfer(aLabel, aMode, + !aMultiFilePrefix.IsEmpty() ? aMultiFilePrefix.ToCString() : NULL, + aRootScope.Next())) + { + theDI << "Error: the label of document cannot be translated or gives no result"; + return 1; + } + } + else + { + theDI << "Translating document " << aDocumentName << " to STEP\n"; + + if (!aWriter.Transfer(aDocument, aMode, + !aMultiFilePrefix.IsEmpty() ? aMultiFilePrefix.ToCString() : NULL, + aRootScope.Next())) + { + theDI << "Error: The document cannot be translated or gives no result\n"; + } + } + + if (!isFileMode) + { + theDI << "Document has been translated into the session"; + return 0; + } + + Message_ProgressScope aWriteScope(aRootScope.Next(), "File writing", 1); + aWriteScope.Show(); + theDI << "Writing STEP file " << aFilePath << "\n"; + + IFSelect_ReturnStatus aStat = IFSelect_RetVoid; + + if (toTestStream) + { + std::ofstream aStream; + OSD_OpenStream(aStream, aFilePath, std::ios::out | std::ios::binary); + aStat = aWriter.WriteStream(aStream); + aStream.close(); + + if (!aStream.good() && aStat == IFSelect_RetDone) + { + aStat = IFSelect_RetFail; + } + } + else + { + aStat = aWriter.Write(aFilePath.ToCString()); + } + + switch (aStat) + { + case IFSelect_RetVoid: + { + theDI << "Error: no file written"; + break; + } + case IFSelect_RetDone: + { + theDI << "File " << aFilePath << " written\n"; + + XSDRAW::CollectActiveWorkSessions(aFilePath); + for (ExternalFileMap::Iterator anIter(aWriter.ExternFiles()); anIter.More(); anIter.Next()) + { + XSDRAW::CollectActiveWorkSessions(anIter.Value()->GetWS(), anIter.Key(), XSDRAW::WorkSessionList()); + } + break; + } + default: + { + theDI << "Error on writing file"; + break; + } + } + return 0; } + +//======================================================================= +//function : Factory +//purpose : +//======================================================================= +void XSDRAWSTEP::Factory(Draw_Interpretor& theDI) +{ + static Standard_Boolean aIsActivated = Standard_False; + if (aIsActivated) + { + return; + } + aIsActivated = Standard_True; + + const char* aGroup = "DE: STEP"; // Step transfer file commands + theDI.Add("stepwrite", "stepwrite mode[0-4 afsmw] shape", __FILE__, stepwrite, aGroup); + theDI.Add("testwritestep", "testwritestep filename.stp shape [-stream]", + __FILE__, testwrite, aGroup); + theDI.Add("stepread", "stepread [file] [f or r (type of model full or reduced)]", __FILE__, stepread, aGroup); + theDI.Add("testreadstep", "testreadstep file shape [-stream]", __FILE__, testreadstep, aGroup); + theDI.Add("steptrans", "steptrans shape stepax1 stepax2", __FILE__, steptrans, aGroup); + theDI.Add("countexpected", "TEST", __FILE__, countexpected, aGroup); + theDI.Add("dumpassembly", "TEST", __FILE__, dumpassembly, aGroup); + theDI.Add("stepfileunits", "stepfileunits name_file", __FILE__, stepfileunits, aGroup); + theDI.Add("ReadStep", + "Doc filename [mode] [-stream]" + "\n\t\t: Read STEP file to a document." + "\n\t\t: -stream read using istream reading interface (testing)", + __FILE__, ReadStep, aGroup); + theDI.Add("WriteStep", + "Doc filename [mode=a [multifile_prefix] [label]] [-stream]" + "\n\t\t: Write DECAF document to STEP file" + "\n\t\t: mode can be: a or 0 : AsIs (default)" + "\n\t\t: f or 1 : FacettedBRep s or 2 : ShellBasedSurfaceModel" + "\n\t\t: m or 3 : ManifoldSolidBrep w or 4 : GeometricCurveSet/WireFrame" + "\n\t\t: multifile_prefix: triggers writing assembly components as separate files," + "\n\t\t: and defines common prefix for their names" + "\n\t\t: label tag of the sub-assembly label to save only that sub-assembly" + "\n\t\t: -stream read using ostream writing interface (testing)", + __FILE__, WriteStep, aGroup); + + // Load XSDRAW session for pilot activation + XSDRAW::LoadDraw(theDI); +} + +// Declare entry point PLUGINFACTORY +DPLUGIN(XSDRAWSTEP) diff --git a/src/XSDRAWSTEP/XSDRAWSTEP.hxx b/src/XSDRAWSTEP/XSDRAWSTEP.hxx index 9c2673ba25..0a5b90898a 100644 --- a/src/XSDRAWSTEP/XSDRAWSTEP.hxx +++ b/src/XSDRAWSTEP/XSDRAWSTEP.hxx @@ -1,7 +1,4 @@ -// Created on: 1996-01-12 -// Created by: Christian CAILLET -// Copyright (c) 1996-1999 Matra Datavision -// Copyright (c) 1999-2014 OPEN CASCADE SAS +// Copyright (c) 2023 OPEN CASCADE SAS // // This file is part of Open CASCADE Technology software library. // @@ -22,41 +19,13 @@ #include - -//! XSDRAW for STEP AP214 and AP203 -class XSDRAWSTEP +class XSDRAWSTEP { -public: - DEFINE_STANDARD_ALLOC +public: - - Standard_EXPORT static void Init(); - - //! Inits commands to access product data and to write shapes - Standard_EXPORT static void InitCommands (Draw_Interpretor& theCommands); - - - - -protected: - - - - - -private: - - - - - + //! Loads all Draw commands of XSDRAWSTEP. Used for plugin. + Standard_EXPORT static void Factory(Draw_Interpretor& theDI); }; - - - - - - #endif // _XSDRAWSTEP_HeaderFile diff --git a/src/XSDRAWSTL/FILES b/src/XSDRAWSTL/FILES new file mode 100644 index 0000000000..7a964554ac --- /dev/null +++ b/src/XSDRAWSTL/FILES @@ -0,0 +1,8 @@ +XSDRAWSTL.cxx +XSDRAWSTL.hxx +XSDRAWSTL_DataSource.cxx +XSDRAWSTL_DataSource.hxx +XSDRAWSTL_DataSource3D.cxx +XSDRAWSTL_DataSource3D.hxx +XSDRAWSTL_DrawableMesh.cxx +XSDRAWSTL_DrawableMesh.hxx \ No newline at end of file diff --git a/src/XSDRAWSTL/XSDRAWSTL.cxx b/src/XSDRAWSTL/XSDRAWSTL.cxx new file mode 100644 index 0000000000..48fb99914c --- /dev/null +++ b/src/XSDRAWSTL/XSDRAWSTL.cxx @@ -0,0 +1,1322 @@ +// Copyright (c) 2023 OPEN CASCADE SAS +// +// This file is part of Open CASCADE Technology software library. +// +// This library is free software; you can redistribute it and/or modify it under +// the terms of the GNU Lesser General Public License version 2.1 as published +// by the Free Software Foundation, with special exception defined in the file +// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT +// distribution for complete text of the license and disclaimer of any warranty. +// +// Alternatively, this file may be used under the terms of Open CASCADE +// commercial license or contractual agreement. + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern Standard_Boolean VDisplayAISObject(const TCollection_AsciiString& theName, + const Handle(AIS_InteractiveObject)& theAISObj, + Standard_Boolean theReplaceIfExists = Standard_True); + +//============================================================================= +//function : writestl +//purpose : +//============================================================================= +static Standard_Integer writestl +(Draw_Interpretor& di, Standard_Integer argc, const char** argv) +{ + if (argc < 3 || argc > 4) { + di << "Use: " << argv[0] + << " shape file [ascii/binary (0/1) : 1 by default]\n"; + } else { + TopoDS_Shape aShape = DBRep::Get(argv[1]); + Standard_Boolean isASCIIMode = Standard_False; + if (argc == 4) { + isASCIIMode = (Draw::Atoi(argv[3]) == 0); + } + StlAPI_Writer aWriter; + aWriter.ASCIIMode() = isASCIIMode; + Handle(Draw_ProgressIndicator) aProgress = new Draw_ProgressIndicator (di); + Standard_Boolean isOK = aWriter.Write (aShape, argv[2], aProgress->Start()); + if (!isOK) + di << "** Error **: Mesh writing has been failed.\n"; + } + return 0; +} + +//============================================================================= +//function : readstl +//purpose : Reads stl file +//============================================================================= +static Standard_Integer readstl(Draw_Interpretor& theDI, + Standard_Integer theArgc, + const char** theArgv) +{ + TCollection_AsciiString aShapeName, aFilePath; + bool toCreateCompOfTris = false; + bool anIsMulti = false; + double aMergeAngle = M_PI / 2.0; + for (Standard_Integer anArgIter = 1; anArgIter < theArgc; ++anArgIter) + { + TCollection_AsciiString anArg (theArgv[anArgIter]); + anArg.LowerCase(); + if (aShapeName.IsEmpty()) + { + aShapeName = theArgv[anArgIter]; + } + else if (aFilePath.IsEmpty()) + { + aFilePath = theArgv[anArgIter]; + } + else if (anArg == "-brep") + { + toCreateCompOfTris = true; + if (anArgIter + 1 < theArgc + && Draw::ParseOnOff (theArgv[anArgIter + 1], toCreateCompOfTris)) + { + ++anArgIter; + } + } + else if (anArg == "-multi") + { + anIsMulti = true; + if (anArgIter + 1 < theArgc + && Draw::ParseOnOff (theArgv[anArgIter + 1], anIsMulti)) + { + ++anArgIter; + } + } + else if (anArg == "-mergeangle" + || anArg == "-smoothangle" + || anArg == "-nomergeangle" + || anArg == "-nosmoothangle") + { + if (anArg.StartsWith ("-no")) + { + aMergeAngle = M_PI / 2.0; + } + else + { + aMergeAngle = M_PI / 4.0; + if (anArgIter + 1 < theArgc + && Draw::ParseReal (theArgv[anArgIter + 1], aMergeAngle)) + { + if (aMergeAngle < 0.0 || aMergeAngle > 90.0) + { + theDI << "Syntax error: angle should be within [0,90] range"; + return 1; + } + + ++anArgIter; + aMergeAngle = aMergeAngle * M_PI / 180.0; + } + } + } + else + { + Message::SendFail() << "Syntax error: unknown argument '" << theArgv[anArgIter] << "'"; + return 1; + } + } + if (aFilePath.IsEmpty()) + { + Message::SendFail() << "Syntax error: not enough arguments"; + return 1; + } + + TopoDS_Shape aShape; + if (!toCreateCompOfTris) + { + Handle(Draw_ProgressIndicator) aProgress = new Draw_ProgressIndicator (theDI,1); + if(anIsMulti) + { + NCollection_Sequence aTriangList; + // Read STL file to the triangulation list. + RWStl::ReadFile(aFilePath.ToCString(),aMergeAngle,aTriangList,aProgress->Start()); + BRep_Builder aB; + TopoDS_Face aFace; + if (aTriangList.Size() == 1) + { + aB.MakeFace (aFace); + aB.UpdateFace (aFace,aTriangList.First()); + aShape = aFace; + } + else + { + TopoDS_Compound aCmp; + aB.MakeCompound (aCmp); + + NCollection_Sequence::Iterator anIt (aTriangList); + for (; anIt.More(); anIt.Next()) + { + aB.MakeFace (aFace); + aB.UpdateFace (aFace,anIt.Value()); + aB.Add (aCmp,aFace); + } + aShape = aCmp; + } + } + else + { + // Read STL file to the triangulation. + Handle(Poly_Triangulation) aTriangulation = RWStl::ReadFile (aFilePath.ToCString(),aMergeAngle,aProgress->Start()); + + TopoDS_Face aFace; + BRep_Builder aB; + aB.MakeFace (aFace); + aB.UpdateFace (aFace,aTriangulation); + aShape = aFace; + } + } + else + { + Standard_DISABLE_DEPRECATION_WARNINGS + StlAPI::Read(aShape, aFilePath.ToCString()); + Standard_ENABLE_DEPRECATION_WARNINGS + } + DBRep::Set (aShapeName.ToCString(), aShape); + return 0; +} + +//======================================================================= +//function : createmesh +//purpose : +//======================================================================= +static Standard_Integer createmesh(Draw_Interpretor& theDI, + Standard_Integer theNbArgs, + const char** theArgVec) +{ + if (theNbArgs < 3) + { + theDI << "Wrong number of parameters\n"; + theDI << "Use: " << theArgVec[0] << " \n"; + return 0; + } + + Handle(AIS_InteractiveContext) aContext = ViewerTest::GetAISContext(); + if (aContext.IsNull()) + { + theDI << "No active view. Please call 'vinit' first\n"; + return 0; + } + + // Progress indicator + OSD_Path aFile(theArgVec[2]); + Handle(Draw_ProgressIndicator) aProgress = new Draw_ProgressIndicator(theDI, 1); + Handle(Poly_Triangulation) aSTLMesh = RWStl::ReadFile(aFile, aProgress->Start()); + + theDI << "Reading OK...\n"; + Handle(XSDRAWSTL_DataSource) aDS = new XSDRAWSTL_DataSource(aSTLMesh); + theDI << "Data source is created successful\n"; + Handle(MeshVS_Mesh) aMesh = new MeshVS_Mesh(); + theDI << "MeshVS_Mesh is created successful\n"; + + aMesh->SetDataSource(aDS); + aMesh->AddBuilder(new MeshVS_MeshPrsBuilder(aMesh.operator->()), Standard_True); + + aMesh->GetDrawer()->SetColor(MeshVS_DA_EdgeColor, Quantity_NOC_YELLOW); + + // Hide all nodes by default + Handle(TColStd_HPackedMapOfInteger) aNodes = new TColStd_HPackedMapOfInteger(); + const Standard_Integer aLen = aSTLMesh->NbNodes(); + for (Standard_Integer anIndex = 1; anIndex <= aLen; anIndex++) + aNodes->ChangeMap().Add(anIndex); + aMesh->SetHiddenNodes(aNodes); + aMesh->SetSelectableNodes(aNodes); + + VDisplayAISObject(theArgVec[1], aMesh); + aContext->Deactivate(aMesh); + + Draw::Set(theArgVec[1], new XSDRAWSTL_DrawableMesh(aMesh)); + Handle(V3d_View) aView = ViewerTest::CurrentView(); + if (!aView.IsNull()) + aView->FitAll(); + + return 0; +} + +//======================================================================= +//function : create3d +//purpose : +//======================================================================= +static Standard_Integer create3d(Draw_Interpretor& theDI, + Standard_Integer theNbArgs, + const char** theArgVec) +{ + if (theNbArgs < 2) + { + theDI << "Wrong number of parameters\n"; + theDI << "Use: " << theArgVec[0] << " \n"; + return 0; + } + + Handle(AIS_InteractiveContext) aContext = ViewerTest::GetAISContext(); + if (aContext.IsNull()) + { + theDI << "No active view. Please call 'vinit' first\n"; + return 0; + } + + Handle(XSDRAWSTL_DataSource3D) aDS = new XSDRAWSTL_DataSource3D(); + theDI << "Data source is created successful\n"; + Handle(MeshVS_Mesh) aMesh = new MeshVS_Mesh(); + theDI << "MeshVS_Mesh is created successful\n"; + + aMesh->SetDataSource(aDS); + aMesh->AddBuilder(new MeshVS_MeshPrsBuilder(aMesh.operator->()), Standard_True); + + aMesh->GetDrawer()->SetColor(MeshVS_DA_EdgeColor, Quantity_NOC_YELLOW); + + // Hide all nodes by default + Handle(TColStd_HPackedMapOfInteger) aNodes = new TColStd_HPackedMapOfInteger(); + Standard_Integer aLen = aDS->GetAllNodes().Extent(); + for (Standard_Integer anIndex = 1; anIndex <= aLen; anIndex++) + aNodes->ChangeMap().Add(anIndex); + aMesh->SetHiddenNodes(aNodes); + aMesh->SetSelectableNodes(aNodes); + + VDisplayAISObject(theArgVec[1], aMesh); + aContext->Deactivate(aMesh); + + Draw::Set(theArgVec[1], new XSDRAWSTL_DrawableMesh(aMesh)); + Handle(V3d_View) aView = ViewerTest::CurrentView(); + if (!aView.IsNull()) + aView->FitAll(); + + return 0; +} + +//======================================================================= +//function : getMesh +//purpose : +//======================================================================= +Handle(MeshVS_Mesh) getMesh(const char* theName, + Draw_Interpretor& theDI) +{ + Handle(XSDRAWSTL_DrawableMesh) aDrawMesh = + Handle(XSDRAWSTL_DrawableMesh)::DownCast(Draw::Get(theName)); + + if (aDrawMesh.IsNull()) + { + theDI << "There is no such object\n"; + return NULL; + } + else + { + Handle(MeshVS_Mesh) aMesh = aDrawMesh->GetMesh(); + if (aMesh.IsNull()) + { + theDI << "There is invalid mesh\n"; + return NULL; + } + else + return aMesh; + } +} + +//======================================================================= +//function : setcolor +//purpose : +//======================================================================= +static Standard_Integer setcolor(Draw_Interpretor& theDI, + Standard_Integer theNbArgs, + const char** theArgVec, + Standard_Integer theParam) +{ + if (theNbArgs < 5) + theDI << "Wrong number of parameters\n"; + else + { + Handle(MeshVS_Mesh) aMesh = getMesh(theArgVec[1], theDI); + if (!aMesh.IsNull()) + { + Standard_Real aRed = Draw::Atof(theArgVec[2]); + Standard_Real aGreen = Draw::Atof(theArgVec[3]); + Standard_Real aBlue = Draw::Atof(theArgVec[4]); + aMesh->GetDrawer()->SetColor((MeshVS_DrawerAttribute)theParam, + Quantity_Color(aRed, aGreen, aBlue, Quantity_TOC_RGB)); + + Handle(AIS_InteractiveContext) aContext = ViewerTest::GetAISContext(); + + if (aContext.IsNull()) + theDI << "The context is null\n"; + else + aContext->Redisplay(aMesh, Standard_True); + } + } + return 0; +} + +//======================================================================= +//function : meshcolor +//purpose : +//======================================================================= +static Standard_Integer meshcolor(Draw_Interpretor& theInterp, + Standard_Integer theNbArgs, + const char** theArgVec) +{ + return setcolor(theInterp, theNbArgs, theArgVec, MeshVS_DA_InteriorColor); +} + +//======================================================================= +//function : linecolor +//purpose : +//======================================================================= +static Standard_Integer linecolor(Draw_Interpretor& theInterp, + Standard_Integer theNbArgs, + const char** theArgVec) +{ + return setcolor(theInterp, theNbArgs, theArgVec, MeshVS_DA_EdgeColor); +} + +//======================================================================= +//function : meshmat +//purpose : +//======================================================================= +static Standard_Integer meshmat(Draw_Interpretor& theDI, + Standard_Integer theNbArgs, + const char** theArgVec) +{ + if (theNbArgs < 3) + theDI << "Wrong number of parameters\n"; + else + { + Handle(MeshVS_Mesh) aMesh = getMesh(theArgVec[1], theDI); + if (!aMesh.IsNull()) + { + Standard_Integer aMaterial = Draw::Atoi(theArgVec[2]); + + Graphic3d_MaterialAspect aMatAsp = + (Graphic3d_MaterialAspect)(Graphic3d_NameOfMaterial)aMaterial; + + if (theNbArgs == 4) + { + Standard_Real aTransparency = Draw::Atof(theArgVec[3]); + aMatAsp.SetTransparency(Standard_ShortReal(aTransparency)); + } + aMesh->GetDrawer()->SetMaterial(MeshVS_DA_FrontMaterial, aMatAsp); + aMesh->GetDrawer()->SetMaterial(MeshVS_DA_BackMaterial, aMatAsp); + + Handle(AIS_InteractiveContext) aContext = ViewerTest::GetAISContext(); + + if (aContext.IsNull()) + theDI << "The context is null\n"; + else + aContext->Redisplay(aMesh, Standard_True); + } + } + return 0; +} + +//======================================================================= +//function : shrink +//purpose : +//======================================================================= +static Standard_Integer shrink(Draw_Interpretor& theDI, + Standard_Integer theNbArgs, + const char** theArgVec) +{ + if (theNbArgs < 3) + theDI << "Wrong number of parameters\n"; + else + { + Handle(MeshVS_Mesh) aMesh = getMesh(theArgVec[1], theDI); + if (!aMesh.IsNull()) + { + Standard_Real aShrinkCoeff = Draw::Atof(theArgVec[2]); + aMesh->GetDrawer()->SetDouble(MeshVS_DA_ShrinkCoeff, aShrinkCoeff); + + Handle(AIS_InteractiveContext) aContext = ViewerTest::GetAISContext(); + + if (aContext.IsNull()) + theDI << "The context is null\n"; + else + aContext->Redisplay(aMesh, Standard_True); + } + } + return 0; +} + +//======================================================================= +//function : closed +//purpose : +//======================================================================= +static Standard_Integer closed(Draw_Interpretor& theDI, + Standard_Integer theArgc, + const char** theArgv) +{ + if (theArgc < 3) + { + theDI << "Wrong number of parameters.\n"; + } + else + { + Handle(MeshVS_Mesh) aMesh = getMesh(theArgv[1], theDI); + if (!aMesh.IsNull()) + { + Standard_Boolean aFlag = Draw::Atoi(theArgv[2]) != 0; + aMesh->GetDrawer()->SetBoolean(MeshVS_DA_SupressBackFaces, aFlag); + + Handle(AIS_InteractiveContext) aContext = ViewerTest::GetAISContext(); + if (aContext.IsNull()) + { + theDI << "The context is null\n"; + } + else + { + aContext->Redisplay(aMesh, Standard_True); + } + } + } + return 0; +} + +//======================================================================= +//function : mdisplay +//purpose : +//======================================================================= +static Standard_Integer mdisplay(Draw_Interpretor& theDI, + Standard_Integer theNbArgs, + const char** theArgVec) +{ + if (theNbArgs < 2) + theDI << "Wrong number of parameters\n"; + else + { + Handle(MeshVS_Mesh) aMesh = getMesh(theArgVec[1], theDI); + if (!aMesh.IsNull()) + { + Handle(AIS_InteractiveContext) aContext = ViewerTest::GetAISContext(); + + if (aContext.IsNull()) + theDI << "The context is null\n"; + else + { + aContext->Display(aMesh, Standard_True); + } + } + } + return 0; +} + +//======================================================================= +//function : merase +//purpose : +//======================================================================= +static Standard_Integer merase(Draw_Interpretor& theDI, + Standard_Integer theNbArgs, + const char** theArgVec) +{ + if (theNbArgs < 2) + theDI << "Wrong number of parameters\n"; + else + { + Handle(MeshVS_Mesh) aMesh = getMesh(theArgVec[1], theDI); + if (!aMesh.IsNull()) + { + Handle(AIS_InteractiveContext) aContext = ViewerTest::GetAISContext(); + + if (aContext.IsNull()) + theDI << "The context is null\n"; + else + { + aContext->Erase(aMesh, Standard_True); + } + } + else + theDI << "Mesh is null\n"; + } + return 0; +} + +//======================================================================= +//function : hidesel +//purpose : +//======================================================================= +static Standard_Integer hidesel(Draw_Interpretor& theDI, + Standard_Integer theNbArgs, + const char** theArgVec) +{ + if (theNbArgs < 2) + { + theDI << "Wrong number of parameters\n"; + theDI << "Use: " << theArgVec[0] << " \n"; + return 0; + } + + Handle(AIS_InteractiveContext) aContext = ViewerTest::GetAISContext(); + Handle(MeshVS_Mesh) aMesh = getMesh(theArgVec[1], theDI); + if (aMesh.IsNull()) + { + theDI << "The mesh is invalid\n"; + return 0; + } + + if (aContext.IsNull()) + theDI << "The context is null\n"; + else + { + Handle(TColStd_HPackedMapOfInteger) aHiddenNodes = aMesh->GetHiddenNodes(); + if (aHiddenNodes.IsNull()) + { + aHiddenNodes = new TColStd_HPackedMapOfInteger(); + } + Handle(TColStd_HPackedMapOfInteger) aHiddenElements = aMesh->GetHiddenElems(); + if (aHiddenElements.IsNull()) + { + aHiddenElements = new TColStd_HPackedMapOfInteger(); + } + for (aContext->InitSelected(); aContext->MoreSelected(); aContext->NextSelected()) + { + Handle(MeshVS_MeshEntityOwner) anOwner = + Handle(MeshVS_MeshEntityOwner)::DownCast(aContext->SelectedOwner()); + if (!anOwner.IsNull()) + { + if (anOwner->Type() == MeshVS_ET_Node) + { + aHiddenNodes->ChangeMap().Add(anOwner->ID()); + } + else + { + aHiddenElements->ChangeMap().Add(anOwner->ID()); + } + } + } + aContext->ClearSelected(Standard_False); + aMesh->SetHiddenNodes(aHiddenNodes); + aMesh->SetHiddenElems(aHiddenElements); + aContext->Redisplay(aMesh, Standard_True); + } + + return 0; +} + +//======================================================================= +//function : showonly +//purpose : +//======================================================================= +static Standard_Integer showonly(Draw_Interpretor& theDI, + Standard_Integer theNbArgs, + const char** theArgVec) +{ + if (theNbArgs < 2) + { + theDI << "Wrong number of parameters\n"; + theDI << "Use: " << theArgVec[0] << " \n"; + return 0; + } + + Handle(AIS_InteractiveContext) aContext = ViewerTest::GetAISContext(); + Handle(MeshVS_Mesh) aMesh = getMesh(theArgVec[1], theDI); + if (aMesh.IsNull()) + { + theDI << "The mesh is invalid\n"; + return 0; + } + + if (aContext.IsNull()) + theDI << "The context is null\n"; + else + { + Handle(TColStd_HPackedMapOfInteger) aHiddenNodes = + new TColStd_HPackedMapOfInteger(aMesh->GetDataSource()->GetAllNodes()); + Handle(TColStd_HPackedMapOfInteger) aHiddenElements = + new TColStd_HPackedMapOfInteger(aMesh->GetDataSource()->GetAllElements()); + for (aContext->InitSelected(); aContext->MoreSelected(); aContext->NextSelected()) + { + Handle(MeshVS_MeshEntityOwner) anOwner = + Handle(MeshVS_MeshEntityOwner)::DownCast(aContext->SelectedOwner()); + if (!anOwner.IsNull()) + { + if (anOwner->Type() == MeshVS_ET_Node) + { + aHiddenNodes->ChangeMap().Remove(anOwner->ID()); + } + else + { + aHiddenElements->ChangeMap().Remove(anOwner->ID()); + } + } + } + aMesh->SetHiddenNodes(aHiddenNodes); + aMesh->SetHiddenElems(aHiddenElements); + aContext->Redisplay(aMesh, Standard_True); + } + + return 0; +} + +//======================================================================= +//function : showonly +//purpose : +//======================================================================= +static Standard_Integer showall(Draw_Interpretor& theDI, + Standard_Integer theNbArgs, + const char** theArgVec) +{ + if (theNbArgs < 2) + { + theDI << "Wrong number of parameters\n"; + theDI << "Use: " << theArgVec[0] << " \n"; + return 0; + } + + Handle(AIS_InteractiveContext) aContext = ViewerTest::GetAISContext(); + Handle(MeshVS_Mesh) aMesh = getMesh(theArgVec[1], theDI); + if (aMesh.IsNull()) + { + theDI << "The mesh is invalid\n"; + return 0; + } + + if (aContext.IsNull()) + theDI << "The context is null\n"; + else + { + aMesh->SetHiddenNodes(new TColStd_HPackedMapOfInteger()); + aMesh->SetHiddenElems(new TColStd_HPackedMapOfInteger()); + aContext->Redisplay(aMesh, Standard_True); + } + + return 0; +} + +//======================================================================= +//function : meshcolors +//purpose : +//======================================================================= +static Standard_Integer meshcolors(Draw_Interpretor& theDI, + Standard_Integer theNbArgs, + const char** theArgVec) +{ + try + { + OCC_CATCH_SIGNALS + if (theNbArgs < 4) + { + theDI << "Wrong number of parameters\n"; + theDI << "Use : meshcolors \n"; + theDI << "mode : {elem1|elem2|nodal|nodaltex|none}\n"; + theDI << " elem1 - different color for each element\n"; + theDI << " elem2 - one color for one side\n"; + theDI << " nodal - different color for each node\n"; + theDI << " nodaltex - different color for each node with texture interpolation\n"; + theDI << " none - clear\n"; + theDI << "isreflect : {0|1} \n"; + + return 0; + } + + Handle(MeshVS_Mesh) aMesh = getMesh(theArgVec[1], theDI); + + if (aMesh.IsNull()) + { + theDI << "Mesh not found\n"; + return 0; + } + Handle(AIS_InteractiveContext) anIC = ViewerTest::GetAISContext(); + if (anIC.IsNull()) + { + theDI << "The context is null\n"; + return 0; + } + if (!aMesh.IsNull()) + { + TCollection_AsciiString aMode = TCollection_AsciiString(theArgVec[2]); + Quantity_Color aColor1(Quantity_NOC_BLUE1); + Quantity_Color aColor2(Quantity_NOC_RED1); + if (aMode.IsEqual("elem1") || aMode.IsEqual("elem2") || aMode.IsEqual("nodal") || aMode.IsEqual("nodaltex") || aMode.IsEqual("none")) + { + Handle(MeshVS_PrsBuilder) aTempBuilder; + Standard_Integer aReflection = Draw::Atoi(theArgVec[3]); + + for (Standard_Integer aCount = 0; aCount < aMesh->GetBuildersCount(); aCount++) + { + aTempBuilder = aMesh->FindBuilder("MeshVS_ElementalColorPrsBuilder"); + if (!aTempBuilder.IsNull()) + aMesh->RemoveBuilderById(aTempBuilder->GetId()); + + aTempBuilder = aMesh->FindBuilder("MeshVS_NodalColorPrsBuilder"); + if (!aTempBuilder.IsNull()) + aMesh->RemoveBuilderById(aTempBuilder->GetId()); + } + + if (aMode.IsEqual("elem1") || aMode.IsEqual("elem2")) + { + Handle(MeshVS_ElementalColorPrsBuilder) aBuilder = new MeshVS_ElementalColorPrsBuilder( + aMesh, MeshVS_DMF_ElementalColorDataPrs | MeshVS_DMF_OCCMask); + // Color + const TColStd_PackedMapOfInteger& anAllElements = aMesh->GetDataSource()->GetAllElements(); + + if (aMode.IsEqual("elem1")) + for (TColStd_PackedMapOfInteger::Iterator anIter(anAllElements); + anIter.More(); anIter.Next()) + { + Quantity_Color aColor((Quantity_NameOfColor)(anIter.Key() % Quantity_NOC_WHITE)); + aBuilder->SetColor1(anIter.Key(), aColor); + } + else + for (TColStd_PackedMapOfInteger::Iterator anIter(anAllElements); + anIter.More(); anIter.Next()) + { + aBuilder->SetColor2(anIter.Key(), aColor1, aColor2); + } + + aMesh->AddBuilder(aBuilder, Standard_True); + } + + if (aMode.IsEqual("nodal")) + { + Handle(MeshVS_NodalColorPrsBuilder) aBuilder = new MeshVS_NodalColorPrsBuilder( + aMesh, MeshVS_DMF_NodalColorDataPrs | MeshVS_DMF_OCCMask); + aMesh->AddBuilder(aBuilder, Standard_True); + + // Color + const TColStd_PackedMapOfInteger& anAllNodes = + aMesh->GetDataSource()->GetAllNodes(); + for (TColStd_PackedMapOfInteger::Iterator anIter(anAllNodes); + anIter.More(); anIter.Next()) + { + Quantity_Color aColor((Quantity_NameOfColor)( + anIter.Key() % Quantity_NOC_WHITE)); + aBuilder->SetColor(anIter.Key(), aColor); + } + aMesh->AddBuilder(aBuilder, Standard_True); + } + + if (aMode.IsEqual("nodaltex")) + { + // assign nodal builder to the mesh + Handle(MeshVS_NodalColorPrsBuilder) aBuilder = new MeshVS_NodalColorPrsBuilder( + aMesh, MeshVS_DMF_NodalColorDataPrs | MeshVS_DMF_OCCMask); + aMesh->AddBuilder(aBuilder, Standard_True); + aBuilder->UseTexture(Standard_True); + + // prepare color map for texture + Aspect_SequenceOfColor aColorMap; + aColorMap.Append((Quantity_NameOfColor)Quantity_NOC_RED); + aColorMap.Append((Quantity_NameOfColor)Quantity_NOC_YELLOW); + aColorMap.Append((Quantity_NameOfColor)Quantity_NOC_BLUE1); + + // prepare scale map for mesh - it will be assigned to mesh as texture coordinates + // make mesh color interpolated from minimum X coord to maximum X coord + Handle(MeshVS_DataSource) aDataSource = aMesh->GetDataSource(); + Standard_Real aMinX, aMinY, aMinZ, aMaxX, aMaxY, aMaxZ; + + // get bounding box for calculations + aDataSource->GetBoundingBox().Get(aMinX, aMinY, aMinZ, aMaxX, aMaxY, aMaxZ); + Standard_Real aDelta = aMaxX - aMinX; + + // assign color scale map values (0..1) to nodes + TColStd_DataMapOfIntegerReal aScaleMap; + TColStd_Array1OfReal aCoords(1, 3); + Standard_Integer aNbNodes; + MeshVS_EntityType aType; + + // iterate nodes + const TColStd_PackedMapOfInteger& anAllNodes = + aMesh->GetDataSource()->GetAllNodes(); + for (TColStd_PackedMapOfInteger::Iterator anIter(anAllNodes); + anIter.More(); anIter.Next()) + { + //get node coordinates to aCoord variable + aDataSource->GetGeom(anIter.Key(), Standard_False, aCoords, aNbNodes, aType); + + Standard_Real aScaleValue; + try + { + OCC_CATCH_SIGNALS + aScaleValue = (aCoords.Value(1) - (Standard_Real)aMinX) / aDelta; + } + catch (Standard_Failure const&) + { + aScaleValue = 0; + } + + aScaleMap.Bind(anIter.Key(), aScaleValue); + } + + //set color map for builder and a color for invalid scale value + aBuilder->SetColorMap(aColorMap); + aBuilder->SetInvalidColor(Quantity_NOC_BLACK); + aBuilder->SetTextureCoords(aScaleMap); + aMesh->AddBuilder(aBuilder, Standard_True); + } + + aMesh->GetDrawer()->SetBoolean(MeshVS_DA_ColorReflection, aReflection != 0); + + anIC->Redisplay(aMesh, Standard_True); + } + else + { + theDI << "Wrong mode name\n"; + return 0; + } + } + } + catch (Standard_Failure const&) + { + theDI << "Error\n"; + } + + return 0; +} + +//======================================================================= +//function : meshvectors +//purpose : +//======================================================================= +static Standard_Integer meshvectors(Draw_Interpretor& theDI, + Standard_Integer theNbArgs, + const char** theArgVec) +{ + if (theNbArgs < 3) + { + theDI << "Wrong number of parameters\n"; + theDI << "Use : meshvectors < -mode {elem|nodal|none} > [-maxlen len] [-color name] [-arrowpart ratio] [-issimple {1|0}]\n"; + theDI << "Supported mode values:\n"; + theDI << " elem - vector per element\n"; + theDI << " nodal - vector per node\n"; + theDI << " none - clear\n"; + + return 0; + } + + Handle(MeshVS_Mesh) aMesh = getMesh(theArgVec[1], theDI); + + if (aMesh.IsNull()) + { + theDI << "Mesh not found\n"; + return 0; + } + Handle(AIS_InteractiveContext) anIC = ViewerTest::GetAISContext(); + if (anIC.IsNull()) + { + theDI << "The context is null\n"; + return 0; + } + + TCollection_AsciiString aParam; + TCollection_AsciiString aMode("none"); + Standard_Real aMaxlen(1.0); + Quantity_Color aColor(Quantity_NOC_ORANGE); + Standard_Real anArrowPart(0.1); + Standard_Boolean isSimplePrs(Standard_False); + + for (Standard_Integer anIdx = 2; anIdx < theNbArgs; anIdx++) + { + if (!aParam.IsEmpty()) + { + if (aParam == "-mode") + { + aMode = theArgVec[anIdx]; + } + else if (aParam == "-maxlen") + { + aMaxlen = Draw::Atof(theArgVec[anIdx]); + } + else if (aParam == "-color") + { + if (!Quantity_Color::ColorFromName(theArgVec[anIdx], aColor)) + { + theDI << "Syntax error at " << aParam << "\n"; + return 1; + } + } + else if (aParam == "-arrowpart") + { + anArrowPart = Draw::Atof(theArgVec[anIdx]); + } + else if (aParam == "-issimple") + { + isSimplePrs = Draw::Atoi(theArgVec[anIdx]) != 0; + } + aParam.Clear(); + } + else if (theArgVec[anIdx][0] == '-') + { + aParam = theArgVec[anIdx]; + } + } + + if (!aMode.IsEqual("elem") && !aMode.IsEqual("nodal") && !aMode.IsEqual("none")) + { + theDI << "Wrong mode name\n"; + return 0; + } + + Handle(MeshVS_PrsBuilder) aTempBuilder; + + aTempBuilder = aMesh->FindBuilder("MeshVS_VectorPrsBuilder"); + if (!aTempBuilder.IsNull()) + aMesh->RemoveBuilderById(aTempBuilder->GetId()); + + if (!aMode.IsEqual("none")) + { + Handle(MeshVS_VectorPrsBuilder) aBuilder = new MeshVS_VectorPrsBuilder(aMesh.operator->(), + aMaxlen, + aColor, + MeshVS_DMF_VectorDataPrs, + 0, + -1, + MeshVS_BP_Vector, + isSimplePrs); + + Standard_Boolean anIsElement = aMode.IsEqual("elem"); + const TColStd_PackedMapOfInteger& anAllIDs = anIsElement ? aMesh->GetDataSource()->GetAllElements() : + aMesh->GetDataSource()->GetAllNodes(); + + Standard_Integer aNbNodes; + MeshVS_EntityType aEntType; + + TColStd_Array1OfReal aCoords(1, 3); + aCoords.Init(0.); + for (TColStd_PackedMapOfInteger::Iterator anIter(anAllIDs); + anIter.More(); anIter.Next()) + { + Standard_Boolean IsValidData = Standard_False; + if (anIsElement) + { + aMesh->GetDataSource()->GetGeomType(anIter.Key(), anIsElement, aEntType); + if (aEntType == MeshVS_ET_Face) + IsValidData = aMesh->GetDataSource()->GetNormal(anIter.Key(), 3, aCoords.ChangeValue(1), aCoords.ChangeValue(2), aCoords.ChangeValue(3)); + } + else + IsValidData = aMesh->GetDataSource()->GetGeom(anIter.Key(), Standard_False, aCoords, aNbNodes, aEntType); + + gp_Vec aNorm; + if (IsValidData) + { + aNorm = gp_Vec(aCoords.Value(1), aCoords.Value(2), aCoords.Value(3)); + if (aNorm.Magnitude() < gp::Resolution()) + { + aNorm = gp_Vec(0, 0, 1); //method GetGeom(...) returns coordinates of nodes + } + } + else + { + aNorm = gp_Vec(0, 0, 1); + } + aBuilder->SetVector(anIsElement, anIter.Key(), aNorm.Normalized()); + } + + aMesh->AddBuilder(aBuilder, Standard_False); + aMesh->GetDrawer()->SetDouble(MeshVS_DA_VectorArrowPart, anArrowPart); + } + + anIC->Redisplay(aMesh, Standard_True); + + return 0; +} + +//======================================================================= +//function : meshtext +//purpose : +//======================================================================= +static Standard_Integer meshtext(Draw_Interpretor& theDI, + Standard_Integer theNbArgs, + const char** theArgVec) +{ + if (theNbArgs < 2) + { + theDI << "Wrong number of parameters\n"; + theDI << "Use : meshtext \n"; + return 0; + } + + Handle(MeshVS_Mesh) aMesh = getMesh(theArgVec[1], theDI); + + if (aMesh.IsNull()) + { + theDI << "Mesh not found\n"; + return 0; + } + + Handle(AIS_InteractiveContext) anIC = ViewerTest::GetAISContext(); + if (anIC.IsNull()) + { + theDI << "The context is null\n"; + return 0; + } + + // Prepare triangle labels + MeshVS_DataMapOfIntegerAsciiString aLabels; + Standard_Integer aLen = aMesh->GetDataSource()->GetAllElements().Extent(); + for (Standard_Integer anIndex = 1; anIndex <= aLen; anIndex++) + { + aLabels.Bind(anIndex, TCollection_AsciiString(anIndex)); + } + + Handle(MeshVS_TextPrsBuilder) aTextBuilder = new MeshVS_TextPrsBuilder(aMesh.operator->(), 20., Quantity_NOC_YELLOW); + aTextBuilder->SetTexts(Standard_True, aLabels); + aMesh->AddBuilder(aTextBuilder); + + return 0; +} + +//======================================================================= +//function : meshdeform +//purpose : +//======================================================================= +static Standard_Integer meshdeform(Draw_Interpretor& theDI, + Standard_Integer theNbArgs, + const char** theArgVec) +{ + if (theNbArgs < 3) + { + theDI << "Wrong number of parameters\n"; + theDI << "Use : meshdeform < -mode {on|off} > [-scale scalefactor]\n"; + return 0; + } + + Handle(MeshVS_Mesh) aMesh = getMesh(theArgVec[1], theDI); + + if (aMesh.IsNull()) + { + theDI << "Mesh not found\n"; + return 0; + } + Handle(AIS_InteractiveContext) anIC = ViewerTest::GetAISContext(); + if (anIC.IsNull()) + { + theDI << "The context is null\n"; + return 0; + } + + TCollection_AsciiString aParam; + TCollection_AsciiString aMode("off"); + Standard_Real aScale(1.0); + + for (Standard_Integer anIdx = 2; anIdx < theNbArgs; anIdx++) + { + if (!aParam.IsEmpty()) + { + if (aParam == "-mode") + { + aMode = theArgVec[anIdx]; + } + else if (aParam == "-scale") + { + aScale = Draw::Atof(theArgVec[anIdx]); + } + aParam.Clear(); + } + else if (theArgVec[anIdx][0] == '-') + { + aParam = theArgVec[anIdx]; + } + } + + if (!aMode.IsEqual("on") && !aMode.IsEqual("off")) + { + theDI << "Wrong mode name\n"; + return 0; + } + + Handle(MeshVS_DeformedDataSource) aDefDS = + new MeshVS_DeformedDataSource(aMesh->GetDataSource(), aScale); + + const TColStd_PackedMapOfInteger& anAllIDs = aMesh->GetDataSource()->GetAllNodes(); + + Standard_Integer aNbNodes; + MeshVS_EntityType aEntType; + + for (TColStd_PackedMapOfInteger::Iterator anIter(anAllIDs); + anIter.More(); anIter.Next()) + { + TColStd_Array1OfReal aCoords(1, 3); + aMesh->GetDataSource()->GetGeom(anIter.Key(), Standard_False, aCoords, aNbNodes, aEntType); + + gp_Vec aNorm = gp_Vec(aCoords.Value(1), aCoords.Value(2), aCoords.Value(3)); + if (!aNorm.Magnitude()) + aNorm = gp_Vec(0, 0, 1); + aDefDS->SetVector(anIter.Key(), aNorm.Normalized()); + } + + aMesh->SetDataSource(aDefDS); + + anIC->Redisplay(aMesh, Standard_False); + + Handle(V3d_View) aView = ViewerTest::CurrentView(); + if (!aView.IsNull()) + aView->FitAll(); + + return 0; +} + +//======================================================================= +//function : mesh_edge_width +//purpose : +//======================================================================= +static Standard_Integer mesh_edge_width(Draw_Interpretor& theDI, + Standard_Integer theNbArgs, + const char** theArgVec) +{ + try + { + OCC_CATCH_SIGNALS + if (theNbArgs < 3) + { + theDI << "Wrong number of parameters\n"; + theDI << "Use : mesh_edge_width \n"; + return 0; + } + + Handle(MeshVS_Mesh) aMesh = getMesh(theArgVec[1], theDI); + if (aMesh.IsNull()) + { + theDI << "Mesh not found\n"; + return 0; + } + + const char* aWidthStr = theArgVec[2]; + if (aWidthStr == 0 || Draw::Atof(aWidthStr) <= 0) + { + theDI << "Width must be real value more than zero\n"; + return 0; + } + + double aWidth = Draw::Atof(aWidthStr); + + Handle(AIS_InteractiveContext) anIC = ViewerTest::GetAISContext(); + if (anIC.IsNull()) + { + theDI << "The context is null\n"; + return 0; + } + + Handle(MeshVS_Drawer) aDrawer = aMesh->GetDrawer(); + if (aDrawer.IsNull()) + { + theDI << "The drawer is null\n"; + return 0; + } + + aDrawer->SetDouble(MeshVS_DA_EdgeWidth, aWidth); + anIC->Redisplay(aMesh, Standard_True); + } + catch (Standard_Failure const&) + { + theDI << "Error\n"; + } + + return 0; +} + +//======================================================================= +//function : meshinfo +//purpose : +//======================================================================= +static Standard_Integer meshinfo(Draw_Interpretor& theDI, + Standard_Integer theNbArgs, + const char** theArgVec) +{ + if (theNbArgs != 2) + { + theDI << "Wrong number of parameters. Use : meshinfo mesh\n"; + return 0; + } + + Handle(MeshVS_Mesh) aMesh = getMesh(theArgVec[1], theDI); + if (aMesh.IsNull()) + { + theDI << "Mesh not found\n"; + return 0; + } + + Handle(XSDRAWSTL_DataSource) stlMeshSource = Handle(XSDRAWSTL_DataSource)::DownCast(aMesh->GetDataSource()); + if (!stlMeshSource.IsNull()) + { + const TColStd_PackedMapOfInteger& nodes = stlMeshSource->GetAllNodes(); + const TColStd_PackedMapOfInteger& tris = stlMeshSource->GetAllElements(); + + theDI << "Nb nodes = " << nodes.Extent() << "\n"; + theDI << "Nb triangles = " << tris.Extent() << "\n"; + } + + return 0; +} + +//============================================================================= +//function : Factory +//purpose : +//============================================================================= +void XSDRAWSTL::Factory(Draw_Interpretor& theDI) +{ + static Standard_Boolean aIsActivated = Standard_False; + if (aIsActivated) + { + return; + } + aIsActivated = Standard_True; + + const char* aGroup = "XSTEP-STL/VRML"; // Step transfer file commands + + theDI.Add("writestl", "shape file [ascii/binary (0/1) : 1 by default] [InParallel (0/1) : 0 by default]", __FILE__, writestl, aGroup); + theDI.Add("readstl", + "readstl shape file [-brep] [-mergeAngle Angle] [-multi]" + "\n\t\t: Reads STL file and creates a new shape with specified name." + "\n\t\t: When -brep is specified, creates a Compound of per-triangle Faces." + "\n\t\t: Single triangulation-only Face is created otherwise (default)." + "\n\t\t: -mergeAngle specifies maximum angle in degrees between triangles to merge equal nodes; disabled by default." + "\n\t\t: -multi creates a face per solid in multi-domain files; ignored when -brep is set.", + __FILE__, readstl, aGroup); + + theDI.Add("meshfromstl", "creates MeshVS_Mesh from STL file", __FILE__, createmesh, aGroup); + theDI.Add("mesh3delem", "creates 3d element mesh to test", __FILE__, create3d, aGroup); + theDI.Add("meshshadcolor", "change MeshVS_Mesh shading color", __FILE__, meshcolor, aGroup); + theDI.Add("meshlinkcolor", "change MeshVS_Mesh line color", __FILE__, linecolor, aGroup); + theDI.Add("meshmat", "change MeshVS_Mesh material and transparency", __FILE__, meshmat, aGroup); + theDI.Add("meshshrcoef", "change MeshVS_Mesh shrink coeff", __FILE__, shrink, aGroup); + theDI.Add("meshclosed", "meshclosed meshname (0/1) \nChange MeshVS_Mesh drawing mode. 0 - not closed object, 1 - closed object", __FILE__, closed, aGroup); + theDI.Add("meshshow", "display MeshVS_Mesh object", __FILE__, mdisplay, aGroup); + theDI.Add("meshhide", "erase MeshVS_Mesh object", __FILE__, merase, aGroup); + theDI.Add("meshhidesel", "hide selected entities", __FILE__, hidesel, aGroup); + theDI.Add("meshshowsel", "show only selected entities", __FILE__, showonly, aGroup); + theDI.Add("meshshowall", "show all entities", __FILE__, showall, aGroup); + theDI.Add("meshcolors", "display color presentation", __FILE__, meshcolors, aGroup); + theDI.Add("meshvectors", "display sample vectors", __FILE__, meshvectors, aGroup); + theDI.Add("meshtext", "display text labels", __FILE__, meshtext, aGroup); + theDI.Add("meshdeform", "display deformed mesh", __FILE__, meshdeform, aGroup); + theDI.Add("mesh_edge_width", "set width of edges", __FILE__, mesh_edge_width, aGroup); + theDI.Add("meshinfo", "displays the number of nodes and triangles", __FILE__, meshinfo, aGroup); + + // Load XSDRAW session for pilot activation + XSDRAW::LoadDraw(theDI); +} + +// Declare entry point PLUGINFACTORY +DPLUGIN(XSDRAWSTL) diff --git a/src/XSDRAWSTL/XSDRAWSTL.hxx b/src/XSDRAWSTL/XSDRAWSTL.hxx new file mode 100644 index 0000000000..32b4ca7c80 --- /dev/null +++ b/src/XSDRAWSTL/XSDRAWSTL.hxx @@ -0,0 +1,31 @@ +// Copyright (c) 2023 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 _XSDRAWSTL_HeaderFile +#define _XSDRAWSTL_HeaderFile + +#include +#include + +#include + +class XSDRAWSTL +{ + DEFINE_STANDARD_ALLOC +public: + + //! Loads all Draw commands of XSDRAWSTL. Used for plugin. + Standard_EXPORT static void Factory(Draw_Interpretor& theDI); +}; + +#endif // _XSDRAWSTL_HeaderFile diff --git a/src/XSDRAWSTLVRML/XSDRAWSTLVRML_DataSource.cxx b/src/XSDRAWSTL/XSDRAWSTL_DataSource.cxx similarity index 90% rename from src/XSDRAWSTLVRML/XSDRAWSTLVRML_DataSource.cxx rename to src/XSDRAWSTL/XSDRAWSTL_DataSource.cxx index f6e95ccbba..603dec6edf 100644 --- a/src/XSDRAWSTLVRML/XSDRAWSTLVRML_DataSource.cxx +++ b/src/XSDRAWSTL/XSDRAWSTL_DataSource.cxx @@ -13,19 +13,19 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -#include +#include #include #include #include -IMPLEMENT_STANDARD_RTTIEXT(XSDRAWSTLVRML_DataSource,MeshVS_DataSource) +IMPLEMENT_STANDARD_RTTIEXT(XSDRAWSTL_DataSource,MeshVS_DataSource) //================================================================ // Function : Constructor // Purpose : //================================================================ -XSDRAWSTLVRML_DataSource::XSDRAWSTLVRML_DataSource (const Handle(Poly_Triangulation)& aMesh) +XSDRAWSTL_DataSource::XSDRAWSTL_DataSource (const Handle(Poly_Triangulation)& aMesh) { myMesh = aMesh; @@ -90,7 +90,7 @@ XSDRAWSTLVRML_DataSource::XSDRAWSTLVRML_DataSource (const Handle(Poly_Triangulat // Function : GetGeom // Purpose : //================================================================ -Standard_Boolean XSDRAWSTLVRML_DataSource::GetGeom +Standard_Boolean XSDRAWSTL_DataSource::GetGeom ( const Standard_Integer ID, const Standard_Boolean IsElement, TColStd_Array1OfReal& Coords, Standard_Integer& NbNodes, MeshVS_EntityType& Type ) const @@ -136,7 +136,7 @@ Standard_Boolean XSDRAWSTLVRML_DataSource::GetGeom // Function : GetGeomType // Purpose : //================================================================ -Standard_Boolean XSDRAWSTLVRML_DataSource::GetGeomType +Standard_Boolean XSDRAWSTL_DataSource::GetGeomType ( const Standard_Integer, const Standard_Boolean IsElement, MeshVS_EntityType& Type ) const @@ -157,7 +157,7 @@ Standard_Boolean XSDRAWSTLVRML_DataSource::GetGeomType // Function : GetAddr // Purpose : //================================================================ -Standard_Address XSDRAWSTLVRML_DataSource::GetAddr +Standard_Address XSDRAWSTL_DataSource::GetAddr ( const Standard_Integer, const Standard_Boolean ) const { return NULL; @@ -167,7 +167,7 @@ Standard_Address XSDRAWSTLVRML_DataSource::GetAddr // Function : GetNodesByElement // Purpose : //================================================================ -Standard_Boolean XSDRAWSTLVRML_DataSource::GetNodesByElement +Standard_Boolean XSDRAWSTL_DataSource::GetNodesByElement ( const Standard_Integer ID, TColStd_Array1OfInteger& theNodeIDs, Standard_Integer& /*theNbNodes*/ ) const @@ -190,7 +190,7 @@ Standard_Boolean XSDRAWSTLVRML_DataSource::GetNodesByElement // Function : GetAllNodes // Purpose : //================================================================ -const TColStd_PackedMapOfInteger& XSDRAWSTLVRML_DataSource::GetAllNodes() const +const TColStd_PackedMapOfInteger& XSDRAWSTL_DataSource::GetAllNodes() const { return myNodes; } @@ -199,7 +199,7 @@ const TColStd_PackedMapOfInteger& XSDRAWSTLVRML_DataSource::GetAllNodes() const // Function : GetAllElements // Purpose : //================================================================ -const TColStd_PackedMapOfInteger& XSDRAWSTLVRML_DataSource::GetAllElements() const +const TColStd_PackedMapOfInteger& XSDRAWSTL_DataSource::GetAllElements() const { return myElements; } @@ -208,7 +208,7 @@ const TColStd_PackedMapOfInteger& XSDRAWSTLVRML_DataSource::GetAllElements() con // Function : GetNormal // Purpose : //================================================================ -Standard_Boolean XSDRAWSTLVRML_DataSource::GetNormal +Standard_Boolean XSDRAWSTL_DataSource::GetNormal ( const Standard_Integer Id, const Standard_Integer Max, Standard_Real& nx, Standard_Real& ny,Standard_Real& nz ) const { diff --git a/src/XSDRAWSTLVRML/XSDRAWSTLVRML_DataSource.hxx b/src/XSDRAWSTL/XSDRAWSTL_DataSource.hxx similarity index 88% rename from src/XSDRAWSTLVRML/XSDRAWSTLVRML_DataSource.hxx rename to src/XSDRAWSTL/XSDRAWSTL_DataSource.hxx index ca59eac486..2e4e3287b8 100644 --- a/src/XSDRAWSTLVRML/XSDRAWSTLVRML_DataSource.hxx +++ b/src/XSDRAWSTL/XSDRAWSTL_DataSource.hxx @@ -13,8 +13,8 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -#ifndef _XSDRAWSTLVRML_DataSource_HeaderFile -#define _XSDRAWSTLVRML_DataSource_HeaderFile +#ifndef _XSDRAWSTL_DataSource_HeaderFile +#define _XSDRAWSTL_DataSource_HeaderFile #include @@ -28,18 +28,18 @@ #include -class XSDRAWSTLVRML_DataSource; -DEFINE_STANDARD_HANDLE(XSDRAWSTLVRML_DataSource, MeshVS_DataSource) +class XSDRAWSTL_DataSource; +DEFINE_STANDARD_HANDLE(XSDRAWSTL_DataSource, MeshVS_DataSource) //! The sample DataSource for working with STLMesh_Mesh -class XSDRAWSTLVRML_DataSource : public MeshVS_DataSource +class XSDRAWSTL_DataSource : public MeshVS_DataSource { public: //! Constructor - Standard_EXPORT XSDRAWSTLVRML_DataSource(const Handle(Poly_Triangulation)& aMesh); + Standard_EXPORT XSDRAWSTL_DataSource(const Handle(Poly_Triangulation)& aMesh); //! Returns geometry information about node (if IsElement is False) or element (IsElement is True) by coordinates. //! For element this method must return all its nodes coordinates in the strict order: X, Y, Z and @@ -70,7 +70,7 @@ public: - DEFINE_STANDARD_RTTIEXT(XSDRAWSTLVRML_DataSource,MeshVS_DataSource) + DEFINE_STANDARD_RTTIEXT(XSDRAWSTL_DataSource,MeshVS_DataSource) protected: @@ -96,4 +96,4 @@ private: -#endif // _XSDRAWSTLVRML_DataSource_HeaderFile +#endif // _XSDRAWSTL_DataSource_HeaderFile diff --git a/src/XSDRAWSTLVRML/XSDRAWSTLVRML_DataSource3D.cxx b/src/XSDRAWSTL/XSDRAWSTL_DataSource3D.cxx similarity index 94% rename from src/XSDRAWSTLVRML/XSDRAWSTLVRML_DataSource3D.cxx rename to src/XSDRAWSTL/XSDRAWSTL_DataSource3D.cxx index 6845cad24e..256840a0b0 100644 --- a/src/XSDRAWSTLVRML/XSDRAWSTLVRML_DataSource3D.cxx +++ b/src/XSDRAWSTL/XSDRAWSTL_DataSource3D.cxx @@ -18,15 +18,15 @@ #include #include #include -#include +#include -IMPLEMENT_STANDARD_RTTIEXT(XSDRAWSTLVRML_DataSource3D,MeshVS_DataSource) +IMPLEMENT_STANDARD_RTTIEXT(XSDRAWSTL_DataSource3D,MeshVS_DataSource) //================================================================ // Function : Constructor // Purpose : //================================================================ -XSDRAWSTLVRML_DataSource3D::XSDRAWSTLVRML_DataSource3D() +XSDRAWSTL_DataSource3D::XSDRAWSTL_DataSource3D() { for (Standard_Integer aNodeID = 1; aNodeID <= 16; aNodeID++) { @@ -154,7 +154,7 @@ XSDRAWSTLVRML_DataSource3D::XSDRAWSTLVRML_DataSource3D() // Function : GetGeom // Purpose : //================================================================ -Standard_Boolean XSDRAWSTLVRML_DataSource3D::GetGeom +Standard_Boolean XSDRAWSTL_DataSource3D::GetGeom ( const Standard_Integer theID, const Standard_Boolean theIsElement, TColStd_Array1OfReal& theCoords, Standard_Integer& theNbNodes, MeshVS_EntityType& theType ) const @@ -197,7 +197,7 @@ Standard_Boolean XSDRAWSTLVRML_DataSource3D::GetGeom // Function : Get3DGeom // Purpose : //================================================================ -Standard_Boolean XSDRAWSTLVRML_DataSource3D::Get3DGeom +Standard_Boolean XSDRAWSTL_DataSource3D::Get3DGeom ( const Standard_Integer theID, Standard_Integer& theNbNodes, Handle(MeshVS_HArray1OfSequenceOfInteger)& theData ) const { @@ -271,7 +271,7 @@ Standard_Boolean XSDRAWSTLVRML_DataSource3D::Get3DGeom // Function : GetGeomType // Purpose : //================================================================ -Standard_Boolean XSDRAWSTLVRML_DataSource3D::GetGeomType +Standard_Boolean XSDRAWSTL_DataSource3D::GetGeomType ( const Standard_Integer theID, const Standard_Boolean theIsElement, MeshVS_EntityType& theType ) const @@ -298,7 +298,7 @@ Standard_Boolean XSDRAWSTLVRML_DataSource3D::GetGeomType // Function : GetAddr // Purpose : //================================================================ -Standard_Address XSDRAWSTLVRML_DataSource3D::GetAddr +Standard_Address XSDRAWSTL_DataSource3D::GetAddr ( const Standard_Integer, const Standard_Boolean ) const { return NULL; @@ -308,7 +308,7 @@ Standard_Address XSDRAWSTLVRML_DataSource3D::GetAddr // Function : GetNodesByElement // Purpose : //================================================================ -Standard_Boolean XSDRAWSTLVRML_DataSource3D::GetNodesByElement +Standard_Boolean XSDRAWSTL_DataSource3D::GetNodesByElement ( const Standard_Integer theID, TColStd_Array1OfInteger& theNodeIDs, Standard_Integer& theNbNodes ) const @@ -360,7 +360,7 @@ Standard_Boolean XSDRAWSTLVRML_DataSource3D::GetNodesByElement // Function : GetAllNodes // Purpose : //================================================================ -const TColStd_PackedMapOfInteger& XSDRAWSTLVRML_DataSource3D::GetAllNodes() const +const TColStd_PackedMapOfInteger& XSDRAWSTL_DataSource3D::GetAllNodes() const { return myNodes; } @@ -369,7 +369,7 @@ const TColStd_PackedMapOfInteger& XSDRAWSTLVRML_DataSource3D::GetAllNodes() cons // Function : GetAllElements // Purpose : //================================================================ -const TColStd_PackedMapOfInteger& XSDRAWSTLVRML_DataSource3D::GetAllElements() const +const TColStd_PackedMapOfInteger& XSDRAWSTL_DataSource3D::GetAllElements() const { return myElements; } @@ -378,7 +378,7 @@ const TColStd_PackedMapOfInteger& XSDRAWSTLVRML_DataSource3D::GetAllElements() c // Function : GetNormal // Purpose : //================================================================ -Standard_Boolean XSDRAWSTLVRML_DataSource3D::GetNormal +Standard_Boolean XSDRAWSTL_DataSource3D::GetNormal ( const Standard_Integer /*theID*/, const Standard_Integer /*theMax*/, Standard_Real& /*theNx*/, Standard_Real& /*theNy*/,Standard_Real& /*theNz*/ ) const { diff --git a/src/XSDRAWSTLVRML/XSDRAWSTLVRML_DataSource3D.hxx b/src/XSDRAWSTL/XSDRAWSTL_DataSource3D.hxx similarity index 90% rename from src/XSDRAWSTLVRML/XSDRAWSTLVRML_DataSource3D.hxx rename to src/XSDRAWSTL/XSDRAWSTL_DataSource3D.hxx index aac3345e67..d91e604445 100644 --- a/src/XSDRAWSTLVRML/XSDRAWSTLVRML_DataSource3D.hxx +++ b/src/XSDRAWSTL/XSDRAWSTL_DataSource3D.hxx @@ -13,8 +13,8 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -#ifndef _XSDRAWSTLVRML_DataSource3D_HeaderFile -#define _XSDRAWSTLVRML_DataSource3D_HeaderFile +#ifndef _XSDRAWSTL_DataSource3D_HeaderFile +#define _XSDRAWSTL_DataSource3D_HeaderFile #include #include @@ -30,18 +30,18 @@ #include -class XSDRAWSTLVRML_DataSource3D; -DEFINE_STANDARD_HANDLE(XSDRAWSTLVRML_DataSource3D, MeshVS_DataSource) +class XSDRAWSTL_DataSource3D; +DEFINE_STANDARD_HANDLE(XSDRAWSTL_DataSource3D, MeshVS_DataSource) //! The sample DataSource3D for working with STLMesh_Mesh -class XSDRAWSTLVRML_DataSource3D : public MeshVS_DataSource +class XSDRAWSTL_DataSource3D : public MeshVS_DataSource { public: //! Constructor - Standard_EXPORT XSDRAWSTLVRML_DataSource3D(); + Standard_EXPORT XSDRAWSTL_DataSource3D(); //! Returns geometry information about node (if IsElement is False) or element (IsElement is True) by coordinates. //! For element this method must return all its nodes coordinates in the strict order: X, Y, Z and @@ -76,7 +76,7 @@ public: - DEFINE_STANDARD_RTTIEXT(XSDRAWSTLVRML_DataSource3D,MeshVS_DataSource) + DEFINE_STANDARD_RTTIEXT(XSDRAWSTL_DataSource3D,MeshVS_DataSource) protected: @@ -101,4 +101,4 @@ private: -#endif // _XSDRAWSTLVRML_DataSource3D_HeaderFile +#endif // _XSDRAWSTL_DataSource3D_HeaderFile diff --git a/src/XSDRAWSTLVRML/XSDRAWSTLVRML_DrawableMesh.cxx b/src/XSDRAWSTL/XSDRAWSTL_DrawableMesh.cxx similarity index 79% rename from src/XSDRAWSTLVRML/XSDRAWSTLVRML_DrawableMesh.cxx rename to src/XSDRAWSTL/XSDRAWSTL_DrawableMesh.cxx index ef2dd5baa1..7681a25aa2 100644 --- a/src/XSDRAWSTLVRML/XSDRAWSTLVRML_DrawableMesh.cxx +++ b/src/XSDRAWSTL/XSDRAWSTL_DrawableMesh.cxx @@ -17,15 +17,15 @@ #include #include #include -#include +#include -IMPLEMENT_STANDARD_RTTIEXT(XSDRAWSTLVRML_DrawableMesh,Draw_Drawable3D) +IMPLEMENT_STANDARD_RTTIEXT(XSDRAWSTL_DrawableMesh,Draw_Drawable3D) //================================================================ // Function : DrawOn // Purpose : //================================================================ -XSDRAWSTLVRML_DrawableMesh::XSDRAWSTLVRML_DrawableMesh( const Handle( MeshVS_Mesh )& aMesh ) +XSDRAWSTL_DrawableMesh::XSDRAWSTL_DrawableMesh( const Handle( MeshVS_Mesh )& aMesh ) { myMesh = aMesh; } @@ -34,7 +34,7 @@ XSDRAWSTLVRML_DrawableMesh::XSDRAWSTLVRML_DrawableMesh( const Handle( MeshVS_Mes // Function : // Purpose : //================================================================ -void XSDRAWSTLVRML_DrawableMesh::DrawOn(Draw_Display& /*d*/) const +void XSDRAWSTL_DrawableMesh::DrawOn(Draw_Display& /*d*/) const { } @@ -42,7 +42,7 @@ void XSDRAWSTLVRML_DrawableMesh::DrawOn(Draw_Display& /*d*/) const // Function : // Purpose : //================================================================ -Handle( MeshVS_Mesh ) XSDRAWSTLVRML_DrawableMesh::GetMesh() const +Handle( MeshVS_Mesh ) XSDRAWSTL_DrawableMesh::GetMesh() const { return myMesh; } diff --git a/src/XSDRAWSTLVRML/XSDRAWSTLVRML_DrawableMesh.hxx b/src/XSDRAWSTL/XSDRAWSTL_DrawableMesh.hxx similarity index 70% rename from src/XSDRAWSTLVRML/XSDRAWSTLVRML_DrawableMesh.hxx rename to src/XSDRAWSTL/XSDRAWSTL_DrawableMesh.hxx index d4fd63bf29..1282ad26a6 100644 --- a/src/XSDRAWSTLVRML/XSDRAWSTLVRML_DrawableMesh.hxx +++ b/src/XSDRAWSTL/XSDRAWSTL_DrawableMesh.hxx @@ -13,8 +13,8 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -#ifndef _XSDRAWSTLVRML_DrawableMesh_HeaderFile -#define _XSDRAWSTLVRML_DrawableMesh_HeaderFile +#ifndef _XSDRAWSTL_DrawableMesh_HeaderFile +#define _XSDRAWSTL_DrawableMesh_HeaderFile #include #include @@ -24,17 +24,17 @@ class MeshVS_Mesh; class Draw_Display; -class XSDRAWSTLVRML_DrawableMesh; -DEFINE_STANDARD_HANDLE(XSDRAWSTLVRML_DrawableMesh, Draw_Drawable3D) +class XSDRAWSTL_DrawableMesh; +DEFINE_STANDARD_HANDLE(XSDRAWSTL_DrawableMesh, Draw_Drawable3D) -class XSDRAWSTLVRML_DrawableMesh : public Draw_Drawable3D +class XSDRAWSTL_DrawableMesh : public Draw_Drawable3D { public: - Standard_EXPORT XSDRAWSTLVRML_DrawableMesh(const Handle(MeshVS_Mesh)& aMesh); + Standard_EXPORT XSDRAWSTL_DrawableMesh(const Handle(MeshVS_Mesh)& aMesh); Standard_EXPORT virtual void DrawOn (Draw_Display& dis) const Standard_OVERRIDE; @@ -43,7 +43,7 @@ public: - DEFINE_STANDARD_RTTIEXT(XSDRAWSTLVRML_DrawableMesh,Draw_Drawable3D) + DEFINE_STANDARD_RTTIEXT(XSDRAWSTL_DrawableMesh,Draw_Drawable3D) protected: @@ -64,4 +64,4 @@ private: -#endif // _XSDRAWSTLVRML_DrawableMesh_HeaderFile +#endif // _XSDRAWSTL_DrawableMesh_HeaderFile diff --git a/src/XSDRAWSTLVRML/FILES b/src/XSDRAWSTLVRML/FILES deleted file mode 100644 index 0541a21c66..0000000000 --- a/src/XSDRAWSTLVRML/FILES +++ /dev/null @@ -1,12 +0,0 @@ -XSDRAWSTLVRML.cxx -XSDRAWSTLVRML.hxx -XSDRAWSTLVRML_CoordsMap.hxx -XSDRAWSTLVRML_DataMapIteratorOfCoordsMap.hxx -XSDRAWSTLVRML_DataMapIteratorOfElemNodesMap.hxx -XSDRAWSTLVRML_DataSource.cxx -XSDRAWSTLVRML_DataSource.hxx -XSDRAWSTLVRML_DataSource3D.cxx -XSDRAWSTLVRML_DataSource3D.hxx -XSDRAWSTLVRML_DrawableMesh.cxx -XSDRAWSTLVRML_DrawableMesh.hxx -XSDRAWSTLVRML_ElemNodesMap.hxx diff --git a/src/XSDRAWSTLVRML/XSDRAWSTLVRML.cxx b/src/XSDRAWSTLVRML/XSDRAWSTLVRML.cxx deleted file mode 100644 index 62aaad6e2e..0000000000 --- a/src/XSDRAWSTLVRML/XSDRAWSTLVRML.cxx +++ /dev/null @@ -1,2583 +0,0 @@ -// Created on: 2000-05-30 -// Created by: Sergey MOZOKHIN -// Copyright (c) 2000-2014 OPEN CASCADE SAS -// -// This file is part of Open CASCADE Technology software library. -// -// This library is free software; you can redistribute it and/or modify it under -// the terms of the GNU Lesser General Public License version 2.1 as published -// by the Free Software Foundation, with special exception defined in the file -// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT -// distribution for complete text of the license and disclaimer of any warranty. -// -// Alternatively, this file may be used under the terms of Open CASCADE -// commercial license or contractual agreement. - -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#ifndef _STDIO_H -#include -#endif - -extern Standard_Boolean VDisplayAISObject (const TCollection_AsciiString& theName, - const Handle(AIS_InteractiveObject)& theAISObj, - Standard_Boolean theReplaceIfExists = Standard_True); - -//! Parse RWMesh_NameFormat enumeration. -static bool parseNameFormat (const char* theArg, - RWMesh_NameFormat& theFormat) -{ - TCollection_AsciiString aName (theArg); - aName.LowerCase(); - if (aName == "empty") - { - theFormat = RWMesh_NameFormat_Empty; - } - else if (aName == "product" - || aName == "prod") - { - theFormat = RWMesh_NameFormat_Product; - } - else if (aName == "instance" - || aName == "inst") - { - theFormat = RWMesh_NameFormat_Instance; - } - else if (aName == "instanceorproduct" - || aName == "instance||product" - || aName == "instance|product" - || aName == "instorprod" - || aName == "inst||prod" - || aName == "inst|prod") - { - theFormat = RWMesh_NameFormat_InstanceOrProduct; - } - else if (aName == "productorinstance" - || aName == "product||instance" - || aName == "product|instance" - || aName == "prodorinst" - || aName == "prod||inst" - || aName == "prod|inst") - { - theFormat = RWMesh_NameFormat_ProductOrInstance; - } - else if (aName == "productandinstance" - || aName == "prodandinst" - || aName == "product&instance" - || aName == "prod&inst") - { - theFormat = RWMesh_NameFormat_ProductAndInstance; - } - else if (aName == "productandinstanceandocaf" - || aName == "verbose" - || aName == "debug") - { - theFormat = RWMesh_NameFormat_ProductAndInstanceAndOcaf; - } - else - { - return false; - } - return true; -} - -//! Parse RWMesh_CoordinateSystem enumeration. -static bool parseCoordinateSystem (const char* theArg, - RWMesh_CoordinateSystem& theSystem) -{ - TCollection_AsciiString aCSStr (theArg); - aCSStr.LowerCase(); - if (aCSStr == "zup") - { - theSystem = RWMesh_CoordinateSystem_Zup; - } - else if (aCSStr == "yup") - { - theSystem = RWMesh_CoordinateSystem_Yup; - } - else - { - return Standard_False; - } - return Standard_True; -} - -//============================================================================= -//function : ReadGltf -//purpose : Reads glTF file -//============================================================================= -static Standard_Integer ReadGltf (Draw_Interpretor& theDI, - Standard_Integer theNbArgs, - const char** theArgVec) -{ - TCollection_AsciiString aDestName, aFilePath; - Standard_Boolean toUseExistingDoc = Standard_False; - Standard_Boolean toListExternalFiles = Standard_False; - Standard_Boolean isParallel = Standard_False; - Standard_Boolean isDoublePrec = Standard_False; - Standard_Boolean toSkipLateDataLoading = Standard_False; - Standard_Boolean toKeepLateData = Standard_True; - Standard_Boolean toPrintDebugInfo = Standard_False; - Standard_Boolean toLoadAllScenes = Standard_False; - Standard_Boolean toPrintAssetInfo = Standard_False; - Standard_Boolean isNoDoc = (TCollection_AsciiString(theArgVec[0]) == "readgltf"); - for (Standard_Integer anArgIter = 1; anArgIter < theNbArgs; ++anArgIter) - { - TCollection_AsciiString anArgCase (theArgVec[anArgIter]); - anArgCase.LowerCase(); - if (!isNoDoc - && (anArgCase == "-nocreate" - || anArgCase == "-nocreatedoc")) - { - toUseExistingDoc = Draw::ParseOnOffIterator (theNbArgs, theArgVec, anArgIter); - } - else if (anArgCase == "-parallel") - { - isParallel = Draw::ParseOnOffIterator (theNbArgs, theArgVec, anArgIter); - } - else if (anArgCase == "-doubleprec" - || anArgCase == "-doubleprecision" - || anArgCase == "-singleprec" - || anArgCase == "-singleprecision") - { - isDoublePrec = Draw::ParseOnOffIterator (theNbArgs, theArgVec, anArgIter); - if (anArgCase.StartsWith ("-single")) - { - isDoublePrec = !isDoublePrec; - } - } - else if (anArgCase == "-skiplateloading") - { - toSkipLateDataLoading = Draw::ParseOnOffIterator (theNbArgs, theArgVec, anArgIter); - } - else if (anArgCase == "-keeplate") - { - toKeepLateData = Draw::ParseOnOffIterator (theNbArgs, theArgVec, anArgIter); - } - else if (anArgCase == "-allscenes") - { - toLoadAllScenes = Draw::ParseOnOffIterator (theNbArgs, theArgVec, anArgIter); - } - else if (anArgCase == "-toprintinfo" - || anArgCase == "-toprintdebuginfo") - { - toPrintDebugInfo = Draw::ParseOnOffIterator (theNbArgs, theArgVec, anArgIter); - } - else if (anArgCase == "-listexternalfiles" - || anArgCase == "-listexternals" - || anArgCase == "-listexternal" - || anArgCase == "-external" - || anArgCase == "-externalfiles") - { - toListExternalFiles = Draw::ParseOnOffIterator (theNbArgs, theArgVec, anArgIter); - } - else if (anArgCase == "-assetinfo" - || anArgCase == "-metadata") - { - toPrintAssetInfo = Draw::ParseOnOffIterator (theNbArgs, theArgVec, anArgIter); - } - else if (aDestName.IsEmpty()) - { - aDestName = theArgVec[anArgIter]; - } - else if (aFilePath.IsEmpty()) - { - aFilePath = theArgVec[anArgIter]; - } - else - { - Message::SendFail() << "Syntax error at '" << theArgVec[anArgIter] << "'"; - return 1; - } - } - if (aFilePath.IsEmpty() && !aDestName.IsEmpty()) - { - if (toListExternalFiles || toPrintAssetInfo) - { - std::swap (aFilePath, aDestName); - } - } - if (aFilePath.IsEmpty()) - { - Message::SendFail() << "Syntax error: wrong number of arguments"; - return 1; - } - - Handle(Draw_ProgressIndicator) aProgress = new Draw_ProgressIndicator (theDI, 1); - Handle(TDocStd_Document) aDoc; - if (!aDestName.IsEmpty() - && !isNoDoc) - { - Handle(TDocStd_Application) anApp = DDocStd::GetApplication(); - Standard_CString aNameVar = aDestName.ToCString(); - DDocStd::GetDocument (aNameVar, aDoc, Standard_False); - if (aDoc.IsNull()) - { - if (toUseExistingDoc) - { - Message::SendFail() << "Error: document with name " << aDestName << " does not exist"; - return 1; - } - anApp->NewDocument (TCollection_ExtendedString ("BinXCAF"), aDoc); - } - else if (!toUseExistingDoc) - { - Message::SendFail() << "Error: document with name " << aDestName << " already exists"; - return 1; - } - } - - Standard_Real aScaleFactorM = 1.; - if (!XCAFDoc_DocumentTool::GetLengthUnit(aDoc, aScaleFactorM, UnitsMethods_LengthUnit_Meter)) - { - XSAlgo::AlgoContainer()->PrepareForTransfer(); // update unit info - aScaleFactorM = UnitsMethods::GetCasCadeLengthUnit(UnitsMethods_LengthUnit_Meter); - } - - RWGltf_CafReader aReader; - aReader.SetSystemLengthUnit (aScaleFactorM); - aReader.SetSystemCoordinateSystem (RWMesh_CoordinateSystem_Zup); - aReader.SetDocument (aDoc); - aReader.SetParallel (isParallel); - aReader.SetDoublePrecision (isDoublePrec); - aReader.SetToSkipLateDataLoading (toSkipLateDataLoading); - aReader.SetToKeepLateData (toKeepLateData); - aReader.SetToPrintDebugMessages (toPrintDebugInfo); - aReader.SetLoadAllScenes (toLoadAllScenes); - if (aDestName.IsEmpty()) - { - aReader.ProbeHeader (aFilePath); - } - else - { - aReader.Perform (aFilePath, aProgress->Start()); - if (isNoDoc) - { - DBRep::Set (aDestName.ToCString(), aReader.SingleShape()); - } - else - { - Handle(DDocStd_DrawDocument) aDrawDoc = new DDocStd_DrawDocument (aDoc); - TDataStd_Name::Set (aDoc->GetData()->Root(), aDestName); - Draw::Set (aDestName.ToCString(), aDrawDoc); - } - } - - bool isFirstLine = true; - if (toPrintAssetInfo) - { - for (TColStd_IndexedDataMapOfStringString::Iterator aKeyIter (aReader.Metadata()); aKeyIter.More(); aKeyIter.Next()) - { - if (!isFirstLine) - { - theDI << "\n"; - } - isFirstLine = false; - theDI << aKeyIter.Key() << ": " << aKeyIter.Value(); - } - } - if (toListExternalFiles) - { - if (!isFirstLine) - { - theDI << "\n"; - } - for (NCollection_IndexedMap::Iterator aFileIter (aReader.ExternalFiles()); aFileIter.More(); aFileIter.Next()) - { - theDI << "\"" << aFileIter.Value() << "\" "; - } - } - - return 0; -} - -//============================================================================= -//function : WriteGltf -//purpose : Writes glTF file -//============================================================================= -static Standard_Integer WriteGltf (Draw_Interpretor& theDI, - Standard_Integer theNbArgs, - const char** theArgVec) -{ - TCollection_AsciiString aGltfFilePath; - Handle(TDocStd_Document) aDoc; - Handle(TDocStd_Application) anApp = DDocStd::GetApplication(); - TColStd_IndexedDataMapOfStringString aFileInfo; - RWGltf_WriterTrsfFormat aTrsfFormat = RWGltf_WriterTrsfFormat_Compact; - RWMesh_CoordinateSystem aSystemCoordSys = RWMesh_CoordinateSystem_Zup; - bool toForceUVExport = false, toEmbedTexturesInGlb = true; - bool toMergeFaces = false, toSplitIndices16 = false; - bool isParallel = false; - RWMesh_NameFormat aNodeNameFormat = RWMesh_NameFormat_InstanceOrProduct; - RWMesh_NameFormat aMeshNameFormat = RWMesh_NameFormat_Product; - RWGltf_DracoParameters aDracoParameters; - for (Standard_Integer anArgIter = 1; anArgIter < theNbArgs; ++anArgIter) - { - TCollection_AsciiString anArgCase (theArgVec[anArgIter]); - anArgCase.LowerCase(); - if (anArgCase == "-comments" - && anArgIter + 1 < theNbArgs) - { - aFileInfo.Add ("Comments", theArgVec[++anArgIter]); - } - else if (anArgCase == "-author" - && anArgIter + 1 < theNbArgs) - { - aFileInfo.Add ("Author", theArgVec[++anArgIter]); - } - else if (anArgCase == "-forceuvexport" - || anArgCase == "-forceuv") - { - toForceUVExport = true; - if (anArgIter + 1 < theNbArgs - && Draw::ParseOnOff (theArgVec[anArgIter + 1], toForceUVExport)) - { - ++anArgIter; - } - } - else if (anArgCase == "-mergefaces") - { - toMergeFaces = true; - if (anArgIter + 1 < theNbArgs - && Draw::ParseOnOff (theArgVec[anArgIter + 1], toMergeFaces)) - { - ++anArgIter; - } - } - else if (anArgCase == "-splitindices16" - || anArgCase == "-splitindexes16" - || anArgCase == "-splitindices" - || anArgCase == "-splitindexes" - || anArgCase == "-splitind") - { - toSplitIndices16 = true; - if (anArgIter + 1 < theNbArgs - && Draw::ParseOnOff (theArgVec[anArgIter + 1], toSplitIndices16)) - { - ++anArgIter; - } - } - else if (anArgIter + 1 < theNbArgs - && (anArgCase == "-systemcoordinatesystem" - || anArgCase == "-systemcoordsystem" - || anArgCase == "-systemcoordsys" - || anArgCase == "-syscoordsys")) - { - if (!parseCoordinateSystem (theArgVec[++anArgIter], aSystemCoordSys)) - { - Message::SendFail() << "Syntax error: unknown coordinate system '" << theArgVec[anArgIter] << "'"; - return 1; - } - } - else if (anArgCase == "-trsfformat" - && anArgIter + 1 < theNbArgs) - { - TCollection_AsciiString aTrsfStr (theArgVec[++anArgIter]); - aTrsfStr.LowerCase(); - if (aTrsfStr == "compact") - { - aTrsfFormat = RWGltf_WriterTrsfFormat_Compact; - } - else if (aTrsfStr == "mat4") - { - aTrsfFormat = RWGltf_WriterTrsfFormat_Mat4; - } - else if (aTrsfStr == "trs") - { - aTrsfFormat = RWGltf_WriterTrsfFormat_TRS; - } - else - { - Message::SendFail() << "Syntax error at '" << anArgCase << "'"; - return 1; - } - } - else if (anArgCase == "-nodenameformat" - || anArgCase == "-nodename") - { - ++anArgIter; - if (anArgIter >= theNbArgs - || !parseNameFormat (theArgVec[anArgIter], aNodeNameFormat)) - { - Message::SendFail() << "Syntax error at '" << anArgCase << "'"; - return 1; - } - } - else if (anArgCase == "-meshnameformat" - || anArgCase == "-meshname") - { - ++anArgIter; - if (anArgIter >= theNbArgs - || !parseNameFormat (theArgVec[anArgIter], aMeshNameFormat)) - { - Message::SendFail() << "Syntax error at '" << anArgCase << "'"; - return 1; - } - } - else if (aDoc.IsNull()) - { - Standard_CString aNameVar = theArgVec[anArgIter]; - DDocStd::GetDocument (aNameVar, aDoc, false); - if (aDoc.IsNull()) - { - TopoDS_Shape aShape = DBRep::Get (aNameVar); - if (aShape.IsNull()) - { - Message::SendFail() << "Syntax error: '" << aNameVar << "' is not a shape nor document"; - return 1; - } - - anApp->NewDocument (TCollection_ExtendedString ("BinXCAF"), aDoc); - Handle(XCAFDoc_ShapeTool) aShapeTool = XCAFDoc_DocumentTool::ShapeTool (aDoc->Main()); - // auto-naming doesn't generate meaningful instance names - //aShapeTool->SetAutoNaming (false); - aNodeNameFormat = RWMesh_NameFormat_Product; - aShapeTool->AddShape (aShape); - } - } - else if (aGltfFilePath.IsEmpty()) - { - aGltfFilePath = theArgVec[anArgIter]; - } - else if (anArgCase == "-texturesSeparate") - { - toEmbedTexturesInGlb = false; - } - else if (anArgCase == "-draco") - { - aDracoParameters.DracoCompression = Draw::ParseOnOffIterator(theNbArgs, theArgVec, anArgIter); - } - else if (anArgCase == "-compressionlevel" && (anArgIter + 1) < theNbArgs - && Draw::ParseInteger(theArgVec[anArgIter + 1], aDracoParameters.CompressionLevel)) - { - ++anArgIter; - } - else if (anArgCase == "-quantizepositionbits" && (anArgIter + 1) < theNbArgs - && Draw::ParseInteger(theArgVec[anArgIter + 1], aDracoParameters.QuantizePositionBits)) - { - ++anArgIter; - } - else if (anArgCase == "-quantizenormalbits" && (anArgIter + 1) < theNbArgs - && Draw::ParseInteger(theArgVec[anArgIter + 1], aDracoParameters.QuantizeNormalBits)) - { - ++anArgIter; - } - else if (anArgCase == "-quantizetexcoordbits" && (anArgIter + 1) < theNbArgs - && Draw::ParseInteger(theArgVec[anArgIter + 1], aDracoParameters.QuantizeTexcoordBits)) - { - ++anArgIter; - } - else if (anArgCase == "-quantizecolorbits" && (anArgIter + 1) < theNbArgs - && Draw::ParseInteger(theArgVec[anArgIter + 1], aDracoParameters.QuantizeColorBits)) - { - ++anArgIter; - } - else if (anArgCase == "-quantizegenericbits" && (anArgIter + 1) < theNbArgs - && Draw::ParseInteger(theArgVec[anArgIter + 1], aDracoParameters.QuantizeGenericBits)) - { - ++anArgIter; - } - else if (anArgCase == "-unifiedquantization") - { - aDracoParameters.UnifiedQuantization = Draw::ParseOnOffIterator(theNbArgs, theArgVec, anArgIter); - } - else if (anArgCase == "-parallel") - { - isParallel = Draw::ParseOnOffIterator(theNbArgs, theArgVec, anArgIter); - } - else - { - Message::SendFail() << "Syntax error at '" << theArgVec[anArgIter] << "'"; - return 1; - } - } - if (aGltfFilePath.IsEmpty()) - { - Message::SendFail() << "Syntax error: wrong number of arguments"; - return 1; - } - - Handle(Draw_ProgressIndicator) aProgress = new Draw_ProgressIndicator (theDI, 1); - - TCollection_AsciiString anExt = aGltfFilePath; - anExt.LowerCase(); - Standard_Real aScaleFactorM = 1.; - if (!XCAFDoc_DocumentTool::GetLengthUnit(aDoc, aScaleFactorM, UnitsMethods_LengthUnit_Meter)) - { - XSAlgo::AlgoContainer()->PrepareForTransfer(); // update unit info - aScaleFactorM = UnitsMethods::GetCasCadeLengthUnit(UnitsMethods_LengthUnit_Meter); - } - - RWGltf_CafWriter aWriter (aGltfFilePath, anExt.EndsWith (".glb")); - aWriter.SetTransformationFormat (aTrsfFormat); - aWriter.SetNodeNameFormat (aNodeNameFormat); - aWriter.SetMeshNameFormat (aMeshNameFormat); - aWriter.SetForcedUVExport (toForceUVExport); - aWriter.SetToEmbedTexturesInGlb (toEmbedTexturesInGlb); - aWriter.SetMergeFaces (toMergeFaces); - aWriter.SetSplitIndices16 (toSplitIndices16); - aWriter.SetParallel(isParallel); - aWriter.SetCompressionParameters(aDracoParameters); - aWriter.ChangeCoordinateSystemConverter().SetInputLengthUnit (aScaleFactorM); - aWriter.ChangeCoordinateSystemConverter().SetInputCoordinateSystem (aSystemCoordSys); - aWriter.Perform (aDoc, aFileInfo, aProgress->Start()); - return 0; -} - -static Standard_Integer writestl -(Draw_Interpretor& di, Standard_Integer argc, const char** argv) -{ - if (argc < 3 || argc > 4) { - di << "Use: " << argv[0] - << " shape file [ascii/binary (0/1) : 1 by default]\n"; - } else { - TopoDS_Shape aShape = DBRep::Get(argv[1]); - Standard_Boolean isASCIIMode = Standard_False; - if (argc == 4) { - isASCIIMode = (Draw::Atoi(argv[3]) == 0); - } - StlAPI_Writer aWriter; - aWriter.ASCIIMode() = isASCIIMode; - Handle(Draw_ProgressIndicator) aProgress = new Draw_ProgressIndicator (di); - Standard_Boolean isOK = aWriter.Write (aShape, argv[2], aProgress->Start()); - if (!isOK) - di << "** Error **: Mesh writing has been failed.\n"; - } - return 0; -} - -//============================================================================= -//function : readstl -//purpose : Reads stl file -//============================================================================= -static Standard_Integer readstl(Draw_Interpretor& theDI, - Standard_Integer theArgc, - const char** theArgv) -{ - TCollection_AsciiString aShapeName, aFilePath; - bool toCreateCompOfTris = false; - bool anIsMulti = false; - double aMergeAngle = M_PI / 2.0; - for (Standard_Integer anArgIter = 1; anArgIter < theArgc; ++anArgIter) - { - TCollection_AsciiString anArg (theArgv[anArgIter]); - anArg.LowerCase(); - if (aShapeName.IsEmpty()) - { - aShapeName = theArgv[anArgIter]; - } - else if (aFilePath.IsEmpty()) - { - aFilePath = theArgv[anArgIter]; - } - else if (anArg == "-brep") - { - toCreateCompOfTris = true; - if (anArgIter + 1 < theArgc - && Draw::ParseOnOff (theArgv[anArgIter + 1], toCreateCompOfTris)) - { - ++anArgIter; - } - } - else if (anArg == "-multi") - { - anIsMulti = true; - if (anArgIter + 1 < theArgc - && Draw::ParseOnOff (theArgv[anArgIter + 1], anIsMulti)) - { - ++anArgIter; - } - } - else if (anArg == "-mergeangle" - || anArg == "-smoothangle" - || anArg == "-nomergeangle" - || anArg == "-nosmoothangle") - { - if (anArg.StartsWith ("-no")) - { - aMergeAngle = M_PI / 2.0; - } - else - { - aMergeAngle = M_PI / 4.0; - if (anArgIter + 1 < theArgc - && Draw::ParseReal (theArgv[anArgIter + 1], aMergeAngle)) - { - if (aMergeAngle < 0.0 || aMergeAngle > 90.0) - { - theDI << "Syntax error: angle should be within [0,90] range"; - return 1; - } - - ++anArgIter; - aMergeAngle = aMergeAngle * M_PI / 180.0; - } - } - } - else - { - Message::SendFail() << "Syntax error: unknown argument '" << theArgv[anArgIter] << "'"; - return 1; - } - } - if (aFilePath.IsEmpty()) - { - Message::SendFail() << "Syntax error: not enough arguments"; - return 1; - } - - TopoDS_Shape aShape; - if (!toCreateCompOfTris) - { - Handle(Draw_ProgressIndicator) aProgress = new Draw_ProgressIndicator (theDI,1); - if(anIsMulti) - { - NCollection_Sequence aTriangList; - // Read STL file to the triangulation list. - RWStl::ReadFile(aFilePath.ToCString(),aMergeAngle,aTriangList,aProgress->Start()); - BRep_Builder aB; - TopoDS_Face aFace; - if (aTriangList.Size() == 1) - { - aB.MakeFace (aFace); - aB.UpdateFace (aFace,aTriangList.First()); - aShape = aFace; - } - else - { - TopoDS_Compound aCmp; - aB.MakeCompound (aCmp); - - NCollection_Sequence::Iterator anIt (aTriangList); - for (; anIt.More(); anIt.Next()) - { - aB.MakeFace (aFace); - aB.UpdateFace (aFace,anIt.Value()); - aB.Add (aCmp,aFace); - } - aShape = aCmp; - } - } - else - { - // Read STL file to the triangulation. - Handle(Poly_Triangulation) aTriangulation = RWStl::ReadFile (aFilePath.ToCString(),aMergeAngle,aProgress->Start()); - - TopoDS_Face aFace; - BRep_Builder aB; - aB.MakeFace (aFace); - aB.UpdateFace (aFace,aTriangulation); - aShape = aFace; - } - } - else - { - Standard_DISABLE_DEPRECATION_WARNINGS - StlAPI::Read(aShape, aFilePath.ToCString()); - Standard_ENABLE_DEPRECATION_WARNINGS - } - DBRep::Set (aShapeName.ToCString(), aShape); - return 0; -} - -//============================================================================= -//function : ReadObj -//purpose : Reads OBJ file -//============================================================================= -static Standard_Integer ReadObj (Draw_Interpretor& theDI, - Standard_Integer theNbArgs, - const char** theArgVec) -{ - TCollection_AsciiString aDestName, aFilePath; - Standard_Boolean toUseExistingDoc = Standard_False; - Standard_Real aFileUnitFactor = -1.0; - RWMesh_CoordinateSystem aResultCoordSys = RWMesh_CoordinateSystem_Zup, aFileCoordSys = RWMesh_CoordinateSystem_Yup; - Standard_Boolean toListExternalFiles = Standard_False, isSingleFace = Standard_False, isSinglePrecision = Standard_False; - Standard_Boolean isNoDoc = (TCollection_AsciiString(theArgVec[0]) == "readobj"); - for (Standard_Integer anArgIter = 1; anArgIter < theNbArgs; ++anArgIter) - { - TCollection_AsciiString anArgCase (theArgVec[anArgIter]); - anArgCase.LowerCase(); - if (anArgIter + 1 < theNbArgs - && (anArgCase == "-unit" - || anArgCase == "-units" - || anArgCase == "-fileunit" - || anArgCase == "-fileunits")) - { - const TCollection_AsciiString aUnitStr (theArgVec[++anArgIter]); - aFileUnitFactor = UnitsAPI::AnyToSI (1.0, aUnitStr.ToCString()); - if (aFileUnitFactor <= 0.0) - { - Message::SendFail() << "Syntax error: wrong length unit '" << aUnitStr << "'"; - return 1; - } - } - else if (anArgIter + 1 < theNbArgs - && (anArgCase == "-filecoordinatesystem" - || anArgCase == "-filecoordsystem" - || anArgCase == "-filecoordsys")) - { - if (!parseCoordinateSystem (theArgVec[++anArgIter], aFileCoordSys)) - { - Message::SendFail() << "Syntax error: unknown coordinate system '" << theArgVec[anArgIter] << "'"; - return 1; - } - } - else if (anArgIter + 1 < theNbArgs - && (anArgCase == "-resultcoordinatesystem" - || anArgCase == "-resultcoordsystem" - || anArgCase == "-resultcoordsys" - || anArgCase == "-rescoordsys")) - { - if (!parseCoordinateSystem (theArgVec[++anArgIter], aResultCoordSys)) - { - Message::SendFail() << "Syntax error: unknown coordinate system '" << theArgVec[anArgIter] << "'"; - return 1; - } - } - else if (anArgCase == "-singleprecision" - || anArgCase == "-singleprec") - { - isSinglePrecision = Standard_True; - if (anArgIter + 1 < theNbArgs - && Draw::ParseOnOff (theArgVec[anArgIter + 1], isSinglePrecision)) - { - ++anArgIter; - } - } - else if (isNoDoc - && (anArgCase == "-singleface" - || anArgCase == "-singletriangulation")) - { - isSingleFace = Standard_True; - } - else if (!isNoDoc - && (anArgCase == "-nocreate" - || anArgCase == "-nocreatedoc")) - { - toUseExistingDoc = Standard_True; - if (anArgIter + 1 < theNbArgs - && Draw::ParseOnOff (theArgVec[anArgIter + 1], toUseExistingDoc)) - { - ++anArgIter; - } - } - else if (anArgCase == "-listexternalfiles" - || anArgCase == "-listexternals" - || anArgCase == "-listexternal" - || anArgCase == "-external" - || anArgCase == "-externalfiles") - { - toListExternalFiles = Standard_True; - } - else if (aDestName.IsEmpty()) - { - aDestName = theArgVec[anArgIter]; - } - else if (aFilePath.IsEmpty()) - { - aFilePath = theArgVec[anArgIter]; - } - else - { - Message::SendFail() << "Syntax error at '" << theArgVec[anArgIter] << "'"; - return 1; - } - } - if (aFilePath.IsEmpty()) - { - Message::SendFail() << "Syntax error: wrong number of arguments"; - return 1; - } - - Handle(Draw_ProgressIndicator) aProgress = new Draw_ProgressIndicator (theDI, 1); - Handle(TDocStd_Document) aDoc; - if (!isNoDoc - && !toListExternalFiles) - { - Handle(TDocStd_Application) anApp = DDocStd::GetApplication(); - Standard_CString aNameVar = aDestName.ToCString(); - DDocStd::GetDocument (aNameVar, aDoc, Standard_False); - if (aDoc.IsNull()) - { - if (toUseExistingDoc) - { - Message::SendFail() << "Error: document with name " << aDestName << " does not exist"; - return 1; - } - anApp->NewDocument (TCollection_ExtendedString ("BinXCAF"), aDoc); - } - else if (!toUseExistingDoc) - { - Message::SendFail() << "Error: document with name " << aDestName << " already exists"; - return 1; - } - } - Standard_Real aScaleFactorM = 1.; - if (!XCAFDoc_DocumentTool::GetLengthUnit(aDoc, aScaleFactorM, UnitsMethods_LengthUnit_Meter)) - { - XSAlgo::AlgoContainer()->PrepareForTransfer(); // update unit info - aScaleFactorM = UnitsMethods::GetCasCadeLengthUnit(UnitsMethods_LengthUnit_Meter); - } - - RWObj_CafReader aReader; - aReader.SetSinglePrecision (isSinglePrecision); - aReader.SetSystemLengthUnit (aScaleFactorM); - aReader.SetSystemCoordinateSystem (aResultCoordSys); - aReader.SetFileLengthUnit (aFileUnitFactor); - aReader.SetFileCoordinateSystem (aFileCoordSys); - aReader.SetDocument (aDoc); - if (isSingleFace) - { - RWObj_TriangulationReader aSimpleReader; - aSimpleReader.SetSinglePrecision (isSinglePrecision); - aSimpleReader.SetCreateShapes (Standard_False); - aSimpleReader.SetTransformation (aReader.CoordinateSystemConverter()); - aSimpleReader.Read (aFilePath.ToCString(), aProgress->Start()); - - Handle(Poly_Triangulation) aTriangulation = aSimpleReader.GetTriangulation(); - TopoDS_Face aFace; - BRep_Builder aBuiler; - aBuiler.MakeFace (aFace); - aBuiler.UpdateFace (aFace, aTriangulation); - DBRep::Set (aDestName.ToCString(), aFace); - return 0; - } - - if (toListExternalFiles) - { - aReader.ProbeHeader (aFilePath); - for (NCollection_IndexedMap::Iterator aFileIter (aReader.ExternalFiles()); aFileIter.More(); aFileIter.Next()) - { - theDI << "\"" << aFileIter.Value() << "\" "; - } - } - else - { - aReader.Perform (aFilePath, aProgress->Start()); - if (isNoDoc) - { - DBRep::Set (aDestName.ToCString(), aReader.SingleShape()); - } - else - { - Handle(DDocStd_DrawDocument) aDrawDoc = new DDocStd_DrawDocument (aDoc); - TDataStd_Name::Set (aDoc->GetData()->Root(), aDestName); - Draw::Set (aDestName.ToCString(), aDrawDoc); - } - } - return 0; -} - -//============================================================================= -//function : WriteObj -//purpose : Writes OBJ file -//============================================================================= -static Standard_Integer WriteObj (Draw_Interpretor& theDI, - Standard_Integer theNbArgs, - const char** theArgVec) -{ - TCollection_AsciiString anObjFilePath; - Handle(TDocStd_Document) aDoc; - Handle(TDocStd_Application) anApp = DDocStd::GetApplication(); - TColStd_IndexedDataMapOfStringString aFileInfo; - Standard_Real aFileUnitFactor = -1.0; - RWMesh_CoordinateSystem aSystemCoordSys = RWMesh_CoordinateSystem_Zup, aFileCoordSys = RWMesh_CoordinateSystem_Yup; - for (Standard_Integer anArgIter = 1; anArgIter < theNbArgs; ++anArgIter) - { - TCollection_AsciiString anArgCase (theArgVec[anArgIter]); - anArgCase.LowerCase(); - if (anArgIter + 1 < theNbArgs - && (anArgCase == "-unit" - || anArgCase == "-units" - || anArgCase == "-fileunit" - || anArgCase == "-fileunits")) - { - const TCollection_AsciiString aUnitStr (theArgVec[++anArgIter]); - aFileUnitFactor = UnitsAPI::AnyToSI (1.0, aUnitStr.ToCString()); - if (aFileUnitFactor <= 0.0) - { - Message::SendFail() << "Syntax error: wrong length unit '" << aUnitStr << "'"; - return 1; - } - } - else if (anArgIter + 1 < theNbArgs - && (anArgCase == "-filecoordinatesystem" - || anArgCase == "-filecoordsystem" - || anArgCase == "-filecoordsys")) - { - if (!parseCoordinateSystem (theArgVec[++anArgIter], aFileCoordSys)) - { - Message::SendFail() << "Syntax error: unknown coordinate system '" << theArgVec[anArgIter] << "'"; - return 1; - } - } - else if (anArgIter + 1 < theNbArgs - && (anArgCase == "-systemcoordinatesystem" - || anArgCase == "-systemcoordsystem" - || anArgCase == "-systemcoordsys" - || anArgCase == "-syscoordsys")) - { - if (!parseCoordinateSystem (theArgVec[++anArgIter], aSystemCoordSys)) - { - Message::SendFail() << "Syntax error: unknown coordinate system '" << theArgVec[anArgIter] << "'"; - return 1; - } - } - else if (anArgCase == "-comments" - && anArgIter + 1 < theNbArgs) - { - aFileInfo.Add ("Comments", theArgVec[++anArgIter]); - } - else if (anArgCase == "-author" - && anArgIter + 1 < theNbArgs) - { - aFileInfo.Add ("Author", theArgVec[++anArgIter]); - } - else if (aDoc.IsNull()) - { - Standard_CString aNameVar = theArgVec[anArgIter]; - DDocStd::GetDocument (aNameVar, aDoc, false); - if (aDoc.IsNull()) - { - TopoDS_Shape aShape = DBRep::Get (aNameVar); - if (aShape.IsNull()) - { - Message::SendFail() << "Syntax error: '" << aNameVar << "' is not a shape nor document"; - return 1; - } - - anApp->NewDocument (TCollection_ExtendedString ("BinXCAF"), aDoc); - Handle(XCAFDoc_ShapeTool) aShapeTool = XCAFDoc_DocumentTool::ShapeTool (aDoc->Main()); - aShapeTool->AddShape (aShape); - } - } - else if (anObjFilePath.IsEmpty()) - { - anObjFilePath = theArgVec[anArgIter]; - } - else - { - Message::SendFail() << "Syntax error at '" << theArgVec[anArgIter] << "'"; - return 1; - } - } - if (anObjFilePath.IsEmpty()) - { - Message::SendFail() << "Syntax error: wrong number of arguments"; - return 1; - } - - Handle(Draw_ProgressIndicator) aProgress = new Draw_ProgressIndicator (theDI, 1); - - const Standard_Real aSystemUnitFactor = UnitsMethods::GetCasCadeLengthUnit() * 0.001; - RWObj_CafWriter aWriter (anObjFilePath); - aWriter.ChangeCoordinateSystemConverter().SetInputLengthUnit (aSystemUnitFactor); - aWriter.ChangeCoordinateSystemConverter().SetInputCoordinateSystem (aSystemCoordSys); - aWriter.ChangeCoordinateSystemConverter().SetOutputLengthUnit (aFileUnitFactor); - aWriter.ChangeCoordinateSystemConverter().SetOutputCoordinateSystem (aFileCoordSys); - aWriter.Perform (aDoc, aFileInfo, aProgress->Start()); - return 0; -} - -static Standard_Integer writevrml -(Draw_Interpretor& di, Standard_Integer argc, const char** argv) -{ - if (argc < 3 || argc > 5) - { - di << "wrong number of parameters\n"; - return 0; - } - - TopoDS_Shape aShape = DBRep::Get(argv[1]); - - // Get the optional parameters - Standard_Integer aVersion = 2; - Standard_Integer aType = 1; - if (argc >= 4) - { - aVersion = Draw::Atoi(argv[3]); - if (argc == 5) - aType = Draw::Atoi(argv[4]); - } - - // Bound parameters - aVersion = Max(1, aVersion); - aVersion = Min(2, aVersion); - aType = Max(0, aType); - aType = Min(2, aType); - - VrmlAPI_Writer writer; - - switch (aType) - { - case 0: writer.SetRepresentation(VrmlAPI_ShadedRepresentation); break; - case 1: writer.SetRepresentation(VrmlAPI_WireFrameRepresentation); break; - case 2: writer.SetRepresentation(VrmlAPI_BothRepresentation); break; - } - - if (!writer.Write(aShape, argv[2], aVersion)) - { - di << "Error: File " << argv[2] << " was not written\n"; - } - - return 0; -} - -//======================================================================= -//function : loadvrml -//purpose : -//======================================================================= - -static Standard_Integer loadvrml -(Draw_Interpretor& di, Standard_Integer argc, const char** argv) -{ - if (argc<3) di << "wrong number of parameters" << "\n"; - else { - TopoDS_Shape aShape ; - VrmlData_DataMapOfShapeAppearance aShapeAppMap; - - //----------------------------------------------------------- - std::filebuf aFic; - std::istream aStream (&aFic); - - if (aFic.open(argv[2], std::ios::in)) { - - // Get path of the VRML file. - OSD_Path aPath(argv[2]); - TCollection_AsciiString aVrmlDir("."); - TCollection_AsciiString aDisk = aPath.Disk(); - TCollection_AsciiString aTrek = aPath.Trek(); - if (!aTrek.IsEmpty()) - { - if (!aDisk.IsEmpty()) - aVrmlDir = aDisk; - else - aVrmlDir.Clear(); - aTrek.ChangeAll('|', '/'); - aVrmlDir += aTrek; - } - - VrmlData_Scene aScene; - XSAlgo::AlgoContainer()->PrepareForTransfer(); // update unit info - Standard_Real anOCCUnitMM = UnitsMethods::GetCasCadeLengthUnit(); - aScene.SetLinearScale(1000. / anOCCUnitMM); - - aScene.SetVrmlDir (aVrmlDir); - aScene << aStream; - const char * aStr = 0L; - switch (aScene.Status()) { - - case VrmlData_StatusOK: - { - aShape = aScene.GetShape(aShapeAppMap); - break; - } - case VrmlData_EmptyData: aStr = "EmptyData"; break; - case VrmlData_UnrecoverableError: aStr = "UnrecoverableError"; break; - case VrmlData_GeneralError: aStr = "GeneralError"; break; - case VrmlData_EndOfFile: aStr = "EndOfFile"; break; - case VrmlData_NotVrmlFile: aStr = "NotVrmlFile"; break; - case VrmlData_CannotOpenFile: aStr = "CannotOpenFile"; break; - case VrmlData_VrmlFormatError: aStr = "VrmlFormatError"; break; - case VrmlData_NumericInputError: aStr = "NumericInputError"; break; - case VrmlData_IrrelevantNumber: aStr = "IrrelevantNumber"; break; - case VrmlData_BooleanInputError: aStr = "BooleanInputError"; break; - case VrmlData_StringInputError: aStr = "StringInputError"; break; - case VrmlData_NodeNameUnknown: aStr = "NodeNameUnknown"; break; - case VrmlData_NonPositiveSize: aStr = "NonPositiveSize"; break; - case VrmlData_ReadUnknownNode: aStr = "ReadUnknownNode"; break; - case VrmlData_NonSupportedFeature: aStr = "NonSupportedFeature"; break; - case VrmlData_OutputStreamUndefined:aStr = "OutputStreamUndefined"; break; - case VrmlData_NotImplemented: aStr = "NotImplemented"; break; - default: - break; - } - if (aStr) { - di << " ++ VRML Error: " << aStr << " in line " - << aScene.GetLineError() << "\n"; - } - else { - DBRep::Set(argv[1],aShape); - } - } - else { - di << "cannot open file\n"; - } - - - //----------------------------------------------------------- - } - return 0; -} - -//----------------------------------------------------------------------------- -static Standard_Integer createmesh -(Draw_Interpretor& di, Standard_Integer argc, const char** argv ) -{ - if (argc<3) - { - di << "Wrong number of parameters\n"; - di << "Use: " << argv[0] << " \n"; - return 0; - } - - Handle(AIS_InteractiveContext) aContext = ViewerTest::GetAISContext(); - if (aContext.IsNull()) - { - di << "No active view. Please call 'vinit' first\n"; - return 0; - } - - // Progress indicator - OSD_Path aFile( argv[2] ); - Handle(Draw_ProgressIndicator) aProgress = new Draw_ProgressIndicator (di, 1); - Handle(Poly_Triangulation) aSTLMesh = RWStl::ReadFile (aFile, aProgress->Start()); - - di << "Reading OK...\n"; - Handle( XSDRAWSTLVRML_DataSource ) aDS = new XSDRAWSTLVRML_DataSource( aSTLMesh ); - di << "Data source is created successful\n"; - Handle( MeshVS_Mesh ) aMesh = new MeshVS_Mesh(); - di << "MeshVS_Mesh is created successful\n"; - - aMesh->SetDataSource( aDS ); - aMesh->AddBuilder( new MeshVS_MeshPrsBuilder( aMesh.operator->() ), Standard_True ); - - aMesh->GetDrawer()->SetColor( MeshVS_DA_EdgeColor, Quantity_NOC_YELLOW ); - - // Hide all nodes by default - Handle(TColStd_HPackedMapOfInteger) aNodes = new TColStd_HPackedMapOfInteger(); - const Standard_Integer aLen = aSTLMesh->NbNodes(); - for ( Standard_Integer anIndex = 1; anIndex <= aLen; anIndex++ ) - aNodes->ChangeMap().Add( anIndex ); - aMesh->SetHiddenNodes( aNodes ); - aMesh->SetSelectableNodes ( aNodes ); - - VDisplayAISObject(argv[1], aMesh); - aContext->Deactivate( aMesh ); - - Draw::Set( argv[1], new XSDRAWSTLVRML_DrawableMesh( aMesh ) ); - Handle( V3d_View ) aView = ViewerTest::CurrentView(); - if ( !aView.IsNull() ) - aView->FitAll(); - - return 0; -} -//----------------------------------------------------------------------------- - -static Standard_Integer create3d -(Draw_Interpretor& di, Standard_Integer argc, const char** argv ) -{ - if (argc<2) - { - di << "Wrong number of parameters\n"; - di << "Use: " << argv[0] << " \n"; - return 0; - } - - Handle(AIS_InteractiveContext) aContext = ViewerTest::GetAISContext(); - if (aContext.IsNull()) - { - di << "No active view. Please call 'vinit' first\n"; - return 0; - } - - Handle( XSDRAWSTLVRML_DataSource3D ) aDS = new XSDRAWSTLVRML_DataSource3D(); - di << "Data source is created successful\n"; - Handle( MeshVS_Mesh ) aMesh = new MeshVS_Mesh(); - di << "MeshVS_Mesh is created successful\n"; - - aMesh->SetDataSource( aDS ); - aMesh->AddBuilder( new MeshVS_MeshPrsBuilder( aMesh.operator->() ), Standard_True ); - - aMesh->GetDrawer()->SetColor( MeshVS_DA_EdgeColor, Quantity_NOC_YELLOW ); - - // Hide all nodes by default - Handle(TColStd_HPackedMapOfInteger) aNodes = new TColStd_HPackedMapOfInteger(); - Standard_Integer aLen = aDS->GetAllNodes().Extent(); - for ( Standard_Integer anIndex = 1; anIndex <= aLen; anIndex++ ) - aNodes->ChangeMap().Add( anIndex ); - aMesh->SetHiddenNodes( aNodes ); - aMesh->SetSelectableNodes ( aNodes ); - - VDisplayAISObject(argv[1], aMesh); - aContext->Deactivate( aMesh ); - - Draw::Set( argv[1], new XSDRAWSTLVRML_DrawableMesh( aMesh ) ); - Handle( V3d_View ) aView = ViewerTest::CurrentView(); - if ( !aView.IsNull() ) - aView->FitAll(); - - return 0; -} - -Handle( MeshVS_Mesh ) getMesh( const char* theName, Draw_Interpretor& di) -{ - Handle( XSDRAWSTLVRML_DrawableMesh ) aDrawMesh = - Handle( XSDRAWSTLVRML_DrawableMesh )::DownCast( Draw::Get( theName ) ); - - if( aDrawMesh.IsNull() ) - { - di << "There is no such object\n"; - return NULL; - } - else - { - Handle( MeshVS_Mesh ) aMesh = aDrawMesh->GetMesh(); - if( aMesh.IsNull() ) - { - di << "There is invalid mesh\n"; - return NULL; - } - else - return aMesh; - } -} - -//----------------------------------------------------------------------------- -static Standard_Integer setcolor -(Draw_Interpretor& di, Standard_Integer argc, const char** argv, Standard_Integer theParam ) -{ - if (argc<5) - di << "Wrong number of parameters\n"; - else - { - Handle( MeshVS_Mesh ) aMesh = getMesh( argv[1], di ); - if( !aMesh.IsNull() ) - { - Standard_Real aRed = Draw::Atof (argv[2]); - Standard_Real aGreen = Draw::Atof (argv[3]); - Standard_Real aBlue = Draw::Atof (argv[4]); - aMesh->GetDrawer()->SetColor( (MeshVS_DrawerAttribute)theParam, - Quantity_Color( aRed, aGreen, aBlue, Quantity_TOC_RGB ) ); - - Handle( AIS_InteractiveContext ) aContext = ViewerTest::GetAISContext(); - - if( aContext.IsNull() ) - di << "The context is null\n"; - else - aContext->Redisplay (aMesh, Standard_True); - } - } - return 0; -} -//----------------------------------------------------------------------------- -static Standard_Integer meshcolor -(Draw_Interpretor& theInterp, Standard_Integer argc, const char** argv ) -{ - return setcolor( theInterp, argc, argv, MeshVS_DA_InteriorColor ); -} -//----------------------------------------------------------------------------- -static Standard_Integer linecolor -(Draw_Interpretor& theInterp, Standard_Integer argc, const char** argv ) -{ - return setcolor( theInterp, argc, argv, MeshVS_DA_EdgeColor ); -} -//----------------------------------------------------------------------------- -static Standard_Integer meshmat -(Draw_Interpretor& di, Standard_Integer argc, const char** argv ) -{ - if (argc<3) - di << "Wrong number of parameters\n"; - else - { - Handle( MeshVS_Mesh ) aMesh = getMesh( argv[1], di ); - if( !aMesh.IsNull() ) - { - Standard_Integer aMaterial = Draw::Atoi (argv[2]); - - Graphic3d_MaterialAspect aMatAsp = - (Graphic3d_MaterialAspect)(Graphic3d_NameOfMaterial)aMaterial; - - if (argc == 4) - { - Standard_Real aTransparency = Draw::Atof(argv[3]); - aMatAsp.SetTransparency (Standard_ShortReal (aTransparency)); - } - aMesh->GetDrawer()->SetMaterial( MeshVS_DA_FrontMaterial, aMatAsp ); - aMesh->GetDrawer()->SetMaterial( MeshVS_DA_BackMaterial, aMatAsp ); - - Handle( AIS_InteractiveContext ) aContext = ViewerTest::GetAISContext(); - - if( aContext.IsNull() ) - di << "The context is null\n"; - else - aContext->Redisplay (aMesh, Standard_True); - } - } - return 0; -} -//----------------------------------------------------------------------------- -static Standard_Integer shrink -(Draw_Interpretor& di, Standard_Integer argc, const char** argv ) -{ - if (argc<3) - di << "Wrong number of parameters\n"; - else - { - Handle( MeshVS_Mesh ) aMesh = getMesh( argv[1], di ); - if( !aMesh.IsNull() ) - { - Standard_Real aShrinkCoeff = Draw::Atof (argv[2]); - aMesh->GetDrawer()->SetDouble( MeshVS_DA_ShrinkCoeff, aShrinkCoeff ); - - Handle( AIS_InteractiveContext ) aContext = ViewerTest::GetAISContext(); - - if( aContext.IsNull() ) - di << "The context is null\n"; - else - aContext->Redisplay (aMesh, Standard_True); - } - } - return 0; -} - -//----------------------------------------------------------------------------- -static Standard_Integer closed (Draw_Interpretor& theDI, Standard_Integer theArgc, const char** theArgv) -{ - if (theArgc < 3) - { - theDI << "Wrong number of parameters.\n"; - } - else - { - Handle(MeshVS_Mesh) aMesh = getMesh (theArgv[1], theDI); - if (!aMesh.IsNull()) - { - Standard_Boolean aFlag = Draw::Atoi (theArgv[2]) != 0; - aMesh->GetDrawer()->SetBoolean (MeshVS_DA_SupressBackFaces, aFlag); - - Handle( AIS_InteractiveContext ) aContext = ViewerTest::GetAISContext(); - if (aContext.IsNull()) - { - theDI << "The context is null\n"; - } - else - { - aContext->Redisplay (aMesh, Standard_True); - } - } - } - return 0; -} - -//----------------------------------------------------------------------------- - -static Standard_Integer mdisplay -(Draw_Interpretor& di, Standard_Integer argc, const char** argv ) -{ - if (argc<2) - di << "Wrong number of parameters\n"; - else - { - Handle( MeshVS_Mesh ) aMesh = getMesh( argv[1], di ); - if( !aMesh.IsNull() ) - { - Handle( AIS_InteractiveContext ) aContext = ViewerTest::GetAISContext(); - - if( aContext.IsNull() ) - di << "The context is null\n"; - else - { - aContext->Display (aMesh, Standard_True); - } - } - } - return 0; -} -//----------------------------------------------------------------------------- -static Standard_Integer merase -(Draw_Interpretor& di, Standard_Integer argc, const char** argv ) -{ - if (argc<2) - di << "Wrong number of parameters\n"; - else - { - Handle( MeshVS_Mesh ) aMesh = getMesh( argv[1], di ); - if( !aMesh.IsNull() ) - { - Handle( AIS_InteractiveContext ) aContext = ViewerTest::GetAISContext(); - - if( aContext.IsNull() ) - di << "The context is null\n"; - else - { - aContext->Erase (aMesh, Standard_True); - } - } - else - di << "Mesh is null\n"; - } - return 0; -} -//----------------------------------------------------------------------------- -static Standard_Integer hidesel -(Draw_Interpretor& di, Standard_Integer argc, const char** argv ) -{ - if (argc<2) - { - di << "Wrong number of parameters\n"; - di << "Use: " << argv[0] << " \n"; - return 0; - } - - Handle( AIS_InteractiveContext ) aContext = ViewerTest::GetAISContext(); - Handle( MeshVS_Mesh ) aMesh = getMesh( argv[1], di ); - if( aMesh.IsNull() ) - { - di << "The mesh is invalid\n"; - return 0; - } - - if( aContext.IsNull() ) - di << "The context is null\n"; - else - { - Handle(TColStd_HPackedMapOfInteger) aHiddenNodes = aMesh->GetHiddenNodes(); - if (aHiddenNodes.IsNull()) - { - aHiddenNodes = new TColStd_HPackedMapOfInteger(); - } - Handle(TColStd_HPackedMapOfInteger) aHiddenElements = aMesh->GetHiddenElems(); - if (aHiddenElements.IsNull()) - { - aHiddenElements = new TColStd_HPackedMapOfInteger(); - } - for( aContext->InitSelected(); aContext->MoreSelected(); aContext->NextSelected() ) - { - Handle( MeshVS_MeshEntityOwner ) anOwner = - Handle( MeshVS_MeshEntityOwner )::DownCast( aContext->SelectedOwner() ); - if( !anOwner.IsNull() ) - { - if( anOwner->Type()==MeshVS_ET_Node ) - { - aHiddenNodes->ChangeMap().Add( anOwner->ID() ); - } - else - { - aHiddenElements->ChangeMap().Add( anOwner->ID() ); - } - } - } - aContext->ClearSelected (Standard_False); - aMesh->SetHiddenNodes( aHiddenNodes ); - aMesh->SetHiddenElems( aHiddenElements ); - aContext->Redisplay (aMesh, Standard_True); - } - - return 0; -} -//----------------------------------------------------------------------------- -static Standard_Integer showonly -(Draw_Interpretor& di, Standard_Integer argc, const char** argv ) -{ - if (argc<2) - { - di << "Wrong number of parameters\n"; - di << "Use: " << argv[0] << " \n"; - return 0; - } - - - Handle( AIS_InteractiveContext ) aContext = ViewerTest::GetAISContext(); - Handle( MeshVS_Mesh ) aMesh = getMesh( argv[1], di ); - if( aMesh.IsNull() ) - { - di << "The mesh is invalid\n"; - return 0; - } - - if( aContext.IsNull() ) - di << "The context is null\n"; - else - { - Handle(TColStd_HPackedMapOfInteger) aHiddenNodes = - new TColStd_HPackedMapOfInteger(aMesh->GetDataSource()->GetAllNodes()); - Handle(TColStd_HPackedMapOfInteger) aHiddenElements = - new TColStd_HPackedMapOfInteger(aMesh->GetDataSource()->GetAllElements()); - for( aContext->InitSelected(); aContext->MoreSelected(); aContext->NextSelected() ) - { - Handle( MeshVS_MeshEntityOwner ) anOwner = - Handle( MeshVS_MeshEntityOwner )::DownCast( aContext->SelectedOwner() ); - if( !anOwner.IsNull() ) - { - if( anOwner->Type() == MeshVS_ET_Node ) - { - aHiddenNodes->ChangeMap().Remove( anOwner->ID() ); - } - else - { - aHiddenElements->ChangeMap().Remove( anOwner->ID() ); - } - } - } - aMesh->SetHiddenNodes( aHiddenNodes ); - aMesh->SetHiddenElems( aHiddenElements ); - aContext->Redisplay (aMesh, Standard_True); - } - - return 0; -} -//----------------------------------------------------------------------------- -static Standard_Integer showall -(Draw_Interpretor& di, Standard_Integer argc, const char** argv ) -{ - if (argc<2) - { - di << "Wrong number of parameters\n"; - di << "Use: " << argv[0] << " \n"; - return 0; - } - - Handle( AIS_InteractiveContext ) aContext = ViewerTest::GetAISContext(); - Handle( MeshVS_Mesh ) aMesh = getMesh( argv[1], di ); - if( aMesh.IsNull() ) - { - di << "The mesh is invalid\n"; - return 0; - } - - if( aContext.IsNull() ) - di << "The context is null\n"; - else - { - aMesh->SetHiddenNodes( new TColStd_HPackedMapOfInteger() ); - aMesh->SetHiddenElems( new TColStd_HPackedMapOfInteger() ); - aContext->Redisplay (aMesh, Standard_True); - } - - return 0; -} - -//----------------------------------------------------------------------------- -static Standard_Integer meshcolors( Draw_Interpretor& di, - Standard_Integer argc, - const char** argv ) -{ - try - { - OCC_CATCH_SIGNALS - if ( argc < 4 ) - { - di << "Wrong number of parameters\n"; - di << "Use : meshcolors \n"; - di << "mode : {elem1|elem2|nodal|nodaltex|none}\n"; - di << " elem1 - different color for each element\n"; - di << " elem2 - one color for one side\n"; - di << " nodal - different color for each node\n"; - di << " nodaltex - different color for each node with texture interpolation\n"; - di << " none - clear\n"; - di << "isreflect : {0|1} \n"; - - return 0; - } - - Handle( MeshVS_Mesh ) aMesh = getMesh( argv[ 1 ], di ); - - if ( aMesh.IsNull() ) - { - di << "Mesh not found\n"; - return 0; - } - Handle(AIS_InteractiveContext) anIC = ViewerTest::GetAISContext(); - if ( anIC.IsNull() ) - { - di << "The context is null\n"; - return 0; - } - if( !aMesh.IsNull() ) - { - TCollection_AsciiString aMode = TCollection_AsciiString (argv[2]); - Quantity_Color aColor1(Quantity_NOC_BLUE1); - Quantity_Color aColor2(Quantity_NOC_RED1); - if( aMode.IsEqual("elem1") || aMode.IsEqual("elem2") || aMode.IsEqual("nodal") || aMode.IsEqual("nodaltex") || aMode.IsEqual("none") ) - { - Handle(MeshVS_PrsBuilder) aTempBuilder; - Standard_Integer aReflection = Draw::Atoi(argv[3]); - - for (Standard_Integer aCount = 0 ; aCount < aMesh->GetBuildersCount(); aCount++ ){ - aTempBuilder = aMesh->FindBuilder("MeshVS_ElementalColorPrsBuilder"); - if( !aTempBuilder.IsNull()) - aMesh->RemoveBuilderById(aTempBuilder->GetId()); - - aTempBuilder = aMesh->FindBuilder("MeshVS_NodalColorPrsBuilder"); - if( !aTempBuilder.IsNull()) - aMesh->RemoveBuilderById(aTempBuilder->GetId()); - } - - if( aMode.IsEqual("elem1") || aMode.IsEqual("elem2") ) - { - Handle(MeshVS_ElementalColorPrsBuilder) aBuilder = new MeshVS_ElementalColorPrsBuilder( - aMesh, MeshVS_DMF_ElementalColorDataPrs | MeshVS_DMF_OCCMask ); - // Color - const TColStd_PackedMapOfInteger& anAllElements = aMesh->GetDataSource()->GetAllElements(); - TColStd_MapIteratorOfPackedMapOfInteger anIter( anAllElements ); - - if( aMode.IsEqual("elem1") ) - for ( ; anIter.More(); anIter.Next() ) - { - Quantity_Color aColor( (Quantity_NameOfColor)( anIter.Key() % Quantity_NOC_WHITE ) ); - aBuilder->SetColor1( anIter.Key(), aColor ); - } - else - for ( ; anIter.More(); anIter.Next() ) - aBuilder->SetColor2( anIter.Key(), aColor1, aColor2 ); - - aMesh->AddBuilder( aBuilder, Standard_True ); - } - - - if( aMode.IsEqual("nodal") ) - { - Handle(MeshVS_NodalColorPrsBuilder) aBuilder = new MeshVS_NodalColorPrsBuilder( - aMesh, MeshVS_DMF_NodalColorDataPrs | MeshVS_DMF_OCCMask ); - aMesh->AddBuilder( aBuilder, Standard_True ); - - // Color - const TColStd_PackedMapOfInteger& anAllNodes = - aMesh->GetDataSource()->GetAllNodes(); - TColStd_MapIteratorOfPackedMapOfInteger anIter( anAllNodes ); - for ( ; anIter.More(); anIter.Next() ) - { - Quantity_Color aColor( (Quantity_NameOfColor)( - anIter.Key() % Quantity_NOC_WHITE ) ); - aBuilder->SetColor( anIter.Key(), aColor ); - } - aMesh->AddBuilder( aBuilder, Standard_True ); - } - - if(aMode.IsEqual("nodaltex")) - { - // assign nodal builder to the mesh - Handle(MeshVS_NodalColorPrsBuilder) aBuilder = new MeshVS_NodalColorPrsBuilder( - aMesh, MeshVS_DMF_NodalColorDataPrs | MeshVS_DMF_OCCMask); - aMesh->AddBuilder(aBuilder, Standard_True); - aBuilder->UseTexture(Standard_True); - - // prepare color map for texture - Aspect_SequenceOfColor aColorMap; - aColorMap.Append((Quantity_NameOfColor) Quantity_NOC_RED); - aColorMap.Append((Quantity_NameOfColor) Quantity_NOC_YELLOW); - aColorMap.Append((Quantity_NameOfColor) Quantity_NOC_BLUE1); - - // prepare scale map for mesh - it will be assigned to mesh as texture coordinates - // make mesh color interpolated from minimum X coord to maximum X coord - Handle(MeshVS_DataSource) aDataSource = aMesh->GetDataSource(); - Standard_Real aMinX, aMinY, aMinZ, aMaxX, aMaxY, aMaxZ; - - // get bounding box for calculations - aDataSource->GetBoundingBox().Get(aMinX, aMinY, aMinZ, aMaxX, aMaxY, aMaxZ); - Standard_Real aDelta = aMaxX - aMinX; - - // assign color scale map values (0..1) to nodes - TColStd_DataMapOfIntegerReal aScaleMap; - TColStd_Array1OfReal aCoords(1, 3); - Standard_Integer aNbNodes; - MeshVS_EntityType aType; - - // iterate nodes - const TColStd_PackedMapOfInteger& anAllNodes = - aMesh->GetDataSource()->GetAllNodes(); - TColStd_MapIteratorOfPackedMapOfInteger anIter(anAllNodes); - for (; anIter.More(); anIter.Next()) - { - //get node coordinates to aCoord variable - aDataSource->GetGeom(anIter.Key(), Standard_False, aCoords, aNbNodes, aType); - - Standard_Real aScaleValue; - try { - OCC_CATCH_SIGNALS - aScaleValue = (aCoords.Value(1) - (Standard_Real) aMinX) / aDelta; - } catch(Standard_Failure const&) { - aScaleValue = 0; - } - - aScaleMap.Bind(anIter.Key(), aScaleValue); - } - - //set color map for builder and a color for invalid scale value - aBuilder->SetColorMap(aColorMap); - aBuilder->SetInvalidColor(Quantity_NOC_BLACK); - aBuilder->SetTextureCoords(aScaleMap); - aMesh->AddBuilder(aBuilder, Standard_True); - } - - aMesh->GetDrawer()->SetBoolean (MeshVS_DA_ColorReflection, aReflection != 0); - - anIC->Redisplay (aMesh, Standard_True); - } - else - { - di << "Wrong mode name\n"; - return 0; - } - } - } - catch ( Standard_Failure const& ) - { - di << "Error\n"; - } - - return 0; -} -//----------------------------------------------------------------------------- -static Standard_Integer meshvectors( Draw_Interpretor& di, - Standard_Integer argc, - const char** argv ) -{ - if ( argc < 3 ) - { - di << "Wrong number of parameters\n"; - di << "Use : meshvectors < -mode {elem|nodal|none} > [-maxlen len] [-color name] [-arrowpart ratio] [-issimple {1|0}]\n"; - di << "Supported mode values:\n"; - di << " elem - vector per element\n"; - di << " nodal - vector per node\n"; - di << " none - clear\n"; - - return 0; - } - - Handle( MeshVS_Mesh ) aMesh = getMesh( argv[ 1 ], di ); - - if ( aMesh.IsNull() ) - { - di << "Mesh not found\n"; - return 0; - } - Handle(AIS_InteractiveContext) anIC = ViewerTest::GetAISContext(); - if ( anIC.IsNull() ) - { - di << "The context is null\n"; - return 0; - } - - TCollection_AsciiString aParam; - TCollection_AsciiString aMode("none"); - Standard_Real aMaxlen(1.0); - Quantity_Color aColor(Quantity_NOC_ORANGE); - Standard_Real anArrowPart(0.1); - Standard_Boolean isSimplePrs(Standard_False); - - for (Standard_Integer anIdx = 2; anIdx < argc; anIdx++) - { - if (!aParam.IsEmpty()) - { - if (aParam == "-mode") - { - aMode = argv[anIdx]; - } - else if (aParam == "-maxlen") - { - aMaxlen = Draw::Atof(argv[anIdx]); - } - else if (aParam == "-color") - { - if (!Quantity_Color::ColorFromName (argv[anIdx], aColor)) - { - Message::SendFail() << "Syntax error at " << aParam; - return 1; - } - } - else if (aParam == "-arrowpart") - { - anArrowPart = Draw::Atof(argv[anIdx]); - } - else if (aParam == "-issimple") - { - isSimplePrs = Draw::Atoi(argv[anIdx]) != 0; - } - aParam.Clear(); - } - else if (argv[anIdx][0] == '-') - { - aParam = argv[anIdx]; - } - } - - if( !aMode.IsEqual("elem") && !aMode.IsEqual("nodal") && !aMode.IsEqual("none") ) - { - di << "Wrong mode name\n"; - return 0; - } - - Handle(MeshVS_PrsBuilder) aTempBuilder; - - aTempBuilder = aMesh->FindBuilder("MeshVS_VectorPrsBuilder"); - if( !aTempBuilder.IsNull()) - aMesh->RemoveBuilderById(aTempBuilder->GetId()); - - if( !aMode.IsEqual("none") ) - { - Handle(MeshVS_VectorPrsBuilder) aBuilder = new MeshVS_VectorPrsBuilder( aMesh.operator->(), - aMaxlen, - aColor, - MeshVS_DMF_VectorDataPrs, - 0, - -1, - MeshVS_BP_Vector, - isSimplePrs); - - Standard_Boolean anIsElement = aMode.IsEqual("elem"); - const TColStd_PackedMapOfInteger& anAllIDs = anIsElement ? aMesh->GetDataSource()->GetAllElements() : - aMesh->GetDataSource()->GetAllNodes(); - - Standard_Integer aNbNodes; - MeshVS_EntityType aEntType; - - TColStd_Array1OfReal aCoords(1, 3); - aCoords.Init (0.); - TColStd_MapIteratorOfPackedMapOfInteger anIter( anAllIDs ); - for ( ; anIter.More(); anIter.Next() ) - { - Standard_Boolean IsValidData = Standard_False; - if (anIsElement) { - aMesh->GetDataSource()->GetGeomType(anIter.Key(), anIsElement, aEntType); - if (aEntType == MeshVS_ET_Face) - IsValidData = aMesh->GetDataSource()->GetNormal(anIter.Key(), 3, aCoords.ChangeValue(1), aCoords.ChangeValue(2), aCoords.ChangeValue(3)); - } else - IsValidData = aMesh->GetDataSource()->GetGeom(anIter.Key(), Standard_False, aCoords, aNbNodes, aEntType); - - gp_Vec aNorm; - if(IsValidData) - { - aNorm = gp_Vec(aCoords.Value(1), aCoords.Value(2), aCoords.Value(3)); - if(aNorm.Magnitude() < gp::Resolution()) - { - aNorm = gp_Vec(0,0,1); //method GetGeom(...) returns coordinates of nodes - } - } - else - { - aNorm = gp_Vec(0,0,1); - } - aBuilder->SetVector(anIsElement, anIter.Key(), aNorm.Normalized()); - } - - aMesh->AddBuilder( aBuilder, Standard_False ); - aMesh->GetDrawer()->SetDouble ( MeshVS_DA_VectorArrowPart, anArrowPart ); - } - - anIC->Redisplay (aMesh, Standard_True); - - return 0; -} -//----------------------------------------------------------------------------- - -static Standard_Integer meshtext( Draw_Interpretor& di, - Standard_Integer argc, - const char** argv ) -{ - if ( argc < 2 ) - { - di << "Wrong number of parameters\n"; - di << "Use : meshtext \n"; - return 0; - } - - Handle( MeshVS_Mesh ) aMesh = getMesh( argv[ 1 ], di ); - - if ( aMesh.IsNull() ) - { - di << "Mesh not found\n"; - return 0; - } - - Handle(AIS_InteractiveContext) anIC = ViewerTest::GetAISContext(); - if ( anIC.IsNull() ) - { - di << "The context is null\n"; - return 0; - } - - // Prepare triangle labels - MeshVS_DataMapOfIntegerAsciiString aLabels; - Standard_Integer aLen = aMesh->GetDataSource()->GetAllElements().Extent(); - for ( Standard_Integer anIndex = 1; anIndex <= aLen; anIndex++ ){ - aLabels.Bind( anIndex, TCollection_AsciiString( anIndex ) ); - } - - Handle(MeshVS_TextPrsBuilder) aTextBuilder = new MeshVS_TextPrsBuilder( aMesh.operator->(), 20., Quantity_NOC_YELLOW ); - aTextBuilder->SetTexts( Standard_True, aLabels ); - aMesh->AddBuilder( aTextBuilder ); - - return 0; -} - -static Standard_Integer meshdeform( Draw_Interpretor& di, - Standard_Integer argc, - const char** argv ) -{ - if ( argc < 3 ) - { - di << "Wrong number of parameters\n"; - di << "Use : meshdeform < -mode {on|off} > [-scale scalefactor]\n"; - return 0; - } - - Handle( MeshVS_Mesh ) aMesh = getMesh( argv[ 1 ], di ); - - if ( aMesh.IsNull() ) - { - di << "Mesh not found\n"; - return 0; - } - Handle(AIS_InteractiveContext) anIC = ViewerTest::GetAISContext(); - if ( anIC.IsNull() ) - { - di << "The context is null\n"; - return 0; - } - - TCollection_AsciiString aParam; - TCollection_AsciiString aMode("off"); - Standard_Real aScale(1.0); - - for (Standard_Integer anIdx = 2; anIdx < argc; anIdx++) - { - if (!aParam.IsEmpty()) - { - if (aParam == "-mode") - { - aMode = argv[anIdx]; - } - else if (aParam == "-scale") - { - aScale = Draw::Atof(argv[anIdx]); - } - aParam.Clear(); - } - else if (argv[anIdx][0] == '-') - { - aParam = argv[anIdx]; - } - } - - if(!aMode.IsEqual("on") && !aMode.IsEqual("off")) - { - di << "Wrong mode name\n"; - return 0; - } - - Handle ( MeshVS_DeformedDataSource ) aDefDS = - new MeshVS_DeformedDataSource( aMesh->GetDataSource() , aScale ); - - const TColStd_PackedMapOfInteger& anAllIDs = aMesh->GetDataSource()->GetAllNodes(); - - Standard_Integer aNbNodes; - MeshVS_EntityType aEntType; - - TColStd_MapIteratorOfPackedMapOfInteger anIter( anAllIDs ); - for ( ; anIter.More(); anIter.Next() ) - { - TColStd_Array1OfReal aCoords(1, 3); - aMesh->GetDataSource()->GetGeom(anIter.Key(), Standard_False, aCoords, aNbNodes, aEntType); - - gp_Vec aNorm = gp_Vec(aCoords.Value(1), aCoords.Value(2), aCoords.Value(3)); - if( !aNorm.Magnitude() ) - aNorm = gp_Vec(0,0,1); - aDefDS->SetVector(anIter.Key(), aNorm.Normalized()); - } - - aMesh->SetDataSource(aDefDS); - - anIC->Redisplay (aMesh, Standard_False); - - Handle( V3d_View ) aView = ViewerTest::CurrentView(); - if ( !aView.IsNull() ) - aView->FitAll(); - - return 0; -} - -static Standard_Integer mesh_edge_width( Draw_Interpretor& di, - Standard_Integer argc, - const char** argv ) -{ - try - { - OCC_CATCH_SIGNALS - if ( argc < 3 ) - { - di << "Wrong number of parameters\n"; - di << "Use : mesh_edge_width \n"; - return 0; - } - - Handle(MeshVS_Mesh) aMesh = getMesh( argv[ 1 ], di ); - if ( aMesh.IsNull() ) - { - di << "Mesh not found\n"; - return 0; - } - - const char* aWidthStr = argv[ 2 ]; - if ( aWidthStr == 0 || Draw::Atof( aWidthStr ) <= 0 ) - { - di << "Width must be real value more than zero\n"; - return 0; - } - - double aWidth = Draw::Atof( aWidthStr ); - - Handle(AIS_InteractiveContext) anIC = ViewerTest::GetAISContext(); - if ( anIC.IsNull() ) - { - di << "The context is null\n"; - return 0; - } - - Handle(MeshVS_Drawer) aDrawer = aMesh->GetDrawer(); - if ( aDrawer.IsNull() ) - { - di << "The drawer is null\n"; - return 0; - } - - aDrawer->SetDouble( MeshVS_DA_EdgeWidth, aWidth ); - anIC->Redisplay (aMesh, Standard_True); - } - catch ( Standard_Failure const& ) - { - di << "Error\n"; - } - - return 0; -} - -//----------------------------------------------------------------------------- - -static Standard_Integer meshinfo(Draw_Interpretor& di, - Standard_Integer argc, - const char** argv) -{ - if ( argc != 2 ) - { - di << "Wrong number of parameters. Use : meshinfo mesh\n"; - return 0; - } - - Handle(MeshVS_Mesh) aMesh = getMesh(argv[ 1 ], di); - if ( aMesh.IsNull() ) - { - di << "Mesh not found\n"; - return 0; - } - - Handle(XSDRAWSTLVRML_DataSource) stlMeshSource = Handle(XSDRAWSTLVRML_DataSource)::DownCast(aMesh->GetDataSource()); - if (!stlMeshSource.IsNull()) - { - const TColStd_PackedMapOfInteger& nodes = stlMeshSource->GetAllNodes(); - const TColStd_PackedMapOfInteger& tris = stlMeshSource->GetAllElements(); - - di << "Nb nodes = " << nodes.Extent() << "\n"; - di << "Nb triangles = " << tris.Extent() << "\n"; - } - - return 0; -} - -//======================================================================= -//function : writeply -//purpose : write PLY file -//======================================================================= -static Standard_Integer WritePly (Draw_Interpretor& theDI, - Standard_Integer theNbArgs, - const char** theArgVec) -{ - Handle(TDocStd_Document) aDoc; - Handle(TDocStd_Application) anApp = DDocStd::GetApplication(); - TCollection_AsciiString aShapeName, aFileName; - - Standard_Real aDist = 0.0; - Standard_Real aDens = Precision::Infinite(); - Standard_Real aTol = Precision::Confusion(); - bool hasColors = true, hasNormals = true, hasTexCoords = false, hasPartId = true, hasFaceId = false; - bool isPntSet = false, isDensityPoints = false; - TColStd_IndexedDataMapOfStringString aFileInfo; - for (Standard_Integer anArgIter = 1; anArgIter < theNbArgs; ++anArgIter) - { - TCollection_AsciiString anArg (theArgVec[anArgIter]); - anArg.LowerCase(); - if (anArg == "-normal") - { - hasNormals = Draw::ParseOnOffIterator (theNbArgs, theArgVec, anArgIter); - } - else if (anArg == "-nonormal") - { - hasNormals = !Draw::ParseOnOffIterator (theNbArgs, theArgVec, anArgIter); - } - else if (anArg == "-color" - || anArg == "-nocolor" - || anArg == "-colors" - || anArg == "-nocolors") - { - hasColors = Draw::ParseOnOffNoIterator (theNbArgs, theArgVec, anArgIter); - } - else if (anArg == "-uv" - || anArg == "-nouv") - { - hasTexCoords = Draw::ParseOnOffNoIterator (theNbArgs, theArgVec, anArgIter); - } - else if (anArg == "-partid") - { - hasPartId = Draw::ParseOnOffNoIterator (theNbArgs, theArgVec, anArgIter); - hasFaceId = hasFaceId && !hasPartId; - } - else if (anArg == "-surfid" - || anArg == "-surfaceid" - || anArg == "-faceid") - { - hasFaceId = Draw::ParseOnOffNoIterator (theNbArgs, theArgVec, anArgIter); - hasPartId = hasPartId && !hasFaceId; - } - else if (anArg == "-pntset" - || anArg == "-pntcloud" - || anArg == "-pointset" - || anArg == "-pointcloud" - || anArg == "-cloud" - || anArg == "-points") - { - isPntSet = Draw::ParseOnOffIterator (theNbArgs, theArgVec, anArgIter); - } - else if ((anArg == "-dist" - || anArg == "-distance") - && anArgIter + 1 < theNbArgs - && Draw::ParseReal (theArgVec[anArgIter + 1], aDist)) - { - ++anArgIter; - isPntSet = true; - if (aDist < 0.0) - { - theDI << "Syntax error: -distance value should be >= 0.0"; - return 1; - } - aDist = Max (aDist, Precision::Confusion()); - } - else if ((anArg == "-dens" - || anArg == "-density") - && anArgIter + 1 < theNbArgs - && Draw::ParseReal (theArgVec[anArgIter + 1], aDens)) - { - ++anArgIter; - isDensityPoints = Standard_True; - isPntSet = true; - if (aDens <= 0.0) - { - theDI << "Syntax error: -density value should be > 0.0"; - return 1; - } - } - else if ((anArg == "-tol" - || anArg == "-tolerance") - && anArgIter + 1 < theNbArgs - && Draw::ParseReal (theArgVec[anArgIter + 1], aTol)) - { - ++anArgIter; - isPntSet = true; - if (aTol < Precision::Confusion()) - { - theDI << "Syntax error: -tol value should be >= " << Precision::Confusion(); - return 1; - } - } - else if (anArg == "-comments" - && anArgIter + 1 < theNbArgs) - { - aFileInfo.Add ("Comments", theArgVec[++anArgIter]); - } - else if (anArg == "-author" - && anArgIter + 1 < theNbArgs) - { - aFileInfo.Add ("Author", theArgVec[++anArgIter]); - } - else if (aDoc.IsNull()) - { - if (aShapeName.IsEmpty()) - { - aShapeName = theArgVec[anArgIter]; - } - - Standard_CString aNameVar = theArgVec[anArgIter]; - DDocStd::GetDocument (aNameVar, aDoc, false); - if (aDoc.IsNull()) - { - TopoDS_Shape aShape = DBRep::Get (aNameVar); - if (!aShape.IsNull()) - { - anApp->NewDocument (TCollection_ExtendedString ("BinXCAF"), aDoc); - Handle(XCAFDoc_ShapeTool) aShapeTool = XCAFDoc_DocumentTool::ShapeTool (aDoc->Main()); - aShapeTool->AddShape (aShape); - } - } - } - else if (aFileName.IsEmpty()) - { - aFileName = theArgVec[anArgIter]; - } - else - { - theDI << "Syntax error at '" << theArgVec[anArgIter] << "'"; - return 1; - } - } - if (aDoc.IsNull() - && !aShapeName.IsEmpty()) - { - theDI << "Syntax error: '" << aShapeName << "' is not a shape nor document"; - return 1; - } - else if (aDoc.IsNull() - || aFileName.IsEmpty()) - { - theDI << "Syntax error: wrong number of arguments"; - return 1; - } - - TDF_LabelSequence aRootLabels; - Handle(XCAFDoc_ShapeTool) aShapeTool = XCAFDoc_DocumentTool::ShapeTool (aDoc->Main()); - aShapeTool->GetFreeShapes (aRootLabels); - if (aRootLabels.IsEmpty()) - { - theDI << "Error: empty document"; - return 1; - } - - if (isPntSet) - { - class PointCloudPlyWriter : public BRepLib_PointCloudShape, public RWPly_PlyWriterContext - { - public: - PointCloudPlyWriter (Standard_Real theTol) - : BRepLib_PointCloudShape (TopoDS_Shape(), theTol) {} - - void AddFaceColor (const TopoDS_Shape& theFace, const Graphic3d_Vec4ub& theColor) - { myFaceColor.Bind (theFace, theColor); } - - protected: - virtual void addPoint (const gp_Pnt& thePoint, - const gp_Vec& theNorm, - const gp_Pnt2d& theUV, - const TopoDS_Shape& theFace) - { - Graphic3d_Vec4ub aColor; - myFaceColor.Find (theFace, aColor); - RWPly_PlyWriterContext::WriteVertex (thePoint, - Graphic3d_Vec3 ((float )theNorm.X(), (float )theNorm.Y(), (float )theNorm.Z()), - Graphic3d_Vec2 ((float )theUV.X(), (float )theUV.Y()), - aColor); - } - - private: - NCollection_DataMap myFaceColor; - }; - - PointCloudPlyWriter aPlyCtx (aTol); - aPlyCtx.SetNormals (hasNormals); - aPlyCtx.SetColors (hasColors); - aPlyCtx.SetTexCoords (hasTexCoords); - - TopoDS_Compound aComp; - BRep_Builder().MakeCompound (aComp); - for (XCAFPrs_DocumentExplorer aDocExplorer (aDoc, aRootLabels, XCAFPrs_DocumentExplorerFlags_OnlyLeafNodes); - aDocExplorer.More(); aDocExplorer.Next()) - { - const XCAFPrs_DocumentNode& aDocNode = aDocExplorer.Current(); - for (RWMesh_FaceIterator aFaceIter (aDocNode.RefLabel, aDocNode.Location, true, aDocNode.Style); aFaceIter.More(); aFaceIter.Next()) - { - BRep_Builder().Add (aComp, aFaceIter.Face()); - Graphic3d_Vec4ub aColorVec (255); - if (aFaceIter.HasFaceColor()) - { - Graphic3d_Vec4 aColorF = aFaceIter.FaceColor(); - aColorVec.SetValues ((unsigned char )int(aColorF.r() * 255.0f), - (unsigned char )int(aColorF.g() * 255.0f), - (unsigned char )int(aColorF.b() * 255.0f), - (unsigned char )int(aColorF.a() * 255.0f)); - } - aPlyCtx.AddFaceColor (aFaceIter.Face(), aColorVec); - } - } - aPlyCtx.SetShape (aComp); - - Standard_Integer aNbPoints = isDensityPoints - ? aPlyCtx.NbPointsByDensity (aDens) - : aPlyCtx.NbPointsByTriangulation(); - if (aNbPoints <= 0) - { - theDI << "Error: unable to generate points"; - return 0; - } - - if (!aPlyCtx.Open (aFileName) - || !aPlyCtx.WriteHeader (aNbPoints, 0, TColStd_IndexedDataMapOfStringString())) - { - theDI << "Error: unable to create file '" << aFileName << "'"; - return 0; - } - - Standard_Boolean isDone = isDensityPoints - ? aPlyCtx.GeneratePointsByDensity (aDens) - : aPlyCtx.GeneratePointsByTriangulation(); - if (!isDone) - { - theDI << "Error: Point cloud was not generated in file '" << aFileName << "'"; - } - else if (!aPlyCtx.Close()) - { - theDI << "Error: Point cloud file '" << aFileName << "' was not written"; - } - else - { - theDI << aNbPoints; - } - } - else - { - Handle(Draw_ProgressIndicator) aProgress = new Draw_ProgressIndicator (theDI, 1); - RWPly_CafWriter aPlyCtx (aFileName); - aPlyCtx.SetNormals (hasNormals); - aPlyCtx.SetColors (hasColors); - aPlyCtx.SetTexCoords (hasTexCoords); - aPlyCtx.SetPartId (hasPartId); - aPlyCtx.SetFaceId (hasFaceId); - aPlyCtx.Perform (aDoc, aFileInfo, aProgress->Start()); - } - return 0; -} - -//----------------------------------------------------------------------------- - -void XSDRAWSTLVRML::InitCommands (Draw_Interpretor& theCommands) -{ - const char* g = "XSTEP-STL/VRML"; // Step transfer file commands - //XSDRAW::LoadDraw(theCommands); - - theCommands.Add ("ReadGltf", - "ReadGltf Doc file [-parallel {on|off}] [-listExternalFiles] [-noCreateDoc] [-doublePrecision {on|off}] [-assetInfo]" - "\n\t\t: Read glTF file into XDE document." - "\n\t\t: -listExternalFiles do not read mesh and only list external files" - "\n\t\t: -noCreateDoc read into existing XDE document" - "\n\t\t: -doublePrecision store triangulation with double or single floating point" - "\n\t\t: precision (single by default)" - "\n\t\t: -skipLateLoading data loading is skipped and can be performed later" - "\n\t\t: (false by default)" - "\n\t\t: -keepLate data is loaded into itself with preservation of information" - "\n\t\t: about deferred storage to load/unload this data later." - "\n\t\t: -allScenes load all scenes defined in the document instead of default one (false by default)" - "\n\t\t: -toPrintDebugInfo print additional debug information during data reading" - "\n\t\t: -assetInfo print asset information", - __FILE__, ReadGltf, g); - theCommands.Add ("readgltf", - "readgltf shape file" - "\n\t\t: Same as ReadGltf but reads glTF file into a shape instead of a document.", - __FILE__, ReadGltf, g); - theCommands.Add ("WriteGltf", - "WriteGltf Doc file [-trsfFormat {compact|TRS|mat4}]=compact" - "\n\t\t: [-systemCoordSys {Zup|Yup}]=Zup" - "\n\t\t: [-comments Text] [-author Name]" - "\n\t\t: [-forceUVExport]=0 [-texturesSeparate]=0 [-mergeFaces]=0 [-splitIndices16]=0" - "\n\t\t: [-nodeNameFormat {empty|product|instance|instOrProd|prodOrInst|prodAndInst|verbose}]=instOrProd" - "\n\t\t: [-meshNameFormat {empty|product|instance|instOrProd|prodOrInst|prodAndInst|verbose}]=product" - "\n\t\t: [-draco]=0 [-compressionLevel {0-10}]=7 [-quantizePositionBits Value]=14 [-quantizeNormalBits Value]=10" - "\n\t\t: [-quantizeTexcoordBits Value]=12 [-quantizeColorBits Value]=8 [-quantizeGenericBits Value]=12" - "\n\t\t: [-unifiedQuantization]=0 [-parallel]=0" - "\n\t\t: Write XDE document into glTF file." - "\n\t\t: -trsfFormat preferred transformation format" - "\n\t\t: -systemCoordSys system coordinate system; Zup when not specified" - "\n\t\t: -mergeFaces merge Faces within the same Mesh" - "\n\t\t: -splitIndices16 split Faces to keep 16-bit indices when -mergeFaces is enabled" - "\n\t\t: -forceUVExport always export UV coordinates" - "\n\t\t: -texturesSeparate write textures to separate files" - "\n\t\t: -nodeNameFormat name format for Nodes" - "\n\t\t: -meshNameFormat name format for Meshes" - "\n\t\t: -draco use Draco compression 3D geometric meshes" - "\n\t\t: -compressionLevel draco compression level [0-10] (by default 7), a value of 0 will apply sequential encoding and preserve face order" - "\n\t\t: -quantizePositionBits quantization bits for position attribute when using Draco compression (by default 14)" - "\n\t\t: -quantizeNormalBits quantization bits for normal attribute when using Draco compression (by default 10)" - "\n\t\t: -quantizeTexcoordBits quantization bits for texture coordinate attribute when using Draco compression (by default 12)" - "\n\t\t: -quantizeColorBits quantization bits for color attribute when using Draco compression (by default 8)" - "\n\t\t: -quantizeGenericBits quantization bits for skinning attribute (joint indices and joint weights)" - "\n and custom attributes when using Draco compression (by default 12)" - "\n\t\t: -unifiedQuantization quantization is applied on each primitive separately if this option is false" - "\n\t\t: -parallel use multithreading for Draco compression", - __FILE__, WriteGltf, g); - theCommands.Add ("writegltf", - "writegltf shape file", - __FILE__, WriteGltf, g); - theCommands.Add ("writevrml", "shape file [version VRML#1.0/VRML#2.0 (1/2): 2 by default] [representation shaded/wireframe/both (0/1/2): 1 by default]",__FILE__,writevrml,g); - theCommands.Add ("writestl", "shape file [ascii/binary (0/1) : 1 by default] [InParallel (0/1) : 0 by default]",__FILE__,writestl,g); - theCommands.Add ("readstl", - "readstl shape file [-brep] [-mergeAngle Angle] [-multi]" - "\n\t\t: Reads STL file and creates a new shape with specified name." - "\n\t\t: When -brep is specified, creates a Compound of per-triangle Faces." - "\n\t\t: Single triangulation-only Face is created otherwise (default)." - "\n\t\t: -mergeAngle specifies maximum angle in degrees between triangles to merge equal nodes; disabled by default." - "\n\t\t: -multi creates a face per solid in multi-domain files; ignored when -brep is set.", - __FILE__, readstl, g); - theCommands.Add ("loadvrml" , "shape file",__FILE__,loadvrml,g); - theCommands.Add ("ReadObj", - "ReadObj Doc file [-fileCoordSys {Zup|Yup}] [-fileUnit Unit]" - "\n\t\t: [-resultCoordSys {Zup|Yup}] [-singlePrecision]" - "\n\t\t: [-listExternalFiles] [-noCreateDoc]" - "\n\t\t: Read OBJ file into XDE document." - "\n\t\t: -fileUnit length unit of OBJ file content;" - "\n\t\t: -fileCoordSys coordinate system defined by OBJ file; Yup when not specified." - "\n\t\t: -resultCoordSys result coordinate system; Zup when not specified." - "\n\t\t: -singlePrecision truncate vertex data to single precision during read; FALSE by default." - "\n\t\t: -listExternalFiles do not read mesh and only list external files." - "\n\t\t: -noCreateDoc read into existing XDE document.", - __FILE__, ReadObj, g); - theCommands.Add ("readobj", - "readobj shape file [-fileCoordSys {Zup|Yup}] [-fileUnit Unit]" - "\n\t\t: [-resultCoordSys {Zup|Yup}] [-singlePrecision]" - "\n\t\t: [-singleFace]" - "\n\t\t: Same as ReadObj but reads OBJ file into a shape instead of a document." - "\n\t\t: -singleFace merge OBJ content into a single triangulation Face.", - __FILE__, ReadObj, g); - theCommands.Add ("WriteObj", - "WriteObj Doc file [-fileCoordSys {Zup|Yup}] [-fileUnit Unit]" - "\n\t\t: [-systemCoordSys {Zup|Yup}]" - "\n\t\t: [-comments Text] [-author Name]" - "\n\t\t: Write XDE document into OBJ file." - "\n\t\t: -fileUnit length unit of OBJ file content;" - "\n\t\t: -fileCoordSys coordinate system defined by OBJ file; Yup when not specified." - "\n\t\t: -systemCoordSys system coordinate system; Zup when not specified.", - __FILE__, WriteObj, g); - theCommands.Add ("writeobj", - "writeobj shape file", - __FILE__, WriteObj, g); - - theCommands.Add ("meshfromstl", "creates MeshVS_Mesh from STL file", __FILE__, createmesh, g ); - theCommands.Add ("mesh3delem", "creates 3d element mesh to test", __FILE__, create3d, g ); - theCommands.Add ("meshshadcolor", "change MeshVS_Mesh shading color", __FILE__, meshcolor, g ); - theCommands.Add ("meshlinkcolor", "change MeshVS_Mesh line color", __FILE__, linecolor, g ); - theCommands.Add ("meshmat", "change MeshVS_Mesh material and transparency", __FILE__, meshmat, g ); - theCommands.Add ("meshshrcoef", "change MeshVS_Mesh shrink coeff", __FILE__, shrink, g ); - theCommands.Add ("meshclosed", "meshclosed meshname (0/1) \nChange MeshVS_Mesh drawing mode. 0 - not closed object, 1 - closed object", __FILE__, closed, g); - theCommands.Add ("meshshow", "display MeshVS_Mesh object", __FILE__, mdisplay, g ); - theCommands.Add ("meshhide", "erase MeshVS_Mesh object", __FILE__, merase, g ); - theCommands.Add ("meshhidesel", "hide selected entities", __FILE__, hidesel, g ); - theCommands.Add ("meshshowsel", "show only selected entities", __FILE__, showonly, g ); - theCommands.Add ("meshshowall", "show all entities", __FILE__, showall, g ); - theCommands.Add ("meshcolors", "display color presentation", __FILE__, meshcolors, g ); - theCommands.Add ("meshvectors", "display sample vectors", __FILE__, meshvectors, g ); - theCommands.Add ("meshtext", "display text labels", __FILE__, meshtext, g ); - theCommands.Add ("meshdeform", "display deformed mesh", __FILE__, meshdeform, g ); - theCommands.Add ("mesh_edge_width", "set width of edges", __FILE__, mesh_edge_width, g ); - theCommands.Add ("meshinfo", "displays the number of nodes and triangles", __FILE__, meshinfo, g ); - theCommands.Add ("WritePly", R"( -WritePly Doc file [-normals {0|1}]=1 [-colors {0|1}]=1 [-uv {0|1}]=0 [-partId {0|1}]=1 [-faceId {0|1}]=0 - [-pointCloud {0|1}]=0 [-distance Value]=0.0 [-density Value] [-tolerance Value] -Write document or triangulated shape into PLY file. - -normals write per-vertex normals - -colors write per-vertex colors - -uv write per-vertex UV coordinates - -partId write per-element part index (alternative to -faceId) - -faceId write per-element face index (alternative to -partId) - -Generate point cloud out of the shape and write it into PLY file. - -pointCloud write point cloud instead without triangulation indices - -distance sets distance from shape into the range [0, Value]; - -density sets density of points to generate randomly on surface; - -tolerance sets tolerance; default value is Precision::Confusion(); -)", __FILE__, WritePly, g); - theCommands.Add ("writeply", - "writeply shape file", - __FILE__, WritePly, g); -} - -//============================================================================== -// XSDRAWSTLVRML::Factory -//============================================================================== -void XSDRAWSTLVRML::Factory(Draw_Interpretor& theDI) -{ - XSDRAWIGES::InitSelect(); - XSDRAWIGES::InitToBRep(theDI); - XSDRAWIGES::InitFromBRep(theDI); - XSDRAWSTEP::InitCommands(theDI); - XSDRAWSTLVRML::InitCommands(theDI); - XSDRAW::LoadDraw(theDI); -#ifdef OCCT_DEBUG - theDI << "Draw Plugin : All TKXSDRAW commands are loaded\n"; -#endif -} - -// Declare entry point PLUGINFACTORY -DPLUGIN(XSDRAWSTLVRML) - diff --git a/src/XSDRAWSTLVRML/XSDRAWSTLVRML_ElemNodesMap.hxx b/src/XSDRAWSTLVRML/XSDRAWSTLVRML_ElemNodesMap.hxx deleted file mode 100644 index 65445ec081..0000000000 --- a/src/XSDRAWSTLVRML/XSDRAWSTLVRML_ElemNodesMap.hxx +++ /dev/null @@ -1,26 +0,0 @@ -// Created on: 2000-05-30 -// Created by: Sergey MOZOKHIN -// Copyright (c) 2000-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 XSDRAWSTLVRML_ElemNodesMap_HeaderFile -#define XSDRAWSTLVRML_ElemNodesMap_HeaderFile - -#include -#include - -typedef NCollection_DataMap XSDRAWSTLVRML_ElemNodesMap; -typedef NCollection_DataMap::Iterator XSDRAWSTLVRML_DataMapIteratorOfElemNodesMap; - - -#endif diff --git a/src/XSDRAWVRML/FILES b/src/XSDRAWVRML/FILES new file mode 100644 index 0000000000..e2a81aa604 --- /dev/null +++ b/src/XSDRAWVRML/FILES @@ -0,0 +1,2 @@ +XSDRAWVRML.cxx +XSDRAWVRML.hxx diff --git a/src/XSDRAWVRML/XSDRAWVRML.cxx b/src/XSDRAWVRML/XSDRAWVRML.cxx new file mode 100644 index 0000000000..20541eedee --- /dev/null +++ b/src/XSDRAWVRML/XSDRAWVRML.cxx @@ -0,0 +1,411 @@ +// Copyright (c) 2023 OPEN CASCADE SAS +// +// This file is part of Open CASCADE Technology software library. +// +// This library is free software; you can redistribute it and/or modify it under +// the terms of the GNU Lesser General Public License version 2.1 as published +// by the Free Software Foundation, with special exception defined in the file +// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT +// distribution for complete text of the license and disclaimer of any warranty. +// +// Alternatively, this file may be used under the terms of Open CASCADE +// commercial license or contractual agreement. + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +//============================================================================= +//function : parseCoordinateSystem +//purpose : Parse RWMesh_CoordinateSystem enumeration +//============================================================================= +static bool parseCoordinateSystem(const char* theArg, + RWMesh_CoordinateSystem& theSystem) +{ + TCollection_AsciiString aCSStr(theArg); + aCSStr.LowerCase(); + if (aCSStr == "zup") + { + theSystem = RWMesh_CoordinateSystem_Zup; + } + else if (aCSStr == "yup") + { + theSystem = RWMesh_CoordinateSystem_Yup; + } + else + { + return Standard_False; + } + return Standard_True; +} + +//======================================================================= +//function : ReadVrml +//purpose : +//======================================================================= +static Standard_Integer ReadVrml(Draw_Interpretor& theDI, + Standard_Integer theArgc, + const char** theArgv) +{ + if(theArgc < 3) + { + theDI.PrintHelp(theArgv[0]); + return 1; + } + + Handle(TDocStd_Document) aDoc; + Standard_Real aFileUnitFactor = 1.0; + RWMesh_CoordinateSystem aFileCoordSys = RWMesh_CoordinateSystem_Yup, aSystemCoordSys = RWMesh_CoordinateSystem_Zup; + Standard_Boolean toUseExistingDoc = Standard_False; + Standard_Boolean toFillIncomplete = Standard_True; + Standard_CString aDocName = NULL; + TCollection_AsciiString aFilePath; + + for(Standard_Integer anArgIt = 1; anArgIt < theArgc; anArgIt++) + { + TCollection_AsciiString anArg(theArgv[anArgIt]); + anArg.LowerCase(); + if(anArgIt + 1 < theArgc && anArg == "-fileunit") + { + const TCollection_AsciiString aUnitStr(theArgv[++anArgIt]); + aFileUnitFactor = UnitsAPI::AnyToSI(1.0, aUnitStr.ToCString()); + if (aFileUnitFactor <= 0.0) + { + Message::SendFail() << "Error: wrong length unit '" << aUnitStr << "'"; + return 1; + } + } + else if (anArgIt + 1 < theArgc && anArg == "-filecoordsys") + { + if (!parseCoordinateSystem(theArgv[++anArgIt], aFileCoordSys)) + { + Message::SendFail() << "Error: unknown coordinate system '" << theArgv[anArgIt] << "'"; + return 1; + } + } + else if (anArgIt + 1 < theArgc && anArg == "-systemcoordsys") + { + if (!parseCoordinateSystem(theArgv[++anArgIt], aSystemCoordSys)) + { + Message::SendFail() << "Error: unknown coordinate system '" << theArgv[anArgIt] << "'"; + return 1; + } + } + else if (anArg == "-fillincomplete") + { + toFillIncomplete = true; + if (anArgIt + 1 < theArgc && Draw::ParseOnOff(theArgv[anArgIt + 1], toFillIncomplete)) + { + ++anArgIt; + } + } + else if (anArg == "-nocreatedoc") + { + toUseExistingDoc = true; + } + else if (aDocName == nullptr) + { + aDocName = theArgv[anArgIt]; + DDocStd::GetDocument(aDocName, aDoc, Standard_False); + } + else if(aFilePath.IsEmpty()) + { + aFilePath = theArgv[anArgIt]; + } + else + { + Message::SendFail() << "Syntax error at '" << theArgv[anArgIt] << "'"; + return 1; + } + } + + if (aFilePath.IsEmpty() || aDocName == nullptr) + { + Message::SendFail() << "Syntax error: wrong number of arguments"; + return 1; + } + + if (aDoc.IsNull()) + { + if(toUseExistingDoc) + { + Message::SendFail() << "Error: document with name " << aDocName << " does not exist"; + return 1; + } + Handle(TDocStd_Application) anApp = DDocStd::GetApplication(); + anApp->NewDocument("BinXCAF", aDoc); + } + else if (!toUseExistingDoc) + { + Message::SendFail() << "Error: document with name " << aDocName << " already exists\n"; + return 1; + } + + Standard_Real aScaleFactor = 1.; + if (!XCAFDoc_DocumentTool::GetLengthUnit(aDoc, aScaleFactor)) + { + XSAlgo::AlgoContainer()->PrepareForTransfer(); + aScaleFactor = UnitsMethods::GetCasCadeLengthUnit(); + } + + VrmlAPI_CafReader aVrmlReader; + aVrmlReader.SetDocument(aDoc); + aVrmlReader.SetFileLengthUnit(aFileUnitFactor); + aVrmlReader.SetSystemLengthUnit(aScaleFactor); + aVrmlReader.SetFileCoordinateSystem(aFileCoordSys); + aVrmlReader.SetSystemCoordinateSystem(aSystemCoordSys); + aVrmlReader.SetFillIncompleteDocument(toFillIncomplete); + + Handle(Draw_ProgressIndicator) aProgress = new Draw_ProgressIndicator(theDI, 1); + if (!aVrmlReader.Perform(aFilePath, aProgress->Start())) + { + if (aVrmlReader.ExtraStatus() != RWMesh_CafReaderStatusEx_Partial) + { + Message::SendFail() << "Error: file reading failed '" << aFilePath << "'"; + return 1; + } + Message::SendWarning() << + "Warning: file has been read paratially (due to unexpected EOF, syntax error, memory limit) " << aFilePath; + } + + TDataStd_Name::Set(aDoc->GetData()->Root(), aDocName); + Handle(DDocStd_DrawDocument) aDD = new DDocStd_DrawDocument(aDoc); + Draw::Set(aDocName, aDD); + + return 0; +} + +//======================================================================= +//function : WriteVrml +//purpose : Write DECAF document to Vrml +//======================================================================= +static Standard_Integer WriteVrml(Draw_Interpretor& di, Standard_Integer argc, const char** argv) +{ + if (argc < 3) + { + di << "Use: " << argv[0] << " Doc filename: write document to Vrml file\n"; + return 0; + } + + Handle(TDocStd_Document) aDoc; + DDocStd::GetDocument(argv[1], aDoc); + if (aDoc.IsNull()) + { + di << argv[1] << " is not a document\n"; + return 1; + } + + if (argc < 3 || argc > 5) + { + di << "wrong number of parameters\n"; + return 0; + } + + VrmlAPI_Writer writer; + writer.SetRepresentation(VrmlAPI_ShadedRepresentation); + Standard_Real aScaleFactorM = 1.; + if (!XCAFDoc_DocumentTool::GetLengthUnit(aDoc, aScaleFactorM)) + { + XSAlgo::AlgoContainer()->PrepareForTransfer(); // update unit info + aScaleFactorM = UnitsMethods::GetCasCadeLengthUnit(UnitsMethods_LengthUnit_Meter); + } + if (!writer.WriteDoc(aDoc, argv[2], aScaleFactorM)) + { + di << "Error: File " << argv[2] << " was not written\n"; + } + + return 0; +} + +//======================================================================= +//function : loadvrml +//purpose : +//======================================================================= + +static Standard_Integer loadvrml +(Draw_Interpretor& di, Standard_Integer argc, const char** argv) +{ + if (argc<3) di << "wrong number of parameters" << "\n"; + else { + TopoDS_Shape aShape ; + VrmlData_DataMapOfShapeAppearance aShapeAppMap; + + //----------------------------------------------------------- + std::filebuf aFic; + std::istream aStream (&aFic); + + if (aFic.open(argv[2], std::ios::in)) { + + // Get path of the VRML file. + OSD_Path aPath(argv[2]); + TCollection_AsciiString aVrmlDir("."); + TCollection_AsciiString aDisk = aPath.Disk(); + TCollection_AsciiString aTrek = aPath.Trek(); + if (!aTrek.IsEmpty()) + { + if (!aDisk.IsEmpty()) + aVrmlDir = aDisk; + else + aVrmlDir.Clear(); + aTrek.ChangeAll('|', '/'); + aVrmlDir += aTrek; + } + + VrmlData_Scene aScene; + const Standard_Real anOCCUnitMM = XSDRAW::GetLengthUnit(); + aScene.SetLinearScale(1000. / anOCCUnitMM); + + aScene.SetVrmlDir (aVrmlDir); + aScene << aStream; + const char * aStr = 0L; + switch (aScene.Status()) { + + case VrmlData_StatusOK: + { + aShape = aScene.GetShape(aShapeAppMap); + break; + } + case VrmlData_EmptyData: aStr = "EmptyData"; break; + case VrmlData_UnrecoverableError: aStr = "UnrecoverableError"; break; + case VrmlData_GeneralError: aStr = "GeneralError"; break; + case VrmlData_EndOfFile: aStr = "EndOfFile"; break; + case VrmlData_NotVrmlFile: aStr = "NotVrmlFile"; break; + case VrmlData_CannotOpenFile: aStr = "CannotOpenFile"; break; + case VrmlData_VrmlFormatError: aStr = "VrmlFormatError"; break; + case VrmlData_NumericInputError: aStr = "NumericInputError"; break; + case VrmlData_IrrelevantNumber: aStr = "IrrelevantNumber"; break; + case VrmlData_BooleanInputError: aStr = "BooleanInputError"; break; + case VrmlData_StringInputError: aStr = "StringInputError"; break; + case VrmlData_NodeNameUnknown: aStr = "NodeNameUnknown"; break; + case VrmlData_NonPositiveSize: aStr = "NonPositiveSize"; break; + case VrmlData_ReadUnknownNode: aStr = "ReadUnknownNode"; break; + case VrmlData_NonSupportedFeature: aStr = "NonSupportedFeature"; break; + case VrmlData_OutputStreamUndefined:aStr = "OutputStreamUndefined"; break; + case VrmlData_NotImplemented: aStr = "NotImplemented"; break; + default: + break; + } + if (aStr) { + di << " ++ VRML Error: " << aStr << " in line " + << aScene.GetLineError() << "\n"; + } + else { + DBRep::Set(argv[1],aShape); + } + } + else { + di << "cannot open file\n"; + } + + + //----------------------------------------------------------- + } + return 0; +} + +//============================================================================= +//function : writevrml +//purpose : +//============================================================================= +static Standard_Integer writevrml +(Draw_Interpretor& di, Standard_Integer argc, const char** argv) +{ + if (argc < 3 || argc > 5) + { + di << "wrong number of parameters\n"; + return 0; + } + + TopoDS_Shape aShape = DBRep::Get(argv[1]); + + // Get the optional parameters + Standard_Integer aVersion = 2; + Standard_Integer aType = 1; + if (argc >= 4) + { + aVersion = Draw::Atoi(argv[3]); + if (argc == 5) + aType = Draw::Atoi(argv[4]); + } + + // Bound parameters + aVersion = Max(1, aVersion); + aVersion = Min(2, aVersion); + aType = Max(0, aType); + aType = Min(2, aType); + + VrmlAPI_Writer writer; + + switch (aType) + { + case 0: writer.SetRepresentation(VrmlAPI_ShadedRepresentation); break; + case 1: writer.SetRepresentation(VrmlAPI_WireFrameRepresentation); break; + case 2: writer.SetRepresentation(VrmlAPI_BothRepresentation); break; + } + + if (!writer.Write(aShape, argv[2], aVersion)) + { + di << "Error: File " << argv[2] << " was not written\n"; + } + + return 0; +} + +//============================================================================= +//function : Factory +//purpose : +//============================================================================= +void XSDRAWVRML::Factory(Draw_Interpretor& theDI) +{ + static Standard_Boolean anInitActor = Standard_False; + if (anInitActor) + { + return; + } + anInitActor = Standard_True; + + Standard_CString aGroup = "XDE translation commands"; + theDI.Add("ReadVrml", + "ReadVrml docName filePath [-fileCoordSys {Zup|Yup}] [-fileUnit Unit]" + "\n\t\t: [-systemCoordSys {Zup|Yup}] [-noCreateDoc] [-fillIncomplete {ON|OFF}]" + "\n\t\t: Read Vrml file into XDE document." + "\n\t\t: -fileCoordSys coordinate system defined by Vrml file; Yup when not specified." + "\n\t\t: -fileUnit length unit of Vrml file content." + "\n\t\t: -systemCoordSys result coordinate system; Zup when not specified." + "\n\t\t: -noCreateDoc read into existing XDE document." + "\n\t\t: -fillIncomplete fill the document with partially retrieved data even if reader has failed with " + "error; true when not specified", + __FILE__, ReadVrml, aGroup); + theDI.Add("WriteVrml", + "WriteVrml Doc filename [version VRML#1.0/VRML#2.0 (1/2): 2 by default] [representation shaded/wireframe/both (0/1/2): 0 by default]", + __FILE__, WriteVrml, aGroup); + theDI.Add("loadvrml", "shape file", __FILE__, loadvrml, aGroup); + theDI.Add("writevrml", "shape file [version VRML#1.0/VRML#2.0 (1/2): 2 by default] [representation shaded/wireframe/both (0/1/2): 1 by default]", __FILE__, writevrml, aGroup); + + // Load XSDRAW session for pilot activation + XSDRAW::LoadDraw(theDI); +} + +// Declare entry point PLUGINFACTORY +DPLUGIN(XSDRAWVRML) diff --git a/src/XSDRAWVRML/XSDRAWVRML.hxx b/src/XSDRAWVRML/XSDRAWVRML.hxx new file mode 100644 index 0000000000..bc969ff83e --- /dev/null +++ b/src/XSDRAWVRML/XSDRAWVRML.hxx @@ -0,0 +1,31 @@ +// Copyright (c) 2023 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 _XSDRAWVRML_HeaderFile +#define _XSDRAWVRML_HeaderFile + +#include +#include + +#include + +class XSDRAWVRML +{ + DEFINE_STANDARD_ALLOC +public: + + //! Loads all Draw commands of XSDRAWVRML. Used for plugin. + Standard_EXPORT static void Factory(Draw_Interpretor& theDI); +}; + +#endif // _XSDRAWVRML_HeaderFile diff --git a/tests/bugs/demo/bug14673_3 b/tests/bugs/demo/bug14673_3 index 03f4e2d750..5900af688c 100644 --- a/tests/bugs/demo/bug14673_3 +++ b/tests/bugs/demo/bug14673_3 @@ -17,6 +17,6 @@ close $fd puts "# Load IGES file which is known to generate the message, and check it" puts "REQUIRED 14673 ALL: $message" -pload XSDRAW +pload XSDRAW IGES igesbrep [locate_data_file hammer.iges] a * tpstat c diff --git a/tests/bugs/demo/bug27905 b/tests/bugs/demo/bug27905 index 6565838f34..3c6d85101c 100755 --- a/tests/bugs/demo/bug27905 +++ b/tests/bugs/demo/bug27905 @@ -6,7 +6,7 @@ puts "" # Visualization - randomly directed arrows on test v3d mesh B7 ########################################################################################################## -pload XSDRAW +pload XSDRAW STL vinit vclear diff --git a/tests/bugs/heal/bug23722 b/tests/bugs/heal/bug23722 index 0afa733714..350c2931ce 100755 --- a/tests/bugs/heal/bug23722 +++ b/tests/bugs/heal/bug23722 @@ -6,6 +6,8 @@ puts "" ## stack overflow during reading IGES in Test Harness ############################# +pload IGES + restore [locate_data_file bug23722_face.brep] brepiges bug23722_face ${imagedir}/face.igs diff --git a/tests/bugs/heal/bug24549 b/tests/bugs/heal/bug24549 index b985c88659..aa94f633c0 100644 --- a/tests/bugs/heal/bug24549 +++ b/tests/bugs/heal/bug24549 @@ -6,7 +6,7 @@ puts "" ## Faulty shape after IGES translation with xstep.cascade.unit set to M ####################################################################### -pload DATAEXCHANGEKERNEL +pload DATAEXCHANGEKERNEL IGES param xstep.cascade.unit M diff --git a/tests/bugs/heal/bug24983 b/tests/bugs/heal/bug24983 index 954bdeebf6..271c05880e 100644 --- a/tests/bugs/heal/bug24983 +++ b/tests/bugs/heal/bug24983 @@ -2,6 +2,8 @@ puts "========" puts "0024983: For the incorrect seam edge in STEP file no fix is provided" puts "========" +pload STEP + stepread [locate_data_file bug24983_111FACE.stp] a * tpcompound result diff --git a/tests/bugs/heal/bug25013_1 b/tests/bugs/heal/bug25013_1 index ad0b14358a..feea5583ae 100755 --- a/tests/bugs/heal/bug25013_1 +++ b/tests/bugs/heal/bug25013_1 @@ -6,6 +6,8 @@ puts "" # ShapeFix_Wire tweaks for better results ################################################## +pload STEP + stepread [locate_data_file bug25013_25013faces.stp] a * tpcompound result diff --git a/tests/bugs/heal/bug25013_2 b/tests/bugs/heal/bug25013_2 index 675c658431..c7cbc05b47 100755 --- a/tests/bugs/heal/bug25013_2 +++ b/tests/bugs/heal/bug25013_2 @@ -6,6 +6,8 @@ puts "" # ShapeFix_Wire tweaks for better results ################################################## +pload STEP + stepread [locate_data_file bug25013_25013face.stp] a * tpcompound result diff --git a/tests/bugs/heal/bug25823 b/tests/bugs/heal/bug25823 index 198c196655..a6e2a2d013 100755 --- a/tests/bugs/heal/bug25823 +++ b/tests/bugs/heal/bug25823 @@ -6,6 +6,8 @@ puts "" # Self Intersecting wire translated from STEP file ####################################################################################### +pload STEP + set BugNumber OCC25823 set aFile [locate_data_file bug25823_280612.stp] diff --git a/tests/bugs/heal/bug26280 b/tests/bugs/heal/bug26280 index 9e49db5afc..b857a7a633 100644 --- a/tests/bugs/heal/bug26280 +++ b/tests/bugs/heal/bug26280 @@ -8,5 +8,7 @@ puts "" # Mechanism 'ShapeFix' is unable to heal a shape ################################################## +pload STEP + stepread [locate_data_file bug26280_1kento13-mld-b-cv-qubit.stp] r * checkshape r_1 diff --git a/tests/bugs/heal/bug26671 b/tests/bugs/heal/bug26671 index abdc6f4e17..6ab635e35a 100644 --- a/tests/bugs/heal/bug26671 +++ b/tests/bugs/heal/bug26671 @@ -2,6 +2,8 @@ puts "========================" puts "0026671: Infinite loop in ShapeFix_Wire::FixSelfIntersection()" puts "========================" +pload IGES + cpulimit 20 igesbrep [locate_data_file bug26671.igs] result * diff --git a/tests/bugs/heal/bug27078 b/tests/bugs/heal/bug27078 index 2f532c36e9..c21c679240 100644 --- a/tests/bugs/heal/bug27078 +++ b/tests/bugs/heal/bug27078 @@ -2,6 +2,8 @@ # OCC27078: Exception in ShapeFixIntersectionTool::UnionVertexes() ################################################################## +pload IGES + testreadiges [locate_data_file bug27078.igs] a # fixshape should not throw an exception diff --git a/tests/bugs/heal/bug27894 b/tests/bugs/heal/bug27894 index 447bd9d764..8ea429b053 100644 --- a/tests/bugs/heal/bug27894 +++ b/tests/bugs/heal/bug27894 @@ -6,6 +6,8 @@ puts "" ## Crash when calling ShapeUpgrade_UnifySameDomain ############################### +pload STEP + stepread [locate_data_file bug27894_usd_raises_Standard_NullObject.stp] a * renamevar a_1 a unifysamedom result a diff --git a/tests/bugs/heal/bug33028 b/tests/bugs/heal/bug33028 index 4650b331ae..871e9c7688 100644 --- a/tests/bugs/heal/bug33028 +++ b/tests/bugs/heal/bug33028 @@ -3,6 +3,8 @@ puts " OCC33028: Standard_ConstructionError while using ShapeUpgrade_UnifySameDo puts "========================" puts "" +pload STEP + stepread [locate_data_file bug33028_kalip.stp] s * set nbsBefore " diff --git a/tests/bugs/heal/bug33398 b/tests/bugs/heal/bug33398 index 099597bb9d..d49d338eba 100644 --- a/tests/bugs/heal/bug33398 +++ b/tests/bugs/heal/bug33398 @@ -3,6 +3,8 @@ puts "0033398: Modeling Algorithms - ShapeUpgrade_UnifySameDomain fails on speci puts "=========================================" puts "" +pload STEP + testreadstep [locate_data_file bug33398.step] s unifysamedom result s diff --git a/tests/bugs/mesh/bug28118 b/tests/bugs/mesh/bug28118 index d27e71e68c..de6fa12669 100644 --- a/tests/bugs/mesh/bug28118 +++ b/tests/bugs/mesh/bug28118 @@ -6,7 +6,7 @@ puts "" # Mesh generation hangs then crashes ########################################### -pload DATAEXCHANGEKERNEL +pload DATAEXCHANGEKERNEL STEP testreadstep [locate_data_file bug28118_18547.stp] result vclear diff --git a/tests/bugs/mesh/bug29715 b/tests/bugs/mesh/bug29715 index f222bbafed..9dc70f3544 100644 --- a/tests/bugs/mesh/bug29715 +++ b/tests/bugs/mesh/bug29715 @@ -3,7 +3,7 @@ puts "0029715: Mesh - Estimate the grid size of the acceleration structure by th puts "=======" puts "" -if {[info commands stepread] == ""} {pload XSDRAW} +if {[info commands stepread] == ""} {pload XSDRAW STEP} stepread [locate_data_file bug29715_slow.stp] a * renamevar a_1 a diff --git a/tests/bugs/modalg_4/bug8842_1 b/tests/bugs/modalg_4/bug8842_1 index 2cd32d7bf9..20e64327fd 100755 --- a/tests/bugs/modalg_4/bug8842_1 +++ b/tests/bugs/modalg_4/bug8842_1 @@ -8,7 +8,7 @@ puts "" set BugNumber OCC8842 -if {[info commands testreadiges] == ""} {pload XSDRAW} +if {[info commands testreadiges] == ""} {pload XSDRAW IGES} proc myoffset {result sh val tan} { if {$tan == 1} { diff --git a/tests/bugs/modalg_4/bug8842_10 b/tests/bugs/modalg_4/bug8842_10 index e31fdedff5..c73453d32e 100755 --- a/tests/bugs/modalg_4/bug8842_10 +++ b/tests/bugs/modalg_4/bug8842_10 @@ -8,7 +8,7 @@ puts "" set BugNumber OCC8842 -if {[info commands testreadiges] == ""} {pload XSDRAW} +if {[info commands testreadiges] == ""} {pload XSDRAW IGES} proc myoffset {result sh val tan} { if {$tan == 1} { diff --git a/tests/bugs/modalg_4/bug8842_11 b/tests/bugs/modalg_4/bug8842_11 index 55fb7187b5..e3cc2c2b8b 100755 --- a/tests/bugs/modalg_4/bug8842_11 +++ b/tests/bugs/modalg_4/bug8842_11 @@ -8,7 +8,7 @@ puts "" set BugNumber OCC8842 -if {[info commands testreadiges] == ""} {pload XSDRAW} +if {[info commands testreadiges] == ""} {pload XSDRAW IGES} proc myoffset {result sh val tan} { if {$tan == 1} { diff --git a/tests/bugs/modalg_4/bug8842_12 b/tests/bugs/modalg_4/bug8842_12 index 0852f3afe4..fc113cff9f 100755 --- a/tests/bugs/modalg_4/bug8842_12 +++ b/tests/bugs/modalg_4/bug8842_12 @@ -8,7 +8,7 @@ puts "" set BugNumber OCC8842 -if {[info commands testreadiges] == ""} {pload XSDRAW} +if {[info commands testreadiges] == ""} {pload XSDRAW IGES} proc myoffset {result sh val tan} { if {$tan == 1} { diff --git a/tests/bugs/modalg_4/bug8842_13 b/tests/bugs/modalg_4/bug8842_13 index 1fa251f0b7..82dbae1ae2 100755 --- a/tests/bugs/modalg_4/bug8842_13 +++ b/tests/bugs/modalg_4/bug8842_13 @@ -8,7 +8,7 @@ puts "" set BugNumber OCC8842 -if {[info commands testreadiges] == ""} {pload XSDRAW} +if {[info commands testreadiges] == ""} {pload XSDRAW IGES} proc myoffset {result sh val tan} { if {$tan == 1} { diff --git a/tests/bugs/modalg_4/bug8842_14 b/tests/bugs/modalg_4/bug8842_14 index a7c954ab32..3ac88ab092 100755 --- a/tests/bugs/modalg_4/bug8842_14 +++ b/tests/bugs/modalg_4/bug8842_14 @@ -8,7 +8,7 @@ puts "" set BugNumber OCC8842 -if {[info commands testreadiges] == ""} {pload XSDRAW} +if {[info commands testreadiges] == ""} {pload XSDRAW IGES} proc myoffset {result sh val tan} { if {$tan == 1} { diff --git a/tests/bugs/modalg_4/bug8842_15 b/tests/bugs/modalg_4/bug8842_15 index fb00750bf2..5adb694ba6 100755 --- a/tests/bugs/modalg_4/bug8842_15 +++ b/tests/bugs/modalg_4/bug8842_15 @@ -9,7 +9,7 @@ puts "" set BugNumber OCC8842 -if {[info commands testreadiges] == ""} {pload XSDRAW} +if {[info commands testreadiges] == ""} {pload XSDRAW IGES} proc myoffset {result sh val tan} { if {$tan == 1} { diff --git a/tests/bugs/modalg_4/bug8842_16 b/tests/bugs/modalg_4/bug8842_16 index c8d4075ad6..d02d3786f9 100755 --- a/tests/bugs/modalg_4/bug8842_16 +++ b/tests/bugs/modalg_4/bug8842_16 @@ -8,7 +8,7 @@ puts "" set BugNumber OCC8842 -if {[info commands testreadiges] == ""} {pload XSDRAW} +if {[info commands testreadiges] == ""} {pload XSDRAW IGES} proc myoffset {result sh val tan} { if {$tan == 1} { diff --git a/tests/bugs/modalg_4/bug8842_2 b/tests/bugs/modalg_4/bug8842_2 index 29a054a7fe..70d9cfbaa2 100755 --- a/tests/bugs/modalg_4/bug8842_2 +++ b/tests/bugs/modalg_4/bug8842_2 @@ -8,7 +8,7 @@ puts "" set BugNumber OCC8842 -if {[info commands testreadiges] == ""} {pload XSDRAW} +if {[info commands testreadiges] == ""} {pload XSDRAW IGES} proc myoffset {result sh val tan} { if {$tan == 1} { diff --git a/tests/bugs/modalg_4/bug8842_3 b/tests/bugs/modalg_4/bug8842_3 index b21c170049..bedb0f9b6e 100755 --- a/tests/bugs/modalg_4/bug8842_3 +++ b/tests/bugs/modalg_4/bug8842_3 @@ -10,7 +10,7 @@ puts "" set BugNumber OCC8842 -if {[info commands testreadiges] == ""} {pload XSDRAW} +if {[info commands testreadiges] == ""} {pload XSDRAW IGES} proc myoffset {result sh val tan} { if {$tan == 1} { diff --git a/tests/bugs/modalg_4/bug8842_4 b/tests/bugs/modalg_4/bug8842_4 index f315de1a74..7733db62be 100755 --- a/tests/bugs/modalg_4/bug8842_4 +++ b/tests/bugs/modalg_4/bug8842_4 @@ -8,7 +8,7 @@ puts "" set BugNumber OCC8842 -if {[info commands testreadiges] == ""} {pload XSDRAW} +if {[info commands testreadiges] == ""} {pload XSDRAW IGES} proc myoffset {result sh val tan} { if {$tan == 1} { diff --git a/tests/bugs/modalg_4/bug8842_5 b/tests/bugs/modalg_4/bug8842_5 index c3ab3fabdb..ccf3c2c876 100755 --- a/tests/bugs/modalg_4/bug8842_5 +++ b/tests/bugs/modalg_4/bug8842_5 @@ -12,7 +12,7 @@ puts "" set BugNumber OCC8842 -if {[info commands testreadiges] == ""} {pload XSDRAW} +if {[info commands testreadiges] == ""} {pload XSDRAW IGES} proc myoffset {result sh val tan} { if {$tan == 1} { diff --git a/tests/bugs/modalg_4/bug8842_6 b/tests/bugs/modalg_4/bug8842_6 index c8d220c302..0f8411ae82 100755 --- a/tests/bugs/modalg_4/bug8842_6 +++ b/tests/bugs/modalg_4/bug8842_6 @@ -8,7 +8,7 @@ puts "" set BugNumber OCC8842 -if {[info commands testreadiges] == ""} {pload XSDRAW} +if {[info commands testreadiges] == ""} {pload XSDRAW IGES} proc myoffset {result sh val tan} { if {$tan == 1} { diff --git a/tests/bugs/modalg_4/bug8842_7 b/tests/bugs/modalg_4/bug8842_7 index 0f458a213a..e0d877be1f 100755 --- a/tests/bugs/modalg_4/bug8842_7 +++ b/tests/bugs/modalg_4/bug8842_7 @@ -8,7 +8,7 @@ puts "" set BugNumber OCC8842 -if {[info commands testreadiges] == ""} {pload XSDRAW} +if {[info commands testreadiges] == ""} {pload XSDRAW IGES} proc myoffset {result sh val tan} { if {$tan == 1} { diff --git a/tests/bugs/modalg_4/bug8842_8 b/tests/bugs/modalg_4/bug8842_8 index eac4f7ae9b..b848933829 100755 --- a/tests/bugs/modalg_4/bug8842_8 +++ b/tests/bugs/modalg_4/bug8842_8 @@ -10,7 +10,7 @@ set BugNumber OCC8842 cpulimit 500 -if {[info commands testreadiges] == ""} {pload XSDRAW} +if {[info commands testreadiges] == ""} {pload XSDRAW IGES} proc myoffset {result sh val tan} { if {$tan == 1} { diff --git a/tests/bugs/modalg_4/bug8842_9 b/tests/bugs/modalg_4/bug8842_9 index 597ab23ac8..39504a2bdb 100755 --- a/tests/bugs/modalg_4/bug8842_9 +++ b/tests/bugs/modalg_4/bug8842_9 @@ -8,7 +8,7 @@ puts "" set BugNumber OCC8842 -if {[info commands testreadiges] == ""} {pload XSDRAW} +if {[info commands testreadiges] == ""} {pload XSDRAW IGES} proc myoffset {result sh val tan} { if {$tan == 1} { diff --git a/tests/bugs/modalg_5/bug25175 b/tests/bugs/modalg_5/bug25175 index ee7c73ee82..426fc25d6a 100644 --- a/tests/bugs/modalg_5/bug25175 +++ b/tests/bugs/modalg_5/bug25175 @@ -6,7 +6,7 @@ puts "" # BRepBuilderAPI_Sewing can crash if an edge without 3D curve is presented ########################################################################### -pload XSDRAW +pload XSDRAW IGES igesread [locate_data_file bug25175_3.igs] a * diff --git a/tests/bugs/modalg_5/bug25410 b/tests/bugs/modalg_5/bug25410 index 61e53cc89a..9ab1681f7d 100755 --- a/tests/bugs/modalg_5/bug25410 +++ b/tests/bugs/modalg_5/bug25410 @@ -6,7 +6,7 @@ puts "" # Tool for extended check of validity of the curve on the surface ###################################################### -pload XSDRAW +pload XSDRAW IGES testreadiges [locate_data_file bug25410_Tank8.igs] b1 diff --git a/tests/bugs/modalg_7/bug30595_2 b/tests/bugs/modalg_7/bug30595_2 index a3ae8a39c1..638faccf6c 100644 --- a/tests/bugs/modalg_7/bug30595_2 +++ b/tests/bugs/modalg_7/bug30595_2 @@ -3,7 +3,7 @@ puts "0030595: Oriented Bounding Box seems not optimal for some shapes" puts "===============================================================" puts "" -pload XSDRAW +pload XSDRAW STEP stepread [locate_data_file bug30595_UC1.stp] s * incmesh s_1 0.1 diff --git a/tests/bugs/modalg_7/bug30829 b/tests/bugs/modalg_7/bug30829 index dcf37bf448..7724fb0b80 100644 --- a/tests/bugs/modalg_7/bug30829 +++ b/tests/bugs/modalg_7/bug30829 @@ -3,7 +3,7 @@ puts "0030829: BRepExtrema_ShapeProximity crashes with shape from STL/WRL" puts "========" puts "" -pload XSDRAW +pload XSDRAW STL box b 10 10 10 pcylinder c 5 10 diff --git a/tests/bugs/modalg_8/bug33165 b/tests/bugs/modalg_8/bug33165 index acc9a454af..a736f52788 100644 --- a/tests/bugs/modalg_8/bug33165 +++ b/tests/bugs/modalg_8/bug33165 @@ -3,7 +3,7 @@ puts "0033165: Data exchange - Instance name is not saved during writing step fi puts "====================================" puts "" -pload OCAF XDEDRAW +pload OCAF XDEDRAW STEP box b 1 1 1 reset b diff --git a/tests/bugs/moddata_2/bug22572 b/tests/bugs/moddata_2/bug22572 index da7d65a52c..f3b0399c19 100755 --- a/tests/bugs/moddata_2/bug22572 +++ b/tests/bugs/moddata_2/bug22572 @@ -8,7 +8,7 @@ puts "" set BugNumber OCC22572 -catch { pload XSDRAW } +catch { pload XSDRAW STL} vinit XProgress -t set List1 [meshfromstl result [locate_data_file bearing.stl]] diff --git a/tests/bugs/stlvrml/begin b/tests/bugs/stlvrml/begin index c45bfe9f54..5b036b1cc8 100755 --- a/tests/bugs/stlvrml/begin +++ b/tests/bugs/stlvrml/begin @@ -1,3 +1,3 @@ -pload XSDRAW +pload XSDRAW STL VRML set subgroup stlvrml diff --git a/tests/perf/fclasses/bug24947 b/tests/perf/fclasses/bug24947 index 39bb04bee2..493de128cf 100644 --- a/tests/perf/fclasses/bug24947 +++ b/tests/perf/fclasses/bug24947 @@ -1,6 +1,6 @@ # Test performance of dynamic loading / unloading of large OCCT library -set libname TKSTEP +set libname TKDESTEP switch -nocase [checkplatform] { windows {set libname ${libname}.dll} diff --git a/tests/perf/heal/bug24596_1 b/tests/perf/heal/bug24596_1 index aa242c8aa4..bd6b7ccc8b 100644 --- a/tests/perf/heal/bug24596_1 +++ b/tests/perf/heal/bug24596_1 @@ -6,7 +6,7 @@ puts "" ## Slow import of IGES data ############################### -pload QAcommands +pload QAcommands IGES if { [regexp {Debug mode} [dversion]] } { cpulimit 8500 diff --git a/tests/perf/heal/bug24596_2 b/tests/perf/heal/bug24596_2 index aeedf833d1..d925891073 100644 --- a/tests/perf/heal/bug24596_2 +++ b/tests/perf/heal/bug24596_2 @@ -6,7 +6,7 @@ puts "" ## Slow import of IGES data ############################### -pload QAcommands +pload QAcommands IGES if { [regexp {Debug mode} [dversion]] } { cpulimit 8500 diff --git a/tests/perf/moddata/bug25487_1 b/tests/perf/moddata/bug25487_1 index fd62e6caa9..0b1655ca58 100644 --- a/tests/perf/moddata/bug25487_1 +++ b/tests/perf/moddata/bug25487_1 @@ -6,7 +6,7 @@ puts "" # Extrema_GenExtPS needs to be optimized ########################################## -pload DATAEXCHANGEKERNEL +pload DATAEXCHANGEKERNEL STEP # Restore testing shape and get timing characteristics for operation stepread dchrono perf_h restart diff --git a/tests/perf/moddata/bug25487_2 b/tests/perf/moddata/bug25487_2 index 75880354a3..980af98e78 100644 --- a/tests/perf/moddata/bug25487_2 +++ b/tests/perf/moddata/bug25487_2 @@ -8,7 +8,7 @@ puts "" cpulimit 1000 -pload DATAEXCHANGEKERNEL +pload DATAEXCHANGEKERNEL STEP # Restore testing shape and get timing characteristics for operation stepread dchrono perf_h restart diff --git a/tests/perf/moddata/bug27048_2 b/tests/perf/moddata/bug27048_2 index 386b3fd011..b303210168 100644 --- a/tests/perf/moddata/bug27048_2 +++ b/tests/perf/moddata/bug27048_2 @@ -6,7 +6,7 @@ puts "" # Recalculation of BSpline cache causes a performance problems ############################################################################ -pload XSDRAW +pload XSDRAW STEP dchrono t restart testreadstep [locate_data_file bug27048.stp] result diff --git a/tests/v3d/bugs/bug23407_1 b/tests/v3d/bugs/bug23407_1 index ade491da38..45b61a3751 100644 --- a/tests/v3d/bugs/bug23407_1 +++ b/tests/v3d/bugs/bug23407_1 @@ -3,7 +3,7 @@ puts "CR23407: Draw face outlines for XDE objects" puts "============" puts "" -pload XDEDRAW VISUALIZATION +pload XDEDRAW VISUALIZATION STEP XNewDoc Doc1 ReadStep Doc1 [locate_data_file screw.step] diff --git a/tests/v3d/mesh/begin b/tests/v3d/mesh/begin index 2d57bea52a..5cf89d2905 100644 --- a/tests/v3d/mesh/begin +++ b/tests/v3d/mesh/begin @@ -1,2 +1,2 @@ -pload MODELING VISUALIZATION XSDRAW +pload MODELING VISUALIZATION XSDRAW STL vinit View1 diff --git a/tests/vselect/bugs/bug26566 b/tests/vselect/bugs/bug26566 index 982bd157b6..c0d6010396 100644 --- a/tests/vselect/bugs/bug26566 +++ b/tests/vselect/bugs/bug26566 @@ -3,7 +3,7 @@ puts "OCC26566: Visualization - incorrect highlight after selection of owners wi puts "========" puts "" -pload VISUALIZATION MODELING XSDRAW +pload VISUALIZATION MODELING XSDRAW STL vinit View1 # create an object with auto-highlight disabled diff --git a/tests/vselect/face/G2 b/tests/vselect/face/G2 index 20d68ba069..18b7384482 100644 --- a/tests/vselect/face/G2 +++ b/tests/vselect/face/G2 @@ -2,7 +2,7 @@ puts "========" puts "0029356: Modeling Algorithms - GCPnts_TangentialDeflection hangs on specific curve" puts "========" -if {[info commands testreadiges] == ""} {pload XSDRAW} +if {[info commands testreadiges] == ""} {pload IGES} testreadiges [locate_data_file bug29356.igs] a vinit View1 diff --git a/tests/vselect/face/G3 b/tests/vselect/face/G3 index 5f6968f5e6..993ba57c26 100644 --- a/tests/vselect/face/G3 +++ b/tests/vselect/face/G3 @@ -1,6 +1,6 @@ # isolines on infinite prism based on spline edge with poles closed to 1.4e+6 -if {[info commands testreadiges] == ""} {pload XSDRAW} +if {[info commands testreadiges] == ""} {pload IGES} testreadiges [locate_data_file bug29356.igs] a mksurface s a diff --git a/tests/vselect/face/G4 b/tests/vselect/face/G4 index da03c8eb1c..b362c51040 100644 --- a/tests/vselect/face/G4 +++ b/tests/vselect/face/G4 @@ -1,6 +1,6 @@ # isolines on finite prism based on spline edge with poles closed to 1.4e+6 -if {[info commands testreadiges] == ""} {pload XSDRAW} +if {[info commands testreadiges] == ""} {pload IGES} testreadiges [locate_data_file bug29356.igs] a mksurface s a diff --git a/tools/TKDFBrowser/EXTERNLIB b/tools/TKDFBrowser/EXTERNLIB index ceadac032c..37812a6ca3 100644 --- a/tools/TKDFBrowser/EXTERNLIB +++ b/tools/TKDFBrowser/EXTERNLIB @@ -13,7 +13,7 @@ TKVCAF TKView TKXSBase TKXCAF -TKXDESTEP +TKDESTEP TKXmlXCAF TKXml TKXmlL From 0435edfe540876baf3daae80b9cefe194ca36c3d Mon Sep 17 00:00:00 2001 From: ichesnok Date: Tue, 12 Sep 2023 11:58:55 +0100 Subject: [PATCH 517/639] 0033474: Data Exchange - Implement stream reading into RWMesh interface Stream usage as parameter --- src/RWGltf/RWGltf_CafReader.cxx | 35 ++++++++++--------- src/RWGltf/RWGltf_CafReader.hxx | 3 +- src/RWMesh/RWMesh_CafReader.cxx | 16 ++++++++- src/RWMesh/RWMesh_CafReader.hxx | 56 +++++++++++++++++++++++++++---- src/RWObj/RWObj_CafReader.cxx | 7 ++-- src/RWObj/RWObj_CafReader.hxx | 3 +- src/RWObj/RWObj_Reader.cxx | 44 +++++------------------- src/RWObj/RWObj_Reader.hxx | 40 ++++++++++++++++++---- src/VrmlAPI/VrmlAPI_CafReader.cxx | 9 +++-- src/VrmlAPI/VrmlAPI_CafReader.hxx | 10 +++--- src/VrmlData/VrmlData_Scene.cxx | 4 +++ 11 files changed, 144 insertions(+), 83 deletions(-) diff --git a/src/RWGltf/RWGltf_CafReader.cxx b/src/RWGltf/RWGltf_CafReader.cxx index e50e9426dc..6db997df3d 100644 --- a/src/RWGltf/RWGltf_CafReader.cxx +++ b/src/RWGltf/RWGltf_CafReader.cxx @@ -182,16 +182,15 @@ RWGltf_CafReader::RWGltf_CafReader() // Function : performMesh // Purpose : //================================================================ -Standard_Boolean RWGltf_CafReader::performMesh (const TCollection_AsciiString& theFile, +Standard_Boolean RWGltf_CafReader::performMesh (std::istream& theStream, + const TCollection_AsciiString& theFile, const Message_ProgressRange& theProgress, const Standard_Boolean theToProbe) { - Message_ProgressScope aPSentry (theProgress, "Reading glTF", 2); + Message_ProgressScope aPSentry(theProgress, "Reading glTF", 2); aPSentry.Show(); - const Handle(OSD_FileSystem)& aFileSystem = OSD_FileSystem::DefaultFileSystem(); - std::shared_ptr aFile = aFileSystem->OpenIStream (theFile, std::ios::in | std::ios::binary); - if (aFile.get() == NULL || !aFile->good()) + if (!theStream.good()) { Message::SendFail (TCollection_AsciiString ("File '") + theFile + "' is not found"); return false; @@ -199,7 +198,7 @@ Standard_Boolean RWGltf_CafReader::performMesh (const TCollection_AsciiString& t bool isBinaryFile = false; char aGlbHeader[12] = {}; - aFile->read (aGlbHeader, sizeof (aGlbHeader)); + theStream.read (aGlbHeader, sizeof (aGlbHeader)); int64_t aBinBodyOffset = 0; int64_t aBinBodyLen = 0; int64_t aJsonBodyOffset = 0; @@ -218,7 +217,7 @@ Standard_Boolean RWGltf_CafReader::performMesh (const TCollection_AsciiString& t } char aHeader1[8] = {}; - aFile->read (aHeader1, sizeof (aHeader1)); + theStream.read (aHeader1, sizeof (aHeader1)); const uint32_t* aSceneLen = (const uint32_t* )(aHeader1 + 0); const uint32_t* aSceneFormat = (const uint32_t* )(aHeader1 + 4); @@ -240,16 +239,16 @@ Standard_Boolean RWGltf_CafReader::performMesh (const TCollection_AsciiString& t Message::SendWarning (TCollection_AsciiString ("File '") + theFile + "' is written using unknown version " + int(*aVer)); } - for (int aChunkIter = 0; !aFile->eof() && aChunkIter < 2; ++aChunkIter) + for (int aChunkIter = 0; !theStream.eof() && aChunkIter < 2; ++aChunkIter) { char aChunkHeader2[8] = {}; - if (int64_t (aFile->tellg()) + int64_t (sizeof (aChunkHeader2)) > int64_t (*aLen)) + if (int64_t (theStream.tellg()) + int64_t (sizeof (aChunkHeader2)) > int64_t (*aLen)) { break; } - aFile->read (aChunkHeader2, sizeof (aChunkHeader2)); - if (!aFile->good()) + theStream.read (aChunkHeader2, sizeof (aChunkHeader2)); + if (!theStream.good()) { Message::SendFail (TCollection_AsciiString ("File '") + theFile + "' is written using unsupported format"); return false; @@ -259,26 +258,26 @@ Standard_Boolean RWGltf_CafReader::performMesh (const TCollection_AsciiString& t const uint32_t* aChunkType = (const uint32_t* )(aChunkHeader2 + 4); if (*aChunkType == 0x4E4F534A) { - aJsonBodyOffset = int64_t (aFile->tellg()); + aJsonBodyOffset = int64_t (theStream.tellg()); aJsonBodyLen = int64_t (*aChunkLen); } else if (*aChunkType == 0x004E4942) { - aBinBodyOffset = int64_t (aFile->tellg()); + aBinBodyOffset = int64_t (theStream.tellg()); aBinBodyLen = int64_t (*aChunkLen); } if (*aChunkLen != 0) { - aFile->seekg (*aChunkLen, std::ios_base::cur); + theStream.seekg (*aChunkLen, std::ios_base::cur); } } - aFile->seekg ((std::streamoff )aJsonBodyOffset, std::ios_base::beg); + theStream.seekg ((std::streamoff )aJsonBodyOffset, std::ios_base::beg); } } else { - aFile->seekg (0, std::ios_base::beg); + theStream.seekg (0, std::ios_base::beg); } TCollection_AsciiString anErrPrefix = TCollection_AsciiString ("File '") + theFile + "' defines invalid glTF!\n"; @@ -303,10 +302,10 @@ Standard_Boolean RWGltf_CafReader::performMesh (const TCollection_AsciiString& t #ifdef HAVE_RAPIDJSON rapidjson::ParseResult aRes; - rapidjson::IStreamWrapper aFileStream (*aFile); + rapidjson::IStreamWrapper aFileStream (theStream); if (isBinaryFile) { - aRes = aDoc.ParseStream, rapidjson::IStreamWrapper> (aFileStream); + aRes = aDoc.ParseStream, rapidjson::IStreamWrapper>(aFileStream); } else { diff --git a/src/RWGltf/RWGltf_CafReader.hxx b/src/RWGltf/RWGltf_CafReader.hxx index 8b2d811649..905e59958a 100644 --- a/src/RWGltf/RWGltf_CafReader.hxx +++ b/src/RWGltf/RWGltf_CafReader.hxx @@ -83,7 +83,8 @@ public: protected: //! Read the mesh from specified file. - Standard_EXPORT virtual Standard_Boolean performMesh (const TCollection_AsciiString& theFile, + Standard_EXPORT virtual Standard_Boolean performMesh (std::istream& theStream, + const TCollection_AsciiString& theFile, const Message_ProgressRange& theProgress, const Standard_Boolean theToProbe) Standard_OVERRIDE; diff --git a/src/RWMesh/RWMesh_CafReader.cxx b/src/RWMesh/RWMesh_CafReader.cxx index 4164e4496f..d1086ff15b 100644 --- a/src/RWMesh/RWMesh_CafReader.cxx +++ b/src/RWMesh/RWMesh_CafReader.cxx @@ -98,6 +98,20 @@ TopoDS_Shape RWMesh_CafReader::SingleShape() const Standard_Boolean RWMesh_CafReader::perform (const TCollection_AsciiString& theFile, const Message_ProgressRange& theProgress, const Standard_Boolean theToProbe) +{ + std::ifstream aStream; + OSD_OpenStream(aStream, theFile, std::ios_base::in | std::ios_base::binary); + return perform(aStream, theFile, theProgress, theToProbe); +} + +// ======================================================================= +// function : perform +// purpose : +// ======================================================================= +Standard_Boolean RWMesh_CafReader::perform (std::istream& theStream, + const TCollection_AsciiString& theFile, + const Message_ProgressRange& theProgress, + const Standard_Boolean theToProbe) { Standard_Integer aNewRootsLower = 1; if (!myXdeDoc.IsNull()) @@ -109,7 +123,7 @@ Standard_Boolean RWMesh_CafReader::perform (const TCollection_AsciiString& theFi OSD_Timer aLoadingTimer; aLoadingTimer.Start(); - const Standard_Boolean isDone = performMesh (theFile, theProgress, theToProbe); + const Standard_Boolean isDone = performMesh (theStream, theFile, theProgress, theToProbe); if (theToProbe || theProgress.UserBreak()) { return isDone; diff --git a/src/RWMesh/RWMesh_CafReader.hxx b/src/RWMesh/RWMesh_CafReader.hxx index 3be45e7d21..5e93d60b3e 100644 --- a/src/RWMesh/RWMesh_CafReader.hxx +++ b/src/RWMesh/RWMesh_CafReader.hxx @@ -16,6 +16,7 @@ #define _RWMesh_CafReader_HeaderFile #include +#include #include #include #include @@ -148,12 +149,22 @@ public: public: - //! Read the data from specified file. + //! Open stream and pass it to Perform method. //! The Document instance should be set beforehand. bool Perform (const TCollection_AsciiString& theFile, const Message_ProgressRange& theProgress) { - return perform (theFile, theProgress, Standard_False); + std::ifstream aStream; + OSD_OpenStream(aStream, theFile, std::ios_base::in | std::ios_base::binary); + return Perform(aStream, theProgress, theFile); + } + + //! Read the data from specified file. + bool Perform (std::istream& theStream, + const Message_ProgressRange& theProgress, + const TCollection_AsciiString& theFile = "") + { + return perform(theStream, theFile, theProgress, Standard_False); } //! Return extended status flags. @@ -171,19 +182,28 @@ public: //! Return metadata map. const TColStd_IndexedDataMapOfStringString& Metadata() const { return myMetadata; } + //! Open stream and pass it to ProbeHeader method. + Standard_Boolean ProbeHeader (const TCollection_AsciiString& theFile, + const Message_ProgressRange& theProgress = Message_ProgressRange()) + { + std::ifstream aStream; + OSD_OpenStream(aStream, theFile, std::ios_base::in | std::ios_base::binary); + return ProbeHeader (aStream, theFile, theProgress); + } + //! Read the header data from specified file without reading entire model. //! The main purpose is collecting metadata and external references - for copying model into a new location, for example. //! Can be NOT implemented (unsupported by format / reader). - Standard_Boolean ProbeHeader (const TCollection_AsciiString& theFile, + Standard_Boolean ProbeHeader (std::istream& theStream, + const TCollection_AsciiString& theFile = "", const Message_ProgressRange& theProgress = Message_ProgressRange()) { - return perform (theFile, theProgress, Standard_True); + return perform(theStream, theFile, theProgress, Standard_True); } protected: - //! Read the data from specified file. - //! Default implementation calls performMesh() and fills XDE document from collected shapes. + //! Open stream and pass it to Perform method. //! @param theFile file to read //! @param optional progress indicator //! @param theToProbe flag indicating that mesh data should be skipped and only basing information to be read @@ -191,8 +211,30 @@ protected: const Message_ProgressRange& theProgress, const Standard_Boolean theToProbe); - //! Read the mesh from specified file - interface to be implemented by sub-classes. + //! Read the data from specified file. + //! Default implementation calls performMesh() and fills XDE document from collected shapes. + //! @param theStream input stream + //! @param theFile path of additional files + //! @param optional progress indicator + //! @param theToProbe flag indicating that mesh data should be skipped and only basing information to be read + Standard_EXPORT virtual Standard_Boolean perform (std::istream& theStream, + const TCollection_AsciiString& theFile, + const Message_ProgressRange& theProgress, + const Standard_Boolean theToProbe); + + //! Read the mesh from specified file Standard_EXPORT virtual Standard_Boolean performMesh (const TCollection_AsciiString& theFile, + const Message_ProgressRange& theProgress, + const Standard_Boolean theToProbe) + { + std::ifstream aStream; + OSD_OpenStream(aStream, theFile, std::ios_base::in | std::ios_base::binary); + return performMesh(aStream, theFile, theProgress, theToProbe); + } + + //! Read the mesh from specified file - interface to be implemented by sub-classes. + Standard_EXPORT virtual Standard_Boolean performMesh (std::istream& theStream, + const TCollection_AsciiString& theFile, const Message_ProgressRange& theProgress, const Standard_Boolean theToProbe) = 0; diff --git a/src/RWObj/RWObj_CafReader.cxx b/src/RWObj/RWObj_CafReader.cxx index 84d376d83a..83cf2738f9 100644 --- a/src/RWObj/RWObj_CafReader.cxx +++ b/src/RWObj/RWObj_CafReader.cxx @@ -94,7 +94,8 @@ Handle(RWObj_TriangulationReader) RWObj_CafReader::createReaderContext() // Function : performMesh // Purpose : //================================================================ -Standard_Boolean RWObj_CafReader::performMesh (const TCollection_AsciiString& theFile, +Standard_Boolean RWObj_CafReader::performMesh (std::istream& theStream, + const TCollection_AsciiString& theFile, const Message_ProgressRange& theProgress, const Standard_Boolean theToProbe) { @@ -107,11 +108,11 @@ Standard_Boolean RWObj_CafReader::performMesh (const TCollection_AsciiString& th Standard_Boolean isDone = Standard_False; if (theToProbe) { - isDone = aCtx->Probe (theFile.ToCString(), theProgress); + isDone = aCtx->Probe (theStream, theFile, theProgress); } else { - isDone = aCtx->Read (theFile.ToCString(), theProgress); + isDone = aCtx->Read (theStream, theFile, theProgress); } if (!aCtx->FileComments().IsEmpty()) { diff --git a/src/RWObj/RWObj_CafReader.hxx b/src/RWObj/RWObj_CafReader.hxx index 581f35917f..45772d064f 100644 --- a/src/RWObj/RWObj_CafReader.hxx +++ b/src/RWObj/RWObj_CafReader.hxx @@ -35,7 +35,8 @@ public: protected: //! Read the mesh from specified file. - Standard_EXPORT virtual Standard_Boolean performMesh (const TCollection_AsciiString& theFile, + Standard_EXPORT virtual Standard_Boolean performMesh (std::istream& theStream, + const TCollection_AsciiString& theFile, const Message_ProgressRange& theProgress, const Standard_Boolean theToProbe) Standard_OVERRIDE; diff --git a/src/RWObj/RWObj_Reader.cxx b/src/RWObj/RWObj_Reader.cxx index 5a5b8c1a88..a3a4f4d27f 100644 --- a/src/RWObj/RWObj_Reader.cxx +++ b/src/RWObj/RWObj_Reader.cxx @@ -47,35 +47,6 @@ namespace // The length of buffer to read (in bytes) static const size_t THE_BUFFER_SIZE = 4 * 1024; - //! Simple wrapper. - struct RWObj_ReaderFile - { - FILE* File; - int64_t FileLen; - - //! Constructor opening the file. - RWObj_ReaderFile (const TCollection_AsciiString& theFile) - : File (OSD_OpenFile (theFile.ToCString(), "rb")), - FileLen (0) - { - if (this->File != NULL) - { - // determine length of file - ::fseek64 (this->File, 0, SEEK_END); - FileLen = ::ftell64 (this->File); - ::fseek64 (this->File, 0, SEEK_SET); - } - } - - //! Destructor closing the file. - ~RWObj_ReaderFile() - { - if (File != NULL) - { - ::fclose (File); - } - } - }; //! Return TRUE if given polygon has clockwise node order. static bool isClockwisePolygon (const Handle(BRepMesh_DataStructureOfDelaun)& theMesh, @@ -115,7 +86,8 @@ RWObj_Reader::RWObj_Reader() // Function : read // Purpose : // ================================================================ -Standard_Boolean RWObj_Reader::read (const TCollection_AsciiString& theFile, +Standard_Boolean RWObj_Reader::read (std::istream& theStream, + const TCollection_AsciiString& theFile, const Message_ProgressRange& theProgress, const Standard_Boolean theToProbe) { @@ -140,15 +112,16 @@ Standard_Boolean RWObj_Reader::read (const TCollection_AsciiString& theFile, myCurrElem.resize (1024, -1); Standard_CLocaleSentry aLocaleSentry; - RWObj_ReaderFile aFile (theFile); - if (aFile.File == NULL) + if (!theStream.good()) { Message::SendFail (TCollection_AsciiString ("Error: file '") + theFile + "' is not found"); return Standard_False; } // determine length of file - const int64_t aFileLen = aFile.FileLen; + theStream.seekg(0, theStream.end); + const int64_t aFileLen = theStream.tellg(); + theStream.seekg(0, theStream.beg); if (aFileLen <= 0L) { Message::SendFail (TCollection_AsciiString ("Error: file '") + theFile + "' is empty"); @@ -158,12 +131,11 @@ Standard_Boolean RWObj_Reader::read (const TCollection_AsciiString& theFile, Standard_ReadLineBuffer aBuffer (THE_BUFFER_SIZE); aBuffer.SetMultilineMode (true); - const Standard_Integer aNbMiBTotal = Standard_Integer(aFileLen / (1024 * 1024)); + const Standard_Integer aNbMiBTotal = Standard_Integer(aFileLen / (1024 * 1024)); Standard_Integer aNbMiBPassed = 0; Message_ProgressScope aPS (theProgress, "Reading text OBJ file", aNbMiBTotal); OSD_Timer aTimer; aTimer.Start(); - bool isStart = true; int64_t aPosition = 0; size_t aLineLen = 0; @@ -171,7 +143,7 @@ Standard_Boolean RWObj_Reader::read (const TCollection_AsciiString& theFile, const char* aLine = NULL; for (;;) { - aLine = aBuffer.ReadLine (aFile.File, aLineLen, aReadBytes); + aLine = aBuffer.ReadLine (theStream, aLineLen, aReadBytes); if (aLine == NULL) { break; diff --git a/src/RWObj/RWObj_Reader.hxx b/src/RWObj/RWObj_Reader.hxx index 4b91d68bd2..d652a0ef8e 100644 --- a/src/RWObj/RWObj_Reader.hxx +++ b/src/RWObj/RWObj_Reader.hxx @@ -23,7 +23,7 @@ #include #include #include - +#include #include #include #include @@ -48,25 +48,51 @@ public: //! Empty constructor. Standard_EXPORT RWObj_Reader(); + //! Open stream and pass it to Read method + //! Returns true if success, false on error. + Standard_Boolean Read (const TCollection_AsciiString& theFile, + const Message_ProgressRange& theProgress) + { + std::ifstream aStream; + OSD_OpenStream(aStream, theFile, std::ios_base::in | std::ios_base::binary); + return Read(aStream, theFile, theProgress); + } + //! Reads data from OBJ file. //! Unicode paths can be given in UTF-8 encoding. //! Returns true if success, false on error or user break. - Standard_Boolean Read (const TCollection_AsciiString& theFile, + Standard_Boolean Read (std::istream& theStream, + const TCollection_AsciiString& theFile, const Message_ProgressRange& theProgress) { - return read (theFile, theProgress, Standard_False); + return read(theStream, theFile, theProgress, Standard_False); + } + + //! Open stream and pass it to Probe method. + //! @param theFile path to the file + //! @param theProgress progress indicator + //! @return TRUE if success, FALSE on error or user break. + //! @sa FileComments(), ExternalFiles(), NbProbeNodes(), NbProbeElems(). + Standard_Boolean Probe (const TCollection_AsciiString& theFile, + const Message_ProgressRange& theProgress) + { + std::ifstream aStream; + OSD_OpenStream(aStream, theFile, std::ios_base::in | std::ios_base::binary); + return Probe(aStream, theFile, theProgress); } //! Probe data from OBJ file (comments, external references) without actually reading mesh data. //! Although mesh data will not be collected, the full file content will be parsed, due to OBJ format limitations. + //! @param theStream input stream //! @param theFile path to the file //! @param theProgress progress indicator //! @return TRUE if success, FALSE on error or user break. //! @sa FileComments(), ExternalFiles(), NbProbeNodes(), NbProbeElems(). - Standard_Boolean Probe (const TCollection_AsciiString& theFile, + Standard_Boolean Probe (std::istream& theStream, + const TCollection_AsciiString& theFile, const Message_ProgressRange& theProgress) { - return read (theFile, theProgress, Standard_True); + return read(theStream, theFile, theProgress, Standard_True); } //! Returns file comments (lines starting with # at the beginning of file). @@ -107,7 +133,8 @@ protected: //! Reads data from OBJ file. //! Unicode paths can be given in UTF-8 encoding. //! Returns true if success, false on error or user break. - Standard_EXPORT Standard_Boolean read (const TCollection_AsciiString& theFile, + Standard_EXPORT Standard_Boolean read (std::istream& theStream, + const TCollection_AsciiString& theFile, const Message_ProgressRange& theProgress, const Standard_Boolean theToProbe); @@ -355,7 +382,6 @@ protected: RWObj_SubMesh myActiveSubMesh; //!< active sub-mesh definition std::vector myCurrElem; //!< indices for the current element - }; #endif // _RWObj_Reader_HeaderFile diff --git a/src/VrmlAPI/VrmlAPI_CafReader.cxx b/src/VrmlAPI/VrmlAPI_CafReader.cxx index 523442da81..963ecce06a 100644 --- a/src/VrmlAPI/VrmlAPI_CafReader.cxx +++ b/src/VrmlAPI/VrmlAPI_CafReader.cxx @@ -89,14 +89,13 @@ namespace // function : performMesh // purpose : //======================================================================= -bool VrmlAPI_CafReader::performMesh(const TCollection_AsciiString& theFile, +bool VrmlAPI_CafReader::performMesh(std::istream& theStream, + const TCollection_AsciiString& theFile, const Message_ProgressRange& theProgress, const Standard_Boolean theToProbe) { (void)theProgress; - Handle(OSD_FileSystem) aFile = OSD_FileSystem::DefaultFileSystem(); - std::shared_ptr aFileStream = aFile->OpenIStream(theFile, std::ios::in | std::ios::binary); - if (aFileStream.get() == nullptr || !aFileStream->good()) + if (!theStream.good()) { Message::SendFail() << "Error in VrmlAPI_CafReader: file '" << theFile << "' is not found"; return false; @@ -115,7 +114,7 @@ bool VrmlAPI_CafReader::performMesh(const TCollection_AsciiString& theFile, VrmlData_Scene aScene; aScene.SetLinearScale(FileLengthUnit()); aScene.SetVrmlDir(aFolder); - aScene << *aFileStream; + aScene << theStream; VrmlData_DataMapOfShapeAppearance aShapeAppMap; TopoDS_Shape aShape = aScene.GetShape(aShapeAppMap); diff --git a/src/VrmlAPI/VrmlAPI_CafReader.hxx b/src/VrmlAPI/VrmlAPI_CafReader.hxx index 87af90d064..eac8397c0d 100644 --- a/src/VrmlAPI/VrmlAPI_CafReader.hxx +++ b/src/VrmlAPI/VrmlAPI_CafReader.hxx @@ -24,13 +24,15 @@ class VrmlAPI_CafReader : public RWMesh_CafReader protected: //! Read the mesh data from specified file. - //! @param theFile file to read + //! @param theStream input stream + //! @param theFile path of additional files //! @param theProgress progress indicator //! @param theToProbe flag for probing file without complete reading. Not supported. //! @return false when theToProbe is set to true or reading has completed with error. - Standard_EXPORT virtual Standard_Boolean performMesh(const TCollection_AsciiString& theFile, - const Message_ProgressRange& theProgress, - const Standard_Boolean theToProbe) Standard_OVERRIDE; + Standard_EXPORT virtual Standard_Boolean performMesh (std::istream& theStream, + const TCollection_AsciiString& theFile, + const Message_ProgressRange& theProgress, + const Standard_Boolean theToProbe) Standard_OVERRIDE; }; diff --git a/src/VrmlData/VrmlData_Scene.cxx b/src/VrmlData/VrmlData_Scene.cxx index 538a35c76e..01adb4d2b0 100644 --- a/src/VrmlData/VrmlData_Scene.cxx +++ b/src/VrmlData/VrmlData_Scene.cxx @@ -170,6 +170,10 @@ Standard_OStream& operator << (Standard_OStream& theOutput, void VrmlData_Scene::SetVrmlDir (const TCollection_ExtendedString& theDir) { TCollection_ExtendedString& aDir = myVrmlDir.Append (theDir); + if (aDir.IsEmpty()) + { + return; + } const Standard_ExtCharacter aTerminator = aDir.Value(aDir.Length()); if (aTerminator != Standard_ExtCharacter('\\') && aTerminator != Standard_ExtCharacter('/')) From b9fbc699b5e5c7585682f87f6915c03cf937db5e Mon Sep 17 00:00:00 2001 From: ichesnok Date: Mon, 25 Sep 2023 11:23:08 +0100 Subject: [PATCH 518/639] 0033483: Data Exchange - Static_Interface local instance for the model StepData_StepParameters class created and used instead of Interface_Static --- src/QABugs/QABugs_11.cxx | 2 + .../STEPCAFControl_ActorWrite.cxx | 5 +- .../STEPCAFControl_ActorWrite.hxx | 3 +- .../STEPCAFControl_ConfigurationNode.cxx | 28 +-- .../STEPCAFControl_ConfigurationNode.hxx | 143 +----------- .../STEPCAFControl_Provider.cxx | 154 ++----------- .../STEPCAFControl_Provider.hxx | 12 -- src/STEPCAFControl/STEPCAFControl_Reader.cxx | 61 +++++- src/STEPCAFControl/STEPCAFControl_Reader.hxx | 22 +- src/STEPCAFControl/STEPCAFControl_Writer.cxx | 100 +++++++-- src/STEPCAFControl/STEPCAFControl_Writer.hxx | 44 ++++ .../STEPConstruct_ContextTool.cxx | 16 +- .../STEPConstruct_ContextTool.hxx | 4 +- src/STEPConstruct/STEPConstruct_Part.cxx | 8 +- src/STEPConstruct/STEPConstruct_Part.hxx | 6 +- src/STEPConstruct/STEPConstruct_Styles.cxx | 5 +- src/STEPConstruct/STEPConstruct_Styles.hxx | 4 +- .../STEPConstruct_UnitContext.cxx | 4 +- .../STEPConstruct_UnitContext.hxx | 2 + .../STEPConstruct_ValidationProps.cxx | 6 +- src/STEPControl/STEPControl_ActorRead.cxx | 86 +++++--- src/STEPControl/STEPControl_ActorRead.hxx | 13 +- src/STEPControl/STEPControl_ActorWrite.cxx | 60 +++--- src/STEPControl/STEPControl_ActorWrite.hxx | 3 +- src/STEPControl/STEPControl_Controller.cxx | 21 +- src/STEPControl/STEPControl_Controller.hxx | 5 +- src/STEPControl/STEPControl_Reader.cxx | 169 ++++++++++++++- src/STEPControl/STEPControl_Reader.hxx | 25 ++- src/STEPControl/STEPControl_Writer.cxx | 23 ++ src/STEPControl/STEPControl_Writer.hxx | 9 + src/StepData/FILES | 2 + src/StepData/StepData_ConfParameters.cxx | 90 ++++++++ src/StepData/StepData_ConfParameters.hxx | 191 ++++++++++++++++ src/StepData/StepData_StepModel.cxx | 4 +- src/StepData/StepData_StepModel.hxx | 10 +- src/StepSelect/StepSelect_WorkLibrary.cxx | 8 +- src/StepToTopoDS/StepToTopoDS_Builder.cxx | 24 ++- .../StepToTopoDS_TranslateCompositeCurve.cxx | 4 +- .../StepToTopoDS_TranslateEdgeLoop.cxx | 6 +- .../TopoDSToStep_MakeBrepWithVoids.cxx | 8 +- .../TopoDSToStep_MakeFacetedBrep.cxx | 13 +- ...ToStep_MakeFacetedBrepAndBrepWithVoids.cxx | 6 +- .../TopoDSToStep_MakeGeometricCurveSet.cxx | 4 +- .../TopoDSToStep_MakeManifoldSolidBrep.cxx | 7 +- ...opoDSToStep_MakeShellBasedSurfaceModel.cxx | 22 +- .../TopoDSToStep_MakeStepEdge.cxx | 4 +- .../TopoDSToStep_MakeStepFace.cxx | 3 +- .../TopoDSToStep_MakeStepVertex.cxx | 3 +- src/TopoDSToStep/TopoDSToStep_Tool.cxx | 21 +- src/TopoDSToStep/TopoDSToStep_Tool.hxx | 11 +- src/XSControl/XSControl_Reader.hxx | 4 +- src/XSDRAWSTEP/XSDRAWSTEP.cxx | 203 ++++++++++-------- 52 files changed, 1110 insertions(+), 581 deletions(-) create mode 100644 src/StepData/StepData_ConfParameters.cxx create mode 100644 src/StepData/StepData_ConfParameters.hxx diff --git a/src/QABugs/QABugs_11.cxx b/src/QABugs/QABugs_11.cxx index 7c95a8b9e0..e84883a962 100644 --- a/src/QABugs/QABugs_11.cxx +++ b/src/QABugs/QABugs_11.cxx @@ -91,6 +91,8 @@ #include #include #include +#include +#include #if ! defined(_WIN32) extern ViewerTest_DoubleMapOfInteractiveAndName& GetMapOfAIS(); diff --git a/src/STEPCAFControl/STEPCAFControl_ActorWrite.cxx b/src/STEPCAFControl/STEPCAFControl_ActorWrite.cxx index 080ffe77b5..5968e3b72a 100644 --- a/src/STEPCAFControl/STEPCAFControl_ActorWrite.cxx +++ b/src/STEPCAFControl/STEPCAFControl_ActorWrite.cxx @@ -63,9 +63,10 @@ void STEPCAFControl_ActorWrite::RegisterAssembly (const TopoDS_Shape &S) //purpose : //======================================================================= -Standard_Boolean STEPCAFControl_ActorWrite::IsAssembly (TopoDS_Shape &S) const +Standard_Boolean STEPCAFControl_ActorWrite::IsAssembly (const Handle(StepData_StepModel)& theModel, + TopoDS_Shape &S) const { - if ( myStdMode ) return STEPControl_ActorWrite::IsAssembly ( S ); + if ( myStdMode ) return STEPControl_ActorWrite::IsAssembly ( theModel, S ); return myMap.Contains ( S ); } diff --git a/src/STEPCAFControl/STEPCAFControl_ActorWrite.hxx b/src/STEPCAFControl/STEPCAFControl_ActorWrite.hxx index 2d0946ca45..50e8360e67 100644 --- a/src/STEPCAFControl/STEPCAFControl_ActorWrite.hxx +++ b/src/STEPCAFControl/STEPCAFControl_ActorWrite.hxx @@ -39,7 +39,8 @@ public: //! Check whether shape S is assembly //! Returns True if shape is registered in assemblies map - Standard_EXPORT virtual Standard_Boolean IsAssembly (TopoDS_Shape& S) const Standard_OVERRIDE; + Standard_EXPORT virtual Standard_Boolean IsAssembly (const Handle(StepData_StepModel)& theModel, + TopoDS_Shape& S) const Standard_OVERRIDE; //! Set standard mode of work //! In standard mode Actor (default) behaves exactly as its diff --git a/src/STEPCAFControl/STEPCAFControl_ConfigurationNode.cxx b/src/STEPCAFControl/STEPCAFControl_ConfigurationNode.cxx index 000077cb1e..20b2cffba5 100644 --- a/src/STEPCAFControl/STEPCAFControl_ConfigurationNode.cxx +++ b/src/STEPCAFControl/STEPCAFControl_ConfigurationNode.cxx @@ -57,23 +57,23 @@ bool STEPCAFControl_ConfigurationNode::Load(const Handle(DE_ConfigurationContext { TCollection_AsciiString aScope = THE_CONFIGURATION_SCOPE() + "." + GetFormat() + "." + GetVendor(); - InternalParameters.ReadBSplineContinuity = (ReadMode_BSplineContinuity) + InternalParameters.ReadBSplineContinuity = (StepData_ConfParameters::ReadMode_BSplineContinuity) theResource->IntegerVal("read.iges.bspline.continuity", InternalParameters.ReadBSplineContinuity, aScope); - InternalParameters.ReadPrecisionMode = (ReadMode_Precision) + InternalParameters.ReadPrecisionMode = (StepData_ConfParameters::ReadMode_Precision) theResource->IntegerVal("read.precision.mode", InternalParameters.ReadPrecisionMode, aScope); InternalParameters.ReadPrecisionVal = theResource->RealVal("read.precision.val", InternalParameters.ReadPrecisionVal, aScope); - InternalParameters.ReadMaxPrecisionMode = (ReadMode_MaxPrecision) + InternalParameters.ReadMaxPrecisionMode = (StepData_ConfParameters::ReadMode_MaxPrecision) theResource->IntegerVal("read.maxprecision.mode", InternalParameters.ReadMaxPrecisionMode, aScope); InternalParameters.ReadMaxPrecisionVal = theResource->RealVal("read.maxprecision.val", InternalParameters.ReadMaxPrecisionVal, aScope); InternalParameters.ReadSameParamMode = theResource->BooleanVal("read.stdsameparameter.mode", InternalParameters.ReadSameParamMode, aScope); - InternalParameters.ReadSurfaceCurveMode = (ReadMode_SurfaceCurve) + InternalParameters.ReadSurfaceCurveMode = (StepData_ConfParameters::ReadMode_SurfaceCurve) theResource->IntegerVal("read.surfacecurve.mode", InternalParameters.ReadSurfaceCurveMode, aScope); InternalParameters.EncodeRegAngle = theResource->RealVal("read.encoderegularity.angle", InternalParameters.EncodeRegAngle, aScope); - InternalParameters.AngleUnit = (AngleUnitMode) + InternalParameters.AngleUnit = (StepData_ConfParameters::AngleUnitMode) theResource->IntegerVal("angleunit.mode", InternalParameters.AngleUnit, aScope); InternalParameters.ReadResourceName = @@ -82,13 +82,13 @@ bool STEPCAFControl_ConfigurationNode::Load(const Handle(DE_ConfigurationContext theResource->StringVal("read.sequence", InternalParameters.ReadSequence, aScope); InternalParameters.ReadProductMode = theResource->BooleanVal("read.product.mode", InternalParameters.ReadProductMode, aScope); - InternalParameters.ReadProductContext = (ReadMode_ProductContext) + InternalParameters.ReadProductContext = (StepData_ConfParameters::ReadMode_ProductContext) theResource->IntegerVal("read.product.context", InternalParameters.ReadProductContext, aScope); - InternalParameters.ReadShapeRepr = (ReadMode_ShapeRepr) + InternalParameters.ReadShapeRepr = (StepData_ConfParameters::ReadMode_ShapeRepr) theResource->IntegerVal("read.shape.repr", InternalParameters.ReadShapeRepr, aScope); - InternalParameters.ReadTessellated = (RWMode_Tessellated) + InternalParameters.ReadTessellated = (StepData_ConfParameters::RWMode_Tessellated) theResource->IntegerVal("read.tessellated", InternalParameters.ReadTessellated, aScope); - InternalParameters.ReadAssemblyLevel = (ReadMode_AssemblyLevel) + InternalParameters.ReadAssemblyLevel = (StepData_ConfParameters::ReadMode_AssemblyLevel) theResource->IntegerVal("read.assembly.level", InternalParameters.ReadAssemblyLevel, aScope); InternalParameters.ReadRelationship = theResource->BooleanVal("read.shape.relationship", InternalParameters.ReadRelationship, aScope); @@ -117,15 +117,15 @@ bool STEPCAFControl_ConfigurationNode::Load(const Handle(DE_ConfigurationContext InternalParameters.ReadProps = theResource->BooleanVal("read.props", InternalParameters.ReadProps, aScope); - InternalParameters.WritePrecisionMode = (WriteMode_PrecisionMode) + InternalParameters.WritePrecisionMode = (StepData_ConfParameters::WriteMode_PrecisionMode) theResource->IntegerVal("write.precision.mode", InternalParameters.WritePrecisionMode, aScope); InternalParameters.WritePrecisionVal = theResource->RealVal("write.precision.val", InternalParameters.WritePrecisionVal, aScope); - InternalParameters.WriteAssembly = (WriteMode_Assembly) + InternalParameters.WriteAssembly = (StepData_ConfParameters::WriteMode_Assembly) theResource->IntegerVal("write.assembly", InternalParameters.WriteAssembly, aScope); - InternalParameters.WriteSchema = (WriteMode_StepSchema) + InternalParameters.WriteSchema = (StepData_ConfParameters::WriteMode_StepSchema) theResource->IntegerVal("write.schema", InternalParameters.WriteSchema, aScope); - InternalParameters.WriteTessellated = (RWMode_Tessellated) + InternalParameters.WriteTessellated = (StepData_ConfParameters::RWMode_Tessellated) theResource->IntegerVal("write.tessellated", InternalParameters.WriteTessellated, aScope); InternalParameters.WriteProductName = theResource->StringVal("write.product.name", InternalParameters.WriteProductName, aScope); @@ -137,7 +137,7 @@ bool STEPCAFControl_ConfigurationNode::Load(const Handle(DE_ConfigurationContext theResource->StringVal("write.resource.name", InternalParameters.WriteResourceName, aScope); InternalParameters.WriteSequence = theResource->StringVal("write.sequence", InternalParameters.WriteSequence, aScope); - InternalParameters.WriteVertexMode = (WriteMode_VertexMode) + InternalParameters.WriteVertexMode = (StepData_ConfParameters::WriteMode_VertexMode) theResource->IntegerVal("write.vertex.mode", InternalParameters.WriteVertexMode, aScope); InternalParameters.WriteSubshapeNames = theResource->BooleanVal("write.stepcaf.subshapes.name", InternalParameters.WriteSubshapeNames, aScope); diff --git a/src/STEPCAFControl/STEPCAFControl_ConfigurationNode.hxx b/src/STEPCAFControl/STEPCAFControl_ConfigurationNode.hxx index afd83def43..0611154dbd 100644 --- a/src/STEPCAFControl/STEPCAFControl_ConfigurationNode.hxx +++ b/src/STEPCAFControl/STEPCAFControl_ConfigurationNode.hxx @@ -16,6 +16,7 @@ #include #include +#include #include #include @@ -88,147 +89,7 @@ public: public: - enum ReadMode_BSplineContinuity - { - ReadMode_BSplineContinuity_C0 = 0, - ReadMode_BSplineContinuity_C1, - ReadMode_BSplineContinuity_C2 - }; - enum ReadMode_Precision - { - ReadMode_Precision_File = 0, - ReadMode_Precision_User - }; - enum ReadMode_MaxPrecision - { - ReadMode_MaxPrecision_Preferred = 0, - ReadMode_MaxPrecision_Forced - }; - enum ReadMode_SurfaceCurve - { - ReadMode_SurfaceCurve_Default = 0, - ReadMode_SurfaceCurve_2DUse_Preferred = 2, - ReadMode_SurfaceCurve_2DUse_Forced = -2, - ReadMode_SurfaceCurve_3DUse_Preferred = 3, - ReadMode_SurfaceCurve_3DUse_Forced = -3 - }; - enum AngleUnitMode - { - AngleUnitMode_File = 0, - AngleUnitMode_Rad, - AngleUnitMode_Deg - }; - enum ReadMode_ProductContext - { - ReadMode_ProductContext_All = 1, - ReadMode_ProductContext_Design, - ReadMode_ProductContext_Analysis - }; - enum ReadMode_ShapeRepr - { - ReadMode_ShapeRepr_All = 1, - ReadMode_ShapeRepr_ABSR, - ReadMode_ShapeRepr_MSSR, - ReadMode_ShapeRepr_GBSSR, - ReadMode_ShapeRepr_FBSR, - ReadMode_ShapeRepr_EBWSR, - ReadMode_ShapeRepr_GBWSR - }; - enum ReadMode_AssemblyLevel - { - ReadMode_AssemblyLevel_All = 1, - ReadMode_AssemblyLevel_Assembly, - ReadMode_AssemblyLevel_Structure, - ReadMode_AssemblyLevel_Shape - }; - enum RWMode_Tessellated - { - RWMode_Tessellated_Off = 0, - RWMode_Tessellated_On, - RWMode_Tessellated_OnNoBRep - }; - enum WriteMode_PrecisionMode - { - WriteMode_PrecisionMode_Least = -1, - WriteMode_PrecisionMode_Average = 0, - WriteMode_PrecisionMode_Greatest = 1, - WriteMode_PrecisionMode_Session = 2 - }; - enum WriteMode_Assembly - { - WriteMode_Assembly_Off = 0, - WriteMode_Assembly_On, - WriteMode_Assembly_Auto - }; - enum WriteMode_StepSchema - { - WriteMode_StepSchema_AP214CD = 1, - WriteMode_StepSchema_AP214DIS, - WriteMode_StepSchema_AP203, - WriteMode_StepSchema_AP214IS, - WriteMode_StepSchema_AP242DIS - }; - enum WriteMode_VertexMode - { - WriteMode_VertexMode_OneCompound = 0, - WriteMode_VertexMode_SingleVertex - }; - struct STEPCAFControl_InternalSection - { - // Common - ReadMode_BSplineContinuity ReadBSplineContinuity = ReadMode_BSplineContinuity_C1; // #include #include +#include #include #include #include #include #include +#include #include IMPLEMENT_STANDARD_RTTIEXT(STEPCAFControl_Provider, DE_Provider) @@ -41,116 +43,6 @@ STEPCAFControl_Provider::STEPCAFControl_Provider(const Handle(DE_ConfigurationNo :DE_Provider(theNode) {} -//======================================================================= -// function : initStatic -// purpose : -//======================================================================= -void STEPCAFControl_Provider::initStatic(const Handle(DE_ConfigurationNode)& theNode) -{ - Handle(STEPCAFControl_ConfigurationNode) aNode = Handle(STEPCAFControl_ConfigurationNode)::DownCast(theNode); - STEPCAFControl_Controller::Init(); - - // Get previous values - myOldValues.ReadBSplineContinuity = (STEPCAFControl_ConfigurationNode::ReadMode_BSplineContinuity)Interface_Static::IVal("read.iges.bspline.continuity"); - myOldValues.ReadPrecisionMode = (STEPCAFControl_ConfigurationNode::ReadMode_Precision)Interface_Static::IVal("read.precision.mode"); - myOldValues.ReadPrecisionVal = Interface_Static::RVal("read.precision.val"); - myOldValues.ReadMaxPrecisionMode = (STEPCAFControl_ConfigurationNode::ReadMode_MaxPrecision)Interface_Static::IVal("read.maxprecision.mode"); - myOldValues.ReadMaxPrecisionVal = Interface_Static::RVal("read.maxprecision.val"); - myOldValues.ReadSameParamMode = Interface_Static::IVal("read.stdsameparameter.mode") == 1; - myOldValues.ReadSurfaceCurveMode = (STEPCAFControl_ConfigurationNode::ReadMode_SurfaceCurve)Interface_Static::IVal("read.surfacecurve.mode"); - myOldValues.EncodeRegAngle = Interface_Static::RVal("read.encoderegularity.angle") * 180.0 / M_PI; - myOldValues.AngleUnit = (STEPCAFControl_ConfigurationNode::AngleUnitMode)Interface_Static::IVal("step.angleunit.mode"); - - myOldValues.ReadResourceName = Interface_Static::CVal("read.step.resource.name"); - myOldValues.ReadSequence = Interface_Static::CVal("read.step.sequence"); - myOldValues.ReadProductMode = Interface_Static::IVal("read.step.product.mode") == 1; - myOldValues.ReadProductContext = (STEPCAFControl_ConfigurationNode::ReadMode_ProductContext)Interface_Static::IVal("read.step.product.context"); - myOldValues.ReadShapeRepr = (STEPCAFControl_ConfigurationNode::ReadMode_ShapeRepr)Interface_Static::IVal("read.step.shape.repr"); - myOldValues.ReadTessellated = (STEPCAFControl_ConfigurationNode::RWMode_Tessellated)Interface_Static::IVal("read.step.tessellated"); - myOldValues.ReadAssemblyLevel = (STEPCAFControl_ConfigurationNode::ReadMode_AssemblyLevel)Interface_Static::IVal("read.step.assembly.level"); - myOldValues.ReadRelationship = Interface_Static::IVal("read.step.shape.relationship") == 1; - myOldValues.ReadShapeAspect = Interface_Static::IVal("read.step.shape.aspect") == 1; - myOldValues.ReadConstrRelation = Interface_Static::IVal("read.step.constructivegeom.relationship") == 1; - myOldValues.ReadSubshapeNames = Interface_Static::IVal("read.stepcaf.subshapes.name") == 1; - myOldValues.ReadCodePage = (Resource_FormatType)Interface_Static::IVal("read.step.codepage"); - myOldValues.ReadNonmanifold = Interface_Static::IVal("read.step.nonmanifold") == 1; - myOldValues.ReadIdeas = Interface_Static::IVal("read.step.ideas") == 1; - myOldValues.ReadAllShapes = Interface_Static::IVal("read.step.all.shapes") == 1; - myOldValues.ReadRootTransformation = Interface_Static::IVal("read.step.root.transformation") == 1; - - myOldValues.WritePrecisionMode = (STEPCAFControl_ConfigurationNode::WriteMode_PrecisionMode)Interface_Static::IVal("write.precision.mode"); - myOldValues.WritePrecisionVal = Interface_Static::RVal("write.precision.val"); - myOldValues.WriteAssembly = (STEPCAFControl_ConfigurationNode::WriteMode_Assembly)Interface_Static::IVal("write.step.assembly"); - myOldValues.WriteSchema = (STEPCAFControl_ConfigurationNode::WriteMode_StepSchema)Interface_Static::IVal("write.step.schema"); - myOldValues.WriteTessellated = (STEPCAFControl_ConfigurationNode::RWMode_Tessellated)Interface_Static::IVal("write.step.tessellated"); - myOldValues.WriteProductName = Interface_Static::CVal("write.step.product.name"); - myOldValues.WriteSurfaceCurMode = Interface_Static::IVal("write.surfacecurve.mode") == 1; - myOldValues.WriteUnit = (UnitsMethods_LengthUnit)Interface_Static::IVal("write.step.unit"); - myOldValues.WriteResourceName = Interface_Static::CVal("write.resource.name"); - myOldValues.WriteSequence = Interface_Static::CVal("write.step.sequence"); - myOldValues.WriteVertexMode = (STEPCAFControl_ConfigurationNode::WriteMode_VertexMode)Interface_Static::IVal("write.step.vertex.mode"); - myOldValues.WriteSubshapeNames = Interface_Static::IVal("write.stepcaf.subshapes.name") == 1; - - // Set new values - setStatic(aNode->InternalParameters); -} - -//======================================================================= -// function : setStatic -// purpose : -//======================================================================= -void STEPCAFControl_Provider::setStatic(const STEPCAFControl_ConfigurationNode::STEPCAFControl_InternalSection& theParameter) -{ - Interface_Static::SetIVal("read.iges.bspline.continuity", theParameter.ReadBSplineContinuity); - Interface_Static::SetIVal("read.precision.mode", theParameter.ReadPrecisionMode); - Interface_Static::SetRVal("read.precision.val", theParameter.ReadPrecisionVal); - Interface_Static::SetIVal("read.maxprecision.mode", theParameter.ReadMaxPrecisionMode); - Interface_Static::SetRVal("read.maxprecision.val", theParameter.ReadMaxPrecisionVal); - Interface_Static::SetIVal("read.stdsameparameter.mode", theParameter.ReadSameParamMode); - Interface_Static::SetIVal("read.surfacecurve.mode", theParameter.ReadSurfaceCurveMode); - Interface_Static::SetRVal("read.encoderegularity.angle", theParameter.EncodeRegAngle * M_PI / 180.0); - Interface_Static::SetIVal("step.angleunit.mode", theParameter.AngleUnit); - - Interface_Static::SetCVal("read.step.resource.name", theParameter.ReadResourceName.ToCString()); - Interface_Static::SetCVal("read.step.sequence", theParameter.ReadSequence.ToCString()); - Interface_Static::SetIVal("read.step.product.mode", theParameter.ReadProductMode); - Interface_Static::SetIVal("read.step.product.context", theParameter.ReadProductContext); - Interface_Static::SetIVal("read.step.shape.repr", theParameter.ReadShapeRepr); - Interface_Static::SetIVal("read.step.tessellated", theParameter.ReadTessellated); - Interface_Static::SetIVal("read.step.assembly.level", theParameter.ReadAssemblyLevel); - Interface_Static::SetIVal("read.step.shape.relationship", theParameter.ReadRelationship); - Interface_Static::SetIVal("read.step.shape.aspect", theParameter.ReadShapeAspect); - Interface_Static::SetIVal("read.step.constructivegeom.relationship", theParameter.ReadConstrRelation); - Interface_Static::SetIVal("read.stepcaf.subshapes.name", theParameter.ReadSubshapeNames); - Interface_Static::SetIVal("read.step.codepage", theParameter.ReadCodePage); - Interface_Static::SetIVal("read.step.nonmanifold", theParameter.ReadNonmanifold); - Interface_Static::SetIVal("read.step.ideas", theParameter.ReadIdeas); - Interface_Static::SetIVal("read.step.all.shapes", theParameter.ReadAllShapes); - Interface_Static::SetIVal("read.step.root.transformation", theParameter.ReadRootTransformation); - - Interface_Static::SetIVal("write.precision.mode", theParameter.WritePrecisionMode); - Interface_Static::SetRVal("write.precision.val", theParameter.WritePrecisionVal); - Interface_Static::SetIVal("write.step.assembly", theParameter.WriteAssembly); - Interface_Static::SetIVal("write.step.schema", theParameter.WriteSchema); - Interface_Static::SetIVal("write.step.tessellated", theParameter.WriteTessellated); - Interface_Static::SetCVal("write.step.product.name", theParameter.WriteProductName.ToCString()); - Interface_Static::SetIVal("write.surfacecurve.mode", theParameter.WriteSurfaceCurMode); - Interface_Static::SetIVal("write.step.unit", theParameter.WriteUnit); - Interface_Static::SetCVal("write.resource.name", theParameter.WriteResourceName.ToCString()); - Interface_Static::SetCVal("write.step.sequence", theParameter.WriteSequence.ToCString()); - Interface_Static::SetIVal("write.step.vertex.mode", theParameter.WriteVertexMode); - Interface_Static::SetIVal("write.stepcaf.subshapes.name", theParameter.WriteSubshapeNames); -} - -//======================================================================= -// function : resetStatic -// purpose : -//======================================================================= -void STEPCAFControl_Provider::resetStatic() -{ - setStatic(myOldValues); -} - //======================================================================= // function : Read // purpose : @@ -173,8 +65,6 @@ bool STEPCAFControl_Provider::Read(const TCollection_AsciiString& thePath, return false; } Handle(STEPCAFControl_ConfigurationNode) aNode = Handle(STEPCAFControl_ConfigurationNode)::DownCast(GetNode()); - initStatic(aNode); - XCAFDoc_DocumentTool::SetLengthUnit(theDocument, aNode->GlobalParameters.LengthUnit, UnitsMethods_LengthUnit_Millimeter); STEPCAFControl_Reader aReader; if (!theWS.IsNull()) @@ -185,14 +75,13 @@ bool STEPCAFControl_Provider::Read(const TCollection_AsciiString& thePath, aReader.SetNameMode(aNode->InternalParameters.ReadName); aReader.SetLayerMode(aNode->InternalParameters.ReadLayer); aReader.SetPropsMode(aNode->InternalParameters.ReadProps); - IFSelect_ReturnStatus aReadStat = IFSelect_RetVoid; - aReadStat = aReader.ReadFile(thePath.ToCString()); + StepData_ConfParameters aParams; + aReadStat = aReader.ReadFile(thePath.ToCString(), aParams); if (aReadStat != IFSelect_RetDone) { Message::SendFail() << "Error in the STEPCAFControl_Provider during reading the file " << thePath << "\t: abandon"; - resetStatic(); return false; } @@ -200,10 +89,8 @@ bool STEPCAFControl_Provider::Read(const TCollection_AsciiString& thePath, { Message::SendFail() << "Error in the STEPCAFControl_Provider during reading the file " << thePath << "\t: Cannot read any relevant data from the STEP file"; - resetStatic(); return false; } - resetStatic(); return true; } @@ -223,29 +110,29 @@ bool STEPCAFControl_Provider::Write(const TCollection_AsciiString& thePath, return false; } Handle(STEPCAFControl_ConfigurationNode) aNode = Handle(STEPCAFControl_ConfigurationNode)::DownCast(GetNode()); - initStatic(aNode); XCAFDoc_DocumentTool::SetLengthUnit(theDocument, - UnitsMethods::GetLengthUnitScale(aNode->InternalParameters.WriteUnit, UnitsMethods_LengthUnit_Millimeter), - UnitsMethods_LengthUnit_Millimeter); + UnitsMethods::GetLengthUnitScale(aNode->InternalParameters.WriteUnit, + UnitsMethods_LengthUnit_Millimeter), UnitsMethods_LengthUnit_Millimeter); STEPCAFControl_Writer aWriter; if (!theWS.IsNull()) { aWriter.Init(theWS); } - STEPControl_StepModelType aMode = static_cast(aNode->InternalParameters.WriteModelType); + Handle(StepData_StepModel) aModel = Handle(StepData_StepModel)::DownCast(aWriter.Writer().WS()->Model()); + STEPControl_StepModelType aMode = + static_cast(aNode->InternalParameters.WriteModelType); aWriter.SetColorMode(aNode->InternalParameters.WriteColor); aWriter.SetNameMode(aNode->InternalParameters.WriteName); aWriter.SetLayerMode(aNode->InternalParameters.WriteLayer); aWriter.SetPropsMode(aNode->InternalParameters.WriteProps); TDF_Label aLabel; - - if (!aWriter.Transfer(theDocument, aMode, 0, theProgress)) + StepData_ConfParameters aParams; + if (!aWriter.Transfer(theDocument, aParams, aMode, 0, theProgress)) { Message::SendFail() << "Error in the STEPCAFControl_Provider during writing the file " << thePath << "\t: The document cannot be translated or gives no result"; - resetStatic(); return false; } IFSelect_ReturnStatus aStatus = aWriter.Write(thePath.ToCString()); @@ -255,7 +142,6 @@ bool STEPCAFControl_Provider::Write(const TCollection_AsciiString& thePath, { Message::SendFail() << "Error in the STEPCAFControl_Provider during writing the file " << thePath << "\t: No file written"; - resetStatic(); return false;; } case IFSelect_RetDone: @@ -266,11 +152,9 @@ bool STEPCAFControl_Provider::Write(const TCollection_AsciiString& thePath, { Message::SendFail() << "Error in the STEPCAFControl_Provider during writing the file " << thePath << "\t: Error on writing file"; - resetStatic(); return false; } } - resetStatic(); return true; } @@ -315,32 +199,29 @@ bool STEPCAFControl_Provider::Read(const TCollection_AsciiString& thePath, return false; } Handle(STEPCAFControl_ConfigurationNode) aNode = Handle(STEPCAFControl_ConfigurationNode)::DownCast(GetNode()); - initStatic(aNode); STEPControl_Reader aReader; if(!theWS.IsNull()) { aReader.SetWS(theWS); } IFSelect_ReturnStatus aReadstat = IFSelect_RetVoid; - aReadstat = aReader.ReadFile(thePath.ToCString()); + StepData_ConfParameters aParams; + aReadstat = aReader.ReadFile(thePath.ToCString(), aParams); + Handle(StepData_StepModel) aModel = aReader.StepModel(); if (aReadstat != IFSelect_RetDone) { Message::SendFail() << "Error in the STEPCAFControl_Provider during reading the file " << thePath << "\t: abandon, no model loaded"; - resetStatic(); return false; } - Handle(StepData_StepModel) aModel = Handle(StepData_StepModel)::DownCast(aReader.Model()); aModel->SetLocalLengthUnit(aNode->GlobalParameters.LengthUnit); if (aReader.TransferRoots() <= 0) { Message::SendFail() << "Error in the STEPCAFControl_Provider during reading the file " << thePath << "\t:Cannot read any relevant data from the STEP file"; - resetStatic(); return false; } theShape = aReader.OneShape(); - resetStatic(); return true; } @@ -360,7 +241,6 @@ bool STEPCAFControl_Provider::Write(const TCollection_AsciiString& thePath, return false; } Handle(STEPCAFControl_ConfigurationNode) aNode = Handle(STEPCAFControl_ConfigurationNode)::DownCast(GetNode()); - initStatic(aNode); STEPControl_Writer aWriter; if(!theWS.IsNull()) @@ -370,21 +250,19 @@ bool STEPCAFControl_Provider::Write(const TCollection_AsciiString& thePath, IFSelect_ReturnStatus aWritestat = IFSelect_RetVoid; Handle(StepData_StepModel) aModel = aWriter.Model(); aModel->SetWriteLengthUnit(UnitsMethods::GetLengthUnitScale(aNode->InternalParameters.WriteUnit, UnitsMethods_LengthUnit_Millimeter)); - aWritestat = aWriter.Transfer(theShape, aNode->InternalParameters.WriteModelType, true, theProgress); + StepData_ConfParameters aParams; + aWritestat = aWriter.Transfer(theShape, aNode->InternalParameters.WriteModelType, aParams, true, theProgress); if (aWritestat != IFSelect_RetDone) { Message::SendFail() << "Error in the STEPCAFControl_Provider during reading the file " << thePath << "\t: abandon, no model loaded"; - resetStatic(); return false; } if (aWriter.Write(thePath.ToCString()) != IFSelect_RetDone) { Message::SendFail() << "STEPCAFControl_Provider: Error on writing file"; - resetStatic(); return false; } - resetStatic(); return true; } diff --git a/src/STEPCAFControl/STEPCAFControl_Provider.hxx b/src/STEPCAFControl/STEPCAFControl_Provider.hxx index d7774028b1..244a26f506 100644 --- a/src/STEPCAFControl/STEPCAFControl_Provider.hxx +++ b/src/STEPCAFControl/STEPCAFControl_Provider.hxx @@ -133,18 +133,6 @@ public: //! @return provider's vendor name Standard_EXPORT virtual TCollection_AsciiString GetVendor() const Standard_OVERRIDE; - private: - - //! Initialize static variables - void initStatic(const Handle(DE_ConfigurationNode)& theNode); - - //! Initialize static variables - void setStatic(const STEPCAFControl_ConfigurationNode::STEPCAFControl_InternalSection& theParameter); - - //! Reset used interface static variables - void resetStatic(); - - STEPCAFControl_ConfigurationNode::STEPCAFControl_InternalSection myOldValues; }; diff --git a/src/STEPCAFControl/STEPCAFControl_Reader.cxx b/src/STEPCAFControl/STEPCAFControl_Reader.cxx index e9e6ac69c2..1e5d1227a9 100644 --- a/src/STEPCAFControl/STEPCAFControl_Reader.cxx +++ b/src/STEPCAFControl/STEPCAFControl_Reader.cxx @@ -281,6 +281,10 @@ STEPCAFControl_Reader::STEPCAFControl_Reader() myViewMode(Standard_True) { STEPCAFControl_Controller::Init(); + if (!myReader.WS().IsNull()) + { + Init(myReader.WS()); + } } @@ -348,6 +352,16 @@ IFSelect_ReturnStatus STEPCAFControl_Reader::ReadFile (const Standard_CString th return myReader.ReadFile (theFileName); } +//======================================================================= +//function : ReadFile +//purpose : +//======================================================================= +IFSelect_ReturnStatus STEPCAFControl_Reader::ReadFile (const Standard_CString theFileName, + const StepData_ConfParameters& theParams) +{ + return myReader.ReadFile(theFileName, theParams); +} + //======================================================================= //function : ReadStream //purpose : @@ -412,6 +426,21 @@ Standard_Boolean STEPCAFControl_Reader::Perform (const Standard_CString filename return Transfer (doc, theProgress); } +//======================================================================= +//function : Perform +//purpose : +//======================================================================= +Standard_Boolean STEPCAFControl_Reader::Perform (const Standard_CString filename, + const Handle(TDocStd_Document)& doc, + const StepData_ConfParameters& theParams, + const Message_ProgressRange& theProgress) +{ + if (ReadFile(filename, theParams) != IFSelect_RetDone) + { + return Standard_False; + } + return Transfer(doc, theProgress); +} //======================================================================= //function : Perform @@ -429,6 +458,21 @@ Standard_Boolean STEPCAFControl_Reader::Perform (const TCollection_AsciiString & return Transfer (doc, theProgress); } +//======================================================================= +//function : Perform +//purpose : +//======================================================================= +Standard_Boolean STEPCAFControl_Reader::Perform (const TCollection_AsciiString& filename, + const Handle(TDocStd_Document)& doc, + const StepData_ConfParameters& theParams, + const Message_ProgressRange& theProgress) +{ + if (ReadFile(filename.ToCString(), theParams) != IFSelect_RetDone) + { + return Standard_False; + } + return Transfer(doc, theProgress); +} //======================================================================= //function : ExternFiles @@ -2302,7 +2346,7 @@ void readAnnotation(const Handle(XSControl_TransferReader)& theTR, Handle(StepVisual_DraughtingModel) aDModel = Handle(StepVisual_DraughtingModel)::DownCast(aDMIA->UsedRepresentation()); XSAlgo::AlgoContainer()->PrepareForTransfer(); - STEPControl_ActorRead anActor; + STEPControl_ActorRead anActor(aTP->Model()); StepData_Factors aLocalFactors = theLocalFactors; anActor.PrepareUnits(aDModel, aTP, aLocalFactors); Standard_Real aFact = aLocalFactors.LengthFactor(); @@ -2411,7 +2455,7 @@ void readConnectionPoints(const Handle(XSControl_TransferReader)& theTR, if (!aSDR.IsNull()) { XSAlgo::AlgoContainer()->PrepareForTransfer(); - STEPControl_ActorRead anActor; + STEPControl_ActorRead anActor(theTR->Model()); StepData_Factors aLocalFactors = theLocalFactors; anActor.PrepareUnits(aSDR, aTP, aLocalFactors); aFact = aLocalFactors.LengthFactor(); @@ -2824,7 +2868,7 @@ Standard_Boolean STEPCAFControl_Reader::setDatumToXCAF(const Handle(StepDimTol_D Handle(StepGeom_Axis2Placement3d) anAx = Handle(StepGeom_Axis2Placement3d)::DownCast(aSRWP->ItemsValue(j)); XSAlgo::AlgoContainer()->PrepareForTransfer(); - STEPControl_ActorRead anActor; + STEPControl_ActorRead anActor(aTP->Model()); StepData_Factors aLocalFactors = theLocalFactors; anActor.PrepareUnits(aSRWP, aTP, aLocalFactors); Handle(Geom_Axis2Placement) anAxis = StepToGeom::MakeAxis2Placement(anAx, aLocalFactors); @@ -4363,7 +4407,7 @@ Standard_Boolean STEPCAFControl_Reader::ReadGDTs(const Handle(XSControl_WorkSess if (!aDMIA.IsNull()) { XSAlgo::AlgoContainer()->PrepareForTransfer(); - STEPControl_ActorRead anActor; + STEPControl_ActorRead anActor(aModel); Handle(Transfer_TransientProcess) aTP = aTR->TransientProcess(); anActor.PrepareUnits(aDMIA->UsedRepresentation(), aTP, aLocalFactors); aFact = aLocalFactors.LengthFactor(); @@ -4719,7 +4763,7 @@ Standard_Boolean STEPCAFControl_Reader::ReadViews(const Handle(XSControl_WorkSes if (!aDModel.IsNull()) { XSAlgo::AlgoContainer()->PrepareForTransfer(); - STEPControl_ActorRead anActor; + STEPControl_ActorRead anActor(aTP->Model()); anActor.PrepareUnits(aDModel, aTP, aLocalFactors); } @@ -4895,11 +4939,8 @@ void STEPCAFControl_Reader::ExpandSubShapes(const Handle(XCAFDoc_ShapeTool)& Sha const Handle(Transfer_TransientProcess)& TP = Reader().WS()->TransferReader()->TransientProcess(); NCollection_DataMap ShapeNameMap; TColStd_MapOfTransient aRepItems; - - // Read translation control variables - Standard_Boolean doReadSNames = (Interface_Static::IVal("read.stepcaf.subshapes.name") > 0); - - if (!doReadSNames) + Handle(StepData_StepModel) aStepModel = Handle(StepData_StepModel)::DownCast(TP->Model()); + if (!aStepModel->InternalParameters.ReadSubshapeNames) return; const Interface_Graph& Graph = Reader().WS()->Graph(); diff --git a/src/STEPCAFControl/STEPCAFControl_Reader.hxx b/src/STEPCAFControl/STEPCAFControl_Reader.hxx index efebd48bfa..5fb211931b 100644 --- a/src/STEPCAFControl/STEPCAFControl_Reader.hxx +++ b/src/STEPCAFControl/STEPCAFControl_Reader.hxx @@ -81,6 +81,14 @@ public: //! @return read status Standard_EXPORT IFSelect_ReturnStatus ReadFile (const Standard_CString theFileName); + //! Loads a file and returns the read status + //! Provided for use like single-file reader. + //! @param theFileName [in] file to open + //! @param theParams [in] default configuration parameters + //! @return read status + Standard_EXPORT IFSelect_ReturnStatus ReadFile(const Standard_CString theFileName, + const StepData_ConfParameters& theParams); + //! Loads a file from stream and returns the read status. //! @param theName [in] auxiliary stream name //! @param theIStream [in] stream to read from @@ -108,11 +116,23 @@ public: Standard_EXPORT Standard_Boolean Perform (const TCollection_AsciiString& filename, const Handle(TDocStd_Document)& doc, const Message_ProgressRange& theProgress = Message_ProgressRange()); - + + Standard_EXPORT Standard_Boolean Perform (const TCollection_AsciiString& filename, + const Handle(TDocStd_Document)& doc, + const StepData_ConfParameters& theParams, + const Message_ProgressRange& theProgress = Message_ProgressRange()); + + //! Translate STEP file given by filename into the document + //! Return True if succeeded, and False in case of fail + Standard_EXPORT Standard_Boolean Perform (const Standard_CString filename, + const Handle(TDocStd_Document)& doc, + const Message_ProgressRange& theProgress = Message_ProgressRange()); + //! Translate STEP file given by filename into the document //! Return True if succeeded, and False in case of fail Standard_EXPORT Standard_Boolean Perform (const Standard_CString filename, const Handle(TDocStd_Document)& doc, + const StepData_ConfParameters& theParams, const Message_ProgressRange& theProgress = Message_ProgressRange()); //! Returns data on external files diff --git a/src/STEPCAFControl/STEPCAFControl_Writer.cxx b/src/STEPCAFControl/STEPCAFControl_Writer.cxx index 519f46e1b6..669550e308 100644 --- a/src/STEPCAFControl/STEPCAFControl_Writer.cxx +++ b/src/STEPCAFControl/STEPCAFControl_Writer.cxx @@ -390,6 +390,21 @@ Standard_Boolean STEPCAFControl_Writer::Transfer(const Handle(TDocStd_Document)& const STEPControl_StepModelType theMode, const Standard_CString theMulti, const Message_ProgressRange& theProgress) +{ + const Handle(StepData_StepModel) aModel = Handle(StepData_StepModel)::DownCast(myWriter.WS()->Model()); + aModel->InternalParameters.InitFromStatic(); + return Transfer(theDoc, aModel->InternalParameters, theMode, theMulti, theProgress); +} + +//======================================================================= +//function : Transfer +//purpose : +//======================================================================= +Standard_Boolean STEPCAFControl_Writer::Transfer(const Handle(TDocStd_Document)& theDoc, + const StepData_ConfParameters& theParams, + const STEPControl_StepModelType theMode, + const Standard_CString theMulti, + const Message_ProgressRange& theProgress) { Handle(XCAFDoc_ShapeTool) aShTool = XCAFDoc_DocumentTool::ShapeTool(theDoc->Main()); if (aShTool.IsNull()) @@ -399,6 +414,8 @@ Standard_Boolean STEPCAFControl_Writer::Transfer(const Handle(TDocStd_Document)& myRootLabels.Add(theDoc->Main().Root()); TDF_LabelSequence aLabels; aShTool->GetFreeShapes(aLabels); + const Handle(StepData_StepModel) aModel = Handle(StepData_StepModel)::DownCast(myWriter.WS()->Model()); + aModel->InternalParameters = theParams; return transfer(myWriter, aLabels, theMode, theMulti, Standard_False, theProgress); } @@ -410,6 +427,21 @@ Standard_Boolean STEPCAFControl_Writer::Transfer(const TDF_Label& theLabel, const STEPControl_StepModelType theMode, const Standard_CString theIsMulti, const Message_ProgressRange& theProgress) +{ + const Handle(StepData_StepModel) aModel = Handle(StepData_StepModel)::DownCast(myWriter.WS()->Model()); + aModel->InternalParameters.InitFromStatic(); + return Transfer(theLabel, aModel->InternalParameters, theMode, theIsMulti, theProgress); +} + +//======================================================================= +//function : Transfer +//purpose : +//======================================================================= +Standard_Boolean STEPCAFControl_Writer::Transfer(const TDF_Label& theLabel, + const StepData_ConfParameters& theParams, + const STEPControl_StepModelType theMode, + const Standard_CString theIsMulti, + const Message_ProgressRange& theProgress) { if (theLabel.IsNull()) { @@ -419,6 +451,8 @@ Standard_Boolean STEPCAFControl_Writer::Transfer(const TDF_Label& theLabel, aLabels.Append(theLabel); myRootLabels.Clear(); myRootLabels.Add(theLabel.Root()); + const Handle(StepData_StepModel) aModel = Handle(StepData_StepModel)::DownCast(myWriter.WS()->Model()); + aModel->InternalParameters = theParams; return transfer(myWriter, aLabels, theMode, theIsMulti, Standard_False, theProgress); } @@ -430,6 +464,21 @@ Standard_Boolean STEPCAFControl_Writer::Transfer(const TDF_LabelSequence& theLab const STEPControl_StepModelType theMode, const Standard_CString theIsMulti, const Message_ProgressRange& theProgress) +{ + const Handle(StepData_StepModel) aModel = Handle(StepData_StepModel)::DownCast(myWriter.WS()->Model()); + aModel->InternalParameters.InitFromStatic(); + return Transfer(theLabels, aModel->InternalParameters, theMode, theIsMulti, theProgress); +} + +//======================================================================= +//function : Transfer +//purpose : +//======================================================================= +Standard_Boolean STEPCAFControl_Writer::Transfer(const TDF_LabelSequence& theLabels, + const StepData_ConfParameters& theParams, + const STEPControl_StepModelType theMode, + const Standard_CString theIsMulti, + const Message_ProgressRange& theProgress) { myRootLabels.Clear(); for (TDF_LabelSequence::Iterator aLabelIter(theLabels); @@ -441,6 +490,8 @@ Standard_Boolean STEPCAFControl_Writer::Transfer(const TDF_LabelSequence& theLab myRootLabels.Add(aLabel.Root()); } } + const Handle(StepData_StepModel) aModel = Handle(StepData_StepModel)::DownCast(myWriter.WS()->Model()); + aModel->InternalParameters = theParams; return transfer(myWriter, theLabels, theMode, theIsMulti, Standard_False, theProgress); } @@ -457,6 +508,20 @@ Standard_Boolean STEPCAFControl_Writer::Perform(const Handle(TDocStd_Document)& return Write(theFileName) == IFSelect_RetDone; } +//======================================================================= +//function : Perform +//purpose : +//======================================================================= +Standard_Boolean STEPCAFControl_Writer::Perform(const Handle(TDocStd_Document)& theDoc, + const Standard_CString theFileName, + const StepData_ConfParameters& theParams, + const Message_ProgressRange& theProgress) +{ + if (!Transfer(theDoc, theParams, STEPControl_AsIs, 0L, theProgress)) + return Standard_False; + return Write(theFileName) == IFSelect_RetDone; +} + //======================================================================= //function : Perform //purpose : @@ -519,7 +584,6 @@ Standard_Boolean STEPCAFControl_Writer::transfer(STEPControl_Writer& theWriter, const Handle(StepData_StepModel) aModel = Handle(StepData_StepModel)::DownCast(theWriter.WS()->Model()); prepareUnit(theLabels.First(), aModel, aLocalFactors); // set local length unit to the model // translate free top-level shapes of the DECAF document - const Standard_Integer aStepSchema = Interface_Static::IVal("write.step.schema"); TDF_LabelSequence aSubLabels; Message_ProgressScope aPS(theProgress, "Labels", theLabels.Length()); // Iterate on requested shapes @@ -612,7 +676,7 @@ Standard_Boolean STEPCAFControl_Writer::transfer(STEPControl_Writer& theWriter, if (XCAFDoc_ShapeTool::IsAssembly(aCurL) || XCAFDoc_ShapeTool::IsReference(aCurL)) anActor->RegisterAssembly(aCurShape); - theWriter.Transfer(aCurShape, theMode, Standard_False, aRange); + theWriter.Transfer(aCurShape, theMode, aModel->InternalParameters, Standard_False, aRange); anActor->SetStdMode(Standard_True); // restore default behaviour } else @@ -623,10 +687,10 @@ Standard_Boolean STEPCAFControl_Writer::transfer(STEPControl_Writer& theWriter, if (aPS1.UserBreak()) return Standard_False; - Standard_Integer assemblymode = Interface_Static::IVal("write.step.assembly"); - Interface_Static::SetCVal("write.step.assembly", "On"); - theWriter.Transfer(aSass, STEPControl_AsIs, Standard_True, aPS1.Next()); - Interface_Static::SetIVal("write.step.assembly", assemblymode); + StepData_ConfParameters::WriteMode_Assembly assemblymode = aModel->InternalParameters.WriteAssembly; + aModel->InternalParameters.WriteAssembly = StepData_ConfParameters::WriteMode_Assembly_On; + theWriter.Transfer(aSass, STEPControl_AsIs, aModel->InternalParameters, Standard_True, aPS1.Next()); + aModel->InternalParameters.WriteAssembly = assemblymode; } } if (aPS.UserBreak()) @@ -656,7 +720,7 @@ Standard_Boolean STEPCAFControl_Writer::transfer(STEPControl_Writer& theWriter, // write G&DTs if (GetDimTolMode()) { - if (aStepSchema == 5) + if (aModel->InternalParameters.WriteSchema == 5) { writeDGTsAP242(theWriter.WS(), aSubLabels, aLocalFactors); } @@ -691,7 +755,7 @@ Standard_Boolean STEPCAFControl_Writer::transfer(STEPControl_Writer& theWriter, theWriter.WS()->ComputeGraph(Standard_True); // Write names for the sub-shapes - if (Interface_Static::IVal("write.stepcaf.subshapes.name") != 0) + if (aModel->InternalParameters.WriteSubshapeNames != 0) { const Handle(XSControl_TransferWriter)& TW = this->ChangeWriter().WS()->TransferWriter(); const Handle(Transfer_FinderProcess)& aFP = TW->FinderProcess(); @@ -785,11 +849,11 @@ TopoDS_Shape STEPCAFControl_Writer::transferExternFiles(const TDF_Label& theLabe anExtFile->SetWS(aNewWS); anExtFile->SetName(aNewName); anExtFile->SetLabel(theLabel); - Standard_Integer anAssemblymode = Interface_Static::IVal("write.step.assembly"); - Interface_Static::SetCVal("write.step.assembly", "Off"); + StepData_ConfParameters::WriteMode_Assembly anAssemblymode = aStepWriter.Model()->InternalParameters.WriteAssembly; + aStepWriter.Model()->InternalParameters.WriteAssembly = StepData_ConfParameters::WriteMode_Assembly_Off; const Standard_CString anIsMulti = 0; anExtFile->SetTransferStatus(transfer(aStepWriter, aLabelSeq, theMode, anIsMulti, Standard_True, theProgress)); - Interface_Static::SetIVal("write.step.assembly", anAssemblymode); + aStepWriter.Model()->InternalParameters.WriteAssembly = anAssemblymode; myLabEF.Bind(theLabel, anExtFile); myFiles.Bind(aNewName->ToCString(), anExtFile); @@ -842,7 +906,8 @@ Standard_Boolean STEPCAFControl_Writer::writeExternRefs(const Handle(XSControl_W const Handle(XSControl_TransferWriter)& aTW = theWS->TransferWriter(); const Handle(Transfer_FinderProcess)& aFP = aTW->FinderProcess(); STEPConstruct_ExternRefs anEFTool(theWS); - Standard_Integer aStepSchema = Interface_Static::IVal("write.step.schema"); + Handle(StepData_StepModel) aStepModel = Handle(StepData_StepModel)::DownCast(theWS->Model()); + Standard_Integer aStepSchema = aStepModel->InternalParameters.WriteSchema; // Iterate on requested shapes for (TDF_LabelSequence::Iterator aLabelIter(theLabels); aLabelIter.More(); aLabelIter.Next()) @@ -1290,6 +1355,10 @@ Standard_Boolean STEPCAFControl_Writer::writeColors(const Handle(XSControl_WorkS MakeSTEPStyles(Styles, aShape, aSettings, anOverride, aMap, myMapCompMDGPR, DPDCs, ColRGBs, aSTool, 0, anIsComponent); + const Handle(XSControl_TransferWriter)& aTW = theWS->TransferWriter(); + const Handle(Transfer_FinderProcess)& aFP = aTW->FinderProcess(); + Handle(StepData_StepModel) aStepModel = Handle(StepData_StepModel)::DownCast(aFP->Model()); + // create MDGPR and record it in model Handle(StepVisual_MechanicalDesignGeometricPresentationRepresentation) aMDGPR; @@ -1299,15 +1368,13 @@ Standard_Boolean STEPCAFControl_Writer::writeColors(const Handle(XSControl_WorkS { Message::SendTrace() << "Error: Current Top-Level shape have MDGPR already " << "\n"; } - Styles.CreateMDGPR(aContext, aMDGPR); + Styles.CreateMDGPR(aContext, aMDGPR, aStepModel); if (!aMDGPR.IsNull()) myMapCompMDGPR.Bind(aTopSh, aMDGPR); } else { // create SDR and add to model. - const Handle(XSControl_TransferWriter)& aTW = theWS->TransferWriter(); - const Handle(Transfer_FinderProcess)& aFP = aTW->FinderProcess(); Handle(TransferBRep_ShapeMapper) aMapper = TransferBRep::ShapeMapper(aFP, aShape); Handle(StepShape_ContextDependentShapeRepresentation) aCDSR; if (aFP->FindTypedTransient(aMapper, @@ -1896,6 +1963,7 @@ static Standard_Boolean createSHUOStyledItem(const XCAFPrs_Style& theStyle, // find the repr item of the shape const Handle(XSControl_TransferWriter)& aTW = theWS->TransferWriter(); const Handle(Transfer_FinderProcess)& aFP = aTW->FinderProcess(); + Handle(StepData_StepModel) aStepModel = Handle(StepData_StepModel)::DownCast(aFP->Model()); Handle(TransferBRep_ShapeMapper) aMapper = TransferBRep::ShapeMapper(aFP, theShape); Handle(StepShape_ContextDependentShapeRepresentation) aCDSR; aFP->FindTypedTransient(aMapper, @@ -1938,7 +2006,7 @@ static Standard_Boolean createSHUOStyledItem(const XCAFPrs_Style& theStyle, // create MDGPR and record it in model Message::SendTrace() << "Warning: " << __FILE__ << ": Create new MDGPR for SHUO instance" << "\n"; Handle(StepVisual_MechanicalDesignGeometricPresentationRepresentation) aMDGPR; - aStyles.CreateMDGPR(aContext, aMDGPR); + aStyles.CreateMDGPR(aContext, aMDGPR, aStepModel); if (!aMDGPR.IsNull()) theMapCompMDGPR.Bind(aTopSh, aMDGPR); } diff --git a/src/STEPCAFControl/STEPCAFControl_Writer.hxx b/src/STEPCAFControl/STEPCAFControl_Writer.hxx index 8261c03a0d..4d2dd03823 100644 --- a/src/STEPCAFControl/STEPCAFControl_Writer.hxx +++ b/src/STEPCAFControl/STEPCAFControl_Writer.hxx @@ -24,6 +24,7 @@ #include #include #include +#include #include #include #include @@ -91,8 +92,33 @@ public: const Standard_CString theIsMulti = 0, const Message_ProgressRange& theProgress = Message_ProgressRange()); + //! Transfers a document (or single label) to a STEP model + //! This method uses if need to set parameters avoiding + //! initialization from Interface_Static + //! @param theParams configuration parameters + //! @param theMode mode of translation of shape is AsIs + //! @param theIsMulti if multi is not null pointer, it switches to multifile + //! mode (with external refs), and string pointed by + //! gives prefix for names of extern files (can be empty string) + //! @param theProgress progress indicator + //! Returns True if translation is OK + Standard_EXPORT Standard_Boolean Transfer(const Handle(TDocStd_Document)& theDoc, + const StepData_ConfParameters& theParams, + const STEPControl_StepModelType theMode = STEPControl_AsIs, + const Standard_CString theIsMulti = 0, + const Message_ProgressRange& theProgress = Message_ProgressRange()); + + //! Method to transfer part of the document specified by label + Standard_EXPORT Standard_Boolean Transfer(const TDF_Label& theLabel, + const STEPControl_StepModelType theMode = STEPControl_AsIs, + const Standard_CString theIsMulti = 0, + const Message_ProgressRange& theProgress = Message_ProgressRange()); + //! Method to transfer part of the document specified by label + //! This method uses if need to set parameters avoiding + //! initialization from Interface_Static Standard_EXPORT Standard_Boolean Transfer(const TDF_Label& theLabel, + const StepData_ConfParameters& theParams, const STEPControl_StepModelType theMode = STEPControl_AsIs, const Standard_CString theIsMulti = 0, const Message_ProgressRange& theProgress = Message_ProgressRange()); @@ -103,6 +129,15 @@ public: const Standard_CString theIsMulti = 0, const Message_ProgressRange& theProgress = Message_ProgressRange()); + //! Mehod to writing sequence of root assemblies or part of the file specified by use by one label + //! This method uses if need to set parameters avoiding + //! initialization from Interface_Static + Standard_EXPORT Standard_Boolean Transfer(const TDF_LabelSequence& theLabelSeq, + const StepData_ConfParameters& theParams, + const STEPControl_StepModelType theMode = STEPControl_AsIs, + const Standard_CString theIsMulti = 0, + const Message_ProgressRange& theProgress = Message_ProgressRange()); + Standard_EXPORT Standard_Boolean Perform(const Handle(TDocStd_Document)& theDoc, const TCollection_AsciiString& theFileName, const Message_ProgressRange& theProgress = Message_ProgressRange()); @@ -113,6 +148,15 @@ public: const Standard_CString theFileName, const Message_ProgressRange& theProgress = Message_ProgressRange()); + //! Transfers a document and writes it to a STEP file + //! This method uses if need to set parameters avoiding + //! initialization from Interface_Static + //! Returns True if translation is OK + Standard_EXPORT Standard_Boolean Perform(const Handle(TDocStd_Document)& theDoc, + const Standard_CString theFileName, + const StepData_ConfParameters& theParams, + const Message_ProgressRange& theProgress = Message_ProgressRange()); + //! Returns data on external files //! Returns Null handle if no external files are read const NCollection_DataMap& ExternFiles() const { return myFiles; }; diff --git a/src/STEPConstruct/STEPConstruct_ContextTool.cxx b/src/STEPConstruct/STEPConstruct_ContextTool.cxx index 3f15bf466d..e7da67e011 100644 --- a/src/STEPConstruct/STEPConstruct_ContextTool.cxx +++ b/src/STEPConstruct/STEPConstruct_ContextTool.cxx @@ -33,7 +33,6 @@ #include #include #include -#include #include #include #include @@ -69,7 +68,8 @@ STEPConstruct_ContextTool::STEPConstruct_ContextTool (const Handle(StepData_Step void STEPConstruct_ContextTool::SetModel (const Handle(StepData_StepModel)& aStepModel) { theAPD.Nullify(); //thePRPC.Nullify(); - + mySchema = aStepModel->InternalParameters.WriteSchema; + myProductName = aStepModel->InternalParameters.WriteProductName; Standard_Integer i, nb = aStepModel->NbEntities(); for(i = 1; i<=nb && theAPD.IsNull(); i ++) { Handle(Standard_Transient) ent = aStepModel->Value(i); @@ -111,7 +111,7 @@ void STEPConstruct_ContextTool::AddAPD (const Standard_Boolean enforce) Standard_Boolean noapd = theAPD.IsNull(); if (noapd || enforce) theAPD = new StepBasic_ApplicationProtocolDefinition; - switch (Interface_Static::IVal("write.step.schema")) { //j4 + switch (mySchema) { //j4 default: case 1: theAPD->SetApplicationProtocolYear (1997); @@ -147,7 +147,7 @@ void STEPConstruct_ContextTool::AddAPD (const Standard_Boolean enforce) if (theAPD->Application().IsNull()) theAPD->SetApplication (new StepBasic_ApplicationContext); Handle(TCollection_HAsciiString) appl; - switch (Interface_Static::IVal("write.step.schema")) { //j4 + switch (mySchema) { //j4 default: case 1: case 2: appl = new TCollection_HAsciiString ( "core data for automotive mechanical design processes" ); @@ -567,8 +567,8 @@ void STEPConstruct_ContextTool::SetIndex (const Standard_Integer ind) Handle(TCollection_HAsciiString) STEPConstruct_ContextTool::GetProductName () const { Handle(TCollection_HAsciiString) PdtName; - if (Interface_Static::IsSet("write.step.product.name")) - PdtName = new TCollection_HAsciiString(Interface_Static::CVal("write.step.product.name")); + if (!myProductName.IsEmpty()) + PdtName = new TCollection_HAsciiString(myProductName); else PdtName = new TCollection_HAsciiString("Product"); for ( Standard_Integer i=1; i <= myLevel.Length(); i++ ) { @@ -596,7 +596,7 @@ Handle(TColStd_HSequenceOfTransient) STEPConstruct_ContextTool::GetRootsForPart if ( ! SDRTool.PRPC().IsNull() ) seq->Append ( SDRTool.PRPC() ); // for AP203, add required product management data - if ( Interface_Static::IVal("write.step.schema") == 3 ) { + if ( mySchema == 3 ) { theAP203.Init ( SDRTool ); seq->Append (theAP203.GetProductCategoryRelationship()); seq->Append (theAP203.GetCreator()); @@ -626,7 +626,7 @@ Handle(TColStd_HSequenceOfTransient) STEPConstruct_ContextTool::GetRootsForAssem seq->Append ( assembly.ItemValue() ); // for AP203, write required product management data - if ( Interface_Static::IVal("write.step.schema") == 3 ) { + if ( mySchema == 3 ) { theAP203.Init ( assembly.GetNAUO() ); seq->Append (theAP203.GetSecurity()); seq->Append (theAP203.GetClassificationOfficer()); diff --git a/src/STEPConstruct/STEPConstruct_ContextTool.hxx b/src/STEPConstruct/STEPConstruct_ContextTool.hxx index 112aecc260..35add18f49 100644 --- a/src/STEPConstruct/STEPConstruct_ContextTool.hxx +++ b/src/STEPConstruct/STEPConstruct_ContextTool.hxx @@ -24,11 +24,11 @@ #include #include #include +#include #include #include class StepBasic_ApplicationProtocolDefinition; class StepGeom_Axis2Placement3d; -class StepData_StepModel; class TCollection_HAsciiString; class STEPConstruct_Part; class STEPConstruct_Assembly; @@ -143,6 +143,8 @@ private: STEPConstruct_AP203Context theAP203; Handle(StepGeom_Axis2Placement3d) myAxis; StepData_Factors myGlobalFactor; + StepData_ConfParameters::WriteMode_StepSchema mySchema; + TCollection_AsciiString myProductName; }; diff --git a/src/STEPConstruct/STEPConstruct_Part.cxx b/src/STEPConstruct/STEPConstruct_Part.cxx index 73156f8057..3e8c03c3f7 100644 --- a/src/STEPConstruct/STEPConstruct_Part.cxx +++ b/src/STEPConstruct/STEPConstruct_Part.cxx @@ -26,6 +26,7 @@ #include #include #include +#include #include #include #include @@ -56,10 +57,11 @@ STEPConstruct_Part::STEPConstruct_Part() void STEPConstruct_Part::MakeSDR(const Handle(StepShape_ShapeRepresentation)& SR, const Handle(TCollection_HAsciiString)& aName, - const Handle(StepBasic_ApplicationContext)& AC) + const Handle(StepBasic_ApplicationContext)& AC, + Handle(StepData_StepModel)& theStepModel) { // get current schema - Standard_Integer schema = Interface_Static::IVal("write.step.schema"); + const Standard_Integer schema = theStepModel->InternalParameters.WriteSchema; // create PC Handle(StepBasic_ProductContext) PC; @@ -142,7 +144,7 @@ void STEPConstruct_Part::MakeSDR(const Handle(StepShape_ShapeRepresentation)& SR // and an associated PRPC Handle(TCollection_HAsciiString) PRPCName; - switch (Interface_Static::IVal("write.step.schema")) { + switch (theStepModel->InternalParameters.WriteSchema) { default: case 1: myPRPC = new StepBasic_ProductType; diff --git a/src/STEPConstruct/STEPConstruct_Part.hxx b/src/STEPConstruct/STEPConstruct_Part.hxx index 534a375942..3d4352350d 100644 --- a/src/STEPConstruct/STEPConstruct_Part.hxx +++ b/src/STEPConstruct/STEPConstruct_Part.hxx @@ -31,6 +31,7 @@ class StepBasic_ProductDefinitionContext; class StepBasic_Product; class StepBasic_ProductDefinitionFormation; class StepBasic_ProductDefinition; +class StepData_StepModel; class StepRepr_ProductDefinitionShape; @@ -47,7 +48,10 @@ public: Standard_EXPORT STEPConstruct_Part(); - Standard_EXPORT void MakeSDR (const Handle(StepShape_ShapeRepresentation)& aShape, const Handle(TCollection_HAsciiString)& aName, const Handle(StepBasic_ApplicationContext)& AC); + Standard_EXPORT void MakeSDR (const Handle(StepShape_ShapeRepresentation)& aShape, + const Handle(TCollection_HAsciiString)& aName, + const Handle(StepBasic_ApplicationContext)& AC, + Handle(StepData_StepModel)& theStepModel); Standard_EXPORT void ReadSDR (const Handle(StepShape_ShapeDefinitionRepresentation)& aShape); diff --git a/src/STEPConstruct/STEPConstruct_Styles.cxx b/src/STEPConstruct/STEPConstruct_Styles.cxx index 09c0efcabb..f1cfe0c417 100644 --- a/src/STEPConstruct/STEPConstruct_Styles.cxx +++ b/src/STEPConstruct/STEPConstruct_Styles.cxx @@ -228,7 +228,8 @@ Handle(StepVisual_StyledItem) STEPConstruct_Styles::AddStyle (const TopoDS_Shape //======================================================================= Standard_Boolean STEPConstruct_Styles::CreateMDGPR (const Handle(StepRepr_RepresentationContext) &Context, - Handle(StepVisual_MechanicalDesignGeometricPresentationRepresentation)& Repr) + Handle(StepVisual_MechanicalDesignGeometricPresentationRepresentation)& Repr, + Handle(StepData_StepModel)& theStepModel) { if ( myStyles.Extent() <1 ) return Standard_False; @@ -246,7 +247,7 @@ Standard_Boolean STEPConstruct_Styles::CreateMDGPR (const Handle(StepRepr_Repres // Model()->AddWithRefs ( Repr ); add into the model upper // for AP203, add subschema name - if ( Interface_Static::IVal("write.step.schema") ==3 ) { + if ( theStepModel->InternalParameters.WriteSchema == 3 ) { APIHeaderSection_MakeHeader mkHdr ( Handle(StepData_StepModel)::DownCast ( Model() ) ); Handle(TCollection_HAsciiString) subSchema = new TCollection_HAsciiString ( "SHAPE_APPEARANCE_LAYER_MIM" ); diff --git a/src/STEPConstruct/STEPConstruct_Styles.hxx b/src/STEPConstruct/STEPConstruct_Styles.hxx index 5fc2cd6c86..21a878bef6 100644 --- a/src/STEPConstruct/STEPConstruct_Styles.hxx +++ b/src/STEPConstruct/STEPConstruct_Styles.hxx @@ -96,7 +96,9 @@ public: //! Create MDGPR, fill it with all the styles previously defined, //! and add it to the model - Standard_EXPORT Standard_Boolean CreateMDGPR (const Handle(StepRepr_RepresentationContext)& Context, Handle(StepVisual_MechanicalDesignGeometricPresentationRepresentation)& MDGPR); + Standard_EXPORT Standard_Boolean CreateMDGPR (const Handle(StepRepr_RepresentationContext)& Context, + Handle(StepVisual_MechanicalDesignGeometricPresentationRepresentation)& MDGPR, + Handle(StepData_StepModel)& theStepModel); //! Create MDGPR, fill it with all the styles previously defined, //! and add it to the model diff --git a/src/STEPConstruct/STEPConstruct_UnitContext.cxx b/src/STEPConstruct/STEPConstruct_UnitContext.cxx index 57a5fb485c..15d28b728c 100644 --- a/src/STEPConstruct/STEPConstruct_UnitContext.cxx +++ b/src/STEPConstruct/STEPConstruct_UnitContext.cxx @@ -35,6 +35,7 @@ #include #include #include +#include #include #include #include @@ -64,6 +65,7 @@ STEPConstruct_UnitContext::STEPConstruct_UnitContext() //======================================================================= void STEPConstruct_UnitContext::Init(const Standard_Real Tol3d, + const Handle(StepData_StepModel)& theModel, const StepData_Factors& theLocalFactors) { done = Standard_True; @@ -82,7 +84,7 @@ void STEPConstruct_UnitContext::Init(const Standard_Real Tol3d, Standard_Boolean hasPref = Standard_True; StepBasic_SiPrefix siPref = StepBasic_spMilli; Standard_Real aScale = 1.; - switch (Interface_Static::IVal("write.step.unit")) + switch (theModel->InternalParameters.WriteUnit) { case 1: uName = "INCH"; aScale = 25.4; break; default: diff --git a/src/STEPConstruct/STEPConstruct_UnitContext.hxx b/src/STEPConstruct/STEPConstruct_UnitContext.hxx index 40a1bd5e2e..c463ab42e7 100644 --- a/src/STEPConstruct/STEPConstruct_UnitContext.hxx +++ b/src/STEPConstruct/STEPConstruct_UnitContext.hxx @@ -25,6 +25,7 @@ #include #include class StepData_Factors; +class StepData_StepModel; class StepGeom_GeomRepContextAndGlobUnitAssCtxAndGlobUncertaintyAssCtx; class StepRepr_GlobalUnitAssignedContext; class StepBasic_NamedUnit; @@ -47,6 +48,7 @@ public: //! Creates new context (units are MM and radians, //! uncertainty equal to Tol3d) Standard_EXPORT void Init (const Standard_Real Tol3d, + const Handle(StepData_StepModel)& theModel, const StepData_Factors& theLocalFactors); //! Returns True if Init was called successfully diff --git a/src/STEPConstruct/STEPConstruct_ValidationProps.cxx b/src/STEPConstruct/STEPConstruct_ValidationProps.cxx index 558b97dc63..10f0c33641 100644 --- a/src/STEPConstruct/STEPConstruct_ValidationProps.cxx +++ b/src/STEPConstruct/STEPConstruct_ValidationProps.cxx @@ -346,9 +346,11 @@ Standard_Boolean STEPConstruct_ValidationProps::AddProp (const StepRepr_Characte // record SDR in order to have it written to the file Model()->AddWithRefs ( PrDR ); + Handle(StepData_StepModel) aStepModel = Handle(StepData_StepModel)::DownCast(Model()); + // for AP203, add subschema name - if ( Interface_Static::IVal("write.step.schema") ==3 ) { - APIHeaderSection_MakeHeader mkHdr ( Handle(StepData_StepModel)::DownCast ( Model() ) ); + if ( aStepModel->InternalParameters.WriteSchema ==3 ) { + APIHeaderSection_MakeHeader mkHdr ( aStepModel ); Handle(TCollection_HAsciiString) subSchema = new TCollection_HAsciiString ( "GEOMETRIC_VALIDATION_PROPERTIES_MIM" ); mkHdr.AddSchemaIdentifier ( subSchema ); diff --git a/src/STEPControl/STEPControl_ActorRead.cxx b/src/STEPControl/STEPControl_ActorRead.cxx index 952054f702..c092305895 100644 --- a/src/STEPControl/STEPControl_ActorRead.cxx +++ b/src/STEPControl/STEPControl_ActorRead.cxx @@ -211,9 +211,10 @@ namespace { // Purpose : Empty constructor // ============================================================================ -STEPControl_ActorRead::STEPControl_ActorRead() +STEPControl_ActorRead::STEPControl_ActorRead(const Handle(Interface_InterfaceModel)& theModel) : myPrecision(0.0), - myMaxTol(0.0) + myMaxTol(0.0), + myModel(theModel) { } @@ -231,8 +232,13 @@ Standard_Boolean STEPControl_ActorRead::Recognize if (start->IsKind(STANDARD_TYPE(StepRepr_NextAssemblyUsageOccurrence))) return Standard_True; - TCollection_AsciiString aProdMode = Interface_Static::CVal("read.step.product.mode"); - if(!aProdMode.IsEqual("ON")) + Handle(StepData_StepModel) aStepModel = Handle(StepData_StepModel)::DownCast(myModel); + if (aStepModel.IsNull()) + { + return false; + } + bool aProdMode = aStepModel->InternalParameters.ReadProductMode; + if(!aProdMode) if(start->IsKind(STANDARD_TYPE(StepShape_ShapeDefinitionRepresentation))) return Standard_True; DeclareAndCast(StepShape_ShapeRepresentation,sr,start); @@ -244,7 +250,7 @@ Standard_Boolean STEPControl_ActorRead::Recognize return Standard_False; } - const Standard_Boolean aCanReadTessGeom = (Interface_Static::IVal("read.step.tessellated") != 0); + const Standard_Boolean aCanReadTessGeom = aStepModel->InternalParameters.ReadTessellated != 0; if (start->IsKind(STANDARD_TYPE(StepShape_FacetedBrep))) return Standard_True; if (start->IsKind(STANDARD_TYPE(StepShape_BrepWithVoids))) return Standard_True; @@ -327,7 +333,7 @@ Handle(Transfer_Binder) STEPControl_ActorRead::Transfer } } // [END] Get version of preprocessor (to detect I-Deas case) (ssv; 23.11.2010) - Standard_Boolean aTrsfUse = (Interface_Static::IVal("read.step.root.transformation") == 1); + Standard_Boolean aTrsfUse = (aStepModel->InternalParameters.ReadRootTransformation == 1); return TransferShape(start, TP, aLocalFactors, Standard_True, aTrsfUse, theProgress); } @@ -431,10 +437,12 @@ static void getSDR(const Handle(StepRepr_ProductDefinitionShape)& PDS, Handle(TColStd_HSequenceOfTransient)& listSDRAspect, const Handle(Transfer_TransientProcess)& TP) { + Handle(StepData_StepModel) aStepModel = Handle(StepData_StepModel)::DownCast(TP->Model()); + // Flag indicating preferred shape representation type, to be chosen if // several different representations are attached to the same shape Standard_Integer delta = 100; - Standard_Integer ICS = Interface_Static::IVal("read.step.shape.repr"); + Standard_Integer ICS = aStepModel->InternalParameters.ReadShapeRepr; Standard_Integer nbSDR0 = listSDR->Length(); // Iterate by entities referring PDS @@ -534,17 +542,19 @@ static void getSDR(const Handle(StepRepr_ProductDefinitionShape)& PDS, continue; } } + + Handle(StepData_StepModel) aStepModel = Handle(StepData_StepModel)::DownCast(TP->Model()); // Flag indicating whether SDRs associated with the product`s main SDR // by SRRs (which correspond to hybrid model representation in AP203 since 1998) // should be taken into account - Standard_Integer readSRR = Interface_Static::IVal("read.step.shape.relationship"); + Standard_Integer readSRR = aStepModel->InternalParameters.ReadRelationship; - Standard_Integer readConstructiveGeomRR = Interface_Static::IVal("read.step.constructivegeom.relationship"); + Standard_Integer readConstructiveGeomRR = aStepModel->InternalParameters.ReadConstrRelation; // Flag indicating whether SDRs associated with the product`s main SDR // by SAs (which correspond to hybrid model representation in AP203 before 1998) // should be taken into account - Standard_Integer readSA = Interface_Static::IVal("read.step.shape.aspect"); + Standard_Integer readSA = aStepModel->InternalParameters.ReadShapeAspect; if ( ! readSA ) listSDRAspect->Clear(); @@ -558,7 +568,7 @@ static void getSDR(const Handle(StepRepr_ProductDefinitionShape)& PDS, // possibly attached directly to intermediate assemblies (1) // Special mode (4) is used to translate shape attached to this product only, // ignoring sub-assemblies if any - Standard_Integer readAssembly = Interface_Static::IVal("read.step.assembly.level"); + Standard_Integer readAssembly = aStepModel->InternalParameters.ReadAssemblyLevel; if ( readAssembly ==3 || ( readAssembly ==2 && listNAUO->Length() >0 ) ) listSDR->Clear(); else if ( readAssembly == 4 ) @@ -824,6 +834,7 @@ Handle(TransferBRep_ShapeBinder) STEPControl_ActorRead::TransferEntity( { NM_DETECTED = Standard_False; Handle(TransferBRep_ShapeBinder) shbinder; + Handle(StepData_StepModel) aStepModel = Handle(StepData_StepModel)::DownCast(TP->Model()); if(!Recognize(sr)) return shbinder; isBound = Standard_False; @@ -848,7 +859,7 @@ Handle(TransferBRep_ShapeBinder) STEPControl_ActorRead::TransferEntity( Standard_Integer nsh = 0; // [BEGIN] Proceed with non-manifold topology (ssv; 12.11.2010) - Standard_Boolean isNMMode = Interface_Static::IVal("read.step.nonmanifold") != 0; + Standard_Boolean isNMMode = aStepModel->InternalParameters.ReadNonmanifold != 0; Standard_Boolean isManifold = Standard_True; if ( isNMMode && sr->IsKind(STANDARD_TYPE(StepShape_NonManifoldSurfaceShapeRepresentation)) ) { isManifold = Standard_False; @@ -860,7 +871,7 @@ Handle(TransferBRep_ShapeBinder) STEPControl_ActorRead::TransferEntity( } // Special processing for I-DEAS STP case (ssv; 15.11.2010) else { - Standard_Integer isIDeasMode = Interface_Static::IVal("read.step.ideas"); + Standard_Integer isIDeasMode = aStepModel->InternalParameters.ReadIdeas; if (isNMMode && myNMTool.IsIDEASCase() && isIDeasMode) { isManifold = Standard_False; NM_DETECTED = Standard_True; @@ -1412,7 +1423,7 @@ Handle(TransferBRep_ShapeBinder) STEPControl_ActorRead::TransferEntity << start->DynamicType()->Name() << std::endl; chrono.Start(); #endif - + Handle(StepData_StepModel) aStepModel = Handle(StepData_StepModel)::DownCast(TP->Model()); //:S4136 StepData_Factors aLocalFactors = theLocalFactors; Handle(StepRepr_Representation) oldSRContext = mySRContext; @@ -1420,7 +1431,7 @@ Handle(TransferBRep_ShapeBinder) STEPControl_ActorRead::TransferEntity Handle(StepRepr_Representation) context = FindContext ( start, TP ); if ( context.IsNull() ) { TP->AddWarning ( start, "Entity with no unit context; default units taken" ); - ResetUnits(aLocalFactors); + ResetUnits(aStepModel, aLocalFactors); } else PrepareUnits ( context, TP, aLocalFactors); } @@ -1429,8 +1440,7 @@ Handle(TransferBRep_ShapeBinder) STEPControl_ActorRead::TransferEntity // Start progress scope (no need to check if progress exists -- it is safe) Message_ProgressScope aPS(theProgress, "Transfer stage", isManifold ? 2 : 1); - - const Standard_Boolean aReadTessellatedWhenNoBRepOnly = (Interface_Static::IVal("read.step.tessellated") == 2); + const Standard_Boolean aReadTessellatedWhenNoBRepOnly = (aStepModel->InternalParameters.ReadTessellated == 2); Standard_Boolean aHasGeom = Standard_True; try { OCC_CATCH_SIGNALS @@ -1631,11 +1641,12 @@ Handle(TransferBRep_ShapeBinder) STEPControl_ActorRead::TransferEntity myTF.Init(fs, myTool, dummyNMTool, theLocalFactors); Handle(StepRepr_Representation) oldSRContext = mySRContext; StepData_Factors aLocalFactors = theLocalFactors; + Handle(StepData_StepModel) aStepModel = Handle(StepData_StepModel)::DownCast(TP->Model()); if (mySRContext.IsNull()) { // if no context, try to find it (ex: r0701_ug.stp #4790) Handle(StepRepr_Representation) context = FindContext(fs, TP); if (context.IsNull()) { TP->AddWarning(fs, "Entity with no unit context; default units taken"); - ResetUnits(aLocalFactors); + ResetUnits(aStepModel, aLocalFactors); } else PrepareUnits(context, TP, aLocalFactors); } @@ -1695,13 +1706,13 @@ Handle(Transfer_Binder) STEPControl_ActorRead::TransferShape( #endif Handle(TransferBRep_ShapeBinder) shbinder; - + Handle(StepData_StepModel) aStepModel = Handle(StepData_StepModel)::DownCast(TP->Model()); // Product Definition Entities // They should be treated with Design Manager // case ShapeDefinitionRepresentation if ProductMode != ON - TCollection_AsciiString aProdMode = Interface_Static::CVal("read.step.product.mode"); - if(!aProdMode.IsEqual("ON") && + bool aProdMode = aStepModel->InternalParameters.ReadProductMode; + if(!aProdMode && start->IsKind(STANDARD_TYPE(StepShape_ShapeDefinitionRepresentation))) shbinder = OldWay(start,TP, theProgress); //skl @@ -1773,10 +1784,10 @@ void STEPControl_ActorRead::PrepareUnits(const Handle(StepRepr_Representation)& StepData_Factors& theLocalFactors) { mySRContext = rep; - + Handle(StepData_StepModel) aModel = Handle(StepData_StepModel)::DownCast(TP->Model()); Standard_Integer stat1, stat2 = 0; // sera alimente par STEPControl_Unit if (rep.IsNull()) { - ResetUnits(theLocalFactors); + ResetUnits(aModel, theLocalFactors); return; } @@ -1784,7 +1795,7 @@ void STEPControl_ActorRead::PrepareUnits(const Handle(StepRepr_Representation)& Handle(StepRepr_RepresentationContext) theRepCont = rep->ContextOfItems(); if (theRepCont.IsNull()) { TP->AddWarning(rep,"Bad RepresentationContext, default unit taken"); - ResetUnits(theLocalFactors); + ResetUnits(aModel, theLocalFactors); return; } @@ -1815,13 +1826,13 @@ void STEPControl_ActorRead::PrepareUnits(const Handle(StepRepr_Representation)& aTol = theGRCAGAUC->GlobalUncertaintyAssignedContext(); } - + Handle(StepData_StepModel) aStepModel = Handle(StepData_StepModel)::DownCast(TP->Model()); // ---------------------------------------------------- // Decoding and Setting the Values // ---------------------------------------------------- if (!theGUAC.IsNull()) { stat1 = myUnit.ComputeFactors(theGUAC, theLocalFactors); - Standard_Integer anglemode = Interface_Static::IVal("step.angleunit.mode"); + Standard_Integer anglemode = aStepModel->InternalParameters.AngleUnit; Standard_Real angleFactor = ( anglemode == 0 ? myUnit.PlaneAngleFactor() : anglemode == 1 ? 1. : M_PI/180. ); theLocalFactors.InitializeFactors(myUnit.LengthFactor(), @@ -1836,15 +1847,15 @@ void STEPControl_ActorRead::PrepareUnits(const Handle(StepRepr_Representation)& } // myPrecision = Precision::Confusion(); - if (Interface_Static::IVal("read.precision.mode") == 1) //:i1 gka S4136 05.04.99 - myPrecision = Interface_Static::RVal("read.precision.val"); + if (aStepModel->InternalParameters.ReadPrecisionMode == 1) //:i1 gka S4136 05.04.99 + myPrecision = aStepModel->InternalParameters.ReadPrecisionVal; else if (myUnit.HasUncertainty()) myPrecision = myUnit.Uncertainty() * myUnit.LengthFactor(); else { TP->AddWarning(theRepCont,"No Length Uncertainty, value of read.precision.val is taken"); - myPrecision = Interface_Static::RVal("read.precision.val"); + myPrecision = aStepModel->InternalParameters.ReadPrecisionVal; } - myMaxTol = Max ( myPrecision, Interface_Static::RVal("read.maxprecision.val") ); + myMaxTol = Max ( myPrecision, aStepModel->InternalParameters.ReadMaxPrecisionVal ); // Assign uncertainty #ifdef TRANSLOG if (TP->TraceLevel() > 1) @@ -1857,11 +1868,11 @@ void STEPControl_ActorRead::PrepareUnits(const Handle(StepRepr_Representation)& //purpose : //======================================================================= -void STEPControl_ActorRead::ResetUnits (StepData_Factors& theLocalFactors) +void STEPControl_ActorRead::ResetUnits (Handle(StepData_StepModel)& theModel, StepData_Factors& theLocalFactors) { theLocalFactors.InitializeFactors ( 1, 1, 1 ); - myPrecision = Interface_Static::RVal("read.precision.val"); - myMaxTol = Max ( myPrecision, Interface_Static::RVal("read.maxprecision.val") ); + myPrecision = theModel->InternalParameters.ReadPrecisionVal; + myMaxTol = Max ( myPrecision, theModel->InternalParameters.ReadMaxPrecisionVal ); } //======================================================================= @@ -2071,3 +2082,12 @@ void STEPControl_ActorRead::computeIDEASClosings(const TopoDS_Compound& comp, shellClosingsMap.Add(shellA, closingShells); } } + +//======================================================================= +// Method : SetModel +// Purpose : +//======================================================================= +void STEPControl_ActorRead::SetModel(const Handle(Interface_InterfaceModel)& theModel) +{ + myModel = theModel; +} diff --git a/src/STEPControl/STEPControl_ActorRead.hxx b/src/STEPControl/STEPControl_ActorRead.hxx index 7ca5e80516..66b7a13f52 100644 --- a/src/STEPControl/STEPControl_ActorRead.hxx +++ b/src/STEPControl/STEPControl_ActorRead.hxx @@ -26,6 +26,7 @@ #include #include #include +#include class StepRepr_Representation; class Standard_Transient; @@ -47,6 +48,7 @@ class TopoDS_Shell; class TopoDS_Compound; class StepRepr_ConstructiveGeometryRepresentationRelationship; class StepData_Factors; +class StepData_StepModel; class STEPControl_ActorRead; @@ -62,8 +64,7 @@ class STEPControl_ActorRead : public Transfer_ActorOfTransientProcess public: - - Standard_EXPORT STEPControl_ActorRead(); + Standard_EXPORT STEPControl_ActorRead(const Handle(Interface_InterfaceModel)& theModel); Standard_EXPORT virtual Standard_Boolean Recognize (const Handle(Standard_Transient)& start) Standard_OVERRIDE; @@ -88,7 +89,11 @@ public: //! reset units and tolerances context to default //! (mm, radians, read.precision.val, etc.) - Standard_EXPORT void ResetUnits(StepData_Factors& theLocalFactors); + Standard_EXPORT void ResetUnits(Handle(StepData_StepModel)& theModel, + StepData_Factors& theLocalFactors); + + //! Set model + Standard_EXPORT void SetModel(const Handle(Interface_InterfaceModel)& theModel); //! Computes transformation defined by two axis placements (in MAPPED_ITEM //! or ITEM_DEFINED_TRANSFORMATION) taking into account their @@ -205,7 +210,7 @@ private: Standard_Real myPrecision; Standard_Real myMaxTol; Handle(StepRepr_Representation) mySRContext; - + Handle(Interface_InterfaceModel) myModel; }; diff --git a/src/STEPControl/STEPControl_ActorWrite.cxx b/src/STEPControl/STEPControl_ActorWrite.cxx index b96d0d8e42..f3256d0146 100644 --- a/src/STEPControl/STEPControl_ActorWrite.cxx +++ b/src/STEPControl/STEPControl_ActorWrite.cxx @@ -545,12 +545,12 @@ Handle(Transfer_Binder) STEPControl_ActorWrite::Transfer (const Handle(Transfer_ } Standard_Real aLFactor = model->WriteLengthUnit(); aLFactor /= model->LocalLengthUnit(); - Standard_Integer anglemode = Interface_Static::IVal("step.angleunit.mode"); + const Standard_Integer anglemode = model->InternalParameters.AngleUnit; StepData_Factors aLocalFactors; aLocalFactors.InitializeFactors(aLFactor, (anglemode <= 1 ? 1. : M_PI / 180.), 1.); // create SDR STEPConstruct_Part SDRTool; - SDRTool.MakeSDR ( 0, myContext.GetProductName(), myContext.GetAPD()->Application() ); + SDRTool.MakeSDR ( 0, myContext.GetProductName(), myContext.GetAPD()->Application(), model); Handle(StepShape_ShapeDefinitionRepresentation) sdr = SDRTool.SDRValue(); // transfer shape @@ -575,18 +575,18 @@ Handle(Transfer_Binder) STEPControl_ActorWrite::Transfer (const Handle(Transfer_ //========================================== -static Standard_Real UsedTolerance (const Standard_Real mytoler, - const TopoDS_Shape& theShape) +static Standard_Real UsedTolerance (Handle(StepData_StepModel)& theStepModel, + const Standard_Real mytoler, + const TopoDS_Shape& theShape) { // COMPUTING 3D TOLERANCE // Either from Session, or Computed (Least,Average, or Greatest) // Then given to TopoDSToStep_Tool - Standard_Real Tol = mytoler; - Standard_Integer tolmod = Interface_Static::IVal("write.precision.mode"); + Standard_Integer tolmod = theStepModel->InternalParameters.WritePrecisionMode; if (Tol <= 0 && tolmod == 2) Tol = - Interface_Static::RVal("write.precision.val"); + theStepModel->InternalParameters.WritePrecisionVal; if (Tol <= 0) { ShapeAnalysis_ShapeTolerance stu; Tol = stu.Tolerance (theShape,tolmod); @@ -605,11 +605,12 @@ static Standard_Real UsedTolerance (const Standard_Real mytoler, // if GroupMode is >1 downgrades all compounds having single subshape to that // subshape -Standard_Boolean STEPControl_ActorWrite::IsAssembly (TopoDS_Shape &S) const +Standard_Boolean STEPControl_ActorWrite::IsAssembly (const Handle(StepData_StepModel)& theModel, + TopoDS_Shape &S) const { if ( ! GroupMode() || S.ShapeType() != TopAbs_COMPOUND ) return Standard_False; // PTV 16.09.2002 OCC725 for storing compound of vertices - if (Interface_Static::IVal("write.step.vertex.mode") == 0) {//bug 23950 + if (theModel->InternalParameters.WriteVertexMode == 0) {//bug 23950 if (S.ShapeType() == TopAbs_COMPOUND ) { Standard_Boolean IsOnlyVertices = Standard_True; TopoDS_Iterator anItr( S ); @@ -630,7 +631,7 @@ Standard_Boolean STEPControl_ActorWrite::IsAssembly (TopoDS_Shape &S) const it.Next(); if ( it.More() ) return Standard_True; S = shape; - return IsAssembly ( S ); + return IsAssembly ( theModel, S ); } //======================================================================= @@ -669,7 +670,8 @@ static Standard_Boolean transferVertex (const Handle(Transfer_FinderProcess)& FP { Standard_Boolean IsDone = Standard_False; MoniTool_DataMapOfShapeTransient aMap; - TopoDSToStep_Tool aTool(aMap, Standard_True); + Handle(StepData_StepModel) aStepModel = Handle(StepData_StepModel)::DownCast(FP->Model()); + TopoDSToStep_Tool aTool(aMap, Standard_True, aStepModel->InternalParameters.WriteSurfaceCurMode); TopoDSToStep_MakeStepVertex aMkVrtx ( TopoDS::Vertex(aShVrtx), aTool, FP, theLocalFactors ); if (!aMkVrtx.IsDone()) @@ -701,6 +703,7 @@ Handle(Transfer_Binder) STEPControl_ActorWrite::TransferShape STEPControl_StepModelType mymode = Mode(); Handle(TransferBRep_ShapeMapper) mapper = Handle(TransferBRep_ShapeMapper)::DownCast(start); Handle(Transfer_Binder) binder; + Handle(StepData_StepModel) aStepModel = Handle(StepData_StepModel)::DownCast(FP->Model()); // Indicates whether to use an existing NMSSR to write items to (ss; 13.11.2010) Standard_Boolean useExistingNMSSR = Standard_False; @@ -724,13 +727,13 @@ Handle(Transfer_Binder) STEPControl_ActorWrite::TransferShape } // MODE ASSEMBLY : if Compound, (sub-)assembly - if ( IsAssembly(theShape) ) + if ( IsAssembly(aStepModel, theShape) ) return TransferCompound(start, SDR0, FP, theLocalFactors, theProgress); Message_ProgressScope aPSRoot(theProgress, NULL, 2); // [BEGIN] Separate manifold topology from non-manifold in group mode 0 (ssv; 18.11.2010) - Standard_Boolean isNMMode = Interface_Static::IVal("write.step.nonmanifold") != 0; + Standard_Boolean isNMMode = aStepModel->InternalParameters.WriteNonmanifold != 0; Handle(Transfer_Binder) aNMBinder; if (isNMMode && !GroupMode() && theShape.ShapeType() == TopAbs_COMPOUND) { TopoDS_Compound aNMCompound; @@ -823,7 +826,7 @@ Handle(Transfer_Binder) STEPControl_ActorWrite::TransferShape sdr = SDR0; else { STEPConstruct_Part SDRTool; - SDRTool.MakeSDR( 0, myContext.GetProductName(), myContext.GetAPD()->Application() ); + SDRTool.MakeSDR( 0, myContext.GetProductName(), myContext.GetAPD()->Application(), aStepModel ); sdr = SDRTool.SDRValue(); } @@ -854,7 +857,7 @@ Handle(Transfer_Binder) STEPControl_ActorWrite::TransferShape Handle(TopTools_HSequenceOfShape) RepItemSeq = new TopTools_HSequenceOfShape(); Standard_Boolean isSeparateVertices = - Interface_Static::IVal("write.step.vertex.mode") == 0;//bug 23950 + aStepModel->InternalParameters.WriteVertexMode == 0;//bug 23950 // PTV 16.09.2002 OCC725 separate shape from solo vertices. Standard_Boolean isOnlyVertices = Standard_False; if (theShape.ShapeType() == TopAbs_COMPOUND && isSeparateVertices) @@ -957,7 +960,7 @@ Handle(Transfer_Binder) STEPControl_ActorWrite::TransferShape // COMPUTING 3D TOLERANCE // Either from Session, or Computed (Least,Average, or Greatest) // Then given to TopoDSToStep_Tool - Standard_Real Tol = UsedTolerance (mytoler,theShape); + Standard_Real Tol = UsedTolerance (aStepModel, mytoler,theShape); // Create a STEP-Entity for each TopoDS_Shape // according to the current StepModelMode @@ -999,7 +1002,7 @@ Handle(Transfer_Binder) STEPControl_ActorWrite::TransferShape if (hasGeometry(aShape)) { - Standard_Real maxTol = Interface_Static::RVal("read.maxprecision.val"); + Standard_Real maxTol = aStepModel->InternalParameters.ReadMaxPrecisionVal; aShape = XSAlgo::AlgoContainer()->ProcessShape(xShape, Tol, maxTol, "write.step.resource.name", @@ -1323,7 +1326,7 @@ Handle(Transfer_Binder) STEPControl_ActorWrite::TransferShape GetCasted(StepRepr_RepresentationItem, ItemSeq->Value(rep)); items->SetValue(rep,repit); } - Standard_Integer ap = Interface_Static::IVal("write.step.schema"); + Standard_Integer ap = aStepModel->InternalParameters.WriteSchema; Transfer_SequenceOfBinder aSeqBindRelation; if(ap == 3 && nbs > 1) { Standard_Integer j = 1; @@ -1353,7 +1356,7 @@ Handle(Transfer_Binder) STEPControl_ActorWrite::TransferShape repr1->SetValue(2,items->Value(j)); ShapeRepr1->SetItems(repr1); STEPConstruct_UnitContext mk1; - mk1.Init(Tol, theLocalFactors); + mk1.Init(Tol, aStepModel, theLocalFactors); ShapeRepr1->SetContextOfItems(mk1.Value()); // la tolerance, voir au debut ShapeRepr1->SetName (new TCollection_HAsciiString("")); @@ -1390,7 +1393,7 @@ Handle(Transfer_Binder) STEPControl_ActorWrite::TransferShape Handle(StepShape_ShapeRepresentation) shapeTessRepr = new StepVisual_TessellatedShapeRepresentation; shapeTessRepr->SetItems(itemsTess); STEPConstruct_UnitContext mk1; - mk1.Init(Tol, theLocalFactors); + mk1.Init(Tol, aStepModel, theLocalFactors); shapeTessRepr->SetContextOfItems(mk1.Value()); shapeTessRepr->SetName(new TCollection_HAsciiString("")); @@ -1413,7 +1416,7 @@ Handle(Transfer_Binder) STEPControl_ActorWrite::TransferShape // init representation STEPConstruct_UnitContext mk; - mk.Init(Tol, theLocalFactors); + mk.Init(Tol, aStepModel, theLocalFactors); shapeRep->SetContextOfItems(mk.Value()); // la tolerance, voir au debut shapeRep->SetName (new TCollection_HAsciiString("")); @@ -1459,8 +1462,10 @@ Handle(Transfer_Binder) STEPControl_ActorWrite::TransferCompound if (mapper.IsNull()) return binder; TopoDS_Shape theShape = mapper->Value(); + Handle(StepData_StepModel) aStepModel = Handle(StepData_StepModel)::DownCast(FP->Model()); + // Inspect non-manifold topology case (ssv; 10.11.2010) - Standard_Boolean isNMMode = Interface_Static::IVal("write.step.nonmanifold") != 0; + Standard_Boolean isNMMode = aStepModel->InternalParameters.WriteNonmanifold != 0; Standard_Boolean isManifold; if (isNMMode) isManifold = IsManifoldShape(theShape); @@ -1472,7 +1477,7 @@ Handle(Transfer_Binder) STEPControl_ActorWrite::TransferCompound // Prepare a collection for non-manifold group of shapes Handle(TopTools_HSequenceOfShape) NonManifoldGroup = new TopTools_HSequenceOfShape(); Standard_Boolean isSeparateVertices = - (Interface_Static::IVal("write.step.vertex.mode") == 0);//bug 23950 + (aStepModel->InternalParameters.WriteVertexMode == 0);//bug 23950 // PTV OCC725 17.09.2002 -- begin -- Standard_Integer nbFreeVrtx = 0; TopoDS_Compound aCompOfVrtx; @@ -1560,9 +1565,9 @@ Handle(Transfer_Binder) STEPControl_ActorWrite::TransferCompound for (Standard_Integer rep = 1; rep <= nsub; rep++) items->SetValue(rep,GetCasted(StepRepr_RepresentationItem, ItemSeq->Value(rep))); shapeRep->SetItems(items); - Standard_Real Tol = UsedTolerance (mytoler,theShape); + Standard_Real Tol = UsedTolerance (aStepModel, mytoler,theShape); STEPConstruct_UnitContext mk; - mk.Init(Tol, theLocalFactors); + mk.Init(Tol, aStepModel, theLocalFactors); shapeRep->SetContextOfItems(mk.Value()); // la tolerance, voir au debut shapeRep->SetName (new TCollection_HAsciiString("")); @@ -1612,14 +1617,15 @@ Handle(Transfer_Binder) STEPControl_ActorWrite::TransferSubShape Handle(Transfer_Binder) resbind = FP->Find(mapper); Handle(StepShape_ShapeDefinitionRepresentation) sdr; // Handle(StepShape_ShapeRepresentation) resultat; - STEPConstruct_Part SDRTool; + STEPConstruct_Part SDRTool; + Handle(StepData_StepModel) aStepModel = Handle(StepData_StepModel)::DownCast(FP->Model()); // Already SDR and SR available : take them as are Standard_Boolean iasdr = FP->GetTypedTransient (resbind,STANDARD_TYPE(StepShape_ShapeDefinitionRepresentation),sdr); if ( iasdr ) SDRTool.ReadSDR ( sdr ); else { - SDRTool.MakeSDR ( 0, myContext.GetProductName(), myContext.GetAPD()->Application() ); + SDRTool.MakeSDR ( 0, myContext.GetProductName(), myContext.GetAPD()->Application(), aStepModel ); sdr = SDRTool.SDRValue(); } // resultat = GetCasted(StepShape_ShapeRepresentation,sdr->UsedRepresentation()); diff --git a/src/STEPControl/STEPControl_ActorWrite.hxx b/src/STEPControl/STEPControl_ActorWrite.hxx index 960abaadef..5cf5aca20e 100644 --- a/src/STEPControl/STEPControl_ActorWrite.hxx +++ b/src/STEPControl/STEPControl_ActorWrite.hxx @@ -96,7 +96,8 @@ public: //! Default implementation uses flag GroupMode and analyses //! the shape itself //! NOTE: this method can modify shape - Standard_EXPORT virtual Standard_Boolean IsAssembly (TopoDS_Shape& S) const; + Standard_EXPORT virtual Standard_Boolean IsAssembly (const Handle(StepData_StepModel)& theModel, + TopoDS_Shape& S) const; diff --git a/src/STEPControl/STEPControl_Controller.cxx b/src/STEPControl/STEPControl_Controller.cxx index 87737b0aaf..2b45463e6a 100644 --- a/src/STEPControl/STEPControl_Controller.cxx +++ b/src/STEPControl/STEPControl_Controller.cxx @@ -23,6 +23,7 @@ #include #include #include +#include #include #include #include @@ -35,6 +36,8 @@ #include #include #include +#include +#include #include #include #include @@ -323,14 +326,12 @@ STEPControl_Controller::STEPControl_Controller () aMutex.Unlock(); Handle(STEPControl_ActorWrite) ActWrite = new STEPControl_ActorWrite; - ActWrite->SetGroupMode (Interface_Static::IVal("write.step.assembly")); myAdaptorWrite = ActWrite; Handle(StepSelect_WorkLibrary) swl = new StepSelect_WorkLibrary; swl->SetDumpLabel(1); myAdaptorLibrary = swl; myAdaptorProtocol = STEPEdit::Protocol(); - myAdaptorRead = new STEPControl_ActorRead; // par ex pour Recognize SetModeWrite (0,4); SetModeWriteHelp (0,"As Is"); @@ -405,6 +406,20 @@ Handle(Interface_InterfaceModel) STEPControl_Controller::NewModel () const return STEPEdit::NewModel(); } +//======================================================================= +//function : ActorRead +//purpose : +//======================================================================= +Handle(Transfer_ActorOfTransientProcess) STEPControl_Controller::ActorRead(const Handle(Interface_InterfaceModel)& theModel) const +{ + DeclareAndCast(STEPControl_ActorRead, anAdap, myAdaptorRead); + if (anAdap.IsNull()) { + anAdap = new STEPControl_ActorRead(theModel); + anAdap->SetModel(theModel); + } + return anAdap; +} + // #### PROVISOIRE ??? #### IFSelect_ReturnStatus STEPControl_Controller::TransferWriteShape @@ -419,7 +434,7 @@ IFSelect_ReturnStatus STEPControl_Controller::TransferWriteShape Handle(STEPControl_ActorWrite)::DownCast(myAdaptorWrite); // A PRESENT ON PASSE PAR LE PROFILE if (!ActWrite.IsNull()) - ActWrite->SetGroupMode (Interface_Static::IVal("write.step.assembly")); + ActWrite->SetGroupMode (Handle(StepData_StepModel)::DownCast(model)->InternalParameters.WriteAssembly); return XSControl_Controller::TransferWriteShape(shape, FP, model, modeshape, theProgress); } diff --git a/src/STEPControl/STEPControl_Controller.hxx b/src/STEPControl/STEPControl_Controller.hxx index 83e897b31c..f61f9b540f 100644 --- a/src/STEPControl/STEPControl_Controller.hxx +++ b/src/STEPControl/STEPControl_Controller.hxx @@ -46,7 +46,10 @@ public: //! Creates a new empty Model ready to receive data of the Norm. //! It is taken from STEP Template Model Standard_EXPORT Handle(Interface_InterfaceModel) NewModel() const Standard_OVERRIDE; - + + //! Returns the Actor for Read attached to the pair (norm,appli) + Standard_EXPORT Handle(Transfer_ActorOfTransientProcess) ActorRead(const Handle(Interface_InterfaceModel)& theModel) const Standard_OVERRIDE; + Standard_EXPORT virtual void Customise (Handle(XSControl_WorkSession)& WS) Standard_OVERRIDE; //! Takes one Shape and transfers it to the InterfaceModel diff --git a/src/STEPControl/STEPControl_Reader.cxx b/src/STEPControl/STEPControl_Reader.cxx index 01d992421d..a35346360d 100644 --- a/src/STEPControl/STEPControl_Reader.cxx +++ b/src/STEPControl/STEPControl_Reader.cxx @@ -12,9 +12,12 @@ // commercial license or contractual agreement. +#include #include #include #include +#include +#include #include #include #include @@ -93,6 +96,150 @@ Handle(StepData_StepModel) STEPControl_Reader::StepModel () const return Handle(StepData_StepModel)::DownCast(Model()); } +//======================================================================= +//function : ReadFile +//purpose : +//======================================================================= +IFSelect_ReturnStatus STEPControl_Reader::ReadFile(const Standard_CString filename) +{ + Handle(IFSelect_WorkLibrary) aLibrary = WS()->WorkLibrary(); + Handle(Interface_Protocol) aProtocol = WS()->Protocol(); + if (aLibrary.IsNull()) return IFSelect_RetVoid; + if (aProtocol.IsNull()) return IFSelect_RetVoid; + Handle(StepData_StepModel) aStepModel = new StepData_StepModel; + aStepModel->InternalParameters.InitFromStatic(); + aStepModel->SetSourceCodePage(aStepModel->InternalParameters.ReadCodePage); + IFSelect_ReturnStatus status = IFSelect_RetVoid; + try { + OCC_CATCH_SIGNALS + Standard_Integer stat = aLibrary->ReadFile(filename, aStepModel, aProtocol); + if (stat == 0) status = IFSelect_RetDone; + else if (stat < 0) status = IFSelect_RetError; + else status = IFSelect_RetFail; + } + catch (Standard_Failure const& anException) { + Message_Messenger::StreamBuffer sout = Message::SendInfo(); + sout << " **** Interruption ReadFile par Exception : ****\n"; + sout << anException.GetMessageString(); + sout << "\n Abandon" << std::endl; + status = IFSelect_RetFail; + } + if (status != IFSelect_RetDone) return status; + WS()->SetModel(aStepModel); + WS()->SetLoadedFile(filename); + WS()->InitTransferReader(4); + return status; +} + +//======================================================================= +//function : ReadFile +//purpose : +//======================================================================= +IFSelect_ReturnStatus STEPControl_Reader::ReadFile(const Standard_CString filename, + const StepData_ConfParameters& theParams) +{ + Handle(IFSelect_WorkLibrary) aLibrary = WS()->WorkLibrary(); + Handle(Interface_Protocol) aProtocol = WS()->Protocol(); + if (aLibrary.IsNull()) return IFSelect_RetVoid; + if (aProtocol.IsNull()) return IFSelect_RetVoid; + Handle(StepData_StepModel) aStepModel = new StepData_StepModel; + aStepModel->InternalParameters = theParams; + aStepModel->SetSourceCodePage(aStepModel->InternalParameters.ReadCodePage); + IFSelect_ReturnStatus status = IFSelect_RetVoid; + try { + OCC_CATCH_SIGNALS + Standard_Integer stat = aLibrary->ReadFile(filename, aStepModel, aProtocol); + if (stat == 0) status = IFSelect_RetDone; + else if (stat < 0) status = IFSelect_RetError; + else status = IFSelect_RetFail; + } + catch (Standard_Failure const& anException) { + Message_Messenger::StreamBuffer sout = Message::SendInfo(); + sout << " **** Interruption ReadFile par Exception : ****\n"; + sout << anException.GetMessageString(); + sout << "\n Abandon" << std::endl; + status = IFSelect_RetFail; + } + if (status != IFSelect_RetDone) return status; + WS()->SetModel(aStepModel); + WS()->SetLoadedFile(filename); + WS()->InitTransferReader(4); + return status; +} + +//======================================================================= +//function : ReadStream +//purpose : +//======================================================================= +IFSelect_ReturnStatus STEPControl_Reader::ReadStream(const Standard_CString theName, + std::istream& theIStream) +{ + Handle(IFSelect_WorkLibrary) aLibrary = WS()->WorkLibrary(); + Handle(Interface_Protocol) aProtocol = WS()->Protocol(); + if (aLibrary.IsNull()) return IFSelect_RetVoid; + if (aProtocol.IsNull()) return IFSelect_RetVoid; + Handle(StepData_StepModel) aStepModel = new StepData_StepModel; + aStepModel->InternalParameters.InitFromStatic(); + aStepModel->SetSourceCodePage(aStepModel->InternalParameters.ReadCodePage); + IFSelect_ReturnStatus status = IFSelect_RetVoid; + try { + OCC_CATCH_SIGNALS + Standard_Integer stat = aLibrary->ReadStream(theName, theIStream, aStepModel, aProtocol); + if (stat == 0) status = IFSelect_RetDone; + else if (stat < 0) status = IFSelect_RetError; + else status = IFSelect_RetFail; + } + catch (Standard_Failure const& anException) { + Message_Messenger::StreamBuffer sout = Message::SendInfo(); + sout << " **** Interruption ReadFile par Exception : ****\n"; + sout << anException.GetMessageString(); + sout << "\n Abandon" << std::endl; + status = IFSelect_RetFail; + } + if (status != IFSelect_RetDone) return status; + WS()->SetModel(aStepModel); + WS()->SetLoadedFile(theName); + WS()->InitTransferReader(4); + return status; +} + +//======================================================================= +//function : ReadStream +//purpose : +//======================================================================= +IFSelect_ReturnStatus STEPControl_Reader::ReadStream(const Standard_CString theName, + const StepData_ConfParameters& theParams, + std::istream& theIStream) +{ + Handle(IFSelect_WorkLibrary) aLibrary = WS()->WorkLibrary(); + Handle(Interface_Protocol) aProtocol = WS()->Protocol(); + if (aLibrary.IsNull()) return IFSelect_RetVoid; + if (aProtocol.IsNull()) return IFSelect_RetVoid; + Handle(StepData_StepModel) aStepModel = new StepData_StepModel; + aStepModel->InternalParameters = theParams; + aStepModel->SetSourceCodePage(aStepModel->InternalParameters.ReadCodePage); + IFSelect_ReturnStatus status = IFSelect_RetVoid; + try { + OCC_CATCH_SIGNALS + Standard_Integer stat = aLibrary->ReadStream(theName, theIStream, aStepModel, aProtocol); + if (stat == 0) status = IFSelect_RetDone; + else if (stat < 0) status = IFSelect_RetError; + else status = IFSelect_RetFail; + } + catch (Standard_Failure const& anException) { + Message_Messenger::StreamBuffer sout = Message::SendInfo(); + sout << " **** Interruption ReadFile par Exception : ****\n"; + sout << anException.GetMessageString(); + sout << "\n Abandon" << std::endl; + status = IFSelect_RetFail; + } + if (status != IFSelect_RetDone) return status; + WS()->SetModel(aStepModel); + WS()->SetLoadedFile(theName); + WS()->InitTransferReader(4); + return status; +} + //======================================================================= //function : TransferRoot //purpose : @@ -114,11 +261,12 @@ Standard_Integer STEPControl_Reader::NbRootsForTransfer() if (therootsta) return theroots.Length(); therootsta = Standard_True; + Handle(StepData_StepModel) aStepModel = Handle(StepData_StepModel)::DownCast(WS()->Model()); //theroots.Clear(); Standard_Integer nb = Model()->NbEntities(); for (Standard_Integer i = 1; i <= nb; i ++) { Handle(Standard_Transient) ent = Model()->Value(i); - if (Interface_Static::IVal("read.step.all.shapes") == 1) { + if (aStepModel->InternalParameters.ReadAllShapes == 1) { // Special case to read invalid shape_representation without links to shapes. if (ent->IsKind(STANDARD_TYPE(StepShape_ManifoldSolidBrep))) { Interface_EntityIterator aShareds = WS()->Graph().Sharings(ent); @@ -178,8 +326,9 @@ Standard_Integer STEPControl_Reader::NbRootsForTransfer() } // determinate roots used ProductDefinitionContext if(IsRoot) { - const char *str1 = Interface_Static::CVal("read.step.product.context"); - Standard_Integer ICS = Interface_Static::IVal("read.step.product.context"); + StepData_ConfParameters::ReadMode_ProductContext aProdContMode = aStepModel->InternalParameters.ReadProductContext; + TCollection_AsciiString str1 = aStepModel->InternalParameters.GetString(aProdContMode); + Standard_Integer ICS = aStepModel->InternalParameters.ReadProductContext; if(ICS>1) { subs = graph.Shareds(PD); for(subs.Start(); subs.More(); subs.Next()) { @@ -188,7 +337,7 @@ Standard_Integer STEPControl_Reader::NbRootsForTransfer() if (PDC.IsNull()) continue; const char *str2 = PDC->LifeCycleStage()->String().ToCString(); const char *str3 = PDC->Name()->String().ToCString(); - if( !( strcasecmp(str1,str2)==0 || strcasecmp(str1,str3)==0 ) ) + if( !( strcasecmp(str1.ToCString(),str2)==0 || strcasecmp(str1.ToCString(),str3) == 0)) IsRoot=Standard_False; } } @@ -212,8 +361,8 @@ Standard_Integer STEPControl_Reader::NbRootsForTransfer() WS()->TransferReader()->TransientProcess()->RootsForTransfer()->Append(ent); } } - TCollection_AsciiString aProdMode = Interface_Static::CVal("read.step.product.mode"); - if(!aProdMode.IsEqual("ON")) { + bool aProdMode = aStepModel->InternalParameters.ReadProductMode; + if(!aProdMode) { if(ent->IsKind(STANDARD_TYPE(StepShape_ShapeDefinitionRepresentation))) { Standard_Boolean IsRoot = Standard_True; Handle(StepShape_ShapeDefinitionRepresentation) SDR = @@ -440,6 +589,10 @@ void STEPControl_Reader::FileUnits( TColStd_SequenceOfAsciiString& theUnitLength //======================================================================= void STEPControl_Reader::SetSystemLengthUnit(const Standard_Real theLengthUnit) { + if (StepModel().IsNull()) + { + return; + } StepModel()->SetLocalLengthUnit(theLengthUnit); } @@ -449,6 +602,10 @@ void STEPControl_Reader::SetSystemLengthUnit(const Standard_Real theLengthUnit) //======================================================================= Standard_Real STEPControl_Reader::SystemLengthUnit() const { + if (StepModel().IsNull()) + { + return 1.; + } return StepModel()->LocalLengthUnit(); } diff --git a/src/STEPControl/STEPControl_Reader.hxx b/src/STEPControl/STEPControl_Reader.hxx index 5973caa517..86550b9737 100644 --- a/src/STEPControl/STEPControl_Reader.hxx +++ b/src/STEPControl/STEPControl_Reader.hxx @@ -23,6 +23,7 @@ #include #include +#include #include #include #include @@ -83,6 +84,24 @@ public: //! Returns the model as a StepModel. //! It can then be consulted (header, product) Standard_EXPORT Handle(StepData_StepModel) StepModel() const; + + //! Loads a file and returns the read status + //! Zero for a Model which compies with the Controller + Standard_EXPORT virtual IFSelect_ReturnStatus ReadFile(const Standard_CString filename) Standard_OVERRIDE; + + //! Loads a file from stream and returns the read status + Standard_EXPORT virtual IFSelect_ReturnStatus ReadStream(const Standard_CString theName, + std::istream& theIStream) Standard_OVERRIDE; + + //! Loads a file and returns the read status + //! Zero for a Model which compies with the Controller + Standard_EXPORT IFSelect_ReturnStatus ReadFile(const Standard_CString filename, + const StepData_ConfParameters& theParams); + + //! Loads a file from stream and returns the read status + Standard_EXPORT IFSelect_ReturnStatus ReadStream(const Standard_CString theName, + const StepData_ConfParameters& theParams, + std::istream& theIStream); //! Transfers a root given its rank in the list of candidate roots //! Default is the first one @@ -99,10 +118,12 @@ public: //! found in file Standard_EXPORT void FileUnits (TColStd_SequenceOfAsciiString& theUnitLengthNames, TColStd_SequenceOfAsciiString& theUnitAngleNames, TColStd_SequenceOfAsciiString& theUnitSolidAngleNames); - //! Sets system length unit used by transfer process + //! Sets system length unit used by transfer process. + //! Performs only if a model is not NULL Standard_EXPORT void SetSystemLengthUnit(const Standard_Real theLengthUnit); - //! Returns system length unit used by transfer process + //! Returns system length unit used by transfer process. + //! Performs only if a model is not NULL Standard_EXPORT Standard_Real SystemLengthUnit() const; diff --git a/src/STEPControl/STEPControl_Writer.cxx b/src/STEPControl/STEPControl_Writer.cxx index 96756267ec..e16cb584c3 100644 --- a/src/STEPControl/STEPControl_Writer.cxx +++ b/src/STEPControl/STEPControl_Writer.cxx @@ -17,6 +17,7 @@ #include #include #include +#include #include #include #include @@ -127,6 +128,21 @@ IFSelect_ReturnStatus STEPControl_Writer::Transfer const STEPControl_StepModelType mode, const Standard_Boolean compgraph, const Message_ProgressRange& theProgress) +{ + Handle(StepData_StepModel) aStepModel = Handle(StepData_StepModel)::DownCast(thesession->Model()); + if (!aStepModel.IsNull()) + { + aStepModel->InternalParameters.InitFromStatic(); + } + return Transfer(sh, mode, aStepModel->InternalParameters, compgraph, theProgress); +} + +IFSelect_ReturnStatus STEPControl_Writer::Transfer + (const TopoDS_Shape& sh, + const STEPControl_StepModelType mode, + const StepData_ConfParameters& theParams, + const Standard_Boolean compgraph, + const Message_ProgressRange& theProgress) { Standard_Integer mws = -1; switch (mode) { @@ -144,6 +160,13 @@ IFSelect_ReturnStatus STEPControl_Writer::Transfer XSAlgo::AlgoContainer()->PrepareForTransfer(); // update unit info Model()->SetLocalLengthUnit(UnitsMethods::GetCasCadeLengthUnit()); } + if (!thesession->Model().IsNull()) + { + Handle(StepData_StepModel)::DownCast(thesession->Model())->InternalParameters = theParams; + } + Handle(STEPControl_ActorWrite) ActWrite = + Handle(STEPControl_ActorWrite)::DownCast(WS()->NormAdaptor()->ActorWrite()); + ActWrite->SetGroupMode(Handle(StepData_StepModel)::DownCast(thesession->Model())->InternalParameters.WriteAssembly); return thesession->TransferWriteShape(sh, compgraph, theProgress); } diff --git a/src/STEPControl/STEPControl_Writer.hxx b/src/STEPControl/STEPControl_Writer.hxx index d179c0f722..312a6fb0fc 100644 --- a/src/STEPControl/STEPControl_Writer.hxx +++ b/src/STEPControl/STEPControl_Writer.hxx @@ -23,6 +23,7 @@ #include #include +#include #include #include #include @@ -89,6 +90,14 @@ public: const Standard_Boolean compgraph = Standard_True, const Message_ProgressRange& theProgress = Message_ProgressRange()); + //! Translates shape sh to a STEP entity + Standard_EXPORT IFSelect_ReturnStatus Transfer + (const TopoDS_Shape& sh, + const STEPControl_StepModelType mode, + const StepData_ConfParameters& theParams, + const Standard_Boolean compgraph = Standard_True, + const Message_ProgressRange& theProgress = Message_ProgressRange()); + //! Writes a STEP model in the file identified by filename. Standard_EXPORT IFSelect_ReturnStatus Write (const Standard_CString theFileName); diff --git a/src/StepData/FILES b/src/StepData/FILES index 65edda095b..f1de2437c0 100644 --- a/src/StepData/FILES +++ b/src/StepData/FILES @@ -1,6 +1,8 @@ StepData.cxx StepData.hxx StepData_Array1OfField.hxx +StepData_ConfParameters.cxx +StepData_ConfParameters.hxx StepData_DefaultGeneral.cxx StepData_DefaultGeneral.hxx StepData_Described.cxx diff --git a/src/StepData/StepData_ConfParameters.cxx b/src/StepData/StepData_ConfParameters.cxx new file mode 100644 index 0000000000..d3416d2696 --- /dev/null +++ b/src/StepData/StepData_ConfParameters.cxx @@ -0,0 +1,90 @@ +// Copyright (c) 2023 OPEN CASCADE SAS +// +// This file is part of Open CASCADE Technology software library. +// +// This library is free software; you can redistribute it and/or modify it under +// the terms of the GNU Lesser General Public License version 2.1 as published +// by the Free Software Foundation, with special exception defined in the file +// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT +// distribution for complete text of the license and disclaimer of any warranty. +// +// Alternatively, this file may be used under the terms of Open CASCADE +// commercial license or contractual agreement. + +#include + +#include + +//======================================================================= +// function : StepData_ConfParameters +// purpose : +//======================================================================= +StepData_ConfParameters::StepData_ConfParameters() +{} + +//======================================================================= +// function : InitParameters +// purpose : +//======================================================================= +void StepData_ConfParameters::InitFromStatic() +{ + ReadBSplineContinuity = (StepData_ConfParameters::ReadMode_BSplineContinuity)Interface_Static::IVal("read.iges.bspline.continuity"); + ReadPrecisionMode = (StepData_ConfParameters::ReadMode_Precision)Interface_Static::IVal("read.precision.mode"); + ReadPrecisionVal = Interface_Static::RVal("read.precision.val"); + ReadMaxPrecisionMode = (StepData_ConfParameters::ReadMode_MaxPrecision)Interface_Static::IVal("read.maxprecision.mode"); + ReadMaxPrecisionVal = Interface_Static::RVal("read.maxprecision.val"); + ReadSameParamMode = Interface_Static::IVal("read.stdsameparameter.mode") == 1; + ReadSurfaceCurveMode = (StepData_ConfParameters::ReadMode_SurfaceCurve)Interface_Static::IVal("read.surfacecurve.mode"); + EncodeRegAngle = Interface_Static::RVal("read.encoderegularity.angle") * 180.0 / M_PI; + AngleUnit = (StepData_ConfParameters::AngleUnitMode)Interface_Static::IVal("step.angleunit.mode"); + + ReadResourceName = Interface_Static::CVal("read.step.resource.name"); + ReadSequence = Interface_Static::CVal("read.step.sequence"); + ReadProductMode = Interface_Static::IVal("read.step.product.mode") == 1; + ReadProductContext = (StepData_ConfParameters::ReadMode_ProductContext)Interface_Static::IVal("read.step.product.context"); + ReadShapeRepr = (StepData_ConfParameters::ReadMode_ShapeRepr)Interface_Static::IVal("read.step.shape.repr"); + ReadTessellated = (StepData_ConfParameters::RWMode_Tessellated)Interface_Static::IVal("read.step.tessellated"); + ReadAssemblyLevel = (StepData_ConfParameters::ReadMode_AssemblyLevel)Interface_Static::IVal("read.step.assembly.level"); + ReadRelationship = Interface_Static::IVal("read.step.shape.relationship") == 1; + ReadShapeAspect = Interface_Static::IVal("read.step.shape.aspect") == 1; + ReadConstrRelation = Interface_Static::IVal("read.step.constructivegeom.relationship") == 1; + ReadSubshapeNames = Interface_Static::IVal("read.stepcaf.subshapes.name") == 1; + ReadCodePage = (Resource_FormatType)Interface_Static::IVal("read.step.codepage"); + ReadNonmanifold = Interface_Static::IVal("read.step.nonmanifold") == 1; + ReadIdeas = Interface_Static::IVal("read.step.ideas") == 1; + ReadAllShapes = Interface_Static::IVal("read.step.all.shapes") == 1; + ReadRootTransformation = Interface_Static::IVal("read.step.root.transformation") == 1; + ReadColor = Interface_Static::IVal("read.color") == 1; + ReadName = Interface_Static::IVal("read.name") == 1; + ReadLayer = Interface_Static::IVal("read.layer") == 1; + ReadProps = Interface_Static::IVal("read.props") == 1; + + WritePrecisionMode = (StepData_ConfParameters::WriteMode_PrecisionMode)Interface_Static::IVal("write.precision.mode"); + WritePrecisionVal = Interface_Static::RVal("write.precision.val"); + WriteAssembly = (StepData_ConfParameters::WriteMode_Assembly)Interface_Static::IVal("write.step.assembly"); + WriteSchema = (StepData_ConfParameters::WriteMode_StepSchema)Interface_Static::IVal("write.step.schema"); + WriteTessellated = (StepData_ConfParameters::RWMode_Tessellated)Interface_Static::IVal("write.step.tessellated"); + WriteProductName = Interface_Static::CVal("write.step.product.name"); + WriteSurfaceCurMode = Interface_Static::IVal("write.surfacecurve.mode") == 1; + WriteUnit = (UnitsMethods_LengthUnit)Interface_Static::IVal("write.step.unit"); + WriteResourceName = Interface_Static::CVal("write.step.resource.name"); + WriteSequence = Interface_Static::CVal("write.step.sequence"); + WriteVertexMode = (StepData_ConfParameters::WriteMode_VertexMode)Interface_Static::IVal("write.step.vertex.mode"); + WriteSubshapeNames = Interface_Static::IVal("write.stepcaf.subshapes.name") == 1; + WriteColor = Interface_Static::IVal("write.color") == 1; + WriteNonmanifold = Interface_Static::IVal("write.step.nonmanifold") == 1; + WriteName = Interface_Static::IVal("write.name") == 1; + WriteLayer = Interface_Static::IVal("write.layer") == 1; + WriteProps = Interface_Static::IVal("write.props") == 1; + WriteModelType = (STEPControl_StepModelType)Interface_Static::IVal("write.model.type"); +} + +//======================================================================= +// function : ResetParameters +// purpose : +//======================================================================= +void StepData_ConfParameters::Reset() +{ + StepData_ConfParameters aParameters; + *this = aParameters; +} diff --git a/src/StepData/StepData_ConfParameters.hxx b/src/StepData/StepData_ConfParameters.hxx new file mode 100644 index 0000000000..1acee3d6fa --- /dev/null +++ b/src/StepData/StepData_ConfParameters.hxx @@ -0,0 +1,191 @@ +// Copyright (c) 2023 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 _StepData_ConfParameters_HeaderFile +#define _StepData_ConfParameters_HeaderFile + +#include +#include +#include +#include + +class StepData_ConfParameters +{ + +public: + + enum ReadMode_BSplineContinuity + { + ReadMode_BSplineContinuity_C0 = 0, + ReadMode_BSplineContinuity_C1, + ReadMode_BSplineContinuity_C2 + }; + enum ReadMode_Precision + { + ReadMode_Precision_File = 0, + ReadMode_Precision_User + }; + enum ReadMode_MaxPrecision + { + ReadMode_MaxPrecision_Preferred = 0, + ReadMode_MaxPrecision_Forced + }; + enum ReadMode_SurfaceCurve + { + ReadMode_SurfaceCurve_Default = 0, + ReadMode_SurfaceCurve_2DUse_Preferred = 2, + ReadMode_SurfaceCurve_2DUse_Forced = -2, + ReadMode_SurfaceCurve_3DUse_Preferred = 3, + ReadMode_SurfaceCurve_3DUse_Forced = -3 + }; + enum AngleUnitMode + { + AngleUnitMode_File = 0, + AngleUnitMode_Rad, + AngleUnitMode_Deg + }; + enum ReadMode_ProductContext + { + ReadMode_ProductContext_All = 1, + ReadMode_ProductContext_Design, + ReadMode_ProductContext_Analysis + }; + enum ReadMode_ShapeRepr + { + ReadMode_ShapeRepr_All = 1, + ReadMode_ShapeRepr_ABSR, + ReadMode_ShapeRepr_MSSR, + ReadMode_ShapeRepr_GBSSR, + ReadMode_ShapeRepr_FBSR, + ReadMode_ShapeRepr_EBWSR, + ReadMode_ShapeRepr_GBWSR + }; + enum ReadMode_AssemblyLevel + { + ReadMode_AssemblyLevel_All = 1, + ReadMode_AssemblyLevel_Assembly, + ReadMode_AssemblyLevel_Structure, + ReadMode_AssemblyLevel_Shape + }; + enum RWMode_Tessellated + { + RWMode_Tessellated_Off = 0, + RWMode_Tessellated_On, + RWMode_Tessellated_OnNoBRep + }; + enum WriteMode_PrecisionMode + { + WriteMode_PrecisionMode_Least = -1, + WriteMode_PrecisionMode_Average = 0, + WriteMode_PrecisionMode_Greatest = 1, + WriteMode_PrecisionMode_Session = 2 + }; + enum WriteMode_Assembly + { + WriteMode_Assembly_Off = 0, + WriteMode_Assembly_On, + WriteMode_Assembly_Auto + }; + enum WriteMode_StepSchema + { + WriteMode_StepSchema_AP214CD = 1, + WriteMode_StepSchema_AP214DIS, + WriteMode_StepSchema_AP203, + WriteMode_StepSchema_AP214IS, + WriteMode_StepSchema_AP242DIS + }; + enum WriteMode_VertexMode + { + WriteMode_VertexMode_OneCompound = 0, + WriteMode_VertexMode_SingleVertex + }; + + Standard_EXPORT StepData_ConfParameters(); + + //! Initialize parameters + Standard_EXPORT void InitFromStatic(); + + //! Reset used parameters + Standard_EXPORT void Reset(); + + Standard_EXPORT TCollection_AsciiString GetString(const ReadMode_ProductContext theMode) + { + switch (theMode) + { + case ReadMode_ProductContext_All: + return "all"; + case ReadMode_ProductContext_Design: + return "design"; + case ReadMode_ProductContext_Analysis: + return "analysis"; + default: + return ""; + } + } + +public: + // Common + ReadMode_BSplineContinuity ReadBSplineContinuity = ReadMode_BSplineContinuity_C1; // #include #include +#include class Standard_Transient; class Interface_EntityIterator; @@ -99,10 +100,10 @@ public: //! Return the encoding of STEP file for converting names into UNICODE. //! Initialized from "read.step.codepage" variable by constructor, which is Resource_UTF8 by default. - Resource_FormatType SourceCodePage() const { return mySourceCodePage; } + Resource_FormatType SourceCodePage() const { return InternalParameters.ReadCodePage; } //! Return the encoding of STEP file for converting names into UNICODE. - void SetSourceCodePage (Resource_FormatType theCode) { mySourceCodePage = theCode; } + void SetSourceCodePage (Resource_FormatType theCode) { InternalParameters.ReadCodePage = theCode; } //! Sets local length unit using for transfer process Standard_EXPORT void SetLocalLengthUnit(const Standard_Real theUnit); @@ -121,6 +122,10 @@ public: //! False - the unit value was not initialized, the default value is used Standard_Boolean IsInitializedUnit() const { return myReadUnitIsInitialized; } +public: + + StepData_ConfParameters InternalParameters; + DEFINE_STANDARD_RTTIEXT(StepData_StepModel,Interface_InterfaceModel) protected: @@ -133,7 +138,6 @@ private: Interface_EntityList theheader; Handle(TColStd_HArray1OfInteger) theidnums; - Resource_FormatType mySourceCodePage; Standard_Boolean myReadUnitIsInitialized; Standard_Real myWriteUnit; Standard_Real myLocalLengthUnit; diff --git a/src/StepSelect/StepSelect_WorkLibrary.cxx b/src/StepSelect/StepSelect_WorkLibrary.cxx index a154c7dee9..777ac6bf9a 100644 --- a/src/StepSelect/StepSelect_WorkLibrary.cxx +++ b/src/StepSelect/StepSelect_WorkLibrary.cxx @@ -60,9 +60,7 @@ Standard_Integer StepSelect_WorkLibrary::ReadFile { DeclareAndCast(StepData_Protocol,stepro,protocol); if (stepro.IsNull()) return 1; - Handle(StepData_StepModel) stepmodel = new StepData_StepModel; - model = stepmodel; - Standard_Integer aStatus = StepFile_Read(name, 0, stepmodel, stepro); + Standard_Integer aStatus = StepFile_Read(name, 0, Handle(StepData_StepModel)::DownCast(model), stepro); return aStatus; } @@ -73,9 +71,7 @@ Standard_Integer StepSelect_WorkLibrary::ReadStream (const Standard_CString the { DeclareAndCast(StepData_Protocol, stepro, protocol); if (stepro.IsNull()) return 1; - Handle(StepData_StepModel) stepmodel = new StepData_StepModel; - model = stepmodel; - Standard_Integer aStatus = StepFile_Read(theName, &theIStream, stepmodel, stepro); + Standard_Integer aStatus = StepFile_Read(theName, &theIStream, Handle(StepData_StepModel)::DownCast(model), stepro); return aStatus; } diff --git a/src/StepToTopoDS/StepToTopoDS_Builder.cxx b/src/StepToTopoDS/StepToTopoDS_Builder.cxx index 9d1db3d618..aabf96b097 100644 --- a/src/StepToTopoDS/StepToTopoDS_Builder.cxx +++ b/src/StepToTopoDS/StepToTopoDS_Builder.cxx @@ -39,6 +39,7 @@ #include #include #include +#include #include #include #include @@ -90,10 +91,11 @@ #include #include -static void ResetPreci (const TopoDS_Shape& S, Standard_Real maxtol) +static void ResetPreci (Handle(StepData_StepModel)& theStepModel, + const TopoDS_Shape& S, Standard_Real maxtol) { //:S4136 - Standard_Integer modetol = Interface_Static::IVal("read.maxprecision.mode"); + Standard_Integer modetol = theStepModel->InternalParameters.ReadMaxPrecisionMode; if (modetol) { ShapeFix_ShapeTolerance STU; STU.LimitTolerance (S,Precision::Confusion(),maxtol); @@ -120,6 +122,7 @@ void StepToTopoDS_Builder::Init(const Handle(StepShape_ManifoldSolidBrep)& theMa const Message_ProgressRange& theProgress) { Message_Messenger::StreamBuffer sout = theTP->Messenger()->SendInfo(); + Handle(StepData_StepModel) aStepModel = Handle(StepData_StepModel)::DownCast(theTP->Model()); // Initialisation of the Tool StepToTopoDS_Tool aTool; @@ -168,7 +171,7 @@ void StepToTopoDS_Builder::Init(const Handle(StepShape_ManifoldSolidBrep)& theMa sout << " - C2 : " << aTool.C2Cur2() << std::endl; } - ResetPreci (aSolid, MaxTol()); + ResetPreci (aStepModel, aSolid, MaxTol()); } // ============================================================================ @@ -258,7 +261,9 @@ void StepToTopoDS_Builder::Init(const Handle(StepShape_BrepWithVoids)& theBRepWi sout << " - C2 : " << aTool.C2Cur2() << std::endl; } - ResetPreci (aSolid, MaxTol()); +//:S4136 ShapeFix::SameParameter (S,Standard_False); + Handle(StepData_StepModel) aStepModel = Handle(StepData_StepModel)::DownCast(theTP->Model()); + ResetPreci (aStepModel, aSolid, MaxTol()); } // ============================================================================ @@ -460,8 +465,9 @@ void StepToTopoDS_Builder::Init } //:S4136 ShapeFix::SameParameter (S,Standard_False); - ResetPreci (S, MaxTol()); - ResetPreci (Shl, MaxTol()); //skl + Handle(StepData_StepModel) aStepModel = Handle(StepData_StepModel)::DownCast(TP->Model()); + ResetPreci (aStepModel, S, MaxTol()); + ResetPreci (aStepModel, Shl, MaxTol()); //skl } // ============================================================================ @@ -522,7 +528,8 @@ void StepToTopoDS_Builder::Init (const Handle(StepShape_EdgeBasedWireframeModel) myError = ( myResult.IsNull() ? StepToTopoDS_BuilderDone : StepToTopoDS_BuilderOther ); done = ! myResult.IsNull(); - ResetPreci (myResult, MaxTol()); + Handle(StepData_StepModel) aStepModel = Handle(StepData_StepModel)::DownCast(TP->Model()); + ResetPreci (aStepModel, myResult, MaxTol()); } // ============================================================================ @@ -585,7 +592,8 @@ void StepToTopoDS_Builder::Init (const Handle(StepShape_FaceBasedSurfaceModel)& myError = ( myResult.IsNull() ? StepToTopoDS_BuilderDone : StepToTopoDS_BuilderOther ); done = ! myResult.IsNull(); - ResetPreci (myResult, MaxTol()); + Handle(StepData_StepModel) aStepModel = Handle(StepData_StepModel)::DownCast(TP->Model()); + ResetPreci (aStepModel, myResult, MaxTol()); } diff --git a/src/StepToTopoDS/StepToTopoDS_TranslateCompositeCurve.cxx b/src/StepToTopoDS/StepToTopoDS_TranslateCompositeCurve.cxx index cf44ab9f5a..f0a3dfb2e1 100644 --- a/src/StepToTopoDS/StepToTopoDS_TranslateCompositeCurve.cxx +++ b/src/StepToTopoDS/StepToTopoDS_TranslateCompositeCurve.cxx @@ -111,8 +111,10 @@ Standard_Boolean StepToTopoDS_TranslateCompositeCurve::Init (const Handle(StepGe Standard_Boolean SurfMode = ( ! S.IsNull() && ! Surf.IsNull() ); Standard_Boolean isClosed = Standard_False; + Handle(StepData_StepModel) aStepModel = Handle(StepData_StepModel)::DownCast(TP->Model()); + if ( SurfMode ) { - Standard_Integer modepcurve = Interface_Static::IVal("read.surfacecurve.mode"); + Standard_Integer modepcurve = aStepModel->InternalParameters.ReadSurfaceCurveMode; if ( modepcurve ==-3 ) SurfMode = Standard_False; } diff --git a/src/StepToTopoDS/StepToTopoDS_TranslateEdgeLoop.cxx b/src/StepToTopoDS/StepToTopoDS_TranslateEdgeLoop.cxx index 66c12dc895..e9d5c47843 100644 --- a/src/StepToTopoDS/StepToTopoDS_TranslateEdgeLoop.cxx +++ b/src/StepToTopoDS/StepToTopoDS_TranslateEdgeLoop.cxx @@ -44,6 +44,7 @@ #include #include #include +#include #include #include #include @@ -217,11 +218,12 @@ void StepToTopoDS_TranslateEdgeLoop::Init(const Handle(StepShape_FaceBound)& Fac done = Standard_True; return; } - Standard_Integer modepcurve = Interface_Static::IVal("read.surfacecurve.mode"); - // 0,1 : suivre le code, 2 : ne prendre que pcurve, 3 : ne prendre que C3D BRep_Builder B; Handle(Transfer_TransientProcess) TP = aTool.TransientProcess(); + Handle(StepData_StepModel) aStepModel = Handle(StepData_StepModel)::DownCast(TP->Model()); + Standard_Integer modepcurve = aStepModel->InternalParameters.ReadSurfaceCurveMode; + // 0,1 : suivre le code, 2 : ne prendre que pcurve, 3 : ne prendre que C3D Standard_Real preci = Precision(); TopoDS_Wire W; diff --git a/src/TopoDSToStep/TopoDSToStep_MakeBrepWithVoids.cxx b/src/TopoDSToStep/TopoDSToStep_MakeBrepWithVoids.cxx index cb4ae8c235..b9d1a24327 100644 --- a/src/TopoDSToStep/TopoDSToStep_MakeBrepWithVoids.cxx +++ b/src/TopoDSToStep/TopoDSToStep_MakeBrepWithVoids.cxx @@ -21,6 +21,7 @@ #include #include #include +#include #include #include #include @@ -71,7 +72,8 @@ TopoDSToStep_MakeBrepWithVoids:: Handle(StepShape_HArray1OfOrientedClosedShell) aVoids; TColStd_SequenceOfTransient aTessShells; - const Standard_Integer aWriteTessGeom = Interface_Static::IVal("write.step.tessellated"); + Handle(StepData_StepModel) aStepModel = Handle(StepData_StepModel)::DownCast(FP->Model()); + const Standard_Integer aWriteTessGeom = aStepModel->InternalParameters.WriteTessellated; try { @@ -83,7 +85,7 @@ TopoDSToStep_MakeBrepWithVoids:: } TopoDSToStep_Builder StepB; - TopoDSToStep_Tool aTool; + TopoDSToStep_Tool aTool(aStepModel); Standard_Integer nbshapes = 0; for (It.Initialize(aSolid); It.More(); It.Next()) @@ -99,7 +101,7 @@ TopoDSToStep_MakeBrepWithVoids:: CurrentShell.Reverse(); //:d7 abv 16 Mar 98: try to treat 'open' shells as closed since flag // IsClosed() is often incorrect (taken from MakeManifoldSolid(Solid)) - aTool.Init(aMap, Standard_False); + aTool.Init(aMap, Standard_False, aStepModel->InternalParameters.WriteSurfaceCurMode); StepB.Init(CurrentShell, aTool, FP, aWriteTessGeom, theLocalFactors, aPS.Next()); TopoDSToStep::AddResult(FP, aTool); if (StepB.IsDone()) diff --git a/src/TopoDSToStep/TopoDSToStep_MakeFacetedBrep.cxx b/src/TopoDSToStep/TopoDSToStep_MakeFacetedBrep.cxx index a068be1546..6add10078b 100644 --- a/src/TopoDSToStep/TopoDSToStep_MakeFacetedBrep.cxx +++ b/src/TopoDSToStep/TopoDSToStep_MakeFacetedBrep.cxx @@ -20,6 +20,7 @@ #include #include #include +#include #include #include #include @@ -48,10 +49,10 @@ TopoDSToStep_MakeFacetedBrep:: if (aShell.Closed()) { Handle(StepShape_TopologicalRepresentationItem) aItem; MoniTool_DataMapOfShapeTransient aMap; + Handle(StepData_StepModel) aStepModel = Handle(StepData_StepModel)::DownCast(FP->Model()); + const Standard_Integer aWriteTessGeom = aStepModel->InternalParameters.WriteTessellated; - const Standard_Integer aWriteTessGeom = Interface_Static::IVal("write.step.tessellated"); - - TopoDSToStep_Tool aTool(aMap, Standard_True); + TopoDSToStep_Tool aTool(aMap, Standard_True, aStepModel->InternalParameters.WriteSurfaceCurMode); TopoDSToStep_Builder StepB(aShell, aTool, FP, aWriteTessGeom, theLocalFactors, theProgress); if (theProgress.UserBreak()) return; @@ -103,10 +104,10 @@ TopoDSToStep_MakeFacetedBrep:: if (aOuterShell.Closed()) { Handle(StepShape_TopologicalRepresentationItem) aItem; MoniTool_DataMapOfShapeTransient aMap; + Handle(StepData_StepModel) aStepModel = Handle(StepData_StepModel)::DownCast(FP->Model()); + const Standard_Integer aWriteTessGeom = aStepModel->InternalParameters.WriteTessellated; - const Standard_Integer aWriteTessGeom = Interface_Static::IVal("write.step.tessellated"); - - TopoDSToStep_Tool aTool(aMap, Standard_True); + TopoDSToStep_Tool aTool(aMap, Standard_True, aStepModel->InternalParameters.WriteSurfaceCurMode); TopoDSToStep_Builder StepB(aOuterShell, aTool, FP, aWriteTessGeom, theLocalFactors, theProgress); if (theProgress.UserBreak()) return; diff --git a/src/TopoDSToStep/TopoDSToStep_MakeFacetedBrepAndBrepWithVoids.cxx b/src/TopoDSToStep/TopoDSToStep_MakeFacetedBrepAndBrepWithVoids.cxx index 837fb8e732..25124d93c4 100644 --- a/src/TopoDSToStep/TopoDSToStep_MakeFacetedBrepAndBrepWithVoids.cxx +++ b/src/TopoDSToStep/TopoDSToStep_MakeFacetedBrepAndBrepWithVoids.cxx @@ -20,6 +20,7 @@ #include #include #include +#include #include #include #include @@ -65,8 +66,9 @@ TopoDSToStep_MakeFacetedBrepAndBrepWithVoids:: aOutShell = BRepClass3d::OuterShell(aSolid); + Handle(StepData_StepModel) aStepModel = Handle(StepData_StepModel)::DownCast(FP->Model()); TopoDSToStep_Builder StepB; - TopoDSToStep_Tool aTool; + TopoDSToStep_Tool aTool(aStepModel); if (!aOutShell.IsNull()) { Standard_Integer nbshapes = 0; @@ -81,7 +83,7 @@ TopoDSToStep_MakeFacetedBrepAndBrepWithVoids:: TopoDS_Shell CurrentShell = TopoDS::Shell(It.Value()); if (It.Value().Closed()) { - aTool.Init(aMap, Standard_False); + aTool.Init(aMap, Standard_False, aStepModel->InternalParameters.WriteSurfaceCurMode); StepB.Init(CurrentShell, aTool, FP, Standard_False, theLocalFactors, aRange); TopoDSToStep::AddResult(FP, aTool); diff --git a/src/TopoDSToStep/TopoDSToStep_MakeGeometricCurveSet.cxx b/src/TopoDSToStep/TopoDSToStep_MakeGeometricCurveSet.cxx index dd4a7f5b6c..cc33b4b851 100644 --- a/src/TopoDSToStep/TopoDSToStep_MakeGeometricCurveSet.cxx +++ b/src/TopoDSToStep/TopoDSToStep_MakeGeometricCurveSet.cxx @@ -18,6 +18,7 @@ #include #include #include +#include #include #include #include @@ -39,7 +40,8 @@ TopoDSToStep_MakeGeometricCurveSet::TopoDSToStep_MakeGeometricCurveSet( done = Standard_False; Handle(TColStd_HSequenceOfTransient) itemList; MoniTool_DataMapOfShapeTransient aMap; - TopoDSToStep_Tool aTool (aMap, Standard_False); + Handle(StepData_StepModel) aStepModel = Handle(StepData_StepModel)::DownCast(FP->Model()); + TopoDSToStep_Tool aTool (aMap, Standard_False, aStepModel->InternalParameters.WriteSurfaceCurMode); TopoDSToStep_WireframeBuilder wirefB (aShape, aTool, theLocalFactors); TopoDSToStep::AddResult ( FP, aTool ); diff --git a/src/TopoDSToStep/TopoDSToStep_MakeManifoldSolidBrep.cxx b/src/TopoDSToStep/TopoDSToStep_MakeManifoldSolidBrep.cxx index 7a932e38a6..4c4604a05e 100644 --- a/src/TopoDSToStep/TopoDSToStep_MakeManifoldSolidBrep.cxx +++ b/src/TopoDSToStep/TopoDSToStep_MakeManifoldSolidBrep.cxx @@ -20,6 +20,7 @@ #include #include #include +#include #include #include #include @@ -46,9 +47,9 @@ MakeManifoldSolidBrep(const TopoDS_Shell& aShell, Handle(StepVisual_TessellatedItem) aTessItem; MoniTool_DataMapOfShapeTransient aMap; - TopoDSToStep_Tool aTool(aMap, Standard_False); - - const Standard_Integer aWriteTessGeom = Interface_Static::IVal("write.step.tessellated"); + Handle(StepData_StepModel) aStepModel = Handle(StepData_StepModel)::DownCast(FP->Model()); + TopoDSToStep_Tool aTool(aMap, Standard_False, aStepModel->InternalParameters.WriteSurfaceCurMode); + const Standard_Integer aWriteTessGeom = aStepModel->InternalParameters.WriteTessellated; TopoDSToStep_Builder StepB(aShell, aTool, FP, aWriteTessGeom, theLocalFactors, theProgress); if (theProgress.UserBreak()) diff --git a/src/TopoDSToStep/TopoDSToStep_MakeShellBasedSurfaceModel.cxx b/src/TopoDSToStep/TopoDSToStep_MakeShellBasedSurfaceModel.cxx index 1987fc52a6..be09e59488 100644 --- a/src/TopoDSToStep/TopoDSToStep_MakeShellBasedSurfaceModel.cxx +++ b/src/TopoDSToStep/TopoDSToStep_MakeShellBasedSurfaceModel.cxx @@ -20,6 +20,7 @@ #include #include #include +#include #include #include #include @@ -58,8 +59,9 @@ TopoDSToStep_MakeShellBasedSurfaceModel:: done = Standard_False; MoniTool_DataMapOfShapeTransient aMap; - Standard_Integer aWriteTessGeom = Interface_Static::IVal("write.step.tessellated"); - const Standard_Integer aWriteTessSchema = Interface_Static::IVal("write.step.schema"); + Handle(StepData_StepModel) aStepModel = Handle(StepData_StepModel)::DownCast(FP->Model()); + Standard_Integer aWriteTessGeom = aStepModel->InternalParameters.WriteTessellated; + const Standard_Integer aWriteTessSchema = aStepModel->InternalParameters.WriteSchema; if (aWriteTessSchema != 5) { aWriteTessGeom = 0; @@ -68,7 +70,7 @@ TopoDSToStep_MakeShellBasedSurfaceModel:: FP->AddWarning(anErrShape, " Tessellation can not be exported into not AP242"); } - TopoDSToStep_Tool aTool(aMap, Standard_False); + TopoDSToStep_Tool aTool(aMap, Standard_False, aStepModel->InternalParameters.WriteSurfaceCurMode); TopoDSToStep_Builder StepB(aFace, aTool, FP, aWriteTessGeom, theLocalFactors, theProgress); if (theProgress.UserBreak()) return; @@ -125,8 +127,9 @@ TopoDSToStep_MakeShellBasedSurfaceModel:: Handle(StepShape_ClosedShell) aClosedShell; MoniTool_DataMapOfShapeTransient aMap; - Standard_Integer aWriteTessGeom = Interface_Static::IVal("write.step.tessellated"); - const Standard_Integer aWriteTessSchema = Interface_Static::IVal("write.step.schema"); + Handle(StepData_StepModel) aStepModel = Handle(StepData_StepModel)::DownCast(FP->Model()); + Standard_Integer aWriteTessGeom = aStepModel->InternalParameters.WriteTessellated; + const Standard_Integer aWriteTessSchema = aStepModel->InternalParameters.WriteSchema; if (aWriteTessSchema != 5) { aWriteTessGeom = 0; @@ -135,7 +138,7 @@ TopoDSToStep_MakeShellBasedSurfaceModel:: FP->AddWarning(anErrShape, " Tessellation can not be exported into not AP242"); } - TopoDSToStep_Tool aTool(aMap, Standard_False); + TopoDSToStep_Tool aTool(aMap, Standard_False, aStepModel->InternalParameters.WriteSurfaceCurMode); TopoDSToStep_Builder StepB(aShell, aTool, FP, aWriteTessGeom, theLocalFactors, theProgress); if (theProgress.UserBreak()) return; @@ -193,8 +196,9 @@ TopoDSToStep_MakeShellBasedSurfaceModel:: TColStd_SequenceOfTransient S; TColStd_SequenceOfTransient aTessShells; - Standard_Integer aWriteTessGeom = Interface_Static::IVal("write.step.tessellated"); - const Standard_Integer aWriteTessSchema = Interface_Static::IVal("write.step.schema"); + Handle(StepData_StepModel) aStepModel = Handle(StepData_StepModel)::DownCast(FP->Model()); + Standard_Integer aWriteTessGeom = aStepModel->InternalParameters.WriteTessellated; + const Standard_Integer aWriteTessSchema = aStepModel->InternalParameters.WriteSchema; if (aWriteTessSchema != 5) { aWriteTessGeom = 0; @@ -213,7 +217,7 @@ TopoDSToStep_MakeShellBasedSurfaceModel:: if (It.Value().ShapeType() == TopAbs_SHELL) { aShell = TopoDS::Shell(It.Value()); - TopoDSToStep_Tool aTool(aMap, Standard_False); + TopoDSToStep_Tool aTool(aMap, Standard_False, aStepModel->InternalParameters.WriteSurfaceCurMode); TopoDSToStep_Builder StepB(aShell, aTool, FP, aWriteTessGeom, theLocalFactors, aPS.Next()); TopoDSToStep::AddResult ( FP, aTool ); diff --git a/src/TopoDSToStep/TopoDSToStep_MakeStepEdge.cxx b/src/TopoDSToStep/TopoDSToStep_MakeStepEdge.cxx index d133dce90b..dcf86c2ddb 100644 --- a/src/TopoDSToStep/TopoDSToStep_MakeStepEdge.cxx +++ b/src/TopoDSToStep/TopoDSToStep_MakeStepEdge.cxx @@ -30,6 +30,7 @@ #include #include #include +#include #include #include #include @@ -90,7 +91,8 @@ void TopoDSToStep_MakeStepEdge::Init(const TopoDS_Edge& aEdge, aTool.SetCurrentEdge(aEdge); // [BEGIN] Processing non-manifold topology (ssv; 11.11.2010) - Standard_Boolean isNMMode = Interface_Static::IVal("write.step.nonmanifold") != 0; + Standard_Boolean isNMMode = + Handle(StepData_StepModel)::DownCast(FP->Model())->InternalParameters.WriteNonmanifold != 0; if (isNMMode) { Handle(StepShape_EdgeCurve) anEC; Handle(TransferBRep_ShapeMapper) aSTEPMapper = TransferBRep::ShapeMapper(FP, aEdge); diff --git a/src/TopoDSToStep/TopoDSToStep_MakeStepFace.cxx b/src/TopoDSToStep/TopoDSToStep_MakeStepFace.cxx index a85b26016d..42fd2a9b90 100644 --- a/src/TopoDSToStep/TopoDSToStep_MakeStepFace.cxx +++ b/src/TopoDSToStep/TopoDSToStep_MakeStepFace.cxx @@ -116,7 +116,8 @@ void TopoDSToStep_MakeStepFace::Init(const TopoDS_Face& aFace, new TransferBRep_ShapeMapper(aFace); // on ne sait jamais // [BEGIN] Processing non-manifold topology (another approach) (ssv; 10.11.2010) - Standard_Boolean isNMMode = Interface_Static::IVal("write.step.nonmanifold") != 0; + Standard_Boolean isNMMode = + Handle(StepData_StepModel)::DownCast(FP->Model())->InternalParameters.WriteNonmanifold != 0; if (isNMMode) { Handle(StepShape_AdvancedFace) anAF; Handle(TransferBRep_ShapeMapper) aSTEPMapper = TransferBRep::ShapeMapper(FP, aFace); diff --git a/src/TopoDSToStep/TopoDSToStep_MakeStepVertex.cxx b/src/TopoDSToStep/TopoDSToStep_MakeStepVertex.cxx index 95fb9561de..20531b118d 100644 --- a/src/TopoDSToStep/TopoDSToStep_MakeStepVertex.cxx +++ b/src/TopoDSToStep/TopoDSToStep_MakeStepVertex.cxx @@ -64,7 +64,8 @@ void TopoDSToStep_MakeStepVertex::Init(const TopoDS_Vertex& aVertex, aTool.SetCurrentVertex(aVertex); // [BEGIN] Processing non-manifold topology (ssv; 11.11.2010) - Standard_Boolean isNMMode = Interface_Static::IVal("write.step.nonmanifold") != 0; + Standard_Boolean isNMMode = + Handle(StepData_StepModel)::DownCast(FP->Model())->InternalParameters.WriteNonmanifold != 0; if (isNMMode) { Handle(StepShape_VertexPoint) aVP; Handle(TransferBRep_ShapeMapper) aSTEPMapper = TransferBRep::ShapeMapper(FP, aVertex); diff --git a/src/TopoDSToStep/TopoDSToStep_Tool.cxx b/src/TopoDSToStep/TopoDSToStep_Tool.cxx index 864b6bc9bf..f9cf2b620e 100644 --- a/src/TopoDSToStep/TopoDSToStep_Tool.cxx +++ b/src/TopoDSToStep/TopoDSToStep_Tool.cxx @@ -17,6 +17,7 @@ #include #include +#include #include #include @@ -24,10 +25,12 @@ //function : TopoDSToStep_Tool //purpose : //======================================================================= -TopoDSToStep_Tool::TopoDSToStep_Tool() - : myFacetedContext(Standard_False), myLowestTol(0.),myReversedSurface (Standard_False) +TopoDSToStep_Tool::TopoDSToStep_Tool(const Handle(StepData_StepModel)& theModel) + : myFacetedContext(Standard_False), + myLowestTol(0.), + myReversedSurface(Standard_False) { - myPCurveMode = Interface_Static::IVal("write.surfacecurve.mode"); + myPCurveMode = theModel->InternalParameters.WriteSurfaceCurMode; } //======================================================================= @@ -35,10 +38,12 @@ TopoDSToStep_Tool::TopoDSToStep_Tool() //purpose : //======================================================================= -TopoDSToStep_Tool::TopoDSToStep_Tool(const MoniTool_DataMapOfShapeTransient& M, const Standard_Boolean FacetedContext) +TopoDSToStep_Tool::TopoDSToStep_Tool(const MoniTool_DataMapOfShapeTransient& M, + const Standard_Boolean FacetedContext, + Standard_Integer theSurfCurveMode) :myLowestTol(0.),myReversedSurface(Standard_False) { - Init ( M, FacetedContext ); + Init ( M, FacetedContext, theSurfCurveMode ); } //======================================================================= @@ -46,11 +51,13 @@ TopoDSToStep_Tool::TopoDSToStep_Tool(const MoniTool_DataMapOfShapeTransient& M, //purpose : //======================================================================= -void TopoDSToStep_Tool::Init(const MoniTool_DataMapOfShapeTransient& M, const Standard_Boolean FacetedContext) +void TopoDSToStep_Tool::Init(const MoniTool_DataMapOfShapeTransient& M, + const Standard_Boolean FacetedContext, + Standard_Integer theSurfCurveMode) { myDataMap = M; myFacetedContext = FacetedContext; - myPCurveMode = Interface_Static::IVal("write.surfacecurve.mode"); + myPCurveMode = theSurfCurveMode; } //======================================================================= diff --git a/src/TopoDSToStep/TopoDSToStep_Tool.hxx b/src/TopoDSToStep/TopoDSToStep_Tool.hxx index 11d0e85c2d..d48991505d 100644 --- a/src/TopoDSToStep/TopoDSToStep_Tool.hxx +++ b/src/TopoDSToStep/TopoDSToStep_Tool.hxx @@ -28,6 +28,7 @@ #include #include #include +class StepData_StepModel; class TopoDS_Shape; class StepShape_TopologicalRepresentationItem; @@ -41,11 +42,15 @@ public: DEFINE_STANDARD_ALLOC - Standard_EXPORT TopoDSToStep_Tool(); + Standard_EXPORT TopoDSToStep_Tool(const Handle(StepData_StepModel)& theModel); - Standard_EXPORT TopoDSToStep_Tool(const MoniTool_DataMapOfShapeTransient& M, const Standard_Boolean FacetedContext); + Standard_EXPORT TopoDSToStep_Tool(const MoniTool_DataMapOfShapeTransient& M, + const Standard_Boolean FacetedContext, + Standard_Integer theSurfCurveMode); - Standard_EXPORT void Init (const MoniTool_DataMapOfShapeTransient& M, const Standard_Boolean FacetedContext); + Standard_EXPORT void Init (const MoniTool_DataMapOfShapeTransient& M, + const Standard_Boolean FacetedContext, + Standard_Integer theSurfCurveMode); Standard_EXPORT Standard_Boolean IsBound (const TopoDS_Shape& S); diff --git a/src/XSControl/XSControl_Reader.hxx b/src/XSControl/XSControl_Reader.hxx index 99211cd72b..4a8dc06e0a 100644 --- a/src/XSControl/XSControl_Reader.hxx +++ b/src/XSControl/XSControl_Reader.hxx @@ -102,10 +102,10 @@ public: //! Loads a file and returns the read status //! Zero for a Model which compies with the Controller - Standard_EXPORT IFSelect_ReturnStatus ReadFile (const Standard_CString filename); + Standard_EXPORT virtual IFSelect_ReturnStatus ReadFile (const Standard_CString filename); //! Loads a file from stream and returns the read status - Standard_EXPORT IFSelect_ReturnStatus ReadStream(const Standard_CString theName, std::istream& theIStream); + Standard_EXPORT virtual IFSelect_ReturnStatus ReadStream(const Standard_CString theName, std::istream& theIStream); //! Returns the model. It can then be consulted (header, product) Standard_EXPORT Handle(Interface_InterfaceModel) Model() const; diff --git a/src/XSDRAWSTEP/XSDRAWSTEP.cxx b/src/XSDRAWSTEP/XSDRAWSTEP.cxx index d15e01ddd9..79b03af1ca 100644 --- a/src/XSDRAWSTEP/XSDRAWSTEP.cxx +++ b/src/XSDRAWSTEP/XSDRAWSTEP.cxx @@ -25,6 +25,7 @@ #include #include #include +#include #include #include #include @@ -256,13 +257,13 @@ static Standard_Integer stepread(Draw_Interpretor& theDI, //======================================================================= //function : testreadstep -//purpose : +//purpose : //======================================================================= static Standard_Integer testreadstep(Draw_Interpretor& theDI, Standard_Integer theNbArgs, const char** theArgVec) { - if (theNbArgs < 3 || theNbArgs > 4) + if (theNbArgs < 3) { theDI << "ERROR in " << theArgVec[0] << "Wrong Number of Arguments.\n"; theDI << " Usage : " << theArgVec[0] << " file_name shape_name [-stream]\n"; @@ -270,37 +271,65 @@ static Standard_Integer testreadstep(Draw_Interpretor& theDI, return 1; } - Standard_Boolean useStream = (theNbArgs > 3 && !strcasecmp(theArgVec[3], "-stream")); - - STEPControl_Reader Reader; - Standard_CString filename = theArgVec[1]; - IFSelect_ReturnStatus readstat; - if (useStream) + Standard_Boolean useStream = (theNbArgs > 3 && !strcasecmp(theArgVec[theNbArgs - 1], "-stream")); + Standard_CString aShName = useStream ? theArgVec[theNbArgs - 2] : theArgVec[theNbArgs - 1]; + Standard_Integer aSize = useStream ? (theNbArgs - 3) : (theNbArgs - 2); + NCollection_Array1 aShapes(0, aSize); + NCollection_Array1 aFileNames(0, aSize); + NCollection_DataMap aShapesMap; + for (int anInd = 1; anInd <= aSize; ++anInd) { - std::ifstream aStream; - OSD_OpenStream(aStream, filename, std::ios::in | std::ios::binary); - TCollection_AsciiString aFolder, aFileNameShort; - OSD_Path::FolderAndFileFromPath(filename, aFolder, aFileNameShort); - readstat = Reader.ReadStream(aFileNameShort.ToCString(), aStream); + aFileNames[anInd - 1] = theArgVec[anInd]; } - else - { - readstat = Reader.ReadFile(filename); - } - theDI << "Status from reading STEP file " << filename << " : "; - switch (readstat) + STEPControl_Controller::Init(); + XSAlgo::AlgoContainer()->PrepareForTransfer(); // update unit info + IFSelect_ReturnStatus aReadStat; + StepData_ConfParameters aParameters; + aParameters.InitFromStatic(); + int aNbSubShape = 0; + OSD_Parallel::For + ( + 0, aSize, + [&](const Standard_Integer theIndex) + { + STEPControl_Reader aReader; + aReader.SetSystemLengthUnit(UnitsMethods::GetCasCadeLengthUnit()); + if (useStream) + { + std::ifstream aStream; + OSD_OpenStream(aStream, aFileNames[theIndex].ToCString(), std::ios::in | std::ios::binary); + TCollection_AsciiString aFolder, aFileNameShort; + OSD_Path::FolderAndFileFromPath(aFileNames[theIndex].ToCString(), aFolder, aFileNameShort); + aReadStat = aReader.ReadStream(aFileNameShort.ToCString(), aParameters, aStream); + } + else + { + aReadStat = aReader.ReadFile(aFileNames[theIndex].ToCString(), aParameters); + } + if (aReadStat == IFSelect_RetDone) + { + aReader.TransferRoots(); + aShapes[theIndex] = aReader.OneShape(); + TCollection_AsciiString aName(aShName); + if (aSize > 1) + { + aName += theIndex; + } + aShapesMap.Bind(aName, aShapes[theIndex]); + aNbSubShape += aReader.NbShapes(); + } + else + { + theDI << "Error: Problem with reading shape by file: " << "[" << aFileNames[theIndex] << "]"; + } + } + ); + NCollection_DataMap::Iterator anIt(aShapesMap); + for (; anIt.More(); anIt.Next()) { - case IFSelect_RetVoid: { theDI << "empty file\n"; return 1; } - case IFSelect_RetDone: { theDI << "file read\n"; break; } - case IFSelect_RetError: { theDI << "file not found\n"; return 1; } - case IFSelect_RetFail: { theDI << "error during read\n"; return 1; } - default: { theDI << "failure\n"; return 1; } + DBRep::Set(anIt.Key().ToCString(), anIt.Value()); } - Reader.SetSystemLengthUnit(XSDRAW::GetLengthUnit()); - Reader.TransferRoots(); - TopoDS_Shape shape = Reader.OneShape(); - DBRep::Set(theArgVec[2], shape); - theDI << "Count of shapes produced : " << Reader.NbShapes() << "\n"; + theDI << "Count of shapes produced : " << aNbSubShape << "\n"; return 0; } @@ -437,79 +466,75 @@ static Standard_Integer stepwrite(Draw_Interpretor& theDI, } //======================================================================= -//function : testwrite -//purpose : +//function : testwritestep +//purpose : //======================================================================= static Standard_Integer testwrite(Draw_Interpretor& theDI, Standard_Integer theNbArgs, const char** theArgVec) { - TCollection_AsciiString aFilePath; - TopoDS_Shape aShape; - bool toTestStream = false; - for (Standard_Integer anArgIter = 1; anArgIter < theNbArgs; ++anArgIter) - { - TCollection_AsciiString anArgCase(theArgVec[anArgIter]); - anArgCase.LowerCase(); - if (anArgCase == "-stream") - { - toTestStream = true; - } - else if (aFilePath.IsEmpty()) - { - aFilePath = theArgVec[anArgIter]; - } - else if (aShape.IsNull()) - { - aShape = DBRep::Get(theArgVec[anArgIter]); - if (aShape.IsNull()) - { - theDI << "Syntax error: '" << theArgVec[anArgIter] << "' is not a shape\n"; - return 1; - } - } - else - { - theDI << "Syntax error: unknown argument '" << theArgVec[anArgIter] << "'\n"; - return 1; - } - } - if (aShape.IsNull()) + if (theNbArgs < 3) { - theDI << "Syntax error: wrong number of arguments\n"; + theDI << "ERROR in " << theArgVec[0] << "Wrong Number of Arguments.\n"; + theDI << " Usage : " << theArgVec[0] << " file_name shape_name [-stream]\n"; + theDI << " Option -stream forces usage of API accepting stream\n"; return 1; } - STEPControl_Writer aWriter; - IFSelect_ReturnStatus aStat = aWriter.Transfer(aShape, STEPControl_AsIs); - if (aStat != IFSelect_RetDone) + Standard_Boolean useStream = (theNbArgs > 3 && !strcasecmp(theArgVec[theNbArgs - 1], "-stream")); + Standard_CString aShName = useStream ? theArgVec[theNbArgs - 2] : theArgVec[theNbArgs - 1]; + Standard_Integer aSize = useStream ? (theNbArgs - 3) : (theNbArgs - 2); + NCollection_Array1 aFileNames(0, aSize); + NCollection_DataMap aShapesMap; + for (int anInd = 1; anInd <= aSize; ++anInd) { - theDI << "Error on transferring shape\n"; + aFileNames[anInd - 1] = theArgVec[anInd]; + } + TopoDS_Shape aShape = DBRep::Get(aShName); + if (aShape.IsNull()) + { + theDI << "Syntax error: wrong number of arguments"; return 1; } - if (toTestStream) - { - std::ofstream aStream; - OSD_OpenStream(aStream, aFilePath, std::ios::out | std::ios::binary); - aStat = aWriter.WriteStream(aStream); - aStream.close(); - if (!aStream.good() - && aStat == IFSelect_RetDone) + StepData_ConfParameters aParameters; + aParameters.InitFromStatic(); + + OSD_Parallel::For + ( + 0, aSize, + [&](const Standard_Integer theIndex) { - aStat = IFSelect_RetFail; + STEPControl_Writer aWriter; + if (aWriter.Transfer(aShape, STEPControl_AsIs, aParameters) != IFSelect_RetDone) + { + theDI << "Error: Can't transfer input shape"; + return; + } + IFSelect_ReturnStatus aStat = IFSelect_RetDone; + if (useStream) + { + std::ofstream aStream; + OSD_OpenStream(aStream, aFileNames[theIndex], std::ios::out | std::ios::binary); + if (!aStream.good()) + { + theDI << "Error: Problem with opening stream by file: " << "[" << aFileNames[theIndex] << "]"; + return; + } + aStat = aWriter.WriteStream(aStream); + } + else + { + aStat = aWriter.Write(aFileNames[theIndex].ToCString()); + } + if (aStat != IFSelect_RetDone) + { + theDI << "Error on writing file: " << "[" << aFileNames[theIndex] << "]"; + return; + } } - } - else - { - aStat = aWriter.Write(aFilePath.ToCString()); - } - if (aStat != IFSelect_RetDone) - { - theDI << "Error on writing file\n"; - return 1; - } - theDI << "File Is Written\n"; + ); + theDI << "File(s) are Written"; return 0; } @@ -1011,10 +1036,10 @@ void XSDRAWSTEP::Factory(Draw_Interpretor& theDI) const char* aGroup = "DE: STEP"; // Step transfer file commands theDI.Add("stepwrite", "stepwrite mode[0-4 afsmw] shape", __FILE__, stepwrite, aGroup); - theDI.Add("testwritestep", "testwritestep filename.stp shape [-stream]", + theDI.Add("testwritestep", "testwritestep [file_1.stp ... file_n.stp] shape [-stream]", __FILE__, testwrite, aGroup); theDI.Add("stepread", "stepread [file] [f or r (type of model full or reduced)]", __FILE__, stepread, aGroup); - theDI.Add("testreadstep", "testreadstep file shape [-stream]", __FILE__, testreadstep, aGroup); + theDI.Add("testreadstep", "testreadstep [file_1 ... file_n] shape [-stream]", __FILE__, testreadstep, aGroup); theDI.Add("steptrans", "steptrans shape stepax1 stepax2", __FILE__, steptrans, aGroup); theDI.Add("countexpected", "TEST", __FILE__, countexpected, aGroup); theDI.Add("dumpassembly", "TEST", __FILE__, dumpassembly, aGroup); From a6e425d0a69523641e5ebb8653650006046a0af0 Mon Sep 17 00:00:00 2001 From: ichesnok Date: Mon, 27 Nov 2023 14:29:00 +0000 Subject: [PATCH 519/639] 0033540: Data Exchange - Segmentation fault on loading model Implemented workaround to avoid crash on out-of-ISO files --- .../RWStepVisual_RWContextDependentOverRidingStyledItem.cxx | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/RWStepVisual/RWStepVisual_RWContextDependentOverRidingStyledItem.cxx b/src/RWStepVisual/RWStepVisual_RWContextDependentOverRidingStyledItem.cxx index 92dd7c1455..bf19ce3f67 100644 --- a/src/RWStepVisual/RWStepVisual_RWContextDependentOverRidingStyledItem.cxx +++ b/src/RWStepVisual/RWStepVisual_RWContextDependentOverRidingStyledItem.cxx @@ -85,6 +85,10 @@ void RWStepVisual_RWContextDependentOverRidingStyledItem::ReadStep aStyleContext->SetValue(i5,aStyleContextItem); } } + else + { + aStyleContext = new StepVisual_HArray1OfStyleContextSelect(); + } //--- Initialisation of the read entity --- From 7036facf10e5591ea93bb53d7e97097f82613729 Mon Sep 17 00:00:00 2001 From: dpasukhi Date: Thu, 30 Nov 2023 10:29:11 +0000 Subject: [PATCH 520/639] 0033399: Configuration - Research into opportunities to increase performance Implement CMake profiles to modify compiler and linker flags --- CMakeLists.txt | 4 ++++ adm/cmake/occt_defs_flags.cmake | 38 ++++++++++++++++++++++++++++++--- 2 files changed, 39 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 5ef2cb161b..86905287dc 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -39,6 +39,10 @@ endmacro() set (USE_MMGR_TYPE "NATIVE" CACHE STRING "Select using memory manager tool.") set_property(CACHE USE_MMGR_TYPE PROPERTY STRINGS "NATIVE" "FLEXIBLE" "TBB" "JEMALLOC") +# set profile for C++ compiler and linker +set (BUILD_OPT_PROFILE "Default" CACHE STRING "Select profile for compiler and linker.") +set_property(CACHE BUILD_OPT_PROFILE PROPERTY STRINGS "Default" "Production") + # include variable description OCCT_INCLUDE_CMAKE_FILE ("adm/cmake/vardescr") diff --git a/adm/cmake/occt_defs_flags.cmake b/adm/cmake/occt_defs_flags.cmake index 33b50e8ce7..3d989abcd4 100644 --- a/adm/cmake/occt_defs_flags.cmake +++ b/adm/cmake/occt_defs_flags.cmake @@ -44,9 +44,25 @@ elseif (MSVC) endif() if (MSVC) - # string pooling (GF), function-level linking (Gy) - set (CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /GF /Gy") - set (CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} /GF /Gy") + if ("${BUILD_OPT_PROFILE}" STREQUAL "Production") + # string pooling (GF), function-level linking (Gy) + set (CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /GF /Gy") + set (CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} /GF /Gy") + + # Favor fast code (Ot), Omit frame pointers (Oy) + set (CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /Ot /Oy") + set (CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} /Ot /Oy") + + # Whole Program Optimisation (GL), Enable intrinsic functions (Oi) + set (CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /GL /Oi") + set (CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} /GL /Oi") + + # Link-Time Code Generation(LTCG) is requared for Whole Program Optimisation(GL) + set(CMAKE_EXE_LINKER_FLAGS_RELEASE "${CMAKE_EXE_LINKER_FLAGS_RELEASE} /LTCG") + set(CMAKE_SHARED_LINKER_FLAGS_RELEASE "${CMAKE_SHARED_LINKER_FLAGS_RELEASE} /LTCG") + set(CMAKE_STATIC_LINKER_FLAGS_RELEASE "${CMAKE_STATIC_LINKER_FLAGS_RELEASE} /LTCG") + set(CMAKE_MODULE_LINKER_FLAGS_RELEASE "${CMAKE_MODULE_LINKER_FLAGS_RELEASE} /LTCG") + endif() if (BUILD_FORCE_RelWithDebInfo) # generate debug info (Zi), inline expansion level (Ob1) set (CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /Zi /Ob1") @@ -118,6 +134,22 @@ if (MSVC) endif() elseif (CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX OR (CMAKE_CXX_COMPILER_ID MATCHES "[Cc][Ll][Aa][Nn][Gg]")) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra") + + if ("${BUILD_OPT_PROFILE}" STREQUAL "Production") + # /Ot (favor speed over size) is similar to -O2 or -O3 in GCC/Clang. + # /Oy (omit frame pointers) is similar to -fomit-frame-pointer in GCC/Clang. + # /GL (whole program optimization) is similar to -flto (Link Time Optimization) in GCC/Clang. + # /GF (eliminate duplicate strings) doesn't have a direct equivalent in GCC/Clang, but the compilers do string pooling automatically. + # /Gy (enable function-level linking) is similar to -ffunction-sections in GCC/Clang. + # /fp:precise (improve floating-point consistency) is similar to -ffloat-store in GCC, but there isn't a perfect equivalent in Clang. + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O3 -fomit-frame-pointer -flto -ffunction-sections -ffloat-store") + + # Link-Time Code Generation(LTCG) is requared for Whole Program Optimisation(GL) + set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -flto") + set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -flto") + set(CMAKE_STATIC_LINKER_FLAGS "${CMAKE_STATIC_LINKER_FLAGS} -flto") + set(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} -flto") + endif() if (CMAKE_CXX_COMPILER_ID MATCHES "[Cc][Ll][Aa][Nn][Gg]") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wshorten-64-to-32") endif() From 40b80d8d6605ff49df5d163a8963d67a790489d6 Mon Sep 17 00:00:00 2001 From: dpasukhi Date: Tue, 3 Jan 2023 19:09:28 +0000 Subject: [PATCH 521/639] 0033300: Data Exchange, DE Wrapper - Specialize WS for each transfer process Updated STEP and IGES to personalize own work session --- .../IGESCAFControl_Provider.cxx | 51 +++++++++++------- .../IGESCAFControl_Provider.hxx | 5 ++ .../STEPCAFControl_Provider.cxx | 52 ++++++++++++------- .../STEPCAFControl_Provider.hxx | 6 +++ src/XSDRAWDE/XSDRAWDE.cxx | 10 ++-- 5 files changed, 82 insertions(+), 42 deletions(-) diff --git a/src/IGESCAFControl/IGESCAFControl_Provider.cxx b/src/IGESCAFControl/IGESCAFControl_Provider.cxx index f5c82fd3e1..d2ec791127 100644 --- a/src/IGESCAFControl/IGESCAFControl_Provider.cxx +++ b/src/IGESCAFControl/IGESCAFControl_Provider.cxx @@ -17,11 +17,13 @@ #include #include #include +#include #include #include #include #include #include +#include #include IMPLEMENT_STANDARD_RTTIEXT(IGESCAFControl_Provider, DE_Provider) @@ -41,6 +43,26 @@ IGESCAFControl_Provider::IGESCAFControl_Provider(const Handle(DE_ConfigurationNo : DE_Provider(theNode) {} +//======================================================================= +// function : personizeWS +// purpose : +//======================================================================= +void IGESCAFControl_Provider::personizeWS(Handle(XSControl_WorkSession)& theWS) +{ + if (theWS.IsNull()) + { + Message::SendWarning() << "Warning: IGESCAFControl_Provider :" + << " Null work session, use internal temporary session"; + theWS = new XSControl_WorkSession(); + } + Handle(IGESControl_Controller) aCntrl = Handle(IGESControl_Controller)::DownCast(theWS->NormAdaptor()); + if (aCntrl.IsNull()) + { + IGESControl_Controller::Init(); + theWS->SelectNorm("IGES"); + } +} + //======================================================================= // function : initStatic // purpose : @@ -159,14 +181,11 @@ bool IGESCAFControl_Provider::Read(const TCollection_AsciiString& thePath, return false; } Handle(IGESCAFControl_ConfigurationNode) aNode = Handle(IGESCAFControl_ConfigurationNode)::DownCast(GetNode()); + personizeWS(theWS); initStatic(aNode); - XCAFDoc_DocumentTool::SetLengthUnit(theDocument, aNode->GlobalParameters.LengthUnit, UnitsMethods_LengthUnit_Millimeter); IGESCAFControl_Reader aReader; - if (!theWS.IsNull()) - { - aReader.SetWS(theWS); - } + aReader.SetWS(theWS); aReader.SetReadVisible(aNode->InternalParameters.ReadOnlyVisible); @@ -211,14 +230,10 @@ bool IGESCAFControl_Provider::Write(const TCollection_AsciiString& thePath, return false; } Handle(IGESCAFControl_ConfigurationNode) aNode = Handle(IGESCAFControl_ConfigurationNode)::DownCast(GetNode()); + personizeWS(theWS); initStatic(aNode); - XCAFDoc_DocumentTool::SetLengthUnit(theDocument, aNode->InternalParameters.WriteUnit, UnitsMethods_LengthUnit_Millimeter); - IGESCAFControl_Writer aWriter; - if (!theWS.IsNull()) - { - aWriter = IGESCAFControl_Writer(theWS); - } + IGESCAFControl_Writer aWriter(theWS); aWriter.SetColorMode(aNode->InternalParameters.WriteColor); aWriter.SetNameMode(aNode->InternalParameters.WriteName); aWriter.SetLayerMode(aNode->InternalParameters.WriteLayer); @@ -249,7 +264,7 @@ bool IGESCAFControl_Provider::Read(const TCollection_AsciiString& thePath, const Handle(TDocStd_Document)& theDocument, const Message_ProgressRange& theProgress) { - Handle(XSControl_WorkSession) aWS; + Handle(XSControl_WorkSession) aWS = new XSControl_WorkSession(); return Read(thePath, theDocument, aWS, theProgress); } @@ -261,7 +276,7 @@ bool IGESCAFControl_Provider::Write(const TCollection_AsciiString& thePath, const Handle(TDocStd_Document)& theDocument, const Message_ProgressRange& theProgress) { - Handle(XSControl_WorkSession) aWS; + Handle(XSControl_WorkSession) aWS = new XSControl_WorkSession(); return Write(thePath, theDocument, aWS, theProgress); } @@ -283,11 +298,9 @@ bool IGESCAFControl_Provider::Read(const TCollection_AsciiString& thePath, } Handle(IGESCAFControl_ConfigurationNode) aNode = Handle(IGESCAFControl_ConfigurationNode)::DownCast(GetNode()); initStatic(aNode); + personizeWS(theWS); IGESControl_Reader aReader; - if (!theWS.IsNull()) - { - aReader.SetWS(theWS); - } + aReader.SetWS(theWS); aReader.SetReadVisible(aNode->InternalParameters.ReadOnlyVisible); IFSelect_ReturnStatus aReadStat = IFSelect_RetVoid; aReadStat = aReader.ReadFile(thePath.ToCString()); @@ -359,7 +372,7 @@ bool IGESCAFControl_Provider::Read(const TCollection_AsciiString& thePath, TopoDS_Shape& theShape, const Message_ProgressRange& theProgress) { - Handle(XSControl_WorkSession) aWS; + Handle(XSControl_WorkSession) aWS = new XSControl_WorkSession(); return Read(thePath, theShape, aWS, theProgress); } @@ -371,7 +384,7 @@ bool IGESCAFControl_Provider::Write(const TCollection_AsciiString& thePath, const TopoDS_Shape& theShape, const Message_ProgressRange& theProgress) { - Handle(XSControl_WorkSession) aWS; + Handle(XSControl_WorkSession) aWS = new XSControl_WorkSession(); return Write(thePath, theShape, aWS, theProgress); } diff --git a/src/IGESCAFControl/IGESCAFControl_Provider.hxx b/src/IGESCAFControl/IGESCAFControl_Provider.hxx index 2dc29a3935..c3813697ed 100644 --- a/src/IGESCAFControl/IGESCAFControl_Provider.hxx +++ b/src/IGESCAFControl/IGESCAFControl_Provider.hxx @@ -135,6 +135,11 @@ public: private: + //! Personizes work session with current format. + //! Creates new temporary session if current session is null + //! @param[in] theWS current work session + void personizeWS(Handle(XSControl_WorkSession)& theWS); + //! Initialize static variables void initStatic(const Handle(DE_ConfigurationNode)& theNode); diff --git a/src/STEPCAFControl/STEPCAFControl_Provider.cxx b/src/STEPCAFControl/STEPCAFControl_Provider.cxx index 1efe5cd896..2fc6682666 100644 --- a/src/STEPCAFControl/STEPCAFControl_Provider.cxx +++ b/src/STEPCAFControl/STEPCAFControl_Provider.cxx @@ -65,12 +65,10 @@ bool STEPCAFControl_Provider::Read(const TCollection_AsciiString& thePath, return false; } Handle(STEPCAFControl_ConfigurationNode) aNode = Handle(STEPCAFControl_ConfigurationNode)::DownCast(GetNode()); + personizeWS(theWS); XCAFDoc_DocumentTool::SetLengthUnit(theDocument, aNode->GlobalParameters.LengthUnit, UnitsMethods_LengthUnit_Millimeter); STEPCAFControl_Reader aReader; - if (!theWS.IsNull()) - { - aReader.Init(theWS); - } + aReader.Init(theWS); aReader.SetColorMode(aNode->InternalParameters.ReadColor); aReader.SetNameMode(aNode->InternalParameters.ReadName); aReader.SetLayerMode(aNode->InternalParameters.ReadLayer); @@ -114,11 +112,9 @@ bool STEPCAFControl_Provider::Write(const TCollection_AsciiString& thePath, XCAFDoc_DocumentTool::SetLengthUnit(theDocument, UnitsMethods::GetLengthUnitScale(aNode->InternalParameters.WriteUnit, UnitsMethods_LengthUnit_Millimeter), UnitsMethods_LengthUnit_Millimeter); + personizeWS(theWS); STEPCAFControl_Writer aWriter; - if (!theWS.IsNull()) - { - aWriter.Init(theWS); - } + aWriter.Init(theWS); Handle(StepData_StepModel) aModel = Handle(StepData_StepModel)::DownCast(aWriter.Writer().WS()->Model()); STEPControl_StepModelType aMode = static_cast(aNode->InternalParameters.WriteModelType); @@ -166,7 +162,7 @@ bool STEPCAFControl_Provider::Read(const TCollection_AsciiString& thePath, const Handle(TDocStd_Document)& theDocument, const Message_ProgressRange& theProgress) { - Handle(XSControl_WorkSession) aWS; + Handle(XSControl_WorkSession) aWS = new XSControl_WorkSession(); return Read(thePath, theDocument, aWS, theProgress); } @@ -178,7 +174,7 @@ bool STEPCAFControl_Provider::Write(const TCollection_AsciiString& thePath, const Handle(TDocStd_Document)& theDocument, const Message_ProgressRange& theProgress) { - Handle(XSControl_WorkSession) aWS; + Handle(XSControl_WorkSession) aWS = new XSControl_WorkSession(); return Write(thePath, theDocument, aWS, theProgress); } @@ -199,11 +195,9 @@ bool STEPCAFControl_Provider::Read(const TCollection_AsciiString& thePath, return false; } Handle(STEPCAFControl_ConfigurationNode) aNode = Handle(STEPCAFControl_ConfigurationNode)::DownCast(GetNode()); + personizeWS(theWS); STEPControl_Reader aReader; - if(!theWS.IsNull()) - { - aReader.SetWS(theWS); - } + aReader.SetWS(theWS); IFSelect_ReturnStatus aReadstat = IFSelect_RetVoid; StepData_ConfParameters aParams; aReadstat = aReader.ReadFile(thePath.ToCString(), aParams); @@ -242,11 +236,9 @@ bool STEPCAFControl_Provider::Write(const TCollection_AsciiString& thePath, } Handle(STEPCAFControl_ConfigurationNode) aNode = Handle(STEPCAFControl_ConfigurationNode)::DownCast(GetNode()); + personizeWS(theWS); STEPControl_Writer aWriter; - if(!theWS.IsNull()) - { - aWriter.SetWS(theWS); - } + aWriter.SetWS(theWS); IFSelect_ReturnStatus aWritestat = IFSelect_RetVoid; Handle(StepData_StepModel) aModel = aWriter.Model(); aModel->SetWriteLengthUnit(UnitsMethods::GetLengthUnitScale(aNode->InternalParameters.WriteUnit, UnitsMethods_LengthUnit_Millimeter)); @@ -274,7 +266,7 @@ bool STEPCAFControl_Provider::Read(const TCollection_AsciiString& thePath, TopoDS_Shape& theShape, const Message_ProgressRange& theProgress) { - Handle(XSControl_WorkSession) aWS; + Handle(XSControl_WorkSession) aWS = new XSControl_WorkSession(); return Read(thePath, theShape, aWS, theProgress); } @@ -286,7 +278,7 @@ bool STEPCAFControl_Provider::Write(const TCollection_AsciiString& thePath, const TopoDS_Shape& theShape, const Message_ProgressRange& theProgress) { - Handle(XSControl_WorkSession) aWS; + Handle(XSControl_WorkSession) aWS = new XSControl_WorkSession(); return Write(thePath, theShape, aWS, theProgress); } @@ -307,3 +299,23 @@ TCollection_AsciiString STEPCAFControl_Provider::GetVendor() const { return TCollection_AsciiString("OCC"); } + +//======================================================================= +// function : personizeWS +// purpose : +//======================================================================= +void STEPCAFControl_Provider::personizeWS(Handle(XSControl_WorkSession)& theWS) +{ + if (theWS.IsNull()) + { + Message::SendWarning() << "Warning: STEPCAFControl_Provider :" + << " Null work session, use internal temporary session"; + theWS = new XSControl_WorkSession(); + } + Handle(STEPCAFControl_Controller) aCntrl = Handle(STEPCAFControl_Controller)::DownCast(theWS->NormAdaptor()); + if (aCntrl.IsNull()) + { + STEPCAFControl_Controller::Init(); + theWS->SelectNorm("STEP"); + } +} diff --git a/src/STEPCAFControl/STEPCAFControl_Provider.hxx b/src/STEPCAFControl/STEPCAFControl_Provider.hxx index 244a26f506..d78cf5c1c6 100644 --- a/src/STEPCAFControl/STEPCAFControl_Provider.hxx +++ b/src/STEPCAFControl/STEPCAFControl_Provider.hxx @@ -133,6 +133,12 @@ public: //! @return provider's vendor name Standard_EXPORT virtual TCollection_AsciiString GetVendor() const Standard_OVERRIDE; + private: + + //! Personizes work session with current format. + //! Creates new temporary session if current session is null + //! @param[in] theWS current work session + void personizeWS(Handle(XSControl_WorkSession)& theWS); }; diff --git a/src/XSDRAWDE/XSDRAWDE.cxx b/src/XSDRAWDE/XSDRAWDE.cxx index b88b47f0fa..9038e8e43b 100644 --- a/src/XSDRAWDE/XSDRAWDE.cxx +++ b/src/XSDRAWDE/XSDRAWDE.cxx @@ -256,6 +256,7 @@ static Standard_Integer ReadFile(Draw_Interpretor& theDI, } Handle(DE_Wrapper) aConf = DE_Wrapper::GlobalWrapper()->Copy(); + Handle(XSControl_WorkSession) aWS = XSDRAW::Session(); Standard_Boolean aStat = Standard_True; if (!aConfString.IsEmpty()) { @@ -264,7 +265,7 @@ static Standard_Integer ReadFile(Draw_Interpretor& theDI, if (aStat) { TopoDS_Shape aShape; - aStat = isNoDoc ? aConf->Read(aFilePath, aShape) : aConf->Read(aFilePath, aDoc); + aStat = isNoDoc ? aConf->Read(aFilePath, aShape, aWS) : aConf->Read(aFilePath, aDoc, aWS); if (isNoDoc && aStat) { DBRep::Set(aDocShapeName.ToCString(), aShape); @@ -274,6 +275,7 @@ static Standard_Integer ReadFile(Draw_Interpretor& theDI, { return 1; } + XSDRAW::CollectActiveWorkSessions(aFilePath); return 0; } @@ -335,6 +337,7 @@ static Standard_Integer WriteFile(Draw_Interpretor& theDI, return 1; } Handle(DE_Wrapper) aConf = DE_Wrapper::GlobalWrapper()->Copy(); + Handle(XSControl_WorkSession) aWS = XSDRAW::Session(); Standard_Boolean aStat = Standard_True; if (!aConfString.IsEmpty()) { @@ -350,17 +353,18 @@ static Standard_Integer WriteFile(Draw_Interpretor& theDI, theDI << "Error: incorrect shape " << aDocShapeName << "\n"; return 1; } - aStat = aConf->Write(aFilePath, aShape); + aStat = aConf->Write(aFilePath, aShape, aWS); } else { - aStat = aConf->Write(aFilePath, aDoc); + aStat = aConf->Write(aFilePath, aDoc, aWS); } } if (!aStat) { return 1; } + XSDRAW::CollectActiveWorkSessions(aFilePath); return 0; } From 8147976d9f1a4d2b5b4a22118af1a8b1063b7f8a Mon Sep 17 00:00:00 2001 From: dpasukhi Date: Mon, 27 Nov 2023 10:07:22 +0000 Subject: [PATCH 522/639] Update OCCT version to 7.8.0 --- dox/upgrade/upgrade.md | 68 ++++++++++++++++++++++++++++++- src/Standard/Standard_Version.hxx | 2 +- 2 files changed, 68 insertions(+), 2 deletions(-) diff --git a/dox/upgrade/upgrade.md b/dox/upgrade/upgrade.md index 7bf9c8d2dd..388657c50f 100644 --- a/dox/upgrade/upgrade.md +++ b/dox/upgrade/upgrade.md @@ -7,7 +7,7 @@ Upgrade from older OCCT versions {#occt__upgrade} This document provides technical details on changes made in particular versions of OCCT. It can help to upgrade user applications based on previous versions of OCCT to newer ones. -@ref upgrade_occt770 "SEEK TO THE LAST CHAPTER (UPGRADE TO 7.7.0)" +@ref upgrade_occt780 "SEEK TO THE LAST CHAPTER (UPGRADE TO 7.8.0)" @subsection upgrade_intro_precautions Precautions @@ -2343,3 +2343,69 @@ Please use `BRepLib_ToolTriangulatedShape::ComputeNormals()` to fill in normal a A new way of using the `BRepExtrema_ShapeProximity` class was provided for computing a proximity value between two shapes. If at initialization of the `BRepExtrema_ShapeProximity` class the *theTolerance* parameter is not defined (Precision::Infinite() by default), the proximity value will be computed. + +@section upgrade_occt780 Upgrade to OCCT 7.8.0 + +@subsection upgrade_780_recommendations New Features and Recommendations + +The NCollection containers have been modernized to work with move semantics through the new `Move operator` and `Move constructor`. It is recommended to leverage this functionality in the development process.
    +Backward compatibility with STL allocators has been implemented to use the OCCT memory manager with STL allocators (NCollection_Allocator, NCollection_OccAllocator).
    +Additionally, utilities have been introduced to work with `shared_ptr` and `unique_ptr` using the OCCT memory manager (`Standard_MemoryUtils.hxx`). + +@subsection upgrade_780_ncollection_update Change in Default Clear Behavior for Containers + +NCollection container's `Clear(const bool theReleaseMemory = true)` have been changed to `Clear(const bool theReleaseMemory = false)`.
    +Impacted classes include `IndexedMap`, `IndexedDataMap`, `Map`, `DataMap`, `DynamicArray(Vector)`, `IncAllocator`.
    +This means that allocated memory for the container will be reused. In this case, it's necessary to be careful with `IncAllocator::Reset()` to control owners of memory blocks. + +@subsection upgrade_780_hash_utils Reworked Hash Mechanism for Hash Map (NCollection's map) + +The `HashCode(value, upperBound)` static method has been removed and `IsEqual(value1, value2)` is no longer used in the map.
    +NCollection's map now operates on an STL-like hash mechanism: a struct with a public operator `size_t operator()(object&) const` and `bool operator(object&, object&) const`.
    +The difference between STL and OCCT is that the hash struct and comparator are combined into a single struct to reduce conflicts on OCCT's user side.
    +Hash utils have been implemented to hash objects, returning `uint32_t` and `uint64_t` depending on the template (`Standard_HashUtils.hxx`). Algorithms used are `MurmurHash` and `FNVHash`.
    +Benefits: +* x64 using 8 bytes to store the hash instead of 4 bytes. +* OCCT classes will now be usable as elements in STL `unordered_map` and `unordered_set`. + +The migration problem will occur at compile time. Make sure that `int HashCode` has been changed anywhere to `size operator` and `bool IsEqual` to `bool operator`. + +@subsection upgrade_780_removed_files Removed Hash Specialization Classes + +The majority of include files containing only specialized hashes have been removed. +Their functionality has been consolidated into the hashed object include file (in the "std" namespace).
    +It is guaranteed that each removed hash class has been transferred to the native hash mechanism of the hashed class. + +The migration problem may arise at compile time. Ensure that you remove any files that have been deprecated. + +@subsection upgrade_780_tk_rework Reorganized DE TK + +DE TK components have been combined or separated based on specific CAD formats to support plug-in ability. +* Components now have a "TKDE" prefix. The available list includes `TKDESTEP`, `TKDEOBJ`, `TKDEIGES`, `TKDEGLTF`, `TKDEVRML`, `TKDEPLY`, `TKDESTL`. +* The DE DRAW TK has been updated in a similar way: DRAW components now have a "TKXSDRAW" prefix. The available list includes `TKXSDRAWSTEP`, `TKXSDRAWOBJ`, `TKXSDRAWIGES`, `TKXSDRAWGLTF`, `TKXSDRAWVRML`, `TKXSDRAWPLY`, `TKXSDRAWSTL`. + +Migration problems may occur during configuration time or compile time. Ensure that you update your project configuration accordingly. + +@subsection upgrade_780_step_thread_safety Implemented STEP Thread-safety Interface + +The STEP interface now uses Static_Interface to extract exchange settings.
    +A new ability has been implemented to determine parameters in STEP, avoiding Static_Interface. +* For reading, use an additional argument with STEP's parameters in `ReadFile` or `Perform`. +* For writing, use an additional argument with STEP's parameters in `Transfer` or `Perform`. + +@subsection upgrade_780_new_memory_manager New Memory Management Functionality + +`Standard.hxx` has a new method `AllocateOptimal` for allocating without post-processing (cleaning).
    +New profiles to allocate memory (defined at configuration time): +* `Native` - allocates with standard `malloc` and `calloc` functionality, performance depends on the OS. +* `TBB` - allocates with TBB's `scalable` allocator functionality. +* `JeMalloc` - allocates with `jemalloc` functions. +* `Flexible` - old-way allocation which defines allocation method in real-time by environment variables.
    + +The most recommended manager is `JeMalloc`. To use it with a plugin system, like `DRAW`, please ensure that JeMalloc was built with the `--disable-initial-exec-tls` flag. For more details, visit [JeMalloc](http://jemalloc.net/). + +@subsection upgrade_780_optimization_profiles New CMake Variable for Optimization Profiles + +`BUILD_OPT_PROFILE` is a new variable to define optimization level. Available profiles: +* `Default` - specializes only in quality-dependent parameters for the compiler. +* `Production` - specializes in performance and quality-dependent parameters for the compiler and linker. diff --git a/src/Standard/Standard_Version.hxx b/src/Standard/Standard_Version.hxx index da0836c415..a63026cd3a 100644 --- a/src/Standard/Standard_Version.hxx +++ b/src/Standard/Standard_Version.hxx @@ -42,7 +42,7 @@ //! - "dev" for development version between releases //! - "beta..." or "rc..." for beta releases or release candidates //! - "project..." for version containing project-specific fixes -#define OCC_VERSION_DEVELOPMENT "dev" +//#define OCC_VERSION_DEVELOPMENT "dev" // Derived (manually): version as real and string (major.minor) #define OCC_VERSION 7.8 From ffd7a3aa4f0a62b217a69c549a41bee8ddad9783 Mon Sep 17 00:00:00 2001 From: dpasukhi Date: Wed, 6 Dec 2023 10:42:54 +0000 Subject: [PATCH 523/639] 0033544: Foundation Classes - Fixing compiler problems [HotFix] Fixed problem with Clang-16 Fixed problem with SWIG-4 Fixed genproj procedure --- adm/UDLIST | 1 + src/Message/Message_AttributeMeter.cxx | 2 +- src/NCollection/NCollection_Array1.hxx | 20 ++------------------ src/NCollection/NCollection_DynamicArray.hxx | 18 +----------------- src/NCollection/NCollection_Iterator.hxx | 10 ++++++++++ 5 files changed, 15 insertions(+), 36 deletions(-) diff --git a/adm/UDLIST b/adm/UDLIST index 14f425239d..9441779af1 100644 --- a/adm/UDLIST +++ b/adm/UDLIST @@ -32,6 +32,7 @@ n UnitsAPI n gp n math r OS +n FlexLexer t TKMath t TKernel n Adaptor2d diff --git a/src/Message/Message_AttributeMeter.cxx b/src/Message/Message_AttributeMeter.cxx index d6be5057ef..e50976c910 100644 --- a/src/Message/Message_AttributeMeter.cxx +++ b/src/Message/Message_AttributeMeter.cxx @@ -253,6 +253,6 @@ void Message_AttributeMeter::DumpJson (Standard_OStream& theOStream, anIterator.More(); anIterator.Next()) { OCCT_DUMP_VECTOR_CLASS (theOStream, Message::MetricToString (anIterator.Key()), - 2, anIterator.Value(), anIterator.Value()) + 2, anIterator.Value().first, anIterator.Value().second) } } diff --git a/src/NCollection/NCollection_Array1.hxx b/src/NCollection/NCollection_Array1.hxx index 4dcabc29f5..a52b6cc908 100644 --- a/src/NCollection/NCollection_Array1.hxx +++ b/src/NCollection/NCollection_Array1.hxx @@ -72,26 +72,10 @@ public: using iterator = NCollection_IndexedIterator; using const_iterator = NCollection_IndexedIterator; + using Iterator = NCollection_Iterator>; public: - // Iterator class - class Iterator : public NCollection_Iterator - { - public: - using NCollection_Iterator::NCollection_Iterator; - - const_reference Value() const - { - return *NCollection_Iterator::ValueIter(); - } - - reference ChangeValue() - { - return *NCollection_Iterator::ChangeValueIter(); - } - }; - const_iterator begin() const { return const_iterator(*this); @@ -150,7 +134,7 @@ public: mySize(theUpper - theLower + 1), myPointer(nullptr), myIsOwner(false), - allocator_type(theAlloc) + myAllocator(theAlloc) { if (mySize == 0) { diff --git a/src/NCollection/NCollection_DynamicArray.hxx b/src/NCollection/NCollection_DynamicArray.hxx index 5c7ebc655b..ac93f52908 100644 --- a/src/NCollection/NCollection_DynamicArray.hxx +++ b/src/NCollection/NCollection_DynamicArray.hxx @@ -77,26 +77,10 @@ public: using iterator = NCollection_IndexedIterator; using const_iterator = NCollection_IndexedIterator; + using Iterator = NCollection_Iterator>; public: - // Iterator class - class Iterator : public NCollection_Iterator - { - public: - using NCollection_Iterator::NCollection_Iterator; - - const_reference Value() const - { - return *NCollection_Iterator::ValueIter(); - } - - reference ChangeValue() - { - return *NCollection_Iterator::ChangeValueIter(); - } - }; - const_iterator begin() const { return const_iterator(*this); diff --git a/src/NCollection/NCollection_Iterator.hxx b/src/NCollection/NCollection_Iterator.hxx index ec4481ae40..268adf2f91 100644 --- a/src/NCollection/NCollection_Iterator.hxx +++ b/src/NCollection/NCollection_Iterator.hxx @@ -94,6 +94,16 @@ public: ++(myCur); } + const typename Container::const_reference Value() const + { + return *myCur; + } + + const typename Container::reference ChangeValue() + { + return *myCur; + } + bool operator==(const NCollection_Iterator& theOther) { return myLast == theOther.myLast && myCur == theOther.myCur; } bool operator!=(const NCollection_Iterator& theOther) { return myLast != theOther.myLast || myCur != theOther.myCur; } From e8605596c901d48b5e79deae24eece67f1bc11cf Mon Sep 17 00:00:00 2001 From: dpasukhi Date: Mon, 11 Dec 2023 10:00:21 +0000 Subject: [PATCH 524/639] 0033548: Tests - VC142 internal problem for Chamfer functionality Update test cases for Jenkins old compiler. Mark as BAD --- tests/bugs/modalg_1/bug116 | 11 ++++------- tests/bugs/modalg_2/bug293 | 3 +++ tests/bugs/moddata_2/bug266 | 16 ++++++++-------- tests/chamfer/data/complex/A5 | 2 +- tests/chamfer/end | 21 +++++++++++++++++++++ 5 files changed, 37 insertions(+), 16 deletions(-) diff --git a/tests/bugs/modalg_1/bug116 b/tests/bugs/modalg_1/bug116 index 3d38481580..a7ea19d7b0 100755 --- a/tests/bugs/modalg_1/bug116 +++ b/tests/bugs/modalg_1/bug116 @@ -1,3 +1,4 @@ +puts "TODO OCC33548 Windows: compute of chamfer failed" puts "================" puts "OCC116" @@ -14,12 +15,8 @@ explode sh f explode sh_6 e if [catch {chamf result sh sh_6_1 sh_6 A 2 45 sh_6_8 sh_6 A 2 45 } catch_result] { - puts "1) Faulty OCC116: chamfer is NOT created properly" } else { - puts "1) CHAMF OCC116 OK" + checkprops result -s 48357.5 + checkshape result + checkview -display result -2d -path ${imagedir}/${test_image}.png } - -checkprops result -s 48357.5 -checkshape result -checkview -display result -2d -path ${imagedir}/${test_image}.png - diff --git a/tests/bugs/modalg_2/bug293 b/tests/bugs/modalg_2/bug293 index 07744e7d37..0298df8fed 100755 --- a/tests/bugs/modalg_2/bug293 +++ b/tests/bugs/modalg_2/bug293 @@ -1,3 +1,6 @@ +puts "TODO OCC33548 Windows: compute of chamfer failed" +puts "TODO OCC33548 Windows: TEST INCOMPLETE" + puts "================" puts "OCC293" puts "================" diff --git a/tests/bugs/moddata_2/bug266 b/tests/bugs/moddata_2/bug266 index e9d8377e98..8ece46b446 100755 --- a/tests/bugs/moddata_2/bug266 +++ b/tests/bugs/moddata_2/bug266 @@ -1,5 +1,5 @@ -puts "TODO OCC24156 MacOS: Tcl Exception: compute of chamfer failed" -puts "TODO OCC24156 MacOS: TEST INCOMPLETE" +puts "TODO OCC24156 MacOS: compute of chamfer failed" +puts "TODO OCC33548 Windows: compute of chamfer failed" puts "================" puts "OCC266" @@ -15,9 +15,9 @@ explode edge e renamevar edge face explode face f -chamf result face edge_10 face_3 A 1 45 edge_6 face_3 A 1 45 edge_11 face_3 A 1 45 edge_12 face_3 A 1 45 edge_13 face_3 A 1 45 edge_14 face_3 A 1 45 edge_8 face_3 A 1 45 edge_9 face_3 A 1 45 -checkshape result - -checkprops result -s 48913 -checkview -display result -2d -path ${imagedir}/${test_image}.png - +if [catch {chamf result face edge_10 face_3 A 1 45 edge_6 face_3 A 1 45 edge_11 face_3 A 1 45 edge_12 face_3 A 1 45 edge_13 face_3 A 1 45 edge_14 face_3 A 1 45 edge_8 face_3 A 1 45 edge_9 face_3 A 1 45 } catch_result] { +} else { + checkshape result + checkprops result -s 48913 + checkview -display result -2d -path ${imagedir}/${test_image}.png +} diff --git a/tests/chamfer/data/complex/A5 b/tests/chamfer/data/complex/A5 index 9da88b0f16..ea74677898 100644 --- a/tests/chamfer/data/complex/A5 +++ b/tests/chamfer/data/complex/A5 @@ -6,7 +6,7 @@ set chamf_equal_dist [list "0.03 " "0.05 " "0.05 " "0.03 " "0.05 if { [string compare $command chamf_sequence] == 0 } { if {[string compare $group dist_angle] == 0} { puts "TODO OCC22909 All: compute of chamfer failed" - puts "TODO OCC22909 All:Faulty shapes in variables faulty_1 to faulty_6" + puts "TODO OCC22909 Linux:Faulty shapes in variables faulty_1 to faulty_6" } if {[string compare $group dist_dist] == 0} { puts "TODO OCC22909 All: compute of chamfer failed" diff --git a/tests/chamfer/end b/tests/chamfer/end index 31a1d89915..89d6246626 100644 --- a/tests/chamfer/end +++ b/tests/chamfer/end @@ -1,3 +1,24 @@ +set shouldFailed 0 + +if { $group eq "dist_angle" && $command eq "chamf" } { + if { ($test_image eq "A3" && $chamf_shape eq "test-fillet.brep") || + ($test_image eq "E5" && $chamf_shape eq "CCH_testchet.rle") || + ($test_image eq "A1" && $chamf_shape eq "CCH_001_ahdb.rle") || + ($test_image eq "A4" && $chamf_shape eq "test-fillet.brep") || + ($test_image eq "A5" && $chamf_shape eq "test-fillet.brep") } { + set shouldFailed 1 + } +} elseif { $group eq "dist_angle" && $command eq "chamf_sequence" } { + if { ($test_image eq "A1" && $chamf_shape eq "CCH_001_ahdb.rle") || + ($test_image eq "A4" && $chamf_shape eq "test-fillet.brep") } { + set shouldFailed 1 + } +} + +if {$shouldFailed} { + puts "TODO OCC33548 Windows: compute of chamfer failed" +} + restore [locate_data_file $chamf_shape] sh if { [dval SCALE] != 0 } { tscale sh 0 0 0 SCALE From 6ef56849a53abc27aa7c3bd2226c4a157f3a5c56 Mon Sep 17 00:00:00 2001 From: rodrlyra Date: Mon, 4 Dec 2023 17:17:23 +0000 Subject: [PATCH 525/639] 0033542: Visualization, AIS_ViewController - New AIS_DragAction for when drag interaction is confirmed Added AIS_DragAction_Confirmed drag action, which will be called by AIS_ViewController when the drag interaction is confirmed (mouse moved more than click threshold). --- src/AIS/AIS_DragAction.hxx | 9 +++++---- src/AIS/AIS_LightSource.cxx | 4 ++++ src/AIS/AIS_Manipulator.cxx | 4 ++++ src/AIS/AIS_ViewController.cxx | 21 +++++++++++++++++++++ src/AIS/AIS_ViewInputBuffer.hxx | 16 +++++++++------- 5 files changed, 43 insertions(+), 11 deletions(-) diff --git a/src/AIS/AIS_DragAction.hxx b/src/AIS/AIS_DragAction.hxx index cf3bf238ba..f74c9922b6 100644 --- a/src/AIS/AIS_DragAction.hxx +++ b/src/AIS/AIS_DragAction.hxx @@ -17,10 +17,11 @@ //! Dragging action. enum AIS_DragAction { - AIS_DragAction_Start, //!< (try) start dragging object - AIS_DragAction_Update, //!< perform dragging (update position) - AIS_DragAction_Stop, //!< stop dragging (save position) - AIS_DragAction_Abort, //!< abort dragging (restore initial position) + AIS_DragAction_Start, //!< (try) start dragging object + AIS_DragAction_Confirmed, //!< dragging interaction is confirmed. + AIS_DragAction_Update, //!< perform dragging (update position) + AIS_DragAction_Stop, //!< stop dragging (save position) + AIS_DragAction_Abort, //!< abort dragging (restore initial position) }; #endif // _AIS_DragAction_HeaderFile diff --git a/src/AIS/AIS_LightSource.cxx b/src/AIS/AIS_LightSource.cxx index f70f4e70d8..3a375992c7 100644 --- a/src/AIS/AIS_LightSource.cxx +++ b/src/AIS/AIS_LightSource.cxx @@ -259,6 +259,10 @@ Standard_Boolean AIS_LightSource::ProcessDragging (const Handle(AIS_InteractiveC myLocTrsfStart = LocalTransformation(); return Standard_True; } + case AIS_DragAction_Confirmed: + { + return Standard_True; + } case AIS_DragAction_Update: { mySensSphere->ResetLastDetectedPoint(); diff --git a/src/AIS/AIS_Manipulator.cxx b/src/AIS/AIS_Manipulator.cxx index 4cd43844b8..21491cc35a 100644 --- a/src/AIS/AIS_Manipulator.cxx +++ b/src/AIS/AIS_Manipulator.cxx @@ -661,6 +661,10 @@ Standard_Boolean AIS_Manipulator::ProcessDragging (const Handle(AIS_InteractiveC } break; } + case AIS_DragAction_Confirmed: + { + return Standard_True; + } case AIS_DragAction_Update: { Transform (theDragTo.x(), theDragTo.y(), theView); diff --git a/src/AIS/AIS_ViewController.cxx b/src/AIS/AIS_ViewController.cxx index a19519456d..78e7007471 100644 --- a/src/AIS/AIS_ViewController.cxx +++ b/src/AIS/AIS_ViewController.cxx @@ -332,6 +332,11 @@ void AIS_ViewController::flushBuffers (const Handle(AIS_InteractiveContext)& , myGL.Dragging.ToStart = true; myGL.Dragging.PointStart = myUI.Dragging.PointStart; } + if (myUI.Dragging.ToConfirm) + { + myUI.Dragging.ToConfirm = false; + myGL.Dragging.ToConfirm = true; + } if (myUI.Dragging.ToMove) { myUI.Dragging.ToMove = false; @@ -928,6 +933,7 @@ bool AIS_ViewController::UpdateMousePosition (const Graphic3d_Vec2i& thePoint, myMouseClickCounter = 0; myMouseSingleButton = -1; myMouseStopDragOnUnclick = true; + myUI.Dragging.ToConfirm = true; } } @@ -2738,6 +2744,17 @@ void AIS_ViewController::OnObjectDragged (const Handle(AIS_InteractiveContext)& } return; } + case AIS_DragAction_Confirmed: + { + if (myDragObject.IsNull()) + { + return; + } + + myDragObject->ProcessDragging (theCtx, theView, myDragOwner, myGL.Dragging.PointStart, + myGL.Dragging.PointTo, theAction); + return; + } case AIS_DragAction_Update: { if (myDragObject.IsNull()) @@ -3057,6 +3074,10 @@ void AIS_ViewController::handleDynamicHighlight (const Handle(AIS_InteractiveCon } else if (myGL.Dragging.ToMove) { + if (myGL.Dragging.ToConfirm) + { + OnObjectDragged (theCtx, theView, AIS_DragAction_Confirmed); + } OnObjectDragged (theCtx, theView, AIS_DragAction_Update); myGL.OrbitRotation.ToRotate = false; myGL.ViewRotation .ToRotate = false; diff --git a/src/AIS/AIS_ViewInputBuffer.hxx b/src/AIS/AIS_ViewInputBuffer.hxx index afcc4feb0d..c009e9f65e 100644 --- a/src/AIS/AIS_ViewInputBuffer.hxx +++ b/src/AIS/AIS_ViewInputBuffer.hxx @@ -87,13 +87,14 @@ public: struct _draggingParams { bool ToStart; //!< start dragging + bool ToConfirm; //!< confirm dragging bool ToMove; //!< perform dragging bool ToStop; //!< stop dragging bool ToAbort; //!< abort dragging (restore previous position) Graphic3d_Vec2i PointStart; //!< drag start point Graphic3d_Vec2i PointTo; //!< drag end point - _draggingParams() : ToStart (false), ToMove (false), ToStop (false), ToAbort (false) {} + _draggingParams() : ToStart (false), ToConfirm (false), ToMove (false), ToStop (false), ToAbort (false) {} } Dragging; struct _orbitRotation @@ -139,12 +140,13 @@ public: Selection.ToApplyTool = false; IsNewGesture = false; ZoomActions.Clear(); - Panning.ToStart = false; - Panning.ToPan = false; - Dragging.ToStart = false; - Dragging.ToMove = false; - Dragging.ToStop = false; - Dragging.ToAbort = false; + Panning.ToStart = false; + Panning.ToPan = false; + Dragging.ToStart = false; + Dragging.ToConfirm = false; + Dragging.ToMove = false; + Dragging.ToStop = false; + Dragging.ToAbort = false; OrbitRotation.ToStart = false; OrbitRotation.ToRotate = false; ViewRotation.ToStart = false; From 60792f26f056cbf307b1890da0bf1cb384e528f3 Mon Sep 17 00:00:00 2001 From: Xu Zhongxing Date: Wed, 13 Dec 2023 14:41:18 +0800 Subject: [PATCH 526/639] 0033552: Foundation Classes - NCollection_BaseMap move ctor clears wrong pointer Replaced correct class member to clear --- src/NCollection/NCollection_BaseMap.hxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/NCollection/NCollection_BaseMap.hxx b/src/NCollection/NCollection_BaseMap.hxx index 2e6b7f4471..07e530db08 100644 --- a/src/NCollection/NCollection_BaseMap.hxx +++ b/src/NCollection/NCollection_BaseMap.hxx @@ -178,7 +178,7 @@ public: isDouble(theOther.isDouble) { theOther.myData1 = nullptr; - theOther.myData1 = nullptr; + theOther.myData2 = nullptr; theOther.mySize = 0; theOther.myNbBuckets = 0; } From 06282d9c7c9e49bfa778bae2dde37d51a75d77c1 Mon Sep 17 00:00:00 2001 From: dpasukhi Date: Thu, 14 Dec 2023 10:07:21 +0000 Subject: [PATCH 527/639] 0033553: Foundation Classes - HashUtils compilation problem Updated OptimalSeed template --- src/Standard/Standard_HashUtils.hxx | 20 ++++---------------- src/TopLoc/TopLoc_Location.lxx | 1 + 2 files changed, 5 insertions(+), 16 deletions(-) diff --git a/src/Standard/Standard_HashUtils.hxx b/src/Standard/Standard_HashUtils.hxx index 40b613fcab..cee0703710 100644 --- a/src/Standard/Standard_HashUtils.hxx +++ b/src/Standard/Standard_HashUtils.hxx @@ -46,15 +46,9 @@ namespace opencascade } template - constexpr typename std::enable_if::type optimalSeed() + constexpr T optimalSeed() { - return 0xA329F1D3A586ULL; - } - - template - constexpr typename std::enable_if::type optimalSeed() - { - return static_cast(0xc70f6907U); + return sizeof(T) == 8 ? static_cast(0xA329F1D3A586ULL) : static_cast(0xc70f6907U); } }; @@ -84,15 +78,9 @@ namespace opencascade } template - constexpr typename std::enable_if::type optimalSeed() - { - return 14695981039346656037ULL; - } - - template - constexpr typename std::enable_if::type optimalSeed() + constexpr T optimalSeed() { - return static_cast(2166136261U); + return sizeof(T) == 8 ? static_cast(14695981039346656037ULL) : static_cast(2166136261U); } }; diff --git a/src/TopLoc/TopLoc_Location.lxx b/src/TopLoc/TopLoc_Location.lxx index f228dea024..833632b439 100644 --- a/src/TopLoc/TopLoc_Location.lxx +++ b/src/TopLoc/TopLoc_Location.lxx @@ -14,6 +14,7 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. +#include #include #include #include From 5b0f5b52b9f904c8b6051ac4d6e71d435351bf9e Mon Sep 17 00:00:00 2001 From: dpasukhi Date: Thu, 14 Dec 2023 21:39:25 +0000 Subject: [PATCH 528/639] 0033554: Foundation Classes - Missed hash specialization for enumerations Fixed problem with missed hash specialization --- src/NCollection/NCollection_DefaultHasher.hxx | 44 ++++++++++++++++++- 1 file changed, 43 insertions(+), 1 deletion(-) diff --git a/src/NCollection/NCollection_DefaultHasher.hxx b/src/NCollection/NCollection_DefaultHasher.hxx index 4007ea2739..188bb1b23f 100644 --- a/src/NCollection/NCollection_DefaultHasher.hxx +++ b/src/NCollection/NCollection_DefaultHasher.hxx @@ -29,8 +29,50 @@ * IsEqual. */ template -DEFINE_HASHER(NCollection_DefaultHasher, TheKeyType, std::hash, std::equal_to) +struct NCollection_DefaultHasher +{ + size_t operator()(const TheKeyType& theKey) const noexcept + { + return HashCode(theKey); + } + bool operator() (const TheKeyType& theK1, const TheKeyType& theK2) const noexcept + { + return IsEqual(theK1, theK2); + } + +private: + // For non-enums + template + typename std::enable_if::value, size_t>::type + HashCode(const TheKeyType& theKey) const noexcept + { + return std::hash{}(theKey); + } + + // For non-enums + template + typename std::enable_if::value, bool>::type + IsEqual(const TheKeyType& theK1, const TheKeyType& theK2) const noexcept + { + return std::equal_to{}(theK1, theK2); + } + + // For enums + template + typename std::enable_if::value, size_t>::type + HashCode(const TheKeyType& theKey) const noexcept + { + return static_cast(theKey); + } + // For enums + template + typename std::enable_if::value, bool>::type + IsEqual(const TheKeyType& theK1, const TheKeyType& theK2) const noexcept + { + return theK1 == theK2; + } +}; #define DEFINE_DEFAULT_HASHER_PURE(TheKeyType) \ template <> struct NCollection_DefaultHasher \ From 83bb2a329d6bb51a194aa27abb11facde2f6a270 Mon Sep 17 00:00:00 2001 From: dpasukhi Date: Thu, 14 Dec 2023 22:56:36 +0000 Subject: [PATCH 529/639] 0033555: Foundation Classes - DEBUG macro leads to compile error Removed incorrect parameter call when DEBUG macro is active --- src/BRepCheck/BRepCheck_Shell.cxx | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/src/BRepCheck/BRepCheck_Shell.cxx b/src/BRepCheck/BRepCheck_Shell.cxx index 1b9850abec..b0a6ea3875 100644 --- a/src/BRepCheck/BRepCheck_Shell.cxx +++ b/src/BRepCheck/BRepCheck_Shell.cxx @@ -492,10 +492,9 @@ BRepCheck_Status BRepCheck_Shell::Orientation(const Standard_Boolean Update) #ifdef OCCT_DEBUG if (BRepCheck_Trace(0) > 1) { TopTools_DataMapIteratorOfDataMapOfShapeInteger itt(MapOfShapeOrientation); - Standard_Integer upper = MapOfShapeOrientation.NbBuckets(); std::cout << "La map shape Orientation :" << std::endl; for (; itt.More(); itt.Next()) { - PrintShape(itt.Key(), upper); + PrintShape(itt.Key()); } std::cout << std::endl; } @@ -716,7 +715,7 @@ BRepCheck_Status BRepCheck_Shell::Orientation(const Standard_Boolean Update) if (BRepCheck_Trace(0) > 3) { std::cout << "Fref : " ; - PrintShape(Fref, MapOfShapeOrientation.NbBuckets()); + PrintShape(Fref); } #endif @@ -766,7 +765,7 @@ BRepCheck_Status BRepCheck_Shell::Orientation(const Standard_Boolean Update) if (BRepCheck_Trace(0) > 3) { std::cout << " Fcur : " ; - PrintShape(Fcur, MapOfShapeOrientation.NbBuckets()); + PrintShape(Fcur); } #endif for (edFcur.Init(Fcur, TopAbs_EDGE); edFcur.More(); edFcur.Next()) @@ -794,7 +793,7 @@ BRepCheck_Status BRepCheck_Shell::Orientation(const Standard_Boolean Update) Fcur.Orientation(orf); std::cout << " Error : this face has been already examined " << std::endl; std::cout << " Impossible to return it "; - PrintShape(Fcur, MapOfShapeOrientation.NbBuckets()); + PrintShape(Fcur); } #endif return myOstat; @@ -809,7 +808,7 @@ BRepCheck_Status BRepCheck_Shell::Orientation(const Standard_Boolean Update) orf = (TopAbs_Orientation)MapOfShapeOrientation.Find(Fcur); Fcur.Orientation(orf); std::cout << " Resulting Fcur is returned : " ; - PrintShape(Fcur, MapOfShapeOrientation.NbBuckets()); + PrintShape(Fcur); } #endif From 656b0d217fcc3f6611dfabc0206bd2d967ed5265 Mon Sep 17 00:00:00 2001 From: dpasukhi Date: Mon, 18 Dec 2023 11:50:25 +0000 Subject: [PATCH 530/639] 0033557: Coding - Cocoa compilation problem Fixed extern relation for VisTest component on MacOS --- src/ViewerTest/ViewerTest_ViewerCommands.cxx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/ViewerTest/ViewerTest_ViewerCommands.cxx b/src/ViewerTest/ViewerTest_ViewerCommands.cxx index 2124453e20..0de77278ea 100644 --- a/src/ViewerTest/ViewerTest_ViewerCommands.cxx +++ b/src/ViewerTest/ViewerTest_ViewerCommands.cxx @@ -176,11 +176,12 @@ namespace GetDisplayConnection() = theDisplayConnection; } - static ViewerTest_ViewerCommandsViewMap ViewerTest_myViews; static ViewerTest_ViewerCommandsInteractiveContextMap ViewerTest_myContexts; static ViewerTest_ViewerCommandsGraphicDriverMap ViewerTest_myDrivers; } +ViewerTest_ViewerCommandsViewMap ViewerTest_myViews; + static struct { Quantity_Color FlatColor; From f0caf64f5425c375819f1f4ca4fbc6e45ae7a76a Mon Sep 17 00:00:00 2001 From: dpasukhi Date: Tue, 26 Dec 2023 08:36:40 +0000 Subject: [PATCH 531/639] Update version to 7.8.1 dev --- src/Standard/Standard_Version.hxx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Standard/Standard_Version.hxx b/src/Standard/Standard_Version.hxx index a63026cd3a..631419cfd4 100644 --- a/src/Standard/Standard_Version.hxx +++ b/src/Standard/Standard_Version.hxx @@ -35,19 +35,19 @@ // Primary definitions #define OCC_VERSION_MAJOR 7 #define OCC_VERSION_MINOR 8 -#define OCC_VERSION_MAINTENANCE 0 +#define OCC_VERSION_MAINTENANCE 1 //! This macro must be commented in official release, and set to non-empty //! string in other situations, to identify specifics of the version, e.g.: //! - "dev" for development version between releases //! - "beta..." or "rc..." for beta releases or release candidates //! - "project..." for version containing project-specific fixes -//#define OCC_VERSION_DEVELOPMENT "dev" +#define OCC_VERSION_DEVELOPMENT "dev" // Derived (manually): version as real and string (major.minor) #define OCC_VERSION 7.8 #define OCC_VERSION_STRING "7.8" -#define OCC_VERSION_COMPLETE "7.8.0" +#define OCC_VERSION_COMPLETE "7.8.1" //! Derived: extended version as string ("major.minor.maintenance.dev") #ifdef OCC_VERSION_DEVELOPMENT From 5c9480638558bd1b4528669b1eb4859cadd9a257 Mon Sep 17 00:00:00 2001 From: drochalo Date: Thu, 26 Oct 2023 11:43:19 +0100 Subject: [PATCH 532/639] 0032487: Visualization - synchronize myHasEntityWithPersistence with such entities number Changed myHasEntityWithPersistence to a counter. Renamed variable to myNbEntityWithPersistence. Modified HasEntityWithPersistence() method. Modified logical test in SelectMgr_ViewerSelector::traverseObject. --- src/SelectMgr/SelectMgr_SensitiveEntitySet.cxx | 16 ++++++++++------ src/SelectMgr/SelectMgr_SensitiveEntitySet.hxx | 8 ++++---- 2 files changed, 14 insertions(+), 10 deletions(-) diff --git a/src/SelectMgr/SelectMgr_SensitiveEntitySet.cxx b/src/SelectMgr/SelectMgr_SensitiveEntitySet.cxx index 209d9f9b55..5f853514b7 100644 --- a/src/SelectMgr/SelectMgr_SensitiveEntitySet.cxx +++ b/src/SelectMgr/SelectMgr_SensitiveEntitySet.cxx @@ -28,7 +28,7 @@ IMPLEMENT_STANDARD_RTTIEXT(SelectMgr_SensitiveEntitySet, BVH_PrimitiveSet3d) SelectMgr_SensitiveEntitySet::SelectMgr_SensitiveEntitySet (const Handle(Select3D_BVHBuilder3d)& theBuilder) : BVH_PrimitiveSet3d (theBuilder) { - // + myNbEntityWithPersistence = 0; } //======================================================================= @@ -42,7 +42,6 @@ void SelectMgr_SensitiveEntitySet::Append (const Handle(SelectMgr_SensitiveEntit theEntity->ResetSelectionActiveStatus(); return; } - const Standard_Integer anExtent = mySensitives.Extent(); if (mySensitives.Add (theEntity) > anExtent) { @@ -50,7 +49,7 @@ void SelectMgr_SensitiveEntitySet::Append (const Handle(SelectMgr_SensitiveEntit } if (!theEntity->BaseSensitive()->TransformPersistence().IsNull()) { - myHasEntityWithPersistence = Standard_True; + ++myNbEntityWithPersistence; } MarkDirty(); } @@ -78,7 +77,7 @@ void SelectMgr_SensitiveEntitySet::Append (const Handle(SelectMgr_Selection)& th } if (!aSensEnt->BaseSensitive()->TransformPersistence().IsNull()) { - myHasEntityWithPersistence = Standard_True; + ++myNbEntityWithPersistence; } } MarkDirty(); @@ -93,7 +92,8 @@ void SelectMgr_SensitiveEntitySet::Remove (const Handle(SelectMgr_Selection)& th { for (NCollection_Vector::Iterator aSelEntIter (theSelection->Entities()); aSelEntIter.More(); aSelEntIter.Next()) { - const Standard_Integer anEntIdx = mySensitives.FindIndex (aSelEntIter.Value()); + const Handle(SelectMgr_SensitiveEntity)& aSensEnt = aSelEntIter.Value(); + const Standard_Integer anEntIdx = mySensitives.FindIndex (aSensEnt); if (anEntIdx == 0) { continue; @@ -103,9 +103,13 @@ void SelectMgr_SensitiveEntitySet::Remove (const Handle(SelectMgr_Selection)& th { Swap (anEntIdx - 1, mySensitives.Size() - 1); } + if (!aSensEnt->BaseSensitive()->TransformPersistence().IsNull()) + { + --myNbEntityWithPersistence; + } mySensitives.RemoveLast(); - removeOwner (aSelEntIter.Value()->BaseSensitive()->OwnerId()); + removeOwner (aSensEnt->BaseSensitive()->OwnerId()); } MarkDirty(); diff --git a/src/SelectMgr/SelectMgr_SensitiveEntitySet.hxx b/src/SelectMgr/SelectMgr_SensitiveEntitySet.hxx index 41cf732333..01752fd2f3 100644 --- a/src/SelectMgr/SelectMgr_SensitiveEntitySet.hxx +++ b/src/SelectMgr/SelectMgr_SensitiveEntitySet.hxx @@ -77,7 +77,7 @@ public: const SelectMgr_MapOfOwners& Owners() const { return myOwnersMap; } //! Returns map of entities. - Standard_Boolean HasEntityWithPersistence() const { return myHasEntityWithPersistence; } + Standard_Boolean HasEntityWithPersistence() const { return myNbEntityWithPersistence > 0; } protected: @@ -89,9 +89,9 @@ protected: private: - SelectMgr_IndexedMapOfHSensitive mySensitives; //!< Map of entities and its corresponding index in BVH - SelectMgr_MapOfOwners myOwnersMap; //!< Map of entity owners and its corresponding number of sensitives - Standard_Boolean myHasEntityWithPersistence; //!< flag if some of sensitive entity has own transform persistence + SelectMgr_IndexedMapOfHSensitive mySensitives; //!< Map of entities and its corresponding index in BVH + SelectMgr_MapOfOwners myOwnersMap; //!< Map of entity owners and its corresponding number of sensitives + Standard_Integer myNbEntityWithPersistence; //!< number of sensitive entities that have own transform persistence }; #endif // _SelectMgr_SensitiveEntitySet_HeaderFile From 0141024df595cdc8db3004927ca48c249776603b Mon Sep 17 00:00:00 2001 From: rodrlyra Date: Mon, 11 Dec 2023 16:37:36 +0000 Subject: [PATCH 533/639] 0033551: Visualization - Add new transform persistence mode to force orthographic projection on object. The new transform persistence mode, with flag `Graphic3d_TMF_OrthoPers`, can be combined (bitwise OR operation) with the other persistence modes (2D, Trihedron or Zoom/Rotate Persistence) to make objects be rendered with orthographic projection when it is on a view with perspective projection. If the view already uses orthographic projection, there will be no difference. This feature was implemented to fix ViewCube being distorted when view with perspective projection changes size. --- src/Graphic3d/Graphic3d_TransModeFlags.hxx | 7 ++ src/Graphic3d/Graphic3d_TransformPers.hxx | 119 +++++++++++------- src/SelectMgr/SelectMgr_AxisIntersector.cxx | 18 +++ src/SelectMgr/SelectMgr_AxisIntersector.hxx | 5 + src/SelectMgr/SelectMgr_BaseIntersector.hxx | 5 + .../SelectMgr_RectangularFrustum.cxx | 22 ++++ .../SelectMgr_RectangularFrustum.hxx | 7 ++ .../SelectMgr_SelectableObjectSet.cxx | 87 ++++++++++--- .../SelectMgr_SelectableObjectSet.hxx | 29 ++++- .../SelectMgr_SelectingVolumeManager.cxx | 22 ++++ .../SelectMgr_SelectingVolumeManager.hxx | 5 + src/SelectMgr/SelectMgr_TriangularFrustum.cxx | 14 +++ src/SelectMgr/SelectMgr_TriangularFrustum.hxx | 7 ++ .../SelectMgr_TriangularFrustumSet.cxx | 26 ++++ .../SelectMgr_TriangularFrustumSet.hxx | 7 ++ src/SelectMgr/SelectMgr_ViewerSelector.cxx | 36 ++++-- src/SelectMgr/SelectMgr_ViewerSelector.hxx | 2 +- src/ViewerTest/ViewerTest.cxx | 71 +++++++---- src/ViewerTest/ViewerTest_ViewerCommands.cxx | 7 ++ tests/v3d/viewcube/orthopers | 37 ++++++ 20 files changed, 429 insertions(+), 104 deletions(-) create mode 100644 tests/v3d/viewcube/orthopers diff --git a/src/Graphic3d/Graphic3d_TransModeFlags.hxx b/src/Graphic3d/Graphic3d_TransModeFlags.hxx index 2246541d8f..0c9f329362 100644 --- a/src/Graphic3d/Graphic3d_TransModeFlags.hxx +++ b/src/Graphic3d/Graphic3d_TransModeFlags.hxx @@ -25,8 +25,15 @@ enum Graphic3d_TransModeFlags Graphic3d_TMF_TriedronPers = 0x0020, //!< object behaves like trihedron - it is fixed at the corner of view and does not resizing (but rotating) Graphic3d_TMF_2d = 0x0040, //!< object is defined in 2D screen coordinates (pixels) and does not resize, pan and rotate Graphic3d_TMF_CameraPers = 0x0080, //!< object is in front of the camera + Graphic3d_TMF_OrthoPers = 0x0100, //!< object is forced to be rendered with orthographic projection. Graphic3d_TMF_ZoomRotatePers = Graphic3d_TMF_ZoomPers | Graphic3d_TMF_RotatePers //!< object doesn't resize and rotate }; +//! Bitwise OR operator for transform persistence mode flags. Be aware that some flags combinations are not valid. +inline Graphic3d_TransModeFlags operator| (Graphic3d_TransModeFlags a, Graphic3d_TransModeFlags b) +{ + return static_cast (static_cast (a) | static_cast (b)); +} + #endif diff --git a/src/Graphic3d/Graphic3d_TransformPers.hxx b/src/Graphic3d/Graphic3d_TransformPers.hxx index f9d9b60940..d0f70ba64c 100644 --- a/src/Graphic3d/Graphic3d_TransformPers.hxx +++ b/src/Graphic3d/Graphic3d_TransformPers.hxx @@ -58,6 +58,12 @@ public: return (theMode & (Graphic3d_TMF_TriedronPers | Graphic3d_TMF_2d)) != 0; } + //! Return true if specified mode is orthographic projection transformation persistence. + static Standard_Boolean IsOrthoPers (Graphic3d_TransModeFlags theMode) + { + return (theMode & Graphic3d_TMF_OrthoPers) != 0; + } + public: //! Set transformation persistence. @@ -110,6 +116,9 @@ public: //! Return true for Graphic3d_TMF_TriedronPers and Graphic3d_TMF_2d modes. Standard_Boolean IsTrihedronOr2d() const { return IsTrihedronOr2d (myMode); } + //! Return true for Graphic3d_TMF_OrthoPers mode. + Standard_Boolean IsOrthoPers () const { return IsOrthoPers (myMode); } + //! Transformation persistence mode flags. Graphic3d_TransModeFlags Mode() const { return myMode; } @@ -297,28 +306,32 @@ public: //! @param theWorldView [in] the world view transformation matrix. //! @param theViewportWidth [in] the width of viewport (for 2d persistence). //! @param theViewportHeight [in] the height of viewport (for 2d persistence). + //! @param theToApplyProjPers [in] if should apply projection persistence to matrix (for orthographic persistence). //! @return transformation matrix to be applied to model world transformation of an object. template NCollection_Mat4 Compute (const Handle(Graphic3d_Camera)& theCamera, const NCollection_Mat4& theProjection, const NCollection_Mat4& theWorldView, const Standard_Integer theViewportWidth, - const Standard_Integer theViewportHeight) const; + const Standard_Integer theViewportHeight, + const Standard_Boolean theToApplyProjPers = false) const; //! Apply transformation persistence on specified matrices. - //! @param theCamera camera definition - //! @param theProjection projection matrix to modify - //! @param theWorldView world-view matrix to modify - //! @param theViewportWidth viewport width - //! @param theViewportHeight viewport height - //! @param theAnchor if not NULL, overrides anchor point + //! @param theCamera [in] camera definition + //! @param theProjection [in] projection matrix to modify + //! @param theWorldView [in/out] world-view matrix to modify + //! @param theViewportWidth [in] viewport width + //! @param theViewportHeight [in] viewport height + //! @param theAnchor [in] if not NULL, overrides anchor point + //! @param theToApplyProjPers [in] if should apply projection persistence to matrix (for orthographic persistence). template void Apply (const Handle(Graphic3d_Camera)& theCamera, const NCollection_Mat4& theProjection, NCollection_Mat4& theWorldView, const Standard_Integer theViewportWidth, const Standard_Integer theViewportHeight, - const gp_Pnt* theAnchor = NULL) const; + const gp_Pnt* theAnchor = NULL, + const Standard_Boolean theToApplyProjPers = true) const; //! Dumps the content of me into the stream Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const; @@ -368,41 +381,50 @@ void Graphic3d_TransformPers::Apply (const Handle(Graphic3d_Camera)& theCamera, NCollection_Mat4& theWorldView, const Standard_Integer theViewportWidth, const Standard_Integer theViewportHeight, - const gp_Pnt* theAnchor) const + const gp_Pnt* theAnchor, + const Standard_Boolean theToApplyProjPers) const { (void )theViewportWidth; - (void )theProjection; if (myMode == Graphic3d_TMF_None || theViewportHeight == 0) { return; } + Handle(Graphic3d_Camera) aCamera = theCamera; + if (IsOrthoPers() && !aCamera->IsOrthographic()) + { + aCamera = new Graphic3d_Camera(*theCamera); // If OrthoPers, copy camera and set to orthographic projection + aCamera->SetProjectionType (Graphic3d_Camera::Projection_Orthographic); + } + + NCollection_Mat4 aWorldView = aCamera->OrientationMatrix(); + // use total size when tiling is active - const Standard_Integer aVPSizeY = theCamera->Tile().IsValid() ? theCamera->Tile().TotalSize.y() : theViewportHeight; + const Standard_Integer aVPSizeY = aCamera->Tile().IsValid() ? aCamera->Tile().TotalSize.y() : theViewportHeight; // a small enough jitter compensation offset // to avoid image dragging within single pixel in corner cases const Standard_Real aJitterComp = 0.001; - if (myMode == Graphic3d_TMF_TriedronPers) + if ((myMode & Graphic3d_TMF_TriedronPers) != 0) { // reset Z focus for trihedron persistence - const Standard_Real aFocus = theCamera->IsOrthographic() - ? theCamera->Distance() - : (theCamera->ZFocusType() == Graphic3d_Camera::FocusType_Relative - ? Standard_Real(theCamera->ZFocus() * theCamera->Distance()) - : Standard_Real(theCamera->ZFocus())); + const Standard_Real aFocus = aCamera->IsOrthographic() + ? aCamera->Distance() + : (aCamera->ZFocusType() == Graphic3d_Camera::FocusType_Relative + ? Standard_Real(aCamera->ZFocus() * aCamera->Distance()) + : Standard_Real(aCamera->ZFocus())); // scale factor to pixels - const gp_XYZ aViewDim = theCamera->ViewDimensions (aFocus); + const gp_XYZ aViewDim = aCamera->ViewDimensions (aFocus); const Standard_Real aScale = Abs(aViewDim.Y()) / Standard_Real(aVPSizeY); - const gp_Dir aForward = theCamera->Direction(); - gp_XYZ aCenter = theCamera->Center().XYZ() + aForward.XYZ() * (aFocus - theCamera->Distance()); + const gp_Dir aForward = aCamera->Direction(); + gp_XYZ aCenter = aCamera->Center().XYZ() + aForward.XYZ() * (aFocus - aCamera->Distance()); if ((myParams.Params2d.Corner & (Aspect_TOTP_LEFT | Aspect_TOTP_RIGHT)) != 0) { const Standard_Real anOffsetX = (Standard_Real(myParams.Params2d.OffsetX) + aJitterComp) * aScale; - const gp_Dir aSide = aForward.Crossed (theCamera->Up()); - const gp_XYZ aDeltaX = aSide.XYZ() * (Abs(aViewDim.X()) * theCamera->NDC2dOffsetX() - anOffsetX); + const gp_Dir aSide = aForward.Crossed (aCamera->Up()); + const gp_XYZ aDeltaX = aSide.XYZ() * (Abs(aViewDim.X()) * aCamera->NDC2dOffsetX() - anOffsetX); if ((myParams.Params2d.Corner & Aspect_TOTP_RIGHT) != 0) { aCenter += aDeltaX; @@ -415,7 +437,7 @@ void Graphic3d_TransformPers::Apply (const Handle(Graphic3d_Camera)& theCamera, if ((myParams.Params2d.Corner & (Aspect_TOTP_TOP | Aspect_TOTP_BOTTOM)) != 0) { const Standard_Real anOffsetY = (Standard_Real(myParams.Params2d.OffsetY) + aJitterComp) * aScale; - const gp_XYZ aDeltaY = theCamera->Up().XYZ() * (Abs(aViewDim.Y()) * theCamera->NDC2dOffsetY() - anOffsetY); + const gp_XYZ aDeltaY = aCamera->Up().XYZ() * (Abs(aViewDim.Y()) * aCamera->NDC2dOffsetY() - anOffsetY); if ((myParams.Params2d.Corner & Aspect_TOTP_TOP) != 0) { aCenter += aDeltaY; @@ -426,27 +448,24 @@ void Graphic3d_TransformPers::Apply (const Handle(Graphic3d_Camera)& theCamera, } } - NCollection_Mat4 aWorldView = theCamera->OrientationMatrix(); Graphic3d_TransformUtils::Translate (aWorldView, aCenter.X(), aCenter.Y(), aCenter.Z()); Graphic3d_TransformUtils::Scale (aWorldView, aScale, aScale, aScale); - theWorldView.ConvertFrom (aWorldView); - return; } - else if (myMode == Graphic3d_TMF_2d) + else if ((myMode & Graphic3d_TMF_2d) != 0) { - const Standard_Real aFocus = theCamera->IsOrthographic() - ? theCamera->Distance() - : (theCamera->ZFocusType() == Graphic3d_Camera::FocusType_Relative - ? Standard_Real(theCamera->ZFocus() * theCamera->Distance()) - : Standard_Real(theCamera->ZFocus())); + const Standard_Real aFocus = aCamera->IsOrthographic() + ? aCamera->Distance() + : (aCamera->ZFocusType() == Graphic3d_Camera::FocusType_Relative + ? Standard_Real(aCamera->ZFocus() * aCamera->Distance()) + : Standard_Real(aCamera->ZFocus())); // scale factor to pixels - const gp_XYZ aViewDim = theCamera->ViewDimensions (aFocus); + const gp_XYZ aViewDim = aCamera->ViewDimensions (aFocus); const Standard_Real aScale = Abs(aViewDim.Y()) / Standard_Real(aVPSizeY); gp_XYZ aCenter (0.0, 0.0, -aFocus); if ((myParams.Params2d.Corner & (Aspect_TOTP_LEFT | Aspect_TOTP_RIGHT)) != 0) { - aCenter.SetX (-aViewDim.X() * theCamera->NDC2dOffsetX() + (Standard_Real(myParams.Params2d.OffsetX) + aJitterComp) * aScale); + aCenter.SetX (-aViewDim.X() * aCamera->NDC2dOffsetX() + (Standard_Real(myParams.Params2d.OffsetX) + aJitterComp) * aScale); if ((myParams.Params2d.Corner & Aspect_TOTP_RIGHT) != 0) { aCenter.SetX (-aCenter.X()); @@ -454,26 +473,24 @@ void Graphic3d_TransformPers::Apply (const Handle(Graphic3d_Camera)& theCamera, } if ((myParams.Params2d.Corner & (Aspect_TOTP_TOP | Aspect_TOTP_BOTTOM)) != 0) { - aCenter.SetY (-aViewDim.Y() * theCamera->NDC2dOffsetY() + (Standard_Real(myParams.Params2d.OffsetY) + aJitterComp) * aScale); + aCenter.SetY (-aViewDim.Y() * aCamera->NDC2dOffsetY() + (Standard_Real(myParams.Params2d.OffsetY) + aJitterComp) * aScale); if ((myParams.Params2d.Corner & Aspect_TOTP_TOP) != 0) { aCenter.SetY (-aCenter.Y()); } } - theWorldView.InitIdentity(); - Graphic3d_TransformUtils::Translate (theWorldView, T(aCenter.X()), T(aCenter.Y()), T(aCenter.Z())); - Graphic3d_TransformUtils::Scale (theWorldView, T(aScale), T(aScale), T(aScale)); - return; + aWorldView.InitIdentity(); + Graphic3d_TransformUtils::Translate (aWorldView, aCenter.X(), aCenter.Y(), aCenter.Z()); + Graphic3d_TransformUtils::Scale (aWorldView, aScale, aScale, aScale); } else if ((myMode & Graphic3d_TMF_CameraPers) != 0) { - theWorldView.InitIdentity(); + aWorldView.InitIdentity(); } else { // Compute reference point for transformation in untransformed projection space. - NCollection_Mat4 aWorldView = theCamera->OrientationMatrix(); if (theAnchor != NULL) { Graphic3d_TransformUtils::Translate (aWorldView, theAnchor->X(), theAnchor->Y(), theAnchor->Z()); @@ -503,12 +520,19 @@ void Graphic3d_TransformPers::Apply (const Handle(Graphic3d_Camera)& theCamera, if ((myMode & Graphic3d_TMF_ZoomPers) != 0) { // lock zooming - Standard_Real aScale = persistentScale (theCamera, theViewportWidth, theViewportHeight); + Standard_Real aScale = persistentScale (aCamera, theViewportWidth, theViewportHeight); Graphic3d_TransformUtils::Scale (aWorldView, aScale, aScale, aScale); } - theWorldView.ConvertFrom (aWorldView); - return; } + + if (!theCamera->IsOrthographic() && IsOrthoPers() && theToApplyProjPers) + { + Graphic3d_Mat4d aProjInv; + aProjInv.ConvertFrom (theProjection.Inverted()); + aWorldView = (aProjInv * aCamera->ProjectionMatrix()) * aWorldView; + } + + theWorldView.ConvertFrom (aWorldView); } // ======================================================================= @@ -555,7 +579,7 @@ void Graphic3d_TransformPers::Apply (const Handle(Graphic3d_Camera)& theCamera, const Standard_Integer theViewportHeight, BVH_Box& theBoundingBox) const { - NCollection_Mat4 aTPers = Compute (theCamera, theProjection, theWorldView, theViewportWidth, theViewportHeight); + NCollection_Mat4 aTPers = Compute (theCamera, theProjection, theWorldView, theViewportWidth, theViewportHeight, false); if (aTPers.IsIdentity() || !theBoundingBox.IsValid()) { @@ -594,7 +618,8 @@ NCollection_Mat4 Graphic3d_TransformPers::Compute (const Handle(Graphic3d_Cam const NCollection_Mat4& theProjection, const NCollection_Mat4& theWorldView, const Standard_Integer theViewportWidth, - const Standard_Integer theViewportHeight) const + const Standard_Integer theViewportHeight, + const Standard_Boolean theToApplyProjPers) const { if (myMode == Graphic3d_TMF_None) { @@ -610,7 +635,7 @@ NCollection_Mat4 Graphic3d_TransformPers::Compute (const Handle(Graphic3d_Cam // compute only world-view matrix difference to avoid floating point instability // caused by projection matrix modifications outside of this algorithm (e.g. by Z-fit) - Apply (theCamera, theProjection, aWorldView, theViewportWidth, theViewportHeight); + Apply (theCamera, theProjection, aWorldView, theViewportWidth, theViewportHeight, NULL, theToApplyProjPers); return anUnviewMat * aWorldView; } diff --git a/src/SelectMgr/SelectMgr_AxisIntersector.cxx b/src/SelectMgr/SelectMgr_AxisIntersector.cxx index 44ff25b752..0fc6438345 100644 --- a/src/SelectMgr/SelectMgr_AxisIntersector.cxx +++ b/src/SelectMgr/SelectMgr_AxisIntersector.cxx @@ -93,6 +93,24 @@ Handle(SelectMgr_BaseIntersector) SelectMgr_AxisIntersector::ScaleAndTransform ( return aRes; } +//======================================================================= +// function : CopyWithBuilder +// purpose : Returns a copy of the frustum using the given frustum builder configuration. +// Returned frustum should be re-constructed before being used. +//======================================================================= +Handle(SelectMgr_BaseIntersector) SelectMgr_AxisIntersector::CopyWithBuilder (const Handle(SelectMgr_FrustumBuilder)& theBuilder) const +{ + (void )theBuilder; + Standard_ASSERT_RAISE(mySelectionType == SelectMgr_SelectionType_Point, + "Error! SelectMgr_AxisIntersector::CopyWithBuilder() should be called after selection axis initialization"); + + Handle(SelectMgr_AxisIntersector) aRes = new SelectMgr_AxisIntersector(); + aRes->myAxis = myAxis; + aRes->mySelectionType = mySelectionType; + + return aRes; +} + // ======================================================================= // function : hasIntersection // purpose : diff --git a/src/SelectMgr/SelectMgr_AxisIntersector.hxx b/src/SelectMgr/SelectMgr_AxisIntersector.hxx index 6a6b60bc09..bd225bf735 100644 --- a/src/SelectMgr/SelectMgr_AxisIntersector.hxx +++ b/src/SelectMgr/SelectMgr_AxisIntersector.hxx @@ -52,6 +52,11 @@ public: const gp_GTrsf& theTrsf, const Handle(SelectMgr_FrustumBuilder)& theBuilder) const Standard_OVERRIDE; + //! Returns a copy of the intersector transformed using the builder configuration given. + //! Builder is an argument that represents corresponding settings for re-constructing transformed frustum from scratch. + //! In this class, builder is not used and theBuilder parameter is ignored. + Standard_EXPORT virtual Handle(SelectMgr_BaseIntersector) CopyWithBuilder (const Handle(SelectMgr_FrustumBuilder)& theBuilder) const Standard_OVERRIDE; + public: //! Intersection test between defined axis and given axis-aligned box diff --git a/src/SelectMgr/SelectMgr_BaseIntersector.hxx b/src/SelectMgr/SelectMgr_BaseIntersector.hxx index e9bd50edfc..e35f04d939 100644 --- a/src/SelectMgr/SelectMgr_BaseIntersector.hxx +++ b/src/SelectMgr/SelectMgr_BaseIntersector.hxx @@ -71,6 +71,11 @@ public: const gp_GTrsf& theTrsf, const Handle(SelectMgr_FrustumBuilder)& theBuilder) const = 0; + //! @param theBuilder [in] argument that represents corresponding settings for re-constructing transformed frustum from scratch; + //! should NOT be NULL. + //! @return a copy of the frustum with the input builder assigned + virtual Handle(SelectMgr_BaseIntersector) CopyWithBuilder (const Handle(SelectMgr_FrustumBuilder)& theBuilder) const = 0; + public: //! Return camera definition. diff --git a/src/SelectMgr/SelectMgr_RectangularFrustum.cxx b/src/SelectMgr/SelectMgr_RectangularFrustum.cxx index 0031c5f275..6ae92c1a0b 100644 --- a/src/SelectMgr/SelectMgr_RectangularFrustum.cxx +++ b/src/SelectMgr/SelectMgr_RectangularFrustum.cxx @@ -449,6 +449,28 @@ Handle(SelectMgr_BaseIntersector) SelectMgr_RectangularFrustum::ScaleAndTransfor return aRes; } +// ======================================================================= +// function : CopyWithBuilder +// purpose : Returns a copy of the frustum using the given frustum builder configuration. +// Returned frustum should be re-constructed before being used. +// ======================================================================= +Handle(SelectMgr_BaseIntersector) SelectMgr_RectangularFrustum::CopyWithBuilder (const Handle(SelectMgr_FrustumBuilder)& theBuilder) const +{ + Standard_ASSERT_RAISE (mySelectionType == SelectMgr_SelectionType_Point || mySelectionType == SelectMgr_SelectionType_Box, + "Error! SelectMgr_RectangularFrustum::CopyWithBuilder() should be called after selection frustum initialization"); + + Standard_ASSERT_RAISE (!theBuilder.IsNull(), + "Error! SelectMgr_RectangularFrustum::CopyWithBuilder() should be called with valid builder"); + + Handle(SelectMgr_RectangularFrustum) aRes = new SelectMgr_RectangularFrustum(); + aRes->mySelectionType = mySelectionType; + aRes->mySelRectangle = mySelRectangle; + aRes->myPixelTolerance = myPixelTolerance; + aRes->SetBuilder (theBuilder); + + return aRes; +} + // ======================================================================= // function : IsScalable // purpose : diff --git a/src/SelectMgr/SelectMgr_RectangularFrustum.hxx b/src/SelectMgr/SelectMgr_RectangularFrustum.hxx index bcebbb626b..4db8c2644e 100644 --- a/src/SelectMgr/SelectMgr_RectangularFrustum.hxx +++ b/src/SelectMgr/SelectMgr_RectangularFrustum.hxx @@ -99,6 +99,13 @@ public: const gp_GTrsf& theTrsf, const Handle(SelectMgr_FrustumBuilder)& theBuilder) const Standard_OVERRIDE; + //! Returns a copy of the frustum using the given frustum builder configuration. + //! Returned frustum should be re-constructed before being used. + //! @param theBuilder [in] argument that represents corresponding settings for re-constructing transformed frustum from scratch; + //! should NOT be NULL. + //! @return a copy of the frustum with the input builder assigned + Standard_EXPORT virtual Handle(SelectMgr_BaseIntersector) CopyWithBuilder (const Handle(SelectMgr_FrustumBuilder)& theBuilder) const Standard_OVERRIDE; + // SAT Tests for different objects //! SAT intersection test between defined volume and given axis-aligned box diff --git a/src/SelectMgr/SelectMgr_SelectableObjectSet.cxx b/src/SelectMgr/SelectMgr_SelectableObjectSet.cxx index 89fb16e790..4979471908 100644 --- a/src/SelectMgr/SelectMgr_SelectableObjectSet.cxx +++ b/src/SelectMgr/SelectMgr_SelectableObjectSet.cxx @@ -241,17 +241,23 @@ namespace //============================================================================= SelectMgr_SelectableObjectSet::SelectMgr_SelectableObjectSet() { - myBVH[BVHSubset_2dPersistent] = new BVH_Tree(); - myBVH[BVHSubset_3dPersistent] = new BVH_Tree(); - myBVH[BVHSubset_3d] = new BVH_Tree(); - - myBuilder[BVHSubset_2dPersistent] = new BVH_LinearBuilder (BVH_Constants_LeafNodeSizeSingle, BVH_Constants_MaxTreeDepth); - myBuilder[BVHSubset_3dPersistent] = new BVH_LinearBuilder (BVH_Constants_LeafNodeSizeSingle, BVH_Constants_MaxTreeDepth); - myBuilder[BVHSubset_3d] = new BVH_BinnedBuilder (BVH_Constants_LeafNodeSizeSingle, BVH_Constants_MaxTreeDepth, Standard_True); - - myIsDirty[BVHSubset_2dPersistent] = Standard_False; - myIsDirty[BVHSubset_3dPersistent] = Standard_False; - myIsDirty[BVHSubset_3d] = Standard_False; + myBVH[BVHSubset_ortho2dPersistent] = new BVH_Tree(); + myBVH[BVHSubset_ortho3dPersistent] = new BVH_Tree(); + myBVH[BVHSubset_2dPersistent] = new BVH_Tree(); + myBVH[BVHSubset_3dPersistent] = new BVH_Tree(); + myBVH[BVHSubset_3d] = new BVH_Tree(); + + myBuilder[BVHSubset_ortho2dPersistent] = new BVH_LinearBuilder (BVH_Constants_LeafNodeSizeSingle, BVH_Constants_MaxTreeDepth); + myBuilder[BVHSubset_ortho3dPersistent] = new BVH_LinearBuilder (BVH_Constants_LeafNodeSizeSingle, BVH_Constants_MaxTreeDepth); + myBuilder[BVHSubset_2dPersistent] = new BVH_LinearBuilder (BVH_Constants_LeafNodeSizeSingle, BVH_Constants_MaxTreeDepth); + myBuilder[BVHSubset_3dPersistent] = new BVH_LinearBuilder (BVH_Constants_LeafNodeSizeSingle, BVH_Constants_MaxTreeDepth); + myBuilder[BVHSubset_3d] = new BVH_BinnedBuilder (BVH_Constants_LeafNodeSizeSingle, BVH_Constants_MaxTreeDepth, Standard_True); + + myIsDirty[BVHSubset_ortho2dPersistent] = Standard_False; + myIsDirty[BVHSubset_ortho3dPersistent] = Standard_False; + myIsDirty[BVHSubset_2dPersistent] = Standard_False; + myIsDirty[BVHSubset_3dPersistent] = Standard_False; + myIsDirty[BVHSubset_3d] = Standard_False; } //============================================================================= @@ -262,10 +268,9 @@ Standard_Boolean SelectMgr_SelectableObjectSet::Append (const Handle(SelectMgr_S { // get an appropriate BVH subset to insert the object into it const Standard_Integer aSubsetIdx = appropriateSubset (theObject); - + // check that the object is excluded from other subsets - if (myObjects[(aSubsetIdx + 1) % BVHSubsetNb].Contains (theObject) - || myObjects[(aSubsetIdx + 2) % BVHSubsetNb].Contains (theObject)) + if (currentSubset (theObject) != -1) { return Standard_False; } @@ -401,9 +406,51 @@ void SelectMgr_SelectableObjectSet::UpdateBVH (const Handle(Graphic3d_Camera)& t myBuilder[BVHSubset_2dPersistent]->Build (&anAdaptor, myBVH[BVHSubset_2dPersistent].get(), anAdaptor.Box()); } + // ------------------------------------------------------------------- + // check and update 3D orthographic persistence BVH tree if necessary + // ------------------------------------------------------------------- + if (!IsEmpty (BVHSubset_ortho3dPersistent) + && (myIsDirty[BVHSubset_ortho3dPersistent] + || myLastViewState.IsChanged (aViewState) + || isWinSizeChanged)) + { + Handle(Graphic3d_Camera) aNewOrthoCam = new Graphic3d_Camera (*theCam); // If OrthoPers, copy camera and set to orthographic projection + aNewOrthoCam->SetProjectionType (Graphic3d_Camera::Projection_Orthographic); + + // construct adaptor over private fields to provide direct access for the BVH builder + BVHBuilderAdaptorPersistent anAdaptor (myObjects[BVHSubset_ortho3dPersistent], + aNewOrthoCam, aNewOrthoCam->ProjectionMatrix(), + aNewOrthoCam->OrientationMatrix(), theWinSize); + + // update corresponding BVH tree data structure + myBuilder[BVHSubset_ortho3dPersistent]->Build (&anAdaptor, myBVH[BVHSubset_ortho3dPersistent].get(), anAdaptor.Box()); + } + + // ------------------------------------------------------------------- + // check and update 2D orthographic persistence BVH tree if necessary + // ------------------------------------------------------------------- + if (!IsEmpty (BVHSubset_ortho2dPersistent) + && (myIsDirty[BVHSubset_ortho2dPersistent] + || myLastViewState.IsProjectionChanged (aViewState) + || isWinSizeChanged)) + { + Handle(Graphic3d_Camera) aNewOrthoCam = new Graphic3d_Camera (*theCam); // If OrthoPers, copy camera and set to orthographic projection + aNewOrthoCam->SetProjectionType (Graphic3d_Camera::Projection_Orthographic); + + // construct adaptor over private fields to provide direct access for the BVH builder + BVHBuilderAdaptorPersistent anAdaptor (myObjects[BVHSubset_ortho2dPersistent], + aNewOrthoCam, aNewOrthoCam->ProjectionMatrix(), + SelectMgr_SelectableObjectSet_THE_IDENTITY_MAT, theWinSize); + + // update corresponding BVH tree data structure + myBuilder[BVHSubset_ortho2dPersistent]->Build (&anAdaptor, myBVH[BVHSubset_ortho2dPersistent].get(), anAdaptor.Box()); + } + // release dirty state for every subset - myIsDirty[BVHSubset_3dPersistent] = Standard_False; - myIsDirty[BVHSubset_2dPersistent] = Standard_False; + myIsDirty[BVHSubset_3dPersistent] = Standard_False; + myIsDirty[BVHSubset_2dPersistent] = Standard_False; + myIsDirty[BVHSubset_ortho3dPersistent] = Standard_False; + myIsDirty[BVHSubset_ortho2dPersistent] = Standard_False; // keep last view state myLastViewState = aViewState; @@ -419,9 +466,11 @@ void SelectMgr_SelectableObjectSet::UpdateBVH (const Handle(Graphic3d_Camera)& t //============================================================================= void SelectMgr_SelectableObjectSet::MarkDirty() { - myIsDirty[BVHSubset_3d] = Standard_True; - myIsDirty[BVHSubset_3dPersistent] = Standard_True; - myIsDirty[BVHSubset_2dPersistent] = Standard_True; + myIsDirty[BVHSubset_3d] = Standard_True; + myIsDirty[BVHSubset_3dPersistent] = Standard_True; + myIsDirty[BVHSubset_2dPersistent] = Standard_True; + myIsDirty[BVHSubset_ortho3dPersistent] = Standard_True; + myIsDirty[BVHSubset_ortho2dPersistent] = Standard_True; } //======================================================================= //function : DumpJson diff --git a/src/SelectMgr/SelectMgr_SelectableObjectSet.hxx b/src/SelectMgr/SelectMgr_SelectableObjectSet.hxx index c8cb188fcf..fa1a736701 100644 --- a/src/SelectMgr/SelectMgr_SelectableObjectSet.hxx +++ b/src/SelectMgr/SelectMgr_SelectableObjectSet.hxx @@ -42,11 +42,22 @@ public: //! needs to be updated only when camera's projection changes. Bounding volumes for this object subclass //! is represented directly in eye space coordinates. //! This subset uses linear BVH builder with 32 levels of depth and 1 element per leaf. + //! - BVHSubset_ortho3dPersistent refers to the subset of 3D persistent selectable objects (rotate, pan, zoom persistence) + //! that contains `Graphic3d_TMF_OrthoPers` persistence mode. + //! Associated BVH tree needs to be updated when either the camera's projection and position change. + //! This subset uses linear BVH builder with 32 levels of depth and 1 element per leaf. + //! - BVHSubset_ortho2dPersistent refers to the subset of 2D persistent selectable objects + //! that contains `Graphic3d_TMF_OrthoPers` persistence mode. Associated BVH tree + //! needs to be updated only when camera's projection changes. Bounding volumes for this object subclass + //! is represented directly in eye space coordinates. + //! This subset uses linear BVH builder with 32 levels of depth and 1 element per leaf. enum BVHSubset { BVHSubset_3d, BVHSubset_3dPersistent, BVHSubset_2dPersistent, + BVHSubset_ortho3dPersistent, + BVHSubset_ortho2dPersistent, BVHSubsetNb }; @@ -140,7 +151,9 @@ public: { return myObjects[BVHSubset_3d].Contains (theObject) || myObjects[BVHSubset_3dPersistent].Contains (theObject) - || myObjects[BVHSubset_2dPersistent].Contains (theObject); + || myObjects[BVHSubset_2dPersistent].Contains (theObject) + || myObjects[BVHSubset_ortho3dPersistent].Contains (theObject) + || myObjects[BVHSubset_ortho2dPersistent].Contains (theObject); } //! Returns true if the object set does not contain any selectable objects. @@ -148,7 +161,9 @@ public: { return myObjects[BVHSubset_3d].IsEmpty() && myObjects[BVHSubset_3dPersistent].IsEmpty() - && myObjects[BVHSubset_2dPersistent].IsEmpty(); + && myObjects[BVHSubset_2dPersistent].IsEmpty() + && myObjects[BVHSubset_ortho3dPersistent].IsEmpty() + && myObjects[BVHSubset_ortho2dPersistent].IsEmpty(); } //! Returns true if the specified object subset is empty. @@ -192,10 +207,18 @@ private: } return SelectMgr_SelectableObjectSet::BVHSubset_3d; } - else if (theObject->TransformPersistence()->Mode() == Graphic3d_TMF_2d) + else if ((theObject->TransformPersistence()->Mode() & Graphic3d_TMF_2d) != 0) { + if (theObject->TransformPersistence()->IsOrthoPers()) + { + return SelectMgr_SelectableObjectSet::BVHSubset_ortho2dPersistent; + } return SelectMgr_SelectableObjectSet::BVHSubset_2dPersistent; } + else if (theObject->TransformPersistence()->IsOrthoPers()) + { + return SelectMgr_SelectableObjectSet::BVHSubset_ortho3dPersistent; + } else { return SelectMgr_SelectableObjectSet::BVHSubset_3dPersistent; diff --git a/src/SelectMgr/SelectMgr_SelectingVolumeManager.cxx b/src/SelectMgr/SelectMgr_SelectingVolumeManager.cxx index d33ea30427..db1e25fabe 100644 --- a/src/SelectMgr/SelectMgr_SelectingVolumeManager.cxx +++ b/src/SelectMgr/SelectMgr_SelectingVolumeManager.cxx @@ -67,6 +67,28 @@ SelectMgr_SelectingVolumeManager SelectMgr_SelectingVolumeManager::ScaleAndTrans return aMgr; } +//======================================================================= +// function : CopyWithBuilder +// purpose : Returns a copy of the selecting volume manager and its active frustum re-constructed using the passed builder. +// Builder is an argument that represents corresponding settings for re-constructing transformed +// frustum from scratch. +//======================================================================= +SelectMgr_SelectingVolumeManager SelectMgr_SelectingVolumeManager::CopyWithBuilder (const Handle(SelectMgr_FrustumBuilder)& theBuilder) const +{ + SelectMgr_SelectingVolumeManager aMgr; + aMgr.myToAllowOverlap = myToAllowOverlap; + aMgr.myViewClipPlanes = myViewClipPlanes; + aMgr.myObjectClipPlanes = myObjectClipPlanes; + aMgr.myViewClipRange = myViewClipRange; + if (!myActiveSelectingVolume.IsNull()) + { + aMgr.myActiveSelectingVolume = myActiveSelectingVolume->CopyWithBuilder (theBuilder); + aMgr.BuildSelectingVolume(); + } + + return aMgr; +} + //======================================================================= // function : GetActiveSelectionType // purpose : diff --git a/src/SelectMgr/SelectMgr_SelectingVolumeManager.hxx b/src/SelectMgr/SelectMgr_SelectingVolumeManager.hxx index aed25cd94a..0dd115ffc0 100644 --- a/src/SelectMgr/SelectMgr_SelectingVolumeManager.hxx +++ b/src/SelectMgr/SelectMgr_SelectingVolumeManager.hxx @@ -81,6 +81,11 @@ public: const gp_GTrsf& theTrsf, const Handle(SelectMgr_FrustumBuilder)& theBuilder) const; + //! Returns a copy of the selecting volume manager and its active frustum re-constructed using the passed builder. + //! Builder is an argument that represents corresponding settings for re-constructing transformed + //! frustum from scratch. + Standard_EXPORT virtual SelectMgr_SelectingVolumeManager CopyWithBuilder (const Handle(SelectMgr_FrustumBuilder)& theBuilder) const; + public: //! Returns current camera definition. diff --git a/src/SelectMgr/SelectMgr_TriangularFrustum.cxx b/src/SelectMgr/SelectMgr_TriangularFrustum.cxx index efaf686e28..05abc17df2 100644 --- a/src/SelectMgr/SelectMgr_TriangularFrustum.cxx +++ b/src/SelectMgr/SelectMgr_TriangularFrustum.cxx @@ -189,6 +189,20 @@ Handle(SelectMgr_BaseIntersector) SelectMgr_TriangularFrustum::ScaleAndTransform return aRes; } +//======================================================================= +// function : CopyWithBuilder +// purpose : Returns a copy of the frustum using the given frustum builder configuration. +// Returned frustum should be re-constructed before being used. +//======================================================================= +Handle(SelectMgr_BaseIntersector) SelectMgr_TriangularFrustum::CopyWithBuilder (const Handle(SelectMgr_FrustumBuilder)& theBuilder) const +{ + Handle(SelectMgr_TriangularFrustum) aRes = new SelectMgr_TriangularFrustum(); + aRes->mySelTriangle = mySelTriangle; + aRes->SetBuilder (theBuilder); + + return aRes; +} + //======================================================================= // function : OverlapsBox // purpose : SAT intersection test between defined volume and diff --git a/src/SelectMgr/SelectMgr_TriangularFrustum.hxx b/src/SelectMgr/SelectMgr_TriangularFrustum.hxx index a13067b033..0255b6f61b 100644 --- a/src/SelectMgr/SelectMgr_TriangularFrustum.hxx +++ b/src/SelectMgr/SelectMgr_TriangularFrustum.hxx @@ -55,6 +55,13 @@ public: const gp_GTrsf& theTrsf, const Handle(SelectMgr_FrustumBuilder)& theBuilder) const Standard_OVERRIDE; + //! Returns a copy of the frustum using the given frustum builder configuration. + //! Returned frustum should be re-constructed before being used. + //! @param theBuilder [in] argument that represents corresponding settings for re-constructing transformed frustum from scratch; + //! should NOT be NULL. + //! @return a copy of the frustum with the input builder assigned + Standard_EXPORT virtual Handle(SelectMgr_BaseIntersector) CopyWithBuilder (const Handle(SelectMgr_FrustumBuilder)& theBuilder) const Standard_OVERRIDE; + public: //! @name SAT Tests for different objects //! SAT intersection test between defined volume and given axis-aligned box diff --git a/src/SelectMgr/SelectMgr_TriangularFrustumSet.cxx b/src/SelectMgr/SelectMgr_TriangularFrustumSet.cxx index 907a854061..0df5e595af 100644 --- a/src/SelectMgr/SelectMgr_TriangularFrustumSet.cxx +++ b/src/SelectMgr/SelectMgr_TriangularFrustumSet.cxx @@ -186,6 +186,32 @@ Handle(SelectMgr_BaseIntersector) SelectMgr_TriangularFrustumSet::ScaleAndTransf return aRes; } +//======================================================================= +// function : CopyWithBuilder +// purpose : Returns a copy of the frustum using the given frustum builder configuration. +// Returned frustum should be re-constructed before being used. +//======================================================================= +Handle(SelectMgr_BaseIntersector) SelectMgr_TriangularFrustumSet::CopyWithBuilder (const Handle(SelectMgr_FrustumBuilder)& theBuilder) const +{ + Standard_ASSERT_RAISE (mySelectionType == SelectMgr_SelectionType_Polyline, + "Error! SelectMgr_TriangularFrustumSet::CopyWithBuilder() should be called after selection frustum initialization"); + + Standard_ASSERT_RAISE (!theBuilder.IsNull(), + "Error! SelectMgr_TriangularFrustumSet::CopyWithBuilder() should be called with valid builder"); + + Handle(SelectMgr_TriangularFrustumSet) aRes = new SelectMgr_TriangularFrustumSet(); + aRes->SetCamera (myCamera); + for (SelectMgr_TriangFrustums::Iterator anIter (myFrustums); anIter.More(); anIter.Next()) + { + aRes->myFrustums.Append (Handle(SelectMgr_TriangularFrustum)::DownCast (anIter.Value()->CopyWithBuilder (theBuilder))); + } + aRes->mySelectionType = mySelectionType; + aRes->mySelPolyline = mySelPolyline; + aRes->myToAllowOverlap = myToAllowOverlap; + aRes->SetBuilder (theBuilder); + return aRes; +} + // ======================================================================= // function : OverlapsBox // purpose : diff --git a/src/SelectMgr/SelectMgr_TriangularFrustumSet.hxx b/src/SelectMgr/SelectMgr_TriangularFrustumSet.hxx index 694c3efc55..5f8c170351 100644 --- a/src/SelectMgr/SelectMgr_TriangularFrustumSet.hxx +++ b/src/SelectMgr/SelectMgr_TriangularFrustumSet.hxx @@ -62,6 +62,13 @@ public: const gp_GTrsf& theTrsf, const Handle(SelectMgr_FrustumBuilder)& theBuilder) const Standard_OVERRIDE; + //! Returns a copy of the frustum using the given frustum builder configuration. + //! Returned frustum should be re-constructed before being used. + //! @param theBuilder [in] argument that represents corresponding settings for re-constructing transformed frustum from scratch; + //! should NOT be NULL. + //! @return a copy of the frustum with the input builder assigned + Standard_EXPORT virtual Handle(SelectMgr_BaseIntersector) CopyWithBuilder (const Handle(SelectMgr_FrustumBuilder)& theBuilder) const Standard_OVERRIDE; + public: Standard_EXPORT virtual Standard_Boolean OverlapsBox (const SelectMgr_Vec3& theMinPnt, diff --git a/src/SelectMgr/SelectMgr_ViewerSelector.cxx b/src/SelectMgr/SelectMgr_ViewerSelector.cxx index 4370d4cee0..20656e44a0 100644 --- a/src/SelectMgr/SelectMgr_ViewerSelector.cxx +++ b/src/SelectMgr/SelectMgr_ViewerSelector.cxx @@ -138,12 +138,12 @@ void SelectMgr_ViewerSelector::updatePoint3d (SelectMgr_SortCriterion& theCriter case SelectMgr_TypeOfDepthTolerance_UniformPixels: case SelectMgr_TypeOfDepthTolerance_SensitivityFactor: { - if (mySelectingVolumeMgr.Camera().IsNull()) + if (theMgr.Camera().IsNull()) { // fallback for an arbitrary projection matrix theCriterion.Tolerance = aSensFactor / 33.0; } - else if (mySelectingVolumeMgr.Camera()->IsOrthographic()) + else if (theMgr.Camera()->IsOrthographic()) { theCriterion.Tolerance = myCameraScale * aSensFactor; } @@ -634,6 +634,7 @@ void SelectMgr_ViewerSelector::TraverseSensitives (const Standard_Integer theVie Graphic3d_Vec2i aWinSize; mySelectingVolumeMgr.WindowSize (aWinSize.x(), aWinSize.y()); + const double aPixelSize = Max (1.0 / aWinSize.x(), 1.0 / aWinSize.y()); const Handle(Graphic3d_Camera)& aCamera = mySelectingVolumeMgr.Camera(); Graphic3d_Mat4d aProjectionMat, aWorldViewMat; @@ -646,11 +647,6 @@ void SelectMgr_ViewerSelector::TraverseSensitives (const Standard_Integer theVie myCameraEye = aCamera->Eye().XYZ(); myCameraDir = aCamera->Direction().XYZ(); - myCameraScale = aCamera->IsOrthographic() - ? aCamera->Scale() - : 2.0 * Tan (aCamera->FOVy() * M_PI / 360.0); - const double aPixelSize = Max (1.0 / aWinSize.x(), 1.0 / aWinSize.y()); - myCameraScale *= aPixelSize; } mySelectableObjects.UpdateBVH (aCamera, aWinSize); @@ -672,7 +668,8 @@ void SelectMgr_ViewerSelector::TraverseSensitives (const Standard_Integer theVie // for 2D space selection transform selecting volumes to perform overlap testing // directly in camera's eye space omitting the camera position, which is not // needed there at all - if (aBVHSubset == SelectMgr_SelectableObjectSet::BVHSubset_2dPersistent) + if (aBVHSubset == SelectMgr_SelectableObjectSet::BVHSubset_2dPersistent + || aBVHSubset == SelectMgr_SelectableObjectSet::BVHSubset_ortho2dPersistent) { gp_GTrsf aTFrustum; aTFrustum.SetValue (1, 1, aWorldViewMat.GetValue (0, 0)); @@ -688,22 +685,43 @@ void SelectMgr_ViewerSelector::TraverseSensitives (const Standard_Integer theVie aWorldViewMat.GetValue (1, 3), aWorldViewMat.GetValue (2, 3))); - // define corresponding frustum builder parameters + // define corresponding frustum builder parameters for 2d persistence. Handle(SelectMgr_FrustumBuilder) aBuilder = new SelectMgr_FrustumBuilder(); Handle(Graphic3d_Camera) aNewCamera = new Graphic3d_Camera(); aNewCamera->CopyMappingData (aCamera); aNewCamera->SetIdentityOrientation(); + if (aBVHSubset == SelectMgr_SelectableObjectSet::BVHSubset_ortho2dPersistent) + { + aNewCamera->SetProjectionType (Graphic3d_Camera::Projection_Orthographic); + } aWorldViewMat = aNewCamera->OrientationMatrix(); // should be identity matrix aProjectionMat = aNewCamera->ProjectionMatrix(); // should be the same to aProjectionMat aBuilder->SetCamera (aNewCamera); aBuilder->SetWindowSize (aWinSize.x(), aWinSize.y()); aMgr = mySelectingVolumeMgr.ScaleAndTransform (1, aTFrustum, aBuilder); } + else if (aBVHSubset == SelectMgr_SelectableObjectSet::BVHSubset_ortho3dPersistent) + { + // define corresponding frustum builder parameters for 3d orthographic persistence. + Handle(SelectMgr_FrustumBuilder) aBuilder = new SelectMgr_FrustumBuilder(); + Handle(Graphic3d_Camera) aNewCamera = new Graphic3d_Camera (*aCamera); + aNewCamera->SetProjectionType (Graphic3d_Camera::Projection_Orthographic); + aWorldViewMat = aNewCamera->OrientationMatrix(); // should be the same to aWorldViewMat + aProjectionMat = aNewCamera->ProjectionMatrix(); // should be orthographic projection + aBuilder->SetCamera (aNewCamera); + aBuilder->SetWindowSize (aWinSize.x(), aWinSize.y()); + aMgr = mySelectingVolumeMgr.CopyWithBuilder (aBuilder); + } else { aMgr = mySelectingVolumeMgr; } + myCameraScale = aMgr.Camera()->IsOrthographic() + ? aMgr.Camera()->Scale() + : 2.0 * Tan (aMgr.Camera()->FOVy() * M_PI / 360.0); + myCameraScale *= aPixelSize; + const opencascade::handle >& aBVHTree = mySelectableObjects.BVH (aBVHSubset); Standard_Integer aNode = 0; diff --git a/src/SelectMgr/SelectMgr_ViewerSelector.hxx b/src/SelectMgr/SelectMgr_ViewerSelector.hxx index a9dd146cba..4537080f63 100644 --- a/src/SelectMgr/SelectMgr_ViewerSelector.hxx +++ b/src/SelectMgr/SelectMgr_ViewerSelector.hxx @@ -328,7 +328,7 @@ protected: //! @param theObject [in] the selectable object for traversal. //! @param theMgr [in] the (un)transformed copy of the selecting volume manager representing active selection frustum. //! @param theCamera, theProjectionMat, theWorldViewMat [in] the source camera and matrices for theMgr given. - //! @param theViewportWidth, theViewportHeight [in] viewport (window) dimensions for evaluating + //! @param theWinSize [in] viewport (window) dimensions for evaluating //! object's transformation persistence. Standard_EXPORT void traverseObject (const Handle(SelectMgr_SelectableObject)& theObject, const SelectMgr_SelectingVolumeManager& theMgr, diff --git a/src/ViewerTest/ViewerTest.cxx b/src/ViewerTest/ViewerTest.cxx index 9fb0cfea5a..43aced25af 100644 --- a/src/ViewerTest/ViewerTest.cxx +++ b/src/ViewerTest/ViewerTest.cxx @@ -5100,6 +5100,24 @@ static int VDisplay2 (Draw_Interpretor& theDI, aTrsfPers = new Graphic3d_TransformPers (aTrsfPers->Mode(), Aspect_TypeOfTriedronPosition (aCorner), Graphic3d_Vec2i (aZ.IntegerValue())); } } + else if (aNameCase == "-trsfPersOrtho") + { + if (aTrsfPers.IsNull()) + { + Message::SendFail() << "Error: wrong syntax at " << aName << "."; + return 1; + } + + toSetTrsfPers = Standard_True; + if (aTrsfPers->IsZoomOrRotate()) + { + aTrsfPers = new Graphic3d_TransformPers (aTrsfPers->Mode() | Graphic3d_TMF_OrthoPers, aTrsfPers->AnchorPoint()); + } + else if (aTrsfPers->IsTrihedronOr2d()) + { + aTrsfPers = new Graphic3d_TransformPers (aTrsfPers->Mode() | Graphic3d_TMF_OrthoPers, aTrsfPers->Corner2d(), aTrsfPers->Offset2d()); + } + } else if (aNameCase == "-layer" || aNameCase == "-zlayer") { @@ -6630,42 +6648,45 @@ If last 3 optional parameters are not set prints numbers of U-, V- isolines and addCmd ("vdisplay", VDisplay2, /* [vdisplay] */ R"( vdisplay [-noupdate|-update] [-mutable] [-neutral] - [-trsfPers {zoom|rotate|zoomRotate|none}=none] + [-trsfPers {zoom|rotate|zoomRotate|trihedron|none}=none] [-trsfPersPos X Y [Z]] [-3d] [-2d|-trihedron [{top|bottom|left|right|topLeft |topRight|bottomLeft|bottomRight} [offsetX offsetY]]] + [-trsfPersOrtho] [-dispMode mode] [-highMode mode] [-layer index] [-top|-topmost|-overlay|-underlay] [-redisplay] [-erased] [-noecho] [-autoTriangulation {0|1}] name1 [name2] ... [name n] Displays named objects. - -noupdate Suppresses viewer redraw call. - -mutable Enables optimizations for mutable objects. - -neutral Draws objects in main viewer. - -erased Loads the object into context, but does not display it. - -layer Sets z-layer for objects. - Alternatively -overlay|-underlay|-top|-topmost - options can be used for the default z-layers. - -top Draws object on top of main presentations - but below topmost. - -topmost Draws in overlay for 3D presentations. - with independent Depth. - -overlay Draws objects in overlay for 2D presentations. - (On-Screen-Display) - -underlay Draws objects in underlay for 2D presentations. - (On-Screen-Display) + -noupdate Suppresses viewer redraw call. + -mutable Enables optimizations for mutable objects. + -neutral Draws objects in main viewer. + -erased Loads the object into context, but does not display it. + -layer Sets z-layer for objects. + Alternatively -overlay|-underlay|-top|-topmost + options can be used for the default z-layers. + -top Draws object on top of main presentations + but below topmost. + -topmost Draws in overlay for 3D presentations. + with independent Depth. + -overlay Draws objects in overlay for 2D presentations. + (On-Screen-Display) + -underlay Draws objects in underlay for 2D presentations. + (On-Screen-Display) -selectable|-noselect Controls selection of objects. - -trsfPers Sets a transform persistence flags. - -trsfPersPos Sets an anchor point for transform persistence. - -2d Displays object in screen coordinates. - (DY looks up) - -dispmode Sets display mode for objects. - -highmode Sets hilight mode for objects. - -redisplay Recomputes presentation of objects. - -noecho Avoid printing of command results. - -autoTriang Enable/disable auto-triangulation for displayed shape. + -trsfPers Sets a transform persistence flags. + -trsfPersPos Sets an anchor point for transform persistence. + -2d Displays object in screen coordinates. + (DY looks up) + -trsfPersOrtho Set orthographic transform persistence. + (Objects shown with orthographic projection) + -dispmode Sets display mode for objects. + -highmode Sets hilight mode for objects. + -redisplay Recomputes presentation of objects. + -noecho Avoid printing of command results. + -autoTriang Enable/disable auto-triangulation for displayed shape. )" /* [vdisplay] */); addCmd ("vnbdisplayed", VNbDisplayed, /* [vnbdisplayed] */ R"( diff --git a/src/ViewerTest/ViewerTest_ViewerCommands.cxx b/src/ViewerTest/ViewerTest_ViewerCommands.cxx index 0de77278ea..d700adce80 100644 --- a/src/ViewerTest/ViewerTest_ViewerCommands.cxx +++ b/src/ViewerTest/ViewerTest_ViewerCommands.cxx @@ -13686,6 +13686,12 @@ static int VViewCube (Draw_Interpretor& , { aViewCube->SetAxesSphereRadius (Draw::Atof (theArgVec[++anArgIter])); } + else if (anArg == "-orthopers") + { + const Handle(Graphic3d_TransformPers)& aTrsfPers = aViewCube->TransformPersistence(); + Handle(Graphic3d_TransformPers) anOrthoPers = new Graphic3d_TransformPers (Graphic3d_TMF_TriedronPers | Graphic3d_TMF_OrthoPers, aTrsfPers->Corner2d(), aTrsfPers->Offset2d()); + aViewCube->SetTransformPersistence (anOrthoPers); + } else { Message::SendFail() << "Syntax error: unknown argument '" << anArg << "'"; @@ -14983,6 +14989,7 @@ Displays interactive view manipulation object. Options: -axesSphereRadius Value radius of the sphere (central point) of trihedron -fixedAnimation {0|1} uninterruptible animation loop -duration Seconds animation duration in seconds + -orthoPers force orthographic projection persistence. )" /* [vviewcube] */); addCmd ("vcolorconvert", VColorConvert, /* [vcolorconvert] */ R"( diff --git a/tests/v3d/viewcube/orthopers b/tests/v3d/viewcube/orthopers new file mode 100644 index 0000000000..5c240ed0ea --- /dev/null +++ b/tests/v3d/viewcube/orthopers @@ -0,0 +1,37 @@ +puts "==================================" +puts "0028954: Visualization - compare AIS_ViewCube on perspective view with and without orthographic persistence" +puts "==================================" + +pload MODELING VISUALIZATION +vclear +vinit View1 +vcamera -persp + +box b 15 20 70 +vdisplay -dispMode 1 b +vaxo +vfit +vviewcube vc -fixedAnimation 1 -duration 0 -orthoPers + +vmoveto 70 350 +if {[vreadpixel 95 350 name rgb] != "GRAY62"} { puts "Error: Highlighting of view cube Side is wrong." } +vmoveto 0 0 +vdump $imagedir/${casename}_axo.png + +# check FRONT side +vselect 70 340 +if {[vreadpixel 255 300 name rgb] != "BLACK"} { puts "Error: Position of FRONT camera is wrong." } +vdump $imagedir/${casename}_side.png + +# check FRONT/TOP edge +vselect 110 270 +if {[vreadpixel 100 320 name rgb] != "GRAY57"} { puts "Error: Position of FRONT-TOP camera is wrong." } +if {[vreadpixel 100 310 name rgb] != "CYAN"} { puts "Error: Position of FRONT-TOP camera is wrong." } +vdump $imagedir/${casename}_edge.png + +# Check vertex +vselect 140 310 +if {[vreadpixel 100 290 name rgb] != "GRAY41"} { puts "Error: Position of TOP-FRONT-RIGHT camera is wrong." } +if {[vreadpixel 100 310 name rgb] != "CYAN"} { puts "Error: Position of TOP-FRONT-RIGHT camera is wrong." } +if {[vreadpixel 100 320 name rgb] != "GRAY62"} { puts "Error: Position of TOP-FRONT-RIGHT camera is wrong." } +vdump $imagedir/${casename}_corner.png From 631a34a05f31471e2b0c8a86729a309f10de4499 Mon Sep 17 00:00:00 2001 From: oan Date: Fri, 5 Jan 2024 15:44:06 +0000 Subject: [PATCH 534/639] 0033567: Modeling Data - GeomLib_IsPlanarSurface raises exception SIGFPE Arithmetic Exception in Release mode Add protection against zero-division --- src/GeomLib/GeomLib_IsPlanarSurface.cxx | 35 ++++++++++++++----------- tests/bugs/moddata_3/bug33567 | 11 ++++++++ 2 files changed, 31 insertions(+), 15 deletions(-) create mode 100644 tests/bugs/moddata_3/bug33567 diff --git a/src/GeomLib/GeomLib_IsPlanarSurface.cxx b/src/GeomLib/GeomLib_IsPlanarSurface.cxx index 16ec51a963..e2a5eb7102 100644 --- a/src/GeomLib/GeomLib_IsPlanarSurface.cxx +++ b/src/GeomLib/GeomLib_IsPlanarSurface.cxx @@ -50,22 +50,27 @@ static Standard_Boolean Controle(const TColgp_Array1OfPnt& Poles, Standard_Real umin, umax, vmin, vmax; S->Bounds(umin, umax, vmin, vmax); S->D1((umin + umax) / 2, (vmin + vmax) / 2, P, DU, DV); - // On prend DX le plus proche possible de DU - gp_Dir du(DU); - Standard_Real Angle1 = du.Angle(DX); - Standard_Real Angle2 = du.Angle(DY); - if (Angle1 > M_PI / 2) Angle1 = M_PI - Angle1; - if (Angle2 > M_PI / 2) Angle2 = M_PI - Angle2; - if (Angle2 < Angle1) { - du = DY; DY = DX; DX = du; - } - if (DX.Angle(DU) > M_PI / 2) DX.Reverse(); - if (DY.Angle(DV) > M_PI / 2) DY.Reverse(); + + if (DU.SquareMagnitude() > gp::Resolution() && + DV.SquareMagnitude() > gp::Resolution()) + { + // On prend DX le plus proche possible de DU + gp_Dir du(DU); + Standard_Real Angle1 = du.Angle(DX); + Standard_Real Angle2 = du.Angle(DY); + if (Angle1 > M_PI / 2) Angle1 = M_PI - Angle1; + if (Angle2 > M_PI / 2) Angle2 = M_PI - Angle2; + if (Angle2 < Angle1) { + du = DY; DY = DX; DX = du; + } + if (DX.Angle(DU) > M_PI / 2) DX.Reverse(); + if (DY.Angle(DV) > M_PI / 2) DY.Reverse(); - gp_Ax3 axe(Bary, DX^DY, DX); - Plan.SetPosition(axe); - Plan.SetLocation(Bary); - IsPlan = Standard_True; + gp_Ax3 axe(Bary, DX^DY, DX); + Plan.SetPosition(axe); + Plan.SetLocation(Bary); + IsPlan = Standard_True; + } } return IsPlan; } diff --git a/tests/bugs/moddata_3/bug33567 b/tests/bugs/moddata_3/bug33567 new file mode 100644 index 0000000000..931b06de09 --- /dev/null +++ b/tests/bugs/moddata_3/bug33567 @@ -0,0 +1,11 @@ +puts "===========================================================" +puts "0033567: Modeling Data - GeomLib_IsPlanarSurface raises SIGFPE in Release mode" +puts "===========================================================" + +puts "REQUIRED All: Conversion failed" + +pload MODELING + +restore [locate_data_file bug33567.brep] a +mksurface s a +tocanon r s 0.0005 From cdc6566c3c0096680dbde31c3be28793ba14d0fa Mon Sep 17 00:00:00 2001 From: dpasukhi Date: Thu, 4 Jan 2024 12:29:53 +0000 Subject: [PATCH 535/639] 0033564: Data Exchange, STEP - Making default unit parameter Updated signature for step makers with units to have default unit as a mm (no scaling) --- .../GeomToStep_MakeAxis1Placement.hxx | 10 +-- .../GeomToStep_MakeAxis2Placement2d.hxx | 5 +- .../GeomToStep_MakeAxis2Placement3d.hxx | 11 ++- .../GeomToStep_MakeBSplineCurveWithKnots.hxx | 5 +- ...eCurveWithKnotsAndRationalBSplineCurve.hxx | 5 +- ...GeomToStep_MakeBSplineSurfaceWithKnots.hxx | 3 +- ...faceWithKnotsAndRationalBSplineSurface.hxx | 3 +- .../GeomToStep_MakeBoundedCurve.hxx | 5 +- .../GeomToStep_MakeBoundedSurface.hxx | 3 +- src/GeomToStep/GeomToStep_MakeCircle.hxx | 7 +- src/GeomToStep/GeomToStep_MakeConic.hxx | 5 +- .../GeomToStep_MakeConicalSurface.hxx | 3 +- src/GeomToStep/GeomToStep_MakeCurve.hxx | 5 +- .../GeomToStep_MakeCylindricalSurface.hxx | 3 +- .../GeomToStep_MakeElementarySurface.hxx | 3 +- src/GeomToStep/GeomToStep_MakeEllipse.hxx | 7 +- src/GeomToStep/GeomToStep_MakeHyperbola.hxx | 4 +- src/GeomToStep/GeomToStep_MakeLine.hxx | 9 +- src/GeomToStep/GeomToStep_MakeParabola.hxx | 5 +- src/GeomToStep/GeomToStep_MakePlane.hxx | 5 +- src/GeomToStep/GeomToStep_MakePolyline.hxx | 5 +- ...omToStep_MakeRectangularTrimmedSurface.hxx | 3 +- .../GeomToStep_MakeSphericalSurface.hxx | 3 +- src/GeomToStep/GeomToStep_MakeSurface.hxx | 3 +- ...eomToStep_MakeSurfaceOfLinearExtrusion.hxx | 3 +- .../GeomToStep_MakeSurfaceOfRevolution.hxx | 3 +- .../GeomToStep_MakeSweptSurface.hxx | 3 +- .../GeomToStep_MakeToroidalSurface.hxx | 3 +- src/GeomToStep/GeomToStep_MakeVector.hxx | 9 +- src/GeomToStep/GeomToStep_Root.hxx | 1 + src/STEPCAFControl/STEPCAFControl_Reader.hxx | 19 ++-- src/STEPCAFControl/STEPCAFControl_Writer.hxx | 12 +-- .../STEPConstruct_UnitContext.hxx | 8 +- .../STEPConstruct_ValidationProps.hxx | 5 +- src/STEPControl/STEPControl_ActorRead.cxx | 2 +- src/STEPControl/STEPControl_ActorRead.hxx | 16 ++-- src/STEPControl/STEPControl_ActorWrite.hxx | 7 +- src/StepToGeom/StepToGeom.hxx | 88 +++++++++---------- src/StepToTopoDS/StepToTopoDS_Builder.cxx | 4 +- src/StepToTopoDS/StepToTopoDS_Builder.hxx | 26 +++--- .../StepToTopoDS_MakeTransformed.hxx | 7 +- .../StepToTopoDS_TranslateCompositeCurve.hxx | 8 +- ...pToTopoDS_TranslateCurveBoundedSurface.hxx | 4 +- .../StepToTopoDS_TranslateEdge.hxx | 9 +- .../StepToTopoDS_TranslateEdgeLoop.hxx | 4 +- .../StepToTopoDS_TranslateFace.hxx | 15 ++-- .../StepToTopoDS_TranslatePolyLoop.hxx | 5 +- .../StepToTopoDS_TranslateShell.hxx | 4 +- .../StepToTopoDS_TranslateSolid.hxx | 2 +- .../StepToTopoDS_TranslateVertex.hxx | 5 +- .../StepToTopoDS_TranslateVertexLoop.hxx | 5 +- src/TopoDSToStep/TopoDSToStep_Builder.hxx | 5 +- .../TopoDSToStep_MakeBrepWithVoids.hxx | 2 +- .../TopoDSToStep_MakeFacetedBrep.hxx | 5 +- ...ToStep_MakeFacetedBrepAndBrepWithVoids.hxx | 2 +- .../TopoDSToStep_MakeGeometricCurveSet.hxx | 2 +- .../TopoDSToStep_MakeManifoldSolidBrep.hxx | 5 +- ...opoDSToStep_MakeShellBasedSurfaceModel.hxx | 6 +- .../TopoDSToStep_MakeStepEdge.hxx | 5 +- .../TopoDSToStep_MakeStepFace.hxx | 5 +- .../TopoDSToStep_MakeStepVertex.hxx | 4 +- .../TopoDSToStep_MakeStepWire.hxx | 4 +- .../TopoDSToStep_WireframeBuilder.hxx | 11 ++- 63 files changed, 206 insertions(+), 247 deletions(-) diff --git a/src/GeomToStep/GeomToStep_MakeAxis1Placement.hxx b/src/GeomToStep/GeomToStep_MakeAxis1Placement.hxx index 4e3baad9da..2c7a592760 100644 --- a/src/GeomToStep/GeomToStep_MakeAxis1Placement.hxx +++ b/src/GeomToStep/GeomToStep_MakeAxis1Placement.hxx @@ -20,10 +20,10 @@ #include #include #include +#include #include -class StepData_Factors; class StepGeom_Axis1Placement; class gp_Ax1; class gp_Ax2d; @@ -43,16 +43,16 @@ public: Standard_EXPORT GeomToStep_MakeAxis1Placement(const gp_Ax1& A, - const StepData_Factors& theLocalFactors); + const StepData_Factors& theLocalFactors = StepData_Factors()); Standard_EXPORT GeomToStep_MakeAxis1Placement(const gp_Ax2d& A, - const StepData_Factors& theLocalFactors); + const StepData_Factors& theLocalFactors = StepData_Factors()); Standard_EXPORT GeomToStep_MakeAxis1Placement(const Handle(Geom_Axis1Placement)& A, - const StepData_Factors& theLocalFactors); + const StepData_Factors& theLocalFactors = StepData_Factors()); Standard_EXPORT GeomToStep_MakeAxis1Placement(const Handle(Geom2d_AxisPlacement)& A, - const StepData_Factors& theLocalFactors); + const StepData_Factors& theLocalFactors = StepData_Factors()); Standard_EXPORT const Handle(StepGeom_Axis1Placement)& Value() const; diff --git a/src/GeomToStep/GeomToStep_MakeAxis2Placement2d.hxx b/src/GeomToStep/GeomToStep_MakeAxis2Placement2d.hxx index e2ceb4c5d3..e8adea3199 100644 --- a/src/GeomToStep/GeomToStep_MakeAxis2Placement2d.hxx +++ b/src/GeomToStep/GeomToStep_MakeAxis2Placement2d.hxx @@ -23,7 +23,6 @@ #include -class StepData_Factors; class StepGeom_Axis2Placement2d; class gp_Ax2; class gp_Ax22d; @@ -41,10 +40,10 @@ public: Standard_EXPORT GeomToStep_MakeAxis2Placement2d(const gp_Ax2& A, - const StepData_Factors& theLocalFactors); + const StepData_Factors& theLocalFactors = StepData_Factors()); Standard_EXPORT GeomToStep_MakeAxis2Placement2d(const gp_Ax22d& A, - const StepData_Factors& theLocalFactors); + const StepData_Factors& theLocalFactors = StepData_Factors()); Standard_EXPORT const Handle(StepGeom_Axis2Placement2d)& Value() const; diff --git a/src/GeomToStep/GeomToStep_MakeAxis2Placement3d.hxx b/src/GeomToStep/GeomToStep_MakeAxis2Placement3d.hxx index b11e822129..2047a9d2d4 100644 --- a/src/GeomToStep/GeomToStep_MakeAxis2Placement3d.hxx +++ b/src/GeomToStep/GeomToStep_MakeAxis2Placement3d.hxx @@ -23,7 +23,6 @@ #include #include -class StepData_Factors; class StepGeom_Axis2Placement3d; class gp_Ax2; class gp_Ax3; @@ -42,19 +41,19 @@ public: DEFINE_STANDARD_ALLOC - Standard_EXPORT GeomToStep_MakeAxis2Placement3d(const StepData_Factors& theLocalFactors); + Standard_EXPORT GeomToStep_MakeAxis2Placement3d(const StepData_Factors& theLocalFactors = StepData_Factors()); Standard_EXPORT GeomToStep_MakeAxis2Placement3d(const gp_Ax2& A, - const StepData_Factors& theLocalFactors); + const StepData_Factors& theLocalFactors = StepData_Factors()); Standard_EXPORT GeomToStep_MakeAxis2Placement3d(const gp_Ax3& A, - const StepData_Factors& theLocalFactors); + const StepData_Factors& theLocalFactors = StepData_Factors()); Standard_EXPORT GeomToStep_MakeAxis2Placement3d(const gp_Trsf& T, - const StepData_Factors& theLocalFactors); + const StepData_Factors& theLocalFactors = StepData_Factors()); Standard_EXPORT GeomToStep_MakeAxis2Placement3d(const Handle(Geom_Axis2Placement)& A, - const StepData_Factors& theLocalFactors); + const StepData_Factors& theLocalFactors = StepData_Factors()); Standard_EXPORT const Handle(StepGeom_Axis2Placement3d)& Value() const; diff --git a/src/GeomToStep/GeomToStep_MakeBSplineCurveWithKnots.hxx b/src/GeomToStep/GeomToStep_MakeBSplineCurveWithKnots.hxx index ea7f140874..785e617da0 100644 --- a/src/GeomToStep/GeomToStep_MakeBSplineCurveWithKnots.hxx +++ b/src/GeomToStep/GeomToStep_MakeBSplineCurveWithKnots.hxx @@ -24,7 +24,6 @@ #include class Geom_BSplineCurve; class Geom2d_BSplineCurve; -class StepData_Factors; class StepGeom_BSplineCurveWithKnots; @@ -41,10 +40,10 @@ public: Standard_EXPORT GeomToStep_MakeBSplineCurveWithKnots(const Handle(Geom_BSplineCurve)& Bsplin, - const StepData_Factors& theLocalFactors); + const StepData_Factors& theLocalFactors = StepData_Factors()); Standard_EXPORT GeomToStep_MakeBSplineCurveWithKnots(const Handle(Geom2d_BSplineCurve)& Bsplin, - const StepData_Factors& theLocalFactors); + const StepData_Factors& theLocalFactors = StepData_Factors()); Standard_EXPORT const Handle(StepGeom_BSplineCurveWithKnots)& Value() const; diff --git a/src/GeomToStep/GeomToStep_MakeBSplineCurveWithKnotsAndRationalBSplineCurve.hxx b/src/GeomToStep/GeomToStep_MakeBSplineCurveWithKnotsAndRationalBSplineCurve.hxx index 9adf01acae..5baab74285 100644 --- a/src/GeomToStep/GeomToStep_MakeBSplineCurveWithKnotsAndRationalBSplineCurve.hxx +++ b/src/GeomToStep/GeomToStep_MakeBSplineCurveWithKnotsAndRationalBSplineCurve.hxx @@ -23,7 +23,6 @@ #include -class StepData_Factors; class StepGeom_BSplineCurveWithKnotsAndRationalBSplineCurve; class Geom_BSplineCurve; class Geom2d_BSplineCurve; @@ -42,10 +41,10 @@ public: Standard_EXPORT GeomToStep_MakeBSplineCurveWithKnotsAndRationalBSplineCurve(const Handle(Geom_BSplineCurve)& Bsplin, - const StepData_Factors& theLocalFactors); + const StepData_Factors& theLocalFactors = StepData_Factors()); Standard_EXPORT GeomToStep_MakeBSplineCurveWithKnotsAndRationalBSplineCurve(const Handle(Geom2d_BSplineCurve)& Bsplin, - const StepData_Factors& theLocalFactors); + const StepData_Factors& theLocalFactors = StepData_Factors()); Standard_EXPORT const Handle(StepGeom_BSplineCurveWithKnotsAndRationalBSplineCurve)& Value() const; diff --git a/src/GeomToStep/GeomToStep_MakeBSplineSurfaceWithKnots.hxx b/src/GeomToStep/GeomToStep_MakeBSplineSurfaceWithKnots.hxx index 1fe271e450..f30453bc5d 100644 --- a/src/GeomToStep/GeomToStep_MakeBSplineSurfaceWithKnots.hxx +++ b/src/GeomToStep/GeomToStep_MakeBSplineSurfaceWithKnots.hxx @@ -22,7 +22,6 @@ #include #include -class StepData_Factors; class StepGeom_BSplineSurfaceWithKnots; class Geom_BSplineSurface; @@ -40,7 +39,7 @@ public: Standard_EXPORT GeomToStep_MakeBSplineSurfaceWithKnots(const Handle(Geom_BSplineSurface)& Bsplin, - const StepData_Factors& theLocalFactors); + const StepData_Factors& theLocalFactors = StepData_Factors()); Standard_EXPORT const Handle(StepGeom_BSplineSurfaceWithKnots)& Value() const; diff --git a/src/GeomToStep/GeomToStep_MakeBSplineSurfaceWithKnotsAndRationalBSplineSurface.hxx b/src/GeomToStep/GeomToStep_MakeBSplineSurfaceWithKnotsAndRationalBSplineSurface.hxx index ca714b11ae..7fc7b34884 100644 --- a/src/GeomToStep/GeomToStep_MakeBSplineSurfaceWithKnotsAndRationalBSplineSurface.hxx +++ b/src/GeomToStep/GeomToStep_MakeBSplineSurfaceWithKnotsAndRationalBSplineSurface.hxx @@ -23,7 +23,6 @@ #include -class StepData_Factors; class StepGeom_BSplineSurfaceWithKnotsAndRationalBSplineSurface; class Geom_BSplineSurface; @@ -41,7 +40,7 @@ public: Standard_EXPORT GeomToStep_MakeBSplineSurfaceWithKnotsAndRationalBSplineSurface(const Handle(Geom_BSplineSurface)& Bsplin, - const StepData_Factors& theLocalFactors); + const StepData_Factors& theLocalFactors = StepData_Factors()); Standard_EXPORT const Handle(StepGeom_BSplineSurfaceWithKnotsAndRationalBSplineSurface)& Value() const; diff --git a/src/GeomToStep/GeomToStep_MakeBoundedCurve.hxx b/src/GeomToStep/GeomToStep_MakeBoundedCurve.hxx index 26c0df9327..190f16f056 100644 --- a/src/GeomToStep/GeomToStep_MakeBoundedCurve.hxx +++ b/src/GeomToStep/GeomToStep_MakeBoundedCurve.hxx @@ -23,7 +23,6 @@ #include -class StepData_Factors; class StepGeom_BoundedCurve; class Geom_BoundedCurve; class Geom2d_BoundedCurve; @@ -42,10 +41,10 @@ public: Standard_EXPORT GeomToStep_MakeBoundedCurve(const Handle(Geom_BoundedCurve)& C, - const StepData_Factors& theLocalFactors); + const StepData_Factors& theLocalFactors = StepData_Factors()); Standard_EXPORT GeomToStep_MakeBoundedCurve(const Handle(Geom2d_BoundedCurve)& C, - const StepData_Factors& theLocalFactors); + const StepData_Factors& theLocalFactors = StepData_Factors()); Standard_EXPORT const Handle(StepGeom_BoundedCurve)& Value() const; diff --git a/src/GeomToStep/GeomToStep_MakeBoundedSurface.hxx b/src/GeomToStep/GeomToStep_MakeBoundedSurface.hxx index 17df588b2f..bd061aa580 100644 --- a/src/GeomToStep/GeomToStep_MakeBoundedSurface.hxx +++ b/src/GeomToStep/GeomToStep_MakeBoundedSurface.hxx @@ -23,7 +23,6 @@ #include -class StepData_Factors; class StepGeom_BoundedSurface; class Geom_BoundedSurface; @@ -41,7 +40,7 @@ public: Standard_EXPORT GeomToStep_MakeBoundedSurface(const Handle(Geom_BoundedSurface)& C, - const StepData_Factors& theLocalFactors); + const StepData_Factors& theLocalFactors = StepData_Factors()); Standard_EXPORT const Handle(StepGeom_BoundedSurface)& Value() const; diff --git a/src/GeomToStep/GeomToStep_MakeCircle.hxx b/src/GeomToStep/GeomToStep_MakeCircle.hxx index abd6360f2b..391e06f52d 100644 --- a/src/GeomToStep/GeomToStep_MakeCircle.hxx +++ b/src/GeomToStep/GeomToStep_MakeCircle.hxx @@ -23,7 +23,6 @@ #include -class StepData_Factors; class StepGeom_Circle; class gp_Circ; class Geom_Circle; @@ -42,13 +41,13 @@ public: Standard_EXPORT GeomToStep_MakeCircle(const gp_Circ& C, - const StepData_Factors& theLocalFactors); + const StepData_Factors& theLocalFactors = StepData_Factors()); Standard_EXPORT GeomToStep_MakeCircle(const Handle(Geom_Circle)& C, - const StepData_Factors& theLocalFactors); + const StepData_Factors& theLocalFactors = StepData_Factors()); Standard_EXPORT GeomToStep_MakeCircle(const Handle(Geom2d_Circle)& C, - const StepData_Factors& theLocalFactors); + const StepData_Factors& theLocalFactors = StepData_Factors()); Standard_EXPORT const Handle(StepGeom_Circle)& Value() const; diff --git a/src/GeomToStep/GeomToStep_MakeConic.hxx b/src/GeomToStep/GeomToStep_MakeConic.hxx index dfdaa13e78..ef68a9878c 100644 --- a/src/GeomToStep/GeomToStep_MakeConic.hxx +++ b/src/GeomToStep/GeomToStep_MakeConic.hxx @@ -25,7 +25,6 @@ class StepGeom_Conic; class Geom_Conic; class Geom2d_Conic; -class StepData_Factors; //! This class implements the mapping between classes @@ -40,10 +39,10 @@ public: Standard_EXPORT GeomToStep_MakeConic(const Handle(Geom_Conic)& C, - const StepData_Factors& theLocalFactors); + const StepData_Factors& theLocalFactors = StepData_Factors()); Standard_EXPORT GeomToStep_MakeConic(const Handle(Geom2d_Conic)& C, - const StepData_Factors& theLocalFactors); + const StepData_Factors& theLocalFactors = StepData_Factors()); Standard_EXPORT const Handle(StepGeom_Conic)& Value() const; diff --git a/src/GeomToStep/GeomToStep_MakeConicalSurface.hxx b/src/GeomToStep/GeomToStep_MakeConicalSurface.hxx index 31479c494a..83ea3bfd0f 100644 --- a/src/GeomToStep/GeomToStep_MakeConicalSurface.hxx +++ b/src/GeomToStep/GeomToStep_MakeConicalSurface.hxx @@ -24,7 +24,6 @@ #include class StepGeom_ConicalSurface; class Geom_ConicalSurface; -class StepData_Factors; //! This class implements the mapping between class @@ -39,7 +38,7 @@ public: Standard_EXPORT GeomToStep_MakeConicalSurface(const Handle(Geom_ConicalSurface)& CSurf, - const StepData_Factors& theLocalFactors); + const StepData_Factors& theLocalFactors = StepData_Factors()); Standard_EXPORT const Handle(StepGeom_ConicalSurface)& Value() const; diff --git a/src/GeomToStep/GeomToStep_MakeCurve.hxx b/src/GeomToStep/GeomToStep_MakeCurve.hxx index 325143b139..595f16c55a 100644 --- a/src/GeomToStep/GeomToStep_MakeCurve.hxx +++ b/src/GeomToStep/GeomToStep_MakeCurve.hxx @@ -22,7 +22,6 @@ #include #include -class StepData_Factors; class StepGeom_Curve; class Geom_Curve; class Geom2d_Curve; @@ -40,10 +39,10 @@ public: Standard_EXPORT GeomToStep_MakeCurve(const Handle(Geom_Curve)& C, - const StepData_Factors& theLocalFactors); + const StepData_Factors& theLocalFactors = StepData_Factors()); Standard_EXPORT GeomToStep_MakeCurve(const Handle(Geom2d_Curve)& C, - const StepData_Factors& theLocalFactors); + const StepData_Factors& theLocalFactors = StepData_Factors()); Standard_EXPORT const Handle(StepGeom_Curve)& Value() const; diff --git a/src/GeomToStep/GeomToStep_MakeCylindricalSurface.hxx b/src/GeomToStep/GeomToStep_MakeCylindricalSurface.hxx index 6325002b5d..acbb9c7dff 100644 --- a/src/GeomToStep/GeomToStep_MakeCylindricalSurface.hxx +++ b/src/GeomToStep/GeomToStep_MakeCylindricalSurface.hxx @@ -24,7 +24,6 @@ #include class StepGeom_CylindricalSurface; class Geom_CylindricalSurface; -class StepData_Factors; //! This class implements the mapping between class @@ -39,7 +38,7 @@ public: Standard_EXPORT GeomToStep_MakeCylindricalSurface(const Handle(Geom_CylindricalSurface)& CSurf, - const StepData_Factors& theLocalFactors); + const StepData_Factors& theLocalFactors = StepData_Factors()); Standard_EXPORT const Handle(StepGeom_CylindricalSurface)& Value() const; diff --git a/src/GeomToStep/GeomToStep_MakeElementarySurface.hxx b/src/GeomToStep/GeomToStep_MakeElementarySurface.hxx index 4ccdd301ed..af102ba745 100644 --- a/src/GeomToStep/GeomToStep_MakeElementarySurface.hxx +++ b/src/GeomToStep/GeomToStep_MakeElementarySurface.hxx @@ -23,7 +23,6 @@ #include -class StepData_Factors; class StepGeom_ElementarySurface; class Geom_ElementarySurface; @@ -41,7 +40,7 @@ public: Standard_EXPORT GeomToStep_MakeElementarySurface(const Handle(Geom_ElementarySurface)& S, - const StepData_Factors& theLocalFactors); + const StepData_Factors& theLocalFactors = StepData_Factors()); Standard_EXPORT const Handle(StepGeom_ElementarySurface)& Value() const; diff --git a/src/GeomToStep/GeomToStep_MakeEllipse.hxx b/src/GeomToStep/GeomToStep_MakeEllipse.hxx index a9b4971eb9..0f1b14858b 100644 --- a/src/GeomToStep/GeomToStep_MakeEllipse.hxx +++ b/src/GeomToStep/GeomToStep_MakeEllipse.hxx @@ -23,7 +23,6 @@ #include -class StepData_Factors; class StepGeom_Ellipse; class gp_Elips; class Geom_Ellipse; @@ -42,13 +41,13 @@ public: Standard_EXPORT GeomToStep_MakeEllipse(const gp_Elips& C, - const StepData_Factors& theLocalFactors); + const StepData_Factors& theLocalFactors = StepData_Factors()); Standard_EXPORT GeomToStep_MakeEllipse(const Handle(Geom_Ellipse)& C, - const StepData_Factors& theLocalFactors); + const StepData_Factors& theLocalFactors = StepData_Factors()); Standard_EXPORT GeomToStep_MakeEllipse(const Handle(Geom2d_Ellipse)& C, - const StepData_Factors& theLocalFactors); + const StepData_Factors& theLocalFactors = StepData_Factors()); Standard_EXPORT const Handle(StepGeom_Ellipse)& Value() const; diff --git a/src/GeomToStep/GeomToStep_MakeHyperbola.hxx b/src/GeomToStep/GeomToStep_MakeHyperbola.hxx index e42b4be8e4..7b9912171d 100644 --- a/src/GeomToStep/GeomToStep_MakeHyperbola.hxx +++ b/src/GeomToStep/GeomToStep_MakeHyperbola.hxx @@ -38,10 +38,10 @@ public: Standard_EXPORT GeomToStep_MakeHyperbola(const Handle(Geom2d_Hyperbola)& C, - const StepData_Factors& theLocalFactors); + const StepData_Factors& theLocalFactors = StepData_Factors()); Standard_EXPORT GeomToStep_MakeHyperbola(const Handle(Geom_Hyperbola)& C, - const StepData_Factors& theLocalFactors); + const StepData_Factors& theLocalFactors = StepData_Factors()); Standard_EXPORT const Handle(StepGeom_Hyperbola)& Value() const; diff --git a/src/GeomToStep/GeomToStep_MakeLine.hxx b/src/GeomToStep/GeomToStep_MakeLine.hxx index d7e6991351..d871cd55b6 100644 --- a/src/GeomToStep/GeomToStep_MakeLine.hxx +++ b/src/GeomToStep/GeomToStep_MakeLine.hxx @@ -22,7 +22,6 @@ #include #include -class StepData_Factors; class StepGeom_Line; class gp_Lin; class gp_Lin2d; @@ -42,16 +41,16 @@ public: Standard_EXPORT GeomToStep_MakeLine(const gp_Lin& L, - const StepData_Factors& theLocalFactors); + const StepData_Factors& theLocalFactors = StepData_Factors()); Standard_EXPORT GeomToStep_MakeLine(const gp_Lin2d& L, - const StepData_Factors& theLocalFactors); + const StepData_Factors& theLocalFactors = StepData_Factors()); Standard_EXPORT GeomToStep_MakeLine(const Handle(Geom_Line)& C, - const StepData_Factors& theLocalFactors); + const StepData_Factors& theLocalFactors = StepData_Factors()); Standard_EXPORT GeomToStep_MakeLine(const Handle(Geom2d_Line)& C, - const StepData_Factors& theLocalFactors); + const StepData_Factors& theLocalFactors = StepData_Factors()); Standard_EXPORT const Handle(StepGeom_Line)& Value() const; diff --git a/src/GeomToStep/GeomToStep_MakeParabola.hxx b/src/GeomToStep/GeomToStep_MakeParabola.hxx index 78a39b51e4..aa837e0bc8 100644 --- a/src/GeomToStep/GeomToStep_MakeParabola.hxx +++ b/src/GeomToStep/GeomToStep_MakeParabola.hxx @@ -25,7 +25,6 @@ class StepGeom_Parabola; class Geom2d_Parabola; class Geom_Parabola; -class StepData_Factors; //! This class implements the mapping between the class @@ -39,10 +38,10 @@ public: Standard_EXPORT GeomToStep_MakeParabola(const Handle(Geom2d_Parabola)& C, - const StepData_Factors& theLocalFactors); + const StepData_Factors& theLocalFactors = StepData_Factors()); Standard_EXPORT GeomToStep_MakeParabola(const Handle(Geom_Parabola)& C, - const StepData_Factors& theLocalFactors); + const StepData_Factors& theLocalFactors = StepData_Factors()); Standard_EXPORT const Handle(StepGeom_Parabola)& Value() const; diff --git a/src/GeomToStep/GeomToStep_MakePlane.hxx b/src/GeomToStep/GeomToStep_MakePlane.hxx index cc6a772371..7f0cabf841 100644 --- a/src/GeomToStep/GeomToStep_MakePlane.hxx +++ b/src/GeomToStep/GeomToStep_MakePlane.hxx @@ -22,7 +22,6 @@ #include #include -class StepData_Factors; class StepGeom_Plane; class gp_Pln; class Geom_Plane; @@ -40,10 +39,10 @@ public: Standard_EXPORT GeomToStep_MakePlane(const gp_Pln& P, - const StepData_Factors& theLocalFactors); + const StepData_Factors& theLocalFactors = StepData_Factors()); Standard_EXPORT GeomToStep_MakePlane(const Handle(Geom_Plane)& P, - const StepData_Factors& theLocalFactors); + const StepData_Factors& theLocalFactors = StepData_Factors()); Standard_EXPORT const Handle(StepGeom_Plane)& Value() const; diff --git a/src/GeomToStep/GeomToStep_MakePolyline.hxx b/src/GeomToStep/GeomToStep_MakePolyline.hxx index 80635bf719..f52adfb852 100644 --- a/src/GeomToStep/GeomToStep_MakePolyline.hxx +++ b/src/GeomToStep/GeomToStep_MakePolyline.hxx @@ -25,7 +25,6 @@ #include #include -class StepData_Factors; class StepGeom_Polyline; @@ -39,10 +38,10 @@ public: Standard_EXPORT GeomToStep_MakePolyline(const TColgp_Array1OfPnt& P, - const StepData_Factors& theLocalFactors); + const StepData_Factors& theLocalFactors = StepData_Factors()); Standard_EXPORT GeomToStep_MakePolyline(const TColgp_Array1OfPnt2d& P, - const StepData_Factors& theLocalFactors); + const StepData_Factors& theLocalFactors = StepData_Factors()); Standard_EXPORT const Handle(StepGeom_Polyline)& Value() const; diff --git a/src/GeomToStep/GeomToStep_MakeRectangularTrimmedSurface.hxx b/src/GeomToStep/GeomToStep_MakeRectangularTrimmedSurface.hxx index 68832c62d5..a509f48d8f 100644 --- a/src/GeomToStep/GeomToStep_MakeRectangularTrimmedSurface.hxx +++ b/src/GeomToStep/GeomToStep_MakeRectangularTrimmedSurface.hxx @@ -23,7 +23,6 @@ #include -class StepData_Factors; class StepGeom_RectangularTrimmedSurface; class Geom_RectangularTrimmedSurface; @@ -41,7 +40,7 @@ public: Standard_EXPORT GeomToStep_MakeRectangularTrimmedSurface(const Handle(Geom_RectangularTrimmedSurface)& RTSurf, - const StepData_Factors& theLocalFactors); + const StepData_Factors& theLocalFactors = StepData_Factors()); Standard_EXPORT const Handle(StepGeom_RectangularTrimmedSurface)& Value() const; diff --git a/src/GeomToStep/GeomToStep_MakeSphericalSurface.hxx b/src/GeomToStep/GeomToStep_MakeSphericalSurface.hxx index 9f1697e000..3dbbdd8b2a 100644 --- a/src/GeomToStep/GeomToStep_MakeSphericalSurface.hxx +++ b/src/GeomToStep/GeomToStep_MakeSphericalSurface.hxx @@ -23,7 +23,6 @@ #include -class StepData_Factors; class StepGeom_SphericalSurface; class Geom_SphericalSurface; @@ -40,7 +39,7 @@ public: Standard_EXPORT GeomToStep_MakeSphericalSurface(const Handle(Geom_SphericalSurface)& CSurf, - const StepData_Factors& theLocalFactors); + const StepData_Factors& theLocalFactors = StepData_Factors()); Standard_EXPORT const Handle(StepGeom_SphericalSurface)& Value() const; diff --git a/src/GeomToStep/GeomToStep_MakeSurface.hxx b/src/GeomToStep/GeomToStep_MakeSurface.hxx index 7ff59b1858..7834efb55a 100644 --- a/src/GeomToStep/GeomToStep_MakeSurface.hxx +++ b/src/GeomToStep/GeomToStep_MakeSurface.hxx @@ -23,7 +23,6 @@ #include -class StepData_Factors; class StepGeom_Surface; class Geom_Surface; @@ -40,7 +39,7 @@ public: Standard_EXPORT GeomToStep_MakeSurface(const Handle(Geom_Surface)& C, - const StepData_Factors& theLocalFactors); + const StepData_Factors& theLocalFactors = StepData_Factors()); Standard_EXPORT const Handle(StepGeom_Surface)& Value() const; diff --git a/src/GeomToStep/GeomToStep_MakeSurfaceOfLinearExtrusion.hxx b/src/GeomToStep/GeomToStep_MakeSurfaceOfLinearExtrusion.hxx index 85774c5032..86d2eec31c 100644 --- a/src/GeomToStep/GeomToStep_MakeSurfaceOfLinearExtrusion.hxx +++ b/src/GeomToStep/GeomToStep_MakeSurfaceOfLinearExtrusion.hxx @@ -23,7 +23,6 @@ #include -class StepData_Factors; class StepGeom_SurfaceOfLinearExtrusion; class Geom_SurfaceOfLinearExtrusion; @@ -40,7 +39,7 @@ public: Standard_EXPORT GeomToStep_MakeSurfaceOfLinearExtrusion(const Handle(Geom_SurfaceOfLinearExtrusion)& CSurf, - const StepData_Factors& theLocalFactors); + const StepData_Factors& theLocalFactors = StepData_Factors()); Standard_EXPORT const Handle(StepGeom_SurfaceOfLinearExtrusion)& Value() const; diff --git a/src/GeomToStep/GeomToStep_MakeSurfaceOfRevolution.hxx b/src/GeomToStep/GeomToStep_MakeSurfaceOfRevolution.hxx index 2caa134add..7d18df9b93 100644 --- a/src/GeomToStep/GeomToStep_MakeSurfaceOfRevolution.hxx +++ b/src/GeomToStep/GeomToStep_MakeSurfaceOfRevolution.hxx @@ -23,7 +23,6 @@ #include -class StepData_Factors; class StepGeom_SurfaceOfRevolution; class Geom_SurfaceOfRevolution; @@ -40,7 +39,7 @@ public: Standard_EXPORT GeomToStep_MakeSurfaceOfRevolution(const Handle(Geom_SurfaceOfRevolution)& RevSurf, - const StepData_Factors& theLocalFactors); + const StepData_Factors& theLocalFactors = StepData_Factors()); Standard_EXPORT const Handle(StepGeom_SurfaceOfRevolution)& Value() const; diff --git a/src/GeomToStep/GeomToStep_MakeSweptSurface.hxx b/src/GeomToStep/GeomToStep_MakeSweptSurface.hxx index 4406e140f1..50a102ecdf 100644 --- a/src/GeomToStep/GeomToStep_MakeSweptSurface.hxx +++ b/src/GeomToStep/GeomToStep_MakeSweptSurface.hxx @@ -23,7 +23,6 @@ #include -class StepData_Factors; class StepGeom_SweptSurface; class Geom_SweptSurface; @@ -41,7 +40,7 @@ public: Standard_EXPORT GeomToStep_MakeSweptSurface(const Handle(Geom_SweptSurface)& S, - const StepData_Factors& theLocalFactors); + const StepData_Factors& theLocalFactors = StepData_Factors()); Standard_EXPORT const Handle(StepGeom_SweptSurface)& Value() const; diff --git a/src/GeomToStep/GeomToStep_MakeToroidalSurface.hxx b/src/GeomToStep/GeomToStep_MakeToroidalSurface.hxx index 386ec139ef..5f5a3ab154 100644 --- a/src/GeomToStep/GeomToStep_MakeToroidalSurface.hxx +++ b/src/GeomToStep/GeomToStep_MakeToroidalSurface.hxx @@ -23,7 +23,6 @@ #include -class StepData_Factors; class StepGeom_ToroidalSurface; class Geom_ToroidalSurface; @@ -40,7 +39,7 @@ public: Standard_EXPORT GeomToStep_MakeToroidalSurface(const Handle(Geom_ToroidalSurface)& TorSurf, - const StepData_Factors& theLocalFactors); + const StepData_Factors& theLocalFactors = StepData_Factors()); Standard_EXPORT const Handle(StepGeom_ToroidalSurface)& Value() const; diff --git a/src/GeomToStep/GeomToStep_MakeVector.hxx b/src/GeomToStep/GeomToStep_MakeVector.hxx index 286e0107cd..3914054e1f 100644 --- a/src/GeomToStep/GeomToStep_MakeVector.hxx +++ b/src/GeomToStep/GeomToStep_MakeVector.hxx @@ -23,7 +23,6 @@ #include -class StepData_Factors; class StepGeom_Vector; class gp_Vec; class gp_Vec2d; @@ -43,16 +42,16 @@ public: Standard_EXPORT GeomToStep_MakeVector(const gp_Vec& V, - const StepData_Factors& theLocalFactors); + const StepData_Factors& theLocalFactors = StepData_Factors()); Standard_EXPORT GeomToStep_MakeVector(const gp_Vec2d& V, - const StepData_Factors& theLocalFactors); + const StepData_Factors& theLocalFactors = StepData_Factors()); Standard_EXPORT GeomToStep_MakeVector(const Handle(Geom_Vector)& V, - const StepData_Factors& theLocalFactors); + const StepData_Factors& theLocalFactors = StepData_Factors()); Standard_EXPORT GeomToStep_MakeVector(const Handle(Geom2d_Vector)& V, - const StepData_Factors& theLocalFactors); + const StepData_Factors& theLocalFactors = StepData_Factors()); Standard_EXPORT const Handle(StepGeom_Vector)& Value() const; diff --git a/src/GeomToStep/GeomToStep_Root.hxx b/src/GeomToStep/GeomToStep_Root.hxx index 12ac256b25..f8a288906f 100644 --- a/src/GeomToStep/GeomToStep_Root.hxx +++ b/src/GeomToStep/GeomToStep_Root.hxx @@ -20,6 +20,7 @@ #include #include #include +#include #include diff --git a/src/STEPCAFControl/STEPCAFControl_Reader.hxx b/src/STEPCAFControl/STEPCAFControl_Reader.hxx index 5fb211931b..e4b0905cd9 100644 --- a/src/STEPCAFControl/STEPCAFControl_Reader.hxx +++ b/src/STEPCAFControl/STEPCAFControl_Reader.hxx @@ -17,6 +17,7 @@ #define _STEPCAFControl_Reader_HeaderFile #include +#include #include #include #include @@ -38,8 +39,6 @@ class StepShape_ConnectedFaceSet; class StepRepr_NextAssemblyUsageOccurrence; class STEPConstruct_Tool; class StepDimTol_Datum; -class StepData_Factors; - //! Provides a tool to read STEP file and put it into //! DECAF document. Besides transfer of shapes (including @@ -234,7 +233,7 @@ protected: Standard_EXPORT Standard_Boolean ReadColors (const Handle(XSControl_WorkSession)& WS, const Handle(TDocStd_Document)& doc, - const StepData_Factors& theLocalFactors) const; + const StepData_Factors& theLocalFactors = StepData_Factors()) const; //! Reads names of parts defined in the STEP model and //! assigns them to corresponding labels in the DECAF document @@ -246,7 +245,7 @@ protected: Standard_EXPORT Standard_Boolean ReadValProps (const Handle(XSControl_WorkSession)& WS, const Handle(TDocStd_Document)& doc, const STEPCAFControl_DataMapOfPDExternFile& PDFileMap, - const StepData_Factors& theLocalFactors) const; + const StepData_Factors& theLocalFactors = StepData_Factors()) const; //! Reads layers of parts defined in the STEP model and //! set reference between shape and layers in the DECAF document @@ -260,19 +259,19 @@ protected: //! set reference between shape instances from different assemblyes Standard_EXPORT Standard_Boolean ReadGDTs (const Handle(XSControl_WorkSession)& WS, const Handle(TDocStd_Document)& doc, - const StepData_Factors& theLocalFactors); + const StepData_Factors& theLocalFactors = StepData_Factors()); //! Reads materials for instances defined in the STEP model and //! set reference between shape instances from different assemblyes Standard_EXPORT Standard_Boolean ReadMaterials (const Handle(XSControl_WorkSession)& WS, const Handle(TDocStd_Document)& doc, const Handle(TColStd_HSequenceOfTransient)& SeqPDS, - const StepData_Factors& theLocalFactors) const; + const StepData_Factors& theLocalFactors = StepData_Factors()) const; //! Reads Views for instances defined in the STEP model Standard_EXPORT Standard_Boolean ReadViews(const Handle(XSControl_WorkSession)& theWS, const Handle(TDocStd_Document)& theDoc, - const StepData_Factors& theLocalFactors) const; + const StepData_Factors& theLocalFactors = StepData_Factors()) const; //! Populates the sub-Label of the passed TDF Label with shape //! data associated with the given STEP Representation Item, @@ -314,20 +313,20 @@ private: const Standard_Real theModifValue, const Handle(TDocStd_Document)& theDoc, const Handle(XSControl_WorkSession)& theWS, - const StepData_Factors& theLocalFactors); + const StepData_Factors& theLocalFactors = StepData_Factors()); //! Internal method. Read Datums, connected to GeomTolerance theGDTL. Standard_Boolean readDatumsAP242(const Handle(Standard_Transient)& theEnt, const TDF_Label theGDTL, const Handle(TDocStd_Document)& theDoc, const Handle(XSControl_WorkSession)& theWS, - const StepData_Factors& theLocalFactors); + const StepData_Factors& theLocalFactors = StepData_Factors()); //! Internal method. Read Dimension or GeomTolerance. TDF_Label createGDTObjectInXCAF(const Handle(Standard_Transient)& theEnt, const Handle(TDocStd_Document)& theDoc, const Handle(XSControl_WorkSession)& theWS, - const StepData_Factors& theLocalFactors); + const StepData_Factors& theLocalFactors = StepData_Factors()); //! Prepares units for transfer void prepareUnits(const Handle(StepData_StepModel)& theModel, diff --git a/src/STEPCAFControl/STEPCAFControl_Writer.hxx b/src/STEPCAFControl/STEPCAFControl_Writer.hxx index 4d2dd03823..ef970c6914 100644 --- a/src/STEPCAFControl/STEPCAFControl_Writer.hxx +++ b/src/STEPCAFControl/STEPCAFControl_Writer.hxx @@ -25,6 +25,7 @@ #include #include #include +#include #include #include #include @@ -39,7 +40,6 @@ class XSControl_WorkSession; class TDocStd_Document; class STEPCAFControl_ExternFile; class TopoDS_Shape; -class StepData_Factors; //! Provides a tool to write DECAF document to the //! STEP file. Besides transfer of shapes (including @@ -233,7 +233,7 @@ protected: TopoDS_Shape transferExternFiles(const TDF_Label& theLabel, const STEPControl_StepModelType theMode, TDF_LabelSequence& theLabelSeq, - const StepData_Factors& theLocalFactors, + const StepData_Factors& theLocalFactors = StepData_Factors(), const Standard_CString thePrefix = "", const Message_ProgressRange& theProgress = Message_ProgressRange()); @@ -256,7 +256,7 @@ protected: //! Write D>s assigned to specified labels, to STEP model, according AP242 Standard_Boolean writeDGTsAP242(const Handle(XSControl_WorkSession)& theWS, const TDF_LabelSequence& theLabels, - const StepData_Factors& theLocalFactors); + const StepData_Factors& theLocalFactors = StepData_Factors()); //! Write materials assigned to specified labels, to STEP model Standard_Boolean writeMaterials(const Handle(XSControl_WorkSession)& theWS, @@ -297,14 +297,14 @@ protected: const gp_Ax2& theAnnotationPlane, const gp_Pnt& theTextPosition, const Handle(Standard_Transient)& theDimension, - const StepData_Factors& theLocalFactors); + const StepData_Factors& theLocalFactors = StepData_Factors()); Handle(StepDimTol_Datum) writeDatumAP242(const Handle(XSControl_WorkSession)& theWS, const TDF_LabelSequence& theShapeL, const TDF_Label& theDatumL, const Standard_Boolean isFirstDTarget, const Handle(StepDimTol_Datum)& theWrittenDatum, - const StepData_Factors& theLocalFactors); + const StepData_Factors& theLocalFactors = StepData_Factors()); void writeToleranceZone(const Handle(XSControl_WorkSession)& theWS, const Handle(XCAFDimTolObjects_GeomToleranceObject)& theObject, @@ -316,7 +316,7 @@ protected: const TDF_Label& theGeomTolL, const Handle(StepDimTol_HArray1OfDatumSystemOrReference)& theDatumSystem, const Handle(StepRepr_RepresentationContext)& theRC, - const StepData_Factors& theLocalFactors); + const StepData_Factors& theLocalFactors = StepData_Factors()); private: diff --git a/src/STEPConstruct/STEPConstruct_UnitContext.hxx b/src/STEPConstruct/STEPConstruct_UnitContext.hxx index c463ab42e7..1a7dbb836a 100644 --- a/src/STEPConstruct/STEPConstruct_UnitContext.hxx +++ b/src/STEPConstruct/STEPConstruct_UnitContext.hxx @@ -23,8 +23,8 @@ #include #include +#include #include -class StepData_Factors; class StepData_StepModel; class StepGeom_GeomRepContextAndGlobUnitAssCtxAndGlobUncertaintyAssCtx; class StepRepr_GlobalUnitAssignedContext; @@ -49,7 +49,7 @@ public: //! uncertainty equal to Tol3d) Standard_EXPORT void Init (const Standard_Real Tol3d, const Handle(StepData_StepModel)& theModel, - const StepData_Factors& theLocalFactors); + const StepData_Factors& theLocalFactors = StepData_Factors()); //! Returns True if Init was called successfully Standard_EXPORT Standard_Boolean IsDone() const; @@ -60,10 +60,10 @@ public: //! Computes the length, plane angle and solid angle conversion //! factor . Returns a status, 0 if OK Standard_EXPORT Standard_Integer ComputeFactors (const Handle(StepRepr_GlobalUnitAssignedContext)& aContext, - const StepData_Factors& theLocalFactors); + const StepData_Factors& theLocalFactors = StepData_Factors()); Standard_EXPORT Standard_Integer ComputeFactors (const Handle(StepBasic_NamedUnit)& aUnit, - const StepData_Factors& theLocalFactors); + const StepData_Factors& theLocalFactors = StepData_Factors()); //! Computes the uncertainty value (for length) Standard_EXPORT Standard_Integer ComputeTolerance (const Handle(StepRepr_GlobalUncertaintyAssignedContext)& aContext); diff --git a/src/STEPConstruct/STEPConstruct_ValidationProps.hxx b/src/STEPConstruct/STEPConstruct_ValidationProps.hxx index 4a7bec3d51..bbbb8490c8 100644 --- a/src/STEPConstruct/STEPConstruct_ValidationProps.hxx +++ b/src/STEPConstruct/STEPConstruct_ValidationProps.hxx @@ -26,7 +26,6 @@ #include #include class StepBasic_ProductDefinition; -class StepData_Factors; class XSControl_WorkSession; class TopoDS_Shape; class StepRepr_RepresentationItem; @@ -115,13 +114,13 @@ public: Standard_EXPORT Standard_Boolean GetPropReal (const Handle(StepRepr_RepresentationItem)& item, Standard_Real& Val, Standard_Boolean& isArea, - const StepData_Factors& theLocalFactors) const; + const StepData_Factors& theLocalFactors = StepData_Factors()) const; //! Returns value of Centriod property (or False if it is not) Standard_EXPORT Standard_Boolean GetPropPnt (const Handle(StepRepr_RepresentationItem)& item, const Handle(StepRepr_RepresentationContext)& Context, gp_Pnt& Pnt, - const StepData_Factors& theLocalFactors) const; + const StepData_Factors& theLocalFactors = StepData_Factors()) const; //! Sets current assembly shape SDR (for FindCDSR calls) Standard_EXPORT void SetAssemblyShape (const TopoDS_Shape& shape); diff --git a/src/STEPControl/STEPControl_ActorRead.cxx b/src/STEPControl/STEPControl_ActorRead.cxx index c092305895..c5a41907c9 100644 --- a/src/STEPControl/STEPControl_ActorRead.cxx +++ b/src/STEPControl/STEPControl_ActorRead.cxx @@ -1500,7 +1500,7 @@ Handle(TransferBRep_ShapeBinder) STEPControl_ActorRead::TransferEntity } else if (start->IsKind(STANDARD_TYPE(StepVisual_TessellatedSurfaceSet))) { - myShapeBuilder.Init(GetCasted(StepVisual_TessellatedSurfaceSet, start), TP, aLocalFactors, aHasGeom); + myShapeBuilder.Init(GetCasted(StepVisual_TessellatedSurfaceSet, start), TP, aHasGeom, aLocalFactors); found = Standard_True; } } diff --git a/src/STEPControl/STEPControl_ActorRead.hxx b/src/STEPControl/STEPControl_ActorRead.hxx index 66b7a13f52..b986e8055c 100644 --- a/src/STEPControl/STEPControl_ActorRead.hxx +++ b/src/STEPControl/STEPControl_ActorRead.hxx @@ -20,6 +20,7 @@ #include #include +#include #include #include #include @@ -47,7 +48,6 @@ class StepShape_FaceSurface; class TopoDS_Shell; class TopoDS_Compound; class StepRepr_ConstructiveGeometryRepresentationRelationship; -class StepData_Factors; class StepData_StepModel; @@ -77,7 +77,7 @@ public: Standard_EXPORT Handle(Transfer_Binder) TransferShape ( const Handle(Standard_Transient)& start, const Handle(Transfer_TransientProcess)& TP, - const StepData_Factors& theLocalFactors, + const StepData_Factors& theLocalFactors = StepData_Factors(), const Standard_Boolean isManifold = Standard_True, const Standard_Boolean theUseTrsf = Standard_False, const Message_ProgressRange& theProgress = Message_ProgressRange()); @@ -105,14 +105,14 @@ public: const Handle(StepRepr_Representation)& TargContext, const Handle(Transfer_TransientProcess)& TP, gp_Trsf& Trsf, - const StepData_Factors& theLocalFactors); + const StepData_Factors& theLocalFactors = StepData_Factors()); //! Computes transformation defined by given //! REPRESENTATION_RELATIONSHIP_WITH_TRANSFORMATION Standard_EXPORT Standard_Boolean ComputeSRRWT (const Handle(StepRepr_RepresentationRelationship)& SRR, const Handle(Transfer_TransientProcess)& TP, gp_Trsf& Trsf, - const StepData_Factors& theLocalFactors); + const StepData_Factors& theLocalFactors = StepData_Factors()); @@ -127,7 +127,7 @@ protected: Standard_EXPORT Handle(TransferBRep_ShapeBinder) TransferEntity ( const Handle(StepBasic_ProductDefinition)& PD, const Handle(Transfer_TransientProcess)& TP, - const StepData_Factors& theLocalFactors, + const StepData_Factors& theLocalFactors = StepData_Factors(), const Standard_Boolean theUseTrsf = Standard_False, const Message_ProgressRange& theProgress = Message_ProgressRange()); @@ -135,7 +135,7 @@ protected: Standard_EXPORT Handle(TransferBRep_ShapeBinder) TransferEntity (const Handle(StepRepr_NextAssemblyUsageOccurrence)& NAUO, const Handle(Transfer_TransientProcess)& TP, - const StepData_Factors& theLocalFactors, + const StepData_Factors& theLocalFactors = StepData_Factors(), const Message_ProgressRange& theProgress = Message_ProgressRange()); //! Transfers shape representation entity @@ -152,7 +152,7 @@ protected: Standard_EXPORT Handle(TransferBRep_ShapeBinder) TransferEntity (const Handle(StepShape_ContextDependentShapeRepresentation)& CDSR, const Handle(Transfer_TransientProcess)& TP, - const StepData_Factors& theLocalFactors, + const StepData_Factors& theLocalFactors = StepData_Factors(), const Message_ProgressRange& theProgress = Message_ProgressRange()); //! Transfers shape representation relationship entity @@ -189,7 +189,7 @@ protected: Handle(TransferBRep_ShapeBinder) TransferEntity( const Handle(StepRepr_ConstructiveGeometryRepresentationRelationship)& theCGRR, const Handle(Transfer_TransientProcess)& theTP, - const StepData_Factors& theLocalFactors); + const StepData_Factors& theLocalFactors = StepData_Factors()); //! Translates file by old way when CDSR are roots . Acts only if "read.step.product_mode" is equal Off. Standard_EXPORT Handle(TransferBRep_ShapeBinder) OldWay diff --git a/src/STEPControl/STEPControl_ActorWrite.hxx b/src/STEPControl/STEPControl_ActorWrite.hxx index 5cf5aca20e..bb75947ff2 100644 --- a/src/STEPControl/STEPControl_ActorWrite.hxx +++ b/src/STEPControl/STEPControl_ActorWrite.hxx @@ -28,7 +28,6 @@ class Transfer_Finder; class Transfer_Binder; class Transfer_FinderProcess; -class StepData_Factors; class StepShape_ShapeDefinitionRepresentation; class StepGeom_Axis2Placement3d; class TopoDS_Shape; @@ -60,7 +59,7 @@ public: const Handle(StepShape_ShapeDefinitionRepresentation)& SDR, Handle(StepGeom_Axis2Placement3d)& AX1, const Handle(Transfer_FinderProcess)& FP, - const StepData_Factors& theLocalFactors, + const StepData_Factors& theLocalFactors = StepData_Factors(), const Handle(TopTools_HSequenceOfShape)& shapeGroup = NULL, const Standard_Boolean isManifold = Standard_True, const Message_ProgressRange& theProgress = Message_ProgressRange()); @@ -69,7 +68,7 @@ public: (const Handle(Transfer_Finder)& start, const Handle(StepShape_ShapeDefinitionRepresentation)& SDR, const Handle(Transfer_FinderProcess)& FP, - const StepData_Factors& theLocalFactors, + const StepData_Factors& theLocalFactors = StepData_Factors(), const Handle(TopTools_HSequenceOfShape)& shapeGroup = NULL, const Standard_Boolean isManifold = Standard_True, const Message_ProgressRange& theProgress = Message_ProgressRange()); @@ -78,7 +77,7 @@ public: (const Handle(Transfer_Finder)& start, const Handle(StepShape_ShapeDefinitionRepresentation)& SDR, const Handle(Transfer_FinderProcess)& FP, - const StepData_Factors& theLocalFactors, + const StepData_Factors& theLocalFactors = StepData_Factors(), const Message_ProgressRange& theProgress = Message_ProgressRange()); Standard_EXPORT void SetMode (const STEPControl_StepModelType M); diff --git a/src/StepToGeom/StepToGeom.hxx b/src/StepToGeom/StepToGeom.hxx index 24c74d2595..3f0ee8e92b 100644 --- a/src/StepToGeom/StepToGeom.hxx +++ b/src/StepToGeom/StepToGeom.hxx @@ -20,6 +20,7 @@ #include #include #include +#include class Geom_Axis1Placement; class Geom_Axis2Placement; @@ -67,7 +68,6 @@ class Geom2d_VectorWithMagnitude; class gp_Trsf; class gp_Trsf2d; -class StepData_Factors; class StepGeom_Axis1Placement; class StepGeom_Axis2Placement2d; class StepGeom_Axis2Placement3d; @@ -115,94 +115,94 @@ class StepToGeom public: Standard_EXPORT static Handle(Geom_Axis1Placement) MakeAxis1Placement (const Handle(StepGeom_Axis1Placement)& SA, - const StepData_Factors& theLocalFactors); + const StepData_Factors& theLocalFactors = StepData_Factors()); Standard_EXPORT static Handle(Geom_Axis2Placement) MakeAxis2Placement (const Handle(StepGeom_Axis2Placement3d)& SA, - const StepData_Factors& theLocalFactors); + const StepData_Factors& theLocalFactors = StepData_Factors()); Standard_EXPORT static Handle(Geom_Axis2Placement) MakeAxis2Placement (const Handle(StepGeom_SuParameters)& SP); Standard_EXPORT static Handle(Geom2d_AxisPlacement) MakeAxisPlacement (const Handle(StepGeom_Axis2Placement2d)& SA, - const StepData_Factors& theLocalFactors); + const StepData_Factors& theLocalFactors = StepData_Factors()); Standard_EXPORT static Handle(Geom_BoundedCurve) MakeBoundedCurve (const Handle(StepGeom_BoundedCurve)& SC, - const StepData_Factors& theLocalFactors); + const StepData_Factors& theLocalFactors = StepData_Factors()); Standard_EXPORT static Handle(Geom2d_BoundedCurve) MakeBoundedCurve2d (const Handle(StepGeom_BoundedCurve)& SC, - const StepData_Factors& theLocalFactors); + const StepData_Factors& theLocalFactors = StepData_Factors()); Standard_EXPORT static Handle(Geom_BoundedSurface) MakeBoundedSurface (const Handle(StepGeom_BoundedSurface)& SS, - const StepData_Factors& theLocalFactors); + const StepData_Factors& theLocalFactors = StepData_Factors()); Standard_EXPORT static Handle(Geom_BSplineCurve) MakeBSplineCurve (const Handle(StepGeom_BSplineCurve)& SC, - const StepData_Factors& theLocalFactors); + const StepData_Factors& theLocalFactors = StepData_Factors()); Standard_EXPORT static Handle(Geom2d_BSplineCurve) MakeBSplineCurve2d (const Handle(StepGeom_BSplineCurve)& SC, - const StepData_Factors& theLocalFactors); + const StepData_Factors& theLocalFactors = StepData_Factors()); Standard_EXPORT static Handle(Geom_BSplineSurface) MakeBSplineSurface (const Handle(StepGeom_BSplineSurface)& SS, - const StepData_Factors& theLocalFactors); + const StepData_Factors& theLocalFactors = StepData_Factors()); Standard_EXPORT static Handle(Geom_CartesianPoint) MakeCartesianPoint (const Handle(StepGeom_CartesianPoint)& SP, - const StepData_Factors& theLocalFactors); + const StepData_Factors& theLocalFactors = StepData_Factors()); Standard_EXPORT static Handle(Geom2d_CartesianPoint) MakeCartesianPoint2d (const Handle(StepGeom_CartesianPoint)& SP, - const StepData_Factors& theLocalFactors); + const StepData_Factors& theLocalFactors = StepData_Factors()); Standard_EXPORT static Handle(Geom_Circle) MakeCircle (const Handle(StepGeom_Circle)& SC, - const StepData_Factors& theLocalFactors); + const StepData_Factors& theLocalFactors = StepData_Factors()); Standard_EXPORT static Handle(Geom2d_Circle) MakeCircle2d (const Handle(StepGeom_Circle)& SC, - const StepData_Factors& theLocalFactors); + const StepData_Factors& theLocalFactors = StepData_Factors()); Standard_EXPORT static Handle(Geom_Conic) MakeConic (const Handle(StepGeom_Conic)& SC, - const StepData_Factors& theLocalFactors); + const StepData_Factors& theLocalFactors = StepData_Factors()); Standard_EXPORT static Handle(Geom2d_Conic) MakeConic2d (const Handle(StepGeom_Conic)& SC, - const StepData_Factors& theLocalFactors); + const StepData_Factors& theLocalFactors = StepData_Factors()); Standard_EXPORT static Handle(Geom_ConicalSurface) MakeConicalSurface (const Handle(StepGeom_ConicalSurface)& SS, - const StepData_Factors& theLocalFactors); + const StepData_Factors& theLocalFactors = StepData_Factors()); Standard_EXPORT static Handle(Geom_Curve) MakeCurve (const Handle(StepGeom_Curve)& SC, - const StepData_Factors& theLocalFactors); + const StepData_Factors& theLocalFactors = StepData_Factors()); Standard_EXPORT static Handle(Geom2d_Curve) MakeCurve2d (const Handle(StepGeom_Curve)& SC, - const StepData_Factors& theLocalFactors); + const StepData_Factors& theLocalFactors = StepData_Factors()); Standard_EXPORT static Handle(Geom_CylindricalSurface) MakeCylindricalSurface (const Handle(StepGeom_CylindricalSurface)& SS, - const StepData_Factors& theLocalFactors); + const StepData_Factors& theLocalFactors = StepData_Factors()); Standard_EXPORT static Handle(Geom_Direction) MakeDirection (const Handle(StepGeom_Direction)& SD); Standard_EXPORT static Handle(Geom2d_Direction) MakeDirection2d (const Handle(StepGeom_Direction)& SD); Standard_EXPORT static Handle(Geom_ElementarySurface) MakeElementarySurface (const Handle(StepGeom_ElementarySurface)& SS, - const StepData_Factors& theLocalFactors); + const StepData_Factors& theLocalFactors = StepData_Factors()); Standard_EXPORT static Handle(Geom_Ellipse) MakeEllipse (const Handle(StepGeom_Ellipse)& SC, - const StepData_Factors& theLocalFactors); + const StepData_Factors& theLocalFactors = StepData_Factors()); Standard_EXPORT static Handle(Geom2d_Ellipse) MakeEllipse2d (const Handle(StepGeom_Ellipse)& SC, - const StepData_Factors& theLocalFactors); + const StepData_Factors& theLocalFactors = StepData_Factors()); Standard_EXPORT static Handle(Geom_Hyperbola) MakeHyperbola (const Handle(StepGeom_Hyperbola)& SC, - const StepData_Factors& theLocalFactors); + const StepData_Factors& theLocalFactors = StepData_Factors()); Standard_EXPORT static Handle(Geom2d_Hyperbola) MakeHyperbola2d (const Handle(StepGeom_Hyperbola)& SC, - const StepData_Factors& theLocalFactors); + const StepData_Factors& theLocalFactors = StepData_Factors()); Standard_EXPORT static Handle(Geom_Line) MakeLine (const Handle(StepGeom_Line)& SC, - const StepData_Factors& theLocalFactors); + const StepData_Factors& theLocalFactors = StepData_Factors()); Standard_EXPORT static Handle(Geom2d_Line) MakeLine2d (const Handle(StepGeom_Line)& SC, - const StepData_Factors& theLocalFactors); + const StepData_Factors& theLocalFactors = StepData_Factors()); Standard_EXPORT static Handle(Geom_Parabola) MakeParabola (const Handle(StepGeom_Parabola)& SC, - const StepData_Factors& theLocalFactors); + const StepData_Factors& theLocalFactors = StepData_Factors()); Standard_EXPORT static Handle(Geom2d_Parabola) MakeParabola2d (const Handle(StepGeom_Parabola)& SC, - const StepData_Factors& theLocalFactors); + const StepData_Factors& theLocalFactors = StepData_Factors()); Standard_EXPORT static Handle(Geom_Plane) MakePlane (const Handle(StepGeom_Plane)& SP, - const StepData_Factors& theLocalFactors); + const StepData_Factors& theLocalFactors = StepData_Factors()); Standard_EXPORT static Handle(Geom_BSplineCurve) MakePolyline (const Handle(StepGeom_Polyline)& SPL, - const StepData_Factors& theLocalFactors); + const StepData_Factors& theLocalFactors = StepData_Factors()); Standard_EXPORT static Handle(Geom2d_BSplineCurve) MakePolyline2d (const Handle(StepGeom_Polyline)& SPL, - const StepData_Factors& theLocalFactors); + const StepData_Factors& theLocalFactors = StepData_Factors()); Standard_EXPORT static Handle(Geom_RectangularTrimmedSurface) MakeRectangularTrimmedSurface (const Handle(StepGeom_RectangularTrimmedSurface)& SS, - const StepData_Factors& theLocalFactors); + const StepData_Factors& theLocalFactors = StepData_Factors()); Standard_EXPORT static Handle(Geom_SphericalSurface) MakeSphericalSurface (const Handle(StepGeom_SphericalSurface)& SS, - const StepData_Factors& theLocalFactors); + const StepData_Factors& theLocalFactors = StepData_Factors()); Standard_EXPORT static Handle(Geom_Surface) MakeSurface (const Handle(StepGeom_Surface)& SS, - const StepData_Factors& theLocalFactors); + const StepData_Factors& theLocalFactors = StepData_Factors()); Standard_EXPORT static Handle(Geom_SurfaceOfLinearExtrusion) MakeSurfaceOfLinearExtrusion (const Handle(StepGeom_SurfaceOfLinearExtrusion)& SS, - const StepData_Factors& theLocalFactors); + const StepData_Factors& theLocalFactors = StepData_Factors()); Standard_EXPORT static Handle(Geom_SurfaceOfRevolution) MakeSurfaceOfRevolution (const Handle(StepGeom_SurfaceOfRevolution)& SS, - const StepData_Factors& theLocalFactors); + const StepData_Factors& theLocalFactors = StepData_Factors()); Standard_EXPORT static Handle(Geom_SweptSurface) MakeSweptSurface (const Handle(StepGeom_SweptSurface)& SS, - const StepData_Factors& theLocalFactors); + const StepData_Factors& theLocalFactors = StepData_Factors()); Standard_EXPORT static Handle(Geom_ToroidalSurface) MakeToroidalSurface (const Handle(StepGeom_ToroidalSurface)& SS, - const StepData_Factors& theLocalFactors); + const StepData_Factors& theLocalFactors = StepData_Factors()); Standard_EXPORT static Standard_Boolean MakeTransformation2d (const Handle(StepGeom_CartesianTransformationOperator2d)& SCTO, gp_Trsf2d& CT, - const StepData_Factors& theLocalFactors); + const StepData_Factors& theLocalFactors = StepData_Factors()); Standard_EXPORT static Standard_Boolean MakeTransformation3d (const Handle(StepGeom_CartesianTransformationOperator3d)& SCTO, gp_Trsf& CT, - const StepData_Factors& theLocalFactors); + const StepData_Factors& theLocalFactors = StepData_Factors()); Standard_EXPORT static Handle(Geom_TrimmedCurve) MakeTrimmedCurve (const Handle(StepGeom_TrimmedCurve)& SC, - const StepData_Factors& theLocalFactors); + const StepData_Factors& theLocalFactors = StepData_Factors()); Standard_EXPORT static Handle(Geom2d_BSplineCurve) MakeTrimmedCurve2d (const Handle(StepGeom_TrimmedCurve)& SC, - const StepData_Factors& theLocalFactors); + const StepData_Factors& theLocalFactors = StepData_Factors()); Standard_EXPORT static Handle(Geom_VectorWithMagnitude) MakeVectorWithMagnitude (const Handle(StepGeom_Vector)& SV, - const StepData_Factors& theLocalFactors); + const StepData_Factors& theLocalFactors = StepData_Factors()); Standard_EXPORT static Handle(Geom2d_VectorWithMagnitude) MakeVectorWithMagnitude2d (const Handle(StepGeom_Vector)& SV); Standard_EXPORT static Handle(TColStd_HArray1OfReal) MakeYprRotation(const StepKinematics_SpatialRotation& SR, const Handle(StepRepr_GlobalUnitAssignedContext)& theCntxt); }; diff --git a/src/StepToTopoDS/StepToTopoDS_Builder.cxx b/src/StepToTopoDS/StepToTopoDS_Builder.cxx index aabf96b097..49991f88a1 100644 --- a/src/StepToTopoDS/StepToTopoDS_Builder.cxx +++ b/src/StepToTopoDS/StepToTopoDS_Builder.cxx @@ -897,8 +897,8 @@ void StepToTopoDS_Builder::Init(const Handle(StepVisual_TessellatedFace)& theTF, // ============================================================================ void StepToTopoDS_Builder::Init(const Handle(StepVisual_TessellatedSurfaceSet)& theTSS, const Handle(Transfer_TransientProcess)& theTP, - const StepData_Factors& theLocalFactors, - Standard_Boolean& theHasGeom) + Standard_Boolean& theHasGeom, + const StepData_Factors& theLocalFactors) { StepToTopoDS_TranslateFace aTranFace; aTranFace.SetPrecision(Precision()); diff --git a/src/StepToTopoDS/StepToTopoDS_Builder.hxx b/src/StepToTopoDS/StepToTopoDS_Builder.hxx index 4453fb377c..1d77f866d3 100644 --- a/src/StepToTopoDS/StepToTopoDS_Builder.hxx +++ b/src/StepToTopoDS/StepToTopoDS_Builder.hxx @@ -55,41 +55,41 @@ public: Standard_EXPORT void Init (const Handle(StepShape_ManifoldSolidBrep)& theManifoldSolid, const Handle(Transfer_TransientProcess)& theTP, - const StepData_Factors& theLocalFactors, + const StepData_Factors& theLocalFactors = StepData_Factors(), const Message_ProgressRange& theProgress = Message_ProgressRange()); Standard_EXPORT void Init (const Handle(StepShape_BrepWithVoids)& theBRepWithVoids, const Handle(Transfer_TransientProcess)& theTP, - const StepData_Factors& theLocalFactors, + const StepData_Factors& theLocalFactors = StepData_Factors(), const Message_ProgressRange& theProgress = Message_ProgressRange()); Standard_EXPORT void Init (const Handle(StepShape_FacetedBrep)& theFB, const Handle(Transfer_TransientProcess)& theTP, - const StepData_Factors& theLocalFactors, + const StepData_Factors& theLocalFactors = StepData_Factors(), const Message_ProgressRange& theProgress = Message_ProgressRange()); Standard_EXPORT void Init (const Handle(StepShape_FacetedBrepAndBrepWithVoids)& theFBABWV, const Handle(Transfer_TransientProcess)& theTP, - const StepData_Factors& theLocalFactors, + const StepData_Factors& theLocalFactors = StepData_Factors(), const Message_ProgressRange& theProgress = Message_ProgressRange()); Standard_EXPORT void Init (const Handle(StepShape_ShellBasedSurfaceModel)& S, const Handle(Transfer_TransientProcess)& TP, StepToTopoDS_NMTool& NMTool, - const StepData_Factors& theLocalFactors, + const StepData_Factors& theLocalFactors = StepData_Factors(), const Message_ProgressRange& theProgress = Message_ProgressRange()); Standard_EXPORT void Init (const Handle(StepShape_EdgeBasedWireframeModel)& S, const Handle(Transfer_TransientProcess)& TP, - const StepData_Factors& theLocalFactors); + const StepData_Factors& theLocalFactors = StepData_Factors()); Standard_EXPORT void Init (const Handle(StepShape_FaceBasedSurfaceModel)& S, const Handle(Transfer_TransientProcess)& TP, - const StepData_Factors& theLocalFactors); + const StepData_Factors& theLocalFactors = StepData_Factors()); Standard_EXPORT void Init (const Handle(StepShape_GeometricSet)& S, const Handle(Transfer_TransientProcess)& TP, - const StepData_Factors& theLocalFactors, + const StepData_Factors& theLocalFactors = StepData_Factors(), const Handle(Transfer_ActorOfTransientProcess)& RA = NULL, const Standard_Boolean isManifold = Standard_False, const Message_ProgressRange& theProgress = Message_ProgressRange()); @@ -98,26 +98,26 @@ public: const Handle(Transfer_TransientProcess)& theTP, const Standard_Boolean theReadTessellatedWhenNoBRepOnly, Standard_Boolean& theHasGeom, - const StepData_Factors& theLocalFactors, + const StepData_Factors& theLocalFactors = StepData_Factors(), const Message_ProgressRange& theProgress = Message_ProgressRange()); Standard_EXPORT void Init (const Handle(StepVisual_TessellatedShell)& theTSh, const Handle(Transfer_TransientProcess)& theTP, const Standard_Boolean theReadTessellatedWhenNoBRepOnly, Standard_Boolean& theHasGeom, - const StepData_Factors& theLocalFactors, + const StepData_Factors& theLocalFactors = StepData_Factors(), const Message_ProgressRange& theProgress = Message_ProgressRange()); Standard_EXPORT void Init (const Handle(StepVisual_TessellatedFace)& theTF, const Handle(Transfer_TransientProcess)& theTP, const Standard_Boolean theReadTessellatedWhenNoBRepOnly, Standard_Boolean& theHasGeom, - const StepData_Factors& theLocalFactors); + const StepData_Factors& theLocalFactors = StepData_Factors()); Standard_EXPORT void Init (const Handle(StepVisual_TessellatedSurfaceSet)& theTSS, const Handle(Transfer_TransientProcess)& theTP, - const StepData_Factors& theLocalFactors, - Standard_Boolean& theHasGeom); + Standard_Boolean& theHasGeom, + const StepData_Factors& theLocalFactors = StepData_Factors()); Standard_EXPORT const TopoDS_Shape& Value() const; diff --git a/src/StepToTopoDS/StepToTopoDS_MakeTransformed.hxx b/src/StepToTopoDS/StepToTopoDS_MakeTransformed.hxx index 5d70185dde..725a0a1986 100644 --- a/src/StepToTopoDS/StepToTopoDS_MakeTransformed.hxx +++ b/src/StepToTopoDS/StepToTopoDS_MakeTransformed.hxx @@ -25,7 +25,6 @@ #include #include -class StepData_Factors; class StepGeom_Axis2Placement3d; class StepGeom_CartesianTransformationOperator3d; class TopoDS_Shape; @@ -47,11 +46,11 @@ public: //! If not done, the transformation will by Identity Standard_EXPORT Standard_Boolean Compute (const Handle(StepGeom_Axis2Placement3d)& Origin, const Handle(StepGeom_Axis2Placement3d)& Target, - const StepData_Factors& theLocalFactors); + const StepData_Factors& theLocalFactors = StepData_Factors()); //! Computes a transformation defined by an operator 3D Standard_EXPORT Standard_Boolean Compute (const Handle(StepGeom_CartesianTransformationOperator3d)& Operator, - const StepData_Factors& theLocalFactors); + const StepData_Factors& theLocalFactors = StepData_Factors()); //! Returns the computed transformation (Identity if not yet or //! if failed) @@ -73,7 +72,7 @@ public: //! transformed as an instance of this Shape Standard_EXPORT TopoDS_Shape TranslateMappedItem (const Handle(StepRepr_MappedItem)& mapit, const Handle(Transfer_TransientProcess)& TP, - const StepData_Factors& theLocalFactors, + const StepData_Factors& theLocalFactors = StepData_Factors(), const Message_ProgressRange& theProgress = Message_ProgressRange()); diff --git a/src/StepToTopoDS/StepToTopoDS_TranslateCompositeCurve.hxx b/src/StepToTopoDS/StepToTopoDS_TranslateCompositeCurve.hxx index d940a2fe87..1fa50bee77 100644 --- a/src/StepToTopoDS/StepToTopoDS_TranslateCompositeCurve.hxx +++ b/src/StepToTopoDS/StepToTopoDS_TranslateCompositeCurve.hxx @@ -49,26 +49,26 @@ public: //! Translates standalone composite_curve Standard_EXPORT StepToTopoDS_TranslateCompositeCurve(const Handle(StepGeom_CompositeCurve)& CC, const Handle(Transfer_TransientProcess)& TP, - const StepData_Factors& theLocalFactors); + const StepData_Factors& theLocalFactors = StepData_Factors()); //! Translates composite_curve lying on surface Standard_EXPORT StepToTopoDS_TranslateCompositeCurve(const Handle(StepGeom_CompositeCurve)& CC, const Handle(Transfer_TransientProcess)& TP, const Handle(StepGeom_Surface)& S, const Handle(Geom_Surface)& Surf, - const StepData_Factors& theLocalFactors); + const StepData_Factors& theLocalFactors = StepData_Factors()); //! Translates standalone composite_curve Standard_EXPORT Standard_Boolean Init (const Handle(StepGeom_CompositeCurve)& CC, const Handle(Transfer_TransientProcess)& TP, - const StepData_Factors& theLocalFactors); + const StepData_Factors& theLocalFactors = StepData_Factors()); //! Translates composite_curve lying on surface Standard_EXPORT Standard_Boolean Init (const Handle(StepGeom_CompositeCurve)& CC, const Handle(Transfer_TransientProcess)& TP, const Handle(StepGeom_Surface)& S, const Handle(Geom_Surface)& Surf, - const StepData_Factors& theLocalFactors); + const StepData_Factors& theLocalFactors = StepData_Factors()); //! Returns result of last translation or null wire if failed. Standard_EXPORT const TopoDS_Wire& Value() const; diff --git a/src/StepToTopoDS/StepToTopoDS_TranslateCurveBoundedSurface.hxx b/src/StepToTopoDS/StepToTopoDS_TranslateCurveBoundedSurface.hxx index 176177890c..7def7abf3a 100644 --- a/src/StepToTopoDS/StepToTopoDS_TranslateCurveBoundedSurface.hxx +++ b/src/StepToTopoDS/StepToTopoDS_TranslateCurveBoundedSurface.hxx @@ -41,12 +41,12 @@ public: //! Translate surface Standard_EXPORT StepToTopoDS_TranslateCurveBoundedSurface(const Handle(StepGeom_CurveBoundedSurface)& CBS, const Handle(Transfer_TransientProcess)& TP, - const StepData_Factors& theLocalFactors); + const StepData_Factors& theLocalFactors = StepData_Factors()); //! Translate surface Standard_EXPORT Standard_Boolean Init (const Handle(StepGeom_CurveBoundedSurface)& CBS, const Handle(Transfer_TransientProcess)& TP, - const StepData_Factors& theLocalFactors); + const StepData_Factors& theLocalFactors = StepData_Factors()); //! Returns result of last translation or null wire if failed. Standard_EXPORT const TopoDS_Face& Value() const; diff --git a/src/StepToTopoDS/StepToTopoDS_TranslateEdge.hxx b/src/StepToTopoDS/StepToTopoDS_TranslateEdge.hxx index 108e255e46..4ecf5a41a7 100644 --- a/src/StepToTopoDS/StepToTopoDS_TranslateEdge.hxx +++ b/src/StepToTopoDS/StepToTopoDS_TranslateEdge.hxx @@ -24,7 +24,6 @@ #include #include #include -class StepData_Factors; class StepShape_Edge; class StepToTopoDS_Tool; class StepToTopoDS_NMTool; @@ -51,12 +50,12 @@ public: Standard_EXPORT StepToTopoDS_TranslateEdge(const Handle(StepShape_Edge)& E, StepToTopoDS_Tool& T, StepToTopoDS_NMTool& NMTool, - const StepData_Factors& theLocalFactors); + const StepData_Factors& theLocalFactors = StepData_Factors()); Standard_EXPORT void Init (const Handle(StepShape_Edge)& E, StepToTopoDS_Tool& T, StepToTopoDS_NMTool& NMTool, - const StepData_Factors& theLocalFactors); + const StepData_Factors& theLocalFactors = StepData_Factors()); //! Warning! C3D is assumed to be a Curve 3D ... //! other cases to checked before calling this @@ -68,11 +67,11 @@ public: TopoDS_Vertex& V1, TopoDS_Vertex& V2, StepToTopoDS_Tool& T, - const StepData_Factors& theLocalFactors); + const StepData_Factors& theLocalFactors = StepData_Factors()); Standard_EXPORT Handle(Geom2d_Curve) MakePCurve (const Handle(StepGeom_Pcurve)& PCU, const Handle(Geom_Surface)& ConvSurf, - const StepData_Factors& theLocalFactors) const; + const StepData_Factors& theLocalFactors = StepData_Factors()) const; Standard_EXPORT const TopoDS_Shape& Value() const; diff --git a/src/StepToTopoDS/StepToTopoDS_TranslateEdgeLoop.hxx b/src/StepToTopoDS/StepToTopoDS_TranslateEdgeLoop.hxx index d20769cede..b5c106c767 100644 --- a/src/StepToTopoDS/StepToTopoDS_TranslateEdgeLoop.hxx +++ b/src/StepToTopoDS/StepToTopoDS_TranslateEdgeLoop.hxx @@ -49,7 +49,7 @@ public: const Standard_Boolean ss, StepToTopoDS_Tool& T, StepToTopoDS_NMTool& NMTool, - const StepData_Factors& theLocalFactors); + const StepData_Factors& theLocalFactors = StepData_Factors()); Standard_EXPORT void Init (const Handle(StepShape_FaceBound)& FB, const TopoDS_Face& F, @@ -58,7 +58,7 @@ public: const Standard_Boolean ss, StepToTopoDS_Tool& T, StepToTopoDS_NMTool& NMTool, - const StepData_Factors& theLocalFactors); + const StepData_Factors& theLocalFactors = StepData_Factors()); Standard_EXPORT const TopoDS_Shape& Value() const; diff --git a/src/StepToTopoDS/StepToTopoDS_TranslateFace.hxx b/src/StepToTopoDS/StepToTopoDS_TranslateFace.hxx index 865e189ba2..c58b56745d 100644 --- a/src/StepToTopoDS/StepToTopoDS_TranslateFace.hxx +++ b/src/StepToTopoDS/StepToTopoDS_TranslateFace.hxx @@ -25,7 +25,6 @@ #include #include class Poly_Triangulation; -class StepData_Factors; class StepShape_FaceSurface; class StepToTopoDS_Tool; class StepToTopoDS_NMTool; @@ -47,36 +46,36 @@ public: Standard_EXPORT StepToTopoDS_TranslateFace(const Handle(StepShape_FaceSurface)& FS, StepToTopoDS_Tool& T, StepToTopoDS_NMTool& NMTool, - const StepData_Factors& theLocalFactors); + const StepData_Factors& theLocalFactors = StepData_Factors()); Standard_EXPORT StepToTopoDS_TranslateFace(const Handle(StepVisual_TessellatedFace)& theTF, StepToTopoDS_Tool& theTool, StepToTopoDS_NMTool& theNMTool, const Standard_Boolean theReadTessellatedWhenNoBRepOnly, Standard_Boolean& theHasGeom, - const StepData_Factors& theLocalFactors); + const StepData_Factors& theLocalFactors = StepData_Factors()); Standard_EXPORT StepToTopoDS_TranslateFace(const Handle(StepVisual_TessellatedSurfaceSet)& theTSS, StepToTopoDS_Tool& theTool, StepToTopoDS_NMTool& theNMTool, - const StepData_Factors& theLocalFactors); + const StepData_Factors& theLocalFactors = StepData_Factors()); Standard_EXPORT void Init (const Handle(StepShape_FaceSurface)& FS, StepToTopoDS_Tool& T, StepToTopoDS_NMTool& NMTool, - const StepData_Factors& theLocalFactors); + const StepData_Factors& theLocalFactors = StepData_Factors()); Standard_EXPORT void Init (const Handle(StepVisual_TessellatedFace)& theTF, StepToTopoDS_Tool& theTool, StepToTopoDS_NMTool& theNMTool, const Standard_Boolean theReadTessellatedWhenNoBRepOnly, Standard_Boolean& theHasGeom, - const StepData_Factors& theLocalFactors); + const StepData_Factors& theLocalFactors = StepData_Factors()); Standard_EXPORT void Init(const Handle(StepVisual_TessellatedSurfaceSet)& theTSS, StepToTopoDS_Tool& theTool, StepToTopoDS_NMTool& theNMTool, - const StepData_Factors& theLocalFactors); + const StepData_Factors& theLocalFactors = StepData_Factors()); Standard_EXPORT const TopoDS_Shape& Value() const; @@ -85,7 +84,7 @@ public: private: Handle(Poly_Triangulation) createMesh(const Handle(StepVisual_TessellatedItem)& theTI, - const StepData_Factors& theLocalFactors) const; + const StepData_Factors& theLocalFactors = StepData_Factors()) const; StepToTopoDS_TranslateFaceError myError; TopoDS_Shape myResult; diff --git a/src/StepToTopoDS/StepToTopoDS_TranslatePolyLoop.hxx b/src/StepToTopoDS/StepToTopoDS_TranslatePolyLoop.hxx index 4e02ad30ad..415e8f5017 100644 --- a/src/StepToTopoDS/StepToTopoDS_TranslatePolyLoop.hxx +++ b/src/StepToTopoDS/StepToTopoDS_TranslatePolyLoop.hxx @@ -24,7 +24,6 @@ #include #include #include -class StepData_Factors; class StepShape_PolyLoop; class StepToTopoDS_Tool; class Geom_Surface; @@ -45,13 +44,13 @@ public: StepToTopoDS_Tool& T, const Handle(Geom_Surface)& S, const TopoDS_Face& F, - const StepData_Factors& theLocalFactors); + const StepData_Factors& theLocalFactors = StepData_Factors()); Standard_EXPORT void Init (const Handle(StepShape_PolyLoop)& PL, StepToTopoDS_Tool& T, const Handle(Geom_Surface)& S, const TopoDS_Face& F, - const StepData_Factors& theLocalFactors); + const StepData_Factors& theLocalFactors = StepData_Factors()); Standard_EXPORT const TopoDS_Shape& Value() const; diff --git a/src/StepToTopoDS/StepToTopoDS_TranslateShell.hxx b/src/StepToTopoDS/StepToTopoDS_TranslateShell.hxx index f77232b6a1..a7237ee7c3 100644 --- a/src/StepToTopoDS/StepToTopoDS_TranslateShell.hxx +++ b/src/StepToTopoDS/StepToTopoDS_TranslateShell.hxx @@ -44,7 +44,7 @@ public: Standard_EXPORT void Init (const Handle(StepShape_ConnectedFaceSet)& CFS, StepToTopoDS_Tool& T, StepToTopoDS_NMTool& NMTool, - const StepData_Factors& theLocalFactors, + const StepData_Factors& theLocalFactors = StepData_Factors(), const Message_ProgressRange& theProgress = Message_ProgressRange()); Standard_EXPORT void Init (const Handle(StepVisual_TessellatedShell)& theTSh, @@ -52,7 +52,7 @@ public: StepToTopoDS_NMTool& theNMTool, const Standard_Boolean theReadTessellatedWhenNoBRepOnly, Standard_Boolean& theHasGeom, - const StepData_Factors& theLocalFactors, + const StepData_Factors& theLocalFactors = StepData_Factors(), const Message_ProgressRange& theProgress = Message_ProgressRange()); Standard_EXPORT const TopoDS_Shape& Value() const; diff --git a/src/StepToTopoDS/StepToTopoDS_TranslateSolid.hxx b/src/StepToTopoDS/StepToTopoDS_TranslateSolid.hxx index e4f648d475..b88733e8ac 100644 --- a/src/StepToTopoDS/StepToTopoDS_TranslateSolid.hxx +++ b/src/StepToTopoDS/StepToTopoDS_TranslateSolid.hxx @@ -44,7 +44,7 @@ public: StepToTopoDS_NMTool& theNMTool, const Standard_Boolean theReadTessellatedWhenNoBRepOnly, Standard_Boolean& theHasGeom, - const StepData_Factors& theLocalFactors, + const StepData_Factors& theLocalFactors = StepData_Factors(), const Message_ProgressRange& theProgress = Message_ProgressRange()); Standard_EXPORT const TopoDS_Shape& Value() const; diff --git a/src/StepToTopoDS/StepToTopoDS_TranslateVertex.hxx b/src/StepToTopoDS/StepToTopoDS_TranslateVertex.hxx index f14697c484..265dfef413 100644 --- a/src/StepToTopoDS/StepToTopoDS_TranslateVertex.hxx +++ b/src/StepToTopoDS/StepToTopoDS_TranslateVertex.hxx @@ -24,7 +24,6 @@ #include #include #include -class StepData_Factors; class StepShape_Vertex; class StepToTopoDS_Tool; class StepToTopoDS_NMTool; @@ -43,12 +42,12 @@ public: Standard_EXPORT StepToTopoDS_TranslateVertex(const Handle(StepShape_Vertex)& V, StepToTopoDS_Tool& T, StepToTopoDS_NMTool& NMTool, - const StepData_Factors& theLocalFactors); + const StepData_Factors& theLocalFactors = StepData_Factors()); Standard_EXPORT void Init (const Handle(StepShape_Vertex)& V, StepToTopoDS_Tool& T, StepToTopoDS_NMTool& NMTool, - const StepData_Factors& theLocalFactors); + const StepData_Factors& theLocalFactors = StepData_Factors()); Standard_EXPORT const TopoDS_Shape& Value() const; diff --git a/src/StepToTopoDS/StepToTopoDS_TranslateVertexLoop.hxx b/src/StepToTopoDS/StepToTopoDS_TranslateVertexLoop.hxx index cd17991dac..878b65220e 100644 --- a/src/StepToTopoDS/StepToTopoDS_TranslateVertexLoop.hxx +++ b/src/StepToTopoDS/StepToTopoDS_TranslateVertexLoop.hxx @@ -24,7 +24,6 @@ #include #include #include -class StepData_Factors; class StepShape_VertexLoop; class StepToTopoDS_Tool; class StepToTopoDS_NMTool; @@ -43,12 +42,12 @@ public: Standard_EXPORT StepToTopoDS_TranslateVertexLoop(const Handle(StepShape_VertexLoop)& VL, StepToTopoDS_Tool& T, StepToTopoDS_NMTool& NMTool, - const StepData_Factors& theLocalFactors); + const StepData_Factors& theLocalFactors = StepData_Factors()); Standard_EXPORT void Init (const Handle(StepShape_VertexLoop)& VL, StepToTopoDS_Tool& T, StepToTopoDS_NMTool& NMTool, - const StepData_Factors& theLocalFactors); + const StepData_Factors& theLocalFactors = StepData_Factors()); Standard_EXPORT const TopoDS_Shape& Value() const; diff --git a/src/TopoDSToStep/TopoDSToStep_Builder.hxx b/src/TopoDSToStep/TopoDSToStep_Builder.hxx index cd5123b166..ceca05392a 100644 --- a/src/TopoDSToStep/TopoDSToStep_Builder.hxx +++ b/src/TopoDSToStep/TopoDSToStep_Builder.hxx @@ -25,7 +25,6 @@ #include #include -class StepData_Factors; class StepShape_TopologicalRepresentationItem; class StepVisual_TessellatedItem; class TopoDS_Shape; @@ -48,14 +47,14 @@ public: TopoDSToStep_Tool& T, const Handle(Transfer_FinderProcess)& FP, const Standard_Integer theTessellatedGeomParam, - const StepData_Factors& theLocalFactors, + const StepData_Factors& theLocalFactors = StepData_Factors(), const Message_ProgressRange& theProgress = Message_ProgressRange()); Standard_EXPORT void Init (const TopoDS_Shape& S, TopoDSToStep_Tool& T, const Handle(Transfer_FinderProcess)& FP, const Standard_Integer theTessellatedGeomParam, - const StepData_Factors& theLocalFactors, + const StepData_Factors& theLocalFactors = StepData_Factors(), const Message_ProgressRange& theProgress = Message_ProgressRange()); Standard_EXPORT TopoDSToStep_BuilderError Error() const; diff --git a/src/TopoDSToStep/TopoDSToStep_MakeBrepWithVoids.hxx b/src/TopoDSToStep/TopoDSToStep_MakeBrepWithVoids.hxx index bd317c7409..d57f714270 100644 --- a/src/TopoDSToStep/TopoDSToStep_MakeBrepWithVoids.hxx +++ b/src/TopoDSToStep/TopoDSToStep_MakeBrepWithVoids.hxx @@ -44,7 +44,7 @@ public: Standard_EXPORT TopoDSToStep_MakeBrepWithVoids(const TopoDS_Solid& S, const Handle(Transfer_FinderProcess)& FP, - const StepData_Factors& theLocalFactors, + const StepData_Factors& theLocalFactors = StepData_Factors(), const Message_ProgressRange& theProgress = Message_ProgressRange()); Standard_EXPORT const Handle(StepShape_BrepWithVoids)& Value() const; diff --git a/src/TopoDSToStep/TopoDSToStep_MakeFacetedBrep.hxx b/src/TopoDSToStep/TopoDSToStep_MakeFacetedBrep.hxx index 2391b5a55e..fb406f6c13 100644 --- a/src/TopoDSToStep/TopoDSToStep_MakeFacetedBrep.hxx +++ b/src/TopoDSToStep/TopoDSToStep_MakeFacetedBrep.hxx @@ -24,7 +24,6 @@ #include #include -class StepData_Factors; class StepShape_FacetedBrep; class StepVisual_TessellatedItem; class TopoDS_Shell; @@ -46,12 +45,12 @@ public: Standard_EXPORT TopoDSToStep_MakeFacetedBrep(const TopoDS_Shell& S, const Handle(Transfer_FinderProcess)& FP, - const StepData_Factors& theLocalFactors, + const StepData_Factors& theLocalFactors = StepData_Factors(), const Message_ProgressRange& theProgress = Message_ProgressRange()); Standard_EXPORT TopoDSToStep_MakeFacetedBrep(const TopoDS_Solid& S, const Handle(Transfer_FinderProcess)& FP, - const StepData_Factors& theLocalFactors, + const StepData_Factors& theLocalFactors = StepData_Factors(), const Message_ProgressRange& theProgress = Message_ProgressRange()); Standard_EXPORT const Handle(StepShape_FacetedBrep)& Value() const; diff --git a/src/TopoDSToStep/TopoDSToStep_MakeFacetedBrepAndBrepWithVoids.hxx b/src/TopoDSToStep/TopoDSToStep_MakeFacetedBrepAndBrepWithVoids.hxx index e4c67e1dfe..fcf25c7fe7 100644 --- a/src/TopoDSToStep/TopoDSToStep_MakeFacetedBrepAndBrepWithVoids.hxx +++ b/src/TopoDSToStep/TopoDSToStep_MakeFacetedBrepAndBrepWithVoids.hxx @@ -43,7 +43,7 @@ public: Standard_EXPORT TopoDSToStep_MakeFacetedBrepAndBrepWithVoids(const TopoDS_Solid& S, const Handle(Transfer_FinderProcess)& FP, - const StepData_Factors& theLocalFactors, + const StepData_Factors& theLocalFactors = StepData_Factors(), const Message_ProgressRange& theProgress = Message_ProgressRange()); Standard_EXPORT const Handle(StepShape_FacetedBrepAndBrepWithVoids)& Value() const; diff --git a/src/TopoDSToStep/TopoDSToStep_MakeGeometricCurveSet.hxx b/src/TopoDSToStep/TopoDSToStep_MakeGeometricCurveSet.hxx index a204e82a45..cdabdfd61d 100644 --- a/src/TopoDSToStep/TopoDSToStep_MakeGeometricCurveSet.hxx +++ b/src/TopoDSToStep/TopoDSToStep_MakeGeometricCurveSet.hxx @@ -39,7 +39,7 @@ public: Standard_EXPORT TopoDSToStep_MakeGeometricCurveSet(const TopoDS_Shape& SH, const Handle(Transfer_FinderProcess)& FP, - const StepData_Factors& theLocalFactors); + const StepData_Factors& theLocalFactors = StepData_Factors()); Standard_EXPORT const Handle(StepShape_GeometricCurveSet)& Value() const; diff --git a/src/TopoDSToStep/TopoDSToStep_MakeManifoldSolidBrep.hxx b/src/TopoDSToStep/TopoDSToStep_MakeManifoldSolidBrep.hxx index 9edb3c59b0..05f76c6ce6 100644 --- a/src/TopoDSToStep/TopoDSToStep_MakeManifoldSolidBrep.hxx +++ b/src/TopoDSToStep/TopoDSToStep_MakeManifoldSolidBrep.hxx @@ -24,7 +24,6 @@ #include #include -class StepData_Factors; class StepShape_ManifoldSolidBrep; class StepVisual_TessellatedItem; class TopoDS_Shell; @@ -45,12 +44,12 @@ public: Standard_EXPORT TopoDSToStep_MakeManifoldSolidBrep(const TopoDS_Shell& S, const Handle(Transfer_FinderProcess)& FP, - const StepData_Factors& theLocalFactors, + const StepData_Factors& theLocalFactors = StepData_Factors(), const Message_ProgressRange& theProgress = Message_ProgressRange()); Standard_EXPORT TopoDSToStep_MakeManifoldSolidBrep(const TopoDS_Solid& S, const Handle(Transfer_FinderProcess)& FP, - const StepData_Factors& theLocalFactors, + const StepData_Factors& theLocalFactors = StepData_Factors(), const Message_ProgressRange& theProgress = Message_ProgressRange()); Standard_EXPORT const Handle(StepShape_ManifoldSolidBrep)& Value() const; diff --git a/src/TopoDSToStep/TopoDSToStep_MakeShellBasedSurfaceModel.hxx b/src/TopoDSToStep/TopoDSToStep_MakeShellBasedSurfaceModel.hxx index 78971c5e76..d27251c941 100644 --- a/src/TopoDSToStep/TopoDSToStep_MakeShellBasedSurfaceModel.hxx +++ b/src/TopoDSToStep/TopoDSToStep_MakeShellBasedSurfaceModel.hxx @@ -45,17 +45,17 @@ public: Standard_EXPORT TopoDSToStep_MakeShellBasedSurfaceModel(const TopoDS_Face& F, const Handle(Transfer_FinderProcess)& FP, - const StepData_Factors& theLocalFactors, + const StepData_Factors& theLocalFactors = StepData_Factors(), const Message_ProgressRange& theProgress = Message_ProgressRange()); Standard_EXPORT TopoDSToStep_MakeShellBasedSurfaceModel(const TopoDS_Shell& S, const Handle(Transfer_FinderProcess)& FP, - const StepData_Factors& theLocalFactors, + const StepData_Factors& theLocalFactors = StepData_Factors(), const Message_ProgressRange& theProgress = Message_ProgressRange()); Standard_EXPORT TopoDSToStep_MakeShellBasedSurfaceModel(const TopoDS_Solid& S, const Handle(Transfer_FinderProcess)& FP, - const StepData_Factors& theLocalFactors, + const StepData_Factors& theLocalFactors = StepData_Factors(), const Message_ProgressRange& theProgress = Message_ProgressRange()); Standard_EXPORT const Handle(StepShape_ShellBasedSurfaceModel)& Value() const; diff --git a/src/TopoDSToStep/TopoDSToStep_MakeStepEdge.hxx b/src/TopoDSToStep/TopoDSToStep_MakeStepEdge.hxx index 5b8b2aadc3..889a2d64d2 100644 --- a/src/TopoDSToStep/TopoDSToStep_MakeStepEdge.hxx +++ b/src/TopoDSToStep/TopoDSToStep_MakeStepEdge.hxx @@ -23,7 +23,6 @@ #include #include -class StepData_Factors; class StepShape_TopologicalRepresentationItem; class TopoDS_Edge; class TopoDSToStep_Tool; @@ -45,12 +44,12 @@ public: Standard_EXPORT TopoDSToStep_MakeStepEdge(const TopoDS_Edge& E, TopoDSToStep_Tool& T, const Handle(Transfer_FinderProcess)& FP, - const StepData_Factors& theLocalFactors); + const StepData_Factors& theLocalFactors = StepData_Factors()); Standard_EXPORT void Init (const TopoDS_Edge& E, TopoDSToStep_Tool& T, const Handle(Transfer_FinderProcess)& FP, - const StepData_Factors& theLocalFactors); + const StepData_Factors& theLocalFactors = StepData_Factors()); Standard_EXPORT const Handle(StepShape_TopologicalRepresentationItem)& Value() const; diff --git a/src/TopoDSToStep/TopoDSToStep_MakeStepFace.hxx b/src/TopoDSToStep/TopoDSToStep_MakeStepFace.hxx index 9a3a8c9e17..03ba81f2b5 100644 --- a/src/TopoDSToStep/TopoDSToStep_MakeStepFace.hxx +++ b/src/TopoDSToStep/TopoDSToStep_MakeStepFace.hxx @@ -23,7 +23,6 @@ #include #include -class StepData_Factors; class StepShape_TopologicalRepresentationItem; class TopoDS_Face; class TopoDSToStep_Tool; @@ -45,12 +44,12 @@ public: Standard_EXPORT TopoDSToStep_MakeStepFace(const TopoDS_Face& F, TopoDSToStep_Tool& T, const Handle(Transfer_FinderProcess)& FP, - const StepData_Factors& theLocalFactors); + const StepData_Factors& theLocalFactors = StepData_Factors()); Standard_EXPORT void Init (const TopoDS_Face& F, TopoDSToStep_Tool& T, const Handle(Transfer_FinderProcess)& FP, - const StepData_Factors& theLocalFactors); + const StepData_Factors& theLocalFactors = StepData_Factors()); Standard_EXPORT const Handle(StepShape_TopologicalRepresentationItem)& Value() const; diff --git a/src/TopoDSToStep/TopoDSToStep_MakeStepVertex.hxx b/src/TopoDSToStep/TopoDSToStep_MakeStepVertex.hxx index 08152b0f87..54fe98d160 100644 --- a/src/TopoDSToStep/TopoDSToStep_MakeStepVertex.hxx +++ b/src/TopoDSToStep/TopoDSToStep_MakeStepVertex.hxx @@ -44,12 +44,12 @@ public: Standard_EXPORT TopoDSToStep_MakeStepVertex(const TopoDS_Vertex& V, TopoDSToStep_Tool& T, const Handle(Transfer_FinderProcess)& FP, - const StepData_Factors& theLocalFactors); + const StepData_Factors& theLocalFactors = StepData_Factors()); Standard_EXPORT void Init (const TopoDS_Vertex& V, TopoDSToStep_Tool& T, const Handle(Transfer_FinderProcess)& FP, - const StepData_Factors& theLocalFactors); + const StepData_Factors& theLocalFactors = StepData_Factors()); Standard_EXPORT const Handle(StepShape_TopologicalRepresentationItem)& Value() const; diff --git a/src/TopoDSToStep/TopoDSToStep_MakeStepWire.hxx b/src/TopoDSToStep/TopoDSToStep_MakeStepWire.hxx index 2a59599b00..8a07277fce 100644 --- a/src/TopoDSToStep/TopoDSToStep_MakeStepWire.hxx +++ b/src/TopoDSToStep/TopoDSToStep_MakeStepWire.hxx @@ -44,12 +44,12 @@ public: Standard_EXPORT TopoDSToStep_MakeStepWire(const TopoDS_Wire& W, TopoDSToStep_Tool& T, const Handle(Transfer_FinderProcess)& FP, - const StepData_Factors& theLocalFactors); + const StepData_Factors& theLocalFactors = StepData_Factors()); Standard_EXPORT void Init (const TopoDS_Wire& W, TopoDSToStep_Tool& T, const Handle(Transfer_FinderProcess)& FP, - const StepData_Factors& theLocalFactors); + const StepData_Factors& theLocalFactors = StepData_Factors()); Standard_EXPORT const Handle(StepShape_TopologicalRepresentationItem)& Value() const; diff --git a/src/TopoDSToStep/TopoDSToStep_WireframeBuilder.hxx b/src/TopoDSToStep/TopoDSToStep_WireframeBuilder.hxx index 16936a2ae1..ad829c8be4 100644 --- a/src/TopoDSToStep/TopoDSToStep_WireframeBuilder.hxx +++ b/src/TopoDSToStep/TopoDSToStep_WireframeBuilder.hxx @@ -25,7 +25,6 @@ #include #include #include -class StepData_Factors; class TopoDS_Shape; class TopoDSToStep_Tool; class Transfer_FinderProcess; @@ -46,11 +45,11 @@ public: Standard_EXPORT TopoDSToStep_WireframeBuilder(const TopoDS_Shape& S, TopoDSToStep_Tool& T, - const StepData_Factors& theLocalFactors); + const StepData_Factors& theLocalFactors = StepData_Factors()); Standard_EXPORT void Init (const TopoDS_Shape& S, TopoDSToStep_Tool& T, - const StepData_Factors& theLocalFactors); + const StepData_Factors& theLocalFactors = StepData_Factors()); Standard_EXPORT TopoDSToStep_BuilderError Error() const; @@ -62,21 +61,21 @@ public: const TopoDS_Face& F, MoniTool_DataMapOfShapeTransient& M, Handle(TColStd_HSequenceOfTransient)& L, - const StepData_Factors& theLocalFactors) const; + const StepData_Factors& theLocalFactors = StepData_Factors()) const; //! Extraction of Trimmed Curves from TopoDS_Face for the //! Creation of a GeometricallyBoundedWireframeRepresentation Standard_EXPORT Standard_Boolean GetTrimmedCurveFromFace (const TopoDS_Face& F, MoniTool_DataMapOfShapeTransient& M, Handle(TColStd_HSequenceOfTransient)& L, - const StepData_Factors& theLocalFactors) const; + const StepData_Factors& theLocalFactors = StepData_Factors()) const; //! Extraction of Trimmed Curves from any TopoDS_Shape for the //! Creation of a GeometricallyBoundedWireframeRepresentation Standard_EXPORT Standard_Boolean GetTrimmedCurveFromShape (const TopoDS_Shape& S, MoniTool_DataMapOfShapeTransient& M, Handle(TColStd_HSequenceOfTransient)& L, - const StepData_Factors& theLocalFactors) const; + const StepData_Factors& theLocalFactors = StepData_Factors()) const; From cb290cc932e533628a2cdfcfbbbfe1f0883821b5 Mon Sep 17 00:00:00 2001 From: vglukhik Date: Mon, 15 Jan 2024 15:15:41 +0000 Subject: [PATCH 536/639] Revert "0033551: Visualization - Add new transform persistence mode to force orthographic projection on object." This reverts commit 0141024df595cdc8db3004927ca48c249776603b. --- src/Graphic3d/Graphic3d_TransModeFlags.hxx | 7 -- src/Graphic3d/Graphic3d_TransformPers.hxx | 119 +++++++----------- src/SelectMgr/SelectMgr_AxisIntersector.cxx | 18 --- src/SelectMgr/SelectMgr_AxisIntersector.hxx | 5 - src/SelectMgr/SelectMgr_BaseIntersector.hxx | 5 - .../SelectMgr_RectangularFrustum.cxx | 22 ---- .../SelectMgr_RectangularFrustum.hxx | 7 -- .../SelectMgr_SelectableObjectSet.cxx | 87 +++---------- .../SelectMgr_SelectableObjectSet.hxx | 29 +---- .../SelectMgr_SelectingVolumeManager.cxx | 22 ---- .../SelectMgr_SelectingVolumeManager.hxx | 5 - src/SelectMgr/SelectMgr_TriangularFrustum.cxx | 14 --- src/SelectMgr/SelectMgr_TriangularFrustum.hxx | 7 -- .../SelectMgr_TriangularFrustumSet.cxx | 26 ---- .../SelectMgr_TriangularFrustumSet.hxx | 7 -- src/SelectMgr/SelectMgr_ViewerSelector.cxx | 36 ++---- src/SelectMgr/SelectMgr_ViewerSelector.hxx | 2 +- src/ViewerTest/ViewerTest.cxx | 71 ++++------- src/ViewerTest/ViewerTest_ViewerCommands.cxx | 7 -- tests/v3d/viewcube/orthopers | 37 ------ 20 files changed, 104 insertions(+), 429 deletions(-) delete mode 100644 tests/v3d/viewcube/orthopers diff --git a/src/Graphic3d/Graphic3d_TransModeFlags.hxx b/src/Graphic3d/Graphic3d_TransModeFlags.hxx index 0c9f329362..2246541d8f 100644 --- a/src/Graphic3d/Graphic3d_TransModeFlags.hxx +++ b/src/Graphic3d/Graphic3d_TransModeFlags.hxx @@ -25,15 +25,8 @@ enum Graphic3d_TransModeFlags Graphic3d_TMF_TriedronPers = 0x0020, //!< object behaves like trihedron - it is fixed at the corner of view and does not resizing (but rotating) Graphic3d_TMF_2d = 0x0040, //!< object is defined in 2D screen coordinates (pixels) and does not resize, pan and rotate Graphic3d_TMF_CameraPers = 0x0080, //!< object is in front of the camera - Graphic3d_TMF_OrthoPers = 0x0100, //!< object is forced to be rendered with orthographic projection. Graphic3d_TMF_ZoomRotatePers = Graphic3d_TMF_ZoomPers | Graphic3d_TMF_RotatePers //!< object doesn't resize and rotate }; -//! Bitwise OR operator for transform persistence mode flags. Be aware that some flags combinations are not valid. -inline Graphic3d_TransModeFlags operator| (Graphic3d_TransModeFlags a, Graphic3d_TransModeFlags b) -{ - return static_cast (static_cast (a) | static_cast (b)); -} - #endif diff --git a/src/Graphic3d/Graphic3d_TransformPers.hxx b/src/Graphic3d/Graphic3d_TransformPers.hxx index d0f70ba64c..f9d9b60940 100644 --- a/src/Graphic3d/Graphic3d_TransformPers.hxx +++ b/src/Graphic3d/Graphic3d_TransformPers.hxx @@ -58,12 +58,6 @@ public: return (theMode & (Graphic3d_TMF_TriedronPers | Graphic3d_TMF_2d)) != 0; } - //! Return true if specified mode is orthographic projection transformation persistence. - static Standard_Boolean IsOrthoPers (Graphic3d_TransModeFlags theMode) - { - return (theMode & Graphic3d_TMF_OrthoPers) != 0; - } - public: //! Set transformation persistence. @@ -116,9 +110,6 @@ public: //! Return true for Graphic3d_TMF_TriedronPers and Graphic3d_TMF_2d modes. Standard_Boolean IsTrihedronOr2d() const { return IsTrihedronOr2d (myMode); } - //! Return true for Graphic3d_TMF_OrthoPers mode. - Standard_Boolean IsOrthoPers () const { return IsOrthoPers (myMode); } - //! Transformation persistence mode flags. Graphic3d_TransModeFlags Mode() const { return myMode; } @@ -306,32 +297,28 @@ public: //! @param theWorldView [in] the world view transformation matrix. //! @param theViewportWidth [in] the width of viewport (for 2d persistence). //! @param theViewportHeight [in] the height of viewport (for 2d persistence). - //! @param theToApplyProjPers [in] if should apply projection persistence to matrix (for orthographic persistence). //! @return transformation matrix to be applied to model world transformation of an object. template NCollection_Mat4 Compute (const Handle(Graphic3d_Camera)& theCamera, const NCollection_Mat4& theProjection, const NCollection_Mat4& theWorldView, const Standard_Integer theViewportWidth, - const Standard_Integer theViewportHeight, - const Standard_Boolean theToApplyProjPers = false) const; + const Standard_Integer theViewportHeight) const; //! Apply transformation persistence on specified matrices. - //! @param theCamera [in] camera definition - //! @param theProjection [in] projection matrix to modify - //! @param theWorldView [in/out] world-view matrix to modify - //! @param theViewportWidth [in] viewport width - //! @param theViewportHeight [in] viewport height - //! @param theAnchor [in] if not NULL, overrides anchor point - //! @param theToApplyProjPers [in] if should apply projection persistence to matrix (for orthographic persistence). + //! @param theCamera camera definition + //! @param theProjection projection matrix to modify + //! @param theWorldView world-view matrix to modify + //! @param theViewportWidth viewport width + //! @param theViewportHeight viewport height + //! @param theAnchor if not NULL, overrides anchor point template void Apply (const Handle(Graphic3d_Camera)& theCamera, const NCollection_Mat4& theProjection, NCollection_Mat4& theWorldView, const Standard_Integer theViewportWidth, const Standard_Integer theViewportHeight, - const gp_Pnt* theAnchor = NULL, - const Standard_Boolean theToApplyProjPers = true) const; + const gp_Pnt* theAnchor = NULL) const; //! Dumps the content of me into the stream Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const; @@ -381,50 +368,41 @@ void Graphic3d_TransformPers::Apply (const Handle(Graphic3d_Camera)& theCamera, NCollection_Mat4& theWorldView, const Standard_Integer theViewportWidth, const Standard_Integer theViewportHeight, - const gp_Pnt* theAnchor, - const Standard_Boolean theToApplyProjPers) const + const gp_Pnt* theAnchor) const { (void )theViewportWidth; + (void )theProjection; if (myMode == Graphic3d_TMF_None || theViewportHeight == 0) { return; } - Handle(Graphic3d_Camera) aCamera = theCamera; - if (IsOrthoPers() && !aCamera->IsOrthographic()) - { - aCamera = new Graphic3d_Camera(*theCamera); // If OrthoPers, copy camera and set to orthographic projection - aCamera->SetProjectionType (Graphic3d_Camera::Projection_Orthographic); - } - - NCollection_Mat4 aWorldView = aCamera->OrientationMatrix(); - // use total size when tiling is active - const Standard_Integer aVPSizeY = aCamera->Tile().IsValid() ? aCamera->Tile().TotalSize.y() : theViewportHeight; + const Standard_Integer aVPSizeY = theCamera->Tile().IsValid() ? theCamera->Tile().TotalSize.y() : theViewportHeight; // a small enough jitter compensation offset // to avoid image dragging within single pixel in corner cases const Standard_Real aJitterComp = 0.001; - if ((myMode & Graphic3d_TMF_TriedronPers) != 0) + if (myMode == Graphic3d_TMF_TriedronPers) { // reset Z focus for trihedron persistence - const Standard_Real aFocus = aCamera->IsOrthographic() - ? aCamera->Distance() - : (aCamera->ZFocusType() == Graphic3d_Camera::FocusType_Relative - ? Standard_Real(aCamera->ZFocus() * aCamera->Distance()) - : Standard_Real(aCamera->ZFocus())); + const Standard_Real aFocus = theCamera->IsOrthographic() + ? theCamera->Distance() + : (theCamera->ZFocusType() == Graphic3d_Camera::FocusType_Relative + ? Standard_Real(theCamera->ZFocus() * theCamera->Distance()) + : Standard_Real(theCamera->ZFocus())); // scale factor to pixels - const gp_XYZ aViewDim = aCamera->ViewDimensions (aFocus); + const gp_XYZ aViewDim = theCamera->ViewDimensions (aFocus); const Standard_Real aScale = Abs(aViewDim.Y()) / Standard_Real(aVPSizeY); - const gp_Dir aForward = aCamera->Direction(); - gp_XYZ aCenter = aCamera->Center().XYZ() + aForward.XYZ() * (aFocus - aCamera->Distance()); + const gp_Dir aForward = theCamera->Direction(); + gp_XYZ aCenter = theCamera->Center().XYZ() + aForward.XYZ() * (aFocus - theCamera->Distance()); if ((myParams.Params2d.Corner & (Aspect_TOTP_LEFT | Aspect_TOTP_RIGHT)) != 0) { const Standard_Real anOffsetX = (Standard_Real(myParams.Params2d.OffsetX) + aJitterComp) * aScale; - const gp_Dir aSide = aForward.Crossed (aCamera->Up()); - const gp_XYZ aDeltaX = aSide.XYZ() * (Abs(aViewDim.X()) * aCamera->NDC2dOffsetX() - anOffsetX); + const gp_Dir aSide = aForward.Crossed (theCamera->Up()); + const gp_XYZ aDeltaX = aSide.XYZ() * (Abs(aViewDim.X()) * theCamera->NDC2dOffsetX() - anOffsetX); if ((myParams.Params2d.Corner & Aspect_TOTP_RIGHT) != 0) { aCenter += aDeltaX; @@ -437,7 +415,7 @@ void Graphic3d_TransformPers::Apply (const Handle(Graphic3d_Camera)& theCamera, if ((myParams.Params2d.Corner & (Aspect_TOTP_TOP | Aspect_TOTP_BOTTOM)) != 0) { const Standard_Real anOffsetY = (Standard_Real(myParams.Params2d.OffsetY) + aJitterComp) * aScale; - const gp_XYZ aDeltaY = aCamera->Up().XYZ() * (Abs(aViewDim.Y()) * aCamera->NDC2dOffsetY() - anOffsetY); + const gp_XYZ aDeltaY = theCamera->Up().XYZ() * (Abs(aViewDim.Y()) * theCamera->NDC2dOffsetY() - anOffsetY); if ((myParams.Params2d.Corner & Aspect_TOTP_TOP) != 0) { aCenter += aDeltaY; @@ -448,24 +426,27 @@ void Graphic3d_TransformPers::Apply (const Handle(Graphic3d_Camera)& theCamera, } } + NCollection_Mat4 aWorldView = theCamera->OrientationMatrix(); Graphic3d_TransformUtils::Translate (aWorldView, aCenter.X(), aCenter.Y(), aCenter.Z()); Graphic3d_TransformUtils::Scale (aWorldView, aScale, aScale, aScale); + theWorldView.ConvertFrom (aWorldView); + return; } - else if ((myMode & Graphic3d_TMF_2d) != 0) + else if (myMode == Graphic3d_TMF_2d) { - const Standard_Real aFocus = aCamera->IsOrthographic() - ? aCamera->Distance() - : (aCamera->ZFocusType() == Graphic3d_Camera::FocusType_Relative - ? Standard_Real(aCamera->ZFocus() * aCamera->Distance()) - : Standard_Real(aCamera->ZFocus())); + const Standard_Real aFocus = theCamera->IsOrthographic() + ? theCamera->Distance() + : (theCamera->ZFocusType() == Graphic3d_Camera::FocusType_Relative + ? Standard_Real(theCamera->ZFocus() * theCamera->Distance()) + : Standard_Real(theCamera->ZFocus())); // scale factor to pixels - const gp_XYZ aViewDim = aCamera->ViewDimensions (aFocus); + const gp_XYZ aViewDim = theCamera->ViewDimensions (aFocus); const Standard_Real aScale = Abs(aViewDim.Y()) / Standard_Real(aVPSizeY); gp_XYZ aCenter (0.0, 0.0, -aFocus); if ((myParams.Params2d.Corner & (Aspect_TOTP_LEFT | Aspect_TOTP_RIGHT)) != 0) { - aCenter.SetX (-aViewDim.X() * aCamera->NDC2dOffsetX() + (Standard_Real(myParams.Params2d.OffsetX) + aJitterComp) * aScale); + aCenter.SetX (-aViewDim.X() * theCamera->NDC2dOffsetX() + (Standard_Real(myParams.Params2d.OffsetX) + aJitterComp) * aScale); if ((myParams.Params2d.Corner & Aspect_TOTP_RIGHT) != 0) { aCenter.SetX (-aCenter.X()); @@ -473,24 +454,26 @@ void Graphic3d_TransformPers::Apply (const Handle(Graphic3d_Camera)& theCamera, } if ((myParams.Params2d.Corner & (Aspect_TOTP_TOP | Aspect_TOTP_BOTTOM)) != 0) { - aCenter.SetY (-aViewDim.Y() * aCamera->NDC2dOffsetY() + (Standard_Real(myParams.Params2d.OffsetY) + aJitterComp) * aScale); + aCenter.SetY (-aViewDim.Y() * theCamera->NDC2dOffsetY() + (Standard_Real(myParams.Params2d.OffsetY) + aJitterComp) * aScale); if ((myParams.Params2d.Corner & Aspect_TOTP_TOP) != 0) { aCenter.SetY (-aCenter.Y()); } } - aWorldView.InitIdentity(); - Graphic3d_TransformUtils::Translate (aWorldView, aCenter.X(), aCenter.Y(), aCenter.Z()); - Graphic3d_TransformUtils::Scale (aWorldView, aScale, aScale, aScale); + theWorldView.InitIdentity(); + Graphic3d_TransformUtils::Translate (theWorldView, T(aCenter.X()), T(aCenter.Y()), T(aCenter.Z())); + Graphic3d_TransformUtils::Scale (theWorldView, T(aScale), T(aScale), T(aScale)); + return; } else if ((myMode & Graphic3d_TMF_CameraPers) != 0) { - aWorldView.InitIdentity(); + theWorldView.InitIdentity(); } else { // Compute reference point for transformation in untransformed projection space. + NCollection_Mat4 aWorldView = theCamera->OrientationMatrix(); if (theAnchor != NULL) { Graphic3d_TransformUtils::Translate (aWorldView, theAnchor->X(), theAnchor->Y(), theAnchor->Z()); @@ -520,19 +503,12 @@ void Graphic3d_TransformPers::Apply (const Handle(Graphic3d_Camera)& theCamera, if ((myMode & Graphic3d_TMF_ZoomPers) != 0) { // lock zooming - Standard_Real aScale = persistentScale (aCamera, theViewportWidth, theViewportHeight); + Standard_Real aScale = persistentScale (theCamera, theViewportWidth, theViewportHeight); Graphic3d_TransformUtils::Scale (aWorldView, aScale, aScale, aScale); } + theWorldView.ConvertFrom (aWorldView); + return; } - - if (!theCamera->IsOrthographic() && IsOrthoPers() && theToApplyProjPers) - { - Graphic3d_Mat4d aProjInv; - aProjInv.ConvertFrom (theProjection.Inverted()); - aWorldView = (aProjInv * aCamera->ProjectionMatrix()) * aWorldView; - } - - theWorldView.ConvertFrom (aWorldView); } // ======================================================================= @@ -579,7 +555,7 @@ void Graphic3d_TransformPers::Apply (const Handle(Graphic3d_Camera)& theCamera, const Standard_Integer theViewportHeight, BVH_Box& theBoundingBox) const { - NCollection_Mat4 aTPers = Compute (theCamera, theProjection, theWorldView, theViewportWidth, theViewportHeight, false); + NCollection_Mat4 aTPers = Compute (theCamera, theProjection, theWorldView, theViewportWidth, theViewportHeight); if (aTPers.IsIdentity() || !theBoundingBox.IsValid()) { @@ -618,8 +594,7 @@ NCollection_Mat4 Graphic3d_TransformPers::Compute (const Handle(Graphic3d_Cam const NCollection_Mat4& theProjection, const NCollection_Mat4& theWorldView, const Standard_Integer theViewportWidth, - const Standard_Integer theViewportHeight, - const Standard_Boolean theToApplyProjPers) const + const Standard_Integer theViewportHeight) const { if (myMode == Graphic3d_TMF_None) { @@ -635,7 +610,7 @@ NCollection_Mat4 Graphic3d_TransformPers::Compute (const Handle(Graphic3d_Cam // compute only world-view matrix difference to avoid floating point instability // caused by projection matrix modifications outside of this algorithm (e.g. by Z-fit) - Apply (theCamera, theProjection, aWorldView, theViewportWidth, theViewportHeight, NULL, theToApplyProjPers); + Apply (theCamera, theProjection, aWorldView, theViewportWidth, theViewportHeight); return anUnviewMat * aWorldView; } diff --git a/src/SelectMgr/SelectMgr_AxisIntersector.cxx b/src/SelectMgr/SelectMgr_AxisIntersector.cxx index 0fc6438345..44ff25b752 100644 --- a/src/SelectMgr/SelectMgr_AxisIntersector.cxx +++ b/src/SelectMgr/SelectMgr_AxisIntersector.cxx @@ -93,24 +93,6 @@ Handle(SelectMgr_BaseIntersector) SelectMgr_AxisIntersector::ScaleAndTransform ( return aRes; } -//======================================================================= -// function : CopyWithBuilder -// purpose : Returns a copy of the frustum using the given frustum builder configuration. -// Returned frustum should be re-constructed before being used. -//======================================================================= -Handle(SelectMgr_BaseIntersector) SelectMgr_AxisIntersector::CopyWithBuilder (const Handle(SelectMgr_FrustumBuilder)& theBuilder) const -{ - (void )theBuilder; - Standard_ASSERT_RAISE(mySelectionType == SelectMgr_SelectionType_Point, - "Error! SelectMgr_AxisIntersector::CopyWithBuilder() should be called after selection axis initialization"); - - Handle(SelectMgr_AxisIntersector) aRes = new SelectMgr_AxisIntersector(); - aRes->myAxis = myAxis; - aRes->mySelectionType = mySelectionType; - - return aRes; -} - // ======================================================================= // function : hasIntersection // purpose : diff --git a/src/SelectMgr/SelectMgr_AxisIntersector.hxx b/src/SelectMgr/SelectMgr_AxisIntersector.hxx index bd225bf735..6a6b60bc09 100644 --- a/src/SelectMgr/SelectMgr_AxisIntersector.hxx +++ b/src/SelectMgr/SelectMgr_AxisIntersector.hxx @@ -52,11 +52,6 @@ public: const gp_GTrsf& theTrsf, const Handle(SelectMgr_FrustumBuilder)& theBuilder) const Standard_OVERRIDE; - //! Returns a copy of the intersector transformed using the builder configuration given. - //! Builder is an argument that represents corresponding settings for re-constructing transformed frustum from scratch. - //! In this class, builder is not used and theBuilder parameter is ignored. - Standard_EXPORT virtual Handle(SelectMgr_BaseIntersector) CopyWithBuilder (const Handle(SelectMgr_FrustumBuilder)& theBuilder) const Standard_OVERRIDE; - public: //! Intersection test between defined axis and given axis-aligned box diff --git a/src/SelectMgr/SelectMgr_BaseIntersector.hxx b/src/SelectMgr/SelectMgr_BaseIntersector.hxx index e35f04d939..e9bd50edfc 100644 --- a/src/SelectMgr/SelectMgr_BaseIntersector.hxx +++ b/src/SelectMgr/SelectMgr_BaseIntersector.hxx @@ -71,11 +71,6 @@ public: const gp_GTrsf& theTrsf, const Handle(SelectMgr_FrustumBuilder)& theBuilder) const = 0; - //! @param theBuilder [in] argument that represents corresponding settings for re-constructing transformed frustum from scratch; - //! should NOT be NULL. - //! @return a copy of the frustum with the input builder assigned - virtual Handle(SelectMgr_BaseIntersector) CopyWithBuilder (const Handle(SelectMgr_FrustumBuilder)& theBuilder) const = 0; - public: //! Return camera definition. diff --git a/src/SelectMgr/SelectMgr_RectangularFrustum.cxx b/src/SelectMgr/SelectMgr_RectangularFrustum.cxx index 6ae92c1a0b..0031c5f275 100644 --- a/src/SelectMgr/SelectMgr_RectangularFrustum.cxx +++ b/src/SelectMgr/SelectMgr_RectangularFrustum.cxx @@ -449,28 +449,6 @@ Handle(SelectMgr_BaseIntersector) SelectMgr_RectangularFrustum::ScaleAndTransfor return aRes; } -// ======================================================================= -// function : CopyWithBuilder -// purpose : Returns a copy of the frustum using the given frustum builder configuration. -// Returned frustum should be re-constructed before being used. -// ======================================================================= -Handle(SelectMgr_BaseIntersector) SelectMgr_RectangularFrustum::CopyWithBuilder (const Handle(SelectMgr_FrustumBuilder)& theBuilder) const -{ - Standard_ASSERT_RAISE (mySelectionType == SelectMgr_SelectionType_Point || mySelectionType == SelectMgr_SelectionType_Box, - "Error! SelectMgr_RectangularFrustum::CopyWithBuilder() should be called after selection frustum initialization"); - - Standard_ASSERT_RAISE (!theBuilder.IsNull(), - "Error! SelectMgr_RectangularFrustum::CopyWithBuilder() should be called with valid builder"); - - Handle(SelectMgr_RectangularFrustum) aRes = new SelectMgr_RectangularFrustum(); - aRes->mySelectionType = mySelectionType; - aRes->mySelRectangle = mySelRectangle; - aRes->myPixelTolerance = myPixelTolerance; - aRes->SetBuilder (theBuilder); - - return aRes; -} - // ======================================================================= // function : IsScalable // purpose : diff --git a/src/SelectMgr/SelectMgr_RectangularFrustum.hxx b/src/SelectMgr/SelectMgr_RectangularFrustum.hxx index 4db8c2644e..bcebbb626b 100644 --- a/src/SelectMgr/SelectMgr_RectangularFrustum.hxx +++ b/src/SelectMgr/SelectMgr_RectangularFrustum.hxx @@ -99,13 +99,6 @@ public: const gp_GTrsf& theTrsf, const Handle(SelectMgr_FrustumBuilder)& theBuilder) const Standard_OVERRIDE; - //! Returns a copy of the frustum using the given frustum builder configuration. - //! Returned frustum should be re-constructed before being used. - //! @param theBuilder [in] argument that represents corresponding settings for re-constructing transformed frustum from scratch; - //! should NOT be NULL. - //! @return a copy of the frustum with the input builder assigned - Standard_EXPORT virtual Handle(SelectMgr_BaseIntersector) CopyWithBuilder (const Handle(SelectMgr_FrustumBuilder)& theBuilder) const Standard_OVERRIDE; - // SAT Tests for different objects //! SAT intersection test between defined volume and given axis-aligned box diff --git a/src/SelectMgr/SelectMgr_SelectableObjectSet.cxx b/src/SelectMgr/SelectMgr_SelectableObjectSet.cxx index 4979471908..89fb16e790 100644 --- a/src/SelectMgr/SelectMgr_SelectableObjectSet.cxx +++ b/src/SelectMgr/SelectMgr_SelectableObjectSet.cxx @@ -241,23 +241,17 @@ namespace //============================================================================= SelectMgr_SelectableObjectSet::SelectMgr_SelectableObjectSet() { - myBVH[BVHSubset_ortho2dPersistent] = new BVH_Tree(); - myBVH[BVHSubset_ortho3dPersistent] = new BVH_Tree(); - myBVH[BVHSubset_2dPersistent] = new BVH_Tree(); - myBVH[BVHSubset_3dPersistent] = new BVH_Tree(); - myBVH[BVHSubset_3d] = new BVH_Tree(); - - myBuilder[BVHSubset_ortho2dPersistent] = new BVH_LinearBuilder (BVH_Constants_LeafNodeSizeSingle, BVH_Constants_MaxTreeDepth); - myBuilder[BVHSubset_ortho3dPersistent] = new BVH_LinearBuilder (BVH_Constants_LeafNodeSizeSingle, BVH_Constants_MaxTreeDepth); - myBuilder[BVHSubset_2dPersistent] = new BVH_LinearBuilder (BVH_Constants_LeafNodeSizeSingle, BVH_Constants_MaxTreeDepth); - myBuilder[BVHSubset_3dPersistent] = new BVH_LinearBuilder (BVH_Constants_LeafNodeSizeSingle, BVH_Constants_MaxTreeDepth); - myBuilder[BVHSubset_3d] = new BVH_BinnedBuilder (BVH_Constants_LeafNodeSizeSingle, BVH_Constants_MaxTreeDepth, Standard_True); - - myIsDirty[BVHSubset_ortho2dPersistent] = Standard_False; - myIsDirty[BVHSubset_ortho3dPersistent] = Standard_False; - myIsDirty[BVHSubset_2dPersistent] = Standard_False; - myIsDirty[BVHSubset_3dPersistent] = Standard_False; - myIsDirty[BVHSubset_3d] = Standard_False; + myBVH[BVHSubset_2dPersistent] = new BVH_Tree(); + myBVH[BVHSubset_3dPersistent] = new BVH_Tree(); + myBVH[BVHSubset_3d] = new BVH_Tree(); + + myBuilder[BVHSubset_2dPersistent] = new BVH_LinearBuilder (BVH_Constants_LeafNodeSizeSingle, BVH_Constants_MaxTreeDepth); + myBuilder[BVHSubset_3dPersistent] = new BVH_LinearBuilder (BVH_Constants_LeafNodeSizeSingle, BVH_Constants_MaxTreeDepth); + myBuilder[BVHSubset_3d] = new BVH_BinnedBuilder (BVH_Constants_LeafNodeSizeSingle, BVH_Constants_MaxTreeDepth, Standard_True); + + myIsDirty[BVHSubset_2dPersistent] = Standard_False; + myIsDirty[BVHSubset_3dPersistent] = Standard_False; + myIsDirty[BVHSubset_3d] = Standard_False; } //============================================================================= @@ -268,9 +262,10 @@ Standard_Boolean SelectMgr_SelectableObjectSet::Append (const Handle(SelectMgr_S { // get an appropriate BVH subset to insert the object into it const Standard_Integer aSubsetIdx = appropriateSubset (theObject); - + // check that the object is excluded from other subsets - if (currentSubset (theObject) != -1) + if (myObjects[(aSubsetIdx + 1) % BVHSubsetNb].Contains (theObject) + || myObjects[(aSubsetIdx + 2) % BVHSubsetNb].Contains (theObject)) { return Standard_False; } @@ -406,51 +401,9 @@ void SelectMgr_SelectableObjectSet::UpdateBVH (const Handle(Graphic3d_Camera)& t myBuilder[BVHSubset_2dPersistent]->Build (&anAdaptor, myBVH[BVHSubset_2dPersistent].get(), anAdaptor.Box()); } - // ------------------------------------------------------------------- - // check and update 3D orthographic persistence BVH tree if necessary - // ------------------------------------------------------------------- - if (!IsEmpty (BVHSubset_ortho3dPersistent) - && (myIsDirty[BVHSubset_ortho3dPersistent] - || myLastViewState.IsChanged (aViewState) - || isWinSizeChanged)) - { - Handle(Graphic3d_Camera) aNewOrthoCam = new Graphic3d_Camera (*theCam); // If OrthoPers, copy camera and set to orthographic projection - aNewOrthoCam->SetProjectionType (Graphic3d_Camera::Projection_Orthographic); - - // construct adaptor over private fields to provide direct access for the BVH builder - BVHBuilderAdaptorPersistent anAdaptor (myObjects[BVHSubset_ortho3dPersistent], - aNewOrthoCam, aNewOrthoCam->ProjectionMatrix(), - aNewOrthoCam->OrientationMatrix(), theWinSize); - - // update corresponding BVH tree data structure - myBuilder[BVHSubset_ortho3dPersistent]->Build (&anAdaptor, myBVH[BVHSubset_ortho3dPersistent].get(), anAdaptor.Box()); - } - - // ------------------------------------------------------------------- - // check and update 2D orthographic persistence BVH tree if necessary - // ------------------------------------------------------------------- - if (!IsEmpty (BVHSubset_ortho2dPersistent) - && (myIsDirty[BVHSubset_ortho2dPersistent] - || myLastViewState.IsProjectionChanged (aViewState) - || isWinSizeChanged)) - { - Handle(Graphic3d_Camera) aNewOrthoCam = new Graphic3d_Camera (*theCam); // If OrthoPers, copy camera and set to orthographic projection - aNewOrthoCam->SetProjectionType (Graphic3d_Camera::Projection_Orthographic); - - // construct adaptor over private fields to provide direct access for the BVH builder - BVHBuilderAdaptorPersistent anAdaptor (myObjects[BVHSubset_ortho2dPersistent], - aNewOrthoCam, aNewOrthoCam->ProjectionMatrix(), - SelectMgr_SelectableObjectSet_THE_IDENTITY_MAT, theWinSize); - - // update corresponding BVH tree data structure - myBuilder[BVHSubset_ortho2dPersistent]->Build (&anAdaptor, myBVH[BVHSubset_ortho2dPersistent].get(), anAdaptor.Box()); - } - // release dirty state for every subset - myIsDirty[BVHSubset_3dPersistent] = Standard_False; - myIsDirty[BVHSubset_2dPersistent] = Standard_False; - myIsDirty[BVHSubset_ortho3dPersistent] = Standard_False; - myIsDirty[BVHSubset_ortho2dPersistent] = Standard_False; + myIsDirty[BVHSubset_3dPersistent] = Standard_False; + myIsDirty[BVHSubset_2dPersistent] = Standard_False; // keep last view state myLastViewState = aViewState; @@ -466,11 +419,9 @@ void SelectMgr_SelectableObjectSet::UpdateBVH (const Handle(Graphic3d_Camera)& t //============================================================================= void SelectMgr_SelectableObjectSet::MarkDirty() { - myIsDirty[BVHSubset_3d] = Standard_True; - myIsDirty[BVHSubset_3dPersistent] = Standard_True; - myIsDirty[BVHSubset_2dPersistent] = Standard_True; - myIsDirty[BVHSubset_ortho3dPersistent] = Standard_True; - myIsDirty[BVHSubset_ortho2dPersistent] = Standard_True; + myIsDirty[BVHSubset_3d] = Standard_True; + myIsDirty[BVHSubset_3dPersistent] = Standard_True; + myIsDirty[BVHSubset_2dPersistent] = Standard_True; } //======================================================================= //function : DumpJson diff --git a/src/SelectMgr/SelectMgr_SelectableObjectSet.hxx b/src/SelectMgr/SelectMgr_SelectableObjectSet.hxx index fa1a736701..c8cb188fcf 100644 --- a/src/SelectMgr/SelectMgr_SelectableObjectSet.hxx +++ b/src/SelectMgr/SelectMgr_SelectableObjectSet.hxx @@ -42,22 +42,11 @@ public: //! needs to be updated only when camera's projection changes. Bounding volumes for this object subclass //! is represented directly in eye space coordinates. //! This subset uses linear BVH builder with 32 levels of depth and 1 element per leaf. - //! - BVHSubset_ortho3dPersistent refers to the subset of 3D persistent selectable objects (rotate, pan, zoom persistence) - //! that contains `Graphic3d_TMF_OrthoPers` persistence mode. - //! Associated BVH tree needs to be updated when either the camera's projection and position change. - //! This subset uses linear BVH builder with 32 levels of depth and 1 element per leaf. - //! - BVHSubset_ortho2dPersistent refers to the subset of 2D persistent selectable objects - //! that contains `Graphic3d_TMF_OrthoPers` persistence mode. Associated BVH tree - //! needs to be updated only when camera's projection changes. Bounding volumes for this object subclass - //! is represented directly in eye space coordinates. - //! This subset uses linear BVH builder with 32 levels of depth and 1 element per leaf. enum BVHSubset { BVHSubset_3d, BVHSubset_3dPersistent, BVHSubset_2dPersistent, - BVHSubset_ortho3dPersistent, - BVHSubset_ortho2dPersistent, BVHSubsetNb }; @@ -151,9 +140,7 @@ public: { return myObjects[BVHSubset_3d].Contains (theObject) || myObjects[BVHSubset_3dPersistent].Contains (theObject) - || myObjects[BVHSubset_2dPersistent].Contains (theObject) - || myObjects[BVHSubset_ortho3dPersistent].Contains (theObject) - || myObjects[BVHSubset_ortho2dPersistent].Contains (theObject); + || myObjects[BVHSubset_2dPersistent].Contains (theObject); } //! Returns true if the object set does not contain any selectable objects. @@ -161,9 +148,7 @@ public: { return myObjects[BVHSubset_3d].IsEmpty() && myObjects[BVHSubset_3dPersistent].IsEmpty() - && myObjects[BVHSubset_2dPersistent].IsEmpty() - && myObjects[BVHSubset_ortho3dPersistent].IsEmpty() - && myObjects[BVHSubset_ortho2dPersistent].IsEmpty(); + && myObjects[BVHSubset_2dPersistent].IsEmpty(); } //! Returns true if the specified object subset is empty. @@ -207,18 +192,10 @@ private: } return SelectMgr_SelectableObjectSet::BVHSubset_3d; } - else if ((theObject->TransformPersistence()->Mode() & Graphic3d_TMF_2d) != 0) + else if (theObject->TransformPersistence()->Mode() == Graphic3d_TMF_2d) { - if (theObject->TransformPersistence()->IsOrthoPers()) - { - return SelectMgr_SelectableObjectSet::BVHSubset_ortho2dPersistent; - } return SelectMgr_SelectableObjectSet::BVHSubset_2dPersistent; } - else if (theObject->TransformPersistence()->IsOrthoPers()) - { - return SelectMgr_SelectableObjectSet::BVHSubset_ortho3dPersistent; - } else { return SelectMgr_SelectableObjectSet::BVHSubset_3dPersistent; diff --git a/src/SelectMgr/SelectMgr_SelectingVolumeManager.cxx b/src/SelectMgr/SelectMgr_SelectingVolumeManager.cxx index db1e25fabe..d33ea30427 100644 --- a/src/SelectMgr/SelectMgr_SelectingVolumeManager.cxx +++ b/src/SelectMgr/SelectMgr_SelectingVolumeManager.cxx @@ -67,28 +67,6 @@ SelectMgr_SelectingVolumeManager SelectMgr_SelectingVolumeManager::ScaleAndTrans return aMgr; } -//======================================================================= -// function : CopyWithBuilder -// purpose : Returns a copy of the selecting volume manager and its active frustum re-constructed using the passed builder. -// Builder is an argument that represents corresponding settings for re-constructing transformed -// frustum from scratch. -//======================================================================= -SelectMgr_SelectingVolumeManager SelectMgr_SelectingVolumeManager::CopyWithBuilder (const Handle(SelectMgr_FrustumBuilder)& theBuilder) const -{ - SelectMgr_SelectingVolumeManager aMgr; - aMgr.myToAllowOverlap = myToAllowOverlap; - aMgr.myViewClipPlanes = myViewClipPlanes; - aMgr.myObjectClipPlanes = myObjectClipPlanes; - aMgr.myViewClipRange = myViewClipRange; - if (!myActiveSelectingVolume.IsNull()) - { - aMgr.myActiveSelectingVolume = myActiveSelectingVolume->CopyWithBuilder (theBuilder); - aMgr.BuildSelectingVolume(); - } - - return aMgr; -} - //======================================================================= // function : GetActiveSelectionType // purpose : diff --git a/src/SelectMgr/SelectMgr_SelectingVolumeManager.hxx b/src/SelectMgr/SelectMgr_SelectingVolumeManager.hxx index 0dd115ffc0..aed25cd94a 100644 --- a/src/SelectMgr/SelectMgr_SelectingVolumeManager.hxx +++ b/src/SelectMgr/SelectMgr_SelectingVolumeManager.hxx @@ -81,11 +81,6 @@ public: const gp_GTrsf& theTrsf, const Handle(SelectMgr_FrustumBuilder)& theBuilder) const; - //! Returns a copy of the selecting volume manager and its active frustum re-constructed using the passed builder. - //! Builder is an argument that represents corresponding settings for re-constructing transformed - //! frustum from scratch. - Standard_EXPORT virtual SelectMgr_SelectingVolumeManager CopyWithBuilder (const Handle(SelectMgr_FrustumBuilder)& theBuilder) const; - public: //! Returns current camera definition. diff --git a/src/SelectMgr/SelectMgr_TriangularFrustum.cxx b/src/SelectMgr/SelectMgr_TriangularFrustum.cxx index 05abc17df2..efaf686e28 100644 --- a/src/SelectMgr/SelectMgr_TriangularFrustum.cxx +++ b/src/SelectMgr/SelectMgr_TriangularFrustum.cxx @@ -189,20 +189,6 @@ Handle(SelectMgr_BaseIntersector) SelectMgr_TriangularFrustum::ScaleAndTransform return aRes; } -//======================================================================= -// function : CopyWithBuilder -// purpose : Returns a copy of the frustum using the given frustum builder configuration. -// Returned frustum should be re-constructed before being used. -//======================================================================= -Handle(SelectMgr_BaseIntersector) SelectMgr_TriangularFrustum::CopyWithBuilder (const Handle(SelectMgr_FrustumBuilder)& theBuilder) const -{ - Handle(SelectMgr_TriangularFrustum) aRes = new SelectMgr_TriangularFrustum(); - aRes->mySelTriangle = mySelTriangle; - aRes->SetBuilder (theBuilder); - - return aRes; -} - //======================================================================= // function : OverlapsBox // purpose : SAT intersection test between defined volume and diff --git a/src/SelectMgr/SelectMgr_TriangularFrustum.hxx b/src/SelectMgr/SelectMgr_TriangularFrustum.hxx index 0255b6f61b..a13067b033 100644 --- a/src/SelectMgr/SelectMgr_TriangularFrustum.hxx +++ b/src/SelectMgr/SelectMgr_TriangularFrustum.hxx @@ -55,13 +55,6 @@ public: const gp_GTrsf& theTrsf, const Handle(SelectMgr_FrustumBuilder)& theBuilder) const Standard_OVERRIDE; - //! Returns a copy of the frustum using the given frustum builder configuration. - //! Returned frustum should be re-constructed before being used. - //! @param theBuilder [in] argument that represents corresponding settings for re-constructing transformed frustum from scratch; - //! should NOT be NULL. - //! @return a copy of the frustum with the input builder assigned - Standard_EXPORT virtual Handle(SelectMgr_BaseIntersector) CopyWithBuilder (const Handle(SelectMgr_FrustumBuilder)& theBuilder) const Standard_OVERRIDE; - public: //! @name SAT Tests for different objects //! SAT intersection test between defined volume and given axis-aligned box diff --git a/src/SelectMgr/SelectMgr_TriangularFrustumSet.cxx b/src/SelectMgr/SelectMgr_TriangularFrustumSet.cxx index 0df5e595af..907a854061 100644 --- a/src/SelectMgr/SelectMgr_TriangularFrustumSet.cxx +++ b/src/SelectMgr/SelectMgr_TriangularFrustumSet.cxx @@ -186,32 +186,6 @@ Handle(SelectMgr_BaseIntersector) SelectMgr_TriangularFrustumSet::ScaleAndTransf return aRes; } -//======================================================================= -// function : CopyWithBuilder -// purpose : Returns a copy of the frustum using the given frustum builder configuration. -// Returned frustum should be re-constructed before being used. -//======================================================================= -Handle(SelectMgr_BaseIntersector) SelectMgr_TriangularFrustumSet::CopyWithBuilder (const Handle(SelectMgr_FrustumBuilder)& theBuilder) const -{ - Standard_ASSERT_RAISE (mySelectionType == SelectMgr_SelectionType_Polyline, - "Error! SelectMgr_TriangularFrustumSet::CopyWithBuilder() should be called after selection frustum initialization"); - - Standard_ASSERT_RAISE (!theBuilder.IsNull(), - "Error! SelectMgr_TriangularFrustumSet::CopyWithBuilder() should be called with valid builder"); - - Handle(SelectMgr_TriangularFrustumSet) aRes = new SelectMgr_TriangularFrustumSet(); - aRes->SetCamera (myCamera); - for (SelectMgr_TriangFrustums::Iterator anIter (myFrustums); anIter.More(); anIter.Next()) - { - aRes->myFrustums.Append (Handle(SelectMgr_TriangularFrustum)::DownCast (anIter.Value()->CopyWithBuilder (theBuilder))); - } - aRes->mySelectionType = mySelectionType; - aRes->mySelPolyline = mySelPolyline; - aRes->myToAllowOverlap = myToAllowOverlap; - aRes->SetBuilder (theBuilder); - return aRes; -} - // ======================================================================= // function : OverlapsBox // purpose : diff --git a/src/SelectMgr/SelectMgr_TriangularFrustumSet.hxx b/src/SelectMgr/SelectMgr_TriangularFrustumSet.hxx index 5f8c170351..694c3efc55 100644 --- a/src/SelectMgr/SelectMgr_TriangularFrustumSet.hxx +++ b/src/SelectMgr/SelectMgr_TriangularFrustumSet.hxx @@ -62,13 +62,6 @@ public: const gp_GTrsf& theTrsf, const Handle(SelectMgr_FrustumBuilder)& theBuilder) const Standard_OVERRIDE; - //! Returns a copy of the frustum using the given frustum builder configuration. - //! Returned frustum should be re-constructed before being used. - //! @param theBuilder [in] argument that represents corresponding settings for re-constructing transformed frustum from scratch; - //! should NOT be NULL. - //! @return a copy of the frustum with the input builder assigned - Standard_EXPORT virtual Handle(SelectMgr_BaseIntersector) CopyWithBuilder (const Handle(SelectMgr_FrustumBuilder)& theBuilder) const Standard_OVERRIDE; - public: Standard_EXPORT virtual Standard_Boolean OverlapsBox (const SelectMgr_Vec3& theMinPnt, diff --git a/src/SelectMgr/SelectMgr_ViewerSelector.cxx b/src/SelectMgr/SelectMgr_ViewerSelector.cxx index 20656e44a0..4370d4cee0 100644 --- a/src/SelectMgr/SelectMgr_ViewerSelector.cxx +++ b/src/SelectMgr/SelectMgr_ViewerSelector.cxx @@ -138,12 +138,12 @@ void SelectMgr_ViewerSelector::updatePoint3d (SelectMgr_SortCriterion& theCriter case SelectMgr_TypeOfDepthTolerance_UniformPixels: case SelectMgr_TypeOfDepthTolerance_SensitivityFactor: { - if (theMgr.Camera().IsNull()) + if (mySelectingVolumeMgr.Camera().IsNull()) { // fallback for an arbitrary projection matrix theCriterion.Tolerance = aSensFactor / 33.0; } - else if (theMgr.Camera()->IsOrthographic()) + else if (mySelectingVolumeMgr.Camera()->IsOrthographic()) { theCriterion.Tolerance = myCameraScale * aSensFactor; } @@ -634,7 +634,6 @@ void SelectMgr_ViewerSelector::TraverseSensitives (const Standard_Integer theVie Graphic3d_Vec2i aWinSize; mySelectingVolumeMgr.WindowSize (aWinSize.x(), aWinSize.y()); - const double aPixelSize = Max (1.0 / aWinSize.x(), 1.0 / aWinSize.y()); const Handle(Graphic3d_Camera)& aCamera = mySelectingVolumeMgr.Camera(); Graphic3d_Mat4d aProjectionMat, aWorldViewMat; @@ -647,6 +646,11 @@ void SelectMgr_ViewerSelector::TraverseSensitives (const Standard_Integer theVie myCameraEye = aCamera->Eye().XYZ(); myCameraDir = aCamera->Direction().XYZ(); + myCameraScale = aCamera->IsOrthographic() + ? aCamera->Scale() + : 2.0 * Tan (aCamera->FOVy() * M_PI / 360.0); + const double aPixelSize = Max (1.0 / aWinSize.x(), 1.0 / aWinSize.y()); + myCameraScale *= aPixelSize; } mySelectableObjects.UpdateBVH (aCamera, aWinSize); @@ -668,8 +672,7 @@ void SelectMgr_ViewerSelector::TraverseSensitives (const Standard_Integer theVie // for 2D space selection transform selecting volumes to perform overlap testing // directly in camera's eye space omitting the camera position, which is not // needed there at all - if (aBVHSubset == SelectMgr_SelectableObjectSet::BVHSubset_2dPersistent - || aBVHSubset == SelectMgr_SelectableObjectSet::BVHSubset_ortho2dPersistent) + if (aBVHSubset == SelectMgr_SelectableObjectSet::BVHSubset_2dPersistent) { gp_GTrsf aTFrustum; aTFrustum.SetValue (1, 1, aWorldViewMat.GetValue (0, 0)); @@ -685,43 +688,22 @@ void SelectMgr_ViewerSelector::TraverseSensitives (const Standard_Integer theVie aWorldViewMat.GetValue (1, 3), aWorldViewMat.GetValue (2, 3))); - // define corresponding frustum builder parameters for 2d persistence. + // define corresponding frustum builder parameters Handle(SelectMgr_FrustumBuilder) aBuilder = new SelectMgr_FrustumBuilder(); Handle(Graphic3d_Camera) aNewCamera = new Graphic3d_Camera(); aNewCamera->CopyMappingData (aCamera); aNewCamera->SetIdentityOrientation(); - if (aBVHSubset == SelectMgr_SelectableObjectSet::BVHSubset_ortho2dPersistent) - { - aNewCamera->SetProjectionType (Graphic3d_Camera::Projection_Orthographic); - } aWorldViewMat = aNewCamera->OrientationMatrix(); // should be identity matrix aProjectionMat = aNewCamera->ProjectionMatrix(); // should be the same to aProjectionMat aBuilder->SetCamera (aNewCamera); aBuilder->SetWindowSize (aWinSize.x(), aWinSize.y()); aMgr = mySelectingVolumeMgr.ScaleAndTransform (1, aTFrustum, aBuilder); } - else if (aBVHSubset == SelectMgr_SelectableObjectSet::BVHSubset_ortho3dPersistent) - { - // define corresponding frustum builder parameters for 3d orthographic persistence. - Handle(SelectMgr_FrustumBuilder) aBuilder = new SelectMgr_FrustumBuilder(); - Handle(Graphic3d_Camera) aNewCamera = new Graphic3d_Camera (*aCamera); - aNewCamera->SetProjectionType (Graphic3d_Camera::Projection_Orthographic); - aWorldViewMat = aNewCamera->OrientationMatrix(); // should be the same to aWorldViewMat - aProjectionMat = aNewCamera->ProjectionMatrix(); // should be orthographic projection - aBuilder->SetCamera (aNewCamera); - aBuilder->SetWindowSize (aWinSize.x(), aWinSize.y()); - aMgr = mySelectingVolumeMgr.CopyWithBuilder (aBuilder); - } else { aMgr = mySelectingVolumeMgr; } - myCameraScale = aMgr.Camera()->IsOrthographic() - ? aMgr.Camera()->Scale() - : 2.0 * Tan (aMgr.Camera()->FOVy() * M_PI / 360.0); - myCameraScale *= aPixelSize; - const opencascade::handle >& aBVHTree = mySelectableObjects.BVH (aBVHSubset); Standard_Integer aNode = 0; diff --git a/src/SelectMgr/SelectMgr_ViewerSelector.hxx b/src/SelectMgr/SelectMgr_ViewerSelector.hxx index 4537080f63..a9dd146cba 100644 --- a/src/SelectMgr/SelectMgr_ViewerSelector.hxx +++ b/src/SelectMgr/SelectMgr_ViewerSelector.hxx @@ -328,7 +328,7 @@ protected: //! @param theObject [in] the selectable object for traversal. //! @param theMgr [in] the (un)transformed copy of the selecting volume manager representing active selection frustum. //! @param theCamera, theProjectionMat, theWorldViewMat [in] the source camera and matrices for theMgr given. - //! @param theWinSize [in] viewport (window) dimensions for evaluating + //! @param theViewportWidth, theViewportHeight [in] viewport (window) dimensions for evaluating //! object's transformation persistence. Standard_EXPORT void traverseObject (const Handle(SelectMgr_SelectableObject)& theObject, const SelectMgr_SelectingVolumeManager& theMgr, diff --git a/src/ViewerTest/ViewerTest.cxx b/src/ViewerTest/ViewerTest.cxx index 43aced25af..9fb0cfea5a 100644 --- a/src/ViewerTest/ViewerTest.cxx +++ b/src/ViewerTest/ViewerTest.cxx @@ -5100,24 +5100,6 @@ static int VDisplay2 (Draw_Interpretor& theDI, aTrsfPers = new Graphic3d_TransformPers (aTrsfPers->Mode(), Aspect_TypeOfTriedronPosition (aCorner), Graphic3d_Vec2i (aZ.IntegerValue())); } } - else if (aNameCase == "-trsfPersOrtho") - { - if (aTrsfPers.IsNull()) - { - Message::SendFail() << "Error: wrong syntax at " << aName << "."; - return 1; - } - - toSetTrsfPers = Standard_True; - if (aTrsfPers->IsZoomOrRotate()) - { - aTrsfPers = new Graphic3d_TransformPers (aTrsfPers->Mode() | Graphic3d_TMF_OrthoPers, aTrsfPers->AnchorPoint()); - } - else if (aTrsfPers->IsTrihedronOr2d()) - { - aTrsfPers = new Graphic3d_TransformPers (aTrsfPers->Mode() | Graphic3d_TMF_OrthoPers, aTrsfPers->Corner2d(), aTrsfPers->Offset2d()); - } - } else if (aNameCase == "-layer" || aNameCase == "-zlayer") { @@ -6648,45 +6630,42 @@ If last 3 optional parameters are not set prints numbers of U-, V- isolines and addCmd ("vdisplay", VDisplay2, /* [vdisplay] */ R"( vdisplay [-noupdate|-update] [-mutable] [-neutral] - [-trsfPers {zoom|rotate|zoomRotate|trihedron|none}=none] + [-trsfPers {zoom|rotate|zoomRotate|none}=none] [-trsfPersPos X Y [Z]] [-3d] [-2d|-trihedron [{top|bottom|left|right|topLeft |topRight|bottomLeft|bottomRight} [offsetX offsetY]]] - [-trsfPersOrtho] [-dispMode mode] [-highMode mode] [-layer index] [-top|-topmost|-overlay|-underlay] [-redisplay] [-erased] [-noecho] [-autoTriangulation {0|1}] name1 [name2] ... [name n] Displays named objects. - -noupdate Suppresses viewer redraw call. - -mutable Enables optimizations for mutable objects. - -neutral Draws objects in main viewer. - -erased Loads the object into context, but does not display it. - -layer Sets z-layer for objects. - Alternatively -overlay|-underlay|-top|-topmost - options can be used for the default z-layers. - -top Draws object on top of main presentations - but below topmost. - -topmost Draws in overlay for 3D presentations. - with independent Depth. - -overlay Draws objects in overlay for 2D presentations. - (On-Screen-Display) - -underlay Draws objects in underlay for 2D presentations. - (On-Screen-Display) + -noupdate Suppresses viewer redraw call. + -mutable Enables optimizations for mutable objects. + -neutral Draws objects in main viewer. + -erased Loads the object into context, but does not display it. + -layer Sets z-layer for objects. + Alternatively -overlay|-underlay|-top|-topmost + options can be used for the default z-layers. + -top Draws object on top of main presentations + but below topmost. + -topmost Draws in overlay for 3D presentations. + with independent Depth. + -overlay Draws objects in overlay for 2D presentations. + (On-Screen-Display) + -underlay Draws objects in underlay for 2D presentations. + (On-Screen-Display) -selectable|-noselect Controls selection of objects. - -trsfPers Sets a transform persistence flags. - -trsfPersPos Sets an anchor point for transform persistence. - -2d Displays object in screen coordinates. - (DY looks up) - -trsfPersOrtho Set orthographic transform persistence. - (Objects shown with orthographic projection) - -dispmode Sets display mode for objects. - -highmode Sets hilight mode for objects. - -redisplay Recomputes presentation of objects. - -noecho Avoid printing of command results. - -autoTriang Enable/disable auto-triangulation for displayed shape. + -trsfPers Sets a transform persistence flags. + -trsfPersPos Sets an anchor point for transform persistence. + -2d Displays object in screen coordinates. + (DY looks up) + -dispmode Sets display mode for objects. + -highmode Sets hilight mode for objects. + -redisplay Recomputes presentation of objects. + -noecho Avoid printing of command results. + -autoTriang Enable/disable auto-triangulation for displayed shape. )" /* [vdisplay] */); addCmd ("vnbdisplayed", VNbDisplayed, /* [vnbdisplayed] */ R"( diff --git a/src/ViewerTest/ViewerTest_ViewerCommands.cxx b/src/ViewerTest/ViewerTest_ViewerCommands.cxx index d700adce80..0de77278ea 100644 --- a/src/ViewerTest/ViewerTest_ViewerCommands.cxx +++ b/src/ViewerTest/ViewerTest_ViewerCommands.cxx @@ -13686,12 +13686,6 @@ static int VViewCube (Draw_Interpretor& , { aViewCube->SetAxesSphereRadius (Draw::Atof (theArgVec[++anArgIter])); } - else if (anArg == "-orthopers") - { - const Handle(Graphic3d_TransformPers)& aTrsfPers = aViewCube->TransformPersistence(); - Handle(Graphic3d_TransformPers) anOrthoPers = new Graphic3d_TransformPers (Graphic3d_TMF_TriedronPers | Graphic3d_TMF_OrthoPers, aTrsfPers->Corner2d(), aTrsfPers->Offset2d()); - aViewCube->SetTransformPersistence (anOrthoPers); - } else { Message::SendFail() << "Syntax error: unknown argument '" << anArg << "'"; @@ -14989,7 +14983,6 @@ Displays interactive view manipulation object. Options: -axesSphereRadius Value radius of the sphere (central point) of trihedron -fixedAnimation {0|1} uninterruptible animation loop -duration Seconds animation duration in seconds - -orthoPers force orthographic projection persistence. )" /* [vviewcube] */); addCmd ("vcolorconvert", VColorConvert, /* [vcolorconvert] */ R"( diff --git a/tests/v3d/viewcube/orthopers b/tests/v3d/viewcube/orthopers deleted file mode 100644 index 5c240ed0ea..0000000000 --- a/tests/v3d/viewcube/orthopers +++ /dev/null @@ -1,37 +0,0 @@ -puts "==================================" -puts "0028954: Visualization - compare AIS_ViewCube on perspective view with and without orthographic persistence" -puts "==================================" - -pload MODELING VISUALIZATION -vclear -vinit View1 -vcamera -persp - -box b 15 20 70 -vdisplay -dispMode 1 b -vaxo -vfit -vviewcube vc -fixedAnimation 1 -duration 0 -orthoPers - -vmoveto 70 350 -if {[vreadpixel 95 350 name rgb] != "GRAY62"} { puts "Error: Highlighting of view cube Side is wrong." } -vmoveto 0 0 -vdump $imagedir/${casename}_axo.png - -# check FRONT side -vselect 70 340 -if {[vreadpixel 255 300 name rgb] != "BLACK"} { puts "Error: Position of FRONT camera is wrong." } -vdump $imagedir/${casename}_side.png - -# check FRONT/TOP edge -vselect 110 270 -if {[vreadpixel 100 320 name rgb] != "GRAY57"} { puts "Error: Position of FRONT-TOP camera is wrong." } -if {[vreadpixel 100 310 name rgb] != "CYAN"} { puts "Error: Position of FRONT-TOP camera is wrong." } -vdump $imagedir/${casename}_edge.png - -# Check vertex -vselect 140 310 -if {[vreadpixel 100 290 name rgb] != "GRAY41"} { puts "Error: Position of TOP-FRONT-RIGHT camera is wrong." } -if {[vreadpixel 100 310 name rgb] != "CYAN"} { puts "Error: Position of TOP-FRONT-RIGHT camera is wrong." } -if {[vreadpixel 100 320 name rgb] != "GRAY62"} { puts "Error: Position of TOP-FRONT-RIGHT camera is wrong." } -vdump $imagedir/${casename}_corner.png From f035e0718b36b438df679a916f3383b1eced1779 Mon Sep 17 00:00:00 2001 From: rodrlyra Date: Mon, 11 Dec 2023 16:37:36 +0000 Subject: [PATCH 537/639] 0033551: Visualization - Add new transform persistence mode to force orthographic projection on object. The new transform persistence mode, with flag `Graphic3d_TMF_OrthoPers`, can be combined (bitwise OR operation) with the other persistence modes (2D, Trihedron or Zoom/Rotate Persistence) to make objects be rendered with orthographic projection when it is on a view with perspective projection. If the view already uses orthographic projection, there will be no difference. This feature was implemented to fix ViewCube being distorted when view with perspective projection changes size. --- src/Graphic3d/Graphic3d_TransModeFlags.hxx | 7 ++ src/Graphic3d/Graphic3d_TransformPers.hxx | 119 +++++++++++------- src/SelectMgr/SelectMgr_AxisIntersector.cxx | 18 +++ src/SelectMgr/SelectMgr_AxisIntersector.hxx | 5 + src/SelectMgr/SelectMgr_BaseIntersector.hxx | 5 + .../SelectMgr_RectangularFrustum.cxx | 22 ++++ .../SelectMgr_RectangularFrustum.hxx | 7 ++ .../SelectMgr_SelectableObjectSet.cxx | 87 ++++++++++--- .../SelectMgr_SelectableObjectSet.hxx | 29 ++++- .../SelectMgr_SelectingVolumeManager.cxx | 22 ++++ .../SelectMgr_SelectingVolumeManager.hxx | 5 + src/SelectMgr/SelectMgr_TriangularFrustum.cxx | 14 +++ src/SelectMgr/SelectMgr_TriangularFrustum.hxx | 7 ++ .../SelectMgr_TriangularFrustumSet.cxx | 26 ++++ .../SelectMgr_TriangularFrustumSet.hxx | 7 ++ src/SelectMgr/SelectMgr_ViewerSelector.cxx | 41 ++++-- src/SelectMgr/SelectMgr_ViewerSelector.hxx | 2 +- src/ViewerTest/ViewerTest.cxx | 71 +++++++---- src/ViewerTest/ViewerTest_ViewerCommands.cxx | 7 ++ tests/v3d/viewcube/orthopers | 37 ++++++ 20 files changed, 434 insertions(+), 104 deletions(-) create mode 100644 tests/v3d/viewcube/orthopers diff --git a/src/Graphic3d/Graphic3d_TransModeFlags.hxx b/src/Graphic3d/Graphic3d_TransModeFlags.hxx index 2246541d8f..0c9f329362 100644 --- a/src/Graphic3d/Graphic3d_TransModeFlags.hxx +++ b/src/Graphic3d/Graphic3d_TransModeFlags.hxx @@ -25,8 +25,15 @@ enum Graphic3d_TransModeFlags Graphic3d_TMF_TriedronPers = 0x0020, //!< object behaves like trihedron - it is fixed at the corner of view and does not resizing (but rotating) Graphic3d_TMF_2d = 0x0040, //!< object is defined in 2D screen coordinates (pixels) and does not resize, pan and rotate Graphic3d_TMF_CameraPers = 0x0080, //!< object is in front of the camera + Graphic3d_TMF_OrthoPers = 0x0100, //!< object is forced to be rendered with orthographic projection. Graphic3d_TMF_ZoomRotatePers = Graphic3d_TMF_ZoomPers | Graphic3d_TMF_RotatePers //!< object doesn't resize and rotate }; +//! Bitwise OR operator for transform persistence mode flags. Be aware that some flags combinations are not valid. +inline Graphic3d_TransModeFlags operator| (Graphic3d_TransModeFlags a, Graphic3d_TransModeFlags b) +{ + return static_cast (static_cast (a) | static_cast (b)); +} + #endif diff --git a/src/Graphic3d/Graphic3d_TransformPers.hxx b/src/Graphic3d/Graphic3d_TransformPers.hxx index f9d9b60940..d0f70ba64c 100644 --- a/src/Graphic3d/Graphic3d_TransformPers.hxx +++ b/src/Graphic3d/Graphic3d_TransformPers.hxx @@ -58,6 +58,12 @@ public: return (theMode & (Graphic3d_TMF_TriedronPers | Graphic3d_TMF_2d)) != 0; } + //! Return true if specified mode is orthographic projection transformation persistence. + static Standard_Boolean IsOrthoPers (Graphic3d_TransModeFlags theMode) + { + return (theMode & Graphic3d_TMF_OrthoPers) != 0; + } + public: //! Set transformation persistence. @@ -110,6 +116,9 @@ public: //! Return true for Graphic3d_TMF_TriedronPers and Graphic3d_TMF_2d modes. Standard_Boolean IsTrihedronOr2d() const { return IsTrihedronOr2d (myMode); } + //! Return true for Graphic3d_TMF_OrthoPers mode. + Standard_Boolean IsOrthoPers () const { return IsOrthoPers (myMode); } + //! Transformation persistence mode flags. Graphic3d_TransModeFlags Mode() const { return myMode; } @@ -297,28 +306,32 @@ public: //! @param theWorldView [in] the world view transformation matrix. //! @param theViewportWidth [in] the width of viewport (for 2d persistence). //! @param theViewportHeight [in] the height of viewport (for 2d persistence). + //! @param theToApplyProjPers [in] if should apply projection persistence to matrix (for orthographic persistence). //! @return transformation matrix to be applied to model world transformation of an object. template NCollection_Mat4 Compute (const Handle(Graphic3d_Camera)& theCamera, const NCollection_Mat4& theProjection, const NCollection_Mat4& theWorldView, const Standard_Integer theViewportWidth, - const Standard_Integer theViewportHeight) const; + const Standard_Integer theViewportHeight, + const Standard_Boolean theToApplyProjPers = false) const; //! Apply transformation persistence on specified matrices. - //! @param theCamera camera definition - //! @param theProjection projection matrix to modify - //! @param theWorldView world-view matrix to modify - //! @param theViewportWidth viewport width - //! @param theViewportHeight viewport height - //! @param theAnchor if not NULL, overrides anchor point + //! @param theCamera [in] camera definition + //! @param theProjection [in] projection matrix to modify + //! @param theWorldView [in/out] world-view matrix to modify + //! @param theViewportWidth [in] viewport width + //! @param theViewportHeight [in] viewport height + //! @param theAnchor [in] if not NULL, overrides anchor point + //! @param theToApplyProjPers [in] if should apply projection persistence to matrix (for orthographic persistence). template void Apply (const Handle(Graphic3d_Camera)& theCamera, const NCollection_Mat4& theProjection, NCollection_Mat4& theWorldView, const Standard_Integer theViewportWidth, const Standard_Integer theViewportHeight, - const gp_Pnt* theAnchor = NULL) const; + const gp_Pnt* theAnchor = NULL, + const Standard_Boolean theToApplyProjPers = true) const; //! Dumps the content of me into the stream Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const; @@ -368,41 +381,50 @@ void Graphic3d_TransformPers::Apply (const Handle(Graphic3d_Camera)& theCamera, NCollection_Mat4& theWorldView, const Standard_Integer theViewportWidth, const Standard_Integer theViewportHeight, - const gp_Pnt* theAnchor) const + const gp_Pnt* theAnchor, + const Standard_Boolean theToApplyProjPers) const { (void )theViewportWidth; - (void )theProjection; if (myMode == Graphic3d_TMF_None || theViewportHeight == 0) { return; } + Handle(Graphic3d_Camera) aCamera = theCamera; + if (IsOrthoPers() && !aCamera->IsOrthographic()) + { + aCamera = new Graphic3d_Camera(*theCamera); // If OrthoPers, copy camera and set to orthographic projection + aCamera->SetProjectionType (Graphic3d_Camera::Projection_Orthographic); + } + + NCollection_Mat4 aWorldView = aCamera->OrientationMatrix(); + // use total size when tiling is active - const Standard_Integer aVPSizeY = theCamera->Tile().IsValid() ? theCamera->Tile().TotalSize.y() : theViewportHeight; + const Standard_Integer aVPSizeY = aCamera->Tile().IsValid() ? aCamera->Tile().TotalSize.y() : theViewportHeight; // a small enough jitter compensation offset // to avoid image dragging within single pixel in corner cases const Standard_Real aJitterComp = 0.001; - if (myMode == Graphic3d_TMF_TriedronPers) + if ((myMode & Graphic3d_TMF_TriedronPers) != 0) { // reset Z focus for trihedron persistence - const Standard_Real aFocus = theCamera->IsOrthographic() - ? theCamera->Distance() - : (theCamera->ZFocusType() == Graphic3d_Camera::FocusType_Relative - ? Standard_Real(theCamera->ZFocus() * theCamera->Distance()) - : Standard_Real(theCamera->ZFocus())); + const Standard_Real aFocus = aCamera->IsOrthographic() + ? aCamera->Distance() + : (aCamera->ZFocusType() == Graphic3d_Camera::FocusType_Relative + ? Standard_Real(aCamera->ZFocus() * aCamera->Distance()) + : Standard_Real(aCamera->ZFocus())); // scale factor to pixels - const gp_XYZ aViewDim = theCamera->ViewDimensions (aFocus); + const gp_XYZ aViewDim = aCamera->ViewDimensions (aFocus); const Standard_Real aScale = Abs(aViewDim.Y()) / Standard_Real(aVPSizeY); - const gp_Dir aForward = theCamera->Direction(); - gp_XYZ aCenter = theCamera->Center().XYZ() + aForward.XYZ() * (aFocus - theCamera->Distance()); + const gp_Dir aForward = aCamera->Direction(); + gp_XYZ aCenter = aCamera->Center().XYZ() + aForward.XYZ() * (aFocus - aCamera->Distance()); if ((myParams.Params2d.Corner & (Aspect_TOTP_LEFT | Aspect_TOTP_RIGHT)) != 0) { const Standard_Real anOffsetX = (Standard_Real(myParams.Params2d.OffsetX) + aJitterComp) * aScale; - const gp_Dir aSide = aForward.Crossed (theCamera->Up()); - const gp_XYZ aDeltaX = aSide.XYZ() * (Abs(aViewDim.X()) * theCamera->NDC2dOffsetX() - anOffsetX); + const gp_Dir aSide = aForward.Crossed (aCamera->Up()); + const gp_XYZ aDeltaX = aSide.XYZ() * (Abs(aViewDim.X()) * aCamera->NDC2dOffsetX() - anOffsetX); if ((myParams.Params2d.Corner & Aspect_TOTP_RIGHT) != 0) { aCenter += aDeltaX; @@ -415,7 +437,7 @@ void Graphic3d_TransformPers::Apply (const Handle(Graphic3d_Camera)& theCamera, if ((myParams.Params2d.Corner & (Aspect_TOTP_TOP | Aspect_TOTP_BOTTOM)) != 0) { const Standard_Real anOffsetY = (Standard_Real(myParams.Params2d.OffsetY) + aJitterComp) * aScale; - const gp_XYZ aDeltaY = theCamera->Up().XYZ() * (Abs(aViewDim.Y()) * theCamera->NDC2dOffsetY() - anOffsetY); + const gp_XYZ aDeltaY = aCamera->Up().XYZ() * (Abs(aViewDim.Y()) * aCamera->NDC2dOffsetY() - anOffsetY); if ((myParams.Params2d.Corner & Aspect_TOTP_TOP) != 0) { aCenter += aDeltaY; @@ -426,27 +448,24 @@ void Graphic3d_TransformPers::Apply (const Handle(Graphic3d_Camera)& theCamera, } } - NCollection_Mat4 aWorldView = theCamera->OrientationMatrix(); Graphic3d_TransformUtils::Translate (aWorldView, aCenter.X(), aCenter.Y(), aCenter.Z()); Graphic3d_TransformUtils::Scale (aWorldView, aScale, aScale, aScale); - theWorldView.ConvertFrom (aWorldView); - return; } - else if (myMode == Graphic3d_TMF_2d) + else if ((myMode & Graphic3d_TMF_2d) != 0) { - const Standard_Real aFocus = theCamera->IsOrthographic() - ? theCamera->Distance() - : (theCamera->ZFocusType() == Graphic3d_Camera::FocusType_Relative - ? Standard_Real(theCamera->ZFocus() * theCamera->Distance()) - : Standard_Real(theCamera->ZFocus())); + const Standard_Real aFocus = aCamera->IsOrthographic() + ? aCamera->Distance() + : (aCamera->ZFocusType() == Graphic3d_Camera::FocusType_Relative + ? Standard_Real(aCamera->ZFocus() * aCamera->Distance()) + : Standard_Real(aCamera->ZFocus())); // scale factor to pixels - const gp_XYZ aViewDim = theCamera->ViewDimensions (aFocus); + const gp_XYZ aViewDim = aCamera->ViewDimensions (aFocus); const Standard_Real aScale = Abs(aViewDim.Y()) / Standard_Real(aVPSizeY); gp_XYZ aCenter (0.0, 0.0, -aFocus); if ((myParams.Params2d.Corner & (Aspect_TOTP_LEFT | Aspect_TOTP_RIGHT)) != 0) { - aCenter.SetX (-aViewDim.X() * theCamera->NDC2dOffsetX() + (Standard_Real(myParams.Params2d.OffsetX) + aJitterComp) * aScale); + aCenter.SetX (-aViewDim.X() * aCamera->NDC2dOffsetX() + (Standard_Real(myParams.Params2d.OffsetX) + aJitterComp) * aScale); if ((myParams.Params2d.Corner & Aspect_TOTP_RIGHT) != 0) { aCenter.SetX (-aCenter.X()); @@ -454,26 +473,24 @@ void Graphic3d_TransformPers::Apply (const Handle(Graphic3d_Camera)& theCamera, } if ((myParams.Params2d.Corner & (Aspect_TOTP_TOP | Aspect_TOTP_BOTTOM)) != 0) { - aCenter.SetY (-aViewDim.Y() * theCamera->NDC2dOffsetY() + (Standard_Real(myParams.Params2d.OffsetY) + aJitterComp) * aScale); + aCenter.SetY (-aViewDim.Y() * aCamera->NDC2dOffsetY() + (Standard_Real(myParams.Params2d.OffsetY) + aJitterComp) * aScale); if ((myParams.Params2d.Corner & Aspect_TOTP_TOP) != 0) { aCenter.SetY (-aCenter.Y()); } } - theWorldView.InitIdentity(); - Graphic3d_TransformUtils::Translate (theWorldView, T(aCenter.X()), T(aCenter.Y()), T(aCenter.Z())); - Graphic3d_TransformUtils::Scale (theWorldView, T(aScale), T(aScale), T(aScale)); - return; + aWorldView.InitIdentity(); + Graphic3d_TransformUtils::Translate (aWorldView, aCenter.X(), aCenter.Y(), aCenter.Z()); + Graphic3d_TransformUtils::Scale (aWorldView, aScale, aScale, aScale); } else if ((myMode & Graphic3d_TMF_CameraPers) != 0) { - theWorldView.InitIdentity(); + aWorldView.InitIdentity(); } else { // Compute reference point for transformation in untransformed projection space. - NCollection_Mat4 aWorldView = theCamera->OrientationMatrix(); if (theAnchor != NULL) { Graphic3d_TransformUtils::Translate (aWorldView, theAnchor->X(), theAnchor->Y(), theAnchor->Z()); @@ -503,12 +520,19 @@ void Graphic3d_TransformPers::Apply (const Handle(Graphic3d_Camera)& theCamera, if ((myMode & Graphic3d_TMF_ZoomPers) != 0) { // lock zooming - Standard_Real aScale = persistentScale (theCamera, theViewportWidth, theViewportHeight); + Standard_Real aScale = persistentScale (aCamera, theViewportWidth, theViewportHeight); Graphic3d_TransformUtils::Scale (aWorldView, aScale, aScale, aScale); } - theWorldView.ConvertFrom (aWorldView); - return; } + + if (!theCamera->IsOrthographic() && IsOrthoPers() && theToApplyProjPers) + { + Graphic3d_Mat4d aProjInv; + aProjInv.ConvertFrom (theProjection.Inverted()); + aWorldView = (aProjInv * aCamera->ProjectionMatrix()) * aWorldView; + } + + theWorldView.ConvertFrom (aWorldView); } // ======================================================================= @@ -555,7 +579,7 @@ void Graphic3d_TransformPers::Apply (const Handle(Graphic3d_Camera)& theCamera, const Standard_Integer theViewportHeight, BVH_Box& theBoundingBox) const { - NCollection_Mat4 aTPers = Compute (theCamera, theProjection, theWorldView, theViewportWidth, theViewportHeight); + NCollection_Mat4 aTPers = Compute (theCamera, theProjection, theWorldView, theViewportWidth, theViewportHeight, false); if (aTPers.IsIdentity() || !theBoundingBox.IsValid()) { @@ -594,7 +618,8 @@ NCollection_Mat4 Graphic3d_TransformPers::Compute (const Handle(Graphic3d_Cam const NCollection_Mat4& theProjection, const NCollection_Mat4& theWorldView, const Standard_Integer theViewportWidth, - const Standard_Integer theViewportHeight) const + const Standard_Integer theViewportHeight, + const Standard_Boolean theToApplyProjPers) const { if (myMode == Graphic3d_TMF_None) { @@ -610,7 +635,7 @@ NCollection_Mat4 Graphic3d_TransformPers::Compute (const Handle(Graphic3d_Cam // compute only world-view matrix difference to avoid floating point instability // caused by projection matrix modifications outside of this algorithm (e.g. by Z-fit) - Apply (theCamera, theProjection, aWorldView, theViewportWidth, theViewportHeight); + Apply (theCamera, theProjection, aWorldView, theViewportWidth, theViewportHeight, NULL, theToApplyProjPers); return anUnviewMat * aWorldView; } diff --git a/src/SelectMgr/SelectMgr_AxisIntersector.cxx b/src/SelectMgr/SelectMgr_AxisIntersector.cxx index 44ff25b752..0fc6438345 100644 --- a/src/SelectMgr/SelectMgr_AxisIntersector.cxx +++ b/src/SelectMgr/SelectMgr_AxisIntersector.cxx @@ -93,6 +93,24 @@ Handle(SelectMgr_BaseIntersector) SelectMgr_AxisIntersector::ScaleAndTransform ( return aRes; } +//======================================================================= +// function : CopyWithBuilder +// purpose : Returns a copy of the frustum using the given frustum builder configuration. +// Returned frustum should be re-constructed before being used. +//======================================================================= +Handle(SelectMgr_BaseIntersector) SelectMgr_AxisIntersector::CopyWithBuilder (const Handle(SelectMgr_FrustumBuilder)& theBuilder) const +{ + (void )theBuilder; + Standard_ASSERT_RAISE(mySelectionType == SelectMgr_SelectionType_Point, + "Error! SelectMgr_AxisIntersector::CopyWithBuilder() should be called after selection axis initialization"); + + Handle(SelectMgr_AxisIntersector) aRes = new SelectMgr_AxisIntersector(); + aRes->myAxis = myAxis; + aRes->mySelectionType = mySelectionType; + + return aRes; +} + // ======================================================================= // function : hasIntersection // purpose : diff --git a/src/SelectMgr/SelectMgr_AxisIntersector.hxx b/src/SelectMgr/SelectMgr_AxisIntersector.hxx index 6a6b60bc09..bd225bf735 100644 --- a/src/SelectMgr/SelectMgr_AxisIntersector.hxx +++ b/src/SelectMgr/SelectMgr_AxisIntersector.hxx @@ -52,6 +52,11 @@ public: const gp_GTrsf& theTrsf, const Handle(SelectMgr_FrustumBuilder)& theBuilder) const Standard_OVERRIDE; + //! Returns a copy of the intersector transformed using the builder configuration given. + //! Builder is an argument that represents corresponding settings for re-constructing transformed frustum from scratch. + //! In this class, builder is not used and theBuilder parameter is ignored. + Standard_EXPORT virtual Handle(SelectMgr_BaseIntersector) CopyWithBuilder (const Handle(SelectMgr_FrustumBuilder)& theBuilder) const Standard_OVERRIDE; + public: //! Intersection test between defined axis and given axis-aligned box diff --git a/src/SelectMgr/SelectMgr_BaseIntersector.hxx b/src/SelectMgr/SelectMgr_BaseIntersector.hxx index e9bd50edfc..e35f04d939 100644 --- a/src/SelectMgr/SelectMgr_BaseIntersector.hxx +++ b/src/SelectMgr/SelectMgr_BaseIntersector.hxx @@ -71,6 +71,11 @@ public: const gp_GTrsf& theTrsf, const Handle(SelectMgr_FrustumBuilder)& theBuilder) const = 0; + //! @param theBuilder [in] argument that represents corresponding settings for re-constructing transformed frustum from scratch; + //! should NOT be NULL. + //! @return a copy of the frustum with the input builder assigned + virtual Handle(SelectMgr_BaseIntersector) CopyWithBuilder (const Handle(SelectMgr_FrustumBuilder)& theBuilder) const = 0; + public: //! Return camera definition. diff --git a/src/SelectMgr/SelectMgr_RectangularFrustum.cxx b/src/SelectMgr/SelectMgr_RectangularFrustum.cxx index 0031c5f275..6ae92c1a0b 100644 --- a/src/SelectMgr/SelectMgr_RectangularFrustum.cxx +++ b/src/SelectMgr/SelectMgr_RectangularFrustum.cxx @@ -449,6 +449,28 @@ Handle(SelectMgr_BaseIntersector) SelectMgr_RectangularFrustum::ScaleAndTransfor return aRes; } +// ======================================================================= +// function : CopyWithBuilder +// purpose : Returns a copy of the frustum using the given frustum builder configuration. +// Returned frustum should be re-constructed before being used. +// ======================================================================= +Handle(SelectMgr_BaseIntersector) SelectMgr_RectangularFrustum::CopyWithBuilder (const Handle(SelectMgr_FrustumBuilder)& theBuilder) const +{ + Standard_ASSERT_RAISE (mySelectionType == SelectMgr_SelectionType_Point || mySelectionType == SelectMgr_SelectionType_Box, + "Error! SelectMgr_RectangularFrustum::CopyWithBuilder() should be called after selection frustum initialization"); + + Standard_ASSERT_RAISE (!theBuilder.IsNull(), + "Error! SelectMgr_RectangularFrustum::CopyWithBuilder() should be called with valid builder"); + + Handle(SelectMgr_RectangularFrustum) aRes = new SelectMgr_RectangularFrustum(); + aRes->mySelectionType = mySelectionType; + aRes->mySelRectangle = mySelRectangle; + aRes->myPixelTolerance = myPixelTolerance; + aRes->SetBuilder (theBuilder); + + return aRes; +} + // ======================================================================= // function : IsScalable // purpose : diff --git a/src/SelectMgr/SelectMgr_RectangularFrustum.hxx b/src/SelectMgr/SelectMgr_RectangularFrustum.hxx index bcebbb626b..4db8c2644e 100644 --- a/src/SelectMgr/SelectMgr_RectangularFrustum.hxx +++ b/src/SelectMgr/SelectMgr_RectangularFrustum.hxx @@ -99,6 +99,13 @@ public: const gp_GTrsf& theTrsf, const Handle(SelectMgr_FrustumBuilder)& theBuilder) const Standard_OVERRIDE; + //! Returns a copy of the frustum using the given frustum builder configuration. + //! Returned frustum should be re-constructed before being used. + //! @param theBuilder [in] argument that represents corresponding settings for re-constructing transformed frustum from scratch; + //! should NOT be NULL. + //! @return a copy of the frustum with the input builder assigned + Standard_EXPORT virtual Handle(SelectMgr_BaseIntersector) CopyWithBuilder (const Handle(SelectMgr_FrustumBuilder)& theBuilder) const Standard_OVERRIDE; + // SAT Tests for different objects //! SAT intersection test between defined volume and given axis-aligned box diff --git a/src/SelectMgr/SelectMgr_SelectableObjectSet.cxx b/src/SelectMgr/SelectMgr_SelectableObjectSet.cxx index 89fb16e790..4979471908 100644 --- a/src/SelectMgr/SelectMgr_SelectableObjectSet.cxx +++ b/src/SelectMgr/SelectMgr_SelectableObjectSet.cxx @@ -241,17 +241,23 @@ namespace //============================================================================= SelectMgr_SelectableObjectSet::SelectMgr_SelectableObjectSet() { - myBVH[BVHSubset_2dPersistent] = new BVH_Tree(); - myBVH[BVHSubset_3dPersistent] = new BVH_Tree(); - myBVH[BVHSubset_3d] = new BVH_Tree(); - - myBuilder[BVHSubset_2dPersistent] = new BVH_LinearBuilder (BVH_Constants_LeafNodeSizeSingle, BVH_Constants_MaxTreeDepth); - myBuilder[BVHSubset_3dPersistent] = new BVH_LinearBuilder (BVH_Constants_LeafNodeSizeSingle, BVH_Constants_MaxTreeDepth); - myBuilder[BVHSubset_3d] = new BVH_BinnedBuilder (BVH_Constants_LeafNodeSizeSingle, BVH_Constants_MaxTreeDepth, Standard_True); - - myIsDirty[BVHSubset_2dPersistent] = Standard_False; - myIsDirty[BVHSubset_3dPersistent] = Standard_False; - myIsDirty[BVHSubset_3d] = Standard_False; + myBVH[BVHSubset_ortho2dPersistent] = new BVH_Tree(); + myBVH[BVHSubset_ortho3dPersistent] = new BVH_Tree(); + myBVH[BVHSubset_2dPersistent] = new BVH_Tree(); + myBVH[BVHSubset_3dPersistent] = new BVH_Tree(); + myBVH[BVHSubset_3d] = new BVH_Tree(); + + myBuilder[BVHSubset_ortho2dPersistent] = new BVH_LinearBuilder (BVH_Constants_LeafNodeSizeSingle, BVH_Constants_MaxTreeDepth); + myBuilder[BVHSubset_ortho3dPersistent] = new BVH_LinearBuilder (BVH_Constants_LeafNodeSizeSingle, BVH_Constants_MaxTreeDepth); + myBuilder[BVHSubset_2dPersistent] = new BVH_LinearBuilder (BVH_Constants_LeafNodeSizeSingle, BVH_Constants_MaxTreeDepth); + myBuilder[BVHSubset_3dPersistent] = new BVH_LinearBuilder (BVH_Constants_LeafNodeSizeSingle, BVH_Constants_MaxTreeDepth); + myBuilder[BVHSubset_3d] = new BVH_BinnedBuilder (BVH_Constants_LeafNodeSizeSingle, BVH_Constants_MaxTreeDepth, Standard_True); + + myIsDirty[BVHSubset_ortho2dPersistent] = Standard_False; + myIsDirty[BVHSubset_ortho3dPersistent] = Standard_False; + myIsDirty[BVHSubset_2dPersistent] = Standard_False; + myIsDirty[BVHSubset_3dPersistent] = Standard_False; + myIsDirty[BVHSubset_3d] = Standard_False; } //============================================================================= @@ -262,10 +268,9 @@ Standard_Boolean SelectMgr_SelectableObjectSet::Append (const Handle(SelectMgr_S { // get an appropriate BVH subset to insert the object into it const Standard_Integer aSubsetIdx = appropriateSubset (theObject); - + // check that the object is excluded from other subsets - if (myObjects[(aSubsetIdx + 1) % BVHSubsetNb].Contains (theObject) - || myObjects[(aSubsetIdx + 2) % BVHSubsetNb].Contains (theObject)) + if (currentSubset (theObject) != -1) { return Standard_False; } @@ -401,9 +406,51 @@ void SelectMgr_SelectableObjectSet::UpdateBVH (const Handle(Graphic3d_Camera)& t myBuilder[BVHSubset_2dPersistent]->Build (&anAdaptor, myBVH[BVHSubset_2dPersistent].get(), anAdaptor.Box()); } + // ------------------------------------------------------------------- + // check and update 3D orthographic persistence BVH tree if necessary + // ------------------------------------------------------------------- + if (!IsEmpty (BVHSubset_ortho3dPersistent) + && (myIsDirty[BVHSubset_ortho3dPersistent] + || myLastViewState.IsChanged (aViewState) + || isWinSizeChanged)) + { + Handle(Graphic3d_Camera) aNewOrthoCam = new Graphic3d_Camera (*theCam); // If OrthoPers, copy camera and set to orthographic projection + aNewOrthoCam->SetProjectionType (Graphic3d_Camera::Projection_Orthographic); + + // construct adaptor over private fields to provide direct access for the BVH builder + BVHBuilderAdaptorPersistent anAdaptor (myObjects[BVHSubset_ortho3dPersistent], + aNewOrthoCam, aNewOrthoCam->ProjectionMatrix(), + aNewOrthoCam->OrientationMatrix(), theWinSize); + + // update corresponding BVH tree data structure + myBuilder[BVHSubset_ortho3dPersistent]->Build (&anAdaptor, myBVH[BVHSubset_ortho3dPersistent].get(), anAdaptor.Box()); + } + + // ------------------------------------------------------------------- + // check and update 2D orthographic persistence BVH tree if necessary + // ------------------------------------------------------------------- + if (!IsEmpty (BVHSubset_ortho2dPersistent) + && (myIsDirty[BVHSubset_ortho2dPersistent] + || myLastViewState.IsProjectionChanged (aViewState) + || isWinSizeChanged)) + { + Handle(Graphic3d_Camera) aNewOrthoCam = new Graphic3d_Camera (*theCam); // If OrthoPers, copy camera and set to orthographic projection + aNewOrthoCam->SetProjectionType (Graphic3d_Camera::Projection_Orthographic); + + // construct adaptor over private fields to provide direct access for the BVH builder + BVHBuilderAdaptorPersistent anAdaptor (myObjects[BVHSubset_ortho2dPersistent], + aNewOrthoCam, aNewOrthoCam->ProjectionMatrix(), + SelectMgr_SelectableObjectSet_THE_IDENTITY_MAT, theWinSize); + + // update corresponding BVH tree data structure + myBuilder[BVHSubset_ortho2dPersistent]->Build (&anAdaptor, myBVH[BVHSubset_ortho2dPersistent].get(), anAdaptor.Box()); + } + // release dirty state for every subset - myIsDirty[BVHSubset_3dPersistent] = Standard_False; - myIsDirty[BVHSubset_2dPersistent] = Standard_False; + myIsDirty[BVHSubset_3dPersistent] = Standard_False; + myIsDirty[BVHSubset_2dPersistent] = Standard_False; + myIsDirty[BVHSubset_ortho3dPersistent] = Standard_False; + myIsDirty[BVHSubset_ortho2dPersistent] = Standard_False; // keep last view state myLastViewState = aViewState; @@ -419,9 +466,11 @@ void SelectMgr_SelectableObjectSet::UpdateBVH (const Handle(Graphic3d_Camera)& t //============================================================================= void SelectMgr_SelectableObjectSet::MarkDirty() { - myIsDirty[BVHSubset_3d] = Standard_True; - myIsDirty[BVHSubset_3dPersistent] = Standard_True; - myIsDirty[BVHSubset_2dPersistent] = Standard_True; + myIsDirty[BVHSubset_3d] = Standard_True; + myIsDirty[BVHSubset_3dPersistent] = Standard_True; + myIsDirty[BVHSubset_2dPersistent] = Standard_True; + myIsDirty[BVHSubset_ortho3dPersistent] = Standard_True; + myIsDirty[BVHSubset_ortho2dPersistent] = Standard_True; } //======================================================================= //function : DumpJson diff --git a/src/SelectMgr/SelectMgr_SelectableObjectSet.hxx b/src/SelectMgr/SelectMgr_SelectableObjectSet.hxx index c8cb188fcf..fa1a736701 100644 --- a/src/SelectMgr/SelectMgr_SelectableObjectSet.hxx +++ b/src/SelectMgr/SelectMgr_SelectableObjectSet.hxx @@ -42,11 +42,22 @@ public: //! needs to be updated only when camera's projection changes. Bounding volumes for this object subclass //! is represented directly in eye space coordinates. //! This subset uses linear BVH builder with 32 levels of depth and 1 element per leaf. + //! - BVHSubset_ortho3dPersistent refers to the subset of 3D persistent selectable objects (rotate, pan, zoom persistence) + //! that contains `Graphic3d_TMF_OrthoPers` persistence mode. + //! Associated BVH tree needs to be updated when either the camera's projection and position change. + //! This subset uses linear BVH builder with 32 levels of depth and 1 element per leaf. + //! - BVHSubset_ortho2dPersistent refers to the subset of 2D persistent selectable objects + //! that contains `Graphic3d_TMF_OrthoPers` persistence mode. Associated BVH tree + //! needs to be updated only when camera's projection changes. Bounding volumes for this object subclass + //! is represented directly in eye space coordinates. + //! This subset uses linear BVH builder with 32 levels of depth and 1 element per leaf. enum BVHSubset { BVHSubset_3d, BVHSubset_3dPersistent, BVHSubset_2dPersistent, + BVHSubset_ortho3dPersistent, + BVHSubset_ortho2dPersistent, BVHSubsetNb }; @@ -140,7 +151,9 @@ public: { return myObjects[BVHSubset_3d].Contains (theObject) || myObjects[BVHSubset_3dPersistent].Contains (theObject) - || myObjects[BVHSubset_2dPersistent].Contains (theObject); + || myObjects[BVHSubset_2dPersistent].Contains (theObject) + || myObjects[BVHSubset_ortho3dPersistent].Contains (theObject) + || myObjects[BVHSubset_ortho2dPersistent].Contains (theObject); } //! Returns true if the object set does not contain any selectable objects. @@ -148,7 +161,9 @@ public: { return myObjects[BVHSubset_3d].IsEmpty() && myObjects[BVHSubset_3dPersistent].IsEmpty() - && myObjects[BVHSubset_2dPersistent].IsEmpty(); + && myObjects[BVHSubset_2dPersistent].IsEmpty() + && myObjects[BVHSubset_ortho3dPersistent].IsEmpty() + && myObjects[BVHSubset_ortho2dPersistent].IsEmpty(); } //! Returns true if the specified object subset is empty. @@ -192,10 +207,18 @@ private: } return SelectMgr_SelectableObjectSet::BVHSubset_3d; } - else if (theObject->TransformPersistence()->Mode() == Graphic3d_TMF_2d) + else if ((theObject->TransformPersistence()->Mode() & Graphic3d_TMF_2d) != 0) { + if (theObject->TransformPersistence()->IsOrthoPers()) + { + return SelectMgr_SelectableObjectSet::BVHSubset_ortho2dPersistent; + } return SelectMgr_SelectableObjectSet::BVHSubset_2dPersistent; } + else if (theObject->TransformPersistence()->IsOrthoPers()) + { + return SelectMgr_SelectableObjectSet::BVHSubset_ortho3dPersistent; + } else { return SelectMgr_SelectableObjectSet::BVHSubset_3dPersistent; diff --git a/src/SelectMgr/SelectMgr_SelectingVolumeManager.cxx b/src/SelectMgr/SelectMgr_SelectingVolumeManager.cxx index d33ea30427..db1e25fabe 100644 --- a/src/SelectMgr/SelectMgr_SelectingVolumeManager.cxx +++ b/src/SelectMgr/SelectMgr_SelectingVolumeManager.cxx @@ -67,6 +67,28 @@ SelectMgr_SelectingVolumeManager SelectMgr_SelectingVolumeManager::ScaleAndTrans return aMgr; } +//======================================================================= +// function : CopyWithBuilder +// purpose : Returns a copy of the selecting volume manager and its active frustum re-constructed using the passed builder. +// Builder is an argument that represents corresponding settings for re-constructing transformed +// frustum from scratch. +//======================================================================= +SelectMgr_SelectingVolumeManager SelectMgr_SelectingVolumeManager::CopyWithBuilder (const Handle(SelectMgr_FrustumBuilder)& theBuilder) const +{ + SelectMgr_SelectingVolumeManager aMgr; + aMgr.myToAllowOverlap = myToAllowOverlap; + aMgr.myViewClipPlanes = myViewClipPlanes; + aMgr.myObjectClipPlanes = myObjectClipPlanes; + aMgr.myViewClipRange = myViewClipRange; + if (!myActiveSelectingVolume.IsNull()) + { + aMgr.myActiveSelectingVolume = myActiveSelectingVolume->CopyWithBuilder (theBuilder); + aMgr.BuildSelectingVolume(); + } + + return aMgr; +} + //======================================================================= // function : GetActiveSelectionType // purpose : diff --git a/src/SelectMgr/SelectMgr_SelectingVolumeManager.hxx b/src/SelectMgr/SelectMgr_SelectingVolumeManager.hxx index aed25cd94a..0dd115ffc0 100644 --- a/src/SelectMgr/SelectMgr_SelectingVolumeManager.hxx +++ b/src/SelectMgr/SelectMgr_SelectingVolumeManager.hxx @@ -81,6 +81,11 @@ public: const gp_GTrsf& theTrsf, const Handle(SelectMgr_FrustumBuilder)& theBuilder) const; + //! Returns a copy of the selecting volume manager and its active frustum re-constructed using the passed builder. + //! Builder is an argument that represents corresponding settings for re-constructing transformed + //! frustum from scratch. + Standard_EXPORT virtual SelectMgr_SelectingVolumeManager CopyWithBuilder (const Handle(SelectMgr_FrustumBuilder)& theBuilder) const; + public: //! Returns current camera definition. diff --git a/src/SelectMgr/SelectMgr_TriangularFrustum.cxx b/src/SelectMgr/SelectMgr_TriangularFrustum.cxx index efaf686e28..05abc17df2 100644 --- a/src/SelectMgr/SelectMgr_TriangularFrustum.cxx +++ b/src/SelectMgr/SelectMgr_TriangularFrustum.cxx @@ -189,6 +189,20 @@ Handle(SelectMgr_BaseIntersector) SelectMgr_TriangularFrustum::ScaleAndTransform return aRes; } +//======================================================================= +// function : CopyWithBuilder +// purpose : Returns a copy of the frustum using the given frustum builder configuration. +// Returned frustum should be re-constructed before being used. +//======================================================================= +Handle(SelectMgr_BaseIntersector) SelectMgr_TriangularFrustum::CopyWithBuilder (const Handle(SelectMgr_FrustumBuilder)& theBuilder) const +{ + Handle(SelectMgr_TriangularFrustum) aRes = new SelectMgr_TriangularFrustum(); + aRes->mySelTriangle = mySelTriangle; + aRes->SetBuilder (theBuilder); + + return aRes; +} + //======================================================================= // function : OverlapsBox // purpose : SAT intersection test between defined volume and diff --git a/src/SelectMgr/SelectMgr_TriangularFrustum.hxx b/src/SelectMgr/SelectMgr_TriangularFrustum.hxx index a13067b033..0255b6f61b 100644 --- a/src/SelectMgr/SelectMgr_TriangularFrustum.hxx +++ b/src/SelectMgr/SelectMgr_TriangularFrustum.hxx @@ -55,6 +55,13 @@ public: const gp_GTrsf& theTrsf, const Handle(SelectMgr_FrustumBuilder)& theBuilder) const Standard_OVERRIDE; + //! Returns a copy of the frustum using the given frustum builder configuration. + //! Returned frustum should be re-constructed before being used. + //! @param theBuilder [in] argument that represents corresponding settings for re-constructing transformed frustum from scratch; + //! should NOT be NULL. + //! @return a copy of the frustum with the input builder assigned + Standard_EXPORT virtual Handle(SelectMgr_BaseIntersector) CopyWithBuilder (const Handle(SelectMgr_FrustumBuilder)& theBuilder) const Standard_OVERRIDE; + public: //! @name SAT Tests for different objects //! SAT intersection test between defined volume and given axis-aligned box diff --git a/src/SelectMgr/SelectMgr_TriangularFrustumSet.cxx b/src/SelectMgr/SelectMgr_TriangularFrustumSet.cxx index 907a854061..0df5e595af 100644 --- a/src/SelectMgr/SelectMgr_TriangularFrustumSet.cxx +++ b/src/SelectMgr/SelectMgr_TriangularFrustumSet.cxx @@ -186,6 +186,32 @@ Handle(SelectMgr_BaseIntersector) SelectMgr_TriangularFrustumSet::ScaleAndTransf return aRes; } +//======================================================================= +// function : CopyWithBuilder +// purpose : Returns a copy of the frustum using the given frustum builder configuration. +// Returned frustum should be re-constructed before being used. +//======================================================================= +Handle(SelectMgr_BaseIntersector) SelectMgr_TriangularFrustumSet::CopyWithBuilder (const Handle(SelectMgr_FrustumBuilder)& theBuilder) const +{ + Standard_ASSERT_RAISE (mySelectionType == SelectMgr_SelectionType_Polyline, + "Error! SelectMgr_TriangularFrustumSet::CopyWithBuilder() should be called after selection frustum initialization"); + + Standard_ASSERT_RAISE (!theBuilder.IsNull(), + "Error! SelectMgr_TriangularFrustumSet::CopyWithBuilder() should be called with valid builder"); + + Handle(SelectMgr_TriangularFrustumSet) aRes = new SelectMgr_TriangularFrustumSet(); + aRes->SetCamera (myCamera); + for (SelectMgr_TriangFrustums::Iterator anIter (myFrustums); anIter.More(); anIter.Next()) + { + aRes->myFrustums.Append (Handle(SelectMgr_TriangularFrustum)::DownCast (anIter.Value()->CopyWithBuilder (theBuilder))); + } + aRes->mySelectionType = mySelectionType; + aRes->mySelPolyline = mySelPolyline; + aRes->myToAllowOverlap = myToAllowOverlap; + aRes->SetBuilder (theBuilder); + return aRes; +} + // ======================================================================= // function : OverlapsBox // purpose : diff --git a/src/SelectMgr/SelectMgr_TriangularFrustumSet.hxx b/src/SelectMgr/SelectMgr_TriangularFrustumSet.hxx index 694c3efc55..5f8c170351 100644 --- a/src/SelectMgr/SelectMgr_TriangularFrustumSet.hxx +++ b/src/SelectMgr/SelectMgr_TriangularFrustumSet.hxx @@ -62,6 +62,13 @@ public: const gp_GTrsf& theTrsf, const Handle(SelectMgr_FrustumBuilder)& theBuilder) const Standard_OVERRIDE; + //! Returns a copy of the frustum using the given frustum builder configuration. + //! Returned frustum should be re-constructed before being used. + //! @param theBuilder [in] argument that represents corresponding settings for re-constructing transformed frustum from scratch; + //! should NOT be NULL. + //! @return a copy of the frustum with the input builder assigned + Standard_EXPORT virtual Handle(SelectMgr_BaseIntersector) CopyWithBuilder (const Handle(SelectMgr_FrustumBuilder)& theBuilder) const Standard_OVERRIDE; + public: Standard_EXPORT virtual Standard_Boolean OverlapsBox (const SelectMgr_Vec3& theMinPnt, diff --git a/src/SelectMgr/SelectMgr_ViewerSelector.cxx b/src/SelectMgr/SelectMgr_ViewerSelector.cxx index 4370d4cee0..6c23ee7ee9 100644 --- a/src/SelectMgr/SelectMgr_ViewerSelector.cxx +++ b/src/SelectMgr/SelectMgr_ViewerSelector.cxx @@ -138,12 +138,12 @@ void SelectMgr_ViewerSelector::updatePoint3d (SelectMgr_SortCriterion& theCriter case SelectMgr_TypeOfDepthTolerance_UniformPixels: case SelectMgr_TypeOfDepthTolerance_SensitivityFactor: { - if (mySelectingVolumeMgr.Camera().IsNull()) + if (theMgr.Camera().IsNull()) { // fallback for an arbitrary projection matrix theCriterion.Tolerance = aSensFactor / 33.0; } - else if (mySelectingVolumeMgr.Camera()->IsOrthographic()) + else if (theMgr.Camera()->IsOrthographic()) { theCriterion.Tolerance = myCameraScale * aSensFactor; } @@ -634,6 +634,9 @@ void SelectMgr_ViewerSelector::TraverseSensitives (const Standard_Integer theVie Graphic3d_Vec2i aWinSize; mySelectingVolumeMgr.WindowSize (aWinSize.x(), aWinSize.y()); + const double aPixelSize = aWinSize.x() > 0 && aWinSize.y() > 0 + ? Max (1.0 / aWinSize.x(), 1.0 / aWinSize.y()) + : 1.0; const Handle(Graphic3d_Camera)& aCamera = mySelectingVolumeMgr.Camera(); Graphic3d_Mat4d aProjectionMat, aWorldViewMat; @@ -646,11 +649,6 @@ void SelectMgr_ViewerSelector::TraverseSensitives (const Standard_Integer theVie myCameraEye = aCamera->Eye().XYZ(); myCameraDir = aCamera->Direction().XYZ(); - myCameraScale = aCamera->IsOrthographic() - ? aCamera->Scale() - : 2.0 * Tan (aCamera->FOVy() * M_PI / 360.0); - const double aPixelSize = Max (1.0 / aWinSize.x(), 1.0 / aWinSize.y()); - myCameraScale *= aPixelSize; } mySelectableObjects.UpdateBVH (aCamera, aWinSize); @@ -672,7 +670,8 @@ void SelectMgr_ViewerSelector::TraverseSensitives (const Standard_Integer theVie // for 2D space selection transform selecting volumes to perform overlap testing // directly in camera's eye space omitting the camera position, which is not // needed there at all - if (aBVHSubset == SelectMgr_SelectableObjectSet::BVHSubset_2dPersistent) + if (aBVHSubset == SelectMgr_SelectableObjectSet::BVHSubset_2dPersistent + || aBVHSubset == SelectMgr_SelectableObjectSet::BVHSubset_ortho2dPersistent) { gp_GTrsf aTFrustum; aTFrustum.SetValue (1, 1, aWorldViewMat.GetValue (0, 0)); @@ -688,22 +687,46 @@ void SelectMgr_ViewerSelector::TraverseSensitives (const Standard_Integer theVie aWorldViewMat.GetValue (1, 3), aWorldViewMat.GetValue (2, 3))); - // define corresponding frustum builder parameters + // define corresponding frustum builder parameters for 2d persistence. Handle(SelectMgr_FrustumBuilder) aBuilder = new SelectMgr_FrustumBuilder(); Handle(Graphic3d_Camera) aNewCamera = new Graphic3d_Camera(); aNewCamera->CopyMappingData (aCamera); aNewCamera->SetIdentityOrientation(); + if (aBVHSubset == SelectMgr_SelectableObjectSet::BVHSubset_ortho2dPersistent) + { + aNewCamera->SetProjectionType (Graphic3d_Camera::Projection_Orthographic); + } aWorldViewMat = aNewCamera->OrientationMatrix(); // should be identity matrix aProjectionMat = aNewCamera->ProjectionMatrix(); // should be the same to aProjectionMat aBuilder->SetCamera (aNewCamera); aBuilder->SetWindowSize (aWinSize.x(), aWinSize.y()); aMgr = mySelectingVolumeMgr.ScaleAndTransform (1, aTFrustum, aBuilder); } + else if (aBVHSubset == SelectMgr_SelectableObjectSet::BVHSubset_ortho3dPersistent) + { + // define corresponding frustum builder parameters for 3d orthographic persistence. + Handle(SelectMgr_FrustumBuilder) aBuilder = new SelectMgr_FrustumBuilder(); + Handle(Graphic3d_Camera) aNewCamera = new Graphic3d_Camera (*aCamera); + aNewCamera->SetProjectionType (Graphic3d_Camera::Projection_Orthographic); + aWorldViewMat = aNewCamera->OrientationMatrix(); // should be the same to aWorldViewMat + aProjectionMat = aNewCamera->ProjectionMatrix(); // should be orthographic projection + aBuilder->SetCamera (aNewCamera); + aBuilder->SetWindowSize (aWinSize.x(), aWinSize.y()); + aMgr = mySelectingVolumeMgr.CopyWithBuilder (aBuilder); + } else { aMgr = mySelectingVolumeMgr; } + if (!aMgr.Camera().IsNull()) + { + myCameraScale = aMgr.Camera()->IsOrthographic() + ? aMgr.Camera()->Scale() + : 2.0 * Tan (aMgr.Camera()->FOVy() * M_PI / 360.0); + myCameraScale *= aPixelSize; + } + const opencascade::handle >& aBVHTree = mySelectableObjects.BVH (aBVHSubset); Standard_Integer aNode = 0; diff --git a/src/SelectMgr/SelectMgr_ViewerSelector.hxx b/src/SelectMgr/SelectMgr_ViewerSelector.hxx index a9dd146cba..4537080f63 100644 --- a/src/SelectMgr/SelectMgr_ViewerSelector.hxx +++ b/src/SelectMgr/SelectMgr_ViewerSelector.hxx @@ -328,7 +328,7 @@ protected: //! @param theObject [in] the selectable object for traversal. //! @param theMgr [in] the (un)transformed copy of the selecting volume manager representing active selection frustum. //! @param theCamera, theProjectionMat, theWorldViewMat [in] the source camera and matrices for theMgr given. - //! @param theViewportWidth, theViewportHeight [in] viewport (window) dimensions for evaluating + //! @param theWinSize [in] viewport (window) dimensions for evaluating //! object's transformation persistence. Standard_EXPORT void traverseObject (const Handle(SelectMgr_SelectableObject)& theObject, const SelectMgr_SelectingVolumeManager& theMgr, diff --git a/src/ViewerTest/ViewerTest.cxx b/src/ViewerTest/ViewerTest.cxx index 9fb0cfea5a..43aced25af 100644 --- a/src/ViewerTest/ViewerTest.cxx +++ b/src/ViewerTest/ViewerTest.cxx @@ -5100,6 +5100,24 @@ static int VDisplay2 (Draw_Interpretor& theDI, aTrsfPers = new Graphic3d_TransformPers (aTrsfPers->Mode(), Aspect_TypeOfTriedronPosition (aCorner), Graphic3d_Vec2i (aZ.IntegerValue())); } } + else if (aNameCase == "-trsfPersOrtho") + { + if (aTrsfPers.IsNull()) + { + Message::SendFail() << "Error: wrong syntax at " << aName << "."; + return 1; + } + + toSetTrsfPers = Standard_True; + if (aTrsfPers->IsZoomOrRotate()) + { + aTrsfPers = new Graphic3d_TransformPers (aTrsfPers->Mode() | Graphic3d_TMF_OrthoPers, aTrsfPers->AnchorPoint()); + } + else if (aTrsfPers->IsTrihedronOr2d()) + { + aTrsfPers = new Graphic3d_TransformPers (aTrsfPers->Mode() | Graphic3d_TMF_OrthoPers, aTrsfPers->Corner2d(), aTrsfPers->Offset2d()); + } + } else if (aNameCase == "-layer" || aNameCase == "-zlayer") { @@ -6630,42 +6648,45 @@ If last 3 optional parameters are not set prints numbers of U-, V- isolines and addCmd ("vdisplay", VDisplay2, /* [vdisplay] */ R"( vdisplay [-noupdate|-update] [-mutable] [-neutral] - [-trsfPers {zoom|rotate|zoomRotate|none}=none] + [-trsfPers {zoom|rotate|zoomRotate|trihedron|none}=none] [-trsfPersPos X Y [Z]] [-3d] [-2d|-trihedron [{top|bottom|left|right|topLeft |topRight|bottomLeft|bottomRight} [offsetX offsetY]]] + [-trsfPersOrtho] [-dispMode mode] [-highMode mode] [-layer index] [-top|-topmost|-overlay|-underlay] [-redisplay] [-erased] [-noecho] [-autoTriangulation {0|1}] name1 [name2] ... [name n] Displays named objects. - -noupdate Suppresses viewer redraw call. - -mutable Enables optimizations for mutable objects. - -neutral Draws objects in main viewer. - -erased Loads the object into context, but does not display it. - -layer Sets z-layer for objects. - Alternatively -overlay|-underlay|-top|-topmost - options can be used for the default z-layers. - -top Draws object on top of main presentations - but below topmost. - -topmost Draws in overlay for 3D presentations. - with independent Depth. - -overlay Draws objects in overlay for 2D presentations. - (On-Screen-Display) - -underlay Draws objects in underlay for 2D presentations. - (On-Screen-Display) + -noupdate Suppresses viewer redraw call. + -mutable Enables optimizations for mutable objects. + -neutral Draws objects in main viewer. + -erased Loads the object into context, but does not display it. + -layer Sets z-layer for objects. + Alternatively -overlay|-underlay|-top|-topmost + options can be used for the default z-layers. + -top Draws object on top of main presentations + but below topmost. + -topmost Draws in overlay for 3D presentations. + with independent Depth. + -overlay Draws objects in overlay for 2D presentations. + (On-Screen-Display) + -underlay Draws objects in underlay for 2D presentations. + (On-Screen-Display) -selectable|-noselect Controls selection of objects. - -trsfPers Sets a transform persistence flags. - -trsfPersPos Sets an anchor point for transform persistence. - -2d Displays object in screen coordinates. - (DY looks up) - -dispmode Sets display mode for objects. - -highmode Sets hilight mode for objects. - -redisplay Recomputes presentation of objects. - -noecho Avoid printing of command results. - -autoTriang Enable/disable auto-triangulation for displayed shape. + -trsfPers Sets a transform persistence flags. + -trsfPersPos Sets an anchor point for transform persistence. + -2d Displays object in screen coordinates. + (DY looks up) + -trsfPersOrtho Set orthographic transform persistence. + (Objects shown with orthographic projection) + -dispmode Sets display mode for objects. + -highmode Sets hilight mode for objects. + -redisplay Recomputes presentation of objects. + -noecho Avoid printing of command results. + -autoTriang Enable/disable auto-triangulation for displayed shape. )" /* [vdisplay] */); addCmd ("vnbdisplayed", VNbDisplayed, /* [vnbdisplayed] */ R"( diff --git a/src/ViewerTest/ViewerTest_ViewerCommands.cxx b/src/ViewerTest/ViewerTest_ViewerCommands.cxx index 0de77278ea..d700adce80 100644 --- a/src/ViewerTest/ViewerTest_ViewerCommands.cxx +++ b/src/ViewerTest/ViewerTest_ViewerCommands.cxx @@ -13686,6 +13686,12 @@ static int VViewCube (Draw_Interpretor& , { aViewCube->SetAxesSphereRadius (Draw::Atof (theArgVec[++anArgIter])); } + else if (anArg == "-orthopers") + { + const Handle(Graphic3d_TransformPers)& aTrsfPers = aViewCube->TransformPersistence(); + Handle(Graphic3d_TransformPers) anOrthoPers = new Graphic3d_TransformPers (Graphic3d_TMF_TriedronPers | Graphic3d_TMF_OrthoPers, aTrsfPers->Corner2d(), aTrsfPers->Offset2d()); + aViewCube->SetTransformPersistence (anOrthoPers); + } else { Message::SendFail() << "Syntax error: unknown argument '" << anArg << "'"; @@ -14983,6 +14989,7 @@ Displays interactive view manipulation object. Options: -axesSphereRadius Value radius of the sphere (central point) of trihedron -fixedAnimation {0|1} uninterruptible animation loop -duration Seconds animation duration in seconds + -orthoPers force orthographic projection persistence. )" /* [vviewcube] */); addCmd ("vcolorconvert", VColorConvert, /* [vcolorconvert] */ R"( diff --git a/tests/v3d/viewcube/orthopers b/tests/v3d/viewcube/orthopers new file mode 100644 index 0000000000..5c240ed0ea --- /dev/null +++ b/tests/v3d/viewcube/orthopers @@ -0,0 +1,37 @@ +puts "==================================" +puts "0028954: Visualization - compare AIS_ViewCube on perspective view with and without orthographic persistence" +puts "==================================" + +pload MODELING VISUALIZATION +vclear +vinit View1 +vcamera -persp + +box b 15 20 70 +vdisplay -dispMode 1 b +vaxo +vfit +vviewcube vc -fixedAnimation 1 -duration 0 -orthoPers + +vmoveto 70 350 +if {[vreadpixel 95 350 name rgb] != "GRAY62"} { puts "Error: Highlighting of view cube Side is wrong." } +vmoveto 0 0 +vdump $imagedir/${casename}_axo.png + +# check FRONT side +vselect 70 340 +if {[vreadpixel 255 300 name rgb] != "BLACK"} { puts "Error: Position of FRONT camera is wrong." } +vdump $imagedir/${casename}_side.png + +# check FRONT/TOP edge +vselect 110 270 +if {[vreadpixel 100 320 name rgb] != "GRAY57"} { puts "Error: Position of FRONT-TOP camera is wrong." } +if {[vreadpixel 100 310 name rgb] != "CYAN"} { puts "Error: Position of FRONT-TOP camera is wrong." } +vdump $imagedir/${casename}_edge.png + +# Check vertex +vselect 140 310 +if {[vreadpixel 100 290 name rgb] != "GRAY41"} { puts "Error: Position of TOP-FRONT-RIGHT camera is wrong." } +if {[vreadpixel 100 310 name rgb] != "CYAN"} { puts "Error: Position of TOP-FRONT-RIGHT camera is wrong." } +if {[vreadpixel 100 320 name rgb] != "GRAY62"} { puts "Error: Position of TOP-FRONT-RIGHT camera is wrong." } +vdump $imagedir/${casename}_corner.png From dec56592ddc4f7748b176c4c13041dd76cc7a532 Mon Sep 17 00:00:00 2001 From: ichesnok Date: Thu, 18 Jan 2024 13:55:38 +0000 Subject: [PATCH 538/639] 0032980: Data Exchange - STEP import produce a crash Check on null for loop added --- src/StepToTopoDS/StepToTopoDS_TranslateFace.cxx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/StepToTopoDS/StepToTopoDS_TranslateFace.cxx b/src/StepToTopoDS/StepToTopoDS_TranslateFace.cxx index 4c0462a2c6..8e9804c5b7 100644 --- a/src/StepToTopoDS/StepToTopoDS_TranslateFace.cxx +++ b/src/StepToTopoDS/StepToTopoDS_TranslateFace.cxx @@ -545,7 +545,10 @@ void StepToTopoDS_TranslateFace::Init(const Handle(StepShape_FaceSurface)& FS, #endif FaceBound = FS->BoundsValue(i); Loop = FaceBound->Bound(); - + if (Loop.IsNull()) + { + continue; + } // ------------------------ // The Loop is a VertexLoop // ------------------------ From 7b9bda716ef94aa4b9da678c766e0372ba0a9226 Mon Sep 17 00:00:00 2001 From: ichesnok Date: Fri, 19 Jan 2024 15:45:16 +0000 Subject: [PATCH 539/639] 0025188: Data Exchange, Step Export - Losing shapes after import Check on null for description added to WriteStep methods (for product, product_definition and product_definition_formation) --- src/RWStepBasic/RWStepBasic_RWProduct.cxx | 9 ++++++++- src/RWStepBasic/RWStepBasic_RWProductDefinition.cxx | 9 ++++++++- .../RWStepBasic_RWProductDefinitionFormation.cxx | 9 ++++++++- tests/bugs/step/bug25168 | 2 -- 4 files changed, 24 insertions(+), 5 deletions(-) diff --git a/src/RWStepBasic/RWStepBasic_RWProduct.cxx b/src/RWStepBasic/RWStepBasic_RWProduct.cxx index 63a8754ec5..38efe20277 100644 --- a/src/RWStepBasic/RWStepBasic_RWProduct.cxx +++ b/src/RWStepBasic/RWStepBasic_RWProduct.cxx @@ -91,7 +91,14 @@ void RWStepBasic_RWProduct::WriteStep // --- own field : description --- - SW.Send(ent->Description()); + if (!ent->Description().IsNull()) + { + SW.Send(ent->Description()); + } + else + { + SW.SendUndef(); + } // --- own field : frameOfReference --- diff --git a/src/RWStepBasic/RWStepBasic_RWProductDefinition.cxx b/src/RWStepBasic/RWStepBasic_RWProductDefinition.cxx index 6ff8bb97d9..3a64a42529 100644 --- a/src/RWStepBasic/RWStepBasic_RWProductDefinition.cxx +++ b/src/RWStepBasic/RWStepBasic_RWProductDefinition.cxx @@ -78,7 +78,14 @@ void RWStepBasic_RWProductDefinition::WriteStep // --- own field : description --- - SW.Send(ent->Description()); + if (!ent->Description().IsNull()) + { + SW.Send(ent->Description()); + } + else + { + SW.SendUndef(); + } // --- own field : formation --- diff --git a/src/RWStepBasic/RWStepBasic_RWProductDefinitionFormation.cxx b/src/RWStepBasic/RWStepBasic_RWProductDefinitionFormation.cxx index 895908511e..cbc08a6d56 100644 --- a/src/RWStepBasic/RWStepBasic_RWProductDefinitionFormation.cxx +++ b/src/RWStepBasic/RWStepBasic_RWProductDefinitionFormation.cxx @@ -71,7 +71,14 @@ void RWStepBasic_RWProductDefinitionFormation::WriteStep // --- own field : description --- - SW.Send(ent->Description()); + if (!ent->Description().IsNull()) + { + SW.Send(ent->Description()); + } + else + { + SW.SendUndef(); + } // --- own field : ofProduct --- diff --git a/tests/bugs/step/bug25168 b/tests/bugs/step/bug25168 index 2d317cf678..fca792b1eb 100644 --- a/tests/bugs/step/bug25168 +++ b/tests/bugs/step/bug25168 @@ -1,5 +1,3 @@ -puts "TODO OCC25188 ALL: Error: File " - puts "========" puts "OCC25168" puts "========" From 80705eaf3181f779d6f59bbe0959e1acafb8fc94 Mon Sep 17 00:00:00 2001 From: ichesnok Date: Thu, 18 Jan 2024 14:41:27 +0000 Subject: [PATCH 540/639] 0033569: Data Exchange, STEP - Crash when reading multi-body file Datum reading changed in ReadDatums() method: using DatumSystemAP242 (DatumSystem or DatumReference) array instead of DatumSystem array (DatumReference) --- src/STEPCAFControl/STEPCAFControl_Reader.cxx | 35 +++++++++++++++++--- tests/bugs/step/bug33569 | 13 ++++++++ 2 files changed, 43 insertions(+), 5 deletions(-) create mode 100644 tests/bugs/step/bug33569 diff --git a/src/STEPCAFControl/STEPCAFControl_Reader.cxx b/src/STEPCAFControl/STEPCAFControl_Reader.cxx index 1e5d1227a9..9d4a3fc220 100644 --- a/src/STEPCAFControl/STEPCAFControl_Reader.cxx +++ b/src/STEPCAFControl/STEPCAFControl_Reader.cxx @@ -2553,11 +2553,36 @@ static Standard_Boolean ReadDatums(const Handle(XCAFDoc_ShapeTool) &STool, const Handle(StepDimTol_GeometricToleranceWithDatumReference)& GTWDR) { if (GTWDR.IsNull()) return Standard_False; - Handle(StepDimTol_HArray1OfDatumReference) HADR = GTWDR->DatumSystem(); - if (HADR.IsNull()) return Standard_False; - for (Standard_Integer idr = 1; idr <= HADR->Length(); idr++) { - Handle(StepDimTol_DatumReference) DR = HADR->Value(idr); - Handle(StepDimTol_Datum) aDatum = DR->ReferencedDatum(); + Handle(StepDimTol_HArray1OfDatumSystemOrReference) aHADSOR = GTWDR->DatumSystemAP242(); + if (aHADSOR.IsNull()) + { + return Standard_False; + } + NCollection_List aDatumList; + for (Standard_Integer idr = 1; idr <= aHADSOR->Length(); idr++) + { + const StepDimTol_DatumSystemOrReference aDSOR = aHADSOR->Value(idr); + if (aDSOR.IsNull()) continue; + Handle(StepDimTol_DatumSystem) aDS = aDSOR.DatumSystem(); + Handle(StepDimTol_DatumReference) aDR = aDSOR.DatumReference(); + Handle(StepDimTol_Datum) aDatum; + if (!aDS.IsNull()) + { + auto aDatumConList = aDS->Constituents(); + for (Standard_Integer anInd = 1; anInd <= aDatumConList->Length(); anInd++) + { + Handle(StepDimTol_DatumReferenceCompartment) aDatRefC = aDatumConList->Value(anInd); + aDatumList.Append(aDatRefC->Base().Datum()); + } + } + else if (!aDR.IsNull()) + { + aDatumList.Append(aDR->ReferencedDatum()); + } + } + for(NCollection_List::Iterator anIt(aDatumList); anIt.More(); anIt.Next()) + { + Handle(StepDimTol_Datum) aDatum = anIt.Value(); if (aDatum.IsNull()) continue; Interface_EntityIterator subs4 = graph.Sharings(aDatum); for (subs4.Start(); subs4.More(); subs4.Next()) { diff --git a/tests/bugs/step/bug33569 b/tests/bugs/step/bug33569 new file mode 100644 index 0000000000..0f05525c7a --- /dev/null +++ b/tests/bugs/step/bug33569 @@ -0,0 +1,13 @@ +puts "================" +puts "0033569: Data Exchange, STEP - Crash when reading multi-body file" +puts "================" + +ReadStep D [locate_data_file bug33569.stp] + +set result [XDumpNbDGTs D] + +regexp {NbOfAttachedDatum +: +([0-9]+)} $result full nb + +if { $nb != 26} { + puts "Error: Number of Datums incorrect" +} From 20955d88da8615c54bd9f4221a3ff9fbe90fd915 Mon Sep 17 00:00:00 2001 From: ichesnok Date: Wed, 2 Aug 2023 13:58:52 +0100 Subject: [PATCH 541/639] 0033261: Data Exchange, Step Import - Empty shape after reading process Added a transfer for ShapeRepresentationRelationship in Transfer of MappedItem method, in order to support link of components according to ISO 10303-203-2003. --- src/STEPControl/STEPControl_ActorRead.cxx | 130 +++++++++++++++------- src/STEPControl/STEPControl_ActorRead.hxx | 8 ++ tests/bugs/step/bug33261 | 17 +++ 3 files changed, 113 insertions(+), 42 deletions(-) create mode 100644 tests/bugs/step/bug33261 diff --git a/src/STEPControl/STEPControl_ActorRead.cxx b/src/STEPControl/STEPControl_ActorRead.cxx index c5a41907c9..60bb24bd5c 100644 --- a/src/STEPControl/STEPControl_ActorRead.cxx +++ b/src/STEPControl/STEPControl_ActorRead.cxx @@ -580,7 +580,7 @@ static void getSDR(const Handle(StepRepr_ProductDefinitionShape)& PDS, // common progress indicator for translation of own shapes and sub-assemblies Message_ProgressScope PS(theProgress, "Part", nbEnt); - Standard_Integer nbComponents=0, nbShapes=0; + Standard_Integer nbComponents=0; // translate sub-assemblies for ( Standard_Integer nbNauo =1; nbNauo <= listNAUO->Length() && PS.More(); nbNauo++) { @@ -662,7 +662,6 @@ static void getSDR(const Handle(StepRepr_ProductDefinitionShape)& PDS, else B.Add(Cund, theResult); // [END] ssv: OCCT#22436: extra compound in NMSSR case - nbShapes++; } } @@ -670,50 +669,20 @@ static void getSDR(const Handle(StepRepr_ProductDefinitionShape)& PDS, // way of writing hybrid models in AP203 since 1998, and AP209 // Note that both AP203 and AP209 allow main representation to be non-empty if ( readSRR && /*theResult.IsNull() &&*/ i <= nbNotAspect) { - Interface_EntityIterator subs1 = graph.Sharings(rep); - Handle(Standard_Type) tSRR = STANDARD_TYPE(StepRepr_ShapeRepresentationRelationship); - for (subs1.Start(); subs1.More(); subs1.Next()) { - const Handle(Standard_Transient)& anitem = subs1.Value(); - if( !anitem->IsKind(STANDARD_TYPE(StepRepr_RepresentationRelationship))) - continue; - if (anitem->DynamicType() == tSRR) - { - Handle(StepRepr_ShapeRepresentationRelationship) SRR = - Handle(StepRepr_ShapeRepresentationRelationship)::DownCast(anitem); - Standard_Integer nbrep = (rep == SRR->Rep1() ? 2 : 1); - // SKL for bug 29068: parameter useTrsf is used because if root entity has connection with other - // by ShapeRepresentationRelationship then result after such transferring need to transform also. - // This case is from test "bugs modalg_7 bug30196" - binder = TransferEntity(SRR, TP, theLocalFactors, nbrep, useTrsf, aPS1.Next()); - if (! binder.IsNull()) { - theResult = TransferBRep::ShapeResult (binder); - Result1 = theResult; - B.Add(Cund, theResult); - nbShapes++; - } - } - else if(readConstructiveGeomRR && anitem->IsKind(STANDARD_TYPE(StepRepr_ConstructiveGeometryRepresentationRelationship))) - { - Handle(StepRepr_ConstructiveGeometryRepresentationRelationship) aCSRR = - Handle(StepRepr_ConstructiveGeometryRepresentationRelationship)::DownCast(anitem); - binder = TransferEntity(aCSRR, TP, theLocalFactors); - if (! binder.IsNull()) - { - Result1 = TransferBRep::ShapeResult (binder); - B.Add(Cund, Result1); - nbShapes++; - } - } + TopoDS_Shape aNewResult = TransferRelatedSRR(TP, rep, useTrsf, readConstructiveGeomRR, theLocalFactors, Cund, aPS1); + if (!aNewResult.IsNull()) + { + Result1 = aNewResult; } } } // make a warning if both own shape and sub-assemblies are present - if ( nbShapes >0 && nbComponents > 0 ) + if ( (Cund.NbChildren() - nbComponents) > 0 && nbComponents > 0 ) TP->AddWarning ( PD, "Product has both sub-assemblies and directly assigned shape" ); // if only single shape is read, add it as it is; otherwise add compound - if( nbShapes == 1 && nbComponents == 0 ) + if( (Cund.NbChildren() - nbComponents) == 1 && nbComponents == 0 ) shbinder = new TransferBRep_ShapeBinder (Result1); else shbinder = new TransferBRep_ShapeBinder (Cund); @@ -1555,8 +1524,8 @@ Handle(TransferBRep_ShapeBinder) STEPControl_ActorRead::TransferEntity const Message_ProgressRange& theProgress) { Handle(TransferBRep_ShapeBinder) shbinder; - - // -------------------------------------------------------------- + + // -------------------------------------------------------------- // On se trouve ici dans un contexte " d'assemblage geometrique " // - MappedItem // -------------------------------------------------------------- @@ -1567,7 +1536,8 @@ Handle(TransferBRep_ShapeBinder) STEPControl_ActorRead::TransferEntity // La Shape, et la mise en position Handle(StepShape_ShapeRepresentation) maprep = Handle(StepShape_ShapeRepresentation):: DownCast(mapit->MappingSource()->MappedRepresentation()); - Standard_Boolean isBound = Standard_False; + Standard_Boolean isBound = Standard_False; + Message_ProgressScope aPSRoot(theProgress, NULL, 2); Handle(Transfer_Binder) binder = TP->Find(maprep); if (binder.IsNull()) binder = TransferEntity(maprep, TP, theLocalFactors, isBound, Standard_False, theProgress); shbinder = Handle(TransferBRep_ShapeBinder)::DownCast(binder); @@ -1575,7 +1545,6 @@ Handle(TransferBRep_ShapeBinder) STEPControl_ActorRead::TransferEntity else { TopoDS_Shape mappedShape = shbinder->Result(); if ( ! mappedShape.IsNull() ) { - // Positionnement : 2 formules // 1/ Ax2 dans Source et comme Target : passage de Source a Target // 2/ CartesianOperator3d comme Target : on applique @@ -1607,6 +1576,39 @@ Handle(TransferBRep_ShapeBinder) STEPControl_ActorRead::TransferEntity shbinder = new TransferBRep_ShapeBinder (mappedShape); } } + TopoDS_Compound aCund; + TopoDS_Shape aResult; + BRep_Builder aBuilder; + aBuilder.MakeCompound(aCund); + if (!shbinder.IsNull()) + { + aResult = TransferBRep::ShapeResult(shbinder); + aBuilder.Add(aCund, aResult); + } + // translate possible shapes related by SRRs, which corresponds to + // way of writing hybrid models in AP203 since 1998, and AP209 + Standard_Integer aReadSRR = Interface_Static::IVal("read.step.shape.relationship"); + Standard_Integer aReadConstructiveGeomRR = Interface_Static::IVal("read.step.constructivegeom.relationship"); + if (aReadSRR) + { + const Interface_Graph& aGraph = TP->Graph(); + Standard_Integer aSRRnum = 0; + for (Interface_EntityIterator aSubsIt(aGraph.Sharings(maprep)); aSubsIt.More(); aSubsIt.Next()) + ++aSRRnum; + Message_ProgressScope aPS(aPSRoot.Next(), "Part", aSRRnum); + TopoDS_Shape aNewResult = TransferRelatedSRR(TP, maprep, Standard_False, aReadConstructiveGeomRR, theLocalFactors, aCund, aPS); + if (!aNewResult.IsNull()) + { + aResult = aNewResult; + } + // if only single shape is read, add it as it is; otherwise add compound + if (aCund.NbChildren() == 1) + shbinder = new TransferBRep_ShapeBinder(aResult); + else if (aCund.NbChildren() > 1) + { + shbinder = new TransferBRep_ShapeBinder(aCund); + } + } TP->Bind(mapit, shbinder); return shbinder; } @@ -2091,3 +2093,47 @@ void STEPControl_ActorRead::SetModel(const Handle(Interface_InterfaceModel)& the { myModel = theModel; } + +//======================================================================= +// Method : TransferRelatedSRR +// Purpose : Helper method to transfer SRR related to the representation +//======================================================================= +TopoDS_Shape STEPControl_ActorRead::TransferRelatedSRR(const Handle(Transfer_TransientProcess)& theTP, + const Handle(StepShape_ShapeRepresentation)& theRep, + const Standard_Boolean theUseTrsf, + const Standard_Integer theReadConstructiveGeomRR, + const StepData_Factors& theLocalFactors, + TopoDS_Compound& theCund, + Message_ProgressScope& thePS) +{ + BRep_Builder aBuilder; + TopoDS_Shape aResult; + const Interface_Graph& aGraph = theTP->Graph(); + for (Interface_EntityIterator aSubsIt(aGraph.Sharings(theRep)); aSubsIt.More() && thePS.More(); aSubsIt.Next()) + { + Handle(Standard_Transient) anItem = aSubsIt.Value(); + if (!anItem->IsKind(STANDARD_TYPE(StepRepr_RepresentationRelationship))) + continue; + Handle(Transfer_Binder) aBinder; + if (anItem->DynamicType() == STANDARD_TYPE(StepRepr_ShapeRepresentationRelationship)) + { + Handle(StepRepr_ShapeRepresentationRelationship) aSRR = + Handle(StepRepr_ShapeRepresentationRelationship)::DownCast(anItem); + Standard_Integer aNbRep = (theRep == aSRR->Rep1() ? 2 : 1); + aBinder = TransferEntity(aSRR, theTP, theLocalFactors, aNbRep, theUseTrsf, thePS.Next()); + } + else if (theReadConstructiveGeomRR && + anItem->DynamicType() == STANDARD_TYPE(StepRepr_ConstructiveGeometryRepresentationRelationship)) + { + Handle(StepRepr_ConstructiveGeometryRepresentationRelationship) aCGRR = + Handle(StepRepr_ConstructiveGeometryRepresentationRelationship)::DownCast(anItem); + aBinder = TransferEntity(aCGRR, theTP, theLocalFactors); + } + if (!aBinder.IsNull()) + { + aResult = TransferBRep::ShapeResult(aBinder); + aBuilder.Add(theCund, aResult); + } + } + return aResult; +} diff --git a/src/STEPControl/STEPControl_ActorRead.hxx b/src/STEPControl/STEPControl_ActorRead.hxx index b986e8055c..16cadcf40d 100644 --- a/src/STEPControl/STEPControl_ActorRead.hxx +++ b/src/STEPControl/STEPControl_ActorRead.hxx @@ -206,6 +206,14 @@ private: Standard_EXPORT void computeIDEASClosings (const TopoDS_Compound& comp, TopTools_IndexedDataMapOfShapeListOfShape& shellClosingMap); + Standard_EXPORT TopoDS_Shape TransferRelatedSRR(const Handle(Transfer_TransientProcess)& theTP, + const Handle(StepShape_ShapeRepresentation)& theRep, + const Standard_Boolean theUseTrsf, + const Standard_Integer theReadConstructiveGeomRR, + const StepData_Factors& theLocalFactors, + TopoDS_Compound& theCund, + Message_ProgressScope& thePS); + StepToTopoDS_NMTool myNMTool; Standard_Real myPrecision; Standard_Real myMaxTol; diff --git a/tests/bugs/step/bug33261 b/tests/bugs/step/bug33261 new file mode 100644 index 0000000000..6474955491 --- /dev/null +++ b/tests/bugs/step/bug33261 @@ -0,0 +1,17 @@ +puts "=======" +puts "0033261: Data Exchange, Step Import - Empty shape after reading process" +puts "=======" + +pload OCAF MODELING + +# Read file +ReadStep D [locate_data_file bug33261.stp] + +# get document model as a single shape +XGetOneShape S1 D + +# check number of subshapes in the shape restored from STEP +checknbshapes S1 -face 2025 -solid 24 -compound 100 + +Close D -silent +unset S1 \ No newline at end of file From f286953d85c4177f5b62c8ce135a54d1e69e14f5 Mon Sep 17 00:00:00 2001 From: ichesnok Date: Fri, 24 Nov 2023 13:36:10 +0000 Subject: [PATCH 542/639] 0033530: Data Exchange, Step Import - Implement GENERAL_PROPERTY support The necessary classes for GeneralProperty support were added. The ReadMetadata method was created for reading and saving attributes. --- dox/user_guides/step/step.md | 10 + src/RWStepAP214/RWStepAP214_GeneralModule.cxx | 32 + .../RWStepAP214_ReadWriteModule.cxx | 76 +++ src/RWStepBasic/FILES | 4 + ...StepBasic_RWGeneralPropertyAssociation.cxx | 87 +++ ...StepBasic_RWGeneralPropertyAssociation.hxx | 60 ++ ...tepBasic_RWGeneralPropertyRelationship.cxx | 103 +++ ...tepBasic_RWGeneralPropertyRelationship.hxx | 60 ++ src/RWStepRepr/FILES | 4 + ...RWStepRepr_RWBooleanRepresentationItem.cxx | 50 ++ ...RWStepRepr_RWBooleanRepresentationItem.hxx | 45 ++ .../RWStepRepr_RWRealRepresentationItem.cxx | 50 ++ .../RWStepRepr_RWRealRepresentationItem.hxx | 46 ++ .../STEPCAFControl_ConfigurationNode.cxx | 8 + .../STEPCAFControl_Provider.cxx | 2 + src/STEPCAFControl/STEPCAFControl_Reader.cxx | 468 ++++++++++++- src/STEPCAFControl/STEPCAFControl_Reader.hxx | 28 + src/StepAP214/StepAP214_Protocol.cxx | 8 + src/StepBasic/FILES | 4 + .../StepBasic_GeneralPropertyAssociation.cxx | 117 ++++ .../StepBasic_GeneralPropertyAssociation.hxx | 84 +++ .../StepBasic_GeneralPropertyRelationship.cxx | 137 ++++ .../StepBasic_GeneralPropertyRelationship.hxx | 88 +++ .../StepBasic_MeasureValueMember.cxx | 2 + src/StepData/StepData_ConfParameters.cxx | 1 + src/StepData/StepData_ConfParameters.hxx | 1 + src/StepData/StepData_StepReaderData.cxx | 19 +- src/StepRepr/FILES | 4 + .../StepRepr_BooleanRepresentationItem.cxx | 28 + .../StepRepr_BooleanRepresentationItem.hxx | 52 ++ .../StepRepr_RealRepresentationItem.cxx | 28 + .../StepRepr_RealRepresentationItem.hxx | 53 ++ src/XSDRAWSTEP/XSDRAWSTEP.cxx | 6 +- tests/de_wrapper/configuration/A3 | 1 + tests/de_wrapper/configuration/A4 | 1 + tests/metadata/begin | 5 + tests/metadata/end | 98 +++ tests/metadata/grids.list | 1 + tests/metadata/parse.rules | 11 + tests/metadata/step/A1 | 30 + tests/metadata/step/A2 | 27 + tests/metadata/step/A3 | 24 + tests/metadata/step/A4 | 617 ++++++++++++++++++ tests/metadata/step/A5 | 19 + tests/metadata/step/A6 | 42 ++ tests/metadata/step/A7 | 237 +++++++ tests/metadata/step/A8 | 69 ++ tests/metadata/step/A9 | 10 + tests/metadata/step/begin | 2 + 49 files changed, 2952 insertions(+), 7 deletions(-) create mode 100644 src/RWStepBasic/RWStepBasic_RWGeneralPropertyAssociation.cxx create mode 100644 src/RWStepBasic/RWStepBasic_RWGeneralPropertyAssociation.hxx create mode 100644 src/RWStepBasic/RWStepBasic_RWGeneralPropertyRelationship.cxx create mode 100644 src/RWStepBasic/RWStepBasic_RWGeneralPropertyRelationship.hxx create mode 100644 src/RWStepRepr/RWStepRepr_RWBooleanRepresentationItem.cxx create mode 100644 src/RWStepRepr/RWStepRepr_RWBooleanRepresentationItem.hxx create mode 100644 src/RWStepRepr/RWStepRepr_RWRealRepresentationItem.cxx create mode 100644 src/RWStepRepr/RWStepRepr_RWRealRepresentationItem.hxx create mode 100644 src/StepBasic/StepBasic_GeneralPropertyAssociation.cxx create mode 100644 src/StepBasic/StepBasic_GeneralPropertyAssociation.hxx create mode 100644 src/StepBasic/StepBasic_GeneralPropertyRelationship.cxx create mode 100644 src/StepBasic/StepBasic_GeneralPropertyRelationship.hxx create mode 100644 src/StepRepr/StepRepr_BooleanRepresentationItem.cxx create mode 100644 src/StepRepr/StepRepr_BooleanRepresentationItem.hxx create mode 100644 src/StepRepr/StepRepr_RealRepresentationItem.cxx create mode 100644 src/StepRepr/StepRepr_RealRepresentationItem.hxx create mode 100644 tests/metadata/begin create mode 100644 tests/metadata/end create mode 100644 tests/metadata/grids.list create mode 100644 tests/metadata/parse.rules create mode 100644 tests/metadata/step/A1 create mode 100644 tests/metadata/step/A2 create mode 100644 tests/metadata/step/A3 create mode 100644 tests/metadata/step/A4 create mode 100644 tests/metadata/step/A5 create mode 100644 tests/metadata/step/A6 create mode 100644 tests/metadata/step/A7 create mode 100644 tests/metadata/step/A8 create mode 100644 tests/metadata/step/A9 create mode 100644 tests/metadata/step/begin diff --git a/dox/user_guides/step/step.md b/dox/user_guides/step/step.md index 3c6b31a56b..b079d0b220 100644 --- a/dox/user_guides/step/step.md +++ b/dox/user_guides/step/step.md @@ -1653,6 +1653,13 @@ For each Saved View OCCT STEP Reader will retrieve the following attributes: - clipping planes (single plane of combination of planes); - front and back plane clipping. +### User defined attributes +Attributes are implemented in accordance with Recommended practices for User Defined Attributes section 4, 5, 6.1-6.3 and 7. +Attributes can be read for shapes at levels: +- Part/Product Level; +- Component Instances in an Assembly; +- Geometry Level. + @subsection occt_step_7_3 Writing to STEP The translation from XDE to STEP can be initialized as follows: @@ -1730,5 +1737,8 @@ Interface_Static::SetIVal("write.step.schema", 5)); ### Saved views Saved Views are not exported by OCCT. +### User defined attributes +Attributes can be imported from STEP. + diff --git a/src/RWStepAP214/RWStepAP214_GeneralModule.cxx b/src/RWStepAP214/RWStepAP214_GeneralModule.cxx index 052f2c164b..e1803e09d2 100644 --- a/src/RWStepAP214/RWStepAP214_GeneralModule.cxx +++ b/src/RWStepAP214/RWStepAP214_GeneralModule.cxx @@ -98,6 +98,8 @@ #include #include #include +#include +#include #include #include #include @@ -570,6 +572,8 @@ #include #include #include +#include +#include #include #include #include @@ -1188,7 +1192,9 @@ IMPLEMENT_STANDARD_RTTIEXT(RWStepAP214_GeneralModule,StepData_GeneralModule) #include #include #include +#include #include +#include #include #include #include @@ -5876,6 +5882,20 @@ void RWStepAP214_GeneralModule::FillSharedCase(const Standard_Integer CN, aTool.Share(anEnt, iter); } break; + case 820: + { + DeclareAndCast(StepBasic_GeneralPropertyAssociation, anEnt, ent); + RWStepBasic_RWGeneralPropertyAssociation aTool; + aTool.Share(anEnt, iter); + } + break; + case 821: + { + DeclareAndCast(StepBasic_GeneralPropertyRelationship, anEnt, ent); + RWStepBasic_RWGeneralPropertyRelationship aTool; + aTool.Share(anEnt, iter); + } + break; default : break; } } @@ -8185,6 +8205,18 @@ Standard_Boolean RWStepAP214_GeneralModule::NewVoid case 819: ent = new StepVisual_TriangulatedSurfaceSet; break; + case 820: + ent = new StepBasic_GeneralPropertyAssociation; + break; + case 821: + ent = new StepBasic_GeneralPropertyRelationship; + break; + case 822: + ent = new StepRepr_BooleanRepresentationItem; + break; + case 823: + ent = new StepRepr_RealRepresentationItem; + break; default: return Standard_False; diff --git a/src/RWStepAP214/RWStepAP214_ReadWriteModule.cxx b/src/RWStepAP214/RWStepAP214_ReadWriteModule.cxx index 884be2300d..ffa5a7c97d 100644 --- a/src/RWStepAP214/RWStepAP214_ReadWriteModule.cxx +++ b/src/RWStepAP214/RWStepAP214_ReadWriteModule.cxx @@ -188,6 +188,8 @@ IMPLEMENT_STANDARD_RTTIEXT(RWStepAP214_ReadWriteModule,StepData_ReadWriteModule) #include #include #include +#include +#include #include #include #include @@ -622,6 +624,8 @@ IMPLEMENT_STANDARD_RTTIEXT(RWStepAP214_ReadWriteModule,StepData_ReadWriteModule) #include #include #include +#include +#include #include #include #include @@ -1355,7 +1359,9 @@ IMPLEMENT_STANDARD_RTTIEXT(RWStepAP214_ReadWriteModule,StepData_ReadWriteModule) #include #include #include +#include #include +#include #include #include #include @@ -1406,7 +1412,9 @@ IMPLEMENT_STANDARD_RTTIEXT(RWStepAP214_ReadWriteModule,StepData_ReadWriteModule) #include #include #include +#include #include +#include #include #include #include @@ -2352,6 +2360,10 @@ static TCollection_AsciiString Reco_ComplexTriangulatedSurfaceSet("COMPLEX_TRIAN static TCollection_AsciiString Reco_CubicBezierTessellatedEdge("CUBIC_BEZIER_TESSELLATED_EDGE"); static TCollection_AsciiString Reco_CubicBezierTriangulatedFace("CUBIC_BEZIER_TRIANGULATED_FACE"); static TCollection_AsciiString Reco_TriangulatedSurfaceSet("TRIANGULATED_SURFACE_SET"); +static TCollection_AsciiString Reco_GeneralPropertyAssociation("GENERAL_PROPERTY_ASSOCIATION"); +static TCollection_AsciiString Reco_GeneralPropertyRelationship("GENERAL_PROPERTY_RELATIONSHIP"); +static TCollection_AsciiString Reco_BooleanRepresentationItem("BOOLEAN_REPRESENTATION_ITEM"); +static TCollection_AsciiString Reco_RealRepresentationItem("REAL_REPRESENTATION_ITEM"); // -- Definition of the libraries -- @@ -3109,6 +3121,10 @@ RWStepAP214_ReadWriteModule::RWStepAP214_ReadWriteModule () typenums.Bind(Reco_CubicBezierTessellatedEdge, 817); typenums.Bind(Reco_CubicBezierTriangulatedFace, 818); typenums.Bind(Reco_TriangulatedSurfaceSet, 819); + typenums.Bind(Reco_GeneralPropertyAssociation, 820); + typenums.Bind(Reco_GeneralPropertyRelationship, 821); + typenums.Bind(Reco_BooleanRepresentationItem, 822); + typenums.Bind(Reco_RealRepresentationItem, 823); // SHORT NAMES @@ -5097,6 +5113,10 @@ const TCollection_AsciiString& RWStepAP214_ReadWriteModule::StepType case 817: return Reco_CubicBezierTessellatedEdge; case 818: return Reco_CubicBezierTriangulatedFace; case 819: return Reco_TriangulatedSurfaceSet; + case 820: return Reco_GeneralPropertyAssociation; + case 821: return Reco_GeneralPropertyRelationship; + case 822: return Reco_BooleanRepresentationItem; + case 823: return Reco_RealRepresentationItem; default : return PasReco; } } @@ -10706,6 +10726,34 @@ void RWStepAP214_ReadWriteModule::ReadStep(const Standard_Integer CN, aTool.ReadStep(data, num, ach, anEnt); } break; + case 820: + { + DeclareAndCast(StepBasic_GeneralPropertyAssociation, anEnt, ent); + RWStepBasic_RWGeneralPropertyAssociation aTool; + aTool.ReadStep(data, num, ach, anEnt); + } + break; + case 821: + { + DeclareAndCast(StepBasic_GeneralPropertyRelationship, anEnt, ent); + RWStepBasic_RWGeneralPropertyRelationship aTool; + aTool.ReadStep(data, num, ach, anEnt); + } + break; + case 822: + { + DeclareAndCast(StepRepr_BooleanRepresentationItem, anent, ent); + RWStepRepr_RWBooleanRepresentationItem aTool; + aTool.ReadStep(data, num, ach, anent); + } + break; + case 823: + { + DeclareAndCast(StepRepr_RealRepresentationItem, anent, ent); + RWStepRepr_RWRealRepresentationItem aTool; + aTool.ReadStep(data, num, ach, anent); + } + break; default: ach->AddFail("Type Mismatch when reading - Entity"); } @@ -16257,6 +16305,34 @@ void RWStepAP214_ReadWriteModule::WriteStep(const Standard_Integer CN, aTool.WriteStep(SW, anEnt); } break; + case 820: + { + DeclareAndCast(StepBasic_GeneralPropertyAssociation, anEnt, ent); + RWStepBasic_RWGeneralPropertyAssociation aTool; + aTool.WriteStep(SW, anEnt); + } + break; + case 821: + { + DeclareAndCast(StepBasic_GeneralPropertyRelationship, anEnt, ent); + RWStepBasic_RWGeneralPropertyRelationship aTool; + aTool.WriteStep(SW, anEnt); + } + break; + case 822: + { + DeclareAndCast(StepRepr_BooleanRepresentationItem, anent, ent); + RWStepRepr_RWBooleanRepresentationItem aTool; + aTool.WriteStep(SW, anent); + } + break; + case 823: + { + DeclareAndCast(StepRepr_RealRepresentationItem, anent, ent); + RWStepRepr_RWRealRepresentationItem aTool; + aTool.WriteStep(SW, anent); + } + break; default: return; } diff --git a/src/RWStepBasic/FILES b/src/RWStepBasic/FILES index f71dd7636b..d7f99e138e 100644 --- a/src/RWStepBasic/FILES +++ b/src/RWStepBasic/FILES @@ -108,6 +108,10 @@ RWStepBasic_RWExternalSource.cxx RWStepBasic_RWExternalSource.hxx RWStepBasic_RWGeneralProperty.cxx RWStepBasic_RWGeneralProperty.hxx +RWStepBasic_RWGeneralPropertyAssociation.cxx +RWStepBasic_RWGeneralPropertyAssociation.hxx +RWStepBasic_RWGeneralPropertyRelationship.cxx +RWStepBasic_RWGeneralPropertyRelationship.hxx RWStepBasic_RWGroup.cxx RWStepBasic_RWGroup.hxx RWStepBasic_RWGroupAssignment.cxx diff --git a/src/RWStepBasic/RWStepBasic_RWGeneralPropertyAssociation.cxx b/src/RWStepBasic/RWStepBasic_RWGeneralPropertyAssociation.cxx new file mode 100644 index 0000000000..1085273c20 --- /dev/null +++ b/src/RWStepBasic/RWStepBasic_RWGeneralPropertyAssociation.cxx @@ -0,0 +1,87 @@ +// Copyright (c) 2024 OPEN CASCADE SAS +// +// This file is part of Open CASCADE Technology software library. +// +// This library is free software; you can redistribute it and/or modify it under +// the terms of the GNU Lesser General Public License version 2.1 as published +// by the Free Software Foundation, with special exception defined in the file +// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT +// distribution for complete text of the license and disclaimer of any warranty. +// +// Alternatively, this file may be used under the terms of Open CASCADE +// commercial license or contractual agreement. + +#include +#include +#include +#include +#include +#include +#include + +//======================================================================= +//function : RWStepBasic_RWGeneralPropertyAssociation +//purpose : +//======================================================================= +RWStepBasic_RWGeneralPropertyAssociation::RWStepBasic_RWGeneralPropertyAssociation() +{ +} + +//======================================================================= +//function : ReadStep +//purpose : +//======================================================================= +void RWStepBasic_RWGeneralPropertyAssociation::ReadStep(const Handle(StepData_StepReaderData)& theData, + const Standard_Integer theNum, + Handle(Interface_Check)& theAch, + const Handle(StepBasic_GeneralPropertyAssociation)& theEnt) const +{ + // Check number of parameters + if (!theData->CheckNbParams(theNum, 4, theAch, "general_property_association")) return; + + Handle(TCollection_HAsciiString) aName; + theData->ReadString(theNum, 1, "name", theAch, aName); + + Handle(TCollection_HAsciiString) aDescription; + theData->ReadString(theNum, 2, "description", theAch, aDescription); + + Handle(StepBasic_GeneralProperty) aGeneralProperty; + theData->ReadEntity(theNum, 3, "base_definition", theAch, STANDARD_TYPE(StepBasic_GeneralProperty), aGeneralProperty); + + Handle(StepRepr_PropertyDefinition) aPropertyDefinition; + theData->ReadEntity(theNum, 4, "derived_definition", theAch, STANDARD_TYPE(StepRepr_PropertyDefinition), aPropertyDefinition); + + // Initialize entity + theEnt->Init(aName, + aDescription, + aGeneralProperty, + aPropertyDefinition); +} + +//======================================================================= +//function : WriteStep +//purpose : +//======================================================================= +void RWStepBasic_RWGeneralPropertyAssociation::WriteStep (StepData_StepWriter& theSW, + const Handle(StepBasic_GeneralPropertyAssociation) &theEnt) const +{ + theSW.Send(theEnt->Name()); + + theSW.Send(theEnt->Description()); + + theSW.Send(theEnt->GeneralProperty()); + + theSW.Send(theEnt->PropertyDefinition()); +} + +//======================================================================= +//function : Share +//purpose : +//======================================================================= +void RWStepBasic_RWGeneralPropertyAssociation::Share(const Handle(StepBasic_GeneralPropertyAssociation)& theEnt, + Interface_EntityIterator& theIter) const +{ + theIter.AddItem(theEnt->GeneralProperty()); + + theIter.AddItem(theEnt->PropertyDefinition()); +} diff --git a/src/RWStepBasic/RWStepBasic_RWGeneralPropertyAssociation.hxx b/src/RWStepBasic/RWStepBasic_RWGeneralPropertyAssociation.hxx new file mode 100644 index 0000000000..4d80c0431c --- /dev/null +++ b/src/RWStepBasic/RWStepBasic_RWGeneralPropertyAssociation.hxx @@ -0,0 +1,60 @@ +// Copyright (c) 2024 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 _RWStepBasic_RWGeneralPropertyAssociation_HeaderFile +#define _RWStepBasic_RWGeneralPropertyAssociation_HeaderFile + +#include +#include +#include + +#include +class StepData_StepReaderData; +class Interface_Check; +class StepBasic_GeneralProperty; +class StepData_StepWriter; +class Interface_EntityIterator; + +class StepBasic_GeneralPropertyAssociation; + +//! Read & Write tool for GeneralPropertyAssociation +class RWStepBasic_RWGeneralPropertyAssociation +{ +public: + + DEFINE_STANDARD_ALLOC + + //! Empty constructor + Standard_EXPORT RWStepBasic_RWGeneralPropertyAssociation(); + + //! Reads GeneralPropertyAssociation + Standard_EXPORT void ReadStep (const Handle(StepData_StepReaderData)& theData, + const Standard_Integer theNum, + Handle(Interface_Check)& theAch, + const Handle(StepBasic_GeneralPropertyAssociation)& theEnt) const; + + //! Writes GeneralPropertyAssociation + Standard_EXPORT void WriteStep (StepData_StepWriter& theSW, + const Handle(StepBasic_GeneralPropertyAssociation)& theEnt) const; + + //! Fills data for graph (shared items) + Standard_EXPORT void Share (const Handle(StepBasic_GeneralPropertyAssociation)& theEnt, + Interface_EntityIterator& theIter) const; + +protected: + +private: + +}; + +#endif // _RWStepBasic_RWGeneralPropertyAssociation_HeaderFile diff --git a/src/RWStepBasic/RWStepBasic_RWGeneralPropertyRelationship.cxx b/src/RWStepBasic/RWStepBasic_RWGeneralPropertyRelationship.cxx new file mode 100644 index 0000000000..2e491c1b3e --- /dev/null +++ b/src/RWStepBasic/RWStepBasic_RWGeneralPropertyRelationship.cxx @@ -0,0 +1,103 @@ +// Copyright (c) 2024 OPEN CASCADE SAS +// +// This file is part of Open CASCADE Technology software library. +// +// This library is free software; you can redistribute it and/or modify it under +// the terms of the GNU Lesser General Public License version 2.1 as published +// by the Free Software Foundation, with special exception defined in the file +// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT +// distribution for complete text of the license and disclaimer of any warranty. +// +// Alternatively, this file may be used under the terms of Open CASCADE +// commercial license or contractual agreement. + +#include +#include +#include +#include +#include +#include +#include + +//======================================================================= +//function : RWStepBasic_RWGeneralPropertyRelationship +//purpose : +//======================================================================= +RWStepBasic_RWGeneralPropertyRelationship::RWStepBasic_RWGeneralPropertyRelationship() +{ +} + +//======================================================================= +//function : ReadStep +//purpose : +//======================================================================= +void RWStepBasic_RWGeneralPropertyRelationship::ReadStep(const Handle(StepData_StepReaderData)& theData, + const Standard_Integer theNum, + Handle(Interface_Check)& theAch, + const Handle(StepBasic_GeneralPropertyRelationship)& theEnt) const +{ + // Check number of parameters + if (!theData->CheckNbParams(theNum, 4, theAch, "general_property_association")) return; + + Handle(TCollection_HAsciiString) aName; + theData->ReadString(theNum, 1, "name", theAch, aName); + + Handle(TCollection_HAsciiString) aDescription; + Standard_Boolean hasDescription = Standard_True; + if (theData->IsParamDefined(theNum, 2)) + { + theData->ReadString(theNum, 2, "description", theAch, aDescription); + } + else + { + hasDescription = Standard_False; + } + + Handle(StepBasic_GeneralProperty) aRelatingGeneralProperty; + theData->ReadEntity(theNum, 3, "relating_property", theAch, STANDARD_TYPE(StepBasic_GeneralProperty), aRelatingGeneralProperty); + + Handle(StepBasic_GeneralProperty) aRelatedGeneralProperty; + theData->ReadEntity(theNum, 4, "related_property", theAch, STANDARD_TYPE(StepBasic_GeneralProperty), aRelatedGeneralProperty); + + // Initialize entity + theEnt->Init(aName, + hasDescription, + aDescription, + aRelatingGeneralProperty, + aRelatedGeneralProperty); +} + +//======================================================================= +//function : WriteStep +//purpose : +//======================================================================= +void RWStepBasic_RWGeneralPropertyRelationship::WriteStep(StepData_StepWriter& theSW, + const Handle(StepBasic_GeneralPropertyRelationship)& theEnt) const +{ + theSW.Send(theEnt->Name()); + + if (theEnt->HasDescription()) + { + theSW.Send(theEnt->Description()); + } + else + { + theSW.SendUndef(); + } + + theSW.Send(theEnt->RelatingGeneralProperty()); + + theSW.Send(theEnt->RelatedGeneralProperty()); +} + +//======================================================================= +//function : Share +//purpose : +//======================================================================= +void RWStepBasic_RWGeneralPropertyRelationship::Share(const Handle(StepBasic_GeneralPropertyRelationship)& theEnt, + Interface_EntityIterator& theIter) const +{ + theIter.AddItem(theEnt->RelatingGeneralProperty()); + + theIter.AddItem(theEnt->RelatedGeneralProperty()); +} diff --git a/src/RWStepBasic/RWStepBasic_RWGeneralPropertyRelationship.hxx b/src/RWStepBasic/RWStepBasic_RWGeneralPropertyRelationship.hxx new file mode 100644 index 0000000000..aa712f4b5e --- /dev/null +++ b/src/RWStepBasic/RWStepBasic_RWGeneralPropertyRelationship.hxx @@ -0,0 +1,60 @@ +// Copyright (c) 2024 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 _RWStepBasic_RWGeneralPropertyRelationship_HeaderFile +#define _RWStepBasic_RWGeneralPropertyAssociation_HeaderFile + +#include +#include +#include + +#include +class StepData_StepReaderData; +class Interface_Check; +class StepBasic_GeneralProperty; +class StepData_StepWriter; +class Interface_EntityIterator; + +class StepBasic_GeneralPropertyRelationship; + +//! Read & Write tool for GeneralPropertyRelationship +class RWStepBasic_RWGeneralPropertyRelationship +{ +public: + + DEFINE_STANDARD_ALLOC + + //! Empty constructor + Standard_EXPORT RWStepBasic_RWGeneralPropertyRelationship(); + + //! Reads GeneralPropertyAssociation + Standard_EXPORT void ReadStep (const Handle(StepData_StepReaderData)& theData, + const Standard_Integer theNum, + Handle(Interface_Check)& theAch, + const Handle(StepBasic_GeneralPropertyRelationship)& theEnt) const; + + //! Writes GeneralPropertyAssociation + Standard_EXPORT void WriteStep (StepData_StepWriter& theSW, + const Handle(StepBasic_GeneralPropertyRelationship)& theEnt) const; + + //! Fills data for graph (shared items) + Standard_EXPORT void Share (const Handle(StepBasic_GeneralPropertyRelationship)& theEnt, + Interface_EntityIterator& theIter) const; + +protected: + +private: + +}; + +#endif // _RWStepBasic_RWGeneralPropertyRelationship_HeaderFile diff --git a/src/RWStepRepr/FILES b/src/RWStepRepr/FILES index 3dab652854..e9487b0816 100644 --- a/src/RWStepRepr/FILES +++ b/src/RWStepRepr/FILES @@ -8,6 +8,8 @@ RWStepRepr_RWAssemblyComponentUsageSubstitute.cxx RWStepRepr_RWAssemblyComponentUsageSubstitute.hxx RWStepRepr_RWBetweenShapeAspect.cxx RWStepRepr_RWBetweenShapeAspect.hxx +RWStepRepr_RWBooleanRepresentationItem.cxx +RWStepRepr_RWBooleanRepresentationItem.hxx RWStepRepr_RWCentreOfSymmetry.cxx RWStepRepr_RWCentreOfSymmetry.hxx RWStepRepr_RWCharacterizedRepresentation.cxx @@ -88,6 +90,8 @@ RWStepRepr_RWPropertyDefinitionRepresentation.cxx RWStepRepr_RWPropertyDefinitionRepresentation.hxx RWStepRepr_RWQuantifiedAssemblyComponentUsage.cxx RWStepRepr_RWQuantifiedAssemblyComponentUsage.hxx +RWStepRepr_RWRealRepresentationItem.cxx +RWStepRepr_RWRealRepresentationItem.hxx RWStepRepr_RWRepresentation.cxx RWStepRepr_RWRepresentation.hxx RWStepRepr_RWRepresentationContext.cxx diff --git a/src/RWStepRepr/RWStepRepr_RWBooleanRepresentationItem.cxx b/src/RWStepRepr/RWStepRepr_RWBooleanRepresentationItem.cxx new file mode 100644 index 0000000000..e4abd6f556 --- /dev/null +++ b/src/RWStepRepr/RWStepRepr_RWBooleanRepresentationItem.cxx @@ -0,0 +1,50 @@ +// Copyright (c) 2024 OPEN CASCADE SAS +// +// This file is part of Open CASCADE Technology software library. +// +// This library is free software; you can redistribute it and/or modify it under +// the terms of the GNU Lesser General Public License version 2.1 as published +// by the Free Software Foundation, with special exception defined in the file +// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT +// distribution for complete text of the license and disclaimer of any warranty. +// +// Alternatively, this file may be used under the terms of Open CASCADE +// commercial license or contractual agreement. + + +#include +#include +#include +#include +#include + +RWStepRepr_RWBooleanRepresentationItem::RWStepRepr_RWBooleanRepresentationItem() +{ +} + +void RWStepRepr_RWBooleanRepresentationItem::ReadStep(const Handle(StepData_StepReaderData)& theData, + const Standard_Integer theNum, + Handle(Interface_Check)& theAch, + const Handle(StepRepr_BooleanRepresentationItem)& theEnt) const +{ + // Check number of parameters + if (!theData->CheckNbParams(theNum, 2, theAch, "boolean_representation_item") ) return; + + // --- inherited field : name --- + Handle(TCollection_HAsciiString) aName; + theData->ReadString (theNum, 1, "name", theAch, aName); + + // --- own field : value --- + Standard_Boolean aValue; + theData->ReadBoolean (theNum, 2, "value", theAch, aValue); + + //--- Initialisation of the read entity --- + theEnt->Init(aName, aValue); +} + +void RWStepRepr_RWBooleanRepresentationItem::WriteStep(StepData_StepWriter& theSW, + const Handle(StepRepr_BooleanRepresentationItem)& theEnt) const +{ + theSW.Send(theEnt->Name()); + theSW.Send(theEnt->Value()); +} diff --git a/src/RWStepRepr/RWStepRepr_RWBooleanRepresentationItem.hxx b/src/RWStepRepr/RWStepRepr_RWBooleanRepresentationItem.hxx new file mode 100644 index 0000000000..61c613fca7 --- /dev/null +++ b/src/RWStepRepr/RWStepRepr_RWBooleanRepresentationItem.hxx @@ -0,0 +1,45 @@ +// Copyright (c) 2024 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 _RWStepRepr_RWBooleanRepresentationItem_HeaderFile +#define _RWStepRepr_RWBooleanRepresentationItem_HeaderFile + +#include +#include +#include + +#include +class StepData_StepReaderData; +class Interface_Check; +class StepRepr_BooleanRepresentationItem; +class StepData_StepWriter; + + +//! Read & Write Module for BooleanRepresentationItem +class RWStepRepr_RWBooleanRepresentationItem +{ +public: + + DEFINE_STANDARD_ALLOC + + Standard_EXPORT RWStepRepr_RWBooleanRepresentationItem(); + + Standard_EXPORT void ReadStep (const Handle(StepData_StepReaderData)& theData, + const Standard_Integer theNum, + Handle(Interface_Check)& theAch, + const Handle(StepRepr_BooleanRepresentationItem)& theEnt) const; + + Standard_EXPORT void WriteStep (StepData_StepWriter& theSW, + const Handle(StepRepr_BooleanRepresentationItem)& theEnt) const; +}; +#endif // _RWStepRepr_RWBooleanRepresentationItem_HeaderFile diff --git a/src/RWStepRepr/RWStepRepr_RWRealRepresentationItem.cxx b/src/RWStepRepr/RWStepRepr_RWRealRepresentationItem.cxx new file mode 100644 index 0000000000..eb5a48f091 --- /dev/null +++ b/src/RWStepRepr/RWStepRepr_RWRealRepresentationItem.cxx @@ -0,0 +1,50 @@ +// Copyright (c) 2024 OPEN CASCADE SAS +// +// This file is part of Open CASCADE Technology software library. +// +// This library is free software; you can redistribute it and/or modify it under +// the terms of the GNU Lesser General Public License version 2.1 as published +// by the Free Software Foundation, with special exception defined in the file +// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT +// distribution for complete text of the license and disclaimer of any warranty. +// +// Alternatively, this file may be used under the terms of Open CASCADE +// commercial license or contractual agreement. + + +#include +#include +#include +#include +#include + +RWStepRepr_RWRealRepresentationItem::RWStepRepr_RWRealRepresentationItem() +{ +} + +void RWStepRepr_RWRealRepresentationItem::ReadStep(const Handle(StepData_StepReaderData)& theData, + const Standard_Integer theNum, + Handle(Interface_Check)& theAch, + const Handle(StepRepr_RealRepresentationItem)& theEnt) const +{ + // Check number of parameters + if (!theData->CheckNbParams (theNum, 2, theAch, "real_representation_item")) return; + + // --- inherited field : name --- + Handle(TCollection_HAsciiString) aName; + theData->ReadString (theNum, 1, "name", theAch, aName); + + // --- own field : value --- + Standard_Real aValue; + theData->ReadReal (theNum, 2, "value", theAch, aValue); + + //--- Initialisation of the read entity --- + theEnt->Init(aName, aValue); +} + +void RWStepRepr_RWRealRepresentationItem::WriteStep(StepData_StepWriter& theSW, + const Handle(StepRepr_RealRepresentationItem)& theEnt) const +{ + theSW.Send(theEnt->Name()); + theSW.Send(theEnt->Value()); +} diff --git a/src/RWStepRepr/RWStepRepr_RWRealRepresentationItem.hxx b/src/RWStepRepr/RWStepRepr_RWRealRepresentationItem.hxx new file mode 100644 index 0000000000..ad62774d6e --- /dev/null +++ b/src/RWStepRepr/RWStepRepr_RWRealRepresentationItem.hxx @@ -0,0 +1,46 @@ +// Copyright (c) 2024 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 _RWStepRepr_RWRealRepresentationItem_HeaderFile +#define _RWStepRepr_RWRealRepresentationItem_HeaderFile + +#include +#include +#include + +#include +class StepData_StepReaderData; +class Interface_Check; +class StepRepr_RealRepresentationItem; +class StepData_StepWriter; + + +//! Read & Write Module for RealRepresentationItem +class RWStepRepr_RWRealRepresentationItem +{ +public: + + DEFINE_STANDARD_ALLOC + + + Standard_EXPORT RWStepRepr_RWRealRepresentationItem(); + + Standard_EXPORT void ReadStep (const Handle(StepData_StepReaderData)& theData, + const Standard_Integer theNum, + Handle(Interface_Check)& theAch, + const Handle(StepRepr_RealRepresentationItem)& theEnt) const; + + Standard_EXPORT void WriteStep (StepData_StepWriter& theSW, + const Handle(StepRepr_RealRepresentationItem)& theEnt) const; +}; +#endif // _RWStepRepr_RWRealRepresentationItem_HeaderFile diff --git a/src/STEPCAFControl/STEPCAFControl_ConfigurationNode.cxx b/src/STEPCAFControl/STEPCAFControl_ConfigurationNode.cxx index 20b2cffba5..46ca4fe79a 100644 --- a/src/STEPCAFControl/STEPCAFControl_ConfigurationNode.cxx +++ b/src/STEPCAFControl/STEPCAFControl_ConfigurationNode.cxx @@ -116,6 +116,8 @@ bool STEPCAFControl_ConfigurationNode::Load(const Handle(DE_ConfigurationContext theResource->BooleanVal("read.layer", InternalParameters.ReadLayer, aScope); InternalParameters.ReadProps = theResource->BooleanVal("read.props", InternalParameters.ReadProps, aScope); + InternalParameters.ReadMetadata = + theResource->BooleanVal("read.metadata", InternalParameters.ReadMetadata, aScope); InternalParameters.WritePrecisionMode = (StepData_ConfParameters::WriteMode_PrecisionMode) theResource->IntegerVal("write.precision.mode", InternalParameters.WritePrecisionMode, aScope); @@ -370,6 +372,12 @@ TCollection_AsciiString STEPCAFControl_ConfigurationNode::Save() const aResult += aScope + "read.props :\t " + InternalParameters.ReadProps + "\n"; aResult += "!\n"; + aResult += "!\n"; + aResult += "!Setting up the read.metadata parameter which is used to indicate read Metadata or not\n"; + aResult += "!Default value: 0(\"OFF\"). Available values: 0(\"OFF\"), 1(\"ON\")\n"; + aResult += aScope + "read.metadata :\t " + InternalParameters.ReadMetadata + "\n"; + aResult += "!\n"; + aResult += "!\n"; aResult += "!Write Parameters:\n"; aResult += "!\n"; diff --git a/src/STEPCAFControl/STEPCAFControl_Provider.cxx b/src/STEPCAFControl/STEPCAFControl_Provider.cxx index 2fc6682666..969c54d220 100644 --- a/src/STEPCAFControl/STEPCAFControl_Provider.cxx +++ b/src/STEPCAFControl/STEPCAFControl_Provider.cxx @@ -73,6 +73,8 @@ bool STEPCAFControl_Provider::Read(const TCollection_AsciiString& thePath, aReader.SetNameMode(aNode->InternalParameters.ReadName); aReader.SetLayerMode(aNode->InternalParameters.ReadLayer); aReader.SetPropsMode(aNode->InternalParameters.ReadProps); + aReader.SetMetaMode(aNode->InternalParameters.ReadMetadata); + IFSelect_ReturnStatus aReadStat = IFSelect_RetVoid; StepData_ConfParameters aParams; aReadStat = aReader.ReadFile(thePath.ToCString(), aParams); diff --git a/src/STEPCAFControl/STEPCAFControl_Reader.cxx b/src/STEPCAFControl/STEPCAFControl_Reader.cxx index 9d4a3fc220..05c52fbb36 100644 --- a/src/STEPCAFControl/STEPCAFControl_Reader.cxx +++ b/src/STEPCAFControl/STEPCAFControl_Reader.cxx @@ -30,9 +30,12 @@ #include #include #include +#include #include #include #include +#include +#include #include #include #include @@ -40,6 +43,9 @@ #include #include #include +#include +#include +#include #include #include #include @@ -129,6 +135,7 @@ #include #include #include +#include #include #include #include @@ -214,6 +221,7 @@ #include #include #include +#include #include #include #include @@ -225,7 +233,15 @@ #include #include #include +#include +#include #include +#include +#include +#include + +#include + #include #include @@ -275,6 +291,7 @@ STEPCAFControl_Reader::STEPCAFControl_Reader() myNameMode(Standard_True), myLayerMode(Standard_True), myPropsMode(Standard_True), + myMetaMode(Standard_False), mySHUOMode(Standard_False), myGDTMode(Standard_True), myMatMode(Standard_True), @@ -299,6 +316,7 @@ STEPCAFControl_Reader::STEPCAFControl_Reader(const Handle(XSControl_WorkSession) myNameMode(Standard_True), myLayerMode(Standard_True), myPropsMode(Standard_True), + myMetaMode(Standard_False), mySHUOMode(Standard_False), myGDTMode(Standard_True), myMatMode(Standard_True), @@ -770,6 +788,10 @@ Standard_Boolean STEPCAFControl_Reader::Transfer (STEPControl_Reader &reader, if (GetViewMode()) ReadViews(reader.WS(), doc, aLocalFactors); + // read metadata + if (GetMetaMode()) + ReadMetadata(reader.WS(), doc, aLocalFactors); + // Expand resulting CAF structure for sub-shapes (optionally with their // names) if requested ExpandSubShapes(STool, ShapePDMap); @@ -1957,7 +1979,7 @@ Standard_Boolean STEPCAFControl_Reader::ReadSHUOs(const Handle(XSControl_WorkSes //function : GetMassConversionFactor //purpose : //======================================================================= -static Standard_Boolean GetMassConversionFactor(Handle(StepBasic_NamedUnit)& NU, +static Standard_Boolean GetMassConversionFactor(const Handle(StepBasic_NamedUnit)& NU, Standard_Real& afact) { afact = 1.; @@ -5243,6 +5265,26 @@ Standard_Boolean STEPCAFControl_Reader::GetPropsMode() const return myPropsMode; } +//======================================================================= +//function : SetMetaMode +//purpose : +//======================================================================= + +void STEPCAFControl_Reader::SetMetaMode(const Standard_Boolean theMetaMode) +{ + myMetaMode = theMetaMode; +} + +//======================================================================= +//function : GetMetaMode +//purpose : +//======================================================================= + +Standard_Boolean STEPCAFControl_Reader::GetMetaMode() const +{ + return myMetaMode; +} + //======================================================================= //function : SetSHUOMode //purpose : @@ -5323,3 +5365,427 @@ Standard_Boolean STEPCAFControl_Reader::GetViewMode() const { return myViewMode; } + +//======================================================================= +//function : ReadMetadata +//purpose : +//======================================================================= +Standard_Boolean STEPCAFControl_Reader::ReadMetadata(const Handle(XSControl_WorkSession)& theWS, + const Handle(TDocStd_Document)& theDoc, + const StepData_Factors& theLocalFactors) const +{ + const Handle(Interface_InterfaceModel)& aModel = theWS->Model(); + const Handle(XSControl_TransferReader)& aTR = theWS->TransferReader(); + const Handle(Transfer_TransientProcess)& aTP = aTR->TransientProcess(); + Handle(XCAFDoc_ShapeTool) aSTool = XCAFDoc_DocumentTool::ShapeTool(theDoc->Main()); + if (aSTool.IsNull()) + { + return Standard_False; + } + + Standard_Integer aNb = aModel->NbEntities(); + STEPConstruct_Tool aTool(theWS); + + for (Standard_Integer anEntityInd = 1; anEntityInd <= aNb; ++anEntityInd) + { + Handle(Standard_Transient) anEntity = aModel->Value(anEntityInd); + Handle(StepBasic_GeneralProperty) aGeneralProp = Handle(StepBasic_GeneralProperty)::DownCast(anEntity); + if (aGeneralProp.IsNull()) + continue; + + Handle(StepBasic_GeneralPropertyAssociation) aPropAssociation; + NCollection_List< Handle(StepRepr_PropertyDefinition)> aPropDefinitionList; + Interface_EntityIterator aSharingListOfGP = theWS->Graph().Sharings(aGeneralProp); + for (aSharingListOfGP.Start(); aSharingListOfGP.More(); aSharingListOfGP.Next()) + { + aPropAssociation = Handle(StepBasic_GeneralPropertyAssociation)::DownCast(aSharingListOfGP.Value()); + if (aPropAssociation.IsNull()) + continue; + + aPropDefinitionList.Append(aPropAssociation->PropertyDefinition()); + } + + if (aPropDefinitionList.IsEmpty()) + continue; + + NCollection_List< Handle(StepRepr_PropertyDefinition)>::Iterator aPropDefIter(aPropDefinitionList); + for ( ; aPropDefIter.More(); aPropDefIter.Next()) + { + Handle(StepRepr_PropertyDefinition) aPropDefinition = aPropDefIter.Value(); + + // check group of PropertyDefinition + NCollection_List aGroupedProperties; + Interface_EntityIterator aSharingsListOfPD = theWS->Graph().Sharings(aPropDefinition); + for (aSharingsListOfPD.Start(); aSharingsListOfPD.More(); aSharingsListOfPD.Next()) + { + Handle(StepRepr_PropertyDefinitionRelationship) aRel = + Handle(StepRepr_PropertyDefinitionRelationship)::DownCast(aSharingsListOfPD.Value()); + if (aRel.IsNull()) + { + continue; + } + + Handle(StepRepr_PropertyDefinition) aGroupedProp = aRel->RelatedPropertyDefinition(); + if (!aGroupedProp.IsNull()) + { + aGroupedProperties.Append(aGroupedProp); + } + } + + NCollection_List aBinders; + Interface_EntityIterator aSharedListOfPD = theWS->Graph().Shareds(aPropDefinition); + for (aSharedListOfPD.Start(); aSharedListOfPD.More(); aSharedListOfPD.Next()) + { + Handle(Transfer_Binder) aBinder; + Handle(StepBasic_ProductDefinition) aProductDefinition = + Handle(StepBasic_ProductDefinition)::DownCast(aSharedListOfPD.Value()); + if (!aProductDefinition.IsNull()) + { + aBinder = aTP->Find(aProductDefinition); + if (!aBinder.IsNull()) + { + aBinders.Append(aBinder); + } + continue; + } + + Handle(StepRepr_ProductDefinitionShape) aProductDefinitionShape = + Handle(StepRepr_ProductDefinitionShape)::DownCast(aSharedListOfPD.Value()); + if (!aProductDefinitionShape.IsNull()) + { + Handle(StepBasic_ProductDefinition) aProductDef = + aProductDefinitionShape->Definition().ProductDefinition(); + aBinder = aTP->Find(aProductDef); + if (!aBinder.IsNull()) + { + aBinders.Append(aBinder); + } + continue; + } + + Handle(StepRepr_NextAssemblyUsageOccurrence) aNextAssembUsOcc = + Handle(StepRepr_NextAssemblyUsageOccurrence)::DownCast(aSharedListOfPD.Value()); + if (!aNextAssembUsOcc.IsNull()) + { + aBinder = aTP->Find(aNextAssembUsOcc); + if (!aBinder.IsNull()) + { + aBinders.Append(aBinder); + } + continue; + } + + Handle(StepRepr_ShapeAspect) aShapeAspect = + Handle(StepRepr_ShapeAspect)::DownCast(aSharedListOfPD.Value()); + if (!aShapeAspect.IsNull()) + { + TDF_Label aLabel; + if (!aBinder.IsNull()) + { + TopoDS_Shape aShape = TransferBRep::ShapeResult(aTP, aBinder); + if (aShape.IsNull()) + continue; + + if (myMap.IsBound(aShape)) + { + aLabel = myMap.Find(aShape); + } + } + Interface_EntityIterator aSharedListOfSA = theWS->Graph().Sharings(aShapeAspect); + for (aSharedListOfSA.Start(); aSharedListOfSA.More(); aSharedListOfSA.Next()) + { + Handle(StepAP242_DraughtingModelItemAssociation) aDMIA = + Handle(StepAP242_DraughtingModelItemAssociation)::DownCast(aSharedListOfSA.Value()); + if (!aDMIA.IsNull()) + break; + + Handle(StepAP242_ItemIdentifiedRepresentationUsage) anItemIdentUsage = + Handle(StepAP242_ItemIdentifiedRepresentationUsage)::DownCast(aSharedListOfSA.Value()); + if (!anItemIdentUsage.IsNull()) + { + for (Standard_Integer anIndex = 1; anIndex <= anItemIdentUsage->NbIdentifiedItem(); ++anIndex) + { + Handle(StepRepr_RepresentationItem) aReprItem = anItemIdentUsage->IdentifiedItemValue(anIndex); + if (aReprItem.IsNull()) + continue; + aBinder = aTP->Find(aReprItem); + if (!aBinder.IsNull()) + { + aBinders.Append(aBinder); + } + } + continue; + } + + Handle(StepRepr_PropertyDefinition) aPropDef = + Handle(StepRepr_PropertyDefinition)::DownCast(aSharedListOfSA.Value()); + if (!aPropDef.IsNull() && aPropDef != aPropDefinition) + { + Interface_EntityIterator aSharingListOfPD = theWS->Graph().Sharings(aPropDef); + for (aSharingListOfPD.Start(); aSharingListOfPD.More(); aSharingListOfPD.Next()) + { + Handle(StepShape_ShapeDefinitionRepresentation) aShDef = + Handle(StepShape_ShapeDefinitionRepresentation)::DownCast(aSharingListOfPD.Value()); + if (aShDef.IsNull()) + continue; + + findReprItems(theWS, aShDef, aBinders); + } + continue; + } + + Handle(StepShape_ShapeDefinitionRepresentation) aShapeDefRepr = + Handle(StepShape_ShapeDefinitionRepresentation)::DownCast(aSharedListOfSA.Value()); + if (!aShapeDefRepr.IsNull()) + { + findReprItems(theWS, aShapeDefRepr, aBinders); + } + } + } + } + + if (aBinders.IsEmpty()) + continue; + + TDF_LabelSequence aLabelSeq; + NCollection_List::Iterator aBindIt(aBinders); + for (; aBindIt.More(); aBindIt.Next()) + { + TopoDS_Shape aShape = TransferBRep::ShapeResult(aTP, aBindIt.Value()); + if (aShape.IsNull()) + continue; + + TDF_Label aShapeLabel; + if (myMap.IsBound(aShape)) + { + aShapeLabel = myMap.Find(aShape); + } + if (!aShapeLabel.IsNull()) + { + aLabelSeq.Append(aShapeLabel); + } + } + + //create metadata + for (TDF_LabelSequence::Iterator aLabelIt(aLabelSeq); aLabelIt.More(); aLabelIt.Next()) + { + TDF_Label aLabel = aLabelIt.Value(); + Handle(TDataStd_NamedData) anAttr; + if (!aLabel.FindAttribute(TDataStd_NamedData::GetID(), anAttr)) + { + anAttr = new TDataStd_NamedData; + aLabel.AddAttribute(anAttr); + } + + fillAttributes(theWS, aPropDefinition, theLocalFactors, anAttr); + if (!aGroupedProperties.IsEmpty()) + { + NCollection_List::Iterator aPropIt(aGroupedProperties); + for ( ; aPropIt.More(); aPropIt.Next()) + { + fillAttributes(theWS, aPropIt.Value(), theLocalFactors, anAttr); + } + } + } + } + } + + return Standard_True; +} + +//======================================================================= +//function : findReprItems +//purpose : +//======================================================================= +Standard_Boolean STEPCAFControl_Reader::findReprItems(const Handle(XSControl_WorkSession)& theWS, + const Handle(StepShape_ShapeDefinitionRepresentation)& theShDefRepr, + NCollection_List& theBinders) const +{ + Handle(StepRepr_Representation) aRepr = theShDefRepr->UsedRepresentation(); + if (aRepr.IsNull()) + { + return Standard_False; + } + + Handle(Transfer_Binder) aBinder; + const Handle(Transfer_TransientProcess)& aTP = theWS->TransferReader()->TransientProcess(); + Handle(StepRepr_HArray1OfRepresentationItem) aReprItems = aRepr->Items(); + if (!aReprItems->IsEmpty()) + { + for (Standard_Integer anInd = aReprItems->Lower(); anInd <= aReprItems->Upper(); anInd++) + { + Handle(StepRepr_RepresentationItem) aReprItem = aReprItems->Value(anInd); + aBinder = aTP->Find(aReprItem); + if (!aBinder.IsNull()) + { + theBinders.Append(aBinder); + } + } + } + + return Standard_True; +} + +//======================================================================= +//function : fillAttributes +//purpose : +//======================================================================= +Standard_Boolean STEPCAFControl_Reader::fillAttributes(const Handle(XSControl_WorkSession)& theWS, + const Handle(StepRepr_PropertyDefinition)& thePropDef, + const StepData_Factors& theLocalFactors, + Handle(TDataStd_NamedData)& theAttr) const +{ + // skip if key is null + if (thePropDef->Name().IsNull()) + { + return Standard_False; + } + + Handle(StepRepr_PropertyDefinitionRepresentation) aPropDefRepr; + Interface_EntityIterator aSharingListOfPD = theWS->Graph().Sharings(thePropDef); + for (aSharingListOfPD.Start(); aSharingListOfPD.More(); aSharingListOfPD.Next()) + { + aPropDefRepr = Handle(StepRepr_PropertyDefinitionRepresentation)::DownCast(aSharingListOfPD.Value()); + if (aPropDefRepr.IsNull()) + continue; + + Handle(StepRepr_Representation) aUsedRepr = aPropDefRepr->UsedRepresentation(); + if (aUsedRepr.IsNull()) + continue; + + Handle(StepRepr_HArray1OfRepresentationItem) aReprItems = aUsedRepr->Items(); + if (!aReprItems.IsNull()) + { + for (Standard_Integer anIndex = aReprItems->Lower(); anIndex <= aReprItems->Upper(); anIndex++) + { + Handle(StepRepr_RepresentationItem) anItem = aReprItems->Value(anIndex); + if (anItem.IsNull()) + continue; + + if (anItem->IsKind(STANDARD_TYPE(StepRepr_DescriptiveRepresentationItem))) + { + Handle(StepRepr_DescriptiveRepresentationItem) aDescrItem = Handle(StepRepr_DescriptiveRepresentationItem)::DownCast(anItem); + Handle(TCollection_HAsciiString) aDescription = aDescrItem->Description(); + theAttr->SetString(thePropDef->Name()->ToCString(), aDescription->ToCString()); + } + else if (anItem->IsKind(STANDARD_TYPE(StepRepr_MeasureRepresentationItem))) + { + Handle(StepRepr_MeasureRepresentationItem) aMeasureItem = Handle(StepRepr_MeasureRepresentationItem)::DownCast(anItem); + Standard_Real aValue = aMeasureItem->Measure()->ValueComponent(); + TCollection_AsciiString aValType = aMeasureItem->Measure()->ValueComponentMember()->Name(); + StepBasic_Unit anUnit = aMeasureItem->Measure()->UnitComponent(); + if (!anUnit.IsNull()) + { + Standard_Real aParam = 1.; + if (anUnit.Type() == STANDARD_TYPE(StepBasic_DerivedUnit)) + { + Handle(StepBasic_DerivedUnit) aDUnit = anUnit.DerivedUnit(); + for (Standard_Integer anInd = 1; anInd <= aDUnit->NbElements(); ++anInd) + { + Handle(StepBasic_DerivedUnitElement) aDUElem = aDUnit->ElementsValue(anInd); + Standard_Real anExp = aDUElem->Exponent(); + Handle(StepBasic_NamedUnit) aNUnit = aDUElem->Unit(); + if (!aNUnit.IsNull()) + { + if (aNUnit->IsKind(STANDARD_TYPE(StepBasic_ConversionBasedUnitAndLengthUnit)) || + aNUnit->IsKind(STANDARD_TYPE(StepBasic_SiUnitAndLengthUnit))) + { + STEPConstruct_UnitContext anUnitCtx; + anUnitCtx.ComputeFactors(aNUnit, theLocalFactors); + if (aValType == "VOLUME_MEASURE") + { + aParam = pow(theLocalFactors.LengthFactor(), anExp); + } + else + { + aParam = aParam / pow(theLocalFactors.LengthFactor(), anExp); + } + } + else if (aNUnit->IsKind(STANDARD_TYPE(StepBasic_ConversionBasedUnitAndMassUnit))) { + Standard_Real aFact = 1.; + if (GetMassConversionFactor(aNUnit, aFact)) + { + aParam = aParam * aFact; + } + } + else + { + STEPConstruct_UnitContext anUnitCtx; + anUnitCtx.ComputeFactors(aNUnit, theLocalFactors); + if (anUnitCtx.AreaDone()) + aParam = anUnitCtx.AreaFactor(); + if (anUnitCtx.LengthDone()) + { + Standard_Real aLengthFactor = anUnitCtx.LengthFactor(); + aParam *= pow(aLengthFactor, anExp); + } + } + } + } + aValue = aValue * aParam; + } + else + { + Handle(StepBasic_NamedUnit) aNUnit = anUnit.NamedUnit(); + if (!aNUnit.IsNull()) + { + if (aNUnit->IsKind(STANDARD_TYPE(StepBasic_ConversionBasedUnitAndMassUnit))) + { + Standard_Real aFact = 1.; + if (GetMassConversionFactor(aNUnit, aFact)) + { + aValue *= aFact; + } + } + else + { + STEPConstruct_UnitContext anUnitCtx; + anUnitCtx.ComputeFactors(aNUnit, theLocalFactors); + if (anUnitCtx.AreaDone()) + aParam = anUnitCtx.AreaFactor(); + if (anUnitCtx.VolumeDone()) + aParam = anUnitCtx.VolumeFactor(); + if (anUnitCtx.LengthDone()) + aParam = anUnitCtx.LengthFactor(); + + aValue *= aParam; + } + } + } + } + theAttr->SetReal(thePropDef->Name()->ToCString(), aValue); + } + else if (anItem->IsKind(STANDARD_TYPE(StepRepr_ValueRepresentationItem))) + { + Handle(StepRepr_ValueRepresentationItem) aValueItem = Handle(StepRepr_ValueRepresentationItem)::DownCast(anItem); + Handle(StepBasic_MeasureValueMember) aMeasureValueMem = aValueItem->ValueComponentMember(); + Interface_ParamType aParamType = aMeasureValueMem->ParamType(); + if (aParamType == Interface_ParamInteger) + { + theAttr->SetInteger(thePropDef->Name()->ToCString(), aMeasureValueMem->Integer()); + } + else if (aParamType == Interface_ParamReal) + { + theAttr->SetReal(thePropDef->Name()->ToCString(), aMeasureValueMem->Real()); + } + } + else if (anItem->IsKind(STANDARD_TYPE(StepRepr_IntegerRepresentationItem))) + { + Handle(StepRepr_IntegerRepresentationItem) anIntegerItem = Handle(StepRepr_IntegerRepresentationItem)::DownCast(anItem); + theAttr->SetInteger(thePropDef->Name()->ToCString(), anIntegerItem->Value()); + } + else if (anItem->IsKind(STANDARD_TYPE(StepRepr_RealRepresentationItem))) + { + Handle(StepRepr_RealRepresentationItem) aRealItem = Handle(StepRepr_RealRepresentationItem)::DownCast(anItem); + theAttr->SetReal(thePropDef->Name()->ToCString(), aRealItem->Value()); + } + else if (anItem->IsKind(STANDARD_TYPE(StepRepr_BooleanRepresentationItem))) + { + Handle(StepRepr_BooleanRepresentationItem) aBoolItem = Handle(StepRepr_BooleanRepresentationItem)::DownCast(anItem); + theAttr->SetInteger(thePropDef->Name()->ToCString(), aBoolItem->Value()); + } + } + } + } + return Standard_True; +} diff --git a/src/STEPCAFControl/STEPCAFControl_Reader.hxx b/src/STEPCAFControl/STEPCAFControl_Reader.hxx index e4b0905cd9..6ee4433f96 100644 --- a/src/STEPCAFControl/STEPCAFControl_Reader.hxx +++ b/src/STEPCAFControl/STEPCAFControl_Reader.hxx @@ -29,16 +29,21 @@ #include class XSControl_WorkSession; +class TDataStd_NamedData; class TDocStd_Document; class STEPCAFControl_ExternFile; class TopoDS_Shape; class XCAFDoc_ShapeTool; class StepRepr_RepresentationItem; class Transfer_TransientProcess; +class StepBasic_NamedUnit; class StepShape_ConnectedFaceSet; +class StepShape_ShapeDefinitionRepresentation; class StepRepr_NextAssemblyUsageOccurrence; +class StepRepr_PropertyDefinition; class STEPConstruct_Tool; class StepDimTol_Datum; +class Transfer_Binder; //! Provides a tool to read STEP file and put it into //! DECAF document. Besides transfer of shapes (including @@ -175,6 +180,11 @@ public: Standard_EXPORT void SetPropsMode (const Standard_Boolean propsmode); Standard_EXPORT Standard_Boolean GetPropsMode() const; + + //! MetaMode for indicate read Metadata or not. + Standard_EXPORT void SetMetaMode(const Standard_Boolean theMetaMode); + + Standard_EXPORT Standard_Boolean GetMetaMode() const; //! Set SHUO mode for indicate write SHUO or not. Standard_EXPORT void SetSHUOMode (const Standard_Boolean shuomode); @@ -246,6 +256,12 @@ protected: const Handle(TDocStd_Document)& doc, const STEPCAFControl_DataMapOfPDExternFile& PDFileMap, const StepData_Factors& theLocalFactors = StepData_Factors()) const; + + //! Reads metadata assigned to shapes in the STEP model and + //! assigns them to corresponding labels in the DECAF document + Standard_EXPORT Standard_Boolean ReadMetadata(const Handle(XSControl_WorkSession)& theWS, + const Handle(TDocStd_Document)& theDoc, + const StepData_Factors& theLocalFactors = StepData_Factors()) const; //! Reads layers of parts defined in the STEP model and //! set reference between shape and layers in the DECAF document @@ -333,6 +349,17 @@ private: const Handle(TDocStd_Document)& theDoc, StepData_Factors& theLocalFactors) const; + //! Find RepresentationItems + Standard_Boolean findReprItems(const Handle(XSControl_WorkSession) & theWS, + const Handle(StepShape_ShapeDefinitionRepresentation) & theShDefRepr, + NCollection_List& theBinders) const; + + //! Fill metadata + Standard_Boolean fillAttributes(const Handle(XSControl_WorkSession)& theWS, + const Handle(StepRepr_PropertyDefinition)& thePropDef, + const StepData_Factors& theLocalFactors, + Handle(TDataStd_NamedData)& theAttr) const; + private: STEPControl_Reader myReader; @@ -342,6 +369,7 @@ private: Standard_Boolean myNameMode; Standard_Boolean myLayerMode; Standard_Boolean myPropsMode; + Standard_Boolean myMetaMode; Standard_Boolean mySHUOMode; Standard_Boolean myGDTMode; Standard_Boolean myMatMode; diff --git a/src/StepAP214/StepAP214_Protocol.cxx b/src/StepAP214/StepAP214_Protocol.cxx index 16643aa178..701086f5a4 100644 --- a/src/StepAP214/StepAP214_Protocol.cxx +++ b/src/StepAP214/StepAP214_Protocol.cxx @@ -158,6 +158,8 @@ static Standard_CString schemaAP242DIS = "AP242_MANAGED_MODEL_BASED_3D_ENGINEERI #include #include #include +#include +#include #include #include #include @@ -639,7 +641,9 @@ static Standard_CString schemaAP242DIS = "AP242_MANAGED_MODEL_BASED_3D_ENGINEERI #include #include #include +#include #include +#include #include #include #include @@ -1560,6 +1564,10 @@ StepAP214_Protocol::StepAP214_Protocol () types.Bind(STANDARD_TYPE(StepVisual_CubicBezierTessellatedEdge), 817); types.Bind(STANDARD_TYPE(StepVisual_CubicBezierTriangulatedFace), 818); types.Bind(STANDARD_TYPE(StepVisual_TriangulatedSurfaceSet), 819); + types.Bind(STANDARD_TYPE(StepBasic_GeneralPropertyAssociation), 820); + types.Bind(STANDARD_TYPE(StepBasic_GeneralPropertyRelationship), 821); + types.Bind(STANDARD_TYPE(StepRepr_BooleanRepresentationItem), 822); + types.Bind(STANDARD_TYPE(StepRepr_RealRepresentationItem), 823); } diff --git a/src/StepBasic/FILES b/src/StepBasic/FILES index d40fe74e7a..1857cbbed1 100644 --- a/src/StepBasic/FILES +++ b/src/StepBasic/FILES @@ -135,6 +135,10 @@ StepBasic_ExternalSource.cxx StepBasic_ExternalSource.hxx StepBasic_GeneralProperty.cxx StepBasic_GeneralProperty.hxx +StepBasic_GeneralPropertyAssociation.cxx +StepBasic_GeneralPropertyAssociation.hxx +StepBasic_GeneralPropertyRelationship.cxx +StepBasic_GeneralPropertyRelationship.hxx StepBasic_Group.cxx StepBasic_Group.hxx StepBasic_GroupAssignment.cxx diff --git a/src/StepBasic/StepBasic_GeneralPropertyAssociation.cxx b/src/StepBasic/StepBasic_GeneralPropertyAssociation.cxx new file mode 100644 index 0000000000..282a7d8855 --- /dev/null +++ b/src/StepBasic/StepBasic_GeneralPropertyAssociation.cxx @@ -0,0 +1,117 @@ +// Copyright (c) 2024 OPEN CASCADE SAS +// +// This file is part of Open CASCADE Technology software library. +// +// This library is free software; you can redistribute it and/or modify it under +// the terms of the GNU Lesser General Public License version 2.1 as published +// by the Free Software Foundation, with special exception defined in the file +// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT +// distribution for complete text of the license and disclaimer of any warranty. +// +// Alternatively, this file may be used under the terms of Open CASCADE +// commercial license or contractual agreement. + + +#include +#include + +IMPLEMENT_STANDARD_RTTIEXT(StepBasic_GeneralPropertyAssociation, Standard_Transient) + +//======================================================================= +//function : StepBasic_GeneralPropertyAssociation +//purpose : +//======================================================================= +StepBasic_GeneralPropertyAssociation::StepBasic_GeneralPropertyAssociation () +{ +} + +//======================================================================= +//function : Init +//purpose : +//======================================================================= +void StepBasic_GeneralPropertyAssociation::Init (const Handle(TCollection_HAsciiString)& aName, + const Handle(TCollection_HAsciiString)& aDescription, + const Handle(StepBasic_GeneralProperty)& aGeneralProperty, + const Handle(StepRepr_PropertyDefinition)& aPropertyDefinition) +{ + theName = aName; + + theDescription = aDescription; + + theGeneralProperty = aGeneralProperty; + + thePropertyDefinition = aPropertyDefinition; +} + +//======================================================================= +//function : Name +//purpose : +//======================================================================= +Handle(TCollection_HAsciiString) StepBasic_GeneralPropertyAssociation::Name() const +{ + return theName; +} + +//======================================================================= +//function : SetName +//purpose : +//======================================================================= +void StepBasic_GeneralPropertyAssociation::SetName(const Handle(TCollection_HAsciiString)& aName) +{ + theName = aName; +} + +//======================================================================= +//function : Description +//purpose : +//======================================================================= +Handle(TCollection_HAsciiString) StepBasic_GeneralPropertyAssociation::Description() const +{ + return theDescription; +} + +//======================================================================= +//function : SetDescription +//purpose : +//======================================================================= +void StepBasic_GeneralPropertyAssociation::SetDescription (const Handle(TCollection_HAsciiString)& aDescription) +{ + theDescription = aDescription; +} + +//======================================================================= +//function : GeneralProperty +//purpose : +//======================================================================= +Handle(StepBasic_GeneralProperty) StepBasic_GeneralPropertyAssociation::GeneralProperty() const +{ + return theGeneralProperty; +} + +//======================================================================= +//function : SetGeneralProperty +//purpose : +//======================================================================= +void StepBasic_GeneralPropertyAssociation::SetGeneralProperty(const Handle(StepBasic_GeneralProperty)& aGeneralProperty) +{ + theGeneralProperty = aGeneralProperty; +} + +//======================================================================= +//function : PropertyDefinition +//purpose : +//======================================================================= + +Handle(StepRepr_PropertyDefinition) StepBasic_GeneralPropertyAssociation::PropertyDefinition() const +{ + return thePropertyDefinition; +} + +//======================================================================= +//function : SetPropertyDefinition +//purpose : +//======================================================================= +void StepBasic_GeneralPropertyAssociation::SetPropertyDefinition(const Handle(StepRepr_PropertyDefinition)& aPropertyDefinition) +{ + thePropertyDefinition = aPropertyDefinition; +} diff --git a/src/StepBasic/StepBasic_GeneralPropertyAssociation.hxx b/src/StepBasic/StepBasic_GeneralPropertyAssociation.hxx new file mode 100644 index 0000000000..38e5534be0 --- /dev/null +++ b/src/StepBasic/StepBasic_GeneralPropertyAssociation.hxx @@ -0,0 +1,84 @@ +// Copyright (c) 2024 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 _StepBasic_GeneralPropertyAssociation_HeaderFile +#define _StepBasic_GeneralPropertyAssociation_HeaderFile + +#include +#include + +#include + +class TCollection_HAsciiString; +class StepBasic_GeneralProperty; +class StepRepr_PropertyDefinition; + +DEFINE_STANDARD_HANDLE(StepBasic_GeneralPropertyAssociation, Standard_Transient) + +//! Representation of STEP entity GeneralPropertyAssociation +class StepBasic_GeneralPropertyAssociation : public Standard_Transient +{ + +public: + + + //! Empty constructor + Standard_EXPORT StepBasic_GeneralPropertyAssociation(); + + //! Initialize all fields (own and inherited) + Standard_EXPORT void Init(const Handle(TCollection_HAsciiString)& aName, + const Handle(TCollection_HAsciiString)& aDescription, + const Handle(StepBasic_GeneralProperty)& aGeneralProperty, + const Handle(StepRepr_PropertyDefinition)& aPropertyDefinition); + + //! Returns field Name + Standard_EXPORT Handle(TCollection_HAsciiString) Name() const; + + //! Set field Name + Standard_EXPORT void SetName(const Handle(TCollection_HAsciiString)& Name); + + //! Returns field Description + Standard_EXPORT Handle(TCollection_HAsciiString) Description() const; + + //! Set field Description + Standard_EXPORT void SetDescription(const Handle(TCollection_HAsciiString)& Description); + + //! Returns field GeneralProperty + Standard_EXPORT Handle(StepBasic_GeneralProperty) GeneralProperty() const; + + //! Set field GeneralProperty + Standard_EXPORT void SetGeneralProperty(const Handle(StepBasic_GeneralProperty)& GeneralProperty); + + //! Returns field PropertyDefinition + Standard_EXPORT Handle(StepRepr_PropertyDefinition) PropertyDefinition() const; + + //! Set field PropertyDefinition + Standard_EXPORT void SetPropertyDefinition(const Handle(StepRepr_PropertyDefinition)& PropertyDefinition); + + DEFINE_STANDARD_RTTIEXT(StepBasic_GeneralPropertyAssociation, Standard_Transient) + +protected: + + + + +private: + + Handle(TCollection_HAsciiString) theName; + Handle(TCollection_HAsciiString) theDescription; + Handle(StepBasic_GeneralProperty) theGeneralProperty; + Handle(StepRepr_PropertyDefinition) thePropertyDefinition; + +}; + +#endif // _StepBasic_GeneralPropertyAssociation_HeaderFile diff --git a/src/StepBasic/StepBasic_GeneralPropertyRelationship.cxx b/src/StepBasic/StepBasic_GeneralPropertyRelationship.cxx new file mode 100644 index 0000000000..c86b3f31d0 --- /dev/null +++ b/src/StepBasic/StepBasic_GeneralPropertyRelationship.cxx @@ -0,0 +1,137 @@ +// Copyright (c) 2024 OPEN CASCADE SAS +// +// This file is part of Open CASCADE Technology software library. +// +// This library is free software; you can redistribute it and/or modify it under +// the terms of the GNU Lesser General Public License version 2.1 as published +// by the Free Software Foundation, with special exception defined in the file +// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT +// distribution for complete text of the license and disclaimer of any warranty. +// +// Alternatively, this file may be used under the terms of Open CASCADE +// commercial license or contractual agreement. + + +#include +#include +#include + +IMPLEMENT_STANDARD_RTTIEXT(StepBasic_GeneralPropertyRelationship, Standard_Transient) + +//======================================================================= +//function : StepBasic_GeneralPropertyRelationship +//purpose : +//======================================================================= +StepBasic_GeneralPropertyRelationship::StepBasic_GeneralPropertyRelationship () +{ +} + +//======================================================================= +//function : Init +//purpose : +//======================================================================= +void StepBasic_GeneralPropertyRelationship::Init(const Handle(TCollection_HAsciiString)& aName, + const Standard_Boolean hasDescription, + const Handle(TCollection_HAsciiString)& aDescription, + const Handle(StepBasic_GeneralProperty)& aRelatingGeneralProperty, + const Handle(StepBasic_GeneralProperty)& aRelatedGeneralProperty) +{ + theName = aName; + + defDescription = hasDescription; + if (defDescription) { + theDescription = aDescription; + } + else theDescription.Nullify(); + + theRelatingGeneralProperty = aRelatingGeneralProperty; + + theRelatedGeneralProperty = aRelatedGeneralProperty; +} + +//======================================================================= +//function : Name +//purpose : +//======================================================================= +Handle(TCollection_HAsciiString) StepBasic_GeneralPropertyRelationship::Name() const +{ + return theName; +} + +//======================================================================= +//function : SetName +//purpose : +//======================================================================= +void StepBasic_GeneralPropertyRelationship::SetName(const Handle(TCollection_HAsciiString)& aName) +{ + theName = aName; +} + +//======================================================================= +//function : HasDescription +//purpose : +//======================================================================= +Standard_Boolean StepBasic_GeneralPropertyRelationship::HasDescription() const +{ + return defDescription; +} + +//======================================================================= +//function : Description +//purpose : +//======================================================================= +Handle(TCollection_HAsciiString) StepBasic_GeneralPropertyRelationship::Description() const +{ + return theDescription; +} + +//======================================================================= +//function : SetDescription +//purpose : +//======================================================================= +void StepBasic_GeneralPropertyRelationship::SetDescription (const Handle(TCollection_HAsciiString)& aDescription) +{ + defDescription = true; + if (aDescription.IsNull()) + { + defDescription = false; + } + theDescription = aDescription; +} + +//======================================================================= +//function : RelatingGeneralProperty +//purpose : +//======================================================================= +Handle(StepBasic_GeneralProperty) StepBasic_GeneralPropertyRelationship::RelatingGeneralProperty() const +{ + return theRelatingGeneralProperty; +} + +//======================================================================= +//function : SetRelatingGeneralProperty +//purpose : +//======================================================================= +void StepBasic_GeneralPropertyRelationship::SetRelatingGeneralProperty(const Handle(StepBasic_GeneralProperty)& aRelatingGeneralProperty) +{ + theRelatingGeneralProperty = aRelatingGeneralProperty; +} + +//======================================================================= +//function : RelatedGeneralProperty +//purpose : +//======================================================================= + +Handle(StepBasic_GeneralProperty) StepBasic_GeneralPropertyRelationship::RelatedGeneralProperty() const +{ + return theRelatedGeneralProperty; +} + +//======================================================================= +//function : SetRelatedGeneralProperty +//purpose : +//======================================================================= +void StepBasic_GeneralPropertyRelationship::SetRelatedGeneralProperty(const Handle(StepBasic_GeneralProperty)& aRelatedGeneralProperty) +{ + theRelatedGeneralProperty = aRelatedGeneralProperty; +} diff --git a/src/StepBasic/StepBasic_GeneralPropertyRelationship.hxx b/src/StepBasic/StepBasic_GeneralPropertyRelationship.hxx new file mode 100644 index 0000000000..9520be1688 --- /dev/null +++ b/src/StepBasic/StepBasic_GeneralPropertyRelationship.hxx @@ -0,0 +1,88 @@ +// Copyright (c) 2024 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 _StepBasic_GeneralPropertyRelationship_HeaderFile +#define _StepBasic_GeneralPropertyRelationship_HeaderFile + +#include +#include + +#include + +class TCollection_HAsciiString; +class StepBasic_GeneralProperty; + +DEFINE_STANDARD_HANDLE(StepBasic_GeneralPropertyRelationship, Standard_Transient) + +//! Representation of STEP entity GeneralPropertyRelationship +class StepBasic_GeneralPropertyRelationship : public Standard_Transient +{ + +public: + + + //! Empty constructor + Standard_EXPORT StepBasic_GeneralPropertyRelationship(); + + //! Initialize all fields (own and inherited) + Standard_EXPORT void Init(const Handle(TCollection_HAsciiString)& aName, + const Standard_Boolean hasDescription, + const Handle(TCollection_HAsciiString)& aDescription, + const Handle(StepBasic_GeneralProperty)& aRelatingGeneralProperty, + const Handle(StepBasic_GeneralProperty)& aRelatedGeneralProperty); + + //! Returns field Name + Standard_EXPORT Handle(TCollection_HAsciiString) Name() const; + + //! Set field Name + Standard_EXPORT void SetName(const Handle(TCollection_HAsciiString)& Name); + + //! Returns True if optional field Description is defined + Standard_EXPORT Standard_Boolean HasDescription() const; + + //! Returns field Description + Standard_EXPORT Handle(TCollection_HAsciiString) Description() const; + + //! Set field Description + Standard_EXPORT void SetDescription(const Handle(TCollection_HAsciiString)& Description); + + //! Returns field RelatingGeneralProperty + Standard_EXPORT Handle(StepBasic_GeneralProperty) RelatingGeneralProperty() const; + + //! Set field RelatingGeneralProperty + Standard_EXPORT void SetRelatingGeneralProperty(const Handle(StepBasic_GeneralProperty)& RelatingGeneralProperty); + + //! Returns field RelatedGeneralProperty + Standard_EXPORT Handle(StepBasic_GeneralProperty) RelatedGeneralProperty() const; + + //! Set field RelatedGeneralProperty + Standard_EXPORT void SetRelatedGeneralProperty(const Handle(StepBasic_GeneralProperty)& RelatedGeneralProperty); + + DEFINE_STANDARD_RTTIEXT(StepBasic_GeneralPropertyRelationship, Standard_Transient) + +protected: + + + + +private: + + Standard_Boolean defDescription; + Handle(TCollection_HAsciiString) theName; + Handle(TCollection_HAsciiString) theDescription; + Handle(StepBasic_GeneralProperty) theRelatingGeneralProperty; + Handle(StepBasic_GeneralProperty) theRelatedGeneralProperty; + +}; + +#endif // _StepBasic_GeneralPropertyRelationship_HeaderFile diff --git a/src/StepBasic/StepBasic_MeasureValueMember.cxx b/src/StepBasic/StepBasic_MeasureValueMember.cxx index b4814dd362..510b240a5d 100644 --- a/src/StepBasic/StepBasic_MeasureValueMember.cxx +++ b/src/StepBasic/StepBasic_MeasureValueMember.cxx @@ -62,6 +62,7 @@ Standard_CString StepBasic_MeasureValueMember::Name () const case 13 : return "MASS_MEASURE"; case 14 : return "THERMODYNAMIC_TEMPERATURE_MEASURE"; case 15 : return "COUNT_MEASURE"; + case 16 : return "NUMERIC_MEASURE"; default : break; } return ""; @@ -92,6 +93,7 @@ Standard_Boolean StepBasic_MeasureValueMember::SetName (const Standard_CString else if (name[0] == 'M' && !strcmp (name,"MASS_MEASURE")) thecase = 13; else if (name[1] == 'H' && !strcmp (name,"THERMODYNAMIC_TEMPERATURE_MEASURE")) thecase = 14; else if (name[2] == 'U' && !strcmp (name,"COUNT_MEASURE")) thecase = 15; + else if (name[0] == 'N' && !strcmp (name,"NUMERIC_MEASURE")) thecase = 16; else return Standard_False; return Standard_True; diff --git a/src/StepData/StepData_ConfParameters.cxx b/src/StepData/StepData_ConfParameters.cxx index d3416d2696..57e0205350 100644 --- a/src/StepData/StepData_ConfParameters.cxx +++ b/src/StepData/StepData_ConfParameters.cxx @@ -58,6 +58,7 @@ void StepData_ConfParameters::InitFromStatic() ReadName = Interface_Static::IVal("read.name") == 1; ReadLayer = Interface_Static::IVal("read.layer") == 1; ReadProps = Interface_Static::IVal("read.props") == 1; + ReadMetadata = Interface_Static::IVal("read.metadata") == 1; WritePrecisionMode = (StepData_ConfParameters::WriteMode_PrecisionMode)Interface_Static::IVal("write.precision.mode"); WritePrecisionVal = Interface_Static::RVal("write.precision.val"); diff --git a/src/StepData/StepData_ConfParameters.hxx b/src/StepData/StepData_ConfParameters.hxx index 1acee3d6fa..2304e12fcc 100644 --- a/src/StepData/StepData_ConfParameters.hxx +++ b/src/StepData/StepData_ConfParameters.hxx @@ -166,6 +166,7 @@ public: bool ReadName = true; //SetInteger(atoi(str)); + sm->SetReal(Interface_FileReaderData::Fastof(str)); return Standard_True; } Handle(StepData_SelectInt) sin = new StepData_SelectInt; @@ -1358,16 +1358,27 @@ Standard_Boolean StepData_StepReaderData::ReadInteger(const Standard_Integer num Standard_Integer& val) const { Handle(String) errmess; // Null si pas d erreur + Standard_Boolean warn = Standard_False; if (nump > 0 && nump <= NbParams(num)) { const Interface_FileParameter& FP = Param(num, nump); - if (FP.ParamType() == Interface_ParamInteger) val = atoi(FP.CValue()); - else errmess = new String("Parameter n0.%d (%s) not an Integer"); + if (FP.ParamType() == Interface_ParamInteger) + val = atoi(FP.CValue()); + else if (FP.ParamType() == Interface_ParamReal) + { + val = static_cast(std::round(Interface_FileReaderData::Fastof(FP.CValue()))); + if (acceptvoid) warn = Standard_True; + errmess = new String("Parameter n0.%d (%s) was rounded"); + } + if (FP.ParamType() != Interface_ParamInteger && + FP.ParamType() != Interface_ParamReal) + errmess = new String("Parameter n0.%d (%s) not an Integer"); } else errmess = new String("Parameter n0.%d (%s) absent"); if (errmess.IsNull()) return Standard_True; sprintf(txtmes, errmess->ToCString(), nump, mess); - ach->AddFail(txtmes, errmess->ToCString()); + if (warn) ach->AddWarning(txtmes, errmess->ToCString()); + else ach->AddFail(txtmes, errmess->ToCString()); return Standard_False; } diff --git a/src/StepRepr/FILES b/src/StepRepr/FILES index ab9522c9e3..551a95ce76 100644 --- a/src/StepRepr/FILES +++ b/src/StepRepr/FILES @@ -12,6 +12,8 @@ StepRepr_AssemblyComponentUsageSubstitute.cxx StepRepr_AssemblyComponentUsageSubstitute.hxx StepRepr_BetweenShapeAspect.cxx StepRepr_BetweenShapeAspect.hxx +StepRepr_BooleanRepresentationItem.cxx +StepRepr_BooleanRepresentationItem.hxx StepRepr_CentreOfSymmetry.cxx StepRepr_CentreOfSymmetry.hxx StepRepr_CharacterizedDefinition.cxx @@ -110,6 +112,8 @@ StepRepr_PropertyDefinitionRepresentation.cxx StepRepr_PropertyDefinitionRepresentation.hxx StepRepr_QuantifiedAssemblyComponentUsage.cxx StepRepr_QuantifiedAssemblyComponentUsage.hxx +StepRepr_RealRepresentationItem.cxx +StepRepr_RealRepresentationItem.hxx StepRepr_Representation.cxx StepRepr_Representation.hxx StepRepr_RepresentationContext.cxx diff --git a/src/StepRepr/StepRepr_BooleanRepresentationItem.cxx b/src/StepRepr/StepRepr_BooleanRepresentationItem.cxx new file mode 100644 index 0000000000..785f8b53da --- /dev/null +++ b/src/StepRepr/StepRepr_BooleanRepresentationItem.cxx @@ -0,0 +1,28 @@ +// Copyright (c) 2024 OPEN CASCADE SAS +// +// This file is part of Open CASCADE Technology software library. +// +// This library is free software; you can redistribute it and/or modify it under +// the terms of the GNU Lesser General Public License version 2.1 as published +// by the Free Software Foundation, with special exception defined in the file +// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT +// distribution for complete text of the license and disclaimer of any warranty. +// +// Alternatively, this file may be used under the terms of Open CASCADE +// commercial license or contractual agreement. + +#include +#include + +IMPLEMENT_STANDARD_RTTIEXT(StepRepr_BooleanRepresentationItem, StepRepr_RepresentationItem) + +StepRepr_BooleanRepresentationItem::StepRepr_BooleanRepresentationItem() +{ +} + +void StepRepr_BooleanRepresentationItem::Init(const Handle(TCollection_HAsciiString)& theName, + const Standard_Boolean theValue) +{ + value = theValue; + StepRepr_RepresentationItem::Init(theName); +} diff --git a/src/StepRepr/StepRepr_BooleanRepresentationItem.hxx b/src/StepRepr/StepRepr_BooleanRepresentationItem.hxx new file mode 100644 index 0000000000..cb507556f4 --- /dev/null +++ b/src/StepRepr/StepRepr_BooleanRepresentationItem.hxx @@ -0,0 +1,52 @@ +// Copyright (c) 2024 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 _StepRepr_BooleanRepresentationItem_HeaderFile +#define _StepRepr_BooleanRepresentationItem_HeaderFile + +#include +#include + +#include +class TCollection_HAsciiString; + +class StepRepr_BooleanRepresentationItem; +DEFINE_STANDARD_HANDLE(StepRepr_BooleanRepresentationItem, StepRepr_RepresentationItem) + +class StepRepr_BooleanRepresentationItem : public StepRepr_RepresentationItem +{ +public: + + //! Returns a BooleanRepresentationItem + Standard_EXPORT StepRepr_BooleanRepresentationItem(); + + Standard_EXPORT void Init (const Handle(TCollection_HAsciiString)& theName, const Standard_Boolean theValue); + + inline void SetValue(const Standard_Boolean theValue) + { + value = theValue; + } + + inline Standard_Boolean Value() const + { + return value; + } + + DEFINE_STANDARD_RTTIEXT(StepRepr_BooleanRepresentationItem, StepRepr_RepresentationItem) + +private: + + Standard_Boolean value; +}; + +#endif // _StepRepr_BooleanRepresentationItem_HeaderFile diff --git a/src/StepRepr/StepRepr_RealRepresentationItem.cxx b/src/StepRepr/StepRepr_RealRepresentationItem.cxx new file mode 100644 index 0000000000..77287ff3f7 --- /dev/null +++ b/src/StepRepr/StepRepr_RealRepresentationItem.cxx @@ -0,0 +1,28 @@ +// Copyright (c) 2024 OPEN CASCADE SAS +// +// This file is part of Open CASCADE Technology software library. +// +// This library is free software; you can redistribute it and/or modify it under +// the terms of the GNU Lesser General Public License version 2.1 as published +// by the Free Software Foundation, with special exception defined in the file +// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT +// distribution for complete text of the license and disclaimer of any warranty. +// +// Alternatively, this file may be used under the terms of Open CASCADE +// commercial license or contractual agreement. + +#include +#include + +IMPLEMENT_STANDARD_RTTIEXT(StepRepr_RealRepresentationItem, StepRepr_RepresentationItem) + +StepRepr_RealRepresentationItem::StepRepr_RealRepresentationItem() +{ +} + +void StepRepr_RealRepresentationItem::Init(const Handle(TCollection_HAsciiString)& theName, + const Standard_Real theValue) +{ + value = theValue; + StepRepr_RepresentationItem::Init(theName); +} diff --git a/src/StepRepr/StepRepr_RealRepresentationItem.hxx b/src/StepRepr/StepRepr_RealRepresentationItem.hxx new file mode 100644 index 0000000000..720d47d64f --- /dev/null +++ b/src/StepRepr/StepRepr_RealRepresentationItem.hxx @@ -0,0 +1,53 @@ +// Copyright (c) 2024 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 _StepRepr_RealRepresentationItem_HeaderFile +#define _StepRepr_RealRepresentationItem_HeaderFile + +#include +#include + +#include +class TCollection_HAsciiString; + +class StepRepr_RealRepresentationItem; +DEFINE_STANDARD_HANDLE(StepRepr_RealRepresentationItem, StepRepr_RepresentationItem) + +class StepRepr_RealRepresentationItem : public StepRepr_RepresentationItem +{ + +public: + + //! Returns a RealRepresentationItem + Standard_EXPORT StepRepr_RealRepresentationItem(); + + Standard_EXPORT void Init (const Handle(TCollection_HAsciiString)& theName, const Standard_Real theValue); + + inline void SetValue(const Standard_Real theValue) + { + value = theValue; + } + + inline Standard_Real Value() const + { + return value; + } + + DEFINE_STANDARD_RTTIEXT(StepRepr_RealRepresentationItem, StepRepr_RepresentationItem) + +private: + + Standard_Real value; +}; + +#endif // _StepRepr_RealRepresentationItem_HeaderFile diff --git a/src/XSDRAWSTEP/XSDRAWSTEP.cxx b/src/XSDRAWSTEP/XSDRAWSTEP.cxx index 79b03af1ca..5dcea73704 100644 --- a/src/XSDRAWSTEP/XSDRAWSTEP.cxx +++ b/src/XSDRAWSTEP/XSDRAWSTEP.cxx @@ -693,12 +693,11 @@ static Standard_Integer ReadStep(Draw_Interpretor& theDI, } STEPCAFControl_Reader aReader(XSDRAW::Session(), isFileMode); - if (!aModeStr.IsEmpty()) { Standard_Boolean aMode = Standard_True; - for (Standard_Integer i = 1; aModeStr.Value(i); ++i) + for (Standard_Integer i = 1; i <= aModeStr.Length(); ++i) { switch (aModeStr.Value(i)) { @@ -720,6 +719,9 @@ static Standard_Integer ReadStep(Draw_Interpretor& theDI, case 'v': aReader.SetPropsMode(aMode); break; + case 'm': + aReader.SetMetaMode(aMode); + break; default: Message::SendFail() << "Syntax error at '" << aModeStr << "'\n"; return 1; diff --git a/tests/de_wrapper/configuration/A3 b/tests/de_wrapper/configuration/A3 index e3a1934835..50835a1ab6 100644 --- a/tests/de_wrapper/configuration/A3 +++ b/tests/de_wrapper/configuration/A3 @@ -44,6 +44,7 @@ provider.STEP.OCC.read.color : 1 provider.STEP.OCC.read.name : 1 provider.STEP.OCC.read.layer : 1 provider.STEP.OCC.read.props : 1 +provider.STEP.OCC.read.metadata : 0 provider.STEP.OCC.write.precision.mode : 0 provider.STEP.OCC.write.precision.val : 0.0001 provider.STEP.OCC.write.assembly : 0 diff --git a/tests/de_wrapper/configuration/A4 b/tests/de_wrapper/configuration/A4 index cda1c9a4b2..81d5587611 100644 --- a/tests/de_wrapper/configuration/A4 +++ b/tests/de_wrapper/configuration/A4 @@ -44,6 +44,7 @@ provider.STEP.OCC.read.color : 1 provider.STEP.OCC.read.name : 1 provider.STEP.OCC.read.layer : 1 provider.STEP.OCC.read.props : 1 +provider.STEP.OCC.read.metadata : 0 provider.STEP.OCC.write.precision.mode : 0 provider.STEP.OCC.write.precision.val : 0.0001 provider.STEP.OCC.write.assembly : 0 diff --git a/tests/metadata/begin b/tests/metadata/begin new file mode 100644 index 0000000000..4acc59bb42 --- /dev/null +++ b/tests/metadata/begin @@ -0,0 +1,5 @@ +pload DCAF +pload XDE + +cpulimit 1000 + diff --git a/tests/metadata/end b/tests/metadata/end new file mode 100644 index 0000000000..fc085fc911 --- /dev/null +++ b/tests/metadata/end @@ -0,0 +1,98 @@ +# Set flag dump_file to 1 in order to regenerate script files with actual data +# used as reference. In this mode all tests intentionally report failure. +set dump_file 0 +######################################################################## +set mist 0; +set todo_msg "" +set todo_mask "puts \"TODO CR00000 ALL: " +set end_line "\" \n" +################################################################## + +# Read original file +if { [string length $filename] > 1} { + set path_file [locate_data_file $filename] + if { [catch { ReadFile D $path_file -conf $conf} catch_result] } { + set err_msg "Error: file was not read - exception " + puts $err_msg + append todo_msg $todo_mask $err_msg $end_line + set mist 1 + } +} else { + set mist 1 +} + +# Get information about translation +if { $mist < 1} { + puts "" + set prop [ XGetProperties D ] + + if { [llength $prop] < 0 } { + puts " Metadata was NOT provided" + } +} +if { $mist < 1} { + # Close the document + if { [catch { Close D } catch_result] } { + set err_msg "Error : cannot close a document D - exception" + puts $err_msg + append todo_msg $todo_mask $err_msg $end_line + } +} + +if { $mist != 1 } { + puts "" + set result "" + append result [format $prop] +} + +set ref_Compare 0 +# Put reference data to the test script file if option "dump" is set +if { $dump_file == 1 } { + set fd_stream [open $dirname/$groupname/$gridname/$casename w] + fconfigure $fd_stream -encoding utf-8 + puts $fd_stream "# !!!! This file is generated automatically, do not edit manually! See end script" + puts $fd_stream "set filename $filename" + if { $mist != 1 } { + puts $fd_stream "" + puts $fd_stream "set ref_data \{" + puts $fd_stream $result + puts $fd_stream "\}" + } + close $fd_stream +} elseif { $mist != 1 } { + puts "========================== Comparison with reference data ========" + + # Comparison of reference data with obtained result + set ref_list [split $ref_data \n] + set cur_list [split $result \n] + set nb_ref [llength $ref_list] + for { set i 0 } { $i < $nb_ref } { incr i } { + set j [expr $i + 1] + set refstr [lindex $ref_list $j] + set curstr [lindex $cur_list $i] + set isOK 1; + + if {[string equal $refstr $curstr] == 0} { + incr ref_Compare + puts "Reference data - $refstr\n" + puts "Current data - $curstr\n" + puts "----------------------------------------------\n" + } + } +} + +if { $dump_file != 0 } { + puts "Error : Running in regeneration mode, comparison was not performed!" + if { $mist != 1 } { + puts "Generation of test file $groupname/$gridname/$casename successful" + } else { + puts "Generation of reference data failed" + } +} else { + if { $ref_Compare >= 1} { + puts "Error : differences with reference data found : $ref_Compare" + } else { + puts "Comparison of current result with reference data - OK\n" + } +} +puts "TEST COMPLETED" diff --git a/tests/metadata/grids.list b/tests/metadata/grids.list new file mode 100644 index 0000000000..c7e242aaea --- /dev/null +++ b/tests/metadata/grids.list @@ -0,0 +1 @@ +001 step diff --git a/tests/metadata/parse.rules b/tests/metadata/parse.rules new file mode 100644 index 0000000000..813616d1cf --- /dev/null +++ b/tests/metadata/parse.rules @@ -0,0 +1,11 @@ +FAILED /\bFaulty\b/ error +IGNORE /Software error/ message in tpstat +IGNORE /Syntax error/ message in data c +IGNORE /Transfer error/ message in tpstat +IGNORE /Operator FixShape failed with exception/ message during reading +IGNORE /Error on writing file/ message during writing file +IGNORE /StepFile Error/ message during loading step file +IGNORE /StepToTopoDS, GeometricSet/exception +IGNORE /OSD_Exception_ACCESS_VIOLATION/ exception during reading step +IGNORE /Exception Raised while reading Step File/ exception during reading step file +IGNORE /Warning: ShapeFix_.* Exception/ internal exceptions caught by FixShape \ No newline at end of file diff --git a/tests/metadata/step/A1 b/tests/metadata/step/A1 new file mode 100644 index 0000000000..5f59f47d56 --- /dev/null +++ b/tests/metadata/step/A1 @@ -0,0 +1,30 @@ +# !!!! This file is generated automatically, do not edit manually! See end script +set filename bug28345_30338.stp + +set ref_data { +Property for [0:1:1:1]: +H_CIP : 55.545955351400004 +Property for [0:1:1:2]: +H : 45 +E : 55 +B : 16 +I : 15 +A : 3 +D : 3 +C : 140 +F : 0.29999999999999999 +DESCRIPTION : +MODELED_BY : +Property for [0:1:1:3]: +H : 45 +E : 55 +B : 16 +I : 15 +A : 3 +D : 3 +C : 140 +F : 0.29999999999999999 +DESCRIPTION : +MODELED_BY : + +} diff --git a/tests/metadata/step/A2 b/tests/metadata/step/A2 new file mode 100644 index 0000000000..c790ff46ff --- /dev/null +++ b/tests/metadata/step/A2 @@ -0,0 +1,27 @@ +# !!!! This file is generated automatically, do not edit manually! See end script +set filename bug28389_CONFIDENTIAL_SHEET_METAL_F3D.stp + +set ref_data { +Property for [0:1:1:1]: +yCenterOfGravity : 0.1148447698 +Ixz : 9.3210000000000004e-07 +Izx : 9.3210000000000004e-07 +OriginY : 0 +Surface : 0.34595390710000001 +Volume : 0.0001375456 +Iyz : -1.2030000000000001e-07 +zCenterOfGravity : -0.056064514900000001 +Iyy : 3.6385e-06 +Ixy : 2.044e-07 +xCenterOfGravity : -0.12673526900000001 +Izz : 3.3558999999999999e-06 +Density : 1000 +Ixx : 1.7740000000000001e-06 +Izy : -1.2030000000000001e-07 +Mass : 0.13754561600000001 +Iyx : 2.044e-07 +OriginX : 0 +OriginZ : 0 +JoggleFormula : + +} diff --git a/tests/metadata/step/A3 b/tests/metadata/step/A3 new file mode 100644 index 0000000000..46f6de2315 --- /dev/null +++ b/tests/metadata/step/A3 @@ -0,0 +1,24 @@ +# !!!! This file is generated automatically, do not edit manually! See end script +set filename bug28444_nist_ftc_06_asme1_ct5240_rd.stp + +set ref_data { +Property for [0:1:1:1]: +yCenterOfGravity : 0.0289950044 +Ixz : 0 +Izx : 0 +Surface : 0.28317040780000002 +Volume : 0.0033238733999999999 +Iyz : -1.3068999999999999e-06 +zCenterOfGravity : -0.10963042420000001 +Iyy : 4.46342e-05 +Ixy : 0 +xCenterOfGravity : -0 +Izz : 2.63853e-05 +Density : 1000 +Length : 0 +Ixx : 2.16819e-05 +Izy : -1.3068999999999999e-06 +Mass : 3.3238733752999998 +Iyx : 0 + +} diff --git a/tests/metadata/step/A4 b/tests/metadata/step/A4 new file mode 100644 index 0000000000..3b4e1d1dc5 --- /dev/null +++ b/tests/metadata/step/A4 @@ -0,0 +1,617 @@ +# !!!! This file is generated automatically, do not edit manually! See end script +set filename bug29525_rev_part_neu_01.prt_converted_from_datakit.stp + +set ref_data { +Property for [0:1:1:1]: +PRO_MP_ALT_COGX : -> +D_BASE_UNIT SOURCE : User-Defined +PRO_MP_TRF_21 DESCRIPTION : NULL +PRO_MP_IXY DESCRIPTION : NULL +PRO_MP_VOLUME ACCESS : Locked +XSEC_NAME DESCRIPTION : NULL +MC_ERRORS DESCRIPTION : NULL +I_CUSTOMER_PROJ ACCESS : Full +PRO_MP_TRF_23 DESIGNATED : NO +PRO_MP_COGY DESIGNATED : NO +PRO_MP_COGY ACCESS : Locked +GEWINDE_TIEFE : 16.320000 +PRO_MP_ALT_IYY ACCESS : Full +PRO_MP_ALT_MASS SOURCE : Alternate Mass Prop +PRO_MP_ALT_COGY DESCRIPTION : NULL +D_DOC_CLASS DESCRIPTION : NULL +MBD SOURCE : User-Defined +PRO_MP_ALT_INERTIA_ORIGIN DESIGNATED : NO +I_ECM DESCRIPTION : NULL +D_DEPARTMENT DESIGNATED : YES +I_3D_RELEASE DESCRIPTION : NULL +I_APP_VERSION DESCRIPTION : NULL +PRO_MP_ALT_INERTIA_ORIGIN : PRO_MP_ALT_CSYS +PRO_MP_TRF_31 DESCRIPTION : NULL +PRO_MP_AREA SOURCE : Mass Properties +GEWINDE_DURCHM : 8.000000 +PDMREV DESIGNATED : NO +D_LOGIN ACCESS : Full +PRO_MP_ALT_IXY DESIGNATED : NO +D_LOCATION SOURCE : User-Defined +PRO_MP_ALT_VOLUME DESCRIPTION : NULL +PDMREV DESCRIPTION : NULL +MC_ERRORS : 0 +PRO_MP_TRF_13 DESCRIPTION : NULL +PTC_WM_LIFECYCLE : CONTI_CAD_Lifecycle +D_DOC_PART DESIGNATED : YES +PRO_MP_MASS DESIGNATED : NO +PRO_MP_COGY : -> +PRO_MP_AREA DESCRIPTION : NULL +PROI_REVISION ACCESS : Limited +PRO_MP_DENSITY DESIGNATED : NO +I_CUSTOMER_PROJ DESIGNATED : YES +PTC_MODIFIED DESCRIPTION : NULL +D_ECM_DESCRIPTION : - +D_FORMAT : - +PRO_MP_ALT_IZZ ACCESS : Full +PRO_MP_IXX DESCRIPTION : NULL +PROI_RELEASE ACCESS : Limited +BOHR_DURCHM ACCESS : Locked +PRO_MP_TRF_32 DESIGNATED : NO +PTC_WM_MODIFIED_ON : 04-Oct-16 09:42:00 AM +PTC_WM_VERSION ACCESS : Limited +PRO_MP_IYZ DESIGNATED : NO +PRO_MP_COGY SOURCE : Mass Properties +PTC_WM_LOCATION ACCESS : Limited +I_ADD_INFO ACCESS : Full +PTC_WM_MODIFIED_BY : von Bernuth Constantin (uidu3660) (uidu3660: Engineering) +PRO_MP_IZZ DESIGNATED : NO +SCHRAUBEN_GROESSE DESIGNATED : NO +D_WEIGHT_WEIGHED DESCRIPTION : NULL +D_MATERIAL ACCESS : Full +PRO_MP_TRF_42 SOURCE : Mass Properties +PRO_MP_ALT_AREA DESIGNATED : NO +D_DEPARTMENT DESCRIPTION : NULL +PRO_MP_TRF_12 DESIGNATED : NO +PTC_WM_CREATED_BY DESCRIPTION : NULL +GEWINDEGÄNGE_PRO_INCH : 20.320000 +PRO_MP_ALT_INERTIA_ORIGIN DESCRIPTION : NULL +PRO_MP_ALT_AREA SOURCE : Alternate Mass Prop +D_WEIGHT_WEIGHED : - +PROI_RELEASE DESCRIPTION : NULL +PRO_MP_CSYS DESCRIPTION : NULL +I_3D_RELEASE : - +I_CUSTOMER_PROJ SOURCE : User-Defined +PRO_MP_TRF_12 SOURCE : Mass Properties +I_NAME_OLD : - +MC_MODE SOURCE : User-Defined +PRO_MP_TRF_31 DESIGNATED : NO +METRISCH ACCESS : Locked +PRO_MP_IYZ : -> +I_RANGE SOURCE : User-Defined +PRO_MP_TRF_33 : -> +PRO_MP_ALT_COGY ACCESS : Full +GDTA_EINHEITEN_HINWEISE : 12 +PRO_MP_ALT_COGZ : -> +PROI_VERSION SOURCE : Alternate Mass Prop +I_CUSTOMER_PROJ DESCRIPTION : NULL +I_ADD_INFO DESIGNATED : YES +D_WEIGHT_WEIGHED SOURCE : User-Defined +PRO_MP_TRF_41 ACCESS : Locked +KLASSE DESIGNATED : NO +D_LAST_MODIFIED DESIGNATED : YES +PRO_MP_TRF_23 DESCRIPTION : NULL +PTC_WM_LOCATION DESIGNATED : NO +D_SURFACE SOURCE : User-Defined +PRO_MP_ALT_COGZ DESIGNATED : NO +PROI_LOCATION SOURCE : Alternate Mass Prop +GEWINDEGÄNGE_PRO_INCH ACCESS : Locked +GEWINDE_DURCHM DESCRIPTION : NULL +D_DOCNR ACCESS : Full +D_DOC_TYPE SOURCE : User-Defined +PRO_MP_TRF_33 ACCESS : Locked +CONTI_CLASS ACCESS : Full +PRO_MP_MASS DESCRIPTION : NULL +MBD DESIGNATED : NO +PROI_CREATED_BY DESCRIPTION : NULL +PRO_MP_ALT_IZZ : -> +PRO_MP_TRF_32 : -> +PROI_BRANCH DESIGNATED : NO +D_LOCATION DESIGNATED : YES +D_DESCRIPTION1 SOURCE : User-Defined +PRO_MP_TRF_22 SOURCE : Mass Properties +GEWINDE_DURCHM SOURCE : Mass Properties +D_WEIGHT_CALC : - +MC_MODE DESIGNATED : YES +D_ADD_INFORMATION SOURCE : User-Defined +PRO_MP_ALT_INERTIA_ORIGIN ACCESS : Full +PRO_MP_ALT_VOLUME : -> +I_CUSTOMER_PROJ : - +I_NAME_OLD ACCESS : Full +PRO_MP_TRF_41 SOURCE : Mass Properties +PTC_WM_ITERATION DESIGNATED : NO +PROI_VERSION DESCRIPTION : NULL +PRO_MP_ALT_CSYS : DEFAULT +MP_DENSITY : -> +PRO_MP_IZZ SOURCE : Mass Properties +PTC_MODIFIED ACCESS : Limited +PRO_MP_IYY DESCRIPTION : NULL +D_SURFACE ACCESS : Full +WT_EPMDOC_NUMBER ACCESS : Limited +PRO_MP_MASS SOURCE : Mass Properties +PDMRL DESCRIPTION : NULL +XSEC_NAME ACCESS : Full +PRO_MP_ALT_MASS : -> +D_DOC_PART SOURCE : User-Defined +PRO_MP_ALT_VOLUME SOURCE : Alternate Mass Prop +PRO_MP_ALT_IYY DESCRIPTION : NULL +PTC_MODIFIED SOURCE : Alternate Mass Prop +D_DOC_TYPE ACCESS : Full +PRO_MP_TRF_23 SOURCE : Mass Properties +CUSTOMER DESCRIPTION : NULL +PRO_MP_ALT_IYZ : -> +D_WEIGHT_CALC ACCESS : Full +D_BASE_UNIT : - +PRO_MP_MASS : -> +PTC_WM_MODIFIED_ON DESCRIPTION : NULL +PRO_MP_DENSITY ACCESS : Locked +PRO_MP_DENSITY SOURCE : Mass Properties +GEWINDE_LÄNGE SOURCE : Mass Properties +PTC_WM_MODIFIED_BY DESIGNATED : NO +I_3D_RELEASE ACCESS : Full +PRO_MP_ALT_COGZ DESCRIPTION : NULL +PTC_WM_TEAM DESCRIPTION : NULL +PROI_CREATED_ON DESCRIPTION : NULL +BOHRER_SPITZENWINKEL DESCRIPTION : NULL +PROI_RELEASE SOURCE : Alternate Mass Prop +D_DESCRIPTION0 SOURCE : User-Defined +PRO_MP_ALT_IXZ : -> +D_LAST_MODIFIED DESCRIPTION : NULL +PRO_MP_ALT_IZZ DESCRIPTION : NULL +WT_EPMDOC_NUMBER : REV_PART_NEU_01.PRT +PTC_WM_MODIFIED_ON DESIGNATED : NO +D_MATERIAL SOURCE : User-Defined +PRO_MP_ALT_IYY SOURCE : Alternate Mass Prop +PTC_WM_CREATED_ON : 04-Oct-16 09:41:59 AM +PRO_MP_IYZ ACCESS : Locked +MC_CONFIG DESIGNATED : YES +BOHR_DURCHM SOURCE : Mass Properties +PRO_MP_ALT_IXZ DESIGNATED : NO +GEWINDE_LÄNGE : 16.320000 +PTC_WM_MODIFIED_ON ACCESS : Limited +PRO_MP_TRF_13 ACCESS : Locked +PRO_MP_IXY ACCESS : Locked +D_DEPARTMENT ACCESS : Full +PRO_MP_DENSITY DESCRIPTION : NULL +PRO_MP_AREA ACCESS : Locked +PTC_WM_REVISION ACCESS : Limited +PRO_MP_TRF_31 : -> +PRO_MP_IYZ DESCRIPTION : NULL +PTC_WM_TEAM SOURCE : Mass Properties +D_MATNR ACCESS : Full +I_ADD_INFO SOURCE : User-Defined +KLASSE : H +PRO_MP_IYY SOURCE : Mass Properties +CONTI_CLASS DESCRIPTION : - +PTC_WM_VERSION : AA.0 +D_LOGIN DESCRIPTION : NULL +PRO_MP_COGX ACCESS : Locked +D_ECM_DESCRIPTION SOURCE : User-Defined +PDMDB ACCESS : Limited +D_WEIGHT_WEIGHED ACCESS : Full +MBD ACCESS : Full +PRO_MP_COGZ : -> +D_MATNR DESIGNATED : YES +D_LOGIN SOURCE : User-Defined +PRO_MP_IYY DESIGNATED : NO +GDTA_STANDARD_REF_HINWEISE : 18 +PRO_MP_TRF_33 DESCRIPTION : NULL +BOHR_TIEFE DESIGNATED : NO +PRO_MP_ALT_IZZ SOURCE : Alternate Mass Prop +CUSTOMER_PROJ0 : - +GEWINDE_TIEFE SOURCE : Mass Properties +PRO_MP_IXX : -> +CUSTOMER_PROJ0 ACCESS : Full +PDMRL : Planned +D_DEPARTMENT : - +PRO_MP_TRF_11 ACCESS : Locked +WT_EPMDOC_NUMBER DESCRIPTION : NULL +PRO_MP_TRF_11 DESIGNATED : NO +PRO_MP_CSYS SOURCE : Mass Properties +PRO_MP_ALT_COGY SOURCE : Alternate Mass Prop +PDMREV : AA.0+ +PRO_MP_INERTIA_ORIGIN ACCESS : Locked +PTC_WM_CREATED_BY SOURCE : Mass Properties +D_DOC_SUBTYPE : - +D_SURFACE_TEXT ACCESS : Full +PTC_WM_LIFECYCLE SOURCE : Mass Properties +PRO_MP_TRF_21 : -> +I_USE_STATUS DESCRIPTION : NULL +D_DOC_PART ACCESS : Full +I_CUSTOMER_RELATION ACCESS : Full +STEIGUNG DESIGNATED : NO +PTC_ORGANIZATION_ID DESIGNATED : NO +I_APP_VERSION DESIGNATED : YES +MP_DENSITY SOURCE : Alternate Mass Prop +PRO_MP_ALT_IYZ ACCESS : Full +D_WEIGHT_WEIGHED DESIGNATED : YES +PROI_BRANCH : +PROI_RELEASE DESIGNATED : NO +XSEC_SRF DESCRIPTION : NULL +GDTA_STANDARD_REF_HINWEISE SOURCE : User-Defined +PRO_MP_COGX DESIGNATED : NO +PROI_RELEASE : Planned +PRO_MP_TRF_41 : -> +PTC_WM_LIFECYCLE_STATE ACCESS : Limited +PTC_ORGANIZATION_ID DESCRIPTION : NULL +D_SURFACE_TEXT : - +PRO_MP_TRF_11 SOURCE : Mass Properties +PTC_WM_LOCATION SOURCE : Mass Properties +PTC_WM_CREATED_ON DESIGNATED : NO +PRO_MP_TRF_32 DESCRIPTION : NULL +BOHRER_SPITZENWINKEL DESIGNATED : NO +SCHRAUBEN_GROESSE : M8x1.25 +METRISCH SOURCE : Mass Properties +D_DESCRIPTION0 : - +PRO_MP_ALT_IXX DESCRIPTION : NULL +PRO_MP_IXX SOURCE : Mass Properties +PRO_MP_ALT_CSYS DESCRIPTION : NULL +PRO_MP_TRF_13 : -> +PTC_WM_ITERATION DESCRIPTION : NULL +KLASSE ACCESS : Locked +SCHRAUBEN_GROESSE SOURCE : Mass Properties +I_RANGE ACCESS : Full +PRO_MP_TRF_21 SOURCE : Mass Properties +PRO_MP_IYY : -> +PDMRL SOURCE : Alternate Mass Prop +PRO_MP_SOURCE DESCRIPTION : NULL +D_DOC_SUBTYPE SOURCE : User-Defined +GEWINDE_DURCHM DESIGNATED : NO +CONTI_CLASS DESIGNATED : YES +PRO_MP_TRF_32 SOURCE : Mass Properties +D_DESCRIPTION1 : - +PRO_MP_IZZ ACCESS : Locked +PRO_MP_TRF_42 DESCRIPTION : NULL +D_WEIGHT_CALC SOURCE : User-Defined +PROI_REVISION : AA +PRO_MP_ALT_COGX DESIGNATED : NO +PTC_WM_CREATED_ON SOURCE : Mass Properties +PRO_MP_TRF_13 SOURCE : Mass Properties +D_DOC_SUBTYPE ACCESS : Full +PRO_MP_ALT_IXX ACCESS : Full +D_DESCRIPTION1 ACCESS : Full +PRO_MP_ALT_AREA : -> +I_ADD_INFO DESCRIPTION : NULL +D_DOCNR SOURCE : User-Defined +PRO_MP_ALT_COGX SOURCE : Alternate Mass Prop +PROI_VERSION DESIGNATED : NO +GDTA_EINHEITEN_HINWEISE DESCRIPTION : NULL +PROI_CREATED_BY ACCESS : Limited +PTC_MODIFIED DESIGNATED : NO +I_RANGE DESCRIPTION : NULL +D_FORMAT SOURCE : User-Defined +PRO_MP_AREA DESIGNATED : NO +PTC_WM_MODIFIED_BY SOURCE : Mass Properties +D_ADD_INFORMATION DESIGNATED : YES +CUSTOMER_PROJ0 DESCRIPTION : NULL +PRO_MP_IXY SOURCE : Mass Properties +D_DESCRIPTION0 ACCESS : Full +PRO_MP_SOURCE DESIGNATED : NO +PROI_BRANCH SOURCE : Alternate Mass Prop +PTC_WM_LIFECYCLE_STATE : Planned +D_SURFACE : - +PRO_MP_TRF_22 ACCESS : Locked +XSEC_NAME : C +D_MATERIAL DESIGNATED : YES +PRO_MP_VOLUME SOURCE : Mass Properties +PRO_MP_IZZ DESCRIPTION : NULL +MP_DENSITY DESIGNATED : NO +PTC_WM_TEAM DESIGNATED : NO +D_WEIGHT_CALC DESIGNATED : YES +GEWINDEGÄNGE_PRO_INCH SOURCE : Mass Properties +PRO_MP_IXX ACCESS : Locked +GDTA_STANDARD_REF_HINWEISE DESCRIPTION : NULL +SCHRAUBEN_GROESSE ACCESS : Locked +D_LOCATION DESCRIPTION : NULL +PRO_MP_TRF_31 ACCESS : Locked +PRO_MP_AREA : -> +MC_ERRORS SOURCE : User-Defined +PTC_ORGANIZATION_ID SOURCE : Mass Properties +PRO_MP_CSYS : -> +D_SURFACE_TEXT DESCRIPTION : NULL +XSEC_NAME DESIGNATED : NO +PTC_WM_VERSION DESIGNATED : NO +PRO_MP_ALT_IYZ DESIGNATED : NO +PRO_MP_ALT_COGX ACCESS : Full +PRO_MP_TRF_42 DESIGNATED : NO +METRISCH DESIGNATED : NO +PRO_MP_ALT_COGY : -> +PTC_MODIFIED : 1 +BOHR_TIEFE ACCESS : Locked +STEIGUNG DESCRIPTION : NULL +PTC_WM_MODIFIED_ON SOURCE : Mass Properties +D_LOCATION ACCESS : Full +D_LAST_MODIFIED : jjjj-mm-dd +PRO_MP_IXZ DESIGNATED : NO +PROI_LOCATION DESIGNATED : NO +GDTA_EINHEITEN_HINWEISE ACCESS : Full +D_LOCATION : - +D_DOC_CLASS DESIGNATED : YES +I_CUSTOMER_RELATION : - +PRO_MP_CSYS DESIGNATED : NO +D_FORMAT ACCESS : Full +MC_CONFIG ACCESS : Full +METRISCH DESCRIPTION : NULL +GDTA_STANDARD_REF_HINWEISE DESIGNATED : NO +BOHR_TIEFE SOURCE : Mass Properties +PRO_MP_IZZ : -> +PROI_BRANCH ACCESS : Limited +PROI_LOCATION : +PROI_CREATED_ON : 10/28/08 14:24:55 +D_WEIGHT_CALC DESCRIPTION : NULL +XSEC_NAME SOURCE : User-Defined +PTC_WM_TEAM ACCESS : Limited +I_CUSTOMER_RELATION DESIGNATED : YES +D_DESCRIPTION1 DESCRIPTION : NULL +PRO_MP_TRF_12 DESCRIPTION : NULL +GEWINDE_LÄNGE ACCESS : Locked +PRO_MP_ALT_IXZ ACCESS : Full +I_RANGE DESIGNATED : YES +D_DOC_PART DESCRIPTION : NULL +D_ADD_INFORMATION DESCRIPTION : NULL +PRO_MP_INERTIA_ORIGIN : -> +BOHR_TIEFE DESCRIPTION : NULL +PRO_MP_IXY DESIGNATED : NO +PRO_MP_TRF_33 DESIGNATED : NO +D_DOCNR DESIGNATED : YES +PRO_MP_ALT_COGY DESIGNATED : NO +PRO_MP_ALT_AREA DESCRIPTION : NULL +MC_MODE DESCRIPTION : NULL +PRO_MP_IXZ DESCRIPTION : NULL +D_BASE_UNIT ACCESS : Full +CUSTOMER : - +PTC_WM_LIFECYCLE_STATE SOURCE : Mass Properties +PDMREV ACCESS : Limited +PRO_MP_INERTIA_ORIGIN DESCRIPTION : NULL +PROI_VERSION ACCESS : Limited +I_LABOR DESCRIPTION : NULL +D_SURFACE_TEXT DESIGNATED : YES +D_DOC_CLASS ACCESS : Full +PTC_WM_ITERATION : 0 +D_DOC_PART : 000 +PRO_MP_ALT_IYY DESIGNATED : NO +MC_ERRORS DESIGNATED : YES +PRO_MP_IYY ACCESS : Locked +PRO_MP_COGZ ACCESS : Locked +BOHRER_SPITZENWINKEL SOURCE : Mass Properties +METRISCH : JA +PDMRL DESIGNATED : NO +PRO_MP_SOURCE : GEOMETRY +XSEC_SRF ACCESS : Full +D_ECM_DESCRIPTION DESCRIPTION : NULL +PRO_MP_COGX DESCRIPTION : NULL +BOHR_TIEFE : 17.000000 +MBD : 1 +PRO_MP_ALT_IYZ DESCRIPTION : NULL +D_LAST_MODIFIED SOURCE : User-Defined +I_3D_RELEASE SOURCE : User-Defined +MODEL_CHECK : - +PTC_WM_LOCATION DESCRIPTION : NULL +CUSTOMER ACCESS : Full +PRO_MP_IXZ SOURCE : Mass Properties +D_DOCNR : - +KLASSE DESCRIPTION : NULL +SCHRAUBEN_GROESSE DESCRIPTION : NULL +D_DESCRIPTION0 DESCRIPTION : NULL +D_DOC_CLASS SOURCE : User-Defined +PRO_MP_TRF_23 ACCESS : Locked +PTC_WM_MODIFIED_BY DESCRIPTION : NULL +I_LABOR ACCESS : Full +PRO_MP_ALT_IXY : -> +D_FORMAT DESIGNATED : YES +I_NAME_OLD DESIGNATED : YES +PRO_MP_ALT_IYZ SOURCE : Alternate Mass Prop +PDMDB SOURCE : Alternate Mass Prop +I_USE_STATUS : - +I_NAME_OLD DESCRIPTION : NULL +XSEC_SRF SOURCE : User-Defined +PRO_MP_ALT_INERTIA_ORIGIN SOURCE : Alternate Mass Prop +PRO_MP_TRF_42 ACCESS : Locked +D_LOGIN DESIGNATED : YES +MODEL_CHECK DESCRIPTION : NULL +MBD DESCRIPTION : NULL +PRO_MP_ALT_IXY ACCESS : Full +XSEC_SRF DESIGNATED : NO +CUSTOMER_PROJ0 SOURCE : User-Defined +GEWINDEGÄNGE_PRO_INCH DESCRIPTION : NULL +PTC_WM_CREATED_BY ACCESS : Limited +MC_MODE ACCESS : Full +GDTA_EINHEITEN_HINWEISE SOURCE : User-Defined +PTC_WM_VERSION DESCRIPTION : NULL +D_LAST_MODIFIED ACCESS : Full +PTC_WM_LIFECYCLE DESCRIPTION : NULL +PRO_MP_TRF_22 DESCRIPTION : NULL +BOHR_DURCHM DESCRIPTION : NULL +PTC_ORGANIZATION_ID ACCESS : Limited +PROI_CREATED_BY SOURCE : Alternate Mass Prop +I_USE_STATUS ACCESS : Full +PROI_CREATED_ON SOURCE : Alternate Mass Prop +PRO_MP_TRF_12 ACCESS : Locked +PROI_REVISION SOURCE : Alternate Mass Prop +PRO_MP_SOURCE ACCESS : Full +PDMDB DESIGNATED : NO +D_DESCRIPTION0 DESIGNATED : YES +GDTA_STANDARD_REF_HINWEISE ACCESS : Full +PRO_MP_TRF_43 DESCRIPTION : NULL +PRO_MP_IXZ ACCESS : Locked +PRO_MP_COGY DESCRIPTION : NULL +PDMDB : +CONTI_CLASS : RD_AUXPART +PRO_MP_INERTIA_ORIGIN DESIGNATED : NO +PROI_CREATED_ON DESIGNATED : NO +PRO_MP_TRF_12 : -> +I_APP_VERSION : CREO2 M210 +PTC_WM_ITERATION ACCESS : Limited +I_USE_STATUS DESIGNATED : YES +D_BASE_UNIT DESIGNATED : YES +PTC_WM_MODIFIED_BY ACCESS : Limited +PTC_WM_VERSION SOURCE : Mass Properties +I_CUSTOMER_RELATION SOURCE : User-Defined +D_FORMAT DESCRIPTION : NULL +PRO_MP_ALT_IXY SOURCE : Alternate Mass Prop +PRO_MP_TRF_11 DESCRIPTION : NULL +PTC_WM_ITERATION SOURCE : Mass Properties +PRO_MP_TRF_11 : -> +PRO_MP_ALT_MASS DESIGNATED : NO +PRO_MP_TRF_43 SOURCE : Mass Properties +PRO_MP_VOLUME DESCRIPTION : NULL +STEIGUNG ACCESS : Locked +MC_MODE : - +PROI_REVISION DESIGNATED : NO +I_APP_VERSION SOURCE : User-Defined +GEWINDESERIE : ISO +PTC_WM_LIFECYCLE_STATE DESIGNATED : NO +D_SURFACE_TEXT SOURCE : User-Defined +PRO_MP_COGZ DESCRIPTION : NULL +PRO_MP_ALT_IXY DESCRIPTION : NULL +PDMDB DESCRIPTION : NULL +GEWINDESERIE DESCRIPTION : NULL +GDTA_EINHEITEN_HINWEISE DESIGNATED : NO +PRO_MP_COGX : -> +I_ECM SOURCE : User-Defined +PRO_MP_SOURCE SOURCE : Alternate Mass Prop +PDMREV SOURCE : Alternate Mass Prop +WT_EPMDOC_NUMBER SOURCE : Mass Properties +PRO_MP_TRF_22 DESIGNATED : NO +PRO_MP_ALT_IXX : -> +D_ADD_INFORMATION : - +PRO_MP_TRF_42 : -> +D_DESCRIPTION1 DESIGNATED : YES +PRO_MP_INERTIA_ORIGIN SOURCE : Mass Properties +PRO_MP_COGZ DESIGNATED : NO +D_LOGIN : - +MC_CONFIG SOURCE : User-Defined +D_ADD_INFORMATION ACCESS : Full +I_LABOR DESIGNATED : YES +PRO_MP_TRF_31 SOURCE : Mass Properties +BOHR_DURCHM : 6.800000 +CUSTOMER_PROJ0 DESIGNATED : YES +PTC_WM_LIFECYCLE ACCESS : Limited +I_USE_STATUS SOURCE : User-Defined +PRO_MP_COGX SOURCE : Mass Properties +PTC_WM_TEAM : +PDMRL ACCESS : Limited +PRO_MP_TRF_23 : -> +MC_ERRORS ACCESS : Full +PRO_MP_IXX DESIGNATED : NO +GEWINDEGÄNGE_PRO_INCH DESIGNATED : NO +PRO_MP_ALT_CSYS ACCESS : Full +PTC_ORGANIZATION_ID : Engineering +PRO_MP_CSYS ACCESS : Locked +BOHRER_SPITZENWINKEL : 118.000000 +GEWINDESERIE ACCESS : Locked +D_BASE_UNIT DESCRIPTION : NULL +PTC_WM_REVISION DESCRIPTION : NULL +PROI_BRANCH DESCRIPTION : NULL +MC_CONFIG : - +D_MATNR DESCRIPTION : NULL +PRO_MP_TRF_22 : -> +PRO_MP_TRF_33 SOURCE : Mass Properties +PRO_MP_COGZ SOURCE : Mass Properties +PRO_MP_VOLUME DESIGNATED : NO +I_LABOR : - +PRO_MP_ALT_IXZ DESCRIPTION : NULL +I_APP_VERSION ACCESS : Full +D_SURFACE DESIGNATED : YES +BOHR_DURCHM DESIGNATED : NO +GEWINDE_TIEFE DESIGNATED : NO +PTC_WM_CREATED_BY : von Bernuth Constantin (uidu3660) (uidu3660: Engineering) +PRO_MP_TRF_32 ACCESS : Locked +MODEL_CHECK SOURCE : User-Defined +PTC_WM_LIFECYCLE DESIGNATED : NO +D_MATNR : - +BOHRER_SPITZENWINKEL ACCESS : Locked +MODEL_CHECK ACCESS : Full +KLASSE SOURCE : Mass Properties +D_ECM_DESCRIPTION ACCESS : Full +D_DOC_CLASS : - +PRO_MP_IYZ SOURCE : Mass Properties +MC_CONFIG DESCRIPTION : NULL +PROI_LOCATION DESCRIPTION : NULL +GEWINDE_TIEFE ACCESS : Locked +PTC_WM_REVISION SOURCE : Mass Properties +PRO_MP_TRF_43 DESIGNATED : NO +PROI_LOCATION ACCESS : Limited +PRO_MP_ALT_VOLUME ACCESS : Full +PRO_MP_ALT_COGZ SOURCE : Alternate Mass Prop +PRO_MP_TRF_21 DESIGNATED : NO +MP_DENSITY DESCRIPTION : NULL +GEWINDE_DURCHM ACCESS : Locked +D_MATERIAL DESCRIPTION : NULL +PTC_WM_CREATED_ON DESCRIPTION : NULL +D_DEPARTMENT SOURCE : User-Defined +I_3D_RELEASE DESIGNATED : YES +PRO_MP_TRF_41 DESIGNATED : NO +I_ADD_INFO : - +GEWINDE_LÄNGE DESCRIPTION : NULL +PRO_MP_ALT_IZZ DESIGNATED : NO +PRO_MP_ALT_COGX DESCRIPTION : NULL +MODEL_CHECK DESIGNATED : YES +PRO_MP_DENSITY : 0.000000 +PROI_CREATED_ON ACCESS : Limited +D_SURFACE DESCRIPTION : NULL +I_RANGE : 40 +I_ECM ACCESS : Full +D_DOC_SUBTYPE DESCRIPTION : NULL +PRO_MP_IXY : -> +CUSTOMER SOURCE : User-Defined +STEIGUNG : 1.250000 +D_DOC_SUBTYPE DESIGNATED : YES +PRO_MP_ALT_MASS ACCESS : Full +I_CUSTOMER_RELATION DESCRIPTION : NULL +PRO_MP_ALT_CSYS DESIGNATED : NO +STEIGUNG SOURCE : Mass Properties +PRO_MP_TRF_43 : -> +CONTI_CLASS SOURCE : User-Defined +D_ECM_DESCRIPTION DESIGNATED : YES +PRO_MP_ALT_IXZ SOURCE : Alternate Mass Prop +GEWINDE_LÄNGE DESIGNATED : NO +PTC_WM_CREATED_BY DESIGNATED : NO +D_DOC_TYPE DESCRIPTION : NULL +PRO_MP_IXZ : -> +I_NAME_OLD SOURCE : User-Defined +PRO_MP_MASS ACCESS : Locked +PRO_MP_ALT_COGZ ACCESS : Full +PRO_MP_ALT_IXX SOURCE : Alternate Mass Prop +GEWINDESERIE SOURCE : Mass Properties +PTC_WM_LOCATION : +D_DOC_TYPE DESIGNATED : YES +PRO_MP_VOLUME : -> +I_ECM DESIGNATED : YES +I_ECM : - +PRO_MP_ALT_IXX DESIGNATED : NO +PTC_WM_REVISION : AA +GEWINDE_TIEFE DESCRIPTION : NULL +D_DOC_TYPE : - +MP_DENSITY ACCESS : Full +GEWINDESERIE DESIGNATED : NO +D_DOCNR DESCRIPTION : NULL +D_MATERIAL : - +PROI_CREATED_BY : +PRO_MP_TRF_21 ACCESS : Locked +PRO_MP_ALT_IYY : -> +PRO_MP_TRF_41 DESCRIPTION : NULL +PTC_WM_REVISION DESIGNATED : NO +PROI_CREATED_BY DESIGNATED : NO +D_MATNR SOURCE : User-Defined +PRO_MP_ALT_MASS DESCRIPTION : NULL +PRO_MP_TRF_13 DESIGNATED : NO +PRO_MP_ALT_CSYS SOURCE : Alternate Mass Prop +PTC_WM_CREATED_ON ACCESS : Limited +PRO_MP_ALT_VOLUME DESIGNATED : NO +I_LABOR SOURCE : User-Defined +WT_EPMDOC_NUMBER DESIGNATED : NO +PROI_REVISION DESCRIPTION : NULL +PRO_MP_TRF_43 ACCESS : Locked +XSEC_SRF : XSEC_SRF +PTC_WM_LIFECYCLE_STATE DESCRIPTION : NULL +PROI_VERSION : 0+ +PRO_MP_ALT_AREA ACCESS : Full +CUSTOMER DESIGNATED : YES + +} diff --git a/tests/metadata/step/A5 b/tests/metadata/step/A5 new file mode 100644 index 0000000000..e06628ac5e --- /dev/null +++ b/tests/metadata/step/A5 @@ -0,0 +1,19 @@ +# !!!! This file is generated automatically, do not edit manually! See end script +set filename bug29633_nist_ctc_05_asme1_ap242-1.stp + +set ref_data { +Property for [0:1:1:1]: +FILESIZE : 1495040 +GDT_STANDARD : 5302 +MaterialMultipleAssigned : FALSE +ATTR_VERSION : 18.3.001 +Part Number : NIST PMI CTC 05 ASME1 +FILESAVETIME : Tue Dec 09 03:47:24 2014 +Revision : D +CAD_SOURCE : ug +MTIME : 1418096844 +MaterialMissingAssignments : TRUE +FILENAME : nist_ctc_05_asme1.prt +Description : NIST PMI test model downloaded from http://go.usa.gov/mGVm + +} diff --git a/tests/metadata/step/A6 b/tests/metadata/step/A6 new file mode 100644 index 0000000000..5aece011e2 --- /dev/null +++ b/tests/metadata/step/A6 @@ -0,0 +1,42 @@ +# !!!! This file is generated automatically, do not edit manually! See end script +set filename bug29803.stp + +set ref_data { +Property for [0:1:1:1]: +OUT_MASS : 50.813477444850157 +RELIEF_DIA : 21.005799999999997 +HELIX_LENGTH : 0 +OUT_OAL : 78.049999999992593 +HELIX_START : 0 +OUT_SHANK_LEN : 27.2499999999926 +RCA_SIZE : 0 +SHANK_UNDER : 0 +OUT_REF_LEN : 50.799999999999997 +BODY_LENGTH : 48.513999999999996 +THEO_BLADE_DIA : 11.074399999999999 +DRILL_DEPTH : 47.625 +BODY_DIA : 0 +SHANK_SIZE : 16 +OUT_SHANK_DIA : 15.999999999999499 +FLUTE_LENGTH : 42.468799999999995 +PRIORITY : 0 +OUT_DRILL_DEPTH : 44.754799999999996 +SCREW_HOLE_SKEW : 1.1000000000000001 +SHANK_DIAMETER : 15.999999999999499 +SS_FLANGE : NO +DESCRIPTION : T-A HOLDER +MODELED_BY : LSD +STANDARD_BODY_DIA : Y +DEEP_HOLE_WEBSITE : +ITEM_NUM : HOLDER +LENGTH : STUB +FINISH : BLACK OXIDE +NOTES : +SHANK_IM : M +FLUTE : STRAIGHT +SHANK : ER +MATERIAL : STEEL +SERIES : Y +DEEP_HOLE_NOTES : + +} diff --git a/tests/metadata/step/A7 b/tests/metadata/step/A7 new file mode 100644 index 0000000000..de84141dfd --- /dev/null +++ b/tests/metadata/step/A7 @@ -0,0 +1,237 @@ +# !!!! This file is generated automatically, do not edit manually! See end script +set filename sp7_04-do-242.stp + +set ref_data { +Property for [0:1:1:1]: +PRO_MP_ALT_COGX : - > +DESCRIPTION ACCESS : Full +PRO_MP_TRF_21 DESCRIPTION : NULL +PRO_MP_IXY DESCRIPTION : NULL +PRO_MP_VOLUME ACCESS : Locked +PRO_MP_TRF_23 DESIGNATED : NO +PRO_MP_COGY DESIGNATED : NO +PRO_MP_COGY ACCESS : Locked +PRO_MP_ALT_IYY ACCESS : Full +PRO_MP_ALT_MASS SOURCE : Alternate Mass Prop +PRO_MP_ALT_COGY DESCRIPTION : NULL +PRO_MP_ALT_INERTIA_ORIGIN DESIGNATED : NO +PRO_MP_ALT_INERTIA_ORIGIN : PRO_MP_ALT_CSYS +PRO_MP_TRF_31 DESCRIPTION : NULL +PRO_MP_AREA SOURCE : Mass Properties +DESCRIPTION DESCRIPTION : NULL +PRO_MP_ALT_IXY DESIGNATED : NO +PRO_MP_ALT_VOLUME DESCRIPTION : NULL +PRO_MP_TRF_13 DESCRIPTION : NULL +PRO_MP_MASS DESIGNATED : NO +PRO_MP_COGY : - > +PRO_MP_AREA DESCRIPTION : NULL +PRO_MP_DENSITY DESIGNATED : NO +PRO_MP_ALT_IZZ ACCESS : Full +PRO_MP_IXX DESCRIPTION : NULL +PRO_MP_TRF_32 DESIGNATED : NO +PRO_MP_IYZ DESIGNATED : NO +PRO_MP_COGY SOURCE : Mass Properties +PRO_MP_IZZ DESIGNATED : NO +PRO_MP_TRF_42 SOURCE : Mass Properties +PRO_MP_ALT_AREA DESIGNATED : NO +PRO_MP_TRF_12 DESIGNATED : NO +PRO_MP_ALT_INERTIA_ORIGIN DESCRIPTION : NULL +PRO_MP_ALT_AREA SOURCE : Alternate Mass Prop +PRO_MP_CSYS DESCRIPTION : NULL +PRO_MP_TRF_12 SOURCE : Mass Properties +PRO_MP_TRF_31 DESIGNATED : NO +PRO_MP_IYZ : - > +PRO_MP_TRF_33 : - > +PRO_MP_ALT_COGY ACCESS : Full +REVISION SOURCE : User-Defined +PRO_MP_ALT_COGZ : - > +PRO_MP_TRF_41 ACCESS : Locked +PRO_MP_TRF_23 DESCRIPTION : NULL +PRO_MP_ALT_COGZ DESIGNATED : NO +PRO_MP_TRF_33 ACCESS : Locked +PRO_MP_MASS DESCRIPTION : NULL +PRO_MP_ALT_IZZ : - > +PRO_MP_TRF_32 : - > +DESCRIPTION : NIST PMI test model downloaded from http://go.usa.gov/mGVm +PRO_MP_TRF_22 SOURCE : Mass Properties +PRO_MP_ALT_INERTIA_ORIGIN ACCESS : Full +PRO_MP_ALT_VOLUME : - > +PRO_MP_TRF_41 SOURCE : Mass Properties +PRO_MP_ALT_CSYS : DEFAULT +MP_DENSITY : - > +PRO_MP_IZZ SOURCE : Mass Properties +PRO_MP_IYY DESCRIPTION : NULL +PRO_MP_MASS SOURCE : Mass Properties +PRO_MP_ALT_MASS : - > +PRO_MP_ALT_VOLUME SOURCE : Alternate Mass Prop +PRO_MP_ALT_IYY DESCRIPTION : NULL +DESCRIPTION SOURCE : User-Defined +PRO_MP_TRF_23 SOURCE : Mass Properties +PRO_MP_ALT_IYZ : - > +PRO_MP_MASS : - > +PRO_MP_DENSITY ACCESS : Locked +PRO_MP_DENSITY SOURCE : Mass Properties +PRO_MP_ALT_COGZ DESCRIPTION : NULL +PRO_MP_ALT_IXZ : - > +PRO_MP_ALT_IZZ DESCRIPTION : NULL +PRO_MP_ALT_IYY SOURCE : Alternate Mass Prop +PRO_MP_IYZ ACCESS : Locked +PRO_MP_ALT_IXZ DESIGNATED : NO +PRO_MP_TRF_13 ACCESS : Locked +PRO_MP_IXY ACCESS : Locked +PRO_MP_DENSITY DESCRIPTION : NULL +PRO_MP_AREA ACCESS : Locked +PRO_MP_TRF_31 : - > +PRO_MP_IYZ DESCRIPTION : NULL +PRO_MP_IYY SOURCE : Mass Properties +PRO_MP_COGX ACCESS : Locked +PRO_MP_COGZ : - > +PRO_MP_IYY DESIGNATED : NO +PRO_MP_TRF_33 DESCRIPTION : NULL +PRO_MP_ALT_IZZ SOURCE : Alternate Mass Prop +PRO_MP_IXX : - > +PRO_MP_TRF_11 ACCESS : Locked +PRO_MP_TRF_11 DESIGNATED : NO +PRO_MP_CSYS SOURCE : Mass Properties +PRO_MP_ALT_COGY SOURCE : Alternate Mass Prop +PRO_MP_INERTIA_ORIGIN ACCESS : Locked +PRO_MP_TRF_21 : - > +PART_NUMBER DESCRIPTION : NULL +MP_DENSITY SOURCE : Alternate Mass Prop +PRO_MP_ALT_IYZ ACCESS : Full +PRO_MP_COGX DESIGNATED : NO +PRO_MP_TRF_41 : - > +PRO_MP_TRF_11 SOURCE : Mass Properties +PRO_MP_TRF_32 DESCRIPTION : NULL +PRO_MP_ALT_IXX DESCRIPTION : NULL +PRO_MP_IXX SOURCE : Mass Properties +PRO_MP_ALT_CSYS DESCRIPTION : NULL +PRO_MP_TRF_13 : - > +PRO_MP_TRF_21 SOURCE : Mass Properties +PRO_MP_IYY : - > +PRO_MP_SOURCE DESCRIPTION : NULL +PRO_MP_TRF_32 SOURCE : Mass Properties +PRO_MP_IZZ ACCESS : Locked +PRO_MP_TRF_42 DESCRIPTION : NULL +PRO_MP_ALT_COGX DESIGNATED : NO +PRO_MP_TRF_13 SOURCE : Mass Properties +PRO_MP_ALT_IXX ACCESS : Full +PRO_MP_ALT_AREA : - > +PRO_MP_ALT_COGX SOURCE : Alternate Mass Prop +PRO_MP_AREA DESIGNATED : NO +PRO_MP_IXY SOURCE : Mass Properties +PRO_MP_SOURCE DESIGNATED : NO +PRO_MP_TRF_22 ACCESS : Locked +PRO_MP_VOLUME SOURCE : Mass Properties +PRO_MP_IZZ DESCRIPTION : NULL +MP_DENSITY DESIGNATED : NO +PRO_MP_IXX ACCESS : Locked +PRO_MP_TRF_31 ACCESS : Locked +PRO_MP_AREA : - > +PRO_MP_CSYS : - > +PRO_MP_ALT_IYZ DESIGNATED : NO +PRO_MP_ALT_COGX ACCESS : Full +PRO_MP_TRF_42 DESIGNATED : NO +PRO_MP_ALT_COGY : - > +PRO_MP_IXZ DESIGNATED : NO +PRO_MP_CSYS DESIGNATED : NO +PRO_MP_IZZ : - > +PRO_MP_TRF_12 DESCRIPTION : NULL +PRO_MP_ALT_IXZ ACCESS : Full +PRO_MP_INERTIA_ORIGIN : - > +PRO_MP_IXY DESIGNATED : NO +PRO_MP_TRF_33 DESIGNATED : NO +PRO_MP_ALT_COGY DESIGNATED : NO +PRO_MP_ALT_AREA DESCRIPTION : NULL +PRO_MP_IXZ DESCRIPTION : NULL +PRO_MP_INERTIA_ORIGIN DESCRIPTION : NULL +PRO_MP_ALT_IYY DESIGNATED : NO +PRO_MP_IYY ACCESS : Locked +PRO_MP_COGZ ACCESS : Locked +PRO_MP_SOURCE : GEOMETRY +PRO_MP_COGX DESCRIPTION : NULL +PRO_MP_ALT_IYZ DESCRIPTION : NULL +PRO_MP_IXZ SOURCE : Mass Properties +PRO_MP_TRF_23 ACCESS : Locked +PRO_MP_ALT_IXY : - > +PRO_MP_ALT_IYZ SOURCE : Alternate Mass Prop +PRO_MP_ALT_INERTIA_ORIGIN SOURCE : Alternate Mass Prop +PRO_MP_TRF_42 ACCESS : Locked +REVISION : D +PRO_MP_ALT_IXY ACCESS : Full +DESCRIPTION DESIGNATED : YES +PRO_MP_TRF_22 DESCRIPTION : NULL +PRO_MP_TRF_12 ACCESS : Locked +PRO_MP_SOURCE ACCESS : Full +REVISION DESIGNATED : YES +PRO_MP_TRF_43 DESCRIPTION : NULL +PRO_MP_IXZ ACCESS : Locked +PRO_MP_COGY DESCRIPTION : NULL +PRO_MP_INERTIA_ORIGIN DESIGNATED : NO +PRO_MP_TRF_12 : - > +REVISION DESCRIPTION : NULL +PRO_MP_ALT_IXY SOURCE : Alternate Mass Prop +PRO_MP_TRF_11 DESCRIPTION : NULL +PRO_MP_TRF_11 : - > +PRO_MP_ALT_MASS DESIGNATED : NO +PRO_MP_TRF_43 SOURCE : Mass Properties +PART_NUMBER ACCESS : Full +PRO_MP_VOLUME DESCRIPTION : NULL +PRO_MP_COGZ DESCRIPTION : NULL +PRO_MP_ALT_IXY DESCRIPTION : NULL +PRO_MP_COGX : - > +PRO_MP_SOURCE SOURCE : Alternate Mass Prop +PRO_MP_TRF_22 DESIGNATED : NO +PRO_MP_ALT_IXX : - > +PRO_MP_TRF_42 : - > +PRO_MP_INERTIA_ORIGIN SOURCE : Mass Properties +PRO_MP_COGZ DESIGNATED : NO +PRO_MP_TRF_31 SOURCE : Mass Properties +PART_NUMBER DESIGNATED : YES +PRO_MP_COGX SOURCE : Mass Properties +PRO_MP_TRF_23 : - > +PRO_MP_IXX DESIGNATED : NO +PRO_MP_ALT_CSYS ACCESS : Full +PRO_MP_CSYS ACCESS : Locked +PRO_MP_TRF_22 : - > +PRO_MP_TRF_33 SOURCE : Mass Properties +PRO_MP_COGZ SOURCE : Mass Properties +PRO_MP_VOLUME DESIGNATED : NO +PRO_MP_ALT_IXZ DESCRIPTION : NULL +PART_NUMBER SOURCE : User-Defined +PRO_MP_TRF_32 ACCESS : Locked +PRO_MP_IYZ SOURCE : Mass Properties +PRO_MP_TRF_43 DESIGNATED : NO +PRO_MP_ALT_VOLUME ACCESS : Full +PRO_MP_ALT_COGZ SOURCE : Alternate Mass Prop +PRO_MP_TRF_21 DESIGNATED : NO +MP_DENSITY DESCRIPTION : NULL +PRO_MP_TRF_41 DESIGNATED : NO +REVISION ACCESS : Full +PRO_MP_ALT_IZZ DESIGNATED : NO +PRO_MP_ALT_COGX DESCRIPTION : NULL +PRO_MP_DENSITY : 0.000000 +PRO_MP_IXY : - > +PRO_MP_ALT_MASS ACCESS : Full +PRO_MP_ALT_CSYS DESIGNATED : NO +PRO_MP_TRF_43 : - > +PRO_MP_ALT_IXZ SOURCE : Alternate Mass Prop +PRO_MP_IXZ : - > +PRO_MP_MASS ACCESS : Locked +PRO_MP_ALT_COGZ ACCESS : Full +PRO_MP_ALT_IXX SOURCE : Alternate Mass Prop +PRO_MP_VOLUME : - > +PRO_MP_ALT_IXX DESIGNATED : NO +MP_DENSITY ACCESS : Full +PRO_MP_TRF_21 ACCESS : Locked +PRO_MP_ALT_IYY : - > +PRO_MP_TRF_41 DESCRIPTION : NULL +PRO_MP_ALT_MASS DESCRIPTION : NULL +PRO_MP_TRF_13 DESIGNATED : NO +PRO_MP_ALT_CSYS SOURCE : Alternate Mass Prop +PRO_MP_ALT_VOLUME DESIGNATED : NO +PART_NUMBER : NIST PMI CTC 04 ASME1 +PRO_MP_TRF_43 ACCESS : Locked +PRO_MP_ALT_AREA ACCESS : Full + +} diff --git a/tests/metadata/step/A8 b/tests/metadata/step/A8 new file mode 100644 index 0000000000..09a3369d68 --- /dev/null +++ b/tests/metadata/step/A8 @@ -0,0 +1,69 @@ +# !!!! This file is generated automatically, do not edit manually! See end script +set filename bug32087_part.stp + +set ref_data { +Property for [0:1:1:1]: +SETUP_PART : 0 +MODEL_3D_REVISION : 1 +MATERIAL_DENSITY : 7850 +WEIGHT_PROTOTYPE : 0 +WEIGHT_FINAL : 0 +WEIGHT_CALCULATED : 0.0070751592515700002 +SUPPLIER_NAME : +SEMI_FINISHED_PRODUCT : +REFERENCE : +MODEL_3D_CAD_SYSTEM : +MODEL_3D_APPROVED_BY : +REFERENCE_DESIGNATION++ : +PART_NAME : +MODEL_3D_CHECKED_BY : +OWNER : +COPYRIGHT : +WORK_ORDER_NUMBER : +PART_NUMBER : +ID_NUMBER_MATERIAL : +SPARE_WEARING_PART : +TREATMENT : +GENERAL_TOLERANCES_DRILL_HOLE : +MODEL_3D_CREATED_BY : +UNIT_SYSTEM : +MODEL_3D_DATE_OF_ISSUE : +WELD_TOLERANCES : +PROJECT : +MODEL_3D_RELEASED_STATUS : +MODEL_3D_CREATED_BY_DEPARTMENT : +LANGUAGE : +TECHNICAL_SPECIFICATION : +SUPPLIER_NUMBER : +SURFACE_PROTECTION : +EDGE_CONDITION : +GENERAL_TOLERANCES : +EDGE_CONDITION_INNER_EDGE : +ORDER_NUMBER : +GENERAL_TOLERANCES_FIT_DRILL_HOLE : +REFERENCE_DESIGNATION= : +SURFACE_ROUGHNESS : +TECHNICAL_DIRECTIVE : +TOLERANCING_PRINCIPLE : +REFERENCE_DESIGNATION- : +STOCK_NUMBER : +MODEL_3D_APPROVED_BY_DEPARTMENT : +PART_REVISION_LEVEL : +ARTICLE_NUMBER : +EDGE_CONDITION_OUTER_EDGE : +MATERIAL : +SIMPLIFIED_DRAWING_REVISION : +REFERENCE_DESIGNATION== : +MODEL_3D_REVISION_LEVEL : +MODEL_3D_RELEASED_BY : +MODEL_3D_REPLACED_BY : +MODEL_3D_ID_NUMBER : +REFERENCE_DESIGNATION+ : +PART_NOTE : +WELD_PREPARATION : +MODEL_3D_RELEASED_DATE : +MODEL_3D_REPLACES : +PAINT_SURFACE : +PART_SOURCE : + +} diff --git a/tests/metadata/step/A9 b/tests/metadata/step/A9 new file mode 100644 index 0000000000..1eead28ed9 --- /dev/null +++ b/tests/metadata/step/A9 @@ -0,0 +1,10 @@ +# !!!! This file is generated automatically, do not edit manually! See end script +set filename nist_ftc_08_asme1_ap242-2.stp + +set ref_data { +Property for [0:1:1:1]: +Revision : C +PartNumber : NIST PMI FTC 08 ASME1 +DescriptionRef : NIST PMI test model downloaded from http://go.usa.gov/mGVm + +} diff --git a/tests/metadata/step/begin b/tests/metadata/step/begin new file mode 100644 index 0000000000..95e00a7c4d --- /dev/null +++ b/tests/metadata/step/begin @@ -0,0 +1,2 @@ +set conf "provider.STEP.OCC.read.metadata : 1" + From e8a36f3a028c57b789c2fd5c9818be9b386ae3a1 Mon Sep 17 00:00:00 2001 From: astromko Date: Thu, 15 Feb 2024 14:12:39 +0000 Subject: [PATCH 543/639] 0033383: Modeling Algorithms - Wire/Face creation problem ProjCurve3d and BRepAlgo_FaceRestrictor::Perform functions should not continue to work and should terminate if the BRep_Tool::Curve function returns null pointer. --- src/BRepAlgo/BRepAlgo_FaceRestrictor.cxx | 17 ++++++++++++++--- tests/bugs/modalg_8/bug33383 | 14 ++++++++++++++ 2 files changed, 28 insertions(+), 3 deletions(-) create mode 100644 tests/bugs/modalg_8/bug33383 diff --git a/src/BRepAlgo/BRepAlgo_FaceRestrictor.cxx b/src/BRepAlgo/BRepAlgo_FaceRestrictor.cxx index 05c849b353..5d668015e6 100644 --- a/src/BRepAlgo/BRepAlgo_FaceRestrictor.cxx +++ b/src/BRepAlgo/BRepAlgo_FaceRestrictor.cxx @@ -103,7 +103,7 @@ static Standard_Boolean ChangePCurve (TopoDS_Edge& E, //purpose : //======================================================================= -static void ProjCurve3d (TopoDS_Edge& E, +static bool ProjCurve3d (TopoDS_Edge& E, const Handle(Geom_Surface)& S, TopLoc_Location& L) { @@ -111,6 +111,10 @@ static void ProjCurve3d (TopoDS_Edge& E, TopLoc_Location LE; Standard_Real f,l; Handle(Geom_Curve) C = BRep_Tool::Curve(E,LE,f,l); + if (C.IsNull()) + { + return false; + } Handle(Geom_TrimmedCurve) CT = new Geom_TrimmedCurve(C,f,l); TopLoc_Location LL = L.Inverted().Multiplied(LE); @@ -118,6 +122,7 @@ static void ProjCurve3d (TopoDS_Edge& E, Handle(Geom2d_Curve) C2 = GeomProjLib::Curve2d (CT,S); BB.UpdateEdge(E,C2,S,L,Precision::Confusion()); + return true; } //======================================================================= @@ -165,13 +170,19 @@ void BRepAlgo_FaceRestrictor::Perform() // no pcurve on the reference surface. if (modeProj) { // Projection of the 3D curve on surface. - ProjCurve3d ( E, S, L); + if (!ProjCurve3d(E, S, L)) + { + return; + } } else { // return the first pcurve glued on Standard_Boolean YaPCurve = ChangePCurve (E, S, L); if (!YaPCurve) { - ProjCurve3d (E, S, L); + if (!ProjCurve3d(E, S, L)) + { + return; + } } } } diff --git a/tests/bugs/modalg_8/bug33383 b/tests/bugs/modalg_8/bug33383 new file mode 100644 index 0000000000..e9a56c2705 --- /dev/null +++ b/tests/bugs/modalg_8/bug33383 @@ -0,0 +1,14 @@ +puts "=========================================================" +puts "0033383: Modeling Algorithms - Wire/Face creation problem" +puts "=========================================================" +puts "" + +pload MODELING +restore [locate_data_file bug33383.brep] a +connectedges res a 1e-07 0 +explode res +mkplane pln1 res_1 1 + +if ![catch { buildfaces rebf pln1 res_2 }] then { + puts "Error: buildfaces command should be failed" +} From 59399910706f8fe1b455b0fd9a892cc878bbc06b Mon Sep 17 00:00:00 2001 From: abv Date: Fri, 8 Mar 2024 18:56:26 +0000 Subject: [PATCH 544/639] 0025415: Data Exchange - Invalid result of loading a STEP file Handling of special case found on some STEP files produced by FPX Expert 2013 (PCB design system): edge curve is line displaced from its true position but with correct direction; we shift the line in this case so that it passes through vertices correcty. Protection against possible exception in writing XDE. --- src/STEPCAFControl/STEPCAFControl_Writer.cxx | 2 +- .../StepToTopoDS_TranslateEdge.cxx | 19 ++++++++++++++++++- tests/bugs/step/bug25415 | 11 +++++++++++ 3 files changed, 30 insertions(+), 2 deletions(-) create mode 100644 tests/bugs/step/bug25415 diff --git a/src/STEPCAFControl/STEPCAFControl_Writer.cxx b/src/STEPCAFControl/STEPCAFControl_Writer.cxx index 669550e308..d9a716269b 100644 --- a/src/STEPCAFControl/STEPCAFControl_Writer.cxx +++ b/src/STEPCAFControl/STEPCAFControl_Writer.cxx @@ -983,7 +983,7 @@ static Standard_Integer FindEntities(const Handle(Transfer_FinderProcess)& theFP //Handle(Transfer_TransientListBinder)::DownCast( bnd->Next(Standard_True) ); Handle(Transfer_TransientListBinder)::DownCast(aBinder); Standard_Integer aResCount = 0; - if (aTransientListBinder.IsNull() && theShape.ShapeType() == TopAbs_COMPOUND) + if (aTransientListBinder.IsNull()) { for (TopoDS_Iterator anIter(theShape); anIter.More(); anIter.Next()) { diff --git a/src/StepToTopoDS/StepToTopoDS_TranslateEdge.cxx b/src/StepToTopoDS/StepToTopoDS_TranslateEdge.cxx index 043e946b93..227b9f46a4 100644 --- a/src/StepToTopoDS/StepToTopoDS_TranslateEdge.cxx +++ b/src/StepToTopoDS/StepToTopoDS_TranslateEdge.cxx @@ -408,7 +408,24 @@ void StepToTopoDS_TranslateEdge::MakeFromCurve3D temp1 = pU1.Distance ( pv1 ); temp2 = pU2.Distance ( pv2 ); if ( temp1 > preci || temp2 > preci ) { - TP->AddWarning (C3D,"Poor result from projection vertex / curve 3d"); + // #25415: handling of special case found on some STEP files produced by FPX Expert 2013 (PCB design system): + // edge curve is line displaced from its true position but with correct direction; + // we can shift the line in this case so that it passes through vertices correcty + if (Abs (temp1 - temp2) < preci && Abs (U2 - U1 - pnt1.Distance(pnt2)) < Precision::Confusion() && + C1->IsKind(STANDARD_TYPE(Geom_Line))) + { + Handle(Geom_Line) aLine = Handle(Geom_Line)::DownCast (C1); + gp_Lin aLin = aLine->Lin(); + gp_Pnt anOrigin = pnt1.XYZ() - aLin.Position().Direction().XYZ() * U1; + aLin.SetLocation (anOrigin); + C1 = new Geom_Line (aLin); + + TP->AddWarning (C3D,"Poor result from projection vertex / line 3d, line shifted"); + } + else + { + TP->AddWarning (C3D,"Poor result from projection vertex / curve 3d"); + } } B.UpdateVertex ( V1, 1.000001*temp1 ); //:h6 abv 14 Jul 98: PRO8845 #2746: *=1.0001 B.UpdateVertex ( V2, 1.000001*temp2 ); //:h6 diff --git a/tests/bugs/step/bug25415 b/tests/bugs/step/bug25415 new file mode 100644 index 0000000000..384fbfe7ef --- /dev/null +++ b/tests/bugs/step/bug25415 @@ -0,0 +1,11 @@ +puts "========" +puts "OCC25415" +puts "========" +puts "" +########################################################################## +# Invalid result of loading a STEP file +########################################################################## + +stepread [locate_data_file bug25415_part_of_hdrv8w64p254_4x2_1016x502h838p.stp] a * + +checkshape a_1 From a9becad23367c484786b38aa66f76b4ba3b2ac0a Mon Sep 17 00:00:00 2001 From: ichesnok Date: Fri, 8 Mar 2024 19:09:56 +0000 Subject: [PATCH 545/639] 0033596: Documentation - Incorrect default value read.step.tessellated Default value of read.step.tessellated corrected. --- dox/user_guides/step/step.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dox/user_guides/step/step.md b/dox/user_guides/step/step.md index b079d0b220..457b5f0010 100644 --- a/dox/user_guides/step/step.md +++ b/dox/user_guides/step/step.md @@ -475,7 +475,7 @@ Modify this parameter with: if(!Interface_Static::SetIVal("read.step.tessellated",1)) .. error .. ~~~~ -Default value is 0 (On). +Default value is 1 (On). @subsubsection occt_step_2_3_4 Performing the STEP file translation From 993da38d54e0c673424171bd509aeedcd85a92b8 Mon Sep 17 00:00:00 2001 From: ichesnok Date: Fri, 8 Mar 2024 15:56:34 +0000 Subject: [PATCH 546/639] 0033611: Data Exchange - Incorrect header guard for STEP property Incorrect header guard fixed. --- src/RWStepBasic/RWStepBasic_RWGeneralPropertyRelationship.hxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/RWStepBasic/RWStepBasic_RWGeneralPropertyRelationship.hxx b/src/RWStepBasic/RWStepBasic_RWGeneralPropertyRelationship.hxx index aa712f4b5e..c5818adefd 100644 --- a/src/RWStepBasic/RWStepBasic_RWGeneralPropertyRelationship.hxx +++ b/src/RWStepBasic/RWStepBasic_RWGeneralPropertyRelationship.hxx @@ -12,7 +12,7 @@ // commercial license or contractual agreement. #ifndef _RWStepBasic_RWGeneralPropertyRelationship_HeaderFile -#define _RWStepBasic_RWGeneralPropertyAssociation_HeaderFile +#define _RWStepBasic_RWGeneralPropertyRelationship_HeaderFile #include #include From 32f7b4e5bf81f6b33ab0aa81b4d4ed6d1a529127 Mon Sep 17 00:00:00 2001 From: ichesnok Date: Mon, 11 Mar 2024 16:17:13 +0000 Subject: [PATCH 547/639] 0033641: Data Exchange, Step Import - Changing default value for metadata flag Value for myMetaMode flag changed from 'false' to 'true'. --- src/STEPCAFControl/STEPCAFControl_ConfigurationNode.cxx | 2 +- src/STEPCAFControl/STEPCAFControl_Reader.cxx | 4 ++-- src/StepData/StepData_ConfParameters.hxx | 2 +- tests/de_wrapper/configuration/A3 | 2 +- tests/de_wrapper/configuration/A4 | 2 +- tests/metadata/end | 2 +- tests/metadata/step/begin | 2 -- 7 files changed, 7 insertions(+), 9 deletions(-) delete mode 100644 tests/metadata/step/begin diff --git a/src/STEPCAFControl/STEPCAFControl_ConfigurationNode.cxx b/src/STEPCAFControl/STEPCAFControl_ConfigurationNode.cxx index 46ca4fe79a..f93174e070 100644 --- a/src/STEPCAFControl/STEPCAFControl_ConfigurationNode.cxx +++ b/src/STEPCAFControl/STEPCAFControl_ConfigurationNode.cxx @@ -374,7 +374,7 @@ TCollection_AsciiString STEPCAFControl_ConfigurationNode::Save() const aResult += "!\n"; aResult += "!Setting up the read.metadata parameter which is used to indicate read Metadata or not\n"; - aResult += "!Default value: 0(\"OFF\"). Available values: 0(\"OFF\"), 1(\"ON\")\n"; + aResult += "!Default value: 1(\"ON\"). Available values: 0(\"OFF\"), 1(\"ON\")\n"; aResult += aScope + "read.metadata :\t " + InternalParameters.ReadMetadata + "\n"; aResult += "!\n"; diff --git a/src/STEPCAFControl/STEPCAFControl_Reader.cxx b/src/STEPCAFControl/STEPCAFControl_Reader.cxx index 05c52fbb36..9c61aa1f85 100644 --- a/src/STEPCAFControl/STEPCAFControl_Reader.cxx +++ b/src/STEPCAFControl/STEPCAFControl_Reader.cxx @@ -291,7 +291,7 @@ STEPCAFControl_Reader::STEPCAFControl_Reader() myNameMode(Standard_True), myLayerMode(Standard_True), myPropsMode(Standard_True), - myMetaMode(Standard_False), + myMetaMode(Standard_True), mySHUOMode(Standard_False), myGDTMode(Standard_True), myMatMode(Standard_True), @@ -316,7 +316,7 @@ STEPCAFControl_Reader::STEPCAFControl_Reader(const Handle(XSControl_WorkSession) myNameMode(Standard_True), myLayerMode(Standard_True), myPropsMode(Standard_True), - myMetaMode(Standard_False), + myMetaMode(Standard_True), mySHUOMode(Standard_False), myGDTMode(Standard_True), myMatMode(Standard_True), diff --git a/src/StepData/StepData_ConfParameters.hxx b/src/StepData/StepData_ConfParameters.hxx index 2304e12fcc..99fd113caa 100644 --- a/src/StepData/StepData_ConfParameters.hxx +++ b/src/StepData/StepData_ConfParameters.hxx @@ -166,7 +166,7 @@ public: bool ReadName = true; // 1} { set path_file [locate_data_file $filename] - if { [catch { ReadFile D $path_file -conf $conf} catch_result] } { + if { [catch { ReadFile D $path_file } catch_result] } { set err_msg "Error: file was not read - exception " puts $err_msg append todo_msg $todo_mask $err_msg $end_line diff --git a/tests/metadata/step/begin b/tests/metadata/step/begin deleted file mode 100644 index 95e00a7c4d..0000000000 --- a/tests/metadata/step/begin +++ /dev/null @@ -1,2 +0,0 @@ -set conf "provider.STEP.OCC.read.metadata : 1" - From d1eae5b0d03345f64e2f588cb9b70df3c85c0fd1 Mon Sep 17 00:00:00 2001 From: ichesnok Date: Fri, 15 Mar 2024 10:45:05 +0000 Subject: [PATCH 548/639] 0033602: Data Exchange, Step - Carriage return removing Carriage removing integrated --- src/StepData/StepData_StepReaderData.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/StepData/StepData_StepReaderData.cxx b/src/StepData/StepData_StepReaderData.cxx index 648940d09b..49145ed10f 100644 --- a/src/StepData/StepData_StepReaderData.cxx +++ b/src/StepData/StepData_StepReaderData.cxx @@ -299,7 +299,7 @@ void StepData_StepReaderData::cleanText(const Handle(TCollection_HAsciiString)& } } } - if (aChar == '\n') + if (aChar == '\n' || aChar == '\r') { aResString.SetValue(aSetCharInd, aResString.ToExtString() + aStringInd); aResStringSize--; From 3888b58c278edf99b30faa23996dffbbe1d66b74 Mon Sep 17 00:00:00 2001 From: ichesnok Date: Mon, 11 Mar 2024 10:13:34 +0000 Subject: [PATCH 549/639] 0033603: Data Exchange, Step Import - Crash reading corrupted STEP file Crash fixed by checking IsNull(). --- src/StepToGeom/StepToGeom.cxx | 2 +- src/StepToTopoDS/StepToTopoDS_TranslateVertex.cxx | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/StepToGeom/StepToGeom.cxx b/src/StepToGeom/StepToGeom.cxx index 084531d8f0..e15afe880d 100644 --- a/src/StepToGeom/StepToGeom.cxx +++ b/src/StepToGeom/StepToGeom.cxx @@ -1008,7 +1008,7 @@ Handle(Geom_BSplineSurface) StepToGeom::MakeBSplineSurface (const Handle(StepGeo Handle(Geom_CartesianPoint) StepToGeom::MakeCartesianPoint (const Handle(StepGeom_CartesianPoint)& SP, const StepData_Factors& theLocalFactors) { - if (SP->NbCoordinates() == 3) + if (!SP.IsNull() && SP->NbCoordinates() == 3) { const Standard_Real LF = theLocalFactors.LengthFactor(); const Standard_Real X = SP->CoordinatesValue(1) * LF; diff --git a/src/StepToTopoDS/StepToTopoDS_TranslateVertex.cxx b/src/StepToTopoDS/StepToTopoDS_TranslateVertex.cxx index b9ae793360..793063c6c4 100644 --- a/src/StepToTopoDS/StepToTopoDS_TranslateVertex.cxx +++ b/src/StepToTopoDS/StepToTopoDS_TranslateVertex.cxx @@ -96,6 +96,11 @@ void StepToTopoDS_TranslateVertex::Init(const Handle(StepShape_Vertex)& aVertex, //:S4136 Standard_Real preci = BRepAPI::Precision(); const Handle(StepShape_VertexPoint) VP = Handle(StepShape_VertexPoint)::DownCast(aVertex); const Handle(StepGeom_Point) P = VP->VertexGeometry(); + if (P.IsNull()) { + myError = StepToTopoDS_TranslateVertexOther; + done = Standard_False; + return; + } const Handle(StepGeom_CartesianPoint) P1 = Handle(StepGeom_CartesianPoint)::DownCast(P); Handle(Geom_CartesianPoint) P2 = StepToGeom::MakeCartesianPoint (P1, theLocalFactors); BRep_Builder B; From d5bcd33386e6ceca6b724aa34a0d1b2e5755332f Mon Sep 17 00:00:00 2001 From: ichesnok Date: Fri, 8 Mar 2024 13:38:18 +0000 Subject: [PATCH 550/639] 0033631: Data Exchange, Step import - Crash by reading STEP file Creating Poly_Triangulation from ComplexTriangulatedSurfaceSet was fixed. --- src/STEPCAFControl/STEPCAFControl_Reader.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/STEPCAFControl/STEPCAFControl_Reader.cxx b/src/STEPCAFControl/STEPCAFControl_Reader.cxx index 9c61aa1f85..0dd16f6189 100644 --- a/src/STEPCAFControl/STEPCAFControl_Reader.cxx +++ b/src/STEPCAFControl/STEPCAFControl_Reader.cxx @@ -2018,7 +2018,7 @@ Handle(Poly_Triangulation) createMesh(const Handle(StepVisual_ComplexTriangulate const Standard_Integer aNbNormals = theTriangulatedSufaceSet->NbNormals(); // Number of pairs (Point, Normal). It is possible for one point to have multiple normals. This is // useful when the underlying surface is not C1 continuous. - const Standard_Integer aNbPairs = aNbNormals > 1 ? theTriangulatedSufaceSet->NbPnindex() : aNodes->Length(); + const Standard_Integer aNbPairs = aNbNormals > 1 ? theTriangulatedSufaceSet->Pnmax() : aNodes->Length(); const Standard_Boolean aHasNormals = aNbNormals > 0; // Counting number of triangles in the triangle strips list. @@ -2043,7 +2043,7 @@ Handle(Poly_Triangulation) createMesh(const Handle(StepVisual_ComplexTriangulate for (Standard_Integer j = 1; j <= aNbPairs; ++j) { - const gp_XYZ& aPoint = aNodes->Value(aNbNormals > 1 ? theTriangulatedSufaceSet->PnindexValue(j) : j); + const gp_XYZ& aPoint = aNodes->Value((aNbNormals > 1 && theTriangulatedSufaceSet->NbPnindex() > 0) ? theTriangulatedSufaceSet->PnindexValue(j) : j); aMesh->SetNode(j, theFact * aPoint); } From 9d93d9b9b888f8754ea5fa83cd2bbcfb1111bca6 Mon Sep 17 00:00:00 2001 From: ichesnok Date: Tue, 12 Mar 2024 13:49:21 +0000 Subject: [PATCH 551/639] 0033638: Data Exchange, Step Import - Style for tessellated object missed TransferBRep_ShapeBinder used for tessellated face. --- src/StepToTopoDS/StepToTopoDS_TranslateFace.cxx | 2 ++ tests/bugs/step/bug33638 | 17 +++++++++++++++++ 2 files changed, 19 insertions(+) create mode 100644 tests/bugs/step/bug33638 diff --git a/src/StepToTopoDS/StepToTopoDS_TranslateFace.cxx b/src/StepToTopoDS/StepToTopoDS_TranslateFace.cxx index 8e9804c5b7..93539a1aef 100644 --- a/src/StepToTopoDS/StepToTopoDS_TranslateFace.cxx +++ b/src/StepToTopoDS/StepToTopoDS_TranslateFace.cxx @@ -761,6 +761,8 @@ void StepToTopoDS_TranslateFace::Init(const Handle(StepVisual_TessellatedFace)& if (theNMTool.IsActive()) theNMTool.Bind(theTF, aF); + aTP->Bind(theTF, new TransferBRep_ShapeBinder(aF)); + myResult = aF; myError = StepToTopoDS_TranslateFaceDone; done = Standard_True; diff --git a/tests/bugs/step/bug33638 b/tests/bugs/step/bug33638 new file mode 100644 index 0000000000..84c30a44c3 --- /dev/null +++ b/tests/bugs/step/bug33638 @@ -0,0 +1,17 @@ +puts "====================================" +puts "0033638: Data Exchange, Step Import - Style for tessellated object missed" +puts "====================================" +puts "" + +pload OCAF + +ReadStep D [locate_data_file bug33638.stp] + +if { [ XFindColor D 0 0 1 ] == "" } { + puts "Error: Color not found" +} +if { [ XFindColor D 1 0 0 ] == "" } { + puts "Error: Color not found" +} + +Close D From 447396c9b9768f7f0eb081f0a64b6ced5df13106 Mon Sep 17 00:00:00 2001 From: ichesnok Date: Thu, 14 Mar 2024 12:39:23 +0000 Subject: [PATCH 552/639] 0029241: Data Exchange - Empty shape after reading STEP file. Entity mechanical_design_and_draughting_relationship and function for its transfer added. --- src/RWStepAP214/RWStepAP214_GeneralModule.cxx | 12 +++ .../RWStepAP214_ReadWriteModule.cxx | 19 +++++ src/RWStepRepr/FILES | 2 + ...hanicalDesignAndDraughtingRelationship.cxx | 78 +++++++++++++++++++ ...hanicalDesignAndDraughtingRelationship.hxx | 50 ++++++++++++ src/STEPControl/STEPControl_ActorRead.cxx | 73 +++++++++++++++++ src/STEPControl/STEPControl_ActorRead.hxx | 7 ++ src/StepAP214/StepAP214_Protocol.cxx | 2 + src/StepRepr/FILES | 2 + ...hanicalDesignAndDraughtingRelationship.cxx | 20 +++++ ...hanicalDesignAndDraughtingRelationship.hxx | 37 +++++++++ tests/de/step_5/B8 | 22 ++++++ 12 files changed, 324 insertions(+) create mode 100644 src/RWStepRepr/RWStepRepr_RWMechanicalDesignAndDraughtingRelationship.cxx create mode 100644 src/RWStepRepr/RWStepRepr_RWMechanicalDesignAndDraughtingRelationship.hxx create mode 100644 src/StepRepr/StepRepr_MechanicalDesignAndDraughtingRelationship.cxx create mode 100644 src/StepRepr/StepRepr_MechanicalDesignAndDraughtingRelationship.hxx create mode 100644 tests/de/step_5/B8 diff --git a/src/RWStepAP214/RWStepAP214_GeneralModule.cxx b/src/RWStepAP214/RWStepAP214_GeneralModule.cxx index e1803e09d2..43d4b0286f 100644 --- a/src/RWStepAP214/RWStepAP214_GeneralModule.cxx +++ b/src/RWStepAP214/RWStepAP214_GeneralModule.cxx @@ -327,6 +327,7 @@ #include #include #include +#include #include #include #include @@ -789,6 +790,7 @@ #include #include #include +#include #include #include #include @@ -5896,6 +5898,13 @@ void RWStepAP214_GeneralModule::FillSharedCase(const Standard_Integer CN, aTool.Share(anEnt, iter); } break; + case 824: + { + DeclareAndCast(StepRepr_MechanicalDesignAndDraughtingRelationship, anEnt, ent); + RWStepRepr_RWMechanicalDesignAndDraughtingRelationship aTool; + aTool.Share(anEnt, iter); + } + break; default : break; } } @@ -8217,6 +8226,9 @@ Standard_Boolean RWStepAP214_GeneralModule::NewVoid case 823: ent = new StepRepr_RealRepresentationItem; break; + case 824: + ent = new StepRepr_MechanicalDesignAndDraughtingRelationship; + break; default: return Standard_False; diff --git a/src/RWStepAP214/RWStepAP214_ReadWriteModule.cxx b/src/RWStepAP214/RWStepAP214_ReadWriteModule.cxx index ffa5a7c97d..694d357944 100644 --- a/src/RWStepAP214/RWStepAP214_ReadWriteModule.cxx +++ b/src/RWStepAP214/RWStepAP214_ReadWriteModule.cxx @@ -641,6 +641,7 @@ IMPLEMENT_STANDARD_RTTIEXT(RWStepAP214_ReadWriteModule,StepData_ReadWriteModule) #include #include #include +#include #include #include // Removed from Rev2 to Rev4 : @@ -1431,6 +1432,7 @@ IMPLEMENT_STANDARD_RTTIEXT(RWStepAP214_ReadWriteModule,StepData_ReadWriteModule) #include #include #include +#include #include #include @@ -2364,6 +2366,7 @@ static TCollection_AsciiString Reco_GeneralPropertyAssociation("GENERAL_PROPERTY static TCollection_AsciiString Reco_GeneralPropertyRelationship("GENERAL_PROPERTY_RELATIONSHIP"); static TCollection_AsciiString Reco_BooleanRepresentationItem("BOOLEAN_REPRESENTATION_ITEM"); static TCollection_AsciiString Reco_RealRepresentationItem("REAL_REPRESENTATION_ITEM"); +static TCollection_AsciiString Reco_MechanicalDesignAndDraughtingRelationship("MECHANICAL_DESIGN_AND_DRAUGHTING_RELATIONSHIP"); // -- Definition of the libraries -- @@ -3125,6 +3128,7 @@ RWStepAP214_ReadWriteModule::RWStepAP214_ReadWriteModule () typenums.Bind(Reco_GeneralPropertyRelationship, 821); typenums.Bind(Reco_BooleanRepresentationItem, 822); typenums.Bind(Reco_RealRepresentationItem, 823); + typenums.Bind(Reco_MechanicalDesignAndDraughtingRelationship, 824); // SHORT NAMES @@ -5117,6 +5121,7 @@ const TCollection_AsciiString& RWStepAP214_ReadWriteModule::StepType case 821: return Reco_GeneralPropertyRelationship; case 822: return Reco_BooleanRepresentationItem; case 823: return Reco_RealRepresentationItem; + case 824: return Reco_MechanicalDesignAndDraughtingRelationship; default : return PasReco; } } @@ -10754,6 +10759,13 @@ void RWStepAP214_ReadWriteModule::ReadStep(const Standard_Integer CN, aTool.ReadStep(data, num, ach, anent); } break; + case 824: + { + DeclareAndCast(StepRepr_MechanicalDesignAndDraughtingRelationship, anent, ent); + RWStepRepr_RWMechanicalDesignAndDraughtingRelationship aTool; + aTool.ReadStep(data, num, ach, anent); + } + break; default: ach->AddFail("Type Mismatch when reading - Entity"); } @@ -16333,6 +16345,13 @@ void RWStepAP214_ReadWriteModule::WriteStep(const Standard_Integer CN, aTool.WriteStep(SW, anent); } break; + case 824: + { + DeclareAndCast(StepRepr_MechanicalDesignAndDraughtingRelationship, anent, ent); + RWStepRepr_RWMechanicalDesignAndDraughtingRelationship aTool; + aTool.WriteStep(SW, anent); + } + break; default: return; } diff --git a/src/RWStepRepr/FILES b/src/RWStepRepr/FILES index e9487b0816..ea5252162d 100644 --- a/src/RWStepRepr/FILES +++ b/src/RWStepRepr/FILES @@ -72,6 +72,8 @@ RWStepRepr_RWMaterialPropertyRepresentation.cxx RWStepRepr_RWMaterialPropertyRepresentation.hxx RWStepRepr_RWMeasureRepresentationItem.cxx RWStepRepr_RWMeasureRepresentationItem.hxx +RWStepRepr_RWMechanicalDesignAndDraughtingRelationship.cxx +RWStepRepr_RWMechanicalDesignAndDraughtingRelationship.hxx RWStepRepr_RWParallelOffset.cxx RWStepRepr_RWParallelOffset.hxx RWStepRepr_RWParametricRepresentationContext.cxx diff --git a/src/RWStepRepr/RWStepRepr_RWMechanicalDesignAndDraughtingRelationship.cxx b/src/RWStepRepr/RWStepRepr_RWMechanicalDesignAndDraughtingRelationship.cxx new file mode 100644 index 0000000000..44e8dc50ca --- /dev/null +++ b/src/RWStepRepr/RWStepRepr_RWMechanicalDesignAndDraughtingRelationship.cxx @@ -0,0 +1,78 @@ +// Copyright (c) 2024 OPEN CASCADE SAS +// +// This file is part of Open CASCADE Technology software library. +// +// This library is free software; you can redistribute it and/or modify it under +// the terms of the GNU Lesser General Public License version 2.1 as published +// by the Free Software Foundation, with special exception defined in the file +// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT +// distribution for complete text of the license and disclaimer of any warranty. +// +// Alternatively, this file may be used under the terms of Open CASCADE +// commercial license or contractual agreement. + +#include +#include +#include +#include +#include +#include +#include + +RWStepRepr_RWMechanicalDesignAndDraughtingRelationship:: + RWStepRepr_RWMechanicalDesignAndDraughtingRelationship() {} + +void RWStepRepr_RWMechanicalDesignAndDraughtingRelationship::ReadStep + (const Handle(StepData_StepReaderData)& theData, + const Standard_Integer theNum, + Handle(Interface_Check)& theAch, + const Handle(StepRepr_MechanicalDesignAndDraughtingRelationship)& theEnt) const +{ + // Number of Parameter Control + if (!theData->CheckNbParams(theNum, 4, theAch, "mechanical_design_and_draughting_relationship")) return; + + // Inherited field : name + Handle(TCollection_HAsciiString) aName; + theData->ReadString (theNum, 1, "name", theAch, aName); + + // Inherited field : description + Handle(TCollection_HAsciiString) aDescription; + if (theData->IsParamDefined (theNum, 2)) { + theData->ReadString (theNum, 2, "description", theAch, aDescription); + } + // Inherited field : rep_1 + Handle(StepRepr_Representation) aRep1; + theData->ReadEntity(theNum, 3, "rep_1", theAch, STANDARD_TYPE(StepRepr_Representation), aRep1); + + // Inherited field : rep_2 + Handle(StepRepr_Representation) aRep2; + theData->ReadEntity(theNum, 4, "rep_2", theAch, STANDARD_TYPE(StepRepr_Representation), aRep2); + +// Initialisation of the read entity + theEnt->Init(aName, aDescription, aRep1, aRep2); +} + +void RWStepRepr_RWMechanicalDesignAndDraughtingRelationship::WriteStep + (StepData_StepWriter& theSW, + const Handle(StepRepr_MechanicalDesignAndDraughtingRelationship)& theEnt) const +{ + // Inherited field : name + theSW.Send(theEnt->Name()); + + // Inherited field : description + theSW.Send(theEnt->Description()); + + // Inherited field : rep_1 + theSW.Send(theEnt->Rep1()); + + // Inherited field : rep_2 + theSW.Send(theEnt->Rep2()); +} + +void RWStepRepr_RWMechanicalDesignAndDraughtingRelationship::Share + (const Handle(StepRepr_MechanicalDesignAndDraughtingRelationship)& theEnt, + Interface_EntityIterator& theIter) const +{ + theIter.GetOneItem(theEnt->Rep1()); + theIter.GetOneItem(theEnt->Rep2()); +} diff --git a/src/RWStepRepr/RWStepRepr_RWMechanicalDesignAndDraughtingRelationship.hxx b/src/RWStepRepr/RWStepRepr_RWMechanicalDesignAndDraughtingRelationship.hxx new file mode 100644 index 0000000000..e92bf2fba6 --- /dev/null +++ b/src/RWStepRepr/RWStepRepr_RWMechanicalDesignAndDraughtingRelationship.hxx @@ -0,0 +1,50 @@ +// Copyright (c) 2024 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 _RWStepRepr_RWMechanicalDesignAndDraughtingRelationship_HeaderFile +#define _RWStepRepr_RWMechanicalDesignAndDraughtingRelationship_HeaderFile + +#include +#include +#include + +#include +class StepData_StepReaderData; +class Interface_Check; +class StepRepr_MechanicalDesignAndDraughtingRelationship; +class StepData_StepWriter; +class Interface_EntityIterator; + + +//! Read & Write Module for MechanicalDesignAndDraughtingRelationship +class RWStepRepr_RWMechanicalDesignAndDraughtingRelationship +{ +public: + + DEFINE_STANDARD_ALLOC + + Standard_EXPORT RWStepRepr_RWMechanicalDesignAndDraughtingRelationship(); + + Standard_EXPORT void ReadStep(const Handle(StepData_StepReaderData)& theData, + const Standard_Integer theNum, + Handle(Interface_Check)& theAch, + const Handle(StepRepr_MechanicalDesignAndDraughtingRelationship)& theEnt) const; + + Standard_EXPORT void WriteStep(StepData_StepWriter& theSW, + const Handle(StepRepr_MechanicalDesignAndDraughtingRelationship)& theEnt) const; + + Standard_EXPORT void Share(const Handle(StepRepr_MechanicalDesignAndDraughtingRelationship)& theEnt, + Interface_EntityIterator& theIter) const; + +}; +#endif // _RWStepRepr_RWMechanicalDesignAndDraughtingRelationship_HeaderFile diff --git a/src/STEPControl/STEPControl_ActorRead.cxx b/src/STEPControl/STEPControl_ActorRead.cxx index 60bb24bd5c..413b6f4f19 100644 --- a/src/STEPControl/STEPControl_ActorRead.cxx +++ b/src/STEPControl/STEPControl_ActorRead.cxx @@ -122,6 +122,7 @@ #include #include #include +#include #include IMPLEMENT_STANDARD_RTTIEXT(STEPControl_ActorRead,Transfer_ActorOfTransientProcess) @@ -1224,6 +1225,72 @@ Handle(TransferBRep_ShapeBinder) STEPControl_ActorRead::TransferEntity( } +//======================================================================= +//function : TransferEntity +//purpose : +//======================================================================= +Handle(TransferBRep_ShapeBinder) STEPControl_ActorRead::TransferEntity( + const Handle(StepRepr_MechanicalDesignAndDraughtingRelationship)& theMDADR, + const Handle(Transfer_TransientProcess)& theTP, + const StepData_Factors& theLocalFactors, + const Message_ProgressRange& theProgress) +{ + Handle(TransferBRep_ShapeBinder) aShBinder; + if (theMDADR.IsNull()) + return aShBinder; + + Standard_Boolean aResetUnits = Standard_False; + Handle(StepRepr_Representation) anOldSRContext = mySRContext; + StepData_Factors aLocalFactors = theLocalFactors; + TopoDS_Compound aComp; + BRep_Builder aBuilder; + aBuilder.MakeCompound(aComp); + + Message_ProgressScope aPS(theProgress, NULL, 2); + for (Standard_Integer anIndex = 1; anIndex <= 2; anIndex++) + { + Message_ProgressRange aRange = aPS.Next(); + Handle(StepRepr_Representation) aRepr = (anIndex == 1) ? theMDADR->Rep1() : theMDADR->Rep2(); + if (aRepr.IsNull()) + continue; + if (mySRContext.IsNull() || aRepr->ContextOfItems() != mySRContext->ContextOfItems()) + { + PrepareUnits(aRepr, theTP, aLocalFactors); + aResetUnits = Standard_True; + } + Handle(Transfer_Binder) aBinder; + if (aRepr->IsKind(STANDARD_TYPE(StepShape_ShapeRepresentation))) + { + Handle(StepShape_ShapeRepresentation) aShapeRepr = Handle(StepShape_ShapeRepresentation)::DownCast(aRepr); + Standard_Boolean isBound = Standard_False; + if (!theTP->IsBound(aShapeRepr)) + { + aBinder = TransferEntity(aShapeRepr, theTP, theLocalFactors, isBound, false, aRange); + } + else + { + aBinder = theTP->Find(aShapeRepr); + } + } + TopoDS_Shape aResult = TransferBRep::ShapeResult(aBinder); + if (!aResult.IsNull()) + { + aBuilder.Add(aComp, aResult); + } + } + + aShBinder = new TransferBRep_ShapeBinder(aComp); + mySRContext = anOldSRContext; + if (anOldSRContext.IsNull() || aResetUnits) + { + PrepareUnits(anOldSRContext, theTP, aLocalFactors); + } + + theTP->Bind(theMDADR, aShBinder); + + return aShBinder; +} + //======================================================================= //function : IsNeedRepresentation //purpose : @@ -2122,6 +2189,12 @@ TopoDS_Shape STEPControl_ActorRead::TransferRelatedSRR(const Handle(Transfer_Tra Standard_Integer aNbRep = (theRep == aSRR->Rep1() ? 2 : 1); aBinder = TransferEntity(aSRR, theTP, theLocalFactors, aNbRep, theUseTrsf, thePS.Next()); } + else if (anItem->DynamicType() == STANDARD_TYPE(StepRepr_MechanicalDesignAndDraughtingRelationship)) + { + Handle(StepRepr_MechanicalDesignAndDraughtingRelationship) aMDADR = + Handle(StepRepr_MechanicalDesignAndDraughtingRelationship)::DownCast(anItem); + aBinder = TransferEntity(aMDADR, theTP, theLocalFactors, thePS.Next()); + } else if (theReadConstructiveGeomRR && anItem->DynamicType() == STANDARD_TYPE(StepRepr_ConstructiveGeometryRepresentationRelationship)) { diff --git a/src/STEPControl/STEPControl_ActorRead.hxx b/src/STEPControl/STEPControl_ActorRead.hxx index 16cadcf40d..d6e4723187 100644 --- a/src/STEPControl/STEPControl_ActorRead.hxx +++ b/src/STEPControl/STEPControl_ActorRead.hxx @@ -48,6 +48,7 @@ class StepShape_FaceSurface; class TopoDS_Shell; class TopoDS_Compound; class StepRepr_ConstructiveGeometryRepresentationRelationship; +class StepRepr_MechanicalDesignAndDraughtingRelationship; class StepData_StepModel; @@ -191,6 +192,12 @@ protected: const Handle(Transfer_TransientProcess)& theTP, const StepData_Factors& theLocalFactors = StepData_Factors()); + //! Transfers MechanicalDesignAndDraughtingRelationship entity + Handle(TransferBRep_ShapeBinder) TransferEntity(const Handle(StepRepr_MechanicalDesignAndDraughtingRelationship)& theMDADR, + const Handle(Transfer_TransientProcess)& theTP, + const StepData_Factors& theLocalFactors, + const Message_ProgressRange& theProgress); + //! Translates file by old way when CDSR are roots . Acts only if "read.step.product_mode" is equal Off. Standard_EXPORT Handle(TransferBRep_ShapeBinder) OldWay (const Handle(Standard_Transient)& start, diff --git a/src/StepAP214/StepAP214_Protocol.cxx b/src/StepAP214/StepAP214_Protocol.cxx index 701086f5a4..20841eb3ec 100644 --- a/src/StepAP214/StepAP214_Protocol.cxx +++ b/src/StepAP214/StepAP214_Protocol.cxx @@ -661,6 +661,7 @@ static Standard_CString schemaAP242DIS = "AP242_MANAGED_MODEL_BASED_3D_ENGINEERI #include #include #include +#include #include #include #include @@ -1568,6 +1569,7 @@ StepAP214_Protocol::StepAP214_Protocol () types.Bind(STANDARD_TYPE(StepBasic_GeneralPropertyRelationship), 821); types.Bind(STANDARD_TYPE(StepRepr_BooleanRepresentationItem), 822); types.Bind(STANDARD_TYPE(StepRepr_RealRepresentationItem), 823); + types.Bind(STANDARD_TYPE(StepRepr_MechanicalDesignAndDraughtingRelationship), 824); } diff --git a/src/StepRepr/FILES b/src/StepRepr/FILES index 551a95ce76..b218b21a58 100644 --- a/src/StepRepr/FILES +++ b/src/StepRepr/FILES @@ -88,6 +88,8 @@ StepRepr_MaterialPropertyRepresentation.cxx StepRepr_MaterialPropertyRepresentation.hxx StepRepr_MeasureRepresentationItem.cxx StepRepr_MeasureRepresentationItem.hxx +StepRepr_MechanicalDesignAndDraughtingRelationship.cxx +StepRepr_MechanicalDesignAndDraughtingRelationship.hxx StepRepr_NextAssemblyUsageOccurrence.cxx StepRepr_NextAssemblyUsageOccurrence.hxx StepRepr_ParallelOffset.cxx diff --git a/src/StepRepr/StepRepr_MechanicalDesignAndDraughtingRelationship.cxx b/src/StepRepr/StepRepr_MechanicalDesignAndDraughtingRelationship.cxx new file mode 100644 index 0000000000..da83bba7d8 --- /dev/null +++ b/src/StepRepr/StepRepr_MechanicalDesignAndDraughtingRelationship.cxx @@ -0,0 +1,20 @@ +// Copyright (c) 2024 OPEN CASCADE SAS +// +// This file is part of Open CASCADE Technology software library. +// +// This library is free software; you can redistribute it and/or modify it under +// the terms of the GNU Lesser General Public License version 2.1 as published +// by the Free Software Foundation, with special exception defined in the file +// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT +// distribution for complete text of the license and disclaimer of any warranty. +// +// Alternatively, this file may be used under the terms of Open CASCADE +// commercial license or contractual agreement. + + +#include +#include + +IMPLEMENT_STANDARD_RTTIEXT(StepRepr_MechanicalDesignAndDraughtingRelationship, StepRepr_RepresentationRelationship) + +StepRepr_MechanicalDesignAndDraughtingRelationship::StepRepr_MechanicalDesignAndDraughtingRelationship() {} diff --git a/src/StepRepr/StepRepr_MechanicalDesignAndDraughtingRelationship.hxx b/src/StepRepr/StepRepr_MechanicalDesignAndDraughtingRelationship.hxx new file mode 100644 index 0000000000..4147085baa --- /dev/null +++ b/src/StepRepr/StepRepr_MechanicalDesignAndDraughtingRelationship.hxx @@ -0,0 +1,37 @@ +// Copyright (c) 2024 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 _StepRepr_MechanicalDesignAndDraughtingRelationship_HeaderFile +#define _StepRepr_MechanicalDesignAndDraughtingRelationship_HeaderFile + +#include +#include + +#include + + +class StepRepr_MechanicalDesignAndDraughtingRelationship; +DEFINE_STANDARD_HANDLE(StepRepr_MechanicalDesignAndDraughtingRelationship, StepRepr_RepresentationRelationship) + + +class StepRepr_MechanicalDesignAndDraughtingRelationship : public StepRepr_RepresentationRelationship +{ +public: + + //! Returns a MechanicalDesignAndDraughtingRelationship + Standard_EXPORT StepRepr_MechanicalDesignAndDraughtingRelationship(); + + DEFINE_STANDARD_RTTIEXT(StepRepr_MechanicalDesignAndDraughtingRelationship, StepRepr_RepresentationRelationship) +}; + +#endif // _StepRepr_MechanicalDesignAndDraughtingRelationship_HeaderFile diff --git a/tests/de/step_5/B8 b/tests/de/step_5/B8 new file mode 100644 index 0000000000..9eba3f9cec --- /dev/null +++ b/tests/de/step_5/B8 @@ -0,0 +1,22 @@ +# !!!! This file is generated automatically, do not edit manually! See end script +puts "TODO CR23096 ALL: TPSTAT : Faulty" +puts "TODO CR23096 ALL: LABELS : Faulty" + + +set filename bug29241.stp + +set ref_data { +DATA : Faulties = 0 ( 22 ) Warnings = 0 ( 22 ) Summary = 0 ( 44 ) +TPSTAT : Faulties = 0 ( 0 ) Warnings = 2 ( 1 ) Summary = 2 ( 1 ) +CHECKSHAPE : Wires = 0 ( 0 ) Faces = 0 ( 0 ) Shells = 0 ( 0 ) Solids = 0 ( 0 ) +NBSHAPES : Solid = 1 ( 1 ) Shell = 2 ( 2 ) Face = 205 ( 205 ) +STATSHAPE : Solid = 1 ( 1 ) Shell = 2 ( 2 ) Face = 205 ( 205 ) FreeWire = 0 ( 1 ) +TOLERANCE : MaxTol = 0.000584860357 ( 0.0009118447559 ) AvgTol = 2.354671626e-005 ( 3.258060117e-005 ) +LABELS : N0Labels = 1 ( 1 ) N1Labels = 3 ( 18 ) N2Labels = 0 ( 0 ) TotalLabels = 4 ( 19 ) NameLabels = 1 ( 1 ) ColorLabels = 3 ( 3 ) LayerLabels = 0 ( 0 ) +PROPS : Centroid = 0 ( 0 ) Volume = 0 ( 0 ) Area = 0 ( 0 ) +NCOLORS : NColors = 3 ( 3 ) +COLORS : Colors = LIGHTSTEELBLUE1 PALEGOLDENROD WHITE ( LIGHTSTEELBLUE1 PALEGOLDENROD WHITE ) +NLAYERS : NLayers = 0 ( 0 ) +LAYERS : Layers = ( ) + +} From 576f37610875c0de33b6113288504bfa064a3821 Mon Sep 17 00:00:00 2001 From: astromko Date: Thu, 8 Feb 2024 17:02:45 +0000 Subject: [PATCH 553/639] 0031601: Modeling Algorithms - BRepOffset_Tool Segmentation Fault Added protection against null pointer dereferencing. Modified BRepOffset_MakeOffset::MakeThickSolid method. Fixed the problem with negative volume values. Fixed several unit tests and added a new one. --- src/BRepOffset/BRepOffset_Inter3d.cxx | 3 +-- src/BRepOffset/BRepOffset_MakeOffset.cxx | 6 +++++- src/BRepOffset/BRepOffset_Tool.cxx | 9 ++++++--- tests/bugs/modalg_2/bug427_6 | 5 ----- tests/bugs/modalg_2/bug5805_18 | 8 ++------ tests/bugs/modalg_2/bug5805_19 | 8 ++------ tests/bugs/modalg_2/bug5805_20 | 8 ++------ tests/bugs/modalg_2/bug5805_42 | 4 +--- tests/bugs/modalg_2/bug5805_43 | 5 +---- tests/bugs/modalg_2/bug5805_44 | 6 +----- tests/bugs/modalg_7/bug25395_1 | 2 -- tests/bugs/modalg_7/bug25939 | 2 -- tests/bugs/modalg_7/bug31845_f | 2 -- tests/bugs/modalg_7/bug31845_i | 2 -- tests/bugs/modalg_8/bug31601 | 15 +++++++++++++++ tests/offset/compshape/A1 | 5 +---- tests/offset/compshape/A4 | 1 - tests/offset/faces_type_i/A9 | 8 ++++---- tests/offset/faces_type_i/B4 | 6 +----- tests/offset/faces_type_i/B5 | 6 +----- tests/offset/faces_type_i/B6 | 7 +++---- tests/offset/faces_type_i/C1 | 7 +++---- tests/offset/faces_type_i/C2 | 6 +----- tests/offset/faces_type_i/C5 | 6 ++---- tests/offset/faces_type_i/C9 | 3 +-- tests/offset/faces_type_i/D1 | 6 +----- tests/offset/faces_type_i/E7 | 9 +++------ tests/offset/faces_type_i/E8 | 8 +------- tests/offset/faces_type_i/E9 | 8 +------- tests/offset/faces_type_i/F1 | 6 +----- tests/offset/faces_type_i/F2 | 9 +++------ tests/offset/faces_type_i/F3 | 8 +------- tests/offset/faces_type_i/F4 | 8 +------- tests/offset/faces_type_i/F5 | 8 +------- tests/offset/faces_type_i/I5 | 6 +----- tests/offset/faces_type_i/J5 | 6 +----- tests/offset/faces_type_i/K6 | 6 +----- tests/offset/faces_type_i/M6 | 6 +----- tests/offset/faces_type_i/M8 | 6 +----- tests/offset/faces_type_i/N1 | 9 +++------ tests/offset/shape/A1 | 4 +--- 41 files changed, 75 insertions(+), 178 deletions(-) create mode 100644 tests/bugs/modalg_8/bug31601 diff --git a/src/BRepOffset/BRepOffset_Inter3d.cxx b/src/BRepOffset/BRepOffset_Inter3d.cxx index 00804755ec..27879e8f28 100644 --- a/src/BRepOffset/BRepOffset_Inter3d.cxx +++ b/src/BRepOffset/BRepOffset_Inter3d.cxx @@ -1292,11 +1292,10 @@ void BRepOffset_Inter3d::ContextIntByArc(const TopTools_IndexedMapOfShape& Conte for ( ;exp2.More(); exp2.Next()) { LOE.Append(exp2.Current()); } - BRepOffset_Tool::TryProject(CF,OF1,LOE,LInt1,LInt2,mySide,myTol); //------------------------------------------------------- // If no trace try intersection. //------------------------------------------------------- - if (LInt1.IsEmpty()) { + if (!BRepOffset_Tool::TryProject(CF, OF1, LOE, LInt1, LInt2, mySide, myTol) || LInt1.IsEmpty()) { BRepOffset_Tool::Inter3D (CF,OF1,LInt1,LInt2,mySide,NullEdge,NullFace,NullFace); } Store (CF,OF1,LInt1,LInt2); diff --git a/src/BRepOffset/BRepOffset_MakeOffset.cxx b/src/BRepOffset/BRepOffset_MakeOffset.cxx index df326ec655..da3e404dbd 100644 --- a/src/BRepOffset/BRepOffset_MakeOffset.cxx +++ b/src/BRepOffset/BRepOffset_MakeOffset.cxx @@ -1175,12 +1175,16 @@ void BRepOffset_MakeOffset::MakeThickSolid(const Message_ProgressRange& theRange { NbOF++; } - if (NbOF <= NbF) + if (NbOF < NbF) { myDone = Standard_False; myError = BRepOffset_UnknownError; return; } + if (NbOF == NbF) + { + myOffset = 0; + } } if (myOffset > 0 ) myOffsetShape.Reverse(); diff --git a/src/BRepOffset/BRepOffset_Tool.cxx b/src/BRepOffset/BRepOffset_Tool.cxx index 45ce024999..6c08941e18 100644 --- a/src/BRepOffset/BRepOffset_Tool.cxx +++ b/src/BRepOffset/BRepOffset_Tool.cxx @@ -1881,6 +1881,10 @@ Standard_Boolean BRepOffset_Tool::TryProject if (C.IsNull()) { BRepLib::BuildCurve3d(CurE,BRep_Tool::Tolerance(CurE)); C = BRep_Tool::Curve(CurE,L,f,l); + if (C.IsNull()) + { + return Standard_False; + } } C = new Geom_TrimmedCurve(C,f,l); if ( !L.IsIdentity()) C->Transform(L); @@ -3519,9 +3523,8 @@ void BRepOffset_Tool::ExtentFace (const TopoDS_Face& F, if (ToBuild.IsBound(E)) { TopTools_ListOfShape LOE; LOE.Append(E); - BRepOffset_Tool::TryProject (TopoDS::Face(ToBuild(E)), - EF,LOE,LInt2,LInt1,Side,TolConf); - if (!LInt1.IsEmpty()) + if (BRepOffset_Tool::TryProject(TopoDS::Face(ToBuild(E)), EF, LOE, LInt2, LInt1, Side, TolConf) + && !LInt1.IsEmpty()) ToBuild.UnBind(E); } } diff --git a/tests/bugs/modalg_2/bug427_6 b/tests/bugs/modalg_2/bug427_6 index 8c01765b1f..e56406dc0b 100755 --- a/tests/bugs/modalg_2/bug427_6 +++ b/tests/bugs/modalg_2/bug427_6 @@ -1,8 +1,3 @@ -puts "TODO OCC23068 ALL: ERROR. offsetperform operation not done." -puts "TODO OCC23068 ALL: result is not a topological shape!!!" -puts "TODO OCC23068 ALL: Error: The command cannot be built" -puts "TODO OCC23068 ALL: TEST INCOMPLETE" - puts "========================" puts " OCC427 " puts "(case 6)" diff --git a/tests/bugs/modalg_2/bug5805_18 b/tests/bugs/modalg_2/bug5805_18 index d6663828e9..a9b3d8da97 100755 --- a/tests/bugs/modalg_2/bug5805_18 +++ b/tests/bugs/modalg_2/bug5805_18 @@ -1,8 +1,4 @@ -puts "TODO OCC25925 ALL: ERROR. offsetperform operation not done." -puts "TODO OCC25925 ALL: Error: The command cannot be built" -puts "TODO OCC25925 ALL: Faulty OCC5805 : result is not Closed shape" -puts "TODO OCC25925 ALL: TEST INCOMPLETE" -puts "TODO OCC25925 ALL: Tcl Exception: Error : command \\\"nbshapes result\\\" gives an empty result" +puts "TODO OCC25925 ALL: Error : The area of result shape is" puts "============" puts "OCC5805" @@ -52,6 +48,6 @@ if {$index == -1} { } -checknbshapes result -t -wire 5 -face 5 -shell 2 -solid 1 +checknbshapes result -t -wire 3 -face 3 -shell 1 -solid 1 checkview -display result -2d -path ${imagedir}/${test_image}.png diff --git a/tests/bugs/modalg_2/bug5805_19 b/tests/bugs/modalg_2/bug5805_19 index 5326ae6bd5..b2a91e220f 100755 --- a/tests/bugs/modalg_2/bug5805_19 +++ b/tests/bugs/modalg_2/bug5805_19 @@ -1,8 +1,4 @@ -puts "TODO OCC25925 ALL: Faulty OCC5805 : result is not Closed shape" -puts "TODO OCC25925 ALL: ERROR. offsetperform operation not done." -puts "TODO OCC25925 ALL: Tcl Exception: Error : command \\\"nbshapes result\\\" gives an empty result" -puts "TODO OCC25925 ALL: Error: The command cannot be built" -puts "TODO OCC25925 ALL: TEST INCOMPLETE" +puts "TODO OCC25925 ALL: Error : The area of result shape is" puts "============" puts "OCC5805" @@ -53,6 +49,6 @@ if {$index == -1} { } -checknbshapes result -vertex 2 -edge 3 -wire 3 -face 3 -shell 1 -solid 1 -compsolid 0 -compound 0 -shape 13 +checknbshapes result -vertex 1 -edge 2 -wire 3 -face 3 -shell 1 -solid 1 -compsolid 0 -compound 0 -shape 11 checkview -display result -2d -path ${imagedir}/${test_image}.png diff --git a/tests/bugs/modalg_2/bug5805_20 b/tests/bugs/modalg_2/bug5805_20 index 6179d7973b..1c1023b83a 100755 --- a/tests/bugs/modalg_2/bug5805_20 +++ b/tests/bugs/modalg_2/bug5805_20 @@ -1,8 +1,4 @@ -puts "TODO OCC25925 ALL: Faulty OCC5805 : result is not Closed shape" -puts "TODO OCC25925 ALL: ERROR. offsetperform operation not done." -puts "TODO OCC25925 ALL: Tcl Exception: Error : command \\\"nbshapes result\\\" gives an empty result" -puts "TODO OCC25925 ALL: Error: The command cannot be built" -puts "TODO OCC25925 ALL: TEST INCOMPLETE" +puts "TODO OCC25925 ALL: Error : The area of result shape is" puts "============" puts "OCC5805" @@ -53,6 +49,6 @@ if {$index == -1} { } -checknbshapes result -vertex 2 -edge 3 -wire 3 -face 3 -shell 1 -solid 1 -compsolid 0 -compound 0 -shape 13 +checknbshapes result -vertex 1 -edge 2 -wire 3 -face 3 -shell 1 -solid 1 -compsolid 0 -compound 0 -shape 11 checkview -display result -2d -path ${imagedir}/${test_image}.png diff --git a/tests/bugs/modalg_2/bug5805_42 b/tests/bugs/modalg_2/bug5805_42 index c79971d3fe..f4f8c436e2 100755 --- a/tests/bugs/modalg_2/bug5805_42 +++ b/tests/bugs/modalg_2/bug5805_42 @@ -1,6 +1,4 @@ -puts "TODO OCC25925 ALL: Faulty OCC5805 : result is not Closed shape" -puts "TODO OCC25925 ALL: ERROR. offsetperform operation not done." -puts "TODO OCC25925 ALL: Error: The command cannot be built" +puts "TODO OCC25925 ALL: Error : The area of result shape is" puts "============" puts "OCC5805" diff --git a/tests/bugs/modalg_2/bug5805_43 b/tests/bugs/modalg_2/bug5805_43 index 521bc02d03..5960b434ac 100755 --- a/tests/bugs/modalg_2/bug5805_43 +++ b/tests/bugs/modalg_2/bug5805_43 @@ -1,7 +1,4 @@ -puts "TODO OCC23068 ALL: ERROR. offsetperform operation not done." -puts "TODO OCC25925 ALL: Error: The command cannot be built" -puts "TODO OCC25925 ALL: Tcl Exception: result is not a topological shape" -puts "TODO OCC25925 ALL: TEST INCOMPLETE" +puts "TODO OCC25925 ALL: Error : The area of result shape is" puts "============" puts "OCC5805" diff --git a/tests/bugs/modalg_2/bug5805_44 b/tests/bugs/modalg_2/bug5805_44 index aefc2dc4bb..6fa5700dc6 100755 --- a/tests/bugs/modalg_2/bug5805_44 +++ b/tests/bugs/modalg_2/bug5805_44 @@ -1,8 +1,4 @@ -puts "TODO OCC25925 ALL: Faulty OCC5805 : result is not Closed shape" -puts "TODO OCC25925 ALL: ERROR. offsetperform operation not done." -puts "TODO OCC25925 ALL: Tcl Exception: Error : command \\\"nbshapes result\\\" gives an empty result" -puts "TODO OCC25925 ALL: Error: The command cannot be built" -puts "TODO OCC25925 ALL: TEST INCOMPLETE" +puts "TODO OCC25925 ALL: Error : The area of result shape is" puts "============" puts "OCC5805" diff --git a/tests/bugs/modalg_7/bug25395_1 b/tests/bugs/modalg_7/bug25395_1 index 7e3ccccf02..3b010ec018 100644 --- a/tests/bugs/modalg_7/bug25395_1 +++ b/tests/bugs/modalg_7/bug25395_1 @@ -1,5 +1,3 @@ -puts "TODO OCC25395 ALL: ERROR. offsetperform operation not done." - puts "========" puts "OCC25395" puts "========" diff --git a/tests/bugs/modalg_7/bug25939 b/tests/bugs/modalg_7/bug25939 index e32651d9ce..a85948c4da 100755 --- a/tests/bugs/modalg_7/bug25939 +++ b/tests/bugs/modalg_7/bug25939 @@ -1,5 +1,3 @@ -puts "TODO OCC25939 ALL: An exception was caught" - puts "============" puts "0025939: S I G S E G V in MakeThickSolid" puts "============" diff --git a/tests/bugs/modalg_7/bug31845_f b/tests/bugs/modalg_7/bug31845_f index 078287b95f..bda568ea45 100644 --- a/tests/bugs/modalg_7/bug31845_f +++ b/tests/bugs/modalg_7/bug31845_f @@ -1,5 +1,3 @@ -puts "TODO OCC31845 All: ERROR. offsetperform operation not done." - puts "============================================" puts "OCC31845: BRepOffsetAPI_MakeThickSolid fails" puts "============================================" diff --git a/tests/bugs/modalg_7/bug31845_i b/tests/bugs/modalg_7/bug31845_i index b8ccb75300..f115ba6a47 100644 --- a/tests/bugs/modalg_7/bug31845_i +++ b/tests/bugs/modalg_7/bug31845_i @@ -1,5 +1,3 @@ -puts "TODO OCC31845 All: ERROR. offsetperform operation not done." - puts "============================================" puts "OCC31845: BRepOffsetAPI_MakeThickSolid fails" puts "============================================" diff --git a/tests/bugs/modalg_8/bug31601 b/tests/bugs/modalg_8/bug31601 new file mode 100644 index 0000000000..b44f7c7bbe --- /dev/null +++ b/tests/bugs/modalg_8/bug31601 @@ -0,0 +1,15 @@ +puts "=================================================================" +puts "0031601: Modeling Algorithms - BRepOffset_Tool Segmentation Fault" +puts "=================================================================" +puts "" + +pload MODELING +box b 50 50 10 +explode b E +compound b_1 b_2 b_3 b_4 b_5 b_6 b_7 b_8 b_9 b_10 b_11 b_12 c +fillet s b 4 c +explode s F +offsetparameter 1.e-7 c a +offsetload s 1 s_11 +offsetperform r +checkview -display r -2d -path ${imagedir}/${test_image}.png diff --git a/tests/offset/compshape/A1 b/tests/offset/compshape/A1 index 50e789cc3c..16e57ebc06 100644 --- a/tests/offset/compshape/A1 +++ b/tests/offset/compshape/A1 @@ -1,6 +1,3 @@ -puts "TODO OCC23068 ALL: ERROR. offsetperform operation not done." -puts "TODO OCC23068 ALL: Error : The volume of result shape " - ## ====================================== ## Grid : CCV002 ## Test : A1 @@ -12,4 +9,4 @@ explode s F offsetcompshape result s -10 s_1 #real volume of result shape is unknown yet -checkprops result -v 0 +checkprops result -v 1.01e+06 diff --git a/tests/offset/compshape/A4 b/tests/offset/compshape/A4 index 6811c03cbd..5e360f307a 100755 --- a/tests/offset/compshape/A4 +++ b/tests/offset/compshape/A4 @@ -4,7 +4,6 @@ ## Comment : From CV tests serie page 60 ## ====================================== -puts "TODO OCC26556 ALL: ERROR. offsetperform operation not done." restore [locate_data_file CCV_2_d1_gsw.rle] s explode s F catch {offsetcompshape result s -2 s_17} diff --git a/tests/offset/faces_type_i/A9 b/tests/offset/faces_type_i/A9 index 47052f242f..d67a474eeb 100644 --- a/tests/offset/faces_type_i/A9 +++ b/tests/offset/faces_type_i/A9 @@ -1,9 +1,9 @@ -puts "TODO OCC23748 ALL: ERROR. offsetperform operation not done." -puts "TODO OCC23748 ALL: Error: The command cannot be built" -puts "TODO OCC26556 ALL: Error : The offset cannot be built." +puts "TODO CR23530 ALL: Faulty shapes in variables faulty_1 to faulty_" +puts "TODO OCC23068 ALL: Error : The area of face " + pcone s 5 0 12 90 trotate s 0 0 0 0 0 1 90 OFFSETSHAPE 1 {s_4} $calcul $type -checkprops result -v 0 +checkprops result -v 78.53988 diff --git a/tests/offset/faces_type_i/B4 b/tests/offset/faces_type_i/B4 index b4b88a4775..17086e8e62 100644 --- a/tests/offset/faces_type_i/B4 +++ b/tests/offset/faces_type_i/B4 @@ -1,9 +1,5 @@ -puts "TODO OCC23748 ALL: ERROR. offsetperform operation not done." -puts "TODO OCC23748 ALL: Error: The command cannot be built" -puts "TODO OCC26556 ALL: Error : The offset cannot be built." - pcone s 5 0 12 270 OFFSETSHAPE -1 {s_4} $calcul $type -checkprops result -v 0 +checkprops result -v 235.619 diff --git a/tests/offset/faces_type_i/B5 b/tests/offset/faces_type_i/B5 index f8a222a15c..1d2f7982ed 100644 --- a/tests/offset/faces_type_i/B5 +++ b/tests/offset/faces_type_i/B5 @@ -1,9 +1,5 @@ -puts "TODO OCC23748 ALL: ERROR. offsetperform operation not done." -puts "TODO OCC23748 ALL: Error: The command cannot be built" -puts "TODO OCC26556 ALL: Error : The offset cannot be built." - pcone s 5 0 12 270 OFFSETSHAPE 1 {s_3 s_4} $calcul $type -checkprops result -v 0 +checkprops result -v 235.619 diff --git a/tests/offset/faces_type_i/B6 b/tests/offset/faces_type_i/B6 index e11d3e9845..642047eb2b 100644 --- a/tests/offset/faces_type_i/B6 +++ b/tests/offset/faces_type_i/B6 @@ -1,10 +1,9 @@ -puts "TODO OCC23748 ALL: ERROR. offsetperform operation not done." -puts "TODO OCC23748 ALL: Error: The command cannot be built" -puts "TODO OCC26556 ALL: Error : The offset cannot be built." +puts "TODO OCC23068 ALL: Error : The area of face " +puts "TODO CR23530 ALL: Faulty shapes in variables faulty_1 to faulty_" psphere s 15 -90 60 90 trotate s 0 0 0 0 0 1 90 OFFSETSHAPE 1 {s_4} $calcul $type -checkprops result -v 0 +checkprops result -v 3488.84 diff --git a/tests/offset/faces_type_i/C1 b/tests/offset/faces_type_i/C1 index b1bd5fb38e..fd791a1c5a 100644 --- a/tests/offset/faces_type_i/C1 +++ b/tests/offset/faces_type_i/C1 @@ -1,9 +1,8 @@ -puts "TODO OCC23748 ALL: ERROR. offsetperform operation not done." -puts "TODO OCC23748 ALL: Error: The command cannot be built" -puts "TODO OCC26556 ALL: Error : The offset cannot be built." +puts "TODO OCC23068 ALL: Error : The area of face " +puts "TODO CR23530 ALL: Faulty shapes in variables faulty_1 to faulty_" psphere s 15 -90 60 270 OFFSETSHAPE 1 {s_4} $calcul $type -checkprops result -v 0 +checkprops result -v 10466.5 diff --git a/tests/offset/faces_type_i/C2 b/tests/offset/faces_type_i/C2 index f4ec64f17d..04bb3bab57 100644 --- a/tests/offset/faces_type_i/C2 +++ b/tests/offset/faces_type_i/C2 @@ -1,9 +1,5 @@ -puts "TODO OCC23748 ALL: ERROR. offsetperform operation not done." -puts "TODO OCC23748 ALL: Error: The command cannot be built" -puts "TODO OCC26556 ALL: Error : The offset cannot be built." - psphere s 15 -90 60 270 OFFSETSHAPE -1 {s_4} $calcul $type -checkprops result -v 0 +checkprops result -v 10466.5 diff --git a/tests/offset/faces_type_i/C5 b/tests/offset/faces_type_i/C5 index 957568b246..740907eab5 100644 --- a/tests/offset/faces_type_i/C5 +++ b/tests/offset/faces_type_i/C5 @@ -1,10 +1,8 @@ -puts "TODO OCC23068 ALL: ERROR. offsetperform operation not done." -puts "TODO OCC23068 ALL: Error : The offset cannot be built." -puts "TODO OCC23068 ALL: Error: The command cannot be built" +puts "TODO OCC23068 ALL: Error : The area of face " psphere s 15 90 trotate s 0 0 0 0 0 1 90 OFFSETSHAPE 1 {s_3} $calcul $type -checkprops result -v 0 +checkprops result -v 3534.29 diff --git a/tests/offset/faces_type_i/C9 b/tests/offset/faces_type_i/C9 index 6a79959219..6c3ad81700 100644 --- a/tests/offset/faces_type_i/C9 +++ b/tests/offset/faces_type_i/C9 @@ -1,5 +1,4 @@ -puts "TODO OCC23748 ALL: ERROR. offsetperform operation not done." -puts "TODO OCC23748 ALL: Error : The offset cannot be built." +puts "TODO OCC23068 ALL: Error : The area of face " psphere s 15 270 diff --git a/tests/offset/faces_type_i/D1 b/tests/offset/faces_type_i/D1 index 1445bfb776..91dc190738 100644 --- a/tests/offset/faces_type_i/D1 +++ b/tests/offset/faces_type_i/D1 @@ -1,9 +1,5 @@ -puts "TODO OCC23748 ALL: ERROR. offsetperform operation not done." -puts "TODO OCC23748 ALL: Error: The command cannot be built" -puts "TODO OCC26556 ALL: Error : The offset cannot be built." - psphere s 15 270 OFFSETSHAPE -1 {s_2} $calcul $type -checkprops result -v 0 +checkprops result -v 10602.9 diff --git a/tests/offset/faces_type_i/E7 b/tests/offset/faces_type_i/E7 index 0be2810d3a..d169a86744 100755 --- a/tests/offset/faces_type_i/E7 +++ b/tests/offset/faces_type_i/E7 @@ -1,8 +1,5 @@ -puts "TODO OCC24156 MacOS: An exception was caught" -puts "TODO OCC24156 MacOS: TEST INCOMPLETE" -puts "TODO OCC23748 ALL: ERROR. offsetperform operation not done." -puts "TODO OCC23748 ALL: Error: The command cannot be built" -puts "TODO OCC26556 ALL: Error : The offset cannot be built." +puts "TODO CR23530 ALL: Faulty shapes in variables faulty_1 to faulty_" +puts "TODO OCC23068 ALL: Error : The area of face " ellipse w1 0 0 0 15 10 mkedge w1 w1 0 pi/2 @@ -14,4 +11,4 @@ revol s w 0 0 0 0 0 1 90 OFFSETSHAPE 1 {s_4} $calcul $type -checkprops result -v 0 +checkprops result -v 4385.14 diff --git a/tests/offset/faces_type_i/E8 b/tests/offset/faces_type_i/E8 index a11a388ca7..4479cc830d 100644 --- a/tests/offset/faces_type_i/E8 +++ b/tests/offset/faces_type_i/E8 @@ -1,9 +1,3 @@ -puts "TODO OCC24156 MacOS: An exception was caught" -puts "TODO OCC24156 MacOS: TEST INCOMPLETE" -puts "TODO OCC23748 ALL: ERROR. offsetperform operation not done." -puts "TODO OCC23748 ALL: Error: The command cannot be built" -puts "TODO OCC26556 ALL: Error : The offset cannot be built." - ellipse w1 0 0 0 15 10 mkedge w1 w1 0 pi/2 trotate w1 0 0 0 1 0 0 90 @@ -14,4 +8,4 @@ revol s w 0 0 0 0 0 1 90 OFFSETSHAPE -1 {s_4} $calcul $type -checkprops result -v 0 +checkprops result -v 4385.14 diff --git a/tests/offset/faces_type_i/E9 b/tests/offset/faces_type_i/E9 index ec5307350f..03318b6f26 100644 --- a/tests/offset/faces_type_i/E9 +++ b/tests/offset/faces_type_i/E9 @@ -1,9 +1,3 @@ -puts "TODO OCC24156 MacOS: An exception was caught" -puts "TODO OCC24156 MacOS: TEST INCOMPLETE" -puts "TODO OCC23748 ALL: ERROR. offsetperform operation not done." -puts "TODO OCC23748 ALL: Error: The command cannot be built" -puts "TODO OCC26556 ALL: Error : The offset cannot be built." - ellipse w1 0 0 0 15 10 mkedge w1 w1 0 pi/2 trotate w1 0 0 0 1 0 0 90 @@ -14,4 +8,4 @@ revol s w 0 0 0 0 0 1 90 OFFSETSHAPE 1 {s_4 s_5} $calcul $type -checkprops result -v 0 +checkprops result -v 4385.14 diff --git a/tests/offset/faces_type_i/F1 b/tests/offset/faces_type_i/F1 index da8b77081a..5d9163ded1 100644 --- a/tests/offset/faces_type_i/F1 +++ b/tests/offset/faces_type_i/F1 @@ -1,7 +1,3 @@ -puts "TODO OCC23748 ALL: ERROR. offsetperform operation not done." -puts "TODO OCC23748 ALL: Error: The command cannot be built" -puts "TODO OCC26556 ALL: Error : The offset cannot be built." - ellipse w1 0 0 0 15 10 mkedge w1 w1 0 pi/2 trotate w1 0 0 0 1 0 0 90 @@ -12,4 +8,4 @@ revol s w 0 0 0 0 0 1 90 OFFSETSHAPE -1 {s_4 s_5} $calcul $type -checkprops result -v 0 +checkprops result -v 4385.14 diff --git a/tests/offset/faces_type_i/F2 b/tests/offset/faces_type_i/F2 index 0d23b75d5f..22c7abe87c 100755 --- a/tests/offset/faces_type_i/F2 +++ b/tests/offset/faces_type_i/F2 @@ -1,8 +1,5 @@ -puts "TODO OCC24156 MacOS: An exception was caught" -puts "TODO OCC24156 MacOS: TEST INCOMPLETE" -puts "TODO OCC23748 ALL: ERROR. offsetperform operation not done." -puts "TODO OCC23748 ALL: Error: The command cannot be built" -puts "TODO OCC26556 ALL: Error : The offset cannot be built." +puts "TODO CR23530 ALL: Faulty shapes in variables faulty_1 to faulty_" +puts "TODO OCC23068 ALL: Error : The area of face " ellipse w1 0 0 0 15 10 mkedge w1 w1 0 pi/2 @@ -14,4 +11,4 @@ revol s w 0 0 0 0 0 1 270 OFFSETSHAPE 1 {s_4} $calcul $type -checkprops result -v 0 +checkprops result -v 13155.2 diff --git a/tests/offset/faces_type_i/F3 b/tests/offset/faces_type_i/F3 index 6243913d5b..fdc37e343f 100644 --- a/tests/offset/faces_type_i/F3 +++ b/tests/offset/faces_type_i/F3 @@ -1,9 +1,3 @@ -puts "TODO OCC24156 MacOS: An exception was caught" -puts "TODO OCC24156 MacOS: TEST INCOMPLETE" -puts "TODO OCC23748 ALL: ERROR. offsetperform operation not done." -puts "TODO OCC23748 ALL: Error: The command cannot be built" -puts "TODO OCC26556 ALL: Error : The offset cannot be built." - cpulimit 400 ellipse w1 0 0 0 15 10 @@ -16,4 +10,4 @@ revol s w 0 0 0 0 0 1 270 OFFSETSHAPE -1 {s_4} $calcul $type -checkprops result -v 0 +checkprops result -v 13155.2 diff --git a/tests/offset/faces_type_i/F4 b/tests/offset/faces_type_i/F4 index 8fcbf2bd36..40400eccaf 100644 --- a/tests/offset/faces_type_i/F4 +++ b/tests/offset/faces_type_i/F4 @@ -1,9 +1,3 @@ -puts "TODO OCC24156 MacOS: An exception was caught" -puts "TODO OCC24156 MacOS: TEST INCOMPLETE" -puts "TODO OCC23748 ALL: ERROR. offsetperform operation not done." -puts "TODO OCC23748 ALL: Error: The command cannot be built" -puts "TODO OCC26556 ALL: Error : The offset cannot be built." - ellipse w1 0 0 0 15 10 mkedge w1 w1 0 pi/2 trotate w1 0 0 0 1 0 0 90 @@ -14,4 +8,4 @@ revol s w 0 0 0 0 0 1 270 OFFSETSHAPE 1 {s_4 s_5} $calcul $type -checkprops result -v 0 +checkprops result -v 13155.2 diff --git a/tests/offset/faces_type_i/F5 b/tests/offset/faces_type_i/F5 index 8441586e46..9a14c5cf54 100644 --- a/tests/offset/faces_type_i/F5 +++ b/tests/offset/faces_type_i/F5 @@ -1,9 +1,3 @@ -puts "TODO OCC24156 MacOS: An exception was caught" -puts "TODO OCC24156 MacOS: TEST INCOMPLETE" -puts "TODO OCC23748 ALL: ERROR. offsetperform operation not done." -puts "TODO OCC23748 ALL: Error: The command cannot be built" -puts "TODO OCC26556 ALL: Error : The offset cannot be built." - # 17.01.2010 cpulimit 600 # 17.01.2010 @@ -18,4 +12,4 @@ revol s w 0 0 0 0 0 1 270 OFFSETSHAPE -1 {s_4 s_5} $calcul $type -checkprops result -v 0 +checkprops result -v 13155.2 diff --git a/tests/offset/faces_type_i/I5 b/tests/offset/faces_type_i/I5 index 80b53c4b42..e44979e7da 100644 --- a/tests/offset/faces_type_i/I5 +++ b/tests/offset/faces_type_i/I5 @@ -1,9 +1,5 @@ -puts "TODO OCC23748 ALL: ERROR. offsetperform operation not done." -puts "TODO OCC23748 ALL: Error: The command cannot be built" -puts "TODO OCC26556 ALL: Error : The offset cannot be built." - pcylinder s 5 10 270 OFFSETSHAPE -1 {s_5} $calcul $type -checkprops result -v 0 +checkprops result -v 589.049 diff --git a/tests/offset/faces_type_i/J5 b/tests/offset/faces_type_i/J5 index caf11e0129..84d09651d6 100644 --- a/tests/offset/faces_type_i/J5 +++ b/tests/offset/faces_type_i/J5 @@ -1,9 +1,5 @@ -puts "TODO OCC23748 ALL: ERROR. offsetperform operation not done." -puts "TODO OCC23748 ALL: Error: The command cannot be built" -puts "TODO OCC26556 ALL: Error : The offset cannot be built." - pcone s 9 4 15 270 OFFSETSHAPE -1 {s_5} $calcul $type -checkprops result -v 0 +checkprops result -v 1566.87 diff --git a/tests/offset/faces_type_i/K6 b/tests/offset/faces_type_i/K6 index 9b9b4dc904..b99329eb08 100644 --- a/tests/offset/faces_type_i/K6 +++ b/tests/offset/faces_type_i/K6 @@ -1,9 +1,5 @@ -puts "TODO OCC23748 ALL: ERROR. offsetperform operation not done." -puts "TODO OCC23748 ALL: Error: The command cannot be built" -puts "TODO OCC26556 ALL: Error : The offset cannot be built." - ptorus s 10 10 0 45 270 OFFSETSHAPE -1 {s_4} $calcul $type -checkprops result -v 0 +checkprops result -v 6083.13 diff --git a/tests/offset/faces_type_i/M6 b/tests/offset/faces_type_i/M6 index 2c80d4ef6b..201b7948dd 100644 --- a/tests/offset/faces_type_i/M6 +++ b/tests/offset/faces_type_i/M6 @@ -1,7 +1,3 @@ -puts "TODO OCC23748 ALL: ERROR. offsetperform operation not done." -puts "TODO OCC23748 ALL: Error: The command cannot be built" -puts "TODO OCC26556 ALL: Error : The offset cannot be built." - circle w -20 0 0 20 mkedge w w 0 pi*2/5 wire w w @@ -11,4 +7,4 @@ pipe s w profile OFFSETSHAPE 1 {s_2 s_3} $calcul $type -checkprops result -v 0 +checkprops result -v 785.398 diff --git a/tests/offset/faces_type_i/M8 b/tests/offset/faces_type_i/M8 index d3d09151af..0bb6b8738e 100644 --- a/tests/offset/faces_type_i/M8 +++ b/tests/offset/faces_type_i/M8 @@ -1,7 +1,3 @@ -puts "TODO OCC23748 ALL: ERROR. offsetperform operation not done." -puts "TODO OCC23748 ALL: Error: The command cannot be built" -puts "TODO OCC26556 ALL: Error : The offset cannot be built." - circle w -20 0 0 20 mkedge w w 0 pi*2/5 wire w w @@ -11,4 +7,4 @@ pipe s w profile OFFSETSHAPE 1 {s_4 s_5} $calcul $type -checkprops result -v 0 +checkprops result -v 785.398 diff --git a/tests/offset/faces_type_i/N1 b/tests/offset/faces_type_i/N1 index da57c569ca..c7220e1191 100644 --- a/tests/offset/faces_type_i/N1 +++ b/tests/offset/faces_type_i/N1 @@ -1,8 +1,5 @@ -puts "TODO OCC24156 MacOS: An exception was caught" -puts "TODO OCC24156 MacOS: TEST INCOMPLETE" -puts "TODO OCC23748 ALL: ERROR. offsetperform operation not done." -puts "TODO OCC23748 ALL: Error: The command cannot be built" -puts "TODO OCC26556 ALL: Error : The offset cannot be built." +puts "TODO CR23530 ALL: Faulty shapes in variables faulty_1 to faulty_" +puts "TODO OCC23068 ALL: Error : The area of face " beziersurf c 3 2 \ 0 0 0 0 5 5 2 14 3 \ @@ -12,4 +9,4 @@ prism s c 0 0 20 OFFSETSHAPE 1 {s_5 s_6} $calcul $type -checkprops result -v 0 +checkprops result -v 3340 diff --git a/tests/offset/shape/A1 b/tests/offset/shape/A1 index 61adf130be..41f76e6be8 100644 --- a/tests/offset/shape/A1 +++ b/tests/offset/shape/A1 @@ -1,5 +1,3 @@ -puts "TODO OCC23068 All: ERROR. offsetperform operation not done." -puts "TODO OCC23068 All: Error : The volume of result shape is" # Original bug : hkg60144 # Date : 17Juillet98 @@ -9,5 +7,5 @@ explode s f offsetshape result s -5 s_1 -checkprops result -v 2.12817e+006 +checkprops result -v 2.80312e+07 From 74095a8b46f50ffe05879f4da9e107b5f5457245 Mon Sep 17 00:00:00 2001 From: astromko Date: Tue, 12 Mar 2024 13:39:19 +0000 Subject: [PATCH 554/639] 0033367: Modeling Algorithms - Normal projection or BOP problem [Regression] Fixed passing of an incorrect curve into GeomAdaptor::MakeCurve() function. --- src/BRepAlgo/BRepAlgo_NormalProjection.cxx | 4 ++-- tests/bugs/modalg_8/bug33367 | 17 +++++++++++++++++ 2 files changed, 19 insertions(+), 2 deletions(-) create mode 100644 tests/bugs/modalg_8/bug33367 diff --git a/src/BRepAlgo/BRepAlgo_NormalProjection.cxx b/src/BRepAlgo/BRepAlgo_NormalProjection.cxx index 65bc1922e0..e6e8ff46c9 100644 --- a/src/BRepAlgo/BRepAlgo_NormalProjection.cxx +++ b/src/BRepAlgo/BRepAlgo_NormalProjection.cxx @@ -333,7 +333,7 @@ void BRepAlgo_NormalProjection::SetDefaultParams() Only2d = Standard_True; if(Only2d && Only3d) { - BRepLib_MakeEdge MKed(GeomAdaptor::MakeCurve(hcur->Curve()), + BRepLib_MakeEdge MKed(GeomAdaptor::MakeCurve(*hcur), Udeb, Ufin); prj = MKed.Edge(); BB.UpdateEdge(TopoDS::Edge(prj), @@ -369,7 +369,7 @@ void BRepAlgo_NormalProjection::SetDefaultParams() if(!Only3d) PCur2d = appr.Curve2d(); if(Only2d) { - BRepLib_MakeEdge MKed(GeomAdaptor::MakeCurve(hcur->Curve()), + BRepLib_MakeEdge MKed(GeomAdaptor::MakeCurve(*hcur), Udeb, Ufin); prj = MKed.Edge(); } diff --git a/tests/bugs/modalg_8/bug33367 b/tests/bugs/modalg_8/bug33367 new file mode 100644 index 0000000000..c4763d9868 --- /dev/null +++ b/tests/bugs/modalg_8/bug33367 @@ -0,0 +1,17 @@ +puts "===============================================================" +puts "0033367: Modeling Algorithms - Normal projection or BOP problem" +puts "===============================================================" +puts "" + +pload MODELING +restore [locate_data_file bug33367_1.brep] sou +restore [locate_data_file bug33367_2.brep] des +checkshape sou +checkshape des +nproject prj sou des +checknbshapes prj -vertex 2 -edge 2 -compound 1 -shape 5 +baddobjects des +baddtools prj +bfillds +bbuild res +checkshape res From 983e35ed71b95137772111751ad41a5da4937005 Mon Sep 17 00:00:00 2001 From: ichesnok Date: Tue, 12 Mar 2024 18:01:09 +0000 Subject: [PATCH 555/639] 0033410: Data Exchange, Step Import - TRIANGULATED_FACE from STEP where there are no pnval entries Problem fixed by using array of nodes in case when aPnindices is empty. --- src/StepToTopoDS/StepToTopoDS_TranslateFace.cxx | 12 +++++++----- tests/bugs/step/bug33410 | 12 ++++++++++++ 2 files changed, 19 insertions(+), 5 deletions(-) create mode 100644 tests/bugs/step/bug33410 diff --git a/src/StepToTopoDS/StepToTopoDS_TranslateFace.cxx b/src/StepToTopoDS/StepToTopoDS_TranslateFace.cxx index 93539a1aef..c33ac4a3bd 100644 --- a/src/StepToTopoDS/StepToTopoDS_TranslateFace.cxx +++ b/src/StepToTopoDS/StepToTopoDS_TranslateFace.cxx @@ -105,12 +105,13 @@ namespace { // ============================================================================ static void SetNodes(const Handle(Poly_Triangulation)& theMesh, Handle(TColgp_HArray1OfXYZ)& theNodes, + const Standard_Integer theNumPnindex, Handle(TColStd_HArray1OfInteger)& thePnindices, const Standard_Real theLengthFactor) { for (Standard_Integer aPnIndex = 1; aPnIndex <= theMesh->NbNodes(); ++aPnIndex) { - const gp_XYZ& aPoint = theNodes->Value(thePnindices->Value(aPnIndex)); + const gp_XYZ& aPoint = theNodes->Value((theNumPnindex > 0) ? thePnindices->Value(aPnIndex) : aPnIndex); theMesh->SetNode(aPnIndex, theLengthFactor * aPoint); } } @@ -326,10 +327,11 @@ namespace { const Standard_Boolean aHasUVNodes = Standard_False; const Standard_Boolean aHasNormals = (aNormNum > 0); + const Standard_Integer aNbNodes = (aNumPnindex > 0) ? aNumPnindex : aNodes->Length(); if (aTrianStripsNum == 0 && aTrianFansNum == 0) { - aMesh = new Poly_Triangulation(aNumPnindex, aTrianNum, aHasUVNodes, aHasNormals); + aMesh = new Poly_Triangulation(aNbNodes, aTrianNum, aHasUVNodes, aHasNormals); } else { @@ -359,14 +361,14 @@ namespace { aNbTriaFans += aTriangleFan->Length() - 2; } - aMesh = new Poly_Triangulation(aNumPnindex, aNbTriaStrips + aNbTriaFans, aHasUVNodes, aHasNormals); + aMesh = new Poly_Triangulation(aNbNodes, aNbTriaStrips + aNbTriaFans, aHasUVNodes, aHasNormals); } - SetNodes(aMesh, aNodes, aPnindices, theLocalFactors.LengthFactor()); + SetNodes(aMesh, aNodes, aNumPnindex, aPnindices, theLocalFactors.LengthFactor()); if (aHasNormals) { - SetNormals(aMesh, aNormals, aNormNum, aNumPnindex); + SetNormals(aMesh, aNormals, aNormNum, aNbNodes); } SetTriangles(aMesh, aTriangles, aTrianStripsNum, aTriaStrips, aTrianFansNum, aTriaFans); diff --git a/tests/bugs/step/bug33410 b/tests/bugs/step/bug33410 new file mode 100644 index 0000000000..441b389140 --- /dev/null +++ b/tests/bugs/step/bug33410 @@ -0,0 +1,12 @@ +puts "========================" +puts "0033410: Data Exchange, Step Import - TRIANGULATED_FACE from STEP where there are no pnval entries" +puts "========================" + +pload OCAF + +# Read file +ReadStep D [locate_data_file bug33410.step] +XGetOneShape sh D +checktrinfo sh -face 1 -nod 81 -tri 128 + +Close D From d3e00bfaa6a563062a4c84ef390c77daaa5f507d Mon Sep 17 00:00:00 2001 From: anv Date: Thu, 29 Feb 2024 13:50:52 +0000 Subject: [PATCH 556/639] 0033616: Application Framework - Using filter while reading XBF may result in unresolved links - Added tracking of unresolved links for TreeNodes; - Test case added. --- .../BinLDrivers_DocumentRetrievalDriver.cxx | 38 +++++++++++++++++-- .../BinLDrivers_DocumentRetrievalDriver.hxx | 2 + tests/bugs/xde/bug33616 | 11 ++++++ 3 files changed, 48 insertions(+), 3 deletions(-) create mode 100644 tests/bugs/xde/bug33616 diff --git a/src/BinLDrivers/BinLDrivers_DocumentRetrievalDriver.cxx b/src/BinLDrivers/BinLDrivers_DocumentRetrievalDriver.cxx index 52a83fe71f..b6e36ed491 100644 --- a/src/BinLDrivers/BinLDrivers_DocumentRetrievalDriver.cxx +++ b/src/BinLDrivers/BinLDrivers_DocumentRetrievalDriver.cxx @@ -33,6 +33,7 @@ #include #include #include +#include #include #include #include @@ -324,7 +325,16 @@ void BinLDrivers_DocumentRetrievalDriver::Read (Standard_IStream& // read sub-tree of the root label if (!theFilter.IsNull()) theFilter->StartIteration(); - Standard_Integer nbRead = ReadSubTree (theIStream, aData->Root(), theFilter, aQuickPart, aPS.Next()); + const auto aStreamStartPosition = theIStream.tellg(); + Standard_Integer nbRead = ReadSubTree (theIStream, aData->Root(), theFilter, aQuickPart, Standard_False, aPS.Next()); + if (!myUnresolvedLinks.IsEmpty()) + { + // In case we have skipped some linked TreeNodes before getting to + // their children. + theFilter->StartIteration(); + theIStream.seekg(aStreamStartPosition, std::ios_base::beg); + nbRead += ReadSubTree(theIStream, aData->Root(), theFilter, aQuickPart, Standard_True, aPS.Next()); + } if (!aPS.More()) { myReaderStatus = PCDM_RS_UserBreak; @@ -373,6 +383,7 @@ Standard_Integer BinLDrivers_DocumentRetrievalDriver::ReadSubTree const TDF_Label& theLabel, const Handle(PCDM_ReaderFilter)& theFilter, const Standard_Boolean& theQuickPart, + const Standard_Boolean theReadMissing, const Message_ProgressRange& theRange) { Standard_Integer nbRead = 0; @@ -393,7 +404,7 @@ Standard_Integer BinLDrivers_DocumentRetrievalDriver::ReadSubTree aLabelSize = InverseUint64(aLabelSize); #endif // no one sub-label is needed, so, skip everything - if (aSkipAttrs && !theFilter->IsSubPassed()) + if (aSkipAttrs && !theFilter->IsSubPassed() && myUnresolvedLinks.IsEmpty()) { aLabelSize -= sizeof (uint64_t); theIS.seekg (aLabelSize, std::ios_base::cur); @@ -403,6 +414,11 @@ Standard_Integer BinLDrivers_DocumentRetrievalDriver::ReadSubTree } } + if (theReadMissing) + { + aSkipAttrs = Standard_True; + } + const auto anAttStartPosition = theIS.tellg(); // Read attributes: for (theIS >> myPAtt; theIS && myPAtt.TypeId() > 0 && // not an end marker ? @@ -415,6 +431,12 @@ Standard_Integer BinLDrivers_DocumentRetrievalDriver::ReadSubTree myReaderStatus = PCDM_RS_UserBreak; return -1; } + if (myUnresolvedLinks.Remove(myPAtt.Id()) && aSkipAttrs) + { + aSkipAttrs = Standard_False; + theIS.seekg(anAttStartPosition, std::ios_base::beg); + continue; + } if (aSkipAttrs) { if (myPAtt.IsDirect()) // skip direct written stream @@ -487,7 +509,17 @@ Standard_Integer BinLDrivers_DocumentRetrievalDriver::ReadSubTree aDriver->TypeName(), Message_Warning); } else if (!isBound) + { myRelocTable.Bind(anID, tAtt); + Handle(TDataStd_TreeNode) aNode = Handle(TDataStd_TreeNode)::DownCast(tAtt); + if (!theFilter.IsNull() && !aNode.IsNull() && !aNode->Father().IsNull() && aNode->Father()->IsNew()) + { + Standard_Integer anUnresolvedLink; + myPAtt.SetPosition(BP_HEADSIZE); + myPAtt >> anUnresolvedLink; + myUnresolvedLinks.Add(anUnresolvedLink); + } + } } else if (!myMapUnsupported.Contains(myPAtt.TypeId())) myMsgDriver->Send(aMethStr + "warning: type ID not registered in header: " @@ -522,7 +554,7 @@ Standard_Integer BinLDrivers_DocumentRetrievalDriver::ReadSubTree // read sub-tree if (!theFilter.IsNull()) theFilter->Down (aTag); - Standard_Integer nbSubRead = ReadSubTree (theIS, aLab, theFilter, theQuickPart, aPS.Next()); + Standard_Integer nbSubRead = ReadSubTree (theIS, aLab, theFilter, theQuickPart, theReadMissing, aPS.Next()); // check for error if (nbSubRead == -1) return -1; diff --git a/src/BinLDrivers/BinLDrivers_DocumentRetrievalDriver.hxx b/src/BinLDrivers/BinLDrivers_DocumentRetrievalDriver.hxx index 03eaaaa720..fc1652cd49 100644 --- a/src/BinLDrivers/BinLDrivers_DocumentRetrievalDriver.hxx +++ b/src/BinLDrivers/BinLDrivers_DocumentRetrievalDriver.hxx @@ -80,6 +80,7 @@ protected: const TDF_Label& theData, const Handle(PCDM_ReaderFilter)& theFilter, const Standard_Boolean& theQuickPart, + const Standard_Boolean theReadMissing, const Message_ProgressRange& theRanges = Message_ProgressRange()); @@ -125,6 +126,7 @@ private: BinObjMgt_Persistent myPAtt; TColStd_MapOfInteger myMapUnsupported; BinLDrivers_VectorOfDocumentSection mySections; + NCollection_Map myUnresolvedLinks; }; diff --git a/tests/bugs/xde/bug33616 b/tests/bugs/xde/bug33616 new file mode 100644 index 0000000000..a65200a399 --- /dev/null +++ b/tests/bugs/xde/bug33616 @@ -0,0 +1,11 @@ +puts "========" +puts "0033616: Data Exchange - Using filter while reading XBF may result in unresolved links" +puts "========" + +pload ALL + +XOpen [locate_data_file bug28905_as1-oc-214.xbf] D -read0:1:1:2:1 +XGetShape sh D 0:1:1:2:1 +checknbshapes sh -solid 1 + +Close D From 2956d432e26f52e5e7b9f6a9b59cc5ac820d0714 Mon Sep 17 00:00:00 2001 From: oan Date: Wed, 3 Jan 2024 02:39:35 +0000 Subject: [PATCH 557/639] 0033560: PARASOLID Import - XT importer raises exception SIGFPE Arithmetic Exception Prevent division by zero in exceptional cases when vector of parameters contains only a single value. --- src/Approx/Approx_BSplComputeLine.gxx | 10 ++++++---- src/BSplCLib/BSplCLib_2.cxx | 17 ++++++++++++++--- 2 files changed, 20 insertions(+), 7 deletions(-) diff --git a/src/Approx/Approx_BSplComputeLine.gxx b/src/Approx/Approx_BSplComputeLine.gxx index 75315e89a8..36930088ea 100644 --- a/src/Approx/Approx_BSplComputeLine.gxx +++ b/src/Approx/Approx_BSplComputeLine.gxx @@ -808,8 +808,11 @@ void Approx_BSplComputeLine::Parameters(const MultiLine& Line, const Standard_Integer aNbp = lastP - firstP + 1; + // The first parameter should always be zero according to all the logic below, + // so division by any value will give zero anyway, so it should never be scaled + // to avoid case when there is only one parameter in the array thus division by zero happens. + TheParameters(firstP) = 0.0; if (aNbp == 2) { - TheParameters(firstP) = 0.0; TheParameters(lastP) = 1.0; } else if (Par == Approx_ChordLength || Par == Approx_Centripetal) @@ -820,7 +823,6 @@ void Approx_BSplComputeLine::Parameters(const MultiLine& Line, if (nbP3d == 0) mynbP3d = 1; if (nbP2d == 0) mynbP2d = 1; - TheParameters(firstP) = 0.0; dist = 0.0; TColgp_Array1OfPnt tabP(1, mynbP3d); TColgp_Array1OfPnt tabPP(1, mynbP3d); @@ -861,10 +863,10 @@ void Approx_BSplComputeLine::Parameters(const MultiLine& Line, TheParameters(i) = TheParameters(i - 1) + Sqrt(dist); } } - for (i = firstP; i <= lastP; i++) TheParameters(i) /= TheParameters(lastP); + for (i = firstP + 1; i <= lastP; i++) TheParameters(i) /= TheParameters(lastP); } else { - for (i = firstP; i <= lastP; i++) { + for (i = firstP + 1; i <= lastP; i++) { TheParameters(i) = (Standard_Real(i) - firstP) / (Standard_Real(lastP - Standard_Real(firstP))); } diff --git a/src/BSplCLib/BSplCLib_2.cxx b/src/BSplCLib/BSplCLib_2.cxx index 0ae8628e5c..b6a4496af1 100644 --- a/src/BSplCLib/BSplCLib_2.cxx +++ b/src/BSplCLib/BSplCLib_2.cxx @@ -515,8 +515,13 @@ BSplCLib::EvalBsplineBasis // // this should be always invertible if ii is correctly computed // - Factor = (Parameter - FlatKnots(ii - qq + pp + 1)) - / (FlatKnots(ii + pp) - FlatKnots(ii - qq + pp + 1)) ; + const Standard_Real aScale = (FlatKnots(ii + pp) - FlatKnots(ii - qq + pp + 1)); + if (Abs (aScale) < gp::Resolution()) + { + return 2; + } + + Factor = (Parameter - FlatKnots(ii - qq + pp + 1)) / aScale; Saved = Factor * BsplineBasis(1,pp) ; BsplineBasis(1,pp) *= (1.0e0 - Factor) ; BsplineBasis(1,pp) += BsplineBasis(1,qq) ; @@ -536,7 +541,13 @@ BSplCLib::EvalBsplineBasis } for (pp = 1 ; pp <= qq - 1 ; pp++) { - Inverse = 1.0e0 / (FlatKnots(ii + pp) - FlatKnots(ii - qq + pp + 1)) ; + const Standard_Real aScale = (FlatKnots(ii + pp) - FlatKnots(ii - qq + pp + 1)); + if (Abs (aScale) < gp::Resolution()) + { + return 2; + } + + Inverse = 1.0e0 / aScale; Factor = (Parameter - FlatKnots(ii - qq + pp + 1)) * Inverse ; Saved = Factor * BsplineBasis(1,pp) ; BsplineBasis(1,pp) *= (1.0e0 - Factor) ; From b78ccf1f9b69249d5f5f9c4c1e137f0f16ea49a7 Mon Sep 17 00:00:00 2001 From: ika Date: Wed, 3 Apr 2024 14:48:45 +0100 Subject: [PATCH 558/639] 0033661: Data Exchange, Step Import - Tessellated GDTs are not imported Add processing of tessellated_annotation_occurrence. Add test cases. --- src/STEPCAFControl/STEPCAFControl_Reader.cxx | 10 ++- tests/gdt/export/C2 | 4 +- tests/gdt/import/A6 | 92 ++++++++++++++++++++ tests/gdt/presentation/C1 | 10 ++- tests/gdt/presentation/C3 | 16 ++++ 5 files changed, 124 insertions(+), 8 deletions(-) create mode 100644 tests/gdt/import/A6 create mode 100644 tests/gdt/presentation/C3 diff --git a/src/STEPCAFControl/STEPCAFControl_Reader.cxx b/src/STEPCAFControl/STEPCAFControl_Reader.cxx index 0dd16f6189..dd9eef42fb 100644 --- a/src/STEPCAFControl/STEPCAFControl_Reader.cxx +++ b/src/STEPCAFControl/STEPCAFControl_Reader.cxx @@ -2134,11 +2134,12 @@ Standard_Boolean readPMIPresentation(const Handle(Standard_Transient)& thePresen return Standard_False; } Handle(Transfer_TransientProcess) aTP = theTR->TransientProcess(); - Handle(StepVisual_AnnotationOccurrence) anAO; + Handle(StepVisual_StyledItem) anAO; NCollection_Vector anAnnotations; - if (thePresentEntity->IsKind(STANDARD_TYPE(StepVisual_AnnotationOccurrence))) + if (thePresentEntity->IsKind(STANDARD_TYPE(StepVisual_AnnotationOccurrence)) || + thePresentEntity->IsKind(STANDARD_TYPE(StepVisual_TessellatedAnnotationOccurrence))) { - anAO = Handle(StepVisual_AnnotationOccurrence)::DownCast(thePresentEntity); + anAO = Handle(StepVisual_StyledItem)::DownCast(thePresentEntity); if (!anAO.IsNull()) { thePresentName = anAO->Name(); @@ -4368,7 +4369,8 @@ Standard_Boolean STEPCAFControl_Reader::ReadGDTs(const Handle(XSControl_WorkSess } } else if (anEnt->IsKind(STANDARD_TYPE(StepVisual_DraughtingCallout)) || - anEnt->IsKind(STANDARD_TYPE(StepVisual_AnnotationOccurrence))) + anEnt->IsKind(STANDARD_TYPE(StepVisual_AnnotationOccurrence)) || + anEnt->IsKind(STANDARD_TYPE(StepVisual_TessellatedAnnotationOccurrence))) { // Protection against import presentation twice Handle(StepVisual_DraughtingCallout) aDC; diff --git a/tests/gdt/export/C2 b/tests/gdt/export/C2 index e36d4b657b..78145b8734 100644 --- a/tests/gdt/export/C2 +++ b/tests/gdt/export/C2 @@ -3,12 +3,12 @@ set filename bug29362_MMT200.stp set ref_data { - NbOfDimensions : 2 + NbOfDimensions : 4 NbOfDimensionalSize : 1 NbOfDimensionalLocation: 1 NbOfAngular : 0 NbOfWithPath : 0 - NbOfCommonLabels : 0 + NbOfCommonLabels : 1 NbOfTolerances : 0 NbOfGTWithModifiers : 0 NbOfGTWithMaxTolerance : 0 diff --git a/tests/gdt/import/A6 b/tests/gdt/import/A6 new file mode 100644 index 0000000000..eb971fde63 --- /dev/null +++ b/tests/gdt/import/A6 @@ -0,0 +1,92 @@ +# !!!! This file is generated automatically, do not edit manually! See end script +set filename bug33661_nist_ftc_08_asme1_ap242-e1-tg.stp + +set ref_data { + + NbOfDimensions : 60 + NbOfTolerances : 0 + NbOfDatumFeature : 0 + NbOfAttachedDatum : 0 + NbOfDatumTarget : 0 + + 0:1:1:2:1 Shape.4 + 0:1:4:32 Dimension.4.1 ( N "DGT:Dimension" T 31, V 0, P 0 ) + 0:1:1:2:2 Shape.5 + 0:1:4:4 Dimension.5.1 ( N "DGT:Dimension" T 31, V 0, P 0 ) + 0:1:4:5 Dimension.5.2 ( N "DGT:Dimension" T 31, V 0, P 0 ) + 0:1:1:2:4 Shape.7 + 0:1:4:14 Dimension.7.1 ( N "DGT:Dimension" T 31, V 0, P 0 ) + 0:1:4:18 Dimension.7.2 ( N "DGT:Dimension" T 31, V 0, P 0 ) + 0:1:4:20 Dimension.7.3 ( N "DGT:Dimension" T 31, V 0, P 0 ) + 0:1:1:2:14 Shape.17 + 0:1:4:27 Dimension.17.1 ( N "DGT:Dimension" T 31, V 0, P 0 ) + 0:1:1:2:62 Shape.65 + 0:1:4:35 Dimension.65.1 ( N "DGT:Dimension" T 31, V 0, P 0 ) + 0:1:1:2:65 Shape.68 + 0:1:4:36 Dimension.68.1 ( N "DGT:Dimension" T 31, V 0, P 0 ) + 0:1:1:2:72 Shape.75 + 0:1:4:53 Dimension.75.1 ( N "DGT:Dimension" T 31, V 0, P 0 ) + 0:1:1:2:84 Shape.87 + 0:1:4:54 Dimension.87.1 ( N "DGT:Dimension" T 31, V 0, P 0 ) + 0:1:1:2:90 Shape.93 + 0:1:4:31 Dimension.93.1 ( N "DGT:Dimension" T 31, V 0, P 0 ) + 0:1:4:33 Dimension.93.2 ( N "DGT:Dimension" T 31, V 0, P 0 ) + 0:1:4:34 Dimension.93.3 ( N "DGT:Dimension" T 31, V 0, P 0 ) + 0:1:1:2:94 Shape.97 + 0:1:4:39 Dimension.97.1 ( N "DGT:Dimension" T 31, V 0, P 0 ) + 0:1:4:40 Dimension.97.2 ( N "DGT:Dimension" T 31, V 0, P 0 ) + 0:1:4:51 Dimension.97.3 ( N "DGT:Dimension" T 31, V 0, P 0 ) + 0:1:4:52 Dimension.97.4 ( N "DGT:Dimension" T 31, V 0, P 0 ) + 0:1:4:55 Dimension.97.5 ( N "DGT:Dimension" T 31, V 0, P 0 ) + 0:1:1:2:96 Shape.99 + 0:1:4:43 Dimension.99.1 ( N "DGT:Dimension" T 31, V 0, P 0 ) + 0:1:4:44 Dimension.99.2 ( N "DGT:Dimension" T 31, V 0, P 0 ) + 0:1:4:45 Dimension.99.3 ( N "DGT:Dimension" T 31, V 0, P 0 ) + 0:1:4:46 Dimension.99.4 ( N "DGT:Dimension" T 31, V 0, P 0 ) + 0:1:4:57 Dimension.99.5 ( N "DGT:Dimension" T 31, V 0, P 0 ) + 0:1:1:2:98 Shape.101 + 0:1:4:47 Dimension.101.1 ( N "DGT:Dimension" T 31, V 0, P 0 ) + 0:1:4:48 Dimension.101.2 ( N "DGT:Dimension" T 31, V 0, P 0 ) + 0:1:4:49 Dimension.101.3 ( N "DGT:Dimension" T 31, V 0, P 0 ) + 0:1:4:50 Dimension.101.4 ( N "DGT:Dimension" T 31, V 0, P 0 ) + 0:1:4:56 Dimension.101.5 ( N "DGT:Dimension" T 31, V 0, P 0 ) + 0:1:1:2:100 Shape.103 + 0:1:4:37 Dimension.103.1 ( N "DGT:Dimension" T 31, V 0, P 0 ) + 0:1:4:38 Dimension.103.2 ( N "DGT:Dimension" T 31, V 0, P 0 ) + 0:1:4:41 Dimension.103.3 ( N "DGT:Dimension" T 31, V 0, P 0 ) + 0:1:4:42 Dimension.103.4 ( N "DGT:Dimension" T 31, V 0, P 0 ) + 0:1:4:58 Dimension.103.5 ( N "DGT:Dimension" T 31, V 0, P 0 ) + 0:1:1:2:102 Shape.105 + 0:1:4:25 Dimension.105.1 ( N "DGT:Dimension" T 31, V 0, P 0 ) + 0:1:4:26 Dimension.105.2 ( N "DGT:Dimension" T 31, V 0, P 0 ) + 0:1:1:2:116 Shape.119 + 0:1:4:24 Dimension.119.1 ( N "DGT:Dimension" T 31, V 0, P 0 ) + 0:1:1:2:120 Shape.123 + 0:1:4:23 Dimension.123.1 ( N "DGT:Dimension" T 31, V 0, P 0 ) + 0:1:1:2:161 Shape.164 + 0:1:4:15 Dimension.164.1 ( N "DGT:Dimension" T 31, V 0, P 0 ) + 0:1:1:2:179 Shape.182 + 0:1:4:1 Dimension.182.1 ( N "DGT:Dimension" T 31, V 0, P 0 ) + 0:1:4:2 Dimension.182.2 ( N "DGT:Dimension" T 31, V 0, P 0 ) + 0:1:4:3 Dimension.182.3 ( N "DGT:Dimension" T 31, V 0, P 0 ) + 0:1:1:2:237 Shape.240 + 0:1:4:17 Dimension.240.1 ( N "DGT:Dimension" T 31, V 0, P 0 ) + 0:1:4:19 Dimension.240.2 ( N "DGT:Dimension" T 31, V 0, P 0 ) + 0:1:1:2:246 Shape.249 + 0:1:4:6 Dimension.249.1 ( N "DGT:Dimension" T 31, V 0, P 0 ) + 0:1:4:8 Dimension.249.2 ( N "DGT:Dimension" T 31, V 0, P 0 ) + 0:1:4:9 Dimension.249.3 ( N "DGT:Dimension" T 31, V 0, P 0 ) + 0:1:1:2:248 Shape.251 + 0:1:4:7 Dimension.251.1 ( N "DGT:Dimension" T 31, V 0, P 0 ) + 0:1:4:10 Dimension.251.2 ( N "DGT:Dimension" T 31, V 0, P 0 ) + 0:1:4:11 Dimension.251.3 ( N "DGT:Dimension" T 31, V 0, P 0 ) + 0:1:1:2:250 Shape.253 + 0:1:4:12 Dimension.253.1 ( N "DGT:Dimension" T 31, V 0, P 0 ) + 0:1:4:13 Dimension.253.2 ( N "DGT:Dimension" T 31, V 0, P 0 ) + 0:1:1:2:256 Shape.259 + 0:1:4:28 Dimension.259.1 ( N "DGT:Dimension" T 31, V 0, P 0 ) + 0:1:4:29 Dimension.259.2 ( N "DGT:Dimension" T 31, V 0, P 0 ) + 0:1:4:30 Dimension.259.3 ( N "DGT:Dimension" T 31, V 0, P 0 ) + 0:1:1:3:1 Shape.276 + 0:1:4:16 Dimension.276.1 ( N "DGT:Dimension" T 31, V 0, P 0 ) +} diff --git a/tests/gdt/presentation/C1 b/tests/gdt/presentation/C1 index 21a1799203..75d63af0c6 100644 --- a/tests/gdt/presentation/C1 +++ b/tests/gdt/presentation/C1 @@ -2,7 +2,13 @@ set filename bug29362_MMT200.stp set ref_data { -Centre of mass: 0 0 0 -Mass: 0 +Centre of mass: 13.412719368151439 6.1818909424750705 -13.415402720911091 +Mass: 252.25931515680639 + +} + +set ref_data_write { +Centre of mass: 13.412719368151233 6.1818909424748316 -13.415402720907935 +Mass: 252.25931515678892 } diff --git a/tests/gdt/presentation/C3 b/tests/gdt/presentation/C3 new file mode 100644 index 0000000000..98899400c2 --- /dev/null +++ b/tests/gdt/presentation/C3 @@ -0,0 +1,16 @@ +# !!!! This file is generated automatically, do not edit manually! See end script +puts "TODO CR11111 ALL: Error on writing file" + +set filename bug33661_nist_ftc_08_asme1_ap242-e1-tg.stp + +set ref_data { +Centre of mass: -62.99891835601813 78.203476181663817 20.269103705327481 +Mass: 47784.542040997127 + +} + +set ref_data_write { +Centre of mass: -261.12759307366923 196.9986700086933 -13.86055926862322 +Mass: 17568.06377585962 + +} From 4fb9b2f250b2ed7f355b2b80f34be71c128311ff Mon Sep 17 00:00:00 2001 From: dpasukhi Date: Wed, 17 Apr 2024 23:14:47 +0100 Subject: [PATCH 559/639] Update version to 7.8.2 dev --- src/Standard/Standard_Version.hxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Standard/Standard_Version.hxx b/src/Standard/Standard_Version.hxx index 631419cfd4..3cdf370af3 100644 --- a/src/Standard/Standard_Version.hxx +++ b/src/Standard/Standard_Version.hxx @@ -35,7 +35,7 @@ // Primary definitions #define OCC_VERSION_MAJOR 7 #define OCC_VERSION_MINOR 8 -#define OCC_VERSION_MAINTENANCE 1 +#define OCC_VERSION_MAINTENANCE 2 //! This macro must be commented in official release, and set to non-empty //! string in other situations, to identify specifics of the version, e.g.: @@ -47,7 +47,7 @@ // Derived (manually): version as real and string (major.minor) #define OCC_VERSION 7.8 #define OCC_VERSION_STRING "7.8" -#define OCC_VERSION_COMPLETE "7.8.1" +#define OCC_VERSION_COMPLETE "7.8.2" //! Derived: extended version as string ("major.minor.maintenance.dev") #ifdef OCC_VERSION_DEVELOPMENT From d4dbeab49bea128a59ca34166532d96ebfaae445 Mon Sep 17 00:00:00 2001 From: drochalo Date: Mon, 20 Nov 2023 10:25:09 +0000 Subject: [PATCH 560/639] 0032750: Visualization, AIS_Manipulator - selection of moved object is broken Completed the stop transform action when dragging manipulator with mouse. Added context redisplay for update of interactive object sensitive areas. Added test. --- src/AIS/AIS_Manipulator.cxx | 13 +++++++++-- tests/vselect/bugs/bug32750 | 44 +++++++++++++++++++++++++++++++++++++ 2 files changed, 55 insertions(+), 2 deletions(-) create mode 100644 tests/vselect/bugs/bug32750 diff --git a/src/AIS/AIS_Manipulator.cxx b/src/AIS/AIS_Manipulator.cxx index 21491cc35a..bf93dbfc10 100644 --- a/src/AIS/AIS_Manipulator.cxx +++ b/src/AIS/AIS_Manipulator.cxx @@ -643,7 +643,7 @@ Standard_Boolean AIS_Manipulator::ObjectTransformation (const Standard_Integer t //function : ProcessDragging //purpose : //======================================================================= -Standard_Boolean AIS_Manipulator::ProcessDragging (const Handle(AIS_InteractiveContext)&, +Standard_Boolean AIS_Manipulator::ProcessDragging (const Handle(AIS_InteractiveContext)& aCtx, const Handle(V3d_View)& theView, const Handle(SelectMgr_EntityOwner)&, const Graphic3d_Vec2i& theDragFrom, @@ -676,7 +676,16 @@ Standard_Boolean AIS_Manipulator::ProcessDragging (const Handle(AIS_InteractiveC return Standard_True; } case AIS_DragAction_Stop: - break; + { + //at the end of transformation redisplay for updating sensitive areas + StopTransform (true); + if (aCtx->IsDisplayed (this)) + { + aCtx->Redisplay (this, true); + } + return Standard_True; + } + break; } return Standard_False; } diff --git a/tests/vselect/bugs/bug32750 b/tests/vselect/bugs/bug32750 new file mode 100644 index 0000000000..36cf6dbdc5 --- /dev/null +++ b/tests/vselect/bugs/bug32750 @@ -0,0 +1,44 @@ +puts "========" +puts "0032750: Visualization, AIS_Manipulator - selection of moved object is broken" +puts "========" +puts "" + +#load modules +pload MODELING VISUALIZATION +vinit + +#create box and attach manipulator +box b 100 100 100 +vdisplay b +vsetdispmode 1 +vaspects -shadingModel unlit +vfront +vfit +vzoom 0.5 +vmanipulator m -attach b + +#set mouse coordinates for actions +set mouse_pick {205 155} +set mouse_drag1 {205 55} +set mouse_pick2 {250 10} +set mouse_pick3 {250 200} + +#NOTE: issue not reproducible by draw command +#but similar action with mouse would show issue +#set mouse action +vmoveto {*}$mouse_pick +vselect {*}$mouse_pick +vmanipulator m -startTransform {*}$mouse_pick +vmanipulator m -transform {*}$mouse_drag1 +vmanipulator m -stopTransform +vselect 0 0 + +#check if object is selected +vremove m +vmoveto 0 0 +vdump $imagedir/${casename}_unselected.png +vmoveto {*}$mouse_pick2 +vdump $imagedir/${casename}_selectTop.png +vmoveto {*}$mouse_pick3 +vdump $imagedir/${casename}_selectBot.png + From ead71c66a3bad3e28d837af34d23a05c4047271b Mon Sep 17 00:00:00 2001 From: anv Date: Wed, 26 Jul 2023 05:07:41 +0100 Subject: [PATCH 561/639] 0033430: IFC Import - Adding basic support of materials Updated XStat to show VisMaterials info --- src/XDEDRAW/XDEDRAW.cxx | 52 ++++++++++++++++++++++++++++++++++------- 1 file changed, 44 insertions(+), 8 deletions(-) diff --git a/src/XDEDRAW/XDEDRAW.cxx b/src/XDEDRAW/XDEDRAW.cxx index 49d6c2685b..f953df0378 100644 --- a/src/XDEDRAW/XDEDRAW.cxx +++ b/src/XDEDRAW/XDEDRAW.cxx @@ -98,6 +98,7 @@ #include #include #include +#include #include #include #include @@ -323,7 +324,7 @@ static Standard_Integer dump (Draw_Interpretor& di, Standard_Integer argc, const //======================================================================= static void StatAssembly(const TDF_Label L, - const Standard_Integer level, + const Standard_Integer level, Handle(TColStd_HArray1OfInteger) &HAI, Standard_Integer &NbCentroidProp, Standard_Integer &NbVolumeProp, @@ -331,9 +332,10 @@ static void StatAssembly(const TDF_Label L, Standard_Integer &NbShapesWithName, Standard_Integer &NbShapesWithColor, Standard_Integer &NbShapesWithLayer, + Standard_Integer &NbShapesWithVisMaterial, Handle(TDocStd_Document) &aDoc, Standard_Boolean &PrintStructMode, - Draw_Interpretor& di) + Draw_Interpretor& di) { if(PrintStructMode) { for(Standard_Integer j=0; j<=level; j++) @@ -370,6 +372,7 @@ static void StatAssembly(const TDF_Label L, } Handle(XCAFDoc_ColorTool) CTool = XCAFDoc_DocumentTool::ColorTool(aDoc->Main()); Handle(XCAFDoc_LayerTool) LTool = XCAFDoc_DocumentTool::LayerTool(aDoc->Main()); + Handle(XCAFDoc_VisMaterialTool) VMTool = XCAFDoc_DocumentTool::VisMaterialTool(aDoc->Main()); Quantity_ColorRGBA col; Standard_Boolean IsColor = Standard_False; Standard_Boolean IsByLayer = Standard_False; @@ -386,7 +389,7 @@ static void StatAssembly(const TDF_Label L, { Handle(TColStd_HSequenceOfExtendedString) aLayerS; LTool->GetLayers(L, aLayerS); - // Currently for DXF pnly, thus + // Currently for DXF only, thus // only 1 Layer should be. if(aLayerS->Length() == 1) { @@ -428,14 +431,29 @@ static void StatAssembly(const TDF_Label L, } NbShapesWithLayer++; } - if(PrintStructMode) di<<"\n"; - + + TDF_Label aVMat; + if (VMTool->GetShapeMaterial(L, aVMat)) + { + if (PrintStructMode) { + di << "VisMaterial("; + Handle(TDataStd_Name) aNodeName; + if (aVMat.FindAttribute(TDataStd_Name::GetID(), aNodeName)) + { + di << "\"" << aNodeName->Get() << "\""; + } + di << ") "; + } + NbShapesWithVisMaterial++; + } + if (PrintStructMode) di << "\n"; + HAI->SetValue(level, HAI->Value(level)+1 ); if(L.HasChild()) { for(Standard_Integer i=1; i<=L.NbChildren(); i++) { StatAssembly(L.FindChild(i), level+1, HAI, NbCentroidProp, NbVolumeProp, NbAreaProp, NbShapesWithName, NbShapesWithColor, - NbShapesWithLayer, aDoc, PrintStructMode, di); + NbShapesWithLayer, NbShapesWithVisMaterial, aDoc, PrintStructMode, di); } } @@ -465,14 +483,14 @@ static Standard_Integer statdoc (Draw_Interpretor& di, Standard_Integer argc, co if(PrintStructMode) di<<"\nStructure of shapes in the document:\n"; Standard_Integer level=0; Standard_Integer NbCentroidProp=0, NbVolumeProp=0, NbAreaProp=0; - Standard_Integer NbShapesWithName=0, NbShapesWithColor=0, NbShapesWithLayer=0; + Standard_Integer NbShapesWithName=0, NbShapesWithColor=0, NbShapesWithLayer=0, NbShapesWithVisMaterial = 0; Handle(TColStd_HArray1OfInteger) HAI = new TColStd_HArray1OfInteger(0,20); Standard_Integer i=0; for(i=0; i<=20; i++) HAI->SetValue(i,0); for(i=1; i<=SeqLabels.Length(); i++) { StatAssembly(SeqLabels.Value(i), level, HAI, NbCentroidProp, NbVolumeProp, NbAreaProp, NbShapesWithName, NbShapesWithColor, - NbShapesWithLayer, Doc, PrintStructMode, di); + NbShapesWithLayer, NbShapesWithVisMaterial, Doc, PrintStructMode, di); } Standard_Integer NbLabelsShape = 0; di<<"\nStatistis of shapes in the document:\n"; @@ -486,6 +504,7 @@ static Standard_Integer statdoc (Draw_Interpretor& di, Standard_Integer argc, co di<<"Number of labels with name = "<Main()); + TDF_LabelSequence aVMats; + VMTool->GetMaterials(aVMats); + di << "\nNumber of vis materials = " << aVMats.Length() << "\n"; + if (!aVMats.IsEmpty()) + { + for (TDF_LabelSequence::Iterator aVMIter(aVMats); aVMIter.More(); aVMIter.Next()) + { + Handle(TDataStd_Name) aNodeName; + if (aVMIter.Value().FindAttribute(TDataStd_Name::GetID(), aNodeName)) + { + di << "\"" << aNodeName->Get() << "\" "; + } + } + di << "\n"; + } + di<<"\n"; return 0; } From 36dc3d20372ff37c6c3b35e1fd10ae4c8f945517 Mon Sep 17 00:00:00 2001 From: ika Date: Thu, 28 Mar 2024 11:27:01 +0000 Subject: [PATCH 562/639] 0033371: USD - Implementation of import and export USD files using the USD SDK. 1 Stage Do auxiliary improvement in OCCT. --- src/RWMesh/RWMesh_CafReader.cxx | 10 ++++++++++ src/RWMesh/RWMesh_CafReader.hxx | 1 + 2 files changed, 11 insertions(+) diff --git a/src/RWMesh/RWMesh_CafReader.cxx b/src/RWMesh/RWMesh_CafReader.cxx index d1086ff15b..aa2f2f9128 100644 --- a/src/RWMesh/RWMesh_CafReader.cxx +++ b/src/RWMesh/RWMesh_CafReader.cxx @@ -383,6 +383,16 @@ Standard_Boolean RWMesh_CafReader::addShapeIntoDoc (CafDocumentTools& theTools, return Standard_False; } + if (toMakeAssembly) + { + TDF_Label aRefLabel; + theTools.ShapeTool->GetReferredShape(aNewLabel, aRefLabel); + if (!aRefLabel.IsNull()) + { + theTools.OriginalShapeMap.Bind(theShape, aRefLabel); + } + } + // if new label is a reference get referred shape TDF_Label aNewRefLabel = aNewLabel; theTools.ShapeTool->GetReferredShape (aNewLabel, aNewRefLabel); diff --git a/src/RWMesh/RWMesh_CafReader.hxx b/src/RWMesh/RWMesh_CafReader.hxx index 5e93d60b3e..f1bc35edcb 100644 --- a/src/RWMesh/RWMesh_CafReader.hxx +++ b/src/RWMesh/RWMesh_CafReader.hxx @@ -57,6 +57,7 @@ public: Handle(XCAFDoc_ColorTool) ColorTool; Handle(XCAFDoc_VisMaterialTool) VisMaterialTool; NCollection_DataMap ComponentMap; + NCollection_DataMap OriginalShapeMap; }; public: From 69f380ae3288dcb07fb993017ed09d6e8c60c9a1 Mon Sep 17 00:00:00 2001 From: dpasukhi Date: Mon, 6 May 2024 10:53:55 +0100 Subject: [PATCH 563/639] 0033699: Data Exchange, DE Wrapper - Integration activation plug-in mechanism plug-in New virtual function is implemented --- src/DE/DE_ConfigurationNode.hxx | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/DE/DE_ConfigurationNode.hxx b/src/DE/DE_ConfigurationNode.hxx index 0f48ac5e55..4f06830c9e 100644 --- a/src/DE/DE_ConfigurationNode.hxx +++ b/src/DE/DE_ConfigurationNode.hxx @@ -140,6 +140,15 @@ public: myIsEnabled = theIsLoaded; } + //! Custom function to activate commercial DE component. + //! The input is special sequence of values that described in + //! specific component documentation. Order is important. + //! Each component can have own way of activation. + //! + //! The main goal - real-time loading plug-in activation. + //! OpenSource components don't need to have activation process. + Standard_EXPORT void virtual CustomActivation(const TColStd_ListOfAsciiString&) {}; + public: //!< Internal parameters for transfer process From 7f1d0563bb95894a5f156665bcda7ac57f08cf88 Mon Sep 17 00:00:00 2001 From: drochalo Date: Tue, 24 Oct 2023 14:44:14 +0100 Subject: [PATCH 564/639] 0033514: Visualization - Scaled view twists zoom persistence objects Added flag to transform persistence to handle axial scaling. Modified manipulator's zoom transform persistence to fit in axial scaling events. Added tests for cases 27832 and 33514. Logic change on Graphic3d_TransformPers::Apply for Graphic3d_TMF_AxialScalePers. Logic fixes in AIS_Manipulator to integrate axial scale in both zoomable and unzoomable states. --- src/AIS/AIS_Manipulator.cxx | 14 ++++-- src/Graphic3d/Graphic3d_Camera.cxx | 4 ++ src/Graphic3d/Graphic3d_TransModeFlags.hxx | 19 ++++---- src/Graphic3d/Graphic3d_TransformPers.hxx | 32 +++++++++++-- src/ViewerTest/ViewerTest.cxx | 10 +++- tests/v3d/manipulator/bug33514 | 53 ++++++++++++++++++++++ tests/v3d/trihedron/bug27832 | 46 +++++++++++++++++++ 7 files changed, 162 insertions(+), 16 deletions(-) create mode 100644 tests/v3d/manipulator/bug33514 create mode 100644 tests/v3d/trihedron/bug27832 diff --git a/src/AIS/AIS_Manipulator.cxx b/src/AIS/AIS_Manipulator.cxx index bf93dbfc10..76b82782b8 100644 --- a/src/AIS/AIS_Manipulator.cxx +++ b/src/AIS/AIS_Manipulator.cxx @@ -843,10 +843,18 @@ void AIS_Manipulator::updateTransformation() if (myIsZoomPersistentMode) { if (TransformPersistence().IsNull() - || TransformPersistence()->Mode() != Graphic3d_TMF_ZoomPers + || TransformPersistence()->Mode() != Graphic3d_TMF_AxialZoomPers || !TransformPersistence()->AnchorPoint().IsEqual (myPosition.Location(), 0.0)) { - setTransformPersistence (new Graphic3d_TransformPers (Graphic3d_TMF_ZoomPers, myPosition.Location())); + setTransformPersistence (new Graphic3d_TransformPers (Graphic3d_TMF_AxialZoomPers, myPosition.Location())); + } + } + else + { + if (TransformPersistence().IsNull() + || TransformPersistence()->Mode() != Graphic3d_TMF_AxialScalePers) + { + setTransformPersistence (new Graphic3d_TransformPers (Graphic3d_TMF_AxialScalePers, myPosition.Location())); } } } @@ -931,7 +939,7 @@ void AIS_Manipulator::SetZoomPersistence (const Standard_Boolean theToEnable) if (!theToEnable) { - setTransformPersistence (Handle(Graphic3d_TransformPers)()); + setTransformPersistence (new (Graphic3d_TransformPers)(Graphic3d_TMF_AxialScalePers)); } updateTransformation(); diff --git a/src/Graphic3d/Graphic3d_Camera.cxx b/src/Graphic3d/Graphic3d_Camera.cxx index ee7204fe8e..e1fc21edfc 100644 --- a/src/Graphic3d/Graphic3d_Camera.cxx +++ b/src/Graphic3d/Graphic3d_Camera.cxx @@ -309,6 +309,10 @@ void Graphic3d_Camera::SetUp (const gp_Dir& theUp) // ======================================================================= void Graphic3d_Camera::SetAxialScale (const gp_XYZ& theAxialScale) { + Standard_OutOfRange_Raise_if (theAxialScale.X() <= 0.0 + || theAxialScale.Y() <= 0.0 + || theAxialScale.Z() <= 0.0, + "Graphic3d_Camera::SetAxialScale, bad coefficient"); if (AxialScale().IsEqual (theAxialScale, 0.0)) { return; diff --git a/src/Graphic3d/Graphic3d_TransModeFlags.hxx b/src/Graphic3d/Graphic3d_TransModeFlags.hxx index 0c9f329362..d06a8329a1 100644 --- a/src/Graphic3d/Graphic3d_TransModeFlags.hxx +++ b/src/Graphic3d/Graphic3d_TransModeFlags.hxx @@ -19,15 +19,18 @@ //! Transform Persistence Mode defining whether to lock in object position, rotation and / or zooming relative to camera position. enum Graphic3d_TransModeFlags { - Graphic3d_TMF_None = 0x0000, //!< no persistence attributes (normal 3D object) - Graphic3d_TMF_ZoomPers = 0x0002, //!< object does not resize - Graphic3d_TMF_RotatePers = 0x0008, //!< object does not rotate; - Graphic3d_TMF_TriedronPers = 0x0020, //!< object behaves like trihedron - it is fixed at the corner of view and does not resizing (but rotating) - Graphic3d_TMF_2d = 0x0040, //!< object is defined in 2D screen coordinates (pixels) and does not resize, pan and rotate - Graphic3d_TMF_CameraPers = 0x0080, //!< object is in front of the camera - Graphic3d_TMF_OrthoPers = 0x0100, //!< object is forced to be rendered with orthographic projection. + Graphic3d_TMF_None = 0x0000, //!< no persistence attributes (normal 3D object) + Graphic3d_TMF_ZoomPers = 0x0002, //!< object does not resize + Graphic3d_TMF_RotatePers = 0x0008, //!< object does not rotate; + Graphic3d_TMF_TriedronPers = 0x0020, //!< object behaves like trihedron - it is fixed at the corner of view and does not resizing (but rotating) + Graphic3d_TMF_2d = 0x0040, //!< object is defined in 2D screen coordinates (pixels) and does not resize, pan and rotate + Graphic3d_TMF_CameraPers = 0x0080, //!< object is in front of the camera + Graphic3d_TMF_OrthoPers = 0x0100, //!< object is forced to be rendered with orthographic projection. + Graphic3d_TMF_AxialScalePers = 0x0200, //!< object does not resize with axial scale Graphic3d_TMF_ZoomRotatePers = Graphic3d_TMF_ZoomPers - | Graphic3d_TMF_RotatePers //!< object doesn't resize and rotate + | Graphic3d_TMF_RotatePers, //!< object doesn't resize and rotate + Graphic3d_TMF_AxialZoomPers = Graphic3d_TMF_ZoomPers + | Graphic3d_TMF_AxialScalePers //!< object does not visually resize with either object or axial scale }; //! Bitwise OR operator for transform persistence mode flags. Be aware that some flags combinations are not valid. diff --git a/src/Graphic3d/Graphic3d_TransformPers.hxx b/src/Graphic3d/Graphic3d_TransformPers.hxx index d0f70ba64c..36dc3636a1 100644 --- a/src/Graphic3d/Graphic3d_TransformPers.hxx +++ b/src/Graphic3d/Graphic3d_TransformPers.hxx @@ -40,6 +40,9 @@ DEFINE_STANDARD_HANDLE(Graphic3d_TransformPers, Standard_Transient) //! Beware that Graphic3d_RenderingParams::ResolutionRatio() will be ignored! //! For other Persistence flags, normal (world) length units will apply. //! +//! Graphic3d_TMF_AxialPers and Graphic3d_TMF_AxialZoomPers defines persistence in the axial scale, +//! i.e., keeps the object visual coherence when the camera's axial scale is changed. +//! Meant to be used by objects such as Manipulators and trihedrons. //! WARNING: Graphic3d_TMF_None is not permitted for defining instance of this class - NULL handle should be used for this purpose! class Graphic3d_TransformPers : public Standard_Transient { @@ -64,13 +67,19 @@ public: return (theMode & Graphic3d_TMF_OrthoPers) != 0; } + //! Return true if specified mode is axial transformation persistence. + static Standard_Boolean IsAxial (Graphic3d_TransModeFlags theMode) + { + return (theMode & Graphic3d_TMF_AxialScalePers) != 0; + } + public: //! Set transformation persistence. Graphic3d_TransformPers (const Graphic3d_TransModeFlags theMode) : myMode (theMode) { - if (IsZoomOrRotate (theMode)) + if (IsZoomOrRotate (theMode) || IsAxial (theMode)) { SetPersistence (theMode, gp_Pnt(0.0, 0.0, 0.0)); } @@ -119,6 +128,9 @@ public: //! Return true for Graphic3d_TMF_OrthoPers mode. Standard_Boolean IsOrthoPers () const { return IsOrthoPers (myMode); } + //! Return true for Graphic3d_TMF_AxialScalePers modes. + Standard_Boolean IsAxial() const { return IsAxial (myMode); } + //! Transformation persistence mode flags. Graphic3d_TransModeFlags Mode() const { return myMode; } @@ -130,7 +142,7 @@ public: void SetPersistence (const Graphic3d_TransModeFlags theMode, const gp_Pnt& thePnt) { - if (!IsZoomOrRotate (theMode)) + if (!IsZoomOrRotate (theMode) && !IsAxial (theMode)) { throw Standard_ProgramError("Graphic3d_TransformPers::SetPersistence(), wrong persistence mode."); } @@ -163,7 +175,7 @@ public: //! Return the anchor point for zoom/rotate transformation persistence. gp_Pnt AnchorPoint() const { - if (!IsZoomOrRotate()) + if (!IsZoomOrRotate() && !IsAxial()) { throw Standard_ProgramError("Graphic3d_TransformPers::AnchorPoint(), wrong persistence mode."); } @@ -174,7 +186,7 @@ public: //! Set the anchor point for zoom/rotate transformation persistence. void SetAnchorPoint (const gp_Pnt& thePnt) { - if (!IsZoomOrRotate()) + if (!IsZoomOrRotate() && !IsAxial()) { throw Standard_ProgramError("Graphic3d_TransformPers::SetAnchorPoint(), wrong persistence mode."); } @@ -448,6 +460,10 @@ void Graphic3d_TransformPers::Apply (const Handle(Graphic3d_Camera)& theCamera, } } + Graphic3d_TransformUtils::Scale (aWorldView, + 1.0 / theCamera->AxialScale().X(), + 1.0 / theCamera->AxialScale().Y(), + 1.0 / theCamera->AxialScale().Z()); Graphic3d_TransformUtils::Translate (aWorldView, aCenter.X(), aCenter.Y(), aCenter.Z()); Graphic3d_TransformUtils::Scale (aWorldView, aScale, aScale, aScale); } @@ -517,6 +533,14 @@ void Graphic3d_TransformPers::Apply (const Handle(Graphic3d_Camera)& theCamera, aWorldView.SetValue (2, 2, aRotMat.GetColumn (2).z()); } + if (IsAxial()) + { + Graphic3d_TransformUtils::Scale (aWorldView, + 1.0 / theCamera->AxialScale().X(), + 1.0 / theCamera->AxialScale().Y(), + 1.0 / theCamera->AxialScale().Z()); + } + if ((myMode & Graphic3d_TMF_ZoomPers) != 0) { // lock zooming diff --git a/src/ViewerTest/ViewerTest.cxx b/src/ViewerTest/ViewerTest.cxx index 43aced25af..dced0cf3f9 100644 --- a/src/ViewerTest/ViewerTest.cxx +++ b/src/ViewerTest/ViewerTest.cxx @@ -4798,6 +4798,14 @@ inline Standard_Boolean parseTrsfPersFlag (const TCollection_AsciiString& theFla { theFlags = Graphic3d_TMF_TriedronPers; } + else if (theFlagString == "axial") + { + theFlags = Graphic3d_TMF_AxialScalePers; + } + else if (theFlagString == "zoomaxial") + { + theFlags = Graphic3d_TMF_AxialZoomPers; + } else if (theFlagString == "none") { theFlags = Graphic3d_TMF_None; @@ -6648,7 +6656,7 @@ If last 3 optional parameters are not set prints numbers of U-, V- isolines and addCmd ("vdisplay", VDisplay2, /* [vdisplay] */ R"( vdisplay [-noupdate|-update] [-mutable] [-neutral] - [-trsfPers {zoom|rotate|zoomRotate|trihedron|none}=none] + [-trsfPers {zoom|rotate|zoomRotate|trihedron|axial|zoomaxial|none}=none] [-trsfPersPos X Y [Z]] [-3d] [-2d|-trihedron [{top|bottom|left|right|topLeft |topRight|bottomLeft|bottomRight} diff --git a/tests/v3d/manipulator/bug33514 b/tests/v3d/manipulator/bug33514 new file mode 100644 index 0000000000..60a2ecf420 --- /dev/null +++ b/tests/v3d/manipulator/bug33514 @@ -0,0 +1,53 @@ +puts "========" +puts "0033514: Visualization - Scaled view twists zoom persistence objects" +puts "========" +puts "" + +pload MODELING VISUALIZATION +vinit +box b 10 10 10 +vdisplay b +vfit +vsetdispmode 1 +vmanipulator vm -attach b +vscale 1 3 10 +vviewparams -scale 6.28866 -proj 0.57735 -0.57735 0.57735 -up -0.408248 0.408248 0.816497 -at 0 10 30 + + +set color_1 [vreadpixel 235 170 -rgb -name] +set color_2 [vreadpixel 223 155 -rgb -name] +set color_3 [vreadpixel 235 155 -rgb -name] + +if {$color_1 != "RED3"} { + puts "ERROR: trihedron does not maintain position" + puts " additional investigation is needed" + puts " expected color is: RED3" + puts " current color is: $color_1" +} + +if {$color_2 != "BLUE3"} { + puts "ERROR: trihedron does not maintain position" + puts " additional investigation is needed" + puts " expected color is: BLUE3" + puts " current color is: $color_2" +} + +if {$color_3 != "GREEN3"} { + puts "ERROR: trihedron does not maintain position" + puts " additional investigation is needed" + puts " expected color is: GREEN3" + puts " current color is: $color_3" +} + +vdump $imagedir/${casename}.png + +vclear +box b 10 10 10 +vdisplay b +vfit +vsetdispmode 1 +vmanipulator vm -attach b -zoomable 1 +vscale 1 3 10 +vviewparams -scale 4.28866 -proj 0.57735 -0.57735 0.57735 -up -0.408248 0.408248 0.816497 -at 0 10 30 + +vdump $imagedir/${casename}_zoomable.png diff --git a/tests/v3d/trihedron/bug27832 b/tests/v3d/trihedron/bug27832 new file mode 100644 index 0000000000..e8ae56dc4f --- /dev/null +++ b/tests/v3d/trihedron/bug27832 @@ -0,0 +1,46 @@ +puts "========" +puts "0027832: Visualization - Scaled zbuffer trihedron" +puts "========" +puts "" + +pload MODELING VISUALIZATION +vinit +box b 10 10 10 +vdisplay b +vfit +vsetdispmode 1 +vzbufftrihedron -on +#draw initial picture of box without visual scale +vdump $imagedir/${casename}_unscaled.png + +#draw picture of box after visual scale +#and zoomed out +vscale 1 3 10 +vzoom 1.0 + +set color_1 [vreadpixel 55 360 -rgb -name] +set color_2 [vreadpixel 50 350 -rgb -name] +set color_3 [vreadpixel 55 355 -rgb -name] + +if {$color_1 != "RED3"} { + puts "ERROR: trihedron does not maintain position" + puts " additional investigation is needed" + puts " expected color is: RED3" + puts " current color is: $color_1" +} + +if {$color_2 != "BLUE3"} { + puts "ERROR: trihedron does not maintain position" + puts " additional investigation is needed" + puts " expected color is: BLUE3" + puts " current color is: $color_2" +} + +if {$color_3 != "GREEN3"} { + puts "ERROR: trihedron does not maintain position" + puts " additional investigation is needed" + puts " expected color is: GREEN3" + puts " current color is: $color_3" +} + +vdump $imagedir/${casename}_scaled.png From ad9840d4d47c96fbdfab7fc30b439d67e1d1d722 Mon Sep 17 00:00:00 2001 From: drochalo Date: Thu, 7 Mar 2024 11:38:36 +0000 Subject: [PATCH 565/639] 0033533: Visualization - possibility to redefine Graphic3d_TransformPers Split template method apply and moved calculations to virtual method. --- src/Graphic3d/Graphic3d_TransformPers.hxx | 309 +++++++++++----------- 1 file changed, 161 insertions(+), 148 deletions(-) diff --git a/src/Graphic3d/Graphic3d_TransformPers.hxx b/src/Graphic3d/Graphic3d_TransformPers.hxx index 36dc3636a1..20835744da 100644 --- a/src/Graphic3d/Graphic3d_TransformPers.hxx +++ b/src/Graphic3d/Graphic3d_TransformPers.hxx @@ -345,6 +345,163 @@ public: const gp_Pnt* theAnchor = NULL, const Standard_Boolean theToApplyProjPers = true) const; + //! Perform computations for applying transformation persistence on specified matrices. + //! @param theCamera [in] camera definition + //! @param theViewportWidth [in] viewport width + //! @param theViewportHeight [in] viewport height + //! @param theAnchor [in] if not NULL, overrides anchor point + virtual NCollection_Mat4 ComputeApply (Handle(Graphic3d_Camera)& theCamera, + const Standard_Integer theViewportWidth, + const Standard_Integer theViewportHeight, + const gp_Pnt* theAnchor = NULL) const + { + (void)theViewportWidth; + Handle(Graphic3d_Camera) aProxyCamera = theCamera; + if (IsOrthoPers() && !aProxyCamera->IsOrthographic()) + { + aProxyCamera = new Graphic3d_Camera(*theCamera); // If OrthoPers, copy camera and set to orthographic projection + aProxyCamera->SetProjectionType (Graphic3d_Camera::Projection_Orthographic); + } + + NCollection_Mat4 aWorldView = aProxyCamera->OrientationMatrix(); + + // use total size when tiling is active + const Standard_Integer aVPSizeY = aProxyCamera->Tile().IsValid() ? aProxyCamera->Tile().TotalSize.y() : theViewportHeight; + + // a small enough jitter compensation offset + // to avoid image dragging within single pixel in corner cases + const Standard_Real aJitterComp = 0.001; + if ((myMode & Graphic3d_TMF_TriedronPers) != 0) + { + // reset Z focus for trihedron persistence + const Standard_Real aFocus = aProxyCamera->IsOrthographic() + ? aProxyCamera->Distance() + : (aProxyCamera->ZFocusType() == Graphic3d_Camera::FocusType_Relative + ? Standard_Real(aProxyCamera->ZFocus() * aProxyCamera->Distance()) + : Standard_Real(aProxyCamera->ZFocus())); + + // scale factor to pixels + const gp_XYZ aViewDim = aProxyCamera->ViewDimensions (aFocus); + const Standard_Real aScale = Abs(aViewDim.Y()) / Standard_Real(aVPSizeY); + const gp_Dir aForward = aProxyCamera->Direction(); + gp_XYZ aCenter = aProxyCamera->Center().XYZ() + aForward.XYZ() * (aFocus - aProxyCamera->Distance()); + if ((myParams.Params2d.Corner & (Aspect_TOTP_LEFT | Aspect_TOTP_RIGHT)) != 0) + { + const Standard_Real anOffsetX = (Standard_Real(myParams.Params2d.OffsetX) + aJitterComp) * aScale; + const gp_Dir aSide = aForward.Crossed (aProxyCamera->Up()); + const gp_XYZ aDeltaX = aSide.XYZ() * (Abs(aViewDim.X()) * aProxyCamera->NDC2dOffsetX() - anOffsetX); + if ((myParams.Params2d.Corner & Aspect_TOTP_RIGHT) != 0) + { + aCenter += aDeltaX; + } + else + { + aCenter -= aDeltaX; + } + } + if ((myParams.Params2d.Corner & (Aspect_TOTP_TOP | Aspect_TOTP_BOTTOM)) != 0) + { + const Standard_Real anOffsetY = (Standard_Real(myParams.Params2d.OffsetY) + aJitterComp) * aScale; + const gp_XYZ aDeltaY = aProxyCamera->Up().XYZ() * (Abs(aViewDim.Y()) * aProxyCamera->NDC2dOffsetY() - anOffsetY); + if ((myParams.Params2d.Corner & Aspect_TOTP_TOP) != 0) + { + aCenter += aDeltaY; + } + else + { + aCenter -= aDeltaY; + } + } + Graphic3d_TransformUtils::Scale (aWorldView, + 1.0 / theCamera->AxialScale().X(), + 1.0 / theCamera->AxialScale().Y(), + 1.0 / theCamera->AxialScale().Z()); + Graphic3d_TransformUtils::Translate (aWorldView, aCenter.X(), aCenter.Y(), aCenter.Z()); + Graphic3d_TransformUtils::Scale (aWorldView, aScale, aScale, aScale); + } + else if ((myMode & Graphic3d_TMF_2d) != 0) + { + const Standard_Real aFocus = aProxyCamera->IsOrthographic() + ? aProxyCamera->Distance() + : (aProxyCamera->ZFocusType() == Graphic3d_Camera::FocusType_Relative + ? Standard_Real(aProxyCamera->ZFocus() * aProxyCamera->Distance()) + : Standard_Real(aProxyCamera->ZFocus())); + + // scale factor to pixels + const gp_XYZ aViewDim = aProxyCamera->ViewDimensions (aFocus); + const Standard_Real aScale = Abs(aViewDim.Y()) / Standard_Real(aVPSizeY); + gp_XYZ aCenter (0.0, 0.0, -aFocus); + if ((myParams.Params2d.Corner & (Aspect_TOTP_LEFT | Aspect_TOTP_RIGHT)) != 0) + { + aCenter.SetX (-aViewDim.X() * aProxyCamera->NDC2dOffsetX() + (Standard_Real(myParams.Params2d.OffsetX) + aJitterComp) * aScale); + if ((myParams.Params2d.Corner & Aspect_TOTP_RIGHT) != 0) + { + aCenter.SetX (-aCenter.X()); + } + } + if ((myParams.Params2d.Corner & (Aspect_TOTP_TOP | Aspect_TOTP_BOTTOM)) != 0) + { + aCenter.SetY (-aViewDim.Y() * aProxyCamera->NDC2dOffsetY() + (Standard_Real(myParams.Params2d.OffsetY) + aJitterComp) * aScale); + if ((myParams.Params2d.Corner & Aspect_TOTP_TOP) != 0) + { + aCenter.SetY (-aCenter.Y()); + } + } + + aWorldView.InitIdentity(); + Graphic3d_TransformUtils::Translate (aWorldView, aCenter.X(), aCenter.Y(), aCenter.Z()); + Graphic3d_TransformUtils::Scale (aWorldView, aScale, aScale, aScale); + } + else if ((myMode & Graphic3d_TMF_CameraPers) != 0) + { + aWorldView.InitIdentity(); + } + else + { + // Compute reference point for transformation in untransformed projection space. + if (theAnchor != NULL) + { + Graphic3d_TransformUtils::Translate (aWorldView, theAnchor->X(), theAnchor->Y(), theAnchor->Z()); + } + else + { + Graphic3d_TransformUtils::Translate (aWorldView, myParams.Params3d.PntX, myParams.Params3d.PntY, myParams.Params3d.PntZ); + } + + if ((myMode & Graphic3d_TMF_RotatePers) != 0) + { + NCollection_Mat3 aRotMat = persistentRotationMatrix (theCamera, theViewportWidth, theViewportHeight); + + aWorldView.SetValue (0, 0, aRotMat.GetColumn (0).x()); + aWorldView.SetValue (1, 0, aRotMat.GetColumn (0).y()); + aWorldView.SetValue (2, 0, aRotMat.GetColumn (0).z()); + + aWorldView.SetValue (0, 1, aRotMat.GetColumn (1).x()); + aWorldView.SetValue (1, 1, aRotMat.GetColumn (1).y()); + aWorldView.SetValue (2, 1, aRotMat.GetColumn (1).z()); + + aWorldView.SetValue (0, 2, aRotMat.GetColumn (2).x()); + aWorldView.SetValue (1, 2, aRotMat.GetColumn (2).y()); + aWorldView.SetValue (2, 2, aRotMat.GetColumn (2).z()); + } + if (IsAxial()) + { + Graphic3d_TransformUtils::Scale (aWorldView, + 1.0 / theCamera->AxialScale().X(), + 1.0 / theCamera->AxialScale().Y(), + 1.0 / theCamera->AxialScale().Z()); + } + if ((myMode & Graphic3d_TMF_ZoomPers) != 0) + { + // lock zooming + Standard_Real aScale = persistentScale (aProxyCamera, theViewportWidth, theViewportHeight); + Graphic3d_TransformUtils::Scale (aWorldView, aScale, aScale, aScale); + } + } + theCamera = aProxyCamera; + return aWorldView; + } + //! Dumps the content of me into the stream Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const; @@ -396,158 +553,14 @@ void Graphic3d_TransformPers::Apply (const Handle(Graphic3d_Camera)& theCamera, const gp_Pnt* theAnchor, const Standard_Boolean theToApplyProjPers) const { - (void )theViewportWidth; - if (myMode == Graphic3d_TMF_None - || theViewportHeight == 0) + (void)theViewportWidth; + if (myMode == Graphic3d_TMF_None || theViewportHeight == 0) { return; } - Handle(Graphic3d_Camera) aCamera = theCamera; - if (IsOrthoPers() && !aCamera->IsOrthographic()) - { - aCamera = new Graphic3d_Camera(*theCamera); // If OrthoPers, copy camera and set to orthographic projection - aCamera->SetProjectionType (Graphic3d_Camera::Projection_Orthographic); - } - - NCollection_Mat4 aWorldView = aCamera->OrientationMatrix(); - - // use total size when tiling is active - const Standard_Integer aVPSizeY = aCamera->Tile().IsValid() ? aCamera->Tile().TotalSize.y() : theViewportHeight; - - // a small enough jitter compensation offset - // to avoid image dragging within single pixel in corner cases - const Standard_Real aJitterComp = 0.001; - if ((myMode & Graphic3d_TMF_TriedronPers) != 0) - { - // reset Z focus for trihedron persistence - const Standard_Real aFocus = aCamera->IsOrthographic() - ? aCamera->Distance() - : (aCamera->ZFocusType() == Graphic3d_Camera::FocusType_Relative - ? Standard_Real(aCamera->ZFocus() * aCamera->Distance()) - : Standard_Real(aCamera->ZFocus())); - - // scale factor to pixels - const gp_XYZ aViewDim = aCamera->ViewDimensions (aFocus); - const Standard_Real aScale = Abs(aViewDim.Y()) / Standard_Real(aVPSizeY); - const gp_Dir aForward = aCamera->Direction(); - gp_XYZ aCenter = aCamera->Center().XYZ() + aForward.XYZ() * (aFocus - aCamera->Distance()); - if ((myParams.Params2d.Corner & (Aspect_TOTP_LEFT | Aspect_TOTP_RIGHT)) != 0) - { - const Standard_Real anOffsetX = (Standard_Real(myParams.Params2d.OffsetX) + aJitterComp) * aScale; - const gp_Dir aSide = aForward.Crossed (aCamera->Up()); - const gp_XYZ aDeltaX = aSide.XYZ() * (Abs(aViewDim.X()) * aCamera->NDC2dOffsetX() - anOffsetX); - if ((myParams.Params2d.Corner & Aspect_TOTP_RIGHT) != 0) - { - aCenter += aDeltaX; - } - else - { - aCenter -= aDeltaX; - } - } - if ((myParams.Params2d.Corner & (Aspect_TOTP_TOP | Aspect_TOTP_BOTTOM)) != 0) - { - const Standard_Real anOffsetY = (Standard_Real(myParams.Params2d.OffsetY) + aJitterComp) * aScale; - const gp_XYZ aDeltaY = aCamera->Up().XYZ() * (Abs(aViewDim.Y()) * aCamera->NDC2dOffsetY() - anOffsetY); - if ((myParams.Params2d.Corner & Aspect_TOTP_TOP) != 0) - { - aCenter += aDeltaY; - } - else - { - aCenter -= aDeltaY; - } - } - - Graphic3d_TransformUtils::Scale (aWorldView, - 1.0 / theCamera->AxialScale().X(), - 1.0 / theCamera->AxialScale().Y(), - 1.0 / theCamera->AxialScale().Z()); - Graphic3d_TransformUtils::Translate (aWorldView, aCenter.X(), aCenter.Y(), aCenter.Z()); - Graphic3d_TransformUtils::Scale (aWorldView, aScale, aScale, aScale); - } - else if ((myMode & Graphic3d_TMF_2d) != 0) - { - const Standard_Real aFocus = aCamera->IsOrthographic() - ? aCamera->Distance() - : (aCamera->ZFocusType() == Graphic3d_Camera::FocusType_Relative - ? Standard_Real(aCamera->ZFocus() * aCamera->Distance()) - : Standard_Real(aCamera->ZFocus())); - - // scale factor to pixels - const gp_XYZ aViewDim = aCamera->ViewDimensions (aFocus); - const Standard_Real aScale = Abs(aViewDim.Y()) / Standard_Real(aVPSizeY); - gp_XYZ aCenter (0.0, 0.0, -aFocus); - if ((myParams.Params2d.Corner & (Aspect_TOTP_LEFT | Aspect_TOTP_RIGHT)) != 0) - { - aCenter.SetX (-aViewDim.X() * aCamera->NDC2dOffsetX() + (Standard_Real(myParams.Params2d.OffsetX) + aJitterComp) * aScale); - if ((myParams.Params2d.Corner & Aspect_TOTP_RIGHT) != 0) - { - aCenter.SetX (-aCenter.X()); - } - } - if ((myParams.Params2d.Corner & (Aspect_TOTP_TOP | Aspect_TOTP_BOTTOM)) != 0) - { - aCenter.SetY (-aViewDim.Y() * aCamera->NDC2dOffsetY() + (Standard_Real(myParams.Params2d.OffsetY) + aJitterComp) * aScale); - if ((myParams.Params2d.Corner & Aspect_TOTP_TOP) != 0) - { - aCenter.SetY (-aCenter.Y()); - } - } - - aWorldView.InitIdentity(); - Graphic3d_TransformUtils::Translate (aWorldView, aCenter.X(), aCenter.Y(), aCenter.Z()); - Graphic3d_TransformUtils::Scale (aWorldView, aScale, aScale, aScale); - } - else if ((myMode & Graphic3d_TMF_CameraPers) != 0) - { - aWorldView.InitIdentity(); - } - else - { - // Compute reference point for transformation in untransformed projection space. - if (theAnchor != NULL) - { - Graphic3d_TransformUtils::Translate (aWorldView, theAnchor->X(), theAnchor->Y(), theAnchor->Z()); - } - else - { - Graphic3d_TransformUtils::Translate (aWorldView, myParams.Params3d.PntX, myParams.Params3d.PntY, myParams.Params3d.PntZ); - } - - if ((myMode & Graphic3d_TMF_RotatePers) != 0) - { - NCollection_Mat3 aRotMat = persistentRotationMatrix (theCamera, theViewportWidth, theViewportHeight); - - aWorldView.SetValue (0, 0, aRotMat.GetColumn (0).x()); - aWorldView.SetValue (1, 0, aRotMat.GetColumn (0).y()); - aWorldView.SetValue (2, 0, aRotMat.GetColumn (0).z()); - - aWorldView.SetValue (0, 1, aRotMat.GetColumn (1).x()); - aWorldView.SetValue (1, 1, aRotMat.GetColumn (1).y()); - aWorldView.SetValue (2, 1, aRotMat.GetColumn (1).z()); - - aWorldView.SetValue (0, 2, aRotMat.GetColumn (2).x()); - aWorldView.SetValue (1, 2, aRotMat.GetColumn (2).y()); - aWorldView.SetValue (2, 2, aRotMat.GetColumn (2).z()); - } - - if (IsAxial()) - { - Graphic3d_TransformUtils::Scale (aWorldView, - 1.0 / theCamera->AxialScale().X(), - 1.0 / theCamera->AxialScale().Y(), - 1.0 / theCamera->AxialScale().Z()); - } - - if ((myMode & Graphic3d_TMF_ZoomPers) != 0) - { - // lock zooming - Standard_Real aScale = persistentScale (aCamera, theViewportWidth, theViewportHeight); - Graphic3d_TransformUtils::Scale (aWorldView, aScale, aScale, aScale); - } - } + Handle(Graphic3d_Camera) aCamera = new Graphic3d_Camera(*theCamera); + NCollection_Mat4 aWorldView = ComputeApply (aCamera, theViewportWidth, theViewportHeight, theAnchor); if (!theCamera->IsOrthographic() && IsOrthoPers() && theToApplyProjPers) { From fc51ce503e793ac5fb784f48f4419d556ba55f31 Mon Sep 17 00:00:00 2001 From: drochalo Date: Wed, 17 Jan 2024 10:36:42 +0000 Subject: [PATCH 566/639] 0030484: Visualization, SelectMgr_ViewerSelector - Graphic3d_TMF_2d persistence sorting issues Added property to SelectableObject for selection focused on display priority. Modified SelectMgr_ViewerSelector CompareResults based on the focus priority property. Added display priority to the sorting criterion Added tests for multiple types of sensitive entities. Modified vpriority command to change an object's selection priority. --- src/SelectMgr/SelectMgr_SortCriterion.hxx | 42 ++++--- src/SelectMgr/SelectMgr_ViewerSelector.cxx | 36 ++++-- src/ViewerTest/ViewerTest_ViewerCommands.cxx | 78 ++++++++++++ tests/vselect/bugs/bug30484_1 | 51 ++++++++ tests/vselect/bugs/bug30484_2 | 121 +++++++++++++++++++ tests/vselect/bugs/bug30484_3 | 54 +++++++++ tests/vselect/bugs/bug30484_4 | 37 ++++++ 7 files changed, 395 insertions(+), 24 deletions(-) create mode 100644 tests/vselect/bugs/bug30484_1 create mode 100644 tests/vselect/bugs/bug30484_2 create mode 100644 tests/vselect/bugs/bug30484_3 create mode 100644 tests/vselect/bugs/bug30484_4 diff --git a/src/SelectMgr/SelectMgr_SortCriterion.hxx b/src/SelectMgr/SelectMgr_SortCriterion.hxx index 183965efc5..689f6a7bf6 100644 --- a/src/SelectMgr/SelectMgr_SortCriterion.hxx +++ b/src/SelectMgr/SelectMgr_SortCriterion.hxx @@ -28,14 +28,16 @@ class SelectMgr_SortCriterion public: Handle(Select3D_SensitiveEntity) Entity; //!< detected entity - gp_Pnt Point; //!< 3D point - Graphic3d_Vec3 Normal; //!< surface normal or 0 vector if undefined - Standard_Real Depth; //!< distance from the view plane to the entity - Standard_Real MinDist; //!< distance from the clicked point to the entity on the view plane - Standard_Real Tolerance; //!< tolerance used for selecting candidates - Standard_Integer Priority; //!< selection priority - Standard_Integer ZLayerPosition; //!< ZLayer rendering order index, stronger than a depth - Standard_Integer NbOwnerMatches; //!< overall number of entities collected for the same owner + gp_Pnt Point; //!< 3D point + Graphic3d_Vec3 Normal; //!< surface normal or 0 vector if undefined + Standard_Real Depth; //!< distance from the view plane to the entity + Standard_Real MinDist; //!< distance from the clicked point to the entity on the view plane + Standard_Real Tolerance; //!< tolerance used for selecting candidates + Standard_Integer SelectionPriority; //!< selection priority + Standard_Integer DisplayPriority; //!< display priority + Standard_Integer ZLayerPosition; //!< ZLayer rendering order index, stronger than a depth + Standard_Integer NbOwnerMatches; //!< overall number of entities collected for the same owner + Standard_Boolean IsPreferPriority; //!< flag to signal comparison to be done over priority public: DEFINE_STANDARD_ALLOC @@ -45,9 +47,11 @@ public: : Depth (0.0), MinDist (0.0), Tolerance(0.0), - Priority (0), + SelectionPriority (0), + DisplayPriority(0), ZLayerPosition (0), - NbOwnerMatches (0) {} + NbOwnerMatches (0), + IsPreferPriority (Standard_False) {} //! Compare with another item by depth, priority and minDist. bool IsCloserDepth (const SelectMgr_SortCriterion& theOther) const @@ -86,13 +90,18 @@ public: } // if two objects have similar depth, select the one with higher priority - if (Priority > theOther.Priority) + if (SelectionPriority > theOther.SelectionPriority) + { + return true; + } + + if (DisplayPriority > theOther.DisplayPriority) { return true; } // if priorities are equal, one closest to the mouse - return Priority == theOther.Priority + return SelectionPriority == theOther.SelectionPriority && MinDist < theOther.MinDist; } @@ -105,13 +114,14 @@ public: return ZLayerPosition > theOther.ZLayerPosition; } - if (Priority > theOther.Priority) + if (SelectionPriority != theOther.SelectionPriority) { - return true; + return SelectionPriority > theOther.SelectionPriority; } - else if (Priority != theOther.Priority) + + if (DisplayPriority != theOther.DisplayPriority) { - return false; + return DisplayPriority > theOther.DisplayPriority; } //if (Abs (Depth - theOther.Depth) <= (Tolerance + theOther.Tolerance)) diff --git a/src/SelectMgr/SelectMgr_ViewerSelector.cxx b/src/SelectMgr/SelectMgr_ViewerSelector.cxx index 6c23ee7ee9..28609bb7d9 100644 --- a/src/SelectMgr/SelectMgr_ViewerSelector.cxx +++ b/src/SelectMgr/SelectMgr_ViewerSelector.cxx @@ -16,6 +16,7 @@ #include +#include #include #include #include @@ -54,13 +55,13 @@ namespace { const SelectMgr_SortCriterion& anElemLeft = myMapOfCriterion->FindFromIndex (theLeft); const SelectMgr_SortCriterion& anElemRight = myMapOfCriterion->FindFromIndex (theRight); - if (myToPreferClosest) + if ((anElemLeft.IsPreferPriority && anElemRight.IsPreferPriority) || !myToPreferClosest) { - return anElemLeft.IsCloserDepth (anElemRight); + return anElemLeft.IsHigherPriority (anElemRight); } else { - return anElemLeft.IsHigherPriority (anElemRight); + return anElemLeft.IsCloserDepth (anElemRight); } } @@ -270,13 +271,32 @@ void SelectMgr_ViewerSelector::checkOverlap (const Handle(Select3D_SensitiveEnti { return; } - SelectMgr_SortCriterion aCriterion; myZLayerOrderMap.Find (!aSelectable.IsNull() ? aSelectable->ZLayer() : Graphic3d_ZLayerId_Default, aCriterion.ZLayerPosition); - aCriterion.Entity = theEntity; - aCriterion.Priority = anOwner->Priority(); - aCriterion.Depth = aPickResult.Depth(); - aCriterion.MinDist = aPickResult.DistToGeomCenter(); + aCriterion.Entity = theEntity; + aCriterion.SelectionPriority = anOwner->Priority(); + aCriterion.Depth = aPickResult.Depth(); + aCriterion.MinDist = aPickResult.DistToGeomCenter(); + Handle(AIS_InteractiveObject) anObj = Handle(AIS_InteractiveObject)::DownCast (aSelectable); + if (!aSelectable.IsNull()) + { + if (aSelectable->Presentations().Size() > 0 && !aSelectable->TransformPersistence().IsNull()) + { + if (aSelectable->TransformPersistence()->Mode() == Graphic3d_TMF_2d) + { + aCriterion.IsPreferPriority = Standard_True; + aCriterion.DisplayPriority = Graphic3d_DisplayPriority_INVALID; + if (!anObj.IsNull()) + { + Handle(Prs3d_Presentation) aPrs = anObj->Presentation(); + if (!aPrs.IsNull()) + { + aCriterion.DisplayPriority = aPrs->DisplayPriority(); + } + } + } + } + } if (SelectMgr_SortCriterion* aPrevCriterion = mystored.ChangeSeek (anOwner)) { diff --git a/src/ViewerTest/ViewerTest_ViewerCommands.cxx b/src/ViewerTest/ViewerTest_ViewerCommands.cxx index d700adce80..630ac437f4 100644 --- a/src/ViewerTest/ViewerTest_ViewerCommands.cxx +++ b/src/ViewerTest/ViewerTest_ViewerCommands.cxx @@ -6390,6 +6390,79 @@ static Standard_Integer VSelect (Draw_Interpretor& , return 0; } +//======================================================================= +//function : VSelectPriority +//purpose : Prints or sets the selection priority for an object +//======================================================================= +static Standard_Integer VSelectPriority (Draw_Interpretor& theDI, + Standard_Integer theNbArgs, + const char** theArgVec) +{ + Handle(AIS_InteractiveContext) aContext = ViewerTest::GetAISContext(); + ViewerTest_AutoUpdater anUpdateTool (aContext, ViewerTest::CurrentView()); + if (aContext.IsNull()) + { + Message::SendFail("Error: no active viewer"); + return 1; + } + + TCollection_AsciiString aLastArg(theArgVec[theNbArgs - 1]); + Standard_Integer aPriority = -1; + Standard_Integer aNbArgs = theNbArgs; + if (aNbArgs < 2 || aNbArgs > 3) + { + Message::SendFail("Syntax error: wrong number of arguments! See usage:"); + theDI.PrintHelp (theArgVec[0]); + return 1; + } + + if (aLastArg.IsIntegerValue()) + { + TCollection_AsciiString aFocusArg(theArgVec[1]); + aPriority = aLastArg.IntegerValue(); + --aNbArgs; + if (aPriority < 0) + { + Message::SendFail() << "Syntax error: the specified selection priority value '" << aLastArg << "' is invalid ]"; + return 1; + } + } + else + { + anUpdateTool.Invalidate(); + } + + for (Standard_Integer anArgIter = 1; anArgIter < aNbArgs; ++anArgIter) + { + TCollection_AsciiString aName(theArgVec[anArgIter]); + Handle(AIS_InteractiveObject) anIObj; + GetMapOfAIS().Find2 (aName, anIObj); + if (anIObj.IsNull()) + { + Message::SendFail() << "Error: the object '" << theArgVec[1] << "' is not displayed"; + return 1; + } + + Handle(SelectMgr_EntityOwner) anOwner = anIObj->GlobalSelOwner(); + if (!anOwner.IsNull()) + { + if (aPriority == Graphic3d_DisplayPriority_INVALID) + { + theDI << anOwner->Priority() << " "; + } + else + { + anOwner->SetPriority (aPriority); + } + } + else + { + Message::SendFail() << "Error: the object '" << theArgVec[1] << "' is does not have a selection priority attached."; + return 1; + } + } + return 0; +} //======================================================================= //function : VMoveTo //purpose : Emulates cursor movement to defined pixel position @@ -14431,6 +14504,11 @@ Emulate different types of selection: 5) Selection scheme replace, replaceextra, xor, add or remove (replace by default). )" /* [vselect] */); +addCmd("vselectpriority", VSelectPriority, /* [vselectpriority] */ R"( +vselectpriority name [value] +Prints or sets the selection priority for an object. +)" /* [vselectpriority] */); + addCmd ("vmoveto", VMoveTo, /* [vmoveto] */ R"( vmoveto [x y] [-reset] Emulate cursor movement to pixel position (x,y). diff --git a/tests/vselect/bugs/bug30484_1 b/tests/vselect/bugs/bug30484_1 new file mode 100644 index 0000000000..2db672ed76 --- /dev/null +++ b/tests/vselect/bugs/bug30484_1 @@ -0,0 +1,51 @@ +puts "=============" +puts "0030484: Visualization - 2d persistent: order of detection doesn't coincide with order of objects creation" +puts "=============" + +pload MODELING VISUALIZATION +vclear +vinit +vselprops dynHighlight -dispMode 1 -color WHITE +# compare boxes displayed with 2d transform persistence +# with the same properties (zlayer, depth and priority) +box box_1 75 -250 0 200 200 200 +box box_2 175 -300 0 200 200 200 +vdisplay box_1 -2d topLeft -top -dispmode 1 +vsetmaterial box_1 PLASTIC +vsetcolor box_1 DEEPPINK2 +vdisplay box_2 -2d topLeft -top -dispmode 1 +vsetmaterial box_2 PLASTIC +vsetcolor box_2 PALEGREEN2 +# verify colors +if { [vreadpixel 205 170 rgb name] != "DARKSEAGREEN4" } { puts "Error: selected pixel should be green." } +if { [vreadpixel 150 170 rgb name] != "MAROON" } { puts "Error: selected pixel should be maroon." } +vmoveto 205 170 +if { [vreadpixel 205 170 rgb name] != "WHITE" } { puts "Error: box_1 should be highlighted" } +# dump image +vdump $imagedir/${casename}_boxes_undefined.png + +# modify display priority and test selection based on display priority +# Set box_1 with higher priority +vmoveto 0 0 +vpriority -update box_1 5 +vpriority -update box_2 4 +# test if box_1 is selected by moving mouse close to +# edge close to box_2 +vmoveto 270 170 +if { [vreadpixel 100 170 rgb name] != "WHITE" } { puts "Error: box_1 should be highlighted" } +vdump $imagedir/${casename}_highlight_box1.png +vmoveto 280 170 +if { [vreadpixel 350 170 rgb name] != "WHITE" } { puts "Error: box_2 should be highlighted" } +vdump $imagedir/${casename}_highlight_box2.png + +# modify selection priority and test selection based on selection priority +# Set box_2 with higher priority +vmoveto 0 0 +vselectpriority box_1 4 +vselectpriority box_2 5 +vmoveto 180 170 +if { [vreadpixel 350 170 rgb name] != "WHITE" } { puts "Error: box_2 should be highlighted" } +vdump $imagedir/${casename}_highlight_box1.png +vmoveto 170 170 +if { [vreadpixel 100 170 rgb name] != "WHITE" } { puts "Error: box_1 should be highlighted" } +vdump $imagedir/${casename}_highlight_box2.png diff --git a/tests/vselect/bugs/bug30484_2 b/tests/vselect/bugs/bug30484_2 new file mode 100644 index 0000000000..96db37d32e --- /dev/null +++ b/tests/vselect/bugs/bug30484_2 @@ -0,0 +1,121 @@ +puts "=============" +puts "0030484: Visualization - 2d persistent: order of detection doesn't coincide with order of objects creation" +puts "=============" + +pload MODELING VISUALIZATION +vclear +vinit +vselprops dynHighlight -dispMode 1 -color WHITE +# Compare behaviour in a scene with a quad (2 triangles) +# 4 segments on the edges and a circle on the center +vpoint pt1 75 -250 0 +vpoint pt2 275 -250 0 +vpoint pt3 275 -50 0 +vpoint pt4 75 -50 0 +vtriangle tri1 pt1 pt2 pt3 +vtriangle tri2 pt3 pt4 pt1 +vdisplay tri1 -2d topLeft -top -dispmode 1 +vdisplay tri2 -2d topLeft -top -dispmode 1 +vsetmaterial tri1 PLASTIC +vsetcolor tri1 ORANGE +vsetmaterial tri2 PLASTIC +vsetcolor tri2 ORANGE +vremove pt1 pt2 pt3 pt4 +vaspects -update tri1 -faceBoundaryDraw 1 +vaspects -update tri2 -faceBoundaryDraw 1 + +vdrawparray seg1 segments v 76 -249 0 c 1 0 0 v 274 -249 0 c 1 0 0 +vdrawparray seg2 segments v 274 -249 0 c 1 0 0 v 274 -51 0 c 1 0 0 +vdrawparray seg3 segments v 274 -51 0 c 1 0 0 v 76 -51 0 c 1 0 0 +vdrawparray seg4 segments v 76 -51 0 c 1 0 0 v 76 -249 0 c 1 0 0 +vdisplay seg1 -2d topLeft -top -dispmode 1 +vdisplay seg2 -2d topLeft -top -dispmode 1 +vdisplay seg3 -2d topLeft -top -dispmode 1 +vdisplay seg4 -2d topLeft -top -dispmode 1 +vsetmaterial seg1 PLASTIC +vsetmaterial seg2 PLASTIC +vsetmaterial seg3 PLASTIC +vsetmaterial seg4 PLASTIC +vsetcolor seg1 RED +vsetcolor seg2 RED +vsetcolor seg3 RED +vsetcolor seg4 RED + +vpoint pr1 170 -145 0 +vpoint pr2 180 -145 0 +vpoint pr3 180 -155 0 +vcircle circle1 pr1 pr2 pr3 1 +vdisplay circle1 -2d topLeft -top +vsetmaterial circle1 PLASTIC +vsetcolor circle1 BROWN3 +vremove pr1 pr2 pr3 +vaspects -update circle1 -faceBoundaryDraw 1 + +# dump image +vdump $imagedir/${casename}_quad_segments_circle.png +# test selection with undefined behaviour +vmoveto 75 150 +if { [vreadpixel 75 100 rgb name] != "WHITE" } { puts "Error: segment should be highlighted" } +vdump $imagedir/${casename}_undefined_segmenthighlight.png +vmoveto 100 150 +if { [vreadpixel 100 100 rgb name] != "WHITE" } { puts "Error: tri2 should be highlighted" } +vdump $imagedir/${casename}_undefined_tri2highlight.png +vmoveto 200 150 +if { [vreadpixel 200 200 rgb name] != "WHITE" } { puts "Error: tri1 should be highlighted" } +vdump $imagedir/${casename}_undefined_tri1highlight.png +vmoveto 175 150 +vdump $imagedir/${casename}_undefined_circle.png + +# change selection priority for each element and +# test selection priority focused selection +vselectpriority tri1 6 +vselectpriority tri2 6 +vselectpriority seg1 4 +vselectpriority seg2 4 +vselectpriority seg3 4 +vselectpriority seg4 4 +vselectpriority circle1 4 +vmoveto 175 150 +if { [vreadpixel 200 200 rgb name] != "WHITE" } { puts "Error: tri1 should be highlighted" } +# show image with display priority focused +vdump $imagedir/${casename}_quad_focused1.png +vmoveto 170 140 +if { [vreadpixel 100 100 rgb name] != "WHITE" } { puts "Error: tri2 should be highlighted" } +# show image with display priority focused +vdump $imagedir/${casename}_quad_focused2.png + +# test priority selection for circle +vmoveto 0 0 +vselectpriority tri1 4 +vselectpriority tri2 4 +vselectpriority seg1 4 +vselectpriority seg2 4 +vselectpriority seg3 4 +vselectpriority seg4 4 +vselectpriority circle1 6 +# show image with priority focused +vdump $imagedir/${casename}_circle_focused.png +vmoveto 175 150 +vselect +# show image with priority focused +vdump $imagedir/${casename}_circle_selected.png + +# test priority selection for segments +vmoveto 0 0 +vselect +vselectpriority tri1 4 +vselectpriority tri2 4 +vselectpriority seg1 6 +vselectpriority seg2 6 +vselectpriority seg3 6 +vselectpriority seg4 6 +vselectpriority circle1 4 + +vmoveto 175 250 +vdump $imagedir/${casename}_segment1_focused.png +vmoveto 276 150 +vdump $imagedir/${casename}_segment2_focused.png +vmoveto 175 49 +vdump $imagedir/${casename}_segment3_focused.png +vmoveto 75 150 +vdump $imagedir/${casename}_segment4_focused.png diff --git a/tests/vselect/bugs/bug30484_3 b/tests/vselect/bugs/bug30484_3 new file mode 100644 index 0000000000..081dc9429d --- /dev/null +++ b/tests/vselect/bugs/bug30484_3 @@ -0,0 +1,54 @@ +puts "=============" +puts "0030484: Visualization - 2d persistent: order of detection doesn't coincide with order of objects creation" +puts "=============" + +pload MODELING VISUALIZATION +vclear +vinit +vselprops dynHighlight -dispMode 1 -color WHITE +# Compare behaviour in a scene with a quad (2 triangles) +# and a point in the center +vpoint pt1 75 -250 0 +vpoint pt2 275 -250 0 +vpoint pt3 275 -50 0 +vpoint pt4 75 -50 0 +vtriangle tri1 pt1 pt2 pt3 +vtriangle tri2 pt3 pt4 pt1 +vdisplay tri1 -2d topLeft -top -dispmode 1 +vdisplay tri2 -2d topLeft -top -dispmode 1 +vsetmaterial tri1 PLASTIC +vsetcolor tri1 ORANGE +vsetmaterial tri2 PLASTIC +vsetcolor tri2 ORANGE +vremove pt1 pt2 pt3 pt4 +vaspects -update tri1 -faceBoundaryDraw 1 +vaspects -update tri2 -faceBoundaryDraw 1 + +vpoint p1 175 150 -2d +vdisplay p1 -2d topLeft -top -dispmode 1 + +# dump image +vdump $imagedir/${casename}_quad_point_undefined.png +vmoveto 175 150 +if { [vreadpixel 175 150 rgb name] != "CYAN" } { puts "Error: point should be highlighted" } +vdump $imagedir/${casename}_quad_point_onpoint.png +vmoveto 150 100 +vdump $imagedir/${casename}_quad_point_ontri2.png +vmoveto 200 200 +vdump $imagedir/${casename}_quad_point_ontri1.png + +# test selection priority +vmoveto 0 0 +vpriority -update tri1 4 +vpriority -update tri2 4 +vpriority -update p1 4 +vselectpriority tri1 6 +vselectpriority tri2 6 +vselectpriority p1 5 +vmoveto 175 150 +if { [vreadpixel 175 150 rgb name] == "CYAN" } { puts "Error: point should not be highlighted" } +vdump $imagedir/${casename}_quad_point_changedpriorityfocus.png +vmoveto 0 0 +vselectpriority p1 4 +vmoveto 175 150 +vdump $imagedir/${casename}_quad_point_reducedpointpriority.png diff --git a/tests/vselect/bugs/bug30484_4 b/tests/vselect/bugs/bug30484_4 new file mode 100644 index 0000000000..935d217661 --- /dev/null +++ b/tests/vselect/bugs/bug30484_4 @@ -0,0 +1,37 @@ +puts "=============" +puts "0030484: Visualization - 2d persistent: order of detection doesn't coincide with order of objects creation" +puts "=============" + +pload MODELING VISUALIZATION +vclear +vinit +vselprops dynHighlight -dispMode 1 -color WHITE +# Compare behaviour in a scene with two quads +# 1 from a box and another from primitive array +# quad primitive array only highlights in the corners +box box_1 75 -250 0 200 200 200 +vdisplay box_1 -2d topLeft -top -dispmode 1 +vsetmaterial box_1 PLASTIC +vsetcolor box_1 DEEPPINK2 + +vdrawparray quad1 quads v 175 -300 0 c 0 0 1 v 375 -300 0 c 0 0 1 v 375 -100 0 c 0 0 1 v 175 -100 0 c 0 0 1 +vdisplay quad1 -2d topLeft -top -dispmode 1 +vsetmaterial quad1 PLASTIC +vsetcolor quad1 PALEGREEN2 + +# dump image +vdump $imagedir/${casename}_box_quad_undefined.png +vmoveto 100 100 +vdump $imagedir/${casename}_box_quad_boxhighlight.png +vmoveto 376 100 +vdump $imagedir/${casename}_box_quad_quadhighlight.png + +#test selection priority +vmoveto 0 0 +vpriority -update box_1 6 +vpriority -update quad1 5 +vselectpriority box_1 5 +vselectpriority quad1 6 +vmoveto 175 99 +if { [vreadpixel 300 200 rgb name] != "WHITE" } { puts "Error: quad primitive should be highlighted" } +vdump $imagedir/${casename}_box_quad_selectionpriority_focused.png From 1db93f640ee46de9dec9051862df8a09fef44782 Mon Sep 17 00:00:00 2001 From: astromko Date: Wed, 17 Apr 2024 10:46:06 +0100 Subject: [PATCH 567/639] 0033146: Modeling Algorithms - 2D Offset with arc-lin approximation fails on open B-spline edge Added additional conditions to avoid crash. Added a test case. --- src/BRepFill/BRepFill_OffsetWire.cxx | 8 ++++---- tests/bugs/modalg_8/bug33146 | 10 ++++++++++ 2 files changed, 14 insertions(+), 4 deletions(-) create mode 100644 tests/bugs/modalg_8/bug33146 diff --git a/src/BRepFill/BRepFill_OffsetWire.cxx b/src/BRepFill/BRepFill_OffsetWire.cxx index befe34193c..ee611c1f09 100644 --- a/src/BRepFill/BRepFill_OffsetWire.cxx +++ b/src/BRepFill/BRepFill_OffsetWire.cxx @@ -926,7 +926,7 @@ void BRepFill_OffsetWire::PerformWithBiLo if (StartOnEdge) { Standard_Boolean Start = 1; Trim.AddOrConfuse(Start, E[0], E[1], Params); - if (Params.Length() == Vertices.Length()) + if (Params.Length() == Vertices.Length() && Params.Length() != 0) Vertices.SetValue(1,VS); else @@ -936,7 +936,7 @@ void BRepFill_OffsetWire::PerformWithBiLo if (EndOnEdge) { Standard_Boolean Start = 0; Trim.AddOrConfuse(Start, E[0], E[1], Params); - if (Params.Length() == Vertices.Length()) + if (Params.Length() == Vertices.Length() && Params.Length() != 0) Vertices.SetValue(Params.Length(),VE); else @@ -962,7 +962,7 @@ void BRepFill_OffsetWire::PerformWithBiLo // Storage of vertices on parallel edges. // fill MapBis and MapVerPar. //---------------------------------------------- - if (!Vertices.IsEmpty()) { + if (!Vertices.IsEmpty() && Params.Length() == Vertices.Length()) { for (k = 0; k <= 1; k++) { if (!MapBis.IsBound(E[k])) { MapBis .Bind(E[k],EmptySeq); @@ -1298,7 +1298,7 @@ void BRepFill_OffsetWire::UpdateDetromp (BRepFill_DataMapOfOrientedShapeListOfSh ii++; } - while (ii <= Vertices.Length()) { + while (ii <= Vertices.Length() && ii <= Params.Length()) { U2 = Params.Value(ii).X(); V2 = TopoDS::Vertex(Vertices.Value(ii)); diff --git a/tests/bugs/modalg_8/bug33146 b/tests/bugs/modalg_8/bug33146 new file mode 100644 index 0000000000..2c5bca48ee --- /dev/null +++ b/tests/bugs/modalg_8/bug33146 @@ -0,0 +1,10 @@ +puts "===============================================================" +puts "0033146: Modeling Algorithms - 2D Offset with arc-lin approximation fails on open B-spline edge" +puts "===============================================================" +puts "" + +pload MODELING +restore [locate_data_file bug33146.brep] a +wire a a +openoffset result a 1 1. -approx +checkview -display result_1 -2d -path ${imagedir}/${test_image}.png From 899108205130c440303459c059a8db0b2723e176 Mon Sep 17 00:00:00 2001 From: astromko Date: Fri, 17 May 2024 08:55:20 +0000 Subject: [PATCH 568/639] 0033156: Modeling Algorithms - Planar face creation problem Implemented suggested patch to avoid unnecessary replacement of a wire. Added the second test case. --- src/BRepLib/BRepLib_MakeFace.cxx | 22 ++++++++++++++++++---- tests/bugs/modalg_8/bug33156_2 | 21 +++++++++++++++++++++ tests/mkface/mkplane/bug33156 | 10 ---------- 3 files changed, 39 insertions(+), 14 deletions(-) create mode 100644 tests/bugs/modalg_8/bug33156_2 delete mode 100644 tests/mkface/mkplane/bug33156 diff --git a/src/BRepLib/BRepLib_MakeFace.cxx b/src/BRepLib/BRepLib_MakeFace.cxx index 632372c33b..ce7340bfe5 100644 --- a/src/BRepLib/BRepLib_MakeFace.cxx +++ b/src/BRepLib/BRepLib_MakeFace.cxx @@ -273,18 +273,32 @@ BRepLib_MakeFace::BRepLib_MakeFace(const TopoDS_Wire& W, aB.MakeWire (aW); TopoDS_Wire aWForw = W; + Standard_Boolean hasDegenerated = Standard_False; aWForw.Orientation (TopAbs_FORWARD); TopoDS_Iterator anIter (aWForw); for (; anIter.More(); anIter.Next()) { const TopoDS_Edge& aE = TopoDS::Edge (anIter.Value()); - if (!BRep_Tool::Degenerated (aE)) - aB.Add (aW, aE); + if (BRep_Tool::Degenerated(aE)) + { + hasDegenerated = Standard_True; + } + else + { + aB.Add(aW, aE); + } } - aW.Orientation (W.Orientation()); // return to original orient - aW.Closed (W.Closed()); + if (hasDegenerated) + { + aW.Orientation (W.Orientation()); // return to original orient + aW.Closed (W.Closed()); + } + else + { + aW = W; + } } else { diff --git a/tests/bugs/modalg_8/bug33156_2 b/tests/bugs/modalg_8/bug33156_2 new file mode 100644 index 0000000000..aa7c53da43 --- /dev/null +++ b/tests/bugs/modalg_8/bug33156_2 @@ -0,0 +1,21 @@ +puts "=============" +puts "0033156: Modeling Algorithms - Planar face creation problem" +puts "=============" + +pload MODELING +vertex v1 0 0 0 +vertex v2 10 0 0 +vertex v3 0 10 0 + +edge e1 v1 v2 +edge e2 v2 v3 +edge e3 v3 v1 + +wire w1 e1 e2 e3 +mkplane f1 w1 1 + +set state [issubshape w1 f1] + +if { [regexp "w1 is NOT sub-shape of f1" $state] == 1 } { + puts "Error : w1 is NOT sub-shape of f1" +} diff --git a/tests/mkface/mkplane/bug33156 b/tests/mkface/mkplane/bug33156 deleted file mode 100644 index b13453f689..0000000000 --- a/tests/mkface/mkplane/bug33156 +++ /dev/null @@ -1,10 +0,0 @@ -puts "=============" -puts "0033156: Modeling Algorithms - Planar face creation problem" -puts "=============" - -brestore [locate_data_file bug33156_face.brep] Face - -explode Face W -#Face_1 - -mkplane result Face_1 1 From 65d8eece350df6e92710f64687f2dc1cabb9edbd Mon Sep 17 00:00:00 2001 From: astromko Date: Fri, 17 May 2024 08:58:06 +0000 Subject: [PATCH 569/639] 0032964: Modeling Algorithms - 2d Offset sometimes 'split' straight edges Implemented avoiding force cut of an edge in case of simple edge (that contains just 1 curve). --- src/BRepFill/BRepFill_OffsetWire.cxx | 4 +++- tests/bugs/modalg_5/bug25704_6 | 2 +- tests/bugs/modalg_8/bug32964 | 14 ++++++++++++++ 3 files changed, 18 insertions(+), 2 deletions(-) create mode 100644 tests/bugs/modalg_8/bug32964 diff --git a/src/BRepFill/BRepFill_OffsetWire.cxx b/src/BRepFill/BRepFill_OffsetWire.cxx index ee611c1f09..dae07a5bb3 100644 --- a/src/BRepFill/BRepFill_OffsetWire.cxx +++ b/src/BRepFill/BRepFill_OffsetWire.cxx @@ -1198,7 +1198,9 @@ void BRepFill_OffsetWire::PrepareSpine() // Cut TopoDS_Shape aLocalShape = E.Oriented(TopAbs_FORWARD); // Modified by Sergey KHROMOV - Thu Nov 16 17:29:29 2000 Begin - if (nbEdges == 2 && nbResEdges == 0) + Handle(BRep_TEdge) TEdge = Handle(BRep_TEdge)::DownCast(E.TShape()); + const Standard_Integer aNumCurvesInEdge = TEdge->Curves().Size(); + if (nbEdges == 2 && nbResEdges == 0 && aNumCurvesInEdge > 1) ForcedCut = 1; // Modified by Sergey KHROMOV - Thu Nov 16 17:29:33 2000 End nbResEdges = CutEdge (TopoDS::Edge(aLocalShape), mySpine, ForcedCut, Cuts); diff --git a/tests/bugs/modalg_5/bug25704_6 b/tests/bugs/modalg_5/bug25704_6 index 64a98dafa8..e9e0e2abcd 100644 --- a/tests/bugs/modalg_5/bug25704_6 +++ b/tests/bugs/modalg_5/bug25704_6 @@ -17,7 +17,7 @@ if [catch { openoffset resoffset a 5 5 i } ] { checkshape result checksection result - checknbshapes result -vertex 4 -edge 3 -wire 1 -face 0 -shell 0 -solid 0 -compsolid 0 -compound 0 -shape 8 + checknbshapes result -vertex 3 -edge 2 -wire 1 -face 0 -shell 0 -solid 0 -compsolid 0 -compound 0 -shape 6 } smallview diff --git a/tests/bugs/modalg_8/bug32964 b/tests/bugs/modalg_8/bug32964 new file mode 100644 index 0000000000..a4f3009e81 --- /dev/null +++ b/tests/bugs/modalg_8/bug32964 @@ -0,0 +1,14 @@ +puts "=============" +puts "0032964: Modeling Algorithms - 2d Offset sometimes 'split' straight edges" +puts "=============" + +pload MODELING +vertex p1 -90 40 0 +vertex p2 40 40 0 +vertex p3 40 -90 0 +edge e1 p1 p2 +edge e2 p2 p3 +wire w1 e1 e2 +openoffset oo w1 1 40 +checknbshapes oo_1 -vertex 3 -edge 2 -wire 1 -shape 6 +checkview -display oo_1 -2d -path ${imagedir}/${test_image}.png From 4c8faa5e2dd0d3e4bd7039c908016d8204889c09 Mon Sep 17 00:00:00 2001 From: drochalo Date: Fri, 3 Nov 2023 10:48:11 +0000 Subject: [PATCH 570/639] 0032752: Visualization, TKOpenGl - extend V3d_View::ToPixMap() options with Z-layer Added option to dump only a selection of zlayer's content. Changed zlayers redraw and render method for selection of layers to render. Added filters for layer parsing. Modified vdump command. Added test with multiple dumps for comparison. Added option to dump shadow maps. --- src/Graphic3d/Graphic3d_BufferType.hxx | 9 +-- src/Graphic3d/Graphic3d_CView.cxx | 3 + src/Graphic3d/Graphic3d_CView.hxx | 38 ++++++++--- src/OpenGl/OpenGl_FrameBuffer.cxx | 8 +-- src/OpenGl/OpenGl_LayerFilter.hxx | 1 + src/OpenGl/OpenGl_LayerList.cxx | 32 +++++++--- src/OpenGl/OpenGl_LayerList.hxx | 3 +- src/OpenGl/OpenGl_View.cxx | 79 +++++++++++++++++++++-- src/OpenGl/OpenGl_View.hxx | 6 ++ src/V3d/V3d_ImageDumpOptions.hxx | 33 ++++++---- src/V3d/V3d_View.cxx | 22 ++++++- src/V3d/V3d_View.hxx | 20 ++++-- src/ViewerTest/ViewerTest.cxx | 81 ++++++++++++++++++++++-- tests/v3d/bugs/bug32752 | 88 ++++++++++++++++++++++++++ 14 files changed, 365 insertions(+), 58 deletions(-) create mode 100644 tests/v3d/bugs/bug32752 diff --git a/src/Graphic3d/Graphic3d_BufferType.hxx b/src/Graphic3d/Graphic3d_BufferType.hxx index 99e449bca2..3e7e9f2a36 100644 --- a/src/Graphic3d/Graphic3d_BufferType.hxx +++ b/src/Graphic3d/Graphic3d_BufferType.hxx @@ -17,11 +17,12 @@ //! Define buffers available for dump enum Graphic3d_BufferType { - Graphic3d_BT_RGB, //!< color buffer without alpha component - Graphic3d_BT_RGBA, //!< color buffer - Graphic3d_BT_Depth, //!< depth buffer + Graphic3d_BT_RGB, //!< color buffer without alpha component + Graphic3d_BT_RGBA, //!< color buffer + Graphic3d_BT_Depth, //!< depth buffer Graphic3d_BT_RGB_RayTraceHdrLeft, //!< left view HDR color buffer for Ray-Tracing - Graphic3d_BT_Red, //!< color buffer, red channel + Graphic3d_BT_Red, //!< color buffer, red channel + Graphic3d_BT_ShadowMap, //!< buffer with shadow map }; #endif // _Graphic3d_BufferType_H__ diff --git a/src/Graphic3d/Graphic3d_CView.cxx b/src/Graphic3d/Graphic3d_CView.cxx index 59e0ee75a9..2a0be6b193 100644 --- a/src/Graphic3d/Graphic3d_CView.cxx +++ b/src/Graphic3d/Graphic3d_CView.cxx @@ -42,6 +42,9 @@ Graphic3d_CView::Graphic3d_CView (const Handle(Graphic3d_StructureManager)& theM myBackfacing (Graphic3d_TypeOfBackfacingModel_Auto), myVisualization (Graphic3d_TOV_WIREFRAME), // + myZLayerTarget (Graphic3d_ZLayerId_BotOSD), + myZLayerRedrawMode (Standard_False), + // myBgColor (Quantity_NOC_BLACK), myBackgroundType (Graphic3d_TOB_NONE), myToUpdateSkydome (Standard_False), diff --git a/src/Graphic3d/Graphic3d_CView.hxx b/src/Graphic3d/Graphic3d_CView.hxx index 5fe56d4467..abebcebc61 100644 --- a/src/Graphic3d/Graphic3d_CView.hxx +++ b/src/Graphic3d/Graphic3d_CView.hxx @@ -112,6 +112,18 @@ public: //! Sets visualization type of the view. void SetVisualizationType (const Graphic3d_TypeOfVisualization theType) { myVisualization = theType; } + //! Returns ZLayerId target + Graphic3d_ZLayerId ZLayerTarget() const { return myZLayerTarget; } + + //! Sets ZLayerId target. + void SetZLayerTarget (const Graphic3d_ZLayerId theTarget) { myZLayerTarget = theTarget; } + + //! Returns ZLayerId redraw mode + Standard_Boolean ZLayerRedrawMode() const { return myZLayerRedrawMode; } + + //! Sets ZLayerId redraw mode. + void SetZLayerRedrawMode (const Standard_Boolean theMode) { myZLayerRedrawMode = theMode; } + //! Switches computed HLR mode in the view Standard_EXPORT void SetComputedMode (const Standard_Boolean theMode); @@ -258,6 +270,11 @@ public: //! Dump active rendering buffer into specified memory buffer. virtual Standard_Boolean BufferDump (Image_PixMap& theImage, const Graphic3d_BufferType& theBufferType) = 0; + //! Dumps the graphical contents of a shadowmap framebuffer into an image. + //! @param theImage the image to store the shadow map. + //! @param theLightName [in] name of the light used to generate the shadow map. + virtual Standard_Boolean ShadowMapDump (Image_PixMap& theImage, const TCollection_AsciiString& theLightName) = 0; + //! Marks BVH tree and the set of BVH primitives of correspondent priority list with id theLayerId as outdated. virtual void InvalidateBVHData (const Graphic3d_ZLayerId theLayerId) = 0; @@ -638,15 +655,18 @@ protected: Graphic3d_Vec2d mySubviewOffset; //!< subview corner offset within parent view Handle(Graphic3d_StructureManager) myStructureManager; - Handle(Graphic3d_Camera) myCamera; - Graphic3d_SequenceOfStructure myStructsToCompute; - Graphic3d_SequenceOfStructure myStructsComputed; - Graphic3d_MapOfStructure myStructsDisplayed; - Standard_Boolean myIsInComputedMode; - Standard_Boolean myIsActive; - Standard_Boolean myIsRemoved; - Graphic3d_TypeOfBackfacingModel myBackfacing; - Graphic3d_TypeOfVisualization myVisualization; + Handle(Graphic3d_Camera) myCamera; + Graphic3d_SequenceOfStructure myStructsToCompute; + Graphic3d_SequenceOfStructure myStructsComputed; + Graphic3d_MapOfStructure myStructsDisplayed; + Standard_Boolean myIsInComputedMode; + Standard_Boolean myIsActive; + Standard_Boolean myIsRemoved; + Graphic3d_TypeOfBackfacingModel myBackfacing; + Graphic3d_TypeOfVisualization myVisualization; + + Graphic3d_ZLayerId myZLayerTarget; //!< ZLayerId for redrawing the content of specific zlayers. + Standard_Boolean myZLayerRedrawMode; //!< If true redraws single layer, otherwise redraws group of layers. Quantity_ColorRGBA myBgColor; Handle(Graphic3d_TextureMap) myBackgroundImage; diff --git a/src/OpenGl/OpenGl_FrameBuffer.cxx b/src/OpenGl/OpenGl_FrameBuffer.cxx index ca4ac757e2..0fdbe4ce81 100644 --- a/src/OpenGl/OpenGl_FrameBuffer.cxx +++ b/src/OpenGl/OpenGl_FrameBuffer.cxx @@ -978,7 +978,7 @@ Standard_Boolean OpenGl_FrameBuffer::BufferDump (const Handle(OpenGl_Context)& t return false; } - aFormat = theBufferType == Graphic3d_BT_Depth ? GL_DEPTH_COMPONENT : GL_RED; + aFormat = theBufferType == Graphic3d_BT_Depth || theBufferType == Graphic3d_BT_ShadowMap ? GL_DEPTH_COMPONENT : GL_RED; aType = GL_UNSIGNED_BYTE; break; } @@ -989,7 +989,7 @@ Standard_Boolean OpenGl_FrameBuffer::BufferDump (const Handle(OpenGl_Context)& t return false; } - aFormat = theBufferType == Graphic3d_BT_Depth ? GL_DEPTH_COMPONENT : GL_RED; + aFormat = theBufferType == Graphic3d_BT_Depth || theBufferType == Graphic3d_BT_ShadowMap ? GL_DEPTH_COMPONENT : GL_RED; aType = GL_UNSIGNED_SHORT; break; } @@ -1000,7 +1000,7 @@ Standard_Boolean OpenGl_FrameBuffer::BufferDump (const Handle(OpenGl_Context)& t return false; } - aFormat = theBufferType == Graphic3d_BT_Depth ? GL_DEPTH_COMPONENT : GL_RED; + aFormat = theBufferType == Graphic3d_BT_Depth || theBufferType == Graphic3d_BT_ShadowMap ? GL_DEPTH_COMPONENT : GL_RED; aType = GL_FLOAT; break; } @@ -1113,7 +1113,7 @@ Standard_Boolean OpenGl_FrameBuffer::BufferDump (const Handle(OpenGl_Context)& t GLint aReadBufferPrev = GL_BACK; if (theGlCtx->GraphicsLibrary() != Aspect_GraphicsLibrary_OpenGLES - && theBufferType == Graphic3d_BT_Depth + && (theBufferType == Graphic3d_BT_Depth || theBufferType == Graphic3d_BT_ShadowMap) && aFormat != GL_DEPTH_COMPONENT) { return Standard_False; diff --git a/src/OpenGl/OpenGl_LayerFilter.hxx b/src/OpenGl/OpenGl_LayerFilter.hxx index 0531bf1b56..5483f0f3d2 100644 --- a/src/OpenGl/OpenGl_LayerFilter.hxx +++ b/src/OpenGl/OpenGl_LayerFilter.hxx @@ -23,6 +23,7 @@ enum OpenGl_LayerFilter OpenGl_LF_All, //!< process all layers OpenGl_LF_Upper, //!< process only top non-raytracable layers OpenGl_LF_Bottom, //!< process only Graphic3d_ZLayerId_BotOSD + OpenGl_LF_Single, //!< process single layer OpenGl_LF_RayTracable //!< process only normal raytracable layers (save the bottom layer) }; diff --git a/src/OpenGl/OpenGl_LayerList.cxx b/src/OpenGl/OpenGl_LayerList.cxx index 52a494d0e2..4cceccfdb5 100644 --- a/src/OpenGl/OpenGl_LayerList.cxx +++ b/src/OpenGl/OpenGl_LayerList.cxx @@ -58,10 +58,12 @@ namespace //! Main constructor. OpenGl_FilteredIndexedLayerIterator (const NCollection_List& theSeq, Standard_Boolean theToDrawImmediate, - OpenGl_LayerFilter theLayersToProcess) + OpenGl_LayerFilter theFilterMode, + Graphic3d_ZLayerId theLayersToProcess) : myIter (theSeq), - myLayersToProcess (theLayersToProcess), - myToDrawImmediate (theToDrawImmediate) + myFilterMode (theFilterMode), + myToDrawImmediate (theToDrawImmediate), + myLayersToProcess (theLayersToProcess) { next(); } @@ -94,11 +96,15 @@ namespace continue; } - switch (myLayersToProcess) + switch (myFilterMode) { case OpenGl_LF_All: { - return; + if (aLayer->LayerId() >= myLayersToProcess) + { + return; + } + break; } case OpenGl_LF_Upper: { @@ -119,6 +125,14 @@ namespace } break; } + case OpenGl_LF_Single: + { + if (aLayer->LayerId() == myLayersToProcess) + { + return; + } + break; + } case OpenGl_LF_RayTracable: { if (aLayer->LayerSettings().IsRaytracable() @@ -133,8 +147,9 @@ namespace } private: OpenGl_IndexedLayerIterator myIter; - OpenGl_LayerFilter myLayersToProcess; + OpenGl_LayerFilter myFilterMode; Standard_Boolean myToDrawImmediate; + Graphic3d_ZLayerId myLayersToProcess; }; static const Standard_Integer THE_DRAW_BUFFERS0[] = { GL_COLOR_ATTACHMENT0 }; @@ -714,7 +729,8 @@ void OpenGl_LayerList::renderLayer (const Handle(OpenGl_Workspace)& theWorkspace //======================================================================= void OpenGl_LayerList::Render (const Handle(OpenGl_Workspace)& theWorkspace, const Standard_Boolean theToDrawImmediate, - const OpenGl_LayerFilter theLayersToProcess, + const OpenGl_LayerFilter theFilterMode, + const Graphic3d_ZLayerId theLayersToProcess, OpenGl_FrameBuffer* theReadDrawFbo, OpenGl_FrameBuffer* theOitAccumFbo) const { @@ -750,7 +766,7 @@ void OpenGl_LayerList::Render (const Handle(OpenGl_Workspace)& theWorkspace, && !isShadowMapPass; const Handle(Graphic3d_LightSet) aLightsBack = aCtx->ShaderManager()->LightSourceState().LightSources(); const Handle(OpenGl_ShadowMapArray) aShadowMaps = aCtx->ShaderManager()->LightSourceState().ShadowMaps(); - for (OpenGl_FilteredIndexedLayerIterator aLayerIterStart (myLayers, theToDrawImmediate, theLayersToProcess); aLayerIterStart.More();) + for (OpenGl_FilteredIndexedLayerIterator aLayerIterStart (myLayers, theToDrawImmediate, theFilterMode, theLayersToProcess); aLayerIterStart.More();) { bool hasSkippedDepthLayers = false; for (int aPassIter = toPerformDepthPrepass ? 0 : 2; aPassIter < 3; ++aPassIter) diff --git a/src/OpenGl/OpenGl_LayerList.hxx b/src/OpenGl/OpenGl_LayerList.hxx index 442364334d..eb614f55af 100644 --- a/src/OpenGl/OpenGl_LayerList.hxx +++ b/src/OpenGl/OpenGl_LayerList.hxx @@ -102,7 +102,8 @@ public: //! Render this element Standard_EXPORT void Render (const Handle(OpenGl_Workspace)& theWorkspace, const Standard_Boolean theToDrawImmediate, - const OpenGl_LayerFilter theLayersToProcess, + const OpenGl_LayerFilter theFilterMode, + const Graphic3d_ZLayerId theLayersToProcess, OpenGl_FrameBuffer* theReadDrawFbo, OpenGl_FrameBuffer* theOitAccumFbo) const; diff --git a/src/OpenGl/OpenGl_View.cxx b/src/OpenGl/OpenGl_View.cxx index 7907795567..e1010f47df 100644 --- a/src/OpenGl/OpenGl_View.cxx +++ b/src/OpenGl/OpenGl_View.cxx @@ -520,12 +520,12 @@ Standard_Boolean OpenGl_View::BufferDump (Image_PixMap& theImage, const Graphic3 const Handle(OpenGl_Context)& aCtx = myWorkspace->GetGlContext(); if (theBufferType != Graphic3d_BT_RGB_RayTraceHdrLeft) { - return myWorkspace->BufferDump(myFBO, theImage, theBufferType); + return myWorkspace->BufferDump (myFBO, theImage, theBufferType); } if (!myRaytraceParameters.AdaptiveScreenSampling) { - return myWorkspace->BufferDump(myAccumFrames % 2 ? myRaytraceFBO2[0] : myRaytraceFBO1[0], theImage, theBufferType); + return myWorkspace->BufferDump (myAccumFrames % 2 ? myRaytraceFBO2[0] : myRaytraceFBO1[0], theImage, theBufferType); } if (aCtx->GraphicsLibrary() == Aspect_GraphicsLibrary_OpenGLES) @@ -572,6 +572,71 @@ Standard_Boolean OpenGl_View::BufferDump (Image_PixMap& theImage, const Graphic3 return true; } +//======================================================================= +//function : ShadowMapDump +//purpose : +//======================================================================= +Standard_Boolean OpenGl_View::ShadowMapDump (Image_PixMap& theImage, const TCollection_AsciiString& theLightName) +{ + if (!myShadowMaps->IsValid()) + { + return Standard_False; + } + + const Handle(OpenGl_Context)& aGlCtx = myWorkspace->GetGlContext(); + for (Standard_Integer aShadowIter = 0; aShadowIter < myShadowMaps->Size(); ++aShadowIter) + { + Handle(OpenGl_ShadowMap)& aShadow = myShadowMaps->ChangeValue(aShadowIter); + if (!aShadow.IsNull() && aShadow->LightSource()->Name() == theLightName) + { + const Handle(OpenGl_FrameBuffer)& aShadowFbo = aShadow->FrameBuffer(); + if (aShadowFbo->GetVPSizeX() == myRenderParams.ShadowMapResolution) + { + if ((Standard_Integer)theImage.Width() != aShadowFbo->GetVPSizeX() || (Standard_Integer)theImage.Height() != aShadowFbo->GetVPSizeY()) + { + theImage.InitZero(Image_Format_GrayF, aShadowFbo->GetVPSizeX(), aShadowFbo->GetVPSizeY()); + } + GLint aReadBufferPrev = GL_BACK; + // Bind FBO if used. + if (!aShadowFbo.IsNull() && aShadowFbo->IsValid()) + { + aShadowFbo->BindBuffer (aGlCtx); + } + else if (aGlCtx->GraphicsLibrary() != Aspect_GraphicsLibrary_OpenGLES) + { + aGlCtx->core11fwd->glGetIntegerv (GL_READ_BUFFER, &aReadBufferPrev); + GLint aDrawBufferPrev = GL_BACK; + aGlCtx->core11fwd->glGetIntegerv (GL_DRAW_BUFFER, &aDrawBufferPrev); + aGlCtx->core11fwd->glReadBuffer (aDrawBufferPrev); + } + // Setup alignment. + const GLint anAligment = Min (GLint(theImage.MaxRowAligmentBytes()), 8); // limit to 8 bytes for OpenGL. + aGlCtx->core11fwd->glPixelStorei (GL_PACK_ALIGNMENT, anAligment); + // Read data. + aGlCtx->core11fwd->glReadPixels (0, 0, GLsizei(theImage.SizeX()), GLsizei(theImage.SizeY()), GL_DEPTH_COMPONENT, GL_FLOAT, theImage.ChangeData()); + aGlCtx->core11fwd->glPixelStorei (GL_PACK_ALIGNMENT, 1); + if (aGlCtx->hasPackRowLength) + { + aGlCtx->core11fwd->glPixelStorei (GL_PACK_ROW_LENGTH, 0); + } + // Unbind FBO. + if (!aShadowFbo.IsNull() && aShadowFbo->IsValid()) + { + aShadowFbo->UnbindBuffer (aGlCtx); + } + else if (aGlCtx->GraphicsLibrary() != Aspect_GraphicsLibrary_OpenGLES) + { + aGlCtx->core11fwd->glReadBuffer (aReadBufferPrev); + } + // Check for errors. + const bool hasErrors = aGlCtx->ResetErrors (true); + return !hasErrors; + } + } + } + return Standard_False; +} + // ======================================================================= // function : GradientBackground // purpose : @@ -2583,7 +2648,7 @@ void OpenGl_View::renderStructs (Graphic3d_Camera::Projection theProjection, if (aCtx->arbFBOBlit != NULL) { // Render bottom OSD layer - myZLayers.Render (myWorkspace, theToDrawImmediate, OpenGl_LF_Bottom, theReadDrawFbo, theOitAccumFbo); + myZLayers.Render (myWorkspace, theToDrawImmediate, OpenGl_LF_Bottom, myZLayerTarget, theReadDrawFbo, theOitAccumFbo); const Standard_Integer aPrevFilter = myWorkspace->RenderFilter() & ~(Standard_Integer )(OpenGl_RenderFilter_NonRaytraceableOnly); myWorkspace->SetRenderFilter (aPrevFilter | OpenGl_RenderFilter_NonRaytraceableOnly); @@ -2599,7 +2664,7 @@ void OpenGl_View::renderStructs (Graphic3d_Camera::Projection theProjection, } // Render non-polygonal elements in default layer - myZLayers.Render (myWorkspace, theToDrawImmediate, OpenGl_LF_RayTracable, theReadDrawFbo, theOitAccumFbo); + myZLayers.Render (myWorkspace, theToDrawImmediate, OpenGl_LF_RayTracable, myZLayerTarget, theReadDrawFbo, theOitAccumFbo); } myWorkspace->SetRenderFilter (aPrevFilter); } @@ -2622,7 +2687,7 @@ void OpenGl_View::renderStructs (Graphic3d_Camera::Projection theProjection, raytrace (aSizeXY.x(), aSizeXY.y(), theProjection, theReadDrawFbo, aCtx); // Render upper (top and topmost) OpenGL layers - myZLayers.Render (myWorkspace, theToDrawImmediate, OpenGl_LF_Upper, theReadDrawFbo, theOitAccumFbo); + myZLayers.Render (myWorkspace, theToDrawImmediate, OpenGl_LF_Upper, myZLayerTarget, theReadDrawFbo, theOitAccumFbo); } } @@ -2630,7 +2695,9 @@ void OpenGl_View::renderStructs (Graphic3d_Camera::Projection theProjection, // mode or in case of ray-tracing failure if (toRenderGL) { - myZLayers.Render (myWorkspace, theToDrawImmediate, OpenGl_LF_All, theReadDrawFbo, theOitAccumFbo); + // check if only a single layer is to be dumped + OpenGl_LayerFilter aFilter = myZLayerRedrawMode ? OpenGl_LF_Single : OpenGl_LF_All; + myZLayers.Render (myWorkspace, theToDrawImmediate, aFilter, myZLayerTarget, theReadDrawFbo, theOitAccumFbo); // Set flag that scene was redrawn by standard pipeline myWasRedrawnGL = Standard_True; diff --git a/src/OpenGl/OpenGl_View.hxx b/src/OpenGl/OpenGl_View.hxx index 17768a06d1..5d4cca1029 100644 --- a/src/OpenGl/OpenGl_View.hxx +++ b/src/OpenGl/OpenGl_View.hxx @@ -111,6 +111,12 @@ public: Standard_EXPORT virtual Standard_Boolean BufferDump (Image_PixMap& theImage, const Graphic3d_BufferType& theBufferType) Standard_OVERRIDE; + //! Dumps the graphical contents of a shadowmap framebuffer into an image. + //! @param theImage the image to store the shadow map. + //! @param theLightName [in] name of the light used to generate the shadow map. + Standard_EXPORT virtual Standard_Boolean ShadowMapDump (Image_PixMap& theImage, + const TCollection_AsciiString& theLightName) Standard_OVERRIDE; + //! Marks BVH tree and the set of BVH primitives of correspondent priority list with id theLayerId as outdated. Standard_EXPORT virtual void InvalidateBVHData (const Graphic3d_ZLayerId theLayerId) Standard_OVERRIDE; diff --git a/src/V3d/V3d_ImageDumpOptions.hxx b/src/V3d/V3d_ImageDumpOptions.hxx index 368f7c881d..a15f57b83a 100644 --- a/src/V3d/V3d_ImageDumpOptions.hxx +++ b/src/V3d/V3d_ImageDumpOptions.hxx @@ -16,29 +16,36 @@ #include #include +#include //! The structure defines options for image dump functionality. struct V3d_ImageDumpOptions { - Standard_Integer Width; //!< width of image dump to allocate an image, 0 by default (meaning that image should be already allocated) - Standard_Integer Height; //!< height of image dump to allocate an image, 0 by default (meaning that image should be already allocated) - Graphic3d_BufferType BufferType; //!< which buffer to dump (color / depth), Graphic3d_BT_RGB by default - V3d_StereoDumpOptions StereoOptions; //!< dumping stereoscopic camera, V3d_SDO_MONO by default (middle-point monographic projection) - Standard_Integer TileSize; //!< the view dimension limited for tiled dump, 0 by default (automatic tiling depending on hardware capabilities) - Standard_Boolean ToAdjustAspect; //!< flag to override active view aspect ratio by (Width / Height) defined for image dump (TRUE by default) + Standard_Integer Width; //!< Width of image dump to allocate an image, 0 by default (meaning that image should be already allocated). + Standard_Integer Height; //!< Height of image dump to allocate an image, 0 by default (meaning that image should be already allocated). + Graphic3d_BufferType BufferType; //!< Which buffer to dump (color / depth), Graphic3d_BT_RGB by default. + V3d_StereoDumpOptions StereoOptions; //!< Dumping stereoscopic camera, V3d_SDO_MONO by default (middle-point monographic projection). + Standard_Integer TileSize; //!< The view dimension limited for tiled dump, 0 by default (automatic tiling depending on hardware capabilities). + Standard_Boolean ToAdjustAspect; //!< Flag to override active view aspect ratio by (Width / Height) defined for image dump (TRUE by default). + Graphic3d_ZLayerId TargetZLayerId; //!< Target z layer id which defines the last layer to be drawn before image dump. + Standard_Boolean IsSingleLayer; //SetAspect (Standard_Real(aTargetSize.x()) / Standard_Real(aTargetSize.y())); } - + //apply zlayer rendering parameters to view + myView->SetZLayerTarget (theParams.TargetZLayerId); + myView->SetZLayerRedrawMode (theParams.IsSingleLayer); // render immediate structures into back buffer rather than front const Standard_Boolean aPrevImmediateMode = myView->SetImmediateModeDrawToFront (Standard_False); @@ -2952,7 +2955,19 @@ Standard_Boolean V3d_View::ToPixMap (Image_PixMap& theImage, myView->FBOChangeViewport (aFBOPtr, aTargetSize.x(), aTargetSize.y()); } Redraw(); - isSuccess = isSuccess && myView->BufferDump (theImage, theParams.BufferType); + if (theParams.BufferType == Graphic3d_BT_ShadowMap) + { + // draw shadow maps + if (!myView->ShadowMapDump (theImage, theParams.LightName)) + { + Message::SendFail ("OpenGl_View::BufferDump() failed to dump shadowmap"); + isSuccess = Standard_False; + } + } + else + { + isSuccess = isSuccess && myView->BufferDump (theImage, theParams.BufferType); + } } else { @@ -3024,6 +3039,9 @@ Standard_Boolean V3d_View::ToPixMap (Image_PixMap& theImage, myView->FBOChangeViewport (aPrevFBOPtr, aPrevFBOVPSize.x(), aPrevFBOVPSize.y()); } myView->SetFBO (aPrevFBOPtr); + //apply default zlayer rendering parameters to view + myView->SetZLayerTarget (Graphic3d_ZLayerId_BotOSD); + myView->SetZLayerRedrawMode (Standard_False); return isSuccess; } diff --git a/src/V3d/V3d_View.hxx b/src/V3d/V3d_View.hxx index 22847902e9..93804995a4 100644 --- a/src/V3d/V3d_View.hxx +++ b/src/V3d/V3d_View.hxx @@ -851,19 +851,25 @@ public: //! @param theBufferType type of the view buffer to dump (color / depth) //! @param theToAdjustAspect when true, active view aspect ratio will be overridden by (theWidth / theHeight) //! @param theStereoOptions how to dump stereographic camera - Standard_Boolean ToPixMap (Image_PixMap& theImage, - const Standard_Integer theWidth, - const Standard_Integer theHeight, + Standard_Boolean ToPixMap (Image_PixMap& theImage, + const Standard_Integer theWidth, + const Standard_Integer theHeight, const Graphic3d_BufferType& theBufferType = Graphic3d_BT_RGB, const Standard_Boolean theToAdjustAspect = Standard_True, - const V3d_StereoDumpOptions theStereoOptions = V3d_SDO_MONO) + const Graphic3d_ZLayerId theTargetZLayerId = Graphic3d_ZLayerId_BotOSD, + const Standard_Integer theIsSingleLayer = Standard_False, + const V3d_StereoDumpOptions theStereoOptions = V3d_SDO_MONO, + const Standard_CString theLightName = "") { V3d_ImageDumpOptions aParams; - aParams.Width = theWidth; - aParams.Height = theHeight; - aParams.BufferType = theBufferType; + aParams.Width = theWidth; + aParams.Height = theHeight; + aParams.BufferType = theBufferType; aParams.StereoOptions = theStereoOptions; aParams.ToAdjustAspect = theToAdjustAspect; + aParams.TargetZLayerId = theTargetZLayerId; + aParams.IsSingleLayer = theIsSingleLayer; + aParams.LightName = theLightName; return ToPixMap (theImage, aParams); } diff --git a/src/ViewerTest/ViewerTest.cxx b/src/ViewerTest/ViewerTest.cxx index dced0cf3f9..380f5ac67b 100644 --- a/src/ViewerTest/ViewerTest.cxx +++ b/src/ViewerTest/ViewerTest.cxx @@ -966,8 +966,11 @@ static Standard_Integer VDump (Draw_Interpretor& theDI, ViewerTest_StereoPair aStereoPair = ViewerTest_SP_Single; V3d_ImageDumpOptions aParams; Handle(Graphic3d_Camera) aCustomCam; - aParams.BufferType = Graphic3d_BT_RGB; - aParams.StereoOptions = V3d_SDO_MONO; + aParams.BufferType = Graphic3d_BT_RGB; + aParams.StereoOptions = V3d_SDO_MONO; + aParams.TargetZLayerId = Graphic3d_ZLayerId_BotOSD; + aParams.IsSingleLayer = Standard_False; + aParams.LightName = ""; for (; anArgIter < theArgNb; ++anArgIter) { TCollection_AsciiString anArg (theArgVec[anArgIter]); @@ -998,6 +1001,31 @@ static Standard_Integer VDump (Draw_Interpretor& theDI, { aParams.BufferType = Graphic3d_BT_Depth; } + else if (aBufArg == "shadowmap") + { + if (++anArgIter >= theArgNb) + { + Message::SendFail() << "Error: missing light name for shadowmap dump"; + return 1; + } + aParams.BufferType = Graphic3d_BT_ShadowMap; + aParams.LightName = theArgVec[anArgIter]; + Standard_Boolean isLightFound = Standard_False; + for (V3d_ListOfLightIterator aLightIter(aView->ActiveLightIterator()); aLightIter.More(); aLightIter.Next()) + { + Handle(V3d_Light) aLight = aLightIter.Value(); + if (aLight->Name() == aParams.LightName) + { + isLightFound = Standard_True; + break; + } + } + if (!isLightFound) + { + Message::SendFail() << "Error: couldn't find light '" << aParams.LightName << "'"; + return 1; + } + } else { Message::SendFail() << "Error: unknown buffer '" << aBufArg << "'"; @@ -1105,6 +1133,11 @@ static Standard_Integer VDump (Draw_Interpretor& theDI, { aParams.BufferType = Graphic3d_BT_Depth; } + else if (anArg == "-shadowmap" + || anArg == "shadowmap") + { + aParams.BufferType = Graphic3d_BT_ShadowMap; + } else if (anArg == "-width" || anArg == "width" || anArg == "sizex") @@ -1147,6 +1180,39 @@ static Standard_Integer VDump (Draw_Interpretor& theDI, } aParams.TileSize = Draw::Atoi (theArgVec[anArgIter]); } + else if (anArg == "-grouplayer") + { + if (++anArgIter >= theArgNb) + { + Message::SendFail() << "Error: integer value is expected right after 'grouplayer'"; + return 1; + } + Graphic3d_ZLayerId aZLayer = (Graphic3d_ZLayerId)Draw::Atoi (theArgVec[anArgIter]); + if (!ViewerTest::ParseZLayer (theArgVec[anArgIter], aZLayer) || + aZLayer == Graphic3d_ZLayerId_UNKNOWN) + { + Message::SendFail() << "Error: invalid layer " << aZLayer << "."; + return 1; + } + aParams.TargetZLayerId = aZLayer; + } + else if (anArg == "-singlelayer") + { + if (++anArgIter >= theArgNb) + { + Message::SendFail() << "Error: integer value is expected right after 'singlelayer'"; + return 1; + } + Graphic3d_ZLayerId aZLayer = (Graphic3d_ZLayerId)Draw::Atoi (theArgVec[anArgIter]); + if (!ViewerTest::ParseZLayer (theArgVec[anArgIter], aZLayer) || + aZLayer == Graphic3d_ZLayerId_UNKNOWN) + { + Message::SendFail() << "Error: invalid layer " << aZLayer << "."; + return 1; + } + aParams.TargetZLayerId = aZLayer; + aParams.IsSingleLayer = Standard_True; + } else { Message::SendFail() << "Error: unknown argument '" << theArgVec[anArgIter] << "'"; @@ -1174,6 +1240,7 @@ static Standard_Integer VDump (Draw_Interpretor& theDI, case Graphic3d_BT_Depth: aFormat = Image_Format_GrayF; break; case Graphic3d_BT_RGB_RayTraceHdrLeft: aFormat = Image_Format_RGBF; break; case Graphic3d_BT_Red: aFormat = Image_Format_Gray; break; + case Graphic3d_BT_ShadowMap: aFormat = Image_Format_GrayF; break; } const bool wasImmUpdate = aView->SetImmediateUpdate (false); @@ -1194,8 +1261,11 @@ static Standard_Integer VDump (Draw_Interpretor& theDI, else if (aPixMap.SizeX() != Standard_Size(aParams.Width) || aPixMap.SizeY() != Standard_Size(aParams.Height)) { - theDI << "Fail: dumped dimensions " << (Standard_Integer )aPixMap.SizeX() << "x" << (Standard_Integer )aPixMap.SizeY() - << " are lesser than requested " << aParams.Width << "x" << aParams.Height << "\n"; + if (aParams.BufferType != Graphic3d_BT_ShadowMap) + { + theDI << "Fail: dumped dimensions " << (Standard_Integer)aPixMap.SizeX() << "x" << (Standard_Integer)aPixMap.SizeY() + << " are lesser than requested " << aParams.Width << "x" << aParams.Height << "\n"; + } } break; } @@ -6784,6 +6854,9 @@ vdump .png [-width Width -height Height] [-stereo mono|left|right|blend|sideBySide|overUnder=mono] [-xrPose base|head|handLeft|handRight=base] [-tileSize Size=0] + [-grouplayer zlayerId] + [-singlelayer zlayerId] + [-buffer shadowmap lightname] Dumps content of the active view into image file. )" /* [vdump] */); diff --git a/tests/v3d/bugs/bug32752 b/tests/v3d/bugs/bug32752 new file mode 100644 index 0000000000..90b630e7a3 --- /dev/null +++ b/tests/v3d/bugs/bug32752 @@ -0,0 +1,88 @@ +puts "========" +puts "0032752: Visualization, TKOpenGl - extend V3d_View::ToPixMap() options with Z-layer" +puts "========" +puts "" + +pload MODELING VISUALIZATION +vclear +vinit +box b1 20 0 0 10 10 10 +box b2 -20 0 0 10 10 10 +box b3 0 -10 0 5 5 5 +box b4 0 5 0 5 5 5 +box b5 0 0 5 3 3 3 +box b6 0 0 -5 7 7 7 +box b7 0 -5 -10 3 3 3 + +set aLayerId1 [vzlayer -add -enable depthTest -enable depthWrite -disable depthClear] +set aLayerId2 [vzlayer -add -enable depthTest -enable depthWrite -disable depthClear] + +vdisplay -dispmode 1 -layer ${aLayerId1} b1 +vdisplay -dispmode 1 -layer ${aLayerId2} b2 +vdisplay -dispmode 1 -layer 0 b3 +vdisplay -dispmode 1 -layer -2 b4 +vdisplay -dispmode 1 -layer -3 b5 +vdisplay -dispmode 1 -layer -4 b6 +vdisplay -dispmode 1 -layer -5 b7 +vfit +vviewparams -scale 15.0 -proj 0.57735 -0.57735 0.57735 -up -0.1 0.1 0.1 -at 0.0 0.0 0.0 + +vsetcolor b1 RED3 +vsetcolor b2 GREEN3 +vsetcolor b3 BLUE3 +vsetcolor b4 ORANGE3 +vsetcolor b5 YELLOW3 +vsetcolor b6 SALMON3 +vsetcolor b7 PURPLE3 + +#dump entire scene +#color +vdump $imagedir/${casename}_all.png +#depth +vdump $imagedir/${casename}_depth.png -buffer depth + +#dump single layer +vdump $imagedir/${casename}_only_b1.png -singlelayer ${aLayerId1} +vdump $imagedir/${casename}_only_b2.png -singlelayer ${aLayerId2} +vdump $imagedir/${casename}_only_b3.png -singlelayer 0 +vdump $imagedir/${casename}_only_b4.png -singlelayer -2 +vdump $imagedir/${casename}_only_b5.png -singlelayer -3 +vdump $imagedir/${casename}_only_b6.png -singlelayer -4 +vdump $imagedir/${casename}_only_b7.png -singlelayer -5 + +#dump a group of layers +vdump $imagedir/${casename}_upto_b1.png -grouplayer ${aLayerId1} +vdump $imagedir/${casename}_upto_b2.png -grouplayer ${aLayerId2} +vdump $imagedir/${casename}_upto_b3.png -grouplayer 0 +vdump $imagedir/${casename}_upto_b4.png -grouplayer -2 +vdump $imagedir/${casename}_upto_b5.png -grouplayer -3 +vdump $imagedir/${casename}_upto_b6.png -grouplayer -4 +vdump $imagedir/${casename}_upto_b7.png -grouplayer -5 + +#dump single layer depth values +vdump $imagedir/${casename}_only_b1_depth.png -buffer depth -singlelayer ${aLayerId1} +vdump $imagedir/${casename}_only_b2_depth.png -buffer depth -singlelayer ${aLayerId2} +vdump $imagedir/${casename}_only_b3_depth.png -buffer depth -singlelayer 0 +vdump $imagedir/${casename}_only_b4_depth.png -buffer depth -singlelayer -2 +vdump $imagedir/${casename}_only_b5_depth.png -buffer depth -singlelayer -3 +vdump $imagedir/${casename}_only_b6_depth.png -buffer depth -singlelayer -4 +vdump $imagedir/${casename}_only_b7_depth.png -buffer depth -singlelayer -5 + +#dump a group of layers depth values +vdump $imagedir/${casename}_upto_b1_depth.png -buffer depth -grouplayer ${aLayerId1} +vdump $imagedir/${casename}_upto_b2_depth.png -buffer depth -grouplayer ${aLayerId2} +vdump $imagedir/${casename}_upto_b3_depth.png -buffer depth -grouplayer 0 +vdump $imagedir/${casename}_upto_b4_depth.png -buffer depth -grouplayer -2 +vdump $imagedir/${casename}_upto_b5_depth.png -buffer depth -grouplayer -3 +vdump $imagedir/${casename}_upto_b6_depth.png -buffer depth -grouplayer -4 +vdump $imagedir/${casename}_upto_b7_depth.png -buffer depth -grouplayer -5 + +#dump shadow maps +vlight -clear +vlight v1 -type directional -intensity 1 -dir -1 0 -0.5 -castShadows 1 +vlight v2 -type directional -intensity 1 -dir -1 0.1 0 -castShadows 1 +#dump scene +vdump $imagedir/${casename}_newlights.png +#dump shadowmaps +vdump $imagedir/${casename}_shadowmap_v1.png -buffer shadowmap v1 +vdump $imagedir/${casename}_shadowmap_v2.png -buffer shadowmap v2 From cf27d6cada4346c855347d47e3d6aaf980282f4b Mon Sep 17 00:00:00 2001 From: Thomas Date: Fri, 28 Jun 2024 10:01:50 +0200 Subject: [PATCH 571/639] 0033749: Configuration - Update permission draw.sh Limit draw.sh permission to 755 instead of 777 --- CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 86905287dc..2b185cc83c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1012,10 +1012,10 @@ if (${DRAWEXE_INDEX} GREATER -1) # copy draw script to install script folder if (BUILD_PATCH AND EXISTS "${BUILD_PATCH}/adm/templates/draw.${SCRIPT_EXT}") install (FILES "${BUILD_PATCH}/adm/templates/draw.${SCRIPT_EXT}" DESTINATION "${INSTALL_DIR_SCRIPT}" - PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_WRITE GROUP_EXECUTE WORLD_READ WORLD_WRITE WORLD_EXECUTE) + PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE) else() install (FILES "${CMAKE_SOURCE_DIR}/adm/templates/draw.${SCRIPT_EXT}" DESTINATION "${INSTALL_DIR_SCRIPT}" - PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_WRITE GROUP_EXECUTE WORLD_READ WORLD_WRITE WORLD_EXECUTE) + PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE) endif() # copy draw script to CMake binary folder From 25d3030ed56c0612c4dc3739d04b9b98d65496da Mon Sep 17 00:00:00 2001 From: Pasukhin Dmitry <44947322+dpasukhi@users.noreply.github.com> Date: Fri, 28 Jun 2024 13:59:34 +0200 Subject: [PATCH 572/639] 0033752: Configuration - Update permission inspector.sh Updated permission to owner write only --- CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 2b185cc83c..8576e8ba33 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1217,10 +1217,10 @@ if (BUILD_TOOL_TOOLKITS) # copy tinspector script to install script folder if (BUILD_PATCH AND EXISTS "${BUILD_PATCH}/adm/templates/inspector.${SCRIPT_EXT}") install (FILES "${BUILD_PATCH}/adm/templates/inspector.${SCRIPT_EXT}" DESTINATION "${INSTALL_DIR_SCRIPT}" - PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_WRITE GROUP_EXECUTE WORLD_READ WORLD_WRITE WORLD_EXECUTE) + PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE) else() install (FILES "${CMAKE_SOURCE_DIR}/adm/templates/inspector.${SCRIPT_EXT}" DESTINATION "${INSTALL_DIR_SCRIPT}" - PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_WRITE GROUP_EXECUTE WORLD_READ WORLD_WRITE WORLD_EXECUTE) + PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE) endif() set (OpenCASCADE_BINARY_DIR "${INSTALL_DIR}/${INSTALL_DIR_BIN}") From 818c68f22ea75a7919df8ea4c1ffa46e7ba05b6b Mon Sep 17 00:00:00 2001 From: Pasukhin Dmitry <44947322+dpasukhi@users.noreply.github.com> Date: Fri, 5 Jul 2024 15:28:39 +0200 Subject: [PATCH 573/639] 0033737: Data Exchange, XCAF - Implementing filter tree functionality Implemented base functionality to filter tree with input label to keep. --- src/XCAFDoc/XCAFDoc_Editor.cxx | 106 ++++++++++++++++++++++++++++++++- src/XCAFDoc/XCAFDoc_Editor.hxx | 29 +++++++++ src/XDEDRAW/XDEDRAW_Common.cxx | 51 +++++++++++++++- tests/bugs/xde/bug33737 | 61 +++++++++++++++++++ 4 files changed, 245 insertions(+), 2 deletions(-) create mode 100644 tests/bugs/xde/bug33737 diff --git a/src/XCAFDoc/XCAFDoc_Editor.cxx b/src/XCAFDoc/XCAFDoc_Editor.cxx index e76fcedf4d..8d3d574798 100644 --- a/src/XCAFDoc/XCAFDoc_Editor.cxx +++ b/src/XCAFDoc/XCAFDoc_Editor.cxx @@ -17,6 +17,7 @@ #include #include +#include #include #include #include @@ -582,12 +583,115 @@ static Standard_Boolean shouldRescaleAndCheckRefLabels( return aShouldRescale; } +//======================================================================= +//function : GetChildShapeLabels +//purpose : +//======================================================================= +void XCAFDoc_Editor::GetChildShapeLabels(const TDF_Label& theLabel, + TDF_LabelMap& theRelatedLabels) +{ + if (theLabel.IsNull() || !XCAFDoc_ShapeTool::IsShape(theLabel)) + { + return; + } + if (!theRelatedLabels.Add(theLabel)) + { + return; // Label already processed + } + if (XCAFDoc_ShapeTool::IsAssembly(theLabel) || + XCAFDoc_ShapeTool::IsSimpleShape(theLabel)) + { + for(TDF_ChildIterator aChildIter(theLabel); aChildIter.More(); aChildIter.Next()) + { + const TDF_Label& aChildLabel = aChildIter.Value(); + GetChildShapeLabels(aChildLabel, theRelatedLabels); + } + } + if (XCAFDoc_ShapeTool::IsReference(theLabel)) + { + TDF_Label aRefLabel; + XCAFDoc_ShapeTool::GetReferredShape(theLabel, aRefLabel); + GetChildShapeLabels(aRefLabel, theRelatedLabels); + } +} + +//======================================================================= +//function : GetParentShapeLabels +//purpose : +//======================================================================= +void XCAFDoc_Editor::GetParentShapeLabels(const TDF_Label& theLabel, + TDF_LabelMap& theRelatedLabels) +{ + if (theLabel.IsNull() || !XCAFDoc_ShapeTool::IsShape(theLabel)) + { + return; + } + if (!theRelatedLabels.Add(theLabel)) + { + return; // Label already processed + } + if (XCAFDoc_ShapeTool::IsSubShape(theLabel) || + XCAFDoc_ShapeTool::IsComponent(theLabel)) + { + TDF_Label aFatherLabel = theLabel.Father(); + GetParentShapeLabels(aFatherLabel, theRelatedLabels); + } + else + { + TDF_LabelSequence aUsers; + XCAFDoc_ShapeTool::GetUsers(theLabel, aUsers); + if (!aUsers.IsEmpty()) + { + for (TDF_LabelSequence::Iterator aUserIter(aUsers); aUserIter.More(); aUserIter.Next()) + { + const TDF_Label& aUserLabel = aUserIter.Value(); + GetParentShapeLabels(aUserLabel, theRelatedLabels); + } + } + } +} + +//======================================================================= +//function : FilterShapeTree +//purpose : +//======================================================================= +bool XCAFDoc_Editor::FilterShapeTree(const Handle(XCAFDoc_ShapeTool)& theShapeTool, + const TDF_LabelMap& theLabelsToKeep) +{ + if (theLabelsToKeep.IsEmpty()) + { + return false; + } + Handle(NCollection_BaseAllocator) anAllocator = new NCollection_IncAllocator(); + TDF_LabelMap aLabelsToKeep (theLabelsToKeep.Size(), anAllocator); + for (TDF_LabelMap::Iterator aLabelIter (theLabelsToKeep); aLabelIter.More(); aLabelIter.Next()) + { + GetChildShapeLabels (aLabelIter.Key(), aLabelsToKeep); + } + TDF_LabelMap aInternalLabels (1, anAllocator); + for (TDF_LabelMap::Iterator aLabelIter (theLabelsToKeep); aLabelIter.More(); aLabelIter.Next()) + { + GetParentShapeLabels (aLabelIter.Key(), aInternalLabels); + aLabelsToKeep.Unite(aInternalLabels); + aInternalLabels.Clear(false); + } + for(TDF_ChildIterator aLabelIter (theShapeTool->Label(), true); aLabelIter.More(); aLabelIter.Next()) + { + const TDF_Label& aLabel = aLabelIter.Value(); + if (!aLabelsToKeep.Contains (aLabel)) + { + aLabel.ForgetAllAttributes (Standard_False); + } + } + theShapeTool->UpdateAssemblies(); + return true; +} + //======================================================================= //function : RescaleGeometry //purpose : Applies geometrical scale to all assembly parts, component // locations and related attributes //======================================================================= - Standard_Boolean XCAFDoc_Editor::RescaleGeometry(const TDF_Label& theLabel, const Standard_Real theScaleFactor, const Standard_Boolean theForceIfNotRoot) diff --git a/src/XCAFDoc/XCAFDoc_Editor.hxx b/src/XCAFDoc/XCAFDoc_Editor.hxx index 832d522d2d..5c7e38064f 100644 --- a/src/XCAFDoc/XCAFDoc_Editor.hxx +++ b/src/XCAFDoc/XCAFDoc_Editor.hxx @@ -19,6 +19,7 @@ #include #include #include +#include #include class XCAFDoc_VisMaterial; @@ -95,6 +96,34 @@ public: const Standard_Boolean theToCopyVisMaterial = Standard_True, const Standard_Boolean theToCopyAttributes = Standard_True); + //! Gets shape labels that has down relation with the input label. + //! @param[in] theLabel input label + //! @param[out] theRelatedLabels output labels + Standard_EXPORT static void GetParentShapeLabels(const TDF_Label& theLabel, + TDF_LabelMap& theRelatedLabels); + + //! Gets shape labels that has up relation with the input label. + //! @param[in] theLabel input label + //! @param[out] theRelatedLabels output labels + Standard_EXPORT static void GetChildShapeLabels(const TDF_Label& theLabel, + TDF_LabelMap& theRelatedLabels); + + //! Filters original shape tree with keeping structure. + //! The result will include the full label hierarchy lower then input labels. + //! Any higher hierarchy labels will be filtered to keep only necessary labels. + //! All not related shape labels with input will be cleared (all attributes will be removed). + //! + //! The result impact directly into original document and existed shape labels. + //! Attributes related to removed shape can became invalide. + //! For example, GDT with relation on removed shape label(s) and without + //! attachment point(s) became invalid for visualization. + //! + //! @param[in] theShapeTool shape tool to extract from + //! @param[in] theLabelsToKeep labels to keep + //! @return true if the tree was filtered successfully. + Standard_EXPORT static bool FilterShapeTree(const Handle(XCAFDoc_ShapeTool)& theShapeTool, + const TDF_LabelMap& theLabelsToKeep); + //! Applies geometrical scaling to the following assembly components: //! - part geometry //! - sub-assembly/part occurrence location diff --git a/src/XDEDRAW/XDEDRAW_Common.cxx b/src/XDEDRAW/XDEDRAW_Common.cxx index d4f9e82d99..0cf4c52693 100644 --- a/src/XDEDRAW/XDEDRAW_Common.cxx +++ b/src/XDEDRAW/XDEDRAW_Common.cxx @@ -263,6 +263,53 @@ static Standard_Integer Extract(Draw_Interpretor& theDI, return 0; } +//======================================================================= +//function : Filter +//purpose : +//======================================================================= +static Standard_Integer Filter(Draw_Interpretor& theDI, + Standard_Integer theNbArgs, + const char** theArgVec) +{ + if (theNbArgs < 3) + { + theDI << "Use: " << theArgVec[0] << "Doc label1 label2 ...\n"; + return 1; + } + + Handle(TDocStd_Document) aDoc; + DDocStd::GetDocument(theArgVec[1], aDoc); + if (aDoc.IsNull()) + { + theDI << "Error " << theArgVec[1] << " is not a document\n"; + return 1; + } + TDF_LabelMap aSrcShapes; + for (Standard_Integer anArgInd = 2; anArgInd < theNbArgs; anArgInd++) + { + TDF_Label aSrcLabel; + TDF_Tool::Label(aDoc->GetData(), theArgVec[anArgInd], aSrcLabel); + if (aSrcLabel.IsNull() || !XCAFDoc_ShapeTool::IsShape(aSrcLabel)) + { + theDI << "[" << theArgVec[anArgInd] << "] is not valid shape label\n"; + return 1; + } + aSrcShapes.Add(aSrcLabel); + } + if (aSrcShapes.IsEmpty()) + { + theDI << "Error: No Shapes to keep\n"; + return 1; + } + Handle(XCAFDoc_ShapeTool) aShTool = XCAFDoc_DocumentTool::ShapeTool(aDoc->Main()); + if (!XCAFDoc_Editor::FilterShapeTree(aShTool, aSrcShapes)) + { + theDI << "Error: Cannot filter shape tree. Document can be corrupted\n"; + return 1; + } + return 0; +} + //======================================================================= //function : InitCommands //purpose : @@ -288,7 +335,9 @@ void XDEDRAW_Common::InitCommands(Draw_Interpretor& theDI) theDI.Add("XExtract", "XExtract dstDoc [dstAssmblSh] srcDoc srcLabel1 srcLabel2 ...\t" "Extracts given srcLabel1 srcLabel2 ... from srcDoc into given Doc or assembly shape", __FILE__, Extract, aGroup); - + theDI.Add("XShapeTreeFilter", "XShapeTreeFilter Doc label1 label2 ...\t" + "Removes not related labels with input labels from original document. Hierarchical structure is kept", + __FILE__, Filter, aGroup); // Load XSDRAW session for pilot activation XSDRAW::LoadDraw(theDI); } diff --git a/tests/bugs/xde/bug33737 b/tests/bugs/xde/bug33737 new file mode 100644 index 0000000000..563cf66e7d --- /dev/null +++ b/tests/bugs/xde/bug33737 @@ -0,0 +1,61 @@ +puts "========" +puts " 0033737: Data Exchange, XCAF - Implementing filter tree functionality" +puts "========" + +pload DE OCAF + +Close D_orig D_part1 D_part2 D_part3 D_part4 D_part5 -silent + +# get original shape +Close D_orig -silent +XOpen [locate_data_file bug28905_as1-oc-214.xbf] D_orig +XGetOneShape sh_orig D_orig + +# any bolt inside assembly +Close D_orig D_part1 -silent +XOpen [locate_data_file bug28905_as1-oc-214.xbf] D_part1 +XShapeTreeFilter D_part1 "0:1:1:7" +XGetOneShape sh1 D_part1 + +# rod +Close D_part1 D_part2 -silent +XOpen [locate_data_file bug28905_as1-oc-214.xbf] D_part2 +XShapeTreeFilter D_part2 "0:1:1:2:3" +XGetOneShape sh2 D_part2 + +# plate +Close D_part2 D_part3 -silent +XOpen [locate_data_file bug28905_as1-oc-214.xbf] D_part3 +XShapeTreeFilter D_part3 "0:1:1:1:3" +XGetOneShape sh3 D_part3 + +# any nuts +Close D_part3 D_part4 -silent +XOpen [locate_data_file bug28905_as1-oc-214.xbf] D_part4 +XShapeTreeFilter D_part4 "0:1:1:3" +XGetOneShape sh4 D_part4 + +# any nuts +Close D_part4 D_part5 -silent +XOpen [locate_data_file bug28905_as1-oc-214.xbf] D_part5 +XShapeTreeFilter D_part5 "0:1:1:8" +XGetOneShape sh5 D_part5 + +Close D_part5 -silent + +compound sh1 sh2 sh3 sh4 sh5 comp + +set props_orig [vprops sh_orig] +set props_comp [vprops comp] + +checkprops sh_orig -equal comp + +if { ![regexp {Center of gravity[^0-9=]+= +([-0-9.+eE]+)[^0-9=]+= +([-0-9.+eE]+)[^0-9=]+= +([-0-9.+eE]+)} $props_orig full x_orig y_orig z_orig] } { + puts "Error: Problem with properties calculation" +} +if { ![regexp {Center of gravity[^0-9=]+= +([-0-9.+eE]+)[^0-9=]+= +([-0-9.+eE]+)[^0-9=]+= +([-0-9.+eE]+)} $props_comp full x_comp y_comp z_comp] } { + puts "Error: Problem with properties calculation" +} +if {$x_orig != $x_comp || $y_orig != $y_comp || $z_orig != $z_comp} { + puts "Error: Different center of gravity" +} From 5811a330c784c49e64c65fdaa88d01bff444da56 Mon Sep 17 00:00:00 2001 From: akaftase <168822067+akaftase@users.noreply.github.com> Date: Sun, 7 Jul 2024 19:54:35 +0100 Subject: [PATCH 574/639] 0033615: Modeling Algorithms - Partition algorithm creates unexpected vertices This problem occurs because of obtaining 2 ALines which share same vertex on the seam edge. There should be 2 different vertices with same(or almost the same) 3d parameters, but with different UV parameters because of periodic surface. Current fix allows to avoid the same vertices on seam edge and also checks the next vertex. Added consideration of predicted next point to avoid skipping tha point which is not on seam edge. Added test case for #33702 --- src/IntPatch/IntPatch_ALineToWLine.cxx | 20 ++++++++++++++++++++ tests/bugs/modalg_8/bug33615 | 22 ++++++++++++++++++++++ tests/bugs/modalg_8/bug33702 | 12 ++++++++++++ tests/lowalgos/intss/bug29807_i1002 | 2 +- tests/lowalgos/intss/bug29807_i5002 | 2 +- 5 files changed, 56 insertions(+), 2 deletions(-) create mode 100644 tests/bugs/modalg_8/bug33615 create mode 100644 tests/bugs/modalg_8/bug33702 diff --git a/src/IntPatch/IntPatch_ALineToWLine.cxx b/src/IntPatch/IntPatch_ALineToWLine.cxx index 54f8f07453..80dea14330 100644 --- a/src/IntPatch/IntPatch_ALineToWLine.cxx +++ b/src/IntPatch/IntPatch_ALineToWLine.cxx @@ -647,6 +647,26 @@ void IntPatch_ALineToWLine::MakeWLine(const Handle(IntPatch_ALine)& theALine, {// Strictly equal!!! break; } + else if (aParameter + aStep < theLPar) + { + // Prediction of the next point + gp_Pnt aPnt3dNext; + gp_Vec aTg; + theALine->D1(aParameter + aStep, aPnt3dNext, aTg); + Standard_Real anU1 = 0.0, aV1 = 0.0, anU2 = 0.0, aV2 = 0.0; + myQuad1.Parameters(aPnt3dNext, anU1, aV1); + myQuad2.Parameters(aPnt3dNext, anU2, aV2); + IntSurf_PntOn2S aPOn2SNext; + aPOn2SNext.SetValue(aPnt3dNext, anU1, aV1, anU2, aV2); + + if (aPOn2SNext.ValueOnSurface(0).SquareDistance(aRPT.ValueOnSurface(0)) > M_PI * M_PI || + aPOn2SNext.ValueOnSurface(1).SquareDistance(aRPT.ValueOnSurface(1)) > M_PI * M_PI) + { + aPrevLPoint = aRPT; + aPrevParam = aParameter; + continue; + } + } } aPrePointExist = IntPatch_SPntNone; diff --git a/tests/bugs/modalg_8/bug33615 b/tests/bugs/modalg_8/bug33615 new file mode 100644 index 0000000000..ac756f907c --- /dev/null +++ b/tests/bugs/modalg_8/bug33615 @@ -0,0 +1,22 @@ +puts "================================" +puts "0033615: Modeling Algorithms - Partition algorithm creates unexpected vertices" +puts "================================" +puts "" + +plane plane -5 0 4 -1 0 0 +pcone cone plane 3 1 10 +pcylinder cylinder 10 20 +explode cylinder f +explode cone f + +don cylinder_1 cone_1 +axo;fit +bclearobjects +bcleartools +baddobjects cone_1 +baddtools cylinder_1 +bfillds +bbuild result + +checknbshapes result -vertex 5 -edge 8 -wire 5 -face 4 +checkview -display result -2d -path ${imagedir}/${test_image}.png diff --git a/tests/bugs/modalg_8/bug33702 b/tests/bugs/modalg_8/bug33702 new file mode 100644 index 0000000000..831163cc5b --- /dev/null +++ b/tests/bugs/modalg_8/bug33702 @@ -0,0 +1,12 @@ +puts "================================" +puts "0033702: Modeling Algorithms - Regression: Intersection curve is not built between cone and cylinder" +puts "================================" +puts "" + +restore [locate_data_file bug33702_ext.brep] ext +restore [locate_data_file bug33702_rev.brep] rev + +bcut result ext rev + +checknbshapes result -vertex 51 -edge 75 -wire 42 -face 30 +checkview -display result -2d -path ${imagedir}/${test_image}.png diff --git a/tests/lowalgos/intss/bug29807_i1002 b/tests/lowalgos/intss/bug29807_i1002 index 1a4df76d3d..f0c73ccba0 100644 --- a/tests/lowalgos/intss/bug29807_i1002 +++ b/tests/lowalgos/intss/bug29807_i1002 @@ -17,7 +17,7 @@ fit regexp {Tolerance Reached=+([-0-9.+eE]+)\n+([-0-9.+eE]+)} [bopcurves b1_5 b2_2 -2d] full Toler NbCurv -if { ${Toler} > 0.0004} { +if { ${Toler} > 0.002} { puts "Error: bad tolerance of result" } diff --git a/tests/lowalgos/intss/bug29807_i5002 b/tests/lowalgos/intss/bug29807_i5002 index e55dec57c8..74d6d1acf0 100644 --- a/tests/lowalgos/intss/bug29807_i5002 +++ b/tests/lowalgos/intss/bug29807_i5002 @@ -55,6 +55,6 @@ fit checksection result -r 0 checkmaxtol result -min_tol 2.0e-7 -checknbshapes result -edge 3 -vertex 3 +checknbshapes result -edge 2 -vertex 2 checkview -screenshot -2d -path ${imagedir}/${test_image}.png From b8288141311ee5aaa1848f26d0018c2c4007ef5c Mon Sep 17 00:00:00 2001 From: akaftase <168822067+akaftase@users.noreply.github.com> Date: Sun, 7 Jul 2024 19:54:59 +0100 Subject: [PATCH 575/639] 0033541: Modeling Algorithms - Simple sphere cut from cylinder fails Changed condition for combination of WLines into one. WLine would be excluded from consideration for merging, if one of its middle points between vertices is out of domain (does not lie on both surfaces). --- src/IntPatch/IntPatch_WLineTool.cxx | 8 +++----- tests/bugs/modalg_8/bug33541 | 12 ++++++++++++ 2 files changed, 15 insertions(+), 5 deletions(-) create mode 100644 tests/bugs/modalg_8/bug33541 diff --git a/src/IntPatch/IntPatch_WLineTool.cxx b/src/IntPatch/IntPatch_WLineTool.cxx index 6530d7d4b3..766aca20e9 100644 --- a/src/IntPatch/IntPatch_WLineTool.cxx +++ b/src/IntPatch/IntPatch_WLineTool.cxx @@ -1728,7 +1728,6 @@ static Standard_Boolean IsNeedSkipWL(const Handle(IntPatch_WLine)& theWL, { Standard_Real aFirstp, aLastp; Standard_Integer aNbVtx = theWL->NbVertex(); - Standard_Boolean isNeedSkip = Standard_True; for (Standard_Integer i = 1; i < aNbVtx; i++) { aFirstp = theWL->Vertex (i).ParameterOnLine(); @@ -1739,14 +1738,13 @@ static Standard_Boolean IsNeedSkipWL(const Handle(IntPatch_WLine)& theWL, const IntSurf_PntOn2S& aPmid = theWL->Point (pmid); aPmid.Parameters (aU1, aV1, aU2, aV2); - if (!IsOutOfDomain (theBoxS1, theBoxS2, aPmid, theArrPeriods)) + if (IsOutOfDomain (theBoxS1, theBoxS2, aPmid, theArrPeriods)) { - isNeedSkip = Standard_False; - break; + return Standard_True; } } - return isNeedSkip; + return Standard_False; } //======================================================================= diff --git a/tests/bugs/modalg_8/bug33541 b/tests/bugs/modalg_8/bug33541 new file mode 100644 index 0000000000..4af9e791a5 --- /dev/null +++ b/tests/bugs/modalg_8/bug33541 @@ -0,0 +1,12 @@ +puts "================================" +puts "0033541: Modeling Algorithms - Simple sphere cut from cylinder fails" +puts "================================" +puts "" + +pcylinder c 1 1 +psphere s 1 +ttranslate s 1 1 1 +bcut result c s + +checknbshapes result -vertex 3 -edge 5 -wire 4 -face 4 +checkview -display result -2d -path ${imagedir}/${test_image}.png From dc997b884bc608b9bce26e895288fb3f44ae4aa1 Mon Sep 17 00:00:00 2001 From: hosali Date: Thu, 16 May 2024 14:13:13 +0000 Subject: [PATCH 576/639] 0033423: Coding - Memory leak with locale conversion use of stack allocated temp string instead of dynamic one --- src/Resource/Resource_Unicode.cxx | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/Resource/Resource_Unicode.cxx b/src/Resource/Resource_Unicode.cxx index 827a32e9ac..e3e3bd1502 100644 --- a/src/Resource/Resource_Unicode.cxx +++ b/src/Resource/Resource_Unicode.cxx @@ -309,8 +309,7 @@ Standard_Boolean Resource_Unicode::ConvertBig5ToUnicode(const Standard_CString f } else { - Standard_Utf32Char* aChar32 = new Standard_Utf32Char[1]; - aChar32[0] = uni; + Standard_Utf32Char aChar32[] = {uni}; NCollection_Utf32String aStr32(aChar32); NCollection_Utf16String aStr16 = aStr32.ToUtf16(); From 100d03d273c76addabf1105ba865c5434d7fbeb1 Mon Sep 17 00:00:00 2001 From: anv Date: Wed, 26 Jun 2024 12:52:43 +0100 Subject: [PATCH 577/639] 0033748: OCCT:Coding - Changing function signature to a more common one Changing function virtual specifier and return type order to a more common to avoid wrapping issues. --- src/DE/DE_ConfigurationNode.hxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/DE/DE_ConfigurationNode.hxx b/src/DE/DE_ConfigurationNode.hxx index 4f06830c9e..45b653338f 100644 --- a/src/DE/DE_ConfigurationNode.hxx +++ b/src/DE/DE_ConfigurationNode.hxx @@ -147,7 +147,7 @@ public: //! //! The main goal - real-time loading plug-in activation. //! OpenSource components don't need to have activation process. - Standard_EXPORT void virtual CustomActivation(const TColStd_ListOfAsciiString&) {}; + Standard_EXPORT virtual void CustomActivation(const TColStd_ListOfAsciiString&) {}; public: From f39f9838e43879ca3a1582de7150ee651a7942cb Mon Sep 17 00:00:00 2001 From: anv Date: Thu, 27 Jun 2024 16:09:48 +0100 Subject: [PATCH 578/639] 0033751: Shape Healing - Use static values in case of an absent Resource file If a Resource file with parameters for ShapeFix is absent, use static parameters instead if possible. --- src/Resource/Resource_Manager.cxx | 6 ++++-- src/Resource/Resource_Manager.hxx | 4 ++++ src/XSAlgo/XSAlgo_AlgoContainer.cxx | 11 +++-------- 3 files changed, 11 insertions(+), 10 deletions(-) diff --git a/src/Resource/Resource_Manager.cxx b/src/Resource/Resource_Manager.cxx index e773d624d6..7526211ce6 100644 --- a/src/Resource/Resource_Manager.cxx +++ b/src/Resource/Resource_Manager.cxx @@ -62,7 +62,8 @@ Resource_Manager::Resource_Manager (const TCollection_AsciiString& theName, const TCollection_AsciiString& theUserDefaultsDirectory, const Standard_Boolean theIsVerbose) : myName (theName), - myVerbose (theIsVerbose) + myVerbose (theIsVerbose), + myInitialized(Standard_False) { if (!theDefaultsDirectory.IsEmpty()) { @@ -102,7 +103,7 @@ Resource_Manager::Resource_Manager (const TCollection_AsciiString& theName, } Resource_Manager::Resource_Manager(const Standard_CString aName, - const Standard_Boolean Verbose) : myName(aName), myVerbose(Verbose) + const Standard_Boolean Verbose) : myName(aName), myVerbose(Verbose), myInitialized(Standard_False) { OSD_Environment envDebug("ResourceDebug"); Debug = (!envDebug.Value().IsEmpty()) ; @@ -157,6 +158,7 @@ void Resource_Manager::Load(const TCollection_AsciiString& thePath, << "\". File not found or permission denied." << std::endl; return; } + myInitialized = Standard_True; Standard_Integer LineNumber = 1; while ((aKind = WhatKindOfLine(File, Token1, Token2)) != Resource_KOL_End) { switch (aKind) { diff --git a/src/Resource/Resource_Manager.hxx b/src/Resource/Resource_Manager.hxx index 0072a4c71f..6e31ae1e98 100644 --- a/src/Resource/Resource_Manager.hxx +++ b/src/Resource/Resource_Manager.hxx @@ -116,6 +116,9 @@ public: //! Returns internal Ref or User map with parameters Standard_EXPORT Resource_DataMapOfAsciiStringAsciiString& GetMap(Standard_Boolean theRefMap = Standard_True); + + //! Returns true if Resource have been found + Standard_Boolean IsInitialized() const { return myInitialized; } private: @@ -129,6 +132,7 @@ private: Resource_DataMapOfAsciiStringAsciiString myUserMap; Resource_DataMapOfAsciiStringExtendedString myExtStrMap; Standard_Boolean myVerbose; + Standard_Boolean myInitialized; }; diff --git a/src/XSAlgo/XSAlgo_AlgoContainer.cxx b/src/XSAlgo/XSAlgo_AlgoContainer.cxx index 9f639cbd68..d329d85a01 100644 --- a/src/XSAlgo/XSAlgo_AlgoContainer.cxx +++ b/src/XSAlgo/XSAlgo_AlgoContainer.cxx @@ -104,17 +104,12 @@ TopoDS_Shape XSAlgo_AlgoContainer::ProcessShape(const TopoDS_Shape& theShape, if (aContext.IsNull()) { Standard_CString aRscfile = Interface_Static::CVal(thePrscfile); - if (aRscfile != nullptr && strlen(aRscfile) == 0) + aContext = new ShapeProcess_ShapeContext(theShape, aRscfile); + if (!aContext->ResourceManager()->IsInitialized()) { - aContext = new ShapeProcess_ShapeContext(theShape, nullptr); + // If resource file wasn't found, use static values instead Interface_Static::FillMap(aContext->ResourceManager()->GetMap()); } - else - { - if (!aRscfile) - aRscfile = thePrscfile; - aContext = new ShapeProcess_ShapeContext(theShape, aRscfile); - } aContext->SetDetalisation(theDetalisationLevel); } aContext->SetNonManifold(theNonManifold); From c6065f5da9af221c8f7230a05c66ed7e073b724b Mon Sep 17 00:00:00 2001 From: akaftasev Date: Mon, 8 Jul 2024 16:49:52 +0100 Subject: [PATCH 579/639] 0033570: Modeling Algorithms - Incorrect result of cutting spheres The reason of current problem lies inside projection algorithm Function_SetUVBounds() for projection of circle onto sphere produces shifted bounds. Incorrect checking of placement on summit of the sphere was fixed. --- src/ProjLib/ProjLib_ComputeApprox.cxx | 2 +- tests/bugs/modalg_8/bug33570 | 14 ++++++++++++++ 2 files changed, 15 insertions(+), 1 deletion(-) create mode 100644 tests/bugs/modalg_8/bug33570 diff --git a/src/ProjLib/ProjLib_ComputeApprox.cxx b/src/ProjLib/ProjLib_ComputeApprox.cxx index 74cf49ea38..ec336d94db 100644 --- a/src/ProjLib/ProjLib_ComputeApprox.cxx +++ b/src/ProjLib/ProjLib_ComputeApprox.cxx @@ -655,7 +655,7 @@ static void Function_SetUVBounds(Standard_Real& myU1, // si P1.Z() vaut +/- R on est sur le sommet : pas significatif. gp_Pnt pp = P1.Transformed(Trsf); - if ( Abs( Abs(pp.Z()) - R) < Tol) { + if ( Abs(pp.X() * pp.X() + pp.Y() * pp.Y() + pp.Z() * pp.Z() - R * R) < Tol) { gp_Pnt Center = Circle.Location(); Standard_Real U,V; ElSLib::SphereParameters(gp_Ax3(gp::XOY()),1,Center, U, V); diff --git a/tests/bugs/modalg_8/bug33570 b/tests/bugs/modalg_8/bug33570 new file mode 100644 index 0000000000..62c04c2e1d --- /dev/null +++ b/tests/bugs/modalg_8/bug33570 @@ -0,0 +1,14 @@ +puts "================================" +puts "0033570: Modeling Algorithms - Incorrect result of cutting spheres" +puts "================================" +puts "" + +psphere s1 4 +psphere s2 1 +ttranslate s1 0 5.5 18 +ttranslate s2 0 4.5 14 + +bcut result s1 s2 + +checknbshapes result -vertex 4 -edge 7 -wire 2 -face 2 +checkview -display result -2d -path ${imagedir}/${test_image}.png From 5cf1003a66e4ec5f30c2e221b58ba7f90872e7ac Mon Sep 17 00:00:00 2001 From: akaftasev Date: Thu, 18 Apr 2024 17:38:11 +0100 Subject: [PATCH 580/639] 0033689: Canonical Recognition - Circle construction problem Fixed problem with creating null-length gp_Dir --- src/gce/gce_MakeCirc.cxx | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/gce/gce_MakeCirc.cxx b/src/gce/gce_MakeCirc.cxx index 18ecf6b2b1..0e7ffcda00 100644 --- a/src/gce/gce_MakeCirc.cxx +++ b/src/gce/gce_MakeCirc.cxx @@ -141,6 +141,13 @@ gce_MakeCirc::gce_MakeCirc(const gp_Pnt& P1 , dist2 = P2.Distance(pInt); dist3 = P3.Distance(pInt); pInt.Coord(x3,y3,z3); + if (dist1 < aResolution) + { + gp_Dir Dirx(1., 0., 0.); + gp_Dir Dirz(0., 0., 1.); + TheCirc = gp_Circ(gp_Ax2(pInt, Dirx, Dirz), 0.); + return; + } Dir1 = gp_Dir(x1-x3,y1-y3,z1-z3); //modified by NIZNHY-PKV Thu Mar 3 11:31:11 2005f //Dir2 = gp_Dir(x2-x3,y2-y3,z2-z3); From 76df27830b8229fad7f2046c03c55ebcc58b52ae Mon Sep 17 00:00:00 2001 From: luzpaz Date: Sun, 14 Jul 2024 10:19:44 -0400 Subject: [PATCH 581/639] 0033762: Documentation - Fix various typos found in codebase --- adm/templates/env.bat.in | 2 +- adm/templates/env.sh | 2 +- .../boolean_operations/boolean_operations.md | 8 ++++---- dox/specification/pbr_math.md | 2 +- dox/user_guides/de_wrapper/de_wrapper.md | 8 ++++---- dox/user_guides/draw_test_harness/draw_test_harness.md | 2 +- dox/user_guides/iges/iges.md | 2 +- dox/user_guides/modeling_algos/modeling_algos.md | 2 +- dox/user_guides/modeling_data/modeling_data.md | 2 +- samples/glfw/CMakeLists.txt | 2 +- samples/ocafsamples/TDataStd_Sample.cxx | 2 +- samples/ocafsamples/TPrsStd_Sample.cxx | 4 ++-- samples/qt/AndroidQt/ReadMe.md | 2 +- src/BOPTools/BOPTools_AlgoTools.cxx | 1 + src/BRepFeat/BRepFeat_RibSlot.cxx | 2 +- src/BRepOffset/BRepOffset_MakeOffset.cxx | 2 +- src/ChFi2d/ChFi2d_FilletAlgo.cxx | 2 +- src/DrawResources/CheckCommands.tcl | 2 +- src/DsgPrs/DsgPrs_AnglePresentation.cxx | 2 +- src/DsgPrs/DsgPrs_AnglePresentation.hxx | 2 +- src/DsgPrs/DsgPrs_EqualRadiusPresentation.cxx | 2 +- src/IFSelect/IFSelect_GeneralModifier.hxx | 2 +- src/IFSelect/IFSelect_IntParam.hxx | 2 +- src/IFSelect/IFSelect_SignatureList.hxx | 2 +- src/IGESGeom/IGESGeom_CopiousData.cxx | 2 +- src/Image/Image_AlienPixMap.cxx | 2 +- src/Image/Image_Diff.hxx | 2 +- src/Interface/Interface_IntList.hxx | 2 +- src/NCollection/NCollection_CellFilter.hxx | 4 ++-- src/NCollection/NCollection_Mat4.hxx | 2 +- src/QABugs/QABugs_20.cxx | 2 +- src/ShapeFix/ShapeFix_ComposeShell.cxx | 2 +- src/ShapeFix/ShapeFix_ComposeShell.hxx | 2 +- src/ShapeFix/ShapeFix_Edge.cxx | 2 +- src/ShapeFix/ShapeFix_Shell.hxx | 2 +- src/ShapeFix/ShapeFix_Wire.cxx | 4 ++-- src/ShapeUpgrade/ShapeUpgrade_ShapeConvertToBezier.hxx | 2 +- src/ShapeUpgrade/ShapeUpgrade_ShapeDivide.hxx | 2 +- src/StepData/StepData_ReadWriteModule.hxx | 2 +- src/TCollection/TCollection.cxx | 2 +- src/TDocStd/TDocStd_Document.hxx | 4 ++-- src/TDocStd/TDocStd_XLinkTool.cxx | 2 +- src/TFunction/TFunction_Logbook.cxx | 2 +- src/Transfer/Transfer_ActorOfProcessForFinder.hxx | 2 +- src/Transfer/Transfer_ActorOfProcessForTransient.hxx | 2 +- src/Transfer/Transfer_TransientProcess.hxx | 4 ++-- src/XmlObjMgt/XmlObjMgt.cxx | 2 +- tests/bugs/fclasses/bug9848_1 | 2 +- tests/bugs/fclasses/bug9848_2 | 2 +- tests/bugs/modalg_5/bug24003 | 2 +- tests/bugs/modalg_6/bug26313 | 2 +- tests/bugs/step/bug233 | 2 +- tests/bugs/step/pro19854 | 2 +- tests/bugs/step/pro19895 | 2 +- tests/lowalgos/intss/bug23699 | 2 +- tests/lowalgos/intss/bug23732 | 2 +- tests/perf/de/bug33046 | 2 +- tests/perf/modalg/bug29093 | 2 +- 58 files changed, 69 insertions(+), 68 deletions(-) diff --git a/adm/templates/env.bat.in b/adm/templates/env.bat.in index 24df954e68..aa3bf6efc7 100644 --- a/adm/templates/env.bat.in +++ b/adm/templates/env.bat.in @@ -21,7 +21,7 @@ rem ----- Decode VCVER variable and define related ones ----- rem rem VCFMT - "vc" followed by full version number of Visual Studio toolset rem (same as VCVER without optional suffix "-uwp") -rem VCLIB - name of folder contining binaries +rem VCLIB - name of folder containing binaries rem (same as VCVER except without third version in number) rem VCPROP - name of required Visual Studion Workload (starting with VS 2017) rem diff --git a/adm/templates/env.sh b/adm/templates/env.sh index 4ab363e153..57a103eac0 100644 --- a/adm/templates/env.sh +++ b/adm/templates/env.sh @@ -104,7 +104,7 @@ fi export CSF_OPT_CMPL="" -# Optiona 3rd-parties should be enabled by HAVE macros +# Optional 3rd-parties should be enabled by HAVE macros if [ "$HAVE_TBB" == "true" ]; then export CSF_OPT_CMPL="${CSF_OPT_CMPL} -DHAVE_TBB"; fi if [ "$HAVE_OPENCL" == "true" ]; then export CSF_OPT_CMPL="${CSF_OPT_CMPL} -DHAVE_OPENCL"; fi if [ "$HAVE_TK" == "true" ]; then export CSF_OPT_CMPL="${CSF_OPT_CMPL} -DHAVE_TK"; fi diff --git a/dox/specification/boolean_operations/boolean_operations.md b/dox/specification/boolean_operations/boolean_operations.md index 1d2fac6b72..f57c183e92 100644 --- a/dox/specification/boolean_operations/boolean_operations.md +++ b/dox/specification/boolean_operations/boolean_operations.md @@ -3306,7 +3306,7 @@ The following example illustrates how to use Common operation: Standard_Real aFuzzyValue; BRepAlgoAPI_Common aBuilder; - // perpare the arguments + // prepare the arguments TopTools_ListOfShape& aLS=…; TopTools_ListOfShape& aLT=…; // @@ -3373,7 +3373,7 @@ The following example illustrates how to use Fuse operation: Standard_Real aFuzzyValue; BRepAlgoAPI_Fuse aBuilder; - // perpare the arguments + // prepare the arguments TopTools_ListOfShape& aLS=…; TopTools_ListOfShape& aLT=…; // @@ -3440,7 +3440,7 @@ The following example illustrates how to use Cut operation: Standard_Real aFuzzyValue; BRepAlgoAPI_Cut aBuilder; - // perpare the arguments + // prepare the arguments TopTools_ListOfShape& aLS=…; TopTools_ListOfShape& aLT=…; // @@ -3508,7 +3508,7 @@ The following example illustrates how to use Section operation: Standard_Real aFuzzyValue; BRepAlgoAPI_Section aBuilder; - // perpare the arguments + // prepare the arguments TopTools_ListOfShape& aLS=…; TopTools_ListOfShape& aLT=…; // diff --git a/dox/specification/pbr_math.md b/dox/specification/pbr_math.md index 8f68accd28..52f68b26df 100644 --- a/dox/specification/pbr_math.md +++ b/dox/specification/pbr_math.md @@ -410,7 +410,7 @@ Current goal is to speed up Monte-Carlo integration of Cook-Torrance like integr Where \f$g(v, l)\f$ is just arbitrary function representing Fresnel's factor itself or its components. In order to increase convergence the samples with larger contribution (or in other words with larger function's values) have to appear more frequently than others proportionally to its contribution. -So that less significant summand with less influence to result will be considered rarely and in opposite way parts brining noticeable changes to the sum will be taken often. +So that less significant summand with less influence to result will be considered rarely and in opposite way parts bringing noticeable changes to the sum will be taken often. That is the main idea of **importance sampling technique**. \f$p(l)\f$ has to represent significance of sample in terms of integrated function via probability somehow. And it will be like that if PDF is already part of original function because in that case probability density directly affects to contribution forming. diff --git a/dox/user_guides/de_wrapper/de_wrapper.md b/dox/user_guides/de_wrapper/de_wrapper.md index 8bbbb10a25..13b0a348b7 100644 --- a/dox/user_guides/de_wrapper/de_wrapper.md +++ b/dox/user_guides/de_wrapper/de_wrapper.md @@ -212,7 +212,7 @@ pload XDE @subsubsection occt_de_wrapper_3_3_3 Realtime initialization. Code sample -It is possible to change a paramater from code using a smart pointer. +It is possible to change a parameter from code using a smart pointer. ~~~~{.cpp} // global variable @@ -239,7 +239,7 @@ THE_STEP_NODE->InternalParameters.ReadProps = false; @subsection occt_de_wrapper_3_4 Priority of Vendors -DE session is able to work with several vendors with the same supported CAD format. To choose the preffered vendor for each format, use a special priority list. +DE session is able to work with several vendors with the same supported CAD format. To choose the preferred vendor for each format, use a special priority list. If the high priority vendor's provider is not supported, a transfer operation is needed (write/read), then the next vendor will be chosen. @@ -251,7 +251,7 @@ If the high priority vendor's provider is not supported, a transfer operation is TColStd_ListOfAsciiString aVendors; aVendors.Appends("OCC"); // high priority aVendors.Appends("DTK"); - // Flag to disable not choosen vendors, in this case configuration is possible + // Flag to disable not chosen vendors, in this case configuration is possible // otherwise, lower their priority and continue to check ability to transfer Standard_Boolean aToDisable = Standard_True; aSession->ChangePriority(aFormat, aVendors, aToDisable); @@ -352,7 +352,7 @@ It is possible to read and write CAD files directly from a special provider. ~~~~{.cpp} // Creating or getting node Handle(STEPCAFControl_ConfigurationNode) aNode = new STEPCAFControl_ConfigurationNode(); -// Creationg an one-time provider +// Creating an one-time provider Handle(DE_Provider) aProvider = aNode->BuildProvider(); // Setting configuration with all parameters aProvider->SetNode(aNode); diff --git a/dox/user_guides/draw_test_harness/draw_test_harness.md b/dox/user_guides/draw_test_harness/draw_test_harness.md index faf18d81f4..ea8316fdae 100644 --- a/dox/user_guides/draw_test_harness/draw_test_harness.md +++ b/dox/user_guides/draw_test_harness/draw_test_harness.md @@ -4878,7 +4878,7 @@ For a curve at a given parameter, and depending on the number of arguments, **cv **Example:** -Let on a bezier curve at parameter 0 the point is the first pole; the first derivative is the vector to the second pole multiplied by the degree; the second derivative is the difference first to the second pole, second to the third pole multipied by *degree-1* : +Let on a bezier curve at parameter 0 the point is the first pole; the first derivative is the vector to the second pole multiplied by the degree; the second derivative is the difference first to the second pole, second to the third pole multiplied by *degree-1* : ~~~~{.php} 2dbeziercurve c 4 0 0 1 1 2 1 3 0 diff --git a/dox/user_guides/iges/iges.md b/dox/user_guides/iges/iges.md index 1db3f4dec8..0f8028117e 100644 --- a/dox/user_guides/iges/iges.md +++ b/dox/user_guides/iges/iges.md @@ -193,7 +193,7 @@ Modify this parameter with: if (!Interface_Static::SetIVal ("read.stdsameparameter.mode",1)) .. error ..; ~~~~ -Deafault value is 0 (Off). +Default value is 0 (Off).

    read.surfacecurve.mode

    preference for the computation of curves in case of 2D/3D inconsistency in an entity which has both 2D and 3D representations. diff --git a/dox/user_guides/modeling_algos/modeling_algos.md b/dox/user_guides/modeling_algos/modeling_algos.md index 653025b2b5..450473d44a 100644 --- a/dox/user_guides/modeling_algos/modeling_algos.md +++ b/dox/user_guides/modeling_algos/modeling_algos.md @@ -2329,7 +2329,7 @@ else { @subsubsection occt_modalg_7_4 Pipe Constructor -*BRepOffsetAPI_MakePipe* class allows creating a pipe from a Spine, which is a Wire and a Profile which is a Shape. This implementation is limited to spines with smooth transitions, sharp transitions are precessed by *BRepOffsetAPI_MakePipeShell*. To be more precise the continuity must be G1, which means that the tangent must have the same direction, though not necessarily the same magnitude, at neighboring edges. +*BRepOffsetAPI_MakePipe* class allows creating a pipe from a Spine, which is a Wire and a Profile which is a Shape. This implementation is limited to spines with smooth transitions, sharp transitions are processed by *BRepOffsetAPI_MakePipeShell*. To be more precise the continuity must be G1, which means that the tangent must have the same direction, though not necessarily the same magnitude, at neighboring edges. The angle between the spine and the profile is preserved throughout the pipe. diff --git a/dox/user_guides/modeling_data/modeling_data.md b/dox/user_guides/modeling_data/modeling_data.md index 9ab0afd1db..4099d24c56 100644 --- a/dox/user_guides/modeling_data/modeling_data.md +++ b/dox/user_guides/modeling_data/modeling_data.md @@ -340,7 +340,7 @@ The GeomConvert package also provides the following: * global functions to construct BSpline surfaces created by this splitting algorithm, or by other types of BSpline surface segmentation, * an algorithm, which converts a BSpline surface into a series of adjacent Bezier surfaces, * an algorithm, which converts a grid of adjacent Bezier surfaces into a BSpline surface. - * algorithms that converts NURBS, Bezier and other general parametrized curves and surface into anaytical curves and surfaces. + * algorithms that converts NURBS, Bezier and other general parametrized curves and surface into analytical curves and surfaces. @subsection occt_modat_1_4 Points on Curves diff --git a/samples/glfw/CMakeLists.txt b/samples/glfw/CMakeLists.txt index c647b13519..f0328a9f61 100644 --- a/samples/glfw/CMakeLists.txt +++ b/samples/glfw/CMakeLists.txt @@ -27,7 +27,7 @@ find_package(OpenGL REQUIRED) # Open CASCADE Technology find_package (OpenCASCADE REQUIRED) if (NOT OpenCASCADE_FOUND) - message (FATAL_ERROR "coult not find OpenCASCADE, please set OpenCASCADE_DIR variable" ) + message (FATAL_ERROR "could not find OpenCASCADE, please set OpenCASCADE_DIR variable" ) else() message (STATUS "Using OpenCASCADE from \"${OpenCASCADE_INSTALL_PREFIX}\"" ) message (STATUS "OpenCASCADE_INCLUDE_DIR=${OpenCASCADE_INCLUDE_DIR}") diff --git a/samples/ocafsamples/TDataStd_Sample.cxx b/samples/ocafsamples/TDataStd_Sample.cxx index 714fd7046f..f92f1037b8 100644 --- a/samples/ocafsamples/TDataStd_Sample.cxx +++ b/samples/ocafsamples/TDataStd_Sample.cxx @@ -346,7 +346,7 @@ static void Sample() constraint->Set(TDataXtd_PARALLEL, NS1, NS2); - // Getting number of geometries which define a constarint + // Getting number of geometries which define a constraint Standard_Integer number = constraint->NbGeometries(); diff --git a/samples/ocafsamples/TPrsStd_Sample.cxx b/samples/ocafsamples/TPrsStd_Sample.cxx index d87ff7a519..9cf16ec078 100644 --- a/samples/ocafsamples/TPrsStd_Sample.cxx +++ b/samples/ocafsamples/TPrsStd_Sample.cxx @@ -167,7 +167,7 @@ static void Sample() if( ShapeLabel.FindAttribute(TPrsStd_AISPresentation::GetID(), PRS) ) PRS->Erase(); // The method Erase() marks presentation of attribute as erased in AIS_InteractiveContext; // in order to make changes visible in a viewer's window viewer has to be updated - TPrsStd_AISViewer::Update(ShapeLabel); //Update viewer to erase presenation of the attribute in a viewer's window + TPrsStd_AISViewer::Update(ShapeLabel); //Update viewer to erase presentation of the attribute in a viewer's window //Presentation of the attribute is erased from viewer but // stays in AIS_InteractiveContext @@ -182,7 +182,7 @@ static void Sample() // Updating and displaying presentation of the attribute to be displayed P->Display(Standard_True); - TPrsStd_AISViewer::Update(ShapeLabel); //Update presenation of the attribute in a viewer's window + TPrsStd_AISViewer::Update(ShapeLabel); //Update presentation of the attribute in a viewer's window //Getting Standard_GUID of attribute with which TPrsStd_AISPresentation attribute is associated diff --git a/samples/qt/AndroidQt/ReadMe.md b/samples/qt/AndroidQt/ReadMe.md index 732d5dceda..5257119863 100644 --- a/samples/qt/AndroidQt/ReadMe.md +++ b/samples/qt/AndroidQt/ReadMe.md @@ -41,7 +41,7 @@ Tools->Options->Android * In Android SDK location specify path to Android SDK * In Android NDK location specify path to Android NDK (During this location definition, warning is possible and OK: - "Qt version for architecture mips is missing. To add the Qt version, select Options > Build & Run > Qt Versins.") + "Qt version for architecture mips is missing. To add the Qt version, select Options > Build & Run > Qt Versions.") * In Ant executable specify path to ant.bat file located in Apache Ant bin directory Make sure that "Android for armeabi-v7a" kit has been detected (present in the list). diff --git a/src/BOPTools/BOPTools_AlgoTools.cxx b/src/BOPTools/BOPTools_AlgoTools.cxx index 78322a73c5..bf640ed86e 100644 --- a/src/BOPTools/BOPTools_AlgoTools.cxx +++ b/src/BOPTools/BOPTools_AlgoTools.cxx @@ -1924,6 +1924,7 @@ Standard_Boolean BOPTools_AlgoTools::IsBlockInOnFace return bFlag; } // + // Treatment intemediate Standard_Real m1, aTolF, aTolE, aTol, aDist; m1=IntTools_Tools::IntermediatePoint(f1, l1); diff --git a/src/BRepFeat/BRepFeat_RibSlot.cxx b/src/BRepFeat/BRepFeat_RibSlot.cxx index 94a8f0b5c4..f1242fb882 100644 --- a/src/BRepFeat/BRepFeat_RibSlot.cxx +++ b/src/BRepFeat/BRepFeat_RibSlot.cxx @@ -540,7 +540,7 @@ Standard_Real BRepFeat_RibSlot::IntPar(const Handle(Geom_Curve)& C, //======================================================================= //function : EdgeExtention -//purpose : extention of a edge by tangence +//purpose : extension of a edge by tangence //======================================================================= void BRepFeat_RibSlot::EdgeExtention(TopoDS_Edge& e, diff --git a/src/BRepOffset/BRepOffset_MakeOffset.cxx b/src/BRepOffset/BRepOffset_MakeOffset.cxx index da3e404dbd..3602b39500 100644 --- a/src/BRepOffset/BRepOffset_MakeOffset.cxx +++ b/src/BRepOffset/BRepOffset_MakeOffset.cxx @@ -2986,7 +2986,7 @@ void BRepOffset_MakeOffset::MakeMissingWalls (const Message_ProgressRange& theRa // (one of reson is mixed connectivity of faces) // algoritm of cutting offset edge by intersection line // can fail and offset edge cannot get vertices. - // Follwing workaround is only to avoid exeption if V3 and V4 are Null + // Follwing workaround is only to avoid exception if V3 and V4 are Null // Vertex points are invalid. Standard_Real anOEF, anOEL; TopAbs_Orientation anOEOri = OE.Orientation(); diff --git a/src/ChFi2d/ChFi2d_FilletAlgo.cxx b/src/ChFi2d/ChFi2d_FilletAlgo.cxx index 8ef57b9b3f..4af213b0ac 100644 --- a/src/ChFi2d/ChFi2d_FilletAlgo.cxx +++ b/src/ChFi2d/ChFi2d_FilletAlgo.cxx @@ -453,7 +453,7 @@ void ChFi2d_FilletAlgo::PerformNewton(FilletPoint* theLeft, FilletPoint* theRigh else { if (Abs(aB) > Abs(aDet * 1000000.)) - { // possible floating point operations accurancy errors + { // possible floating point operations accuracy errors //std::cout<<"*"; ProcessPoint(theLeft, theRight, theLeft->getParam() + aDX / 2.0); // linear division otherwise } diff --git a/src/DrawResources/CheckCommands.tcl b/src/DrawResources/CheckCommands.tcl index e39a130e23..ad46265ed4 100644 --- a/src/DrawResources/CheckCommands.tcl +++ b/src/DrawResources/CheckCommands.tcl @@ -524,7 +524,7 @@ help checkprops { -deps DEPSILON: the epsilon defines relative precision to compare corresponding values -equal SHAPE: compare area\volume\length of input shapes. Puts error if its are not equal -notequal SHAPE: compare area\volume\length of input shapes. Puts error if its are equal - -skip: count shared shapes only once, skipping repeatitions + -skip: count shared shapes only once, skipping repetitions Options -l, -s and -v are independent and can be used in any order. Tolerance epsilon is the same for all options. } diff --git a/src/DsgPrs/DsgPrs_AnglePresentation.cxx b/src/DsgPrs/DsgPrs_AnglePresentation.cxx index 1a8729bf6c..073cd3bc3a 100644 --- a/src/DsgPrs/DsgPrs_AnglePresentation.cxx +++ b/src/DsgPrs/DsgPrs_AnglePresentation.cxx @@ -39,7 +39,7 @@ #include //------------------------------------------------------------------------------------------------------------------ -// Returns 1 if C is above of CMin; 0 if C is bitween CMin and CMax; -1 if C is Below CMax +// Returns 1 if C is above of CMin; 0 if C is between CMin and CMax; -1 if C is Below CMax //----------------------------------------------------------------------------------------------------------------- static Standard_Integer AboveInBelowCone(const gp_Circ &CMax, const gp_Circ &CMin, const gp_Circ &C) { diff --git a/src/DsgPrs/DsgPrs_AnglePresentation.hxx b/src/DsgPrs/DsgPrs_AnglePresentation.hxx index f24538b1a6..8ec18f222c 100644 --- a/src/DsgPrs/DsgPrs_AnglePresentation.hxx +++ b/src/DsgPrs/DsgPrs_AnglePresentation.hxx @@ -40,7 +40,7 @@ public: DEFINE_STANDARD_ALLOC - //! Draws the presenation of the full angle of a cone. + //! Draws the presentation of the full angle of a cone. //! VminCircle - a circle at V parameter = Vmin //! VmaxCircle - a circle at V parameter = Vmax //! aCircle - a circle at V parameter from projection of aPosition to axis of the cone diff --git a/src/DsgPrs/DsgPrs_EqualRadiusPresentation.cxx b/src/DsgPrs/DsgPrs_EqualRadiusPresentation.cxx index 2d1e9825be..3bcab79293 100644 --- a/src/DsgPrs/DsgPrs_EqualRadiusPresentation.cxx +++ b/src/DsgPrs/DsgPrs_EqualRadiusPresentation.cxx @@ -55,7 +55,7 @@ void DsgPrs_EqualRadiusPresentation::Add( const Handle( Prs3d_Presentation )& aP DsgPrs::ComputeSymbol( aPresentation, LA, FirstCenter, FirstPoint, FirstDir.Reversed(), FirstDir, DsgPrs_AS_FIRSTPT_LASTAR ); DsgPrs::ComputeSymbol( aPresentation, LA, SecondCenter, SecondPoint, SecondDir.Reversed(), SecondDir, DsgPrs_AS_FIRSTPT_LASTAR ); -//ota === beging === +//ota === begin === gp_Pnt Middle( (FirstCenter.XYZ() + SecondCenter.XYZ()) *0.5 ), aTextPos; Standard_Real SmallDist; //Mark of constraint diff --git a/src/IFSelect/IFSelect_GeneralModifier.hxx b/src/IFSelect/IFSelect_GeneralModifier.hxx index 0a53c8ba73..4a86b80708 100644 --- a/src/IFSelect/IFSelect_GeneralModifier.hxx +++ b/src/IFSelect/IFSelect_GeneralModifier.hxx @@ -65,7 +65,7 @@ class IFSelect_GeneralModifier : public Standard_Transient public: //! Returns True if this modifier may change the graph of - //! dependences (aknowledged at creation time) + //! dependences (acknowledged at creation time) Standard_EXPORT Standard_Boolean MayChangeGraph() const; //! Attaches to a Dispatch. If is Null, Resets it diff --git a/src/IFSelect/IFSelect_IntParam.hxx b/src/IFSelect/IFSelect_IntParam.hxx index 0bd3d56c98..8320d60699 100644 --- a/src/IFSelect/IFSelect_IntParam.hxx +++ b/src/IFSelect/IFSelect_IntParam.hxx @@ -40,7 +40,7 @@ DEFINE_STANDARD_HANDLE(IFSelect_IntParam, Standard_Transient) //! to get its Handle. //! For an Integer, an IntParam can designate (by its name) a //! Static : each time its value is required or set, the Static -//! is aknowledged +//! is acknowledged class IFSelect_IntParam : public Standard_Transient { diff --git a/src/IFSelect/IFSelect_SignatureList.hxx b/src/IFSelect/IFSelect_SignatureList.hxx index 110e5e6cf2..72247a0d6c 100644 --- a/src/IFSelect/IFSelect_SignatureList.hxx +++ b/src/IFSelect/IFSelect_SignatureList.hxx @@ -87,7 +87,7 @@ public: //! begin by Standard_EXPORT Handle(TColStd_HSequenceOfHAsciiString) List (const Standard_CString root = "") const; - //! Returns True if the list of Entities is aknowledged, else + //! Returns True if the list of Entities is acknowledged, else //! the method Entities will always return a Null Handle Standard_EXPORT Standard_Boolean HasEntities() const; diff --git a/src/IGESGeom/IGESGeom_CopiousData.cxx b/src/IGESGeom/IGESGeom_CopiousData.cxx index af1129fbd1..951619296d 100644 --- a/src/IGESGeom/IGESGeom_CopiousData.cxx +++ b/src/IGESGeom/IGESGeom_CopiousData.cxx @@ -37,7 +37,7 @@ IGESGeom_CopiousData::IGESGeom_CopiousData () const Standard_Real aZPlane, const Handle(TColStd_HArray1OfReal)& allData) { - // PTV OCC386 crach application while reading So5771b.igs + // PTV OCC386 crash application while reading So5771b.igs if (allData.IsNull()) throw Standard_NullObject("IGESGeom_CopiousData : Init with null data"); diff --git a/src/Image/Image_AlienPixMap.cxx b/src/Image/Image_AlienPixMap.cxx index f869e8fc16..3ee7570e5c 100644 --- a/src/Image/Image_AlienPixMap.cxx +++ b/src/Image/Image_AlienPixMap.cxx @@ -1098,7 +1098,7 @@ bool Image_AlienPixMap::Save (Standard_Byte* theBuffer, if (theBuffer != NULL) { // a memory buffer wrapped by FreeImage is read only (images can be loaded but not be saved) - // so we call FreeImage_OpenMemory() with default arguments and just memcpy in requsted buffer. + // so we call FreeImage_OpenMemory() with default arguments and just memcpy in requested buffer. FIMEMORY* aFiMem = FreeImage_OpenMemory(); isSaved = (FreeImage_SaveToMemory (anImageFormat, anImageToDump, aFiMem) != FALSE); BYTE* aData = NULL; diff --git a/src/Image/Image_Diff.hxx b/src/Image/Image_Diff.hxx index 6ce4b8f03b..2645f64ad6 100644 --- a/src/Image/Image_Diff.hxx +++ b/src/Image/Image_Diff.hxx @@ -37,7 +37,7 @@ //! (about 90 degree between the normal and the direction to the user's eye). //! Deflection of the light for such a triangle depends on implementation of the video driver. //! In order to skip this difference the following algorithm is used: -//! a) "Different" pixels are groupped and checked on "one-pixel width line". +//! a) "Different" pixels are grouped and checked on "one-pixel width line". //! indeed, the pixels may represent not a line, but any curve. //! But the width of this curve should be not more than a pixel. //! This group of pixels become a candidate to be ignored because of boundary effect. diff --git a/src/Interface/Interface_IntList.hxx b/src/Interface/Interface_IntList.hxx index 271c0baf41..6b686e2f58 100644 --- a/src/Interface/Interface_IntList.hxx +++ b/src/Interface/Interface_IntList.hxx @@ -74,7 +74,7 @@ public: //! Returns internal values, used for copying Standard_EXPORT void Internals (Standard_Integer& nbrefs, Handle(TColStd_HArray1OfInteger)& ents, Handle(TColStd_HArray1OfInteger)& refs) const; - //! Returns count of entities to be aknowledged + //! Returns count of entities to be acknowledged Standard_EXPORT Standard_Integer NbEntities() const; //! Changes the count of entities (ignored if decreased) diff --git a/src/NCollection/NCollection_CellFilter.hxx b/src/NCollection/NCollection_CellFilter.hxx index 1663456b03..2e8abbaf23 100644 --- a/src/NCollection/NCollection_CellFilter.hxx +++ b/src/NCollection/NCollection_CellFilter.hxx @@ -22,7 +22,7 @@ #include #include -//! Auxiliary enumeration serving as responce from method Inspect +//! Auxiliary enumeration serving as response from method Inspect enum NCollection_CellFilter_Action { CellFilter_Keep = 0, //!< Target is needed and should be kept @@ -136,7 +136,7 @@ public: Reset (theCellSize, theAlloc); } - //! Constructor when dimenstion count is known at compilation time. + //! Constructor when dimension count is known at compilation time. NCollection_CellFilter (const Standard_Real theCellSize = 0, const Handle(NCollection_IncAllocator)& theAlloc = 0) : myCellSize(0, Inspector::Dimension - 1) diff --git a/src/NCollection/NCollection_Mat4.hxx b/src/NCollection/NCollection_Mat4.hxx index 141a7de93d..e885b64771 100755 --- a/src/NCollection/NCollection_Mat4.hxx +++ b/src/NCollection/NCollection_Mat4.hxx @@ -36,7 +36,7 @@ public: } //! Get number of columns. - //! @retur number of columns. + //! @return number of columns. static size_t Cols() { return 4; diff --git a/src/QABugs/QABugs_20.cxx b/src/QABugs/QABugs_20.cxx index cd3769d074..c76a27751f 100644 --- a/src/QABugs/QABugs_20.cxx +++ b/src/QABugs/QABugs_20.cxx @@ -4581,7 +4581,7 @@ void QABugs::Commands_20(Draw_Interpretor& theCommands) { __FILE__, QACheckBends, group); theCommands.Add("OCC26441", - "OCC26441 shape ref_shape [tol [all_diff 0/1]] \nif all_diff = 0, only icreasing tolerances is considered" , + "OCC26441 shape ref_shape [tol [all_diff 0/1]] \nif all_diff = 0, only increasing tolerances is considered" , __FILE__, OCC26441, group); diff --git a/src/ShapeFix/ShapeFix_ComposeShell.cxx b/src/ShapeFix/ShapeFix_ComposeShell.cxx index 2e5e826560..45bc2f6e93 100644 --- a/src/ShapeFix/ShapeFix_ComposeShell.cxx +++ b/src/ShapeFix/ShapeFix_ComposeShell.cxx @@ -923,7 +923,7 @@ ShapeFix_WireSegment ShapeFix_ComposeShell::SplitWire (ShapeFix_WireSegment &wir } } - //pdn Claculating parametric shift + //pdn Calculating parametric shift Standard_Boolean sp = (f3d == firstPar && l3d == lastPar); Standard_Real span2d = lastPar - firstPar; // Standard_Real ln2d = lastPar-prevPar; diff --git a/src/ShapeFix/ShapeFix_ComposeShell.hxx b/src/ShapeFix/ShapeFix_ComposeShell.hxx index a53d8da4c1..ef22cb6104 100644 --- a/src/ShapeFix/ShapeFix_ComposeShell.hxx +++ b/src/ShapeFix/ShapeFix_ComposeShell.hxx @@ -227,7 +227,7 @@ protected: //! wires. This is done by traversing all the segments in allowed //! directions, starting only from the REVERSED and FORWARD and //! taking EXTERNAL as necessary in fork points. Forks are detected - //! by common vertices. In fork point, most left way is seleccted + //! by common vertices. In fork point, most left way is selected //! among all possible ways. Standard_EXPORT void CollectWires (ShapeFix_SequenceOfWireSegment& wires, ShapeFix_SequenceOfWireSegment& seqw); diff --git a/src/ShapeFix/ShapeFix_Edge.cxx b/src/ShapeFix/ShapeFix_Edge.cxx index cebe39c89f..dcd5d29a18 100644 --- a/src/ShapeFix/ShapeFix_Edge.cxx +++ b/src/ShapeFix/ShapeFix_Edge.cxx @@ -515,7 +515,7 @@ Standard_Boolean ShapeFix_Edge::FixAddPCurve (const TopoDS_Edge& edge, // Ici, on exploite les infos deja connues Standard_Real uf,ul,vf,vl; surf->Bounds (uf,ul,vf,vl); - //#4 rln 19/02/98 ProSTEP ug_exhaust-A.stp entity #284920 (thoroidal surface) + //#4 rln 19/02/98 ProSTEP ug_exhaust-A.stp entity #284920 (toroidal surface) //#13 rln 17/03/98 (updating fix #4) call to TranslatePCurve in the case //when a surface is either u- and vclosed or neither u- nor vclosed //#78 rln 12.03.99 S4135: checking spatial closure with prec diff --git a/src/ShapeFix/ShapeFix_Shell.hxx b/src/ShapeFix/ShapeFix_Shell.hxx index 4942e07c35..c6ec294aa4 100644 --- a/src/ShapeFix/ShapeFix_Shell.hxx +++ b/src/ShapeFix/ShapeFix_Shell.hxx @@ -68,7 +68,7 @@ public: //! isAccountMultiConex - mode for account cases of multiconnexity. //! If this mode is equal to Standard_True, separate shells will be created //! in the cases of multiconnexity. If this mode is equal to Standard_False, - //! one shell will be created without account of multiconnexity.By defautt - Standard_True; + //! one shell will be created without account of multiconnexity.By default - Standard_True; //! NonManifold - mode for creation of non-manifold shells. //! If this mode is equal to Standard_True one non-manifold will be created from shell //! contains multishared edges. Else if this mode is equal to Standard_False only diff --git a/src/ShapeFix/ShapeFix_Wire.cxx b/src/ShapeFix/ShapeFix_Wire.cxx index fd99e29005..fbbfcdc905 100644 --- a/src/ShapeFix/ShapeFix_Wire.cxx +++ b/src/ShapeFix/ShapeFix_Wire.cxx @@ -1973,7 +1973,7 @@ static Standard_Boolean RemoveLoop (TopoDS_Edge &E, const TopoDS_Face &face, Seq2d->Append((t1+t2)/2); Handle(TColStd_HSequenceOfReal) Seq3d = SFTP.Perform(Seq2d,Standard_False); - Standard_Real dist1 = pcurPnt.Distance(crv->Value(Seq3d->Value(1)));// correting Seq3d already project + Standard_Real dist1 = pcurPnt.Distance(crv->Value(Seq3d->Value(1)));// correcting Seq3d already project Standard_Real dist2 = pcurPnt.Distance(crv->Value(Seq3d->Value(2))); Standard_Real dist3 = pcurPnt.Distance(crv->Value(Seq3d->Value(3))); Standard_Real ftrim,ltrim; @@ -2105,7 +2105,7 @@ static Standard_Boolean RemoveLoop (TopoDS_Edge &E, const TopoDS_Face &face, Seq2d->Append((t1+t2)/2); Handle (TColStd_HSequenceOfReal) Seq3d = SFTP.Perform(Seq2d,Standard_False); - Standard_Real dist1 = pcurPnt.Distance(crv->Value(Seq3d->Value(1)));// correting Seq3d already project + Standard_Real dist1 = pcurPnt.Distance(crv->Value(Seq3d->Value(1)));// correcting Seq3d already project Standard_Real dist2 = pcurPnt.Distance(crv->Value(Seq3d->Value(2))); Standard_Real dist3 = pcurPnt.Distance(crv->Value(Seq3d->Value(3))); Standard_Real ftrim,ltrim; diff --git a/src/ShapeUpgrade/ShapeUpgrade_ShapeConvertToBezier.hxx b/src/ShapeUpgrade/ShapeUpgrade_ShapeConvertToBezier.hxx index d3d73bde44..c6cc9fc4e4 100644 --- a/src/ShapeUpgrade/ShapeUpgrade_ShapeConvertToBezier.hxx +++ b/src/ShapeUpgrade/ShapeUpgrade_ShapeConvertToBezier.hxx @@ -123,7 +123,7 @@ protected: Standard_EXPORT virtual Message_Msg GetWireMsg() const Standard_OVERRIDE; - //! Returns a message decsribing modification of a shape. + //! Returns a message describing modification of a shape. Standard_EXPORT virtual Message_Msg GetEdgeMsg() const Standard_OVERRIDE; diff --git a/src/ShapeUpgrade/ShapeUpgrade_ShapeDivide.hxx b/src/ShapeUpgrade/ShapeUpgrade_ShapeDivide.hxx index 464afac5ee..a0cea8fda9 100644 --- a/src/ShapeUpgrade/ShapeUpgrade_ShapeDivide.hxx +++ b/src/ShapeUpgrade/ShapeUpgrade_ShapeDivide.hxx @@ -122,7 +122,7 @@ protected: Standard_EXPORT virtual Message_Msg GetWireMsg() const; - //! Returns a message decsribing modification of a shape. + //! Returns a message describing modification of a shape. Standard_EXPORT virtual Message_Msg GetEdgeMsg() const; diff --git a/src/StepData/StepData_ReadWriteModule.hxx b/src/StepData/StepData_ReadWriteModule.hxx index 80505e1c0a..0981faadff 100644 --- a/src/StepData/StepData_ReadWriteModule.hxx +++ b/src/StepData/StepData_ReadWriteModule.hxx @@ -66,7 +66,7 @@ public: //! Returns True if the Case Number corresponds to a Complex Type //! ("Plex"). Remember that all possible combinations must be - //! aknowledged to be processed + //! acknowledged to be processed //! Default is False for all cases. For a Protocol which defines //! possible Plexes, this method must be redefined. Standard_EXPORT virtual Standard_Boolean IsComplex (const Standard_Integer CN) const; diff --git a/src/TCollection/TCollection.cxx b/src/TCollection/TCollection.cxx index 4fb2733d8b..e41ec3565f 100644 --- a/src/TCollection/TCollection.cxx +++ b/src/TCollection/TCollection.cxx @@ -21,7 +21,7 @@ // The array of prime numbers used as consecutive steps for // size of array of buckets in the map. // The prime numbers are used for array size with the hope that this will -// lead to less probablility of having the same hash codes for +// lead to less probability of having the same hash codes for // different map items (note that all hash codes are modulo that size). // The value of each next step is chosen to be ~2 times greater than previous. // Though this could be thought as too much, actually the amount of diff --git a/src/TDocStd/TDocStd_Document.hxx b/src/TDocStd/TDocStd_Document.hxx index 3e025c7ebf..057ee681f5 100644 --- a/src/TDocStd/TDocStd_Document.hxx +++ b/src/TDocStd/TDocStd_Document.hxx @@ -98,7 +98,7 @@ public: //! Returns True if the main label has no attributes Standard_EXPORT Standard_Boolean IsEmpty() const; - //! Returns False if the document has been modified + //! Returns False if the document has been modified //! but not recomputed. Standard_EXPORT Standard_Boolean IsValid() const; @@ -198,7 +198,7 @@ public: Standard_EXPORT void UpdateReferences (const TCollection_AsciiString& aDocEntry); //! Recompute if the document was not valid and propagate - //! the reccorded modification. + //! the recorded modification. Standard_EXPORT void Recompute(); //! This method Update will be called diff --git a/src/TDocStd/TDocStd_XLinkTool.cxx b/src/TDocStd/TDocStd_XLinkTool.cxx index cb51806e60..f20f2b842f 100644 --- a/src/TDocStd/TDocStd_XLinkTool.cxx +++ b/src/TDocStd/TDocStd_XLinkTool.cxx @@ -57,7 +57,7 @@ void TDocStd_XLinkTool::Copy (const TDF_Label& target, } - // Remove TreeNode, then resotre, if present + // Remove TreeNode, then restore, if present Handle(TDataStd_TreeNode) aFather, aPrev, aNext; Handle(TDataStd_TreeNode) anOldFather, anOldPrev, anOldNext; Handle(TDataStd_TreeNode) aNode, anOldNode; diff --git a/src/TFunction/TFunction_Logbook.cxx b/src/TFunction/TFunction_Logbook.cxx index 3808968cb2..09ec542f22 100644 --- a/src/TFunction/TFunction_Logbook.cxx +++ b/src/TFunction/TFunction_Logbook.cxx @@ -84,7 +84,7 @@ void TFunction_Logbook::Clear() //======================================================================= //function : IsEmpty -//purpose : Returns Standard_True if the nothing is reccorded in the logbook +//purpose : Returns Standard_True if the nothing is recorded in the logbook //======================================================================= Standard_Boolean TFunction_Logbook::IsEmpty () const diff --git a/src/Transfer/Transfer_ActorOfProcessForFinder.hxx b/src/Transfer/Transfer_ActorOfProcessForFinder.hxx index 93ef56a694..07946bf260 100644 --- a/src/Transfer/Transfer_ActorOfProcessForFinder.hxx +++ b/src/Transfer/Transfer_ActorOfProcessForFinder.hxx @@ -44,7 +44,7 @@ public: Standard_EXPORT Transfer_ActorOfProcessForFinder(); - //! Prerequesite for Transfer : the method Transfer is + //! Prerequisite for Transfer : the method Transfer is //! called on a starting object only if Recognize has //! returned True on it //! This allows to define a list of Actors, each one diff --git a/src/Transfer/Transfer_ActorOfProcessForTransient.hxx b/src/Transfer/Transfer_ActorOfProcessForTransient.hxx index 5693266fb8..7633a92987 100644 --- a/src/Transfer/Transfer_ActorOfProcessForTransient.hxx +++ b/src/Transfer/Transfer_ActorOfProcessForTransient.hxx @@ -43,7 +43,7 @@ public: Standard_EXPORT Transfer_ActorOfProcessForTransient(); - //! Prerequesite for Transfer : the method Transfer is + //! Prerequisite for Transfer : the method Transfer is //! called on a starting object only if Recognize has //! returned True on it //! This allows to define a list of Actors, each one diff --git a/src/Transfer/Transfer_TransientProcess.hxx b/src/Transfer/Transfer_TransientProcess.hxx index c39988b64e..788752925c 100644 --- a/src/Transfer/Transfer_TransientProcess.hxx +++ b/src/Transfer/Transfer_TransientProcess.hxx @@ -57,7 +57,7 @@ public: //! Returns the Model used for StartTrace Standard_EXPORT Handle(Interface_InterfaceModel) Model() const; - //! Sets a Graph : superseedes SetModel if already done + //! Sets a Graph : supersedes SetModel if already done Standard_EXPORT void SetGraph (const Handle(Interface_HGraph)& HG); Standard_EXPORT Standard_Boolean HasGraph() const; @@ -89,7 +89,7 @@ public: //! Returns the list of sharings entities, AT ANY LEVEL, which are //! kind of a given type. Calls TypedSharings from Graph - //! Returns an empty list if the Graph has not been aknowledged + //! Returns an empty list if the Graph has not been acknowledged Standard_EXPORT Interface_EntityIterator TypedSharings (const Handle(Standard_Transient)& start, const Handle(Standard_Type)& type) const; //! Tells if an entity is well loaded from file (even if its data diff --git a/src/XmlObjMgt/XmlObjMgt.cxx b/src/XmlObjMgt/XmlObjMgt.cxx index 49b8f18072..93906d7589 100644 --- a/src/XmlObjMgt/XmlObjMgt.cxx +++ b/src/XmlObjMgt/XmlObjMgt.cxx @@ -167,7 +167,7 @@ Standard_Boolean XmlObjMgt::GetTagEntryString if (strncmp (aSource, aRefPrefix, aPrefixSize)) return Standard_False; - // Beging aTagEntry string + // Begin aTagEntry string char * aTagEntry = (char *) Standard::Allocate (strlen(aSource)/2); // quite enough to hold it char * aTagEntryPtr = aTagEntry + 1; diff --git a/tests/bugs/fclasses/bug9848_1 b/tests/bugs/fclasses/bug9848_1 index 182dc9c2d7..d092a45fa9 100755 --- a/tests/bugs/fclasses/bug9848_1 +++ b/tests/bugs/fclasses/bug9848_1 @@ -3,7 +3,7 @@ puts "OCC9848" puts "============" puts "" ####################################################################### -# Specififying invalid name of unit produces exception.(for example tonne instead ton) +# Specifying invalid name of unit produces exception.(for example tonne instead ton) ####################################################################### set BugNumber OCC9848 diff --git a/tests/bugs/fclasses/bug9848_2 b/tests/bugs/fclasses/bug9848_2 index 1e43ea0a31..febb5563fa 100755 --- a/tests/bugs/fclasses/bug9848_2 +++ b/tests/bugs/fclasses/bug9848_2 @@ -3,7 +3,7 @@ puts "OCC9848" puts "============" puts "" ####################################################################### -# Specififying invalid name of unit produces exception.(for example tonne instead ton) +# Specifying invalid name of unit produces exception.(for example tonne instead ton) ####################################################################### set BugNumber OCC9848 diff --git a/tests/bugs/modalg_5/bug24003 b/tests/bugs/modalg_5/bug24003 index 824ee6eeff..a5cecf0a5f 100644 --- a/tests/bugs/modalg_5/bug24003 +++ b/tests/bugs/modalg_5/bug24003 @@ -3,7 +3,7 @@ puts "OCC24003" puts "================" puts "" ####################################################################### -# Exception reaised during intersection between two faces +# Exception raised during intersection between two faces ####################################################################### restore [locate_data_file bug24003_fz33.brep] b1 diff --git a/tests/bugs/modalg_6/bug26313 b/tests/bugs/modalg_6/bug26313 index 281a99a076..9b5f648c2f 100755 --- a/tests/bugs/modalg_6/bug26313 +++ b/tests/bugs/modalg_6/bug26313 @@ -3,7 +3,7 @@ puts "OCC26313" puts "============" puts "" ####################################################################### -# Method BRepBuilderAPI_GTransform::ModifiedShape(...) thows exception +# Method BRepBuilderAPI_GTransform::ModifiedShape(...) throws exception ####################################################################### pload QAcommands diff --git a/tests/bugs/step/bug233 b/tests/bugs/step/bug233 index 32e2ecb3b5..adbc6283ea 100755 --- a/tests/bugs/step/bug233 +++ b/tests/bugs/step/bug233 @@ -1,7 +1,7 @@ puts "========" puts "OCC233" puts "========" -puts "Problem during translation in dev in optimaze mode .Debug mode is OK)" +puts "Problem during translation in dev in optimize mode .Debug mode is OK)" stepread [locate_data_file Sbottle.stp] a * diff --git a/tests/bugs/step/pro19854 b/tests/bugs/step/pro19854 index 64ba67f9b9..25d32c6212 100755 --- a/tests/bugs/step/pro19854 +++ b/tests/bugs/step/pro19854 @@ -1,7 +1,7 @@ puts "==========" puts "PRO19854" puts "==========" -puts "Incorrect translation of one entity from STEP file in optimaze mode of C30." +puts "Incorrect translation of one entity from STEP file in optimize mode of C30." stepread [locate_data_file id_turbine-B.stp] a * diff --git a/tests/bugs/step/pro19895 b/tests/bugs/step/pro19895 index 11a3a3ccbd..9e93263bf3 100755 --- a/tests/bugs/step/pro19895 +++ b/tests/bugs/step/pro19895 @@ -3,7 +3,7 @@ puts "PRO19895" puts "==========" ############################################################################# -## There is wrong tolerance after reading of the model in optimaze mode (C30). Retrieve entity number 2139 from file +## There is wrong tolerance after reading of the model in optimize mode (C30). Retrieve entity number 2139 from file ## "bm4_db_punch_a.stp" and will obtaine tolerance. It is very big and isolains extend from entity. ############################################################################# diff --git a/tests/lowalgos/intss/bug23699 b/tests/lowalgos/intss/bug23699 index 873dff1e9e..1e1e038c9b 100644 --- a/tests/lowalgos/intss/bug23699 +++ b/tests/lowalgos/intss/bug23699 @@ -3,7 +3,7 @@ puts "CR23699" puts "=========" puts "" ############################### -## Exception reaised during intersection between two surfaces +## Exception raised during intersection between two surfaces ############################### restore [locate_data_file bug23699_Compound_sigsegv.brep] b1 diff --git a/tests/lowalgos/intss/bug23732 b/tests/lowalgos/intss/bug23732 index 91159d7052..c00e25ed28 100644 --- a/tests/lowalgos/intss/bug23732 +++ b/tests/lowalgos/intss/bug23732 @@ -3,7 +3,7 @@ puts "CR23722" puts "=========" puts "" ############################### -## Exception reaised during intersection between two surfaces +## Exception raised during intersection between two surfaces ############################### restore [locate_data_file bug23732_fx1.brep] b1 diff --git a/tests/perf/de/bug33046 b/tests/perf/de/bug33046 index 5cc1831f31..efe4213bfb 100644 --- a/tests/perf/de/bug33046 +++ b/tests/perf/de/bug33046 @@ -10,7 +10,7 @@ chrono c reset; chrono c start; readstl m [locate_data_file model_stl_025.stl] -brep chrono c stop; chrono c show; -# Check that model is converted succesfully. +# Check that model is converted successfully. checknbshapes m -face 54337; # Visual check diff --git a/tests/perf/modalg/bug29093 b/tests/perf/modalg/bug29093 index 43f155e093..f3fdbc185e 100644 --- a/tests/perf/modalg/bug29093 +++ b/tests/perf/modalg/bug29093 @@ -1,5 +1,5 @@ puts "========" -puts "0029093: BOP PaveFiller hungs and constantly consumes memory" +puts "0029093: BOP PaveFiller hangs and constantly consumes memory" puts "========" puts "" From d51eb087ab6d22347f05f7ccf174b40c1505b4d6 Mon Sep 17 00:00:00 2001 From: luzpaz Date: Mon, 15 Jul 2024 11:57:52 -0400 Subject: [PATCH 582/639] 0033766: Documentation - Fix various typos found in codebase --- CMakeLists.txt | 2 +- src/AdvApp2Var/AdvApp2Var_Context.cxx | 2 +- src/AdvApp2Var/AdvApp2Var_MathBase.cxx | 2 +- src/AdvApp2Var/AdvApp2Var_SysBase.cxx | 6 +++--- src/Approx/Approx_CurvilinearParameter.cxx | 6 +++--- src/Approx/Approx_SweepApproximation.cxx | 2 +- src/BRepBlend/BRepBlend_RstRstEvolRad.cxx | 2 +- src/BRepBlend/BRepBlend_SurfRstEvolRad.cxx | 2 +- src/BRepBuilderAPI/BRepBuilderAPI_Sewing.cxx | 2 +- src/BRepCheck/BRepCheck_Wire.cxx | 2 +- src/BRepFeat/BRepFeat_MakeCylindricalHole.hxx | 6 +++--- src/BRepFill/BRepFill_MultiLine.hxx | 2 +- src/BRepMesh/BRepMesh_CircleInspector.hxx | 2 +- src/BRepMesh/BRepMesh_VertexInspector.hxx | 2 +- src/BRepOffset/BRepOffset_Tool.hxx | 2 +- src/BRepTools/BRepTools_CopyModification.hxx | 4 ++-- src/BRepTools/BRepTools_PurgeLocations.hxx | 2 +- src/BSplCLib/BSplCLib.cxx | 2 +- src/BSplCLib/BSplCLib.hxx | 8 ++++---- src/BSplSLib/BSplSLib.cxx | 2 +- src/BSplSLib/BSplSLib.hxx | 2 +- src/BSplSLib/BSplSLib_Cache.hxx | 2 +- src/Bisector/Bisector_BisecCC.hxx | 2 +- src/Bisector/Bisector_BisecPC.hxx | 4 ++-- src/Bisector/Bisector_Inter.hxx | 4 ++-- src/BlendFunc/BlendFunc_EvolRad.cxx | 2 +- src/CDM/CDM_Application.hxx | 2 +- src/CDM/CDM_Document.cxx | 2 +- src/Contap/Contap_Line.hxx | 2 +- src/Contap/Contap_SurfFunction.hxx | 2 +- src/GccAna/GccAna_Circ2d2TanOn.hxx | 4 ++-- src/GccAna/GccAna_Circ2d2TanOn_1.cxx | 14 +++++++------- src/Geom/Geom_BSplineCurve.hxx | 2 +- src/Geom/Geom_Geometry.hxx | 2 +- src/Geom2d/Geom2d_Geometry.hxx | 2 +- .../Geom2dConvert_ApproxArcsSegments.cxx | 8 ++++---- .../Geom2dConvert_CompCurveToBSplineCurve.hxx | 2 +- src/Geom2dConvert/Geom2dConvert_PPoint.hxx | 4 ++-- .../Geom2dInt_TheIntPCurvePCurveOfGInter.hxx | 2 +- src/GeomConvert/GeomConvert.cxx | 4 ++-- src/GeomConvert/GeomConvert_1.cxx | 2 +- src/GeomConvert/GeomConvert_CurveToAnaCurve.hxx | 2 +- src/GeomConvert/GeomConvert_FuncCylinderLSDist.hxx | 2 +- src/GeomConvert/GeomConvert_SurfToAnaSurf.cxx | 8 ++++---- src/GeomConvert/GeomConvert_SurfToAnaSurf.hxx | 4 ++-- src/GeomPlate/GeomPlate_Surface.hxx | 2 +- src/Graphic3d/Graphic3d_Camera.cxx | 2 +- src/Graphic3d/Graphic3d_CubeMapPacked.cxx | 2 +- src/Graphic3d/Graphic3d_Group.hxx | 2 +- src/Graphic3d/Graphic3d_Structure.hxx | 2 +- src/Graphic3d/Graphic3d_Texture1Dsegment.hxx | 2 +- src/Graphic3d/Graphic3d_TextureMap.hxx | 2 +- src/HLRBRep/HLRBRep_TheIntPCurvePCurveOfCInter.hxx | 2 +- src/IGESFile/liriges.c | 2 +- src/IGESSolid/IGESSolid_SolidOfLinearExtrusion.hxx | 2 +- src/IGESToBRep/IGESToBRep_BasicCurve.cxx | 6 +++--- src/IGESToBRep/IGESToBRep_BasicSurface.cxx | 6 +++--- src/IGESToBRep/IGESToBRep_TopoCurve.cxx | 2 +- src/IntWalk/IntWalk_IWalking_3.gxx | 2 +- src/IntWalk/IntWalk_PWalking.cxx | 2 +- src/LocOpe/LocOpe_CSIntersector.hxx | 2 +- src/LocOpe/LocOpe_CurveShapeIntersector.hxx | 4 ++-- src/OSD/OSD_MemInfo.hxx | 2 +- src/OSD/OSD_Parallel.hxx | 2 +- src/OpenGl/OpenGl_View.hxx | 4 ++-- src/PCDM/PCDM_StoreStatus.hxx | 2 +- src/PLib/PLib.cxx | 2 +- src/PLib/PLib_JacobiPolynomial.cxx | 2 +- src/QABugs/QABugs_17.cxx | 2 +- src/Quantity/Quantity_Color.hxx | 2 +- ...Kinematics_RWActuatedKinPairAndOrderKinPair.cxx | 2 +- ...cs_RWKinematicLinkRepresentationAssociation.cxx | 2 +- src/SelectMgr/SelectMgr_RectangularFrustum.cxx | 2 +- .../ShapeAnalysis_CanonicalRecognition.cxx | 4 ++-- src/ShapeUpgrade/ShapeUpgrade_RemoveLocations.hxx | 2 +- src/StepData/StepData_ConfParameters.hxx | 2 +- src/StepData/StepData_Factors.cxx | 2 +- src/StepData/StepData_StepWriter.hxx | 4 ++-- src/StepToTopoDS/StepToTopoDS_TranslateEdge.cxx | 2 +- src/TDataStd/TDataStd_TreeNode.cxx | 2 +- src/TObj/TObj_CheckModel.hxx | 2 +- src/TObj/TObj_Object.hxx | 2 +- src/TObj/TObj_Partition.hxx | 2 +- src/TObj/TObj_TModel.hxx | 2 +- src/TObj/TObj_TObject.hxx | 2 +- src/TopClass/TopClass_SolidClassifier.gxx | 2 +- src/V3d/V3d_Viewer.hxx | 2 +- .../XCAFDimTolObjects_DimensionObject.hxx | 6 +++--- src/XCAFDoc/XCAFDoc_AssemblyGraph.cxx | 2 +- src/XCAFDoc/XCAFDoc_Editor.cxx | 2 +- src/XSControl/XSControl_WorkSession.cxx | 2 +- src/XSDRAWDE/XSDRAWDE.cxx | 10 +++++----- src/math/math_VectorBase.hxx | 4 ++-- tests/bugs/xde/bug547_2 | 2 +- 94 files changed, 137 insertions(+), 137 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 8576e8ba33..26208e0479 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1255,7 +1255,7 @@ foreach (OCCT_TOOLKIT ${BUILD_TOOLKITS}) endforeach() list (REMOVE_DUPLICATES OCCT_MODULES_ENABLED) list (REMOVE_DUPLICATES OCCT_COMPILE_DEFINITIONS) -# these macros are defined for specific tookits, not globalwise +# these macros are defined for specific toolkits, not globalwise list (REMOVE_ITEM OCCT_COMPILE_DEFINITIONS HAVE_OPENGL) list (REMOVE_ITEM OCCT_COMPILE_DEFINITIONS HAVE_GLES2) diff --git a/src/AdvApp2Var/AdvApp2Var_Context.cxx b/src/AdvApp2Var/AdvApp2Var_Context.cxx index 23784349b5..8e8f987c0d 100644 --- a/src/AdvApp2Var/AdvApp2Var_Context.cxx +++ b/src/AdvApp2Var/AdvApp2Var_Context.cxx @@ -33,7 +33,7 @@ static Standard_Boolean lesparam(const Standard_Integer iordre, ndgjac += (9 - (iordre+1)); //iordre rescales the frequences upwards ndgjac += (icodeo-1)*10; } - // ---> Min Number of required pointss. + // ---> Min Number of required points. if (ndgjac < 8) { nbpnts = 8; } else if (ndgjac < 10) { nbpnts = 10; } // else if (ndgjac < 15) { nbpnt = 15; } Bug Uneven number diff --git a/src/AdvApp2Var/AdvApp2Var_MathBase.cxx b/src/AdvApp2Var/AdvApp2Var_MathBase.cxx index 7641dfb915..4383b6c685 100644 --- a/src/AdvApp2Var/AdvApp2Var_MathBase.cxx +++ b/src/AdvApp2Var/AdvApp2Var_MathBase.cxx @@ -3680,7 +3680,7 @@ int AdvApp2Var_MathBase::mmeps1_(doublereal *epsilo) /* equal to 1.D-9 */ /* KEYWORDS : */ -/* ----------- */ +/* ---------- */ /* MPRCSN,PRECISON,EPS1. */ /* INPUT ARGUMENTS : */ diff --git a/src/AdvApp2Var/AdvApp2Var_SysBase.cxx b/src/AdvApp2Var/AdvApp2Var_SysBase.cxx index d8efb71e7f..503b2f10ee 100644 --- a/src/AdvApp2Var/AdvApp2Var_SysBase.cxx +++ b/src/AdvApp2Var/AdvApp2Var_SysBase.cxx @@ -2200,8 +2200,8 @@ int AdvApp2Var_SysBase::mcrdelt_(integer *iunit, /* ---------- */ /* TABLE OF MANAGEMENT OF DYNAMIC ALLOCATIONS IN MEMORY */ -/* KEYWORS : */ -/* ----------- */ +/* KEYWORDS : */ +/* ---------- */ /* SYSTEM, MEMORY, ALLOCATION */ /* DEMSCRIPTION/NOTES/LIMITATIONS : */ @@ -2867,7 +2867,7 @@ int AdvApp2Var_SysBase::mcrrqst_(integer *iunit, /* . add size of the user zone */ /* . add 8 for alinement of start address of */ /* allocation on multiple of 8 so that to be able to */ -/* set flags with Double Precision without other pb than alignement */ +/* set flags with Double Precision without other pb than alignment */ /* . add 16 octets for two flags */ ibyte = izu + 24; diff --git a/src/Approx/Approx_CurvilinearParameter.cxx b/src/Approx/Approx_CurvilinearParameter.cxx index 77ca7f8e2c..175441cab0 100644 --- a/src/Approx/Approx_CurvilinearParameter.cxx +++ b/src/Approx/Approx_CurvilinearParameter.cxx @@ -196,7 +196,7 @@ Approx_CurvilinearParameter::Approx_CurvilinearParameter(const Handle(Adaptor3d_ std::cout<<"initialization time = "< //! Has to be True. - //! It Permits an optimiztion of the computation. + //! It Permits an optimization of the computation. Standard_EXPORT Bisector_Inter(const Bisector_Bisec& C1, const IntRes2d_Domain& D1, const Bisector_Bisec& C2, const IntRes2d_Domain& D2, const Standard_Real TolConf, const Standard_Real Tol, const Standard_Boolean ComunElement); //! Intersection between 2 curves. @@ -52,7 +52,7 @@ public: //! C2 separates the elements C et D. //! If B an C have the same geometry. //! Has to be True. - //! It Permits an optimiztion of the computation. + //! It Permits an optimization of the computation. Standard_EXPORT void Perform (const Bisector_Bisec& C1, const IntRes2d_Domain& D1, const Bisector_Bisec& C2, const IntRes2d_Domain& D2, const Standard_Real TolConf, const Standard_Real Tol, const Standard_Boolean ComunElement); diff --git a/src/BlendFunc/BlendFunc_EvolRad.cxx b/src/BlendFunc/BlendFunc_EvolRad.cxx index 7ab02e2765..347f57de83 100644 --- a/src/BlendFunc/BlendFunc_EvolRad.cxx +++ b/src/BlendFunc/BlendFunc_EvolRad.cxx @@ -51,7 +51,7 @@ static void FusionneIntervalles(const TColStd_Array1OfReal& I1, //--- TABSOR is filled by parsing TABLE1 and TABLE2 simultaneously --- -//------------------ by removing multiple occurrencies ------------ +//------------------ by removing multiple occurrences ------------ while ((ind1<=I1.Upper()) && (ind2<=I2.Upper())) { v1 = I1(ind1); diff --git a/src/CDM/CDM_Application.hxx b/src/CDM/CDM_Application.hxx index 0f81748280..73105dbc05 100644 --- a/src/CDM/CDM_Application.hxx +++ b/src/CDM/CDM_Application.hxx @@ -51,7 +51,7 @@ public: //! By default, writes in MessageDriver(). Standard_EXPORT virtual void BeginOfUpdate (const Handle(CDM_Document)& aDocument); - //! this method is called affter the update of a document. + //! this method is called after the update of a document. //! By default, writes in MessageDriver(). Standard_EXPORT virtual void EndOfUpdate (const Handle(CDM_Document)& aDocument, const Standard_Boolean theStatus, const TCollection_ExtendedString& ErrorString); diff --git a/src/CDM/CDM_Document.cxx b/src/CDM/CDM_Document.cxx index c4abc6d988..ce86af1afa 100644 --- a/src/CDM/CDM_Document.cxx +++ b/src/CDM/CDM_Document.cxx @@ -532,7 +532,7 @@ void CDM_Document::SetMetaData(const Handle(CDM_MetaData)& aMetaData) aMetaData->SetDocument(this); - // Update the document refencing this MetaData: + // Update the document referencing this MetaData: CDM_DataMapIteratorOfMetaDataLookUpTable it(Application()->MetaDataLookUpTable()); for(;it.More();it.Next()) { const Handle(CDM_MetaData)& theMetaData=it.Value(); diff --git a/src/Contap/Contap_Line.hxx b/src/Contap/Contap_Line.hxx index 4c5aeb63af..0f36882115 100644 --- a/src/Contap/Contap_Line.hxx +++ b/src/Contap/Contap_Line.hxx @@ -79,7 +79,7 @@ public: Standard_EXPORT const Handle(Adaptor2d_Curve2d)& Arc() const; - //! Set The Tansition of the line. + //! Set The Transition of the line. Standard_EXPORT void SetTransitionOnS (const IntSurf_TypeTrans T); //! returns IN if at the "left" of the line, the normale of the diff --git a/src/Contap/Contap_SurfFunction.hxx b/src/Contap/Contap_SurfFunction.hxx index 8ebf3a85dc..1c867cab7e 100644 --- a/src/Contap/Contap_SurfFunction.hxx +++ b/src/Contap/Contap_SurfFunction.hxx @@ -31,7 +31,7 @@ class math_Matrix; //! This class describes the function on a parametric surface. //! the form of the function is F(u,v) = 0 where u and v are -//! the parameteric coordinates of a point on the surface, +//! the parametric coordinates of a point on the surface, //! to compute the contours of the surface. class Contap_SurfFunction : public math_FunctionSetWithDerivatives { diff --git a/src/GccAna/GccAna_Circ2d2TanOn.hxx b/src/GccAna/GccAna_Circ2d2TanOn.hxx index bc8327e355..0cc34c7e3d 100644 --- a/src/GccAna/GccAna_Circ2d2TanOn.hxx +++ b/src/GccAna/GccAna_Circ2d2TanOn.hxx @@ -185,7 +185,7 @@ public: //! (2 circles). //! If R1 is the radius of the first argument and Rsol the radius //! of the solution and dist the distance between the two centers, - //! we concider the two circles are identical if R1+dist-Rsol is + //! we consider the two circles are identical if R1+dist-Rsol is //! less than Tolerance. //! False in the other cases. //! Raises OutOfRange if Index is greater than the number @@ -196,7 +196,7 @@ public: //! (2 circles). //! If R2 is the radius of the second argument and Rsol the radius //! of the solution and dist the distance between the two centers, - //! we concider the two circles are identical if R2+dist-Rsol is + //! we consider the two circles are identical if R2+dist-Rsol is //! less than Tolerance. //! False in the other cases. //! Raises OutOfRange if Index is greater than the number diff --git a/src/GccAna/GccAna_Circ2d2TanOn_1.cxx b/src/GccAna/GccAna_Circ2d2TanOn_1.cxx index cd00d7991b..aececf5580 100644 --- a/src/GccAna/GccAna_Circ2d2TanOn_1.cxx +++ b/src/GccAna/GccAna_Circ2d2TanOn_1.cxx @@ -36,14 +36,14 @@ // Creation of a circle tangent to Circle C1 and a straight line L2. + // centered on a straight line. + // We start by making difference between cases that we are going to + -// proceess separately. + -// In general case: + +// process separately. + +// In general case: + // ==================== + -// We calculate bissectrices to C1 and L2 that give us + -// all possibles locations of centers of all circles tangent to C1 and L2+ + -// We intersect these bissectrices with straight line OnLine which gives + -// us points among which we'll choose the solutions. + -// The choices are made basing on Qualifiers of C1 and L2. + +// We calculate bissectrices to C1 and L2 that give us + +// all possible locations of centers of all circles tangent to C1 and L2 + +// We intersect these bissectrices with straight line OnLine which gives + +// us points among which we'll choose the solutions. + +// The choices are made basing on Qualifiers of C1 and L2. + //========================================================================= GccAna_Circ2d2TanOn:: GccAna_Circ2d2TanOn (const GccEnt_QualifiedCirc& Qualified1 , diff --git a/src/Geom/Geom_BSplineCurve.hxx b/src/Geom/Geom_BSplineCurve.hxx index 7648d32b36..8441b56a94 100644 --- a/src/Geom/Geom_BSplineCurve.hxx +++ b/src/Geom/Geom_BSplineCurve.hxx @@ -774,7 +774,7 @@ public: //! Creates a new object which is a copy of this BSpline curve. Standard_EXPORT Handle(Geom_Geometry) Copy() const Standard_OVERRIDE; - //! Comapare two Bspline curve on identity; + //! Compare two Bspline curve on identity; Standard_EXPORT Standard_Boolean IsEqual (const Handle(Geom_BSplineCurve)& theOther, const Standard_Real thePreci) const; //! Dumps the content of me into the stream diff --git a/src/Geom/Geom_Geometry.hxx b/src/Geom/Geom_Geometry.hxx index 85a24c1ffc..b66623cea3 100644 --- a/src/Geom/Geom_Geometry.hxx +++ b/src/Geom/Geom_Geometry.hxx @@ -91,7 +91,7 @@ public: Standard_EXPORT void Translate (const gp_Pnt& P1, const gp_Pnt& P2); - //! Transformation of a geometric object. This tansformation + //! Transformation of a geometric object. This transformation //! can be a translation, a rotation, a symmetry, a scaling //! or a complex transformation obtained by combination of //! the previous elementaries transformations. diff --git a/src/Geom2d/Geom2d_Geometry.hxx b/src/Geom2d/Geom2d_Geometry.hxx index 4d3a30d688..143dc26f65 100644 --- a/src/Geom2d/Geom2d_Geometry.hxx +++ b/src/Geom2d/Geom2d_Geometry.hxx @@ -83,7 +83,7 @@ public: //! Translates a Geometry from the point P1 to the point P2. Standard_EXPORT void Translate (const gp_Pnt2d& P1, const gp_Pnt2d& P2); - //! Transformation of a geometric object. This tansformation + //! Transformation of a geometric object. This transformation //! can be a translation, a rotation, a symmetry, a scaling //! or a complex transformation obtained by combination of //! the previous elementaries transformations. diff --git a/src/Geom2dConvert/Geom2dConvert_ApproxArcsSegments.cxx b/src/Geom2dConvert/Geom2dConvert_ApproxArcsSegments.cxx index 4dd6dfc96d..7fb4cff126 100644 --- a/src/Geom2dConvert/Geom2dConvert_ApproxArcsSegments.cxx +++ b/src/Geom2dConvert/Geom2dConvert_ApproxArcsSegments.cxx @@ -249,7 +249,7 @@ Handle(Geom2d_TrimmedCurve) Geom2dConvert_ApproxArcsSegments::makeLine // if the derivatives in the end points differ from the derivative line // more than value of the specified continuity tolerance - // then a biarc should be build instead of a line. + // then a biarc should be built instead of a line. const Standard_Real aContTolerance = ::Max(myAngleTolerance, 0.01); if (absAngle[0] > aContTolerance || absAngle[1] > aContTolerance) { //std::cout << "makeLine(): Line not built" << std::endl; @@ -257,7 +257,7 @@ Handle(Geom2d_TrimmedCurve) Geom2dConvert_ApproxArcsSegments::makeLine } } // end if (isCheck) - //bulding segment of line + //building segment of line GCE2d_MakeSegment aMakeSeg (theFirst.Point(), theLast.Point()); if (aMakeSeg.IsDone()) { Handle(Geom2d_TrimmedCurve) aCurve = aMakeSeg.Value(); @@ -367,7 +367,7 @@ Standard_Boolean Geom2dConvert_ApproxArcsSegments::makeFreeform() //======================================================================= //function : getLinearParts -//purpose : method for geting inflection points +//purpose : method for getting inflection points //======================================================================= void Geom2dConvert_ApproxArcsSegments::getLinearParts (Geom2dConvert_SequenceOfPPoint& theSeqPar) @@ -730,7 +730,7 @@ Standard_Boolean Geom2dConvert_ApproxArcsSegments::checkCurve if (aCurve.IsNull()) return Standard_False; // check fails on empty input Standard_Boolean isUniformDone = !mySeqParams.IsEmpty(); - //calcualtion sequence of the parameters or step by parameter. + //calculation sequence of the parameters or step by parameter. Standard_Integer aNbPnts = (isUniformDone ? mySeqParams.Length() :MAXPOINTS); Standard_Real aParamStep = (theLastParam - theFirstParam)/MAXPOINTS; diff --git a/src/Geom2dConvert/Geom2dConvert_CompCurveToBSplineCurve.hxx b/src/Geom2dConvert/Geom2dConvert_CompCurveToBSplineCurve.hxx index 39b3482b73..cda19895ad 100644 --- a/src/Geom2dConvert/Geom2dConvert_CompCurveToBSplineCurve.hxx +++ b/src/Geom2dConvert/Geom2dConvert_CompCurveToBSplineCurve.hxx @@ -45,7 +45,7 @@ public: //! Append a curve in the BSpline //! Return False if the curve is not G0 with the BSplineCurve. //! Tolerance is used to check continuity and decrease - //! Multiplicty at the common Knot + //! Multiplicity at the common Knot //! After is useful if BasisCurve is a closed curve . Standard_EXPORT Standard_Boolean Add (const Handle(Geom2d_BoundedCurve)& NewCurve, const Standard_Real Tolerance, const Standard_Boolean After = Standard_False); diff --git a/src/Geom2dConvert/Geom2dConvert_PPoint.hxx b/src/Geom2dConvert/Geom2dConvert_PPoint.hxx index 2e35fa6281..f30edebef6 100644 --- a/src/Geom2dConvert/Geom2dConvert_PPoint.hxx +++ b/src/Geom2dConvert/Geom2dConvert_PPoint.hxx @@ -44,11 +44,11 @@ public: Standard_EXPORT Geom2dConvert_PPoint (const Standard_Real theParameter, const Adaptor2d_Curve2d& theAdaptor); - //! Compute the distance betwwen two 2d points. + //! Compute the distance between two 2d points. inline Standard_Real Dist (const Geom2dConvert_PPoint& theOth) const { return myPoint.Distance(theOth.myPoint); } - //! Query the parmeter value. + //! Query the parameter value. inline Standard_Real Parameter () const { return myParameter; } //! Query the point location. diff --git a/src/Geom2dInt/Geom2dInt_TheIntPCurvePCurveOfGInter.hxx b/src/Geom2dInt/Geom2dInt_TheIntPCurvePCurveOfGInter.hxx index cb67428da8..106683ac7a 100644 --- a/src/Geom2dInt/Geom2dInt_TheIntPCurvePCurveOfGInter.hxx +++ b/src/Geom2dInt/Geom2dInt_TheIntPCurvePCurveOfGInter.hxx @@ -64,7 +64,7 @@ private: //! : returns false for case when some points of polygon //! : were replaced on line and exact point of intersection was not found //! : for case when point of intersection was found - //! : during prelimanary search for line (case of bad paramerization of Bspline for example). + //! : during prelimanary search for line (case of bad parameterization of Bspline for example). Standard_EXPORT Standard_Boolean findIntersect (const Adaptor2d_Curve2d& Curve1, const IntRes2d_Domain& Domain1, const Adaptor2d_Curve2d& Curve2, const IntRes2d_Domain& Domain2, const Standard_Real TolConf, const Standard_Real Tol, const Standard_Integer NbIter, const Standard_Real DeltaU, const Standard_Real DeltaV, const Geom2dInt_ThePolygon2dOfTheIntPCurvePCurveOfGInter& thePoly1, const Geom2dInt_ThePolygon2dOfTheIntPCurvePCurveOfGInter& thePoly2, const Standard_Boolean isFullRepresentation); IntRes2d_Domain DomainOnCurve1; diff --git a/src/GeomConvert/GeomConvert.cxx b/src/GeomConvert/GeomConvert.cxx index b607fd0b5d..1505342883 100644 --- a/src/GeomConvert/GeomConvert.cxx +++ b/src/GeomConvert/GeomConvert.cxx @@ -791,7 +791,7 @@ class GeomConvert_reparameterise_evaluator : public BSplCLib_EvaluatorFunction First; Standard_Real PreLast = 0.; GeomAbs_Shape Cont; - gp_Vec Vec1,Vec2; //concecutive tangential vectors + gp_Vec Vec1,Vec2; //consecutive tangential vectors gp_Pnt Pint; Handle(Geom_BSplineCurve) Curve1,Curve2; TColStd_Array1OfBoolean tabG1(0,nb_curve-2); //array of the G1 continuity at the intersections @@ -1019,7 +1019,7 @@ void GeomConvert::ConcatC1(TColGeom_Array1OfBSplineCurve& ArrayOfCurv Standard_Real PreLast = 0.; GeomAbs_Shape Cont; - gp_Vec Vec1,Vec2; //concecutive tangential vectors + gp_Vec Vec1,Vec2; //consecutive tangential vectors gp_Pnt Pint; Handle(Geom_BSplineCurve) Curve1,Curve2; TColStd_Array1OfBoolean tabG1(0,nb_curve-2); //array of the G1 continuity at the intersections diff --git a/src/GeomConvert/GeomConvert_1.cxx b/src/GeomConvert/GeomConvert_1.cxx index c3a6b3a85b..0f81789cbd 100644 --- a/src/GeomConvert/GeomConvert_1.cxx +++ b/src/GeomConvert/GeomConvert_1.cxx @@ -472,7 +472,7 @@ Handle(Geom_BSplineSurface) GeomConvert::SurfaceToBSplineSurface gp_Torus Tr = TheElSurf->Torus(); // - // if isUClosed = true and U trim does not coinside with first period of torus, + // if isUClosed = true and U trim does not coincide with first period of torus, // method CheckAndSegment shifts position of U seam boundary of surface. // probably bug? So, for this case we must build not periodic surface. Standard_Boolean isUFirstPeriod = !(UFirst < 0. || ULast > 2.*M_PI); diff --git a/src/GeomConvert/GeomConvert_CurveToAnaCurve.hxx b/src/GeomConvert/GeomConvert_CurveToAnaCurve.hxx index 5bffa86d57..1cb48f9dc7 100644 --- a/src/GeomConvert/GeomConvert_CurveToAnaCurve.hxx +++ b/src/GeomConvert/GeomConvert_CurveToAnaCurve.hxx @@ -94,7 +94,7 @@ public: return myConvType; } - //! Sets type of convertion + //! Sets type of conversion void SetConvType(const GeomConvert_ConvType theConvType) { myConvType = theConvType; diff --git a/src/GeomConvert/GeomConvert_FuncCylinderLSDist.hxx b/src/GeomConvert/GeomConvert_FuncCylinderLSDist.hxx index 7c308181e0..dfc0ea72a9 100644 --- a/src/GeomConvert/GeomConvert_FuncCylinderLSDist.hxx +++ b/src/GeomConvert/GeomConvert_FuncCylinderLSDist.hxx @@ -31,7 +31,7 @@ //! for use in math_BFGS algorithm. //! //! Parametrisation: -//! Cylinder is defined by its axis and radius. Axis is defined by 3 cartesian coordinats it location x0, y0, z0 +//! Cylinder is defined by its axis and radius. Axis is defined by 3 cartesian coordinates at location x0, y0, z0 //! and direction, which is constant and set by user: //! dir.x, dir.y, dir.z //! The criteria is: diff --git a/src/GeomConvert/GeomConvert_SurfToAnaSurf.cxx b/src/GeomConvert/GeomConvert_SurfToAnaSurf.cxx index 28d052d8a0..93635b193d 100644 --- a/src/GeomConvert/GeomConvert_SurfToAnaSurf.cxx +++ b/src/GeomConvert/GeomConvert_SurfToAnaSurf.cxx @@ -230,9 +230,9 @@ Standard_Boolean GeomConvert_SurfToAnaSurf::GetCylByLS(const Handle(TColgp_HArra Standard_Real aRelDev = 0.2; //Customer can set parameters of sample surface // with relative precision about aRelDev. // For example, if radius of sample surface is R, - // it means, that "exact" vaue is in interav - //[R - aRelDev*R, R + aRelDev*R]. This intrrval is set - // for R as boundary values for dptimization algo. + // it means, that "exact" value is in interav + //[R - aRelDev*R, R + aRelDev*R]. This interval is set + // for R as boundary values for optimization algo. aStartPoint(1) = thePos.Location().X(); aStartPoint(2) = thePos.Location().Y(); @@ -279,7 +279,7 @@ Standard_Boolean GeomConvert_SurfToAnaSurf::GetCylByLS(const Handle(TColgp_HArra aDirMatrix(i, i) = 1.0; //Set search direction for location to be perpendicular to axis to avoid - //seaching along axis + //searching along axis const gp_Dir aDir = thePos.Direction(); gp_Pln aPln(thePos.Location(), aDir); gp_Dir aUDir = aPln.Position().XDirection(); diff --git a/src/GeomConvert/GeomConvert_SurfToAnaSurf.hxx b/src/GeomConvert/GeomConvert_SurfToAnaSurf.hxx index 1ebfa63fd7..39eabbefd2 100644 --- a/src/GeomConvert/GeomConvert_SurfToAnaSurf.hxx +++ b/src/GeomConvert/GeomConvert_SurfToAnaSurf.hxx @@ -30,9 +30,9 @@ class Geom_Surface; class Geom_SurfaceOfRevolution; class Geom_Circle; -//! Converts a surface to the analitical form with given +//! Converts a surface to the analytical form with given //! precision. Conversion is done only the surface is bspline -//! of bezier and this can be approximed by some analytical +//! of bezier and this can be approximated by some analytical //! surface with that precision. class GeomConvert_SurfToAnaSurf { diff --git a/src/GeomPlate/GeomPlate_Surface.hxx b/src/GeomPlate/GeomPlate_Surface.hxx index 90dbc25da8..8444c86d1c 100644 --- a/src/GeomPlate/GeomPlate_Surface.hxx +++ b/src/GeomPlate/GeomPlate_Surface.hxx @@ -243,7 +243,7 @@ public: Standard_EXPORT Handle(Geom_Geometry) Copy() const Standard_OVERRIDE; - //! Transformation of a geometric object. This tansformation + //! Transformation of a geometric object. This transformation //! can be a translation, a rotation, a symmetry, a scaling //! or a complex transformation obtained by combination of //! the previous elementaries transformations. diff --git a/src/Graphic3d/Graphic3d_Camera.cxx b/src/Graphic3d/Graphic3d_Camera.cxx index e1fc21edfc..4ea36f7226 100644 --- a/src/Graphic3d/Graphic3d_Camera.cxx +++ b/src/Graphic3d/Graphic3d_Camera.cxx @@ -1428,7 +1428,7 @@ bool Graphic3d_Camera::FitMinMax (const Bnd_Box& theBox, // but the axial scale is integrated into camera orientation matrix and the other // option is to perform frustum plane adjustment algorithm in view camera space, // which will lead to a number of additional world-view space conversions and - // loosing precision as well. + // losing precision as well. const gp_Pnt aBndMin = theBox.CornerMin().XYZ().Multiplied (myAxialScale); const gp_Pnt aBndMax = theBox.CornerMax().XYZ().Multiplied (myAxialScale); if (aBndMax.IsEqual (aBndMin, RealEpsilon())) diff --git a/src/Graphic3d/Graphic3d_CubeMapPacked.cxx b/src/Graphic3d/Graphic3d_CubeMapPacked.cxx index df8e6f71af..93e9959522 100644 --- a/src/Graphic3d/Graphic3d_CubeMapPacked.cxx +++ b/src/Graphic3d/Graphic3d_CubeMapPacked.cxx @@ -170,7 +170,7 @@ Standard_Boolean Graphic3d_CubeMapPacked::checkOrder (const NCollection_Array1 class TCollection_AsciiString; -//! This is an abstract class for managing texture applyable on polygons. +//! This is an abstract class for managing texture applicable on polygons. class Graphic3d_TextureMap : public Graphic3d_TextureRoot { DEFINE_STANDARD_RTTIEXT(Graphic3d_TextureMap, Graphic3d_TextureRoot) diff --git a/src/HLRBRep/HLRBRep_TheIntPCurvePCurveOfCInter.hxx b/src/HLRBRep/HLRBRep_TheIntPCurvePCurveOfCInter.hxx index 51f1979cc7..8dc2e2b9e1 100644 --- a/src/HLRBRep/HLRBRep_TheIntPCurvePCurveOfCInter.hxx +++ b/src/HLRBRep/HLRBRep_TheIntPCurvePCurveOfCInter.hxx @@ -66,7 +66,7 @@ private: //! : returns false for case when some points of polygon //! : were replaced on line and exact point of intersection was not found //! : for case when point of intersection was found - //! : during prelimanary search for line (case of bad paramerization of Bspline for example). + //! : during prelimanary search for line (case of bad parameterization of Bspline for example). Standard_EXPORT Standard_Boolean findIntersect (const Standard_Address& Curve1, const IntRes2d_Domain& Domain1, const Standard_Address& Curve2, const IntRes2d_Domain& Domain2, const Standard_Real TolConf, const Standard_Real Tol, const Standard_Integer NbIter, const Standard_Real DeltaU, const Standard_Real DeltaV, const HLRBRep_ThePolygon2dOfTheIntPCurvePCurveOfCInter& thePoly1, const HLRBRep_ThePolygon2dOfTheIntPCurvePCurveOfCInter& thePoly2, const Standard_Boolean isFullRepresentation); diff --git a/src/IGESFile/liriges.c b/src/IGESFile/liriges.c index 827fb28385..1ce02a6374 100644 --- a/src/IGESFile/liriges.c +++ b/src/IGESFile/liriges.c @@ -51,7 +51,7 @@ int iges_lire (FILE* lefic, int *numsec, char ligne[100], int modefnes) else { /* PTV: 21.03.2002 it is necessary for files that have only `\r` but no `\n` - examle file is 919-001-T02-04-CP-VL.iges */ + example file is 919-001-T02-04-CP-VL.iges */ while ( fgets ( ligne, 2, lefic ) && ( ligne[0] == '\r' || ligne[0] == '\n' ) ) { } diff --git a/src/IGESSolid/IGESSolid_SolidOfLinearExtrusion.hxx b/src/IGESSolid/IGESSolid_SolidOfLinearExtrusion.hxx index d171e31aeb..275dcd4ff3 100644 --- a/src/IGESSolid/IGESSolid_SolidOfLinearExtrusion.hxx +++ b/src/IGESSolid/IGESSolid_SolidOfLinearExtrusion.hxx @@ -30,7 +30,7 @@ DEFINE_STANDARD_HANDLE(IGESSolid_SolidOfLinearExtrusion, IGESData_IGESEntity) //! defines SolidOfLinearExtrusion, Type <164> Form Number <0> //! in package IGESSolid -//! Solid of linear extrusion is defined by translatin an +//! Solid of linear extrusion is defined by translating an //! area determined by a planar curve class IGESSolid_SolidOfLinearExtrusion : public IGESData_IGESEntity { diff --git a/src/IGESToBRep/IGESToBRep_BasicCurve.cxx b/src/IGESToBRep/IGESToBRep_BasicCurve.cxx index 5dd82b3e2d..9c1f651b81 100644 --- a/src/IGESToBRep/IGESToBRep_BasicCurve.cxx +++ b/src/IGESToBRep/IGESToBRep_BasicCurve.cxx @@ -21,7 +21,7 @@ //#60 rln 29.12.98 PRO17015 //:l3 abv 11.01.99: CATIA01.igs: using less values for checking short lines //%11 pdn 12.01.98 CTS22023 correcting used tolerances -//sln 29.12.2001 OCC90 : Method checkBSplineCurve and varification before creation of bspline curves were added +//sln 29.12.2001 OCC90 : Method checkBSplineCurve and verification before creation of bspline curves were added //======================================================================= #include @@ -80,7 +80,7 @@ //======================================================================= //function : CheckBSplineCurve //purpose : Check coincidede knots Check whether knots are in ascending -// order and difference between vaues of weights more than 1000. +// order and difference between values of weights more than 1000. // Send corresponding messages. The function returns Standard_False // if curve can not be created, Standard_True otherwise. //======================================================================= @@ -89,7 +89,7 @@ static Standard_Boolean checkBSplineCurve(IGESToBRep_BasicCurve* t TColStd_Array1OfReal& CKnots, const TColStd_Array1OfReal& CWeights) { - // check whether difference between vaues of weights more than 1000. + // check whether difference between values of weights more than 1000. if(!theBSplineCurve->IsPolynomial()) { Standard_Real aMinValue = CWeights.Value(CWeights.Lower()); Standard_Real aMaxValue = CWeights.Value(CWeights.Lower()); diff --git a/src/IGESToBRep/IGESToBRep_BasicSurface.cxx b/src/IGESToBRep/IGESToBRep_BasicSurface.cxx index 8e5b0be914..d7c92b2f81 100644 --- a/src/IGESToBRep/IGESToBRep_BasicSurface.cxx +++ b/src/IGESToBRep/IGESToBRep_BasicSurface.cxx @@ -22,7 +22,7 @@ //:p6 abv 26.02.99: improve messages after call to ConvertToPeriodic //#75 rln 11.03.99: using message mechanism for periodic B-Spline //S4181 pdn 15.04.99 implementing of reading IGES elementary surfaces. -//sln 29.12.2001 OCC90 : Method checkBSplineSurfaceStatus and varification of creation of bspline surfaces were added +//sln 29.12.2001 OCC90 : Method checkBSplineSurfaceStatus and verification of creation of bspline surfaces were added //======================================================================= #include @@ -70,7 +70,7 @@ //======================================================================= //function : CheckBSplineSurface //purpose : Check coincidede knots. Check whether knots are in ascending -// order and difference between vaues of weights more than 1000. +// order and difference between values of weights more than 1000. // Send corresponding messages. The function returns Standard_False // if surface can not be created, Standard_True otherwise. //======================================================================= @@ -80,7 +80,7 @@ static Standard_Boolean checkBSplineSurface(IGESToBRep_BasicSurface* TColStd_Array1OfReal& SVKnots, const TColStd_Array2OfReal& SWeights) { - // check whether difference between vaues of weights more than 1000. + // check whether difference between values of weights more than 1000. if(!theBSplineSurface->IsPolynomial()) { Standard_Real aMinValue = SWeights.Value(SWeights.LowerRow(), SWeights.LowerCol()); Standard_Real aMaxValue = SWeights.Value(SWeights.LowerRow(), SWeights.LowerCol()); diff --git a/src/IGESToBRep/IGESToBRep_TopoCurve.cxx b/src/IGESToBRep/IGESToBRep_TopoCurve.cxx index da9b15e2e4..d26eeea669 100644 --- a/src/IGESToBRep/IGESToBRep_TopoCurve.cxx +++ b/src/IGESToBRep/IGESToBRep_TopoCurve.cxx @@ -20,7 +20,7 @@ //:q5 abv 19.03.99 unnecessary includes removed //%14 03.03.99 pdn USA60022 do not insert lacking edge before fix missing seam // pdn 10.03.99 S4135 Creating vertices using minimal tolerance. -//S4181 pdn 17.04.99 Inplementing of reading IGES elementary surfaces. Transform +//S4181 pdn 17.04.99 Implementing of reading IGES elementary surfaces. Transform //pcurves using gp_Trsf2d that depends on type of pair (IGES surface, resulting //CAS.CADE surface) //szv#9:PRO19565:04Oct99 missing location for standalone vertices corrected diff --git a/src/IntWalk/IntWalk_IWalking_3.gxx b/src/IntWalk/IntWalk_IWalking_3.gxx index 224d257508..a2c482337b 100644 --- a/src/IntWalk/IntWalk_IWalking_3.gxx +++ b/src/IntWalk/IntWalk_IWalking_3.gxx @@ -301,7 +301,7 @@ void IntWalk_IWalking::ComputeOpenLine(const TColStd_SequenceOfReal& Umult, Arrive = Standard_False; break; } - // necessairily N > 0 jag 940617 + // necessarily N > 0 jag 940617 // point of stop given at input PathPnt = Pnts1.Value(N); diff --git a/src/IntWalk/IntWalk_PWalking.cxx b/src/IntWalk/IntWalk_PWalking.cxx index bc32b6a9ed..c665bb4e49 100644 --- a/src/IntWalk/IntWalk_PWalking.cxx +++ b/src/IntWalk/IntWalk_PWalking.cxx @@ -3493,7 +3493,7 @@ IntWalk_StatusDeflection IntWalk_PWalking::TestDeflection(const IntImp_ConstIso Now, let substitute required deflection (tolconf or tolconf/2) to z. Then it is necessary to check if e < z or if e > z. - In this case, it is enough to comapare Fs(e) and Fs(z). + In this case, it is enough to compare Fs(e) and Fs(z). At that Fs(e) > 0 because sin(B/2) > 0 always. Therefore, if Fs(z) < 0.0 then Fs(e) > Fs(z) ==> e < z definitely. diff --git a/src/LocOpe/LocOpe_CSIntersector.hxx b/src/LocOpe/LocOpe_CSIntersector.hxx index 336440f17e..0c0118222e 100644 --- a/src/LocOpe/LocOpe_CSIntersector.hxx +++ b/src/LocOpe/LocOpe_CSIntersector.hxx @@ -43,7 +43,7 @@ public: //! Empty constructor. LocOpe_CSIntersector(); - //! Creates and performs the intersection betwwen + //! Creates and performs the intersection between //! and . LocOpe_CSIntersector(const TopoDS_Shape& S); diff --git a/src/LocOpe/LocOpe_CurveShapeIntersector.hxx b/src/LocOpe/LocOpe_CurveShapeIntersector.hxx index 3f36395e91..110a04a8b7 100644 --- a/src/LocOpe/LocOpe_CurveShapeIntersector.hxx +++ b/src/LocOpe/LocOpe_CurveShapeIntersector.hxx @@ -43,11 +43,11 @@ public: //! Empty constructor. LocOpe_CurveShapeIntersector(); - //! Creates and performs the intersection betwwen + //! Creates and performs the intersection between //! and . LocOpe_CurveShapeIntersector(const gp_Ax1& Axis, const TopoDS_Shape& S); - //! Creates and performs yte intersection betwwen + //! Creates and performs yte intersection between //! and . LocOpe_CurveShapeIntersector(const gp_Circ& C, const TopoDS_Shape& S); diff --git a/src/OSD/OSD_MemInfo.hxx b/src/OSD/OSD_MemInfo.hxx index ea2c4e48cb..27c493527b 100644 --- a/src/OSD/OSD_MemInfo.hxx +++ b/src/OSD/OSD_MemInfo.hxx @@ -41,7 +41,7 @@ //! application memory consumption! //! //! User should analyze all values in specific case to make correct decision -//! about memory (over)usage. This is also prefferred to use specialized +//! about memory (over)usage. This is also preferred to use specialized //! tools to detect memory leaks. //! //! This also means that these values should not be used for intellectual diff --git a/src/OSD/OSD_Parallel.hxx b/src/OSD/OSD_Parallel.hxx index 190b49d329..849bff7614 100644 --- a/src/OSD/OSD_Parallel.hxx +++ b/src/OSD/OSD_Parallel.hxx @@ -38,7 +38,7 @@ //! class Functor //! { //! public: -//! void operator() ([proccesing instance]) const +//! void operator() ([processing instance]) const //! { //! //... //! } diff --git a/src/OpenGl/OpenGl_View.hxx b/src/OpenGl/OpenGl_View.hxx index 5d4cca1029..766fccd9f1 100644 --- a/src/OpenGl/OpenGl_View.hxx +++ b/src/OpenGl/OpenGl_View.hxx @@ -358,11 +358,11 @@ protected: //! @name low-level redrawing sub-routines protected: //! @name Rendering of GL graphics (with prepared drawing buffer). - //! Renders the graphical contents of the view into the preprepared shadowmap framebuffer. + //! Renders the graphical contents of the view into the prepared shadowmap framebuffer. //! @param theShadowMap [in] the framebuffer for rendering shadowmap. Standard_EXPORT virtual void renderShadowMap (const Handle(OpenGl_ShadowMap)& theShadowMap); - //! Renders the graphical contents of the view into the preprepared window or framebuffer. + //! Renders the graphical contents of the view into the prepared window or framebuffer. //! @param theProjection [in] the projection that should be used for rendering. //! @param theReadDrawFbo [in] the framebuffer for rendering graphics. //! @param theOitAccumFbo [in] the framebuffer for accumulating color and coverage for OIT process. diff --git a/src/PCDM/PCDM_StoreStatus.hxx b/src/PCDM/PCDM_StoreStatus.hxx index ed6c50abed..b09d820a4e 100644 --- a/src/PCDM/PCDM_StoreStatus.hxx +++ b/src/PCDM/PCDM_StoreStatus.hxx @@ -28,7 +28,7 @@ PCDM_SS_WriteFailure, //!< Attempt to write a file on disk failed PCDM_SS_Failure, //!< A general error occurred (unexpected) PCDM_SS_Doc_IsNull, //!< Attempt to save a null document PCDM_SS_No_Obj, //!< Document has no objects to be saved -PCDM_SS_Info_Section_Error, //!< Error occured on writing of an information-section +PCDM_SS_Info_Section_Error, //!< Error occurred on writing of an information-section PCDM_SS_UserBreak, //!< User interrupted the process of storage of the document on disk PCDM_SS_UnrecognizedFormat //!< No storage driver exist for this document format }; diff --git a/src/PLib/PLib.cxx b/src/PLib/PLib.cxx index 521a339a2a..5c0a52aa04 100644 --- a/src/PLib/PLib.cxx +++ b/src/PLib/PLib.cxx @@ -511,7 +511,7 @@ void PLib::RationalDerivative(const Standard_Integer Degree, //======================================================================= //function : RationalDerivatives -//purpose : Uses Homogeneous Poles Derivatives and Deivatives of Weights +//purpose : Uses Homogeneous Poles Derivatives and Derivatives of Weights //======================================================================= void PLib::RationalDerivatives(const Standard_Integer DerivativeRequest, diff --git a/src/PLib/PLib_JacobiPolynomial.cxx b/src/PLib/PLib_JacobiPolynomial.cxx index 6db277c6b7..2bed14261b 100644 --- a/src/PLib/PLib_JacobiPolynomial.cxx +++ b/src/PLib/PLib_JacobiPolynomial.cxx @@ -330,7 +330,7 @@ void PLib_JacobiPolynomial::D0123(const Standard_Integer NDeriv, if (myTNorm.IsNull()) { - // Inizialization of myTNorm,myCofA,myCofB,myDenom + // Initialization of myTNorm,myCofA,myCofB,myDenom myTNorm = new TColStd_HArray1OfReal(0,myDegree); for (i=0; i<=myDegree; i++) { diff --git a/src/QABugs/QABugs_17.cxx b/src/QABugs/QABugs_17.cxx index 8960b3c3ec..c48888900f 100644 --- a/src/QABugs/QABugs_17.cxx +++ b/src/QABugs/QABugs_17.cxx @@ -242,7 +242,7 @@ static Standard_Integer BUC60915_1(Draw_Interpretor& di, Standard_Integer argc, } Handle(AIS_InteractiveContext) context = ViewerTest::GetAISContext(); - //The following dimesion code has problems regarding arrow_size. The desired effect is not produced. + //The following dimension code has problems regarding arrow_size. The desired effect is not produced. /***************************************/ //First view /***************************************/ diff --git a/src/Quantity/Quantity_Color.hxx b/src/Quantity/Quantity_Color.hxx index 7cc6b58653..92c1007967 100644 --- a/src/Quantity/Quantity_Color.hxx +++ b/src/Quantity/Quantity_Color.hxx @@ -145,7 +145,7 @@ public: //! Returns the value of the perceptual difference between this color //! and @p theOther, computed using the CIEDE2000 formula. //! The difference is in range [0, 100.], with 1 approximately corresponding - //! to the minimal percievable difference (usually difference 5 or greater is + //! to the minimal perceivable difference (usually difference 5 or greater is //! needed for the difference to be recognizable in practice). Standard_EXPORT Standard_Real DeltaE2000 (const Quantity_Color& theOther) const; diff --git a/src/RWStepKinematics/RWStepKinematics_RWActuatedKinPairAndOrderKinPair.cxx b/src/RWStepKinematics/RWStepKinematics_RWActuatedKinPairAndOrderKinPair.cxx index c56c22a4a0..6800c7557e 100644 --- a/src/RWStepKinematics/RWStepKinematics_RWActuatedKinPairAndOrderKinPair.cxx +++ b/src/RWStepKinematics/RWStepKinematics_RWActuatedKinPairAndOrderKinPair.cxx @@ -1687,7 +1687,7 @@ void RWStepKinematics_RWActuatedKinPairAndOrderKinPair::WriteStep (StepData_StepWriter& theSW, const Handle(StepKinematics_ActuatedKinPairAndOrderKinPair)& theEnt) const { - // --- Instance of plex componant BoundedCurve --- + // --- Instance of plex component BoundedCurve --- theSW.StartEntity("(ACTUATED_KINEMATIC_PAIR"); diff --git a/src/RWStepKinematics/RWStepKinematics_RWKinematicLinkRepresentationAssociation.cxx b/src/RWStepKinematics/RWStepKinematics_RWKinematicLinkRepresentationAssociation.cxx index 26d87cb2af..e6d0753fc5 100644 --- a/src/RWStepKinematics/RWStepKinematics_RWKinematicLinkRepresentationAssociation.cxx +++ b/src/RWStepKinematics/RWStepKinematics_RWKinematicLinkRepresentationAssociation.cxx @@ -62,7 +62,7 @@ void RWStepKinematics_RWKinematicLinkRepresentationAssociation::ReadStep (const StepRepr_RepresentationOrRepresentationReference aRepresentationRelationship_Rep2; theData->ReadEntity (theNum, 4, "representation_relationship.rep2", theArch, aRepresentationRelationship_Rep2); - // Process only one type (Representaion) + // Process only one type (Representation) if (aRepresentationRelationship_Rep1.CaseNumber() != 1 || aRepresentationRelationship_Rep1.CaseNumber() != 1) return; diff --git a/src/SelectMgr/SelectMgr_RectangularFrustum.cxx b/src/SelectMgr/SelectMgr_RectangularFrustum.cxx index 6ae92c1a0b..0ec55d3a16 100644 --- a/src/SelectMgr/SelectMgr_RectangularFrustum.cxx +++ b/src/SelectMgr/SelectMgr_RectangularFrustum.cxx @@ -233,7 +233,7 @@ void SelectMgr_RectangularFrustum::cacheVertexProjections (SelectMgr_Rectangular // one another, only 2 vertices that belong to opposite faces can be projected // to simplify calculations. Standard_Integer aVertIdxs[6] = { LeftTopNear, LeftBottomNear, // opposite planes in height direction - LeftBottomNear, RightBottomNear, // opposite planes in width direcion + LeftBottomNear, RightBottomNear, // opposite planes in width direction LeftBottomFar, RightBottomNear }; // opposite planes in depth direction for (Standard_Integer aPlaneIdx = 0; aPlaneIdx < 5; aPlaneIdx += 2) { diff --git a/src/ShapeAnalysis/ShapeAnalysis_CanonicalRecognition.cxx b/src/ShapeAnalysis/ShapeAnalysis_CanonicalRecognition.cxx index 9fa226eb37..08a3763b36 100644 --- a/src/ShapeAnalysis/ShapeAnalysis_CanonicalRecognition.cxx +++ b/src/ShapeAnalysis/ShapeAnalysis_CanonicalRecognition.cxx @@ -826,8 +826,8 @@ Standard_Boolean ShapeAnalysis_CanonicalRecognition::GetSurfaceByLS(const TopoDS // with relative precision about aRelDev. // For example, if radius of sample surface is R, // it means, that "exact" vaue is in interav - //[R - aRelDev*R, R + aRelDev*R]. This intrrval is set - // for R as boundary values for dptimization algo. + //[R - aRelDev*R, R + aRelDev*R]. This interval is set + // for R as boundary values for optimization algo. FillSolverData(theTarget, thePos, theParams, aStartPoint, aFBnd, aLBnd, aRelDev); diff --git a/src/ShapeUpgrade/ShapeUpgrade_RemoveLocations.hxx b/src/ShapeUpgrade/ShapeUpgrade_RemoveLocations.hxx index 37ed957ba0..4e80dfa365 100644 --- a/src/ShapeUpgrade/ShapeUpgrade_RemoveLocations.hxx +++ b/src/ShapeUpgrade/ShapeUpgrade_RemoveLocations.hxx @@ -38,7 +38,7 @@ public: //! Empty constructor Standard_EXPORT ShapeUpgrade_RemoveLocations(); - //! Removes all location correspodingly to RemoveLevel. + //! Removes all location correspondingly to RemoveLevel. Standard_EXPORT Standard_Boolean Remove (const TopoDS_Shape& theShape); //! Returns shape with removed locations. diff --git a/src/StepData/StepData_ConfParameters.hxx b/src/StepData/StepData_ConfParameters.hxx index 99fd113caa..6228cb3f40 100644 --- a/src/StepData/StepData_ConfParameters.hxx +++ b/src/StepData/StepData_ConfParameters.hxx @@ -182,7 +182,7 @@ public: WriteMode_VertexMode WriteVertexMode = WriteMode_VertexMode_OneCompound; // // ============================================================================ -// Method : Consturctor +// Method : Constructor // Purpose: // ============================================================================ StepData_Factors::StepData_Factors() diff --git a/src/StepData/StepData_StepWriter.hxx b/src/StepData/StepData_StepWriter.hxx index 34c2fc2ea6..c6d346dee2 100644 --- a/src/StepData/StepData_StepWriter.hxx +++ b/src/StepData/StepData_StepWriter.hxx @@ -150,7 +150,7 @@ public: //! same as above but accepts a CString (ex.: "..." directly) Standard_EXPORT void SendComment (const Standard_CString text); - //! sets entity's StepType, opens brakets, starts param no to 0 + //! sets entity's StepType, opens brackets, starts param no to 0 //! params are separated by comma //! Remark : for a Multiple Type Entity (see Express ANDOR clause) //! StartComplex must be called before sending components, then @@ -161,7 +161,7 @@ public: Standard_EXPORT void StartEntity (const TCollection_AsciiString& atype); //! sends the start of a complex entity, which is a simple open - //! bracket (without increasing braket level) + //! bracket (without increasing bracket level) //! It must be called JUST AFTER SendEntity and BEFORE sending //! components, each one begins by StartEntity Standard_EXPORT void StartComplex(); diff --git a/src/StepToTopoDS/StepToTopoDS_TranslateEdge.cxx b/src/StepToTopoDS/StepToTopoDS_TranslateEdge.cxx index 227b9f46a4..66b4730281 100644 --- a/src/StepToTopoDS/StepToTopoDS_TranslateEdge.cxx +++ b/src/StepToTopoDS/StepToTopoDS_TranslateEdge.cxx @@ -410,7 +410,7 @@ void StepToTopoDS_TranslateEdge::MakeFromCurve3D if ( temp1 > preci || temp2 > preci ) { // #25415: handling of special case found on some STEP files produced by FPX Expert 2013 (PCB design system): // edge curve is line displaced from its true position but with correct direction; - // we can shift the line in this case so that it passes through vertices correcty + // we can shift the line in this case so that it passes through vertices correctly if (Abs (temp1 - temp2) < preci && Abs (U2 - U1 - pnt1.Distance(pnt2)) < Precision::Confusion() && C1->IsKind(STANDARD_TYPE(Geom_Line))) { diff --git a/src/TDataStd/TDataStd_TreeNode.cxx b/src/TDataStd/TDataStd_TreeNode.cxx index 7f40a930ed..ac12e831c5 100644 --- a/src/TDataStd/TDataStd_TreeNode.cxx +++ b/src/TDataStd/TDataStd_TreeNode.cxx @@ -207,7 +207,7 @@ Standard_Boolean TDataStd_TreeNode::InsertAfter (const Handle(TDataStd_TreeNode) //======================================================================= //function : Remove -//purpose : Removees the function from the function tree +//purpose : Removes the function from the function tree //======================================================================= Standard_Boolean TDataStd_TreeNode::Remove () diff --git a/src/TObj/TObj_CheckModel.hxx b/src/TObj/TObj_CheckModel.hxx index b62fcddcff..5b3eea68a6 100644 --- a/src/TObj/TObj_CheckModel.hxx +++ b/src/TObj/TObj_CheckModel.hxx @@ -23,7 +23,7 @@ /** * This class provides consistency check of the TObj model. - * It collects all inconsistencies in the status bits and prepaires + * It collects all inconsistencies in the status bits and prepares * messages to be sent using SendStatusMessages (SendMessages) method. * It supports also the fix mode, in which some inconsistencies are * corrected. diff --git a/src/TObj/TObj_Object.hxx b/src/TObj/TObj_Object.hxx index 2a54499227..907db9a092 100644 --- a/src/TObj/TObj_Object.hxx +++ b/src/TObj/TObj_Object.hxx @@ -413,7 +413,7 @@ class TObj_Object : public Standard_Transient public: /** - * Method for updating object afrer restoring + * Method for updating object after restoring */ //! Performs updating the links and dependances of the object which are not diff --git a/src/TObj/TObj_Partition.hxx b/src/TObj/TObj_Partition.hxx index 1b693f62d2..8be08d0c28 100644 --- a/src/TObj/TObj_Partition.hxx +++ b/src/TObj/TObj_Partition.hxx @@ -66,7 +66,7 @@ class TObj_Partition : public TObj_Object public: /** - * Method for updating object afrer restoring + * Method for updating object after restoring */ //! Performs updating the links and dependencies of the object which are not diff --git a/src/TObj/TObj_TModel.hxx b/src/TObj/TObj_TModel.hxx index d052c6f69e..007bdec838 100644 --- a/src/TObj/TObj_TModel.hxx +++ b/src/TObj/TObj_TModel.hxx @@ -24,7 +24,7 @@ class TObj_Model; /** * Attribute to store OCAF-based models in OCAF tree -* The persistency mechanism of the TObj_TModel allowes to save +* The persistency mechanism of the TObj_TModel allows to save * and restore various types of models without recompilation of the schema */ diff --git a/src/TObj/TObj_TObject.hxx b/src/TObj/TObj_TObject.hxx index 286f479007..d611a9f30b 100644 --- a/src/TObj/TObj_TObject.hxx +++ b/src/TObj/TObj_TObject.hxx @@ -28,7 +28,7 @@ class TDF_Label; /** * Purpose: OCAF Attribute to storing objects (interfaces) of OCAF-based * modelers in the OCAF tree. -* The persistency mechanism of the TObj_TObject allowes to save +* The persistency mechanism of the TObj_TObject allows to save * and restore objects of various subtypes without recompilation of the schema */ diff --git a/src/TopClass/TopClass_SolidClassifier.gxx b/src/TopClass/TopClass_SolidClassifier.gxx index 42a439ed78..48e05aa8eb 100644 --- a/src/TopClass/TopClass_SolidClassifier.gxx +++ b/src/TopClass/TopClass_SolidClassifier.gxx @@ -50,7 +50,7 @@ void TopClass_SolidClassifier::Perform(TheSolidExplorer& SolidExplorer, gp_Lin L; Standard_Real Par; - //-- We compute the intersection betwwen the line builded in the Solid Explorer + //-- We compute the intersection between the line builded in the Solid Explorer //-- and the shape. SolidExplorer.Segment(P,L,Par); diff --git a/src/V3d/V3d_Viewer.hxx b/src/V3d/V3d_Viewer.hxx index d2431c6dbe..ca31c7b532 100644 --- a/src/V3d/V3d_Viewer.hxx +++ b/src/V3d/V3d_Viewer.hxx @@ -394,7 +394,7 @@ public: //! @name grid management //! Display grid echo at requested point in the view. Standard_EXPORT void ShowGridEcho (const Handle(V3d_View)& theView, const Graphic3d_Vertex& thePoint); - //! Temporarly hide grid echo. + //! Temporarily hide grid echo. Standard_EXPORT void HideGridEcho (const Handle(V3d_View)& theView); public: //! @name deprecated methods diff --git a/src/XCAFDimTolObjects/XCAFDimTolObjects_DimensionObject.hxx b/src/XCAFDimTolObjects/XCAFDimTolObjects_DimensionObject.hxx index c34f6b6165..a03f10285f 100644 --- a/src/XCAFDimTolObjects/XCAFDimTolObjects_DimensionObject.hxx +++ b/src/XCAFDimTolObjects/XCAFDimTolObjects_DimensionObject.hxx @@ -211,14 +211,14 @@ public: //! Returns True if the object has annotation plane. Standard_Boolean HasPlane() const { return myHasPlane; } - //! Returns true, if connection point exists (for dimesional_size), + //! Returns true, if connection point exists (for dimensional_size), //! if connection point for the first shape exists (for dimensional_location). Standard_Boolean HasPoint() const { return myHasPoint1; } // Returns true, if connection point for the second shape exists (for dimensional_location only). Standard_Boolean HasPoint2() const { return myHasPoint2; } - //! Set connection point (for dimesional_size), + //! Set connection point (for dimensional_size), //! Set connection point for the first shape (for dimensional_location). void SetPoint(const gp_Pnt& thePnt) { myPnt1 = thePnt; @@ -231,7 +231,7 @@ public: myHasPoint2 = Standard_True; } - //! Get connection point (for dimesional_size), + //! Get connection point (for dimensional_size), //! Get connection point for the first shape (for dimensional_location). gp_Pnt GetPoint() const { return myPnt1; diff --git a/src/XCAFDoc/XCAFDoc_AssemblyGraph.cxx b/src/XCAFDoc/XCAFDoc_AssemblyGraph.cxx index b344faec96..057c0f22ce 100644 --- a/src/XCAFDoc/XCAFDoc_AssemblyGraph.cxx +++ b/src/XCAFDoc/XCAFDoc_AssemblyGraph.cxx @@ -256,7 +256,7 @@ Standard_Integer XCAFDoc_AssemblyGraph::addNode(const TDF_Label& theLabel, // ======================================================================= // function : Iterator constructor -// purpose : Iteration starts from the specifid node. +// purpose : Iteration starts from the specified node. // ======================================================================= XCAFDoc_AssemblyGraph::Iterator::Iterator(const Handle(XCAFDoc_AssemblyGraph)& theGraph, diff --git a/src/XCAFDoc/XCAFDoc_Editor.cxx b/src/XCAFDoc/XCAFDoc_Editor.cxx index 8d3d574798..f013485533 100644 --- a/src/XCAFDoc/XCAFDoc_Editor.cxx +++ b/src/XCAFDoc/XCAFDoc_Editor.cxx @@ -520,7 +520,7 @@ static void rescaleDimensionRefLabels(const TDF_LabelSequence& theRefLabels, if (!theBRepTrsf.IsDone()) { Standard_SStream aSS; - aSS << "Dimmension PMI " << theEntryDimension << " is not scaled."; + aSS << "Dimension PMI " << theEntryDimension << " is not scaled."; Message::SendWarning(aSS.str().c_str()); } else diff --git a/src/XSControl/XSControl_WorkSession.cxx b/src/XSControl/XSControl_WorkSession.cxx index 07ff5ce3eb..4ae8b4a028 100644 --- a/src/XSControl/XSControl_WorkSession.cxx +++ b/src/XSControl/XSControl_WorkSession.cxx @@ -105,7 +105,7 @@ void XSControl_WorkSession::SetController(const Handle(XSControl_Controller)& ct ClearShareOut(Standard_False); ClearFile(); - // Set worksession parameters from teh controller + // Set worksession parameters from the controller Handle(XSControl_WorkSession) aWorkSession(this); myController->Customise (aWorkSession); diff --git a/src/XSDRAWDE/XSDRAWDE.cxx b/src/XSDRAWDE/XSDRAWDE.cxx index 9038e8e43b..a05a99e5f9 100644 --- a/src/XSDRAWDE/XSDRAWDE.cxx +++ b/src/XSDRAWDE/XSDRAWDE.cxx @@ -387,19 +387,19 @@ void XSDRAWDE::Factory(Draw_Interpretor& theDI) "\n\t\t: Dump special resource generated from global configuration." "\n\t\t: '-path' - save resource configuration to the file" "\n\t\t: '-recursive' - flag to generate a resource from providers. Default is On. Off disables other options" - "\n\t\t: '-format' - flag to generate a resource for choosen formats. If list is empty, generate it for all" - "\n\t\t: '-vendor' - flag to generate a resource for choosen vendors. If list is empty, generate it for all", + "\n\t\t: '-format' - flag to generate a resource for chosen formats. If list is empty, generate it for all" + "\n\t\t: '-vendor' - flag to generate a resource for chosen vendors. If list is empty, generate it for all", __FILE__, DumpConfiguration, aGroup); theDI.Add("LoadConfiguration", "LoadConfiguration conf [-recursive {on|off}]\n" - "\n\t\t: 'conf' - path to the resouce file or string value in the special format" + "\n\t\t: 'conf' - path to the resource file or string value in the special format" "\n\t\t: '-recursive' - flag to generate a resource for all providers. Default is true" "\n\t\t: Configure global configuration according special resource", __FILE__, LoadConfiguration, aGroup); theDI.Add("CompareConfiguration", "CompareConfiguration conf1 conf2\n" - "\n\t\t: 'conf1' - path to the first resouce file or string value in the special format" - "\n\t\t: 'conf2' - path to the second resouce file or string value in the special format" + "\n\t\t: 'conf1' - path to the first resource file or string value in the special format" + "\n\t\t: 'conf2' - path to the second resource file or string value in the special format" "\n\t\t: Compare two configurations", __FILE__, CompareConfiguration, aGroup); theDI.Add("ReadFile", diff --git a/src/math/math_VectorBase.hxx b/src/math/math_VectorBase.hxx index cdb20cab62..d55356fc88 100644 --- a/src/math/math_VectorBase.hxx +++ b/src/math/math_VectorBase.hxx @@ -208,8 +208,8 @@ public: Add(theRight); } - //! Returns new vector as adding curent vector with the value "theRight". - //! An exception is raised if the vectors have not the same length. + //! Returns new vector as adding current vector with the value "theRight". + //! An exception is raised if the vectors do not have the same length. //! An exception is raised if the lengths are not equal. Standard_NODISCARD inline math_VectorBase Added(const math_VectorBase& theRight) const; diff --git a/tests/bugs/xde/bug547_2 b/tests/bugs/xde/bug547_2 index 59d1d4fd3c..c6171c1f60 100755 --- a/tests/bugs/xde/bug547_2 +++ b/tests/bugs/xde/bug547_2 @@ -6,7 +6,7 @@ puts "(case 2)" puts "========================" puts "" ################################## -## Big tolerance after "sewing" with tolearnce 0.5 +## Big tolerance after "sewing" with tolerance 0.5 ################################## restore [locate_data_file OCC547.brep] a From ca0c5a4074eebe646bec60585a16d9765b704ba6 Mon Sep 17 00:00:00 2001 From: Vitaut Tryputsin Date: Thu, 30 May 2024 13:26:24 +0300 Subject: [PATCH 583/639] 0033729: Visualization - Fixed transparency for capping in 'Graphic3d_RTM_BLEND_OIT' mode Added changes connected with restoring of color mask (if we store and restore only rgb part, we can miss transparency) --- src/OpenGl/OpenGl_CappingAlgo.cxx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/OpenGl/OpenGl_CappingAlgo.cxx b/src/OpenGl/OpenGl_CappingAlgo.cxx index 93a9b4c9d3..40b89d1142 100755 --- a/src/OpenGl/OpenGl_CappingAlgo.cxx +++ b/src/OpenGl/OpenGl_CappingAlgo.cxx @@ -121,8 +121,8 @@ namespace aContext->ShaderManager()->UpdateClippingState(); aContext->core11fwd->glClear (GL_STENCIL_BUFFER_BIT); - const bool aColorMaskBack = aContext->SetColorMask (false); - + const NCollection_Vec4 aColorMaskBack = aContext->ColorMaskRGBA(); + aContext->SetColorMask (false); // override aspects, disable culling theWorkspace->SetAspects (&theWorkspace->NoneCulling()); theWorkspace->ApplyAspects(); @@ -164,7 +164,7 @@ namespace aContext->ShaderManager()->UpdateClippingState(); // render capping plane using the generated stencil mask - aContext->SetColorMask (aColorMaskBack); + aContext->SetColorMaskRGBA (aColorMaskBack); if (theWorkspace->UseDepthWrite()) { aContext->core11fwd->glDepthMask (GL_TRUE); From 9fcfec881cebbeb10290077cec3e4ba88ec15dd0 Mon Sep 17 00:00:00 2001 From: carlosah Date: Tue, 24 Oct 2023 15:20:10 +0100 Subject: [PATCH 584/639] 0033513: Visualization - Integration of the ability to zoom with vertical mouse movements Added a new gesture for zooming after vertical mouse movement - AIS_MouseGesture_ZoomVertical --- src/AIS/AIS_MouseGesture.hxx | 2 ++ src/AIS/AIS_ViewController.cxx | 13 ++++++++++--- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/src/AIS/AIS_MouseGesture.hxx b/src/AIS/AIS_MouseGesture.hxx index b972e84451..b251a99b08 100644 --- a/src/AIS/AIS_MouseGesture.hxx +++ b/src/AIS/AIS_MouseGesture.hxx @@ -29,6 +29,8 @@ enum AIS_MouseGesture // AIS_MouseGesture_Zoom, //!< view zoom gesture; //! move mouse left to zoom-out, and to the right to zoom-in + AIS_MouseGesture_ZoomVertical, //!< view zoom gesture; + //! move mouse up to zoom-out, and to the down to zoom-in AIS_MouseGesture_ZoomWindow, //!< view zoom by window gesture; //! press button to start, move mouse to define rectangle, release to finish AIS_MouseGesture_Pan, //!< view panning gesture diff --git a/src/AIS/AIS_ViewController.cxx b/src/AIS/AIS_ViewController.cxx index 78e7007471..479972103b 100644 --- a/src/AIS/AIS_ViewController.cxx +++ b/src/AIS/AIS_ViewController.cxx @@ -843,6 +843,7 @@ bool AIS_ViewController::UpdateMouseButtons (const Graphic3d_Vec2i& thePoint, } case AIS_MouseGesture_Zoom: case AIS_MouseGesture_ZoomWindow: + case AIS_MouseGesture_ZoomVertical: { if (!myToAllowZooming) { @@ -1043,6 +1044,7 @@ bool AIS_ViewController::UpdateMousePosition (const Graphic3d_Vec2i& thePoint, break; } case AIS_MouseGesture_Zoom: + case AIS_MouseGesture_ZoomVertical: { if (!myToAllowZooming) { @@ -1051,15 +1053,20 @@ bool AIS_ViewController::UpdateMousePosition (const Graphic3d_Vec2i& thePoint, const double aZoomTol = theIsEmulated ? double(myTouchToleranceScale) * myTouchZoomThresholdPx : 0.0; - if (double (Abs (aDelta.x())) > aZoomTol) + const double aScrollDelta = myMouseActiveGesture == AIS_MouseGesture_Zoom + ? aDelta.x() + : aDelta.y(); + if (Abs (aScrollDelta) > aZoomTol) { - UpdateZoom (Aspect_ScrollDelta (aDelta.x())); + if (UpdateZoom (Aspect_ScrollDelta (aScrollDelta))) + { + toUpdateView = true; + } myUI.Dragging.ToMove = true; myUI.Dragging.PointTo = thePoint; myMouseProgressPoint = thePoint; - toUpdateView = true; } break; } From 245febe036df6f77f023b95620eb949df75b92cd Mon Sep 17 00:00:00 2001 From: luzpaz Date: Fri, 26 Jul 2024 03:51:12 -0400 Subject: [PATCH 585/639] 0033778: Documentation - Fix various typos found in codebase --- src/AIS/AIS.hxx | 2 +- src/AIS/AIS_ExclusionFilter.hxx | 2 +- src/AIS/AIS_RubberBand.hxx | 2 +- src/AdvApp2Var/AdvApp2Var_ApproxAFunc2Var.cxx | 4 +- src/AdvApp2Var/AdvApp2Var_ApproxAFunc2Var.hxx | 4 +- src/AdvApp2Var/AdvApp2Var_ApproxF2var.cxx | 16 +++--- src/AdvApp2Var/AdvApp2Var_MathBase.cxx | 50 +++++++++---------- src/AdvApp2Var/AdvApp2Var_SysBase.cxx | 4 +- src/AdvApprox/AdvApprox_SimpleApprox.hxx | 2 +- src/BOPAlgo/BOPAlgo_Builder_2.cxx | 2 +- src/BOPTools/BOPTools_AlgoTools.cxx | 2 +- src/BOPTools/BOPTools_AlgoTools.hxx | 12 ++--- .../BRepExtrema_ProximityDistTool.cxx | 2 +- .../BRepExtrema_ProximityDistTool.hxx | 4 +- .../BRepExtrema_ProximityValueTool.cxx | 6 +-- .../BRepExtrema_ProximityValueTool.hxx | 2 +- .../BRepExtrema_ShapeProximity.hxx | 2 +- src/BRepTools/BRepTools_ReShape.cxx | 8 +-- src/BRepTools/BRepTools_ShapeSet.hxx | 2 +- src/BSplSLib/BSplSLib_Cache.hxx | 2 +- src/BndLib/BndLib_AddSurface.cxx | 2 +- src/CPnts/CPnts_AbscissaPoint.cxx | 2 +- src/ChFi3d/ChFi3d_FilBuilder_C3.cxx | 4 +- src/Convert/Convert_CompPolynomialToPoles.hxx | 4 +- src/GProp/GProp_PrincipalProps.hxx | 4 +- src/GProp/GProp_ValueType.hxx | 2 +- src/GeometryTest/GeometryTest.hxx | 2 +- src/Hermit/Hermit.cxx | 4 +- src/IGESGeom/IGESGeom.hxx | 2 +- src/IGESGeom/IGESGeom_Line.hxx | 2 +- src/IntAna/IntAna_Curve.hxx | 2 +- src/IntSurf/IntSurf_InteriorPointTool.hxx | 4 +- src/IntTools/IntTools_Context.cxx | 2 +- .../NCollection_BasePointerVector.hxx | 2 +- .../NCollection_WinHeapAllocator.hxx | 4 +- src/OpenGlTest/OpenGlTest.hxx | 2 +- src/Poly/Poly_CoherentTriangulation.hxx | 2 +- src/Quantity/Quantity_ColorRGBA.cxx | 2 +- .../ShapeAnalysis_CanonicalRecognition.cxx | 4 +- .../ShapeAnalysis_CanonicalRecognition.hxx | 2 +- .../ShapeAnalysis_FreeBounds.hxx | 4 +- src/ShapeFix/ShapeFix_Shell.cxx | 6 +-- src/ShapeFix/ShapeFix_SplitTool.cxx | 2 +- src/ShapeFix/ShapeFix_WireSegment.hxx | 4 +- ...P242_ItemIdentifiedRepresentationUsage.hxx | 2 +- src/StepFile/StepFile_ReadData.hxx | 2 +- src/StepFile/lex.step.cxx | 2 +- src/StepFile/step.lex | 2 +- src/TopLoc/TopLoc_SListOfItemLocation.hxx | 2 +- .../TopOpeBRepBuild_Builder.cxx | 2 +- .../TopOpeBRepBuild_Builder1.cxx | 6 +-- .../TopOpeBRepBuild_Builder1_1.cxx | 2 +- src/TopOpeBRepBuild/TopOpeBRepBuild_KPart.cxx | 4 +- .../TopOpeBRepBuild_makefaces.cxx | 2 +- .../TopOpeBRepDS_Edge3dInterferenceTool.cxx | 4 +- .../TopOpeBRepDS_ShapeShapeInterference.hxx | 2 +- src/VrmlData/VrmlData_Box.hxx | 4 +- src/VrmlData/VrmlData_Geometry.cxx | 2 +- src/VrmlData/VrmlData_Scene.cxx | 2 +- src/VrmlData/VrmlData_Scene.hxx | 4 +- src/VrmlData/VrmlData_Sphere.hxx | 2 +- src/XSControl/XSControl_Controller.hxx | 2 +- 62 files changed, 124 insertions(+), 124 deletions(-) diff --git a/src/AIS/AIS.hxx b/src/AIS/AIS.hxx index 1716313618..c22315487c 100644 --- a/src/AIS/AIS.hxx +++ b/src/AIS/AIS.hxx @@ -36,7 +36,7 @@ //! The Datum groups together the construction elements such as lines, circles, points, trihedra, plane trihedra, planes and axes. //! The Relation is made up of constraints on one or more interactive shapes and the corresponding reference geometry. //! For example, you might want to constrain two edges in a parallel relation. -//! This contraint is considered as an object in its own right, and is shown as a sensitive primitive. +//! This constraint is considered as an object in its own right, and is shown as a sensitive primitive. //! This takes the graphic form of a perpendicular arrow marked with the || symbol and lying between the two edges. //! The Object type includes topological shapes, and connections between shapes. //! None, in order not to eliminate the object, tells the application to look further until it finds an object definition in its generation which is accepted. diff --git a/src/AIS/AIS_ExclusionFilter.hxx b/src/AIS/AIS_ExclusionFilter.hxx index f182d43585..201741ffb9 100644 --- a/src/AIS/AIS_ExclusionFilter.hxx +++ b/src/AIS/AIS_ExclusionFilter.hxx @@ -42,7 +42,7 @@ DEFINE_STANDARD_HANDLE(AIS_ExclusionFilter, SelectMgr_Filter) //! except those of the types and signatures stored //! in the filter framework //! - Exclusion flag off -//! - the funciton IsOk answers true for all objects +//! - the function IsOk answers true for all objects //! which have the same type and signature as the stored ones. class AIS_ExclusionFilter : public SelectMgr_Filter { diff --git a/src/AIS/AIS_RubberBand.hxx b/src/AIS/AIS_RubberBand.hxx index a7a55dbda7..ae524450a0 100644 --- a/src/AIS/AIS_RubberBand.hxx +++ b/src/AIS/AIS_RubberBand.hxx @@ -40,7 +40,7 @@ public: //! @warning It binds this object with Graphic3d_ZLayerId_TopOSD layer. Standard_EXPORT AIS_RubberBand(); - //! Consructs the rubber band with empty filling and defined line style. + //! Constructs the rubber band with empty filling and defined line style. //! @param theLineColor [in] color of rubber band lines //! @param theType [in] type of rubber band lines //! @param theLineWidth [in] width of rubber band line. By default it is 1. diff --git a/src/AdvApp2Var/AdvApp2Var_ApproxAFunc2Var.cxx b/src/AdvApp2Var/AdvApp2Var_ApproxAFunc2Var.cxx index f07a63a035..104b6548d0 100644 --- a/src/AdvApp2Var/AdvApp2Var_ApproxAFunc2Var.cxx +++ b/src/AdvApp2Var/AdvApp2Var_ApproxAFunc2Var.cxx @@ -363,7 +363,7 @@ void AdvApp2Var_ApproxAFunc2Var::ComputePatches(const AdvApprox_Cutting& UChoice throw Standard_ConstructionError("AdvApp2Var_ApproxAFunc2Var : Surface Discretisation Error"); } -// calculate the number and the type of autorized cuts +// calculate the number and the type of authorized cuts // depending on the max number of squares and the validity of next cuts. NbU = myResult.NbPatchInU(); NbV = myResult.NbPatchInV(); @@ -457,7 +457,7 @@ void AdvApp2Var_ApproxAFunc2Var::ComputePatches(const AdvApprox_Cutting& UChoice throw Standard_ConstructionError("AdvApp2Var_ApproxAFunc2Var : Surface Discretisation Error"); } -// calculate the number and type of autorized cuts +// calculate the number and type of authorized cuts // depending on the max number of squares and the validity of next cuts NbU = myResult.NbPatchInU(); NbV = myResult.NbPatchInV(); diff --git a/src/AdvApp2Var/AdvApp2Var_ApproxAFunc2Var.hxx b/src/AdvApp2Var/AdvApp2Var_ApproxAFunc2Var.hxx index 73e72e7da5..475f6c9c0c 100644 --- a/src/AdvApp2Var/AdvApp2Var_ApproxAFunc2Var.hxx +++ b/src/AdvApp2Var/AdvApp2Var_ApproxAFunc2Var.hxx @@ -42,13 +42,13 @@ class Geom_BSplineSurface; //! OneDTol, TwoDTol, ThreeDTol: The tolerance of approximation in each //! subspaces //! OneDTolFr, TwoDTolFr, ThreeDTolFr: The tolerance of approximation on -//! the boundarys in each subspaces +//! the boundaries in each subspaces //! [FirstInU, LastInU]: The Bounds in U of the Approximation //! [FirstInV, LastInV]: The Bounds in V of the Approximation //! FavorIso : Give preference to extract u-iso or v-iso on F(U,V) //! This can be useful to optimize the method //! ContInU, ContInV : Continuity waiting in u and v -//! PrecisCode : Precision on approximation's error mesurement +//! PrecisCode : Precision on approximation's error measurement //! 1 : Fast computation and average precision //! 2 : Average computation and good precision //! 3 : Slow computation and very good precision diff --git a/src/AdvApp2Var/AdvApp2Var_ApproxF2var.cxx b/src/AdvApp2Var/AdvApp2Var_ApproxF2var.cxx index 648f5300b4..626d52a531 100644 --- a/src/AdvApp2Var/AdvApp2Var_ApproxF2var.cxx +++ b/src/AdvApp2Var/AdvApp2Var_ApproxF2var.cxx @@ -337,7 +337,7 @@ int mma1cdi_(integer *ndimen, /* HERMIT: Table of coeff. 2*(IORDRE+1) Hermite polynoms */ /* of degree 2*IORDRE+1. */ /* IERCOD: Error code, */ -/* = 0, Everythig is OK */ +/* = 0, Everything is OK */ /* = 1, The value of IORDRE is out of (0,2) */ /* COMMON USED : */ /* ---------------- */ @@ -989,8 +989,8 @@ int mma1fer_(integer *,//ndimen, /* IORDRE: Order of constraint at the extremities of the border */ /* -1 = no constraints, */ /* 0 = constraints of passage to limits (i.e. C0), */ -/* 1 = C0 + constraintes of 1st derivatives (i.e. C1), */ -/* 2 = C1 + constraintes of 2nd derivatives (i.e. C2). */ +/* 1 = C0 + constraints of 1st derivatives (i.e. C1), */ +/* 2 = C1 + constraints of 2nd derivatives (i.e. C2). */ /* NDGJAC: Degree of development in series to use for the calculation */ /* in the base of Jacobi. */ /* CRVJAC: Table of coeff. of the curve of approximation in the */ @@ -1131,7 +1131,7 @@ int mma1fer_(integer *,//ndimen, /* ------------------------------ The end ------------------------------- */ -/* --> The order of constraints is not within autorized values. */ +/* --> The order of constraints is not within authorized values. */ L9100: *iercod = 1; goto L9999; @@ -3520,7 +3520,7 @@ int AdvApp2Var_ApproxF2var::mma2cdi_( integer *ndimen, goto L9100; } -/* ---- Subract discretizations of polynoms of constraints +/* ---- Subtract discretizations of polynoms of constraints ---- */ mma2cd3_(ndimen, nbpntu, &urootl[1], nbpntv, iordru, &sotbu1[1], @@ -4919,7 +4919,7 @@ int mma2cfv_(integer *ndvjac, /* MAXDGU: Degree maximum by U of coeff. to calculate. */ /* NBPNTV: Degree of the Legendre polynom on the roots which of */ /* the coefficients of integration by V are calculated */ -/* by Gauss method. It is reqired that NBPNTV = 30, 40, 50 or 61 and NDVJAC < NBPNTV. */ +/* by Gauss method. It is required that NBPNTV = 30, 40, 50 or 61 and NDVJAC < NBPNTV. */ /* GSSVTB: Table of coefficients of integration by Gauss method */ /* by V for NDVJAC fixed: j varies from 0 to NBPNTV/2. */ /* CHPAIR: Table of terms connected to degrees from MINDGU to MAXDGU by U to */ @@ -7511,7 +7511,7 @@ int mmmapcoe_(integer *ndim, /* FUNCTION : */ /* ---------- */ -/* Calculate the coefficients of polinomial approximation curve */ +/* Calculate the coefficients of polynomial approximation curve */ /* of degree NDGJAC by the method of smallest squares starting from */ /* the discretization of function on the roots of Legendre polynom */ /* of degree NBPNTS. */ @@ -8102,7 +8102,7 @@ int mmjacpt_(const integer *ndimen, /* OUTPUT ARGUMENTS : */ /* ------------------- */ -/* PTCAUX : Auxilliary space. */ +/* PTCAUX : Auxiliary space. */ /* PTCCAN : The square in the canonic base (-1,1) */ /* COMMONS USED : */ diff --git a/src/AdvApp2Var/AdvApp2Var_MathBase.cxx b/src/AdvApp2Var/AdvApp2Var_MathBase.cxx index 4383b6c685..819a78cdb0 100644 --- a/src/AdvApp2Var/AdvApp2Var_MathBase.cxx +++ b/src/AdvApp2Var/AdvApp2Var_MathBase.cxx @@ -1229,7 +1229,7 @@ int AdvApp2Var_MathBase::mmaperx_(integer *ncofmx, /* ERRMAX : Precision of the approximation. */ /* IERCOD = 0, OK */ /* = 1, order of constraints (IORDRE) is not within the */ -/* autorized values. */ +/* authorized values. */ /* COMMONS USED : */ /* ---------------- */ @@ -2281,7 +2281,7 @@ int AdvApp2Var_MathBase::mmcglc1_(integer *ndimax, /* length calculation. */ /* TFINAL : Upper limit of the interval of integration for */ /* length calculation. */ -/* EPSILN : REQIRED precision for length calculation. */ +/* EPSILN : REQUIRED precision for length calculation. */ /* OUTPUT ARGUMENTS : */ /* ------------------- */ @@ -2677,14 +2677,14 @@ int AdvApp2Var_MathBase::mmcvctx_(integer *ndimen, /* 2 --> cas (0)+ (1) + " " 2nd derivatives. */ /* etc... */ /* CTRTES : Table of constraints. */ -/* CTRTES(*,1,*) = contraints at -1. */ -/* CTRTES(*,2,*) = contraints at 1. */ +/* CTRTES(*,1,*) = constraints at -1. */ +/* CTRTES(*,2,*) = constraints at 1. */ /* OUTPUT ARGUMENTS : */ /* ------------------- */ /* CRVRES : Resulting curve defined on (-1,1). */ -/* TABAUX : Auxilliary matrix. */ -/* XMATRI : Auxilliary matrix. */ +/* TABAUX : Auxiliary matrix. */ +/* XMATRI : Auxiliary matrix. */ /* COMMONS UTILISES : */ /* ---------------- */ @@ -3560,7 +3560,7 @@ int AdvApp2Var_MathBase::mmdrvck_(integer *ncoeff, */ -/* Factorials (1 to 21) caculated on VAX in R*16 */ +/* Factorials (1 to 21) calculated on VAX in R*16 */ /* ********************************************************************** @@ -3845,7 +3845,7 @@ int mmexthi_(integer *ndegre, /* within the interval [0,1]. They are ranked for the degrees increasing from */ /* 2 to 61. */ /* HILTAB : Table of Legendre interpolators concerning ROOTAB. */ -/* The adressing is the same. */ +/* The addressing is the same. */ /* HI0TAB : Table of Legendre interpolators for root x=0 */ /* of polynoms of UNEVEN degree. */ /* RTLTB0 : Table of Li(uk) where uk are the roots of */ @@ -3990,7 +3990,7 @@ int mmextrl_(integer *ndegre, /* within the interval [0,1]. They are ranked for the degrees increasing from */ /* 2 to 61. */ /* HILTAB : Table of Legendre interpolators concerning ROOTAB. */ -/* The adressing is the same. */ +/* The addressing is the same. */ /* HI0TAB : Table of Legendre interpolators for root x=0 */ /* of polynoms of UNEVEN degree. */ /* RTLTB0 : Table of Li(uk) where uk are the roots of */ @@ -4610,7 +4610,7 @@ int AdvApp2Var_MathBase::mmfmcb5_(integer *isenmsc, /* FUNCTION : */ /* ---------- */ -/* Reformating (and eventual compression/decompression) of curve */ +/* Reformatting (and eventual compression/decompression) of curve */ /* (ndim,.) by (.,ndim) and vice versa. */ /* KEYWORDS : */ @@ -6260,7 +6260,7 @@ int AdvApp2Var_MathBase::mmhjcan_(integer *ndimen, /* OUTPUT ARGUMENTS : */ /* ------------------- */ -/* POLAUX : Auxilliary space. */ +/* POLAUX : Auxiliary space. */ /* CRVCAN : The curve in the canonic base [-1,1] */ /* COMMONS USED : */ @@ -6297,7 +6297,7 @@ int AdvApp2Var_MathBase::mmhjcan_(integer *ndimen, i__1 = *ndim; for (nd = 1; nd <= i__1; ++nd) { -/* Loading of the auxilliary table. */ +/* Loading of the auxiliary table. */ ii = 0; i__2 = ndeg / 2; for (i__ = 0; i__ <= i__2; ++i__) { @@ -6377,7 +6377,7 @@ int mmloncv_(integer *ndimax, /* -------------------- */ /* NDIMAX : Max number of lines of tables (max number of polynoms). */ -/* NDIMEN : Dimension of the polynom (Nomber of polynoms). */ +/* NDIMEN : Dimension of the polynom (Number of polynoms). */ /* NCOEFF : Number of coefficients of the polynom (no limitation) */ /* This is degree + 1 */ /* COURBE : Coefficients of the polynom ordered by increasing power */ @@ -6606,7 +6606,7 @@ int mmloncv_(integer *ndimax, /* FUNCTION : */ /* ---------- */ /* Position on the polynoms of base hermit-Jacobi */ -/* and their succesive derivatives */ +/* and their successive derivatives */ /* KEYWORDS : */ /* ----------- */ @@ -7160,7 +7160,7 @@ int mmpojac_(doublereal *tparam, */ -/* static varaibles */ +/* static variables */ @@ -7519,12 +7519,12 @@ int mmpojac_(doublereal *tparam, /* INPUT ARGUMENTS : */ /* -------------------- */ -/* HDIMEN: NOMBER OF LINE (OR COLUMN) OF THE HESSIAN MATRIX */ -/* GDIMEN: NOMBER OF LINE OF THE MATRIX OF CONSTRAINTS */ -/* HNSTOC: NOMBErS OF TERMS IN THE PROFILE OF HESSIAN MATRIX +/* HDIMEN: NUMBER OF LINE (OR COLUMN) OF THE HESSIAN MATRIX */ +/* GDIMEN: NUMBER OF LINE OF THE MATRIX OF CONSTRAINTS */ +/* HNSTOC: NUMBERS OF TERMS IN THE PROFILE OF HESSIAN MATRIX */ -/* GNSTOC: NOMBERS OF TERMS IN THE PROFILE OF THE MATRIX OF CONSTRAINTS */ -/* MNSTOC: NOMBERS OF TERMS IN THE PROFILE OF THE MATRIX M= G H t(G) */ +/* GNSTOC: NUMBERS OF TERMS IN THE PROFILE OF THE MATRIX OF CONSTRAINTS */ +/* MNSTOC: NUMBERS OF TERMS IN THE PROFILE OF THE MATRIX M= G H t(G) */ /* where H IS THE HESSIAN MATRIX AND G IS THE MATRIX OF CONSTRAINTS */ /* MATSYH: TRIANGULAR INFERIOR PART OF THE HESSIAN MATRIX */ /* IN FORM OF PROFILE */ @@ -7896,7 +7896,7 @@ int mmrslss_(integer *,//mxcoef, /* ----------------------------------- */ /* T */ /* SS is the decomposition of choleski of a symmetric matrix */ -/* defined postive, that can result from routine MMCHOLE. */ +/* defined positive, that can result from routine MMCHOLE. */ /* For a full matrix it is possible to use MRSLMSC */ @@ -8409,7 +8409,7 @@ int mmrslw_(integer *normax, /* > */ /* ********************************************************************** */ -/* Nome of the routine */ +/* Name of the routine */ /* Common MLGDRTL: */ @@ -8675,7 +8675,7 @@ int mmtmave_(integer *nligne, /* INPUT ARGUMENTS : */ /* -------------------- */ /* NLIGNE : NUMBER OF LINE OF THE MATRIX */ -/* NCOLON : NOMBER OF COLUMN OF THE MATRIX */ +/* NCOLON : NUMBER OF COLUMN OF THE MATRIX */ /* GPOSIT: TABLE OF POSITIONING OF TERMS OF STORAGE */ /* GPOSIT(1,I) CONTAINS THE NUMBER of TERMS-1 ON LINE */ /* I IN THE PROFILE OF THE MATRIX */ @@ -11193,7 +11193,7 @@ int mvpscr3_(integer *ncoeff, /* FUNCTION : */ /* ---------- */ -/* SERVES to calculate the euclidian norm of a vector : */ +/* SERVES to calculate the euclidean norm of a vector : */ /* ____________________________ */ /* Z = V V(1)**2 + V(2)**2 + ... */ @@ -11208,7 +11208,7 @@ int mvpscr3_(integer *ncoeff, /* OUTPUT ARGUMENTS : */ /* ------------------- */ -/* MZSNORM : Value of the euclidian norm of vector VECTEU */ +/* MZSNORM : Value of the euclidean norm of vector VECTEU */ /* COMMONS USED : */ /* ---------------- */ diff --git a/src/AdvApp2Var/AdvApp2Var_SysBase.cxx b/src/AdvApp2Var/AdvApp2Var_SysBase.cxx index 503b2f10ee..e51d3142cb 100644 --- a/src/AdvApp2Var/AdvApp2Var_SysBase.cxx +++ b/src/AdvApp2Var/AdvApp2Var_SysBase.cxx @@ -416,7 +416,7 @@ int AdvApp2Var_SysBase::macrchk_() /* FONCTION : */ /* ---------- */ -/* TABLE OF MANAGEMENT OF DYNAMIC MEMOTY ALLOCATIONS */ +/* TABLE OF MANAGEMENT OF DYNAMIC MEMORY ALLOCATIONS */ /* KEYWORDS : */ /* ----------- */ @@ -2484,7 +2484,7 @@ int mcrfree_(integer *,//ibyte, /* */ /* = 0 ==> OK */ /* = 1 ==> Allocation impossible */ -/* = -1 ==> Ofset > 2**31 - 1 */ +/* = -1 ==> Offset > 2**31 - 1 */ /* */ /* */ diff --git a/src/AdvApprox/AdvApprox_SimpleApprox.hxx b/src/AdvApprox/AdvApprox_SimpleApprox.hxx index fc014b203b..aec01cd021 100644 --- a/src/AdvApprox/AdvApprox_SimpleApprox.hxx +++ b/src/AdvApprox/AdvApprox_SimpleApprox.hxx @@ -32,7 +32,7 @@ class PLib_JacobiPolynomial; -//! Approximate a function on an intervall [First,Last] +//! Approximate a function on an interval [First,Last] //! The result is a simple polynomial whose degree is as low as //! possible to satisfy the required tolerance and the //! maximum degree. The maximum error and the averrage error diff --git a/src/BOPAlgo/BOPAlgo_Builder_2.cxx b/src/BOPAlgo/BOPAlgo_Builder_2.cxx index 219f5d9f9a..19f6bb376d 100644 --- a/src/BOPAlgo/BOPAlgo_Builder_2.cxx +++ b/src/BOPAlgo/BOPAlgo_Builder_2.cxx @@ -223,7 +223,7 @@ typedef NCollection_Vector BOPAlgo_VectorOfVFI; //======================================================================= void BOPAlgo_Builder::FillImagesFaces(const Message_ProgressRange& theRange) { - Message_ProgressScope aPS(theRange, "Filing spligs of faces", 10); + Message_ProgressScope aPS(theRange, "Filling splits of faces", 10); BuildSplitFaces(aPS.Next(9)); if (HasErrors()) { diff --git a/src/BOPTools/BOPTools_AlgoTools.cxx b/src/BOPTools/BOPTools_AlgoTools.cxx index bf640ed86e..7b60afb821 100644 --- a/src/BOPTools/BOPTools_AlgoTools.cxx +++ b/src/BOPTools/BOPTools_AlgoTools.cxx @@ -1925,7 +1925,7 @@ Standard_Boolean BOPTools_AlgoTools::IsBlockInOnFace } // - // Treatment intemediate + // Treatment intermediate Standard_Real m1, aTolF, aTolE, aTol, aDist; m1=IntTools_Tools::IntermediatePoint(f1, l1); BOPTools_AlgoTools::PointOnEdge(aE1, m1, aP12); diff --git a/src/BOPTools/BOPTools_AlgoTools.hxx b/src/BOPTools/BOPTools_AlgoTools.hxx index 254865cc7c..47666270ac 100644 --- a/src/BOPTools/BOPTools_AlgoTools.hxx +++ b/src/BOPTools/BOPTools_AlgoTools.hxx @@ -182,7 +182,7 @@ public: //! @name Point/Edge/Face classification relatively solid //! Computes the 3-D state of the point thePoint //! toward solid theSolid. //! theTol - value of precision of computation - //! theContext- cahed geometrical tools + //! theContext- cached geometrical tools //! Returns 3-D state. Standard_EXPORT static TopAbs_State ComputeState(const gp_Pnt& thePoint, const TopoDS_Solid& theSolid, @@ -192,7 +192,7 @@ public: //! @name Point/Edge/Face classification relatively solid //! Computes the 3-D state of the vertex theVertex //! toward solid theSolid. //! theTol - value of precision of computation - //! theContext- cahed geometrical tools + //! theContext- cached geometrical tools //! Returns 3-D state. Standard_EXPORT static TopAbs_State ComputeState(const TopoDS_Vertex& theVertex, const TopoDS_Solid& theSolid, @@ -202,7 +202,7 @@ public: //! @name Point/Edge/Face classification relatively solid //! Computes the 3-D state of the edge theEdge //! toward solid theSolid. //! theTol - value of precision of computation - //! theContext- cahed geometrical tools + //! theContext- cached geometrical tools //! Returns 3-D state. Standard_EXPORT static TopAbs_State ComputeState(const TopoDS_Edge& theEdge, const TopoDS_Solid& theSolid, @@ -213,7 +213,7 @@ public: //! @name Point/Edge/Face classification relatively solid //! toward solid theSolid. //! theTol - value of precision of computation //! theBounds - set of edges of to avoid - //! theContext- cahed geometrical tools + //! theContext- cached geometrical tools //! Returns 3-D state. Standard_EXPORT static TopAbs_State ComputeState(const TopoDS_Face& theFace, const TopoDS_Solid& theSolid, @@ -224,7 +224,7 @@ public: //! @name Point/Edge/Face classification relatively solid //! Computes the 3-D state of the shape theShape //! toward solid theSolid. //! theTol - value of precision of computation - //! theContext- cahed geometrical tools + //! theContext- cached geometrical tools //! Returns 3-D state. Standard_EXPORT static TopAbs_State ComputeStateByOnePoint(const TopoDS_Shape& theShape, const TopoDS_Solid& theSolid, @@ -274,7 +274,7 @@ public: //! @name Face classification relatively solid //! solid theSolid. //! theMEF - Map Edge/Faces for theSolid //! theTol - value of precision of computation - //! theContext- cahed geometrical tools + //! theContext- cached geometrical tools Standard_EXPORT static Standard_Boolean IsInternalFace(const TopoDS_Face& theFace, const TopoDS_Solid& theSolid, TopTools_IndexedDataMapOfShapeListOfShape& theMEF, diff --git a/src/BRepExtrema/BRepExtrema_ProximityDistTool.cxx b/src/BRepExtrema/BRepExtrema_ProximityDistTool.cxx index 5607617f18..54f8cbff84 100644 --- a/src/BRepExtrema/BRepExtrema_ProximityDistTool.cxx +++ b/src/BRepExtrema/BRepExtrema_ProximityDistTool.cxx @@ -95,7 +95,7 @@ void BRepExtrema_ProximityDistTool::LoadAdditionalPointsFirstSet (const BVH_Arra //======================================================================= //function : goThroughtSet1 -//purpose : Goes throught vertices from the 1st set +//purpose : Goes through vertices from the 1st set //======================================================================= void BRepExtrema_ProximityDistTool::goThroughtSet1 (const BVH_Array3d& theVertices1, const Standard_Boolean theIsAdditionalSet) diff --git a/src/BRepExtrema/BRepExtrema_ProximityDistTool.hxx b/src/BRepExtrema/BRepExtrema_ProximityDistTool.hxx index da6d5de076..78d0de23ab 100644 --- a/src/BRepExtrema/BRepExtrema_ProximityDistTool.hxx +++ b/src/BRepExtrema/BRepExtrema_ProximityDistTool.hxx @@ -88,7 +88,7 @@ public: public: - //! Creates new unitialized tool. + //! Creates new uninitialized tool. Standard_EXPORT BRepExtrema_ProximityDistTool(); //! Creates new tool for the given element sets. @@ -169,7 +169,7 @@ protected: private: - //! Goes throught vertices from the 1st set. + //! Goes through vertices from the 1st set. void goThroughtSet1 (const BVH_Array3d& aVertices1, const Standard_Boolean theIsAdditionalSet); diff --git a/src/BRepExtrema/BRepExtrema_ProximityValueTool.cxx b/src/BRepExtrema/BRepExtrema_ProximityValueTool.cxx index 66a2bd1d4f..3bb0f0d4bb 100644 --- a/src/BRepExtrema/BRepExtrema_ProximityValueTool.cxx +++ b/src/BRepExtrema/BRepExtrema_ProximityValueTool.cxx @@ -27,7 +27,7 @@ //======================================================================= //function : BRepExtrema_ProximityValueTool -//purpose : Creates new unitialized proximity tool +//purpose : Creates new uninitialized proximity tool //======================================================================= BRepExtrema_ProximityValueTool::BRepExtrema_ProximityValueTool() : myIsRefinementRequired1 (Standard_False), @@ -262,8 +262,8 @@ Standard_Boolean BRepExtrema_ProximityValueTool::getEdgeAdditionalVertices ( //======================================================================= //function : doRecurTrgSplit //purpose : Splits the triangle into two ones recursively, halving the longest side -// untill the area of ​​the current triangle > input step -//! @param theTrg points of the triangle to be splitted +// until the area of ​​the current triangle > input step +//! @param theTrg points of the triangle to be split //! @param theEdgesStatus status of triangle edges - on the border or middle of the face //! @param theTol telerance used in search of coincidence points //! @param theStep minimum area of ​​the resulting triangle diff --git a/src/BRepExtrema/BRepExtrema_ProximityValueTool.hxx b/src/BRepExtrema/BRepExtrema_ProximityValueTool.hxx index ca65c28104..6168662434 100644 --- a/src/BRepExtrema/BRepExtrema_ProximityValueTool.hxx +++ b/src/BRepExtrema/BRepExtrema_ProximityValueTool.hxx @@ -90,7 +90,7 @@ class BRepExtrema_ProximityValueTool public: - //! Creates new unitialized proximity tool. + //! Creates new uninitialized proximity tool. Standard_EXPORT BRepExtrema_ProximityValueTool(); //! Creates new proximity tool for the given element sets. diff --git a/src/BRepExtrema/BRepExtrema_ShapeProximity.hxx b/src/BRepExtrema/BRepExtrema_ShapeProximity.hxx index 63f56a941f..967e62c865 100644 --- a/src/BRepExtrema/BRepExtrema_ShapeProximity.hxx +++ b/src/BRepExtrema/BRepExtrema_ShapeProximity.hxx @@ -194,7 +194,7 @@ private: //! Reference point of the proximity value on the 1st shape. gp_Pnt myProxPoint1; - //! Reference point of the proximity value on the 2st shape. + //! Reference point of the proximity value on the 2nd shape. gp_Pnt myProxPoint2; //! Status of reference points of the proximity value. diff --git a/src/BRepTools/BRepTools_ReShape.cxx b/src/BRepTools/BRepTools_ReShape.cxx index 0567d42bd3..08dc73dafe 100644 --- a/src/BRepTools/BRepTools_ReShape.cxx +++ b/src/BRepTools/BRepTools_ReShape.cxx @@ -11,7 +11,7 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -// abv 28.04.99 S4137: ading method Apply for work on all types of shapes +// abv 28.04.99 S4137: adding method Apply for work on all types of shapes // sln 29.11.01 Bug24: correction iteration through map in method 'Status' // sln 29.11.01 Bug22: correction of methods Replace and Value for case when mode myConsiderLocation is on @@ -362,7 +362,7 @@ TopoDS_Shape BRepTools_ReShape::Apply (const TopoDS_Shape& shape, if(st == TopAbs_VERTEX || st == TopAbs_SHAPE) return shape; // define allowed types of components - //fix for SAMTECH bug OCC322 about abcense internal vertices after sewing. + //fix for SAMTECH bug OCC322 about absent internal vertices after sewing. /* switch ( st ) { case TopAbs_COMPOUND: subt = TopAbs_SHAPE; break; @@ -402,14 +402,14 @@ TopoDS_Shape BRepTools_ReShape::Apply (const TopoDS_Shape& shape, if ( isEmpty ) isEmpty = Standard_False; locStatus |= EncodeStatus(3);//ShapeExtend::EncodeStatus ( ShapeExtend_DONE3 ); - if ( st == TopAbs_COMPOUND || newsh.ShapeType() == sh.ShapeType()) { //fix for SAMTECH bug OCC322 about abcense internal vertices after sewing. + if ( st == TopAbs_COMPOUND || newsh.ShapeType() == sh.ShapeType()) { //fix for SAMTECH bug OCC322 about absent internal vertices after sewing. B.Add ( result, newsh ); continue; } Standard_Integer nitems = 0; for ( TopoDS_Iterator subit(newsh); subit.More(); subit.Next(), nitems++ ) { const TopoDS_Shape& subsh = subit.Value(); - if ( subsh.ShapeType() == sh.ShapeType() ) B.Add ( result, subsh );//fix for SAMTECH bug OCC322 about abcense internal vertices after sewing. + if ( subsh.ShapeType() == sh.ShapeType() ) B.Add ( result, subsh );//fix for SAMTECH bug OCC322 about absent internal vertices after sewing. else locStatus |= EncodeStatus(10);//ShapeExtend::EncodeStatus ( ShapeExtend_FAIL1 ); } if ( ! nitems ) locStatus |= EncodeStatus(10);//ShapeExtend::EncodeStatus ( ShapeExtend_FAIL1 ); diff --git a/src/BRepTools/BRepTools_ShapeSet.hxx b/src/BRepTools/BRepTools_ShapeSet.hxx index 444f0e4ed3..caac9d8c27 100644 --- a/src/BRepTools/BRepTools_ShapeSet.hxx +++ b/src/BRepTools/BRepTools_ShapeSet.hxx @@ -72,7 +72,7 @@ public: //! Clears the content of the set. Standard_EXPORT virtual void Clear() Standard_OVERRIDE; - //! Stores the goemetry of . + //! Stores the geometry of . Standard_EXPORT virtual void AddGeometry (const TopoDS_Shape& S) Standard_OVERRIDE; //! Dumps the geometry of me on the stream . diff --git a/src/BSplSLib/BSplSLib_Cache.hxx b/src/BSplSLib/BSplSLib_Cache.hxx index 9b7d2a71fe..22a6ae88b3 100644 --- a/src/BSplSLib/BSplSLib_Cache.hxx +++ b/src/BSplSLib/BSplSLib_Cache.hxx @@ -31,7 +31,7 @@ public: //! \param theDegreeU degree along the first parameter (U) of the surface //! \param thePeriodicU identify the surface is periodical along U axis //! \param theFlatKnotsU knots of the surface (with repetition) along U axis - //! \param theDegreeV degree alogn the second parameter (V) of the surface + //! \param theDegreeV degree along the second parameter (V) of the surface //! \param thePeriodicV identify the surface is periodical along V axis //! \param theFlatKnotsV knots of the surface (with repetition) along V axis //! \param theWeights array of weights of corresponding poles diff --git a/src/BndLib/BndLib_AddSurface.cxx b/src/BndLib/BndLib_AddSurface.cxx index a5c2c05cfe..e02780b13a 100644 --- a/src/BndLib/BndLib_AddSurface.cxx +++ b/src/BndLib/BndLib_AddSurface.cxx @@ -215,7 +215,7 @@ static void TreatInfinitePlane(const gp_Pln &aPlane, // theMinIdx - minimum poles index, that can be used. // theMaxIdx - maximum poles index, that can be used. // theShiftCoeff - shift between flatknots array and poles array. -// This vaule should be equal to 1 in case of non periodic BSpline, +// This value should be equal to 1 in case of non periodic BSpline, // and (degree + 1) - mults(the lowest index). void ComputePolesIndexes(const TColStd_Array1OfReal &theKnots, diff --git a/src/CPnts/CPnts_AbscissaPoint.cxx b/src/CPnts/CPnts_AbscissaPoint.cxx index 456f8b03ed..73a8c34d69 100644 --- a/src/CPnts/CPnts_AbscissaPoint.cxx +++ b/src/CPnts/CPnts_AbscissaPoint.cxx @@ -451,7 +451,7 @@ void CPnts_AbscissaPoint::Perform(const Standard_Real Abscissa, } else { Standard_Real Ui = U0 + (Abscissa / myL) * (myUMax - myUMin) / 3.; - // exercice : why 3 ? + // exercise : why 3 ? Perform(Abscissa,U0,Ui,Resolution); } } diff --git a/src/ChFi3d/ChFi3d_FilBuilder_C3.cxx b/src/ChFi3d/ChFi3d_FilBuilder_C3.cxx index e4cc374842..49af49c89f 100644 --- a/src/ChFi3d/ChFi3d_FilBuilder_C3.cxx +++ b/src/ChFi3d/ChFi3d_FilBuilder_C3.cxx @@ -157,7 +157,7 @@ static Standard_Boolean SearchFD(TopOpeBRepDS_DataStructure& DStr, //======================================================================= //function : ToricCorner -//purpose : Test if this is a paricular cas of a torus corner +//purpose : Test if this is a particular case of a torus corner // (or spherical limited by isos). //======================================================================= @@ -601,7 +601,7 @@ void ChFi3d_FilBuilder::PerformThreeCorner(const Standard_Integer Jndex) #endif // the contour to be fillet consists of straight lines uv in beginning and end - // of two pcurves (only one if c1pointu) calculted as possible + // of two pcurves (only one if c1pointu) calculated as possible // on piv and the opposite face. Handle(GeomFill_Boundary) Bdeb,Bfin,Bpiv,Bfac; Handle(Geom2d_Curve) PCurveOnFace; diff --git a/src/Convert/Convert_CompPolynomialToPoles.hxx b/src/Convert/Convert_CompPolynomialToPoles.hxx index 8af181c7a3..df82e403de 100644 --- a/src/Convert/Convert_CompPolynomialToPoles.hxx +++ b/src/Convert/Convert_CompPolynomialToPoles.hxx @@ -51,7 +51,7 @@ //! TrueIntervals : the nth polynomial has to be mapped linearly to be //! defined on the following interval : //! myTrueIntervals->Value(n) and myTrueIntervals->Value(n+1) -//! so that it represent adequatly the function with the +//! so that it adequately represents the function with the //! required continuity class Convert_CompPolynomialToPoles { @@ -85,7 +85,7 @@ public: //! TrueIntervals[2] = {-1, 1} Standard_EXPORT Convert_CompPolynomialToPoles(const Standard_Integer NumCurves, const Standard_Integer Continuity, const Standard_Integer Dimension, const Standard_Integer MaxDegree, const Handle(TColStd_HArray1OfInteger)& NumCoeffPerCurve, const Handle(TColStd_HArray1OfReal)& Coefficients, const Handle(TColStd_HArray2OfReal)& PolynomialIntervals, const Handle(TColStd_HArray1OfReal)& TrueIntervals); - //! To Convert sevral span with different order of Continuity. + //! To Convert several span with different order of Continuity. //! Warning: The Length of Continuity have to be NumCurves-1 Standard_EXPORT Convert_CompPolynomialToPoles(const Standard_Integer NumCurves, const Standard_Integer Dimension, const Standard_Integer MaxDegree, const TColStd_Array1OfInteger& Continuity, const TColStd_Array1OfInteger& NumCoeffPerCurve, const TColStd_Array1OfReal& Coefficients, const TColStd_Array2OfReal& PolynomialIntervals, const TColStd_Array1OfReal& TrueIntervals); diff --git a/src/GProp/GProp_PrincipalProps.hxx b/src/GProp/GProp_PrincipalProps.hxx index b53f6c3f2d..e3f1e0bb90 100644 --- a/src/GProp/GProp_PrincipalProps.hxx +++ b/src/GProp/GProp_PrincipalProps.hxx @@ -60,7 +60,7 @@ public: //! returns true if the geometric system has an axis of symmetry. //! For comparing moments relative tolerance 1.e-10 is used. //! Usually it is enough for objects, restricted by faces with - //! analitycal geometry. + //! analytical geometry. Standard_EXPORT Standard_Boolean HasSymmetryAxis() const; @@ -73,7 +73,7 @@ public: //! returns true if the geometric system has a point of symmetry. //! For comparing moments relative tolerance 1.e-10 is used. //! Usually it is enough for objects, restricted by faces with - //! analitycal geometry. + //! analytical geometry. Standard_EXPORT Standard_Boolean HasSymmetryPoint() const; diff --git a/src/GProp/GProp_ValueType.hxx b/src/GProp/GProp_ValueType.hxx index 8dfcac1408..3c4912254a 100644 --- a/src/GProp/GProp_ValueType.hxx +++ b/src/GProp/GProp_ValueType.hxx @@ -17,7 +17,7 @@ #ifndef _GProp_ValueType_HeaderFile #define _GProp_ValueType_HeaderFile -//! Algorithmes : +//! Algorithms: enum GProp_ValueType { GProp_Mass, diff --git a/src/GeometryTest/GeometryTest.hxx b/src/GeometryTest/GeometryTest.hxx index 0645a4a96c..44057c17d9 100644 --- a/src/GeometryTest/GeometryTest.hxx +++ b/src/GeometryTest/GeometryTest.hxx @@ -48,7 +48,7 @@ public: //! defines surface commands. Standard_EXPORT static void SurfaceCommands (Draw_Interpretor& I); - //! defines cosntrained curves commands. + //! defines constrained curves commands. Standard_EXPORT static void ConstraintCommands (Draw_Interpretor& I); //! defines commands to test the GeomAPI diff --git a/src/Hermit/Hermit.cxx b/src/Hermit/Hermit.cxx index eeb22232ee..e05653da34 100644 --- a/src/Hermit/Hermit.cxx +++ b/src/Hermit/Hermit.cxx @@ -287,7 +287,7 @@ static void PolyTest(const TColStd_Array1OfReal& Herm, } } // end of the loop - if (!SignDenom(Polesinit)) //invertion of the polynome sign + if (!SignDenom(Polesinit)) //inversion of the polynome sign { for (index=0;index<=3;index++) Polesinit(index).SetCoord(0.0,-Polesinit(index).Y()); @@ -520,7 +520,7 @@ static void PolyTest(const TColStd_Array1OfReal& Herm, } } // end of the loop - if (!SignDenom(Polesinit)) // invertion of the polynome sign + if (!SignDenom(Polesinit)) // inversion of the polynome sign { for (index=0;index<=3;index++) Polesinit(index).SetCoord(0.0,-Polesinit(index).Y()); diff --git a/src/IGESGeom/IGESGeom.hxx b/src/IGESGeom/IGESGeom.hxx index 494b151690..a27893d41c 100644 --- a/src/IGESGeom/IGESGeom.hxx +++ b/src/IGESGeom/IGESGeom.hxx @@ -32,7 +32,7 @@ public: DEFINE_STANDARD_ALLOC - //! Prepares dymanic data (Protocol, Modules) for this package + //! Prepares dynamic data (Protocol, Modules) for this package Standard_EXPORT static void Init(); //! Returns the Protocol for this Package diff --git a/src/IGESGeom/IGESGeom_Line.hxx b/src/IGESGeom/IGESGeom_Line.hxx index 246be02f3b..ad278eebb6 100644 --- a/src/IGESGeom/IGESGeom_Line.hxx +++ b/src/IGESGeom/IGESGeom_Line.hxx @@ -38,7 +38,7 @@ DEFINE_STANDARD_HANDLE(IGESGeom_Line, IGESData_IGESEntity) //! From IGES-5.3, two other Forms are admitted (same params) : //! 0 remains for standard limited line (the default) //! 1 for semi-infinite line (End is just a passing point) -//! 2 for full infinite Line (both Start and End are abitrary) +//! 2 for full infinite Line (both Start and End are arbitrary) class IGESGeom_Line : public IGESData_IGESEntity { diff --git a/src/IntAna/IntAna_Curve.hxx b/src/IntAna/IntAna_Curve.hxx index 05d16d5790..35f6568466 100644 --- a/src/IntAna/IntAna_Curve.hxx +++ b/src/IntAna/IntAna_Curve.hxx @@ -51,7 +51,7 @@ public: //! last parameter or at the first parameter of the domain. Standard_EXPORT Standard_Boolean IsOpen() const; - //! Returns the paramatric domain of the curve. + //! Returns the parametric domain of the curve. Standard_EXPORT void Domain(Standard_Real& theFirst, Standard_Real& theLast) const; //! Returns TRUE if the function is constant. diff --git a/src/IntSurf/IntSurf_InteriorPointTool.hxx b/src/IntSurf/IntSurf_InteriorPointTool.hxx index 3253dd1ed6..03c13190e0 100644 --- a/src/IntSurf/IntSurf_InteriorPointTool.hxx +++ b/src/IntSurf/IntSurf_InteriorPointTool.hxx @@ -44,11 +44,11 @@ public: //! it's the parameters which start the marching algorithm static void Value2d (const IntSurf_InteriorPoint& PStart, Standard_Real& U, Standard_Real& V); - //! returns the tangent at the intersectin in 3d space + //! returns the tangent at the intersection in 3d space //! associated to

    static gp_Vec Direction3d (const IntSurf_InteriorPoint& PStart); - //! returns the tangent at the intersectin in the + //! returns the tangent at the intersection in the //! parametric space of the parametrized surface.This tangent //! is associated to the value2d static gp_Dir2d Direction2d (const IntSurf_InteriorPoint& PStart); diff --git a/src/IntTools/IntTools_Context.cxx b/src/IntTools/IntTools_Context.cxx index 4116dc3436..50b9f355b2 100644 --- a/src/IntTools/IntTools_Context.cxx +++ b/src/IntTools/IntTools_Context.cxx @@ -844,7 +844,7 @@ Standard_Boolean IntTools_Context::IsVertexOnLine aFirst=aC3D->FirstParameter(); aLast =aC3D->LastParameter(); // - // Checking extermities first + // Checking extremities first // It is necessary to chose the closest bound to the point Standard_Boolean bFirstValid = Standard_False; Standard_Real aFirstDist = Precision::Infinite(); diff --git a/src/NCollection/NCollection_BasePointerVector.hxx b/src/NCollection/NCollection_BasePointerVector.hxx index 866eb73e49..55a35016c2 100644 --- a/src/NCollection/NCollection_BasePointerVector.hxx +++ b/src/NCollection/NCollection_BasePointerVector.hxx @@ -72,7 +72,7 @@ public: //! Gets array, can be null void** GetArray() const { return myArray; } - //! Gets value by index, no acess validation + //! Gets value by index, no access validation void* Value (const size_t theInd) const { return myArray[theInd]; } public: diff --git a/src/NCollection/NCollection_WinHeapAllocator.hxx b/src/NCollection/NCollection_WinHeapAllocator.hxx index ed76f281c3..3a0d5b165e 100644 --- a/src/NCollection/NCollection_WinHeapAllocator.hxx +++ b/src/NCollection/NCollection_WinHeapAllocator.hxx @@ -26,10 +26,10 @@ //! to the system. //! //! This allocator can also be created per each working thread -//! hovewer it real multi-threading performance is dubious. +//! however its real multi-threading performance is dubious. //! //! Notice that this also means that existing pointers will be broken -//! and you shoould control that allocator is alive along all objects +//! and you should control that allocator is alive along all objects //! allocated with him. class NCollection_WinHeapAllocator : public NCollection_BaseAllocator { diff --git a/src/OpenGlTest/OpenGlTest.hxx b/src/OpenGlTest/OpenGlTest.hxx index ec49b73548..3f5314d984 100644 --- a/src/OpenGlTest/OpenGlTest.hxx +++ b/src/OpenGlTest/OpenGlTest.hxx @@ -23,7 +23,7 @@ public: DEFINE_STANDARD_ALLOC - //! Adds Draw commands to the draw interpretor. + //! Adds Draw commands to the draw interpreter. Standard_EXPORT static void Commands (Draw_Interpretor& theDI); //! Plugin entry point function. diff --git a/src/Poly/Poly_CoherentTriangulation.hxx b/src/Poly/Poly_CoherentTriangulation.hxx index d45736f956..c5cb74f745 100644 --- a/src/Poly/Poly_CoherentTriangulation.hxx +++ b/src/Poly/Poly_CoherentTriangulation.hxx @@ -50,7 +50,7 @@ DEFINE_STANDARD_HANDLE (Poly_CoherentTriangulation, Standard_Transient) * * This class is useful for algorithms that need to analyse and/or edit a triangulated mesh -- for example for mesh refining. * The connectivity model follows the idea that all Triangles in a mesh should have coherent orientation like on a surface of a solid body. - * Connections between more than 2 triangles are not suppoorted. + * Connections between more than 2 triangles are not supported. * * @section Poly_CoherentTriangulation Architecture * The data types used in this structure are: diff --git a/src/Quantity/Quantity_ColorRGBA.cxx b/src/Quantity/Quantity_ColorRGBA.cxx index 908135c990..322dfea986 100644 --- a/src/Quantity/Quantity_ColorRGBA.cxx +++ b/src/Quantity/Quantity_ColorRGBA.cxx @@ -131,7 +131,7 @@ namespace { return false; } - // std::all_of is not used due to VS2008 compilability limitation + // std::all_of is not used due to VS2008 compatibility limitation return std::count_if (theString, theString + theLength, isHexDigit) == static_cast (theLength); } diff --git a/src/ShapeAnalysis/ShapeAnalysis_CanonicalRecognition.cxx b/src/ShapeAnalysis/ShapeAnalysis_CanonicalRecognition.cxx index 08a3763b36..71830f2c5b 100644 --- a/src/ShapeAnalysis/ShapeAnalysis_CanonicalRecognition.cxx +++ b/src/ShapeAnalysis/ShapeAnalysis_CanonicalRecognition.cxx @@ -825,7 +825,7 @@ Standard_Boolean ShapeAnalysis_CanonicalRecognition::GetSurfaceByLS(const TopoDS Standard_Real aRelDev = 0.2; //Customer can set parameters of sample surface // with relative precision about aRelDev. // For example, if radius of sample surface is R, - // it means, that "exact" vaue is in interav + // it means, that "exact" value is in interav //[R - aRelDev*R, R + aRelDev*R]. This interval is set // for R as boundary values for optimization algo. FillSolverData(theTarget, thePos, theParams, @@ -878,7 +878,7 @@ Standard_Boolean ShapeAnalysis_CanonicalRecognition::GetSurfaceByLS(const TopoDS if (theTarget == GeomAbs_Cylinder || theTarget == GeomAbs_Cone) { //Set search direction for location to be perpendicular to axis to avoid - //seaching along axis + //searching along axis const gp_Dir aDir = thePos.Direction(); gp_Pln aPln(thePos.Location(), aDir); gp_Dir aUDir = aPln.Position().XDirection(); diff --git a/src/ShapeAnalysis/ShapeAnalysis_CanonicalRecognition.hxx b/src/ShapeAnalysis/ShapeAnalysis_CanonicalRecognition.hxx index 7fa079b82c..45e687d33b 100644 --- a/src/ShapeAnalysis/ShapeAnalysis_CanonicalRecognition.hxx +++ b/src/ShapeAnalysis/ShapeAnalysis_CanonicalRecognition.hxx @@ -43,7 +43,7 @@ class Geom_Surface; //! This class provides operators for analysis surfaces and curves of shapes //! in order to find out more simple geometry entities, which could replace -//! existing complex (for exampe, BSpline) geometry objects with given tolerance. +//! existing complex (for example, BSpline) geometry objects with given tolerance. class ShapeAnalysis_CanonicalRecognition { public: diff --git a/src/ShapeAnalysis/ShapeAnalysis_FreeBounds.hxx b/src/ShapeAnalysis/ShapeAnalysis_FreeBounds.hxx index 4d2ca9d490..f9ddad9897 100644 --- a/src/ShapeAnalysis/ShapeAnalysis_FreeBounds.hxx +++ b/src/ShapeAnalysis/ShapeAnalysis_FreeBounds.hxx @@ -97,7 +97,7 @@ public: //! Returns compound of open wires out of free edges. const TopoDS_Compound& GetOpenWires() const; - //! Builds sequnce of out of sequence of not sorted + //! Builds sequence of out of sequence of not sorted //! . //! Tries to build wires of maximum length. Building a wire is //! stopped when no edges can be connected to it at its head or @@ -112,7 +112,7 @@ public: Standard_EXPORT static void ConnectWiresToWires (Handle(TopTools_HSequenceOfShape)& iwires, const Standard_Real toler, const Standard_Boolean shared, Handle(TopTools_HSequenceOfShape)& owires); - //! Builds sequnce of out of sequence of not sorted + //! Builds sequence of out of sequence of not sorted //! . //! Tries to build wires of maximum length. Building a wire is //! stopped when no wires can be connected to it at its head or diff --git a/src/ShapeFix/ShapeFix_Shell.cxx b/src/ShapeFix/ShapeFix_Shell.cxx index 25adf00afe..f2dfc1f2ac 100644 --- a/src/ShapeFix/ShapeFix_Shell.cxx +++ b/src/ShapeFix/ShapeFix_Shell.cxx @@ -260,7 +260,7 @@ static Standard_Boolean GetShells(TopTools_SequenceOfShape& Lface, aMapFaceShells.Bind(F1,nshell); Lface.Remove(i); - // check if closed shell is obtained in multy connex mode and add to sequence of + // check if closed shell is obtained in multi connex mode and add to sequence of // shells and new shell begin to construct. // (check is n*2) if(isMultiConnex && BRep_Tool::IsClosed (nshell)) { @@ -300,7 +300,7 @@ static Standard_Boolean GetShells(TopTools_SequenceOfShape& Lface, numFace++; } if(numFace >1) { - // close all closed shells in no multy connex mode + // close all closed shells in no multi connex mode if(!isMultiConnex) nshell.Closed (BRep_Tool::IsClosed (nshell)); aSeqShells.Append(nshell); @@ -514,7 +514,7 @@ static Standard_Integer BoxIn(const Bnd_Box& theBox1,const Bnd_Box& theBox2) //======================================================================= // function : GetClosedShells // purpose : Check if one shell is a part from other shell. -// For case of compsolid when afew shells are created from +// For case of compsolid when a few shells are created from // the same set of faces. //======================================================================= static void GetClosedShells(TopTools_SequenceOfShape& Shells, TopTools_SequenceOfShape& aRemainShells) diff --git a/src/ShapeFix/ShapeFix_SplitTool.cxx b/src/ShapeFix/ShapeFix_SplitTool.cxx index b50cdebdd0..02e0a5fa86 100644 --- a/src/ShapeFix/ShapeFix_SplitTool.cxx +++ b/src/ShapeFix/ShapeFix_SplitTool.cxx @@ -67,7 +67,7 @@ Standard_Boolean ShapeFix_SplitTool::SplitEdge(const TopoDS_Edge& edge, sae.PCurve(edge,face,c2d,a,b,Standard_True ); if( Abs(a-param)Length()); } - //! Set fiels IdentifiedItem + //! Set field IdentifiedItem inline void SetIdentifiedItem (const Handle(StepRepr_HArray1OfRepresentationItem)& theIdentifiedItem) { identifiedItem = theIdentifiedItem; diff --git a/src/StepFile/StepFile_ReadData.hxx b/src/StepFile/StepFile_ReadData.hxx index 3f958b63f1..3d90203ec3 100644 --- a/src/StepFile/StepFile_ReadData.hxx +++ b/src/StepFile/StepFile_ReadData.hxx @@ -127,7 +127,7 @@ public: //! Destructor cleans allocated memory of all fields ~StepFile_ReadData() { ClearRecorder(3); } - //! Preperes the text value for analysis. + //! Prepares the text value for analysis. //! It is the main tool for transferring data from flex to bison //! If characters page is full, allocates a new page. void CreateNewText(const char* theNewText, int theLenText); diff --git a/src/StepFile/lex.step.cxx b/src/StepFile/lex.step.cxx index 8949b12366..bbbbbc310c 100644 --- a/src/StepFile/lex.step.cxx +++ b/src/StepFile/lex.step.cxx @@ -622,7 +622,7 @@ goto find_rule; \ typedef step::parser::token token; -/* skl 31.01.2002 for OCC133(OCC96,97) - uncorrect +/* skl 31.01.2002 for OCC133(OCC96,97) - incorrect long string in files Henri.stp and 401.stp*/ #include #define YY_FATAL_ERROR(msg) Standard_Failure::Raise(msg); diff --git a/src/StepFile/step.lex b/src/StepFile/step.lex index 018d1884af..d8850f63c1 100644 --- a/src/StepFile/step.lex +++ b/src/StepFile/step.lex @@ -61,7 +61,7 @@ typedef step::parser::token token; -/* skl 31.01.2002 for OCC133(OCC96,97) - uncorrect +/* skl 31.01.2002 for OCC133(OCC96,97) - incorrect long string in files Henri.stp and 401.stp*/ #include #define YY_FATAL_ERROR(msg) Standard_Failure::Raise(msg); diff --git a/src/TopLoc/TopLoc_SListOfItemLocation.hxx b/src/TopLoc/TopLoc_SListOfItemLocation.hxx index b80cc8ed72..f31b2195fc 100644 --- a/src/TopLoc/TopLoc_SListOfItemLocation.hxx +++ b/src/TopLoc/TopLoc_SListOfItemLocation.hxx @@ -82,7 +82,7 @@ public: return *this; } - //! Returne true if this list is empty + //! Return true if this list is empty Standard_Boolean IsEmpty() const { return myNode.IsNull(); diff --git a/src/TopOpeBRepBuild/TopOpeBRepBuild_Builder.cxx b/src/TopOpeBRepBuild/TopOpeBRepBuild_Builder.cxx index 5a8fa32eb4..5be34f7127 100644 --- a/src/TopOpeBRepBuild/TopOpeBRepBuild_Builder.cxx +++ b/src/TopOpeBRepBuild/TopOpeBRepBuild_Builder.cxx @@ -1587,7 +1587,7 @@ void TopOpeBRepBuild_Builder::FillShape(const TopoDS_Shape& S1, TopOpeBRepTool_ShapeExplorer ex11(aSubShape,t11); SplitShapes(ex11,ToBuild1,ToBuild2,aSet,RevOri); } - } // exploration ot SubShapes of type of shape + } // exploration of SubShapes of type of shape } // FillShape diff --git a/src/TopOpeBRepBuild/TopOpeBRepBuild_Builder1.cxx b/src/TopOpeBRepBuild/TopOpeBRepBuild_Builder1.cxx index 7e9ab79f5d..48e36fcfa1 100644 --- a/src/TopOpeBRepBuild/TopOpeBRepBuild_Builder1.cxx +++ b/src/TopOpeBRepBuild/TopOpeBRepBuild_Builder1.cxx @@ -878,7 +878,7 @@ void TopOpeBRepBuild_Builder1::GFillEdgeSameDomWES(const TopoDS_Shape& EOR, } //we should process all same domain edges (ON2D) in the code above - //and we can not proceess edges with UNKNOWN state + //and we can not process edges with UNKNOWN state if(aState == TopAbs_ON || aState == TopAbs_UNKNOWN) continue; @@ -1586,7 +1586,7 @@ Standard_Integer TopOpeBRepBuild_Builder1::TwoPiecesON (const TopTools_SequenceO if(!anAd1 || !anAd2) return 12; else - return 10; //10 doesn't mean anything just to retutn something + return 10; //10 doesn't mean anything just to return something } // case c. No==Nt , To==Tt @@ -1640,7 +1640,7 @@ Standard_Integer TopOpeBRepBuild_Builder1::TwoPiecesON (const TopTools_SequenceO if(!anAd1 || !anAd2) return 14; else - return 10; //10 doesn't mean anything just to retutn something + return 10; //10 doesn't mean anything just to return something } return 10; } // end of if (!anAd1 || !anAd2 || !aScPrFlag1 || !aScPrFlag2) diff --git a/src/TopOpeBRepBuild/TopOpeBRepBuild_Builder1_1.cxx b/src/TopOpeBRepBuild/TopOpeBRepBuild_Builder1_1.cxx index 7ec0ae15a6..1ab2aa3f05 100644 --- a/src/TopOpeBRepBuild/TopOpeBRepBuild_Builder1_1.cxx +++ b/src/TopOpeBRepBuild/TopOpeBRepBuild_Builder1_1.cxx @@ -497,7 +497,7 @@ void DumpMapOfShapeWithState (const Standard_Integer iP, } } //end of else {// Wire has an interferences } // next Wire - } // next interferred Face ... for (i=1; i<=nF; i++) ... + } // next interfered Face ... for (i=1; i<=nF; i++) ... } //======================================================================= diff --git a/src/TopOpeBRepBuild/TopOpeBRepBuild_KPart.cxx b/src/TopOpeBRepBuild/TopOpeBRepBuild_KPart.cxx index f41a9ee587..b2fd99afca 100644 --- a/src/TopOpeBRepBuild/TopOpeBRepBuild_KPart.cxx +++ b/src/TopOpeBRepBuild/TopOpeBRepBuild_KPart.cxx @@ -1027,8 +1027,8 @@ Standard_Integer TopOpeBRepBuild_Builder::KPiskoletge() Standard_Boolean se2ONouterw1 = ::sectionedgesON(myDataStructure,outerw2,mape1); if (!se2ONouterw1) return 0; - // NYI : interfers with faces of on edges different from outerw's edges - // ------------------------------------------------------------------------------ + // NYI : interferes with faces of on edges different from outerw's edges + // -------=----------------------------------------------------------------------- Standard_Boolean allI1onseouterw = ::allIonsectionedges(myDataStructure,f1,mape1,mape2); if (!allI1onseouterw) return 0; Standard_Boolean allI2onseouterw = ::allIonsectionedges(myDataStructure,f2,mape2,mape1); diff --git a/src/TopOpeBRepBuild/TopOpeBRepBuild_makefaces.cxx b/src/TopOpeBRepBuild/TopOpeBRepBuild_makefaces.cxx index c3b749d4c8..ae4a27775f 100644 --- a/src/TopOpeBRepBuild/TopOpeBRepBuild_makefaces.cxx +++ b/src/TopOpeBRepBuild/TopOpeBRepBuild_makefaces.cxx @@ -334,7 +334,7 @@ void TopOpeBRepBuild_Builder::GFABUMakeFaces(const TopoDS_Shape& FF,TopOpeBRepBu //--ofv: // Unfortunately, the function GFillONPartsWES2() from file TopOpeBRepBuild_BuilderON.cxx sets orientation of // some section edges as INTERNAL or EXTERNAL, but they should be FORWARD or REVERSED. It probably makes faces - // without closed boundary, for example. So, we must check carefuly edges with orientation INTERNAL(EXTERNAL). + // without closed boundary, for example. So, we must check carefully edges with orientation INTERNAL(EXTERNAL). // Bugs: 60936, 60937, 60938 (cut, fuse, common shapes) TopoDS_Compound CmpOfEdges; BRep_Builder BldCmpOfEdges; diff --git a/src/TopOpeBRepDS/TopOpeBRepDS_Edge3dInterferenceTool.cxx b/src/TopOpeBRepDS/TopOpeBRepDS_Edge3dInterferenceTool.cxx index 2100cc4c1f..8b59596085 100644 --- a/src/TopOpeBRepDS/TopOpeBRepDS_Edge3dInterferenceTool.cxx +++ b/src/TopOpeBRepDS/TopOpeBRepDS_Edge3dInterferenceTool.cxx @@ -42,8 +42,8 @@ static void FUN_Raise() // myIsVertex : // ------------ -// POINT : interfers with at a point -// interfers with at a vertex V, +// POINT : interferes with at a point +// interferes with at a vertex V, // VERTEXonref : V is on shape of // VERTEXonOO : V is on shape of // VERTEXonOref : V is on 2 shapes. diff --git a/src/TopOpeBRepDS/TopOpeBRepDS_ShapeShapeInterference.hxx b/src/TopOpeBRepDS/TopOpeBRepDS_ShapeShapeInterference.hxx index 99046a291d..3e108dd067 100644 --- a/src/TopOpeBRepDS/TopOpeBRepDS_ShapeShapeInterference.hxx +++ b/src/TopOpeBRepDS/TopOpeBRepDS_ShapeShapeInterference.hxx @@ -38,7 +38,7 @@ class TopOpeBRepDS_ShapeShapeInterference : public TopOpeBRepDS_Interference public: - //! a shape interfers on shape with shape . + //! a shape interferes on shape with shape . //! examples : //! create a ShapeShapeInterference describing : //! vertex V of edge E1 found on edge E2 : diff --git a/src/VrmlData/VrmlData_Box.hxx b/src/VrmlData/VrmlData_Box.hxx index 21f5c9bd77..f55ce2c58e 100644 --- a/src/VrmlData/VrmlData_Box.hxx +++ b/src/VrmlData/VrmlData_Box.hxx @@ -20,8 +20,8 @@ #include /** - * Inplementation of the Box node. - * This node is defined by Size vector, assumong that the box center is located + * Implementation of the Box node. + * This node is defined by Size vector, assuming that the box center is located * in (0., 0., 0.) and that each corner is 0.5*|Size| distance from the center. */ class VrmlData_Box : public VrmlData_Geometry diff --git a/src/VrmlData/VrmlData_Geometry.cxx b/src/VrmlData/VrmlData_Geometry.cxx index ba7ef08958..9f7b771ac7 100644 --- a/src/VrmlData/VrmlData_Geometry.cxx +++ b/src/VrmlData/VrmlData_Geometry.cxx @@ -630,7 +630,7 @@ VrmlData_ErrorStatus VrmlData_ArrayVec3d::ReadArray if (OK(aStatus) && OK(aStatus, VrmlData_Scene::ReadLine(theBuffer))) { if (theBuffer.LinePtr[0] != '[') // opening bracket { - // Handle case when brackets are ommited for single element of array + // Handle case when brackets are omitted for single element of array gp_XYZ anXYZ; // Read three numbers (XYZ value) if (!OK(aStatus, Scene().ReadXYZ(theBuffer, anXYZ, diff --git a/src/VrmlData/VrmlData_Scene.cxx b/src/VrmlData/VrmlData_Scene.cxx index 01adb4d2b0..5ddac5a07e 100644 --- a/src/VrmlData/VrmlData_Scene.cxx +++ b/src/VrmlData/VrmlData_Scene.cxx @@ -871,7 +871,7 @@ VrmlData_ErrorStatus VrmlData_Scene::ReadArrIndex if (vecInt.Length() > 2) { // additional check for redundant point: - // ignore last point which is a dublicate of first point + // ignore last point which is a duplicate of first point if (anIntValue == vecInt[0]) { continue; diff --git a/src/VrmlData/VrmlData_Scene.hxx b/src/VrmlData/VrmlData_Scene.hxx index 495d8dea8e..c990bd0b4e 100644 --- a/src/VrmlData/VrmlData_Scene.hxx +++ b/src/VrmlData/VrmlData_Scene.hxx @@ -68,7 +68,7 @@ class VrmlData_Scene * in that node are matched with these directories. * The last (implicit) search directory is the current process directory * ("."). It takes effect if the list is empty or if there is no match with - * exisiting directories. + * existing directories. */ Standard_EXPORT void SetVrmlDir (const TCollection_ExtendedString&); @@ -205,7 +205,7 @@ class VrmlData_Scene ReadLine (VrmlData_InBuffer& theBuffer); /** - * Read a singel word from the input stream, delimited by whitespace. + * Read a single word from the input stream, delimited by whitespace. */ Standard_EXPORT static VrmlData_ErrorStatus ReadWord (VrmlData_InBuffer& theBuffer, diff --git a/src/VrmlData/VrmlData_Sphere.hxx b/src/VrmlData/VrmlData_Sphere.hxx index fae8083b10..2cc5d66c37 100644 --- a/src/VrmlData/VrmlData_Sphere.hxx +++ b/src/VrmlData/VrmlData_Sphere.hxx @@ -49,7 +49,7 @@ class VrmlData_Sphere : public VrmlData_Geometry inline Standard_Real Radius () const { return myRadius; } /** - * Set the spere radius + * Set the sphere radius */ inline void SetRadius (const Standard_Real theRadius) { myRadius = theRadius; SetModified(); } diff --git a/src/XSControl/XSControl_Controller.hxx b/src/XSControl/XSControl_Controller.hxx index d6b77ea240..be4365cb04 100644 --- a/src/XSControl/XSControl_Controller.hxx +++ b/src/XSControl/XSControl_Controller.hxx @@ -114,7 +114,7 @@ class XSControl_Controller : public Standard_Transient //! Read from field. Can be redefined Standard_EXPORT virtual Handle(Transfer_ActorOfFinderProcess) ActorWrite() const; - //! Sets mininum and maximum values for modetrans (write) + //! Sets minimum and maximum values for modetrans (write) //! Erases formerly recorded bounds and values //! Actually only for shape //! Then, for each value a little help can be attached From f0620a8d6553af87b0fc134c9209f12e1e4f4553 Mon Sep 17 00:00:00 2001 From: anv Date: Fri, 26 Jul 2024 14:49:03 +0100 Subject: [PATCH 586/639] 0033781: Modeling Algorithms - Using incorrect boundaries while traversing through triangulation Upper boundary updated for triangulation normals traversing. --- src/BRepTools/BRepTools_TrsfModification.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/BRepTools/BRepTools_TrsfModification.cxx b/src/BRepTools/BRepTools_TrsfModification.cxx index c8252f6caf..63ac4565f4 100644 --- a/src/BRepTools/BRepTools_TrsfModification.cxx +++ b/src/BRepTools/BRepTools_TrsfModification.cxx @@ -171,7 +171,7 @@ Standard_Boolean BRepTools_TrsfModification::NewTriangulation // modify normals if (theTriangulation->HasNormals()) { - for (Standard_Integer anInd = 1; anInd <= theTriangulation->NbTriangles(); ++anInd) + for (Standard_Integer anInd = 1; anInd <= theTriangulation->NbNodes(); ++anInd) { gp_Dir aNormal = theTriangulation->Normal(anInd); aNormal.Transform(aTrsf); From bd14b693361678a1ea5ef5a8be1b4ec1fad870a0 Mon Sep 17 00:00:00 2001 From: oan Date: Tue, 6 Aug 2024 11:19:21 +0100 Subject: [PATCH 587/639] 0033790: Data Exchange - XCAFDoc_LayerTool creates temporary instances during initialization of layer attributes Removed initialization of temporary objects. --- src/XCAFDoc/XCAFDoc_LayerTool.cxx | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/XCAFDoc/XCAFDoc_LayerTool.cxx b/src/XCAFDoc/XCAFDoc_LayerTool.cxx index 52b781c546..457f1f62e5 100644 --- a/src/XCAFDoc/XCAFDoc_LayerTool.cxx +++ b/src/XCAFDoc/XCAFDoc_LayerTool.cxx @@ -241,11 +241,9 @@ void XCAFDoc_LayerTool::SetLayer(const TDF_Label& L, Handle(XCAFDoc_GraphNode) FGNode; Handle(XCAFDoc_GraphNode) ChGNode; if (! LayerL.FindAttribute( XCAFDoc::LayerRefGUID(), FGNode) ) { - FGNode = new XCAFDoc_GraphNode; FGNode = XCAFDoc_GraphNode::Set(LayerL); } if (! L.FindAttribute( XCAFDoc::LayerRefGUID(), ChGNode) ) { - ChGNode = new XCAFDoc_GraphNode; ChGNode = XCAFDoc_GraphNode::Set(L); } FGNode->SetGraphID( XCAFDoc::LayerRefGUID() ); From 677f3835617677a99a856ff7f20f937fcc11adeb Mon Sep 17 00:00:00 2001 From: ichesnok Date: Sun, 4 Aug 2024 20:53:36 +0100 Subject: [PATCH 588/639] 0033788: Data Exchange, DE Wrapper - Shape Healing configuration node DE_ShapeFixParameters class added for shape healing parameters storage. DE_ShapeFixConfigurationNode class added for work with parameters. --- src/DE/DE_ShapeFixConfigurationNode.cxx | 492 ++++++++++++++++++++++++ src/DE/DE_ShapeFixConfigurationNode.hxx | 51 +++ src/DE/DE_ShapeFixParameters.hxx | 82 ++++ src/DE/FILES | 3 + 4 files changed, 628 insertions(+) create mode 100644 src/DE/DE_ShapeFixConfigurationNode.cxx create mode 100644 src/DE/DE_ShapeFixConfigurationNode.hxx create mode 100644 src/DE/DE_ShapeFixParameters.hxx diff --git a/src/DE/DE_ShapeFixConfigurationNode.cxx b/src/DE/DE_ShapeFixConfigurationNode.cxx new file mode 100644 index 0000000000..8d9bf2a1a7 --- /dev/null +++ b/src/DE/DE_ShapeFixConfigurationNode.cxx @@ -0,0 +1,492 @@ +// Copyright (c) 2024 OPEN CASCADE SAS +// +// This file is part of Open CASCADE Technology software library. +// +// This library is free software; you can redistribute it and/or modify it under +// the terms of the GNU Lesser General Public License version 2.1 as published +// by the Free Software Foundation, with special exception defined in the file +// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT +// distribution for complete text of the license and disclaimer of any warranty. +// +// Alternatively, this file may be used under the terms of Open CASCADE +// commercial license or contractual agreement. + +#include + +#include +#include +#include + +IMPLEMENT_STANDARD_RTTIEXT(DE_ShapeFixConfigurationNode, DE_ConfigurationNode) + +namespace +{ + static const TCollection_AsciiString& THE_CONFIGURATION_SCOPE() + { + static const TCollection_AsciiString aScope = "provider"; + return aScope; + } +} + +//======================================================================= +// function : DE_ShapeFixConfigurationNode +// purpose : +//======================================================================= +DE_ShapeFixConfigurationNode::DE_ShapeFixConfigurationNode() + : DE_ConfigurationNode() +{} + +//======================================================================= +// function : DE_ShapeFixConfigurationNode +// purpose : +//======================================================================= +DE_ShapeFixConfigurationNode::DE_ShapeFixConfigurationNode(const Handle(DE_ShapeFixConfigurationNode)& theNode) + : DE_ConfigurationNode(theNode) +{ +} + +//======================================================================= +// function : Load +// purpose : +//======================================================================= +bool DE_ShapeFixConfigurationNode::Load(const Handle(DE_ConfigurationContext)& theResource) +{ + TCollection_AsciiString aScope = THE_CONFIGURATION_SCOPE() + "." + GetFormat() + "." + GetVendor() + ".healing"; + + HealingParameters.Tolerance3d = theResource->RealVal("tolerance3d", HealingParameters.Tolerance3d, aScope); + HealingParameters.MaxTolerance3d = theResource->RealVal("max.tolerance3d", HealingParameters.MaxTolerance3d, aScope); + HealingParameters.MinTolerance3d = theResource->RealVal("min.tolerance3d", HealingParameters.MinTolerance3d, aScope); + HealingParameters.FixFreeShellMode = (DE_ShapeFixParameters::FixMode) + theResource->IntegerVal("free.shell", (int)HealingParameters.FixFreeShellMode, aScope); + HealingParameters.FixFreeFaceMode = (DE_ShapeFixParameters::FixMode) + theResource->IntegerVal("free.face", (int)HealingParameters.FixFreeFaceMode, aScope); + HealingParameters.FixFreeWireMode = (DE_ShapeFixParameters::FixMode) + theResource->IntegerVal("free.wire", (int)HealingParameters.FixFreeWireMode, aScope); + HealingParameters.FixSameParameterMode = (DE_ShapeFixParameters::FixMode) + theResource->IntegerVal("same.parameter", (int)HealingParameters.FixSameParameterMode, aScope); + HealingParameters.FixSolidMode = (DE_ShapeFixParameters::FixMode) + theResource->IntegerVal("solid", (int)HealingParameters.FixSolidMode, aScope); + HealingParameters.FixShellOrientationMode = (DE_ShapeFixParameters::FixMode) + theResource->IntegerVal("shell.orientation", (int)HealingParameters.FixShellOrientationMode, aScope); + HealingParameters.CreateOpenSolidMode = (DE_ShapeFixParameters::FixMode) + theResource->IntegerVal("create.open.solid", (int)HealingParameters.CreateOpenSolidMode, aScope); + HealingParameters.FixShellMode = (DE_ShapeFixParameters::FixMode) + theResource->IntegerVal("shell", (int)HealingParameters.FixShellMode, aScope); + HealingParameters.FixFaceOrientationMode = (DE_ShapeFixParameters::FixMode) + theResource->IntegerVal("face.orientation", (int)HealingParameters.FixFaceOrientationMode, aScope); + HealingParameters.FixFaceMode = (DE_ShapeFixParameters::FixMode) + theResource->IntegerVal("face", (int)HealingParameters.FixFaceMode, aScope); + HealingParameters.FixWireMode = (DE_ShapeFixParameters::FixMode) + theResource->IntegerVal("wire", (int)HealingParameters.FixWireMode, aScope); + HealingParameters.FixOrientationMode = (DE_ShapeFixParameters::FixMode) + theResource->IntegerVal("orientation", (int)HealingParameters.FixOrientationMode, aScope); + HealingParameters.FixAddNaturalBoundMode = (DE_ShapeFixParameters::FixMode) + theResource->IntegerVal("add.natural.bound", (int)HealingParameters.FixAddNaturalBoundMode, aScope); + HealingParameters.FixMissingSeamMode = (DE_ShapeFixParameters::FixMode) + theResource->IntegerVal("missing.seam", (int)HealingParameters.FixMissingSeamMode, aScope); + HealingParameters.FixSmallAreaWireMode = (DE_ShapeFixParameters::FixMode) + theResource->IntegerVal("small.area.wire", (int)HealingParameters.FixSmallAreaWireMode, aScope); + HealingParameters.RemoveSmallAreaFaceMode = (DE_ShapeFixParameters::FixMode) + theResource->IntegerVal("remove.small.area.face", (int)HealingParameters.RemoveSmallAreaFaceMode, aScope); + HealingParameters.FixIntersectingWiresMode = (DE_ShapeFixParameters::FixMode) + theResource->IntegerVal("intersecting.wires", (int)HealingParameters.FixIntersectingWiresMode, aScope); + HealingParameters.FixLoopWiresMode = (DE_ShapeFixParameters::FixMode) + theResource->IntegerVal("loop.wires", (int)HealingParameters.FixLoopWiresMode, aScope); + HealingParameters.FixSplitFaceMode = (DE_ShapeFixParameters::FixMode) + theResource->IntegerVal("split.face", (int)HealingParameters.FixSplitFaceMode, aScope); + HealingParameters.AutoCorrectPrecisionMode = (DE_ShapeFixParameters::FixMode) + theResource->IntegerVal("auto.correct.precision", (int)HealingParameters.AutoCorrectPrecisionMode, aScope); + HealingParameters.ModifyTopologyMode = (DE_ShapeFixParameters::FixMode) + theResource->IntegerVal("modify.topology", (int)HealingParameters.ModifyTopologyMode, aScope); + HealingParameters.ModifyGeometryMode = (DE_ShapeFixParameters::FixMode) + theResource->IntegerVal("modify.geometry", (int)HealingParameters.ModifyGeometryMode, aScope); + HealingParameters.ClosedWireMode = (DE_ShapeFixParameters::FixMode) + theResource->IntegerVal("closed.wire", (int)HealingParameters.ClosedWireMode, aScope); + HealingParameters.PreferencePCurveMode = (DE_ShapeFixParameters::FixMode) + theResource->IntegerVal("preference.pcurve", (int)HealingParameters.PreferencePCurveMode, aScope); + HealingParameters.FixReorderMode = (DE_ShapeFixParameters::FixMode) + theResource->IntegerVal("reorder.edges", (int)HealingParameters.FixReorderMode, aScope); + HealingParameters.FixSmallMode = (DE_ShapeFixParameters::FixMode) + theResource->IntegerVal("remove.small.edges", (int)HealingParameters.FixSmallMode, aScope); + HealingParameters.FixConnectedMode = (DE_ShapeFixParameters::FixMode) + theResource->IntegerVal("connected.edges", (int)HealingParameters.FixConnectedMode, aScope); + HealingParameters.FixEdgeCurvesMode = (DE_ShapeFixParameters::FixMode) + theResource->IntegerVal("edge.curves", (int)HealingParameters.FixEdgeCurvesMode, aScope); + HealingParameters.FixDegeneratedMode = (DE_ShapeFixParameters::FixMode) + theResource->IntegerVal("add.degenerated.edges", (int)HealingParameters.FixDegeneratedMode, aScope); + HealingParameters.FixLackingMode = (DE_ShapeFixParameters::FixMode) + theResource->IntegerVal("add.lacking.edges", (int)HealingParameters.FixLackingMode, aScope); + HealingParameters.FixSelfIntersectionMode = (DE_ShapeFixParameters::FixMode) + theResource->IntegerVal("selfintersection", (int)HealingParameters.FixSelfIntersectionMode, aScope); + HealingParameters.RemoveLoopMode = (DE_ShapeFixParameters::FixMode) + theResource->IntegerVal("remove.loop", (int)HealingParameters.RemoveLoopMode, aScope); + HealingParameters.FixReversed2dMode = (DE_ShapeFixParameters::FixMode) + theResource->IntegerVal("reversed2d", (int)HealingParameters.FixReversed2dMode, aScope); + HealingParameters.FixRemovePCurveMode = (DE_ShapeFixParameters::FixMode) + theResource->IntegerVal("remove.pcurve", (int)HealingParameters.FixRemovePCurveMode, aScope); + HealingParameters.FixRemoveCurve3dMode = (DE_ShapeFixParameters::FixMode) + theResource->IntegerVal("remove.curve3d", (int)HealingParameters.FixRemoveCurve3dMode, aScope); + HealingParameters.FixAddPCurveMode = (DE_ShapeFixParameters::FixMode) + theResource->IntegerVal("add.pcurve", (int)HealingParameters.FixAddPCurveMode, aScope); + HealingParameters.FixAddCurve3dMode = (DE_ShapeFixParameters::FixMode) + theResource->IntegerVal("add.curve3d", (int)HealingParameters.FixAddCurve3dMode, aScope); + HealingParameters.FixSeamMode = (DE_ShapeFixParameters::FixMode) + theResource->IntegerVal("correct.order.in.seam", (int)HealingParameters.FixSeamMode, aScope); + HealingParameters.FixShiftedMode = (DE_ShapeFixParameters::FixMode) + theResource->IntegerVal("shifted", (int)HealingParameters.FixShiftedMode, aScope); + HealingParameters.FixEdgeSameParameterMode = (DE_ShapeFixParameters::FixMode) + theResource->IntegerVal("edge.same.parameter", (int)HealingParameters.FixEdgeSameParameterMode, aScope); + HealingParameters.FixNotchedEdgesMode = (DE_ShapeFixParameters::FixMode) + theResource->IntegerVal("notched.edges", (int)HealingParameters.FixNotchedEdgesMode, aScope); + HealingParameters.FixTailMode = (DE_ShapeFixParameters::FixMode) + theResource->IntegerVal("tail", (int)HealingParameters.FixTailMode, aScope); + HealingParameters.MaxTailAngle = (DE_ShapeFixParameters::FixMode) + theResource->IntegerVal("max.tail.angle", (int)HealingParameters.MaxTailAngle, aScope); + HealingParameters.MaxTailWidth = (DE_ShapeFixParameters::FixMode) + theResource->IntegerVal("max.tail.width", (int)HealingParameters.MaxTailWidth, aScope); + HealingParameters.FixSelfIntersectingEdgeMode = (DE_ShapeFixParameters::FixMode) + theResource->IntegerVal("selfintersecting.edge", (int)HealingParameters.FixSelfIntersectingEdgeMode, aScope); + HealingParameters.FixIntersectingEdgesMode = (DE_ShapeFixParameters::FixMode) + theResource->IntegerVal("intersecting.edges", (int)HealingParameters.FixIntersectingEdgesMode, aScope); + HealingParameters.FixNonAdjacentIntersectingEdgesMode = (DE_ShapeFixParameters::FixMode) + theResource->IntegerVal("nonadjacent.intersecting.edges", (int)HealingParameters.FixNonAdjacentIntersectingEdgesMode, aScope); + HealingParameters.FixVertexPositionMode = (DE_ShapeFixParameters::FixMode) + theResource->IntegerVal("vertex.position", (int)HealingParameters.FixVertexPositionMode, aScope); + HealingParameters.FixVertexToleranceMode = (DE_ShapeFixParameters::FixMode) + theResource->IntegerVal("vertex.tolerance", (int)HealingParameters.FixVertexToleranceMode, aScope); + + return true; +} + +//======================================================================= +// function : Save +// purpose : +//======================================================================= +TCollection_AsciiString DE_ShapeFixConfigurationNode::Save() const +{ + TCollection_AsciiString aResult; + TCollection_AsciiString aScope = THE_CONFIGURATION_SCOPE() + "." + GetFormat() + "." + GetVendor() + ".healing"; + + aResult += "!\n"; + aResult += "!Shape healing parameters:\n"; + aResult += "!\n"; + + aResult += "!\n"; + aResult += "!Defines the maximum allowable tolerance\n"; + aResult += "!Default value: 1.e-6. Available values: any real positive (non null) value\n"; + aResult += aScope + "tolerance3d :\t " + HealingParameters.Tolerance3d + "\n"; + aResult += "!\n"; + + aResult += "!\n"; + aResult += "!Defines the maximum allowable tolerance\n"; + aResult += "!Default value: 1.0. Available values: any real positive (non null) value\n"; + aResult += aScope + "max.tolerance3d :\t " + HealingParameters.MaxTolerance3d + "\n"; + aResult += "!\n"; + + aResult += "!\n"; + aResult += "!Defines the minimum allowable tolerance\n"; + aResult += "!Default value: 1.e-7. Available values: any real positive (non null) value\n"; + aResult += aScope + "min.tolerance3d :\t " + HealingParameters.MinTolerance3d + "\n"; + aResult += "!\n"; + + aResult += "!\n"; + aResult += "!Defines the mode for applying fixes of ShapeFix_Shell for ShapeFix_Shape\n"; + aResult += "!Default value: \"FixOrNot\"(-1). Available values: \"FixOrNot\"(-1), \"NotFix\"(0), \"Fix\"(1)\n"; + aResult += aScope + "free.shell :\t " + (int)HealingParameters.FixFreeShellMode + "\n"; + aResult += "!\n"; + + aResult += "!\n"; + aResult += "!Defines the mode for applying fixes of ShapeFix_Face for ShapeFix_Shape\n"; + aResult += "!Default value: \"FixOrNot\"(-1). Available values: \"FixOrNot\"(-1), \"NotFix\"(0), \"Fix\"(1)\n"; + aResult += aScope + "free.face :\t " + (int)HealingParameters.FixFreeFaceMode + "\n"; + aResult += "!\n"; + + aResult += "!\n"; + aResult += "!Defines the mode for applying fixes of ShapeFix_Wire for ShapeFix_Shape\n"; + aResult += "!Default value: \"FixOrNot\"(-1). Available values: \"FixOrNot\"(-1), \"NotFix\"(0), \"Fix\"(1)\n"; + aResult += aScope + "free.wire :\t " + (int)HealingParameters.FixFreeWireMode + "\n"; + aResult += "!\n"; + + aResult += "!\n"; + aResult += "!Defines the mode for applying ShapeFix::SameParameter after all fixes\n"; + aResult += "!Default value: \"FixOrNot\"(-1). Available values: \"FixOrNot\"(-1), \"NotFix\"(0), \"Fix\"(1)\n"; + aResult += aScope + "same.parameter :\t " + (int)HealingParameters.FixSameParameterMode + "\n"; + aResult += "!\n"; + + aResult += "!\n"; + aResult += "!Defines the mode for applying fixes of ShapeFix_Solid\n"; + aResult += "!Default value: \"FixOrNot\"(-1). Available values: \"FixOrNot\"(-1), \"NotFix\"(0), \"Fix\"(1)\n"; + aResult += aScope + "solid :\t " + (int)HealingParameters.FixSolidMode + "\n"; + aResult += "!\n"; + + aResult += "!\n"; + aResult += "!Defines the mode for applying analysis and fixes of orientation of shells in the solid\n"; + aResult += "!Default value: \"FixOrNot\"(-1). Available values: \"FixOrNot\"(-1), \"NotFix\"(0), \"Fix\"(1)\n"; + aResult += aScope + "shell.orientation :\t " + (int)HealingParameters.FixShellOrientationMode + "\n"; + aResult += "!\n"; + + aResult += "!\n"; + aResult += "!Defines the mode for creation of solids. If operation is executed then solids are created from open shells "; + aResult += "else solids are created from closed shells only\n"; + aResult += "!Default value: \"NotFix\"(0). Available values: \"FixOrNot\"(-1), \"NotFix\"(0), \"Fix\"(1)\n"; + aResult += aScope + "create.open.solid :\t " + (int)HealingParameters.CreateOpenSolidMode + "\n"; + aResult += "!\n"; + + aResult += "!\n"; + aResult += "!Defines the mode for applying fixes of ShapeFix_Shell for ShapeFix_Solid\n"; + aResult += "!Default value: \"FixOrNot\"(-1). Available values: \"FixOrNot\"(-1), \"NotFix\"(0), \"Fix\"(1)\n"; + aResult += aScope + "shell :\t " + (int)HealingParameters.FixShellMode + "\n"; + aResult += "!\n"; + + aResult += "!\n"; + aResult += "!Defines the mode for applying analysis and fixes of orientation of faces in the shell\n"; + aResult += "!Default value: \"FixOrNot\"(-1). Available values: \"FixOrNot\"(-1), \"NotFix\"(0), \"Fix\"(1)\n"; + aResult += aScope + "face.orientation :\t " + (int)HealingParameters.FixFaceOrientationMode + "\n"; + aResult += "!\n"; + + aResult += "!\n"; + aResult += "!Defines the mode for applying fixes of ShapeFix_Face\n"; + aResult += "!Default value: \"FixOrNot\"(-1). Available values: \"FixOrNot\"(-1), \"NotFix\"(0), \"Fix\"(1)\n"; + aResult += aScope + "face :\t " + (int)HealingParameters.FixFaceMode + "\n"; + aResult += "!\n"; + + aResult += "!\n"; + aResult += "!Defines the mode for applying fixes of ShapeFix_Wire\n"; + aResult += "!Default value: \"FixOrNot\"(-1). Available values: \"FixOrNot\"(-1), \"NotFix\"(0), \"Fix\"(1)\n"; + aResult += aScope + "wire :\t " + (int)HealingParameters.FixWireMode + "\n"; + aResult += "!\n"; + + aResult += "!\n"; + aResult += "!Defines the mode for applying a fix for the orientation of faces in the shell\n"; + aResult += "!Default value: \"FixOrNot\"(-1). Available values: \"FixOrNot\"(-1), \"NotFix\"(0), \"Fix\"(1)\n"; + aResult += aScope + "orientation :\t " + (int)HealingParameters.FixOrientationMode + "\n"; + aResult += "!\n"; + + aResult += "!\n"; + aResult += "!Defines the add natural bound mode. If operation is executed then natural boundary is added on faces that miss them\n"; + aResult += "!Default value: \"FixOrNot\"(-1). Available values: \"FixOrNot\"(-1), \"NotFix\"(0), \"Fix\"(1)\n"; + aResult += aScope + "add.natural.bound :\t " + (int)HealingParameters.FixAddNaturalBoundMode + "\n"; + aResult += "!\n"; + + aResult += "!\n"; + aResult += "!Defines the fix missing seam mode (tries to insert seam is missed)\n"; + aResult += "!Default value: \"FixOrNot\"(-1). Available values: \"FixOrNot\"(-1), \"NotFix\"(0), \"Fix\"(1)\n"; + aResult += aScope + "missing.seam :\t " + (int)HealingParameters.FixMissingSeamMode + "\n"; + aResult += "!\n"; + + aResult += "!\n"; + aResult += "!Defines the fix small area wire mode (drops small wires)\n"; + aResult += "!Default value: \"FixOrNot\"(-1). Available values: \"FixOrNot\"(-1), \"NotFix\"(0), \"Fix\"(1)\n"; + aResult += aScope + "small.area.wire :\t " + (int)HealingParameters.FixSmallAreaWireMode + "\n"; + aResult += "!\n"; + + aResult += "!\n"; + aResult += "!Defines the remove face with small area (drops faces with small outer wires)\n"; + aResult += "!Default value: \"FixOrNot\"(-1). Available values: \"FixOrNot\"(-1), \"NotFix\"(0), \"Fix\"(1)\n"; + aResult += aScope + "remove.small.area.face :\t " + (int)HealingParameters.RemoveSmallAreaFaceMode + "\n"; + aResult += "!\n"; + + aResult += "!\n"; + aResult += "!Defines the fix intersecting wires mode in ShapeFix_Face\n"; + aResult += "!Default value: \"FixOrNot\"(-1). Available values: \"FixOrNot\"(-1), \"NotFix\"(0), \"Fix\"(1)\n"; + aResult += aScope + "intersecting.wires :\t " + (int)HealingParameters.FixIntersectingWiresMode + "\n"; + aResult += "!\n"; + + aResult += "!\n"; + aResult += "!Defines the fix loop wires mode in ShapeFix_Face\n"; + aResult += "!Default value: \"FixOrNot\"(-1). Available values: \"FixOrNot\"(-1), \"NotFix\"(0), \"Fix\"(1)\n"; + aResult += aScope + "loop.wires :\t " + (int)HealingParameters.FixLoopWiresMode + "\n"; + aResult += "!\n"; + + aResult += "!\n"; + aResult += "!Defines the fix split face mode in ShapeFix_Face\n"; + aResult += "!Default value: \"FixOrNot\"(-1). Available values: \"FixOrNot\"(-1), \"NotFix\"(0), \"Fix\"(1)\n"; + aResult += aScope + "split.face :\t " + (int)HealingParameters.FixSplitFaceMode + "\n"; + aResult += "!\n"; + + aResult += "!\n"; + aResult += "!Defines the auto-correct precision mode in ShapeFix_Face\n"; + aResult += "!Default value: \"Fix\"(1). Available values: \"FixOrNot\"(-1), \"NotFix\"(0), \"Fix\"(1)\n"; + aResult += aScope + "auto.correct.precision :\t " + (int)HealingParameters.AutoCorrectPrecisionMode + "\n"; + aResult += "!\n"; + + aResult += "!\n"; + aResult += "!Defines the mode allowed to modify topology of the wire during fixing (adding/removing edges etc.)\n"; + aResult += "!Default value: \"NotFix\"(0). Available values: \"FixOrNot\"(-1), \"NotFix\"(0), \"Fix\"(1)\n"; + aResult += aScope + "modify.topology :\t " + (int)HealingParameters.ModifyTopologyMode + "\n"; + aResult += "!\n"; + + aResult += "!\n"; + aResult += "!Defines the mode allowed to modify geometry of the edges and vertices\n"; + aResult += "!Default value: \"Fix\"(1). Available values: \"FixOrNot\"(-1), \"NotFix\"(0), \"Fix\"(1)\n"; + aResult += aScope + "modify.geometry :\t " + (int)HealingParameters.ModifyGeometryMode + "\n"; + aResult += "!\n"; + + aResult += "!\n"; + aResult += "!Defines the mode allowed to defines whether the wire is to be closed (by calling methods like FixDegenerated() "; + aResult += "!and FixConnected() for lastand first edges\n"; + aResult += "!Default value: \"Fix\"(1). Available values: \"FixOrNot\"(-1), \"NotFix\"(0), \"Fix\"(1)\n"; + aResult += aScope + "closed.wire :\t " + (int)HealingParameters.ClosedWireMode + "\n"; + aResult += "!\n"; + + aResult += "!\n"; + aResult += "!Defines the mode allowed to defines the 2d representation of the wire is preferable over 3d one "; + aResult += "(in the case of ambiguity in FixEdgeCurves)\n"; + aResult += "!and FixConnected() for lastand first edges\n"; + aResult += "!Default value: \"Fix\"(1). Available values: \"FixOrNot\"(-1), \"NotFix\"(0), \"Fix\"(1)\n"; + aResult += aScope + "preference.pcurve :\t " + (int)HealingParameters.PreferencePCurveMode + "\n"; + aResult += "!\n"; + + aResult += "!\n"; + aResult += "!Defines the mode allowed to reorder edges in the wire\n"; + aResult += "!Default value: \"FixOrNot\"(-1). Available values: \"FixOrNot\"(-1), \"NotFix\"(0), \"Fix\"(1)\n"; + aResult += aScope + "reorder.edges :\t " + (int)HealingParameters.FixReorderMode + "\n"; + aResult += "!\n"; + + aResult += "!\n"; + aResult += "!Defines the mode allowed to remove small edges\n"; + aResult += "!Default value: \"FixOrNot\"(-1). Available values: \"FixOrNot\"(-1), \"NotFix\"(0), \"Fix\"(1)\n"; + aResult += aScope + "remove.small.edges :\t " + (int)HealingParameters.FixSmallMode + "\n"; + aResult += "!\n"; + + aResult += "!\n"; + aResult += "!Defines the mode for fix connecting edges in the wire\n"; + aResult += "!Default value: \"FixOrNot\"(-1). Available values: \"FixOrNot\"(-1), \"NotFix\"(0), \"Fix\"(1)\n"; + aResult += aScope + "connected.edges :\t " + (int)HealingParameters.FixConnectedMode + "\n"; + aResult += "!\n"; + + aResult += "!\n"; + aResult += "!Defines the mode for fix edges (3Dcurves and 2D curves)\n"; + aResult += "!Default value: \"FixOrNot\"(-1). Available values: \"FixOrNot\"(-1), \"NotFix\"(0), \"Fix\"(1)\n"; + aResult += aScope + "edge.curves :\t " + (int)HealingParameters.FixEdgeCurvesMode + "\n"; + aResult += "!\n"; + + aResult += "!\n"; + aResult += "!Defines the mode for add degenerated edges\n"; + aResult += "!Default value: \"FixOrNot\"(-1). Available values: \"FixOrNot\"(-1), \"NotFix\"(0), \"Fix\"(1)\n"; + aResult += aScope + "add.degenerated.edges :\t " + (int)HealingParameters.FixDegeneratedMode + "\n"; + aResult += "!\n"; + + aResult += "!\n"; + aResult += "!Defines the mode for add lacking edges\n"; + aResult += "!Default value: \"FixOrNot\"(-1). Available values: \"FixOrNot\"(-1), \"NotFix\"(0), \"Fix\"(1)\n"; + aResult += aScope + "add.lacking.edges :\t " + (int)HealingParameters.FixLackingMode + "\n"; + aResult += "!\n"; + + aResult += "!\n"; + aResult += "!Defines the mode for fix selfintersection edges\n"; + aResult += "!Default value: \"FixOrNot\"(-1). Available values: \"FixOrNot\"(-1), \"NotFix\"(0), \"Fix\"(1)\n"; + aResult += aScope + "selfintersection :\t " + (int)HealingParameters.FixSelfIntersectionMode + "\n"; + aResult += "!\n"; + + aResult += "!\n"; + aResult += "!Defines the mode allowed to remove loop\n"; + aResult += "!Default value: \"FixOrNot\"(-1). Available values: \"FixOrNot\"(-1), \"NotFix\"(0), \"Fix\"(1)\n"; + aResult += aScope + "remove.loop :\t " + (int)HealingParameters.RemoveLoopMode + "\n"; + aResult += "!\n"; + + aResult += "!\n"; + aResult += "!Defines the mode allowed to fix edge if pcurve is directed opposite to 3d curve\n"; + aResult += "!Default value: \"FixOrNot\"(-1). Available values: \"FixOrNot\"(-1), \"NotFix\"(0), \"Fix\"(1)\n"; + aResult += aScope + "reversed2d :\t " + (int)HealingParameters.FixReversed2dMode + "\n"; + aResult += "!\n"; + + aResult += "!\n"; + aResult += "!Defines the mode allowed to remove the pcurve(s) of the edge if it does not match the vertices\n"; + aResult += "!Default value: \"FixOrNot\"(-1). Available values: \"FixOrNot\"(-1), \"NotFix\"(0), \"Fix\"(1)\n"; + aResult += aScope + "remove.pcurve :\t " + (int)HealingParameters.FixRemovePCurveMode + "\n"; + aResult += "!\n"; + + aResult += "!\n"; + aResult += "!Defines the mode allowed to remove 3d curve of the edge if it does not match the vertices\n"; + aResult += "!Default value: \"FixOrNot\"(-1). Available values: \"FixOrNot\"(-1), \"NotFix\"(0), \"Fix\"(1)\n"; + aResult += aScope + "remove.curve3d :\t " + (int)HealingParameters.FixRemoveCurve3dMode + "\n"; + aResult += "!\n"; + + aResult += "!\n"; + aResult += "!Defines the mode allowed to add pcurve(s) of the edge if missing (by projecting 3d curve)\n"; + aResult += "!Default value: \"FixOrNot\"(-1). Available values: \"FixOrNot\"(-1), \"NotFix\"(0), \"Fix\"(1)\n"; + aResult += aScope + "add.pcurve :\t " + (int)HealingParameters.FixAddPCurveMode + "\n"; + aResult += "!\n"; + + aResult += "!\n"; + aResult += "!Defines the mode allowed to build 3d curve of the edge if missing\n"; + aResult += "!Default value: \"FixOrNot\"(-1). Available values: \"FixOrNot\"(-1), \"NotFix\"(0), \"Fix\"(1)\n"; + aResult += aScope + "add.curve3d :\t " + (int)HealingParameters.FixAddCurve3dMode + "\n"; + aResult += "!\n"; + + aResult += "!\n"; + aResult += "!Defines the mode allowed to correct order of pcurves in the seam edge depends on its orientation\n"; + aResult += "!Default value: \"FixOrNot\"(-1). Available values: \"FixOrNot\"(-1), \"NotFix\"(0), \"Fix\"(1)\n"; + aResult += aScope + "correct.order.in.seam :\t " + (int)HealingParameters.FixSeamMode + "\n"; + aResult += "!\n"; + + aResult += "!\n"; + aResult += "!Defines the mode allowed to shifts wrong 2D curves back, ensuring that the 2D curves of the edges in the wire are connected\n"; + aResult += "!Default value: \"FixOrNot\"(-1). Available values: \"FixOrNot\"(-1), \"NotFix\"(0), \"Fix\"(1)\n"; + aResult += aScope + "shifted :\t " + (int)HealingParameters.FixShiftedMode + "\n"; + aResult += "!\n"; + + aResult += "!\n"; + aResult += "!Defines the mode for applying EdgeSameParameter\n"; + aResult += "!Default value: \"NotFix\"(0). Available values: \"FixOrNot\"(-1), \"NotFix\"(0), \"Fix\"(1)\n"; + aResult += aScope + "edge.same.parameter :\t " + (int)HealingParameters.FixEdgeSameParameterMode + "\n"; + aResult += "!\n"; + + aResult += "!\n"; + aResult += "!Defines the mode for fix notched edges\n"; + aResult += "!Default value: \"FixOrNot\"(-1). Available values: \"FixOrNot\"(-1), \"NotFix\"(0), \"Fix\"(1)\n"; + aResult += aScope + "notched.edges :\t " + (int)HealingParameters.FixNotchedEdgesMode + "\n"; + aResult += "!\n"; + + aResult += "!\n"; + aResult += "!Defines the mode for fix tail in wire\n"; + aResult += "!Default value: \"NotFix\"(0). Available values: \"FixOrNot\"(-1), \"NotFix\"(0), \"Fix\"(1)\n"; + aResult += aScope + "tail :\t " + (int)HealingParameters.FixTailMode + "\n"; + aResult += "!\n"; + + aResult += "!\n"; + aResult += "!Defines the mode for max angle of the tails\n"; + aResult += "!Default value: \"NotFix\"(0). Available values: \"FixOrNot\"(-1), \"NotFix\"(0), \"Fix\"(1)\n"; + aResult += aScope + "max.tail.angle :\t " + (int)HealingParameters.MaxTailAngle + "\n"; + aResult += "!\n"; + + aResult += "!\n"; + aResult += "!Defines the mode for max tail width\n"; + aResult += "!Default value: \"FixOrNot\"(-1). Available values: \"FixOrNot\"(-1), \"NotFix\"(0), \"Fix\"(1)\n"; + aResult += aScope + "max.tail.width :\t " + (int)HealingParameters.MaxTailWidth + "\n"; + aResult += "!\n"; + + aResult += "!\n"; + aResult += "!Defines the mode for fix selfintersecting of edge\n"; + aResult += "!Default value: \"FixOrNot\"(-1). Available values: \"FixOrNot\"(-1), \"NotFix\"(0), \"Fix\"(1)\n"; + aResult += aScope + "selfintersecting.edge :\t " + (int)HealingParameters.FixSelfIntersectingEdgeMode + "\n"; + aResult += "!\n"; + + aResult += "!\n"; + aResult += "!Defines the mode for fix intersecting edges\n"; + aResult += "!Default value: \"FixOrNot\"(-1). Available values: \"FixOrNot\"(-1), \"NotFix\"(0), \"Fix\"(1)\n"; + aResult += aScope + "intersecting.edges :\t " + (int)HealingParameters.FixIntersectingEdgesMode + "\n"; + aResult += "!\n"; + + aResult += "!\n"; + aResult += "!Defines the mode for fix non adjacent intersecting edges\n"; + aResult += "!Default value: \"FixOrNot\"(-1). Available values: \"FixOrNot\"(-1), \"NotFix\"(0), \"Fix\"(1)\n"; + aResult += aScope + "nonadjacent.intersecting.edges :\t " + (int)HealingParameters.FixNonAdjacentIntersectingEdgesMode + "\n"; + aResult += "!\n"; + + aResult += "!\n"; + aResult += "!Defines the mode for applying ShapeFix::FixVertexPosition before all fixes\n"; + aResult += "!Default value: \"NotFix\"(0). Available values: \"FixOrNot\"(-1), \"NotFix\"(0), \"Fix\"(1)\n"; + aResult += aScope + "vertex.position :\t " + (int)HealingParameters.FixVertexPositionMode + "\n"; + aResult += "!\n"; + + aResult += "!\n"; + aResult += "!Defines the mode for increases the tolerances of the edge vertices to comprise "; + aResult += "!the ends of 3d curve and pcurve on the given face (first method) or all pcurves stored in an edge (second one)\n"; + aResult += "!Default value: \"FixOrNot\"(-1). Available values: \"FixOrNot\"(-1), \"NotFix\"(0), \"Fix\"(1)\n"; + aResult += aScope + "vertex.tolerance :\t " + (int)HealingParameters.FixVertexToleranceMode + "\n"; + aResult += "!\n"; + + return aResult; +} diff --git a/src/DE/DE_ShapeFixConfigurationNode.hxx b/src/DE/DE_ShapeFixConfigurationNode.hxx new file mode 100644 index 0000000000..7596a4c859 --- /dev/null +++ b/src/DE/DE_ShapeFixConfigurationNode.hxx @@ -0,0 +1,51 @@ +// Copyright (c) 2024 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 _DE_ShapeFixConfigurationNode_HeaderFile +#define _DE_ShapeFixConfigurationNode_HeaderFile + +#include +#include +#include + +class DE_ConfigurationContext; + +//! Base class to work with shape healing parameters for child classes. +class DE_ShapeFixConfigurationNode : public DE_ConfigurationNode +{ + DEFINE_STANDARD_RTTIEXT(DE_ShapeFixConfigurationNode, DE_ConfigurationNode) +public: + + //! Initializes all field by default + Standard_EXPORT DE_ShapeFixConfigurationNode(); + + //! Copies values of all fields + //! @param[in] theConfigurationNode object to copy + Standard_EXPORT DE_ShapeFixConfigurationNode(const Handle(DE_ShapeFixConfigurationNode)& theConfigurationNode); + + //! Updates values according the resource + //! @param[in] theResource input resource to use + //! @return True if Load was successful + Standard_EXPORT virtual bool Load(const Handle(DE_ConfigurationContext)& theResource) Standard_OVERRIDE; + + //! Writes configuration to the string + //! @return result resource string + Standard_EXPORT virtual TCollection_AsciiString Save() const Standard_OVERRIDE; + +public: + + DE_ShapeFixParameters HealingParameters; //!< Shape healing parameters + +}; + +#endif // _DE_ShapeFixConfigurationNode_HeaderFile diff --git a/src/DE/DE_ShapeFixParameters.hxx b/src/DE/DE_ShapeFixParameters.hxx new file mode 100644 index 0000000000..98c0dfd52c --- /dev/null +++ b/src/DE/DE_ShapeFixParameters.hxx @@ -0,0 +1,82 @@ +// Copyright (c) 2024 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 _DE_ShapeFixParameters_HeaderFile +#define _DE_ShapeFixParameters_HeaderFile + +//! Struct for shape healing parameters storage +struct DE_ShapeFixParameters +{ + //! Enum, classifying a type of value for parameters + enum class FixMode : char + { + FixOrNot = -1, //!< Procedure will be executed or not (depending on the situation) + NotFix = 0, //!< Procedure will be executed + Fix = 1 //!< Procedure will be executed anyway + }; + + double Tolerance3d = 1.e-6; + double MaxTolerance3d = 1.0; + double MinTolerance3d = 1.e-7; + FixMode FixFreeShellMode = FixMode::FixOrNot; + FixMode FixFreeFaceMode = FixMode::FixOrNot; + FixMode FixFreeWireMode = FixMode::FixOrNot; + FixMode FixSameParameterMode = FixMode::FixOrNot; + FixMode FixSolidMode = FixMode::FixOrNot; + FixMode FixShellOrientationMode = FixMode::FixOrNot; + FixMode CreateOpenSolidMode = FixMode::NotFix; + FixMode FixShellMode = FixMode::FixOrNot; + FixMode FixFaceOrientationMode = FixMode::FixOrNot; + FixMode FixFaceMode = FixMode::FixOrNot; + FixMode FixWireMode = FixMode::FixOrNot; + FixMode FixOrientationMode = FixMode::FixOrNot; + FixMode FixAddNaturalBoundMode = FixMode::FixOrNot; + FixMode FixMissingSeamMode = FixMode::FixOrNot; + FixMode FixSmallAreaWireMode = FixMode::FixOrNot; + FixMode RemoveSmallAreaFaceMode = FixMode::FixOrNot; + FixMode FixIntersectingWiresMode = FixMode::FixOrNot; + FixMode FixLoopWiresMode = FixMode::FixOrNot; + FixMode FixSplitFaceMode = FixMode::FixOrNot; + FixMode AutoCorrectPrecisionMode = FixMode::FixOrNot; + FixMode ModifyTopologyMode = FixMode::NotFix; + FixMode ModifyGeometryMode = FixMode::Fix; + FixMode ClosedWireMode = FixMode::Fix; + FixMode PreferencePCurveMode = FixMode::Fix; + FixMode FixReorderMode = FixMode::FixOrNot; + FixMode FixSmallMode = FixMode::FixOrNot; + FixMode FixConnectedMode = FixMode::FixOrNot; + FixMode FixEdgeCurvesMode = FixMode::FixOrNot; + FixMode FixDegeneratedMode = FixMode::FixOrNot; + FixMode FixLackingMode = FixMode::FixOrNot; + FixMode FixSelfIntersectionMode = FixMode::FixOrNot; + FixMode RemoveLoopMode = FixMode::FixOrNot; + FixMode FixReversed2dMode = FixMode::FixOrNot; + FixMode FixRemovePCurveMode = FixMode::FixOrNot; + FixMode FixRemoveCurve3dMode = FixMode::FixOrNot; + FixMode FixAddPCurveMode = FixMode::FixOrNot; + FixMode FixAddCurve3dMode = FixMode::FixOrNot; + FixMode FixSeamMode = FixMode::FixOrNot; + FixMode FixShiftedMode = FixMode::FixOrNot; + FixMode FixEdgeSameParameterMode = FixMode::NotFix; + FixMode FixNotchedEdgesMode = FixMode::FixOrNot; + FixMode FixTailMode = FixMode::NotFix; + FixMode MaxTailAngle = FixMode::NotFix; + FixMode MaxTailWidth = FixMode::FixOrNot; + FixMode FixSelfIntersectingEdgeMode = FixMode::FixOrNot; + FixMode FixIntersectingEdgesMode = FixMode::FixOrNot; + FixMode FixNonAdjacentIntersectingEdgesMode = FixMode::FixOrNot; + FixMode FixVertexPositionMode = FixMode::NotFix; + FixMode FixVertexToleranceMode = FixMode::FixOrNot; +}; + +#endif // _DE_ShapeFixParameters_HeaderFile diff --git a/src/DE/FILES b/src/DE/FILES index 8c79177e58..bfdd4bff7d 100644 --- a/src/DE/FILES +++ b/src/DE/FILES @@ -5,5 +5,8 @@ DE_ConfigurationNode.hxx DE_PluginHolder.hxx DE_Provider.cxx DE_Provider.hxx +DE_ShapeFixConfigurationNode.cxx +DE_ShapeFixConfigurationNode.hxx +DE_ShapeFixParameters.hxx DE_Wrapper.cxx DE_Wrapper.hxx From 273665211737b636adaec571606af409ba764a09 Mon Sep 17 00:00:00 2001 From: oan Date: Thu, 8 Aug 2024 19:33:52 +0100 Subject: [PATCH 589/639] 0033791: Shape Healing - ShapeCustom not take location of source shape for the cached context and misses root one Pass ShapeBuild_ReShape to recursive call to retrieve complete change history. Update history of changes by the source shape (if changed), not only by its subshapes. Check the context for a cached shape using a reference shape without location. --- src/ShapeCustom/ShapeCustom.cxx | 128 +++++++++++++++++++++++--------- 1 file changed, 94 insertions(+), 34 deletions(-) diff --git a/src/ShapeCustom/ShapeCustom.cxx b/src/ShapeCustom/ShapeCustom.cxx index 5e4ab7f82e..a5e8dd29d8 100644 --- a/src/ShapeCustom/ShapeCustom.cxx +++ b/src/ShapeCustom/ShapeCustom.cxx @@ -36,6 +36,68 @@ #include +namespace +{ + //======================================================================= + //function : UpdateHistoryShape + //purpose : Updates ShapeBuild_ReShape by the info of the given shape + //======================================================================= + bool UpdateHistoryShape (const TopoDS_Shape& theShape, + const BRepTools_Modifier& theModifier, + const Handle(ShapeBuild_ReShape)& theReShape) + { + TopoDS_Shape aResult; + try + { + OCC_CATCH_SIGNALS + aResult = theModifier.ModifiedShape (theShape); + } + catch (Standard_NoSuchObject const&) + { + // the sub shape isn't in the map + aResult.Nullify(); + } + + if (!aResult.IsNull() && !theShape.IsSame (aResult)) + { + theReShape->Replace (theShape, aResult); + return true; + } + + return false; + } + + //======================================================================= + //function : UpdateHistory + //purpose : Recursively updates ShapeBuild_ReShape to add information of all sub-shapes + //======================================================================= + void UpdateHistory (const TopoDS_Shape& theShape, + const BRepTools_Modifier& theModifier, + const Handle(ShapeBuild_ReShape)& theReShape) + { + for (TopoDS_Iterator theIterator (theShape, Standard_False); theIterator.More(); theIterator.Next()) + { + const TopoDS_Shape& aCurrent = theIterator.Value(); + if (UpdateHistoryShape (aCurrent, theModifier, theReShape)) + { + UpdateHistory (aCurrent, theModifier, theReShape); + } + } + } + + //======================================================================= + //function : UpdateShapeBuild + //purpose : Recursively updates ShapeBuild_ReShape to add information of all sub-shapes + //======================================================================= + void UpdateShapeBuild (const TopoDS_Shape& theShape, + const BRepTools_Modifier& theModifier, + const Handle(ShapeBuild_ReShape)& theReShape) + { + UpdateHistoryShape (theShape, theModifier, theReShape); + UpdateHistory (theShape, theModifier, theReShape); + } +} + //======================================================================= //function : ApplyModifier //purpose : static @@ -58,25 +120,35 @@ TopoDS_Shape ShapeCustom::ApplyModifier (const TopoDS_Shape &S, BRep_Builder B; B.MakeCompound ( C ); + SF.Location (TopLoc_Location()); Standard_Integer aShapeCount = SF.NbChildren(); Message_ProgressScope aPS(theProgress, "Applying Modifier For Solids", aShapeCount); - for ( TopoDS_Iterator it(SF); it.More() && aPS.More(); it.Next()) { - TopoDS_Shape shape = it.Value(); - TopLoc_Location L = shape.Location(), nullLoc; - shape.Location ( nullLoc ); - TopoDS_Shape res; + for (TopoDS_Iterator it(SF); it.More() && aPS.More(); it.Next()) + { Message_ProgressRange aRange = aPS.Next(); - if ( context.IsBound ( shape ) ) - res = context.Find ( shape ).Oriented ( shape.Orientation() ); + + TopoDS_Shape shape = it.Value(); + TopoDS_Shape aShapeNoLoc = it.Value(); + aShapeNoLoc.Location (TopLoc_Location()); + + TopoDS_Shape res; + if (context.Find (aShapeNoLoc, res)) + { + res.Orientation (shape.Orientation()); + res.Location (shape.Location(), Standard_False); + } else - res = ApplyModifier ( shape, M, context ,MD, aRange); + { + res = ApplyModifier (shape, M, context, MD, aRange, aReShape); + } - if ( ! res.IsSame ( shape ) ) { - context.Bind ( shape, res ); + if ( !res.IsSame (shape) ) + { + context.Bind (aShapeNoLoc, res.Located (TopLoc_Location())); locModified = Standard_True; } - res.Location ( L, Standard_False ); - B.Add ( C, res ); + + B.Add (C, res); } if ( !aPS.More() ) @@ -85,9 +157,16 @@ TopoDS_Shape ShapeCustom::ApplyModifier (const TopoDS_Shape &S, return S; } - if ( ! locModified ) return S; + if ( !locModified ) + { + return S; + } + context.Bind ( SF, C ); - return C.Oriented ( S.Orientation() ); + + C.Orientation (S.Orientation()); + C.Location (S.Location(), Standard_False); + return C; } Message_ProgressScope aPS(theProgress, "Modify the Shape", 1); @@ -98,26 +177,7 @@ TopoDS_Shape ShapeCustom::ApplyModifier (const TopoDS_Shape &S, if ( !aPS.More() || !MD.IsDone() ) return S; if ( !aReShape.IsNull() ) { - for(TopoDS_Iterator theIterator(SF,Standard_False);theIterator.More();theIterator.Next()) - { - const TopoDS_Shape & current = theIterator.Value(); - TopoDS_Shape result; - try - { - OCC_CATCH_SIGNALS - result = MD.ModifiedShape( current ); - } - catch (Standard_NoSuchObject const&) - { - // the sub shape isn't in the map - result.Nullify(); - } - - if (!result.IsNull() && !current.IsSame(result)) - { - aReShape->Replace(current, result); - } - } + UpdateShapeBuild ( SF, MD, aReShape ); } return MD.ModifiedShape(SF).Oriented(S.Orientation()); From da71394f313b3a2065c1e2871ad1e884ce01edda Mon Sep 17 00:00:00 2001 From: dpasukhi Date: Sun, 25 Aug 2024 08:35:49 +0000 Subject: [PATCH 590/639] 0033612: Configuration - Build configuration may fail to detect TBB Fixed TBB type to depends on package --- adm/cmake/tbb.cmake | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/adm/cmake/tbb.cmake b/adm/cmake/tbb.cmake index 4e5f724ac2..fae9905ecf 100644 --- a/adm/cmake/tbb.cmake +++ b/adm/cmake/tbb.cmake @@ -56,13 +56,17 @@ if (WIN32) list (APPEND 3RDPARTY_NOT_INCLUDED 3RDPARTY_TBB_INCLUDE_DIR) endif() + # Get installed configuration of tbb + get_target_property (TARGET_TBB_IMPORT_CONFS TBB::tbb IMPORTED_CONFIGURATIONS) + list (GET TARGET_TBB_IMPORT_CONFS 0 CHOSEN_IMPORT_CONF) + separate_arguments (CSF_TBB) foreach (LIB IN LISTS CSF_TBB) string(TOLOWER "${LIB}" LIB_LOWER) string(TOUPPER "${LIB}" LIB_UPPER) # Achive *.lib files and directory containing it. - get_target_property (TBB_LIB_FILE "TBB::${LIB_LOWER}" IMPORTED_IMPLIB_RELEASE) + get_target_property (TBB_LIB_FILE "TBB::${LIB_LOWER}" IMPORTED_IMPLIB_${CHOSEN_IMPORT_CONF}) # Reserve cache variable for *.lib. if (NOT DEFINED 3RDPARTY_${LIB_UPPER}_LIBRARY) set (3RDPARTY_${LIB_UPPER}_LIBRARY "" CACHE FILEPATH "${LIB_UPPER} library (*.lib)") @@ -89,7 +93,7 @@ if (WIN32) endif() # Achive *.dll files and directory containing it. - get_target_property (TBB_DLL_FILE "TBB::${LIB_LOWER}" IMPORTED_LOCATION_RELEASE) + get_target_property (TBB_DLL_FILE "TBB::${LIB_LOWER}" IMPORTED_LOCATION_${CHOSEN_IMPORT_CONF}) # Reserve cache variable for *.dll. if (NOT DEFINED 3RDPARTY_${LIB_UPPER}_DLL) set (3RDPARTY_${LIB_UPPER}_DLL "" CACHE FILEPATH "${LIB_UPPER} library (*.dll)") @@ -185,13 +189,17 @@ else () list (APPEND 3RDPARTY_NOT_INCLUDED 3RDPARTY_TBB_INCLUDE_DIR) endif() + # Get installed configuration of tbb + get_target_property (TARGET_TBB_IMPORT_CONFS TBB::tbb IMPORTED_CONFIGURATIONS) + list (GET TARGET_TBB_IMPORT_CONFS 0 CHOSEN_IMPORT_CONF) + separate_arguments (CSF_TBB) foreach (LIB IN LISTS CSF_TBB) string(TOLOWER "${LIB}" LIB_LOWER) string(TOUPPER "${LIB}" LIB_UPPER) # Achive *.so files and directory containing it. - get_target_property (TBB_SO_FILE "TBB::${LIB_LOWER}" IMPORTED_LOCATION_RELEASE) + get_target_property (TBB_SO_FILE "TBB::${LIB_LOWER}" IMPORTED_LOCATION_${CHOSEN_IMPORT_CONF}) # Reserve cache variable for *.so. if (NOT DEFINED 3RDPARTY_${LIB_UPPER}_LIBRARY) set (3RDPARTY_${LIB_UPPER}_LIBRARY "" CACHE FILEPATH "${LIB_UPPER} library (*.so)") From b332761e1385a0f477508d4f305aecf775c5162d Mon Sep 17 00:00:00 2001 From: astromko Date: Wed, 7 Aug 2024 15:15:43 +0100 Subject: [PATCH 591/639] 0033648: Modeling Algorithms - Bad partition result Removed unnecessary tolerance increase for Line\Line intersection. Tolerance increasing logic for some specific curve types was added with #26619. Original fix had no test for Line/Line case and theoretically was added as a possible issue. After research Line/Line case doesn't need a special tolerance case. --- src/BOPAlgo/BOPAlgo_PaveFiller_3.cxx | 10 +++------- tests/bugs/modalg_8/bug33648 | 26 ++++++++++++++++++++++++++ 2 files changed, 29 insertions(+), 7 deletions(-) create mode 100644 tests/bugs/modalg_8/bug33648 diff --git a/src/BOPAlgo/BOPAlgo_PaveFiller_3.cxx b/src/BOPAlgo/BOPAlgo_PaveFiller_3.cxx index 7dd8b3ee41..7515035dda 100644 --- a/src/BOPAlgo/BOPAlgo_PaveFiller_3.cxx +++ b/src/BOPAlgo/BOPAlgo_PaveFiller_3.cxx @@ -341,12 +341,8 @@ void BOPAlgo_PaveFiller::PerformEE(const Message_ProgressRange& theRange) GeomAbs_CurveType aType1 = aBAC1.GetType(); GeomAbs_CurveType aType2 = aBAC2.GetType(); // - bAnalytical = (((aType1 == GeomAbs_Line) && - (aType2 == GeomAbs_Line || - aType2 == GeomAbs_Circle)) || - ((aType2 == GeomAbs_Line) && - (aType1 == GeomAbs_Line || - aType1 == GeomAbs_Circle))); + bAnalytical = (aType1 == GeomAbs_Line && aType2 == GeomAbs_Circle) || + (aType1 == GeomAbs_Circle && aType2 == GeomAbs_Line); } // for (i=1; i<=aNbCPrts; ++i) { @@ -443,7 +439,7 @@ void BOPAlgo_PaveFiller::PerformEE(const Message_ProgressRange& theRange) Standard_Real aTolVnew = BRep_Tool::Tolerance(aVnew); if (bAnalytical) { - // increase tolerance for Line/Line intersection, but do not update + // increase tolerance for Line/Circle intersection, but do not update // the vertex till its intersection with some other shape Standard_Real aTolMin = (BRepAdaptor_Curve(aE1).GetType() == GeomAbs_Line) ? (aCR1.Last() - aCR1.First()) / 2. : (aCR2.Last() - aCR2.First()) / 2.; diff --git a/tests/bugs/modalg_8/bug33648 b/tests/bugs/modalg_8/bug33648 new file mode 100644 index 0000000000..c73ea151cf --- /dev/null +++ b/tests/bugs/modalg_8/bug33648 @@ -0,0 +1,26 @@ +puts "===================================================" +puts "0033648: Modeling Algorithms - Bad partition result" +puts "===================================================" +puts "" + +pload MODELING +restore [locate_data_file bug33648_1.brep] s1 +restore [locate_data_file bug33648_2.brep] s2 + +baddobjects s1 s2 +bfillds +bbuild result + +checkprops result -s 87.2813 +checknbshapes result -vertex 58 -edge 97 -wire 44 -face 44 -shell 4 -solid 4 -compsolid 0 -compound 2 -shape 253 + +set expected_MaxTolerance 0.05 +regexp {Tolerance +MAX=([-0-9.+eE]+)} [tolerance result] full MaxTolerance +if { $MaxTolerance > $expected_MaxTolerance } { + puts "Error : too big tolerance for the shape (should be less than $expected_MaxTolerance, now $MaxTolerance)" +} + +vinit +vdisplay result +vfit +checkview -screenshot -3d -path ${imagedir}/${test_image}.png From 099e0d25243925da349d43e6e1ee0528763cdabe Mon Sep 17 00:00:00 2001 From: luzpaz Date: Sat, 31 Aug 2024 09:26:15 -0400 Subject: [PATCH 592/639] 0033807: Documentation - Fix various typos found in codebase --- adm/cmake/3rdparty_macro.cmake | 2 +- adm/cmake/bison.cmake | 2 +- adm/cmake/cotire.cmake | 4 ++-- adm/cmake/flex.cmake | 2 +- adm/cmake/freetype.cmake | 2 +- adm/cmake/tbb.cmake | 14 +++++++------- adm/upgrade.tcl | 2 +- dox/introduction/introduction.md | 2 +- dox/user_guides/ocaf/ocaf.md | 4 ++-- samples/glfw/adm/cmake/FindOpenCASCADE.cmake | 2 +- .../APIHeaderSection_MakeHeader.cxx | 2 +- src/Adaptor3d/Adaptor3d_CurveOnSurface.cxx | 6 +++--- src/Adaptor3d/Adaptor3d_TopolTool.cxx | 2 +- src/Approx/Approx_SweepFunction.hxx | 2 +- src/Aspect/Aspect_DisplayConnection.hxx | 2 +- src/BRepAlgo/BRepAlgo_FaceRestrictor.hxx | 12 ++++++------ src/BRepAlgo/BRepAlgo_Loop.hxx | 4 ++-- src/BRepBlend/BRepBlend_AppFuncRoot.cxx | 2 +- src/BRepBlend/BRepBlend_AppFuncRoot.hxx | 4 ++-- src/BRepBlend/BRepBlend_RstRstConstRad.hxx | 4 ++-- src/BRepBlend/BRepBlend_RstRstEvolRad.hxx | 4 ++-- src/BRepBlend/BRepBlend_SurfRstConstRad.hxx | 4 ++-- src/BRepBlend/BRepBlend_SurfRstEvolRad.hxx | 4 ++-- src/BRepClass/BRepClass_FaceExplorer.cxx | 2 +- src/BRepFill/BRepFill_Draft.cxx | 2 +- src/BRepFill/BRepFill_Evolved.cxx | 2 +- src/BRepFill/BRepFill_LocationLaw.hxx | 8 ++++---- src/BRepFill/BRepFill_Pipe.cxx | 2 +- src/BRepFill/BRepFill_PipeShell.cxx | 2 +- src/BRepFill/BRepFill_PipeShell.hxx | 6 +++--- src/BRepFill/BRepFill_Sweep.cxx | 2 +- src/BRepFill/BRepFill_Sweep.hxx | 6 +++--- .../BRepOffsetAPI_FindContigousEdges.hxx | 2 +- src/BRepOffsetAPI/BRepOffsetAPI_MakeOffset.cxx | 2 +- src/BRepOffsetAPI/BRepOffsetAPI_MakeOffset.hxx | 2 +- .../BRepOffsetAPI_MakeOffsetShape.hxx | 2 +- src/BRepOffsetAPI/BRepOffsetAPI_MakePipeShell.hxx | 2 +- src/BRepTest/BRepTest_Fillet2DCommands.cxx | 6 +++--- src/BSplCLib/BSplCLib_CurveComputation.gxx | 2 +- src/BSplSLib/BSplSLib.cxx | 4 ++-- src/Blend/Blend_AppFunction.hxx | 4 ++-- src/Blend/Blend_CSFunction.hxx | 2 +- src/Blend/Blend_RstRstFunction.hxx | 4 ++-- src/Blend/Blend_SurfRstFunction.hxx | 4 ++-- src/BlendFunc/BlendFunc_CSCircular.hxx | 8 ++++---- src/BlendFunc/BlendFunc_CSConstRad.hxx | 4 ++-- src/BlendFunc/BlendFunc_ChAsym.hxx | 4 ++-- src/BlendFunc/BlendFunc_ConstRad.cxx | 2 +- src/BlendFunc/BlendFunc_ConstRad.hxx | 4 ++-- src/BlendFunc/BlendFunc_EvolRad.hxx | 6 +++--- src/BlendFunc/BlendFunc_GenChamfer.hxx | 2 +- src/BlendFunc/BlendFunc_Ruled.hxx | 2 +- src/Extrema/Extrema_ExtCS.hxx | 2 +- src/Extrema/Extrema_ExtPS.hxx | 2 +- src/Extrema/Extrema_ExtSS.hxx | 2 +- src/FairCurve/FairCurve_Energy.hxx | 8 ++++---- src/FairCurve/FairCurve_EnergyOfBatten.hxx | 4 ++-- src/FairCurve/FairCurve_EnergyOfMVC.hxx | 6 +++--- src/Geom2dConvert/Geom2dConvert.cxx | 2 +- src/GeomConvert/GeomConvert.cxx | 2 +- src/GeomFill/GeomFill_CircularBlendFunc.hxx | 4 ++-- src/GeomFill/GeomFill_EvolvedSection.hxx | 2 +- src/GeomFill/GeomFill_NSections.hxx | 2 +- src/GeomFill/GeomFill_SectionLaw.hxx | 2 +- src/GeomFill/GeomFill_SweepFunction.hxx | 2 +- src/GeomFill/GeomFill_UniformSection.hxx | 2 +- src/GeomLib/GeomLib.cxx | 2 +- src/GeomPlate/GeomPlate_BuildAveragePlane.hxx | 4 ++-- src/GeomPlate/GeomPlate_BuildPlateSurface.cxx | 2 +- src/IntCurveSurface/IntCurveSurface_Inter.gxx | 2 +- src/IntWalk/IntWalk_IWalking_5.gxx | 2 +- src/OSD/OSD.cxx | 2 +- src/OSD/OSD_Error.cxx | 2 +- src/PrsDim/PrsDim.hxx | 2 +- src/PrsDim/PrsDim_AngleDimension.cxx | 2 +- src/PrsDim/PrsDim_DiameterDimension.hxx | 2 +- src/PrsDim/PrsDim_Dimension.cxx | 2 +- src/PrsDim/PrsDim_IdenticRelation.cxx | 8 ++++---- src/PrsDim/PrsDim_LengthDimension.cxx | 2 +- src/PrsDim/PrsDim_RadiusDimension.hxx | 2 +- src/STEPConstruct/STEPConstruct.hxx | 4 ++-- src/STEPConstruct/STEPConstruct_ExternRefs.cxx | 4 ++-- src/STEPConstruct/STEPConstruct_ExternRefs.hxx | 2 +- .../STEPConstruct_ValidationProps.hxx | 2 +- src/SelectMgr/SelectMgr_Selection.hxx | 2 +- src/SelectMgr/SelectMgr_ViewerSelector.hxx | 2 +- .../ShapeUpgrade_ConvertCurve2dToBezier.cxx | 2 +- src/ShapeUpgrade/ShapeUpgrade_RemoveLocations.cxx | 2 +- src/Standard/Standard_Dump.hxx | 2 +- src/Standard/Standard_ErrorHandler.cxx | 2 +- src/Standard/Standard_MMgrOpt.cxx | 2 +- src/TDF/TDF_Attribute.hxx | 2 +- src/TDocStd/TDocStd_Document.hxx | 2 +- src/TopOpeBRep/TopOpeBRep_EdgesFiller.hxx | 2 +- src/TopOpeBRep/TopOpeBRep_EdgesIntersector.cxx | 2 +- src/TopOpeBRep/TopOpeBRep_FacesFiller.hxx | 2 +- src/TopOpeBRep/TopOpeBRep_ShapeScanner.hxx | 4 ++-- src/TopOpeBRepBuild/TopOpeBRepBuild_GridFF.cxx | 2 +- .../TopOpeBRepTool_PurgeInternalEdges.hxx | 4 ++-- src/TopOpeBRepTool/TopOpeBRepTool_REGUW.cxx | 2 +- src/Vrml/Vrml_LOD.hxx | 2 +- src/VrmlConverter/VrmlConverter_Curve.cxx | 2 +- .../VrmlConverter_DeflectionCurve.cxx | 2 +- tests/bugs/iges/bug29391 | 2 +- tests/bugs/mesh/bug31449_2 | 2 +- tests/bugs/modalg_1/buc60663_2 | 4 ++-- tests/bugs/modalg_1/bug144 | 4 ++-- tests/bugs/modalg_5/bug24657 | 2 +- tests/bugs/modalg_7/bug29293_2 | 2 +- tests/bugs/moddata_3/bug28026 | 2 +- tests/bugs/step/bug32922 | 2 +- tests/bugs/step/pro19895 | 4 ++-- tests/bugs/xde/bug904 | 2 +- tests/de/end | 2 +- tests/lowalgos/intss/bug24915 | 2 +- tests/lowalgos/intss/bug504 | 2 +- tests/offset/bugs/bug30055 | 2 +- tests/pipe/bugs/bug32809 | 2 +- tests/thrusection/specific_locked/E6 | 2 +- tests/thrusection/specific_locked/E7 | 2 +- tests/thrusection/specific_locked/E8 | 2 +- tests/thrusection/specific_locked/F1 | 2 +- tests/thrusection/specific_locked/F2 | 2 +- tests/thrusection/specific_locked/F3 | 2 +- tests/thrusection/specific_locked/G4 | 2 +- tests/thrusection/specific_locked/G6 | 2 +- tests/v3d/bugs/bug22795 | 2 +- tests/xcaf/end | 2 +- .../DFBrowserPane_AttributePaneModel.hxx | 2 +- tools/MessageModel/MessageModel_ItemRoot.hxx | 2 +- tools/MessageModel/MessageModel_TreeModel.hxx | 4 ++-- .../MessageView_MetricStatisticModel.hxx | 4 ++-- tools/MessageView/MessageView_VisibilityState.hxx | 2 +- tools/MessageView/MessageView_Window.hxx | 4 ++-- tools/TInspector/TInspector_Window.hxx | 2 +- tools/View/View_DisplayPreview.hxx | 2 +- tools/View/View_Displayer.hxx | 2 +- tools/ViewControl/ViewControl_ColorSelector.cxx | 10 +++++----- tools/ViewControl/ViewControl_ColorSelector.hxx | 2 +- 139 files changed, 206 insertions(+), 206 deletions(-) diff --git a/adm/cmake/3rdparty_macro.cmake b/adm/cmake/3rdparty_macro.cmake index a3621f7621..13aec5fb1c 100644 --- a/adm/cmake/3rdparty_macro.cmake +++ b/adm/cmake/3rdparty_macro.cmake @@ -19,7 +19,7 @@ macro (THIRDPARTY_PRODUCT PRODUCT_NAME HEADER_NAME LIBRARY_CSF_NAME LIBRARY_NAME # include occt macros. compiler_bitness, os_wiht_bit, compiler OCCT_INCLUDE_CMAKE_FILE ("adm/cmake/occt_macros") - # specify product folder in connectin with 3RDPARTY_DIR + # specify product folder in connection with 3RDPARTY_DIR if (3RDPARTY_DIR AND EXISTS "${3RDPARTY_DIR}") #CHECK_PATH_FOR_CONSISTENCY (3RDPARTY_DIR 3RDPARTY_${PRODUCT_NAME}_DIR PATH "The directory containing ${PRODUCT_NAME}") diff --git a/adm/cmake/bison.cmake b/adm/cmake/bison.cmake index 83d8da5466..0e4870f9fa 100644 --- a/adm/cmake/bison.cmake +++ b/adm/cmake/bison.cmake @@ -12,7 +12,7 @@ if (NOT BISON_EXECUTABLE OR NOT EXISTS "${BISON_EXECUTABLE}") endif() # Add paths to 3rdparty subfolders containing name "bison" to CMAKE_PROGRAM_PATH variable to make -# these paths searhed by find_package +# these paths searched by find_package if (3RDPARTY_DIR) file (GLOB BISON_PATHS LIST_DIRECTORIES true "${3RDPARTY_DIR}/*bison*/") foreach (candidate_path ${BISON_PATHS}) diff --git a/adm/cmake/cotire.cmake b/adm/cmake/cotire.cmake index acdca71a9f..40372b8457 100644 --- a/adm/cmake/cotire.cmake +++ b/adm/cmake/cotire.cmake @@ -2580,7 +2580,7 @@ function (cotire_setup_target_pch_usage _languages _target _wholeTarget) message (STATUS "add_custom_command: TARGET ${_target} PRE_BUILD ${_cmds}") endif() # because CMake PRE_BUILD command does not support dependencies, - # we check dependencies explicity in cotire script mode when the pre-build action is run + # we check dependencies explicitly in cotire script mode when the pre-build action is run add_custom_command( TARGET "${_target}" PRE_BUILD ${_cmds} @@ -2637,7 +2637,7 @@ function (cotire_setup_unity_generation_commands _language _target _targetScript endif() if (WIN32 AND CMAKE_${_language}_COMPILER_ID MATCHES "MSVC|Intel") # unity file compilation results in potentially huge object file, - # thus use /bigobj by default unter cl.exe and Windows Intel + # thus use /bigobj by default under cl.exe and Windows Intel set_property (SOURCE "${_unityFile}" APPEND_STRING PROPERTY COMPILE_FLAGS "/bigobj") endif() cotire_set_cmd_to_prologue(_unityCmd) diff --git a/adm/cmake/flex.cmake b/adm/cmake/flex.cmake index b59a9cff79..da32fbecd9 100644 --- a/adm/cmake/flex.cmake +++ b/adm/cmake/flex.cmake @@ -15,7 +15,7 @@ if (NOT FLEX_INCLUDE_DIR OR NOT EXISTS "${FLEX_INCLUDE_DIR}") endif() # Add paths to 3rdparty subfolders containing name "flex" to CMAKE_PROGRAM_PATH and -# CMAKE_INCLUDE_PATH variables to make these paths searhed by find_package +# CMAKE_INCLUDE_PATH variables to make these paths searched by find_package if (3RDPARTY_DIR) file (GLOB FLEX_PATHS LIST_DIRECTORIES true "${3RDPARTY_DIR}/*flex*") foreach (candidate_path ${FLEX_PATHS}) diff --git a/adm/cmake/freetype.cmake b/adm/cmake/freetype.cmake index 8563c24f28..9a7fda2a5c 100644 --- a/adm/cmake/freetype.cmake +++ b/adm/cmake/freetype.cmake @@ -14,7 +14,7 @@ OCCT_INCLUDE_CMAKE_FILE ("adm/cmake/occt_macros") OCCT_MAKE_COMPILER_SHORT_NAME() OCCT_MAKE_COMPILER_BITNESS() -# specify freetype folder in connectin with 3RDPARTY_DIR +# specify freetype folder in connection with 3RDPARTY_DIR if (3RDPARTY_DIR AND EXISTS "${3RDPARTY_DIR}") #CHECK_PATH_FOR_CONSISTENCY (3RDPARTY_DIR 3RDPARTY_FREETYPE_DIR PATH "The directory containing freetype") diff --git a/adm/cmake/tbb.cmake b/adm/cmake/tbb.cmake index fae9905ecf..4c8f921969 100644 --- a/adm/cmake/tbb.cmake +++ b/adm/cmake/tbb.cmake @@ -27,7 +27,7 @@ if (WIN32) # Below, we have correct 3RDPARTY_DIR. - # Initialize TBB folder in connectin with 3RDPARTY_DIR. + # Initialize TBB folder in connection with 3RDPARTY_DIR. if (("${3RDPARTY_TBB_DIR}" STREQUAL "") OR (NOT EXISTS "${3RDPARTY_TBB_DIR}")) FIND_PRODUCT_DIR ("${3RDPARTY_DIR}" TBB TBB_DIR_NAME) if (TBB_DIR_NAME) @@ -44,7 +44,7 @@ if (WIN32) REQUIRED CONFIG) - # Achive include directory + # Archive include directory get_target_property (TBB_INCLUDE_DIR TBB::tbb INTERFACE_INCLUDE_DIRECTORIES) if (NOT DEFINED 3RDPARTY_TBB_INCLUDE_DIR) set (3RDPARTY_TBB_INCLUDE_DIR "" CACHE PATH "The directory containing headers of the TBB") @@ -65,7 +65,7 @@ if (WIN32) string(TOLOWER "${LIB}" LIB_LOWER) string(TOUPPER "${LIB}" LIB_UPPER) - # Achive *.lib files and directory containing it. + # Archive *.lib files and directory containing it. get_target_property (TBB_LIB_FILE "TBB::${LIB_LOWER}" IMPORTED_IMPLIB_${CHOSEN_IMPORT_CONF}) # Reserve cache variable for *.lib. if (NOT DEFINED 3RDPARTY_${LIB_UPPER}_LIBRARY) @@ -92,7 +92,7 @@ if (WIN32) list (APPEND 3RDPARTY_NO_LIBS 3RDPARTY_${LIB_UPPER}_LIBRARY_DIR) endif() - # Achive *.dll files and directory containing it. + # Archive *.dll files and directory containing it. get_target_property (TBB_DLL_FILE "TBB::${LIB_LOWER}" IMPORTED_LOCATION_${CHOSEN_IMPORT_CONF}) # Reserve cache variable for *.dll. if (NOT DEFINED 3RDPARTY_${LIB_UPPER}_DLL) @@ -175,9 +175,9 @@ else () REQUIRED CONFIG) endif() - # TBB has been configured (in other case FATAL_ERROR occures). + # TBB has been configured (in other case FATAL_ERROR occurs). - # Achive include directory. + # Archive include directory. get_target_property (TBB_INCLUDE_DIR TBB::tbb INTERFACE_INCLUDE_DIRECTORIES) if (NOT DEFINED 3RDPARTY_TBB_INCLUDE_DIR) set (3RDPARTY_TBB_INCLUDE_DIR "" CACHE PATH "The directory containing headers of the TBB") @@ -198,7 +198,7 @@ else () string(TOLOWER "${LIB}" LIB_LOWER) string(TOUPPER "${LIB}" LIB_UPPER) - # Achive *.so files and directory containing it. + # Archive *.so files and directory containing it. get_target_property (TBB_SO_FILE "TBB::${LIB_LOWER}" IMPORTED_LOCATION_${CHOSEN_IMPORT_CONF}) # Reserve cache variable for *.so. if (NOT DEFINED 3RDPARTY_${LIB_UPPER}_LIBRARY) diff --git a/adm/upgrade.tcl b/adm/upgrade.tcl index e07b041ed4..a7b5ec2a22 100644 --- a/adm/upgrade.tcl +++ b/adm/upgrade.tcl @@ -405,7 +405,7 @@ proc Rename {thePath theExtensions theNewNames theCheckMode} { } } -# @thePackagePath eather file or folder. If it is a folder, +# @thePackagePath either file or folder. If it is a folder, # all files with @theHeaderExtensions are processed. # "fwd.tcollection" section from upgrade.ini file is used to find out what # classes have been converted and, thus, what forward declarations can be replaced diff --git a/dox/introduction/introduction.md b/dox/introduction/introduction.md index fde58463d7..c0d71094c1 100644 --- a/dox/introduction/introduction.md +++ b/dox/introduction/introduction.md @@ -370,7 +370,7 @@ https://dev.opencascade.org/resources/download/3rd-party-components | Flex 2.6.4+ and Bison 3.7.1+ | https://sourceforge.net/projects/winflexbison/ | Data Exchange | Updating STEP and ExprIntrp parsers | | RapidJSON 1.1+ | https://rapidjson.org/ | Data Exchange | Reading glTF files | | Draco 1.4.1+ | https://github.com/google/draco | Data Exchange | Reading compressed glTF files | -| Tcl/Tk 8.6.3+ | https://www.tcl.tk/software/tcltk/download.html | DRAW Test Harness | Tcl interpretor in Draw module | +| Tcl/Tk 8.6.3+ | https://www.tcl.tk/software/tcltk/download.html | DRAW Test Harness | Tcl interpreter in Draw module | | Qt 5.3.2+ | https://www.qt.io/download/ | Inspector and Samples | Inspector Qt samples and | | Doxygen 1.8.5+ | https://www.doxygen.nl/download.html | Documentation | (Re)generating documentation | | Graphviz 2.38+ | https://graphviz.org/ | Documentation | Generating dependency graphs | diff --git a/dox/user_guides/ocaf/ocaf.md b/dox/user_guides/ocaf/ocaf.md index 69fc905042..60babd2cb5 100644 --- a/dox/user_guides/ocaf/ocaf.md +++ b/dox/user_guides/ocaf/ocaf.md @@ -763,7 +763,7 @@ filter2->AddSkipped("TDataStd_Integer"); app->Open("example.cbf", doc, filter2); ~~~~ -*PCDM_ReaderFilter::AppendMode_Protect* means that if the loading algorithm finds already existing attribute in the document, it will not be overwritten by attibute from the loading file. If it is needed to +*PCDM_ReaderFilter::AppendMode_Protect* means that if the loading algorithm finds already existing attribute in the document, it will not be overwritten by attribute from the loading file. If it is needed to substitute the existing attributes, the reading mode *PCDM_ReaderFilter::AppendMode_Overwrite* must be used instead. *AddRead* and *AddSkipped* methods for attributes should not be used in one filter. If it is so, *AddSkipped* attributes are ignored during the read. @@ -971,7 +971,7 @@ The "correct" history of a used modeling operation serves the basis of naming me | Closed wire | Edges | All edges | | Opened wire | Edges and ending vertexes | All edges plus ending vertexes of the wire | | Edge | Vertexes | Two vertexes are expected | -| Compound or CompSolid | To be used consequentially the above declared rule applied to all sub-shapes of the first level | Compound/CompSolid to be explored level by level until any the mentioned above types will be met | +| Compound or CompSolid | To be used consequently the above declared rule applied to all sub-shapes of the first level | Compound/CompSolid to be explored level by level until any the mentioned above types will be met | The history should return (and track) only elementary types of sub-shapes, i.e. Faces, Edges and Vertexes, while other so-called aggregation types: Compounds, Shells, Wires, are calculated by Selection mechanism automatically. diff --git a/samples/glfw/adm/cmake/FindOpenCASCADE.cmake b/samples/glfw/adm/cmake/FindOpenCASCADE.cmake index 839cc75192..1cbf05227f 100644 --- a/samples/glfw/adm/cmake/FindOpenCASCADE.cmake +++ b/samples/glfw/adm/cmake/FindOpenCASCADE.cmake @@ -119,7 +119,7 @@ if (OpenCASCADE_INCLUDE_DIR_FOUND AND OpenCASCADE_LIBRARY_DIR_FOUND) set (OpenCASCADE_INSTALL_PREFIX ${OpenCASCADE_DIR}) # Define OCCT toolkits so that CMake can put absolute paths to linker; - # the library existance is not checked here, since modules can be disabled. + # the library existence is not checked here, since modules can be disabled. foreach (aLibIter ${OpenCASCADE_TKLIST}) add_library (${aLibIter} SHARED IMPORTED) diff --git a/src/APIHeaderSection/APIHeaderSection_MakeHeader.cxx b/src/APIHeaderSection/APIHeaderSection_MakeHeader.cxx index 9f90004ff9..800fad7bcd 100644 --- a/src/APIHeaderSection/APIHeaderSection_MakeHeader.cxx +++ b/src/APIHeaderSection/APIHeaderSection_MakeHeader.cxx @@ -31,7 +31,7 @@ #include #include -// This is a generic header for any STEP sheme +// This is a generic header for any STEP scheme static Handle(TCollection_HAsciiString) nulstr; static Handle(Interface_HArray1OfHAsciiString) nularr; diff --git a/src/Adaptor3d/Adaptor3d_CurveOnSurface.cxx b/src/Adaptor3d/Adaptor3d_CurveOnSurface.cxx index 9bf807c227..1f6c58642a 100644 --- a/src/Adaptor3d/Adaptor3d_CurveOnSurface.cxx +++ b/src/Adaptor3d/Adaptor3d_CurveOnSurface.cxx @@ -146,7 +146,7 @@ static void Hunt(const TColStd_Array1OfReal& Arr, const Standard_Real Coord, Standard_Integer& Iloc) {//Warning: Hunt is used to find number of knot which equals coordinate component, - // when coordinate component definitly equals a knot only. + // when coordinate component definitely equals a knot only. Standard_Real Tol=Precision::PConfusion()/10; Standard_Integer i=1; while((i <= Arr.Upper()) && (Abs(Coord - Arr(i)) > Tol)){ @@ -638,7 +638,7 @@ static void Locate2Coord(const Standard_Integer Index, if((DComp > 0)&&(Abs(DComp)>Tol)) { Hunt(Arr,Comp,N); if (N >= NUp){ - //limit case: Hunt() cought upper knot. Take the last span. + //limit case: Hunt() caught upper knot. Take the last span. N = NUp - 1; } if(Index==1) { Tmp1=BSplS->UKnot(N); @@ -659,7 +659,7 @@ static void Locate2Coord(const Standard_Integer Index, if((DComp < 0)&&(Abs(DComp)>Tol)){ Hunt(Arr,Comp,N); if (N <= NLo) { - //limit case: Hunt() cought lower knot. Take the first span. + //limit case: Hunt() caught lower knot. Take the first span. N = NLo + 1; } if(Index==1) { Tmp1=BSplS->UKnot(N-1); diff --git a/src/Adaptor3d/Adaptor3d_TopolTool.cxx b/src/Adaptor3d/Adaptor3d_TopolTool.cxx index 807291d755..9179a9ea62 100644 --- a/src/Adaptor3d/Adaptor3d_TopolTool.cxx +++ b/src/Adaptor3d/Adaptor3d_TopolTool.cxx @@ -559,7 +559,7 @@ Standard_Boolean Adaptor3d_TopolTool::Identical #include #include -#define myMinPnts 4 //Absolut possible minimum of sample points +#define myMinPnts 4 //Absolute possible minimum of sample points //Restriction of IntPolyh diff --git a/src/Approx/Approx_SweepFunction.hxx b/src/Approx/Approx_SweepFunction.hxx index 56c0334bc4..c42f080050 100644 --- a/src/Approx/Approx_SweepFunction.hxx +++ b/src/Approx/Approx_SweepFunction.hxx @@ -68,7 +68,7 @@ public: //! get the Multplicities of the section Standard_EXPORT virtual void Mults (TColStd_Array1OfInteger& TMults) const = 0; - //! Returns if the sections are rationnal or not + //! Returns if the sections are rational or not Standard_EXPORT virtual Standard_Boolean IsRational() const = 0; //! Returns the number of intervals for continuity diff --git a/src/Aspect/Aspect_DisplayConnection.hxx b/src/Aspect/Aspect_DisplayConnection.hxx index 5c1ca79843..97de0ab871 100755 --- a/src/Aspect/Aspect_DisplayConnection.hxx +++ b/src/Aspect/Aspect_DisplayConnection.hxx @@ -27,7 +27,7 @@ struct Aspect_XVisualInfo; //! This class creates and provides connection with X server. //! Raises exception if can not connect to X server. //! On Windows and Mac OS X (in case when Cocoa used) platforms this class does nothing. -//! WARRNING: Do not close display connection manually! +//! WARNING: Do not close display connection manually! class Aspect_DisplayConnection : public Standard_Transient { DEFINE_STANDARD_RTTIEXT(Aspect_DisplayConnection, Standard_Transient) diff --git a/src/BRepAlgo/BRepAlgo_FaceRestrictor.hxx b/src/BRepAlgo/BRepAlgo_FaceRestrictor.hxx index ea5c642b46..cfd8623ecc 100644 --- a/src/BRepAlgo/BRepAlgo_FaceRestrictor.hxx +++ b/src/BRepAlgo/BRepAlgo_FaceRestrictor.hxx @@ -51,12 +51,12 @@ public: //! Warning: //! The Wires must be closed. //! - //! The edges of can be modified if they have not pcurves - //! on the surface of . In this case - //! if is false the first pcurve of the edge - //! is positionned on . - //! if is True ,the Pcurve On is the - //! projection of the curve 3d on . + //! The edges of can be modified if they don't have + //! pcurves on the surface of . In this case + //! if is false the first pcurve of the edge + //! is positioned on . + //! if is True, the Pcurve On is the + //! projection of the curve 3d on . Standard_EXPORT void Add (TopoDS_Wire& W); //! Removes all the Wires diff --git a/src/BRepAlgo/BRepAlgo_Loop.hxx b/src/BRepAlgo/BRepAlgo_Loop.hxx index df528d581d..8cf8fd2774 100644 --- a/src/BRepAlgo/BRepAlgo_Loop.hxx +++ b/src/BRepAlgo/BRepAlgo_Loop.hxx @@ -86,13 +86,13 @@ public: Standard_EXPORT void VerticesForSubstitute (TopTools_DataMapOfShapeShape& VerVerMap); - //! Set maximal tolerance used for comparing distaces between vertices. + //! Set maximal tolerance used for comparing distances between vertices. void SetTolConf(const Standard_Real theTolConf) { myTolConf = theTolConf; } - //! Get maximal tolerance used for comparing distaces between vertices. + //! Get maximal tolerance used for comparing distances between vertices. Standard_Real GetTolConf() const { return myTolConf; diff --git a/src/BRepBlend/BRepBlend_AppFuncRoot.cxx b/src/BRepBlend/BRepBlend_AppFuncRoot.cxx index de8508e8b0..b95c944a62 100644 --- a/src/BRepBlend/BRepBlend_AppFuncRoot.cxx +++ b/src/BRepBlend/BRepBlend_AppFuncRoot.cxx @@ -49,7 +49,7 @@ BRepBlend_AppFuncRoot::BRepBlend_AppFuncRoot(Handle(BRepBlend_Line)& Line, // Tables Func.GetShape( NbPoles, NbKnots, Degree, NbPoles2d); - // Calculation of BaryCentre (rationnal case). + // Calculation of BaryCentre (rational case). if (Func.IsRational()) { Standard_Real Xmax =-1.e100, Xmin = 1.e100, Ymax =-1.e100, Ymin = 1.e100, diff --git a/src/BRepBlend/BRepBlend_AppFuncRoot.hxx b/src/BRepBlend/BRepBlend_AppFuncRoot.hxx index abefca5b62..64bac871da 100644 --- a/src/BRepBlend/BRepBlend_AppFuncRoot.hxx +++ b/src/BRepBlend/BRepBlend_AppFuncRoot.hxx @@ -69,7 +69,7 @@ public: //! get the Multplicities of the section Standard_EXPORT virtual void Mults (TColStd_Array1OfInteger& TMults) const Standard_OVERRIDE; - //! Returns if the section is rationnal or not + //! Returns if the section is rational or not Standard_EXPORT virtual Standard_Boolean IsRational() const Standard_OVERRIDE; //! Returns the number of intervals for continuity @@ -95,7 +95,7 @@ public: Standard_EXPORT virtual void Resolution (const Standard_Integer Index, const Standard_Real Tol, Standard_Real& TolU, Standard_Real& TolV) const Standard_OVERRIDE; //! Returns the tolerance to reach in approximation - //! to respecte + //! to respect //! BoundTol error at the Boundary //! AngleTol tangent error at the Boundary (in radian) //! SurfTol error inside the surface. diff --git a/src/BRepBlend/BRepBlend_RstRstConstRad.hxx b/src/BRepBlend/BRepBlend_RstRstConstRad.hxx index de8221a068..4f98c28b2d 100644 --- a/src/BRepBlend/BRepBlend_RstRstConstRad.hxx +++ b/src/BRepBlend/BRepBlend_RstRstConstRad.hxx @@ -139,7 +139,7 @@ public: Standard_EXPORT void Section (const Standard_Real Param, const Standard_Real U, const Standard_Real V, Standard_Real& Pdeb, Standard_Real& Pfin, gp_Circ& C); - //! Returns if the section is rationnal + //! Returns if the section is rational Standard_EXPORT Standard_Boolean IsRational() const Standard_OVERRIDE; //! Returns the length of the maximum section @@ -162,7 +162,7 @@ public: Standard_EXPORT void GetShape (Standard_Integer& NbPoles, Standard_Integer& NbKnots, Standard_Integer& Degree, Standard_Integer& NbPoles2d) Standard_OVERRIDE; //! Returns the tolerance to reach in approximation - //! to respecte + //! to respect //! BoundTol error at the Boundary //! AngleTol tangent error at the Boundary //! SurfTol error inside the surface. diff --git a/src/BRepBlend/BRepBlend_RstRstEvolRad.hxx b/src/BRepBlend/BRepBlend_RstRstEvolRad.hxx index 10aa7da64c..78c51db4c4 100644 --- a/src/BRepBlend/BRepBlend_RstRstEvolRad.hxx +++ b/src/BRepBlend/BRepBlend_RstRstEvolRad.hxx @@ -140,7 +140,7 @@ public: Standard_EXPORT void Section (const Standard_Real Param, const Standard_Real U, const Standard_Real V, Standard_Real& Pdeb, Standard_Real& Pfin, gp_Circ& C); - //! Returns if the section is rationnal + //! Returns if the section is rational Standard_EXPORT Standard_Boolean IsRational() const Standard_OVERRIDE; //! Returns the length of the maximum section @@ -163,7 +163,7 @@ public: Standard_EXPORT void GetShape (Standard_Integer& NbPoles, Standard_Integer& NbKnots, Standard_Integer& Degree, Standard_Integer& NbPoles2d) Standard_OVERRIDE; //! Returns the tolerance to reach in approximation - //! to respecte + //! to respect //! BoundTol error at the Boundary //! AngleTol tangent error at the Boundary //! SurfTol error inside the surface. diff --git a/src/BRepBlend/BRepBlend_SurfRstConstRad.hxx b/src/BRepBlend/BRepBlend_SurfRstConstRad.hxx index a77097fcc6..505cfb1133 100644 --- a/src/BRepBlend/BRepBlend_SurfRstConstRad.hxx +++ b/src/BRepBlend/BRepBlend_SurfRstConstRad.hxx @@ -133,7 +133,7 @@ public: Standard_EXPORT void Section (const Standard_Real Param, const Standard_Real U, const Standard_Real V, const Standard_Real W, Standard_Real& Pdeb, Standard_Real& Pfin, gp_Circ& C); - //! Returns if the section is rationnal + //! Returns if the section is rational Standard_EXPORT Standard_Boolean IsRational() const Standard_OVERRIDE; //! Returns the length of the maximum section @@ -156,7 +156,7 @@ public: Standard_EXPORT void GetShape (Standard_Integer& NbPoles, Standard_Integer& NbKnots, Standard_Integer& Degree, Standard_Integer& NbPoles2d) Standard_OVERRIDE; //! Returns the tolerance to reach in approximation - //! to respecte + //! to respect //! BoundTol error at the Boundary //! AngleTol tangent error at the Boundary //! SurfTol error inside the surface. diff --git a/src/BRepBlend/BRepBlend_SurfRstEvolRad.hxx b/src/BRepBlend/BRepBlend_SurfRstEvolRad.hxx index ebdc9b82ae..cec1b04345 100644 --- a/src/BRepBlend/BRepBlend_SurfRstEvolRad.hxx +++ b/src/BRepBlend/BRepBlend_SurfRstEvolRad.hxx @@ -132,7 +132,7 @@ public: Standard_EXPORT void Section (const Standard_Real Param, const Standard_Real U, const Standard_Real V, const Standard_Real W, Standard_Real& Pdeb, Standard_Real& Pfin, gp_Circ& C); - //! Returns if the section is rationnal + //! Returns if the section is rational Standard_EXPORT Standard_Boolean IsRational() const Standard_OVERRIDE; //! Returns the length of the maximum section @@ -155,7 +155,7 @@ public: Standard_EXPORT void GetShape (Standard_Integer& NbPoles, Standard_Integer& NbKnots, Standard_Integer& Degree, Standard_Integer& NbPoles2d) Standard_OVERRIDE; //! Returns the tolerance to reach in approximation - //! to respecte + //! to respect //! BoundTol error at the Boundary //! AngleTol tangent error at the Boundary //! SurfTol error inside the surface. diff --git a/src/BRepClass/BRepClass_FaceExplorer.cxx b/src/BRepClass/BRepClass_FaceExplorer.cxx index 88ad99afb8..a0f12833fa 100644 --- a/src/BRepClass/BRepClass_FaceExplorer.cxx +++ b/src/BRepClass/BRepClass_FaceExplorer.cxx @@ -202,7 +202,7 @@ Standard_Boolean BRepClass_FaceExplorer::OtherSegment(const gp_Pnt2d& P, // is tangent to the edge curve. This condition is bad for classification. // Therefore try to go to another point in the hope that there will be // no tangent. If there tangent is preserved then leave the last point in - // order to get this edge chanse to participate in classification. + // order to get this edge chance to participate in classification. if (myCurEdgePar + Probing_Step < Probing_End) continue; } diff --git a/src/BRepFill/BRepFill_Draft.cxx b/src/BRepFill/BRepFill_Draft.cxx index b8c9762958..86f62c4ba3 100644 --- a/src/BRepFill/BRepFill_Draft.cxx +++ b/src/BRepFill/BRepFill_Draft.cxx @@ -541,7 +541,7 @@ static Standard_Boolean GoodOrientation(const Bnd_Box& B, if (!Surf.IsNull()) { // Add the face at end - // Waiting the use of traces & retriction in BRepFill_Sweep + // Waiting the use of traces & restriction in BRepFill_Sweep // Make Fuse. BRepLib_MakeFace MkF; MkF.Init(Surf, Standard_True, Precision::Confusion()); diff --git a/src/BRepFill/BRepFill_Evolved.cxx b/src/BRepFill/BRepFill_Evolved.cxx index 43ec222fe2..373c257160 100644 --- a/src/BRepFill/BRepFill_Evolved.cxx +++ b/src/BRepFill/BRepFill_Evolved.cxx @@ -3144,7 +3144,7 @@ void CutEdgeProf (const TopoDS_Edge& E, //======================================================================= //function : CutEdge -//purpose : Cut an edge at thw extrema of curves and at points of inflexion. +//purpose : Cut an edge at the extrema of curves and at points of inflexion. // Closed circles are also cut in two. // If are empty the edge is not modified. // The first and the last vertex of the original edge diff --git a/src/BRepFill/BRepFill_LocationLaw.hxx b/src/BRepFill/BRepFill_LocationLaw.hxx index ef0c460388..4a77d48ebf 100644 --- a/src/BRepFill/BRepFill_LocationLaw.hxx +++ b/src/BRepFill/BRepFill_LocationLaw.hxx @@ -122,18 +122,18 @@ public: protected: - //! Initialize all the fields, this methode have to + //! Initialize all the fields, this methode has to //! be called by the constructors of Inherited class. Standard_EXPORT void Init (const TopoDS_Wire& Path); - //! To preseve if possible the Tangent in transformations + //! To preserve if possible the Tangent in transformations //! It is the default mode. Standard_EXPORT void TangentIsMain(); - //! To preseve if possible the Normal in transformations + //! To preserve if possible the Normal in transformations Standard_EXPORT void NormalIsMain(); - //! To preseve if possible the BiNormal in transformations + //! To preserve if possible the BiNormal in transformations Standard_EXPORT void BiNormalIsMain(); TopoDS_Wire myPath; diff --git a/src/BRepFill/BRepFill_Pipe.cxx b/src/BRepFill/BRepFill_Pipe.cxx index 46e2b34d4c..9b5dd84a46 100644 --- a/src/BRepFill/BRepFill_Pipe.cxx +++ b/src/BRepFill/BRepFill_Pipe.cxx @@ -501,7 +501,7 @@ TopoDS_Shape BRepFill_Pipe::Section(const TopoDS_Vertex& VSpine) const TopoDS_Wire BRepFill_Pipe::PipeLine(const gp_Pnt& Point) { - // Postioning + // Positioning gp_Pnt P; P = Point; P.Transform(myTrsf); diff --git a/src/BRepFill/BRepFill_PipeShell.cxx b/src/BRepFill/BRepFill_PipeShell.cxx index d924ff4f47..850876620c 100644 --- a/src/BRepFill/BRepFill_PipeShell.cxx +++ b/src/BRepFill/BRepFill_PipeShell.cxx @@ -1155,7 +1155,7 @@ void BRepFill_PipeShell::Generated(const TopoDS_Shape& theShape, //======================================================================= //function : Place -//purpose : Implement a Section in the local refernce frame +//purpose : Implement a Section in the local reference frame // and return its parameter on the trajectory //======================================================================= void BRepFill_PipeShell::Place(const BRepFill_Section& Sec, diff --git a/src/BRepFill/BRepFill_PipeShell.hxx b/src/BRepFill/BRepFill_PipeShell.hxx index 3ff08b460c..7f92a136f1 100644 --- a/src/BRepFill/BRepFill_PipeShell.hxx +++ b/src/BRepFill/BRepFill_PipeShell.hxx @@ -48,7 +48,7 @@ class BRepFill_PipeShell; DEFINE_STANDARD_HANDLE(BRepFill_PipeShell, Standard_Transient) //! Computes a topological shell using some wires -//! (spines and profiles) and diplacement option +//! (spines and profiles) and displacement option //! Perform general sweeping construction class BRepFill_PipeShell : public Standard_Transient { @@ -116,7 +116,7 @@ public: //! to be C0. //! Give section to sweep. //! Possibilities are : - //! - Give one or sevral profile + //! - Give one or several profile //! - Give one profile and an homotetic law. //! - Automatic compute of correspondence between profile, and section on the sweeped shape //! - correspondence between profile, and section on the sweeped shape defined by a vertex of the spine @@ -153,7 +153,7 @@ public: Standard_EXPORT void SetTransition (const BRepFill_TransitionStyle Mode = BRepFill_Modified, const Standard_Real Angmin = 1.0e-2, const Standard_Real Angmax = 6.0); //! Perform simulation of the sweep : - //! Somes Section are returned. + //! Some Section are returned. Standard_EXPORT void Simulate (const Standard_Integer NumberOfSection, TopTools_ListOfShape& Sections); //! Builds the resulting shape (redefined from MakeShape). diff --git a/src/BRepFill/BRepFill_Sweep.cxx b/src/BRepFill/BRepFill_Sweep.cxx index bcefa9df55..6bf311cefb 100644 --- a/src/BRepFill/BRepFill_Sweep.cxx +++ b/src/BRepFill/BRepFill_Sweep.cxx @@ -2890,7 +2890,7 @@ BRepFill_Sweep::BRepFill_Sweep(const Handle(BRepFill_SectionLaw)& Section, //======================================================================= //function : Build -//purpose : Construt the result of sweeping +//purpose : Construct the result of sweeping //====================================================================== void BRepFill_Sweep::Build(TopTools_MapOfShape& ReversedEdges, BRepFill_DataMapOfShapeHArray2OfShape& Tapes, diff --git a/src/BRepFill/BRepFill_Sweep.hxx b/src/BRepFill/BRepFill_Sweep.hxx index 24979e63e6..67f8d127a2 100644 --- a/src/BRepFill/BRepFill_Sweep.hxx +++ b/src/BRepFill/BRepFill_Sweep.hxx @@ -64,7 +64,7 @@ public: //! Tolerance To controle Corner management. //! //! If the discontinuity is lesser than in radian The - //! Transition Performed will be alway "Modified" + //! Transition Performed will be always "Modified" Standard_EXPORT void SetAngularControl (const Standard_Real AngleMin = 0.01, const Standard_Real AngleMax = 6.0); //! Set the flag that indicates attempt to approximate @@ -72,13 +72,13 @@ public: //! to be C0. Standard_EXPORT void SetForceApproxC1 (const Standard_Boolean ForceApproxC1); - //! Build the Sweep Surface + //! Build the Sweep Surface //! Transition define Transition strategy //! Approx define Approximation Strategy //! - GeomFill_Section : The composed Function Location X Section //! is directly approximated. //! - GeomFill_Location : The location law is approximated, and the - //! SweepSurface is bulid algebric composition + //! SweepSurface builds an algebraic composition //! of approximated location law and section law //! This option is Ok, if Section.Surface() methode //! is effective. diff --git a/src/BRepOffsetAPI/BRepOffsetAPI_FindContigousEdges.hxx b/src/BRepOffsetAPI/BRepOffsetAPI_FindContigousEdges.hxx index 6612755ef0..4e8845e6e6 100644 --- a/src/BRepOffsetAPI/BRepOffsetAPI_FindContigousEdges.hxx +++ b/src/BRepOffsetAPI/BRepOffsetAPI_FindContigousEdges.hxx @@ -37,7 +37,7 @@ class TopoDS_Edge; //! - define if necessary a new tolerance //! - set if necessary analysis of degenerated shapes off //! - add shapes to be controlled -> Add -//! - compute -> Perfom +//! - compute -> Perform //! - output couples of connected edges for control //! - output the problems if any class BRepOffsetAPI_FindContigousEdges diff --git a/src/BRepOffsetAPI/BRepOffsetAPI_MakeOffset.cxx b/src/BRepOffsetAPI/BRepOffsetAPI_MakeOffset.cxx index 9688969ada..6fbb5ac684 100644 --- a/src/BRepOffsetAPI/BRepOffsetAPI_MakeOffset.cxx +++ b/src/BRepOffsetAPI/BRepOffsetAPI_MakeOffset.cxx @@ -166,7 +166,7 @@ void BRepOffsetAPI_MakeOffset::Init(const GeomAbs_JoinType Join, //======================================================================= //function : SetApprox //purpose : Set approximation flag -// for convertion input contours into ones consisting of +// for conversion input contours into ones consisting of // 2D circular arcs and 2D linear segments only //======================================================================= diff --git a/src/BRepOffsetAPI/BRepOffsetAPI_MakeOffset.hxx b/src/BRepOffsetAPI/BRepOffsetAPI_MakeOffset.hxx index 42907bdcc6..bed453d778 100644 --- a/src/BRepOffsetAPI/BRepOffsetAPI_MakeOffset.hxx +++ b/src/BRepOffsetAPI/BRepOffsetAPI_MakeOffset.hxx @@ -64,7 +64,7 @@ public: Standard_EXPORT void Init (const GeomAbs_JoinType Join = GeomAbs_Arc, const Standard_Boolean IsOpenResult = Standard_False); //! Set approximation flag - //! for convertion input contours into ones consisting of + //! for conversion input contours into ones consisting of //! 2D circular arcs and 2D linear segments only. Standard_EXPORT void SetApprox (const Standard_Boolean ToApprox); diff --git a/src/BRepOffsetAPI/BRepOffsetAPI_MakeOffsetShape.hxx b/src/BRepOffsetAPI/BRepOffsetAPI_MakeOffsetShape.hxx index acb40eb6f1..58c7d7705e 100644 --- a/src/BRepOffsetAPI/BRepOffsetAPI_MakeOffsetShape.hxx +++ b/src/BRepOffsetAPI/BRepOffsetAPI_MakeOffsetShape.hxx @@ -114,7 +114,7 @@ public: const Standard_Boolean RemoveIntEdges = Standard_False, const Message_ProgressRange& theRange = Message_ProgressRange()); - //! Returns instance of the unrelying intersection / arc algorithm. + //! Returns instance of the underlying intersection / arc algorithm. Standard_EXPORT virtual const BRepOffset_MakeOffset& MakeOffset() const; //! Does nothing. diff --git a/src/BRepOffsetAPI/BRepOffsetAPI_MakePipeShell.hxx b/src/BRepOffsetAPI/BRepOffsetAPI_MakePipeShell.hxx index 4533640e4b..d3441e802d 100644 --- a/src/BRepOffsetAPI/BRepOffsetAPI_MakePipeShell.hxx +++ b/src/BRepOffsetAPI/BRepOffsetAPI_MakePipeShell.hxx @@ -112,7 +112,7 @@ public: //! along the path. //! Give section to sweep. //! Possibilities are : - //! - Give one or sevral section + //! - Give one or several section //! - Give one profile and an homotetic law. //! - Automatic compute of correspondence between spine, and section //! on the sweeped shape diff --git a/src/BRepTest/BRepTest_Fillet2DCommands.cxx b/src/BRepTest/BRepTest_Fillet2DCommands.cxx index 4761f4a451..43c2ae4329 100644 --- a/src/BRepTest/BRepTest_Fillet2DCommands.cxx +++ b/src/BRepTest/BRepTest_Fillet2DCommands.cxx @@ -306,7 +306,7 @@ static Standard_Integer fillet2d(Draw_Interpretor& di, Standard_Integer n, const Standard_Boolean status = algo.Perform(radius); if (!status) { - di << "Error: the algrithm failed."; + di << "Error: the algorithm failed."; return 1; } @@ -326,7 +326,7 @@ static Standard_Integer fillet2d(Draw_Interpretor& di, Standard_Integer n, const TopoDS_Edge fillet = algo.Result(common, M1, M2); if (fillet.IsNull()) { - di << "Error: the algrithm produced no result."; + di << "Error: the algorithm produced no result."; return 1; } @@ -403,7 +403,7 @@ static Standard_Integer chamfer2d(Draw_Interpretor& di, Standard_Integer n, cons TopoDS_Edge chamfer = algo.Result(M1, M2, length1, length2); if (chamfer.IsNull()) { - di << "Error: the algrithm produced no result."; + di << "Error: the algorithm produced no result."; return 1; } diff --git a/src/BSplCLib/BSplCLib_CurveComputation.gxx b/src/BSplCLib/BSplCLib_CurveComputation.gxx index e56b5df13c..e684cb56ad 100644 --- a/src/BSplCLib/BSplCLib_CurveComputation.gxx +++ b/src/BSplCLib/BSplCLib_CurveComputation.gxx @@ -1263,7 +1263,7 @@ void BSplCLib::MovePoint (const Standard_Real U, } } - // find a kk2 if symetriy + // find a kk2 if symmetry kk2 = kk1; i = kk1 - FirstNonZeroBsplineIndex + 2; if ((kk1+1) <= LastIndex) { diff --git a/src/BSplSLib/BSplSLib.cxx b/src/BSplSLib/BSplSLib.cxx index fdd070abf9..1b7f8222aa 100644 --- a/src/BSplSLib/BSplSLib.cxx +++ b/src/BSplSLib/BSplSLib.cxx @@ -2845,7 +2845,7 @@ void BSplSLib::MovePoint (const Standard_Real U, } } - // find a ukk2 if symetriy + // find a ukk2 if symmetry ukk2 = ukk1; i = ukk1 - UFirstNonZeroBsplineIndex + 2; if ((ukk1+1) <= ULastIndex) { @@ -2871,7 +2871,7 @@ void BSplSLib::MovePoint (const Standard_Real U, } } - // find a vkk2 if symetriy + // find a vkk2 if symmetry vkk2 = vkk1; j = vkk1 - VFirstNonZeroBsplineIndex + 2; if ((vkk1+1) <= VLastIndex) { diff --git a/src/Blend/Blend_AppFunction.hxx b/src/Blend/Blend_AppFunction.hxx index 5494ea4b92..d9e62a236b 100644 --- a/src/Blend/Blend_AppFunction.hxx +++ b/src/Blend/Blend_AppFunction.hxx @@ -115,7 +115,7 @@ public: //! Returns the point on the first support. Standard_EXPORT virtual const gp_Pnt& Pnt2() const = 0; - //! Returns if the section is rationnal + //! Returns if the section is rational Standard_EXPORT virtual Standard_Boolean IsRational() const = 0; //! Returns the length of the maximum section @@ -145,7 +145,7 @@ public: Standard_Integer& NbPoles2d) = 0; //! Returns the tolerance to reach in approximation - //! to respecte + //! to respect //! BoundTol error at the Boundary //! AngleTol tangent error at the Boundary //! SurfTol error inside the surface. diff --git a/src/Blend/Blend_CSFunction.hxx b/src/Blend/Blend_CSFunction.hxx index 07922ddeeb..06618ebc13 100644 --- a/src/Blend/Blend_CSFunction.hxx +++ b/src/Blend/Blend_CSFunction.hxx @@ -148,7 +148,7 @@ public: Standard_EXPORT virtual void GetShape (Standard_Integer& NbPoles, Standard_Integer& NbKnots, Standard_Integer& Degree, Standard_Integer& NbPoles2d) Standard_OVERRIDE = 0; //! Returns the tolerance to reach in approximation - //! to respecte + //! to respect //! BoundTol error at the Boundary //! AngleTol tangent error at the Boundary //! SurfTol error inside the surface. diff --git a/src/Blend/Blend_RstRstFunction.hxx b/src/Blend/Blend_RstRstFunction.hxx index b7f26346bd..54cfd91d36 100644 --- a/src/Blend/Blend_RstRstFunction.hxx +++ b/src/Blend/Blend_RstRstFunction.hxx @@ -156,7 +156,7 @@ public: //! but the values calculated can be senseless. Standard_EXPORT virtual Blend_DecrochStatus Decroch (const math_Vector& Sol, gp_Vec& NRst1, gp_Vec& TgRst1, gp_Vec& NRst2, gp_Vec& TgRst2) const = 0; - //! Returns if the section is rationnal + //! Returns if the section is rational Standard_EXPORT virtual Standard_Boolean IsRational() const = 0; //! Returns the length of the maximum section @@ -180,7 +180,7 @@ public: Standard_EXPORT virtual void GetShape (Standard_Integer& NbPoles, Standard_Integer& NbKnots, Standard_Integer& Degree, Standard_Integer& NbPoles2d) = 0; //! Returns the tolerance to reach in approximation - //! to respecte + //! to respect //! BoundTol error at the Boundary //! AngleTol tangent error at the Boundary //! SurfTol error inside the surface. diff --git a/src/Blend/Blend_SurfRstFunction.hxx b/src/Blend/Blend_SurfRstFunction.hxx index f6cf7a9e1e..6b152a61b7 100644 --- a/src/Blend/Blend_SurfRstFunction.hxx +++ b/src/Blend/Blend_SurfRstFunction.hxx @@ -150,7 +150,7 @@ public: //! specific to the function. Standard_EXPORT virtual Standard_Boolean Decroch (const math_Vector& Sol, gp_Vec& NS, gp_Vec& TgS) const = 0; - //! Returns if the section is rationnal + //! Returns if the section is rational Standard_EXPORT virtual Standard_Boolean IsRational() const = 0; //! Returns the length of the maximum section @@ -174,7 +174,7 @@ public: Standard_EXPORT virtual void GetShape (Standard_Integer& NbPoles, Standard_Integer& NbKnots, Standard_Integer& Degree, Standard_Integer& NbPoles2d) = 0; //! Returns the tolerance to reach in approximation - //! to respecte + //! to respect //! BoundTol error at the Boundary //! AngleTol tangent error at the Boundary //! SurfTol error inside the surface. diff --git a/src/BlendFunc/BlendFunc_CSCircular.hxx b/src/BlendFunc/BlendFunc_CSCircular.hxx index a5c7f800de..7b95738b74 100644 --- a/src/BlendFunc/BlendFunc_CSCircular.hxx +++ b/src/BlendFunc/BlendFunc_CSCircular.hxx @@ -116,7 +116,7 @@ public: Standard_EXPORT void Set (const Standard_Real Radius, const Standard_Integer Choix); - //! Sets the type of section generation for the + //! Sets the type of section generation for the //! approximations. Standard_EXPORT void Set (const BlendFunc_SectionShape TypeSection); @@ -129,7 +129,7 @@ public: Standard_EXPORT Standard_Boolean GetSection (const Standard_Real Param, const Standard_Real U, const Standard_Real V, const Standard_Real W, TColgp_Array1OfPnt& tabP, TColgp_Array1OfVec& tabV); - //! Returns if the section is rationnal + //! Returns if the section is rational Standard_EXPORT Standard_Boolean IsRational() const Standard_OVERRIDE; //! Returns the length of the maximum section @@ -143,7 +143,7 @@ public: //! . May be one if Continuity(me) >= Standard_EXPORT Standard_Integer NbIntervals (const GeomAbs_Shape S) const Standard_OVERRIDE; - //! Stores in the parameters bounding the intervals + //! Stores in the parameters bounding the intervals //! of continuity . //! //! The array must provide enough room to accommodate @@ -155,7 +155,7 @@ public: Standard_EXPORT void GetShape (Standard_Integer& NbPoles, Standard_Integer& NbKnots, Standard_Integer& Degree, Standard_Integer& NbPoles2d) Standard_OVERRIDE; //! Returns the tolerance to reach in approximation - //! to respecte + //! to respect //! BoundTol error at the Boundary //! AngleTol tangent error at the Boundary //! SurfTol error inside the surface. diff --git a/src/BlendFunc/BlendFunc_CSConstRad.hxx b/src/BlendFunc/BlendFunc_CSConstRad.hxx index 24ca3f43d1..8dc381fa0d 100644 --- a/src/BlendFunc/BlendFunc_CSConstRad.hxx +++ b/src/BlendFunc/BlendFunc_CSConstRad.hxx @@ -117,7 +117,7 @@ public: Standard_EXPORT Standard_Boolean GetSection (const Standard_Real Param, const Standard_Real U, const Standard_Real V, const Standard_Real W, TColgp_Array1OfPnt& tabP, TColgp_Array1OfVec& tabV); - //! Returns if the section is rationnal + //! Returns if the section is rational Standard_EXPORT Standard_Boolean IsRational() const Standard_OVERRIDE; //! Returns the length of the maximum section @@ -142,7 +142,7 @@ public: Standard_EXPORT void GetShape (Standard_Integer& NbPoles, Standard_Integer& NbKnots, Standard_Integer& Degree, Standard_Integer& NbPoles2d) Standard_OVERRIDE; //! Returns the tolerance to reach in approximation - //! to respecte + //! to respect //! BoundTol error at the Boundary //! AngleTol tangent error at the Boundary //! SurfTol error inside the surface. diff --git a/src/BlendFunc/BlendFunc_ChAsym.hxx b/src/BlendFunc/BlendFunc_ChAsym.hxx index aeb6ec0c8c..ff14a47ef3 100644 --- a/src/BlendFunc/BlendFunc_ChAsym.hxx +++ b/src/BlendFunc/BlendFunc_ChAsym.hxx @@ -111,7 +111,7 @@ public: //! Utile pour une visu rapide et approximative de la surface. Standard_EXPORT void Section (const Standard_Real Param, const Standard_Real U1, const Standard_Real V1, const Standard_Real U2, const Standard_Real V2, Standard_Real& Pdeb, Standard_Real& Pfin, gp_Lin& C); - //! Returns if the section is rationnal + //! Returns if the section is rational Standard_EXPORT Standard_Boolean IsRational() const Standard_OVERRIDE; //! Returns the length of the maximum section @@ -135,7 +135,7 @@ public: Standard_EXPORT void GetShape (Standard_Integer& NbPoles, Standard_Integer& NbKnots, Standard_Integer& Degree, Standard_Integer& NbPoles2d) Standard_OVERRIDE; //! Returns the tolerance to reach in approximation - //! to respecte + //! to respect //! BoundTol error at the Boundary //! AngleTol tangent error at the Boundary //! SurfTol error inside the surface. diff --git a/src/BlendFunc/BlendFunc_ConstRad.cxx b/src/BlendFunc/BlendFunc_ConstRad.cxx index 91b0fb5a73..6ebbe6fd15 100644 --- a/src/BlendFunc/BlendFunc_ConstRad.cxx +++ b/src/BlendFunc/BlendFunc_ConstRad.cxx @@ -62,7 +62,7 @@ BlendFunc_ConstRad::BlendFunc_ConstRad(const Handle(Adaptor3d_Surface)& S1, distmin(RealLast()), mySShape(BlendFunc_Rational) { -// Initialisaton of cash control variables. +// Initialisation of cash control variables. tval = -9.876e100; xval.Init(-9.876e100); myXOrder = -1; diff --git a/src/BlendFunc/BlendFunc_ConstRad.hxx b/src/BlendFunc/BlendFunc_ConstRad.hxx index 668468a74e..332dd4d6d8 100644 --- a/src/BlendFunc/BlendFunc_ConstRad.hxx +++ b/src/BlendFunc/BlendFunc_ConstRad.hxx @@ -116,7 +116,7 @@ public: //! Utile pour une visu rapide et approximative de la surface. Standard_EXPORT void Section (const Standard_Real Param, const Standard_Real U1, const Standard_Real V1, const Standard_Real U2, const Standard_Real V2, Standard_Real& Pdeb, Standard_Real& Pfin, gp_Circ& C); - //! Returns if the section is rationnal + //! Returns if the section is rational Standard_EXPORT Standard_Boolean IsRational() const Standard_OVERRIDE; //! Returns the length of the maximum section @@ -140,7 +140,7 @@ public: Standard_EXPORT void GetShape (Standard_Integer& NbPoles, Standard_Integer& NbKnots, Standard_Integer& Degree, Standard_Integer& NbPoles2d) Standard_OVERRIDE; //! Returns the tolerance to reach in approximation - //! to respecte + //! to respect //! BoundTol error at the Boundary //! AngleTol tangent error at the Boundary //! SurfTol error inside the surface. diff --git a/src/BlendFunc/BlendFunc_EvolRad.hxx b/src/BlendFunc/BlendFunc_EvolRad.hxx index 16fe6d82dd..c59558165b 100644 --- a/src/BlendFunc/BlendFunc_EvolRad.hxx +++ b/src/BlendFunc/BlendFunc_EvolRad.hxx @@ -108,14 +108,14 @@ public: Standard_EXPORT void Set (const Standard_Integer Choix); - //! Sets the type of section generation for the + //! Sets the type of section generation for the //! approximations. Standard_EXPORT void Set (const BlendFunc_SectionShape TypeSection); //! Method for graphic traces Standard_EXPORT void Section (const Standard_Real Param, const Standard_Real U1, const Standard_Real V1, const Standard_Real U2, const Standard_Real V2, Standard_Real& Pdeb, Standard_Real& Pfin, gp_Circ& C); - //! Returns if the section is rationnal + //! Returns if the section is rational Standard_EXPORT Standard_Boolean IsRational() const Standard_OVERRIDE; //! Returns the length of the maximum section @@ -139,7 +139,7 @@ public: Standard_EXPORT void GetShape (Standard_Integer& NbPoles, Standard_Integer& NbKnots, Standard_Integer& Degree, Standard_Integer& NbPoles2d) Standard_OVERRIDE; //! Returns the tolerance to reach in approximation - //! to respecte + //! to respect //! BoundTol error at the Boundary //! AngleTol tangent error at the Boundary //! SurfTol error inside the surface. diff --git a/src/BlendFunc/BlendFunc_GenChamfer.hxx b/src/BlendFunc/BlendFunc_GenChamfer.hxx index 79d5f3fadb..99bd130a73 100644 --- a/src/BlendFunc/BlendFunc_GenChamfer.hxx +++ b/src/BlendFunc/BlendFunc_GenChamfer.hxx @@ -105,7 +105,7 @@ public: Standard_Integer& NbPoles2d) Standard_OVERRIDE; //! Returns the tolerance to reach in approximation - //! to respecte + //! to respect //! BoundTol error at the Boundary //! AngleTol tangent error at the Boundary //! SurfTol error inside the surface. diff --git a/src/BlendFunc/BlendFunc_Ruled.hxx b/src/BlendFunc/BlendFunc_Ruled.hxx index b0e8d56356..9293ea161c 100644 --- a/src/BlendFunc/BlendFunc_Ruled.hxx +++ b/src/BlendFunc/BlendFunc_Ruled.hxx @@ -127,7 +127,7 @@ public: Standard_EXPORT void GetShape (Standard_Integer& NbPoles, Standard_Integer& NbKnots, Standard_Integer& Degree, Standard_Integer& NbPoles2d) Standard_OVERRIDE; //! Returns the tolerance to reach in approximation - //! to respecte + //! to respect //! BoundTol error at the Boundary //! AngleTol tangent error at the Boundary //! SurfTol error inside the surface. diff --git a/src/Extrema/Extrema_ExtCS.hxx b/src/Extrema/Extrema_ExtCS.hxx index d9110ec5a1..55b34a2663 100644 --- a/src/Extrema/Extrema_ExtCS.hxx +++ b/src/Extrema/Extrema_ExtCS.hxx @@ -60,7 +60,7 @@ public: Standard_EXPORT void Initialize (const Adaptor3d_Surface& S, const Standard_Real Uinf, const Standard_Real Usup, const Standard_Real Vinf, const Standard_Real Vsup, const Standard_Real TolC, const Standard_Real TolS); //! Computes the distances. - //! An exception is raised if the fieds have not been + //! An exception is raised if the fields have not been //! initialized. Standard_EXPORT void Perform (const Adaptor3d_Curve& C, const Standard_Real Uinf, const Standard_Real Usup); diff --git a/src/Extrema/Extrema_ExtPS.hxx b/src/Extrema/Extrema_ExtPS.hxx index 60c9aadade..b2359c2574 100644 --- a/src/Extrema/Extrema_ExtPS.hxx +++ b/src/Extrema/Extrema_ExtPS.hxx @@ -72,7 +72,7 @@ public: Standard_EXPORT void Initialize (const Adaptor3d_Surface& S, const Standard_Real Uinf, const Standard_Real Usup, const Standard_Real Vinf, const Standard_Real Vsup, const Standard_Real TolU, const Standard_Real TolV); //! Computes the distances. - //! An exception is raised if the fieds have not been + //! An exception is raised if the fields have not been //! initialized. Standard_EXPORT void Perform (const gp_Pnt& P); diff --git a/src/Extrema/Extrema_ExtSS.hxx b/src/Extrema/Extrema_ExtSS.hxx index 5ec6f7c5fe..968b23dbe6 100644 --- a/src/Extrema/Extrema_ExtSS.hxx +++ b/src/Extrema/Extrema_ExtSS.hxx @@ -51,7 +51,7 @@ public: Standard_EXPORT void Initialize (const Adaptor3d_Surface& S2, const Standard_Real Uinf2, const Standard_Real Usup2, const Standard_Real Vinf2, const Standard_Real Vsup2, const Standard_Real TolS1); //! Computes the distances. - //! An exception is raised if the fieds have not been + //! An exception is raised if the fields have not been //! initialized. Standard_EXPORT void Perform (const Adaptor3d_Surface& S1, const Standard_Real Uinf1, const Standard_Real Usup1, const Standard_Real Vinf1, const Standard_Real Vsup1, const Standard_Real TolS1); diff --git a/src/FairCurve/FairCurve_Energy.hxx b/src/FairCurve/FairCurve_Energy.hxx index 6efdfd8f7a..aaa74bf473 100644 --- a/src/FairCurve/FairCurve_Energy.hxx +++ b/src/FairCurve/FairCurve_Energy.hxx @@ -77,7 +77,7 @@ public: protected: - //! Angles corresspond to the Ox axis + //! Angles correspond to the Ox axis //! ConstrOrder1(2) can be equal to 0, 1 or 2 Standard_EXPORT FairCurve_Energy(const Handle(TColgp_HArray1OfPnt2d)& Poles, const Standard_Integer ConstrOrder1, const Standard_Integer ConstrOrder2, const Standard_Boolean WithAuxValue = Standard_False, const Standard_Real Angle1 = 0, const Standard_Real Angle2 = 0, const Standard_Integer Degree = 2, const Standard_Real Curvature1 = 0, const Standard_Real Curvature2 = 0); @@ -92,13 +92,13 @@ protected: Standard_Integer Indice (const Standard_Integer i, const Standard_Integer j) const; - //! compute the pole which depend of variables and G1 constraint + //! compute the pole which depend of variables and G1 constraint Standard_EXPORT void ComputePolesG1 (const Standard_Integer Side, const Standard_Real Lambda, const gp_Pnt2d& P1, gp_Pnt2d& P2) const; - //! compute the pole which depend of variables and G2 constraint + //! compute the pole which depend of variables and G2 constraint Standard_EXPORT void ComputePolesG2 (const Standard_Integer Side, const Standard_Real Lambda, const Standard_Real Rho, const gp_Pnt2d& P1, gp_Pnt2d& P2) const; - //! compute the energy (and derivatives) in intermediat format + //! compute the energy (and derivatives) in intermediate format Standard_EXPORT virtual Standard_Boolean Compute (const Standard_Integer DerivativeOrder, math_Vector& Result) = 0; diff --git a/src/FairCurve/FairCurve_EnergyOfBatten.hxx b/src/FairCurve/FairCurve_EnergyOfBatten.hxx index cb9b5ea3e4..d660da09d3 100644 --- a/src/FairCurve/FairCurve_EnergyOfBatten.hxx +++ b/src/FairCurve/FairCurve_EnergyOfBatten.hxx @@ -45,7 +45,7 @@ public: DEFINE_STANDARD_ALLOC - //! Angles corresspond to the Ox axis + //! Angles correspond to the Ox axis Standard_EXPORT FairCurve_EnergyOfBatten(const Standard_Integer BSplOrder, const Handle(TColStd_HArray1OfReal)& FlatKnots, const Handle(TColgp_HArray1OfPnt2d)& Poles, const Standard_Integer ContrOrder1, const Standard_Integer ContrOrder2, const FairCurve_BattenLaw& Law, const Standard_Real LengthSliding, const Standard_Boolean FreeSliding = Standard_True, const Standard_Real Angle1 = 0, const Standard_Real Angle2 = 0); //! return the lengthSliding = P1P2 + Sliding @@ -66,7 +66,7 @@ protected: //! compute the poles which correspond with the variable X Standard_EXPORT virtual void ComputePoles (const math_Vector& X) Standard_OVERRIDE; - //! compute the energy in intermediat format + //! compute the energy in intermediate format Standard_EXPORT virtual Standard_Boolean Compute (const Standard_Integer DerivativeOrder, math_Vector& Result) Standard_OVERRIDE; diff --git a/src/FairCurve/FairCurve_EnergyOfMVC.hxx b/src/FairCurve/FairCurve_EnergyOfMVC.hxx index 85e5519299..0bd06008d9 100644 --- a/src/FairCurve/FairCurve_EnergyOfMVC.hxx +++ b/src/FairCurve/FairCurve_EnergyOfMVC.hxx @@ -45,7 +45,7 @@ public: DEFINE_STANDARD_ALLOC - //! Angles corresspond to the Ox axis + //! Angles correspond to the Ox axis Standard_EXPORT FairCurve_EnergyOfMVC(const Standard_Integer BSplOrder, const Handle(TColStd_HArray1OfReal)& FlatKnots, const Handle(TColgp_HArray1OfPnt2d)& Poles, const Standard_Integer ContrOrder1, const Standard_Integer ContrOrder2, const FairCurve_BattenLaw& Law, const Standard_Real PhysicalRatio, const Standard_Real LengthSliding, const Standard_Boolean FreeSliding = Standard_True, const Standard_Real Angle1 = 0, const Standard_Real Angle2 = 0, const Standard_Real Curvature1 = 0, const Standard_Real Curvature2 = 0); //! return the lengthSliding = P1P2 + Sliding @@ -63,10 +63,10 @@ public: protected: - //! compute the poles which correspond with the variable X + //! compute the poles which correspond with the variable X Standard_EXPORT virtual void ComputePoles (const math_Vector& X) Standard_OVERRIDE; - //! compute the energy in intermediat format + //! compute the energy in intermediate format Standard_EXPORT virtual Standard_Boolean Compute (const Standard_Integer DerivativeOrder, math_Vector& Result) Standard_OVERRIDE; diff --git a/src/Geom2dConvert/Geom2dConvert.cxx b/src/Geom2dConvert/Geom2dConvert.cxx index a120df013b..2c889a2baf 100644 --- a/src/Geom2dConvert/Geom2dConvert.cxx +++ b/src/Geom2dConvert/Geom2dConvert.cxx @@ -598,7 +598,7 @@ static void Pretreatment(TColGeom2d_Array1OfBSplineCurve& tab) //======================================================================= //function : NeedToBeTreated -//purpose : Say if the BSpline is rationnal and if the two first and two +//purpose : Say if the BSpline is rational and if the two first and two // last weigths are different //======================================================================= diff --git a/src/GeomConvert/GeomConvert.cxx b/src/GeomConvert/GeomConvert.cxx index 1505342883..e92e4904df 100644 --- a/src/GeomConvert/GeomConvert.cxx +++ b/src/GeomConvert/GeomConvert.cxx @@ -616,7 +616,7 @@ static void Pretreatment(TColGeom_Array1OfBSplineCurve& tab) //======================================================================= //function : NeedToBeTreated -//purpose : Say if the BSpline is rationnal and if the two first and two +//purpose : Say if the BSpline is rational and if the two first and two // last weigths are different //======================================================================= diff --git a/src/GeomFill/GeomFill_CircularBlendFunc.hxx b/src/GeomFill/GeomFill_CircularBlendFunc.hxx index 015d3edbeb..a3ea392667 100644 --- a/src/GeomFill/GeomFill_CircularBlendFunc.hxx +++ b/src/GeomFill/GeomFill_CircularBlendFunc.hxx @@ -79,7 +79,7 @@ public: //! get the Multplicities of the section Standard_EXPORT virtual void Mults (TColStd_Array1OfInteger& TMults) const Standard_OVERRIDE; - //! Returns if the section is rationnal or not + //! Returns if the section is rational or not Standard_EXPORT virtual Standard_Boolean IsRational() const Standard_OVERRIDE; //! Returns the number of intervals for continuity @@ -100,7 +100,7 @@ public: Standard_EXPORT virtual void SetInterval (const Standard_Real First, const Standard_Real Last) Standard_OVERRIDE; //! Returns the tolerance to reach in approximation - //! to respecte + //! to respect //! BoundTol error at the Boundary //! AngleTol tangent error at the Boundary (in radian) //! SurfTol error inside the surface. diff --git a/src/GeomFill/GeomFill_EvolvedSection.hxx b/src/GeomFill/GeomFill_EvolvedSection.hxx index 71e48bac87..ad735004e0 100644 --- a/src/GeomFill/GeomFill_EvolvedSection.hxx +++ b/src/GeomFill/GeomFill_EvolvedSection.hxx @@ -74,7 +74,7 @@ public: //! get the Multplicities of the section Standard_EXPORT virtual void Mults (TColStd_Array1OfInteger& TMults) const Standard_OVERRIDE; - //! Returns if the sections are rationnal or not + //! Returns if the sections are rational or not Standard_EXPORT virtual Standard_Boolean IsRational() const Standard_OVERRIDE; //! Returns if the sections are periodic or not diff --git a/src/GeomFill/GeomFill_NSections.hxx b/src/GeomFill/GeomFill_NSections.hxx index b5dc687b48..00fe3f05ad 100644 --- a/src/GeomFill/GeomFill_NSections.hxx +++ b/src/GeomFill/GeomFill_NSections.hxx @@ -100,7 +100,7 @@ public: //! get the Multplicities of the section Standard_EXPORT virtual void Mults (TColStd_Array1OfInteger& TMults) const Standard_OVERRIDE; - //! Returns if the sections are rationnal or not + //! Returns if the sections are rational or not Standard_EXPORT virtual Standard_Boolean IsRational() const Standard_OVERRIDE; //! Returns if the sections are periodic or not diff --git a/src/GeomFill/GeomFill_SectionLaw.hxx b/src/GeomFill/GeomFill_SectionLaw.hxx index dec90fb964..3c8a149efd 100644 --- a/src/GeomFill/GeomFill_SectionLaw.hxx +++ b/src/GeomFill/GeomFill_SectionLaw.hxx @@ -69,7 +69,7 @@ public: //! get the Multplicities of the section Standard_EXPORT virtual void Mults (TColStd_Array1OfInteger& TMults) const = 0; - //! Returns if the sections are rationnal or not + //! Returns if the sections are rational or not Standard_EXPORT virtual Standard_Boolean IsRational() const = 0; //! Returns if the sections are periodic or not diff --git a/src/GeomFill/GeomFill_SweepFunction.hxx b/src/GeomFill/GeomFill_SweepFunction.hxx index 2cbc23692c..12f96812dd 100644 --- a/src/GeomFill/GeomFill_SweepFunction.hxx +++ b/src/GeomFill/GeomFill_SweepFunction.hxx @@ -99,7 +99,7 @@ public: Standard_EXPORT virtual void Resolution (const Standard_Integer Index, const Standard_Real Tol, Standard_Real& TolU, Standard_Real& TolV) const Standard_OVERRIDE; //! Returns the tolerance to reach in approximation - //! to respecte + //! to respect //! BoundTol error at the Boundary //! AngleTol tangent error at the Boundary (in radian) //! SurfTol error inside the surface. diff --git a/src/GeomFill/GeomFill_UniformSection.hxx b/src/GeomFill/GeomFill_UniformSection.hxx index 8b33e2efe7..c9c2410638 100644 --- a/src/GeomFill/GeomFill_UniformSection.hxx +++ b/src/GeomFill/GeomFill_UniformSection.hxx @@ -74,7 +74,7 @@ public: //! get the Multplicities of the section Standard_EXPORT virtual void Mults (TColStd_Array1OfInteger& TMults) const Standard_OVERRIDE; - //! Returns if the sections are rationnal or not + //! Returns if the sections are rational or not Standard_EXPORT virtual Standard_Boolean IsRational() const Standard_OVERRIDE; //! Returns if the sections are periodic or not diff --git a/src/GeomLib/GeomLib.cxx b/src/GeomLib/GeomLib.cxx index d6d120129c..f4767e7085 100644 --- a/src/GeomLib/GeomLib.cxx +++ b/src/GeomLib/GeomLib.cxx @@ -1985,7 +1985,7 @@ void GeomLib::AxeOfInertia(const TColgp_Array1OfPnt& Points, //function : CanBeTreated //purpose : indicates if the surface can be treated(if the conditions are // filled) and need to be treated(if the surface hasn't been yet -// treated or if the surface is rationnal and non periodic) +// treated or if the surface is rational and non periodic) //======================================================================= static Standard_Boolean CanBeTreated(Handle(Geom_BSplineSurface)& BSurf) diff --git a/src/GeomPlate/GeomPlate_BuildAveragePlane.hxx b/src/GeomPlate/GeomPlate_BuildAveragePlane.hxx index 0a27e51848..d8afdcf48f 100644 --- a/src/GeomPlate/GeomPlate_BuildAveragePlane.hxx +++ b/src/GeomPlate/GeomPlate_BuildAveragePlane.hxx @@ -42,9 +42,9 @@ public: DEFINE_STANDARD_ALLOC - //! Tol is a Tolerance to make the difference between + //! Tol is a Tolerance to make the difference between //! the result plane and the result line. - //! if POption = 1 : automatical parametrisation + //! if POption = 1 : automatic parametrisation //! if POption = 2 : parametrisation by eigen vectors //! if NOption = 1 : the average plane is the inertial plane. //! if NOption = 2 : the average plane is the plane of max. flux. diff --git a/src/GeomPlate/GeomPlate_BuildPlateSurface.cxx b/src/GeomPlate/GeomPlate_BuildPlateSurface.cxx index 9f018a8a4d..c06b14d026 100644 --- a/src/GeomPlate/GeomPlate_BuildPlateSurface.cxx +++ b/src/GeomPlate/GeomPlate_BuildPlateSurface.cxx @@ -1986,7 +1986,7 @@ Intersect(Handle(GeomPlate_HArray1OfSequenceOfReal)& PntInter, // the table of sequences Parcont contains all // parameter of points on curves // Field myPlateCont contains parameter of points on a plate; -// it excludes duplicate points and imcompatible zones. +// it excludes duplicate points and incompatible zones. // The first part corresponds to verification of compatibility // and to removal of duplicate points. //--------------------------------------------------------- diff --git a/src/IntCurveSurface/IntCurveSurface_Inter.gxx b/src/IntCurveSurface/IntCurveSurface_Inter.gxx index 3624a2f857..b03ded458d 100644 --- a/src/IntCurveSurface/IntCurveSurface_Inter.gxx +++ b/src/IntCurveSurface/IntCurveSurface_Inter.gxx @@ -1842,7 +1842,7 @@ void EstLimForInfRevl(const gp_Lin& Line, gp_Pln aPlnPrp = aPln.Rotated (gp_Ax1 (O,aXVec), M_PI/2.); // project Line and it's X-axe symmetric one to plane and intersect - // resulting curve with projection of Basic Curev + // resulting curve with projection of Basic Curve Standard_Real aVmin = RealLast(), aVmax = -aVmin; Standard_Boolean aNoInt1 = Standard_False, aNoInt2 = Standard_False; ProjectIntersectAndEstLim (Line, aPln, aBasCurvProj, aVmin, aVmax, aNoInt1); diff --git a/src/IntWalk/IntWalk_IWalking_5.gxx b/src/IntWalk/IntWalk_IWalking_5.gxx index ebc381f547..2d5cf5e10e 100644 --- a/src/IntWalk/IntWalk_IWalking_5.gxx +++ b/src/IntWalk/IntWalk_IWalking_5.gxx @@ -239,7 +239,7 @@ IntWalk_StatusDeflection IntWalk_IWalking::TestDeflection // the norm (square) of 3.*lambda (d1 - d4)/8. // either the norm of : // 3.*(Sqrt(Norme)/3.)*StepSign*(d1-d4)/8. - // which produces, takin the square : + // which produces, taking the square : // Norme * (d1-d4).SquareMagnitude()/64. Standard_Real FlecheCourante = diff --git a/src/OSD/OSD.cxx b/src/OSD/OSD.cxx index a2fbb7d05b..2f47bf71a5 100644 --- a/src/OSD/OSD.cxx +++ b/src/OSD/OSD.cxx @@ -28,7 +28,7 @@ Standard_Boolean OSD::RealToCString(const Standard_Real aReal, if (Sprintf(aString,"%.17e",aReal) <= 0) //BUC60808 return Standard_False ; - // Suppress "e+00" and unsignificant 0's + // Suppress "e+00" and insignificant 0's p = strchr(aString,'e'); if (p) { diff --git a/src/OSD/OSD_Error.cxx b/src/OSD/OSD_Error.cxx index 89c1b35108..22277616f8 100755 --- a/src/OSD/OSD_Error.cxx +++ b/src/OSD/OSD_Error.cxx @@ -315,7 +315,7 @@ void OSD_Error::Perror() { } break; case EINTR: - buffer += "operation breaked by a signal"; + buffer += "operation broken by a signal"; extCode = ERR_INTR; break; case ENOMEM: diff --git a/src/PrsDim/PrsDim.hxx b/src/PrsDim/PrsDim.hxx index 4a98ab75bc..1d5da30dd1 100644 --- a/src/PrsDim/PrsDim.hxx +++ b/src/PrsDim/PrsDim.hxx @@ -105,7 +105,7 @@ public: Standard_EXPORT static Standard_Boolean ComputeGeometry (const TopoDS_Vertex& aVertex, gp_Pnt& point, const Handle(Geom_Plane)& aPlane, Standard_Boolean& isOnPlane); - //! Tryes to get Plane from Face. Returns Surface of Face + //! Tries to get Plane from Face. Returns Surface of Face //! in aSurf. Returns Standard_True and Plane of Face in //! aPlane in following cases: //! Face is Plane, Offset of Plane, diff --git a/src/PrsDim/PrsDim_AngleDimension.cxx b/src/PrsDim/PrsDim_AngleDimension.cxx index 8d480a9686..ed0d9e0ab1 100644 --- a/src/PrsDim/PrsDim_AngleDimension.cxx +++ b/src/PrsDim/PrsDim_AngleDimension.cxx @@ -502,7 +502,7 @@ void PrsDim_AngleDimension::DrawArcWithText (const Handle(Prs3d_Presentation)& t if (isLineBreak) { - // compute gap for label as parameteric size of sector on circle segment + // compute gap for label as parametric size of sector on circle segment Standard_Real aSectorOfText = theTextWidth / aRadius; Standard_Real aTextBegin = aParamMid - aSectorOfText * 0.5; Standard_Real aTextEnd = aParamMid + aSectorOfText * 0.5; diff --git a/src/PrsDim/PrsDim_DiameterDimension.hxx b/src/PrsDim/PrsDim_DiameterDimension.hxx index 04a1370416..a062a982e1 100644 --- a/src/PrsDim/PrsDim_DiameterDimension.hxx +++ b/src/PrsDim/PrsDim_DiameterDimension.hxx @@ -31,7 +31,7 @@ DEFINE_STANDARD_HANDLE(PrsDim_DiameterDimension, PrsDim_Dimension) //! - On generic circle in the specified plane. //! - On generic shape containing geometry that can be measured //! by diameter dimension: circle wire, circular face, etc. -//! The anchor point is the location of the left attachement point of +//! The anchor point is the location of the left attachment point of //! dimension on the circle. //! The anchor point computation is processed after dimension plane setting //! so that positive flyout direction stands with normal of the circle and diff --git a/src/PrsDim/PrsDim_Dimension.cxx b/src/PrsDim/PrsDim_Dimension.cxx index ca11eccfaa..be3e013c78 100644 --- a/src/PrsDim/PrsDim_Dimension.cxx +++ b/src/PrsDim/PrsDim_Dimension.cxx @@ -440,7 +440,7 @@ void PrsDim_Dimension::drawText (const Handle(Prs3d_Presentation)& thePresentati aTextWidth += aFont.AdvanceX (aCurrChar, aNextChar); } - // formating text position in XOY plane + // formatting text position in XOY plane Standard_Integer aHLabelPos = theLabelPosition & LabelPosition_HMask; Standard_Integer aVLabelPos = theLabelPosition & LabelPosition_VMask; diff --git a/src/PrsDim/PrsDim_IdenticRelation.cxx b/src/PrsDim/PrsDim_IdenticRelation.cxx index abdd768f77..9d64752e6d 100644 --- a/src/PrsDim/PrsDim_IdenticRelation.cxx +++ b/src/PrsDim/PrsDim_IdenticRelation.cxx @@ -362,7 +362,7 @@ void PrsDim_IdenticRelation::ComputeSelection(const Handle(SelectMgr_Selection)& Handle(SelectMgr_EntityOwner) own = new SelectMgr_EntityOwner(this,7); Handle(Select3D_SensitiveSegment) seg; - // attachement point of the segment linking position to the curve + // attachment point of the segment linking position to the curve gp_Pnt attach; Standard_Real confusion (Precision::Confusion()); @@ -437,7 +437,7 @@ void PrsDim_IdenticRelation::ComputeSelection(const Handle(SelectMgr_Selection)& // jfa 24/10/2000 end } - // Creation of the segment linking the attachement point with the + // Creation of the segment linking the attachment point with the // position if ( !attach.IsEqual(myPosition, confusion) ) { @@ -1424,7 +1424,7 @@ void PrsDim_IdenticRelation::ComputeTwoVerticesPresentation(const Handle(Prs3d_P return ; - // The attachement points are the points themselves that must be + // The attachment points are the points themselves that must be //identical myFAttach = BRep_Tool::Pnt(FVertex); mySAttach = myFAttach; @@ -1657,7 +1657,7 @@ void PrsDim_IdenticRelation::ComputeOneEdgeOVertexPresentation(const Handle(Prs3 if (numedge == 1) myExtShape = 2; else myExtShape = 1; } - // The attachement points are the point + // The attachment points are the point myFAttach = BRep_Tool::Pnt(V); mySAttach = myFAttach; diff --git a/src/PrsDim/PrsDim_LengthDimension.cxx b/src/PrsDim/PrsDim_LengthDimension.cxx index e0bb95b055..a3927d1a97 100644 --- a/src/PrsDim/PrsDim_LengthDimension.cxx +++ b/src/PrsDim/PrsDim_LengthDimension.cxx @@ -792,7 +792,7 @@ Standard_Boolean PrsDim_LengthDimension::InitTwoShapesPoints (const TopoDS_Shape //function : InitOneShapePoints //purpose : Initialization of two points where dimension layouts // will be attached -// Attention: 1) can be only the edge in currect implementation +// Attention: 1) can be only the edge in current implementation // 2) No length for infinite edge //======================================================================= Standard_Boolean PrsDim_LengthDimension::InitOneShapePoints (const TopoDS_Shape& theShape) diff --git a/src/PrsDim/PrsDim_RadiusDimension.hxx b/src/PrsDim/PrsDim_RadiusDimension.hxx index 1c9b8a2e76..08a37692b8 100644 --- a/src/PrsDim/PrsDim_RadiusDimension.hxx +++ b/src/PrsDim/PrsDim_RadiusDimension.hxx @@ -28,7 +28,7 @@ DEFINE_STANDARD_HANDLE(PrsDim_RadiusDimension, PrsDim_Dimension) //! - On generic circle with user-defined anchor point on that circle. //! - On generic shape containing geometry that can be measured //! by diameter dimension: circle wire, arc, circular face, etc. -//! The anchor point is the location of left attachement point of +//! The anchor point is the location of left attachment point of //! dimension on the circle. It can be user-specified, or computed as //! middle point on the arc. The radius dimension always lies in the //! plane of the measured circle. The dimension is considered as diff --git a/src/STEPConstruct/STEPConstruct.hxx b/src/STEPConstruct/STEPConstruct.hxx index d7219f72ef..e846c60fb2 100644 --- a/src/STEPConstruct/STEPConstruct.hxx +++ b/src/STEPConstruct/STEPConstruct.hxx @@ -46,7 +46,7 @@ public: //! Returns STEP entity of the (sub)type of RepresentationItem - //! which is a result of the tranalation of the Shape, or Null if + //! which is a result of the translation of the Shape, or Null if //! no result is recorded Standard_EXPORT static Handle(StepRepr_RepresentationItem) FindEntity (const Handle(Transfer_FinderProcess)& FinderProcess, const TopoDS_Shape& Shape); @@ -59,7 +59,7 @@ public: //! Returns Shape resulting from given STEP entity (Null if not mapped) Standard_EXPORT static TopoDS_Shape FindShape (const Handle(Transfer_TransientProcess)& TransientProcess, const Handle(StepRepr_RepresentationItem)& item); - //! Find CDSR correcponding to the component in the specified assembly + //! Find CDSR corresponding to the component in the specified assembly Standard_EXPORT static Standard_Boolean FindCDSR (const Handle(Transfer_Binder)& ComponentBinder, const Handle(StepShape_ShapeDefinitionRepresentation)& AssemblySDR, Handle(StepShape_ContextDependentShapeRepresentation)& ComponentCDSR); }; diff --git a/src/STEPConstruct/STEPConstruct_ExternRefs.cxx b/src/STEPConstruct/STEPConstruct_ExternRefs.cxx index 66f63ad566..b99d9a2a28 100644 --- a/src/STEPConstruct/STEPConstruct_ExternRefs.cxx +++ b/src/STEPConstruct/STEPConstruct_ExternRefs.cxx @@ -652,7 +652,7 @@ Standard_Integer STEPConstruct_ExternRefs::AddExternRef (const Standard_CString //Handle(StepBasic_ProductDefinitionWithAssociatedDocuments) PDWAD = // Handle(StepBasic_ProductDefinitionWithAssociatedDocuments)::DownCast(PD); - // searh in graph for replace + // search in graph for replace // Standard_Integer numProdDef; // Interface_EntityIterator subs = Graph().Shareds(SDR); // for (subs.Start(); subs.More(); subs.Next()) { @@ -832,7 +832,7 @@ Standard_Boolean STEPConstruct_ExternRefs::addAP214ExterRef (const Handle(StepAP // create new product definition formation Handle(StepBasic_ProductDefinitionFormation) PDF = new StepBasic_ProductDefinitionFormation; - // name id taked from example Standard_ExtString_ref_master.stp + // name id taken from example Standard_ExtString_ref_master.stp Handle(TCollection_HAsciiString) PDF_ID = new TCollection_HAsciiString("1"); PDF->Init( PDF_ID, EmptyString, Product ); diff --git a/src/STEPConstruct/STEPConstruct_ExternRefs.hxx b/src/STEPConstruct/STEPConstruct_ExternRefs.hxx index 3a9ba665bc..acef104565 100644 --- a/src/STEPConstruct/STEPConstruct_ExternRefs.hxx +++ b/src/STEPConstruct/STEPConstruct_ExternRefs.hxx @@ -116,7 +116,7 @@ public: protected: - //! Create a new additional structure entities and add ncessary references + //! Create a new additional structure entities and add necessary references //! Note: do not refer from ADR to DF directly in AP214 (TRJ11). Standard_EXPORT Standard_Boolean addAP214ExterRef (const Handle(StepAP214_AppliedDocumentReference)& ADR, const Handle(StepBasic_ProductDefinition)& PD, const Handle(StepBasic_DocumentFile)& DF, const Standard_CString filename); diff --git a/src/STEPConstruct/STEPConstruct_ValidationProps.hxx b/src/STEPConstruct/STEPConstruct_ValidationProps.hxx index bbbb8490c8..46f4d23f94 100644 --- a/src/STEPConstruct/STEPConstruct_ValidationProps.hxx +++ b/src/STEPConstruct/STEPConstruct_ValidationProps.hxx @@ -116,7 +116,7 @@ public: Standard_Boolean& isArea, const StepData_Factors& theLocalFactors = StepData_Factors()) const; - //! Returns value of Centriod property (or False if it is not) + //! Returns value of Centroid property (or False if it is not) Standard_EXPORT Standard_Boolean GetPropPnt (const Handle(StepRepr_RepresentationItem)& item, const Handle(StepRepr_RepresentationContext)& Context, gp_Pnt& Pnt, diff --git a/src/SelectMgr/SelectMgr_Selection.hxx b/src/SelectMgr/SelectMgr_Selection.hxx index 50210ad8a3..b9cfca4200 100644 --- a/src/SelectMgr/SelectMgr_Selection.hxx +++ b/src/SelectMgr/SelectMgr_Selection.hxx @@ -92,7 +92,7 @@ public: NCollection_Vector& ChangeEntities() { return myEntities; } //! Returns the flag UpdateFlag. - //! This flage gives the update status of this framework + //! This flag gives the update status of this framework //! in a ViewerSelector object: //! - full //! - partial, or diff --git a/src/SelectMgr/SelectMgr_ViewerSelector.hxx b/src/SelectMgr/SelectMgr_ViewerSelector.hxx index 4537080f63..e03792043e 100644 --- a/src/SelectMgr/SelectMgr_ViewerSelector.hxx +++ b/src/SelectMgr/SelectMgr_ViewerSelector.hxx @@ -269,7 +269,7 @@ public: //! Picks the sensitive entity according to the input axis. //! This is geometric intersection 3D objects by axis - //! (camera parameters are ignored and objects with transform persistance are skipped). + //! (camera parameters are ignored and objects with transform persistence are skipped). Standard_EXPORT void Pick (const gp_Ax1& theAxis, const Handle(V3d_View)& theView); diff --git a/src/ShapeUpgrade/ShapeUpgrade_ConvertCurve2dToBezier.cxx b/src/ShapeUpgrade/ShapeUpgrade_ConvertCurve2dToBezier.cxx index cf2aefafdd..29a3bb64d8 100644 --- a/src/ShapeUpgrade/ShapeUpgrade_ConvertCurve2dToBezier.cxx +++ b/src/ShapeUpgrade/ShapeUpgrade_ConvertCurve2dToBezier.cxx @@ -171,7 +171,7 @@ void ShapeUpgrade_ConvertCurve2dToBezier::Compute() mySplitValues->SetValue(mySplitValues->Length(),Last); } - // PTV 20.12.2001 Try to simpify BSpline Curve + // PTV 20.12.2001 Try to simplify BSpline Curve ShapeCustom_Curve2d::SimplifyBSpline2d (aBSpline2d, Precision::Approximation()); Geom2dConvert_BSplineCurveToBezierCurve tool(aBSpline2d,First,Last,precision); diff --git a/src/ShapeUpgrade/ShapeUpgrade_RemoveLocations.cxx b/src/ShapeUpgrade/ShapeUpgrade_RemoveLocations.cxx index d422ed9e46..1900053bcf 100644 --- a/src/ShapeUpgrade/ShapeUpgrade_RemoveLocations.cxx +++ b/src/ShapeUpgrade/ShapeUpgrade_RemoveLocations.cxx @@ -239,7 +239,7 @@ Standard_Boolean ShapeUpgrade_RemoveLocations::MakeNewShape(const TopoDS_Shape& } isDone = aRebuild; - //Removing location from sub-shapes in dependance of LevelRemoving and re-building shape. + //Removing location from sub-shapes in dependence of LevelRemoving and re-building shape. if(!isBound) { if(!aRebuild) diff --git a/src/Standard/Standard_Dump.hxx b/src/Standard/Standard_Dump.hxx index c8f2d6facc..602b0bdeca 100644 --- a/src/Standard/Standard_Dump.hxx +++ b/src/Standard/Standard_Dump.hxx @@ -432,7 +432,7 @@ private: NCollection_IndexedDataMap& theValues); - //! Returns key of json in the index position. Incement the index position to the next symbol in the row + //! Returns key of json in the index position. Increment the index position to the next symbol in the row Standard_EXPORT static Standard_Boolean jsonKey (const TCollection_AsciiString& theStreamStr, Standard_Integer theStartIndex, Standard_Integer& theNextIndex, diff --git a/src/Standard/Standard_ErrorHandler.cxx b/src/Standard/Standard_ErrorHandler.cxx index 3fc6c189d9..b5fcc06bc2 100644 --- a/src/Standard/Standard_ErrorHandler.cxx +++ b/src/Standard/Standard_ErrorHandler.cxx @@ -225,7 +225,7 @@ Standard_ErrorHandler* Standard_ErrorHandler::FindHandler(const Standard_Handler // lock the stack GetMutex().Lock(); - // Find the current ErrorHandler Accordin tread + // Find the current ErrorHandler according to thread Standard_ErrorHandler* aPrevious = 0; Standard_ErrorHandler* aCurrent = Top; Standard_ErrorHandler* anActive = 0; diff --git a/src/Standard/Standard_MMgrOpt.cxx b/src/Standard/Standard_MMgrOpt.cxx index e28d94ba23..b2764d4f57 100644 --- a/src/Standard/Standard_MMgrOpt.cxx +++ b/src/Standard/Standard_MMgrOpt.cxx @@ -121,7 +121,7 @@ extern "C" int getpagesize() ; /* In the allocated block, first bytes are used for storing of memory manager's data. (size of block). The minimal size of these data is sizeof(int). The memory allocated in system usually aligned by 16 bytes. The alignment of the - data area in the memory block is shfted on BLOCK_SHIFT*sizeof(Standard_Size) + data area in the memory block is shifted on BLOCK_SHIFT*sizeof(Standard_Size) bytes. It is OK for WNT, SUN and Linux systems, but on SGI alignment should be 8 bytes. So, BLOCK_SHIFT is formed as macro for support on other possible platforms. diff --git a/src/TDF/TDF_Attribute.hxx b/src/TDF/TDF_Attribute.hxx index e7aa964b80..99a7f31635 100644 --- a/src/TDF/TDF_Attribute.hxx +++ b/src/TDF/TDF_Attribute.hxx @@ -358,7 +358,7 @@ Standard_OStream& operator<< (Standard_OStream& anOS) const //! forgotten attribute is also flagged not "Valid". //! //! A forgotten attribute is invisible. Set also the - //! "Valid" status to False. Obvioulsy, DF cannot + //! "Valid" status to False. Obviously, DF cannot //! empty an attribute (this has a semantic //! signification), but can remove it from the //! structure. So, a forgotten attribute is NOT an empty diff --git a/src/TDocStd/TDocStd_Document.hxx b/src/TDocStd/TDocStd_Document.hxx index 057ee681f5..c4240ebc77 100644 --- a/src/TDocStd/TDocStd_Document.hxx +++ b/src/TDocStd/TDocStd_Document.hxx @@ -117,7 +117,7 @@ public: //! Launches a new command. This command may be undone. Standard_EXPORT void NewCommand(); - //! returns True if a Command transaction is open in the curret . + //! returns True if a Command transaction is open in the current . Standard_EXPORT Standard_Boolean HasOpenCommand() const; //! Opens a new command transaction in this document. diff --git a/src/TopOpeBRep/TopOpeBRep_EdgesFiller.hxx b/src/TopOpeBRep/TopOpeBRep_EdgesFiller.hxx index 7f5ebe441f..5c930b3355 100644 --- a/src/TopOpeBRep/TopOpeBRep_EdgesFiller.hxx +++ b/src/TopOpeBRep/TopOpeBRep_EdgesFiller.hxx @@ -37,7 +37,7 @@ class TopOpeBRepDS_Interference; //! Fills a TopOpeBRepDS_DataStructure with Edge/Edge -//! instersection data described by TopOpeBRep_EdgesIntersector. +//! intersection data described by TopOpeBRep_EdgesIntersector. class TopOpeBRep_EdgesFiller { public: diff --git a/src/TopOpeBRep/TopOpeBRep_EdgesIntersector.cxx b/src/TopOpeBRep/TopOpeBRep_EdgesIntersector.cxx index 6cebc0ab1e..99d042bf5f 100644 --- a/src/TopOpeBRep/TopOpeBRep_EdgesIntersector.cxx +++ b/src/TopOpeBRep/TopOpeBRep_EdgesIntersector.cxx @@ -250,7 +250,7 @@ static Standard_Boolean IsTangentSegment(const IntRes2d_IntersectionPoint &P1, Standard_Boolean EdgesIntersector_checkT1D(const TopoDS_Edge& E1,const TopoDS_Edge& E2,const TopoDS_Vertex& vG, TopOpeBRepDS_Transition& newT) //------------------------------------------------------------------------ - // E1 sdm E2, interfers with E2 at vertex vG + // E1 sdm E2, interferes with E2 at vertex vG // vG is vertex of E2, but not vertex of E1 // purpose : get newT / attached to E1, I1d=(newT(E2),G,E2) { diff --git a/src/TopOpeBRep/TopOpeBRep_FacesFiller.hxx b/src/TopOpeBRep/TopOpeBRep_FacesFiller.hxx index 3319d3fbeb..0548323a7c 100644 --- a/src/TopOpeBRep/TopOpeBRep_FacesFiller.hxx +++ b/src/TopOpeBRep/TopOpeBRep_FacesFiller.hxx @@ -43,7 +43,7 @@ class gp_Pnt; //! Fills a DataStructure from TopOpeBRepDS with the result -//! of Face/Face instersection described by FacesIntersector from TopOpeBRep. +//! of Face/Face intersection described by FacesIntersector from TopOpeBRep. //! if the faces have same Domain, record it in the DS. //! else record lines and points and attach list of interferences //! to the faces, the lines and the edges. diff --git a/src/TopOpeBRep/TopOpeBRep_ShapeScanner.hxx b/src/TopOpeBRep/TopOpeBRep_ShapeScanner.hxx index 7b1149c303..3a863691bb 100644 --- a/src/TopOpeBRep/TopOpeBRep_ShapeScanner.hxx +++ b/src/TopOpeBRep/TopOpeBRep_ShapeScanner.hxx @@ -30,8 +30,8 @@ class TopoDS_Shape; class TopOpeBRepTool_ShapeExplorer; -//! Find, among the subshapes SS of a reference shape -//! RS, the ones which 3D box interfers with the box of +//! Find, among the subshapes SS of a reference shape +//! RS, the ones which 3D box interferes with the box of //! a shape S (SS and S are of the same type). class TopOpeBRep_ShapeScanner { diff --git a/src/TopOpeBRepBuild/TopOpeBRepBuild_GridFF.cxx b/src/TopOpeBRepBuild/TopOpeBRepBuild_GridFF.cxx index 2e012b6ae6..9143ba0712 100644 --- a/src/TopOpeBRepBuild/TopOpeBRepBuild_GridFF.cxx +++ b/src/TopOpeBRepBuild/TopOpeBRepBuild_GridFF.cxx @@ -135,7 +135,7 @@ Standard_Boolean FUN_computeLIFfaces2d(const TopOpeBRepBuild_Builder& BU, const TopoDS_Edge& E, TopOpeBRepDS_PDataStructure& pDS2d) // purpose : compute new face/face interferences F FTRA, -// {I = (T(F),ES,FTRA)} / Fsdm F and ES interfers with E which has splits ON +// {I = (T(F),ES,FTRA)} / Fsdm F and ES interferes with E which has splits ON // E is edge of F { const TopOpeBRepDS_DataStructure& BDS = BU.DataStructure()->DS(); diff --git a/src/TopOpeBRepTool/TopOpeBRepTool_PurgeInternalEdges.hxx b/src/TopOpeBRepTool/TopOpeBRepTool_PurgeInternalEdges.hxx index ab83957329..51f2a6b722 100644 --- a/src/TopOpeBRepTool/TopOpeBRepTool_PurgeInternalEdges.hxx +++ b/src/TopOpeBRepTool/TopOpeBRepTool_PurgeInternalEdges.hxx @@ -69,8 +69,8 @@ public: return myIsDone; } - //! Using the list of internal edge from each face, - //! rebuild myShape by removing thoses edges. + //! Using the list of internal edges from each face, + //! rebuild myShape by removing those edges. Standard_EXPORT void Perform(); protected: diff --git a/src/TopOpeBRepTool/TopOpeBRepTool_REGUW.cxx b/src/TopOpeBRepTool/TopOpeBRepTool_REGUW.cxx index ead25c61bd..1dab94eea5 100644 --- a/src/TopOpeBRepTool/TopOpeBRepTool_REGUW.cxx +++ b/src/TopOpeBRepTool/TopOpeBRepTool_REGUW.cxx @@ -722,7 +722,7 @@ Standard_Boolean TopOpeBRepTool_REGUW::REGU(const Standard_Integer istep, // tol2d = 1.e-2*(lowest distance (p2df,p2dl) between all non-closed // and non-degenerated pcurves seen during the regularization). // This value is updated in method chkp2dFORinE. - // The comparision of p2d points is coupled with comparision of vertices + // The comparison of p2d points is coupled with comparison of vertices // We should in fact use bounding boxes on pcurves but this is too expensive!!! mytol2d = 1.e-5; isinit0 = Standard_True; diff --git a/src/Vrml/Vrml_LOD.hxx b/src/Vrml/Vrml_LOD.hxx index 1744fffef3..ea9cd0f586 100644 --- a/src/Vrml/Vrml_LOD.hxx +++ b/src/Vrml/Vrml_LOD.hxx @@ -37,7 +37,7 @@ DEFINE_STANDARD_HANDLE(Vrml_LOD, Standard_Transient) //! of Levels Of Detail (LOD), from highest detail to lowest. //! //! The specified center point of the LOD is transformed by current -//! transformation into world space, and yhe distancefrom the transformed +//! transformation into world space, and the distance from the transformed //! center to the world-space eye point is calculated. //! If thedistance is less than the first value in the ranges array, //! than the first child of the LOD group is drawn. If between diff --git a/src/VrmlConverter/VrmlConverter_Curve.cxx b/src/VrmlConverter/VrmlConverter_Curve.cxx index 5c1f63c978..38e0c8fefe 100644 --- a/src/VrmlConverter/VrmlConverter_Curve.cxx +++ b/src/VrmlConverter/VrmlConverter_Curve.cxx @@ -78,7 +78,7 @@ static void DrawCurve (const Adaptor3d_Curve& aCurve, const Standard_Integer NbP, const Standard_Real U1, const Standard_Real U2, - const Handle(VrmlConverter_Drawer)& aDrawer, // for passsing of LineAspect + const Handle(VrmlConverter_Drawer)& aDrawer, // for passing of LineAspect Standard_OStream& anOStream) { Standard_Integer nbintervals = 1, i; diff --git a/src/VrmlConverter/VrmlConverter_DeflectionCurve.cxx b/src/VrmlConverter/VrmlConverter_DeflectionCurve.cxx index 6664391d78..c27e63a414 100644 --- a/src/VrmlConverter/VrmlConverter_DeflectionCurve.cxx +++ b/src/VrmlConverter/VrmlConverter_DeflectionCurve.cxx @@ -117,7 +117,7 @@ static void DrawCurve (Adaptor3d_Curve& aCurve, const Standard_Real TheDeflection, const Standard_Real U1, const Standard_Real U2, - const Handle(VrmlConverter_Drawer)& aDrawer, // for passsing of LineAspect + const Handle(VrmlConverter_Drawer)& aDrawer, // for passing of LineAspect Standard_OStream& anOStream) { Standard_Integer i; diff --git a/tests/bugs/iges/bug29391 b/tests/bugs/iges/bug29391 index 5a38f3b83e..6cc2f561aa 100644 --- a/tests/bugs/iges/bug29391 +++ b/tests/bugs/iges/bug29391 @@ -3,7 +3,7 @@ puts "OCC29391" puts "========" puts "" ########################################################################## -# transormations for few entities with type 144 are missing +# transformations for a few entities with type 144 are missing ########################################################################## igesbrep [locate_data_file bug29391.igs] a * diff --git a/tests/bugs/mesh/bug31449_2 b/tests/bugs/mesh/bug31449_2 index 50d626d3ff..93ae1c2c26 100644 --- a/tests/bugs/mesh/bug31449_2 +++ b/tests/bugs/mesh/bug31449_2 @@ -9,7 +9,7 @@ incmesh result 0.0001 set info_good [tricheck result] if { [string compare $info_good "" ] != 0 } { - puts "Error : something wierd has been produced, like free nodes, or links" + puts "Error : something weird has been produced, like free nodes, or links" } checktrinfo result -tri 65 -nod 67 diff --git a/tests/bugs/modalg_1/buc60663_2 b/tests/bugs/modalg_1/buc60663_2 index 9530e914c9..2a282f39a5 100755 --- a/tests/bugs/modalg_1/buc60663_2 +++ b/tests/bugs/modalg_1/buc60663_2 @@ -1,4 +1,4 @@ -puts "TODO OCC12345 ALL: Faulty : the distanse is" +puts "TODO OCC12345 ALL: Faulty : the distance is" puts "TODO OCC12345 ALL: Error : The length of result shape is" puts "=====================================" @@ -27,7 +27,7 @@ regexp {([-0-9.+eE]+)$} [dump d_val] full dist regexp { +Vertex +: +Min +[-0-9.+eE]+ +Max +([-0-9.+eE]+)} [maxtolerance $ver] full toler if {$dist > $toler} { - puts "Faulty : the distanse is $dist. It is more $toler." + puts "Faulty : the distance is $dist. It is more $toler." } checkprops result -l 0 checkshape result diff --git a/tests/bugs/modalg_1/bug144 b/tests/bugs/modalg_1/bug144 index 8670cf5e8c..c43c2fec88 100755 --- a/tests/bugs/modalg_1/bug144 +++ b/tests/bugs/modalg_1/bug144 @@ -1,4 +1,4 @@ -puts "TODO OCC12345 ALL: Faulty : the distanse is" +puts "TODO OCC12345 ALL: Faulty : the distance is" puts "TODO OCC12345 ALL: Error : The length of result shape is" puts "================" @@ -26,7 +26,7 @@ regexp {([-0-9.+eE]+)$} [dump d_val] full dist regexp { +Vertex +: +Min +[-0-9.+eE]+ +Max +([-0-9.+eE]+)} [ maxtolerance $ver ] full toler if { [expr $dist > $toler] } { - puts "Faulty : the distanse is $dist. It is more $toler." + puts "Faulty : the distance is $dist. It is more $toler." } checkprops result -l 0 diff --git a/tests/bugs/modalg_5/bug24657 b/tests/bugs/modalg_5/bug24657 index fba2aa6452..851c884108 100644 --- a/tests/bugs/modalg_5/bug24657 +++ b/tests/bugs/modalg_5/bug24657 @@ -11,7 +11,7 @@ explode a e pcurve p4 a_4 a pcurve p5 a_5 a -# Recieve an output strings of the intersection operation +# Receive an output strings of the intersection operation set inter1 [2dintersect p4 p5 -tol 1.e-7] set inter2 [2dintersect p5 p4 -tol 1.e-7] diff --git a/tests/bugs/modalg_7/bug29293_2 b/tests/bugs/modalg_7/bug29293_2 index 04ad573be3..39b1b1e35d 100644 --- a/tests/bugs/modalg_7/bug29293_2 +++ b/tests/bugs/modalg_7/bug29293_2 @@ -34,7 +34,7 @@ fit # Check that the normal directions have been preserved. # Both input faces faces have normals # directed strictly to the top (0, 0, 1). So, it is necessary to check -# that the reuslting face has the same normal direction. +# that the resulting face has the same normal direction. if {![regexp "(0, 0, 100)" [normals result -length 100 -print]]} { puts "Error: the orientation is changed" diff --git a/tests/bugs/moddata_3/bug28026 b/tests/bugs/moddata_3/bug28026 index af7cf8f316..0de5126b4b 100644 --- a/tests/bugs/moddata_3/bug28026 +++ b/tests/bugs/moddata_3/bug28026 @@ -14,7 +14,7 @@ set output [trinfo b] foreach data ${expected} { if ![regexp $data $output] { - puts "Error: Not cleanned all trinfo in '$data'" + puts "Error: Not cleaned all trinfo in '$data'" break; } } diff --git a/tests/bugs/step/bug32922 b/tests/bugs/step/bug32922 index 1c32f0dcc2..1c0a20c361 100644 --- a/tests/bugs/step/bug32922 +++ b/tests/bugs/step/bug32922 @@ -34,7 +34,7 @@ set step_file ${imagedir}/torus.stp testwritestep ${step_file} tor stepread ${step_file} a * -# Cheking the face of the torus +# Checking the face of the torus explode a_1 f renamevar a_1_1 result checkshape result diff --git a/tests/bugs/step/pro19895 b/tests/bugs/step/pro19895 index 9e93263bf3..75a2a6da95 100755 --- a/tests/bugs/step/pro19895 +++ b/tests/bugs/step/pro19895 @@ -3,8 +3,8 @@ puts "PRO19895" puts "==========" ############################################################################# -## There is wrong tolerance after reading of the model in optimize mode (C30). Retrieve entity number 2139 from file -## "bm4_db_punch_a.stp" and will obtaine tolerance. It is very big and isolains extend from entity. +## There is wrong tolerance after reading the model in optimize mode (C30). Retrieve entity number 2139 from file +## "bm4_db_punch_a.stp" and will obtain tolerance. It's very big and isolates extend from entity. ############################################################################# stepread [locate_data_file bm4_db_punch_a.stp] a * diff --git a/tests/bugs/xde/bug904 b/tests/bugs/xde/bug904 index 1b29f95ecc..2b3de9c53c 100755 --- a/tests/bugs/xde/bug904 +++ b/tests/bugs/xde/bug904 @@ -3,7 +3,7 @@ puts "OCC904" puts "============" puts "" ##################################################### -## Invalid resut shell after command fixshell in DRAW with non-manifold mode +## Invalid result shell after command fixshell in DRAW with non-manifold mode ##################################################### pload QAcommands diff --git a/tests/de/end b/tests/de/end index cc0c34c71a..70bc3312ed 100644 --- a/tests/de/end +++ b/tests/de/end @@ -627,7 +627,7 @@ if { $dump_file == 1 } { if {$lengthunit_start != ""} { puts $fd_stream "" - puts $fd_stream "# set $lengthunit_start as local lenght unit" + puts $fd_stream "# set $lengthunit_start as local length unit" puts $fd_stream "set lengthunit_start \"$lengthunit_start\"" } diff --git a/tests/lowalgos/intss/bug24915 b/tests/lowalgos/intss/bug24915 index 2c25dd4e91..d8f39fb629 100644 --- a/tests/lowalgos/intss/bug24915 +++ b/tests/lowalgos/intss/bug24915 @@ -9,7 +9,7 @@ puts "" ############################### puts "##############################" -puts "#!!!Searh \"Attention\" keyword on this web-page for additinal checking!!!" +puts "#!!!Search \"Attention\" keyword on this web-page for additional checking!!!" puts "##############################" restore [locate_data_file bug24915_ft2.brep] b1 diff --git a/tests/lowalgos/intss/bug504 b/tests/lowalgos/intss/bug504 index 2287b920fb..94b304ee92 100644 --- a/tests/lowalgos/intss/bug504 +++ b/tests/lowalgos/intss/bug504 @@ -13,7 +13,7 @@ restore [locate_data_file OCC504b.draw] su2 # checkshape su2 if [catch {intersect result su1 su2} catch_result] { - puts "Faulty OCC504 : A solution takes all memory and crach with AllocMemory" + puts "Faulty OCC504 : A solution takes all memory and crashes with AllocMemory" } else { puts "OCC504 OK: function intersection works ok" } diff --git a/tests/offset/bugs/bug30055 b/tests/offset/bugs/bug30055 index ecba24c463..a30ee7f361 100644 --- a/tests/offset/bugs/bug30055 +++ b/tests/offset/bugs/bug30055 @@ -9,5 +9,5 @@ restore [locate_data_file bug30055.brep] a thickshell result a 1 i if { [isdraw result] } { - puts "ERROR - result must not be buit" + puts "ERROR - result must not be built" } diff --git a/tests/pipe/bugs/bug32809 b/tests/pipe/bugs/bug32809 index 3e8cb1687b..06589dff68 100644 --- a/tests/pipe/bugs/bug32809 +++ b/tests/pipe/bugs/bug32809 @@ -1,5 +1,5 @@ puts "========" -puts "bug32809: Sweep algorithm with Round Corner doesnot work" +puts "bug32809: Sweep algorithm with Round Corner does not work" puts "========" puts "" diff --git a/tests/thrusection/specific_locked/E6 b/tests/thrusection/specific_locked/E6 index 85c8034d35..35a1063f37 100644 --- a/tests/thrusection/specific_locked/E6 +++ b/tests/thrusection/specific_locked/E6 @@ -51,7 +51,7 @@ set z2 20 set z3 0 set z4 100 -# begining vertex +# beginning vertex vertex v4 55 2.5 ${z4} # ending vertex vertex v5 55 2.5 -${z4} diff --git a/tests/thrusection/specific_locked/E7 b/tests/thrusection/specific_locked/E7 index 02170a4856..d0ac3d87d8 100644 --- a/tests/thrusection/specific_locked/E7 +++ b/tests/thrusection/specific_locked/E7 @@ -53,7 +53,7 @@ set z2 20 set z3 0 set z4 100 -# begining vertex +# beginning vertex vertex v4 55 2.5 ${z4} # ending vertex vertex v5 55 2.5 -${z4} diff --git a/tests/thrusection/specific_locked/E8 b/tests/thrusection/specific_locked/E8 index f691491927..c7e158c4d1 100644 --- a/tests/thrusection/specific_locked/E8 +++ b/tests/thrusection/specific_locked/E8 @@ -53,7 +53,7 @@ set z2 20 set z3 0 set z4 100 -# begining vertex +# beginning vertex vertex v4 55 2.5 ${z4} # ending vertex vertex v5 55 2.5 -${z4} diff --git a/tests/thrusection/specific_locked/F1 b/tests/thrusection/specific_locked/F1 index a83c817328..6f66321424 100644 --- a/tests/thrusection/specific_locked/F1 +++ b/tests/thrusection/specific_locked/F1 @@ -51,7 +51,7 @@ set z2 20 set z3 0 set z4 100 -# begining vertex +# beginning vertex vertex v4 2.5 5 ${z4} # ending vertex vertex v5 2.5 5 -${z4} diff --git a/tests/thrusection/specific_locked/F2 b/tests/thrusection/specific_locked/F2 index 7319643954..71e13219cb 100644 --- a/tests/thrusection/specific_locked/F2 +++ b/tests/thrusection/specific_locked/F2 @@ -53,7 +53,7 @@ set z2 20 set z3 0 set z4 100 -# begining vertex +# beginning vertex vertex v4 2.5 5 ${z4} # ending vertex vertex v5 2.5 5 -${z4} diff --git a/tests/thrusection/specific_locked/F3 b/tests/thrusection/specific_locked/F3 index 0008b0cfba..cfcde8888d 100644 --- a/tests/thrusection/specific_locked/F3 +++ b/tests/thrusection/specific_locked/F3 @@ -53,7 +53,7 @@ set z2 20 set z3 0 set z4 100 -# begining vertex +# beginning vertex vertex v4 2.5 5 ${z4} # ending vertex vertex v5 2.5 5 -${z4} diff --git a/tests/thrusection/specific_locked/G4 b/tests/thrusection/specific_locked/G4 index bf823e5460..b0fbea1605 100644 --- a/tests/thrusection/specific_locked/G4 +++ b/tests/thrusection/specific_locked/G4 @@ -55,7 +55,7 @@ set z4 100 set z5 30 set z6 10 -# begining vertex +# beginning vertex vertex v4 55 2.5 ${z4} # ending vertex vertex v5 55 2.5 -${z4} diff --git a/tests/thrusection/specific_locked/G6 b/tests/thrusection/specific_locked/G6 index ea646acc36..0ec083c9a2 100644 --- a/tests/thrusection/specific_locked/G6 +++ b/tests/thrusection/specific_locked/G6 @@ -53,7 +53,7 @@ set z4 100 set z5 30 set z6 10 -# begining vertex +# beginning vertex vertex v4 2.5 5 ${z4} # ending vertex vertex v5 2.5 5 -${z4} diff --git a/tests/v3d/bugs/bug22795 b/tests/v3d/bugs/bug22795 index 579171289a..a1f5f5921f 100644 --- a/tests/v3d/bugs/bug22795 +++ b/tests/v3d/bugs/bug22795 @@ -1,5 +1,5 @@ puts "================" -puts "OCC22795: Make possible to display some presentable objecys in overlay of others, groupped by display priority " +puts "OCC22795: Makes it possible to display some presentable objects in overlay of others, grouped by display priority " puts "================" puts "" diff --git a/tests/xcaf/end b/tests/xcaf/end index 7b42e7c65c..4cf9b41ebe 100644 --- a/tests/xcaf/end +++ b/tests/xcaf/end @@ -1,5 +1,5 @@ puts "Test includes comparing for $CompareDocumentsMode" -############## INIZIALIZING OF VARIABLES ################################# +############## INITIALIZING OF VARIABLES ################################# # ========== variables for comparison ====================== # Checkshape set Checkshape_Second ** diff --git a/tools/DFBrowserPane/DFBrowserPane_AttributePaneModel.hxx b/tools/DFBrowserPane/DFBrowserPane_AttributePaneModel.hxx index e9b9d6db52..359f460b31 100644 --- a/tools/DFBrowserPane/DFBrowserPane_AttributePaneModel.hxx +++ b/tools/DFBrowserPane/DFBrowserPane_AttributePaneModel.hxx @@ -28,7 +28,7 @@ //! \class DFBrowserPane_AttributePaneModel //! \brief This is an extension of table model to visualize a container of values //! It is possible to: -//! - set orientation to interpretate the values. +//! - set orientation to interpret the values. //! - set table view header values. //! Items of the view are enabled and selectable. class DFBrowserPane_AttributePaneModel : public QAbstractTableModel diff --git a/tools/MessageModel/MessageModel_ItemRoot.hxx b/tools/MessageModel/MessageModel_ItemRoot.hxx index 9e59a54477..41c9066dcb 100644 --- a/tools/MessageModel/MessageModel_ItemRoot.hxx +++ b/tools/MessageModel/MessageModel_ItemRoot.hxx @@ -68,7 +68,7 @@ public: //! Returns true if report exists is in the list of the current reports //! \param theReport a report instance - //! \return boolen value + //! \return boolean value Standard_EXPORT Standard_Boolean HasReport (const Handle(Message_Report)& theReport); //!< Returns processed reports diff --git a/tools/MessageModel/MessageModel_TreeModel.hxx b/tools/MessageModel/MessageModel_TreeModel.hxx index 3a2c69c79c..2b6f5c4b99 100644 --- a/tools/MessageModel/MessageModel_TreeModel.hxx +++ b/tools/MessageModel/MessageModel_TreeModel.hxx @@ -59,7 +59,7 @@ public: //! Returns true if parameter report was added into the model //! \param theReport a report instance - //! \return boolen value + //! \return boolean value Standard_EXPORT Standard_Boolean HasReport (const Handle(Message_Report)& theReport); //! Add shape, append it to the model root item @@ -79,7 +79,7 @@ public: Standard_EXPORT const NCollection_List& Reports() const; //! Sets the text value of the Root item, only "Name" column accepts the parameter value - //! \theName visulized text of root item + //! \theName visualized text of root item Standard_EXPORT void SetRootItemName (const TCollection_AsciiString& theName); //! Updates tree model diff --git a/tools/MessageView/MessageView_MetricStatisticModel.hxx b/tools/MessageView/MessageView_MetricStatisticModel.hxx index f31131d11e..81d394a397 100644 --- a/tools/MessageView/MessageView_MetricStatisticModel.hxx +++ b/tools/MessageView/MessageView_MetricStatisticModel.hxx @@ -29,7 +29,7 @@ //! metric time spent on the alert and its children. //! It visualizes a table with statistic information: //! the 1st column is alert name, the 2nd column is a counter of the name appearance, -//! the 3rd column is the cummulative time. +//! the 3rd column is the cumulative time. //! Tables rows are sorted by descending time. class MessageView_MetricStatisticModel : public QAbstractTableModel { @@ -59,7 +59,7 @@ public: //! It returns value only for DisplayRole //! \param theIndex a model index //! \param theRole a view role - //! \return value intepreted depending on the given role + //! \return value interpreted depending on the given role Standard_EXPORT virtual QVariant data (const QModelIndex& theIndex, int theRole = Qt::DisplayRole) const Standard_OVERRIDE; //! Returns number of rows diff --git a/tools/MessageView/MessageView_VisibilityState.hxx b/tools/MessageView/MessageView_VisibilityState.hxx index db37120cef..1443e7f1a3 100644 --- a/tools/MessageView/MessageView_VisibilityState.hxx +++ b/tools/MessageView/MessageView_VisibilityState.hxx @@ -55,7 +55,7 @@ public: //! Sets visibility state //! \theIndex tree model index //! \param theState visibility state - //! \param toEmitDataChanged boolean flag whether emit of the model should be done immediatelly + //! \param toEmitDataChanged boolean flag whether emit of the model should be done immediately //! \return true if state is changed Standard_EXPORT virtual bool SetVisible (const QModelIndex& theIndex, const bool theState, const bool toEmitDataChanged) Standard_OVERRIDE; diff --git a/tools/MessageView/MessageView_Window.hxx b/tools/MessageView/MessageView_Window.hxx index 5ef7066803..9dfe7f6bfe 100644 --- a/tools/MessageView/MessageView_Window.hxx +++ b/tools/MessageView/MessageView_Window.hxx @@ -85,7 +85,7 @@ public: //! \param theItem container of preference elements Standard_EXPORT void SetPreferences (const TInspectorAPI_PreferencesDataMap& theItem); - //! Applyes parameters to Init controls, opens files if there are in parameters, updates OCAF tree view model + //! Applies parameters to Init controls, opens files if there are in parameters, updates OCAF tree view model Standard_EXPORT void UpdateContent(); //! Returns main control @@ -116,7 +116,7 @@ protected slots: //! \param theIndex tree view model index void onTreeViewVisibilityClicked(const QModelIndex& theIndex); - //! Udpates all controls by changed selection in OCAF tree view + //! Updates all controls by changed selection in OCAF tree view //! \param theSelected list of selected tree view items //! \param theDeselected list of deselected tree view items void onTreeViewSelectionChanged (const QItemSelection& theSelected, const QItemSelection& theDeselected); diff --git a/tools/TInspector/TInspector_Window.hxx b/tools/TInspector/TInspector_Window.hxx index 43738319e9..3a78ca45f4 100644 --- a/tools/TInspector/TInspector_Window.hxx +++ b/tools/TInspector/TInspector_Window.hxx @@ -154,7 +154,7 @@ public slots: protected slots: - //! Activates plugin correspnded to the clicked button + //! Activates plugin corresponded to the clicked button void onButtonClicked(); //! Updates available actions by the active plugin diff --git a/tools/View/View_DisplayPreview.hxx b/tools/View/View_DisplayPreview.hxx index f8eaef2c3d..98187a3751 100644 --- a/tools/View/View_DisplayPreview.hxx +++ b/tools/View/View_DisplayPreview.hxx @@ -44,7 +44,7 @@ public: virtual ~View_DisplayPreview() {} //! Stores the current context where the presentations will be displayed/erased. - //! Erases previuously displayed presentations if there were some displayed + //! Erases previously displayed presentations if there were some displayed //! \param theContext a context instance Standard_EXPORT void SetContext (const Handle(AIS_InteractiveContext)& theContext); diff --git a/tools/View/View_Displayer.hxx b/tools/View/View_Displayer.hxx index 7239d9462b..b46316a1ef 100644 --- a/tools/View/View_Displayer.hxx +++ b/tools/View/View_Displayer.hxx @@ -53,7 +53,7 @@ public: View_DisplayPreview* DisplayPreview() const { return myDisplayPreview; } //! Stores the current context where the presentations will be displayed/erased. - //! Erases previuously displayed presentations if there were some displayed + //! Erases previously displayed presentations if there were some displayed //! \param theContext a context instance Standard_EXPORT void SetContext (const Handle(AIS_InteractiveContext)& theContext); diff --git a/tools/ViewControl/ViewControl_ColorSelector.cxx b/tools/ViewControl/ViewControl_ColorSelector.cxx index 2e480bcf7a..9426804851 100644 --- a/tools/ViewControl/ViewControl_ColorSelector.cxx +++ b/tools/ViewControl/ViewControl_ColorSelector.cxx @@ -100,7 +100,7 @@ class ViewControl_ParametersModel : public ViewControl_TableModelValues return QVariant(); } - //! Sets content of the model index for the given role, it is applyed to internal container of values + //! Sets content of the model index for the given role, it is applied to internal container of values //! \param theRow a model index row //! \param theColumn a model index column //! \param theRole a view role @@ -128,11 +128,11 @@ class ViewControl_ParametersModel : public ViewControl_TableModelValues return true; } - //! Returns number of tree level line items = colums in table view + //! Returns number of tree level line items = columns in table view virtual int ColumnCount (const QModelIndex& theParent = QModelIndex()) const Standard_OVERRIDE { (void)theParent; return 2; } - //! Returns onlly one row in table view + //! Returns only one row in table view virtual int RowCount (const QModelIndex& theParent = QModelIndex()) const Standard_OVERRIDE { (void)theParent; return 7; } @@ -211,7 +211,7 @@ class ViewControl_OCCTColorModel : public QAbstractTableModel //! Returns item information(short) for display role. //! \param theIndex a model index //! \param theRole a view role - //! \return value intepreted depending on the given role + //! \return value interpreted depending on the given role Standard_EXPORT virtual QVariant data (const QModelIndex& theIndex, int theRole = Qt::DisplayRole) const Standard_OVERRIDE { @@ -231,7 +231,7 @@ class ViewControl_OCCTColorModel : public QAbstractTableModel virtual int columnCount (const QModelIndex& theParent = QModelIndex()) const Standard_OVERRIDE { (void)theParent; return 26; } - //! Returns onlly one row in table view + //! Returns only one row in table view virtual int rowCount (const QModelIndex& theParent = QModelIndex()) const Standard_OVERRIDE { (void)theParent; return 20; } diff --git a/tools/ViewControl/ViewControl_ColorSelector.hxx b/tools/ViewControl/ViewControl_ColorSelector.hxx index 683615615c..38a4ac29f9 100644 --- a/tools/ViewControl/ViewControl_ColorSelector.hxx +++ b/tools/ViewControl/ViewControl_ColorSelector.hxx @@ -73,7 +73,7 @@ public: Quantity_NameOfColor& theColorName); private: - //! Returns symbol used as a separtor of color components in string conversion + //! Returns symbol used as a separator of color components in string conversion //! \return symbol value static QString ColorSeparator() { return ";"; } From 7236e83dcc1e7284e66dc61e612154617ef715d6 Mon Sep 17 00:00:00 2001 From: dpasukhi Date: Tue, 27 Aug 2024 11:33:29 +0100 Subject: [PATCH 593/639] 0033808: Coding - FreeType Use unsigned point and contour indexing in `FT_Outline` Changes to auto instead of specific type --- src/StdPrs/StdPrs_BRepFont.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/StdPrs/StdPrs_BRepFont.cxx b/src/StdPrs/StdPrs_BRepFont.cxx index ab2d9b3c9f..cd701879b1 100644 --- a/src/StdPrs/StdPrs_BRepFont.cxx +++ b/src/StdPrs/StdPrs_BRepFont.cxx @@ -457,7 +457,7 @@ Standard_Boolean StdPrs_BRepFont::renderGlyph (const Standard_Utf32Char theChar, for (short aContour = 0, aStartIndex = 0; aContour < anOutline->n_contours; ++aContour) { const FT_Vector* aPntList = &anOutline->points[aStartIndex]; - const char* aTags = &anOutline->tags[aStartIndex]; + const auto* aTags = &anOutline->tags[aStartIndex]; const short anEndIndex = anOutline->contours[aContour]; const short aPntsNb = (anEndIndex - aStartIndex) + 1; aStartIndex = anEndIndex + 1; From 4309cf7362c2e872d93dc313e0fc8acfbcf6e402 Mon Sep 17 00:00:00 2001 From: dpasukhi Date: Thu, 29 Aug 2024 11:26:23 +0000 Subject: [PATCH 594/639] 0033810: Coding - GitIgnore update with .vscode Updated .gitignore --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 5f5ea4939c..cab476190a 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,7 @@ # standard directories for derived files in CASROOT /.adm +/.vscode /lin /mac /wnt From 2fa9309186226a29ae47ee21c07a288668f412af Mon Sep 17 00:00:00 2001 From: dpasukhi Date: Sun, 25 Aug 2024 11:35:38 +0100 Subject: [PATCH 595/639] 0033805: Configuration - Implement GitHub Actions build scripts Build Scripts: - Linux GCC x64 dynamic - Linux Clang x64 dynamic - Windows MSVC x64 dynamic - macOS Clang x64 dynamic Security scanning: - CodeQL security scanning - MSVC code scanning --- .../build-linux-clang-x64-dynamic.yml | 40 +++++++++++ .../workflows/build-linux-gcc-x64-dynamic.yml | 40 +++++++++++ .../build-macos-clang-x64-dynamic.yml | 43 ++++++++++++ .../build-windows-msvc-x64-dynamic.yml | 44 ++++++++++++ .github/workflows/codemsvc.yml | 69 +++++++++++++++++++ .github/workflows/codeql.yml | 60 ++++++++++++++++ 6 files changed, 296 insertions(+) create mode 100644 .github/workflows/build-linux-clang-x64-dynamic.yml create mode 100644 .github/workflows/build-linux-gcc-x64-dynamic.yml create mode 100644 .github/workflows/build-macos-clang-x64-dynamic.yml create mode 100644 .github/workflows/build-windows-msvc-x64-dynamic.yml create mode 100644 .github/workflows/codemsvc.yml create mode 100644 .github/workflows/codeql.yml diff --git a/.github/workflows/build-linux-clang-x64-dynamic.yml b/.github/workflows/build-linux-clang-x64-dynamic.yml new file mode 100644 index 0000000000..29786f04ca --- /dev/null +++ b/.github/workflows/build-linux-clang-x64-dynamic.yml @@ -0,0 +1,40 @@ +# This workflow will build OCCT on Ubuntu with Clang compiler +# using the provided Docker image with Clang tools. +# +# Notes: +# freetype is disabled +# samples are not built + +name: Build OCCT on Linux with Clang x64 dynamic + +on: + pull_request: + branches: + - '**' + +jobs: + build-linux-clang: + name: Build on Ubuntu with Clang + runs-on: ubuntu-latest + + steps: + - name: Checkout repository + uses: actions/checkout@v4.1.7 + + - name: Install dependencies + run: sudo apt-get update && sudo apt-get install -y tcl-dev tk-dev cmake clang make libbtbb-dev libx11-dev libglu1-mesa-dev + + - name: Configure OCCT + run: | + mkdir -p build + cd build + cmake -G "Unix Makefiles" \ + -D CMAKE_C_COMPILER=clang \ + -D CMAKE_CXX_COMPILER=clang++ \ + -D USE_FREETYPE=OFF \ + -D CMAKE_BUILD_TYPE=Release .. + + - name: Build OCCT + run: | + cd build + make -j$(nproc) diff --git a/.github/workflows/build-linux-gcc-x64-dynamic.yml b/.github/workflows/build-linux-gcc-x64-dynamic.yml new file mode 100644 index 0000000000..53bd82f65c --- /dev/null +++ b/.github/workflows/build-linux-gcc-x64-dynamic.yml @@ -0,0 +1,40 @@ +# This workflow will build OCCT on Linux with GCC x64 dynamic +# using the provided Docker image with GCC tools. +# +# Notes: +# freetype is disabled +# samples are not built + +name: Build OCCT on Linux with GCC x64 dynamic + +on: + pull_request: + branches: + - '**' + +jobs: + build-linux-gcc: + name: Build on Ubuntu with GCC + runs-on: ubuntu-latest + + steps: + - name: Checkout repository + uses: actions/checkout@v4.1.7 + + - name: Install dependencies + run: sudo apt-get update && sudo apt-get install -y tcl-dev tk-dev cmake gcc g++ make libbtbb-dev libx11-dev libglu1-mesa-dev + + - name: Configure OCCT + run: | + mkdir -p build + cd build + cmake -G "Unix Makefiles" \ + -D CMAKE_C_COMPILER=gcc \ + -D CMAKE_CXX_COMPILER=g++ \ + -D USE_FREETYPE=OFF \ + -D CMAKE_BUILD_TYPE=Release .. + + - name: Build OCCT + run: | + cd build + make -j$(nproc) diff --git a/.github/workflows/build-macos-clang-x64-dynamic.yml b/.github/workflows/build-macos-clang-x64-dynamic.yml new file mode 100644 index 0000000000..07339979e1 --- /dev/null +++ b/.github/workflows/build-macos-clang-x64-dynamic.yml @@ -0,0 +1,43 @@ +# This workflow builds OCCT on macOS with Clang x64 dynamic. +# +# Notes: +# freetype is disabled +# samples are not built + +name: Build OCCT on macOS with Clang x64 dynamic + +on: + pull_request: + branches: + - '**' + +jobs: + build-macos-clang: + name: Build on macOS with Clang + runs-on: macos-latest + + steps: + - name: Checkout repository + uses: actions/checkout@v4.1.7 + + - name: Install dependencies + run: | + brew update + brew install tcl-tk tbb gl2ps xerces-c \ + libxmu libxi libxft libxpm \ + glew + + - name: Configure OCCT + run: | + mkdir -p build + cd build + cmake -G "Unix Makefiles" \ + -D CMAKE_C_COMPILER=clang \ + -D CMAKE_CXX_COMPILER=clang++ \ + -D USE_FREETYPE=OFF \ + -D CMAKE_BUILD_TYPE=Release .. + + - name: Build OCCT + run: | + cd build + make -j$(sysctl -n hw.logicalcpu) diff --git a/.github/workflows/build-windows-msvc-x64-dynamic.yml b/.github/workflows/build-windows-msvc-x64-dynamic.yml new file mode 100644 index 0000000000..4e4e8a9922 --- /dev/null +++ b/.github/workflows/build-windows-msvc-x64-dynamic.yml @@ -0,0 +1,44 @@ +# This workflow will build OCCT on Windows with MSVC x64 in dynamic mode +# using the provided Docker image with MSVC tools. +# +# Notes: +# freetype is disabled +# Draw module is disabled +# samples are not built + +name: Build OCCT on Windows with MSVC x64 dynamic + +on: + pull_request: + branches: + - '**' + +jobs: + build-windows-msvc: + name: Build on Windows with MSVC + runs-on: windows-latest + + steps: + - name: Checkout repository + uses: actions/checkout@v4.1.7 + + - name: Set up MSVC + uses: ilammy/msvc-dev-cmd@v1.13.0 + with: + arch: x64 + + - name: Install dependencies + run: | + choco install cmake --installargs 'ADD_CMAKE_TO_PATH=System' -y + choco install magicsplat-tcl-tk -y + + - name: Configure OCCT + run: | + mkdir build + cd build + cmake -T host=x64 -D USE_FREETYPE=OFF -D BUILD_MODULE_Draw=OFF -D CMAKE_BUILD_TYPE=Release .. + + - name: Build OCCT + run: | + cd build + cmake --build . --config Release -- /m diff --git a/.github/workflows/codemsvc.yml b/.github/workflows/codemsvc.yml new file mode 100644 index 0000000000..1972c754f6 --- /dev/null +++ b/.github/workflows/codemsvc.yml @@ -0,0 +1,69 @@ +# Security scanning with Microsoft C++ Code Analysis. +# Checks any master integration and publish warnings into security GitHub tab. +# +# Find more information at: +# https://github.com/microsoft/msvc-code-analysis-action + +name: Microsoft C++ Code Analysis + +on: + push: + branches: + - 'master' + +env: + # Path to the CMake build directory. + build: '${{ github.workspace }}/build' + config: 'Debug' + +permissions: + contents: read + +jobs: + analyze: + permissions: + contents: read # for actions/checkout to fetch code + security-events: write # for github/codeql-action/upload-sarif to upload SARIF results + actions: read # only required for a private repository by github/codeql-action/upload-sarif to get the Action run status + name: Analyze + runs-on: windows-latest + + steps: + - name: Checkout repository + uses: actions/checkout@v4.1.7 + + - name: Install dependencies + run: | + choco install cmake --installargs 'ADD_CMAKE_TO_PATH=System' -y + choco install magicsplat-tcl-tk -y + + - name: Configure CMake + run: | + mkdir build + cd build + cmake -D USE_FREETYPE=OFF -DCMAKE_BUILD_TYPE=${{ env.config }} .. + + - name: Run MSVC Code Analysis + uses: microsoft/msvc-code-analysis-action@v0.1.1 + # Provide a unique ID to access the sarif output path + id: run-analysis + with: + cmakeBuildDirectory: ${{ env.build }} + buildConfiguration: ${{ env.config }} + # Ruleset file that will determine what checks will be run + ruleset: NativeRecommendedRules.ruleset + # Paths to ignore analysis of CMake targets and includes + # ignoredPaths: ${{ github.workspace }}/dependencies;${{ github.workspace }}/test + + # Upload SARIF file to GitHub Code Scanning Alerts + #- name: Upload SARIF to GitHub + # uses: github/codeql-action/upload-sarif@v3.26.5 + # with: + # sarif_file: ${{ steps.run-analysis.outputs.sarif }} + + # Upload SARIF file as an Artifact to download and view + - name: Upload SARIF as an Artifact + uses: actions/upload-artifact@v4.3.6 + with: + name: sarif-file + path: ${{ steps.run-analysis.outputs.sarif }} diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml new file mode 100644 index 0000000000..e89acd5ce6 --- /dev/null +++ b/.github/workflows/codeql.yml @@ -0,0 +1,60 @@ +# Security scanning with CodeQL. +# Checks any master integration and publish warnings into security GitHub tab. +# +# Find more information at: +# https://docs.github.com/en/github/finding-security-vulnerabilities-and-errors-in-your-code/about-code-scanning + +name: CodeQL Code Analysis + +on: + push: + branches: + - 'master' + +jobs: + analyze: + name: Analyze (${{ matrix.language }}) + runs-on: ${{ 'ubuntu-latest' }} + permissions: + # required for all workflows + security-events: write + + # required to fetch internal or private CodeQL packs + packages: read + + strategy: + fail-fast: false + matrix: + include: + - language: c-cpp + build-mode: manual + steps: + - name: Checkout repository + uses: actions/checkout@v4.1.7 + + - name: Install dependencies + run: sudo apt-get update && sudo apt-get install -y tcl-dev tk-dev cmake gcc g++ make libbtbb-dev libx11-dev libglu1-mesa-dev + + # Initializes the CodeQL tools for scanning. + - name: Initialize CodeQL + uses: github/codeql-action/init@v3.26.5 + with: + languages: ${{ matrix.language }} + build-mode: ${{ matrix.build-mode }} + + - if: matrix.build-mode == 'manual' + shell: bash + run: | + mkdir -p build + cd build + cmake -G "Unix Makefiles" \ + -D CMAKE_C_COMPILER=gcc \ + -D CMAKE_CXX_COMPILER=g++ \ + -D USE_FREETYPE=OFF \ + -D CMAKE_BUILD_TYPE=Release .. + make -j$(nproc) + + - name: Perform CodeQL Analysis + uses: github/codeql-action/analyze@v3.26.5 + with: + category: "/language:${{matrix.language}}" From 488c43ed0ce938b567419725192cd28c53b950e2 Mon Sep 17 00:00:00 2001 From: dpasukhi Date: Wed, 4 Sep 2024 19:46:42 +0000 Subject: [PATCH 596/639] 0033812: Configuration, MacOS - Debug Symbols Stripped From Dynamic Libraries Update optimization flag to release only --- adm/cmake/occt_defs_flags.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/adm/cmake/occt_defs_flags.cmake b/adm/cmake/occt_defs_flags.cmake index 3d989abcd4..f33ae158f2 100644 --- a/adm/cmake/occt_defs_flags.cmake +++ b/adm/cmake/occt_defs_flags.cmake @@ -168,7 +168,7 @@ if (CMAKE_CXX_COMPILER_ID MATCHES "[Cc][Ll][Aa][Nn][Gg]") set (CMAKE_CXX_FLAGS "-stdlib=libc++ ${CMAKE_CXX_FLAGS}") endif() # Optimize size of binaries - set (CMAKE_SHARED_LINKER_FLAGS "-Wl,-s ${CMAKE_SHARED_LINKER_FLAGS}") + set (CMAKE_SHARED_LINKER_FLAGS_RELEASE "-Wl,-s ${CMAKE_SHARED_LINKER_FLAGS_RELEASE}") elseif(MINGW) add_definitions(-D_WIN32_WINNT=0x0601) # _WIN32_WINNT=0x0601 (use Windows 7 SDK) From fae5678dc78be9588e0211fd56dc8c2f989f77d6 Mon Sep 17 00:00:00 2001 From: dpasukhi Date: Thu, 5 Sep 2024 09:23:43 +0000 Subject: [PATCH 597/639] 0033750: Configuration - make file configuration failed in mfc example Updated MFC sample to build together with OCCT --- samples/mfc/standard/03_ImportExport/CMakeLists.txt | 6 +++--- samples/mfc/standard/04_HLR/CMakeLists.txt | 4 ++-- samples/mfc/standard/mfcsample/CMakeLists.txt | 1 - 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/samples/mfc/standard/03_ImportExport/CMakeLists.txt b/samples/mfc/standard/03_ImportExport/CMakeLists.txt index c0e975516c..46263e0e45 100644 --- a/samples/mfc/standard/03_ImportExport/CMakeLists.txt +++ b/samples/mfc/standard/03_ImportExport/CMakeLists.txt @@ -11,7 +11,7 @@ project (ImportExport) add_definitions (-DWINVER=0x0501 -DUNICODE -D_UNICODE) set (CMAKE_MFC_FLAG 2) -set (ImportExport_SRC_DIR ${MFC_STANDARD_SAMPLES_DIR}/05_ImportExport/src) +set (ImportExport_SRC_DIR ${MFC_STANDARD_SAMPLES_DIR}/03_ImportExport/src) set (ImportExport_HEADER_FILES ${ImportExport_SRC_DIR}/ColoredShapes.h ${ImportExport_SRC_DIR}/ImportExportApp.h ${ImportExport_SRC_DIR}/ImportExportDoc.h @@ -21,7 +21,7 @@ set (ImportExport_SOURCE_FILES ${ImportExport_SRC_DIR}/ColoredShapes.cpp ${ImportExport_SRC_DIR}/ImportExportDoc.cpp ${ImportExport_SRC_DIR}/StdAfx.cpp) -set (ImportExport_RESOURCE_DIR ${MFC_STANDARD_SAMPLES_DIR}/05_ImportExport/res) +set (ImportExport_RESOURCE_DIR ${MFC_STANDARD_SAMPLES_DIR}/03_ImportExport/res) set (ImportExport_RESOURCE_HEADER ${ImportExport_RESOURCE_DIR}/resource.h) set (ImportExport_RESOURCE_FILES ${ImportExport_RESOURCE_DIR}/Toolbar.bmp ${ImportExport_RESOURCE_DIR}/ImportExport.rc) @@ -55,7 +55,7 @@ else() endif() include_directories (${CMAKE_BINARY_DIR}/inc - ${MFC_STANDARD_SAMPLES_DIR}/05_ImportExport + ${MFC_STANDARD_SAMPLES_DIR}/03_ImportExport ${ImportExport_SRC_DIR} ${MFC_STANDARD_SAMPLES_DIR}/Common) diff --git a/samples/mfc/standard/04_HLR/CMakeLists.txt b/samples/mfc/standard/04_HLR/CMakeLists.txt index 14c8cc3850..9b5e33b88a 100644 --- a/samples/mfc/standard/04_HLR/CMakeLists.txt +++ b/samples/mfc/standard/04_HLR/CMakeLists.txt @@ -11,7 +11,7 @@ project (HLR) add_definitions(-DWINVER=0x0501 -DUNICODE -D_UNICODE) set (CMAKE_MFC_FLAG 2) -set (HLR_SRC_DIR ${MFC_STANDARD_SAMPLES_DIR}/08_HLR/src) +set (HLR_SRC_DIR ${MFC_STANDARD_SAMPLES_DIR}/04_HLR/src) set (HLR_HEADER_FILES ${HLR_SRC_DIR}/HLRApp.h ${HLR_SRC_DIR}/HLRDoc.h ${HLR_SRC_DIR}/HLRView2D.h @@ -23,7 +23,7 @@ set (HLR_SOURCE_FILES ${HLR_SRC_DIR}/HLRApp.cpp ${HLR_SRC_DIR}/SelectionDialog.cpp ${HLR_SRC_DIR}/StdAfx.cpp ) -set (HLR_RESOURCE_DIR ${MFC_STANDARD_SAMPLES_DIR}/08_HLR/res) +set (HLR_RESOURCE_DIR ${MFC_STANDARD_SAMPLES_DIR}/04_HLR/res) set (HLR_RESOURCE_HEADER ${HLR_RESOURCE_DIR}/resource.h) set (HLR_RESOURCE_FILES ${HLR_RESOURCE_DIR}/axoviewd.bmp ${HLR_RESOURCE_DIR}/axoviewf.bmp diff --git a/samples/mfc/standard/mfcsample/CMakeLists.txt b/samples/mfc/standard/mfcsample/CMakeLists.txt index c49edb6788..21e2ec4029 100644 --- a/samples/mfc/standard/mfcsample/CMakeLists.txt +++ b/samples/mfc/standard/mfcsample/CMakeLists.txt @@ -82,7 +82,6 @@ set (COMMON_HEADER_FILES ${MFC_STANDARD_COMMON_SAMPLES_DIR}/AISDialogs.h ${MFC_STANDARD_COMMON_SAMPLES_DIR}/OCC_StereoConfigDlg.h ${MFC_STANDARD_COMMON_SAMPLES_DIR}/ParamsFacesPage.h ${MFC_STANDARD_COMMON_SAMPLES_DIR}/ResultDialog.h - ${MFC_STANDARD_COMMON_SAMPLES_DIR}/User_Cylinder.hxx ${MFC_STANDARD_COMMON_SAMPLES_DIR}/ColoredMeshDlg.h ${MFC_STANDARD_COMMON_SAMPLES_DIR}/DimensionDlg.h ${MFC_STANDARD_COMMON_SAMPLES_DIR}/LengthParamsEdgePage.h From d83d72acf9ec66c0a847f5ae17aebbb0fd8c41dd Mon Sep 17 00:00:00 2001 From: dpasukhi Date: Thu, 5 Sep 2024 14:42:43 +0000 Subject: [PATCH 598/639] 0033805: Configuration - Implement GitHub Actions build scripts Enable MSVC code analyzing to push SARIF files --- .github/workflows/codemsvc.yml | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/.github/workflows/codemsvc.yml b/.github/workflows/codemsvc.yml index 1972c754f6..a69792fe86 100644 --- a/.github/workflows/codemsvc.yml +++ b/.github/workflows/codemsvc.yml @@ -56,14 +56,7 @@ jobs: # ignoredPaths: ${{ github.workspace }}/dependencies;${{ github.workspace }}/test # Upload SARIF file to GitHub Code Scanning Alerts - #- name: Upload SARIF to GitHub - # uses: github/codeql-action/upload-sarif@v3.26.5 - # with: - # sarif_file: ${{ steps.run-analysis.outputs.sarif }} - - # Upload SARIF file as an Artifact to download and view - - name: Upload SARIF as an Artifact - uses: actions/upload-artifact@v4.3.6 + - name: Upload SARIF to GitHub + uses: github/codeql-action/upload-sarif@v3.26.5 with: - name: sarif-file - path: ${{ steps.run-analysis.outputs.sarif }} + sarif_file: ${{ steps.run-analysis.outputs.sarif }} From 2ab4e9e18045c3fd7d57ee6c5f060320eab2aa04 Mon Sep 17 00:00:00 2001 From: reciprocal Date: Thu, 16 May 2024 16:29:06 +0200 Subject: [PATCH 599/639] 0033319: Coding - Static linking fails with unresolved symbols due to linking order and missing transitive dependencies The absence of target_link_libraries calls for static libraries caused CMake to fail in modeling the link dependencies correctly. This fix ensures that CMake correctly exports the dependencies in OpenCASCADEConfig.cmake and resolves downstream linking errors for projects that link against static OpenCASCADE libraries. --- adm/cmake/occt_toolkit.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/adm/cmake/occt_toolkit.cmake b/adm/cmake/occt_toolkit.cmake index c9399159f1..ead767a844 100644 --- a/adm/cmake/occt_toolkit.cmake +++ b/adm/cmake/occt_toolkit.cmake @@ -479,8 +479,8 @@ if (BUILD_SHARED_LIBS OR EXECUTABLE_PROJECT) if(IS_VTK_9XX) string (REGEX REPLACE "vtk" "VTK::" USED_TOOLKITS_BY_CURRENT_PROJECT "${USED_TOOLKITS_BY_CURRENT_PROJECT}") endif() - target_link_libraries (${PROJECT_NAME} ${USED_TOOLKITS_BY_CURRENT_PROJECT} ${USED_EXTERNAL_LIBS_BY_CURRENT_PROJECT}) endif() +target_link_libraries (${PROJECT_NAME} ${USED_TOOLKITS_BY_CURRENT_PROJECT} ${USED_EXTERNAL_LIBS_BY_CURRENT_PROJECT}) if (USE_QT) foreach (PROJECT_LIBRARY_DEBUG ${PROJECT_LIBRARIES_DEBUG}) From ed20837d8bfaa5af2c7580225fefcc5d7f24f4d3 Mon Sep 17 00:00:00 2001 From: dpasukhi Date: Fri, 6 Sep 2024 20:22:00 +0000 Subject: [PATCH 600/639] 0033703: Data Exchange, Step Export - Transfer edge speed improvement Move optional code close to use case to avoid extra calculation --- src/TopoDSToStep/TopoDSToStep_MakeStepEdge.cxx | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/TopoDSToStep/TopoDSToStep_MakeStepEdge.cxx b/src/TopoDSToStep/TopoDSToStep_MakeStepEdge.cxx index dcf86c2ddb..b5696cc101 100644 --- a/src/TopoDSToStep/TopoDSToStep_MakeStepEdge.cxx +++ b/src/TopoDSToStep/TopoDSToStep_MakeStepEdge.cxx @@ -134,9 +134,6 @@ void TopoDSToStep_MakeStepEdge::Init(const TopoDS_Edge& aEdge, if ( count < 2 ) isSeam = Standard_False; } - BRepAdaptor_Curve CA = BRepAdaptor_Curve(aEdge); - BRepAdaptor_Surface SA = BRepAdaptor_Surface(aTool.CurrentFace()); - if (aEdge.Orientation() == TopAbs_INTERNAL || aEdge.Orientation() == TopAbs_EXTERNAL ) { Handle(TransferBRep_ShapeMapper) errShape = @@ -184,7 +181,7 @@ void TopoDSToStep_MakeStepEdge::Init(const TopoDS_Edge& aEdge, // --------------------------------------- // Translate 3D representation of the Edge // --------------------------------------- - + BRepAdaptor_Curve CA = BRepAdaptor_Curve(aEdge); Handle(StepGeom_Curve) Gpms; Handle(Geom_Curve) C = CA.Curve().Curve(); @@ -262,6 +259,8 @@ void TopoDSToStep_MakeStepEdge::Init(const TopoDS_Edge& aEdge, #ifdef OCCT_DEBUG std::cout << "Warning: TopoDSToStep_MakeStepEdge: edge without 3d curve; creating..." << std::endl; #endif + BRepAdaptor_Surface SA = BRepAdaptor_Surface(aTool.CurrentFace()); + if ((SA.GetType() == GeomAbs_Plane) && (CA.GetType() == GeomAbs_Line)) { U1 = CA.FirstParameter(); From 392ba7dbb600d3a0622cde448e84c9904c60f9b5 Mon Sep 17 00:00:00 2001 From: dpasukhi Date: Sat, 7 Sep 2024 08:51:11 +0000 Subject: [PATCH 601/639] Coding - Image_AlienPixMap unused parameters --- src/Image/Image_AlienPixMap.cxx | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/Image/Image_AlienPixMap.cxx b/src/Image/Image_AlienPixMap.cxx index 3ee7570e5c..a2b7f2d156 100644 --- a/src/Image/Image_AlienPixMap.cxx +++ b/src/Image/Image_AlienPixMap.cxx @@ -1251,6 +1251,7 @@ bool Image_AlienPixMap::Save (Standard_Byte* theBuffer, } return true; #else + (void)theLength; if (theBuffer != NULL) { Message::SendFail ("Error: no image library available"); @@ -1450,6 +1451,8 @@ bool Image_AlienPixMap::Save (std::ostream& theStream, const TCollection_AsciiSt } return true; #else + (void)theExtension; + (void)theStream; Message::SendFail ("Error: no image library available"); return false; #endif From 33339b0dc24971d6e52d3264702232e63bc5a461 Mon Sep 17 00:00:00 2001 From: dpasukhi Date: Sat, 7 Sep 2024 09:12:01 +0000 Subject: [PATCH 602/639] Coding - GeomConvert_CurveToAnaCurve warnings fix --- src/GeomConvert/GeomConvert_CurveToAnaCurve.cxx | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/src/GeomConvert/GeomConvert_CurveToAnaCurve.cxx b/src/GeomConvert/GeomConvert_CurveToAnaCurve.cxx index 3038e88dfa..b336e3741f 100644 --- a/src/GeomConvert/GeomConvert_CurveToAnaCurve.cxx +++ b/src/GeomConvert/GeomConvert_CurveToAnaCurve.cxx @@ -41,6 +41,7 @@ #include #include +#include GeomConvert_CurveToAnaCurve::GeomConvert_CurveToAnaCurve(): myGap(Precision::Infinite()), @@ -650,15 +651,15 @@ Handle(Geom_Curve) GeomConvert_CurveToAnaCurve::ComputeCurve(const Handle(Geom_C const GeomConvert_ConvType theConvType, const GeomAbs_CurveType theTarget) { cf = c1; cl = c2; - Handle(Geom_Curve) c3d, newc3d[3]; - Standard_Integer i, imin = -1; - c3d = theC3d; - if (c3d.IsNull()) return newc3d[imin]; + std::array newc3d = {}; + Handle(Geom_Curve) c3d = theC3d; + if (c3d.IsNull()) return c3d; gp_Pnt P1 = c3d->Value(c1); gp_Pnt P2 = c3d->Value(c2); gp_Pnt P3 = c3d->Value(c1 + (c2 - c1) / 2); - Standard_Real d[3] = { RealLast(), RealLast(), RealLast() }; - Standard_Real fp[3], lp[3]; + std::array d = { RealLast(), RealLast(), RealLast() }; + std::array fp = {}; + std::array lp = {}; if (c3d->IsKind(STANDARD_TYPE(Geom_TrimmedCurve))) { Handle(Geom_TrimmedCurve) aTc = Handle(Geom_TrimmedCurve)::DownCast(c3d); @@ -723,7 +724,7 @@ Handle(Geom_Curve) GeomConvert_CurveToAnaCurve::ComputeCurve(const Handle(Geom_C // theConvType == GeomConvert_MinGap // recognition in case of small curve - imin = -1; + Standard_Integer imin = -1; if((P1.Distance(P2) < 2*tolerance) && (P1.Distance(P3) < 2*tolerance)) { newc3d[1] = ComputeCircle(c3d, tolerance, c1, c2, fp[1], lp[1], d[1]); newc3d[0] = ComputeLine(c3d, tolerance, c1, c2, fp[0], lp[0], d[0]); @@ -746,7 +747,7 @@ Handle(Geom_Curve) GeomConvert_CurveToAnaCurve::ComputeCurve(const Handle(Geom_C newc3d[2] = ComputeEllipse(c3d, tol, c1, c2, fp[2], lp[2], d[2]); } Standard_Real dd = RealLast(); - for (i = 0; i < 3; ++i) + for (Standard_Integer i = 0; i < 3; ++i) { if (newc3d[i].IsNull()) continue; if (d[i] < dd) From 6cb0b9b4e3ac43e0cb57fe3a5b8aea6e19356433 Mon Sep 17 00:00:00 2001 From: dpasukhi Date: Mon, 9 Sep 2024 18:46:32 +0000 Subject: [PATCH 603/639] Coding - Resolving C6263 warnings Reorganizing code to not call alloca inside loop. alloca allocated memory from stack and free after finishing function --- src/MeshVS/MeshVS_MeshPrsBuilder.cxx | 142 +++++++++++++++------------ 1 file changed, 80 insertions(+), 62 deletions(-) diff --git a/src/MeshVS/MeshVS_MeshPrsBuilder.cxx b/src/MeshVS/MeshVS_MeshPrsBuilder.cxx index 1f0268cfd2..5e24b64a54 100644 --- a/src/MeshVS/MeshVS_MeshPrsBuilder.cxx +++ b/src/MeshVS/MeshVS_MeshPrsBuilder.cxx @@ -50,6 +50,85 @@ IMPLEMENT_STANDARD_RTTIEXT(MeshVS_MeshPrsBuilder,MeshVS_PrsBuilder) +namespace +{ + //================================================================ + // Function : ProcessFace + // Purpose : Fill array with triangles for the face + //================================================================ + static void ProcessFace(const Handle(MeshVS_HArray1OfSequenceOfInteger)& theTopo, + const TColStd_Array1OfReal& theNodes, + const Standard_Real* theCenter, + const Standard_Real theShrinkCoef, + const Standard_Boolean theIsShrinked, + const Standard_Boolean theIsShaded, + Handle(Graphic3d_ArrayOfPrimitives) theArray) + { + for (Standard_Integer aFaceIdx = theTopo->Lower(); aFaceIdx <= theTopo->Upper(); ++aFaceIdx) + { + const TColStd_SequenceOfInteger& aFaceNodes = theTopo->Value (aFaceIdx); + const Standard_Integer aNbPolyNodes = aFaceNodes.Length(); + + Standard_Real* aPolyNodesBuf = (Standard_Real*) alloca ((3 * aNbPolyNodes + 1) * sizeof (Standard_Real)); + TColStd_Array1OfReal aPolyNodes (*aPolyNodesBuf, 0, 3 * aNbPolyNodes); + + for (Standard_Integer aNodeIdx = 0; aNodeIdx < aNbPolyNodes; ++aNodeIdx) + { + Standard_Integer anIdx = aFaceNodes.Value (aNodeIdx + 1); + + Standard_Real aX = theNodes.Value (theNodes.Lower() + 3 * anIdx + 0); + Standard_Real aY = theNodes.Value (theNodes.Lower() + 3 * anIdx + 1); + Standard_Real aZ = theNodes.Value (theNodes.Lower() + 3 * anIdx + 2); + + if (theIsShrinked) + { + aX = theCenter[0] + theShrinkCoef * (aX - theCenter[0]); + aY = theCenter[1] + theShrinkCoef * (aY - theCenter[1]); + aZ = theCenter[2] + theShrinkCoef * (aZ - theCenter[2]); + } + + aPolyNodes.SetValue (3 * aNodeIdx + 1, aX); + aPolyNodes.SetValue (3 * aNodeIdx + 2, aY); + aPolyNodes.SetValue (3 * aNodeIdx + 3, aZ); + } + + gp_Vec aNorm; + + if (theIsShaded) + { + aPolyNodes.SetValue (0, aNbPolyNodes); + + if (!MeshVS_Tool::GetAverageNormal (aPolyNodes, aNorm)) + { + aNorm.SetCoord (0.0, 0.0, 1.0); + } + } + + for (Standard_Integer aNodeIdx = 0; aNodeIdx < aNbPolyNodes - 2; ++aNodeIdx) // triangulate polygon + { + for (Standard_Integer aSubIdx = 0; aSubIdx < 3; ++aSubIdx) // generate sub-triangle + { + if (theIsShaded) + { + theArray->AddVertex (aPolyNodes.Value (3 * (aSubIdx == 0 ? 0 : (aNodeIdx + aSubIdx)) + 1), + aPolyNodes.Value (3 * (aSubIdx == 0 ? 0 : (aNodeIdx + aSubIdx)) + 2), + aPolyNodes.Value (3 * (aSubIdx == 0 ? 0 : (aNodeIdx + aSubIdx)) + 3), + aNorm.X(), + aNorm.Y(), + aNorm.Z()); + } + else + { + theArray->AddVertex (aPolyNodes.Value (3 * (aSubIdx == 0 ? 0 : (aNodeIdx + aSubIdx)) + 1), + aPolyNodes.Value (3 * (aSubIdx == 0 ? 0 : (aNodeIdx + aSubIdx)) + 2), + aPolyNodes.Value (3 * (aSubIdx == 0 ? 0 : (aNodeIdx + aSubIdx)) + 3)); + } + } + } + } + } +} + //================================================================ // Function : Constructor MeshVS_MeshPrsBuilder // Purpose : @@ -838,68 +917,7 @@ void MeshVS_MeshPrsBuilder::AddVolumePrs (const Handle(MeshVS_HArray1OfSequenceO if (aIsPolygons) { - for (Standard_Integer aFaceIdx = theTopo->Lower(), topoup = theTopo->Upper(); aFaceIdx <= topoup; ++aFaceIdx) - { - const TColStd_SequenceOfInteger& aFaceNodes = theTopo->Value (aFaceIdx); - const Standard_Integer aNbPolyNodes = aFaceNodes.Length(); - - Standard_Real* aPolyNodesBuf = (Standard_Real*) alloca ((3 * aNbPolyNodes + 1) * sizeof (Standard_Real)); - TColStd_Array1OfReal aPolyNodes (*aPolyNodesBuf, 0, 3 * aNbPolyNodes); - - for (Standard_Integer aNodeIdx = 0; aNodeIdx < aNbPolyNodes; ++aNodeIdx) - { - Standard_Integer anIdx = aFaceNodes.Value (aNodeIdx + 1); - - Standard_Real aX = theNodes.Value (aLow + 3 * anIdx + 0); - Standard_Real aY = theNodes.Value (aLow + 3 * anIdx + 1); - Standard_Real aZ = theNodes.Value (aLow + 3 * anIdx + 2); - - if (theIsShrinked) - { - aX = aCenter[0] + theShrinkCoef * (aX - aCenter[0]); - aY = aCenter[1] + theShrinkCoef * (aY - aCenter[1]); - aZ = aCenter[2] + theShrinkCoef * (aZ - aCenter[2]); - } - - aPolyNodes.SetValue (3 * aNodeIdx + 1, aX); - aPolyNodes.SetValue (3 * aNodeIdx + 2, aY); - aPolyNodes.SetValue (3 * aNodeIdx + 3, aZ); - } - - gp_Vec aNorm; - - if (theIsShaded) - { - aPolyNodes.SetValue (0, aNbPolyNodes); - - if (!MeshVS_Tool::GetAverageNormal (aPolyNodes, aNorm)) - { - aNorm.SetCoord (0.0, 0.0, 1.0); - } - } - - for (Standard_Integer aNodeIdx = 0; aNodeIdx < aNbPolyNodes - 2; ++aNodeIdx) // triangulate polygon - { - for (Standard_Integer aSubIdx = 0; aSubIdx < 3; ++aSubIdx) // generate sub-triangle - { - if (theIsShaded) - { - theArray->AddVertex (aPolyNodes.Value (3 * (aSubIdx == 0 ? 0 : (aNodeIdx + aSubIdx)) + 1), - aPolyNodes.Value (3 * (aSubIdx == 0 ? 0 : (aNodeIdx + aSubIdx)) + 2), - aPolyNodes.Value (3 * (aSubIdx == 0 ? 0 : (aNodeIdx + aSubIdx)) + 3), - aNorm.X(), - aNorm.Y(), - aNorm.Z()); - } - else - { - theArray->AddVertex (aPolyNodes.Value (3 * (aSubIdx == 0 ? 0 : (aNodeIdx + aSubIdx)) + 1), - aPolyNodes.Value (3 * (aSubIdx == 0 ? 0 : (aNodeIdx + aSubIdx)) + 2), - aPolyNodes.Value (3 * (aSubIdx == 0 ? 0 : (aNodeIdx + aSubIdx)) + 3)); - } - } - } - } + ProcessFace (theTopo, theNodes, aCenter, theShrinkCoef, theIsShrinked, theIsShaded, theArray); } else if (theIsSelected) { From 09a69618da8e972c82b6959a89c628e824942171 Mon Sep 17 00:00:00 2001 From: dpasukhi Date: Mon, 9 Sep 2024 18:57:50 +0000 Subject: [PATCH 604/639] Coding - Resolving C6287 & C6282 warnings Removing redundant code and incorrect operator --- src/FEmTool/FEmTool_ProfileMatrix.cxx | 7 ++++--- src/ViewerTest/ViewerTest_ViewerCommands.cxx | 3 +-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/FEmTool/FEmTool_ProfileMatrix.cxx b/src/FEmTool/FEmTool_ProfileMatrix.cxx index 1f4e900454..15c7681ab5 100644 --- a/src/FEmTool/FEmTool_ProfileMatrix.cxx +++ b/src/FEmTool/FEmTool_ProfileMatrix.cxx @@ -108,7 +108,7 @@ FEmTool_ProfileMatrix::FEmTool_ProfileMatrix(const TColStd_Array1OfInteger& Firs SMA--; const Standard_Real * PM = &ProfileMatrix->Value(1); PM--; - + IsDecomp = Standard_False; for(j = 1; j <= RowNumber(); j++) { DiagAddr = profile(2, j); Kj = j - profile(1, j); @@ -118,7 +118,7 @@ FEmTool_ProfileMatrix::FEmTool_ProfileMatrix(const TColStd_Array1OfInteger& Firs a = PM[DiagAddr] - Sum; if(a < Eps) { - return IsDecomp = Standard_False;// Matrix is not positive defined + return Standard_False;// Matrix is not positive defined } a = Sqrt(a); SMA[DiagAddr] = a; @@ -139,7 +139,8 @@ FEmTool_ProfileMatrix::FEmTool_ProfileMatrix(const TColStd_Array1OfInteger& Firs SMA[CurrAddr] = (PM[CurrAddr] - Sum)/a; } } - return IsDecomp = Standard_True; + IsDecomp = Standard_True; + return IsDecomp; } //======================================================================= diff --git a/src/ViewerTest/ViewerTest_ViewerCommands.cxx b/src/ViewerTest/ViewerTest_ViewerCommands.cxx index 630ac437f4..ef3f96aa70 100644 --- a/src/ViewerTest/ViewerTest_ViewerCommands.cxx +++ b/src/ViewerTest/ViewerTest_ViewerCommands.cxx @@ -12619,8 +12619,7 @@ static int VManipulator (Draw_Interpretor& theDi, { anAttachOptions.SetAdjustSize (Draw::ParseOnOffNoIterator (theArgsNb, theArgVec, anArgIter) ? 1 : 0); } - else if (anArg == "-enablemodes" - || anArg == "-enablemodes") + else if (anArg == "-enablemodes") { anAttachOptions.SetEnableModes (Draw::ParseOnOffNoIterator (theArgsNb, theArgVec, anArgIter) ? 1 : 0); } From 4ab54d60ef8f3f5d67f173271964619a43ce539e Mon Sep 17 00:00:00 2001 From: dpasukhi Date: Mon, 9 Sep 2024 18:23:10 +0000 Subject: [PATCH 605/639] Coding - Resolving C26498 warning C26498 - marking variables constexpr to improve performance --- .../BRepBuilderAPI_FastSewing.cxx | 2 +- src/Bnd/Bnd_Box.cxx | 4 +-- src/BndLib/BndLib_AddSurface.cxx | 2 +- src/GccAna/GccAna_Lin2dTanPer.cxx | 4 +-- src/Graphic3d/Graphic3d_Structure.cxx | 8 +++--- src/IntTools/IntTools_FaceFace.cxx | 2 +- src/LocOpe/LocOpe_CSIntersector.cxx | 4 +-- src/MeshVS/MeshVS_NodalColorPrsBuilder.cxx | 3 +- src/QABugs/QABugs_11.cxx | 28 +++++++++++++------ src/Standard/Standard_ShortReal.hxx | 5 ++-- .../TopOpeBRepTool_ShapeTool.cxx | 3 +- src/math/math_BissecNewton.cxx | 2 +- 12 files changed, 39 insertions(+), 28 deletions(-) diff --git a/src/BRepBuilderAPI/BRepBuilderAPI_FastSewing.cxx b/src/BRepBuilderAPI/BRepBuilderAPI_FastSewing.cxx index a4ac6438fc..712847cc0d 100644 --- a/src/BRepBuilderAPI/BRepBuilderAPI_FastSewing.cxx +++ b/src/BRepBuilderAPI/BRepBuilderAPI_FastSewing.cxx @@ -43,7 +43,7 @@ static Standard_Integer IntersectionOfSets( const NCollection_List& theSet1, const NCollection_List& theSet2) { - const Standard_Integer anIntMax = IntegerLast(); + constexpr Standard_Integer anIntMax = IntegerLast(); Standard_Integer aRetVal = anIntMax; for(NCollection_List::Iterator anIt1 = theSet1.begin().Iterator(); diff --git a/src/Bnd/Bnd_Box.cxx b/src/Bnd/Bnd_Box.cxx index eba846a5f5..370db15bbc 100644 --- a/src/Bnd/Bnd_Box.cxx +++ b/src/Bnd/Bnd_Box.cxx @@ -720,7 +720,7 @@ static Standard_Boolean IsSegmentOut(Standard_Real x1,Standard_Real y1, Standard_Real xs1,Standard_Real ys1, Standard_Real xs2,Standard_Real ys2) { - Standard_Real eps = RealSmall(); + constexpr Standard_Real eps = RealSmall(); Standard_Real xsmin = Min (xs1, xs2); Standard_Real xsmax = Max (xs1, xs2); Standard_Real ysmin = Min (ys1, ys2); @@ -765,7 +765,7 @@ Standard_Boolean Bnd_Box::IsOut(const gp_Pnt& P1, const gp_Pnt& P2, const gp_Dir if (IsWhole()) return Standard_False; else if (IsVoid()) return Standard_True; - Standard_Real eps = RealSmall(); + constexpr Standard_Real eps = RealSmall(); Standard_Real myXmin, myYmin, myZmin, myXmax, myYmax, myZmax; Get (myXmin, myYmin, myZmin, myXmax, myYmax, myZmax); diff --git a/src/BndLib/BndLib_AddSurface.cxx b/src/BndLib/BndLib_AddSurface.cxx index e02780b13a..9a9bc53acc 100644 --- a/src/BndLib/BndLib_AddSurface.cxx +++ b/src/BndLib/BndLib_AddSurface.cxx @@ -180,7 +180,7 @@ static void TreatInfinitePlane(const gp_Pln &aPlane, { // Get 3 coordinate axes of the plane. const gp_Dir &aNorm = aPlane.Axis().Direction(); - const Standard_Real anAngularTol = RealEpsilon(); + constexpr Standard_Real anAngularTol = RealEpsilon(); // Get location of the plane as its barycenter gp_Pnt aLocation = BaryCenter(aPlane, aUMin, aUMax, aVMin, aVMax); diff --git a/src/GccAna/GccAna_Lin2dTanPer.cxx b/src/GccAna/GccAna_Lin2dTanPer.cxx index fc30993b7d..6b1433311e 100644 --- a/src/GccAna/GccAna_Lin2dTanPer.cxx +++ b/src/GccAna/GccAna_Lin2dTanPer.cxx @@ -99,7 +99,7 @@ GccAna_Lin2dTanPer:: IntAna2d_AnaIntersection Intp(linsol(1),TheCircle); if (Intp.IsDone()) { if (!Intp.IsEmpty()) { - Standard_Real maxdist = RealLast(); + constexpr Standard_Real maxdist = RealLast(); for (Standard_Integer i = 1 ; i <= Intp.NbPoints() ; i++) { if (Intp.Point(i).Value().Distance(ThePnt) < maxdist) { pntint2sol(1) = Intp.Point(i).Value(); @@ -244,7 +244,7 @@ GccAna_Lin2dTanPer:: IntAna2d_AnaIntersection Intp(linsol(NbrSol),TheCircle); if (Intp.IsDone()) { if (!Intp.IsEmpty()) { - Standard_Real maxdist = RealLast(); + constexpr Standard_Real maxdist = RealLast(); for (Standard_Integer i = 1 ; i <= Intp.NbPoints() ; i++) { if (Intp.Point(i).Value().Distance(pnttg1sol(NbrSol)) < maxdist) { pntint2sol(NbrSol) = Intp.Point(i).Value(); diff --git a/src/Graphic3d/Graphic3d_Structure.cxx b/src/Graphic3d/Graphic3d_Structure.cxx index eace8db06f..e4ff9c89bf 100644 --- a/src/Graphic3d/Graphic3d_Structure.cxx +++ b/src/Graphic3d/Graphic3d_Structure.cxx @@ -668,8 +668,8 @@ Bnd_Box Graphic3d_Structure::MinMaxValues (const Standard_Boolean theToIgnoreInf aResult.Update (aBox.CornerMin().x(), aBox.CornerMin().y(), aBox.CornerMin().z(), aBox.CornerMax().x(), aBox.CornerMax().y(), aBox.CornerMax().z()); - Standard_Real aLimMin = ShortRealFirst() + 1.0; - Standard_Real aLimMax = ShortRealLast() - 1.0; + constexpr Standard_Real aLimMin = ShortRealFirst() + 1.0; + constexpr Standard_Real aLimMax = ShortRealLast() - 1.0; gp_Pnt aMin = aResult.CornerMin(); gp_Pnt aMax = aResult.CornerMax(); if (aMin.X() < aLimMin && aMin.Y() < aLimMin && aMin.Z() < aLimMin @@ -847,8 +847,8 @@ void Graphic3d_Structure::Transforms (const gp_Trsf& theTrsf, const Standard_Real theX, const Standard_Real theY, const Standard_Real theZ, Standard_Real& theNewX, Standard_Real& theNewY, Standard_Real& theNewZ) { - const Standard_Real aRL = RealLast(); - const Standard_Real aRF = RealFirst(); + constexpr Standard_Real aRL = RealLast(); + constexpr Standard_Real aRF = RealFirst(); theNewX = theX; theNewY = theY; theNewZ = theZ; diff --git a/src/IntTools/IntTools_FaceFace.cxx b/src/IntTools/IntTools_FaceFace.cxx index d2c99d7acb..3299a49e29 100644 --- a/src/IntTools/IntTools_FaceFace.cxx +++ b/src/IntTools/IntTools_FaceFace.cxx @@ -977,7 +977,7 @@ void IntTools_FaceFace::MakeCurve(const Standard_Integer Index, fprm=aSeqFprm(i); lprm=aSeqLprm(i); // - Standard_Real aRealEpsilon=RealEpsilon(); + constexpr Standard_Real aRealEpsilon=RealEpsilon(); if (Abs(fprm) > aRealEpsilon || Abs(lprm-2.*M_PI) > aRealEpsilon) { //============================================== //// diff --git a/src/LocOpe/LocOpe_CSIntersector.cxx b/src/LocOpe/LocOpe_CSIntersector.cxx index bc4ef66d29..26cf667e8b 100644 --- a/src/LocOpe/LocOpe_CSIntersector.cxx +++ b/src/LocOpe/LocOpe_CSIntersector.cxx @@ -89,8 +89,8 @@ void LocOpe_CSIntersector::Perform(const LocOpe_SequenceOfLin& Slin) myPoints = (LocOpe_SequenceOfPntFace *) new LocOpe_SequenceOfPntFace[myNbelem]; - Standard_Real binf = RealFirst(); - Standard_Real bsup = RealLast(); + constexpr Standard_Real binf = RealFirst(); + constexpr Standard_Real bsup = RealLast(); TopExp_Explorer exp(myShape,TopAbs_FACE); for (; exp.More(); exp.Next()) { const TopoDS_Face& theface = TopoDS::Face(exp.Current()); diff --git a/src/MeshVS/MeshVS_NodalColorPrsBuilder.cxx b/src/MeshVS/MeshVS_NodalColorPrsBuilder.cxx index 01ece0cefe..655edb7966 100644 --- a/src/MeshVS/MeshVS_NodalColorPrsBuilder.cxx +++ b/src/MeshVS/MeshVS_NodalColorPrsBuilder.cxx @@ -79,7 +79,8 @@ class MeshVS_ImageTexture2D : public Graphic3d_Texture2D static inline Standard_Integer getNearestPow2( Standard_Integer theValue ) { // Precaution against overflow - Standard_Integer aHalfMax = IntegerLast() >> 1, aRes = 1; + constexpr Standard_Integer aHalfMax = IntegerLast() >> 1; + Standard_Integer aRes = 1; if ( theValue > aHalfMax ) theValue = aHalfMax; while ( aRes < theValue ) aRes <<= 1; return aRes; diff --git a/src/QABugs/QABugs_11.cxx b/src/QABugs/QABugs_11.cxx index e84883a962..d871614a92 100644 --- a/src/QABugs/QABugs_11.cxx +++ b/src/QABugs/QABugs_11.cxx @@ -2187,10 +2187,20 @@ static Standard_Integer OCC6143 (Draw_Interpretor& di, Standard_Integer argc, co di << "(Integer) Overflow..."; //std::cout.flush(); di << "\n"; - Standard_Integer res, i=IntegerLast(); - res = i + 1; - //++++ std::cout << " -- "< tolm ) BL.Normal(N); diff --git a/src/math/math_BissecNewton.cxx b/src/math/math_BissecNewton.cxx index 88eecc5a2e..db12892719 100644 --- a/src/math/math_BissecNewton.cxx +++ b/src/math/math_BissecNewton.cxx @@ -67,7 +67,7 @@ void math_BissecNewton::Perform(math_FunctionWithDerivative& F, return; } // Modified by Sergey KHROMOV - Wed Jan 22 12:06:45 2003 Begin - Standard_Real aFTol = RealEpsilon(); + constexpr Standard_Real aFTol = RealEpsilon(); // if(fl * fh >= 0.0) { if(fl * fh > aFTol*aFTol) { From 9c6914c3cc7642b508e78a3515415e38cfc68367 Mon Sep 17 00:00:00 2001 From: dpasukhi Date: Mon, 9 Sep 2024 19:14:00 +0000 Subject: [PATCH 606/639] Coding - Resolving C6319 warning Use of the comma-operator in a tested expression causes the left argument to be ignored when it has no side-effects. --- src/TopOpeBRep/TopOpeBRep_ProcessSectionEdges.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/TopOpeBRep/TopOpeBRep_ProcessSectionEdges.cxx b/src/TopOpeBRep/TopOpeBRep_ProcessSectionEdges.cxx index bbec44f579..d066436fbf 100644 --- a/src/TopOpeBRep/TopOpeBRep_ProcessSectionEdges.cxx +++ b/src/TopOpeBRep/TopOpeBRep_ProcessSectionEdges.cxx @@ -312,7 +312,7 @@ void TopOpeBRep_FacesFiller::ProcessSectionEdges() // ajout des aretes de section dans la DS de shape,connaissant leur rank for (itLES.Initialize(LES),itLOI.Initialize(LOI); - itLES.More(),itLOI.More(); + itLES.More() && itLOI.More(); itLES.Next(),itLOI.Next()) { const TopoDS_Shape& E1 = itLES.Value(); Standard_Integer rE1 = itLOI.Value(); From 72b244bc98f055ac892e69c91a3caaa174c9bcb9 Mon Sep 17 00:00:00 2001 From: dpasukhi Date: Tue, 10 Sep 2024 17:40:12 +0000 Subject: [PATCH 607/639] Coding - Resolving C26439 & type formatting warnings Sprintf with %s always convert values into char*, not safety from int. Move operators and constructors can be marked as noexcept --- src/BOPTest/BOPTest_BOPCommands.cxx | 8 ++------ src/NCollection/NCollection_DynamicArray.hxx | 2 +- src/NCollection/NCollection_UtfString.hxx | 2 +- src/NCollection/NCollection_UtfString.lxx | 2 +- 4 files changed, 5 insertions(+), 9 deletions(-) diff --git a/src/BOPTest/BOPTest_BOPCommands.cxx b/src/BOPTest/BOPTest_BOPCommands.cxx index 7ea2cdb65a..e870df16ac 100644 --- a/src/BOPTest/BOPTest_BOPCommands.cxx +++ b/src/BOPTest/BOPTest_BOPCommands.cxx @@ -229,7 +229,6 @@ Standard_Integer bopsmt(Draw_Interpretor& di, return 0; } // - char buf[64]; Standard_Boolean bRunParallel; Standard_Integer aNb; BOPAlgo_BOP aBOP; @@ -237,8 +236,7 @@ Standard_Integer bopsmt(Draw_Interpretor& di, const TopTools_ListOfShape& aLC=pPF->Arguments(); aNb=aLC.Extent(); if (aNb!=2) { - Sprintf (buf, " wrong number of arguments %s\n", aNb); - di << buf; + di << " wrong number of arguments " << aNb << '\n'; return 0; } // @@ -298,7 +296,6 @@ Standard_Integer bopsection(Draw_Interpretor& di, return 0; } // - char buf[64]; Standard_Boolean bRunParallel; Standard_Integer aNb; BOPAlgo_Section aBOP; @@ -306,8 +303,7 @@ Standard_Integer bopsection(Draw_Interpretor& di, const TopTools_ListOfShape& aLC=pPF->Arguments(); aNb=aLC.Extent(); if (aNb!=2) { - Sprintf (buf, " wrong number of arguments %s\n", aNb); - di << buf; + di << " wrong number of arguments " << aNb << '\n'; return 0; } // diff --git a/src/NCollection/NCollection_DynamicArray.hxx b/src/NCollection/NCollection_DynamicArray.hxx index ac93f52908..fa303e4f80 100644 --- a/src/NCollection/NCollection_DynamicArray.hxx +++ b/src/NCollection/NCollection_DynamicArray.hxx @@ -240,7 +240,7 @@ public: //! @name public methods } //! Assignment operator - NCollection_DynamicArray& operator= (NCollection_DynamicArray&& theOther) + NCollection_DynamicArray& operator= (NCollection_DynamicArray&& theOther) noexcept { return Assign(std::forward(theOther)); } diff --git a/src/NCollection/NCollection_UtfString.hxx b/src/NCollection/NCollection_UtfString.hxx index 58792a5dea..a3fe1da1a9 100755 --- a/src/NCollection/NCollection_UtfString.hxx +++ b/src/NCollection/NCollection_UtfString.hxx @@ -81,7 +81,7 @@ public: NCollection_UtfString (const NCollection_UtfString& theCopy); //! Move constructor - NCollection_UtfString (NCollection_UtfString&& theOther); + NCollection_UtfString (NCollection_UtfString&& theOther) noexcept; //! Copy constructor from UTF-8 string. //! @param theCopyUtf8 UTF-8 string to copy diff --git a/src/NCollection/NCollection_UtfString.lxx b/src/NCollection/NCollection_UtfString.lxx index 839b86bc78..4409840f65 100755 --- a/src/NCollection/NCollection_UtfString.lxx +++ b/src/NCollection/NCollection_UtfString.lxx @@ -95,7 +95,7 @@ NCollection_UtfString::NCollection_UtfString (const NCollection_UtfString& // purpose : // ======================================================================= template inline -NCollection_UtfString::NCollection_UtfString (NCollection_UtfString&& theOther) +NCollection_UtfString::NCollection_UtfString (NCollection_UtfString&& theOther) noexcept : myString(theOther.myString), mySize (theOther.mySize), myLength(theOther.myLength) From a52ee17c7316a29d9870a71a64fb13280591813f Mon Sep 17 00:00:00 2001 From: dpasukhi Date: Wed, 11 Sep 2024 15:13:10 +0000 Subject: [PATCH 608/639] Coding - Precision.hxx file optimization Precision.hxx optimized to have compiler-time constants for the most common floating-point values. Reorganized code to avoid static jumping for parametric. --- src/Precision/Precision.hxx | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/src/Precision/Precision.hxx b/src/Precision/Precision.hxx index b3843c28cd..c5d851d642 100644 --- a/src/Precision/Precision.hxx +++ b/src/Precision/Precision.hxx @@ -118,7 +118,7 @@ public: //! you can use : //! If ( Abs( D1.D2 ) < Precision::Angular() ) ... //! (although the function IsNormal does exist). - static Standard_Real Angular() { return 1.e-12; } + static constexpr Standard_Real Angular() { return 1.e-12; } //! Returns the recommended precision value when //! checking coincidence of two points in real space. @@ -160,11 +160,11 @@ public: //! distance (1 / 10 millimeter). This distance //! becomes easily measurable, but only within a restricted //! space which contains some small objects of the complete scene. - static Standard_Real Confusion() { return 1.e-7; } + static constexpr Standard_Real Confusion() { return 1.e-7; } //! Returns square of Confusion. //! Created for speed and convenience. - static Standard_Real SquareConfusion() { return Confusion() * Confusion(); } + static constexpr Standard_Real SquareConfusion() { return Confusion() * Confusion(); } //! Returns the precision value in real space, frequently //! used by intersection algorithms to decide that a solution is reached. @@ -188,7 +188,7 @@ public: //! The tolerance of intersection is equal to : //! Precision::Confusion() / 100. //! (that is, 1.e-9). - static Standard_Real Intersection() { return Confusion() * 0.01; } + static constexpr Standard_Real Intersection() { return Confusion() * 0.01; } //! Returns the precision value in real space, frequently used //! by approximation algorithms. @@ -203,14 +203,14 @@ public: //! (that is, 1.e-6). //! You may use a smaller tolerance in an approximation //! algorithm, but this option might be costly. - static Standard_Real Approximation() { return Confusion() * 10.0; } + static constexpr Standard_Real Approximation() { return Confusion() * 10.0; } //! Convert a real space precision to a parametric //! space precision. is the mean value of the //! length of the tangent of the curve or the surface. //! //! Value is P / T - static Standard_Real Parametric (const Standard_Real P, const Standard_Real T) { return P / T; } + static inline Standard_Real Parametric (const Standard_Real P, const Standard_Real T) { return P / T; } //! Returns a precision value in parametric space, which may be used : //! - to test the coincidence of two points in the real space, @@ -256,11 +256,11 @@ public: //! 2.Pi without impacting on the resulting point. //! Therefore, take great care when adjusting a parametric //! tolerance to your own algorithm. - static Standard_Real PConfusion (const Standard_Real T) { return Parametric (Confusion(), T); } + static inline Standard_Real PConfusion (const Standard_Real T) { return Parametric (Confusion(), T); } //! Returns square of PConfusion. //! Created for speed and convenience. - static Standard_Real SquarePConfusion() { return PConfusion() * PConfusion(); } + static constexpr Standard_Real SquarePConfusion() { return PConfusion() * PConfusion(); } //! Returns a precision value in parametric space, which //! may be used by intersection algorithms, to decide that @@ -275,7 +275,7 @@ public: //! segment whose length is equal to 100. (default value), or T. //! The parametric tolerance of intersection is equal to : //! - Precision::Intersection() / 100., or Precision::Intersection() / T. - static Standard_Real PIntersection (const Standard_Real T) { return Parametric(Intersection(),T); } + static inline Standard_Real PIntersection (const Standard_Real T) { return Parametric(Intersection(),T); } //! Returns a precision value in parametric space, which may //! be used by approximation algorithms. The purpose of this @@ -290,47 +290,47 @@ public: //! segment whose length is equal to 100. (default value), or T. //! The parametric tolerance of intersection is equal to : //! - Precision::Approximation() / 100., or Precision::Approximation() / T. - static Standard_Real PApproximation (const Standard_Real T) { return Parametric(Approximation(),T); } + static inline Standard_Real PApproximation (const Standard_Real T) { return Parametric(Approximation(),T); } //! Convert a real space precision to a parametric //! space precision on a default curve. //! //! Value is Parametric(P,1.e+2) - static Standard_Real Parametric (const Standard_Real P) { return Parametric (P, 100.0); } + static inline Standard_Real Parametric (const Standard_Real P) { return P * 0.01; } //! Used to test distances in parametric space on a //! default curve. //! //! This is Precision::Parametric(Precision::Confusion()) - static Standard_Real PConfusion() { return Parametric (Confusion()); } + static constexpr Standard_Real PConfusion() { return Confusion() * 0.01; } //! Used for Intersections in parametric space on a //! default curve. //! //! This is Precision::Parametric(Precision::Intersection()) - static Standard_Real PIntersection() { return Parametric (Intersection()); } + static constexpr Standard_Real PIntersection() { return Intersection() * 0.01; } //! Used for Approximations in parametric space on a //! default curve. //! //! This is Precision::Parametric(Precision::Approximation()) - static Standard_Real PApproximation() { return Parametric (Approximation()); } + static constexpr Standard_Real PApproximation() { return Approximation() * 0.01; } //! Returns True if R may be considered as an infinite //! number. Currently Abs(R) > 1e100 - static Standard_Boolean IsInfinite (const Standard_Real R) { return Abs (R) >= (0.5 * Precision::Infinite()); } + static inline Standard_Boolean IsInfinite (const Standard_Real R) { return Abs (R) >= (0.5 * Precision::Infinite()); } //! Returns True if R may be considered as a positive //! infinite number. Currently R > 1e100 - static Standard_Boolean IsPositiveInfinite (const Standard_Real R) { return R >= (0.5 * Precision::Infinite()); } + static inline Standard_Boolean IsPositiveInfinite (const Standard_Real R) { return R >= (0.5 * Precision::Infinite()); } //! Returns True if R may be considered as a negative //! infinite number. Currently R < -1e100 - static Standard_Boolean IsNegativeInfinite (const Standard_Real R) { return R <= -(0.5 * Precision::Infinite()); } + static inline Standard_Boolean IsNegativeInfinite (const Standard_Real R) { return R <= -(0.5 * Precision::Infinite()); } //! Returns a big number that can be considered as //! infinite. Use -Infinite() for a negative big number. - static Standard_Real Infinite() { return 2.e+100; } + static constexpr Standard_Real Infinite() { return 2.e+100; } }; From d0e33902bca4b5eb83b0f88679594f6dc901d4a7 Mon Sep 17 00:00:00 2001 From: oan Date: Mon, 26 Aug 2024 19:39:42 +0100 Subject: [PATCH 609/639] 0033806: Shape Healing - ShapeCustom optimization while rebuilding compounds Avoid double binding of shapes to context. Take all changes into account by reshape --- src/ShapeCustom/ShapeCustom.cxx | 31 ++++++++++++++++++++++--------- 1 file changed, 22 insertions(+), 9 deletions(-) diff --git a/src/ShapeCustom/ShapeCustom.cxx b/src/ShapeCustom/ShapeCustom.cxx index a5e8dd29d8..61309e419f 100644 --- a/src/ShapeCustom/ShapeCustom.cxx +++ b/src/ShapeCustom/ShapeCustom.cxx @@ -142,11 +142,7 @@ TopoDS_Shape ShapeCustom::ApplyModifier (const TopoDS_Shape &S, res = ApplyModifier (shape, M, context, MD, aRange, aReShape); } - if ( !res.IsSame (shape) ) - { - context.Bind (aShapeNoLoc, res.Located (TopLoc_Location())); - locModified = Standard_True; - } + locModified |= !res.IsSame (shape); B.Add (C, res); } @@ -162,10 +158,18 @@ TopoDS_Shape ShapeCustom::ApplyModifier (const TopoDS_Shape &S, return S; } - context.Bind ( SF, C ); + SF.Orientation (S.Orientation()); + C .Orientation (S.Orientation()); + + context.Bind (SF, C); + + C.Location (S.Location(), Standard_False); + + if (!aReShape.IsNull()) + { + aReShape->Replace (S, C); + } - C.Orientation (S.Orientation()); - C.Location (S.Location(), Standard_False); return C; } @@ -175,12 +179,21 @@ TopoDS_Shape ShapeCustom::ApplyModifier (const TopoDS_Shape &S, MD.Perform(M, aPS.Next()); if ( !aPS.More() || !MD.IsDone() ) return S; + + TopoDS_Shape aResult = MD.ModifiedShape (SF); + aResult.Orientation (S.Orientation()); + + if (!SF.IsSame (aResult)) + { + context.Bind (S.Located (TopLoc_Location()), aResult.Located (TopLoc_Location())); + } + if ( !aReShape.IsNull() ) { UpdateShapeBuild ( SF, MD, aReShape ); } - return MD.ModifiedShape(SF).Oriented(S.Orientation()); + return aResult; } From 72c6d55bf28cf08570fdd20e900626ab8aa9e78c Mon Sep 17 00:00:00 2001 From: dpasukhi Date: Tue, 10 Sep 2024 18:15:18 +0000 Subject: [PATCH 610/639] 0033765: Data Exchange, IGES Export - Missing Model Curves in transfer cache Curve list should be not unique, list is recommended. One curve can be used by multiple edges. --- src/BRepToIGESBRep/BRepToIGESBRep_Entity.cxx | 2 +- src/BRepToIGESBRep/BRepToIGESBRep_Entity.hxx | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/BRepToIGESBRep/BRepToIGESBRep_Entity.cxx b/src/BRepToIGESBRep/BRepToIGESBRep_Entity.cxx index 6d5ab9ad31..aaf3a0f034 100644 --- a/src/BRepToIGESBRep/BRepToIGESBRep_Entity.cxx +++ b/src/BRepToIGESBRep/BRepToIGESBRep_Entity.cxx @@ -234,7 +234,7 @@ Standard_Integer BRepToIGESBRep_Entity::AddEdge(const TopoDS_Edge& myedge, Standard_Integer index = myEdges.FindIndex(E); if (index == 0) { index = myEdges.Add(E); - myCurves.Add(C); + myCurves.Append(C); } return index; diff --git a/src/BRepToIGESBRep/BRepToIGESBRep_Entity.hxx b/src/BRepToIGESBRep/BRepToIGESBRep_Entity.hxx index 60332515c3..795884604e 100644 --- a/src/BRepToIGESBRep/BRepToIGESBRep_Entity.hxx +++ b/src/BRepToIGESBRep/BRepToIGESBRep_Entity.hxx @@ -23,6 +23,7 @@ #include #include +#include #include #include #include @@ -136,7 +137,7 @@ private: TopTools_IndexedMapOfShape myVertices; TopTools_IndexedMapOfShape myEdges; - TColStd_IndexedMapOfTransient myCurves; + TColStd_SequenceOfTransient myCurves; Handle(IGESSolid_EdgeList) myEdgeList; Handle(IGESSolid_VertexList) myVertexList; From 8082b955bd8d214620b71b949a5dc9857c2f45a0 Mon Sep 17 00:00:00 2001 From: dpasukhi Date: Sun, 22 Sep 2024 12:33:29 +0000 Subject: [PATCH 611/639] Coding - Reorganize code with constexpr #68 After rework Precision.hxx some local variables can be marked as constexpr --- src/AIS/AIS_ColorScale.cxx | 2 +- src/Adaptor3d/Adaptor3d_CurveOnSurface.cxx | 22 ++-- src/AdvApprox/AdvApprox_DichoCutting.cxx | 2 +- src/AdvApprox/AdvApprox_PrefAndRec.cxx | 2 +- src/AdvApprox/AdvApprox_PrefCutting.cxx | 2 +- src/AppDef/AppDef_Variational.cxx | 6 +- src/Approx/Approx_ComputeLine.gxx | 2 +- src/ApproxInt/ApproxInt_ImpPrmSvSurfaces.gxx | 2 +- src/ApproxInt/ApproxInt_MultiLine.gxx | 2 +- src/BOPTools/BOPTools_AlgoTools.cxx | 4 +- src/BOPTools/BOPTools_AlgoTools2D.cxx | 2 +- src/BRep/BRep_Tool.cxx | 6 +- src/BRepBndLib/BRepBndLib_1.cxx | 2 +- src/BRepCheck/BRepCheck_Edge.cxx | 4 +- src/BRepClass/BRepClass_FaceExplorer.cxx | 2 +- src/BRepClass3d/BRepClass3d_SolidExplorer.cxx | 4 +- src/BRepExtrema/BRepExtrema_DistanceSS.cxx | 8 +- .../BRepExtrema_ProximityValueTool.cxx | 2 +- src/BRepFeat/BRepFeat.cxx | 2 +- src/BRepFeat/BRepFeat_Form.cxx | 2 +- src/BRepFeat/BRepFeat_MakePrism.cxx | 4 +- src/BRepFeat/BRepFeat_MakeRevol.cxx | 4 +- src/BRepFill/BRepFill_Evolved.cxx | 2 +- src/BRepFill/BRepFill_Generator.cxx | 2 +- src/BRepFill/BRepFill_MultiLine.cxx | 10 +- src/BRepFill/BRepFill_NSections.cxx | 2 +- src/BRepFill/BRepFill_OffsetWire.cxx | 10 +- src/BRepFill/BRepFill_SectionPlacement.cxx | 7 +- src/BRepFill/BRepFill_TrimEdgeTool.cxx | 6 +- src/BRepGProp/BRepGProp_Face.cxx | 2 +- src/BRepLib/BRepLib.cxx | 2 +- src/BRepLib/BRepLib_FuseEdges.cxx | 4 +- src/BRepLib/BRepLib_MakeEdge.cxx | 4 +- src/BRepLib/BRepLib_MakeEdge2d.cxx | 4 +- src/BRepLib/BRepLib_MakeFace.cxx | 2 +- src/BRepLib/BRepLib_MakeShell.cxx | 4 +- src/BRepLib/BRepLib_ToolTriangulatedShape.cxx | 2 +- src/BRepMAT2d/BRepMAT2d_Explorer.cxx | 2 +- src/BRepMesh/BRepMesh_Classifier.cxx | 4 +- src/BRepMesh/BRepMesh_CurveTessellator.cxx | 2 +- src/BRepMesh/BRepMesh_GeomTool.cxx | 4 +- src/BRepMesh/BRepMesh_VertexTool.cxx | 2 +- src/BRepOffset/BRepOffset.cxx | 2 +- src/BRepOffset/BRepOffset_Inter2d.cxx | 6 +- src/BRepOffset/BRepOffset_MakeOffset.cxx | 2 +- src/BRepOffset/BRepOffset_Offset.cxx | 2 +- src/BRepOffset/BRepOffset_Tool.cxx | 12 +-- .../BRepOffsetAPI_MiddlePath.cxx | 2 +- .../BRepOffsetAPI_ThruSections.cxx | 2 +- src/BRepSweep/BRepSweep_Trsf.cxx | 6 +- src/BRepTest/BRepTest_CurveCommands.cxx | 2 +- src/BRepTest/BRepTest_OtherCommands.cxx | 2 +- src/BRepTools/BRepTools.cxx | 4 +- src/BiTgte/BiTgte_Blend.cxx | 6 +- src/Bisector/Bisector_BisecAna.cxx | 2 +- src/Bisector/Bisector_BisecCC.cxx | 6 +- src/Bisector/Bisector_BisecPC.cxx | 4 +- src/Bisector/Bisector_Inter.cxx | 2 +- src/BndLib/BndLib.cxx | 6 +- src/BndLib/BndLib_Add2dCurve.cxx | 2 +- .../ChFiKPart_ComputeData_FilPlnCyl.cxx | 2 +- src/Contap/Contap_Contour.cxx | 2 +- src/Draft/Draft_Modification.cxx | 2 +- src/Draft/Draft_Modification_1.cxx | 4 +- src/DsgPrs/DsgPrs.cxx | 2 +- src/Extrema/Extrema_ExtElCS.cxx | 2 +- src/Extrema/Extrema_ExtPElC.cxx | 2 +- src/Extrema/Extrema_FuncExtCS.cxx | 2 +- src/Extrema/Extrema_FuncPSNorm.cxx | 2 +- src/Extrema/Extrema_GExtPC.gxx | 2 +- src/Extrema/Extrema_GenExtCS.cxx | 2 +- src/Extrema/Extrema_GenLocateExtPS.cxx | 2 +- src/Extrema/Extrema_GlobOptFuncCQuadric.cxx | 4 +- src/Extrema/Extrema_GlobOptFuncConicS.cxx | 2 +- src/GCPnts/GCPnts_TangentialDeflection.cxx | 8 +- src/GccAna/GccAna_Circ2dBisec.cxx | 2 +- src/Geom/Geom_OffsetSurface.cxx | 4 +- src/Geom2dGcc/Geom2dGcc_Circ2d2TanRadGeo.cxx | 2 +- src/GeomAPI/GeomAPI_ExtremaCurveCurve.cxx | 4 +- src/GeomAPI/GeomAPI_ExtremaCurveSurface.cxx | 4 +- src/GeomAPI/GeomAPI_ExtremaSurfaceSurface.cxx | 4 +- src/GeomAPI/GeomAPI_ProjectPointOnSurf.cxx | 4 +- src/GeomAdaptor/GeomAdaptor_Surface.cxx | 2 +- .../GeomAdaptor_SurfaceOfRevolution.cxx | 8 +- .../GeomConvert_CurveToAnaCurve.cxx | 2 +- src/GeomConvert/GeomConvert_SurfToAnaSurf.cxx | 4 +- src/GeomFill/GeomFill_BSplineCurves.cxx | 4 +- src/GeomFill/GeomFill_BezierCurves.cxx | 6 +- src/GeomFill/GeomFill_CircularBlendFunc.cxx | 4 +- src/GeomFill/GeomFill_DiscreteTrihedron.cxx | 2 +- src/GeomFill/GeomFill_Frenet.cxx | 6 +- src/GeomFill/GeomFill_NSections.cxx | 6 +- src/GeomFill/GeomFill_Pipe.cxx | 4 +- src/GeomInt/GeomInt_IntSS_1.cxx | 6 +- src/GeomInt/GeomInt_LineConstructor.cxx | 4 +- src/GeomInt/GeomInt_LineTool.cxx | 2 +- src/GeomLib/GeomLib.cxx | 4 +- src/GeomLib/GeomLib_IsPlanarSurface.cxx | 2 +- src/GeomLib/GeomLib_Tool.cxx | 2 +- src/GeomToIGES/GeomToIGES_GeomCurve.cxx | 2 +- .../GeometryTest_CurveCommands.cxx | 4 +- src/HLRAlgo/HLRAlgo_PolyAlgo.cxx | 2 +- src/HLRBRep/HLRBRep.cxx | 2 +- src/IGESToBRep/IGESToBRep_BasicCurve.cxx | 4 +- src/IntAna/IntAna_Curve.cxx | 4 +- src/IntAna/IntAna_IntQuadQuad.cxx | 2 +- src/IntCurveSurface/IntCurveSurface_Inter.gxx | 4 +- src/IntPatch/IntPatch_GLine.cxx | 4 +- src/IntPatch/IntPatch_ImpPrmIntersection.cxx | 8 +- src/IntPatch/IntPatch_Intersection.cxx | 6 +- src/IntPatch/IntPatch_PointLine.cxx | 4 +- src/IntPatch/IntPatch_PrmPrmIntersection.cxx | 2 +- src/IntPatch/IntPatch_WLine.cxx | 2 +- src/IntPatch/IntPatch_WLineTool.cxx | 2 +- src/IntWalk/IntWalk_PWalking.cxx | 4 +- src/LocOpe/LocOpe_FindEdgesInFace.cxx | 4 +- src/LocOpe/LocOpe_Generator.cxx | 12 +-- src/LocOpe/LocOpe_WiresOnShape.cxx | 12 +-- src/MAT2d/MAT2d_Circuit.cxx | 4 +- src/MAT2d/MAT2d_CutCurve.cxx | 4 +- src/MeshVS/MeshVS_MeshPrsBuilder.cxx | 101 +++++++++--------- src/MeshVS/MeshVS_Tool.cxx | 8 +- src/ProjLib/ProjLib_CompProjectedCurve.cxx | 2 +- src/ProjLib/ProjLib_ComputeApprox.cxx | 2 +- .../ProjLib_ComputeApproxOnPolarSurface.cxx | 2 +- src/ProjLib/ProjLib_ProjectOnSurface.cxx | 2 +- src/ProjLib/ProjLib_ProjectedCurve.cxx | 2 +- src/ProjLib/ProjLib_Sphere.cxx | 2 +- src/PrsDim/PrsDim_EqualDistanceRelation.cxx | 6 +- src/PrsDim/PrsDim_FixRelation.cxx | 2 +- src/PrsDim/PrsDim_IdenticRelation.cxx | 16 +-- src/PrsDim/PrsDim_MidPointRelation.cxx | 4 +- src/QABugs/QABugs_10.cxx | 2 +- src/QABugs/QABugs_11.cxx | 4 +- src/QABugs/QABugs_13.cxx | 2 +- src/QABugs/QABugs_19.cxx | 4 +- src/QABugs/QABugs_20.cxx | 4 +- src/SWDRAW/SWDRAW_ShapeTool.cxx | 2 +- src/ShapeAlgo/ShapeAlgo_AlgoContainer.cxx | 4 +- .../ShapeAnalysis_CanonicalRecognition.cxx | 2 +- src/ShapeAnalysis/ShapeAnalysis_Edge.cxx | 2 +- src/ShapeAnalysis/ShapeAnalysis_Surface.cxx | 8 +- .../ShapeAnalysis_TransferParametersProj.cxx | 4 +- src/ShapeAnalysis/ShapeAnalysis_WireOrder.cxx | 4 +- .../ShapeConstruct_ProjectCurveOnSurface.cxx | 2 +- src/ShapeCustom/ShapeCustom_Curve2d.cxx | 2 +- src/ShapeFix/ShapeFix_ComposeShell.cxx | 2 +- src/ShapeFix/ShapeFix_Edge.cxx | 4 +- src/ShapeFix/ShapeFix_EdgeProjAux.cxx | 2 +- src/ShapeFix/ShapeFix_Solid.cxx | 2 +- src/ShapeFix/ShapeFix_Wire_1.cxx | 4 +- src/ShapeFix/ShapeFix_Wireframe.cxx | 4 +- .../ShapeUpgrade_ConvertCurve2dToBezier.cxx | 4 +- .../ShapeUpgrade_ConvertCurve3dToBezier.cxx | 4 +- ...apeUpgrade_ConvertSurfaceToBezierBasis.cxx | 6 +- .../ShapeUpgrade_ShapeConvertToBezier.cxx | 2 +- src/ShapeUpgrade/ShapeUpgrade_SplitCurve.cxx | 2 +- .../ShapeUpgrade_SplitCurve2d.cxx | 2 +- .../ShapeUpgrade_SplitCurve2dContinuity.cxx | 2 +- .../ShapeUpgrade_SplitCurve3d.cxx | 4 +- .../ShapeUpgrade_SplitCurve3dContinuity.cxx | 2 +- .../ShapeUpgrade_SplitSurface.cxx | 6 +- .../ShapeUpgrade_SplitSurfaceContinuity.cxx | 2 +- .../ShapeUpgrade_UnifySameDomain.cxx | 4 +- src/ShapeUpgrade/ShapeUpgrade_WireDivide.cxx | 2 +- src/StdPrs/StdPrs_ShadedShape.cxx | 2 +- src/TopTrans/TopTrans_SurfaceTransition.cxx | 6 +- src/ViewerTest/ViewerTest_ObjectCommands.cxx | 2 +- src/VrmlData/VrmlData_Material.cxx | 4 +- src/VrmlData/VrmlData_ShapeConvert.cxx | 2 +- src/gce/gce_MakeCirc.cxx | 2 +- 171 files changed, 368 insertions(+), 364 deletions(-) diff --git a/src/AIS/AIS_ColorScale.cxx b/src/AIS/AIS_ColorScale.cxx index 08ec0bcf75..704245425d 100644 --- a/src/AIS/AIS_ColorScale.cxx +++ b/src/AIS/AIS_ColorScale.cxx @@ -293,7 +293,7 @@ Aspect_SequenceOfColor AIS_ColorScale::MakeUniformColors (Standard_Integer theNb // adjust range to be within (0, 360], with sign according to theHueFrom and theHueTo Standard_Real aHueRange = std::fmod (theHueTo - theHueFrom, 360.); - const Standard_Real aHueEps = Precision::Angular() * 180. / M_PI; + constexpr Standard_Real aHueEps = Precision::Angular() * 180. / M_PI; if (Abs (aHueRange) <= aHueEps) { aHueRange = (aHueRange < 0 ? -360. : 360.); diff --git a/src/Adaptor3d/Adaptor3d_CurveOnSurface.cxx b/src/Adaptor3d/Adaptor3d_CurveOnSurface.cxx index 1f6c58642a..c6bc29ed34 100644 --- a/src/Adaptor3d/Adaptor3d_CurveOnSurface.cxx +++ b/src/Adaptor3d/Adaptor3d_CurveOnSurface.cxx @@ -147,7 +147,7 @@ static void Hunt(const TColStd_Array1OfReal& Arr, Standard_Integer& Iloc) {//Warning: Hunt is used to find number of knot which equals coordinate component, // when coordinate component definitely equals a knot only. - Standard_Real Tol=Precision::PConfusion()/10; + constexpr Standard_Real Tol=Precision::PConfusion()/10; Standard_Integer i=1; while((i <= Arr.Upper()) && (Abs(Coord - Arr(i)) > Tol)){ i++;} @@ -204,7 +204,7 @@ static void FindBounds(const TColStd_Array1OfReal& Arr, { Standard_Integer N=0; - Standard_Real Tol=Precision::PConfusion()/10; + constexpr Standard_Real Tol=Precision::PConfusion()/10; Hunt(Arr,Coord,N); DerNull=Standard_False; @@ -243,7 +243,7 @@ static void Locate1Coord(const Standard_Integer Index, gp_Pnt2d& LeftBot, gp_Pnt2d& RightTop) { Standard_Real Comp1=0, DComp1=0, cur, f = 0.0, l = 0.0; - Standard_Real Tol = Precision::PConfusion()/10; + constexpr Standard_Real Tol = Precision::PConfusion()/10; Standard_Integer i = 1, Bnd1, Bnd2; Standard_Boolean DIsNull= Standard_False; TColStd_Array1OfReal Arr(1,BSplC->NbKnots()); BSplC->Knots(Arr); @@ -345,7 +345,7 @@ static void Locate1Coord(const Standard_Integer Index, gp_Pnt2d& RightTop) { Standard_Real Comp1=0,DComp1=0; - Standard_Real Tol = Precision::PConfusion()/10; + constexpr Standard_Real Tol = Precision::PConfusion()/10; Standard_Integer i=1, Up=0, Up1, Up2, Down=0, Down1, Down2; Standard_Real cur = 0.; @@ -556,7 +556,7 @@ static void Locate2Coord(const Standard_Integer Index, const Standard_Real I2, gp_Pnt2d& LeftBot, gp_Pnt2d& RightTop) { - Standard_Real Tol=Precision::PConfusion()/10; + constexpr Standard_Real Tol=Precision::PConfusion()/10; Standard_Real Comp1=0,DComp1=0; if(Index==1) { Comp1=UV.X(); DComp1=DUV.X();} @@ -620,7 +620,7 @@ static void Locate2Coord(const Standard_Integer Index, gp_Pnt2d& LeftBot, gp_Pnt2d& RightTop) { Standard_Real Comp=0,DComp=0,Tmp1=0.0,Tmp2=0.0; - Standard_Real Tol=Precision::PConfusion()/10; + constexpr Standard_Real Tol=Precision::PConfusion()/10; Standard_Integer N=0, NUp=0, NLo=0; if(Index==1) { Comp=UV.X(); @@ -893,7 +893,7 @@ Standard_Integer Adaptor3d_CurveOnSurface::NbIntervals (const GeomAbs_Shape S) c myCurve->Intervals(TabC,S); - Standard_Real Tol= Precision::PConfusion()/10; + constexpr Standard_Real Tol= Precision::PConfusion()/10; // sorted sequence of parameters defining continuity intervals; // started with own intervals of curve and completed by @@ -1063,7 +1063,7 @@ void Adaptor3d_CurveOnSurface::D1(const Standard_Real U , Standard_Real FP = myCurve->FirstParameter(); Standard_Real LP = myCurve->LastParameter(); - Standard_Real Tol= Precision::PConfusion()/10; + constexpr Standard_Real Tol= Precision::PConfusion()/10; if( ( Abs(U-FP)D1(U,Puv,Duv); @@ -1103,7 +1103,7 @@ void Adaptor3d_CurveOnSurface::D2(const Standard_Real U, Standard_Real FP = myCurve->FirstParameter(); Standard_Real LP = myCurve->LastParameter(); - Standard_Real Tol= Precision::PConfusion()/10; + constexpr Standard_Real Tol= Precision::PConfusion()/10; if( (Abs(U-FP)D2(U,UV,DW,D2W); @@ -1152,7 +1152,7 @@ void Adaptor3d_CurveOnSurface::D3 gp_Vec& V3) const { - Standard_Real Tol= Precision::PConfusion()/10; + constexpr Standard_Real Tol= Precision::PConfusion()/10; gp_Pnt2d UV; gp_Vec2d DW,D2W,D3W; gp_Vec D1U,D1V,D2U,D2V,D2UV,D3U,D3V,D3UUV,D3UVV; @@ -1651,7 +1651,7 @@ void Adaptor3d_CurveOnSurface::EvalFirstLastSurf() Standard_Real FirstPar,LastPar; gp_Pnt2d UV, LeftBot, RightTop; gp_Vec2d DUV; - Standard_Real Tol= Precision::PConfusion()/10; + constexpr Standard_Real Tol= Precision::PConfusion()/10; Standard_Boolean Ok = Standard_True; diff --git a/src/AdvApprox/AdvApprox_DichoCutting.cxx b/src/AdvApprox/AdvApprox_DichoCutting.cxx index 369c43edc8..f0f83888b7 100644 --- a/src/AdvApprox/AdvApprox_DichoCutting.cxx +++ b/src/AdvApprox/AdvApprox_DichoCutting.cxx @@ -27,7 +27,7 @@ Standard_Boolean AdvApprox_DichoCutting::Value(const Standard_Real a, Standard_Real& cuttingvalue) const { // longueur minimum d'un intervalle pour F(U,V) : EPS1=1.e-9 (cf.MEPS1) - Standard_Real lgmin = 10*Precision::PConfusion(); + constexpr Standard_Real lgmin = 10*Precision::PConfusion(); cuttingvalue = (a+b) / 2; return (Abs(b-a)>=2*lgmin); } diff --git a/src/AdvApprox/AdvApprox_PrefAndRec.cxx b/src/AdvApprox/AdvApprox_PrefAndRec.cxx index be5e8ba9c2..8596abbbec 100644 --- a/src/AdvApprox/AdvApprox_PrefAndRec.cxx +++ b/src/AdvApprox/AdvApprox_PrefAndRec.cxx @@ -36,7 +36,7 @@ Standard_Boolean AdvApprox_PrefAndRec::Value(const Standard_Real a, Standard_Real& cuttingvalue) const { // longueur minimum d'un intervalle parametrique : 10*PConfusion() - Standard_Real lgmin = 10 * Precision::PConfusion(); + constexpr Standard_Real lgmin = 10 * Precision::PConfusion(); Standard_Integer i; Standard_Real cut, mil=(a+b)/2, dist; Standard_Boolean isfound = Standard_False; diff --git a/src/AdvApprox/AdvApprox_PrefCutting.cxx b/src/AdvApprox/AdvApprox_PrefCutting.cxx index 02753ec1f7..d2509c7ecb 100644 --- a/src/AdvApprox/AdvApprox_PrefCutting.cxx +++ b/src/AdvApprox/AdvApprox_PrefCutting.cxx @@ -30,7 +30,7 @@ Standard_Boolean AdvApprox_PrefCutting::Value(const Standard_Real a, { // longueur minimum d'un intervalle parametrique : PConfusion() // pour F(U,V) : EPS1=1.e-9 (cf.MMEPS1) - Standard_Real lgmin = 10 * Precision::PConfusion(); + constexpr Standard_Real lgmin = 10 * Precision::PConfusion(); Standard_Integer i; Standard_Real cut, mil=(a+b)/2, dist = Abs((a-b)/2); diff --git a/src/AppDef/AppDef_Variational.cxx b/src/AppDef/AppDef_Variational.cxx index b4604d0e35..c1618c6850 100644 --- a/src/AppDef/AppDef_Variational.cxx +++ b/src/AppDef/AppDef_Variational.cxx @@ -2004,7 +2004,7 @@ void AppDef_Variational::InitSmoothCriterion() void AppDef_Variational::InitParameters(Standard_Real& Length) { - const Standard_Real Eps1 = Precision::Confusion() * .01; + constexpr Standard_Real Eps1 = Precision::Confusion() * .01; Standard_Real aux, dist; Standard_Integer i, i0, i1 = 0, ipoint; @@ -2052,7 +2052,7 @@ void AppDef_Variational::InitCriterionEstimations(const Standard_Real Length, { E1 = Length * Length; - const Standard_Real Eps1 = Precision::Confusion() * .01; + constexpr Standard_Real Eps1 = Precision::Confusion() * .01; math_Vector VTang1(1, myDimension), VTang2(1, myDimension), VTang3(1, myDimension), VScnd1(1, myDimension), VScnd2(1, myDimension), VScnd3(1, myDimension); @@ -2180,7 +2180,7 @@ void AppDef_Variational::EstTangent(const Standard_Integer ipnt, { Standard_Integer i ; - const Standard_Real Eps1 = Precision::Confusion() * .01; + constexpr Standard_Real Eps1 = Precision::Confusion() * .01; const Standard_Real EpsNorm = 1.e-9; Standard_Real Wpnt = 1.; diff --git a/src/Approx/Approx_ComputeLine.gxx b/src/Approx/Approx_ComputeLine.gxx index 9e63eb95a9..938ba47033 100644 --- a/src/Approx/Approx_ComputeLine.gxx +++ b/src/Approx/Approx_ComputeLine.gxx @@ -139,7 +139,7 @@ static Standard_Boolean CheckMultiCurve(const AppParCurves_MultiCurve& theMultiC return Standard_True; const Standard_Real MinScalProd = -0.9; - const Standard_Real SqTol3d = Precision::SquareConfusion(); + constexpr Standard_Real SqTol3d = Precision::SquareConfusion(); theIndbad = 0; Standard_Integer indbads [4]; diff --git a/src/ApproxInt/ApproxInt_ImpPrmSvSurfaces.gxx b/src/ApproxInt/ApproxInt_ImpPrmSvSurfaces.gxx index 2aa215b58c..6c992b7079 100644 --- a/src/ApproxInt/ApproxInt_ImpPrmSvSurfaces.gxx +++ b/src/ApproxInt/ApproxInt_ImpPrmSvSurfaces.gxx @@ -438,7 +438,7 @@ Standard_Boolean ApproxInt_ImpPrmSvSurfaces::Compute( Standard_Real& u1, gp_Vec2d& aPrmTg = MyImplicitFirst ? Tguv2 : Tguv1; //for square - const Standard_Real aNullValue = Precision::Approximation()* + constexpr Standard_Real aNullValue = Precision::Approximation()* Precision::Approximation(), anAngTol = Precision::Angular(); diff --git a/src/ApproxInt/ApproxInt_MultiLine.gxx b/src/ApproxInt/ApproxInt_MultiLine.gxx index 45225b1364..d5e4845972 100644 --- a/src/ApproxInt/ApproxInt_MultiLine.gxx +++ b/src/ApproxInt/ApproxInt_MultiLine.gxx @@ -621,7 +621,7 @@ Standard_Boolean ((TheSvSurfaces *)PtrOnmySvSurfaces)->SetUseSolver(Standard_True); } - const Standard_Real SqTol3d = Precision::SquareConfusion(); + constexpr Standard_Real SqTol3d = Precision::SquareConfusion(); math_Vector tolerance(1,2); tolerance(1) = tolerance(2) = 1.e-8; diff --git a/src/BOPTools/BOPTools_AlgoTools.cxx b/src/BOPTools/BOPTools_AlgoTools.cxx index 7b60afb821..131170d72c 100644 --- a/src/BOPTools/BOPTools_AlgoTools.cxx +++ b/src/BOPTools/BOPTools_AlgoTools.cxx @@ -989,7 +989,7 @@ Standard_Boolean BOPTools_AlgoTools::GetFaceOff // // The difference between faces should be obvious enough // to guarantee the correctness of the classification - Standard_Real anAngleCriteria = Precision::Confusion(); + constexpr Standard_Real anAngleCriteria = Precision::Confusion(); bRet=Standard_True; aIt.Initialize(theLCSOff); @@ -2181,7 +2181,7 @@ Standard_Real MinStep3D(const TopoDS_Edge& theE1, } // if (aR > 100.) { - Standard_Real d = 10*Precision::PConfusion(); + constexpr Standard_Real d = 10*Precision::PConfusion(); aDtMin = Max(aDtMin, sqrt(d*d + 2*d*aR)); } } diff --git a/src/BOPTools/BOPTools_AlgoTools2D.cxx b/src/BOPTools/BOPTools_AlgoTools2D.cxx index 9bcafe1c33..9c3b943131 100644 --- a/src/BOPTools/BOPTools_AlgoTools2D.cxx +++ b/src/BOPTools/BOPTools_AlgoTools2D.cxx @@ -698,7 +698,7 @@ void BOPTools_AlgoTools2D::IsEdgeIsoline( const TopoDS_Edge& theE, aT /= sqrt(aSqMagn); //sin(da) ~ da, when da->0. - const Standard_Real aTol = Precision::Angular(); + constexpr Standard_Real aTol = Precision::Angular(); const gp_Vec2d aRefVDir(0.0, 1.0), aRefUDir(1.0, 0.0); const Standard_Real aDPv = aT.CrossMagnitude(aRefVDir), diff --git a/src/BRep/BRep_Tool.cxx b/src/BRep/BRep_Tool.cxx index 57b95f7ef0..ac4dd151cb 100644 --- a/src/BRep/BRep_Tool.cxx +++ b/src/BRep/BRep_Tool.cxx @@ -138,7 +138,7 @@ Standard_Real BRep_Tool::Tolerance(const TopoDS_Face& F) { const BRep_TFace* TF = static_cast(F.TShape().get()); Standard_Real p = TF->Tolerance(); - Standard_Real pMin = Precision::Confusion(); + constexpr Standard_Real pMin = Precision::Confusion(); if (p > pMin) return p; else return pMin; } @@ -812,7 +812,7 @@ Standard_Real BRep_Tool::Tolerance(const TopoDS_Edge& E) { const BRep_TEdge* TE = static_cast(E.TShape().get()); Standard_Real p = TE->Tolerance(); - Standard_Real pMin = Precision::Confusion(); + constexpr Standard_Real pMin = Precision::Confusion(); if (p > pMin) return p; else return pMin; } @@ -1258,7 +1258,7 @@ Standard_Real BRep_Tool::Tolerance(const TopoDS_Vertex& V) } Standard_Real p = aTVert->Tolerance(); - Standard_Real pMin = Precision::Confusion(); + constexpr Standard_Real pMin = Precision::Confusion(); if (p > pMin) return p; else return pMin; } diff --git a/src/BRepBndLib/BRepBndLib_1.cxx b/src/BRepBndLib/BRepBndLib_1.cxx index f77feec382..3c0b332dcf 100644 --- a/src/BRepBndLib/BRepBndLib_1.cxx +++ b/src/BRepBndLib/BRepBndLib_1.cxx @@ -256,7 +256,7 @@ static Standard_Integer PointsForOBB(const TopoDS_Shape& theS, //======================================================================= static Standard_Integer IsWCS(const gp_Dir& theDir) { - const Standard_Real aToler = Precision::Angular()*Precision::Angular(); + constexpr Standard_Real aToler = Precision::Angular()*Precision::Angular(); const Standard_Real aX = theDir.X(), aY = theDir.Y(), diff --git a/src/BRepCheck/BRepCheck_Edge.cxx b/src/BRepCheck/BRepCheck_Edge.cxx index 32d55b8cd7..2f3fb93fe0 100644 --- a/src/BRepCheck/BRepCheck_Edge.cxx +++ b/src/BRepCheck/BRepCheck_Edge.cxx @@ -140,7 +140,7 @@ void BRepCheck_Edge::Minimum() if (!myCref.IsNull()) { Handle(BRep_GCurve) GCref (Handle(BRep_GCurve)::DownCast (myCref)); - Standard_Real eps = Precision::PConfusion(); + constexpr Standard_Real eps = Precision::PConfusion(); Standard_Real First,Last; GCref->Range(First,Last); if (Last<=First) { @@ -314,7 +314,7 @@ void BRepCheck_Edge::InContext(const TopoDS_Shape& S) Standard_Boolean pcurvefound = Standard_False; BRep_ListIteratorOfListOfCurveRepresentation itcr(TE->Curves()); - Standard_Real eps = Precision::PConfusion(); + constexpr Standard_Real eps = Precision::PConfusion(); Standard_Boolean toRunParallel = !myMutex.IsNull(); while (itcr.More()) { const Handle(BRep_CurveRepresentation)& cr = itcr.Value(); diff --git a/src/BRepClass/BRepClass_FaceExplorer.cxx b/src/BRepClass/BRepClass_FaceExplorer.cxx index a0f12833fa..23335b3be5 100644 --- a/src/BRepClass/BRepClass_FaceExplorer.cxx +++ b/src/BRepClass/BRepClass_FaceExplorer.cxx @@ -147,7 +147,7 @@ Standard_Boolean BRepClass_FaceExplorer::OtherSegment(const gp_Pnt2d& P, Standard_Real aFPar; Standard_Real aLPar; Handle(Geom2d_Curve) aC2d; - Standard_Real aTolParConf2 = Precision::PConfusion() * Precision::PConfusion(); + constexpr Standard_Real aTolParConf2 = Precision::PConfusion() * Precision::PConfusion(); gp_Pnt2d aPOnC; Standard_Real aParamIn; diff --git a/src/BRepClass3d/BRepClass3d_SolidExplorer.cxx b/src/BRepClass3d/BRepClass3d_SolidExplorer.cxx index 43b657b336..56849fe261 100644 --- a/src/BRepClass3d/BRepClass3d_SolidExplorer.cxx +++ b/src/BRepClass3d/BRepClass3d_SolidExplorer.cxx @@ -441,7 +441,7 @@ Standard_Integer BRepClass3d_SolidExplorer::OtherSegment(const gp_Pnt& P, gp_Lin& L, Standard_Real& _Par) { - const Standard_Real TolU = Precision::PConfusion(); + constexpr Standard_Real TolU = Precision::PConfusion(); const Standard_Real TolV = TolU; TopoDS_Face face; @@ -500,7 +500,7 @@ Standard_Integer BRepClass3d_SolidExplorer::OtherSegment(const gp_Pnt& P, face.Orientation(TopAbs_FORWARD); // //avoid process faces from uncorrected shells - const Standard_Real eps = Precision::PConfusion(); + constexpr Standard_Real eps = Precision::PConfusion(); Standard_Real epsU = Max(eps * Max(Abs(U2), Abs(U1)), eps); Standard_Real epsV = Max(eps * Max(Abs(V2), Abs(V1)), eps); if( Abs (U2 - U1) < epsU || Abs(V2 - V1) < epsV) { diff --git a/src/BRepExtrema/BRepExtrema_DistanceSS.cxx b/src/BRepExtrema/BRepExtrema_DistanceSS.cxx index c287d05ba3..6ecec5c623 100644 --- a/src/BRepExtrema/BRepExtrema_DistanceSS.cxx +++ b/src/BRepExtrema/BRepExtrema_DistanceSS.cxx @@ -423,7 +423,7 @@ static void PERFORM_C0(const TopoDS_Edge& S1, const TopoDS_Edge& S2, if (pCurv->Continuity() == GeomAbs_C0) { - const Standard_Real epsP = Precision::PConfusion(); + constexpr Standard_Real epsP = Precision::PConfusion(); GeomAdaptor_Curve aAdaptorCurve(pCurv, aFirst, aLast); const Standard_Integer nbIntervals = aAdaptorCurve.NbIntervals(GeomAbs_C1); @@ -716,7 +716,7 @@ void BRepExtrema_DistanceSS::Perform (const TopoDS_Vertex& theS1, if ((Dstmin < myDstRef - myEps) || (fabs(Dstmin - myDstRef) < myEps)) { gp_Pnt Pt, P1 = BRep_Tool::Pnt(theS1); - const Standard_Real epsP = Precision::PConfusion(); + constexpr Standard_Real epsP = Precision::PConfusion(); for (i = 1; i <= NbExtrema; i++) { @@ -833,7 +833,7 @@ void BRepExtrema_DistanceSS::Perform (const TopoDS_Edge& theS1, if ((Dstmin < myDstRef - myEps) || (fabs(Dstmin - myDstRef) < myEps)) { gp_Pnt Pt1, Pt2; - const Standard_Real epsP = Precision::PConfusion(); + constexpr Standard_Real epsP = Precision::PConfusion(); for (i = 1; i <= NbExtrema; i++) { @@ -925,7 +925,7 @@ void BRepExtrema_DistanceSS::Perform (const TopoDS_Edge& theS1, const TopoDS_Fac const Standard_Real tol = BRep_Tool::Tolerance(theS2); gp_Pnt Pt1, Pt2; - const Standard_Real epsP = Precision::PConfusion(); + constexpr Standard_Real epsP = Precision::PConfusion(); for (i = 1; i <= NbExtrema; i++) { diff --git a/src/BRepExtrema/BRepExtrema_ProximityValueTool.cxx b/src/BRepExtrema/BRepExtrema_ProximityValueTool.cxx index 3bb0f0d4bb..3190cb90db 100644 --- a/src/BRepExtrema/BRepExtrema_ProximityValueTool.cxx +++ b/src/BRepExtrema/BRepExtrema_ProximityValueTool.cxx @@ -400,7 +400,7 @@ Standard_Boolean BRepExtrema_ProximityValueTool::getFaceAdditionalVertices ( BVH_Array3d& theAddVertices, NCollection_Vector& theAddStatuses) { - Standard_Real aTol = Precision::Confusion(); + constexpr Standard_Real aTol = Precision::Confusion(); TopLoc_Location aLocation; Handle(Poly_Triangulation) aTr = BRep_Tool::Triangulation (theFace, aLocation); diff --git a/src/BRepFeat/BRepFeat.cxx b/src/BRepFeat/BRepFeat.cxx index 010de828ac..2f28c4d6a6 100644 --- a/src/BRepFeat/BRepFeat.cxx +++ b/src/BRepFeat/BRepFeat.cxx @@ -314,7 +314,7 @@ void BRepFeat::ParametricMinMax(const TopoDS_Shape& S, static Standard_Boolean IsIn (BRepTopAdaptor_FClass2d& FC, const Geom2dAdaptor_Curve& AC) { - Standard_Real Def = 100*Precision::Confusion(); + constexpr Standard_Real Def = 100*Precision::Confusion(); GCPnts_QuasiUniformDeflection QU(AC,Def); for (Standard_Integer i = 1; i <= QU.NbPoints(); i++) { diff --git a/src/BRepFeat/BRepFeat_Form.cxx b/src/BRepFeat/BRepFeat_Form.cxx index 4ea9ea05a5..225fb71175 100644 --- a/src/BRepFeat/BRepFeat_Form.cxx +++ b/src/BRepFeat/BRepFeat_Form.cxx @@ -755,7 +755,7 @@ static void Descendants(const TopoDS_Shape&, // intersects Shapes From and Until // case of several intersections (keep PartsOfTool according to the selection) // position of the face of intersection in PartsOfTool (before or after) - Standard_Real delta = Precision::Confusion(); + constexpr Standard_Real delta = Precision::Confusion(); if (myPerfSelection != BRepFeat_NoSelection) { // modif of the test for cts21181 : (prbmax2 and prnmin2) -> (prbmin1 and prbmax1) diff --git a/src/BRepFeat/BRepFeat_MakePrism.cxx b/src/BRepFeat/BRepFeat_MakePrism.cxx index 27eade49fd..68ccf8c7cf 100644 --- a/src/BRepFeat/BRepFeat_MakePrism.cxx +++ b/src/BRepFeat/BRepFeat_MakePrism.cxx @@ -1078,8 +1078,8 @@ static Standard_Boolean ToFuse (const TopoDS_Face& F1, const TopoDS_Face& F2) Handle(Geom_Surface) S1,S2; TopLoc_Location loc1, loc2; Handle(Standard_Type) typS1,typS2; - const Standard_Real tollin = Precision::Confusion(); - const Standard_Real tolang = Precision::Angular(); + constexpr Standard_Real tollin = Precision::Confusion(); + constexpr Standard_Real tolang = Precision::Angular(); S1 = BRep_Tool::Surface(F1,loc1); S2 = BRep_Tool::Surface(F2,loc2); diff --git a/src/BRepFeat/BRepFeat_MakeRevol.cxx b/src/BRepFeat/BRepFeat_MakeRevol.cxx index df0c980513..f441bb4e95 100644 --- a/src/BRepFeat/BRepFeat_MakeRevol.cxx +++ b/src/BRepFeat/BRepFeat_MakeRevol.cxx @@ -834,8 +834,8 @@ Standard_Boolean ToFuse(const TopoDS_Face& F1, Handle(Geom_Surface) S1,S2; TopLoc_Location loc1, loc2; Handle(Standard_Type) typS1,typS2; - const Standard_Real tollin = Precision::Confusion(); - const Standard_Real tolang = Precision::Angular(); + constexpr Standard_Real tollin = Precision::Confusion(); + constexpr Standard_Real tolang = Precision::Angular(); S1 = BRep_Tool::Surface(F1,loc1); S2 = BRep_Tool::Surface(F2,loc2); diff --git a/src/BRepFill/BRepFill_Evolved.cxx b/src/BRepFill/BRepFill_Evolved.cxx index 373c257160..a019dec635 100644 --- a/src/BRepFill/BRepFill_Evolved.cxx +++ b/src/BRepFill/BRepFill_Evolved.cxx @@ -3071,7 +3071,7 @@ void CutEdgeProf (const TopoDS_Edge& E, // On calcule les intersection avec Oy. Geom2dAdaptor_Curve ALine(Line); - Standard_Real Tol = Precision::Intersection(); + constexpr Standard_Real Tol = Precision::Intersection(); Standard_Real TolC = 0.; Geom2dInt_GInter Intersector(ALine,AC2d,TolC,Tol); diff --git a/src/BRepFill/BRepFill_Generator.cxx b/src/BRepFill/BRepFill_Generator.cxx index 553a0365a0..b4d48bb3d4 100644 --- a/src/BRepFill/BRepFill_Generator.cxx +++ b/src/BRepFill/BRepFill_Generator.cxx @@ -907,7 +907,7 @@ void BRepFill_Generator::Perform() } // set the pcurves - Standard_Real T = Precision::Confusion(); + constexpr Standard_Real T = Precision::Confusion(); if (IType != 4) //not plane { diff --git a/src/BRepFill/BRepFill_MultiLine.cxx b/src/BRepFill/BRepFill_MultiLine.cxx index 4b4714dad8..74225f42e6 100644 --- a/src/BRepFill/BRepFill_MultiLine.cxx +++ b/src/BRepFill/BRepFill_MultiLine.cxx @@ -109,8 +109,8 @@ BRepFill_MultiLine::BRepFill_MultiLine(const TopoDS_Face& Face1, myKPart(0) { // - const Standard_Real mult = 5.; - const Standard_Real eps = mult * Precision::Confusion(); + constexpr Standard_Real mult = 5.; + constexpr Standard_Real eps = mult * Precision::Confusion(); // myNbPnt2d = 2; myNbPnt = 1; @@ -585,8 +585,8 @@ static gp_Pnt2d ValueOnFace(const Standard_Real U, } #endif // - const Standard_Real mult = 5.; - const Standard_Real eps = mult * Precision::Confusion(); + constexpr Standard_Real mult = 5.; + constexpr Standard_Real eps = mult * Precision::Confusion(); // Standard_Real UU =0., Dist = Precision::Infinite(), D1, D2; @@ -627,7 +627,7 @@ static gp_Pnt2d ValueOnFace(const Standard_Real U, } } - const Standard_Real Tol = Precision::Confusion(); + constexpr Standard_Real Tol = Precision::Confusion(); Standard_Real VV; gp_Pnt2d PF = TheV.Value(TheV.FirstParameter()); diff --git a/src/BRepFill/BRepFill_NSections.cxx b/src/BRepFill/BRepFill_NSections.cxx index 6e7f0c984b..3c9550c7f7 100644 --- a/src/BRepFill/BRepFill_NSections.cxx +++ b/src/BRepFill/BRepFill_NSections.cxx @@ -516,7 +516,7 @@ void BRepFill_NSections::Init(const TColStd_SequenceOfReal & P, myLaws = new (GeomFill_HArray1OfSectionLaw) (1, NbEdge); - Standard_Real tol = Precision::Confusion(); + constexpr Standard_Real tol = Precision::Confusion(); mySurface = totalsurf(myEdges->Array2(),myShapes.Length(),NbEdge, myParams,w1Point,w2Point,uclosed,vclosed,tol); diff --git a/src/BRepFill/BRepFill_OffsetWire.cxx b/src/BRepFill/BRepFill_OffsetWire.cxx index dae07a5bb3..a0ec2ad56f 100644 --- a/src/BRepFill/BRepFill_OffsetWire.cxx +++ b/src/BRepFill/BRepFill_OffsetWire.cxx @@ -1913,8 +1913,8 @@ void CutCurve (const Handle(Geom2d_TrimmedCurve)& C, Standard_Real UF,UL,UC; Standard_Real Step; gp_Pnt2d PF,PL,PC; - Standard_Real PTol = Precision::PConfusion()*10; - Standard_Real Tol = Precision::Confusion()*10; + constexpr Standard_Real PTol = Precision::PConfusion()*10; + constexpr Standard_Real Tol = Precision::Confusion()*10; Standard_Boolean YaCut = Standard_False; UF = C->FirstParameter(); @@ -2141,7 +2141,7 @@ Standard_Boolean VertexFromNode (const Handle(MAT_Node)& aNode, TopoDS_Vertex& VN) { Standard_Boolean Status; - Standard_Real Tol = Precision::Confusion(); + constexpr Standard_Real Tol = Precision::Confusion(); BRep_Builder B; if (!aNode->Infinite() && Abs(aNode->Distance()-Offset) < Tol) { @@ -2243,7 +2243,7 @@ void TrimEdge (const TopoDS_Edge& E, // otherwise preserve only one of its representations. //---------------------------------------------------------- if (!BRep_Tool::Degenerated(E)) { - Standard_Real aParTol = 2.0 * Precision::PConfusion(); + constexpr Standard_Real aParTol = 2.0 * Precision::PConfusion(); for (Standard_Integer k = 1; k < TheVer.Length(); k ++) { if (TheVer.Value(k).IsSame(TheVer.Value(k+1)) || Abs(ThePar.Value(k)-ThePar.Value(k+1)) <= aParTol) { @@ -2487,7 +2487,7 @@ static void CheckBadEdges(const TopoDS_Face& Spine, const Standard_Real Offset, { TopoDS_Face F = TopoDS::Face(Spine.Oriented(TopAbs_FORWARD)); - Standard_Real eps = Precision::Confusion(); + constexpr Standard_Real eps = Precision::Confusion(); Standard_Real LimCurv = 1./Offset; TopTools_MapOfShape aMap; diff --git a/src/BRepFill/BRepFill_SectionPlacement.cxx b/src/BRepFill/BRepFill_SectionPlacement.cxx index 631d94183d..de03bf6931 100644 --- a/src/BRepFill/BRepFill_SectionPlacement.cxx +++ b/src/BRepFill/BRepFill_SectionPlacement.cxx @@ -125,7 +125,8 @@ BRepFill_SectionPlacement(const Handle(BRepFill_LocationLaw)& Law, Ex.Next(); if( Ex.More() ) { - Standard_Real tolrac, epsV, tol = Precision::Confusion(); + Standard_Real tolrac, epsV; + constexpr Standard_Real tol = Precision::Confusion(); GeomConvert_CompCurveToBSplineCurve Conv(TC); for (; Ex.More(); Ex.Next()) { E = TopoDS::Edge(Ex.Current()); @@ -289,8 +290,8 @@ BRepFill_SectionPlacement(const Handle(BRepFill_LocationLaw)& Law, Place.Perform(adpPath, Precision::Confusion()); - Standard_Real theParam = Place.ParameterOnPath(), - eps = Precision::PConfusion(); + Standard_Real theParam = Place.ParameterOnPath(); + constexpr Standard_Real eps = Precision::PConfusion(); #ifdef OCCT_DEBUG if (myDebug) { diff --git a/src/BRepFill/BRepFill_TrimEdgeTool.cxx b/src/BRepFill/BRepFill_TrimEdgeTool.cxx index 0cd9a0949d..32084d1f92 100644 --- a/src/BRepFill/BRepFill_TrimEdgeTool.cxx +++ b/src/BRepFill/BRepFill_TrimEdgeTool.cxx @@ -177,7 +177,7 @@ static void EvalParameters(const Geom2dAdaptor_Curve& Bis, TColgp_SequenceOfPnt& Params) { Geom2dInt_GInter Intersector; - Standard_Real Tol = Precision::Confusion(); + constexpr Standard_Real Tol = Precision::Confusion(); // Standard_Real TolC = 1.e-9; const Geom2dAdaptor_Curve& CBis(Bis); @@ -519,7 +519,7 @@ void BRepFill_TrimEdgeTool::IntersectWith(const TopoDS_Edge& Edge1, // The tolerance can be eventually changed. gp_Pnt P1,P2; - Standard_Real Tol = 4 * 100 * Precision::PConfusion(); + constexpr Standard_Real Tol = 4 * 100 * Precision::PConfusion(); Standard_Integer i = 1; Standard_Integer NbPoints = Params.Length(); @@ -660,7 +660,7 @@ void BRepFill_TrimEdgeTool::AddOrConfuse(const Standard_Boolean Start, { Standard_Boolean ToProj = Standard_True; gp_Pnt2d PBis; - Standard_Real Tol = 10*Precision::Confusion(); + constexpr Standard_Real Tol = 10*Precision::Confusion(); // return curves associated to edges. TopLoc_Location L; diff --git a/src/BRepGProp/BRepGProp_Face.cxx b/src/BRepGProp/BRepGProp_Face.cxx index 38892ac8a5..29d0f4e6e7 100644 --- a/src/BRepGProp/BRepGProp_Face.cxx +++ b/src/BRepGProp/BRepGProp_Face.cxx @@ -548,7 +548,7 @@ static void GetRealKnots(const Standard_Real theMin, Standard_Integer iU = theKnots->Upper(); Standard_Integer aStartI = 0; Standard_Integer aEndI = 0; - Standard_Real aTol = Precision::Confusion(); + constexpr Standard_Real aTol = Precision::Confusion(); while (++i < iU) { if (aStartI == 0 && theKnots->Value(i) > theMin + aTol) diff --git a/src/BRepLib/BRepLib.cxx b/src/BRepLib/BRepLib.cxx index e5f5e002cb..6dd1c895d7 100644 --- a/src/BRepLib/BRepLib.cxx +++ b/src/BRepLib/BRepLib.cxx @@ -2940,7 +2940,7 @@ void BRepLib::ExtendFace(const TopoDS_Face& theF, // Check if the periodic surface should become closed. // In this case, use the basis surface with basis bounds. - const Standard_Real anEps = Precision::PConfusion(); + constexpr Standard_Real anEps = Precision::PConfusion(); if (isUPeriodic && Abs(aFUMax - aFUMin - anUPeriod) < anEps) { aFUMin = aSUMin; diff --git a/src/BRepLib/BRepLib_FuseEdges.cxx b/src/BRepLib/BRepLib_FuseEdges.cxx index 537c9c3181..1999932236 100644 --- a/src/BRepLib/BRepLib_FuseEdges.cxx +++ b/src/BRepLib/BRepLib_FuseEdges.cxx @@ -778,8 +778,8 @@ Standard_Boolean BRepLib_FuseEdges::SameSupport(const TopoDS_Edge& E1, } // On a presomption de confusion - const Standard_Real tollin = Precision::Confusion(); - const Standard_Real tolang = Precision::Angular(); + constexpr Standard_Real tollin = Precision::Confusion(); + constexpr Standard_Real tolang = Precision::Angular(); if (typC1 == STANDARD_TYPE(Geom_Line)) { gp_Lin li1( Handle(Geom_Line)::DownCast (C1)->Lin()); gp_Lin li2( Handle(Geom_Line)::DownCast (C2)->Lin()); diff --git a/src/BRepLib/BRepLib_MakeEdge.cxx b/src/BRepLib/BRepLib_MakeEdge.cxx index f1ddbdcefb..0ef4d82d4d 100644 --- a/src/BRepLib/BRepLib_MakeEdge.cxx +++ b/src/BRepLib/BRepLib_MakeEdge.cxx @@ -781,7 +781,7 @@ void BRepLib_MakeEdge::Init(const Handle(Geom_Curve)& CC, Standard_Real p2 = pp2; Standard_Real cf = C->FirstParameter(); Standard_Real cl = C->LastParameter(); - Standard_Real epsilon = Precision::PConfusion(); + constexpr Standard_Real epsilon = Precision::PConfusion(); Standard_Boolean periodic = C->IsPeriodic(); GeomAdaptor_Curve aCA(C); @@ -1058,7 +1058,7 @@ void BRepLib_MakeEdge::Init(const Handle(Geom2d_Curve)& CC, Standard_Real p2 = pp2; Standard_Real cf = C->FirstParameter(); Standard_Real cl = C->LastParameter(); - Standard_Real epsilon = Precision::PConfusion(); + constexpr Standard_Real epsilon = Precision::PConfusion(); Standard_Boolean periodic = C->IsPeriodic(); diff --git a/src/BRepLib/BRepLib_MakeEdge2d.cxx b/src/BRepLib/BRepLib_MakeEdge2d.cxx index f04af3e5a8..9cfafe3a2c 100644 --- a/src/BRepLib/BRepLib_MakeEdge2d.cxx +++ b/src/BRepLib/BRepLib_MakeEdge2d.cxx @@ -593,7 +593,7 @@ void BRepLib_MakeEdge2d::Init(const Handle(Geom2d_Curve)& CC, Standard_Real p2 = pp2; Standard_Real cf = C->FirstParameter(); Standard_Real cl = C->LastParameter(); - Standard_Real epsilon = Precision::Confusion(); + constexpr Standard_Real epsilon = Precision::Confusion(); Standard_Boolean periodic = C->IsPeriodic(); @@ -632,7 +632,7 @@ void BRepLib_MakeEdge2d::Init(const Handle(Geom2d_Curve)& CC, if (!p1inf) P1 = C->Value(p1); if (!p2inf) P2 = C->Value(p2); - Standard_Real preci = Precision::Confusion(); + constexpr Standard_Real preci = Precision::Confusion(); BRep_Builder B; // check for closed curve diff --git a/src/BRepLib/BRepLib_MakeFace.cxx b/src/BRepLib/BRepLib_MakeFace.cxx index ce7340bfe5..765ee0fe3d 100644 --- a/src/BRepLib/BRepLib_MakeFace.cxx +++ b/src/BRepLib/BRepLib_MakeFace.cxx @@ -559,7 +559,7 @@ void BRepLib_MakeFace::Init(const Handle(Geom_Surface)& SS, // adjust periodical surface or reordonate // check if the values are in the natural range - Standard_Real epsilon = Precision::PConfusion(); + constexpr Standard_Real epsilon = Precision::PConfusion(); BS->Bounds(umin,umax,vmin,vmax); diff --git a/src/BRepLib/BRepLib_MakeShell.cxx b/src/BRepLib/BRepLib_MakeShell.cxx index e29094422b..8e70c4b283 100644 --- a/src/BRepLib/BRepLib_MakeShell.cxx +++ b/src/BRepLib/BRepLib_MakeShell.cxx @@ -96,7 +96,7 @@ void BRepLib_MakeShell::Init(const Handle(Geom_Surface)& S, BS = RTS->BasisSurface(); } myError = BRepLib_EmptyShell; - Standard_Real tol = Precision::Confusion(); + constexpr Standard_Real tol = Precision::Confusion(); // Make a shell from a surface GeomAdaptor_Surface GS(BS,UMin,UMax,VMin,VMax); @@ -358,7 +358,7 @@ void BRepLib_MakeShell::Init(const Handle(Geom_Surface)& S, // Additional checking for degenerated edges Standard_Boolean isDegenerated; Standard_Real aFirst, aLast; - Standard_Real aTol = Precision::Confusion(); + constexpr Standard_Real aTol = Precision::Confusion(); Standard_Real anActTol; TopExp_Explorer anExp(myShape, TopAbs_EDGE); for ( ; anExp.More(); anExp.Next()) diff --git a/src/BRepLib/BRepLib_ToolTriangulatedShape.cxx b/src/BRepLib/BRepLib_ToolTriangulatedShape.cxx index 45d92a3d33..478977d237 100644 --- a/src/BRepLib/BRepLib_ToolTriangulatedShape.cxx +++ b/src/BRepLib/BRepLib_ToolTriangulatedShape.cxx @@ -46,7 +46,7 @@ void BRepLib_ToolTriangulatedShape::ComputeNormals (const TopoDS_Face& theFace, return; } - const Standard_Real aTol = Precision::Confusion(); + constexpr Standard_Real aTol = Precision::Confusion(); Standard_Integer aTri[3]; gp_Dir aNorm; theTris->AddNormals(); diff --git a/src/BRepMAT2d/BRepMAT2d_Explorer.cxx b/src/BRepMAT2d/BRepMAT2d_Explorer.cxx index c6ad6c6e60..250adff599 100644 --- a/src/BRepMAT2d/BRepMAT2d_Explorer.cxx +++ b/src/BRepMAT2d/BRepMAT2d_Explorer.cxx @@ -541,7 +541,7 @@ TopoDS_Edge MakeEdge(const Handle(Geom2d_Curve) &theCurve, { TopoDS_Edge aNewEdge; BRep_Builder aBuilder; - Standard_Real aTol = Precision::Confusion(); + constexpr Standard_Real aTol = Precision::Confusion(); Standard_Real aFPar = theCurve->FirstParameter(); Standard_Real aLPar = theCurve->LastParameter(); diff --git a/src/BRepMesh/BRepMesh_Classifier.cxx b/src/BRepMesh/BRepMesh_Classifier.cxx index 30f853cb84..81ae12d355 100644 --- a/src/BRepMesh/BRepMesh_Classifier.cxx +++ b/src/BRepMesh/BRepMesh_Classifier.cxx @@ -92,8 +92,8 @@ void BRepMesh_Classifier::RegisterWire( aPClass(1) = *p1; aPClass(2) = *p2; - const Standard_Real aAngTol = Precision::Angular(); - const Standard_Real aSqConfusion = + constexpr Standard_Real aAngTol = Precision::Angular(); + constexpr Standard_Real aSqConfusion = Precision::PConfusion() * Precision::PConfusion(); for (Standard_Integer i = 1; i <= aNbPnts; i++) diff --git a/src/BRepMesh/BRepMesh_CurveTessellator.cxx b/src/BRepMesh/BRepMesh_CurveTessellator.cxx index c8e942ec3a..d60f055da9 100644 --- a/src/BRepMesh/BRepMesh_CurveTessellator.cxx +++ b/src/BRepMesh/BRepMesh_CurveTessellator.cxx @@ -126,7 +126,7 @@ void BRepMesh_CurveTessellator::init() const Adaptor3d_CurveOnSurface& aCurve = myCurve.CurveOnSurface(); const Handle(Adaptor3d_Surface)& aSurface = aCurve.GetSurface(); - const Standard_Real aTol = Precision::Confusion(); + constexpr Standard_Real aTol = Precision::Confusion(); const Standard_Real aDu = aSurface->UResolution(aTol); const Standard_Real aDv = aSurface->VResolution(aTol); diff --git a/src/BRepMesh/BRepMesh_GeomTool.cxx b/src/BRepMesh/BRepMesh_GeomTool.cxx index ffa7649433..215085ffa7 100644 --- a/src/BRepMesh/BRepMesh_GeomTool.cxx +++ b/src/BRepMesh/BRepMesh_GeomTool.cxx @@ -419,7 +419,7 @@ BRepMesh_GeomTool::IntFlag BRepMesh_GeomTool::IntSegSeg( // Cross // Intersection is out of segments ranges - const Standard_Real aPrec = Precision::PConfusion(); + constexpr Standard_Real aPrec = Precision::PConfusion(); const Standard_Real aEndPrec = 1 - aPrec; for (Standard_Integer i = 0; i < 2; ++i) { @@ -492,7 +492,7 @@ Standard_Integer BRepMesh_GeomTool::classifyPoint( gp_XY aP1 = thePoint2 - thePoint1; gp_XY aP2 = thePointToCheck - thePoint1; - const Standard_Real aPrec = Precision::PConfusion(); + constexpr Standard_Real aPrec = Precision::PConfusion(); const Standard_Real aSqPrec = aPrec * aPrec; Standard_Real aDist = Abs(aP1 ^ aP2); if (aDist > aPrec) diff --git a/src/BRepMesh/BRepMesh_VertexTool.cxx b/src/BRepMesh/BRepMesh_VertexTool.cxx index 3393f92497..20b40bdc41 100644 --- a/src/BRepMesh/BRepMesh_VertexTool.cxx +++ b/src/BRepMesh/BRepMesh_VertexTool.cxx @@ -67,7 +67,7 @@ BRepMesh_VertexTool::BRepMesh_VertexTool( myCellFilter(0., myAllocator), mySelector (myAllocator) { - const Standard_Real aTol = Precision::Confusion(); + constexpr Standard_Real aTol = Precision::Confusion(); SetCellSize ( aTol + 0.05 * aTol ); SetTolerance( aTol, aTol ); } diff --git a/src/BRepOffset/BRepOffset.cxx b/src/BRepOffset/BRepOffset.cxx index 84b411df82..59c275e450 100644 --- a/src/BRepOffset/BRepOffset.cxx +++ b/src/BRepOffset/BRepOffset.cxx @@ -49,7 +49,7 @@ Handle(Geom_Surface) BRepOffset::Surface(const Handle(Geom_Surface)& Surface, BRepOffset_Status& theStatus, Standard_Boolean allowC0) { - Standard_Real Tol = Precision::Confusion(); + constexpr Standard_Real Tol = Precision::Confusion(); theStatus = BRepOffset_Good; Handle(Geom_Surface) Result; diff --git a/src/BRepOffset/BRepOffset_Inter2d.cxx b/src/BRepOffset/BRepOffset_Inter2d.cxx index 8b35e9301f..c4faa80db1 100644 --- a/src/BRepOffset/BRepOffset_Inter2d.cxx +++ b/src/BRepOffset/BRepOffset_Inter2d.cxx @@ -1044,7 +1044,7 @@ static Standard_Boolean ExtendPCurve(const Handle(Geom2d_Curve)& aPCurve, Handle(Geom2d_Line) aLin; Handle(Geom2d_TrimmedCurve) aSegment; Geom2dConvert_CompCurveToBSplineCurve aCompCurve(aTrCurve, Convert_RationalC1); - Standard_Real aTol = Precision::Confusion(); + constexpr Standard_Real aTol = Precision::Confusion(); Standard_Real aDelta = Max(a2Offset, 1.); if (FirstPar > anEf - a2Offset) { @@ -1462,7 +1462,7 @@ Standard_Boolean BRepOffset_Inter2d::ExtentEdge(const TopoDS_Edge& E,TopoDS_Edge Handle(Geom_Line) aLin; Handle(Geom_TrimmedCurve) aSegment; GeomConvert_CompCurveToBSplineCurve aCompCurve(aTrCurve, Convert_RationalC1); - Standard_Real aTol = Precision::Confusion(); + constexpr Standard_Real aTol = Precision::Confusion(); Standard_Real aDelta = Max(a2Offset, 1.); if (FirstPar > anEf - a2Offset) { @@ -1523,7 +1523,7 @@ static Standard_Boolean UpdateVertex(const TopoDS_Vertex& V, Standard_Real Of = OC.FirstParameter(); Standard_Real Ol = OC.LastParameter(); Standard_Real Nf = NC.FirstParameter(); Standard_Real Nl = NC.LastParameter(); Standard_Real U = 0.; - Standard_Real ParTol = Precision::PConfusion(); + constexpr Standard_Real ParTol = Precision::PConfusion(); gp_Pnt P = BRep_Tool::Pnt(V); Standard_Boolean OK = Standard_False; diff --git a/src/BRepOffset/BRepOffset_MakeOffset.cxx b/src/BRepOffset/BRepOffset_MakeOffset.cxx index 3602b39500..f206ad96aa 100644 --- a/src/BRepOffset/BRepOffset_MakeOffset.cxx +++ b/src/BRepOffset/BRepOffset_MakeOffset.cxx @@ -4573,7 +4573,7 @@ Standard_Boolean TrimEdge(TopoDS_Edge& NE, BOPTools_AlgoTools::MakeSplitEdge(NE, V1, aT1, V2, aT2, aSourceEdge); // // - Standard_Real aSameParTol = Precision::Confusion(); + constexpr Standard_Real aSameParTol = Precision::Confusion(); Standard_Real U = 0.; Standard_Real UMin = Precision::Infinite(); diff --git a/src/BRepOffset/BRepOffset_Offset.cxx b/src/BRepOffset/BRepOffset_Offset.cxx index bd37bcab0b..1d9fe87641 100644 --- a/src/BRepOffset/BRepOffset_Offset.cxx +++ b/src/BRepOffset/BRepOffset_Offset.cxx @@ -1252,7 +1252,7 @@ void BRepOffset_Offset::Init(const TopoDS_Edge& Path, if ( IsClosed) Edge4 = Edge3; - Standard_Real TolApp = Precision::Approximation(); + constexpr Standard_Real TolApp = Precision::Approximation(); Handle(Geom2d_Line) L1,L2; if ( IsClosed) { diff --git a/src/BRepOffset/BRepOffset_Tool.cxx b/src/BRepOffset/BRepOffset_Tool.cxx index 6c08941e18..b02989e089 100644 --- a/src/BRepOffset/BRepOffset_Tool.cxx +++ b/src/BRepOffset/BRepOffset_Tool.cxx @@ -326,7 +326,7 @@ static void BuildPCurves (const TopoDS_Edge& E, if (!C2d.IsNull()) return; //Standard_Real Tolerance = Max(Precision::Confusion(),BRep_Tool::Tolerance(E)); - Standard_Real Tolerance = Precision::Confusion(); + constexpr Standard_Real Tolerance = Precision::Confusion(); BRepAdaptor_Surface AS(F,0); BRepAdaptor_Curve AC(E); @@ -586,7 +586,7 @@ Standard_Boolean BRepOffset_Tool::FindCommonShapes(const TopoDS_Shape& theS1, static Standard_Boolean ToSmall (const Handle(Geom_Curve)& C) { - Standard_Real Tol = 10*Precision::Confusion(); + constexpr Standard_Real Tol = 10*Precision::Confusion(); Standard_Real m = (C->FirstParameter()*0.668 + C->LastParameter()*0.332); gp_Pnt P1 = C->Value(C->FirstParameter()); gp_Pnt P2 = C->Value(C->LastParameter()); @@ -1530,7 +1530,7 @@ void BRepOffset_Tool::Inter3D(const TopoDS_Face& F1, } } - Standard_Real aSameParTol = Precision::Confusion(); + constexpr Standard_Real aSameParTol = Precision::Confusion(); Standard_Boolean isEl1 = Standard_False, isEl2 = Standard_False; Handle(Geom_Surface) aSurf = BRep_Tool::Surface(F1); @@ -2519,7 +2519,7 @@ static void MakeFace(const Handle(Geom_Surface)& S, // compute vertices BRep_Builder B; - Standard_Real tol = Precision::Confusion(); + constexpr Standard_Real tol = Precision::Confusion(); TopoDS_Vertex V00,V10,V11,V01; @@ -3716,7 +3716,7 @@ void BRepOffset_Tool::ExtentFace (const TopoDS_Face& F, TopoDS_Vertex NV1,NV2; TopAbs_Orientation Or; Standard_Real U1,U2; - Standard_Real eps = Precision::Confusion(); + constexpr Standard_Real eps = Precision::Confusion(); #ifdef OCCT_DEBUG TopLoc_Location L; @@ -3969,7 +3969,7 @@ static Standard_Boolean IsInOut (BRepTopAdaptor_FClass2d& FC, const Geom2dAdaptor_Curve& AC, const TopAbs_State& S ) { - Standard_Real Def = 100*Precision::Confusion(); + constexpr Standard_Real Def = 100*Precision::Confusion(); GCPnts_QuasiUniformDeflection QU(AC,Def); for (Standard_Integer i = 1; i <= QU.NbPoints(); i++) { diff --git a/src/BRepOffsetAPI/BRepOffsetAPI_MiddlePath.cxx b/src/BRepOffsetAPI/BRepOffsetAPI_MiddlePath.cxx index 25d8297b72..9aee337faa 100644 --- a/src/BRepOffsetAPI/BRepOffsetAPI_MiddlePath.cxx +++ b/src/BRepOffsetAPI/BRepOffsetAPI_MiddlePath.cxx @@ -138,7 +138,7 @@ static Standard_Boolean IsValidEdge(const TopoDS_Edge& theEdge, TopoDS_Vertex V1, V2; TopExp::Vertices(theEdge, V1, V2); - Standard_Real Tol = Precision::Confusion(); + constexpr Standard_Real Tol = Precision::Confusion(); Standard_Integer i; TopExp_Explorer Explo(theFace, TopAbs_EDGE); diff --git a/src/BRepOffsetAPI/BRepOffsetAPI_ThruSections.cxx b/src/BRepOffsetAPI/BRepOffsetAPI_ThruSections.cxx index fcbdd4ba76..8998eea655 100644 --- a/src/BRepOffsetAPI/BRepOffsetAPI_ThruSections.cxx +++ b/src/BRepOffsetAPI/BRepOffsetAPI_ThruSections.cxx @@ -99,7 +99,7 @@ static Standard_Real PreciseUpar(const Standard_Real anUpar, const Handle(Geom_BSplineSurface)& aSurface) { - Standard_Real Tol = Precision::PConfusion(); + constexpr Standard_Real Tol = Precision::PConfusion(); Standard_Integer i1, i2; aSurface->LocateU(anUpar, Tol, i1, i2); diff --git a/src/BRepSweep/BRepSweep_Trsf.cxx b/src/BRepSweep/BRepSweep_Trsf.cxx index b1649a7dd9..6676c13d99 100644 --- a/src/BRepSweep/BRepSweep_Trsf.cxx +++ b/src/BRepSweep/BRepSweep_Trsf.cxx @@ -89,7 +89,7 @@ Standard_Boolean BRepSweep_Trsf::Process(const TopoDS_Shape& aGenS, void BRepSweep_Trsf::SetContinuity(const TopoDS_Shape& aGenS, const Sweep_NumShape& aDirS) { - Standard_Real tl = Precision::Confusion(), tol3d; + constexpr Standard_Real tl = Precision::Confusion(); //angular etant un peu severe pour les contours sketches. Standard_Real ta = 0.00175;//environ 0.1 degre GeomAbs_Shape cont; @@ -103,7 +103,7 @@ void BRepSweep_Trsf::SetContinuity(const TopoDS_Shape& aGenS, TopExp::Vertices(E,d,f); if(d.IsSame(f)){ // tol3d = Max(tl,BRep_Tool::Tolerance(d)); - tol3d = Max(tl,2.*BRep_Tool::Tolerance(d));//IFV 24.05.00 buc60684 + const Standard_Real tol3d = Max(tl,2.*BRep_Tool::Tolerance(d));//IFV 24.05.00 buc60684 e.Initialize(E); ud = BRep_Tool::Parameter(d,TopoDS::Edge(aGenS)); uf = BRep_Tool::Parameter(f,TopoDS::Edge(aGenS)); @@ -155,7 +155,7 @@ void BRepSweep_Trsf::SetContinuity(const TopoDS_Shape& aGenS, u1 = BRep_Tool::Parameter(V,E1); u2 = BRep_Tool::Parameter(V,E2); // tol3d = Max(tl,BRep_Tool::Tolerance(V)); - tol3d = Max(tl,2.*BRep_Tool::Tolerance(V)); //IFV 24.05.00 buc60684 + const Standard_Real tol3d = Max(tl,2.*BRep_Tool::Tolerance(V)); //IFV 24.05.00 buc60684 e1.Initialize(E1); e2.Initialize(E2); cont = BRepLProp::Continuity(e1,e2,u1,u2,tol3d,ta); diff --git a/src/BRepTest/BRepTest_CurveCommands.cxx b/src/BRepTest/BRepTest_CurveCommands.cxx index 11a49f95c0..aaa48b9979 100644 --- a/src/BRepTest/BRepTest_CurveCommands.cxx +++ b/src/BRepTest/BRepTest_CurveCommands.cxx @@ -1743,7 +1743,7 @@ Standard_Integer edgeintersector(Draw_Interpretor& di, BRep_Builder B; Standard_Integer NbV = 0; - Standard_Real Tol = Precision::PConfusion(); + constexpr Standard_Real Tol = Precision::PConfusion(); Standard_Boolean rejectreducedsegmentpoints = Standard_True; EInter.InitPoint(rejectreducedsegmentpoints); diff --git a/src/BRepTest/BRepTest_OtherCommands.cxx b/src/BRepTest/BRepTest_OtherCommands.cxx index a6e860adee..92c3558d31 100644 --- a/src/BRepTest/BRepTest_OtherCommands.cxx +++ b/src/BRepTest/BRepTest_OtherCommands.cxx @@ -533,7 +533,7 @@ TopoDS_Face NextFaceForPrism (const TopoDS_Shape& shape, if (ASI.IsDone()) { Standard_Integer no=1, IndFrom, IndTo; TopAbs_Orientation theOr; - Standard_Real min = 1.e-04, Tol = -Precision::Confusion(); + constexpr Standard_Real min = 1.e-04, Tol = -Precision::Confusion(); if (ASI.LocalizeAfter (no, min, Tol, theOr, IndFrom, IndTo)) { nextFace = ASI.Point(no, IndFrom).Face(); break; diff --git a/src/BRepTools/BRepTools.cxx b/src/BRepTools/BRepTools.cxx index 91e9cbf436..b70d7b44a7 100644 --- a/src/BRepTools/BRepTools.cxx +++ b/src/BRepTools/BRepTools.cxx @@ -217,7 +217,7 @@ void BRepTools::AddUVBounds(const TopoDS_Face& aF, if (aS->DynamicType() == STANDARD_TYPE(Geom_BSplineSurface) && (aXmin < aUmin || aXmax > aUmax)) { - Standard_Real aTol2 = 100 * Precision::Confusion() * Precision::Confusion(); + constexpr Standard_Real aTol2 = 100 * Precision::Confusion() * Precision::Confusion(); isUPeriodic = Standard_True; gp_Pnt P1, P2; // 1. Verify that the surface is U-closed @@ -298,7 +298,7 @@ void BRepTools::AddUVBounds(const TopoDS_Face& aF, if (aS->DynamicType() == STANDARD_TYPE(Geom_BSplineSurface) && (aYmin < aVmin || aYmax > aVmax)) { - Standard_Real aTol2 = 100 * Precision::Confusion() * Precision::Confusion(); + constexpr Standard_Real aTol2 = 100 * Precision::Confusion() * Precision::Confusion(); isVPeriodic = Standard_True; gp_Pnt P1, P2; // 1. Verify that the surface is V-closed diff --git a/src/BiTgte/BiTgte_Blend.cxx b/src/BiTgte/BiTgte_Blend.cxx index c4f76cb668..060ca69b0f 100644 --- a/src/BiTgte/BiTgte_Blend.cxx +++ b/src/BiTgte/BiTgte_Blend.cxx @@ -223,7 +223,7 @@ static void KPartCurve3d(const TopoDS_Edge& Edge, // if not found call BRepLib::BuildCurve3d TopLoc_Location Loc; - Standard_Real Tol = Precision::Confusion(); + constexpr Standard_Real Tol = Precision::Confusion(); // Search only isos on analytical surfaces. Geom2dAdaptor_Curve C(Curve); @@ -429,7 +429,7 @@ Handle(Geom_Curve) MakeCurve (const BiTgte_CurveOnEdge& HC) MakeCurve_Function F(HC); Standard_Integer Deg1, Deg2; Deg1 = Deg2 = 8; - Standard_Real Tol = Precision::Approximation(); + constexpr Standard_Real Tol = Precision::Approximation(); Approx_FitAndDivide Fit(F,Deg1,Deg2,Tol,Tol,Standard_True); Standard_Integer i; Standard_Integer NbCurves = Fit.NbMultiCurves(); @@ -552,7 +552,7 @@ static TopoDS_Edge MakeDegeneratedEdge(const Handle(Geom_Curve)& CC, const TopoDS_Vertex& VfOnE) { BRep_Builder B; - Standard_Real Tol = Precision::Confusion(); + constexpr Standard_Real Tol = Precision::Confusion(); // kill trimmed curves Handle(Geom_Curve) C = CC; Handle(Geom_TrimmedCurve) CT = Handle(Geom_TrimmedCurve)::DownCast(C); diff --git a/src/Bisector/Bisector_BisecAna.cxx b/src/Bisector/Bisector_BisecAna.cxx index 64a31618a3..a761efe77c 100644 --- a/src/Bisector/Bisector_BisecAna.cxx +++ b/src/Bisector/Bisector_BisecAna.cxx @@ -224,7 +224,7 @@ void Bisector_BisecAna::Perform(const Handle(Geom2d_Curve)& afirstcurve , Standard_Boolean thesense = Standard_False,sense; Standard_Real distancemini; Standard_Integer nbsolution; - Standard_Real PreConf = Precision::Confusion(); + constexpr Standard_Real PreConf = Precision::Confusion(); Handle(Standard_Type) type1 = afirstcurve->DynamicType(); Handle(Standard_Type) type2 = asecondcurve->DynamicType(); diff --git a/src/Bisector/Bisector_BisecCC.cxx b/src/Bisector/Bisector_BisecCC.cxx index 07f29490ce..cf981d3a27 100644 --- a/src/Bisector/Bisector_BisecCC.cxx +++ b/src/Bisector/Bisector_BisecCC.cxx @@ -121,7 +121,7 @@ void Bisector_BisecCC::Perform(const Handle(Geom2d_Curve)& Cu1, Standard_Real U,UC1,UC2,Dist,dU,USol; gp_Pnt2d P; Standard_Integer NbPnts = 21; - Standard_Real EpsMin = 10*Precision::Confusion(); + constexpr Standard_Real EpsMin = 10*Precision::Confusion(); Standard_Boolean YaPoly = Standard_True; Standard_Boolean OriInPoly = Standard_False; //--------------------------------------------- @@ -1626,8 +1626,8 @@ Standard_Real Bisector_BisecCC::SearchBound (const Standard_Real U1, Standard_Real UMid,Dist1,Dist2,DistMid,U11,U22; Standard_Real UC1,UC2; gp_Pnt2d PBis,PBisPrec; - Standard_Real TolPnt = Precision::Confusion(); - Standard_Real TolPar = Precision::PConfusion(); + constexpr Standard_Real TolPnt = Precision::Confusion(); + constexpr Standard_Real TolPar = Precision::PConfusion(); U11 = U1; U22 = U2; PBisPrec = ValueByInt(U11,UC1,UC2,Dist1); PBis = ValueByInt(U22,UC1,UC2,Dist2); diff --git a/src/Bisector/Bisector_BisecPC.cxx b/src/Bisector/Bisector_BisecPC.cxx index 5ee0290a45..cbbdc256d8 100644 --- a/src/Bisector/Bisector_BisecPC.cxx +++ b/src/Bisector/Bisector_BisecPC.cxx @@ -610,7 +610,7 @@ Standard_Real Bisector_BisecPC::SearchBound (const Standard_Real U1, { Standard_Real Dist1,DistMid,U11,U22; Standard_Real UMid = 0.; - Standard_Real Tol = Precision::PConfusion(); + constexpr Standard_Real Tol = Precision::PConfusion(); Standard_Real DistMax2 = distMax*distMax; U11 = U1; U22 = U2; Dist1 = Distance(U11); @@ -758,7 +758,7 @@ Standard_Boolean Bisector_BisecPC::IsEmpty() const //========================================================================== Standard_Real Bisector_BisecPC::Parameter(const gp_Pnt2d& P) const { - Standard_Real Tol = Precision::Confusion(); + constexpr Standard_Real Tol = Precision::Confusion(); if (P.IsEqual(pointStartBis,Tol)) {return startIntervals.Value(bisInterval);} if (P.IsEqual(pointEndBis ,Tol)) {return endIntervals .Value(bisInterval);} diff --git a/src/Bisector/Bisector_Inter.cxx b/src/Bisector/Bisector_Inter.cxx index 47911ac581..5213fb0392 100644 --- a/src/Bisector/Bisector_Inter.cxx +++ b/src/Bisector/Bisector_Inter.cxx @@ -324,7 +324,7 @@ void Bisector_Inter::NeighbourPerform(const Handle(Bisector_BisecCC)& Bis1, { Standard_Real USol,U1,U2,Dist; Standard_Real UMin =0.,UMax =0.; - Standard_Real Eps = Precision::PConfusion(); + constexpr Standard_Real Eps = Precision::PConfusion(); gp_Pnt2d PSol; Handle(Geom2d_Curve) Guide; diff --git a/src/BndLib/BndLib.cxx b/src/BndLib/BndLib.cxx index adbd0238bc..1d8f87d82b 100644 --- a/src/BndLib/BndLib.cxx +++ b/src/BndLib/BndLib.cxx @@ -1144,8 +1144,8 @@ static void ComputeSphere (const gp_Sphere& Sphere, zmin = P.Z() - R; zmax = P.Z() + R; - Standard_Real uper = 2. * M_PI - Precision::PConfusion(); - Standard_Real vper = M_PI - Precision::PConfusion(); + constexpr Standard_Real uper = 2. * M_PI - Precision::PConfusion(); + constexpr Standard_Real vper = M_PI - Precision::PConfusion(); if (UMax - UMin >= uper && VMax - VMin >= vper) { // a whole sphere @@ -1244,7 +1244,7 @@ static void computeDegeneratedTorus (const gp_Torus& theTorus, Standard_Real aPhi = ACos (-aRa / aRi); - Standard_Real anUper = 2. * M_PI - Precision::PConfusion(); + constexpr Standard_Real anUper = 2. * M_PI - Precision::PConfusion(); Standard_Real aVper = 2. * aPhi - Precision::PConfusion(); if (theUMax - theUMin >= anUper && theVMax - theVMin >= aVper) { diff --git a/src/BndLib/BndLib_Add2dCurve.cxx b/src/BndLib/BndLib_Add2dCurve.cxx index ad454b8a94..3a61c34b48 100644 --- a/src/BndLib/BndLib_Add2dCurve.cxx +++ b/src/BndLib/BndLib_Add2dCurve.cxx @@ -495,7 +495,7 @@ void BndLib_Box2dCurve::PerformBSpline() } // - const Standard_Real eps = Precision::PConfusion(); + constexpr Standard_Real eps = Precision::PConfusion(); if (fabs(aT1-aTb[0]) > eps || fabs(aT2-aTb[1]) > eps) { aG=aCBS->Copy(); // diff --git a/src/ChFiKPart/ChFiKPart_ComputeData_FilPlnCyl.cxx b/src/ChFiKPart/ChFiKPart_ComputeData_FilPlnCyl.cxx index 4090e7a9ba..5f0570977b 100644 --- a/src/ChFiKPart/ChFiKPart_ComputeData_FilPlnCyl.cxx +++ b/src/ChFiKPart/ChFiKPart_ComputeData_FilPlnCyl.cxx @@ -118,7 +118,7 @@ Standard_Boolean ChFiKPart_MakeFillet(TopOpeBRepDS_DataStructure& DStr, Standard_Real UOnCyl,VOnCyl,UOnPln,VOnPln; ElSLib::Parameters(Cyl,OrFillet,UOnCyl,VOnCyl); - Standard_Real tesp = Precision::Confusion(); + constexpr Standard_Real tesp = Precision::Confusion(); if(UOnCyl < fu - tesp || UOnCyl > lu + tesp) UOnCyl = ElCLib::InPeriod(UOnCyl,fu,fu+2*M_PI); ElSLib::Parameters(Pln,OrFillet,UOnPln,VOnPln); diff --git a/src/Contap/Contap_Contour.cxx b/src/Contap/Contap_Contour.cxx index 16d2d58625..180c858c18 100644 --- a/src/Contap/Contap_Contour.cxx +++ b/src/Contap/Contap_Contour.cxx @@ -284,7 +284,7 @@ static void LineConstructor(Contap_TheSequenceOfLine& slin, //-- ------------------------------------------------------------ //-- on decoupe la ligne en portions entre 2 vertex - Standard_Real Tol = Precision::PConfusion(); + constexpr Standard_Real Tol = Precision::PConfusion(); Contap_IType typl = L.TypeContour(); //-- std::cout<<"\n ----------- Ligne Constructor "<FirstParameter(), LastPar = GC->LastParameter(); - Standard_Real pconf = Precision::PConfusion(); + constexpr Standard_Real pconf = Precision::PConfusion(); if (Abs( paramf - LastPar ) <= pconf) { paramf = FirstPar; diff --git a/src/Draft/Draft_Modification_1.cxx b/src/Draft/Draft_Modification_1.cxx index ecbc035bc0..c671c3604f 100644 --- a/src/Draft/Draft_Modification_1.cxx +++ b/src/Draft/Draft_Modification_1.cxx @@ -1587,7 +1587,7 @@ void Draft_Modification::Perform () { // pf >= pl Standard_Real FirstPar = theCurve->FirstParameter(), LastPar = theCurve->LastParameter(); - Standard_Real pconf = Precision::PConfusion(); + constexpr Standard_Real pconf = Precision::PConfusion(); if (Abs( pf - LastPar ) <= pconf) pf = FirstPar; else if (Abs( pl - FirstPar ) <= pconf) @@ -2074,7 +2074,7 @@ static Standard_Real SmartParameter(Draft_EdgeInfo& Einf, const Handle(Geom_Surface)& S2) { Handle( Geom2d_Curve ) NewC2d; - Standard_Real Tol = Precision::Confusion(); + constexpr Standard_Real Tol = Precision::Confusion(); Standard_Real Etol = EdgeTol; Handle( Geom2d_Curve ) pcu1 = Einf.FirstPC(); diff --git a/src/DsgPrs/DsgPrs.cxx b/src/DsgPrs/DsgPrs.cxx index 63f4e5494e..ed2a4afd6a 100644 --- a/src/DsgPrs/DsgPrs.cxx +++ b/src/DsgPrs/DsgPrs.cxx @@ -228,7 +228,7 @@ void DsgPrs::ComputeCurvilinearFacesLengthPresentation( const Standard_Real Firs GeomAPI_ProjectPointOnCurve ProjectorOnCurve; Standard_Real U1, V1, U2, V2; Standard_Real LastU, LastV; - Standard_Real SquareTolerance = Precision::SquareConfusion(); + constexpr Standard_Real SquareTolerance = Precision::SquareConfusion(); ProjectorOnSurface.Init( AttachmentPoint1, SecondSurf ); Standard_Integer Index(1); diff --git a/src/Extrema/Extrema_ExtElCS.cxx b/src/Extrema/Extrema_ExtElCS.cxx index 937f7c3bad..a899ac6069 100644 --- a/src/Extrema/Extrema_ExtElCS.cxx +++ b/src/Extrema/Extrema_ExtElCS.cxx @@ -459,7 +459,7 @@ void Extrema_ExtElCS::Perform(const gp_Circ& C, Standard_Integer aNbExt = anExtC.NbExt(); Standard_Integer i; Standard_Integer aCurI = 1; - Standard_Real aTolConf = Precision::Confusion(); + constexpr Standard_Real aTolConf = Precision::Confusion(); Standard_Real aCylRad = S.Radius(); // Check whether two objects have intersection points diff --git a/src/Extrema/Extrema_ExtPElC.cxx b/src/Extrema/Extrema_ExtPElC.cxx index 53514f594b..3752888033 100644 --- a/src/Extrema/Extrema_ExtPElC.cxx +++ b/src/Extrema/Extrema_ExtPElC.cxx @@ -143,7 +143,7 @@ void Extrema_ExtPElC::Perform(const gp_Pnt& P, Standard_Real Usol[2]; Usol[0] = C.XAxis().Direction().AngleWithRef(OPp,Axe); // -M_PI -aAngTol ) diff --git a/src/Extrema/Extrema_FuncExtCS.cxx b/src/Extrema/Extrema_FuncExtCS.cxx index 78b2146d63..6ade0b9d93 100644 --- a/src/Extrema/Extrema_FuncExtCS.cxx +++ b/src/Extrema/Extrema_FuncExtCS.cxx @@ -206,7 +206,7 @@ Standard_Integer Extrema_FuncExtCS::GetStateNumber() std::cout <<"F(1)= "< aPrecision) @@ -506,7 +506,7 @@ void GCPnts_TangentialDeflection::PerformCurve (const TheCurve& theC) Standard_Real Du, Dusave, MiddleU, L1, L2; Standard_Real U1 = myFirstu; - Standard_Real LTol = Precision::Confusion(); // protection longueur nulle + constexpr Standard_Real LTol = Precision::Confusion(); // protection longueur nulle Standard_Real ATol = 1.e-2 * myAngularDeflection; if (ATol > 1.e-2) { diff --git a/src/GccAna/GccAna_Circ2dBisec.cxx b/src/GccAna/GccAna_Circ2dBisec.cxx index 6b44e754d0..d732619986 100644 --- a/src/GccAna/GccAna_Circ2dBisec.cxx +++ b/src/GccAna/GccAna_Circ2dBisec.cxx @@ -51,7 +51,7 @@ GccAna_Circ2dBisec:: //========================================================================= WellDone = Standard_False; - Standard_Real Tol=Precision::Confusion(); + constexpr Standard_Real Tol=Precision::Confusion(); Standard_Real R1 = Circ1.Radius(); Standard_Real R2 = Circ2.Radius(); diff --git a/src/Geom/Geom_OffsetSurface.cxx b/src/Geom/Geom_OffsetSurface.cxx index 19c62e901c..28330dd547 100644 --- a/src/Geom/Geom_OffsetSurface.cxx +++ b/src/Geom/Geom_OffsetSurface.cxx @@ -216,7 +216,7 @@ void Geom_OffsetSurface::SetBasisSurface (const Handle(Geom_Surface)& S, // et la mettre en champ, on pourrait utiliser par exemple pour l'extraction d'iso // et aussi pour les singularite. Pour les surfaces osculatrices, on l'utilise pour // detecter si une iso est degeneree. - const Standard_Real Tol = Precision::Confusion(); //0.0001; + constexpr Standard_Real Tol = Precision::Confusion(); //0.0001; myOscSurf = new Geom_OsculatingSurface(aCheckingSurf, Tol); } @@ -802,7 +802,7 @@ Handle(Geom_Surface) Geom_OffsetSurface::Surface() const { if (offsetValue == 0.0) return basisSurf; // Cas direct - Standard_Real Tol = Precision::Confusion(); + constexpr Standard_Real Tol = Precision::Confusion(); Handle(Geom_Surface) Result, Base; Result.Nullify(); Handle(Standard_Type) TheType = basisSurf->DynamicType(); diff --git a/src/Geom2dGcc/Geom2dGcc_Circ2d2TanRadGeo.cxx b/src/Geom2dGcc/Geom2dGcc_Circ2d2TanRadGeo.cxx index 379a9d767d..7973269623 100644 --- a/src/Geom2dGcc/Geom2dGcc_Circ2d2TanRadGeo.cxx +++ b/src/Geom2dGcc/Geom2dGcc_Circ2d2TanRadGeo.cxx @@ -855,7 +855,7 @@ pararg2(1,aNbSolMAX) Intp.Perform(C1,C2,Tol,Tol); if (Intp.IsDone()) { if (!Intp.IsEmpty()) { - const Standard_Real aSQApproxTol = Precision::Approximation() * + constexpr Standard_Real aSQApproxTol = Precision::Approximation() * Precision::Approximation(); for (Standard_Integer i = 1; i <= Intp.NbPoints() && NbrSol < aNbSolMAX; i++) { diff --git a/src/GeomAPI/GeomAPI_ExtremaCurveCurve.cxx b/src/GeomAPI/GeomAPI_ExtremaCurveCurve.cxx index b25ebf8667..eabd77c701 100644 --- a/src/GeomAPI/GeomAPI_ExtremaCurveCurve.cxx +++ b/src/GeomAPI/GeomAPI_ExtremaCurveCurve.cxx @@ -81,7 +81,7 @@ void GeomAPI_ExtremaCurveCurve::Init myTotalExt = Standard_False; - Standard_Real Tol = Precision::PConfusion(); + constexpr Standard_Real Tol = Precision::PConfusion(); myC1.Load(C1); myC2.Load(C2); @@ -123,7 +123,7 @@ void GeomAPI_ExtremaCurveCurve::Init myTotalExt = Standard_False; - Standard_Real Tol = Precision::PConfusion(); + constexpr Standard_Real Tol = Precision::PConfusion(); myC1.Load(C1); myC2.Load(C2); diff --git a/src/GeomAPI/GeomAPI_ExtremaCurveSurface.cxx b/src/GeomAPI/GeomAPI_ExtremaCurveSurface.cxx index c77fdb07a0..a7f45b9e90 100644 --- a/src/GeomAPI/GeomAPI_ExtremaCurveSurface.cxx +++ b/src/GeomAPI/GeomAPI_ExtremaCurveSurface.cxx @@ -81,7 +81,7 @@ void GeomAPI_ExtremaCurveSurface::Init GeomAdaptor_Curve TheCurve (Curve); GeomAdaptor_Surface TheSurface (Surface); - Standard_Real Tol = Precision::PConfusion(); + constexpr Standard_Real Tol = Precision::PConfusion(); myExtCS.Initialize (TheSurface, Tol, Tol); myExtCS.Perform (TheCurve, TheCurve.FirstParameter(), TheCurve.LastParameter()); myIsDone = myExtCS.IsDone() && (myExtCS.IsParallel() || myExtCS.NbExt() > 0); @@ -122,7 +122,7 @@ void GeomAPI_ExtremaCurveSurface::Init GeomAdaptor_Curve TheCurve (Curve, Wmin, Wmax); GeomAdaptor_Surface TheSurface (Surface, Umin, Umax, Vmin, Vmax); - Standard_Real Tol = Precision::PConfusion(); + constexpr Standard_Real Tol = Precision::PConfusion(); myExtCS.Initialize (TheSurface, Umin,Umax,Vmin,Vmax,Tol,Tol); myExtCS.Perform (TheCurve, Wmin, Wmax); diff --git a/src/GeomAPI/GeomAPI_ExtremaSurfaceSurface.cxx b/src/GeomAPI/GeomAPI_ExtremaSurfaceSurface.cxx index 8a844f4491..a5958c4090 100644 --- a/src/GeomAPI/GeomAPI_ExtremaSurfaceSurface.cxx +++ b/src/GeomAPI/GeomAPI_ExtremaSurfaceSurface.cxx @@ -81,7 +81,7 @@ void GeomAPI_ExtremaSurfaceSurface::Init GeomAdaptor_Surface TheSurface1 (S1); GeomAdaptor_Surface TheSurface2 (S2); - Standard_Real Tol = Precision::PConfusion(); + constexpr Standard_Real Tol = Precision::PConfusion(); Extrema_ExtSS theExtSS(TheSurface1, TheSurface2,Tol,Tol); myExtSS = theExtSS; @@ -126,7 +126,7 @@ void GeomAPI_ExtremaSurfaceSurface::Init GeomAdaptor_Surface TheSurface1 (S1,U1min,U1max,V1min,V1max); GeomAdaptor_Surface TheSurface2 (S2,U2min,U2max,V2min,V2max); - Standard_Real Tol = Precision::PConfusion(); + constexpr Standard_Real Tol = Precision::PConfusion(); Extrema_ExtSS theExtSS(TheSurface1, TheSurface2, U1min,U1max,V1min,V1max, U2min,U2max,V2min,V2max, diff --git a/src/GeomAPI/GeomAPI_ProjectPointOnSurf.cxx b/src/GeomAPI/GeomAPI_ProjectPointOnSurf.cxx index c04bcce8af..1ab632dfb9 100644 --- a/src/GeomAPI/GeomAPI_ProjectPointOnSurf.cxx +++ b/src/GeomAPI/GeomAPI_ProjectPointOnSurf.cxx @@ -161,7 +161,7 @@ GeomAPI_ProjectPointOnSurf::GeomAPI_ProjectPointOnSurf() const Standard_Real Vsup, const Extrema_ExtAlgo theProjAlgo) { - Standard_Real Tolerance = Precision::PConfusion(); + constexpr Standard_Real Tolerance = Precision::PConfusion(); //modified by NIZNHY-PKV Thu Apr 4 10:38:23 2002 f //GeomAdaptor_Surface TheSurface (Surface,Umin,Usup,Vmin,Vsup); //myExtPS = Extrema_ExtPS (P, TheSurface, Tol, Tol); @@ -211,7 +211,7 @@ GeomAPI_ProjectPointOnSurf::GeomAPI_ProjectPointOnSurf() const Standard_Real Vsup, const Extrema_ExtAlgo theProjAlgo) { - Standard_Real Tolerance = Precision::PConfusion(); + constexpr Standard_Real Tolerance = Precision::PConfusion(); //modified by NIZNHY-PKV Thu Apr 4 10:41:50 2002 f //GeomAdaptor_Surface TheSurface (Surface,Umin,Usup,Vmin,Vsup); myGeomAdaptor.Load(Surface, Umin,Usup,Vmin,Vsup); diff --git a/src/GeomAdaptor/GeomAdaptor_Surface.cxx b/src/GeomAdaptor/GeomAdaptor_Surface.cxx index 816af616f9..4704fddc01 100644 --- a/src/GeomAdaptor/GeomAdaptor_Surface.cxx +++ b/src/GeomAdaptor/GeomAdaptor_Surface.cxx @@ -83,7 +83,7 @@ GeomAbs_Shape LocalContinuity(Standard_Integer Degree, Standard_Real newFirst, newLast; BSplCLib::LocateParameter(Degree,TK,TM,PFirst,IsPeriodic,1,Nb,Index1,newFirst); BSplCLib::LocateParameter(Degree,TK,TM,PLast, IsPeriodic,1,Nb,Index2,newLast ); - const Standard_Real EpsKnot = Precision::PConfusion(); + constexpr Standard_Real EpsKnot = Precision::PConfusion(); if (Abs(newFirst-TK(Index1+1))< EpsKnot) Index1++; if (Abs(newLast -TK(Index2 ))< EpsKnot) Index2--; // attention aux courbes peridiques. diff --git a/src/GeomAdaptor/GeomAdaptor_SurfaceOfRevolution.cxx b/src/GeomAdaptor/GeomAdaptor_SurfaceOfRevolution.cxx index 62eb29784e..955a55f1f9 100644 --- a/src/GeomAdaptor/GeomAdaptor_SurfaceOfRevolution.cxx +++ b/src/GeomAdaptor/GeomAdaptor_SurfaceOfRevolution.cxx @@ -307,7 +307,7 @@ void GeomAdaptor_SurfaceOfRevolution::VIntervals(TColStd_Array1OfReal& T, Handle(Adaptor3d_Surface) GeomAdaptor_SurfaceOfRevolution::UTrim (const Standard_Real First, const Standard_Real Last, const Standard_Real Tol) const { - const Standard_Real Eps = Precision::PConfusion(); + constexpr Standard_Real Eps = Precision::PConfusion(); (void )Eps; (void )First; (void )Last; (void )Tol; Standard_OutOfRange_Raise_if ( Abs(First) > Eps || Abs(Last - 2.*M_PI) > Eps, @@ -425,9 +425,9 @@ Standard_Real GeomAdaptor_SurfaceOfRevolution::VResolution GeomAbs_SurfaceType GeomAdaptor_SurfaceOfRevolution::GetType() const { - Standard_Real TolConf = Precision::Confusion(); - Standard_Real TolAng = Precision::Angular(); - Standard_Real TolConeSemiAng = Precision::Confusion(); + constexpr Standard_Real TolConf = Precision::Confusion(); + constexpr Standard_Real TolAng = Precision::Angular(); + constexpr Standard_Real TolConeSemiAng = Precision::Confusion(); switch (myBasisCurve->GetType()) { case GeomAbs_Line: { diff --git a/src/GeomConvert/GeomConvert_CurveToAnaCurve.cxx b/src/GeomConvert/GeomConvert_CurveToAnaCurve.cxx index b336e3741f..7193e08846 100644 --- a/src/GeomConvert/GeomConvert_CurveToAnaCurve.cxx +++ b/src/GeomConvert/GeomConvert_CurveToAnaCurve.cxx @@ -482,7 +482,7 @@ Handle(Geom_Curve) GeomConvert_CurveToAnaCurve::ComputeEllipse(const Handle(Geom } Handle(Geom_Curve) res; - Standard_Real prec = Precision::PConfusion(); + constexpr Standard_Real prec = Precision::PConfusion(); Standard_Real AF,BF,CF,DF,EF,Q1,Q2,Q3,c2n; Standard_Integer i; diff --git a/src/GeomConvert/GeomConvert_SurfToAnaSurf.cxx b/src/GeomConvert/GeomConvert_SurfToAnaSurf.cxx index 93635b193d..00296f8d15 100644 --- a/src/GeomConvert/GeomConvert_SurfToAnaSurf.cxx +++ b/src/GeomConvert/GeomConvert_SurfToAnaSurf.cxx @@ -249,7 +249,7 @@ Standard_Boolean GeomConvert_SurfToAnaSurf::GetCylByLS(const Handle(TColgp_HArra aLBnd(4) = aStartPoint(4) + aDR; // - Standard_Real aTol = Precision::Confusion(); + constexpr Standard_Real aTol = Precision::Confusion(); math_MultipleVarFunction* aPFunc; GeomConvert_FuncCylinderLSDist aFuncCyl(thePoints, thePos.Direction()); aPFunc = (math_MultipleVarFunction*)&aFuncCyl; @@ -767,7 +767,7 @@ Handle(Geom_Surface) GeomConvert_SurfToAnaSurf::ConvertToAnalytical(const Standa Standard_Real U1, U2, V1, V2; mySurf->Bounds(U1, U2, V1, V2); Standard_Boolean aDoSegment = Standard_False; - Standard_Real aTolBnd = Precision::PConfusion(); + constexpr Standard_Real aTolBnd = Precision::PConfusion(); Standard_Integer isurf = 0; if (Umin < U1 || Umax > U2 || Vmin < V1 || Vmax > V2) { diff --git a/src/GeomFill/GeomFill_BSplineCurves.cxx b/src/GeomFill/GeomFill_BSplineCurves.cxx index e0b1eceed5..fe251e0b77 100644 --- a/src/GeomFill/GeomFill_BSplineCurves.cxx +++ b/src/GeomFill/GeomFill_BSplineCurves.cxx @@ -259,7 +259,7 @@ void GeomFill_BSplineCurves::Init // On ordonne les courbes Handle(Geom_BSplineCurve) CC1, CC2, CC3, CC4; - Standard_Real Tol = Precision::Confusion(); + constexpr Standard_Real Tol = Precision::Confusion(); #ifndef No_Exception Standard_Boolean IsOK = #endif @@ -517,7 +517,7 @@ void GeomFill_BSplineCurves::Init } } else { - Standard_Real Eps = Precision::Confusion(); + constexpr Standard_Real Eps = Precision::Confusion(); Standard_Boolean IsOK = Standard_False; if ( CC1->StartPoint().IsEqual(CC2->StartPoint(),Eps)) { IsOK = Standard_True; diff --git a/src/GeomFill/GeomFill_BezierCurves.cxx b/src/GeomFill/GeomFill_BezierCurves.cxx index 5c939bc09d..d4045adcad 100644 --- a/src/GeomFill/GeomFill_BezierCurves.cxx +++ b/src/GeomFill/GeomFill_BezierCurves.cxx @@ -47,7 +47,7 @@ static void SetSameWeights(TColStd_Array1OfReal& W1, TColStd_Array1OfReal& W3, TColStd_Array1OfReal& W4 ) { - Standard_Real Eps = Precision::Confusion(); + constexpr Standard_Real Eps = Precision::Confusion(); Standard_Integer NU = W1.Length(); Standard_Integer NV = W2.Length(); @@ -213,7 +213,7 @@ void GeomFill_BezierCurves::Init(const Handle(Geom_BezierCurve)& C1, // On ordonne les courbes Handle(Geom_BezierCurve) CC1, CC2, CC3, CC4; - Standard_Real Tol = Precision::Confusion(); + constexpr Standard_Real Tol = Precision::Confusion(); #ifndef No_Exception Standard_Boolean IsOK = #endif @@ -417,7 +417,7 @@ void GeomFill_BezierCurves::Init(const Handle(Geom_BezierCurve)& C1, TColgp_Array1OfPnt P1(1,Deg1+1); TColgp_Array1OfPnt P2(1,Deg2+1); - Standard_Real Eps = Precision::Confusion(); + constexpr Standard_Real Eps = Precision::Confusion(); Standard_Boolean IsOK = Standard_False; if ( CC1->StartPoint().IsEqual(CC2->StartPoint(),Eps)) { IsOK = Standard_True; diff --git a/src/GeomFill/GeomFill_CircularBlendFunc.cxx b/src/GeomFill/GeomFill_CircularBlendFunc.cxx index 9bc250383b..7c3c05daa8 100644 --- a/src/GeomFill/GeomFill_CircularBlendFunc.cxx +++ b/src/GeomFill/GeomFill_CircularBlendFunc.cxx @@ -57,7 +57,7 @@ static void GeomFillFusInt(const TColStd_Array1OfReal& I1, TColStd_SequenceOfReal& Seq) { Standard_Integer ind1=1, ind2=1; - Standard_Real Epspar = Precision::PConfusion()*0.99; + constexpr Standard_Real Epspar = Precision::PConfusion()*0.99; // en suposant que le positionement fonctionne a PConfusion()/2 Standard_Real v1, v2; // Initialisations : les IND1 et IND2 pointent sur le 1er element @@ -591,7 +591,7 @@ Intervals(TColStd_Array1OfReal& T, const GeomAbs_Shape S) const void GeomFill_CircularBlendFunc::SetInterval(const Standard_Real First, const Standard_Real Last) { - Standard_Real Eps = Precision::PConfusion(); + constexpr Standard_Real Eps = Precision::PConfusion(); myTPath = myPath->Trim(First, Last, Eps); myTCurve1 = myCurve1->Trim(First, Last, Eps); myTCurve2 = myCurve2->Trim(First, Last, Eps); diff --git a/src/GeomFill/GeomFill_DiscreteTrihedron.cxx b/src/GeomFill/GeomFill_DiscreteTrihedron.cxx index 9738fec8ee..cc9c06e938 100755 --- a/src/GeomFill/GeomFill_DiscreteTrihedron.cxx +++ b/src/GeomFill/GeomFill_DiscreteTrihedron.cxx @@ -193,7 +193,7 @@ Standard_Boolean GeomFill_DiscreteTrihedron::D0(const Standard_Real Param, { //Locate in the sequence Standard_Integer Index = -1; - Standard_Real TolPar = Precision::PConfusion(); + constexpr Standard_Real TolPar = Precision::PConfusion(); //Standard_Real TolConf = Precision::Confusion(); Standard_Integer NbSamples = 10; gp_Pnt Origin(0.,0.,0.); diff --git a/src/GeomFill/GeomFill_Frenet.cxx b/src/GeomFill/GeomFill_Frenet.cxx index ff4f83319b..251a0598be 100644 --- a/src/GeomFill/GeomFill_Frenet.cxx +++ b/src/GeomFill/GeomFill_Frenet.cxx @@ -152,8 +152,10 @@ Standard_Boolean GeomFill_Frenet::SetCurve(const Handle(Adaptor3d_Curve)& C) { Standard_Integer i, j; GeomFill_SnglrFunc Func(myCurve); - Standard_Real TolF = 1.0e-10, Tol = 10*TolF, Tol2 = Tol * Tol, - PTol = Precision::PConfusion(); + constexpr Standard_Real TolF = 1.0e-10; + constexpr Standard_Real Tol = 10 * TolF; + constexpr Standard_Real Tol2 = Tol * Tol; + constexpr Standard_Real PTol = Precision::PConfusion(); // We want to determine if the curve has linear segments Standard_Integer NbIntC2 = myCurve->NbIntervals(GeomAbs_C2); diff --git a/src/GeomFill/GeomFill_NSections.cxx b/src/GeomFill/GeomFill_NSections.cxx index 9fd91d3fca..9c4250933a 100644 --- a/src/GeomFill/GeomFill_NSections.cxx +++ b/src/GeomFill/GeomFill_NSections.cxx @@ -356,7 +356,8 @@ GeomFill_NSections::GeomFill_NSections(const TColGeom_SequenceOfCurve& NC, } - Standard_Real ww, EpsW = 10*Precision::PConfusion(); + Standard_Real ww; + constexpr Standard_Real EpsW = 10*Precision::PConfusion(); Standard_Boolean NullWeight = Standard_False; if (!rational) DWeights.Init(0.); Standard_Integer indice = 1, ii; @@ -449,7 +450,8 @@ GeomFill_NSections::GeomFill_NSections(const TColGeom_SequenceOfCurve& NC, } - Standard_Real ww, EpsW = 10*Precision::PConfusion(); + Standard_Real ww; + constexpr Standard_Real EpsW = 10*Precision::PConfusion(); Standard_Boolean NullWeight = Standard_False; if (!rational) D2Weights.Init(0.); Standard_Integer indice = 1, ii; diff --git a/src/GeomFill/GeomFill_Pipe.cxx b/src/GeomFill/GeomFill_Pipe.cxx index 8362ab2622..70aec7c547 100644 --- a/src/GeomFill/GeomFill_Pipe.cxx +++ b/src/GeomFill/GeomFill_Pipe.cxx @@ -1091,8 +1091,8 @@ void GeomFill_Pipe::ApproxSurf(const Standard_Boolean WithParameters) { Handle(GeomFill_Line) Line = new GeomFill_Line(Section.NbSections()); Standard_Integer NbIt = 0; - Standard_Real T3d = Precision::Approximation(); - Standard_Real T2d = Precision::PApproximation(); + constexpr Standard_Real T3d = Precision::Approximation(); + constexpr Standard_Real T2d = Precision::PApproximation(); GeomFill_AppSweep App( 4, 8, T3d, T2d, NbIt, WithParameters); App.Perform( Line, Section, 30); diff --git a/src/GeomInt/GeomInt_IntSS_1.cxx b/src/GeomInt/GeomInt_IntSS_1.cxx index 9672735301..7f468486e6 100644 --- a/src/GeomInt/GeomInt_IntSS_1.cxx +++ b/src/GeomInt/GeomInt_IntSS_1.cxx @@ -59,7 +59,7 @@ if (aC2D.IsNull() || !aS->IsUPeriodic()) return; // - const Standard_Real aEps=Precision::PConfusion();//1.e-9 + constexpr Standard_Real aEps=Precision::PConfusion();//1.e-9 const Standard_Real aEpsilon=Epsilon(10.);//1.77e-15 // Standard_Real umin,umax,vmin,vmax; @@ -232,7 +232,7 @@ static Standard_Boolean isDegenerated(const Handle(GeomAdaptor_Surface)& theGAHS const Standard_Real theFirstPar, const Standard_Real theLastPar) { - const Standard_Real aSqTol = Precision::Confusion()*Precision::Confusion(); + constexpr Standard_Real aSqTol = Precision::Confusion()*Precision::Confusion(); gp_Pnt2d aP2d; gp_Pnt aP1, aP2; @@ -1309,7 +1309,7 @@ void GeomInt_IntSS::TrimILineOnSurfBoundaries(const Handle(Geom2d_Curve)& theC2d } } - const Standard_Real anIntTol = 10.0*Precision::Confusion(); + constexpr Standard_Real anIntTol = 10.0*Precision::Confusion(); IntersectCurveAndBoundary(theC2d1, aCurS1Bounds, aNumberOfCurves, anIntTol, theArrayOfParameters); diff --git a/src/GeomInt/GeomInt_LineConstructor.cxx b/src/GeomInt/GeomInt_LineConstructor.cxx index 9862f6fe1b..f87b409f4b 100644 --- a/src/GeomInt/GeomInt_LineConstructor.cxx +++ b/src/GeomInt/GeomInt_LineConstructor.cxx @@ -124,7 +124,7 @@ void GeomInt_LineConstructor::Perform(const Handle(IntPatch_Line)& L) { Standard_Integer i,nbvtx; Standard_Real firstp,lastp; - const Standard_Real Tol = Precision::PConfusion() * 35.0; + constexpr Standard_Real Tol = Precision::PConfusion() * 35.0; const IntPatch_IType typl = L->ArcType(); if(typl == IntPatch_Analytic) { @@ -862,7 +862,7 @@ void RejectDuplicates(NCollection_Array1& theVtxArr) // About the value aTolPC=1000.*Precision::PConfusion(), // see IntPatch_GLine::ComputeVertexParameters(...) // for more details; - const Standard_Real aTolPC = 1000.*Precision::PConfusion(); + constexpr Standard_Real aTolPC = 1000.*Precision::PConfusion(); //Find duplicates in a slice of the array [LowerBound, UpperBound-1]. //If a duplicate has been found, the element with greater index will be rejected. diff --git a/src/GeomInt/GeomInt_LineTool.cxx b/src/GeomInt/GeomInt_LineTool.cxx index 81b0c09598..27a5d68c22 100644 --- a/src/GeomInt/GeomInt_LineTool.cxx +++ b/src/GeomInt/GeomInt_LineTool.cxx @@ -64,7 +64,7 @@ void ProjectPointOnSurf::Init ( const Handle(Geom_Surface)& Surface, const Standard_Real Vmin, const Standard_Real Vsup ) { - const Standard_Real Tolerance = Precision::PConfusion(); + constexpr Standard_Real Tolerance = Precision::PConfusion(); // myGeomAdaptor.Load(Surface, Umin,Usup,Vmin,Vsup); myExtPS.Initialize(myGeomAdaptor, Umin, Usup, Vmin, Vsup, Tolerance, Tolerance); diff --git a/src/GeomLib/GeomLib.cxx b/src/GeomLib/GeomLib.cxx index f4767e7085..28d7af484a 100644 --- a/src/GeomLib/GeomLib.cxx +++ b/src/GeomLib/GeomLib.cxx @@ -1479,7 +1479,7 @@ void GeomLib::ExtendSurfByLength(Handle(Geom_BoundedSurface)& Surface, Handle(Geom_BSplineSurface)::DownCast (Surface); if (BS.IsNull()) { //BS = GeomConvert::SurfaceToBSplineSurface(Surface); - Standard_Real Tol = Precision::Confusion(); //1.e-4; + constexpr Standard_Real Tol = Precision::Confusion(); //1.e-4; GeomAbs_Shape UCont = GeomAbs_C1, VCont = GeomAbs_C1; Standard_Integer degU = 14, degV = 14; Standard_Integer nmax = 16; @@ -1509,7 +1509,7 @@ void GeomLib::ExtendSurfByLength(Handle(Geom_BoundedSurface)& Surface, // || ( !InU && BS->IsVRational() ) ; Standard_Boolean rational = (BS->IsURational() || BS->IsVRational()); Standard_Boolean NullWeight; - Standard_Real EpsW = 10*Precision::PConfusion(); + constexpr Standard_Real EpsW = 10*Precision::PConfusion(); Standard_Integer gap = 3; if ( rational ) gap++; diff --git a/src/GeomLib/GeomLib_IsPlanarSurface.cxx b/src/GeomLib/GeomLib_IsPlanarSurface.cxx index e2a5eb7102..82fb686ff9 100644 --- a/src/GeomLib/GeomLib_IsPlanarSurface.cxx +++ b/src/GeomLib/GeomLib_IsPlanarSurface.cxx @@ -40,7 +40,7 @@ static Standard_Boolean Controle(const TColgp_Array1OfPnt& Poles, Standard_Real gx,gy,gz; gp_Pnt Bary; gp_Dir DX, DY; - Standard_Real aTolSingular = Precision::Confusion(); + constexpr Standard_Real aTolSingular = Precision::Confusion(); GeomLib::Inertia(Poles, Bary, DX, DY, gx, gy, gz); diff --git a/src/GeomLib/GeomLib_Tool.cxx b/src/GeomLib/GeomLib_Tool.cxx index 2c38aed268..b6dc1fcb2e 100644 --- a/src/GeomLib/GeomLib_Tool.cxx +++ b/src/GeomLib/GeomLib_Tool.cxx @@ -344,7 +344,7 @@ Standard_Real GeomLib_Tool::ComputeDeviation(const Geom2dAdaptor_Curve& theCurve aFunc.GetLine(theLine); - const Standard_Real aTolDefl = Precision::PConfusion(); + constexpr Standard_Real aTolDefl = Precision::PConfusion(); Standard_Real aD1 = 0.0; Standard_Real aD2 = 0.0; diff --git a/src/GeomToIGES/GeomToIGES_GeomCurve.cxx b/src/GeomToIGES/GeomToIGES_GeomCurve.cxx index b0c4c47b60..28f8f1a681 100644 --- a/src/GeomToIGES/GeomToIGES_GeomCurve.cxx +++ b/src/GeomToIGES/GeomToIGES_GeomCurve.cxx @@ -194,7 +194,7 @@ static Standard_Boolean ArePolesPlanar (const TColgp_Array1OfPnt& Poles, for ( i = 1; i < Poles.Length(); i++) Normal += Poles ( i ).XYZ() ^ Poles ( i + 1 ).XYZ(); - Standard_Real tol = Precision::Confusion(); + constexpr Standard_Real tol = Precision::Confusion(); Standard_Real nrm = Normal.Modulus(); if ( nrm < tol ) { Normal.SetCoord ( 0, 0, 1 ); diff --git a/src/GeometryTest/GeometryTest_CurveCommands.cxx b/src/GeometryTest/GeometryTest_CurveCommands.cxx index 2e52fc6d11..c7cfe8b500 100644 --- a/src/GeometryTest/GeometryTest_CurveCommands.cxx +++ b/src/GeometryTest/GeometryTest_CurveCommands.cxx @@ -1076,7 +1076,7 @@ static Standard_Integer uniformAbscissa (Draw_Interpretor& di, Standard_Integer GeomAdaptor_Curve GAC(ellip); di<<"Type Of curve: "<pl) par-=M_PI+M_PI; if(parPrecisionPConfusion) { return; } @@ -396,7 +396,7 @@ void IntPatch_GLine::ComputeVertexParameters(const Standard_Real /*Tol*/) Standard_Integer nbvtx = NbVertex(); - const Standard_Real PrecisionPConfusion ( Precision::PConfusion()*1000.0 ); + constexpr Standard_Real PrecisionPConfusion ( Precision::PConfusion()*1000.0 ); do { APointDeleted = Standard_False; diff --git a/src/IntPatch/IntPatch_ImpPrmIntersection.cxx b/src/IntPatch/IntPatch_ImpPrmIntersection.cxx index ef7c959e0a..721998285f 100644 --- a/src/IntPatch/IntPatch_ImpPrmIntersection.cxx +++ b/src/IntPatch/IntPatch_ImpPrmIntersection.cxx @@ -2665,9 +2665,9 @@ static Standard_Boolean DecomposeResult(const Handle(IntPatch_PointLine)& theLin } const Standard_Real aDeltaUmax = M_PI_2; - const Standard_Real aTOL3D = 1.e-10, - aTOL2D = Precision::PConfusion(), - aTOL2DS = Precision::PConfusion(); + constexpr Standard_Real aTOL3D = 1.e-10, + aTOL2D = Precision::PConfusion(), + aTOL2DS = Precision::PConfusion(); const Handle(IntSurf_LineOn2S)& aSLine = theLine->Curve(); @@ -2801,7 +2801,7 @@ static Standard_Boolean DecomposeResult(const Handle(IntPatch_PointLine)& theLin //// const IntSurf_PntOn2S& aRefPt = aSSLine->Value(aBindex-1); - Standard_Real aCompareTol3D = Precision::Confusion(); + constexpr Standard_Real aCompareTol3D = Precision::Confusion(); Standard_Real aCompareTol2D = Precision::PConfusion(); IntSurf_PntOn2S aNewPoint = aRefPt; diff --git a/src/IntPatch/IntPatch_Intersection.cxx b/src/IntPatch/IntPatch_Intersection.cxx index b06c8513d1..aa28752f7f 100644 --- a/src/IntPatch/IntPatch_Intersection.cxx +++ b/src/IntPatch/IntPatch_Intersection.cxx @@ -1801,7 +1801,7 @@ Standard_Boolean IntPatch_Intersection::CheckSingularPoints( } // const Standard_Integer aNbBndPnts = 5; - const Standard_Real aTol = Precision::Confusion(); + constexpr Standard_Real aTol = Precision::Confusion(); Standard_Integer i; theD1->Init(); Standard_Boolean isU = Standard_True; @@ -1847,7 +1847,7 @@ Standard_Boolean IntPatch_Intersection::CheckSingularPoints( //Singular point aPP1; aPmid /= aNb; aPP1.SetXYZ(aPmid); - Standard_Real aTolU = Precision::PConfusion(), aTolV = Precision::PConfusion(); + constexpr Standard_Real aTolU = Precision::PConfusion(), aTolV = Precision::PConfusion(); Extrema_ExtPS aProj(aPP1, *theS2.get(), aTolU, aTolV, Extrema_ExtFlag_MIN); if (aProj.IsDone()) @@ -1883,7 +1883,7 @@ Standard_Real IntPatch_Intersection::DefineUVMaxStep( Standard_Real anUVMaxStep = 0.001; Standard_Real aDistToSing1 = Precision::Infinite(); Standard_Real aDistToSing2 = Precision::Infinite(); - const Standard_Real aTolMin = Precision::Confusion(), aTolMax = 1.e-5; + constexpr Standard_Real aTolMin = Precision::Confusion(), aTolMax = 1.e-5; if (theS1 != theS2) { Standard_Boolean isSing1 = CheckSingularPoints(theS1, theD1, theS2, aDistToSing1); diff --git a/src/IntPatch/IntPatch_PointLine.cxx b/src/IntPatch/IntPatch_PointLine.cxx index 6a3568f672..eb0489e876 100644 --- a/src/IntPatch/IntPatch_PointLine.cxx +++ b/src/IntPatch/IntPatch_PointLine.cxx @@ -49,8 +49,8 @@ Standard_Real IntPatch_PointLine:: const Handle(Adaptor3d_Surface)& theS2, const IntSurf_PntOn2S& theUVPoint) { - const Standard_Real aSmallValue = 1.0/Precision::Infinite(); - const Standard_Real aSqSmallValue = aSmallValue*aSmallValue; + constexpr Standard_Real aSmallValue = 1.0/Precision::Infinite(); + constexpr Standard_Real aSqSmallValue = aSmallValue*aSmallValue; Standard_Real aU1 = 0.0, aV1 = 0.0, aU2 = 0.0, aV2 = 0.0; theUVPoint.Parameters(aU1, aV1, aU2, aV2); diff --git a/src/IntPatch/IntPatch_PrmPrmIntersection.cxx b/src/IntPatch/IntPatch_PrmPrmIntersection.cxx index 9d5df4fca0..7b4b7fa768 100644 --- a/src/IntPatch/IntPatch_PrmPrmIntersection.cxx +++ b/src/IntPatch/IntPatch_PrmPrmIntersection.cxx @@ -1592,7 +1592,7 @@ void IntPatch_PrmPrmIntersection::Perform (const Handle(Adaptor3d_Surface)& S if (Surf1->IsUClosed() || Surf1->IsVClosed() || Surf2->IsUClosed() || Surf2->IsVClosed()) { - Standard_Real TolPar = Precision::PConfusion(); + constexpr Standard_Real TolPar = Precision::PConfusion(); IntSurf_ListOfPntOn2S AdditionalPnts; Standard_Real NewU1, NewV1, NewU2, NewV2; for(; IterLOP1.More(); IterLOP1.Next()) diff --git a/src/IntPatch/IntPatch_WLine.cxx b/src/IntPatch/IntPatch_WLine.cxx index 7cdb93daaf..b1b0a3fdab 100644 --- a/src/IntPatch/IntPatch_WLine.cxx +++ b/src/IntPatch/IntPatch_WLine.cxx @@ -464,7 +464,7 @@ void IntPatch_WLine::ComputeVertexParameters( const Standard_Real RTol) //---------------------------------------------------- //-- On detecte les points confondus dans la LineOn2S - Standard_Real dmini = Precision::SquareConfusion(); + constexpr Standard_Real dmini = Precision::SquareConfusion(); for(i=2; (i<=nbponline) && (nbponline > 2); i++) { const IntSurf_PntOn2S& aPnt1=curv->Value(i-1); const IntSurf_PntOn2S& aPnt2=curv->Value(i); diff --git a/src/IntPatch/IntPatch_WLineTool.cxx b/src/IntPatch/IntPatch_WLineTool.cxx index 766aca20e9..2c9e3928bd 100644 --- a/src/IntPatch/IntPatch_WLineTool.cxx +++ b/src/IntPatch/IntPatch_WLineTool.cxx @@ -445,7 +445,7 @@ static Handle(IntPatch_WLine) Standard_Real aPrevStep = aBase3dVec.SquareMagnitude(); // Choose base tolerance and scale it to pipe algorithm. - const Standard_Real aBaseTolerance = Precision::Approximation(); + constexpr Standard_Real aBaseTolerance = Precision::Approximation(); Standard_Real aResS1Tol = Min(theS1->UResolution(aBaseTolerance), theS1->VResolution(aBaseTolerance)); Standard_Real aResS2Tol = Min(theS2->UResolution(aBaseTolerance), diff --git a/src/IntWalk/IntWalk_PWalking.cxx b/src/IntWalk/IntWalk_PWalking.cxx index c665bb4e49..29162ef446 100644 --- a/src/IntWalk/IntWalk_PWalking.cxx +++ b/src/IntWalk/IntWalk_PWalking.cxx @@ -2143,7 +2143,7 @@ DistanceMinimizeByGradient( const Handle(Adaptor3d_Surface)& theASurf1, { const Standard_Integer aNbIterMAX = 60; const Standard_Real aTol = 1.0e-14; - const Standard_Real aTolNul = 1.0 / Precision::Infinite(); + constexpr Standard_Real aTolNul = 1.0 / Precision::Infinite(); // I.e. if theU1 = 0.0 then Epsilon(theU1) = DBL_MIN (~1.0e-308). // Work with this number is impossible: there is a dangerous to @@ -2676,7 +2676,7 @@ Standard_Boolean IntWalk_PWalking:: PutToBoundary(const Handle(Adaptor3d_Surface)& theASurf1, const Handle(Adaptor3d_Surface)& theASurf2) { - const Standard_Real aTolMin = Precision::Confusion(); + constexpr Standard_Real aTolMin = Precision::Confusion(); Standard_Boolean hasBeenAdded = Standard_False; diff --git a/src/LocOpe/LocOpe_FindEdgesInFace.cxx b/src/LocOpe/LocOpe_FindEdgesInFace.cxx index 4425e8a849..266775f9d3 100644 --- a/src/LocOpe/LocOpe_FindEdgesInFace.cxx +++ b/src/LocOpe/LocOpe_FindEdgesInFace.cxx @@ -59,8 +59,8 @@ void LocOpe_FindEdgesInFace::Set(const TopoDS_Shape& Sh, gp_Cylinder cy; - Standard_Real Tol = Precision::Confusion(); - Standard_Real TolAng = Precision::Angular(); + constexpr Standard_Real Tol = Precision::Confusion(); + constexpr Standard_Real TolAng = Precision::Angular(); S = BRep_Tool::Surface(F); Ts = S->DynamicType(); diff --git a/src/LocOpe/LocOpe_Generator.cxx b/src/LocOpe/LocOpe_Generator.cxx index 0c242f62eb..e1fdfe62ab 100644 --- a/src/LocOpe/LocOpe_Generator.cxx +++ b/src/LocOpe/LocOpe_Generator.cxx @@ -552,7 +552,7 @@ void LocOpe_Generator::Perform(const Handle(LocOpe_GeneratedShape)& G) // Tentative de recalage dans la facette pf = C2d->Value(f); pl = C2d->Value(l); - Standard_Real tttol = Precision::Angular(); + constexpr Standard_Real tttol = Precision::Angular(); while (Min(pf.X(),pl.X()) >= Umaxc-tttol) { C2d->Translate(gp_Vec2d(-2.*M_PI,0)); pf = C2d->Value(f); @@ -868,7 +868,7 @@ void LocOpe_Generator::Perform(const Handle(LocOpe_GeneratedShape)& G) // Tentative de recalage dans la facette pf = C2d->Value(f); pl = C2d->Value(l); - Standard_Real tttol = Precision::Angular(); + constexpr Standard_Real tttol = Precision::Angular(); while (Min(pf.X(),pl.X()) >= Umaxc - tttol) { C2d->Translate(gp_Vec2d(-2.*M_PI,0)); pf = C2d->Value(f); @@ -1057,8 +1057,8 @@ Standard_Boolean ToFuse(const TopoDS_Face& F1, Handle(Geom_Surface) S1,S2; TopLoc_Location loc1, loc2; Handle(Standard_Type) typS1,typS2; - const Standard_Real tollin = Precision::Confusion(); - const Standard_Real tolang = Precision::Angular(); + constexpr Standard_Real tollin = Precision::Confusion(); + constexpr Standard_Real tolang = Precision::Angular(); S1 = BRep_Tool::Surface(F1,loc1); S2 = BRep_Tool::Surface(F2,loc2); @@ -1115,8 +1115,8 @@ Standard_Boolean ToFuse(const TopoDS_Edge& E1, Handle(Geom_Curve) C1,C2; TopLoc_Location loc1, loc2; Handle(Standard_Type) typC1,typC2; - const Standard_Real tollin = Precision::Confusion(); - const Standard_Real tolang = Precision::Angular(); + constexpr Standard_Real tollin = Precision::Confusion(); + constexpr Standard_Real tolang = Precision::Angular(); Standard_Real f,l; C1 = BRep_Tool::Curve(E1,loc1,f,l); diff --git a/src/LocOpe/LocOpe_WiresOnShape.cxx b/src/LocOpe/LocOpe_WiresOnShape.cxx index 22b57eeb3d..6c33d80c54 100644 --- a/src/LocOpe/LocOpe_WiresOnShape.cxx +++ b/src/LocOpe/LocOpe_WiresOnShape.cxx @@ -810,7 +810,7 @@ void PutPCurve(const TopoDS_Edge& Edg, if (!V2.IsNull()) TolLast = BRep_Tool::Tolerance(V2); - Standard_Real tol2d = Precision::Confusion(); + constexpr Standard_Real tol2d = Precision::Confusion(); Handle(Geom2d_Curve) C2d; ShapeConstruct_ProjectCurveOnSurface aToolProj; aToolProj.Init(S, tol2d); @@ -855,7 +855,7 @@ void PutPCurve(const TopoDS_Edge& Edg, if (S->IsUPeriodic()) { Standard_Real up = S->UPeriod(); - Standard_Real tolu = Precision::PConfusion();// Epsilon(up); + constexpr Standard_Real tolu = Precision::PConfusion();// Epsilon(up); Standard_Integer nbtra = 0; Standard_Real theUmin = Min(pf.X(),pl.X()); Standard_Real theUmax = Max(pf.X(),pl.X()); @@ -880,7 +880,7 @@ void PutPCurve(const TopoDS_Edge& Edg, if (S->IsVPeriodic()) { Standard_Real vp = S->VPeriod(); - Standard_Real tolv = Precision::PConfusion();// Epsilon(vp); + constexpr Standard_Real tolv = Precision::PConfusion();// Epsilon(vp); Standard_Integer nbtra = 0; Standard_Real theVmin = Min(pf.Y(),pl.Y()); Standard_Real theVmax = Max(pf.Y(),pl.Y()); @@ -998,7 +998,7 @@ void PutPCurves(const TopoDS_Edge& Efrom, if (S->IsUPeriodic()) { Standard_Real up = S->UPeriod(); - Standard_Real tolu = Precision::PConfusion();// Epsilon(up); + constexpr Standard_Real tolu = Precision::PConfusion();// Epsilon(up); Standard_Integer nbtra = 0; Standard_Real theUmin = Min(pf.X(),pl.X()); Standard_Real theUmax = Max(pf.X(),pl.X()); @@ -1036,7 +1036,7 @@ void PutPCurves(const TopoDS_Edge& Efrom, if (S->IsVPeriodic()) { Standard_Real vp = S->VPeriod(); - Standard_Real tolv = Precision::PConfusion();// Epsilon(vp); + constexpr Standard_Real tolv = Precision::PConfusion();// Epsilon(vp); Standard_Integer nbtra = 0; Standard_Real theVmin = Min(pf.Y(),pl.Y()); Standard_Real theVmax = Max(pf.Y(),pl.Y()); @@ -1276,7 +1276,7 @@ void FindInternalIntersections(const TopoDS_Edge& theEdge, TopTools_IndexedDataMapOfShapeListOfShape& Splits, Standard_Boolean& isOverlapped) { - Standard_Real TolExt = Precision::PConfusion(); + constexpr Standard_Real TolExt = Precision::PConfusion(); Standard_Integer i, j; BRepAdaptor_Surface anAdSurf(theFace, Standard_False); diff --git a/src/MAT2d/MAT2d_Circuit.cxx b/src/MAT2d/MAT2d_Circuit.cxx index 8434853f67..0a6679010f 100644 --- a/src/MAT2d/MAT2d_Circuit.cxx +++ b/src/MAT2d/MAT2d_Circuit.cxx @@ -214,7 +214,7 @@ Standard_Boolean MAT2d_Circuit::IsSharpCorner(const Handle(Geom2d_Geometry)& Geo Standard_Real DotProd; Standard_Real ProVec = CrossProd (Geom1,Geom2,DotProd); Standard_Integer NbTest = 1; - Standard_Real DU = Precision::Confusion(); + constexpr Standard_Real DU = Precision::Confusion(); Handle(Geom2d_TrimmedCurve) C1,C2; C1= Handle(Geom2d_TrimmedCurve)::DownCast(Geom1); @@ -255,7 +255,7 @@ Standard_Boolean MAT2d_Circuit::IsSharpCorner(const Handle(Geom2d_Geometry)& Geo // Si pas dintersection => saillant. // Sinon => rentrant. Standard_Real D ; - Standard_Real Tol = Precision::Confusion(); + constexpr Standard_Real Tol = Precision::Confusion(); Standard_Real MilC1 = (C1->LastParameter() + C1->FirstParameter())*0.5; Standard_Real MilC2 = (C2->LastParameter() + C2->FirstParameter())*0.5; gp_Pnt2d P = C1->Value(C1->LastParameter()); diff --git a/src/MAT2d/MAT2d_CutCurve.cxx b/src/MAT2d/MAT2d_CutCurve.cxx index 2838d2f755..2a7fe57ffe 100644 --- a/src/MAT2d/MAT2d_CutCurve.cxx +++ b/src/MAT2d/MAT2d_CutCurve.cxx @@ -57,8 +57,8 @@ void MAT2d_CutCurve::Perform(const Handle(Geom2d_Curve)& C) Handle(Geom2d_TrimmedCurve) TrimC; Standard_Real UF,UL,UC; gp_Pnt2d PF,PL,PC; - Standard_Real PTol = Precision::PConfusion()*10; - Standard_Real Tol = Precision::Confusion()*10; + constexpr Standard_Real PTol = Precision::PConfusion()*10; + constexpr Standard_Real Tol = Precision::Confusion()*10; Standard_Boolean YaCut = Standard_False; Sommets.Perform (C); diff --git a/src/MeshVS/MeshVS_MeshPrsBuilder.cxx b/src/MeshVS/MeshVS_MeshPrsBuilder.cxx index 5e24b64a54..0f96542c4c 100644 --- a/src/MeshVS/MeshVS_MeshPrsBuilder.cxx +++ b/src/MeshVS/MeshVS_MeshPrsBuilder.cxx @@ -56,73 +56,69 @@ namespace // Function : ProcessFace // Purpose : Fill array with triangles for the face //================================================================ - static void ProcessFace(const Handle(MeshVS_HArray1OfSequenceOfInteger)& theTopo, + static void ProcessFace(const TColStd_SequenceOfInteger& theFaceNodes, const TColStd_Array1OfReal& theNodes, const Standard_Real* theCenter, - const Standard_Real theShrinkCoef, + const Standard_Real theShrinkCoef, const Standard_Boolean theIsShrinked, - const Standard_Boolean theIsShaded, + const Standard_Boolean theIsShaded, Handle(Graphic3d_ArrayOfPrimitives) theArray) { - for (Standard_Integer aFaceIdx = theTopo->Lower(); aFaceIdx <= theTopo->Upper(); ++aFaceIdx) + const Standard_Integer aNbPolyNodes = theFaceNodes.Length(); + + Standard_Real* aPolyNodesBuf = (Standard_Real*)alloca((3 * aNbPolyNodes + 1) * sizeof(Standard_Real)); + TColStd_Array1OfReal aPolyNodes(*aPolyNodesBuf, 0, 3 * aNbPolyNodes); + + for (Standard_Integer aNodeIdx = 0; aNodeIdx < aNbPolyNodes; ++aNodeIdx) { - const TColStd_SequenceOfInteger& aFaceNodes = theTopo->Value (aFaceIdx); - const Standard_Integer aNbPolyNodes = aFaceNodes.Length(); - - Standard_Real* aPolyNodesBuf = (Standard_Real*) alloca ((3 * aNbPolyNodes + 1) * sizeof (Standard_Real)); - TColStd_Array1OfReal aPolyNodes (*aPolyNodesBuf, 0, 3 * aNbPolyNodes); + Standard_Integer anIdx = theFaceNodes.Value(aNodeIdx + 1); + + Standard_Real aX = theNodes.Value(theNodes.Lower() + 3 * anIdx + 0); + Standard_Real aY = theNodes.Value(theNodes.Lower() + 3 * anIdx + 1); + Standard_Real aZ = theNodes.Value(theNodes.Lower() + 3 * anIdx + 2); - for (Standard_Integer aNodeIdx = 0; aNodeIdx < aNbPolyNodes; ++aNodeIdx) + if (theIsShrinked) { - Standard_Integer anIdx = aFaceNodes.Value (aNodeIdx + 1); + aX = theCenter[0] + theShrinkCoef * (aX - theCenter[0]); + aY = theCenter[1] + theShrinkCoef * (aY - theCenter[1]); + aZ = theCenter[2] + theShrinkCoef * (aZ - theCenter[2]); + } - Standard_Real aX = theNodes.Value (theNodes.Lower() + 3 * anIdx + 0); - Standard_Real aY = theNodes.Value (theNodes.Lower() + 3 * anIdx + 1); - Standard_Real aZ = theNodes.Value (theNodes.Lower() + 3 * anIdx + 2); + aPolyNodes.SetValue(3 * aNodeIdx + 1, aX); + aPolyNodes.SetValue(3 * aNodeIdx + 2, aY); + aPolyNodes.SetValue(3 * aNodeIdx + 3, aZ); + } - if (theIsShrinked) - { - aX = theCenter[0] + theShrinkCoef * (aX - theCenter[0]); - aY = theCenter[1] + theShrinkCoef * (aY - theCenter[1]); - aZ = theCenter[2] + theShrinkCoef * (aZ - theCenter[2]); - } + gp_Vec aNorm; - aPolyNodes.SetValue (3 * aNodeIdx + 1, aX); - aPolyNodes.SetValue (3 * aNodeIdx + 2, aY); - aPolyNodes.SetValue (3 * aNodeIdx + 3, aZ); - } - - gp_Vec aNorm; + if (theIsShaded) + { + aPolyNodes.SetValue(0, aNbPolyNodes); - if (theIsShaded) + if (!MeshVS_Tool::GetAverageNormal(aPolyNodes, aNorm)) { - aPolyNodes.SetValue (0, aNbPolyNodes); - - if (!MeshVS_Tool::GetAverageNormal (aPolyNodes, aNorm)) - { - aNorm.SetCoord (0.0, 0.0, 1.0); - } + aNorm.SetCoord(0.0, 0.0, 1.0); } + } - for (Standard_Integer aNodeIdx = 0; aNodeIdx < aNbPolyNodes - 2; ++aNodeIdx) // triangulate polygon + for (Standard_Integer aNodeIdx = 0; aNodeIdx < aNbPolyNodes - 2; ++aNodeIdx) // triangulate polygon + { + for (Standard_Integer aSubIdx = 0; aSubIdx < 3; ++aSubIdx) // generate sub-triangle { - for (Standard_Integer aSubIdx = 0; aSubIdx < 3; ++aSubIdx) // generate sub-triangle + if (theIsShaded) { - if (theIsShaded) - { - theArray->AddVertex (aPolyNodes.Value (3 * (aSubIdx == 0 ? 0 : (aNodeIdx + aSubIdx)) + 1), - aPolyNodes.Value (3 * (aSubIdx == 0 ? 0 : (aNodeIdx + aSubIdx)) + 2), - aPolyNodes.Value (3 * (aSubIdx == 0 ? 0 : (aNodeIdx + aSubIdx)) + 3), - aNorm.X(), - aNorm.Y(), - aNorm.Z()); - } - else - { - theArray->AddVertex (aPolyNodes.Value (3 * (aSubIdx == 0 ? 0 : (aNodeIdx + aSubIdx)) + 1), - aPolyNodes.Value (3 * (aSubIdx == 0 ? 0 : (aNodeIdx + aSubIdx)) + 2), - aPolyNodes.Value (3 * (aSubIdx == 0 ? 0 : (aNodeIdx + aSubIdx)) + 3)); - } + theArray->AddVertex(aPolyNodes.Value(3 * (aSubIdx == 0 ? 0 : (aNodeIdx + aSubIdx)) + 1), + aPolyNodes.Value(3 * (aSubIdx == 0 ? 0 : (aNodeIdx + aSubIdx)) + 2), + aPolyNodes.Value(3 * (aSubIdx == 0 ? 0 : (aNodeIdx + aSubIdx)) + 3), + aNorm.X(), + aNorm.Y(), + aNorm.Z()); + } + else + { + theArray->AddVertex(aPolyNodes.Value(3 * (aSubIdx == 0 ? 0 : (aNodeIdx + aSubIdx)) + 1), + aPolyNodes.Value(3 * (aSubIdx == 0 ? 0 : (aNodeIdx + aSubIdx)) + 2), + aPolyNodes.Value(3 * (aSubIdx == 0 ? 0 : (aNodeIdx + aSubIdx)) + 3)); } } } @@ -917,7 +913,10 @@ void MeshVS_MeshPrsBuilder::AddVolumePrs (const Handle(MeshVS_HArray1OfSequenceO if (aIsPolygons) { - ProcessFace (theTopo, theNodes, aCenter, theShrinkCoef, theIsShrinked, theIsShaded, theArray); + for (Standard_Integer aFaceIdx = theTopo->Lower(); aFaceIdx <= theTopo->Upper(); ++aFaceIdx) + { + ProcessFace(theTopo->Value(aFaceIdx), theNodes, aCenter, theShrinkCoef, theIsShrinked, theIsShaded, theArray); + } } else if (theIsSelected) { diff --git a/src/MeshVS/MeshVS_Tool.cxx b/src/MeshVS/MeshVS_Tool.cxx index a528a91a8f..28a02768af 100644 --- a/src/MeshVS/MeshVS_Tool.cxx +++ b/src/MeshVS/MeshVS_Tool.cxx @@ -264,8 +264,8 @@ Standard_Boolean MeshVS_Tool::GetNormal( const TColStd_Array1OfReal& Nodes, Standard_Boolean res = Standard_True; - Standard_Real normal[3], first_vec[3], cur_vec[3], xx, yy, zz, - conf = Precision::Confusion(); + Standard_Real normal[3], first_vec[3], cur_vec[3], xx, yy, zz; + constexpr Standard_Real conf = Precision::Confusion(); for( i=0; i<3; i++ ) { @@ -339,8 +339,8 @@ Standard_Boolean MeshVS_Tool::GetAverageNormal( const TColStd_Array1OfReal& Node Standard_Boolean res = Standard_True; - Standard_Real normal[3], first_vec[3], cur_vec[3], xx, yy, zz, - conf = Precision::Confusion(); + Standard_Real normal[3], first_vec[3], cur_vec[3], xx, yy, zz; + constexpr Standard_Real conf = Precision::Confusion(); for( i=0; i<3; i++ ) { diff --git a/src/ProjLib/ProjLib_CompProjectedCurve.cxx b/src/ProjLib/ProjLib_CompProjectedCurve.cxx index af709f85e3..f37d535d53 100644 --- a/src/ProjLib/ProjLib_CompProjectedCurve.cxx +++ b/src/ProjLib/ProjLib_CompProjectedCurve.cxx @@ -729,7 +729,7 @@ void ProjLib_CompProjectedCurve::Init() Standard_Boolean FromLastU = Standard_False, isSplitsComputed = Standard_False; - const Standard_Real aTolExt = Precision::PConfusion(); + constexpr Standard_Real aTolExt = Precision::PConfusion(); Extrema_ExtCS CExt (*myCurve, *mySurface, aTolExt, aTolExt); if (CExt.IsDone() && CExt.NbExt()) { diff --git a/src/ProjLib/ProjLib_ComputeApprox.cxx b/src/ProjLib/ProjLib_ComputeApprox.cxx index ec336d94db..aea77f5ac4 100644 --- a/src/ProjLib/ProjLib_ComputeApprox.cxx +++ b/src/ProjLib/ProjLib_ComputeApprox.cxx @@ -252,7 +252,7 @@ static void Function_SetUVBounds(Standard_Real& myU1, case GeomAbs_Cone: { Standard_Real tol = Epsilon(1.); - Standard_Real ptol = Precision::PConfusion(); + constexpr Standard_Real ptol = Precision::PConfusion(); gp_Cone Cone = mySurface->Cone(); VCouture = Standard_False; //Calculation of cone parameters for P == ConeApex often produces wrong diff --git a/src/ProjLib/ProjLib_ComputeApproxOnPolarSurface.cxx b/src/ProjLib/ProjLib_ComputeApproxOnPolarSurface.cxx index 3fe5728fcc..976a18ed67 100644 --- a/src/ProjLib/ProjLib_ComputeApproxOnPolarSurface.cxx +++ b/src/ProjLib/ProjLib_ComputeApproxOnPolarSurface.cxx @@ -673,7 +673,7 @@ Handle(Geom2d_BSplineCurve) ProjLib_ComputeApproxOnPolarSurface::Perform { //OCC217 Standard_Real Tol3d = myTolerance; - Standard_Real ParamTol = Precision::PApproximation(); + constexpr Standard_Real ParamTol = Precision::PApproximation(); Handle(Adaptor2d_Curve2d) AHC2d = InitialCurve2d; Handle(Adaptor3d_Curve) AHC = Curve; diff --git a/src/ProjLib/ProjLib_ProjectOnSurface.cxx b/src/ProjLib/ProjLib_ProjectOnSurface.cxx index de4cf1f20a..954439f683 100644 --- a/src/ProjLib/ProjLib_ProjectOnSurface.cxx +++ b/src/ProjLib/ProjLib_ProjectOnSurface.cxx @@ -91,7 +91,7 @@ class ProjLib_OnSurface : public AppCont_Function myNbPnt2d = 0; Standard_Real U = myCurve->FirstParameter(); gp_Pnt P = myCurve->Value(U); - Standard_Real Tol = Precision::PConfusion(); + constexpr Standard_Real Tol = Precision::PConfusion(); myExtPS = new Extrema_ExtPS (P, *S, Tol, Tol); } diff --git a/src/ProjLib/ProjLib_ProjectedCurve.cxx b/src/ProjLib/ProjLib_ProjectedCurve.cxx index f31bc78d57..a975f092fa 100644 --- a/src/ProjLib/ProjLib_ProjectedCurve.cxx +++ b/src/ProjLib/ProjLib_ProjectedCurve.cxx @@ -191,7 +191,7 @@ static void ExtendC2d (Handle(Geom2d_BSplineCurve)& aRes, gp_Dir2d aDBnd; Handle(Geom2d_TrimmedCurve) aSegment; Geom2dConvert_CompCurveToBSplineCurve aCompCurve(aRes, Convert_RationalC1); - Standard_Real aTol = Precision::Confusion(); + constexpr Standard_Real aTol = Precision::Confusion(); aRes->D1(theParam, aPBnd, aVBnd); aDBnd.SetXY(aVBnd.XY()); diff --git a/src/ProjLib/ProjLib_Sphere.cxx b/src/ProjLib/ProjLib_Sphere.cxx index ba04e89af5..6ee7b1f2d3 100644 --- a/src/ProjLib/ProjLib_Sphere.cxx +++ b/src/ProjLib/ProjLib_Sphere.cxx @@ -140,7 +140,7 @@ void ProjLib_Sphere::Project(const gp_Circ& C) Zs = mySphere.Position().Direction(); Standard_Boolean isIsoU, isIsoV; - Standard_Real Tol = Precision::Confusion(); + constexpr Standard_Real Tol = Precision::Confusion(); isIsoU = Zc.IsNormal(Zs,Tol) && O.IsEqual(C.Location(),Tol); isIsoV = Xc.IsNormal(Zs,Tol) && Yc.IsNormal(Zs,Tol); diff --git a/src/PrsDim/PrsDim_EqualDistanceRelation.cxx b/src/PrsDim/PrsDim_EqualDistanceRelation.cxx index cea28b70a9..9add584701 100644 --- a/src/PrsDim/PrsDim_EqualDistanceRelation.cxx +++ b/src/PrsDim/PrsDim_EqualDistanceRelation.cxx @@ -449,7 +449,7 @@ void PrsDim_EqualDistanceRelation::ComputeTwoEdgesLength( const Handle( Prs3d_Pr SecondAttach = ElCLib::Value(ElCLib::Parameter(l2,Position),l2); } - Standard_Real confusion(Precision::Confusion()); + constexpr Standard_Real confusion(Precision::Confusion()); if (arrsize < confusion) arrsize = Val*0.1; if (Abs(Val) <= confusion) {arrsize = 0.;} @@ -482,7 +482,7 @@ void PrsDim_EqualDistanceRelation::ComputeTwoEdgesLength( const Handle( Prs3d_Pr gp_Circ aCirc2 = aCir2->Circ(); //To avoid circles with different orientation - Standard_Real aTol = Precision::Confusion(); + constexpr Standard_Real aTol = Precision::Confusion(); if(aCirc2.Axis().IsOpposite(aCirc1.Axis(), aTol) || aCirc2.XAxis().IsOpposite(aCirc1.XAxis(), aTol) || aCirc2.YAxis().IsOpposite(aCirc1.YAxis(), aTol) ) @@ -594,7 +594,7 @@ void PrsDim_EqualDistanceRelation::ComputeTwoVerticesLength( const Handle( Prs3d PrsDim::ComputeGeometry( FirstVertex, FirstAttach, Plane, isOnPlane1); PrsDim::ComputeGeometry( SecondVertex, SecondAttach, Plane, isOnPlane2); - Standard_Real confusion(Precision::Confusion()); + constexpr Standard_Real confusion(Precision::Confusion()); Standard_Boolean samePoint(FirstAttach.IsEqual(SecondAttach,confusion)); if (TypeDist == PrsDim_TypeOfDist_Vertical) DirAttach = Plane->Pln().XAxis().Direction(); diff --git a/src/PrsDim/PrsDim_FixRelation.cxx b/src/PrsDim/PrsDim_FixRelation.cxx index b75a001d00..f9168467ca 100644 --- a/src/PrsDim/PrsDim_FixRelation.cxx +++ b/src/PrsDim/PrsDim_FixRelation.cxx @@ -282,7 +282,7 @@ gp_Pnt PrsDim_FixRelation::ComputePosition(const Handle(Geom_Curve)& curv1, if (!vec1.IsParallel(vec2, Precision::Angular()) ) { gp_Dir dir; - Standard_Real conf =Precision::Confusion(); + constexpr Standard_Real conf =Precision::Confusion(); if (lastp1.IsEqual(firstp2,conf) || firstp1.IsEqual(lastp2,conf)) dir.SetXYZ(vec1.XYZ() - vec2.XYZ()); else dir.SetXYZ(vec1.XYZ() + vec2.XYZ()); gp_Vec transvec = gp_Vec(dir)*myArrowSize; diff --git a/src/PrsDim/PrsDim_IdenticRelation.cxx b/src/PrsDim/PrsDim_IdenticRelation.cxx index 9d64752e6d..b3ce9e4206 100644 --- a/src/PrsDim/PrsDim_IdenticRelation.cxx +++ b/src/PrsDim/PrsDim_IdenticRelation.cxx @@ -165,7 +165,7 @@ static Standard_Boolean ComputeAttach(const gp_Circ& thecirc, // Case of confusion between the current position and the center // of the circle -> we move the current position - Standard_Real confusion (Precision::Confusion()); + constexpr Standard_Real confusion (Precision::Confusion()); gp_Pnt aCenter = thecirc.Location(); if ( aCenter.Distance(curpos) <= confusion ) { @@ -229,7 +229,7 @@ static Standard_Boolean ComputeAttach(const gp_Elips& theEll, // Case of confusion between the current position and the center // of the circle -> we move the current position - Standard_Real confusion (Precision::Confusion()); + constexpr Standard_Real confusion (Precision::Confusion()); gp_Pnt aCenter = theEll.Location(); if ( aCenter.Distance(curpos) <= confusion ) { @@ -364,7 +364,7 @@ void PrsDim_IdenticRelation::ComputeSelection(const Handle(SelectMgr_Selection)& Handle(Select3D_SensitiveSegment) seg; // attachment point of the segment linking position to the curve gp_Pnt attach; - Standard_Real confusion (Precision::Confusion()); + constexpr Standard_Real confusion (Precision::Confusion()); if ( myFAttach.IsEqual(mySAttach, confusion) ) { @@ -653,7 +653,7 @@ void PrsDim_IdenticRelation::ComputeTwoLinesPresentation(const Handle(Prs3d_Pres Standard_Real dist = thelin->Lin().Distance(curpos); gp_Pnt proj = ElCLib::Value( pcurpos, thelin->Lin()); gp_Vec trans; - Standard_Real confusion(Precision::Confusion()); + constexpr Standard_Real confusion(Precision::Confusion()); if ( dist >= confusion ) { trans = gp_Vec(proj, curpos); trans.Normalize(); @@ -702,7 +702,7 @@ void PrsDim_IdenticRelation::ComputeTwoCirclesPresentation(const Handle(Prs3d_Pr const gp_Pnt& firstp2, const gp_Pnt& lastp2) { - Standard_Real confusion (Precision::Confusion()); + constexpr Standard_Real confusion (Precision::Confusion()); // Searching of complete circles Standard_Boolean circ1complete = (firstp1.IsEqual(lastp1, confusion)); @@ -983,7 +983,7 @@ void PrsDim_IdenticRelation::ComputeNotAutoCircPresentation(const Handle(Geom_Ci // Case of confusion between the current position and the center // of the circle -> we move the current position - Standard_Real confusion (Precision::Confusion()); + constexpr Standard_Real confusion (Precision::Confusion()); if ( myCenter.Distance(curpos) <= confusion ) { gp_Vec vprec(myCenter, myFAttach); @@ -1057,7 +1057,7 @@ void PrsDim_IdenticRelation::ComputeTwoEllipsesPresentation(const Handle(Prs3d_P const gp_Pnt& firstp2, const gp_Pnt& lastp2) { - Standard_Real confusion (Precision::Confusion()); + constexpr Standard_Real confusion (Precision::Confusion()); // Searching of complete ellipses Standard_Boolean circ1complete = (firstp1.IsEqual(lastp1, confusion)); @@ -1339,7 +1339,7 @@ void PrsDim_IdenticRelation::ComputeNotAutoElipsPresentation(const Handle(Geom_E // Case of confusion between the current position and the center // of the ellipse -> we move the current position - Standard_Real confusion (Precision::Confusion()); + constexpr Standard_Real confusion (Precision::Confusion()); if ( myCenter.Distance(curpos) <= confusion ) { gp_Vec vprec(myCenter, myFAttach); diff --git a/src/PrsDim/PrsDim_MidPointRelation.cxx b/src/PrsDim/PrsDim_MidPointRelation.cxx index 74cec7d3bb..043b7f1ca2 100644 --- a/src/PrsDim/PrsDim_MidPointRelation.cxx +++ b/src/PrsDim/PrsDim_MidPointRelation.cxx @@ -442,7 +442,7 @@ void PrsDim_MidPointRelation::ComputePointsOnCirc(const gp_Circ& aCirc, // Case of confusion between the current position and the center // of the circle -> we move the current position - Standard_Real confusion (Precision::Confusion()); + constexpr Standard_Real confusion (Precision::Confusion()); gp_Pnt aCenter = aCirc.Location(); if ( aCenter.Distance(curpos) <= confusion ) { @@ -569,7 +569,7 @@ void PrsDim_MidPointRelation::ComputePointsOnElips(const gp_Elips& anEll, // Case of confusion between the current position and the center // of the circle -> we move the current position - Standard_Real confusion (Precision::Confusion()); + constexpr Standard_Real confusion (Precision::Confusion()); gp_Pnt aCenter = anEll.Location(); if ( aCenter.Distance(curpos) <= confusion ) { diff --git a/src/QABugs/QABugs_10.cxx b/src/QABugs/QABugs_10.cxx index ddb79f56b2..3580d65aa9 100644 --- a/src/QABugs/QABugs_10.cxx +++ b/src/QABugs/QABugs_10.cxx @@ -213,7 +213,7 @@ static Standard_Integer OCC486(Draw_Interpretor& di, Standard_Integer argc, cons if (GS.IsNull()) { di << "OCC486 FAULTY. Null surface /n";return 1;} gp_Pnt P3D( Draw::Atof(argv[2]),Draw::Atof(argv[3]),Draw::Atof(argv[4]) ); - Standard_Real Tol = Precision::PConfusion(); + constexpr Standard_Real Tol = Precision::PConfusion(); Extrema_ExtPS myExtPS; if (argc > 5) du = Draw::Atof(argv[5]); if (argc > 6) dv = Draw::Atof(argv[6]); diff --git a/src/QABugs/QABugs_11.cxx b/src/QABugs/QABugs_11.cxx index d871614a92..6750ed5f29 100644 --- a/src/QABugs/QABugs_11.cxx +++ b/src/QABugs/QABugs_11.cxx @@ -2648,7 +2648,7 @@ static Standard_Integer OCC8169 (Draw_Interpretor& di, Standard_Integer argc, co Handle(Geom_Surface) thePlane = BRep_Tool::Surface(theFace); - Standard_Real aConfusion = Precision::Confusion(); + constexpr Standard_Real aConfusion = Precision::Confusion(); Standard_Real aP1first, aP1last, aP2first, aP2last; Handle(Geom_Curve) aCurve1 = BRep_Tool::Curve(theEdge1, aP1first, aP1last); @@ -4680,7 +4680,7 @@ Standard_Integer OCC22736 (Draw_Interpretor& di, Standard_Integer argc, const ch gp_Trsf2d Tcomp; Tcomp = M2.Multiplied(M1); - Standard_Real aTol = Precision::Confusion(); + constexpr Standard_Real aTol = Precision::Confusion(); Standard_Integer aStatus = 0; //After applying two times the same mirror the point is located on the same location OK diff --git a/src/QABugs/QABugs_13.cxx b/src/QABugs/QABugs_13.cxx index 59e15d61e5..1437a183d9 100644 --- a/src/QABugs/QABugs_13.cxx +++ b/src/QABugs/QABugs_13.cxx @@ -772,7 +772,7 @@ static Standard_Integer OCC817 (Draw_Interpretor& di, Standard_Integer argc, con return 1; } - Standard_Real delt = 5.0*Precision::Confusion(); + constexpr Standard_Real delt = 5.0*Precision::Confusion(); Standard_Real mesh_delt = Draw::Atof(argv[2]); if (mesh_delt <= 0.0) { diff --git a/src/QABugs/QABugs_19.cxx b/src/QABugs/QABugs_19.cxx index c6f3d91c0e..418ea4d021 100644 --- a/src/QABugs/QABugs_19.cxx +++ b/src/QABugs/QABugs_19.cxx @@ -2013,7 +2013,7 @@ static Standard_Integer OCC24889 (Draw_Interpretor& theDI, DrawTrSurf::Set("c_2", aTrim[1]); // Intersection - const Standard_Real aTol = Precision::Confusion(); + constexpr Standard_Real aTol = Precision::Confusion(); Geom2dAPI_InterCurveCurve aIntTool( aTrim[0], aTrim[1], aTol ); const IntRes2d_IntersectionPoint& aIntPnt = @@ -3871,7 +3871,7 @@ Standard_Integer OCC26446 (Draw_Interpretor& di, TColGeom_Array1OfBSplineCurve aCurves (0, 1); TColStd_Array1OfReal aTolerances (0, 0); Standard_Real aTolConf = 1.e-3; - Standard_Real aTolClosure = Precision::Confusion(); + constexpr Standard_Real aTolClosure = Precision::Confusion(); Handle(TColGeom_HArray1OfBSplineCurve) aConcatCurves; Handle(TColStd_HArray1OfInteger) anIndices; diff --git a/src/QABugs/QABugs_20.cxx b/src/QABugs/QABugs_20.cxx index c76a27751f..5ccf50e54b 100644 --- a/src/QABugs/QABugs_20.cxx +++ b/src/QABugs/QABugs_20.cxx @@ -1613,8 +1613,8 @@ static Standard_Integer OCC27466(Draw_Interpretor& theDI, return 1; BRepAdaptor_Surface aSurf(aFace); - Standard_Real aTolU = Precision::PConfusion(); - Standard_Real aTolV = Precision::PConfusion(); + constexpr Standard_Real aTolU = Precision::PConfusion(); + constexpr Standard_Real aTolV = Precision::PConfusion(); Extrema_GenLocateExtPS anExtrema(aSurf, aTolU, aTolV); anExtrema.Perform(aPnt, aUV.X(), aUV.Y(), Standard_True); diff --git a/src/SWDRAW/SWDRAW_ShapeTool.cxx b/src/SWDRAW/SWDRAW_ShapeTool.cxx index 3efe62790c..c624af2600 100644 --- a/src/SWDRAW/SWDRAW_ShapeTool.cxx +++ b/src/SWDRAW/SWDRAW_ShapeTool.cxx @@ -195,7 +195,7 @@ static Standard_Integer samerange (Draw_Interpretor& di, Standard_Integer argc, Standard_Real oldLast = Draw::Atof(argv[4]); Standard_Real current_first = Draw::Atof(argv[5]); Standard_Real current_last = Draw::Atof(argv[6]); - Standard_Real Tol = Precision::PConfusion(); + constexpr Standard_Real Tol = Precision::PConfusion(); Handle(Geom2d_Curve) NewC2d; GeomLib::SameRange(Tol, C, oldFirst,oldLast, current_first, current_last, NewC2d); diff --git a/src/ShapeAlgo/ShapeAlgo_AlgoContainer.cxx b/src/ShapeAlgo/ShapeAlgo_AlgoContainer.cxx index 9b635a45fe..90baefa0c8 100644 --- a/src/ShapeAlgo/ShapeAlgo_AlgoContainer.cxx +++ b/src/ShapeAlgo/ShapeAlgo_AlgoContainer.cxx @@ -209,7 +209,7 @@ void ShapeAlgo_AlgoContainer::ApproxBSplineCurve (const Handle(Geom_BSplineCurve R->Add(POn2S); } GeomInt_WLApprox theapp3d; - Standard_Real Tol = Precision::Approximation(); + constexpr Standard_Real Tol = Precision::Approximation(); theapp3d.SetParameters(Tol, Tol, 4, 8, 0, 30, Standard_True); Handle(IntPatch_WLine) WL = new IntPatch_WLine(R, Standard_False); Standard_Integer indicemin = 1; @@ -341,7 +341,7 @@ void ShapeAlgo_AlgoContainer::ApproxBSplineCurve (const Handle(Geom2d_BSplineCur R->Add(POn2S); } GeomInt_WLApprox theapp3d; - Standard_Real Tol = Precision::PApproximation(); + constexpr Standard_Real Tol = Precision::PApproximation(); theapp3d.SetParameters(Tol, Tol, 4, 8, 0, 30, Standard_True); Handle(IntPatch_WLine) WL = new IntPatch_WLine(R, Standard_False); Standard_Integer indicemin = 1; diff --git a/src/ShapeAnalysis/ShapeAnalysis_CanonicalRecognition.cxx b/src/ShapeAnalysis/ShapeAnalysis_CanonicalRecognition.cxx index 71830f2c5b..f8982cd7aa 100644 --- a/src/ShapeAnalysis/ShapeAnalysis_CanonicalRecognition.cxx +++ b/src/ShapeAnalysis/ShapeAnalysis_CanonicalRecognition.cxx @@ -832,7 +832,7 @@ Standard_Boolean ShapeAnalysis_CanonicalRecognition::GetSurfaceByLS(const TopoDS aStartPoint, aFBnd, aLBnd, aRelDev); // - Standard_Real aTol = Precision::Confusion(); + constexpr Standard_Real aTol = Precision::Confusion(); math_MultipleVarFunction* aPFunc; GeomConvert_FuncSphereLSDist aFuncSph(aPoints); GeomConvert_FuncCylinderLSDist aFuncCyl(aPoints, thePos.Direction()); diff --git a/src/ShapeAnalysis/ShapeAnalysis_Edge.cxx b/src/ShapeAnalysis/ShapeAnalysis_Edge.cxx index 3a77d8d02f..81bbc08340 100644 --- a/src/ShapeAnalysis/ShapeAnalysis_Edge.cxx +++ b/src/ShapeAnalysis/ShapeAnalysis_Edge.cxx @@ -978,7 +978,7 @@ Standard_Boolean ShapeAnalysis_Edge::CheckPCurveRange (const Standard_Real theFi const Standard_Real theLast, const Handle(Geom2d_Curve)& thePC) { - const Standard_Real eps = Precision::PConfusion(); + constexpr Standard_Real eps = Precision::PConfusion(); Standard_Boolean isValid = Standard_True; Standard_Boolean IsPeriodic = thePC->IsPeriodic(); Standard_Real aPeriod = RealLast(); diff --git a/src/ShapeAnalysis/ShapeAnalysis_Surface.cxx b/src/ShapeAnalysis/ShapeAnalysis_Surface.cxx index 63fbb24801..da99c551d4 100644 --- a/src/ShapeAnalysis/ShapeAnalysis_Surface.cxx +++ b/src/ShapeAnalysis/ShapeAnalysis_Surface.cxx @@ -988,8 +988,8 @@ Standard_Integer ShapeAnalysis_Surface::SurfaceNewton(const gp_Pnt2d &p2dPrev, Standard_Real VF = vf - dv, VL = vl + dv; //Standard_Integer fail = 0; - Standard_Real Tol = Precision::Confusion(); - Standard_Real Tol2 = Tol * Tol;//, rs2p=1e10; + constexpr Standard_Real Tol = Precision::Confusion(); + constexpr Standard_Real Tol2 = Tol * Tol;//, rs2p=1e10; Standard_Real U = p2dPrev.X(), V = p2dPrev.Y(); gp_Vec rsfirst = P3D.XYZ() - Value(U, V).XYZ(); //pdn for (Standard_Integer i = 0; i < 25; i++) { @@ -1225,7 +1225,7 @@ gp_Pnt2d ShapeAnalysis_Surface::ValueOfUV(const gp_Pnt& P3D, const Standard_Real du = Min(myUDelt, SurfAdapt.UResolution(preci)); dv = Min(myVDelt, SurfAdapt.VResolution(preci)); } - Standard_Real Tol = Precision::PConfusion(); + constexpr Standard_Real Tol = Precision::PConfusion(); myExtPS.SetFlag(Extrema_ExtFlag_MIN); myExtPS.Initialize(SurfAdapt, uf - du, ul + du, vf - dv, vl + dv, Tol, Tol); myExtOK = Standard_True; @@ -1273,7 +1273,7 @@ gp_Pnt2d ShapeAnalysis_Surface::ValueOfUV(const gp_Pnt& P3D, const Standard_Real } if (disSurf < 10 * preci) if (mySurf->Continuity() != GeomAbs_C0) { - Standard_Real Tol = Precision::Confusion(); + constexpr Standard_Real Tol = Precision::Confusion(); gp_Vec D1U, D1V; gp_Pnt pnt; SurfAdapt.D1(UU, VV, pnt, D1U, D1V); diff --git a/src/ShapeAnalysis/ShapeAnalysis_TransferParametersProj.cxx b/src/ShapeAnalysis/ShapeAnalysis_TransferParametersProj.cxx index e655fd5b0f..d770fdc88e 100644 --- a/src/ShapeAnalysis/ShapeAnalysis_TransferParametersProj.cxx +++ b/src/ShapeAnalysis/ShapeAnalysis_TransferParametersProj.cxx @@ -123,7 +123,7 @@ Handle(TColStd_HSequenceOfReal) ShapeAnalysis_TransferParametersProj::Perform Handle(TColStd_HSequenceOfReal) resKnots = new TColStd_HSequenceOfReal; Standard_Integer len = Knots->Length(); - Standard_Real preci = 2*Precision::PConfusion(); + constexpr Standard_Real preci = 2*Precision::PConfusion(); Standard_Real first = (To2d ? myAC3d.FirstParameter() : myFirst); Standard_Real last = (To2d ? myAC3d.LastParameter() : myLast); @@ -277,7 +277,7 @@ void ShapeAnalysis_TransferParametersProj::TransferRange(TopoDS_Edge& newEdge, gp_Pnt p1; gp_Pnt p2; Standard_Real alpha = 0, beta = 1; - Standard_Real preci = Precision::PConfusion(); + constexpr Standard_Real preci = Precision::PConfusion(); Standard_Real firstPar, lastPar; if(prevPar < currPar) { firstPar = prevPar; diff --git a/src/ShapeAnalysis/ShapeAnalysis_WireOrder.cxx b/src/ShapeAnalysis/ShapeAnalysis_WireOrder.cxx index 0b8b34c4f0..f3552fef7c 100644 --- a/src/ShapeAnalysis/ShapeAnalysis_WireOrder.cxx +++ b/src/ShapeAnalysis/ShapeAnalysis_WireOrder.cxx @@ -262,8 +262,8 @@ void ShapeAnalysis_WireOrder::Perform (const Standard_Boolean /*closed*/) TColStd_Array1OfBoolean isEdgeUsed (1, aNbEdges); isEdgeUsed.Init (Standard_False); - Standard_Real aTol2 = Precision::SquareConfusion(); - Standard_Real aTolP2 = Precision::SquarePConfusion(); + constexpr Standard_Real aTol2 = Precision::SquareConfusion(); + constexpr Standard_Real aTolP2 = Precision::SquarePConfusion(); // take the first edge to the constructed chain isEdgeUsed (1) = Standard_True; diff --git a/src/ShapeConstruct/ShapeConstruct_ProjectCurveOnSurface.cxx b/src/ShapeConstruct/ShapeConstruct_ProjectCurveOnSurface.cxx index db1e6bedd5..79e1b1a750 100644 --- a/src/ShapeConstruct/ShapeConstruct_ProjectCurveOnSurface.cxx +++ b/src/ShapeConstruct/ShapeConstruct_ProjectCurveOnSurface.cxx @@ -2010,7 +2010,7 @@ InsertAdditionalPointOrAdjust(Standard_Boolean& ToAdjust, try { // RAJOUT OCC_CATCH_SIGNALS - Standard_Real prec = Precision::Confusion();//myPreci; + constexpr Standard_Real prec = Precision::Confusion();//myPreci; Standard_Boolean isoParam = Standard_False; isoPar2d3d = Standard_False; diff --git a/src/ShapeCustom/ShapeCustom_Curve2d.cxx b/src/ShapeCustom/ShapeCustom_Curve2d.cxx index 319d2bd015..2699d447e7 100644 --- a/src/ShapeCustom/ShapeCustom_Curve2d.cxx +++ b/src/ShapeCustom/ShapeCustom_Curve2d.cxx @@ -72,7 +72,7 @@ Standard_Boolean ShapeCustom_Curve2d::IsLinear(const TColgp_Array1OfPnt2d& thePo } } - Standard_Real dPreci = Precision::PConfusion()*Precision::PConfusion(); + constexpr Standard_Real dPreci = Precision::PConfusion()*Precision::PConfusion(); if(dMax < dPreci) return Standard_False; diff --git a/src/ShapeFix/ShapeFix_ComposeShell.cxx b/src/ShapeFix/ShapeFix_ComposeShell.cxx index 45bc2f6e93..426de169a8 100644 --- a/src/ShapeFix/ShapeFix_ComposeShell.cxx +++ b/src/ShapeFix/ShapeFix_ComposeShell.cxx @@ -2607,7 +2607,7 @@ void ShapeFix_ComposeShell::DispatchWires (TopTools_SequenceOfShape &faces, Handle(Geom2d_Curve) c21 = BRep_Tool::CurveOnSurface(E,myFace,f1,l1); TopoDS_Shape dummy = E.Reversed(); Handle(Geom2d_Curve) c22 = BRep_Tool::CurveOnSurface(TopoDS::Edge(dummy),myFace,f2,l2); - Standard_Real dPreci = ::Precision::PConfusion()*Precision::PConfusion(); + constexpr Standard_Real dPreci = ::Precision::PConfusion()*Precision::PConfusion(); gp_Pnt2d pf1 = c21->Value(f1); gp_Pnt2d pl1 = c21->Value(l1); gp_Pnt2d pf2 = c22->Value(f2); diff --git a/src/ShapeFix/ShapeFix_Edge.cxx b/src/ShapeFix/ShapeFix_Edge.cxx index dcd5d29a18..faf56732d6 100644 --- a/src/ShapeFix/ShapeFix_Edge.cxx +++ b/src/ShapeFix/ShapeFix_Edge.cxx @@ -390,7 +390,7 @@ static Handle(Geom2d_Curve) TranslatePCurve (const Handle(Geom_Surface)& aSurf, Standard_Real oldFirstCurve1 = oldFirst, oldLastCurve1 = oldLast; if(Curve2dPtr->IsKind(STANDARD_TYPE(Geom2d_BezierCurve))) { - Standard_Real preci = Precision::PConfusion(); + constexpr Standard_Real preci = Precision::PConfusion(); if ( Abs(oldFirst) > preci || Abs(oldLast-1) > preci ) { Handle(Geom2d_BezierCurve) bezier = Handle(Geom2d_BezierCurve)::DownCast(Curve2dPtr->Copy()); bezier->Segment(oldFirst,oldLast); @@ -412,7 +412,7 @@ static Handle(Geom2d_Curve) TranslatePCurve (const Handle(Geom_Surface)& aSurf, if(Curve2dPtr2->IsKind(STANDARD_TYPE(Geom2d_BezierCurve))) { - Standard_Real preci = Precision::PConfusion(); + constexpr Standard_Real preci = Precision::PConfusion(); if ( Abs(oldFirst) > preci || Abs(oldLast-1) > preci ) { Handle(Geom2d_BezierCurve) bezier = Handle(Geom2d_BezierCurve)::DownCast(Curve2dPtr2->Copy()); bezier->Segment(oldFirst,oldLast); diff --git a/src/ShapeFix/ShapeFix_EdgeProjAux.cxx b/src/ShapeFix/ShapeFix_EdgeProjAux.cxx index 1afc7a1a69..dcc043b4e7 100644 --- a/src/ShapeFix/ShapeFix_EdgeProjAux.cxx +++ b/src/ShapeFix/ShapeFix_EdgeProjAux.cxx @@ -574,7 +574,7 @@ void ShapeFix_EdgeProjAux::UpdateParam2d (const Handle(Geom2d_Curve)& theCurve2d Standard_Real cf = theCurve2d->FirstParameter(); Standard_Real cl = theCurve2d->LastParameter(); //:S4136 Standard_Real preci = BRepAPI::Precision(); - Standard_Real preci2d = Precision::PConfusion(); //:S4136: Parametric(preci, 0.01); + constexpr Standard_Real preci2d = Precision::PConfusion(); //:S4136: Parametric(preci, 0.01); // 15.11.2002 PTV OCC966 if (ShapeAnalysis_Curve::IsPeriodic(theCurve2d)) { diff --git a/src/ShapeFix/ShapeFix_Solid.cxx b/src/ShapeFix/ShapeFix_Solid.cxx index 3536144802..3bef390593 100644 --- a/src/ShapeFix/ShapeFix_Solid.cxx +++ b/src/ShapeFix/ShapeFix_Solid.cxx @@ -548,7 +548,7 @@ TopoDS_Solid ShapeFix_Solid::SolidFromShell (const TopoDS_Shell& shell) try { OCC_CATCH_SIGNALS BRepClass3d_SolidClassifier bsc3d (solid); - Standard_Real t = Precision::Confusion(); // tolerance moyenne + constexpr Standard_Real t = Precision::Confusion(); // tolerance moyenne bsc3d.PerformInfinitePoint(t); if (bsc3d.State() == TopAbs_IN) { diff --git a/src/ShapeFix/ShapeFix_Wire_1.cxx b/src/ShapeFix/ShapeFix_Wire_1.cxx index 901cbad65d..45afce5579 100644 --- a/src/ShapeFix/ShapeFix_Wire_1.cxx +++ b/src/ShapeFix/ShapeFix_Wire_1.cxx @@ -750,7 +750,7 @@ static Standard_Real AdjustOnPeriodic2d (const Handle(Geom2d_Curve)& pc, if (Context().IsNull()) SetContext(new ShapeBuild_ReShape); - Standard_Real preci = ::Precision::PConfusion(); + constexpr Standard_Real preci = ::Precision::PConfusion(); //Standard_Real preci = Precision(); //GeomAdaptor_Surface& SA = Analyzer().Surface()->Adaptor()->ChangeSurface(); //preci = Max(SA.UResolution(preci), SA.VResolution(preci)); @@ -1024,7 +1024,7 @@ static Standard_Real AdjustOnPeriodic2d (const Handle(Geom2d_Curve)& pc, Standard_Real ipar1 = clast1, ipar2 = cfirst2; Geom2dInt_GInter Inter; - Standard_Real tolint = ::Precision::PConfusion(); + constexpr Standard_Real tolint = ::Precision::PConfusion(); Geom2dAdaptor_Curve AC1(pc1), AC2(pc2); diff --git a/src/ShapeFix/ShapeFix_Wireframe.cxx b/src/ShapeFix/ShapeFix_Wireframe.cxx index 092d54246b..b6c8a218f3 100644 --- a/src/ShapeFix/ShapeFix_Wireframe.cxx +++ b/src/ShapeFix/ShapeFix_Wireframe.cxx @@ -696,7 +696,7 @@ Standard_Boolean ShapeFix_Wireframe::MergeSmallEdges(TopTools_MapOfShape& theSma C2->D1(first2,P,Vec2); if ( edge1.Orientation() == TopAbs_REVERSED ) Vec1.Reverse(); if ( edge2.Orientation() == TopAbs_REVERSED ) Vec2.Reverse(); - Standard_Real tol2 = Precision::SquareConfusion(); + constexpr Standard_Real tol2 = Precision::SquareConfusion(); if ( Vec1.SquareMagnitude() < tol2 || Vec2.SquareMagnitude() < tol2 ) Ang1 = M_PI/2.; else Ang1 = Abs(Vec1.Angle(Vec2)); @@ -1145,7 +1145,7 @@ Standard_Boolean ShapeFix_Wireframe::MergeSmallEdges(TopTools_MapOfShape& theSma C2->D1(first2,P,Vec2); if ( edge1.Orientation() == TopAbs_REVERSED ) Vec1.Reverse(); if ( edge2.Orientation() == TopAbs_REVERSED ) Vec2.Reverse(); - Standard_Real tol2 = Precision::SquareConfusion(); + constexpr Standard_Real tol2 = Precision::SquareConfusion(); if ( Vec1.SquareMagnitude() < tol2 || Vec2.SquareMagnitude() < tol2 ) Ang1 = M_PI/2.; else Ang1 = Abs(Vec1.Angle(Vec2)); diff --git a/src/ShapeUpgrade/ShapeUpgrade_ConvertCurve2dToBezier.cxx b/src/ShapeUpgrade/ShapeUpgrade_ConvertCurve2dToBezier.cxx index 29a3bb64d8..c28e4d7965 100644 --- a/src/ShapeUpgrade/ShapeUpgrade_ConvertCurve2dToBezier.cxx +++ b/src/ShapeUpgrade/ShapeUpgrade_ConvertCurve2dToBezier.cxx @@ -61,7 +61,7 @@ void ShapeUpgrade_ConvertCurve2dToBezier::Compute() { mySegments->Clear(); mySplitParams->Clear(); - Standard_Real precision = Precision::PConfusion(); + constexpr Standard_Real precision = Precision::PConfusion(); Standard_Real First = mySplitValues->Value(1); Standard_Real Last = mySplitValues->Value(mySplitValues->Length()); @@ -232,7 +232,7 @@ void ShapeUpgrade_ConvertCurve2dToBezier::Compute() void ShapeUpgrade_ConvertCurve2dToBezier::Build(const Standard_Boolean /*Segment*/) { - Standard_Real prec = Precision::PConfusion(); + constexpr Standard_Real prec = Precision::PConfusion(); Standard_Integer nb = mySplitValues->Length(); myResultingCurves = new TColGeom2d_HArray1OfCurve (1,nb-1); Standard_Real prevPar =0.; diff --git a/src/ShapeUpgrade/ShapeUpgrade_ConvertCurve3dToBezier.cxx b/src/ShapeUpgrade/ShapeUpgrade_ConvertCurve3dToBezier.cxx index d7745ed114..eecadf6bab 100644 --- a/src/ShapeUpgrade/ShapeUpgrade_ConvertCurve3dToBezier.cxx +++ b/src/ShapeUpgrade/ShapeUpgrade_ConvertCurve3dToBezier.cxx @@ -52,7 +52,7 @@ void ShapeUpgrade_ConvertCurve3dToBezier::Compute() { mySegments->Clear(); mySplitParams->Clear(); - Standard_Real precision = Precision::PConfusion(); + constexpr Standard_Real precision = Precision::PConfusion(); Standard_Real First = mySplitValues->Value(1); Standard_Real Last = mySplitValues->Value(mySplitValues->Length()); if(myCurve->IsKind(STANDARD_TYPE(Geom_TrimmedCurve))) { @@ -193,7 +193,7 @@ void ShapeUpgrade_ConvertCurve3dToBezier::Compute() void ShapeUpgrade_ConvertCurve3dToBezier::Build(const Standard_Boolean /*Segment*/) { - Standard_Real prec = Precision::PConfusion(); + constexpr Standard_Real prec = Precision::PConfusion(); Standard_Integer nb = mySplitValues->Length(); myResultingCurves = new TColGeom_HArray1OfCurve (1,nb-1); Standard_Real prevPar = 0.; diff --git a/src/ShapeUpgrade/ShapeUpgrade_ConvertSurfaceToBezierBasis.cxx b/src/ShapeUpgrade/ShapeUpgrade_ConvertSurfaceToBezierBasis.cxx index 070f06b70a..079d73b248 100644 --- a/src/ShapeUpgrade/ShapeUpgrade_ConvertSurfaceToBezierBasis.cxx +++ b/src/ShapeUpgrade/ShapeUpgrade_ConvertSurfaceToBezierBasis.cxx @@ -72,7 +72,7 @@ void ShapeUpgrade_ConvertSurfaceToBezierBasis::Compute(const Standard_Boolean Se Standard_Real ULast = myUSplitValues->Value(myUSplitValues->Length()); Standard_Real VFirst = myVSplitValues->Value(1); Standard_Real VLast = myVSplitValues->Value(myVSplitValues->Length()); - Standard_Real precision = Precision::PConfusion(); + constexpr Standard_Real precision = Precision::PConfusion(); if (mySurface->IsKind(STANDARD_TYPE(Geom_RectangularTrimmedSurface))) { Handle(Geom_RectangularTrimmedSurface) Surface = Handle(Geom_RectangularTrimmedSurface)::DownCast(mySurface); @@ -414,7 +414,7 @@ static Handle(Geom_Surface) GetSegment(const Handle(Geom_Surface)& surf, { if(surf->IsKind(STANDARD_TYPE(Geom_BezierSurface))) { Handle(Geom_BezierSurface) bezier = Handle(Geom_BezierSurface)::DownCast(surf->Copy()); - Standard_Real prec = Precision::PConfusion(); + constexpr Standard_Real prec = Precision::PConfusion(); if(U1 < prec && U2 > 1-prec && V1 < prec && V2 > 1-prec) return bezier; //pdn K4L+ (work around) @@ -499,7 +499,7 @@ void ShapeUpgrade_ConvertSurfaceToBezierBasis::Build(const Standard_Boolean /*Se offsetValue = offSur->Offset(); } - Standard_Real prec = Precision::PConfusion(); + constexpr Standard_Real prec = Precision::PConfusion(); Handle(TColStd_HArray1OfReal) myUSplitParams = mySegments->UJointValues(); Handle(TColStd_HArray1OfReal) myVSplitParams = mySegments->VJointValues(); Standard_Integer nbU = myUSplitValues->Length(); diff --git a/src/ShapeUpgrade/ShapeUpgrade_ShapeConvertToBezier.cxx b/src/ShapeUpgrade/ShapeUpgrade_ShapeConvertToBezier.cxx index 58ef035a1c..2f4eac3cc1 100644 --- a/src/ShapeUpgrade/ShapeUpgrade_ShapeConvertToBezier.cxx +++ b/src/ShapeUpgrade/ShapeUpgrade_ShapeConvertToBezier.cxx @@ -127,7 +127,7 @@ Standard_Boolean ShapeUpgrade_ShapeConvertToBezier::Perform (const Standard_Bool BRep_Builder B; ShapeAnalysis_Edge sae; ShapeBuild_Edge sbe; - Standard_Real preci = Precision::PConfusion(); + constexpr Standard_Real preci = Precision::PConfusion(); for(TopExp_Explorer exp(myResult,TopAbs_FACE); exp.More(); exp.Next()) { TopoDS_Face face = TopoDS::Face(exp.Current()); face.Orientation(TopAbs_FORWARD); diff --git a/src/ShapeUpgrade/ShapeUpgrade_SplitCurve.cxx b/src/ShapeUpgrade/ShapeUpgrade_SplitCurve.cxx index a80af8aeac..b23361295a 100644 --- a/src/ShapeUpgrade/ShapeUpgrade_SplitCurve.cxx +++ b/src/ShapeUpgrade/ShapeUpgrade_SplitCurve.cxx @@ -62,7 +62,7 @@ ShapeUpgrade_SplitCurve::ShapeUpgrade_SplitCurve() void ShapeUpgrade_SplitCurve::SetSplitValues (const Handle(TColStd_HSequenceOfReal)& SplitValues) { - Standard_Real precision = Precision::PConfusion(); + constexpr Standard_Real precision = Precision::PConfusion(); if(SplitValues.IsNull()) return; if(SplitValues->Length()==0) return; diff --git a/src/ShapeUpgrade/ShapeUpgrade_SplitCurve2d.cxx b/src/ShapeUpgrade/ShapeUpgrade_SplitCurve2d.cxx index e78e550aa3..57ded77523 100644 --- a/src/ShapeUpgrade/ShapeUpgrade_SplitCurve2d.cxx +++ b/src/ShapeUpgrade/ShapeUpgrade_SplitCurve2d.cxx @@ -63,7 +63,7 @@ ShapeUpgrade_SplitCurve2d::ShapeUpgrade_SplitCurve2d() Handle(Geom2d_Curve) CopyOfC = Handle(Geom2d_Curve)::DownCast(C->Copy()); myCurve = CopyOfC; - Standard_Real precision = Precision::PConfusion(); + constexpr Standard_Real precision = Precision::PConfusion(); Standard_Real firstPar = First; Standard_Real lastPar = Last; Handle (Geom2d_Curve) aCurve = myCurve; diff --git a/src/ShapeUpgrade/ShapeUpgrade_SplitCurve2dContinuity.cxx b/src/ShapeUpgrade/ShapeUpgrade_SplitCurve2dContinuity.cxx index e58fec2990..2a2f1b9f70 100644 --- a/src/ShapeUpgrade/ShapeUpgrade_SplitCurve2dContinuity.cxx +++ b/src/ShapeUpgrade/ShapeUpgrade_SplitCurve2dContinuity.cxx @@ -79,7 +79,7 @@ void ShapeUpgrade_SplitCurve2dContinuity::Compute() myStatus = ShapeExtend::EncodeStatus (ShapeExtend_DONE2); if (mySplitValues->Length() > 2) myStatus = ShapeExtend::EncodeStatus (ShapeExtend_DONE1); - Standard_Real precision = Precision::PConfusion(); + constexpr Standard_Real precision = Precision::PConfusion(); Standard_Real First = mySplitValues->Value(1); Standard_Real Last = mySplitValues->Value(mySplitValues->Length()); if (myCurve->IsKind(STANDARD_TYPE(Geom2d_TrimmedCurve))) { diff --git a/src/ShapeUpgrade/ShapeUpgrade_SplitCurve3d.cxx b/src/ShapeUpgrade/ShapeUpgrade_SplitCurve3d.cxx index d9e1e931cd..5ccd0b6bf8 100644 --- a/src/ShapeUpgrade/ShapeUpgrade_SplitCurve3d.cxx +++ b/src/ShapeUpgrade/ShapeUpgrade_SplitCurve3d.cxx @@ -62,7 +62,7 @@ ShapeUpgrade_SplitCurve3d::ShapeUpgrade_SplitCurve3d() // if (ShapeUpgrade::Debug()) std::cout << "SplitCurve3d::Init"<Copy()); myCurve = CopyOfC; - Standard_Real precision = Precision::PConfusion(); + constexpr Standard_Real precision = Precision::PConfusion(); Standard_Real firstPar = First; Standard_Real lastPar = Last; Handle (Geom_Curve) aCurve = myCurve; @@ -156,7 +156,7 @@ ShapeUpgrade_SplitCurve3d::ShapeUpgrade_SplitCurve3d() // 15.11.2002 PTV OCC966 if(!ShapeAnalysis_Curve::IsPeriodic(myCurve)) { //pdn exceptons only on non periodic curves - Standard_Real precision = Precision::PConfusion(); + constexpr Standard_Real precision = Precision::PConfusion(); Standard_Real firstPar = myCurve->FirstParameter(); Standard_Real lastPar = myCurve->LastParameter(); if(Abs(First-firstPar) < precision) diff --git a/src/ShapeUpgrade/ShapeUpgrade_SplitCurve3dContinuity.cxx b/src/ShapeUpgrade/ShapeUpgrade_SplitCurve3dContinuity.cxx index ebaf87e030..e5827f2a49 100644 --- a/src/ShapeUpgrade/ShapeUpgrade_SplitCurve3dContinuity.cxx +++ b/src/ShapeUpgrade/ShapeUpgrade_SplitCurve3dContinuity.cxx @@ -77,7 +77,7 @@ void ShapeUpgrade_SplitCurve3dContinuity::Compute() { Standard_Real First = mySplitValues->Value(1); Standard_Real Last = mySplitValues->Value(mySplitValues->Length()); - Standard_Real precision = Precision::PConfusion(); + constexpr Standard_Real precision = Precision::PConfusion(); if(myCurve->Continuity() < myCriterion) myStatus = ShapeExtend::EncodeStatus (ShapeExtend_DONE2); if (mySplitValues->Length() > 2) diff --git a/src/ShapeUpgrade/ShapeUpgrade_SplitSurface.cxx b/src/ShapeUpgrade/ShapeUpgrade_SplitSurface.cxx index 9bac8b4458..eab19a00c7 100644 --- a/src/ShapeUpgrade/ShapeUpgrade_SplitSurface.cxx +++ b/src/ShapeUpgrade/ShapeUpgrade_SplitSurface.cxx @@ -102,7 +102,7 @@ void ShapeUpgrade_SplitSurface::Init(const Handle(Geom_Surface)& S, Standard_Real U1,U2,V1,V2; mySurface->Bounds(U1,U2,V1,V2); - Standard_Real precision = Precision::PConfusion(); + constexpr Standard_Real precision = Precision::PConfusion(); if ( mySurface->IsUPeriodic() && ULast - UFirst <= U2 - U1 + precision ) { U1 = UFirst; U2 = U1 + mySurface->UPeriod(); } if ( mySurface->IsVPeriodic() && @@ -168,7 +168,7 @@ void ShapeUpgrade_SplitSurface::Init(const Handle(Geom_Surface)& S, void ShapeUpgrade_SplitSurface::SetUSplitValues(const Handle(TColStd_HSequenceOfReal)& UValues) { if(UValues.IsNull()) return; - Standard_Real precision = Precision::PConfusion(); + constexpr Standard_Real precision = Precision::PConfusion(); Standard_Real UFirst = myUSplitValues->Value(1), ULast = myUSplitValues->Value(myUSplitValues->Length()); Standard_Integer i =1; @@ -193,7 +193,7 @@ void ShapeUpgrade_SplitSurface::SetUSplitValues(const Handle(TColStd_HSequenceOf void ShapeUpgrade_SplitSurface::SetVSplitValues(const Handle(TColStd_HSequenceOfReal)& VValues) { if(VValues.IsNull()) return; - Standard_Real precision = Precision::PConfusion(); + constexpr Standard_Real precision = Precision::PConfusion(); Standard_Real VFirst = myVSplitValues->Value(1), VLast = myVSplitValues->Value(myVSplitValues->Length()); Standard_Integer i =1; diff --git a/src/ShapeUpgrade/ShapeUpgrade_SplitSurfaceContinuity.cxx b/src/ShapeUpgrade/ShapeUpgrade_SplitSurfaceContinuity.cxx index 494d5b2db1..a6b25f91a8 100644 --- a/src/ShapeUpgrade/ShapeUpgrade_SplitSurfaceContinuity.cxx +++ b/src/ShapeUpgrade/ShapeUpgrade_SplitSurfaceContinuity.cxx @@ -89,7 +89,7 @@ ShapeUpgrade_SplitSurfaceContinuity::ShapeUpgrade_SplitSurfaceContinuity() Standard_Real ULast = myUSplitValues->Value(myUSplitValues->Length()); Standard_Real VFirst = myVSplitValues->Value(1); Standard_Real VLast = myVSplitValues->Value(myVSplitValues->Length()); - Standard_Real precision = Precision::Confusion(); + constexpr Standard_Real precision = Precision::Confusion(); // if (ShapeUpgrade::Debug()) std::cout << "SplitSurfaceContinuity::Build" << std::endl; if(mySurface->Continuity() < myCriterion) myStatus = ShapeExtend::EncodeStatus (ShapeExtend_DONE2); diff --git a/src/ShapeUpgrade/ShapeUpgrade_UnifySameDomain.cxx b/src/ShapeUpgrade/ShapeUpgrade_UnifySameDomain.cxx index e17fefa111..52e8501c45 100644 --- a/src/ShapeUpgrade/ShapeUpgrade_UnifySameDomain.cxx +++ b/src/ShapeUpgrade/ShapeUpgrade_UnifySameDomain.cxx @@ -822,7 +822,7 @@ static Standard_Boolean SameSurf(const Handle(Geom_Surface)& theS1, const Handle Standard_Real uf1, ul1, vf1, vl1, uf2, ul2, vf2, vl2; theS1->Bounds(uf1, ul1, vf1, vl1); theS2->Bounds(uf2, ul2, vf2, vl2); - Standard_Real aPTol = Precision::PConfusion(); + constexpr Standard_Real aPTol = Precision::PConfusion(); if (Precision::IsNegativeInfinite(uf1)) { if (!Precision::IsNegativeInfinite(uf2)) @@ -3843,7 +3843,7 @@ void ShapeUpgrade_UnifySameDomain::UnifyEdges() } // fix changed faces and replace them in the local context - Standard_Real aPrec = Precision::Confusion(); + constexpr Standard_Real aPrec = Precision::Confusion(); for (Standard_Integer i = 1; i <= aChangedFaces.Extent(); i++) { TopoDS_Face aFace = TopoDS::Face(myContext->Apply(aChangedFaces.FindKey(i))); if (aFace.IsNull()) diff --git a/src/ShapeUpgrade/ShapeUpgrade_WireDivide.cxx b/src/ShapeUpgrade/ShapeUpgrade_WireDivide.cxx index 63600eaee9..91415b7bba 100644 --- a/src/ShapeUpgrade/ShapeUpgrade_WireDivide.cxx +++ b/src/ShapeUpgrade/ShapeUpgrade_WireDivide.cxx @@ -172,7 +172,7 @@ static void CorrectSplitValues(const Handle(TColStd_HSequenceOfReal)& orig3d, Handle(TColStd_HSequenceOfReal) new2d, Handle(TColStd_HSequenceOfReal) new3d) { - Standard_Real preci = Precision::PConfusion(); + constexpr Standard_Real preci = Precision::PConfusion(); Standard_Integer len3d = orig3d->Length(); Standard_Integer len2d = orig2d->Length(); TColStd_Array1OfBoolean fixNew2d (1, len3d); diff --git a/src/StdPrs/StdPrs_ShadedShape.cxx b/src/StdPrs/StdPrs_ShadedShape.cxx index fe2f667dba..bd807f01c9 100644 --- a/src/StdPrs/StdPrs_ShadedShape.cxx +++ b/src/StdPrs/StdPrs_ShadedShape.cxx @@ -147,7 +147,7 @@ namespace Standard_Integer aNbVertices = 0; // Precision for compare square distances - const Standard_Real aPreci = Precision::SquareConfusion(); + constexpr Standard_Real aPreci = Precision::SquareConfusion(); TopExp_Explorer aFaceIt(theShape, TopAbs_FACE); for (; aFaceIt.More(); aFaceIt.Next()) diff --git a/src/TopTrans/TopTrans_SurfaceTransition.cxx b/src/TopTrans/TopTrans_SurfaceTransition.cxx index 530e6ffd5e..9796774d8c 100644 --- a/src/TopTrans/TopTrans_SurfaceTransition.cxx +++ b/src/TopTrans/TopTrans_SurfaceTransition.cxx @@ -213,7 +213,7 @@ void TopTrans_SurfaceTransition::Reset(const gp_Dir& Tgt, { STATIC_DEFINED = Standard_True; - Standard_Real tola = Precision::Angular(); + constexpr Standard_Real tola = Precision::Angular(); Standard_Boolean curismax = (Abs(MaxD.Dot(myTgt)) < tola); Standard_Boolean curismin = (Abs(MinD.Dot(myTgt)) < tola); @@ -284,7 +284,7 @@ void TopTrans_SurfaceTransition::Compare Standard_Real Curv=0.; // ------ - Standard_Real tola = Precision::Angular(); + constexpr Standard_Real tola = Precision::Angular(); Standard_Boolean curismax = (Abs(MaxD.Dot(myTgt)) < tola); Standard_Boolean curismin = (Abs(MinD.Dot(myTgt)) < tola); if (!curismax && !curismin) { @@ -365,7 +365,7 @@ void TopTrans_SurfaceTransition::Compare // oriented Ang(beafter,dironF), // dironF normal to the curve, oriented INSIDE F, the added oriented support Standard_Real Ang = ::FUN_Ang(myNorm,beafter,myTgt,Norm,O); - Standard_Real tola = Precision::Angular(); // nyi in arg + constexpr Standard_Real tola = Precision::Angular(); // nyi in arg // i = 0,1,2 : cos = 0,>0,<0 // j = 0,1,2 : sin = 0,>0,<0 diff --git a/src/ViewerTest/ViewerTest_ObjectCommands.cxx b/src/ViewerTest/ViewerTest_ObjectCommands.cxx index a28963a606..300e5bad20 100644 --- a/src/ViewerTest/ViewerTest_ObjectCommands.cxx +++ b/src/ViewerTest/ViewerTest_ObjectCommands.cxx @@ -2928,7 +2928,7 @@ Handle( Poly_Triangulation ) CalculationOfSphere( double X , double Y , double Z Poly_Connect pc (polyTriangulation); Standard_Integer index[3]; - Standard_Real Tol = Precision::Confusion(); + constexpr Standard_Real Tol = Precision::Confusion(); gp_Dir Nor; for (i = 1; i <= polyTriangulation->NbNodes(); i++) diff --git a/src/VrmlData/VrmlData_Material.cxx b/src/VrmlData/VrmlData_Material.cxx index c3644f56fd..9014683cf7 100644 --- a/src/VrmlData/VrmlData_Material.cxx +++ b/src/VrmlData/VrmlData_Material.cxx @@ -273,7 +273,7 @@ VrmlData_ErrorStatus VrmlData_Material::Write (const char * thePrefix) const char buf[128]; Standard_Real val[3]; const Quantity_TypeOfColor bidType = Quantity_TOC_sRGB; - const Standard_Real aConf (0.001 * Precision::Confusion()); + constexpr Standard_Real aConf (0.001 * Precision::Confusion()); if (OK(aStatus) && fabs(myAmbientIntensity - 0.2) > aConf) { Sprintf (buf, "%.6g", myAmbientIntensity); @@ -324,7 +324,7 @@ VrmlData_ErrorStatus VrmlData_Material::Write (const char * thePrefix) const Standard_Boolean VrmlData_Material::IsDefault () const { - const Standard_Real aConf (0.001 * Precision::Confusion()); + constexpr Standard_Real aConf (0.001 * Precision::Confusion()); Standard_Boolean aResult (Standard_False); if (fabs(myAmbientIntensity - 0.2) < aConf && fabs(myShininess - 0.2) < aConf && diff --git a/src/VrmlData/VrmlData_ShapeConvert.cxx b/src/VrmlData/VrmlData_ShapeConvert.cxx index 6411c778de..90b00de1be 100644 --- a/src/VrmlData/VrmlData_ShapeConvert.cxx +++ b/src/VrmlData/VrmlData_ShapeConvert.cxx @@ -414,7 +414,7 @@ Handle(VrmlData_Geometry) VrmlData_ShapeConvert::triToIndexedFaceSet Poly_Connect PC(theTri); // Create the Normals node (if UV- values are available) TopLoc_Location aLoc; - const Standard_Real aConf2 = Precision::SquareConfusion(); + constexpr Standard_Real aConf2 = Precision::SquareConfusion(); const Handle(Geom_Surface) aSurface = BRep_Tool::Surface (theFace, aLoc); if (theTri->HasUVNodes() && aSurface.IsNull() == Standard_False) { diff --git a/src/gce/gce_MakeCirc.cxx b/src/gce/gce_MakeCirc.cxx index 0e7ffcda00..8f8352f133 100644 --- a/src/gce/gce_MakeCirc.cxx +++ b/src/gce/gce_MakeCirc.cxx @@ -99,7 +99,7 @@ gce_MakeCirc::gce_MakeCirc(const gp_Pnt& P1 , dir = VDir2.Crossed(Dir3); gp_Lin L2(gp_Pnt((P3.XYZ()+P2.XYZ())/2.),dir); - Standard_Real Tol = Precision::PConfusion(); + constexpr Standard_Real Tol = Precision::PConfusion(); Extrema_ExtElC distmin(L1,L2,Tol); if (!distmin.IsDone()) { From e5998666eedbb6fd968b8d4a59c21575307c3fd7 Mon Sep 17 00:00:00 2001 From: dkulikov Date: Sun, 22 Sep 2024 12:33:29 +0000 Subject: [PATCH 612/639] 0033665: Data Exchange, Step Import - TransferRoots crashes for invalid STEP files Fixed exception in RWStepShape_RWEdgeCurve::Check() thrown when trying to access step entity in Interface_EntityIterator with zero entities. Fixed a crash in StepToTopoDS_TranslateFace::Init() caused by dereferencing nullptr. RWStepShape_RWEdgeCurve and RWStepShape_RWEdgeCurve are refactored. Test bug33665 is added to check the fixed behavior. --- src/RWStepShape/RWStepShape_RWEdgeCurve.cxx | 429 ++++++++---------- src/RWStepShape/RWStepShape_RWEdgeCurve.hxx | 47 +- .../StepToTopoDS_TranslateFace.cxx | 395 ++++++++-------- .../StepToTopoDS_TranslateFace.hxx | 6 +- tests/bugs/step/bug33665 | 12 + 5 files changed, 430 insertions(+), 459 deletions(-) create mode 100644 tests/bugs/step/bug33665 diff --git a/src/RWStepShape/RWStepShape_RWEdgeCurve.cxx b/src/RWStepShape/RWStepShape_RWEdgeCurve.cxx index d6c8f9fd04..d5614afd03 100644 --- a/src/RWStepShape/RWStepShape_RWEdgeCurve.cxx +++ b/src/RWStepShape/RWStepShape_RWEdgeCurve.cxx @@ -11,11 +11,11 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. +#include #include #include #include -#include #include #include #include @@ -27,271 +27,228 @@ #include #include -RWStepShape_RWEdgeCurve::RWStepShape_RWEdgeCurve () {} - -void RWStepShape_RWEdgeCurve::ReadStep - (const Handle(StepData_StepReaderData)& data, - const Standard_Integer num, - Handle(Interface_Check)& ach, - const Handle(StepShape_EdgeCurve)& ent) const +namespace { + // ================================================================ + // Function : GetSharing + // Purpose : Returns a step entity of a type StepShapeType that is + // sharing theStepEntity. If no sharing entity of + // required type is found, returns nullptr. + // ================================================================ + template + Handle (StepShapeType) GetSharing (const Handle (Standard_Transient)& theStepEntity, + const Interface_ShareTool& theShareTool) + { + Interface_EntityIterator aSharedEntitiesIt = theShareTool.Sharings (theStepEntity); + aSharedEntitiesIt.SelectType (STANDARD_TYPE (StepShapeType), Standard_True); + return aSharedEntitiesIt.NbEntities() == 0 + ? Handle (StepShapeType){} + : Handle (StepShapeType)::DownCast (aSharedEntitiesIt.Value()); + } + // ================================================================ + // Function : GetFaceBoundOrientation + // Purpose : Returns an orientation of face bound sharing + // theOrientedEdge. If face bound cannot be found, + // returns true (to preserve pre-refactoring behavior). + // ================================================================ + Standard_Boolean GetFaceBoundOrientation (const Handle (StepShape_OrientedEdge)& theOrientedEdge, + const Interface_ShareTool& theShareTool) + { + if (!theShareTool.IsShared (theOrientedEdge)) + { + return Standard_True; + } - // --- Number of Parameter Control --- - - if (!data->CheckNbParams(num,5,ach,"edge_curve")) return; - - // --- inherited field : name --- - - Handle(TCollection_HAsciiString) aName; - data->ReadString (num,1,"name",ach,aName); - - // --- inherited field : edgeStart --- - - Handle(StepShape_Vertex) aEdgeStart; - data->ReadEntity(num, 2,"edge_start", ach, STANDARD_TYPE(StepShape_Vertex), aEdgeStart); - - // --- inherited field : edgeEnd --- - - Handle(StepShape_Vertex) aEdgeEnd; - data->ReadEntity(num, 3,"edge_end", ach, STANDARD_TYPE(StepShape_Vertex), aEdgeEnd); - - // --- own field : edgeGeometry --- - - Handle(StepGeom_Curve) aEdgeGeometry; - data->ReadEntity(num, 4,"edge_geometry", ach, STANDARD_TYPE(StepGeom_Curve), aEdgeGeometry); - - // --- own field : sameSense --- + const Handle (StepShape_EdgeLoop) anEdgeLoop = GetSharing (theOrientedEdge, + theShareTool); + if (!theShareTool.IsShared (anEdgeLoop)) + { + return Standard_True; + } - Standard_Boolean aSameSense; - data->ReadBoolean (num,5,"same_sense",ach,aSameSense); + const Handle (StepShape_FaceBound) aFaceBound = GetSharing (anEdgeLoop, + theShareTool); + return aFaceBound.IsNull() ? Standard_True : aFaceBound->Orientation(); + } - //--- Initialisation of the read entity --- + // ================================================================ + // Function : GetFaceBoundOrientation + // Purpose : Returns true if start and end points of theEdgeCurve + // are valid points of the different vertices and are + // equal to each other within Precision::Confusion(). + // ================================================================ + Standard_Boolean AreEndsMatch (const Handle (StepShape_EdgeCurve)& theEdgeCurve) + { + Handle (StepShape_VertexPoint) aStartVertex = Handle (StepShape_VertexPoint)::DownCast ( + theEdgeCurve->EdgeStart()); + Handle (StepShape_VertexPoint) anEndVertex = Handle (StepShape_VertexPoint)::DownCast ( + theEdgeCurve->EdgeEnd()); + if (aStartVertex == anEndVertex) + { + return Standard_False; + } + Handle (StepGeom_CartesianPoint) aStartPoint = Handle (StepGeom_CartesianPoint)::DownCast ( + aStartVertex->VertexGeometry()); + Handle (StepGeom_CartesianPoint) anEndPoint = Handle (StepGeom_CartesianPoint)::DownCast ( + anEndVertex->VertexGeometry()); + if (aStartPoint.IsNull() || anEndPoint.IsNull()) + { + return Standard_False; + } - ent->Init(aName, aEdgeStart, aEdgeEnd, aEdgeGeometry, aSameSense); + const Standard_Real aDistance = Sqrt ( + (aStartPoint->CoordinatesValue (1) - anEndPoint->CoordinatesValue (1)) + * (aStartPoint->CoordinatesValue (1) - anEndPoint->CoordinatesValue (1)) + + (aStartPoint->CoordinatesValue (2) - anEndPoint->CoordinatesValue (2)) + * (aStartPoint->CoordinatesValue (2) - anEndPoint->CoordinatesValue (2)) + + (aStartPoint->CoordinatesValue (3) - anEndPoint->CoordinatesValue (3)) + * (aStartPoint->CoordinatesValue (3) - anEndPoint->CoordinatesValue (3))); + return aDistance < Precision::Confusion(); + } } - -void RWStepShape_RWEdgeCurve::WriteStep - (StepData_StepWriter& SW, - const Handle(StepShape_EdgeCurve)& ent) const +// ================================================================ +// Function : ReadStep +// Purpose : +// ================================================================ +void RWStepShape_RWEdgeCurve::ReadStep (const Handle (StepData_StepReaderData)& theStepData, + const Standard_Integer theRecordID, + Handle (Interface_Check)& theMessageTool, + const Handle (StepShape_EdgeCurve)& theEdgeCurve) const { + // --- Number of Parameter Control --- + if (!theStepData->CheckNbParams (theRecordID, 5, theMessageTool, "edge_curve")) + { + return; + } - // --- inherited field name --- - - SW.Send(ent->Name()); - - // --- inherited field edgeStart --- - - SW.Send(ent->EdgeStart()); - - // --- inherited field edgeEnd --- + // --- inherited field : name --- + Handle (TCollection_HAsciiString) aName; + theStepData->ReadString (theRecordID, 1, "name", theMessageTool, aName); + + // --- inherited field : edgeStart --- + Handle (StepShape_Vertex) anEdgeStart; + theStepData->ReadEntity (theRecordID, + 2, + "edge_start", + theMessageTool, + STANDARD_TYPE (StepShape_Vertex), + anEdgeStart); + + // --- inherited field : edgeEnd --- + Handle (StepShape_Vertex) anEdgeEnd; + theStepData->ReadEntity (theRecordID, + 3, + "edge_end", + theMessageTool, + STANDARD_TYPE (StepShape_Vertex), + anEdgeEnd); + + // --- own field : edgeGeometry --- + Handle (StepGeom_Curve) anEdgeGeometry; + theStepData->ReadEntity (theRecordID, + 4, + "edge_geometry", + theMessageTool, + STANDARD_TYPE (StepGeom_Curve), + anEdgeGeometry); + + // --- own field : sameSense --- + Standard_Boolean aSameSense; + theStepData->ReadBoolean (theRecordID, 5, "same_sense", theMessageTool, aSameSense); + + //--- Initialisation of the read entity --- + theEdgeCurve->Init (aName, anEdgeStart, anEdgeEnd, anEdgeGeometry, aSameSense); +} - SW.Send(ent->EdgeEnd()); +// ================================================================ +// Function : WriteStep +// Purpose : +// ================================================================ +void RWStepShape_RWEdgeCurve::WriteStep (StepData_StepWriter& theStepWriter, + const Handle (StepShape_EdgeCurve)& theEdgeCurve) const +{ + // --- inherited field name --- + theStepWriter.Send (theEdgeCurve->Name()); - // --- own field : edgeGeometry --- + // --- inherited field edgeStart --- + theStepWriter.Send (theEdgeCurve->EdgeStart()); - SW.Send(ent->EdgeGeometry()); + // --- inherited field edgeEnd --- + theStepWriter.Send (theEdgeCurve->EdgeEnd()); - // --- own field : sameSense --- + // --- own field : edgeGeometry --- + theStepWriter.Send (theEdgeCurve->EdgeGeometry()); - SW.SendBoolean(ent->SameSense()); + // --- own field : sameSense --- + theStepWriter.SendBoolean (theEdgeCurve->SameSense()); } - -void RWStepShape_RWEdgeCurve::Share(const Handle(StepShape_EdgeCurve)& ent, Interface_EntityIterator& iter) const +// ================================================================ +// Function : Share +// Purpose : +// ================================================================ +void RWStepShape_RWEdgeCurve::Share (const Handle (StepShape_EdgeCurve)& theEdgeCurve, + Interface_EntityIterator& theSharedEntitiesIt) const { + theSharedEntitiesIt.GetOneItem (theEdgeCurve->EdgeStart()); - iter.GetOneItem(ent->EdgeStart()); - + theSharedEntitiesIt.GetOneItem (theEdgeCurve->EdgeEnd()); - iter.GetOneItem(ent->EdgeEnd()); - - - iter.GetOneItem(ent->EdgeGeometry()); + theSharedEntitiesIt.GetOneItem (theEdgeCurve->EdgeGeometry()); } - - -void RWStepShape_RWEdgeCurve::Check - (const Handle(StepShape_EdgeCurve)& ent, - const Interface_ShareTool& aShto, - Handle(Interface_Check)& ach) const +// ================================================================ +// Function : Check +// Purpose : +// ================================================================ +void RWStepShape_RWEdgeCurve::Check (const Handle (StepShape_EdgeCurve)& theEdgeCurve, + const Interface_ShareTool& theShareTool, + Handle (Interface_Check)& theMessageTool) const { -// std::cout << "------ calling CheckEdgeCurve ------" << std::endl; - - Handle(StepShape_OrientedEdge) theOE1, theOE2; - Handle(StepShape_FaceBound) theFOB1, theFOB2; - //Handle(StepShape_FaceSurface) theFS1, theFS2; - - Standard_Boolean theOEOri1 = Standard_True; - Standard_Boolean theOEOri2 = Standard_True; - Standard_Boolean theFBOri1 = Standard_True; - Standard_Boolean theFBOri2 = Standard_True; - //Standard_Boolean theFSOri1 = Standard_True; - //Standard_Boolean theFSOri2 = Standard_True; - Standard_Boolean Cumulated1, Cumulated2; - // 1- First Vertex != LastVertex but First VertexPoint == Last VertexPoint - // Remark : time consuming process but useful ! - // If this append, we can drop one of the two vertices and replace it - // everywhere it is referenced. Side effect : tolerance problem !!! - - Handle(StepShape_VertexPoint) StartVertex = - Handle(StepShape_VertexPoint)::DownCast(ent->EdgeStart()); - Handle(StepShape_VertexPoint) EndVertex = - Handle(StepShape_VertexPoint)::DownCast(ent->EdgeEnd()); - - if (StartVertex != EndVertex) { - - Handle(StepGeom_CartesianPoint) StartPoint = - Handle(StepGeom_CartesianPoint)::DownCast(StartVertex->VertexGeometry()); - Handle(StepGeom_CartesianPoint) EndPoint = - Handle(StepGeom_CartesianPoint)::DownCast(EndVertex->VertexGeometry()); - - // it can also be a degenerated pcurve + // Remark: time consuming process but useful. + // If this append, we can drop one of the two vertices and replace it + // everywhere it is referenced. Side effect: tolerance problem. + if (AreEndsMatch (theEdgeCurve)) + { + theMessageTool->AddWarning ( + "Two instances of Vertex have equal (within uncertainty) coordinates"); + } - if (!StartPoint.IsNull() && !EndPoint.IsNull()) { - Standard_Real Dist = Sqrt - ((StartPoint->CoordinatesValue(1) - EndPoint->CoordinatesValue(1)) * - (StartPoint->CoordinatesValue(1) - EndPoint->CoordinatesValue(1)) + - (StartPoint->CoordinatesValue(2) - EndPoint->CoordinatesValue(2)) * - (StartPoint->CoordinatesValue(2) - EndPoint->CoordinatesValue(2)) + - (StartPoint->CoordinatesValue(3) - EndPoint->CoordinatesValue(3)) * - (StartPoint->CoordinatesValue(3) - EndPoint->CoordinatesValue(3))); - if (Dist < Precision::Confusion() ) { - ach->AddWarning("Two instances of Vertex have equal (within uncertainty) coordinates"); - } - } + if (!theShareTool.IsShared (theEdgeCurve)) + { + theMessageTool->AddFail ("ERROR: EdgeCurve not referenced"); + return; } - - // 2- Two-Manifold Topology - Standard_Boolean sharEC = aShto.IsShared(ent); - Standard_Integer nbRef; - if(!sharEC){ - ach->AddFail("ERROR: EdgeCurve not referenced"); + // 2- Two-Manifold Topology + Interface_EntityIterator aSharedEntitiesIt = theShareTool.Sharings (theEdgeCurve); + aSharedEntitiesIt.SelectType (STANDARD_TYPE (StepShape_OrientedEdge), Standard_True); + if (aSharedEntitiesIt.NbEntities() != 2) + { + return; } - else { - Interface_EntityIterator myShRef = aShto.Sharings(ent); - myShRef.SelectType (STANDARD_TYPE(StepShape_OrientedEdge),Standard_True); - nbRef = myShRef.NbEntities(); - if (nbRef ==2) { - theOE1 = Handle(StepShape_OrientedEdge)::DownCast(myShRef.Value()); - theOEOri1 = theOE1->Orientation(); - myShRef.Next(); - theOE2 = Handle(StepShape_OrientedEdge)::DownCast(myShRef.Value()); - theOEOri2 = theOE2->Orientation(); - - // get the FaceBound orientation for theOE1 - - Standard_Boolean sharOE1 = aShto.IsShared(theOE1); - if(!sharOE1){ -#ifdef OCCT_DEBUG - std::cout << "OrientedEdge1 not shared" <Orientation(); - } - else { -#ifdef OCCT_DEBUG - std::cout << "EdgeLoop not referenced by FaceBound" << std::endl; -#endif - } - } - } - else { - if (nbRef == 0) { -#ifdef OCCT_DEBUG - std::cout << "OrientedEdge not referenced" << std::endl; -#endif - } - else { - if (aShto.NbTypedSharings(theOE1, - STANDARD_TYPE(StepShape_EdgeLoop)) > 1) { -#ifdef OCCT_DEBUG - std::cout << "OrientedEdge referenced more than once" << std::endl; -#endif - } - } - } - } - // get the FaceBound orientation for theOE2 + const Handle (StepShape_OrientedEdge) anOrientedEdge1 = + Handle (StepShape_OrientedEdge)::DownCast (aSharedEntitiesIt.Value()); + const Standard_Boolean aFaceBoundOrientation1 = GetFaceBoundOrientation (anOrientedEdge1, + theShareTool); + const Standard_Boolean anIsCumulated1 = aFaceBoundOrientation1 != anOrientedEdge1->Orientation(); - Standard_Boolean sharOE2 = aShto.IsShared(theOE2); - if(!sharOE2){ -#ifdef OCCT_DEBUG - std::cout << "OrientedEdge2 not shared" <Orientation(); - } - else { -#ifdef OCCT_DEBUG - std::cout << "EdgeLoop not referenced by FaceBound" << std::endl; -#endif - } - } - } - - // "cumulate" the FaceBound and the OrientedEdge orientation - - Cumulated1 = theFBOri1 ^ theOEOri1; - Cumulated2 = theFBOri2 ^ theOEOri2; - - // the orientation of the OrientedEdges must be opposite - - if (Cumulated1 == Cumulated2) { - ach->AddFail("ERROR: non 2-manifold topology"); - } - } + aSharedEntitiesIt.Next(); + + const Handle (StepShape_OrientedEdge) anOrientedEdge2 = + Handle (StepShape_OrientedEdge)::DownCast (aSharedEntitiesIt.Value()); + const Standard_Boolean aFaceBoundOrientation2 = GetFaceBoundOrientation (anOrientedEdge2, + theShareTool); + const Standard_Boolean anIsCumulated2 = aFaceBoundOrientation2 != anOrientedEdge2->Orientation(); + + // the orientation of the OrientedEdges must be opposite + if (anIsCumulated1 == anIsCumulated2) + { + theMessageTool->AddFail ("ERROR: non 2-manifold topology"); } } - diff --git a/src/RWStepShape/RWStepShape_RWEdgeCurve.hxx b/src/RWStepShape/RWStepShape_RWEdgeCurve.hxx index 69e767325f..6cd8e32430 100644 --- a/src/RWStepShape/RWStepShape_RWEdgeCurve.hxx +++ b/src/RWStepShape/RWStepShape_RWEdgeCurve.hxx @@ -20,8 +20,8 @@ #include #include #include - #include + class StepData_StepReaderData; class Interface_Check; class StepShape_EdgeCurve; @@ -29,47 +29,30 @@ class StepData_StepWriter; class Interface_EntityIterator; class Interface_ShareTool; - //! Read & Write Module for EdgeCurve //! Check added by CKY , 7-OCT-1996 -class RWStepShape_RWEdgeCurve +class RWStepShape_RWEdgeCurve { public: - DEFINE_STANDARD_ALLOC - - Standard_EXPORT RWStepShape_RWEdgeCurve(); - - Standard_EXPORT void ReadStep (const Handle(StepData_StepReaderData)& data, const Standard_Integer num, Handle(Interface_Check)& ach, const Handle(StepShape_EdgeCurve)& ent) const; - - Standard_EXPORT void WriteStep (StepData_StepWriter& SW, const Handle(StepShape_EdgeCurve)& ent) const; - - Standard_EXPORT void Share (const Handle(StepShape_EdgeCurve)& ent, Interface_EntityIterator& iter) const; - - Standard_EXPORT void Check (const Handle(StepShape_EdgeCurve)& ent, const Interface_ShareTool& shares, Handle(Interface_Check)& ach) const; - - - - -protected: - - - - - -private: - +public: + RWStepShape_RWEdgeCurve() = default; + Standard_EXPORT void ReadStep (const Handle (StepData_StepReaderData)& theStepData, + const Standard_Integer theRecordID, + Handle (Interface_Check)& theMessageTool, + const Handle (StepShape_EdgeCurve)& theEdgeCurve) const; + Standard_EXPORT void WriteStep (StepData_StepWriter& theStepWriter, + const Handle (StepShape_EdgeCurve)& theEdgeCurve) const; + Standard_EXPORT void Share (const Handle (StepShape_EdgeCurve)& theEdgeCurve, + Interface_EntityIterator& theSharedEntitiesIt) const; + Standard_EXPORT void Check (const Handle (StepShape_EdgeCurve)& theEdgeCurve, + const Interface_ShareTool& theShareTool, + Handle (Interface_Check)& theMessageTool) const; }; - - - - - - #endif // _RWStepShape_RWEdgeCurve_HeaderFile diff --git a/src/StepToTopoDS/StepToTopoDS_TranslateFace.cxx b/src/StepToTopoDS/StepToTopoDS_TranslateFace.cxx index c33ac4a3bd..1141cc3ce1 100644 --- a/src/StepToTopoDS/StepToTopoDS_TranslateFace.cxx +++ b/src/StepToTopoDS/StepToTopoDS_TranslateFace.cxx @@ -433,264 +433,283 @@ StepToTopoDS_TranslateFace::StepToTopoDS_TranslateFace(const Handle(StepVisual_T // ============================================================================ static inline Standard_Boolean isReversed(const Handle(StepGeom_Surface)& theStepSurf) { - Handle(StepGeom_ToroidalSurface) aStepTorSur; if(theStepSurf->IsKind(STANDARD_TYPE(StepGeom_RectangularTrimmedSurface))) + { return isReversed(Handle(StepGeom_RectangularTrimmedSurface)::DownCast(theStepSurf)->BasisSurface()); - + } else - aStepTorSur = Handle(StepGeom_ToroidalSurface)::DownCast(theStepSurf); - - return (!aStepTorSur.IsNull() && aStepTorSur->MajorRadius() < 0 ? Standard_True : Standard_False); + { + Handle(StepGeom_ToroidalSurface) aStepTorSur = + Handle(StepGeom_ToroidalSurface)::DownCast(theStepSurf); + return !aStepTorSur.IsNull() && aStepTorSur->MajorRadius() < 0.; + } } // ============================================================================ // Method : Init // Purpose : Init with a FaceSurface and a Tool // ============================================================================ -void StepToTopoDS_TranslateFace::Init(const Handle(StepShape_FaceSurface)& FS, - StepToTopoDS_Tool& aTool, - StepToTopoDS_NMTool& NMTool, - const StepData_Factors& theLocalFactors) +void StepToTopoDS_TranslateFace::Init (const Handle (StepShape_FaceSurface)& theFaceSurface, + StepToTopoDS_Tool& theTopoDSTool, + StepToTopoDS_NMTool& theTopoDSToolNM, + const StepData_Factors& theLocalFactors) { done = Standard_True; - if (aTool.IsBound(FS)) { - myResult = TopoDS::Face(aTool.Find(FS)); - myError = StepToTopoDS_TranslateFaceDone; - done = Standard_True; + if (theTopoDSTool.IsBound (theFaceSurface)) + { + myResult = TopoDS::Face (theTopoDSTool.Find (theFaceSurface)); + myError = StepToTopoDS_TranslateFaceDone; + done = Standard_True; return; } - - Handle(Transfer_TransientProcess) TP = aTool.TransientProcess(); - + + // Within a context of this method this object is used for message handling only. + Handle (Transfer_TransientProcess) aMessageHandler = theTopoDSTool.TransientProcess(); + // ---------------------------------------------- // Map the Face Geometry and create a TopoDS_Face // ---------------------------------------------- - Handle(StepGeom_Surface) StepSurf = FS->FaceGeometry(); - - // sln 01.10.2001 BUC61003. If corresponding entity was read with error StepSurface may be NULL. In this case we exit from function - if ( StepSurf.IsNull() ) { - TP->AddFail(StepSurf," Surface has not been created"); + Handle (StepGeom_Surface) aStepGeomSurface = theFaceSurface->FaceGeometry(); + // sln 01.10.2001 BUC61003. If corresponding entity was read with error StepSurface may be NULL. + // In this case we exit from function + if (aStepGeomSurface.IsNull()) + { + aMessageHandler->AddFail (aStepGeomSurface, " Surface has not been created"); myError = StepToTopoDS_TranslateFaceOther; - done = Standard_False; + done = Standard_False; return; } // [BEGIN] Added to process non-manifold topology (ssv; 14.11.2010) - if ( NMTool.IsActive() && NMTool.IsBound(StepSurf) ) { - TopoDS_Shape existingShape = NMTool.Find(StepSurf); + if (theTopoDSToolNM.IsActive() && theTopoDSToolNM.IsBound (aStepGeomSurface)) + { + TopoDS_Shape anExistingShape = theTopoDSToolNM.Find (aStepGeomSurface); // Reverse shape's orientation for the next shell - existingShape.Reverse(); - myResult = existingShape; + anExistingShape.Reverse(); + myResult = anExistingShape; myError = StepToTopoDS_TranslateFaceDone; - done = Standard_True; + done = Standard_True; return; } // [END] Added to process non-manifold topology (ssv; 14.11.2010) - if (StepSurf->IsKind(STANDARD_TYPE(StepGeom_OffsetSurface))) //:d4 abv 12 Mar 98 - TP->AddWarning(StepSurf," Type OffsetSurface is out of scope of AP 214"); - Handle(Geom_Surface) GeomSurf = StepToGeom::MakeSurface (StepSurf, theLocalFactors); - if (GeomSurf.IsNull()) + if (aStepGeomSurface->IsKind (STANDARD_TYPE (StepGeom_OffsetSurface))) //: d4 abv 12 Mar 98 + { + aMessageHandler->AddWarning (aStepGeomSurface, " Type OffsetSurface is out of scope of AP 214"); + } + + Handle (Geom_Surface) aGeomSurface = StepToGeom::MakeSurface (aStepGeomSurface, theLocalFactors); + if (aGeomSurface.IsNull()) { - TP->AddFail(StepSurf," Surface has not been created"); + aMessageHandler->AddFail (aStepGeomSurface, " Surface has not been created"); myError = StepToTopoDS_TranslateFaceOther; - done = Standard_False; + done = Standard_False; return; } + // pdn to force bsplsurf to be periodic - Handle(StepGeom_BSplineSurface) sgbss = Handle(StepGeom_BSplineSurface)::DownCast(StepSurf); - if (!sgbss.IsNull()) { - Handle(Geom_Surface) periodicSurf = ShapeAlgo::AlgoContainer()->ConvertToPeriodic(GeomSurf); - if (!periodicSurf.IsNull()) { - TP->AddWarning(StepSurf, "Surface forced to be periodic"); - GeomSurf = periodicSurf; + if (!Handle (StepGeom_BSplineSurface)::DownCast (aStepGeomSurface).IsNull()) + { + Handle (Geom_Surface) periodicSurf = ShapeAlgo::AlgoContainer()->ConvertToPeriodic ( + aGeomSurface); + if (!periodicSurf.IsNull()) + { + aMessageHandler->AddWarning (aStepGeomSurface, "Surface forced to be periodic"); + aGeomSurface = periodicSurf; } } - - Standard_Boolean sameSenseFace = FS->SameSense(); - //fix for bug 0026376 Solid Works wrote face based on toroidal surface having negative major radius - //seems that such case is interpreted by "Solid Works" and "ProE" as face having reversed orientation. - Standard_Boolean sameSense = (isReversed(StepSurf) ? !sameSenseFace : sameSenseFace); - + // fix for bug 0026376 Solid Works wrote face based on toroidal surface having negative major radius + // seems that such case is interpreted by "Solid Works" and "ProE" as face having reversed orientation. + const Standard_Boolean aSameSense = isReversed (aStepGeomSurface) ? !theFaceSurface->SameSense() + : theFaceSurface->SameSense(); + // -- Statistics -- - aTool.AddContinuity (GeomSurf); - - TopoDS_Face F; - BRep_Builder B; - B.MakeFace ( F, GeomSurf, Precision::Confusion() ); - + theTopoDSTool.AddContinuity (aGeomSurface); + + TopoDS_Face aResultFace; + BRep_Builder aFaceBuilder; + aFaceBuilder.MakeFace (aResultFace, aGeomSurface, Precision::Confusion()); + // ---------------------------------- // Iterate on each FaceBounds (Wires) // ---------------------------------- - Handle(StepShape_FaceBound) FaceBound; - Handle(StepShape_Loop) Loop; - - StepToTopoDS_TranslateVertexLoop myTranVL; - StepToTopoDS_TranslatePolyLoop myTranPL; - StepToTopoDS_TranslateEdgeLoop myTranEdgeLoop; - - Standard_Integer NbBnd = FS->NbBounds(); - - // -- Critere de couture simple (CKY, JAN97) - // surface periodique (typiquement un cylindre) - // 2 face bounds, chacun avec un edge loop d une seule edge - // cette edge est fermee, c-a-d vtx-deb = vtx-fin (pour les deux edges) - // est-ce suffisant (verifier que ce sont deux outer-bounds ... ?? comment ?) - // Alors on peut dire : face a deux bords dont la couture manque - // La couture est entre les deux vertex - - for (Standard_Integer i = 1; i <= NbBnd; i ++) { - -#ifdef OCCT_DEBUG - std::cout << " Processing Wire : " << i << std::endl; -#endif - FaceBound = FS->BoundsValue(i); - Loop = FaceBound->Bound(); - if (Loop.IsNull()) + // - Simple sewing criterion (CKY, Jan97) + // Periodic surface (typically a cylinder) + // 2 face bounds, each with an edge loop from a single edge. + // This edge is closed, c-a-d vertex-begin = vertex-end (for the two edges) + // Is it sufficient (check that these are two outer-bounds... ?? How?) + // Then we can say: face with two edges whose seam is missing + // The seam is between the two vertex + for (Standard_Integer aBoundIndex = 1; aBoundIndex <= theFaceSurface->NbBounds(); ++aBoundIndex) + { + Handle (StepShape_FaceBound) aFaceBound = theFaceSurface->BoundsValue (aBoundIndex); + if (aFaceBound.IsNull()) { continue; } + Handle (StepShape_Loop) aFaceLoop = aFaceBound->Bound(); + if (aFaceLoop.IsNull()) + { + continue; + } + // ------------------------ // The Loop is a VertexLoop // ------------------------ - - if (Loop->IsKind(STANDARD_TYPE(StepShape_VertexLoop))) { -//:S4136 STF.Closed() = Standard_False; -// PROBLEME si SPHERE ou TORE -// Il faudra faire un wire complet, a condition que le point porte sur la face -// En attendant, on ne fait rien - Handle(StepShape_VertexLoop) VL = Handle(StepShape_VertexLoop)::DownCast(Loop); + if (aFaceLoop->IsKind (STANDARD_TYPE (StepShape_VertexLoop))) + { + //: S4136 STF.Closed() = Standard_False; + // PROBLEM if SPHERE or TORE + // It will be necessary to make a complete wire, provided that the point carries on the face + // In the meantime, we do nothing // abv 10.07.00 pr1sy.stp: vertex_loop can be wrong; so just make natural bounds - if (GeomSurf->IsKind (STANDARD_TYPE(Geom_SphericalSurface)) || - GeomSurf->IsKind (STANDARD_TYPE(Geom_BSplineSurface)) || - GeomSurf->IsKind (STANDARD_TYPE(Geom_SurfaceOfRevolution))) + if ((aGeomSurface->IsKind (STANDARD_TYPE (Geom_SphericalSurface)) + || aGeomSurface->IsKind (STANDARD_TYPE (Geom_BSplineSurface)) + || aGeomSurface->IsKind (STANDARD_TYPE (Geom_SurfaceOfRevolution))) + && (theFaceSurface->NbBounds() == 1)) { - - // Modification to create natural bounds for face based on the spherical and Bspline surface and having only one bound represented by Vertex loop was made. - // According to the specification of ISO - 10303 part 42: - // "If the face has only one bound and this is of type vertex_loop, then the interior of the face is the domain of the face_surface.face_geometry. - // In such a case the underlying surface shall be closed (e.g. a spherical_surface.)" - // - natural bounds are applied only in case if VertexLoop is only the one defined face bound. - if (NbBnd == 1) + // Modification to create natural bounds for face based on the spherical and Bspline + // surface and having only one bound represented by Vertex loop was made. + // According to the specification of ISO - 10303 part 42: + // "If the face has only one bound and this is of type vertex_loop, then the interior of + // the face is the domain of the face_surface.face_geometry. In such a case the underlying + // surface shall be closed (e.g. a spherical_surface.)" + // - natural bounds are applied only in case if VertexLoop is only the one defined face bound. + BRepBuilderAPI_MakeFace anAuxiliaryFaceBuilder (aGeomSurface, Precision()); + for (TopoDS_Iterator aFaceIt (anAuxiliaryFaceBuilder); aFaceIt.More(); aFaceIt.Next()) { - BRepBuilderAPI_MakeFace mf(GeomSurf, Precision()); - for (TopoDS_Iterator it(mf); it.More(); it.Next()) - { - B.Add(F, it.Value()); - } - continue; + aFaceBuilder.Add (aResultFace, aFaceIt.Value()); } + continue; } - if (GeomSurf->IsKind(STANDARD_TYPE(Geom_ToroidalSurface))) { - continue; - } - if (GeomSurf->IsKind(STANDARD_TYPE(Geom_Plane))) { - TP->AddWarning(VL, "VertexLoop on plane is ignored"); - continue; //smh : BUC60809 - } - myTranVL.SetPrecision(Precision());//gka - myTranVL.SetMaxTol(MaxTol()); - myTranVL.Init(VL, aTool, NMTool, theLocalFactors); - if (myTranVL.IsDone()) { - B.Add(F, myTranVL.Value()); - } - else { - TP->AddWarning(VL, " a VertexLoop not mapped to TopoDS"); + if (aGeomSurface->IsKind (STANDARD_TYPE (Geom_ToroidalSurface))) + { + continue; + } + + Handle (StepShape_VertexLoop) aVertexLoop = Handle (StepShape_VertexLoop)::DownCast ( + aFaceLoop); + if (aGeomSurface->IsKind (STANDARD_TYPE (Geom_Plane))) + { + aMessageHandler->AddWarning (aVertexLoop, "VertexLoop on plane is ignored"); + continue; // smh : BUC60809 + } + + StepToTopoDS_TranslateVertexLoop aVertexLoopTranslator; + aVertexLoopTranslator.SetPrecision (Precision()); // gka + aVertexLoopTranslator.SetMaxTol (MaxTol()); + aVertexLoopTranslator.Init (aVertexLoop, theTopoDSTool, theTopoDSToolNM, theLocalFactors); + if (aVertexLoopTranslator.IsDone()) + { + aFaceBuilder.Add (aResultFace, aVertexLoopTranslator.Value()); + } + else + { + aMessageHandler->AddWarning (aVertexLoop, " a VertexLoop not mapped to TopoDS"); + } } - } - - // ---------------------- - // The Loop is a PolyLoop - // ---------------------- - else if (Loop->IsKind(STANDARD_TYPE(StepShape_PolyLoop))) { -//:S4136 STF.Closed() = Standard_False; - Handle(StepShape_PolyLoop) PL = Handle(StepShape_PolyLoop)::DownCast(Loop); - F.Orientation ( FS->SameSense() ? TopAbs_FORWARD : TopAbs_REVERSED); - myTranPL.SetPrecision(Precision()); //gka - myTranPL.SetMaxTol(MaxTol()); - myTranPL.Init(PL, aTool, GeomSurf, F, theLocalFactors); - if (myTranPL.IsDone()) { - TopoDS_Wire W = TopoDS::Wire(myTranPL.Value()); - W.Orientation(FaceBound->Orientation() ? TopAbs_FORWARD : TopAbs_REVERSED); - B.Add(F, W); + // ---------------------- + // The Loop is a PolyLoop + // ---------------------- + else if (aFaceLoop->IsKind (STANDARD_TYPE (StepShape_PolyLoop))) + { + Handle (StepShape_PolyLoop) aPolyLoop = Handle (StepShape_PolyLoop)::DownCast (aFaceLoop); + aResultFace.Orientation (theFaceSurface->SameSense() ? TopAbs_FORWARD : TopAbs_REVERSED); + StepToTopoDS_TranslatePolyLoop aPolyLoopTranslator; + aPolyLoopTranslator.SetPrecision (Precision()); // gka + aPolyLoopTranslator.SetMaxTol (MaxTol()); + aPolyLoopTranslator.Init (aPolyLoop, + theTopoDSTool, + aGeomSurface, + aResultFace, + theLocalFactors); + if (aPolyLoopTranslator.IsDone()) + { + TopoDS_Wire aPolyLoopWire = TopoDS::Wire (aPolyLoopTranslator.Value()); + aPolyLoopWire.Orientation (aFaceBound->Orientation() ? TopAbs_FORWARD : TopAbs_REVERSED); + aFaceBuilder.Add (aResultFace, aPolyLoopWire); } - else { - TP->AddWarning(PL, " a PolyLoop not mapped to TopoDS"); + else + { + aMessageHandler->AddWarning (aPolyLoop, " a PolyLoop not mapped to TopoDS"); } } - // ----------------------- // The Loop is an EdgeLoop // ----------------------- - else if (Loop->IsKind(STANDARD_TYPE(StepShape_EdgeLoop))) { - //:S4136 if (STF.Closed()) { - //:S4136 Handle(StepShape_EdgeLoop) EL = - //:S4136 Handle(StepShape_EdgeLoop)::DownCast(FaceBound->Bound()); - //:S4136 if (EL->NbEdgeList() != 1) STF.Closed() = Standard_False; - //:S4136 } - - TopoDS_Wire W; - myTranEdgeLoop.SetPrecision(Precision()); //gka - myTranEdgeLoop.SetMaxTol(MaxTol()); - myTranEdgeLoop.Init(FaceBound, F, GeomSurf, StepSurf, sameSense, aTool, NMTool, theLocalFactors); - - if (myTranEdgeLoop.IsDone()) { - W = TopoDS::Wire(myTranEdgeLoop.Value()); - - // STEP Face_Surface orientation : - // if the topological orientation is opposite to the geometric - // orientation of the surface => the underlying topological - // orientation are not implicitly reversed - // this is the case in CAS.CADE => If the face_surface is reversed, - // the wire orientation has to be explicitly reversed - if (FaceBound->Orientation()) { - // *DTH* if (sameSense || GeomSurf->IsKind(STANDARD_TYPE(Geom_Plane))) - W.Orientation(sameSense ? TopAbs_FORWARD : TopAbs_REVERSED); - } - else { - // *DTH* if (sameSense || GeomSurf->IsKind(STANDARD_TYPE(Geom_Plane))) - W.Orientation(sameSense ? TopAbs_REVERSED : TopAbs_FORWARD); + else if (aFaceLoop->IsKind (STANDARD_TYPE (StepShape_EdgeLoop))) + { + StepToTopoDS_TranslateEdgeLoop anEdgeLoopTranslator; + anEdgeLoopTranslator.SetPrecision (Precision()); // gka + anEdgeLoopTranslator.SetMaxTol (MaxTol()); + anEdgeLoopTranslator.Init (aFaceBound, + aResultFace, + aGeomSurface, + aStepGeomSurface, + aSameSense, + theTopoDSTool, + theTopoDSToolNM, + theLocalFactors); + + if (anEdgeLoopTranslator.IsDone()) + { + TopoDS_Wire anEdgeLoopWire = TopoDS::Wire (anEdgeLoopTranslator.Value()); + + // STEP Face_Surface orientation : + // if the topological orientation is opposite to the geometric + // orientation of the surface => the underlying topological + // orientation are not implicitly reversed + // this is the case in CAS.CADE => If the face_surface is reversed, + // the wire orientation has to be explicitly reversed + if (aFaceBound->Orientation()) + { + anEdgeLoopWire.Orientation (aSameSense ? TopAbs_FORWARD : TopAbs_REVERSED); + } + else + { + anEdgeLoopWire.Orientation (aSameSense ? TopAbs_REVERSED : TopAbs_FORWARD); + } + // ----------------------------- + // The Wire is added to the Face + // ----------------------------- + aFaceBuilder.Add (aResultFace, anEdgeLoopWire); } - // ----------------------------- - // The Wire is added to the Face - // ----------------------------- - B.Add(F, W); - } - else { - // Il y a eu un probleme dans le mapping : On perd la Face - // (facon de parler ...) Pas de moyen aujourd hui de recuperer - // au moins toutes les geometries (Points, Courbes 3D, Surface) - TP->AddFail(Loop, " EdgeLoop not mapped to TopoDS"); - - // CKY JAN-97 : un Wire manque, eh bien on continue quand meme !! - // sauf si OuterBound : la c est quand meme pas bien normal ... - if (FaceBound->IsKind(STANDARD_TYPE(StepShape_FaceOuterBound))) { - TP->AddWarning(FS, "No Outer Bound : Face not done"); + else + { + // There was a problem in the mapping: We lost Face (so to speak...). + // No way today to recover at least all the geometries (Points, 3D Curves, Surface). + aMessageHandler->AddFail (aFaceLoop, " EdgeLoop not mapped to TopoDS"); + + // CKY JAN-97: a Wire is missing, well we continue anyway + // unless OuterBound: that's still not quite normal... + if (aFaceBound->IsKind (STANDARD_TYPE (StepShape_FaceOuterBound))) + { + aMessageHandler->AddWarning (theFaceSurface, "No Outer Bound : Face not done"); + } + continue; } - continue; } - } - else { + else + { // Type not yet implemented or non sens - TP->AddFail(Loop," Type of loop not yet implemented"); -#ifdef OCCT_DEBUG - std::cout << Loop->DynamicType() << std::endl; -#endif + aMessageHandler->AddFail (aFaceLoop, " Type of loop not yet implemented"); continue; } } - F.Orientation ( FS->SameSense() ? TopAbs_FORWARD : TopAbs_REVERSED); - aTool.Bind(FS,F); + aResultFace.Orientation (theFaceSurface->SameSense() ? TopAbs_FORWARD : TopAbs_REVERSED); + theTopoDSTool.Bind (theFaceSurface, aResultFace); // Register face in NM tool (ssv; 14.11.2010) - if ( NMTool.IsActive() ) - NMTool.Bind(StepSurf, F); + if (theTopoDSToolNM.IsActive()) + { + theTopoDSToolNM.Bind (aStepGeomSurface, aResultFace); + } - myResult = F; + myResult = aResultFace; myError = StepToTopoDS_TranslateFaceDone; done = Standard_True; } diff --git a/src/StepToTopoDS/StepToTopoDS_TranslateFace.hxx b/src/StepToTopoDS/StepToTopoDS_TranslateFace.hxx index c58b56745d..af78de0c45 100644 --- a/src/StepToTopoDS/StepToTopoDS_TranslateFace.hxx +++ b/src/StepToTopoDS/StepToTopoDS_TranslateFace.hxx @@ -60,9 +60,9 @@ public: StepToTopoDS_NMTool& theNMTool, const StepData_Factors& theLocalFactors = StepData_Factors()); - Standard_EXPORT void Init (const Handle(StepShape_FaceSurface)& FS, - StepToTopoDS_Tool& T, - StepToTopoDS_NMTool& NMTool, + Standard_EXPORT void Init (const Handle(StepShape_FaceSurface)& theFaceSurface, + StepToTopoDS_Tool& theTopoDSTool, + StepToTopoDS_NMTool& theTopoDSToolNM, const StepData_Factors& theLocalFactors = StepData_Factors()); Standard_EXPORT void Init (const Handle(StepVisual_TessellatedFace)& theTF, diff --git a/tests/bugs/step/bug33665 b/tests/bugs/step/bug33665 new file mode 100644 index 0000000000..b1b20e724d --- /dev/null +++ b/tests/bugs/step/bug33665 @@ -0,0 +1,12 @@ +puts "# =====================================================================" +puts "# 0033665: Data Exchange, Step Import - TransferRoots crashes for" +puts "# invalid STEP files." +puts "# =====================================================================" + +# Step entity #18 is intentionally removed from test file, +# but it is still referenced by other step entities. +# Parsing and root transfer should not cause crash for such invalid file. + +set aFilePath [locate_data_file bug33665.step] +testreadstep "$aFilePath" aShape +checkshape aShape From 495a6a642dbfcebd866a6d6f93b4d9c4efa5b415 Mon Sep 17 00:00:00 2001 From: dpasukhi Date: Sun, 22 Sep 2024 12:33:29 +0000 Subject: [PATCH 613/639] Testing, GitHub - Marking warnings as errors #73 Windows, Linux builds now starts checking the warning. In warning case the job will be failed. MacOS having too much warnings related with sprintf. Linux Clang having a problem with Flex and Bison. TODO: Fix the warnings for MacOS and Linux Clang. --- .github/workflows/build-linux-gcc-x64-dynamic.yml | 4 +++- .github/workflows/build-windows-msvc-x64-dynamic.yml | 12 ++++++------ 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/.github/workflows/build-linux-gcc-x64-dynamic.yml b/.github/workflows/build-linux-gcc-x64-dynamic.yml index 53bd82f65c..d23643ccb5 100644 --- a/.github/workflows/build-linux-gcc-x64-dynamic.yml +++ b/.github/workflows/build-linux-gcc-x64-dynamic.yml @@ -32,7 +32,9 @@ jobs: -D CMAKE_C_COMPILER=gcc \ -D CMAKE_CXX_COMPILER=g++ \ -D USE_FREETYPE=OFF \ - -D CMAKE_BUILD_TYPE=Release .. + -D CMAKE_BUILD_TYPE=Release \ + -D CMAKE_C_FLAGS="-Werror" \ + -D CMAKE_CXX_FLAGS="-Werror" .. - name: Build OCCT run: | diff --git a/.github/workflows/build-windows-msvc-x64-dynamic.yml b/.github/workflows/build-windows-msvc-x64-dynamic.yml index 4e4e8a9922..7cce4fd086 100644 --- a/.github/workflows/build-windows-msvc-x64-dynamic.yml +++ b/.github/workflows/build-windows-msvc-x64-dynamic.yml @@ -34,11 +34,11 @@ jobs: - name: Configure OCCT run: | - mkdir build - cd build - cmake -T host=x64 -D USE_FREETYPE=OFF -D BUILD_MODULE_Draw=OFF -D CMAKE_BUILD_TYPE=Release .. - + mkdir build + cd build + cmake -T host=x64 -D USE_FREETYPE=OFF -D BUILD_MODULE_Draw=OFF -D CMAKE_BUILD_TYPE=Release -D CMAKE_C_FLAGS="/WX" -D CMAKE_CXX_FLAGS="/WX" .. + - name: Build OCCT run: | - cd build - cmake --build . --config Release -- /m + cd build + cmake --build . --config Release -- /m From 539ddf30fb4bab63f981aa8c5b4f7917512079db Mon Sep 17 00:00:00 2001 From: dkulikov Date: Mon, 23 Sep 2024 13:59:28 +0000 Subject: [PATCH 614/639] 0033487: Data Exchange, Step Import - Unresolved reference crashes Fixed crash in STEPConstruct_Styles::GetColors() due to nullptr dereferencing when source step file has missing FILL_AREA_STYLE_COLOUR entities. --- src/STEPConstruct/STEPConstruct_Styles.cxx | 286 +++++++++++++++------ src/STEPConstruct/STEPConstruct_Styles.hxx | 138 +++++----- tests/bugs/step/bug33487 | 37 +++ 3 files changed, 316 insertions(+), 145 deletions(-) create mode 100644 tests/bugs/step/bug33487 diff --git a/src/STEPConstruct/STEPConstruct_Styles.cxx b/src/STEPConstruct/STEPConstruct_Styles.cxx index f1cfe0c417..d2e4069280 100644 --- a/src/STEPConstruct/STEPConstruct_Styles.cxx +++ b/src/STEPConstruct/STEPConstruct_Styles.cxx @@ -71,6 +71,176 @@ #include #include +namespace +{ + //======================================================================= + //function : ProcessAsSurfaceStyleRendering + //purpose : Process StepVisual_SurfaceStyleElementSelect to extract a + // render color and render trnasparency from it. Returns true, + // if theSSES was of type StepVisual_SurfaceStyleRendering + // (even if color and transparency data couldn't be extracted + // for some reason), otherwise returns false. + //======================================================================= + Standard_Boolean ProcessAsSurfaceStyleRendering( + const StepVisual_SurfaceStyleElementSelect& theSSES, + Handle(StepVisual_Colour)& theRenderColour, + Standard_Real& theRenderTransparency) + { + const Handle(StepVisual_SurfaceStyleRendering) aSSR = theSSES.SurfaceStyleRendering(); + if (aSSR.IsNull()) + { + return Standard_False; + } + theRenderColour = aSSR->SurfaceColour(); + theRenderTransparency = 0.0; + const Handle(StepVisual_SurfaceStyleRenderingWithProperties) aSSRWP = + Handle(StepVisual_SurfaceStyleRenderingWithProperties)::DownCast(aSSR); + if (aSSRWP.IsNull()) + { + return Standard_True; + } + const Handle(StepVisual_HArray1OfRenderingPropertiesSelect) aHARP = aSSRWP->Properties(); + if (aHARP.IsNull()) + { + return Standard_True; + } + + for (Standard_Integer aPropIndex = 1; aPropIndex <= aHARP->Length(); ++aPropIndex) + { + const Handle(StepVisual_SurfaceStyleTransparent) aSST = + aHARP->Value(aPropIndex).SurfaceStyleTransparent(); + if (!aSST.IsNull()) + { + theRenderTransparency = aSST->Transparency(); + } + } + return Standard_True; + } + + //======================================================================= + //function : ProcessAsSurfaceStyleBoundary + //purpose : Process StepVisual_SurfaceStyleElementSelect to extract a + // boundary color from it. Returns true, + // if theSSES was of type StepVisual_SurfaceStyleBoundary + // (even if boundary color data couldn't be extracted + // for some reason), otherwise returns false. + //======================================================================= + Standard_Boolean ProcessAsSurfaceStyleBoundary( + const StepVisual_SurfaceStyleElementSelect& theSSES, + Handle(StepVisual_Colour)& theBoundaryColour) + { + const Handle(StepVisual_SurfaceStyleBoundary) aSSB = theSSES.SurfaceStyleBoundary(); + if (aSSB.IsNull()) + { + return Standard_False; + } + const Handle(StepVisual_CurveStyle) aCS = aSSB->StyleOfBoundary(); + if (aCS.IsNull()) + { + return Standard_True; + } + theBoundaryColour = aCS->CurveColour(); + return Standard_True; + } + + //======================================================================= + //function : ProcessAsSurfaceStyleFillArea + //purpose : Process StepVisual_SurfaceStyleElementSelect to extract a + // surface color from it. Doesn't return color for negative + // side. Returns true, if theSSES was of type + // StepVisual_SurfaceStyleFillArea (even if surface color data + // couldn't be extracted or some reason), otherwise returns + // false. + //======================================================================= + Standard_Boolean ProcessAsSurfaceStyleFillArea( + const StepVisual_SurfaceStyleElementSelect& theSSES, + const StepVisual_SurfaceSide theSide, + Handle(StepVisual_Colour)& theSurfaceColour) + { + const Handle(StepVisual_SurfaceStyleFillArea) aSSFA = theSSES.SurfaceStyleFillArea(); + if (aSSFA.IsNull()) + { + return Standard_False; + } + const Handle(StepVisual_FillAreaStyle) aFAS = aSSFA->FillArea(); + if (aFAS.IsNull()) + { + return Standard_True; + } + + for (Standard_Integer aFSSIndex = 1; aFSSIndex <= aFAS->NbFillStyles(); aFSSIndex++) + { + const StepVisual_FillStyleSelect aFSS = aFAS->FillStylesValue(aFSSIndex); + const Handle(StepVisual_FillAreaStyleColour) aFASC = aFSS.FillAreaStyleColour(); + if (!aFASC.IsNull() + // If current surface color is null, we will use negative side color. + // Otherwise negative side color is ignored. + && (theSurfaceColour.IsNull() + || theSide != StepVisual_ssNegative)) //abv 30 Mar 00: trj3_s1-pe.stp + { + theSurfaceColour = aFASC->FillColour(); + } + } + return Standard_True; + } + + //======================================================================= + //function : ProcessAsSurfaceStyleUsage + //purpose : Process StepVisual_PresentationStyleSelect to extract + // following data from it: surface color, boundary color, + // render color, render transparency. Returns true, + // if thePSS was of type StepVisual_SurfaceStyleUsage + // (even if no data at all could be extracted for some reason), + // otherwise returns false. + //======================================================================= + Standard_Boolean ProcessAsSurfaceStyleUsage(const StepVisual_PresentationStyleSelect& thePSS, + Handle(StepVisual_Colour)& theSurfaceColour, + Handle(StepVisual_Colour)& theBoundaryColour, + Handle(StepVisual_Colour)& theRenderColour, + Standard_Real& theRenderTransparency) + { + const Handle(StepVisual_SurfaceStyleUsage) aSSU = thePSS.SurfaceStyleUsage(); + if (aSSU.IsNull()) + { + return Standard_False; + } + + const Handle(StepVisual_SurfaceSideStyle) aSSS = aSSU->Style(); + for (Standard_Integer aSSESIndex = 1; aSSESIndex <= aSSS->NbStyles(); ++aSSESIndex) + { + const StepVisual_SurfaceStyleElementSelect aSSES = aSSS->StylesValue(aSSESIndex); + // SurfaceStyleElementSelect can be of only one of the following types: + // SurfaceStyleFillArea, SurfaceStyleBoundary, SurfaceStyleRendering. + // So we're using && operator to stop as soon as this type is processed. + ProcessAsSurfaceStyleFillArea(aSSES, aSSU->Side(), theSurfaceColour) + || ProcessAsSurfaceStyleBoundary(aSSES, theBoundaryColour) + || ProcessAsSurfaceStyleRendering(aSSES, theRenderColour, theRenderTransparency); + } + return Standard_True; + } + + //======================================================================= + //function : ProcessAsCurveStyle + //purpose : Process StepVisual_PresentationStyleSelect to extract a + // curve color from it. Returns true, + // if thePSS was of type StepVisual_SurfaceStyleRendering + // (even if curve color data couldn't be extracted + // for some reason), otherwise returns false. + //======================================================================= + Standard_Boolean ProcessAsCurveStyle(const StepVisual_PresentationStyleSelect& thePSS, + Handle(StepVisual_Colour)& theCurveColour) + { + const Handle(StepVisual_CurveStyle) aCS = thePSS.CurveStyle(); + if (aCS.IsNull()) + { + return Standard_False; + } + + theCurveColour = aCS->CurveColour(); + return Standard_True; + } +} + //======================================================================= //function : STEPConstruct_Styles //purpose : @@ -590,96 +760,52 @@ Handle(StepVisual_PresentationStyleAssignment) STEPConstruct_Styles::GetColorPSA } return PSA; } - //======================================================================= //function : GetColors -//purpose : -//======================================================================= - -Standard_Boolean STEPConstruct_Styles::GetColors (const Handle(StepVisual_StyledItem) &style, - Handle(StepVisual_Colour) &SurfCol, - Handle(StepVisual_Colour) &BoundCol, - Handle(StepVisual_Colour) &CurveCol, - Handle(StepVisual_Colour) &RenderCol, - Standard_Real& RenderTransp, - Standard_Boolean& IsComponent) const +//purpose : +//======================================================================= +Standard_Boolean STEPConstruct_Styles::GetColors(const Handle(StepVisual_StyledItem)& theStyle, + Handle(StepVisual_Colour)& theSurfaceColour, + Handle(StepVisual_Colour)& theBoundaryColour, + Handle(StepVisual_Colour)& theCurveColour, + Handle(StepVisual_Colour)& theRenderColour, + Standard_Real& theRenderTransparency, + Standard_Boolean& theIsComponent) const { - SurfCol.Nullify(); - BoundCol.Nullify(); - CurveCol.Nullify(); - RenderCol.Nullify(); - + theSurfaceColour.Nullify(); + theBoundaryColour.Nullify(); + theCurveColour.Nullify(); + theRenderColour.Nullify(); + // parse on styles - for(Standard_Integer j=1; j<=style->NbStyles(); j++ ) { - Handle(StepVisual_PresentationStyleAssignment) PSA = style->StylesValue ( j ); - if(PSA.IsNull() || PSA->Styles().IsNull()) continue; - IsComponent = Standard_True; - - for(Standard_Integer k=1; k<=PSA->NbStyles(); k++ ) { - StepVisual_PresentationStyleSelect PSS = PSA->StylesValue(k); - - // try surface_style_usage - Handle(StepVisual_SurfaceStyleUsage) SSU = PSS.SurfaceStyleUsage(); - if( !SSU.IsNull() ) { - Handle(StepVisual_SurfaceSideStyle) SSS = SSU->Style(); - for(Standard_Integer l=1; l<=SSS->NbStyles(); l++ ) { - StepVisual_SurfaceStyleElementSelect SSES = SSS->StylesValue(l); - // try fill color - Handle(StepVisual_SurfaceStyleFillArea) SSFA = SSES.SurfaceStyleFillArea(); - if ( !SSFA.IsNull() ) { - Handle(StepVisual_FillAreaStyle) FAS = SSFA->FillArea(); - if (FAS.IsNull()) - continue; - for ( Standard_Integer m=1; m <= FAS->NbFillStyles(); m++ ) { - StepVisual_FillStyleSelect FSS = FAS->FillStylesValue ( m ); - Handle(StepVisual_FillAreaStyleColour) FASC = FSS.FillAreaStyleColour(); - if ( SurfCol.IsNull() || SSU->Side() != StepVisual_ssNegative ) //abv 30 Mar 00: trj3_s1-pe.stp - SurfCol = FASC->FillColour(); - } - continue; - } - // try boundary color - Handle(StepVisual_SurfaceStyleBoundary) SSB = SSES.SurfaceStyleBoundary(); - if(!SSB.IsNull()) { - Handle(StepVisual_CurveStyle) CS = SSB->StyleOfBoundary(); - if ( ! CS.IsNull() ) BoundCol = CS->CurveColour(); - continue; - } - // try rendering color and transparency - Handle(StepVisual_SurfaceStyleRendering) SSR = SSES.SurfaceStyleRendering(); - if (!SSR.IsNull()) { - RenderCol = SSR->SurfaceColour(); - RenderTransp = 0.0; - Handle(StepVisual_SurfaceStyleRenderingWithProperties) SSRWP = - Handle(StepVisual_SurfaceStyleRenderingWithProperties)::DownCast(SSR); - if (!SSRWP.IsNull()) { - Handle(StepVisual_HArray1OfRenderingPropertiesSelect) HARP = SSRWP->Properties(); - if (!HARP.IsNull()) - { - for (Standard_Integer aPropIndex = 1; aPropIndex <= HARP->Length(); ++aPropIndex) { - Handle(StepVisual_SurfaceStyleTransparent) SST = HARP->Value(aPropIndex).SurfaceStyleTransparent(); - if (!SST.IsNull()) { - RenderTransp = SST->Transparency(); - } - } - } - } - } + for (Standard_Integer aPSAIndex = 1; aPSAIndex <= theStyle->NbStyles(); ++aPSAIndex) + { + const Handle(StepVisual_PresentationStyleAssignment) aPSA = theStyle->StylesValue(aPSAIndex); + if (aPSA.IsNull() || aPSA->Styles().IsNull()) + { + continue; + } + theIsComponent = Standard_True; - } - continue; - } - - // try curve_style - Handle(StepVisual_CurveStyle) CS = PSS.CurveStyle(); - if ( ! CS.IsNull() ) CurveCol = CS->CurveColour(); + for (Standard_Integer aPSSIndex = 1; aPSSIndex <= aPSA->NbStyles(); ++aPSSIndex) + { + const StepVisual_PresentationStyleSelect aPSS = aPSA->StylesValue(aPSSIndex); + // PresentationStyleSelect can be of only one of the following types: + // SurfaceStyleUsage, CurveStyle. + // So we're using && operator to stop as soon as this type is processed. + ProcessAsSurfaceStyleUsage(aPSS, + theSurfaceColour, + theBoundaryColour, + theRenderColour, + theRenderTransparency) + || ProcessAsCurveStyle(aPSS, theCurveColour); } } - return ! SurfCol.IsNull() || ! BoundCol.IsNull() || ! CurveCol.IsNull() || ! RenderCol.IsNull(); + return !theSurfaceColour.IsNull() || !theBoundaryColour.IsNull() || !theCurveColour.IsNull() + || !theRenderColour.IsNull(); } - //======================================================================= //function : EncodeColor //purpose : diff --git a/src/STEPConstruct/STEPConstruct_Styles.hxx b/src/STEPConstruct/STEPConstruct_Styles.hxx index 21a878bef6..f6d207860a 100644 --- a/src/STEPConstruct/STEPConstruct_Styles.hxx +++ b/src/STEPConstruct/STEPConstruct_Styles.hxx @@ -27,6 +27,7 @@ #include #include #include + class XSControl_WorkSession; class StepVisual_StyledItem; class StepRepr_RepresentationItem; @@ -39,7 +40,6 @@ class StepRepr_ProductDefinitionShape; class StepVisual_Colour; class Quantity_Color; - //! Provides a mechanism for reading and writing shape styles //! (such as color) to and from the STEP file //! This tool maintains a list of styles, either taking them @@ -48,135 +48,143 @@ class Quantity_Color; //! Some methods deal with general structures of styles and //! presentations in STEP, but there are methods which deal //! with particular implementation of colors (as described in RP) -class STEPConstruct_Styles : public STEPConstruct_Tool +class STEPConstruct_Styles : public STEPConstruct_Tool { public: - DEFINE_STANDARD_ALLOC - //! Creates an empty tool Standard_EXPORT STEPConstruct_Styles(); - + //! Creates a tool and initializes it Standard_EXPORT STEPConstruct_Styles(const Handle(XSControl_WorkSession)& WS); - + //! Initializes tool; returns True if succeeded - Standard_EXPORT Standard_Boolean Init (const Handle(XSControl_WorkSession)& WS); - + Standard_EXPORT Standard_Boolean Init(const Handle(XSControl_WorkSession)& WS); + //! Returns number of defined styles Standard_EXPORT Standard_Integer NbStyles() const; - + //! Returns style with given index - Standard_EXPORT Handle(StepVisual_StyledItem) Style (const Standard_Integer i) const; + Standard_EXPORT Handle(StepVisual_StyledItem) Style(const Standard_Integer i) const; //! Returns number of override styles Standard_EXPORT Standard_Integer NbRootStyles() const; - + //! Returns override style with given index - Standard_EXPORT Handle(StepVisual_StyledItem) RootStyle (const Standard_Integer i) const; - + Standard_EXPORT Handle(StepVisual_StyledItem) RootStyle(const Standard_Integer i) const; + //! Clears all defined styles and PSA sequence Standard_EXPORT void ClearStyles(); - + //! Adds a style to a sequence - Standard_EXPORT void AddStyle (const Handle(StepVisual_StyledItem)& style); - + Standard_EXPORT void AddStyle(const Handle(StepVisual_StyledItem)& style); + //! Create a style linking giving PSA to the item, and add it to the //! sequence of stored styles. If Override is not Null, then //! the resulting style will be of the subtype OverridingStyledItem. - Standard_EXPORT Handle(StepVisual_StyledItem) AddStyle (const Handle(StepRepr_RepresentationItem)& item, const Handle(StepVisual_PresentationStyleAssignment)& PSA, const Handle(StepVisual_StyledItem)& Override); - + Standard_EXPORT Handle(StepVisual_StyledItem) AddStyle( + const Handle(StepRepr_RepresentationItem)& item, + const Handle(StepVisual_PresentationStyleAssignment)& PSA, + const Handle(StepVisual_StyledItem)& Override); + //! Create a style linking giving PSA to the Shape, and add it to the //! sequence of stored styles. If Override is not Null, then //! the resulting style will be of the subtype OverridingStyledItem. //! The Sape is used to find corresponding STEP entity by call to //! STEPConstruct::FindEntity(), then previous method is called. - Standard_EXPORT Handle(StepVisual_StyledItem) AddStyle (const TopoDS_Shape& Shape, const Handle(StepVisual_PresentationStyleAssignment)& PSA, const Handle(StepVisual_StyledItem)& Override); - + Standard_EXPORT Handle(StepVisual_StyledItem) AddStyle( + const TopoDS_Shape& Shape, + const Handle(StepVisual_PresentationStyleAssignment)& PSA, + const Handle(StepVisual_StyledItem)& Override); + //! Create MDGPR, fill it with all the styles previously defined, //! and add it to the model - Standard_EXPORT Standard_Boolean CreateMDGPR (const Handle(StepRepr_RepresentationContext)& Context, - Handle(StepVisual_MechanicalDesignGeometricPresentationRepresentation)& MDGPR, - Handle(StepData_StepModel)& theStepModel); - + Standard_EXPORT Standard_Boolean + CreateMDGPR(const Handle(StepRepr_RepresentationContext)& Context, + Handle(StepVisual_MechanicalDesignGeometricPresentationRepresentation)& MDGPR, + Handle(StepData_StepModel)& theStepModel); + //! Create MDGPR, fill it with all the styles previously defined, //! and add it to the model //! IMPORTANT: must be null when use for NAUO colors //! initialised only for SHUO case. - Standard_EXPORT Standard_Boolean CreateNAUOSRD (const Handle(StepRepr_RepresentationContext)& Context, const Handle(StepShape_ContextDependentShapeRepresentation)& CDSR, const Handle(StepRepr_ProductDefinitionShape)& initPDS); - + Standard_EXPORT Standard_Boolean + CreateNAUOSRD(const Handle(StepRepr_RepresentationContext)& Context, + const Handle(StepShape_ContextDependentShapeRepresentation)& CDSR, + const Handle(StepRepr_ProductDefinitionShape)& initPDS); + //! Searches the STEP model for the RepresentationContext in which //! given shape is defined. This context (if found) can be used //! then in call to CreateMDGPR() - Standard_EXPORT Handle(StepRepr_RepresentationContext) FindContext (const TopoDS_Shape& Shape) const; - + Standard_EXPORT Handle(StepRepr_RepresentationContext) FindContext( + const TopoDS_Shape& Shape) const; + //! Searches the STEP model for the MDGPR or DM entities //! (which bring styles) and fills sequence of styles Standard_EXPORT Standard_Boolean LoadStyles(); - + //! Searches the STEP model for the INISIBILITY entities //! (which bring styles) and fills out sequence of styles - Standard_EXPORT Standard_Boolean LoadInvisStyles (Handle(TColStd_HSequenceOfTransient)& InvSyles) const; - + Standard_EXPORT Standard_Boolean + LoadInvisStyles(Handle(TColStd_HSequenceOfTransient)& InvSyles) const; + //! Create a PresentationStyleAssignment entity which defines //! two colors (for filling surfaces and curves) //! if isForNAUO true then returns PresentationStyleByContext - Standard_EXPORT Handle(StepVisual_PresentationStyleAssignment) MakeColorPSA (const Handle(StepRepr_RepresentationItem)& item, const Handle(StepVisual_Colour)& SurfCol, const Handle(StepVisual_Colour)& CurveCol, const Handle(StepVisual_Colour) &RenderCol, const Standard_Real RenderTransp, const Standard_Boolean isForNAUO = Standard_False) const; - + Standard_EXPORT Handle(StepVisual_PresentationStyleAssignment) MakeColorPSA( + const Handle(StepRepr_RepresentationItem)& item, + const Handle(StepVisual_Colour)& SurfCol, + const Handle(StepVisual_Colour)& CurveCol, + const Handle(StepVisual_Colour)& RenderCol, + const Standard_Real RenderTransp, + const Standard_Boolean isForNAUO = Standard_False) const; + //! Returns a PresentationStyleAssignment entity which defines //! surface and curve colors as Col. This PSA is either created //! or taken from internal map where all PSAs created by this //! method are remembered. - Standard_EXPORT Handle(StepVisual_PresentationStyleAssignment) GetColorPSA (const Handle(StepRepr_RepresentationItem)& item, const Handle(StepVisual_Colour)& Col); - + Standard_EXPORT Handle(StepVisual_PresentationStyleAssignment) GetColorPSA( + const Handle(StepRepr_RepresentationItem)& item, + const Handle(StepVisual_Colour)& Col); + //! Extract color definitions from the style entity //! For each type of color supported, result can be either //! NULL if it is not defined by that style, or last //! definition (if they are 1 or more) - Standard_EXPORT Standard_Boolean GetColors (const Handle(StepVisual_StyledItem)& style, Handle(StepVisual_Colour)& SurfCol, Handle(StepVisual_Colour)& BoundCol, Handle(StepVisual_Colour)& CurveCol, Handle(StepVisual_Colour)& RenderCol, Standard_Real& RenderTransp, Standard_Boolean& IsComponent) const; - + Standard_EXPORT Standard_Boolean GetColors(const Handle(StepVisual_StyledItem)& theStyle, + Handle(StepVisual_Colour)& theSurfaceColour, + Handle(StepVisual_Colour)& theBoundaryColour, + Handle(StepVisual_Colour)& theCurveColour, + Handle(StepVisual_Colour)& theRenderColour, + Standard_Real& theRenderTransparency, + Standard_Boolean& theIsComponent) const; + //! Create STEP color entity by given Quantity_Color //! The analysis is performed for whether the color corresponds to //! one of standard colors predefined in STEP. In that case, //! PredefinedColour entity is created instead of RGBColour - Standard_EXPORT static Handle(StepVisual_Colour) EncodeColor (const Quantity_Color& Col); - + Standard_EXPORT static Handle(StepVisual_Colour) EncodeColor(const Quantity_Color& Col); + //! Create STEP color entity by given Quantity_Color //! The analysis is performed for whether the color corresponds to //! one of standard colors predefined in STEP. In that case, //! PredefinedColour entity is created instead of RGBColour - Standard_EXPORT static Handle(StepVisual_Colour) EncodeColor (const Quantity_Color& Col, STEPConstruct_DataMapOfAsciiStringTransient& DPDCs, STEPConstruct_DataMapOfPointTransient& ColRGBs); - + Standard_EXPORT static Handle(StepVisual_Colour) EncodeColor( + const Quantity_Color& Col, + STEPConstruct_DataMapOfAsciiStringTransient& DPDCs, + STEPConstruct_DataMapOfPointTransient& ColRGBs); + //! Decodes STEP color and fills the Quantity_Color. //! Returns True if OK or False if color is not recognized - Standard_EXPORT static Standard_Boolean DecodeColor (const Handle(StepVisual_Colour)& Colour, Quantity_Color& Col); - - - - -protected: - - - - + Standard_EXPORT static Standard_Boolean DecodeColor(const Handle(StepVisual_Colour)& Colour, + Quantity_Color& Col); private: - - - TColStd_IndexedDataMapOfTransientTransient myMapOfStyles; - TColStd_IndexedMapOfTransient myStyles; - TColStd_IndexedMapOfTransient myRootStyles; - TColStd_SequenceOfTransient myPSA; - - + TColStd_IndexedMapOfTransient myStyles; + TColStd_IndexedMapOfTransient myRootStyles; + TColStd_SequenceOfTransient myPSA; }; - - - - - - #endif // _STEPConstruct_Styles_HeaderFile diff --git a/tests/bugs/step/bug33487 b/tests/bugs/step/bug33487 new file mode 100644 index 0000000000..534f56162a --- /dev/null +++ b/tests/bugs/step/bug33487 @@ -0,0 +1,37 @@ +puts "# =====================================================================" +puts "# 0033487: Data Exchange, Step Import - Unresolved reference crashes" +puts "# =====================================================================" + +# This test checks if crash happens when reading step file with missing +# FILL_AREA_STYLE_COLOUR entities. + +# Read original file as plain text. +set aSourceFilePath [locate_data_file trj6_as1-hc-214.stp] +set aSourceFileChannel [open $aSourceFilePath r] +set aSourceTextData [read $aSourceFileChannel] +close $aSourceFileChannel + +# Create a 'broken' text data for step file by removing all FILL_AREA_STYLE_COLOUR entities. +set aBrokenStepTextData "" +set aToRemove "FILL_AREA_STYLE_COLOUR" +set aSourceFileLines [split $aSourceTextData ";"] +foreach aCurrentLine $aSourceFileLines { + if {[string first $aToRemove $aCurrentLine] == -1} { + # Add all strings from source file, except for strings that contain FILL_AREA_STYLE_COLOUR, + # to the new file. + append aBrokenStepTextData $aCurrentLine ";" + } +} + +# Write 'broken' plain text data into temporary step file. +set aTmpFilePath "$imagedir/${casename}.stp" +set aTmpFileChannel [open $aTmpFilePath w] +puts $aTmpFileChannel $aBrokenStepTextData +close $aTmpFileChannel + +# Read temporary file and delete it. +# If something is wrong with step reader, crash will occur while executing ReadFile command. +# If step reader works correctly, we expect just 'Unresolved Reference' message. +puts {REQUIRED All: ERR StepReaderData : Unresolved Reference : Fails Count : 39} +ReadFile aDoc $aTmpFilePath +file delete $aTmpFilePath From 5c454ed695c0721bb22bdd5f48f1c57c53a95769 Mon Sep 17 00:00:00 2001 From: dpasukhi Date: Sun, 22 Sep 2024 17:48:43 +0000 Subject: [PATCH 615/639] 0033723: Configuration - Removing Genproj and Update files Cleaning repo from not maintaining functionality - genproj and wok Only 'gendoc' functionality kept. TODO: migrate gendoc to cmake --- adm/.gitignore | 1 - adm/CMPLRS | 18 - adm/genconf.tcl | 748 ----- adm/genconfdeps.tcl | 1556 ----------- adm/genproj.tcl | 3617 ------------------------- adm/svgdiff.bat | 31 - adm/templates/template.plist | 22 - adm/templates/template.vc10 | 278 -- adm/templates/template.vc10x | 259 -- adm/templates/template.vc7 | 160 -- adm/templates/template.vc7x | 152 -- adm/templates/template.vc8 | 428 --- adm/templates/template.vc8x | 413 --- adm/templates/template.vc9 | 419 --- adm/templates/template.vc9x | 400 --- adm/templates/template.xcscheme | 58 - adm/templates/template_dll.rc | 30 - adm/templates/vcproj.user.vc9x | 41 - adm/templates/vcxproj.user.vc10x | 23 - adm/templates/xcode.sh | 8 - adm/upgrade.dat | 1012 ------- adm/upgrade.tcl | 1405 ---------- adm/upgrade_sample_orig.dat | 67 - dox/build/build_occt/building_occt.md | 122 - genconf | 15 - genconf.bat | 58 - genproj | 47 - genproj.bat | 58 - upgrade.bat | 23 - 29 files changed, 11469 deletions(-) delete mode 100644 adm/.gitignore delete mode 100644 adm/CMPLRS delete mode 100644 adm/genconf.tcl delete mode 100644 adm/genconfdeps.tcl delete mode 100644 adm/genproj.tcl delete mode 100644 adm/svgdiff.bat delete mode 100644 adm/templates/template.plist delete mode 100644 adm/templates/template.vc10 delete mode 100644 adm/templates/template.vc10x delete mode 100644 adm/templates/template.vc7 delete mode 100644 adm/templates/template.vc7x delete mode 100644 adm/templates/template.vc8 delete mode 100644 adm/templates/template.vc8x delete mode 100644 adm/templates/template.vc9 delete mode 100644 adm/templates/template.vc9x delete mode 100644 adm/templates/template.xcscheme delete mode 100644 adm/templates/template_dll.rc delete mode 100644 adm/templates/vcproj.user.vc9x delete mode 100644 adm/templates/vcxproj.user.vc10x delete mode 100755 adm/templates/xcode.sh delete mode 100644 adm/upgrade.dat delete mode 100644 adm/upgrade.tcl delete mode 100644 adm/upgrade_sample_orig.dat delete mode 100755 genconf delete mode 100644 genconf.bat delete mode 100755 genproj delete mode 100644 genproj.bat delete mode 100644 upgrade.bat diff --git a/adm/.gitignore b/adm/.gitignore deleted file mode 100644 index 1aaaf52ff1..0000000000 --- a/adm/.gitignore +++ /dev/null @@ -1 +0,0 @@ -/build-* diff --git a/adm/CMPLRS b/adm/CMPLRS deleted file mode 100644 index cc38dddbc2..0000000000 --- a/adm/CMPLRS +++ /dev/null @@ -1,18 +0,0 @@ -wnt WOKSteps_exec_link DRAWEXE #WOKStep_EXELink(exec.tks) -lin WOKSteps_exec_link DRAWEXE #WOKStep_EXELink(exec.tks) - -wnt cmplrs_cxx f -D_CRT_SECURE_NO_DEPRECATE -DHAVE_FREEIMAGE -DHAVE_TBB -DHAVE_OPENCL -wnt cmplrs_cxx b -D_CRT_SECURE_NO_DEPRECATE -DHAVE_FREEIMAGE -DHAVE_TBB -DHAVE_OPENCL -wnt cmplrs_cxx Aspect (wnt cmplrs_cxx b) -D_AFXDLL -wnt cmplrs_cxx (wnt cmplrs_cxx b) -D_AFXDLL -D_AFXDLL - -wnt cmplrs_c f -D_CRT_SECURE_NO_DEPRECATE -DHAVE_FREEIMAGE -DHAVE_TBB -DHAVE_OPENCL -wnt cmplrs_c b -D_CRT_SECURE_NO_DEPRECATE -DHAVE_FREEIMAGE -DHAVE_TBB -DHAVE_OPENCL -wnt cmplrs_c NIS (wnt cmplrs_c b) -DSILGL -DSILGL_VRS=50 - -lin cmplrs_cxx f -DOCC_CONVERT_SIGNALS -D_GNU_SOURCE=1 -DHAVE_FREEIMAGE -DHAVE_TBB -DHAVE_OPENCL -lin cmplrs_cxx b -DOCC_CONVERT_SIGNALS -D_GNU_SOURCE=1 -DHAVE_FREEIMAGE -DHAVE_TBB -DHAVE_OPENCL - -lin cmplrs_c f -D_GNU_SOURCE=1 -fexceptions -lin cmplrs_c b -D_GNU_SOURCE=1 -fexceptions - diff --git a/adm/genconf.tcl b/adm/genconf.tcl deleted file mode 100644 index 6fa37c8469..0000000000 --- a/adm/genconf.tcl +++ /dev/null @@ -1,748 +0,0 @@ -#!/usr/bin/tclsh - -# ======================================================================= -# Created on: 2012-01-26 -# Created by: Kirill GAVRILOV -# Copyright (c) 2012 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. - -# ======================================================================= -# GUI procedure for search of third-party tools and generation of environment -# customization script -# ======================================================================= - -# load tools -source [file join [file dirname [info script]] genconfdeps.tcl] - -# proxy variable for implicit file path normalization -set PRODUCTS_PATH_INPUT "$::PRODUCTS_PATH" - -package require Tk - -set aRowIter 0 -set aCheckRowIter 0 -frame .myFrame -padx 5 -pady 5 -pack .myFrame -fill both -expand 1 -frame .myFrame.myPrjFrame -frame .myFrame.myVsFrame -frame .myFrame.myHxxChecks -frame .myFrame.myChecks - -# project file format -set SYS_PRJFMT_LIST {} -set SYS_PRJNAME_LIST {} -if { "$::tcl_platform(platform)" == "windows" } { - lappend ::SYS_PRJFMT_LIST "vcxproj" - lappend ::SYS_PRJNAME_LIST "Visual Studio (.vcxproj)" -} -if { "$tcl_platform(os)" == "Darwin" } { - lappend ::SYS_PRJFMT_LIST "xcd" - lappend ::SYS_PRJNAME_LIST "XCode (.xcd)" -} -lappend ::SYS_PRJFMT_LIST "cbp" -lappend ::SYS_PRJNAME_LIST "Code Blocks (.cbp)" -lappend ::SYS_PRJFMT_LIST "pro" -lappend ::SYS_PRJNAME_LIST "Qt Creator (.pro)" - -set aPrjIndex [lsearch $::SYS_PRJFMT_LIST $::PRJFMT] -set ::PRJNAME [lindex $::SYS_PRJNAME_LIST $aPrjIndex] -set ::CONFIG "Release" - -set SYS_VS_LIST {} -set SYS_VC_LIST {} -set SYS_VCVARS_LIST {} - -# detect installed Visual Studio 2017+ instances by running vswhere.exe -if { ! [catch {exec vswhere.exe -version "\[15.0,15.99\]" -latest -requires Microsoft.VisualStudio.Workload.NativeDesktop -property installationPath} res] && "$res" != "" } { - lappend ::SYS_VS_LIST "Visual Studio 2017 (15, toolset v141)" - lappend ::SYS_VC_LIST "vc141" - lappend ::SYS_VCVARS_LIST "$res\\VC\\Auxiliary\\Build\\vcvarsall.bat" -} -if { ! [catch {exec vswhere.exe -version "\[15.0,15.99\]" -latest -requires Microsoft.VisualStudio.Workload.Universal -property installationPath} res] && "$res" != "" } { - lappend ::SYS_VS_LIST "Visual Studio 2017 (15, toolset v141) UWP" - lappend ::SYS_VC_LIST "vc141-uwp" - lappend ::SYS_VCVARS_LIST "$res\\VC\\Auxiliary\\Build\\vcvarsall.bat" -} -if { ! [catch {exec vswhere.exe -version "\[16.0,16.99\]" -latest -requires Microsoft.VisualStudio.Workload.NativeDesktop -property installationPath} res] && "$res" != "" } { - lappend ::SYS_VS_LIST "Visual Studio 2019 (16, toolset v142)" - lappend ::SYS_VC_LIST "vc142" - lappend ::SYS_VCVARS_LIST "$res\\VC\\Auxiliary\\Build\\vcvarsall.bat" -} -if { ! [catch {exec vswhere.exe -version "\[16.0,16.99\]" -latest -requires Microsoft.VisualStudio.Workload.Universal -property installationPath} res] && "$res" != "" } { - lappend ::SYS_VS_LIST "Visual Studio 2019 (16, toolset v142) UWP" - lappend ::SYS_VC_LIST "vc142-uwp" - lappend ::SYS_VCVARS_LIST "$res\\VC\\Auxiliary\\Build\\vcvarsall.bat" -} -if { ! [catch {exec vswhere.exe -version "\[16.0,16.99\]" -latest -requires Microsoft.VisualStudio.Component.VC.ClangCL -property installationPath} res] && "$res" != "" } { - lappend ::SYS_VS_LIST "Visual Studio 2019 (16, toolset ClangCL)" - lappend ::SYS_VC_LIST "vclang" - lappend ::SYS_VCVARS_LIST "$res\\VC\Auxiliary\\Build\\vcvarsall.bat" -} -if { ! [catch {exec vswhere.exe -version "\[17.0,17.99\]" -latest -requires Microsoft.VisualStudio.Workload.NativeDesktop -property installationPath} res] && "$res" != "" } { - lappend ::SYS_VS_LIST "Visual Studio 2022 (17, toolset v143)" - lappend ::SYS_VC_LIST "vc143" - lappend ::SYS_VCVARS_LIST "$res\\VC\\Auxiliary\\Build\\vcvarsall.bat" -} -if { ! [catch {exec vswhere.exe -version "\[17.0,17.99\]" -latest -requires Microsoft.VisualStudio.Workload.Universal -property installationPath} res] && "$res" != "" } { - lappend ::SYS_VS_LIST "Visual Studio 2022 (17, toolset v143) UWP" - lappend ::SYS_VC_LIST "vc143-uwp" - lappend ::SYS_VCVARS_LIST "$res\\VC\\Auxiliary\\Build\\vcvarsall.bat" -} -if { ! [catch {exec vswhere.exe -version "\[17.0,17.99\]" -latest -requires Microsoft.VisualStudio.Component.VC.ClangCL -property installationPath} res] && "$res" != "" } { - lappend ::SYS_VS_LIST "Visual Studio 2022 (17, toolset ClangCL)" - lappend ::SYS_VC_LIST "vclang" - lappend ::SYS_VCVARS_LIST "$res\\VC\\Auxiliary\\Build\\vcvarsall.bat" -} - -# detect installed Visual Studio instances from global environment -if { [info exists ::env(VS140COMNTOOLS)] } { - lappend ::SYS_VS_LIST "Visual Studio 2015 (14, toolset v140)" - lappend ::SYS_VC_LIST "vc14" - lappend ::SYS_VCVARS_LIST "%VS140COMNTOOLS%..\\..\\VC\\vcvarsall.bat" - - lappend ::SYS_VS_LIST "Visual Studio 2015 (14, toolset v140) UWP" - lappend ::SYS_VC_LIST "vc14-uwp" - lappend ::SYS_VCVARS_LIST "%VS140COMNTOOLS%..\\..\\VC\\vcvarsall.bat" -} -if { [info exists ::env(VS120COMNTOOLS)] } { - lappend ::SYS_VS_LIST "Visual Studio 2013 (12, toolset v120)" - lappend ::SYS_VC_LIST "vc12" - lappend ::SYS_VCVARS_LIST "%VS120COMNTOOLS%..\\..\\VC\\vcvarsall.bat" -} -if { [info exists ::env(VS110COMNTOOLS)] } { - lappend ::SYS_VS_LIST "Visual Studio 2012 (11, toolset v110)" - lappend ::SYS_VC_LIST "vc11" - lappend ::SYS_VCVARS_LIST "%VS110COMNTOOLS%..\\..\\VC\\vcvarsall.bat" -} -if { [info exists ::env(VS100COMNTOOLS)] } { - lappend ::SYS_VS_LIST "Visual Studio 2010 (10, toolset v100)" - lappend ::SYS_VC_LIST "vc10" - lappend ::SYS_VCVARS_LIST "%VS100COMNTOOLS%..\\..\\VC\\vcvarsall.bat" -} -if { [info exists ::env(VS90COMNTOOLS)] } { - lappend ::SYS_VS_LIST "Visual Studio 2008 (9, toolset v90)" - lappend ::SYS_VC_LIST "vc9" - lappend ::SYS_VCVARS_LIST "%VS90COMNTOOLS%..\\..\\VC\\vcvarsall.bat" -} -if { [info exists ::env(VS80COMNTOOLS)] } { - lappend ::SYS_VS_LIST "Visual Studio 2005 (8, toolset v80)" - lappend ::SYS_VC_LIST "vc8" - lappend ::SYS_VCVARS_LIST "%VS80COMNTOOLS%..\\..\\VC\\vcvarsall.bat" -} -lappend ::SYS_VS_LIST "Custom" -lappend ::SYS_VC_LIST "vcX" -lappend ::SYS_VCVARS_LIST "%VSXXCOMNTOOLS%..\\..\\VC\\vcvarsall.bat" - -set aVcVerIndex [lsearch $::SYS_VC_LIST $::VCVER] -set ::VSVER [lindex $::SYS_VS_LIST $aVcVerIndex] -if { "$::VCVARS" == "" } { - set ::VCVARS [lindex $::SYS_VCVARS_LIST $aVcVerIndex] -} - -proc wokdep:gui:Close {} { - # if changed ask - exit -} - -proc wokdep:gui:configSuffix {} { - if { "$::CONFIG" == "Debug" } { - return "D" - } - return "" -} - -proc wokdep:gui:SwitchConfig {} { - set ::PRJFMT [lindex $::SYS_PRJFMT_LIST [.myFrame.myPrjFrame.myPrjCombo current]] - set ::VCVER [lindex $::SYS_VC_LIST [.myFrame.myVsFrame.myVsCombo current]] - set ::VCVARS [lindex $::SYS_VCVARS_LIST [.myFrame.myVsFrame.myVsCombo current]] - - set ::CSF_OPT_INC {} - set ::CSF_OPT_LIB32 {} - set ::CSF_OPT_LIB64 {} - set ::CSF_OPT_BIN32 {} - set ::CSF_OPT_BIN64 {} - set ::CSF_OPT_LIB32D {} - set ::CSF_OPT_LIB64D {} - set ::CSF_OPT_BIN32D {} - set ::CSF_OPT_BIN64D {} - wokdep:gui:UpdateList -} - -proc wokdep:gui:SwitchArch {} { - wokdep:gui:Show3264Bitness ::aRowIter - - if { [llength [grid info .myFrame.mySave]] != 0 } { - grid forget .myFrame.mySave .myFrame.myClose - } - - # Bottom section - grid .myFrame.mySave -row $::aRowIter -column 4 -columnspan 2 - grid .myFrame.myClose -row $::aRowIter -column 6 -columnspan 2 -} - -# update label text and visibility -font create wokdep:gui:EmptyFont -size -1 -proc wokdep:gui:SetLabelText {theLabel theText} { - set aFont TkDefaultFont - if { $theText == "" } { - set aFont wokdep:gui:EmptyFont - } - $theLabel configure -text $theText -font $aFont -} - -proc wokdep:gui:UpdateList {} { - set anIncErrs {} - set anLib32Errs {} - set anLib64Errs {} - set anBin32Errs {} - set anBin64Errs {} - wokdep:SearchTclTk anIncErrs anLib32Errs anLib64Errs anBin32Errs anBin64Errs - if { "$::HAVE_FREETYPE" == "true" } { - wokdep:SearchFreeType anIncErrs anLib32Errs anLib64Errs anBin32Errs anBin64Errs - } - wokdep:SearchX11 anIncErrs anLib32Errs anLib64Errs anBin32Errs anBin64Errs - if { "$::HAVE_GLES2" == "true" } { - wokdep:SearchEGL anIncErrs anLib32Errs anLib64Errs anBin32Errs anBin64Errs - wokdep:SearchGLES anIncErrs anLib32Errs anLib64Errs anBin32Errs anBin64Errs - } - if { "$::HAVE_FREEIMAGE" == "true" } { - wokdep:SearchFreeImage anIncErrs anLib32Errs anLib64Errs anBin32Errs anBin64Errs - } - if { "$::HAVE_FFMPEG" == "true" } { - wokdep:SearchFFmpeg anIncErrs anLib32Errs anLib64Errs anBin32Errs anBin64Errs - } - if { "$::HAVE_OPENVR" == "true" } { - wokdep:SearchOpenVR anIncErrs anLib32Errs anLib64Errs anBin32Errs anBin64Errs - } - if { "$::HAVE_TBB" == "true" } { - wokdep:SearchTBB anIncErrs anLib32Errs anLib64Errs anBin32Errs anBin64Errs - } -# if { "$::HAVE_OPENCL" == "true" } { -# wokdep:SearchOpenCL anIncErrs anLib32Errs anLib64Errs anBin32Errs anBin64Errs -# } - if { "$::HAVE_VTK" == "true" } { - wokdep:SearchVTK anIncErrs anLib32Errs anLib64Errs anBin32Errs anBin64Errs - } - - if { "$::HAVE_ZLIB" == "true" } { - set aCheckLib "z" - if { "$::tcl_platform(platform)" == "windows" } { - set aCheckLib "zlib" - } - wokdep:SearchStandardLibrary anIncErrs anLib32Errs anLib64Errs anBin32Errs anBin64Errs "zlib" "zlib.h" "$aCheckLib" {"zlib"} - } - if { "$::HAVE_LIBLZMA" == "true" } { - set aCheckLib "lzma" - if { "$::tcl_platform(platform)" == "windows" } { - set aCheckLib "liblzma" - } - wokdep:SearchStandardLibrary anIncErrs anLib32Errs anLib64Errs anBin32Errs anBin64Errs "liblzma" "lzma.h" "$aCheckLib" {"lzma" "xz"} - } - if { "$::HAVE_E57" == "true" } { - wokdep:SearchStandardLibrary anIncErrs anLib32Errs anLib64Errs anBin32Errs anBin64Errs "e57" "e57/E57Foundation.h" "E57RefImpl" {"e57"} - set aCheckLib "xerces-c" - if { "$::tcl_platform(platform)" == "windows" } { - set aCheckLib "xerces-c_3" - } - wokdep:SearchStandardLibrary anIncErrs anLib32Errs anLib64Errs anBin32Errs anBin64Errs "xerces-c" "xercesc/sax2/XMLReaderFactory.hpp" "$aCheckLib" {"xerces"} - } - if { "$::HAVE_RAPIDJSON" == "true" } { - wokdep:SearchRapidJson anIncErrs anLib32Errs anLib64Errs anBin32Errs anBin64Errs - } - if { "$::HAVE_DRACO" == "true" } { - set aDummy {} - wokdep:SearchStandardLibrary anIncErrs anLib32Errs anLib64Errs aDummy aDummy "draco" "draco/compression/decode.h" "draco" {"draco"} - } - - if {"$::BUILD_Inspector" == "true" } { - set ::CHECK_QT "true" - } - - if { "$::CHECK_QT" == "true" } { - wokdep:SearchQt anIncErrs anLib32Errs anLib64Errs anBin32Errs anBin64Errs - } - - if { "$::CHECK_JDK" == "true" } { - wokdep:SearchJDK anIncErrs anLib32Errs anLib64Errs anBin32Errs anBin64Errs - } - - wokdep:gui:SetLabelText .myFrame.myIncErrLbl [join $anIncErrs "\n"] - - wokdep:gui:SetLabelText .myFrame.myIncErrLbl [join $anIncErrs "\n"] - wokdep:gui:SetLabelText .myFrame.myLib32_ErrLbl [join $anLib32Errs "\n"] - wokdep:gui:SetLabelText .myFrame.myLib64_ErrLbl [join $anLib64Errs "\n"] - wokdep:gui:SetLabelText .myFrame.myBin32_ErrLbl [join $anBin32Errs "\n"] - wokdep:gui:SetLabelText .myFrame.myBin64_ErrLbl [join $anBin64Errs "\n"] - - wokdep:gui:SetLabelText .myFrame.myLib32D_ErrLbl [join $anLib32Errs "\n"] - wokdep:gui:SetLabelText .myFrame.myLib64D_ErrLbl [join $anLib64Errs "\n"] - wokdep:gui:SetLabelText .myFrame.myBin32D_ErrLbl [join $anBin32Errs "\n"] - wokdep:gui:SetLabelText .myFrame.myBin64D_ErrLbl [join $anBin64Errs "\n"] - - # merge duplicates - set ::CSF_OPT_LIB32 [lsort -unique $::CSF_OPT_LIB32] - set ::CSF_OPT_LIB64 [lsort -unique $::CSF_OPT_LIB64] - set ::CSF_OPT_BIN32 [lsort -unique $::CSF_OPT_BIN32] - set ::CSF_OPT_BIN64 [lsort -unique $::CSF_OPT_BIN64] - set ::CSF_OPT_LIB32D [lsort -unique $::CSF_OPT_LIB32D] - set ::CSF_OPT_LIB64D [lsort -unique $::CSF_OPT_LIB64D] - set ::CSF_OPT_BIN32D [lsort -unique $::CSF_OPT_BIN32D] - set ::CSF_OPT_BIN64D [lsort -unique $::CSF_OPT_BIN64D] -} - -proc wokdep:gui:BrowseVcVars {} { - set aResult [tk_chooseDirectory -initialdir $::VCVARS -title "Choose a directory"] - if { "$aResult" != "" } { - set ::VCVARS $aResult - } -} - -proc wokdep:gui:BrowsePartiesRoot {} { - set aResult [tk_chooseDirectory -initialdir $::PRODUCTS_PATH_INPUT -title "Choose a directory"] - if { "$aResult" != "" } { - set ::PRODUCTS_PATH_INPUT $aResult - wokdep:gui:UpdateList - } -} - -proc wokdep:gui:AddIncPath {} { - set aResult [tk_chooseDirectory -title "Choose a directory"] - if { "$aResult" != "" } { - lappend ::CSF_OPT_INC "$aResult" - wokdep:gui:UpdateList - } -} - -proc wokdep:gui:AddLibPath {} { - set aCfg [wokdep:gui:configSuffix] - set aResult [tk_chooseDirectory -title "Choose a directory"] - if { "$aResult" != "" } { - lappend ::CSF_OPT_LIB${::ARCH}${aCfg} "$aResult" - wokdep:gui:UpdateList - } -} - -proc wokdep:gui:AddBinPath {} { - set aCfg [wokdep:gui:configSuffix] - set aResult [tk_chooseDirectory -title "Choose a directory"] - if { "$aResult" != "" } { - lappend ::CSF_OPT_BIN${::ARCH}${aCfg} "$aResult" - wokdep:gui:UpdateList - } -} - -proc wokdep:gui:RemoveIncPath {} { - set aSelIndices [.myFrame.myIncList curselection] - if { [llength $aSelIndices] != 0 } { - .myFrame.myIncList delete [lindex $aSelIndices 0] - } - wokdep:gui:UpdateList -} - -proc wokdep:gui:RemoveLibPath {} { - set aCfg [wokdep:gui:configSuffix] - set aSelIndices [.myFrame.myLib${::ARCH}${aCfg}_List curselection] - if { [llength $aSelIndices] != 0 } { - .myFrame.myLib${::ARCH}${aCfg}_List delete [lindex $aSelIndices 0] - } - wokdep:gui:UpdateList -} - -proc wokdep:gui:RemoveBinPath {} { - set aCfg [wokdep:gui:configSuffix] - set aSelIndices [.myFrame.myBin${::ARCH}${aCfg}_List curselection] - if { [llength $aSelIndices] != 0 } { - .myFrame.myBin${::ARCH}${aCfg}_List delete [lindex $aSelIndices 0] - } - wokdep:gui:UpdateList -} - -proc wokdep:gui:ResetIncPath {} { - set ::CSF_OPT_INC {} - wokdep:gui:UpdateList -} - -proc wokdep:gui:ResetLibPath {} { - set ::CSF_OPT_LIB${::ARCH} {} - set ::CSF_OPT_LIB${::ARCH}D {} - set ::CSF_OPT_BIN${::ARCH} {} - set ::CSF_OPT_BIN${::ARCH}D {} - wokdep:gui:UpdateList -} - -proc wokdep:gui:Show3264Bitness { theRowIter } { - upvar $theRowIter aRowIter - - set aArchOld "" - set aCfg [wokdep:gui:configSuffix] - if { "$::ARCH" == "32" } { - set aArchOld "64" - } else { - set aArchOld "32" - } - - set aCfgOld "D" - if { "$::CONFIG" == "Debug" } { set aCfgOld "" } - set aDelArch ${aArchOld}${aCfg} - if { [llength [grid info .myFrame.myLib${aDelArch}_Lbl]] != 0 } { - grid forget .myFrame.myLib${aDelArch}_Lbl .myFrame.myLib${aDelArch}_List .myFrame.myLib${aDelArch}_Scrl - grid forget .myFrame.myLib${aDelArch}_Add .myFrame.myLib${aDelArch}_Remove .myFrame.myLib${aDelArch}_Clear .myFrame.myLib${aDelArch}_ErrLbl - grid forget .myFrame.myBin${aDelArch}_Lbl .myFrame.myBin${aDelArch}_List .myFrame.myBin${aDelArch}_Scrl - grid forget .myFrame.myBin${aDelArch}_Add .myFrame.myBin${aDelArch}_Remove .myFrame.myBin${aDelArch}_Clear .myFrame.myBin${aDelArch}_ErrLbl - } - set aDelCfg ${::ARCH}${aCfgOld} - if { [llength [grid info .myFrame.myLib${aDelCfg}_Lbl]] != 0 } { - grid forget .myFrame.myLib${aDelCfg}_Lbl .myFrame.myLib${aDelCfg}_List .myFrame.myLib${aDelCfg}_Scrl - grid forget .myFrame.myLib${aDelCfg}_Add .myFrame.myLib${aDelCfg}_Remove .myFrame.myLib${aDelCfg}_Clear .myFrame.myLib${aDelCfg}_ErrLbl - grid forget .myFrame.myBin${aDelCfg}_Lbl .myFrame.myBin${aDelCfg}_List .myFrame.myBin${aDelCfg}_Scrl - grid forget .myFrame.myBin${aDelCfg}_Add .myFrame.myBin${aDelCfg}_Remove .myFrame.myBin${aDelCfg}_Clear .myFrame.myBin${aDelCfg}_ErrLbl - } - - set aNewCfg ${::ARCH}${aCfg} - # Additional libraries search paths - grid .myFrame.myLib${aNewCfg}_Lbl -row $aRowIter -column 0 -columnspan 10 -sticky w - incr aRowIter - grid .myFrame.myLib${aNewCfg}_List -row $aRowIter -column 0 -rowspan 4 -columnspan 5 - grid .myFrame.myLib${aNewCfg}_Scrl -row $aRowIter -column 5 -rowspan 4 - grid .myFrame.myLib${aNewCfg}_Add -row $aRowIter -column 6 - incr aRowIter - #grid .myFrame.myLib${aNewCfg}_Edit -row $aRowIter -column 6 - incr aRowIter - grid .myFrame.myLib${aNewCfg}_Remove -row $aRowIter -column 6 - incr aRowIter - grid .myFrame.myLib${aNewCfg}_Clear -row $aRowIter -column 6 - incr aRowIter - grid .myFrame.myLib${aNewCfg}_ErrLbl -row $aRowIter -column 0 -columnspan 10 -sticky w - incr aRowIter - - # Additional executables search paths - grid .myFrame.myBin${aNewCfg}_Lbl -row $aRowIter -column 0 -columnspan 10 -sticky w - incr aRowIter - grid .myFrame.myBin${aNewCfg}_List -row $aRowIter -column 0 -rowspan 4 -columnspan 5 - grid .myFrame.myBin${aNewCfg}_Scrl -row $aRowIter -column 5 -rowspan 4 - grid .myFrame.myBin${aNewCfg}_Add -row $aRowIter -column 6 - incr aRowIter - #grid .myFrame.myBin${aNewCfg}_Edit -row $aRowIter -column 6 - incr aRowIter - grid .myFrame.myBin${aNewCfg}_Remove -row $aRowIter -column 6 - incr aRowIter - grid .myFrame.myBin${aNewCfg}_Clear -row $aRowIter -column 6 - incr aRowIter - grid .myFrame.myBin${aNewCfg}_ErrLbl -row $aRowIter -column 0 -columnspan 10 -sticky w - incr aRowIter -} - -# Header -ttk::label .myFrame.myPrjFrame.myPrjLbl -text "Project format:" -padding {5 5 20 5} -ttk::combobox .myFrame.myPrjFrame.myPrjCombo -values $SYS_PRJNAME_LIST -state readonly -textvariable PRJNAME -width 40 -ttk::label .myFrame.myVsFrame.myVsLbl -text "Visual Studio configuration:" -padding {5 5 20 5} -ttk::combobox .myFrame.myVsFrame.myVsCombo -values $SYS_VS_LIST -state readonly -textvariable VSVER -width 40 -ttk::combobox .myFrame.myVsFrame.myArchCombo -values { {32} {64} } -textvariable ARCH -state readonly -width 6 -ttk::combobox .myFrame.myVsFrame.myConfigCombo -values { {Release} {Debug} } -textvariable CONFIG -state readonly -width 6 -entry .myFrame.myVcEntry -textvariable VCVER -width 10 -entry .myFrame.myVcVarsEntry -textvariable VCVARS -width 70 -ttk::button .myFrame.myVcBrowseBtn -text "Browse" -command wokdep:gui:BrowseVcVars -ttk::label .myFrame.myHxxChecks.myRelDebInfoLbl -text "Release with Debug info" -checkbutton .myFrame.myHxxChecks.myRelDebInfoCheck -offvalue "false" -onvalue "true" -variable HAVE_RelWithDebInfo - -# -ttk::combobox .myFrame.myHxxChecks.myScutsCombo -values { {ShortCut} {Copy} {HardLink} } -textvariable SHORTCUT_HEADERS -state readonly -width 12 -ttk::label .myFrame.myHxxChecks.myScutsLbl -text "Strategy for filling headers folder inc:" - -# -ttk::label .myFrame.mySrchLbl -text "3rd-parties search path:" -padding {5 5 80 5} -entry .myFrame.mySrchEntry -textvariable PRODUCTS_PATH_INPUT -width 80 -ttk::button .myFrame.mySrchBrowseBtn -text "Browse" -command wokdep:gui:BrowsePartiesRoot -checkbutton .myFrame.myChecks.myFreeTypeCheck -offvalue "false" -onvalue "true" -variable HAVE_FREETYPE -command wokdep:gui:UpdateList -ttk::label .myFrame.myChecks.myFreeTypeLbl -text "Use FreeType" -checkbutton .myFrame.myChecks.myFImageCheck -offvalue "false" -onvalue "true" -variable HAVE_FREEIMAGE -command wokdep:gui:UpdateList -ttk::label .myFrame.myChecks.myFImageLbl -text "Use FreeImage" -checkbutton .myFrame.myChecks.myTbbCheck -offvalue "false" -onvalue "true" -variable HAVE_TBB -command wokdep:gui:UpdateList -ttk::label .myFrame.myChecks.myTbbLbl -text "Use Intel TBB" -checkbutton .myFrame.myChecks.myOpenVrCheck -offvalue "false" -onvalue "true" -variable HAVE_OPENVR -command wokdep:gui:UpdateList -ttk::label .myFrame.myChecks.myOpenVrLbl -text "Use OpenVR" -if { "$::tcl_platform(os)" != "Darwin" } { - checkbutton .myFrame.myChecks.myGlesCheck -offvalue "false" -onvalue "true" -variable HAVE_GLES2 -command wokdep:gui:UpdateList - ttk::label .myFrame.myChecks.myGlesLbl -text "Use OpenGL ES" -} -if { "$::tcl_platform(platform)" == "windows" } { - checkbutton .myFrame.myChecks.myD3dCheck -offvalue "false" -onvalue "true" -variable HAVE_D3D -command wokdep:gui:UpdateList - ttk::label .myFrame.myChecks.myD3dLbl -text "Use Direct3D" -} -checkbutton .myFrame.myChecks.myFFmpegCheck -offvalue "false" -onvalue "true" -variable HAVE_FFMPEG -command wokdep:gui:UpdateList -ttk::label .myFrame.myChecks.myFFmpegLbl -text "Use FFmpeg" -#checkbutton .myFrame.myChecks.myOpenClCheck -offvalue "false" -onvalue "true" -variable HAVE_OPENCL -command wokdep:gui:UpdateList -#ttk::label .myFrame.myChecks.myOpenClLbl -text "Use OpenCL" -checkbutton .myFrame.myChecks.myRapidJsonCheck -offvalue "false" -onvalue "true" -variable HAVE_RAPIDJSON -command wokdep:gui:UpdateList -ttk::label .myFrame.myChecks.myRapidJsonLbl -text "Use RapidJSON" -checkbutton .myFrame.myChecks.myDracoCheck -offvalue "false" -onvalue "true" -variable HAVE_DRACO -command wokdep:gui:UpdateList -ttk::label .myFrame.myChecks.myDracoLbl -text "Use Draco" - -checkbutton .myFrame.myChecks.myXLibCheck -offvalue "false" -onvalue "true" -variable HAVE_XLIB -ttk::label .myFrame.myChecks.myXLibLbl -text "Use X11 for windows drawing" -ttk::label .myFrame.myChecks.myVtkLbl -text "Use VTK" -checkbutton .myFrame.myChecks.myVtkCheck -offvalue "false" -onvalue "true" -variable HAVE_VTK -command wokdep:gui:UpdateList - -checkbutton .myFrame.myChecks.myZLibCheck -offvalue "false" -onvalue "true" -variable HAVE_ZLIB -command wokdep:gui:UpdateList -ttk::label .myFrame.myChecks.myZLibLbl -text "Use zlib" -checkbutton .myFrame.myChecks.myLzmaCheck -offvalue "false" -onvalue "true" -variable HAVE_LIBLZMA -command wokdep:gui:UpdateList -ttk::label .myFrame.myChecks.myLzmaLbl -text "Use liblzma" -checkbutton .myFrame.myChecks.myE57Check -offvalue "false" -onvalue "true" -variable HAVE_E57 -command wokdep:gui:UpdateList -ttk::label .myFrame.myChecks.myE57Lbl -text "Use E57" - -checkbutton .myFrame.myChecks.myQtCheck -offvalue "false" -onvalue "true" -variable CHECK_QT -command wokdep:gui:UpdateList -ttk::label .myFrame.myChecks.myQtLbl -text "Search Qt" -checkbutton .myFrame.myChecks.myJDKCheck -offvalue "false" -onvalue "true" -variable CHECK_JDK -command wokdep:gui:UpdateList -ttk::label .myFrame.myChecks.myJDKLbl -text "Search JDK" - -if { "$::tcl_platform(platform)" == "windows" } { - checkbutton .myFrame.myChecks.myInspectorBuild -offvalue "false" -onvalue "true" -variable BUILD_Inspector -command wokdep:gui:UpdateList - ttk::label .myFrame.myChecks.myInspectorLbl -text "Build Inspector" -} - -# Additional headers search paths -ttk::label .myFrame.myIncLbl -text "Additional headers search paths:" -padding {5 5 80 5} -scrollbar .myFrame.myIncScrl -command ".myFrame.myIncList yview" -listbox .myFrame.myIncList -listvariable CSF_OPT_INC -width 80 -height 5 -yscrollcommand ".myFrame.myIncScrl set" -ttk::button .myFrame.myIncAdd -text "Add" -command wokdep:gui:AddIncPath -ttk::button .myFrame.myIncEdit -text "Edit" -ttk::button .myFrame.myIncRemove -text "Remove" -command wokdep:gui:RemoveIncPath -ttk::button .myFrame.myIncClear -text "Reset" -command wokdep:gui:ResetIncPath -ttk::label .myFrame.myIncErrLbl -text "Error: " -foreground red -padding {5 5 5 5} - -# Additional libraries (32-bit) search paths -ttk::label .myFrame.myLib32_Lbl -text "Additional libraries (32-bit) search paths:" -padding {5 5 80 5} -scrollbar .myFrame.myLib32_Scrl -command ".myFrame.myLib32_List yview" -listbox .myFrame.myLib32_List -listvariable CSF_OPT_LIB32 -width 80 -height 5 -yscrollcommand ".myFrame.myLib32_Scrl set" -ttk::button .myFrame.myLib32_Add -text "Add" -command wokdep:gui:AddLibPath -ttk::button .myFrame.myLib32_Edit -text "Edit" -ttk::button .myFrame.myLib32_Remove -text "Remove" -command wokdep:gui:RemoveLibPath -ttk::button .myFrame.myLib32_Clear -text "Reset" -command wokdep:gui:ResetLibPath -ttk::label .myFrame.myLib32_ErrLbl -text "Error: " -foreground red -padding {5 5 5 5} - -# Additional debug libraries (32-bit) search paths -ttk::label .myFrame.myLib32D_Lbl -text "Additional debug libraries (32-bit) search paths:" -padding {5 5 80 5} -scrollbar .myFrame.myLib32D_Scrl -command ".myFrame.myLib32D_List yview" -listbox .myFrame.myLib32D_List -listvariable CSF_OPT_LIB32D -width 80 -height 5 -yscrollcommand ".myFrame.myLib32D_Scrl set" -ttk::button .myFrame.myLib32D_Add -text "Add" -command wokdep:gui:AddLibPath -ttk::button .myFrame.myLib32D_Edit -text "Edit" -ttk::button .myFrame.myLib32D_Remove -text "Remove" -command wokdep:gui:RemoveLibPath -ttk::button .myFrame.myLib32D_Clear -text "Reset" -command wokdep:gui:ResetLibPath -ttk::label .myFrame.myLib32D_ErrLbl -text "Error: " -foreground red -padding {5 5 5 5} - -# Additional libraries (64-bit) search paths -ttk::label .myFrame.myLib64_Lbl -text "Additional libraries (64-bit) search paths:" -padding {5 5 80 5} -scrollbar .myFrame.myLib64_Scrl -command ".myFrame.myLib64_List yview" -listbox .myFrame.myLib64_List -listvariable CSF_OPT_LIB64 -width 80 -height 5 -yscrollcommand ".myFrame.myLib64_Scrl set" -ttk::button .myFrame.myLib64_Add -text "Add" -command wokdep:gui:AddLibPath -ttk::button .myFrame.myLib64_Edit -text "Edit" -ttk::button .myFrame.myLib64_Remove -text "Remove" -command wokdep:gui:RemoveLibPath -ttk::button .myFrame.myLib64_Clear -text "Reset" -command wokdep:gui:ResetLibPath -ttk::label .myFrame.myLib64_ErrLbl -text "Error: " -foreground red -padding {5 5 5 5} - -# Additional debug libraries (64-bit) search paths -ttk::label .myFrame.myLib64D_Lbl -text "Additional debug libraries (64-bit) search paths:" -padding {5 5 80 5} -scrollbar .myFrame.myLib64D_Scrl -command ".myFrame.myLib64D_List yview" -listbox .myFrame.myLib64D_List -listvariable CSF_OPT_LIB64D -width 80 -height 5 -yscrollcommand ".myFrame.myLib64D_Scrl set" -ttk::button .myFrame.myLib64D_Add -text "Add" -command wokdep:gui:AddLibPath -ttk::button .myFrame.myLib64D_Edit -text "Edit" -ttk::button .myFrame.myLib64D_Remove -text "Remove" -command wokdep:gui:RemoveLibPath -ttk::button .myFrame.myLib64D_Clear -text "Reset" -command wokdep:gui:ResetLibPath -ttk::label .myFrame.myLib64D_ErrLbl -text "Error: " -foreground red -padding {5 5 5 5} - -# Additional executables (32-bit) search paths -ttk::label .myFrame.myBin32_Lbl -text "Additional executables (32-bit) search paths:" -padding {5 5 80 5} -scrollbar .myFrame.myBin32_Scrl -command ".myFrame.myBin32_List yview" -listbox .myFrame.myBin32_List -listvariable CSF_OPT_BIN32 -width 80 -height 5 -yscrollcommand ".myFrame.myBin32_Scrl set" -ttk::button .myFrame.myBin32_Add -text "Add" -command wokdep:gui:AddBinPath -ttk::button .myFrame.myBin32_Edit -text "Edit" -ttk::button .myFrame.myBin32_Remove -text "Remove" -command wokdep:gui:RemoveBinPath -ttk::button .myFrame.myBin32_Clear -text "Reset" -command wokdep:gui:ResetLibPath -ttk::label .myFrame.myBin32_ErrLbl -text "Error: " -foreground red -padding {5 5 5 5} - -# Additional debug executables (32-bit) search paths -ttk::label .myFrame.myBin32D_Lbl -text "Additional debug executables (32-bit) search paths:" -padding {5 5 80 5} -scrollbar .myFrame.myBin32D_Scrl -command ".myFrame.myBin32D_List yview" -listbox .myFrame.myBin32D_List -listvariable CSF_OPT_BIN32D -width 80 -height 5 -yscrollcommand ".myFrame.myBin32D_Scrl set" -ttk::button .myFrame.myBin32D_Add -text "Add" -command wokdep:gui:AddBinPath -ttk::button .myFrame.myBin32D_Edit -text "Edit" -ttk::button .myFrame.myBin32D_Remove -text "Remove" -command wokdep:gui:RemoveBinPath -ttk::button .myFrame.myBin32D_Clear -text "Reset" -command wokdep:gui:ResetLibPath -ttk::label .myFrame.myBin32D_ErrLbl -text "Error: " -foreground red -padding {5 5 5 5} - -# Additional executables (64-bit) search paths -ttk::label .myFrame.myBin64_Lbl -text "Additional executables (64-bit) search paths:" -padding {5 5 80 5} -scrollbar .myFrame.myBin64_Scrl -command ".myFrame.myBin64_List yview" -listbox .myFrame.myBin64_List -listvariable CSF_OPT_BIN64 -width 80 -height 5 -yscrollcommand ".myFrame.myBin64_Scrl set" -ttk::button .myFrame.myBin64_Add -text "Add" -command wokdep:gui:AddBinPath -ttk::button .myFrame.myBin64_Edit -text "Edit" -ttk::button .myFrame.myBin64_Remove -text "Remove" -command wokdep:gui:RemoveBinPath -ttk::button .myFrame.myBin64_Clear -text "Reset" -command wokdep:gui:ResetLibPath -ttk::label .myFrame.myBin64_ErrLbl -text "Error: " -foreground red -padding {5 5 5 5} - -# Additional debug executables (64-bit) search paths -ttk::label .myFrame.myBin64D_Lbl -text "Additional debug executables (64-bit) search paths:" -padding {5 5 80 5} -scrollbar .myFrame.myBin64D_Scrl -command ".myFrame.myBin64D_List yview" -listbox .myFrame.myBin64D_List -listvariable CSF_OPT_BIN64D -width 80 -height 5 -yscrollcommand ".myFrame.myBin64D_Scrl set" -ttk::button .myFrame.myBin64D_Add -text "Add" -command wokdep:gui:AddBinPath -ttk::button .myFrame.myBin64D_Edit -text "Edit" -ttk::button .myFrame.myBin64D_Remove -text "Remove" -command wokdep:gui:RemoveBinPath -ttk::button .myFrame.myBin64D_Clear -text "Reset" -command wokdep:gui:ResetLibPath -ttk::label .myFrame.myBin64D_ErrLbl -text "Error: " -foreground red -padding {5 5 5 5} - -# Bottom -ttk::button .myFrame.mySave -text "Save" -command wokdep:SaveCustom -ttk::button .myFrame.myClose -text "Close" -command wokdep:gui:Close - -# Create grid -# Header -grid .myFrame.myPrjFrame -row $aRowIter -column 0 -columnspan 10 -sticky w -grid .myFrame.myPrjFrame.myPrjLbl -row 0 -column 0 -grid .myFrame.myPrjFrame.myPrjCombo -row 0 -column 1 -if { "$tcl_platform(platform)" == "windows" } { - incr aRowIter - grid .myFrame.myVsFrame -row $aRowIter -column 0 -columnspan 10 -sticky w - grid .myFrame.myVsFrame.myVsLbl -row 0 -column 0 - grid .myFrame.myVsFrame.myVsCombo -row 0 -column 1 -padx 5 - grid .myFrame.myVsFrame.myArchCombo -row 0 -column 2 - grid .myFrame.myVsFrame.myConfigCombo -row 0 -column 3 - incr aRowIter - grid .myFrame.myVcEntry -row $aRowIter -column 0 - grid .myFrame.myVcVarsEntry -row $aRowIter -column 1 -columnspan 4 -sticky w - grid .myFrame.myVcBrowseBtn -row $aRowIter -column 6 - incr aRowIter -} else { - grid .myFrame.myVsFrame -row $aRowIter -column 4 -sticky w - grid .myFrame.myVsFrame.myConfigCombo -row 0 -column 0 - incr aRowIter -} - -# -grid .myFrame.myHxxChecks -row $aRowIter -column 0 -columnspan 10 -sticky w -grid .myFrame.myHxxChecks.myScutsLbl -row 0 -column 0 -grid .myFrame.myHxxChecks.myScutsCombo -row 0 -column 1 -if { "$tcl_platform(platform)" == "windows" } { - grid .myFrame.myHxxChecks.myRelDebInfoCheck -row 0 -column 2 - grid .myFrame.myHxxChecks.myRelDebInfoLbl -row 0 -column 3 -} -incr aRowIter -# -grid .myFrame.mySrchLbl -row $aRowIter -column 0 -columnspan 10 -sticky w -incr aRowIter -grid .myFrame.mySrchEntry -row $aRowIter -column 0 -columnspan 5 -grid .myFrame.mySrchBrowseBtn -row $aRowIter -column 6 -incr aRowIter - -grid .myFrame.myChecks -row $aRowIter -column 0 -columnspan 10 -sticky w -incr aRowIter -grid .myFrame.myChecks.myFreeTypeCheck -row $aCheckRowIter -column 0 -sticky e -grid .myFrame.myChecks.myFreeTypeLbl -row $aCheckRowIter -column 1 -sticky w -grid .myFrame.myChecks.myRapidJsonCheck -row $aCheckRowIter -column 2 -sticky e -grid .myFrame.myChecks.myRapidJsonLbl -row $aCheckRowIter -column 3 -sticky w -if { "$::tcl_platform(os)" != "Darwin" } { - grid .myFrame.myChecks.myGlesCheck -row $aCheckRowIter -column 4 -sticky e - grid .myFrame.myChecks.myGlesLbl -row $aCheckRowIter -column 5 -sticky w -} -#grid .myFrame.myChecks.myOpenClCheck -row $aCheckRowIter -column 6 -sticky e -#grid .myFrame.myChecks.myOpenClLbl -row $aCheckRowIter -column 7 -sticky w -grid .myFrame.myChecks.myZLibCheck -row $aCheckRowIter -column 6 -sticky e -grid .myFrame.myChecks.myZLibLbl -row $aCheckRowIter -column 7 -sticky w - -grid .myFrame.myChecks.myQtCheck -row $aCheckRowIter -column 12 -sticky e -grid .myFrame.myChecks.myQtLbl -row $aCheckRowIter -column 13 -sticky w - -incr aCheckRowIter -grid .myFrame.myChecks.myFImageCheck -row $aCheckRowIter -column 0 -sticky e -grid .myFrame.myChecks.myFImageLbl -row $aCheckRowIter -column 1 -sticky w -grid .myFrame.myChecks.myDracoCheck -row $aCheckRowIter -column 2 -sticky e -grid .myFrame.myChecks.myDracoLbl -row $aCheckRowIter -column 3 -sticky w - -if { "$::tcl_platform(platform)" == "windows" } { - grid .myFrame.myChecks.myD3dCheck -row $aCheckRowIter -column 4 -sticky e - grid .myFrame.myChecks.myD3dLbl -row $aCheckRowIter -column 5 -sticky w -} else { - grid .myFrame.myChecks.myXLibCheck -row $aCheckRowIter -column 4 -sticky e - grid .myFrame.myChecks.myXLibLbl -row $aCheckRowIter -column 5 -sticky w -} -grid .myFrame.myChecks.myLzmaCheck -row $aCheckRowIter -column 6 -sticky e -grid .myFrame.myChecks.myLzmaLbl -row $aCheckRowIter -column 7 -sticky w -grid .myFrame.myChecks.myJDKCheck -row $aCheckRowIter -column 12 -sticky e -grid .myFrame.myChecks.myJDKLbl -row $aCheckRowIter -column 13 -sticky w - -incr aCheckRowIter -grid .myFrame.myChecks.myFFmpegCheck -row $aCheckRowIter -column 0 -sticky e -grid .myFrame.myChecks.myFFmpegLbl -row $aCheckRowIter -column 1 -sticky w -grid .myFrame.myChecks.myVtkCheck -row $aCheckRowIter -column 2 -sticky e -grid .myFrame.myChecks.myVtkLbl -row $aCheckRowIter -column 3 -sticky w -grid .myFrame.myChecks.myOpenVrCheck -row $aCheckRowIter -column 4 -sticky e -grid .myFrame.myChecks.myOpenVrLbl -row $aCheckRowIter -column 5 -sticky w -grid .myFrame.myChecks.myE57Check -row $aCheckRowIter -column 6 -sticky e -grid .myFrame.myChecks.myE57Lbl -row $aCheckRowIter -column 7 -sticky w - -if { "$::tcl_platform(platform)" == "windows" } { - grid .myFrame.myChecks.myInspectorBuild -row $aCheckRowIter -column 12 -sticky e - grid .myFrame.myChecks.myInspectorLbl -row $aCheckRowIter -column 13 -sticky w -} - -incr aCheckRowIter - -grid .myFrame.myChecks.myTbbCheck -row $aCheckRowIter -column 12 -sticky e -grid .myFrame.myChecks.myTbbLbl -row $aCheckRowIter -column 13 -sticky w - -incr aCheckRowIter - -# Additional headers search paths -grid .myFrame.myIncLbl -row $aRowIter -column 0 -columnspan 10 -sticky w -incr aRowIter -grid .myFrame.myIncList -row $aRowIter -column 0 -rowspan 4 -columnspan 5 -grid .myFrame.myIncScrl -row $aRowIter -column 5 -rowspan 4 -grid .myFrame.myIncAdd -row $aRowIter -column 6 -incr aRowIter -#grid .myFrame.myIncEdit -row $aRowIter -column 6 -incr aRowIter -grid .myFrame.myIncRemove -row $aRowIter -column 6 -incr aRowIter -grid .myFrame.myIncClear -row $aRowIter -column 6 -incr aRowIter -grid .myFrame.myIncErrLbl -row $aRowIter -column 0 -columnspan 10 -sticky w -incr aRowIter - -# Additional search paths -wokdep:gui:Show3264Bitness aRowIter - -# Bottom section -grid .myFrame.mySave -row $aRowIter -column 4 -columnspan 2 -grid .myFrame.myClose -row $aRowIter -column 6 -columnspan 2 - -# Bind events -bind .myFrame.myPrjFrame.myPrjCombo <> { - wokdep:gui:SwitchConfig -} -bind .myFrame.myVsFrame.myVsCombo <> { - wokdep:gui:SwitchConfig -} -bind .myFrame.myVsFrame.myArchCombo <> { - wokdep:gui:SwitchArch -} -bind .myFrame.myVsFrame.myConfigCombo <> { - wokdep:gui:SwitchArch -} - -.myFrame.mySrchEntry configure -validate all -validatecommand { - set ::PRODUCTS_PATH [file normalize "$::PRODUCTS_PATH_INPUT"] - #return [file exists "$::PRODUCTS_PATH"] - wokdep:gui:UpdateList - return 1 -} - -wokdep:gui:UpdateList diff --git a/adm/genconfdeps.tcl b/adm/genconfdeps.tcl deleted file mode 100644 index fe99b70dc6..0000000000 --- a/adm/genconfdeps.tcl +++ /dev/null @@ -1,1556 +0,0 @@ -# ======================================================================= -# Created on: 2012-01-26 -# Created by: Kirill GAVRILOV -# Copyright (c) 2012 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. - -# ======================================================================= -# Tools for search of third-party libraries and generation on environment -# customization script -# ======================================================================= - -set ARCH "64" - -if { "$tcl_platform(platform)" == "unix" } { - set SYS_PATH_SPLITTER ":" - set SYS_LIB_PREFIX "lib" - set SYS_EXE_SUFFIX "" - if { "$tcl_platform(os)" == "Darwin" } { - set SYS_LIB_SUFFIX "dylib" - set PRJFMT "xcd" - } else { - set SYS_LIB_SUFFIX "so" - set PRJFMT "cbp" - } - set VCVER "gcc" - set VCVARS "" -} elseif { "$tcl_platform(platform)" == "windows" } { - set SYS_PATH_SPLITTER ";" - set SYS_LIB_PREFIX "" - set SYS_LIB_SUFFIX "lib" - set SYS_EXE_SUFFIX ".exe" - set VCVER "vc10" - set VCVARS "" - set PRJFMT "vcxproj" -} - -set SHORTCUT_HEADERS "ShortCut" - -set PRODUCTS_PATH "" -set CSF_OPT_INC [list] -set CSF_OPT_LIB32 [list] -set CSF_OPT_LIB64 [list] -set CSF_OPT_BIN32 [list] -set CSF_OPT_BIN64 [list] -set CSF_OPT_LIB32D [list] -set CSF_OPT_LIB64D [list] -set CSF_OPT_BIN32D [list] -set CSF_OPT_BIN64D [list] - -if { "$tcl_platform(pointerSize)" == "4" } { - set ARCH "32" -} -if { [info exists ::env(ARCH)] } { - set ARCH "$::env(ARCH)" -} - -if { [info exists ::env(SHORTCUT_HEADERS)] } { - set SHORTCUT_HEADERS "$::env(SHORTCUT_HEADERS)" - if { $SHORTCUT_HEADERS == "true" } { - set SHORTCUT_HEADERS "ShortCut" - } -} - -# fetch environment variables (e.g. set by custom.sh or custom.bat) and set them as tcl variables with the same name -set THE_ENV_VARIABLES { HAVE_TK HAVE_FREETYPE HAVE_FREEIMAGE HAVE_FFMPEG HAVE_TBB HAVE_GLES2 HAVE_D3D HAVE_VTK \ - HAVE_ZLIB HAVE_LIBLZMA HAVE_E57 HAVE_RAPIDJSON HAVE_DRACO HAVE_OPENVR HAVE_OPENCL \ - CHECK_QT4 CHECK_JDK HAVE_XLIB \ - HAVE_RelWithDebInfo BUILD_Inspector } -foreach anEnvIter $THE_ENV_VARIABLES { set ${anEnvIter} "false" } -set HAVE_TK "true" -set HAVE_FREETYPE "true" -if { "$tcl_platform(os)" != "Darwin" } { set HAVE_XLIB "true" } -foreach anEnvIter $THE_ENV_VARIABLES { - if { [info exists ::env(${anEnvIter})] } { - set ${anEnvIter} "$::env(${anEnvIter})" - } -} -# do not export platform-specific variables -if { "$::tcl_platform(os)" == "Darwin" } { - set HAVE_GLES2 "" -} -if { "$tcl_platform(platform)" != "windows" } { - set HAVE_D3D "" - set HAVE_RelWithDebInfo "" -} else { - set HAVE_XLIB "" -} -foreach anEnvIter {ARCH VCVER VCVARS PRJFMT } { - if { [info exists ::env(${anEnvIter})] } { - set ${anEnvIter} "$::env(${anEnvIter})" - } -} -if { [info exists ::env(PRODUCTS_PATH)] } { - set PRODUCTS_PATH [file normalize "$::env(PRODUCTS_PATH)"] -} - -if { [info exists ::env(CSF_OPT_INC)] } { - set CSF_OPT_INC [split "$::env(CSF_OPT_INC)" $::SYS_PATH_SPLITTER] -} -if { [info exists ::env(CSF_OPT_LIB32)] } { - set CSF_OPT_LIB32 [split "$::env(CSF_OPT_LIB32)" $::SYS_PATH_SPLITTER] -} -if { [info exists ::env(CSF_OPT_LIB64)] } { - set CSF_OPT_LIB64 [split "$::env(CSF_OPT_LIB64)" $::SYS_PATH_SPLITTER] -} -if { [info exists ::env(CSF_OPT_BIN32)] } { - set CSF_OPT_BIN32 [split "$::env(CSF_OPT_BIN32)" $::SYS_PATH_SPLITTER] -} -if { [info exists ::env(CSF_OPT_BIN64)] } { - set CSF_OPT_BIN64 [split "$::env(CSF_OPT_BIN64)" $::SYS_PATH_SPLITTER] -} - -if { [info exists ::env(CSF_OPT_LIB32D)] } { - set CSF_OPT_LIB32D [split "$::env(CSF_OPT_LIB32D)" $::SYS_PATH_SPLITTER] - foreach aLibIter $::CSF_OPT_LIB32 { - set aPos [lsearch -exact $::CSF_OPT_LIB32D $aLibIter] - set ::CSF_OPT_LIB32D [lreplace $::CSF_OPT_LIB32D $aPos $aPos] - } -} -if { [info exists ::env(CSF_OPT_LIB64D)] } { - set CSF_OPT_LIB64D [split "$::env(CSF_OPT_LIB64D)" $::SYS_PATH_SPLITTER] - foreach aLibIter $::CSF_OPT_LIB64 { - set aPos [lsearch -exact $::CSF_OPT_LIB64D $aLibIter] - set ::CSF_OPT_LIB64D [lreplace $::CSF_OPT_LIB64D $aPos $aPos] - } -} -if { [info exists ::env(CSF_OPT_BIN32D)] } { - set CSF_OPT_BIN32D [split "$::env(CSF_OPT_BIN32D)" $::SYS_PATH_SPLITTER] - foreach aLibIter $::CSF_OPT_BIN32 { - set aPos [lsearch -exact $::CSF_OPT_BIN32D $aLibIter] - set ::CSF_OPT_BIN32D [lreplace $::CSF_OPT_BIN32D $aPos $aPos] - } -} -if { [info exists ::env(CSF_OPT_BIN64D)] } { - set CSF_OPT_BIN64D [split "$::env(CSF_OPT_BIN64D)" $::SYS_PATH_SPLITTER] - foreach aLibIter $::CSF_OPT_BIN64 { - set aPos [lsearch -exact $::CSF_OPT_BIN64D $aLibIter] - set ::CSF_OPT_BIN64D [lreplace $::CSF_OPT_BIN64D $aPos $aPos] - } -} - -# Search header file in $::CSF_OPT_INC and standard paths -proc wokdep:SearchHeader {theHeader} { - # search in custom paths - foreach anIncPath $::CSF_OPT_INC { - set aPath "${anIncPath}/${theHeader}" - if { [file exists "$aPath"] } { - return "$aPath" - } - } - - # search in system - set aPath "/usr/include/${theHeader}" - if { [file exists "$aPath"] } { - return "$aPath" - } - - if { "$::tcl_platform(os)" == "Linux" } { - if { "$::ARCH" == "64" } { - set aPath "/usr/include/x86_64-linux-gnu/${theHeader}" - if { [file exists "$aPath"] } { - return "$aPath" - } - } else { - set aPath "/usr/include/i386-linux-gnu/${theHeader}" - if { [file exists "$aPath"] } { - return "$aPath" - } - } - } - - return "" -} - -# Search library file in $::CSF_OPT_LIB* and standard paths -proc wokdep:SearchLib {theLib theBitness {theSearchPath ""}} { - if { "$theSearchPath" != "" } { - set aPath "${theSearchPath}/${::SYS_LIB_PREFIX}${theLib}.${::SYS_LIB_SUFFIX}" - set aPath2 "${theSearchPath}/${::SYS_LIB_PREFIX}${theLib}.a" - if { [file exists "$aPath"] } { - return "$aPath" - } elseif { "$::tcl_platform(platform)" != "windows" && [file exists "$aPath2"] } { - return "$aPath2" - } else { - return "" - } - } - - # search in custom paths - foreach aLibPath [set ::CSF_OPT_LIB$theBitness] { - set aPath "${aLibPath}/${::SYS_LIB_PREFIX}${theLib}.${::SYS_LIB_SUFFIX}" - set aPath2 "${aLibPath}/${::SYS_LIB_PREFIX}${theLib}.a" - if { [file exists "$aPath"] } { - return "$aPath" - } elseif { "$::tcl_platform(platform)" != "windows" && [file exists "$aPath2"] } { - return "$aPath2" - } - } - - # search in system - if { "$::ARCH" == "$theBitness"} { - set aPath "/usr/lib/${::SYS_LIB_PREFIX}${theLib}.${::SYS_LIB_SUFFIX}" - set aPath2 "/usr/lib/${::SYS_LIB_PREFIX}${theLib}.a" - if { [file exists "$aPath"] } { - return "$aPath" - } elseif { [file exists "$aPath2"] } { - return "$aPath2" - } - } - - if { "$::tcl_platform(os)" == "Linux" } { - if { "$theBitness" == "64" } { - set aPath "/usr/lib/x86_64-linux-gnu/lib${theLib}.so" - set aPath2 "/usr/lib/x86_64-linux-gnu/lib${theLib}.a" - if { [file exists "$aPath"] } { - return "$aPath" - } elseif { [file exists "$aPath2"] } { - return "$aPath2" - } - } else { - set aPath "/usr/lib/i386-linux-gnu/lib${theLib}.so" - set aPath2 "/usr/lib/i386-linux-gnu/lib${theLib}.a" - if { [file exists "$aPath"] } { - return "$aPath" - } elseif { [file exists "$aPath2"] } { - return "$aPath2" - } - } - } - - return "" -} - -# Search file in $::CSF_OPT_BIN* and standard paths -proc wokdep:SearchBin {theBin theBitness {theSearchPath ""}} { - if { "$theSearchPath" != "" } { - set aPath "${theSearchPath}/${theBin}" - if { [file exists "$aPath"] } { - return "$aPath" - } else { - return "" - } - } - - # search in custom paths - foreach aBinPath [set ::CSF_OPT_BIN$theBitness] { - set aPath "${aBinPath}/${theBin}" - if { [file exists "$aPath"] } { - return "$aPath" - } - } - - # search in system - if { "$::ARCH" == "$theBitness"} { - set aPath "/usr/bin/${theBin}" - if { [file exists "$aPath"] } { - return "$aPath" - } - } - - return "" -} - -# Detect compiler C-runtime version 'vc*' and architecture '32'/'64' -# to determine preferred path. -proc wokdep:Preferred {theList theCmpl theArch} { - if { [llength $theList] == 0 } { - return "" - } - - # keep only two first digits in "vc141" - if { ! [regexp {^vc[0-9][0-9]} $theCmpl aCmpl] } { - if { [regexp {^vclang} $theCmpl] } { - set aCmpl vc14 - } else { - set aCmpl $theCmpl - } - } - - set aShortList {} - foreach aPath $theList { - if { [string first "$aCmpl" "$aPath"] != "-1" } { - lappend aShortList "$aPath" - } - } - - if { [llength $aShortList] == 0 } { - #return [lindex $theList 0] - set aShortList $theList - } - - set aVeryShortList {} - foreach aPath $aShortList { - if { [string first "$theArch" "$aPath"] != "-1" } { - lappend aVeryShortList "$aPath" - } - } - if { [llength $aVeryShortList] == 0 } { - return [lindex [lsort -decreasing $aShortList] 0] - } - - return [lindex [lsort -decreasing $aVeryShortList] 0] -} - -# Search library placement -proc wokdep:SearchStandardLibrary {theErrInc theErrLib32 theErrLib64 theErrBin32 theErrBin64 theName theCheckHeader theCheckLib theCheckFolders} { - upvar $theErrInc anErrInc - upvar $theErrLib32 anErrLib32 - upvar $theErrLib64 anErrLib64 - upvar $theErrBin32 anErrBin32 - upvar $theErrBin64 anErrBin64 - - set isFound "true" - set aHeaderPath [wokdep:SearchHeader "$theCheckHeader"] - if { "$aHeaderPath" == "" } { - set hasHeader false - foreach aFolderIter $theCheckFolders { - set aPath [wokdep:Preferred [glob -nocomplain -directory "$::PRODUCTS_PATH" -type d *{$aFolderIter}*] "$::VCVER" "$::ARCH" ] - if { "$aPath" != "" && [file exists "$aPath/include/$theCheckHeader"] } { - lappend ::CSF_OPT_INC "$aPath/include" - set hasHeader true - break - } - } - if { !$hasHeader } { - lappend anErrInc "Error: '$theCheckHeader' not found ($theName)" - set isFound "false" - } - } - - foreach anArchIter {64 32} { - set aLibPath [wokdep:SearchLib "$theCheckLib" "$anArchIter"] - if { "$aLibPath" == "" } { - set hasLib false - foreach aFolderIter $theCheckFolders { - set aPath [wokdep:Preferred [glob -nocomplain -directory "$::PRODUCTS_PATH" -type d *{$aFolderIter}*] "$::VCVER" "$anArchIter" ] - set aLibPath [wokdep:SearchLib "$theCheckLib" "$anArchIter" "$aPath/lib"] - if { "$aLibPath" != "" } { - lappend ::CSF_OPT_LIB$anArchIter "$aPath/lib" - lappend ::CSF_OPT_BIN$anArchIter "$aPath/bin" - set hasLib true - - set aLibDPath [wokdep:SearchLib "$theCheckLib" "$anArchIter" "$aPath/libd"] - if { "$aLibDPath" != "" } { - lappend ::CSF_OPT_LIB${anArchIter}D "$aPath/libd" - lappend ::CSF_OPT_BIN${anArchIter}D "$aPath/bind" - } - break - } - } - if { !$hasLib } { - lappend anErrLib$anArchIter "Error: '${::SYS_LIB_PREFIX}$theCheckLib.${::SYS_LIB_SUFFIX}' not found ($theName)" - if { "$::ARCH" == "$anArchIter"} { set isFound "false" } - } - } - - if { "$::tcl_platform(platform)" == "windows" } { - set aDllPath [wokdep:SearchBin "$theCheckLib.dll" "$anArchIter"] - if { "$aDllPath" == "" } { - set hasDll false - foreach aFolderIter $theCheckFolders { - set aPath [wokdep:Preferred [glob -nocomplain -directory "$::PRODUCTS_PATH" -type d *{$aFolderIter}*] "$::VCVER" "$anArchIter" ] - set aDllPath [wokdep:SearchBin "$theCheckLib.dll" "$anArchIter" "$aPath/bin"] - if { "$aDllPath" != "" } { - lappend ::CSF_OPT_BIN$anArchIter "$aPath/bin" - set hasDll true - break - } else { - set aDllPath [wokdep:SearchBin "$theCheckLib.dll" "$anArchIter" "$aPath/lib"] - if { "$aDllPath" != "" } { - lappend ::CSF_OPT_BIN$anArchIter "$aPath/lib" - set hasDll true - break - } - } - } - if { !$hasDll } { - lappend anErrBin$anArchIter "Error: '$theCheckLib.dll' not found ($theName)" - if { "$::ARCH" == "$anArchIter"} { set isFound "false" } - } - } - } - } - - return "$isFound" -} - -# Search Tcl/Tk libraries placement -proc wokdep:SearchTclTk {theErrInc theErrLib32 theErrLib64 theErrBin32 theErrBin64} { - upvar $theErrInc anErrInc - upvar $theErrLib32 anErrLib32 - upvar $theErrLib64 anErrLib64 - upvar $theErrBin32 anErrBin32 - upvar $theErrBin64 anErrBin64 - - set tclver_maj 8 - set tclver_min 6 - - set isFound "true" - set aTclHPath [wokdep:SearchHeader "tcl.h"] - set aTkHPath [wokdep:SearchHeader "tk.h"] - if { "$aTclHPath" == "" || "$aTkHPath" == "" } { - if { [file exists "/usr/include/tcl8.6/tcl.h"] - && [file exists "/usr/include/tcl8.6/tk.h" ] } { - lappend ::CSF_OPT_INC "/usr/include/tcl8.6" - set aTclHPath "/usr/include/tcl8.6/tcl.h" - } else { - set aPath [wokdep:Preferred [glob -nocomplain -directory "$::PRODUCTS_PATH" -type d *{tcl}*] "$::VCVER" "$::ARCH" ] - if { "$aPath" != "" && [file exists "$aPath/include/tcl.h"] && [file exists "$aPath/include/tk.h"] } { - lappend ::CSF_OPT_INC "$aPath/include" - set aTclHPath "$aPath/include/tcl.h" - } else { - lappend anErrInc "Error: 'tcl.h' or 'tk.h' not found (Tcl/Tk)" - set isFound "false" - } - } - } - - # detect tcl version by parsing header file - if { $isFound } { - set fh [open $aTclHPath] - set tcl_h [read $fh] - close $fh - regexp {define\s+TCL_MAJOR_VERSION\s+([0-9]+)} $tcl_h dummy tclver_maj - regexp {define\s+TCL_MINOR_VERSION\s+([0-9]+)} $tcl_h dummy tclver_min - } - - if { "$::tcl_platform(platform)" == "windows" } { - set aTclLibName "tcl${tclver_maj}${tclver_min}" - set aTkLibName "tk${tclver_maj}${tclver_min}" - } else { - set aTclLibName "tcl${tclver_maj}.${tclver_min}" - set aTkLibName "tk${tclver_maj}.${tclver_min}" - } - - foreach anArchIter {64 32} { - set aTclLibPath [wokdep:SearchLib "$aTclLibName" "$anArchIter"] - set aTkLibPath [wokdep:SearchLib "$aTkLibName" "$anArchIter"] - if { "$aTclLibPath" == "" || "$aTkLibPath" == "" } { - set aPath [wokdep:Preferred [glob -nocomplain -directory "$::PRODUCTS_PATH" -type d *{tcl}*] "$::VCVER" "$anArchIter" ] - set aTclLibPath [wokdep:SearchLib "$aTclLibName" "$anArchIter" "$aPath/lib"] - set aTkLibPath [wokdep:SearchLib "$aTkLibName" "$anArchIter" "$aPath/lib"] - if { "$aTclLibPath" != "" && "$aTkLibPath" != "" } { - lappend ::CSF_OPT_LIB$anArchIter "$aPath/lib" - } else { - lappend anErrLib$anArchIter "Error: '${::SYS_LIB_PREFIX}${aTclLibName}.${::SYS_LIB_SUFFIX}' or '${::SYS_LIB_PREFIX}${aTkLibName}.${::SYS_LIB_SUFFIX}' not found (Tcl/Tk)" - if { "$::ARCH" == "$anArchIter"} { set isFound "false" } - } - } - - if { "$::tcl_platform(platform)" == "windows" } { - set aTclDllPath [wokdep:SearchBin "${aTclLibName}.dll" "$anArchIter"] - set aTkDllPath [wokdep:SearchBin "${aTkLibName}.dll" "$anArchIter"] - if { "$aTclDllPath" == "" || "$aTkDllPath" == "" } { - set aPath [wokdep:Preferred [glob -nocomplain -directory "$::PRODUCTS_PATH" -type d *{tcl}*] "$::VCVER" "$anArchIter" ] - set aTclDllPath [wokdep:SearchBin "${aTclLibName}.dll" "$anArchIter" "$aPath/bin"] - set aTkDllPath [wokdep:SearchBin "${aTkLibName}.dll" "$anArchIter" "$aPath/bin"] - if { "$aTclDllPath" != "" && "$aTkDllPath" != "" } { - lappend ::CSF_OPT_BIN$anArchIter "$aPath/bin" - } else { - lappend anErrBin$anArchIter "Error: '${aTclLibName}.dll' or '${aTkLibName}.dll' not found (Tcl/Tk)" - if { "$::ARCH" == "$anArchIter"} { set isFound "false" } - } - } - } - } - - return "$isFound" -} - -# Search FreeType library placement -proc wokdep:SearchFreeType {theErrInc theErrLib32 theErrLib64 theErrBin32 theErrBin64} { - upvar $theErrInc anErrInc - upvar $theErrLib32 anErrLib32 - upvar $theErrLib64 anErrLib64 - upvar $theErrBin32 anErrBin32 - upvar $theErrBin64 anErrBin64 - - set isFound "true" - set aFtBuildPath [wokdep:SearchHeader "ft2build.h"] - - if { "$aFtBuildPath" == "" } { - # TODO - use `freetype-config --cflags` instead - set aSysFreeType "/usr/include/freetype2" - if { [file exists "$aSysFreeType/ft2build.h"] } { - lappend ::CSF_OPT_INC "$aSysFreeType" - } elseif { [file exists "$aSysFreeType/freetype2/ft2build.h"] } { - lappend ::CSF_OPT_INC "$aSysFreeType/freetype2" - } else { - set aSysFreeType "/usr/X11/include/freetype2" - if { [file exists "$aSysFreeType/ft2build.h"] } { - lappend ::CSF_OPT_INC "/usr/X11/include" - lappend ::CSF_OPT_INC "$aSysFreeType" - } else { - set aPath [wokdep:Preferred [glob -nocomplain -directory "$::PRODUCTS_PATH" -type d *{freetype}*] "$::VCVER" "$::ARCH" ] - if {"$aPath" != ""} { - if {[file exists "$aPath/include/ft2build.h"]} { - lappend ::CSF_OPT_INC "$aPath/include" - } elseif {[file exists "$aPath/include/freetype2/ft2build.h"]} { - lappend ::CSF_OPT_INC "$aPath/include/freetype2" - } - } else { - lappend anErrInc "Error: 'freetype.h' not found (FreeType2)" - set isFound "false" - } - } - } - } - - # parse 'freetype-config --libs' - set aConfLibPath "" - if { [catch { set aConfLibs [exec freetype-config --libs] } ] == 0 } { - foreach aPath [split $aConfLibs " "] { - if { [string first "-L" "$aPath"] == 0 } { - set aConfLibPath [string range "$aPath" 2 [string length "$aPath"]] - } - } - } - - foreach anArchIter {64 32} { - set aFtLibPath [wokdep:SearchLib "freetype" "$anArchIter"] - if { "$aFtLibPath" == "" } { - set aPath [wokdep:Preferred [glob -nocomplain -directory "$::PRODUCTS_PATH" -type d *{freetype}*] "$::VCVER" "$anArchIter" ] - set aFtLibPath [wokdep:SearchLib "freetype" "$anArchIter" "$aPath/lib"] - if { "$aFtLibPath" != "" } { - lappend ::CSF_OPT_LIB$anArchIter "$aPath/lib" - } else { - set aFtLibPath [wokdep:SearchLib "freetype" "$anArchIter" "$aConfLibPath"] - if { "$aFtLibPath" != "" } { - lappend ::CSF_OPT_LIB$anArchIter "$aConfLibPath" - } else { - lappend anErrLib$anArchIter "Error: '${::SYS_LIB_PREFIX}freetype.${::SYS_LIB_SUFFIX}' not found (FreeType2)" - if { "$::ARCH" == "$anArchIter"} { set isFound "false" } - } - } - } - if { "$::tcl_platform(platform)" == "windows" } { - set aFtDllPath [wokdep:SearchBin "freetype.dll" "$anArchIter"] - if { "$aFtDllPath" == "" } { - set aPath [wokdep:Preferred [glob -nocomplain -directory "$::PRODUCTS_PATH" -type d *{freetype}*] "$::VCVER" "$anArchIter" ] - set aFtDllPath [wokdep:SearchBin "freetype.dll" "$anArchIter" "$aPath/bin"] - if { "$aFtDllPath" != "" } { - lappend ::CSF_OPT_BIN$anArchIter "$aPath/bin" - } else { - set aFtDllPath [wokdep:SearchBin "freetype.dll" "$anArchIter" "$aPath/lib"] - if { "$aFtDllPath" != "" } { - lappend ::CSF_OPT_BIN$anArchIter "$aPath/lib" - } else { - lappend anErrBin$anArchIter "Error: 'freetype.dll' not found (FreeType2)" - if { "$::ARCH" == "$anArchIter"} { set isFound "false" } - } - } - } - } - } - - return "$isFound" -} - -# Search FreeImage library placement -proc wokdep:SearchFreeImage {theErrInc theErrLib32 theErrLib64 theErrBin32 theErrBin64} { - upvar $theErrInc anErrInc - upvar $theErrLib32 anErrLib32 - upvar $theErrLib64 anErrLib64 - upvar $theErrBin32 anErrBin32 - upvar $theErrBin64 anErrBin64 - - # binary distribution has another layout - set aFImageDist "Dist" - - set isFound "true" - set aFImageHPath [wokdep:SearchHeader "FreeImage.h"] - if { "$aFImageHPath" == "" } { - set aPath [wokdep:Preferred [glob -nocomplain -directory "$::PRODUCTS_PATH" -type d *{freeimage}*] "$::VCVER" "$::ARCH" ] - if { "$aPath" != "" && [file exists "$aPath/include/FreeImage.h"] } { - lappend ::CSF_OPT_INC "$aPath/include" - } elseif { "$aPath" != "" && [file exists "$aPath/$aFImageDist/FreeImage.h"] } { - lappend ::CSF_OPT_INC "$aPath/$aFImageDist" - } else { - lappend anErrInc "Error: 'FreeImage.h' not found (FreeImage)" - set isFound "false" - } - } - - foreach anArchIter {64 32} { - set aFImageLibPath [wokdep:SearchLib "freeimage" "$anArchIter"] - if { "$aFImageLibPath" == "" } { - set aPath [wokdep:Preferred [glob -nocomplain -directory "$::PRODUCTS_PATH" -type d *{freeimage}*] "$::VCVER" "$anArchIter" ] - set aFImageLibPath [wokdep:SearchLib "freeimage" "$anArchIter" "$aPath/lib"] - if { "$aFImageLibPath" != "" } { - lappend ::CSF_OPT_LIB$anArchIter "$aPath/lib" - } else { - set aFImageLibPath [wokdep:SearchLib "freeimage" "$anArchIter" "$aPath/$aFImageDist"] - if { "$aFImageLibPath" != "" } { - lappend ::CSF_OPT_LIB$anArchIter "$aPath/$aFImageDist" - } else { - lappend anErrLib$anArchIter "Error: '${::SYS_LIB_PREFIX}freeimage.${::SYS_LIB_SUFFIX}' not found (FreeImage)" - if { "$::ARCH" == "$anArchIter"} { set isFound "false" } - } - } - } - if { "$::tcl_platform(platform)" == "windows" } { - set aFImageDllPath [wokdep:SearchBin "freeimage.dll" "$anArchIter"] - if { "$aFImageDllPath" == "" } { - set aPath [wokdep:Preferred [glob -nocomplain -directory "$::PRODUCTS_PATH" -type d *{freeimage}*] "$::VCVER" "$anArchIter" ] - set aFImageDllPath [wokdep:SearchBin "freeimage.dll" "$anArchIter" "$aPath/bin"] - if { "$aFImageDllPath" != "" } { - lappend ::CSF_OPT_BIN$anArchIter "$aPath/bin" - } else { - set aFImageDllPath [wokdep:SearchBin "freeimage.dll" "$anArchIter" "$aPath/$aFImageDist"] - if { "$aFImageDllPath" != "" } { - lappend ::CSF_OPT_BIN$anArchIter "$aPath/$aFImageDist" - } else { - lappend anErrBin$anArchIter "Error: 'freeimage.dll' is not found (FreeImage)" - if { "$::ARCH" == "$anArchIter"} { set isFound "false" } - } - } - } - } - } - - return "$isFound" -} - -# Search FFmpeg framework placement -proc wokdep:SearchFFmpeg {theErrInc theErrLib32 theErrLib64 theErrBin32 theErrBin64} { - upvar $theErrInc anErrInc - upvar $theErrLib32 anErrLib32 - upvar $theErrLib64 anErrLib64 - upvar $theErrBin32 anErrBin32 - upvar $theErrBin64 anErrBin64 - - set isFound "true" - set aFFmpegHPath [wokdep:SearchHeader "libavutil/avutil.h"] - if { "$aFFmpegHPath" == "" } { - set aPath [wokdep:Preferred [glob -nocomplain -directory "$::PRODUCTS_PATH" -type d *{ffmpeg}*] "$::VCVER" "$::ARCH" ] - if { "$aPath" != "" && [file exists "$aPath/include/libavutil/avutil.h"] } { - lappend ::CSF_OPT_INC "$aPath/include" - } else { - lappend anErrInc "Error: 'libavutil/avutil.h' not found (FFmpeg)" - set isFound "false" - } - } - - foreach anArchIter {64 32} { - set aFFmpegLibPath [wokdep:SearchLib "avutil" "$anArchIter"] - if { "$aFFmpegLibPath" == "" } { - set aPath [wokdep:Preferred [glob -nocomplain -directory "$::PRODUCTS_PATH" -type d *{ffmpeg}*] "$::VCVER" "$anArchIter" ] - set aFFmpegLibPath [wokdep:SearchLib "avutil" "$anArchIter" "$aPath/lib"] - if { "$aFFmpegLibPath" != "" } { - lappend ::CSF_OPT_LIB$anArchIter "$aPath/lib" - lappend ::CSF_OPT_BIN$anArchIter "$aPath/bin" - } else { - lappend anErrLib$anArchIter "Error: '${::SYS_LIB_PREFIX}avutil.${::SYS_LIB_SUFFIX}' not found (FFmpeg)" - if { "$::ARCH" == "$anArchIter"} { set isFound "false" } - } - } - } - - return "$isFound" -} - -# Search OpenVR SDK placement -proc wokdep:SearchOpenVR {theErrInc theErrLib32 theErrLib64 theErrBin32 theErrBin64} { - upvar $theErrInc anErrInc - upvar $theErrLib32 anErrLib32 - upvar $theErrLib64 anErrLib64 - upvar $theErrBin32 anErrBin32 - upvar $theErrBin64 anErrBin64 - - set isFound "true" - set anOpenVrHPath [wokdep:SearchHeader "openvr.h"] - if { "$anOpenVrHPath" == "" } { - set aPath [wokdep:Preferred [glob -nocomplain -directory "$::PRODUCTS_PATH" -type d *{openvr}*] "$::VCVER" "$::ARCH" ] - if { "$aPath" != "" && [file exists "$aPath/include/openvr.h"] } { - lappend ::CSF_OPT_INC "$aPath/include" - } elseif { "$aPath" != "" && [file exists "$aPath/headers/openvr.h"] } { - lappend ::CSF_OPT_INC "$aPath/headers" - } else { - lappend anErrInc "Error: 'openvr.h' not found (OpenVR)" - set isFound "false" - } - } - - set aPlatform "unknown" - if { "$::tcl_platform(platform)" == "windows" } { - set aPlatform "win" - } elseif { "$::tcl_platform(os)" == "Darwin" } { - set aPlatform "osx" - } elseif { "$::tcl_platform(os)" == "Linux" } { - set aPlatform "linux" - } - - foreach anArchIter {64 32} { - set anOpenVrLibPath [wokdep:SearchLib "openvr_api" "$anArchIter"] - if { "$anOpenVrLibPath" == "" } { - set aPath [wokdep:Preferred [glob -nocomplain -directory "$::PRODUCTS_PATH" -type d *{openvr}*] "$::VCVER" "$anArchIter" ] - set anOpenVrLibPath [wokdep:SearchLib "openvr_api" "$anArchIter" "$aPath/lib/${aPlatform}${anArchIter}"] - set anOpenVrLibPath2 [wokdep:SearchLib "openvr_api" "$anArchIter" "$aPath/lib"] - if { "$anOpenVrLibPath" != "" } { - lappend ::CSF_OPT_LIB$anArchIter "$aPath/lib/${aPlatform}${anArchIter}" - lappend ::CSF_OPT_BIN$anArchIter "$aPath/bin/${aPlatform}${anArchIter}" - } elseif { "$anOpenVrLibPath2" != "" } { - lappend ::CSF_OPT_LIB$anArchIter "$aPath/lib" - lappend ::CSF_OPT_BIN$anArchIter "$aPath/bin" - } else { - lappend anErrLib$anArchIter "Error: '${::SYS_LIB_PREFIX}openvr_api.${::SYS_LIB_SUFFIX}' not found (OpenVR)" - if { "$::ARCH" == "$anArchIter"} { set isFound "false" } - } - } - } - - return "$isFound" -} - -# Search TBB library placement -proc wokdep:SearchTBB {theErrInc theErrLib32 theErrLib64 theErrBin32 theErrBin64} { - upvar $theErrInc anErrInc - upvar $theErrLib32 anErrLib32 - upvar $theErrLib64 anErrLib64 - upvar $theErrBin32 anErrBin32 - upvar $theErrBin64 anErrBin64 - - # keep only two first digits in "vc141" - if { ! [regexp {^vc[0-9][0-9]} ${::VCVER} aVcLib] } { - if { [regexp {^vclang} ${::VCVER}] } { - set aVcLib vc14 - } else { - set aVcLib ${::VCVER} - } - } - - set isFound "true" - set aTbbHPath [wokdep:SearchHeader "tbb/scalable_allocator.h"] - if { "$aTbbHPath" == "" } { - set aPath [wokdep:Preferred [glob -nocomplain -directory "$::PRODUCTS_PATH" -type d *{tbb}*] "$::VCVER" "$::ARCH" ] - if { "$aPath" != "" && [file exists "$aPath/include/tbb/scalable_allocator.h"] } { - lappend ::CSF_OPT_INC "$aPath/include" - } else { - lappend anErrInc "Error: 'tbb/scalable_allocator.h' not found (Intel TBB)" - set isFound "false" - } - } - - foreach anArchIter {64 32} { - set aSubDir "ia32" - if { "$anArchIter" == "64"} { - set aSubDir "intel64" - } - - set aTbbLibPath [wokdep:SearchLib "tbb" "$anArchIter"] - if { "$aTbbLibPath" == "" } { - set aPath [wokdep:Preferred [glob -nocomplain -directory "$::PRODUCTS_PATH" -type d *{tbb}*] $aVcLib "$anArchIter" ] - set aTbbLibPath [wokdep:SearchLib "tbb" "$anArchIter" "$aPath/lib/$aSubDir/$aVcLib"] - if { "$aTbbLibPath" == "" } { - # Set the path to the TBB library for Linux - if { "$::tcl_platform(platform)" != "windows" } { - set aSubDir "$aSubDir/cc4.1.0_libc2.4_kernel2.6.16.21" - } - set aTbbLibPath [wokdep:SearchLib "tbb" "$anArchIter" "$aPath/lib/$aSubDir"] - if { "$aTbbLibPath" != "" } { - lappend ::CSF_OPT_LIB$anArchIter "$aPath/lib/$aSubDir" - } - } else { - lappend ::CSF_OPT_LIB$anArchIter "$aPath/lib/$aSubDir/$aVcLib" - } - if { "$aTbbLibPath" == "" } { - lappend anErrLib$anArchIter "Error: '${::SYS_LIB_PREFIX}tbb.${::SYS_LIB_SUFFIX}' not found (Intel TBB)" - if { "$::ARCH" == "$anArchIter"} { set isFound "false" } - } - } - if { "$::tcl_platform(platform)" == "windows" } { - set aTbbDllPath [wokdep:SearchBin "tbb12.dll" "$anArchIter"] - if { "$aTbbDllPath" == "" } { - set aPath [wokdep:Preferred [glob -nocomplain -directory "$::PRODUCTS_PATH" -type d *{tbb}*] $aVcLib "$anArchIter" ] - set aTbbDllPath [wokdep:SearchBin "tbb12.dll" "$anArchIter" "$aPath/bin/$aSubDir/$aVcLib"] - if { "$aTbbDllPath" != "" } { - lappend ::CSF_OPT_BIN$anArchIter "$aPath/bin/$aSubDir/$aVcLib" - } else { - lappend anErrBin$anArchIter "Error: 'tbb12.dll' not found (Intel TBB)" - if { "$::ARCH" == "$anArchIter"} { set isFound "false" } - } - } - } - } - - return "$isFound" -} - -# Search OpenCL library placement -proc wokdep:SearchOpenCL {theErrInc theErrLib32 theErrLib64 theErrBin32 theErrBin64} { - upvar $theErrInc anErrInc - upvar $theErrLib32 anErrLib32 - upvar $theErrLib64 anErrLib64 - upvar $theErrBin32 anErrBin32 - upvar $theErrBin64 anErrBin64 - - set isFound "true" - if { "$::tcl_platform(os)" == "Darwin" } { - # OpenCL framework available since Mac OS X 16 - return "$isFound" - } - - set aCLHPath [wokdep:SearchHeader "CL/cl_gl.h"] - if { "$aCLHPath" == "" } { - set aPath [wokdep:Preferred [glob -nocomplain -directory "$::PRODUCTS_PATH" -type d *{OpenCL}*] "$::VCVER" "$::ARCH" ] - if { "$aPath" != "" && [file exists "$aPath/include/CL/cl_gl.h"] } { - lappend ::CSF_OPT_INC "$aPath/include" - } else { - lappend anErrInc "Error: 'CL/cl_gl.h' not found (OpenCL)" - set isFound "false" - } - } - - foreach anArchIter {64 32} { - set aCLLibPath [wokdep:SearchLib "OpenCL" "$anArchIter"] - if { "$aCLLibPath" == "" } { - set aPath [wokdep:Preferred [glob -nocomplain -directory "$::PRODUCTS_PATH" -type d *{OpenCL}*] "$::VCVER" "$anArchIter" ] - set aCLLibPath [wokdep:SearchLib "OpenCL" "$anArchIter" "$aPath/lib"] - if { "$aCLLibPath" != "" } { - lappend ::CSF_OPT_LIB$anArchIter "$aPath/lib" - } else { - lappend anErrLib$anArchIter "Error: '${::SYS_LIB_PREFIX}OpenCL.${::SYS_LIB_SUFFIX}' not found (OpenCL)" - if { "$::ARCH" == "$anArchIter"} { set isFound "false" } - } - } - } - - return "$isFound" -} - -# Search EGL library placement -proc wokdep:SearchEGL {theErrInc theErrLib32 theErrLib64 theErrBin32 theErrBin64} { - upvar $theErrInc anErrInc - upvar $theErrLib32 anErrLib32 - upvar $theErrLib64 anErrLib64 - upvar $theErrBin32 anErrBin32 - upvar $theErrBin64 anErrBin64 - - set isFound "true" - set aHeaderPath [wokdep:SearchHeader "EGL/egl.h"] - if { "$aHeaderPath" == "" } { - set aPath [wokdep:Preferred [glob -nocomplain -directory "$::PRODUCTS_PATH" -type d *{EGL}*] "$::VCVER" "$::ARCH" ] - if { "$aPath" == "" || ![file exists "$aPath/include/EGL/egl.h"] } { - set aPath [wokdep:Preferred [glob -nocomplain -directory "$::PRODUCTS_PATH" -type d *{angle}*] "$::VCVER" "$::ARCH" ] - } - - if { "$aPath" != "" && [file exists "$aPath/include/EGL/egl.h"] } { - lappend ::CSF_OPT_INC "$aPath/include" - } else { - lappend anErrInc "Error: 'EGL/egl.h' not found (EGL)" - set isFound "false" - } - } - - set aLibName "EGL" - if { "$::tcl_platform(platform)" == "windows" } { - # awkward exception - set aLibName "libEGL" - } - - foreach anArchIter {64 32} { - set aLibPath [wokdep:SearchLib "$aLibName" "$anArchIter"] - if { "$aLibPath" == "" } { - set aPath [wokdep:Preferred [glob -nocomplain -directory "$::PRODUCTS_PATH" -type d *{EGL}*] "$::VCVER" "$anArchIter" ] - set aLibPath [wokdep:SearchLib "$aLibName" "$anArchIter" "$aPath/lib"] - if { "$aLibPath" == "" } { - set aPath [wokdep:Preferred [glob -nocomplain -directory "$::PRODUCTS_PATH" -type d *{angle}*] "$::VCVER" "$anArchIter" ] - set aLibPath [wokdep:SearchLib "$aLibName" "$anArchIter" "$aPath/lib"] - } - - if { "$aLibPath" != "" } { - lappend ::CSF_OPT_LIB$anArchIter "$aPath/lib" - } else { - lappend anErrLib$anArchIter "Error: '${::SYS_LIB_PREFIX}${aLibName}.${::SYS_LIB_SUFFIX}' not found (EGL)" - if { "$::ARCH" == "$anArchIter"} { set isFound "false" } - } - } - - if { "$::tcl_platform(platform)" == "windows" } { - set aDllPath [wokdep:SearchBin "libEGL.dll" "$anArchIter"] - if { "$aDllPath" == "" } { - set aPath [wokdep:Preferred [glob -nocomplain -directory "$::PRODUCTS_PATH" -type d *{EGL}*] "$::VCVER" "$anArchIter" ] - set aDllPath [wokdep:SearchBin "libEGL.dll" "$anArchIter" "$aPath/bin"] - if { "$aDllPath" == "" } { - set aPath [wokdep:Preferred [glob -nocomplain -directory "$::PRODUCTS_PATH" -type d *{angle}*] "$::VCVER" "$anArchIter" ] - set aDllPath [wokdep:SearchBin "libEGL.dll" "$anArchIter" "$aPath/bin"] - } - - if { "$aDllPath" != "" } { - lappend ::CSF_OPT_BIN$anArchIter "$aPath/bin" - } else { - lappend anErrBin$anArchIter "Error: 'libEGL.dll' not found (EGL)" - if { "$::ARCH" == "$anArchIter"} { set isFound "false" } - } - } - } - } - - return "$isFound" -} - -# Search OpenGL ES 2.0 library placement -proc wokdep:SearchGLES {theErrInc theErrLib32 theErrLib64 theErrBin32 theErrBin64} { - upvar $theErrInc anErrInc - upvar $theErrLib32 anErrLib32 - upvar $theErrLib64 anErrLib64 - upvar $theErrBin32 anErrBin32 - upvar $theErrBin64 anErrBin64 - - set isFound "true" - set aHeaderPath [wokdep:SearchHeader "GLES2/gl2.h"] - if { "$aHeaderPath" == "" } { - set aPath [wokdep:Preferred [glob -nocomplain -directory "$::PRODUCTS_PATH" -type d *{GLES}*] "$::VCVER" "$::ARCH" ] - if { "$aPath" == "" || ![file exists "$aPath/include/GLES2/gl2.h"] } { - set aPath [wokdep:Preferred [glob -nocomplain -directory "$::PRODUCTS_PATH" -type d *{angle}*] "$::VCVER" "$::ARCH" ] - } - - if { "$aPath" != "" && [file exists "$aPath/include/GLES2/gl2.h"] } { - lappend ::CSF_OPT_INC "$aPath/include" - } else { - lappend anErrInc "Error: 'GLES2/gl2.h' not found (OpenGL ES 2.0)" - set isFound "false" - } - } - - set aLibName "GLESv2" - if { "$::tcl_platform(platform)" == "windows" } { - # awkward exception - set aLibName "libGLESv2" - } - - foreach anArchIter {64 32} { - set aLibPath [wokdep:SearchLib "$aLibName" "$anArchIter"] - if { "$aLibPath" == "" } { - set aPath [wokdep:Preferred [glob -nocomplain -directory "$::PRODUCTS_PATH" -type d *{GLES}*] "$::VCVER" "$anArchIter" ] - set aLibPath [wokdep:SearchLib "$aLibName" "$anArchIter" "$aPath/lib"] - if { "$aLibPath" == "" } { - set aPath [wokdep:Preferred [glob -nocomplain -directory "$::PRODUCTS_PATH" -type d *{angle}*] "$::VCVER" "$anArchIter" ] - set aLibPath [wokdep:SearchLib "$aLibName" "$anArchIter" "$aPath/lib"] - } - - if { "$aLibPath" != "" } { - lappend ::CSF_OPT_LIB$anArchIter "$aPath/lib" - } else { - lappend anErrLib$anArchIter "Error: '${::SYS_LIB_PREFIX}${aLibName}.${::SYS_LIB_SUFFIX}' not found (OpenGL ES 2.0)" - if { "$::ARCH" == "$anArchIter"} { set isFound "false" } - } - } - - if { "$::tcl_platform(platform)" == "windows" } { - set aDllPath [wokdep:SearchBin "libGLESv2.dll" "$anArchIter"] - if { "$aDllPath" == "" } { - set aPath [wokdep:Preferred [glob -nocomplain -directory "$::PRODUCTS_PATH" -type d *{EGL}*] "$::VCVER" "$anArchIter" ] - set aDllPath [wokdep:SearchBin "libGLESv2.dll" "$anArchIter" "$aPath/bin"] - if { "$aDllPath" == "" } { - set aPath [wokdep:Preferred [glob -nocomplain -directory "$::PRODUCTS_PATH" -type d *{angle}*] "$::VCVER" "$anArchIter" ] - set aDllPath [wokdep:SearchBin "libGLESv2.dll" "$anArchIter" "$aPath/bin"] - } - - if { "$aDllPath" != "" } { - lappend ::CSF_OPT_BIN$anArchIter "$aPath/bin" - } else { - lappend anErrBin$anArchIter "Error: 'libGLESv2.dll' not found (OpenGL ES 2.0)" - if { "$::ARCH" == "$anArchIter"} { set isFound "false" } - } - } - } - } - - return "$isFound" -} - -# Search RapidJSON headers -proc wokdep:SearchRapidJson {theErrInc theErrLib32 theErrLib64 theErrBin32 theErrBin64} { - upvar $theErrInc anErrInc - - set isFound "true" - set aRJHPath [wokdep:SearchHeader "rapidjson/rapidjson.h"] - if { "$aRJHPath" == "" } { - set aPath [wokdep:Preferred [glob -nocomplain -directory "$::PRODUCTS_PATH" -type d *{rapidjson}*] "$::VCVER" "$::ARCH" ] - if { "$aPath" != "" && [file exists "$aPath/include/rapidjson/rapidjson.h"] } { - lappend ::CSF_OPT_INC "$aPath/include" - } else { - lappend anErrInc "Error: 'rapidjson/rapidjson.h' not found (RapidJSON)" - set isFound "false" - } - } - - return "$isFound" -} - -# Auxiliary function, gets VTK version to set default search directory -proc wokdep:VtkVersion { thePath } { - set aResult "6.1" - - set aVtkRoot [lindex [regexp -all -inline {[0-9.]*} [file tail $thePath]] 0] - if { "$aVtkRoot" != "" } { - set aVtkRoot [regexp -inline {[0-9]*.[0-9]*} $aVtkRoot] - if { "$aVtkRoot" != "" } { - set aResult $aVtkRoot - } - } - - return $aResult -} - -# Search VTK library placement -proc wokdep:SearchVTK {theErrInc theErrLib32 theErrLib64 theErrBin32 theErrBin64} { - upvar $theErrInc anErrInc - upvar $theErrLib32 anErrLib32 - upvar $theErrLib64 anErrLib64 - upvar $theErrBin32 anErrBin32 - upvar $theErrBin64 anErrBin64 - - set isFound "true" - - set aVtkPath "" - set aVtkIncPath [wokdep:SearchHeader "vtkConfigure.h"] - set aVtkVer [wokdep:VtkVersion $aVtkIncPath] - if { "$aVtkIncPath" == ""} { - set aPathList [glob -nocomplain -directory "$::PRODUCTS_PATH" -type d *{VTK}*] - set aVtkPath [wokdep:Preferred "$aPathList" "$::VCVER" "$::ARCH" ] - if { "$aVtkPath" != "" && [file exists "$aVtkPath/include/vtk-[wokdep:VtkVersion $aVtkPath]/vtkConfigure.h"]} { - set aVtkVer [wokdep:VtkVersion $aVtkPath] - lappend ::CSF_OPT_INC "$aVtkPath/include/vtk-[wokdep:VtkVersion $aVtkPath]" - } else { # try to search in all found paths - set isFound "false" - foreach anIt $aPathList { - if { [file exists "$anIt/include/vtk-[wokdep:VtkVersion $anIt]/vtkConfigure.h"] } { - set aVtkPath $anIt - set aVtkVer [wokdep:VtkVersion $aVtkPath] - lappend ::CSF_OPT_INC "$anIt/include/vtk-[wokdep:VtkVersion $anIt]" - set isFound "true" - break - } - } - - # Bad case: we do not found vtkConfigure.h in all paths. - if { "$isFound" == "false"} { - lappend anErrInc "Error: 'vtkConfigure.h' not found (VTK)" - set isFound "false" - } - } - } - - set aVtkLibPath "" - foreach anArchIter {64 32} { - set aVtkLibPath [wokdep:SearchLib "vtkCommonCore-$aVtkVer" "$anArchIter"] - if { "$aVtkLibPath" == "" } { - set aPathList [glob -nocomplain -directory "$::PRODUCTS_PATH" -type d *{VTK}*] - set aPath [wokdep:Preferred $aPathList "$::VCVER" "$anArchIter" ] - set aVtkLibPath [wokdep:SearchLib "vtkCommonCore-$aVtkVer" "$anArchIter" "$aPath/lib"] - if { "$aVtkLibPath" != "" } { - lappend ::CSF_OPT_LIB$anArchIter "$aPath/lib" - } else { - set aPath [wokdep:SearchLib "vtkCommonCore-$aVtkVer" "$anArchIter" "$aVtkPath/lib"] - if { "$aPath" != "" } { - set aLibPath $aVtkIncPath - lappend ::CSF_OPT_LIB$anArchIter "$aLibPath/lib" - } else { - # The last chance: search /lib directory in all found paths - foreach anIt $aPathList { - set aVtkLibPath [wokdep:SearchLib "vtkCommonCore-$aVtkVer" "$anArchIter" "$anIt/lib"] - if { "$aVtkLibPath" != ""} { - lappend ::CSF_OPT_LIB$anArchIter "$anIt/lib" - break - } - } - if { "$aVtkLibPath" == "" } { - lappend anErrLib$anArchIter "Error: '${::SYS_LIB_PREFIX}vtkCommonCore-${aVtkVer}\.${::SYS_LIB_SUFFIX}' not found (VTK)" - if { "$::ARCH" == "$anArchIter" } { - set isFound "false" - } - } - } - } - } - - # Search binary path - if { "$::tcl_platform(platform)" == "windows" } { - set aVtkBinPath [wokdep:SearchBin "vtkCommonCore-${aVtkVer}.dll" "$anArchIter"] - if { "$aVtkBinPath" == "" } { - set aPathList [glob -nocomplain -directory "$::PRODUCTS_PATH" -type d *{VTK}*] - set aPath [wokdep:Preferred $aPathList "$::VCVER" "$anArchIter" ] - set aVtkBinPath [wokdep:SearchBin "vtkCommonCore-${aVtkVer}.dll" "$anArchIter" "$aPath/bin"] - if { "$aVtkBinPath" != "" } { - lappend ::CSF_OPT_BIN$anArchIter "$aPath/bin" - } else { - # Try to find in lib path - set aVtkBinPath [wokdep:SearchBin "vtkCommonCore-${aVtkVer}.dll" "$anArchIter" "$aPath/lib"] - if { "$aVtkBinPath" != "" } { - lappend ::CSF_OPT_BIN$anArchIter "$aPath/lib" - } else { - # We didn't find preferred binary path => search through all available VTK directories - foreach anIt $aPathList { - set aVtkBinPath [wokdep:SearchBin "vtkCommonCore-${aVtkVer}.dll" "$anArchIter" "$anIt/bin"] - if { "$aVtkBinPath" != "" } { - lappend ::CSF_OPT_BIN$anArchIter "$anIt/bin" - break - } else { - # Try to find in lib path - set aVtkBinPath [wokdep:SearchBin "vtkCommonCore-${aVtkVer}.dll" "$anArchIter" "$anIt/lib"] - if { "$aVtkBinPath" != "" } { - lappend ::CSF_OPT_BIN$anArchIter "$anIt/lib" - } - } - } - if { "$aVtkBinPath" == "" } { - lappend anErrBin$anArchIter "Error: 'vtkCommonCore-${aVtkVer}.dll' not found (VTK)" - set isFound "false" - } - } - } - } - } - } - - return "$isFound" -} - -# Search Qt libraries placement -proc wokdep:SearchQt {theErrInc theErrLib32 theErrLib64 theErrBin32 theErrBin64} { - upvar $theErrInc anErrInc - upvar $theErrLib32 anErrLib32 - upvar $theErrLib64 anErrLib64 - upvar $theErrBin32 anErrBin32 - upvar $theErrBin64 anErrBin64 - - set isFound "true" - set aPath [wokdep:Preferred [glob -nocomplain -directory "$::PRODUCTS_PATH" -type d *{qt}*] "$::VCVER" "$::ARCH" ] - set aQMsgBoxHPath [wokdep:SearchHeader "QtGui/qguiapplication.h"] - if { "$aQMsgBoxHPath" == "" } { - if { "$aPath" != "" && [file exists "$aPath/include/QtGui/qguiapplication.h"] } { - lappend ::CSF_OPT_INC "$aPath/include" - lappend ::CSF_OPT_INC "$aPath/include/Qt" - lappend ::CSF_OPT_INC "$aPath/include/QtGui" - lappend ::CSF_OPT_INC "$aPath/include/QtCore" - lappend ::CSF_OPT_INC "$aPath/include/QtWidgets" - lappend ::CSF_OPT_INC "$aPath/include/QtXml" - } else { - lappend anErrInc "Error: 'QtGui/qguiapplication.h' not found" - set isFound "false" - } - } - - set aQtGuiLibName "QtGui" - if { "$::tcl_platform(platform)" == "windows" } { - set aQtGuiLibName "Qt5Gui" - } - - foreach anArchIter {64 32} { - set aQMsgBoxLibPath [wokdep:SearchLib "${aQtGuiLibName}" "$anArchIter"] - if { "$aQMsgBoxLibPath" == "" } { - set aQMsgBoxLibPath [wokdep:SearchLib "${aQtGuiLibName}" "$anArchIter" "$aPath/lib"] - if { "$aQMsgBoxLibPath" != "" } { - lappend ::CSF_OPT_LIB$anArchIter "$aPath/lib" - } else { - lappend anErrLib$anArchIter "Error: '${::SYS_LIB_PREFIX}${aQtGuiLibName}.${::SYS_LIB_SUFFIX}' not found (Qt)" - if { "$::ARCH" == "$anArchIter"} { set isFound "false" } - } - } - if { "$::tcl_platform(platform)" == "windows" } { - set aQMsgBoxDllPath [wokdep:SearchBin "${aQtGuiLibName}.dll" "$anArchIter"] - if { "$aQMsgBoxDllPath" == "" } { - set aQMsgBoxDllPath [wokdep:SearchBin "${aQtGuiLibName}.dll" "$anArchIter" "$aPath/bin"] - if { "$aQMsgBoxDllPath" != "" } { - lappend ::CSF_OPT_BIN$anArchIter "$aPath/bin" - } else { - lappend anErrBin$anArchIter "Error: '${aQtGuiLibName}.dll' not found (Qt)" - if { "$::ARCH" == "$anArchIter"} { set isFound "false" } - } - } - } - } - - return "$isFound" -} - -# Search JDK placement -proc wokdep:SearchJDK {theErrInc theErrLib32 theErrLib64 theErrBin32 theErrBin64} { - upvar $theErrInc anErrInc - upvar $theErrLib32 anErrLib32 - upvar $theErrLib64 anErrLib64 - upvar $theErrBin32 anErrBin32 - upvar $theErrBin64 anErrBin64 - - set isFound "true" - set aJniHPath [wokdep:SearchHeader "jni.h"] - set aJniMdHPath [wokdep:SearchHeader "jni_md.h"] - if { "$aJniHPath" == "" || "$aJniMdHPath" == "" } { - set aPath [wokdep:Preferred [glob -nocomplain -directory "$::PRODUCTS_PATH" -type d *{jdk,java}*] "$::VCVER" "$::ARCH" ] - if { "$aPath" != "" && [file exists "$aPath/include/jni.h"] } { - lappend ::CSF_OPT_INC "$aPath/include" - if { "$::tcl_platform(platform)" == "windows" } { - lappend ::CSF_OPT_INC "$aPath/include/win32" - } elseif { [file exists "$aPath/include/linux"] } { - lappend ::CSF_OPT_INC "$aPath/include/linux" - } - } else { - if { [file exists "/System/Library/Frameworks/JavaVM.framework/Home/include/jni.h"] } { - lappend ::CSF_OPT_INC "/System/Library/Frameworks/JavaVM.framework/Home/include" - } else { - lappend anErrInc "Error: 'jni.h' or 'jni_md.h' not found (JDK)" - set isFound "false" - } - } - } - - foreach anArchIter {64 32} { - set aJavacPath [wokdep:SearchBin "javac${::SYS_EXE_SUFFIX}" "$anArchIter"] - if { "$aJavacPath" == "" } { - set aPath [wokdep:Preferred [glob -nocomplain -directory "$::PRODUCTS_PATH" -type d *{jdk,java}*] "$::VCVER" "$anArchIter" ] - set aJavacPath [wokdep:SearchBin "javac${::SYS_EXE_SUFFIX}" "$anArchIter" "$aPath/bin"] - if { "$aJavacPath" != "" } { - lappend ::CSF_OPT_BIN$anArchIter "$aPath/bin" - } else { - if { "$::ARCH" == "$anArchIter" && [file exists "/System/Library/Frameworks/JavaVM.framework/Home/bin/javac${::SYS_EXE_SUFFIX}"] } { - lappend ::CSF_OPT_BIN$anArchIter "/System/Library/Frameworks/JavaVM.framework/Home/bin" - } else { - lappend anErrBin$anArchIter "Error: 'javac${::SYS_EXE_SUFFIX}' not found (JDK)" - if { "$::ARCH" == "$anArchIter"} { set isFound "false" } - } - } - } - } - - return "$isFound" -} - -# Search X11 libraries placement -proc wokdep:SearchX11 {theErrInc theErrLib32 theErrLib64 theErrBin32 theErrBin64} { - upvar $theErrInc anErrInc - upvar $theErrLib32 anErrLib32 - upvar $theErrLib64 anErrLib64 - upvar $theErrBin32 anErrBin32 - upvar $theErrBin64 anErrBin64 - - set isFound "true" - if { "$::tcl_platform(platform)" == "windows" || ( "$::tcl_platform(os)" == "Darwin" && "$::HAVE_XLIB" != "true" ) } { - return "$isFound" - } - - set aX11LibPath [wokdep:SearchLib "X11" "$::ARCH"] - if { "$aX11LibPath" == "" } { - set aX11LibPath [wokdep:SearchLib "X11" "$::ARCH" "/usr/X11/lib"] - if { "$aX11LibPath" != "" } { - #lappend ::CSF_OPT_LIB$::ARCH "/usr/X11/lib" - } else { - lappend anErrLib$::ARCH "Error: '${::SYS_LIB_PREFIX}X11.${::SYS_LIB_SUFFIX}' not found (X11)" - set isFound "false" - } - } - - return "$isFound" -} - -# Returns OCCT version string from file Standard_Version.hxx (if available) -proc wokdep:DetectCasVersion {} { - set occt_ver 7.0.0 - set aCasRoot [file normalize [file dirname [info script]]] - set filename "${aCasRoot}/src/Standard/Standard_Version.hxx" - if { [file exists $filename] } { - set fh [open $filename "r"] - set fh_loaded [read $fh] - close $fh - regexp {[^/]\s*#\s*define\s+OCC_VERSION_COMPLETE\s+\"([^\s]*)\"} $fh_loaded dummy occt_ver - } else { - puts "Error: file '$filename' not found" - } - return $occt_ver -} - -# Generate (override) custom environment file -proc wokdep:SaveCustom {} { - set aGenInfo "This environment file was generated by genconf.tcl script at [clock format [clock seconds] -format "%Y.%m.%d %H:%M"]" - if { "$::tcl_platform(platform)" == "windows" } { - set aCustomFilePath "./custom.bat" - set aFile [open $aCustomFilePath "w"] - puts $aFile "@echo off" - puts $aFile "rem $aGenInfo" - - puts $aFile "" - puts $aFile "set PRJFMT=$::PRJFMT" - puts $aFile "set VCVER=$::VCVER" - puts $aFile "set ARCH=$::ARCH" - puts $aFile "set VCVARS=$::VCVARS" - puts $aFile "set SHORTCUT_HEADERS=$::SHORTCUT_HEADERS" - - puts $aFile "" - puts $aFile "set \"PRODUCTS_PATH=$::PRODUCTS_PATH\"" - - puts $aFile "" - puts $aFile "rem Optional 3rd-parties switches" - foreach anEnvIter $::THE_ENV_VARIABLES { - set aName ${anEnvIter} - set aValue [set ::${anEnvIter}] - if { "$aValue" != "" } { - puts $aFile "set ${aName}=$aValue" - } - } - - set aStringInc [join $::CSF_OPT_INC $::SYS_PATH_SPLITTER] - if { "$::PRODUCTS_PATH" != "" } { - set aStringInc [regsub -all "$::PRODUCTS_PATH" $aStringInc "%PRODUCTS_PATH%"] - } - puts $aFile "" - puts $aFile "rem Additional headers search paths" - puts $aFile "set \"CSF_OPT_INC=$aStringInc\"" - - set aStringLib32 [join $::CSF_OPT_LIB32 $::SYS_PATH_SPLITTER] - if { "$::PRODUCTS_PATH" != "" } { - set aStringLib32 [regsub -all "$::PRODUCTS_PATH" $aStringLib32 "%PRODUCTS_PATH%"] - } - puts $aFile "" - puts $aFile "rem Additional libraries (32-bit) search paths" - puts $aFile "set \"CSF_OPT_LIB32=$aStringLib32\"" - - set aStringLib32d [join $::CSF_OPT_LIB32D $::SYS_PATH_SPLITTER] - if { "$::PRODUCTS_PATH" != "" } { - set aStringLib32d [regsub -all "$::PRODUCTS_PATH" $aStringLib32d "%PRODUCTS_PATH%"] - } - puts $aFile "" - puts $aFile "rem Additional debug libraries (32-bit) search paths" - if { "$aStringLib32d" != "" && "$aStringLib32" != "" } { - puts $aFile "set \"CSF_OPT_LIB32D=$aStringLib32d;%CSF_OPT_LIB32%\"" - } else { - puts $aFile "set \"CSF_OPT_LIB32D=$aStringLib32d\"" - } - - set aStringLib64 [join $::CSF_OPT_LIB64 $::SYS_PATH_SPLITTER] - if { "$::PRODUCTS_PATH" != "" } { - set aStringLib64 [regsub -all "$::PRODUCTS_PATH" $aStringLib64 "%PRODUCTS_PATH%"] - } - puts $aFile "" - puts $aFile "rem Additional libraries (64-bit) search paths" - puts $aFile "set \"CSF_OPT_LIB64=$aStringLib64\"" - - set aStringLib64d [join $::CSF_OPT_LIB64D $::SYS_PATH_SPLITTER] - if { "$::PRODUCTS_PATH" != "" } { - set aStringLib64d [regsub -all "$::PRODUCTS_PATH" $aStringLib64d "%PRODUCTS_PATH%"] - } - puts $aFile "" - puts $aFile "rem Additional debug libraries (64-bit) search paths" - if { "$aStringLib64d" != "" && "$aStringLib64" != "" } { - puts $aFile "set \"CSF_OPT_LIB64D=$aStringLib64d;%CSF_OPT_LIB64%\"" - } else { - puts $aFile "set \"CSF_OPT_LIB64D=$aStringLib64d\"" - } - - set aStringBin32 [join $::CSF_OPT_BIN32 $::SYS_PATH_SPLITTER] - if { "$::PRODUCTS_PATH" != "" } { - set aStringBin32 [regsub -all "$::PRODUCTS_PATH" $aStringBin32 "%PRODUCTS_PATH%"] - } - puts $aFile "" - puts $aFile "rem Additional (32-bit) search paths" - puts $aFile "set \"CSF_OPT_BIN32=$aStringBin32\"" - - set aStringBin32d [join $::CSF_OPT_BIN32D $::SYS_PATH_SPLITTER] - if { "$::PRODUCTS_PATH" != "" } { - set aStringBin32d [regsub -all "$::PRODUCTS_PATH" $aStringBin32d "%PRODUCTS_PATH%"] - } - puts $aFile "" - puts $aFile "rem Additional debug (32-bit) search paths" - if { "$aStringBin32d" != "" && "$aStringBin32" != "" } { - puts $aFile "set \"CSF_OPT_BIN32D=$aStringBin32d;%CSF_OPT_BIN32%\"" - } else { - puts $aFile "set \"CSF_OPT_BIN32D=$aStringBin32d\"" - } - - set aStringBin64 [join $::CSF_OPT_BIN64 $::SYS_PATH_SPLITTER] - if { "$::PRODUCTS_PATH" != "" } { - set aStringBin64 [regsub -all "$::PRODUCTS_PATH" $aStringBin64 "%PRODUCTS_PATH%"] - } - puts $aFile "" - puts $aFile "rem Additional (64-bit) search paths" - puts $aFile "set \"CSF_OPT_BIN64=$aStringBin64\"" - - set aStringBin64d [join $::CSF_OPT_BIN64D $::SYS_PATH_SPLITTER] - if { "$::PRODUCTS_PATH" != "" } { - set aStringBin64d [regsub -all "$::PRODUCTS_PATH" $aStringBin64d "%PRODUCTS_PATH%"] - } - puts $aFile "" - puts $aFile "rem Additional debug (64-bit) search paths" - if { "$aStringBin64d" != "" && "$aStringBin64" != "" } { - puts $aFile "set \"CSF_OPT_BIN64D=$aStringBin64d;%CSF_OPT_BIN64%\"" - } else { - puts $aFile "set \"CSF_OPT_BIN64D=$aStringBin64d\"" - } - - close $aFile - } else { - set aCustomFilePath "./custom.sh" - set aFile [open $aCustomFilePath "w"] - puts $aFile "#!/bin/bash" - puts $aFile "# $aGenInfo" - - puts $aFile "" - puts $aFile "export PRJFMT=$::PRJFMT" - puts $aFile "export ARCH=$::ARCH" - puts $aFile "export SHORTCUT_HEADERS=$::SHORTCUT_HEADERS" - - puts $aFile "" - puts $aFile "export PRODUCTS_PATH=\"$::PRODUCTS_PATH\"" - - puts $aFile "" - puts $aFile "# Optional 3rd-parties switches" - foreach anEnvIter $::THE_ENV_VARIABLES { - set aName ${anEnvIter} - set aValue [set ::${anEnvIter}] - if { "$aValue" != "" } { - puts $aFile "export ${aName}=${aValue}" - } - } - - set aStringInc [join $::CSF_OPT_INC $::SYS_PATH_SPLITTER] - if { "$::PRODUCTS_PATH" != "" } { - set aStringInc [regsub -all "$::PRODUCTS_PATH" $aStringInc "\${PRODUCTS_PATH}"] - } - puts $aFile "" - puts $aFile "# Additional headers search paths" - puts $aFile "export CSF_OPT_INC=\"$aStringInc\"" - - set aStringLib [join [set ::CSF_OPT_LIB$::ARCH] $::SYS_PATH_SPLITTER] - if { "$::PRODUCTS_PATH" != "" } { - set aStringLib [regsub -all "$::PRODUCTS_PATH" $aStringLib "\${PRODUCTS_PATH}"] - } - puts $aFile "" - puts $aFile "# Additional libraries ($::ARCH-bit) search paths" - puts $aFile "export CSF_OPT_LIB$::ARCH=\"[set aStringLib]\"" - - set aStringLibD [join [set ::CSF_OPT_LIB${::ARCH}D] $::SYS_PATH_SPLITTER] - if { "$::PRODUCTS_PATH" != "" } { - set aStringLibD [regsub -all "$::PRODUCTS_PATH" $aStringLibD "\${PRODUCTS_PATH}"] - } - puts $aFile "" - puts $aFile "# Additional debug libraries ($::ARCH-bit) search paths" - if { "$aStringLibD" != "" && "$aStringLib" != "" } { - puts $aFile "export CSF_OPT_LIB${::ARCH}D=\"[set aStringLibD]:\$CSF_OPT_LIB${::ARCH}\"" - } else { - puts $aFile "export CSF_OPT_LIB${::ARCH}D=\"[set aStringLibD]\"" - } - - set aStringBin [join [set ::CSF_OPT_BIN$::ARCH] $::SYS_PATH_SPLITTER] - if { "$::PRODUCTS_PATH" != "" } { - set aStringBin [regsub -all "$::PRODUCTS_PATH" $aStringBin "\${PRODUCTS_PATH}"] - } - puts $aFile "" - puts $aFile "# Additional ($::ARCH-bit) search paths" - puts $aFile "export CSF_OPT_BIN$::ARCH=\"[set aStringBin]\"" - - set aStringBinD [join [set ::CSF_OPT_BIN${::ARCH}D] $::SYS_PATH_SPLITTER] - if { "$::PRODUCTS_PATH" != "" } { - set aStringBinD [regsub -all "$::PRODUCTS_PATH" $aStringBinD "\${PRODUCTS_PATH}"] - } - puts $aFile "" - puts $aFile "# Additional debug ($::ARCH-bit) search paths" - if { "$aStringBinD" != "" && "$aStringBin" != "" } { - puts $aFile "export CSF_OPT_BIN${::ARCH}D=\"[set aStringBinD]:\$CSF_OPT_BIN${::ARCH}\"" - } else { - puts $aFile "export CSF_OPT_BIN${::ARCH}D=\"[set aStringBinD]\"" - } - - close $aFile - } - puts "Configuration saved to file '$aCustomFilePath'" - - # generate custom.auto.pri - set toExportCustomPri 1 - if { $toExportCustomPri == 1 } { - set aCasVer [wokdep:DetectCasVersion] - set aCustomFilePath "./adm/qmake/custom.auto.pri" - set aFile [open $aCustomFilePath "w"] - puts $aFile "# $aGenInfo" - - puts $aFile "" - puts $aFile "VERSION=$aCasVer" - puts $aFile "PRODUCTS_PATH=\"$::PRODUCTS_PATH\"" - - puts $aFile "" - puts $aFile "# Optional 3rd-parties switches" - foreach anEnvIter $::THE_ENV_VARIABLES { - set aName ${anEnvIter} - set aValue [set ::${anEnvIter}] - if { "$aValue" == "true" } { - puts $aFile "CONFIG += ${aName}" - } else { - #puts $aFile "CONFIG -= ${aName}" - } - } - - puts $aFile "" - puts $aFile "# Additional headers search paths" - foreach anIncPath $::CSF_OPT_INC { - if { "$::PRODUCTS_PATH" != "" } { - set anIncPath [regsub -all "$::PRODUCTS_PATH" $anIncPath "\$\$\{PRODUCTS_PATH\}"] - } - puts $aFile "INCLUDEPATH += \"${anIncPath}\"" - } - - puts $aFile "" - puts $aFile "CONFIG(debug, debug|release) {" - puts $aFile " # Additional debug libraries search paths" - foreach aLibPath [set ::CSF_OPT_LIB${::ARCH}D] { - if { "$::PRODUCTS_PATH" != "" } { - set aLibPath [regsub -all "$::PRODUCTS_PATH" $aLibPath "\$\$\{PRODUCTS_PATH\}"] - } - puts $aFile " LIBS += -L\"${aLibPath}\"" - } - if { "$::tcl_platform(platform)" == "windows" } { - puts $aFile "" - puts $aFile " # Additional debug DLLs search paths" - foreach aDllPath [set ::CSF_OPT_BIN${::ARCH}D] { - if { "$::PRODUCTS_PATH" != "" } { - set aDllPath [regsub -all "$::PRODUCTS_PATH" $aDllPath "\$\$\{PRODUCTS_PATH\}"] - } - puts $aFile " LIBS += -L\"${aDllPath}\"" - } - } - puts $aFile "}" - - puts $aFile "" - puts $aFile "# Additional libraries search paths" - foreach aLibPath [set ::CSF_OPT_LIB$::ARCH] { - if { "$::PRODUCTS_PATH" != "" } { - set aLibPath [regsub -all "$::PRODUCTS_PATH" $aLibPath "\$\$\{PRODUCTS_PATH\}"] - } - puts $aFile "LIBS += -L\"${aLibPath}\"" - } - - if { "$::tcl_platform(platform)" == "windows" } { - puts $aFile "" - puts $aFile "# Additional DLLs search paths" - foreach aDllPath [set ::CSF_OPT_BIN$::ARCH] { - if { "$::PRODUCTS_PATH" != "" } { - set aDllPath [regsub -all "$::PRODUCTS_PATH" $aDllPath "\$\$\{PRODUCTS_PATH\}"] - } - puts $aFile "LIBS += -L\"${aDllPath}\"" - } - } - - puts $aFile "" - close $aFile - puts "Configuration saved to file '$aCustomFilePath'" - } -} diff --git a/adm/genproj.tcl b/adm/genproj.tcl deleted file mode 100644 index feba01e567..0000000000 --- a/adm/genproj.tcl +++ /dev/null @@ -1,3617 +0,0 @@ -# ======================================================================= -# Created on: 2014-07-24 -# Created by: SKI -# Copyright (c) 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. - -# ======================================================================= -# This script defines Tcl command genproj generating project files for -# different IDEs and platforms. Run it with -help to get synopsis. -# ======================================================================= - -source [file join [file dirname [info script]] genconfdeps.tcl] - -# the script is assumed to be run from CASROOT (or dependent Products root) -set path [file normalize .] -set THE_CASROOT "" -set fBranch "" -if { [info exists ::env(CASROOT)] } { - set THE_CASROOT [file normalize "$::env(CASROOT)"] -} - -proc _get_options { platform type branch } { - set res "" - if {[file exists "$::THE_CASROOT/adm/CMPLRS"]} { - set fd [open "$::THE_CASROOT/adm/CMPLRS" rb] - set opts [split [read $fd] "\n"] - close $fd - foreach line $opts { - if {[regexp "^${platform} ${type} ${branch} (.+)$" $line dummy res]} { - while {[regexp {\(([^\(\)]+) ([^\(\)]+) ([^\(\)]+)\)(.+)} $res dummy p t b oldres]} { - set res "[_get_options $p $t $b] $oldres" - } - } - } - } - return $res -} - -proc _get_type { name } { - set UDLIST {} - if {[file exists "$::path/adm/UDLIST"]} { - set fd [open "$::path/adm/UDLIST" rb] - set UDLIST [concat $UDLIST [split [read $fd] "\n"]] - close $fd - } - if { "$::path/adm/UDLIST" != "$::THE_CASROOT/adm/UDLIST" && [file exists "$::THE_CASROOT/adm/UDLIST"] } { - set fd [open "$::THE_CASROOT/adm/UDLIST" rb] - set UDLIST [concat $UDLIST [split [read $fd] "\n"]] - close $fd - } - - foreach uitem $UDLIST { - set line [split $uitem] - if {[lindex $line 1] == "$name"} { - return [lindex $line 0] - } - } - return "" -} - -proc _get_used_files { pk theSrcDir {inc true} {src true} } { - global path - set type [_get_type $pk] - set lret {} - set pk_path "$path/$theSrcDir/$pk" - set FILES_path "$path/$theSrcDir/$pk/FILES" - set FILES {} - if {[file exists $FILES_path]} { - set fd [open $FILES_path rb] - set FILES [split [read $fd] "\n"] - close $fd - } - set FILES [lsearch -inline -all -not -exact $FILES ""] - - set index -1 - foreach line $FILES { - incr index - if {$inc && ([regexp {([^:\s]*\.[hgl]xx)$} $line dummy name] || [regexp {([^:\s]*\.h)$} $line dummy name]) && [file exists $pk_path/$name]} { - lappend lret "pubinclude $name $pk_path/$name" - continue - } - if {[regexp {:} $line]} { - regexp {[^:]*:+([^\s]*)} $line dummy line - } - regexp {([^\s]*)} $line dummy line - if {$src && [file exists $pk_path/$line]} { - lappend lret "source $line $pk_path/$line" - } - } - return $lret -} - -# return location of the path within source directory -proc osutils:findSrcSubPath {theSrcDir theSubPath} { - if {[file exists "$::path/$theSrcDir/$theSubPath"]} { - return "$::path/$theSrcDir/$theSubPath" - } - return "$::THE_CASROOT/$theSrcDir/$theSubPath" -} - -# Auxiliary tool comparing content of two files line-by-line. -proc osutils:isEqualContent { theContent1 theContent2 } { - set aLen1 [llength $theContent1] - set aLen2 [llength $theContent2] - if { $aLen1 != $aLen2 } { - return false - } - - for {set aLineIter 0} {$aLineIter < $aLen1} {incr aLineIter} { - set aLine1 [lindex $theContent1 $aLineIter] - set aLine2 [lindex $theContent2 $aLineIter] - if { $aLine1 != $aLine2 } { - return false - } - } - return true -} - -# Auxiliary function for writing new file content only if it has been actually changed -# (e.g. to preserve file timestamp on no change). -# Useful for automatically (re)generated files. -proc osutils:writeTextFile { theFile theContent {theEol lf} {theToBackup false} } { - if {[file exists "${theFile}"]} { - set aFileOld [open "${theFile}" rb] - fconfigure $aFileOld -translation crlf - set aLineListOld [split [read $aFileOld] "\n"] - close $aFileOld - - # append empty line for proper comparison (which will be implicitly added by last puts below) - set aContent $theContent - lappend aContent "" - if { [osutils:isEqualContent $aLineListOld $aContent] == true } { - return false - } - - if { $theToBackup == true } { - puts "Warning: file ${theFile} is updated. Old content is saved to ${theFile}.bak" - file copy -force -- "${theFile}" "${theFile}.bak" - } - file delete -force "${theFile}" - } - - set anOutFile [open "$theFile" "w"] - fconfigure $anOutFile -translation $theEol - foreach aLine ${theContent} { - puts $anOutFile "${aLine}" - } - close $anOutFile - return true -} - -# Function re-generating header files for specified text resource -proc genResources { theSrcDir theResource } { - global path - - set aResFileList {} - set aResourceAbsPath [file normalize "${path}/$theSrcDir/${theResource}"] - set aResourceDirectory "" - set isResDirectory false - - if {[file isdirectory "${aResourceAbsPath}"]} { - if {[file exists "${aResourceAbsPath}/FILES"]} { - set aFilesFile [open "${aResourceAbsPath}/FILES" rb] - set aResFileList [split [read $aFilesFile] "\n"] - close $aFilesFile - } - set aResFileList [lsearch -inline -all -not -exact $aResFileList ""] - set aResourceDirectory "${theResource}" - set isResDirectory true - } else { - set aResourceName [file tail "${theResource}"] - lappend aResFileList "res:::${aResourceName}" - set aResourceDirectory [file dirname "${theResource}"] - } - - foreach aResFileIter ${aResFileList} { - if {![regexp {^[^:]+:::(.+)} "${aResFileIter}" dump aResFileIter]} { - continue - } - - set aResFileName [file tail "${aResFileIter}"] - regsub -all {\.} "${aResFileName}" {_} aResFileName - set aHeaderFileName "${aResourceDirectory}_${aResFileName}.pxx" - if { $isResDirectory == true && [lsearch $aResFileList $aHeaderFileName] == -1 } { - continue - } - - # generate - set aContent {} - lappend aContent "// This file has been automatically generated from resource file $theSrcDir/${aResourceDirectory}/${aResFileIter}" - lappend aContent "" - - # generate necessary structures - set aLineList {} - if {[file exists "${path}/$theSrcDir/${aResourceDirectory}/${aResFileIter}"]} { - set anInputFile [open "${path}/$theSrcDir/${aResourceDirectory}/${aResFileIter}" rb] - fconfigure $anInputFile -translation crlf - set aLineList [split [read $anInputFile] "\n"] - close $anInputFile - } - - # drop empty trailing line - set anEndOfFile "" - if { [lindex $aLineList end] == "" } { - set aLineList [lreplace $aLineList end end] - set anEndOfFile "\\n" - } - - lappend aContent "static const char ${aResourceDirectory}_${aResFileName}\[\] =" - set aNbLines [llength $aLineList] - set aLastLine [expr $aNbLines - 1] - for {set aLineIter 0} {$aLineIter < $aNbLines} {incr aLineIter} { - set aLine [lindex $aLineList $aLineIter] - regsub -all {\"} "${aLine}" {\\"} aLine - if { $aLineIter == $aLastLine } { - lappend aContent " \"${aLine}${anEndOfFile}\";" - } else { - lappend aContent " \"${aLine}\\n\"" - } - } - - # Save generated content to header file - set aHeaderFilePath "${path}/$theSrcDir/${aResourceDirectory}/${aHeaderFileName}" - if { [osutils:writeTextFile $aHeaderFilePath $aContent] == true } { - puts "Generating header file from resource file: ${path}/$theSrcDir/${aResourceDirectory}/${aResFileIter}" - } else { - #puts "Header file from resource ${path}/src/${aResourceDirectory}/${aResFileIter} is up-to-date" - } - } -} - -# Function re-generating header files for all text resources -proc genAllResources { theSrcDir } { - global path - set aCasRoot [file normalize $path] - if {![file exists "$aCasRoot/adm/RESOURCES"]} { - puts "OCCT directory is not defined correctly: $aCasRoot" - return - } - - set aFileResources [open "$aCasRoot/adm/RESOURCES" rb] - set anAdmResources [split [read $aFileResources] "\r\n"] - close $aFileResources - set anAdmResources [lsearch -inline -all -not -exact $anAdmResources ""] - - foreach line $anAdmResources { - genResources $theSrcDir "${line}" - } -} - -# Wrapper-function to generate VS project files -proc genproj {theFormat args} { - set aSupportedFormats { "vc7" "vc8" "vc9" "vc10" "vc11" "vc12" "vc14" "vc141" "vc142" "vc143" "vclang" "cbp" "xcd" "pro"} - set aSupportedPlatforms { "wnt" "uwp" "lin" "mac" "ios" "qnx" } - set isHelpRequire false - - # check format argument - if { $theFormat == "-h" || $theFormat == "-help" || $theFormat == "--help" } { - set isHelpRequire true - } elseif { [lsearch -exact $aSupportedFormats $theFormat] < 0 } { - puts "Error: genproj: unrecognized project format \"$theFormat\"" - set isHelpRequire true - } - - # choice of compiler for Code::Blocks, currently hard-coded - set aCmpl "gcc" - - # Determine default platform: wnt for vc*, mac for xcd, current for cbp - if { [regexp "^vc" $theFormat] } { - set aPlatform "wnt" - } elseif { $theFormat == "xcd" || $::tcl_platform(os) == "Darwin" } { - set aPlatform "mac" - } elseif { $::tcl_platform(platform) == "windows" } { - set aPlatform "wnt" - } elseif { $::tcl_platform(platform) == "unix" } { - set aPlatform "lin" - } - - # Check optional arguments - set aLibType "dynamic" - set aSolution "OCCT" - for {set anArgIter 0} {$anArgIter < [llength args]} {incr anArgIter} { - set arg [lindex $args $anArgIter] - if { $arg == "" } { - continue - } elseif { $arg == "-h" || $arg == "-help" || $arg == "--help" } { - set isHelpRequire true - } elseif { [lsearch -exact $aSupportedPlatforms $arg] >= 0 } { - set aPlatform $arg - } elseif { $arg == "-static" } { - set aLibType "static" - puts "Static build has been selected" - } elseif { $arg == "-dynamic" } { - set aLibType "dynamic" - puts "Dynamic build has been selected" - } elseif { $arg == "-solution" } { - incr anArgIter - set aSolution [lindex $args $anArgIter] - } else { - puts "Error: genproj: unrecognized option \"$arg\"" - set isHelpRequire true - } - } - - if { $isHelpRequire == true } { - puts "usage: genproj Format \[Platform\] \[-static\] \[-h|-help|--help\] - - Format must be one of: - vc8 - Visual Studio 2005 - vc9 - Visual Studio 2008 - vc10 - Visual Studio 2010 - vc11 - Visual Studio 2012 - vc12 - Visual Studio 2013 - vc14 - Visual Studio 2015 - vc141 - Visual Studio 2017 - vc142 - Visual Studio 2019 - vc143 - Visual Studio 2022 - vclang - Visual Studio with ClangCL toolset - cbp - CodeBlocks - xcd - XCode - pro - Qt Creator - - Platform (optional): - wnt - Windows Desktop - uwp - Universal Windows Platform - lin - Linux - mac - OS X - ios - iOS - qnx - QNX - - Option -static can be used with XCode to build static libraries - " - return - } - - if { ! [info exists aPlatform] } { - puts "Error: genproj: Cannon identify default platform, please specify!" - return - } - - puts "Preparing to generate $theFormat projects for $aPlatform platform..." - - # base path to where to generate projects, hardcoded from current dir - set anAdmPath [file normalize "${::path}/adm"] - - OS:MKPRC "$anAdmPath" "$theFormat" "$aLibType" "$aPlatform" "$aCmpl" "$aSolution" - - genprojbat "$theFormat" "$aPlatform" "$aSolution" - genAllResources "src" -} - -# copy file providing warning if the target file exists and has -# different date or size; if it is newer than source, save it as .bak -proc copy_with_warning {from to} { - if { [file exists "$to"] && - ([file size "$to"] != [file size "$from"] || - [file mtime "$to"] != [file mtime "$from"]) } { - puts "Warning: file $to is updated (copied from $from)!" - if { [file mtime $to] > [file mtime $from] } { - puts "Info: old content of file $to is saved in ${to}.bak" - file copy -force -- "$to" "${to}.bak" - } - } - - file copy -force -- "$from" "$to" -} - -# Generate auxiliary scripts for launching IDE. -proc genprojbat {theFormat thePlatform theSolution} { - set aTargetPlatformExt sh - set aTargetEol lf - if { $thePlatform == "wnt" || $thePlatform == "uwp" } { - set aTargetPlatformExt bat - set aTargetEol crlf - } - - if { [file exists "$::path/src/OS/FoundationClasses.tcl"] || ![file exists "$::path/env.${aTargetPlatformExt}"] } { - # generate env.bat/sh - set anEnvTmplFilePath "$::THE_CASROOT/adm/templates/env.${aTargetPlatformExt}" - set anEnvTmplFile [open "$anEnvTmplFilePath" "r"] - set anEnvTmpl [read $anEnvTmplFile] - close $anEnvTmplFile - - set aCasRoot "" - if { [file normalize "$::path"] != [file normalize "$::THE_CASROOT"] } { - set aCasRoot [relativePath "$::path" "$::THE_CASROOT"] - } - - regsub -all -- {__CASROOT__} $anEnvTmpl "$aCasRoot" anEnvTmpl - set aLineList [split $anEnvTmpl "\n"] - osutils:writeTextFile "$::path/env.${aTargetPlatformExt}" $aLineList $aTargetEol true - - copy_with_warning "$::THE_CASROOT/adm/templates/draw.${aTargetPlatformExt}" "$::path/draw.${aTargetPlatformExt}" - - if { "$::BUILD_Inspector" == "true" } { - copy_with_warning "$::THE_CASROOT/adm/templates/inspector.${aTargetPlatformExt}" "$::path/inspector.${aTargetPlatformExt}" - } - } - - set aSolShList "" - if { [regexp {^vc} $theFormat] } { - set aSolShList "msvc.bat" - } else { - switch -exact -- "$theFormat" { - "cbp" { - set aSolShList { "codeblocks.sh" "codeblocks.bat" } - # Code::Blocks 16.01 does not create directory for import libs, help him - set aPlatformAndCompiler "${thePlatform}/gcc" - if { "$thePlatform" == "mac" || "$thePlatform" == "ios" } { - set aPlatformAndCompiler "${thePlatform}/clang" - } - file mkdir "$::path/${aPlatformAndCompiler}/lib" - file mkdir "$::path/${aPlatformAndCompiler}/libd" - } - "xcd" { set aSolShList "xcode.sh" } - } - } - - foreach aSolSh $aSolShList { - set anShFile [open "$::THE_CASROOT/adm/templates/${aSolSh}" "r"] - set anShTmpl [read $anShFile] - close $anShFile - - regsub -all -- {__SOLUTION__} $anShTmpl "$theSolution" anShTmpl - - set anShFile [open "$::path/${aSolSh}" "w"] - puts $anShFile $anShTmpl - close $anShFile - } -} - -###### MSVC #############################################################33 -proc removeAllOccurrencesOf { theObject theList } { - set aSortIndices [lsort -decreasing [lsearch -all -nocase $theList $theObject]] - foreach anIndex $aSortIndices { - set theList [lreplace $theList $anIndex $anIndex] - } - return $theList -} - -set aTKNullKey "TKNull" -set THE_GUIDS_LIST($aTKNullKey) "{00000000-0000-0000-0000-000000000000}" - -# Entry function to generate project files -# @param theOutDir Root directory for project files -# @param theFormat Project format name (vc.. for Visual Studio projects, cbp for Code::Blocks, xcd for XCode) -# @param theLibType Library type - dynamic or static -# @param thePlatform Optional target platform for cross-compiling, e.g. ios for iOS -# @param theCmpl Compiler option (msvc or gcc) -# @param theSolution Solution name -proc OS:MKPRC { theOutDir theFormat theLibType thePlatform theCmpl theSolution } { - global path - set anOutRoot $theOutDir - if { $anOutRoot == "" } { - error "Error : \"theOutDir\" is not initialized" - } - - # Create output directory - set aWokStation "$thePlatform" - if { [regexp {^vc} $theFormat] } { - set aWokStation "msvc" - } - set aSuffix "" - set isUWP 0 - if { $thePlatform == "uwp" } { - set aSuffix "-uwp" - set isUWP 1 - } - set anOutDir "${anOutRoot}/${aWokStation}/${theFormat}${aSuffix}" - - # read map of already generated GUIDs - set aGuidsFilePath [file join $anOutDir "wok_${theFormat}_guids.txt"] - if [file exists "$aGuidsFilePath"] { - set aFileIn [open "$aGuidsFilePath" r] - set aFileDataRaw [read $aFileIn] - close $aFileIn - set aFileData [split $aFileDataRaw "\n"] - foreach aLine $aFileData { - set aLineSplt [split $aLine "="] - if { [llength $aLineSplt] == 2 } { - set ::THE_GUIDS_LIST([lindex $aLineSplt 0]) [lindex $aLineSplt 1] - } - } - } - - # make list of modules and platforms - set aModules [OS:init OS Modules] - if { [llength $aModules] == 0 } { - set aModules [OS:init VAS Products] - } - if { "$thePlatform" == "ios" } { - set goaway [list Draw] - set aModules [osutils:juststation $goaway $aModules] - } - - # Draw module is turned off due to it is not supported on UWP - if { $isUWP } { - set aDrawIndex [lsearch -exact ${aModules} "Draw"] - if { ${aDrawIndex} != -1 } { - set aModules [lreplace ${aModules} ${aDrawIndex} ${aDrawIndex}] - } - } - - # create the out dir if it does not exist - if (![file isdirectory $path/inc]) { - puts "$path/inc folder does not exists and will be created" - wokUtils:FILES:mkdir $path/inc - } - - # collect all required header files - puts "Collecting required header files into $path/inc ..." - osutils:collectinc $aModules "src" $path/inc - - # make list of Inspector tools - set aTools {} - if { "$::BUILD_Inspector" == "true" } { - set aTools [OS:init OS Tools] - if { [llength $aTools] == 0 } { - set aTools [OS:init VAS Tools] - } - - # create the out dir if it does not exist - if (![file isdirectory $path/inc/inspector]) { - puts "$path/inc/inspector folder does not exists and will be created" - wokUtils:FILES:mkdir $path/inc/inspector - } - - # collect all required header files - puts "Collecting required tools header files into $path/inc/inspector ..." - osutils:collectinc $aTools "tools" $path/inc/inspector - } - - if { "$theFormat" == "pro" } { - return - } - - wokUtils:FILES:mkdir $anOutDir - if { ![file exists $anOutDir] } { - puts stderr "Error: Could not create output directory \"$anOutDir\"" - return - } - - # Generating project files for the selected format - switch -exact -- "$theFormat" { - "vc7" - - "vc8" - - "vc9" - - "vc10" - - "vc11" - - "vc12" - - "vc14" - - "vc141" - - "vc142" - - "vc143" - - "vclang" { OS:MKVC $anOutDir $aModules $aTools $theSolution $theFormat $isUWP} - "cbp" { OS:MKCBP $anOutDir $aModules $theSolution $thePlatform $theCmpl } - "xcd" { - set ::THE_GUIDS_LIST($::aTKNullKey) "000000000000000000000000" - OS:MKXCD $anOutDir $aModules $theSolution $theLibType $thePlatform - } - } - - # Store generated GUIDs map - set anOutFile [open "$aGuidsFilePath" "w"] - fconfigure $anOutFile -translation lf - foreach aKey [array names ::THE_GUIDS_LIST] { - set aValue $::THE_GUIDS_LIST($aKey) - puts $anOutFile "${aKey}=${aValue}" - } - close $anOutFile -} - -# Function to generate Visual Studio solution and project files -proc OS:MKVC { theOutDir theModules theTools theAllSolution theVcVer isUWP } { - - puts stderr "Generating VS project files for $theVcVer" - - # generate projects for toolkits and separate solution for each module - foreach aModule $theModules { - OS:vcsolution $theVcVer $aModule $aModule $theOutDir ::THE_GUIDS_LIST "src" "" "" - OS:vcproj $theVcVer $isUWP $aModule $theOutDir ::THE_GUIDS_LIST "src" "" - } - - # generate projects for toolkits and separate solution for each tool - foreach aTool $theTools { - OS:vcsolution $theVcVer $aTool $aTool $theOutDir ::THE_GUIDS_LIST "tools" "" "src" - OS:vcproj $theVcVer $isUWP $aTool $theOutDir ::THE_GUIDS_LIST "tools" "src" - } - - # generate single solution "OCCT" containing projects from all modules - if { "$theAllSolution" != "" } { - OS:vcsolution $theVcVer $theAllSolution $theModules $theOutDir ::THE_GUIDS_LIST "src" $theTools "tools" - } - - puts "The Visual Studio solution and project files are stored in the $theOutDir directory" -} - -proc OS:init {theVas theNameOfDefFile {os {}}} { - set askplat $os - set aModules {} - if { "$os" == "" } { - set os $::tcl_platform(os) - } - - if { ![file exists "$::path/src/${theVas}/${theNameOfDefFile}.tcl"]} { - return $aModules - } - - # Load list of OCCT modules and their definitions - source "$::path/src/${theVas}/${theNameOfDefFile}.tcl" - foreach aModuleIter [${theVas}:${theNameOfDefFile}] { - set aFileTcl "$::path/src/${theVas}/${aModuleIter}.tcl" - if [file exists $aFileTcl] { - source $aFileTcl - lappend aModules $aModuleIter - } else { - puts stderr "Definition file for $aModuleIter is not found in unit ${theVas}" - } - } - - return $aModules -} - -# topological sort. returns a list { {a h} {b g} {c f} {c h} {d i} } => { d a b c i g f h } -proc wokUtils:EASY:tsort { listofpairs } { - foreach x $listofpairs { - set e1 [lindex $x 0] - set e2 [lindex $x 1] - if ![info exists pcnt($e1)] { - set pcnt($e1) 0 - } - if ![ info exists pcnt($e2)] { - set pcnt($e2) 1 - } else { - incr pcnt($e2) - } - if ![info exists scnt($e1)] { - set scnt($e1) 1 - } else { - incr scnt($e1) - } - set l {} - if [info exists slist($e1)] { - set l $slist($e1) - } - lappend l $e2 - set slist($e1) $l - } - set nodecnt 0 - set back 0 - foreach node [array names pcnt] { - incr nodecnt - if { $pcnt($node) == 0 } { - incr back - set q($back) $node - } - if ![info exists scnt($node)] { - set scnt($node) 0 - } - } - set res {} - for {set front 1} { $front <= $back } { incr front } { - lappend res [set node $q($front)] - for {set i 1} {$i <= $scnt($node) } { incr i } { - set ll $slist($node) - set j [expr {$i - 1}] - set u [expr { $pcnt([lindex $ll $j]) - 1 }] - if { [set pcnt([lindex $ll $j]) $u] == 0 } { - incr back - set q($back) [lindex $ll $j] - } - } - } - if { $back != $nodecnt } { - puts stderr "input contains a cycle" - return {} - } else { - return $res - } -} - -proc wokUtils:LIST:Purge { l } { - set r {} - foreach e $l { - if ![info exist tab($e)] { - lappend r $e - set tab($e) {} - } - } - return $r -} - -# Read file pointed to by path -# 1. sort = 1 tri -# 2. trim = 1 plusieurs blancs => 1 seul blanc -# 3. purge= not yet implemented. -# 4. emptl= dont process blank lines -proc wokUtils:FILES:FileToList { path {sort 0} {trim 0} {purge 0} {emptl 1} } { - if ![ catch { set id [ open $path r ] } ] { - set l {} - while {[gets $id line] >= 0 } { - if { $trim } { - regsub -all {[ ]+} $line " " line - } - if { $emptl } { - if { [string length ${line}] != 0 } { - lappend l $line - } - } else { - lappend l $line - } - } - close $id - if { $sort } { - return [lsort $l] - } else { - return $l - } - } else { - return {} - } -} - -# retorn the list of executables in module. -proc OS:executable { module } { - set lret {} - foreach XXX [${module}:ressources] { - if { "[lindex $XXX 1]" == "x" } { - lappend lret [lindex $XXX 2] - } - } - return $lret -} - -# Topological sort of toolkits in tklm -proc osutils:tk:sort { tklm theSrcDir theSourceDirOther } { - set tkby2 {} - foreach tkloc $tklm { - set lprg [wokUtils:LIST:Purge [osutils:tk:close $tkloc $theSrcDir $theSourceDirOther]] - foreach tkx $lprg { - if { [lsearch $tklm $tkx] != -1 } { - lappend tkby2 [list $tkx $tkloc] - } else { - lappend tkby2 [list $tkloc {}] - } - } - } - set lret {} - foreach e [wokUtils:EASY:tsort $tkby2] { - if { $e != {} } { - lappend lret $e - } - } - return $lret -} - -# close dependencies of ltk. (full work paths of toolkits) -# The CURRENT WOK LOCATION MUST contains ALL TOOLKITS required. -# (locate not performed.) -proc osutils:tk:close { ltk theSrcDir theSourceDirOther } { - set result {} - set recurse {} - foreach dir $ltk { - set ids [LibToLink $dir $theSrcDir $theSourceDirOther] -# puts "osutils:tk:close($ltk) ids='$ids'" - set eated [osutils:tk:eatpk $ids] - set result [concat $result $eated] - set ids [LibToLink $dir $theSrcDir $theSourceDirOther] - set result [concat $result $ids] - - foreach file $eated { - set kds [osutils:findSrcSubPath $theSrcDir "$file/EXTERNLIB"] - if { [osutils:tk:eatpk $kds] != {} } { - lappend recurse $file - } - } - } - if { $recurse != {} } { - set result [concat $result [osutils:tk:close $recurse $theSrcDir $theSourceDirOther]] - } - return $result -} - -proc osutils:tk:eatpk { EXTERNLIB } { - set l [wokUtils:FILES:FileToList $EXTERNLIB] - set lret {} - foreach str $l { - if ![regexp -- {(CSF_[^ ]*)} $str csf] { - lappend lret $str - } - } - return $lret -} -# Define libraries to link using only EXTERNLIB file - -proc LibToLink {theTKit theSrcDir theSourceDirOther} { - regexp {^.*:([^:]+)$} $theTKit dummy theTKit - set type [_get_type $theTKit] - if {$type != "t" && $type != "x"} { - return - } - set aToolkits {} - set anExtLibList [osutils:tk:eatpk [osutils:findSrcSubPath $theSrcDir "$theTKit/EXTERNLIB"]] - foreach anExtLib $anExtLibList { - set aFullPath [LocateRecur $anExtLib $theSrcDir] - if { "$aFullPath" == "" && "$theSourceDirOther" != "" } { - set aFullPath [LocateRecur $anExtLib $theSourceDirOther] - } - if { "$aFullPath" != "" && [_get_type $anExtLib] == "t" } { - lappend aToolkits $anExtLib - } - } - return $aToolkits -} -# Search unit recursively - -proc LocateRecur {theName theSrcDir} { - set theNamePath [osutils:findSrcSubPath $theSrcDir "$theName"] - if {[file isdirectory $theNamePath]} { - return $theNamePath - } - return "" -} - -proc OS:genGUID { {theFormat "vc"} } { - if { "$theFormat" == "vc" } { - set p1 "[format %07X [expr { int(rand() * 268435456) }]][format %X [expr { int(rand() * 16) }]]" - set p2 "[format %04X [expr { int(rand() * 6536) }]]" - set p3 "[format %04X [expr { int(rand() * 6536) }]]" - set p4 "[format %04X [expr { int(rand() * 6536) }]]" - set p5 "[format %06X [expr { int(rand() * 16777216) }]][format %06X [expr { int(rand() * 16777216) }]]" - return "{$p1-$p2-$p3-$p4-$p5}" - } else { - set p1 "[format %04X [expr { int(rand() * 6536) }]]" - set p2 "[format %04X [expr { int(rand() * 6536) }]]" - set p3 "[format %04X [expr { int(rand() * 6536) }]]" - set p4 "[format %04X [expr { int(rand() * 6536) }]]" - set p5 "[format %04X [expr { int(rand() * 6536) }]]" - set p6 "[format %04X [expr { int(rand() * 6536) }]]" - return "$p1$p2$p3$p4$p5$p6" - } -} - -# collect all include file that required for theModules in theOutDir -proc osutils:collectinc {theModules theSrcDir theIncPath} { - global path - set aCasRoot [file normalize $path] - set anIncPath [file normalize $theIncPath] - - if {![file isdirectory $aCasRoot]} { - puts "OCCT directory is not defined correctly: $aCasRoot" - return - } - - set anUsedToolKits {} - foreach aModule $theModules { - foreach aToolKit [${aModule}:toolkits] { - lappend anUsedToolKits $aToolKit - - foreach aDependency [LibToLink $aToolKit $theSrcDir ""] { - lappend anUsedToolKits $aDependency - } - } - foreach anExecutable [OS:executable ${aModule}] { - lappend anUsedToolKits $anExecutable - - foreach aDependency [LibToLink $anExecutable $theSrcDir ""] { - lappend anUsedToolKits $aDependency - } - } - } - set anUsedToolKits [lsort -unique $anUsedToolKits] - - set anUnits {} - foreach anUsedToolKit $anUsedToolKits { - set anUnits [concat $anUnits [osutils:tk:units $anUsedToolKit $theSrcDir] ] - } - set anUnits [lsort -unique $anUnits] - - # define copying style - set aCopyType "copy" - if { [info exists ::env(SHORTCUT_HEADERS)] } { - if { [string equal -nocase $::env(SHORTCUT_HEADERS) "hard"] - || [string equal -nocase $::env(SHORTCUT_HEADERS) "hardlink"] } { - set aCopyType "hardlink" - } elseif { [string equal -nocase $::env(SHORTCUT_HEADERS) "true"] - || [string equal -nocase $::env(SHORTCUT_HEADERS) "shortcut"] } { - set aCopyType "shortcut" - } - } - - set allHeaderFiles {} - if { $aCopyType == "shortcut" } { - # template preparation - if { ![file exists $::THE_CASROOT/adm/templates/header.in] } { - puts "template file does not exist: $::THE_CASROOT/adm/templates/header.in" - return - } - set aHeaderTmpl [wokUtils:FILES:FileToString $::THE_CASROOT/adm/templates/header.in] - - # relative anIncPath in connection with aCasRoot/$theSrcDir - set aFromBuildIncToSrcPath [relativePath "$anIncPath" "$aCasRoot/$theSrcDir"] - - # create and copy shortcut header files - foreach anUnit $anUnits { - osutils:checksrcfiles ${anUnit} $theSrcDir - - set aHFiles [_get_used_files ${anUnit} $theSrcDir true false] - foreach aHeaderFile ${aHFiles} { - set aHeaderFileName [lindex ${aHeaderFile} 1] - lappend allHeaderFiles "${aHeaderFileName}" - - regsub -all -- {@OCCT_HEADER_FILE_CONTENT@} $aHeaderTmpl "#include \"$aFromBuildIncToSrcPath/$anUnit/$aHeaderFileName\"" aShortCutHeaderFileContent - - if {[file exists "$theIncPath/$aHeaderFileName"] && [file readable "$theIncPath/$aHeaderFileName"]} { - set fp [open "$theIncPath/$aHeaderFileName" r] - set aHeaderContent [read $fp] - close $fp - - # minus eof - set aHeaderLenght [expr [string length $aHeaderContent] - 1] - - if {$aHeaderLenght == [string length $aShortCutHeaderFileContent]} { - # remove eof from string - set aHeaderContent [string range $aHeaderContent 0 [expr $aHeaderLenght - 1]] - - if {[string compare $aShortCutHeaderFileContent $aHeaderContent] == 0} { - continue - } - } - file delete -force "$theIncPath/$aHeaderFileName" - } - - set aShortCutHeaderFile [open "$theIncPath/$aHeaderFileName" "w"] - fconfigure $aShortCutHeaderFile -translation lf - puts $aShortCutHeaderFile $aShortCutHeaderFileContent - close $aShortCutHeaderFile - } - } - } else { - set nbcopied 0 - foreach anUnit $anUnits { - osutils:checksrcfiles ${anUnit} $theSrcDir - - set aHFiles [_get_used_files ${anUnit} $theSrcDir true false] - foreach aHeaderFile ${aHFiles} { - set aHeaderFileName [lindex ${aHeaderFile} 1] - lappend allHeaderFiles "${aHeaderFileName}" - - # copy file only if target does not exist or is older than original - set torig [file mtime $aCasRoot/$theSrcDir/$anUnit/$aHeaderFileName] - set tcopy 0 - if { [file isfile $anIncPath/$aHeaderFileName] } { - set tcopy [file mtime $anIncPath/$aHeaderFileName] - } - if { $tcopy < $torig } { - incr nbcopied - if { $aCopyType == "hardlink" } { - if { $tcopy != 0 } { - file delete -force "$theIncPath/$aHeaderFileName" - } - file link -hard $anIncPath/$aHeaderFileName $aCasRoot/$theSrcDir/$anUnit/$aHeaderFileName - } else { - file copy -force $aCasRoot/$theSrcDir/$anUnit/$aHeaderFileName $anIncPath/$aHeaderFileName - } - } elseif { $tcopy != $torig } { - puts "Warning: file $anIncPath/$aHeaderFileName is newer than $aCasRoot/$theSrcDir/$anUnit/$aHeaderFileName, not changed!" - } - } - } - puts "Info: $nbcopied files updated" - } - - # remove header files not listed in FILES - set anIncFiles [glob -tails -nocomplain -dir ${anIncPath} "*"] - foreach anIncFile ${anIncFiles} { - if { [lsearch -exact ${allHeaderFiles} ${anIncFile}] == -1 } { - puts "Warning: file ${anIncPath}/${anIncFile} is not present in the sources and will be removed from ${theIncPath}" - file delete -force "${theIncPath}/${anIncFile}" - } - } -} - -# Generate header for VS solution file -proc osutils:vcsolution:header { vcversion } { - if { "$vcversion" == "vc7" } { - append var \ - "Microsoft Visual Studio Solution File, Format Version 8.00\n" - } elseif { "$vcversion" == "vc8" } { - append var \ - "Microsoft Visual Studio Solution File, Format Version 9.00\n" \ - "# Visual Studio 2005\n" - } elseif { "$vcversion" == "vc9" } { - append var \ - "Microsoft Visual Studio Solution File, Format Version 10.00\n" \ - "# Visual Studio 2008\n" - } elseif { "$vcversion" == "vc10" } { - append var \ - "Microsoft Visual Studio Solution File, Format Version 11.00\n" \ - "# Visual Studio 2010\n" - } elseif { "$vcversion" == "vc11" } { - append var \ - "Microsoft Visual Studio Solution File, Format Version 12.00\n" \ - "# Visual Studio 2012\n" - } elseif { "$vcversion" == "vc12" } { - append var \ - "Microsoft Visual Studio Solution File, Format Version 12.00\n" \ - "# Visual Studio 2013\n" - } elseif { "$vcversion" == "vc14" || "$vcversion" == "vc141" || - "$vcversion" == "vc142" || "$vcversion" == "vc143" || "$vcversion" == "vclang" } { - append var \ - "Microsoft Visual Studio Solution File, Format Version 12.00\n" \ - "# Visual Studio 14\n" - } else { - puts stderr "Error: Visual Studio version $vcversion is not supported by this function!" - } - return $var -} -# Returns extension (without dot) for project files of given version of VC - -proc osutils:vcproj:ext { vcversion } { - if { "$vcversion" == "vc7" || "$vcversion" == "vc8" || "$vcversion" == "vc9" } { - return "vcproj" - } else { - return "vcxproj" - } -} -# Generate start of configuration section of VS solution file - -proc osutils:vcsolution:config:begin { vcversion } { - if { "$vcversion" == "vc7" } { - append var \ - "Global\n" \ - "\tGlobalSection(SolutionConfiguration) = preSolution\n" \ - "\t\tDebug = Debug\n" \ - "\t\tRelease = Release\n" \ - "\tEndGlobalSection\n" \ - "\tGlobalSection(ProjectConfiguration) = postSolution\n" - } else { - append var \ - "Global\n" \ - "\tGlobalSection(SolutionConfigurationPlatforms) = preSolution\n" \ - "\t\tDebug|Win32 = Debug|Win32\n" \ - "\t\tRelease|Win32 = Release|Win32\n" \ - "\t\tDebug|x64 = Debug|x64\n" \ - "\t\tRelease|x64 = Release|x64\n" \ - "\tEndGlobalSection\n" \ - "\tGlobalSection(ProjectConfigurationPlatforms) = postSolution\n" - } - return $var -} -# Generate part of configuration section of VS solution file describing one project - -proc osutils:vcsolution:config:project { vcversion guid } { - if { "$vcversion" == "vc7" } { - append var \ - "\t\t$guid.Debug.ActiveCfg = Debug|Win32\n" \ - "\t\t$guid.Debug.Build.0 = Debug|Win32\n" \ - "\t\t$guid.Release.ActiveCfg = Release|Win32\n" \ - "\t\t$guid.Release.Build.0 = Release|Win32\n" - } else { - append var \ - "\t\t$guid.Debug|Win32.ActiveCfg = Debug|Win32\n" \ - "\t\t$guid.Debug|Win32.Build.0 = Debug|Win32\n" \ - "\t\t$guid.Release|Win32.ActiveCfg = Release|Win32\n" \ - "\t\t$guid.Release|Win32.Build.0 = Release|Win32\n" \ - "\t\t$guid.Debug|x64.ActiveCfg = Debug|x64\n" \ - "\t\t$guid.Debug|x64.Build.0 = Debug|x64\n" \ - "\t\t$guid.Release|x64.ActiveCfg = Release|x64\n" \ - "\t\t$guid.Release|x64.Build.0 = Release|x64\n" - } - return $var -} -# Generate start of configuration section of VS solution file - -proc osutils:vcsolution:config:end { vcversion } { - if { "$vcversion" == "vc7" } { - append var \ - "\tEndGlobalSection\n" \ - "\tGlobalSection(ExtensibilityGlobals) = postSolution\n" \ - "\tEndGlobalSection\n" \ - "\tGlobalSection(ExtensibilityAddIns) = postSolution\n" \ - "\tEndGlobalSection\n" - } else { - append var \ - "\tEndGlobalSection\n" \ - "\tGlobalSection(SolutionProperties) = preSolution\n" \ - "\t\tHideSolutionNode = FALSE\n" \ - "\tEndGlobalSection\n" - } - return $var -} -# generate Visual Studio solution file -# if module is empty, generates one solution for all known modules - -proc OS:vcsolution { theVcVer theSolName theModules theOutDir theGuidsMap theSrcDir theModulesOther theSourceDirOther } { - global path - upvar $theGuidsMap aGuidsMap - - # collect list of projects to be created - set aProjects {} - set aDependencies {} - - osutils:convertModules $theModules $theSrcDir $theSourceDirOther aProjects aProjectsInModule aDependencies - osutils:convertModules $theModulesOther $theSourceDirOther $theSrcDir aProjects aProjectsInModule aDependencies - -# generate GUIDs for projects (unless already known) - foreach aProject $aProjects { - if { ! [info exists aGuidsMap($aProject)] } { - set aGuidsMap($aProject) [OS:genGUID] - } - } - - # generate solution file -# puts "Generating Visual Studio ($theVcVer) solution file for $theSolName ($aProjects)" - append aFileBuff [osutils:vcsolution:header $theVcVer] - - # GUID identifying group projects in Visual Studio - set VC_GROUP_GUID "{2150E333-8FDC-42A3-9474-1A3956D46DE8}" - - # generate group projects -- one per module - if { "$theVcVer" != "vc7" && [llength "$theModules"] > 1 } { - foreach aModule $theModules { - if { ! [info exists aGuidsMap(_$aModule)] } { - set aGuidsMap(_$aModule) [OS:genGUID] - } - set aGuid $aGuidsMap(_$aModule) - append aFileBuff "Project(\"${VC_GROUP_GUID}\") = \"$aModule\", \"$aModule\", \"$aGuid\"\nEndProject\n" - } - } - - if { "$theVcVer" != "vc7" && [llength "$theModulesOther"] > 1 } { - set aModule "Tools" - if { ! [info exists aGuidsMap(_$aModule)] } { - set aGuidsMap(_$aModule) [OS:genGUID] - } - set aGuid $aGuidsMap(_$aModule) - append aFileBuff "Project(\"${VC_GROUP_GUID}\") = \"$aModule\", \"$aModule\", \"$aGuid\"\nEndProject\n" - } - - # extension of project files - set aProjExt [osutils:vcproj:ext $theVcVer] - - # GUID identifying C++ projects in Visual Studio - set VC_CPP_GUID "{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}" - - # generate normal projects - set aProjsNb [llength $aProjects] - for {set aProjId 0} {$aProjId < $aProjsNb} {incr aProjId} { - set aProj [lindex $aProjects $aProjId] - set aGuid $aGuidsMap($aProj) - append aFileBuff "Project(\"${VC_CPP_GUID}\") = \"$aProj\", \"$aProj.${aProjExt}\", \"$aGuid\"\n" - # write projects dependencies information (vc7 to vc9) - set aDepGuids "" - foreach aDepLib [lindex $aDependencies $aProjId] { - if { $aDepLib != $aProj && [lsearch $aProjects $aDepLib] != "-1" } { - set depGUID $aGuidsMap($aDepLib) - append aDepGuids "\t\t$depGUID = $depGUID\n" - } - } - if { "$aDepGuids" != "" } { - append aFileBuff "\tProjectSection(ProjectDependencies) = postProject\n" - append aFileBuff "$aDepGuids" - append aFileBuff "\tEndProjectSection\n" - } - append aFileBuff "EndProject\n" - } - - # generate configuration section - append aFileBuff [osutils:vcsolution:config:begin $theVcVer] - foreach aProj $aProjects { - append aFileBuff [osutils:vcsolution:config:project $theVcVer $aGuidsMap($aProj)] - } - append aFileBuff [osutils:vcsolution:config:end $theVcVer] - - # write information of grouping of projects by module - if { "$theVcVer" != "vc7" && [llength "$theModules"] > 1 } { - append aFileBuff " GlobalSection(NestedProjects) = preSolution\n" - foreach aModule $theModules { - if { ! [info exists aProjectsInModule($aModule)] } { continue } - foreach aProject $aProjectsInModule($aModule) { - append aFileBuff " $aGuidsMap($aProject) = $aGuidsMap(_$aModule)\n" - } - } - set aToolsName "Tools" - foreach aModule $theModulesOther { - if { ! [info exists aProjectsInModule($aModule)] } { continue } - foreach aProject $aProjectsInModule($aModule) { - append aFileBuff " $aGuidsMap($aProject) = $aGuidsMap(_$aToolsName)\n" - } - } - append aFileBuff " EndGlobalSection\n" - } - - # final word (footer) - append aFileBuff "EndGlobal" - - # write solution - set aFile [open [set fdsw [file join $theOutDir ${theSolName}.sln]] w] - fconfigure $aFile -translation crlf - puts $aFile $aFileBuff - close $aFile - return [file join $theOutDir ${theSolName}.sln] -} - -# Generate auxiliary containers with information about modules. -# @param theModules List of modules -# @param theSrcDir Directory of module toolkits -# @param theSourceDirOther Directory with other additional sources to find out toolkits in dependencies -# @param theProjects list of all found projects/toolkits -# @param theProjectsInModule map of module into toolkits/projects -# @param theDependencies list of the project dependencies. To find the project dependencies, get it by the index in project container -proc osutils:convertModules { theModules theSrcDir theSourceDirOther theProjects theProjectsInModule theDependencies } { - global path - upvar $theProjectsInModule aProjectsInModule - upvar $theProjects aProjects - upvar $theDependencies aDependencies - - foreach aModule $theModules { - # toolkits - foreach aToolKit [osutils:tk:sort [${aModule}:toolkits] $theSrcDir $theSourceDirOther] { - lappend aProjects $aToolKit - lappend aProjectsInModule($aModule) $aToolKit - lappend aDependencies [LibToLink $aToolKit $theSrcDir $theSourceDirOther] - } - # executables - foreach aUnit [OS:executable ${aModule}] { - lappend aProjects $aUnit - lappend aProjectsInModule($aModule) $aUnit - lappend aDependencies [LibToLink $aUnit $theSrcDir $theSourceDirOther] - } - } -} -# Generate Visual Studio projects for specified version - -proc OS:vcproj { theVcVer isUWP theModules theOutDir theGuidsMap theSrcDir theSourceDirOther } { - upvar $theGuidsMap aGuidsMap - - set aProjectFiles {} - - foreach aModule $theModules { - foreach aToolKit [${aModule}:toolkits] { - lappend aProjectFiles [osutils:vcproj $theVcVer $isUWP $theOutDir $aToolKit aGuidsMap $theSrcDir $theSourceDirOther] - } - foreach anExecutable [OS:executable ${aModule}] { - lappend aProjectFiles [osutils:vcprojx $theVcVer $isUWP $theOutDir $anExecutable aGuidsMap $theSrcDir $theSourceDirOther] - } - } - return $aProjectFiles -} -# generate template name and load it for given version of Visual Studio and platform - -proc osutils:vcproj:readtemplate {theVcVer isUWP isExec} { - set anExt $theVcVer - if { "$theVcVer" != "vc7" && "$theVcVer" != "vc8" && "$theVcVer" != "vc9" } { - set anExt vc10 - } - - # determine versions of runtime and toolset - set aVCRTVer $theVcVer - set aToolset "v[string range $theVcVer 2 3]0" - if { $theVcVer == "vc141" } { - set aVCRTVer "vc14" - set aToolset "v141" - } elseif { $theVcVer == "vc142" } { - set aVCRTVer "vc14" - set aToolset "v142" - } elseif { $theVcVer == "vc143" } { - set aVCRTVer "vc14" - set aToolset "v143" - } elseif { $theVcVer == "vclang" } { - set aVCRTVer "vc14" - set aToolset "ClangCL" - } - - set what "$theVcVer" - set aCmpl32 "" - set aCmpl64 "" - set aCharSet "Unicode" - if { $isExec } { - set anExt "${anExt}x" - set what "$what executable" - } - if { "$theVcVer" == "vc10" } { - # SSE2 is enabled by default in vc11+, but not in vc10 for 32-bit target - set aCmpl32 "StreamingSIMDExtensions2" - } - set aTmpl [osutils:readtemplate $anExt "MS VC++ project ($what)"] - - if { $isUWP } { - set UwpWinRt "false" - foreach bitness {32 64} { - set indent "" - if {"[set aCmpl${bitness}]" != ""} { - set indent "\n " - } - set aCmpl${bitness} "[set aCmpl${bitness}]${indent}${UwpWinRt}" - } - } - - set format_template "\[\\r\\n\\s\]*" - foreach bitness {32 64} { - set format_templateloc "" - if {"[set aCmpl${bitness}]" == ""} { - set format_templateloc "$format_template" - } - regsub -all -- "${format_templateloc}__VCMPL${bitness}__" $aTmpl "[set aCmpl${bitness}]" aTmpl - } - - set aDebugInfo "no" - set aReleaseLnk "" - if { "$::HAVE_RelWithDebInfo" == "true" } { - set aDebugInfo "true" - set aReleaseLnk "\n true\n true" - } - - regsub -all -- {__VCVER__} $aTmpl $aVCRTVer aTmpl - regsub -all -- {__VCVEREXT__} $aTmpl $aToolset aTmpl - regsub -all -- {__VCCHARSET__} $aTmpl $aCharSet aTmpl - regsub -all -- {__VCReleasePDB__} $aTmpl $aDebugInfo aTmpl - regsub -all -- "${format_template}__VCLNKREL__" $aTmpl "${aReleaseLnk}" aTmpl - - return $aTmpl -} - -proc osutils:readtemplate {ext what} { - set loc "$::THE_CASROOT/adm/templates/template.$ext" - return [wokUtils:FILES:FileToString $loc] -} -# Read a file in a string as is. - -proc wokUtils:FILES:FileToString { fin } { - if { [catch { set in [ open $fin r ] } errin] == 0 } { - set strin [read $in [file size $fin]] - close $in - return $strin - } else { - return {} - } -} - -# List extensions of compilable files in OCCT -proc osutils:compilable {thePlatform} { - if { "$thePlatform" == "mac" || "$thePlatform" == "ios" } { return [list .c .cxx .cpp .mm] } - return [list .c .cxx .cpp] -} - -# List extensions of header file in OCCT -proc osutils:fileExtensionsHeaders {thePlatform} { - if { "$thePlatform" == "mac" || "$thePlatform" == "ios" } { return [list .h .hxx .hpp .lxx .pxx .gxx ] } - return [list .h .hxx .hpp .lxx .pxx .gxx .mm ] -} - -# List extensions of Qt resource file in OCCT -proc osutils:fileExtensionsResources {thePlatform} { - return [list .qrc ] -} - -proc osutils:commonUsedTK { theToolKit theSrcDir theSourceDirOther} { - set anUsedToolKits [list] - set aDepToolkits [LibToLink $theToolKit $theSrcDir $theSourceDirOther] - foreach tkx $aDepToolkits { - if {[_get_type $tkx] == "t"} { - lappend anUsedToolKits "${tkx}" - } - } - return $anUsedToolKits -} - -# Return the list of name *CSF_ in a EXTERNLIB description of a toolkit -proc osutils:tk:csfInExternlib { EXTERNLIB } { - set l [wokUtils:FILES:FileToList $EXTERNLIB] - set lret {STLPort} - foreach str $l { - if [regexp -- {(CSF_[^ ]*)} $str csf] { - lappend lret $csf - } - } - return $lret -} - -# Collect dependencies map depending on target OS (libraries for CSF_ codenames used in EXTERNLIB) . -# @param theOS - target OS -# @param theCsfLibsMap - libraries map -# @param theCsfFrmsMap - frameworks map, OS X specific -proc osutils:csfList { theOS theCsfLibsMap theCsfFrmsMap theRelease} { - upvar $theCsfLibsMap aLibsMap - upvar $theCsfFrmsMap aFrmsMap - - unset theCsfLibsMap - unset theCsfFrmsMap - - if { "$::HAVE_FREETYPE" == "true" } { - set aLibsMap(CSF_FREETYPE) "freetype" - } - set aLibsMap(CSF_TclLibs) "tcl8.6" - if { "$::HAVE_TK" == "true" } { - set aLibsMap(CSF_TclTkLibs) "tk8.6" - } - if { "$::HAVE_FREEIMAGE" == "true" } { - if { "$theOS" == "wnt" } { - set aLibsMap(CSF_FreeImagePlus) "FreeImage" - } else { - set aLibsMap(CSF_FreeImagePlus) "freeimage" - } - } elseif { "$theOS" == "wnt" } { - set aLibsMap(CSF_FreeImagePlus) "windowscodecs" - } - if { "$::HAVE_FFMPEG" == "true" } { - set aLibsMap(CSF_FFmpeg) "avcodec avformat swscale avutil" - } - if { "$::HAVE_TBB" == "true" } { - set aLibsMap(CSF_TBB) "tbb tbbmalloc" - } - if { "$::HAVE_VTK" == "true" } { - if { "$theOS" == "wnt" } { - set aLibsMap(CSF_VTK) [osutils:vtkCsf "wnt"] - } else { - set aLibsMap(CSF_VTK) [osutils:vtkCsf "unix"] - } - } - if { "$::HAVE_ZLIB" == "true" } { - set aLibsMap(CSF_ZLIB) "z" - } - if { "$::HAVE_LIBLZMA" == "true" } { - set aLibsMap(CSF_LIBLZMA) "liblzma" - } - if { "$::HAVE_DRACO" == "true" } { - set aLibsMap(CSF_Draco) "draco" - } - if { "$::HAVE_OPENVR" == "true" } { - set aLibsMap(CSF_OpenVR) "openvr_api" - } - if { "$::HAVE_E57" == "true" && "$theOS" != "wnt" } { - # exclude wnt, as there are different pragma lib depending on debug/release - set aLibsMap(CSF_E57) "E57RefImpl" - set aLibsMap(CSF_xerces) "xerces-c" - } - - if { "$theOS" == "wnt" } { - # WinAPI libraries - set aLibsMap(CSF_kernel32) "kernel32" - set aLibsMap(CSF_advapi32) "advapi32" - set aLibsMap(CSF_gdi32) "gdi32" - set aLibsMap(CSF_user32) "user32 comdlg32" - set aLibsMap(CSF_shell32) "shell32" - set aLibsMap(CSF_opengl32) "opengl32" - set aLibsMap(CSF_wsock32) "wsock32" - set aLibsMap(CSF_netapi32) "netapi32" - set aLibsMap(CSF_winmm) "winmm" - set aLibsMap(CSF_OpenGlLibs) "opengl32" - set aLibsMap(CSF_OpenGlesLibs) "libEGL libGLESv2" - set aLibsMap(CSF_psapi) "Psapi" - set aLibsMap(CSF_d3d9) "d3d9" - - # the naming is different on Windows - set aLibsMap(CSF_TclLibs) "tcl86" - if { "$::HAVE_TK" == "true" } { - set aLibsMap(CSF_TclTkLibs) "tk86" - } - if { "$theRelease" == "true" } { - set aLibsMap(CSF_QT) "Qt5Gui Qt5Widgets Qt5Xml Qt5Core" - } else { - set aLibsMap(CSF_QT) "Qt5Guid Qt5Widgetsd Qt5Xmld Qt5Cored" - } - - # tbb headers define different pragma lib depending on debug/release - set aLibsMap(CSF_TBB) "" - - if { "$::HAVE_ZLIB" == "true" } { - set aLibsMap(CSF_ZLIB) "zlib" - } - } else { - set aLibsMap(CSF_dl) "dl" - if { "$::HAVE_XLIB" == "true" } { - set aLibsMap(CSF_OpenGlLibs) "GL" - } else { - set aLibsMap(CSF_OpenGlLibs) "GL EGL" - } - set aLibsMap(CSF_OpenGlesLibs) "EGL GLESv2" - if { "$theOS" == "mac" || "$theOS" == "ios" } { - set aLibsMap(CSF_objc) "objc" - set aLibsMap(CSF_OpenGlLibs) "" - set aLibsMap(CSF_OpenGlesLibs) "" - set aFrmsMap(CSF_OpenGlLibs) "OpenGL" - set aFrmsMap(CSF_OpenGlesLibs) "OpenGLES" - if { "$theOS" == "ios" } { - set aFrmsMap(CSF_Appkit) "UIKit" - } else { - set aFrmsMap(CSF_Appkit) "AppKit" - } - set aFrmsMap(CSF_IOKit) "IOKit" - set aLibsMap(CSF_TclLibs) "" - set aLibsMap(CSF_TclTkLibs) "" - set aFrmsMap(CSF_TclLibs) "Tcl" - if { "$::HAVE_TK" == "true" } { - set aFrmsMap(CSF_TclTkLibs) "Tk" - } - set aLibsMap(CSF_QT) "QtCore QtGui" - } elseif { "$theOS" == "android" } { - set aLibsMap(CSF_androidlog) "log" - } else { - if { "$::HAVE_FREETYPE" == "true" } { - set aLibsMap(CSF_fontconfig) "fontconfig" - } - if { "$theOS" == "qnx" } { - # CSF_ThreadLibs - pthread API is part of libc on QNX - } else { - set aLibsMap(CSF_ThreadLibs) "pthread rt" - if { "$::HAVE_TK" == "true" } { - set aLibsMap(CSF_TclTkLibs) "tk8.6" - } - if { "$::HAVE_XLIB" == "true" } { - set aLibsMap(CSF_XwLibs) "X11" - } - } - } - } -} - -# Returns string of library dependencies for generation of Visual Studio project or make lists. -proc osutils:vtkCsf {{theOS ""}} { - set aVtkVer "6.1" - - set aPathSplitter ":" - if {"$theOS" == "wnt"} { - set aPathSplitter ";" - } - - set anOptIncs [split $::env(CSF_OPT_INC) "$aPathSplitter"] - foreach anIncItem $anOptIncs { - if {[regexp -- "vtk-(.*)$" [file tail $anIncItem] dummy aFoundVtkVer]} { - set aVtkVer $aFoundVtkVer - } - } - - set aLibArray [list vtkCommonCore vtkCommonDataModel vtkCommonExecutionModel vtkCommonMath vtkCommonTransforms vtkRenderingCore \ - vtkRenderingOpenGL vtkFiltersGeneral vtkIOCore vtkIOImage vtkImagingCore vtkInteractionStyle] - - # Additional suffices for the libraries - set anIdx 0 - foreach anItem $aLibArray { - lset aLibArray $anIdx $anItem-$aVtkVer - incr anIdx - } - - return [join $aLibArray " "] -} - -# @param theLibsList - dependencies (libraries list) -# @param theFrameworks - dependencies (frameworks list, OS X specific) -proc osutils:usedOsLibs { theToolKit theOS theLibsList theFrameworks theSrcDir { theRelease true } } { - global path - upvar $theLibsList aLibsList - upvar $theFrameworks aFrameworks - set aLibsList [list] - set aFrameworks [list] - - osutils:csfList $theOS aLibsMap aFrmsMap $theRelease - - foreach aCsfElem [osutils:tk:csfInExternlib "$path/$theSrcDir/${theToolKit}/EXTERNLIB"] { - if [info exists aLibsMap($aCsfElem)] { - foreach aLib [split "$aLibsMap($aCsfElem)"] { - if { [lsearch $aLibsList $aLib] == "-1" } { - lappend aLibsList $aLib - } - } - } - if [info exists aFrmsMap($aCsfElem)] { - foreach aFrm [split "$aFrmsMap($aCsfElem)"] { - if { [lsearch $aFrameworks $aFrm] == "-1" } { - lappend aFrameworks $aFrm - } - } - } - } -} - -# Returns liste of UD in a toolkit. tkloc is a full path wok. -proc osutils:tk:units { tkloc theSrcDir } { - global path - set l {} - set PACKAGES "$path/$theSrcDir/$tkloc/PACKAGES" - foreach u [wokUtils:FILES:FileToList $PACKAGES] { - if {[file isdirectory "$path/$theSrcDir/$u"]} { - lappend l $u - } - } - if { $l == {} } { - ;#puts stderr "Warning. No devunit included in $tkloc" - } - return $l -} - -# remove from listloc OpenCascade units indesirables on NT -proc osutils:juststation {goaway listloc} { - global path - set lret {} - foreach u $listloc { - if {([file isdirectory "$path/src/$u"] && [lsearch $goaway $u] == -1 ) - || (![file isdirectory "$path/src/$u"] && [lsearch $goaway $u] == -1 ) } { - lappend lret $u - } - } - return $lret -} - -# intersect3 - perform the intersecting of two lists, returning a list containing three lists. -# The first list is everything in the first list that wasn't in the second, -# the second list contains the intersection of the two lists, the third list contains everything -# in the second list that wasn't in the first. -proc osutils:intersect3 {list1 list2} { - set la1(0) {} ; unset la1(0) - set lai(0) {} ; unset lai(0) - set la2(0) {} ; unset la2(0) - foreach v $list1 { - set la1($v) {} - } - foreach v $list2 { - set la2($v) {} - } - foreach elem [concat $list1 $list2] { - if {[info exists la1($elem)] && [info exists la2($elem)]} { - unset la1($elem) - unset la2($elem) - set lai($elem) {} - } - } - list [lsort [array names la1]] [lsort [array names lai]] [lsort [array names la2]] -} - -# Prepare relative path -proc relativePath {thePathFrom thePathTo} { - if { [file isdirectory "$thePathFrom"] == 0 } { - return "" - } - - set aPathFrom [file normalize "$thePathFrom"] - set aPathTo [file normalize "$thePathTo"] - - set aCutedPathFrom "${aPathFrom}/dummy" - set aRelatedDeepPath "" - - while { "$aCutedPathFrom" != [file normalize "$aCutedPathFrom/.."] } { - set aCutedPathFrom [file normalize "$aCutedPathFrom/.."] - # does aPathTo contain aCutedPathFrom? - regsub -all $aCutedPathFrom $aPathTo "" aPathFromAfterCut - if { "$aPathFromAfterCut" != "$aPathTo" } { # if so - if { "$aCutedPathFrom" == "$aPathFrom" } { # just go higher, for example, ./somefolder/someotherfolder - set aPathTo ".${aPathTo}" - } elseif { "$aCutedPathFrom" == "$aPathTo" } { # remove the last "/" - set aRelatedDeepPath [string replace $aRelatedDeepPath end end ""] - } - regsub -all $aCutedPathFrom $aPathTo $aRelatedDeepPath aPathToAfterCut - regsub -all "//" $aPathToAfterCut "/" aPathToAfterCut - return $aPathToAfterCut - } - set aRelatedDeepPath "$aRelatedDeepPath../" - - } - - return $thePathTo -} - -proc wokUtils:EASY:bs1 { s } { - regsub -all {/} $s {\\} r - return $r -} - -# Returns for a full path the liste of n last directory part -# n = 1 => tail -# n = 2 => dir/file.c -# n = 3 => sdir/dir/file.c -# etc.. -proc wokUtils:FILES:wtail { f n } { - set ll [expr [llength [set lif [file split $f]]] -$n] - return [join [lrange $lif $ll end] /] -} - -# Generate entry for one source file in Visual Studio 10 project file -proc osutils:vcxproj:cxxfile { theFile theParams theSrcFileLevel } { - if { $theParams == "" } { - return " \n" - } - - set aParams [string trim ${theParams}] - append text " \n" - append text " ${aParams} %(AdditionalOptions)\n" - append text " ${aParams} %(AdditionalOptions)\n" - append text " ${aParams} %(AdditionalOptions)\n" - append text " ${aParams} %(AdditionalOptions)\n" - append text " \n" - return $text -} - -# Generate entry for one header file in Visual Studio 10 project file -proc osutils:vcxproj:hxxfile { theFile } { return " \n" } - -# Generate Visual Studio 2010 project filters file -proc osutils:vcxproj:filters { dir proj theCxxFilesMap theHxxFilesMap } { - upvar $theCxxFilesMap aCxxFilesMap - upvar $theHxxFilesMap aHxxFilesMap - - # header - append text "\n" - append text "\n" - - # list of "filters" (units) - append text " \n" - append text " \n" - append text " [OS:genGUID]\n" - append text " \n" - append text " \n" - append text " [OS:genGUID]\n" - append text " \n" - foreach unit $aCxxFilesMap(units) { - append text " \n" - append text " [OS:genGUID]\n" - append text " \n" - } - foreach unit $aHxxFilesMap(units) { - append text " \n" - append text " [OS:genGUID]\n" - append text " \n" - } - append text " \n" - - # list of cxx files - append text " \n" - foreach unit $aCxxFilesMap(units) { - foreach file $aCxxFilesMap($unit) { - append text " \n" - append text " Source files\\${unit}\n" - append text " \n" - } - } - append text " \n" - - # list of hxx files - append text " \n" - foreach unit $aHxxFilesMap(units) { - foreach file $aHxxFilesMap($unit) { - append text " \n" - append text " Header files\\${unit}\n" - append text " \n" - } - } - append text " \n" - - append text " \n" - append text " \n" - append text " \n" - - # end - append text "" - - # write file - set fp [open [set fvcproj [file join $dir ${proj}.vcxproj.filters]] w] - fconfigure $fp -translation crlf - puts $fp $text - close $fp - - return ${proj}.vcxproj.filters -} - -# Generate RC file content for ToolKit from template -proc osutils:readtemplate:rc {theOutDir theToolKit} { - set aLoc "$::THE_CASROOT/adm/templates/template_dll.rc" - set aBody [wokUtils:FILES:FileToString $aLoc] - regsub -all -- {__TKNAM__} $aBody $theToolKit aBody - - set aFile [open "${theOutDir}/${theToolKit}.rc" "w"] - fconfigure $aFile -translation lf - puts $aFile $aBody - close $aFile - return "${theOutDir}/${theToolKit}.rc" -} - -# Generate Visual Studio project file for ToolKit -proc osutils:vcproj { theVcVer isUWP theOutDir theToolKit theGuidsMap theSrcDir theSourceDirOther } { - global path - - set aHasQtDep "false" - set aTkDefines "" - foreach aCsfElem [osutils:tk:csfInExternlib "$path/$theSrcDir/${theToolKit}/EXTERNLIB"] { - if { "$aCsfElem" == "CSF_QT" } { - set aHasQtDep "true" - } elseif { "$aCsfElem" == "CSF_OpenGlLibs" } { - set aTkDefines "$aTkDefines;HAVE_OPENGL" - } elseif { "$aCsfElem" == "CSF_OpenGlesLibs" } { - set aTkDefines "$aTkDefines;HAVE_GLES2" - } - } - set theProjTmpl [osutils:vcproj:readtemplate $theVcVer $isUWP 0] - - set l_compilable [osutils:compilable wnt] - regsub -all -- {__TKNAM__} $theProjTmpl $theToolKit theProjTmpl - - upvar $theGuidsMap aGuidsMap - if { ! [info exists aGuidsMap($theToolKit)] } { - set aGuidsMap($theToolKit) [OS:genGUID] - } - regsub -all -- {__PROJECT_GUID__} $theProjTmpl $aGuidsMap($theToolKit) theProjTmpl - - set theProjTmpl [osutils:uwp:proj $isUWP ${theProjTmpl}] - - set aUsedLibs [list] - - if { $isUWP } { - lappend aUsedLibs "WindowsApp.lib" - } - - foreach tkx [osutils:commonUsedTK $theToolKit $theSrcDir $theSourceDirOther] { - lappend aUsedLibs "${tkx}.lib" - } - - set anOsReleaseLibs {} - set anOsDebugLibs {} - osutils:usedOsLibs $theToolKit "wnt" anOsReleaseLibs aFrameworks $theSrcDir true - osutils:usedOsLibs $theToolKit "wnt" anOsDebugLibs aFrameworks $theSrcDir false - - # correct names of referred third-party libraries that are named with suffix - # depending on VC version - regsub -all -- {__TKDEP__} $theProjTmpl [osutils:depLibraries $aUsedLibs $anOsReleaseLibs $theVcVer] theProjTmpl - regsub -all -- {__TKDEP_DEBUG__} $theProjTmpl [osutils:depLibraries $aUsedLibs $anOsDebugLibs $theVcVer] theProjTmpl - regsub -all -- {__TKDEFINES__} $theProjTmpl $aTkDefines theProjTmpl - - set anIncPaths "..\\..\\..\\inc" - set aFilesSection "" - set aVcFilesCxx(units) "" - set aVcFilesHxx(units) "" - set listloc [osutils:tk:units $theToolKit $theSrcDir] - if [array exists written] { unset written } - #puts "\t1 [wokparam -v %CMPLRS_CXX_Options [w_info -f]] father" - #puts "\t2 [wokparam -v %CMPLRS_CXX_Options] branch" - #puts "\t1 [wokparam -v %CMPLRS_C_Options [w_info -f]] father" - #puts "\t2 [wokparam -v %CMPLRS_C_Options] branch" - set fxloparamfcxx [lindex [osutils:intersect3 [_get_options wnt cmplrs_cxx f] [_get_options wnt cmplrs_cxx b]] 2] - set fxloparamfc [lindex [osutils:intersect3 [_get_options wnt cmplrs_c f] [_get_options wnt cmplrs_c b]] 2] - set fxloparam "" - foreach fxlo $listloc { - set xlo $fxlo - set aSrcFiles [osutils:tk:cxxfiles $xlo wnt $theSrcDir] - set aHxxFiles [osutils:tk:hxxfiles $xlo wnt $theSrcDir] - - # prepare Qt moc files, appears only in Inspector - directory tools - set aGeneratedFiles {} - if { "$aHasQtDep" == "true" } { - set aMocResFiles [osutils:tk:mocfiles $aHxxFiles $theOutDir] - set aGeneratedFiles [osutils:tk:execfiles $aMocResFiles $theOutDir moc${::SYS_EXE_SUFFIX} moc cpp] - - set aQrcResFiles [osutils:tk:qrcfiles $xlo wnt $theSrcDir] - set aQrcFiles [osutils:tk:execfiles $aQrcResFiles $theOutDir rcc${::SYS_EXE_SUFFIX} rcc cpp] - foreach resFile $aQrcFiles { - lappend aGeneratedFiles $resFile - } - } - - set fxlo_cmplrs_options_cxx [_get_options wnt cmplrs_cxx $fxlo] - if {$fxlo_cmplrs_options_cxx == ""} { - set fxlo_cmplrs_options_cxx [_get_options wnt cmplrs_cxx b] - } - set fxlo_cmplrs_options_c [_get_options wnt cmplrs_c $fxlo] - if {$fxlo_cmplrs_options_c == ""} { - set fxlo_cmplrs_options_c [_get_options wnt cmplrs_c b] - } - set fxloparam "$fxloparam [lindex [osutils:intersect3 [_get_options wnt cmplrs_cxx b] $fxlo_cmplrs_options_cxx] 2]" - set fxloparam "$fxloparam [lindex [osutils:intersect3 [_get_options wnt cmplrs_c b] $fxlo_cmplrs_options_c] 2]" - #puts "\t3 [wokparam -v %CMPLRS_CXX_Options] branch CXX " - #puts "\t4 [wokparam -v %CMPLRS_CXX_Options $fxlo] $fxlo CXX" - #puts "\t5 [wokparam -v %CMPLRS_C_Options] branch C" - #puts "\t6 [wokparam -v %CMPLRS_C_Options $fxlo] $fxlo C" - set needparam "" - foreach partopt $fxloparam { - if {[string first "-I" $partopt] == "0"} { - # this is an additional includes search path - continue - } - set needparam "$needparam $partopt" - } - - # Format of projects in vc10+ is different from vc7-9 - if { "$theVcVer" != "vc7" && "$theVcVer" != "vc8" && "$theVcVer" != "vc9" } { - foreach aSrcFile [lsort $aSrcFiles] { - if { ![info exists written([file tail $aSrcFile])] } { - set written([file tail $aSrcFile]) 1 - append aFilesSection [osutils:vcxproj:cxxfile $aSrcFile $needparam 3] - } else { - puts "Warning : in vcproj more than one occurrences for [file tail $aSrcFile]" - } - if { ! [info exists aVcFilesCxx($xlo)] } { lappend aVcFilesCxx(units) $xlo } - lappend aVcFilesCxx($xlo) $aSrcFile - } - foreach aHxxFile [lsort $aHxxFiles] { - if { ![info exists written([file tail $aHxxFile])] } { - set written([file tail $aHxxFile]) 1 - append aFilesSection [osutils:vcxproj:hxxfile $aHxxFile] - } else { - puts "Warning : in vcproj more than one occurrences for [file tail $aHxxFile]" - } - if { ! [info exists aVcFilesHxx($xlo)] } { lappend aVcFilesHxx(units) $xlo } - lappend aVcFilesHxx($xlo) $aHxxFile - } - foreach aGenFile [lsort $aGeneratedFiles] { - if { ![info exists written([file tail $aGenFile])] } { - set written([file tail $aGenFile]) 1 - append aFilesSection [osutils:vcxproj:cxxfile $aGenFile $needparam 5] - } else { - puts "Warning : in vcproj more than one occurrences for [file tail $aGenFile]" - } - if { ! [info exists aVcFilesCxx($xlo)] } { lappend aVcFilesCxx(units) $xlo } - lappend aVcFilesCxx($xlo) $aGenFile - } - } else { - append aFilesSection "\t\t\t\n" - foreach aSrcFile [lsort $aSrcFiles] { - if { ![info exists written([file tail $aSrcFile])] } { - set written([file tail $aSrcFile]) 1 - append aFilesSection [osutils:vcproj:file $theVcVer $aSrcFile $needparam] - } else { - puts "Warning : in vcproj more than one occurrences for [file tail $aSrcFile]" - } - } - append aFilesSection "\t\t\t\n" - } - } - - regsub -all -- {__TKINC__} $theProjTmpl $anIncPaths theProjTmpl - regsub -all -- {__FILES__} $theProjTmpl $aFilesSection theProjTmpl - - # write file - set aFile [open [set aVcFiles [file join $theOutDir ${theToolKit}.[osutils:vcproj:ext $theVcVer]]] w] - fconfigure $aFile -translation crlf - puts $aFile $theProjTmpl - close $aFile - - # write filters file for vc10+ - if { "$theVcVer" != "vc7" && "$theVcVer" != "vc8" && "$theVcVer" != "vc9" } { - lappend aVcFiles [osutils:vcxproj:filters $theOutDir $theToolKit aVcFilesCxx aVcFilesHxx] - } - - # write resource file - lappend aVcFiles [osutils:readtemplate:rc $theOutDir $theToolKit] - - return $aVcFiles -} - -# Appends OS libraries into the list of used libraries. -# Corrects list of referred third-party libraries that are named with suffix -# depending on VC version -# Unites list of used libraries into a variable with separator for VStudio older than vc9 -# @param theUsedLibs List of libraries, to be changed -# @param theOsLibs List of Os library names, before using an extension should be added -# @param theVcVer version of VStudio - -proc osutils:depLibraries { theUsedLibs theOsLibs theVcVer } { - foreach aLibIter $theOsLibs { - lappend theUsedLibs "${aLibIter}.${::SYS_LIB_SUFFIX}" - } - - # correct names of referred third-party libraries that are named with suffix - # depending on VC version - set aVCRTVer [string range $theVcVer 0 3] - regsub -all -- {vc[0-9]+} $theUsedLibs $aVCRTVer theUsedLibs - - # and put this list to project file - if { "$theVcVer" != "vc7" && "$theVcVer" != "vc8" && "$theVcVer" != "vc9" } { - set theUsedLibs [join $theUsedLibs {;}] - } - - return $theUsedLibs -} - -# for a unit returns a map containing all its file in the current -# workbench -# local = 1 only local files -proc osutils:tk:loadunit { loc map theSrcDir} { - #puts $loc - upvar $map TLOC - catch { unset TLOC } - set lfiles [_get_used_files $loc $theSrcDir] - foreach f $lfiles { - #puts "\t$f" - set t [lindex $f 0] - set p [lindex $f 2] - if [info exists TLOC($t)] { - set l $TLOC($t) - lappend l $p - set TLOC($t) $l - } else { - set TLOC($t) $p - } - } - return -} - -# Returns the list of all files name in a toolkit within specified list of file extensions. -proc osutils:tk:files { tkloc theExtensions theSrcDir } { - set Tfiles(source,nocdlpack) {source pubinclude} - set Tfiles(source,toolkit) {} - set Tfiles(source,executable) {source pubinclude} - set listloc [concat [osutils:tk:units $tkloc $theSrcDir] $tkloc ] - #puts " listloc = $listloc" - - set resultloc $listloc - set lret {} - foreach loc $resultloc { - set utyp [_get_type $loc] - #puts "\"$utyp\" \"$loc\"" - switch $utyp { - "t" { set utyp "toolkit" } - "n" { set utyp "nocdlpack" } - "x" { set utyp "executable" } - default { error "Error: Cannot determine type of unit $loc, check adm/UDLIST!" } - } - if [array exists map] { unset map } - osutils:tk:loadunit $loc map $theSrcDir - #puts " loc = $loc === > [array names map]" - set LType $Tfiles(source,${utyp}) - foreach typ [array names map] { - if { [lsearch $LType $typ] == -1 } { - unset map($typ) - } - } - foreach type [array names map] { - #puts $type - foreach f $map($type) { - #puts $f - if { [lsearch $theExtensions [file extension $f]] != -1 } { - lappend lret $f - } - } - } - } - return $lret -} - -# Returns the list of all compilable files name in a toolkit. -proc osutils:tk:cxxfiles { tkloc thePlatform theSrcDir } { return [osutils:tk:files $tkloc [osutils:compilable $thePlatform] $theSrcDir] } - -# Returns the list of all header files name in a toolkit. -proc osutils:tk:hxxfiles { tkloc thePlatform theSrcDir } { return [osutils:tk:files $tkloc [osutils:fileExtensionsHeaders $thePlatform] $theSrcDir] } - -# Returns the list of all resource (qrc) files name in a toolkit. -proc osutils:tk:qrcfiles { tkloc thePlatform theSourceDir } { return [osutils:tk:files $tkloc [osutils:fileExtensionsResources $thePlatform] $theSourceDir] } - -# Returns the list of all header files name in a toolkit. -proc osutils:tk:mocfiles { HxxFiles theOutDir } { - set lret {} - foreach file $HxxFiles { - # processing only files where Q_OBJECT exists - set fd [open "$file" rb] - set FILES [split [read $fd] "\n"] - close $fd - - set isQObject [expr [regexp "Q_OBJECT" $FILES]] - if { ! $isQObject } { - continue; - } - lappend lret $file - } - return $lret -} - -# Returns the list of all header files name in a toolkit. -proc osutils:tk:execfiles { theFiles theOutDir theCommand thePrefix theExtension} { - set lret {} - set anOutDir $theOutDir/$thePrefix - file mkdir $anOutDir - - foreach file $theFiles { - set aResourceName [file tail $file] - set anOutFile $anOutDir/${thePrefix}_[file rootname $aResourceName].$theExtension - - exec $theCommand $file -o $anOutFile - lappend lret $anOutFile - } - return $lret -} - -# Generate Visual Studio project file for executable -proc osutils:vcprojx { theVcVer isUWP theOutDir theToolKit theGuidsMap theSrcDir theSourceDirOther } { - set aVcFiles {} - set aProjTmpl [osutils:vcproj:readtemplate $theVcVer $isUWP 1] - - set aProjName $theToolKit - set l_compilable [osutils:compilable wnt] - regsub -all -- {__XQTNAM__} $aProjTmpl $aProjName aProjTmpl - - upvar $theGuidsMap aGuidsMap - if { ! [info exists aGuidsMap($aProjName)] } { - set aGuidsMap($aProjName) [OS:genGUID] - } - regsub -all -- {__PROJECT_GUID__} $aProjTmpl $aGuidsMap($aProjName) aProjTmpl - - set aUsedLibs [list] - foreach tkx [osutils:commonUsedTK $theToolKit $theSrcDir $theSourceDirOther] { - lappend aUsedLibs "${tkx}.lib" - } - - set anOsReleaseLibs {} - set anOsDebugLibs {} - osutils:usedOsLibs $theToolKit "wnt" anOsReleaseLibs aFrameworks $theSrcDir true - osutils:usedOsLibs $theToolKit "wnt" anOsDebugLibs aFrameworks $theSrcDir false - - set aVCRTVer [string range $theVcVer 0 3] - regsub -all -- {__TKDEP__} $aProjTmpl [osutils:depLibraries $aUsedLibs $anOsReleaseLibs $theVcVer] aProjTmpl - regsub -all -- {__TKDEP_DEBUG__} $aProjTmpl [osutils:depLibraries $aUsedLibs $anOsDebugLibs $theVcVer] aProjTmpl - regsub -all -- {__TKDEFINES__} $aProjTmpl "" aProjTmpl - - set aFilesSection "" - set aVcFilesCxx(units) "" - set aVcFilesHxx(units) "" - - if { "$theVcVer" != "vc7" && "$theVcVer" != "vc8" && "$theVcVer" != "vc9" } { - foreach f [osutils:tk:cxxfiles $theToolKit wnt $theSrcDir] { - if { ![info exists written([file tail $f])] } { - set written([file tail $f]) 1 - append aFilesSection [osutils:vcxproj:cxxfile $f "" 3] - if { ! [info exists aVcFilesCxx($theToolKit)] } { lappend aVcFilesCxx(units) $theToolKit } - lappend aVcFilesCxx($theToolKit) $f - } else { - puts "Warning : in vcproj there are more than one occurrences for [file tail $f]" - } - } - } else { - append aFilesSection "\t\t\t\n" - foreach f [osutils:tk:cxxfiles $theToolKit wnt $theSrcDir] { - if { ![info exists written([file tail $f])] } { - set written([file tail $f]) 1 - append aFilesSection [osutils:vcproj:file $theVcVer $f ""] - } else { - puts "Warning : in vcproj there are more than one occurrences for [file tail $f]" - } - } - append aFilesSection "\t\t\t" - } - - #puts "$aProjTmpl $aFilesSection" - set anIncPaths "..\\..\\..\\inc" - regsub -all -- {__TKINC__} $aProjTmpl $anIncPaths aProjTmpl - regsub -all -- {__FILES__} $aProjTmpl $aFilesSection aProjTmpl - regsub -all -- {__CONF__} $aProjTmpl Application aProjTmpl - - regsub -all -- {__XQTEXT__} $aProjTmpl "exe" aProjTmpl - - set aFile [open [set aVcFilePath [file join $theOutDir ${aProjName}.[osutils:vcproj:ext $theVcVer]]] w] - fconfigure $aFile -translation crlf - puts $aFile $aProjTmpl - close $aFile - - set aCommonSettingsFile "$aVcFilePath.user" - lappend aVcFiles $aVcFilePath - - # write filters file for vc10 - if { "$theVcVer" != "vc7" && "$theVcVer" != "vc8" && "$theVcVer" != "vc9" } { - lappend aVcFiles [osutils:vcxproj:filters $theOutDir $aProjName aVcFilesCxx aVcFilesHxx] - } - - # write resource file - lappend aVcFiles [osutils:readtemplate:rc $theOutDir $aProjName] - - set aCommonSettingsFileTmpl "" - if { "$theVcVer" == "vc7" || "$theVcVer" == "vc8" } { - # nothing - } elseif { "$theVcVer" == "vc9" } { - set aCommonSettingsFileTmpl [wokUtils:FILES:FileToString "$::THE_CASROOT/adm/templates/vcproj.user.vc9x"] - } else { - set aCommonSettingsFileTmpl [wokUtils:FILES:FileToString "$::THE_CASROOT/adm/templates/vcxproj.user.vc10x"] - } - if { "$aCommonSettingsFileTmpl" != "" } { - regsub -all -- {__VCVER__} $aCommonSettingsFileTmpl $aVCRTVer aCommonSettingsFileTmpl - - set aFile [open [set aVcFilePath "$aCommonSettingsFile"] w] - fconfigure $aFile -translation crlf - puts $aFile $aCommonSettingsFileTmpl - close $aFile - - lappend aVcFiles "$aCommonSettingsFile" - } - - return $aVcFiles -} - -# Generate entry for one source file in Visual Studio 7 - 9 project file -proc osutils:vcproj:file { theVcVer theFile theOptions } { - append aText "\t\t\t\t\n" - if { $theOptions == "" } { - append aText "\t\t\t\t\n" - return $aText - } - - append aText "\t\t\t\t\t\n" - append aText "\t\t\t\t\t\t\n" - append aText "\t\t\t\t\t\n" - - append aText "\t\t\t\t\t\n" - append aText "\t\t\t\t\t\t\n" - append aText "\t\t\t\t\t\n" - if { "$theVcVer" == "vc7" } { - append aText "\t\t\t\t\n" - return $aText - } - - append aText "\t\t\t\t\t\n" - append aText "\t\t\t\t\t\t\n" - append aText "\t\t\t\t\t\n" - - append aText "\t\t\t\t\t\n" - append aText "\t\t\t\t\t\t\n" - append aText "\t\t\t\t\t\n" - - append aText "\t\t\t\t\n" - return $aText -} - -proc wokUtils:FILES:mkdir { d } { - global tcl_version - regsub -all {\.[^.]*} $tcl_version "" major - if { $major == 8 } { - file mkdir $d - } else { - if ![file exists $d] { - if { "[info command mkdir]" == "mkdir" } { - mkdir -path $d - } else { - puts stderr "wokUtils:FILES:mkdir : Error unable to find a mkdir command." - } - } - } - if [file exists $d] { - return $d - } else { - return {} - } -} - -####### CODEBLOCK ################################################################### -# Function to generate Code Blocks workspace and project files -proc OS:MKCBP { theOutDir theModules theAllSolution thePlatform theCmpl } { - puts stderr "Generating project files for Code Blocks" - - # Generate projects for toolkits and separate workspace for each module - foreach aModule $theModules { - OS:cworkspace $aModule $aModule $theOutDir - OS:cbp $theCmpl $aModule $theOutDir $thePlatform - } - - # Generate single workspace "OCCT" containing projects from all modules - if { "$theAllSolution" != "" } { - OS:cworkspace $theAllSolution $theModules $theOutDir - } - - puts "The Code Blocks workspace and project files are stored in the $theOutDir directory" -} - -# Generate Code Blocks projects -proc OS:cbp { theCmpl theModules theOutDir thePlatform } { - set aProjectFiles {} - foreach aModule $theModules { - foreach aToolKit [${aModule}:toolkits] { - lappend aProjectFiles [osutils:cbptk $theCmpl $theOutDir $aToolKit $thePlatform] - } - foreach anExecutable [OS:executable ${aModule}] { - lappend aProjectFiles [osutils:cbpx $theCmpl $theOutDir $anExecutable $thePlatform] - } - } - return $aProjectFiles -} - -# Generate Code::Blocks project file for ToolKit -proc osutils:cbptk { theCmpl theOutDir theToolKit thePlatform} { - set aUsedLibs [list] - set aFrameworks [list] - set anIncPaths [list] - set aTKDefines [list] - set aTKSrcFiles [list] - - # collect list of referred libraries to link with - osutils:usedOsLibs $theToolKit $thePlatform aUsedLibs aFrameworks "src" - set aDepToolkits [wokUtils:LIST:Purge [osutils:tk:close $theToolKit "src" ""]] - foreach tkx $aDepToolkits { - lappend aUsedLibs "${tkx}" - } - - lappend anIncPaths "../../../inc" - set listloc [osutils:tk:units $theToolKit "src"] - - if { [llength $listloc] == 0 } { - set listloc $theToolKit - } - - if [array exists written] { unset written } - foreach fxlo $listloc { - set xlo $fxlo - set aSrcFiles [osutils:tk:cxxfiles $xlo $thePlatform "src"] - foreach aSrcFile [lsort $aSrcFiles] { - if { ![info exists written([file tail $aSrcFile])] } { - set written([file tail $aSrcFile]) 1 - lappend aTKSrcFiles "../../../[wokUtils:FILES:wtail $aSrcFile 3]" - } else { - puts "Warning : more than one occurrences for [file tail $aSrcFile]" - } - } - - # macros for correct DLL exports -# if { $thePlatform == "wnt" || $thePlatform == "uwp" } { -# lappend aTKDefines "__${xlo}_DLL" -# } - } - - return [osutils:cbp $theCmpl $theOutDir $theToolKit $thePlatform $aTKSrcFiles $aUsedLibs $aFrameworks $anIncPaths $aTKDefines] -} - -# Generates Code Blocks workspace. -proc OS:cworkspace { theSolName theModules theOutDir } { - global path - set aWsFilePath "${theOutDir}/${theSolName}.workspace" - set aFile [open $aWsFilePath "w"] - set isActiveSet 0 - puts $aFile "" - puts $aFile "" - puts $aFile "\t" - - # collect list of projects to be created - foreach aModule $theModules { - # toolkits - foreach aToolKit [osutils:tk:sort [${aModule}:toolkits] "src" ""] { - set aDependencies [LibToLink $aToolKit "src" ""] - if { [llength $aDependencies] == 0 } { - puts $aFile "\t\t" - } else { - puts $aFile "\t\t" - foreach aDepTk $aDependencies { - puts $aFile "\t\t\t" - } - puts $aFile "\t\t" - } - } - - # executables, assume one project per cxx file... - foreach aUnit [OS:executable ${aModule}] { - set aUnitLoc $aUnit - set src_files [_get_used_files $aUnit "src" false] - set aSrcFiles {} - foreach s $src_files { - regexp {source ([^\s]+)} $s dummy name - lappend aSrcFiles $name - } - foreach aSrcFile $aSrcFiles { - set aFileExtension [file extension $aSrcFile] - if { $aFileExtension == ".cxx" } { - set aPrjName [file rootname $aSrcFile] - set aDependencies [list] - if {[file isdirectory $path/src/$aUnitLoc]} { - set aDependencies [LibToLinkX $aUnitLoc [file rootname $aSrcFile] "src" ""] - } - set anActiveState "" - if { $isActiveSet == 0 } { - set anActiveState " active=\"1\"" - set isActiveSet 1 - } - if { [llength $aDependencies] == 0 } { - puts $aFile "\t\t" - } else { - puts $aFile "\t\t" - foreach aDepTk $aDependencies { - puts $aFile "\t\t\t" - } - puts $aFile "\t\t" - } - } - } - } - } - - puts $aFile "\t" - puts $aFile "" - close $aFile - - return $aWsFilePath -} - -# Generate Code::Blocks project file for Executable -proc osutils:cbpx { theCmpl theOutDir theToolKit thePlatform } { - global path - set aWokArch "$::env(ARCH)" - - set aCbpFiles {} - foreach aSrcFile [osutils:tk:cxxfiles $theToolKit $thePlatform "src"] { - # collect list of referred libraries to link with - set aUsedLibs [list] - set aFrameworks [list] - set anIncPaths [list] - set aTKDefines [list] - set aTKSrcFiles [list] - set aProjName [file rootname [file tail $aSrcFile]] - - osutils:usedOsLibs $theToolKit $thePlatform aUsedLibs aFrameworks "src" - - set aDepToolkits [LibToLinkX $theToolKit $aProjName "src" ""] - foreach tkx $aDepToolkits { - if {[_get_type $tkx] == "t"} { - lappend aUsedLibs "${tkx}" - } - if {[lsearch [glob -tails -directory "$path/src" -types d *] $tkx] == "-1"} { - lappend aUsedLibs "${tkx}" - } - } - - set WOKSteps_exec_link [_get_options lin WOKSteps_exec_link $theToolKit] - if { [regexp {WOKStep_DLLink} $WOKSteps_exec_link] || [regexp {WOKStep_Libink} $WOKSteps_exec_link] } { - set isExecutable "false" - } else { - set isExecutable "true" - } - - if { ![info exists written([file tail $aSrcFile])] } { - set written([file tail $aSrcFile]) 1 - lappend aTKSrcFiles "../../../[wokUtils:FILES:wtail $aSrcFile 3]" - } else { - puts "Warning : in cbp there are more than one occurrences for [file tail $aSrcFile]" - } - - # macros for correct DLL exports -# if { $thePlatform == "wnt" || $thePlatform == "uwp" } { -# lappend aTKDefines "__${theToolKit}_DLL" -# } - - # common include paths - lappend anIncPaths "../../../inc" - - lappend aCbpFiles [osutils:cbp $theCmpl $theOutDir $aProjName $thePlatform $aTKSrcFiles $aUsedLibs $aFrameworks $anIncPaths $aTKDefines $isExecutable] - } - - return $aCbpFiles -} - -# This function intended to generate Code::Blocks project file -# @param theCmpl - the compiler (gcc or msvc) -# @param theOutDir - output directory to place project file -# @param theProjName - project name -# @param theSrcFiles - list of source files -# @param theLibsList - dependencies (libraries list) -# @param theFrameworks - dependencies (frameworks list, Mac OS X specific) -# @param theIncPaths - header search paths -# @param theDefines - compiler macro definitions -# @param theIsExe - flag to indicate executable / library target -proc osutils:cbp { theCmpl theOutDir theProjName thePlatform theSrcFiles theLibsList theFrameworks theIncPaths theDefines {theIsExe "false"} } { - set aWokArch "$::env(ARCH)" - - set aCmplCbp "gcc" - set aCmplFlags [list] - set aCmplFlagsRelease [list] - set aCmplFlagsDebug [list] - set toPassArgsByFile 0 - set aLibPrefix "lib" - set aPlatformAndCompiler "${thePlatform}/gcc" - if { "$thePlatform" == "mac" || "$thePlatform" == "ios" } { - set aPlatformAndCompiler "${thePlatform}/clang" - } - if { "$thePlatform" == "wnt" || "$thePlatform" == "uwp" || "$thePlatform" == "qnx" } { - set toPassArgsByFile 1 - } - if { "$theCmpl" == "msvc" } { - set aCmplCbp "msvc8" - set aLibPrefix "" - } - - if { "$theCmpl" == "msvc" } { - set aCmplFlags "-arch:SSE2 -EHsc -W4 -MP" - set aCmplFlagsRelease "-MD -O2" - set aCmplFlagsDebug "-MDd -Od -Zi" - lappend aCmplFlags "-D_CRT_SECURE_NO_WARNINGS" - lappend aCmplFlags "-D_CRT_NONSTDC_NO_DEPRECATE" - } elseif { "$theCmpl" == "gcc" } { - if { "$thePlatform" != "qnx" } { - set aCmplFlags "-mmmx -msse -msse2 -mfpmath=sse" - } - set aCmplFlagsRelease "-O2" - set aCmplFlagsDebug "-O0 -g" - if { "$thePlatform" == "wnt" || "$thePlatform" == "uwp" } { - lappend aCmplFlags "-std=gnu++0x" - lappend aCmplFlags "-D_WIN32_WINNT=0x0501" - } else { - lappend aCmplFlags "-std=c++0x" - lappend aCmplFlags "-fPIC" - lappend aCmplFlags "-DOCC_CONVERT_SIGNALS" - } - lappend aCmplFlags "-Wall" - lappend aCmplFlags "-Wextra" - lappend aCmplFlags "-fexceptions" - } - lappend aCmplFlagsRelease "-DNDEBUG" - lappend aCmplFlagsRelease "-DNo_Exception" - lappend aCmplFlagsDebug "-D_DEBUG" - if { "$thePlatform" == "qnx" } { - lappend aCmplFlags "-D_QNX_SOURCE" - } - - set aCbpFilePath "${theOutDir}/${theProjName}.cbp" - set aLnkFileName "${theProjName}_obj.link" - set aLnkDebFileName "${theProjName}_objd.link" - set aLnkFilePath "${theOutDir}/${aLnkFileName}" - set aLnkDebFilePath "${theOutDir}/${aLnkDebFileName}" - set aFile [open $aCbpFilePath "w"] - puts $aFile "" - puts $aFile "" - puts $aFile "\t" - puts $aFile "\t" - puts $aFile "\t\t" - puts $aFile "" - close $aFile - - return $aCbpFilePath -} - -# Define libraries to link using only EXTERNLIB file -proc LibToLinkX {thePackage theDummyName theSrcDir theSourceDirOther} { - set aToolKits [LibToLink $thePackage $theSrcDir $theSourceDirOther] - return $aToolKits -} - -# Function to generate Xcode workspace and project files -proc OS:MKXCD { theOutDir {theModules {}} {theAllSolution ""} {theLibType "dynamic"} {thePlatform ""} } { - - puts stderr "Generating project files for Xcode" - - # Generate projects for toolkits and separate workspace for each module - foreach aModule $theModules { - OS:xcworkspace $aModule $aModule $theOutDir - OS:xcodeproj $aModule $theOutDir ::THE_GUIDS_LIST $theLibType $thePlatform - } - - # Generate single workspace "OCCT" containing projects from all modules - if { "$theAllSolution" != "" } { - OS:xcworkspace $theAllSolution $theModules $theOutDir - } -} - -# Generates toolkits sections for Xcode workspace file. -proc OS:xcworkspace:toolkits { theModule } { - set aBuff "" - - # Adding toolkits for module in workspace. - foreach aToolKit [osutils:tk:sort [${theModule}:toolkits] "src" ""] { - append aBuff " \n" - append aBuff " \n" - } - - # Adding executables for module, assume one project per cxx file... - foreach aUnit [OS:executable ${theModule}] { - set aUnitLoc $aUnit - set src_files [_get_used_files $aUnit "src" false] - set aSrcFiles {} - foreach s $src_files { - regexp {source ([^\s]+)} $s dummy name - lappend aSrcFiles $name - } - foreach aSrcFile $aSrcFiles { - set aFileExtension [file extension $aSrcFile] - if { $aFileExtension == ".cxx" } { - set aPrjName [file rootname $aSrcFile] - append aBuff " \n" - append aBuff " \n" - } - } - } - - # Removing unnecessary newline character from the end. - set aBuff [string replace $aBuff end end] - return $aBuff -} - -# Generates workspace files for Xcode. -proc OS:xcworkspace { theWorkspaceName theModules theOutDir } { - # Creating workspace directory for Xcode. - set aWorkspaceDir "${theOutDir}/${theWorkspaceName}.xcworkspace" - wokUtils:FILES:mkdir $aWorkspaceDir - if { ! [file exists $aWorkspaceDir] } { - puts stderr "Error: Could not create workspace directory \"$aWorkspaceDir\"" - return - } - - # Creating workspace file. - set aWsFilePath "${aWorkspaceDir}/contents.xcworkspacedata" - set aFile [open $aWsFilePath "w"] - - # Adding header and section for main Group. - puts $aFile "" - puts $aFile "" - puts $aFile " " - - # Adding modules. - if { [llength "$theModules"] > 1 } { - foreach aModule $theModules { - puts $aFile " " - puts $aFile [OS:xcworkspace:toolkits $aModule] - puts $aFile " " - } - } else { - puts $aFile [OS:xcworkspace:toolkits $theModules] - } - - # Adding footer. - puts $aFile " " - puts $aFile "" - close $aFile -} - -# Generates Xcode project files. -proc OS:xcodeproj { theModules theOutDir theGuidsMap theLibType thePlatform} { - upvar $theGuidsMap aGuidsMap - - set isStatic 0 - if { "$theLibType" == "static" } { - set isStatic 1 - } elseif { "$thePlatform" == "ios" } { - set isStatic 1 - } - - set aProjectFiles {} - foreach aModule $theModules { - foreach aToolKit [${aModule}:toolkits] { - lappend aProjectFiles [osutils:xcdtk $theOutDir $aToolKit aGuidsMap $isStatic $thePlatform "dylib"] - } - foreach anExecutable [OS:executable ${aModule}] { - lappend aProjectFiles [osutils:xcdtk $theOutDir $anExecutable aGuidsMap $isStatic $thePlatform "executable"] - } - } - return $aProjectFiles -} - -# Generates dependencies section for Xcode project files. -proc osutils:xcdtk:deps {theToolKit theTargetType theGuidsMap theFileRefSection theDepsGuids theDepsRefGuids thePlatform theIsStatic} { - upvar $theGuidsMap aGuidsMap - upvar $theFileRefSection aFileRefSection - upvar $theDepsGuids aDepsGuids - upvar $theDepsRefGuids aDepsRefGuids - - set aBuildFileSection "" - set aUsedLibs [wokUtils:LIST:Purge [osutils:tk:close $theToolKit "src" ""]] - set aDepToolkits [lappend [wokUtils:LIST:Purge [osutils:tk:close $theToolKit "src" ""]] $theToolKit] - - if { "$theTargetType" == "executable" } { - set aFile [osutils:tk:cxxfiles $theToolKit mac "src"] - set aProjName [file rootname [file tail $aFile]] - set aDepToolkits [LibToLinkX $theToolKit $aProjName "src" ""] - } - - set aLibExt "dylib" - if { $theIsStatic == 1 } { - set aLibExt "a" - if { "$theTargetType" != "executable" } { - return $aBuildFileSection - } - } - - osutils:usedOsLibs $theToolKit $thePlatform aLibs aFrameworks "src" - set aUsedLibs [concat $aUsedLibs $aLibs] - set aUsedLibs [concat $aUsedLibs $aFrameworks] - foreach tkx $aUsedLibs { - set aDepLib "${tkx}_Dep" - set aDepLibRef "${tkx}_DepRef" - - if { ! [info exists aGuidsMap($aDepLib)] } { - set aGuidsMap($aDepLib) [OS:genGUID "xcd"] - } - if { ! [info exists aGuidsMap($aDepLibRef)] } { - set aGuidsMap($aDepLibRef) [OS:genGUID "xcd"] - } - - append aBuildFileSection "\t\t$aGuidsMap($aDepLib) = \{isa = PBXBuildFile; fileRef = $aGuidsMap($aDepLibRef) ; \};\n" - if {[lsearch -nocase $aFrameworks $tkx] == -1} { - append aFileRefSection "\t\t$aGuidsMap($aDepLibRef) = \{isa = PBXFileReference; lastKnownFileType = file; name = lib${tkx}.${aLibExt}; path = lib${tkx}.${aLibExt}; sourceTree = \"\"; \};\n" - } else { - append aFileRefSection "\t\t$aGuidsMap($aDepLibRef) = \{isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = ${tkx}.framework; path = /System/Library/Frameworks/${tkx}.framework; sourceTree = \"\"; \};\n" - } - append aDepsGuids "\t\t\t\t$aGuidsMap($aDepLib) ,\n" - append aDepsRefGuids "\t\t\t\t$aGuidsMap($aDepLibRef) ,\n" - } - - return $aBuildFileSection -} - -# Generates PBXBuildFile and PBXGroup sections for project file. -proc osutils:xcdtk:sources {theToolKit theTargetType theSrcFileRefSection theGroupSection thePackageGuids theSrcFileGuids theGuidsMap theIncPaths} { - upvar $theSrcFileRefSection aSrcFileRefSection - upvar $theGroupSection aGroupSection - upvar $thePackageGuids aPackagesGuids - upvar $theSrcFileGuids aSrcFileGuids - upvar $theGuidsMap aGuidsMap - upvar $theIncPaths anIncPaths - - set listloc [osutils:tk:units $theToolKit "src"] - set aBuildFileSection "" - set aPackages [lsort -nocase $listloc] - if { "$theTargetType" == "executable" } { - set aPackages [list "$theToolKit"] - } - - # Generating PBXBuildFile, PBXGroup sections and groups for each package. - foreach fxlo $aPackages { - set xlo $fxlo - set aPackage "${xlo}_Package" - set aSrcFileRefGuids "" - if { ! [info exists aGuidsMap($aPackage)] } { - set aGuidsMap($aPackage) [OS:genGUID "xcd"] - } - - set aSrcFiles [osutils:tk:cxxfiles $xlo mac "src"] - foreach aSrcFile [lsort $aSrcFiles] { - set aFileExt "sourcecode.cpp.cpp" - - if { [file extension $aSrcFile] == ".c" } { - set aFileExt "sourcecode.c.c" - } elseif { [file extension $aSrcFile] == ".mm" } { - set aFileExt "sourcecode.cpp.objcpp" - } - - if { ! [info exists aGuidsMap($aSrcFile)] } { - set aGuidsMap($aSrcFile) [OS:genGUID "xcd"] - } - set aSrcFileRef "${aSrcFile}_Ref" - if { ! [info exists aGuidsMap($aSrcFileRef)] } { - set aGuidsMap($aSrcFileRef) [OS:genGUID "xcd"] - } - if { ! [info exists written([file tail $aSrcFile])] } { - set written([file tail $aSrcFile]) 1 - append aBuildFileSection "\t\t$aGuidsMap($aSrcFile) = \{isa = PBXBuildFile; fileRef = $aGuidsMap($aSrcFileRef) ;\};\n" - append aSrcFileRefSection "\t\t$aGuidsMap($aSrcFileRef) = \{isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = ${aFileExt}; name = [wokUtils:FILES:wtail $aSrcFile 1]; path = ../../../[wokUtils:FILES:wtail $aSrcFile 3]; sourceTree = \"\"; \};\n" - append aSrcFileGuids "\t\t\t\t$aGuidsMap($aSrcFile) ,\n" - append aSrcFileRefGuids "\t\t\t\t$aGuidsMap($aSrcFileRef) ,\n" - } else { - puts "Warning : more than one occurrences for [file tail $aSrcFile]" - } - } - - append aGroupSection "\t\t$aGuidsMap($aPackage) = \{\n" - append aGroupSection "\t\t\tisa = PBXGroup;\n" - append aGroupSection "\t\t\tchildren = (\n" - append aGroupSection $aSrcFileRefGuids - append aGroupSection "\t\t\t);\n" - append aGroupSection "\t\t\tname = $xlo;\n" - append aGroupSection "\t\t\tsourceTree = \"\";\n" - append aGroupSection "\t\t\};\n" - - # Storing packages IDs for adding them later as a child of toolkit - append aPackagesGuids "\t\t\t\t$aGuidsMap($aPackage) ,\n" - } - - # Removing unnecessary newline character from the end. - set aPackagesGuids [string replace $aPackagesGuids end end] - - return $aBuildFileSection -} - -# Creates folders structure and all necessary files for Xcode project. -proc osutils:xcdtk { theOutDir theToolKit theGuidsMap theIsStatic thePlatform {theTargetType "dylib"} } { - set aPBXBuildPhase "Headers" - set aRunOnlyForDeployment "0" - set aProductType "library.dynamic" - set anExecExtension "\t\t\t\tEXECUTABLE_EXTENSION = dylib;" - set anExecPrefix "\t\t\t\tEXECUTABLE_PREFIX = lib;" - set aWrapperExtension "\t\t\t\tWRAPPER_EXTENSION = dylib;" - set aTKDefines [list "OCC_CONVERT_SIGNALS"] - if { $theIsStatic == 1 } { - lappend aTKDefines "OCCT_NO_PLUGINS" - } - - if { "$theTargetType" == "executable" } { - set aPBXBuildPhase "CopyFiles" - set aRunOnlyForDeployment "1" - set aProductType "tool" - set anExecExtension "" - set anExecPrefix "" - set aWrapperExtension "" - } elseif { $theIsStatic == 1 } { - set aProductType "library.static" - set anExecExtension "\t\t\t\tEXECUTABLE_EXTENSION = a;" - set aWrapperExtension "\t\t\t\tWRAPPER_EXTENSION = a;" - } - - set aUsername [exec whoami] - - # Creation of folders for Xcode projectP. - set aToolkitDir "${theOutDir}/${theToolKit}.xcodeproj" - wokUtils:FILES:mkdir $aToolkitDir - if { ! [file exists $aToolkitDir] } { - puts stderr "Error: Could not create project directory \"$aToolkitDir\"" - return - } - - set aUserDataDir "${aToolkitDir}/xcuserdata" - wokUtils:FILES:mkdir $aUserDataDir - if { ! [file exists $aUserDataDir] } { - puts stderr "Error: Could not create xcuserdata directory in \"$aToolkitDir\"" - return - } - - set aUserDataDir "${aUserDataDir}/${aUsername}.xcuserdatad" - wokUtils:FILES:mkdir $aUserDataDir - if { ! [file exists $aUserDataDir] } { - puts stderr "Error: Could not create ${aUsername}.xcuserdatad directory in \"$aToolkitDir\"/xcuserdata" - return - } - - set aSchemesDir "${aUserDataDir}/xcschemes" - wokUtils:FILES:mkdir $aSchemesDir - if { ! [file exists $aSchemesDir] } { - puts stderr "Error: Could not create xcschemes directory in \"$aUserDataDir\"" - return - } - # End of folders creation. - - # Generating GUID for toolkit. - upvar $theGuidsMap aGuidsMap - if { ! [info exists aGuidsMap($theToolKit)] } { - set aGuidsMap($theToolKit) [OS:genGUID "xcd"] - } - - # Creating xcscheme file for toolkit from template. - set aXcschemeTmpl [osutils:readtemplate "xcscheme" "xcd"] - regsub -all -- {__TOOLKIT_NAME__} $aXcschemeTmpl $theToolKit aXcschemeTmpl - regsub -all -- {__TOOLKIT_GUID__} $aXcschemeTmpl $aGuidsMap($theToolKit) aXcschemeTmpl - set aXcschemeFile [open "$aSchemesDir/${theToolKit}.xcscheme" "w"] - puts $aXcschemeFile $aXcschemeTmpl - close $aXcschemeFile - - # Creating xcschememanagement.plist file for toolkit from template. - set aPlistTmpl [osutils:readtemplate "plist" "xcd"] - regsub -all -- {__TOOLKIT_NAME__} $aPlistTmpl $theToolKit aPlistTmpl - regsub -all -- {__TOOLKIT_GUID__} $aPlistTmpl $aGuidsMap($theToolKit) aPlistTmpl - set aPlistFile [open "$aSchemesDir/xcschememanagement.plist" "w"] - puts $aPlistFile $aPlistTmpl - close $aPlistFile - - # Creating project.pbxproj file for toolkit. - set aPbxprojFile [open "$aToolkitDir/project.pbxproj" "w"] - puts $aPbxprojFile "// !\$*UTF8*\$!" - puts $aPbxprojFile "\{" - puts $aPbxprojFile "\tarchiveVersion = 1;" - puts $aPbxprojFile "\tclasses = \{" - puts $aPbxprojFile "\t\};" - puts $aPbxprojFile "\tobjectVersion = 46;" - puts $aPbxprojFile "\tobjects = \{\n" - - # Begin PBXBuildFile section - set aPackagesGuids "" - set aGroupSection "" - set aSrcFileRefSection "" - set aSrcFileGuids "" - set aDepsFileRefSection "" - set aDepsGuids "" - set aDepsRefGuids "" - set anIncPaths [list "../../../inc"] - set anLibPaths "" - - if { [info exists ::env(CSF_OPT_INC)] } { - set anIncCfg [split "$::env(CSF_OPT_INC)" ":"] - foreach anIncCfgPath $anIncCfg { - lappend anIncPaths $anIncCfgPath - } - } - if { [info exists ::env(CSF_OPT_LIB64)] } { - set anLibCfg [split "$::env(CSF_OPT_LIB64)" ":"] - foreach anLibCfgPath $anLibCfg { - lappend anLibPaths $anLibCfgPath - } - } - - puts $aPbxprojFile [osutils:xcdtk:sources $theToolKit $theTargetType aSrcFileRefSection aGroupSection aPackagesGuids aSrcFileGuids aGuidsMap anIncPaths] - puts $aPbxprojFile [osutils:xcdtk:deps $theToolKit $theTargetType aGuidsMap aDepsFileRefSection aDepsGuids aDepsRefGuids $thePlatform $theIsStatic] - # End PBXBuildFile section - - # Begin PBXFileReference section - set aToolkitLib "lib${theToolKit}.dylib" - set aPath "$aToolkitLib" - if { "$theTargetType" == "executable" } { - set aPath "$theToolKit" - } elseif { $theIsStatic == 1 } { - set aToolkitLib "lib${theToolKit}.a" - } - - if { ! [info exists aGuidsMap($aToolkitLib)] } { - set aGuidsMap($aToolkitLib) [OS:genGUID "xcd"] - } - - puts $aPbxprojFile "\t\t$aGuidsMap($aToolkitLib) = {isa = PBXFileReference; explicitFileType = \"compiled.mach-o.${theTargetType}\"; includeInIndex = 0; path = $aPath; sourceTree = BUILT_PRODUCTS_DIR; };\n" - puts $aPbxprojFile $aSrcFileRefSection - puts $aPbxprojFile $aDepsFileRefSection - # End PBXFileReference section - - - # Begin PBXFrameworksBuildPhase section - set aTkFrameworks "${theToolKit}_Frameworks" - if { ! [info exists aGuidsMap($aTkFrameworks)] } { - set aGuidsMap($aTkFrameworks) [OS:genGUID "xcd"] - } - - puts $aPbxprojFile "\t\t$aGuidsMap($aTkFrameworks) = \{" - puts $aPbxprojFile "\t\t\tisa = PBXFrameworksBuildPhase;" - puts $aPbxprojFile "\t\t\tbuildActionMask = 2147483647;" - puts $aPbxprojFile "\t\t\tfiles = (" - puts $aPbxprojFile $aDepsGuids - puts $aPbxprojFile "\t\t\t);" - puts $aPbxprojFile "\t\t\trunOnlyForDeploymentPostprocessing = 0;" - puts $aPbxprojFile "\t\t\};\n" - # End PBXFrameworksBuildPhase section - - # Begin PBXGroup section - set aTkPBXGroup "${theToolKit}_PBXGroup" - if { ! [info exists aGuidsMap($aTkPBXGroup)] } { - set aGuidsMap($aTkPBXGroup) [OS:genGUID "xcd"] - } - - set aTkSrcGroup "${theToolKit}_SrcGroup" - if { ! [info exists aGuidsMap($aTkSrcGroup)] } { - set aGuidsMap($aTkSrcGroup) [OS:genGUID "xcd"] - } - - puts $aPbxprojFile $aGroupSection - puts $aPbxprojFile "\t\t$aGuidsMap($aTkPBXGroup) = \{" - puts $aPbxprojFile "\t\t\tisa = PBXGroup;" - puts $aPbxprojFile "\t\t\tchildren = (" - puts $aPbxprojFile $aDepsRefGuids - puts $aPbxprojFile "\t\t\t\t$aGuidsMap($aTkSrcGroup) ," - puts $aPbxprojFile "\t\t\t\t$aGuidsMap($aToolkitLib) ," - puts $aPbxprojFile "\t\t\t);" - puts $aPbxprojFile "\t\t\tsourceTree = \"\";" - puts $aPbxprojFile "\t\t\};" - puts $aPbxprojFile "\t\t$aGuidsMap($aTkSrcGroup) = \{" - puts $aPbxprojFile "\t\t\tisa = PBXGroup;" - puts $aPbxprojFile "\t\t\tchildren = (" - puts $aPbxprojFile $aPackagesGuids - puts $aPbxprojFile "\t\t\t);" - puts $aPbxprojFile "\t\t\tname = \"Source files\";" - puts $aPbxprojFile "\t\t\tsourceTree = \"\";" - puts $aPbxprojFile "\t\t\};\n" - # End PBXGroup section - - # Begin PBXHeadersBuildPhase section - set aTkHeaders "${theToolKit}_Headers" - if { ! [info exists aGuidsMap($aTkHeaders)] } { - set aGuidsMap($aTkHeaders) [OS:genGUID "xcd"] - } - - puts $aPbxprojFile "\t\t$aGuidsMap($aTkHeaders) = \{" - puts $aPbxprojFile "\t\t\tisa = PBX${aPBXBuildPhase}BuildPhase;" - puts $aPbxprojFile "\t\t\tbuildActionMask = 2147483647;" - puts $aPbxprojFile "\t\t\tfiles = (" - puts $aPbxprojFile "\t\t\t);" - puts $aPbxprojFile "\t\t\trunOnlyForDeploymentPostprocessing = ${aRunOnlyForDeployment};" - puts $aPbxprojFile "\t\t\};\n" - # End PBXHeadersBuildPhase section - - # Begin PBXNativeTarget section - set aTkBuildCfgListNativeTarget "${theToolKit}_BuildCfgListNativeTarget" - if { ! [info exists aGuidsMap($aTkBuildCfgListNativeTarget)] } { - set aGuidsMap($aTkBuildCfgListNativeTarget) [OS:genGUID "xcd"] - } - - set aTkSources "${theToolKit}_Sources" - if { ! [info exists aGuidsMap($aTkSources)] } { - set aGuidsMap($aTkSources) [OS:genGUID "xcd"] - } - - puts $aPbxprojFile "\t\t$aGuidsMap($theToolKit) = \{" - puts $aPbxprojFile "\t\t\tisa = PBXNativeTarget;" - puts $aPbxprojFile "\t\t\tbuildConfigurationList = $aGuidsMap($aTkBuildCfgListNativeTarget) ;" - puts $aPbxprojFile "\t\t\tbuildPhases = (" - puts $aPbxprojFile "\t\t\t\t$aGuidsMap($aTkSources) ," - puts $aPbxprojFile "\t\t\t\t$aGuidsMap($aTkFrameworks) ," - puts $aPbxprojFile "\t\t\t\t$aGuidsMap($aTkHeaders) ," - puts $aPbxprojFile "\t\t\t);" - puts $aPbxprojFile "\t\t\tbuildRules = (" - puts $aPbxprojFile "\t\t\t);" - puts $aPbxprojFile "\t\t\tdependencies = (" - puts $aPbxprojFile "\t\t\t);" - puts $aPbxprojFile "\t\t\tname = $theToolKit;" - puts $aPbxprojFile "\t\t\tproductName = $theToolKit;" - puts $aPbxprojFile "\t\t\tproductReference = $aGuidsMap($aToolkitLib) ;" - puts $aPbxprojFile "\t\t\tproductType = \"com.apple.product-type.${aProductType}\";" - puts $aPbxprojFile "\t\t\};\n" - # End PBXNativeTarget section - - # Begin PBXProject section - set aTkProjectObj "${theToolKit}_ProjectObj" - if { ! [info exists aGuidsMap($aTkProjectObj)] } { - set aGuidsMap($aTkProjectObj) [OS:genGUID "xcd"] - } - - set aTkBuildCfgListProj "${theToolKit}_BuildCfgListProj" - if { ! [info exists aGuidsMap($aTkBuildCfgListProj)] } { - set aGuidsMap($aTkBuildCfgListProj) [OS:genGUID "xcd"] - } - - puts $aPbxprojFile "\t\t$aGuidsMap($aTkProjectObj) = \{" - puts $aPbxprojFile "\t\t\tisa = PBXProject;" - puts $aPbxprojFile "\t\t\tattributes = \{" - puts $aPbxprojFile "\t\t\t\tLastUpgradeCheck = 0430;" - puts $aPbxprojFile "\t\t\t\};" - puts $aPbxprojFile "\t\t\tbuildConfigurationList = $aGuidsMap($aTkBuildCfgListProj) ;" - puts $aPbxprojFile "\t\t\tcompatibilityVersion = \"Xcode 3.2\";" - puts $aPbxprojFile "\t\t\tdevelopmentRegion = English;" - puts $aPbxprojFile "\t\t\thasScannedForEncodings = 0;" - puts $aPbxprojFile "\t\t\tknownRegions = (" - puts $aPbxprojFile "\t\t\t\ten," - puts $aPbxprojFile "\t\t\t);" - puts $aPbxprojFile "\t\t\tmainGroup = $aGuidsMap($aTkPBXGroup);" - puts $aPbxprojFile "\t\t\tproductRefGroup = $aGuidsMap($aTkPBXGroup);" - puts $aPbxprojFile "\t\t\tprojectDirPath = \"\";" - puts $aPbxprojFile "\t\t\tprojectRoot = \"\";" - puts $aPbxprojFile "\t\t\ttargets = (" - puts $aPbxprojFile "\t\t\t\t$aGuidsMap($theToolKit) ," - puts $aPbxprojFile "\t\t\t);" - puts $aPbxprojFile "\t\t\};\n" - # End PBXProject section - - # Begin PBXSourcesBuildPhase section - puts $aPbxprojFile "\t\t$aGuidsMap($aTkSources) = \{" - puts $aPbxprojFile "\t\t\tisa = PBXSourcesBuildPhase;" - puts $aPbxprojFile "\t\t\tbuildActionMask = 2147483647;" - puts $aPbxprojFile "\t\t\tfiles = (" - puts $aPbxprojFile $aSrcFileGuids - puts $aPbxprojFile "\t\t\t);" - puts $aPbxprojFile "\t\t\trunOnlyForDeploymentPostprocessing = 0;" - puts $aPbxprojFile "\t\t\};\n" - # End PBXSourcesBuildPhase section - - # Begin XCBuildConfiguration section - set aTkDebugProject "${theToolKit}_DebugProject" - if { ! [info exists aGuidsMap($aTkDebugProject)] } { - set aGuidsMap($aTkDebugProject) [OS:genGUID "xcd"] - } - - set aTkReleaseProject "${theToolKit}_ReleaseProject" - if { ! [info exists aGuidsMap($aTkReleaseProject)] } { - set aGuidsMap($aTkReleaseProject) [OS:genGUID "xcd"] - } - - set aTkDebugNativeTarget "${theToolKit}_DebugNativeTarget" - if { ! [info exists aGuidsMap($aTkDebugNativeTarget)] } { - set aGuidsMap($aTkDebugNativeTarget) [OS:genGUID "xcd"] - } - - set aTkReleaseNativeTarget "${theToolKit}_ReleaseNativeTarget" - if { ! [info exists aGuidsMap($aTkReleaseNativeTarget)] } { - set aGuidsMap($aTkReleaseNativeTarget) [OS:genGUID "xcd"] - } - - # Debug target - puts $aPbxprojFile "\t\t$aGuidsMap($aTkDebugProject) = \{" - puts $aPbxprojFile "\t\t\tisa = XCBuildConfiguration;" - puts $aPbxprojFile "\t\t\tbuildSettings = \{" - - puts $aPbxprojFile "\t\t\t\tDEBUG_INFORMATION_FORMAT = dwarf;" - puts $aPbxprojFile "\t\t\t\tALWAYS_SEARCH_USER_PATHS = NO;" - if { "$thePlatform" == "ios" } { - puts $aPbxprojFile "\t\t\t\t\"ARCHS\[sdk=iphoneos\*\]\" = \"\$(ARCHS_STANDARD)\";"; - puts $aPbxprojFile "\t\t\t\t\"ARCHS\[sdk=iphonesimulator\*\]\" = \"x86_64\";"; - puts $aPbxprojFile "\t\t\t\tCLANG_ENABLE_MODULES = YES;" - puts $aPbxprojFile "\t\t\t\tCLANG_ENABLE_OBJC_ARC = YES;" - } - puts $aPbxprojFile "\t\t\t\tARCHS = \"\$(ARCHS_STANDARD_64_BIT)\";" - puts $aPbxprojFile "\t\t\t\tCLANG_CXX_LIBRARY = \"libc++\";" - puts $aPbxprojFile "\t\t\t\tCLANG_CXX_LANGUAGE_STANDARD = \"c++0x\";" - puts $aPbxprojFile "\t\t\t\tCOPY_PHASE_STRIP = NO;" - puts $aPbxprojFile "\t\t\t\tGCC_C_LANGUAGE_STANDARD = gnu99;" - puts $aPbxprojFile "\t\t\t\tGCC_DYNAMIC_NO_PIC = NO;" - puts $aPbxprojFile "\t\t\t\tGCC_ENABLE_OBJC_EXCEPTIONS = YES;" - puts $aPbxprojFile "\t\t\t\tGCC_OPTIMIZATION_LEVEL = 0;" - puts $aPbxprojFile "\t\t\t\tGCC_PREPROCESSOR_DEFINITIONS = (" - puts $aPbxprojFile "\t\t\t\t\t\"DEBUG=1\"," - puts $aPbxprojFile "\t\t\t\t\t\"\$\(inherited\)\"," - puts $aPbxprojFile "\t\t\t\t);" - puts $aPbxprojFile "\t\t\t\tGCC_SYMBOLS_PRIVATE_EXTERN = NO;" - puts $aPbxprojFile "\t\t\t\tGCC_VERSION = com.apple.compilers.llvm.clang.1_0;" - puts $aPbxprojFile "\t\t\t\tGCC_WARN_64_TO_32_BIT_CONVERSION = YES;" - puts $aPbxprojFile "\t\t\t\tGCC_WARN_ABOUT_RETURN_TYPE = YES;" - puts $aPbxprojFile "\t\t\t\tGCC_WARN_UNINITIALIZED_AUTOS = YES;" - puts $aPbxprojFile "\t\t\t\tGCC_WARN_UNUSED_VARIABLE = YES;" - puts $aPbxprojFile "\t\t\t\tOTHER_LDFLAGS = \"\$(CSF_OPT_LNK64D)\"; " - if { "$thePlatform" == "ios" } { - puts $aPbxprojFile "\t\t\t\tONLY_ACTIVE_ARCH = NO;" - puts $aPbxprojFile "\t\t\t\tSDKROOT = iphoneos;" - } else { - puts $aPbxprojFile "\t\t\t\tONLY_ACTIVE_ARCH = YES;" - } - puts $aPbxprojFile "\t\t\t\};" - - puts $aPbxprojFile "\t\t\tname = Debug;" - puts $aPbxprojFile "\t\t\};" - - # Release target - puts $aPbxprojFile "\t\t$aGuidsMap($aTkReleaseProject) = \{" - puts $aPbxprojFile "\t\t\tisa = XCBuildConfiguration;" - puts $aPbxprojFile "\t\t\tbuildSettings = \{" - - puts $aPbxprojFile "\t\t\t\tDEBUG_INFORMATION_FORMAT = \"dwarf-with-dsym\";" - puts $aPbxprojFile "\t\t\t\tALWAYS_SEARCH_USER_PATHS = NO;" - if { "$thePlatform" == "ios" } { - puts $aPbxprojFile "\t\t\t\t\"ARCHS\[sdk=iphoneos\*\]\" = \"\$(ARCHS_STANDARD)\";"; - puts $aPbxprojFile "\t\t\t\t\"ARCHS\[sdk=iphonesimulator\*\]\" = \"x86_64\";"; - puts $aPbxprojFile "\t\t\t\tCLANG_ENABLE_MODULES = YES;" - puts $aPbxprojFile "\t\t\t\tCLANG_ENABLE_OBJC_ARC = YES;" - } - puts $aPbxprojFile "\t\t\t\tARCHS = \"\$(ARCHS_STANDARD_64_BIT)\";" - puts $aPbxprojFile "\t\t\t\tCLANG_CXX_LIBRARY = \"libc++\";" - puts $aPbxprojFile "\t\t\t\tCLANG_CXX_LANGUAGE_STANDARD = \"c++0x\";" - puts $aPbxprojFile "\t\t\t\tCOPY_PHASE_STRIP = YES;" - puts $aPbxprojFile "\t\t\t\tGCC_C_LANGUAGE_STANDARD = gnu99;" - puts $aPbxprojFile "\t\t\t\tGCC_ENABLE_OBJC_EXCEPTIONS = YES;" - puts $aPbxprojFile "\t\t\t\tDEAD_CODE_STRIPPING = NO;" - puts $aPbxprojFile "\t\t\t\tGCC_OPTIMIZATION_LEVEL = 2;" - puts $aPbxprojFile "\t\t\t\tGCC_VERSION = com.apple.compilers.llvm.clang.1_0;" - puts $aPbxprojFile "\t\t\t\tGCC_WARN_64_TO_32_BIT_CONVERSION = YES;" - puts $aPbxprojFile "\t\t\t\tGCC_WARN_ABOUT_RETURN_TYPE = YES;" - puts $aPbxprojFile "\t\t\t\tGCC_WARN_UNINITIALIZED_AUTOS = YES;" - puts $aPbxprojFile "\t\t\t\tGCC_WARN_UNUSED_VARIABLE = YES;" - puts $aPbxprojFile "\t\t\t\tOTHER_LDFLAGS = \"\$(CSF_OPT_LNK64)\";" - if { "$thePlatform" == "ios" } { - puts $aPbxprojFile "\t\t\t\tIPHONEOS_DEPLOYMENT_TARGET = 7.0;" - puts $aPbxprojFile "\t\t\t\tSDKROOT = iphoneos;" - } - puts $aPbxprojFile "\t\t\t\};" - puts $aPbxprojFile "\t\t\tname = Release;" - puts $aPbxprojFile "\t\t\};" - puts $aPbxprojFile "\t\t$aGuidsMap($aTkDebugNativeTarget) = \{" - puts $aPbxprojFile "\t\t\tisa = XCBuildConfiguration;" - puts $aPbxprojFile "\t\t\tbuildSettings = \{" - puts $aPbxprojFile "${anExecExtension}" - puts $aPbxprojFile "${anExecPrefix}" - puts $aPbxprojFile "\t\t\t\tGCC_PREPROCESSOR_DEFINITIONS = (" - foreach aMacro $aTKDefines { - puts $aPbxprojFile "\t\t\t\t\t${aMacro} ," - } - puts $aPbxprojFile "\t\t\t\t);" - - puts $aPbxprojFile "\t\t\t\tHEADER_SEARCH_PATHS = (" - foreach anIncPath $anIncPaths { - puts $aPbxprojFile "\t\t\t\t\t${anIncPath}," - } - puts $aPbxprojFile "\t\t\t\t\t\"\$(CSF_OPT_INC)\"," - puts $aPbxprojFile "\t\t\t\t);" - - puts $aPbxprojFile "\t\t\t\tLIBRARY_SEARCH_PATHS = (" - foreach anLibPath $anLibPaths { - puts $aPbxprojFile "\t\t\t\t\t${anLibPath}," - } - puts $aPbxprojFile "\t\t\t\t);" - - puts $aPbxprojFile "\t\t\t\tOTHER_CFLAGS = (" - puts $aPbxprojFile "\t\t\t\t\t\"\$(CSF_OPT_CMPL)\"," - puts $aPbxprojFile "\t\t\t\t);" - puts $aPbxprojFile "\t\t\t\tOTHER_CPLUSPLUSFLAGS = (" - puts $aPbxprojFile "\t\t\t\t\t\"\$(OTHER_CFLAGS)\"," - puts $aPbxprojFile "\t\t\t\t);" - puts $aPbxprojFile "\t\t\t\tPRODUCT_NAME = \"\$(TARGET_NAME)\";" - set anUserHeaderSearchPath "\t\t\t\tUSER_HEADER_SEARCH_PATHS = \"" - foreach anIncPath $anIncPaths { - append anUserHeaderSearchPath " ${anIncPath}" - } - append anUserHeaderSearchPath "\";" - puts $aPbxprojFile $anUserHeaderSearchPath - puts $aPbxprojFile "${aWrapperExtension}" - puts $aPbxprojFile "\t\t\t\};" - puts $aPbxprojFile "\t\t\tname = Debug;" - puts $aPbxprojFile "\t\t\};" - puts $aPbxprojFile "\t\t$aGuidsMap($aTkReleaseNativeTarget) = \{" - puts $aPbxprojFile "\t\t\tisa = XCBuildConfiguration;" - puts $aPbxprojFile "\t\t\tbuildSettings = \{" - puts $aPbxprojFile "${anExecExtension}" - puts $aPbxprojFile "${anExecPrefix}" - puts $aPbxprojFile "\t\t\t\tGCC_PREPROCESSOR_DEFINITIONS = (" - foreach aMacro $aTKDefines { - puts $aPbxprojFile "\t\t\t\t\t${aMacro} ," - } - puts $aPbxprojFile "\t\t\t\t);" - puts $aPbxprojFile "\t\t\t\tHEADER_SEARCH_PATHS = (" - foreach anIncPath $anIncPaths { - puts $aPbxprojFile "\t\t\t\t\t${anIncPath}," - } - puts $aPbxprojFile "\t\t\t\t\t\"\$(CSF_OPT_INC)\"," - puts $aPbxprojFile "\t\t\t\t);" - - puts $aPbxprojFile "\t\t\t\tLIBRARY_SEARCH_PATHS = (" - foreach anLibPath $anLibPaths { - puts $aPbxprojFile "\t\t\t\t\t${anLibPath}," - } - puts $aPbxprojFile "\t\t\t\t);" - - puts $aPbxprojFile "\t\t\t\tOTHER_CFLAGS = (" - puts $aPbxprojFile "\t\t\t\t\t\"\$(CSF_OPT_CMPL)\"," - puts $aPbxprojFile "\t\t\t\t);" - puts $aPbxprojFile "\t\t\t\tOTHER_CPLUSPLUSFLAGS = (" - puts $aPbxprojFile "\t\t\t\t\t\"\$(OTHER_CFLAGS)\"," - puts $aPbxprojFile "\t\t\t\t);" - puts $aPbxprojFile "\t\t\t\tPRODUCT_NAME = \"\$(TARGET_NAME)\";" - puts $aPbxprojFile $anUserHeaderSearchPath - puts $aPbxprojFile "${aWrapperExtension}" - puts $aPbxprojFile "\t\t\t\};" - puts $aPbxprojFile "\t\t\tname = Release;" - puts $aPbxprojFile "\t\t\};\n" - # End XCBuildConfiguration section - - # Begin XCConfigurationList section - puts $aPbxprojFile "\t\t$aGuidsMap($aTkBuildCfgListProj) = \{" - puts $aPbxprojFile "\t\t\tisa = XCConfigurationList;" - puts $aPbxprojFile "\t\tbuildConfigurations = (" - puts $aPbxprojFile "\t\t\t\t$aGuidsMap($aTkDebugProject) ," - puts $aPbxprojFile "\t\t\t\t$aGuidsMap($aTkReleaseProject) ," - puts $aPbxprojFile "\t\t\t);" - puts $aPbxprojFile "\t\t\tdefaultConfigurationIsVisible = 0;" - puts $aPbxprojFile "\t\t\tdefaultConfigurationName = Release;" - puts $aPbxprojFile "\t\t\};" - puts $aPbxprojFile "\t\t$aGuidsMap($aTkBuildCfgListNativeTarget) = \{" - puts $aPbxprojFile "\t\t\tisa = XCConfigurationList;" - puts $aPbxprojFile "\t\t\tbuildConfigurations = (" - puts $aPbxprojFile "\t\t\t\t$aGuidsMap($aTkDebugNativeTarget) ," - puts $aPbxprojFile "\t\t\t\t$aGuidsMap($aTkReleaseNativeTarget) ," - puts $aPbxprojFile "\t\t\t);" - puts $aPbxprojFile "\t\t\tdefaultConfigurationIsVisible = 0;" - puts $aPbxprojFile "\t\t\tdefaultConfigurationName = Release;" - puts $aPbxprojFile "\t\t\};\n" - # End XCConfigurationList section - - puts $aPbxprojFile "\t\};" - puts $aPbxprojFile "\trootObject = $aGuidsMap($aTkProjectObj) ;" - puts $aPbxprojFile "\}" - - close $aPbxprojFile -} - -proc osutils:xcdx { theOutDir theExecutable theGuidsMap } { - set aUsername [exec whoami] - - # Creating folders for Xcode project file. - set anExecutableDir "${theOutDir}/${theExecutable}.xcodeproj" - wokUtils:FILES:mkdir $anExecutableDir - if { ! [file exists $anExecutableDir] } { - puts stderr "Error: Could not create project directory \"$anExecutableDir\"" - return - } - - set aUserDataDir "${anExecutableDir}/xcuserdata" - wokUtils:FILES:mkdir $aUserDataDir - if { ! [file exists $aUserDataDir] } { - puts stderr "Error: Could not create xcuserdata directory in \"$anExecutableDir\"" - return - } - - set aUserDataDir "${aUserDataDir}/${aUsername}.xcuserdatad" - wokUtils:FILES:mkdir $aUserDataDir - if { ! [file exists $aUserDataDir] } { - puts stderr "Error: Could not create ${aUsername}.xcuserdatad directory in \"$anExecutableDir\"/xcuserdata" - return - } - - set aSchemesDir "${aUserDataDir}/xcschemes" - wokUtils:FILES:mkdir $aSchemesDir - if { ! [file exists $aSchemesDir] } { - puts stderr "Error: Could not create xcschemes directory in \"$aUserDataDir\"" - return - } - # End folders creation. - - # Generating GUID for toolkit. - upvar $theGuidsMap aGuidsMap - if { ! [info exists aGuidsMap($theExecutable)] } { - set aGuidsMap($theExecutable) [OS:genGUID "xcd"] - } - - # Creating xcscheme file for toolkit from template. - set aXcschemeTmpl [osutils:readtemplate "xcscheme" "xcode"] - regsub -all -- {__TOOLKIT_NAME__} $aXcschemeTmpl $theExecutable aXcschemeTmpl - regsub -all -- {__TOOLKIT_GUID__} $aXcschemeTmpl $aGuidsMap($theExecutable) aXcschemeTmpl - set aXcschemeFile [open "$aSchemesDir/${theExecutable}.xcscheme" "w"] - puts $aXcschemeFile $aXcschemeTmpl - close $aXcschemeFile - - # Creating xcschememanagement.plist file for toolkit from template. - set aPlistTmpl [osutils:readtemplate "plist" "xcode"] - regsub -all -- {__TOOLKIT_NAME__} $aPlistTmpl $theExecutable aPlistTmpl - regsub -all -- {__TOOLKIT_GUID__} $aPlistTmpl $aGuidsMap($theExecutable) aPlistTmpl - set aPlistFile [open "$aSchemesDir/xcschememanagement.plist" "w"] - puts $aPlistFile $aPlistTmpl - close $aPlistFile -} - -# Returns available Windows SDKs versions -proc osutils:sdk { theSdkMajorVer {isQuietMode false} {theSdkDirectories {}} } { - if { ![llength ${theSdkDirectories}] } { - foreach anEnvVar { "ProgramFiles" "ProgramFiles\(x86\)" "ProgramW6432" } { - if {[ info exists ::env(${anEnvVar}) ]} { - lappend theSdkDirectories "$::env(${anEnvVar})/Windows Kits/${theSdkMajorVer}/Include" - } - } - } - - set sdk_versions {} - foreach sdk_dir ${theSdkDirectories} { - if { [file isdirectory ${sdk_dir}] } { - lappend sdk_versions [glob -tails -directory "${sdk_dir}" -type d *] - } - } - - if {![llength ${sdk_versions}] && !${isQuietMode}} { - error "Error : Could not find Windows SDK ${theSdkMajorVer}" - } - - return [join [lsort -unique ${sdk_versions}] " "] -} - -# Generate global properties to Visual Studio project file for UWP solution -proc osutils:uwp:proj { isUWP theProjTmpl } { - - set uwp_properties "" - set uwp_generate_metadata "" - set uwp_app_container "" - - set format_template "" - - if { $isUWP } { - set sdk_versions [osutils:sdk 10] - set sdk_max_ver [lindex ${sdk_versions} end] - - set uwp_properties "en-US\n \ -Windows Store\n \ -10.0\n \ -14.0\n \ -true\n \ -${sdk_max_ver}\n \ -${sdk_max_ver}" - - set uwp_generate_metadata "false" - - regsub -all -- {[\r\n\s]*EnableFastChecks} ${theProjTmpl} "" theProjTmpl - } else { - set format_template "\[\\r\\n\\s\]*" - } - - regsub -all -- "${format_template}__UWP_PROPERTIES__" ${theProjTmpl} "${uwp_properties}" theProjTmpl - regsub -all -- "${format_template}__UWP_GENERATE_METADATA__" ${theProjTmpl} "${uwp_generate_metadata}" theProjTmpl - - return ${theProjTmpl} -} - -# Report all files found in package directory but not listed in FILES -proc osutils:checksrcfiles { theUnit theSrcDir} { - global path - set aCasRoot [file normalize ${path}] - - if {![file isdirectory ${aCasRoot}]} { - puts "OCCT directory is not defined correctly: ${aCasRoot}" - return - } - - set anUnitAbsPath [file normalize "${aCasRoot}/$theSrcDir/${theUnit}"] - - if {[file exists "${anUnitAbsPath}/FILES"]} { - set aFilesFile [open "${anUnitAbsPath}/FILES" rb] - set aFilesFileList [split [read ${aFilesFile}] "\n"] - close ${aFilesFile} - - set aFilesFileList [lsearch -inline -all -not -exact ${aFilesFileList} ""] - - # report all files not listed in FILES - set anAllFiles [glob -tails -nocomplain -dir ${anUnitAbsPath} "*"] - foreach aFile ${anAllFiles} { - if { "${aFile}" == "FILES" } { - continue - } - if { "${aFile}" == "icons" } { - continue - } - if { [lsearch -exact ${aFilesFileList} ${aFile}] == -1 } { - puts "Warning: file ${anUnitAbsPath}/${aFile} is not listed in ${anUnitAbsPath}/FILES!" - } - } - } -} diff --git a/adm/svgdiff.bat b/adm/svgdiff.bat deleted file mode 100644 index ae81427ccc..0000000000 --- a/adm/svgdiff.bat +++ /dev/null @@ -1,31 +0,0 @@ -@echo off -rem Script to diff SVG images visually (as PNG) in TortoiseGit client -rem -rem It assumes that Inkscape and TortoiseGitIDiff executables are either -rem installed in default locations in Program Files, or are accessible by PATH -rem -rem To use this script for diffing SVG images, open TortoiseGit settings -rem (Start -> Programs -> TortoiseGit -> Settings), select "Diff Viewer", -rem click button "Advanced..." on the right tab and then add new record: -rem - Extension: .svg -rem - External program: \adm\svgdiff.bat %base %mine %bname %yname - -rem Remove double quotes around arguments -set "f1=%1" -set "f2=%2" -set "f1=%f1:~1,-1%.png" -set "f2=%f2:~1,-1%.png" - -rem Check if Inkscape and TortoiseGit are installed in default locations in -rem ProgramFiles; if not, assume they still may be accessible by PATH -set "inkscape=%ProgramFiles%\Inkscape\inkscape.exe" -if not exist "%inkscape%" set inkscape=inkscape.exe -set "tgitidiff=%ProgramFiles%\TortoiseGit\bin\TortoiseGitIDiff.exe" -if not exist "%tgitidiff%" set tgitidiff=TortoiseGitIDiff.exe - -rem Convert SVG to PNG using Inkscape -"%inkscape%" -e "%f1%" %1 -"%inkscape%" -e "%f2%" %2 - -rem Call Tortoise differ -"%tgitidiff%" /left:"%f1%" /right:"%f2%" /lefttitle:%3 /righttitle:%4 diff --git a/adm/templates/template.plist b/adm/templates/template.plist deleted file mode 100644 index 9991859028..0000000000 --- a/adm/templates/template.plist +++ /dev/null @@ -1,22 +0,0 @@ - - - - - SchemeUserState - - __TOOLKIT_NAME__.xcscheme - - orderHint - 0 - - - SuppressBuildableAutocreation - - __TOOLKIT_GUID__ - - primary - - - - - diff --git a/adm/templates/template.vc10 b/adm/templates/template.vc10 deleted file mode 100644 index 282b75f90a..0000000000 --- a/adm/templates/template.vc10 +++ /dev/null @@ -1,278 +0,0 @@ - - - - - Debug - Win32 - - - Release - Win32 - - - Debug - x64 - - - Release - x64 - - - - __PROJECT_GUID__ - __UWP_PROPERTIES__ - - - - DynamicLibrary - __VCVEREXT__ - __VCCHARSET__ - - - DynamicLibrary - __VCVEREXT__ - __VCCHARSET__ - - - DynamicLibrary - __VCVEREXT__ - __VCCHARSET__ - - - DynamicLibrary - __VCVEREXT__ - __VCCHARSET__ - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>10.0.30319.1 - .\..\..\..\win32\__VCVER__\bin\ - .\..\..\..\win32\__VCVER__\obj\__TKNAM__\ - false - .\..\..\..\win32\__VCVER__\bind\ - .\..\..\..\win32\__VCVER__\objd\__TKNAM__\ - false - .\..\..\..\win64\__VCVER__\bin\ - .\..\..\..\win64\__VCVER__\obj\__TKNAM__\ - false - .\..\..\..\win64\__VCVER__\bind\ - .\..\..\..\win64\__VCVER__\objd\__TKNAM__\ - false - - - - NDEBUG;%(PreprocessorDefinitions) - true - true - Win32 - .\..\..\..\win32\__VCVER__\bin\__TKNAM__.tlb - - - - - /bigobj %(AdditionalOptions) - __TKINC__;$(CSF_OPT_INC);%(AdditionalIncludeDirectories) - true - MaxSpeed - OnlyExplicitInline - NDEBUG;No_Exception;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;__TKDEFINES__;$(CSF_DEFINES);%(PreprocessorDefinitions) - true - Async - MultiThreadedDLL - true - .\..\..\..\win32\__VCVER__\obj\__TKNAM__/ - .\..\..\..\win32\__VCVER__\obj\__TKNAM__/ - .\..\..\..\win32\__VCVER__\obj\__TKNAM__/ - Level4 - true - 26812 - Precise - NotUsing - __VCMPL32__ - - - ..\..\..\inc;$(CSF_OPT_INC);%(AdditionalIncludeDirectories) - NDEBUG;No_Exception;__TKDEFINES__;$(CSF_DEFINES);%(PreprocessorDefinitions) - - - __TKDEP__ - .\..\..\..\win32\__VCVER__\bin\__TKNAM__.dll - true - ..\..\..\win32\__VCVER__\lib;$(CSF_OPT_LIB32);%(AdditionalLibraryDirectories) - __VCReleasePDB__ - .\..\..\..\win32\__VCVER__\bin\__TKNAM__.pdb - Console - ..\..\..\win32\__VCVER__\lib\__TKNAM__.lib - __VCLNKREL__ - __UWP_GENERATE_METADATA__ - - - - - _DEBUG;%(PreprocessorDefinitions) - true - true - Win32 - .\..\..\..\win32\__VCVER__\bind\__TKNAM__.tlb - - - - - %(AdditionalOptions) - __TKINC__;$(CSF_OPT_INC);%(AdditionalIncludeDirectories) - true - Disabled - OnlyExplicitInline - _DEBUG;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;__TKDEFINES__;$(CSF_DEFINES);%(PreprocessorDefinitions) - Async - MultiThreadedDebugDLL - .\..\..\..\win32\__VCVER__\objd\__TKNAM__/ - .\..\..\..\win32\__VCVER__\objd\__TKNAM__/ - .\..\..\..\win32\__VCVER__\objd\__TKNAM__/ - Level4 - true - ProgramDatabase - Default - 26812 - EnableFastChecks - Precise - NotUsing - __VCMPL32__ - - - ..\..\..\inc;$(CSF_OPT_INC);%(AdditionalIncludeDirectories) - _DEBUG;__TKDEFINES__;$(CSF_DEFINES);%(PreprocessorDefinitions) - - - __TKDEP_DEBUG__ - .\..\..\..\win32\__VCVER__\bind\__TKNAM__.dll - true - ..\..\..\win32\__VCVER__\libd;$(CSF_OPT_LIB32D);%(AdditionalLibraryDirectories) - true - ..\..\..\win32\__VCVER__\bind\__TKNAM__.pdb - Console - ..\..\..\win32\__VCVER__\libd\__TKNAM__.lib - __UWP_GENERATE_METADATA__ - - - - - NDEBUG;%(PreprocessorDefinitions) - true - true - x64 - .\..\..\..\win64\__VCVER__\bin\__TKNAM__.tlb - - - - - %(AdditionalOptions) - __TKINC__;$(CSF_OPT_INC);%(AdditionalIncludeDirectories) - true - MaxSpeed - OnlyExplicitInline - NDEBUG;No_Exception;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;__TKDEFINES__;$(CSF_DEFINES);%(PreprocessorDefinitions) - true - Async - MultiThreadedDLL - true - .\..\..\..\win64\__VCVER__\obj\__TKNAM__/ - .\..\..\..\win64\__VCVER__\obj\__TKNAM__/ - .\..\..\..\win64\__VCVER__\obj\__TKNAM__/ - Level4 - true - 26812 - Precise - NotUsing - __VCMPL64__ - - - ..\..\..\inc;$(CSF_OPT_INC);%(AdditionalIncludeDirectories) - NDEBUG;No_Exception;__TKDEFINES__;$(CSF_DEFINES);%(PreprocessorDefinitions) - - - __TKDEP__ - .\..\..\..\win64\__VCVER__\bin\__TKNAM__.dll - true - ..\..\..\win64\__VCVER__\lib;$(CSF_OPT_LIB64);%(AdditionalLibraryDirectories) - __VCReleasePDB__ - .\..\..\..\win64\__VCVER__\bin\__TKNAM__.pdb - Console - ..\..\..\win64\__VCVER__\lib\__TKNAM__.lib - __VCLNKREL__ - __UWP_GENERATE_METADATA__ - - - - - _DEBUG;%(PreprocessorDefinitions) - true - true - x64 - .\..\..\..\win64\__VCVER__\bind\__TKNAM__.tlb - - - - - %(AdditionalOptions) - __TKINC__;$(CSF_OPT_INC);%(AdditionalIncludeDirectories) - true - Disabled - OnlyExplicitInline - _DEBUG;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;__TKDEFINES__;$(CSF_DEFINES);%(PreprocessorDefinitions) - Async - MultiThreadedDebugDLL - .\..\..\..\win64\__VCVER__\objd\__TKNAM__/ - .\..\..\..\win64\__VCVER__\objd\__TKNAM__/ - .\..\..\..\win64\__VCVER__\objd\__TKNAM__/ - Level4 - true - ProgramDatabase - Default - 26812 - EnableFastChecks - Precise - NotUsing - __VCMPL64__ - - - ..\..\..\inc;$(CSF_OPT_INC);%(AdditionalIncludeDirectories) - _DEBUG;__TKDEFINES__;$(CSF_DEFINES);%(PreprocessorDefinitions) - - - __TKDEP_DEBUG__ - .\..\..\..\win64\__VCVER__\bind\__TKNAM__.dll - true - ..\..\..\win64\__VCVER__\libd;$(CSF_OPT_LIB64D);%(AdditionalLibraryDirectories) - true - ..\..\..\win64\__VCVER__\bind\__TKNAM__.pdb - Console - ..\..\..\win64\__VCVER__\libd\__TKNAM__.lib - __UWP_GENERATE_METADATA__ - - - -__FILES__ - - - - - - - - diff --git a/adm/templates/template.vc10x b/adm/templates/template.vc10x deleted file mode 100644 index 843376b2cd..0000000000 --- a/adm/templates/template.vc10x +++ /dev/null @@ -1,259 +0,0 @@ - - - - - Debug - Win32 - - - Release - Win32 - - - Debug - x64 - - - Release - x64 - - - - __PROJECT_GUID__ - - - - __CONF__ - __VCVEREXT__ - - - __CONF__ - __VCVEREXT__ - - - __CONF__ - __VCVEREXT__ - - - __CONF__ - __VCVEREXT__ - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>10.0.30319.1 - .\..\..\..\win32\__VCVER__\bin\ - .\..\..\..\win32\__VCVER__\obj\__XQTNAM__\ - false - .\..\..\..\win32\__VCVER__\bind\ - .\..\..\..\win32\__VCVER__\objd\__XQTNAM__\ - false - .\..\..\..\win64\__VCVER__\bin\ - .\..\..\..\win64\__VCVER__\obj\__XQTNAM__\ - false - .\..\..\..\win64\__VCVER__\bind\ - .\..\..\..\win64\__VCVER__\objd\__XQTNAM__\ - false - - - - NDEBUG;%(PreprocessorDefinitions) - true - true - Win32 - .\..\..\..\win32\__VCVER__\bin\__XQTNAM__.tlb - - - - - %(AdditionalOptions) - __TKINC__;$(CSF_OPT_INC);%(AdditionalIncludeDirectories) - true - MaxSpeed - OnlyExplicitInline - NDEBUG;No_Exception;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;__TKDEFINES__;$(CSF_DEFINES);%(PreprocessorDefinitions) - true - Async - MultiThreadedDLL - true - .\..\..\..\win32\__VCVER__\obj\__XQTNAM__/ - .\..\..\..\win32\__VCVER__\obj\__XQTNAM__/ - .\..\..\..\win32\__VCVER__\obj\__XQTNAM__/ - Level4 - true - 26812 - Precise__VCMPL32__ - - - ..\..\..\inc;$(CSF_OPT_INC);%(AdditionalIncludeDirectories) - NDEBUG;No_Exception;__TKDEFINES__;$(CSF_DEFINES);%(PreprocessorDefinitions) - - - __TKDEP__ - true - ..\..\..\win32\__VCVER__\lib;$(CSF_OPT_LIB32);%(AdditionalLibraryDirectories) - __VCReleasePDB__ - .\..\..\..\win32\__VCVER__\bin\__XQTNAM__.pdb - Console - ..\..\..\win32\__VCVER__\lib\__XQTNAM__.lib - /LARGEADDRESSAWARE %(AdditionalOptions) - __VCLNKREL__ - - - - - _DEBUG;%(PreprocessorDefinitions) - true - true - Win32 - .\..\..\..\win32\__VCVER__\bind\__XQTNAM__.tlb - - - - - %(AdditionalOptions) - __TKINC__;$(CSF_OPT_INC);%(AdditionalIncludeDirectories) - true - Disabled - OnlyExplicitInline - _DEBUG;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;__TKDEFINES__;$(CSF_DEFINES);%(PreprocessorDefinitions) - Async - MultiThreadedDebugDLL - .\..\..\..\win32\__VCVER__\objd\__XQTNAM__/ - .\..\..\..\win32\__VCVER__\objd\__XQTNAM__/ - .\..\..\..\win32\__VCVER__\objd\__XQTNAM__/ - Level4 - true - ProgramDatabase - Default - 26812 - EnableFastChecks - Precise__VCMPL32__ - - - ..\..\..\inc;$(CSF_OPT_INC);%(AdditionalIncludeDirectories) - _DEBUG;__TKDEFINES__;$(CSF_DEFINES);%(PreprocessorDefinitions) - - - __TKDEP_DEBUG__ - true - ..\..\..\win32\__VCVER__\libd;$(CSF_OPT_LIB32D);%(AdditionalLibraryDirectories) - true - ..\..\..\win32\__VCVER__\bind\__XQTNAM__.pdb - Console - ..\..\..\win32\__VCVER__\libd\__XQTNAM__.lib - /LARGEADDRESSAWARE %(AdditionalOptions) - - - - - NDEBUG;%(PreprocessorDefinitions) - true - true - x64 - .\..\..\..\win64\__VCVER__\bin\__XQTNAM__.tlb - - - - - %(AdditionalOptions) - __TKINC__;$(CSF_OPT_INC);%(AdditionalIncludeDirectories) - true - MaxSpeed - OnlyExplicitInline - NDEBUG;No_Exception;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;__TKDEFINES__;$(CSF_DEFINES);%(PreprocessorDefinitions) - true - Async - MultiThreadedDLL - true - .\..\..\..\win64\__VCVER__\obj\__XQTNAM__/ - .\..\..\..\win64\__VCVER__\obj\__XQTNAM__/ - .\..\..\..\win64\__VCVER__\obj\__XQTNAM__/ - Level4 - true - 26812 - Precise__VCMPL64__ - - - ..\..\..\inc;$(CSF_OPT_INC);%(AdditionalIncludeDirectories) - NDEBUG;No_Exception;__TKDEFINES__;$(CSF_DEFINES);%(PreprocessorDefinitions) - - - __TKDEP__ - true - ..\..\..\win64\__VCVER__\lib;$(CSF_OPT_LIB64);%(AdditionalLibraryDirectories) - __VCReleasePDB__ - .\..\..\..\win64\__VCVER__\bin\__XQTNAM__.pdb - Console - ..\..\..\win64\__VCVER__\lib\__XQTNAM__.lib - __VCLNKREL__ - - - - - _DEBUG;%(PreprocessorDefinitions) - true - true - x64 - .\..\..\..\win64\__VCVER__\bind\__XQTNAM__.tlb - - - - - %(AdditionalOptions) - __TKINC__;$(CSF_OPT_INC);%(AdditionalIncludeDirectories) - true - Disabled - OnlyExplicitInline - _DEBUG;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;__TKDEFINES__;$(CSF_DEFINES);%(PreprocessorDefinitions) - Async - MultiThreadedDebugDLL - .\..\..\..\win64\__VCVER__\objd\__XQTNAM__/ - .\..\..\..\win64\__VCVER__\objd\__XQTNAM__/ - .\..\..\..\win64\__VCVER__\objd\__XQTNAM__/ - Level4 - true - ProgramDatabase - Default - 26812 - EnableFastChecks - Precise__VCMPL64__ - - - ..\..\..\inc;$(CSF_OPT_INC);%(AdditionalIncludeDirectories) - _DEBUG;__TKDEFINES__;$(CSF_DEFINES);%(PreprocessorDefinitions) - - - __TKDEP_DEBUG__ - true - ..\..\..\win64\__VCVER__\libd;$(CSF_OPT_LIB64D);%(AdditionalLibraryDirectories) - true - ..\..\..\win64\__VCVER__\bind\__XQTNAM__.pdb - Console - ..\..\..\win64\__VCVER__\libd\__XQTNAM__.lib - - - -__FILES__ - - - - - - - - diff --git a/adm/templates/template.vc7 b/adm/templates/template.vc7 deleted file mode 100644 index 4ce7edcff5..0000000000 --- a/adm/templates/template.vc7 +++ /dev/null @@ -1,160 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -__FILES__ - - - - - - diff --git a/adm/templates/template.vc7x b/adm/templates/template.vc7x deleted file mode 100644 index 78ee434bae..0000000000 --- a/adm/templates/template.vc7x +++ /dev/null @@ -1,152 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -__FILES__ - - - - - diff --git a/adm/templates/template.vc8 b/adm/templates/template.vc8 deleted file mode 100644 index 4d034191a5..0000000000 --- a/adm/templates/template.vc8 +++ /dev/null @@ -1,428 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -__FILES__ - - - - - - diff --git a/adm/templates/template.vc8x b/adm/templates/template.vc8x deleted file mode 100644 index 28c8f7453a..0000000000 --- a/adm/templates/template.vc8x +++ /dev/null @@ -1,413 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -__FILES__ - - - - - diff --git a/adm/templates/template.vc9 b/adm/templates/template.vc9 deleted file mode 100644 index 7dd29fff55..0000000000 --- a/adm/templates/template.vc9 +++ /dev/null @@ -1,419 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -__FILES__ - - - - - - diff --git a/adm/templates/template.vc9x b/adm/templates/template.vc9x deleted file mode 100644 index c6bd0280a5..0000000000 --- a/adm/templates/template.vc9x +++ /dev/null @@ -1,400 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -__FILES__ - - - - - diff --git a/adm/templates/template.xcscheme b/adm/templates/template.xcscheme deleted file mode 100644 index 11b252881e..0000000000 --- a/adm/templates/template.xcscheme +++ /dev/null @@ -1,58 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/adm/templates/template_dll.rc b/adm/templates/template_dll.rc deleted file mode 100644 index e1deafccd2..0000000000 --- a/adm/templates/template_dll.rc +++ /dev/null @@ -1,30 +0,0 @@ -#include -#include - -VS_VERSION_INFO VERSIONINFO -FILEVERSION OCC_VERSION_MAJOR, OCC_VERSION_MINOR, OCC_VERSION_MAINTENANCE, 0 -PRODUCTVERSION OCC_VERSION_MAJOR, OCC_VERSION_MINOR, OCC_VERSION_MAINTENANCE, 0 -FILEFLAGSMASK VS_FFI_FILEFLAGSMASK -#ifdef _DEBUG -FILEFLAGS VS_FF_DEBUG -#endif -FILEOS VOS_NT -FILETYPE VFT_DLL -FILESUBTYPE VFT2_UNKNOWN -BEGIN - BLOCK "StringFileInfo" - BEGIN BLOCK "040904E4" // Language type = U.S English(0x0409) and Character Set = Windows, Multilingual(0x04E4) - BEGIN - VALUE "FileDescription", "__TKNAM__ Toolkit\000" - VALUE "FileVersion", OCC_VERSION_STRING_EXT "\000" - VALUE "LegalCopyright", "\251 OPEN CASCADE SAS\000" - VALUE "ProductName", "Open CASCADE Technology\000" - VALUE "ProductVersion", OCC_VERSION_STRING_EXT "\000" - VALUE "OfficialSite", "www.opencascade.com\000" - END - END - BLOCK "VarFileInfo" - BEGIN - VALUE "Translation", 0x0409, 0x04E4 - END -END diff --git a/adm/templates/vcproj.user.vc9x b/adm/templates/vcproj.user.vc9x deleted file mode 100644 index d3485ae7de..0000000000 --- a/adm/templates/vcproj.user.vc9x +++ /dev/null @@ -1,41 +0,0 @@ - - - - - - - - - - - - - - - - - diff --git a/adm/templates/vcxproj.user.vc10x b/adm/templates/vcxproj.user.vc10x deleted file mode 100644 index 29762143c4..0000000000 --- a/adm/templates/vcxproj.user.vc10x +++ /dev/null @@ -1,23 +0,0 @@ - - - - PATH=..\..\..\win32\__VCVER__\bind;$(CSF_OPT_BIN32D);$(PATH) - WindowsLocalDebugger - $(ProjectDir)\..\..\..\.. - - - PATH=..\..\..\win32\__VCVER__\bin;$(CSF_OPT_BIN32);$(PATH) - WindowsLocalDebugger - $(ProjectDir)\..\..\..\.. - - - PATH=..\..\..\win64\__VCVER__\bin;$(CSF_OPT_BIN64);$(PATH) - WindowsLocalDebugger - $(ProjectDir)\..\..\..\.. - - - PATH=..\..\..\win64\__VCVER__\bind;$(CSF_OPT_BIN64D);$(PATH) - WindowsLocalDebugger - $(ProjectDir)\..\..\..\.. - - \ No newline at end of file diff --git a/adm/templates/xcode.sh b/adm/templates/xcode.sh deleted file mode 100755 index 2514f0238e..0000000000 --- a/adm/templates/xcode.sh +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/bash -# This file has been generated by genproj.tcl script from CASROOT/adm/templates/xcode.sh - -export TARGET="xcd" - -source ./env.sh "$1" "$TARGET" - -open -a Xcode ./adm/mac/xcd/__SOLUTION__.xcworkspace diff --git a/adm/upgrade.dat b/adm/upgrade.dat deleted file mode 100644 index 0ddb46f487..0000000000 --- a/adm/upgrade.dat +++ /dev/null @@ -1,1012 +0,0 @@ -[rename] -Adaptor3d_OffsetCurve Adaptor2d_OffsetCurve -BRepExtrema_OverlappedSubShapes BRepExtrema_MapOfIntegerPackedMapOfInteger -ShapeConstruct_CompBezierCurves2dToBSplineCurve2d Convert_CompBezierCurves2dToBSplineCurve2d -ShapeConstruct_CompBezierCurves2dToBSplineCurve Convert_CompBezierCurves2dToBSplineCurve -Image_PixMap::Img Image_Format_ -V3d_TypeOfShadingModel Graphic3d_TypeOfShadingModel -Graphic3d_TOSM_NONE Graphic3d_TOSM_UNLIT -V3d_COLOR Graphic3d_TOSM_UNLIT -V3d_FLAT Graphic3d_TOSM_FACET -V3d_GOURAUD Graphic3d_TOSM_VERTEX -V3d_PHONG Graphic3d_TOSM_FRAGMENT -V3d_TypeOfLight Graphic3d_TypeOfLightSource -V3d_AMBIENT Graphic3d_TOLS_AMBIENT -V3d_DIRECTIONAL Graphic3d_TOLS_DIRECTIONAL -V3d_POSITIONAL Graphic3d_TOLS_POSITIONAL -V3d_SPOT Graphic3d_TOLS_SPOT -BOPCol_BaseAllocator Handle(NCollection_BaseAllocator) -BOPCol_BoxBndTree is replaced with BOPTools_BoxBndTree -BOPCol_DataMapOfIntegerInteger TColStd_DataMapOfIntegerInteger -BOPCol_DataMapOfIntegerListOfInteger TColStd_DataMapOfIntegerListOfInteger -BOPCol_DataMapOfIntegerListOfShape TopTools_DataMapOfIntegerListOfShape -BOPCol_DataMapOfIntegerReal TColStd_DataMapOfIntegerReal -BOPCol_DataMapOfIntegerShape TopTools_DataMapOfIntegerShape -BOPCol_DataMapOfShapeBox TopTools_DataMapOfShapeBox -BOPCol_DataMapOfShapeInteger TopTools_DataMapOfShapeInteger -BOPCol_DataMapOfShapeListOfShape TopTools_DataMapOfShapeListOfShape -BOPCol_DataMapOfShapeReal TopTools_DataMapOfShapeReal -BOPCol_DataMapOfShapeShape TopTools_DataMapOfShapeShape -BOPCol_IndexedDataMapOfShapeListOfShape TopTools_IndexedDataMapOfShapeListOfShape -BOPCol_IndexedDataMapOfShapeShape TopTools_IndexedDataMapOfShapeShape -BOPCol_IndexedMapOfInteger TColStd_IndexedMapOfInteger -BOPCol_IndexedMapOfOrientedShape TopTools_IndexedMapOfOrientedShape -BOPCol_IndexedMapOfShape TopTools_IndexedMapOfShape -BOPCol_ListOfInteger TColStd_ListOfInteger -BOPCol_ListOfListOfShape TopTools_ListOfListOfShape -BOPCol_ListOfShape TopTools_ListOfShape -BOPCol_MapOfInteger TColStd_MapOfInteger -BOPCol_MapOfOrientedShapeTopTools_MapOfOrientedShape -BOPCol_MapOfShape TopTools_MapOfShape -BOPCol_SequenceOfPnt2d TColgp_SequenceOfPnt2d -BOPCol_SequenceOfReal TColStd_SequenceOfReal -BOPCol_SequenceOfShape TopTools_SequenceOfShape -BOPCol_Parallel BOPTools_Parallel -BOPCol_NCVector NCollection_Vector -BOPCol_DataMapOfShapeAddress DataMapOfShapeAddress -BOPCol_DataMapOfTransientAddress DataMapOfTransientAddress -BOPCol_DataMapIteratorOfDataMapOfIntegerReal TColStd_DataMapIteratorOfDataMapOfIntegerReal -BOPCol_DataMapIteratorOfDataMapOfShapeAddress DataMapOfShapeAddress::Iterator -BOPCol_DataMapIteratorOfDataMapOfTransientAddress DataMapOfTransientAddress::Iterator -BOPCol_ListIteratorOfListOfInteger TColStd_ListIteratorOfListOfInteger -BOPCol_ListIteratorOfListOfShape TopTools_ListIteratorOfListOfShape -BOPCol_MapIteratorOfMapOfInteger TColStd_MapIteratorOfMapOfInteger -BOPCol_BoxBndTreeSelector BOPTools_BoxBndTreeSelector -BOPCol_BoxBndTree BOPTools_BoxBndTree -BOPCol_PListOfInteger TColStd_ListOfInteger* -BOPCol_IndexedDataMapOfShapeReal TopTools_IndexedDataMapOfShapeReal -BOPCol_MapOfOrientedShape TopTools_MapOfOrientedShape -BOPCol_DataMapIteratorOfDataMapOfIntegerInteger TColStd_DataMapIteratorOfDataMapOfIntegerInteger -BOPCol_MapIteratorOfMapOfShape TopTools_MapIteratorOfMapOfShape -BOPCol_ContextFunctor BOPTools_ContextFunctor -BOPCol_ContextCnt BOPTools_ContextCnt -BOPCol_Functor BOPTools_Functor -BOPCol_Cnt BOPTools_Cnt -BOPCol_DataMapIteratorOfDataMapOfIntegerListOfShape TopTools_DataMapIteratorOfDataMapOfIntegerListOfShape -BOPCol_MapIteratorOfMapOfOrientedShape TopTools_MapIteratorOfMapOfOrientedShape -BOPCol_DataMapIteratorOfDataMapOfIntegerListOfInteger TColStd_DataMapIteratorOfDataMapOfIntegerListOfInteger -BOPCol_DataMapIteratorOfDataMapOfShapeShape TopTools_DataMapIteratorOfDataMapOfShapeShape -BOPTools::MapShapes TopExp::MapShapes -BOPTools::MapShapesAndAncestors TopExp::MapShapesAndAncestors -BOPCol_Box2DBndTreeSelector BOPTools_BoxSelector -BiTgte_DataMapOfShapeBox TopTools_DataMapOfShapeBox -CDM_MessageDriver Message_Messenger -Message_ProgressSentry Message_ProgressScope -Adaptor2d_HCurve2d Adaptor2d_Curve2d -Adaptor2d_HLine2d Adaptor2d_Line2d -Adaptor2d_HOffsetCurve Adaptor2d_OffsetCurve -Adaptor3d_HCurve Adaptor3d_Curve -Adaptor3d_HCurveOnSurface Adaptor3d_CurveOnSurface -Adaptor3d_HIsoCurve Adaptor3d_IsoCurve -Adaptor3d_HSurface Adaptor3d_Surface -BRepAdaptor_HCompCurve BRepAdaptor_CompCurve -BRepAdaptor_HCurve BRepAdaptor_Curve -BRepAdaptor_HCurve2d BRepAdaptor_Curve2d -BRepAdaptor_HSurface BRepAdaptor_Surface -BiTgte_HCurveOnEdge BiTgte_CurveOnEdge -BiTgte_HCurveOnVertex BiTgte_CurveOnVertex -ChFiDS_HElSpine ChFiDS_ElSpine -Geom2dAdaptor_GHCurve Geom2dAdaptor_Curve -Geom2dAdaptor_HCurve Geom2dAdaptor_Curve -GeomAdaptor_GHCurve GeomAdaptor_Curve -GeomAdaptor_GHSurface GeomAdaptor_Surface -GeomAdaptor_HCurve GeomAdaptor_Curve -GeomAdaptor_HSurface GeomAdaptor_Surface -GeomAdaptor_HSurfaceOfLinearExtrusion GeomAdaptor_SurfaceOfLinearExtrusion -GeomAdaptor_HSurfaceOfRevolution GeomAdaptor_SurfaceOfRevolution -PrsMgr_PresentationManager3d PrsMgr_PresentationManager - -[tcollection] -AdvApp2Var_SequenceOfNode -AdvApp2Var_SequenceOfPatch -AdvApp2Var_SequenceOfStrip -AdvApp2Var_Strip -AIS_DataMapOfILC -AIS_DataMapofIntegerListOfinteractive -AIS_DataMapOfIOStatus -AIS_DataMapOfSelStat -AIS_IndexedDataMapOfOwnerPrs -AIS_ListOfInteractive -AIS_MapOfInteractive -AIS_SequenceOfDimension -AIS_SequenceOfInteractive -AppDef_Array1OfMultiPointConstraint -AppDef_HArray1OfMultiPointConstraint -AppParCurves_Array1OfConstraintCouple -AppParCurves_Array1OfMultiBSpCurve -AppParCurves_Array1OfMultiCurve -AppParCurves_Array1OfMultiPoint -AppParCurves_HArray1OfConstraintCouple -AppParCurves_HArray1OfMultiBSpCurve -AppParCurves_HArray1OfMultiCurve -AppParCurves_HArray1OfMultiPoint -AppParCurves_SequenceOfMultiBSpCurve -AppParCurves_SequenceOfMultiCurve -Approx_Array1OfAdHSurface -Approx_Array1OfGTrsf2d -Approx_HArray1OfAdHSurface -Approx_HArray1OfGTrsf2d -Approx_SequenceOfHArray1OfReal -Aspect_SequenceOfColor -BinMDF_TypeADriverMap -BinMDF_TypeIdMap -BiTgte_DataMapOfShapeBox -Blend_SequenceOfPoint -Bnd_Array1OfBox -Bnd_Array1OfBox2d -Bnd_Array1OfSphere -Bnd_HArray1OfBox -Bnd_HArray1OfBox2d -Bnd_HArray1OfSphere -Bnd_SeqOfBox -BRep_ListOfCurveRepresentation -BRep_ListOfPointRepresentation -BRepAdaptor_Array1OfCurve -BRepAdaptor_HArray1OfCurve -BRepAlgo_DataMapOfShapeBoolean -BRepAlgo_DataMapOfShapeInterference -BRepAlgo_SequenceOfSequenceOfInteger -BRepBlend_SequenceOfLine -BRepBlend_SequenceOfPointOnRst -BRepCheck_DataMapOfShapeListOfStatus -BRepCheck_DataMapOfShapeResult -BRepCheck_ListOfStatus -BRepClass3d_MapOfInter -BRepFill_DataMapOfNodeDataMapOfShapeShape -BRepFill_DataMapOfNodeShape -BRepFill_DataMapOfOrientedShapeListOfShape -BRepFill_DataMapOfShapeDataMapOfShapeListOfShape -BRepFill_DataMapOfShapeHArray2OfShape -BRepFill_DataMapOfShapeSequenceOfPnt -BRepFill_DataMapOfShapeSequenceOfReal -BRepFill_IndexedDataMapOfOrientedShapeListOfShape -BRepFill_ListOfOffsetWire -BRepFill_SequenceOfEdgeFaceAndOrder -BRepFill_SequenceOfFaceAndOrder -BRepFill_SequenceOfSection -BRepMAT2d_DataMapOfBasicEltShape -BRepMAT2d_DataMapOfShapeSequenceOfBasicElt -BRepOffset_DataMapOfShapeListOfInterval -BRepOffset_DataMapOfShapeMapOfShape -BRepOffset_DataMapOfShapeOffset -BRepOffset_ListOfInterval -BRepOffsetAPI_SequenceOfSequenceOfReal -BRepOffsetAPI_SequenceOfSequenceOfShape -BRepTools_MapOfVertexPnt2d -BRepTopAdaptor_MapOfShapeTool -CDM_DocumentHasher -CDM_ListOfDocument -CDM_ListOfReferences -CDM_MapOfDocument -CDM_MetaDataLookUpTable -CDM_PresentationDirectory -ChFiDS_HData -ChFiDS_IndexedDataMapOfVertexListOfStripe -ChFiDS_ListOfHElSpine -ChFiDS_ListOfStripe -ChFiDS_Regularities -ChFiDS_SecArray1 -ChFiDS_SecHArray1 -ChFiDS_SequenceOfSpine -ChFiDS_SequenceOfSurfData -ChFiDS_StripeArray1 -ChFiKPart_RstMap -Contap_TheHSequenceOfPoint -Contap_TheSequenceOfLine -Contap_TheSequenceOfPoint -Convert_SequenceOfArray1OfPoles -DBRep_ListOfEdge -DBRep_ListOfFace -DBRep_ListOfHideData -DDF_TransactionStack -DNaming_DataMapOfShapeOfName -Draft_DataMapOfEdgeEdgeInfo -Draft_DataMapOfFaceFaceInfo -Draft_DataMapOfVertexVertexInfo -Draw_MapOfAsciiString -Draw_SequenceOfDrawable3D -Expr_Array1OfGeneralExpression -Expr_Array1OfNamedUnknown -Expr_Array1OfSingleRelation -Expr_MapOfNamedUnknown -Expr_SequenceOfGeneralExpression -Expr_SequenceOfGeneralRelation -ExprIntrp_SequenceOfNamedExpression -ExprIntrp_SequenceOfNamedFunction -ExprIntrp_StackOfGeneralExpression -ExprIntrp_StackOfGeneralFunction -ExprIntrp_StackOfGeneralRelation -Extrema_Array1OfPOnCurv -Extrema_Array1OfPOnCurv2d -Extrema_Array1OfPOnSurf -Extrema_Array2OfPOnCurv -Extrema_Array2OfPOnCurv2d -Extrema_Array2OfPOnSurf -Extrema_Array2OfPOnSurfParams -Extrema_HArray1OfPOnCurv -Extrema_HArray1OfPOnCurv2d -Extrema_HArray1OfPOnSurf -Extrema_HArray2OfPOnCurv -Extrema_HArray2OfPOnCurv2d -Extrema_HArray2OfPOnSurf -Extrema_HArray2OfPOnSurfParams -Extrema_SequenceOfPOnCurv -Extrema_SequenceOfPOnCurv2d -Extrema_SequenceOfPOnSurf -FEmTool_AssemblyTable -FEmTool_HAssemblyTable -FEmTool_ListOfVectors -FEmTool_SeqOfLinConstr -GccEnt_Array1OfPosition -Geom2dHatch_Hatchings -Geom2dHatch_MapOfElements -Geom_HSequenceOfBSplineSurface -Geom_SequenceOfBSplineSurface -GeomFill_Array1OfLocationLaw -GeomFill_Array1OfSectionLaw -GeomFill_HArray1OfLocationLaw -GeomFill_HArray1OfSectionLaw -GeomFill_HSequenceOfAx2 -GeomFill_SequenceOfAx2 -GeomFill_SequenceOfTrsf -GeomInt_SequenceOfParameterAndOrientation -GeomLib_Array1OfMat -GeomPlate_Array1OfHCurveOnSurface -GeomPlate_Array1OfSequenceOfReal -GeomPlate_HArray1OfHCurveOnSurface -GeomPlate_HArray1OfSequenceOfReal -GeomPlate_HSequenceOfCurveConstraint -GeomPlate_HSequenceOfPointConstraint -GeomPlate_SequenceOfAij -GeomPlate_SequenceOfCurveConstraint -GeomPlate_SequenceOfPointConstraint -Graphic3d_Array1OfVector -Graphic3d_Array1OfVertex -Graphic3d_Array2OfVertex -Graphic3d_HSequenceOfStructure -Graphic3d_ListOfShortReal -Graphic3d_SequenceOfStructure -Hatch_SequenceOfLine -Hatch_SequenceOfParameter -HatchGen_Domains -HatchGen_PointsOnElement -HatchGen_PointsOnHatching -HLRAlgo_Array1OfPHDat -HLRAlgo_Array1OfPINod -HLRAlgo_Array1OfPISeg -HLRAlgo_Array1OfTData -HLRAlgo_HArray1OfPHDat -HLRAlgo_HArray1OfPINod -HLRAlgo_HArray1OfPISeg -HLRAlgo_HArray1OfTData -HLRAlgo_InterferenceList -HLRAlgo_ListOfBPoint -HLRBRep_Array1OfEData -HLRBRep_Array1OfFData -HLRBRep_ListOfBPnt2D -HLRBRep_ListOfBPoint -HLRBRep_SeqOfShapeBounds -HLRTopoBRep_DataMapOfShapeFaceData -HLRTopoBRep_ListOfVData -HLRTopoBRep_MapOfShapeListOfVData -IFSelect_HSeqOfSelection -IFSelect_SequenceOfAppliedModifiers -IFSelect_SequenceOfGeneralModifier -IFSelect_SequenceOfInterfaceModel -IFSelect_TSeqOfDispatch -IFSelect_TSeqOfSelection -IGESAppli_Array1OfFiniteElement -IGESAppli_Array1OfFlow -IGESAppli_Array1OfNode -IGESAppli_HArray1OfFiniteElement -IGESAppli_HArray1OfFlow -IGESAppli_HArray1OfNode -IGESBasic_Array1OfLineFontEntity -IGESBasic_Array2OfHArray1OfReal -IGESBasic_HArray1OfLineFontEntity -IGESBasic_HArray2OfHArray1OfReal -IGESData_Array1OfDirPart -IGESData_Array1OfIGESEntity -IGESData_HArray1OfIGESEntity -IGESDefs_Array1OfTabularData -IGESDefs_HArray1OfTabularData -IGESDimen_Array1OfGeneralNote -IGESDimen_Array1OfLeaderArrow -IGESDimen_HArray1OfGeneralNote -IGESDimen_HArray1OfLeaderArrow -IGESDraw_Array1OfConnectPoint -IGESDraw_Array1OfViewKindEntity -IGESDraw_HArray1OfConnectPoint -IGESDraw_HArray1OfViewKindEntity -IGESGeom_Array1OfBoundary -IGESGeom_Array1OfCurveOnSurface -IGESGeom_Array1OfTransformationMatrix -IGESGeom_HArray1OfBoundary -IGESGeom_HArray1OfCurveOnSurface -IGESGeom_HArray1OfTransformationMatrix -IGESGraph_Array1OfColor -IGESGraph_Array1OfTextDisplayTemplate -IGESGraph_Array1OfTextFontDef -IGESGraph_HArray1OfColor -IGESGraph_HArray1OfTextDisplayTemplate -IGESGraph_HArray1OfTextFontDef -IGESSolid_Array1OfFace -IGESSolid_Array1OfLoop -IGESSolid_Array1OfShell -IGESSolid_Array1OfVertexList -IGESSolid_HArray1OfFace -IGESSolid_HArray1OfLoop -IGESSolid_HArray1OfShell -IGESSolid_HArray1OfVertexList -IntAna_ListOfCurve -IntCurveSurface_SequenceOfPnt -IntCurveSurface_SequenceOfSeg -Interface_Array1OfFileParameter -Interface_Array1OfHAsciiString -Interface_DataMapOfTransientInteger -Interface_HArray1OfHAsciiString -Interface_HSequenceOfCheck -Interface_IndexedMapOfAsciiString -Interface_SequenceOfCheck -Intf_Array1OfLin -Intf_SeqOfSectionLine -Intf_SeqOfSectionPoint -Intf_SeqOfTangentZone -IntPatch_SequenceOfLine -IntPatch_SequenceOfPoint -IntPolyh_SeqOfStartPoints -IntRes2d_SequenceOfIntersectionPoint -IntRes2d_SequenceOfIntersectionSegment -Intrv_SequenceOfInterval -IntSurf_ListOfPntOn2S -IntSurf_SequenceOfCouple -IntSurf_SequenceOfInteriorPoint -IntSurf_SequenceOfPathPoint -IntTools_Array1OfRange -IntTools_Array1OfRoots -IntTools_DataMapOfCurveSampleBox -IntTools_DataMapOfSurfaceSampleBox -IntTools_IndexedDataMapOfTransientAddress -IntTools_ListOfBox -IntTools_ListOfCurveRangeSample -IntTools_ListOfSurfaceRangeSample -IntTools_MapOfCurveSample -IntTools_MapOfSurfaceSample -IntTools_SequenceOfCommonPrts -IntTools_SequenceOfCurves -IntTools_SequenceOfPntOn2Faces -IntTools_SequenceOfRanges -IntTools_SequenceOfRoots -Law_Laws -LocOpe_DataMapOfShapePnt -LocOpe_SequenceOfCirc -LocOpe_SequenceOfLin -LocOpe_SequenceOfPntFace -LProp_SequenceOfCIType -MAT2d_Array2OfConnexion -MAT2d_DataMapOfBiIntInteger -MAT2d_DataMapOfBiIntSequenceOfInteger -MAT2d_DataMapOfIntegerBisec -MAT2d_DataMapOfIntegerConnexion -MAT2d_DataMapOfIntegerPnt2d -MAT2d_DataMapOfIntegerSequenceOfConnexion -MAT2d_DataMapOfIntegerVec2d -MAT2d_SequenceOfConnexion -MAT2d_SequenceOfSequenceOfCurve -MAT2d_SequenceOfSequenceOfGeometry -MAT_DataMapOfIntegerArc -MAT_DataMapOfIntegerBasicElt -MAT_DataMapOfIntegerBisector -MAT_DataMapOfIntegerNode -MAT_SequenceOfArc -MAT_SequenceOfBasicElt -math_Array1OfValueAndWeight -MDF_ARDriverHSequence -MDF_ARDriverSequence -MDF_ASDriverHSequence -MDF_ASDriverSequence -MDF_TypeARDriverMap -MDF_TypeASDriverMap -MeshVS_Array1OfSequenceOfInteger -MeshVS_DataMapOfColorMapOfInteger -MeshVS_DataMapOfHArray1OfSequenceOfInteger -MeshVS_DataMapOfIntegerAsciiString -MeshVS_DataMapOfIntegerBoolean -MeshVS_DataMapOfIntegerColor -MeshVS_DataMapOfIntegerMaterial -MeshVS_DataMapOfIntegerMeshEntityOwner -MeshVS_DataMapOfIntegerOwner -MeshVS_DataMapOfIntegerTwoColors -MeshVS_DataMapOfIntegerVector -MeshVS_DataMapOfTwoColorsMapOfInteger -MeshVS_HArray1OfSequenceOfInteger -MeshVS_MapOfTwoNodes -MeshVS_SequenceOfPrsBuilder -MeshVS_TwoColorsHasher -MeshVS_TwoNodesHasher -Message_ListOfMsg -Message_SequenceOfPrinters -Message_SequenceOfProgressScale -MoniTool_DataMapOfShapeTransient -MoniTool_DataMapOfTimer -MoniTool_HSequenceOfElement -MoniTool_IndexedDataMapOfShapeTransient -MoniTool_SequenceOfElement -NLPlate_SequenceOfHGPPConstraint -NLPlate_StackOfPlate -PCDM_SequenceOfDocument -PCDM_SequenceOfReference -Plate_Array1OfPinpointConstraint -Plate_HArray1OfPinpointConstraint -Plate_SequenceOfLinearScalarConstraint -Plate_SequenceOfLinearXYZConstraint -Plate_SequenceOfPinpointConstraint -Plugin_MapOfFunctions -Poly_Array1OfTriangle -Poly_HArray1OfTriangle -ProjLib_HSequenceOfHSequenceOfPnt -ProjLib_SequenceOfHSequenceOfPnt -PrsMgr_Presentations -PTColStd_DoubleMapOfTransientPersistent -PTColStd_MapPersistentHasher -PTColStd_PersistentTransientMap -PTColStd_TransientPersistentMap -QANCollection_DataMapOfRealPnt -QANCollection_DoubleMapOfRealInteger -QANCollection_IndexedDataMapOfRealPnt -QANCollection_ListOfPnt -Quantity_Array1OfCoefficient -Quantity_Array1OfColor -Quantity_Array2OfColor -Quantity_HArray1OfColor -Resource_DataMapOfAsciiStringAsciiString -Resource_DataMapOfAsciiStringExtendedString -SelectMgr_DataMapOfObjectSelectors -SelectMgr_IndexedDataMapOfOwnerCriterion -SelectMgr_IndexedMapOfOwner -SelectMgr_ListOfFilter -SelectMgr_SequenceOfFilter -SelectMgr_SequenceOfOwner -SelectMgr_SequenceOfSelector -ShapeAnalysis_DataMapOfShapeListOfReal -ShapeAnalysis_HSequenceOfFreeBounds -ShapeAnalysis_SequenceOfFreeBounds -ShapeExtend_DataMapOfShapeListOfMsg -ShapeExtend_DataMapOfTransientListOfMsg -ShapeFix_DataMapOfShapeBox2d -ShapeFix_SequenceOfWireSegment -StdSelect_IndexedDataMapOfOwnerPrs -StepAP203_Array1OfApprovedItem -StepAP203_Array1OfCertifiedItem -StepAP203_Array1OfChangeRequestItem -StepAP203_Array1OfClassifiedItem -StepAP203_Array1OfContractedItem -StepAP203_Array1OfDateTimeItem -StepAP203_Array1OfPersonOrganizationItem -StepAP203_Array1OfSpecifiedItem -StepAP203_Array1OfStartRequestItem -StepAP203_Array1OfWorkItem -StepAP203_HArray1OfApprovedItem -StepAP203_HArray1OfCertifiedItem -StepAP203_HArray1OfChangeRequestItem -StepAP203_HArray1OfClassifiedItem -StepAP203_HArray1OfContractedItem -StepAP203_HArray1OfDateTimeItem -StepAP203_HArray1OfPersonOrganizationItem -StepAP203_HArray1OfSpecifiedItem -StepAP203_HArray1OfStartRequestItem -StepAP203_HArray1OfWorkItem -StepAP214_Array1OfApprovalItem -StepAP214_Array1OfAutoDesignDateAndPersonItem -StepAP214_Array1OfAutoDesignDateAndTimeItem -StepAP214_Array1OfAutoDesignDatedItem -StepAP214_Array1OfAutoDesignGeneralOrgItem -StepAP214_Array1OfAutoDesignGroupedItem -StepAP214_Array1OfAutoDesignPresentedItemSelect -StepAP214_Array1OfAutoDesignReferencingItem -StepAP214_Array1OfDateAndTimeItem -StepAP214_Array1OfDateItem -StepAP214_Array1OfDocumentReferenceItem -StepAP214_Array1OfExternalIdentificationItem -StepAP214_Array1OfGroupItem -StepAP214_Array1OfOrganizationItem -StepAP214_Array1OfPersonAndOrganizationItem -StepAP214_Array1OfPresentedItemSelect -StepAP214_Array1OfSecurityClassificationItem -StepAP214_HArray1OfApprovalItem -StepAP214_HArray1OfAutoDesignDateAndPersonItem -StepAP214_HArray1OfAutoDesignDateAndTimeItem -StepAP214_HArray1OfAutoDesignDatedItem -StepAP214_HArray1OfAutoDesignGeneralOrgItem -StepAP214_HArray1OfAutoDesignGroupedItem -StepAP214_HArray1OfAutoDesignPresentedItemSelect -StepAP214_HArray1OfAutoDesignReferencingItem -StepAP214_HArray1OfDateAndTimeItem -StepAP214_HArray1OfDateItem -StepAP214_HArray1OfDocumentReferenceItem -StepAP214_HArray1OfExternalIdentificationItem -StepAP214_HArray1OfGroupItem -StepAP214_HArray1OfOrganizationItem -StepAP214_HArray1OfPersonAndOrganizationItem -StepAP214_HArray1OfPresentedItemSelect -StepAP214_HArray1OfSecurityClassificationItem -StepBasic_Array1OfApproval -StepBasic_Array1OfDerivedUnitElement -StepBasic_Array1OfDocument -StepBasic_Array1OfNamedUnit -StepBasic_Array1OfOrganization -StepBasic_Array1OfPerson -StepBasic_Array1OfProduct -StepBasic_Array1OfProductContext -StepBasic_Array1OfProductDefinition -StepBasic_Array1OfUncertaintyMeasureWithUnit -StepBasic_HArray1OfApproval -StepBasic_HArray1OfDerivedUnitElement -StepBasic_HArray1OfDocument -StepBasic_HArray1OfNamedUnit -StepBasic_HArray1OfOrganization -StepBasic_HArray1OfPerson -StepBasic_HArray1OfProduct -StepBasic_HArray1OfProductContext -StepBasic_HArray1OfProductDefinition -StepBasic_HArray1OfUncertaintyMeasureWithUnit -STEPCAFControl_DataMapOfLabelExternFile -STEPCAFControl_DataMapOfLabelShape -STEPCAFControl_DataMapOfPDExternFile -STEPCAFControl_DataMapOfSDRExternFile -STEPCAFControl_DataMapOfShapePD -STEPCAFControl_DataMapOfShapeSDR -STEPConstruct_DataMapOfAsciiStringTransient -STEPConstruct_DataMapOfPointTransient -StepData_Array1OfField -StepData_HArray1OfField -StepDimTol_Array1OfDatumReference -StepDimTol_HArray1OfDatumReference -StepElement_Array1OfCurveElementEndReleasePacket -StepElement_Array1OfCurveElementSectionDefinition -StepElement_Array1OfHSequenceOfCurveElementPurposeMember -StepElement_Array1OfHSequenceOfSurfaceElementPurposeMember -StepElement_Array1OfMeasureOrUnspecifiedValue -StepElement_Array1OfSurfaceSection -StepElement_Array1OfVolumeElementPurpose -StepElement_Array1OfVolumeElementPurposeMember -StepElement_Array2OfCurveElementPurposeMember -StepElement_Array2OfSurfaceElementPurpose -StepElement_Array2OfSurfaceElementPurposeMember -StepElement_HArray1OfCurveElementEndReleasePacket -StepElement_HArray1OfCurveElementSectionDefinition -StepElement_HArray1OfHSequenceOfCurveElementPurposeMember -StepElement_HArray1OfHSequenceOfSurfaceElementPurposeMember -StepElement_HArray1OfMeasureOrUnspecifiedValue -StepElement_HArray1OfSurfaceSection -StepElement_HArray1OfVolumeElementPurpose -StepElement_HArray1OfVolumeElementPurposeMember -StepElement_HArray2OfCurveElementPurposeMember -StepElement_HArray2OfSurfaceElementPurpose -StepElement_HArray2OfSurfaceElementPurposeMember -StepElement_HSequenceOfCurveElementPurposeMember -StepElement_HSequenceOfCurveElementSectionDefinition -StepElement_HSequenceOfElementMaterial -StepElement_HSequenceOfSurfaceElementPurposeMember -StepElement_SequenceOfCurveElementPurposeMember -StepElement_SequenceOfCurveElementSectionDefinition -StepElement_SequenceOfElementMaterial -StepElement_SequenceOfSurfaceElementPurposeMember -StepFEA_Array1OfCurveElementEndOffset -StepFEA_Array1OfCurveElementEndRelease -StepFEA_Array1OfCurveElementInterval -StepFEA_Array1OfDegreeOfFreedom -StepFEA_Array1OfElementRepresentation -StepFEA_Array1OfNodeRepresentation -StepFEA_HArray1OfCurveElementEndOffset -StepFEA_HArray1OfCurveElementEndRelease -StepFEA_HArray1OfCurveElementInterval -StepFEA_HArray1OfDegreeOfFreedom -StepFEA_HArray1OfElementRepresentation -StepFEA_HArray1OfNodeRepresentation -StepFEA_HSequenceOfCurve3dElementProperty -StepFEA_HSequenceOfElementGeometricRelationship -StepFEA_HSequenceOfElementRepresentation -StepFEA_HSequenceOfNodeRepresentation -StepFEA_SequenceOfCurve3dElementProperty -StepFEA_SequenceOfElementGeometricRelationship -StepFEA_SequenceOfElementRepresentation -StepFEA_SequenceOfNodeRepresentation -StepGeom_Array1OfBoundaryCurve -StepGeom_Array1OfCartesianPoint -StepGeom_Array1OfCompositeCurveSegment -StepGeom_Array1OfCurve -StepGeom_Array1OfPcurveOrSurface -StepGeom_Array1OfSurfaceBoundary -StepGeom_Array1OfTrimmingSelect -StepGeom_Array2OfCartesianPoint -StepGeom_Array2OfSurfacePatch -StepGeom_HArray1OfBoundaryCurve -StepGeom_HArray1OfCartesianPoint -StepGeom_HArray1OfCompositeCurveSegment -StepGeom_HArray1OfCurve -StepGeom_HArray1OfPcurveOrSurface -StepGeom_HArray1OfSurfaceBoundary -StepGeom_HArray1OfTrimmingSelect -StepGeom_HArray2OfCartesianPoint -StepGeom_HArray2OfSurfacePatch -StepRepr_Array1OfMaterialPropertyRepresentation -StepRepr_Array1OfPropertyDefinitionRepresentation -StepRepr_Array1OfRepresentationItem -StepRepr_HArray1OfMaterialPropertyRepresentation -StepRepr_HArray1OfPropertyDefinitionRepresentation -StepRepr_HArray1OfRepresentationItem -StepRepr_HSequenceOfMaterialPropertyRepresentation -StepRepr_HSequenceOfRepresentationItem -StepRepr_SequenceOfMaterialPropertyRepresentation -StepRepr_SequenceOfRepresentationItem -STEPSelections_HSequenceOfAssemblyLink -STEPSelections_SequenceOfAssemblyComponent -STEPSelections_SequenceOfAssemblyLink -StepShape_Array1OfConnectedEdgeSet -StepShape_Array1OfConnectedFaceSet -StepShape_Array1OfEdge -StepShape_Array1OfFace -StepShape_Array1OfFaceBound -StepShape_Array1OfGeometricSetSelect -StepShape_Array1OfOrientedClosedShell -StepShape_Array1OfOrientedEdge -StepShape_Array1OfShell -StepShape_Array1OfValueQualifier -StepShape_HArray1OfConnectedEdgeSet -StepShape_HArray1OfConnectedFaceSet -StepShape_HArray1OfEdge -StepShape_HArray1OfFace -StepShape_HArray1OfFaceBound -StepShape_HArray1OfGeometricSetSelect -StepShape_HArray1OfOrientedClosedShell -StepShape_HArray1OfOrientedEdge -StepShape_HArray1OfShell -StepShape_HArray1OfValueQualifier -StepToTopoDS_DataMapOfRI -StepToTopoDS_DataMapOfRINames -StepToTopoDS_DataMapOfTRI -StepToTopoDS_PointEdgeMap -StepToTopoDS_PointVertexMap -StepVisual_Array1OfBoxCharacteristicSelect -StepVisual_Array1OfCurveStyleFontPattern -StepVisual_Array1OfDirectionCountSelect -StepVisual_Array1OfFillStyleSelect -StepVisual_Array1OfInvisibleItem -StepVisual_Array1OfLayeredItem -StepVisual_Array1OfPresentationStyleAssignment -StepVisual_Array1OfPresentationStyleSelect -StepVisual_Array1OfStyleContextSelect -StepVisual_Array1OfSurfaceStyleElementSelect -StepVisual_Array1OfTextOrCharacter -StepVisual_HArray1OfBoxCharacteristicSelect -StepVisual_HArray1OfCurveStyleFontPattern -StepVisual_HArray1OfDirectionCountSelect -StepVisual_HArray1OfFillStyleSelect -StepVisual_HArray1OfInvisibleItem -StepVisual_HArray1OfLayeredItem -StepVisual_HArray1OfPresentationStyleAssignment -StepVisual_HArray1OfPresentationStyleSelect -StepVisual_HArray1OfStyleContextSelect -StepVisual_HArray1OfSurfaceStyleElementSelect -StepVisual_HArray1OfTextOrCharacter -StlMesh_SequenceOfMesh -StlMesh_SequenceOfMeshDomain -StlMesh_SequenceOfMeshTriangle -Storage_ArrayOfCallBack -Storage_ArrayOfSchema -Storage_HArrayOfCallBack -Storage_HArrayOfSchema -Storage_HPArray -Storage_HSeqOfRoot -Storage_MapOfCallBack -Storage_MapOfPers -Storage_PArray -Storage_PType -Storage_SeqOfRoot -TColGeom2d_Array1OfBezierCurve -TColGeom2d_Array1OfBSplineCurve -TColGeom2d_Array1OfCurve -TColGeom2d_HArray1OfBezierCurve -TColGeom2d_HArray1OfBSplineCurve -TColGeom2d_HArray1OfCurve -TColGeom2d_HSequenceOfBoundedCurve -TColGeom2d_HSequenceOfCurve -TColGeom2d_SequenceOfBoundedCurve -TColGeom2d_SequenceOfCurve -TColGeom2d_SequenceOfGeometry -TColGeom_Array1OfBezierCurve -TColGeom_Array1OfBSplineCurve -TColGeom_Array1OfCurve -TColGeom_Array1OfSurface -TColGeom_Array2OfBezierSurface -TColGeom_Array2OfSurface -TColGeom_HArray1OfBezierCurve -TColGeom_HArray1OfBSplineCurve -TColGeom_HArray1OfCurve -TColGeom_HArray1OfSurface -TColGeom_HArray2OfSurface -TColGeom_HSequenceOfBoundedCurve -TColGeom_HSequenceOfCurve -TColGeom_SequenceOfBoundedCurve -TColGeom_SequenceOfCurve -TColGeom_SequenceOfSurface -TColgp_Array1OfCirc2d -TColgp_Array1OfDir -TColgp_Array1OfDir2d -TColgp_Array1OfLin2d -TColgp_Array1OfPnt -TColgp_Array1OfPnt2d -TColgp_Array1OfVec -TColgp_Array1OfVec2d -TColgp_Array1OfXY -TColgp_Array1OfXYZ -TColgp_Array2OfCirc2d -TColgp_Array2OfDir -TColgp_Array2OfDir2d -TColgp_Array2OfLin2d -TColgp_Array2OfPnt -TColgp_Array2OfPnt2d -TColgp_Array2OfVec -TColgp_Array2OfVec2d -TColgp_Array2OfXY -TColgp_Array2OfXYZ -TColgp_HArray1OfCirc2d -TColgp_HArray1OfDir -TColgp_HArray1OfDir2d -TColgp_HArray1OfLin2d -TColgp_HArray1OfPnt -TColgp_HArray1OfPnt2d -TColgp_HArray1OfVec -TColgp_HArray1OfVec2d -TColgp_HArray1OfXY -TColgp_HArray1OfXYZ -TColgp_HArray2OfCirc2d -TColgp_HArray2OfDir -TColgp_HArray2OfDir2d -TColgp_HArray2OfLin2d -TColgp_HArray2OfPnt -TColgp_HArray2OfPnt2d -TColgp_HArray2OfVec -TColgp_HArray2OfVec2d -TColgp_HArray2OfXY -TColgp_HArray2OfXYZ -TColgp_HSequenceOfDir -TColgp_HSequenceOfDir2d -TColgp_HSequenceOfPnt -TColgp_HSequenceOfPnt2d -TColgp_HSequenceOfVec -TColgp_HSequenceOfVec2d -TColgp_HSequenceOfXY -TColgp_HSequenceOfXYZ -TColgp_SequenceOfArray1OfPnt2d -TColgp_SequenceOfAx1 -TColgp_SequenceOfDir -TColgp_SequenceOfDir2d -TColgp_SequenceOfPnt -TColgp_SequenceOfPnt2d -TColgp_SequenceOfVec -TColgp_SequenceOfVec2d -TColgp_SequenceOfXY -TColgp_SequenceOfXYZ -TColQuantity_Array1OfLength -TColQuantity_Array2OfLength -TColQuantity_HArray1OfLength -TColQuantity_HArray2OfLength -TColStd_Array1OfAsciiString -TColStd_Array1OfBoolean -TColStd_Array1OfByte -TColStd_Array1OfCharacter -TColStd_Array1OfExtendedString -TColStd_Array1OfInteger -TColStd_Array1OfListOfInteger -TColStd_Array1OfReal -TColStd_Array1OfTransient -TColStd_Array2OfBoolean -TColStd_Array2OfCharacter -TColStd_Array2OfInteger -TColStd_Array2OfReal -TColStd_Array2OfTransient -TColStd_DataMapOfAsciiStringInteger -TColStd_DataMapOfIntegerInteger -TColStd_DataMapOfIntegerListOfInteger -TColStd_DataMapOfIntegerReal -TColStd_DataMapOfIntegerTransient -TColStd_DataMapOfStringInteger -TColStd_DataMapOfTransientTransient -TColStd_HArray1OfAsciiString -TColStd_HArray1OfBoolean -TColStd_HArray1OfByte -TColStd_HArray1OfCharacter -TColStd_HArray1OfExtendedString -TColStd_HArray1OfInteger -TColStd_HArray1OfListOfInteger -TColStd_HArray1OfReal -TColStd_HArray1OfTransient -TColStd_HArray2OfBoolean -TColStd_HArray2OfCharacter -TColStd_HArray2OfInteger -TColStd_HArray2OfReal -TColStd_HArray2OfTransient -TColStd_HSequenceOfAsciiString -TColStd_HSequenceOfExtendedString -TColStd_HSequenceOfHAsciiString -TColStd_HSequenceOfHExtendedString -TColStd_HSequenceOfInteger -TColStd_HSequenceOfReal -TColStd_HSequenceOfTransient -TColStd_IndexedDataMapOfTransientTransient -TColStd_IndexedMapOfInteger -TColStd_IndexedMapOfReal -TColStd_IndexedMapOfTransient -TColStd_ListOfAsciiString -TColStd_ListOfInteger -TColStd_ListOfReal -TColStd_ListOfTransient -TColStd_MapIntegerHasher -TColStd_MapOfAsciiString -TColStd_MapOfInteger -TColStd_MapOfReal -TColStd_MapOfTransient -TColStd_MapRealHasher -TColStd_MapTransientHasher -TColStd_SequenceOfAddress -TColStd_SequenceOfAsciiString -TColStd_SequenceOfBoolean -TColStd_SequenceOfExtendedString -TColStd_SequenceOfHAsciiString -TColStd_SequenceOfHExtendedString -TColStd_SequenceOfInteger -TColStd_SequenceOfReal -TColStd_SequenceOfTransient -TDataStd_DataMapOfStringByte -TDataStd_DataMapOfStringHArray1OfInteger -TDataStd_DataMapOfStringHArray1OfReal -TDataStd_DataMapOfStringReal -TDataStd_DataMapOfStringString -TDataStd_HLabelArray1 -TDataStd_LabelArray1 -TDataStd_ListOfByte -TDataStd_ListOfExtendedString -TDataXtd_Array1OfTrsf -TDataXtd_HArray1OfTrsf -TDF_AttributeArray1 -TDF_AttributeDataMap -TDF_AttributeDeltaList -TDF_AttributeDoubleMap -TDF_AttributeIndexedMap -TDF_AttributeList -TDF_AttributeMap -TDF_AttributeSequence -TDF_DeltaList -TDF_GUIDProgIDMap -TDF_HAttributeArray1 -TDF_IDList -TDF_IDMap -TDF_LabelDataMap -TDF_LabelDoubleMap -TDF_LabelIndexedMap -TDF_LabelIntegerMap -TDF_LabelList -TDF_LabelMap -TDF_LabelSequence -TDocStd_LabelIDMapDataMap -TDocStd_SequenceOfApplicationDelta -TDocStd_SequenceOfDocument -TFunction_Array1OfDataMapOfGUIDDriver -TFunction_DataMapOfGUIDDriver -TFunction_DataMapOfLabelListOfLabel -TFunction_DoubleMapOfIntegerLabel -TFunction_HArray1OfDataMapOfGUIDDriver -TNaming_DataMapOfShapePtrRefShape -TNaming_DataMapOfShapeShapesSet -TNaming_ListOfIndexedDataMapOfShapeListOfShape -TNaming_ListOfMapOfShape -TNaming_ListOfNamedShape -TNaming_MapOfNamedShape -TNaming_NamedShapeHasher -TopBas_ListOfTestInterference -TopLoc_IndexedMapOfLocation -TopLoc_MapLocationHasher -TopLoc_MapOfLocation -TopoDS_ListOfShape -TopOpeBRep_Array1OfLineInter -TopOpeBRep_Array1OfVPointInter -TopOpeBRep_DataMapOfTopolTool -TopOpeBRep_HArray1OfLineInter -TopOpeBRep_HArray1OfVPointInter -TopOpeBRep_ListOfBipoint -TopOpeBRep_SequenceOfPoint2d -TopOpeBRepBuild_DataMapOfShapeListOfShapeListOfShape -TopOpeBRepBuild_IndexedDataMapOfShapeVertexInfo -TopOpeBRepBuild_ListOfListOfLoop -TopOpeBRepBuild_ListOfLoop -TopOpeBRepBuild_ListOfPave -TopOpeBRepBuild_ListOfShapeListOfShape -TopOpeBRepDS_Array1OfDataMapOfIntegerListOfInterference -TopOpeBRepDS_DataMapOfCheckStatus -TopOpeBRepDS_DataMapOfIntegerListOfInterference -TopOpeBRepDS_DataMapOfInterferenceListOfInterference -TopOpeBRepDS_DataMapOfInterferenceShape -TopOpeBRepDS_DataMapOfShapeListOfShapeOn1State -TopOpeBRepDS_DataMapOfShapeState -TopOpeBRepDS_DoubleMapOfIntegerShape -TopOpeBRepDS_HArray1OfDataMapOfIntegerListOfInterference -TopOpeBRepDS_IndexedDataMapOfShapeWithState -TopOpeBRepDS_IndexedDataMapOfVertexPoint -TopOpeBRepDS_ListOfInterference -TopOpeBRepDS_MapOfCurve -TopOpeBRepDS_MapOfIntegerShapeData -TopOpeBRepDS_MapOfPoint -TopOpeBRepDS_MapOfShapeData -TopOpeBRepDS_MapOfSurface -TopOpeBRepDS_ShapeSurface -TopOpeBRepTool_DataMapOfOrientedShapeC2DF -TopOpeBRepTool_DataMapOfShapeface -TopOpeBRepTool_DataMapOfShapeListOfC2DF -TopOpeBRepTool_IndexedDataMapOfShapeBox -TopOpeBRepTool_IndexedDataMapOfShapeBox2d -TopOpeBRepTool_IndexedDataMapOfShapeconnexity -TopOpeBRepTool_IndexedDataMapOfSolidClassifier -TopOpeBRepTool_ListOfC2DF -TopTools_Array1OfListOfShape -TopTools_Array1OfShape -TopTools_Array2OfShape -TopTools_DataMapOfIntegerListOfShape -TopTools_DataMapOfIntegerShape -TopTools_DataMapOfOrientedShapeInteger -TopTools_DataMapOfOrientedShapeShape -TopTools_DataMapOfShapeInteger -TopTools_DataMapOfShapeListOfInteger -TopTools_DataMapOfShapeListOfShape -TopTools_DataMapOfShapeReal -TopTools_DataMapOfShapeSequenceOfShape -TopTools_DataMapOfShapeShape -TopTools_HArray1OfListOfShape -TopTools_HArray1OfShape -TopTools_HArray2OfShape -TopTools_HSequenceOfShape -TopTools_IndexedDataMapOfShapeAddress -TopTools_IndexedDataMapOfShapeListOfShape -TopTools_IndexedDataMapOfShapeShape -TopTools_IndexedMapOfOrientedShape -TopTools_IndexedMapOfShape -TopTools_ListOfShape -TopTools_MapOfOrientedShape -TopTools_MapOfShape -TopTools_SequenceOfShape -TopTrans_Array2OfOrientation -TPrsStd_DataMapOfGUIDDriver -Transfer_HSequenceOfBinder -Transfer_HSequenceOfFinder -Transfer_SequenceOfBinder -Transfer_SequenceOfFinder -TransferBRep_HSequenceOfTransferResultInfo -TransferBRep_SequenceOfTransferResultInfo -TShort_Array1OfShortReal -TShort_Array2OfShortReal -TShort_HArray1OfShortReal -TShort_HArray2OfShortReal -TShort_HSequenceOfShortReal -TShort_SequenceOfShortReal -Units_QtsSequence -Units_QuantitiesSequence -Units_TksSequence -Units_TokensSequence -Units_UnitsSequence -Units_UtsSequence -ViewerTest_DoubleMapOfInteractiveAndName -Visual3d_HSequenceOfLight -Visual3d_HSequenceOfView -Visual3d_SequenceOfLight -Visual3d_SequenceOfView -XCAFDoc_DataMapOfShapeLabel -XCAFDoc_GraphNodeSequence -XCAFPrs_DataMapOfShapeStyle -XCAFPrs_DataMapOfStyleShape -XCAFPrs_DataMapOfStyleTransient -XmlLDrivers_SequenceOfNamespaceDef -XmlMDF_MapOfDriver -XmlMDF_TypeADriverMap -XSDRAWSTLVRML_CoordsMap -XSDRAWSTLVRML_ElemNodesMap diff --git a/adm/upgrade.tcl b/adm/upgrade.tcl deleted file mode 100644 index a7b5ec2a22..0000000000 --- a/adm/upgrade.tcl +++ /dev/null @@ -1,1405 +0,0 @@ -# This script provides commands for upgrade of OCCT and software based on it -# to a newer version of OCCT (7.0) - - -# source code for upgrading -set ArgName(HelpInfo) "h" - -set ArgName(SourceCode) "src" -set ArgName(IncPath) "inc" - -set ArgName(IncExtension) "incext" -set ArgName(SrcExtension) "srcext" - -set ArgName(RTTI) "rtti" - -set ArgName(CStyleCastHandle) "handlecast" -set ArgName(All) "all" - -set ArgName(Handle) "handle" -set ArgName(TCollection) "tcollection" - -set ArgName(CompatibleMode) "compat" - -set ArgName(Recurse) "recurse" -set ArgName(Rename) "rename" - -set ArgName(CheckOnly) "check" -set ArgName(WLog) "wlog" -set ArgName(Log) "log" - -proc HelpInformation {} { - global ArgName - global DataSectionName - - loginfo "Tool for upgrade of application code from older versions of OCCT." - loginfo "" - loginfo "Required parameter:" - loginfo " -$ArgName(SourceCode)= - path to sources to upgrade" - loginfo "" - loginfo "File search options:" - loginfo " -$ArgName(IncPath)= - path to header files of OCCT or other used libraries" - loginfo " -$ArgName(Recurse) - process all subfolders of '-$ArgName(SourceCode)' and '-$ArgName(IncPath)'" - loginfo " -$ArgName(SrcExtension)=cxx,cpp - extensions of source files" - loginfo " -$ArgName(IncExtension)=hxx,h,lxx,gxx - extensions of header files" - loginfo "" - loginfo "Upgrade options:" - loginfo " -$ArgName(All) - do all upgrades (if neither of below options are given)" - loginfo " -$ArgName(RTTI) - adapt code for changes in type system (RTTI) in OCCT 7.0" - loginfo " -$ArgName(Handle) - adapt code for changes in OCCT Handle" - loginfo " -$ArgName(TCollection) - replace forward declaration of TCollection classes by #include" - loginfo " -$ArgName(CStyleCastHandle) - replace c-style casts of Handle by DownCast()" - loginfo " -$ArgName(Rename) - apply renaming of classes" - loginfo "" - loginfo "Advanced options:" - loginfo " -$ArgName(CompatibleMode) - preserve old RTTI macros for compatibility with OCCT 6.x" - loginfo " -$ArgName(CheckOnly) - do check only, no modifications will be made" - loginfo " -$ArgName(WLog) - show gui log of upgrade process" - loginfo " -$ArgName(Log)= - put the log into a file" - - return -} - -proc ParseArgs {theArgValues theArgs {theRemoveFromArgs "false"}} { - upvar $theArgValues anArgValues - - global ArgName - global DataSectionName - - # help information - set anArgValues(HelpInfo) [SeekArg $ArgName(HelpInfo) theArgs "false" $theRemoveFromArgs] - - # sources that will be upgraded - set anArgValues(SourceCode) [SeekArg $ArgName(SourceCode) theArgs "" $theRemoveFromArgs] - - set anArgValues(IncExtension) [SeekArg $ArgName(IncExtension) theArgs "h,hpp,hxx,gxx,lxx" $theRemoveFromArgs] - set anArgValues(SrcExtension) [SeekArg $ArgName(SrcExtension) theArgs "c,cpp,cxx" $theRemoveFromArgs] - - # inc folder - set anArgValues(IncPath) [SeekArg $ArgName(IncPath) theArgs "$anArgValues(SourceCode)" $theRemoveFromArgs] - - set anArgValues(RTTI) [SeekArg $ArgName(RTTI) theArgs "false" $theRemoveFromArgs] - set anArgValues(CStyleCastHandle) [SeekArg $ArgName(CStyleCastHandle) theArgs "false" $theRemoveFromArgs] - - set anArgValues(Handle) [SeekArg $ArgName(Handle) theArgs "false" $theRemoveFromArgs] - set anArgValues(TCollection) [SeekArg $ArgName(TCollection) theArgs "false" $theRemoveFromArgs] - - set anArgValues(Rename) [SeekArg $ArgName(Rename) theArgs "false" $theRemoveFromArgs] - - set aHasAgentArgs [expr {$anArgValues(RTTI) || $anArgValues(CStyleCastHandle) || \ - $anArgValues(Handle) || $anArgValues(TCollection)} || \ - $anArgValues(Rename)] - - set anArgValues(All) [SeekArg $ArgName(All) theArgs [expr {!$aHasAgentArgs}] $theRemoveFromArgs] - - set anArgValues(Recurse) [SeekArg $ArgName(Recurse) theArgs "false" $theRemoveFromArgs] - set anArgValues(CompatibleMode) [SeekArg $ArgName(CompatibleMode) theArgs "false" $theRemoveFromArgs] - set anArgValues(CheckOnly) [SeekArg $ArgName(CheckOnly) theArgs "false" $theRemoveFromArgs] - set anArgValues(WLog) [SeekArg $ArgName(WLog) theArgs "false" $theRemoveFromArgs] - - set anArgValues(Log) [SeekArg $ArgName(Log) theArgs "" $theRemoveFromArgs] - - return $theArgs -} - -proc SeekArg {theSoughtArgName theArgs {theDefaultArgValue ""} {theRemoveFromArgs false}} { - upvar ${theArgs} anArgs - - set aBooleanValue [string is boolean -strict $theDefaultArgValue] - - set anArgValues {} - - set anArgsIndex -1 - foreach anArg $anArgs { - incr anArgsIndex - - if {[regexp -- "-${theSoughtArgName}\=\(.\*\)" $anArg dummy anArgValue]} { - set anArgValue [regsub -all {\\} $anArgValue {/}] - if {$theRemoveFromArgs} { - set anArgs [lreplace $anArgs $anArgsIndex $anArgsIndex] - incr anArgsIndex -1 - } - if {"$anArgValue" != ""} { - lappend anArgValues $anArgValue - } else { - logwarn "'-${theSoughtArgName}' is skipped because it has empty value" - } - } elseif [string match "-${theSoughtArgName}" $anArg] { - if {$theRemoveFromArgs} { - set anArgs [lreplace $anArgs $anArgsIndex $anArgsIndex] - } - # skip non-boolean empty argument; do not break the foreach loop - if {$aBooleanValue} { - lappend anArgValues "true" - break - } else { - logwarn "'-${theSoughtArgName}' is skipped because it has empty value" - } - } - } - - # return boolean value as string - if {$aBooleanValue} { - if {[llength $anArgValues] > 0} { - return [lindex $anArgValues 0] - } else { - return $theDefaultArgValue - } - } - - if {[llength $anArgValues] == 0 && "$theDefaultArgValue" != ""} { - lappend anArgValues $theDefaultArgValue - } - - return $anArgValues -} - -# section names in the data file -set DataSectionName(TCollection) "tcollection" -set DataSectionName(Rename) "rename" - -proc DataFileName {} { - return [file join [file dirname [info script]] upgrade.dat] -} - -proc IsDataFileExist {} { - return [file exists [DataFileName]] -} - -proc ReadFromDataFile {theSectionName} { - if {![file exists [DataFileName]]} { - return - } - - set aFileContent [ReadFileToList [DataFileName] aFileRawContent aDataEOL] - - set aSectionValueList {} - - set anIsSection false - set aSectionPattern {^ *\[ *([A-Za-z0-9_\.]*) *\]+} - foreach aLine $aFileContent { - if {[regexp -- $aSectionPattern $aLine dummy aSectionName]} { - if {"$aSectionName" == "$theSectionName"} { - set anIsSection true - continue - } elseif {$anIsSection == true} { - set anIsSection false - break - } - } - - if {$anIsSection == true} { - set aTrimmedLine [string trimright $aLine] - if {"$aTrimmedLine" != ""} { - lappend aSectionValueList $aTrimmedLine - } - } - } - - return $aSectionValueList -} - -proc SaveToDataFile {theSectionName theSectionContent} { - if {![file exists [DataFileName]]} { - return - } - - set aFileContent [ReadFileToList [DataFileName] aFileRawContent aDataEOL] - - set aLinesBefore {} - set aLinesAfter {} - - set anIsSection false - set anIsSectionBefore true - set anIsSectionAfter false - - set aSectionPattern {^ *\[ *([A-Za-z0-9_\.]*) *\]+} - foreach aLine $aFileContent { - if {$anIsSectionBefore} { - lappend aLinesBefore $aLine - } - - if {[regexp -- $aSectionPattern $aLine dummy aSectionName]} { - if {"$aSectionName" == "$theSectionName"} { - set anIsSectionBefore false - set anIsSection true - } elseif {$anIsSection == true} { - set anIsSection false - set anIsSectionAfter true - } - } - - if {$anIsSection == true} { - continue - } - - if {$anIsSectionAfter} { - lappend aLinesAfter $aLine - } - } - - # write to file - SaveListToFile [DataFileName] [list {*}$aLinesBefore {*}$theSectionContent {*}$aLinesAfter] $aDataEOL -} - -# Main tool, accepts path to location of source tree to be upgraded. -proc upgrade {args} { - - global ArgName - global LogFilePath - global DataSectionName - - set theArgs $args - set anUnparsedArgs [ParseArgs anArgValues $theArgs "true"] - - if {"$anUnparsedArgs" != ""} { - logerr "undefined arguments: $anUnparsedArgs" - loginfo "use -$ArgName(HelpInfo) to show all the arguments" - return - } - - if {$anArgValues(HelpInfo) || [llength $anArgValues(SourceCode)] == 0} { - HelpInformation - return - } - - if {"$anArgValues(Log)" != ""} { - set LogFilePath $anArgValues(Log) - - # clean file before writing - if {[file exists "$LogFilePath"]} { - set fd [open "$LogFilePath" r+] - chan truncate $fd 0 - close $fd - } - } - - if {$anArgValues(WLog)} { - _create_logger - } - - # collect src directory structure (all subdirs) - set anIncPaths {} - foreach aSrcDir $anArgValues(SourceCode) { - lappend anIncPaths $aSrcDir - foreach aSubSrcDir [CollectDirStructure $aSrcDir] { - lappend anIncPaths $aSubSrcDir - } - } - - foreach anIncDir $anArgValues(IncPath) { - lappend anIncPaths $anIncDir - foreach aSubIncDir [CollectDirStructure $anIncDir] { - lappend anIncPaths $aSubIncDir - } - } - - set anIncPaths [lsort -unique -dictionary $anIncPaths] - # end the collect - - set aRawNewNames [ReadFromDataFile $DataSectionName(Rename)] - foreach aRawName $aRawNewNames { - set aRawName [split $aRawName " "] - if {[llength $aRawName] > 1} { - # set aNewNames (old name) [new name] - set aNewNames([lindex ${aRawName} 0]) [lindex ${aRawName} 1] - } - } - - set aDoRename true - if {[llength [array names aNewNames]] == 0} { - set aDoRename false - - logwarn "renaming skipped. there is no class names to rename" - logwarn "see the content of [DataFileName] file, $DataSectionName(Rename) section" - } - - set aProcNameWithArgs "[lindex [info level 0] 0]" - foreach anArgName [array names anArgValues] { - if [string is boolean -strict $anArgValues($anArgName)] { - if [string is true "$anArgValues($anArgName)"] { - set aProcNameWithArgs [format "$aProcNameWithArgs -%s" "$ArgName($anArgName)"] - } - } else { - set aProcNameWithArgs [format "$aProcNameWithArgs -%s" "$ArgName($anArgName)=$anArgValues($anArgName)"] - } - } - - loginfo "$aProcNameWithArgs" - - # merge all processed extensions - set anExtensions "$anArgValues(SrcExtension),$anArgValues(IncExtension)" - - set aSourceCodePaths $anArgValues(SourceCode) - while {[llength $aSourceCodePaths]} { - set aSourceCodePaths [lassign $aSourceCodePaths aProcessedPath] - - loginfo "Processing: $aProcessedPath" - - if {$anArgValues(All) || $anArgValues(RTTI)} { - ConvertRtti $aProcessedPath \ - $anIncPaths \ - $anArgValues(CheckOnly) \ - $anArgValues(CompatibleMode) \ - $anArgValues(IncExtension) \ - $anArgValues(SrcExtension) - } - - if {$anArgValues(All) || $anArgValues(Handle)} { - ConvertHandle $aProcessedPath $anIncPaths $anArgValues(CheckOnly) $anExtensions - } - - if {$anArgValues(All) || $anArgValues(TCollection)} { - ConvertTColFwd $aProcessedPath $anArgValues(IncExtension) - } - - if {$anArgValues(All) || $anArgValues(CStyleCastHandle)} { - ConvertCStyleHandleCast $aProcessedPath $anExtensions $anArgValues(CheckOnly) - } - - if {$anArgValues(All) || $anArgValues(Rename)} { - if {$aDoRename} { - Rename $aProcessedPath $anExtensions aNewNames $anArgValues(CheckOnly) - } - } - - # Recurse processing - if {$anArgValues(Recurse)} { - lappend aSourceCodePaths {*}[glob -nocomplain -directory $aProcessedPath -type d *] - } - } -} - -# search and rename the indices (old names) of @theNewNames with their values (new ones) -# processes files that have @theExtensions only in @thePath folder -proc Rename {thePath theExtensions theNewNames theCheckMode} { - upvar $theNewNames aNewNames - - set aNames [array names aNewNames] - - foreach aFile [glob -nocomplain -type f -directory $thePath *.{$theExtensions}] { -# loginfo "$aFile processing" - set aFileContent [ReadFileToRawText $aFile] - - set aHasChanges false - foreach aName $aNames { - set anIndexInRow 0 - set aClassNameTmpl "\\m$aName\\M" - while { [regexp -start $anIndexInRow -indices -lineanchor $aClassNameTmpl $aFileContent aFoundClassNameLoc] } { - set anIndexInRow [lindex $aFoundClassNameLoc 1] - - if {$theCheckMode} { - logwarn "Warning: $aFile contains $aName" - break - } else { - set aHasChanges true - ReplaceSubString aFileContent $aFoundClassNameLoc "$aNewNames($aName)" anIndexInRow - incr anIndexInRow -1 - } - } - } - - if {$aHasChanges} { - SaveTextToFile $aFile $aFileContent - } - } -} - -# @thePackagePath either file or folder. If it is a folder, -# all files with @theHeaderExtensions are processed. -# "fwd.tcollection" section from upgrade.ini file is used to find out what -# classes have been converted and, thus, what forward declarations can be replaced -proc ConvertTColFwd {thePackagePath theHeaderExtensions} { - global DataSectionName - - # Note: the content of theHeaderExtensions should have - # further form (values separated by comma): "ext1,ext2,ext3" - # this form will be used below in reg expression to collect all header files - - if {! [file exists $thePackagePath]} { - logerr "Error: $thePackagePath does not exist" - return - } - - # read the list of already converted TCollection classes - if [IsDataFileExist] { - set aConvertedTColClasses [ReadFromDataFile $DataSectionName(TCollection)] - } else { - logerr "[DataFileName] file of upgrade process does not exist" - return - } - - # pattern that will be used - set aForwardDeclPattern {^ *class *([A-Za-z0-9_/\.]+) *;} - - set aTargetPaths ${thePackagePath} - while {[llength $aTargetPaths]} { - set aTargetPaths [lassign $aTargetPaths aProcessedPath] - - # if aProcessedPath is a folder, collect all files with $theHeaderExtensions from it - set aProcessedHeaders ${aProcessedPath} - if {[file isdirectory $aProcessedPath]} { - # get all header files - set aProcessedHeaders [glob -nocomplain -type f -directory $aProcessedPath *.{$theHeaderExtensions}] - } - - foreach aHeader $aProcessedHeaders { - set aHeaderLineIndex -1 - set aHeaderContentUpdated false - - # read the content of the header file - set aHeaderContent [ReadFileToList $aHeader aHeaderRawContent aHeaderEOL] - - # remove _isMulti variable that used in _check_line - set _isMulti false - - foreach aHeaderContentLine $aHeaderContent { - incr aHeaderLineIndex - - # remove _cmnt variable that used in _check_line - set _cmnt "" - - set aHeaderContentLine [_check_line $aHeaderContentLine] - if {[regexp {^ *class *([A-Za-z0-9_/\.]+) *;} $aHeaderContentLine dummy aForwardDeclClass]} { - if {[lsearch $aConvertedTColClasses $aForwardDeclClass] != -1} { - set aHeaderContentUpdated true - set aHeaderContentRow "\#include <$aForwardDeclClass.hxx>" - set aHeaderContent [lreplace $aHeaderContent $aHeaderLineIndex $aHeaderLineIndex $aHeaderContentRow] - } - } - } - - if {$aHeaderContentUpdated} { - loginfo "$aHeader updated" - SaveListToFile $aHeader $aHeaderContent $aHeaderEOL - } - } - } -} - -# try to find source file corresponding to the specified header and either -# inject macro IMPLEMENT_STANDARD_RTTIEXT in it, or check it already present, -# and depending on this, return suffix to be used for corresponding macro -# DEFINE_STANDARD_RTTI... (either inline or out-of-line variant) -proc DefineExplicitRtti {hxxfile class base theSourceExtensions} { - # if current file is not a header (by extension), exit with "inline" variant - # (there is no need to bother with out-of-line instantiations for local class) - set ext [string range [file extension $hxxfile] 1 end] - if { [lsearch -exact [split $theSourceExtensions ,] $ext] >=0 } { - return "_INLINE" - } - - # try to find source file with the same name but source-type extension - # in the same folder - set filename [file rootname $hxxfile] - foreach ext [split $theSourceExtensions ,] { -# puts "Checking ${filename}.$ext" - if { ! [file readable ${filename}.$ext] } { continue } - - # check the file content - set aFileContent [ReadFileToList ${filename}.$ext aFileRawContent aEOL] - - # try to find existing macro IMPLEMENT_STANDARD_RTTIEXT and check that - # it is consistent - foreach line $aFileContent { - if { [regexp "^\\s*IMPLEMENT_STANDARD_RTTIEXT\\s*\\(\\s*$class\\s*,\\s*(\[A-Za-z0-9_\]+)\\s*\\)" $line res impl_base] } { - # implementation is in place, just report warning if second argument - # is different - if { $base != $impl_base } { - logwarn "Warning in ${filename}.$ext: second argument of macro" - logwarn " IMPLEMENT_STANDARD_RTTIEXT($class,$impl_base)" - logwarn " is not the same as detected base class, $base" - } - return "EXT" - } - } - - # inject a new macro before the first non-empty, non-comment, and - # non-preprocessor line - set aNewFileContent {} - set injected 0 - set inc_found 0 - foreach line $aFileContent { - if { ! $injected } { - # add macro before first non-empty line after #includes - if { [regexp {^\s*$} $line] } { - } elseif { [regexp {^\s*\#\s*include} $line] } { - set inc_found 1 - } elseif { $inc_found } { - set injected 1 - lappend aNewFileContent "IMPLEMENT_STANDARD_RTTIEXT($class,$base)" - if { ! [regexp "^IMPLEMENT_" $line] } { - lappend aNewFileContent "" - } - } - } - lappend aNewFileContent $line - } - if { ! $injected } { - lappend aNewFileContent "IMPLEMENT_STANDARD_RTTIEXT($class,$base)" - } - SaveListToFile ${filename}.$ext $aNewFileContent $aEOL - - return "EXT" - } - - logwarn "Warning in ${hxxfile}: cannot find corresponding source file," - logwarn " will use inline version of DEFINE_STANDARD_RTTI" - return "_INLINE" -} - -# Parse source files and: -# -# - add second argument to macro DEFINE_STANDARD_RTTI specifying first base -# class found in the class declaration; -# - replace includes of Standard_DefineHandle.hxx by Standard_Type.hxx; -# - add #includes for all classes used as argument to macro -# STANDARD_TYPE(), except of already included ones -# -# If theCompatibleMode is false, in addition: -# - removes macros IMPLEMENT_DOWNCAST() and IMPLEMENT_STANDARD_*(); -proc ConvertRtti {theProcessedPath theIncPaths theCheckMode theCompatibleMode \ - theHeaderExtensions theSourceExtensions} { - - # iterate by header and source files - foreach aProcessedFile [glob -nocomplain -type f -directory $theProcessedPath *.{$theHeaderExtensions,$theSourceExtensions}] { - set aProcessedFileName [file tail $aProcessedFile] - - set aProcessedFileContent [ReadFileToRawText $aProcessedFile] - - # find all declarations of classes with public base in this header file; - # the result is stored in array inherits(class) - set index 0 - array unset inherits - set pattern_class {^\s*class\s+([A-Za-z_0-9:]+)\s*:\s*public\s+([A-Za-z_0-9:]+)\s*([,]?)} - while {[regexp -start $index -indices -lineanchor $pattern_class $aProcessedFileContent location class base comma]} { - set index [lindex $location 1] - - set class [eval string range \$aProcessedFileContent $class] - set base [eval string range \$aProcessedFileContent $base] - - if { [info exists inherits($class)] } { - set inherits($class,multiple) "found multiple declarations of class $class" - } else { - if { [lindex $comma 0] <= [lindex $comma 1] } { - set inherits($class,multiple) "class $class uses multiple inheritance" - } - set inherits($class) $base - } - } - - set change_flag 0 - - # find all instances of DEFINE_STANDARD_RTTI with single or two arguments - set index 0 - set pattern_rtti {^(\s*DEFINE_STANDARD_RTTI)([_A-Z]+)?\s*\(\s*([A-Za-z_0-9,\s]+)\s*\)} - while { [regexp -start $index -indices -lineanchor $pattern_rtti \ - $aProcessedFileContent location start suffix clist] } { - set index [lindex $location 1] - - set start [eval string range \$aProcessedFileContent $start] - set suffix [eval string range \$aProcessedFileContent $suffix] - set clist [split [eval string range \$aProcessedFileContent $clist] ,] - - if { [llength $clist] == 1 } { - set class [string trim [lindex $clist 0]] - if { [info exists inherits($class)] } { - if { ! $theCheckMode } { - if { [info exists inherits($class,multiple)] } { - logwarn "Warning in $aProcessedFileName: $inherits($class,multiple);" - logwarn "macro DEFINE_STANDARD_RTTI is changed assuming it inherits $inherits($class), please check!" - } - set change_flag 1 - ReplaceSubString aProcessedFileContent $location \ - "${start}EXT($class,$inherits($class))" index - } - } else { - logwarn "Error in $aProcessedFile: Macro DEFINE_STANDARD_RTTI used for class $class whose declaration is not found in this file, cannot fix" - } - } elseif { [llength $clist] == 2 } { - set class [string trim [lindex $clist 0]] - set base [string trim [lindex $clist 1]] - if { ! [info exists inherits($class)] } { - logwarn "Warning in $aProcessedFile: Macro DEFINE_STANDARD_RTTI used for class $class whose declaration is not found in this file" - } elseif { $base != $inherits($class) && ! [info exists inherits($class,multiple)] } { - logwarn "Warning in $aProcessedFile: Second argument in macro DEFINE_STANDARD_RTTI for class $class is $base while $class seems to inherit from $inherits($class)" - } - # convert intermediate version of macro DEFINE_STANDARD_RTTI - # with two arguments to either _INLINE or EXT variant - if { ! $theCheckMode && "$suffix" == "" } { - set change_flag 1 - # try to inject macro IMPLEMENT_STANDARD_RTTIEXT in the - # corresponding source file (or check it already present), - # and depending on this, use either inline or out-of-line variant - set rtti_suffix [DefineExplicitRtti $aProcessedFile $class $base $theSourceExtensions] - ReplaceSubString aProcessedFileContent $location \ - "${start}${rtti_suffix}($class,$base)" index - } - } - } - - # replace includes of Standard_DefineHandle.hxx by Standard_Type.hxx -# set index 0 -# set pattern_definehandle {\#\s*include\s*<\s*Standard_DefineHandle.hxx\s*>} -# while { [regexp -start $index -indices -lineanchor $pattern_definehandle $aProcessedFileContent location] } { -# set index [lindex $location 1] -# if { ! $theCheckMode } { -# set change_flag 1 -# ReplaceSubString aProcessedFileContent $location "\#include " index -# incr index -1 -# } else { -# logwarn "Warning: $aProcessedFile contains obsolete forward declarations of Handle classes" -# break -# } -# } - - # remove macros IMPLEMENT_DOWNCAST() and IMPLEMENT_STANDARD_*(); - if { ! $theCompatibleMode } { - set index 0 - set first_newline \n\n - set pattern_implement {\\?\n\s*IMPLEMENT_(DOWNCAST|STANDARD_[A-Z_]+|HARRAY1|HARRAY2|HUBTREE|HEBTREE|HSEQUENCE)\s*\([A-Za-z0-9_ ,]*\)\s*;?} - while { [regexp -start $index -indices -lineanchor $pattern_implement $aProcessedFileContent location macro] } { - set index [lindex $location 1] - # macro IMPLEMENT_STANDARD_RTTIEXT is retained - if { [eval string range \$aProcessedFileContent $macro] == "STANDARD_RTTIEXT" } { - continue - } - if { ! $theCheckMode } { - set change_flag 1 - ReplaceSubString aProcessedFileContent $location $first_newline index -# set first_newline "" - incr index -1 - } else { - logwarn "Warning: $aProcessedFile contains deprecated macros IMPLEMENT_*" - break - } - } - } - - # find all uses of macro STANDARD_TYPE and method DownCast and ensure that - # argument class is explicitly included - set pattern_incbeg {\s*#\s*include\s*[\"<]\s*([A-Za-z0-9_/]*/)?} - set pattern_incend {[.][a-zA-Z]+\s*[\">]} - set index 0 - set addtype {} - set pattern_type1 {STANDARD_TYPE\s*\(\s*([A-Za-z0-9_]+)\s*\)} - while { [regexp -start $index -indices $pattern_type1 $aProcessedFileContent location name] } { - set index [lindex $location 1] - set name [eval string range \$aProcessedFileContent $name] - if { ! [regexp -lineanchor "^${pattern_incbeg}${name}${pattern_incend}" $aProcessedFileContent] && - [lsearch -exact $addtype $name] < 0 && - [SearchForFile $theIncPaths $name.hxx]} { - lappend addtype $name - } - } - set pattern_type2 {Handle\s*\(\s*([A-Za-z0-9_]+)\s*\)\s*::\s*DownCast} - while { [regexp -start $index -indices $pattern_type2 $aProcessedFileContent location name] } { - set index [lindex $location 1] - set name [eval string range \$aProcessedFileContent $name] - if { ! [regexp -lineanchor "^${pattern_incbeg}${name}${pattern_incend}" $aProcessedFileContent] && - [lsearch -exact $addtype $name] < 0 && - [SearchForFile $theIncPaths $name.hxx]} { - lappend addtype $name - } - } - if { [llength $addtype] > 0 } { - if { ! $theCheckMode } { - set addinc "" - foreach type $addtype { - if { "$aProcessedFileName" != "$type.hxx" } { - append addinc "\n#include <$type.hxx>" - } - } - if { [regexp -indices ".*\n${pattern_incbeg}\[A-Za-z0-9_/\]+${pattern_incend}" $aProcessedFileContent location] } { - set change_flag 1 - ReplaceSubString aProcessedFileContent $location "[eval string range \$aProcessedFileContent $location]$addinc" index - } else { - logerr "Error: $aProcessedFile: Cannot find #include statement to add more includes..." - } - } else { - logwarn "Warning: $aProcessedFile: The following class names are used as arguments of STANDARD_TYPE" - logwarn " macro, but not included directly: $addtype" - break - } - } - - # apply changes to the header file - if { $change_flag } { - SaveTextToFile $aProcessedFile $aProcessedFileContent - } - } -} - -# replace all forward declarations of "class Handle(...)" with fwd of "class ..." -proc ConvertHandle {theTargetPath theIncPaths theCheckMode theExtensions} { - - # iterate by header files - foreach aHeader [glob -nocomplain -type f -directory $theTargetPath *.{$theExtensions}] { - set aCurrentHeaderName [file tail $aHeader] - - # skip gxx files, as names Handle_xxx used there are in most cases - # placeholders of the argument types substituted by #define - if {[file extension $aHeader] == ".gxx"} { - continue - } - - # read the content of the header - if { [catch {set fd [open $aHeader rb]}] } { - logerr "Error: cannot open $aHeader" - continue - } - close $fd - - set aHeaderContent [ReadFileToList $aHeader aHeaderRawContent aHeaderEOL] - - set anUpdateHeader false - - # if file contains "slots:" or "signals:", assume it defines some QObject - # class(es). - # In this case, type names "Handle_T" will not be replaced by Handle(T) to - # prevent failure of compilation of MOC code if such types are used in - # slots or signals (MOC does not expand macros). - # Forward declaration of a Handle will be then replaced by #include of - # corresponding class header (if such header is found), assuming that name - # typedefed Handle_T is defined in corresponding header (as typedef). - set isQObject [expr [regexp "Q_OBJECT" $aHeaderContent] && [regexp "(slots|signals)\s*:" $aHeaderContent]] - - # replace all IDs with prefix Handle_ by use of Handle() macro - if { ! $isQObject } { - set anUpdatedHeaderContent {} - set pattern_handle {\mHandle_([A-Za-z0-9_]+)} - foreach line $aHeaderContent { - # do not touch typedefs, #include, and #if... statements - if { [regexp {^\s*typedef} $line] || - [regexp {^\s*\#\s*include} $line] || [regexp {^\s*\#\s*if} $line] } { - lappend anUpdatedHeaderContent $line - continue - } - - # in other preprocessor statements, skip first expression to avoid - # replacements in #define Handle_... and similar cases - set index 0 - if { [regexp -indices {\s*#\s*[A-Za-z]+\s+[^\s]+} $line location] } { - set index [expr 1 + [lindex $location 1]] - } - - # replace Handle_T by Handle(T) - while { [regexp -start $index -indices $pattern_handle $line location class] } { - set index [lindex $location 1] - - set class [eval string range \$line $class] -# puts "Found: [eval string range \$line $location]" - - if { ! $theCheckMode } { - set anUpdateHeader true - ReplaceSubString line $location "Handle($class)" index - } else { - logwarn "Warning: $aHeader refers to IDs starting with \"Handle_\" which are likely" - logwarn " instances of OCCT Handle classes (e.g. \"$class\"); these are to be " - logwarn " replaced by template opencascade::handle<> or legacy macro Handle()" - set index -1 ;# to break outer cycle - break - } - } - lappend anUpdatedHeaderContent $line - - if { $index < 0 } { - set anUpdatedHeaderContent $aHeaderContent - break - } - } - set aHeaderContent $anUpdatedHeaderContent - } - - # replace NS::Handle(A) by Handle(NS::A) - set anUpdatedHeaderContent {} - set pattern_nshandle {([A-Za-z0-9_]+)\s*::\s*Handle\s*\(\s*([A-Za-z0-9_]+)\s*\)} - foreach line $aHeaderContent { - set index 0 - - while { [regexp -start $index -indices -lineanchor $pattern_nshandle $line location scope class]} { - set index [lindex $location 1] - - set scope [eval string range \$line $scope] - set class [eval string range \$line $class] - - if { ! $theCheckMode } { - set anUpdateHeader true - ReplaceSubString line $location "Handle(${scope}::${class})" index - } else { - logwarn "Warning in $aHeader: usage of Handle macro inside scope is incorrect: [eval string range \$line $location]" - set index -1 ;# to break outer cycle - break - } - } - lappend anUpdatedHeaderContent $line - - if { $index < 0 } { - set anUpdatedHeaderContent $aHeaderContent - break - } - } - set aHeaderContent $anUpdatedHeaderContent - - # remove all forward declarations of Handle classes - set anUpdatedHeaderContent {} - set aFwdHandlePattern {^\s*class\s+Handle[_\(]([A-Za-z0-9_]+)[\)]?\s*\;\s*$} - foreach aHeaderContentLine $aHeaderContent { - if {[regexp $aFwdHandlePattern $aHeaderContentLine dummy aForwardDeclHandledClass]} { - if {$theCheckMode} { - loginfo "Info: $aHeader contains statement involving forward decl of Handle_$aForwardDeclHandledClass" - } else { - # replace by forward declaration of a class or its include unless - # it is already declared or included - if { ! [regexp "\#\\s*include\\s*\[\<\"\]\\s*(\[A-Za-z0-9_/\]*/)?$aForwardDeclHandledClass\[.\]hxx\\s*\[\>\"\]" $aHeaderContent] } { - if { $isQObject && "$aCurrentHeaderName" != "${aForwardDeclHandledClass}.hxx" } { - lappend anUpdatedHeaderContent "#include <${aForwardDeclHandledClass}.hxx>" - if { ! [SearchForFile $theIncPaths ${aForwardDeclHandledClass}.hxx] } { - loginfo "Warning: include ${aForwardDeclHandledClass}.hxx added in $aHeader, assuming it exists and defines Handle_$aForwardDeclHandledClass" - } - } elseif { ! [regexp "^\s*class\s+$aForwardDeclHandledClass\s*;" $aHeaderContent] } { - lappend anUpdatedHeaderContent "class $aForwardDeclHandledClass;" - } - } - set anUpdateHeader true - continue - } - } - lappend anUpdatedHeaderContent $aHeaderContentLine - } - set aHeaderContent $anUpdatedHeaderContent - - # remove all typedefs using Handle() macro to generate typedefed name - set anUpdatedHeaderContent {} - set aTypedefHandlePattern {^\s*typedef\s+[_A-Za-z\<\>, \s]+\s+Handle\([A-Za-z0-9_]+\)\s*\;\s*$} - foreach aHeaderContentLine $aHeaderContent { - if {[regexp $aTypedefHandlePattern $aHeaderContentLine aFoundPattern]} { - if {$theCheckMode} { - loginfo "Info: $aHeader contains typedef using Handle macro to generate name: $aFoundPattern" - } else { - set anUpdateHeader true - continue - } - } - lappend anUpdatedHeaderContent $aHeaderContentLine - } - set aHeaderContent $anUpdatedHeaderContent - - # remove all #include statements for files starting with "Handle_" - set anUpdatedHeaderContent {} - set anIncHandlePattern {^\s*\#\s*include\s+[\<\"]\s*(Handle[\(_][A-Za-z0-9_.]+[\)]?)\s*[\>\"]\s*$} - foreach aHeaderContentLine $aHeaderContent { - if {[regexp $anIncHandlePattern $aHeaderContentLine aFoundPattern anHxxName] && - ! [SearchForFile $theIncPaths $anHxxName]} { - if {$theCheckMode} { - loginfo "Info: $aHeader includes missing header: $anHxxName" - } else { - set anUpdateHeader true - continue - } - } - lappend anUpdatedHeaderContent $aHeaderContentLine - } - - # save result - if {$anUpdateHeader} { - SaveListToFile $aHeader $anUpdatedHeaderContent $aHeaderEOL - } - } -} - -# Replaces C-style casts of Handle object to Handle to derived type -# by call to DownCast() method -proc ConvertCStyleHandleCast {pkpath theExtensions theCheckMode} { - - # iterate by header files - foreach afile [glob -nocomplain -type f -directory $pkpath *.\{$theExtensions\}] { - set hxx [ReadFileToRawText $afile] - - set change_flag 0 - - # replace ((Handle(A)&)b) by Handle(A)::DownCast(b) - set index 0 - set pattern_refcast1 {\(\(\s*Handle\s*\(\s*([A-Za-z0-9_]+)\s*\)\s*[&]\s*\)\s*([A-Za-z0-9_]+)\)} - while { [regexp -start $index -indices -lineanchor $pattern_refcast1 $hxx location class var]} { - set index [lindex $location 1] - - set class [eval string range \$hxx $class] - set var [eval string range \$hxx $var] - - if { ! $theCheckMode } { - set change_flag 1 - ReplaceSubString hxx $location "Handle($class)::DownCast ($var)" index - } else { - logwarn "Warning in $afile: C-style cast: [eval string range \$hxx $location]" - } - } - - # replace (Handle(A)&)b, by Handle(A)::DownCast(b), - # replace (Handle(A)&)b; by Handle(A)::DownCast(b); - # replace (Handle(A)&)b) by Handle(A)::DownCast(b)) - set index 0 - set pattern_refcast2 {\(\s*Handle\s*\(\s*([A-Za-z0-9_]+)\s*\)\s*[&]\s*\)\s*([A-Za-z0-9_]+)(\s*[,;\)])} - while { [regexp -start $index -indices -lineanchor $pattern_refcast2 $hxx location class var end]} { - set index [lindex $location 1] - - set class [eval string range \$hxx $class] - set var [eval string range \$hxx $var] - set end [eval string range \$hxx $end] - - if { ! $theCheckMode } { - set change_flag 1 - ReplaceSubString hxx $location "Handle($class)::DownCast ($var)$end" index - } else { - logwarn "Warning in $afile: C-style cast: [eval string range \$hxx $location]" - } - } - - # replace (*((Handle(A)*)&b)) by Handle(A)::DownCast(b) - set index 0 - set pattern_ptrcast1 {([^A-Za-z0-9_]\s*)\(\s*[*]\s*\(\(Handle\s*\(\s*([A-Za-z0-9_]+)\s*\)\s*[*]\s*\)\s*[&]\s*([A-Za-z0-9_]+)\s*\)\s*\)} - while { [regexp -start $index -indices -lineanchor $pattern_ptrcast1 $hxx location start class var] } { - set index [lindex $location 1] - - set start [eval string range \$hxx $start] - set class [eval string range \$hxx $class] - set var [eval string range \$hxx $var] - - if { ! $theCheckMode } { - set change_flag 1 - ReplaceSubString hxx $location "${start}Handle($class)::DownCast ($var)" index - } else { - logwarn "Warning in $afile: C-style cast: [eval string range \$hxx $location]" - } - } - - # replace *((Handle(A)*)&b) by Handle(A)::DownCast(b) - set index 0 - set pattern_ptrcast2 {[*]\s*\(\(Handle\s*\(\s*([A-Za-z0-9_]+)\s*\)\s*[*]\s*\)\s*[&]\s*([A-Za-z0-9_]+)\s*\)} - while { [regexp -start $index -indices -lineanchor $pattern_ptrcast2 $hxx location class var] } { - set index [lindex $location 1] - - set class [eval string range \$hxx $class] - set var [eval string range \$hxx $var] - - if { ! $theCheckMode } { - set change_flag 1 - ReplaceSubString hxx $location "Handle($class)::DownCast ($var)" index - } else { - logwarn "Warning in $afile: C-style cast: [eval string range \$hxx $location]" - } - } - - # replace (*(Handle(A)*)&b) by Handle(A)::DownCast(b) - set index 0 - set pattern_ptrcast3 {([^A-Za-z0-9_]\s*)\(\s*[*]\s*\(Handle\s*\(\s*([A-Za-z0-9_]+)\s*\)\s*[*]\s*\)\s*[&]\s*([A-Za-z0-9_]+)\s*\)} - while { [regexp -start $index -indices -lineanchor $pattern_ptrcast3 $hxx location start class var] } { - set index [lindex $location 1] - - set start [eval string range \$hxx $start] - set class [eval string range \$hxx $class] - set var [eval string range \$hxx $var] - - if { ! $theCheckMode } { - set change_flag 1 - ReplaceSubString hxx $location "${start}Handle($class)::DownCast ($var)" index - } else { - logwarn "Warning in $afile: C-style cast: [eval string range \$hxx $location]" - } - } - - # replace *(Handle(A)*)&b, by Handle(A)::DownCast(b), - # replace *(Handle(A)*)&b; by Handle(A)::DownCast(b); - # replace *(Handle(A)*)&b) by Handle(A)::DownCast(b)) - set index 0 - set pattern_ptrcast4 {[*]\s*\(Handle\s*\(\s*([A-Za-z0-9_]+)\s*\)\s*[*]\s*\)\s*[&]\s*([A-Za-z0-9_]+)(\s*[,;\)])} - while { [regexp -start $index -indices -lineanchor $pattern_ptrcast4 $hxx location class var end] } { - set index [lindex $location 1] - - set class [eval string range \$hxx $class] - set var [eval string range \$hxx $var] - set end [eval string range \$hxx $end] - - if { ! $theCheckMode } { - set change_flag 1 - ReplaceSubString hxx $location "Handle($class)::DownCast ($var)$end" index - } else { - logwarn "Warning in $afile: C-style cast: [eval string range \$hxx $location]" - } - } - - # just warn if some casts to & are still there - set index 0 - set pattern_refcast0 {\(\s*Handle\s*\(\s*([A-Za-z0-9_]+)\s*\)\s*[&]\s*\)\s*([A-Za-z0-9_]+)} - while { [regexp -start $index -indices -lineanchor $pattern_refcast0 $hxx location class var] } { - set index [lindex $location 1] - - set var [eval string range \$hxx $var] - if { "$var" != "const" && "$var" != "Standard_OVERRIDE" } { - logwarn "Warning in $afile: C-style cast: [eval string range \$hxx $location]" - } - } - - # replace const Handle(A)& a = Handle(B)::DownCast (b); by - # Handle(A) a ( Handle(B)::DownCast (b) ); - set index 0 - set pattern_refvar {\mconst\s+Handle\s*\(\s*([A-Za-z0-9_]+)\s*\)\s*[&]\s*([A-Za-z0-9_]+)\s*=\s*(Handle\s*\(\s*[A-Za-z0-9_]+\s*\)\s*::\s*DownCast\s*\([^;]+);} - while { [regexp -start $index -indices -lineanchor $pattern_refvar $hxx location class var hexpr] } { - set index [lindex $location 1] - - set class [eval string range \$hxx $class] - set var [eval string range \$hxx $var] - set hexpr [eval string range \$hxx $hexpr] - - if { ! $theCheckMode } { - set change_flag 1 - ReplaceSubString hxx $location "Handle($class) $var ($hexpr);" index - } else { - logwarn "Warning in $afile: C-style cast: [eval string range \$hxx $location]" - } - } - - # apply changes to the header file - if { $change_flag } { - SaveTextToFile $afile $hxx - } - } -} - -# Remove unnecessary forward declaration of a class if found immediately before -# its use in DEFINE_STANDARD_HANDLE -proc RemoveFwdClassForDefineStandardHandle {pkpath theCheckMode} { - - # iterate by header files - foreach afile [glob -nocomplain -type f -directory $pkpath *.?xx] { - - # load a file - if { [catch {set fd [open $afile rb]}] } { - logerr "Error: cannot open $afile" - continue - } - set hxx [read $fd] - close $fd - - set change_flag 0 - - # replace - set index 0 - set pattern_fwddef {class\s+([A-Za-z0-9_]+)\s*;\s*DEFINE_STANDARD_HANDLE\s*\(\s*([A-Za-z0-9_]+)\s*,\s*([A-Za-z0-9_]+)\s*\)[ \t]*} - while { [regexp -start $index -indices -lineanchor $pattern_fwddef $aProcessedFileContent location fwdclass class1 class2] } { - set index [lindex $location 1] - - set fwdclass [eval string range \$aProcessedFileContent $fwdclass] - set class1 [eval string range \$aProcessedFileContent $class1] - set class2 [eval string range \$aProcessedFileContent $class2] - - if { $fwdclass != $class1 } { - continue - } - - if { ! $theCheckMode } { - set change_flag 1 - ReplaceSubString aProcessedFileContent $location "DEFINE_STANDARD_HANDLE($class1, $class2)" index - incr index -1 - } else { - logwarn "Warning: $aProcessedFile contains unnecessary forward declarations of class $fwdclass" - break - } - } - - # apply changes to the header file - if { $change_flag } { - SaveTextToFile $afile $hxx - } - } -} - -# auxiliary: modifies variable text_var replacing part defined by two indices -# given in location by string str, and updates index_var variable to point to -# the end of the replaced string. Variable flag_var is set to 1. -proc ReplaceSubString {theSource theLocation theSubstitute theEndIndex} { - - upvar $theSource aSource - upvar $theEndIndex anEndIndex - - set aStartIndex [lindex $theLocation 0] - set anEndIndex [lindex $theLocation 1] - set aSource [string replace "$aSource" $aStartIndex $anEndIndex "$theSubstitute"] - set anEndIndex [expr $aStartIndex + [string length $theSubstitute]] -} - -# Save theFileContent some text to theFilePath file -proc SaveTextToFile {theFilePath theFileContent} { - if { [catch {set aFile [open ${theFilePath} w];} aReason] } { - logerr "Error: cannot open file \"${theFilePath}\" for writing: $aReason" - return - } - - fconfigure $aFile -translation binary - puts -nonewline $aFile "$theFileContent" - close $aFile - - loginfo "File $theFilePath modified" -} - -# read content from theFilePath to list, theFileContent is a raw content of the file -proc ReadFileToList {theFilePath theFileContent theFileEOL} { - upvar $theFileContent aFileContent - upvar $theFileEOL aFileEOL - - if {"$theFilePath" == "" || ![file exists $theFilePath]} { - return - } - - if { [catch {set aFile [open ${theFilePath} r]} aReason] } { - logerr "Error: cannot open file \"${theFilePath}\" for reading: $aReason" - return - } - - fconfigure $aFile -translation binary - set aFileContent [read $aFile] - close $aFile - - # detect DOS end-of-lines - if { [regexp "\r\n" $aFileContent] } { - set aFileEOL "\r\n" - set aList [split [regsub -all "\r\n" $aFileContent "\n"] "\r\n"] - } else { - # standard UNIX end-of-lines - set aFileEOL "\n" - set aList [split $aFileContent "\n"] - } - - return $aList -} - -# read content from theFilePath to raw text (with unix eol) -proc ReadFileToRawText {theFilePath} { - if {"$theFilePath" == "" || ![file exists $theFilePath]} { - return - } - - if { [catch {set aFile [open ${theFilePath} r]} aReason] } { - logerr "Error: cannot open file \"${theFilePath}\" for reading: $aReason" - return - } - - fconfigure $aFile -translation binary - set aFileContent [read $aFile] - close $aFile - - set aFileEOL "\r" - if [regexp "\r\n" $aFileContent] { - set aFileEOL "\r\n" - } elseif [regexp "\n" $aFileContent] { - set aFileEOL "\n" - } - - # convert to unix eol - if {"$aFileEOL" != "\n"} { - regsub -all {$aFileEOL} $aFileContent "\n" aFileContent - } - - return $aFileContent -} - -# auxiliary: saves content of "theData" list to "theFilePath" -proc SaveListToFile {theFilePath theData {theEOL "auto"}} { - set anUsedEol $theEOL - - if {"$anUsedEol" == ""} { - set anUsedEol "auto" - } - - # if the file exists and "eol choice" is "auto", detect the file eol - if {$anUsedEol == "auto" && [file exists $theFilePath]} { - if { [catch {set aFile [open ${theFilePath} r]} aReason] } { - logerr "Error: cannot open file \"${theFilePath}\" for reading: $aReason" - } else { - fconfigure $aFile -translation binary - set aFileContent [read $aFile] - close $aFile - - set anUsedEol "\r" - if [regexp "\r\n" $aFileContent] { - set anUsedEol "\r\n" - } elseif [regexp "\n" $aFileContent] { - set anUsedEol "\n" - } - } - } - - # write - if { [catch {set aFile [open ${theFilePath} w];} aReason] } { - logerr "Error: cannot open file \"${theFilePath}\" for writing: $aReason" - return - } - - fconfigure $aFile -translation binary - puts -nonewline $aFile [join $theData $anUsedEol] - close $aFile - - loginfo "File $theFilePath modified" -} - -# collect all subdirs of theBaseDir -proc CollectDirStructure {theBaseDir} { - set aDirs [glob -nocomplain -directory $theBaseDir -type d *] - - set aSubDirs {} - foreach aDir $aDirs { - foreach aSubDir [CollectDirStructure $aDir] { - lappend aSubDirs $aSubDir - } - } - - foreach aSubDir $aSubDirs { - lappend aDirs $aSubDir - } - - return $aDirs -} - -# check existence of theFileName file in several folders (theIncPaths) -proc SearchForFile {theIncPaths theFileName} { - foreach aPath $theIncPaths { - if {[file exists "${aPath}/${theFileName}"]} { - return true - } - } - - return false -} - -# auxiliary: parse the string to comment and not comment parts -# variable "_cmnt" should be created before using the operation, it will save comment part of line -# variable "_isMulti" should be created before the loop, equal to "false" if first line in the loop is not multi-comment line -proc _check_line { line } { - upvar _isMulti _isMulti - upvar _cmnt _cmnt - - set string_length [string length $line] - set c_b $string_length - set mc_b $string_length - set mc_e $string_length - regexp -indices {//} $line c_b - regexp -indices {/\*} $line mc_b - regexp -indices {\*/} $line mc_e - if {!${_isMulti}} { - if {[lindex $c_b 0] < [lindex $mc_b 0] && [lindex $c_b 0] < [lindex $mc_e 0]} { - set notComment_c [string range $line 0 [expr [lindex $c_b 0]-1]] - set Comment_c [string range $line [lindex $c_b 0] end] - set _cmnt $_cmnt$Comment_c - return $notComment_c - } elseif {[lindex $mc_b 0] < [lindex $c_b 0] && [lindex $mc_b 0] < [lindex $mc_e 0]} { - set _isMulti true - set _cmnt "${_cmnt}/*" - set notComment_mc [string range $line 0 [expr [lindex $mc_b 0]-1]] - set Comment_mc [string range $line [expr [lindex $mc_b 1]+1] end] - return [_check_line "${notComment_mc}[_check_line ${Comment_mc}]"] - } elseif {[lindex $mc_e 0] < [lindex $c_b 0] && [lindex $mc_e 0] < [lindex $mc_b 0]} { - set notComment_mc [string range $line [expr [lindex $mc_e 1]+1] end] - set Comment_mc [string range $line 0 [expr [lindex $mc_e 0]-1]] - set _cmnt "${_cmnt}${Comment_mc}*/" - set chk [_check_line ${notComment_mc}] - set _isMulti true - return $chk - } - } else { - if {[lindex $mc_e 0] < [lindex $mc_b 0]} { - set _isMulti false - set Comment_mc [string range $line 0 [lindex $mc_e 1]] - set notComment_mc [string range $line [expr [lindex $mc_e 1]+1] end] - set _cmnt $_cmnt$Comment_mc - return [_check_line $notComment_mc] - } elseif {[lindex $mc_b 0] < [lindex $mc_e 0] } { - set notComment_mc [string range $line 0 [expr [lindex $mc_b 0]-1]] - set Comment_mc [string range $line [expr [lindex $mc_b 1]+1] end] - set _cmnt "${_cmnt}/*" - set chk [_check_line "${notComment_mc}[_check_line ${Comment_mc}]"] - set _isMulti false - return $chk - } else { - set _cmnt $_cmnt$line - return "" - } - } - return $line -} - -# Create Tk-based logger which allows convenient consulting the upgrade process. -proc _create_logger {} { - if { [catch {winfo exists .h}] } { - logerr "Error: Tk commands are not available, cannot create UI!" - return - } - - if { ![winfo exists .h ] } { - toplevel .h - wm title .h "Conversion log" - wm geometry .h +320+200 - wm resizable .h 0 0 - - text .h.t -yscrollcommand {.h.sbar set} - scrollbar .h.sbar -orient vertical -command {.h.t yview} - - pack .h.sbar -side right -fill y - pack .h.t - } -} - -set LogFilePath "" - -# Puts the passed string into Tk-based logger highlighting it with the -# given color for better view. If no logger exists (-wlog option was not -# activated), the standard output is used. -proc _logcommon {theLogMessage {theMessageColor ""}} { - global LogFilePath - - if {"$LogFilePath" != ""} { - if { ! [catch {set aLogFile [open ${LogFilePath} a];} aReason] } { - set t [clock milliseconds] - set aTimeAndMessage [format "\[%s\] %s" \ - [clock format [expr {$t / 1000}] -format %T] \ - $theLogMessage \ - ] - - - puts $aLogFile $aTimeAndMessage - close $aLogFile - } else { - logerr "Error: cannot open $LogFilePath log file due to $aReason" - } - } - - if { ! [catch {winfo exists .h} res] && $res } { - .h.t insert end "$theLogMessage\n" - - if {$theLogMessage != ""} { - # We use the current number of lines to generate unique tag in the text - set aLineNb [lindex [split [.h.t index "end - 1 line"] "."] 0] - - .h.t tag add my_tag_$aLineNb end-2l end-1l - .h.t tag configure my_tag_$aLineNb -background $theMessageColor - } - - update - } else { - puts $theLogMessage - } -} - -# Puts information message to logger. -proc loginfo {a} { - _logcommon $a -} - -# Puts warning message to logger. -proc logwarn {a} { - _logcommon $a "pink" -} - -# Puts error message to logger. -proc logerr {a} { - _logcommon $a "red" -} diff --git a/adm/upgrade_sample_orig.dat b/adm/upgrade_sample_orig.dat deleted file mode 100644 index 96683c7e54..0000000000 --- a/adm/upgrade_sample_orig.dat +++ /dev/null @@ -1,67 +0,0 @@ -// This is sample C++ file intended for testing and verifyig automatic upgrade -// script. Copy it with extension .cxx and apply upgrade procedure to see -// the result, as follows: -// > upgrade.bat -src=./adm -inc=./src -recurse -all - -// Include of Geom_Line.hxx and Geom_Plane.hxx should be added below -#include - -//======================================================================== -// OCCT 7.0 -//======================================================================== - -//------------------------------------------------------------------------ -// Option -rtti -//------------------------------------------------------------------------ - -// Should be replaced by -#include - -class A_0 -{ -} - -class B_1 : -public A_0 -{ - // second argument "A_0" should be added - DEFINE_STANDARD_RTTI(B_1) -}; - -class C_2 : public Standard_Transient, B_1 -{ - // second argument "Standard_Transient" should be added - DEFINE_STANDARD_RTTI(C_2) -}; - -void for_rtti () -{ - Handle(Geom_Curve) aCurve = new Geom_Line (gp::Origin(), gp::DZ()); - Handle(Geom_Line) aLine = Handle(Geom_Line)::DownCast (aCurve); -} - -// should be removed -IMPLEMENT_DOWNCAST(A) -IMPLEMENT_STANDARD_RTTIEXT(A, B) - -//------------------------------------------------------------------------ -// Option -fwd -//------------------------------------------------------------------------ - -// force safe mode used for Qt objects -Q_OBJECT -slots: - -// these includes should be recognized as corresponding to forward declarations -#include - -// these declarations should be just removed -class Handle(TColStd_HArray1OfReal); - -// should be replaced by include of corresponding header -class TColStd_Array1OfReal; -class Handle(Geom_Curve); - -// check that trailing spaces at the following line are preserved -void ff(); - diff --git a/dox/build/build_occt/building_occt.md b/dox/build/build_occt/building_occt.md index 8180c85cb9..00036c3b39 100644 --- a/dox/build/build_occt/building_occt.md +++ b/dox/build/build_occt/building_occt.md @@ -287,125 +287,3 @@ Type "mingw32-make/make" with argument "install" to place the libraries to the i > mingw32-make install or > make install - -@section build_occt_genproj Building with Genproj tool - -**genproj** is a legacy tool (originated from command "wgenproj" in WOK) for generation of Visual Studio, Code::Blocks, Qt Creator (qmake), and XCode project files for building Open CASCADE Technology. -These project files are placed inside OCCT directory (in *adm* subfolder) and use relative paths, thus can be moved together with sources. -The project files included in official distribution of OCCT are generated by this tool. - -@note If you have official distribution with project files included, you can use them directly without a need to call **genproj**. - -**genproj** is a less flexible alternative to use of CMake build system (see @ref build_occt_win_cmake), but still has some small features useful for OCCT development. - -@subsection build_genproj Configuration process - -The environment is defined in the file *custom.sh* (on Linux and macOS) or *custom.bat* (on Windows) which can be edited directly: - -* `ARCH` -- architecture (32 or 64), affects only `PATH` variable for execution -* `HAVE_*` -- flags to enable or disable use of optional third-party products -* `CSF_OPT_*` -- paths to search for includes and binaries of all used third-party products -* `SHORTCUT_HEADERS` -- defines method for population of folder *inc* by header files. Supported methods are: - * *Copy* - headers will be copied from *src*; - * *ShortCut* - short-cut header files will be created, redirecting to same-named header located in *src*; - * *HardLink* - hard links to headers located in *src* will be created. -* `VCVER` -- specification of format of project files, defining also version of Visual Studio to be used, and default name of the sub-folder for binaries: -* Add paths to includes of used third-party libraries in variable `CSF_OPT_INC`. -* Add paths to their binary libraries in variable `CSF_OPT_LIB64`. -* For optional third-party libraries, set corresponding environment variable `HAVE_` to either *false*, e.g. `export HAVE_FREEIMAGE=false`. - -| VCVER | Visual Studio version | Windows Platform | Binaries folder name | -|-----------|-----------------------|----------------------------------|----------------------| -| vc10 | 2010 (10) | Desktop (Windows API) | vc10 | -| vc11 | 2012 (11) | Desktop (Windows API) | vc11 | -| vc12 | 2013 (12) | Desktop (Windows API) | vc12 | -| vc14 | 2015 (14) | Desktop (Windows API) | vc14 | -| vc14-uwp | 2015 (14) | UWP (Universal Windows Platform) | vc14-uwp | -| vc141 | 2017 (15) | Desktop (Windows API) | vc14 | -| vc141-uwp | 2017 (15) | UWP (Universal Windows Platform) | vc14-uwp | -| vc142 | 2019 (16) | Desktop (Windows API) | vc14 | -| vc142-uwp | 2019 (16) | UWP (Universal Windows Platform) | vc14-uwp | -| vc143 | 2022 (17) | Desktop (Windows API) | vc14 | - -Alternatively, you can launch **genconf**, a GUI tool allowing to configure build options interactively. -That tool will analyze your environment and propose you to choose available options: - -* Type and version of project files to generate (from the list of installed ones, detected by presence of environment variables like `VS100COMNTOOLS` on Windows platform). -* Method to populate folder *inc* (short-cuts by default). -* Location of third-party libraries (usually downloaded from OCCT web site, see above). -* Path to common directory where third-party libraries are located (optional). -* Paths to headers and binaries of the third-party libraries (found automatically basing on previous options; click button "Reset" to update). -* Generation of PDB files within Release build ("Release with Debug info", false by default). - -Below are screenshots of **genconf** tool on various platforms (Windows and Linux): -@figure{/build/build_occt/images/genconf_windows.png} -@figure{/build/build_occt/images/genconf_linux.png} - -Click "Save" to store the specified configuration in *custom.bat* (Windows) or *custom.sh* (other systems) file. - -@subsection build_genproj_generate Projects generation - -Launch **genproj** to update content of *inc* folder and generate project files after changes in OCCT code affecting layout or composition of source files. - -@note To use **genproj** and **genconf** tools you need to have Tcl installed and accessible by `PATH`. -If Tcl is not found, the tool may prompt you to enter the path to directory where Tcl can be found. - -~~~~ - $ genproj.bat -~~~~ - -Note that if *custom.bat* is not present, **genproj** will start **genconf** to configure environment. - -@subsection build_genproj_build Building - -@subsubsection build_msvc_build Visual Studio - -Launch *msvc.bat* to start Visual Studio with all necessary environment variables defined, and build the whole solution or required toolkits. - -The MSVC project files are located in folders adm\\msvc\\vc.... -Binaries are produced in *win32* or *win64* folders. - -To start DRAW, launch *draw.bat*. - -@subsubsection build_codeblocks_build Code::Blocks - -Code::Blocks is a cross-platform IDE which can be used for building OCCT on Linux, macOS and Windows platforms. -The generated Code::Blocks project could be found within subfolder *adm/<OS>/cbp*. - -To start **Code::Blocks**, launch script *codeblocks.sh*. -To build all toolkits, click **Build->Build workspace** in the menu bar. - -To start *DRAWEXE*, which has been built with **Code::Blocks** on Mac OS X, run the script -~~~~ - ./draw.sh cbp [d] -~~~~ -Option *d* is used if OCCT has been built in **Debug** mode. - -@subsubsection build_occt_macos_xcode XCode - -XCode is an IDE for development on macOS platform and targeting macOS and iOS platforms. -**genproj** tool comes with a legacy XCode project files generator, but CMake is a preferred way for building OCCT on macOS platform. - -To start **XCode**, launch script *xcode.sh*. -To build a certain toolkit, select it in **Scheme** drop-down list in XCode toolbar, press **Product** in the menu and click **Build** button. - -To build the entire OCCT: -* Create a new empty project (select **File -> New -> Project -> Empty project** in the menu; input the project name, e.g. *OCCT*; then click **Next** and **Create**). -* Drag and drop the *OCCT* folder in the created *OCCT* project in the Project navigator. -* Select **File -> New -> Target -> Aggregate** in the menu. -* Enter the project name (e.g. *OCCT*) and click **Finish**. The **Build Phases** tab will open. -* Click "+" button to add the necessary toolkits to the target project. It is possible to select all toolkits by pressing **Command+A** combination. - -To start *DRAWEXE*, which has been built with XCode on Mac OS X, perform the following steps: - -1.Open Terminal application -2.Enter ``: -~~~~ - cd \ -~~~~ -3.Run the script -~~~~ - ./draw.sh xcd [d] -~~~~ - -Option *d* is used if OCCT has been built in **Debug** mode. diff --git a/genconf b/genconf deleted file mode 100755 index 1801833524..0000000000 --- a/genconf +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/bash - -# Helper script to configure environment for genproj tool. -# Running it requires that Tcl should be in the PATH - -# initialize environment -aScriptPath=${BASH_SOURCE%/*}; if [ -d "${aScriptPath}" ]; then cd "$aScriptPath"; fi; aScriptPath="$PWD"; -if [ ! -e "${aScriptPath}/env.sh" ]; then - cat ${aScriptPath}/adm/templates/env.sh | sed -e '/__CASROOT__/d' > ${aScriptPath}/env.sh -fi - -if [ -e "${aScriptPath}/custom.sh" ]; then source "${aScriptPath}/custom.sh"; fi - -# run GUI tool -tclsh "${aScriptPath}/adm/genconf.tcl" diff --git a/genconf.bat b/genconf.bat deleted file mode 100644 index b6a0e7a344..0000000000 --- a/genconf.bat +++ /dev/null @@ -1,58 +0,0 @@ -@echo off - -rem Helper script to configure environment for building with genproj tool. -rem Running it requires that Tcl should be in the PATH - -SET "OLD_PATH=%PATH%" - -rem create env.bat if it does not exist yet -if not exist "%~dp0env.bat" ( - type "%~dp0adm\templates\env.bat" | findstr /i /v "__CASROOT__" > "%~dp0env.bat" -) -call "%~dp0env.bat" - -rem find Tcl -set "TCL_EXEC=tclsh.exe" -for %%X in (%TCL_EXEC%) do (set TCL_FOUND=%%~$PATH:X) - -set "TCL_EXEC2=tclsh86.exe" -if not defined TCL_FOUND ( - for %%X in (%TCL_EXEC2%) do ( - set TCL_FOUND=%%~$PATH:X - set TCL_EXEC=%TCL_EXEC2% - ) -) - -rem Prompt the user to specify location of Tcl if not found in PATH -if not defined TCL_FOUND ( - set /P TCL_PATH=This script requires Tcl, but tclsh.exe cannot be found in PATH.^ - -Please enter path to folder containing tclsh.exe^ - -^: - rem NOTE: KEEP LINE AFTER "set" ABOVE EMPTY ! -) - -if exist %TCL_PATH%\tclsh.exe ( - set "TCL_FOUND=%TCL_PATH%\tclsh.exe" -) else if exist %TCL_PATH%\tclsh86.exe ( - set "TCL_FOUND=%TCL_PATH%\tclsh86.exe" -) else ( - set "TCL_EXEC=%TCL_PATH%\tclsh.exe" -) - -rem Initialize custom.bat if it does not exist yet -rem if not exist %%dp0custom.bat ( -rem echo set "PATH=%%PATH%%;%TCL_PATH%" >%~dp0custom.bat -rem ) - -rem fail if Tcl is not found -if not defined TCL_FOUND ( - echo Error: "%TCL_EXEC%" is not found. Please update PATH variable ^(use custom.bat^) - goto :eof -) - -rem run GUI tool -"%TCL_FOUND%" %~dp0adm/genconf.tcl - -SET "PATH=%OLD_PATH%" diff --git a/genproj b/genproj deleted file mode 100755 index 123ffafdd6..0000000000 --- a/genproj +++ /dev/null @@ -1,47 +0,0 @@ -#!/bin/bash - -# Helper script to run generation of CBP/XCode projects on Linux / OS X. -# Running it requires that Tcl should be in the PATH - -anOldPath="$PATH" -anOldLd="$LD_LIBRARY_PATH" -anOldDyLd="$DYLD_LIBRARY_PATH" - -# go to the script directory -aScriptPath=${BASH_SOURCE%/*}; if [ -d "${aScriptPath}" ]; then cd "$aScriptPath"; fi; aScriptPath="$PWD"; -if [ ! -e "${aScriptPath}/env.sh" ]; then -cat ${aScriptPath}/adm/templates/env.sh | sed -e '/__CASROOT__/d' > ${aScriptPath}/env.sh -fi - -aSystem=`uname -s` -aTarget="$1" -anOpt2=$2 -anOpt3=$3 -anOpt4=$4 -anOpt5=$5 - -if [ ! -e "${aScriptPath}/custom.sh" ]; then - tclsh "${aScriptPath}/adm/genconf.tcl" -fi - -if [ ! -e "${aScriptPath}/custom.sh" ]; then - echo "Error: custom.sh is not present." - echo "Run the script again to generate custom.sh, or create it manually" - exit 1 -fi -source "${aScriptPath}/custom.sh" - -if [ -e "${aScriptPath}/env.sh" ]; then source "${aScriptPath}/env.sh"; fi - -if [ "$aTarget" == "" ]; then aTarget=$PRJFMT; fi; -if [ "$aTarget" == "" ]; then - aTarget="cbp" - if [ "$aSystem" == "Darwin" ]; then aTarget="xcd"; fi; -fi - -cd $aScriptPath -tclsh "./adm/start.tcl" genproj ${aTarget} -solution "OCCT" $anOpt2 $anOpt3 $anOpt4 $anOpt5 - -export PATH="$anOldPath" -export LD_LIBRARY_PATH="$anOldLd" -export DYLD_LIBRARY_PATH="$anOldDyLd" diff --git a/genproj.bat b/genproj.bat deleted file mode 100644 index 1198bd5ef0..0000000000 --- a/genproj.bat +++ /dev/null @@ -1,58 +0,0 @@ -@echo off - -rem Helper script to run generation of VS projects on Windows. -rem Running it requires that Tcl should be in the PATH -rem Optional arguments: Format OS -rem Format can be vc10, vc11, vc12, vc14, vc141, cbp, or xcd -rem OS can be wnt, uwp, mac, or lin - -SET "OLD_PATH=%PATH%" - -rem run GUI configurator if custom.bat is missing -if not exist "%~dp0custom.bat" ( - call %~dp0genconf.bat -) - -if not exist "%~dp0custom.bat" ( - echo Error: custom.bat is not present. - echo Run the script again to generate custom.bat, or create it manually - goto :eof -) - -if exist "%~dp0env.bat" ( - call "%~dp0env.bat" %1 -) - -rem find Tcl -set "TCL_EXEC=tclsh.exe" -for %%X in (%TCL_EXEC%) do (set TCL_FOUND=%%~$PATH:X) - -set "TCL_EXEC2=tclsh86.exe" -if not defined TCL_FOUND ( - for %%X in (%TCL_EXEC2%) do ( - set TCL_FOUND=%%~$PATH:X - set TCL_EXEC=%TCL_EXEC2% - ) -) - -rem fail if Tcl is not found -if not defined TCL_FOUND ( - echo Error: "%TCL_EXEC%" is not found. Please update PATH variable ^(use custom.bat^) - goto :eof -) - -set aPlatform=%2 -if "%aPlatform%" == "" ( - set aPlatform=wnt - if "%VCPROP%" == "Universal" ( - set aPlatform=uwp - ) -) - -set aPrjFmt=%PRJFMT% -if "%aPrjFmt%" == "" ( set "aPrjFmt=vcxproj" ) -if "%aPrjFmt%" == "vcxproj" ( set "aPrjFmt=%VCFMT%" ) - -cd %~dp0 -%TCL_EXEC% %~dp0adm/start.tcl genproj %aPrjFmt% %aPlatform% -solution "OCCT" %3 %4 %5 -SET "PATH=%OLD_PATH%" diff --git a/upgrade.bat b/upgrade.bat deleted file mode 100644 index db3f6dc10b..0000000000 --- a/upgrade.bat +++ /dev/null @@ -1,23 +0,0 @@ -@echo off - -rem Helper script to run procedure of automatic upgrade of application code -rem on newer version of OCCT on Windows. -rem Running it requires that Tcl should be in the PATH - -SET "OLD_PATH=%PATH%" - -if exist "%~dp0env.bat" ( - call "%~dp0env.bat" -) - -set "TCL_EXEC=tclsh.exe" - -for %%X in (%TCL_EXEC%) do (set TCL_FOUND=%%~$PATH:X) - -if defined TCL_FOUND ( - %TCL_EXEC% %~dp0adm/start.tcl upgrade %* -) else ( - echo "Error. %TCL_EXEC% is not found. Please update PATH variable" -) - -SET "PATH=%OLD_PATH%" From 071f14697f536e83f45bd0b83d73d722435c213b Mon Sep 17 00:00:00 2001 From: dkulikov Date: Wed, 25 Sep 2024 08:57:29 +0000 Subject: [PATCH 616/639] 0027410: Data Exchange, Iges Import - Possible resource leak when parsing an invalid file fclose() call is added before early return statement in igesread() function. --- src/IGESFile/igesread.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/IGESFile/igesread.c b/src/IGESFile/igesread.c index f923514982..8867f07201 100644 --- a/src/IGESFile/igesread.c +++ b/src/IGESFile/igesread.c @@ -78,8 +78,12 @@ int igesread (char* nomfic, int lesect[6], int modefnes) str[0] = sects[i0]; IGESFile_Check2 (0,"XSTEP_18",numl,str); /* //gka 15 Sep 98: str instead of sects[i0]); */ } - - if (i0 == 0) return -1; + + if (i0 == 0) + { + fclose(lefic); + return -1; + } lesect[i0] ++; continue; } From d8a26498d25dcd76f6d5bc43c32f5e83bb0b7537 Mon Sep 17 00:00:00 2001 From: anv Date: Wed, 28 Aug 2024 04:23:16 +0100 Subject: [PATCH 617/639] 0033813: Data Exchange - Implementing common logic for scaling during Write procedure Implementation of common logic for OCCT formats. --- src/DE/DE_ConfigurationNode.hxx | 3 +- src/DE/DE_Wrapper.cxx | 5 ++- src/DEBRepCascade/DEBRepCascade_Provider.cxx | 12 ++++++ src/DEXCAFCascade/DEXCAFCascade_Provider.cxx | 8 ++++ .../IGESCAFControl_ConfigurationNode.cxx | 10 ----- .../IGESCAFControl_ConfigurationNode.hxx | 1 - .../IGESCAFControl_Provider.cxx | 38 +++++++++++++++---- src/IGESCAFControl/IGESCAFControl_Writer.cxx | 17 +++++++++ src/IGESCAFControl/IGESCAFControl_Writer.hxx | 5 +++ src/IGESData/IGESData_BasicEditor.cxx | 32 ++++++++++------ src/IGESData/IGESData_BasicEditor.hxx | 4 ++ src/RWGltf/RWGltf_Provider.cxx | 15 +++++++- src/RWObj/RWObj_Provider.cxx | 14 ++++++- src/RWPly/RWPly_Provider.cxx | 14 ++++++- src/RWStl/RWStl_Provider.cxx | 12 ++++++ .../STEPCAFControl_Provider.cxx | 36 ++++++++++++++---- src/Vrml/Vrml_Provider.cxx | 15 +++++++- tests/de_wrapper/configuration/A3 | 1 + tests/de_wrapper/configuration/A4 | 1 + tests/de_wrapper/gltf/A6 | 36 +++++++++--------- tests/de_wrapper/iges/A6 | 10 ++--- tests/de_wrapper/obj/A6 | 18 ++++----- tests/de_wrapper/step/A6 | 12 +++--- tests/de_wrapper/vrml/A6 | 2 +- 24 files changed, 234 insertions(+), 87 deletions(-) diff --git a/src/DE/DE_ConfigurationNode.hxx b/src/DE/DE_ConfigurationNode.hxx index 45b653338f..d424dc92fa 100644 --- a/src/DE/DE_ConfigurationNode.hxx +++ b/src/DE/DE_ConfigurationNode.hxx @@ -154,7 +154,8 @@ public: //!< Internal parameters for transfer process struct DE_SectionGlobal { - Standard_Real LengthUnit = 1.0; //!< Scale length unit value from MM, default 1.0 (MM) + Standard_Real LengthUnit = 1.0; //!< Target Unit (scaling based on MM) for the transfer process, default 1.0 (MM) + Standard_Real SystemUnit = 1.0; //!< System Unit (scaling based on MM) to be used when initial unit is unknown, default 1.0 (MM) } GlobalParameters; private: diff --git a/src/DE/DE_Wrapper.cxx b/src/DE/DE_Wrapper.cxx index 7a9531d490..54ced338db 100644 --- a/src/DE/DE_Wrapper.cxx +++ b/src/DE/DE_Wrapper.cxx @@ -290,6 +290,7 @@ Standard_Boolean DE_Wrapper::Load(const Handle(DE_ConfigurationContext)& theReso const Standard_Boolean theIsRecursive) { GlobalParameters.LengthUnit = theResource->RealVal("general.length.unit", GlobalParameters.LengthUnit, THE_CONFIGURATION_SCOPE()); + GlobalParameters.SystemUnit = theResource->RealVal("general.system.unit", GlobalParameters.SystemUnit, THE_CONFIGURATION_SCOPE()); if (theIsRecursive) { for (DE_ConfigurationFormatMap::Iterator aFormatIter(myConfiguration); @@ -372,8 +373,10 @@ TCollection_AsciiString DE_Wrapper::Save(const Standard_Boolean theIsRecursive, aResult += "\n"; } aResult += "!Global parameters. Used for all providers\n"; - aResult += "!Length scale unit value. Should be more the 0. Default value: 1.0(MM)\n"; + aResult += "!Length scale unit value. Should be more than 0. Default value: 1.0(MM)\n"; aResult += THE_CONFIGURATION_SCOPE() + ".general.length.unit :\t " + GlobalParameters.LengthUnit + "\n"; + aResult += "!System unit value. Should be more than 0. Default value: 1.0(MM)\n"; + aResult += THE_CONFIGURATION_SCOPE() + ".general.system.unit :\t " + GlobalParameters.SystemUnit + "\n"; if (theIsRecursive) { for (DE_ConfigurationFormatMap::Iterator aFormatIter(myConfiguration); diff --git a/src/DEBRepCascade/DEBRepCascade_Provider.cxx b/src/DEBRepCascade/DEBRepCascade_Provider.cxx index 200540e35e..6af321edc9 100644 --- a/src/DEBRepCascade/DEBRepCascade_Provider.cxx +++ b/src/DEBRepCascade/DEBRepCascade_Provider.cxx @@ -110,6 +110,13 @@ bool DEBRepCascade_Provider::Write(const TCollection_AsciiString& thePath, return false; } + Handle(DEBRepCascade_ConfigurationNode) aNode = Handle(DEBRepCascade_ConfigurationNode)::DownCast(GetNode()); + if (aNode->GlobalParameters.LengthUnit != 1.0) + { + Message::SendWarning() << "Warning in the DEBRepCascade_Provider during writing the file " << + thePath << "\t: Target Units for writing were changed, but current format doesn't support scaling"; + } + if (aLabels.Length() == 1) { aShape = aSTool->GetShape(aLabels.Value(1)); @@ -223,6 +230,11 @@ bool DEBRepCascade_Provider::Write(const TCollection_AsciiString& thePath, return false; } Handle(DEBRepCascade_ConfigurationNode) aNode = Handle(DEBRepCascade_ConfigurationNode)::DownCast(GetNode()); + if (aNode->GlobalParameters.LengthUnit != 1.0) + { + Message::SendWarning() << "Warning in the DEBRepCascade_Provider during writing the file " << + thePath << "\t: Target Units for writing were changed, but current format doesn't support scaling"; + } if (aNode->InternalParameters.WriteBinary) { if (aNode->InternalParameters.WriteVersionBin > static_cast(BinTools_FormatVersion_UPPER) || diff --git a/src/DEXCAFCascade/DEXCAFCascade_Provider.cxx b/src/DEXCAFCascade/DEXCAFCascade_Provider.cxx index cef6ceb014..6b8908580c 100644 --- a/src/DEXCAFCascade/DEXCAFCascade_Provider.cxx +++ b/src/DEXCAFCascade/DEXCAFCascade_Provider.cxx @@ -145,6 +145,14 @@ bool DEXCAFCascade_Provider::Write(const TCollection_AsciiString& thePath, { Handle(TDocStd_Application) anApp = new TDocStd_Application(); BinXCAFDrivers::DefineFormat(anApp); + + Handle(DEXCAFCascade_ConfigurationNode) aNode = Handle(DEXCAFCascade_ConfigurationNode)::DownCast(GetNode()); + if (aNode->GlobalParameters.LengthUnit != 1.0) + { + Message::SendWarning() << "Warning in the DEXCAFCascade_Provider during writing the file " << + thePath << "\t: Target Units for writing were changed, but current format doesn't support scaling"; + } + PCDM_StoreStatus aStatus = PCDM_SS_Doc_IsNull; if (!thePath.IsEmpty()) { diff --git a/src/IGESCAFControl/IGESCAFControl_ConfigurationNode.cxx b/src/IGESCAFControl/IGESCAFControl_ConfigurationNode.cxx index dff11a3de1..3a4217e703 100644 --- a/src/IGESCAFControl/IGESCAFControl_ConfigurationNode.cxx +++ b/src/IGESCAFControl/IGESCAFControl_ConfigurationNode.cxx @@ -96,8 +96,6 @@ bool IGESCAFControl_ConfigurationNode::Load(const Handle(DE_ConfigurationContext theResource->IntegerVal("write.brep.mode", InternalParameters.WriteBRepMode, aScope); InternalParameters.WriteConvertSurfaceMode = (WriteMode_ConvertSurface) theResource->IntegerVal("write.convertsurface.mode", InternalParameters.WriteConvertSurfaceMode, aScope); - InternalParameters.WriteUnit = (UnitsMethods_LengthUnit) - theResource->IntegerVal("write.unit", InternalParameters.WriteUnit, aScope); InternalParameters.WriteHeaderAuthor = theResource->StringVal("write.header.author", InternalParameters.WriteHeaderAuthor, aScope); InternalParameters.WriteHeaderCompany = @@ -272,14 +270,6 @@ TCollection_AsciiString IGESCAFControl_ConfigurationNode::Save() const aResult += aScope + "write.convertsurface.mode :\t " + InternalParameters.WriteConvertSurfaceMode + "\n"; aResult += "!\n"; - aResult += "!\n"; - aResult += "!Allows choosing the unit. The default unit for Open CASCADE Technology is \"MM\" (millimeter)."; - aResult += "You can choose to write a file into any unit accepted by IGES\n"; - aResult += "!Default value: MM(2). Available values: \"INCH\"(1), \"MM\"(2), \"??\"(3), \"FT\"(4), \"MI\"(5), "; - aResult += "\"M\"(6), \"KM\"(7), \"MIL\"(8), \"UM\"(9), \"CM\"(10), \"UIN\"(11)\n"; - aResult += aScope + "write.unit :\t " + InternalParameters.WriteUnit + "\n"; - aResult += "!\n"; - aResult += "!\n"; aResult += "!Gives the name of the author of the file\n"; aResult += "!Default value: {System name of the user}. Available values: \n"; diff --git a/src/IGESCAFControl/IGESCAFControl_ConfigurationNode.hxx b/src/IGESCAFControl/IGESCAFControl_ConfigurationNode.hxx index c3eafca60b..7549e13238 100644 --- a/src/IGESCAFControl/IGESCAFControl_ConfigurationNode.hxx +++ b/src/IGESCAFControl/IGESCAFControl_ConfigurationNode.hxx @@ -157,7 +157,6 @@ public: // Write WriteMode_BRep WriteBRepMode = WriteMode_BRep_Faces; //InternalParameters.WriteUnit, UnitsMethods_LengthUnit_Millimeter); - IGESCAFControl_Writer aWriter(theWS); + Standard_Integer aFlag = IGESData_BasicEditor::GetFlagByValue(aNode->GlobalParameters.LengthUnit); + IGESCAFControl_Writer aWriter(theWS, (aFlag > 0) ? IGESData_BasicEditor::UnitFlagName(aFlag) : "MM"); + IGESData_GlobalSection aGS = aWriter.Model()->GlobalSection(); + Standard_Real aScaleFactorMM = 1.; + Standard_Boolean aHasUnits = XCAFDoc_DocumentTool::GetLengthUnit(theDocument, aScaleFactorMM, UnitsMethods_LengthUnit_Millimeter); + if (aHasUnits) + { + aGS.SetCascadeUnit(aScaleFactorMM); + } + else + { + aGS.SetCascadeUnit(aNode->GlobalParameters.SystemUnit); + Message::SendWarning() << "Warning in the IGESCAFControl_Provider during writing the file " << + thePath << "\t: The document has no information on Units. Using global parameter as initial Unit."; + } + if (aFlag == 0) + { + aGS.SetScale(aNode->GlobalParameters.LengthUnit); + } + aWriter.Model()->SetGlobalSection(aGS); aWriter.SetColorMode(aNode->InternalParameters.WriteColor); aWriter.SetNameMode(aNode->InternalParameters.WriteName); aWriter.SetLayerMode(aNode->InternalParameters.WriteLayer); @@ -342,10 +358,16 @@ bool IGESCAFControl_Provider::Write(const TCollection_AsciiString& thePath, } Handle(IGESCAFControl_ConfigurationNode) aNode = Handle(IGESCAFControl_ConfigurationNode)::DownCast(GetNode()); initStatic(aNode); - TCollection_AsciiString aUnit(UnitsMethods::DumpLengthUnit(aNode->InternalParameters.WriteUnit)); - aUnit.UpperCase(); - IGESControl_Writer aWriter(aUnit.ToCString(), - aNode->InternalParameters.WriteBRepMode); + Standard_Integer aFlag = IGESData_BasicEditor::GetFlagByValue(aNode->GlobalParameters.LengthUnit); + IGESControl_Writer aWriter((aFlag > 0) ? IGESData_BasicEditor::UnitFlagName(aFlag) : "MM", + aNode->InternalParameters.WriteBRepMode); + IGESData_GlobalSection aGS = aWriter.Model()->GlobalSection(); + aGS.SetCascadeUnit(aNode->GlobalParameters.SystemUnit); + if (!aFlag) + { + aGS.SetScale(aNode->GlobalParameters.LengthUnit); + } + aWriter.Model()->SetGlobalSection(aGS); Standard_Boolean aIsOk = aWriter.AddShape(theShape); if (!aIsOk) { diff --git a/src/IGESCAFControl/IGESCAFControl_Writer.cxx b/src/IGESCAFControl/IGESCAFControl_Writer.cxx index 53059072c5..70677b193e 100644 --- a/src/IGESCAFControl/IGESCAFControl_Writer.cxx +++ b/src/IGESCAFControl/IGESCAFControl_Writer.cxx @@ -134,6 +134,23 @@ IGESCAFControl_Writer::IGESCAFControl_Writer (const Handle(XSControl_WorkSession // SetWS (WS,scratch); // this should be the only required command here } +//======================================================================= +//function : IGESCAFControl_Writer +//purpose : +//======================================================================= + +IGESCAFControl_Writer::IGESCAFControl_Writer(const Handle(XSControl_WorkSession)& WS, + const Standard_CString theUnit) + :IGESControl_Writer(theUnit) +{ + + WS->SetModel(Model()); + WS->SetMapWriter(TransferProcess()); + myColorMode = Standard_True; + myNameMode = Standard_True; + myLayerMode = Standard_True; +} + //======================================================================= //function : Transfer //purpose : diff --git a/src/IGESCAFControl/IGESCAFControl_Writer.hxx b/src/IGESCAFControl/IGESCAFControl_Writer.hxx index 3e4a9e0b52..56d6fe4a93 100644 --- a/src/IGESCAFControl/IGESCAFControl_Writer.hxx +++ b/src/IGESCAFControl/IGESCAFControl_Writer.hxx @@ -65,6 +65,11 @@ public: //! Creates a reader tool and attaches it to an already existing Session //! Clears the session if it was not yet set for IGES Standard_EXPORT IGESCAFControl_Writer(const Handle(XSControl_WorkSession)& WS, const Standard_Boolean scratch = Standard_True); + + //! Creates a reader tool and attaches it to an already existing Session + //! Clears the session if it was not yet set for IGES + //! Sets target Unit for the writing process. + Standard_EXPORT IGESCAFControl_Writer(const Handle(XSControl_WorkSession)& theWS, const Standard_CString theUnit); //! Transfers a document to a IGES model //! Returns True if translation is OK diff --git a/src/IGESData/IGESData_BasicEditor.cxx b/src/IGESData/IGESData_BasicEditor.cxx index d7b7bebd15..a4fc278714 100644 --- a/src/IGESData/IGESData_BasicEditor.cxx +++ b/src/IGESData/IGESData_BasicEditor.cxx @@ -92,17 +92,27 @@ void IGESData_BasicEditor::Init (const Handle(IGESData_IGESModel)& model, const //#73 rln 10.03.99 S4135: "read.scale.unit" does not affect GlobalSection //if (Interface_Static::IVal("read.scale.unit") == 1) vmm = vmm * 1000.; // vmm est exprime en MILLIMETRES - if (vmm >= 25. && vmm <= 26. ) return SetUnitFlag(1); - if (vmm >= 0.9 && vmm <= 1.1 ) return SetUnitFlag(2); - if (vmm >= 300. && vmm <= 310. ) return SetUnitFlag(4); - if (vmm >= 1600000. && vmm <= 1620000. ) return SetUnitFlag(5); - if (vmm >= 990. && vmm <= 1010. ) return SetUnitFlag(6); - if (vmm >= 990000. && vmm <= 1010000. ) return SetUnitFlag(7); - if (vmm >= 0.025 && vmm <= 0.026 ) return SetUnitFlag(8); - if (vmm >= 0.0009 && vmm <= 0.0011 ) return SetUnitFlag(9); - if (vmm >= 9. && vmm <= 11. ) return SetUnitFlag(10); - if (vmm >= 0.000025 && vmm <= 0.000026) return SetUnitFlag(11); - return Standard_False; + Standard_Integer aFlag = GetFlagByValue(vmm); + return (aFlag > 0) ? SetUnitFlag(aFlag) : Standard_False; +} + +//======================================================================= +//function : GetFlagByValue +//purpose : +//======================================================================= +Standard_Integer IGESData_BasicEditor::GetFlagByValue(const Standard_Real theValue) +{ + if (theValue >= 25. && theValue <= 26.) return 1; + if (theValue >= 0.9 && theValue <= 1.1) return 2; + if (theValue >= 300. && theValue <= 310.) return 4; + if (theValue >= 1600000. && theValue <= 1620000.) return 5; + if (theValue >= 990. && theValue <= 1010.) return 6; + if (theValue >= 990000. && theValue <= 1010000.) return 7; + if (theValue >= 0.025 && theValue <= 0.026) return 8; + if (theValue >= 0.0009 && theValue <= 0.0011) return 9; + if (theValue >= 9. && theValue <= 11.) return 10; + if (theValue >= 0.000025 && theValue <= 0.000026) return 11; + return 0; } //======================================================================= diff --git a/src/IGESData/IGESData_BasicEditor.hxx b/src/IGESData/IGESData_BasicEditor.hxx index 563b8c2b49..dbf7384bcb 100644 --- a/src/IGESData/IGESData_BasicEditor.hxx +++ b/src/IGESData/IGESData_BasicEditor.hxx @@ -131,6 +131,10 @@ public: //! Returns the maximum allowed value for Drafting Flag Standard_EXPORT static Standard_Integer DraftingMax(); + //! Returns Flag corresponding to the scaling theValue. + //! Returns 0 if there's no such flag. + Standard_EXPORT static Standard_Integer GetFlagByValue(const Standard_Real theValue); + diff --git a/src/RWGltf/RWGltf_Provider.cxx b/src/RWGltf/RWGltf_Provider.cxx index 1331011aeb..eeadfba355 100644 --- a/src/RWGltf/RWGltf_Provider.cxx +++ b/src/RWGltf/RWGltf_Provider.cxx @@ -140,9 +140,20 @@ bool RWGltf_Provider::Write(const TCollection_AsciiString& thePath, Handle(RWGltf_ConfigurationNode) aNode = Handle(RWGltf_ConfigurationNode)::DownCast(GetNode()); RWMesh_CoordinateSystemConverter aConverter; - aConverter.SetInputLengthUnit(aNode->GlobalParameters.LengthUnit / 1000); + Standard_Real aScaleFactorM = 1.; + if (!XCAFDoc_DocumentTool::GetLengthUnit(theDocument, aScaleFactorM)) + { + aConverter.SetInputLengthUnit(aNode->GlobalParameters.SystemUnit / 1000.); + Message::SendWarning() << "Warning in the RWGltf_Provider during writing the file " << + thePath << "\t: The document has no information on Units. Using global parameter as initial Unit."; + } aConverter.SetInputCoordinateSystem(aNode->InternalParameters.SystemCS); - aConverter.SetOutputLengthUnit(aNode->InternalParameters.FileLengthUnit); + if (aNode->GlobalParameters.LengthUnit != 1000.) + { + Message::SendWarning() << "Warning in the RWGltf_Provider during writing the file " << + thePath << "\t: Target format doesn't support custom units. Model will be scaled to Meters"; + } + aConverter.SetOutputLengthUnit(1.); // gltf units always Meters aConverter.SetOutputCoordinateSystem(aNode->InternalParameters.FileCS); TColStd_IndexedDataMapOfStringString aFileInfo; diff --git a/src/RWObj/RWObj_Provider.cxx b/src/RWObj/RWObj_Provider.cxx index 90435cbd21..aa6d986520 100644 --- a/src/RWObj/RWObj_Provider.cxx +++ b/src/RWObj/RWObj_Provider.cxx @@ -131,9 +131,19 @@ bool RWObj_Provider::Write(const TCollection_AsciiString& thePath, } RWMesh_CoordinateSystemConverter aConverter; - aConverter.SetInputLengthUnit(aNode->GlobalParameters.LengthUnit / 1000); + Standard_Real aScaleFactorMM = 1.; + if (XCAFDoc_DocumentTool::GetLengthUnit(theDocument, aScaleFactorMM, UnitsMethods_LengthUnit_Millimeter)) + { + aConverter.SetInputLengthUnit(aScaleFactorMM / 1000.); + } + else + { + aConverter.SetInputLengthUnit(aNode->GlobalParameters.SystemUnit / 1000.); + Message::SendWarning() << "Warning in the RWObj_Provider during writing the file " << + thePath << "\t: The document has no information on Units. Using global parameter as initial Unit."; + } aConverter.SetInputCoordinateSystem(aNode->InternalParameters.SystemCS); - aConverter.SetOutputLengthUnit(aNode->InternalParameters.FileLengthUnit); + aConverter.SetOutputLengthUnit(aNode->GlobalParameters.LengthUnit / 1000.); aConverter.SetOutputCoordinateSystem(aNode->InternalParameters.FileCS); RWObj_CafWriter aWriter(thePath); diff --git a/src/RWPly/RWPly_Provider.cxx b/src/RWPly/RWPly_Provider.cxx index 1f81de5bbc..bdabd37376 100644 --- a/src/RWPly/RWPly_Provider.cxx +++ b/src/RWPly/RWPly_Provider.cxx @@ -89,9 +89,19 @@ bool RWPly_Provider::Write(const TCollection_AsciiString& thePath, aFileInfo.Add("Comments", aNode->InternalParameters.WriteComment); } RWMesh_CoordinateSystemConverter aConverter; - aConverter.SetInputLengthUnit(aNode->GlobalParameters.LengthUnit / 1000); + Standard_Real aScaleFactorM = 1.; + if (XCAFDoc_DocumentTool::GetLengthUnit(theDocument, aScaleFactorM)) + { + aConverter.SetInputLengthUnit(aScaleFactorM); + } + else + { + aConverter.SetInputLengthUnit(aNode->GlobalParameters.SystemUnit / 1000.); + Message::SendWarning() << "Warning in the RWPly_Provider during writing the file " << + thePath << "\t: The document has no information on Units. Using global parameter as initial Unit."; + } aConverter.SetInputCoordinateSystem(aNode->InternalParameters.SystemCS); - aConverter.SetOutputLengthUnit(aNode->InternalParameters.FileLengthUnit); + aConverter.SetOutputLengthUnit(aNode->GlobalParameters.LengthUnit / 1000.); aConverter.SetOutputCoordinateSystem(aNode->InternalParameters.FileCS); RWPly_CafWriter aPlyCtx(thePath); diff --git a/src/RWStl/RWStl_Provider.cxx b/src/RWStl/RWStl_Provider.cxx index 8f862530b4..302c9b661d 100644 --- a/src/RWStl/RWStl_Provider.cxx +++ b/src/RWStl/RWStl_Provider.cxx @@ -110,6 +110,13 @@ bool RWStl_Provider::Write(const TCollection_AsciiString& thePath, return false; } + Handle(RWStl_ConfigurationNode) aNode = Handle(RWStl_ConfigurationNode)::DownCast(GetNode()); + if (aNode->GlobalParameters.LengthUnit != 1.0) + { + Message::SendWarning() << "Warning in the RWStl_Provider during writing the file " << + thePath << "\t: Target Units for writing were changed, but current format doesn't support scaling"; + } + if (aLabels.Length() == 1) { aShape = aSTool->GetShape(aLabels.Value(1)); @@ -220,6 +227,11 @@ bool RWStl_Provider::Write(const TCollection_AsciiString& thePath, return false; } Handle(RWStl_ConfigurationNode) aNode = Handle(RWStl_ConfigurationNode)::DownCast(GetNode()); + if (aNode->GlobalParameters.LengthUnit != 1.0) + { + Message::SendWarning() << "Warning in the RWStl_Provider during writing the file " << + thePath << "\t: Target Units for writing were changed, but current format doesn't support scaling"; + } StlAPI_Writer aWriter; aWriter.ASCIIMode() = aNode->InternalParameters.WriteAscii; diff --git a/src/STEPCAFControl/STEPCAFControl_Provider.cxx b/src/STEPCAFControl/STEPCAFControl_Provider.cxx index 969c54d220..354212e60c 100644 --- a/src/STEPCAFControl/STEPCAFControl_Provider.cxx +++ b/src/STEPCAFControl/STEPCAFControl_Provider.cxx @@ -110,10 +110,6 @@ bool STEPCAFControl_Provider::Write(const TCollection_AsciiString& thePath, return false; } Handle(STEPCAFControl_ConfigurationNode) aNode = Handle(STEPCAFControl_ConfigurationNode)::DownCast(GetNode()); - - XCAFDoc_DocumentTool::SetLengthUnit(theDocument, - UnitsMethods::GetLengthUnitScale(aNode->InternalParameters.WriteUnit, - UnitsMethods_LengthUnit_Millimeter), UnitsMethods_LengthUnit_Millimeter); personizeWS(theWS); STEPCAFControl_Writer aWriter; aWriter.Init(theWS); @@ -124,9 +120,22 @@ bool STEPCAFControl_Provider::Write(const TCollection_AsciiString& thePath, aWriter.SetNameMode(aNode->InternalParameters.WriteName); aWriter.SetLayerMode(aNode->InternalParameters.WriteLayer); aWriter.SetPropsMode(aNode->InternalParameters.WriteProps); - - TDF_Label aLabel; StepData_ConfParameters aParams; + Standard_Real aScaleFactorMM = 1.; + if (XCAFDoc_DocumentTool::GetLengthUnit(theDocument, aScaleFactorMM, UnitsMethods_LengthUnit_Millimeter)) + { + aModel->SetLocalLengthUnit(aScaleFactorMM); + } + else + { + aModel->SetLocalLengthUnit(aNode->GlobalParameters.SystemUnit); + Message::SendWarning() << "Warning in the STEPCAFControl_Provider during writing the file " << + thePath << "\t: The document has no information on Units. Using global parameter as initial Unit."; + } + UnitsMethods_LengthUnit aTargetUnit = UnitsMethods::GetLengthUnitByFactorValue(aNode->GlobalParameters.LengthUnit, UnitsMethods_LengthUnit_Millimeter); + aParams.WriteUnit = aTargetUnit; + aModel->SetWriteLengthUnit(aNode->GlobalParameters.LengthUnit); + TDF_Label aLabel; if (!aWriter.Transfer(theDocument, aParams, aMode, 0, theProgress)) { Message::SendFail() << "Error in the STEPCAFControl_Provider during writing the file " << @@ -242,9 +251,20 @@ bool STEPCAFControl_Provider::Write(const TCollection_AsciiString& thePath, STEPControl_Writer aWriter; aWriter.SetWS(theWS); IFSelect_ReturnStatus aWritestat = IFSelect_RetVoid; - Handle(StepData_StepModel) aModel = aWriter.Model(); - aModel->SetWriteLengthUnit(UnitsMethods::GetLengthUnitScale(aNode->InternalParameters.WriteUnit, UnitsMethods_LengthUnit_Millimeter)); + Handle(StepData_StepModel) aModel = aWriter.Model();; StepData_ConfParameters aParams; + aModel->SetLocalLengthUnit(aNode->GlobalParameters.SystemUnit); + UnitsMethods_LengthUnit aTargetUnit = UnitsMethods::GetLengthUnitByFactorValue(aNode->GlobalParameters.LengthUnit, UnitsMethods_LengthUnit_Millimeter); + aParams.WriteUnit = aTargetUnit; + if (aTargetUnit == UnitsMethods_LengthUnit_Undefined) + { + aModel->SetWriteLengthUnit(1.0); + Message::SendWarning() << "Custom units are not supported by STEP format, but LengthUnit global parameter doesn't fit any predefined unit. Units will be scaled to Millimeters"; + } + else + { + aModel->SetWriteLengthUnit(aNode->GlobalParameters.LengthUnit); + } aWritestat = aWriter.Transfer(theShape, aNode->InternalParameters.WriteModelType, aParams, true, theProgress); if (aWritestat != IFSelect_RetDone) { diff --git a/src/Vrml/Vrml_Provider.cxx b/src/Vrml/Vrml_Provider.cxx index 005af99a69..39527456dc 100644 --- a/src/Vrml/Vrml_Provider.cxx +++ b/src/Vrml/Vrml_Provider.cxx @@ -131,8 +131,19 @@ bool Vrml_Provider::Write(const TCollection_AsciiString& thePath, VrmlAPI_Writer aWriter; aWriter.SetRepresentation(static_cast(aNode->InternalParameters.WriteRepresentationType)); - Standard_Real aScaleFactorM = aNode->GlobalParameters.LengthUnit; - if (!aWriter.WriteDoc(theDocument, thePath.ToCString(), aScaleFactorM)) + Standard_Real aScaling = 1.; + Standard_Real aScaleFactorMM = 1.; + if (XCAFDoc_DocumentTool::GetLengthUnit(theDocument, aScaleFactorMM, UnitsMethods_LengthUnit_Millimeter)) + { + aScaling = aScaleFactorMM / aNode->GlobalParameters.LengthUnit; + } + else + { + aScaling = aNode->GlobalParameters.SystemUnit / aNode->GlobalParameters.LengthUnit; + Message::SendWarning() << "Warning in the Vrml_Provider during writing the file " << + thePath << "\t: The document has no information on Units. Using global parameter as initial Unit."; + } + if (!aWriter.WriteDoc(theDocument, thePath.ToCString(), aScaling)) { Message::SendFail() << "Error in the Vrml_Provider during wtiting the file " << thePath << "\t: File was not written"; diff --git a/tests/de_wrapper/configuration/A3 b/tests/de_wrapper/configuration/A3 index 61f2db99ce..babb2a3cfa 100644 --- a/tests/de_wrapper/configuration/A3 +++ b/tests/de_wrapper/configuration/A3 @@ -15,6 +15,7 @@ global.priority.XCAF : OCC global.priority.IGES : OCC global.priority.PLY : OCC global.general.length.unit : 1 +global.general.system.unit : 1 provider.STEP.OCC.read.iges.bspline.continuity : 1 provider.STEP.OCC.read.precision.mode : 0 provider.STEP.OCC.read.precision.val : 0.0001 diff --git a/tests/de_wrapper/configuration/A4 b/tests/de_wrapper/configuration/A4 index e760e2d546..3fb307dd90 100644 --- a/tests/de_wrapper/configuration/A4 +++ b/tests/de_wrapper/configuration/A4 @@ -15,6 +15,7 @@ global.priority.XCAF : OCC global.priority.IGES : OCC global.priority.PLY : OCC global.general.length.unit : 1 +global.general.system.unit : 1 provider.STEP.OCC.read.iges.bspline.continuity : 1 provider.STEP.OCC.read.precision.mode : 0 provider.STEP.OCC.read.precision.val : 0.0001 diff --git a/tests/de_wrapper/gltf/A6 b/tests/de_wrapper/gltf/A6 index ea78ba1bf1..7ea6cfcdab 100644 --- a/tests/de_wrapper/gltf/A6 +++ b/tests/de_wrapper/gltf/A6 @@ -20,15 +20,7 @@ if [catch {ReadGltf D0 $filename} catch_result] { } XGetOneShape S0 D0 -param xstep.cascade.unit M -if [catch {ReadGltf D1 $filename} catch_result] { - puts "Error : Problem with reading file" -} else { - puts "OK : Reading is correct" -} -XGetOneShape S1 D1 - -if [catch {WriteFile D0 $write_path -conf "provider.GLTF.OCC.file.length.unit : 0.001 "} catch_result] { +if [catch {WriteFile D0 $write_path -conf "global.general.length.unit : 1 "} catch_result] { puts "Error : Problem with writing file" } else { puts "OK : Writing is correct" @@ -50,41 +42,49 @@ if [catch {readfile S3 $write_path} catch_result] { puts "OK : Reading is correct" } -if [catch {WriteFile D1 $write_path -conf "provider.GLTF.OCC.file.length.unit : 1 "} catch_result] { +if [catch {WriteFile D0 $write_path -conf "global.general.length.unit : 1 "} catch_result] { puts "Error : Problem with writing file" } else { puts "OK : Writing is correct" } -if [catch {readfile S4 $write_path -conf "global.general.length.unit : 1000 "} catch_result] { +if [catch {ReadFile D6 $write_path -conf "global.general.length.unit : 1 "} catch_result] { + puts "Error : Problem with reading file" +} else { + puts "OK : Reading is correct" +} +XGetOneShape S6 D6 + +param xstep.cascade.unit M +if [catch {ReadGltf D1 $filename} catch_result] { puts "Error : Problem with reading file" } else { puts "OK : Reading is correct" } +XGetOneShape S1 D1 -if [catch {writefile S1 $write_path} catch_result] { +if [catch {WriteFile D1 $write_path -conf "global.general.length.unit : 1000 "} catch_result] { puts "Error : Problem with writing file" } else { puts "OK : Writing is correct" } -if [catch {readfile S5 $write_path} catch_result] { +if [catch {readfile S4 $write_path -conf "global.general.length.unit : 1000 "} catch_result] { puts "Error : Problem with reading file" } else { puts "OK : Reading is correct" } -if [catch {WriteFile D0 $write_path -conf "provider.GLTF.OCC.file.length.unit : 0.001 "} catch_result] { +if [catch {writefile S1 $write_path -conf "global.general.system.unit : 1000 "} catch_result] { puts "Error : Problem with writing file" } else { puts "OK : Writing is correct" } -if [catch {ReadFile D6 $write_path -conf "global.general.length.unit : 1 "} catch_result] { +if [catch {readfile S5 $write_path} catch_result] { puts "Error : Problem with reading file" } else { puts "OK : Reading is correct" } -XGetOneShape S6 D6 -if [catch {writefile S1 $write_path -conf "provider.GLTF.OCC.file.length.unit : 1 "} catch_result] { +if [catch {writefile S1 $write_path -conf "global.general.length.unit : 1000 \n global.general.system.unit : 1000 "} catch_result] { puts "Error : Problem with writing file" } else { puts "OK : Writing is correct" @@ -96,7 +96,7 @@ if [catch {ReadFile D7 $write_path -conf "global.general.length.unit : 1000 "} c } XGetOneShape S7 D7 -array set areas {0 3.18785e+06 1 3.18785 2 3.18785e+06 3 3.18785e+06 4 3.18785 5 3.18785 6 3.18785e+06 7 3.18785e-06} +array set areas {0 3.18785e+06 1 3.18785 2 3.18785e+06 3 3.18785e+06 4 3.18785 5 3.18785e+06 6 3.18785e+06 7 3.18785} array set results {0 S0 1 S1 2 S2 3 S3 4 S4 5 S5 6 S6 7 S7} for { set anind 0} { $anind < 8 } { incr anind } { checkprops $results($anind) -s $areas($anind) -eps 1e-2 diff --git a/tests/de_wrapper/iges/A6 b/tests/de_wrapper/iges/A6 index 8f8563f3a9..d41ed02628 100644 --- a/tests/de_wrapper/iges/A6 +++ b/tests/de_wrapper/iges/A6 @@ -28,7 +28,7 @@ if [catch {ReadIges D1 $filename } catch_result] { } XGetOneShape S1 D1 -if [catch {WriteFile D0 $write_path -conf "provider.IGES.write.iges.unit : 1 "} catch_result] { +if [catch {WriteFile D0 $write_path -conf "global.general.length.unit : 25.4 "} catch_result] { puts "Error : Problem with writing file" } else { puts "OK : Writing is correct" @@ -50,7 +50,7 @@ if [catch {readfile S3 $write_path} catch_result] { puts "OK : Reading is correct" } -if [catch {WriteFile D1 $write_path -conf "provider.IGES.write.iges.unit : 6 "} catch_result] { +if [catch {WriteFile D1 $write_path -conf "global.general.length.unit : 1000 "} catch_result] { puts "Error : Problem with writing file" } else { puts "OK : Writing is correct" @@ -72,7 +72,7 @@ if [catch {readfile S5 $write_path} catch_result] { puts "OK : Reading is correct" } -if [catch {WriteFile D0 $write_path -conf "provider.IGES.write.iges.unit : 2 "} catch_result] { +if [catch {WriteFile D0 $write_path -conf "global.general.length.unit : 1 "} catch_result] { puts "Error : Problem with writing file" } else { puts "OK : Writing is correct" @@ -84,7 +84,7 @@ if [catch {ReadFile D6 $write_path -conf "global.general.length.unit : 1 "} catc } XGetOneShape S6 D6 -if [catch {writefile S1 $write_path -conf "provider.IGES.write.iges.unit : 1 "} catch_result] { +if [catch {writefile S1 $write_path -conf "global.general.length.unit : 25.4 "} catch_result] { puts "Error : Problem with writing file" } else { puts "OK : Writing is correct" @@ -96,7 +96,7 @@ if [catch {ReadFile D7 $write_path -conf "global.general.length.unit : 0.0254 "} } XGetOneShape S7 D7 -array set areas {0 11995.4 1 0.0119954 2 47916.8 3 11979.2 4 0.0479168 5 0.0119792 6 47916.8 7 18.5678} +array set areas {0 11995.4 1 0.0119954 2 11979.2 3 11979.2 4 11979.2 5 0.0119792 6 11979.2 7 18.5678} array set results {0 S0 1 S1 2 S2 3 S3 4 S4 5 S5 6 S6 7 S7} for { set anind 0} { $anind < 8 } { incr anind } { checkprops $results($anind) -s $areas($anind) -eps 1e-2 diff --git a/tests/de_wrapper/obj/A6 b/tests/de_wrapper/obj/A6 index 975a597efa..02f94f35c3 100644 --- a/tests/de_wrapper/obj/A6 +++ b/tests/de_wrapper/obj/A6 @@ -28,12 +28,12 @@ if [catch {ReadObj D1 $filename -fileUnit mm } catch_result] { } XGetOneShape S1 D1 -if [catch {WriteFile D0 $write_path -conf "provider.OBJ.OCC.file.length.unit : 0.001 "} catch_result] { +if [catch {WriteFile D0 $write_path -conf "global.general.length.unit : 1 "} catch_result] { puts "Error : Problem with writing file" } else { puts "OK : Writing is correct" } -if [catch {readfile S2 $write_path} catch_result] { +if [catch {readfile S2 $write_path -conf "provider.OBJ.OCC.file.length.unit : 0.001 "} catch_result] { puts "Error : Problem with reading file" } else { puts "OK : Reading is correct" @@ -44,18 +44,18 @@ if [catch {writefile S0 $write_path} catch_result] { } else { puts "OK : Writing is correct" } -if [catch {readfile S3 $write_path} catch_result] { +if [catch {readfile S3 $write_path -conf "provider.OBJ.OCC.file.length.unit : 0.001 "} catch_result] { puts "Error : Problem with reading file" } else { puts "OK : Reading is correct" } -if [catch {WriteFile D1 $write_path -conf "provider.OBJ.OCC.file.length.unit : 1 "} catch_result] { +if [catch {WriteFile D1 $write_path -conf "global.general.length.unit : 1000 "} catch_result] { puts "Error : Problem with writing file" } else { puts "OK : Writing is correct" } -if [catch {readfile S4 $write_path -conf "global.general.length.unit : 1000 "} catch_result] { +if [catch {readfile S4 $write_path -conf "global.general.length.unit : 1000 \n provider.OBJ.OCC.file.length.unit : 1"} catch_result] { puts "Error : Problem with reading file" } else { puts "OK : Reading is correct" @@ -66,13 +66,13 @@ if [catch {writefile S1 $write_path} catch_result] { } else { puts "OK : Writing is correct" } -if [catch {readfile S5 $write_path} catch_result] { +if [catch {readfile S5 $write_path -conf "provider.OBJ.OCC.file.length.unit : 0.001 "} catch_result] { puts "Error : Problem with reading file" } else { puts "OK : Reading is correct" } -if [catch {WriteFile D0 $write_path -conf "provider.GLTF.OCC.file.length.unit : 0.001 "} catch_result] { +if [catch {WriteFile D0 $write_path -conf "global.general.length.unit : 1 "} catch_result] { puts "Error : Problem with writing file" } else { puts "OK : Writing is correct" @@ -84,12 +84,12 @@ if [catch {ReadFile D6 $write_path -conf "global.general.length.unit : 1 "} catc } XGetOneShape S6 D6 -if [catch {writefile S1 $write_path -conf "provider.GLTF.OCC.file.length.unit : 1 "} catch_result] { +if [catch {writefile S1 $write_path -conf "global.general.length.unit : 1000 "} catch_result] { puts "Error : Problem with writing file" } else { puts "OK : Writing is correct" } -if [catch {ReadFile D7 $write_path -conf "global.general.length.unit : 1000 "} catch_result] { +if [catch {ReadFile D7 $write_path -conf "global.general.length.unit : 1000 \n provider.OBJ.OCC.file.length.unit : 1"} catch_result] { puts "Error : Problem with reading file" } else { puts "OK : Reading is correct" diff --git a/tests/de_wrapper/step/A6 b/tests/de_wrapper/step/A6 index e7943453a5..d74af7fef7 100644 --- a/tests/de_wrapper/step/A6 +++ b/tests/de_wrapper/step/A6 @@ -30,7 +30,7 @@ XGetOneShape S1 D1 param xstep.cascade.unit MM -if [catch {WriteFile D0 $write_path -conf "provider.STEP.write.step.unit : 1 "} catch_result] { +if [catch {WriteFile D0 $write_path -conf "global.general.length.unit : 25.4 "} catch_result] { puts "Error : Problem with writing file" } else { puts "OK : Writing is correct" @@ -41,7 +41,7 @@ if [catch {readfile S2 $write_path } catch_result] { puts "OK : Reading is correct" } -if [catch {writefile S0 $write_path } catch_result] { +if [catch {writefile S0 $write_path -conf "global.general.system.unit : 1 "} catch_result] { puts "Error : Problem with writing file" } else { puts "OK : Writing is correct" @@ -52,7 +52,7 @@ if [catch {readfile S3 $write_path} catch_result] { puts "OK : Reading is correct" } -if [catch {WriteFile D1 $write_path -conf "provider.STEP.write.step.unit : 6 "} catch_result] { +if [catch {WriteFile D1 $write_path -conf "global.general.length.unit : 1000 "} catch_result] { puts "Error : Problem with writing file" } else { puts "OK : Writing is correct" @@ -74,7 +74,7 @@ if [catch {readfile S5 $write_path} catch_result] { puts "OK : Reading is correct" } -if [catch {WriteFile D0 $write_path -conf "provider.STEP.write.step.unit : 2 "} catch_result] { +if [catch {WriteFile D0 $write_path -conf "global.general.length.unit : 1 "} catch_result] { puts "Error : Problem with writing file" } else { puts "OK : Writing is correct" @@ -86,7 +86,7 @@ if [catch {ReadFile D6 $write_path -conf "global.general.length.unit : 1 "} catc } XGetOneShape S6 D6 -if [catch {writefile S1 $write_path -conf "provider.STEP.write.step.unit : 1 "} catch_result] { +if [catch {writefile S1 $write_path -conf "global.general.length.unit : 25.4 "} catch_result] { puts "Error : Problem with writing file" } else { puts "OK : Writing is correct" @@ -98,7 +98,7 @@ if [catch {ReadFile D7 $write_path -conf "global.general.length.unit : 0.0254"} } XGetOneShape S7 D7 -array set areas {0 2.52381e+06 1 2.52381 2 2.52381e+06 3 2.52381e+06 4 2.52381 5 2.52381 6 2.52381e+06 7 3911.92} +array set areas {0 2.52381e+06 1 2.52381 2 2.52381e+06 3 2.52381e+06 4 2.52381e+06 5 2.52381 6 2.52381e+06 7 3911.92} array set results {0 S0 1 S1 2 S2 3 S3 4 S4 5 S5 6 S6 7 S7} for { set anind 0} { $anind < 8 } { incr anind } { checkprops $results($anind) -s $areas($anind) -eps 1e-2 diff --git a/tests/de_wrapper/vrml/A6 b/tests/de_wrapper/vrml/A6 index 449b313526..38501aa6fa 100644 --- a/tests/de_wrapper/vrml/A6 +++ b/tests/de_wrapper/vrml/A6 @@ -98,7 +98,7 @@ if [catch {ReadFile D7 $write_path -conf "provider.VRML.OCC.read.file.unit : 0.0 } XGetOneShape S7 D7 -array set areas {0 5.3415e+06 1 5.3415 2 5.3415e+06 3 5.3415e+06 4 5.3415 5 5.3415 6 5.3415e+06 7 5.3415e-06} +array set areas {0 5.3415e+06 1 5.3415 2 5.3415e+06 3 5.3415e+06 4 5.3415e+06 5 5.3415 6 5.3415e+06 7 5.3415e-06} array set results {0 S0 1 S1 2 S2 3 S3 4 S4 5 S5 6 S6 7 S7} for { set anind 0} { $anind < 8 } { incr anind } { checkprops $results($anind) -s $areas($anind) -eps 1e-2 From b0922ff9a12f5aa408cc54c12a5cf1cadcfa37eb Mon Sep 17 00:00:00 2001 From: jfa Date: Tue, 17 Sep 2024 17:51:36 +0100 Subject: [PATCH 618/639] 0033828: Modeling Algorithms - GCPnts_QuasiUniformDeflection returns very different results under small change in deflection --- src/GCPnts/GCPnts_QuasiUniformDeflection.cxx | 36 +++++++++++++++++--- tests/bugs/moddata_3/bug33828 | 35 +++++++++++++++++++ 2 files changed, 66 insertions(+), 5 deletions(-) create mode 100644 tests/bugs/moddata_3/bug33828 diff --git a/src/GCPnts/GCPnts_QuasiUniformDeflection.cxx b/src/GCPnts/GCPnts_QuasiUniformDeflection.cxx index fd357bfbc6..78a66eac80 100644 --- a/src/GCPnts/GCPnts_QuasiUniformDeflection.cxx +++ b/src/GCPnts/GCPnts_QuasiUniformDeflection.cxx @@ -103,29 +103,55 @@ static void QuasiFleche (const TheCurve& theC, aVdelta = theVfin; } + // square length of chord const Standard_Real aNorme = gp_Vec (thePdeb, aPdelta).SquareMagnitude(); Standard_Real aFleche = 0.0; Standard_Boolean isFlecheOk = Standard_False; - if (aNorme > theEps) + if (aNorme > theEps && aNorme > 16. * theDeflection2) { // Evaluation de la fleche par interpolation . Voir IntWalk_IWalking_5.gxx Standard_Real N1 = theVdeb.SquareMagnitude(); Standard_Real N2 = aVdelta.SquareMagnitude(); if (N1 > theEps && N2 > theEps) { + // square distance between ends of two normalized vectors [0; 4] Standard_Real aNormediff = (theVdeb.Normalized().XYZ() - aVdelta.Normalized().XYZ()).SquareModulus(); if (aNormediff > theEps) { aFleche = aNormediff * aNorme / 64.0; + // So, fleche <= (aNorme / 16), independently of Vdeb and Vdelta. + // And if (aNorme / 16) < theDeflection2, this approach gives + // fleche < theDeflection2 independently of real curve. + // That is why we exclude case aNorme < (16. * theDeflection2) isFlecheOk = Standard_True; } } } - if (!isFlecheOk) + + gp_Pnt aPmid ((thePdeb.XYZ() + aPdelta.XYZ()) * 0.5); + gp_Pnt aPverif (Value (theC, theUdeb + aUdelta * 0.5)); + Standard_Real aFlecheMidMid = aPmid.SquareDistance (aPverif); + + if (isFlecheOk) + { + // Algorithm, evaluating "fleche" by interpolation, + // can give false-positive result. + // So we check also distance between Pmid and Pverif (aFlecheMidMid). + // But aFlecheMidMid gives worse result in case of non-uniform parameterisation. + // Maximum aFlecheMidMid, that seems reasonable, is (chord/2)^2 + theDeflection2 + // .---------------.Pverif . + // | | | Deflection + // ._______. ______. . + // Pdeb Pmid Pdelta + if (aFlecheMidMid > aNorme/4. + theDeflection2) + //if (aFlecheMidMid > aNorme/4.) + { + aFleche = aFlecheMidMid; + } + } + else { - gp_Pnt aPmid ((thePdeb.XYZ() + aPdelta.XYZ()) * 0.5); - gp_Pnt aPverif (Value (theC, theUdeb + aUdelta * 0.5)); - aFleche = aPmid.SquareDistance (aPverif); + aFleche = aFlecheMidMid; } if (aFleche < theDeflection2) diff --git a/tests/bugs/moddata_3/bug33828 b/tests/bugs/moddata_3/bug33828 new file mode 100644 index 0000000000..9dbdf6a337 --- /dev/null +++ b/tests/bugs/moddata_3/bug33828 @@ -0,0 +1,35 @@ +puts "===========================================================" +puts "0033828: Modeling Data - GCPnts_QuasiUniformDeflection" +puts "returns very different results under small change in deflection" +puts "===========================================================" + +proc check_crvpoints {cc deflection nb_expected} { + upvar ${cc} ${cc} + + set str1 "Nb points +: +(\[-0-9.+eE\]+)\n" + set str2 "Max defl: +(\[-0-9.+eE\]+) +(\[-0-9.+eE\]+) +(\[-0-9.+eE\]+) +(\[-0-9.+eE\]+)" + + set info [crvpoints r ${cc} ${deflection}] + regexp "${str1}${str2}" ${info} full Nb dmax ufmax ulmax i + + if { ${Nb} != ${nb_expected} } { + puts "Error : bad value of Nb points = ${Nb}, expected ${nb_expected}" + } + + if { ${dmax} > ${deflection} } { + puts "Error : bad value of maximum deflection = ${dmax}, expected < ${deflection}" + } +} + +bsplinecurve cu 3 7 0 4 0.17 2 0.33 2 0.5 2 0.67 2 0.83 2 1 4 0.163 0.233 0 1 0.158 0.204 0 1 0.139 0.180 0 1 0.086 0.159 0 1 0.055 0.163 0 1 0.009 0.196 0 1 -0.004 0.225 0 1 0.002 0.281 0 1 0.019 0.307 0 1 0.070 0.332 0 1 0.101 0.331 0 1 0.149 0.301 0 1 0.164 0.274 0 1 0.163 0.246 0 1 + +check_crvpoints cu .5 2 +check_crvpoints cu .1 3 +check_crvpoints cu .05 5 +check_crvpoints cu .025 5 +check_crvpoints cu .007 9 +check_crvpoints cu .005 17 +check_crvpoints cu .0005 33 +check_crvpoints cu .0003 65 +check_crvpoints cu .0002 65 +check_crvpoints cu .0001 73 From aa7c38d60e5216b1cba1cf02cc1d924c435e8b03 Mon Sep 17 00:00:00 2001 From: dpasukhi Date: Thu, 26 Sep 2024 15:20:08 +0000 Subject: [PATCH 619/639] Documentation - Update the main ReadMe #81 ReadMe was moved to markdown format. Updated a links to the resources --- README.md | 63 ++++++++++++++++++++++++++++++++++++++ README.txt | 89 ------------------------------------------------------ 2 files changed, 63 insertions(+), 89 deletions(-) create mode 100644 README.md delete mode 100644 README.txt diff --git a/README.md b/README.md new file mode 100644 index 0000000000..a3275acbb3 --- /dev/null +++ b/README.md @@ -0,0 +1,63 @@ +# Open CASCADE Technology + +Open CASCADE Technology (OCCT) is a software development platform providing services for 3D surface and solid modeling, CAD data exchange, and visualization. Most of OCCT functionality is available in the form of C++ libraries. OCCT is ideal for developing software dealing with 3D modeling (CAD), manufacturing/measuring (CAM), or numerical simulation (CAE). + +## License + +Open CASCADE Technology 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 a special exception defined in the file `OCCT_LGPL_EXCEPTION.txt`. Consult the file `LICENSE_LGPL_21.txt` included in the OCCT distribution for the complete text of the license. + +Alternatively, Open CASCADE Technology may be used under the terms of the Open CASCADE commercial license or a contractual agreement. + +**Note:** Open CASCADE Technology is provided on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND. The entire risk related to any use of the OCCT code and materials is on you. See the license text for a formal disclaimer. + +## Packaging + +You can receive certified versions of OCCT code in different packages: + +- **Snapshot of Git repository:** Contains C++ header and source files of OCCT, documentation sources, build scripts, and CMake project files. +- **Complete source archive:** Contains all sources of OCCT, generated HTML and PDF documentation, and ready-to-use projects for building on all officially supported platforms. +- **Binary package (platform-specific):** In addition to the complete source archive, it includes binaries of OCCT and third-party libraries built on one platform. This package allows using OCCT immediately after installation. + +Certified versions of OCCT can be downloaded from: +- [Open CASCADE Releases](https://dev.opencascade.org/release) +- [GitHub Releases](https://github.com/Open-Cascade-SAS/OCCT/releases) + +You can also find OCCT pre-installed on your system or install it from packages provided by a third party. Note that packaging and functionality of such versions can be different from certified releases. Please consult the documentation accompanying your version for details. + +## Documentation + +Documentation is available at the following links: +- [Latest version](https://dev.opencascade.org/doc/overview) +- [Version 7.7](https://dev.opencascade.org/doc/occt-7.7.0/overview) + +Documentation can be part of the package. To preview documentation as part of the package, open the file `doc/html/index.html` to browse HTML documentation. + +If HTML documentation is not available in your package, you can: + +- **Generate it from sources:** You need to have Tcl and Doxygen 1.8.4 (or above) installed on your system and accessible in your environment (check the environment variable PATH). Use the batch file `gendoc.bat` on Windows or the Bash script `gendoc` on Linux or OS X to (re)generate documentation. +- **Read documentation in source plain text (Markdown) format** found in the subfolder `dox`. + +See `dox/dev_guides/documentation/documentation.md` or [Building Documentation](https://dev.opencascade.org/doc/occt-7.7.0/overview/html/build_upgrade__building_documentation.html) for details. + +## Building + +In most cases, you need to rebuild OCCT on your platform (OS, compiler) before using it in your project to ensure binary compatibility. + +Consult the file `dox/dev_guides/building/building.md` or [Building OCCT](https://dev.opencascade.org/doc/overview/html/build_upgrade__building_occt.html) for instructions on building OCCT from sources on supported platforms. + +## Version + +The current version of OCCT can be found in the file `src/Standard/Standard_Version.hxx`. + +## Development + +### Bug Tracker +- [GitHub Issues](https://github.com/Open-Cascade-SAS/OCCT/issues) +- [OCCT Tracker](https://tracker.dev.opencascade.org/) + +For information regarding OCCT code development, please consult the official OCCT Collaborative Development Portal: +- [OCCT Development Portal](http://dev.opencascade.org) + +### Forum and Discussions +- [OCCT Forums](https://dev.opencascade.org/forums) +- [GitHub Discussions](https://github.com/Open-Cascade-SAS/OCCT/discussions) \ No newline at end of file diff --git a/README.txt b/README.txt deleted file mode 100644 index c8aec1cd24..0000000000 --- a/README.txt +++ /dev/null @@ -1,89 +0,0 @@ -Open CASCADE Technology -======================= - -This directory contains sources of Open CASCADE Technology (OCCT), a software -development platform providing services for 3D surface and solid modeling, CAD -data exchange, and visualization. Most of OCCT functionality is available in -the form of C++ libraries. OCCT can be best applied in development of software -dealing with 3D modeling (CAD), manufacturing / measuring (CAM) or numerical -simulation (CAE). - -License -------- - -Open CASCADE Technology is free software; you can redistribute it and / or -modify it under the terms of the GNU Lesser General Public version 2.1 as -published 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. - -Alternatively, Open CASCADE Technology may be used under the terms of Open -CASCADE commercial license or contractual agreement. - -Note that Open CASCADE Technology is provided on an "AS IS" basis, WITHOUT -WARRANTY OF ANY KIND. The entire risk related to any use of the OCCT code and -materials is on you. See the license text for formal disclaimer. - -Packaging ---------- - -You can receive certified version of OCCT code in different packages. - -- Snapshot of Git repository: contains C++ header and source files of OCCT, - documentation sources, build scripts, and CMake project files. - -- Complete source archive: contains all sources of OCCT, generated HTML and PDF - documentation, and ready-to-use projects for building on all officially - supported platforms. - -- Binary package (platform-specific): in addition to complete source archive, - it includes binaries of OCCT and third-party libraries built on one platform. - This package allows using OCCT immediately after installation. - -Certified versions of OCCT can be downloaded from http://www.opencascade.com - -You can also find OCCT pre-installed on your system, or install it from -packages provided by a third party. Note that packaging and functionality -of such versions can be different from certified releases. Please consult -documentation accompanying your version for details. - -Documentation -------------- - -Open file doc/html/index.html to browse HTML documentation. - -If HTML documentation is not available in your package, you can: - -- Generate it from sources. - - You need to have Tcl and Doxygen 1.8.4 (or above) installed on your system. - and accessible in your environment (check environment variable PATH). - Use batch file *gendoc.bat* on Windows or Bash script *gendoc* on Linux - or OS X to (re)generate documentation. - -- Read documentation in source plain text (MarkDown) format found in - subfolder *dox* - -See *dox/dev_guides/documentation/documentation.md* for details. - -Building --------- - -In most cases you need to rebuild OCCT on your platform (OS, compiler) before -using it in your project, to ensure binary compatibility. - -Consult the file *dox/dev_guides/building/building.md* for instructions on -building OCCT from sources on supported platforms. - -Version -------- - -The current version of OCCT can be consulted in the file -*src/Standard/Standard_Version.hxx* - -Development ------------ - -For information regarding OCCT code development please consult the official -OCCT Collaborative Development Portal: -http://dev.opencascade.org From 50a7319b45dcc92b517db5dbfffd28dea0b96ca5 Mon Sep 17 00:00:00 2001 From: dpasukhi Date: Sat, 28 Sep 2024 15:54:21 +0000 Subject: [PATCH 620/639] Coding - GitIgnore update with .cache #84 Updated .gitignore --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index cab476190a..444031ba34 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,7 @@ # standard directories for derived files in CASROOT /.adm +/.cache /.vscode /lin /mac From ff15a5d1ab4038889e8501e23c5e4e67c16be10f Mon Sep 17 00:00:00 2001 From: dkulikov Date: Fri, 27 Sep 2024 14:14:57 +0000 Subject: [PATCH 621/639] 0033498: Data Exchange, Step Export - Meshed pretessellated geometry is skipped on write Processing of complex_triangulated_surface_set is added to STEPCAFControl_GDTProperty::GetTessellation(). Processing of tessellated_curve_set is refactored and moved to a separate function. Problems related to normals list are fixed in RWStepVisual_RWComplexTriangulatedSurfaceSet::WriteStep(): Normals list is now checked for nullptr. It is a valid situation that occurs when complex_triangulated_surface_set in STEP file has no normals. Traversing of normals list is performed in correct order. Previously rows and columns were switched, which led to crashes or incorrect data. --- ...Visual_RWComplexTriangulatedSurfaceSet.cxx | 21 +- .../STEPCAFControl_GDTProperty.cxx | 332 +++++++++++++++--- 2 files changed, 295 insertions(+), 58 deletions(-) diff --git a/src/RWStepVisual/RWStepVisual_RWComplexTriangulatedSurfaceSet.cxx b/src/RWStepVisual/RWStepVisual_RWComplexTriangulatedSurfaceSet.cxx index 0bd832d90a..ddf7af7495 100644 --- a/src/RWStepVisual/RWStepVisual_RWComplexTriangulatedSurfaceSet.cxx +++ b/src/RWStepVisual/RWStepVisual_RWComplexTriangulatedSurfaceSet.cxx @@ -180,16 +180,23 @@ void RWStepVisual_RWComplexTriangulatedSurfaceSet::WriteStep( theSW.Send(theEnt->Pnmax()); theSW.OpenSub(); - for (Standard_Integer i3 = 1; i3 <= theEnt->Normals()->RowLength(); i3++) + // According to "Recommended Practices Recommended Practices for 3D Tessellated Geometry", Release 1.1: + // "...The size of the list of normals may be: + // 0: no normals are defined..." + // In OCC this situation is reflected by nullptr normals container. + if (theEnt->NbNormals() != 0) { - theSW.NewLine(Standard_False); - theSW.OpenSub(); - for (Standard_Integer j3 = 1; j3 <= theEnt->Normals()->ColLength(); j3++) + for (Standard_Integer i3 = 1; i3 <= theEnt->Normals()->NbRows(); i3++) { - Standard_Real Var0 = theEnt->Normals()->Value(i3,j3); - theSW.Send(Var0); + theSW.NewLine(Standard_False); + theSW.OpenSub(); + for (Standard_Integer j3 = 1; j3 <= theEnt->Normals()->NbColumns(); j3++) + { + Standard_Real Var0 = theEnt->Normals()->Value(i3, j3); + theSW.Send(Var0); + } + theSW.CloseSub(); } - theSW.CloseSub(); } theSW.CloseSub(); diff --git a/src/STEPCAFControl/STEPCAFControl_GDTProperty.cxx b/src/STEPCAFControl/STEPCAFControl_GDTProperty.cxx index ba81e4bd98..8732c92216 100644 --- a/src/STEPCAFControl/STEPCAFControl_GDTProperty.cxx +++ b/src/STEPCAFControl/STEPCAFControl_GDTProperty.cxx @@ -29,13 +29,271 @@ #include #include #include +#include #include #include #include +#include #include #include #include +namespace +{ + //======================================================================= + //function : GenerateCoordinateList + //purpose : Generates a coordinate_list by filling it with coordinates + // of the nodes of theTriangulation. Each node will be + // transformed with theTransformation. + //======================================================================= + Handle(StepVisual_CoordinatesList) GenerateCoordinateList( + const Handle(Poly_Triangulation)& theTriangulation, + const gp_Trsf& theTransformation) + { + Handle(TColgp_HArray1OfXYZ) thePoints = new TColgp_HArray1OfXYZ(1, theTriangulation->NbNodes()); + for (Standard_Integer aNodeIndex = 1; aNodeIndex <= theTriangulation->NbNodes(); ++aNodeIndex) + { + const gp_Pnt aCurrentNode = theTriangulation->Node(aNodeIndex).Transformed(theTransformation); + thePoints->SetValue(aNodeIndex, aCurrentNode.XYZ()); + } + Handle(StepVisual_CoordinatesList) aCoordinatesList = new StepVisual_CoordinatesList; + aCoordinatesList->Init(new TCollection_HAsciiString(), thePoints); + return aCoordinatesList; + } + + //======================================================================= + //function : CountNormals + //purpose : Returns a number of normals that theTriangulation contains + // for the purpose of generating + // StepVisual_ComplexTriangulatedSurfaceSet. + // Possible outputs are: + // 0, if theTriangulation has no normals. + // 1, if all normals contained in theTriangulation are equal. + // Note that Poly_Triangulation supports only 2 options: + // either no normals or a normal assosciated with each node. + // So when source complex_triangulated_surface_set has just + // one normal, it will be just associated with every node in + // Poly_Triangulation. Return value of one indicates that + // that's what probably happen during reading. + // theTriangulation->NbNodes(), if each vertex has a unique + // node ossociated with it. + //======================================================================= + Standard_Integer CountNormals(const Handle(Poly_Triangulation)& theTriangulation) + { + if (!theTriangulation->HasNormals()) + { + return 0; + } + + // Function to compare normal coordinates values. + auto isEqual = [](const Standard_Real theVal1, const Standard_Real theVal2) + { + return std::abs(theVal1 - theVal2) < Precision::Confusion(); + }; + // Checking if all normals are equal. + const gp_Dir aReferenceNormal = theTriangulation->Normal(1); + for (Standard_Integer aNodeIndex = 1; aNodeIndex <= theTriangulation->NbNodes(); ++aNodeIndex) + { + const gp_Dir aCurrentNormal = theTriangulation->Normal(aNodeIndex); + if (!isEqual(aReferenceNormal.X(), aCurrentNormal.X()) + || !isEqual(aReferenceNormal.Y(), aCurrentNormal.Y()) + || !isEqual(aReferenceNormal.Z(), aCurrentNormal.Z())) + { + return theTriangulation->NbNodes(); + } + } + + // All normals were equal, so we can use just one normal. + return 1; + } + + //======================================================================= + //function : GenerateNormalsArray + //purpose : Generates array of normals from theTriangulation. Normals + // wiil be transformed with theTransformation. + // IMPORTANT: Output will be nullptr if theTriangulation has + // no normals. + //======================================================================= + Handle(TColStd_HArray2OfReal) GenerateNormalsArray( + const Handle(Poly_Triangulation)& theTriangulation, + const gp_Trsf& theTransformation) + { + const Standard_Integer aNormalCount = CountNormals(theTriangulation); + if (aNormalCount == 0) + { + return nullptr; + } + else if (aNormalCount == 1) + { + Handle(TColStd_HArray2OfReal) aNormals = new TColStd_HArray2OfReal(1, 1, 1, 3); + const gp_Dir aNormal = theTriangulation->Normal(1).Transformed(theTransformation); + aNormals->SetValue(1, 1, aNormal.X()); + aNormals->SetValue(1, 2, aNormal.Y()); + aNormals->SetValue(1, 3, aNormal.Z()); + return aNormals; + } + else + { + Handle(TColStd_HArray2OfReal) aNormals = + new TColStd_HArray2OfReal(1, theTriangulation->NbNodes(), 1, 3); + + for (Standard_Integer aNodeIndex = 1; aNodeIndex <= theTriangulation->NbNodes(); ++aNodeIndex) + { + const gp_Dir aCurrentNormal = + theTriangulation->Normal(aNodeIndex).Transformed(theTransformation); + aNormals->SetValue(aNodeIndex, 1, aCurrentNormal.X()); + aNormals->SetValue(aNodeIndex, 2, aCurrentNormal.Y()); + aNormals->SetValue(aNodeIndex, 3, aCurrentNormal.Z()); + } + return aNormals; + } + } + + //======================================================================= + //function : GenerateTriangleStrips + //purpose : Generates an array of triangle strips from theTriangulation. + // Since Poly_Triangulation doesn't support triangle strips, + // all triangles from it would just be imported as tringle + // strips of one triangle. + //======================================================================= + Handle(TColStd_HArray1OfTransient) GenerateTriangleStrips( + const Handle(Poly_Triangulation)& theTriangulation) + { + Handle(TColStd_HArray1OfTransient) aTriangleStrips = + new TColStd_HArray1OfTransient(1, theTriangulation->NbTriangles()); + for (Standard_Integer aTriangleIndex = 1; aTriangleIndex <= theTriangulation->NbTriangles(); + ++aTriangleIndex) + { + // Since Poly_Triangulation doesn't support triangle strips or triangle fans, + // we just write each thriangle as triangle strip. + const Poly_Triangle& aCurrentTriangle = theTriangulation->Triangle(aTriangleIndex); + Handle(TColStd_HArray1OfInteger) aTriangleStrip = new TColStd_HArray1OfInteger(1, 3); + aTriangleStrip->SetValue(1, aCurrentTriangle.Value(1)); + aTriangleStrip->SetValue(2, aCurrentTriangle.Value(2)); + aTriangleStrip->SetValue(3, aCurrentTriangle.Value(3)); + aTriangleStrips->SetValue(aTriangleIndex, aTriangleStrip); + } + return aTriangleStrips; + } + + //======================================================================= + //function : GenerateComplexTriangulatedSurfaceSet + //purpose : Generates complex_triangulated_surface_set from theFace. + // Returns nullptr if face has no triangulation. + //======================================================================= + Handle(StepVisual_ComplexTriangulatedSurfaceSet) GenerateComplexTriangulatedSurfaceSet( + const TopoDS_Face& theFace) + { + TopLoc_Location aFaceLoc; + const Handle(Poly_Triangulation) aTriangulation = BRep_Tool::Triangulation(theFace, aFaceLoc); + if (aTriangulation.IsNull()) + { + return nullptr; + } + const gp_Trsf aFaceTransform = aFaceLoc.Transformation(); + + // coordinates + Handle(StepVisual_CoordinatesList) aCoordinatesList = GenerateCoordinateList(aTriangulation, + aFaceTransform); + // pnmax + Standard_Integer aPnmax = aTriangulation->NbNodes(); + // normals + Handle(TColStd_HArray2OfReal) aNormals = GenerateNormalsArray(aTriangulation, aFaceTransform); + // pnindex + // From "Recommended Practices Recommended Practices for 3D Tessellated Geometry", Release 1.1: + // "pnindex is the table of indices of the points used in the definition of the triangles. + // It is an index to the coordinates_list. Its size may be: + // pnmax: this is the size of normals when each point has a normal. + // 0: no indirection." + // In our case there is no indirection, so it's always empty. + Handle(TColStd_HArray1OfInteger) aPnindex = new TColStd_HArray1OfInteger; + // triangle_strips + Handle(TColStd_HArray1OfTransient) aTriangleStrips = GenerateTriangleStrips(aTriangulation); + // triangle_fans + // All triangles were already written as triangle strips. + Handle(TColStd_HArray1OfTransient) aTriangleFans = new TColStd_HArray1OfTransient; + + // Initialization of complex_triangulated_surface_set. + Handle(StepVisual_ComplexTriangulatedSurfaceSet) aCTSS = + new StepVisual_ComplexTriangulatedSurfaceSet; + aCTSS->Init(new TCollection_HAsciiString(), + aCoordinatesList, + aPnmax, + aNormals, + aPnindex, + aTriangleStrips, + aTriangleFans); + return aCTSS; + } + + //======================================================================= + //function : GenerateTessellatedCurveSet + //purpose : Generates tesselated_curve_set from theShape. + // If no valid curves were found, return nullptr. + //======================================================================= + Handle(StepVisual_TessellatedCurveSet) GenerateTessellatedCurveSet(const TopoDS_Shape& theShape) + { + NCollection_Handle aLineStrips = + new StepVisual_VectorOfHSequenceOfInteger; + // Temporary contanier for points. We need points in TColgp_HArray1OfXYZ type of + // container, however in order to create it we need to know it's size. + // Currently number of points is unknown, so we will put all the points in a + // temporary container and then just copy them after all edges will be processed. + NCollection_Vector aTmpPointsContainer; + for (TopExp_Explorer aCurveIt(theShape, TopAbs_EDGE); aCurveIt.More(); aCurveIt.Next()) + { + // Find out type of edge curve + Standard_Real aFirstParam = 0, aLastParam = 0; + const Handle(Geom_Curve) anEdgeCurve = BRep_Tool::Curve(TopoDS::Edge(aCurveIt.Current()), + aFirstParam, + aLastParam); + if (anEdgeCurve.IsNull()) + { + continue; + } + Handle(TColStd_HSequenceOfInteger) aCurrentCurve = new TColStd_HSequenceOfInteger; + if (anEdgeCurve->IsKind(STANDARD_TYPE(Geom_Line))) // Line + { + for (TopExp_Explorer aVertIt(aCurveIt.Current(), TopAbs_VERTEX); aVertIt.More(); + aVertIt.Next()) + { + aTmpPointsContainer.Append(BRep_Tool::Pnt(TopoDS::Vertex(aVertIt.Current())).XYZ()); + aCurrentCurve->Append(aTmpPointsContainer.Size()); + } + } + else // BSpline + { + ShapeConstruct_Curve aSCC; + Handle(Geom_BSplineCurve) aBSCurve = + aSCC.ConvertToBSpline(anEdgeCurve, aFirstParam, aLastParam, Precision::Confusion()); + for (Standard_Integer aPoleIndex = 1; aPoleIndex <= aBSCurve->NbPoles(); ++aPoleIndex) + { + aTmpPointsContainer.Append(aBSCurve->Pole(aPoleIndex).XYZ()); + aCurrentCurve->Append(aTmpPointsContainer.Size()); + } + } + aLineStrips->Append(aCurrentCurve); + } + + if (aTmpPointsContainer.IsEmpty()) + { + return Handle(StepVisual_TessellatedCurveSet){}; + } + + Handle(TColgp_HArray1OfXYZ) aPoints = new TColgp_HArray1OfXYZ(1, aTmpPointsContainer.Size()); + for (Standard_Integer aPointIndex = 1; aPointIndex <= aPoints->Size(); ++aPointIndex) + { + aPoints->SetValue(aPointIndex, aTmpPointsContainer.Value(aPointIndex - 1)); + } + // STEP entities + Handle(StepVisual_CoordinatesList) aCoordinates = new StepVisual_CoordinatesList(); + aCoordinates->Init(new TCollection_HAsciiString(), aPoints); + Handle(StepVisual_TessellatedCurveSet) aTCS = new StepVisual_TessellatedCurveSet(); + aTCS->Init(new TCollection_HAsciiString(), aCoordinates, aLineStrips); + return aTCS; + } +} + //======================================================================= //function : STEPCAFControl_GDTProperty //purpose : @@ -1305,61 +1563,33 @@ Handle(TCollection_HAsciiString) STEPCAFControl_GDTProperty::GetTolValueType(con //======================================================================= //function : GetTessellation -//purpose : +//purpose : //======================================================================= -Handle(StepVisual_TessellatedGeometricSet) STEPCAFControl_GDTProperty::GetTessellation(const TopoDS_Shape& theShape) +Handle(StepVisual_TessellatedGeometricSet) STEPCAFControl_GDTProperty::GetTessellation( + const TopoDS_Shape& theShape) { - Handle(StepVisual_TessellatedGeometricSet) aGeomSet; - // Build coordinate list and curves - NCollection_Handle aCurves = new StepVisual_VectorOfHSequenceOfInteger; - NCollection_Vector aCoords; - Standard_Integer aPntNb = 1; - for (TopExp_Explorer aCurveIt(theShape, TopAbs_EDGE); aCurveIt.More(); aCurveIt.Next()) { - Handle(TColStd_HSequenceOfInteger) aCurve = new TColStd_HSequenceOfInteger; - // Find out type of edge curve - Standard_Real aFirst = 0, aLast = 0; - Handle(Geom_Curve) anEdgeCurve = BRep_Tool::Curve(TopoDS::Edge(aCurveIt.Current()), aFirst, aLast); - if (anEdgeCurve.IsNull()) - continue; - // Line - if (anEdgeCurve->IsKind(STANDARD_TYPE(Geom_Line))) { - for (TopExp_Explorer aVertIt(aCurveIt.Current(), TopAbs_VERTEX); aVertIt.More(); aVertIt.Next()) { - aCoords.Append(BRep_Tool::Pnt(TopoDS::Vertex(aVertIt.Current())).XYZ()); - aCurve->Append(aPntNb); - aPntNb++; - } - } - // BSpline - else { - ShapeConstruct_Curve aSCC; - Handle(Geom_BSplineCurve) aBSCurve = aSCC.ConvertToBSpline(anEdgeCurve, - aFirst, aLast, Precision::Confusion()); - for (Standard_Integer i = 1; i <= aBSCurve->NbPoles(); i++) { - aCoords.Append(aBSCurve->Pole(i).XYZ()); - aCurve->Append(aPntNb); - aPntNb++; - } - } - aCurves->Append(aCurve); - } - - if (!aCoords.Length()) + // Build complex_triangulated_surface_set. + std::vector aCTSSs; + for (TopExp_Explorer aFaceIt(theShape, TopAbs_FACE); aFaceIt.More(); aFaceIt.Next()) { - return aGeomSet; + const TopoDS_Face aFace = TopoDS::Face(aFaceIt.Current()); + aCTSSs.emplace_back(GenerateComplexTriangulatedSurfaceSet(aFace)); } - Handle(TColgp_HArray1OfXYZ) aPoints = new TColgp_HArray1OfXYZ(1, aCoords.Length()); - for (Standard_Integer i = 1; i <= aPoints->Length(); i++) { - aPoints->SetValue(i, aCoords.Value(i - 1)); + // Build tesselated_curve_set. + Handle(StepVisual_TessellatedCurveSet) aTCS = GenerateTessellatedCurveSet(theShape); + + // Fill the container of tesselated items. + NCollection_Handle aTesselatedItems = + new StepVisual_Array1OfTessellatedItem(1, static_cast(aCTSSs.size()) + 1); + aTesselatedItems->SetValue(1, aTCS); + for (size_t aCTSSIndex = 0; aCTSSIndex < aCTSSs.size(); ++aCTSSIndex) + { + aTesselatedItems->SetValue(static_cast(aCTSSIndex) + 2, aCTSSs[aCTSSIndex]); } - // STEP entities - Handle(StepVisual_CoordinatesList) aCoordList = new StepVisual_CoordinatesList(); - aCoordList->Init(new TCollection_HAsciiString(), aPoints); - Handle(StepVisual_TessellatedCurveSet) aCurveSet = new StepVisual_TessellatedCurveSet(); - aCurveSet->Init(new TCollection_HAsciiString(), aCoordList, aCurves); - NCollection_Handle aTessItems = new StepVisual_Array1OfTessellatedItem(1, 1); - aTessItems->SetValue(1, aCurveSet); - aGeomSet = new StepVisual_TessellatedGeometricSet(); - aGeomSet->Init(new TCollection_HAsciiString(), aTessItems); - return aGeomSet; + + // Build tessellated_geometric_set. + Handle(StepVisual_TessellatedGeometricSet) aTGS = new StepVisual_TessellatedGeometricSet(); + aTGS->Init(new TCollection_HAsciiString(), aTesselatedItems); + return aTGS; } From 6faeaa4b6200b626129d3700c4ccf2bccfcbbf3a Mon Sep 17 00:00:00 2001 From: dkulikov Date: Fri, 27 Sep 2024 17:17:55 +0000 Subject: [PATCH 622/639] Data Exchange, Step Export - Crash on PCurve processing #80 Crash in TopoDSToStep_MakeStepFace::Init() that occured due to attempt to copy null Geom2d_Curve is fixed. --- .../TopoDSToStep_MakeStepFace.cxx | 91 ++++--------------- 1 file changed, 17 insertions(+), 74 deletions(-) diff --git a/src/TopoDSToStep/TopoDSToStep_MakeStepFace.cxx b/src/TopoDSToStep/TopoDSToStep_MakeStepFace.cxx index 42fd2a9b90..55776f1fa2 100644 --- a/src/TopoDSToStep/TopoDSToStep_MakeStepFace.cxx +++ b/src/TopoDSToStep/TopoDSToStep_MakeStepFace.cxx @@ -98,7 +98,6 @@ TopoDSToStep_MakeStepFace::TopoDSToStep_MakeStepFace // Method : Init // Purpose : // ---------------------------------------------------------------------------- - void TopoDSToStep_MakeStepFace::Init(const TopoDS_Face& aFace, TopoDSToStep_Tool& aTool, const Handle(Transfer_FinderProcess)& FP, @@ -116,9 +115,8 @@ void TopoDSToStep_MakeStepFace::Init(const TopoDS_Face& aFace, new TransferBRep_ShapeMapper(aFace); // on ne sait jamais // [BEGIN] Processing non-manifold topology (another approach) (ssv; 10.11.2010) - Standard_Boolean isNMMode = - Handle(StepData_StepModel)::DownCast(FP->Model())->InternalParameters.WriteNonmanifold != 0; - if (isNMMode) { + if (Handle(StepData_StepModel)::DownCast(FP->Model())->InternalParameters.WriteNonmanifold != 0) + { Handle(StepShape_AdvancedFace) anAF; Handle(TransferBRep_ShapeMapper) aSTEPMapper = TransferBRep::ShapeMapper(FP, aFace); if ( FP->FindTypedTransient(aSTEPMapper, STANDARD_TYPE(StepShape_AdvancedFace), anAF) ) { @@ -144,10 +142,6 @@ void TopoDSToStep_MakeStepFace::Init(const TopoDS_Face& aFace, return; } - Standard_Integer i; - - //BRepAdaptor_Surface SA = BRepAdaptor_Surface(ForwardFace); - if (aFace.Orientation() == TopAbs_INTERNAL || aFace.Orientation() == TopAbs_EXTERNAL ) { FP->AddWarning(errShape, " Face from Non Manifold Topology"); @@ -159,13 +153,8 @@ void TopoDSToStep_MakeStepFace::Init(const TopoDS_Face& aFace, // ------------------ // Get the Outer Wire // ------------------ - const TopoDS_Wire theOuterWire = BRepTools::OuterWire(ForwardFace); - if (theOuterWire.IsNull()) { -#ifdef OCCT_DEBUG - std::cout<< "Warning : Face without wire not mapped"; -#endif FP->AddWarning(errShape, " Face without wire not mapped"); myError = TopoDSToStep_InfiniteFace; done = Standard_False; @@ -177,14 +166,9 @@ void TopoDSToStep_MakeStepFace::Init(const TopoDS_Face& aFace, // ----------------- // Translate Surface // ----------------- - Handle(Geom_Surface) Su = BRep_Tool::Surface(ForwardFace); - if (Su.IsNull()) { -#ifdef OCCT_DEBUG - std::cout << "Warning : Face without geometry not mapped"; -#endif FP->AddWarning(errShape, " Face without geometry not mapped"); myError = TopoDSToStep_FaceOther; done = Standard_False; @@ -198,14 +182,7 @@ void TopoDSToStep_MakeStepFace::Init(const TopoDS_Face& aFace, Handle(Geom_RectangularTrimmedSurface)::DownCast(Su); if (!aRTS.IsNull()) Su = aRTS->BasisSurface(); - //Handle(Geom_Surface) Su = SA.Surface().Surface(); - //Su = Handle(Geom_Surface)::DownCast(Su->Copy()); - //gp_Trsf Tr1 = SA.Trsf(); - //Su->Transform(Tr1); - // Surfaces with indirect Axes are already reversed -// (see TopoDSToStepAct_Actor) - //Standard_Boolean ReverseSurfaceOrientation = Standard_False; //szv#4:S4163:12Mar99 unused aTool.SetSurfaceReversed(Standard_False); GeomToStep_MakeSurface MkSurface(Su, theLocalFactors); @@ -249,7 +226,6 @@ void TopoDSToStep_MakeStepFace::Init(const TopoDS_Face& aFace, if (VL - VF - 2 * M_PI < -Precision::PConfusion()) BasisCurve = ShapeAlgo::AlgoContainer()->ConvertCurveToBSpline(BasisCurve, VF, VL, Precision::Approximation(), GeomAbs_C1, 100, 9); - //BasisCurve = new Geom_TrimmedCurve ( BasisCurve, VF, VL ); // create surface of revolution gp_Ax1 Axis = Ax3.Axis(); @@ -275,41 +251,26 @@ void TopoDSToStep_MakeStepFace::Init(const TopoDS_Face& aFace, // ---------------- // Translates Wires // ---------------- + Handle(StepShape_Loop) Loop; - Handle(StepShape_Loop) Loop; - Handle(StepShape_FaceBound) FaceBound; - TopoDSToStep_MakeStepWire MkWire; TColStd_SequenceOfTransient mySeq; // Initialize the Wire Explorer with the forward face - TopExp_Explorer WireExp; for (WireExp.Init(ForwardFace,TopAbs_WIRE);WireExp.More();WireExp.Next()) { const TopoDS_Wire CurrentWire = TopoDS::Wire(WireExp.Current()); if (!CurrentWire.IsNull()) { - - //szv#4:S4163:12Mar99 SGI warns - //TopoDS_Shape ssh = CurrentWire.Oriented(TopAbs_FORWARD); - //const TopoDS_Wire ForwardWire = TopoDS::Wire(ssh); - - //MkWire.Init(ForwardWire, aTool, FP); MkWire.Init(CurrentWire, aTool, FP, theLocalFactors); if (MkWire.IsDone()) Loop = Handle(StepShape_Loop)::DownCast(MkWire.Value()); else { -#ifdef OCCT_DEBUG - std::cout << TopoDSToStep::DecodeWireError(MkWire.Error())->String() << std::endl; -#endif FP->AddWarning(errShape, " a Wire not mapped"); continue; } } - //if (theOuterWire.IsEqual(CurrentWire)) - //FaceBound = new StepShape_FaceOuterBound(); - //else - FaceBound = new StepShape_FaceBound(); + Handle(StepShape_FaceBound) FaceBound = new StepShape_FaceBound(); // ---------------------------------------------------- // When the geometric normal of a Surface is reversed : @@ -343,44 +304,34 @@ void TopoDSToStep_MakeStepFace::Init(const TopoDS_Face& aFace, // ---------------------------------------- // Translate the Edge 2D Geometry (pcurves) // ---------------------------------------- - - if ( ! aTool.Faceted() && aTool.PCurveMode() != 0 ) { + if ( !aTool.Faceted() && aTool.PCurveMode() != 0 ) { TopExp_Explorer Ex(ForwardFace, TopAbs_EDGE); // ------------------------------------------------ // Exploration of all the Edges in the current face // ------------------------------------------------ - for (;Ex.More(); Ex.Next()) { TopoDS_Edge E = TopoDS::Edge(Ex.Current()); Standard_Real cf, cl; Handle(Geom2d_Curve) C2d = BRep_Tool::CurveOnSurface(E, ForwardFace, cf, cl); - - //CA = BRepAdaptor_Curve(E, ForwardFace); - //GeomAbs_CurveType typCOnS = CA.CurveOnSurface().GetCurve().GetType(); - - //if (typCOnS == GeomAbs_Line && BRep_Tool::Degenerated(E) ) { - if ( //:abv 26Jan00, CAX-IF TRJ3: C2d->IsKind(STANDARD_TYPE(Geom2d_Line)) && - BRep_Tool::Degenerated(E)) { - // The edge 2D Geometry degenerates in 3D - // The edge 2D geometry is not mapped onto any Step entity - // (ProStep agreement) - continue; - } - else { // Copy the Curve2d which might be changed - //C2d = CA.CurveOnSurface().GetCurve().Curve(); - //C2d = Handle(Geom2d_Curve)::DownCast(C2d->Copy()); - C2d = Handle(Geom2d_Curve)::DownCast(C2d->Copy()); + if (BRep_Tool::Degenerated(E) || C2d.IsNull()) + { + // The edge 2D Geometry degenerates in 3D + // The edge 2D geometry is not mapped onto any Step entity + // (ProStep agreement) + continue; } - + // Copy the Curve2d which might be changed + C2d = Handle(Geom2d_Curve)::DownCast(C2d->Copy()); + // for writing VERTEX_LOOP if(!aTool.IsBound(E)) continue; Handle(StepGeom_Curve) Cpms = Handle(StepShape_EdgeCurve)::DownCast(aTool.Find(E))->EdgeGeometry(); if ( Cpms.IsNull() ) continue; - if ( !C2d.IsNull() && aTool.IsBound(E) ) { + if (aTool.IsBound(E)) { if (C2d->IsKind(STANDARD_TYPE(Geom2d_Hyperbola)) || C2d->IsKind(STANDARD_TYPE(Geom2d_Parabola))) { if(Su->IsKind(STANDARD_TYPE(Geom_SphericalSurface)) || @@ -418,7 +369,6 @@ void TopoDSToStep_MakeStepFace::Init(const TopoDS_Face& aFace, // -------------------- // Translate the Pcurve // -------------------- - Handle(StepGeom_Pcurve) Pc = new StepGeom_Pcurve; Handle(StepRepr_DefinitionalRepresentation) DRI = new StepRepr_DefinitionalRepresentation; @@ -463,20 +413,16 @@ void TopoDSToStep_MakeStepFace::Init(const TopoDS_Face& aFace, // ------------------ // Translate the Face // ------------------ - Standard_Integer nbWires = mySeq.Length(); if ( nbWires ) { Handle(StepShape_HArray1OfFaceBound) aBounds = new StepShape_HArray1OfFaceBound(1,nbWires); - for ( i=1; i<=nbWires; i++ ) { + for (Standard_Integer i = 1; i <= nbWires; i++) + { aBounds->SetValue(i, Handle(StepShape_FaceBound)::DownCast(mySeq.Value(i))); } Handle(StepShape_AdvancedFace) Fpms = new StepShape_AdvancedFace; - - // --------------------------------------------------------------- // The underlying surface has always a direct axis (see above) - // --------------------------------------------------------------- - Handle(TCollection_HAsciiString) aName = new TCollection_HAsciiString(""); Fpms->Init(aName, aBounds, Spms, aFace.Orientation() == TopAbs_FORWARD); @@ -487,11 +433,9 @@ void TopoDSToStep_MakeStepFace::Init(const TopoDS_Face& aFace, done = Standard_True; } else { - // ---------------------------- // MakeFace Face Error Handling // ---------------------------- - FP->AddWarning(errShape, " No Wires of this Face were mapped"); myError = TopoDSToStep_NoWireMapped; done = Standard_False; @@ -504,7 +448,6 @@ void TopoDSToStep_MakeStepFace::Init(const TopoDS_Face& aFace, done = Standard_False; } } - // ---------------------------------------------------------------------------- // Method : Value From 3462ea5716e69bb7f6a740e9bc4f1811ee113a6d Mon Sep 17 00:00:00 2001 From: dpasukhi Date: Sat, 28 Sep 2024 18:49:22 +0000 Subject: [PATCH 623/639] 0033813: Data Exchange - Implementing common logic for scaling during Write procedure Fixed inconsistency of tests. 'IGES.OCC.write.unit no more' used. --- tests/de_wrapper/configuration/A3 | 1 - tests/de_wrapper/configuration/A4 | 1 - 2 files changed, 2 deletions(-) diff --git a/tests/de_wrapper/configuration/A3 b/tests/de_wrapper/configuration/A3 index babb2a3cfa..3b9471f197 100644 --- a/tests/de_wrapper/configuration/A3 +++ b/tests/de_wrapper/configuration/A3 @@ -134,7 +134,6 @@ provider.IGES.OCC.read.name : 1 provider.IGES.OCC.read.layer : 1 provider.IGES.OCC.write.brep.mode : 0 provider.IGES.OCC.write.convertsurface.mode : 0 -provider.IGES.OCC.write.unit : 2 provider.IGES.OCC.write.header.author : provider.IGES.OCC.write.header.company : provider.IGES.OCC.write.header.product : diff --git a/tests/de_wrapper/configuration/A4 b/tests/de_wrapper/configuration/A4 index 3fb307dd90..c91f245477 100644 --- a/tests/de_wrapper/configuration/A4 +++ b/tests/de_wrapper/configuration/A4 @@ -81,7 +81,6 @@ provider.IGES.OCC.read.name : 1 provider.IGES.OCC.read.layer : 1 provider.IGES.OCC.write.brep.mode : 0 provider.IGES.OCC.write.convertsurface.mode : 0 -provider.IGES.OCC.write.unit : 2 provider.IGES.OCC.write.header.author : provider.IGES.OCC.write.header.company : provider.IGES.OCC.write.header.product : From 5cc7cbea8b673b35054d3d35612d4c3b0a5458bb Mon Sep 17 00:00:00 2001 From: ika Date: Mon, 30 Sep 2024 12:12:05 +0100 Subject: [PATCH 624/639] Data Exchange, Gltf Export - Metadata support #79 Add supporting of metadata key-value export into extras section of each node. --- src/RWGltf/RWGltf_CafWriter.cxx | 112 +++++++++++++++++++++++++++++++ src/RWGltf/RWGltf_CafWriter.hxx | 5 ++ tests/metadata/gltf_export/A1 | 3 + tests/metadata/gltf_export/A2 | 3 + tests/metadata/gltf_export/A3 | 3 + tests/metadata/gltf_export/A4 | 3 + tests/metadata/gltf_export/A5 | 3 + tests/metadata/gltf_export/A6 | 3 + tests/metadata/gltf_export/A7 | 3 + tests/metadata/gltf_export/A8 | 3 + tests/metadata/gltf_export/A9 | 3 + tests/metadata/gltf_export/begin | 1 + tests/metadata/gltf_export/end | 39 +++++++++++ tests/metadata/grids.list | 1 + tests/metadata/{ => step}/end | 0 15 files changed, 185 insertions(+) create mode 100644 tests/metadata/gltf_export/A1 create mode 100644 tests/metadata/gltf_export/A2 create mode 100644 tests/metadata/gltf_export/A3 create mode 100644 tests/metadata/gltf_export/A4 create mode 100644 tests/metadata/gltf_export/A5 create mode 100644 tests/metadata/gltf_export/A6 create mode 100644 tests/metadata/gltf_export/A7 create mode 100644 tests/metadata/gltf_export/A8 create mode 100644 tests/metadata/gltf_export/A9 create mode 100644 tests/metadata/gltf_export/begin create mode 100644 tests/metadata/gltf_export/end rename tests/metadata/{ => step}/end (100%) diff --git a/src/RWGltf/RWGltf_CafWriter.cxx b/src/RWGltf/RWGltf_CafWriter.cxx index aa86708d39..e7ef51e957 100644 --- a/src/RWGltf/RWGltf_CafWriter.cxx +++ b/src/RWGltf/RWGltf_CafWriter.cxx @@ -1978,6 +1978,8 @@ void RWGltf_CafWriter::writeNodes (const Handle(TDocStd_Document)& theDocument, #ifdef HAVE_RAPIDJSON Standard_ProgramError_Raise_if (myWriter.get() == NULL, "Internal error: RWGltf_CafWriter::writeNodes()"); + Handle(XCAFDoc_ShapeTool) aShapeTool = XCAFDoc_DocumentTool::ShapeTool(theDocument->Main()); + // Prepare full indexed map of scene nodes in correct order. RWGltf_GltfSceneNodeMap aSceneNodeMapWithChildren; // indexes starting from 1 for (XCAFPrs_DocumentExplorer aDocExplorer (theDocument, theRootLabels, XCAFPrs_DocumentExplorerFlags_None); @@ -2130,6 +2132,18 @@ void RWGltf_CafWriter::writeNodes (const Handle(TDocStd_Document)& theDocument, myWriter->String (aNodeName.ToCString()); } } + { + Handle(TDataStd_NamedData) aNamedData = aShapeTool->GetNamedProperties(aDocNode.Label); + Handle(TDataStd_NamedData) aRefNamedData = aShapeTool->GetNamedProperties(aDocNode.RefLabel); + if (!aNamedData.IsNull() || !aRefNamedData.IsNull()) + { + myWriter->Key("extras"); + myWriter->StartObject(); + writeExtrasAttributes(aNamedData); + writeExtrasAttributes(aRefNamedData); + myWriter->EndObject(); + } + } myWriter->EndObject(); } myWriter->EndArray(); @@ -2142,6 +2156,104 @@ void RWGltf_CafWriter::writeNodes (const Handle(TDocStd_Document)& theDocument, #endif } +// ======================================================================= +// function : writeExtrasAttributes +// purpose : +// ======================================================================= +void RWGltf_CafWriter::writeExtrasAttributes(const Handle(TDataStd_NamedData)& theNamedData) +{ +#ifdef HAVE_RAPIDJSON + Standard_ProgramError_Raise_if(myWriter.get() == NULL, "Internal error: RWGltf_CafWriter::writeExtrasAttributes()"); + + if (theNamedData.IsNull()) + return; + theNamedData->LoadDeferredData(); + if (theNamedData->HasIntegers()) + { + const TColStd_DataMapOfStringInteger& anIntProperties = theNamedData->GetIntegersContainer(); + for (TColStd_DataMapIteratorOfDataMapOfStringInteger anIter(anIntProperties); + anIter.More(); anIter.Next()) + { + TCollection_AsciiString aKey(anIter.Key()); + myWriter->Key(aKey.ToCString()); + myWriter->Int(anIter.Value()); + } + } + if (theNamedData->HasReals()) + { + const TDataStd_DataMapOfStringReal& aRealProperties = theNamedData->GetRealsContainer(); + for (TDataStd_DataMapIteratorOfDataMapOfStringReal anIter(aRealProperties); + anIter.More(); anIter.Next()) + { + TCollection_AsciiString aKey(anIter.Key()); + myWriter->Key(aKey.ToCString()); + myWriter->Double(anIter.Value()); + } + } + if (theNamedData->HasStrings()) + { + const TDataStd_DataMapOfStringString& aStringProperties = theNamedData->GetStringsContainer(); + for (TDataStd_DataMapIteratorOfDataMapOfStringString anIter(aStringProperties); + anIter.More(); anIter.Next()) + { + TCollection_AsciiString aKey(anIter.Key()); + TCollection_AsciiString aValue(anIter.Value()); + myWriter->Key(aKey.ToCString()); + myWriter->String(aValue.ToCString()); + } + } + if (theNamedData->HasBytes()) + { + const TDataStd_DataMapOfStringByte& aByteProperties = theNamedData->GetBytesContainer(); + for (TDataStd_DataMapOfStringByte::Iterator anIter(aByteProperties); + anIter.More(); anIter.Next()) + { + TCollection_AsciiString aKey(anIter.Key()); + myWriter->Key(aKey.ToCString()); + myWriter->Int(anIter.Value()); + } + } + if (theNamedData->HasArraysOfIntegers()) + { + const TDataStd_DataMapOfStringHArray1OfInteger& anArrayIntegerProperties = + theNamedData->GetArraysOfIntegersContainer(); + for (TDataStd_DataMapOfStringHArray1OfInteger::Iterator anIter(anArrayIntegerProperties); + anIter.More(); anIter.Next()) + { + TCollection_AsciiString aKey(anIter.Key()); + myWriter->Key(aKey.ToCString()); + myWriter->StartArray(); + for (TColStd_HArray1OfInteger::Iterator anSubIter(anIter.Value()->Array1()); + anSubIter.More(); anSubIter.Next()) + { + myWriter->Int(anSubIter.Value()); + } + myWriter->EndArray(); + } + } + if (theNamedData->HasArraysOfReals()) + { + const TDataStd_DataMapOfStringHArray1OfReal& anArrayRealsProperties = + theNamedData->GetArraysOfRealsContainer(); + for (TDataStd_DataMapOfStringHArray1OfReal::Iterator anIter(anArrayRealsProperties); + anIter.More(); anIter.Next()) + { + TCollection_AsciiString aKey(anIter.Key()); + myWriter->Key(aKey.ToCString()); + myWriter->StartArray(); + for (TColStd_HArray1OfReal::Iterator anSubIter(anIter.Value()->Array1()); + anSubIter.More(); anSubIter.Next()) + { + myWriter->Double(anSubIter.Value()); + } + myWriter->EndArray(); + } + } +#else + (void)theNamedData; +#endif +} + // ======================================================================= // function : writeSamplers // purpose : diff --git a/src/RWGltf/RWGltf_CafWriter.hxx b/src/RWGltf/RWGltf_CafWriter.hxx index b2cfa9ba91..fe642bd5e6 100644 --- a/src/RWGltf/RWGltf_CafWriter.hxx +++ b/src/RWGltf/RWGltf_CafWriter.hxx @@ -34,6 +34,7 @@ class RWMesh_FaceIterator; class RWGltf_GltfOStreamWriter; class RWGltf_GltfMaterialMap; class RWGltf_GltfSceneNodeMap; +class TDataStd_NamedData; class TDocStd_Document; //! glTF writer context from XCAF document. @@ -349,6 +350,10 @@ protected: //! @param theMaterialMap [out] map of materials, filled with textures Standard_EXPORT virtual void writeTextures (const RWGltf_GltfSceneNodeMap& theSceneNodeMap); + //! Write nodes.extras section with key-value attributes. + //! @param theNamedData [in] attributes map to process. + Standard_EXPORT virtual void writeExtrasAttributes(const Handle(TDataStd_NamedData)& theNamedData); + protected: //! Shape + Style pair. diff --git a/tests/metadata/gltf_export/A1 b/tests/metadata/gltf_export/A1 new file mode 100644 index 0000000000..836d0e916f --- /dev/null +++ b/tests/metadata/gltf_export/A1 @@ -0,0 +1,3 @@ +# !!!! This file is generated automatically, do not edit manually! See end script +set filename bug28345_30338.stp +set ref_size 5896 diff --git a/tests/metadata/gltf_export/A2 b/tests/metadata/gltf_export/A2 new file mode 100644 index 0000000000..734de94be3 --- /dev/null +++ b/tests/metadata/gltf_export/A2 @@ -0,0 +1,3 @@ +# !!!! This file is generated automatically, do not edit manually! See end script +set filename bug28389_CONFIDENTIAL_SHEET_METAL_F3D.stp +set ref_size 86278 diff --git a/tests/metadata/gltf_export/A3 b/tests/metadata/gltf_export/A3 new file mode 100644 index 0000000000..b1020fdb4c --- /dev/null +++ b/tests/metadata/gltf_export/A3 @@ -0,0 +1,3 @@ +# !!!! This file is generated automatically, do not edit manually! See end script +set filename bug28444_nist_ftc_06_asme1_ct5240_rd.stp +set ref_size 85383 diff --git a/tests/metadata/gltf_export/A4 b/tests/metadata/gltf_export/A4 new file mode 100644 index 0000000000..6cdc3c7549 --- /dev/null +++ b/tests/metadata/gltf_export/A4 @@ -0,0 +1,3 @@ +# !!!! This file is generated automatically, do not edit manually! See end script +set filename bug29525_rev_part_neu_01.prt_converted_from_datakit.stp +set ref_size 80996 diff --git a/tests/metadata/gltf_export/A5 b/tests/metadata/gltf_export/A5 new file mode 100644 index 0000000000..3e132d8a79 --- /dev/null +++ b/tests/metadata/gltf_export/A5 @@ -0,0 +1,3 @@ +# !!!! This file is generated automatically, do not edit manually! See end script +set filename bug29633_nist_ctc_05_asme1_ap242-1.stp +set ref_size 69902 diff --git a/tests/metadata/gltf_export/A6 b/tests/metadata/gltf_export/A6 new file mode 100644 index 0000000000..db247e76eb --- /dev/null +++ b/tests/metadata/gltf_export/A6 @@ -0,0 +1,3 @@ +# !!!! This file is generated automatically, do not edit manually! See end script +set filename bug29803.stp +set ref_size 17032 diff --git a/tests/metadata/gltf_export/A7 b/tests/metadata/gltf_export/A7 new file mode 100644 index 0000000000..3bb42faecf --- /dev/null +++ b/tests/metadata/gltf_export/A7 @@ -0,0 +1,3 @@ +# !!!! This file is generated automatically, do not edit manually! See end script +set filename sp7_04-do-242.stp +set ref_size 224779 diff --git a/tests/metadata/gltf_export/A8 b/tests/metadata/gltf_export/A8 new file mode 100644 index 0000000000..8c2edc7f18 --- /dev/null +++ b/tests/metadata/gltf_export/A8 @@ -0,0 +1,3 @@ +# !!!! This file is generated automatically, do not edit manually! See end script +set filename bug32087_part.stp +set ref_size 15789 diff --git a/tests/metadata/gltf_export/A9 b/tests/metadata/gltf_export/A9 new file mode 100644 index 0000000000..2428cb4e23 --- /dev/null +++ b/tests/metadata/gltf_export/A9 @@ -0,0 +1,3 @@ +# !!!! This file is generated automatically, do not edit manually! See end script +set filename nist_ftc_08_asme1_ap242-2.stp +set ref_size 118200 diff --git a/tests/metadata/gltf_export/begin b/tests/metadata/gltf_export/begin new file mode 100644 index 0000000000..56cb94b803 --- /dev/null +++ b/tests/metadata/gltf_export/begin @@ -0,0 +1 @@ +pload MODELING diff --git a/tests/metadata/gltf_export/end b/tests/metadata/gltf_export/end new file mode 100644 index 0000000000..8e4881b137 --- /dev/null +++ b/tests/metadata/gltf_export/end @@ -0,0 +1,39 @@ +# Set flag dump_file to 1 in order to regenerate script files with actual data +# used as reference. In this mode all tests intentionally report failure. +set dump_file 0 + +# Read original file +if { [string length $filename] > 1} { + set path_file [locate_data_file $filename] + if { [catch { ReadFile D $path_file } catch_result] } { + set err_msg "Error: file was not read - exception " + puts $err_msg + } +} + +# mesh the shape before Gltf writing +XGetOneShape a D +incmesh a 0.1 + +# write file +WriteGltf D $imagedir/${casename}_D_First.gltf +set aSize [file size $imagedir/${casename}_D_First.gltf] + +if { $dump_file == 1 } { + set fd_stream [open $dirname/$groupname/$gridname/$casename w] + puts $fd_stream "# !!!! This file is generated automatically, do not edit manually! See end script" + puts $fd_stream "set filename $filename" + puts $fd_stream "set ref_size $aSize" + close $fd_stream + puts "Error : Running in regeneration mode, comparison was not performed!" +} else { + if {$aSize != $ref_size} { + puts "Error: Wrong file size $aSize instead of $ref_size" + } +} + +# finalize scenario +Close D +file delete $imagedir/${casename}_D_First.gltf +file delete $imagedir/${casename}_D_First.bin +puts "TEST COMPLETED" diff --git a/tests/metadata/grids.list b/tests/metadata/grids.list index c7e242aaea..3dc7702c6b 100644 --- a/tests/metadata/grids.list +++ b/tests/metadata/grids.list @@ -1 +1,2 @@ 001 step +002 gltf_export diff --git a/tests/metadata/end b/tests/metadata/step/end similarity index 100% rename from tests/metadata/end rename to tests/metadata/step/end From e83a646c14cc0003db9578180c076bc6a0afec8e Mon Sep 17 00:00:00 2001 From: dpasukhi Date: Sat, 28 Sep 2024 21:19:40 +0000 Subject: [PATCH 625/639] Coding - Reorganize code with constexpr #85 Continue rework Precision.hxx and Standard type definitions --- src/Precision/Precision.hxx | 14 +++++++------- src/Standard/Standard_Character.hxx | 4 ++-- src/Standard/Standard_Integer.hxx | 14 +++++++------- src/Standard/Standard_Real.cxx | 4 ++-- src/Standard/Standard_Real.hxx | 22 ++++++++-------------- src/Standard/Standard_ShortReal.hxx | 20 ++++++-------------- 6 files changed, 32 insertions(+), 46 deletions(-) diff --git a/src/Precision/Precision.hxx b/src/Precision/Precision.hxx index c5d851d642..66b5340a84 100644 --- a/src/Precision/Precision.hxx +++ b/src/Precision/Precision.hxx @@ -210,7 +210,7 @@ public: //! length of the tangent of the curve or the surface. //! //! Value is P / T - static inline Standard_Real Parametric (const Standard_Real P, const Standard_Real T) { return P / T; } + static constexpr Standard_Real Parametric (const Standard_Real P, const Standard_Real T) { return P / T; } //! Returns a precision value in parametric space, which may be used : //! - to test the coincidence of two points in the real space, @@ -256,7 +256,7 @@ public: //! 2.Pi without impacting on the resulting point. //! Therefore, take great care when adjusting a parametric //! tolerance to your own algorithm. - static inline Standard_Real PConfusion (const Standard_Real T) { return Parametric (Confusion(), T); } + static constexpr Standard_Real PConfusion (const Standard_Real T) { return Parametric (Confusion(), T); } //! Returns square of PConfusion. //! Created for speed and convenience. @@ -275,7 +275,7 @@ public: //! segment whose length is equal to 100. (default value), or T. //! The parametric tolerance of intersection is equal to : //! - Precision::Intersection() / 100., or Precision::Intersection() / T. - static inline Standard_Real PIntersection (const Standard_Real T) { return Parametric(Intersection(),T); } + static constexpr Standard_Real PIntersection (const Standard_Real T) { return Parametric(Intersection(),T); } //! Returns a precision value in parametric space, which may //! be used by approximation algorithms. The purpose of this @@ -290,13 +290,13 @@ public: //! segment whose length is equal to 100. (default value), or T. //! The parametric tolerance of intersection is equal to : //! - Precision::Approximation() / 100., or Precision::Approximation() / T. - static inline Standard_Real PApproximation (const Standard_Real T) { return Parametric(Approximation(),T); } + static constexpr Standard_Real PApproximation (const Standard_Real T) { return Parametric(Approximation(),T); } //! Convert a real space precision to a parametric //! space precision on a default curve. //! //! Value is Parametric(P,1.e+2) - static inline Standard_Real Parametric (const Standard_Real P) { return P * 0.01; } + static constexpr Standard_Real Parametric (const Standard_Real P) { return P * 0.01; } //! Used to test distances in parametric space on a //! default curve. @@ -322,11 +322,11 @@ public: //! Returns True if R may be considered as a positive //! infinite number. Currently R > 1e100 - static inline Standard_Boolean IsPositiveInfinite (const Standard_Real R) { return R >= (0.5 * Precision::Infinite()); } + static constexpr Standard_Boolean IsPositiveInfinite (const Standard_Real R) { return R >= (0.5 * Precision::Infinite()); } //! Returns True if R may be considered as a negative //! infinite number. Currently R < -1e100 - static inline Standard_Boolean IsNegativeInfinite (const Standard_Real R) { return R <= -(0.5 * Precision::Infinite()); } + static constexpr Standard_Boolean IsNegativeInfinite (const Standard_Real R) { return R <= -(0.5 * Precision::Infinite()); } //! Returns a big number that can be considered as //! infinite. Use -Infinite() for a negative big number. diff --git a/src/Standard/Standard_Character.hxx b/src/Standard/Standard_Character.hxx index e29f1a4c55..513f6f4070 100644 --- a/src/Standard/Standard_Character.hxx +++ b/src/Standard/Standard_Character.hxx @@ -30,8 +30,8 @@ // ------------------------------------------------------------------ // IsEqual : Returns Standard_True if two characters have the same value // ------------------------------------------------------------------ -inline Standard_Boolean IsEqual(const Standard_Character One, - const Standard_Character Two) +constexpr Standard_Boolean IsEqual(const Standard_Character One, + const Standard_Character Two) { return One == Two; } // =============================================== diff --git a/src/Standard/Standard_Integer.hxx b/src/Standard/Standard_Integer.hxx index d629b87c06..47a7061f90 100755 --- a/src/Standard/Standard_Integer.hxx +++ b/src/Standard/Standard_Integer.hxx @@ -27,7 +27,7 @@ // ------------------------------------------------------------------ // Abs : Returns the absolute value of an Integer // ------------------------------------------------------------------ -inline Standard_Integer Abs (const Standard_Integer Value) +constexpr Standard_Integer Abs (const Standard_Integer Value) { return Value >= 0 ? Value : -Value; } @@ -35,20 +35,20 @@ inline Standard_Integer Abs (const Standard_Integer Value) // ------------------------------------------------------------------ // IsEven : Returns Standard_True if an integer is even // ------------------------------------------------------------------ -inline Standard_Boolean IsEven (const Standard_Integer Value) +constexpr Standard_Boolean IsEven (const Standard_Integer Value) { return Value % 2 == 0; } // ------------------------------------------------------------------ // IsOdd : Returns Standard_True if an integer is odd // ------------------------------------------------------------------ -inline Standard_Boolean IsOdd (const Standard_Integer Value) +constexpr Standard_Boolean IsOdd (const Standard_Integer Value) { return Value % 2 == 1; } // ------------------------------------------------------------------ // Max : Returns the maximum integer between two integers // ------------------------------------------------------------------ -inline Standard_Integer Max (const Standard_Integer Val1, +constexpr Standard_Integer Max (const Standard_Integer Val1, const Standard_Integer Val2) { return Val1 >= Val2 ? Val1 : Val2; @@ -57,7 +57,7 @@ inline Standard_Integer Max (const Standard_Integer Val1, // ------------------------------------------------------------------ // Min : Returns the minimum integer between two integers // ------------------------------------------------------------------ -inline Standard_Integer Min (const Standard_Integer Val1, +constexpr Standard_Integer Min (const Standard_Integer Val1, const Standard_Integer Val2) { return Val1 <= Val2 ? Val1 : Val2; @@ -66,14 +66,14 @@ inline Standard_Integer Min (const Standard_Integer Val1, // ------------------------------------------------------------------ // Modulus : Returns the remainder of division between two integers // ------------------------------------------------------------------ -inline Standard_Integer Modulus (const Standard_Integer Value, +constexpr Standard_Integer Modulus (const Standard_Integer Value, const Standard_Integer Divisor) { return Value % Divisor; } // ------------------------------------------------------------------ // Square : Returns the square of an integer // ------------------------------------------------------------------ -inline Standard_Integer Square(const Standard_Integer Value) +constexpr Standard_Integer Square(const Standard_Integer Value) { return Value * Value; } // ------------------------------------------------------------------ diff --git a/src/Standard/Standard_Real.cxx b/src/Standard/Standard_Real.cxx index 51721d48d7..7d1749f47b 100644 --- a/src/Standard/Standard_Real.cxx +++ b/src/Standard/Standard_Real.cxx @@ -172,8 +172,8 @@ static int HardwareLowBitsOfDouble() } } -static int HighBitsOfDouble = HardwareHighBitsOfDouble(); -static int LowBitsOfDouble = HardwareLowBitsOfDouble(); +static const int HighBitsOfDouble = HardwareHighBitsOfDouble(); +static const int LowBitsOfDouble = HardwareLowBitsOfDouble(); double NextAfter(const double x, const double y) { diff --git a/src/Standard/Standard_Real.hxx b/src/Standard/Standard_Real.hxx index f185568f51..a4a9717ef5 100644 --- a/src/Standard/Standard_Real.hxx +++ b/src/Standard/Standard_Real.hxx @@ -182,16 +182,10 @@ inline Standard_Real Cos (const Standard_Real Value) // If 'Value' is 0 then returns minimal positive value // of Standard_Real type. //------------------------------------------------------------------- -inline Standard_Real Epsilon (const Standard_Real Value) +inline Standard_Real Epsilon (const Standard_Real Value) { - Standard_Real aEpsilon; - - if (Value>=0.0){ - aEpsilon = NextAfter(Value, RealLast()) - Value; - } else { - aEpsilon = Value - NextAfter(Value, RealFirst()); - } - return aEpsilon; + return Value >= 0.0 ? (NextAfter(Value, RealLast()) - Value) + : (Value - NextAfter(Value, RealFirst())); } //------------------------------------------------------------------- @@ -222,7 +216,7 @@ inline Standard_Real Log10 (const Standard_Real Value) //------------------------------------------------------------------- // Max : Returns the maximum value of two reals //------------------------------------------------------------------- -inline Standard_Real Max (const Standard_Real Val1, +constexpr Standard_Real Max (const Standard_Real Val1, const Standard_Real Val2) { return Val1 >= Val2 ? Val1 : Val2; @@ -231,7 +225,7 @@ inline Standard_Real Max (const Standard_Real Val1, //------------------------------------------------------------------- // Min : Returns the minimum value of two reals //------------------------------------------------------------------- -inline Standard_Real Min (const Standard_Real Val1, +constexpr Standard_Real Min (const Standard_Real Val1, const Standard_Real Val2) { return Val1 <= Val2 ? Val1 : Val2; @@ -254,7 +248,7 @@ inline Standard_Real RealPart (const Standard_Real Value) // If input value is out of valid range for integers, // minimal or maximal possible integer is returned. //------------------------------------------------------------------- -inline Standard_Integer RealToInt (const Standard_Real theValue) +constexpr Standard_Integer RealToInt (const Standard_Real theValue) { // Note that on WNT under MS VC++ 8.0 conversion of double value less // than INT_MIN or greater than INT_MAX to integer will cause signal @@ -273,7 +267,7 @@ inline Standard_Integer RealToInt (const Standard_Real theValue) // for Standard_ShortReal, minimal or maximal // Standard_ShortReal is returned. // ======================================================================= -inline Standard_ShortReal RealToShortReal (const Standard_Real theVal) +constexpr Standard_ShortReal RealToShortReal (const Standard_Real theVal) { return theVal < -FLT_MAX ? -FLT_MAX : theVal > FLT_MAX ? FLT_MAX @@ -306,7 +300,7 @@ inline Standard_Real ASinh(const Standard_Real Value) //------------------------------------------------------------------- // Square : Returns a real to the power 2 //------------------------------------------------------------------- -inline Standard_Real Square(const Standard_Real Value) +constexpr Standard_Real Square(const Standard_Real Value) { return Value * Value; } //------------------------------------------------------------------- diff --git a/src/Standard/Standard_ShortReal.hxx b/src/Standard/Standard_ShortReal.hxx index cf9927248e..9d1da827c1 100644 --- a/src/Standard/Standard_ShortReal.hxx +++ b/src/Standard/Standard_ShortReal.hxx @@ -105,27 +105,19 @@ constexpr Standard_Integer ShortRealSize() //------------------------------------------------------------------- // Max : Returns the maximum value of two ShortReals //------------------------------------------------------------------- -inline Standard_ShortReal Max (const Standard_ShortReal Val1, - const Standard_ShortReal Val2) +constexpr Standard_ShortReal Max(const Standard_ShortReal Val1, + const Standard_ShortReal Val2) { - if (Val1 >= Val2) { - return Val1; - } else { - return Val2; - } + return Val1 >= Val2 ? Val1 : Val2; } //------------------------------------------------------------------- // Min : Returns the minimum value of two ShortReals //------------------------------------------------------------------- -inline Standard_ShortReal Min (const Standard_ShortReal Val1, - const Standard_ShortReal Val2) +constexpr Standard_ShortReal Min(const Standard_ShortReal Val1, + const Standard_ShortReal Val2) { - if (Val1 <= Val2) { - return Val1; - } else { - return Val2; - } + return Val1 <= Val2 ? Val1 : Val2; } #endif From 858709699a146e007905969a9eaedae6a9995573 Mon Sep 17 00:00:00 2001 From: dpasukhi Date: Mon, 7 Oct 2024 21:55:58 +0000 Subject: [PATCH 626/639] Coding - Non-dependency include update #89 Removed or reorganized include that are not a part of the project dependency. The new file for typedef is added because Select is not direct dependency. --- src/BVH/BVH_Builder3d.hxx | 21 +++++++++++++++++++ src/BVH/FILES | 1 + src/DEBRepCascade/DEBRepCascade_Provider.cxx | 1 - src/Geom2d/Geom2d_Ellipse.cxx | 3 +-- src/GeomConvert/GeomConvert_SurfToAnaSurf.cxx | 1 - .../Graphic3d_BvhCStructureSetTrsfPers.cxx | 2 +- .../Graphic3d_BvhCStructureSetTrsfPers.hxx | 10 ++++----- src/Graphic3d/Graphic3d_GraphicDriver.cxx | 14 ++++++------- src/Graphic3d/Graphic3d_Layer.cxx | 2 +- src/Graphic3d/Graphic3d_Layer.hxx | 6 +++--- .../IGESCAFControl_Provider.cxx | 1 - src/OpenGl/OpenGl_LayerList.cxx | 2 +- src/OpenGl/OpenGl_LayerList.hxx | 6 +++--- src/RWGltf/RWGltf_Provider.cxx | 1 - src/RWObj/RWObj_Provider.cxx | 1 - src/RWStl/RWStl_Provider.cxx | 1 - .../STEPCAFControl_Provider.cxx | 1 - src/TKDE/EXTERNLIB | 2 ++ src/Vrml/Vrml_Provider.cxx | 1 - src/XDEDRAW/XDEDRAW.cxx | 2 -- 20 files changed, 46 insertions(+), 33 deletions(-) create mode 100644 src/BVH/BVH_Builder3d.hxx diff --git a/src/BVH/BVH_Builder3d.hxx b/src/BVH/BVH_Builder3d.hxx new file mode 100644 index 0000000000..d457cc7a0a --- /dev/null +++ b/src/BVH/BVH_Builder3d.hxx @@ -0,0 +1,21 @@ +// Copyright (c) 2024 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 _BVH_Builder3d_Header +#define _BVH_Builder3d_Header + +#include + +typedef BVH_Builder BVH_Builder3d; + +#endif // _BVH_Builder3d_Header \ No newline at end of file diff --git a/src/BVH/FILES b/src/BVH/FILES index dd7b34e837..df24705741 100644 --- a/src/BVH/FILES +++ b/src/BVH/FILES @@ -3,6 +3,7 @@ BVH_BinnedBuilder.hxx BVH_Box.hxx BVH_BoxSet.hxx BVH_Builder.hxx +BVH_Builder3d.hxx BVH_BuildQueue.hxx BVH_BuildQueue.cxx BVH_BuildThread.hxx diff --git a/src/DEBRepCascade/DEBRepCascade_Provider.cxx b/src/DEBRepCascade/DEBRepCascade_Provider.cxx index 6af321edc9..a9a663ab46 100644 --- a/src/DEBRepCascade/DEBRepCascade_Provider.cxx +++ b/src/DEBRepCascade/DEBRepCascade_Provider.cxx @@ -14,7 +14,6 @@ #include #include -#include #include #include #include diff --git a/src/Geom2d/Geom2d_Ellipse.cxx b/src/Geom2d/Geom2d_Ellipse.cxx index 3ea205600d..668a447863 100644 --- a/src/Geom2d/Geom2d_Ellipse.cxx +++ b/src/Geom2d/Geom2d_Ellipse.cxx @@ -32,7 +32,6 @@ IMPLEMENT_STANDARD_RTTIEXT(Geom2d_Ellipse,Geom2d_Conic) -typedef Geom2d_Ellipse Ellipse; typedef gp_Ax2d Ax2d; typedef gp_Dir2d Dir2d; typedef gp_Pnt2d Pnt2d; @@ -48,7 +47,7 @@ typedef gp_XY XY; Handle(Geom2d_Geometry) Geom2d_Ellipse::Copy() const { Handle(Geom2d_Ellipse) E; - E = new Ellipse (pos, majorRadius, minorRadius); + E = new Geom2d_Ellipse (pos, majorRadius, minorRadius); return E; } diff --git a/src/GeomConvert/GeomConvert_SurfToAnaSurf.cxx b/src/GeomConvert/GeomConvert_SurfToAnaSurf.cxx index 00296f8d15..a6e55d8b0d 100644 --- a/src/GeomConvert/GeomConvert_SurfToAnaSurf.cxx +++ b/src/GeomConvert/GeomConvert_SurfToAnaSurf.cxx @@ -17,7 +17,6 @@ //abv 06.01.99 fix of misprint //:p6 abv 26.02.99: make ConvertToPeriodic() return Null if nothing done -#include #include #include #include diff --git a/src/Graphic3d/Graphic3d_BvhCStructureSetTrsfPers.cxx b/src/Graphic3d/Graphic3d_BvhCStructureSetTrsfPers.cxx index 95b0ff7322..bbd3bdbc1b 100644 --- a/src/Graphic3d/Graphic3d_BvhCStructureSetTrsfPers.cxx +++ b/src/Graphic3d/Graphic3d_BvhCStructureSetTrsfPers.cxx @@ -21,7 +21,7 @@ // function : Graphic3d_BvhCStructureSetTrsfPers // purpose : // ======================================================================= -Graphic3d_BvhCStructureSetTrsfPers::Graphic3d_BvhCStructureSetTrsfPers (const Handle(Select3D_BVHBuilder3d)& theBuilder) +Graphic3d_BvhCStructureSetTrsfPers::Graphic3d_BvhCStructureSetTrsfPers (const Handle(BVH_Builder3d)& theBuilder) : myIsDirty (Standard_False), myBVH (new BVH_Tree()), myBuilder (theBuilder) diff --git a/src/Graphic3d/Graphic3d_BvhCStructureSetTrsfPers.hxx b/src/Graphic3d/Graphic3d_BvhCStructureSetTrsfPers.hxx index 8af7ba5e18..be19c83c09 100644 --- a/src/Graphic3d/Graphic3d_BvhCStructureSetTrsfPers.hxx +++ b/src/Graphic3d/Graphic3d_BvhCStructureSetTrsfPers.hxx @@ -21,7 +21,7 @@ #include #include #include -#include +#include class Graphic3d_Camera; class Graphic3d_CStructure; @@ -39,7 +39,7 @@ private: public: //! Creates an empty primitive set for BVH clipping. - Standard_EXPORT Graphic3d_BvhCStructureSetTrsfPers (const Handle(Select3D_BVHBuilder3d)& theBuilder); + Standard_EXPORT Graphic3d_BvhCStructureSetTrsfPers (const Handle(BVH_Builder3d)& theBuilder); //! Returns total number of structures. Standard_EXPORT virtual Standard_Integer Size() const Standard_OVERRIDE; @@ -87,10 +87,10 @@ public: const Graphic3d_WorldViewProjState& theWVPState); //! Returns builder for bottom-level BVH. - const Handle(Select3D_BVHBuilder3d)& Builder() const { return myBuilder; } + const Handle(BVH_Builder3d)& Builder() const { return myBuilder; } //! Assigns builder for bottom-level BVH. - void SetBuilder (const Handle(Select3D_BVHBuilder3d)& theBuilder) { myBuilder = theBuilder; } + void SetBuilder (const Handle(BVH_Builder3d)& theBuilder) { myBuilder = theBuilder; } private: @@ -101,7 +101,7 @@ private: opencascade::handle > myBVH; //! Builder for bottom-level BVH. - Handle(Select3D_BVHBuilder3d) myBuilder; + Handle(BVH_Builder3d) myBuilder; //! Indexed map of structures. NCollection_IndexedMap myStructs; diff --git a/src/Graphic3d/Graphic3d_GraphicDriver.cxx b/src/Graphic3d/Graphic3d_GraphicDriver.cxx index 3717f05d65..eb5bc5f40c 100644 --- a/src/Graphic3d/Graphic3d_GraphicDriver.cxx +++ b/src/Graphic3d/Graphic3d_GraphicDriver.cxx @@ -38,7 +38,7 @@ Graphic3d_GraphicDriver::Graphic3d_GraphicDriver (const Handle(Aspect_DisplayCon aSettings.SetEnableDepthWrite (Standard_False); aSettings.SetClearDepth (Standard_False); aSettings.SetPolygonOffset (Graphic3d_PolygonOffset()); - Handle(Graphic3d_Layer) aLayer = new Graphic3d_Layer (Graphic3d_ZLayerId_BotOSD, Handle(Select3D_BVHBuilder3d)()); + Handle(Graphic3d_Layer) aLayer = new Graphic3d_Layer (Graphic3d_ZLayerId_BotOSD, Handle(BVH_Builder3d)()); aLayer->SetLayerSettings (aSettings); myLayers.Append (aLayer); myLayerIds.Bind (aLayer->LayerId(), aLayer); @@ -54,7 +54,7 @@ Graphic3d_GraphicDriver::Graphic3d_GraphicDriver (const Handle(Aspect_DisplayCon aSettings.SetEnableDepthWrite (Standard_True); aSettings.SetClearDepth (Standard_False); aSettings.SetPolygonOffset (Graphic3d_PolygonOffset()); - Handle(Graphic3d_Layer) aLayer = new Graphic3d_Layer (Graphic3d_ZLayerId_Default, Handle(Select3D_BVHBuilder3d)()); + Handle(Graphic3d_Layer) aLayer = new Graphic3d_Layer (Graphic3d_ZLayerId_Default, Handle(BVH_Builder3d)()); aLayer->SetLayerSettings (aSettings); myLayers.Append (aLayer); myLayerIds.Bind (aLayer->LayerId(), aLayer); @@ -70,7 +70,7 @@ Graphic3d_GraphicDriver::Graphic3d_GraphicDriver (const Handle(Aspect_DisplayCon aSettings.SetEnableDepthWrite (Standard_True); aSettings.SetClearDepth (Standard_False); aSettings.SetPolygonOffset (Graphic3d_PolygonOffset()); - Handle(Graphic3d_Layer) aLayer = new Graphic3d_Layer (Graphic3d_ZLayerId_Top, Handle(Select3D_BVHBuilder3d)()); + Handle(Graphic3d_Layer) aLayer = new Graphic3d_Layer (Graphic3d_ZLayerId_Top, Handle(BVH_Builder3d)()); aLayer->SetLayerSettings (aSettings); myLayers.Append (aLayer); myLayerIds.Bind (aLayer->LayerId(), aLayer); @@ -86,7 +86,7 @@ Graphic3d_GraphicDriver::Graphic3d_GraphicDriver (const Handle(Aspect_DisplayCon aSettings.SetEnableDepthWrite (Standard_True); aSettings.SetClearDepth (Standard_True); aSettings.SetPolygonOffset (Graphic3d_PolygonOffset()); - Handle(Graphic3d_Layer) aLayer = new Graphic3d_Layer (Graphic3d_ZLayerId_Topmost, Handle(Select3D_BVHBuilder3d)()); + Handle(Graphic3d_Layer) aLayer = new Graphic3d_Layer (Graphic3d_ZLayerId_Topmost, Handle(BVH_Builder3d)()); aLayer->SetLayerSettings (aSettings); myLayers.Append (aLayer); myLayerIds.Bind (aLayer->LayerId(), aLayer); @@ -102,7 +102,7 @@ Graphic3d_GraphicDriver::Graphic3d_GraphicDriver (const Handle(Aspect_DisplayCon aSettings.SetEnableDepthWrite (Standard_False); aSettings.SetClearDepth (Standard_False); aSettings.SetPolygonOffset (Graphic3d_PolygonOffset()); - Handle(Graphic3d_Layer) aLayer = new Graphic3d_Layer (Graphic3d_ZLayerId_TopOSD, Handle(Select3D_BVHBuilder3d)()); + Handle(Graphic3d_Layer) aLayer = new Graphic3d_Layer (Graphic3d_ZLayerId_TopOSD, Handle(BVH_Builder3d)()); aLayer->SetLayerSettings (aSettings); myLayers.Append (aLayer); myLayerIds.Bind (aLayer->LayerId(), aLayer); @@ -192,7 +192,7 @@ void Graphic3d_GraphicDriver::InsertLayerBefore (const Graphic3d_ZLayerId theNew Standard_ASSERT_RAISE (!myLayerIds.IsBound (theNewLayerId), "Graphic3d_GraphicDriver::InsertLayerBefore, Layer with theLayerId already exists"); - Handle(Graphic3d_Layer) aNewLayer = new Graphic3d_Layer (theNewLayerId, Handle(Select3D_BVHBuilder3d)()); + Handle(Graphic3d_Layer) aNewLayer = new Graphic3d_Layer (theNewLayerId, Handle(BVH_Builder3d)()); aNewLayer->SetLayerSettings (theSettings); Handle(Graphic3d_Layer) anOtherLayer; @@ -228,7 +228,7 @@ void Graphic3d_GraphicDriver::InsertLayerAfter (const Graphic3d_ZLayerId theNewL Standard_ASSERT_RAISE (!myLayerIds.IsBound (theNewLayerId), "Graphic3d_GraphicDriver::InsertLayerAfter, Layer with theLayerId already exists"); - Handle(Graphic3d_Layer) aNewLayer = new Graphic3d_Layer (theNewLayerId, Handle(Select3D_BVHBuilder3d)()); + Handle(Graphic3d_Layer) aNewLayer = new Graphic3d_Layer (theNewLayerId, Handle(BVH_Builder3d)()); aNewLayer->SetLayerSettings (theSettings); Handle(Graphic3d_Layer) anOtherLayer; diff --git a/src/Graphic3d/Graphic3d_Layer.cxx b/src/Graphic3d/Graphic3d_Layer.cxx index b6e2d6279c..bf82b2fdb5 100644 --- a/src/Graphic3d/Graphic3d_Layer.cxx +++ b/src/Graphic3d/Graphic3d_Layer.cxx @@ -23,7 +23,7 @@ IMPLEMENT_STANDARD_RTTIEXT(Graphic3d_Layer, Standard_Transient) // purpose : // ======================================================================= Graphic3d_Layer::Graphic3d_Layer (Graphic3d_ZLayerId theId, - const Handle(Select3D_BVHBuilder3d)& theBuilder) + const Handle(BVH_Builder3d)& theBuilder) : myNbStructures (0), myNbStructuresNotCulled (0), myLayerId (theId), diff --git a/src/Graphic3d/Graphic3d_Layer.hxx b/src/Graphic3d/Graphic3d_Layer.hxx index c73419b977..934a18510e 100644 --- a/src/Graphic3d/Graphic3d_Layer.hxx +++ b/src/Graphic3d/Graphic3d_Layer.hxx @@ -41,7 +41,7 @@ public: //! Initializes associated priority list and layer properties Standard_EXPORT Graphic3d_Layer (Graphic3d_ZLayerId theId, - const Handle(Select3D_BVHBuilder3d)& theBuilder); + const Handle(BVH_Builder3d)& theBuilder); //! Destructor. Standard_EXPORT virtual ~Graphic3d_Layer(); @@ -50,10 +50,10 @@ public: Graphic3d_ZLayerId LayerId() const { return myLayerId; } //! Returns BVH tree builder for frustum culling. - const Handle(Select3D_BVHBuilder3d)& FrustumCullingBVHBuilder() const { return myBVHPrimitivesTrsfPers.Builder(); } + const Handle(BVH_Builder3d)& FrustumCullingBVHBuilder() const { return myBVHPrimitivesTrsfPers.Builder(); } //! Assigns BVH tree builder for frustum culling. - void SetFrustumCullingBVHBuilder (const Handle(Select3D_BVHBuilder3d)& theBuilder) { myBVHPrimitivesTrsfPers.SetBuilder (theBuilder); } + void SetFrustumCullingBVHBuilder (const Handle(BVH_Builder3d)& theBuilder) { myBVHPrimitivesTrsfPers.SetBuilder (theBuilder); } //! Return true if layer was marked with immediate flag. Standard_Boolean IsImmediate() const { return myLayerSettings.IsImmediate(); } diff --git a/src/IGESCAFControl/IGESCAFControl_Provider.cxx b/src/IGESCAFControl/IGESCAFControl_Provider.cxx index a766f73c99..9ca7a987c3 100644 --- a/src/IGESCAFControl/IGESCAFControl_Provider.cxx +++ b/src/IGESCAFControl/IGESCAFControl_Provider.cxx @@ -13,7 +13,6 @@ #include -#include #include #include #include diff --git a/src/OpenGl/OpenGl_LayerList.cxx b/src/OpenGl/OpenGl_LayerList.cxx index 4cceccfdb5..845fdeb933 100644 --- a/src/OpenGl/OpenGl_LayerList.cxx +++ b/src/OpenGl/OpenGl_LayerList.cxx @@ -191,7 +191,7 @@ OpenGl_LayerList::~OpenGl_LayerList() //function : SetFrustumCullingBVHBuilder //purpose : //======================================================================= -void OpenGl_LayerList::SetFrustumCullingBVHBuilder (const Handle(Select3D_BVHBuilder3d)& theBuilder) +void OpenGl_LayerList::SetFrustumCullingBVHBuilder (const Handle(BVH_Builder3d)& theBuilder) { myBVHBuilder = theBuilder; for (NCollection_List::Iterator aLayerIter (myLayers); aLayerIter.More(); aLayerIter.Next()) diff --git a/src/OpenGl/OpenGl_LayerList.hxx b/src/OpenGl/OpenGl_LayerList.hxx index eb614f55af..21d8f1719f 100644 --- a/src/OpenGl/OpenGl_LayerList.hxx +++ b/src/OpenGl/OpenGl_LayerList.hxx @@ -121,10 +121,10 @@ public: Standard_Size ModificationStateOfRaytracable() const { return myModifStateOfRaytraceable; } //! Returns BVH tree builder for frustum culling. - const Handle(Select3D_BVHBuilder3d)& FrustumCullingBVHBuilder() const { return myBVHBuilder; } + const Handle(BVH_Builder3d)& FrustumCullingBVHBuilder() const { return myBVHBuilder; } //! Assigns BVH tree builder for frustum culling. - Standard_EXPORT void SetFrustumCullingBVHBuilder (const Handle(Select3D_BVHBuilder3d)& theBuilder); + Standard_EXPORT void SetFrustumCullingBVHBuilder (const Handle(BVH_Builder3d)& theBuilder); //! Dumps the content of me into the stream Standard_EXPORT void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const; @@ -207,7 +207,7 @@ protected: NCollection_List myLayers; NCollection_DataMap myLayerIds; - Handle(Select3D_BVHBuilder3d) myBVHBuilder; //!< BVH tree builder for frustum culling + Handle(BVH_Builder3d) myBVHBuilder; //!< BVH tree builder for frustum culling Standard_Integer myNbStructures; Standard_Integer myImmediateNbStructures; //!< number of structures within immediate layers diff --git a/src/RWGltf/RWGltf_Provider.cxx b/src/RWGltf/RWGltf_Provider.cxx index eeadfba355..77c527d53c 100644 --- a/src/RWGltf/RWGltf_Provider.cxx +++ b/src/RWGltf/RWGltf_Provider.cxx @@ -13,7 +13,6 @@ #include -#include #include #include #include diff --git a/src/RWObj/RWObj_Provider.cxx b/src/RWObj/RWObj_Provider.cxx index aa6d986520..8b1885fcb3 100644 --- a/src/RWObj/RWObj_Provider.cxx +++ b/src/RWObj/RWObj_Provider.cxx @@ -13,7 +13,6 @@ #include -#include #include #include #include diff --git a/src/RWStl/RWStl_Provider.cxx b/src/RWStl/RWStl_Provider.cxx index 302c9b661d..8fa8dd281e 100644 --- a/src/RWStl/RWStl_Provider.cxx +++ b/src/RWStl/RWStl_Provider.cxx @@ -13,7 +13,6 @@ #include -#include #include #include #include diff --git a/src/STEPCAFControl/STEPCAFControl_Provider.cxx b/src/STEPCAFControl/STEPCAFControl_Provider.cxx index 354212e60c..f66a70900a 100644 --- a/src/STEPCAFControl/STEPCAFControl_Provider.cxx +++ b/src/STEPCAFControl/STEPCAFControl_Provider.cxx @@ -13,7 +13,6 @@ #include -#include #include #include #include diff --git a/src/TKDE/EXTERNLIB b/src/TKDE/EXTERNLIB index 58c24f0d95..6d39d0d7ef 100644 --- a/src/TKDE/EXTERNLIB +++ b/src/TKDE/EXTERNLIB @@ -1 +1,3 @@ TKernel +TKMath +TKBRep diff --git a/src/Vrml/Vrml_Provider.cxx b/src/Vrml/Vrml_Provider.cxx index 39527456dc..c71ec12a48 100644 --- a/src/Vrml/Vrml_Provider.cxx +++ b/src/Vrml/Vrml_Provider.cxx @@ -13,7 +13,6 @@ #include -#include #include #include #include diff --git a/src/XDEDRAW/XDEDRAW.cxx b/src/XDEDRAW/XDEDRAW.cxx index f953df0378..5d0773b054 100644 --- a/src/XDEDRAW/XDEDRAW.cxx +++ b/src/XDEDRAW/XDEDRAW.cxx @@ -112,8 +112,6 @@ #include #include #include -#include -#include #include #include From 55527ad756099385c56618ac200b30b6f30ee654 Mon Sep 17 00:00:00 2001 From: dpasukhi Date: Sat, 12 Oct 2024 16:26:32 +0000 Subject: [PATCH 627/639] Coding - GCC13 warning suppressing #96 --- .github/workflows/build-linux-gcc-x64-dynamic.yml | 4 ++-- src/BRepTest/BRepTest_BasicCommands.cxx | 2 +- src/MeshTest/MeshTest.cxx | 6 +++--- src/QANCollection/QANCollection_Handle.cxx | 14 ++++++++++++++ src/STEPCAFControl/STEPCAFControl_Reader.cxx | 2 +- src/TopOpeBRepBuild/TopOpeBRepBuild_GridEE.cxx | 6 +++--- 6 files changed, 24 insertions(+), 10 deletions(-) diff --git a/.github/workflows/build-linux-gcc-x64-dynamic.yml b/.github/workflows/build-linux-gcc-x64-dynamic.yml index d23643ccb5..14b2d1450f 100644 --- a/.github/workflows/build-linux-gcc-x64-dynamic.yml +++ b/.github/workflows/build-linux-gcc-x64-dynamic.yml @@ -33,8 +33,8 @@ jobs: -D CMAKE_CXX_COMPILER=g++ \ -D USE_FREETYPE=OFF \ -D CMAKE_BUILD_TYPE=Release \ - -D CMAKE_C_FLAGS="-Werror" \ - -D CMAKE_CXX_FLAGS="-Werror" .. + -D CMAKE_C_FLAGS="-Werror -Wno-clobbered -Wmaybe-uninitialized -Wodr -Wno-alloc-size-larger-than" \ + -D CMAKE_CXX_FLAGS="-Werror -Wno-clobbered -Wno-dangling-pointer" .. - name: Build OCCT run: | diff --git a/src/BRepTest/BRepTest_BasicCommands.cxx b/src/BRepTest/BRepTest_BasicCommands.cxx index 76019fd643..ad81d7bc90 100644 --- a/src/BRepTest/BRepTest_BasicCommands.cxx +++ b/src/BRepTest/BRepTest_BasicCommands.cxx @@ -961,7 +961,7 @@ static Standard_Integer findplane(Draw_Interpretor& di,Standard_Integer n,const if (a_plane_finder.Found()) { //std::cout << " a plane is found " ; di << " a plane is found \n"; - const Handle(Geom_Geometry)& aSurf = a_plane_finder.Plane(); // to avoid ambiguity + const Handle(Geom_Geometry) aSurf = a_plane_finder.Plane(); // to avoid ambiguity DrawTrSurf::Set(a[2],aSurf) ; } return 0 ; diff --git a/src/MeshTest/MeshTest.cxx b/src/MeshTest/MeshTest.cxx index 02f2997487..731a18653c 100644 --- a/src/MeshTest/MeshTest.cxx +++ b/src/MeshTest/MeshTest.cxx @@ -1042,9 +1042,9 @@ static Standard_Integer veriftriangles(Draw_Interpretor& di, Standard_Integer n, else T->Triangle (i).Get (n1,n2,n3); - const gp_XY& xy1 = T->UVNode (n1).XY(); - const gp_XY& xy2 = T->UVNode (n2).XY(); - const gp_XY& xy3 = T->UVNode (n3).XY(); + const gp_Pnt2d xy1 = T->UVNode (n1); + const gp_Pnt2d xy2 = T->UVNode (n2); + const gp_Pnt2d xy3 = T->UVNode (n3); mi2d1.SetCoord((xy2.X()+xy3.X())*0.5, (xy2.Y()+xy3.Y())*0.5); diff --git a/src/QANCollection/QANCollection_Handle.cxx b/src/QANCollection/QANCollection_Handle.cxx index 89c593e63d..5ebadba24d 100644 --- a/src/QANCollection/QANCollection_Handle.cxx +++ b/src/QANCollection/QANCollection_Handle.cxx @@ -135,8 +135,15 @@ static Standard_Integer QAHandleOps (Draw_Interpretor& theDI, // compiler does not keep temporary object referenced by local variable of base type; // here compiler does not recognize that it should keep the temporary object because handle // classes do not inherit each other and they use hard cast for references to simulate inheritance +#if defined(__GNUC__) && (__GNUC__ > 12) +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wdangling-reference" +#endif const Handle(Geom_Curve)& aTmpRefBase (Handle(Geom_Line)::DownCast (aCurve2)); CHECK(theDI, aTmpRefBase.get() != aCurve2.get(), "local reference to temporary handle object (base type)"); +#if defined(__GNUC__) && (__GNUC__ > 12) +#pragma GCC diagnostic pop +#endif // check operations with Handle_* classes Handle(Geom_Line) hLine = aLine; @@ -174,11 +181,18 @@ static Standard_Integer QAHandleOps (Draw_Interpretor& theDI, Handle_Geom_Line qhLine = cpLine; // constructor from const pointer -- could be made explicit... // check that compiler keeps temporary object referenced by local variable +#if defined(__GNUC__) && (__GNUC__ > 12) +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wdangling-reference" +#endif const Handle_Geom_Line& hTmpRef (Handle(Geom_Line)::DownCast (aCurve2)); CHECK(theDI, hTmpRef.get() == aCurve2.get(), "local reference to temporary object (Handle_)"); // check lifetime of temporary object referenced by local variable (base type) const Handle_Geom_Curve& hTmpRefBase (Handle(Geom_Line)::DownCast (aCurve2)); + #if defined(__GNUC__) && (__GNUC__ > 11) +#pragma GCC diagnostic pop +#endif // here we have different behavior for MSVC 2013+ where Handle_ is a class // (compiler creates temporary object of approprtiate type and keeps it living // until the reference is valid) and other compilers where Handle_ is diff --git a/src/STEPCAFControl/STEPCAFControl_Reader.cxx b/src/STEPCAFControl/STEPCAFControl_Reader.cxx index dd9eef42fb..2034d02ded 100644 --- a/src/STEPCAFControl/STEPCAFControl_Reader.cxx +++ b/src/STEPCAFControl/STEPCAFControl_Reader.cxx @@ -1303,7 +1303,7 @@ static Standard_Boolean IsOverriden(const Interface_Graph& theGraph, return Standard_True; } // for root style returns true only if it is overridden by other root style - const Handle(Standard_Transient)& anItem = anOverRidingStyle->ItemAP242().Value(); + const Handle(Standard_Transient) anItem = anOverRidingStyle->ItemAP242().Value(); if(!anItem.IsNull() && anItem->IsKind(STANDARD_TYPE(StepShape_ShapeRepresentation))) { return Standard_True; diff --git a/src/TopOpeBRepBuild/TopOpeBRepBuild_GridEE.cxx b/src/TopOpeBRepBuild/TopOpeBRepBuild_GridEE.cxx index d1f6ca0f99..8042556fc4 100644 --- a/src/TopOpeBRepBuild/TopOpeBRepBuild_GridEE.cxx +++ b/src/TopOpeBRepBuild/TopOpeBRepBuild_GridEE.cxx @@ -678,7 +678,7 @@ void TopOpeBRepBuild_Builder::GFillPointTopologyPVS(const TopoDS_Shape& E, Handle(TopOpeBRepBuild_Pave) PV = new TopOpeBRepBuild_Pave(VPV,par,vofe); if (hasVSD) { PV->HasSameDomain(Standard_True); - const TopoDS_Shape& VSD = myDataStructure->SameDomain(VPV).Value(); + const TopoDS_Shape& VSD = myDataStructure->DS().ShapeSameDomain(VPV).First(); Standard_Integer iVSD = myDataStructure->Shape(VSD); if (iVSD == iVRE) PV->SameDomain(VIG); else PV->SameDomain(VSD); @@ -712,7 +712,7 @@ void TopOpeBRepBuild_Builder::GFillPointTopologyPVS(const TopoDS_Shape& E, Handle(TopOpeBRepBuild_Pave) PVF = new TopOpeBRepBuild_Pave(VPV,parf,vfofe); if (hasVSD) { PVF->HasSameDomain(Standard_True); - const TopoDS_Shape& VSD = myDataStructure->SameDomain(VPV).Value(); + const TopoDS_Shape& VSD = myDataStructure->DS().ShapeSameDomain(VPV).First(); Standard_Integer iVSD = myDataStructure->Shape(VSD); if (iVSD == iVRE) PVF->SameDomain(VIG); else PVF->SameDomain(VSD); @@ -733,7 +733,7 @@ void TopOpeBRepBuild_Builder::GFillPointTopologyPVS(const TopoDS_Shape& E, Handle(TopOpeBRepBuild_Pave) PVR = new TopOpeBRepBuild_Pave(VPV,parl,vrofe); if (hasVSD) { PVR->HasSameDomain(Standard_True); - const TopoDS_Shape& VSD = myDataStructure->SameDomain(VPV).Value(); + const TopoDS_Shape& VSD = myDataStructure->DS().ShapeSameDomain(VPV).First(); Standard_Integer iVSD = myDataStructure->Shape(VSD); if (iVSD == iVRE) PVR->SameDomain(VIG); else PVR->SameDomain(VSD); From 1b5fc7f98011426f89abd85bf59be81c44f3f92f Mon Sep 17 00:00:00 2001 From: dpasukhi Date: Mon, 7 Oct 2024 22:04:51 +0000 Subject: [PATCH 628/639] Configuration - CMake extension with PCH and symlink #90 Removed cotire PCH Integrated native PCH by CMake with the same BUILD_USE_PCH flag Added new option to avoid extra files in 'build/include' folder and replace it by symlink Symlink creates link to the origin file, it has some benefits from debug and build side. The CMake parameter for symlink is 'BUILD_INCLUDE_SYMLINK' --- .../build-linux-clang-x64-dynamic.yml | 2 + .../workflows/build-linux-gcc-x64-dynamic.yml | 2 + .../build-macos-clang-x64-dynamic.yml | 2 + .../build-windows-msvc-x64-dynamic.yml | 2 +- CMakeLists.txt | 39 +- adm/cmake/3rdparty_macro.cmake | 22 + adm/cmake/cotire.cmake | 4212 ----------------- adm/cmake/flex.cmake | 10 + adm/cmake/occt_macros.cmake | 426 +- adm/cmake/occt_toolkit.cmake | 352 +- adm/cmake/vardescr.cmake | 5 + dox/introduction/introduction.md | 5 - src/DRAWEXE/CMakeLists.txt | 4 + src/TKBRep/CMakeLists.txt | 3 + src/TKBRep/TKBRep_pch.hxx | 33 + src/TKDEGLTF/CMakeLists.txt | 2 + src/TKDESTEP/CMakeLists.txt | 2 + src/TKDraw/CMakeLists.txt | 4 + src/TKMath/CMakeLists.txt | 3 + src/TKMath/PACKAGES | 1 - src/TKMath/TKMath_pch.hxx | 29 + src/TKOpenGl/CMakeLists.txt | 6 +- src/TKOpenGles/CMakeLists.txt | 7 +- src/TKRWMesh/CMakeLists.txt | 2 + src/TKService/CMakeLists.txt | 6 +- src/TKViewerTest/CMakeLists.txt | 4 + src/TKXCAF/CMakeLists.txt | 2 - src/TKXDEDRAW/CMakeLists.txt | 2 - src/TKernel/CMakeLists.txt | 3 + src/TKernel/PACKAGES | 1 + src/TKernel/TKernel_pch.hxx | 51 + tools/CMakeLists.txt | 20 +- tools/TKDFBrowser/CMakeLists.txt | 2 - tools/TKMessageModel/CMakeLists.txt | 2 - tools/TKMessageView/CMakeLists.txt | 2 - tools/TKShapeView/CMakeLists.txt | 2 - tools/TKTInspector/CMakeLists.txt | 2 - tools/TKTreeModel/CMakeLists.txt | 2 - tools/TKVInspector/CMakeLists.txt | 2 - tools/TKView/CMakeLists.txt | 2 - 40 files changed, 544 insertions(+), 4736 deletions(-) delete mode 100644 adm/cmake/cotire.cmake create mode 100644 src/TKBRep/TKBRep_pch.hxx create mode 100644 src/TKMath/TKMath_pch.hxx create mode 100644 src/TKernel/TKernel_pch.hxx diff --git a/.github/workflows/build-linux-clang-x64-dynamic.yml b/.github/workflows/build-linux-clang-x64-dynamic.yml index 29786f04ca..fe9a50c4a3 100644 --- a/.github/workflows/build-linux-clang-x64-dynamic.yml +++ b/.github/workflows/build-linux-clang-x64-dynamic.yml @@ -31,6 +31,8 @@ jobs: cmake -G "Unix Makefiles" \ -D CMAKE_C_COMPILER=clang \ -D CMAKE_CXX_COMPILER=clang++ \ + -D BUILD_USE_PCH=ON \ + -D BUILD_INCLUDE_SYMLINK=ON \ -D USE_FREETYPE=OFF \ -D CMAKE_BUILD_TYPE=Release .. diff --git a/.github/workflows/build-linux-gcc-x64-dynamic.yml b/.github/workflows/build-linux-gcc-x64-dynamic.yml index 14b2d1450f..7985f140c1 100644 --- a/.github/workflows/build-linux-gcc-x64-dynamic.yml +++ b/.github/workflows/build-linux-gcc-x64-dynamic.yml @@ -32,6 +32,8 @@ jobs: -D CMAKE_C_COMPILER=gcc \ -D CMAKE_CXX_COMPILER=g++ \ -D USE_FREETYPE=OFF \ + -D BUILD_USE_PCH=ON \ + -D BUILD_INCLUDE_SYMLINK=ON \ -D CMAKE_BUILD_TYPE=Release \ -D CMAKE_C_FLAGS="-Werror -Wno-clobbered -Wmaybe-uninitialized -Wodr -Wno-alloc-size-larger-than" \ -D CMAKE_CXX_FLAGS="-Werror -Wno-clobbered -Wno-dangling-pointer" .. diff --git a/.github/workflows/build-macos-clang-x64-dynamic.yml b/.github/workflows/build-macos-clang-x64-dynamic.yml index 07339979e1..be1e38c115 100644 --- a/.github/workflows/build-macos-clang-x64-dynamic.yml +++ b/.github/workflows/build-macos-clang-x64-dynamic.yml @@ -35,6 +35,8 @@ jobs: -D CMAKE_C_COMPILER=clang \ -D CMAKE_CXX_COMPILER=clang++ \ -D USE_FREETYPE=OFF \ + -D BUILD_USE_PCH=ON \ + -D BUILD_INCLUDE_SYMLINK=ON \ -D CMAKE_BUILD_TYPE=Release .. - name: Build OCCT diff --git a/.github/workflows/build-windows-msvc-x64-dynamic.yml b/.github/workflows/build-windows-msvc-x64-dynamic.yml index 7cce4fd086..f0fcabdf8b 100644 --- a/.github/workflows/build-windows-msvc-x64-dynamic.yml +++ b/.github/workflows/build-windows-msvc-x64-dynamic.yml @@ -36,7 +36,7 @@ jobs: run: | mkdir build cd build - cmake -T host=x64 -D USE_FREETYPE=OFF -D BUILD_MODULE_Draw=OFF -D CMAKE_BUILD_TYPE=Release -D CMAKE_C_FLAGS="/WX" -D CMAKE_CXX_FLAGS="/WX" .. + cmake -T host=x64 -D USE_FREETYPE=OFF -D BUILD_USE_PCH=ON -D BUILD_INCLUDE_SYMLINK=ON -D BUILD_MODULE_Draw=OFF -D CMAKE_BUILD_TYPE=Release -D CMAKE_C_FLAGS="/WX" -D CMAKE_CXX_FLAGS="/WX" .. - name: Build OCCT run: | diff --git a/CMakeLists.txt b/CMakeLists.txt index 26208e0479..6cd051909d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required (VERSION 3.1 FATAL_ERROR) +cmake_minimum_required (VERSION 3.5 FATAL_ERROR) set (CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/adm/cmake") @@ -148,24 +148,16 @@ if (NOT DEFINED BUILD_USE_PCH) set (BUILD_USE_PCH OFF CACHE BOOL "${BUILD_USE_PCH_DESCR}") endif() -if (BUILD_USE_PCH) - - # Load Cotire tool for accelerating build procedure - include(cotire) - - # Set Cotire to ignore lxx, pxx, gxx - set (COTIRE_ADDITIONAL_PREFIX_HEADER_IGNORE_EXTENSIONS "lxx;pxx;gxx" CACHE STRING "Set Cotire to ignore OCCT specific files that can be #included" FORCE) +if (CMAKE_VERSION VERSION_LESS "3.16") + OCCT_CHECK_AND_UNSET (BUILD_USE_PCH) +endif() - # Set priority for inclusion of system headers in PCH to reduce problems - # due to incomplete inclusion or wrong order. - if (WIN32) - # on Windows, assume that SDK (windows.h) is in default location - set(ProgramFilesX86 "ProgramFiles(x86)") - file(TO_CMAKE_PATH "$ENV{${ProgramFilesX86}}" ProgramFilesX86) - set_property (DIRECTORY PROPERTY COTIRE_PREFIX_HEADER_INCLUDE_PRIORITY_PATH "${ProgramFilesX86}") - unset(ProgramFilesX86) - endif() +if (NOT DEFINED BUILD_INCLUDE_SYMLINK) + set (BUILD_INCLUDE_SYMLINK OFF CACHE BOOL "${BUILD_INCLUDE_SYMLINK_DESCR}") +endif() +if (CMAKE_VERSION VERSION_LESS "3.14") + OCCT_CHECK_AND_UNSET (BUILD_INCLUDE_SYMLINK) endif() # copy samples to install directory @@ -503,12 +495,16 @@ endforeach() # accumulate all used toolkits list (REMOVE_DUPLICATES BUILD_TOOLKITS) set (RAW_BUILD_TOOLKITS) +set (OCCT_FULL_LIST_OF_INCLUDES) foreach (BUILD_TOOLKIT ${BUILD_TOOLKITS}) - OCCT_TOOLKIT_FULL_DEP (${BUILD_TOOLKIT} TOOLKIT_FULL_DEPS) + EXCTRACT_TOOLKIT_FULL_DEPS ("src" ${BUILD_TOOLKIT} TOOLKIT_FULL_DEPS TOOLKIT_INCLUDES) + list (APPEND OCCT_FULL_LIST_OF_INCLUDES ${TOOLKIT_INCLUDES}) list (APPEND RAW_BUILD_TOOLKITS ${BUILD_TOOLKIT} ${TOOLKIT_FULL_DEPS}) endforeach() list (REMOVE_DUPLICATES RAW_BUILD_TOOLKITS) +list (REMOVE_DUPLICATES OCCT_FULL_LIST_OF_INCLUDES) + set (BUILD_TOOLKITS ${RAW_BUILD_TOOLKITS}) # include the patched or original list of definitions and flags @@ -875,6 +871,9 @@ if (3RDPARTY_INCLUDE_DIRS) include_directories (${3RDPARTY_INCLUDE_DIRS}) endif() +# Ensure the include directory exists +file(MAKE_DIRECTORY "${CMAKE_BINARY_DIR}/${INSTALL_DIR_INCLUDE}") + # include /inc include_directories (${CMAKE_BINARY_DIR}/${INSTALL_DIR_INCLUDE}) @@ -932,7 +931,7 @@ string(TIMESTAMP CURRENT_TIME "%H:%M:%S") message (STATUS "\nInfo: \(${CURRENT_TIME}\) Start collecting all OCCT header files into ${CMAKE_BINARY_DIR}/inc ...") # collect all the headers to /inc folder -COLLECT_AND_INSTALL_OCCT_HEADER_FILES ("${CMAKE_BINARY_DIR}" "${BUILD_TOOLKITS}" "${CMAKE_SOURCE_DIR}/src" "${INSTALL_DIR_INCLUDE}") +COLLECT_AND_INSTALL_OCCT_HEADER_FILES ("${CMAKE_BINARY_DIR}" "${BUILD_TOOLKITS}" "src" "${INSTALL_DIR_INCLUDE}") string(TIMESTAMP CURRENT_TIME "%H:%M:%S") message (STATUS "Info: \(${CURRENT_TIME}\) End the collecting") @@ -964,7 +963,7 @@ if (BUILD_Inspector) # collect all the headers to /inc/inspector folder string(TIMESTAMP CURRENT_TIME "%H:%M:%S") message (STATUS "\nInfo: \(${CURRENT_TIME}\) Start collecting all OCCT tool header files into ${CMAKE_BINARY_DIR}/inc/inspector ...") - COLLECT_AND_INSTALL_OCCT_HEADER_FILES ("${CMAKE_BINARY_DIR}" "${BUILD_TOOL_TOOLKITS}" "${CMAKE_SOURCE_DIR}/tools" "${INSTALL_DIR_INCLUDE}/inspector") + COLLECT_AND_INSTALL_OCCT_HEADER_FILES ("${CMAKE_BINARY_DIR}" "${BUILD_TOOL_TOOLKITS}" "tools" "${INSTALL_DIR_INCLUDE}/inspector") endif() # OCCT samples diff --git a/adm/cmake/3rdparty_macro.cmake b/adm/cmake/3rdparty_macro.cmake index 13aec5fb1c..bb4962a6c6 100644 --- a/adm/cmake/3rdparty_macro.cmake +++ b/adm/cmake/3rdparty_macro.cmake @@ -363,3 +363,25 @@ macro (COMPLIANCE_PRODUCT_CONSISTENCY LIBNAME) endif() endif() endmacro() + +macro(CONFIGURE_DRACO_DEPS) + if (USE_DRACO) + set (USED_LIB_RELEASE ${3RDPARTY_DRACO_LIBRARY}) + if (WIN32) + set (USED_LIB_DEBUG ${3RDPARTY_DRACO_LIBRARY_DEBUG}) + else() + set (USED_LIB_DEBUG ${3RDPARTY_DRACO_LIBRARY}) + endif() + set (USED_LIB_CONF) + if (EXISTS ${USED_LIB_DEBUG}) + set (USED_LIB_CONF "$<$:${USED_LIB_DEBUG}>;${USED_LIB_CONF}") + endif() + if (EXISTS ${USED_LIB_RELEASE}) + set (USED_LIB_CONF "$<$:${USED_LIB_RELEASE}>;${USED_LIB_CONF}") + set (USED_LIB_CONF "$<$:${USED_LIB_RELEASE}>;${USED_LIB_CONF}") + endif() + if (DEFINED USED_LIB_CONF) + set_property (TARGET ${PROJECT_NAME} APPEND PROPERTY LINK_LIBRARIES "${USED_LIB_CONF}") + endif() + endif() +endmacro() diff --git a/adm/cmake/cotire.cmake b/adm/cmake/cotire.cmake deleted file mode 100644 index 40372b8457..0000000000 --- a/adm/cmake/cotire.cmake +++ /dev/null @@ -1,4212 +0,0 @@ -# - cotire (compile time reducer) -# -# See the cotire manual for usage hints. -# -#============================================================================= -# Copyright 2012-2018 Sascha Kratky -# -# Permission is hereby granted, free of charge, to any person -# obtaining a copy of this software and associated documentation -# files (the "Software"), to deal in the Software without -# restriction, including without limitation the rights to use, -# copy, modify, merge, publish, distribute, sublicense, and/or sell -# copies of the Software, and to permit persons to whom the -# Software is furnished to do so, subject to the following -# conditions: -# -# The above copyright notice and this permission notice shall be -# included in all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES -# OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT -# HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -# OTHER DEALINGS IN THE SOFTWARE. -#============================================================================= - -if(__COTIRE_INCLUDED) - return() -endif() -set(__COTIRE_INCLUDED TRUE) - -# call cmake_minimum_required, but prevent modification of the CMake policy stack in include mode -# cmake_minimum_required also sets the policy version as a side effect, which we have to avoid -if (NOT CMAKE_SCRIPT_MODE_FILE) - cmake_policy(PUSH) -endif() -cmake_minimum_required(VERSION 2.8.12) -if (NOT CMAKE_SCRIPT_MODE_FILE) - cmake_policy(POP) -endif() - -set (COTIRE_CMAKE_MODULE_FILE "${CMAKE_CURRENT_LIST_FILE}") -set (COTIRE_CMAKE_MODULE_VERSION "1.8.1") - -# activate select policies -if (POLICY CMP0025) - # Compiler id for Apple Clang is now AppleClang - cmake_policy(SET CMP0025 NEW) -endif() - -if (POLICY CMP0026) - # disallow use of the LOCATION target property - cmake_policy(SET CMP0026 NEW) -endif() - -if (POLICY CMP0038) - # targets may not link directly to themselves - cmake_policy(SET CMP0038 NEW) -endif() - -if (POLICY CMP0039) - # utility targets may not have link dependencies - cmake_policy(SET CMP0039 NEW) -endif() - -if (POLICY CMP0040) - # target in the TARGET signature of add_custom_command() must exist - cmake_policy(SET CMP0040 NEW) -endif() - -if (POLICY CMP0045) - # error on non-existent target in get_target_property - cmake_policy(SET CMP0045 NEW) -endif() - -if (POLICY CMP0046) - # error on non-existent dependency in add_dependencies - cmake_policy(SET CMP0046 NEW) -endif() - -if (POLICY CMP0049) - # do not expand variables in target source entries - cmake_policy(SET CMP0049 NEW) -endif() - -if (POLICY CMP0050) - # disallow add_custom_command SOURCE signatures - cmake_policy(SET CMP0050 NEW) -endif() - -if (POLICY CMP0051) - # include TARGET_OBJECTS expressions in a target's SOURCES property - cmake_policy(SET CMP0051 NEW) -endif() - -if (POLICY CMP0053) - # simplify variable reference and escape sequence evaluation - cmake_policy(SET CMP0053 NEW) -endif() - -if (POLICY CMP0054) - # only interpret if() arguments as variables or keywords when unquoted - cmake_policy(SET CMP0054 NEW) -endif() - -if (POLICY CMP0055) - # strict checking for break() command - cmake_policy(SET CMP0055 NEW) -endif() - -include(CMakeParseArguments) -include(ProcessorCount) - -function (cotire_get_configuration_types _configsVar) - set (_configs "") - if (CMAKE_CONFIGURATION_TYPES) - list (APPEND _configs ${CMAKE_CONFIGURATION_TYPES}) - endif() - if (CMAKE_BUILD_TYPE) - list (APPEND _configs "${CMAKE_BUILD_TYPE}") - endif() - if (_configs) - list (REMOVE_DUPLICATES _configs) - set (${_configsVar} ${_configs} PARENT_SCOPE) - else() - set (${_configsVar} "None" PARENT_SCOPE) - endif() -endfunction() - -function (cotire_get_source_file_extension _sourceFile _extVar) - # get_filename_component returns extension from first occurrence of . in file name - # this function computes the extension from last occurrence of . in file name - string (FIND "${_sourceFile}" "." _index REVERSE) - if (_index GREATER -1) - math (EXPR _index "${_index} + 1") - string (SUBSTRING "${_sourceFile}" ${_index} -1 _sourceExt) - else() - set (_sourceExt "") - endif() - set (${_extVar} "${_sourceExt}" PARENT_SCOPE) -endfunction() - -macro (cotire_check_is_path_relative_to _path _isRelativeVar) - set (${_isRelativeVar} FALSE) - if (IS_ABSOLUTE "${_path}") - foreach (_dir ${ARGN}) - file (RELATIVE_PATH _relPath "${_dir}" "${_path}") - if (NOT _relPath OR (NOT IS_ABSOLUTE "${_relPath}" AND NOT "${_relPath}" MATCHES "^\\.\\.")) - set (${_isRelativeVar} TRUE) - break() - endif() - endforeach() - endif() -endmacro() - -function (cotire_filter_language_source_files _language _target _sourceFilesVar _excludedSourceFilesVar _cotiredSourceFilesVar) - if (CMAKE_${_language}_SOURCE_FILE_EXTENSIONS) - set (_languageExtensions "${CMAKE_${_language}_SOURCE_FILE_EXTENSIONS}") - else() - set (_languageExtensions "") - endif() - if (CMAKE_${_language}_IGNORE_EXTENSIONS) - set (_ignoreExtensions "${CMAKE_${_language}_IGNORE_EXTENSIONS}") - else() - set (_ignoreExtensions "") - endif() - if (COTIRE_UNITY_SOURCE_EXCLUDE_EXTENSIONS) - set (_excludeExtensions "${COTIRE_UNITY_SOURCE_EXCLUDE_EXTENSIONS}") - else() - set (_excludeExtensions "") - endif() - if (COTIRE_DEBUG AND _languageExtensions) - message (STATUS "${_language} source file extensions: ${_languageExtensions}") - endif() - if (COTIRE_DEBUG AND _ignoreExtensions) - message (STATUS "${_language} ignore extensions: ${_ignoreExtensions}") - endif() - if (COTIRE_DEBUG AND _excludeExtensions) - message (STATUS "${_language} exclude extensions: ${_excludeExtensions}") - endif() - if (CMAKE_VERSION VERSION_LESS "3.1.0") - set (_allSourceFiles ${ARGN}) - else() - # as of CMake 3.1 target sources may contain generator expressions - # since we cannot obtain required property information about source files added - # through generator expressions at configure time, we filter them out - string (GENEX_STRIP "${ARGN}" _allSourceFiles) - endif() - set (_filteredSourceFiles "") - set (_excludedSourceFiles "") - foreach (_sourceFile ${_allSourceFiles}) - get_source_file_property(_sourceIsHeaderOnly "${_sourceFile}" HEADER_FILE_ONLY) - get_source_file_property(_sourceIsExternal "${_sourceFile}" EXTERNAL_OBJECT) - get_source_file_property(_sourceIsSymbolic "${_sourceFile}" SYMBOLIC) - if (NOT _sourceIsHeaderOnly AND NOT _sourceIsExternal AND NOT _sourceIsSymbolic) - cotire_get_source_file_extension("${_sourceFile}" _sourceExt) - if (_sourceExt) - list (FIND _ignoreExtensions "${_sourceExt}" _ignoreIndex) - if (_ignoreIndex LESS 0) - list (FIND _excludeExtensions "${_sourceExt}" _excludeIndex) - if (_excludeIndex GREATER -1) - list (APPEND _excludedSourceFiles "${_sourceFile}") - else() - list (FIND _languageExtensions "${_sourceExt}" _sourceIndex) - if (_sourceIndex GREATER -1) - # consider source file unless it is excluded explicitly - get_source_file_property(_sourceIsExcluded "${_sourceFile}" COTIRE_EXCLUDED) - if (_sourceIsExcluded) - list (APPEND _excludedSourceFiles "${_sourceFile}") - else() - list (APPEND _filteredSourceFiles "${_sourceFile}") - endif() - else() - get_source_file_property(_sourceLanguage "${_sourceFile}" LANGUAGE) - if ("${_sourceLanguage}" STREQUAL "${_language}") - # add to excluded sources, if file is not ignored and has correct language without having the correct extension - list (APPEND _excludedSourceFiles "${_sourceFile}") - endif() - endif() - endif() - endif() - endif() - endif() - endforeach() - # separate filtered source files from already cotired ones - # the COTIRE_TARGET property of a source file may be set while a target is being processed by cotire - set (_sourceFiles "") - set (_cotiredSourceFiles "") - foreach (_sourceFile ${_filteredSourceFiles}) - get_source_file_property(_sourceIsCotired "${_sourceFile}" COTIRE_TARGET) - if (_sourceIsCotired) - list (APPEND _cotiredSourceFiles "${_sourceFile}") - else() - get_source_file_property(_sourceCompileFlags "${_sourceFile}" COMPILE_FLAGS) - if (_sourceCompileFlags) - # add to excluded sources, if file has custom compile flags - list (APPEND _excludedSourceFiles "${_sourceFile}") - else() - get_source_file_property(_sourceCompileOptions "${_sourceFile}" COMPILE_OPTIONS) - if (_sourceCompileOptions) - # add to excluded sources, if file has list of custom compile options - list (APPEND _excludedSourceFiles "${_sourceFile}") - else() - list (APPEND _sourceFiles "${_sourceFile}") - endif() - endif() - endif() - endforeach() - if (COTIRE_DEBUG) - if (_sourceFiles) - message (STATUS "Filtered ${_target} ${_language} sources: ${_sourceFiles}") - endif() - if (_excludedSourceFiles) - message (STATUS "Excluded ${_target} ${_language} sources: ${_excludedSourceFiles}") - endif() - if (_cotiredSourceFiles) - message (STATUS "Cotired ${_target} ${_language} sources: ${_cotiredSourceFiles}") - endif() - endif() - set (${_sourceFilesVar} ${_sourceFiles} PARENT_SCOPE) - set (${_excludedSourceFilesVar} ${_excludedSourceFiles} PARENT_SCOPE) - set (${_cotiredSourceFilesVar} ${_cotiredSourceFiles} PARENT_SCOPE) -endfunction() - -function (cotire_get_objects_with_property_on _filteredObjectsVar _property _type) - set (_filteredObjects "") - foreach (_object ${ARGN}) - get_property(_isSet ${_type} "${_object}" PROPERTY ${_property} SET) - if (_isSet) - get_property(_propertyValue ${_type} "${_object}" PROPERTY ${_property}) - if (_propertyValue) - list (APPEND _filteredObjects "${_object}") - endif() - endif() - endforeach() - set (${_filteredObjectsVar} ${_filteredObjects} PARENT_SCOPE) -endfunction() - -function (cotire_get_objects_with_property_off _filteredObjectsVar _property _type) - set (_filteredObjects "") - foreach (_object ${ARGN}) - get_property(_isSet ${_type} "${_object}" PROPERTY ${_property} SET) - if (_isSet) - get_property(_propertyValue ${_type} "${_object}" PROPERTY ${_property}) - if (NOT _propertyValue) - list (APPEND _filteredObjects "${_object}") - endif() - endif() - endforeach() - set (${_filteredObjectsVar} ${_filteredObjects} PARENT_SCOPE) -endfunction() - -function (cotire_get_source_file_property_values _valuesVar _property) - set (_values "") - foreach (_sourceFile ${ARGN}) - get_source_file_property(_propertyValue "${_sourceFile}" ${_property}) - if (_propertyValue) - list (APPEND _values "${_propertyValue}") - endif() - endforeach() - set (${_valuesVar} ${_values} PARENT_SCOPE) -endfunction() - -function (cotire_resolve_config_properties _configurations _propertiesVar) - set (_properties "") - foreach (_property ${ARGN}) - if ("${_property}" MATCHES "") - foreach (_config ${_configurations}) - string (TOUPPER "${_config}" _upperConfig) - string (REPLACE "" "${_upperConfig}" _configProperty "${_property}") - list (APPEND _properties ${_configProperty}) - endforeach() - else() - list (APPEND _properties ${_property}) - endif() - endforeach() - set (${_propertiesVar} ${_properties} PARENT_SCOPE) -endfunction() - -function (cotire_copy_set_properties _configurations _type _source _target) - cotire_resolve_config_properties("${_configurations}" _properties ${ARGN}) - foreach (_property ${_properties}) - get_property(_isSet ${_type} ${_source} PROPERTY ${_property} SET) - if (_isSet) - get_property(_propertyValue ${_type} ${_source} PROPERTY ${_property}) - set_property(${_type} ${_target} PROPERTY ${_property} "${_propertyValue}") - endif() - endforeach() -endfunction() - -function (cotire_get_target_usage_requirements _target _config _targetRequirementsVar) - set (_targetRequirements "") - get_target_property(_librariesToProcess ${_target} LINK_LIBRARIES) - while (_librariesToProcess) - # remove from head - list (GET _librariesToProcess 0 _library) - list (REMOVE_AT _librariesToProcess 0) - if (_library MATCHES "^\\$<\\$:([A-Za-z0-9_:-]+)>$") - set (_library "${CMAKE_MATCH_1}") - elseif (_config STREQUAL "None" AND _library MATCHES "^\\$<\\$:([A-Za-z0-9_:-]+)>$") - set (_library "${CMAKE_MATCH_1}") - endif() - if (TARGET ${_library}) - list (FIND _targetRequirements ${_library} _index) - if (_index LESS 0) - list (APPEND _targetRequirements ${_library}) - # BFS traversal of transitive libraries - get_target_property(_libraries ${_library} INTERFACE_LINK_LIBRARIES) - if (_libraries) - list (APPEND _librariesToProcess ${_libraries}) - list (REMOVE_DUPLICATES _librariesToProcess) - endif() - endif() - endif() - endwhile() - set (${_targetRequirementsVar} ${_targetRequirements} PARENT_SCOPE) -endfunction() - -function (cotire_filter_compile_flags _language _flagFilter _matchedOptionsVar _unmatchedOptionsVar) - if (WIN32 AND CMAKE_${_language}_COMPILER_ID MATCHES "MSVC|Intel") - set (_flagPrefix "[/-]") - else() - set (_flagPrefix "--?") - endif() - set (_optionFlag "") - set (_matchedOptions "") - set (_unmatchedOptions "") - foreach (_compileFlag ${ARGN}) - if (_compileFlag) - if (_optionFlag AND NOT "${_compileFlag}" MATCHES "^${_flagPrefix}") - # option with separate argument - list (APPEND _matchedOptions "${_compileFlag}") - set (_optionFlag "") - elseif ("${_compileFlag}" MATCHES "^(${_flagPrefix})(${_flagFilter})$") - # remember option - set (_optionFlag "${CMAKE_MATCH_2}") - elseif ("${_compileFlag}" MATCHES "^(${_flagPrefix})(${_flagFilter})(.+)$") - # option with joined argument - list (APPEND _matchedOptions "${CMAKE_MATCH_3}") - set (_optionFlag "") - else() - # flush remembered option - if (_optionFlag) - list (APPEND _matchedOptions "${_optionFlag}") - set (_optionFlag "") - endif() - # add to unfiltered options - list (APPEND _unmatchedOptions "${_compileFlag}") - endif() - endif() - endforeach() - if (_optionFlag) - list (APPEND _matchedOptions "${_optionFlag}") - endif() - if (COTIRE_DEBUG AND _matchedOptions) - message (STATUS "Filter ${_flagFilter} matched: ${_matchedOptions}") - endif() - if (COTIRE_DEBUG AND _unmatchedOptions) - message (STATUS "Filter ${_flagFilter} unmatched: ${_unmatchedOptions}") - endif() - set (${_matchedOptionsVar} ${_matchedOptions} PARENT_SCOPE) - set (${_unmatchedOptionsVar} ${_unmatchedOptions} PARENT_SCOPE) -endfunction() - -function (cotire_is_target_supported _target _isSupportedVar) - if (NOT TARGET "${_target}") - set (${_isSupportedVar} FALSE PARENT_SCOPE) - return() - endif() - get_target_property(_imported ${_target} IMPORTED) - if (_imported) - set (${_isSupportedVar} FALSE PARENT_SCOPE) - return() - endif() - get_target_property(_targetType ${_target} TYPE) - if (NOT _targetType MATCHES "EXECUTABLE|(STATIC|SHARED|MODULE|OBJECT)_LIBRARY") - set (${_isSupportedVar} FALSE PARENT_SCOPE) - return() - endif() - set (${_isSupportedVar} TRUE PARENT_SCOPE) -endfunction() - -function (cotire_get_target_compile_flags _config _language _target _flagsVar) - string (TOUPPER "${_config}" _upperConfig) - # collect options from CMake language variables - set (_compileFlags "") - if (CMAKE_${_language}_FLAGS) - set (_compileFlags "${_compileFlags} ${CMAKE_${_language}_FLAGS}") - endif() - if (CMAKE_${_language}_FLAGS_${_upperConfig}) - set (_compileFlags "${_compileFlags} ${CMAKE_${_language}_FLAGS_${_upperConfig}}") - endif() - if (_target) - # add target compile flags - get_target_property(_targetflags ${_target} COMPILE_FLAGS) - if (_targetflags) - set (_compileFlags "${_compileFlags} ${_targetflags}") - endif() - endif() - if (UNIX) - separate_arguments(_compileFlags UNIX_COMMAND "${_compileFlags}") - elseif(WIN32) - separate_arguments(_compileFlags WINDOWS_COMMAND "${_compileFlags}") - else() - separate_arguments(_compileFlags) - endif() - # target compile options - if (_target) - get_target_property(_targetOptions ${_target} COMPILE_OPTIONS) - if (_targetOptions) - list (APPEND _compileFlags ${_targetOptions}) - endif() - endif() - # interface compile options from linked library targets - if (_target) - set (_linkedTargets "") - cotire_get_target_usage_requirements(${_target} ${_config} _linkedTargets) - foreach (_linkedTarget ${_linkedTargets}) - get_target_property(_targetOptions ${_linkedTarget} INTERFACE_COMPILE_OPTIONS) - if (_targetOptions) - list (APPEND _compileFlags ${_targetOptions}) - endif() - endforeach() - endif() - # handle language standard properties - if (CMAKE_${_language}_STANDARD_DEFAULT) - # used compiler supports language standard levels - if (_target) - get_target_property(_targetLanguageStandard ${_target} ${_language}_STANDARD) - if (_targetLanguageStandard) - set (_type "EXTENSION") - get_property(_isSet TARGET ${_target} PROPERTY ${_language}_EXTENSIONS SET) - if (_isSet) - get_target_property(_targetUseLanguageExtensions ${_target} ${_language}_EXTENSIONS) - if (NOT _targetUseLanguageExtensions) - set (_type "STANDARD") - endif() - endif() - if (CMAKE_${_language}${_targetLanguageStandard}_${_type}_COMPILE_OPTION) - list (APPEND _compileFlags "${CMAKE_${_language}${_targetLanguageStandard}_${_type}_COMPILE_OPTION}") - endif() - endif() - endif() - endif() - # handle the POSITION_INDEPENDENT_CODE target property - if (_target) - get_target_property(_targetPIC ${_target} POSITION_INDEPENDENT_CODE) - if (_targetPIC) - get_target_property(_targetType ${_target} TYPE) - if (_targetType STREQUAL "EXECUTABLE" AND CMAKE_${_language}_COMPILE_OPTIONS_PIE) - list (APPEND _compileFlags "${CMAKE_${_language}_COMPILE_OPTIONS_PIE}") - elseif (CMAKE_${_language}_COMPILE_OPTIONS_PIC) - list (APPEND _compileFlags "${CMAKE_${_language}_COMPILE_OPTIONS_PIC}") - endif() - endif() - endif() - # handle visibility target properties - if (_target) - get_target_property(_targetVisibility ${_target} ${_language}_VISIBILITY_PRESET) - if (_targetVisibility AND CMAKE_${_language}_COMPILE_OPTIONS_VISIBILITY) - list (APPEND _compileFlags "${CMAKE_${_language}_COMPILE_OPTIONS_VISIBILITY}${_targetVisibility}") - endif() - get_target_property(_targetVisibilityInlines ${_target} VISIBILITY_INLINES_HIDDEN) - if (_targetVisibilityInlines AND CMAKE_${_language}_COMPILE_OPTIONS_VISIBILITY_INLINES_HIDDEN) - list (APPEND _compileFlags "${CMAKE_${_language}_COMPILE_OPTIONS_VISIBILITY_INLINES_HIDDEN}") - endif() - endif() - # platform specific flags - if (APPLE) - get_target_property(_architectures ${_target} OSX_ARCHITECTURES_${_upperConfig}) - if (NOT _architectures) - get_target_property(_architectures ${_target} OSX_ARCHITECTURES) - endif() - if (_architectures) - foreach (_arch ${_architectures}) - list (APPEND _compileFlags "-arch" "${_arch}") - endforeach() - endif() - if (CMAKE_OSX_SYSROOT) - if (CMAKE_${_language}_SYSROOT_FLAG) - list (APPEND _compileFlags "${CMAKE_${_language}_SYSROOT_FLAG}" "${CMAKE_OSX_SYSROOT}") - else() - list (APPEND _compileFlags "-isysroot" "${CMAKE_OSX_SYSROOT}") - endif() - endif() - if (CMAKE_OSX_DEPLOYMENT_TARGET) - if (CMAKE_${_language}_OSX_DEPLOYMENT_TARGET_FLAG) - list (APPEND _compileFlags "${CMAKE_${_language}_OSX_DEPLOYMENT_TARGET_FLAG}${CMAKE_OSX_DEPLOYMENT_TARGET}") - else() - list (APPEND _compileFlags "-mmacosx-version-min=${CMAKE_OSX_DEPLOYMENT_TARGET}") - endif() - endif() - endif() - if (COTIRE_DEBUG AND _compileFlags) - message (STATUS "Target ${_target} compile flags: ${_compileFlags}") - endif() - set (${_flagsVar} ${_compileFlags} PARENT_SCOPE) -endfunction() - -function (cotire_get_target_include_directories _config _language _target _includeDirsVar _systemIncludeDirsVar) - set (_includeDirs "") - set (_systemIncludeDirs "") - # default include dirs - if (CMAKE_INCLUDE_CURRENT_DIR) - list (APPEND _includeDirs "${CMAKE_CURRENT_BINARY_DIR}") - list (APPEND _includeDirs "${CMAKE_CURRENT_SOURCE_DIR}") - endif() - set (_targetFlags "") - cotire_get_target_compile_flags("${_config}" "${_language}" "${_target}" _targetFlags) - # parse additional include directories from target compile flags - if (CMAKE_INCLUDE_FLAG_${_language}) - string (STRIP "${CMAKE_INCLUDE_FLAG_${_language}}" _includeFlag) - string (REGEX REPLACE "^[-/]+" "" _includeFlag "${_includeFlag}") - if (_includeFlag) - set (_dirs "") - cotire_filter_compile_flags("${_language}" "${_includeFlag}" _dirs _ignore ${_targetFlags}) - if (_dirs) - list (APPEND _includeDirs ${_dirs}) - endif() - endif() - endif() - # parse additional system include directories from target compile flags - if (CMAKE_INCLUDE_SYSTEM_FLAG_${_language}) - string (STRIP "${CMAKE_INCLUDE_SYSTEM_FLAG_${_language}}" _includeFlag) - string (REGEX REPLACE "^[-/]+" "" _includeFlag "${_includeFlag}") - if (_includeFlag) - set (_dirs "") - cotire_filter_compile_flags("${_language}" "${_includeFlag}" _dirs _ignore ${_targetFlags}) - if (_dirs) - list (APPEND _systemIncludeDirs ${_dirs}) - endif() - endif() - endif() - # target include directories - get_directory_property(_dirs DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}" INCLUDE_DIRECTORIES) - if (_target) - get_target_property(_targetDirs ${_target} INCLUDE_DIRECTORIES) - if (_targetDirs) - list (APPEND _dirs ${_targetDirs}) - endif() - get_target_property(_targetDirs ${_target} INTERFACE_SYSTEM_INCLUDE_DIRECTORIES) - if (_targetDirs) - list (APPEND _systemIncludeDirs ${_targetDirs}) - endif() - endif() - # interface include directories from linked library targets - if (_target) - set (_linkedTargets "") - cotire_get_target_usage_requirements(${_target} ${_config} _linkedTargets) - foreach (_linkedTarget ${_linkedTargets}) - get_target_property(_linkedTargetType ${_linkedTarget} TYPE) - if (CMAKE_INCLUDE_CURRENT_DIR_IN_INTERFACE AND NOT CMAKE_VERSION VERSION_LESS "3.4.0" AND - _linkedTargetType MATCHES "(STATIC|SHARED|MODULE|OBJECT)_LIBRARY") - # CMAKE_INCLUDE_CURRENT_DIR_IN_INTERFACE refers to CMAKE_CURRENT_BINARY_DIR and CMAKE_CURRENT_SOURCE_DIR - # at the time, when the target was created. These correspond to the target properties BINARY_DIR and SOURCE_DIR - # which are only available with CMake 3.4 or later. - get_target_property(_targetDirs ${_linkedTarget} BINARY_DIR) - if (_targetDirs) - list (APPEND _dirs ${_targetDirs}) - endif() - get_target_property(_targetDirs ${_linkedTarget} SOURCE_DIR) - if (_targetDirs) - list (APPEND _dirs ${_targetDirs}) - endif() - endif() - get_target_property(_targetDirs ${_linkedTarget} INTERFACE_INCLUDE_DIRECTORIES) - if (_targetDirs) - list (APPEND _dirs ${_targetDirs}) - endif() - get_target_property(_targetDirs ${_linkedTarget} INTERFACE_SYSTEM_INCLUDE_DIRECTORIES) - if (_targetDirs) - list (APPEND _systemIncludeDirs ${_targetDirs}) - endif() - endforeach() - endif() - if (dirs) - list (REMOVE_DUPLICATES _dirs) - endif() - list (LENGTH _includeDirs _projectInsertIndex) - foreach (_dir ${_dirs}) - if (CMAKE_INCLUDE_DIRECTORIES_PROJECT_BEFORE) - cotire_check_is_path_relative_to("${_dir}" _isRelative "${CMAKE_SOURCE_DIR}" "${CMAKE_BINARY_DIR}") - if (_isRelative) - list (LENGTH _includeDirs _len) - if (_len EQUAL _projectInsertIndex) - list (APPEND _includeDirs "${_dir}") - else() - list (INSERT _includeDirs _projectInsertIndex "${_dir}") - endif() - math (EXPR _projectInsertIndex "${_projectInsertIndex} + 1") - else() - list (APPEND _includeDirs "${_dir}") - endif() - else() - list (APPEND _includeDirs "${_dir}") - endif() - endforeach() - list (REMOVE_DUPLICATES _includeDirs) - list (REMOVE_DUPLICATES _systemIncludeDirs) - if (CMAKE_${_language}_IMPLICIT_INCLUDE_DIRECTORIES) - list (REMOVE_ITEM _includeDirs ${CMAKE_${_language}_IMPLICIT_INCLUDE_DIRECTORIES}) - endif() - if (WIN32 AND NOT MINGW) - # convert Windows paths in include directories to CMake paths - if (_includeDirs) - set (_paths "") - foreach (_dir ${_includeDirs}) - file (TO_CMAKE_PATH "${_dir}" _path) - list (APPEND _paths "${_path}") - endforeach() - set (_includeDirs ${_paths}) - endif() - if (_systemIncludeDirs) - set (_paths "") - foreach (_dir ${_systemIncludeDirs}) - file (TO_CMAKE_PATH "${_dir}" _path) - list (APPEND _paths "${_path}") - endforeach() - set (_systemIncludeDirs ${_paths}) - endif() - endif() - if (COTIRE_DEBUG AND _includeDirs) - message (STATUS "Target ${_target} include dirs: ${_includeDirs}") - endif() - set (${_includeDirsVar} ${_includeDirs} PARENT_SCOPE) - if (COTIRE_DEBUG AND _systemIncludeDirs) - message (STATUS "Target ${_target} system include dirs: ${_systemIncludeDirs}") - endif() - set (${_systemIncludeDirsVar} ${_systemIncludeDirs} PARENT_SCOPE) -endfunction() - -function (cotire_get_target_export_symbol _target _exportSymbolVar) - set (_exportSymbol "") - get_target_property(_targetType ${_target} TYPE) - get_target_property(_enableExports ${_target} ENABLE_EXPORTS) - if (_targetType MATCHES "(SHARED|MODULE)_LIBRARY" OR - (_targetType STREQUAL "EXECUTABLE" AND _enableExports)) - get_target_property(_exportSymbol ${_target} DEFINE_SYMBOL) - if (NOT _exportSymbol) - set (_exportSymbol "${_target}_EXPORTS") - endif() - string (MAKE_C_IDENTIFIER "${_exportSymbol}" _exportSymbol) - endif() - set (${_exportSymbolVar} ${_exportSymbol} PARENT_SCOPE) -endfunction() - -function (cotire_get_target_compile_definitions _config _language _target _definitionsVar) - string (TOUPPER "${_config}" _upperConfig) - set (_configDefinitions "") - # CMAKE_INTDIR for multi-configuration build systems - if (NOT "${CMAKE_CFG_INTDIR}" STREQUAL ".") - list (APPEND _configDefinitions "CMAKE_INTDIR=\"${_config}\"") - endif() - # target export define symbol - cotire_get_target_export_symbol("${_target}" _defineSymbol) - if (_defineSymbol) - list (APPEND _configDefinitions "${_defineSymbol}") - endif() - # directory compile definitions - get_directory_property(_definitions DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}" COMPILE_DEFINITIONS) - if (_definitions) - list (APPEND _configDefinitions ${_definitions}) - endif() - get_directory_property(_definitions DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}" COMPILE_DEFINITIONS_${_upperConfig}) - if (_definitions) - list (APPEND _configDefinitions ${_definitions}) - endif() - # target compile definitions - get_target_property(_definitions ${_target} COMPILE_DEFINITIONS) - if (_definitions) - list (APPEND _configDefinitions ${_definitions}) - endif() - get_target_property(_definitions ${_target} COMPILE_DEFINITIONS_${_upperConfig}) - if (_definitions) - list (APPEND _configDefinitions ${_definitions}) - endif() - # interface compile definitions from linked library targets - set (_linkedTargets "") - cotire_get_target_usage_requirements(${_target} ${_config} _linkedTargets) - foreach (_linkedTarget ${_linkedTargets}) - get_target_property(_definitions ${_linkedTarget} INTERFACE_COMPILE_DEFINITIONS) - if (_definitions) - list (APPEND _configDefinitions ${_definitions}) - endif() - endforeach() - # parse additional compile definitions from target compile flags - # and do not look at directory compile definitions, which we already handled - set (_targetFlags "") - cotire_get_target_compile_flags("${_config}" "${_language}" "${_target}" _targetFlags) - cotire_filter_compile_flags("${_language}" "D" _definitions _ignore ${_targetFlags}) - if (_definitions) - list (APPEND _configDefinitions ${_definitions}) - endif() - list (REMOVE_DUPLICATES _configDefinitions) - if (COTIRE_DEBUG AND _configDefinitions) - message (STATUS "Target ${_target} compile definitions: ${_configDefinitions}") - endif() - set (${_definitionsVar} ${_configDefinitions} PARENT_SCOPE) -endfunction() - -function (cotire_get_target_compiler_flags _config _language _target _compilerFlagsVar) - # parse target compile flags omitting compile definitions and include directives - set (_targetFlags "") - cotire_get_target_compile_flags("${_config}" "${_language}" "${_target}" _targetFlags) - set (_flagFilter "D") - if (CMAKE_INCLUDE_FLAG_${_language}) - string (STRIP "${CMAKE_INCLUDE_FLAG_${_language}}" _includeFlag) - string (REGEX REPLACE "^[-/]+" "" _includeFlag "${_includeFlag}") - if (_includeFlag) - set (_flagFilter "${_flagFilter}|${_includeFlag}") - endif() - endif() - if (CMAKE_INCLUDE_SYSTEM_FLAG_${_language}) - string (STRIP "${CMAKE_INCLUDE_SYSTEM_FLAG_${_language}}" _includeFlag) - string (REGEX REPLACE "^[-/]+" "" _includeFlag "${_includeFlag}") - if (_includeFlag) - set (_flagFilter "${_flagFilter}|${_includeFlag}") - endif() - endif() - set (_compilerFlags "") - cotire_filter_compile_flags("${_language}" "${_flagFilter}" _ignore _compilerFlags ${_targetFlags}) - if (COTIRE_DEBUG AND _compilerFlags) - message (STATUS "Target ${_target} compiler flags: ${_compilerFlags}") - endif() - set (${_compilerFlagsVar} ${_compilerFlags} PARENT_SCOPE) -endfunction() - -function (cotire_add_sys_root_paths _pathsVar) - if (APPLE) - if (CMAKE_OSX_SYSROOT AND CMAKE_${_language}_HAS_ISYSROOT) - foreach (_path IN LISTS ${_pathsVar}) - if (IS_ABSOLUTE "${_path}") - get_filename_component(_path "${CMAKE_OSX_SYSROOT}/${_path}" ABSOLUTE) - if (EXISTS "${_path}") - list (APPEND ${_pathsVar} "${_path}") - endif() - endif() - endforeach() - endif() - endif() - set (${_pathsVar} ${${_pathsVar}} PARENT_SCOPE) -endfunction() - -function (cotire_get_source_extra_properties _sourceFile _pattern _resultVar) - set (_extraProperties ${ARGN}) - set (_result "") - if (_extraProperties) - list (FIND _extraProperties "${_sourceFile}" _index) - if (_index GREATER -1) - math (EXPR _index "${_index} + 1") - list (LENGTH _extraProperties _len) - math (EXPR _len "${_len} - 1") - foreach (_index RANGE ${_index} ${_len}) - list (GET _extraProperties ${_index} _value) - if (_value MATCHES "${_pattern}") - list (APPEND _result "${_value}") - else() - break() - endif() - endforeach() - endif() - endif() - set (${_resultVar} ${_result} PARENT_SCOPE) -endfunction() - -function (cotire_get_source_compile_definitions _config _language _sourceFile _definitionsVar) - set (_compileDefinitions "") - if (NOT CMAKE_SCRIPT_MODE_FILE) - string (TOUPPER "${_config}" _upperConfig) - get_source_file_property(_definitions "${_sourceFile}" COMPILE_DEFINITIONS) - if (_definitions) - list (APPEND _compileDefinitions ${_definitions}) - endif() - get_source_file_property(_definitions "${_sourceFile}" COMPILE_DEFINITIONS_${_upperConfig}) - if (_definitions) - list (APPEND _compileDefinitions ${_definitions}) - endif() - endif() - cotire_get_source_extra_properties("${_sourceFile}" "^[a-zA-Z0-9_]+(=.*)?$" _definitions ${ARGN}) - if (_definitions) - list (APPEND _compileDefinitions ${_definitions}) - endif() - if (COTIRE_DEBUG AND _compileDefinitions) - message (STATUS "Source ${_sourceFile} compile definitions: ${_compileDefinitions}") - endif() - set (${_definitionsVar} ${_compileDefinitions} PARENT_SCOPE) -endfunction() - -function (cotire_get_source_files_compile_definitions _config _language _definitionsVar) - set (_configDefinitions "") - foreach (_sourceFile ${ARGN}) - cotire_get_source_compile_definitions("${_config}" "${_language}" "${_sourceFile}" _sourceDefinitions) - if (_sourceDefinitions) - list (APPEND _configDefinitions "${_sourceFile}" ${_sourceDefinitions} "-") - endif() - endforeach() - set (${_definitionsVar} ${_configDefinitions} PARENT_SCOPE) -endfunction() - -function (cotire_get_source_undefs _sourceFile _property _sourceUndefsVar) - set (_sourceUndefs "") - if (NOT CMAKE_SCRIPT_MODE_FILE) - get_source_file_property(_undefs "${_sourceFile}" ${_property}) - if (_undefs) - list (APPEND _sourceUndefs ${_undefs}) - endif() - endif() - cotire_get_source_extra_properties("${_sourceFile}" "^[a-zA-Z0-9_]+$" _undefs ${ARGN}) - if (_undefs) - list (APPEND _sourceUndefs ${_undefs}) - endif() - if (COTIRE_DEBUG AND _sourceUndefs) - message (STATUS "Source ${_sourceFile} ${_property} undefs: ${_sourceUndefs}") - endif() - set (${_sourceUndefsVar} ${_sourceUndefs} PARENT_SCOPE) -endfunction() - -function (cotire_get_source_files_undefs _property _sourceUndefsVar) - set (_sourceUndefs "") - foreach (_sourceFile ${ARGN}) - cotire_get_source_undefs("${_sourceFile}" ${_property} _undefs) - if (_undefs) - list (APPEND _sourceUndefs "${_sourceFile}" ${_undefs} "-") - endif() - endforeach() - set (${_sourceUndefsVar} ${_sourceUndefs} PARENT_SCOPE) -endfunction() - -macro (cotire_set_cmd_to_prologue _cmdVar) - set (${_cmdVar} "${CMAKE_COMMAND}") - if (COTIRE_DEBUG) - list (APPEND ${_cmdVar} "--warn-uninitialized") - endif() - list (APPEND ${_cmdVar} "-DCOTIRE_BUILD_TYPE:STRING=$") - if (XCODE) - list (APPEND ${_cmdVar} "-DXCODE:BOOL=TRUE") - endif() - if (COTIRE_VERBOSE) - list (APPEND ${_cmdVar} "-DCOTIRE_VERBOSE:BOOL=ON") - elseif("${CMAKE_GENERATOR}" MATCHES "Makefiles") - list (APPEND ${_cmdVar} "-DCOTIRE_VERBOSE:BOOL=$(VERBOSE)") - endif() -endmacro() - -function (cotire_init_compile_cmd _cmdVar _language _compilerLauncher _compilerExe _compilerArg1) - if (NOT _compilerLauncher) - set (_compilerLauncher ${CMAKE_${_language}_COMPILER_LAUNCHER}) - endif() - if (NOT _compilerExe) - set (_compilerExe "${CMAKE_${_language}_COMPILER}") - endif() - if (NOT _compilerArg1) - set (_compilerArg1 ${CMAKE_${_language}_COMPILER_ARG1}) - endif() - if (WIN32) - file (TO_NATIVE_PATH "${_compilerExe}" _compilerExe) - endif() - string (STRIP "${_compilerArg1}" _compilerArg1) - if ("${CMAKE_GENERATOR}" MATCHES "Make|Ninja") - # compiler launcher is only supported for Makefile and Ninja - set (${_cmdVar} ${_compilerLauncher} "${_compilerExe}" ${_compilerArg1} PARENT_SCOPE) - else() - set (${_cmdVar} "${_compilerExe}" ${_compilerArg1} PARENT_SCOPE) - endif() -endfunction() - -macro (cotire_add_definitions_to_cmd _cmdVar _language) - foreach (_definition ${ARGN}) - if (WIN32 AND CMAKE_${_language}_COMPILER_ID MATCHES "MSVC|Intel") - list (APPEND ${_cmdVar} "/D${_definition}") - else() - list (APPEND ${_cmdVar} "-D${_definition}") - endif() - endforeach() -endmacro() - -function (cotire_add_includes_to_cmd _cmdVar _language _includesVar _systemIncludesVar) - set (_includeDirs ${${_includesVar}} ${${_systemIncludesVar}}) - if (_includeDirs) - list (REMOVE_DUPLICATES _includeDirs) - foreach (_include ${_includeDirs}) - if (WIN32 AND CMAKE_${_language}_COMPILER_ID MATCHES "MSVC|Intel") - file (TO_NATIVE_PATH "${_include}" _include) - list (APPEND ${_cmdVar} "${CMAKE_INCLUDE_FLAG_${_language}}${CMAKE_INCLUDE_FLAG_SEP_${_language}}${_include}") - else() - set (_index -1) - if ("${CMAKE_INCLUDE_SYSTEM_FLAG_${_language}}" MATCHES ".+") - list (FIND ${_systemIncludesVar} "${_include}" _index) - endif() - if (_index GREATER -1) - list (APPEND ${_cmdVar} "${CMAKE_INCLUDE_SYSTEM_FLAG_${_language}}${CMAKE_INCLUDE_FLAG_SEP_${_language}}${_include}") - else() - list (APPEND ${_cmdVar} "${CMAKE_INCLUDE_FLAG_${_language}}${CMAKE_INCLUDE_FLAG_SEP_${_language}}${_include}") - endif() - endif() - endforeach() - endif() - set (${_cmdVar} ${${_cmdVar}} PARENT_SCOPE) -endfunction() - -function (cotire_add_frameworks_to_cmd _cmdVar _language _includesVar _systemIncludesVar) - if (APPLE) - set (_frameworkDirs "") - foreach (_include ${${_includesVar}}) - if (IS_ABSOLUTE "${_include}" AND _include MATCHES "\\.framework$") - get_filename_component(_frameworkDir "${_include}" DIRECTORY) - list (APPEND _frameworkDirs "${_frameworkDir}") - endif() - endforeach() - set (_systemFrameworkDirs "") - foreach (_include ${${_systemIncludesVar}}) - if (IS_ABSOLUTE "${_include}" AND _include MATCHES "\\.framework$") - get_filename_component(_frameworkDir "${_include}" DIRECTORY) - list (APPEND _systemFrameworkDirs "${_frameworkDir}") - endif() - endforeach() - if (_systemFrameworkDirs) - list (APPEND _frameworkDirs ${_systemFrameworkDirs}) - endif() - if (_frameworkDirs) - list (REMOVE_DUPLICATES _frameworkDirs) - foreach (_frameworkDir ${_frameworkDirs}) - set (_index -1) - if ("${CMAKE_${_language}_SYSTEM_FRAMEWORK_SEARCH_FLAG}" MATCHES ".+") - list (FIND _systemFrameworkDirs "${_frameworkDir}" _index) - endif() - if (_index GREATER -1) - list (APPEND ${_cmdVar} "${CMAKE_${_language}_SYSTEM_FRAMEWORK_SEARCH_FLAG}${_frameworkDir}") - else() - list (APPEND ${_cmdVar} "${CMAKE_${_language}_FRAMEWORK_SEARCH_FLAG}${_frameworkDir}") - endif() - endforeach() - endif() - endif() - set (${_cmdVar} ${${_cmdVar}} PARENT_SCOPE) -endfunction() - -macro (cotire_add_compile_flags_to_cmd _cmdVar) - foreach (_flag ${ARGN}) - list (APPEND ${_cmdVar} "${_flag}") - endforeach() -endmacro() - -function (cotire_check_file_up_to_date _fileIsUpToDateVar _file) - if (EXISTS "${_file}") - set (_triggerFile "") - foreach (_dependencyFile ${ARGN}) - if (EXISTS "${_dependencyFile}") - # IS_NEWER_THAN returns TRUE if both files have the same timestamp - # thus we do the comparison in both directions to exclude ties - if ("${_dependencyFile}" IS_NEWER_THAN "${_file}" AND - NOT "${_file}" IS_NEWER_THAN "${_dependencyFile}") - set (_triggerFile "${_dependencyFile}") - break() - endif() - endif() - endforeach() - if (_triggerFile) - if (COTIRE_VERBOSE) - get_filename_component(_fileName "${_file}" NAME) - message (STATUS "${_fileName} update triggered by ${_triggerFile} change.") - endif() - set (${_fileIsUpToDateVar} FALSE PARENT_SCOPE) - else() - if (COTIRE_VERBOSE) - get_filename_component(_fileName "${_file}" NAME) - message (STATUS "${_fileName} is up-to-date.") - endif() - set (${_fileIsUpToDateVar} TRUE PARENT_SCOPE) - endif() - else() - if (COTIRE_VERBOSE) - get_filename_component(_fileName "${_file}" NAME) - message (STATUS "${_fileName} does not exist yet.") - endif() - set (${_fileIsUpToDateVar} FALSE PARENT_SCOPE) - endif() -endfunction() - -macro (cotire_find_closest_relative_path _headerFile _includeDirs _relPathVar) - set (${_relPathVar} "") - foreach (_includeDir ${_includeDirs}) - if (IS_DIRECTORY "${_includeDir}") - file (RELATIVE_PATH _relPath "${_includeDir}" "${_headerFile}") - if (NOT IS_ABSOLUTE "${_relPath}" AND NOT "${_relPath}" MATCHES "^\\.\\.") - string (LENGTH "${${_relPathVar}}" _closestLen) - string (LENGTH "${_relPath}" _relLen) - if (_closestLen EQUAL 0 OR _relLen LESS _closestLen) - set (${_relPathVar} "${_relPath}") - endif() - endif() - elseif ("${_includeDir}" STREQUAL "${_headerFile}") - # if path matches exactly, return short non-empty string - set (${_relPathVar} "1") - break() - endif() - endforeach() -endmacro() - -macro (cotire_check_header_file_location _headerFile _insideIncludeDirs _outsideIncludeDirs _headerIsInside) - # check header path against ignored and honored include directories - cotire_find_closest_relative_path("${_headerFile}" "${_insideIncludeDirs}" _insideRelPath) - if (_insideRelPath) - # header is inside, but could be become outside if there is a shorter outside match - cotire_find_closest_relative_path("${_headerFile}" "${_outsideIncludeDirs}" _outsideRelPath) - if (_outsideRelPath) - string (LENGTH "${_insideRelPath}" _insideRelPathLen) - string (LENGTH "${_outsideRelPath}" _outsideRelPathLen) - if (_outsideRelPathLen LESS _insideRelPathLen) - set (${_headerIsInside} FALSE) - else() - set (${_headerIsInside} TRUE) - endif() - else() - set (${_headerIsInside} TRUE) - endif() - else() - # header is outside - set (${_headerIsInside} FALSE) - endif() -endmacro() - -macro (cotire_check_ignore_header_file_path _headerFile _headerIsIgnoredVar) - if (NOT EXISTS "${_headerFile}") - set (${_headerIsIgnoredVar} TRUE) - elseif (IS_DIRECTORY "${_headerFile}") - set (${_headerIsIgnoredVar} TRUE) - elseif ("${_headerFile}" MATCHES "\\.\\.|[_-]fixed") - # heuristic: ignore headers with embedded parent directory references or "-fixed" or "_fixed" in path - # these often stem from using GCC #include_next tricks, which may break the precompiled header compilation - # with the error message "error: no include path in which to search for header" - set (${_headerIsIgnoredVar} TRUE) - else() - set (${_headerIsIgnoredVar} FALSE) - endif() -endmacro() - -macro (cotire_check_ignore_header_file_ext _headerFile _ignoreExtensionsVar _headerIsIgnoredVar) - # check header file extension - cotire_get_source_file_extension("${_headerFile}" _headerFileExt) - set (${_headerIsIgnoredVar} FALSE) - if (_headerFileExt) - list (FIND ${_ignoreExtensionsVar} "${_headerFileExt}" _index) - if (_index GREATER -1) - set (${_headerIsIgnoredVar} TRUE) - endif() - endif() -endmacro() - -macro (cotire_parse_line _line _headerFileVar _headerDepthVar) - if (MSVC) - # cl.exe /showIncludes produces different output, depending on the language pack used, e.g.: - # English: "Note: including file: C:\directory\file" - # German: "Hinweis: Einlesen der Datei: C:\directory\file" - # We use a very general regular expression, relying on the presence of the : characters - if (_line MATCHES "( +)([a-zA-Z]:[^:]+)$") - string (LENGTH "${CMAKE_MATCH_1}" ${_headerDepthVar}) - get_filename_component(${_headerFileVar} "${CMAKE_MATCH_2}" ABSOLUTE) - else() - set (${_headerFileVar} "") - set (${_headerDepthVar} 0) - endif() - else() - if (_line MATCHES "^(\\.+) (.*)$") - # GCC like output - string (LENGTH "${CMAKE_MATCH_1}" ${_headerDepthVar}) - if (IS_ABSOLUTE "${CMAKE_MATCH_2}") - set (${_headerFileVar} "${CMAKE_MATCH_2}") - else() - get_filename_component(${_headerFileVar} "${CMAKE_MATCH_2}" REALPATH) - endif() - else() - set (${_headerFileVar} "") - set (${_headerDepthVar} 0) - endif() - endif() -endmacro() - -function (cotire_parse_includes _language _scanOutput _ignoredIncludeDirs _honoredIncludeDirs _ignoredExtensions _selectedIncludesVar _unparsedLinesVar) - if (WIN32) - # prevent CMake macro invocation errors due to backslash characters in Windows paths - string (REPLACE "\\" "/" _scanOutput "${_scanOutput}") - endif() - # canonize slashes - string (REPLACE "//" "/" _scanOutput "${_scanOutput}") - # prevent semicolon from being interpreted as a line separator - string (REPLACE ";" "\\;" _scanOutput "${_scanOutput}") - # then separate lines - string (REGEX REPLACE "\n" ";" _scanOutput "${_scanOutput}") - list (LENGTH _scanOutput _len) - # remove duplicate lines to speed up parsing - list (REMOVE_DUPLICATES _scanOutput) - list (LENGTH _scanOutput _uniqueLen) - if (COTIRE_VERBOSE OR COTIRE_DEBUG) - message (STATUS "Scanning ${_uniqueLen} unique lines of ${_len} for includes") - if (_ignoredExtensions) - message (STATUS "Ignored extensions: ${_ignoredExtensions}") - endif() - if (_ignoredIncludeDirs) - message (STATUS "Ignored paths: ${_ignoredIncludeDirs}") - endif() - if (_honoredIncludeDirs) - message (STATUS "Included paths: ${_honoredIncludeDirs}") - endif() - endif() - set (_sourceFiles ${ARGN}) - set (_selectedIncludes "") - set (_unparsedLines "") - # stack keeps track of inside/outside project status of processed header files - set (_headerIsInsideStack "") - foreach (_line IN LISTS _scanOutput) - if (_line) - cotire_parse_line("${_line}" _headerFile _headerDepth) - if (_headerFile) - cotire_check_header_file_location("${_headerFile}" "${_ignoredIncludeDirs}" "${_honoredIncludeDirs}" _headerIsInside) - if (COTIRE_DEBUG) - message (STATUS "${_headerDepth}: ${_headerFile} ${_headerIsInside}") - endif() - # update stack - list (LENGTH _headerIsInsideStack _stackLen) - if (_headerDepth GREATER _stackLen) - math (EXPR _stackLen "${_stackLen} + 1") - foreach (_index RANGE ${_stackLen} ${_headerDepth}) - list (APPEND _headerIsInsideStack ${_headerIsInside}) - endforeach() - else() - foreach (_index RANGE ${_headerDepth} ${_stackLen}) - list (REMOVE_AT _headerIsInsideStack -1) - endforeach() - list (APPEND _headerIsInsideStack ${_headerIsInside}) - endif() - if (COTIRE_DEBUG) - message (STATUS "${_headerIsInsideStack}") - endif() - # header is a candidate if it is outside project - if (NOT _headerIsInside) - # get parent header file's inside/outside status - if (_headerDepth GREATER 1) - math (EXPR _index "${_headerDepth} - 2") - list (GET _headerIsInsideStack ${_index} _parentHeaderIsInside) - else() - set (_parentHeaderIsInside TRUE) - endif() - # select header file if parent header file is inside project - # (e.g., a project header file that includes a standard header file) - if (_parentHeaderIsInside) - cotire_check_ignore_header_file_path("${_headerFile}" _headerIsIgnored) - if (NOT _headerIsIgnored) - cotire_check_ignore_header_file_ext("${_headerFile}" _ignoredExtensions _headerIsIgnored) - if (NOT _headerIsIgnored) - list (APPEND _selectedIncludes "${_headerFile}") - else() - # fix header's inside status on stack, it is ignored by extension now - list (REMOVE_AT _headerIsInsideStack -1) - list (APPEND _headerIsInsideStack TRUE) - endif() - endif() - if (COTIRE_DEBUG) - message (STATUS "${_headerFile} ${_ignoredExtensions} ${_headerIsIgnored}") - endif() - endif() - endif() - else() - if (MSVC) - # for cl.exe do not keep unparsed lines which solely consist of a source file name - string (FIND "${_sourceFiles}" "${_line}" _index) - if (_index LESS 0) - list (APPEND _unparsedLines "${_line}") - endif() - else() - list (APPEND _unparsedLines "${_line}") - endif() - endif() - endif() - endforeach() - list (REMOVE_DUPLICATES _selectedIncludes) - set (${_selectedIncludesVar} ${_selectedIncludes} PARENT_SCOPE) - set (${_unparsedLinesVar} ${_unparsedLines} PARENT_SCOPE) -endfunction() - -function (cotire_scan_includes _includesVar) - set(_options "") - set(_oneValueArgs COMPILER_ID COMPILER_EXECUTABLE COMPILER_ARG1 COMPILER_VERSION LANGUAGE UNPARSED_LINES SCAN_RESULT) - set(_multiValueArgs COMPILE_DEFINITIONS COMPILE_FLAGS INCLUDE_DIRECTORIES SYSTEM_INCLUDE_DIRECTORIES - IGNORE_PATH INCLUDE_PATH IGNORE_EXTENSIONS INCLUDE_PRIORITY_PATH COMPILER_LAUNCHER) - cmake_parse_arguments(_option "${_options}" "${_oneValueArgs}" "${_multiValueArgs}" ${ARGN}) - set (_sourceFiles ${_option_UNPARSED_ARGUMENTS}) - if (NOT _option_LANGUAGE) - set (_option_LANGUAGE "CXX") - endif() - if (NOT _option_COMPILER_ID) - set (_option_COMPILER_ID "${CMAKE_${_option_LANGUAGE}_ID}") - endif() - if (NOT _option_COMPILER_VERSION) - set (_option_COMPILER_VERSION "${CMAKE_${_option_LANGUAGE}_COMPILER_VERSION}") - endif() - cotire_init_compile_cmd(_cmd "${_option_LANGUAGE}" "${_option_COMPILER_LAUNCHER}" "${_option_COMPILER_EXECUTABLE}" "${_option_COMPILER_ARG1}") - cotire_add_definitions_to_cmd(_cmd "${_option_LANGUAGE}" ${_option_COMPILE_DEFINITIONS}) - cotire_add_compile_flags_to_cmd(_cmd ${_option_COMPILE_FLAGS}) - cotire_add_includes_to_cmd(_cmd "${_option_LANGUAGE}" _option_INCLUDE_DIRECTORIES _option_SYSTEM_INCLUDE_DIRECTORIES) - cotire_add_frameworks_to_cmd(_cmd "${_option_LANGUAGE}" _option_INCLUDE_DIRECTORIES _option_SYSTEM_INCLUDE_DIRECTORIES) - cotire_add_makedep_flags("${_option_LANGUAGE}" "${_option_COMPILER_ID}" "${_option_COMPILER_VERSION}" _cmd) - # only consider existing source files for scanning - set (_existingSourceFiles "") - foreach (_sourceFile ${_sourceFiles}) - if (EXISTS "${_sourceFile}") - list (APPEND _existingSourceFiles "${_sourceFile}") - endif() - endforeach() - if (NOT _existingSourceFiles) - set (${_includesVar} "" PARENT_SCOPE) - return() - endif() - # add source files to be scanned - if (WIN32) - foreach (_sourceFile ${_existingSourceFiles}) - file (TO_NATIVE_PATH "${_sourceFile}" _sourceFileNative) - list (APPEND _cmd "${_sourceFileNative}") - endforeach() - else() - list (APPEND _cmd ${_existingSourceFiles}) - endif() - if (COTIRE_VERBOSE) - message (STATUS "execute_process: ${_cmd}") - endif() - if (MSVC_IDE OR _option_COMPILER_ID MATCHES "MSVC") - # cl.exe messes with the output streams unless the environment variable VS_UNICODE_OUTPUT is cleared - unset (ENV{VS_UNICODE_OUTPUT}) - endif() - execute_process( - COMMAND ${_cmd} - WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}" - RESULT_VARIABLE _result - OUTPUT_QUIET - ERROR_VARIABLE _output) - if (_result) - message (STATUS "Result ${_result} scanning includes of ${_existingSourceFiles}.") - endif() - cotire_parse_includes( - "${_option_LANGUAGE}" "${_output}" - "${_option_IGNORE_PATH}" "${_option_INCLUDE_PATH}" - "${_option_IGNORE_EXTENSIONS}" - _includes _unparsedLines - ${_sourceFiles}) - if (_option_INCLUDE_PRIORITY_PATH) - set (_sortedIncludes "") - foreach (_priorityPath ${_option_INCLUDE_PRIORITY_PATH}) - foreach (_include ${_includes}) - string (FIND ${_include} ${_priorityPath} _position) - if (_position GREATER -1) - list (APPEND _sortedIncludes ${_include}) - endif() - endforeach() - endforeach() - if (_sortedIncludes) - list (INSERT _includes 0 ${_sortedIncludes}) - list (REMOVE_DUPLICATES _includes) - endif() - endif() - set (${_includesVar} ${_includes} PARENT_SCOPE) - if (_option_UNPARSED_LINES) - set (${_option_UNPARSED_LINES} ${_unparsedLines} PARENT_SCOPE) - endif() - if (_option_SCAN_RESULT) - set (${_option_SCAN_RESULT} ${_result} PARENT_SCOPE) - endif() -endfunction() - -macro (cotire_append_undefs _contentsVar) - set (_undefs ${ARGN}) - if (_undefs) - list (REMOVE_DUPLICATES _undefs) - foreach (_definition ${_undefs}) - list (APPEND ${_contentsVar} "#undef ${_definition}") - endforeach() - endif() -endmacro() - -macro (cotire_comment_str _language _commentText _commentVar) - if ("${_language}" STREQUAL "CMAKE") - set (${_commentVar} "# ${_commentText}") - else() - set (${_commentVar} "/* ${_commentText} */") - endif() -endmacro() - -function (cotire_write_file _language _file _contents _force) - get_filename_component(_moduleName "${COTIRE_CMAKE_MODULE_FILE}" NAME) - cotire_comment_str("${_language}" "${_moduleName} ${COTIRE_CMAKE_MODULE_VERSION} generated file" _header1) - cotire_comment_str("${_language}" "${_file}" _header2) - set (_contents "${_header1}\n${_header2}\n${_contents}") - if (COTIRE_DEBUG) - message (STATUS "${_contents}") - endif() - if (_force OR NOT EXISTS "${_file}") - file (WRITE "${_file}" "${_contents}") - else() - file (READ "${_file}" _oldContents) - if (NOT "${_oldContents}" STREQUAL "${_contents}") - file (WRITE "${_file}" "${_contents}") - else() - if (COTIRE_DEBUG) - message (STATUS "${_file} unchanged") - endif() - endif() - endif() -endfunction() - -function (cotire_generate_unity_source _unityFile) - set(_options "") - set(_oneValueArgs LANGUAGE) - set(_multiValueArgs - DEPENDS SOURCES_COMPILE_DEFINITIONS - PRE_UNDEFS SOURCES_PRE_UNDEFS POST_UNDEFS SOURCES_POST_UNDEFS PROLOGUE EPILOGUE) - cmake_parse_arguments(_option "${_options}" "${_oneValueArgs}" "${_multiValueArgs}" ${ARGN}) - if (_option_DEPENDS) - cotire_check_file_up_to_date(_unityFileIsUpToDate "${_unityFile}" ${_option_DEPENDS}) - if (_unityFileIsUpToDate) - return() - endif() - endif() - set (_sourceFiles ${_option_UNPARSED_ARGUMENTS}) - if (NOT _option_PRE_UNDEFS) - set (_option_PRE_UNDEFS "") - endif() - if (NOT _option_SOURCES_PRE_UNDEFS) - set (_option_SOURCES_PRE_UNDEFS "") - endif() - if (NOT _option_POST_UNDEFS) - set (_option_POST_UNDEFS "") - endif() - if (NOT _option_SOURCES_POST_UNDEFS) - set (_option_SOURCES_POST_UNDEFS "") - endif() - set (_contents "") - if (_option_PROLOGUE) - list (APPEND _contents ${_option_PROLOGUE}) - endif() - if (_option_LANGUAGE AND _sourceFiles) - if ("${_option_LANGUAGE}" STREQUAL "CXX") - list (APPEND _contents "#ifdef __cplusplus") - elseif ("${_option_LANGUAGE}" STREQUAL "C") - list (APPEND _contents "#ifndef __cplusplus") - endif() - endif() - set (_compileUndefinitions "") - foreach (_sourceFile ${_sourceFiles}) - cotire_get_source_compile_definitions( - "${_option_CONFIGURATION}" "${_option_LANGUAGE}" "${_sourceFile}" _compileDefinitions - ${_option_SOURCES_COMPILE_DEFINITIONS}) - cotire_get_source_undefs("${_sourceFile}" COTIRE_UNITY_SOURCE_PRE_UNDEFS _sourcePreUndefs ${_option_SOURCES_PRE_UNDEFS}) - cotire_get_source_undefs("${_sourceFile}" COTIRE_UNITY_SOURCE_POST_UNDEFS _sourcePostUndefs ${_option_SOURCES_POST_UNDEFS}) - if (_option_PRE_UNDEFS) - list (APPEND _compileUndefinitions ${_option_PRE_UNDEFS}) - endif() - if (_sourcePreUndefs) - list (APPEND _compileUndefinitions ${_sourcePreUndefs}) - endif() - if (_compileUndefinitions) - cotire_append_undefs(_contents ${_compileUndefinitions}) - set (_compileUndefinitions "") - endif() - if (_sourcePostUndefs) - list (APPEND _compileUndefinitions ${_sourcePostUndefs}) - endif() - if (_option_POST_UNDEFS) - list (APPEND _compileUndefinitions ${_option_POST_UNDEFS}) - endif() - foreach (_definition ${_compileDefinitions}) - if (_definition MATCHES "^([a-zA-Z0-9_]+)=(.+)$") - list (APPEND _contents "#define ${CMAKE_MATCH_1} ${CMAKE_MATCH_2}") - list (INSERT _compileUndefinitions 0 "${CMAKE_MATCH_1}") - else() - list (APPEND _contents "#define ${_definition}") - list (INSERT _compileUndefinitions 0 "${_definition}") - endif() - endforeach() - # use absolute path as source file location - get_filename_component(_sourceFileLocation "${_sourceFile}" ABSOLUTE) - if (WIN32) - file (TO_NATIVE_PATH "${_sourceFileLocation}" _sourceFileLocation) - endif() - list (APPEND _contents "#include \"${_sourceFileLocation}\"") - endforeach() - if (_compileUndefinitions) - cotire_append_undefs(_contents ${_compileUndefinitions}) - set (_compileUndefinitions "") - endif() - if (_option_LANGUAGE AND _sourceFiles) - list (APPEND _contents "#endif") - endif() - if (_option_EPILOGUE) - list (APPEND _contents ${_option_EPILOGUE}) - endif() - list (APPEND _contents "") - string (REPLACE ";" "\n" _contents "${_contents}") - if (COTIRE_VERBOSE) - message ("${_contents}") - endif() - cotire_write_file("${_option_LANGUAGE}" "${_unityFile}" "${_contents}" TRUE) -endfunction() - -function (cotire_generate_prefix_header _prefixFile) - set(_options "") - set(_oneValueArgs LANGUAGE COMPILER_EXECUTABLE COMPILER_ARG1 COMPILER_ID COMPILER_VERSION) - set(_multiValueArgs DEPENDS COMPILE_DEFINITIONS COMPILE_FLAGS - INCLUDE_DIRECTORIES SYSTEM_INCLUDE_DIRECTORIES IGNORE_PATH INCLUDE_PATH - IGNORE_EXTENSIONS INCLUDE_PRIORITY_PATH COMPILER_LAUNCHER) - cmake_parse_arguments(_option "${_options}" "${_oneValueArgs}" "${_multiValueArgs}" ${ARGN}) - if (NOT _option_COMPILER_ID) - set (_option_COMPILER_ID "${CMAKE_${_option_LANGUAGE}_ID}") - endif() - if (NOT _option_COMPILER_VERSION) - set (_option_COMPILER_VERSION "${CMAKE_${_option_LANGUAGE}_COMPILER_VERSION}") - endif() - if (_option_DEPENDS) - cotire_check_file_up_to_date(_prefixFileIsUpToDate "${_prefixFile}" ${_option_DEPENDS}) - if (_prefixFileIsUpToDate) - # create empty log file - set (_unparsedLinesFile "${_prefixFile}.log") - file (WRITE "${_unparsedLinesFile}" "") - return() - endif() - endif() - set (_prologue "") - set (_epilogue "") - if (_option_COMPILER_ID MATCHES "Clang") - set (_prologue "#pragma clang system_header") - elseif (_option_COMPILER_ID MATCHES "GNU") - set (_prologue "#pragma GCC system_header") - elseif (_option_COMPILER_ID MATCHES "MSVC") - set (_prologue "#pragma warning(push, 0)") - set (_epilogue "#pragma warning(pop)") - elseif (_option_COMPILER_ID MATCHES "Intel") - # Intel compiler requires hdrstop pragma to stop generating PCH file - set (_epilogue "#pragma hdrstop") - endif() - set (_sourceFiles ${_option_UNPARSED_ARGUMENTS}) - cotire_scan_includes(_selectedHeaders ${_sourceFiles} - LANGUAGE "${_option_LANGUAGE}" - COMPILER_LAUNCHER "${_option_COMPILER_LAUNCHER}" - COMPILER_EXECUTABLE "${_option_COMPILER_EXECUTABLE}" - COMPILER_ARG1 "${_option_COMPILER_ARG1}" - COMPILER_ID "${_option_COMPILER_ID}" - COMPILER_VERSION "${_option_COMPILER_VERSION}" - COMPILE_DEFINITIONS ${_option_COMPILE_DEFINITIONS} - COMPILE_FLAGS ${_option_COMPILE_FLAGS} - INCLUDE_DIRECTORIES ${_option_INCLUDE_DIRECTORIES} - SYSTEM_INCLUDE_DIRECTORIES ${_option_SYSTEM_INCLUDE_DIRECTORIES} - IGNORE_PATH ${_option_IGNORE_PATH} - INCLUDE_PATH ${_option_INCLUDE_PATH} - IGNORE_EXTENSIONS ${_option_IGNORE_EXTENSIONS} - INCLUDE_PRIORITY_PATH ${_option_INCLUDE_PRIORITY_PATH} - UNPARSED_LINES _unparsedLines - SCAN_RESULT _scanResult) - cotire_generate_unity_source("${_prefixFile}" - PROLOGUE ${_prologue} EPILOGUE ${_epilogue} LANGUAGE "${_option_LANGUAGE}" ${_selectedHeaders}) - set (_unparsedLinesFile "${_prefixFile}.log") - if (_unparsedLines) - if (COTIRE_VERBOSE OR _scanResult OR NOT _selectedHeaders) - list (LENGTH _unparsedLines _skippedLineCount) - if (WIN32) - file (TO_NATIVE_PATH "${_unparsedLinesFile}" _unparsedLinesLogPath) - else() - set (_unparsedLinesLogPath "${_unparsedLinesFile}") - endif() - message (STATUS "${_skippedLineCount} line(s) skipped, see ${_unparsedLinesLogPath}") - endif() - string (REPLACE ";" "\n" _unparsedLines "${_unparsedLines}") - endif() - file (WRITE "${_unparsedLinesFile}" "${_unparsedLines}\n") -endfunction() - -function (cotire_add_makedep_flags _language _compilerID _compilerVersion _flagsVar) - set (_flags ${${_flagsVar}}) - if (_compilerID MATCHES "MSVC") - # cl.exe options used - # /nologo suppresses display of sign-on banner - # /TC treat all files named on the command line as C source files - # /TP treat all files named on the command line as C++ source files - # /EP preprocess to stdout without #line directives - # /showIncludes list include files - set (_sourceFileTypeC "/TC") - set (_sourceFileTypeCXX "/TP") - if (_flags) - # append to list - list (APPEND _flags /nologo "${_sourceFileType${_language}}" /EP /showIncludes) - else() - # return as a flag string - set (_flags "${_sourceFileType${_language}} /EP /showIncludes") - endif() - elseif (_compilerID MATCHES "GNU") - # GCC options used - # -H print the name of each header file used - # -E invoke preprocessor - # -fdirectives-only do not expand macros, requires GCC >= 4.3 - if (_flags) - # append to list - list (APPEND _flags -H -E) - if (NOT "${_compilerVersion}" VERSION_LESS "4.3.0") - list (APPEND _flags -fdirectives-only) - endif() - else() - # return as a flag string - set (_flags "-H -E") - if (NOT "${_compilerVersion}" VERSION_LESS "4.3.0") - set (_flags "${_flags} -fdirectives-only") - endif() - endif() - elseif (_compilerID MATCHES "Clang") - if (UNIX) - # Clang options used - # -H print the name of each header file used - # -E invoke preprocessor - # -fno-color-diagnostics do not print diagnostics in color - # -Eonly just run preprocessor, no output - if (_flags) - # append to list - list (APPEND _flags -H -E -fno-color-diagnostics -Xclang -Eonly) - else() - # return as a flag string - set (_flags "-H -E -fno-color-diagnostics -Xclang -Eonly") - endif() - elseif (WIN32) - # Clang-cl.exe options used - # /TC treat all files named on the command line as C source files - # /TP treat all files named on the command line as C++ source files - # /EP preprocess to stdout without #line directives - # -H print the name of each header file used - # -fno-color-diagnostics do not print diagnostics in color - # -Eonly just run preprocessor, no output - set (_sourceFileTypeC "/TC") - set (_sourceFileTypeCXX "/TP") - if (_flags) - # append to list - list (APPEND _flags "${_sourceFileType${_language}}" /EP -fno-color-diagnostics -Xclang -H -Xclang -Eonly) - else() - # return as a flag string - set (_flags "${_sourceFileType${_language}} /EP -fno-color-diagnostics -Xclang -H -Xclang -Eonly") - endif() - endif() - elseif (_compilerID MATCHES "Intel") - if (WIN32) - # Windows Intel options used - # /nologo do not display compiler version information - # /QH display the include file order - # /EP preprocess to stdout, omitting #line directives - # /TC process all source or unrecognized file types as C source files - # /TP process all source or unrecognized file types as C++ source files - set (_sourceFileTypeC "/TC") - set (_sourceFileTypeCXX "/TP") - if (_flags) - # append to list - list (APPEND _flags /nologo "${_sourceFileType${_language}}" /EP /QH) - else() - # return as a flag string - set (_flags "${_sourceFileType${_language}} /EP /QH") - endif() - else() - # Linux / Mac OS X Intel options used - # -H print the name of each header file used - # -EP preprocess to stdout, omitting #line directives - # -Kc++ process all source or unrecognized file types as C++ source files - if (_flags) - # append to list - if ("${_language}" STREQUAL "CXX") - list (APPEND _flags -Kc++) - endif() - list (APPEND _flags -H -EP) - else() - # return as a flag string - if ("${_language}" STREQUAL "CXX") - set (_flags "-Kc++ ") - endif() - set (_flags "${_flags}-H -EP") - endif() - endif() - else() - message (FATAL_ERROR "cotire: unsupported ${_language} compiler ${_compilerID} version ${_compilerVersion}.") - endif() - set (${_flagsVar} ${_flags} PARENT_SCOPE) -endfunction() - -function (cotire_add_pch_compilation_flags _language _compilerID _compilerVersion _prefixFile _pchFile _hostFile _flagsVar) - set (_flags ${${_flagsVar}}) - if (_compilerID MATCHES "MSVC") - file (TO_NATIVE_PATH "${_prefixFile}" _prefixFileNative) - file (TO_NATIVE_PATH "${_pchFile}" _pchFileNative) - file (TO_NATIVE_PATH "${_hostFile}" _hostFileNative) - # cl.exe options used - # /Yc creates a precompiled header file - # /Fp specifies precompiled header binary file name - # /FI forces inclusion of file - # /TC treat all files named on the command line as C source files - # /TP treat all files named on the command line as C++ source files - # /Zs syntax check only - # /Zm precompiled header memory allocation scaling factor - set (_sourceFileTypeC "/TC") - set (_sourceFileTypeCXX "/TP") - if (_flags) - # append to list - list (APPEND _flags /nologo "${_sourceFileType${_language}}" - "/Yc${_prefixFileNative}" "/Fp${_pchFileNative}" "/FI${_prefixFileNative}" /Zs "${_hostFileNative}") - if (COTIRE_PCH_MEMORY_SCALING_FACTOR) - list (APPEND _flags "/Zm${COTIRE_PCH_MEMORY_SCALING_FACTOR}") - endif() - else() - # return as a flag string - set (_flags "/Yc\"${_prefixFileNative}\" /Fp\"${_pchFileNative}\" /FI\"${_prefixFileNative}\"") - if (COTIRE_PCH_MEMORY_SCALING_FACTOR) - set (_flags "${_flags} /Zm${COTIRE_PCH_MEMORY_SCALING_FACTOR}") - endif() - endif() - elseif (_compilerID MATCHES "GNU") - # GCC options used - # -x specify the source language - # -c compile but do not link - # -o place output in file - # note that we cannot use -w to suppress all warnings upon pre-compiling, because turning off a warning may - # alter compile flags as a side effect (e.g., -Wwrite-string implies -fconst-strings) - set (_xLanguage_C "c-header") - set (_xLanguage_CXX "c++-header") - if (_flags) - # append to list - list (APPEND _flags -x "${_xLanguage_${_language}}" -c "${_prefixFile}" -o "${_pchFile}") - else() - # return as a flag string - set (_flags "-x ${_xLanguage_${_language}} -c \"${_prefixFile}\" -o \"${_pchFile}\"") - endif() - elseif (_compilerID MATCHES "Clang") - if (UNIX) - # Clang options used - # -x specify the source language - # -c compile but do not link - # -o place output in file - # -fno-pch-timestamp disable inclusion of timestamp in precompiled headers (clang 4.0.0+) - set (_xLanguage_C "c-header") - set (_xLanguage_CXX "c++-header") - if (_flags) - # append to list - list (APPEND _flags -x "${_xLanguage_${_language}}" -c "${_prefixFile}" -o "${_pchFile}") - if (NOT "${_compilerVersion}" VERSION_LESS "4.0.0") - list (APPEND _flags -Xclang -fno-pch-timestamp) - endif() - else() - # return as a flag string - set (_flags "-x ${_xLanguage_${_language}} -c \"${_prefixFile}\" -o \"${_pchFile}\"") - if (NOT "${_compilerVersion}" VERSION_LESS "4.0.0") - set (_flags "${_flags} -Xclang -fno-pch-timestamp") - endif() - endif() - elseif (WIN32) - file (TO_NATIVE_PATH "${_prefixFile}" _prefixFileNative) - file (TO_NATIVE_PATH "${_pchFile}" _pchFileNative) - file (TO_NATIVE_PATH "${_hostFile}" _hostFileNative) - # Clang-cl.exe options used - # /Yc creates a precompiled header file - # /Fp specifies precompiled header binary file name - # /FI forces inclusion of file - # /Zs syntax check only - # /TC treat all files named on the command line as C source files - # /TP treat all files named on the command line as C++ source files - set (_sourceFileTypeC "/TC") - set (_sourceFileTypeCXX "/TP") - if (_flags) - # append to list - list (APPEND _flags "${_sourceFileType${_language}}" - "/Yc${_prefixFileNative}" "/Fp${_pchFileNative}" "/FI${_prefixFileNative}" /Zs "${_hostFileNative}") - else() - # return as a flag string - set (_flags "/Yc\"${_prefixFileNative}\" /Fp\"${_pchFileNative}\" /FI\"${_prefixFileNative}\"") - endif() - endif() - elseif (_compilerID MATCHES "Intel") - if (WIN32) - file (TO_NATIVE_PATH "${_prefixFile}" _prefixFileNative) - file (TO_NATIVE_PATH "${_pchFile}" _pchFileNative) - file (TO_NATIVE_PATH "${_hostFile}" _hostFileNative) - # Windows Intel options used - # /nologo do not display compiler version information - # /Yc create a precompiled header (PCH) file - # /Fp specify a path or file name for precompiled header files - # /FI tells the preprocessor to include a specified file name as the header file - # /TC process all source or unrecognized file types as C source files - # /TP process all source or unrecognized file types as C++ source files - # /Zs syntax check only - # /Wpch-messages enable diagnostics related to pre-compiled headers (requires Intel XE 2013 Update 2) - set (_sourceFileTypeC "/TC") - set (_sourceFileTypeCXX "/TP") - if (_flags) - # append to list - list (APPEND _flags /nologo "${_sourceFileType${_language}}" - "/Yc" "/Fp${_pchFileNative}" "/FI${_prefixFileNative}" /Zs "${_hostFileNative}") - if (NOT "${_compilerVersion}" VERSION_LESS "13.1.0") - list (APPEND _flags "/Wpch-messages") - endif() - else() - # return as a flag string - set (_flags "/Yc /Fp\"${_pchFileNative}\" /FI\"${_prefixFileNative}\"") - if (NOT "${_compilerVersion}" VERSION_LESS "13.1.0") - set (_flags "${_flags} /Wpch-messages") - endif() - endif() - else() - # Linux / Mac OS X Intel options used - # -pch-dir location for precompiled header files - # -pch-create name of the precompiled header (PCH) to create - # -Kc++ process all source or unrecognized file types as C++ source files - # -fsyntax-only check only for correct syntax - # -Wpch-messages enable diagnostics related to pre-compiled headers (requires Intel XE 2013 Update 2) - get_filename_component(_pchDir "${_pchFile}" DIRECTORY) - get_filename_component(_pchName "${_pchFile}" NAME) - set (_xLanguage_C "c-header") - set (_xLanguage_CXX "c++-header") - set (_pchSuppressMessages FALSE) - if ("${CMAKE_${_language}_FLAGS}" MATCHES ".*-Wno-pch-messages.*") - set(_pchSuppressMessages TRUE) - endif() - if (_flags) - # append to list - if ("${_language}" STREQUAL "CXX") - list (APPEND _flags -Kc++) - endif() - list (APPEND _flags -include "${_prefixFile}" -pch-dir "${_pchDir}" -pch-create "${_pchName}" -fsyntax-only "${_hostFile}") - if (NOT "${_compilerVersion}" VERSION_LESS "13.1.0") - if (NOT _pchSuppressMessages) - list (APPEND _flags -Wpch-messages) - endif() - endif() - else() - # return as a flag string - set (_flags "-include \"${_prefixFile}\" -pch-dir \"${_pchDir}\" -pch-create \"${_pchName}\"") - if (NOT "${_compilerVersion}" VERSION_LESS "13.1.0") - if (NOT _pchSuppressMessages) - set (_flags "${_flags} -Wpch-messages") - endif() - endif() - endif() - endif() - else() - message (FATAL_ERROR "cotire: unsupported ${_language} compiler ${_compilerID} version ${_compilerVersion}.") - endif() - set (${_flagsVar} ${_flags} PARENT_SCOPE) -endfunction() - -function (cotire_add_prefix_pch_inclusion_flags _language _compilerID _compilerVersion _prefixFile _pchFile _flagsVar) - set (_flags ${${_flagsVar}}) - if (_compilerID MATCHES "MSVC") - file (TO_NATIVE_PATH "${_prefixFile}" _prefixFileNative) - # cl.exe options used - # /Yu uses a precompiled header file during build - # /Fp specifies precompiled header binary file name - # /FI forces inclusion of file - # /Zm precompiled header memory allocation scaling factor - if (_pchFile) - file (TO_NATIVE_PATH "${_pchFile}" _pchFileNative) - if (_flags) - # append to list - list (APPEND _flags "/Yu${_prefixFileNative}" "/Fp${_pchFileNative}" "/FI${_prefixFileNative}") - if (COTIRE_PCH_MEMORY_SCALING_FACTOR) - list (APPEND _flags "/Zm${COTIRE_PCH_MEMORY_SCALING_FACTOR}") - endif() - else() - # return as a flag string - set (_flags "/Yu\"${_prefixFileNative}\" /Fp\"${_pchFileNative}\" /FI\"${_prefixFileNative}\"") - if (COTIRE_PCH_MEMORY_SCALING_FACTOR) - set (_flags "${_flags} /Zm${COTIRE_PCH_MEMORY_SCALING_FACTOR}") - endif() - endif() - else() - # no precompiled header, force inclusion of prefix header - if (_flags) - # append to list - list (APPEND _flags "/FI${_prefixFileNative}") - else() - # return as a flag string - set (_flags "/FI\"${_prefixFileNative}\"") - endif() - endif() - elseif (_compilerID MATCHES "GNU") - # GCC options used - # -include process include file as the first line of the primary source file - # -Winvalid-pch warns if precompiled header is found but cannot be used - # note: ccache requires the -include flag to be used in order to process precompiled header correctly - if (_flags) - # append to list - list (APPEND _flags -Winvalid-pch -include "${_prefixFile}") - else() - # return as a flag string - set (_flags "-Winvalid-pch -include \"${_prefixFile}\"") - endif() - elseif (_compilerID MATCHES "Clang") - if (UNIX) - # Clang options used - # -include process include file as the first line of the primary source file - # note: ccache requires the -include flag to be used in order to process precompiled header correctly - if (_flags) - # append to list - list (APPEND _flags -include "${_prefixFile}") - else() - # return as a flag string - set (_flags "-include \"${_prefixFile}\"") - endif() - elseif (WIN32) - file (TO_NATIVE_PATH "${_prefixFile}" _prefixFileNative) - # Clang-cl.exe options used - # /Yu uses a precompiled header file during build - # /Fp specifies precompiled header binary file name - # /FI forces inclusion of file - if (_pchFile) - file (TO_NATIVE_PATH "${_pchFile}" _pchFileNative) - if (_flags) - # append to list - list (APPEND _flags "/Yu${_prefixFileNative}" "/Fp${_pchFileNative}" "/FI${_prefixFileNative}") - else() - # return as a flag string - set (_flags "/Yu\"${_prefixFileNative}\" /Fp\"${_pchFileNative}\" /FI\"${_prefixFileNative}\"") - endif() - else() - # no precompiled header, force inclusion of prefix header - if (_flags) - # append to list - list (APPEND _flags "/FI${_prefixFileNative}") - else() - # return as a flag string - set (_flags "/FI\"${_prefixFileNative}\"") - endif() - endif() - endif() - elseif (_compilerID MATCHES "Intel") - if (WIN32) - file (TO_NATIVE_PATH "${_prefixFile}" _prefixFileNative) - # Windows Intel options used - # /Yu use a precompiled header (PCH) file - # /Fp specify a path or file name for precompiled header files - # /FI tells the preprocessor to include a specified file name as the header file - # /Wpch-messages enable diagnostics related to pre-compiled headers (requires Intel XE 2013 Update 2) - if (_pchFile) - file (TO_NATIVE_PATH "${_pchFile}" _pchFileNative) - if (_flags) - # append to list - list (APPEND _flags "/Yu" "/Fp${_pchFileNative}" "/FI${_prefixFileNative}") - if (NOT "${_compilerVersion}" VERSION_LESS "13.1.0") - list (APPEND _flags "/Wpch-messages") - endif() - else() - # return as a flag string - set (_flags "/Yu /Fp\"${_pchFileNative}\" /FI\"${_prefixFileNative}\"") - if (NOT "${_compilerVersion}" VERSION_LESS "13.1.0") - set (_flags "${_flags} /Wpch-messages") - endif() - endif() - else() - # no precompiled header, force inclusion of prefix header - if (_flags) - # append to list - list (APPEND _flags "/FI${_prefixFileNative}") - else() - # return as a flag string - set (_flags "/FI\"${_prefixFileNative}\"") - endif() - endif() - else() - # Linux / Mac OS X Intel options used - # -pch-dir location for precompiled header files - # -pch-use name of the precompiled header (PCH) to use - # -include process include file as the first line of the primary source file - # -Wpch-messages enable diagnostics related to pre-compiled headers (requires Intel XE 2013 Update 2) - if (_pchFile) - get_filename_component(_pchDir "${_pchFile}" DIRECTORY) - get_filename_component(_pchName "${_pchFile}" NAME) - set (_pchSuppressMessages FALSE) - if ("${CMAKE_${_language}_FLAGS}" MATCHES ".*-Wno-pch-messages.*") - set(_pchSuppressMessages TRUE) - endif() - if (_flags) - # append to list - list (APPEND _flags -include "${_prefixFile}" -pch-dir "${_pchDir}" -pch-use "${_pchName}") - if (NOT "${_compilerVersion}" VERSION_LESS "13.1.0") - if (NOT _pchSuppressMessages) - list (APPEND _flags -Wpch-messages) - endif() - endif() - else() - # return as a flag string - set (_flags "-include \"${_prefixFile}\" -pch-dir \"${_pchDir}\" -pch-use \"${_pchName}\"") - if (NOT "${_compilerVersion}" VERSION_LESS "13.1.0") - if (NOT _pchSuppressMessages) - set (_flags "${_flags} -Wpch-messages") - endif() - endif() - endif() - else() - # no precompiled header, force inclusion of prefix header - if (_flags) - # append to list - list (APPEND _flags -include "${_prefixFile}") - else() - # return as a flag string - set (_flags "-include \"${_prefixFile}\"") - endif() - endif() - endif() - else() - message (FATAL_ERROR "cotire: unsupported ${_language} compiler ${_compilerID} version ${_compilerVersion}.") - endif() - set (${_flagsVar} ${_flags} PARENT_SCOPE) -endfunction() - -function (cotire_precompile_prefix_header _prefixFile _pchFile _hostFile) - set(_options "") - set(_oneValueArgs COMPILER_EXECUTABLE COMPILER_ARG1 COMPILER_ID COMPILER_VERSION LANGUAGE) - set(_multiValueArgs COMPILE_DEFINITIONS COMPILE_FLAGS INCLUDE_DIRECTORIES SYSTEM_INCLUDE_DIRECTORIES SYS COMPILER_LAUNCHER) - cmake_parse_arguments(_option "${_options}" "${_oneValueArgs}" "${_multiValueArgs}" ${ARGN}) - if (NOT _option_LANGUAGE) - set (_option_LANGUAGE "CXX") - endif() - if (NOT _option_COMPILER_ID) - set (_option_COMPILER_ID "${CMAKE_${_option_LANGUAGE}_ID}") - endif() - if (NOT _option_COMPILER_VERSION) - set (_option_COMPILER_VERSION "${CMAKE_${_option_LANGUAGE}_COMPILER_VERSION}") - endif() - cotire_init_compile_cmd(_cmd "${_option_LANGUAGE}" "${_option_COMPILER_LAUNCHER}" "${_option_COMPILER_EXECUTABLE}" "${_option_COMPILER_ARG1}") - cotire_add_definitions_to_cmd(_cmd "${_option_LANGUAGE}" ${_option_COMPILE_DEFINITIONS}) - cotire_add_compile_flags_to_cmd(_cmd ${_option_COMPILE_FLAGS}) - cotire_add_includes_to_cmd(_cmd "${_option_LANGUAGE}" _option_INCLUDE_DIRECTORIES _option_SYSTEM_INCLUDE_DIRECTORIES) - cotire_add_frameworks_to_cmd(_cmd "${_option_LANGUAGE}" _option_INCLUDE_DIRECTORIES _option_SYSTEM_INCLUDE_DIRECTORIES) - cotire_add_pch_compilation_flags( - "${_option_LANGUAGE}" "${_option_COMPILER_ID}" "${_option_COMPILER_VERSION}" - "${_prefixFile}" "${_pchFile}" "${_hostFile}" _cmd) - if (COTIRE_VERBOSE) - message (STATUS "execute_process: ${_cmd}") - endif() - if (MSVC_IDE OR _option_COMPILER_ID MATCHES "MSVC") - # cl.exe messes with the output streams unless the environment variable VS_UNICODE_OUTPUT is cleared - unset (ENV{VS_UNICODE_OUTPUT}) - elseif (_option_COMPILER_ID MATCHES "Clang" AND _option_COMPILER_VERSION VERSION_LESS "4.0.0") - if (_option_COMPILER_LAUNCHER MATCHES "ccache" OR - _option_COMPILER_EXECUTABLE MATCHES "ccache") - # Newer versions of Clang embed a compilation timestamp into the precompiled header binary, - # which results in "file has been modified since the precompiled header was built" errors if ccache is used. - # We work around the problem by disabling ccache upon pre-compiling the prefix header. - set (ENV{CCACHE_DISABLE} "true") - endif() - endif() - execute_process( - COMMAND ${_cmd} - WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}" - RESULT_VARIABLE _result) - if (_result) - message (FATAL_ERROR "cotire: error ${_result} precompiling ${_prefixFile}.") - endif() -endfunction() - -function (cotire_check_precompiled_header_support _language _target _msgVar) - set (_unsupportedCompiler - "Precompiled headers not supported for ${_language} compiler ${CMAKE_${_language}_COMPILER_ID}") - if (CMAKE_${_language}_COMPILER_ID MATCHES "MSVC") - # PCH supported since Visual Studio C++ 6.0 - # and CMake does not support an earlier version - set (${_msgVar} "" PARENT_SCOPE) - elseif (CMAKE_${_language}_COMPILER_ID MATCHES "GNU") - # GCC PCH support requires version >= 3.4 - if ("${CMAKE_${_language}_COMPILER_VERSION}" VERSION_LESS "3.4.0") - set (${_msgVar} "${_unsupportedCompiler} version ${CMAKE_${_language}_COMPILER_VERSION}." PARENT_SCOPE) - else() - set (${_msgVar} "" PARENT_SCOPE) - endif() - elseif (CMAKE_${_language}_COMPILER_ID MATCHES "Clang") - if (UNIX) - # all Unix Clang versions have PCH support - set (${_msgVar} "" PARENT_SCOPE) - elseif (WIN32) - # only clang-cl is supported under Windows - get_filename_component(_compilerName "${CMAKE_${_language}_COMPILER}" NAME_WE) - if (NOT _compilerName MATCHES "cl$") - set (${_msgVar} "${_unsupportedCompiler} version ${CMAKE_${_language}_COMPILER_VERSION}. Use clang-cl instead." PARENT_SCOPE) - endif() - endif() - elseif (CMAKE_${_language}_COMPILER_ID MATCHES "Intel") - # Intel PCH support requires version >= 8.0.0 - if ("${CMAKE_${_language}_COMPILER_VERSION}" VERSION_LESS "8.0.0") - set (${_msgVar} "${_unsupportedCompiler} version ${CMAKE_${_language}_COMPILER_VERSION}." PARENT_SCOPE) - else() - set (${_msgVar} "" PARENT_SCOPE) - endif() - else() - set (${_msgVar} "${_unsupportedCompiler}." PARENT_SCOPE) - endif() - # check if ccache is used as a compiler launcher - get_target_property(_launcher ${_target} ${_language}_COMPILER_LAUNCHER) - get_filename_component(_realCompilerExe "${CMAKE_${_language}_COMPILER}" REALPATH) - if (_realCompilerExe MATCHES "ccache" OR _launcher MATCHES "ccache") - # verify that ccache configuration is compatible with precompiled headers - # always check environment variable CCACHE_SLOPPINESS, because earlier versions of ccache - # do not report the "sloppiness" setting correctly upon printing ccache configuration - if (DEFINED ENV{CCACHE_SLOPPINESS}) - if (NOT "$ENV{CCACHE_SLOPPINESS}" MATCHES "pch_defines" OR - NOT "$ENV{CCACHE_SLOPPINESS}" MATCHES "time_macros") - set (${_msgVar} - "ccache requires the environment variable CCACHE_SLOPPINESS to be set to \"pch_defines,time_macros\"." - PARENT_SCOPE) - endif() - else() - if (_realCompilerExe MATCHES "ccache") - set (_ccacheExe "${_realCompilerExe}") - else() - set (_ccacheExe "${_launcher}") - endif() - # ccache 3.7.0 replaced --print-config with --show-config - # use -p instead, which seems to work for all version for now, sigh - execute_process( - COMMAND "${_ccacheExe}" "-p" - WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}" - RESULT_VARIABLE _result - OUTPUT_VARIABLE _ccacheConfig OUTPUT_STRIP_TRAILING_WHITESPACE - ERROR_QUIET) - if (_result) - set (${_msgVar} "ccache configuration cannot be determined." PARENT_SCOPE) - elseif (NOT _ccacheConfig MATCHES "sloppiness.*=.*time_macros" OR - NOT _ccacheConfig MATCHES "sloppiness.*=.*pch_defines") - set (${_msgVar} - "ccache requires configuration setting \"sloppiness\" to be set to \"pch_defines,time_macros\"." - PARENT_SCOPE) - endif() - endif() - endif() - if (APPLE) - # PCH compilation not supported by GCC / Clang for multi-architecture builds (e.g., i386, x86_64) - cotire_get_configuration_types(_configs) - foreach (_config ${_configs}) - set (_targetFlags "") - cotire_get_target_compile_flags("${_config}" "${_language}" "${_target}" _targetFlags) - cotire_filter_compile_flags("${_language}" "arch" _architectures _ignore ${_targetFlags}) - list (LENGTH _architectures _numberOfArchitectures) - if (_numberOfArchitectures GREATER 1) - string (REPLACE ";" ", " _architectureStr "${_architectures}") - set (${_msgVar} - "Precompiled headers not supported on Darwin for multi-architecture builds (${_architectureStr})." - PARENT_SCOPE) - break() - endif() - endforeach() - endif() -endfunction() - -macro (cotire_get_intermediate_dir _cotireDir) - # ${CMAKE_CFG_INTDIR} may reference a build-time variable when using a generator which supports configuration types - get_filename_component(${_cotireDir} "${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/${COTIRE_INTDIR}" ABSOLUTE) -endmacro() - -macro (cotire_setup_file_extension_variables) - set (_unityFileExt_C ".c") - set (_unityFileExt_CXX ".cxx") - set (_prefixFileExt_C ".h") - set (_prefixFileExt_CXX ".hxx") - set (_prefixSourceFileExt_C ".c") - set (_prefixSourceFileExt_CXX ".cxx") -endmacro() - -function (cotire_make_single_unity_source_file_path _language _target _unityFileVar) - cotire_setup_file_extension_variables() - if (NOT DEFINED _unityFileExt_${_language}) - set (${_unityFileVar} "" PARENT_SCOPE) - return() - endif() - set (_unityFileBaseName "${_target}_${_language}${COTIRE_UNITY_SOURCE_FILENAME_SUFFIX}") - set (_unityFileName "${_unityFileBaseName}${_unityFileExt_${_language}}") - cotire_get_intermediate_dir(_baseDir) - set (_unityFile "${_baseDir}/${_unityFileName}") - set (${_unityFileVar} "${_unityFile}" PARENT_SCOPE) -endfunction() - -function (cotire_make_unity_source_file_paths _language _target _maxIncludes _unityFilesVar) - cotire_setup_file_extension_variables() - if (NOT DEFINED _unityFileExt_${_language}) - set (${_unityFileVar} "" PARENT_SCOPE) - return() - endif() - set (_unityFileBaseName "${_target}_${_language}${COTIRE_UNITY_SOURCE_FILENAME_SUFFIX}") - cotire_get_intermediate_dir(_baseDir) - set (_startIndex 0) - set (_index 0) - set (_unityFiles "") - set (_sourceFiles ${ARGN}) - foreach (_sourceFile ${_sourceFiles}) - get_source_file_property(_startNew "${_sourceFile}" COTIRE_START_NEW_UNITY_SOURCE) - math (EXPR _unityFileCount "${_index} - ${_startIndex}") - if (_startNew OR (_maxIncludes GREATER 0 AND NOT _unityFileCount LESS _maxIncludes)) - if (_index GREATER 0) - # start new unity file segment - math (EXPR _endIndex "${_index} - 1") - set (_unityFileName "${_unityFileBaseName}_${_startIndex}_${_endIndex}${_unityFileExt_${_language}}") - list (APPEND _unityFiles "${_baseDir}/${_unityFileName}") - endif() - set (_startIndex ${_index}) - endif() - math (EXPR _index "${_index} + 1") - endforeach() - list (LENGTH _sourceFiles _numberOfSources) - if (_startIndex EQUAL 0) - # there is only a single unity file - cotire_make_single_unity_source_file_path(${_language} ${_target} _unityFiles) - elseif (_startIndex LESS _numberOfSources) - # end with final unity file segment - math (EXPR _endIndex "${_index} - 1") - set (_unityFileName "${_unityFileBaseName}_${_startIndex}_${_endIndex}${_unityFileExt_${_language}}") - list (APPEND _unityFiles "${_baseDir}/${_unityFileName}") - endif() - set (${_unityFilesVar} ${_unityFiles} PARENT_SCOPE) - if (COTIRE_DEBUG AND _unityFiles) - message (STATUS "unity files: ${_unityFiles}") - endif() -endfunction() - -function (cotire_unity_to_prefix_file_path _language _target _unityFile _prefixFileVar) - cotire_setup_file_extension_variables() - if (NOT DEFINED _unityFileExt_${_language}) - set (${_prefixFileVar} "" PARENT_SCOPE) - return() - endif() - set (_unityFileBaseName "${_target}_${_language}${COTIRE_UNITY_SOURCE_FILENAME_SUFFIX}") - set (_prefixFileBaseName "${_target}_${_language}${COTIRE_PREFIX_HEADER_FILENAME_SUFFIX}") - string (REPLACE "${_unityFileBaseName}" "${_prefixFileBaseName}" _prefixFile "${_unityFile}") - string (REGEX REPLACE "${_unityFileExt_${_language}}$" "${_prefixFileExt_${_language}}" _prefixFile "${_prefixFile}") - set (${_prefixFileVar} "${_prefixFile}" PARENT_SCOPE) -endfunction() - -function (cotire_prefix_header_to_source_file_path _language _prefixHeaderFile _prefixSourceFileVar) - cotire_setup_file_extension_variables() - if (NOT DEFINED _prefixSourceFileExt_${_language}) - set (${_prefixSourceFileVar} "" PARENT_SCOPE) - return() - endif() - string (REGEX REPLACE "${_prefixFileExt_${_language}}$" "${_prefixSourceFileExt_${_language}}" _prefixSourceFile "${_prefixHeaderFile}") - set (${_prefixSourceFileVar} "${_prefixSourceFile}" PARENT_SCOPE) -endfunction() - -function (cotire_make_prefix_file_name _language _target _prefixFileBaseNameVar _prefixFileNameVar) - cotire_setup_file_extension_variables() - if (NOT _language) - set (_prefixFileBaseName "${_target}${COTIRE_PREFIX_HEADER_FILENAME_SUFFIX}") - set (_prefixFileName "${_prefixFileBaseName}${_prefixFileExt_C}") - elseif (DEFINED _prefixFileExt_${_language}) - set (_prefixFileBaseName "${_target}_${_language}${COTIRE_PREFIX_HEADER_FILENAME_SUFFIX}") - set (_prefixFileName "${_prefixFileBaseName}${_prefixFileExt_${_language}}") - else() - set (_prefixFileBaseName "") - set (_prefixFileName "") - endif() - set (${_prefixFileBaseNameVar} "${_prefixFileBaseName}" PARENT_SCOPE) - set (${_prefixFileNameVar} "${_prefixFileName}" PARENT_SCOPE) -endfunction() - -function (cotire_make_prefix_file_path _language _target _prefixFileVar) - cotire_make_prefix_file_name("${_language}" "${_target}" _prefixFileBaseName _prefixFileName) - set (${_prefixFileVar} "" PARENT_SCOPE) - if (_prefixFileName) - if (NOT _language) - set (_language "C") - endif() - if (CMAKE_${_language}_COMPILER_ID MATCHES "GNU|Clang|Intel|MSVC") - cotire_get_intermediate_dir(_baseDir) - set (${_prefixFileVar} "${_baseDir}/${_prefixFileName}" PARENT_SCOPE) - endif() - endif() -endfunction() - -function (cotire_make_pch_file_path _language _target _pchFileVar) - cotire_make_prefix_file_name("${_language}" "${_target}" _prefixFileBaseName _prefixFileName) - set (${_pchFileVar} "" PARENT_SCOPE) - if (_prefixFileBaseName AND _prefixFileName) - cotire_check_precompiled_header_support("${_language}" "${_target}" _msg) - if (NOT _msg) - if (XCODE) - # For Xcode, we completely hand off the compilation of the prefix header to the IDE - return() - endif() - cotire_get_intermediate_dir(_baseDir) - if (CMAKE_${_language}_COMPILER_ID MATCHES "MSVC") - # MSVC uses the extension .pch added to the prefix header base name - set (${_pchFileVar} "${_baseDir}/${_prefixFileBaseName}.pch" PARENT_SCOPE) - elseif (CMAKE_${_language}_COMPILER_ID MATCHES "Clang") - # Clang looks for a precompiled header corresponding to the prefix header with the extension .pch appended - set (${_pchFileVar} "${_baseDir}/${_prefixFileName}.pch" PARENT_SCOPE) - elseif (CMAKE_${_language}_COMPILER_ID MATCHES "GNU") - # GCC looks for a precompiled header corresponding to the prefix header with the extension .gch appended - set (${_pchFileVar} "${_baseDir}/${_prefixFileName}.gch" PARENT_SCOPE) - elseif (CMAKE_${_language}_COMPILER_ID MATCHES "Intel") - # Intel uses the extension .pchi added to the prefix header base name - set (${_pchFileVar} "${_baseDir}/${_prefixFileBaseName}.pchi" PARENT_SCOPE) - endif() - endif() - endif() -endfunction() - -function (cotire_select_unity_source_files _unityFile _sourcesVar) - set (_sourceFiles ${ARGN}) - if (_sourceFiles AND "${_unityFile}" MATCHES "${COTIRE_UNITY_SOURCE_FILENAME_SUFFIX}_([0-9]+)_([0-9]+)") - set (_startIndex ${CMAKE_MATCH_1}) - set (_endIndex ${CMAKE_MATCH_2}) - list (LENGTH _sourceFiles _numberOfSources) - if (NOT _startIndex LESS _numberOfSources) - math (EXPR _startIndex "${_numberOfSources} - 1") - endif() - if (NOT _endIndex LESS _numberOfSources) - math (EXPR _endIndex "${_numberOfSources} - 1") - endif() - set (_files "") - foreach (_index RANGE ${_startIndex} ${_endIndex}) - list (GET _sourceFiles ${_index} _file) - list (APPEND _files "${_file}") - endforeach() - else() - set (_files ${_sourceFiles}) - endif() - set (${_sourcesVar} ${_files} PARENT_SCOPE) -endfunction() - -function (cotire_get_unity_source_dependencies _language _target _dependencySourcesVar) - set (_dependencySources "") - # depend on target's generated source files - get_target_property(_targetSourceFiles ${_target} SOURCES) - cotire_get_objects_with_property_on(_generatedSources GENERATED SOURCE ${_targetSourceFiles}) - if (_generatedSources) - # but omit all generated source files that have the COTIRE_EXCLUDED property set to true - cotire_get_objects_with_property_on(_excludedGeneratedSources COTIRE_EXCLUDED SOURCE ${_generatedSources}) - if (_excludedGeneratedSources) - list (REMOVE_ITEM _generatedSources ${_excludedGeneratedSources}) - endif() - # and omit all generated source files that have the COTIRE_DEPENDENCY property set to false explicitly - cotire_get_objects_with_property_off(_excludedNonDependencySources COTIRE_DEPENDENCY SOURCE ${_generatedSources}) - if (_excludedNonDependencySources) - list (REMOVE_ITEM _generatedSources ${_excludedNonDependencySources}) - endif() - if (_generatedSources) - list (APPEND _dependencySources ${_generatedSources}) - endif() - endif() - if (COTIRE_DEBUG AND _dependencySources) - message (STATUS "${_language} ${_target} unity source dependencies: ${_dependencySources}") - endif() - set (${_dependencySourcesVar} ${_dependencySources} PARENT_SCOPE) -endfunction() - -function (cotire_get_prefix_header_dependencies _language _target _dependencySourcesVar) - set (_dependencySources "") - # depend on target source files marked with custom COTIRE_DEPENDENCY property - get_target_property(_targetSourceFiles ${_target} SOURCES) - cotire_get_objects_with_property_on(_dependencySources COTIRE_DEPENDENCY SOURCE ${_targetSourceFiles}) - if (COTIRE_DEBUG AND _dependencySources) - message (STATUS "${_language} ${_target} prefix header dependencies: ${_dependencySources}") - endif() - set (${_dependencySourcesVar} ${_dependencySources} PARENT_SCOPE) -endfunction() - -function (cotire_generate_target_script _language _configurations _target _targetScriptVar _targetConfigScriptVar) - set (_targetSources ${ARGN}) - cotire_get_prefix_header_dependencies(${_language} ${_target} COTIRE_TARGET_PREFIX_DEPENDS ${_targetSources}) - cotire_get_unity_source_dependencies(${_language} ${_target} COTIRE_TARGET_UNITY_DEPENDS ${_targetSources}) - # set up variables to be configured - set (COTIRE_TARGET_LANGUAGE "${_language}") - get_target_property(COTIRE_TARGET_IGNORE_PATH ${_target} COTIRE_PREFIX_HEADER_IGNORE_PATH) - cotire_add_sys_root_paths(COTIRE_TARGET_IGNORE_PATH) - get_target_property(COTIRE_TARGET_INCLUDE_PATH ${_target} COTIRE_PREFIX_HEADER_INCLUDE_PATH) - cotire_add_sys_root_paths(COTIRE_TARGET_INCLUDE_PATH) - get_target_property(COTIRE_TARGET_PRE_UNDEFS ${_target} COTIRE_UNITY_SOURCE_PRE_UNDEFS) - get_target_property(COTIRE_TARGET_POST_UNDEFS ${_target} COTIRE_UNITY_SOURCE_POST_UNDEFS) - get_target_property(COTIRE_TARGET_MAXIMUM_NUMBER_OF_INCLUDES ${_target} COTIRE_UNITY_SOURCE_MAXIMUM_NUMBER_OF_INCLUDES) - get_target_property(COTIRE_TARGET_INCLUDE_PRIORITY_PATH ${_target} COTIRE_PREFIX_HEADER_INCLUDE_PRIORITY_PATH) - cotire_get_source_files_undefs(COTIRE_UNITY_SOURCE_PRE_UNDEFS COTIRE_TARGET_SOURCES_PRE_UNDEFS ${_targetSources}) - cotire_get_source_files_undefs(COTIRE_UNITY_SOURCE_POST_UNDEFS COTIRE_TARGET_SOURCES_POST_UNDEFS ${_targetSources}) - set (COTIRE_TARGET_CONFIGURATION_TYPES "${_configurations}") - foreach (_config ${_configurations}) - string (TOUPPER "${_config}" _upperConfig) - cotire_get_target_include_directories( - "${_config}" "${_language}" "${_target}" COTIRE_TARGET_INCLUDE_DIRECTORIES_${_upperConfig} COTIRE_TARGET_SYSTEM_INCLUDE_DIRECTORIES_${_upperConfig}) - cotire_get_target_compile_definitions( - "${_config}" "${_language}" "${_target}" COTIRE_TARGET_COMPILE_DEFINITIONS_${_upperConfig}) - cotire_get_target_compiler_flags( - "${_config}" "${_language}" "${_target}" COTIRE_TARGET_COMPILE_FLAGS_${_upperConfig}) - cotire_get_source_files_compile_definitions( - "${_config}" "${_language}" COTIRE_TARGET_SOURCES_COMPILE_DEFINITIONS_${_upperConfig} ${_targetSources}) - endforeach() - get_target_property(COTIRE_TARGET_${_language}_COMPILER_LAUNCHER ${_target} ${_language}_COMPILER_LAUNCHER) - # set up COTIRE_TARGET_SOURCES - set (COTIRE_TARGET_SOURCES "") - foreach (_sourceFile ${_targetSources}) - get_source_file_property(_generated "${_sourceFile}" GENERATED) - if (_generated) - # use absolute paths for generated files only, retrieving the LOCATION property is an expensive operation - get_source_file_property(_sourceLocation "${_sourceFile}" LOCATION) - list (APPEND COTIRE_TARGET_SOURCES "${_sourceLocation}") - else() - list (APPEND COTIRE_TARGET_SOURCES "${_sourceFile}") - endif() - endforeach() - # copy variable definitions to cotire target script - get_cmake_property(_vars VARIABLES) - string (REGEX MATCHALL "COTIRE_[A-Za-z0-9_]+" _matchVars "${_vars}") - # omit COTIRE_*_INIT variables - string (REGEX MATCHALL "COTIRE_[A-Za-z0-9_]+_INIT" _initVars "${_matchVars}") - if (_initVars) - list (REMOVE_ITEM _matchVars ${_initVars}) - endif() - # omit COTIRE_VERBOSE which is passed as a CMake define on command line - list (REMOVE_ITEM _matchVars COTIRE_VERBOSE) - set (_contents "") - set (_contentsHasGeneratorExpressions FALSE) - foreach (_var IN LISTS _matchVars ITEMS - XCODE MSVC CMAKE_GENERATOR CMAKE_BUILD_TYPE CMAKE_CONFIGURATION_TYPES - CMAKE_${_language}_COMPILER_ID CMAKE_${_language}_COMPILER_VERSION - CMAKE_${_language}_COMPILER_LAUNCHER CMAKE_${_language}_COMPILER CMAKE_${_language}_COMPILER_ARG1 - CMAKE_INCLUDE_FLAG_${_language} CMAKE_INCLUDE_FLAG_SEP_${_language} - CMAKE_INCLUDE_SYSTEM_FLAG_${_language} - CMAKE_${_language}_FRAMEWORK_SEARCH_FLAG - CMAKE_${_language}_SYSTEM_FRAMEWORK_SEARCH_FLAG - CMAKE_${_language}_SOURCE_FILE_EXTENSIONS) - if (DEFINED ${_var}) - string (REPLACE "\"" "\\\"" _value "${${_var}}") - set (_contents "${_contents}set (${_var} \"${_value}\")\n") - if (NOT _contentsHasGeneratorExpressions) - if ("${_value}" MATCHES "\\$<.*>") - set (_contentsHasGeneratorExpressions TRUE) - endif() - endif() - endif() - endforeach() - # generate target script file - get_filename_component(_moduleName "${COTIRE_CMAKE_MODULE_FILE}" NAME) - set (_targetCotireScript "${CMAKE_CURRENT_BINARY_DIR}/${_target}_${_language}_${_moduleName}") - cotire_write_file("CMAKE" "${_targetCotireScript}" "${_contents}" FALSE) - if (_contentsHasGeneratorExpressions) - # use file(GENERATE ...) to expand generator expressions in the target script at CMake generate-time - set (_configNameOrNoneGeneratorExpression "$<$:None>$<$>:$>") - set (_targetCotireConfigScript "${CMAKE_CURRENT_BINARY_DIR}/${_target}_${_language}_${_configNameOrNoneGeneratorExpression}_${_moduleName}") - file (GENERATE OUTPUT "${_targetCotireConfigScript}" INPUT "${_targetCotireScript}") - else() - set (_targetCotireConfigScript "${_targetCotireScript}") - endif() - set (${_targetScriptVar} "${_targetCotireScript}" PARENT_SCOPE) - set (${_targetConfigScriptVar} "${_targetCotireConfigScript}" PARENT_SCOPE) -endfunction() - -function (cotire_setup_pch_file_compilation _language _target _targetScript _prefixFile _pchFile _hostFile) - set (_sourceFiles ${ARGN}) - if (CMAKE_${_language}_COMPILER_ID MATCHES "MSVC|Intel" OR - (WIN32 AND CMAKE_${_language}_COMPILER_ID MATCHES "Clang")) - # for MSVC, Intel and Clang-cl, we attach the precompiled header compilation to the host file - # the remaining files include the precompiled header, see cotire_setup_pch_file_inclusion - if (_sourceFiles) - set (_flags "") - cotire_add_pch_compilation_flags( - "${_language}" "${CMAKE_${_language}_COMPILER_ID}" "${CMAKE_${_language}_COMPILER_VERSION}" - "${_prefixFile}" "${_pchFile}" "${_hostFile}" _flags) - set_property (SOURCE ${_hostFile} APPEND_STRING PROPERTY COMPILE_FLAGS " ${_flags} ") - if (COTIRE_DEBUG) - message (STATUS "set_property: SOURCE ${_hostFile} APPEND_STRING COMPILE_FLAGS ${_flags}") - endif() - set_property (SOURCE ${_hostFile} APPEND PROPERTY OBJECT_OUTPUTS "${_pchFile}") - # make object file generated from host file depend on prefix header - set_property (SOURCE ${_hostFile} APPEND PROPERTY OBJECT_DEPENDS "${_prefixFile}") - # mark host file as cotired to prevent it from being used in another cotired target - set_property (SOURCE ${_hostFile} PROPERTY COTIRE_TARGET "${_target}") - endif() - elseif ("${CMAKE_GENERATOR}" MATCHES "Make|Ninja") - # for makefile based generator, we add a custom command to precompile the prefix header - if (_targetScript) - cotire_set_cmd_to_prologue(_cmds) - list (APPEND _cmds -P "${COTIRE_CMAKE_MODULE_FILE}" "precompile" "${_targetScript}" "${_prefixFile}" "${_pchFile}" "${_hostFile}") - if (MSVC_IDE) - file (TO_NATIVE_PATH "${_pchFile}" _pchFileLogPath) - else() - file (RELATIVE_PATH _pchFileLogPath "${CMAKE_BINARY_DIR}" "${_pchFile}") - endif() - # make precompiled header compilation depend on the actual compiler executable used to force - # re-compilation when the compiler executable is updated. This prevents "created by a different GCC executable" - # warnings when the precompiled header is included. - get_filename_component(_realCompilerExe "${CMAKE_${_language}_COMPILER}" ABSOLUTE) - if (COTIRE_DEBUG) - message (STATUS "add_custom_command: OUTPUT ${_pchFile} ${_cmds} DEPENDS ${_prefixFile} ${_realCompilerExe} IMPLICIT_DEPENDS ${_language} ${_prefixFile}") - endif() - set_property (SOURCE "${_pchFile}" PROPERTY GENERATED TRUE) - add_custom_command( - OUTPUT "${_pchFile}" - COMMAND ${_cmds} - DEPENDS "${_prefixFile}" "${_realCompilerExe}" - IMPLICIT_DEPENDS ${_language} "${_prefixFile}" - WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}" - COMMENT "Building ${_language} precompiled header ${_pchFileLogPath}" - VERBATIM) - endif() - endif() -endfunction() - -function (cotire_setup_pch_file_inclusion _language _target _wholeTarget _prefixFile _pchFile _hostFile) - if (CMAKE_${_language}_COMPILER_ID MATCHES "MSVC|Intel" OR - (WIN32 AND CMAKE_${_language}_COMPILER_ID MATCHES "Clang")) - # for MSVC, Intel and clang-cl, we include the precompiled header in all but the host file - # the host file does the precompiled header compilation, see cotire_setup_pch_file_compilation - set (_sourceFiles ${ARGN}) - list (LENGTH _sourceFiles _numberOfSourceFiles) - if (_numberOfSourceFiles GREATER 0) - # mark sources as cotired to prevent them from being used in another cotired target - set_source_files_properties(${_sourceFiles} PROPERTIES COTIRE_TARGET "${_target}") - set (_flags "") - cotire_add_prefix_pch_inclusion_flags( - "${_language}" "${CMAKE_${_language}_COMPILER_ID}" "${CMAKE_${_language}_COMPILER_VERSION}" - "${_prefixFile}" "${_pchFile}" _flags) - set_property (SOURCE ${_sourceFiles} APPEND_STRING PROPERTY COMPILE_FLAGS " ${_flags} ") - if (COTIRE_DEBUG) - message (STATUS "set_property: SOURCE ${_sourceFiles} APPEND_STRING COMPILE_FLAGS ${_flags}") - endif() - # make object files generated from source files depend on precompiled header - set_property (SOURCE ${_sourceFiles} APPEND PROPERTY OBJECT_DEPENDS "${_pchFile}") - endif() - elseif ("${CMAKE_GENERATOR}" MATCHES "Make|Ninja") - set (_sourceFiles ${_hostFile} ${ARGN}) - if (NOT _wholeTarget) - # for makefile based generator, we force the inclusion of the prefix header for a subset - # of the source files, if this is a multi-language target or has excluded files - set (_flags "") - cotire_add_prefix_pch_inclusion_flags( - "${_language}" "${CMAKE_${_language}_COMPILER_ID}" "${CMAKE_${_language}_COMPILER_VERSION}" - "${_prefixFile}" "${_pchFile}" _flags) - set_property (SOURCE ${_sourceFiles} APPEND_STRING PROPERTY COMPILE_FLAGS " ${_flags} ") - if (COTIRE_DEBUG) - message (STATUS "set_property: SOURCE ${_sourceFiles} APPEND_STRING COMPILE_FLAGS ${_flags}") - endif() - # mark sources as cotired to prevent them from being used in another cotired target - set_source_files_properties(${_sourceFiles} PROPERTIES COTIRE_TARGET "${_target}") - endif() - # make object files generated from source files depend on precompiled header - set_property (SOURCE ${_sourceFiles} APPEND PROPERTY OBJECT_DEPENDS "${_pchFile}") - endif() -endfunction() - -function (cotire_setup_prefix_file_inclusion _language _target _prefixFile) - set (_sourceFiles ${ARGN}) - # force the inclusion of the prefix header for the given source files - set (_flags "") - set (_pchFile "") - cotire_add_prefix_pch_inclusion_flags( - "${_language}" "${CMAKE_${_language}_COMPILER_ID}" "${CMAKE_${_language}_COMPILER_VERSION}" - "${_prefixFile}" "${_pchFile}" _flags) - set_property (SOURCE ${_sourceFiles} APPEND_STRING PROPERTY COMPILE_FLAGS " ${_flags} ") - if (COTIRE_DEBUG) - message (STATUS "set_property: SOURCE ${_sourceFiles} APPEND_STRING COMPILE_FLAGS ${_flags}") - endif() - # mark sources as cotired to prevent them from being used in another cotired target - set_source_files_properties(${_sourceFiles} PROPERTIES COTIRE_TARGET "${_target}") - # make object files generated from source files depend on prefix header - set_property (SOURCE ${_sourceFiles} APPEND PROPERTY OBJECT_DEPENDS "${_prefixFile}") -endfunction() - -function (cotire_get_first_set_property_value _propertyValueVar _type _object) - set (_properties ${ARGN}) - foreach (_property ${_properties}) - get_property(_propertyValue ${_type} "${_object}" PROPERTY ${_property}) - if (_propertyValue) - set (${_propertyValueVar} ${_propertyValue} PARENT_SCOPE) - return() - endif() - endforeach() - set (${_propertyValueVar} "" PARENT_SCOPE) -endfunction() - -function (cotire_setup_combine_command _language _targetScript _joinedFile _cmdsVar) - set (_files ${ARGN}) - set (_filesPaths "") - foreach (_file ${_files}) - get_filename_component(_filePath "${_file}" ABSOLUTE) - list (APPEND _filesPaths "${_filePath}") - endforeach() - cotire_set_cmd_to_prologue(_prefixCmd) - list (APPEND _prefixCmd -P "${COTIRE_CMAKE_MODULE_FILE}" "combine") - if (_targetScript) - list (APPEND _prefixCmd "${_targetScript}") - endif() - list (APPEND _prefixCmd "${_joinedFile}" ${_filesPaths}) - if (COTIRE_DEBUG) - message (STATUS "add_custom_command: OUTPUT ${_joinedFile} COMMAND ${_prefixCmd} DEPENDS ${_files}") - endif() - set_property (SOURCE "${_joinedFile}" PROPERTY GENERATED TRUE) - if (MSVC_IDE) - file (TO_NATIVE_PATH "${_joinedFile}" _joinedFileLogPath) - else() - file (RELATIVE_PATH _joinedFileLogPath "${CMAKE_BINARY_DIR}" "${_joinedFile}") - endif() - get_filename_component(_joinedFileBaseName "${_joinedFile}" NAME_WE) - get_filename_component(_joinedFileExt "${_joinedFile}" EXT) - if (_language AND _joinedFileBaseName MATCHES "${COTIRE_UNITY_SOURCE_FILENAME_SUFFIX}$") - set (_comment "Generating ${_language} unity source ${_joinedFileLogPath}") - elseif (_language AND _joinedFileBaseName MATCHES "${COTIRE_PREFIX_HEADER_FILENAME_SUFFIX}$") - if (_joinedFileExt MATCHES "^\\.c") - set (_comment "Generating ${_language} prefix source ${_joinedFileLogPath}") - else() - set (_comment "Generating ${_language} prefix header ${_joinedFileLogPath}") - endif() - else() - set (_comment "Generating ${_joinedFileLogPath}") - endif() - add_custom_command( - OUTPUT "${_joinedFile}" - COMMAND ${_prefixCmd} - DEPENDS ${_files} - COMMENT "${_comment}" - WORKING_DIRECTORY "${CMAKE_BINARY_DIR}" - VERBATIM) - list (APPEND ${_cmdsVar} COMMAND ${_prefixCmd}) - set (${_cmdsVar} ${${_cmdsVar}} PARENT_SCOPE) -endfunction() - -function (cotire_setup_target_pch_usage _languages _target _wholeTarget) - if (XCODE) - # for Xcode, we attach a pre-build action to generate the unity sources and prefix headers - set (_prefixFiles "") - foreach (_language ${_languages}) - get_property(_prefixFile TARGET ${_target} PROPERTY COTIRE_${_language}_PREFIX_HEADER) - if (_prefixFile) - list (APPEND _prefixFiles "${_prefixFile}") - endif() - endforeach() - set (_cmds ${ARGN}) - list (LENGTH _prefixFiles _numberOfPrefixFiles) - if (_numberOfPrefixFiles GREATER 1) - # we also generate a generic, single prefix header which includes all language specific prefix headers - set (_language "") - set (_targetScript "") - cotire_make_prefix_file_path("${_language}" ${_target} _prefixHeader) - cotire_setup_combine_command("${_language}" "${_targetScript}" "${_prefixHeader}" _cmds ${_prefixFiles}) - else() - set (_prefixHeader "${_prefixFiles}") - endif() - if (COTIRE_DEBUG) - message (STATUS "add_custom_command: TARGET ${_target} PRE_BUILD ${_cmds}") - endif() - # because CMake PRE_BUILD command does not support dependencies, - # we check dependencies explicitly in cotire script mode when the pre-build action is run - add_custom_command( - TARGET "${_target}" - PRE_BUILD ${_cmds} - WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}" - COMMENT "Updating target ${_target} prefix headers" - VERBATIM) - # make Xcode precompile the generated prefix header with ProcessPCH and ProcessPCH++ - set_target_properties(${_target} PROPERTIES XCODE_ATTRIBUTE_GCC_PRECOMPILE_PREFIX_HEADER "YES") - set_target_properties(${_target} PROPERTIES XCODE_ATTRIBUTE_GCC_PREFIX_HEADER "${_prefixHeader}") - elseif ("${CMAKE_GENERATOR}" MATCHES "Make|Ninja") - # for makefile based generator, we force inclusion of the prefix header for all target source files - # if this is a single-language target without any excluded files - if (_wholeTarget) - set (_language "${_languages}") - # for MSVC, Intel and clang-cl, precompiled header inclusion is always done on the source file level - # see cotire_setup_pch_file_inclusion - if (NOT CMAKE_${_language}_COMPILER_ID MATCHES "MSVC|Intel" AND NOT - (WIN32 AND CMAKE_${_language}_COMPILER_ID MATCHES "Clang")) - get_property(_prefixFile TARGET ${_target} PROPERTY COTIRE_${_language}_PREFIX_HEADER) - if (_prefixFile) - get_property(_pchFile TARGET ${_target} PROPERTY COTIRE_${_language}_PRECOMPILED_HEADER) - set (_options COMPILE_OPTIONS) - cotire_add_prefix_pch_inclusion_flags( - "${_language}" "${CMAKE_${_language}_COMPILER_ID}" "${CMAKE_${_language}_COMPILER_VERSION}" - "${_prefixFile}" "${_pchFile}" _options) - set_property(TARGET ${_target} APPEND PROPERTY ${_options}) - if (COTIRE_DEBUG) - message (STATUS "set_property: TARGET ${_target} APPEND PROPERTY ${_options}") - endif() - endif() - endif() - endif() - endif() -endfunction() - -function (cotire_setup_unity_generation_commands _language _target _targetScript _targetConfigScript _unityFiles _cmdsVar) - set (_dependencySources "") - cotire_get_unity_source_dependencies(${_language} ${_target} _dependencySources ${ARGN}) - foreach (_unityFile ${_unityFiles}) - set_property (SOURCE "${_unityFile}" PROPERTY GENERATED TRUE) - # set up compiled unity source dependencies via OBJECT_DEPENDS - # this ensures that missing source files are generated before the unity file is compiled - if (COTIRE_DEBUG AND _dependencySources) - message (STATUS "${_unityFile} OBJECT_DEPENDS ${_dependencySources}") - endif() - if (_dependencySources) - # the OBJECT_DEPENDS property requires a list of full paths - set (_objectDependsPaths "") - foreach (_sourceFile ${_dependencySources}) - get_source_file_property(_sourceLocation "${_sourceFile}" LOCATION) - list (APPEND _objectDependsPaths "${_sourceLocation}") - endforeach() - set_property (SOURCE "${_unityFile}" PROPERTY OBJECT_DEPENDS ${_objectDependsPaths}) - endif() - if (WIN32 AND CMAKE_${_language}_COMPILER_ID MATCHES "MSVC|Intel") - # unity file compilation results in potentially huge object file, - # thus use /bigobj by default under cl.exe and Windows Intel - set_property (SOURCE "${_unityFile}" APPEND_STRING PROPERTY COMPILE_FLAGS "/bigobj") - endif() - cotire_set_cmd_to_prologue(_unityCmd) - list (APPEND _unityCmd -P "${COTIRE_CMAKE_MODULE_FILE}" "unity" "${_targetConfigScript}" "${_unityFile}") - if (CMAKE_VERSION VERSION_LESS "3.1.0") - set (_unityCmdDepends "${_targetScript}") - else() - # CMake 3.1.0 supports generator expressions in arguments to DEPENDS - set (_unityCmdDepends "${_targetConfigScript}") - endif() - if (MSVC_IDE) - file (TO_NATIVE_PATH "${_unityFile}" _unityFileLogPath) - else() - file (RELATIVE_PATH _unityFileLogPath "${CMAKE_BINARY_DIR}" "${_unityFile}") - endif() - if (COTIRE_DEBUG) - message (STATUS "add_custom_command: OUTPUT ${_unityFile} COMMAND ${_unityCmd} DEPENDS ${_unityCmdDepends}") - endif() - add_custom_command( - OUTPUT "${_unityFile}" - COMMAND ${_unityCmd} - DEPENDS ${_unityCmdDepends} - COMMENT "Generating ${_language} unity source ${_unityFileLogPath}" - WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}" - VERBATIM) - list (APPEND ${_cmdsVar} COMMAND ${_unityCmd}) - endforeach() - set (${_cmdsVar} ${${_cmdsVar}} PARENT_SCOPE) -endfunction() - -function (cotire_setup_prefix_generation_command _language _target _targetScript _prefixFile _unityFiles _cmdsVar) - set (_sourceFiles ${ARGN}) - set (_dependencySources "") - cotire_get_prefix_header_dependencies(${_language} ${_target} _dependencySources ${_sourceFiles}) - cotire_set_cmd_to_prologue(_prefixCmd) - list (APPEND _prefixCmd -P "${COTIRE_CMAKE_MODULE_FILE}" "prefix" "${_targetScript}" "${_prefixFile}" ${_unityFiles}) - set_property (SOURCE "${_prefixFile}" PROPERTY GENERATED TRUE) - # make prefix header generation depend on the actual compiler executable used to force - # re-generation when the compiler executable is updated. This prevents "file not found" - # errors for compiler version specific system header files. - get_filename_component(_realCompilerExe "${CMAKE_${_language}_COMPILER}" ABSOLUTE) - if (COTIRE_DEBUG) - message (STATUS "add_custom_command: OUTPUT ${_prefixFile} COMMAND ${_prefixCmd} DEPENDS ${_unityFile} ${_dependencySources} ${_realCompilerExe}") - endif() - if (MSVC_IDE) - file (TO_NATIVE_PATH "${_prefixFile}" _prefixFileLogPath) - else() - file (RELATIVE_PATH _prefixFileLogPath "${CMAKE_BINARY_DIR}" "${_prefixFile}") - endif() - get_filename_component(_prefixFileExt "${_prefixFile}" EXT) - if (_prefixFileExt MATCHES "^\\.c") - set (_comment "Generating ${_language} prefix source ${_prefixFileLogPath}") - else() - set (_comment "Generating ${_language} prefix header ${_prefixFileLogPath}") - endif() - # prevent pre-processing errors upon generating the prefix header when a target's generated include file does not yet exist - # we do not add a file-level dependency for the target's generated files though, because we only want to depend on their existence - # thus we make the prefix header generation depend on a custom helper target which triggers the generation of the files - set (_preTargetName "${_target}${COTIRE_PCH_TARGET_SUFFIX}_pre") - if (TARGET ${_preTargetName}) - # custom helper target has already been generated while processing a different language - list (APPEND _dependencySources ${_preTargetName}) - else() - get_target_property(_targetSourceFiles ${_target} SOURCES) - cotire_get_objects_with_property_on(_generatedSources GENERATED SOURCE ${_targetSourceFiles}) - if (_generatedSources) - add_custom_target("${_preTargetName}" DEPENDS ${_generatedSources}) - cotire_init_target("${_preTargetName}") - list (APPEND _dependencySources ${_preTargetName}) - endif() - endif() - add_custom_command( - OUTPUT "${_prefixFile}" "${_prefixFile}.log" - COMMAND ${_prefixCmd} - DEPENDS ${_unityFiles} ${_dependencySources} "${_realCompilerExe}" - COMMENT "${_comment}" - WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}" - VERBATIM) - list (APPEND ${_cmdsVar} COMMAND ${_prefixCmd}) - set (${_cmdsVar} ${${_cmdsVar}} PARENT_SCOPE) -endfunction() - -function (cotire_setup_prefix_generation_from_unity_command _language _target _targetScript _prefixFile _unityFiles _cmdsVar) - set (_sourceFiles ${ARGN}) - if (CMAKE_${_language}_COMPILER_ID MATCHES "GNU|Clang") - # GNU and Clang require indirect compilation of the prefix header to make them honor the system_header pragma - cotire_prefix_header_to_source_file_path(${_language} "${_prefixFile}" _prefixSourceFile) - else() - set (_prefixSourceFile "${_prefixFile}") - endif() - cotire_setup_prefix_generation_command( - ${_language} ${_target} "${_targetScript}" - "${_prefixSourceFile}" "${_unityFiles}" ${_cmdsVar} ${_sourceFiles}) - if (CMAKE_${_language}_COMPILER_ID MATCHES "GNU|Clang") - # set up generation of a prefix source file which includes the prefix header - cotire_setup_combine_command(${_language} "${_targetScript}" "${_prefixFile}" _cmds ${_prefixSourceFile}) - endif() - set (${_cmdsVar} ${${_cmdsVar}} PARENT_SCOPE) -endfunction() - -function (cotire_setup_prefix_generation_from_provided_command _language _target _targetScript _prefixFile _cmdsVar) - set (_prefixHeaderFiles ${ARGN}) - if (CMAKE_${_language}_COMPILER_ID MATCHES "GNU|Clang") - # GNU and Clang require indirect compilation of the prefix header to make them honor the system_header pragma - cotire_prefix_header_to_source_file_path(${_language} "${_prefixFile}" _prefixSourceFile) - else() - set (_prefixSourceFile "${_prefixFile}") - endif() - cotire_setup_combine_command(${_language} "${_targetScript}" "${_prefixSourceFile}" _cmds ${_prefixHeaderFiles}) - if (CMAKE_${_language}_COMPILER_ID MATCHES "GNU|Clang") - # set up generation of a prefix source file which includes the prefix header - cotire_setup_combine_command(${_language} "${_targetScript}" "${_prefixFile}" _cmds ${_prefixSourceFile}) - endif() - set (${_cmdsVar} ${${_cmdsVar}} PARENT_SCOPE) -endfunction() - -function (cotire_init_cotire_target_properties _target) - get_property(_isSet TARGET ${_target} PROPERTY COTIRE_ENABLE_PRECOMPILED_HEADER SET) - if (NOT _isSet) - set_property(TARGET ${_target} PROPERTY COTIRE_ENABLE_PRECOMPILED_HEADER TRUE) - endif() - get_property(_isSet TARGET ${_target} PROPERTY COTIRE_ADD_UNITY_BUILD SET) - if (NOT _isSet) - set_property(TARGET ${_target} PROPERTY COTIRE_ADD_UNITY_BUILD TRUE) - endif() - get_property(_isSet TARGET ${_target} PROPERTY COTIRE_ADD_CLEAN SET) - if (NOT _isSet) - set_property(TARGET ${_target} PROPERTY COTIRE_ADD_CLEAN FALSE) - endif() - get_property(_isSet TARGET ${_target} PROPERTY COTIRE_PREFIX_HEADER_IGNORE_PATH SET) - if (NOT _isSet) - set_property(TARGET ${_target} PROPERTY COTIRE_PREFIX_HEADER_IGNORE_PATH "${CMAKE_SOURCE_DIR}") - cotire_check_is_path_relative_to("${CMAKE_BINARY_DIR}" _isRelative "${CMAKE_SOURCE_DIR}") - if (NOT _isRelative) - set_property(TARGET ${_target} APPEND PROPERTY COTIRE_PREFIX_HEADER_IGNORE_PATH "${CMAKE_BINARY_DIR}") - endif() - endif() - get_property(_isSet TARGET ${_target} PROPERTY COTIRE_PREFIX_HEADER_INCLUDE_PATH SET) - if (NOT _isSet) - set_property(TARGET ${_target} PROPERTY COTIRE_PREFIX_HEADER_INCLUDE_PATH "") - endif() - get_property(_isSet TARGET ${_target} PROPERTY COTIRE_PREFIX_HEADER_INCLUDE_PRIORITY_PATH SET) - if (NOT _isSet) - set_property(TARGET ${_target} PROPERTY COTIRE_PREFIX_HEADER_INCLUDE_PRIORITY_PATH "") - endif() - get_property(_isSet TARGET ${_target} PROPERTY COTIRE_UNITY_SOURCE_PRE_UNDEFS SET) - if (NOT _isSet) - set_property(TARGET ${_target} PROPERTY COTIRE_UNITY_SOURCE_PRE_UNDEFS "") - endif() - get_property(_isSet TARGET ${_target} PROPERTY COTIRE_UNITY_SOURCE_POST_UNDEFS SET) - if (NOT _isSet) - set_property(TARGET ${_target} PROPERTY COTIRE_UNITY_SOURCE_POST_UNDEFS "") - endif() - get_property(_isSet TARGET ${_target} PROPERTY COTIRE_UNITY_LINK_LIBRARIES_INIT SET) - if (NOT _isSet) - set_property(TARGET ${_target} PROPERTY COTIRE_UNITY_LINK_LIBRARIES_INIT "COPY_UNITY") - endif() - get_property(_isSet TARGET ${_target} PROPERTY COTIRE_UNITY_SOURCE_MAXIMUM_NUMBER_OF_INCLUDES SET) - if (NOT _isSet) - if (COTIRE_MAXIMUM_NUMBER_OF_UNITY_INCLUDES) - set_property(TARGET ${_target} PROPERTY COTIRE_UNITY_SOURCE_MAXIMUM_NUMBER_OF_INCLUDES "${COTIRE_MAXIMUM_NUMBER_OF_UNITY_INCLUDES}") - else() - set_property(TARGET ${_target} PROPERTY COTIRE_UNITY_SOURCE_MAXIMUM_NUMBER_OF_INCLUDES "") - endif() - endif() -endfunction() - -function (cotire_make_target_message _target _languages _disableMsg _targetMsgVar) - get_target_property(_targetUsePCH ${_target} COTIRE_ENABLE_PRECOMPILED_HEADER) - get_target_property(_targetAddSCU ${_target} COTIRE_ADD_UNITY_BUILD) - string (REPLACE ";" " " _languagesStr "${_languages}") - math (EXPR _numberOfExcludedFiles "${ARGC} - 4") - if (_numberOfExcludedFiles EQUAL 0) - set (_excludedStr "") - elseif (COTIRE_VERBOSE OR _numberOfExcludedFiles LESS 4) - string (REPLACE ";" ", " _excludedStr "excluding ${ARGN}") - else() - set (_excludedStr "excluding ${_numberOfExcludedFiles} files") - endif() - set (_targetMsg "") - if (NOT _languages) - set (_targetMsg "Target ${_target} cannot be cotired.") - if (_disableMsg) - set (_targetMsg "${_targetMsg} ${_disableMsg}") - endif() - elseif (NOT _targetUsePCH AND NOT _targetAddSCU) - set (_targetMsg "${_languagesStr} target ${_target} cotired without unity build and precompiled header.") - if (_disableMsg) - set (_targetMsg "${_targetMsg} ${_disableMsg}") - endif() - elseif (NOT _targetUsePCH) - if (_excludedStr) - set (_targetMsg "${_languagesStr} target ${_target} cotired without precompiled header ${_excludedStr}.") - else() - set (_targetMsg "${_languagesStr} target ${_target} cotired without precompiled header.") - endif() - if (_disableMsg) - set (_targetMsg "${_targetMsg} ${_disableMsg}") - endif() - elseif (NOT _targetAddSCU) - if (_excludedStr) - set (_targetMsg "${_languagesStr} target ${_target} cotired without unity build ${_excludedStr}.") - else() - set (_targetMsg "${_languagesStr} target ${_target} cotired without unity build.") - endif() - if (_disableMsg) - set (_targetMsg "${_targetMsg} ${_disableMsg}") - endif() - else() - if (_excludedStr) - set (_targetMsg "${_languagesStr} target ${_target} cotired ${_excludedStr}.") - else() - set (_targetMsg "${_languagesStr} target ${_target} cotired.") - endif() - endif() - set (${_targetMsgVar} "${_targetMsg}" PARENT_SCOPE) -endfunction() - -function (cotire_choose_target_languages _target _targetLanguagesVar _wholeTargetVar) - set (_languages ${ARGN}) - set (_allSourceFiles "") - set (_allExcludedSourceFiles "") - set (_allCotiredSourceFiles "") - set (_targetLanguages "") - set (_pchEligibleTargetLanguages "") - get_target_property(_targetType ${_target} TYPE) - get_target_property(_targetSourceFiles ${_target} SOURCES) - get_target_property(_targetUsePCH ${_target} COTIRE_ENABLE_PRECOMPILED_HEADER) - get_target_property(_targetAddSCU ${_target} COTIRE_ADD_UNITY_BUILD) - set (_disableMsg "") - foreach (_language ${_languages}) - get_target_property(_prefixHeader ${_target} COTIRE_${_language}_PREFIX_HEADER) - get_target_property(_unityBuildFile ${_target} COTIRE_${_language}_UNITY_SOURCE) - if (_prefixHeader OR _unityBuildFile) - message (STATUS "cotire: target ${_target} has already been cotired.") - set (${_targetLanguagesVar} "" PARENT_SCOPE) - return() - endif() - if (_targetUsePCH AND "${_language}" MATCHES "^C|CXX$" AND DEFINED CMAKE_${_language}_COMPILER_ID) - if (CMAKE_${_language}_COMPILER_ID) - cotire_check_precompiled_header_support("${_language}" "${_target}" _disableMsg) - if (_disableMsg) - set (_targetUsePCH FALSE) - endif() - endif() - endif() - set (_sourceFiles "") - set (_excludedSources "") - set (_cotiredSources "") - cotire_filter_language_source_files(${_language} ${_target} _sourceFiles _excludedSources _cotiredSources ${_targetSourceFiles}) - if (_sourceFiles OR _excludedSources OR _cotiredSources) - list (APPEND _targetLanguages ${_language}) - endif() - if (_sourceFiles) - list (APPEND _allSourceFiles ${_sourceFiles}) - endif() - list (LENGTH _sourceFiles _numberOfSources) - if (NOT _numberOfSources LESS ${COTIRE_MINIMUM_NUMBER_OF_TARGET_SOURCES}) - list (APPEND _pchEligibleTargetLanguages ${_language}) - endif() - if (_excludedSources) - list (APPEND _allExcludedSourceFiles ${_excludedSources}) - endif() - if (_cotiredSources) - list (APPEND _allCotiredSourceFiles ${_cotiredSources}) - endif() - endforeach() - set (_targetMsgLevel STATUS) - if (NOT _targetLanguages) - string (REPLACE ";" " or " _languagesStr "${_languages}") - set (_disableMsg "No ${_languagesStr} source files.") - set (_targetUsePCH FALSE) - set (_targetAddSCU FALSE) - endif() - if (_targetUsePCH) - if (_allCotiredSourceFiles) - cotire_get_source_file_property_values(_cotireTargets COTIRE_TARGET ${_allCotiredSourceFiles}) - list (REMOVE_DUPLICATES _cotireTargets) - string (REPLACE ";" ", " _cotireTargetsStr "${_cotireTargets}") - set (_disableMsg "Target sources already include a precompiled header for target(s) ${_cotireTargets}.") - set (_disableMsg "${_disableMsg} Set target property COTIRE_ENABLE_PRECOMPILED_HEADER to FALSE for targets ${_target},") - set (_disableMsg "${_disableMsg} ${_cotireTargetsStr} to get a workable build system.") - set (_targetMsgLevel SEND_ERROR) - set (_targetUsePCH FALSE) - elseif (NOT _pchEligibleTargetLanguages) - set (_disableMsg "Too few applicable sources.") - set (_targetUsePCH FALSE) - elseif (XCODE AND _allExcludedSourceFiles) - # for Xcode, we cannot apply the precompiled header to individual sources, only to the whole target - set (_disableMsg "Exclusion of source files not supported for generator Xcode.") - set (_targetUsePCH FALSE) - elseif (XCODE AND "${_targetType}" STREQUAL "OBJECT_LIBRARY") - # for Xcode, we cannot apply the required PRE_BUILD action to generate the prefix header to an OBJECT_LIBRARY target - set (_disableMsg "Required PRE_BUILD action not supported for OBJECT_LIBRARY targets for generator Xcode.") - set (_targetUsePCH FALSE) - endif() - endif() - if (_targetAddSCU) - # disable unity builds if automatic Qt processing is used - get_target_property(_targetAutoMoc ${_target} AUTOMOC) - get_target_property(_targetAutoUic ${_target} AUTOUIC) - get_target_property(_targetAutoRcc ${_target} AUTORCC) - if (_targetAutoMoc OR _targetAutoUic OR _targetAutoRcc) - if (_disableMsg) - set (_disableMsg "${_disableMsg} Target uses automatic CMake Qt processing.") - else() - set (_disableMsg "Target uses automatic CMake Qt processing.") - endif() - set (_targetAddSCU FALSE) - endif() - endif() - set_property(TARGET ${_target} PROPERTY COTIRE_ENABLE_PRECOMPILED_HEADER ${_targetUsePCH}) - set_property(TARGET ${_target} PROPERTY COTIRE_ADD_UNITY_BUILD ${_targetAddSCU}) - cotire_make_target_message(${_target} "${_targetLanguages}" "${_disableMsg}" _targetMsg ${_allExcludedSourceFiles}) - if (_targetMsg) - if (NOT DEFINED COTIREMSG_${_target}) - set (COTIREMSG_${_target} "") - endif() - if (COTIRE_VERBOSE OR NOT "${_targetMsgLevel}" STREQUAL "STATUS" OR - NOT "${COTIREMSG_${_target}}" STREQUAL "${_targetMsg}") - # cache message to avoid redundant messages on re-configure - set (COTIREMSG_${_target} "${_targetMsg}" CACHE INTERNAL "${_target} cotire message.") - message (${_targetMsgLevel} "${_targetMsg}") - endif() - endif() - list (LENGTH _targetLanguages _numberOfLanguages) - if (_numberOfLanguages GREATER 1 OR _allExcludedSourceFiles) - set (${_wholeTargetVar} FALSE PARENT_SCOPE) - else() - set (${_wholeTargetVar} TRUE PARENT_SCOPE) - endif() - set (${_targetLanguagesVar} ${_targetLanguages} PARENT_SCOPE) -endfunction() - -function (cotire_compute_unity_max_number_of_includes _target _maxIncludesVar) - set (_sourceFiles ${ARGN}) - get_target_property(_maxIncludes ${_target} COTIRE_UNITY_SOURCE_MAXIMUM_NUMBER_OF_INCLUDES) - if (_maxIncludes MATCHES "(-j|--parallel|--jobs) ?([0-9]*)") - if (DEFINED CMAKE_MATCH_2) - set (_numberOfThreads "${CMAKE_MATCH_2}") - else() - set (_numberOfThreads "") - endif() - if (NOT _numberOfThreads) - # use all available cores - ProcessorCount(_numberOfThreads) - endif() - list (LENGTH _sourceFiles _numberOfSources) - math (EXPR _maxIncludes "(${_numberOfSources} + ${_numberOfThreads} - 1) / ${_numberOfThreads}") - elseif (NOT _maxIncludes MATCHES "[0-9]+") - set (_maxIncludes 0) - endif() - if (COTIRE_DEBUG) - message (STATUS "${_target} unity source max includes: ${_maxIncludes}") - endif() - set (${_maxIncludesVar} ${_maxIncludes} PARENT_SCOPE) -endfunction() - -function (cotire_process_target_language _language _configurations _target _wholeTarget _cmdsVar) - set (${_cmdsVar} "" PARENT_SCOPE) - get_target_property(_targetSourceFiles ${_target} SOURCES) - set (_sourceFiles "") - set (_excludedSources "") - set (_cotiredSources "") - cotire_filter_language_source_files(${_language} ${_target} _sourceFiles _excludedSources _cotiredSources ${_targetSourceFiles}) - if (NOT _sourceFiles AND NOT _cotiredSources) - return() - endif() - set (_cmds "") - # check for user provided unity source file list - get_property(_unitySourceFiles TARGET ${_target} PROPERTY COTIRE_${_language}_UNITY_SOURCE_INIT) - if (NOT _unitySourceFiles) - set (_unitySourceFiles ${_sourceFiles} ${_cotiredSources}) - endif() - cotire_generate_target_script( - ${_language} "${_configurations}" ${_target} _targetScript _targetConfigScript ${_unitySourceFiles}) - # set up unity files for parallel compilation - cotire_compute_unity_max_number_of_includes(${_target} _maxIncludes ${_unitySourceFiles}) - cotire_make_unity_source_file_paths(${_language} ${_target} ${_maxIncludes} _unityFiles ${_unitySourceFiles}) - list (LENGTH _unityFiles _numberOfUnityFiles) - if (_numberOfUnityFiles EQUAL 0) - return() - elseif (_numberOfUnityFiles GREATER 1) - cotire_setup_unity_generation_commands( - ${_language} ${_target} "${_targetScript}" "${_targetConfigScript}" "${_unityFiles}" _cmds ${_unitySourceFiles}) - endif() - # set up single unity file for prefix header generation - cotire_make_single_unity_source_file_path(${_language} ${_target} _unityFile) - cotire_setup_unity_generation_commands( - ${_language} ${_target} "${_targetScript}" "${_targetConfigScript}" "${_unityFile}" _cmds ${_unitySourceFiles}) - cotire_make_prefix_file_path(${_language} ${_target} _prefixFile) - # set up prefix header - if (_prefixFile) - # check for user provided prefix header files - get_property(_prefixHeaderFiles TARGET ${_target} PROPERTY COTIRE_${_language}_PREFIX_HEADER_INIT) - if (_prefixHeaderFiles) - cotire_setup_prefix_generation_from_provided_command( - ${_language} ${_target} "${_targetConfigScript}" "${_prefixFile}" _cmds ${_prefixHeaderFiles}) - else() - cotire_setup_prefix_generation_from_unity_command( - ${_language} ${_target} "${_targetConfigScript}" "${_prefixFile}" "${_unityFile}" _cmds ${_unitySourceFiles}) - endif() - # check if selected language has enough sources at all - list (LENGTH _sourceFiles _numberOfSources) - if (_numberOfSources LESS ${COTIRE_MINIMUM_NUMBER_OF_TARGET_SOURCES}) - set (_targetUsePCH FALSE) - else() - get_target_property(_targetUsePCH ${_target} COTIRE_ENABLE_PRECOMPILED_HEADER) - endif() - if (_targetUsePCH) - cotire_make_pch_file_path(${_language} ${_target} _pchFile) - if (_pchFile) - # first file in _sourceFiles is passed as the host file - cotire_setup_pch_file_compilation( - ${_language} ${_target} "${_targetConfigScript}" "${_prefixFile}" "${_pchFile}" ${_sourceFiles}) - cotire_setup_pch_file_inclusion( - ${_language} ${_target} ${_wholeTarget} "${_prefixFile}" "${_pchFile}" ${_sourceFiles}) - endif() - elseif (_prefixHeaderFiles) - # user provided prefix header must be included unconditionally - cotire_setup_prefix_file_inclusion(${_language} ${_target} "${_prefixFile}" ${_sourceFiles}) - endif() - endif() - # mark target as cotired for language - set_property(TARGET ${_target} PROPERTY COTIRE_${_language}_UNITY_SOURCE "${_unityFiles}") - if (_prefixFile) - set_property(TARGET ${_target} PROPERTY COTIRE_${_language}_PREFIX_HEADER "${_prefixFile}") - if (_targetUsePCH AND _pchFile) - set_property(TARGET ${_target} PROPERTY COTIRE_${_language}_PRECOMPILED_HEADER "${_pchFile}") - endif() - endif() - set (${_cmdsVar} ${_cmds} PARENT_SCOPE) -endfunction() - -function (cotire_setup_clean_target _target) - set (_cleanTargetName "${_target}${COTIRE_CLEAN_TARGET_SUFFIX}") - if (NOT TARGET "${_cleanTargetName}") - cotire_set_cmd_to_prologue(_cmds) - get_filename_component(_outputDir "${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}" ABSOLUTE) - list (APPEND _cmds -P "${COTIRE_CMAKE_MODULE_FILE}" "cleanup" "${_outputDir}" "${COTIRE_INTDIR}" "${_target}") - add_custom_target(${_cleanTargetName} - COMMAND ${_cmds} - WORKING_DIRECTORY "${CMAKE_BINARY_DIR}" - COMMENT "Cleaning up target ${_target} cotire generated files" - VERBATIM) - cotire_init_target("${_cleanTargetName}") - endif() -endfunction() - -function (cotire_setup_pch_target _languages _configurations _target) - if ("${CMAKE_GENERATOR}" MATCHES "Make|Ninja") - # for makefile based generators, we add a custom target to trigger the generation of the cotire related files - set (_dependsFiles "") - foreach (_language ${_languages}) - set (_props COTIRE_${_language}_PREFIX_HEADER COTIRE_${_language}_UNITY_SOURCE) - if (NOT CMAKE_${_language}_COMPILER_ID MATCHES "MSVC|Intel" AND NOT - (WIN32 AND CMAKE_${_language}_COMPILER_ID MATCHES "Clang")) - # MSVC, Intel and clang-cl only create precompiled header as a side effect - list (INSERT _props 0 COTIRE_${_language}_PRECOMPILED_HEADER) - endif() - cotire_get_first_set_property_value(_dependsFile TARGET ${_target} ${_props}) - if (_dependsFile) - list (APPEND _dependsFiles "${_dependsFile}") - endif() - endforeach() - if (_dependsFiles) - set (_pchTargetName "${_target}${COTIRE_PCH_TARGET_SUFFIX}") - add_custom_target("${_pchTargetName}" DEPENDS ${_dependsFiles}) - cotire_init_target("${_pchTargetName}") - cotire_add_to_pch_all_target(${_pchTargetName}) - endif() - else() - # for other generators, we add the "clean all" target to clean up the precompiled header - cotire_setup_clean_all_target() - endif() -endfunction() - -function (cotire_filter_object_libraries _target _objectLibrariesVar) - set (_objectLibraries "") - foreach (_source ${ARGN}) - if (_source MATCHES "^\\$$") - list (APPEND _objectLibraries "${_source}") - endif() - endforeach() - set (${_objectLibrariesVar} ${_objectLibraries} PARENT_SCOPE) -endfunction() - -function (cotire_collect_unity_target_sources _target _languages _unityTargetSourcesVar) - get_target_property(_targetSourceFiles ${_target} SOURCES) - set (_unityTargetSources ${_targetSourceFiles}) - foreach (_language ${_languages}) - get_property(_unityFiles TARGET ${_target} PROPERTY COTIRE_${_language}_UNITY_SOURCE) - if (_unityFiles) - # remove source files that are included in the unity source - set (_sourceFiles "") - set (_excludedSources "") - set (_cotiredSources "") - cotire_filter_language_source_files(${_language} ${_target} _sourceFiles _excludedSources _cotiredSources ${_targetSourceFiles}) - if (_sourceFiles OR _cotiredSources) - list (REMOVE_ITEM _unityTargetSources ${_sourceFiles} ${_cotiredSources}) - endif() - # add unity source files instead - list (APPEND _unityTargetSources ${_unityFiles}) - endif() - endforeach() - # handle object libraries which are part of the target's sources - get_target_property(_linkLibrariesStrategy ${_target} COTIRE_UNITY_LINK_LIBRARIES_INIT) - if ("${_linkLibrariesStrategy}" MATCHES "^COPY_UNITY$") - cotire_filter_object_libraries(${_target} _objectLibraries ${_targetSourceFiles}) - if (_objectLibraries) - cotire_map_libraries("${_linkLibrariesStrategy}" _unityObjectLibraries ${_objectLibraries}) - list (REMOVE_ITEM _unityTargetSources ${_objectLibraries}) - list (APPEND _unityTargetSources ${_unityObjectLibraries}) - endif() - endif() - set (${_unityTargetSourcesVar} ${_unityTargetSources} PARENT_SCOPE) -endfunction() - -function (cotire_setup_unity_target_pch_usage _languages _target) - foreach (_language ${_languages}) - get_property(_unityFiles TARGET ${_target} PROPERTY COTIRE_${_language}_UNITY_SOURCE) - if (_unityFiles) - get_property(_userPrefixFile TARGET ${_target} PROPERTY COTIRE_${_language}_PREFIX_HEADER_INIT) - get_property(_prefixFile TARGET ${_target} PROPERTY COTIRE_${_language}_PREFIX_HEADER) - if (_userPrefixFile AND _prefixFile) - # user provided prefix header must be included unconditionally by unity sources - cotire_setup_prefix_file_inclusion(${_language} ${_target} "${_prefixFile}" ${_unityFiles}) - endif() - endif() - endforeach() -endfunction() - -function (cotire_setup_unity_build_target _languages _configurations _target) - get_target_property(_unityTargetName ${_target} COTIRE_UNITY_TARGET_NAME) - if (NOT _unityTargetName) - set (_unityTargetName "${_target}${COTIRE_UNITY_BUILD_TARGET_SUFFIX}") - endif() - # determine unity target sub type - get_target_property(_targetType ${_target} TYPE) - if ("${_targetType}" STREQUAL "EXECUTABLE") - set (_unityTargetSubType "") - elseif (_targetType MATCHES "(STATIC|SHARED|MODULE|OBJECT)_LIBRARY") - set (_unityTargetSubType "${CMAKE_MATCH_1}") - else() - message (WARNING "cotire: target ${_target} has unknown target type ${_targetType}.") - return() - endif() - # determine unity target sources - set (_unityTargetSources "") - cotire_collect_unity_target_sources(${_target} "${_languages}" _unityTargetSources) - # prevent AUTOMOC, AUTOUIC and AUTORCC properties from being set when the unity target is created - set (CMAKE_AUTOMOC OFF) - set (CMAKE_AUTOUIC OFF) - set (CMAKE_AUTORCC OFF) - if (COTIRE_DEBUG) - message (STATUS "add target ${_targetType} ${_unityTargetName} ${_unityTargetSubType} EXCLUDE_FROM_ALL ${_unityTargetSources}") - endif() - # generate unity target - if ("${_targetType}" STREQUAL "EXECUTABLE") - add_executable(${_unityTargetName} ${_unityTargetSubType} EXCLUDE_FROM_ALL ${_unityTargetSources}) - else() - add_library(${_unityTargetName} ${_unityTargetSubType} EXCLUDE_FROM_ALL ${_unityTargetSources}) - endif() - # copy output location properties - set (_outputDirProperties - ARCHIVE_OUTPUT_DIRECTORY ARCHIVE_OUTPUT_DIRECTORY_ - LIBRARY_OUTPUT_DIRECTORY LIBRARY_OUTPUT_DIRECTORY_ - RUNTIME_OUTPUT_DIRECTORY RUNTIME_OUTPUT_DIRECTORY_) - if (COTIRE_UNITY_OUTPUT_DIRECTORY) - set (_setDefaultOutputDir TRUE) - if (IS_ABSOLUTE "${COTIRE_UNITY_OUTPUT_DIRECTORY}") - set (_outputDir "${COTIRE_UNITY_OUTPUT_DIRECTORY}") - else() - # append relative COTIRE_UNITY_OUTPUT_DIRECTORY to target's actual output directory - cotire_copy_set_properties("${_configurations}" TARGET ${_target} ${_unityTargetName} ${_outputDirProperties}) - cotire_resolve_config_properties("${_configurations}" _properties ${_outputDirProperties}) - foreach (_property ${_properties}) - get_property(_outputDir TARGET ${_target} PROPERTY ${_property}) - if (_outputDir) - get_filename_component(_outputDir "${_outputDir}/${COTIRE_UNITY_OUTPUT_DIRECTORY}" ABSOLUTE) - set_property(TARGET ${_unityTargetName} PROPERTY ${_property} "${_outputDir}") - set (_setDefaultOutputDir FALSE) - endif() - endforeach() - if (_setDefaultOutputDir) - get_filename_component(_outputDir "${CMAKE_CURRENT_BINARY_DIR}/${COTIRE_UNITY_OUTPUT_DIRECTORY}" ABSOLUTE) - endif() - endif() - if (_setDefaultOutputDir) - set_target_properties(${_unityTargetName} PROPERTIES - ARCHIVE_OUTPUT_DIRECTORY "${_outputDir}" - LIBRARY_OUTPUT_DIRECTORY "${_outputDir}" - RUNTIME_OUTPUT_DIRECTORY "${_outputDir}") - endif() - else() - cotire_copy_set_properties("${_configurations}" TARGET ${_target} ${_unityTargetName} - ${_outputDirProperties}) - endif() - # copy output name - cotire_copy_set_properties("${_configurations}" TARGET ${_target} ${_unityTargetName} - ARCHIVE_OUTPUT_NAME ARCHIVE_OUTPUT_NAME_ - LIBRARY_OUTPUT_NAME LIBRARY_OUTPUT_NAME_ - OUTPUT_NAME OUTPUT_NAME_ - RUNTIME_OUTPUT_NAME RUNTIME_OUTPUT_NAME_ - PREFIX _POSTFIX SUFFIX - IMPORT_PREFIX IMPORT_SUFFIX) - # copy compile stuff - cotire_copy_set_properties("${_configurations}" TARGET ${_target} ${_unityTargetName} - COMPILE_DEFINITIONS COMPILE_DEFINITIONS_ - COMPILE_FLAGS COMPILE_OPTIONS - Fortran_FORMAT Fortran_MODULE_DIRECTORY - INCLUDE_DIRECTORIES - INTERPROCEDURAL_OPTIMIZATION INTERPROCEDURAL_OPTIMIZATION_ - POSITION_INDEPENDENT_CODE - C_COMPILER_LAUNCHER CXX_COMPILER_LAUNCHER - C_INCLUDE_WHAT_YOU_USE CXX_INCLUDE_WHAT_YOU_USE - C_VISIBILITY_PRESET CXX_VISIBILITY_PRESET VISIBILITY_INLINES_HIDDEN - C_CLANG_TIDY CXX_CLANG_TIDY) - # copy compile features - cotire_copy_set_properties("${_configurations}" TARGET ${_target} ${_unityTargetName} - C_EXTENSIONS C_STANDARD C_STANDARD_REQUIRED - CXX_EXTENSIONS CXX_STANDARD CXX_STANDARD_REQUIRED - COMPILE_FEATURES) - # copy interface stuff - cotire_copy_set_properties("${_configurations}" TARGET ${_target} ${_unityTargetName} - COMPATIBLE_INTERFACE_BOOL COMPATIBLE_INTERFACE_NUMBER_MAX COMPATIBLE_INTERFACE_NUMBER_MIN - COMPATIBLE_INTERFACE_STRING - INTERFACE_COMPILE_DEFINITIONS INTERFACE_COMPILE_FEATURES INTERFACE_COMPILE_OPTIONS - INTERFACE_INCLUDE_DIRECTORIES INTERFACE_SOURCES - INTERFACE_POSITION_INDEPENDENT_CODE INTERFACE_SYSTEM_INCLUDE_DIRECTORIES - INTERFACE_AUTOUIC_OPTIONS NO_SYSTEM_FROM_IMPORTED) - # copy link stuff - cotire_copy_set_properties("${_configurations}" TARGET ${_target} ${_unityTargetName} - BUILD_WITH_INSTALL_RPATH BUILD_WITH_INSTALL_NAME_DIR - INSTALL_RPATH INSTALL_RPATH_USE_LINK_PATH SKIP_BUILD_RPATH - LINKER_LANGUAGE LINK_DEPENDS LINK_DEPENDS_NO_SHARED - LINK_FLAGS LINK_FLAGS_ - LINK_INTERFACE_LIBRARIES LINK_INTERFACE_LIBRARIES_ - LINK_INTERFACE_MULTIPLICITY LINK_INTERFACE_MULTIPLICITY_ - LINK_SEARCH_START_STATIC LINK_SEARCH_END_STATIC - STATIC_LIBRARY_FLAGS STATIC_LIBRARY_FLAGS_ - NO_SONAME SOVERSION VERSION - LINK_WHAT_YOU_USE BUILD_RPATH) - # copy cmake stuff - cotire_copy_set_properties("${_configurations}" TARGET ${_target} ${_unityTargetName} - IMPLICIT_DEPENDS_INCLUDE_TRANSFORM RULE_LAUNCH_COMPILE RULE_LAUNCH_CUSTOM RULE_LAUNCH_LINK) - # copy Apple platform specific stuff - cotire_copy_set_properties("${_configurations}" TARGET ${_target} ${_unityTargetName} - BUNDLE BUNDLE_EXTENSION FRAMEWORK FRAMEWORK_VERSION INSTALL_NAME_DIR - MACOSX_BUNDLE MACOSX_BUNDLE_INFO_PLIST MACOSX_FRAMEWORK_INFO_PLIST MACOSX_RPATH - OSX_ARCHITECTURES OSX_ARCHITECTURES_ PRIVATE_HEADER PUBLIC_HEADER RESOURCE XCTEST - IOS_INSTALL_COMBINED XCODE_EXPLICIT_FILE_TYPE XCODE_PRODUCT_TYPE) - # copy Windows platform specific stuff - cotire_copy_set_properties("${_configurations}" TARGET ${_target} ${_unityTargetName} - GNUtoMS - COMPILE_PDB_NAME COMPILE_PDB_NAME_ - COMPILE_PDB_OUTPUT_DIRECTORY COMPILE_PDB_OUTPUT_DIRECTORY_ - PDB_NAME PDB_NAME_ PDB_OUTPUT_DIRECTORY PDB_OUTPUT_DIRECTORY_ - VS_DESKTOP_EXTENSIONS_VERSION VS_DOTNET_REFERENCES VS_DOTNET_TARGET_FRAMEWORK_VERSION - VS_GLOBAL_KEYWORD VS_GLOBAL_PROJECT_TYPES VS_GLOBAL_ROOTNAMESPACE - VS_IOT_EXTENSIONS_VERSION VS_IOT_STARTUP_TASK - VS_KEYWORD VS_MOBILE_EXTENSIONS_VERSION - VS_SCC_AUXPATH VS_SCC_LOCALPATH VS_SCC_PROJECTNAME VS_SCC_PROVIDER - VS_WINDOWS_TARGET_PLATFORM_MIN_VERSION - VS_WINRT_COMPONENT VS_WINRT_EXTENSIONS VS_WINRT_REFERENCES - WIN32_EXECUTABLE WINDOWS_EXPORT_ALL_SYMBOLS - DEPLOYMENT_REMOTE_DIRECTORY VS_CONFIGURATION_TYPE - VS_SDK_REFERENCES VS_USER_PROPS VS_DEBUGGER_WORKING_DIRECTORY) - # copy Android platform specific stuff - cotire_copy_set_properties("${_configurations}" TARGET ${_target} ${_unityTargetName} - ANDROID_API ANDROID_API_MIN ANDROID_GUI - ANDROID_ANT_ADDITIONAL_OPTIONS ANDROID_ARCH ANDROID_ASSETS_DIRECTORIES - ANDROID_JAR_DEPENDENCIES ANDROID_JAR_DIRECTORIES ANDROID_JAVA_SOURCE_DIR - ANDROID_NATIVE_LIB_DEPENDENCIES ANDROID_NATIVE_LIB_DIRECTORIES - ANDROID_PROCESS_MAX ANDROID_PROGUARD ANDROID_PROGUARD_CONFIG_PATH - ANDROID_SECURE_PROPS_PATH ANDROID_SKIP_ANT_STEP ANDROID_STL_TYPE) - # copy CUDA platform specific stuff - cotire_copy_set_properties("${_configurations}" TARGET ${_target} ${_unityTargetName} - CUDA_PTX_COMPILATION CUDA_SEPARABLE_COMPILATION CUDA_RESOLVE_DEVICE_SYMBOLS - CUDA_EXTENSIONS CUDA_STANDARD CUDA_STANDARD_REQUIRED) - # use output name from original target - get_target_property(_targetOutputName ${_unityTargetName} OUTPUT_NAME) - if (NOT _targetOutputName) - set_property(TARGET ${_unityTargetName} PROPERTY OUTPUT_NAME "${_target}") - endif() - # use export symbol from original target - cotire_get_target_export_symbol("${_target}" _defineSymbol) - if (_defineSymbol) - set_property(TARGET ${_unityTargetName} PROPERTY DEFINE_SYMBOL "${_defineSymbol}") - if ("${_targetType}" STREQUAL "EXECUTABLE") - set_property(TARGET ${_unityTargetName} PROPERTY ENABLE_EXPORTS TRUE) - endif() - endif() - # enable parallel compilation for MSVC - if (MSVC AND "${CMAKE_GENERATOR}" MATCHES "Visual Studio") - list (LENGTH _unityTargetSources _numberOfUnityTargetSources) - if (_numberOfUnityTargetSources GREATER 1) - set_property(TARGET ${_unityTargetName} APPEND PROPERTY COMPILE_OPTIONS "/MP") - endif() - endif() - cotire_init_target(${_unityTargetName}) - cotire_add_to_unity_all_target(${_unityTargetName}) - set_property(TARGET ${_target} PROPERTY COTIRE_UNITY_TARGET_NAME "${_unityTargetName}") -endfunction(cotire_setup_unity_build_target) - -function (cotire_target _target) - set(_options "") - set(_oneValueArgs "") - set(_multiValueArgs LANGUAGES CONFIGURATIONS) - cmake_parse_arguments(_option "${_options}" "${_oneValueArgs}" "${_multiValueArgs}" ${ARGN}) - if (NOT _option_LANGUAGES) - get_property (_option_LANGUAGES GLOBAL PROPERTY ENABLED_LANGUAGES) - endif() - if (NOT _option_CONFIGURATIONS) - cotire_get_configuration_types(_option_CONFIGURATIONS) - endif() - # check if cotire can be applied to target at all - cotire_is_target_supported(${_target} _isSupported) - if (NOT _isSupported) - get_target_property(_imported ${_target} IMPORTED) - get_target_property(_targetType ${_target} TYPE) - if (_imported) - message (WARNING "cotire: imported ${_targetType} target ${_target} cannot be cotired.") - else() - message (STATUS "cotire: ${_targetType} target ${_target} cannot be cotired.") - endif() - return() - endif() - # resolve alias - get_target_property(_aliasName ${_target} ALIASED_TARGET) - if (_aliasName) - if (COTIRE_DEBUG) - message (STATUS "${_target} is an alias. Applying cotire to aliased target ${_aliasName} instead.") - endif() - set (_target ${_aliasName}) - endif() - # check if target needs to be cotired for build type - # when using configuration types, the test is performed at build time - cotire_init_cotire_target_properties(${_target}) - if (NOT CMAKE_CONFIGURATION_TYPES) - if (CMAKE_BUILD_TYPE) - list (FIND _option_CONFIGURATIONS "${CMAKE_BUILD_TYPE}" _index) - else() - list (FIND _option_CONFIGURATIONS "None" _index) - endif() - if (_index EQUAL -1) - if (COTIRE_DEBUG) - message (STATUS "CMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} not cotired (${_option_CONFIGURATIONS})") - endif() - return() - endif() - endif() - # when not using configuration types, immediately create cotire intermediate dir - if (NOT CMAKE_CONFIGURATION_TYPES) - cotire_get_intermediate_dir(_baseDir) - file (MAKE_DIRECTORY "${_baseDir}") - endif() - # choose languages that apply to the target - cotire_choose_target_languages("${_target}" _targetLanguages _wholeTarget ${_option_LANGUAGES}) - if (NOT _targetLanguages) - return() - endif() - set (_cmds "") - foreach (_language ${_targetLanguages}) - cotire_process_target_language("${_language}" "${_option_CONFIGURATIONS}" ${_target} ${_wholeTarget} _cmd) - if (_cmd) - list (APPEND _cmds ${_cmd}) - endif() - endforeach() - get_target_property(_targetAddSCU ${_target} COTIRE_ADD_UNITY_BUILD) - if (_targetAddSCU) - cotire_setup_unity_build_target("${_targetLanguages}" "${_option_CONFIGURATIONS}" ${_target}) - endif() - get_target_property(_targetUsePCH ${_target} COTIRE_ENABLE_PRECOMPILED_HEADER) - if (_targetUsePCH) - cotire_setup_target_pch_usage("${_targetLanguages}" ${_target} ${_wholeTarget} ${_cmds}) - cotire_setup_pch_target("${_targetLanguages}" "${_option_CONFIGURATIONS}" ${_target}) - if (_targetAddSCU) - cotire_setup_unity_target_pch_usage("${_targetLanguages}" ${_target}) - endif() - endif() - get_target_property(_targetAddCleanTarget ${_target} COTIRE_ADD_CLEAN) - if (_targetAddCleanTarget) - cotire_setup_clean_target(${_target}) - endif() -endfunction(cotire_target) - -function (cotire_map_libraries _strategy _mappedLibrariesVar) - set (_mappedLibraries "") - foreach (_library ${ARGN}) - if (_library MATCHES "^\\$$") - set (_libraryName "${CMAKE_MATCH_1}") - set (_linkOnly TRUE) - set (_objectLibrary FALSE) - elseif (_library MATCHES "^\\$$") - set (_libraryName "${CMAKE_MATCH_1}") - set (_linkOnly FALSE) - set (_objectLibrary TRUE) - else() - set (_libraryName "${_library}") - set (_linkOnly FALSE) - set (_objectLibrary FALSE) - endif() - if ("${_strategy}" MATCHES "COPY_UNITY") - cotire_is_target_supported(${_libraryName} _isSupported) - if (_isSupported) - # use target's corresponding unity target, if available - get_target_property(_libraryUnityTargetName ${_libraryName} COTIRE_UNITY_TARGET_NAME) - if (TARGET "${_libraryUnityTargetName}") - if (_linkOnly) - list (APPEND _mappedLibraries "$") - elseif (_objectLibrary) - list (APPEND _mappedLibraries "$") - else() - list (APPEND _mappedLibraries "${_libraryUnityTargetName}") - endif() - else() - list (APPEND _mappedLibraries "${_library}") - endif() - else() - list (APPEND _mappedLibraries "${_library}") - endif() - else() - list (APPEND _mappedLibraries "${_library}") - endif() - endforeach() - list (REMOVE_DUPLICATES _mappedLibraries) - set (${_mappedLibrariesVar} ${_mappedLibraries} PARENT_SCOPE) -endfunction() - -function (cotire_target_link_libraries _target) - cotire_is_target_supported(${_target} _isSupported) - if (NOT _isSupported) - return() - endif() - get_target_property(_unityTargetName ${_target} COTIRE_UNITY_TARGET_NAME) - if (TARGET "${_unityTargetName}") - get_target_property(_linkLibrariesStrategy ${_target} COTIRE_UNITY_LINK_LIBRARIES_INIT) - if (COTIRE_DEBUG) - message (STATUS "unity target ${_unityTargetName} link strategy: ${_linkLibrariesStrategy}") - endif() - if ("${_linkLibrariesStrategy}" MATCHES "^(COPY|COPY_UNITY)$") - get_target_property(_linkLibraries ${_target} LINK_LIBRARIES) - if (_linkLibraries) - cotire_map_libraries("${_linkLibrariesStrategy}" _unityLinkLibraries ${_linkLibraries}) - set_target_properties(${_unityTargetName} PROPERTIES LINK_LIBRARIES "${_unityLinkLibraries}") - if (COTIRE_DEBUG) - message (STATUS "unity target ${_unityTargetName} link libraries: ${_unityLinkLibraries}") - endif() - endif() - get_target_property(_interfaceLinkLibraries ${_target} INTERFACE_LINK_LIBRARIES) - if (_interfaceLinkLibraries) - cotire_map_libraries("${_linkLibrariesStrategy}" _unityLinkInterfaceLibraries ${_interfaceLinkLibraries}) - set_target_properties(${_unityTargetName} PROPERTIES INTERFACE_LINK_LIBRARIES "${_unityLinkInterfaceLibraries}") - if (COTIRE_DEBUG) - message (STATUS "unity target ${_unityTargetName} interface link libraries: ${_unityLinkInterfaceLibraries}") - endif() - endif() - get_target_property(_manualDependencies ${_target} MANUALLY_ADDED_DEPENDENCIES) - if (_manualDependencies) - cotire_map_libraries("${_linkLibrariesStrategy}" _unityManualDependencies ${_manualDependencies}) - if (_unityManualDependencies) - add_dependencies("${_unityTargetName}" ${_unityManualDependencies}) - endif() - endif() - endif() - endif() -endfunction(cotire_target_link_libraries) - -function (cotire_cleanup _binaryDir _cotireIntermediateDirName _targetName) - if (_targetName) - file (GLOB_RECURSE _cotireFiles "${_binaryDir}/${_targetName}*.*") - else() - file (GLOB_RECURSE _cotireFiles "${_binaryDir}/*.*") - endif() - # filter files in intermediate directory - set (_filesToRemove "") - foreach (_file ${_cotireFiles}) - get_filename_component(_dir "${_file}" DIRECTORY) - get_filename_component(_dirName "${_dir}" NAME) - if ("${_dirName}" STREQUAL "${_cotireIntermediateDirName}") - list (APPEND _filesToRemove "${_file}") - endif() - endforeach() - if (_filesToRemove) - if (COTIRE_VERBOSE) - message (STATUS "cleaning up ${_filesToRemove}") - endif() - file (REMOVE ${_filesToRemove}) - endif() -endfunction() - -function (cotire_init_target _targetName) - if (COTIRE_TARGETS_FOLDER) - set_target_properties(${_targetName} PROPERTIES FOLDER "${COTIRE_TARGETS_FOLDER}") - endif() - set_target_properties(${_targetName} PROPERTIES EXCLUDE_FROM_ALL TRUE) - # if (MSVC_IDE) - # set_target_properties(${_targetName} PROPERTIES EXCLUDE_FROM_DEFAULT_BUILD TRUE) - # endif() -endfunction() - -function (cotire_add_to_pch_all_target _pchTargetName) - set (_targetName "${COTIRE_PCH_ALL_TARGET_NAME}") - if (NOT TARGET "${_targetName}") - add_custom_target("${_targetName}" - WORKING_DIRECTORY "${CMAKE_BINARY_DIR}" - VERBATIM) - cotire_init_target("${_targetName}") - endif() - cotire_setup_clean_all_target() - add_dependencies(${_targetName} ${_pchTargetName}) -endfunction() - -function (cotire_add_to_unity_all_target _unityTargetName) - set (_targetName "${COTIRE_UNITY_BUILD_ALL_TARGET_NAME}") - if (NOT TARGET "${_targetName}") - add_custom_target("${_targetName}" - WORKING_DIRECTORY "${CMAKE_BINARY_DIR}" - VERBATIM) - cotire_init_target("${_targetName}") - endif() - cotire_setup_clean_all_target() - add_dependencies(${_targetName} ${_unityTargetName}) -endfunction() - -function (cotire_setup_clean_all_target) - set (_targetName "${COTIRE_CLEAN_ALL_TARGET_NAME}") - if (NOT TARGET "${_targetName}") - cotire_set_cmd_to_prologue(_cmds) - list (APPEND _cmds -P "${COTIRE_CMAKE_MODULE_FILE}" "cleanup" "${CMAKE_BINARY_DIR}" "${COTIRE_INTDIR}") - add_custom_target(${_targetName} - COMMAND ${_cmds} - WORKING_DIRECTORY "${CMAKE_BINARY_DIR}" - COMMENT "Cleaning up all cotire generated files" - VERBATIM) - cotire_init_target("${_targetName}") - endif() -endfunction() - -function (cotire) - set(_options "") - set(_oneValueArgs "") - set(_multiValueArgs LANGUAGES CONFIGURATIONS) - cmake_parse_arguments(_option "${_options}" "${_oneValueArgs}" "${_multiValueArgs}" ${ARGN}) - set (_targets ${_option_UNPARSED_ARGUMENTS}) - foreach (_target ${_targets}) - if (TARGET ${_target}) - cotire_target(${_target} LANGUAGES ${_option_LANGUAGES} CONFIGURATIONS ${_option_CONFIGURATIONS}) - else() - message (WARNING "cotire: ${_target} is not a target.") - endif() - endforeach() - foreach (_target ${_targets}) - if (TARGET ${_target}) - cotire_target_link_libraries(${_target}) - endif() - endforeach() -endfunction() - -if (CMAKE_SCRIPT_MODE_FILE) - - # cotire is being run in script mode - # locate -P on command args - set (COTIRE_ARGC -1) - foreach (_index RANGE ${CMAKE_ARGC}) - if (COTIRE_ARGC GREATER -1) - set (COTIRE_ARGV${COTIRE_ARGC} "${CMAKE_ARGV${_index}}") - math (EXPR COTIRE_ARGC "${COTIRE_ARGC} + 1") - elseif ("${CMAKE_ARGV${_index}}" STREQUAL "-P") - set (COTIRE_ARGC 0) - endif() - endforeach() - - # include target script if available - if ("${COTIRE_ARGV2}" MATCHES "\\.cmake$") - # the included target scripts sets up additional variables relating to the target (e.g., COTIRE_TARGET_SOURCES) - include("${COTIRE_ARGV2}") - endif() - - if (COTIRE_DEBUG) - message (STATUS "${COTIRE_ARGV0} ${COTIRE_ARGV1} ${COTIRE_ARGV2} ${COTIRE_ARGV3} ${COTIRE_ARGV4} ${COTIRE_ARGV5}") - endif() - - if (NOT COTIRE_BUILD_TYPE) - set (COTIRE_BUILD_TYPE "None") - endif() - string (TOUPPER "${COTIRE_BUILD_TYPE}" _upperConfig) - set (_includeDirs ${COTIRE_TARGET_INCLUDE_DIRECTORIES_${_upperConfig}}) - set (_systemIncludeDirs ${COTIRE_TARGET_SYSTEM_INCLUDE_DIRECTORIES_${_upperConfig}}) - set (_compileDefinitions ${COTIRE_TARGET_COMPILE_DEFINITIONS_${_upperConfig}}) - set (_compileFlags ${COTIRE_TARGET_COMPILE_FLAGS_${_upperConfig}}) - # check if target has been cotired for actual build type COTIRE_BUILD_TYPE - list (FIND COTIRE_TARGET_CONFIGURATION_TYPES "${COTIRE_BUILD_TYPE}" _index) - if (_index GREATER -1) - set (_sources ${COTIRE_TARGET_SOURCES}) - set (_sourcesDefinitions ${COTIRE_TARGET_SOURCES_COMPILE_DEFINITIONS_${_upperConfig}}) - else() - if (COTIRE_DEBUG) - message (STATUS "COTIRE_BUILD_TYPE=${COTIRE_BUILD_TYPE} not cotired (${COTIRE_TARGET_CONFIGURATION_TYPES})") - endif() - set (_sources "") - set (_sourcesDefinitions "") - endif() - set (_targetPreUndefs ${COTIRE_TARGET_PRE_UNDEFS}) - set (_targetPostUndefs ${COTIRE_TARGET_POST_UNDEFS}) - set (_sourcesPreUndefs ${COTIRE_TARGET_SOURCES_PRE_UNDEFS}) - set (_sourcesPostUndefs ${COTIRE_TARGET_SOURCES_POST_UNDEFS}) - - if ("${COTIRE_ARGV1}" STREQUAL "unity") - - if (XCODE) - # executing pre-build action under Xcode, check dependency on target script - set (_dependsOption DEPENDS "${COTIRE_ARGV2}") - else() - # executing custom command, no need to re-check for dependencies - set (_dependsOption "") - endif() - - cotire_select_unity_source_files("${COTIRE_ARGV3}" _sources ${_sources}) - - cotire_generate_unity_source( - "${COTIRE_ARGV3}" ${_sources} - LANGUAGE "${COTIRE_TARGET_LANGUAGE}" - SOURCES_COMPILE_DEFINITIONS ${_sourcesDefinitions} - PRE_UNDEFS ${_targetPreUndefs} - POST_UNDEFS ${_targetPostUndefs} - SOURCES_PRE_UNDEFS ${_sourcesPreUndefs} - SOURCES_POST_UNDEFS ${_sourcesPostUndefs} - ${_dependsOption}) - - elseif ("${COTIRE_ARGV1}" STREQUAL "prefix") - - if (XCODE) - # executing pre-build action under Xcode, check dependency on unity file and prefix dependencies - set (_dependsOption DEPENDS "${COTIRE_ARGV4}" ${COTIRE_TARGET_PREFIX_DEPENDS}) - else() - # executing custom command, no need to re-check for dependencies - set (_dependsOption "") - endif() - - set (_files "") - foreach (_index RANGE 4 ${COTIRE_ARGC}) - if (COTIRE_ARGV${_index}) - list (APPEND _files "${COTIRE_ARGV${_index}}") - endif() - endforeach() - - cotire_generate_prefix_header( - "${COTIRE_ARGV3}" ${_files} - COMPILER_LAUNCHER "${COTIRE_TARGET_${COTIRE_TARGET_LANGUAGE}_COMPILER_LAUNCHER}" - COMPILER_EXECUTABLE "${CMAKE_${COTIRE_TARGET_LANGUAGE}_COMPILER}" - COMPILER_ARG1 ${CMAKE_${COTIRE_TARGET_LANGUAGE}_COMPILER_ARG1} - COMPILER_ID "${CMAKE_${COTIRE_TARGET_LANGUAGE}_COMPILER_ID}" - COMPILER_VERSION "${CMAKE_${COTIRE_TARGET_LANGUAGE}_COMPILER_VERSION}" - LANGUAGE "${COTIRE_TARGET_LANGUAGE}" - IGNORE_PATH "${COTIRE_TARGET_IGNORE_PATH};${COTIRE_ADDITIONAL_PREFIX_HEADER_IGNORE_PATH}" - INCLUDE_PATH ${COTIRE_TARGET_INCLUDE_PATH} - IGNORE_EXTENSIONS "${CMAKE_${COTIRE_TARGET_LANGUAGE}_SOURCE_FILE_EXTENSIONS};${COTIRE_ADDITIONAL_PREFIX_HEADER_IGNORE_EXTENSIONS}" - INCLUDE_PRIORITY_PATH ${COTIRE_TARGET_INCLUDE_PRIORITY_PATH} - INCLUDE_DIRECTORIES ${_includeDirs} - SYSTEM_INCLUDE_DIRECTORIES ${_systemIncludeDirs} - COMPILE_DEFINITIONS ${_compileDefinitions} - COMPILE_FLAGS ${_compileFlags} - ${_dependsOption}) - - elseif ("${COTIRE_ARGV1}" STREQUAL "precompile") - - set (_files "") - foreach (_index RANGE 5 ${COTIRE_ARGC}) - if (COTIRE_ARGV${_index}) - list (APPEND _files "${COTIRE_ARGV${_index}}") - endif() - endforeach() - - cotire_precompile_prefix_header( - "${COTIRE_ARGV3}" "${COTIRE_ARGV4}" "${COTIRE_ARGV5}" - COMPILER_LAUNCHER "${COTIRE_TARGET_${COTIRE_TARGET_LANGUAGE}_COMPILER_LAUNCHER}" - COMPILER_EXECUTABLE "${CMAKE_${COTIRE_TARGET_LANGUAGE}_COMPILER}" - COMPILER_ARG1 ${CMAKE_${COTIRE_TARGET_LANGUAGE}_COMPILER_ARG1} - COMPILER_ID "${CMAKE_${COTIRE_TARGET_LANGUAGE}_COMPILER_ID}" - COMPILER_VERSION "${CMAKE_${COTIRE_TARGET_LANGUAGE}_COMPILER_VERSION}" - LANGUAGE "${COTIRE_TARGET_LANGUAGE}" - INCLUDE_DIRECTORIES ${_includeDirs} - SYSTEM_INCLUDE_DIRECTORIES ${_systemIncludeDirs} - COMPILE_DEFINITIONS ${_compileDefinitions} - COMPILE_FLAGS ${_compileFlags}) - - elseif ("${COTIRE_ARGV1}" STREQUAL "combine") - - if (COTIRE_TARGET_LANGUAGE) - set (_combinedFile "${COTIRE_ARGV3}") - set (_startIndex 4) - else() - set (_combinedFile "${COTIRE_ARGV2}") - set (_startIndex 3) - endif() - set (_files "") - foreach (_index RANGE ${_startIndex} ${COTIRE_ARGC}) - if (COTIRE_ARGV${_index}) - list (APPEND _files "${COTIRE_ARGV${_index}}") - endif() - endforeach() - - if (XCODE) - # executing pre-build action under Xcode, check dependency on files to be combined - set (_dependsOption DEPENDS ${_files}) - else() - # executing custom command, no need to re-check for dependencies - set (_dependsOption "") - endif() - - if (COTIRE_TARGET_LANGUAGE) - cotire_generate_unity_source( - "${_combinedFile}" ${_files} - LANGUAGE "${COTIRE_TARGET_LANGUAGE}" - ${_dependsOption}) - else() - cotire_generate_unity_source("${_combinedFile}" ${_files} ${_dependsOption}) - endif() - - elseif ("${COTIRE_ARGV1}" STREQUAL "cleanup") - - cotire_cleanup("${COTIRE_ARGV2}" "${COTIRE_ARGV3}" "${COTIRE_ARGV4}") - - else() - message (FATAL_ERROR "cotire: unknown command \"${COTIRE_ARGV1}\".") - endif() - -else() - - # cotire is being run in include mode - # set up all variable and property definitions - - if (NOT DEFINED COTIRE_DEBUG_INIT) - if (DEFINED COTIRE_DEBUG) - set (COTIRE_DEBUG_INIT ${COTIRE_DEBUG}) - else() - set (COTIRE_DEBUG_INIT FALSE) - endif() - endif() - option (COTIRE_DEBUG "Enable cotire debugging output?" ${COTIRE_DEBUG_INIT}) - - if (NOT DEFINED COTIRE_VERBOSE_INIT) - if (DEFINED COTIRE_VERBOSE) - set (COTIRE_VERBOSE_INIT ${COTIRE_VERBOSE}) - else() - set (COTIRE_VERBOSE_INIT FALSE) - endif() - endif() - option (COTIRE_VERBOSE "Enable cotire verbose output?" ${COTIRE_VERBOSE_INIT}) - - set (COTIRE_ADDITIONAL_PREFIX_HEADER_IGNORE_EXTENSIONS "inc;inl;ipp" CACHE STRING - "Ignore headers with the listed file extensions from the generated prefix header.") - - set (COTIRE_ADDITIONAL_PREFIX_HEADER_IGNORE_PATH "" CACHE STRING - "Ignore headers from these directories when generating the prefix header.") - - set (COTIRE_UNITY_SOURCE_EXCLUDE_EXTENSIONS "m;mm" CACHE STRING - "Ignore sources with the listed file extensions from the generated unity source.") - - set (COTIRE_MINIMUM_NUMBER_OF_TARGET_SOURCES "2" CACHE STRING - "Minimum number of sources in target required to enable use of precompiled header.") - - if (NOT DEFINED COTIRE_MAXIMUM_NUMBER_OF_UNITY_INCLUDES_INIT) - if (DEFINED COTIRE_MAXIMUM_NUMBER_OF_UNITY_INCLUDES) - set (COTIRE_MAXIMUM_NUMBER_OF_UNITY_INCLUDES_INIT ${COTIRE_MAXIMUM_NUMBER_OF_UNITY_INCLUDES}) - elseif ("${CMAKE_GENERATOR}" MATCHES "JOM|Ninja|Visual Studio") - # enable parallelization for generators that run multiple jobs by default - set (COTIRE_MAXIMUM_NUMBER_OF_UNITY_INCLUDES_INIT "-j") - else() - set (COTIRE_MAXIMUM_NUMBER_OF_UNITY_INCLUDES_INIT "0") - endif() - endif() - set (COTIRE_MAXIMUM_NUMBER_OF_UNITY_INCLUDES "${COTIRE_MAXIMUM_NUMBER_OF_UNITY_INCLUDES_INIT}" CACHE STRING - "Maximum number of source files to include in a single unity source file.") - - if (NOT COTIRE_PREFIX_HEADER_FILENAME_SUFFIX) - set (COTIRE_PREFIX_HEADER_FILENAME_SUFFIX "_prefix") - endif() - if (NOT COTIRE_UNITY_SOURCE_FILENAME_SUFFIX) - set (COTIRE_UNITY_SOURCE_FILENAME_SUFFIX "_unity") - endif() - if (NOT COTIRE_INTDIR) - set (COTIRE_INTDIR "cotire") - endif() - if (NOT COTIRE_PCH_ALL_TARGET_NAME) - set (COTIRE_PCH_ALL_TARGET_NAME "all_pch") - endif() - if (NOT COTIRE_UNITY_BUILD_ALL_TARGET_NAME) - set (COTIRE_UNITY_BUILD_ALL_TARGET_NAME "all_unity") - endif() - if (NOT COTIRE_CLEAN_ALL_TARGET_NAME) - set (COTIRE_CLEAN_ALL_TARGET_NAME "clean_cotire") - endif() - if (NOT COTIRE_CLEAN_TARGET_SUFFIX) - set (COTIRE_CLEAN_TARGET_SUFFIX "_clean_cotire") - endif() - if (NOT COTIRE_PCH_TARGET_SUFFIX) - set (COTIRE_PCH_TARGET_SUFFIX "_pch") - endif() - if (MSVC) - # MSVC default PCH memory scaling factor of 100 percent (75 MB) is too small for template heavy C++ code - # use a bigger default factor of 170 percent (128 MB) - if (NOT DEFINED COTIRE_PCH_MEMORY_SCALING_FACTOR) - set (COTIRE_PCH_MEMORY_SCALING_FACTOR "170") - endif() - endif() - if (NOT COTIRE_UNITY_BUILD_TARGET_SUFFIX) - set (COTIRE_UNITY_BUILD_TARGET_SUFFIX "_unity") - endif() - if (NOT DEFINED COTIRE_TARGETS_FOLDER) - set (COTIRE_TARGETS_FOLDER "cotire") - endif() - if (NOT DEFINED COTIRE_UNITY_OUTPUT_DIRECTORY) - if ("${CMAKE_GENERATOR}" MATCHES "Ninja") - # generated Ninja build files do not work if the unity target produces the same output file as the cotired target - set (COTIRE_UNITY_OUTPUT_DIRECTORY "unity") - else() - set (COTIRE_UNITY_OUTPUT_DIRECTORY "") - endif() - endif() - - # define cotire cache variables - - define_property( - CACHED_VARIABLE PROPERTY "COTIRE_ADDITIONAL_PREFIX_HEADER_IGNORE_PATH" - BRIEF_DOCS "Ignore headers from these directories when generating the prefix header." - FULL_DOCS - "The variable can be set to a semicolon separated list of include directories." - "If a header file is found in one of these directories or sub-directories, it will be excluded from the generated prefix header." - "If not defined, defaults to empty list." - ) - - define_property( - CACHED_VARIABLE PROPERTY "COTIRE_ADDITIONAL_PREFIX_HEADER_IGNORE_EXTENSIONS" - BRIEF_DOCS "Ignore includes with the listed file extensions from the generated prefix header." - FULL_DOCS - "The variable can be set to a semicolon separated list of file extensions." - "If a header file extension matches one in the list, it will be excluded from the generated prefix header." - "Includes with an extension in CMAKE__SOURCE_FILE_EXTENSIONS are always ignored." - "If not defined, defaults to inc;inl;ipp." - ) - - define_property( - CACHED_VARIABLE PROPERTY "COTIRE_UNITY_SOURCE_EXCLUDE_EXTENSIONS" - BRIEF_DOCS "Exclude sources with the listed file extensions from the generated unity source." - FULL_DOCS - "The variable can be set to a semicolon separated list of file extensions." - "If a source file extension matches one in the list, it will be excluded from the generated unity source file." - "Source files with an extension in CMAKE__IGNORE_EXTENSIONS are always excluded." - "If not defined, defaults to m;mm." - ) - - define_property( - CACHED_VARIABLE PROPERTY "COTIRE_MINIMUM_NUMBER_OF_TARGET_SOURCES" - BRIEF_DOCS "Minimum number of sources in target required to enable use of precompiled header." - FULL_DOCS - "The variable can be set to an integer > 0." - "If a target contains less than that number of source files, cotire will not enable the use of the precompiled header for the target." - "If not defined, defaults to 2." - ) - - define_property( - CACHED_VARIABLE PROPERTY "COTIRE_MAXIMUM_NUMBER_OF_UNITY_INCLUDES" - BRIEF_DOCS "Maximum number of source files to include in a single unity source file." - FULL_DOCS - "This may be set to an integer >= 0." - "If 0, cotire will only create a single unity source file." - "If a target contains more than that number of source files, cotire will create multiple unity source files for it." - "Can be set to \"-j\" to optimize the count of unity source files for the number of available processor cores." - "Can be set to \"-j jobs\" to optimize the number of unity source files for the given number of simultaneous jobs." - "Is used to initialize the target property COTIRE_UNITY_SOURCE_MAXIMUM_NUMBER_OF_INCLUDES." - "Defaults to \"-j\" for the generators Visual Studio, JOM or Ninja. Defaults to 0 otherwise." - ) - - # define cotire directory properties - - define_property( - DIRECTORY PROPERTY "COTIRE_ENABLE_PRECOMPILED_HEADER" - BRIEF_DOCS "Modify build command of cotired targets added in this directory to make use of the generated precompiled header." - FULL_DOCS - "See target property COTIRE_ENABLE_PRECOMPILED_HEADER." - ) - - define_property( - DIRECTORY PROPERTY "COTIRE_ADD_UNITY_BUILD" - BRIEF_DOCS "Add a new target that performs a unity build for cotired targets added in this directory." - FULL_DOCS - "See target property COTIRE_ADD_UNITY_BUILD." - ) - - define_property( - DIRECTORY PROPERTY "COTIRE_ADD_CLEAN" - BRIEF_DOCS "Add a new target that cleans all cotire generated files for cotired targets added in this directory." - FULL_DOCS - "See target property COTIRE_ADD_CLEAN." - ) - - define_property( - DIRECTORY PROPERTY "COTIRE_PREFIX_HEADER_IGNORE_PATH" - BRIEF_DOCS "Ignore headers from these directories when generating the prefix header." - FULL_DOCS - "See target property COTIRE_PREFIX_HEADER_IGNORE_PATH." - ) - - define_property( - DIRECTORY PROPERTY "COTIRE_PREFIX_HEADER_INCLUDE_PATH" - BRIEF_DOCS "Honor headers from these directories when generating the prefix header." - FULL_DOCS - "See target property COTIRE_PREFIX_HEADER_INCLUDE_PATH." - ) - - define_property( - DIRECTORY PROPERTY "COTIRE_PREFIX_HEADER_INCLUDE_PRIORITY_PATH" - BRIEF_DOCS "Header paths matching one of these directories are put at the top of the prefix header." - FULL_DOCS - "See target property COTIRE_PREFIX_HEADER_INCLUDE_PRIORITY_PATH." - ) - - define_property( - DIRECTORY PROPERTY "COTIRE_UNITY_SOURCE_PRE_UNDEFS" - BRIEF_DOCS "Preprocessor undefs to place in the generated unity source file before the inclusion of each source file." - FULL_DOCS - "See target property COTIRE_UNITY_SOURCE_PRE_UNDEFS." - ) - - define_property( - DIRECTORY PROPERTY "COTIRE_UNITY_SOURCE_POST_UNDEFS" - BRIEF_DOCS "Preprocessor undefs to place in the generated unity source file after the inclusion of each source file." - FULL_DOCS - "See target property COTIRE_UNITY_SOURCE_POST_UNDEFS." - ) - - define_property( - DIRECTORY PROPERTY "COTIRE_UNITY_SOURCE_MAXIMUM_NUMBER_OF_INCLUDES" - BRIEF_DOCS "Maximum number of source files to include in a single unity source file." - FULL_DOCS - "See target property COTIRE_UNITY_SOURCE_MAXIMUM_NUMBER_OF_INCLUDES." - ) - - define_property( - DIRECTORY PROPERTY "COTIRE_UNITY_LINK_LIBRARIES_INIT" - BRIEF_DOCS "Define strategy for setting up the unity target's link libraries." - FULL_DOCS - "See target property COTIRE_UNITY_LINK_LIBRARIES_INIT." - ) - - # define cotire target properties - - define_property( - TARGET PROPERTY "COTIRE_ENABLE_PRECOMPILED_HEADER" INHERITED - BRIEF_DOCS "Modify this target's build command to make use of the generated precompiled header." - FULL_DOCS - "If this property is set to TRUE, cotire will modify the build command to make use of the generated precompiled header." - "Irrespective of the value of this property, cotire will setup custom commands to generate the unity source and prefix header for the target." - "For makefile based generators cotire will also set up a custom target to manually invoke the generation of the precompiled header." - "The target name will be set to this target's name with the suffix _pch appended." - "Inherited from directory." - "Defaults to TRUE." - ) - - define_property( - TARGET PROPERTY "COTIRE_ADD_UNITY_BUILD" INHERITED - BRIEF_DOCS "Add a new target that performs a unity build for this target." - FULL_DOCS - "If this property is set to TRUE, cotire creates a new target of the same type that uses the generated unity source file instead of the target sources." - "Most of the relevant target properties will be copied from this target to the new unity build target." - "Target dependencies and linked libraries have to be manually set up for the new unity build target." - "The unity target name will be set to this target's name with the suffix _unity appended." - "Inherited from directory." - "Defaults to TRUE." - ) - - define_property( - TARGET PROPERTY "COTIRE_ADD_CLEAN" INHERITED - BRIEF_DOCS "Add a new target that cleans all cotire generated files for this target." - FULL_DOCS - "If this property is set to TRUE, cotire creates a new target that clean all files (unity source, prefix header, precompiled header)." - "The clean target name will be set to this target's name with the suffix _clean_cotire appended." - "Inherited from directory." - "Defaults to FALSE." - ) - - define_property( - TARGET PROPERTY "COTIRE_PREFIX_HEADER_IGNORE_PATH" INHERITED - BRIEF_DOCS "Ignore headers from these directories when generating the prefix header." - FULL_DOCS - "The property can be set to a list of directories." - "If a header file is found in one of these directories or sub-directories, it will be excluded from the generated prefix header." - "Inherited from directory." - "If not set, this property is initialized to \${CMAKE_SOURCE_DIR};\${CMAKE_BINARY_DIR}." - ) - - define_property( - TARGET PROPERTY "COTIRE_PREFIX_HEADER_INCLUDE_PATH" INHERITED - BRIEF_DOCS "Honor headers from these directories when generating the prefix header." - FULL_DOCS - "The property can be set to a list of directories." - "If a header file is found in one of these directories or sub-directories, it will be included in the generated prefix header." - "If a header file is both selected by COTIRE_PREFIX_HEADER_IGNORE_PATH and COTIRE_PREFIX_HEADER_INCLUDE_PATH," - "the option which yields the closer relative path match wins." - "Inherited from directory." - "If not set, this property is initialized to the empty list." - ) - - define_property( - TARGET PROPERTY "COTIRE_PREFIX_HEADER_INCLUDE_PRIORITY_PATH" INHERITED - BRIEF_DOCS "Header paths matching one of these directories are put at the top of prefix header." - FULL_DOCS - "The property can be set to a list of directories." - "Header file paths matching one of these directories will be inserted at the beginning of the generated prefix header." - "Header files are sorted according to the order of the directories in the property." - "If not set, this property is initialized to the empty list." - ) - - define_property( - TARGET PROPERTY "COTIRE_UNITY_SOURCE_PRE_UNDEFS" INHERITED - BRIEF_DOCS "Preprocessor undefs to place in the generated unity source file before the inclusion of each target source file." - FULL_DOCS - "This may be set to a semicolon-separated list of preprocessor symbols." - "cotire will add corresponding #undef directives to the generated unit source file before each target source file." - "Inherited from directory." - "Defaults to empty string." - ) - - define_property( - TARGET PROPERTY "COTIRE_UNITY_SOURCE_POST_UNDEFS" INHERITED - BRIEF_DOCS "Preprocessor undefs to place in the generated unity source file after the inclusion of each target source file." - FULL_DOCS - "This may be set to a semicolon-separated list of preprocessor symbols." - "cotire will add corresponding #undef directives to the generated unit source file after each target source file." - "Inherited from directory." - "Defaults to empty string." - ) - - define_property( - TARGET PROPERTY "COTIRE_UNITY_SOURCE_MAXIMUM_NUMBER_OF_INCLUDES" INHERITED - BRIEF_DOCS "Maximum number of source files to include in a single unity source file." - FULL_DOCS - "This may be set to an integer > 0." - "If a target contains more than that number of source files, cotire will create multiple unity build files for it." - "If not set, cotire will only create a single unity source file." - "Inherited from directory." - "Defaults to empty." - ) - - define_property( - TARGET PROPERTY "COTIRE__UNITY_SOURCE_INIT" - BRIEF_DOCS "User provided unity source file to be used instead of the automatically generated one." - FULL_DOCS - "If set, cotire will only add the given file(s) to the generated unity source file." - "If not set, cotire will add all the target source files to the generated unity source file." - "The property can be set to a user provided unity source file." - "Defaults to empty." - ) - - define_property( - TARGET PROPERTY "COTIRE__PREFIX_HEADER_INIT" - BRIEF_DOCS "User provided prefix header file to be used instead of the automatically generated one." - FULL_DOCS - "If set, cotire will add the given header file(s) to the generated prefix header file." - "If not set, cotire will generate a prefix header by tracking the header files included by the unity source file." - "The property can be set to a user provided prefix header file (e.g., stdafx.h)." - "Defaults to empty." - ) - - define_property( - TARGET PROPERTY "COTIRE_UNITY_LINK_LIBRARIES_INIT" INHERITED - BRIEF_DOCS "Define strategy for setting up unity target's link libraries." - FULL_DOCS - "If this property is empty or set to NONE, the generated unity target's link libraries have to be set up manually." - "If this property is set to COPY, the unity target's link libraries will be copied from this target." - "If this property is set to COPY_UNITY, the unity target's link libraries will be copied from this target with considering existing unity targets." - "Inherited from directory." - "Defaults to empty." - ) - - define_property( - TARGET PROPERTY "COTIRE__UNITY_SOURCE" - BRIEF_DOCS "Read-only property. The generated unity source file(s)." - FULL_DOCS - "cotire sets this property to the path of the generated single computation unit source file for the target." - "Defaults to empty string." - ) - - define_property( - TARGET PROPERTY "COTIRE__PREFIX_HEADER" - BRIEF_DOCS "Read-only property. The generated prefix header file." - FULL_DOCS - "cotire sets this property to the full path of the generated language prefix header for the target." - "Defaults to empty string." - ) - - define_property( - TARGET PROPERTY "COTIRE__PRECOMPILED_HEADER" - BRIEF_DOCS "Read-only property. The generated precompiled header file." - FULL_DOCS - "cotire sets this property to the full path of the generated language precompiled header binary for the target." - "Defaults to empty string." - ) - - define_property( - TARGET PROPERTY "COTIRE_UNITY_TARGET_NAME" - BRIEF_DOCS "The name of the generated unity build target corresponding to this target." - FULL_DOCS - "This property can be set to the desired name of the unity target that will be created by cotire." - "If not set, the unity target name will be set to this target's name with the suffix _unity appended." - "After this target has been processed by cotire, the property is set to the actual name of the generated unity target." - "Defaults to empty string." - ) - - # define cotire source properties - - define_property( - SOURCE PROPERTY "COTIRE_EXCLUDED" - BRIEF_DOCS "Do not modify source file's build command." - FULL_DOCS - "If this property is set to TRUE, the source file's build command will not be modified to make use of the precompiled header." - "The source file will also be excluded from the generated unity source file." - "Source files that have their COMPILE_FLAGS property set will be excluded by default." - "Defaults to FALSE." - ) - - define_property( - SOURCE PROPERTY "COTIRE_DEPENDENCY" - BRIEF_DOCS "Add this source file to dependencies of the automatically generated prefix header file." - FULL_DOCS - "If this property is set to TRUE, the source file is added to dependencies of the generated prefix header file." - "If the file is modified, cotire will re-generate the prefix header source upon build." - "Defaults to FALSE." - ) - - define_property( - SOURCE PROPERTY "COTIRE_UNITY_SOURCE_PRE_UNDEFS" - BRIEF_DOCS "Preprocessor undefs to place in the generated unity source file before the inclusion of this source file." - FULL_DOCS - "This may be set to a semicolon-separated list of preprocessor symbols." - "cotire will add corresponding #undef directives to the generated unit source file before this file is included." - "Defaults to empty string." - ) - - define_property( - SOURCE PROPERTY "COTIRE_UNITY_SOURCE_POST_UNDEFS" - BRIEF_DOCS "Preprocessor undefs to place in the generated unity source file after the inclusion of this source file." - FULL_DOCS - "This may be set to a semicolon-separated list of preprocessor symbols." - "cotire will add corresponding #undef directives to the generated unit source file after this file is included." - "Defaults to empty string." - ) - - define_property( - SOURCE PROPERTY "COTIRE_START_NEW_UNITY_SOURCE" - BRIEF_DOCS "Start a new unity source file which includes this source file as the first one." - FULL_DOCS - "If this property is set to TRUE, cotire will complete the current unity file and start a new one." - "The new unity source file will include this source file as the first one." - "This property essentially works as a separator for unity source files." - "Defaults to FALSE." - ) - - define_property( - SOURCE PROPERTY "COTIRE_TARGET" - BRIEF_DOCS "Read-only property. Mark this source file as cotired for the given target." - FULL_DOCS - "cotire sets this property to the name of target, that the source file's build command has been altered for." - "Defaults to empty string." - ) - - message (STATUS "cotire ${COTIRE_CMAKE_MODULE_VERSION} loaded.") - -endif() diff --git a/adm/cmake/flex.cmake b/adm/cmake/flex.cmake index da32fbecd9..d2b80709d8 100644 --- a/adm/cmake/flex.cmake +++ b/adm/cmake/flex.cmake @@ -31,3 +31,13 @@ find_package (FLEX 2.6.4) if (NOT FLEX_FOUND OR NOT FLEX_INCLUDE_DIR OR NOT EXISTS "${FLEX_INCLUDE_DIR}/FlexLexer.h") list (APPEND 3RDPARTY_NOT_INCLUDED FLEX_INCLUDE_DIR) endif() + +# remove old general version of FlexLexer +if (EXISTS ${CMAKE_SOURCE_DIR}/${RELATIVE_SOURCES_DIR}/FlexLexer/FlexLexer.h) + message (STATUS "Info: remove old FLEX header file: ${CMAKE_SOURCE_DIR}/src/FlexLexer/FlexLexer.h") + file(REMOVE ${CMAKE_SOURCE_DIR}/src/FlexLexer/FlexLexer.h) +endif() +# install copy of FlexLexer.h locally to allow further building without flex +if (FLEX_INCLUDE_DIR AND EXISTS "${FLEX_INCLUDE_DIR}/FlexLexer.h") + configure_file("${FLEX_INCLUDE_DIR}/FlexLexer.h" "${CMAKE_SOURCE_DIR}/src/FlexLexer/FlexLexer.h" @ONLY NEWLINE_STYLE LF) +endif() diff --git a/adm/cmake/occt_macros.cmake b/adm/cmake/occt_macros.cmake index 9fd3ec4cfb..50f139ea5d 100644 --- a/adm/cmake/occt_macros.cmake +++ b/adm/cmake/occt_macros.cmake @@ -32,6 +32,27 @@ macro (OCCT_CHECK_AND_UNSET_INSTALL_DIR_SUBDIRS) OCCT_CHECK_AND_UNSET (INSTALL_DIR_DOC) endmacro() +function (FILE_TO_LIST FILE_NAME FILE_CONTENT) + set (LOCAL_FILE_CONTENT) + if (BUILD_PATCH AND EXISTS "${BUILD_PATCH}/${FILE_NAME}") + file (STRINGS "${BUILD_PATCH}/${FILE_NAME}" LOCAL_FILE_CONTENT) + elseif (EXISTS "${CMAKE_SOURCE_DIR}/${FILE_NAME}") + file (STRINGS "${CMAKE_SOURCE_DIR}/${FILE_NAME}" LOCAL_FILE_CONTENT) + endif() + + set (${FILE_CONTENT} ${LOCAL_FILE_CONTENT} PARENT_SCOPE) +endfunction() + +function(FIND_FOLDER_OR_FILE FILE_OR_FOLDER_NAME RESULT_PATH) + if (BUILD_PATCH AND EXISTS "${BUILD_PATCH}/${FILE_OR_FOLDER_NAME}") + set (${RESULT_PATH} "${BUILD_PATCH}/${FILE_OR_FOLDER_NAME}" PARENT_SCOPE) + elseif (EXISTS "${CMAKE_SOURCE_DIR}/${FILE_OR_FOLDER_NAME}") + set (${RESULT_PATH} "${CMAKE_SOURCE_DIR}/${FILE_OR_FOLDER_NAME}" PARENT_SCOPE) + else() + set (${RESULT_PATH} "" PARENT_SCOPE) + endif() +endfunction() + # COMPILER_BITNESS variable macro (OCCT_MAKE_COMPILER_BITNESS) math (EXPR COMPILER_BITNESS "32 + 32*(${CMAKE_SIZEOF_VOID_P}/8)") @@ -225,154 +246,187 @@ macro (OCCT_CONFIGURE_AND_INSTALL BEING_CONGIRUGED_FILE BUILD_NAME INSTALL_NAME install(FILES "${OCCT_BINARY_DIR}/${BUILD_NAME}" DESTINATION "${DESTINATION_PATH}" RENAME ${INSTALL_NAME}) endmacro() -macro (COLLECT_AND_INSTALL_OCCT_HEADER_FILES ROOT_TARGET_OCCT_DIR OCCT_BUILD_TOOLKITS OCCT_COLLECT_SOURCE_DIR OCCT_INSTALL_DIR_PREFIX) - set (OCCT_USED_PACKAGES) - - # consider patched header.in template - set (TEMPLATE_HEADER_PATH "${CMAKE_SOURCE_DIR}/adm/templates/header.in") - if (BUILD_PATCH AND EXISTS "${BUILD_PATCH}/adm/templates/header.in") - set (TEMPLATE_HEADER_PATH "${BUILD_PATCH}/adm/templates/header.in") +function (EXTRACT_TOOLKIT_PACKAGES RELATIVE_PATH OCCT_TOOLKIT RESULT_PACKAGES) + set (OCCT_TOOLKIT_PACKAGES "") + get_property(OCCT_TOOLKIT_PACKAGES GLOBAL PROPERTY OCCT_TOOLKIT_${OCCT_TOOLKIT}_PACKAGES) + if (OCCT_TOOLKIT_PACKAGES) + set (${RESULT_PACKAGES} ${OCCT_TOOLKIT_PACKAGES} PARENT_SCOPE) + return() endif() + FILE_TO_LIST ("${RELATIVE_PATH}/${OCCT_TOOLKIT}/PACKAGES" OCCT_TOOLKIT_PACKAGES) + set (${RESULT_PACKAGES} ${OCCT_TOOLKIT_PACKAGES} PARENT_SCOPE) + set_property(GLOBAL PROPERTY OCCT_TOOLKIT_${OCCT_TOOLKIT}_PACKAGES "${OCCT_TOOLKIT_PACKAGES}") +endfunction() - set (ROOT_OCCT_DIR ${CMAKE_SOURCE_DIR}) - - foreach (OCCT_USED_TOOLKIT ${OCCT_BUILD_TOOLKITS}) - # append all required package folders - set (OCCT_TOOLKIT_PACKAGES) - if (BUILD_PATCH AND EXISTS "${BUILD_PATCH}/src/${OCCT_USED_TOOLKIT}/PACKAGES") - file (STRINGS "${BUILD_PATCH}/src/${OCCT_USED_TOOLKIT}/PACKAGES" OCCT_TOOLKIT_PACKAGES) - elseif (EXISTS "${OCCT_COLLECT_SOURCE_DIR}/${OCCT_USED_TOOLKIT}/PACKAGES") - file (STRINGS "${OCCT_COLLECT_SOURCE_DIR}/${OCCT_USED_TOOLKIT}/PACKAGES" OCCT_TOOLKIT_PACKAGES) - endif() +function(EXTRACT_TOOLKIT_EXTERNLIB RELATIVE_PATH OCCT_TOOLKIT RESULT_LIBS) + set (OCCT_TOOLKIT_LIBS "") + get_property(OCCT_TOOLKIT_LIBS GLOBAL PROPERTY OCCT_TOOLKIT_${OCCT_TOOLKIT}_LIBS) + if (OCCT_TOOLKIT_LIBS) + set (${RESULT_LIBS} ${OCCT_TOOLKIT_LIBS} PARENT_SCOPE) + return() + endif() + FILE_TO_LIST ("${RELATIVE_PATH}/${OCCT_TOOLKIT}/EXTERNLIB" OCCT_TOOLKIT_LIBS) + set (${RESULT_LIBS} ${OCCT_TOOLKIT_LIBS} PARENT_SCOPE) + set_property(GLOBAL PROPERTY OCCT_TOOLKIT_${OCCT_TOOLKIT}_LIBS "${OCCT_TOOLKIT_LIBS}") +endfunction() - list (APPEND OCCT_USED_PACKAGES ${OCCT_TOOLKIT_PACKAGES}) - endforeach() +function (EXTRACT_PACKAGE_FILES RELATIVE_PATH OCCT_PACKAGE RESULT_FILES RESULT_INCLUDE_FOLDER) + set (OCCT_PACKAGE_FILES "") + get_property(OCCT_PACKAGE_FILES GLOBAL PROPERTY OCCT_PACKAGE_${OCCT_PACKAGE}_FILES) + get_property(OCCT_PACKAGE_INCLUDE_DIR GLOBAL PROPERTY OCCT_PACKAGE_${OCCT_PACKAGE}_INCLUDE_DIR) + if (OCCT_PACKAGE_FILES) + set (${RESULT_FILES} ${OCCT_PACKAGE_FILES} PARENT_SCOPE) + set (${RESULT_INCLUDE_FOLDER} ${OCCT_PACKAGE_INCLUDE_DIR} PARENT_SCOPE) + return() + endif() - list (REMOVE_DUPLICATES OCCT_USED_PACKAGES) + if (BUILD_PATCH AND EXISTS "${BUILD_PATCH}/${RELATIVE_PATH}/${OCCT_PACKAGE}/FILES") + file (STRINGS "${BUILD_PATCH}/${RELATIVE_PATH}/${OCCT_PACKAGE}/FILES" OCCT_PACKAGE_FILES) + set (OCCT_PACKAGE_INCLUDE_DIR "${BUILD_PATCH}/${RELATIVE_PATH}/${OCCT_PACKAGE}") + elseif (EXISTS "${CMAKE_SOURCE_DIR}/${RELATIVE_PATH}/${OCCT_PACKAGE}/FILES") + file (STRINGS "${CMAKE_SOURCE_DIR}/${RELATIVE_PATH}/${OCCT_PACKAGE}/FILES" OCCT_PACKAGE_FILES) + set (OCCT_PACKAGE_INCLUDE_DIR "${CMAKE_SOURCE_DIR}/${RELATIVE_PATH}/${OCCT_PACKAGE}") + endif() - set (OCCT_HEADER_FILES_COMPLETE) - set (OCCT_HEADER_FILE_NAMES_NOT_IN_FILES) - set (OCCT_HEADER_FILE_WITH_PROPER_NAMES) + # collect and searach for the files in the package directory or patached one + # FILE contains inly filename that must to be inside package or patched directory + set (FILE_PATH_LIST) - string(TIMESTAMP CURRENT_TIME "%H:%M:%S") - message (STATUS "Info: \(${CURRENT_TIME}\) Compare FILES with files in package directories...") + foreach (OCCT_FILE ${OCCT_PACKAGE_FILES}) + string (REGEX REPLACE "[^:]+:+" "" OCCT_FILE "${OCCT_FILE}") + FIND_FOLDER_OR_FILE ("${RELATIVE_PATH}/${OCCT_PACKAGE}/${OCCT_FILE}" CUSTOM_FILE_PATH) + if (CUSTOM_FILE_PATH) + list (APPEND FILE_PATH_LIST "${CUSTOM_FILE_PATH}") + endif() + endforeach() - foreach (OCCT_PACKAGE ${OCCT_USED_PACKAGES}) - if (BUILD_PATCH AND EXISTS "${BUILD_PATCH}/src/${OCCT_PACKAGE}/FILES") - file (STRINGS "${BUILD_PATCH}/src/${OCCT_PACKAGE}/FILES" OCCT_ALL_FILE_NAMES) - elseif (EXISTS "${OCCT_COLLECT_SOURCE_DIR}/${OCCT_PACKAGE}/FILES") - file (STRINGS "${OCCT_COLLECT_SOURCE_DIR}/${OCCT_PACKAGE}/FILES" OCCT_ALL_FILE_NAMES) + if (NOT FILE_PATH_LIST) + if(BUILD_PATH) + message (WARNING "FILES has not been found in ${BUILD_PATCH}/${RELATIVE_PATH}/${OCCT_PACKAGE}") else() - message (WARNING "FILES has not been found in ${OCCT_COLLECT_SOURCE_DIR}/${OCCT_PACKAGE}") - continue() + message (WARNING "FILES has not been found in ${CMAKE_SOURCE_DIR}/${RELATIVE_PATH}/${OCCT_PACKAGE}") endif() + endif() - list (LENGTH OCCT_ALL_FILE_NAMES ALL_FILES_NB) - math (EXPR ALL_FILES_NB "${ALL_FILES_NB} - 1" ) - - # emit warnings if there are unprocessed headers - file (GLOB OCCT_ALL_FILES_IN_DIR "${OCCT_COLLECT_SOURCE_DIR}/${OCCT_PACKAGE}/*.*") - file (GLOB OCCT_ALL_FILES_IN_PATCH_DIR "${BUILD_PATCH}/src/${OCCT_PACKAGE}/*.*") + set (${RESULT_FILES} ${FILE_PATH_LIST} PARENT_SCOPE) + set (${RESULT_INCLUDE_FOLDER} ${OCCT_PACKAGE_INCLUDE_DIR} PARENT_SCOPE) + set_property(GLOBAL PROPERTY OCCT_PACKAGE_${OCCT_PACKAGE}_FILES "${FILE_PATH_LIST}") + set_property(GLOBAL PROPERTY OCCT_PACKAGE_${OCCT_PACKAGE}_INCLUDE_DIR "${OCCT_PACKAGE_INCLUDE_DIR}") +endfunction() - # use patched header files - foreach (OCCT_FILE_IN_PATCH_DIR ${OCCT_ALL_FILES_IN_PATCH_DIR}) - get_filename_component (OCCT_FILE_IN_PATCH_DIR_NAME ${OCCT_FILE_IN_PATCH_DIR} NAME) - list (REMOVE_ITEM OCCT_ALL_FILES_IN_DIR "${OCCT_COLLECT_SOURCE_DIR}/${OCCT_PACKAGE}/${OCCT_FILE_IN_PATCH_DIR_NAME}") - list (APPEND OCCT_ALL_FILES_IN_DIR "${OCCT_FILE_IN_PATCH_DIR}") - endforeach() +function(EXCTRACT_TOOLKIT_DEPS RELATIVE_PATH OCCT_TOOLKIT RESULT_TKS_AS_DEPS RESULT_INCLUDE_FOLDERS) + set (OCCT_TOOLKIT_DEPS "") + set (OCCT_TOOLKIT_INCLUDE_FOLDERS "") + get_property(OCCT_TOOLKIT_DEPS GLOBAL PROPERTY OCCT_TOOLKIT_${OCCT_TOOLKIT}_DEPS) + get_property(OCCT_TOOLKIT_INCLUDE_FOLDERS GLOBAL PROPERTY OCCT_TOOLKIT_${OCCT_TOOLKIT}_INCLUDE_FOLDERS) + if (OCCT_TOOLKIT_DEPS) + set (${RESULT_TKS_AS_DEPS} ${OCCT_TOOLKIT_DEPS} PARENT_SCOPE) + set (${RESULT_INCLUDE_FOLDERS} ${OCCT_TOOLKIT_INCLUDE_FOLDERS} PARENT_SCOPE) + return() + endif() + set (EXTERNAL_LIBS) + EXTRACT_TOOLKIT_EXTERNLIB (${RELATIVE_PATH} ${OCCT_TOOLKIT} EXTERNAL_LIBS) + foreach (EXTERNAL_LIB ${EXTERNAL_LIBS}) + string (REGEX MATCH "^TK" TK_FOUND ${EXTERNAL_LIB}) + if (TK_FOUND) + list (APPEND OCCT_TOOLKIT_DEPS ${EXTERNAL_LIB}) + endif() + endforeach() - foreach (OCCT_FILE_IN_DIR ${OCCT_ALL_FILES_IN_DIR}) - get_filename_component (OCCT_FILE_IN_DIR_NAME ${OCCT_FILE_IN_DIR} NAME) + set (OCCT_TOOLKIT_PACKAGES) + EXTRACT_TOOLKIT_PACKAGES (${RELATIVE_PATH} ${OCCT_TOOLKIT} OCCT_TOOLKIT_PACKAGES) + foreach(OCCT_PACKAGE ${OCCT_TOOLKIT_PACKAGES}) + EXTRACT_PACKAGE_FILES (${RELATIVE_PATH} ${OCCT_PACKAGE} OCCT_PACKAGE_FILES OCCT_PACKAGE_INCLUDE_DIR) + list (APPEND OCCT_TOOLKIT_INCLUDE_FOLDERS ${OCCT_PACKAGE_INCLUDE_DIR}) + endforeach() - set (OCCT_FILE_IN_DIR_STATUS OFF) + set (${RESULT_TKS_AS_DEPS} ${OCCT_TOOLKIT_DEPS} PARENT_SCOPE) + set (${RESULT_INCLUDE_FOLDERS} ${OCCT_TOOLKIT_INCLUDE_FOLDERS} PARENT_SCOPE) + set_property(GLOBAL PROPERTY OCCT_TOOLKIT_${OCCT_TOOLKIT}_DEPS "${OCCT_TOOLKIT_DEPS}") + set_property(GLOBAL PROPERTY OCCT_TOOLKIT_${OCCT_TOOLKIT}_INCLUDE_FOLDERS "${OCCT_TOOLKIT_INCLUDE_FOLDERS}") +endfunction() - if (${ALL_FILES_NB} LESS 0) - break() - endif() +function(EXCTRACT_TOOLKIT_FULL_DEPS RELATIVE_PATH OCCT_TOOLKIT RESULT_TKS_AS_DEPS RESULT_INCLUDE_FOLDERS) + set (OCCT_TOOLKIT_DEPS "") + set (OCCT_TOOLKIT_INCLUDE_FOLDERS "") + get_property(OCCT_TOOLKIT_DEPS GLOBAL PROPERTY OCCT_TOOLKIT_${OCCT_TOOLKIT}_FULL_DEPS) + get_property(OCCT_TOOLKIT_INCLUDE_FOLDERS GLOBAL PROPERTY OCCT_TOOLKIT_${OCCT_TOOLKIT}_FULL_INCLUDE_FOLDERS) + if (OCCT_TOOLKIT_DEPS) + set (${RESULT_TKS_AS_DEPS} ${OCCT_TOOLKIT_DEPS} PARENT_SCOPE) + set (${RESULT_INCLUDE_FOLDERS} ${OCCT_TOOLKIT_INCLUDE_FOLDERS} PARENT_SCOPE) + return() + endif() - foreach (FILE_INDEX RANGE ${ALL_FILES_NB}) - list (GET OCCT_ALL_FILE_NAMES ${FILE_INDEX} OCCT_FILE_NAME) + EXCTRACT_TOOLKIT_DEPS(${RELATIVE_PATH} ${OCCT_TOOLKIT} OCCT_TOOLKIT_DEPS OCCT_TOOLKIT_INCLUDE_DIR) + list(APPEND OCCT_TOOLKIT_FULL_DEPS ${OCCT_TOOLKIT_DEPS}) + list(APPEND OCCT_TOOLKIT_INCLUDE_FOLDERS ${OCCT_TOOLKIT_INCLUDE_DIR}) - string (REGEX REPLACE "[^:]+:+" "" OCCT_FILE_NAME "${OCCT_FILE_NAME}") + foreach(DEP ${OCCT_TOOLKIT_DEPS}) + EXCTRACT_TOOLKIT_FULL_DEPS(${RELATIVE_PATH} ${DEP} DEP_TOOLKIT_DEPS DEP_INCLUDE_DIRS) + list(APPEND OCCT_TOOLKIT_FULL_DEPS ${DEP_TOOLKIT_DEPS}) + list(APPEND OCCT_TOOLKIT_INCLUDE_FOLDERS ${DEP_INCLUDE_DIRS}) + endforeach() - if ("${OCCT_FILE_IN_DIR_NAME}" STREQUAL "${OCCT_FILE_NAME}") - set (OCCT_FILE_IN_DIR_STATUS ON) + list(REMOVE_DUPLICATES OCCT_TOOLKIT_FULL_DEPS) + list(REMOVE_DUPLICATES OCCT_TOOLKIT_INCLUDE_FOLDERS) - string (REGEX MATCH ".+\\.[hlg]xx|.+\\.h$" IS_HEADER_FOUND "${OCCT_FILE_NAME}") - if (IS_HEADER_FOUND) - list (APPEND OCCT_HEADER_FILES_COMPLETE ${OCCT_FILE_IN_DIR}) + set (${RESULT_TKS_AS_DEPS} ${OCCT_TOOLKIT_FULL_DEPS} PARENT_SCOPE) + set (${RESULT_INCLUDE_FOLDERS} ${OCCT_TOOLKIT_INCLUDE_FOLDERS} PARENT_SCOPE) + set_property(GLOBAL PROPERTY OCCT_TOOLKIT_${OCCT_TOOLKIT}_FULL_DEPS "${OCCT_TOOLKIT_FULL_DEPS}") + set_property(GLOBAL PROPERTY OCCT_TOOLKIT_${OCCT_TOOLKIT}_FULL_INCLUDE_FOLDERS "${OCCT_TOOLKIT_INCLUDE_FOLDERS}") +endfunction() - # collect header files with name that does not contain its package one - string (REGEX MATCH "^${OCCT_PACKAGE}[_.]" IS_HEADER_MATHCING_PACKAGE "${OCCT_FILE_NAME}") - if (NOT IS_HEADER_MATHCING_PACKAGE) - list (APPEND OCCT_HEADER_FILE_WITH_PROPER_NAMES "${OCCT_FILE_NAME}") - endif() - endif() +function (FILE_TO_LIST FILE_NAME FILE_CONTENT) + set (LOCAL_FILE_CONTENT) + if (BUILD_PATCH AND EXISTS "${BUILD_PATCH}/${FILE_NAME}") + file (STRINGS "${BUILD_PATCH}/${FILE_NAME}" LOCAL_FILE_CONTENT) + elseif (EXISTS "${CMAKE_SOURCE_DIR}/${FILE_NAME}") + file (STRINGS "${CMAKE_SOURCE_DIR}/${FILE_NAME}" LOCAL_FILE_CONTENT) + endif() - # remove found element from list - list (REMOVE_AT OCCT_ALL_FILE_NAMES ${FILE_INDEX}) - math (EXPR ALL_FILES_NB "${ALL_FILES_NB} - 1" ) # decrement number + set (${FILE_CONTENT} ${LOCAL_FILE_CONTENT} PARENT_SCOPE) +endfunction() - break() - endif() - endforeach() +function (COLLECT_AND_INSTALL_OCCT_HEADER_FILES THE_ROOT_TARGET_OCCT_DIR THE_OCCT_BUILD_TOOLKITS THE_RELATIVE_PATH THE_OCCT_INSTALL_DIR_PREFIX) + set (OCCT_USED_PACKAGES) - if (NOT OCCT_FILE_IN_DIR_STATUS) - message (STATUS "Warning. File ${OCCT_FILE_IN_DIR} is not listed in ${OCCT_COLLECT_SOURCE_DIR}/${OCCT_PACKAGE}/FILES") + # consider patched header.in template + set (TEMPLATE_HEADER_PATH "${CMAKE_SOURCE_DIR}/adm/templates/header.in") + if (BUILD_PATCH AND EXISTS "${BUILD_PATCH}/adm/templates/header.in") + set (TEMPLATE_HEADER_PATH "${BUILD_PATCH}/adm/templates/header.in") + endif() - string (REGEX MATCH ".+\\.[hlg]xx|.+\\.h$" IS_HEADER_FOUND "${OCCT_FILE_NAME}") - if (IS_HEADER_FOUND) - list (APPEND OCCT_HEADER_FILE_NAMES_NOT_IN_FILES ${OCCT_FILE_NAME}) - endif() - endif() + set (OCCT_HEADER_FILES_COMPLETE) + foreach(OCCT_TOOLKIT ${THE_OCCT_BUILD_TOOLKITS}) + # parse PACKAGES file + EXTRACT_TOOLKIT_PACKAGES (${THE_RELATIVE_PATH} ${OCCT_TOOLKIT} USED_PACKAGES) + foreach(OCCT_PACKAGE ${USED_PACKAGES}) + EXTRACT_PACKAGE_FILES (${THE_RELATIVE_PATH} ${OCCT_PACKAGE} ALL_FILES _) + set (HEADER_FILES_FILTERING ${ALL_FILES}) + list (FILTER HEADER_FILES_FILTERING INCLUDE REGEX ".+[.](h|lxx|gxx)") + list (APPEND OCCT_HEADER_FILES_COMPLETE ${HEADER_FILES_FILTERING}) endforeach() endforeach() - - # create new file including found header - string(TIMESTAMP CURRENT_TIME "%H:%M:%S") - message (STATUS "Info: \(${CURRENT_TIME}\) Create header-links in inc folder...") foreach (OCCT_HEADER_FILE ${OCCT_HEADER_FILES_COMPLETE}) get_filename_component (HEADER_FILE_NAME ${OCCT_HEADER_FILE} NAME) - set (OCCT_HEADER_FILE_CONTENT "#include \"${OCCT_HEADER_FILE}\"") - configure_file ("${TEMPLATE_HEADER_PATH}" "${ROOT_TARGET_OCCT_DIR}/${OCCT_INSTALL_DIR_PREFIX}/${HEADER_FILE_NAME}" @ONLY) - endforeach() - - install (FILES ${OCCT_HEADER_FILES_COMPLETE} DESTINATION "${INSTALL_DIR}/${OCCT_INSTALL_DIR_PREFIX}") - - string(TIMESTAMP CURRENT_TIME "%H:%M:%S") - message (STATUS "Info: \(${CURRENT_TIME}\) Checking headers in inc folder...") - - file (GLOB OCCT_HEADER_FILES_OLD "${ROOT_TARGET_OCCT_DIR}/${OCCT_INSTALL_DIR_PREFIX}/*") - foreach (OCCT_HEADER_FILE_OLD ${OCCT_HEADER_FILES_OLD}) - get_filename_component (HEADER_FILE_NAME ${OCCT_HEADER_FILE_OLD} NAME) - string (REGEX MATCH "^[a-zA-Z0-9]+" PACKAGE_NAME "${HEADER_FILE_NAME}") - - list (FIND OCCT_USED_PACKAGES ${PACKAGE_NAME} IS_HEADER_FOUND) - if (NOT ${IS_HEADER_FOUND} EQUAL -1) - if (NOT EXISTS "${OCCT_COLLECT_SOURCE_DIR}/${PACKAGE_NAME}/${HEADER_FILE_NAME}") - message (STATUS "Warning. ${OCCT_HEADER_FILE_OLD} is not present in the sources and will be removed from ${ROOT_TARGET_OCCT_DIR}/inc") - file (REMOVE "${OCCT_HEADER_FILE_OLD}") - else() - list (FIND OCCT_HEADER_FILE_NAMES_NOT_IN_FILES ${PACKAGE_NAME} IS_HEADER_FOUND) - if (NOT ${IS_HEADER_FOUND} EQUAL -1) - message (STATUS "Warning. ${OCCT_HEADER_FILE_OLD} is present in the sources but not involved in FILES and will be removed from ${ROOT_TARGET_OCCT_DIR}/inc") - file (REMOVE "${OCCT_HEADER_FILE_OLD}") - endif() - endif() + if (BUILD_INCLUDE_SYMLINK) + file (CREATE_LINK "${OCCT_HEADER_FILE}" "${THE_ROOT_TARGET_OCCT_DIR}/${THE_OCCT_INSTALL_DIR_PREFIX}/${HEADER_FILE_NAME}" SYMBOLIC) else() - set (IS_HEADER_FOUND -1) - if (NOT "${OCCT_HEADER_FILE_WITH_PROPER_NAMES}" STREQUAL "") - list (FIND OCCT_HEADER_FILE_WITH_PROPER_NAMES ${HEADER_FILE_NAME} IS_HEADER_FOUND) - endif() - - if (${IS_HEADER_FOUND} EQUAL -1) - message (STATUS "Warning. \(${PACKAGE_NAME}\) ${OCCT_HEADER_FILE_OLD} is not used and will be removed from ${ROOT_TARGET_OCCT_DIR}/inc") - file (REMOVE "${OCCT_HEADER_FILE_OLD}") - endif() + set (OCCT_HEADER_FILE_CONTENT "#include \"${OCCT_HEADER_FILE}\"") + configure_file ("${TEMPLATE_HEADER_PATH}" "${THE_ROOT_TARGET_OCCT_DIR}/${THE_OCCT_INSTALL_DIR_PREFIX}/${HEADER_FILE_NAME}" @ONLY) endif() endforeach() -endmacro() + + install (FILES ${OCCT_HEADER_FILES_COMPLETE} DESTINATION "${INSTALL_DIR}/${THE_OCCT_INSTALL_DIR_PREFIX}") +endfunction() + +function(ADD_PRECOMPILED_HEADER INPUT_TARGET PRECOMPILED_HEADER) + if (NOT BUILD_USE_PCH) + return() + endif() + target_precompile_headers(${INPUT_TARGET} PUBLIC "$<$:${PRECOMPILED_HEADER}>") +endfunction() macro (OCCT_COPY_FILE_OR_DIR BEING_COPIED_OBJECT DESTINATION_PATH) # first of all, copy original files @@ -411,11 +465,8 @@ function (OCCT_IS_PRODUCT_REQUIRED CSF_VAR_NAME USE_PRODUCT) message(STATUS "Warning: the list of being used toolkits is empty") else() foreach (USED_TOOLKIT ${BUILD_TOOLKITS}) - if (BUILD_PATCH AND EXISTS "${BUILD_PATCH}/src/${USED_TOOLKIT}/EXTERNLIB") - file (READ "${BUILD_PATCH}/src/${USED_TOOLKIT}/EXTERNLIB" FILE_CONTENT) - elseif (EXISTS "${CMAKE_SOURCE_DIR}/src/${USED_TOOLKIT}/EXTERNLIB") - file (READ "${CMAKE_SOURCE_DIR}/src/${USED_TOOLKIT}/EXTERNLIB" FILE_CONTENT) - endif() + set (FILE_CONTENT) + EXTRACT_TOOLKIT_EXTERNLIB ("src" ${USED_TOOLKIT} FILE_CONTENT) string (REGEX MATCH "${CSF_VAR_NAME}" DOES_FILE_CONTAIN "${FILE_CONTENT}") @@ -427,17 +478,6 @@ function (OCCT_IS_PRODUCT_REQUIRED CSF_VAR_NAME USE_PRODUCT) endif() endfunction() -function (FILE_TO_LIST FILE_NAME FILE_CONTENT) - set (LOCAL_FILE_CONTENT) - if (BUILD_PATCH AND EXISTS "${BUILD_PATCH}/${FILE_NAME}") - file (STRINGS "${BUILD_PATCH}/${FILE_NAME}" LOCAL_FILE_CONTENT) - elseif (EXISTS "${CMAKE_SOURCE_DIR}/${FILE_NAME}") - file (STRINGS "${CMAKE_SOURCE_DIR}/${FILE_NAME}" LOCAL_FILE_CONTENT) - endif() - - set (${FILE_CONTENT} ${LOCAL_FILE_CONTENT} PARENT_SCOPE) -endfunction() - # Function to determine if TOOLKIT is OCCT toolkit function (IS_OCCT_TOOLKIT TOOLKIT_NAME MODULES IS_TOOLKIT_FOUND) set (${IS_TOOLKIT_FOUND} OFF PARENT_SCOPE) @@ -451,58 +491,6 @@ function (IS_OCCT_TOOLKIT TOOLKIT_NAME MODULES IS_TOOLKIT_FOUND) endforeach(MODULE) endfunction() -# TOOLKIT_DEPS is defined with dependencies from file src/TOOLKIT_NAME/EXTERNLIB. -# CSF_ variables are ignored -function (OCCT_TOOLKIT_DEP TOOLKIT_NAME TOOLKIT_DEPS) - FILE_TO_LIST ("src/${TOOLKIT_NAME}/EXTERNLIB" FILE_CONTENT) - - #list (APPEND LOCAL_TOOLKIT_DEPS ${TOOLKIT_NAME}) - set (LOCAL_TOOLKIT_DEPS) - foreach (FILE_CONTENT_LINE ${FILE_CONTENT}) - string (REGEX MATCH "^TK" TK_FOUND ${FILE_CONTENT_LINE}) - if ("x${FILE_CONTENT_LINE}" STREQUAL "xDRAWEXE" OR NOT "${TK_FOUND}" STREQUAL "") - list (APPEND LOCAL_TOOLKIT_DEPS ${FILE_CONTENT_LINE}) - endif() - endforeach() - - set (${TOOLKIT_DEPS} ${LOCAL_TOOLKIT_DEPS} PARENT_SCOPE) -endfunction() - -# TOOLKIT_FULL_DEPS is defined with complete dependencies (all levels) -function (OCCT_TOOLKIT_FULL_DEP TOOLKIT_NAME TOOLKIT_FULL_DEPS) - # first level dependencies are stored in LOCAL_TOOLKIT_FULL_DEPS - OCCT_TOOLKIT_DEP (${TOOLKIT_NAME} LOCAL_TOOLKIT_FULL_DEPS) - - list (LENGTH LOCAL_TOOLKIT_FULL_DEPS LIST_LENGTH) - set (LIST_INDEX 0) - while (LIST_INDEX LESS LIST_LENGTH) - list (GET LOCAL_TOOLKIT_FULL_DEPS ${LIST_INDEX} CURRENT_TOOLKIT) - OCCT_TOOLKIT_DEP (${CURRENT_TOOLKIT} CURRENT_TOOLKIT_DEPS) - - # append toolkits are not contained - foreach (CURRENT_TOOLKIT_DEP ${CURRENT_TOOLKIT_DEPS}) - set (CURRENT_TOOLKIT_DEP_FOUND OFF) - foreach (LOCAL_TOOLKIT_FULL_DEP ${LOCAL_TOOLKIT_FULL_DEPS}) - if ("${CURRENT_TOOLKIT_DEP}" STREQUAL "${LOCAL_TOOLKIT_FULL_DEP}") - set (CURRENT_TOOLKIT_DEP_FOUND ON) - break() - endif() - endforeach() - if ("${CURRENT_TOOLKIT_DEP_FOUND}" STREQUAL "OFF") - list (APPEND LOCAL_TOOLKIT_FULL_DEPS ${CURRENT_TOOLKIT_DEP}) - endif() - endforeach() - - # increment the list index - MATH(EXPR LIST_INDEX "${LIST_INDEX}+1") - - # calculate new length - list (LENGTH LOCAL_TOOLKIT_FULL_DEPS LIST_LENGTH) - endwhile() - - set (${TOOLKIT_FULL_DEPS} ${LOCAL_TOOLKIT_FULL_DEPS} PARENT_SCOPE) -endfunction() - # Function to get list of modules/toolkits/samples from file adm/${FILE_NAME}. # Creates list <$MODULE_LIST> to store list of MODULES and # _TOOLKITS foreach module to store its toolkits, where "TOOLKITS" is defined by TOOLKITS_NAME_SUFFIX. @@ -579,6 +567,74 @@ macro (CHECK_PATH_FOR_CONSISTENCY THE_ROOT_PATH_NAME THE_BEING_CHECKED_PATH_NAME endmacro() +macro (FLEX_AND_BISON_TARGET_APPLY THE_PACKAGE_NAME RELATIVE_SOURCES_DIR) + # Generate Flex and Bison files + if (NOT ${BUILD_YACCLEX}) + return() + endif() + # flex files + OCCT_ORIGIN_AND_PATCHED_FILES ("${RELATIVE_SOURCES_DIR}/${THE_PACKAGE_NAME}" "*[.]lex" SOURCE_FILES_FLEX) + list (LENGTH SOURCE_FILES_FLEX SOURCE_FILES_FLEX_LEN) + # bison files + OCCT_ORIGIN_AND_PATCHED_FILES ("${RELATIVE_SOURCES_DIR}/${THE_PACKAGE_NAME}" "*[.]yacc" SOURCE_FILES_BISON) + list (LENGTH SOURCE_FILES_BISON SOURCE_FILES_BISON_LEN) + if (NOT (${SOURCE_FILES_FLEX_LEN} EQUAL ${SOURCE_FILES_BISON_LEN} AND NOT ${SOURCE_FILES_FLEX_LEN} EQUAL 0)) + message(FATAL_ERROR "Error: number of FLEX and BISON files is not equal for ${THE_PACKAGE_NAME}") + endif() + list (SORT SOURCE_FILES_FLEX) + list (SORT SOURCE_FILES_BISON) + math (EXPR SOURCE_FILES_FLEX_LEN "${SOURCE_FILES_FLEX_LEN} - 1") + foreach (FLEX_FILE_INDEX RANGE ${SOURCE_FILES_FLEX_LEN}) + list (GET SOURCE_FILES_FLEX ${FLEX_FILE_INDEX} CURRENT_FLEX_FILE) + get_filename_component (CURRENT_FLEX_FILE_NAME ${CURRENT_FLEX_FILE} NAME_WE) + list (GET SOURCE_FILES_BISON ${FLEX_FILE_INDEX} CURRENT_BISON_FILE) + get_filename_component (CURRENT_BISON_FILE_NAME ${CURRENT_BISON_FILE} NAME_WE) + string (COMPARE EQUAL ${CURRENT_FLEX_FILE_NAME} ${CURRENT_BISON_FILE_NAME} ARE_FILES_EQUAL) + if (NOT (EXISTS "${CURRENT_FLEX_FILE}" AND EXISTS "${CURRENT_BISON_FILE}" AND ${ARE_FILES_EQUAL})) + continue() + endif() + # Note: files are generated in original source directory (not in patch!) + set (FLEX_BISON_TARGET_DIR "${CMAKE_SOURCE_DIR}/${RELATIVE_SOURCES_DIR}/${THE_PACKAGE_NAME}") + # choose appropriate extension for generated files: "cxx" if source file contains + # instruction to generate C++ code, "c" otherwise + set (BISON_OUTPUT_FILE_EXT "c") + set (FLEX_OUTPUT_FILE_EXT "c") + file (STRINGS "${CURRENT_BISON_FILE}" FILE_BISON_CONTENT) + foreach (FILE_BISON_CONTENT_LINE ${FILE_BISON_CONTENT}) + string (REGEX MATCH "%language \"C\\+\\+\"" CXX_BISON_LANGUAGE_FOUND ${FILE_BISON_CONTENT_LINE}) + if (CXX_BISON_LANGUAGE_FOUND) + set (BISON_OUTPUT_FILE_EXT "cxx") + endif() + endforeach() + file (STRINGS "${CURRENT_FLEX_FILE}" FILE_FLEX_CONTENT) + foreach (FILE_FLEX_CONTENT_LINE ${FILE_FLEX_CONTENT}) + string (REGEX MATCH "%option c\\+\\+" CXX_FLEX_LANGUAGE_FOUND ${FILE_FLEX_CONTENT_LINE}) + if (CXX_FLEX_LANGUAGE_FOUND) + set (FLEX_OUTPUT_FILE_EXT "cxx") + endif() + endforeach() + set (BISON_OUTPUT_FILE ${CURRENT_BISON_FILE_NAME}.tab.${BISON_OUTPUT_FILE_EXT}) + set (FLEX_OUTPUT_FILE lex.${CURRENT_FLEX_FILE_NAME}.${FLEX_OUTPUT_FILE_EXT}) + if (EXISTS ${FLEX_BISON_TARGET_DIR}/${CURRENT_BISON_FILE_NAME}.tab.${BISON_OUTPUT_FILE_EXT}) + message (STATUS "Info: remove old output BISON file: ${FLEX_BISON_TARGET_DIR}/${CURRENT_BISON_FILE_NAME}.tab.${BISON_OUTPUT_FILE_EXT}") + file(REMOVE ${FLEX_BISON_TARGET_DIR}/${CURRENT_BISON_FILE_NAME}.tab.${BISON_OUTPUT_FILE_EXT}) + endif() + if (EXISTS ${FLEX_BISON_TARGET_DIR}/${CURRENT_BISON_FILE_NAME}.tab.hxx) + message (STATUS "Info: remove old output BISON file: ${FLEX_BISON_TARGET_DIR}/${CURRENT_BISON_FILE_NAME}.tab.hxx") + file(REMOVE ${FLEX_BISON_TARGET_DIR}/${CURRENT_BISON_FILE_NAME}.tab.hxx) + endif() + if (EXISTS ${FLEX_BISON_TARGET_DIR}/${FLEX_OUTPUT_FILE}) + message (STATUS "Info: remove old output FLEX file: ${FLEX_BISON_TARGET_DIR}/${FLEX_OUTPUT_FILE}") + file(REMOVE ${FLEX_BISON_TARGET_DIR}/${FLEX_OUTPUT_FILE}) + endif() + BISON_TARGET (Parser_${CURRENT_BISON_FILE_NAME} ${CURRENT_BISON_FILE} "${FLEX_BISON_TARGET_DIR}/${BISON_OUTPUT_FILE}" + COMPILE_FLAGS "-p ${CURRENT_BISON_FILE_NAME} -l -M ${CMAKE_SOURCE_DIR}/${RELATIVE_SOURCES_DIR}/=") + FLEX_TARGET (Scanner_${CURRENT_FLEX_FILE_NAME} ${CURRENT_FLEX_FILE} "${FLEX_BISON_TARGET_DIR}/${FLEX_OUTPUT_FILE}" + COMPILE_FLAGS "-P${CURRENT_FLEX_FILE_NAME} -L") + ADD_FLEX_BISON_DEPENDENCY (Scanner_${CURRENT_FLEX_FILE_NAME} Parser_${CURRENT_BISON_FILE_NAME}) + endforeach() +endmacro() + # Adds OCCT_INSTALL_BIN_LETTER variable ("" for Release, "d" for Debug and # "i" for RelWithDebInfo) in OpenCASCADETargets-*.cmake files during # installation process. diff --git a/adm/cmake/occt_toolkit.cmake b/adm/cmake/occt_toolkit.cmake index ead767a844..3dfd0b6661 100644 --- a/adm/cmake/occt_toolkit.cmake +++ b/adm/cmake/occt_toolkit.cmake @@ -23,7 +23,7 @@ if ("${OCCT_TOOLKITS_NAME_SUFFIX}" STREQUAL "") endif() # parse PACKAGES file -FILE_TO_LIST ("${RELATIVE_SOURCES_DIR}/${PROJECT_NAME}/PACKAGES" USED_PACKAGES) +EXTRACT_TOOLKIT_PACKAGES (${RELATIVE_SOURCES_DIR} ${PROJECT_NAME} USED_PACKAGES) if ("${USED_PACKAGES}" STREQUAL "") set (USED_PACKAGES ${PROJECT_NAME}) endif() @@ -47,7 +47,6 @@ endif() # Get all used packages from toolkit UNSET(RESOURCE_FILES) foreach (OCCT_PACKAGE ${USED_PACKAGES}) - #remove part after "/" in the OCCT_PACKAGE variable if exists string (FIND "${OCCT_PACKAGE}" "/" _index) if (_index GREATER -1) @@ -64,142 +63,27 @@ foreach (OCCT_PACKAGE ${USED_PACKAGES}) set (SOURCE_FILES) set (HEADER_FILES) - # Generate Flex and Bison files - if (${BUILD_YACCLEX}) - # flex files - OCCT_ORIGIN_AND_PATCHED_FILES ("${RELATIVE_SOURCES_DIR}/${OCCT_PACKAGE}" "*[.]lex" SOURCE_FILES_FLEX) - list (LENGTH SOURCE_FILES_FLEX SOURCE_FILES_FLEX_LEN) - - # remove old general version of FlexLexer - if (EXISTS ${CMAKE_SOURCE_DIR}/${RELATIVE_SOURCES_DIR}/FlexLexer/FlexLexer.h) - message (STATUS "Info: remove old FLEX header file: ${CMAKE_SOURCE_DIR}/${RELATIVE_SOURCES_DIR}/FlexLexer/FlexLexer.h") - file(REMOVE ${CMAKE_SOURCE_DIR}/${RELATIVE_SOURCES_DIR}/FlexLexer/FlexLexer.h) - endif() - # install copy of FlexLexer.h locally to allow further building without flex - if (FLEX_INCLUDE_DIR AND EXISTS "${FLEX_INCLUDE_DIR}/FlexLexer.h") - configure_file("${FLEX_INCLUDE_DIR}/FlexLexer.h" "${CMAKE_SOURCE_DIR}/${RELATIVE_SOURCES_DIR}/FlexLexer/FlexLexer.h" @ONLY NEWLINE_STYLE LF) - endif() - - # bison files - OCCT_ORIGIN_AND_PATCHED_FILES ("${RELATIVE_SOURCES_DIR}/${OCCT_PACKAGE}" "*[.]yacc" SOURCE_FILES_BISON) - list (LENGTH SOURCE_FILES_BISON SOURCE_FILES_BISON_LEN) - - if (${SOURCE_FILES_FLEX_LEN} EQUAL ${SOURCE_FILES_BISON_LEN} AND NOT ${SOURCE_FILES_FLEX_LEN} EQUAL 0) - - list (SORT SOURCE_FILES_FLEX) - list (SORT SOURCE_FILES_BISON) - - math (EXPR SOURCE_FILES_FLEX_LEN "${SOURCE_FILES_FLEX_LEN} - 1") - foreach (FLEX_FILE_INDEX RANGE ${SOURCE_FILES_FLEX_LEN}) - - list (GET SOURCE_FILES_FLEX ${FLEX_FILE_INDEX} CURRENT_FLEX_FILE) - get_filename_component (CURRENT_FLEX_FILE_NAME ${CURRENT_FLEX_FILE} NAME_WE) - - list (GET SOURCE_FILES_BISON ${FLEX_FILE_INDEX} CURRENT_BISON_FILE) - get_filename_component (CURRENT_BISON_FILE_NAME ${CURRENT_BISON_FILE} NAME_WE) - - string (COMPARE EQUAL ${CURRENT_FLEX_FILE_NAME} ${CURRENT_BISON_FILE_NAME} ARE_FILES_EQUAL) - - if (EXISTS "${CURRENT_FLEX_FILE}" AND EXISTS "${CURRENT_BISON_FILE}" AND ${ARE_FILES_EQUAL}) - - # Note: files are generated in original source directory (not in patch!) - set (FLEX_BISON_TARGET_DIR "${CMAKE_SOURCE_DIR}/${RELATIVE_SOURCES_DIR}/${OCCT_PACKAGE}") - - # choose appropriate extension for generated files: "cxx" if source file contains - # instruction to generate C++ code, "c" otherwise - set (BISON_OUTPUT_FILE_EXT "c") - set (FLEX_OUTPUT_FILE_EXT "c") - file (STRINGS "${CURRENT_BISON_FILE}" FILE_BISON_CONTENT) - foreach (FILE_BISON_CONTENT_LINE ${FILE_BISON_CONTENT}) - string (REGEX MATCH "%language \"C\\+\\+\"" CXX_BISON_LANGUAGE_FOUND ${FILE_BISON_CONTENT_LINE}) - if (CXX_BISON_LANGUAGE_FOUND) - set (BISON_OUTPUT_FILE_EXT "cxx") - endif() - endforeach() - - file (STRINGS "${CURRENT_FLEX_FILE}" FILE_FLEX_CONTENT) - foreach (FILE_FLEX_CONTENT_LINE ${FILE_FLEX_CONTENT}) - string (REGEX MATCH "%option c\\+\\+" CXX_FLEX_LANGUAGE_FOUND ${FILE_FLEX_CONTENT_LINE}) - if (CXX_FLEX_LANGUAGE_FOUND) - set (FLEX_OUTPUT_FILE_EXT "cxx") - endif() - endforeach() - set (BISON_OUTPUT_FILE ${CURRENT_BISON_FILE_NAME}.tab.${BISON_OUTPUT_FILE_EXT}) - set (FLEX_OUTPUT_FILE lex.${CURRENT_FLEX_FILE_NAME}.${FLEX_OUTPUT_FILE_EXT}) - - if (EXISTS ${FLEX_BISON_TARGET_DIR}/${CURRENT_BISON_FILE_NAME}.tab.${BISON_OUTPUT_FILE_EXT}) - message (STATUS "Info: remove old output BISON file: ${FLEX_BISON_TARGET_DIR}/${CURRENT_BISON_FILE_NAME}.tab.${BISON_OUTPUT_FILE_EXT}") - file(REMOVE ${FLEX_BISON_TARGET_DIR}/${CURRENT_BISON_FILE_NAME}.tab.${BISON_OUTPUT_FILE_EXT}) - endif() - if (EXISTS ${FLEX_BISON_TARGET_DIR}/${CURRENT_BISON_FILE_NAME}.tab.hxx) - message (STATUS "Info: remove old output BISON file: ${FLEX_BISON_TARGET_DIR}/${CURRENT_BISON_FILE_NAME}.tab.hxx") - file(REMOVE ${FLEX_BISON_TARGET_DIR}/${CURRENT_BISON_FILE_NAME}.tab.hxx) - endif() - if (EXISTS ${FLEX_BISON_TARGET_DIR}/${FLEX_OUTPUT_FILE}) - message (STATUS "Info: remove old output FLEX file: ${FLEX_BISON_TARGET_DIR}/${FLEX_OUTPUT_FILE}") - file(REMOVE ${FLEX_BISON_TARGET_DIR}/${FLEX_OUTPUT_FILE}) - endif() - - BISON_TARGET (Parser_${CURRENT_BISON_FILE_NAME} ${CURRENT_BISON_FILE} "${FLEX_BISON_TARGET_DIR}/${BISON_OUTPUT_FILE}" - COMPILE_FLAGS "-p ${CURRENT_BISON_FILE_NAME} -l -M ${CMAKE_SOURCE_DIR}/${RELATIVE_SOURCES_DIR}/=") - FLEX_TARGET (Scanner_${CURRENT_FLEX_FILE_NAME} ${CURRENT_FLEX_FILE} "${FLEX_BISON_TARGET_DIR}/${FLEX_OUTPUT_FILE}" - COMPILE_FLAGS "-P${CURRENT_FLEX_FILE_NAME} -L") - ADD_FLEX_BISON_DEPENDENCY (Scanner_${CURRENT_FLEX_FILE_NAME} Parser_${CURRENT_BISON_FILE_NAME}) - - list (APPEND SOURCE_FILES ${BISON_OUTPUT_FILE} ${FLEX_OUTPUT_FILE}) - endif() - endforeach() - endif() - endif() + EXTRACT_PACKAGE_FILES (${RELATIVE_SOURCES_DIR} ${OCCT_PACKAGE} ALL_FILES INCLUDE_FOLDER) - # header files - if (BUILD_PATCH AND EXISTS "${BUILD_PATCH}/${RELATIVE_SOURCES_DIR}/${OCCT_PACKAGE}/FILES") - file (STRINGS "${BUILD_PATCH}/${RELATIVE_SOURCES_DIR}/${OCCT_PACKAGE}/FILES" HEADER_FILES_M REGEX ".+[.]h") - file (STRINGS "${BUILD_PATCH}/${RELATIVE_SOURCES_DIR}/${OCCT_PACKAGE}/FILES" HEADER_FILES_LXX REGEX ".+[.]lxx") - file (STRINGS "${BUILD_PATCH}/${RELATIVE_SOURCES_DIR}/${OCCT_PACKAGE}/FILES" HEADER_FILES_GXX REGEX ".+[.]gxx") - - file (STRINGS "${BUILD_PATCH}/${RELATIVE_SOURCES_DIR}/${OCCT_PACKAGE}/FILES" SOURCE_FILES_C REGEX ".+[.]c") - if(APPLE) - file (STRINGS "${BUILD_PATCH}/${RELATIVE_SOURCES_DIR}/${OCCT_PACKAGE}/FILES" SOURCE_FILES_M REGEX ".+[.]mm") - endif() - else() - file (STRINGS "${CMAKE_SOURCE_DIR}/${RELATIVE_SOURCES_DIR}/${OCCT_PACKAGE}/FILES" HEADER_FILES_M REGEX ".+[.]h") - file (STRINGS "${CMAKE_SOURCE_DIR}/${RELATIVE_SOURCES_DIR}/${OCCT_PACKAGE}/FILES" HEADER_FILES_LXX REGEX ".+[.]lxx") - file (STRINGS "${CMAKE_SOURCE_DIR}/${RELATIVE_SOURCES_DIR}/${OCCT_PACKAGE}/FILES" HEADER_FILES_GXX REGEX ".+[.]gxx") - - file (STRINGS "${CMAKE_SOURCE_DIR}/${RELATIVE_SOURCES_DIR}/${OCCT_PACKAGE}/FILES" SOURCE_FILES_C REGEX ".+[.]c") - if(APPLE) - file (STRINGS "${CMAKE_SOURCE_DIR}/${RELATIVE_SOURCES_DIR}/${OCCT_PACKAGE}/FILES" SOURCE_FILES_M REGEX ".+[.]mm") - endif() - endif() - - list (APPEND HEADER_FILES ${HEADER_FILES_M} ${HEADER_FILES_LXX} ${SOURCE_FILES_GXX}) - list (APPEND SOURCE_FILES ${SOURCE_FILES_C}) + set (HEADER_FILES_FILTERING ${ALL_FILES}) + set (SOURCE_FILES_FILTERING ${ALL_FILES}) + + list (FILTER HEADER_FILES_FILTERING INCLUDE REGEX ".+[.](h|lxx|gxx)") + if(APPLE) - list (APPEND SOURCE_FILES ${SOURCE_FILES_M}) + list (FILTER SOURCE_FILES_FILTERING INCLUDE REGEX ".+[.](c|mm)") + else() + list (FILTER SOURCE_FILES_FILTERING INCLUDE REGEX ".+[.](c)") endif() - foreach(HEADER_FILE ${HEADER_FILES}) - if (BUILD_PATCH AND EXISTS "${BUILD_PATCH}/${RELATIVE_SOURCES_DIR}/${OCCT_PACKAGE}/${HEADER_FILE}") - message (STATUS "Info: consider patched file: ${BUILD_PATCH}/${RELATIVE_SOURCES_DIR}/${OCCT_PACKAGE}/${HEADER_FILE}") - list (APPEND USED_INCFILES "${BUILD_PATCH}/${RELATIVE_SOURCES_DIR}/${OCCT_PACKAGE}/${HEADER_FILE}") - SOURCE_GROUP ("Header Files\\${OCCT_PACKAGE_NAME}" FILES "${BUILD_PATCH}/${RELATIVE_SOURCES_DIR}/${OCCT_PACKAGE}/${HEADER_FILE}") - else() - list (APPEND USED_INCFILES "${CMAKE_SOURCE_DIR}/${RELATIVE_SOURCES_DIR}/${OCCT_PACKAGE}/${HEADER_FILE}") - SOURCE_GROUP ("Header Files\\${OCCT_PACKAGE_NAME}" FILES "${CMAKE_SOURCE_DIR}/${RELATIVE_SOURCES_DIR}/${OCCT_PACKAGE}/${HEADER_FILE}") - endif() - endforeach() + list (APPEND HEADER_FILES ${HEADER_FILES_FILTERING}) + list (APPEND SOURCE_FILES ${SOURCE_FILES_FILTERING}) - foreach(SOURCE_FILE ${SOURCE_FILES}) - if (BUILD_PATCH AND EXISTS "${BUILD_PATCH}/${RELATIVE_SOURCES_DIR}/${OCCT_PACKAGE}/${SOURCE_FILE}") - message (STATUS "Info: consider patched file: ${BUILD_PATCH}/${RELATIVE_SOURCES_DIR}/${OCCT_PACKAGE}/${SOURCE_FILE}") - list (APPEND USED_SRCFILES "${BUILD_PATCH}/${RELATIVE_SOURCES_DIR}/${OCCT_PACKAGE}/${SOURCE_FILE}") - SOURCE_GROUP ("Source Files\\${OCCT_PACKAGE_NAME}" FILES "${BUILD_PATCH}/${RELATIVE_SOURCES_DIR}/${OCCT_PACKAGE}/${SOURCE_FILE}") - else() - list (APPEND USED_SRCFILES "${CMAKE_SOURCE_DIR}/${RELATIVE_SOURCES_DIR}/${OCCT_PACKAGE}/${SOURCE_FILE}") - SOURCE_GROUP ("Source Files\\${OCCT_PACKAGE_NAME}" FILES "${CMAKE_SOURCE_DIR}/${RELATIVE_SOURCES_DIR}/${OCCT_PACKAGE}/${SOURCE_FILE}") - endif() - endforeach() + SOURCE_GROUP ("Header Files\\${OCCT_PACKAGE_NAME}" FILES "${HEADER_FILES_FILTERING}") + SOURCE_GROUP ("Source Files\\${OCCT_PACKAGE_NAME}" FILES "${SOURCE_FILES_FILTERING}") + + list (APPEND USED_INCFILES ${HEADER_FILES}) + list (APPEND USED_SRCFILES ${SOURCE_FILES}) if (USE_QT) FIND_AND_INSTALL_QT_RESOURCES (${OCCT_PACKAGE} RESOURCE_FILES) @@ -245,18 +129,6 @@ endif (USE_QT) if (EXECUTABLE_PROJECT) add_executable (${PROJECT_NAME} ${USED_SRCFILES} ${USED_INCFILES} ${USED_RCFILE} ${RESOURCE_FILES} ${${PROJECT_NAME}_MOC_FILES}) - if (DEFINED ${PROJECT_NAME}_DISABLE_COTIRE AND ${PROJECT_NAME}_DISABLE_COTIRE) - set_target_properties(${PROJECT_NAME} PROPERTIES COTIRE_ENABLE_PRECOMPILED_HEADER FALSE) - set_target_properties(${PROJECT_NAME} PROPERTIES COTIRE_ADD_UNITY_BUILD FALSE) - else() - # To avoid excluding of PROJECT_NAME from cotire tool, we may use cotire - # COTIRE_PREFIX_HEADER_IGNORE_PATH instead. But, practically it causes many 'undefined symbols' error. - # So, we just exclude PROJECT_NAME from cotire list. - # if (DEFINED ${PROJECT_NAME}_COTIRE_IGNORE_PATH) - # set_target_properties(${PROJECT_NAME} PROPERTIES COTIRE_PREFIX_HEADER_IGNORE_PATH "${${PROJECT_NAME}_COTIRE_IGNORE_PATH}") - # endif() - endif() - install (TARGETS ${PROJECT_NAME} DESTINATION "${INSTALL_DIR_BIN}\${OCCT_INSTALL_BIN_LETTER}") @@ -266,18 +138,6 @@ if (EXECUTABLE_PROJECT) else() add_library (${PROJECT_NAME} ${USED_SRCFILES} ${USED_INCFILES} ${USED_RCFILE} ${RESOURCE_FILES} ${${PROJECT_NAME}_MOC_FILES}) - if (DEFINED ${PROJECT_NAME}_DISABLE_COTIRE AND ${PROJECT_NAME}_DISABLE_COTIRE) - set_target_properties(${PROJECT_NAME} PROPERTIES COTIRE_ENABLE_PRECOMPILED_HEADER FALSE) - set_target_properties(${PROJECT_NAME} PROPERTIES COTIRE_ADD_UNITY_BUILD FALSE) - else() - # To avoid excluding of PROJECT_NAME from cotire tool, we may use cotire - # COTIRE_PREFIX_HEADER_IGNORE_PATH instead. But, practically it causes many 'undefined symbols' error. - # So, we just exclude PROJECT_NAME from cotire list. - # if (DEFINED ${PROJECT_NAME}_COTIRE_IGNORE_PATH) - # set_target_properties(${PROJECT_NAME} PROPERTIES COTIRE_PREFIX_HEADER_IGNORE_PATH "${${PROJECT_NAME}_COTIRE_IGNORE_PATH}") - # endif() - endif() - if (MSVC) if (BUILD_FORCE_RelWithDebInfo) set (aReleasePdbConf "Release") @@ -343,103 +203,79 @@ set_target_properties (${PROJECT_NAME} PROPERTIES COMPILE_FLAGS "${PRECOMPILED_D VERSION "${OCC_VERSION_MAJOR}.${OCC_VERSION_MINOR}.${OCC_VERSION_MAINTENANCE}") set (USED_TOOLKITS_BY_CURRENT_PROJECT) -set (USED_EXTERNAL_LIBS_BY_CURRENT_PROJECT) +set (USED_EXTERNLIB_AND_TOOLKITS) -# parse EXTERNLIB file +# SOME EXECUTABLE PROJECTS MAY USE CUSTOM TOOLKITS AND EXTERNAL LIBRARIES if (CUSTOM_EXTERNLIB) set (USED_EXTERNLIB_AND_TOOLKITS ${CUSTOM_EXTERNLIB}) + foreach (EXTERNAL_LIB ${CUSTOM_EXTERNLIB}) + string (REGEX MATCH "^TK" TK_FOUND ${EXTERNAL_LIB}) + if (TK_FOUND) + list (APPEND USED_TOOLKITS_BY_CURRENT_PROJECT ${EXTERNAL_LIB}) + endif() + endforeach() else() - FILE_TO_LIST ("${RELATIVE_SOURCES_DIR}/${PROJECT_NAME}/EXTERNLIB" USED_EXTERNLIB_AND_TOOLKITS) + EXTRACT_TOOLKIT_EXTERNLIB ("${RELATIVE_SOURCES_DIR}" "${PROJECT_NAME}" USED_EXTERNLIB_AND_TOOLKITS) + EXCTRACT_TOOLKIT_DEPS ("${RELATIVE_SOURCES_DIR}" "${PROJECT_NAME}" USED_TOOLKITS_BY_CURRENT_PROJECT _) + list (REMOVE_ITEM USED_TOOLKITS_BY_CURRENT_PROJECT ${PROJECT_NAME}) endif() + foreach (USED_ITEM ${USED_EXTERNLIB_AND_TOOLKITS}) string (REGEX MATCH "^ *#" COMMENT_FOUND ${USED_ITEM}) - if (NOT COMMENT_FOUND) - string (REGEX MATCH "^TK" TK_FOUND ${USED_ITEM}) - string (REGEX MATCH "^vtk" VTK_FOUND ${USED_ITEM}) - - if (NOT "${TK_FOUND}" STREQUAL "" OR NOT "${VTK_FOUND}" STREQUAL "") - list (APPEND USED_TOOLKITS_BY_CURRENT_PROJECT ${USED_ITEM}) - if (NOT "${VTK_FOUND}" STREQUAL "" AND BUILD_SHARED_LIBS AND INSTALL_VTK AND COMMAND OCCT_INSTALL_VTK) - OCCT_INSTALL_VTK(${USED_ITEM}) - endif() - else() - string (REGEX MATCH "^CSF_" CSF_FOUND ${USED_ITEM}) - if ("${CSF_FOUND}" STREQUAL "") - message (STATUS "Info: ${USED_ITEM} from ${PROJECT_NAME} skipped due to it is empty") - else() # get CSF_ value - set (CURRENT_CSF ${${USED_ITEM}}) - if (NOT "x${CURRENT_CSF}" STREQUAL "x") - if ("${CURRENT_CSF}" STREQUAL "${CSF_OpenGlLibs}") - add_definitions (-DHAVE_OPENGL) - endif() - if ("${CURRENT_CSF}" STREQUAL "${CSF_OpenGlesLibs}") - add_definitions (-DHAVE_GLES2) - endif() - - if ("${CURRENT_CSF}" STREQUAL "${CSF_Draco}") - set (CURRENT_CSF "") - set (USED_DRACO 1) - endif() - set (LIBRARY_FROM_CACHE 0) - separate_arguments (CURRENT_CSF) - foreach (CSF_LIBRARY ${CURRENT_CSF}) - string (TOLOWER "${CSF_LIBRARY}" CSF_LIBRARY) - string (REPLACE "+" "[+]" CSF_LIBRARY "${CSF_LIBRARY}") - string (REPLACE "." "" CSF_LIBRARY "${CSF_LIBRARY}") - get_cmake_property(ALL_CACHE_VARIABLES CACHE_VARIABLES) - string (REGEX MATCHALL "(^|;)3RDPARTY_[^;]+_LIBRARY[^;]*" ALL_CACHE_VARIABLES "${ALL_CACHE_VARIABLES}") - foreach (CACHE_VARIABLE ${ALL_CACHE_VARIABLES}) - set (CURRENT_CACHE_LIBRARY ${${CACHE_VARIABLE}}) - string (TOLOWER "${CACHE_VARIABLE}" CACHE_VARIABLE) - - if (EXISTS "${CURRENT_CACHE_LIBRARY}" AND NOT IS_DIRECTORY "${CURRENT_CACHE_LIBRARY}") - string (REGEX MATCH "_${CSF_LIBRARY}$" IS_ENDING "${CACHE_VARIABLE}") - string (REGEX MATCH "^([a-z]+)" CSF_WO_VERSION "${CSF_LIBRARY}") - string (REGEX MATCH "_${CSF_WO_VERSION}$" IS_ENDING_WO_VERSION "${CACHE_VARIABLE}") - if ("3rdparty_${CSF_LIBRARY}_library" STREQUAL "${CACHE_VARIABLE}" OR - "3rdparty_${CSF_WO_VERSION}_library" STREQUAL "${CACHE_VARIABLE}" OR - NOT "x${IS_ENDING}" STREQUAL "x" OR - NOT "x${IS_ENDING_WO_VERSION}" STREQUAL "x") - list (APPEND USED_EXTERNAL_LIBS_BY_CURRENT_PROJECT "${CURRENT_CACHE_LIBRARY}") - set (LIBRARY_FROM_CACHE 1) - endif() - endif() - endforeach() - endforeach() - - if (NOT ${LIBRARY_FROM_CACHE} AND NOT "${CURRENT_CSF}" STREQUAL "") - # prepare a list from a string with whitespaces - separate_arguments (CURRENT_CSF) - list (APPEND USED_EXTERNAL_LIBS_BY_CURRENT_PROJECT ${CURRENT_CSF}) - endif() + if (COMMENT_FOUND) + continue() + endif() + + string (REGEX MATCH "^CSF_" CSF_FOUND ${USED_ITEM}) + string (REGEX MATCH "^vtk" VTK_FOUND ${USED_ITEM}) + + if (NOT "${VTK_FOUND}" STREQUAL "" AND BUILD_SHARED_LIBS AND INSTALL_VTK AND COMMAND OCCT_INSTALL_VTK) + OCCT_INSTALL_VTK(${USED_ITEM}) + continue() + endif() + # Search for 3rd-party libraries as a dependency + set (CURRENT_CSF ${${USED_ITEM}}) + if ("x${CURRENT_CSF}" STREQUAL "x") + continue() + endif() + if ("${CURRENT_CSF}" STREQUAL "${CSF_OpenGlLibs}") + add_definitions (-DHAVE_OPENGL) + endif() + if ("${CURRENT_CSF}" STREQUAL "${CSF_OpenGlesLibs}") + add_definitions (-DHAVE_GLES2) + endif() + set (LIBRARY_FROM_CACHE 0) + separate_arguments (CURRENT_CSF) + foreach (CSF_LIBRARY ${CURRENT_CSF}) + string (TOLOWER "${CSF_LIBRARY}" CSF_LIBRARY) + string (REPLACE "+" "[+]" CSF_LIBRARY "${CSF_LIBRARY}") + string (REPLACE "." "" CSF_LIBRARY "${CSF_LIBRARY}") + get_cmake_property(ALL_CACHE_VARIABLES CACHE_VARIABLES) + string (REGEX MATCHALL "(^|;)3RDPARTY_[^;]+_LIBRARY[^;]*" ALL_CACHE_VARIABLES "${ALL_CACHE_VARIABLES}") + foreach (CACHE_VARIABLE ${ALL_CACHE_VARIABLES}) + set (CURRENT_CACHE_LIBRARY ${${CACHE_VARIABLE}}) + string (TOLOWER "${CACHE_VARIABLE}" CACHE_VARIABLE) + if (EXISTS "${CURRENT_CACHE_LIBRARY}" AND NOT IS_DIRECTORY "${CURRENT_CACHE_LIBRARY}") + string (REGEX MATCH "_${CSF_LIBRARY}$" IS_ENDING "${CACHE_VARIABLE}") + string (REGEX MATCH "^([a-z]+)" CSF_WO_VERSION "${CSF_LIBRARY}") + string (REGEX MATCH "_${CSF_WO_VERSION}$" IS_ENDING_WO_VERSION "${CACHE_VARIABLE}") + if ("3rdparty_${CSF_LIBRARY}_library" STREQUAL "${CACHE_VARIABLE}" OR + "3rdparty_${CSF_WO_VERSION}_library" STREQUAL "${CACHE_VARIABLE}" OR + NOT "x${IS_ENDING}" STREQUAL "x" OR + NOT "x${IS_ENDING_WO_VERSION}" STREQUAL "x") + list (APPEND USED_EXTERNAL_LIBS_BY_CURRENT_PROJECT "${CURRENT_CACHE_LIBRARY}") + set (LIBRARY_FROM_CACHE 1) endif() endif() - endif() + endforeach() + endforeach() + if (NOT ${LIBRARY_FROM_CACHE} AND NOT "${CURRENT_CSF}" STREQUAL "") + # prepare a list from a string with whitespaces + separate_arguments (CURRENT_CSF) + list (APPEND USED_EXTERNAL_LIBS_BY_CURRENT_PROJECT ${CURRENT_CSF}) endif() endforeach() -if (USE_DRACO) - if (USED_DRACO) - set (USED_LIB_RELEASE ${3RDPARTY_DRACO_LIBRARY}) - if (WIN32) - set (USED_LIB_DEBUG ${3RDPARTY_DRACO_LIBRARY_DEBUG}) - else() - set (USED_LIB_DEBUG ${3RDPARTY_DRACO_LIBRARY}) - endif() - set (USED_LIB_CONF) - if (EXISTS ${USED_LIB_DEBUG}) - set (USED_LIB_CONF "$<$:${USED_LIB_DEBUG}>;${USED_LIB_CONF}") - endif() - if (EXISTS ${USED_LIB_RELEASE}) - set (USED_LIB_CONF "$<$:${USED_LIB_RELEASE}>;${USED_LIB_CONF}") - set (USED_LIB_CONF "$<$:${USED_LIB_RELEASE}>;${USED_LIB_CONF}") - endif() - if (DEFINED USED_LIB_CONF) - set_property (TARGET ${PROJECT_NAME} APPEND PROPERTY LINK_LIBRARIES "${USED_LIB_CONF}") - endif() - endif() -endif() - if (APPLE) list (FIND USED_EXTERNAL_LIBS_BY_CURRENT_PROJECT X11 IS_X11_FOUND) if (NOT ${IS_X11_FOUND} EQUAL -1) @@ -498,35 +334,3 @@ if (CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX) message (STATUS "Warning: internal deprecation warnings by Standard_DEPRECATED have been disabled due to old gcc version being used") endif() endif() - -# use Cotire to accelerate build via usage of precompiled headers -if (BUILD_USE_PCH) - if (WIN32) - # prevent definition of min and max macros through inclusion of Windows.h - # (for cotire builds) - add_definitions("-DNOMINMAX") - # avoid warnings on deprecated names from standard C library (see strsafe.h) - add_definitions("-DSTRSAFE_NO_DEPRECATE") - # avoid "std::Equal1" warning in QANCollection_Stl.cxx in debug mode - # suggesting using msvc "Checked Iterators" - add_definitions("-D_SCL_SECURE_NO_WARNINGS") - endif() - - # Exclude system-provided glext.h. - # These macros are already defined within OpenGl_GlFunctions.hxx, - # however we have to duplicate them here for building TKOpenGl with PCH. - add_definitions("-DGL_GLEXT_LEGACY") - add_definitions("-DGLX_GLXEXT_LEGACY") - - # workaround for old gcc - if (CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX) - add_definitions("-D__STDC_CONSTANT_MACROS") - add_definitions("-D__STDC_FORMAT_MACROS") - endif() - - # unity builds are not used since they do not add speed but cause conflicts - # in TKV3d - set_target_properties(${PROJECT_NAME} PROPERTIES COTIRE_ADD_UNITY_BUILD FALSE) - - cotire(${PROJECT_NAME}) -endif() diff --git a/adm/cmake/vardescr.cmake b/adm/cmake/vardescr.cmake index 1d7631b7dd..ea50401191 100644 --- a/adm/cmake/vardescr.cmake +++ b/adm/cmake/vardescr.cmake @@ -48,6 +48,11 @@ set (BUILD_USE_PCH_DESCR "Use precompiled headers to accelerate the build. Precompiled headers are generated automatically by Cotire tool.") +set (BUILD_INCLUDE_SYMLINK_DESCR +"Include symbolic links to the source files in the build directory. +OFF - using a reference file with direct include to the origin, +ON - symbolic link to the origin file are created") + # install variables set (INSTALL_DIR_DESCR "The place where built OCCT libraries, headers, test cases (INSTALL_TEST_CASES variable), diff --git a/dox/introduction/introduction.md b/dox/introduction/introduction.md index c0d71094c1..51a23ffa08 100644 --- a/dox/introduction/introduction.md +++ b/dox/introduction/introduction.md @@ -629,11 +629,6 @@ CMake is used to control the software compilation process using simple platform OCCT uses CMake as a build system. CMake is available under BSD 3-Clause license. See more at https://cmake.org/ -**Cotire** (compile time reducer) is a CMake module that speeds up the build process of CMake based build systems -by fully automating techniques as precompiled header usage and single compilation unit builds for C and C++. -Cotire is included in OCCT repository and used optionally by OCCT CMake scripts to accelerate builds by use of precompiled headers. -Cotire is licensed under the MIT license (https://github.com/sakra/cotire/blob/master/license). - **MikTEX** is up-to-date implementation of TeX/LaTeX and related programs for Windows. It is used for generation of User and Developer Guides in PDF format. See https://miktex.org for information on this tool. diff --git a/src/DRAWEXE/CMakeLists.txt b/src/DRAWEXE/CMakeLists.txt index c1d03299bd..f2101ab4c1 100644 --- a/src/DRAWEXE/CMakeLists.txt +++ b/src/DRAWEXE/CMakeLists.txt @@ -27,6 +27,10 @@ OCCT_INCLUDE_CMAKE_FILE (adm/cmake/occt_toolkit) unset (EXECUTABLE_PROJECT) unset (CUSTOM_EXTERNLIB) +if (NOT BUILD_SHARED_LIBS) + CONFIGURE_DRACO_DEPS() +endif() + if (EMSCRIPTEN) # Look for Tcl version string from file tcl.h set (TCL_MAJOR_VERSION 8) diff --git a/src/TKBRep/CMakeLists.txt b/src/TKBRep/CMakeLists.txt index f4a40146aa..66a3f6731c 100644 --- a/src/TKBRep/CMakeLists.txt +++ b/src/TKBRep/CMakeLists.txt @@ -1,3 +1,6 @@ project(TKBRep) OCCT_INCLUDE_CMAKE_FILE (adm/cmake/occt_toolkit) + +# Add the precompiled header +ADD_PRECOMPILED_HEADER(TKBRep "${CMAKE_CURRENT_SOURCE_DIR}/TKBRep_pch.hxx") diff --git a/src/TKBRep/TKBRep_pch.hxx b/src/TKBRep/TKBRep_pch.hxx new file mode 100644 index 0000000000..9912afd95b --- /dev/null +++ b/src/TKBRep/TKBRep_pch.hxx @@ -0,0 +1,33 @@ +#ifndef TKBRep_HXX +#define TKBRep_HXX + +// Windows-specific headers (for MSVC) +#ifdef _WIN32 +#ifndef NOMINMAX +#define NOMINMAX +#endif +#include // For Windows API functions like WideCharToMultiByte +#include // For Unicode/MBCS mappings +#ifdef GetObject +#undef GetObject +#endif +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include + +#include + +#endif // TKBRep_HXX \ No newline at end of file diff --git a/src/TKDEGLTF/CMakeLists.txt b/src/TKDEGLTF/CMakeLists.txt index 8b9c4468b0..9c6fb872a5 100644 --- a/src/TKDEGLTF/CMakeLists.txt +++ b/src/TKDEGLTF/CMakeLists.txt @@ -1,3 +1,5 @@ project(TKDEGLTF) OCCT_INCLUDE_CMAKE_FILE (adm/cmake/occt_toolkit) + +CONFIGURE_DRACO_DEPS() diff --git a/src/TKDESTEP/CMakeLists.txt b/src/TKDESTEP/CMakeLists.txt index fe235a7344..7ae7872796 100644 --- a/src/TKDESTEP/CMakeLists.txt +++ b/src/TKDESTEP/CMakeLists.txt @@ -1,3 +1,5 @@ project(TKDESTEP) OCCT_INCLUDE_CMAKE_FILE (adm/cmake/occt_toolkit) + +FLEX_AND_BISON_TARGET_APPLY ("StepFile" src) diff --git a/src/TKDraw/CMakeLists.txt b/src/TKDraw/CMakeLists.txt index eca90dca5d..a30204be2b 100644 --- a/src/TKDraw/CMakeLists.txt +++ b/src/TKDraw/CMakeLists.txt @@ -1,3 +1,7 @@ project(TKDraw) OCCT_INCLUDE_CMAKE_FILE (adm/cmake/occt_toolkit) + +if (APPLE AND BUILD_USE_PCH) + set_target_properties(TKDraw PROPERTIES DISABLE_PRECOMPILE_HEADERS ON) +endif() diff --git a/src/TKMath/CMakeLists.txt b/src/TKMath/CMakeLists.txt index b0ba442d83..7c49b4496f 100644 --- a/src/TKMath/CMakeLists.txt +++ b/src/TKMath/CMakeLists.txt @@ -1,3 +1,6 @@ project(TKMath) OCCT_INCLUDE_CMAKE_FILE (adm/cmake/occt_toolkit) + +# Add the precompiled header +ADD_PRECOMPILED_HEADER(TKMath "${CMAKE_CURRENT_SOURCE_DIR}/TKMath_pch.hxx") diff --git a/src/TKMath/PACKAGES b/src/TKMath/PACKAGES index 45bdceabb5..667e4859ef 100755 --- a/src/TKMath/PACKAGES +++ b/src/TKMath/PACKAGES @@ -4,7 +4,6 @@ ElSLib BSplCLib BSplSLib PLib -Precision GeomAbs Poly CSLib diff --git a/src/TKMath/TKMath_pch.hxx b/src/TKMath/TKMath_pch.hxx new file mode 100644 index 0000000000..92b7a78643 --- /dev/null +++ b/src/TKMath/TKMath_pch.hxx @@ -0,0 +1,29 @@ +#ifndef TKMATH_PCH_H +#define TKMATH_PCH_H + +// Standard library headers +#include + +// Windows-specific headers (for MSVC) +#ifdef _WIN32 +#ifndef NOMINMAX +#define NOMINMAX +#endif +#include // For Windows API functions like WideCharToMultiByte +#include // For Unicode/MBCS mappings +#ifdef GetObject +#undef GetObject +#endif +#endif + +#include +#include +#include +#include +#include +#include +#include + +#include + +#endif // TKMATH_PCH_H \ No newline at end of file diff --git a/src/TKOpenGl/CMakeLists.txt b/src/TKOpenGl/CMakeLists.txt index f1dd03f077..3e56f427b7 100644 --- a/src/TKOpenGl/CMakeLists.txt +++ b/src/TKOpenGl/CMakeLists.txt @@ -1,5 +1,7 @@ project(TKOpenGl) -set (TKOpenGl_DISABLE_COTIRE ON) - OCCT_INCLUDE_CMAKE_FILE (adm/cmake/occt_toolkit) + +if (APPLE AND BUILD_USE_PCH) + set_target_properties(TKOpenGl PROPERTIES DISABLE_PRECOMPILE_HEADERS ON) +endif() diff --git a/src/TKOpenGles/CMakeLists.txt b/src/TKOpenGles/CMakeLists.txt index fdbd6cb820..593f04499a 100644 --- a/src/TKOpenGles/CMakeLists.txt +++ b/src/TKOpenGles/CMakeLists.txt @@ -1,6 +1,7 @@ project(TKOpenGles) -set (TKOpenGles_DISABLE_COTIRE ON) - OCCT_INCLUDE_CMAKE_FILE (adm/cmake/occt_toolkit) -#add_definitions("-DOCCT_OPENGL") + +if (APPLE AND BUILD_USE_PCH) + set_target_properties(TKOpenGles PROPERTIES DISABLE_PRECOMPILE_HEADERS ON) +endif() diff --git a/src/TKRWMesh/CMakeLists.txt b/src/TKRWMesh/CMakeLists.txt index 3c70004dfc..22402a32e2 100644 --- a/src/TKRWMesh/CMakeLists.txt +++ b/src/TKRWMesh/CMakeLists.txt @@ -1,3 +1,5 @@ project(TKRWMesh) OCCT_INCLUDE_CMAKE_FILE (adm/cmake/occt_toolkit) + +CONFIGURE_DRACO_DEPS() diff --git a/src/TKService/CMakeLists.txt b/src/TKService/CMakeLists.txt index 98599c060e..244d748b4a 100644 --- a/src/TKService/CMakeLists.txt +++ b/src/TKService/CMakeLists.txt @@ -1,5 +1,7 @@ project(TKService) -set (TKService_DISABLE_COTIRE ON) - OCCT_INCLUDE_CMAKE_FILE (adm/cmake/occt_toolkit) + +if (APPLE AND BUILD_USE_PCH) + set_target_properties(TKService PROPERTIES DISABLE_PRECOMPILE_HEADERS ON) +endif() diff --git a/src/TKViewerTest/CMakeLists.txt b/src/TKViewerTest/CMakeLists.txt index 7f8a122f85..b3553c02e2 100644 --- a/src/TKViewerTest/CMakeLists.txt +++ b/src/TKViewerTest/CMakeLists.txt @@ -1,3 +1,7 @@ project(TKViewerTest) OCCT_INCLUDE_CMAKE_FILE (adm/cmake/occt_toolkit) + +if (APPLE AND BUILD_USE_PCH) + set_target_properties(TKViewerTest PROPERTIES DISABLE_PRECOMPILE_HEADERS ON) +endif() diff --git a/src/TKXCAF/CMakeLists.txt b/src/TKXCAF/CMakeLists.txt index 054ee4e5ea..4262ce1bd4 100644 --- a/src/TKXCAF/CMakeLists.txt +++ b/src/TKXCAF/CMakeLists.txt @@ -1,5 +1,3 @@ project(TKXCAF) -set (TKXCAF_DISABLE_COTIRE ON) - OCCT_INCLUDE_CMAKE_FILE (adm/cmake/occt_toolkit) diff --git a/src/TKXDEDRAW/CMakeLists.txt b/src/TKXDEDRAW/CMakeLists.txt index a8348ecea3..918e593cc2 100644 --- a/src/TKXDEDRAW/CMakeLists.txt +++ b/src/TKXDEDRAW/CMakeLists.txt @@ -1,5 +1,3 @@ project(TKXDEDRAW) -set (TKXDEDRAW_DISABLE_COTIRE ON) - OCCT_INCLUDE_CMAKE_FILE (adm/cmake/occt_toolkit) diff --git a/src/TKernel/CMakeLists.txt b/src/TKernel/CMakeLists.txt index f3f74c09d8..4e4dfe0592 100644 --- a/src/TKernel/CMakeLists.txt +++ b/src/TKernel/CMakeLists.txt @@ -12,3 +12,6 @@ elseif ("${USE_MMGR_TYPE}" STREQUAL "JEMALLOC") else () message (STATUS "Info: Used native memory manager") endif() + +# Add the precompiled header +ADD_PRECOMPILED_HEADER(TKernel "${CMAKE_CURRENT_SOURCE_DIR}/TKernel_pch.hxx") diff --git a/src/TKernel/PACKAGES b/src/TKernel/PACKAGES index ee92fa32b7..dc1345f45a 100755 --- a/src/TKernel/PACKAGES +++ b/src/TKernel/PACKAGES @@ -15,3 +15,4 @@ UnitsMethods NCollection Message FlexLexer +Precision diff --git a/src/TKernel/TKernel_pch.hxx b/src/TKernel/TKernel_pch.hxx new file mode 100644 index 0000000000..aec52cad76 --- /dev/null +++ b/src/TKernel/TKernel_pch.hxx @@ -0,0 +1,51 @@ +#ifndef TKERNEL_PCH_H +#define TKERNEL_PCH_H + +// Standard library headers +#include + +// Windows-specific headers (for MSVC) +#ifdef _WIN32 +#ifndef NOMINMAX +#define NOMINMAX +#endif +#include // For Windows API functions like WideCharToMultiByte +#include // For Unicode/MBCS mappings +#ifdef GetObject +#undef GetObject +#endif +#endif + +// TKernel headers +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +#include +#include +#include +#include + +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#endif // TKERNEL_PCH_H \ No newline at end of file diff --git a/tools/CMakeLists.txt b/tools/CMakeLists.txt index beb934f720..881717cd85 100644 --- a/tools/CMakeLists.txt +++ b/tools/CMakeLists.txt @@ -337,17 +337,15 @@ endif() # include the patched or original list of tools # list _TOOLKITS is created foreach tool and contains its toolkits # list will contain all tools -#if (BUILD_Inspector) - OCCT_MODULES_AND_TOOLKITS (TOOLS "TOOL_TOOLKITS" OCCT_TOOLS) - foreach (OCCT_TOOL ${OCCT_TOOLS}) - list (APPEND BUILD_TOOL_TOOLKITS ${${OCCT_TOOL}_TOOL_TOOLKITS}) - endforeach() - - # collect all the headers to /inc/inspector folder - string(TIMESTAMP CURRENT_TIME "%H:%M:%S") - message (STATUS "\nInfo: \(${CURRENT_TIME}\) Start collecting all OCCT tool header files into ${CMAKE_BINARY_DIR}/inc/inspector ...") - COLLECT_AND_INSTALL_OCCT_HEADER_FILES ("${CMAKE_BINARY_DIR}" "${BUILD_TOOL_TOOLKITS}" "${CMAKE_SOURCE_DIR}/tools" "${INSTALL_DIR_INCLUDE}/inspector") -#endif() +OCCT_MODULES_AND_TOOLKITS (TOOLS "TOOL_TOOLKITS" OCCT_TOOLS) +foreach (OCCT_TOOL ${OCCT_TOOLS}) + list (APPEND BUILD_TOOL_TOOLKITS ${${OCCT_TOOL}_TOOL_TOOLKITS}) +endforeach() + +# collect all the headers to /inc/inspector folder +string(TIMESTAMP CURRENT_TIME "%H:%M:%S") +message (STATUS "\nInfo: \(${CURRENT_TIME}\) Start collecting all OCCT tool header files into ${CMAKE_BINARY_DIR}/inc/inspector ...") +COLLECT_AND_INSTALL_OCCT_HEADER_FILES ("${CMAKE_BINARY_DIR}" "${BUILD_TOOL_TOOLKITS}" "tools" "${INSTALL_DIR_INCLUDE}/inspector") # include /inc include_directories (${CMAKE_BINARY_DIR}/${INSTALL_DIR_INCLUDE}) diff --git a/tools/TKDFBrowser/CMakeLists.txt b/tools/TKDFBrowser/CMakeLists.txt index 94ffde503a..a2a5445156 100644 --- a/tools/TKDFBrowser/CMakeLists.txt +++ b/tools/TKDFBrowser/CMakeLists.txt @@ -1,7 +1,5 @@ project(TKDFBrowser) -set (TKDFBrowser_DISABLE_COTIRE OFF) - OCCT_INCLUDE_CMAKE_FILE (adm/cmake/occt_toolkit_prepare_tool) OCCT_INCLUDE_CMAKE_FILE (adm/cmake/occt_toolkit) OCCT_INCLUDE_CMAKE_FILE (adm/cmake/occt_toolkit_prepare_tool) diff --git a/tools/TKMessageModel/CMakeLists.txt b/tools/TKMessageModel/CMakeLists.txt index 69ed7e846a..a6ef727d9e 100644 --- a/tools/TKMessageModel/CMakeLists.txt +++ b/tools/TKMessageModel/CMakeLists.txt @@ -1,7 +1,5 @@ project(TKMessageModel) -set (TKMessageModel_DISABLE_COTIRE OFF) - OCCT_INCLUDE_CMAKE_FILE (adm/cmake/occt_toolkit_prepare_tool) OCCT_INCLUDE_CMAKE_FILE (adm/cmake/occt_toolkit) OCCT_INCLUDE_CMAKE_FILE (adm/cmake/occt_toolkit_prepare_tool) diff --git a/tools/TKMessageView/CMakeLists.txt b/tools/TKMessageView/CMakeLists.txt index f1865f107c..ee948ecc72 100644 --- a/tools/TKMessageView/CMakeLists.txt +++ b/tools/TKMessageView/CMakeLists.txt @@ -1,7 +1,5 @@ project(TKMessageView) -set (TKMessageView_DISABLE_COTIRE OFF) - OCCT_INCLUDE_CMAKE_FILE (adm/cmake/occt_toolkit_prepare_tool) OCCT_INCLUDE_CMAKE_FILE (adm/cmake/occt_toolkit) OCCT_INCLUDE_CMAKE_FILE (adm/cmake/occt_toolkit_prepare_tool) diff --git a/tools/TKShapeView/CMakeLists.txt b/tools/TKShapeView/CMakeLists.txt index b4fe9f9741..c4dd2e935b 100644 --- a/tools/TKShapeView/CMakeLists.txt +++ b/tools/TKShapeView/CMakeLists.txt @@ -1,7 +1,5 @@ project(TKShapeView) -set (TKShapeView_DISABLE_COTIRE OFF) - OCCT_INCLUDE_CMAKE_FILE (adm/cmake/occt_toolkit_prepare_tool) OCCT_INCLUDE_CMAKE_FILE (adm/cmake/occt_toolkit) OCCT_INCLUDE_CMAKE_FILE (adm/cmake/occt_toolkit_prepare_tool) diff --git a/tools/TKTInspector/CMakeLists.txt b/tools/TKTInspector/CMakeLists.txt index c7d6932ae9..23389b74cd 100644 --- a/tools/TKTInspector/CMakeLists.txt +++ b/tools/TKTInspector/CMakeLists.txt @@ -1,7 +1,5 @@ project(TKTInspector) -set (TKTInspector_DISABLE_COTIRE OFF) - set (INSTALL_API ON) OCCT_INCLUDE_CMAKE_FILE (adm/cmake/occt_toolkit_prepare_tool) diff --git a/tools/TKTreeModel/CMakeLists.txt b/tools/TKTreeModel/CMakeLists.txt index d00a9e69ed..0b2d9c65eb 100644 --- a/tools/TKTreeModel/CMakeLists.txt +++ b/tools/TKTreeModel/CMakeLists.txt @@ -1,7 +1,5 @@ project(TKTreeModel) -set (TKTreeModel_DISABLE_COTIRE OFF) - OCCT_INCLUDE_CMAKE_FILE (adm/cmake/occt_toolkit_prepare_tool) OCCT_INCLUDE_CMAKE_FILE (adm/cmake/occt_toolkit) OCCT_INCLUDE_CMAKE_FILE (adm/cmake/occt_toolkit_prepare_tool) diff --git a/tools/TKVInspector/CMakeLists.txt b/tools/TKVInspector/CMakeLists.txt index f57f9f5c10..cbe9037f6d 100644 --- a/tools/TKVInspector/CMakeLists.txt +++ b/tools/TKVInspector/CMakeLists.txt @@ -1,7 +1,5 @@ project(TKVInspector) -set (TKVInspector_DISABLE_COTIRE OFF) - OCCT_INCLUDE_CMAKE_FILE (adm/cmake/occt_toolkit_prepare_tool) OCCT_INCLUDE_CMAKE_FILE (adm/cmake/occt_toolkit) OCCT_INCLUDE_CMAKE_FILE (adm/cmake/occt_toolkit_prepare_tool) diff --git a/tools/TKView/CMakeLists.txt b/tools/TKView/CMakeLists.txt index 4733b3a698..d630f5bbe3 100644 --- a/tools/TKView/CMakeLists.txt +++ b/tools/TKView/CMakeLists.txt @@ -1,7 +1,5 @@ project(TKView) -set (TKView_DISABLE_COTIRE OFF) - OCCT_INCLUDE_CMAKE_FILE (adm/cmake/occt_toolkit_prepare_tool) OCCT_INCLUDE_CMAKE_FILE (adm/cmake/occt_toolkit) OCCT_INCLUDE_CMAKE_FILE (adm/cmake/occt_toolkit_prepare_tool) From 6c9257976433bcb83376396b1409bffe4f502eb8 Mon Sep 17 00:00:00 2001 From: dpasukhi Date: Sat, 12 Oct 2024 16:14:06 +0000 Subject: [PATCH 629/639] Configuration - custom.bat/sh disappearance #97 Fixed issue when custom.bat/sh not regeneration in build directory in case when exists in install directory. --- CMakeLists.txt | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 6cd051909d..e90744ba76 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1029,13 +1029,13 @@ else() set (ADDITIONAL_CUSTOM_CONTENT "\nif [ -e \"\${aScriptPath}/${SUB_CUSTOM_NAME}\" ]; then\n source \"\${aScriptPath}/${SUB_CUSTOM_NAME}\" \"\$1\" \"\$2\" \nfi") endif() - # change custom.bat/sh -if (EXISTS "${INSTALL_DIR}/${INSTALL_DIR_SCRIPT}/custom.${SCRIPT_EXT}") +# validating custom.bat/sh for changes +if (EXISTS "${CMAKE_BINARY_DIR}/custom.${SCRIPT_EXT}" AND EXISTS "${INSTALL_DIR}/${INSTALL_DIR_SCRIPT}/custom.${SCRIPT_EXT}") file (READ "${INSTALL_DIR}/${INSTALL_DIR_SCRIPT}/custom.${SCRIPT_EXT}" CUSTOM_CONTENT) - - set (CUSTOM_CONTENT "${CUSTOM_CONTENT} ${ADDITIONAL_CUSTOM_CONTENT}") - - file (WRITE "${INSTALL_DIR}/${INSTALL_DIR_SCRIPT}/custom.${SCRIPT_EXT}" "${CUSTOM_CONTENT}") + if (NOT "${CUSTOM_CONTENT}" MATCHES "${ADDITIONAL_CUSTOM_CONTENT}") + set (CUSTOM_CONTENT "${CUSTOM_CONTENT} ${ADDITIONAL_CUSTOM_CONTENT}") + OCCT_CONFIGURE_AND_INSTALL ("adm/templates/custom.${SCRIPT_EXT}.main" "custom.${SCRIPT_EXT}" "custom.${SCRIPT_EXT}" "${CUSTOM_CONTENT}") + endif() else() OCCT_CONFIGURE_AND_INSTALL ("adm/templates/custom.${SCRIPT_EXT}.main" "custom.${SCRIPT_EXT}" "custom.${SCRIPT_EXT}" "${INSTALL_DIR_SCRIPT}") endif() From 50f1e73469071ff6c39b01b716fcfd38d6f45a62 Mon Sep 17 00:00:00 2001 From: dpasukhi Date: Sat, 12 Oct 2024 17:26:39 +0000 Subject: [PATCH 630/639] 0033565: Configuration - JeMalloc process different build types Accept only static build of JeMalloc --- adm/cmake/jemalloc.cmake | 165 ++++++++++++++++++++------------------- 1 file changed, 86 insertions(+), 79 deletions(-) diff --git a/adm/cmake/jemalloc.cmake b/adm/cmake/jemalloc.cmake index b37d5d2769..c6a90c46bd 100644 --- a/adm/cmake/jemalloc.cmake +++ b/adm/cmake/jemalloc.cmake @@ -1,5 +1,90 @@ # JeMalloc +macro (JEMALLOC_LIB_SEARCH MMGR_LIB PREFIX) + if (NOT 3RDPARTY_JEMALLOC_LIBRARY_${PREFIX}_${MMGR_LIB}) + set (JEMALLOC_PATH_SUFFIXES "lib" "bin") + set (3RDPARTY_JEMALLOC_LIBRARY_${PREFIX}_${MMGR_LIB} "3RDPARTY_JEMALLOC_LIBRARY_${PREFIX}_${MMGR_LIB}-NOTFOUND") + if (3RDPARTY_JEMALLOC_DIR AND EXISTS "${3RDPARTY_JEMALLOC_DIR}") + find_library (3RDPARTY_JEMALLOC_LIBRARY_${PREFIX}_${MMGR_LIB} NAMES ${MMGR_LIB} + PATHS "${3RDPARTY_JEMALLOC_LIBRARY_DIR}" "${3RDPARTY_JEMALLOC_DIR}" + PATH_SUFFIXES ${JEMALLOC_PATH_SUFFIXES} + CMAKE_FIND_ROOT_PATH_BOTH + NO_DEFAULT_PATH) + else() + find_library (3RDPARTY_JEMALLOC_LIBRARY_${PREFIX}_${MMGR_LIB} NAMES ${MMGR_LIB} + PATH_SUFFIXES ${JEMALLOC_PATH_SUFFIXES} + CMAKE_FIND_ROOT_PATH_BOTH) + endif() + if (3RDPARTY_JEMALLOC_LIBRARY_${PREFIX}_${MMGR_LIB}) + get_filename_component (3RDPARTY_JEMALLOC_LIBRARY_DIR_${MMGR_LIB} "${3RDPARTY_JEMALLOC_LIBRARY_${PREFIX}_${MMGR_LIB}}" PATH) + set (3RDPARTY_JEMALLOC_LIBRARY_DIR_${MMGR_LIB} "${3RDPARTY_JEMALLOC_LIBRARY_DIR_${MMGR_LIB}}") + else() + set (3RDPARTY_JEMALLOC_LIBRARY_DIR_${MMGR_LIB} "") + endif() + endif() + if (3RDPARTY_JEMALLOC_LIBRARY_DIR_${MMGR_LIB}) + list (APPEND 3RDPARTY_LIBRARY_DIRS "${3RDPARTY_JEMALLOC_LIBRARY_DIR_${MMGR_LIB}}") + set (3RDPARTY_JEMALLOC_LIBRARY_DIR "${3RDPARTY_JEMALLOC_LIBRARY_DIR_${MMGR_LIB}}" CACHE PATH "The directory containing JEMALLOC libraries" FORCE) + elseif("${PREFIX}" STREQUAL "SHARED") + return() + else() + message(STATUS "Cannot find ${MMGR_LIB} library in jemalloc 3rdparty") + list (APPEND 3RDPARTY_NO_LIBS 3RDPARTY_JEMALLOC_LIBRARY_DIR_${MMGR_LIB}) + set (3RDPARTY_JEMALLOC_LIBRARY_${PREFIX}_${MMGR_LIB} "") + endif() + set (JEMALLOC_IS_STATIC_LIB FALSE) + if (((${3RDPARTY_JEMALLOC_LIBRARY_${PREFIX}_${MMGR_LIB}} MATCHES "\.lib$")) OR ((${3RDPARTY_JEMALLOC_LIBRARY_${PREFIX}_${MMGR_LIB}} MATCHES "\.a$"))) + get_filename_component(STATIC_LIB_NAME ${3RDPARTY_JEMALLOC_LIBRARY_${PREFIX}_${MMGR_LIB}} NAME) + list(APPEND CSF_MMGR "${STATIC_LIB_NAME}") + set (JEMALLOC_IS_STATIC_LIB TRUE) + endif() + # install instructions + if (INSTALL_JEMALLOC AND NOT JEMALLOC_IS_STATIC_LIB) + OCCT_MAKE_OS_WITH_BITNESS() + OCCT_MAKE_COMPILER_SHORT_NAME() + get_filename_component(3RDPARTY_JEMALLOC_LIBRARY ${3RDPARTY_JEMALLOC_LIBRARY_${PREFIX}_${MMGR_LIB}} REALPATH) + if (SINGLE_GENERATOR) + install (FILES "${3RDPARTY_JEMALLOC_LIBRARY}" + DESTINATION "${INSTALL_DIR}/${INSTALL_DIR_LIB}") + else() + install (FILES "${3RDPARTY_JEMALLOC_LIBRARY}" + CONFIGURATIONS Debug + DESTINATION "${JEMALLOC_INSTALL_DESTINATION}d") + install (FILES "${3RDPARTY_JEMALLOC_LIBRARY}" + CONFIGURATIONS Release + DESTINATION "${JEMALLOC_INSTALL_DESTINATION}") + install (FILES "${3RDPARTY_JEMALLOC_LIBRARY}" + CONFIGURATIONS RelWithDebInfo + DESTINATION "${JEMALLOC_INSTALL_DESTINATION}i") + endif() + set (USED_3RDPARTY_JEMALLOC_DIR "") + elseif(NOT JEMALLOC_IS_STATIC_LIB) + # the library directory for using by the executable + set (USED_3RDPARTY_JEMALLOC_DIR ${3RDPARTY_JEMALLOC_LIBRARY_DIR_${MMGR_LIB}}) + endif() + unset(3RDPARTY_JEMALLOC_LIBRARY_DIR_${MMGR_LIB} CACHE) + unset(3RDPARTY_JEMALLOC_LIBRARY_${PREFIX}_${MMGR_LIB} CACHE) +endmacro() + +macro (SEARCH_JEMALLOC) + # find static jemalloc lib + SET(CMAKE_FIND_LIBRARY_SUFFIXES ".lib" ".a") + if (WIN32) + JEMALLOC_LIB_SEARCH ("jemalloc" "STATIC") + elseif(NOT WIN32) + JEMALLOC_LIB_SEARCH ("jemalloc_pic" "STATIC") + SET(CMAKE_FIND_LIBRARY_SUFFIXES "" "so") + JEMALLOC_LIB_SEARCH ("jemalloc.so.2" "SHARED") + endif() + + # find shared jemalloc lib + SET(CMAKE_FIND_LIBRARY_SUFFIXES ".dll" ".so") + JEMALLOC_LIB_SEARCH ("jemalloc" "SHARED") +endmacro() + +# Reset CSF variable +set (CSF_MMGR "") + if (NOT DEFINED INSTALL_JEMALLOC) set (INSTALL_JEMALLOC OFF CACHE BOOL "${INSTALL_INSTALL_JEMALLOC_DESCR}") endif() @@ -61,83 +146,5 @@ else() set (JEMALLOC_INSTALL_DESTINATION "${INSTALL_DIR}/${INSTALL_DIR_LIB}") endif() -macro (JEMALLOC_LIB_SEARCH MMGR_LIB PREFIX) -if (NOT 3RDPARTY_JEMALLOC_LIBRARY_${PREFIX}_${MMGR_LIB}) - set (JEMALLOC_PATH_SUFFIXES "lib" "bin") - set (3RDPARTY_JEMALLOC_LIBRARY_${PREFIX}_${MMGR_LIB} "3RDPARTY_JEMALLOC_LIBRARY_${PREFIX}_${MMGR_LIB}-NOTFOUND") - if (3RDPARTY_JEMALLOC_DIR AND EXISTS "${3RDPARTY_JEMALLOC_DIR}") - find_library (3RDPARTY_JEMALLOC_LIBRARY_${PREFIX}_${MMGR_LIB} NAMES ${MMGR_LIB} - PATHS "${3RDPARTY_JEMALLOC_LIBRARY_DIR}" "${3RDPARTY_JEMALLOC_DIR}" - PATH_SUFFIXES ${JEMALLOC_PATH_SUFFIXES} - CMAKE_FIND_ROOT_PATH_BOTH - NO_DEFAULT_PATH) - else() - find_library (3RDPARTY_JEMALLOC_LIBRARY_${PREFIX}_${MMGR_LIB} NAMES ${MMGR_LIB} - PATH_SUFFIXES ${JEMALLOC_PATH_SUFFIXES} - CMAKE_FIND_ROOT_PATH_BOTH) - endif() - if (3RDPARTY_JEMALLOC_LIBRARY_${PREFIX}_${MMGR_LIB}) - get_filename_component (3RDPARTY_JEMALLOC_LIBRARY_DIR_${MMGR_LIB} "${3RDPARTY_JEMALLOC_LIBRARY_${PREFIX}_${MMGR_LIB}}" PATH) - set (3RDPARTY_JEMALLOC_LIBRARY_DIR_${MMGR_LIB} "${3RDPARTY_JEMALLOC_LIBRARY_DIR_${MMGR_LIB}}") - else() - set (3RDPARTY_JEMALLOC_LIBRARY_DIR_${MMGR_LIB} "") - endif() -endif() -if (3RDPARTY_JEMALLOC_LIBRARY_DIR_${MMGR_LIB}) - list (APPEND 3RDPARTY_LIBRARY_DIRS "${3RDPARTY_JEMALLOC_LIBRARY_DIR_${MMGR_LIB}}") - set (3RDPARTY_JEMALLOC_LIBRARY_DIR "${3RDPARTY_JEMALLOC_LIBRARY_DIR_${MMGR_LIB}}" CACHE PATH "The directory containing JEMALLOC libraries" FORCE) -else() - message("Cannot find ${MMGR_LIB} library in jemalloc 3rdparty") - list (APPEND 3RDPARTY_NO_LIBS 3RDPARTY_JEMALLOC_LIBRARY_DIR_${MMGR_LIB}) - set (3RDPARTY_JEMALLOC_LIBRARY_${PREFIX}_${MMGR_LIB} "") -endif() -set (JEMALLOC_IS_STATIC_LIB FALSE) -if (((${3RDPARTY_JEMALLOC_LIBRARY_${PREFIX}_${MMGR_LIB}} MATCHES "\.lib$")) OR ((${3RDPARTY_JEMALLOC_LIBRARY_${PREFIX}_${MMGR_LIB}} MATCHES "\.a$"))) - get_filename_component(STATIC_LIB_NAME ${3RDPARTY_JEMALLOC_LIBRARY_${PREFIX}_${MMGR_LIB}} NAME) - list(APPEND CSF_MMGR "${STATIC_LIB_NAME}") - set (JEMALLOC_IS_STATIC_LIB TRUE) -endif() -# install instructions -if (INSTALL_JEMALLOC AND NOT JEMALLOC_IS_STATIC_LIB) - OCCT_MAKE_OS_WITH_BITNESS() - OCCT_MAKE_COMPILER_SHORT_NAME() - get_filename_component(3RDPARTY_JEMALLOC_LIBRARY ${3RDPARTY_JEMALLOC_LIBRARY_${PREFIX}_${MMGR_LIB}} REALPATH) - if (SINGLE_GENERATOR) - install (FILES "${3RDPARTY_JEMALLOC_LIBRARY}" - DESTINATION "${INSTALL_DIR}/${INSTALL_DIR_LIB}") - else() - install (FILES "${3RDPARTY_JEMALLOC_LIBRARY}" - CONFIGURATIONS Debug - DESTINATION "${JEMALLOC_INSTALL_DESTINATION}d") - install (FILES "${3RDPARTY_JEMALLOC_LIBRARY}" - CONFIGURATIONS Release - DESTINATION "${JEMALLOC_INSTALL_DESTINATION}") - install (FILES "${3RDPARTY_JEMALLOC_LIBRARY}" - CONFIGURATIONS RelWithDebInfo - DESTINATION "${JEMALLOC_INSTALL_DESTINATION}i") - endif() - set (USED_3RDPARTY_JEMALLOC_DIR "") -elseif(NOT JEMALLOC_IS_STATIC_LIB) - # the library directory for using by the executable - set (USED_3RDPARTY_JEMALLOC_DIR ${3RDPARTY_JEMALLOC_LIBRARY_DIR_${MMGR_LIB}}) -endif() -unset(3RDPARTY_JEMALLOC_LIBRARY_DIR_${MMGR_LIB} CACHE) -unset(3RDPARTY_JEMALLOC_LIBRARY_${PREFIX}_${MMGR_LIB} CACHE) -endmacro() - -# Reset CSF variable -set (CSF_MMGR "") - # find static jemalloc lib -SET(CMAKE_FIND_LIBRARY_SUFFIXES ".lib" ".a") -if (WIN32) - JEMALLOC_LIB_SEARCH ("jemalloc" "STATIC") -elseif(NOT WIN32) - JEMALLOC_LIB_SEARCH ("jemalloc_pic" "STATIC") - SET(CMAKE_FIND_LIBRARY_SUFFIXES "" "so") - JEMALLOC_LIB_SEARCH ("jemalloc.so.2" "SHARED") -endif() - -# find shared jemalloc lib -SET(CMAKE_FIND_LIBRARY_SUFFIXES ".dll" ".so") -JEMALLOC_LIB_SEARCH ("jemalloc" "SHARED") +SEARCH_JEMALLOC() From d16f03b5b5be616532cfb4e1f9a25aaeb8374a24 Mon Sep 17 00:00:00 2001 From: dpasukhi Date: Sat, 12 Oct 2024 18:15:44 +0000 Subject: [PATCH 631/639] Configuration - Restoring VTK toolkit processing #99 Migration to PCH breaks some VTK search functionality. Fixed non-unique package name caching --- adm/cmake/occt_macros.cmake | 10 ++++++---- adm/cmake/occt_toolkit.cmake | 7 +++++-- src/IVtk/IVtk_Types.hxx | 2 ++ src/IVtkDraw/IVtkDraw.cxx | 1 - .../IVtkDraw_HighlightAndSelectionPipeline.cxx | 3 +++ src/IVtkDraw/IVtkDraw_Interactor.hxx | 1 - src/IVtkTools/IVtkTools.hxx | 2 ++ 7 files changed, 18 insertions(+), 8 deletions(-) diff --git a/adm/cmake/occt_macros.cmake b/adm/cmake/occt_macros.cmake index 50f139ea5d..5b423275ad 100644 --- a/adm/cmake/occt_macros.cmake +++ b/adm/cmake/occt_macros.cmake @@ -271,9 +271,11 @@ function(EXTRACT_TOOLKIT_EXTERNLIB RELATIVE_PATH OCCT_TOOLKIT RESULT_LIBS) endfunction() function (EXTRACT_PACKAGE_FILES RELATIVE_PATH OCCT_PACKAGE RESULT_FILES RESULT_INCLUDE_FOLDER) + # package name is not unique, it can be reuse in tools and src, + # use extra parameter as relative path to distinguish between them set (OCCT_PACKAGE_FILES "") - get_property(OCCT_PACKAGE_FILES GLOBAL PROPERTY OCCT_PACKAGE_${OCCT_PACKAGE}_FILES) - get_property(OCCT_PACKAGE_INCLUDE_DIR GLOBAL PROPERTY OCCT_PACKAGE_${OCCT_PACKAGE}_INCLUDE_DIR) + get_property(OCCT_PACKAGE_FILES GLOBAL PROPERTY OCCT_PACKAGE_${RELATIVE_PATH}_${OCCT_PACKAGE}_FILES) + get_property(OCCT_PACKAGE_INCLUDE_DIR GLOBAL PROPERTY OCCT_PACKAGE_${RELATIVE_PATH}_${OCCT_PACKAGE}_INCLUDE_DIR) if (OCCT_PACKAGE_FILES) set (${RESULT_FILES} ${OCCT_PACKAGE_FILES} PARENT_SCOPE) set (${RESULT_INCLUDE_FOLDER} ${OCCT_PACKAGE_INCLUDE_DIR} PARENT_SCOPE) @@ -310,8 +312,8 @@ function (EXTRACT_PACKAGE_FILES RELATIVE_PATH OCCT_PACKAGE RESULT_FILES RESULT_I set (${RESULT_FILES} ${FILE_PATH_LIST} PARENT_SCOPE) set (${RESULT_INCLUDE_FOLDER} ${OCCT_PACKAGE_INCLUDE_DIR} PARENT_SCOPE) - set_property(GLOBAL PROPERTY OCCT_PACKAGE_${OCCT_PACKAGE}_FILES "${FILE_PATH_LIST}") - set_property(GLOBAL PROPERTY OCCT_PACKAGE_${OCCT_PACKAGE}_INCLUDE_DIR "${OCCT_PACKAGE_INCLUDE_DIR}") + set_property(GLOBAL PROPERTY OCCT_PACKAGE_${RELATIVE_PATH}_${OCCT_PACKAGE}_FILES "${FILE_PATH_LIST}") + set_property(GLOBAL PROPERTY OCCT_PACKAGE_${RELATIVE_PATH}_${OCCT_PACKAGE}_INCLUDE_DIR "${OCCT_PACKAGE_INCLUDE_DIR}") endfunction() function(EXCTRACT_TOOLKIT_DEPS RELATIVE_PATH OCCT_TOOLKIT RESULT_TKS_AS_DEPS RESULT_INCLUDE_FOLDERS) diff --git a/adm/cmake/occt_toolkit.cmake b/adm/cmake/occt_toolkit.cmake index 3dfd0b6661..60032361e1 100644 --- a/adm/cmake/occt_toolkit.cmake +++ b/adm/cmake/occt_toolkit.cmake @@ -229,8 +229,11 @@ foreach (USED_ITEM ${USED_EXTERNLIB_AND_TOOLKITS}) string (REGEX MATCH "^CSF_" CSF_FOUND ${USED_ITEM}) string (REGEX MATCH "^vtk" VTK_FOUND ${USED_ITEM}) - if (NOT "${VTK_FOUND}" STREQUAL "" AND BUILD_SHARED_LIBS AND INSTALL_VTK AND COMMAND OCCT_INSTALL_VTK) - OCCT_INSTALL_VTK(${USED_ITEM}) + if (NOT "${VTK_FOUND}" STREQUAL "") + list (APPEND USED_TOOLKITS_BY_CURRENT_PROJECT ${USED_ITEM}) + if (BUILD_SHARED_LIBS AND INSTALL_VTK AND COMMAND OCCT_INSTALL_VTK) + OCCT_INSTALL_VTK(${USED_ITEM}) + endif() continue() endif() # Search for 3rd-party libraries as a dependency diff --git a/src/IVtk/IVtk_Types.hxx b/src/IVtk/IVtk_Types.hxx index b1e00f5300..5c7acab9ca 100644 --- a/src/IVtk/IVtk_Types.hxx +++ b/src/IVtk/IVtk_Types.hxx @@ -24,6 +24,8 @@ #include #include +#include + #ifdef VTK_USE_64BIT_IDS #if defined(_WIN32) && !defined(_WIN64) #error "64-bit VTK library can not be linked for 32-bit target platform" diff --git a/src/IVtkDraw/IVtkDraw.cxx b/src/IVtkDraw/IVtkDraw.cxx index aedfc709a3..0f995d79b2 100644 --- a/src/IVtkDraw/IVtkDraw.cxx +++ b/src/IVtkDraw/IVtkDraw.cxx @@ -77,7 +77,6 @@ #include #ifndef _WIN32 #include - #include #include #include #include diff --git a/src/IVtkDraw/IVtkDraw_HighlightAndSelectionPipeline.cxx b/src/IVtkDraw/IVtkDraw_HighlightAndSelectionPipeline.cxx index b6fa1399aa..220678b90e 100644 --- a/src/IVtkDraw/IVtkDraw_HighlightAndSelectionPipeline.cxx +++ b/src/IVtkDraw/IVtkDraw_HighlightAndSelectionPipeline.cxx @@ -13,6 +13,9 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. +// Workaround for PCH +#include + #include // prevent disabling some MSVC warning messages by VTK headers diff --git a/src/IVtkDraw/IVtkDraw_Interactor.hxx b/src/IVtkDraw/IVtkDraw_Interactor.hxx index 41c92fb0fc..547e877e3c 100644 --- a/src/IVtkDraw/IVtkDraw_Interactor.hxx +++ b/src/IVtkDraw/IVtkDraw_Interactor.hxx @@ -25,7 +25,6 @@ #else #include #include -#include #include #include #endif diff --git a/src/IVtkTools/IVtkTools.hxx b/src/IVtkTools/IVtkTools.hxx index f7263adf1f..b2e64996c0 100644 --- a/src/IVtkTools/IVtkTools.hxx +++ b/src/IVtkTools/IVtkTools.hxx @@ -19,6 +19,8 @@ #include #include +#include + class vtkLookupTable; class vtkMapper; From f336684b26b8cfbdd3cfdb497be60f0dee2ac0f0 Mon Sep 17 00:00:00 2001 From: dpasukhi Date: Sat, 12 Oct 2024 22:52:11 +0100 Subject: [PATCH 632/639] Configuration - CLang-cl msvc support #101 Update compiler flags and env.bat to work with clang-cl --- adm/cmake/occt_defs_flags.cmake | 10 ++++++++-- adm/templates/env.bat | 4 ++++ adm/templates/env.bat.in | 4 ++++ 3 files changed, 16 insertions(+), 2 deletions(-) diff --git a/adm/cmake/occt_defs_flags.cmake b/adm/cmake/occt_defs_flags.cmake index f33ae158f2..0d8fe91fb3 100644 --- a/adm/cmake/occt_defs_flags.cmake +++ b/adm/cmake/occt_defs_flags.cmake @@ -30,8 +30,14 @@ if (MSVC) # suppress warning on using portable non-secure functions in favor of non-portable secure ones add_definitions (-D_CRT_SECURE_NO_WARNINGS -D_CRT_NONSTDC_NO_DEPRECATE) else() - set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fexceptions -fPIC") - set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fexceptions -fPIC") + set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fexceptions") + set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fexceptions") + if (NOT CMAKE_CXX_SIMULATE_ID STREQUAL "MSVC") + set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC") + set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fPIC") + else() + add_definitions (-D_CRT_SECURE_NO_WARNINGS -D_CRT_NONSTDC_NO_DEPRECATE) + endif() add_definitions(-DOCC_CONVERT_SIGNALS) endif() diff --git a/adm/templates/env.bat b/adm/templates/env.bat index c2c2042432..33e129a457 100644 --- a/adm/templates/env.bat +++ b/adm/templates/env.bat @@ -131,6 +131,8 @@ if not "%DevEnvDir%" == "" ( ) ) else if /I "%VCFMT%" == "gcc" ( rem MinGW +) else if /I "%VCFMT%" == "clang" ( + rem clang ) else ( echo Error: first argument ^(%VCVER%^) should specify supported version of Visual C++, echo one of: @@ -184,6 +186,8 @@ if /I "%VCFMT%" == "vc9" ( set "VCPlatformToolSet=ClangCL" ) else if /I "%VCFMT%" == "gcc" ( rem MinGW +) else if /I "%VCFMT%" == "clang" ( + rem clang ) else ( echo Error: wrong VS identifier exit /B diff --git a/adm/templates/env.bat.in b/adm/templates/env.bat.in index aa3bf6efc7..d83de73336 100644 --- a/adm/templates/env.bat.in +++ b/adm/templates/env.bat.in @@ -80,6 +80,8 @@ if not "%DevEnvDir%" == "" ( ) ) else if /I "%VCFMT%" == "gcc" ( rem MinGW +) else if /I "%VCFMT%" == "clang" ( + rem clang ) else ( echo Error: wrong VS identifier exit /B @@ -118,6 +120,8 @@ if /I "%VCFMT%" == "vc9" ( set "VCPlatformToolSet=v142" ) else if /I "%VCFMT%" == "gcc" ( rem MinGW +) else if /I "%VCFMT%" == "clang" ( + rem clang ) else ( echo Error: first argument ^(%VCVER%^) should specify supported version of Visual C++, echo one of: vc10 ^(VS 2010 SP3^), vc11 ^(VS 2012 SP3^), vc12 ^(VS 2013^) or vc14 ^(VS 2015^) From 83b4e3f988ddade40ae429623b5952959fe80fb5 Mon Sep 17 00:00:00 2001 From: dpasukhi Date: Sun, 13 Oct 2024 09:02:57 +0000 Subject: [PATCH 633/639] Configuration - Option to disable PCH after enabling #102 After enabling PCH it was not possible to disable back. New CMake feature used for disabling --- CMakeLists.txt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index e90744ba76..8507b7fb15 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -150,6 +150,10 @@ endif() if (CMAKE_VERSION VERSION_LESS "3.16") OCCT_CHECK_AND_UNSET (BUILD_USE_PCH) +elseif (NOT BUILD_USE_PCH) + set (CMAKE_DISABLE_PRECOMPILE_HEADERS ON) +else () + set (CMAKE_DISABLE_PRECOMPILE_HEADERS OFF) endif() if (NOT DEFINED BUILD_INCLUDE_SYMLINK) From 96bdb9db84bd57aeb9af69ecdfb2a79af6e61aa4 Mon Sep 17 00:00:00 2001 From: dpasukhi Date: Sat, 19 Oct 2024 15:07:38 +0100 Subject: [PATCH 634/639] Tests - Action to build Refman doc #103 Add GitHub Actions workflow for building OCCT refman documentation --- .github/workflows/build-doc-refman.yml | 36 ++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 .github/workflows/build-doc-refman.yml diff --git a/.github/workflows/build-doc-refman.yml b/.github/workflows/build-doc-refman.yml new file mode 100644 index 0000000000..8992cbf8f4 --- /dev/null +++ b/.github/workflows/build-doc-refman.yml @@ -0,0 +1,36 @@ +# This workflow will build OCCT refman documentation. + +name: Build Refman Documentation + +on: + push: + branches: + - 'master' + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - name: Checkout repository + uses: actions/checkout@v4.2.1 + + - name: Install dependencies + run: sudo apt-get update && sudo apt-get install -y tcl-dev tk-dev cmake gcc g++ make libbtbb-dev libx11-dev libglu1-mesa-dev doxygen graphviz + + - name: Build documentation + run: bash gendoc -refman + + - name: Upload refman documentation + uses: actions/upload-artifact@v4.4.3 + id: artifact-upload-step + with: + name: refman-doc + path: doc/refman + retention-days: 90 + + - name: Upload generation log + uses: actions/upload-artifact@v4.4.3 + with: + name: dogygen.log + path: doc/html_doxygen_err.log From 3cdf8e79f984089f9fa4b116a24bdd2908af88ab Mon Sep 17 00:00:00 2001 From: dpasukhi Date: Sat, 19 Oct 2024 17:02:13 +0100 Subject: [PATCH 635/639] Configuration - JeMalloc from default package #105 Fixed issue with jemalloc from ubuntu, debian and etc default packages --- adm/cmake/jemalloc.cmake | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/adm/cmake/jemalloc.cmake b/adm/cmake/jemalloc.cmake index c6a90c46bd..579ed3e150 100644 --- a/adm/cmake/jemalloc.cmake +++ b/adm/cmake/jemalloc.cmake @@ -125,10 +125,15 @@ if (NOT 3RDPARTY_JEMALLOC_INCLUDE_DIR OR NOT EXISTS "${3RDPARTY_JEMALLOC_INCLUDE if (3RDPARTY_JEMALLOC_DIR AND EXISTS "${3RDPARTY_JEMALLOC_DIR}") find_path (3RDPARTY_JEMALLOC_INCLUDE_DIR NAMES ${HEADER_NAMES} - PATHS ${3RDPARTY_JEMALLOC_DIR} - PATH_SUFFIXES include/jemalloc - CMAKE_FIND_ROOT_PATH_BOTH - NO_DEFAULT_PATH) + PATHS ${3RDPARTY_JEMALLOC_DIR} + PATH_SUFFIXES include/jemalloc + CMAKE_FIND_ROOT_PATH_BOTH + NO_DEFAULT_PATH) + else() + find_path (3RDPARTY_JEMALLOC_INCLUDE_DIR NAMES ${HEADER_NAMES} + PATHS ${3RDPARTY_JEMALLOC_DIR} + PATH_SUFFIXES include/jemalloc + CMAKE_FIND_ROOT_PATH_BOTH) endif() endif() From a97a8e66e380475bd0fc2c2ae3b4a8311ed7eba1 Mon Sep 17 00:00:00 2001 From: dpasukhi Date: Sat, 19 Oct 2024 17:04:53 +0100 Subject: [PATCH 636/639] Configuration - Production build type for linux #106 Fixed problem with not relevant flags and missed C language flags. --- adm/cmake/occt_defs_flags.cmake | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/adm/cmake/occt_defs_flags.cmake b/adm/cmake/occt_defs_flags.cmake index 0d8fe91fb3..6271a35043 100644 --- a/adm/cmake/occt_defs_flags.cmake +++ b/adm/cmake/occt_defs_flags.cmake @@ -147,14 +147,14 @@ elseif (CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX OR (CMAKE_CXX_COMPIL # /GL (whole program optimization) is similar to -flto (Link Time Optimization) in GCC/Clang. # /GF (eliminate duplicate strings) doesn't have a direct equivalent in GCC/Clang, but the compilers do string pooling automatically. # /Gy (enable function-level linking) is similar to -ffunction-sections in GCC/Clang. - # /fp:precise (improve floating-point consistency) is similar to -ffloat-store in GCC, but there isn't a perfect equivalent in Clang. - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O3 -fomit-frame-pointer -flto -ffunction-sections -ffloat-store") + set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -O3 -fomit-frame-pointer -flto -ffunction-sections") + set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -O3 -fomit-frame-pointer -flto -ffunction-sections") # Link-Time Code Generation(LTCG) is requared for Whole Program Optimisation(GL) - set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -flto") - set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -flto") - set(CMAKE_STATIC_LINKER_FLAGS "${CMAKE_STATIC_LINKER_FLAGS} -flto") - set(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} -flto") + set(CMAKE_EXE_LINKER_FLAGS_RELEASE "${CMAKE_EXE_LINKER_FLAGS_RELEASE} -flto") + set(CMAKE_SHARED_LINKER_FLAGS_RELEASE "${CMAKE_SHARED_LINKER_FLAGS_RELEASE} -flto") + set(CMAKE_STATIC_LINKER_FLAGS_RELEASE "${CMAKE_STATIC_LINKER_FLAGS_RELEASE} -flto") + set(CMAKE_MODULE_LINKER_FLAGS_RELEASE "${CMAKE_MODULE_LINKER_FLAGS_RELEASE} -flto") endif() if (CMAKE_CXX_COMPILER_ID MATCHES "[Cc][Ll][Aa][Nn][Gg]") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wshorten-64-to-32") From 191fc37915b1f3b68be86cc51b7a5c0aa7d677e9 Mon Sep 17 00:00:00 2001 From: dpasukhi Date: Sun, 20 Oct 2024 14:58:41 +0100 Subject: [PATCH 637/639] Coding - OpenVR module compilation fail #107 Compilation failed with Clang on OpenVR module --- src/Aspect/Aspect_OpenVRSession.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Aspect/Aspect_OpenVRSession.cxx b/src/Aspect/Aspect_OpenVRSession.cxx index d04f729ea0..2c295435f6 100644 --- a/src/Aspect/Aspect_OpenVRSession.cxx +++ b/src/Aspect/Aspect_OpenVRSession.cxx @@ -168,7 +168,7 @@ struct Aspect_OpenVRSession::VRContext vr::IVRSystem* System; //!< OpenVR session object //! Empty constructor. - Aspect_OpenVRSession::VRContext() : System (NULL) + VRContext() : System (NULL) { memset (TrackedPoses, 0, sizeof(TrackedPoses)); } From 674c246128e586fd09707f92c622862eff29ce75 Mon Sep 17 00:00:00 2001 From: dpasukhi Date: Sun, 20 Oct 2024 15:03:00 +0100 Subject: [PATCH 638/639] Configuration - Update optimization flags for release build #108 --- adm/cmake/occt_defs_flags.cmake | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/adm/cmake/occt_defs_flags.cmake b/adm/cmake/occt_defs_flags.cmake index 6271a35043..974f9784dd 100644 --- a/adm/cmake/occt_defs_flags.cmake +++ b/adm/cmake/occt_defs_flags.cmake @@ -147,14 +147,14 @@ elseif (CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX OR (CMAKE_CXX_COMPIL # /GL (whole program optimization) is similar to -flto (Link Time Optimization) in GCC/Clang. # /GF (eliminate duplicate strings) doesn't have a direct equivalent in GCC/Clang, but the compilers do string pooling automatically. # /Gy (enable function-level linking) is similar to -ffunction-sections in GCC/Clang. - set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -O3 -fomit-frame-pointer -flto -ffunction-sections") - set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -O3 -fomit-frame-pointer -flto -ffunction-sections") + set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -O2 -fomit-frame-pointer -flto -ffunction-sections") + set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -O2 -fomit-frame-pointer -flto -ffunction-sections") # Link-Time Code Generation(LTCG) is requared for Whole Program Optimisation(GL) set(CMAKE_EXE_LINKER_FLAGS_RELEASE "${CMAKE_EXE_LINKER_FLAGS_RELEASE} -flto") - set(CMAKE_SHARED_LINKER_FLAGS_RELEASE "${CMAKE_SHARED_LINKER_FLAGS_RELEASE} -flto") - set(CMAKE_STATIC_LINKER_FLAGS_RELEASE "${CMAKE_STATIC_LINKER_FLAGS_RELEASE} -flto") - set(CMAKE_MODULE_LINKER_FLAGS_RELEASE "${CMAKE_MODULE_LINKER_FLAGS_RELEASE} -flto") + set(CMAKE_SHARED_LINKER_FLAGS_RELEASE "${CMAKE_SHARED_LINKER_FLAGS_RELEASE} -flto -Wl,--gc-sections") + set(CMAKE_STATIC_LINKER_FLAGS_RELEASE "${CMAKE_STATIC_LINKER_FLAGS_RELEASE} -flto -Wl,--gc-sections") + set(CMAKE_MODULE_LINKER_FLAGS_RELEASE "${CMAKE_MODULE_LINKER_FLAGS_RELEASE} -flto -Wl,--gc-sections") endif() if (CMAKE_CXX_COMPILER_ID MATCHES "[Cc][Ll][Aa][Nn][Gg]") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wshorten-64-to-32") From 857b1b648dd1e7b02cb4b441332f6ac418e9435a Mon Sep 17 00:00:00 2001 From: dpasukhi Date: Sun, 20 Oct 2024 15:08:26 +0100 Subject: [PATCH 639/639] Tests - DRAWEXE Testing integration into GH #109 Introduced a comprehensive multi-platform build and test workflow for OCCT, supporting Windows, macOS, and Linux. Added a new workflow for automated documentation building. Reorganized a code analysis workflow using CodeQL and Microsoft C++ Code Analysis. --- .../build-and-test-multiplatform.yml | 796 ++++++++++++++++++ .github/workflows/build-doc-refman.yml | 36 - .github/workflows/build-docs.yml | 45 + .../build-linux-clang-x64-dynamic.yml | 42 - .../workflows/build-linux-gcc-x64-dynamic.yml | 44 - .../build-macos-clang-x64-dynamic.yml | 45 - .../build-windows-msvc-x64-dynamic.yml | 44 - .github/workflows/code-analysis.yml | 97 +++ .github/workflows/codemsvc.yml | 62 -- .github/workflows/codeql.yml | 60 -- 10 files changed, 938 insertions(+), 333 deletions(-) create mode 100644 .github/workflows/build-and-test-multiplatform.yml delete mode 100644 .github/workflows/build-doc-refman.yml create mode 100644 .github/workflows/build-docs.yml delete mode 100644 .github/workflows/build-linux-clang-x64-dynamic.yml delete mode 100644 .github/workflows/build-linux-gcc-x64-dynamic.yml delete mode 100644 .github/workflows/build-macos-clang-x64-dynamic.yml delete mode 100644 .github/workflows/build-windows-msvc-x64-dynamic.yml create mode 100644 .github/workflows/code-analysis.yml delete mode 100644 .github/workflows/codemsvc.yml delete mode 100644 .github/workflows/codeql.yml diff --git a/.github/workflows/build-and-test-multiplatform.yml b/.github/workflows/build-and-test-multiplatform.yml new file mode 100644 index 0000000000..46945b65a2 --- /dev/null +++ b/.github/workflows/build-and-test-multiplatform.yml @@ -0,0 +1,796 @@ +# This workflow builds and tests OCCT on multiple platforms (Windows, macOS, Linux with Clang, and Linux with GCC). +# It is triggered on pull requests to any branch. +# The workflow includes steps to prepare and build the project on each platform, run tests, and upload the results. +# Concurrency is set to ensure that only one instance of the workflow runs per pull request at a time. + +name: Build and Test OCCT on Multiple Platforms + +on: + pull_request: + branches: + - '**' + +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number }} + cancel-in-progress: true + +jobs: + prepare-and-build-windows-x64: + name: Prepare and Build on Windows with MSVC (x64) + runs-on: windows-2022 + + steps: + # Step: Checkout the repository + - name: Checkout repository + uses: actions/checkout@v4.1.7 + + # Step: Set up MSVC environment + - name: Set up MSVC + uses: ilammy/msvc-dev-cmd@v1.13.0 + with: + arch: x64 + + # Step: Download and extract 3rdparty dependencies + - name: Download and extract 3rdparty dependencies + run: | + Invoke-WebRequest -Uri https://github.com/Open-Cascade-SAS/OCCT/releases/download/V7_8_0/3rdparty-vc14-64.zip -OutFile 3rdparty-vc14-64.zip + Expand-Archive -Path 3rdparty-vc14-64.zip -DestinationPath . + Remove-Item 3rdparty-vc14-64.zip + shell: pwsh + + # Step: Configure OCCT with CMake + - name: Configure OCCT + run: | + mkdir build + cd build + cmake -T host=x64 ` + -D USE_FREETYPE=ON ` + -D USE_TK=OFF ` + -D BUILD_USE_PCH=ON ` + -D BUILD_OPT_PROFILE=Production ` + -D BUILD_INCLUDE_SYMLINK=ON ` + -D CMAKE_BUILD_TYPE=Release ` + -D 3RDPARTY_DIR=${{ github.workspace }}/3rdparty-vc14-64 ` + -D INSTALL_DIR=${{ github.workspace }}/install ` + -D USE_DRACO=ON ` + -D USE_FFMPEG=ON ` + -D USE_FREEIMAGE=ON ` + -D USE_GLES2=ON ` + -D USE_OPENVR=ON ` + -D USE_VTK=ON ` + -D USE_TBB=ON ` + -D USE_RAPIDJSON=ON ` + -D USE_OPENGL=ON .. + shell: pwsh + + # Step: Build OCCT + - name: Build OCCT + run: | + cd build + cmake --build . --config Release -- /m + + # Step: Install OCCT + - name: Install OCCT + run: | + cd build + cmake --install . --config Release + + # Step: Upload install directory + - name: Upload install directory + uses: actions/upload-artifact@v4.4.3 + with: + name: install-windows-x64 + path: install + + prepare-and-build-windows-clang-x64: + name: Prepare and Build on Windows with Clang (x64) + runs-on: windows-2022 + + steps: + # Step: Checkout the repository + - name: Checkout repository + uses: actions/checkout@v4.1.7 + + # Step: Set up MSVC environment + - name: Set up MSVC + uses: ilammy/msvc-dev-cmd@v1.13.0 + with: + arch: x64 + + # Step: Download and extract 3rdparty dependencies + - name: Download and extract 3rdparty dependencies + run: | + Invoke-WebRequest -Uri https://github.com/Open-Cascade-SAS/OCCT/releases/download/V7_8_0/3rdparty-vc14-64.zip -OutFile 3rdparty-vc14-64.zip + Expand-Archive -Path 3rdparty-vc14-64.zip -DestinationPath . + Remove-Item 3rdparty-vc14-64.zip + shell: pwsh + + # Step: Configure OCCT with CMake + - name: Configure OCCT + run: | + mkdir build + cd build + cmake -G "Ninja" ` + -D CMAKE_C_COMPILER=clang ` + -D CMAKE_CXX_COMPILER=clang++ ` + -D USE_FREETYPE=ON ` + -D USE_TK=OFF ` + -D BUILD_USE_PCH=ON ` + -D BUILD_OPT_PROFILE=Production ` + -D BUILD_INCLUDE_SYMLINK=ON ` + -D CMAKE_BUILD_TYPE=Release ` + -D 3RDPARTY_DIR=${{ github.workspace }}/3rdparty-vc14-64 ` + -D INSTALL_DIR=${{ github.workspace }}/install ` + -D USE_DRACO=ON ` + -D USE_FFMPEG=ON ` + -D USE_FREEIMAGE=ON ` + -D USE_GLES2=OFF ` + -D USE_OPENVR=ON ` + -D USE_VTK=OFF ` + -D USE_TBB=ON ` + -D USE_RAPIDJSON=ON ` + -D USE_OPENGL=ON .. + shell: pwsh + + # Step: Build OCCT + - name: Build OCCT + run: | + cd build + cmake --build . --config Release + + # Step: Install OCCT + - name: Install OCCT + run: | + cd build + cmake --install . --config Release + + # Step: Upload install directory + - name: Upload install directory + uses: actions/upload-artifact@v4.4.3 + with: + name: install-windows-clang-x64 + path: install + + prepare-and-build-macos-x64: + name: Prepare and Build on macOS with Clang (x64) + runs-on: macos-15 + + steps: + # Step: Checkout the repository + - name: Checkout repository + uses: actions/checkout@v4.1.7 + + # Step: Install dependencies using Homebrew + - name: Install dependencies + run: | + brew update + brew install tcl-tk tbb gl2ps xerces-c \ + libxmu libxi libxft libxpm \ + glew + + # Step: Configure OCCT with CMake + - name: Configure OCCT + run: | + mkdir -p build + cd build + cmake -G "Unix Makefiles" \ + -D CMAKE_C_COMPILER=clang \ + -D CMAKE_CXX_COMPILER=clang++ \ + -D USE_FREETYPE=OFF \ + -D BUILD_USE_PCH=ON \ + -D BUILD_INCLUDE_SYMLINK=ON \ + -D CMAKE_BUILD_TYPE=Release \ + -D INSTALL_DIR=${{ github.workspace }}/install .. + + # Step: Build OCCT + - name: Build OCCT + run: | + cd build + make -j$(sysctl -n hw.logicalcpu) + + # Step: Install OCCT + - name: Install OCCT + run: | + cd build + make install + + # Step: Upload install directory + - name: Upload install directory + uses: actions/upload-artifact@v4.4.3 + with: + name: install-macos-x64 + path: install + + prepare-and-build-macos-gcc-x64: + name: Prepare and Build on macOS with GCC (x64) + runs-on: macos-15 + + steps: + # Step: Checkout the repository + - name: Checkout repository + uses: actions/checkout@v4.1.7 + + # Step: Install dependencies using Homebrew + - name: Install dependencies + run: | + brew update + brew install gcc tcl-tk tbb gl2ps xerces-c \ + libxmu libxi libxft libxpm \ + glew + + # Step: Configure OCCT with CMake + - name: Configure OCCT + run: | + mkdir -p build + cd build + cmake -G "Unix Makefiles" \ + -D CMAKE_C_COMPILER=gcc \ + -D CMAKE_CXX_COMPILER=g++ \ + -D USE_FREETYPE=OFF \ + -D BUILD_USE_PCH=ON \ + -D BUILD_INCLUDE_SYMLINK=ON \ + -D CMAKE_BUILD_TYPE=Release \ + -D INSTALL_DIR=${{ github.workspace }}/install .. + + # Step: Build OCCT + - name: Build OCCT + run: | + cd build + make -j$(sysctl -n hw.logicalcpu) + + # Step: Install OCCT + - name: Install OCCT + run: | + cd build + make install + + # Step: Upload install directory + - name: Upload install directory + uses: actions/upload-artifact@v4.4.3 + with: + name: install-macos-gcc-x64 + path: install + + prepare-and-build-linux-clang-x64: + name: Prepare and Build on Ubuntu with Clang (x64) + runs-on: ubuntu-24.04 + + steps: + # Step: Checkout the repository + - name: Checkout repository + uses: actions/checkout@v4.1.7 + + # Step: Install dependencies using apt-get + - name: Install dependencies + run: sudo apt-get update && sudo apt-get install -y tcl-dev tk-dev cmake clang make libbtbb-dev libx11-dev libglu1-mesa-dev tcllib tcl-thread tcl + + # Step: Configure OCCT with CMake + - name: Configure OCCT + run: | + mkdir -p build + cd build + cmake -G "Unix Makefiles" \ + -D CMAKE_C_COMPILER=clang \ + -D CMAKE_CXX_COMPILER=clang++ \ + -D BUILD_USE_PCH=ON \ + -D BUILD_INCLUDE_SYMLINK=ON \ + -D BUILD_OPT_PROFILE=Production \ + -D USE_TK=OFF \ + -D USE_FREETYPE=OFF \ + -D CMAKE_BUILD_TYPE=Release \ + -D INSTALL_DIR=${{ github.workspace }}/install .. + + # Step: Build OCCT + - name: Build OCCT + run: | + cd build + make -j"$(nproc)" + + # Step: Install OCCT + - name: Install OCCT + run: | + cd build + make install + + # Step: Upload install directory + - name: Upload install directory + uses: actions/upload-artifact@v4.4.3 + with: + name: install-linux-clang-x64 + path: install + + prepare-and-build-linux-gcc-x64: + name: Prepare and Build on Ubuntu with GCC (x64) + runs-on: ubuntu-24.04 + + steps: + # Step: Checkout the repository + - name: Checkout repository + uses: actions/checkout@v4.1.7 + + # Step: Install dependencies using apt-get + - name: Install dependencies + run: sudo apt-get update && sudo apt-get install -y tcl-dev tk-dev cmake gcc g++ make libbtbb-dev libx11-dev libglu1-mesa-dev tcllib tcl-thread tcl + + # Step: Configure OCCT with CMake + - name: Configure OCCT + run: | + mkdir -p build + cd build + cmake -G "Unix Makefiles" \ + -D CMAKE_C_COMPILER=gcc \ + -D CMAKE_CXX_COMPILER=g++ \ + -D BUILD_USE_PCH=ON \ + -D BUILD_INCLUDE_SYMLINK=ON \ + -D BUILD_OPT_PROFILE=Production \ + -D USE_TK=OFF \ + -D USE_FREETYPE=OFF \ + -D CMAKE_BUILD_TYPE=Release \ + -D INSTALL_DIR=${{ github.workspace }}/install .. + + # Step: Build OCCT + - name: Build OCCT + run: | + cd build + make -j"$(nproc)" + + # Step: Install OCCT + - name: Install OCCT + run: | + cd build + make install + + # Step: Upload install directory + - name: Upload install directory + uses: actions/upload-artifact@v4.4.3 + with: + name: install-linux-gcc-x64 + path: install + + test-windows-x64: + name: Test on Windows (x64) + runs-on: windows-2022 + needs: prepare-and-build-windows-x64 + + steps: + # Step: Checkout the repository + - name: Checkout repository + uses: actions/checkout@v4.1.7 + + # Step: Set up MSVC environment + - name: Set up MSVC + uses: ilammy/msvc-dev-cmd@v1.13.0 + with: + arch: x64 + + # Step: Download and extract 3rdparty dependencies + - name: Download and extract 3rdparty dependencies + run: | + Invoke-WebRequest -Uri https://github.com/Open-Cascade-SAS/OCCT/releases/download/V7_8_0/3rdparty-vc14-64.zip -OutFile 3rdparty-vc14-64.zip + Expand-Archive -Path 3rdparty-vc14-64.zip -DestinationPath . + Remove-Item 3rdparty-vc14-64.zip + shell: pwsh + + # Step: Download and extract test data + - name: Download and extract test data + run: | + cd data + Invoke-WebRequest -Uri https://github.com/Open-Cascade-SAS/OCCT/releases/download/V7_8_0/opencascade-dataset-7.8.0.zip -OutFile opencascade-dataset-7.8.0.zip + Expand-Archive -Path opencascade-dataset-7.8.0.zip -DestinationPath . + Remove-Item opencascade-dataset-7.8.0.zip + shell: pwsh + + # Step: Download and extract install directory + - name: Download and extract install directory + uses: actions/download-artifact@v4.1.0 + with: + name: install-windows-x64 + path: install + + # Step: Run tests + - name: Run tests + run: | + cd install + call env.bat vc14 win64 release + DRAWEXE.exe -v -c testgrid + shell: cmd + env: + CSF_TestScriptsPath: ${{ github.workspace }}/tests + CSF_TestDataPath: ${{ github.workspace }}/data + + # Step: Upload test results + - name: Upload test results + uses: actions/upload-artifact@v4.4.3 + id: artifact-upload-step + with: + name: results-windows-x64 + path: install/results + retention-days: 7 + + test-windows-clang-x64: + name: Test on Windows with Clang (x64) + runs-on: windows-2022 + needs: prepare-and-build-windows-clang-x64 + + steps: + # Step: Checkout the repository + - name: Checkout repository + uses: actions/checkout@v4.1.7 + + # Step: Set up MSVC environment + - name: Set up MSVC + uses: ilammy/msvc-dev-cmd@v1.13.0 + with: + arch: x64 + + # Step: Download and extract 3rdparty dependencies + - name: Download and extract 3rdparty dependencies + run: | + Invoke-WebRequest -Uri https://github.com/Open-Cascade-SAS/OCCT/releases/download/V7_8_0/3rdparty-vc14-64.zip -OutFile 3rdparty-vc14-64.zip + Expand-Archive -Path 3rdparty-vc14-64.zip -DestinationPath . + Remove-Item 3rdparty-vc14-64.zip + shell: pwsh + + # Step: Download and extract test data + - name: Download and extract test data + run: | + cd data + Invoke-WebRequest -Uri https://github.com/Open-Cascade-SAS/OCCT/releases/download/V7_8_0/opencascade-dataset-7.8.0.zip -OutFile opencascade-dataset-7.8.0.zip + Expand-Archive -Path opencascade-dataset-7.8.0.zip -DestinationPath . + Remove-Item opencascade-dataset-7.8.0.zip + shell: pwsh + + # Step: Download and extract install directory + - name: Download and extract install directory + uses: actions/download-artifact@v4.1.0 + with: + name: install-windows-clang-x64 + path: install + + # Step: Run tests + - name: Run tests + run: | + cd install + call env.bat clang win64 release + DRAWEXE.exe -v -c testgrid + shell: cmd + env: + CSF_TestScriptsPath: ${{ github.workspace }}/tests + CSF_TestDataPath: ${{ github.workspace }}/data + + # Step: Upload test results + - name: Upload test results + uses: actions/upload-artifact@v4.4.3 + id: artifact-upload-step + with: + name: results-windows-clang-x64 + path: install/results + retention-days: 7 + + test-macos-x64: + name: Test on macOS (x64) + runs-on: macos-15 + needs: prepare-and-build-macos-x64 + + steps: + # Step: Checkout the repository + - name: Checkout repository + uses: actions/checkout@v4.1.7 + + # Step: Install dependencies for headless OpenGL + - name: Install dependencies for headless OpenGL + run: | + brew update + brew install mesalib-glw + + # Step: Download test data + - name: Download test data + run: | + cd data + curl -L -O https://github.com/Open-Cascade-SAS/OCCT/releases/download/V7_8_0/opencascade-dataset-7.8.0.tar.xz + tar -xf opencascade-dataset-7.8.0.tar.xz + + # Step: Download and extract install directory + - name: Download and extract install directory + uses: actions/download-artifact@v4.1.0 + with: + name: install-macos-x64 + path: install + + # Step: Set LIBGL_ALWAYS_SOFTWARE environment variable + - name: Set LIBGL_ALWAYS_SOFTWARE environment variable + run: echo "LIBGL_ALWAYS_SOFTWARE=1" >> $GITHUB_ENV + + # Step: Set execute permissions on DRAWEXE + - name: Set execute permissions on DRAWEXE + run: chmod +x install/bin/DRAWEXE + + # Step: Run tests + - name: Run tests + run: | + cd install + cd bin + source env.sh + ./DRAWEXE -v -c testgrid + shell: bash + env: + LIBGL_ALWAYS_SOFTWARE: 1 + CSF_TestScriptsPath: ${{ github.workspace }}/tests + CSF_TestDataPath: ${{ github.workspace }}/data + + # Step: Upload test results + - name: Upload test results + uses: actions/upload-artifact@v4.4.3 + id: artifact-upload-step + with: + name: results-macos-x64 + path: install/bin/results + retention-days: 7 + + test-macos-gcc-x64: + name: Test on macOS with GCC (x64) + runs-on: macos-15 + needs: prepare-and-build-macos-gcc-x64 + + steps: + # Step: Checkout the repository + - name: Checkout repository + uses: actions/checkout@v4.1.7 + + # Step: Install dependencies for headless OpenGL + - name: Install dependencies for headless OpenGL + run: | + brew update + brew install mesalib-glw + + # Step: Download test data + - name: Download test data + run: | + cd data + curl -L -O https://github.com/Open-Cascade-SAS/OCCT/releases/download/V7_8_0/opencascade-dataset-7.8.0.tar.xz + tar -xf opencascade-dataset-7.8.0.tar.xz + + # Step: Download and extract install directory + - name: Download and extract install directory + uses: actions/download-artifact@v4.1.0 + with: + name: install-macos-gcc-x64 + path: install + + # Step: Set LIBGL_ALWAYS_SOFTWARE environment variable + - name: Set LIBGL_ALWAYS_SOFTWARE environment variable + run: echo "LIBGL_ALWAYS_SOFTWARE=1" >> $GITHUB_ENV + + # Step: Set execute permissions on DRAWEXE + - name: Set execute permissions on DRAWEXE + run: chmod +x install/bin/DRAWEXE + + # Step: Run tests + - name: Run tests + run: | + cd install + cd bin + source env.sh + ./DRAWEXE -v -c testgrid + shell: bash + env: + LIBGL_ALWAYS_SOFTWARE: 1 + CSF_TestScriptsPath: ${{ github.workspace }}/tests + CSF_TestDataPath: ${{ github.workspace }}/data + + # Step: Upload test results + - name: Upload test results + uses: actions/upload-artifact@v4.4.3 + id: artifact-upload-step + with: + name: results-macos-gcc-x64 + path: install/bin/results + retention-days: 7 + + test-linux-clang-x64: + name: Test on Linux with Clang (x64) + runs-on: ubuntu-24.04 + needs: prepare-and-build-linux-clang-x64 + + steps: + # Step: Checkout the repository + - name: Checkout repository + uses: actions/checkout@v4.1.7 + + # Step: Install dependencies using apt-get + - name: Install dependencies + run: sudo apt-get update && sudo apt-get install -y tcl-dev tk-dev cmake clang make libbtbb-dev libx11-dev libglu1-mesa-dev tcllib tcl-thread tcl + + # Step: Install Xvfb and Mesa + - name: Install Xvfb and Mesa + run: | + sudo apt-get update + sudo apt-get install -y xvfb mesa-utils libgl1-mesa-dri + + # Step: Start Xvfb + - name: Start Xvfb + run: Xvfb :99 -screen 0 1920x1080x24 & + + # Step: Set DISPLAY environment variable + - name: Set DISPLAY environment variable + run: echo "DISPLAY=:99" >> $GITHUB_ENV + + # Step: Download test data + - name: Download test data + run: | + cd data + wget https://github.com/Open-Cascade-SAS/OCCT/releases/download/V7_8_0/opencascade-dataset-7.8.0.tar.xz + tar -xf opencascade-dataset-7.8.0.tar.xz + + # Step: Download and extract install directory + - name: Download and extract install directory + uses: actions/download-artifact@v4.1.0 + with: + name: install-linux-clang-x64 + path: install + + # Step: Set LIBGL_ALWAYS_SOFTWARE environment variable + - name: Set LIBGL_ALWAYS_SOFTWARE environment variable + run: echo "LIBGL_ALWAYS_SOFTWARE=1" >> $GITHUB_ENV + + # Step: Set execute permissions on DRAWEXE + - name: Set execute permissions on DRAWEXE + run: chmod +x install/bin/DRAWEXE + + # Step: Run tests + - name: Run tests + run: | + cd install + cd bin + source env.sh + ./DRAWEXE -v -c testgrid + shell: bash + env: + DISPLAY: :99 + LIBGL_ALWAYS_SOFTWARE: 1 + CSF_TestScriptsPath: ${{ github.workspace }}/tests + CSF_TestDataPath: ${{ github.workspace }}/data + + # Step: Upload test results + - name: Upload test results + uses: actions/upload-artifact@v4.4.3 + id: artifact-upload-step + with: + name: results-linux-clang-x64 + path: install/bin/results + retention-days: 7 + + test-linux-gcc-x64: + name: Test on Linux with GCC (x64) + runs-on: ubuntu-24.04 + needs: prepare-and-build-linux-gcc-x64 + + steps: + # Step: Checkout the repository + - name: Checkout repository + uses: actions/checkout@v4.1.7 + + # Step: Install dependencies using apt-get + - name: Install dependencies + run: sudo apt-get update && sudo apt-get install -y tcl-dev tk-dev cmake gcc g++ make libbtbb-dev libx11-dev libglu1-mesa-dev tcllib tcl-thread tcl + + # Step: Install Xvfb and Mesa + - name: Install Xvfb and Mesa + run: | + sudo apt-get update + sudo apt-get install -y xvfb mesa-utils libgl1-mesa-dri + + # Step: Start Xvfb + - name: Start Xvfb + run: Xvfb :99 -screen 0 1920x1080x24 & + + # Step: Set DISPLAY environment variable + - name: Set DISPLAY environment variable + run: echo "DISPLAY=:99" >> $GITHUB_ENV + + # Step: Download test data + - name: Download test data + run: | + cd data + wget https://github.com/Open-Cascade-SAS/OCCT/releases/download/V7_8_0/opencascade-dataset-7.8.0.tar.xz + tar -xf opencascade-dataset-7.8.0.tar.xz + + # Step: Download and extract install directory + - name: Download and extract install directory + uses: actions/download-artifact@v4.1.0 + with: + name: install-linux-gcc-x64 + path: install + + # Step: Set LIBGL_ALWAYS_SOFTWARE environment variable + - name: Set LIBGL_ALWAYS_SOFTWARE environment variable + run: echo "LIBGL_ALWAYS_SOFTWARE=1" >> $GITHUB_ENV + + # Step: Set execute permissions on DRAWEXE + - name: Set execute permissions on DRAWEXE + run: chmod +x install/bin/DRAWEXE + + # Step: Run tests + - name: Run tests + run: | + cd install + cd bin + source env.sh + ./DRAWEXE -v -c testgrid + shell: bash + env: + DISPLAY: :99 + LIBGL_ALWAYS_SOFTWARE: 1 + CSF_TestScriptsPath: ${{ github.workspace }}/tests + CSF_TestDataPath: ${{ github.workspace }}/data + + # Step: Upload test results + - name: Upload test results + uses: actions/upload-artifact@v4.4.3 + id: artifact-upload-step + with: + name: results-linux-gcc-x64 + path: install/bin/results + retention-days: 7 + + summarize: + name: Summarize and Send PR Message + runs-on: ubuntu-24.04 + needs: [test-windows-x64, test-windows-clang-x64, test-macos-x64, test-macos-gcc-x64, test-linux-clang-x64, test-linux-gcc-x64] + + steps: + # Step: Checkout the repository + - name: Checkout repository + uses: actions/checkout@v4.1.7 + + # Step: Download all test results (Windows x64) + - name: Download all test results (Windows x64) + uses: actions/download-artifact@v4.1.0 + with: + name: results-windows-x64 + path: results/windows-x64 + + # Step: Download all test results (Windows Clang x64) + - name: Download all test results (Windows Clang x64) + uses: actions/download-artifact@v4.1.0 + with: + name: results-windows-clang-x64 + path: results/windows-clang-x64 + + # Step: Download all test results (macOS x64) + - name: Download all test results (macOS x64) + uses: actions/download-artifact@v4.1.0 + with: + name: results-macos-x64 + path: results/macos-x64 + + # Step: Download all test results (macOS GCC x64) + - name: Download all test results (macOS GCC x64) + uses: actions/download-artifact@v4.1.0 + with: + name: results-macos-gcc-x64 + path: results/macos-gcc-x64 + + # Step: Download all test results (Linux Clang x64) + - name: Download all test results (Linux Clang x64) + uses: actions/download-artifact@v4.1.0 + with: + name: results-linux-clang-x64 + path: results/linux-clang-x64 + + # Step: Download all test results (Linux GCC x64) + - name: Download all test results (Linux GCC x64) + uses: actions/download-artifact@v4.1.0 + with: + name: results-linux-gcc-x64 + path: results/linux-gcc-x64 + + # Step: Summarize results + - name: Summarize results + run: | + echo "Summarizing results..." + + # Step: Send PR message + - name: Send PR message + run: | + echo "Sending PR message..." diff --git a/.github/workflows/build-doc-refman.yml b/.github/workflows/build-doc-refman.yml deleted file mode 100644 index 8992cbf8f4..0000000000 --- a/.github/workflows/build-doc-refman.yml +++ /dev/null @@ -1,36 +0,0 @@ -# This workflow will build OCCT refman documentation. - -name: Build Refman Documentation - -on: - push: - branches: - - 'master' - -jobs: - build: - runs-on: ubuntu-latest - - steps: - - name: Checkout repository - uses: actions/checkout@v4.2.1 - - - name: Install dependencies - run: sudo apt-get update && sudo apt-get install -y tcl-dev tk-dev cmake gcc g++ make libbtbb-dev libx11-dev libglu1-mesa-dev doxygen graphviz - - - name: Build documentation - run: bash gendoc -refman - - - name: Upload refman documentation - uses: actions/upload-artifact@v4.4.3 - id: artifact-upload-step - with: - name: refman-doc - path: doc/refman - retention-days: 90 - - - name: Upload generation log - uses: actions/upload-artifact@v4.4.3 - with: - name: dogygen.log - path: doc/html_doxygen_err.log diff --git a/.github/workflows/build-docs.yml b/.github/workflows/build-docs.yml new file mode 100644 index 0000000000..a99c773769 --- /dev/null +++ b/.github/workflows/build-docs.yml @@ -0,0 +1,45 @@ +# This workflow builds the OCCT reference manual documentation. +# It is triggered on pushes to the 'master' branch. +# The workflow includes steps to checkout the repository, install dependencies, build the documentation, and upload the generated documentation and logs as artifacts. + +name: Build Documentation + +on: + push: + branches: + - 'master' + +jobs: + build: + name: Build Refman Documentation + runs-on: ubuntu-24.04 + + steps: + # Step: Checkout the repository + - name: Checkout repository + uses: actions/checkout@v4.2.1 + + # Step: Install necessary dependencies for building the documentation + - name: Install dependencies + run: sudo apt-get update && sudo apt-get install -y tcl-dev tk-dev cmake gcc g++ make libbtbb-dev libx11-dev libglu1-mesa-dev doxygen graphviz + + # Step: Build the reference manual documentation + - name: Build documentation + run: bash gendoc -refman + + # Step: Upload the generated reference manual documentation as an artifact + - name: Upload refman documentation + uses: actions/upload-artifact@v4.4.3 + id: artifact-upload-step + with: + name: refman-doc + path: doc/refman + retention-days: 90 + + # Step: Upload the documentation generation log as an artifact + - name: Upload generation log + uses: actions/upload-artifact@v4.4.3 + with: + name: doxygen.log + path: doc/html_doxygen_err.log + retention-days: 90 diff --git a/.github/workflows/build-linux-clang-x64-dynamic.yml b/.github/workflows/build-linux-clang-x64-dynamic.yml deleted file mode 100644 index fe9a50c4a3..0000000000 --- a/.github/workflows/build-linux-clang-x64-dynamic.yml +++ /dev/null @@ -1,42 +0,0 @@ -# This workflow will build OCCT on Ubuntu with Clang compiler -# using the provided Docker image with Clang tools. -# -# Notes: -# freetype is disabled -# samples are not built - -name: Build OCCT on Linux with Clang x64 dynamic - -on: - pull_request: - branches: - - '**' - -jobs: - build-linux-clang: - name: Build on Ubuntu with Clang - runs-on: ubuntu-latest - - steps: - - name: Checkout repository - uses: actions/checkout@v4.1.7 - - - name: Install dependencies - run: sudo apt-get update && sudo apt-get install -y tcl-dev tk-dev cmake clang make libbtbb-dev libx11-dev libglu1-mesa-dev - - - name: Configure OCCT - run: | - mkdir -p build - cd build - cmake -G "Unix Makefiles" \ - -D CMAKE_C_COMPILER=clang \ - -D CMAKE_CXX_COMPILER=clang++ \ - -D BUILD_USE_PCH=ON \ - -D BUILD_INCLUDE_SYMLINK=ON \ - -D USE_FREETYPE=OFF \ - -D CMAKE_BUILD_TYPE=Release .. - - - name: Build OCCT - run: | - cd build - make -j$(nproc) diff --git a/.github/workflows/build-linux-gcc-x64-dynamic.yml b/.github/workflows/build-linux-gcc-x64-dynamic.yml deleted file mode 100644 index 7985f140c1..0000000000 --- a/.github/workflows/build-linux-gcc-x64-dynamic.yml +++ /dev/null @@ -1,44 +0,0 @@ -# This workflow will build OCCT on Linux with GCC x64 dynamic -# using the provided Docker image with GCC tools. -# -# Notes: -# freetype is disabled -# samples are not built - -name: Build OCCT on Linux with GCC x64 dynamic - -on: - pull_request: - branches: - - '**' - -jobs: - build-linux-gcc: - name: Build on Ubuntu with GCC - runs-on: ubuntu-latest - - steps: - - name: Checkout repository - uses: actions/checkout@v4.1.7 - - - name: Install dependencies - run: sudo apt-get update && sudo apt-get install -y tcl-dev tk-dev cmake gcc g++ make libbtbb-dev libx11-dev libglu1-mesa-dev - - - name: Configure OCCT - run: | - mkdir -p build - cd build - cmake -G "Unix Makefiles" \ - -D CMAKE_C_COMPILER=gcc \ - -D CMAKE_CXX_COMPILER=g++ \ - -D USE_FREETYPE=OFF \ - -D BUILD_USE_PCH=ON \ - -D BUILD_INCLUDE_SYMLINK=ON \ - -D CMAKE_BUILD_TYPE=Release \ - -D CMAKE_C_FLAGS="-Werror -Wno-clobbered -Wmaybe-uninitialized -Wodr -Wno-alloc-size-larger-than" \ - -D CMAKE_CXX_FLAGS="-Werror -Wno-clobbered -Wno-dangling-pointer" .. - - - name: Build OCCT - run: | - cd build - make -j$(nproc) diff --git a/.github/workflows/build-macos-clang-x64-dynamic.yml b/.github/workflows/build-macos-clang-x64-dynamic.yml deleted file mode 100644 index be1e38c115..0000000000 --- a/.github/workflows/build-macos-clang-x64-dynamic.yml +++ /dev/null @@ -1,45 +0,0 @@ -# This workflow builds OCCT on macOS with Clang x64 dynamic. -# -# Notes: -# freetype is disabled -# samples are not built - -name: Build OCCT on macOS with Clang x64 dynamic - -on: - pull_request: - branches: - - '**' - -jobs: - build-macos-clang: - name: Build on macOS with Clang - runs-on: macos-latest - - steps: - - name: Checkout repository - uses: actions/checkout@v4.1.7 - - - name: Install dependencies - run: | - brew update - brew install tcl-tk tbb gl2ps xerces-c \ - libxmu libxi libxft libxpm \ - glew - - - name: Configure OCCT - run: | - mkdir -p build - cd build - cmake -G "Unix Makefiles" \ - -D CMAKE_C_COMPILER=clang \ - -D CMAKE_CXX_COMPILER=clang++ \ - -D USE_FREETYPE=OFF \ - -D BUILD_USE_PCH=ON \ - -D BUILD_INCLUDE_SYMLINK=ON \ - -D CMAKE_BUILD_TYPE=Release .. - - - name: Build OCCT - run: | - cd build - make -j$(sysctl -n hw.logicalcpu) diff --git a/.github/workflows/build-windows-msvc-x64-dynamic.yml b/.github/workflows/build-windows-msvc-x64-dynamic.yml deleted file mode 100644 index f0fcabdf8b..0000000000 --- a/.github/workflows/build-windows-msvc-x64-dynamic.yml +++ /dev/null @@ -1,44 +0,0 @@ -# This workflow will build OCCT on Windows with MSVC x64 in dynamic mode -# using the provided Docker image with MSVC tools. -# -# Notes: -# freetype is disabled -# Draw module is disabled -# samples are not built - -name: Build OCCT on Windows with MSVC x64 dynamic - -on: - pull_request: - branches: - - '**' - -jobs: - build-windows-msvc: - name: Build on Windows with MSVC - runs-on: windows-latest - - steps: - - name: Checkout repository - uses: actions/checkout@v4.1.7 - - - name: Set up MSVC - uses: ilammy/msvc-dev-cmd@v1.13.0 - with: - arch: x64 - - - name: Install dependencies - run: | - choco install cmake --installargs 'ADD_CMAKE_TO_PATH=System' -y - choco install magicsplat-tcl-tk -y - - - name: Configure OCCT - run: | - mkdir build - cd build - cmake -T host=x64 -D USE_FREETYPE=OFF -D BUILD_USE_PCH=ON -D BUILD_INCLUDE_SYMLINK=ON -D BUILD_MODULE_Draw=OFF -D CMAKE_BUILD_TYPE=Release -D CMAKE_C_FLAGS="/WX" -D CMAKE_CXX_FLAGS="/WX" .. - - - name: Build OCCT - run: | - cd build - cmake --build . --config Release -- /m diff --git a/.github/workflows/code-analysis.yml b/.github/workflows/code-analysis.yml new file mode 100644 index 0000000000..73114df123 --- /dev/null +++ b/.github/workflows/code-analysis.yml @@ -0,0 +1,97 @@ +# This workflow performs code analysis using both CodeQL and Microsoft C++ Code Analysis. +# It is triggered on pushes to the 'master' branch and publishes warnings into the security GitHub tab. +# The workflow includes two jobs: one for CodeQL analysis on Ubuntu and another for MSVC Code Analysis on Windows. + +name: Code Analysis + +on: + push: + branches: + - 'master' + +permissions: + contents: read + security-events: write + packages: read + +env: + # Path to the CMake build directory. + build: '${{ github.workspace }}/build' + config: 'Debug' + +jobs: + codeql-analyze: + name: CodeQL Analyze (C/C++) + runs-on: ubuntu-latest + + steps: + # Step: Checkout the repository + - name: Checkout repository + uses: actions/checkout@v4.1.7 + + # Step: Install necessary dependencies for building the project + - name: Install dependencies + run: sudo apt-get update && sudo apt-get install -y tcl-dev tk-dev cmake gcc g++ make libbtbb-dev libx11-dev libglu1-mesa-dev + + # Step: Initialize CodeQL for scanning + - name: Initialize CodeQL + uses: github/codeql-action/init@v3.26.5 + with: + languages: c-cpp + build-mode: manual + + # Step: Build the project using CMake and Make + - name: Build project + shell: bash + run: | + mkdir -p build + cd build + cmake -G "Unix Makefiles" \ + -D CMAKE_C_COMPILER=gcc \ + -D CMAKE_CXX_COMPILER=g++ \ + -D USE_FREETYPE=OFF \ + -D CMAKE_BUILD_TYPE=Release .. + make -j$(nproc) + + # Step: Perform CodeQL Analysis + - name: Perform CodeQL Analysis + uses: github/codeql-action/analyze@v3.26.5 + with: + category: "/language:c-cpp" + + msvc-analyze: + name: Microsoft C++ Code Analysis + runs-on: windows-latest + + steps: + # Step: Checkout the repository + - name: Checkout repository + uses: actions/checkout@v4.1.7 + + # Step: Install necessary dependencies using Chocolatey + - name: Install dependencies + run: | + choco install cmake --installargs 'ADD_CMAKE_TO_PATH=System' -y + choco install magicsplat-tcl-tk -y + + # Step: Configure the project using CMake + - name: Configure CMake + run: | + mkdir build + cd build + cmake -D USE_FREETYPE=OFF -DCMAKE_BUILD_TYPE=${{ env.config }} .. + + # Step: Run MSVC Code Analysis + - name: Run MSVC Code Analysis + uses: microsoft/msvc-code-analysis-action@v0.1.1 + id: run-analysis + with: + cmakeBuildDirectory: ${{ env.build }} + buildConfiguration: ${{ env.config }} + ruleset: NativeRecommendedRules.ruleset + + # Step: Upload SARIF file to GitHub Code Scanning Alerts + - name: Upload SARIF to GitHub + uses: github/codeql-action/upload-sarif@v3.26.5 + with: + sarif_file: ${{ steps.run-analysis.outputs.sarif }} diff --git a/.github/workflows/codemsvc.yml b/.github/workflows/codemsvc.yml deleted file mode 100644 index a69792fe86..0000000000 --- a/.github/workflows/codemsvc.yml +++ /dev/null @@ -1,62 +0,0 @@ -# Security scanning with Microsoft C++ Code Analysis. -# Checks any master integration and publish warnings into security GitHub tab. -# -# Find more information at: -# https://github.com/microsoft/msvc-code-analysis-action - -name: Microsoft C++ Code Analysis - -on: - push: - branches: - - 'master' - -env: - # Path to the CMake build directory. - build: '${{ github.workspace }}/build' - config: 'Debug' - -permissions: - contents: read - -jobs: - analyze: - permissions: - contents: read # for actions/checkout to fetch code - security-events: write # for github/codeql-action/upload-sarif to upload SARIF results - actions: read # only required for a private repository by github/codeql-action/upload-sarif to get the Action run status - name: Analyze - runs-on: windows-latest - - steps: - - name: Checkout repository - uses: actions/checkout@v4.1.7 - - - name: Install dependencies - run: | - choco install cmake --installargs 'ADD_CMAKE_TO_PATH=System' -y - choco install magicsplat-tcl-tk -y - - - name: Configure CMake - run: | - mkdir build - cd build - cmake -D USE_FREETYPE=OFF -DCMAKE_BUILD_TYPE=${{ env.config }} .. - - - name: Run MSVC Code Analysis - uses: microsoft/msvc-code-analysis-action@v0.1.1 - # Provide a unique ID to access the sarif output path - id: run-analysis - with: - cmakeBuildDirectory: ${{ env.build }} - buildConfiguration: ${{ env.config }} - # Ruleset file that will determine what checks will be run - ruleset: NativeRecommendedRules.ruleset - # Paths to ignore analysis of CMake targets and includes - # ignoredPaths: ${{ github.workspace }}/dependencies;${{ github.workspace }}/test - - # Upload SARIF file to GitHub Code Scanning Alerts - - name: Upload SARIF to GitHub - uses: github/codeql-action/upload-sarif@v3.26.5 - with: - sarif_file: ${{ steps.run-analysis.outputs.sarif }} diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml deleted file mode 100644 index e89acd5ce6..0000000000 --- a/.github/workflows/codeql.yml +++ /dev/null @@ -1,60 +0,0 @@ -# Security scanning with CodeQL. -# Checks any master integration and publish warnings into security GitHub tab. -# -# Find more information at: -# https://docs.github.com/en/github/finding-security-vulnerabilities-and-errors-in-your-code/about-code-scanning - -name: CodeQL Code Analysis - -on: - push: - branches: - - 'master' - -jobs: - analyze: - name: Analyze (${{ matrix.language }}) - runs-on: ${{ 'ubuntu-latest' }} - permissions: - # required for all workflows - security-events: write - - # required to fetch internal or private CodeQL packs - packages: read - - strategy: - fail-fast: false - matrix: - include: - - language: c-cpp - build-mode: manual - steps: - - name: Checkout repository - uses: actions/checkout@v4.1.7 - - - name: Install dependencies - run: sudo apt-get update && sudo apt-get install -y tcl-dev tk-dev cmake gcc g++ make libbtbb-dev libx11-dev libglu1-mesa-dev - - # Initializes the CodeQL tools for scanning. - - name: Initialize CodeQL - uses: github/codeql-action/init@v3.26.5 - with: - languages: ${{ matrix.language }} - build-mode: ${{ matrix.build-mode }} - - - if: matrix.build-mode == 'manual' - shell: bash - run: | - mkdir -p build - cd build - cmake -G "Unix Makefiles" \ - -D CMAKE_C_COMPILER=gcc \ - -D CMAKE_CXX_COMPILER=g++ \ - -D USE_FREETYPE=OFF \ - -D CMAKE_BUILD_TYPE=Release .. - make -j$(nproc) - - - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@v3.26.5 - with: - category: "/language:${{matrix.language}}"

}2>Joyy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